@gloo/procedure-sdk-node is preinstalled in a Forge Node procedure sandbox. It reads the injected
GLOO_PROCEDURE_SESSION and GLOO_PROXY_URL; authors do not provide vendor credentials.
Root exports
The package root is the public import surface. Do not deep-import implementation files.
Call a capability
The current function takes positionaldomain, operation, and args values:
network, and dispatch must grant the session that domain and the fetch operation. Use an approved URL for the procedure’s task. The platform proxy resolves the network provider and records the call. Its normalized response has status, headers, and body; JSON content is decoded and other content is returned as text. The capability performs one request without retrying it. Vendor secrets must not be embedded in these arguments.
For direct Linear pagination, use the Vendor Connection procedure, not an invented linear capability domain.
Write and read files
getFile modes are text, bytes, and stream. putFile inline sources carry exactly one of
text or bytes; render sources name a renderer and args. Bindings include workflow output, run
scratch, worker scope, and chat attachment where the invocation permits them.
Compose and report progress
runProcedure(args) invokes a registered procedure through the same session. Prefer a workflow
edge when the composition should be visible to operators. emitProgress(event) validates and emits
best-effort progress; it is synchronous and does not return a promise.
Session and errors
readSession() parses the injected signed session and throws ProcedureSessionError when it is
missing or malformed. ProcedureApiError represents proxy and contract failures.
toProcedureErrorEnvelope(error) converts an unknown exception into the bounded error shape a
procedure can return or log safely.
Handle ProcedureApiError.code using the exported PROCEDURE_ERROR_CODES; do not branch on message
text or invent new codes. Some codes are produced by the platform before or after the sandbox and
cannot be raised by author code.
See Author a procedure and Python SDK.
