stitchkit 0.121.0 → 0.122.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.
Files changed (64) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/agent-runtime/browser-control-contract.d.ts +12 -0
  3. package/dist/agent-runtime/browser-control-contract.d.ts.map +1 -1
  4. package/dist/agent-runtime/control-schema.d.ts +27 -4
  5. package/dist/agent-runtime/control-schema.d.ts.map +1 -1
  6. package/dist/agent-runtime/event-schema.d.ts +33 -0
  7. package/dist/agent-runtime/event-schema.d.ts.map +1 -1
  8. package/dist/agent-runtime/run-acquisition.d.ts.map +1 -1
  9. package/dist/agent-runtime/run-execution-state.d.ts +6 -0
  10. package/dist/agent-runtime/run-execution-state.d.ts.map +1 -1
  11. package/dist/agent-runtime/run-model-attempts.d.ts.map +1 -1
  12. package/dist/agent-runtime/run-stream-parts.d.ts +11 -0
  13. package/dist/agent-runtime/run-stream-parts.d.ts.map +1 -1
  14. package/dist/agent-runtime/tool-progress.d.ts +21 -0
  15. package/dist/agent-runtime/tool-progress.d.ts.map +1 -0
  16. package/dist/entrypoints/agent-runtime/browser.js +7 -3
  17. package/dist/entrypoints/agent-runtime/harness.js +5 -5
  18. package/dist/entrypoints/agent-runtime/realtime.js +5 -5
  19. package/dist/entrypoints/agent-runtime.d.ts +1 -1
  20. package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
  21. package/dist/entrypoints/agent-runtime.js +6 -4
  22. package/dist/entrypoints/cli.js +1 -1
  23. package/dist/entrypoints/server.d.ts +1 -0
  24. package/dist/entrypoints/server.d.ts.map +1 -1
  25. package/dist/entrypoints/server.js +107 -42
  26. package/dist/entrypoints/tools/agent.js +1 -1
  27. package/dist/entrypoints/tools/toolkit.js +2 -2
  28. package/dist/{index-7zwtbak8.js → index-1fyea34p.js} +9 -4
  29. package/dist/{index-4qnzda76.js → index-7qyv50r4.js} +1 -1
  30. package/dist/{index-qctbzmg9.js → index-am1h8c9v.js} +69 -27
  31. package/dist/{index-yt7gyg5x.js → index-b51tzcgh.js} +1 -1
  32. package/dist/{index-aw6zahv1.js → index-dqpesdck.js} +2 -2
  33. package/dist/{index-sb9dr3tq.js → index-eh71zr32.js} +4 -4
  34. package/dist/{index-mnkk1ffz.js → index-hs76yzt7.js} +13 -1
  35. package/dist/{index-b0w7rbpt.js → index-t05a2ry4.js} +39 -3
  36. package/dist/{index-0fra8xvy.js → index-v8yqk4w7.js} +20 -6
  37. package/dist/server/openapi-security.d.ts +73 -0
  38. package/dist/server/openapi-security.d.ts.map +1 -0
  39. package/dist/server/openapi.d.ts +12 -0
  40. package/dist/server/openapi.d.ts.map +1 -1
  41. package/dist/tools/agent.d.ts.map +1 -1
  42. package/dist/tools/cli/format.d.ts +11 -2
  43. package/dist/tools/cli/format.d.ts.map +1 -1
  44. package/dist/tools/cli/repeatable-read.d.ts +9 -0
  45. package/dist/tools/cli/repeatable-read.d.ts.map +1 -0
  46. package/dist/tools/cli/run-managed.d.ts.map +1 -1
  47. package/dist/tools/cli/run-native.d.ts.map +1 -1
  48. package/dist/tools/runtime-call-context.d.ts +15 -0
  49. package/dist/tools/runtime-call-context.d.ts.map +1 -0
  50. package/llms/agent-runtime-browser.txt +4 -1
  51. package/llms/agent-runtime.2.txt +13 -108
  52. package/llms/agent-runtime.3.txt +111 -1
  53. package/llms/cli.txt +21 -9
  54. package/llms/server.2.txt +48 -0
  55. package/llms/server.5.txt +2 -0
  56. package/llms/stitchkit.txt +3 -3
  57. package/llms/tools.txt +4 -1
  58. package/llms/{upgrading-0.106.0-0.121.0.txt → upgrading-0.106.0-0.122.0.txt} +31 -3
  59. package/llms/upgrading.txt +1 -1
  60. package/llms-full.txt +126 -15
  61. package/llms.txt +6 -6
  62. package/package.json +2 -1
  63. package/dist/tools/durability-context.d.ts +0 -7
  64. package/dist/tools/durability-context.d.ts.map +0 -1
