stitchkit 0.100.0 → 0.100.2

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 (79) hide show
  1. package/CHANGELOG.md +93 -1
  2. package/dist/agent-runtime/invocation-attempt.d.ts +6 -0
  3. package/dist/agent-runtime/invocation-attempt.d.ts.map +1 -1
  4. package/dist/agent-runtime/invocation-payload.d.ts +2 -0
  5. package/dist/agent-runtime/invocation-payload.d.ts.map +1 -1
  6. package/dist/agent-runtime/invocation-read.d.ts.map +1 -1
  7. package/dist/agent-runtime/invocations.d.ts +6 -0
  8. package/dist/agent-runtime/invocations.d.ts.map +1 -1
  9. package/dist/agent-runtime/projections.d.ts.map +1 -1
  10. package/dist/agent-runtime/schedule-dispatch.d.ts +9 -2
  11. package/dist/agent-runtime/schedule-dispatch.d.ts.map +1 -1
  12. package/dist/agent-runtime/schedule-records.d.ts +8 -2
  13. package/dist/agent-runtime/schedule-records.d.ts.map +1 -1
  14. package/dist/agent-runtime/schedules.d.ts +5 -0
  15. package/dist/agent-runtime/schedules.d.ts.map +1 -1
  16. package/dist/agent-runtime/sqlite-events.d.ts.map +1 -1
  17. package/dist/agent-runtime/store-create.d.ts.map +1 -1
  18. package/dist/agent-runtime/store-driver-contract.d.ts +9 -0
  19. package/dist/agent-runtime/store-driver-contract.d.ts.map +1 -1
  20. package/dist/agent-runtime/store-event-once.d.ts +9 -1
  21. package/dist/agent-runtime/store-event-once.d.ts.map +1 -1
  22. package/dist/agent-runtime/store-memory.d.ts.map +1 -1
  23. package/dist/agent-runtime/store.d.ts +6 -0
  24. package/dist/agent-runtime/store.d.ts.map +1 -1
  25. package/dist/application/change-subscription.d.ts.map +1 -1
  26. package/dist/application/notification-delivery.d.ts +24 -1
  27. package/dist/application/notification-delivery.d.ts.map +1 -1
  28. package/dist/application/notification-outbox-state.d.ts +4 -0
  29. package/dist/application/notification-outbox-state.d.ts.map +1 -1
  30. package/dist/application/notification-outbox.d.ts.map +1 -1
  31. package/dist/application/process-lifecycle-transitions.d.ts +13 -2
  32. package/dist/application/process-lifecycle-transitions.d.ts.map +1 -1
  33. package/dist/application/process-lifecycle.d.ts +2 -1
  34. package/dist/application/process-lifecycle.d.ts.map +1 -1
  35. package/dist/application/watch-hub-core.d.ts +14 -79
  36. package/dist/application/watch-hub-core.d.ts.map +1 -1
  37. package/dist/application/watch-hub-source.d.ts +98 -0
  38. package/dist/application/watch-hub-source.d.ts.map +1 -0
  39. package/dist/browser/session-credentials.d.ts +6 -0
  40. package/dist/browser/session-credentials.d.ts.map +1 -1
  41. package/dist/browser/session.d.ts +3 -1
  42. package/dist/browser/session.d.ts.map +1 -1
  43. package/dist/entrypoints/agent-runtime/harness.js +1 -1
  44. package/dist/entrypoints/agent-runtime/sqlite/bun.js +2 -2
  45. package/dist/entrypoints/agent-runtime/sqlite/node.js +2 -2
  46. package/dist/entrypoints/agent-runtime/testing.js +2 -2
  47. package/dist/entrypoints/agent-runtime.js +53 -19
  48. package/dist/entrypoints/application/diagnostic-journal.js +1 -1
  49. package/dist/entrypoints/application.d.ts +2 -2
  50. package/dist/entrypoints/application.d.ts.map +1 -1
  51. package/dist/entrypoints/application.js +285 -193
  52. package/dist/entrypoints/files.js +8 -2
  53. package/dist/entrypoints/index.js +33 -6
  54. package/dist/entrypoints/live.js +16 -12
  55. package/dist/entrypoints/node.js +1 -1
  56. package/dist/entrypoints/server.js +4 -4
  57. package/dist/{index-s84he4v7.js → index-10x2hbx0.js} +4 -1
  58. package/dist/{index-js7gqrb1.js → index-c6bxbsnc.js} +5 -1
  59. package/dist/{index-y9qn426m.js → index-eaysmdtq.js} +10 -1
  60. package/dist/{index-xwhjjw2x.js → index-f4fx2tza.js} +119 -49
  61. package/dist/{index-p3vsv1fb.js → index-hadmp193.js} +14 -5
  62. package/dist/{index-0b1cnze2.js → index-vqr7f7v8.js} +31 -15
  63. package/dist/internal/coalesced-task.d.ts +2 -0
  64. package/dist/internal/coalesced-task.d.ts.map +1 -1
  65. package/dist/internal/process-instance.d.ts.map +1 -1
  66. package/dist/internal/with-exclusive-lock.d.ts.map +1 -1
  67. package/dist/server/realtime.d.ts.map +1 -1
  68. package/llms/agent-runtime.2.txt +13 -5
  69. package/llms/agent-runtime.3.txt +9 -4
  70. package/llms/agent-runtime.txt +8 -3
  71. package/llms/application.2.txt +47 -6
  72. package/llms/application.txt +18 -27
  73. package/llms/live.txt +2 -1
  74. package/llms/server.3.txt +22 -0
  75. package/llms/stitchkit.3.txt +9 -5
  76. package/llms/upgrading-0.74.0-0.100.0.txt +15 -3
  77. package/llms-full.txt +118 -29
  78. package/llms.txt +5 -5
  79. package/package.json +1 -1
