stitchkit 0.110.2 → 0.110.4
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 +16 -0
- package/dist/agent-runtime/archive-projection.d.ts +10 -0
- package/dist/agent-runtime/archive-projection.d.ts.map +1 -0
- package/dist/agent-runtime/branch-messages.d.ts.map +1 -1
- package/dist/agent-runtime/branch-provider.d.ts +123 -8
- package/dist/agent-runtime/branch-provider.d.ts.map +1 -1
- package/dist/agent-runtime/branch-replay.d.ts.map +1 -1
- package/dist/agent-runtime/branch-source.d.ts.map +1 -1
- package/dist/agent-runtime/provider-content.d.ts +183 -0
- package/dist/agent-runtime/provider-content.d.ts.map +1 -0
- package/dist/agent-runtime/provider-journal.d.ts +209 -0
- package/dist/agent-runtime/provider-journal.d.ts.map +1 -0
- package/dist/agent-runtime/run-provider-ledger.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite-events.d.ts.map +1 -1
- package/dist/agent-runtime/store-archive.d.ts.map +1 -1
- package/dist/agent-runtime/store-branch.d.ts.map +1 -1
- package/dist/agent-runtime/store-events.d.ts +1041 -0
- package/dist/agent-runtime/store-events.d.ts.map +1 -1
- package/dist/agent-runtime/store-replay.d.ts +4 -0
- package/dist/agent-runtime/store-replay.d.ts.map +1 -0
- package/dist/entrypoints/agent-runtime/harness.js +2 -2
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +3 -3
- package/dist/entrypoints/agent-runtime/sqlite/node.js +3 -3
- package/dist/entrypoints/agent-runtime/testing.js +3 -3
- package/dist/entrypoints/agent-runtime.d.ts +1 -1
- package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime.js +6 -4
- package/dist/{index-zbssway3.js → index-5pbtbce0.js} +4 -9
- package/dist/{index-79zxnh52.js → index-8jv0trhg.js} +10 -7
- package/dist/{index-e9rbhw1s.js → index-9ket8wzx.js} +2 -2
- package/dist/{index-6qeqdz0z.js → index-jna0ejsa.js} +178 -1
- package/dist/{index-s2bgwsyr.js → index-mpg1t7nv.js} +1058 -1119
- package/llms/agent-runtime.3.txt +1 -0
- package/llms/agent-runtime.txt +23 -2
- package/llms-full.txt +24 -2
- package/llms.txt +1 -1
- package/package.json +1 -1
package/llms/agent-runtime.3.txt
CHANGED
|
@@ -104,6 +104,7 @@ Server-only optional application runtime. See the
|
|
|
104
104
|
| `AgentStoreEventEnvelopeSchema` / `AgentStoreEventEnvelope` / `AgentStoreEventKindSchema` / `AgentStoreEventKind` / `AgentStoreEventPageSchema` / `AgentStoreEventPage` | schema / _type_ | append-only event envelope, closed current vocabulary (including `provider/request` and `provider/response`) and bounded page |
|
|
105
105
|
| `AppendAgentStoreEventSchema` / `AppendAgentStoreEvent` / `ReadAgentStoreEventsSchema` / `ReadAgentStoreEvents` | schema / _type_ | required append and bounded-read store contracts |
|
|
106
106
|
| `AgentStoreTransitionSchema` / `AgentStoreTransition` / `AgentStoreEventDraft` / `AgentStoreEventDecodeAccepted` / `AgentStoreEventDecodeIgnored` / `AgentStoreEventDecodeResult` / `decodeAgentStoreEvent` | schema / _types_ / function | normalized runtime mutations, append drafts and strict current/ignorable future-event decoding outcomes |
|
|
107
|
+
| `AgentStoreTransitionRecordSchema` / `AgentStoreTransitionRecord` | schema / _type_ | persisted journal payloads: full runtime mutations or hash-only streaming checkpoint observations with numeric part/byte counts; inspection does not authorize replay |
|
|
107
108
|
| `defineAgentProjection` / `AgentProjectionDefinition` / `AgentProjectionValue` / `createAgentProjectionRegistry` / `createSqliteAgentProjectionStore` | functions / _type_ | deterministic folds with persisted version and honest `uptoSeq` checkpoints |
|
|
108
109
|
| `agentSummaryProjection` / `agentUsageProjection` / `agentOutlineProjection` | constants | built-in list summary, provenance-carrying usage and request outline projections |
|
|
109
110
|
| `agentConversationCardProjection` / `agentStateSlotsProjection` / `agentScheduleSummaryProjection` | constants | focused card, durable-state and schedule lifecycle projections |
|
package/llms/agent-runtime.txt
CHANGED
|
@@ -612,16 +612,28 @@ spill. Compacted content stays in the event history and SQLite inactive rows; th
|
|
|
612
612
|
same active summaries. A hash-only checkpoint is historical digest evidence, marked
|
|
613
613
|
`sourceSha256`; a later full terminal record must settle its content.
|
|
614
614
|
|
|
615
|
+
Recorded provider options and canonical reasoning/tool-call provider metadata are retained.
|
|
616
|
+
Provider message hashes and request references remain consistent after rekey. Metadata is
|
|
617
|
+
data, subject to the opaque JSON reference guard: an undocumented runtime reference key
|
|
618
|
+
refuses instead of carrying a source identity into the destination. Unknown message fields
|
|
619
|
+
and malformed request/message digests also refuse before any destination writes.
|
|
620
|
+
|
|
615
621
|
A branch grants no source authority. Terminal run owners/fences and approval signatures are
|
|
616
622
|
removed. State, schedules, children, retries, sandbox, approval rejection and durability facts are
|
|
617
623
|
retained as inert `runtime/branch-observation` records; they cannot repopulate operational state
|
|
618
624
|
or pending effects. Spills discard source authorization and require the explicit fresh
|
|
619
625
|
`artifactAuthorization`; normal destination read authorization still applies. No cached projection,
|
|
620
|
-
schedule row or child relation is cloned.
|
|
626
|
+
schedule row or child relation is cloned. Ordinary companion projections in the export have
|
|
627
|
+
`{ name, version, uptoSeq, value, updatedAt }` envelopes. Branch validates their envelopes,
|
|
628
|
+
unique names and checkpoints within the supplied journal, then discards their values. They are
|
|
629
|
+
derived application caches, including ones containing source references; their values are never
|
|
630
|
+
replayed as state or copied as authority. Rebuild destination projections with
|
|
631
|
+
`createSqliteAgentProjectionStore().advance(...)` over the destination ledger. An exact earlier
|
|
632
|
+
boundary never inherits a later cache value.
|
|
621
633
|
|
|
622
634
|
The store validates the complete archive before writing: contiguous events, a matching runtime
|
|
623
635
|
snapshot, known typed forms, reference closure, and spill bytes/digests. Unsupported provider
|
|
624
|
-
envelopes, encrypted invocation payloads, unknown event versions,
|
|
636
|
+
envelopes, encrypted invocation payloads, unknown event versions, malformed projection envelopes,
|
|
625
637
|
missing artifacts and undocumented reference fields in opaque JSON refuse atomically. They need
|
|
626
638
|
an owner-defined transfer codec; never recursively rewrite internal JSON in the application.
|
|
627
639
|
Third-party drivers must provide atomic write transactions and archive support for spills;
|
|
@@ -638,6 +650,15 @@ upstream name comes from the model provider's own `resolveResponseProvider` —
|
|
|
638
650
|
supplies it — so the runtime carries the fact without learning any gateway's metadata key. The normalized
|
|
639
651
|
head/run/message tables remain the fast operational projection.
|
|
640
652
|
|
|
653
|
+
For `runtime/transition` payload inspection, use `AgentStoreTransitionRecordSchema` and its
|
|
654
|
+
inferred `AgentStoreTransitionRecord` type. A checkpoint record may hold either the full assistant
|
|
655
|
+
message or `{ id, status: 'streaming', sha256?, sourceSha256?, parts: number, bytes: number }`;
|
|
656
|
+
exactly one digest is present. Numeric `parts` counts parts; it is not an array of message parts.
|
|
657
|
+
`sourceSha256` preserves a branch's historical source digest. These hash-only records are
|
|
658
|
+
observations, not executable checkpoint inputs. `AgentStoreTransitionSchema` describes full
|
|
659
|
+
store mutations. Shape inspection does not replace branch's complete replay/reference validation.
|
|
660
|
+
Schema v4 archives written by 0.109.4 use the same journal representation.
|
|
661
|
+
|
|
641
662
|
Use `defineAgentProjection` with `createSqliteAgentProjectionStore` for a
|
|
642
663
|
deterministic versioned fold. Every value reports `uptoSeq`, so a caller can
|
|
643
664
|
distinguish current data from a projection that still has events to consume.
|
package/llms-full.txt
CHANGED
|
@@ -5810,16 +5810,28 @@ spill. Compacted content stays in the event history and SQLite inactive rows; th
|
|
|
5810
5810
|
same active summaries. A hash-only checkpoint is historical digest evidence, marked
|
|
5811
5811
|
`sourceSha256`; a later full terminal record must settle its content.
|
|
5812
5812
|
|
|
5813
|
+
Recorded provider options and canonical reasoning/tool-call provider metadata are retained.
|
|
5814
|
+
Provider message hashes and request references remain consistent after rekey. Metadata is
|
|
5815
|
+
data, subject to the opaque JSON reference guard: an undocumented runtime reference key
|
|
5816
|
+
refuses instead of carrying a source identity into the destination. Unknown message fields
|
|
5817
|
+
and malformed request/message digests also refuse before any destination writes.
|
|
5818
|
+
|
|
5813
5819
|
A branch grants no source authority. Terminal run owners/fences and approval signatures are
|
|
5814
5820
|
removed. State, schedules, children, retries, sandbox, approval rejection and durability facts are
|
|
5815
5821
|
retained as inert `runtime/branch-observation` records; they cannot repopulate operational state
|
|
5816
5822
|
or pending effects. Spills discard source authorization and require the explicit fresh
|
|
5817
5823
|
`artifactAuthorization`; normal destination read authorization still applies. No cached projection,
|
|
5818
|
-
schedule row or child relation is cloned.
|
|
5824
|
+
schedule row or child relation is cloned. Ordinary companion projections in the export have
|
|
5825
|
+
`{ name, version, uptoSeq, value, updatedAt }` envelopes. Branch validates their envelopes,
|
|
5826
|
+
unique names and checkpoints within the supplied journal, then discards their values. They are
|
|
5827
|
+
derived application caches, including ones containing source references; their values are never
|
|
5828
|
+
replayed as state or copied as authority. Rebuild destination projections with
|
|
5829
|
+
`createSqliteAgentProjectionStore().advance(...)` over the destination ledger. An exact earlier
|
|
5830
|
+
boundary never inherits a later cache value.
|
|
5819
5831
|
|
|
5820
5832
|
The store validates the complete archive before writing: contiguous events, a matching runtime
|
|
5821
5833
|
snapshot, known typed forms, reference closure, and spill bytes/digests. Unsupported provider
|
|
5822
|
-
envelopes, encrypted invocation payloads, unknown event versions,
|
|
5834
|
+
envelopes, encrypted invocation payloads, unknown event versions, malformed projection envelopes,
|
|
5823
5835
|
missing artifacts and undocumented reference fields in opaque JSON refuse atomically. They need
|
|
5824
5836
|
an owner-defined transfer codec; never recursively rewrite internal JSON in the application.
|
|
5825
5837
|
Third-party drivers must provide atomic write transactions and archive support for spills;
|
|
@@ -5836,6 +5848,15 @@ upstream name comes from the model provider's own `resolveResponseProvider` —
|
|
|
5836
5848
|
supplies it — so the runtime carries the fact without learning any gateway's metadata key. The normalized
|
|
5837
5849
|
head/run/message tables remain the fast operational projection.
|
|
5838
5850
|
|
|
5851
|
+
For `runtime/transition` payload inspection, use `AgentStoreTransitionRecordSchema` and its
|
|
5852
|
+
inferred `AgentStoreTransitionRecord` type. A checkpoint record may hold either the full assistant
|
|
5853
|
+
message or `{ id, status: 'streaming', sha256?, sourceSha256?, parts: number, bytes: number }`;
|
|
5854
|
+
exactly one digest is present. Numeric `parts` counts parts; it is not an array of message parts.
|
|
5855
|
+
`sourceSha256` preserves a branch's historical source digest. These hash-only records are
|
|
5856
|
+
observations, not executable checkpoint inputs. `AgentStoreTransitionSchema` describes full
|
|
5857
|
+
store mutations. Shape inspection does not replace branch's complete replay/reference validation.
|
|
5858
|
+
Schema v4 archives written by 0.109.4 use the same journal representation.
|
|
5859
|
+
|
|
5839
5860
|
Use `defineAgentProjection` with `createSqliteAgentProjectionStore` for a
|
|
5840
5861
|
deterministic versioned fold. Every value reports `uptoSeq`, so a caller can
|
|
5841
5862
|
distinguish current data from a projection that still has events to consume.
|
|
@@ -21835,6 +21856,7 @@ Server-only optional application runtime. See the
|
|
|
21835
21856
|
| `AgentStoreEventEnvelopeSchema` / `AgentStoreEventEnvelope` / `AgentStoreEventKindSchema` / `AgentStoreEventKind` / `AgentStoreEventPageSchema` / `AgentStoreEventPage` | schema / _type_ | append-only event envelope, closed current vocabulary (including `provider/request` and `provider/response`) and bounded page |
|
|
21836
21857
|
| `AppendAgentStoreEventSchema` / `AppendAgentStoreEvent` / `ReadAgentStoreEventsSchema` / `ReadAgentStoreEvents` | schema / _type_ | required append and bounded-read store contracts |
|
|
21837
21858
|
| `AgentStoreTransitionSchema` / `AgentStoreTransition` / `AgentStoreEventDraft` / `AgentStoreEventDecodeAccepted` / `AgentStoreEventDecodeIgnored` / `AgentStoreEventDecodeResult` / `decodeAgentStoreEvent` | schema / _types_ / function | normalized runtime mutations, append drafts and strict current/ignorable future-event decoding outcomes |
|
|
21859
|
+
| `AgentStoreTransitionRecordSchema` / `AgentStoreTransitionRecord` | schema / _type_ | persisted journal payloads: full runtime mutations or hash-only streaming checkpoint observations with numeric part/byte counts; inspection does not authorize replay |
|
|
21838
21860
|
| `defineAgentProjection` / `AgentProjectionDefinition` / `AgentProjectionValue` / `createAgentProjectionRegistry` / `createSqliteAgentProjectionStore` | functions / _type_ | deterministic folds with persisted version and honest `uptoSeq` checkpoints |
|
|
21839
21861
|
| `agentSummaryProjection` / `agentUsageProjection` / `agentOutlineProjection` | constants | built-in list summary, provenance-carrying usage and request outline projections |
|
|
21840
21862
|
| `agentConversationCardProjection` / `agentStateSlotsProjection` / `agentScheduleSummaryProjection` | constants | focused card, durable-state and schedule lifecycle projections |
|
package/llms.txt
CHANGED
|
@@ -25,7 +25,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
25
25
|
- **stitchkit/primitives**: [llms/primitives.txt](llms/primitives.txt) 11.7 KB
|
|
26
26
|
- **stitchkit/server**: [llms/server.txt](llms/server.txt) 45.3 KB → [llms/server.2.txt](llms/server.2.txt) 14.6 KB → [llms/server.3.txt](llms/server.3.txt) 45.6 KB → [llms/server.4.txt](llms/server.4.txt) 38.3 KB → [llms/server.5.txt](llms/server.5.txt) 22.1 KB
|
|
27
27
|
- **stitchkit/observability**: [llms/observability.txt](llms/observability.txt) 45.9 KB
|
|
28
|
-
- **stitchkit/agent-runtime**: [llms/agent-runtime.txt](llms/agent-runtime.txt)
|
|
28
|
+
- **stitchkit/agent-runtime**: [llms/agent-runtime.txt](llms/agent-runtime.txt) 42.7 KB → [llms/agent-runtime.2.txt](llms/agent-runtime.2.txt) 46.7 KB → [llms/agent-runtime.3.txt](llms/agent-runtime.3.txt) 35.6 KB
|
|
29
29
|
- **stitchkit/agent-runtime/testing**: [llms/agent-runtime-testing.txt](llms/agent-runtime-testing.txt) 2.6 KB
|
|
30
30
|
- **stitchkit/agent-runtime/harness**: [llms/agent-runtime-harness.txt](llms/agent-runtime-harness.txt) 11.0 KB
|
|
31
31
|
- **stitchkit/agent-runtime/coding-tools**: [llms/agent-runtime-coding-tools.txt](llms/agent-runtime-coding-tools.txt) 5.0 KB
|
package/package.json
CHANGED