stitchkit 0.136.0 → 0.136.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +12 -0
- package/dist/agent-executor/executor-contract.d.ts.map +1 -1
- package/dist/agent-executor/vocabulary.d.ts +80 -0
- package/dist/agent-executor/vocabulary.d.ts.map +1 -1
- package/dist/agent-parts/model.d.ts +94 -0
- package/dist/agent-parts/model.d.ts.map +1 -1
- package/dist/agent-parts/parts.d.ts +176 -0
- package/dist/agent-parts/parts.d.ts.map +1 -1
- package/dist/agent-runtime/browser/browser-control-contract.d.ts +440 -0
- package/dist/agent-runtime/browser/browser-control-contract.d.ts.map +1 -1
- package/dist/agent-runtime/browser/control-schema.d.ts +528 -0
- package/dist/agent-runtime/browser/control-schema.d.ts.map +1 -1
- package/dist/agent-runtime/event-schema.d.ts +704 -0
- package/dist/agent-runtime/event-schema.d.ts.map +1 -1
- package/dist/agent-runtime/history/run-history-parts.d.ts.map +1 -1
- package/dist/agent-runtime/loop/provider-stream-parts.d.ts.map +1 -1
- package/dist/agent-runtime/loop/provider-stream-segments.d.ts +0 -2
- package/dist/agent-runtime/loop/provider-stream-segments.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-approval-signature.d.ts +5 -1
- package/dist/agent-runtime/loop/run-approval-signature.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-loop-events.d.ts +6 -1
- package/dist/agent-runtime/loop/run-loop-events.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-stream-parts.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-stream-recorded.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-tool-call.d.ts +11 -3
- package/dist/agent-runtime/loop/run-tool-call.d.ts.map +1 -1
- package/dist/agent-runtime/providers/ai-sdk-normalize.d.ts +4 -0
- package/dist/agent-runtime/providers/ai-sdk-normalize.d.ts.map +1 -1
- package/dist/agent-runtime/providers/ai-sdk-tools.d.ts.map +1 -1
- package/dist/agent-runtime/runtime-internals.d.ts +1 -3
- package/dist/agent-runtime/runtime-internals.d.ts.map +1 -1
- package/dist/agent-runtime/schemas-json-projection.d.ts +29 -0
- package/dist/agent-runtime/schemas-json-projection.d.ts.map +1 -0
- package/dist/agent-runtime/schemas-message.d.ts +88 -0
- package/dist/agent-runtime/schemas-message.d.ts.map +1 -1
- package/dist/agent-runtime/schemas-run.d.ts +88 -0
- package/dist/agent-runtime/schemas-run.d.ts.map +1 -1
- package/dist/agent-runtime/stores/branch-messages.d.ts.map +1 -1
- package/dist/agent-runtime/stores/branch-replay.d.ts +264 -0
- package/dist/agent-runtime/stores/branch-replay.d.ts.map +1 -1
- package/dist/agent-runtime/stores/conversations.d.ts +88 -0
- package/dist/agent-runtime/stores/conversations.d.ts.map +1 -1
- package/dist/agent-runtime/stores/sql-rows.d.ts +64 -0
- package/dist/agent-runtime/stores/sql-rows.d.ts.map +1 -1
- package/dist/agent-runtime/stores/store-driver-contract.d.ts +616 -0
- package/dist/agent-runtime/stores/store-driver-contract.d.ts.map +1 -1
- package/dist/agent-runtime/stores/store-events.d.ts +1056 -0
- package/dist/agent-runtime/stores/store-events.d.ts.map +1 -1
- package/dist/agent-runtime/stores/store.d.ts +1232 -0
- package/dist/agent-runtime/stores/store.d.ts.map +1 -1
- package/dist/agent-runtime/terminal-commit.d.ts +69 -5
- package/dist/agent-runtime/terminal-commit.d.ts.map +1 -1
- package/dist/agent-runtime/testing/store-conformance-lifecycle.d.ts +164 -36
- package/dist/agent-runtime/testing/store-conformance-lifecycle.d.ts.map +1 -1
- package/dist/agent-runtime/testing/store-conformance-support.d.ts +82 -18
- package/dist/agent-runtime/testing/store-conformance-support.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-manager.d.ts +1 -1
- package/dist/application/diagnostic-journal-manager.d.ts.map +1 -1
- package/dist/application/notification-delivery.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/acp.js +5 -4
- package/dist/entrypoints/agent-executor/claude-sdk.js +7 -6
- package/dist/entrypoints/agent-executor/claude.js +7 -6
- package/dist/entrypoints/agent-executor/codex.js +6 -5
- package/dist/entrypoints/agent-executor/testing/claude-sdk.js +4 -3
- package/dist/entrypoints/agent-executor/testing.js +7 -6
- package/dist/entrypoints/agent-executor.js +7 -7
- package/dist/entrypoints/agent-runtime/ai-sdk.js +30 -24
- package/dist/entrypoints/agent-runtime/anthropic.js +3 -3
- package/dist/entrypoints/agent-runtime/browser.js +8 -7
- package/dist/entrypoints/agent-runtime/harness.js +14 -14
- package/dist/entrypoints/agent-runtime/openai.js +3 -3
- package/dist/entrypoints/agent-runtime/openrouter.js +3 -3
- package/dist/entrypoints/agent-runtime/postgres.js +9 -9
- package/dist/entrypoints/agent-runtime/realtime.js +9 -8
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +10 -10
- package/dist/entrypoints/agent-runtime/sqlite/node.js +10 -10
- package/dist/entrypoints/agent-runtime/testing.js +8 -8
- package/dist/entrypoints/agent-runtime.js +21 -21
- package/dist/entrypoints/application/diagnostic-journal.js +14 -10
- package/dist/entrypoints/application.js +16 -4
- package/dist/entrypoints/tools/agent.js +2 -2
- package/dist/entrypoints/tools/toolkit.js +1 -1
- package/dist/entrypoints/tools.js +5 -3
- package/dist/index-1psbyyhj.js +21 -0
- package/dist/{index-kzsetgh9.js → index-26v8hjqm.js} +4 -4
- package/dist/{index-4243301z.js → index-2wm9b9vs.js} +5 -5
- package/dist/{index-tb36xawm.js → index-32ew02z1.js} +1 -1
- package/dist/{index-1en7k3q5.js → index-4q9tmzea.js} +3 -3
- package/dist/{index-shte29pg.js → index-8cnfgwg8.js} +148 -106
- package/dist/{index-mkmep637.js → index-9m1m92rg.js} +1 -1
- package/dist/index-a1rjr381.js +114 -0
- package/dist/{index-6kwdfb9m.js → index-akesakvj.js} +23 -4
- package/dist/{index-rg08syp1.js → index-d5mhgx72.js} +7 -5
- package/dist/{index-36mtj8xm.js → index-e4w0sfm1.js} +2 -2
- package/dist/{index-jperyn0c.js → index-gj4wdts6.js} +1 -1
- package/dist/{index-pd9e8rz4.js → index-gvv7y0s4.js} +1 -1
- package/dist/{index-vebzvse6.js → index-jy907kcs.js} +24 -1
- package/dist/{index-54wp467c.js → index-k5azb3v3.js} +4 -21
- package/dist/{index-qcy8et93.js → index-kaq9nb7h.js} +6 -6
- package/dist/{index-vse7x1qt.js → index-knqye3gv.js} +1 -1
- package/dist/{index-tav72wz5.js → index-ks4rhtcc.js} +5 -0
- package/dist/{index-xnqab06h.js → index-mtpcax6d.js} +3 -3
- package/dist/{index-7qza24g1.js → index-px9r6wv1.js} +1 -1
- package/dist/{index-epwvp88y.js → index-r9w7wfgn.js} +1 -1
- package/dist/{index-aacwkve4.js → index-sjq4akrx.js} +3 -5
- package/dist/{index-5dxgx3yj.js → index-tcv71frn.js} +1 -1
- package/dist/{index-1zy31r3b.js → index-v92djygb.js} +1 -1
- package/dist/{index-9f60gnfn.js → index-xaa3603f.js} +4 -11
- package/dist/{index-j3r7r1mh.js → index-yv7d6tav.js} +1 -1
- package/dist/{index-hberxns4.js → index-zagc12j1.js} +5 -5
- package/dist/{index-j5vzhj3d.js → index-zqc64g69.js} +3 -3
- package/dist/{index-hpzhz1vm.js → index-zthekmrt.js} +2 -2
- package/dist/internal/json-stringify.d.ts +37 -0
- package/dist/internal/json-stringify.d.ts.map +1 -0
- package/llms/agent-runtime.5.txt +1 -1
- package/llms/agent-runtime.txt +14 -0
- package/llms/application.2.txt +6 -3
- package/llms/application.3.txt +2 -1
- package/llms/application.txt +4 -1
- package/llms-full.txt +27 -6
- package/llms.txt +2 -2
- package/package.json +1 -1
package/llms-full.txt
CHANGED
|
@@ -6995,6 +6995,20 @@ with `mountAgentTools` from `stitchkit/tools` (including the single-argument
|
|
|
6995
6995
|
`mountAgentTools({ runtimeTools, access })` form when no HTTP service contracts are mounted). Both
|
|
6996
6996
|
return `AgentTool` / `AgentToolSet` carrying JSON Schema 2020-12 `inputSchema`, Zod `parseInput`,
|
|
6997
6997
|
optional `needsApproval`, `onInputAvailable`, and `toModelOutput` returning `AgentToolModelOutput`.
|
|
6998
|
+
Without `toModelOutput`, a tool's output reaches the model, and every later turn that reads the run
|
|
6999
|
+
back, as `JSON.stringify` writes it: a field left `undefined` drops its key and a `Date` becomes its
|
|
7000
|
+
ISO string; a `toModelOutput` JSON value is read the same way. An output `JSON.stringify` cannot
|
|
7001
|
+
write (a BigInt, a cycle, a throwing `toJSON`) fails the call with an `AgentToolError` naming the
|
|
7002
|
+
tool and the field and saying the tool ran, so the model does not take it for a call that never
|
|
7003
|
+
happened. That holds with `toModelOutput` too: a branch presents the result again from the
|
|
7004
|
+
recorded output.
|
|
7005
|
+
|
|
7006
|
+
What `toModelOutput` showed the model is recorded beside the result (`tool-result.modelOutput`),
|
|
7007
|
+
and a later turn sends that again rather than calling `toModelOutput` a second time: history is
|
|
7008
|
+
what the model read, and it does not change when the function does. Three records are presented
|
|
7009
|
+
anew, from the JSON form of the output — where a `Date` is its ISO string: one written before the
|
|
7010
|
+
field existed, one whose model output held a `file` part, and a branched one. To present recorded
|
|
7011
|
+
results differently on purpose, pass `resolveToolModelOutput` to the history projection.
|
|
6998
7012
|
|
|
6999
7013
|
When an operation needs one or a few model steps without a durable conversation store — structured
|
|
7000
7014
|
extraction, classification, a bounded tool loop, or standalone streaming — call `completeText`,
|
|
@@ -9907,7 +9921,10 @@ if (result.outcome === 'refused') internalCounter.add(1, { reason: result.reason
|
|
|
9907
9921
|
await journal.close({ timeoutMs: 5_000 })
|
|
9908
9922
|
```
|
|
9909
9923
|
|
|
9910
|
-
The owner schema and JSON serialization run synchronously before admission.
|
|
9924
|
+
The owner schema and JSON serialization run synchronously before admission. An event is kept as
|
|
9925
|
+
`JSON.stringify` writes it, and only if the schema reads that form back: an optional field left
|
|
9926
|
+
`undefined` is accepted, while a cycle, a BigInt or a `Date` in a `z.date()` field is `invalid`.
|
|
9927
|
+
Accepted frames carry
|
|
9911
9928
|
a process epoch and contiguous sequence and retain their complete bytes inside both pending limits
|
|
9912
9929
|
until their append attempt settles. Capacity, invalid, oversized, closed and terminal-failure
|
|
9913
9930
|
refusals are explicit; accepted ordered frames are never evicted.
|
|
@@ -10460,9 +10477,12 @@ Opt into `delivery: { version, actions, project }` on `createNotificationOutbox`
|
|
|
10460
10477
|
The pure `actions(payload)` selector runs at enqueue; the versioned plan remains
|
|
10461
10478
|
fixed throughout retry. Each `send` receives its action and a stable idempotency
|
|
10462
10479
|
key; return a small JSON receipt such as a remote message or uploaded object ID.
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
10480
|
+
The receipt is kept as `JSON.stringify` writes it: a field left `undefined` drops,
|
|
10481
|
+
a `Date` becomes its ISO string. An action that returned is confirmed and is never
|
|
10482
|
+
sent again: a result JSON cannot carry (a BigInt, a cycle), or one that does not fit
|
|
10483
|
+
the state's byte budget, is kept as `receipt: null` with
|
|
10484
|
+
`unrecorded: 'not-json' | 'too-large'` and reported to `onError`, naming the field
|
|
10485
|
+
for `not-json`.
|
|
10466
10486
|
`project(notification, receipts)` applies all confirmed results locally and must
|
|
10467
10487
|
be idempotent. Checkpoints and the final projection timestamp live in the existing
|
|
10468
10488
|
atomic StateStore; completed receipts retain them within retention/byte limits.
|
|
@@ -29614,7 +29634,8 @@ never trust a client-supplied owner ID as that scope.
|
|
|
29614
29634
|
immutable executor `version`, pure `actions(payload)` plan selector (1–128 unique
|
|
29615
29635
|
names, each at most 128 characters), and idempotent `project(notification, receipts)`.
|
|
29616
29636
|
`send` receives optional `action` and stable `idempotencyKey`, and returns a JSON
|
|
29617
|
-
remote receipt (void becomes null)
|
|
29637
|
+
remote receipt (void becomes null), kept as `JSON.stringify` writes it. A result JSON
|
|
29638
|
+
cannot carry (a BigInt, a cycle; `onError` names the field) or that does not fit the
|
|
29618
29639
|
byte budget is kept as `receipt: null` with `unrecorded: 'not-json' | 'too-large'`;
|
|
29619
29640
|
the action stays confirmed and is not sent again. `retiredVersions` maps earlier
|
|
29620
29641
|
plan versions to their `NotificationProjection` so queued items drain after an
|
|
@@ -29724,7 +29745,7 @@ Server-only, peer-free optional application runtime. Runs models exclusively thr
|
|
|
29724
29745
|
| `AgentConversationPurgeResultSchema` / `AgentConversationPurgeResult` | schema / _type_ | typed deletion/refusal outcomes; active refusal includes run IDs |
|
|
29725
29746
|
| `AgentConversationPurgedError` | class | runtime mutation rejected because its conversation ID is permanently purged |
|
|
29726
29747
|
| `AgentConversationPurgeDriver` | _type_ | optional `driver.conversations` capability: serialized tombstone read and atomic removal of all owned records |
|
|
29727
|
-
| `projectAgentHistory` | function | asynchronously project canonical records and resolved multimodal files into provider-valid peer-free `AgentModelMessage[]` |
|
|
29748
|
+
| `projectAgentHistory` | function | asynchronously project canonical records and resolved multimodal files into provider-valid peer-free `AgentModelMessage[]`; a `tool-result` part sends its recorded `modelOutput` (what the tool's `toModelOutput` showed the model in the live step) and calls `toModelOutput` only for a record without it; `resolveToolModelOutput` runs first |
|
|
29728
29749
|
| `defineModelRegistry` | function | typed language-model descriptors, capabilities and `AgentModelDriverFactory` construction |
|
|
29729
29750
|
| `AgentModelCatalogSchema` / `AgentModelCatalog` | schema / _type_ | provider-neutral complete/partial model catalog with separately sourced popularity, metrics, prices and observation time |
|
|
29730
29751
|
| `AgentModelCatalogEntrySchema` / `AgentModelCatalogEntry` | schema / _type_ | one canonical provider model descriptor with optional price, popularity and metric evidence |
|
package/llms.txt
CHANGED
|
@@ -29,7 +29,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
29
29
|
- **stitchkit/handler**: [llms/handler.txt](llms/handler.txt) 2.3 KB
|
|
30
30
|
- **stitchkit/server**: [llms/server.txt](llms/server.txt) 47.7 KB → [llms/server.2.txt](llms/server.2.txt) 46.4 KB → [llms/server.3.txt](llms/server.3.txt) 47.1 KB → [llms/server.4.txt](llms/server.4.txt) 43.9 KB → [llms/server.5.txt](llms/server.5.txt) 26.7 KB
|
|
31
31
|
- **stitchkit/observability**: [llms/observability.txt](llms/observability.txt) 40.3 KB → [llms/observability.2.txt](llms/observability.2.txt) 10.1 KB
|
|
32
|
-
- **stitchkit/agent-runtime**: [llms/agent-runtime.txt](llms/agent-runtime.txt)
|
|
32
|
+
- **stitchkit/agent-runtime**: [llms/agent-runtime.txt](llms/agent-runtime.txt) 37.0 KB → [llms/agent-runtime.2.txt](llms/agent-runtime.2.txt) 44.2 KB → [llms/agent-runtime.3.txt](llms/agent-runtime.3.txt) 38.2 KB → [llms/agent-runtime.4.txt](llms/agent-runtime.4.txt) 34.1 KB → [llms/agent-runtime.5.txt](llms/agent-runtime.5.txt) 44.5 KB → [llms/agent-runtime.6.txt](llms/agent-runtime.6.txt) 17.5 KB
|
|
33
33
|
- **stitchkit/agent-runtime/testing**: [llms/agent-runtime-testing.txt](llms/agent-runtime-testing.txt) 3.8 KB
|
|
34
34
|
- **stitchkit/agent-runtime/harness**: [llms/agent-runtime-harness.txt](llms/agent-runtime-harness.txt) 13.7 KB
|
|
35
35
|
- **stitchkit/agent-runtime/coding-tools**: [llms/agent-runtime-coding-tools.txt](llms/agent-runtime-coding-tools.txt) 5.0 KB
|
|
@@ -47,7 +47,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
47
47
|
- **stitchkit/agent-runtime/postgres**: [llms/agent-runtime-postgres.txt](llms/agent-runtime-postgres.txt) 1.7 KB
|
|
48
48
|
- **stitchkit/agent-runtime/sqlite/bun**: [llms/agent-runtime-sqlite-bun.txt](llms/agent-runtime-sqlite-bun.txt) 1.7 KB
|
|
49
49
|
- **stitchkit/agent-runtime/sqlite/node**: [llms/agent-runtime-sqlite-node.txt](llms/agent-runtime-sqlite-node.txt) 1.6 KB
|
|
50
|
-
- **stitchkit/application**: [llms/application.txt](llms/application.txt)
|
|
50
|
+
- **stitchkit/application**: [llms/application.txt](llms/application.txt) 41.1 KB → [llms/application.2.txt](llms/application.2.txt) 31.5 KB → [llms/application.3.txt](llms/application.3.txt) 32.4 KB
|
|
51
51
|
- **stitchkit/application/grammy**: [llms/application-grammy.txt](llms/application-grammy.txt) 2.3 KB
|
|
52
52
|
- **stitchkit/application/opentelemetry**: [llms/application-opentelemetry.txt](llms/application-opentelemetry.txt) 1.6 KB
|
|
53
53
|
- **stitchkit/application/directory-inbox**: [llms/application-directory-inbox.txt](llms/application-directory-inbox.txt) 0.3 KB
|
package/package.json
CHANGED