@qodo/sdk 0.13.4 → 2.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +31 -118
- package/README.md +133 -121
- package/bin/qodo-skills.mjs +13 -0
- package/bundled-skills/code-review/SKILL.md +41 -0
- package/bundled-skills/pr-summary/SKILL.md +59 -0
- package/bundled-skills/test-gen/SKILL.md +47 -0
- package/dist/auth/index.browser.d.ts +38 -0
- package/dist/auth/index.browser.d.ts.map +1 -0
- package/dist/auth/index.browser.js +62 -0
- package/dist/auth/index.browser.js.map +1 -0
- package/dist/auth/index.d.ts +44 -30
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +57 -110
- package/dist/auth/index.js.map +1 -1
- package/dist/client/AgentsClient.d.ts +33 -0
- package/dist/client/AgentsClient.d.ts.map +1 -0
- package/dist/client/AgentsClient.js +40 -0
- package/dist/client/AgentsClient.js.map +1 -0
- package/dist/client/ArtifactsClient.d.ts +43 -0
- package/dist/client/ArtifactsClient.d.ts.map +1 -0
- package/dist/client/ArtifactsClient.js +54 -0
- package/dist/client/ArtifactsClient.js.map +1 -0
- package/dist/client/BulletinClient.d.ts +45 -0
- package/dist/client/BulletinClient.d.ts.map +1 -0
- package/dist/client/BulletinClient.js +51 -0
- package/dist/client/BulletinClient.js.map +1 -0
- package/dist/client/InfoClient.d.ts +58 -0
- package/dist/client/InfoClient.d.ts.map +1 -0
- package/dist/client/InfoClient.js +135 -0
- package/dist/client/InfoClient.js.map +1 -0
- package/dist/client/PipelineClient.d.ts +162 -0
- package/dist/client/PipelineClient.d.ts.map +1 -0
- package/dist/client/PipelineClient.js +340 -0
- package/dist/client/PipelineClient.js.map +1 -0
- package/dist/client/QarRegistryClient.d.ts +396 -0
- package/dist/client/QarRegistryClient.d.ts.map +1 -0
- package/dist/client/QarRegistryClient.js +536 -0
- package/dist/client/QarRegistryClient.js.map +1 -0
- package/dist/client/QodoClient.d.ts +296 -0
- package/dist/client/QodoClient.d.ts.map +1 -0
- package/dist/client/QodoClient.js +803 -0
- package/dist/client/QodoClient.js.map +1 -0
- package/dist/client/SpecsClient.d.ts +121 -0
- package/dist/client/SpecsClient.d.ts.map +1 -0
- package/dist/client/SpecsClient.js +252 -0
- package/dist/client/SpecsClient.js.map +1 -0
- package/dist/client/StateClient.d.ts +35 -0
- package/dist/client/StateClient.d.ts.map +1 -0
- package/dist/client/StateClient.js +36 -0
- package/dist/client/StateClient.js.map +1 -0
- package/dist/client/TaskClient.d.ts +706 -0
- package/dist/client/TaskClient.d.ts.map +1 -0
- package/dist/client/TaskClient.js +2522 -0
- package/dist/client/TaskClient.js.map +1 -0
- package/dist/client/ToolClient.d.ts +278 -0
- package/dist/client/ToolClient.d.ts.map +1 -0
- package/dist/client/ToolClient.js +1139 -0
- package/dist/client/ToolClient.js.map +1 -0
- package/dist/client/a2a/index.d.ts +10 -0
- package/dist/client/a2a/index.d.ts.map +1 -0
- package/dist/client/a2a/index.js +9 -0
- package/dist/client/a2a/index.js.map +1 -0
- package/dist/client/a2a/registerA2A.d.ts +170 -0
- package/dist/client/a2a/registerA2A.d.ts.map +1 -0
- package/dist/client/a2a/registerA2A.js +85 -0
- package/dist/client/a2a/registerA2A.js.map +1 -0
- package/dist/client/connection.d.ts +893 -0
- package/dist/client/connection.d.ts.map +1 -0
- package/dist/client/connection.js +2189 -0
- package/dist/client/connection.js.map +1 -0
- package/dist/client/errors.d.ts +735 -0
- package/dist/client/errors.d.ts.map +1 -0
- package/dist/client/errors.js +921 -0
- package/dist/client/errors.js.map +1 -0
- package/dist/client/index.d.ts +26 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +20 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/inlineGraph.d.ts +66 -0
- package/dist/client/inlineGraph.d.ts.map +1 -0
- package/dist/client/inlineGraph.js +500 -0
- package/dist/client/inlineGraph.js.map +1 -0
- package/dist/client/internal/thenable.d.ts +27 -0
- package/dist/client/internal/thenable.d.ts.map +1 -0
- package/dist/client/internal/thenable.js +31 -0
- package/dist/client/internal/thenable.js.map +1 -0
- package/dist/client/iterator.d.ts +32 -0
- package/dist/client/iterator.d.ts.map +1 -0
- package/dist/client/iterator.js +73 -0
- package/dist/client/iterator.js.map +1 -0
- package/dist/client/mcp/McpClientPool.browser.d.ts +76 -0
- package/dist/client/mcp/McpClientPool.browser.d.ts.map +1 -0
- package/dist/client/mcp/McpClientPool.browser.js +78 -0
- package/dist/client/mcp/McpClientPool.browser.js.map +1 -0
- package/dist/client/mcp/McpClientPool.d.ts +236 -0
- package/dist/client/mcp/McpClientPool.d.ts.map +1 -0
- package/dist/client/mcp/McpClientPool.js +585 -0
- package/dist/client/mcp/McpClientPool.js.map +1 -0
- package/dist/client/mcp/projection.d.ts +109 -0
- package/dist/client/mcp/projection.d.ts.map +1 -0
- package/dist/client/mcp/projection.js +446 -0
- package/dist/client/mcp/projection.js.map +1 -0
- package/dist/client/mcp/substituteEnv.browser.d.ts +18 -0
- package/dist/client/mcp/substituteEnv.browser.d.ts.map +1 -0
- package/dist/client/mcp/substituteEnv.browser.js +20 -0
- package/dist/client/mcp/substituteEnv.browser.js.map +1 -0
- package/dist/client/mcp/substituteEnv.d.ts +45 -0
- package/dist/client/mcp/substituteEnv.d.ts.map +1 -0
- package/dist/client/mcp/substituteEnv.js +63 -0
- package/dist/client/mcp/substituteEnv.js.map +1 -0
- package/dist/client/observers.d.ts +57 -0
- package/dist/client/observers.d.ts.map +1 -0
- package/dist/client/observers.js +203 -0
- package/dist/client/observers.js.map +1 -0
- package/dist/client/options.d.ts +269 -0
- package/dist/client/options.d.ts.map +1 -0
- package/dist/client/options.js +9 -0
- package/dist/client/options.js.map +1 -0
- package/dist/client/tools/_readlineApprovalPrompt.browser.d.ts +17 -0
- package/dist/client/tools/_readlineApprovalPrompt.browser.d.ts.map +1 -0
- package/dist/client/tools/_readlineApprovalPrompt.browser.js +24 -0
- package/dist/client/tools/_readlineApprovalPrompt.browser.js.map +1 -0
- package/dist/client/tools/_readlineApprovalPrompt.d.ts +33 -0
- package/dist/client/tools/_readlineApprovalPrompt.d.ts.map +1 -0
- package/dist/client/tools/_readlineApprovalPrompt.js +90 -0
- package/dist/client/tools/_readlineApprovalPrompt.js.map +1 -0
- package/dist/client/tools/approval.d.ts +280 -0
- package/dist/client/tools/approval.d.ts.map +1 -0
- package/dist/client/tools/approval.js +229 -0
- package/dist/client/tools/approval.js.map +1 -0
- package/dist/client/tools/bindFunctionToolDefs.d.ts +156 -0
- package/dist/client/tools/bindFunctionToolDefs.d.ts.map +1 -0
- package/dist/client/tools/bindFunctionToolDefs.js +360 -0
- package/dist/client/tools/bindFunctionToolDefs.js.map +1 -0
- package/dist/client/tools/defineFunctionTool.d.ts +277 -0
- package/dist/client/tools/defineFunctionTool.d.ts.map +1 -0
- package/dist/client/tools/defineFunctionTool.js +190 -0
- package/dist/client/tools/defineFunctionTool.js.map +1 -0
- package/dist/client/transport.browser.d.ts +20 -0
- package/dist/client/transport.browser.d.ts.map +1 -0
- package/dist/client/transport.browser.js +29 -0
- package/dist/client/transport.browser.js.map +1 -0
- package/dist/client/transport.d.ts +47 -0
- package/dist/client/transport.d.ts.map +1 -0
- package/dist/client/transport.js +102 -0
- package/dist/client/transport.js.map +1 -0
- package/dist/client/transport.shared.d.ts +30 -0
- package/dist/client/transport.shared.d.ts.map +1 -0
- package/dist/client/transport.shared.js +40 -0
- package/dist/client/transport.shared.js.map +1 -0
- package/dist/client/uuid.d.ts +32 -0
- package/dist/client/uuid.d.ts.map +1 -0
- package/dist/client/uuid.js +65 -0
- package/dist/client/uuid.js.map +1 -0
- package/dist/index.d.ts +88 -39
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +166 -43
- package/dist/index.js.map +1 -1
- package/dist/observability/attributes.d.ts +136 -0
- package/dist/observability/attributes.d.ts.map +1 -0
- package/dist/observability/attributes.js +184 -0
- package/dist/observability/attributes.js.map +1 -0
- package/dist/observability/index.d.ts +14 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +11 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/observability/resolveOTel.browser.d.ts +13 -0
- package/dist/observability/resolveOTel.browser.d.ts.map +1 -0
- package/dist/observability/resolveOTel.browser.js +14 -0
- package/dist/observability/resolveOTel.browser.js.map +1 -0
- package/dist/observability/resolveOTel.d.ts +28 -0
- package/dist/observability/resolveOTel.d.ts.map +1 -0
- package/dist/observability/resolveOTel.js +74 -0
- package/dist/observability/resolveOTel.js.map +1 -0
- package/dist/observability/spans.d.ts +198 -0
- package/dist/observability/spans.d.ts.map +1 -0
- package/dist/observability/spans.js +300 -0
- package/dist/observability/spans.js.map +1 -0
- package/dist/observability/traceContext.d.ts +51 -0
- package/dist/observability/traceContext.d.ts.map +1 -0
- package/dist/observability/traceContext.js +151 -0
- package/dist/observability/traceContext.js.map +1 -0
- package/dist/observability/transportMetrics.d.ts +58 -0
- package/dist/observability/transportMetrics.d.ts.map +1 -0
- package/dist/observability/transportMetrics.js +55 -0
- package/dist/observability/transportMetrics.js.map +1 -0
- package/dist/qar/agentSpec.d.ts +93 -0
- package/dist/qar/agentSpec.d.ts.map +1 -0
- package/dist/qar/agentSpec.js +184 -0
- package/dist/qar/agentSpec.js.map +1 -0
- package/dist/qar/clientEvents.d.ts +86 -0
- package/dist/qar/clientEvents.d.ts.map +1 -0
- package/dist/qar/clientEvents.js +36 -0
- package/dist/qar/clientEvents.js.map +1 -0
- package/dist/qar/envelopes.d.ts +227 -0
- package/dist/qar/envelopes.d.ts.map +1 -0
- package/dist/qar/envelopes.js +67 -0
- package/dist/qar/envelopes.js.map +1 -0
- package/dist/qar/generated/envelope.d.ts +332 -0
- package/dist/qar/generated/envelope.d.ts.map +1 -0
- package/dist/qar/generated/envelope.js +15 -0
- package/dist/qar/generated/envelope.js.map +1 -0
- package/dist/qar/generated/qar-info.d.ts +76 -0
- package/dist/qar/generated/qar-info.d.ts.map +1 -0
- package/dist/qar/generated/qar-info.js +15 -0
- package/dist/qar/generated/qar-info.js.map +1 -0
- package/dist/qar/generated/qodo-task-start-payload.d.ts +54 -0
- package/dist/qar/generated/qodo-task-start-payload.d.ts.map +1 -0
- package/dist/qar/generated/qodo-task-start-payload.js +15 -0
- package/dist/qar/generated/qodo-task-start-payload.js.map +1 -0
- package/dist/qar/ids.d.ts +19 -0
- package/dist/qar/ids.d.ts.map +1 -0
- package/dist/qar/ids.js +11 -0
- package/dist/qar/ids.js.map +1 -0
- package/dist/qar/index.d.ts +24 -0
- package/dist/qar/index.d.ts.map +1 -0
- package/dist/qar/index.js +16 -0
- package/dist/qar/index.js.map +1 -0
- package/dist/qar/info.d.ts +37 -0
- package/dist/qar/info.d.ts.map +1 -0
- package/dist/qar/info.js +17 -0
- package/dist/qar/info.js.map +1 -0
- package/dist/qar/json.d.ts +14 -0
- package/dist/qar/json.d.ts.map +1 -0
- package/dist/qar/json.js +9 -0
- package/dist/qar/json.js.map +1 -0
- package/dist/qar/payloads.d.ts +480 -0
- package/dist/qar/payloads.d.ts.map +1 -0
- package/dist/qar/payloads.js +37 -0
- package/dist/qar/payloads.js.map +1 -0
- package/dist/qar/specs.d.ts +604 -0
- package/dist/qar/specs.d.ts.map +1 -0
- package/dist/qar/specs.js +29 -0
- package/dist/qar/specs.js.map +1 -0
- package/dist/qar/taskEvents.d.ts +25 -0
- package/dist/qar/taskEvents.d.ts.map +1 -0
- package/dist/qar/taskEvents.js +22 -0
- package/dist/qar/taskEvents.js.map +1 -0
- package/dist/qar/trace.d.ts +12 -0
- package/dist/qar/trace.d.ts.map +1 -0
- package/dist/qar/trace.js +12 -0
- package/dist/qar/trace.js.map +1 -0
- package/dist/skills/activation.d.ts +177 -0
- package/dist/skills/activation.d.ts.map +1 -0
- package/dist/skills/activation.js +428 -0
- package/dist/skills/activation.js.map +1 -0
- package/dist/skills/cli/index.browser.d.ts +18 -0
- package/dist/skills/cli/index.browser.d.ts.map +1 -0
- package/dist/skills/cli/index.browser.js +27 -0
- package/dist/skills/cli/index.browser.js.map +1 -0
- package/dist/skills/cli/index.d.ts +37 -0
- package/dist/skills/cli/index.d.ts.map +1 -0
- package/dist/skills/cli/index.js +494 -0
- package/dist/skills/cli/index.js.map +1 -0
- package/dist/skills/events.d.ts +255 -0
- package/dist/skills/events.d.ts.map +1 -0
- package/dist/skills/events.js +224 -0
- package/dist/skills/events.js.map +1 -0
- package/dist/skills/index.d.ts +45 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +34 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/skills/inject.d.ts +57 -0
- package/dist/skills/inject.d.ts.map +1 -0
- package/dist/skills/inject.js +162 -0
- package/dist/skills/inject.js.map +1 -0
- package/dist/skills/lockfile.browser.d.ts +56 -0
- package/dist/skills/lockfile.browser.d.ts.map +1 -0
- package/dist/skills/lockfile.browser.js +55 -0
- package/dist/skills/lockfile.browser.js.map +1 -0
- package/dist/skills/lockfile.d.ts +137 -0
- package/dist/skills/lockfile.d.ts.map +1 -0
- package/dist/skills/lockfile.js +423 -0
- package/dist/skills/lockfile.js.map +1 -0
- package/dist/skills/manager.browser.d.ts +94 -0
- package/dist/skills/manager.browser.d.ts.map +1 -0
- package/dist/skills/manager.browser.js +159 -0
- package/dist/skills/manager.browser.js.map +1 -0
- package/dist/skills/manager.d.ts +362 -0
- package/dist/skills/manager.d.ts.map +1 -0
- package/dist/skills/manager.js +1386 -0
- package/dist/skills/manager.js.map +1 -0
- package/dist/skills/mcp/index.d.ts +15 -0
- package/dist/skills/mcp/index.d.ts.map +1 -0
- package/dist/skills/mcp/index.js +12 -0
- package/dist/skills/mcp/index.js.map +1 -0
- package/dist/skills/mcp/path.browser.d.ts +27 -0
- package/dist/skills/mcp/path.browser.d.ts.map +1 -0
- package/dist/skills/mcp/path.browser.js +33 -0
- package/dist/skills/mcp/path.browser.js.map +1 -0
- package/dist/skills/mcp/path.d.ts +57 -0
- package/dist/skills/mcp/path.d.ts.map +1 -0
- package/dist/skills/mcp/path.js +150 -0
- package/dist/skills/mcp/path.js.map +1 -0
- package/dist/skills/mcp/server.browser.d.ts +32 -0
- package/dist/skills/mcp/server.browser.d.ts.map +1 -0
- package/dist/skills/mcp/server.browser.js +53 -0
- package/dist/skills/mcp/server.browser.js.map +1 -0
- package/dist/skills/mcp/server.d.ts +144 -0
- package/dist/skills/mcp/server.d.ts.map +1 -0
- package/dist/skills/mcp/server.js +841 -0
- package/dist/skills/mcp/server.js.map +1 -0
- package/dist/skills/mcp/types.d.ts +72 -0
- package/dist/skills/mcp/types.d.ts.map +1 -0
- package/dist/skills/mcp/types.js +20 -0
- package/dist/skills/mcp/types.js.map +1 -0
- package/dist/skills/mcp/wireDefs.d.ts +58 -0
- package/dist/skills/mcp/wireDefs.d.ts.map +1 -0
- package/dist/skills/mcp/wireDefs.js +141 -0
- package/dist/skills/mcp/wireDefs.js.map +1 -0
- package/dist/skills/parser.d.ts +63 -0
- package/dist/skills/parser.d.ts.map +1 -0
- package/dist/skills/parser.js +755 -0
- package/dist/skills/parser.js.map +1 -0
- package/dist/skills/prefilter.d.ts +104 -0
- package/dist/skills/prefilter.d.ts.map +1 -0
- package/dist/skills/prefilter.js +398 -0
- package/dist/skills/prefilter.js.map +1 -0
- package/dist/skills/preprocess.d.ts +169 -0
- package/dist/skills/preprocess.d.ts.map +1 -0
- package/dist/skills/preprocess.js +535 -0
- package/dist/skills/preprocess.js.map +1 -0
- package/dist/skills/render.d.ts +83 -0
- package/dist/skills/render.d.ts.map +1 -0
- package/dist/skills/render.js +397 -0
- package/dist/skills/render.js.map +1 -0
- package/dist/skills/sources/index.browser.d.ts +29 -0
- package/dist/skills/sources/index.browser.d.ts.map +1 -0
- package/dist/skills/sources/index.browser.js +16 -0
- package/dist/skills/sources/index.browser.js.map +1 -0
- package/dist/skills/sources/index.d.ts +59 -0
- package/dist/skills/sources/index.d.ts.map +1 -0
- package/dist/skills/sources/index.js +471 -0
- package/dist/skills/sources/index.js.map +1 -0
- package/dist/skills/sources/walk.browser.d.ts +17 -0
- package/dist/skills/sources/walk.browser.d.ts.map +1 -0
- package/dist/skills/sources/walk.browser.js +19 -0
- package/dist/skills/sources/walk.browser.js.map +1 -0
- package/dist/skills/sources/walk.d.ts +68 -0
- package/dist/skills/sources/walk.d.ts.map +1 -0
- package/dist/skills/sources/walk.js +264 -0
- package/dist/skills/sources/walk.js.map +1 -0
- package/dist/skills/substitute.d.ts +87 -0
- package/dist/skills/substitute.d.ts.map +1 -0
- package/dist/skills/substitute.js +322 -0
- package/dist/skills/substitute.js.map +1 -0
- package/dist/skills/testing/SkillKit.browser.d.ts +62 -0
- package/dist/skills/testing/SkillKit.browser.d.ts.map +1 -0
- package/dist/skills/testing/SkillKit.browser.js +41 -0
- package/dist/skills/testing/SkillKit.browser.js.map +1 -0
- package/dist/skills/testing/SkillKit.d.ts +130 -0
- package/dist/skills/testing/SkillKit.d.ts.map +1 -0
- package/dist/skills/testing/SkillKit.js +316 -0
- package/dist/skills/testing/SkillKit.js.map +1 -0
- package/dist/skills/testing/index.d.ts +9 -0
- package/dist/skills/testing/index.d.ts.map +1 -0
- package/dist/skills/testing/index.js +8 -0
- package/dist/skills/testing/index.js.map +1 -0
- package/dist/skills/trust.d.ts +72 -0
- package/dist/skills/trust.d.ts.map +1 -0
- package/dist/skills/trust.js +183 -0
- package/dist/skills/trust.js.map +1 -0
- package/dist/skills/types.d.ts +627 -0
- package/dist/skills/types.d.ts.map +1 -0
- package/dist/skills/types.js +85 -0
- package/dist/skills/types.js.map +1 -0
- package/dist/skills/validator.d.ts +95 -0
- package/dist/skills/validator.d.ts.map +1 -0
- package/dist/skills/validator.js +486 -0
- package/dist/skills/validator.js.map +1 -0
- package/dist/tracing/PipelineTracer.d.ts +35 -22
- package/dist/tracing/PipelineTracer.d.ts.map +1 -1
- package/dist/tracing/PipelineTracer.js +106 -61
- package/dist/tracing/PipelineTracer.js.map +1 -1
- package/dist/tracing/SdkTracer.d.ts +63 -61
- package/dist/tracing/SdkTracer.d.ts.map +1 -1
- package/dist/tracing/SdkTracer.js +185 -177
- package/dist/tracing/SdkTracer.js.map +1 -1
- package/dist/tracing/index.d.ts +10 -1
- package/dist/tracing/index.d.ts.map +1 -1
- package/dist/tracing/index.js +9 -0
- package/dist/tracing/index.js.map +1 -1
- package/dist/tracing/types.d.ts +89 -16
- package/dist/tracing/types.d.ts.map +1 -1
- package/dist/tracing/types.js +17 -4
- package/dist/tracing/types.js.map +1 -1
- package/dist/types.d.ts +6 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +10 -20
- package/dist/version.js.map +1 -1
- package/package.json +53 -39
- package/.claude/skills/qodo-agent/SKILL.md +0 -974
- package/.claude/skills/qodo-agent/assets/programmatic-agent.ts +0 -407
- package/.claude/skills/qodo-agent/references/builtin-tools.md +0 -342
- package/.claude/skills/qodo-agent/references/common-issues.md +0 -537
- package/bin/rg +0 -0
- package/dist/api/agent.d.ts +0 -105
- package/dist/api/agent.d.ts.map +0 -1
- package/dist/api/agent.js +0 -963
- package/dist/api/agent.js.map +0 -1
- package/dist/api/analytics.d.ts +0 -43
- package/dist/api/analytics.d.ts.map +0 -1
- package/dist/api/analytics.js +0 -163
- package/dist/api/analytics.js.map +0 -1
- package/dist/api/http.d.ts +0 -5
- package/dist/api/http.d.ts.map +0 -1
- package/dist/api/http.js +0 -62
- package/dist/api/http.js.map +0 -1
- package/dist/api/index.d.ts +0 -12
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/index.js +0 -17
- package/dist/api/index.js.map +0 -1
- package/dist/api/taskTracking.d.ts +0 -54
- package/dist/api/taskTracking.d.ts.map +0 -1
- package/dist/api/taskTracking.js +0 -208
- package/dist/api/taskTracking.js.map +0 -1
- package/dist/api/types.d.ts +0 -93
- package/dist/api/types.d.ts.map +0 -1
- package/dist/api/types.js +0 -2
- package/dist/api/types.js.map +0 -1
- package/dist/api/utils.d.ts +0 -8
- package/dist/api/utils.d.ts.map +0 -1
- package/dist/api/utils.js +0 -63
- package/dist/api/utils.js.map +0 -1
- package/dist/api/websocket.d.ts +0 -203
- package/dist/api/websocket.d.ts.map +0 -1
- package/dist/api/websocket.js +0 -1166
- package/dist/api/websocket.js.map +0 -1
- package/dist/bin/install-skill.d.ts +0 -14
- package/dist/bin/install-skill.d.ts.map +0 -1
- package/dist/bin/install-skill.js +0 -125
- package/dist/bin/install-skill.js.map +0 -1
- package/dist/bin/run-helpers.d.ts +0 -34
- package/dist/bin/run-helpers.d.ts.map +0 -1
- package/dist/bin/run-helpers.js +0 -186
- package/dist/bin/run-helpers.js.map +0 -1
- package/dist/bin/run.d.ts +0 -13
- package/dist/bin/run.d.ts.map +0 -1
- package/dist/bin/run.js +0 -57
- package/dist/bin/run.js.map +0 -1
- package/dist/clients/index.d.ts +0 -10
- package/dist/clients/index.d.ts.map +0 -1
- package/dist/clients/index.js +0 -8
- package/dist/clients/index.js.map +0 -1
- package/dist/clients/info/InfoClient.d.ts +0 -37
- package/dist/clients/info/InfoClient.d.ts.map +0 -1
- package/dist/clients/info/InfoClient.js +0 -69
- package/dist/clients/info/InfoClient.js.map +0 -1
- package/dist/clients/info/index.d.ts +0 -4
- package/dist/clients/info/index.d.ts.map +0 -1
- package/dist/clients/info/index.js +0 -2
- package/dist/clients/info/index.js.map +0 -1
- package/dist/clients/info/types.d.ts +0 -21
- package/dist/clients/info/types.d.ts.map +0 -1
- package/dist/clients/info/types.js +0 -2
- package/dist/clients/info/types.js.map +0 -1
- package/dist/clients/sessions/SessionsClient.d.ts +0 -34
- package/dist/clients/sessions/SessionsClient.d.ts.map +0 -1
- package/dist/clients/sessions/SessionsClient.js +0 -71
- package/dist/clients/sessions/SessionsClient.js.map +0 -1
- package/dist/clients/sessions/index.d.ts +0 -4
- package/dist/clients/sessions/index.d.ts.map +0 -1
- package/dist/clients/sessions/index.js +0 -2
- package/dist/clients/sessions/index.js.map +0 -1
- package/dist/clients/sessions/types.d.ts +0 -20
- package/dist/clients/sessions/types.d.ts.map +0 -1
- package/dist/clients/sessions/types.js +0 -2
- package/dist/clients/sessions/types.js.map +0 -1
- package/dist/clients/tools/ToolsClient.d.ts +0 -39
- package/dist/clients/tools/ToolsClient.d.ts.map +0 -1
- package/dist/clients/tools/ToolsClient.js +0 -95
- package/dist/clients/tools/ToolsClient.js.map +0 -1
- package/dist/clients/tools/index.d.ts +0 -4
- package/dist/clients/tools/index.d.ts.map +0 -1
- package/dist/clients/tools/index.js +0 -2
- package/dist/clients/tools/index.js.map +0 -1
- package/dist/clients/tools/types.d.ts +0 -14
- package/dist/clients/tools/types.d.ts.map +0 -1
- package/dist/clients/tools/types.js +0 -2
- package/dist/clients/tools/types.js.map +0 -1
- package/dist/config/ConfigManager.d.ts +0 -43
- package/dist/config/ConfigManager.d.ts.map +0 -1
- package/dist/config/ConfigManager.js +0 -472
- package/dist/config/ConfigManager.js.map +0 -1
- package/dist/config/index.d.ts +0 -6
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -7
- package/dist/config/index.js.map +0 -1
- package/dist/config/urlConfig.d.ts +0 -15
- package/dist/config/urlConfig.d.ts.map +0 -1
- package/dist/config/urlConfig.js +0 -75
- package/dist/config/urlConfig.js.map +0 -1
- package/dist/constants/errors.d.ts +0 -2
- package/dist/constants/errors.d.ts.map +0 -1
- package/dist/constants/errors.js +0 -2
- package/dist/constants/errors.js.map +0 -1
- package/dist/constants/index.d.ts +0 -7
- package/dist/constants/index.d.ts.map +0 -1
- package/dist/constants/index.js +0 -11
- package/dist/constants/index.js.map +0 -1
- package/dist/constants/tools.d.ts +0 -4
- package/dist/constants/tools.d.ts.map +0 -1
- package/dist/constants/tools.js +0 -4
- package/dist/constants/tools.js.map +0 -1
- package/dist/constants/versions.d.ts +0 -2
- package/dist/constants/versions.d.ts.map +0 -1
- package/dist/constants/versions.js +0 -2
- package/dist/constants/versions.js.map +0 -1
- package/dist/context/buildUserContext.d.ts +0 -18
- package/dist/context/buildUserContext.d.ts.map +0 -1
- package/dist/context/buildUserContext.js +0 -34
- package/dist/context/buildUserContext.js.map +0 -1
- package/dist/context/index.d.ts +0 -9
- package/dist/context/index.d.ts.map +0 -1
- package/dist/context/index.js +0 -9
- package/dist/context/index.js.map +0 -1
- package/dist/context/messageManager.d.ts +0 -42
- package/dist/context/messageManager.d.ts.map +0 -1
- package/dist/context/messageManager.js +0 -322
- package/dist/context/messageManager.js.map +0 -1
- package/dist/context/taskFocus.d.ts +0 -2
- package/dist/context/taskFocus.d.ts.map +0 -1
- package/dist/context/taskFocus.js +0 -26
- package/dist/context/taskFocus.js.map +0 -1
- package/dist/context/userInput.d.ts +0 -3
- package/dist/context/userInput.d.ts.map +0 -1
- package/dist/context/userInput.js +0 -20
- package/dist/context/userInput.js.map +0 -1
- package/dist/mcp/MCPManager.d.ts +0 -109
- package/dist/mcp/MCPManager.d.ts.map +0 -1
- package/dist/mcp/MCPManager.js +0 -592
- package/dist/mcp/MCPManager.js.map +0 -1
- package/dist/mcp/approvedTools.d.ts +0 -4
- package/dist/mcp/approvedTools.d.ts.map +0 -1
- package/dist/mcp/approvedTools.js +0 -19
- package/dist/mcp/approvedTools.js.map +0 -1
- package/dist/mcp/baseServer.d.ts +0 -75
- package/dist/mcp/baseServer.d.ts.map +0 -1
- package/dist/mcp/baseServer.js +0 -107
- package/dist/mcp/baseServer.js.map +0 -1
- package/dist/mcp/builtinServers.d.ts +0 -15
- package/dist/mcp/builtinServers.d.ts.map +0 -1
- package/dist/mcp/builtinServers.js +0 -141
- package/dist/mcp/builtinServers.js.map +0 -1
- package/dist/mcp/dynamicBEServer.d.ts +0 -20
- package/dist/mcp/dynamicBEServer.d.ts.map +0 -1
- package/dist/mcp/dynamicBEServer.js +0 -52
- package/dist/mcp/dynamicBEServer.js.map +0 -1
- package/dist/mcp/index.d.ts +0 -18
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/index.js +0 -23
- package/dist/mcp/index.js.map +0 -1
- package/dist/mcp/mcpInitialization.d.ts +0 -2
- package/dist/mcp/mcpInitialization.d.ts.map +0 -1
- package/dist/mcp/mcpInitialization.js +0 -56
- package/dist/mcp/mcpInitialization.js.map +0 -1
- package/dist/mcp/servers/filesystem.d.ts +0 -44
- package/dist/mcp/servers/filesystem.d.ts.map +0 -1
- package/dist/mcp/servers/filesystem.js +0 -776
- package/dist/mcp/servers/filesystem.js.map +0 -1
- package/dist/mcp/servers/git.d.ts +0 -18
- package/dist/mcp/servers/git.d.ts.map +0 -1
- package/dist/mcp/servers/git.js +0 -441
- package/dist/mcp/servers/git.js.map +0 -1
- package/dist/mcp/servers/ripgrep.d.ts +0 -39
- package/dist/mcp/servers/ripgrep.d.ts.map +0 -1
- package/dist/mcp/servers/ripgrep.js +0 -550
- package/dist/mcp/servers/ripgrep.js.map +0 -1
- package/dist/mcp/servers/shell.d.ts +0 -20
- package/dist/mcp/servers/shell.d.ts.map +0 -1
- package/dist/mcp/servers/shell.js +0 -519
- package/dist/mcp/servers/shell.js.map +0 -1
- package/dist/mcp/serversRegistry.d.ts +0 -55
- package/dist/mcp/serversRegistry.d.ts.map +0 -1
- package/dist/mcp/serversRegistry.js +0 -416
- package/dist/mcp/serversRegistry.js.map +0 -1
- package/dist/mcp/toolProcessor.d.ts +0 -82
- package/dist/mcp/toolProcessor.d.ts.map +0 -1
- package/dist/mcp/toolProcessor.js +0 -392
- package/dist/mcp/toolProcessor.js.map +0 -1
- package/dist/mcp/types.d.ts +0 -29
- package/dist/mcp/types.d.ts.map +0 -1
- package/dist/mcp/types.js +0 -2
- package/dist/mcp/types.js.map +0 -1
- package/dist/messages/index.d.ts +0 -8
- package/dist/messages/index.d.ts.map +0 -1
- package/dist/messages/index.js +0 -7
- package/dist/messages/index.js.map +0 -1
- package/dist/messages/openai.d.ts +0 -26
- package/dist/messages/openai.d.ts.map +0 -1
- package/dist/messages/openai.js +0 -55
- package/dist/messages/openai.js.map +0 -1
- package/dist/messages/types.d.ts +0 -73
- package/dist/messages/types.d.ts.map +0 -1
- package/dist/messages/types.js +0 -78
- package/dist/messages/types.js.map +0 -1
- package/dist/parser/index.d.ts +0 -72
- package/dist/parser/index.d.ts.map +0 -1
- package/dist/parser/index.js +0 -967
- package/dist/parser/index.js.map +0 -1
- package/dist/parser/types.d.ts +0 -153
- package/dist/parser/types.d.ts.map +0 -1
- package/dist/parser/types.js +0 -6
- package/dist/parser/types.js.map +0 -1
- package/dist/parser/utils.d.ts +0 -18
- package/dist/parser/utils.d.ts.map +0 -1
- package/dist/parser/utils.js +0 -64
- package/dist/parser/utils.js.map +0 -1
- package/dist/sdk/QodoSDK.d.ts +0 -218
- package/dist/sdk/QodoSDK.d.ts.map +0 -1
- package/dist/sdk/QodoSDK.js +0 -1115
- package/dist/sdk/QodoSDK.js.map +0 -1
- package/dist/sdk/artifacts.d.ts +0 -156
- package/dist/sdk/artifacts.d.ts.map +0 -1
- package/dist/sdk/artifacts.js +0 -166
- package/dist/sdk/artifacts.js.map +0 -1
- package/dist/sdk/bootstrap.d.ts +0 -16
- package/dist/sdk/bootstrap.d.ts.map +0 -1
- package/dist/sdk/bootstrap.js +0 -28
- package/dist/sdk/bootstrap.js.map +0 -1
- package/dist/sdk/builders.d.ts +0 -54
- package/dist/sdk/builders.d.ts.map +0 -1
- package/dist/sdk/builders.js +0 -117
- package/dist/sdk/builders.js.map +0 -1
- package/dist/sdk/defaults.d.ts +0 -11
- package/dist/sdk/defaults.d.ts.map +0 -1
- package/dist/sdk/defaults.js +0 -39
- package/dist/sdk/defaults.js.map +0 -1
- package/dist/sdk/discovery.d.ts +0 -2
- package/dist/sdk/discovery.d.ts.map +0 -1
- package/dist/sdk/discovery.js +0 -25
- package/dist/sdk/discovery.js.map +0 -1
- package/dist/sdk/events.d.ts +0 -269
- package/dist/sdk/events.d.ts.map +0 -1
- package/dist/sdk/events.js +0 -69
- package/dist/sdk/events.js.map +0 -1
- package/dist/sdk/exit-expression.d.ts +0 -13
- package/dist/sdk/exit-expression.d.ts.map +0 -1
- package/dist/sdk/exit-expression.js +0 -35
- package/dist/sdk/exit-expression.js.map +0 -1
- package/dist/sdk/index.d.ts +0 -17
- package/dist/sdk/index.d.ts.map +0 -1
- package/dist/sdk/index.js +0 -17
- package/dist/sdk/index.js.map +0 -1
- package/dist/sdk/middleware.d.ts +0 -59
- package/dist/sdk/middleware.d.ts.map +0 -1
- package/dist/sdk/middleware.js +0 -69
- package/dist/sdk/middleware.js.map +0 -1
- package/dist/sdk/pipeline/PipelineBuilder.d.ts +0 -79
- package/dist/sdk/pipeline/PipelineBuilder.d.ts.map +0 -1
- package/dist/sdk/pipeline/PipelineBuilder.js +0 -129
- package/dist/sdk/pipeline/PipelineBuilder.js.map +0 -1
- package/dist/sdk/pipeline/PipelineRunner.d.ts +0 -28
- package/dist/sdk/pipeline/PipelineRunner.d.ts.map +0 -1
- package/dist/sdk/pipeline/PipelineRunner.js +0 -326
- package/dist/sdk/pipeline/PipelineRunner.js.map +0 -1
- package/dist/sdk/pipeline/compiler.d.ts +0 -24
- package/dist/sdk/pipeline/compiler.d.ts.map +0 -1
- package/dist/sdk/pipeline/compiler.js +0 -199
- package/dist/sdk/pipeline/compiler.js.map +0 -1
- package/dist/sdk/pipeline/declarative.d.ts +0 -34
- package/dist/sdk/pipeline/declarative.d.ts.map +0 -1
- package/dist/sdk/pipeline/declarative.js +0 -9
- package/dist/sdk/pipeline/declarative.js.map +0 -1
- package/dist/sdk/pipeline/index.d.ts +0 -20
- package/dist/sdk/pipeline/index.d.ts.map +0 -1
- package/dist/sdk/pipeline/index.js +0 -19
- package/dist/sdk/pipeline/index.js.map +0 -1
- package/dist/sdk/pipeline/types.d.ts +0 -93
- package/dist/sdk/pipeline/types.d.ts.map +0 -1
- package/dist/sdk/pipeline/types.js +0 -10
- package/dist/sdk/pipeline/types.js.map +0 -1
- package/dist/sdk/policies.d.ts +0 -163
- package/dist/sdk/policies.d.ts.map +0 -1
- package/dist/sdk/policies.js +0 -243
- package/dist/sdk/policies.js.map +0 -1
- package/dist/sdk/runner/AgentRunner.d.ts +0 -22
- package/dist/sdk/runner/AgentRunner.d.ts.map +0 -1
- package/dist/sdk/runner/AgentRunner.js +0 -222
- package/dist/sdk/runner/AgentRunner.js.map +0 -1
- package/dist/sdk/runner/finalize.d.ts +0 -56
- package/dist/sdk/runner/finalize.d.ts.map +0 -1
- package/dist/sdk/runner/finalize.js +0 -155
- package/dist/sdk/runner/finalize.js.map +0 -1
- package/dist/sdk/runner/formats.d.ts +0 -7
- package/dist/sdk/runner/formats.d.ts.map +0 -1
- package/dist/sdk/runner/formats.js +0 -76
- package/dist/sdk/runner/formats.js.map +0 -1
- package/dist/sdk/runner/index.d.ts +0 -9
- package/dist/sdk/runner/index.d.ts.map +0 -1
- package/dist/sdk/runner/index.js +0 -9
- package/dist/sdk/runner/index.js.map +0 -1
- package/dist/sdk/runner/progress.d.ts +0 -3
- package/dist/sdk/runner/progress.d.ts.map +0 -1
- package/dist/sdk/runner/progress.js +0 -16
- package/dist/sdk/runner/progress.js.map +0 -1
- package/dist/sdk/schemas.d.ts +0 -72
- package/dist/sdk/schemas.d.ts.map +0 -1
- package/dist/sdk/schemas.js +0 -282
- package/dist/sdk/schemas.js.map +0 -1
- package/dist/sdk/trigger-context.d.ts +0 -24
- package/dist/sdk/trigger-context.d.ts.map +0 -1
- package/dist/sdk/trigger-context.js +0 -136
- package/dist/sdk/trigger-context.js.map +0 -1
- package/dist/session/SessionContext.d.ts +0 -89
- package/dist/session/SessionContext.d.ts.map +0 -1
- package/dist/session/SessionContext.js +0 -410
- package/dist/session/SessionContext.js.map +0 -1
- package/dist/session/environment.d.ts +0 -52
- package/dist/session/environment.d.ts.map +0 -1
- package/dist/session/environment.js +0 -27
- package/dist/session/environment.js.map +0 -1
- package/dist/session/history.d.ts +0 -18
- package/dist/session/history.d.ts.map +0 -1
- package/dist/session/history.js +0 -68
- package/dist/session/history.js.map +0 -1
- package/dist/session/index.d.ts +0 -10
- package/dist/session/index.d.ts.map +0 -1
- package/dist/session/index.js +0 -9
- package/dist/session/index.js.map +0 -1
- package/dist/session/serverData.d.ts +0 -38
- package/dist/session/serverData.d.ts.map +0 -1
- package/dist/session/serverData.js +0 -261
- package/dist/session/serverData.js.map +0 -1
- package/dist/tracing/pipelineHelpers.d.ts +0 -29
- package/dist/tracing/pipelineHelpers.d.ts.map +0 -1
- package/dist/tracing/pipelineHelpers.js +0 -224
- package/dist/tracing/pipelineHelpers.js.map +0 -1
- package/dist/tracking/Tracker.d.ts +0 -55
- package/dist/tracking/Tracker.d.ts.map +0 -1
- package/dist/tracking/Tracker.js +0 -217
- package/dist/tracking/Tracker.js.map +0 -1
- package/dist/tracking/index.d.ts +0 -8
- package/dist/tracking/index.d.ts.map +0 -1
- package/dist/tracking/index.js +0 -8
- package/dist/tracking/index.js.map +0 -1
- package/dist/tracking/schemas.d.ts +0 -292
- package/dist/tracking/schemas.d.ts.map +0 -1
- package/dist/tracking/schemas.js +0 -91
- package/dist/tracking/schemas.js.map +0 -1
- package/dist/utils/extractSetFlags.d.ts +0 -6
- package/dist/utils/extractSetFlags.d.ts.map +0 -1
- package/dist/utils/extractSetFlags.js +0 -16
- package/dist/utils/extractSetFlags.js.map +0 -1
- package/dist/utils/formatTimeAgo.d.ts +0 -2
- package/dist/utils/formatTimeAgo.d.ts.map +0 -1
- package/dist/utils/formatTimeAgo.js +0 -20
- package/dist/utils/formatTimeAgo.js.map +0 -1
- package/dist/utils/index.d.ts +0 -12
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -12
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/machineId.d.ts +0 -14
- package/dist/utils/machineId.d.ts.map +0 -1
- package/dist/utils/machineId.js +0 -66
- package/dist/utils/machineId.js.map +0 -1
- package/dist/utils/pathUtils.d.ts +0 -22
- package/dist/utils/pathUtils.d.ts.map +0 -1
- package/dist/utils/pathUtils.js +0 -54
- package/dist/utils/pathUtils.js.map +0 -1
- package/scripts/download-ripgrep.js +0 -269
|
@@ -0,0 +1,735 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error classes thrown by the SDK 2.0 client surface.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Thrown by API surfaces whose bodies haven't landed yet. Loud-but-typed —
|
|
6
|
+
* the `ticket` field tells callers which work item fills this method's
|
|
7
|
+
* body so they can wait for the right milestone.
|
|
8
|
+
*/
|
|
9
|
+
export declare class QodoNotImplementedError extends Error {
|
|
10
|
+
/** Always `'QodoNotImplementedError'`. */
|
|
11
|
+
readonly name = "QodoNotImplementedError";
|
|
12
|
+
/** Human-readable name of the API surface that's not yet implemented. */
|
|
13
|
+
readonly api: string;
|
|
14
|
+
/** Ticket ID that fills this stub. */
|
|
15
|
+
readonly ticket: string;
|
|
16
|
+
constructor(api: string, ticket: string);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Thrown when consumer code drives the client into an invalid state at
|
|
20
|
+
* construction time (bad URL, missing required option). Distinct from
|
|
21
|
+
* `QodoNotImplementedError` because this is a real validation failure.
|
|
22
|
+
*/
|
|
23
|
+
export declare class QodoClientOptionsError extends Error {
|
|
24
|
+
readonly name = "QodoClientOptionsError";
|
|
25
|
+
constructor(message: string);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Thrown by `tasks.cancel` when the consumer-supplied `AbortSignal`
|
|
29
|
+
* short-circuits the cancel. Distinct from the generic "connection closed
|
|
30
|
+
* before task.done arrived" failure shape so consumers can branch on
|
|
31
|
+
* intentional abort vs. server-side cancel failure.
|
|
32
|
+
*
|
|
33
|
+
* `kind` distinguishes two scenarios with materially different wire
|
|
34
|
+
* effects:
|
|
35
|
+
*
|
|
36
|
+
* - `'pre_aborted'`: signal was already aborted at the call site.
|
|
37
|
+
* NO wire `task.cancel` was emitted (and nothing else). The
|
|
38
|
+
* consumer can safely treat the task as untouched by this call.
|
|
39
|
+
* Because `tasks.cancel` is async, this surfaces as a rejected
|
|
40
|
+
* Promise — `try / catch` around `await tasks.cancel(...)` is
|
|
41
|
+
* the consumer-side pattern, identical to the post-send-abort
|
|
42
|
+
* case below.
|
|
43
|
+
*
|
|
44
|
+
* - `'aborted_after_send'`: the wire `task.cancel` was already on
|
|
45
|
+
* the wire when the signal aborted. The server's terminal
|
|
46
|
+
* `task.done` still arrives on the task's own subscription
|
|
47
|
+
* (initiated by `tasks.start` / `tasks.continue`); only the
|
|
48
|
+
* wait inside `tasks.cancel` was abandoned.
|
|
49
|
+
*
|
|
50
|
+
* Carries `taskId` so consumers can match the throw against their own
|
|
51
|
+
* task-id state without parsing the message.
|
|
52
|
+
*/
|
|
53
|
+
export declare class QodoCancelAbortedError extends Error {
|
|
54
|
+
readonly name = "QodoCancelAbortedError";
|
|
55
|
+
readonly taskId: string;
|
|
56
|
+
readonly kind: 'pre_aborted' | 'aborted_after_send';
|
|
57
|
+
constructor(kind: 'pre_aborted' | 'aborted_after_send', taskId: string, reason?: unknown);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Thrown synchronously by `tasks.cancel` / `tasks.continue` /
|
|
61
|
+
* `tasks.resubscribe` / `tools.respond` when the SDK can't determine the
|
|
62
|
+
* per-Task / per-ToolCall `session_id` locally AND the caller didn't pass
|
|
63
|
+
* the explicit `sessionId` option.
|
|
64
|
+
*
|
|
65
|
+
* Surfaces locally before the wire write so the remediation lands in the
|
|
66
|
+
* error message rather than in a wire round-trip's
|
|
67
|
+
* `session_mismatch` rejection:
|
|
68
|
+
*
|
|
69
|
+
* - For cross-process recovery: hydrate `{ taskId, sessionId }` from
|
|
70
|
+
* durable storage and pass `sessionId` in the cold-address options.
|
|
71
|
+
* - For HITL respond after restart: same shape via
|
|
72
|
+
* `client.tools.respond(node, response, { sessionId })`.
|
|
73
|
+
*
|
|
74
|
+
* `kind` is a stable discriminator (`'task'` for the three task ongoing
|
|
75
|
+
* envelopes; `'tool_call'` for `tools.respond`) so consumer logging /
|
|
76
|
+
* branching can pick the right hydration path without parsing the message.
|
|
77
|
+
*/
|
|
78
|
+
export declare class QodoColdAddressError extends Error {
|
|
79
|
+
readonly name = "QodoColdAddressError";
|
|
80
|
+
readonly kind: 'task' | 'tool_call';
|
|
81
|
+
readonly addressId: string;
|
|
82
|
+
constructor(kind: 'task' | 'tool_call', addressId: string);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Client-side `idempotency_key` validation failure.
|
|
86
|
+
*
|
|
87
|
+
* Thrown synchronously by `tasks.start` / `tasks.startWithAgent` /
|
|
88
|
+
* `tasks.startWithGraph` BEFORE the wire write when the consumer-supplied
|
|
89
|
+
* `idempotencyKey` violates the wire contract (1–512 **Unicode code
|
|
90
|
+
* points** — counted by `[...str].length`, not UTF-16 code units — and no
|
|
91
|
+
* NUL byte). Mirrors QAR's Pydantic `Field(min_length=1, max_length=512,
|
|
92
|
+
* pattern=r"^[^\x00]+$")` on `TaskStartPayload.idempotency_key` so a bad
|
|
93
|
+
* value fails fast on the SDK side without waiting for the wire round-trip.
|
|
94
|
+
*
|
|
95
|
+
* The `reason` field is a stable discriminator (`'too_short'`, `'too_long'`,
|
|
96
|
+
* `'contains_nul'`) so test assertions and downstream consumer error
|
|
97
|
+
* handling can branch without parsing the human message.
|
|
98
|
+
*/
|
|
99
|
+
export declare class QodoIdempotencyKeyValidationError extends Error {
|
|
100
|
+
readonly name = "QodoIdempotencyKeyValidationError";
|
|
101
|
+
readonly reason: 'too_short' | 'too_long' | 'contains_nul';
|
|
102
|
+
readonly codePoints: number;
|
|
103
|
+
constructor(reason: 'too_short' | 'too_long' | 'contains_nul', codePoints: number);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Thrown synchronously by {@link TaskClient.continueOrStart} when the
|
|
107
|
+
* `graphSpec` argument is `undefined`. The helper requires a graphSpec
|
|
108
|
+
* to handle the fresh-dispatch branch; consumers without one on hand
|
|
109
|
+
* should reach for {@link TaskClient.continue} (if they already have a
|
|
110
|
+
* `taskId`) or {@link TaskClient.forceResume} (if they only have the
|
|
111
|
+
* `idempotencyKey` and want stuck-session recovery).
|
|
112
|
+
*
|
|
113
|
+
* Carries the rejected `idempotencyKey` so error-handling code can
|
|
114
|
+
* surface which session-derivation key triggered the throw.
|
|
115
|
+
*/
|
|
116
|
+
export declare class RequiredGraphSpecError extends Error {
|
|
117
|
+
readonly name = "RequiredGraphSpecError";
|
|
118
|
+
readonly idempotencyKey: string;
|
|
119
|
+
constructor(idempotencyKey: string);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Thrown at the transport seam for inputs that would crash the underlying
|
|
123
|
+
* WebSocket library. Today this is just the RFC 6455 close-frame reason
|
|
124
|
+
* cap — a custom caller synthesizing a reason longer than 123 UTF-8
|
|
125
|
+
* bytes gets a typed SDK error rather than an opaque `ws` crash. The
|
|
126
|
+
* class is the home for any future transport-seam validation.
|
|
127
|
+
*/
|
|
128
|
+
export declare class QodoTransportError extends Error {
|
|
129
|
+
readonly name = "QodoTransportError";
|
|
130
|
+
constructor(message: string);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Thrown when an outbound `task.start` / `task.continue` is rejected because
|
|
134
|
+
* the connection is in `flow.pause` state and the paused queue has already
|
|
135
|
+
* reached its cap. The matching wire-level taxonomy is
|
|
136
|
+
* `sdk.error { code: 'flow_backlog_exceeded' }`.
|
|
137
|
+
*
|
|
138
|
+
* Pathological case: under healthy traffic only one or two envelopes ever
|
|
139
|
+
* queue before `flow.resume` arrives. Hitting the cap means the consumer is
|
|
140
|
+
* driving the client far above QAR's per-session in-flight ceiling — backing
|
|
141
|
+
* off and waiting for `flow.resume` is the correct response.
|
|
142
|
+
*/
|
|
143
|
+
export declare class QodoBackpressureError extends Error {
|
|
144
|
+
readonly name = "QodoBackpressureError";
|
|
145
|
+
/** Wire-aligned error code. */
|
|
146
|
+
readonly code = "flow_backlog_exceeded";
|
|
147
|
+
/** How many envelopes were already queued when this call was rejected. */
|
|
148
|
+
readonly queueSize: number;
|
|
149
|
+
/** The configured cap. */
|
|
150
|
+
readonly queueCap: number;
|
|
151
|
+
constructor(queueSize: number, queueCap: number);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Thrown by `client.specs.validate` when the supplied spec is structurally
|
|
155
|
+
* unfit to send — most commonly a missing or unknown `kind` discriminator.
|
|
156
|
+
*
|
|
157
|
+
* This is a *pre-wire* rejection: the spec never reached QAR. Per-rule
|
|
158
|
+
* failures (D10-R*, D11-R*) come back from the endpoint in the
|
|
159
|
+
* `SpecValidateResult.errors` array — those are not exceptions, they're a
|
|
160
|
+
* normal `valid: false` result.
|
|
161
|
+
*/
|
|
162
|
+
export declare class QodoSpecValidationError extends Error {
|
|
163
|
+
readonly name = "QodoSpecValidationError";
|
|
164
|
+
constructor(message: string);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Thrown by `client.qar.registerAgent` / `client.qar.registerMcp` /
|
|
168
|
+
* `client.qar.registerA2A` when a name conflicts with an existing
|
|
169
|
+
* registration (and `replace: true` wasn't passed), or when the supplied
|
|
170
|
+
* name / endpoint is empty.
|
|
171
|
+
*
|
|
172
|
+
* Carries `entity` (`'agent' | 'mcp' | 'a2a'`) and `entryName` so test code
|
|
173
|
+
* and structured loggers can branch on the specific conflict shape without
|
|
174
|
+
* parsing the message text. `name` (the standard Error field) is fixed at
|
|
175
|
+
* `'QodoRegistryConflictError'`.
|
|
176
|
+
*
|
|
177
|
+
* **`entity` is open-ended by design.** New register-helpers (S9 added
|
|
178
|
+
* `'a2a'`; future surfaces will add more) extend this union additively.
|
|
179
|
+
* Consumers writing exhaustive `switch` / `assertNever` patterns on
|
|
180
|
+
* `entity` should treat unknown values as "another registry the SDK
|
|
181
|
+
* grew" — typically by routing through a default arm that surfaces the
|
|
182
|
+
* raw `entryName` + message. The SDK is on the 2.x major; breaking the
|
|
183
|
+
* union literally is allowed within the major per the SDK1→2 migration
|
|
184
|
+
* posture, but each addition lands behind its own feature commit so
|
|
185
|
+
* consumer code can pin if needed.
|
|
186
|
+
*/
|
|
187
|
+
export declare class QodoRegistryConflictError extends Error {
|
|
188
|
+
readonly name = "QodoRegistryConflictError";
|
|
189
|
+
/** Which registry the conflict came from. */
|
|
190
|
+
readonly entity: 'agent' | 'mcp' | 'a2a';
|
|
191
|
+
/** The name the caller tried to register. */
|
|
192
|
+
readonly entryName: string;
|
|
193
|
+
constructor(entity: 'agent' | 'mcp' | 'a2a', entryName: string, message: string);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Wire-validation context attached to a `QodoWireValidationError`. Populated
|
|
197
|
+
* on inbound failures so consumers routing the error into structured
|
|
198
|
+
* logging / metrics can branch on the exact protocol drift without parsing
|
|
199
|
+
* the `[@qodo/sdk]` console.error breadcrumb.
|
|
200
|
+
*/
|
|
201
|
+
export interface WireValidationContext {
|
|
202
|
+
/**
|
|
203
|
+
* `'outbound'` — thrown synchronously from `client.tools.respond(...)`
|
|
204
|
+
* when the caller's input violates the wire shape.
|
|
205
|
+
* `'inbound'` — surfaced (NOT thrown) via
|
|
206
|
+
* `client.tools.onWireValidationError(...)` when the SDK drops a malformed
|
|
207
|
+
* `tool.request` arriving from the runtime.
|
|
208
|
+
*/
|
|
209
|
+
readonly scope: 'outbound' | 'inbound';
|
|
210
|
+
/** `message_id` of the offending envelope (inbound only). */
|
|
211
|
+
readonly messageId?: string;
|
|
212
|
+
/**
|
|
213
|
+
* `node_name` from the offending envelope, if it was present and well-shaped
|
|
214
|
+
* (inbound only). Absent for the "missing node_name" violation itself.
|
|
215
|
+
*/
|
|
216
|
+
readonly nodeName?: string;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Surfaced when the SDK's tool-tunneling layer encounters an envelope
|
|
220
|
+
* that violates the parallel-batched wire shape. Two scopes:
|
|
221
|
+
*
|
|
222
|
+
* - **`outbound`** — thrown synchronously from `client.tools.respond(...)`
|
|
223
|
+
* when the caller's input is malformed (empty `node_name`, empty
|
|
224
|
+
* `responses`). Catches consumer bugs at the call site instead of
|
|
225
|
+
* letting them silently ship a malformed envelope onto the wire.
|
|
226
|
+
*
|
|
227
|
+
* - **`inbound`** — NOT thrown (throwing would fail the whole connection
|
|
228
|
+
* across every subscription). Surfaced via
|
|
229
|
+
* `client.tools.onWireValidationError(handler)` after the
|
|
230
|
+
* `[@qodo/sdk]` console.error breadcrumb fires. The SDK has no
|
|
231
|
+
* `tool_call_id` to respond against for these envelopes, so consumers
|
|
232
|
+
* observe the failure but can't actively recover — QAR's per-task
|
|
233
|
+
* tool-response timeout is the wire-side safety net.
|
|
234
|
+
*
|
|
235
|
+
* Handler-return shape violations (positional length mismatch from a
|
|
236
|
+
* `ToolRequestHandler`, malformed `ToolResponseResult`) are NOT surfaced as
|
|
237
|
+
* `QodoWireValidationError` — they're converted to per-call
|
|
238
|
+
* `status: 'error'` items on the wire so the agent loop unblocks
|
|
239
|
+
* deterministically.
|
|
240
|
+
*
|
|
241
|
+
* Distinct from `TypeError` because the failure is wire-shape specific;
|
|
242
|
+
* consumers wanting a broader catch should `instanceof Error`. The
|
|
243
|
+
* structured `context` field is the preferred branch surface —
|
|
244
|
+
* `instanceof QodoWireValidationError` then switch on `err.context.scope`.
|
|
245
|
+
*/
|
|
246
|
+
export declare class QodoWireValidationError extends Error {
|
|
247
|
+
readonly name: string;
|
|
248
|
+
/** Structured drop metadata. Always populated. */
|
|
249
|
+
readonly context: WireValidationContext;
|
|
250
|
+
constructor(message: string, context?: WireValidationContext);
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Thrown by `tasks.startWithAgent` / `tasks.startWithGraph` when the
|
|
254
|
+
* consumer's `mcpTools` selector references an MCP name that isn't
|
|
255
|
+
* registered on this client.
|
|
256
|
+
*
|
|
257
|
+
* Surface remediation: call `client.qar.registerMcp('<name>', ...)`
|
|
258
|
+
* before the dispatch, or drop the entry from the `mcpTools` selector.
|
|
259
|
+
*/
|
|
260
|
+
export declare class QodoUnknownMcpError extends QodoWireValidationError {
|
|
261
|
+
readonly name = "QodoUnknownMcpError";
|
|
262
|
+
/** Distinct MCP names referenced by `mcpTools` but not present in the registry. */
|
|
263
|
+
readonly mcpNames: readonly string[];
|
|
264
|
+
constructor(mcpNames: readonly string[]);
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Thrown by `tasks.startWithAgent` / `tasks.startWithGraph` when the
|
|
268
|
+
* consumer's `mcpTools` selector — or the sibling `mcpToolOverrides`
|
|
269
|
+
* map — references a `<mcp>.<tool>` dotted name whose MCP IS registered
|
|
270
|
+
* but whose live catalog doesn't expose the named tool.
|
|
271
|
+
*
|
|
272
|
+
* Catches version drift between consumer code and upstream MCP catalogs
|
|
273
|
+
* at task.start, not at LLM-call time. Pair with
|
|
274
|
+
* `client.qar.listMcpTools(name)` during development to see the live
|
|
275
|
+
* surface.
|
|
276
|
+
*/
|
|
277
|
+
export declare class QodoUnknownMcpToolError extends QodoWireValidationError {
|
|
278
|
+
readonly name = "QodoUnknownMcpToolError";
|
|
279
|
+
/** Distinct `<mcp>.<tool>` dotted names that don't resolve to a discovered tool. */
|
|
280
|
+
readonly dottedNames: readonly string[];
|
|
281
|
+
constructor(dottedNames: readonly string[]);
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Thrown by `tasks.startWithAgent` / `tasks.startWithGraph` when a
|
|
285
|
+
* registered MCP whose `unavailability` policy is `'fail'` (the default)
|
|
286
|
+
* has no cached catalog at projection time — its cold-start
|
|
287
|
+
* `Client.connect()` + `tools/list` cycle didn't complete inside the
|
|
288
|
+
* SDK's settle window.
|
|
289
|
+
*
|
|
290
|
+
* Indicates a real config / startup bug for local sidecars (typical
|
|
291
|
+
* fail-mode for `litegit`, `slack`, in-cluster MCPs). For third-party
|
|
292
|
+
* remote MCPs that flake transiently, register with
|
|
293
|
+
* `{ unavailability: 'warn' }` to ship without the MCP's tools instead
|
|
294
|
+
* of failing the task.
|
|
295
|
+
*/
|
|
296
|
+
export declare class QodoMcpUnavailableError extends QodoWireValidationError {
|
|
297
|
+
readonly name = "QodoMcpUnavailableError";
|
|
298
|
+
/** Distinct MCP names whose `unavailability` is `'fail'` and whose catalog hasn't populated. */
|
|
299
|
+
readonly mcpNames: readonly string[];
|
|
300
|
+
constructor(mcpNames: readonly string[]);
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* One pre-wire validation failure on an inline `GraphSpec`. Mirrors QAR's
|
|
304
|
+
* `SpecValidationError` envelope (rule_id + path + message) so consumers can
|
|
305
|
+
* use the same branch logic for both client-side rejection (here) and
|
|
306
|
+
* `client.specs.validate(...)` round-trips.
|
|
307
|
+
*/
|
|
308
|
+
export interface InlineGraphValidationFailure {
|
|
309
|
+
/** Wire rule identifier (e.g. `'D11-R6'`, `'D11-R9'`, `'D11-R11'`, `'D11-R12'`). */
|
|
310
|
+
readonly rule_id: string;
|
|
311
|
+
/** JSON Pointer (RFC 6901) into the offending spec. `""` denotes the root. */
|
|
312
|
+
readonly path: string;
|
|
313
|
+
/** Human-readable explanation. */
|
|
314
|
+
readonly message: string;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Thrown by `client.tasks.startWithGraph(...)` when the inline `GraphSpec`
|
|
318
|
+
* fails one of the SDK's pre-wire structural checks against the
|
|
319
|
+
* GraphSpec safe subset.
|
|
320
|
+
*
|
|
321
|
+
* Pre-wire rejection: the envelope never reaches QAR. Same `rule_id` /
|
|
322
|
+
* `path` / `message` shape as `client.specs.validate(...)` per-rule failures,
|
|
323
|
+
* so consumers can route both surfaces into the same error handler.
|
|
324
|
+
*
|
|
325
|
+
* The SDK enforces the rule subset that doesn't require server-side
|
|
326
|
+
* state (no tenant lookup, no model-registry probe):
|
|
327
|
+
* - `D11-R1..R3` — entry / agents present + named uniquely.
|
|
328
|
+
* - `D11-R6..R8` — edges resolve to declared agents, entry resolves.
|
|
329
|
+
* - `D11-R9` — `evaluate` edges only target evaluator-role nodes.
|
|
330
|
+
* - `D11-R10` — graph depth ≤ configured maximum (default 4).
|
|
331
|
+
* - `D11-R11` — evaluator nodes are leaves (no outbound edges).
|
|
332
|
+
* - `D11-R12` — evaluator `output_schema` is shaped like `VerdictResult`.
|
|
333
|
+
* - `D11-Rcycle` — acyclicity (the SDK rejects cycles unconditionally; QAR
|
|
334
|
+
* surfaces the same rule via `D11-R9` numbering in its own response shape).
|
|
335
|
+
*
|
|
336
|
+
* Rules requiring server-side state (AgentSpec composition, alternate
|
|
337
|
+
* operator-maximum depth) flow through the `client.specs.validate(...)`
|
|
338
|
+
* opt-in pre-flight instead — see `preflight: true` on `TaskOptions`.
|
|
339
|
+
*/
|
|
340
|
+
export declare class QodoInlineGraphValidationError extends Error {
|
|
341
|
+
readonly name = "QodoInlineGraphValidationError";
|
|
342
|
+
/** All failures the validator observed, in stable depth-first order. */
|
|
343
|
+
readonly failures: readonly InlineGraphValidationFailure[];
|
|
344
|
+
constructor(failures: readonly InlineGraphValidationFailure[]);
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Per-violation entry carried on `QodoInlineAgentValidationError` and
|
|
348
|
+
* `QodoAgentSpecRejectedError`. Mirrors the QAR-side `agent_spec_rejected`
|
|
349
|
+
* error envelope shape so consumers handling both paths can branch on the
|
|
350
|
+
* same `(rule_id, path, message)` triple.
|
|
351
|
+
*
|
|
352
|
+
* `rule_id` is one of the `D10-R*` set (server-side wire validator) or a
|
|
353
|
+
* `D10-SHAPE-*` synthetic id (SDK-side pre-wire shape check — distinct
|
|
354
|
+
* prefix so SDK-only ids never collide with QAR's documented ruleset).
|
|
355
|
+
* `path` is an RFC 6901 JSON Pointer into the spec — `""` denotes the
|
|
356
|
+
* root.
|
|
357
|
+
*
|
|
358
|
+
* Shape parallels `InlineGraphValidationFailure` so consumers can write
|
|
359
|
+
* one error handler that branches on `instanceof` and reads the same
|
|
360
|
+
* fields off either error class.
|
|
361
|
+
*/
|
|
362
|
+
export interface InlineAgentSpecIssue {
|
|
363
|
+
readonly rule_id: string;
|
|
364
|
+
readonly path: string;
|
|
365
|
+
readonly message: string;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Thrown synchronously by `client.tasks.startWithAgent({ agent: spec, ... })`
|
|
369
|
+
* when the supplied `InlineAgentSpec` violates the data-only safe subset
|
|
370
|
+
* before the wire write. Carries the structured `issues` array so
|
|
371
|
+
* structured-logging consumers can branch on `rule_id` / `path` without
|
|
372
|
+
* parsing the message text.
|
|
373
|
+
*
|
|
374
|
+
* **Pre-wire only.** The mirror error for server-rejected specs (after
|
|
375
|
+
* the wire write, when QAR's validator runs the full ruleset including
|
|
376
|
+
* registry-dependent rules) is `QodoAgentSpecRejectedError`, surfaced
|
|
377
|
+
* via the task iterator's `kind: 'error'` envelope.
|
|
378
|
+
*
|
|
379
|
+
* Distinct from `QodoSpecValidationError` (which is for
|
|
380
|
+
* `client.specs.validate` — the pre-flight wrapper around
|
|
381
|
+
* `POST /v1/specs/validate`); both exist because the pre-flight wrapper
|
|
382
|
+
* accepts intentionally-invalid shapes (the whole point is to ask the
|
|
383
|
+
* server "tell me which rule I broke"), while `startWithAgent` rejects
|
|
384
|
+
* at intake to avoid kicking off server-side work the spec can't possibly
|
|
385
|
+
* pass.
|
|
386
|
+
*/
|
|
387
|
+
export declare class QodoInlineAgentValidationError extends Error {
|
|
388
|
+
readonly name = "QodoInlineAgentValidationError";
|
|
389
|
+
/** Per-violation breakdown — at least one entry. */
|
|
390
|
+
readonly issues: readonly InlineAgentSpecIssue[];
|
|
391
|
+
constructor(issues: readonly InlineAgentSpecIssue[]);
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Thrown / surfaced when QAR's `_handle_task_start` rejects the supplied
|
|
395
|
+
* inline `agent: InlineAgentSpec` (Pattern B) at wire-validation time via
|
|
396
|
+
* an `error { code: 'agent_spec_rejected' }` envelope. Mirror for the
|
|
397
|
+
* server-static path doesn't exist — there's no inline-spec to reject for
|
|
398
|
+
* Pattern A.
|
|
399
|
+
*
|
|
400
|
+
* Carries the full `issues` array so consumers can show per-rule messages
|
|
401
|
+
* in IDE / Studio surfaces. The first issue's `rule_id` is also exposed
|
|
402
|
+
* at `rule_id` / `path` for the common "just give me the primary failure"
|
|
403
|
+
* branch.
|
|
404
|
+
*
|
|
405
|
+
* Surfaced via the iterator returned by `tasks.startWithAgent`: when the
|
|
406
|
+
* first inbound envelope is an `error { code: 'agent_spec_rejected' }`,
|
|
407
|
+
* the iterator rejects with this error (instead of yielding the envelope)
|
|
408
|
+
* so consumers don't need to defensively type-narrow the error case out
|
|
409
|
+
* of `TaskEvent.kind`.
|
|
410
|
+
*/
|
|
411
|
+
export declare class QodoAgentSpecRejectedError extends Error {
|
|
412
|
+
readonly name = "QodoAgentSpecRejectedError";
|
|
413
|
+
/** Wire-aligned error code. */
|
|
414
|
+
readonly code = "agent_spec_rejected";
|
|
415
|
+
/** Per-violation breakdown — at least one entry. */
|
|
416
|
+
readonly issues: readonly InlineAgentSpecIssue[];
|
|
417
|
+
/** Convenience: first issue's `rule_id` (`'D10-R*'` or `'D10-UNSUPPORTED*'`). */
|
|
418
|
+
readonly rule_id: string;
|
|
419
|
+
/** Convenience: first issue's `path` (RFC 6901 JSON Pointer; `""` = root). */
|
|
420
|
+
readonly path: string;
|
|
421
|
+
constructor(issues: readonly InlineAgentSpecIssue[], message?: string);
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* One per-rule entry on a server `error` envelope's `payload.errors`, when
|
|
425
|
+
* the envelope carries the structured array (D15-R*, agent-spec-rejected
|
|
426
|
+
* shape). Mirrors `InlineAgentSpecIssue` but is the canonical shape across
|
|
427
|
+
* every typed server-error class — agent-spec rejection still ships its
|
|
428
|
+
* own `InlineAgentSpecIssue` alias for back-compat with the existing
|
|
429
|
+
* `QodoAgentSpecRejectedError` consumers.
|
|
430
|
+
*/
|
|
431
|
+
export interface ServerErrorEntry {
|
|
432
|
+
/** D10/D11/D15 rule identifier or QAR-side code (`'cancel_routing_failed'`, …). */
|
|
433
|
+
readonly rule_id: string;
|
|
434
|
+
/** JSON Pointer (RFC 6901) into the offending envelope/spec. `""` denotes the root. */
|
|
435
|
+
readonly path: string;
|
|
436
|
+
/** Human-readable explanation. */
|
|
437
|
+
readonly message: string;
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Base class for every typed server-error class (cancel/resume/HITL/graph
|
|
441
|
+
* codes). Each concrete subclass pins its `code` to the documented QAR
|
|
442
|
+
* wire string so consumers can branch on
|
|
443
|
+
* `instanceof QodoCancelRoutingFailedError` instead of
|
|
444
|
+
* `err.code === 'cancel_routing_failed'`.
|
|
445
|
+
*
|
|
446
|
+
* `QodoAgentSpecRejectedError` predates this base and keeps its own
|
|
447
|
+
* shape; new error codes here use the unified `QodoServerError` surface
|
|
448
|
+
* for forward compatibility.
|
|
449
|
+
*/
|
|
450
|
+
export declare class QodoServerError extends Error {
|
|
451
|
+
/** Wire-level QAR error code. Pinned per subclass. */
|
|
452
|
+
readonly code: string;
|
|
453
|
+
/**
|
|
454
|
+
* Structured per-rule breakdown, if QAR shipped one on the envelope. Empty
|
|
455
|
+
* array when the envelope only carried top-level `code` + `message`.
|
|
456
|
+
*/
|
|
457
|
+
readonly errors: readonly ServerErrorEntry[];
|
|
458
|
+
/** `payload.offending_message_id` — useful for tracing the cause envelope. */
|
|
459
|
+
readonly offendingMessageId?: string;
|
|
460
|
+
/**
|
|
461
|
+
* @param name The concrete subclass name (matches `this.name`).
|
|
462
|
+
* @param code Wire-level error code.
|
|
463
|
+
* @param message Human-readable summary; mirrored to `Error.message`.
|
|
464
|
+
* @param errors Structured breakdown when QAR emitted one. Default `[]`.
|
|
465
|
+
* @param offendingMessageId `error.payload.offending_message_id` if present.
|
|
466
|
+
*/
|
|
467
|
+
constructor(name: string, code: string, message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
|
|
468
|
+
}
|
|
469
|
+
/** Cancel routing lookup failed — see QAR `_handle_task_cancel`. */
|
|
470
|
+
export declare class QodoCancelRoutingFailedError extends QodoServerError {
|
|
471
|
+
readonly name = "QodoCancelRoutingFailedError";
|
|
472
|
+
constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
|
|
473
|
+
}
|
|
474
|
+
/** Cancel all-writes-fail — see QAR `_handle_task_cancel`. */
|
|
475
|
+
export declare class QodoCancelFailedError extends QodoServerError {
|
|
476
|
+
readonly name = "QodoCancelFailedError";
|
|
477
|
+
constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
|
|
478
|
+
}
|
|
479
|
+
/** Session lookup miss — `cancel`/`continue` against an unknown task. */
|
|
480
|
+
export declare class QodoTaskNotFoundError extends QodoServerError {
|
|
481
|
+
readonly name = "QodoTaskNotFoundError";
|
|
482
|
+
constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
|
|
483
|
+
}
|
|
484
|
+
/** Cancel-on-non-waiting-task — see QAR `_handle_task_cancel` precondition. */
|
|
485
|
+
export declare class QodoTaskNotWaitingError extends QodoServerError {
|
|
486
|
+
readonly name = "QodoTaskNotWaitingError";
|
|
487
|
+
constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
|
|
488
|
+
}
|
|
489
|
+
/** Pod failed to reconstruct the agent for a cross-pod task. */
|
|
490
|
+
export declare class QodoAgentReconstructionFailedError extends QodoServerError {
|
|
491
|
+
readonly name = "QodoAgentReconstructionFailedError";
|
|
492
|
+
constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
|
|
493
|
+
}
|
|
494
|
+
/** Cross-pod resume hook aborted before delivering control. */
|
|
495
|
+
export declare class QodoCrossPodResumeAbortedError extends QodoServerError {
|
|
496
|
+
readonly name = "QodoCrossPodResumeAbortedError";
|
|
497
|
+
constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
|
|
498
|
+
}
|
|
499
|
+
/** Deps construction failed during agent dispatch (Pattern A/B/C). */
|
|
500
|
+
export declare class QodoDepsConstructionFailedError extends QodoServerError {
|
|
501
|
+
readonly name = "QodoDepsConstructionFailedError";
|
|
502
|
+
constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
|
|
503
|
+
}
|
|
504
|
+
/** Message history load failed during resume / continue. */
|
|
505
|
+
export declare class QodoMessageHistoryLoadFailedError extends QodoServerError {
|
|
506
|
+
readonly name = "QodoMessageHistoryLoadFailedError";
|
|
507
|
+
constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
|
|
508
|
+
}
|
|
509
|
+
/** HITL persistence failure — substrate accepted but the row didn't durable. */
|
|
510
|
+
export declare class QodoHitlPersistFailedError extends QodoServerError {
|
|
511
|
+
readonly name = "QodoHitlPersistFailedError";
|
|
512
|
+
constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
|
|
513
|
+
}
|
|
514
|
+
/** HITL substrate unavailable — backing store offline / unconfigured. */
|
|
515
|
+
export declare class QodoHitlSubstrateUnavailableError extends QodoServerError {
|
|
516
|
+
readonly name = "QodoHitlSubstrateUnavailableError";
|
|
517
|
+
constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
|
|
518
|
+
}
|
|
519
|
+
/** Caller is not the authorized resolver for the HITL row. */
|
|
520
|
+
export declare class QodoUnauthorizedResolverError extends QodoServerError {
|
|
521
|
+
readonly name = "QodoUnauthorizedResolverError";
|
|
522
|
+
constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
|
|
523
|
+
}
|
|
524
|
+
/** HITL resolution payload failed validation against the prompt's schema. */
|
|
525
|
+
export declare class QodoInvalidResolutionError extends QodoServerError {
|
|
526
|
+
readonly name = "QodoInvalidResolutionError";
|
|
527
|
+
constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Pattern C (inline graph) validator rejection — GraphSpec rule failure
|
|
531
|
+
* surfaced AFTER the wire. Mirror of `QodoAgentSpecRejectedError` for the
|
|
532
|
+
* graph path; the `errors[]` array carries each `D11-R*` / `D13-R*`
|
|
533
|
+
* failure with `rule_id` + `path` + `message`.
|
|
534
|
+
*/
|
|
535
|
+
export declare class QodoGraphSpecRejectedError extends QodoServerError {
|
|
536
|
+
readonly name = "QodoGraphSpecRejectedError";
|
|
537
|
+
constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* Typed error for QAR's `session_mismatch` wire rejection. Surfaces when
|
|
541
|
+
* an outbound ongoing envelope (`task.continue` / `task.cancel` /
|
|
542
|
+
* `task.resubscribe` / `tool.response`) carries a `session_id` that
|
|
543
|
+
* doesn't match the connection's bound session for the referenced task.
|
|
544
|
+
*
|
|
545
|
+
* The SDK no longer mints a zero-UUID sentinel for cold-address paths —
|
|
546
|
+
* the missing-session case is caught locally and raised as
|
|
547
|
+
* {@link QodoColdAddressError} before the wire write. This typed error
|
|
548
|
+
* fires only when the consumer-supplied `sessionId` override on the
|
|
549
|
+
* cold-address API doesn't actually match the server's bound session
|
|
550
|
+
* (stale durable-storage row, deliberate mismatch test).
|
|
551
|
+
*/
|
|
552
|
+
export declare class QodoSessionMismatchError extends QodoServerError {
|
|
553
|
+
readonly name = "QodoSessionMismatchError";
|
|
554
|
+
constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Admission has been pending past the operator timeout
|
|
558
|
+
* (`PENDING_ADMISSION_TIMEOUT`, server default 5 min). Terminal,
|
|
559
|
+
* non-retryable. Scoped to the derived `session_id` so the consumer can
|
|
560
|
+
* `task.resubscribe` if a recovery path exists, but the typical handling
|
|
561
|
+
* is to surface the failure to the operator — the server's sweeper will
|
|
562
|
+
* compensate the orphan row on its next sweep cycle.
|
|
563
|
+
*
|
|
564
|
+
* The wire envelope carries the derived `session_id` — exposed here as
|
|
565
|
+
* `sessionId` so consumers don't need to dig through the envelope to
|
|
566
|
+
* find it. `undefined` only on synthetic / spec-violating envelopes
|
|
567
|
+
* that omit the field.
|
|
568
|
+
*/
|
|
569
|
+
export declare class QodoAdmissionStalledError extends QodoServerError {
|
|
570
|
+
readonly name = "QodoAdmissionStalledError";
|
|
571
|
+
/**
|
|
572
|
+
* Derived `session_id` from the inbound `admission_stalled` envelope.
|
|
573
|
+
* Populated by {@link attachSessionId} (called by
|
|
574
|
+
* `errorFromServerErrorEnvelope` when it has the inherited envelope
|
|
575
|
+
* field in hand) — the constructor matches the unified server-error
|
|
576
|
+
* factory signature so the typed-error dispatcher (`classForServerErrorCode`)
|
|
577
|
+
* can build instances uniformly. `undefined` only on synthetic envelopes
|
|
578
|
+
* that omit the session_id field.
|
|
579
|
+
*/
|
|
580
|
+
sessionId?: string;
|
|
581
|
+
constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
|
|
582
|
+
/** Internal — set by the envelope-to-error helper. Read-once-after-construct. */
|
|
583
|
+
attachSessionId(sessionId: string): void;
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* Client-side terminal when the consumer breaks the `TaskStartIterable`
|
|
587
|
+
* (via `iter.return()`, `break` inside a `for await`, or `iter.throw()`)
|
|
588
|
+
* BEFORE the server's `task.started` admission ack arrives.
|
|
589
|
+
*
|
|
590
|
+
* Surfaces on `await stream.sessionId` / `await stream.admittedTaskId` so
|
|
591
|
+
* the caller's pending awaits don't hang forever after they've abandoned
|
|
592
|
+
* the stream.
|
|
593
|
+
*
|
|
594
|
+
* Distinct from `QodoAdmissionTimeoutError` (SDK-side budget exhaustion)
|
|
595
|
+
* and `QodoAdmissionStalledError` (server-emitted terminal) so consumer
|
|
596
|
+
* code can branch on the reason — voluntary abort vs. genuine admission
|
|
597
|
+
* failure.
|
|
598
|
+
*/
|
|
599
|
+
export declare class QodoStreamAbortedError extends Error {
|
|
600
|
+
readonly name = "QodoStreamAbortedError";
|
|
601
|
+
constructor(message?: string);
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Client-side terminal after the SDK's `admission_in_progress` retry
|
|
605
|
+
* loop exhausts its budget without ever seeing a `task.started` ack.
|
|
606
|
+
*
|
|
607
|
+
* The SDK honours the server's `retry_after_ms` hint when present and
|
|
608
|
+
* falls back to exponential backoff with jitter (initial 100 ms, doubling,
|
|
609
|
+
* capped at `PENDING_ADMISSION_TIMEOUT = 5 min`). Reaching the cap means
|
|
610
|
+
* the deterministic-key admission contended for the full timeout window
|
|
611
|
+
* without resolving.
|
|
612
|
+
*
|
|
613
|
+
* `sessionId` carries the derived session UUID extracted from the final
|
|
614
|
+
* `admission_in_progress` envelope so a consumer that wants to
|
|
615
|
+
* `task.resubscribe` has the address; `undefined` only when no
|
|
616
|
+
* admission_in_progress envelope was ever observed (transport drop
|
|
617
|
+
* mid-retry).
|
|
618
|
+
*/
|
|
619
|
+
export declare class QodoAdmissionTimeoutError extends Error {
|
|
620
|
+
readonly name = "QodoAdmissionTimeoutError";
|
|
621
|
+
/** Total wall-clock milliseconds spent retrying before giving up. */
|
|
622
|
+
readonly elapsedMs: number;
|
|
623
|
+
/** Number of `admission_in_progress` envelopes observed before timing out. */
|
|
624
|
+
readonly attempts: number;
|
|
625
|
+
/** Derived `session_id` from the final envelope, if observed. */
|
|
626
|
+
readonly sessionId?: string;
|
|
627
|
+
constructor(elapsedMs: number, attempts: number, sessionId?: string);
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* Fallback for any unrecognized `error.code` value arriving from QAR.
|
|
631
|
+
*
|
|
632
|
+
* The SDK's typed-error catalog tracks the codes QAR's documented contract
|
|
633
|
+
* surfaces; a new code that hasn't landed in the SDK yet still surfaces
|
|
634
|
+
* as a typed throw (via this class) so consumers' `catch
|
|
635
|
+
* (err: QodoServerError)` blocks see structure rather than a yielded
|
|
636
|
+
* `kind: 'error'` event their type narrows can't account for. Branch on
|
|
637
|
+
* `err.code` (the raw wire string) until the SDK adds a typed subclass.
|
|
638
|
+
*/
|
|
639
|
+
export declare class QodoUnknownServerError extends QodoServerError {
|
|
640
|
+
readonly name = "QodoUnknownServerError";
|
|
641
|
+
constructor(code: string, message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Map a wire `error.code` to its typed `QodoServerError` subclass. Returns
|
|
645
|
+
* `undefined` for the SDK-side `agent_spec_rejected` code — that case is
|
|
646
|
+
* intentionally handled by `QodoAgentSpecRejectedError`'s own
|
|
647
|
+
* `errorFromAgentSpecRejection` parser (it carries an
|
|
648
|
+
* `InlineAgentSpecIssue[]` shape that predates the unified
|
|
649
|
+
* `ServerErrorEntry`). All other documented codes route through here.
|
|
650
|
+
*
|
|
651
|
+
* Callers needing to wrap an arbitrary error envelope: prefer the
|
|
652
|
+
* higher-level `errorFromServerErrorEnvelope` helper in `TaskClient.ts` —
|
|
653
|
+
* it handles the parse-`errors[]` step, the `agent_spec_rejected` carve-
|
|
654
|
+
* out, and the `QodoUnknownServerError` fallback uniformly.
|
|
655
|
+
*/
|
|
656
|
+
export declare function classForServerErrorCode(code: string): (new (message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string) => QodoServerError) | undefined;
|
|
657
|
+
/**
|
|
658
|
+
* Thrown when the SDK's MCP client pool fails to connect to a registered
|
|
659
|
+
* remote / stdio MCP server.
|
|
660
|
+
*
|
|
661
|
+
* Carries the registered MCP `name` so callers can branch / log without
|
|
662
|
+
* parsing the message text. `cause` is the underlying transport / protocol
|
|
663
|
+
* error from `@modelcontextprotocol/sdk` (`McpError`, `StreamableHTTPError`,
|
|
664
|
+
* `SseError`, plain `Error` from `Client.connect`) — preserved on
|
|
665
|
+
* `Error.cause` per the standard idiom.
|
|
666
|
+
*
|
|
667
|
+
* Distinct from `QodoMcpToolError` so consumer code can branch on
|
|
668
|
+
* "connection failed" vs. "tool invocation failed" without inspecting
|
|
669
|
+
* the underlying cause.
|
|
670
|
+
*/
|
|
671
|
+
export declare class QodoMcpClientError extends Error {
|
|
672
|
+
readonly name = "QodoMcpClientError";
|
|
673
|
+
/** Registered MCP name (the `name` argument passed to `qar.registerMcp`). */
|
|
674
|
+
readonly mcpName: string;
|
|
675
|
+
/** Transport discriminator from the failing config. */
|
|
676
|
+
readonly transport: string;
|
|
677
|
+
constructor(mcpName: string, transport: string, message: string, cause?: unknown);
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* Thrown when a tool invocation against a registered remote / stdio MCP
|
|
681
|
+
* fails. Distinct from `QodoMcpClientError` (which is a connection
|
|
682
|
+
* failure) — this one fires AFTER the MCP `Client` is connected and is
|
|
683
|
+
* reporting an error from a `callTool` round-trip.
|
|
684
|
+
*
|
|
685
|
+
* Two failure shapes both route through this class:
|
|
686
|
+
* - **Transport error** — the wire layer (HTTP request, SSE stream, stdio
|
|
687
|
+
* pipe) failed during the call. `cause` is the underlying error.
|
|
688
|
+
* - **Tool-reported error** — the call succeeded at the transport level
|
|
689
|
+
* but the tool result has `isError: true`. The MCP envelope is preserved
|
|
690
|
+
* in `mcpResult` so consumers can inspect the per-tool content array.
|
|
691
|
+
*
|
|
692
|
+
* `mcpName` and `toolName` are populated so structured logging / metrics
|
|
693
|
+
* can branch on the exact dispatch coordinates without parsing the message.
|
|
694
|
+
*/
|
|
695
|
+
export declare class QodoMcpToolError extends Error {
|
|
696
|
+
readonly name = "QodoMcpToolError";
|
|
697
|
+
/** Registered MCP name (the `name` argument passed to `qar.registerMcp`). */
|
|
698
|
+
readonly mcpName: string;
|
|
699
|
+
/** MCP tool name that failed (the `name` field of the `callTool` request). */
|
|
700
|
+
readonly toolName: string;
|
|
701
|
+
/**
|
|
702
|
+
* MCP envelope when the tool returned `isError: true`. Absent for pure
|
|
703
|
+
* transport failures (those carry the underlying error on `cause`).
|
|
704
|
+
*/
|
|
705
|
+
readonly mcpResult?: {
|
|
706
|
+
readonly content: readonly unknown[];
|
|
707
|
+
readonly isError?: boolean;
|
|
708
|
+
};
|
|
709
|
+
constructor(mcpName: string, toolName: string, message: string, opts?: {
|
|
710
|
+
readonly cause?: unknown;
|
|
711
|
+
readonly mcpResult?: {
|
|
712
|
+
readonly content: readonly unknown[];
|
|
713
|
+
readonly isError?: boolean;
|
|
714
|
+
};
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* Typed escape path for a tool handler that wants to reject a `tool.request`.
|
|
719
|
+
*
|
|
720
|
+
* Throwing `new ToolDeniedError("not allowed")` from a handler registered via
|
|
721
|
+
* `client.tools.onRequest` maps to a `tool.response { outcome: "denied" }`
|
|
722
|
+
* envelope on the wire. The reason string is forwarded to QAR (truncated to
|
|
723
|
+
* keep error payloads bounded) so the model and observability traces see why
|
|
724
|
+
* the call was rejected.
|
|
725
|
+
*
|
|
726
|
+
* Plain `throw new Error(...)` from a handler still works — the SDK maps any
|
|
727
|
+
* other thrown value to `outcome: "error"`. Use `ToolDeniedError` only when
|
|
728
|
+
* the rejection is a deliberate policy decision (approval flow rejected the
|
|
729
|
+
* call, capability lookup denied the tool) rather than an unexpected failure.
|
|
730
|
+
*/
|
|
731
|
+
export declare class ToolDeniedError extends Error {
|
|
732
|
+
readonly name = "ToolDeniedError";
|
|
733
|
+
constructor(reason: string);
|
|
734
|
+
}
|
|
735
|
+
//# sourceMappingURL=errors.d.ts.map
|