@@ -1,14 +1,42 @@
1
- # Upgrading 0.106.0 → 0.121.0 — stitchkit docs slice
1
+ # Upgrading 0.106.0 → 0.122.0 — stitchkit docs slice
2
2
 
3
3
  > Generated from the `docs/` tree by `bun run gen:llms`. The index of all slices is
4
4
  > `llms.txt` in this package.
5
5
 
6
- Contains: Guide: Upgrading, 0.106.0 → 0.121.0 (docs/guide/upgrading.md)
6
+ Contains: Guide: Upgrading, 0.106.0 → 0.122.0 (docs/guide/upgrading.md)
7
7
 
8
8
  ==============================================================================
9
- # Guide: Upgrading, 0.106.0 → 0.121.0 (docs/guide/upgrading.md)
9
+ # Guide: Upgrading, 0.106.0 → 0.122.0 (docs/guide/upgrading.md)
10
10
  ==============================================================================
11
11
 
12
+ ## Released migration: 0.122.0
13
+
14
+ ### read-view-refusal
15
+
16
+ **Who must act:** scripts and agents that read stdout after a managed CLI command exits with
17
+ `CLI_PRESENTATION_FAILED` (`8` by default) when that command is a `GET` endpoint or a tool
18
+ declaring `annotations.readOnlyHint: true`. Commands with an effect and native
19
+ `defineCliCommand` presenters change nothing.
20
+
21
+ A read no longer prints its complete result when the requested view is refused; stdout is
22
+ empty and the diagnostic carries `details.resultOnStdout: false`.
23
+
24
+ ```sh
25
+ # before: the full list arrived on stdout beside the diagnostic
26
+ app user_list --table id,nosuchcolumn > users.json # exit 8, users.json holds every record
27
+
28
+ # after: repeat the read with a field the diagnostic names
29
+ app user_list --table id,nosuchcolumn # exit 8, stdout empty
30
+ app user_list --table id,name
31
+ ```
32
+
33
+ A `GET` endpoint whose call has an effect that must not be repeated declares it, and keeps
34
+ its result on stdout:
35
+
36
+ ```ts
37
+ tool: { name: 'token_rotate', annotations: { readOnlyHint: false } }
38
+ ```
39
+
12
40
  ## Released migration: 0.121.0
13
41
 
14
42
  ### bounded-coding-search
@@ -11,7 +11,7 @@ Contains: Guide: Upgrading, general (docs/guide/upgrading.md)
11
11
 
12
12
  Load this slice, then every range slice between your installed version and the target:
13
13
 
14
- - 0.106.0 → 0.121.0: `llms/upgrading-0.106.0-0.121.0.txt`
14
+ - 0.106.0 → 0.122.0: `llms/upgrading-0.106.0-0.122.0.txt`
15
15
  - 0.96.0 → 0.105.0: `llms/upgrading-0.96.0-0.105.0.txt`
16
16
  - 0.69.0 → 0.95.0: `llms/upgrading-0.69.0-0.95.0.txt`
17
17
  - 0.55.0 → 0.68.0: `llms/upgrading-0.55.0-0.68.0.txt`
package/llms-full.txt CHANGED
@@ -84,13 +84,13 @@ own, recorded as an ADR.
84
84
  | `stitchkit/xlsx` | browser **and** server | evolving | a workbook from rows and typed columns, with no dependency; text never runs as a formula |
85
85
  | `stitchkit/oauth` | browser **and** server | evolving | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
