docs: document SDK v1 routes, app bundle export, and JS script run - #5112
Merged
Conversation
Eight HTTP routes had no user documentation. All are now in the endpoint matrix with a worked section each, and the two flags that switch them off are in the configuration index. Every request and response shown was captured from a local server (packages/websocket/dist/server.js), not inferred from the handlers. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Eight HTTP routes had no user-facing documentation. Each is now in the
docs/api-reference.mdendpoint matrix with a worked section, and the twoenvironment flags that switch them off are in the
docs/configuration.mdindex.
Every request and response in this PR was captured from a running server
(
packages/websocket/dist/server.js), not read off the handlers andwritten up. Where the code and the server disagreed with my first draft,
the server won — see Corrections below.
Gaps filled
GET /api/sdk/v1/capabilitiessdk/sdk-capabilities-service.ts,server.ts:1096-1119GET /api/sdk/v1/node-typeshttp-api.ts:handleSdkNodeTypeInventory,node-sdk/src/node-type-inventory.tsGET /api/workflows/{id}/interfacehttp-api.ts:handleWorkflowInterfacePOST /api/sdk/v1/workflow-interfaceshttp-api.ts:handleWorkflowInterfaces,protocol/api-schemas/workflows.tsGET /api/sdk/v1/workflowshttp-api.ts:handleSdkWorkflowSummariesPOST /api/sdk/v1/preflightsdk/sdk-preflight-*.ts,protocol/api-schemas/sdk-lifecycle-v1.tsPOST /api/sdk/v1/assets/temporarysdk/sdk-temporary-asset-upload-http-handler.tsGET /api/applications/{id}/export-bundleroutes/applications.ts:242,app-runtime/src/bundle.tsPOST /api/js-scripts/{id}/runroutes/js-scripts.ts,protocol/api-schemas/js-scripts.tsPlus three env vars in
docs/configuration.md, because they gate the routesabove and explain the
503s:NODETOOL_DISABLE_SDK_LIFECYCLE_V1,NODETOOL_DISABLE_SDK_WORKFLOW_INTERFACE_V1,NODETOOL_REQUIRE_SDK_AUTH_V1(
sdk/sdk-feature-flags.ts,sdk/sdk-route-policy.ts,server.ts:889-901).Corrections the server forced
Four things I would have documented wrongly from reading the code alone:
profilesdoes not track the disable flags. It is a hard-coded literalin
server.tsthat always reportsavailable. A server withNODETOOL_DISABLE_SDK_WORKFLOW_INTERFACE_V1=1still advertisesdiscovery: "available"and then answers503. The doc now says to handlethe
503rather than gate onprofiles.lifecycle flag gates everything under
/api/sdk/v1/*. Running each flagalone showed
node-typesandworkflowsare gated by the interface flag,and
node-typesreports its own code (SDK_NODE_TYPE_INVENTORY_DISABLED).python_bridgenever reportsunavailable. The schema allows it, butthe server only ever emits
ready/starting— a box with no Python sits atstartingforever.max_upload_bytesinlimitsis enforced. Nothing readsmax_rpc_batchorrequest_timeout_seconds; the zeros are "no boundstated", not a limit of zero.
Also verified rather than assumed:
?version=1is required on the interfaceroute (a
400, not a default); one bad id in aworkflow-interfacesbatchlands in
errorswithout failing the rest; a staleworkflow_etagis a200with
runnable: false, not an error;export-bundle?released=1is a404onan unpublished app where
released-documentis a200withnull; and a JSscript that throws is a
200withok: false.Skipped, with reasons
The four
docs-facts/lists over-report heavily. What I dropped:released-document,extract-audio,assets/packages/*,dsl-export,examples/thumbnails,workflows/public/*are all in the api-referencematrix;
/api/debug/sessions/:id/:actionis documented as its concrete/verdictand/cancelforms./apps/index.htmlis static asset serving./api/integrations/:provider/*— real, but already documented indocs/telegram-bot-design.md§5 (spelled/api/integrations/telegram/…,which is why the grep missed it) and its env var is in configuration.md.
Adding matrix rows is worth doing; it did not fit under the 8-gap cap.
NODETOOL_API_GLOBALS,NODETOOL_DATA_TYPES,NODETOOL_MCP_BEGIN/END,NODETOOL_PRELUDE,NODETOOL_PROVIDER_ID,NODETOOL_API_SECTION_HEADERand friends areTypeScript constants the grep matched by name.
NODETOOL_TEST_CHROMEandNODETOOL_TEST_BYTE_LIMITare test hooks;NODETOOL_FETCH_ALL_NODE_RUNTIMESis a build script flag;
NODETOOL_SERVER_MODEis written bypackages/deployand read by nothing in this repo.help, which is not a command.packages/app-runtimehas no README — real, but a package README ranksbelow routes per the brief.
Verification
curlshown was executed against a local server; the JSON bodies areits responses, trimmed only where noted.
and with both, confirming which routes turn
503and with which code.nodetool apps export-bundle --help.docs-facts/notcommitted.
🤖 Generated with Claude Code