stitchkit 0.134.1 → 0.135.0
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/CHANGELOG.md +47 -0
- package/README.md +7 -7
- package/dist/agent-executor/acp/v1-connect.d.ts +1 -1
- package/dist/agent-executor/acp/v1-connect.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-session.d.ts +1 -1
- package/dist/agent-executor/acp/v1-session.d.ts.map +1 -1
- package/dist/agent-executor/json-rpc-peer.d.ts +1 -1
- package/dist/agent-executor/json-rpc-peer.d.ts.map +1 -1
- package/dist/agent-runtime/browser/browser-control-contract.d.ts +1364 -0
- package/dist/agent-runtime/browser/browser-control-contract.d.ts.map +1 -0
- package/dist/agent-runtime/browser/browser-controller-view.d.ts +44 -0
- package/dist/agent-runtime/browser/browser-controller-view.d.ts.map +1 -0
- package/dist/agent-runtime/browser/browser-controller.d.ts +53 -0
- package/dist/agent-runtime/browser/browser-controller.d.ts.map +1 -0
- package/dist/agent-runtime/browser/control-interaction-schema.d.ts.map +1 -0
- package/dist/agent-runtime/browser/control-schema.d.ts +1378 -0
- package/dist/agent-runtime/browser/control-schema.d.ts.map +1 -0
- package/dist/agent-runtime/browser/control-view.d.ts +64 -0
- package/dist/agent-runtime/browser/control-view.d.ts.map +1 -0
- package/dist/agent-runtime/browser/react.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-discovery.d.ts +25 -0
- package/dist/agent-runtime/coding/coding-discovery.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-sandbox.d.ts +8 -0
- package/dist/agent-runtime/coding/coding-sandbox.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-search-automaton.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-search-case-fold.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-search-class-ranges.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-search-contract.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-search-limits.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-search-matcher.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-search-output.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-search-regex-syntax.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-search-unit-classes.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-shell-process.d.ts +36 -0
- package/dist/agent-runtime/coding/coding-shell-process.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-tool-contract.d.ts +261 -0
- package/dist/agent-runtime/coding/coding-tool-contract.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-tool-files.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-tool-listing.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-tool-paths.d.ts +53 -0
- package/dist/agent-runtime/coding/coding-tool-paths.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-tool-refusals.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-tool-search-patch.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-tool-search.d.ts +113 -0
- package/dist/agent-runtime/coding/coding-tool-search.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-tool-shell.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-tool-utf8.d.ts.map +1 -0
- package/dist/agent-runtime/coding/coding-tools.d.ts.map +1 -0
- package/dist/agent-runtime/coding/contained-scan-budget.d.ts.map +1 -0
- package/dist/agent-runtime/coding/contained-scan-contract.d.ts.map +1 -0
- package/dist/agent-runtime/coding/contained-scan.d.ts +56 -0
- package/dist/agent-runtime/coding/contained-scan.d.ts.map +1 -0
- package/dist/agent-runtime/coding/workspace-glob.d.ts.map +1 -0
- package/dist/agent-runtime/context-issue.d.ts +1 -1
- package/dist/agent-runtime/context-issue.d.ts.map +1 -1
- package/dist/agent-runtime/deferred-tool-types.d.ts +3 -1
- package/dist/agent-runtime/deferred-tool-types.d.ts.map +1 -1
- package/dist/agent-runtime/harness/harness-contract.d.ts +206 -0
- package/dist/agent-runtime/harness/harness-contract.d.ts.map +1 -0
- package/dist/agent-runtime/harness/harness-control.d.ts +34 -0
- package/dist/agent-runtime/harness/harness-control.d.ts.map +1 -0
- package/dist/agent-runtime/harness/harness-file-resources.d.ts +33 -0
- package/dist/agent-runtime/harness/harness-file-resources.d.ts.map +1 -0
- package/dist/agent-runtime/harness/harness-resources.d.ts.map +1 -0
- package/dist/agent-runtime/harness/harness.d.ts +15 -0
- package/dist/agent-runtime/harness/harness.d.ts.map +1 -0
- package/dist/agent-runtime/history/compaction.d.ts +103 -0
- package/dist/agent-runtime/history/compaction.d.ts.map +1 -0
- package/dist/agent-runtime/history/history.d.ts +93 -0
- package/dist/agent-runtime/history/history.d.ts.map +1 -0
- package/dist/agent-runtime/history/run-history-parts.d.ts +14 -0
- package/dist/agent-runtime/history/run-history-parts.d.ts.map +1 -0
- package/dist/agent-runtime/loop/admission-lanes.d.ts +35 -0
- package/dist/agent-runtime/loop/admission-lanes.d.ts.map +1 -0
- package/dist/agent-runtime/loop/coordinator.d.ts.map +1 -0
- package/dist/agent-runtime/loop/deferred-tool-search.d.ts +9 -0
- package/dist/agent-runtime/loop/deferred-tool-search.d.ts.map +1 -0
- package/dist/agent-runtime/loop/deferred-tool-selection.d.ts +32 -0
- package/dist/agent-runtime/loop/deferred-tool-selection.d.ts.map +1 -0
- package/dist/agent-runtime/loop/deferred-tools-internal.d.ts +19 -0
- package/dist/agent-runtime/loop/deferred-tools-internal.d.ts.map +1 -0
- package/dist/agent-runtime/loop/deferred-tools.d.ts +4 -0
- package/dist/agent-runtime/loop/deferred-tools.d.ts.map +1 -0
- package/dist/agent-runtime/loop/injection.d.ts +28 -0
- package/dist/agent-runtime/loop/injection.d.ts.map +1 -0
- package/dist/agent-runtime/loop/invocation-attempt.d.ts +32 -0
- package/dist/agent-runtime/loop/invocation-attempt.d.ts.map +1 -0
- package/dist/agent-runtime/loop/invocation-failure.d.ts.map +1 -0
- package/dist/agent-runtime/loop/invocation-payload.d.ts +38 -0
- package/dist/agent-runtime/loop/invocation-payload.d.ts.map +1 -0
- package/dist/agent-runtime/loop/invocation-read.d.ts +134 -0
- package/dist/agent-runtime/loop/invocation-read.d.ts.map +1 -0
- package/dist/agent-runtime/loop/invocation-spend.d.ts +9 -0
- package/dist/agent-runtime/loop/invocation-spend.d.ts.map +1 -0
- package/dist/agent-runtime/loop/invocation-stream.d.ts +20 -0
- package/dist/agent-runtime/loop/invocation-stream.d.ts.map +1 -0
- package/dist/agent-runtime/loop/invocations.d.ts +63 -0
- package/dist/agent-runtime/loop/invocations.d.ts.map +1 -0
- package/dist/agent-runtime/loop/managed-tools.d.ts +20 -0
- package/dist/agent-runtime/loop/managed-tools.d.ts.map +1 -0
- package/dist/agent-runtime/loop/observability.d.ts +579 -0
- package/dist/agent-runtime/loop/observability.d.ts.map +1 -0
- package/dist/agent-runtime/loop/owned-provider-stream.d.ts.map +1 -0
- package/dist/agent-runtime/loop/provider-origin.d.ts +17 -0
- package/dist/agent-runtime/loop/provider-origin.d.ts.map +1 -0
- package/dist/agent-runtime/loop/provider-stream-parts.d.ts +5 -0
- package/dist/agent-runtime/loop/provider-stream-parts.d.ts.map +1 -0
- package/dist/agent-runtime/loop/provider-stream-segments.d.ts +63 -0
- package/dist/agent-runtime/loop/provider-stream-segments.d.ts.map +1 -0
- package/dist/agent-runtime/loop/retry-policy.d.ts +49 -0
- package/dist/agent-runtime/loop/retry-policy.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-acquisition.d.ts +24 -0
- package/dist/agent-runtime/loop/run-acquisition.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-approval.d.ts +82 -0
- package/dist/agent-runtime/loop/run-approval.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-complete-retry.d.ts +24 -0
- package/dist/agent-runtime/loop/run-complete-retry.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-complete-stream.d.ts +9 -0
- package/dist/agent-runtime/loop/run-complete-stream.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-complete-types.d.ts +171 -0
- package/dist/agent-runtime/loop/run-complete-types.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-complete.d.ts +25 -0
- package/dist/agent-runtime/loop/run-complete.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-driver-compose.d.ts +21 -0
- package/dist/agent-runtime/loop/run-driver-compose.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-execution-state.d.ts +177 -0
- package/dist/agent-runtime/loop/run-execution-state.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-execution.d.ts +22 -0
- package/dist/agent-runtime/loop/run-execution.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-failure.d.ts +21 -0
- package/dist/agent-runtime/loop/run-failure.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-loop-events.d.ts +126 -0
- package/dist/agent-runtime/loop/run-loop-events.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-model-attempts.d.ts +6 -0
- package/dist/agent-runtime/loop/run-model-attempts.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-model-messages.d.ts +9 -0
- package/dist/agent-runtime/loop/run-model-messages.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-model-step.d.ts +43 -0
- package/dist/agent-runtime/loop/run-model-step.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-model-stream.d.ts +27 -0
- package/dist/agent-runtime/loop/run-model-stream.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-operation-lifecycle.d.ts +32 -0
- package/dist/agent-runtime/loop/run-operation-lifecycle.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-prompt-history.d.ts +53 -0
- package/dist/agent-runtime/loop/run-prompt-history.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-provider-ledger.d.ts +32 -0
- package/dist/agent-runtime/loop/run-provider-ledger.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-step-barriers.d.ts +120 -0
- package/dist/agent-runtime/loop/run-step-barriers.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-step-helpers.d.ts +50 -0
- package/dist/agent-runtime/loop/run-step-helpers.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-step-prepare.d.ts +34 -0
- package/dist/agent-runtime/loop/run-step-prepare.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-step-spend.d.ts +394 -0
- package/dist/agent-runtime/loop/run-step-spend.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-stream-parts.d.ts +34 -0
- package/dist/agent-runtime/loop/run-stream-parts.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-stream-recorded.d.ts +8 -0
- package/dist/agent-runtime/loop/run-stream-recorded.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-stream-step-text.d.ts +47 -0
- package/dist/agent-runtime/loop/run-stream-step-text.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-terminal.d.ts +11 -0
- package/dist/agent-runtime/loop/run-terminal.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-tool-approval-flow.d.ts +36 -0
- package/dist/agent-runtime/loop/run-tool-approval-flow.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-tool-approval-records.d.ts +24 -0
- package/dist/agent-runtime/loop/run-tool-approval-records.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-tool-call.d.ts +119 -0
- package/dist/agent-runtime/loop/run-tool-call.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-tool-errors.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-tool-executor.d.ts +42 -0
- package/dist/agent-runtime/loop/run-tool-executor.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-tool-progress.d.ts +21 -0
- package/dist/agent-runtime/loop/run-tool-progress.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-tool-slots.d.ts +114 -0
- package/dist/agent-runtime/loop/run-tool-slots.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-turn-preparation.d.ts +25 -0
- package/dist/agent-runtime/loop/run-turn-preparation.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-unacquired.d.ts +19 -0
- package/dist/agent-runtime/loop/run-unacquired.d.ts.map +1 -0
- package/dist/agent-runtime/loop/runtime-admission-gate.d.ts.map +1 -0
- package/dist/agent-runtime/loop/runtime-control.d.ts +9 -0
- package/dist/agent-runtime/loop/runtime-control.d.ts.map +1 -0
- package/dist/agent-runtime/loop/runtime-recovery.d.ts +10 -0
- package/dist/agent-runtime/loop/runtime-recovery.d.ts.map +1 -0
- package/dist/agent-runtime/loop/runtime-state.d.ts +36 -0
- package/dist/agent-runtime/loop/runtime-state.d.ts.map +1 -0
- package/dist/agent-runtime/loop/runtime-submit.d.ts +5 -0
- package/dist/agent-runtime/loop/runtime-submit.d.ts.map +1 -0
- package/dist/agent-runtime/loop/runtime.d.ts +352 -0
- package/dist/agent-runtime/loop/runtime.d.ts.map +1 -0
- package/dist/agent-runtime/loop/state-slots.d.ts +48 -0
- package/dist/agent-runtime/loop/state-slots.d.ts.map +1 -0
- package/dist/agent-runtime/loop/state-tools.d.ts +117 -0
- package/dist/agent-runtime/loop/state-tools.d.ts.map +1 -0
- package/dist/agent-runtime/protocol.d.ts +1 -1
- package/dist/agent-runtime/protocol.d.ts.map +1 -1
- package/dist/agent-runtime/providers/ai-sdk-convert.d.ts +15 -0
- package/dist/agent-runtime/providers/ai-sdk-convert.d.ts.map +1 -0
- package/dist/agent-runtime/providers/ai-sdk.d.ts +31 -0
- package/dist/agent-runtime/providers/ai-sdk.d.ts.map +1 -0
- package/dist/agent-runtime/providers/anthropic-media.d.ts +11 -0
- package/dist/agent-runtime/providers/anthropic-media.d.ts.map +1 -0
- package/dist/agent-runtime/providers/anthropic-messages.d.ts +25 -0
- package/dist/agent-runtime/providers/anthropic-messages.d.ts.map +1 -0
- package/dist/agent-runtime/providers/anthropic-options.d.ts +80 -0
- package/dist/agent-runtime/providers/anthropic-options.d.ts.map +1 -0
- package/dist/agent-runtime/providers/anthropic-response.d.ts +19 -0
- package/dist/agent-runtime/providers/anthropic-response.d.ts.map +1 -0
- package/dist/agent-runtime/providers/anthropic-sse.d.ts.map +1 -0
- package/dist/agent-runtime/providers/anthropic.d.ts.map +1 -0
- package/dist/agent-runtime/providers/models-driver-step.d.ts +212 -0
- package/dist/agent-runtime/providers/models-driver-step.d.ts.map +1 -0
- package/dist/agent-runtime/providers/models-driver-telemetry.d.ts.map +1 -0
- package/dist/agent-runtime/providers/models-driver.d.ts +235 -0
- package/dist/agent-runtime/providers/models-driver.d.ts.map +1 -0
- package/dist/agent-runtime/providers/models.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openai-messages.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openai-options.d.ts +91 -0
- package/dist/agent-runtime/providers/openai-options.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openai-response.d.ts +77 -0
- package/dist/agent-runtime/providers/openai-response.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openai-sse-state.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openai-sse.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openai.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter-admission.d.ts +85 -0
- package/dist/agent-runtime/providers/openrouter-admission.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter-benchmarks.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter-catalog-cache.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter-catalog-query.d.ts +82 -0
- package/dist/agent-runtime/providers/openrouter-catalog-query.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter-catalog.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter-models.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter-options.d.ts +136 -0
- package/dist/agent-runtime/providers/openrouter-options.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter-response.d.ts +22 -0
- package/dist/agent-runtime/providers/openrouter-response.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter-route.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter-spend.d.ts +24 -0
- package/dist/agent-runtime/providers/openrouter-spend.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter.d.ts.map +1 -0
- package/dist/agent-runtime/providers/provider-cache.d.ts +30 -0
- package/dist/agent-runtime/providers/provider-cache.d.ts.map +1 -0
- package/dist/agent-runtime/providers/provider-content.d.ts.map +1 -0
- package/dist/agent-runtime/providers/provider-failure.d.ts +97 -0
- package/dist/agent-runtime/providers/provider-failure.d.ts.map +1 -0
- package/dist/agent-runtime/providers/provider-history.d.ts +13 -0
- package/dist/agent-runtime/providers/provider-history.d.ts.map +1 -0
- package/dist/agent-runtime/providers/provider-http.d.ts.map +1 -0
- package/dist/agent-runtime/providers/provider-journal.d.ts.map +1 -0
- package/dist/agent-runtime/providers/provider-json-schema-strip.d.ts.map +1 -0
- package/dist/agent-runtime/providers/provider-json-schema.d.ts +31 -0
- package/dist/agent-runtime/providers/provider-json-schema.d.ts.map +1 -0
- package/dist/agent-runtime/providers/provider-media.d.ts +49 -0
- package/dist/agent-runtime/providers/provider-media.d.ts.map +1 -0
- package/dist/agent-runtime/providers/provider-openai-chat-helpers.d.ts +27 -0
- package/dist/agent-runtime/providers/provider-openai-chat-helpers.d.ts.map +1 -0
- package/dist/agent-runtime/providers/provider-openai-chat-sse.d.ts +25 -0
- package/dist/agent-runtime/providers/provider-openai-chat-sse.d.ts.map +1 -0
- package/dist/agent-runtime/providers/provider-openai-chat.d.ts +27 -0
- package/dist/agent-runtime/providers/provider-openai-chat.d.ts.map +1 -0
- package/dist/agent-runtime/providers/provider-sse.d.ts.map +1 -0
- package/dist/agent-runtime/providers/provider-usage.d.ts +24 -0
- package/dist/agent-runtime/providers/provider-usage.d.ts.map +1 -0
- package/dist/agent-runtime/realtime/harness-realtime.d.ts +53 -0
- package/dist/agent-runtime/realtime/harness-realtime.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox/sandbox-binding.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox/sandbox-broker.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox/sandbox-bubblewrap-args.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox/sandbox-bubblewrap-storage.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox/sandbox-bubblewrap.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox/sandbox-coding-adapter.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox/sandbox-contract.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox/sandbox-process-linux.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox/sandbox-process-macos.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox/sandbox-process-owner.d.ts +19 -0
- package/dist/agent-runtime/sandbox/sandbox-process-owner.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox/sandbox-process-spec.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox/sandbox-process-wrapper.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox/sandbox-process.d.ts +8 -0
- package/dist/agent-runtime/sandbox/sandbox-process.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox/sandbox-session.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox/sandbox.d.ts +125 -0
- package/dist/agent-runtime/sandbox/sandbox.d.ts.map +1 -0
- package/dist/agent-runtime/stores/archive-projection.d.ts.map +1 -0
- package/dist/agent-runtime/stores/archive-spill.d.ts.map +1 -0
- package/dist/agent-runtime/stores/branch-contract.d.ts.map +1 -0
- package/dist/agent-runtime/stores/branch-events.d.ts +25 -0
- package/dist/agent-runtime/stores/branch-events.d.ts.map +1 -0
- package/dist/agent-runtime/stores/branch-identities.d.ts +75 -0
- package/dist/agent-runtime/stores/branch-identities.d.ts.map +1 -0
- package/dist/agent-runtime/stores/branch-messages.d.ts +21 -0
- package/dist/agent-runtime/stores/branch-messages.d.ts.map +1 -0
- package/dist/agent-runtime/stores/branch-observations.d.ts +227 -0
- package/dist/agent-runtime/stores/branch-observations.d.ts.map +1 -0
- package/dist/agent-runtime/stores/branch-provider.d.ts.map +1 -0
- package/dist/agent-runtime/stores/branch-refusal.d.ts.map +1 -0
- package/dist/agent-runtime/stores/branch-replay.d.ts +456 -0
- package/dist/agent-runtime/stores/branch-replay.d.ts.map +1 -0
- package/dist/agent-runtime/stores/branch-runtime-tools.d.ts.map +1 -0
- package/dist/agent-runtime/stores/branch-source.d.ts +33 -0
- package/dist/agent-runtime/stores/branch-source.d.ts.map +1 -0
- package/dist/agent-runtime/stores/branch-transitions.d.ts.map +1 -0
- package/dist/agent-runtime/stores/child-blocking.d.ts.map +1 -0
- package/dist/agent-runtime/stores/child-budget-policy.d.ts +17 -0
- package/dist/agent-runtime/stores/child-budget-policy.d.ts.map +1 -0
- package/dist/agent-runtime/stores/child-tools.d.ts +144 -0
- package/dist/agent-runtime/stores/child-tools.d.ts.map +1 -0
- package/dist/agent-runtime/stores/children-contract.d.ts +236 -0
- package/dist/agent-runtime/stores/children-contract.d.ts.map +1 -0
- package/dist/agent-runtime/stores/children-control.d.ts.map +1 -0
- package/dist/agent-runtime/stores/children-spawn.d.ts.map +1 -0
- package/dist/agent-runtime/stores/children-state.d.ts.map +1 -0
- package/dist/agent-runtime/stores/children-usage.d.ts.map +1 -0
- package/dist/agent-runtime/stores/children.d.ts.map +1 -0
- package/dist/agent-runtime/stores/companion-host.d.ts +38 -0
- package/dist/agent-runtime/stores/companion-host.d.ts.map +1 -0
- package/dist/agent-runtime/stores/conversations.d.ts.map +1 -0
- package/dist/agent-runtime/stores/event-search-postgres.d.ts.map +1 -0
- package/dist/agent-runtime/stores/event-search-terms.d.ts.map +1 -0
- package/dist/agent-runtime/stores/event-search-tools.d.ts +190 -0
- package/dist/agent-runtime/stores/event-search-tools.d.ts.map +1 -0
- package/dist/agent-runtime/stores/event-search.d.ts.map +1 -0
- package/dist/agent-runtime/stores/postgres-schema.d.ts.map +1 -0
- package/dist/agent-runtime/stores/postgres-transactions.d.ts +54 -0
- package/dist/agent-runtime/stores/postgres-transactions.d.ts.map +1 -0
- package/dist/agent-runtime/stores/postgres.d.ts +72 -0
- package/dist/agent-runtime/stores/postgres.d.ts.map +1 -0
- package/dist/agent-runtime/stores/projections.d.ts +109 -0
- package/dist/agent-runtime/stores/projections.d.ts.map +1 -0
- package/dist/agent-runtime/stores/purge.d.ts.map +1 -0
- package/dist/agent-runtime/stores/schedule-contract.d.ts.map +1 -0
- package/dist/agent-runtime/stores/schedule-dispatch.d.ts.map +1 -0
- package/dist/agent-runtime/stores/schedule-records.d.ts.map +1 -0
- package/dist/agent-runtime/stores/schedule-tools.d.ts +76 -0
- package/dist/agent-runtime/stores/schedule-tools.d.ts.map +1 -0
- package/dist/agent-runtime/stores/schedules.d.ts.map +1 -0
- package/dist/agent-runtime/stores/spill.d.ts +26 -0
- package/dist/agent-runtime/stores/spill.d.ts.map +1 -0
- package/dist/agent-runtime/stores/sql-events.d.ts.map +1 -0
- package/dist/agent-runtime/stores/sql-history.d.ts.map +1 -0
- package/dist/agent-runtime/stores/sql-ledger.d.ts.map +1 -0
- package/dist/agent-runtime/stores/sql-purge.d.ts.map +1 -0
- package/dist/agent-runtime/stores/sql-reads.d.ts.map +1 -0
- package/dist/agent-runtime/stores/sql-rows.d.ts +202 -0
- package/dist/agent-runtime/stores/sql-rows.d.ts.map +1 -0
- package/dist/agent-runtime/stores/sql-session.d.ts.map +1 -0
- package/dist/agent-runtime/stores/sqlite-bun.d.ts.map +1 -0
- package/dist/agent-runtime/stores/sqlite-node.d.ts.map +1 -0
- package/dist/agent-runtime/stores/sqlite-purge.d.ts +6 -0
- package/dist/agent-runtime/stores/sqlite-purge.d.ts.map +1 -0
- package/dist/agent-runtime/stores/sqlite-schema.d.ts +7 -0
- package/dist/agent-runtime/stores/sqlite-schema.d.ts.map +1 -0
- package/dist/agent-runtime/stores/sqlite-transactions.d.ts +29 -0
- package/dist/agent-runtime/stores/sqlite-transactions.d.ts.map +1 -0
- package/dist/agent-runtime/stores/sqlite.d.ts +33 -0
- package/dist/agent-runtime/stores/sqlite.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-archive.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-branch.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-capabilities.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-create.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-driver-contract.d.ts +1016 -0
- package/dist/agent-runtime/stores/store-driver-contract.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-event-once.d.ts +37 -0
- package/dist/agent-runtime/stores/store-event-once.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-events.d.ts +2231 -0
- package/dist/agent-runtime/stores/store-events.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-memory-archive.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-memory-events.d.ts +7 -0
- package/dist/agent-runtime/stores/store-memory-events.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-memory.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-migrations/v1-to-v2.d.ts +6 -0
- package/dist/agent-runtime/stores/store-migrations/v1-to-v2.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-migrations/v2-to-v3.d.ts +14 -0
- package/dist/agent-runtime/stores/store-migrations/v2-to-v3.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-migrations/v3-to-v4.d.ts +4 -0
- package/dist/agent-runtime/stores/store-migrations/v3-to-v4.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-mutate.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-purge.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-reads.d.ts +29 -0
- package/dist/agent-runtime/stores/store-reads.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-reduce-history.d.ts +10 -0
- package/dist/agent-runtime/stores/store-reduce-history.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-reduce-run.d.ts +14 -0
- package/dist/agent-runtime/stores/store-reduce-run.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-reduce-shared.d.ts +78 -0
- package/dist/agent-runtime/stores/store-reduce-shared.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-reduce-terminal.d.ts +6 -0
- package/dist/agent-runtime/stores/store-reduce-terminal.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-reducer.d.ts +24 -0
- package/dist/agent-runtime/stores/store-reducer.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-replay.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store-snapshot.d.ts +19 -0
- package/dist/agent-runtime/stores/store-snapshot.d.ts.map +1 -0
- package/dist/agent-runtime/stores/store.d.ts +3032 -0
- package/dist/agent-runtime/stores/store.d.ts.map +1 -0
- package/dist/agent-runtime/terminal-commit.d.ts +11 -11
- package/dist/agent-runtime/terminal-commit.d.ts.map +1 -1
- package/dist/agent-runtime/testing/fault-bench.d.ts.map +1 -0
- package/dist/agent-runtime/testing/run-assertions.d.ts +63 -0
- package/dist/agent-runtime/testing/run-assertions.d.ts.map +1 -0
- package/dist/agent-runtime/testing/store-conformance-branch.d.ts +7 -0
- package/dist/agent-runtime/testing/store-conformance-branch.d.ts.map +1 -0
- package/dist/agent-runtime/testing/store-conformance-capabilities.d.ts +6 -0
- package/dist/agent-runtime/testing/store-conformance-capabilities.d.ts.map +1 -0
- package/dist/agent-runtime/testing/store-conformance-event-once.d.ts +12 -0
- package/dist/agent-runtime/testing/store-conformance-event-once.d.ts.map +1 -0
- package/dist/agent-runtime/testing/store-conformance-lifecycle.d.ts +454 -0
- package/dist/agent-runtime/testing/store-conformance-lifecycle.d.ts.map +1 -0
- package/dist/agent-runtime/testing/store-conformance-ordering.d.ts +18 -0
- package/dist/agent-runtime/testing/store-conformance-ordering.d.ts.map +1 -0
- package/dist/agent-runtime/testing/store-conformance-seed.d.ts +8 -0
- package/dist/agent-runtime/testing/store-conformance-seed.d.ts.map +1 -0
- package/dist/agent-runtime/testing/store-conformance-support.d.ts +140 -0
- package/dist/agent-runtime/testing/store-conformance-support.d.ts.map +1 -0
- package/dist/agent-runtime/testing/store-conformance-terminal.d.ts +12 -0
- package/dist/agent-runtime/testing/store-conformance-terminal.d.ts.map +1 -0
- package/dist/agent-runtime/testing/store-conformance.d.ts +71 -0
- package/dist/agent-runtime/testing/store-conformance.d.ts.map +1 -0
- package/dist/agent-runtime/testing/testing.d.ts +46 -0
- package/dist/agent-runtime/testing/testing.d.ts.map +1 -0
- package/dist/application/grammy.d.ts +1 -1
- package/dist/browser/client-executors.d.ts.map +1 -1
- package/dist/browser/client.d.ts +3 -2
- package/dist/browser/client.d.ts.map +1 -1
- package/dist/browser/contract-identity.d.ts +1 -1
- package/dist/browser/http-fetch.d.ts +1 -1
- package/dist/browser/http.d.ts +6 -3
- package/dist/browser/http.d.ts.map +1 -1
- package/dist/browser/socket-io-contract.d.ts +1 -1
- package/dist/contract/bridge-envelope.d.ts +1 -1
- package/dist/contract/client-types.d.ts +4 -3
- package/dist/contract/client-types.d.ts.map +1 -1
- package/dist/contract/define.d.ts +2 -2
- package/dist/contract/errors-factory.d.ts +1 -1
- package/dist/contract/fingerprint.d.ts +1 -1
- package/dist/device-relay/hub.d.ts +1 -1
- package/dist/entrypoints/agent-executor/acp.js +38 -12
- package/dist/entrypoints/agent-executor/claude-sdk.js +1 -1
- package/dist/entrypoints/agent-executor/codex.js +2 -2
- package/dist/entrypoints/agent-executor/testing/claude-sdk.js +3 -3
- package/dist/entrypoints/agent-executor/testing.js +3 -3
- package/dist/entrypoints/agent-executor.js +1 -1
- package/dist/entrypoints/agent-runtime/ai-sdk.d.ts +3 -3
- package/dist/entrypoints/agent-runtime/ai-sdk.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/ai-sdk.js +9 -8
- package/dist/entrypoints/agent-runtime/anthropic.d.ts +3 -3
- package/dist/entrypoints/agent-runtime/anthropic.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/anthropic.js +72 -18
- package/dist/entrypoints/agent-runtime/browser.d.ts +6 -6
- package/dist/entrypoints/agent-runtime/browser.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/browser.js +39 -39
- package/dist/entrypoints/agent-runtime/coding-tools.d.ts +1 -1
- package/dist/entrypoints/agent-runtime/coding-tools.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/coding-tools.js +2 -2
- package/dist/entrypoints/agent-runtime/harness.d.ts +1 -1
- package/dist/entrypoints/agent-runtime/harness.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/harness.js +27 -28
- package/dist/entrypoints/agent-runtime/openai.d.ts +3 -3
- package/dist/entrypoints/agent-runtime/openai.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/openai.js +9 -9
- package/dist/entrypoints/agent-runtime/openrouter.d.ts +10 -10
- package/dist/entrypoints/agent-runtime/openrouter.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/openrouter.js +167 -113
- package/dist/entrypoints/agent-runtime/postgres.d.ts +2 -2
- package/dist/entrypoints/agent-runtime/postgres.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/postgres.js +11 -11
- package/dist/entrypoints/agent-runtime/react.d.ts +1 -1
- package/dist/entrypoints/agent-runtime/react.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/react.js +1 -1
- package/dist/entrypoints/agent-runtime/realtime.d.ts +1 -1
- package/dist/entrypoints/agent-runtime/realtime.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/realtime.js +5 -5
- package/dist/entrypoints/agent-runtime/sandbox.d.ts +9 -9
- package/dist/entrypoints/agent-runtime/sandbox.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/sandbox.js +220 -93
- package/dist/entrypoints/agent-runtime/sqlite/bun.d.ts +1 -1
- package/dist/entrypoints/agent-runtime/sqlite/bun.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +8 -8
- package/dist/entrypoints/agent-runtime/sqlite/node.d.ts +1 -1
- package/dist/entrypoints/agent-runtime/sqlite/node.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/sqlite/node.js +8 -8
- package/dist/entrypoints/agent-runtime/testing.d.ts +4 -4
- package/dist/entrypoints/agent-runtime/testing.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/testing.js +21 -21
- package/dist/entrypoints/agent-runtime.d.ts +50 -50
- package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime.js +2853 -3107
- package/dist/entrypoints/bin/upgrade-cli.js +1 -1
- package/dist/entrypoints/cli.js +8 -9
- package/dist/entrypoints/files/packaging.js +2 -2
- package/dist/entrypoints/handler.js +2 -2
- package/dist/entrypoints/http.js +2 -2
- package/dist/entrypoints/index.js +2 -2
- package/dist/entrypoints/node.js +2 -2
- package/dist/entrypoints/react.js +1 -1
- package/dist/entrypoints/remote.js +2 -2
- package/dist/entrypoints/server.js +4 -4
- package/dist/entrypoints/testing.js +7 -9
- package/dist/entrypoints/tools/agent.js +476 -13
- package/dist/entrypoints/tools/connections.js +9 -7
- package/dist/entrypoints/tools/contract.js +4 -4
- package/dist/entrypoints/tools/invoker.js +7 -8
- package/dist/entrypoints/tools/mcp.js +11 -13
- package/dist/entrypoints/tools/toolkit.d.ts +6 -4
- package/dist/entrypoints/tools/toolkit.d.ts.map +1 -1
- package/dist/entrypoints/tools/toolkit.js +13 -20
- package/dist/entrypoints/tools.js +14 -15
- package/dist/files/native-packaging-layout.d.ts +1 -1
- package/dist/index-125ks2ec.js +17 -0
- package/dist/index-1w69rj9f.js +224 -0
- package/dist/index-1zy31r3b.js +26 -0
- package/dist/index-3czc3ykr.js +53 -0
- package/dist/index-3d2c45jn.js +77 -0
- package/dist/index-57sbckhv.js +271 -0
- package/dist/index-64t6pheq.js +2872 -0
- package/dist/index-73wq9abg.js +367 -0
- package/dist/index-7mjsb7zv.js +163 -0
- package/dist/index-84tp547a.js +981 -0
- package/dist/index-9be3tf6r.js +196 -0
- package/dist/index-a09r9ff0.js +76 -0
- package/dist/index-asnd4h2k.js +969 -0
- package/dist/index-b4c9dpzm.js +1210 -0
- package/dist/index-baba8ehy.js +53 -0
- package/dist/index-c24bj2r1.js +510 -0
- package/dist/index-cgjtj8zh.js +707 -0
- package/dist/index-d4at0q09.js +601 -0
- package/dist/index-de7b0kvz.js +215 -0
- package/dist/index-dm84tsd5.js +164 -0
- package/dist/index-fsw9wxk9.js +349 -0
- package/dist/index-gk6dq9ay.js +124 -0
- package/dist/index-gs0jw0hy.js +174 -0
- package/dist/index-hce3hbdg.js +121 -0
- package/dist/index-m2b49tvc.js +2343 -0
- package/dist/index-mcv7b2n0.js +3545 -0
- package/dist/index-n9358ydy.js +63 -0
- package/dist/index-npfdymav.js +409 -0
- package/dist/index-p9cab61p.js +305 -0
- package/dist/index-q86qnzzf.js +231 -0
- package/dist/index-qcy8et93.js +698 -0
- package/dist/index-refgnzy0.js +158 -0
- package/dist/index-rkphknhx.js +40 -0
- package/dist/index-v0j22shs.js +3781 -0
- package/dist/index-vse7x1qt.js +460 -0
- package/dist/index-wdb5jhas.js +51 -0
- package/dist/index-ws0awmzq.js +47 -0
- package/dist/index-wsv11dhg.js +725 -0
- package/dist/index-xbb8ysmq.js +40 -0
- package/dist/index-y0mwkgkf.js +7812 -0
- package/dist/index-yhwx4fwk.js +295 -0
- package/dist/index-z72vazf5.js +502 -0
- package/dist/index-zfrysr1e.js +710 -0
- package/dist/internal/postgres-query.d.ts +1 -1
- package/dist/json-schema/dialect.d.ts.map +1 -1
- package/dist/json-schema/string-format.d.ts.map +1 -1
- package/dist/react/query-client.d.ts +1 -1
- package/dist/server/bridge-host.d.ts +1 -1
- package/dist/server/bun.d.ts +1 -1
- package/dist/server/endpoint-dispatch.d.ts.map +1 -1
- package/dist/server/middleware/cors.d.ts +3 -3
- package/dist/server/middleware/cors.d.ts.map +1 -1
- package/dist/server/socket-io-config.d.ts +1 -1
- package/dist/service-host/identity.d.ts +1 -1
- package/dist/service-host/systemd-inspect.d.ts +1 -1
- package/dist/testing/manual-clock.d.ts +1 -1
- package/dist/tools/agent-call-context.d.ts +23 -0
- package/dist/tools/agent-call-context.d.ts.map +1 -0
- package/dist/tools/agent.d.ts.map +1 -1
- package/dist/tools/connections/types.d.ts +1 -1
- package/dist/tools/mcp/handler.d.ts +1 -1
- package/dist/tools/mcp/lazy-discovery.d.ts +1 -1
- package/dist/tools/mcp/mount.d.ts +1 -1
- package/dist/tools/mcp/stdio.d.ts +1 -1
- package/dist/tools/schema/flatten.d.ts.map +1 -1
- package/dist/tools/toolkit.d.ts +8 -6
- package/dist/tools/toolkit.d.ts.map +1 -1
- package/llms/agent-runtime-ai-sdk.txt +2 -2
- package/llms/agent-runtime-anthropic.txt +8 -4
- package/llms/agent-runtime-browser.txt +1 -1
- package/llms/agent-runtime-openrouter.txt +4 -4
- package/llms/agent-runtime-sandbox.txt +20 -7
- package/llms/agent-runtime-sqlite-bun.txt +1 -1
- package/llms/agent-runtime.2.txt +1 -1
- package/llms/agent-runtime.3.txt +23 -7
- package/llms/agent-runtime.4.txt +2 -2
- package/llms/agent-runtime.txt +23 -10
- package/llms/application.2.txt +4 -4
- package/llms/application.txt +4 -4
- package/llms/cli.2.txt +30 -6
- package/llms/cli.txt +2 -2
- package/llms/contract.txt +2 -2
- package/llms/files-packaging.txt +1 -1
- package/llms/geo.txt +1 -1
- package/llms/live.txt +1 -1
- package/llms/oauth.txt +4 -4
- package/llms/observability.txt +3 -3
- package/llms/primitives.txt +1 -1
- package/llms/process.2.txt +7 -7
- package/llms/react.txt +4 -4
- package/llms/server.2.txt +7 -7
- package/llms/server.3.txt +5 -5
- package/llms/server.4.txt +6 -6
- package/llms/server.txt +23 -11
- package/llms/stitchkit.2.txt +21 -14
- package/llms/stitchkit.3.txt +1 -1
- package/llms/stitchkit.txt +87 -87
- package/llms/telegram.txt +1 -1
- package/llms/testing.txt +4 -4
- package/llms/tools-connections.txt +1 -1
- package/llms/tools-toolkit.txt +3 -4
- package/llms/tools.2.txt +6 -6
- package/llms/tools.3.txt +8 -8
- package/llms/tools.4.txt +3 -3
- package/llms/upgrading-0.106.0-0.126.0.txt +1 -1
- package/llms/upgrading-0.128.0-0.135.0.txt +700 -0
- package/llms/upgrading-0.37.0-0.53.0.txt +7 -7
- package/llms/upgrading-0.69.0-0.95.0.txt +1 -1
- package/llms/upgrading-0.96.0-0.105.0.txt +1 -1
- package/llms/upgrading.txt +1 -1
- package/llms-full.txt +403 -248
- package/llms.txt +12 -12
- package/package.json +1 -1
- package/dist/agent-runtime/admission-lanes.d.ts +0 -35
- package/dist/agent-runtime/admission-lanes.d.ts.map +0 -1
- package/dist/agent-runtime/ai-sdk-convert.d.ts +0 -15
- package/dist/agent-runtime/ai-sdk-convert.d.ts.map +0 -1
- package/dist/agent-runtime/ai-sdk.d.ts +0 -31
- package/dist/agent-runtime/ai-sdk.d.ts.map +0 -1
- package/dist/agent-runtime/anthropic-media.d.ts +0 -11
- package/dist/agent-runtime/anthropic-media.d.ts.map +0 -1
- package/dist/agent-runtime/anthropic-messages.d.ts +0 -24
- package/dist/agent-runtime/anthropic-messages.d.ts.map +0 -1
- package/dist/agent-runtime/anthropic-options.d.ts +0 -79
- package/dist/agent-runtime/anthropic-options.d.ts.map +0 -1
- package/dist/agent-runtime/anthropic-response.d.ts +0 -19
- package/dist/agent-runtime/anthropic-response.d.ts.map +0 -1
- package/dist/agent-runtime/anthropic-sse.d.ts.map +0 -1
- package/dist/agent-runtime/anthropic.d.ts.map +0 -1
- package/dist/agent-runtime/archive-projection.d.ts.map +0 -1
- package/dist/agent-runtime/archive-spill.d.ts.map +0 -1
- package/dist/agent-runtime/branch-contract.d.ts.map +0 -1
- package/dist/agent-runtime/branch-events.d.ts +0 -25
- package/dist/agent-runtime/branch-events.d.ts.map +0 -1
- package/dist/agent-runtime/branch-identities.d.ts +0 -75
- package/dist/agent-runtime/branch-identities.d.ts.map +0 -1
- package/dist/agent-runtime/branch-messages.d.ts +0 -21
- package/dist/agent-runtime/branch-messages.d.ts.map +0 -1
- package/dist/agent-runtime/branch-observations.d.ts +0 -227
- package/dist/agent-runtime/branch-observations.d.ts.map +0 -1
- package/dist/agent-runtime/branch-provider.d.ts.map +0 -1
- package/dist/agent-runtime/branch-refusal.d.ts.map +0 -1
- package/dist/agent-runtime/branch-replay.d.ts +0 -456
- package/dist/agent-runtime/branch-replay.d.ts.map +0 -1
- package/dist/agent-runtime/branch-runtime-tools.d.ts.map +0 -1
- package/dist/agent-runtime/branch-source.d.ts +0 -33
- package/dist/agent-runtime/branch-source.d.ts.map +0 -1
- package/dist/agent-runtime/branch-transitions.d.ts.map +0 -1
- package/dist/agent-runtime/browser-control-contract.d.ts +0 -1364
- package/dist/agent-runtime/browser-control-contract.d.ts.map +0 -1
- package/dist/agent-runtime/browser-controller-view.d.ts +0 -44
- package/dist/agent-runtime/browser-controller-view.d.ts.map +0 -1
- package/dist/agent-runtime/browser-controller.d.ts +0 -53
- package/dist/agent-runtime/browser-controller.d.ts.map +0 -1
- package/dist/agent-runtime/child-blocking.d.ts.map +0 -1
- package/dist/agent-runtime/child-budget-policy.d.ts +0 -17
- package/dist/agent-runtime/child-budget-policy.d.ts.map +0 -1
- package/dist/agent-runtime/child-tools.d.ts +0 -144
- package/dist/agent-runtime/child-tools.d.ts.map +0 -1
- package/dist/agent-runtime/children-contract.d.ts +0 -236
- package/dist/agent-runtime/children-contract.d.ts.map +0 -1
- package/dist/agent-runtime/children-control.d.ts.map +0 -1
- package/dist/agent-runtime/children-spawn.d.ts.map +0 -1
- package/dist/agent-runtime/children-state.d.ts.map +0 -1
- package/dist/agent-runtime/children-usage.d.ts.map +0 -1
- package/dist/agent-runtime/children.d.ts.map +0 -1
- package/dist/agent-runtime/coding-discovery.d.ts +0 -25
- package/dist/agent-runtime/coding-discovery.d.ts.map +0 -1
- package/dist/agent-runtime/coding-sandbox.d.ts +0 -8
- package/dist/agent-runtime/coding-sandbox.d.ts.map +0 -1
- package/dist/agent-runtime/coding-search-automaton.d.ts.map +0 -1
- package/dist/agent-runtime/coding-search-case-fold.d.ts.map +0 -1
- package/dist/agent-runtime/coding-search-class-ranges.d.ts.map +0 -1
- package/dist/agent-runtime/coding-search-contract.d.ts.map +0 -1
- package/dist/agent-runtime/coding-search-limits.d.ts.map +0 -1
- package/dist/agent-runtime/coding-search-matcher.d.ts.map +0 -1
- package/dist/agent-runtime/coding-search-output.d.ts.map +0 -1
- package/dist/agent-runtime/coding-search-regex-syntax.d.ts.map +0 -1
- package/dist/agent-runtime/coding-search-unit-classes.d.ts.map +0 -1
- package/dist/agent-runtime/coding-shell-process.d.ts +0 -36
- package/dist/agent-runtime/coding-shell-process.d.ts.map +0 -1
- package/dist/agent-runtime/coding-tool-contract.d.ts +0 -261
- package/dist/agent-runtime/coding-tool-contract.d.ts.map +0 -1
- package/dist/agent-runtime/coding-tool-files.d.ts.map +0 -1
- package/dist/agent-runtime/coding-tool-listing.d.ts.map +0 -1
- package/dist/agent-runtime/coding-tool-paths.d.ts +0 -53
- package/dist/agent-runtime/coding-tool-paths.d.ts.map +0 -1
- package/dist/agent-runtime/coding-tool-refusals.d.ts.map +0 -1
- package/dist/agent-runtime/coding-tool-search-patch.d.ts.map +0 -1
- package/dist/agent-runtime/coding-tool-search.d.ts +0 -113
- package/dist/agent-runtime/coding-tool-search.d.ts.map +0 -1
- package/dist/agent-runtime/coding-tool-shell.d.ts.map +0 -1
- package/dist/agent-runtime/coding-tool-utf8.d.ts.map +0 -1
- package/dist/agent-runtime/coding-tools.d.ts.map +0 -1
- package/dist/agent-runtime/compaction.d.ts +0 -103
- package/dist/agent-runtime/compaction.d.ts.map +0 -1
- package/dist/agent-runtime/companion-host.d.ts +0 -38
- package/dist/agent-runtime/companion-host.d.ts.map +0 -1
- package/dist/agent-runtime/contained-scan-budget.d.ts.map +0 -1
- package/dist/agent-runtime/contained-scan-contract.d.ts.map +0 -1
- package/dist/agent-runtime/contained-scan.d.ts +0 -56
- package/dist/agent-runtime/contained-scan.d.ts.map +0 -1
- package/dist/agent-runtime/control-interaction-schema.d.ts.map +0 -1
- package/dist/agent-runtime/control-schema.d.ts +0 -1378
- package/dist/agent-runtime/control-schema.d.ts.map +0 -1
- package/dist/agent-runtime/control-view.d.ts +0 -64
- package/dist/agent-runtime/control-view.d.ts.map +0 -1
- package/dist/agent-runtime/conversations.d.ts.map +0 -1
- package/dist/agent-runtime/coordinator.d.ts.map +0 -1
- package/dist/agent-runtime/deferred-tool-search.d.ts +0 -9
- package/dist/agent-runtime/deferred-tool-search.d.ts.map +0 -1
- package/dist/agent-runtime/deferred-tool-selection.d.ts +0 -32
- package/dist/agent-runtime/deferred-tool-selection.d.ts.map +0 -1
- package/dist/agent-runtime/deferred-tools-internal.d.ts +0 -9
- package/dist/agent-runtime/deferred-tools-internal.d.ts.map +0 -1
- package/dist/agent-runtime/deferred-tools.d.ts +0 -4
- package/dist/agent-runtime/deferred-tools.d.ts.map +0 -1
- package/dist/agent-runtime/event-search-postgres.d.ts.map +0 -1
- package/dist/agent-runtime/event-search-terms.d.ts.map +0 -1
- package/dist/agent-runtime/event-search-tools.d.ts +0 -190
- package/dist/agent-runtime/event-search-tools.d.ts.map +0 -1
- package/dist/agent-runtime/event-search.d.ts.map +0 -1
- package/dist/agent-runtime/fault-bench.d.ts.map +0 -1
- package/dist/agent-runtime/harness-contract.d.ts +0 -206
- package/dist/agent-runtime/harness-contract.d.ts.map +0 -1
- package/dist/agent-runtime/harness-control.d.ts +0 -34
- package/dist/agent-runtime/harness-control.d.ts.map +0 -1
- package/dist/agent-runtime/harness-file-resources.d.ts +0 -33
- package/dist/agent-runtime/harness-file-resources.d.ts.map +0 -1
- package/dist/agent-runtime/harness-realtime.d.ts +0 -53
- package/dist/agent-runtime/harness-realtime.d.ts.map +0 -1
- package/dist/agent-runtime/harness-resources.d.ts.map +0 -1
- package/dist/agent-runtime/harness.d.ts +0 -15
- package/dist/agent-runtime/harness.d.ts.map +0 -1
- package/dist/agent-runtime/history.d.ts +0 -93
- package/dist/agent-runtime/history.d.ts.map +0 -1
- package/dist/agent-runtime/injection.d.ts +0 -28
- package/dist/agent-runtime/injection.d.ts.map +0 -1
- package/dist/agent-runtime/invocation-attempt.d.ts +0 -32
- package/dist/agent-runtime/invocation-attempt.d.ts.map +0 -1
- package/dist/agent-runtime/invocation-failure.d.ts.map +0 -1
- package/dist/agent-runtime/invocation-payload.d.ts +0 -38
- package/dist/agent-runtime/invocation-payload.d.ts.map +0 -1
- package/dist/agent-runtime/invocation-read.d.ts +0 -134
- package/dist/agent-runtime/invocation-read.d.ts.map +0 -1
- package/dist/agent-runtime/invocation-spend.d.ts +0 -9
- package/dist/agent-runtime/invocation-spend.d.ts.map +0 -1
- package/dist/agent-runtime/invocation-stream.d.ts +0 -20
- package/dist/agent-runtime/invocation-stream.d.ts.map +0 -1
- package/dist/agent-runtime/invocations.d.ts +0 -63
- package/dist/agent-runtime/invocations.d.ts.map +0 -1
- package/dist/agent-runtime/managed-tools.d.ts +0 -20
- package/dist/agent-runtime/managed-tools.d.ts.map +0 -1
- package/dist/agent-runtime/models-driver-step.d.ts +0 -212
- package/dist/agent-runtime/models-driver-step.d.ts.map +0 -1
- package/dist/agent-runtime/models-driver-telemetry.d.ts.map +0 -1
- package/dist/agent-runtime/models-driver.d.ts +0 -235
- package/dist/agent-runtime/models-driver.d.ts.map +0 -1
- package/dist/agent-runtime/models.d.ts.map +0 -1
- package/dist/agent-runtime/observability.d.ts +0 -579
- package/dist/agent-runtime/observability.d.ts.map +0 -1
- package/dist/agent-runtime/openai-messages.d.ts.map +0 -1
- package/dist/agent-runtime/openai-options.d.ts +0 -91
- package/dist/agent-runtime/openai-options.d.ts.map +0 -1
- package/dist/agent-runtime/openai-response.d.ts +0 -77
- package/dist/agent-runtime/openai-response.d.ts.map +0 -1
- package/dist/agent-runtime/openai-sse-state.d.ts.map +0 -1
- package/dist/agent-runtime/openai-sse.d.ts.map +0 -1
- package/dist/agent-runtime/openai.d.ts.map +0 -1
- package/dist/agent-runtime/openrouter-admission.d.ts +0 -84
- package/dist/agent-runtime/openrouter-admission.d.ts.map +0 -1
- package/dist/agent-runtime/openrouter-benchmarks.d.ts.map +0 -1
- package/dist/agent-runtime/openrouter-catalog-cache.d.ts.map +0 -1
- package/dist/agent-runtime/openrouter-catalog-query.d.ts +0 -57
- package/dist/agent-runtime/openrouter-catalog-query.d.ts.map +0 -1
- package/dist/agent-runtime/openrouter-catalog.d.ts.map +0 -1
- package/dist/agent-runtime/openrouter-models.d.ts.map +0 -1
- package/dist/agent-runtime/openrouter-options.d.ts +0 -136
- package/dist/agent-runtime/openrouter-options.d.ts.map +0 -1
- package/dist/agent-runtime/openrouter-response.d.ts +0 -22
- package/dist/agent-runtime/openrouter-response.d.ts.map +0 -1
- package/dist/agent-runtime/openrouter-route.d.ts.map +0 -1
- package/dist/agent-runtime/openrouter-spend.d.ts +0 -24
- package/dist/agent-runtime/openrouter-spend.d.ts.map +0 -1
- package/dist/agent-runtime/openrouter.d.ts.map +0 -1
- package/dist/agent-runtime/owned-provider-stream.d.ts.map +0 -1
- package/dist/agent-runtime/postgres-schema.d.ts.map +0 -1
- package/dist/agent-runtime/postgres-transactions.d.ts +0 -54
- package/dist/agent-runtime/postgres-transactions.d.ts.map +0 -1
- package/dist/agent-runtime/postgres.d.ts +0 -72
- package/dist/agent-runtime/postgres.d.ts.map +0 -1
- package/dist/agent-runtime/projections.d.ts +0 -109
- package/dist/agent-runtime/projections.d.ts.map +0 -1
- package/dist/agent-runtime/provider-cache.d.ts +0 -30
- package/dist/agent-runtime/provider-cache.d.ts.map +0 -1
- package/dist/agent-runtime/provider-content.d.ts.map +0 -1
- package/dist/agent-runtime/provider-failure.d.ts +0 -95
- package/dist/agent-runtime/provider-failure.d.ts.map +0 -1
- package/dist/agent-runtime/provider-history.d.ts +0 -13
- package/dist/agent-runtime/provider-history.d.ts.map +0 -1
- package/dist/agent-runtime/provider-http.d.ts.map +0 -1
- package/dist/agent-runtime/provider-journal.d.ts.map +0 -1
- package/dist/agent-runtime/provider-json-schema-strip.d.ts.map +0 -1
- package/dist/agent-runtime/provider-json-schema.d.ts +0 -28
- package/dist/agent-runtime/provider-json-schema.d.ts.map +0 -1
- package/dist/agent-runtime/provider-media.d.ts +0 -49
- package/dist/agent-runtime/provider-media.d.ts.map +0 -1
- package/dist/agent-runtime/provider-openai-chat-helpers.d.ts +0 -27
- package/dist/agent-runtime/provider-openai-chat-helpers.d.ts.map +0 -1
- package/dist/agent-runtime/provider-openai-chat-sse.d.ts +0 -25
- package/dist/agent-runtime/provider-openai-chat-sse.d.ts.map +0 -1
- package/dist/agent-runtime/provider-openai-chat.d.ts +0 -27
- package/dist/agent-runtime/provider-openai-chat.d.ts.map +0 -1
- package/dist/agent-runtime/provider-origin.d.ts +0 -10
- package/dist/agent-runtime/provider-origin.d.ts.map +0 -1
- package/dist/agent-runtime/provider-sse.d.ts.map +0 -1
- package/dist/agent-runtime/provider-stream-parts.d.ts +0 -5
- package/dist/agent-runtime/provider-stream-parts.d.ts.map +0 -1
- package/dist/agent-runtime/provider-stream-segments.d.ts +0 -63
- package/dist/agent-runtime/provider-stream-segments.d.ts.map +0 -1
- package/dist/agent-runtime/provider-usage.d.ts +0 -24
- package/dist/agent-runtime/provider-usage.d.ts.map +0 -1
- package/dist/agent-runtime/purge.d.ts.map +0 -1
- package/dist/agent-runtime/react.d.ts.map +0 -1
- package/dist/agent-runtime/retry-policy.d.ts +0 -49
- package/dist/agent-runtime/retry-policy.d.ts.map +0 -1
- package/dist/agent-runtime/run-acquisition.d.ts +0 -24
- package/dist/agent-runtime/run-acquisition.d.ts.map +0 -1
- package/dist/agent-runtime/run-approval.d.ts +0 -82
- package/dist/agent-runtime/run-approval.d.ts.map +0 -1
- package/dist/agent-runtime/run-assertions.d.ts +0 -63
- package/dist/agent-runtime/run-assertions.d.ts.map +0 -1
- package/dist/agent-runtime/run-complete-retry.d.ts +0 -24
- package/dist/agent-runtime/run-complete-retry.d.ts.map +0 -1
- package/dist/agent-runtime/run-complete-stream.d.ts +0 -9
- package/dist/agent-runtime/run-complete-stream.d.ts.map +0 -1
- package/dist/agent-runtime/run-complete-tools.d.ts +0 -21
- package/dist/agent-runtime/run-complete-tools.d.ts.map +0 -1
- package/dist/agent-runtime/run-complete-types.d.ts +0 -168
- package/dist/agent-runtime/run-complete-types.d.ts.map +0 -1
- package/dist/agent-runtime/run-complete.d.ts +0 -25
- package/dist/agent-runtime/run-complete.d.ts.map +0 -1
- package/dist/agent-runtime/run-driver-compose.d.ts +0 -21
- package/dist/agent-runtime/run-driver-compose.d.ts.map +0 -1
- package/dist/agent-runtime/run-execution-state.d.ts +0 -178
- package/dist/agent-runtime/run-execution-state.d.ts.map +0 -1
- package/dist/agent-runtime/run-execution.d.ts +0 -22
- package/dist/agent-runtime/run-execution.d.ts.map +0 -1
- package/dist/agent-runtime/run-failure.d.ts +0 -21
- package/dist/agent-runtime/run-failure.d.ts.map +0 -1
- package/dist/agent-runtime/run-history-parts.d.ts +0 -14
- package/dist/agent-runtime/run-history-parts.d.ts.map +0 -1
- package/dist/agent-runtime/run-loop-events.d.ts +0 -126
- package/dist/agent-runtime/run-loop-events.d.ts.map +0 -1
- package/dist/agent-runtime/run-model-attempts.d.ts +0 -6
- package/dist/agent-runtime/run-model-attempts.d.ts.map +0 -1
- package/dist/agent-runtime/run-model-messages.d.ts +0 -9
- package/dist/agent-runtime/run-model-messages.d.ts.map +0 -1
- package/dist/agent-runtime/run-model-step.d.ts +0 -43
- package/dist/agent-runtime/run-model-step.d.ts.map +0 -1
- package/dist/agent-runtime/run-model-stream.d.ts +0 -27
- package/dist/agent-runtime/run-model-stream.d.ts.map +0 -1
- package/dist/agent-runtime/run-operation-lifecycle.d.ts +0 -32
- package/dist/agent-runtime/run-operation-lifecycle.d.ts.map +0 -1
- package/dist/agent-runtime/run-prompt-history.d.ts +0 -53
- package/dist/agent-runtime/run-prompt-history.d.ts.map +0 -1
- package/dist/agent-runtime/run-provider-ledger.d.ts +0 -32
- package/dist/agent-runtime/run-provider-ledger.d.ts.map +0 -1
- package/dist/agent-runtime/run-step-barriers.d.ts +0 -114
- package/dist/agent-runtime/run-step-barriers.d.ts.map +0 -1
- package/dist/agent-runtime/run-step-helpers.d.ts +0 -49
- package/dist/agent-runtime/run-step-helpers.d.ts.map +0 -1
- package/dist/agent-runtime/run-step-prepare.d.ts +0 -34
- package/dist/agent-runtime/run-step-prepare.d.ts.map +0 -1
- package/dist/agent-runtime/run-step-spend.d.ts +0 -394
- package/dist/agent-runtime/run-step-spend.d.ts.map +0 -1
- package/dist/agent-runtime/run-stream-parts.d.ts +0 -34
- package/dist/agent-runtime/run-stream-parts.d.ts.map +0 -1
- package/dist/agent-runtime/run-stream-recorded.d.ts +0 -8
- package/dist/agent-runtime/run-stream-recorded.d.ts.map +0 -1
- package/dist/agent-runtime/run-stream-step-text.d.ts +0 -29
- package/dist/agent-runtime/run-stream-step-text.d.ts.map +0 -1
- package/dist/agent-runtime/run-terminal.d.ts +0 -11
- package/dist/agent-runtime/run-terminal.d.ts.map +0 -1
- package/dist/agent-runtime/run-tool-approval-flow.d.ts +0 -36
- package/dist/agent-runtime/run-tool-approval-flow.d.ts.map +0 -1
- package/dist/agent-runtime/run-tool-approval-records.d.ts +0 -24
- package/dist/agent-runtime/run-tool-approval-records.d.ts.map +0 -1
- package/dist/agent-runtime/run-tool-call.d.ts +0 -73
- package/dist/agent-runtime/run-tool-call.d.ts.map +0 -1
- package/dist/agent-runtime/run-tool-errors.d.ts.map +0 -1
- package/dist/agent-runtime/run-tool-executor.d.ts +0 -34
- package/dist/agent-runtime/run-tool-executor.d.ts.map +0 -1
- package/dist/agent-runtime/run-tool-progress.d.ts +0 -21
- package/dist/agent-runtime/run-tool-progress.d.ts.map +0 -1
- package/dist/agent-runtime/run-turn-preparation.d.ts +0 -25
- package/dist/agent-runtime/run-turn-preparation.d.ts.map +0 -1
- package/dist/agent-runtime/run-unacquired.d.ts +0 -19
- package/dist/agent-runtime/run-unacquired.d.ts.map +0 -1
- package/dist/agent-runtime/runtime-admission-gate.d.ts.map +0 -1
- package/dist/agent-runtime/runtime-control.d.ts +0 -9
- package/dist/agent-runtime/runtime-control.d.ts.map +0 -1
- package/dist/agent-runtime/runtime-recovery.d.ts +0 -10
- package/dist/agent-runtime/runtime-recovery.d.ts.map +0 -1
- package/dist/agent-runtime/runtime-state.d.ts +0 -36
- package/dist/agent-runtime/runtime-state.d.ts.map +0 -1
- package/dist/agent-runtime/runtime-submit.d.ts +0 -5
- package/dist/agent-runtime/runtime-submit.d.ts.map +0 -1
- package/dist/agent-runtime/runtime.d.ts +0 -352
- package/dist/agent-runtime/runtime.d.ts.map +0 -1
- package/dist/agent-runtime/sandbox-binding.d.ts.map +0 -1
- package/dist/agent-runtime/sandbox-broker.d.ts.map +0 -1
- package/dist/agent-runtime/sandbox-bubblewrap-args.d.ts.map +0 -1
- package/dist/agent-runtime/sandbox-bubblewrap-storage.d.ts.map +0 -1
- package/dist/agent-runtime/sandbox-bubblewrap.d.ts.map +0 -1
- package/dist/agent-runtime/sandbox-coding-adapter.d.ts.map +0 -1
- package/dist/agent-runtime/sandbox-contract.d.ts.map +0 -1
- package/dist/agent-runtime/sandbox-process-linux.d.ts.map +0 -1
- package/dist/agent-runtime/sandbox-process-macos.d.ts.map +0 -1
- package/dist/agent-runtime/sandbox-process-owner.d.ts +0 -19
- package/dist/agent-runtime/sandbox-process-owner.d.ts.map +0 -1
- package/dist/agent-runtime/sandbox-process-spec.d.ts.map +0 -1
- package/dist/agent-runtime/sandbox-process-wrapper.d.ts.map +0 -1
- package/dist/agent-runtime/sandbox-process.d.ts +0 -8
- package/dist/agent-runtime/sandbox-process.d.ts.map +0 -1
- package/dist/agent-runtime/sandbox-session.d.ts.map +0 -1
- package/dist/agent-runtime/sandbox.d.ts +0 -125
- package/dist/agent-runtime/sandbox.d.ts.map +0 -1
- package/dist/agent-runtime/schedule-contract.d.ts.map +0 -1
- package/dist/agent-runtime/schedule-dispatch.d.ts.map +0 -1
- package/dist/agent-runtime/schedule-records.d.ts.map +0 -1
- package/dist/agent-runtime/schedule-tools.d.ts +0 -76
- package/dist/agent-runtime/schedule-tools.d.ts.map +0 -1
- package/dist/agent-runtime/schedules.d.ts.map +0 -1
- package/dist/agent-runtime/spill.d.ts +0 -26
- package/dist/agent-runtime/spill.d.ts.map +0 -1
- package/dist/agent-runtime/sql-events.d.ts.map +0 -1
- package/dist/agent-runtime/sql-history.d.ts.map +0 -1
- package/dist/agent-runtime/sql-ledger.d.ts.map +0 -1
- package/dist/agent-runtime/sql-purge.d.ts.map +0 -1
- package/dist/agent-runtime/sql-reads.d.ts.map +0 -1
- package/dist/agent-runtime/sql-rows.d.ts +0 -202
- package/dist/agent-runtime/sql-rows.d.ts.map +0 -1
- package/dist/agent-runtime/sql-session.d.ts.map +0 -1
- package/dist/agent-runtime/sqlite-bun.d.ts.map +0 -1
- package/dist/agent-runtime/sqlite-node.d.ts.map +0 -1
- package/dist/agent-runtime/sqlite-purge.d.ts +0 -6
- package/dist/agent-runtime/sqlite-purge.d.ts.map +0 -1
- package/dist/agent-runtime/sqlite-schema.d.ts +0 -7
- package/dist/agent-runtime/sqlite-schema.d.ts.map +0 -1
- package/dist/agent-runtime/sqlite-transactions.d.ts +0 -29
- package/dist/agent-runtime/sqlite-transactions.d.ts.map +0 -1
- package/dist/agent-runtime/sqlite.d.ts +0 -33
- package/dist/agent-runtime/sqlite.d.ts.map +0 -1
- package/dist/agent-runtime/state-slots.d.ts +0 -48
- package/dist/agent-runtime/state-slots.d.ts.map +0 -1
- package/dist/agent-runtime/state-tools.d.ts +0 -117
- package/dist/agent-runtime/state-tools.d.ts.map +0 -1
- package/dist/agent-runtime/store-archive.d.ts.map +0 -1
- package/dist/agent-runtime/store-branch.d.ts.map +0 -1
- package/dist/agent-runtime/store-capabilities.d.ts.map +0 -1
- package/dist/agent-runtime/store-conformance-branch.d.ts +0 -7
- package/dist/agent-runtime/store-conformance-branch.d.ts.map +0 -1
- package/dist/agent-runtime/store-conformance-capabilities.d.ts +0 -6
- package/dist/agent-runtime/store-conformance-capabilities.d.ts.map +0 -1
- package/dist/agent-runtime/store-conformance-event-once.d.ts +0 -12
- package/dist/agent-runtime/store-conformance-event-once.d.ts.map +0 -1
- package/dist/agent-runtime/store-conformance-lifecycle.d.ts +0 -454
- package/dist/agent-runtime/store-conformance-lifecycle.d.ts.map +0 -1
- package/dist/agent-runtime/store-conformance-ordering.d.ts +0 -18
- package/dist/agent-runtime/store-conformance-ordering.d.ts.map +0 -1
- package/dist/agent-runtime/store-conformance-seed.d.ts +0 -8
- package/dist/agent-runtime/store-conformance-seed.d.ts.map +0 -1
- package/dist/agent-runtime/store-conformance-support.d.ts +0 -140
- package/dist/agent-runtime/store-conformance-support.d.ts.map +0 -1
- package/dist/agent-runtime/store-conformance-terminal.d.ts +0 -12
- package/dist/agent-runtime/store-conformance-terminal.d.ts.map +0 -1
- package/dist/agent-runtime/store-conformance.d.ts +0 -71
- package/dist/agent-runtime/store-conformance.d.ts.map +0 -1
- package/dist/agent-runtime/store-create.d.ts.map +0 -1
- package/dist/agent-runtime/store-driver-contract.d.ts +0 -1016
- package/dist/agent-runtime/store-driver-contract.d.ts.map +0 -1
- package/dist/agent-runtime/store-event-once.d.ts +0 -37
- package/dist/agent-runtime/store-event-once.d.ts.map +0 -1
- package/dist/agent-runtime/store-events.d.ts +0 -2231
- package/dist/agent-runtime/store-events.d.ts.map +0 -1
- package/dist/agent-runtime/store-memory-archive.d.ts.map +0 -1
- package/dist/agent-runtime/store-memory-events.d.ts +0 -7
- package/dist/agent-runtime/store-memory-events.d.ts.map +0 -1
- package/dist/agent-runtime/store-memory.d.ts.map +0 -1
- package/dist/agent-runtime/store-migrations/v1-to-v2.d.ts +0 -6
- package/dist/agent-runtime/store-migrations/v1-to-v2.d.ts.map +0 -1
- package/dist/agent-runtime/store-migrations/v2-to-v3.d.ts +0 -14
- package/dist/agent-runtime/store-migrations/v2-to-v3.d.ts.map +0 -1
- package/dist/agent-runtime/store-migrations/v3-to-v4.d.ts +0 -4
- package/dist/agent-runtime/store-migrations/v3-to-v4.d.ts.map +0 -1
- package/dist/agent-runtime/store-mutate.d.ts.map +0 -1
- package/dist/agent-runtime/store-purge.d.ts.map +0 -1
- package/dist/agent-runtime/store-reads.d.ts +0 -29
- package/dist/agent-runtime/store-reads.d.ts.map +0 -1
- package/dist/agent-runtime/store-reduce-history.d.ts +0 -10
- package/dist/agent-runtime/store-reduce-history.d.ts.map +0 -1
- package/dist/agent-runtime/store-reduce-run.d.ts +0 -14
- package/dist/agent-runtime/store-reduce-run.d.ts.map +0 -1
- package/dist/agent-runtime/store-reduce-shared.d.ts +0 -78
- package/dist/agent-runtime/store-reduce-shared.d.ts.map +0 -1
- package/dist/agent-runtime/store-reduce-terminal.d.ts +0 -6
- package/dist/agent-runtime/store-reduce-terminal.d.ts.map +0 -1
- package/dist/agent-runtime/store-reducer.d.ts +0 -24
- package/dist/agent-runtime/store-reducer.d.ts.map +0 -1
- package/dist/agent-runtime/store-replay.d.ts.map +0 -1
- package/dist/agent-runtime/store-snapshot.d.ts +0 -19
- package/dist/agent-runtime/store-snapshot.d.ts.map +0 -1
- package/dist/agent-runtime/store.d.ts +0 -3032
- package/dist/agent-runtime/store.d.ts.map +0 -1
- package/dist/agent-runtime/testing.d.ts +0 -46
- package/dist/agent-runtime/testing.d.ts.map +0 -1
- package/dist/agent-runtime/workspace-glob.d.ts.map +0 -1
- package/dist/index-18pf56dq.js +0 -409
- package/dist/index-1gmgwfn3.js +0 -439
- package/dist/index-23wn8sgf.js +0 -47
- package/dist/index-27hck3z2.js +0 -307
- package/dist/index-27srek2g.js +0 -3781
- package/dist/index-360j58vb.js +0 -63
- package/dist/index-654rhe5d.js +0 -159
- package/dist/index-67pnt4bh.js +0 -174
- package/dist/index-6kpwkpgx.js +0 -415
- package/dist/index-6xw1wf4m.js +0 -969
- package/dist/index-6yb4stq3.js +0 -224
- package/dist/index-76yhxa41.js +0 -725
- package/dist/index-79vqbjcz.js +0 -26
- package/dist/index-b23s6e2c.js +0 -158
- package/dist/index-cb4nnvfr.js +0 -40
- package/dist/index-ek9w11r0.js +0 -40
- package/dist/index-epyj7ptp.js +0 -510
- package/dist/index-er483f3w.js +0 -601
- package/dist/index-fjac2w5e.js +0 -3543
- package/dist/index-ga6avd48.js +0 -53
- package/dist/index-hy4653g4.js +0 -345
- package/dist/index-j903yhp4.js +0 -121
- package/dist/index-jzdbkanz.js +0 -215
- package/dist/index-k9g061ma.js +0 -164
- package/dist/index-kdw0n92g.js +0 -76
- package/dist/index-krekhmp7.js +0 -707
- package/dist/index-ky79wwgs.js +0 -2872
- package/dist/index-mgr0mdqp.js +0 -271
- package/dist/index-mrng24wq.js +0 -1210
- package/dist/index-mx2gya05.js +0 -465
- package/dist/index-nfeafbzh.js +0 -7379
- package/dist/index-ngwf1s3c.js +0 -51
- package/dist/index-pjjh91vw.js +0 -53
- package/dist/index-qv5v6w9c.js +0 -696
- package/dist/index-qymek778.js +0 -2289
- package/dist/index-rj32hkkp.js +0 -305
- package/dist/index-t5zp1jjj.js +0 -77
- package/dist/index-v5hmyef8.js +0 -951
- package/dist/index-vv0hxrmy.js +0 -295
- package/dist/index-vxm0ya3f.js +0 -707
- package/dist/index-xtxxt87z.js +0 -349
- package/dist/index-zk839vzf.js +0 -231
- package/llms/upgrading-0.128.0-0.134.0.txt +0 -633
- /package/dist/agent-runtime/{control-interaction-schema.d.ts → browser/control-interaction-schema.d.ts} +0 -0
- /package/dist/agent-runtime/{react.d.ts → browser/react.d.ts} +0 -0
- /package/dist/agent-runtime/{coding-search-automaton.d.ts → coding/coding-search-automaton.d.ts} +0 -0
- /package/dist/agent-runtime/{coding-search-case-fold.d.ts → coding/coding-search-case-fold.d.ts} +0 -0
- /package/dist/agent-runtime/{coding-search-class-ranges.d.ts → coding/coding-search-class-ranges.d.ts} +0 -0
- /package/dist/agent-runtime/{coding-search-contract.d.ts → coding/coding-search-contract.d.ts} +0 -0
- /package/dist/agent-runtime/{coding-search-limits.d.ts → coding/coding-search-limits.d.ts} +0 -0
- /package/dist/agent-runtime/{coding-search-matcher.d.ts → coding/coding-search-matcher.d.ts} +0 -0
- /package/dist/agent-runtime/{coding-search-output.d.ts → coding/coding-search-output.d.ts} +0 -0
- /package/dist/agent-runtime/{coding-search-regex-syntax.d.ts → coding/coding-search-regex-syntax.d.ts} +0 -0
- /package/dist/agent-runtime/{coding-search-unit-classes.d.ts → coding/coding-search-unit-classes.d.ts} +0 -0
- /package/dist/agent-runtime/{coding-tool-files.d.ts → coding/coding-tool-files.d.ts} +0 -0
- /package/dist/agent-runtime/{coding-tool-listing.d.ts → coding/coding-tool-listing.d.ts} +0 -0
- /package/dist/agent-runtime/{coding-tool-refusals.d.ts → coding/coding-tool-refusals.d.ts} +0 -0
- /package/dist/agent-runtime/{coding-tool-search-patch.d.ts → coding/coding-tool-search-patch.d.ts} +0 -0
- /package/dist/agent-runtime/{coding-tool-shell.d.ts → coding/coding-tool-shell.d.ts} +0 -0
- /package/dist/agent-runtime/{coding-tool-utf8.d.ts → coding/coding-tool-utf8.d.ts} +0 -0
- /package/dist/agent-runtime/{coding-tools.d.ts → coding/coding-tools.d.ts} +0 -0
- /package/dist/agent-runtime/{contained-scan-budget.d.ts → coding/contained-scan-budget.d.ts} +0 -0
- /package/dist/agent-runtime/{contained-scan-contract.d.ts → coding/contained-scan-contract.d.ts} +0 -0
- /package/dist/agent-runtime/{workspace-glob.d.ts → coding/workspace-glob.d.ts} +0 -0
- /package/dist/agent-runtime/{harness-resources.d.ts → harness/harness-resources.d.ts} +0 -0
- /package/dist/agent-runtime/{coordinator.d.ts → loop/coordinator.d.ts} +0 -0
- /package/dist/agent-runtime/{invocation-failure.d.ts → loop/invocation-failure.d.ts} +0 -0
- /package/dist/agent-runtime/{owned-provider-stream.d.ts → loop/owned-provider-stream.d.ts} +0 -0
- /package/dist/agent-runtime/{run-tool-errors.d.ts → loop/run-tool-errors.d.ts} +0 -0
- /package/dist/agent-runtime/{runtime-admission-gate.d.ts → loop/runtime-admission-gate.d.ts} +0 -0
- /package/dist/agent-runtime/{anthropic-sse.d.ts → providers/anthropic-sse.d.ts} +0 -0
- /package/dist/agent-runtime/{anthropic.d.ts → providers/anthropic.d.ts} +0 -0
- /package/dist/agent-runtime/{models-driver-telemetry.d.ts → providers/models-driver-telemetry.d.ts} +0 -0
- /package/dist/agent-runtime/{models.d.ts → providers/models.d.ts} +0 -0
- /package/dist/agent-runtime/{openai-messages.d.ts → providers/openai-messages.d.ts} +0 -0
- /package/dist/agent-runtime/{openai-sse-state.d.ts → providers/openai-sse-state.d.ts} +0 -0
- /package/dist/agent-runtime/{openai-sse.d.ts → providers/openai-sse.d.ts} +0 -0
- /package/dist/agent-runtime/{openai.d.ts → providers/openai.d.ts} +0 -0
- /package/dist/agent-runtime/{openrouter-benchmarks.d.ts → providers/openrouter-benchmarks.d.ts} +0 -0
- /package/dist/agent-runtime/{openrouter-catalog-cache.d.ts → providers/openrouter-catalog-cache.d.ts} +0 -0
- /package/dist/agent-runtime/{openrouter-catalog.d.ts → providers/openrouter-catalog.d.ts} +0 -0
- /package/dist/agent-runtime/{openrouter-models.d.ts → providers/openrouter-models.d.ts} +0 -0
- /package/dist/agent-runtime/{openrouter-route.d.ts → providers/openrouter-route.d.ts} +0 -0
- /package/dist/agent-runtime/{openrouter.d.ts → providers/openrouter.d.ts} +0 -0
- /package/dist/agent-runtime/{provider-content.d.ts → providers/provider-content.d.ts} +0 -0
- /package/dist/agent-runtime/{provider-http.d.ts → providers/provider-http.d.ts} +0 -0
- /package/dist/agent-runtime/{provider-journal.d.ts → providers/provider-journal.d.ts} +0 -0
- /package/dist/agent-runtime/{provider-json-schema-strip.d.ts → providers/provider-json-schema-strip.d.ts} +0 -0
- /package/dist/agent-runtime/{provider-sse.d.ts → providers/provider-sse.d.ts} +0 -0
- /package/dist/agent-runtime/{sandbox-binding.d.ts → sandbox/sandbox-binding.d.ts} +0 -0
- /package/dist/agent-runtime/{sandbox-broker.d.ts → sandbox/sandbox-broker.d.ts} +0 -0
- /package/dist/agent-runtime/{sandbox-bubblewrap-args.d.ts → sandbox/sandbox-bubblewrap-args.d.ts} +0 -0
- /package/dist/agent-runtime/{sandbox-bubblewrap-storage.d.ts → sandbox/sandbox-bubblewrap-storage.d.ts} +0 -0
- /package/dist/agent-runtime/{sandbox-bubblewrap.d.ts → sandbox/sandbox-bubblewrap.d.ts} +0 -0
- /package/dist/agent-runtime/{sandbox-coding-adapter.d.ts → sandbox/sandbox-coding-adapter.d.ts} +0 -0
- /package/dist/agent-runtime/{sandbox-contract.d.ts → sandbox/sandbox-contract.d.ts} +0 -0
- /package/dist/agent-runtime/{sandbox-process-linux.d.ts → sandbox/sandbox-process-linux.d.ts} +0 -0
- /package/dist/agent-runtime/{sandbox-process-macos.d.ts → sandbox/sandbox-process-macos.d.ts} +0 -0
- /package/dist/agent-runtime/{sandbox-process-spec.d.ts → sandbox/sandbox-process-spec.d.ts} +0 -0
- /package/dist/agent-runtime/{sandbox-process-wrapper.d.ts → sandbox/sandbox-process-wrapper.d.ts} +0 -0
- /package/dist/agent-runtime/{sandbox-session.d.ts → sandbox/sandbox-session.d.ts} +0 -0
- /package/dist/agent-runtime/{archive-projection.d.ts → stores/archive-projection.d.ts} +0 -0
- /package/dist/agent-runtime/{archive-spill.d.ts → stores/archive-spill.d.ts} +0 -0
- /package/dist/agent-runtime/{branch-contract.d.ts → stores/branch-contract.d.ts} +0 -0
- /package/dist/agent-runtime/{branch-provider.d.ts → stores/branch-provider.d.ts} +0 -0
- /package/dist/agent-runtime/{branch-refusal.d.ts → stores/branch-refusal.d.ts} +0 -0
- /package/dist/agent-runtime/{branch-runtime-tools.d.ts → stores/branch-runtime-tools.d.ts} +0 -0
- /package/dist/agent-runtime/{branch-transitions.d.ts → stores/branch-transitions.d.ts} +0 -0
- /package/dist/agent-runtime/{child-blocking.d.ts → stores/child-blocking.d.ts} +0 -0
- /package/dist/agent-runtime/{children-control.d.ts → stores/children-control.d.ts} +0 -0
- /package/dist/agent-runtime/{children-spawn.d.ts → stores/children-spawn.d.ts} +0 -0
- /package/dist/agent-runtime/{children-state.d.ts → stores/children-state.d.ts} +0 -0
- /package/dist/agent-runtime/{children-usage.d.ts → stores/children-usage.d.ts} +0 -0
- /package/dist/agent-runtime/{children.d.ts → stores/children.d.ts} +0 -0
- /package/dist/agent-runtime/{conversations.d.ts → stores/conversations.d.ts} +0 -0
- /package/dist/agent-runtime/{event-search-postgres.d.ts → stores/event-search-postgres.d.ts} +0 -0
- /package/dist/agent-runtime/{event-search-terms.d.ts → stores/event-search-terms.d.ts} +0 -0
- /package/dist/agent-runtime/{event-search.d.ts → stores/event-search.d.ts} +0 -0
- /package/dist/agent-runtime/{postgres-schema.d.ts → stores/postgres-schema.d.ts} +0 -0
- /package/dist/agent-runtime/{purge.d.ts → stores/purge.d.ts} +0 -0
- /package/dist/agent-runtime/{schedule-contract.d.ts → stores/schedule-contract.d.ts} +0 -0
- /package/dist/agent-runtime/{schedule-dispatch.d.ts → stores/schedule-dispatch.d.ts} +0 -0
- /package/dist/agent-runtime/{schedule-records.d.ts → stores/schedule-records.d.ts} +0 -0
- /package/dist/agent-runtime/{schedules.d.ts → stores/schedules.d.ts} +0 -0
- /package/dist/agent-runtime/{sql-events.d.ts → stores/sql-events.d.ts} +0 -0
- /package/dist/agent-runtime/{sql-history.d.ts → stores/sql-history.d.ts} +0 -0
- /package/dist/agent-runtime/{sql-ledger.d.ts → stores/sql-ledger.d.ts} +0 -0
- /package/dist/agent-runtime/{sql-purge.d.ts → stores/sql-purge.d.ts} +0 -0
- /package/dist/agent-runtime/{sql-reads.d.ts → stores/sql-reads.d.ts} +0 -0
- /package/dist/agent-runtime/{sql-session.d.ts → stores/sql-session.d.ts} +0 -0
- /package/dist/agent-runtime/{sqlite-bun.d.ts → stores/sqlite-bun.d.ts} +0 -0
- /package/dist/agent-runtime/{sqlite-node.d.ts → stores/sqlite-node.d.ts} +0 -0
- /package/dist/agent-runtime/{store-archive.d.ts → stores/store-archive.d.ts} +0 -0
- /package/dist/agent-runtime/{store-branch.d.ts → stores/store-branch.d.ts} +0 -0
- /package/dist/agent-runtime/{store-capabilities.d.ts → stores/store-capabilities.d.ts} +0 -0
- /package/dist/agent-runtime/{store-create.d.ts → stores/store-create.d.ts} +0 -0
- /package/dist/agent-runtime/{store-memory-archive.d.ts → stores/store-memory-archive.d.ts} +0 -0
- /package/dist/agent-runtime/{store-memory.d.ts → stores/store-memory.d.ts} +0 -0
- /package/dist/agent-runtime/{store-mutate.d.ts → stores/store-mutate.d.ts} +0 -0
- /package/dist/agent-runtime/{store-purge.d.ts → stores/store-purge.d.ts} +0 -0
- /package/dist/agent-runtime/{store-replay.d.ts → stores/store-replay.d.ts} +0 -0
- /package/dist/agent-runtime/{fault-bench.d.ts → testing/fault-bench.d.ts} +0 -0
package/llms-full.txt
CHANGED
|
@@ -47,87 +47,87 @@ own, recorded as an ADR.
|
|
|
47
47
|
|
|
48
48
|
| Import | Use in | Maturity | Holds |
|
|
49
49
|
|--------|--------|----------|-------|
|
|
50
|
-
| `stitchkit` | browser **and** server | stable<br>_redefined in
|
|
51
|
-
| `stitchkit/http` | browser, React Native/Hermes **and** server | evolving<br>_redefined in
|
|
52
|
-
| `stitchkit/realtime` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 1 of the
|
|
53
|
-
| `stitchkit/device-relay` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 0 of the
|
|
54
|
-
| `stitchkit/contract` | browser **and** server | stable<br>_redefined in 5 of the
|
|
55
|
-
| `stitchkit/live` | browser **and** server | evolving<br>_redefined in 2 of the
|
|
56
|
-
| `stitchkit/primitives` | browser **and** server | evolving<br>_redefined in 0 of the
|
|
57
|
-
| `stitchkit/handler` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 0 of the
|
|
58
|
-
| `stitchkit/server` | server (Bun) | stable<br>_redefined in 5 of the
|
|
59
|
-
| `stitchkit/node` | server (Node ≥ 22.3) | stable<br>_redefined in 2 of the
|
|
60
|
-
| `stitchkit/tools` | server | stable<br>_redefined in
|
|
61
|
-
| `stitchkit/tools/mcp` | server (Bun or Node) | evolving<br>_redefined in 3 of the
|
|
62
|
-
| `stitchkit/tools/agent` | server (Bun or Node) | evolving<br>_redefined in 2 of the
|
|
63
|
-
| `stitchkit/tools/toolkit` | server (Bun or Node) | evolving<br>_redefined in
|
|
64
|
-
| `stitchkit/tools/contract` | browser + server | evolving<br>_redefined in 2 of the
|
|
65
|
-
| `stitchkit/tools/invoker` | server | stable<br>_redefined in 3 of the
|
|
66
|
-
| `stitchkit/tools/connections` | server (Bun or Node) | evolving<br>_redefined in 3 of the
|
|
67
|
-
| `stitchkit/cli` | server | stable<br>_redefined in 12 of the
|
|
68
|
-
| `stitchkit/cli/publish` | build and release tooling (Bun or Node, POSIX) | evolving<br>_redefined in 0 of the
|
|
69
|
-
| `stitchkit/remote` | browser **and** server | stable<br>_redefined in 1 of the
|
|
70
|
-
| `stitchkit/process` | server (Bun or Node, POSIX) | evolving<br>_redefined in 4 of the
|
|
71
|
-
| `stitchkit/process/bootstrap` | bundled server entry (Bun, POSIX) | evolving<br>_redefined in 0 of the
|
|
72
|
-
| `stitchkit/files/packaging` | build time (Bun or Node) | evolving<br>_redefined in 4 of the
|
|
73
|
-
| `stitchkit/files` | server (Bun or Node) | stable<br>_redefined in 5 of the
|
|
74
|
-
| `stitchkit/spend` | server (Bun or Node) | evolving<br>_redefined in 0 of the
|
|
75
|
-
| `stitchkit/spend/testing` | tests on Bun or Node | evolving<br>_redefined in 0 of the
|
|
76
|
-
| `stitchkit/service-host` | server (Bun or Node) | evolving<br>_redefined in 0 of the
|
|
77
|
-
| `stitchkit/service-host/macos` | server (Bun or Node, macOS) | evolving<br>_redefined in 0 of the
|
|
78
|
-
| `stitchkit/service-host/work` | server (Bun or Node; Linux with systemd ≥ 254, or a process root on Linux and macOS) | evolving<br>_redefined in 0 of the
|
|
79
|
-
| `stitchkit/telegram` | server (Bun or Node) | evolving<br>_redefined in 8 of the
|
|
80
|
-
| `stitchkit/telegram/grammy` | server (Bun or Node) | evolving<br>_redefined in 0 of the
|
|
81
|
-
| `stitchkit/telegram/html` | browser and server | evolving<br>_redefined in 1 of the
|
|
82
|
-
| `stitchkit/telegram/voice` | browser and server | evolving<br>_redefined in 0 of the
|
|
83
|
-
| `stitchkit/telegram/screens` | server (Bun or Node) | evolving<br>_redefined in 1 of the
|
|
84
|
-
| `stitchkit/tracking` | browser **and** server | evolving<br>_redefined in 3 of the
|
|
85
|
-
| `stitchkit/tracking/contract` | browser **and** server | evolving<br>_redefined in 0 of the
|
|
86
|
-
| `stitchkit/tracking/performance` | browser **and** server | evolving<br>_redefined in 1 of the
|
|
87
|
-
| `stitchkit/tracking/server` | server (Bun or Node) | evolving<br>_redefined in 0 of the
|
|
88
|
-
| `stitchkit/release` | browser **and** server | evolving<br>_redefined in 1 of the
|
|
89
|
-
| `stitchkit/voice` | browser **and** server | evolving<br>_redefined in 0 of the
|
|
90
|
-
| `stitchkit/sync` | browser **and** server | evolving<br>_redefined in 1 of the
|
|
91
|
-
| `stitchkit/sync/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the
|
|
92
|
-
| `stitchkit/geo` | server (Bun or Node) | evolving<br>_redefined in 2 of the
|
|
93
|
-
| `stitchkit/geo/contract` | browser **and** server | evolving<br>_redefined in 0 of the
|
|
94
|
-
| `stitchkit/xlsx` | browser **and** server | evolving<br>_redefined in 0 of the
|
|
95
|
-
| `stitchkit/oauth` | browser **and** server | evolving<br>_redefined in 0 of the
|
|
96
|
-
| `stitchkit/google` | server (Bun or Node) | evolving<br>_redefined in 1 of the
|
|
97
|
-
| `stitchkit/observability` | server | stable<br>_redefined in 1 of the
|
|
98
|
-
| `stitchkit/testing` | tests on Bun or Node | stable<br>_redefined in 3 of the
|
|
99
|
-
| `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving<br>_redefined in 1 of the
|
|
100
|
-
| `stitchkit/react` | browser + server rendering | stable<br>_redefined in 2 of the
|
|
101
|
-
| `stitchkit/react/keyboard` | browser | evolving<br>_redefined in 1 of the
|
|
102
|
-
| `stitchkit/react/keyboard/testing` | server (Bun or Node) | evolving<br>_redefined in 0 of the
|
|
103
|
-
| `stitchkit/agent-runtime` | server | evolving<br>_redefined in
|
|
104
|
-
| `stitchkit/agent-runtime/sandbox` | server | evolving<br>_redefined in 0 of the
|
|
105
|
-
| `stitchkit/agent-runtime/testing` | tests on Bun or Node | evolving<br>_redefined in 3 of the
|
|
106
|
-
| `stitchkit/agent-runtime/harness` | server | evolving<br>_redefined in 1 of the
|
|
107
|
-
| `stitchkit/agent-runtime/coding-tools` | server (Bun or Node) | evolving<br>_redefined in 3 of the
|
|
108
|
-
| `stitchkit/agent-runtime/openrouter` | server | evolving<br>_redefined in
|
|
109
|
-
| `stitchkit/agent-runtime/openai` | server | evolving<br>_redefined in 0 of the
|
|
110
|
-
| `stitchkit/agent-runtime/anthropic` | server | evolving<br>_redefined in 0 of the
|
|
111
|
-
| `stitchkit/agent-runtime/ai-sdk` | server | evolving<br>_redefined in 0 of the
|
|
112
|
-
| `stitchkit/agent-runtime/browser` | browser + server | evolving<br>_redefined in 2 of the
|
|
113
|
-
| `stitchkit/agent-runtime/react` | browser + server | evolving<br>_redefined in 0 of the
|
|
114
|
-
| `stitchkit/agent-runtime/realtime` | server (Bun or Node) | evolving<br>_redefined in 2 of the
|
|
115
|
-
| `stitchkit/agent-executor` | server (Bun or Node) | evolving<br>_redefined in 4 of the
|
|
116
|
-
| `stitchkit/agent-executor/claude` | server (Bun or Node) | evolving<br>_redefined in 0 of the
|
|
117
|
-
| `stitchkit/agent-executor/claude-sdk` | server (Bun or Node) | evolving<br>_redefined in 1 of the
|
|
118
|
-
| `stitchkit/agent-executor/acp` | server (Bun or Node) | evolving<br>_redefined in 0 of the
|
|
119
|
-
| `stitchkit/agent-executor/codex` | server (Bun or Node) | evolving<br>_redefined in 3 of the
|
|
120
|
-
| `stitchkit/agent-executor/testing` | server (Bun or Node) | evolving<br>_redefined in 1 of the
|
|
121
|
-
| `stitchkit/agent-executor/testing/claude-sdk` | server (Bun or Node) | evolving<br>_redefined in 0 of the
|
|
122
|
-
| `stitchkit/agent-runtime/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the
|
|
123
|
-
| `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving<br>_redefined in 1 of the
|
|
124
|
-
| `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving<br>_redefined in 1 of the
|
|
50
|
+
| `stitchkit` | browser **and** server | stable<br>_redefined in 6 of the 42 minors since 0.94.0, most recently 0.135.0_ | `defineContract`, `createClient`, `createHttpClient`, `createSocketIOClient`, `parseSSE`, the error model |
|
|
51
|
+
| `stitchkit/http` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.135.0_ | typed HTTP client factories and `ApiError`, without optional realtime peers |
|
|
52
|
+
| `stitchkit/realtime` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | typed realtime clients, binding to an existing socket and retained topics with a required explicit Socket.IO peer loader |
|
|
53
|
+
| `stitchkit/device-relay` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 0 of the 2 minors since 0.134.0_ | peer-free User Device Relay over realtime — `createDeviceRelayHub`, `createDeviceRelayAgent`, `createMemoryRelayBroker`, `deviceRelayRealtimeContract`, Fetch-compatible unary RPC and credit-paced cursor streams |
|
|
54
|
+
| `stitchkit/contract` | browser **and** server | stable<br>_redefined in 5 of the 42 minors since 0.94.0, most recently 0.127.0_ | the contract layer alone — `defineContract`, errors, pagination |
|
|
55
|
+
| `stitchkit/live` | browser **and** server | evolving<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.127.0_ | `defineEvents` — topic declarations beside the operation contract — and watched reads: `createWatchClient`, the value/difference frame and its reassembly |
|
|
56
|
+
| `stitchkit/primitives` | browser **and** server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | generic values and declarations for lifecycle, access, audit, delivery and exports, exact money and rounding tables |
|
|
57
|
+
| `stitchkit/handler` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | portable `createHandler`, `implement`, errors and `serveBridge` over a string `postMessage` port, with no Node built-ins |
|
|
58
|
+
| `stitchkit/server` | server (Bun) | stable<br>_redefined in 5 of the 42 minors since 0.94.0, most recently 0.127.0_ | `createServer`, `implement`, hooks, auth, Socket.IO server, server primitives |
|
|
59
|
+
| `stitchkit/node` | server (Node ≥ 22.3) | stable<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.127.0_ | `serveNode` + the runtime-agnostic core — the Node mirror of `/server` |
|
|
60
|
+
| `stitchkit/tools` | server | stable<br>_redefined in 12 of the 42 minors since 0.94.0, most recently 0.135.0_ | the transport-neutral tool layer — `mountAgentTools`, `defineAgentTool`, registry, tool names and manifest, runtime tools, native tools, the OAuth provider, the durability engine; loads no optional peer at runtime |
|
|
61
|
+
| `stitchkit/tools/mcp` | server (Bun or Node) | evolving<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.127.0_ | the canonical MCP HTTP/stdio server, schemas and typed MCP presenters; only Zod and the MCP server SDK peers |
|
|
62
|
+
| `stitchkit/tools/agent` | server (Bun or Node) | evolving<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.134.0_ | `mountAgent` — thin AI SDK `ToolSet` adapter over `mountAgentTools` for apps driving their own SDK loop; only Zod and the `ai` peer |
|
|
63
|
+
| `stitchkit/tools/toolkit` | server (Bun or Node) | evolving<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.135.0_ | `createToolkit` — context-pinned MCP, peer-free agent (`mountAgentTools`), and CLI mounts; only the MCP server SDK peer (no `ai` peer) |
|
|
64
|
+
| `stitchkit/tools/contract` | browser + server | evolving<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.124.0_ | the shapes a tool surface speaks — async-operation contract, snapshot and cancel schemas, view-file input/output — without the runtime that serves them |
|
|
65
|
+
| `stitchkit/tools/invoker` | server | stable<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.127.0_ | peer-free `createToolInvoker` over the canonical contract tool runner |
|
|
66
|
+
| `stitchkit/tools/connections` | server (Bun or Node) | evolving<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.127.0_ | consume external MCP servers and a bounded OpenAPI subset — typed reauthorization, a per-request host fence and per-call credentials |
|
|
67
|
+
| `stitchkit/cli` | server | stable<br>_redefined in 12 of the 42 minors since 0.94.0, most recently 0.128.0_ | `createCli` / `createCliInvoker` — runtime and strict NodeNext declarations without MCP SDK / `ai` |
|
|
68
|
+
| `stitchkit/cli/publish` | build and release tooling (Bun or Node, POSIX) | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | `publishCli` — commit a verified CLI distribution and move its public manifest last; see [CLI guide](cli.md#publishing-a-complete-version) |
|
|
69
|
+
| `stitchkit/remote` | browser **and** server | stable<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.104.0_ | peer-free `implementRemote` for thin HTTP proxy processes |
|
|
70
|
+
| `stitchkit/process` | server (Bun or Node, POSIX) | evolving<br>_redefined in 4 of the 42 minors since 0.94.0, most recently 0.133.0_ | finite native commands, byte sinks, bounded capture, process-group cancellation and opt-in Linux/Darwin owner-loss cleanup; contract operations executed in one-call child processes |
|
|
71
|
+
| `stitchkit/process/bootstrap` | bundled server entry (Bun, POSIX) | evolving<br>_redefined in 0 of the 3 minors since 0.133.0_ | narrow bootstrap that keeps the process runner lazy while carrying the package's own invocations — the owner-loss guard and the process root of launched work — in a single-file bundle |
|
|
72
|
+
| `stitchkit/files/packaging` | build time (Bun or Node) | evolving<br>_redefined in 4 of the 42 minors since 0.94.0, most recently 0.133.0_ | installed native asset graph, integrity, Bun packaging plugin and the artifact loader check; a client bundled into one self-contained, hashed file; a typed client built into a proven npm package with several entries, declarations and external peers; no runtime install policy |
|
|
73
|
+
| `stitchkit/files` | server (Bun or Node) | stable<br>_redefined in 5 of the 42 minors since 0.94.0, most recently 0.133.0_ | peer-free managed local-file boundary |
|
|
74
|
+
| `stitchkit/spend` | server (Bun or Node) | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | peer-free spend gateway for paid model APIs: the attempt recorded before the call and closed on every outcome, credentials only for the provider's origin, a spooled ledger, rank-merged receipts and a reconciler |
|
|
75
|
+
| `stitchkit/spend/testing` | tests on Bun or Node | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | the coverage guard: red on a model SDK import, a provider key or a provider host outside the gateway files |
|
|
76
|
+
| `stitchkit/service-host` | server (Bun or Node) | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | peer-free host service supervision — verified versioned artifact activation, Linux `systemd` and macOS `launchd` units (`plutil`, `bootout`/`bootstrap`, rollback), live process/Unix-socket identity verification, and an in-process config-watched reloader |
|
|
77
|
+
| `stitchkit/service-host/macos` | server (Bun or Node, macOS) | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | peer-free macOS daemon bundle toolkit — fail-closed Developer ID `codesign`, strict C11 launcher `.app` bundles with atomic `RENAME_SWAP` install/rollback, Apple 824×824 squircle `AppIcon.icns`, streaming `lsregister` maintenance, and TCC responsibility inspection |
|
|
78
|
+
| `stitchkit/service-host/work` | server (Bun or Node; Linux with systemd ≥ 254, or a process root on Linux and macOS) | evolving<br>_redefined in 0 of the 3 minors since 0.133.0_ | peer-free launch of work in its own boundary with a declared owner — a transient systemd scope or a recorded process root, the typed owner record, the one inherited variable that names the boundary, and the membership check that asks the boundary; see [native I/O](native-io.md#work-in-its-own-boundary) |
|
|
79
|
+
| `stitchkit/telegram` | server (Bun or Node) | evolving<br>_redefined in 8 of the 42 minors since 0.94.0, most recently 0.127.0_ | peer-free Telegram platform primitives — Mini App `initData` verification, widget limits and the `widget_query` and widget message schemas, send-failure classification, one outbound budget per bot token with weighted albums and per-chat 429 pauses, resumable broadcasts, the operator channel with dedupe, a Bot API transport that separates a request that never left from an unknown outcome, local Bot API files, the waveform of a voice message read from its PCM, webhook ownership and durable webhook update intake |
|
|
80
|
+
| `stitchkit/telegram/grammy` | server (Bun or Node) | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | the token's outbound budget as one grammY client transformer — a 429 that comes back as a response pauses its chat, and a cancelled wait is a request that never left; the widget methods over the same client |
|
|
81
|
+
| `stitchkit/telegram/html` | browser and server | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | Telegram's HTML as a tree — compile GFM Markdown to Telegram HTML with fence-aware splitting, clean any markup to what Telegram accepts, cut long text into valid parts by what the reader sees, check markup before it is sent |
|
|
82
|
+
| `stitchkit/telegram/voice` | browser and server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | the waveform of a voice message as one format — packed for `sendVoice` the way Telegram Desktop scales it, unpacked to draw it, a `getMe` read of whether the server takes it |
|
|
83
|
+
| `stitchkit/telegram/screens` | server (Bun or Node) | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | a bot's menus as declared screens over grammY — typed paths, actions and input, message reconciliation, state in any `StorageAdapter`, a test chat |
|
|
84
|
+
| `stitchkit/tracking` | browser **and** server | evolving<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.127.0_ | visitor-tracking mechanics — `createTrackingClient`, the tab-shared outbox, the page-leave beacon, attribution, the contract factory; no event vocabulary, no React |
|
|
85
|
+
| `stitchkit/tracking/contract` | browser **and** server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | the wire shapes — the contract factory, event and visit schemas, the performance sample and its trust threshold; brings `zod` |
|
|
86
|
+
| `stitchkit/tracking/performance` | browser **and** server | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | Web Vitals from real visitors, collected after load through the optional peer `web-vitals`; no `zod` |
|
|
87
|
+
| `stitchkit/tracking/server` | server (Bun or Node) | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | the decisions a tracking backend makes — dispositions, visit lease over an application-owned store, active intervals, presence; no database |
|
|
88
|
+
| `stitchkit/release` | browser **and** server | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | a page follows the release it was built for — `createReleaseMarker` on the server, `createReleaseWatcher` in the browser, the `X-Build-Id` header and a socket event between them |
|
|
89
|
+
| `stitchkit/voice` | browser **and** server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | the mechanics of a live voice reply — `SentenceCutter`, `speakableText`, a `SpeechQueue` that synthesises ahead and stops on interruption, the conversation phases |
|
|
90
|
+
| `stitchkit/sync` | browser **and** server | evolving<br>_redefined in 1 of the 9 minors since 0.127.0, most recently 0.132.0_ | the client half of an offline-first sync — which outbox rows leave next, pending edits on top of remote rows, deletes that win until acknowledged, the cursor session, the push and page wire with an open outcome vocabulary; no driver, runs in Hermes |
|
|
91
|
+
| `stitchkit/sync/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | the server half — versions that commit in order, a ledger that runs each change once, a feed of what changed, inside the app's own transaction; a memory store and `checkSyncStore` |
|
|
92
|
+
| `stitchkit/geo` | server (Bun or Node) | evolving<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.127.0_ | managed GeoIP reader generations, last-known-good reload and the optional MaxMind adapter |
|
|
93
|
+
| `stitchkit/geo/contract` | browser **and** server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | the place snapshot schema, for a shared contract that stores or sends `GeoAttribution`; brings `zod` |
|
|
94
|
+
| `stitchkit/xlsx` | browser **and** server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | a workbook from rows and typed columns, with no dependency; text never runs as a formula |
|
|
95
|
+
| `stitchkit/oauth` | browser **and** server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
|
|
96
|
+
| `stitchkit/google` | server (Bun or Node) | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | optional Google code exchange and verified OIDC identity adapter |
|
|
97
|
+
| `stitchkit/observability` | server | stable<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
|
|
98
|
+
| `stitchkit/testing` | tests on Bun or Node | stable<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.127.0_ | in-process generated clients over a real Fetch handler, the managed-resource conformance kit and manual time for schedules and retries |
|
|
99
|
+
| `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.128.0_ | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
|
|
100
|
+
| `stitchkit/react` | browser + server rendering | stable<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.127.0_ | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
|
|
101
|
+
| `stitchkit/react/keyboard` | browser | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.115.0_ | which part of a screen gets a key — ordered layers, one Escape per level, list zones with real focus; see [keyboard guide](keyboard.md) |
|
|
102
|
+
| `stitchkit/react/keyboard/testing` | server (Bun or Node) | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | the keyboard layers and zones without a DOM — fakes for the window, elements and key events beside the two engines, to test the order of layers, `scope`/`inert` and the edges of a zone in milliseconds |
|
|
103
|
+
| `stitchkit/agent-runtime` | server | evolving<br>_redefined in 11 of the 42 minors since 0.94.0, most recently 0.135.0_ | peer-free durable conversation/run loop over `AgentModelDriver`, stateless `completeText`/`completeObject`, driver composition, history, models, prompts, fencing and events |
|
|
104
|
+
| `stitchkit/agent-runtime/sandbox` | server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | optional Linux Bubblewrap sessions, long-lived OS process sandboxes (`createProcessSandbox`, `probeProcessSandbox`, `buildSeatbeltProfile`), durable workspaces and a host HTTP credential gateway; see [sandbox guide](sandbox.md) |
|
|
105
|
+
| `stitchkit/agent-runtime/testing` | tests on Bun or Node | evolving<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.134.0_ | peer-free `createScriptedModelDriver`, credential-free replay, scripted provider faults, deterministic race controls and the agent-store conformance kit |
|
|
106
|
+
| `stitchkit/agent-runtime/harness` | server | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.134.0_ | peer-free resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
|
|
107
|
+
| `stitchkit/agent-runtime/coding-tools` | server (Bun or Node) | evolving<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.127.0_ | bounded host-authorized direct file and shell tools; a root boundary, not an OS sandbox |
|
|
108
|
+
| `stitchkit/agent-runtime/openrouter` | server | evolving<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.135.0_ | peer-free native OpenRouter Chat Completions SSE driver, catalog, admission, route pinning and spend reconciliation |
|
|
109
|
+
| `stitchkit/agent-runtime/openai` | server | evolving<br>_redefined in 0 of the 2 minors since 0.134.0_ | peer-free native OpenAI Responses API (`POST /v1/responses`) driver, policy schemas and provenance-aware usage normalization |
|
|
110
|
+
| `stitchkit/agent-runtime/anthropic` | server | evolving<br>_redefined in 0 of the 2 minors since 0.134.0_ | peer-free native Anthropic Messages API (`POST /v1/messages`) driver, thinking/cache policy schemas and provenance-aware usage normalization |
|
|
111
|
+
| `stitchkit/agent-runtime/ai-sdk` | server | evolving<br>_redefined in 0 of the 2 minors since 0.134.0_ | thin optional-peer adapter (`fromAiSdkModel`, `fromAiSdkTools`) bridging AI SDK (`LanguageModelV4` from `ai@7`) models and `ToolSet`s onto `AgentModelDriver` and `AgentToolSet`; requires `ai` |
|
|
112
|
+
| `stitchkit/agent-runtime/browser` | browser + server | evolving<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.127.0_ | canonical agent records, events, reconnect cursor, interactive approval/input/permission-mode/host-status state (`deriveAgentConversationActivity`, `deriveAgentConversationState`, `delivery: 'unknown'` reconciliation) and optional conversation controller |
|
|
113
|
+
| `stitchkit/agent-runtime/react` | browser + server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | React subscription to an application-owned agent controller |
|
|
114
|
+
| `stitchkit/agent-runtime/realtime` | server (Bun or Node) | evolving<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.127.0_ | authorized agent control over the existing Socket.IO server |
|
|
115
|
+
| `stitchkit/agent-executor` | server (Bun or Node) | evolving<br>_redefined in 4 of the 9 minors since 0.127.0, most recently 0.133.0_ | the executor ↔ server contract for external coding agents (Claude Code, Codex, ACP): delta vocabulary (including `ExecutorPlanDelta`) over the shared message parts, thread leases with a fence, turn phases and their reports |
|
|
116
|
+
| `stitchkit/agent-executor/claude` | server (Bun or Node) | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | the Claude Code driver: the unmodified CLI over `stream-json`, permission requests answered by the host, reconcile by the input's id in the profile's transcript |
|
|
117
|
+
| `stitchkit/agent-executor/claude-sdk` | server (Bun or Node) | evolving<br>_redefined in 1 of the 9 minors since 0.127.0, most recently 0.131.0_ | Claude through the Agent SDK: the application's `query` (optional peer `@anthropic-ai/claude-agent-sdk`), the CLI's classifier, `canUseTool` asked of the host |
|
|
118
|
+
| `stitchkit/agent-executor/acp` | server (Bun or Node) | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | an Agent Client Protocol v1 agent over stdio: settings by category, images, MCP servers, tool metadata (`title`/`kind`/`locations`), meaningful `tool_call_update` progress updates, typed `plan` deltas, `session/resume`/`load`/`list`, `session/cancel`; no reconcile |
|
|
119
|
+
| `stitchkit/agent-executor/codex` | server (Bun or Node) | evolving<br>_redefined in 3 of the 9 minors since 0.127.0, most recently 0.133.0_ | the Codex driver: `codex app-server` over stdio or Unix-socket WebSocket (`unix-listen` / `unix-connect`), thread policy and live controls, approval and input requests answered by the host, unknown server requests refused, reconcile by the client id in `thread/turns/list` |
|
|
120
|
+
| `stitchkit/agent-executor/testing` | server (Bun or Node) | evolving<br>_redefined in 1 of the 9 minors since 0.127.0, most recently 0.133.0_ | the engine conformance kit, deterministic replay driver, portable fake Codex app-server, fail-loud consumer stub factories, and schema-validated test fixtures; no optional peer |
|
|
121
|
+
| `stitchkit/agent-executor/testing/claude-sdk` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.133.0_ | the multi-turn fake Claude SDK query harness and the Claude SDK session stub, typed by the optional peer `@anthropic-ai/claude-agent-sdk` |
|
|
122
|
+
| `stitchkit/agent-runtime/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | the agent store, conversation reader and companion host on Postgres, over the application's own client (Bun SQL, Prisma, `pg`) |
|
|
123
|
+
| `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | durable built-in SQLite store for the agent runtime |
|
|
124
|
+
| `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | durable built-in SQLite store for the agent runtime |
|
|
125
125
|
| `stitchkit-tui` | terminal (Bun) | evolving | optional official OpenTUI host over a caller-composed headless runtime |
|
|
126
|
-
| `stitchkit/application` | browser + server | evolving<br>_redefined in 9 of the
|
|
127
|
-
| `stitchkit/application/grammy` | server | evolving<br>_redefined in 0 of the
|
|
128
|
-
| `stitchkit/application/opentelemetry` | server | evolving<br>_redefined in 0 of the
|
|
129
|
-
| `stitchkit/application/diagnostic-journal` | server | evolving<br>_redefined in 3 of the
|
|
130
|
-
| `stitchkit/application/directory-inbox` | server | evolving<br>_redefined in 0 of the
|
|
126
|
+
| `stitchkit/application` | browser + server | evolving<br>_redefined in 9 of the 42 minors since 0.94.0, most recently 0.127.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
|
|
127
|
+
| `stitchkit/application/grammy` | server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
|
|
128
|
+
| `stitchkit/application/opentelemetry` | server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | maps application snapshots onto an injected OpenTelemetry `Meter` |
|
|
129
|
+
| `stitchkit/application/diagnostic-journal` | server | evolving<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.127.0_ | the local diagnostic journal — an exclusive bounded writer and snapshot reader with explicit anomalies |
|
|
130
|
+
| `stitchkit/application/directory-inbox` | server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | the directory inbox — entries another program drops into a directory, delivered to the application at least once |
|
|
131
131
|
|
|
132
132
|
Rule of thumb: browser code imports `stitchkit` and `stitchkit/react`; server
|
|
133
133
|
code adds `stitchkit/server` (or `stitchkit/node` on Node) and opts into
|
|
@@ -228,7 +228,7 @@ map — feature → packages:
|
|
|
228
228
|
| Tool layer — registry, tool names, runtime tools (`stitchkit/tools`) | — |
|
|
229
229
|
| MCP server (`stitchkit/tools/mcp`) | `@modelcontextprotocol/server` |
|
|
230
230
|
| AI SDK agent tools (`stitchkit/tools/agent`) | `ai` |
|
|
231
|
-
|
|
|
231
|
+
| Context-pinned tool mounts (`stitchkit/tools/toolkit`) | `@modelcontextprotocol/server` |
|
|
232
232
|
| Agent application runtime (`stitchkit/agent-runtime`) | — (peer-free) |
|
|
233
233
|
| Headless Agent harness (`stitchkit/agent-runtime/harness`) | — (peer-free) |
|
|
234
234
|
| Agent coding tools (`stitchkit/agent-runtime/coding-tools`) | — (peer-free) |
|
|
@@ -270,11 +270,11 @@ and install command. Static entrypoints such as `stitchkit/tools/mcp` fail durin
|
|
|
270
270
|
ESM resolution by naming the exact missing package; the feature-to-peer matrix
|
|
271
271
|
below is the canonical install command.
|
|
272
272
|
|
|
273
|
-
`stitchkit/tools` itself loads no optional peer
|
|
274
|
-
|
|
273
|
+
`stitchkit/tools` itself loads no optional peer, and `stitchkit/tools/toolkit`
|
|
274
|
+
stays free of `ai` (ADR 0338). Install only the peer of the adapter you import:
|
|
275
275
|
|
|
276
276
|
```bash
|
|
277
|
-
bun add @modelcontextprotocol/server@^2 # stitchkit/tools/mcp
|
|
277
|
+
bun add @modelcontextprotocol/server@^2 # stitchkit/tools/mcp or stitchkit/tools/toolkit
|
|
278
278
|
bun add ai@^7 # stitchkit/tools/agent or stitchkit/agent-runtime/ai-sdk
|
|
279
279
|
```
|
|
280
280
|
|
|
@@ -865,7 +865,7 @@ export const users = defineContract({ prefix: 'users' }, {
|
|
|
865
865
|
`HEAD` is an explicit HTTP-only operation, never an automatic alias for `GET`.
|
|
866
866
|
It must declare `rawResponse: true`; request body, `input`, multipart, `rawBody`,
|
|
867
867
|
typed `output` and tool exposure are rejected. The handler owns status and
|
|
868
|
-
headers, while
|
|
868
|
+
headers, while StitchKit guarantees an empty wire body even if the returned
|
|
869
869
|
`Response` accidentally contains one.
|
|
870
870
|
|
|
871
871
|
## `params` vs `input` vs `output`
|
|
@@ -1343,9 +1343,11 @@ which. Anything an auth hook attaches (e.g. the resolved user) is also on `ctx`.
|
|
|
1343
1343
|
|
|
1344
1344
|
### Inbound deadline budgets
|
|
1345
1345
|
|
|
1346
|
-
When an HTTP caller
|
|
1347
|
-
`createHttpClient({ propagateDeadline: true })`,
|
|
1348
|
-
`
|
|
1346
|
+
When an HTTP caller explicitly opts into sending its relative remaining budget in
|
|
1347
|
+
`x-stitchkit-timeout-ms` (via `createHttpClient({ propagateDeadline: true })`,
|
|
1348
|
+
`createClient(contract, { baseUrl, propagateDeadline: true })`, or per-call
|
|
1349
|
+
`withOptions(..., { propagateDeadline: true })` — propagation defaults to `false` and is never
|
|
1350
|
+
auto-enabled by `timeout` or a contract endpoint's `timeout`, → ADR 0337):
|
|
1349
1351
|
|
|
1350
1352
|
- `createHandler` / `createServer` clamps the inbound budget to the endpoint's declared `timeout`
|
|
1351
1353
|
(a caller can narrow its budget, never extend it past the server's own ceiling).
|
|
@@ -1353,11 +1355,19 @@ When an HTTP caller sends a relative remaining budget in `x-stitchkit-timeout-ms
|
|
|
1353
1355
|
`401`/`403`; an inbound value of `0` then fails immediately with `REQUEST_TIMEOUT` (`408`) before
|
|
1354
1356
|
payload parsing, `beforeHandle`, or the handler runs. Malformed non-integer values are ignored so
|
|
1355
1357
|
the endpoint's declared timeout remains authoritative.
|
|
1358
|
+
- For a streaming endpoint (`stream: { ... }`), `timeout` and `x-stitchkit-timeout-ms` bound only
|
|
1359
|
+
the response-open phase until the handler returns its `AsyncIterable` (matching the client's open
|
|
1360
|
+
timeout). Once the stream opens, the open deadline timer is disarmed, `ctx.signal` stays bound to
|
|
1361
|
+
client disconnect (`req.signal`), managed shutdown, and `stream.lifetimeMs`, and
|
|
1362
|
+
`ctx.remainingTimeoutMs` switches to `stream.lifetimeMs` (or `undefined` when unbounded). The same
|
|
1363
|
+
open-phase boundary applies to a `rawResponse: true` endpoint returning a `Response` with a body:
|
|
1364
|
+
the open timer is disarmed once the `Response` is returned while `ctx.signal` stays subscribed to
|
|
1365
|
+
client disconnect (`req.signal`).
|
|
1356
1366
|
- Inside the handler, `ctx.remainingTimeoutMs?.(reserveMs?)` returns the live remaining integer
|
|
1357
1367
|
milliseconds (clamped to `>= 0`, subtracting optional `reserveMs` for response serialization), or
|
|
1358
1368
|
`undefined` when neither an inbound header nor an endpoint `timeout` bounds the request. Always
|
|
1359
|
-
check `remaining <= 0` before forwarding `{ timeout: remaining }` so an
|
|
1360
|
-
`408` instead of throwing a `RangeError` from timer validation:
|
|
1369
|
+
check `remaining <= 0` before forwarding `{ timeout: remaining, propagateDeadline: true }` so an
|
|
1370
|
+
exhausted budget fails with `408` instead of throwing a `RangeError` from timer validation:
|
|
1361
1371
|
|
|
1362
1372
|
```ts
|
|
1363
1373
|
const remaining = ctx.remainingTimeoutMs?.(200)
|
|
@@ -1367,7 +1377,9 @@ if (remaining !== undefined && remaining <= 0) {
|
|
|
1367
1377
|
message: 'Request deadline budget exhausted',
|
|
1368
1378
|
})
|
|
1369
1379
|
}
|
|
1370
|
-
await downstream.list.withOptions(
|
|
1380
|
+
await downstream.list.withOptions(
|
|
1381
|
+
remaining !== undefined ? { timeout: remaining, propagateDeadline: true } : {},
|
|
1382
|
+
)
|
|
1371
1383
|
```
|
|
1372
1384
|
|
|
1373
1385
|
### Request attributes from the ingress
|
|
@@ -1620,7 +1632,7 @@ server. See [Testing & deployment](./testing-and-deployment.md).
|
|
|
1620
1632
|
| `traceId` | override per-request trace-id resolution — may return `undefined` to fall back |
|
|
1621
1633
|
| `wrapFetch` | compose wrappers around the finished handler (request context, audit) |
|
|
1622
1634
|
| `proxyOrigin` | Bun TCP ingress policy: `{ trustedPeer(socketIp) }` restores the external scheme before all composition; independent of client-IP `trustProxy` |
|
|
1623
|
-
| `socket` | full
|
|
1635
|
+
| `socket` | full StitchKit Socket.IO handle; route, default WebSocket handler and shutdown are mounted once |
|
|
1624
1636
|
| `websocket` | custom Bun WebSocket handler; with `socket`, this is the explicit composed handler |
|
|
1625
1637
|
| `development` / `bun` | passthrough to `Bun.serve` |
|
|
1626
1638
|
|
|
@@ -1827,7 +1839,7 @@ when forwarding to owned streaming routes; it is also required by native timeout
|
|
|
1827
1839
|
|
|
1828
1840
|
### Trusted HTTPS in development
|
|
1829
1841
|
|
|
1830
|
-
|
|
1842
|
+
StitchKit does not own local certificate generation or a frontend development
|
|
1831
1843
|
server. When a device or browser feature requires a secure context, generate a
|
|
1832
1844
|
trusted certificate outside the application (for example with `mkcert`) and pass
|
|
1833
1845
|
its files through the Bun server boundary:
|
|
@@ -1892,7 +1904,7 @@ request-error recorder; an `AbortError` while the request signal is still active
|
|
|
1892
1904
|
remains an internal failure. A runtime abort reason may be preserved by identity
|
|
1893
1905
|
through at most eight cycle-safe standard `cause` links; error messages and codes
|
|
1894
1906
|
are never classifiers. The same rule applies when the disconnect happens while
|
|
1895
|
-
|
|
1907
|
+
StitchKit is reading a JSON upload body: bounded reads race every pending stream
|
|
1896
1908
|
read against the request signal and never parse a cancelled partial body. `499`
|
|
1897
1909
|
is transport telemetry, not a response declared in the contract or generated
|
|
1898
1910
|
OpenAPI document.
|
|
@@ -2094,7 +2106,7 @@ That split is deliberate — see [ADR 0003](../decisions/0003-two-context-types.
|
|
|
2094
2106
|
|
|
2095
2107
|
## A host beside its own window
|
|
2096
2108
|
|
|
2097
|
-
A desktop app's host — the process beside its window — is an ordinary
|
|
2109
|
+
A desktop app's host — the process beside its window — is an ordinary StitchKit server, bound to
|
|
2098
2110
|
loopback. Calls are plain HTTP through the typed client; events travel the realtime socket with
|
|
2099
2111
|
`retain` per topic ([realtime](./realtime.md)). There is no second transport to learn.
|
|
2100
2112
|
|
|
@@ -2198,7 +2210,7 @@ Trust boundary and operational rules for the unix channel:
|
|
|
2198
2210
|
container and keep the full UTF-8 path within 103 bytes; TCC permissions remain bound to the host
|
|
2199
2211
|
process's responsible bundle.
|
|
2200
2212
|
- **Embedded agents and shell tools.** An unsandboxed agent shell running as the same OS user has full
|
|
2201
|
-
access to the socket. Inside
|
|
2213
|
+
access to the socket. Inside StitchKit's Linux Bubblewrap sandbox (`stitchkit/agent-runtime/sandbox`),
|
|
2202
2214
|
the host's `$HOME`, `/tmp`, `/run` and `XDG_RUNTIME_DIR` are not mounted (`--unshare-all --clearenv`),
|
|
2203
2215
|
so keep the socket outside the agent's mounted `workspace` directory (note that macOS has no
|
|
2204
2216
|
Bubblewrap isolation).
|
|
@@ -2589,7 +2601,7 @@ createServer({
|
|
|
2589
2601
|
`serviceName` and `action` are optional observability identity. Declare
|
|
2590
2602
|
`serviceName` when audit, logging, sampling or another cross-cutting policy
|
|
2591
2603
|
groups this raw route with a service; add `action` when the policy needs an
|
|
2592
|
-
operation within that service.
|
|
2604
|
+
operation within that service. StitchKit never derives either from `path`.
|
|
2593
2605
|
`action` without `serviceName`, and empty identity strings, fail at startup.
|
|
2594
2606
|
|
|
2595
2607
|
A path may be exact, carry `:param` segments, or end in `/*filePath` for a prefix
|
|
@@ -2598,7 +2610,7 @@ wildcard — and the two combine: `/app/:slug/*filePath` matches `/app/x/a/b` wi
|
|
|
2598
2610
|
deep-link fallback). List more specific routes before the wildcard — the first
|
|
2599
2611
|
match wins. `staticRoute()` builds a raw route that serves a directory.
|
|
2600
2612
|
|
|
2601
|
-
At startup
|
|
2613
|
+
At startup StitchKit rejects exact duplicates, equivalent parameter shapes
|
|
2602
2614
|
(`/users/:id` vs `/users/:userId`) and any later raw route completely hidden by
|
|
2603
2615
|
an earlier raw route. Partial overlap stays legal, including the recommended
|
|
2604
2616
|
specific-before-wildcard order. `GET` and `HEAD` remain independent because that
|
|
@@ -2903,7 +2915,7 @@ them.
|
|
|
2903
2915
|
|
|
2904
2916
|
For large files, set `delivery: 'stream'` and define receivers. A receiver gets
|
|
2905
2917
|
a Web `ReadableStream<Uint8Array>` and writes directly to consumer-owned
|
|
2906
|
-
storage;
|
|
2918
|
+
storage; StitchKit holds only bounded parser state:
|
|
2907
2919
|
|
|
2908
2920
|
```ts
|
|
2909
2921
|
const streamingUploads = defineContract({ prefix: 'uploads' }, {
|
|
@@ -3004,12 +3016,12 @@ createServer({ services: [users, orders], rawRoutes: [openApiRoute('/openapi.jso
|
|
|
3004
3016
|
Only HTTP-exposed methods appear (an MCP/agent-only tool is skipped).
|
|
3005
3017
|
|
|
3006
3018
|
OpenAPI 3.1 has no standard multi-segment path parameter. For a contract path
|
|
3007
|
-
ending in a named wildcard such as `/*filePath`,
|
|
3019
|
+
ending in a named wildcard such as `/*filePath`, StitchKit keeps the literal
|
|
3008
3020
|
runtime path, omits `filePath` from the
|
|
3009
3021
|
standard `in: path` parameter list, and emits
|
|
3010
3022
|
`x-stitchkit-trailing-wildcard` on the operation with its parameter name,
|
|
3011
3023
|
schema and semantics. A generic OpenAPI client therefore cannot invent
|
|
3012
|
-
catch-all expansion; use
|
|
3024
|
+
catch-all expansion; use StitchKit's typed client or teach the generator that
|
|
3013
3025
|
extension.
|
|
3014
3026
|
|
|
3015
3027
|
### Curating the spec — `includeMethod`
|
|
@@ -3139,7 +3151,7 @@ without repeating transport configuration.
|
|
|
3139
3151
|
| `suppressUnauthorizedFor` | `[]` | exact contract-derived operation matchers whose expected 401 does not emit `unauthorized` |
|
|
3140
3152
|
| `parseError` | built-in | map an error body to `{ code, message, details, hint }` |
|
|
3141
3153
|
| `trace` | `false` | emit a W3C `traceparent` header on every request |
|
|
3142
|
-
| `propagateDeadline` | `false`
|
|
3154
|
+
| `propagateDeadline` | `false` | explicitly opt into emitting the relative `x-stitchkit-timeout-ms` remaining budget header on outbound requests (never auto-enabled by `timeout` or contract `endpoint.timeout`) |
|
|
3143
3155
|
| `unix` | — | dial a unix domain socket instead of TCP (Bun only, see below) |
|
|
3144
3156
|
|
|
3145
3157
|
`headers` as a function is the hook for runtime tokens — a bearer token or any
|
|
@@ -3211,7 +3223,7 @@ pauses its socket, and resuming preserves the exact chunked body.
|
|
|
3211
3223
|
|
|
3212
3224
|
`UnixClientTransportError` carries a stable `code` and `delivery`:
|
|
3213
3225
|
`not-dispatched`, `possibly-dispatched` or `response-received`. Only the first
|
|
3214
|
-
proves that the remote operation did not begin;
|
|
3226
|
+
proves that the remote operation did not begin; StitchKit never silently retries
|
|
3215
3227
|
an ambiguous write. Response consumption/cancellation belongs to the operation,
|
|
3216
3228
|
and `close()` interrupts active work and destroys owned connections.
|
|
3217
3229
|
|
|
@@ -3273,7 +3285,7 @@ attempt, so the default `2` permits at most three total attempts. The default
|
|
|
3273
3285
|
|
|
3274
3286
|
Inside Next.js 16 server rendering, the first attempt still uses Next's normal
|
|
3275
3287
|
request memoization. If Ky authorizes a retry after a network rejection,
|
|
3276
|
-
|
|
3288
|
+
StitchKit passes that retry's current `Request.signal` in the second fetch
|
|
3277
3289
|
argument and materializes the current Request as URL + init. Next 16.3 otherwise
|
|
3278
3290
|
merges `init` into a Request before its dedupe layer and loses the explicit
|
|
3279
3291
|
signal opt-out. The retry therefore performs a new network attempt instead of
|
|
@@ -3390,7 +3402,7 @@ contract:
|
|
|
3390
3402
|
Every endpoint callable exposes a `withOptions` method accepting required
|
|
3391
3403
|
`ClientRequestOptions`. The ordinary callable contains only contract arguments,
|
|
3392
3404
|
so it can be passed directly to callback APIs such as `react-query-kit` without
|
|
3393
|
-
mistaking their callback context for
|
|
3405
|
+
mistaking their callback context for StitchKit transport options.
|
|
3394
3406
|
|
|
3395
3407
|
**That safety has a cost worth knowing before it bites you.** `api.thing(args,
|
|
3396
3408
|
{ signal })` — the shape everyone reaches for first — is not an error: the second
|
|
@@ -3472,24 +3484,31 @@ await api.health.withOptions({ signal: controller.signal })
|
|
|
3472
3484
|
|
|
3473
3485
|
### Deadline budget propagation
|
|
3474
3486
|
|
|
3475
|
-
To avoid wasted work after a caller gives up, the client can
|
|
3476
|
-
a relative integer millisecond header (`x-stitchkit-timeout-ms`,
|
|
3487
|
+
To avoid wasted work after a caller gives up, the client can opt into sending its remaining
|
|
3488
|
+
monotonic budget as a relative integer millisecond header (`x-stitchkit-timeout-ms`,
|
|
3489
|
+
`DEADLINE_BUDGET_HEADER`):
|
|
3477
3490
|
|
|
3478
3491
|
```ts
|
|
3492
|
+
// Client-wide opt-in (applies to every call unless overridden with `propagateDeadline: false`):
|
|
3479
3493
|
const http = createHttpClient({ baseUrl: '/api', propagateDeadline: true })
|
|
3480
|
-
// In createClient, an endpoint's declared `timeout` and per-call `timeout` both propagate
|
|
3481
|
-
// automatically unless `propagateDeadline: false` is passed:
|
|
3482
3494
|
await api.reports.generate.withOptions({ id }, { timeout: 5_000 })
|
|
3483
3495
|
await api.reports.generate.withOptions({ id }, { timeout: 5_000, propagateDeadline: false })
|
|
3496
|
+
|
|
3497
|
+
// Or opt in on a single call when the client keeps the default `propagateDeadline: false`:
|
|
3498
|
+
await api.reports.generate.withOptions({ id }, { timeout: 5_000, propagateDeadline: true })
|
|
3484
3499
|
```
|
|
3485
3500
|
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
`
|
|
3492
|
-
|
|
3501
|
+
Deadline propagation is **explicit opt-in** (`false` by default) in both `createHttpClient` and
|
|
3502
|
+
`createClient` (→ ADR 0337). Setting `config.timeout`, a contract endpoint's `timeout`, or a
|
|
3503
|
+
per-call `timeout` bounds only the local client deadline and never adds `x-stitchkit-timeout-ms`
|
|
3504
|
+
on the wire (avoiding unexpected CORS preflights against third-party origins or custom allowlists).
|
|
3505
|
+
Precedence is symmetric across both client transports:
|
|
3506
|
+
`options.propagateDeadline ?? config.propagateDeadline ?? false`. When enabled, each transport
|
|
3507
|
+
retry recomputes the remaining budget before sending instead of replaying the original full
|
|
3508
|
+
timeout. When an explicit `x-stitchkit-timeout-ms` header is already set on the request, the
|
|
3509
|
+
client preserves it. On the server, `createHandler` / `createServer` clamps that budget against
|
|
3510
|
+
the endpoint's declared `timeout` and exposes `ctx.remainingTimeoutMs?.(reserveMs?)` (see
|
|
3511
|
+
[HTTP server](./server.md#inbound-deadline-budgets)).
|
|
3493
3512
|
|
|
3494
3513
|
### Upload progress
|
|
3495
3514
|
|
|
@@ -3886,7 +3905,7 @@ try {
|
|
|
3886
3905
|
|
|
3887
3906
|
`traceId` is present when the server returned `x-request-id`. A network error,
|
|
3888
3907
|
timeout or abort without an HTTP response cannot carry one. Cross-origin
|
|
3889
|
-
browser code can read it through
|
|
3908
|
+
browser code can read it through StitchKit's default CORS expose list; a custom
|
|
3890
3909
|
`cors.exposeHeaders` policy must keep `x-request-id` exposed.
|
|
3891
3910
|
|
|
3892
3911
|
The error model is shared with the server — see [Auth & errors](./auth-and-errors.md).
|
|
@@ -3979,7 +3998,7 @@ if (server === undefined) {
|
|
|
3979
3998
|
}
|
|
3980
3999
|
```
|
|
3981
4000
|
|
|
3982
|
-
Both fingerprints arrive as a value; a difference never throws.
|
|
4001
|
+
Both fingerprints arrive as a value; a difference never throws. StitchKit
|
|
3983
4002
|
computes the two identities and compares nothing — what a mismatch means is the
|
|
3984
4003
|
application's decision. The client's fingerprint is computed locally and is not
|
|
3985
4004
|
sent to the server. The identity operation is public and lists operation names,
|
|
@@ -4742,7 +4761,7 @@ load balancing therefore cannot strand a client on an in-memory session.
|
|
|
4742
4761
|
The default `legacy: 'serve'` lets the official SDK negotiate either modern
|
|
4743
4762
|
`2026-07-28` or the supported legacy stateless opening on this same endpoint.
|
|
4744
4763
|
Set `legacy: 'reject'` when every host is modern. Legacy support is protocol
|
|
4745
|
-
translation inside the SDK, not a second
|
|
4764
|
+
translation inside the SDK, not a second StitchKit transport or compatibility
|
|
4746
4765
|
API. Stateful MCP and subscriptions are intentionally outside this layer.
|
|
4747
4766
|
|
|
4748
4767
|
`createMcpHttpRoute` is the framework-owned raw-route adapter. It registers
|
|
@@ -4761,7 +4780,7 @@ must not be used as authorization input.
|
|
|
4761
4780
|
|
|
4762
4781
|
### Modern discovery, routing and cache hints
|
|
4763
4782
|
|
|
4764
|
-
|
|
4783
|
+
StitchKit forwards the negotiated protocol era and validated MCP request data
|
|
4765
4784
|
to both `RequestEvent.mcp` and the current managed call's typed `context.mcp`;
|
|
4766
4785
|
untrusted routing headers never become application identity. The SDK validates
|
|
4767
4786
|
`MCP-Protocol-Version`, JSON-RPC shape and routing
|
|
@@ -4776,7 +4795,7 @@ means zero/private: neither a prepared surface nor a deterministic response is
|
|
|
4776
4795
|
silently treated as public. Unbounded auth-selected surface factories are
|
|
4777
4796
|
always forced to zero/private even when an operation policy is present; use a
|
|
4778
4797
|
finite `surfaces` registry when identities share a provably immutable surface.
|
|
4779
|
-
|
|
4798
|
+
StitchKit never advertises list-change or subscription capabilities
|
|
4780
4799
|
without an implementation.
|
|
4781
4800
|
|
|
4782
4801
|
### Knowing your catalog is stale — the catalog stamp
|
|
@@ -5106,7 +5125,7 @@ expiry-checked. Tampered, expired, cross-user or cross-tool state fails before
|
|
|
5106
5125
|
the side effect. Output validation applies only to the final result.
|
|
5107
5126
|
|
|
5108
5127
|
Every attempt re-runs auth/lifecycle and emits its own tool hooks; audit metadata
|
|
5109
|
-
contains the attempt's `mcp.outcome` and `mcp.round`.
|
|
5128
|
+
contains the attempt's `mcp.outcome` and `mcp.round`. StitchKit does not merge
|
|
5110
5129
|
separate HTTP attempts into one logical trace. Parallel
|
|
5111
5130
|
rounds have isolated context. HTTP/stdio modern hosts and the supported legacy
|
|
5112
5131
|
stdio bridge may use this declaration; Agent, CLI and ordinary HTTP invocation
|
|
@@ -5358,7 +5377,7 @@ It is **deep** because the projection walks the generated JSON Schema document,
|
|
|
5358
5377
|
including objects, arrays, tuples and schema-definition nodes. Structurally
|
|
5359
5378
|
identifiable discriminated object unions are flattened wherever they occur.
|
|
5360
5379
|
Plain unions and unions hidden behind unresolved external references remain
|
|
5361
|
-
unions because
|
|
5380
|
+
unions because StitchKit cannot soundly invent a discriminator.
|
|
5362
5381
|
|
|
5363
5382
|
Use the default `flattenUnionInput: false` when the model must see the exact
|
|
5364
5383
|
relationship between a discriminator and each branch. Joined property schemas
|
|
@@ -5368,7 +5387,7 @@ The flattened form is **lossy but never executable**. Per-variant refinements
|
|
|
5368
5387
|
and incompatible constraints are widened in the presentation document; the
|
|
5369
5388
|
original Zod contract enforces them exactly once inside `executeToolMethod`.
|
|
5370
5389
|
MCP and AI adapters forward the raw argument object unchanged, so defaults,
|
|
5371
|
-
coercions and transforms cannot run before
|
|
5390
|
+
coercions and transforms cannot run before StitchKit. Strict violations return
|
|
5372
5391
|
the normal `VALIDATION_ERROR` tool envelope and fire `beforeToolCall` /
|
|
5373
5392
|
`afterToolCall`. → [ADR 0050](../decisions/0050-presentation-schema-is-not-a-parser.md).
|
|
5374
5393
|
|
|
@@ -5681,7 +5700,7 @@ a deadline the remote client hit (`REQUEST_TIMEOUT`, `408`) follows the status l
|
|
|
5681
5700
|
When a contract endpoint or runtime tool declares `output`, its MCP tool
|
|
5682
5701
|
registers that exact schema as `outputSchema` and returns the validated value as
|
|
5683
5702
|
`structuredContent` alongside a JSON text block. Every JSON root type is kept
|
|
5684
|
-
unchanged: object, array, string, number, boolean and `null`.
|
|
5703
|
+
unchanged: object, array, string, number, boolean and `null`. StitchKit does not
|
|
5685
5704
|
wrap non-object values in `{ result }`; protocol-era adaptation belongs to the
|
|
5686
5705
|
official SDK.
|
|
5687
5706
|
|
|
@@ -5776,7 +5795,7 @@ removes keys on purpose and is not reported. → [ADR 0196](../decisions/0196-a-
|
|
|
5776
5795
|
## AI agents — `mountAgent`
|
|
5777
5796
|
|
|
5778
5797
|
`mountAgent` remains the low-level path when the application owns its own model
|
|
5779
|
-
loop and conversation state. For the optional
|
|
5798
|
+
loop and conversation state. For the optional StitchKit-owned run/history loop,
|
|
5780
5799
|
see [Agent application runtime](./agent-runtime.md).
|
|
5781
5800
|
|
|
5782
5801
|
`mountAgent` turns a service into a Vercel AI SDK `ToolSet`, ready for
|
|
@@ -5958,7 +5977,7 @@ hook/lifecycle `OperationIdentity` and the tool `RequestEvent`
|
|
|
5958
5977
|
(`serviceName`, `action`, `httpMethod`). A runtime operation has no HTTP route,
|
|
5959
5978
|
so no fake `path` is added.
|
|
5960
5979
|
|
|
5961
|
-
When `output` is declared,
|
|
5980
|
+
When `output` is declared, StitchKit validates the neutral handler result after
|
|
5962
5981
|
`afterHandle`. MCP owns `structuredContent` and `isError`: a presenter supplies
|
|
5963
5982
|
only rich `content`/metadata, while the framework inserts the validated
|
|
5964
5983
|
structured result and normalises failures. The Agent adapter uses the AI SDK's
|
|
@@ -5967,7 +5986,7 @@ neutral output while the model receives text/file content. Presentation
|
|
|
5967
5986
|
callbacks require an output schema.
|
|
5968
5987
|
|
|
5969
5988
|
The MCP registration uses an identity carrier: the SDK advertises the compiled
|
|
5970
|
-
JSON Schema but forwards the raw object into
|
|
5989
|
+
JSON Schema but forwards the raw object into StitchKit. Input failures therefore
|
|
5971
5990
|
use the same validation, lifecycle and hook path as contract tools.
|
|
5972
5991
|
|
|
5973
5992
|
### Managed wait, download, upload and view-file
|
|
@@ -6078,7 +6097,7 @@ batch operation.
|
|
|
6078
6097
|
### Async-operation protocol
|
|
6079
6098
|
|
|
6080
6099
|
For a complete long-running operation, define the linked runtime-only surface
|
|
6081
|
-
once.
|
|
6100
|
+
once. StitchKit owns transport names, validation and wait mechanics; the
|
|
6082
6101
|
application still owns storage, execution, retries and domain states:
|
|
6083
6102
|
|
|
6084
6103
|
```ts
|
|
@@ -6142,7 +6161,7 @@ prevents a stale run owner from crossing an effect boundary; the transactional
|
|
|
6142
6161
|
idempotency record makes a repeated current call converge on one operation.
|
|
6143
6162
|
Neither replaces the other.
|
|
6144
6163
|
|
|
6145
|
-
|
|
6164
|
+
StitchKit deliberately does **not** own the durable queue, operation database,
|
|
6146
6165
|
lease renewal, provider retry/reconciliation protocol, asset catalog or domain
|
|
6147
6166
|
states. The process-local application resource stops admission and drains
|
|
6148
6167
|
accepted work; unresolved durable records survive shutdown for the next
|
|
@@ -6273,7 +6292,7 @@ operations whose contract intentionally differs.
|
|
|
6273
6292
|
Deferred tool search, name snapshots and boot diagnostics accept the same
|
|
6274
6293
|
object-shaped surface as the mounts. Contract operations are followed by
|
|
6275
6294
|
runtime definitions, matching mount order; exposure filters and collisions are
|
|
6276
|
-
resolved by
|
|
6295
|
+
resolved by StitchKit rather than by consumer code:
|
|
6277
6296
|
|
|
6278
6297
|
```ts
|
|
6279
6298
|
import {
|
|
@@ -6300,7 +6319,7 @@ fails first on duplicate contract/runtime names. There is no runtime-only
|
|
|
6300
6319
|
manifest helper or public mount adapter: the framework owns merging and schema
|
|
6301
6320
|
projection.
|
|
6302
6321
|
|
|
6303
|
-
Applications using
|
|
6322
|
+
Applications using StitchKit's durable runtime can compose this manifest with
|
|
6304
6323
|
bounded per-run activation through `createDeferredAgentToolSurface` from
|
|
6305
6324
|
`stitchkit/agent-runtime`. It keeps selected calls as direct `mountAgent` tools
|
|
6306
6325
|
rather than routing them through a generic executor. Search receipts live in
|
|
@@ -6367,7 +6386,7 @@ identical. Write the handler once; it serves every surface.
|
|
|
6367
6386
|
> from `stitchkit/tools/agent` for an AI SDK loop) is the direct path.
|
|
6368
6387
|
|
|
6369
6388
|
`stitchkit/agent-runtime` is the peer-free, server-only, opinionated layer above
|
|
6370
|
-
`mountAgentTools`. Use it when the application wants
|
|
6389
|
+
`mountAgentTools`. Use it when the application wants StitchKit to own conversation
|
|
6371
6390
|
mechanics: durable acceptance, history projection, the native `AgentModelDriver`
|
|
6372
6391
|
step loop, checkpoints, keyed interruption, terminal commit and stable application
|
|
6373
6392
|
events.
|
|
@@ -6406,7 +6425,7 @@ bun add stitchkit zod
|
|
|
6406
6425
|
(`stitchkit/agent-runtime/openrouter`, `stitchkit/agent-runtime/openai`,
|
|
6407
6426
|
`stitchkit/agent-runtime/anthropic`) are completely peer-free beyond `zod`.
|
|
6408
6427
|
|
|
6409
|
-
Install `ai` only when bridging an existing AI SDK
|
|
6428
|
+
Install `ai` only when bridging an existing AI SDK (`LanguageModelV4` from `ai@7`) or `ToolSet`
|
|
6410
6429
|
through the thin optional-peer adapter `stitchkit/agent-runtime/ai-sdk`
|
|
6411
6430
|
(`fromAiSdkModel`, `fromAiSdkTools`) or mounting an AI SDK `ToolSet` through
|
|
6412
6431
|
`stitchkit/tools/agent` (`mountAgent`):
|
|
@@ -6558,7 +6577,7 @@ freshly per stream call and reporting server `response.timestamp` alongside `mod
|
|
|
6558
6577
|
≤ 4 cache breakpoints with TTL-order checks, `output_config.format` JSON Schema (refusing
|
|
6559
6578
|
schemaless `json-object`), and retryable `529 overloaded_error` classification.
|
|
6560
6579
|
|
|
6561
|
-
For an existing AI SDK
|
|
6580
|
+
For an existing AI SDK (`LanguageModelV4` from `ai@7`) model or `ToolSet`, import `fromAiSdkModel` and `fromAiSdkTools` from
|
|
6562
6581
|
`stitchkit/agent-runtime/ai-sdk`. Both adapt directly onto `AgentModelDriver` and `AgentToolSet`
|
|
6563
6582
|
(driving `model.doStream()` without importing `streamText` or `generateText`) and normalize legacy
|
|
6564
6583
|
deprecated tool outputs into canonical `{ type: 'file', data, mediaType }` parts.
|
|
@@ -6648,11 +6667,21 @@ extraction, classification, a bounded tool loop, or standalone streaming — cal
|
|
|
6648
6667
|
- Pass `onPart` on `completeText` / `completeObject` or use `streamComplete` to consume
|
|
6649
6668
|
`text-delta`, `reasoning-delta`, `tool-input-start`, `tool-call`, `tool-result` (preliminary and
|
|
6650
6669
|
final), `tool-error`, `attempt-reset`, `finish-step`, and `finish` events over a bounded async
|
|
6651
|
-
iterable without a store.
|
|
6670
|
+
iterable without a store. `streamComplete().parts` is single-use with a 64-part buffer: once
|
|
6671
|
+
iterated (`for await` or `parts[Symbol.asyncIterator]()`), backpressure pauses the producer when
|
|
6672
|
+
the buffer is full. If `parts` is never iterated, up to 64 parts buffer for late attachment and
|
|
6673
|
+
any overflow clears the queue without blocking so awaiting `result` alone (with or without
|
|
6674
|
+
`onPart`) completes in bounded memory; attempting to iterate `parts` after an unsubscribed
|
|
6675
|
+
overflow waits for completion and then propagates the run failure or throws an overflow `Error`
|
|
6676
|
+
instead of silently returning truncated parts.
|
|
6652
6677
|
- Standalone completions have no durable approval loop, so any tool with `needsApproval: true` (or
|
|
6653
|
-
a `needsApproval` predicate returning `true`)
|
|
6654
|
-
`AgentToolApprovalError` (`reason: 'approval-unsupported'`)
|
|
6655
|
-
the safe call proceed.
|
|
6678
|
+
a `needsApproval` predicate returning `true`) is preflighted across every validated call in the
|
|
6679
|
+
step and fails closed with `AgentToolApprovalError` (`reason: 'approval-unsupported'`) before any
|
|
6680
|
+
tool executes on that step; a predicate returning `false` lets the safe call proceed.
|
|
6681
|
+
- Pass `beforeStepToolCalls` and tool-level `stepBarriers` (`maxToolCallsPerStep`,
|
|
6682
|
+
`toolDependencies`, `onPredecessorFailure`) on `completeText` / `streamComplete` /
|
|
6683
|
+
`completeObject` to enforce the same batch-refusal, cap, and dependency-ordering policies as
|
|
6684
|
+
`createAgentRuntime` (durable stream-only `stepBarriers` keys fail fast with a `TypeError`).
|
|
6656
6685
|
- Pass `retry` (`AgentRetryPolicy`) and optional `onAttemptDiscarded` for stateless retry with
|
|
6657
6686
|
`Retry-After` handling; exhausting retries throws `AgentRetryExhaustedError` carrying every failed
|
|
6658
6687
|
attempt, `lastError`, and accumulated billable `usage`.
|
|
@@ -6773,7 +6802,10 @@ Selection is a versioned receipt in the ordinary durable tool-result history.
|
|
|
6773
6802
|
The latest valid same-run search replaces the earlier selection; parallel
|
|
6774
6803
|
searches in one step merge in call order. Recovery reconstructs it, while a
|
|
6775
6804
|
different run or finite surface cannot inherit it. Known inactive calls take a
|
|
6776
|
-
recoverable `SEARCH_REQUIRED` search round; unknown names still fail.
|
|
6805
|
+
recoverable `SEARCH_REQUIRED` search round; unknown names still fail. Inactive-call
|
|
6806
|
+
repair travels with the tool set returned by `deferred.mount()` — so wrapping
|
|
6807
|
+
`deferred.prepareStep()` or calling `completeText` preserves it automatically — and can
|
|
6808
|
+
also be composed explicitly with `deferred.repairToolCall(applicationRepairToolCall)`. The
|
|
6777
6809
|
runtime marks that round with `reason: 'inactive_call'` beside the exact tool
|
|
6778
6810
|
name. The field is the runtime's to write; a model that sets it anyway gets
|
|
6779
6811
|
the same `SEARCH_REQUIRED` answer with an exact name, and with a query in words
|
|
@@ -6815,7 +6847,7 @@ is a reference structured control loop for `submit`, `interrupt`, `snapshot` and
|
|
|
6815
6847
|
It starts no process and chooses no framing, authentication or transport. Importing either example
|
|
6816
6848
|
has no side effect; an external supervisor owns process placement and restart.
|
|
6817
6849
|
|
|
6818
|
-
| Concern | Public
|
|
6850
|
+
| Concern | Public StitchKit composition | Boundary |
|
|
6819
6851
|
| --- | --- | --- |
|
|
6820
6852
|
| execution loop | `createAgentRuntime` | already available; do not copy a second loop |
|
|
6821
6853
|
| model choice | `defineModelRegistry` and `models.resolve` | provider credentials/discovery stay application-owned |
|
|
@@ -7103,7 +7135,7 @@ fit. Exact equality (including a zero window with zero reservations/history)
|
|
|
7103
7135
|
fits; any unavailable component keeps the decision `unavailable`.
|
|
7104
7136
|
|
|
7105
7137
|
The same opaque `tx` reaches head, run, admission and history callbacks. The adapter maps rows
|
|
7106
|
-
and supplies atomicity;
|
|
7138
|
+
and supplies atomicity; StitchKit owns transition validation and revision
|
|
7107
7139
|
arithmetic. The executable reference is
|
|
7108
7140
|
[`examples/agent-store-prisma/adapter.ts`](../../examples/agent-store-prisma/adapter.ts).
|
|
7109
7141
|
`compareAndSwap` returns either `{ outcome: 'applied' }` or
|
|
@@ -7145,7 +7177,7 @@ const sqlite = createNodeSqliteAgentRuntimeStore({ filename: './agent-runtime.sq
|
|
|
7145
7177
|
Initialization creates only `stitchkit_agent_runtime_*` tables and records
|
|
7146
7178
|
schema version 2 in `stitchkit_agent_runtime_meta`; it does not use
|
|
7147
7179
|
`PRAGMA user_version` or mutate application tables. An unknown schema version or
|
|
7148
|
-
unversioned partial
|
|
7180
|
+
unversioned partial StitchKit schema is refused. The connection is owned by the
|
|
7149
7181
|
returned handle and closes only after accepted operations drain.
|
|
7150
7182
|
|
|
7151
7183
|
Each handle serializes its transactions. Separate connections use
|
|
@@ -7688,7 +7720,7 @@ what it produced"**:
|
|
|
7688
7720
|
surface that sends nothing until the run is done never showed it at all. When
|
|
7689
7721
|
it reached nobody, it is not part of the conversation. That is `supersede`.
|
|
7690
7722
|
|
|
7691
|
-
**
|
|
7723
|
+
**StitchKit cannot answer that question for you** — delivery belongs to the
|
|
7692
7724
|
transport, and the runtime sees an abort, not a screen. Hence a declared policy
|
|
7693
7725
|
(→ ADR 0108), and hence `inputPolicy` accepting a function, so one application
|
|
7694
7726
|
can hold two surfaces with different rules without the core learning which is
|
|
@@ -7816,7 +7848,7 @@ while the predecessor still owns managed callbacks. A hung predecessor blocks
|
|
|
7816
7848
|
the lane in the first version.
|
|
7817
7849
|
|
|
7818
7850
|
Shutdown is two-phase, and both budgets carry the names they carry everywhere
|
|
7819
|
-
else in
|
|
7851
|
+
else in StitchKit:
|
|
7820
7852
|
|
|
7821
7853
|
```ts
|
|
7822
7854
|
const closed = await runtime.close({ gracePeriodMs: 30_000, forceTimeoutMs: 5_000 })
|
|
@@ -8178,7 +8210,7 @@ The agent `terminal` event and the adapter's delivery receipt are intentionally
|
|
|
8178
8210
|
different records. A successful run does not prove that a reply reached its
|
|
8179
8211
|
channel, and a delivery failure never rewrites the canonical agent result.
|
|
8180
8212
|
Shutdown stops ingress, drains accepted process-local work and leaves ambiguous
|
|
8181
|
-
outbox records visible for a later reconciliation pass.
|
|
8213
|
+
outbox records visible for a later reconciliation pass. StitchKit does not own
|
|
8182
8214
|
a channel database, durable broker, provider payload schema or application
|
|
8183
8215
|
identity policy.
|
|
8184
8216
|
|
|
@@ -8198,9 +8230,25 @@ already committed run.
|
|
|
8198
8230
|
|
|
8199
8231
|
A named custom stop condition terminalizes with `policy_stop`; its `policyName`
|
|
8200
8232
|
is persisted on the run and included in the terminal event/result. `max-steps`
|
|
8201
|
-
is the reserved built-in policy name. `loop.prepareStep`
|
|
8202
|
-
|
|
8203
|
-
|
|
8233
|
+
is the reserved built-in policy name. `loop.prepareStep` (and `prepareStep` on
|
|
8234
|
+
`completeText` / `streamComplete` / `completeObject`) is the controlled step
|
|
8235
|
+
boundary for changing active tools, driver, instructions or messages. It cannot
|
|
8236
|
+
replace the managed tool set or bypass its lifecycle fence.
|
|
8237
|
+
|
|
8238
|
+
Override lifetimes in `prepareStep` follow two explicit rules:
|
|
8239
|
+
|
|
8240
|
+
- **`instructions` is sticky across the remaining steps of the current attempt**
|
|
8241
|
+
(and resets to `initialInstructions` if a provider retry starts a fresh
|
|
8242
|
+
attempt). Later steps receive the carried value in `instructions` alongside
|
|
8243
|
+
the unchanged `initialInstructions`, so a step can explicitly revert with
|
|
8244
|
+
`{ instructions: initialInstructions }`. One-shot `protocol.acceptTerminal`
|
|
8245
|
+
continuation instructions apply only to that continuation step and do not
|
|
8246
|
+
overwrite carried `prepareStep` instructions.
|
|
8247
|
+
- **`driver` applies to that single step only** (matching `activeTools`,
|
|
8248
|
+
`toolChoice`, `responseFormat`, `cacheControl`, `headers`, `providerOptions`
|
|
8249
|
+
and call settings). Omitting `driver` on the next step reverts to the run's
|
|
8250
|
+
resolved default driver (or `input.driver` in `completeText`), and
|
|
8251
|
+
`prepareStep` always receives that default driver in `driver`.
|
|
8204
8252
|
|
|
8205
8253
|
Context can grow between steps as tool results and deferred schemas enter the
|
|
8206
8254
|
provider prompt. When application budgeting can prove that the next assembled
|
|
@@ -8217,7 +8265,7 @@ prepareStep: (step) => {
|
|
|
8217
8265
|
```
|
|
8218
8266
|
|
|
8219
8267
|
That deliberate refusal ends the run as `context_overflow` on the durable
|
|
8220
|
-
record, delivery terminal and operator event.
|
|
8268
|
+
record, delivery terminal and operator event. StitchKit does not inspect error
|
|
8221
8269
|
messages — it recognises failures by identity, not by text. A store refusing an
|
|
8222
8270
|
owned mutation ends the run `storage_conflict`; `protocol.acceptTerminal`
|
|
8223
8271
|
refusing a finished message ends it `output_rejected`; a check the SDK runs on
|
|
@@ -8959,7 +9007,7 @@ no cost to binding first.
|
|
|
8959
9007
|
|
|
8960
9008
|
The exact resource callbacks are typed by their public configuration. The
|
|
8961
9009
|
important ownership rule is stable: the application decides what the
|
|
8962
|
-
database/server/provider objects are and how they are configured;
|
|
9010
|
+
database/server/provider objects are and how they are configured; StitchKit
|
|
8963
9011
|
orders their process-local lifecycle and decides *when* they come into
|
|
8964
9012
|
existence.
|
|
8965
9013
|
|
|
@@ -8972,9 +9020,9 @@ dependency.
|
|
|
8972
9020
|
|
|
8973
9021
|
Start and readiness are different. A connection can finish setup and return a
|
|
8974
9022
|
ready handle. A poller can return a handle immediately, settle `ready` later,
|
|
8975
|
-
and keep a long-lived `completion` promise.
|
|
9023
|
+
and keep a long-lived `completion` promise. StitchKit observes both.
|
|
8976
9024
|
|
|
8977
|
-
Once
|
|
9025
|
+
Once StitchKit invokes start/activation, cleanup is guaranteed to be attempted.
|
|
8978
9026
|
Write `close` so it is safe when setup was partial:
|
|
8979
9027
|
|
|
8980
9028
|
```ts
|
|
@@ -9122,7 +9170,7 @@ failure, and the startup error stays the `cause` of the `AggregateError` that
|
|
|
9122
9170
|
failed startup from ever reporting why it failed.
|
|
9123
9171
|
|
|
9124
9172
|
A required long-lived completion that rejects after startup makes readiness
|
|
9125
|
-
false and health unhealthy.
|
|
9173
|
+
false and health unhealthy. StitchKit records the failure but does not restart
|
|
9126
9174
|
the resource or process.
|
|
9127
9175
|
|
|
9128
9176
|
`ApplicationResourceShutdown.failures` names the phase that failed — `start`,
|
|
@@ -10241,15 +10289,22 @@ const driver = createCodexDriver({ wrapCommand: sandbox.wrapCommand });
|
|
|
10241
10289
|
- **Fail-closed availability:** `wrapCommand` probes the OS backend before its first wrap and
|
|
10242
10290
|
throws `SandboxError('SANDBOX_UNAVAILABLE', ...)` if `bwrap` or `sandbox-exec` is unavailable or
|
|
10243
10291
|
the platform is unsupported; there is no unsandboxed fallback.
|
|
10244
|
-
- **Symlink-safe `workspace-readonly`:** `ProcessSandboxSpecSchema` resolves
|
|
10245
|
-
`realpathSync` so none of `writableDirs`, `privateTmpDir`, or `homeDir` can overlap
|
|
10246
|
-
through a symlink.
|
|
10247
|
-
-
|
|
10292
|
+
- **Symlink-safe `workspace-readonly` and `denyPaths`:** `ProcessSandboxSpecSchema` resolves
|
|
10293
|
+
symlinks via `realpathSync` so none of `writableDirs`, `privateTmpDir`, or `homeDir` can overlap
|
|
10294
|
+
`workspace` through a symlink. Both Linux Bubblewrap and macOS Seatbelt resolve symlinks for
|
|
10295
|
+
`denyPaths`: Linux maps each resolved target onto every host-backed mount (including symlinked
|
|
10296
|
+
mounts, symlinked directories masked with `tmpfs`, and ancestor directories that cover descendant
|
|
10297
|
+
mounts) and fails closed with `SandboxError('SANDBOX_UNAVAILABLE', ...)` on broken/dangling
|
|
10298
|
+
symlinks or unresolvable symlink loops (`ELOOP`), while macOS emits deny rules for both the
|
|
10299
|
+
lexical path and the symlink-resolved path (or deepest existing ancestor).
|
|
10300
|
+
- **Platform read/write and IPC models differ:**
|
|
10248
10301
|
- **Linux (`bwrap`):** mount-namespace allowlist — only mounted system roots, `workspace`,
|
|
10249
10302
|
`readOnlyPaths`, `writableDirs`, `privateTmpDir`, `homeDir`, and `unixSockets` exist inside the
|
|
10250
|
-
sandbox; unmounted host paths are absent, and `denyPaths`
|
|
10251
|
-
`/bin` and `/sbin`) are masked over `/dev/null`
|
|
10252
|
-
|
|
10303
|
+
sandbox; unmounted host paths are absent, and `denyPaths` resolving into or above any
|
|
10304
|
+
host-backed mount (including `/bin` and `/sbin`) are masked over `/dev/null` (for files and
|
|
10305
|
+
sockets) or an empty `tmpfs` (for directories), while an isolated `tmpfs` `homeDir` is not
|
|
10306
|
+
treated as host-backed. A `cwd` outside mounted roots (such as `driver.info()` /
|
|
10307
|
+
`driver.status()`) falls back to `workspace`.
|
|
10253
10308
|
- **macOS (`sandbox-exec` Seatbelt, compiled by `buildSeatbeltProfile`):** default-deny writes
|
|
10254
10309
|
with default-allow reads — writes are denied globally except `privateTmpDir`, `workspace`
|
|
10255
10310
|
(`workspace-strict`), `homeDir`, `writableDirs`, and explicitly allowed `unixSockets` (with
|
|
@@ -10261,6 +10316,12 @@ const driver = createCodexDriver({ wrapCommand: sandbox.wrapCommand });
|
|
|
10261
10316
|
`'allow'` — so callers on macOS must explicitly add control sockets, sibling workspaces, and
|
|
10262
10317
|
host secrets to `denyPaths`. Seatbelt cannot remap Unix socket paths: supplying `mountPath !==
|
|
10263
10318
|
hostPath` fails closed with `SANDBOX_UNAVAILABLE`.
|
|
10319
|
+
- **macOS Seatbelt `mach-lookup` boundary:** because `buildSeatbeltProfile` begins with
|
|
10320
|
+
`(allow default)` and restricts filesystem writes, explicit `denyPaths`, and (under
|
|
10321
|
+
`network: 'deny'`) network operations without denying `mach-lookup`, user-session Mach/XPC
|
|
10322
|
+
services — such as the macOS Keychain (`securityd`/`secd`) and other local XPC daemons — remain
|
|
10323
|
+
reachable from inside the sandboxed process unless restricted separately. Linux Bubblewrap runs
|
|
10324
|
+
in isolated namespaces without host Mach/XPC services and does not share this surface.
|
|
10264
10325
|
|
|
10265
10326
|
|
|
10266
10327
|
==============================================================================
|
|
@@ -10972,11 +11033,11 @@ still judged alive.
|
|
|
10972
11033
|
|
|
10973
11034
|
Public leaves keep optional peers out of their import closure. Installing `stitchkit` still
|
|
10974
11035
|
installs the complete package and ky; selective imports alone do not avoid that installation.
|
|
10975
|
-
A library can use
|
|
11036
|
+
A library can use StitchKit as a build dependency, bundle its selected public native imports,
|
|
10976
11037
|
keep Zod external, and publish the resulting implementation with its library artifact.
|
|
10977
11038
|
|
|
10978
11039
|
```ts
|
|
10979
|
-
// The library's build entry; all mechanisms remain owned by
|
|
11040
|
+
// The library's build entry; all mechanisms remain owned by StitchKit.
|
|
10980
11041
|
export { canonicalJson } from 'stitchkit/primitives';
|
|
10981
11042
|
export { writeFileAtomic, withExclusiveLock } from 'stitchkit/files';
|
|
10982
11043
|
export { observeProcessInstance, probeProcessOwner, runNativeCommand } from 'stitchkit/process';
|
|
@@ -11038,7 +11099,7 @@ identity, live-owner refusal, dead-owner recovery and contained file operations
|
|
|
11038
11099
|
with the packaging plugin, and check that an unpackaged build reports the backend `unavailable`
|
|
11039
11100
|
with stage `packaging` rather than certifying a dead owner. Bun and Node package imports retain the same
|
|
11040
11101
|
lazy loader; importing a portable leaf does not load a Darwin addon on another OS. Test
|
|
11041
|
-
declarations too, and check that importing an unbundled
|
|
11102
|
+
declarations too, and check that importing an unbundled StitchKit leaf fails in a deliberately
|
|
11042
11103
|
isolated library distribution. A separate schema-only entry must not import the native entry.
|
|
11043
11104
|
|
|
11044
11105
|
If the Darwin backend cannot load, `observeProcessInstance` still returns `unavailable`.
|
|
@@ -11052,20 +11113,20 @@ failures or turn unavailable identity into proof that an owner is dead. If a run
|
|
|
11052
11113
|
no recognized native error code, the stage stays `load`; the loader never infers errno from text.
|
|
11053
11114
|
|
|
11054
11115
|
This delivery removes a runtime kernel installation; it does not remove the build-time
|
|
11055
|
-
|
|
11116
|
+
StitchKit installation or create an independent lightweight npm package.
|
|
11056
11117
|
|
|
11057
11118
|
## Public native packaging
|
|
11058
11119
|
|
|
11059
11120
|
Custom archives and installers use `stitchkit/files/packaging` at **build time**.
|
|
11060
11121
|
`createNativePackaging` resolves the installed version and target addon, reads the addon once and
|
|
11061
|
-
checks it against the size and SHA256 that
|
|
11122
|
+
checks it against the size and SHA256 that StitchKit published in its `native-assets.json` when the
|
|
11062
11123
|
package was built. A ready asset carries those verified `bytes` with the published `size` and
|
|
11063
11124
|
`sha256`; its Bun-compatible plugin integrates the same bytes with the same lazy native loader.
|
|
11064
11125
|
Each call reads and hashes the selected addons, so call it once per build and reuse the result.
|
|
11065
11126
|
The leaf is evolving. It requires no optional peer or Bun ambient declarations for Node imports.
|
|
11066
11127
|
Calling it must happen in a process that runs it from its installed package: it locates the
|
|
11067
11128
|
package's `native-assets.json` beside its own file and throws `Native packaging must run from its
|
|
11068
|
-
installed
|
|
11129
|
+
installed StitchKit package` anywhere else, such as inside an application's runtime artifact.
|
|
11069
11130
|
Importing the leaf is side-effect free (it loads no addon and reads no file), so a module that
|
|
11070
11131
|
both builds and is bundled may import it; only the call has to stay in the build step.
|
|
11071
11132
|
|
|
@@ -11112,7 +11173,7 @@ second time. An installed addon whose size or SHA256 differs from the published
|
|
|
11112
11173
|
with `mismatch` / `NATIVE_ASSET_DIGEST_MISMATCH`, so a file substituted after installation never
|
|
11113
11174
|
reaches an artifact. Archive the complete output directory with an integrity manifest that records
|
|
11114
11175
|
`asset.sha256`, unpack to a clean directory, verify the same hashes there, and run offline without
|
|
11115
|
-
the build tree or `node_modules`. The published digest ties the bytes to the package
|
|
11176
|
+
the build tree or `node_modules`. The published digest ties the bytes to the package StitchKit
|
|
11116
11177
|
built; the package itself is only as trusted as its tarball (the lockfile integrity of the install).
|
|
11117
11178
|
Signature and trust policy remain application-owned.
|
|
11118
11179
|
|
|
@@ -11440,7 +11501,7 @@ an immutable branded value; `transition()` produces the next one. `availableTran
|
|
|
11440
11501
|
|
|
11441
11502
|
`defineOwnerScope` resolves one owner from authenticated identity. Reading across owners is a
|
|
11442
11503
|
separate `acrossAllOwners(identity)` call and permission. Pass the resulting branded `OwnerScope`
|
|
11443
|
-
to the data adapter. This proves the scope was explicit;
|
|
11504
|
+
to the data adapter. This proves the scope was explicit; StitchKit cannot prove what SQL an
|
|
11444
11505
|
arbitrary adapter emits. `scanOwnerFilterRisks` maps existing caller-named manual filters before a
|
|
11445
11506
|
migration.
|
|
11446
11507
|
|
|
@@ -11599,7 +11660,7 @@ only through `stitchkit/application` exports.
|
|
|
11599
11660
|
## Database connection
|
|
11600
11661
|
|
|
11601
11662
|
Wrap connection allocation and readiness in `start`, and make `close` safe after
|
|
11602
|
-
partial setup.
|
|
11663
|
+
partial setup. StitchKit invokes cleanup for every attempted start, including a
|
|
11603
11664
|
start that allocates a client and then rejects.
|
|
11604
11665
|
|
|
11605
11666
|
```ts
|
|
@@ -11622,7 +11683,7 @@ allocation and proves one rollback close.
|
|
|
11622
11683
|
|
|
11623
11684
|
An application-owned client is an ordinary managed resource. Keep SDK creation,
|
|
11624
11685
|
credentials, authorization and reconnect policy in the application; no Telegram
|
|
11625
|
-
client SDK is required by
|
|
11686
|
+
client SDK is required by StitchKit. Create a fresh client inside each `start`,
|
|
11626
11687
|
publish it after connection/readiness succeeds, and share one memoized destroy
|
|
11627
11688
|
promise between partial-start cleanup, `close` and `force`:
|
|
11628
11689
|
|
|
@@ -11788,7 +11849,7 @@ async function handleDelivery(delivery: Delivery) {
|
|
|
11788
11849
|
}
|
|
11789
11850
|
```
|
|
11790
11851
|
|
|
11791
|
-
|
|
11852
|
+
StitchKit owns only process-local admission accounting and drain. Durable claims,
|
|
11792
11853
|
visibility timeouts, deduplication, idempotency and retry classification remain
|
|
11793
11854
|
in the queue/product layer.
|
|
11794
11855
|
|
|
@@ -11817,7 +11878,7 @@ await publisher.close()
|
|
|
11817
11878
|
```
|
|
11818
11879
|
|
|
11819
11880
|
The monitoring backend, transport retry and cross-process aggregation remain
|
|
11820
|
-
outside
|
|
11881
|
+
outside StitchKit. The executable recipe blocks revision 0, coalesces
|
|
11821
11882
|
intermediate revisions, explicitly admits the final absolute snapshot after
|
|
11822
11883
|
unsubscribe and proves that `close()` flushes revision 3. Do not rely on an
|
|
11823
11884
|
asynchronous subscriber callback racing cleanup: publish `getSnapshot()` before
|
|
@@ -12067,7 +12128,7 @@ await createCli({
|
|
|
12067
12128
|
```
|
|
12068
12129
|
|
|
12069
12130
|
`createCli({ signal })` and its wait loop honor an explicit caller
|
|
12070
|
-
`AbortSignal`.
|
|
12131
|
+
`AbortSignal`. StitchKit does not install a process-global SIGINT handler for
|
|
12071
12132
|
ordinary CLI programs: if desired, the application binds SIGINT to an
|
|
12072
12133
|
`AbortController` and passes its signal. Aborting wait stops polling only; it
|
|
12073
12134
|
does not cancel the underlying job.
|
|
@@ -12168,7 +12229,7 @@ const doctor = defineCliCommand({
|
|
|
12168
12229
|
})
|
|
12169
12230
|
```
|
|
12170
12231
|
|
|
12171
|
-
`present` returns the exact stdout bytes, which
|
|
12232
|
+
`present` returns the exact stdout bytes, which StitchKit writes once. Without
|
|
12172
12233
|
it the canonical JSON output is unchanged. `exitCode` classifies a successfully
|
|
12173
12234
|
validated result and must return an integer in `0..255`; failed `ToolResult`
|
|
12174
12235
|
envelopes and the application-wide `exitCodes` mapping remain authoritative for
|
|
@@ -12907,7 +12968,7 @@ on stdout. A native `defineCliCommand` declares none of those facts, so a failed
|
|
|
12907
12968
|
|
|
12908
12969
|
A CLI that mounts a server's tools through `defineMcpClientConnection` never sees the
|
|
12909
12970
|
method or contract `effect` — every MCP call is a `POST` — so it reads the `readOnlyHint`
|
|
12910
|
-
the server publishes. A
|
|
12971
|
+
the server publishes. A StitchKit server publishes it for every repeatable read by the
|
|
12911
12972
|
rule above ([MCP → `readOnlyHint`](./mcp-and-agents.md#saying-which-tools-only-read--readonlyhint)),
|
|
12912
12973
|
so the same command behaves the same over the contract and over MCP. The hint is the
|
|
12913
12974
|
server's word: a server that labels a write as read-only makes the CLI withhold that
|
|
@@ -13521,7 +13582,7 @@ counts raw UTF-8 body bytes, including SSE framing, regardless of `Content-Lengt
|
|
|
13521
13582
|
Pending legacy calls also count comments and wrong-id frames. `budget.maxTools`
|
|
13522
13583
|
and `budget.maxSchemaBytes` remain separate mount limits.
|
|
13523
13584
|
|
|
13524
|
-
**A stored catalog is mounted while it is current.** A
|
|
13585
|
+
**A stored catalog is mounted while it is current.** A StitchKit server sends its
|
|
13525
13586
|
[catalog stamp](./mcp-and-agents.md#knowing-your-catalog-is-stale--the-catalog-stamp) with
|
|
13526
13587
|
the `initialize` answer, as the `stitchkit-catalog` response header. Given a `catalog:
|
|
13527
13588
|
{ load, store }`, the connection compares it with the stamp of the stored `tools/list`
|
|
@@ -13532,7 +13593,7 @@ stores again. A listing is stored only when every tool in it carries the stamp t
|
|
|
13532
13593
|
`initialize` answer announced, so a rolling deploy answering the two requests from
|
|
13533
13594
|
different builds stores nothing. A server without a stamp, a surface with raw SDK tools
|
|
13534
13595
|
and a failing `load` or `store` all cost one `tools/list`, never the mount. The stamp
|
|
13535
|
-
covers what `tools/list` publishes as
|
|
13596
|
+
covers what `tools/list` publishes as StitchKit builds it; the JSON Schema text the
|
|
13536
13597
|
server's MCP SDK renders from the same schema is not hashed separately.
|
|
13537
13598
|
|
|
13538
13599
|
Only the initial `initialize` can negotiate HTTP-to-legacy fallback on 400, 404
|
|
@@ -13669,11 +13730,35 @@ A native-only CLI (only `commands`, no `services` or `runtimeTools`) takes no
|
|
|
13669
13730
|
|
|
13670
13731
|
## Typed context
|
|
13671
13732
|
|
|
13672
|
-
|
|
13673
|
-
|
|
13674
|
-
|
|
13733
|
+
For a peer-free CLI, import `createCli` directly from `stitchkit/cli` and
|
|
13734
|
+
annotate the `context` factory's return type against your app's context shape
|
|
13735
|
+
— no optional peers are loaded:
|
|
13736
|
+
|
|
13737
|
+
```ts
|
|
13738
|
+
import { createCli } from 'stitchkit/cli'
|
|
13739
|
+
|
|
13740
|
+
await createCli({
|
|
13741
|
+
name: 'myapp',
|
|
13742
|
+
version: '1.0.0',
|
|
13743
|
+
services,
|
|
13744
|
+
access: { gate: { beforeHandle: authHook } },
|
|
13745
|
+
context: (identity): { user: User | undefined } => ({ user: identity }),
|
|
13746
|
+
})
|
|
13747
|
+
```
|
|
13748
|
+
|
|
13749
|
+
If your application already installs `@modelcontextprotocol/server` and mounts
|
|
13750
|
+
MCP, peer-free agent tools (`mountAgentTools`), and CLI surfaces together, you
|
|
13751
|
+
can also pin the shared context type once via `createToolkit<AppContext>()`
|
|
13752
|
+
from `stitchkit/tools/toolkit` — the tool-side mirror of `createImplement`
|
|
13753
|
+
([ADR 0017](../decisions/0017-typed-tool-context.md),
|
|
13754
|
+
[ADR 0284](../decisions/0284-the-tools-barrel-loads-no-optional-peer.md),
|
|
13755
|
+
[ADR 0338](../decisions/0338-toolkit-stays-free-of-ai-peer.md)). It stays free
|
|
13756
|
+
of the `ai` peer; callers needing an AI SDK `ToolSet` use `mountAgent` from
|
|
13757
|
+
`stitchkit/tools/agent`:
|
|
13675
13758
|
|
|
13676
13759
|
```ts
|
|
13760
|
+
import { createToolkit } from 'stitchkit/tools/toolkit'
|
|
13761
|
+
|
|
13677
13762
|
const tools = createToolkit<{ user: User }>()
|
|
13678
13763
|
await tools.createCli({
|
|
13679
13764
|
name: 'myapp',
|
|
@@ -13790,7 +13875,7 @@ try {
|
|
|
13790
13875
|
```
|
|
13791
13876
|
|
|
13792
13877
|
`path` is `'0.v'` and not `'v'` because event arguments are a tuple: index `0`
|
|
13793
|
-
is the first payload. The issues are already flattened by
|
|
13878
|
+
is the first payload. The issues are already flattened by StitchKit's own
|
|
13794
13879
|
normaliser, so telling "wrong generation" from "malformed payload" is one
|
|
13795
13880
|
comparison rather than an inspection of a `ZodError`'s internals.
|
|
13796
13881
|
|
|
@@ -13825,7 +13910,7 @@ The client sends it as `auth`, and a rejection reaches `onConnectError` with
|
|
|
13825
13910
|
deployment reads as a half-rolled deployment and not as an access problem.
|
|
13826
13911
|
|
|
13827
13912
|
What that identity *is* remains the application's decision — a build version, a
|
|
13828
|
-
contract hash, a protocol generation.
|
|
13913
|
+
contract hash, a protocol generation. StitchKit does not compare it for you
|
|
13829
13914
|
(→ ADR 0002); it gives the place where the comparison happens before any frame
|
|
13830
13915
|
is interpreted, and it makes the per-frame alternative honest by letting its
|
|
13831
13916
|
refusals be seen.
|
|
@@ -13949,7 +14034,7 @@ socket.on('note:created', (note) => { /* typed note */ })
|
|
|
13949
14034
|
socket.emit('room:join', 'general', ({ joined }) => { /* typed + validated */ })
|
|
13950
14035
|
```
|
|
13951
14036
|
|
|
13952
|
-
When an application already owns the low-level
|
|
14037
|
+
When an application already owns the low-level StitchKit transport, bind the
|
|
13953
14038
|
contract without opening a second connection:
|
|
13954
14039
|
|
|
13955
14040
|
```ts
|
|
@@ -14115,7 +14200,7 @@ classification detects duplicates—those are different policies.
|
|
|
14115
14200
|
|
|
14116
14201
|
A server process that owns such a receiver can place `start()` and `close()` in
|
|
14117
14202
|
an existing `defineManagedResource` and include it in `createApplication`.
|
|
14118
|
-
Readiness follows a successful `live` snapshot; shutdown calls `close()`.
|
|
14203
|
+
Readiness follows a successful `live` snapshot; shutdown calls `close()`. StitchKit
|
|
14119
14204
|
does not add another supervisor, reconnect loop or durable event database.
|
|
14120
14205
|
|
|
14121
14206
|
When migrating a hand-written receiver, remove only the superseded attach/snapshot
|
|
@@ -14186,7 +14271,7 @@ closed phase:
|
|
|
14186
14271
|
|-------|----------------------|
|
|
14187
14272
|
| `engine-handoff` | Engine.IO created the outbound message packet and accepted it into its write path |
|
|
14188
14273
|
| `engine-ack-received` | Engine.IO decoded the inbound acknowledgement message, before Socket.IO invokes the acknowledgement callback |
|
|
14189
|
-
| `settled` | the acknowledgement callback ran and
|
|
14274
|
+
| `settled` | the acknowledgement callback ran and StitchKit finished acknowledgement validation |
|
|
14190
14275
|
| `timeout` | the existing native acknowledgement timeout won |
|
|
14191
14276
|
| `disconnected` | the request began disconnected or an in-flight disconnect won |
|
|
14192
14277
|
|
|
@@ -14208,7 +14293,7 @@ await socket.request('room:join', 'general', {
|
|
|
14208
14293
|
|
|
14209
14294
|
The client-wide hook receives every observed request; a request hook receives
|
|
14210
14295
|
only its invocation. If the same function is supplied in both places it runs
|
|
14211
|
-
once per phase. The closure is local:
|
|
14296
|
+
once per phase. The closure is local: StitchKit does not retain `operationId`,
|
|
14212
14297
|
add it to the event or transmit it to the peer. A request hook works without a
|
|
14213
14298
|
client-wide hook, and the no-hook path installs no phase listeners.
|
|
14214
14299
|
|
|
@@ -14594,7 +14679,7 @@ question: a list takes one of them, and `createEntityCacheHandlers` refuses both
|
|
|
14594
14679
|
|
|
14595
14680
|
The helper deliberately does **not** flatten pages, infer filter semantics,
|
|
14596
14681
|
derive a sort order or replace arbitrary `setQueryData` logic. Those remain
|
|
14597
|
-
declared application policies;
|
|
14682
|
+
declared application policies; StitchKit applies their generic cache mechanics.
|
|
14598
14683
|
|
|
14599
14684
|
## Raw binary lane (Bun)
|
|
14600
14685
|
|
|
@@ -14969,7 +15054,7 @@ is where the full name is *built*, not a second name for the same topic.
|
|
|
14969
15054
|
### The wire is the socket you already run
|
|
14970
15055
|
|
|
14971
15056
|
`toRealtimeContract` projects the declaration onto `RealtimeContract`. Everything
|
|
14972
|
-
after that is the machinery
|
|
15057
|
+
after that is the machinery StitchKit already ships — validation both ways,
|
|
14973
15058
|
rejection reporting, rooms, and the client's `retain:` replay.
|
|
14974
15059
|
|
|
14975
15060
|
```ts
|
|
@@ -15417,7 +15502,7 @@ The framework attaches no meaning to the strings — `'public'`, `'user'`,
|
|
|
15417
15502
|
## `createAuthHook`
|
|
15418
15503
|
|
|
15419
15504
|
`createAuthHook` builds one scope gate that can run in both HTTP and tool
|
|
15420
|
-
lifecycles. On HTTP it belongs in `hooks.authorize`:
|
|
15505
|
+
lifecycles. On HTTP it belongs in `hooks.authorize`: StitchKit validates path
|
|
15421
15506
|
params, resolves identity and scope, and rejects `401`/`403` **before reading a
|
|
15422
15507
|
JSON or multipart body**. On MCP, agent and CLI surfaces it belongs in
|
|
15423
15508
|
`access.gate.beforeHandle` (`access: { gate: { beforeHandle: authHook } }`),
|
|
@@ -15604,7 +15689,7 @@ export const implementFor = createScopedImplement<AuthScopes<typeof auth>>()
|
|
|
15604
15689
|
|
|
15605
15690
|
Only hooks that declare the selected scope run. An unknown scope fails closed;
|
|
15606
15691
|
when several hooks own one scope, every owner must pass in declaration order.
|
|
15607
|
-
Each owner evaluates on an isolated shadow context.
|
|
15692
|
+
Each owner evaluates on an isolated shadow context. StitchKit validates all
|
|
15608
15693
|
changed fields, rejects reserved/unsafe fields and cross-owner key collisions,
|
|
15609
15694
|
then commits the combined contribution once. A rejected or cancelled composite
|
|
15610
15695
|
therefore exposes no partial fields to the handler.
|
|
@@ -15855,7 +15940,7 @@ complete: async ({ response }) => {
|
|
|
15855
15940
|
}
|
|
15856
15941
|
```
|
|
15857
15942
|
|
|
15858
|
-
Append once per cookie;
|
|
15943
|
+
Append once per cookie; StitchKit preserves separate `Set-Cookie` fields through
|
|
15859
15944
|
both Bun and Node. Cookie/session policy remains application logic.
|
|
15860
15945
|
|
|
15861
15946
|
## The error model
|
|
@@ -16009,7 +16094,7 @@ onError: (ctx, err) => {
|
|
|
16009
16094
|
|
|
16010
16095
|
## One application vocabulary and one wire map
|
|
16011
16096
|
|
|
16012
|
-
`defineErrors` can also resolve
|
|
16097
|
+
`defineErrors` can also resolve StitchKit's framework codes into the same
|
|
16013
16098
|
application vocabulary. A status fallback is explicit because several
|
|
16014
16099
|
application codes may legally share one HTTP status:
|
|
16015
16100
|
|
|
@@ -16101,7 +16186,7 @@ retained on the returned `AppError`.
|
|
|
16101
16186
|
HTTP renders the complete code/status/message/details/hint. Tool transports keep
|
|
16102
16187
|
their established model-facing projection (code/details/hint, without HTTP
|
|
16103
16188
|
status), while `invokeOrThrow` recovers the exact normalized `AppError`. The
|
|
16104
|
-
codes and schemas remain application-owned;
|
|
16189
|
+
codes and schemas remain application-owned; StitchKit stays domain-free.
|
|
16105
16190
|
|
|
16106
16191
|
### The codes an operation refuses with
|
|
16107
16192
|
|
|
@@ -16188,7 +16273,7 @@ stitchkit code you did not list travels as itself. Set `unmappedCode` to one
|
|
|
16188
16273
|
wire-code when your public vocabulary has a catch-all, or to a function such as
|
|
16189
16274
|
`(code) => code.startsWith('FILE_') ? 'storage_error' : 'framework_error'` when
|
|
16190
16275
|
framework code families need different buckets. An explicit `codeMap` entry
|
|
16191
|
-
always wins. Codes your project throws itself do not belong to
|
|
16276
|
+
always wins. Codes your project throws itself do not belong to StitchKit's
|
|
16192
16277
|
vocabulary, so they never pass through this fallback and remain unchanged.
|
|
16193
16278
|
|
|
16194
16279
|
One `satisfies` is the **opt-in** to the stricter deal:
|
|
@@ -16250,7 +16335,7 @@ onError: (ctx, err) => {
|
|
|
16250
16335
|
|
|
16251
16336
|
# Browser OAuth and Google OIDC
|
|
16252
16337
|
|
|
16253
|
-
|
|
16338
|
+
StitchKit separates the browser's Authorization Code + PKCE transaction from the server's
|
|
16254
16339
|
provider credential verification. The application still owns navigation, users, account matching
|
|
16255
16340
|
and merge policy, persistence, sessions, roles, unlink policy and UI.
|
|
16256
16341
|
|
|
@@ -16258,13 +16343,13 @@ and merge policy, persistence, sessions, roles, unlink policy and UI.
|
|
|
16258
16343
|
|
|
16259
16344
|
The current Google adapter supports one explicit profile: **web OpenID Connect Authorization Code
|
|
16260
16345
|
with PKCE**. A browser performs a top-level redirect, an application backend exchanges the
|
|
16261
|
-
one-time code, and
|
|
16346
|
+
one-time code, and StitchKit returns a verified identity. It is the redirect-based sign-in path;
|
|
16262
16347
|
it is not a generic name for every Google identity or authorization mechanism.
|
|
16263
16348
|
|
|
16264
16349
|
Keep adjacent Google capabilities separate because their credentials, lifecycle and trust
|
|
16265
16350
|
boundaries differ:
|
|
16266
16351
|
|
|
16267
|
-
| Capability | Credential/result |
|
|
16352
|
+
| Capability | Credential/result | StitchKit support |
|
|
16268
16353
|
| --- | --- | --- |
|
|
16269
16354
|
| Web OIDC Authorization Code + PKCE | verified user identity | `stitchkit/oauth` + `stitchkit/google` |
|
|
16270
16355
|
| Google Identity Services button, One Tap or FedCM | browser-delivered ID credential | not implemented |
|
|
@@ -16346,7 +16431,7 @@ const identity = await google.exchangeAuthorizationCode({
|
|
|
16346
16431
|
|
|
16347
16432
|
The redirect must match the immutable allowlist exactly before any outbound call. The token
|
|
16348
16433
|
exchange is bounded by an abort deadline; `google-auth-library` verifies the ID-token signature,
|
|
16349
|
-
issuer, audience and expiry.
|
|
16434
|
+
issuer, audience and expiry. StitchKit additionally requires `sub`, a valid verified email and an
|
|
16350
16435
|
exact nonce. Access, refresh and raw ID tokens never leave the adapter.
|
|
16351
16436
|
|
|
16352
16437
|
`GoogleOidcError.code` distinguishes `MISCONFIGURED`, `INVALID_CREDENTIAL` and
|
|
@@ -16575,7 +16660,7 @@ bound observes the same drain under its own limit rather than starting another.
|
|
|
16575
16660
|
Passing no bound keeps the previous behaviour exactly, including the identical
|
|
16576
16661
|
returned promise.
|
|
16577
16662
|
|
|
16578
|
-
|
|
16663
|
+
StitchKit manages only in-process delivery. If process-crash durability matters,
|
|
16579
16664
|
make `write` enqueue into a consumer-owned durable outbox and let that adapter
|
|
16580
16665
|
own retry, replay and storage policy:
|
|
16581
16666
|
|
|
@@ -16863,7 +16948,7 @@ locally; you do not need to change `NODE_ENV` or deploy.
|
|
|
16863
16948
|
Every response the stitchkit handler produces carries the resolved id as
|
|
16864
16949
|
**`x-request-id`**. With `cors` configured it is in the default
|
|
16865
16950
|
`Access-Control-Expose-Headers`, so a browser client can read it and quote it in
|
|
16866
|
-
a bug report.
|
|
16951
|
+
a bug report. StitchKit browser clients retain it as `ApiError.traceId` on
|
|
16867
16952
|
response-backed failures. Note the deliberate asymmetry: inbound the id may arrive as
|
|
16868
16953
|
`X-Trace-Id` *or* `X-Request-Id`; outbound there is one name and no alias.
|
|
16869
16954
|
|
|
@@ -16915,7 +17000,7 @@ cross-origin `trace: true` client works out of the box. If you set a custom
|
|
|
16915
17000
|
the preflight will reject the trace header.
|
|
16916
17001
|
|
|
16917
17002
|
MCP tools use the same context. On a modern HTTP or stdio `tools/call`, the
|
|
16918
|
-
official SDK exposes W3C propagation values from request `_meta`;
|
|
17003
|
+
official SDK exposes W3C propagation values from request `_meta`; StitchKit
|
|
16919
17004
|
continues a valid `_meta.traceparent` before validation, lifecycle and hooks.
|
|
16920
17005
|
If MCP metadata omits `traceparent`, an HTTP call keeps its ambient HTTP trace
|
|
16921
17006
|
and a stdio call starts a new root. If the key is present but malformed or
|
|
@@ -17711,7 +17796,7 @@ of defect stays invisible in development.
|
|
|
17711
17796
|
|
|
17712
17797
|
### Shipping one self-contained artifact
|
|
17713
17798
|
|
|
17714
|
-
|
|
17799
|
+
StitchKit resolves the optional Socket.IO peers through a variable, so a
|
|
17715
17800
|
consumer bundling an unrelated `stitchkit/server` export never has to resolve
|
|
17716
17801
|
them. A bundler cannot follow that, which matters if you ship **one file** to a
|
|
17717
17802
|
machine with no `node_modules`: the package never enters the artifact and the
|
|
@@ -17734,7 +17819,7 @@ const socket = await createSocketIOServer({
|
|
|
17734
17819
|
|
|
17735
17820
|
The packed Next/Webpack gate compiles the browser
|
|
17736
17821
|
`peers.client: () => import('socket.io-client')` loader and rejects Webpack's
|
|
17737
|
-
"request is an expression" warning.
|
|
17822
|
+
"request is an expression" warning. StitchKit's runtime fallback remains lazy;
|
|
17738
17823
|
its emitted import carries a count-checked ignore directive.
|
|
17739
17824
|
|
|
17740
17825
|
Omit `peers` and nothing changes: the peers stay lazy and are resolved from the
|
|
@@ -17945,7 +18030,7 @@ await binding.promise
|
|
|
17945
18030
|
|
|
17946
18031
|
The first signal starts exactly one close chain. A same-turn duplicate is
|
|
17947
18032
|
ignored; a later signal restores the default OS disposition because the
|
|
17948
|
-
official stdio close is not abortable and
|
|
18033
|
+
official stdio close is not abortable and StitchKit will not pretend otherwise.
|
|
17949
18034
|
`binding.close()` removes idle listeners and resolves the promise with
|
|
17950
18035
|
`undefined`. No listener is installed until the binder is called, and the
|
|
17951
18036
|
framework never calls `process.exit()`.
|
|
@@ -18008,7 +18093,7 @@ stitchkit serves the API. A SPA front-end is built and hosted separately — a
|
|
|
18008
18093
|
static host or CDN in production, its own dev server in development. The backend
|
|
18009
18094
|
does not serve static files (`staticRoute` exists for the occasional asset, not
|
|
18010
18095
|
a whole app). `bun create stitchkit my-app` demonstrates the supported split:
|
|
18011
|
-
an independently built Next.js frontend and Bun/
|
|
18096
|
+
an independently built Next.js frontend and Bun/StitchKit API.
|
|
18012
18097
|
|
|
18013
18098
|
### MCP
|
|
18014
18099
|
|
|
@@ -18164,12 +18249,12 @@ per-transport tenant plumbing.
|
|
|
18164
18249
|
# Frontend integrations
|
|
18165
18250
|
|
|
18166
18251
|
The official `bun create stitchkit` application uses Next.js with a separate
|
|
18167
|
-
Bun API.
|
|
18252
|
+
Bun API. StitchKit remains a Fetch-native backend and does not own frontend
|
|
18168
18253
|
routing, SSR or HMR.
|
|
18169
18254
|
|
|
18170
18255
|
## Theme boundary in the official starter
|
|
18171
18256
|
|
|
18172
|
-
The generated Next.js application uses `@wrksz/themes`, not a
|
|
18257
|
+
The generated Next.js application uses `@wrksz/themes`, not a StitchKit-owned
|
|
18173
18258
|
theme abstraction. Its root `ThemeProvider` comes from `@wrksz/themes/next` and
|
|
18174
18259
|
lives directly in the server layout so Next 16 can inject the first-paint script
|
|
18175
18260
|
through `useServerInsertedHTML`. The default `hybrid` storage reads a cookie
|
|
@@ -18209,10 +18294,10 @@ export async function action({ request }: ActionFunctionArgs) {
|
|
|
18209
18294
|
|
|
18210
18295
|
## Vite
|
|
18211
18296
|
|
|
18212
|
-
Run Vite and the
|
|
18297
|
+
Run Vite and the StitchKit API as separate development processes. Declare one
|
|
18213
18298
|
proxy for `/api`, `/mcp` and `/socket.io`; browser code still calls the typed
|
|
18214
18299
|
client with same-origin paths. Production serves the static Vite output from a
|
|
18215
|
-
static host or reverse proxy and routes those backend paths to
|
|
18300
|
+
static host or reverse proxy and routes those backend paths to StitchKit.
|
|
18216
18301
|
|
|
18217
18302
|
Do not duplicate DTOs or handwritten API wrappers in either integration. The
|
|
18218
18303
|
shared contract remains the only transport schema source.
|
|
@@ -19436,7 +19521,7 @@ of git.
|
|
|
19436
19521
|
### Injecting another transport's failure policy
|
|
19437
19522
|
|
|
19438
19523
|
`classify(error)` returns the public `TelegramBroadcastFailure` union. It lets
|
|
19439
|
-
an application use its own client without adding that SDK to
|
|
19524
|
+
an application use its own client without adding that SDK to StitchKit:
|
|
19440
19525
|
|
|
19441
19526
|
```ts
|
|
19442
19527
|
const report = await runTelegramBroadcast({
|
|
@@ -20450,7 +20535,7 @@ The previous reader closes only after its in-flight lookups finish.
|
|
|
20450
20535
|
|
|
20451
20536
|
Use `GeoIpReaderLoader` when the database is not MaxMind-compatible. `revision`
|
|
20452
20537
|
must identify the complete input generation and return `null` when it cannot be
|
|
20453
|
-
read. `open` returns a reader for exactly that revision.
|
|
20538
|
+
read. `open` returns a reader for exactly that revision. StitchKit serializes
|
|
20454
20539
|
reloads, swaps generations and owns their close lifecycle.
|
|
20455
20540
|
|
|
20456
20541
|
Download schedules, licenses, database paths, attribution persistence and
|
|
@@ -20552,6 +20637,67 @@ charts, no merged cells and no streaming: an application that needs them takes a
|
|
|
20552
20637
|
|
|
20553
20638
|
# Upgrading stitchkit
|
|
20554
20639
|
|
|
20640
|
+
## Released migration: 0.135.0
|
|
20641
|
+
|
|
20642
|
+
### explicit-deadline-propagation
|
|
20643
|
+
|
|
20644
|
+
**Who must act:** applications relying on per-call `timeout` or contract `endpoint.timeout` in `createHttpClient` or `createClient` to emit the outbound `x-stitchkit-timeout-ms` deadline budget header without setting `propagateDeadline: true`.
|
|
20645
|
+
|
|
20646
|
+
In `0.135.0` (ADR 0337), `timeout` and contract `endpoint.timeout` bound the local client request only and no longer implicitly send `x-stitchkit-timeout-ms` (which triggered unexpected CORS preflights on third-party origins). Opt in explicitly at the client or call site:
|
|
20647
|
+
|
|
20648
|
+
```ts
|
|
20649
|
+
// Before (implicitly emitted x-stitchkit-timeout-ms when timeout was set)
|
|
20650
|
+
const http = createHttpClient({ baseUrl: '/api' });
|
|
20651
|
+
await http.get('/reports', { timeout: 5_000 });
|
|
20652
|
+
const api = createClient(reportsContract, { baseUrl: 'https://downstream.example' });
|
|
20653
|
+
await api.reports.list.withOptions({ timeout: 5_000 });
|
|
20654
|
+
|
|
20655
|
+
// After (explicit opt-in at client or call level)
|
|
20656
|
+
const http = createHttpClient({ baseUrl: '/api', propagateDeadline: true });
|
|
20657
|
+
await http.get('/reports', { timeout: 5_000 });
|
|
20658
|
+
// Or per call:
|
|
20659
|
+
await api.reports.list.withOptions({ timeout: 5_000, propagateDeadline: true });
|
|
20660
|
+
```
|
|
20661
|
+
|
|
20662
|
+
### toolkit-without-ai-peer
|
|
20663
|
+
|
|
20664
|
+
**Who must act:** applications calling `toolkit.mountAgent(...)` on an instance returned by `createToolkit<AppContext>()` from `stitchkit/tools/toolkit`.
|
|
20665
|
+
|
|
20666
|
+
In `0.135.0` (ADR 0338), `createToolkit` drops `mountAgent` so `stitchkit/tools/toolkit` never imports `ai` and installs cleanly with only `@modelcontextprotocol/server`. Replace `toolkit.mountAgent(...)` with peer-free `toolkit.mountAgentTools(...)`, or import `mountAgent` directly from `stitchkit/tools/agent` when driving a Vercel AI SDK loop:
|
|
20667
|
+
|
|
20668
|
+
```ts
|
|
20669
|
+
// Before
|
|
20670
|
+
const tools = createToolkit<AppContext>();
|
|
20671
|
+
const sdkTools = tools.mountAgent(services, { context, access });
|
|
20672
|
+
|
|
20673
|
+
// After (peer-free StitchKit agent-runtime)
|
|
20674
|
+
const tools = createToolkit<AppContext>();
|
|
20675
|
+
const agentTools = tools.mountAgentTools(services, { context, access });
|
|
20676
|
+
|
|
20677
|
+
// After (Vercel AI SDK loop)
|
|
20678
|
+
import { mountAgent } from 'stitchkit/tools/agent';
|
|
20679
|
+
const sdkTools = mountAgent(services, { context, access });
|
|
20680
|
+
```
|
|
20681
|
+
|
|
20682
|
+
### openrouter-separated-cache-write-price-ceiling
|
|
20683
|
+
|
|
20684
|
+
**Who must act:** applications using `evaluateOpenRouterModelAdmission`, `listOpenRouterModels`, or `resolveOpenRouterModelCeiling` from `stitchkit/agent-runtime/openrouter` that relied on `maxPromptUsdPerMillion` rejecting expensive cache-write rates or on `listOpenRouterModels` ignoring tiered prompt ceilings.
|
|
20685
|
+
|
|
20686
|
+
In `0.135.0`, `promptUsdPerMillion` ceilings and `maxPromptUsdPerMillion` check prompt rates only (including conditional tiers), while 5m/1h cache-write rates have their own `cacheWriteUsdPerMillion` ceiling and `maxCacheWriteUsdPerMillion` limit shared identically by admission and catalog filtering:
|
|
20687
|
+
|
|
20688
|
+
```ts
|
|
20689
|
+
// Before (maxPromptUsdPerMillion also rejected cacheWrite/cacheWrite1h in admission only)
|
|
20690
|
+
evaluateOpenRouterModelAdmission({ snapshot, modelId, policy: { maxPromptUsdPerMillion: 6 } });
|
|
20691
|
+
|
|
20692
|
+
// After (declare explicit cache-write cap when desired; both admission and listOpenRouterModels share semantics)
|
|
20693
|
+
evaluateOpenRouterModelAdmission({
|
|
20694
|
+
snapshot,
|
|
20695
|
+
modelId,
|
|
20696
|
+
policy: { maxPromptUsdPerMillion: 6, maxCacheWriteUsdPerMillion: 6 },
|
|
20697
|
+
});
|
|
20698
|
+
listOpenRouterModels(snapshot, { maxPromptUsdPerMillion: 6, maxCacheWriteUsdPerMillion: 6 });
|
|
20699
|
+
```
|
|
20700
|
+
|
|
20555
20701
|
## Released migration: 0.134.0
|
|
20556
20702
|
|
|
20557
20703
|
### agent-runtime-native-model-port
|
|
@@ -20606,7 +20752,13 @@ const runtime = createAgentRuntime({
|
|
|
20606
20752
|
- `anthropicProvider` from `stitchkit/agent-runtime/anthropic`
|
|
20607
20753
|
2. Replace `fromAiSdkTools(mountAgent(...))` with `mountAgentTools(...)` from `stitchkit/tools`, and replace custom AI SDK `tool(...)` declarations with `defineAgentTool(...)` from `stitchkit/tools`.
|
|
20608
20754
|
3. Replace direct `generateText` / `generateObject` helper calls with `completeText` / `completeObject` from `stitchkit/agent-runtime`, and replace `wrapLanguageModel` middleware with `wrapModelDriver` / `composeModelDrivers`.
|
|
20609
|
-
4.
|
|
20755
|
+
4. Check for every remaining `ai`-requiring `stitchkit` entrypoint — `stitchkit/tools/agent`, `stitchkit/tools/toolkit`, and `stitchkit/agent-runtime/ai-sdk` — before removing `ai` and `@openrouter/ai-sdk-provider` from `package.json`:
|
|
20756
|
+
- `stitchkit/tools/toolkit` (`createToolkit`) deliberately requires **both** `@modelcontextprotocol/server` and `ai` because it composes the MCP server factories and AI SDK `mountAgent` together (ADR 0284). Keeping a `stitchkit/tools/toolkit` import after removing `ai` fails clean installs and bundling (`Could not resolve: "ai"`).
|
|
20757
|
+
- If you used `createToolkit<AppContext>()` without AI SDK `mountAgent`, replace it with the narrow entrypoints directly:
|
|
20758
|
+
- MCP servers (`createMcpHandler`, `buildMcpServer`, `mountMcp`, `createStdioMcpServer`) → import from `stitchkit/tools/mcp` (requires only `@modelcontextprotocol/server`) and annotate the `context` factory return type (`context: (auth): AppContext => ({ ... })`).
|
|
20759
|
+
- Peer-free agent tools (`mountAgentTools`, `defineAgentTool`) → import from `stitchkit/tools` (zero optional peers).
|
|
20760
|
+
- CLI (`createCli`, `createCliInvoker`) → import from `stitchkit/cli` (zero optional peers; annotate `context: (auth): AppContext => ({ ... })`).
|
|
20761
|
+
- Once no imports of `stitchkit/tools/agent`, `stitchkit/tools/toolkit`, or `stitchkit/agent-runtime/ai-sdk` remain (`rg "stitchkit/(tools/agent|tools/toolkit|agent-runtime/ai-sdk)" .`), remove `ai` and `@openrouter/ai-sdk-provider` from `package.json`.
|
|
20610
20762
|
|
|
20611
20763
|
```ts
|
|
20612
20764
|
// After (Step 2: completely peer-free)
|
|
@@ -22729,7 +22881,7 @@ succeeds, its result stays on stdout, stderr names the refusal and the exit is n
|
|
|
22729
22881
|
A JS bundle uses `delivery: 'companion'`; every shape is in the [native I/O guide](./native-io.md). Search pattern:
|
|
22730
22882
|
`createCli` with a `download` option in a project that runs `bun build` for macOS.
|
|
22731
22883
|
2. On Windows, run the download through Linux or macOS, or read the URLs from the operation's
|
|
22732
|
-
JSON result and fetch them yourself.
|
|
22884
|
+
JSON result and fetch them yourself. StitchKit offers no weaker path on that platform.
|
|
22733
22885
|
3. A download now replaces a file rather than rewriting it. Give the process write permission on
|
|
22734
22886
|
the output directory, and do not point it at a bind-mounted file: that refuses with `EBUSY`. A
|
|
22735
22887
|
replaced file belongs to the process user, and a read-only file is replaced like any other.
|
|
@@ -23151,7 +23303,7 @@ pipes drain.
|
|
|
23151
23303
|
read `asset.sourcePath`, hash the addon themselves, switch over the refusal `state`/`code`, pass a
|
|
23152
23304
|
`platform` other than the literal `'darwin'`, or parse `node_modules/stitchkit/native-assets.json`.
|
|
23153
23305
|
|
|
23154
|
-
The package now publishes the `size` and SHA256 of each Darwin addon, computed when
|
|
23306
|
+
The package now publishes the `size` and SHA256 of each Darwin addon, computed when StitchKit is
|
|
23155
23307
|
built, in `native-assets.json` at `formatVersion: 2`. `createNativePackaging` reads each selected
|
|
23156
23308
|
addon once, compares it with that digest and returns the verified bytes. An installed addon that
|
|
23157
23309
|
differs refuses with `NATIVE_ASSET_DIGEST_MISMATCH`.
|
|
@@ -24426,7 +24578,7 @@ If you operate a built-in SQLite store file:
|
|
|
24426
24578
|
|
|
24427
24579
|
1. Back the file up. The first open by 0.86.0 migrates it to schema 2 in one
|
|
24428
24580
|
transaction and there is no way back: a 0.85.x package refuses a migrated
|
|
24429
|
-
file with `Unsupported
|
|
24581
|
+
file with `Unsupported StitchKit agent-runtime SQLite schema version 2`.
|
|
24430
24582
|
2. Check the build for FTS5 before deploying:
|
|
24431
24583
|
|
|
24432
24584
|
```sql
|
|
@@ -26645,7 +26797,7 @@ runtime callback arguments; only `.withOptions` reads `ClientRequestOptions`.
|
|
|
26645
26797
|
### HTTP auth moves to the pre-body `authorize` phase
|
|
26646
26798
|
|
|
26647
26799
|
Move the HTTP wiring of `createAuthHook` from `beforeHandle` to `authorize`.
|
|
26648
|
-
This lets
|
|
26800
|
+
This lets StitchKit reject an unauthorized JSON or multipart request after path
|
|
26649
26801
|
parameter validation but before reading a body chunk. Keep application
|
|
26650
26802
|
preconditions that depend on validated input in `beforeHandle`.
|
|
26651
26803
|
|
|
@@ -26788,7 +26940,7 @@ collected tool logs from stdout.
|
|
|
26788
26940
|
|
|
26789
26941
|
### MCP TypeScript SDK v2 and protocol `2026-07-28`
|
|
26790
26942
|
|
|
26791
|
-
This is a hard cut: there is one
|
|
26943
|
+
This is a hard cut: there is one StitchKit API and no v1 aliases. Applications
|
|
26792
26944
|
that expose MCP install the split server package; applications that implement an
|
|
26793
26945
|
MCP host or run client E2E install the split client package.
|
|
26794
26946
|
|
|
@@ -26864,7 +27016,7 @@ modern-only. This is not a stateful compatibility transport.
|
|
|
26864
27016
|
|
|
26865
27017
|
#### Output shape depends on the negotiated protocol era
|
|
26866
27018
|
|
|
26867
|
-
|
|
27019
|
+
StitchKit always validates the handler result against the declared output
|
|
26868
27020
|
schema. The negotiated MCP era determines only its wire representation:
|
|
26869
27021
|
|
|
26870
27022
|
| Negotiated era | Non-object `structuredContent` |
|
|
@@ -26929,7 +27081,7 @@ mountOAuthProvider({
|
|
|
26929
27081
|
A URL client id must be HTTPS and serve a document whose `client_id` exactly
|
|
26930
27082
|
matches that URL, with explicit `redirect_uris` and
|
|
26931
27083
|
`token_endpoint_auth_method: 'none'`. Do not keep a consumer-side metadata
|
|
26932
|
-
fetcher or DCR fallback;
|
|
27084
|
+
fetcher or DCR fallback; StitchKit owns SSRF-safe resolution and caching.
|
|
26933
27085
|
|
|
26934
27086
|
Multi-round input is opt-in on the operation and does not change Agent, CLI or
|
|
26935
27087
|
ordinary HTTP handlers:
|
|
@@ -27049,7 +27201,7 @@ summarizeTransports(surface)
|
|
|
27049
27201
|
`ToolNameEntry` adds `kind: 'contract' | 'runtime'`. `TransportSummary` is now
|
|
27050
27202
|
`{ contractServices, runtimeTools, totals, sources }`; replace `services` and
|
|
27051
27203
|
`perService` reads with the explicit counts and mixed-source breakdown. There
|
|
27052
|
-
is no positional overload and no `buildRuntimeToolManifest`:
|
|
27204
|
+
is no positional overload and no `buildRuntimeToolManifest`: StitchKit owns the
|
|
27053
27205
|
combined order, transport filtering, canonical presentation schema and
|
|
27054
27206
|
cross-origin collision checks.
|
|
27055
27207
|
|
|
@@ -27117,7 +27269,7 @@ createMcpHandler({
|
|
|
27117
27269
|
```
|
|
27118
27270
|
|
|
27119
27271
|
Keep direct `services(auth)` / `runtimeTools(auth)` only for genuinely
|
|
27120
|
-
unbounded definitions;
|
|
27272
|
+
unbounded definitions; StitchKit intentionally does not cache arbitrary auth
|
|
27121
27273
|
values.
|
|
27122
27274
|
|
|
27123
27275
|
Contract success bodies are now determined by the presence of `output`, not by
|
|
@@ -27290,7 +27442,7 @@ mountable.argumentSchema // executable CLI argument adapter only
|
|
|
27290
27442
|
|
|
27291
27443
|
Contract and native handlers keep their original Zod schemas; MCP and agent SDK
|
|
27292
27444
|
adapters now forward raw arguments so defaults, coercions, refinements and
|
|
27293
|
-
transforms execute exactly once inside
|
|
27445
|
+
transforms execute exactly once inside StitchKit. There are no compatibility
|
|
27294
27446
|
exports for `flattenDiscriminatedUnion`, `flattenUnionsDeep` or
|
|
27295
27447
|
`MountableTool.schema`. → ADR 0050
|
|
27296
27448
|
|
|
@@ -27764,7 +27916,7 @@ The browser-and-server entrypoint. Re-exports everything from
|
|
|
27764
27916
|
| `createSocketIOClient` | function | low-level typed Socket.IO transport primitive — [guide](../guide/realtime.md#low-level-transport) |
|
|
27765
27917
|
| `defineRealtimeContract` | function | Zod-first shared Socket.IO event contract — [guide](../guide/realtime.md#zod-first-event-contract) |
|
|
27766
27918
|
| `createRealtimeClient` | function | inferred, runtime-validated Socket.IO client — [guide](../guide/realtime.md#client--createrealtimeclient) |
|
|
27767
|
-
| `bindRealtimeClient` | function | bind contract validation and typed acknowledgements to an existing
|
|
27919
|
+
| `bindRealtimeClient` | function | bind contract validation and typed acknowledgements to an existing StitchKit client transport without owning its lifecycle |
|
|
27768
27920
|
| `createLiveStateController` | function | keep typed application state current across one source-owned snapshot/event generation with finite pre-snapshot buffering, generation fencing and explicit resync — [guide](../guide/realtime.md#snapshot--event-state-synchronization) |
|
|
27769
27921
|
| `LiveStateController` | _type_ | renderer-neutral `start` / `resync` / `getSnapshot` / `subscribe` / `close` handle |
|
|
27770
27922
|
| `LiveStateControllerConfig` | _type_ | typed source, reducer, explicit event/byte bounds, event sizing and isolated error hooks |
|
|
@@ -27923,7 +28075,7 @@ from the root `stitchkit`.
|
|
|
27923
28075
|
| `PathParams` | _type_ | infer named `:segments` and a terminal `*wildcard` from a path literal as string params |
|
|
27924
28076
|
| `ContractMeta` | _type_ | a contract's `prefix` + optional `scope` and `meta` (a default every endpoint shallow-merges over) |
|
|
27925
28077
|
| `EndpointDef` | _type_ | a single endpoint definition; `output` declares JSON response presence (`null` is data, `undefined` is invalid); optional `timeout` bounds both client calls and server-side deadline clamping; optional `effect?: OperationEffect` declares `'read' \| 'write'` side effects; `safelistedBody: true` admits the JSON body as `text/plain` from an allow-listed `Origin` — [guide](../guide/server.md#safelisted-request-bodies-beacons) |
|
|
27926
|
-
| `DEADLINE_BUDGET_HEADER` | constant | `'x-stitchkit-timeout-ms'` — relative remaining call budget in integer milliseconds propagated across HTTP hops (`createHttpClient` / `createClient` outbound
|
|
28078
|
+
| `DEADLINE_BUDGET_HEADER` | constant | `'x-stitchkit-timeout-ms'` — relative remaining call budget in integer milliseconds propagated across HTTP hops when explicitly opted in via `propagateDeadline: true` (`createHttpClient` / `createClient` outbound — never auto-enabled by `timeout` or `endpoint.timeout`, ADR 0337 — `createHandler` / `createServer` inbound with contract-ceiling clamping, `408 REQUEST_TIMEOUT` on `'0'`, linked `ctx.signal`, and `ctx.remainingTimeoutMs(reserveMs?)`) |
|
|
27927
28079
|
| `OperationEffect` / `OperationEffectSchema` | _type_ / schema | closed `'read' \| 'write'` side-effect classification declared on contract endpoints |
|
|
27928
28080
|
| `contractOperationEffects` / `requireContractOperationEffects` | function | project declared endpoint `effect` tags from a contract; `requireContractOperationEffects` fails closed and lists every operation missing `effect` |
|
|
27929
28081
|
| `withToolView` | function | declare an endpoint's call and answer on the tool surface (MCP, AGENT, CLI): input `defaults`, and optionally a view `output` and a `project`, typed against the endpoint's own schemas; HTTP keeps the full answer — [guide](../guide/mcp-and-agents.md#a-different-answer-for-tools--withtoolview) |
|
|
@@ -28725,7 +28877,7 @@ Server-only, peer-free optional application runtime. Runs models exclusively thr
|
|
|
28725
28877
|
| `createAgentRuntime` | function | compose durable acceptance, native `AgentModelDriver` step loop, tool parsing/validation, WebCrypto HMAC-SHA256 tool approvals, `beforeStepToolCalls`, bounded terminal continuations (`maxContinuations`), `onAttemptDiscarded`, `onToolInputStart`, checkpoints, coordination, managed tools and winner-only terminal publication; reconciles same-owner terminal/interrupt/head CAS races before releasing the lane |
|
|
28726
28878
|
| `createDeferredAgentToolSurface` | function | bounded canonical catalog search plus durable same-run activation of direct `mountAgentTools` tools; supports one immutable surface or a finite identity-specific registry |
|
|
28727
28879
|
| `DeferredAgentToolSearchInputSchema` / `DeferredAgentToolMatchSchema` / `DeferredAgentToolReceiptSchema` | schema | bounded search input, public match and versioned durable selection receipt |
|
|
28728
|
-
| `DeferredAgentToolSurfaceConfig` / `DeferredAgentToolCommonConfig` / `DeferredAgentToolSurfaceDefinition` / `DeferredAgentToolController` | _type_ | finite catalogs, selector, pin, budget and `mount`/`prepareStep` composition contracts |
|
|
28880
|
+
| `DeferredAgentToolSurfaceConfig` / `DeferredAgentToolCommonConfig` / `DeferredAgentToolSurfaceDefinition` / `DeferredAgentToolController` | _type_ | finite catalogs, selector, pin, budget and `mount`/`prepareStep`/`repairToolCall` composition contracts |
|
|
28729
28881
|
| `DeferredAgentRuntimeToolDefinition` / `DeferredAgentToolMountConfig` | _type_ | peer-free Agent-only runtime definition and canonical mount configuration accepted by the controller |
|
|
28730
28882
|
| `DeferredAgentToolManifestEntry` / `DeferredAgentToolSearchContext` / `DeferredAgentToolReceipt` | _type_ | canonical selector input and inferred durable receipt records |
|
|
28731
28883
|
| `DeferredAgentToolEvent` | _type_ | PII-free search/step evidence with surface, provenance, counts, canonical schema bytes and ceilings |
|
|
@@ -28853,7 +29005,7 @@ the same native step execution without requiring a store. → ADR 0336.
|
|
|
28853
29005
|
| `completeObject` / `CompleteObjectInput` / `CompleteObjectResult` | function / _types_ | peer-free structured-output completion emitting strict JSON Schema (`draft-2020-12` via `toJsonSchema(..., 'input')`), stripping strict-mode optional `null`s prior to Zod validation, and supporting multi-step tool loops |
|
|
28854
29006
|
| `AgentStructuredOutputError` / `AgentStructuredOutputErrorReason` / `AgentStructuredOutputErrorDetails` | class / _types_ | typed error thrown by `completeObject` with `reason` (`'truncated' \| 'tool-calls' \| 'content-filter' \| 'provider-error' \| 'interrupted' \| 'empty' \| 'invalid-json' \| 'schema-mismatch'`), `finishReason`, `rawText`, `steps`, and `usage` |
|
|
28855
29007
|
| `AgentRetryExhaustedError` / `AgentRetryExhaustedErrorDetails` / `AgentRetryAttemptRecord` | class / _types_ | typed error thrown when stateless completion retries exhaust `retry.maxAttempts` or `maxRetryDurationMs`, carrying every failed attempt, `lastError`, and accumulated billable `usage` |
|
|
28856
|
-
| `AgentProviderError` / `AgentProviderErrorDetails` / `isAgentProviderError` | class / _type_ / function | canonical provider HTTP/envelope error carrying `provider`, `statusCode`, `code`, `errorType`, `requestId`, `retryAfterMs`, `failureReason`, redacted safe message, and runtime type guard |
|
|
29008
|
+
| `AgentProviderError` / `AgentProviderErrorDetails` / `isAgentProviderError` | class / _type_ / function | canonical provider HTTP/envelope error carrying `provider`, `statusCode`, `code`, `errorType`, `requestId`, `retryAfterMs`, optional `retryable` (e.g. `false` when `x-should-retry: false`), `failureReason`, redacted safe message, and runtime type guard |
|
|
28857
29009
|
| `AgentUnknownToolError` / `AgentInvalidToolInputError` | class | PII-safe tool-dispatch errors for unknown/inactive tools and invalid JSON or Zod tool inputs |
|
|
28858
29010
|
| `AgentToolApprovalError` / `AgentToolApprovalErrorReason` / `AgentInvalidToolApprovalSignatureError` / `AgentToolCallNotFoundForApprovalError` | class / _type_ | typed failures and machine reason codes (`'invalid-signature' \| 'call-not-found' \| 'input-validation-failed' \| 'input-mutated' \| 'invalid-policy-decision' \| 'approval-unsupported'`) for invalid approval payloads, WebCrypto HMAC-SHA256 signature verification failure, unresolved approval call IDs, or standalone fail-closed `needsApproval` refusal |
|
|
28859
29011
|
| `AgentToolApprovalConfiguration` / `AgentToolApprovalDecision` / `AgentToolApprovalCallOptions` / `AgentToolApprovalToolRule` | _type_ | per-call or per-tool approval policy evaluated by the native step loop |
|
|
@@ -29215,7 +29367,7 @@ protocol but exclude runtime `context`. Submit permits only strict text/file par
|
|
|
29215
29367
|
file ownership and metadata policy are checked by server authorization. The shared
|
|
29216
29368
|
`agentControlRealtimeContract` owns `agent:control` acknowledgements and `agent:delivery`.
|
|
29217
29369
|
|
|
29218
|
-
`createAgentController` / `AgentControllerConfig` take an existing
|
|
29370
|
+
`createAgentController` / `AgentControllerConfig` take an existing StitchKit
|
|
29219
29371
|
realtime `transport`, `conversationId`, `access` (`observe` or `control`), optional
|
|
29220
29372
|
`timeoutMs` (10000), `maxBufferedEvents` (256), `maxBufferedBytes` (1048576) and
|
|
29221
29373
|
`maxPendingRequests` (32). All bounds are positive safe integers. One controller owns one
|
|
@@ -29255,13 +29407,13 @@ Server-only, peer-free native OpenRouter provider over Web `fetch` and Chat Comp
|
|
|
29255
29407
|
| `normalizeOpenRouterUsage` | function | provenance-aware normalization of raw OpenRouter `usage` payloads (including BYOK `cost_details.upstream_inference_cost` with `computed` cost provenance; missing counters stay `unavailable`) |
|
|
29256
29408
|
| `createOpenRouterRouteResolver` / `OpenRouterRouteResolver` / `createMemoryOpenRouterRouteStore` / `OpenRouterRouteStore` / `OpenRouterRoutePinSchema` / `OpenRouterRoutePin` | functions / _types_ / schema | keep a thread on one upstream outside the agent runtime: `session-sticky` (its `session_id`; a key over 256 characters is hashed) or `provider-order` (the upstream slug that answered first, from `record`, with `allowFallbacks: false` unless the base policy says otherwise); a pin replaces the base policy's route; the memory store is least-recently-used, bounded by `maxEntries` and `ttlMs` |
|
|
29257
29409
|
| `loadOpenRouterCatalogSnapshot` / `fetchOpenRouterModelEndpoints` / `OpenRouterSnapshotOptions` / `OpenRouterCatalogSnapshotSchema` / `OpenRouterCatalogSnapshot` / `OpenRouterSnapshotModelSchema` / `OpenRouterSnapshotModel` / `OpenRouterEndpointSchema` / `OpenRouterEndpoint` / `OpenRouterPricingTierSchema` / `OpenRouterPricingTier` / `OpenRouterModelAliasTargetSchema` / `OpenRouterModelAliasTarget` / `OpenRouterModelReasoningMetaSchema` / `OpenRouterModelReasoningMeta` | functions / _types_ / schemas | a timestamped snapshot of `/models` (supporting unauthenticated public reads or static/async `apiKey`, full model metadata including `canonicalSlug`, `description`, `createdAt`, `aliasTarget`, `inputModalities`, `outputModalities`, `tokenizer`, `topProviderContextLength`, `maxCompletionTokens`, `reasoning`, per-million/request/image/cache prices including `cacheWrite1hUsdPerMillion` and conditional `pricingTiers` — distinguishing omitted keys from explicit `null`/`-1` unknowns, never treating unknown as zero — rejecting paginated truncation and duplicate ids) and per-model endpoints (including `cacheWrite1hUsdPerMillion`, `latencyP50Ms`, `throughputP50`, `uptime1d`, `tag`); ids are checked as `author/slug` (or `~author/slug`) before the network, endpoint requests run 1–16 at once and stop at the first failure, bodies are bounded, redirects refused |
|
|
29258
|
-
| `resolveOpenRouterModelCeiling` / `OpenRouterModelPricingCeilingSchema` / `OpenRouterModelPricingCeiling` / `summarizeOpenRouterEndpoints` / `OpenRouterEndpointSummarySchema` / `OpenRouterEndpointSummary` | functions / schemas / _types_ | compute
|
|
29259
|
-
| `findOpenRouterModel` / `listOpenRouterModels` / `OpenRouterModelFilter` | functions / _type_ | query an `OpenRouterCatalogSnapshot` by exact `id` or `canonicalSlug`, or filter models by `tools`, `reasoning` (`reasoning`, `include_reasoning`, or declared efforts), `inputModalities`, `outputModalities`, `minContextLength` (via effective context `min(contextLength, topProviderContextLength)`), `maxPromptUsdPerMillion`, `maxCompletionUsdPerMillion`, `freeOnly`, and `author` |
|
|
29410
|
+
| `resolveOpenRouterModelCeiling` / `OpenRouterModelPricingCeilingSchema` / `OpenRouterModelPricingCeiling` / `summarizeOpenRouterEndpoints` / `OpenRouterEndpointSummarySchema` / `OpenRouterEndpointSummary` | functions / schemas / _types_ | compute separated worst-case pricing ceilings (`promptUsdPerMillion`, `completionUsdPerMillion`, `cacheWriteUsdPerMillion`, `requestUsd`) across base rates, 5m/1h cache-write rates (`cacheWriteUsdPerMillion`, `cacheWrite1hUsdPerMillion`), conditional `pricingTiers`, and UTC-window overrides (refusing to understate unknown/unrepresentable conditional pricing) and aggregate distinct upstream provider count, median latency/throughput, and 1-day uptime across a model's endpoints |
|
|
29411
|
+
| `findOpenRouterModel` / `listOpenRouterModels` / `OpenRouterModelFilter` | functions / _type_ | query an `OpenRouterCatalogSnapshot` by exact `id` or `canonicalSlug`, or filter models by `tools`, `reasoning` (`reasoning`, `include_reasoning`, or declared efforts), `inputModalities`, `outputModalities`, `minContextLength` (via effective context `min(contextLength, topProviderContextLength)`), `maxPromptUsdPerMillion`, `maxCompletionUsdPerMillion`, `maxCacheWriteUsdPerMillion` (using the same ceiling semantics as `evaluateOpenRouterModelAdmission`), `freeOnly`, and `author` |
|
|
29260
29412
|
| `createOpenRouterCatalogCache` / `OpenRouterCatalogCache` / `OpenRouterCatalogCacheOptions` / `OpenRouterCatalogCacheReadResult` / `OpenRouterCatalogStore` | function / _types_ | Web Fetch-clean cached OpenRouter catalog reader with single-flight coalescing, per-caller `AbortSignal` isolation, `freshMs` TTL, `retryBackoffMs` stale fallback, optional pluggable persistence (`store`), and `read`/`refresh`/`getModel`/`listModels`; `OpenRouterCatalogCacheReadResult` is a discriminated union on `status` (`'current' \| 'stale' \| 'unavailable'`) narrowing `snapshot`, `observedAt`, `models`, and `lastError` without casts (use `read()` for admission/billing decisions; `getModel`/`listModels` map `'unavailable'` to `undefined`/`[]`) |
|
|
29261
|
-
| `evaluateOpenRouterModelAdmission` / `OpenRouterAdmissionPolicySchema` / `OpenRouterAdmissionPolicy` / `OpenRouterModelAdmissionSchema` / `OpenRouterModelAdmission` / `OpenRouterAdmissionReasonSchema` / `OpenRouterAdmissionReason` | function / schemas / _types_ | decide one model from a stored snapshot: `admitted`, `unverified` (stale or future-dated snapshot, `'context-unknown'`, `'price-unknown'`, `'endpoints-unknown'`) or `rejected` with a reason (`requiredParameters`, `requiredInputModalities`, effective context `min(contextLength, topProviderContextLength)`, worst-case pricing ceilings via `resolveOpenRouterModelCeiling`, live endpoint); `~`, `-latest`, `:batch`, `stealth/`, `openrouter/auto`, `aliasOf`, and `aliasTarget` models are always refused as `'floating-alias'`; the result is a schema, so a stored decision reads back |
|
|
29413
|
+
| `evaluateOpenRouterModelAdmission` / `OpenRouterAdmissionPolicySchema` / `OpenRouterAdmissionPolicy` / `OpenRouterModelAdmissionSchema` / `OpenRouterModelAdmission` / `OpenRouterAdmissionReasonSchema` / `OpenRouterAdmissionReason` | function / schemas / _types_ | decide one model from a stored snapshot: `admitted`, `unverified` (stale or future-dated snapshot, `'context-unknown'`, `'price-unknown'`, `'endpoints-unknown'`) or `rejected` with a reason (`requiredParameters`, `requiredInputModalities`, effective context `min(contextLength, topProviderContextLength)`, separated worst-case pricing ceilings `maxPromptUsdPerMillion` / `maxCompletionUsdPerMillion` / `maxCacheWriteUsdPerMillion` via `resolveOpenRouterModelCeiling`, live endpoint); `~`, `-latest`, `:batch`, `stealth/`, `openrouter/auto`, `aliasOf`, and `aliasTarget` models are always refused as `'floating-alias'`; the result is a schema, so a stored decision reads back |
|
|
29262
29414
|
| `openRouterSpendProvider` / `createOpenRouterSpendReconciler` | functions | OpenRouter for `stitchkit/spend`: the gateway provider (origin, key read per call, usage format) and the reconciler that prices an attempt by its generation id (`GET /api/v1/generation`; a 404 is "not yet"; `apiKey` may be a function of the record, since OpenRouter prices a generation only for the key that made it) |
|
|
29263
29415
|
| `OpenRouterHttpError` | class | a non-2xx answer from OpenRouter, with its `status` |
|
|
29264
|
-
| `openRouterModelCatalog` | function | complete tool-capable text catalog plus independent weekly popularity and available benchmark observations (optional static or async `apiKey`); a `timeoutMs` that is not an integer from 1 to 2147483647 ms (the timer range) is refused when the catalog is created (`RangeError`) |
|
|
29416
|
+
| `openRouterModelCatalog` | function | complete tool-capable text catalog (`sort=top-weekly`) plus independent weekly popularity and available benchmark observations (optional static or async `apiKey`); a `timeoutMs` that is not an integer from 1 to 2147483647 ms (the timer range) is refused when the catalog is created (`RangeError`) |
|
|
29265
29417
|
| `OpenRouterModelCatalogOptions` / `OpenRouterCatalogFetch` | _type_ | optional static/dynamic credential, timeout, clock and injected fetch boundary for catalog loading |
|
|
29266
29418
|
|
|
29267
29419
|
## `stitchkit/agent-runtime/openai`
|
|
@@ -29285,12 +29437,16 @@ structured outputs, `prompt_cache_key`, and fail-fast refusal of unsupported set
|
|
|
29285
29437
|
## `stitchkit/agent-runtime/anthropic`
|
|
29286
29438
|
|
|
29287
29439
|
Server-only, peer-free native Anthropic Messages API (`POST /v1/messages`) provider over Web
|
|
29288
|
-
`fetch` and SSE. Enforces mandatory `maxOutputTokens
|
|
29289
|
-
fail-fast
|
|
29440
|
+
`fetch` and SSE. Enforces mandatory `maxOutputTokens`, `maxOutputTokens > thinking.budgetTokens`,
|
|
29441
|
+
and fail-fast refusal of `temperature`/`topP`/`topK` under effective `anthropic-version >= 2026-10-21`
|
|
29442
|
+
before any HTTP call, preserves verbatim multi-block `thinking` + `signature` and
|
|
29290
29443
|
`redacted_thinking` blocks, splits images out of `is_error` tool results, budgets ≤ 4 cache
|
|
29291
29444
|
breakpoints with TTL-order validation, computes total `inputTokens = input_tokens + cache_read +
|
|
29292
29445
|
cache_creation` with `computed` provenance (ADR 0109), maps `output_config.format` JSON Schema
|
|
29293
|
-
(refusing schemaless `json-object`), and classifies `529 overloaded_error`
|
|
29446
|
+
(rewriting `oneOf` to `anyOf`, refusing schemaless `json-object`), and classifies `529 overloaded_error`
|
|
29447
|
+
as retryable, `timeout_error` (HTTP and mid-stream SSE) as `'timeout'`, `billing_error` and
|
|
29448
|
+
`error.details.error_code: 'enforced_spend_limit_reached'` as non-retryable `'insufficient-credits'`,
|
|
29449
|
+
while honoring `x-should-retry: false`.
|
|
29294
29450
|
→ ADR 0336.
|
|
29295
29451
|
|
|
29296
29452
|
| Export | Kind | Summary |
|
|
@@ -29298,20 +29454,20 @@ cache_creation` with `computed` provenance (ADR 0109), maps `output_config.forma
|
|
|
29298
29454
|
| `anthropicProvider` | function | native peer-free `AgentModelDriverFactory` targeting Anthropic Messages (`POST /v1/messages`) |
|
|
29299
29455
|
| `AnthropicProviderSettings` | _type_ | `{ apiKey, baseUrl?, apiVersion?, betas?, headers?, fetch?, extraBody? }` — merges `anthropic-beta` flags deterministically, refuses `extraBody` clashes, and enforces `redirect: 'error'` |
|
|
29300
29456
|
| `AnthropicProviderAccess` | _type_ | `{ defaultPolicy?, resolvePolicy?(modelId) }` — validates `defaultPolicy` up front and resolves per-model policy |
|
|
29301
|
-
| `AnthropicRequestPolicySchema` / `AnthropicRequestPolicy` | schema / _type_ | validated Messages API request policy (`maxOutputTokens`, `thinking`, `effort
|
|
29457
|
+
| `AnthropicRequestPolicySchema` / `AnthropicRequestPolicy` | schema / _type_ | validated Messages API request policy (`maxOutputTokens`, `thinking`, `effort` (`'low' \| 'medium' \| 'high' \| 'xhigh' \| 'max'`), `cacheControl`, `eagerInputStreaming`, `disableParallelToolUse`, `serviceTier`, `betas`) |
|
|
29302
29458
|
| `AnthropicThinkingPolicySchema` / `AnthropicThinkingPolicy` | schema / _type_ | thinking mode (`{ type: 'adaptive' }`, `{ type: 'enabled', budgetTokens }` with `budgetTokens >= 1024`, or `{ type: 'disabled' }`) |
|
|
29303
29459
|
| `normalizeAnthropicUsage` | function | provenance-aware normalization of Anthropic `usage` objects, assembling total `inputTokens` with `computed` provenance when cache counters are positive |
|
|
29304
29460
|
|
|
29305
29461
|
## `stitchkit/agent-runtime/ai-sdk`
|
|
29306
29462
|
|
|
29307
|
-
Server-only evolving optional-peer adapter (`ai`). Adapts any AI SDK
|
|
29463
|
+
Server-only evolving optional-peer adapter (`ai`). Adapts any AI SDK (`LanguageModelV4` from `ai@7`) or
|
|
29308
29464
|
`ToolSet` onto `AgentModelDriver` and `AgentToolSet` without importing `streamText` or
|
|
29309
29465
|
`generateText`, keeping `stitchkit/agent-runtime` and all three native providers free of AI SDK
|
|
29310
29466
|
dependencies. → ADR 0336.
|
|
29311
29467
|
|
|
29312
29468
|
| Export | Kind | Summary |
|
|
29313
29469
|
|--------|------|---------|
|
|
29314
|
-
| `fromAiSdkModel` | function | wrap an AI SDK
|
|
29470
|
+
| `fromAiSdkModel` | function | wrap an AI SDK `LanguageModelV4` from `ai@7` (`specificationVersion: 'v4'`) as a single-step `AgentModelDriver` driving `model.doStream()` directly |
|
|
29315
29471
|
| `FromAiSdkModelOptions` | _type_ | optional `{ normalizeUsage?, resolveResponseProvider? }` hooks for mapping AI SDK step usage and gateway `providerMetadata` |
|
|
29316
29472
|
| `fromAiSdkTools` | function | async adapter converting an AI SDK `ToolSet` into a peer-free `AgentToolSet`; refuses provider-defined tools (`type: 'provider'`) and normalizes legacy deprecated tool outputs into canonical `{ type: 'file', data, mediaType }` parts |
|
|
29317
29473
|
|
|
@@ -29545,7 +29701,7 @@ loaded by the neutral, browser or Node runtime surfaces.
|
|
|
29545
29701
|
| `createBunSqliteAgentRuntimeStore` | function | open an owned Bun SQLite connection, initialize/validate the schema, migrate older versions transactionally and return `{ store, conversations, host, close }` |
|
|
29546
29702
|
| `BunSqliteAgentRuntimeStoreConfig` | _type_ | database filename plus optional create and initialization policies |
|
|
29547
29703
|
| `createSqliteAgentRuntimeStore` | function | build the normalized store over an injected synchronous SQLite boundary |
|
|
29548
|
-
| `initializeAgentRuntimeSqlite` | function | initialize or validate only
|
|
29704
|
+
| `initializeAgentRuntimeSqlite` | function | initialize or validate only StitchKit's namespaced SQLite schema |
|
|
29549
29705
|
| `SqliteDatabase` / `SqliteStatement` / `SqliteValue` | _type_ | minimal runtime-neutral synchronous SQLite boundary |
|
|
29550
29706
|
| `SqliteAgentRuntimeStore` / `SqliteAgentRuntimeStoreConfig` | _type_ | durable store handle — `store`, `conversations`, `host`, `close` — owned connection lifecycle, initialization policy, and the companion host every companion takes |
|
|
29551
29707
|
|
|
@@ -29771,9 +29927,9 @@ Server-only, and imported without any optional peer: the transport-neutral tool
|
|
|
29771
29927
|
the registry, tool names and manifest, runtime tools, native tools, the invoker, the OAuth
|
|
29772
29928
|
provider and the durability engine. An application that serves its operations over HTTP and
|
|
29773
29929
|
CLI lists its tool names here with neither MCP nor the AI SDK installed. The adapters that
|
|
29774
|
-
need a peer have their own subpaths: [`stitchkit/tools/mcp`](#stitchkittoolsmcp)
|
|
29775
|
-
|
|
29776
|
-
[`stitchkit/tools/
|
|
29930
|
+
need a peer have their own subpaths: [`stitchkit/tools/mcp`](#stitchkittoolsmcp) and
|
|
29931
|
+
[`stitchkit/tools/toolkit`](#stitchkittoolstoolkit) (the MCP server SDK only, free of `ai`), and
|
|
29932
|
+
[`stitchkit/tools/agent`](#stitchkittoolsagent) (the `ai` peer). → ADR 0284, ADR 0338.
|
|
29777
29933
|
|
|
29778
29934
|
| Export | Kind | Summary |
|
|
29779
29935
|
|--------|------|---------|
|
|
@@ -30081,13 +30237,12 @@ not the MCP server SDK. → ADR 0284, ADR 0336.
|
|
|
30081
30237
|
|
|
30082
30238
|
## `stitchkit/tools/toolkit`
|
|
30083
30239
|
|
|
30084
|
-
Server-only. One context-typed tool set
|
|
30085
|
-
needs both the `@modelcontextprotocol/server` and `ai` peers. → ADR 0284.
|
|
30240
|
+
Server-only. One context-typed tool set for MCP servers, peer-free `mountAgentTools`, and CLI commands, requiring only the `@modelcontextprotocol/server` optional peer — it never imports or requires `ai`. Callers that need a Vercel AI SDK `ToolSet` import `mountAgent` from `stitchkit/tools/agent`; callers without `@modelcontextprotocol/server` import directly from `stitchkit/tools` or `stitchkit/cli`. → ADR 0284, ADR 0338.
|
|
30086
30241
|
|
|
30087
30242
|
| Export | Kind | Summary |
|
|
30088
30243
|
|--------|------|---------|
|
|
30089
|
-
| `createToolkit` | function | context-typed tool mounts — [guide](../guide/cli.md#typed-context) |
|
|
30090
|
-
| `Toolkit` | _type_ | the context-pinned tool surface from `createToolkit` (including both `mountAgentTools(services, config)` and single-argument `mountAgentTools(config)`) |
|
|
30244
|
+
| `createToolkit` | function | context-typed tool mounts (`mountMcp`, `mountAgentTools`, `buildMcpServer`, `createMcpHandler`, `createStdioMcpServer`, `createCli`) — [guide](../guide/cli.md#typed-context) |
|
|
30245
|
+
| `Toolkit` | _type_ | the context-pinned tool surface from `createToolkit` (including both `mountAgentTools(services, config)` and single-argument `mountAgentTools(config)`; no AI SDK `mountAgent`) |
|
|
30091
30246
|
|
|
30092
30247
|
## `stitchkit/tools/connections`
|
|
30093
30248
|
|
|
@@ -30104,7 +30259,7 @@ and approval path.
|
|
|
30104
30259
|
| `ConnectionPhase` / `ConnectionOperation` / `ConnectionFailureContext` | _type_ | closed operation/phase vocabulary and measured read context for existing typed connection errors |
|
|
30105
30260
|
| `ConnectionTimeoutError` / `ConnectionResponseTooLargeError` | class | bounded operation refusal, with phase, operation and finite observed bytes — a timeout also says which `deadline` fired (`'total'` or `'idle'`, with `timeoutMs` the limit that fired); safe tool projection retains the raw cause locally |
|
|
30106
30261
|
| `ConnectionDeadline` / `ConnectionTimeoutContext` | _type_ | `'total' \| 'idle'`, and a timeout's diagnostics with the deadline that fired (default `'total'`) |
|
|
30107
|
-
| `McpConnectionCatalogStore` / `McpConnectionCatalogEntry` | _type_ | `{ load, store }` the application gives a connection's `catalog`, and the `{ stamp, result }` it keeps: when the server's `initialize` answer carries a catalog stamp (a
|
|
30262
|
+
| `McpConnectionCatalogStore` / `McpConnectionCatalogEntry` | _type_ | `{ load, store }` the application gives a connection's `catalog`, and the `{ stamp, result }` it keeps: when the server's `initialize` answer carries a catalog stamp (a StitchKit server's does), a stored `tools/list` result whose stamp — and every tool's — matches is mounted without listing; anything else lists and stores again, and a failing store is a miss |
|
|
30108
30263
|
| `defineOpenApiConnection` | function | declare one OpenAPI document (object, JSON text or JSON URL) as a tool surface |
|
|
30109
30264
|
| `mountConnections` | function | discover every connection and return readonly `RuntimeToolDefinition`s for `mountAgent`; reported structural failures and bounds stay local, while unions and string-format/pattern refusals (including inside record keys) are judged by the server that owns the original schema (ADR 0266, ADR 0272) |
|
|
30110
30265
|
| `ConnectionAuthorizationRequiredError` | class | typed reauthorization signal raised on `401` with credentials resolved again on the next call |
|
|
@@ -31151,7 +31306,7 @@ fails a build whose entry imports the default loader of another `stitchkit` inst
|
|
|
31151
31306
|
both versions and roots.
|
|
31152
31307
|
It resolves the installed package's target/version, reads each selected addon once and checks it
|
|
31153
31308
|
against the `size` and `sha256` published in the package's `native-assets.json` (`formatVersion: 2`,
|
|
31154
|
-
written when
|
|
31309
|
+
written when StitchKit is built). Call it once per build and reuse the result.
|
|
31155
31310
|
`platform`, `architecture`, `delivery`, `entryPath` and `assetPath` are the explicit inputs of
|
|
31156
31311
|
companion delivery; embedded delivery takes `platform`, one `architecture` and `delivery` only, and
|
|
31157
31312
|
refuses a path. `assetPath` accepts one template, `[hash]`, replaced by the first 16 hex digits of
|