86
86
  | `stitchkit/google` | server (Bun or Node) | evolving | optional Google code exchange and verified OIDC identity adapter |
87
- | `stitchkit/observability` | server | stable<br>_redefined in 2 of the 66 minors since 0.56.2, most recently 0.92.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
87
+ | `stitchkit/observability` | server | stable<br>_redefined in 2 of the 67 minors since 0.56.2, most recently 0.92.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
88
88
  | `stitchkit/testing` | tests on Bun or Node | stable | in-process generated clients over a real Fetch handler, the managed-resource conformance kit and manual time for schedules and retries |
89
89
  | `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
90
90
  | `stitchkit/react` | browser + server rendering | stable | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
91
91
  | `stitchkit/react/keyboard` | browser | evolving | which part of a screen gets a key — ordered layers, one Escape per level, list zones with real focus; see [keyboard guide](keyboard.md) |
92
92
  | `stitchkit/react/keyboard/testing` | server (Bun or Node) | evolving | 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 |
93
- | `stitchkit/agent-runtime` | server | evolving<br>_redefined in 26 of the 66 minors since 0.56.2, most recently 0.121.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
93
+ | `stitchkit/agent-runtime` | server | evolving<br>_redefined in 26 of the 67 minors since 0.56.2, most recently 0.121.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
94
94
  | `stitchkit/agent-runtime/sandbox` | server | evolving | optional Linux Bubblewrap sessions, durable workspaces and a host HTTP credential gateway; see [sandbox guide](sandbox.md) |
95
95
  | `stitchkit/agent-runtime/testing` | tests on Bun or Node | evolving | credential-free replay, scripted provider faults, deterministic race controls and the agent-store conformance kit |
96
96
  | `stitchkit/agent-runtime/harness` | server | evolving | resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
@@ -102,7 +102,7 @@ own, recorded as an ADR.
102
102
  | `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving | durable built-in SQLite store for the agent runtime |
103
103
  | `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving | durable built-in SQLite store for the agent runtime |
104
104
  | `stitchkit-tui` | terminal (Bun) | evolving | optional official OpenTUI host over a caller-composed headless runtime |
105
- | `stitchkit/application` | browser + server | evolving<br>_redefined in 14 of the 66 minors since 0.56.2, most recently 0.110.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
105
+ | `stitchkit/application` | browser + server | evolving<br>_redefined in 14 of the 67 minors since 0.56.2, most recently 0.110.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
106
106
  | `stitchkit/application/grammy` | server | evolving | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
107
107
  | `stitchkit/application/opentelemetry` | server | evolving | maps application snapshots onto an injected OpenTelemetry `Meter` |
108
108
  | `stitchkit/application/schemas` | browser + server | evolving | the application's snapshot, health and shutdown schemas alone, without the kernel |
@@ -2698,6 +2698,54 @@ const internal = openApiRoute('/internal/openapi.json', fullDoc) // behind aut
2698
2698
  const publicSpec = openApiRoute('/openapi.json', publicDoc) // curated
2699
2699
  ```
2700
2700
 