@@ -1,6 +1,8 @@
1
1
  import { type BackoffPolicy } from './backoff.js';
2
2
  export interface CoalescedTask {
3
3
  readonly running: boolean;
4
+ /** A trigger arrived that no pass has served yet. */
5
+ readonly pending: boolean;
4
6
  trigger(): void;
5
7
  pauseRetry(): void;
6
8
  close(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"coalesced-task.d.ts","sourceRoot":"","sources":["../../src/internal/coalesced-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,WAAW,CAAC;AAE9D,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,OAAO,IAAI,IAAI,CAAC;IAChB,UAAU,IAAI,IAAI,CAAC;IACnB,KAAK,IAAI,IAAI,CAAC;CACf;AAED,0FAA0F;AAC1F,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAC1C,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACrB,MAAM,IAAI,OAAO,CAAC;IAClB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,aAAa,CAAC;CACxB,GAAG,aAAa,CAoDhB"}
1
+ {"version":3,"file":"coalesced-task.d.ts","sourceRoot":"","sources":["../../src/internal/coalesced-task.ts"],"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gB,EAAE,KAAK,CAAC,CAAC;CAC7E;AAED,wBAAgB,kBAAkB,CAChC,KAAK,CAAC,eAAe,SAAS,qBAAqB,EACnD,KAAK,CAAC,eAAe,SAAS,qBAAqB,EACnD,KAAK,GAAG,GAAG,EAEX,QAAQ,EAAE,gBAAgB,CAAC,eAAe,EAAE,eAAe,CAAC,EAC5D,MAAM,EAAE,oBAAoB,CAAC,KAAK,CAAC,EACnC,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,yBAAyB,CAAC;IAAC,MAAM,CAAC,EAAE,YAAY,CAAA;CAAO,GAC9E,cAAc,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,CAAC,CAyDzD"}
@@ -848,15 +848,23 @@ hashes; `readPayload({ conversationId, artifactId }, context)` separately author
848
848
  `read-payload` and checks authentication tags and hashes. `payloadKey` must be 32
849
849
  bytes and is copied at construction. Keep it outside the event store/backups; retain
850
850
  the appropriate key when restoring an archive. `maxPayloadBytes` defaults to 4 MiB
851
- (range 1 KiB–64 MiB); streaming output evidence is capped at 1 MiB. Request headers
851
+ (range 1 KiB–64 MiB). Streaming output evidence keeps parts up to half of it; past
852
+ that the evidence carries `truncated: { parts, sha256 }` over the whole stream, and
853
+ the answer itself is never cut. A receipt that cannot be written never changes an
854
+ outcome: `complete()` returns it with `receiptError` beside it, and a succeeded
855
+ answer keeps its `text`. Request headers
852
856
  are excluded. Protect existing agent history independently: enabling receipts does
853
857
  not encrypt its ordinary conversation records.
854
858
 
855
859
  The built-in memory and SQLite stores implement `appendEventOnce`. Custom stores
856
860
  must implement its once-only check and append atomically, returning the original
857
861
  event on a duplicate key scoped by conversation and kind. A factory without this
858
- capability refuses receipt setup. The driver-backed implementation reads bounded
859
- pages under one transaction, without another table or database.
862
+ capability refuses receipt setup. The driver-backed implementation finds the keyed
863
+ event by its identity through the driver's optional `events.find` — one index probe
864
+ in SQLite — so admission costs the same on a long conversation as on a new one; a
865
+ custom driver without `find` falls back to paging the log in one transaction.
866
+ `store.findEventOnce({ conversationId, kind, key })` reads the same event back.
867
+ Invocation payload artifacts are keyed by their artifact id the same way.
860
868
 
861
869
  ### Migration from direct SDK completions
862
870
 
@@ -864,5 +872,5 @@ pages under one transaction, without another table or database.
864
872
  Replace the direct `generateText` call with `invocations.complete`, configure host
865
873
  authorization and a retained payload key, and pass the same ledger in the agent's
866
874
  `invocations` option. Use the returned invocation ID and the paginated `read` method
867
- for receipt queries; do not import runtime internals. This API is unreleased; it is
868
- not present in 0.99.0. Existing runtime configurations need no migration.
875
+ for receipt queries; do not import runtime internals. Available since 0.100.0;
876
+ existing runtime configurations need no migration.
@@ -111,7 +111,7 @@ Server-only optional application runtime. See the
111
111
  | `AgentSandboxProcess` / `AgentSandboxOutputStream` | _types_ | structural child/output interface for optional lifecycle-owned `AgentProcessSandbox.spawn`, without Node ambient type dependencies |
112
112
  | `AgentEventSearchResultSchema` / `AgentEventSearchResult` / `createSqliteAgentEventSearch` / `createAgentEventSearchTools` | schema / _type_ / functions | authorized FTS5 search with exact event addresses and `session_*` tools |
113
113
  | `createSqliteAgentSpillStore` | function | durable content-address-checked artifact storage, bounded read/search, retention facts and archive participation |
114
- | `AgentScheduleSchema` / `AgentSchedule` / `AgentScheduleService` / `AgentScheduleDeliveryOutcomeSchema` / `AgentScheduleDeliveryOutcome` / `createAgentScheduleService` / `createAgentScheduleTools` | schemas / _types_ / functions | durable `at`/`after`/timezone-explicit `every`, indexed retry eligibility, typed retry/terminal failure, bounded dispatch and fenced stable occurrence identity (ADR 0202) |
114
+ | `AgentScheduleSchema` / `AgentSchedule` / `AgentScheduleService` / `AgentScheduleDeliveryOutcomeSchema` / `AgentScheduleDeliveryOutcome` / `createAgentScheduleService` / `createAgentScheduleTools` | schemas / _types_ / functions | durable `at`/`after`/timezone-explicit `every`, indexed retry eligibility, typed retry/terminal failure (any other returned value delivers), `maxAttempts` (default 1000) per occurrence — a one-off ends `failed`, a recurring schedule skips to its next slot — bounded dispatch and fenced stable occurrence identity (ADR 0202) |
115
115
  | `AgentChildBudgetSchema` / `AgentChildBudget` / `AgentChildStateSchema` / `AgentChildState` / `AgentChildRecordSchema` / `AgentChildRecord` | schema / _type_ | durable child graph, bounded seed and measured budget state |
116
116
  | `AgentChildBlockingKindSchema` / `AgentChildBlockingKind` / `AgentChildBlockingSourceSchema` / `AgentChildBlockingSource` / `AgentChildBlockingEventSchema` / `AgentChildBlockingEvent` / `AgentChildBlockingDecision` | schemas / _types_ | parent-owned request identities; responses discriminate approval decisions from JSON input values |
117
117
  | `AgentChildHandle` / `AgentChildManager` / `SqliteAgentChildManagerConfig` / `createSqliteAgentChildManager` / `createAgentChildTools` / `agentChildBudgetStopPolicy` | _type_ / functions | host execution port, child lifecycle, cascade (given to `createAgentRuntime` as `children`), messaging, Agent tools, and the child runtime's own budget stop policy — `recordStepUsage` at every step boundary, `policy_stop` as `child-budget` when spent |
@@ -272,7 +272,9 @@ operator-only observability sink explicitly opts in.
272
272
  `ModelInvocationConfig`: the existing store and model registry, a 32-byte payload
273
273
  key, required host authorization, optional bounded payload size and `onAttempt`.
274
274
  `complete(input, context, signal?)` executes only the supplied prompt, with no tools
275
- or framework instructions; repeated keys return the existing invocation ID.
275
+ or framework instructions; repeated keys return the existing invocation ID. It
276
+ resolves `{ invocationId, outcome, text?, receiptError? }`: `receiptError` says a
277
+ receipt could not be written and never changes `outcome` or drops `text`.
276
278
  `read(input, context)` returns a bounded event page shared by agent and completion;
277
279
  `readPayload(input, context)` requires a separate authorization action to decrypt
278
280
  one protected artifact. See the [guide and migration example](../guide/agent-runtime.md#plain-completions-and-shared-invocation-receipts).
@@ -287,8 +289,11 @@ one protected artifact. See the [guide and migration example](../guide/agent-run
287
289
 
288
290
  The runtime `invocations` option takes this ledger and a trace callback; it requires
289
291
  the same store and preserves the existing tool loop. `AgentRuntimeStore.appendEventOnce`
290
- is an optional atomic capability required by receipt admission. Built-in stores
291
- supply it; custom adapters must honor its once-only transaction contract.
292
+ is an optional atomic capability required by receipt admission, and
293
+ `AgentRuntimeStore.findEventOnce` reads the event it wrote by kind and key. Built-in
294
+ stores supply both; custom adapters must honor the once-only transaction contract.
295
+ A driver's optional `events.find(transaction, { conversationId, eventId })` makes
296
+ both one lookup instead of a scan of the conversation log.
292
297
 
293
298
  ==============================================================================
294
299
  # API reference: `stitchkit-tui` (docs/api/reference.md)
@@ -19,7 +19,7 @@ description: Configure Stitchkit's optional durable history, stream loop, run co
19
19
  type: architecture
20
20
  status: active
21
21
  created: 2026-08-22
22
- updated: 2026-09-26 16:00 +07:00
22
+ updated: 2026-09-28 18:39 +07:00
23
23
  ---
24
24
 
25
25
  # Agent application runtime
@@ -636,9 +636,14 @@ has invoked a tool is never automatically replayed.
636
636
  `createAgentScheduleService` persists `at`, `after` and `every` input. Repeating
637
637
  schedules require an explicit IANA time zone. Dispatch uses a stable
638
638
  `schedule:<id>:<occurrence>` idempotency key, and restart lateness is recorded.
639
- Resolve `void` after durable admission; return `{ status: 'retry', reason }` for a
639
+ Resolve after durable admission; return `{ status: 'retry', reason }` for a
640
640
  transient refusal or `{ status: 'terminal', reason }` to stop the entire schedule in
641
- `failed` state. Throws retry too. Backoff is 1, 2, 4, 8, 16, 32, then 60 seconds,
641
+ `failed` state. Only those two shapes are failures: any other returned value — a
642
+ queue length, a receipt — means the callback returned, so it delivered. Throws retry
643
+ too. `maxAttempts` (default 1000, about sixteen hours at the retry ceiling) bounds
644
+ one occurrence: a one-off schedule then becomes `failed`, a recurring one gives up
645
+ that occurrence (`schedule/failed` with `skipped: true` and the `nextAt` it moves
646
+ to) and keeps its cadence. A failure reason is kept to 1000 characters. Backoff is 1, 2, 4, 8, 16, 32, then 60 seconds,
642
647
  capped at 60 seconds and persisted across restart. `retryAt`, `attempts` and `lastError`
643
648
  show retry diagnostics; success resets them. `nextAt` and `lateByMs` retain the original
644
649
  occurrence time. Recurring schedules fire once after an idle stretch and advance to the
@@ -11,12 +11,40 @@ Parts of this slice:
11
11
  # Guide: Managed application kernel (docs/guide/application-kernel.md) (continued)
12
12
  ==============================================================================
13
13
 
14
+ ## Recovering change subscriptions
15
+
16
+ `changeSubscriptionResource` is an optional resource over a consumer-owned driver.
17
+ It uses a finite declared key set, subscribes before reading, reconciles after
18
+ reconnect and periodically repairs lost hints. `reconcileIntervalMs` is explicit;
19
+ notifications alone cannot prove freshness. Within a key, hints coalesce into one
20
+ trailing read and a failed read retries with backoff. Use the supplied
21
+ `context.commit(() => publish(value))` after awaits to reject an obsolete connection.
22
+
23
+ Drivers implement `connect(signal)` and return `subscribe({ signal, hint,
24
+ disconnected })` plus `close()`. Subscribe must establish the notification boundary
25
+ before resolving. A database LISTEN driver owns its connection, channels, decoding
26
+ and transaction ordering; no SQL or database driver is included here. The resource
27
+ owns reconnect, deadlines and shutdown. Drivers must honor abort. If one ignores it,
28
+ its slot remains occupied until settlement; deadlines cannot safely manufacture
29
+ successful cleanup or permit an overlapping connection.
30
+
31
+ For watched reads, set `reconcileIntervalMs` on the existing `createWatchHub` rather
32
+ than building a second read loop. Its per-key machinery is shared with managed
33
+ subscriptions. Limits default to 1024 sources and 1024 subscribers per hub; set
34
+ explicit finite values for larger workloads. Supply a server-verified admission
35
+ scope to `attach` and abort it on logout, permission revocation or session replacement.
36
+ The read callback receives the trusted scope as its third argument. A client owner
37
+ ID in arguments is not authentication.
38
+
14
39
  ## Multi-action notification delivery
15
40
 
16
41
  Opt into `delivery: { version, actions, project }` on `createNotificationOutbox`.
17
42
  The pure `actions(payload)` selector runs at enqueue; the versioned plan remains
18
43
  fixed throughout retry. Each `send` receives its action and a stable idempotency
19
44
  key; return a small JSON receipt such as a remote message or uploaded object ID.
45
+ An action that returned is confirmed and is never sent again: a result that is not
46
+ JSON, or does not fit the state's byte budget, is kept as `receipt: null` with
47
+ `unrecorded: 'not-json' | 'too-large'` and reported to `onError`.
20
48
  `project(notification, receipts)` applies all confirmed results locally and must
21
49
  be idempotent. Checkpoints and the final projection timestamp live in the existing
22
50
  atomic StateStore; completed receipts retain them within retention/byte limits.
@@ -28,9 +56,13 @@ not repeat confirmed sends. A crash after remote success but before receipt comm
28
56
  is ambiguous: the provider must deduplicate the action key or reconcile its result.
29
57
  A projection can also repeat if its completion checkpoint is lost.
30
58
 
31
- A new executor version must explicitly migrate or terminally classify incompatible
32
- queued plans. Existing `classify`/`onDropped` handles terminal items; a durable
33
- quarantine is the application's responsibility. Whole-state file and memory stores
59
+ A plan keeps its actions from enqueue, so an older version needs only its
60
+ projection to finish: a new executor lists it in `retiredVersions: { v1: project }`
61
+ until the queue has drained. A plan version the executor does not know is reported
62
+ to `onError` as `NotificationPlanVersionError` and waits — at least a poll interval,
63
+ spending no attempt, without `classify` — for a process that knows it: the other
64
+ side of a rolling deploy, the version a rollback returns to, or this one once it
65
+ lists the version. Whole-state file and memory stores
34
66
  remain supported. Atomic enqueue with an unrelated business transaction is not
35
67
  provided by this contract; retain the application's transactional adapter when that
36
68
  boundary is required. Send and projection callbacks own their external deadlines.
@@ -321,7 +353,7 @@ cutovers are covered by the executable
321
353
  | `LifecycleRunSchema` / `LifecycleRun` / `LifecycleStateSchema` / `LifecycleState` / `LifecycleTerminationSchema` / `LifecycleTermination` | schema / _type_ | versioned process-run state — open (`active`, `draining` with `unavailableAt`) and ended (`clean`, `forced`, `startup-failed`, `hot-reload`, `abnormal`) |
322
354
  | `PreviousExitSchema` / `PreviousExit` / `StartFact` / `ReadyFact` / `DrainingFact` / `ShutdownFact` / `ProcessLifecycleFact` | schema / _type_ | first-boot, hot-reload, clean, forced, startup-failed, handoff and abnormal lifecycle facts; `processGapMs` on start, `downtimeMs` (unavailable → ready) on ready |
323
355
  | `transitionProcessStart` / `transitionProcessReady` / `transitionProcessDraining` / `transitionProcessShutdown` | function | pure idempotent runId+pid-owned transitions |
324
- | `LifecycleTransition` / `TransitionStartInput` / `TransitionRunInput` / `TransitionShutdownInput` / `SameVersionOverlap` | _type_ | pure transition inputs (`TransitionRunInput` for ready and draining, extended with `forced` for shutdown), the same-build overlap policy (`abnormal` default / `handoff`) and state+fact result |
356
+ | `LifecycleTransition` / `TransitionStartInput` / `TransitionRunInput` / `TransitionShutdownInput` / `SameVersionOverlap` / `VersionChangeOverlap` | _type_ | pure transition inputs (`TransitionRunInput` for ready and draining, extended with `forced` for shutdown), the same-build overlap policy (`abnormal` default / `handoff`), the version-change overlap policy (`handoff` default / `abnormal`) and state+fact result |
325
357
  | `lifecycleLedgerResource` / `LifecycleLedgerResource` / `LifecycleLedgerResourceConfig` | function / _type_ | managed-resource adapter that records start, readiness, admission stop (draining) and shutdown |
326
358
  | `createNotificationOutbox` / `NotificationOutbox` / `NotificationOutboxConfig` | function / _type_ | bounded at-least-once queue with durable claims, leases, retries and supersede |
327
359
  | `NotificationOutboxItem` / `NotificationOutboxReceipt` / `NotificationOutboxState` / `NotificationSend` / `NotificationFailureClassification` / `DroppedNotification` / `EnqueueNotification` | _type_ | versioned queue records, stable send identity and delivery decisions |
@@ -535,7 +567,10 @@ periodically even when no notification arrives.
535
567
  `reconcileIntervalMs` (10 ms–1 h). `hub.attach(subscriber, scope?)` accepts a
536
568
  `WatchAdmissionScope` containing a **server-verified** `key` (1–512 characters) and
537
569
  revocation `signal`. The key separates sharing and is the optional third argument
538
- of `read(operation, args, scope)`. It must represent account, session and permissions;
570
+ of `read(operation, args, scope)`; a key's `instance` routes frames and never
571
+ separates sources. Attached over `maxSubscribers`, a subscriber gets a watcher whose
572
+ `open` refuses with `Watch subscriber capacity exceeded`; `attach` does not throw
573
+ for capacity. It must represent account, session and permissions;
539
574
  never trust a client-supplied owner ID as that scope.
540
575
 
541
576
 
@@ -546,7 +581,13 @@ never trust a client-supplied owner ID as that scope.
546
581
  immutable executor `version`, pure `actions(payload)` plan selector (1–128 unique
547
582
  names, each at most 128 characters), and idempotent `project(notification, receipts)`.
548
583
  `send` receives optional `action` and stable `idempotencyKey`, and returns a JSON
549
- remote receipt (void becomes null). `NotificationDeliveryStateSchema` validates the
584
+ remote receipt (void becomes null). A result that is not JSON or does not fit the
585
+ byte budget is kept as `receipt: null` with `unrecorded: 'not-json' | 'too-large'`;
586
+ the action stays confirmed and is not sent again. `retiredVersions` maps earlier
587
+ plan versions to their `NotificationProjection` so queued items drain after an
588
+ executor upgrade; an unknown version is reported to `onError` as
589
+ `NotificationPlanVersionError` and waits, spending no attempt and not consulting
590
+ `classify`, for an executor that knows it. `NotificationDeliveryStateSchema` validates the
550
591
  optional `NotificationDeliveryState` on queued items and completed receipts:
551
592
  `version`, `actions`, `receipts` and optional `projectedAt`. Checkpoints share the
552
593
  existing atomic StateStore and lease fence. Receipt retention and serialized byte
@@ -876,7 +876,8 @@ ever became ready:
876
876
  | none | — | — | `first-boot` | — |
877
877
  | recorded `stoppedAt` | — | — | `clean` / `forced` / `startup-failed` / `abnormal` as recorded | unchanged |
878
878
  | still open | yes | — | `hot-reload` | `hot-reload`, closed at the new start |
879
- | still open | no | changed | `handoff` | stays open; it records its own stop later |
879
+ | still open | no | changed | `handoff` (default) | stays open; it records its own stop later |
880
+ | still open | no | changed, `versionChangeOverlap: 'abnormal'` | `abnormal` / `startup-failed` | closed at the new start, as for the same version |
880
881
  | still open, was ready | no | same | `abnormal` (default) | `abnormal`, closed at the new start — an upper bound, the crash time is unknown |
881
882
  | still open, never ready | no | same | `startup-failed` (default) | `startup-failed`, closed at the new start |
882
883
 
@@ -918,7 +919,22 @@ zero-downtime reload of the same build — pass `sameVersionOverlap: 'handoff'`
918
919
  to the ledger, and every open run stays open until it records its own
919
920
  shutdown. The cost of that setting is symmetric: a real crash under it is
920
921
  reported as a handoff and the dead run stays open in the ledger until
921
- retention drops it. The list is kept in the order the transitions wrote it —
922
+ retention drops it.
923
+
924
+ A version change is the other axis, and its default is the opposite:
925
+ `handoff`, because a release that starts the new build before stopping the
926
+ old one is the common zero-downtime shape. Where builds never overlap — one
927
+ process per deployment (a pm2 fork, a systemd unit, one container), the old
928
+ one stopped before the new one starts — pass `versionChangeOverlap:
929
+ 'abnormal'`. An open predecessor of another build then died without
930
+ recording its exit, most often killed during the release itself: it is closed
931
+ as `abnormal` (or `startup-failed`) at the new start, `downtimeMs` is `null`
932
+ instead of `0`, and `previousVersion` / `versionChanged` still describe the
933
+ release. A predecessor that did record its stop is read as before, and its
934
+ downtime is measured. The two settings compose: `sameVersionOverlap:
935
+ 'handoff'` keeps open only the runs of a build allowed to overlap the new one.
936
+
937
+ The list is kept in the order the transitions wrote it —
922
938
  every write goes through one atomic update, so that order is the causal one,
923
939
  and a successor whose clock lags its predecessor still finds it at the head;
924
940
  `startedAt` is data, not the sort key. Retention (`retain`, default 20) drops
@@ -991,28 +1007,3 @@ so a scheduler stall on a loaded host cannot pull a live lock from under its
991
1007
  holder — after which the heartbeat wins and the lock is abandoned. Temporary files a crashed writer left beside the state are swept on
992
1008
  the store's first update. Ledger corruption may be declared reconstructable;
993
1009
  an outbox must fail closed rather than silently discard pending delivery.
994
-
995
- ## Recovering change subscriptions
996
-
997
- `changeSubscriptionResource` is an optional resource over a consumer-owned driver.
998
- It uses a finite declared key set, subscribes before reading, reconciles after
999
- reconnect and periodically repairs lost hints. `reconcileIntervalMs` is explicit;
1000
- notifications alone cannot prove freshness. Within a key, hints coalesce into one
1001
- trailing read and a failed read retries with backoff. Use the supplied
1002
- `context.commit(() => publish(value))` after awaits to reject an obsolete connection.
1003
-
1004
- Drivers implement `connect(signal)` and return `subscribe({ signal, hint,
1005
- disconnected })` plus `close()`. Subscribe must establish the notification boundary
1006
- before resolving. A database LISTEN driver owns its connection, channels, decoding
1007
- and transaction ordering; no SQL or database driver is included here. The resource
1008
- owns reconnect, deadlines and shutdown. Drivers must honor abort. If one ignores it,
1009
- its slot remains occupied until settlement; deadlines cannot safely manufacture
1010
- successful cleanup or permit an overlapping connection.
1011
-
1012
- For watched reads, set `reconcileIntervalMs` on the existing `createWatchHub` rather
1013
- than building a second read loop. Its per-key machinery is shared with managed
1014
- subscriptions. Limits default to 1024 sources and 1024 subscribers per hub; set
1015
- explicit finite values for larger workloads. Supply a server-verified admission
1016
- scope to `attach` and abort it on logout, permission revocation or session replacement.
1017
- The read callback receives the trusted scope as its third argument. A client owner
1018
- ID in arguments is not authentication.
package/llms/live.txt CHANGED
@@ -473,6 +473,7 @@ realtime contract from `stitchkit`, and the server halves live in `stitchkit/app
473
473
  ### Session-scoped watch lifetime
474
474
 
475
475
  `WatchClientConfig.session` captures a `SessionOperation`; `maxKeys` (1024) and
476
- `maxListenersPerKey` (128) bound retained subscriptions. Its lifetime nonce travels
476
+ `maxListenersPerKey` (128) bound retained subscriptions; a handle takes its key on
477
+ `subscribe`, which is where capacity refuses. Its lifetime nonce travels
477
478
  in optional `WatchKey.instance`, preventing old-session frames from matching a new
478
479
  client on the same socket. This is routing identity, never authorization.
package/llms/server.3.txt CHANGED
@@ -1040,6 +1040,28 @@ The nonce is not authorization: the server still admits a verified identity and
1040
1040
  uses `hub.attach(subscriber, { key: verifiedScope, signal: revocationSignal })`.
1041
1041
  The scope key must change with session and permission boundaries.
1042
1042
 
1043
+ One scope and one question share one source and one read, however many client
1044
+ instances watch it: the hub routes each frame to every instance under its own
1045
+ key. A new tab of the same session costs a route, not a read.
1046
+
1047
+ ### Capacity
1048
+
1049
+ A hub admits at most `maxSources` sources (1024) and `maxSubscribers` attached
1050
+ subscribers (1024); a client holds at most `maxKeys` keys (1024) and
1051
+ `maxListenersPerKey` listeners per key (128). Every excess is a refusal, never
1052
+ unbounded state: `open` answers `{ accepted: false, reason }` — including for a
1053
+ subscriber attached over capacity, whose `attach` returns a watcher that refuses
1054
+ every `open` — and a client's `subscribe` throws. A client handle takes its key
1055
+ when it subscribes, so handles a render creates and never subscribes cost
1056
+ nothing. A connection handler that throws closes that connection and is logged;
1057
+ the server goes on. A subscriber attached over capacity is not tracked: its
1058
+ refusals stand until it reconnects.
1059
+
1060
+ A read that fails sends its subscribers `unavailable` / `source-error` with the
1061
+ `code` and `message` of an `AppError`, which is written for its caller. Any other
1062
+ error reaches only the hub's `logger`; the browser reads `The watched read failed`. Set larger finite limits for larger workloads, and
1063
+ `reconcileIntervalMs` when a lost invalidation must recover without a reconnect.
1064
+
1043
1065
  `createCacheBridge` can bind watched handles directly:
1044
1066
 
1045
1067
  ```ts
@@ -150,18 +150,22 @@ can emit / propagate a `traceparent` (see `HttpClientConfig.trace`).
150
150
 
151
151
  `createSessionScope` (`stitchkit`) returns the generic `SessionScope`: `replace(context)`
152
152
  creates a new login lifetime (including same-account relogin), `capture()` returns
153
- its `SessionOperation<T>`, `clear()` invalidates it, and `stop()` permanently closes
154
- the host. Operations expose `id`, `generation`, `context`, `signal`, `current()` and
153
+ its `SessionOperation<T>`, `clear()` invalidates it, `stop()` permanently closes
154
+ the host, and `owns(operation)` answers whether an operation is this scope's current
155
+ one — `current()` alone cannot tell an operation of another scope. Operations expose `id`, `generation`, `context`, `signal`, `current()` and
155
156
  `assertCurrent()`. `run(callback)` checks both success and failure across an await;
156
157
  `deliver(callback)` admits a synchronous final send/state change or returns false.
157
158
  `bindFetch(fetch, headers?)` guards every attempt and scopes its abort signal. Wrap
158
159
  the complete client call in `run` too: headers are not the response body boundary.
159
- Expired work throws `SessionExpiredError`, not a refresh instruction.
160
+ Expired work throws `SessionExpiredError`, not a refresh instruction; when the work
161
+ itself failed, that failure is its `cause`.
160
162
 
161
163
  `createSessionCredentials` accepts `SessionCredentialsConfig`:
162
164
  `scope`, `refresh(credentials, signal)`, `storage.write(session, credentials)`,
163
- `storage.clear()`, `maxPendingWrites` (128), and `refreshTimeoutMs` (30000, at most one
164
- hour). `SessionCredentials` provides `login`, `logout`, `read(operation)` and
165
+ `storage.clear()`, `maxPendingWrites` (128), `refreshTimeoutMs` (30000, at most one
166
+ hour) and `storageTimeoutMs` (30000, at most one hour): a storage call past it
167
+ rejects and frees the queue, so `logout()` still clears; when the late call settles,
168
+ storage is written again from memory, or cleared when nobody is logged in. `SessionCredentials` provides `login`, `logout`, `read(operation)` and
165
169
  `refresh(operation)`. Concurrent refresh calls in one generation share the same
166
170
  promise. Logout invalidates memory before its returned persistence promise settles.
167
171
  Storage errors and queue-capacity refusals reject; callers must handle them. All
@@ -47,7 +47,10 @@ must recover without a reconnect.
47
47
  For multi-action outboxes, enqueue new items with a versioned delivery plan and
48
48
  return small JSON receipts from `send`. Existing queued single-send items should
49
49
  be drained before enabling a delivery executor on that queue, or migrated under
50
- the store's atomic transition. Preserve executor versions until their queues drain.
50
+ the store's atomic transition. When a new executor version ships, list the old
51
+ version's projection in `delivery.retiredVersions` until its queued items drain;
52
+ a plan version with no executor waits, reported to `onError` as
53
+ `NotificationPlanVersionError` (from 0.100.1).
51
54
  Make projection idempotent. Provider idempotency/reconciliation remains necessary
52
55
  for a crash between remote success and checkpoint. These APIs are available starting with 0.100.0.
53
56
 
@@ -70,7 +73,9 @@ write the modern record; no journal data migration is needed.
70
73
  Darwin distributions must retain the package's architecture-matched native
71
74
  `.node` asset for process birth measurement, as for contained filesystem access.
72
75
  If native/proc identity cannot be read, new locks explicitly record null and
73
- recovery refuses rather than treating unknown ownership as death. Existing
76
+ recovery refuses rather than treating unknown ownership as death. From 0.100.1 a
77
+ Linux kernel without time namespaces (before 5.6) records the PID namespace alone
78
+ instead of null, so its locks recover like any other. Existing
74
79
  `refuse` policy and the separately configured ownerless-file grace are unchanged.
75
80
 
76
81
  ## Released migration: 0.99.0
@@ -88,13 +93,20 @@ Colliding object/array fields retain their complete structural alternatives:
88
93
  { type: ['object', 'array'] }
89
94
  // After: structural alternatives live inside the property schema.
90
95
  { anyOf: [
91
- { type: 'object', properties: { id: { type: 'string' } }, required: ['id'] },
92
96
  { type: 'array', items: {
93
97
  type: 'object', properties: { id: { type: 'string' } }, required: ['id'],
94
98
  } },
99
+ { type: 'object', properties: { id: { type: 'string' } }, required: ['id'] },
95
100
  ] }
96
101
  ```
97
102
 
103
+ Alternatives come in kind order, independent of variant order. The same shape
104
+ covers every collision of different kinds, scalars included: `string` against
105
+ `string[]` becomes `{ anyOf: [{ type: 'array', items: { type: 'string' } }, { type:
106
+ 'string' }] }`. A nullable field keeps `null` in each alternative's `type`, and
107
+ differing nested object unions remain nested `anyOf` inside the alternatives. Update
108
+ snapshots to this order.
109
+
98
110
  Traverse each nested alternative when inspecting schemas and regenerate schema
99
111
  snapshots. Verify the actual manifest with the chosen provider. Keep flatten
100
112
  enabled when a top-level discriminated union needs to be advertised as an