2701
+ ### Security schemes — `security`
2702
+
2703
+ A generic client reads the spec to learn how to authenticate, and a scope name
2704
+ alone does not tell it which header to send. Pass `security` to describe that in
2705
+ standard OpenAPI terms: named schemes become `components.securitySchemes`, and
2706
+ every protected operation gets a `security` requirement. It is keyed by the
2707
+ scopes your contracts already declare, so there is no second list of which
2708
+ endpoint is protected:
2709
+
2710
+ ```ts
2711
+ const publicDoc = generateOpenApiDocument({
2712
+ info: { title: 'Public API', version: '1.0.0' },
2713
+ services: [account],
2714
+ includeMethod: (m) => m.meta?.public === true,
2715
+ security: {
2716
+ schemes: {
2717
+ apiKey: { type: 'http', scheme: 'bearer', description: 'An account API key' },
2718
+ },
2719
+ // Each protected scope → the schemes that satisfy it, any one of them.
2720
+ scopes: { account: ['apiKey'] },
2721
+ },
2722
+ })
2723
+ ```
2724
+
2725
+ A scheme is `{ type: 'http', scheme: 'bearer' | 'basic' }` or
2726
+ `{ type: 'apiKey', in: 'header' | 'query' | 'cookie', name }` (a session cookie
2727
+ is the `cookie` form). An operation is described by the scope the auth hook
2728
+ checks it under:
2729
+
2730
+ | The operation's scope | In the document |
2731
+ |---|---|
2732
+ | `'public'` | no `security`, no 401/403 |
2733
+ | listed in `scopes` with schemes | `security: [{ apiKey: [] }, …]` and 401/403 |
2734
+ | listed with an empty list — a custom scope whose rule is `'public'` | no `security`, no 401/403 |
2735
+ | not listed | generation throws, naming the operation |
2736
+ | none of its own | read as `defaultScope` — pass the same value as `createAuthHook({ defaultScope })` |
2737
+
2738
+ Generation refuses a protected scope it cannot describe instead of emitting the
2739
+ operation as open — a client would otherwise call it without a credential. Only
2740
+ the operations the document advertises need a mapping: a method `includeMethod`
2741
+ filters out is never checked. A scheme `scopes` names but `schemes` does not
2742
+ declare, and an entry for `'public'`, are refused the same way.
2743
+
2744
+ The metadata describes your policy; it does not enforce it. The auth hook is
2745
+ still the only gate, and removing `security` changes the document, never a
2746
+ 401 or 403. Credential values never belong here: describe where the key goes,
2747
+ not what it is.
2748
+
2701
2749
 
2702
2750
  ==============================================================================
2703
2751
  # Guide: Typed client (docs/guide/client.md)
@@ -4315,7 +4363,10 @@ render: async (ctx) => {
4315
4363
 
4316
4364
  `reportProgress` is present on every **tool** call — MCP, agent and CLI — so a
4317
4365
  handler never branches on transport, and it does nothing wherever nobody is
4318
- listening. It is absent on the HTTP transport, which has no channel for it, so a
4366
+ listening. Under the agent runtime somebody is: each report becomes a transient
4367
+ `tool-progress` event of the run, so the person watching the agent sees the
4368
+ stage while the model still reads only the tool's result (see
4369
+ [Agent runtime → events](./agent-runtime.md)). It is absent on the HTTP transport, which has no channel for it, so a
4319
4370
  handler that also serves HTTP writes `ctx.reportProgress?.(…)`. It never throws and never
4320
4371
  rejects: a message about work must not be able to kill the work it describes, so
4321
4372
  a refused notification leaves the host exactly where a host that never asked for
@@ -6785,6 +6836,19 @@ or it keeps the failed attempt's partial text on screen.
6785
6836
  start and output on completion. A mounted typed failure carries the same safe
6786
6837
  `{ error, retryable, details?, _hint? }` envelope as the durable result; an unknown
6787
6838
  internal cause remains generic and stays in local observability only;
6839
+ - `tool-progress` is transient: what a running tool handler reported through
6840
+ `ctx.reportProgress` — `message`, `progress` and `total`, the fields an MCP host
6841
+ receives — with the call's `callId` and `toolName`. It never enters the
6842
+ model's input or the durable history. A message longer than
6843
+ `AGENT_TOOL_PROGRESS_MESSAGE_MAX` (280) is cut, reports of one call closer
6844
+ than 250 ms apart are dropped, and a report after the call's terminal
6845
+ `tool-status` or after its attempt was abandoned is dropped; the terminal
6846
+ status carries the final word. `reduceAgentControlEvent` keeps the last
6847
+ report of each running call in `transientByRun[runId].tools[callId]` and
6848
+ removes it on that call's `completed`, `failed` or `interrupted`. The runtime
6849
+ hands its reporter to a call through the SDK tool context, beside its step
6850
+ ledger; a tool that declares its own `contextSchema` keeps that contract and
6851
+ reports nowhere;
6788
6852
  - `terminal` follows the winning terminal CAS.
6789
6853
 
6790
6854
  `loop.checkpointEveryEvents` batches ordinary stream parts (default `20`) and
@@ -10767,15 +10831,27 @@ Rules worth knowing before you rely on them:
10767
10831
  A failed call still reports its own error and exit code. An aggregate over an
10768
10832
  error is not an answer to the question that was asked.
10769
10833
 
10770
- If the command succeeds but its requested view cannot be built, the CLI writes
10771
- the complete original result to stdout, using the normal JSON format (`--json`
10772
- still selects compact output). It writes a separate structured
10773
- `CLI_PRESENTATION_FAILED` diagnostic to stderr and exits with `8`, configurable
10774
- through `exitCodes`. Its `details.operationSucceeded: true` and `retryable: false`
10775
- distinguish a presentation refusal from a failed operation; `details.cause`
10776
- preserves the safe reason. Recover the answer from stdout instead of repeating
10777
- the mutation. Domain retry hints are not appended to this diagnostic. CLI
10778
- argument errors detected before execution still exit with `2`
10834
+ If the command succeeds but its requested view cannot be built, the CLI writes a
10835
+ structured `CLI_PRESENTATION_FAILED` diagnostic to stderr and exits with `8`,
10836
+ configurable through `exitCodes`. Its `details.operationSucceeded: true` and
10837
+ `retryable: false` distinguish a presentation refusal from a failed operation;
10838
+ `details.cause` preserves the safe reason, such as the misspelled field and the
10839
+ fields that are there. Domain retry hints are not appended to this diagnostic.
10840
+
10841
+ What reaches stdout depends on whether the command can be called again for its answer,
10842
+ and `details.resultOnStdout` states which case occurred:
10843
+
10844
+ | Command | stdout | Recover the answer by |
10845
+ |---|---|---|
10846
+ | has an effect | the complete original result in the normal JSON format (`--json` still selects compact output) | reading stdout — never by repeating the mutation |
10847
+ | only reads | nothing | repeating the command with a corrected view |
10848
+
10849
+ A managed command only reads when its tool declares `annotations.readOnlyHint: true`,
10850
+ or declares no `readOnlyHint` and its method is `GET`. `readOnlyHint: false` on a `GET`
10851
+ endpoint keeps the result on stdout. A native `defineCliCommand` declares neither fact,
10852
+ so a failed `present` always keeps the validated result on stdout.
10853
+
10854
+ CLI argument errors detected before execution still exit with `2`
10779
10855
  and have no successful result to preserve.
10780
10856
 
10781
10857
  ## Named profiles
@@ -17203,6 +17279,34 @@ charts, no merged cells and no streaming: an application that needs them takes a
17203
17279
 
17204
17280
  # Upgrading stitchkit
17205
17281
 
17282
+ ## Released migration: 0.122.0
17283
+
17284
+ ### read-view-refusal
17285
+
17286
+ **Who must act:** scripts and agents that read stdout after a managed CLI command exits with
17287
+ `CLI_PRESENTATION_FAILED` (`8` by default) when that command is a `GET` endpoint or a tool
17288
+ declaring `annotations.readOnlyHint: true`. Commands with an effect and native
17289
+ `defineCliCommand` presenters change nothing.
17290
+
17291
+ A read no longer prints its complete result when the requested view is refused; stdout is
17292
+ empty and the diagnostic carries `details.resultOnStdout: false`.
17293
+
17294
+ ```sh
17295
+ # before: the full list arrived on stdout beside the diagnostic
17296
+ app user_list --table id,nosuchcolumn > users.json # exit 8, users.json holds every record
17297
+
17298
+ # after: repeat the read with a field the diagnostic names
17299
+ app user_list --table id,nosuchcolumn # exit 8, stdout empty
17300
+ app user_list --table id,name
17301
+ ```
17302
+
17303
+ A `GET` endpoint whose call has an effect that must not be repeated declares it, and keeps
17304
+ its result on stdout:
17305
+
17306
+ ```ts
17307
+ tool: { name: 'token_rotate', annotations: { readOnlyHint: false } }
17308
+ ```
17309
+
17206
17310
  ## Released migration: 0.121.0
17207
17311
 
17208
17312
  ### bounded-coding-search
@@ -23101,6 +23205,8 @@ Also re-exports the error helpers from `stitchkit/contract`.
23101
23205
  | `OpenApiConfig` | _type_ | config for `generateOpenApiDocument` (incl. `includeMethod` — curate a public subset) — [guide](../guide/server.md#curating-the-spec--includemethod) |
23102
23206
  | `OpenApiDocument` | _type_ | the generated document |
23103
23207
  | `OpenApiInfo` | _type_ | the spec `info` block |
23208
+ | `OpenApiSecurity` | _type_ | `OpenApiConfig.security` — named schemes and the schemes each protected scope accepts — [guide](../guide/server.md#security-schemes--security) |
23209
+ | `OpenApiSecurityScheme` | _type_ | one way a caller presents its credential: HTTP bearer or basic, or an API key in a header, query or cookie |
23104
23210
  | `OpenApiServer` | _type_ | a spec `servers` entry |
23105
23211
 
23106
23212
  ---
@@ -23734,7 +23840,9 @@ Delivery exports are `AgentAdmissionEventSchema`, `AgentAttemptResetEventSchema`
23734
23840
  `AgentRunStateEventSchema`, `AgentRunOperationEventSchema`, `AgentTerminalEventSchema`,
23735
23841
  `AgentTransientDeltaEventSchema`,
23736
23842
  `AgentReasoningStartEventSchema`, `AgentReasoningDeltaEventSchema`,
23737
- `AgentReasoningEndEventSchema`, `AgentToolStatusEventSchema`, `AgentRuntimeEvent`,
23843
+ `AgentReasoningEndEventSchema`, `AgentToolStatusEventSchema`, `AgentToolProgressEventSchema` (what a
23844
+ running tool reported through `ctx.reportProgress`, transient and never part of the model's input),
23845
+ `AgentRuntimeEvent`,
23738
23846
  `AgentRuntimeEventCursor`, `AgentRuntimeEventCursorSchema`, `AgentRuntimeCursorAdvance`,
23739
23847
  `advanceAgentRuntimeEventCursor`, `agentDurableEventId`, `AgentRuntimeEventSink`,
23740
23848
  `AgentRuntimeEventSinkConfig` and `createAgentRuntimeEventSink`. Cursor gaps require a canonical
@@ -23888,7 +23996,10 @@ including `AgentAttemptResetEventSchema` for `attempt-reset`),
23888
23996
  `AgentControlErrorCodeSchema` / `AgentControlErrorCode` (the one vocabulary of every control
23889
23997
  error code: `FORBIDDEN`, `CONNECTION_CLOSED`, `REQUEST_CAPACITY`, `ATTACHMENT_CAPACITY`,
23890
23998
  `LEASE_CONFLICT`, `EVENT_OVERFLOW` and the rest), `AgentMultiSessionCursorSchema` /
23891
- `AgentMultiSessionCursor`, `AgentConversationView`, `AgentControlView`,
23999
+ `AgentMultiSessionCursor`, `AgentConversationView`, `AgentControlView`, `AgentRunTransient` (a
24000
+ run's streamed text, reasoning and running tool calls before its next checkpoint),
24001
+ `AgentToolActivity` (one running call with its last reported progress),
24002
+ `AGENT_TOOL_PROGRESS_MESSAGE_MAX` (the longest progress message a run publishes),
23892
24003
  `advanceAgentMultiSessionCursor`, `createAgentControlView`, `reduceAgentControlSnapshot`,
23893
24004
  `reduceAgentControlEvent` and
23894
24005
  `agentDurableEventId`. It imports no model provider, executor, store, event sink
package/llms.txt CHANGED
@@ -14,25 +14,25 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
14
14
  - **stitchkit/react**: [llms/react.txt](llms/react.txt) 8.7 KB
15
15
  - **stitchkit/react/keyboard**: [llms/react-keyboard.txt](llms/react-keyboard.txt) 22.7 KB
16
16
  - **stitchkit/react/keyboard/testing**: [llms/react-keyboard-testing.txt](llms/react-keyboard-testing.txt) 1.9 KB
17
- - **stitchkit/tools**: [llms/tools.txt](llms/tools.txt) 46.7 KB → [llms/tools.2.txt](llms/tools.2.txt) 30.5 KB → [llms/tools.3.txt](llms/tools.3.txt) 21.0 KB
17
+ - **stitchkit/tools**: [llms/tools.txt](llms/tools.txt) 47.0 KB → [llms/tools.2.txt](llms/tools.2.txt) 30.5 KB → [llms/tools.3.txt](llms/tools.3.txt) 21.0 KB
18
18
  - **stitchkit/tools/mcp**: [llms/tools-mcp.txt](llms/tools-mcp.txt) 6.6 KB
19
19
  - **stitchkit/tools/agent**: [llms/tools-agent.txt](llms/tools-agent.txt) 1.1 KB
20
20
  - **stitchkit/tools/toolkit**: [llms/tools-toolkit.txt](llms/tools-toolkit.txt) 0.9 KB
21
21
  - **stitchkit/tools/contract**: [llms/tools-contract.txt](llms/tools-contract.txt) 0.2 KB
22
22
  - **stitchkit/tools/invoker**: [llms/tools-invoker.txt](llms/tools-invoker.txt) 0.2 KB
23
23
  - **stitchkit/tools/connections**: [llms/tools-connections.txt](llms/tools-connections.txt) 3.9 KB
24
- - **stitchkit/cli**: [llms/cli.txt](llms/cli.txt) 36.6 KB → [llms/cli.2.txt](llms/cli.2.txt) 36.4 KB
24
+ - **stitchkit/cli**: [llms/cli.txt](llms/cli.txt) 37.2 KB → [llms/cli.2.txt](llms/cli.2.txt) 36.4 KB
25
25
  - **stitchkit/cli/publish**: [llms/cli-publish.txt](llms/cli-publish.txt) 1.5 KB
26
26
  - **stitchkit/remote**: [llms/remote.txt](llms/remote.txt) 1.0 KB
27
27
  - **stitchkit/contract**: [llms/contract.txt](llms/contract.txt) 33.8 KB
28
28
  - **stitchkit/primitives**: [llms/primitives.txt](llms/primitives.txt) 13.2 KB
29
- - **stitchkit/server**: [llms/server.txt](llms/server.txt) 44.2 KB → [llms/server.2.txt](llms/server.2.txt) 20.9 KB → [llms/server.3.txt](llms/server.3.txt) 47.0 KB → [llms/server.4.txt](llms/server.4.txt) 38.6 KB → [llms/server.5.txt](llms/server.5.txt) 23.2 KB
29
+ - **stitchkit/server**: [llms/server.txt](llms/server.txt) 44.2 KB → [llms/server.2.txt](llms/server.2.txt) 23.1 KB → [llms/server.3.txt](llms/server.3.txt) 47.0 KB → [llms/server.4.txt](llms/server.4.txt) 38.6 KB → [llms/server.5.txt](llms/server.5.txt) 23.5 KB
30
30
  - **stitchkit/observability**: [llms/observability.txt](llms/observability.txt) 46.9 KB
31
- - **stitchkit/agent-runtime**: [llms/agent-runtime.txt](llms/agent-runtime.txt) 47.6 KB → [llms/agent-runtime.2.txt](llms/agent-runtime.2.txt) 47.6 KB → [llms/agent-runtime.3.txt](llms/agent-runtime.3.txt) 39.7 KB → [llms/agent-runtime.4.txt](llms/agent-runtime.4.txt) 11.7 KB
31
+ - **stitchkit/agent-runtime**: [llms/agent-runtime.txt](llms/agent-runtime.txt) 47.6 KB → [llms/agent-runtime.2.txt](llms/agent-runtime.2.txt) 43.3 KB → [llms/agent-runtime.3.txt](llms/agent-runtime.3.txt) 45.1 KB → [llms/agent-runtime.4.txt](llms/agent-runtime.4.txt) 11.7 KB
32
32
  - **stitchkit/agent-runtime/testing**: [llms/agent-runtime-testing.txt](llms/agent-runtime-testing.txt) 2.6 KB
33
33
  - **stitchkit/agent-runtime/harness**: [llms/agent-runtime-harness.txt](llms/agent-runtime-harness.txt) 11.0 KB
34
34
  - **stitchkit/agent-runtime/coding-tools**: [llms/agent-runtime-coding-tools.txt](llms/agent-runtime-coding-tools.txt) 5.0 KB
35
- - **stitchkit/agent-runtime/browser**: [llms/agent-runtime-browser.txt](llms/agent-runtime-browser.txt) 3.8 KB
35
+ - **stitchkit/agent-runtime/browser**: [llms/agent-runtime-browser.txt](llms/agent-runtime-browser.txt) 4.0 KB
36
36
  - **stitchkit/agent-runtime/openrouter**: [llms/agent-runtime-openrouter.txt](llms/agent-runtime-openrouter.txt) 1.1 KB
37
37
  - **stitchkit/agent-runtime/sqlite/bun**: [llms/agent-runtime-sqlite-bun.txt](llms/agent-runtime-sqlite-bun.txt) 1.8 KB
38
38
  - **stitchkit/agent-runtime/sqlite/node**: [llms/agent-runtime-sqlite-node.txt](llms/agent-runtime-sqlite-node.txt) 1.7 KB
@@ -72,7 +72,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
72
72
 
73
73
  ## Upgrading slices
74
74
  - **Upgrading — how to move across versions**: [llms/upgrading.txt](llms/upgrading.txt) 12.7 KB
75
- - **Upgrading 0.106.0 → 0.121.0**: [llms/upgrading-0.106.0-0.121.0.txt](llms/upgrading-0.106.0-0.121.0.txt) 33.4 KB
75
+ - **Upgrading 0.106.0 → 0.122.0**: [llms/upgrading-0.106.0-0.122.0.txt](llms/upgrading-0.106.0-0.122.0.txt) 34.4 KB
76
76
  - **Upgrading 0.96.0 → 0.105.0**: [llms/upgrading-0.96.0-0.105.0.txt](llms/upgrading-0.96.0-0.105.0.txt) 45.8 KB
77
77
  - **Upgrading 0.69.0 → 0.95.0**: [llms/upgrading-0.69.0-0.95.0.txt](llms/upgrading-0.69.0-0.95.0.txt) 46.6 KB
78
78
  - **Upgrading 0.55.0 → 0.68.0**: [llms/upgrading-0.55.0-0.68.0.txt](llms/upgrading-0.55.0-0.68.0.txt) 47.0 KB
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stitchkit",
3
- "version": "0.121.0",
3
+ "version": "0.122.0",
4
4
  "description": "Contract-first backend framework — one defineContract() into an HTTP API, MCP tools, AI-agent tools and a typed client. Bun and Node.",
5
5
  "keywords": [
6
6
  "bun",
@@ -405,6 +405,7 @@
405
405
  "@modelcontextprotocol/server": "^2.4.0",
406
406
  "@openrouter/ai-sdk-provider": "^3.1.0",
407
407
  "@opentelemetry/api": "^1.10.0",
408
+ "@seriousme/openapi-schema-validator": "^2.11.0",
408
409
  "@socket.io/bun-engine": "^0.1.2",
409
410
  "@socket.io/component-emitter": "^3.1.2",
410
411
  "@tanstack/react-query": "5.105.3",
@@ -1,7 +0,0 @@
1
- import type { LocalStepDurability } from '../durability/contract.js';
2
- type Factory = (callId: string, signal?: AbortSignal) => LocalStepDurability;
3
- /** Opaque SDK context; no credentials, functions or runtime objects enter provider messages. */
4
- export declare function createToolDurabilityContext(factory: Factory): object;
5
- export declare function resolveToolDurability(context: unknown, callId: string, signal?: AbortSignal): LocalStepDurability | undefined;
6
- export {};
7
- //# sourceMappingURL=durability-context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"durability-context.d.ts","sourceRoot":"","sources":["../../src/tools/durability-context.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,KAAK,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,KAAK,mBAAmB,CAAC;AAG7E,gGAAgG;AAChG,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAIpE;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,WAAW,GACnB,mBAAmB,GAAG,SAAS,CAGjC"}