@yaklabs-ai/plugin-sdk 0.15.3 → 0.26.3

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.
@@ -27,7 +27,7 @@ declare type AgentMessage = Message | CustomAgentMessages[keyof CustomAgentMessa
27
27
 
28
28
  declare type AgentSessionEvent = Exclude<HerdHarnessEvent, {
29
29
  readonly type: "tool_execution_start" | "tool_execution_end";
30
- }> | HerdHarnessEventWithCallerMetadata | SessionInfoUpdatedExtensionEvent | SubstrateDiagnosticSessionEvent | SessionCwdTransitionEvent | CostFactSessionEvent | ManagedHumanQueueUpdatedSessionEvent | BackgroundTaskStartedSessionEvent | BackgroundTaskProgressSessionEvent | BackgroundTaskCompletedSessionEvent | BackgroundTaskFailedSessionEvent | BackgroundTaskCancelledSessionEvent | BackgroundTaskResultQueuedSessionEvent | UserShellCommandResultQueuedSessionEvent | TurnBoundDeliveryDiscardedSessionEvent | CompactionTriggeredSessionEvent | CompactionShadowThresholdSessionEvent | CompactionFailedSessionEvent | SilentOverflowDetectedSessionEvent | ToolResultClampedSessionEvent | ToolResultImageBoundedSessionEvent | ContextWindowSnapshotSessionEvent | ResourceRosterSessionEvent | ResourceInvokedSessionEvent | CustomEntrySessionEvent | RunRecoverySettledSessionEvent | RunFailureObservedSessionEvent | RunFailedSessionEvent | RunRetryWaitSessionEvent | RunRetryingSessionEvent | RunRecoveredSessionEvent | UriAccessSessionEvent;
30
+ }> | HerdHarnessEventWithCallerMetadata | SessionInfoUpdatedExtensionEvent | SubstrateDiagnosticSessionEvent | SessionCwdTransitionEvent | CostFactSessionEvent | ManagedHumanQueueUpdatedSessionEvent | BackgroundTaskStartedSessionEvent | BackgroundTaskProgressSessionEvent | BackgroundTaskCompletedSessionEvent | BackgroundTaskFailedSessionEvent | BackgroundTaskCancelledSessionEvent | BackgroundTaskResultQueuedSessionEvent | UserShellCommandResultQueuedSessionEvent | TurnBoundDeliveryDiscardedSessionEvent | CompactionTriggeredSessionEvent | CompactionShadowThresholdSessionEvent | CompactionFailedSessionEvent | SilentOverflowDetectedSessionEvent | ToolResultClampedSessionEvent | ToolResultImageBoundedSessionEvent | ContextWindowSnapshotSessionEvent | ResourceRosterSessionEvent | ResourceInvokedSessionEvent | CustomEntrySessionEvent | RunRecoverySettledSessionEvent | RunFailureObservedSessionEvent | RunFailedSessionEvent | RunRetryWaitSessionEvent | RunRetryingSessionEvent | RunRecoveredSessionEvent | UriAccessSessionEvent | UriObservationSessionEvent;
31
31
 
32
32
  declare const Alpha: TAlpha;
33
33
 
@@ -221,7 +221,7 @@ declare type AttachmentsMessage = CustomMessage<AttachmentsDetails> & {
221
221
  * or an {@link IdentityAttribution} for identity-bearing origins with no registry entry.
222
222
  *
223
223
  * Narrowing hazard: `SourceInfo` and `IdentityAttribution` both have a `string` `source`,
224
- * so a `source` value never distinguishes them — narrow `SourceInfo` by `"path" in x`
224
+ * so a `source` value never distinguishes them - narrow `SourceInfo` by `"path" in x`
225
225
  * (its required field), not by inspecting `source`.
226
226
  */
227
227
  declare type AttributionSource = SourceInfo | {
@@ -237,7 +237,7 @@ declare type AttributionSource = SourceInfo | {
237
237
  /**
238
238
  * The availability-facts message: who the user is connected as, which auth-gated tools are
239
239
  * waiting on a connect, and which installed plugins are not connected. DURABLE and never
240
- * turn-bound — that is the whole point of the kind.
240
+ * turn-bound - that is the whole point of the kind.
241
241
  *
242
242
  * These three facts used to be rendered into the system prompt, where they were the last
243
243
  * in-session prefix mutation (#2996): each of them changes on a connect or disconnect, and a
@@ -457,7 +457,7 @@ declare interface BillingIdentity {
457
457
  */
458
458
  readonly accountId?: string;
459
459
  /**
460
- * The account incarnation this credential belongs to — what per-account consent
460
+ * The account incarnation this credential belongs to - what per-account consent
461
461
  * is pinned to. Unchanged by a token refresh; advanced by an explicit reconnect,
462
462
  * replacement, or removal, which is what makes a stale grant detectable.
463
463
  */
@@ -467,15 +467,6 @@ declare interface BillingIdentity {
467
467
  /** Creates a Boolean type. */
468
468
  declare function Boolean_2(options?: TSchemaOptions): TBoolean;
469
469
 
470
- declare interface BranchSummaryEntry extends EntryBase {
471
- type: "branch_summary";
472
- fromId: string | null;
473
- summary: string;
474
- details?: JsonValue_2;
475
- usage?: Usage;
476
- fromHook: boolean;
477
- }
478
-
479
470
  declare interface BranchSummaryMessage {
480
471
  role: "branchSummary";
481
472
  summary: string;
@@ -504,7 +495,7 @@ export declare interface CanonicalAgentTurn {
504
495
  /** Latest lifecycle timestamp of that prefix, excluding the current continuation. */
505
496
  readonly settledCompletedAt?: string;
506
497
  /**
507
- * Wall-clock span of the whole turn — the earliest and latest lifecycle
498
+ * Wall-clock span of the whole turn - the earliest and latest lifecycle
508
499
  * timestamps across its items (message starts/completions and tool
509
500
  * starts/completions). Per-tool execution spans alone under-report a turn
510
501
  * whose time went to thinking or streaming tool arguments; the settled
@@ -541,7 +532,7 @@ export declare interface CanonicalFinalAnswerBlock {
541
532
  readonly responseId: string;
542
533
  readonly sourceMessageId: string;
543
534
  readonly responseSequence: number;
544
- /** Turn-scoped, ascending per emitted text block in emission order — finer-grained than `responseSequence`, which shares one value across a message split into several text blocks. */
535
+ /** Turn-scoped, ascending per emitted text block in emission order - finer-grained than `responseSequence`, which shares one value across a message split into several text blocks. */
545
536
  readonly streamStage: number;
546
537
  readonly phase: "final";
547
538
  readonly status: CanonicalTerminalStatus;
@@ -563,7 +554,7 @@ export declare interface CanonicalNarrationBlock {
563
554
  readonly responseId: string;
564
555
  readonly sourceMessageId: string;
565
556
  readonly responseSequence: number;
566
- /** Turn-scoped, ascending per emitted text block in emission order — finer-grained than `responseSequence`, which shares one value across a message split into several text blocks. */
557
+ /** Turn-scoped, ascending per emitted text block in emission order - finer-grained than `responseSequence`, which shares one value across a message split into several text blocks. */
567
558
  readonly streamStage: number;
568
559
  readonly phase: "narration";
569
560
  readonly status: CanonicalTerminalStatus;
@@ -592,7 +583,7 @@ export declare interface CanonicalProvisionalResponseBlock {
592
583
  readonly responseId: string;
593
584
  readonly sourceMessageId: string;
594
585
  readonly responseSequence: number;
595
- /** Turn-scoped, ascending per emitted text block in emission order — finer-grained than `responseSequence`, which shares one value across a message split into several text blocks. */
586
+ /** Turn-scoped, ascending per emitted text block in emission order - finer-grained than `responseSequence`, which shares one value across a message split into several text blocks. */
596
587
  readonly streamStage: number;
597
588
  readonly phase: "provisional" | "interrupted" | "error";
598
589
  readonly status: CanonicalTerminalStatus;
@@ -619,10 +610,10 @@ export declare interface CanonicalProvisionalResponseBlock {
619
610
  }
620
611
 
621
612
  /**
622
- * A user steering message the run absorbed MID-TURN (it rode the same run —
613
+ * A user steering message the run absorbed MID-TURN (it rode the same run -
623
614
  * see {@link isSteerContinuation}). It stays INSIDE the agent turn at its
624
- * chronological position — after the work that preceded it and before the
625
- * work that followed — so the transcript never reorders around it: a steer
615
+ * chronological position - after the work that preceded it and before the
616
+ * work that followed - so the transcript never reorders around it: a steer
626
617
  * rendered as a trailing sibling turn would sink ever further below the
627
618
  * work that actually came after it as the turn kept growing.
628
619
  */
@@ -822,7 +813,7 @@ declare interface CompactionFailedSessionEvent {
822
813
 
823
814
  /**
824
815
  * Why a session-initiated compaction ran. `threshold` is the pluggable-policy
825
- * usage check, now consulted at TWO points — every tool-batch boundary inside a
816
+ * usage check, now consulted at TWO points - every tool-batch boundary inside a
826
817
  * run (mid-turn, which stops the run so compaction can run before the next LLM
827
818
  * request) and during post-run settlement; `overflow_recovery` is the
828
819
  * compact-once step of overflow recovery (#1280); `silent_overflow` is a
@@ -835,8 +826,8 @@ declare type CompactionReason = "threshold" | "overflow_recovery" | "silent_over
835
826
  * Emitted at most once per compaction episode: the first post-turn consult
836
827
  * where the KERNEL DEFAULT threshold policy would have compacted had the
837
828
  * episode's opening manual/suggestion compaction not already shrunk the
838
- * context. The shadow sample is `contextTokens + debtTokens` — the observed
839
- * meter plus the opening compaction's estimated drop — so this row marks the
829
+ * context. The shadow sample is `contextTokens + debtTokens` - the observed
830
+ * meter plus the opening compaction's estimated drop - so this row marks the
840
831
  * OBSERVED counterfactual crossing that replay-based counterfactuals
841
832
  * previously had to simulate. An episode whose next real compaction arrives
842
833
  * before the crossing emits nothing (censored), and an episode whose opening
@@ -861,7 +852,7 @@ declare interface CompactionSummaryMessage {
861
852
  }
862
853
 
863
854
  /**
864
- * Emitted when the session begins a compaction (before calling the harness) — an
855
+ * Emitted when the session begins a compaction (before calling the harness) - an
865
856
  * automatic trigger OR a user-requested `/compact` (`reason: "manual"`). The
866
857
  * kernel's own `session_compact` event reports completion. `tokensBefore` and
867
858
  * `contextWindow` explain an automatic trigger's threshold math; a manual trigger
@@ -948,7 +939,7 @@ declare function ConstructorParametersDeferred<Type extends TSchema>(type: Type,
948
939
  * Typed counters from the cold-boundary supersede pass, for callers that record them as
949
940
  * analytics rather than read them as a log line. The same numbers the
950
941
  * `context_projection_reads_superseded` diagnostic carries, computed once and handed to both
951
- * sinks — the diagnostic is the human/log surface, this is the machine one.
942
+ * sinks - the diagnostic is the human/log surface, this is the machine one.
952
943
  *
953
944
  * `reclaimedTokens` is CARRIED, not footprint: the pass recomputes on every provider request, so
954
945
  * the same superseded read is counted again on each later request it keeps off the wire. Summing
@@ -978,16 +969,16 @@ declare interface ContextElisionStats {
978
969
  /**
979
970
  * The actual context usage of a session at a point in time.
980
971
  *
981
- * `tokens` is the number every consumer uses — UI percentage, compaction
972
+ * `tokens` is the number every consumer uses - UI percentage, compaction
982
973
  * thresholds, overflow reasoning. It is pi's `estimateContextTokens` result:
983
974
  * the provider-reported usage of the last valid assistant message (which
984
975
  * already counts the system prompt, tool definitions, and the entire history
985
- * sent on that turn — the provider's own tokenizer is authoritative) plus a
976
+ * sent on that turn - the provider's own tokenizer is authoritative) plus a
986
977
  * client-side estimate for messages appended after it (the un-sent tail).
987
978
  *
988
979
  * `basis` is `"provider"` once at least one assistant turn carries valid
989
980
  * usage, `"estimate"` before that (new or never-run sessions, and the single
990
- * turn immediately after a compaction — see the engine's `computeContextUsage`).
981
+ * turn immediately after a compaction - see the engine's `computeContextUsage`).
991
982
  * Estimation error is then bounded by the tail, not the whole conversation.
992
983
  */
993
984
  declare interface ContextUsage {
@@ -1003,14 +994,14 @@ declare interface ContextUsage {
1003
994
 
1004
995
  /**
1005
996
  * A single attributed token bucket within a context window snapshot. Tokens are
1006
- * estimated, not authoritative — the provider reports ground-truth totals via
997
+ * estimated, not authoritative - the provider reports ground-truth totals via
1007
998
  * `message_end` usage events.
1008
999
  *
1009
1000
  * `attributions` is an ordered list of sources that jointly own these tokens. A
1010
1001
  * tool result that went through a URI module and a converter carries all three
1011
1002
  * sources (tool, module, converter) so each layer can be accounted for. A tool
1012
1003
  * result whose details carry a `skillName` (a current or historical
1013
- * whole-skill `read skill://…` dispatch) is labelled
1004
+ * whole-skill `read skill://...` dispatch) is labelled
1014
1005
  * `tool_result:skill:<name>` instead of `tool_result:<toolName>`,
1015
1006
  * so per-skill token cost is attributable without a new bucket category.
1016
1007
  */
@@ -1055,7 +1046,7 @@ declare interface ContextWindowSnapshot {
1055
1046
  */
1056
1047
  readonly usage: ContextUsage;
1057
1048
  readonly buckets: readonly ContextWindowBucket[];
1058
- /** Sum of bucket estimates — composition metadata, NOT the context usage. */
1049
+ /** Sum of bucket estimates - composition metadata, NOT the context usage. */
1059
1050
  readonly estimatedTotalTokens: number;
1060
1051
  readonly model: {
1061
1052
  readonly provider: string;
@@ -1066,8 +1057,8 @@ declare interface ContextWindowSnapshot {
1066
1057
  }
1067
1058
 
1068
1059
  /**
1069
- * Emitted whenever the live attribution view is recomputed — on activation,
1070
- * provider-request boundaries, settlement, model changes, and compaction — with
1060
+ * Emitted whenever the live attribution view is recomputed - on activation,
1061
+ * provider-request boundaries, settlement, model changes, and compaction - with
1071
1062
  * an estimated token breakdown of the full context window attributed to its
1072
1063
  * sources (system prompt sections, tool definitions, conversation messages).
1073
1064
  * Counts are
@@ -1082,9 +1073,9 @@ declare interface ContextWindowSnapshotSessionEvent {
1082
1073
  readonly type: "context_window_snapshot";
1083
1074
  readonly snapshot: ContextWindowSnapshot;
1084
1075
  /**
1085
- * Why this snapshot was taken. `provider_request` — emitted synchronously
1076
+ * Why this snapshot was taken. `provider_request` - emitted synchronously
1086
1077
  * from the model-boundary context hook (every LLM request boundary);
1087
- * `refresh` — emitted on all other paths (post-compaction rebuild, model
1078
+ * `refresh` - emitted on all other paths (post-compaction rebuild, model
1088
1079
  * change, post-run settlement). Absent on legacy non-recordable snapshots.
1089
1080
  */
1090
1081
  readonly cause?: "provider_request" | "refresh";
@@ -1108,8 +1099,8 @@ declare interface ContextWindowSnapshotSessionEvent {
1108
1099
  * The single declaration of the local amount basis for herd and the daemon:
1109
1100
  * durable.ts's replay schema and agent-runtime's spend-store validation set
1110
1101
  * derive from this tuple rather than re-typing it (kay#7331). The renderer-facing
1111
- * `KayCostAmountBasis` in `@bonsai/analytics-contract` is a restated copy —
1112
- * that package imports nothing from herd — and agent-runtime's `spend-store.ts`
1102
+ * `KayCostAmountBasis` in `@bonsai/analytics-contract` is a restated copy -
1103
+ * that package imports nothing from herd - and agent-runtime's `spend-store.ts`
1113
1104
  * pins the two equal at compile time. It stays a plain string tuple, not a Zod
1114
1105
  * enum: herd's `cost/durable.ts` is where Zod enters for replay validation.
1115
1106
  */
@@ -1148,7 +1139,7 @@ declare type CostAmountBasis = (typeof COST_AMOUNT_BASES)[number];
1148
1139
 
1149
1140
  /**
1150
1141
  * Emitted once per model-backed session operation that carried real token usage
1151
- * (Cost C4, #314): the operation's {@link TurnCostFact} — tokens, the transport's
1142
+ * (Cost C4, #314): the operation's {@link TurnCostFact} - tokens, the transport's
1152
1143
  * USD figure and basis, the requested/response models, and the billing identity
1153
1144
  * that ran it. Hosts fold it onto the usage operation they already track and
1154
1145
  * persist it for cross-session spend. Synthetic; herd-owned; live-only (a reopened session
@@ -1202,7 +1193,7 @@ declare interface CustomAgentMessages {
1202
1193
  /**
1203
1194
  * Mirror of `AgentSession.appendCustomEntry`, emitted after the entry is durably
1204
1195
  * persisted. `customType` and `data` are host-owned and opaque to herd. Live-only:
1205
- * entries already in the log are not re-emitted when a stored session is opened — seed
1196
+ * entries already in the log are not re-emitted when a stored session is opened - seed
1206
1197
  * from `collectCustomEntries`. Legacy `"context_attribution"` entries recorded
1207
1198
  * by older builds are never re-emitted through this host-facing event.
1208
1199
  */
@@ -1210,6 +1201,12 @@ declare interface CustomEntrySessionEvent {
1210
1201
  readonly type: "custom_entry";
1211
1202
  readonly customType: string;
1212
1203
  readonly data: unknown;
1204
+ /**
1205
+ * The stored entry's id, as a bounded read of the log names it, so a reader that seeded from
1206
+ * the log can tell an entry it already holds from a new one. Absent from emitters that do not
1207
+ * know it.
1208
+ */
1209
+ readonly entryId?: string;
1213
1210
  }
1214
1211
 
1215
1212
  declare interface CustomMessage<T = unknown> {
@@ -1273,7 +1270,7 @@ declare const DAEMON_SERVICE_TURN_CUSTOM_TYPE = "daemon_service_turn";
1273
1270
  /**
1274
1271
  * A daemon-synthesized turn; `service` selects the per-service wrapper at the
1275
1272
  * boundary. `followup_lane` (a followup session's instruction turn) has no
1276
- * reserved wrapper tag yet — it renders through the generic provenance-aware
1273
+ * reserved wrapper tag yet - it renders through the generic provenance-aware
1277
1274
  * `kay_context` fallback until the lane message shape settles.
1278
1275
  */
1279
1276
  declare interface DaemonServiceTurnDetails {
@@ -1282,8 +1279,8 @@ declare interface DaemonServiceTurnDetails {
1282
1279
  /**
1283
1280
  * A short, HUMAN-facing description of this turn, for a visible service whose
1284
1281
  * `content` is not written for a person. For `"continuation"`, `content` is
1285
- * the MODEL's input — a runtime-authored instruction ("Complete the
1286
- * remaining part of that request. Do not propose another …") — and showing
1282
+ * the MODEL's input - a runtime-authored instruction ("Complete the
1283
+ * remaining part of that request. Do not propose another ...") - and showing
1287
1284
  * it to a person reads as though the user is being instructed, so the visible
1288
1285
  * row renders THIS instead. A continuation renderer missing a summary must
1289
1286
  * degrade to its own generic phrasing, never to `content`. For
@@ -1375,9 +1372,9 @@ declare interface DroppedContribution {
1375
1372
 
1376
1373
  /**
1377
1374
  * The Dynamic Context message: retrieval-produced context delivered right after human
1378
- * text enters the conversation (prompt, steer, or a drained follow-up batch — one
1375
+ * text enters the conversation (prompt, steer, or a drained follow-up batch - one
1379
1376
  * message per delivery moment). Assembled by the daemon's Dynamic Context coordinator
1380
- * from per-contributor sections; push-only (contributors add a section or nothing —
1377
+ * from per-contributor sections; push-only (contributors add a section or nothing -
1381
1378
  * they never mutate the human text or cancel the turn). Persisted like any other
1382
1379
  * message so the append-only transcript keeps the prompt cache warm.
1383
1380
  */
@@ -1385,7 +1382,7 @@ declare const DYNAMIC_CONTEXT_CUSTOM_TYPE = "dynamic_context";
1385
1382
 
1386
1383
  /**
1387
1384
  * The delivery moment that produced a Dynamic Context message: a new human prompt, a
1388
- * mid-run steer, or a drained follow-up queue bundled as one batch (the batch law —
1385
+ * mid-run steer, or a drained follow-up queue bundled as one batch (the batch law -
1389
1386
  * one retrieval pass per delivery moment, N drained texts = one message).
1390
1387
  */
1391
1388
  declare type DynamicContextChannel = "prompt" | "steer" | "follow_up";
@@ -1422,7 +1419,7 @@ declare type DynamicContextMessage = CustomMessage<DynamicContextDetails> & {
1422
1419
  /**
1423
1420
  * One contributor's section of a Dynamic Context message. `contributorId` owns the
1424
1421
  * inner wrapper tag at the model boundary (derived from the registration id, sanitized
1425
- * by the projection — never free-form), so sections stay parsable per contributor.
1422
+ * by the projection - never free-form), so sections stay parsable per contributor.
1426
1423
  */
1427
1424
  declare interface DynamicContextSection {
1428
1425
  readonly contributorId: string;
@@ -1634,7 +1631,7 @@ declare interface FinalOutputCapture {
1634
1631
  readonly toolCallId: string;
1635
1632
  /** The terminality fact when the transcript carries the stamped receipt. */
1636
1633
  readonly terminatesRun?: boolean;
1637
- /** The tool details' `message` — legacy transcripts only. */
1634
+ /** The tool details' `message` - legacy transcripts only. */
1638
1635
  readonly message?: string;
1639
1636
  readonly result: unknown;
1640
1637
  /** The tool details' `sessionTitle`. */
@@ -1710,17 +1707,17 @@ declare type GrammarVariants = Partial<Record<GrammarFormat, string>>;
1710
1707
  /**
1711
1708
  * Herd-owned replacement for pi 0.82.1's `AgentHarnessEvent` union (removed in
1712
1709
  * pi 0.84's v2 lane model). The NAMES and PAYLOAD SHAPES are the legacy ones:
1713
- * they are AgentSession's public session-event surface — the interactive
1714
- * reducer, the events adapter, and agent-runtime all key on them — so the
1715
- * v2→herd translation happens once, inside AgentSession's event funnel
1710
+ * they are AgentSession's public session-event surface - the interactive
1711
+ * reducer, the events adapter, and agent-runtime all key on them - so the
1712
+ * v2->herd translation happens once, inside AgentSession's event funnel
1716
1713
  * (`_wireHarnessEvents`), never at each consumer. Not generic: the legacy
1717
1714
  * generic carried resource typing herd never exposed on an event.
1718
1715
  *
1719
- * The hook-named members (`before_agent_start`, `context`, …) carry bare
1716
+ * The hook-named members (`before_agent_start`, `context`, ...) carry bare
1720
1717
  * `type` payloads: in the v2 model these are HOOK invocations that never reach
1721
1718
  * the event stream, but the names stay in the union (and in the events
1722
1719
  * adapter's disposition table) so a narrowing here cannot silently invalidate
1723
- * a downstream keying. `after_provider_response` is the exception — it is
1720
+ * a downstream keying. `after_provider_response` is the exception - it is
1724
1721
  * routed through the v2 `after_response` hook into herd's quota capture.
1725
1722
  */
1726
1723
  declare type HerdHarnessEvent = {
@@ -1799,14 +1796,6 @@ declare type HerdHarnessEvent = {
1799
1796
  readonly type: "session_compact";
1800
1797
  readonly compactionEntry: CompactionEntry;
1801
1798
  readonly fromHook: boolean;
1802
- } | {
1803
- readonly type: "session_before_tree";
1804
- } | {
1805
- readonly type: "session_tree";
1806
- readonly newLeafId: string | null;
1807
- readonly oldLeafId: string | null;
1808
- readonly summaryEntry?: BranchSummaryEntry;
1809
- readonly fromHook?: boolean;
1810
1799
  } | {
1811
1800
  readonly type: "summary_operation_settled";
1812
1801
  } | {
@@ -1997,7 +1986,7 @@ declare type InteractiveActivityPhase = "running" | "failed";
1997
1986
 
1998
1987
  /**
1999
1988
  * A single in-flight (or just-failed) session activity. At most one is active at
2000
- * a time — compaction serializes, and any future activity kind that overlaps
1989
+ * a time - compaction serializes, and any future activity kind that overlaps
2001
1990
  * would model concurrency explicitly rather than by widening this slot. `running`
2002
1991
  * drives a non-alarming in-progress status; `failed` is a transient, gentle
2003
1992
  * notice that the next run start clears. Cleared to `undefined` on success.
@@ -2058,8 +2047,6 @@ declare interface InteractiveMessageItem {
2058
2047
  readonly deliveredVia?: UserMessageDeliveryLane | (string & {});
2059
2048
  /** Send-time presentation position, when supplied by the originating surface. */
2060
2049
  readonly presentationAnchor?: PresentationAnchor;
2061
- /** @deprecated Never set: a session has one branch, so no item is off it. Kept one version for plugins that read it; remove after. */
2062
- readonly abandoned?: true;
2063
2050
  readonly status: InteractiveMessageStatus;
2064
2051
  readonly text: string;
2065
2052
  readonly parts: readonly InteractiveContentPart[];
@@ -2081,7 +2068,7 @@ declare interface InteractiveMessageItem {
2081
2068
  * carry them (mirrors the tool fields below): `startedAt` from
2082
2069
  * `message_start`, `completedAt` from the terminal `message_end`. On the
2083
2070
  * resume/load path both come from the stored entry's timestamp. They give
2084
- * turns a wall-clock span (canonical `startedAt`/`completedAt`) — per-tool
2071
+ * turns a wall-clock span (canonical `startedAt`/`completedAt`) - per-tool
2085
2072
  * execution spans alone under-report a turn whose time went to
2086
2073
  * thinking/streaming.
2087
2074
  */
@@ -2125,7 +2112,7 @@ export declare interface InteractiveModeState {
2125
2112
  readonly completedRunBoundaryAnchors?: readonly InteractiveRunBoundaryAnchor[];
2126
2113
  readonly backgroundTasksById: Readonly<Record<string, InteractiveBackgroundTaskState>>;
2127
2114
  readonly nextItemIndex: number;
2128
- /** Host-owned `custom_entry` data per customType, oldest→newest (see CustomEntrySessionEvent). */
2115
+ /** Host-owned `custom_entry` data per customType, oldest->newest (see CustomEntrySessionEvent). */
2129
2116
  readonly customEntries: Readonly<Record<string, readonly unknown[]>>;
2130
2117
  /**
2131
2118
  * The session's current transient lifecycle activity (compaction today), or
@@ -2169,7 +2156,7 @@ declare interface InteractiveRunState {
2169
2156
  /**
2170
2157
  * Present while an agent-level retry is in flight (run stays `"running"`):
2171
2158
  * the 1-based attempt number and the policy's max attempts, for surfacing a
2172
- * "retrying…" affordance. Runtime projections retain it only during the actual
2159
+ * "retrying..." affordance. Runtime projections retain it only during the actual
2173
2160
  * sleep and correlate it by `waitId`; legacy raw events clear on `run_recovered`. See #126.
2174
2161
  */
2175
2162
  readonly retry?: {
@@ -2182,7 +2169,7 @@ declare interface InteractiveRunState {
2182
2169
  * Present while the run's driving PROCESS is being replaced and its input is
2183
2170
  * expected to be re-driven (run stays `"running"`). A bare flag on purpose:
2184
2171
  * unlike {@link InteractiveRunState.retry} there is no attempt number,
2185
- * ceiling, or provider reason to report — a surface may say the run is coming
2172
+ * ceiling, or provider reason to report - a surface may say the run is coming
2186
2173
  * back and nothing else. Replaced wholesale by the next run status, so a
2187
2174
  * re-drive that lands (or a failure that terminalizes) clears it. See the
2188
2175
  * `resuming` {@link HostRunStatus}.
@@ -2238,8 +2225,8 @@ declare interface InteractiveToolCallState {
2238
2225
  /**
2239
2226
  * Present when {@link resultText} is the HEAD of a longer result that a
2240
2227
  * host's wire projection cut to a byte budget; `bytes` is the full
2241
- * result's UTF-8 length. The reducer never sets this — live results arrive
2242
- * whole — so a surface reading it knows the full text exists on the
2228
+ * result's UTF-8 length. The reducer never sets this - live results arrive
2229
+ * whole - so a surface reading it knows the full text exists on the
2243
2230
  * session log and can fetch it on demand. Absent means `resultText` is
2244
2231
  * complete.
2245
2232
  */
@@ -2248,8 +2235,6 @@ declare interface InteractiveToolCallState {
2248
2235
  };
2249
2236
  readonly failure?: ToolCallFailureOccurrence;
2250
2237
  readonly backgroundTaskId?: string;
2251
- /** @deprecated Never set; see {@link InteractiveMessageItem.abandoned}. */
2252
- readonly abandoned?: true;
2253
2238
  readonly attemptId: string;
2254
2239
  readonly waveId: string;
2255
2240
  readonly responseId?: string;
@@ -2656,8 +2641,8 @@ declare interface ManagedHumanQueueItemSnapshot {
2656
2641
  }
2657
2642
 
2658
2643
  /**
2659
- * Lifecycle of a managed item. `queued` — live in a substrate queue, awaiting
2660
- * delivery. `editing` — pulled out of every queue (delivery prevented) while
2644
+ * Lifecycle of a managed item. `queued` - live in a substrate queue, awaiting
2645
+ * delivery. `editing` - pulled out of every queue (delivery prevented) while
2661
2646
  * the human edits it; the engine's `ManagedHumanQueue.completeEdit` returns it to
2662
2647
  * `queued`.
2663
2648
  */
@@ -2671,7 +2656,7 @@ declare interface ManagedHumanQueueSnapshot {
2671
2656
 
2672
2657
  /**
2673
2658
  * Authoritative snapshot of the managed human-message queue (see `ManagedHumanQueue`).
2674
- * Emitted whenever the queue changes — a mutation command, or a reconcile that observed the
2659
+ * Emitted whenever the queue changes - a mutation command, or a reconcile that observed the
2675
2660
  * loop draining/clearing items. Carries the monotonic `revision` UI clients use for optimistic
2676
2661
  * concurrency and stable per-item ids the renderer keys on (unlike Pi's raw `queue_update`,
2677
2662
  * whose messages have no identity). Synthetic; herd-owned; live-only.
@@ -3518,7 +3503,7 @@ export declare interface ReconstructableEntry extends Omit<ToolCallSourceEntry,
3518
3503
  *
3519
3504
  * Latency pairing (`pairToolCallsFromEntries`) is intentionally NOT done here:
3520
3505
  * the reconstructed state carries no per-call duration, so pairing would only
3521
- * compute-and-discard — and keying `isError` off that pairing was the source of
3506
+ * compute-and-discard - and keying `isError` off that pairing was the source of
3522
3507
  * the multiple-results-per-call bug. Analytics consumers that want duration call
3523
3508
  * the pairing leaf directly.
3524
3509
  */
@@ -3620,7 +3605,7 @@ declare type RequiredKeys<Properties extends TProperties, Result extends Propert
3620
3605
  /**
3621
3606
  * Provenance for one discovered resource, carried so the runtime can emit
3622
3607
  * attributed usage events (loaded/invoked). This is the identity the runtime
3623
- * uses — `name` is the lookup/dedup key; `harness`/`scope` are provenance.
3608
+ * uses - `name` is the lookup/dedup key; `harness`/`scope` are provenance.
3624
3609
  *
3625
3610
  * Discovery is the only place provenance is known (the prompt-facing contract
3626
3611
  * drops it), so loaders populate this alongside the resources themselves.
@@ -3640,7 +3625,7 @@ declare interface ResourceAttribution {
3640
3625
  readonly scope: "project" | "user";
3641
3626
  /**
3642
3627
  * The skill's canonical namespace (the `<sourceId>` in `skill://<sourceId>/<name>`
3643
- * — see `skillSourceId` in herd-agent's `core/tools/uri/skill-uri-parse.ts`). A skill's
3628
+ * - see `skillSourceId` in herd-agent's `core/tools/uri/skill-uri-parse.ts`). A skill's
3644
3629
  * real identity is the qualified `<sourceId>/<name>` pair, since discovery
3645
3630
  * shadows duplicate bare names across sources; `name` alone is not a stable
3646
3631
  * key. Absent for non-skill resources (context files, prompt templates),
@@ -3654,8 +3639,8 @@ declare interface ResourceAttribution {
3654
3639
  /**
3655
3640
  * Emitted each time a resource is invoked through the session's single
3656
3641
  * `invokeSkill` chokepoint. `via` distinguishes a programmatic application
3657
- * (`explicit`, e.g. a slash command bound to a skill) from a `read skill://…`
3658
- * URI dispatch (`uri`, contract Law 7 — usage rides both URI analytics and
3642
+ * (`explicit`, e.g. a slash command bound to a skill) from a `read skill://...`
3643
+ * URI dispatch (`uri`, contract Law 7 - usage rides both URI analytics and
3659
3644
  * this event). Additive: `observability/normalize.ts` renders the diagnostic
3660
3645
  * event, while the fact adapter projects it into `herd.resource.invoked` for
3661
3646
  * the runtime usage recorder; both pass additive fields through without an
@@ -3686,12 +3671,12 @@ declare interface ResourceInvokedSessionEvent {
3686
3671
  * carries 100+ skills/context files, discovery re-runs per session create AND
3687
3672
  * per subagent spawn, and a per-resource loop would append 100+ events in one
3688
3673
  * tick against the sink's drop threshold. Set-shaping also makes the set
3689
- * boundary BE the row — "latest roster per session" is a contract, not a
3674
+ * boundary BE the row - "latest roster per session" is a contract, not a
3690
3675
  * timestamp-clustering heuristic (no removal event exists, so per-resource
3691
3676
  * rows could not reconstruct the set on their own). Synthetic; herd-internal.
3692
3677
  *
3693
3678
  * Because it is state rather than a notification, `AgentSession.subscribe`
3694
- * delivers the latest one to a listener that attaches after it was emitted —
3679
+ * delivers the latest one to a listener that attaches after it was emitted -
3695
3680
  * the only session event that gets attach-time delivery.
3696
3681
  */
3697
3682
  declare interface ResourceRosterSessionEvent {
@@ -3734,7 +3719,7 @@ declare function ReturnTypeDeferred<Type extends TSchema>(type: Type, options?:
3734
3719
  declare const RUN_CONTINUATION_CARRIER_CUSTOM_TYPE = "herd_run_continuation";
3735
3720
 
3736
3721
  /** Observed cause of a failed request or interrupted run. */
3737
- declare const RUN_FAILURE_REASONS: readonly ["auth", "cancelled", "content_blocked", "context_overflow", "invalid_request", "model_disabled", "model_unavailable", "network", "organization_unavailable", "overloaded", "quota_exhausted", "rate_limit", "runtime_interrupted", "safeguard_block", "seat_unpaid", "server_error", "sign_in_required", "stream_interrupted", "timeout", "unknown"];
3722
+ declare const RUN_FAILURE_REASONS: readonly ["account_unreachable", "auth", "cancelled", "content_blocked", "context_overflow", "final_output_missing", "invalid_request", "model_disabled", "model_unavailable", "network", "organization_unavailable", "overloaded", "quota_exhausted", "rate_limit", "runtime_interrupted", "safeguard_block", "seat_unpaid", "server_error", "sign_in_required", "stream_interrupted", "timeout", "unknown"];
3738
3723
 
3739
3724
  /** Replay a durable run boundary at its position among the transcript's messages. */
3740
3725
  export declare function runBoundaryReplayEvent(entry: Pick<ReconstructableEntry, "type" | "customType" | "data">): HostRunStatusChange | undefined;
@@ -3780,9 +3765,11 @@ declare const runFailureCauseSchema: z.ZodObject<{
3780
3765
  reason: z.ZodEnum<{
3781
3766
  cancelled: "cancelled";
3782
3767
  timeout: "timeout";
3768
+ account_unreachable: "account_unreachable";
3783
3769
  auth: "auth";
3784
3770
  content_blocked: "content_blocked";
3785
3771
  context_overflow: "context_overflow";
3772
+ final_output_missing: "final_output_missing";
3786
3773
  invalid_request: "invalid_request";
3787
3774
  model_disabled: "model_disabled";
3788
3775
  model_unavailable: "model_unavailable";
@@ -3903,7 +3890,7 @@ declare interface RunRetryingSessionEvent {
3903
3890
  readonly channel: RunChannel;
3904
3891
  readonly attempt: number;
3905
3892
  /**
3906
- * Recovery actions taken so far in this run, 1-based — the honest lifetime
3893
+ * Recovery actions taken so far in this run, 1-based - the honest lifetime
3907
3894
  * count. `attempt`/`maxAttempts` are relative to the CURRENT failure streak
3908
3895
  * and reset when provider work succeeds between two failures (#3007), so on
3909
3896
  * a long run they read "1 of 2" repeatedly; this field is what says how much
@@ -3939,10 +3926,10 @@ declare type RunRetryWaitSessionEvent = {
3939
3926
 
3940
3927
  /**
3941
3928
  * A durable runtime notice: the daemon telling the HUMAN, in the transcript,
3942
- * that something it was going to do on their behalf did not happen — and why.
3929
+ * that something it was going to do on their behalf did not happen - and why.
3943
3930
  * Same kernel posture as {@link COLLABORATION_MESSAGE_CUSTOM_TYPE}: the kernel
3944
3931
  * persists and projects the typed carrier; the daemon decides when one is
3945
- * warranted. Delivery never starts a run — that is the type's whole reason to
3932
+ * warranted. Delivery never starts a run - that is the type's whole reason to
3946
3933
  * exist. Its producers are the daemon's `RuntimeNoticeKind`s (agent-runtime
3947
3934
  * `context-message-builders.ts`). The first was #3365's dropped-continuation
3948
3935
  * path, retired with readiness continuations (#12512): a state a user could not
@@ -3955,7 +3942,7 @@ declare const RUNTIME_NOTICE_CUSTOM_TYPE = "runtime_notice";
3955
3942
  /**
3956
3943
  * Details of a {@link RUNTIME_NOTICE_CUSTOM_TYPE} entry. `noticeKind` is a
3957
3944
  * closed vocabulary owned by the daemon's builder (`RuntimeNoticeKind` in
3958
- * agent-runtime) — the kernel persists and projects whatever kind arrives,
3945
+ * agent-runtime) - the kernel persists and projects whatever kind arrives,
3959
3946
  * typed as string here for the same reason collaboration `kind` stays narrow
3960
3947
  * there and open here: the kernel must not need a release to learn a new one.
3961
3948
  */
@@ -4357,7 +4344,7 @@ declare function ScriptMapping(input: unknown): unknown;
4357
4344
 
4358
4345
  /**
4359
4346
  * Emitted by `AgentSession.reroot` when the session's working directory
4360
- * transitions in place — the lifecycle replacement for the retired
4347
+ * transitions in place - the lifecycle replacement for the retired
4361
4348
  * `getSessionCwdIssue` guard, which mis-modelled a differing cwd as a fault. A
4362
4349
  * re-root is a supported transition, never an error. `from`/`to` are the prior
4363
4350
  * and new roots; `reason` distinguishes the trigger (`"agent-reroot"` for an
@@ -4365,7 +4352,7 @@ declare function ScriptMapping(input: unknown): unknown;
4365
4352
  * move, `"worktree-isolation"` for the legacy worktree flow, or any host-supplied
4366
4353
  * string). Synthetic; herd-internal. Fed to subscribers and the
4367
4354
  * observability source; not persisted by the kernel (the host appends the durable
4368
- * `cwd_transition` log entry — see herd-agent ARCHITECTURE.md → "Session cwd").
4355
+ * `cwd_transition` log entry - see herd-agent ARCHITECTURE.md -> "Session cwd").
4369
4356
  */
4370
4357
  declare interface SessionCwdTransitionEvent {
4371
4358
  readonly type: "cwd_transition";
@@ -4395,7 +4382,7 @@ declare interface SessionInfoUpdatedExtensionEvent extends SessionInfoSnapshot {
4395
4382
  /**
4396
4383
  * Emitted the moment a silent overflow is detected: a provider accepted an
4397
4384
  * over-window request and reported usage past the context window without
4398
- * erroring (#1280 telemetry trigger (c)). Detection-time and unconditional —
4385
+ * erroring (#1280 telemetry trigger (c)). Detection-time and unconditional -
4399
4386
  * unlike the forced compaction it schedules, which can be deferred or skipped
4400
4387
  * by the post-turn guards (auto-compaction disabled, compaction in flight).
4401
4388
  * Synthetic; herd-internal; live-only.
@@ -4541,7 +4528,7 @@ declare const SUBAGENT_RESULT_CUSTOM_TYPE = "subagent_result";
4541
4528
 
4542
4529
  /**
4543
4530
  * A child-declared, openable result reference: a resolved URI + a display title.
4544
- * Kernel-generic on purpose — herd-agent must not learn Bonsai "artifact" semantics.
4531
+ * Kernel-generic on purpose - herd-agent must not learn Bonsai "artifact" semantics.
4545
4532
  */
4546
4533
  declare interface SubagentDeliverable {
4547
4534
  readonly uri: string;
@@ -4551,7 +4538,7 @@ declare interface SubagentDeliverable {
4551
4538
  /**
4552
4539
  * Details of a subagent-result context message. Provenance rides the fixed `provenance` key (the
4553
4540
  * `AttributionSource` family: `{source:"subagent", sourceId: childSessionId, label?}`), shared with
4554
- * every other context kind — the legacy `attribution` sibling is no longer written.
4541
+ * every other context kind - the legacy `attribution` sibling is no longer written.
4555
4542
  */
4556
4543
  declare interface SubagentResultDetails {
4557
4544
  readonly provenance: AttributionSource;
@@ -4566,10 +4553,10 @@ declare interface SubagentResultDetails {
4566
4553
  */
4567
4554
  readonly summary?: string;
4568
4555
  /**
4569
- * The settled task this result answers — the per-assignment correlation key
4556
+ * The settled task this result answers - the per-assignment correlation key
4570
4557
  * (#2933). `childSessionId` alone is NOT an identity: follow-up tasks reuse
4571
4558
  * the child session, so one child can produce many results. Absent on rows
4572
- * persisted before the key existed — readers of legacy rows must tolerate
4559
+ * persisted before the key existed - readers of legacy rows must tolerate
4573
4560
  * several same-`sourceId` rows with no task key and treat recency, not
4574
4561
  * first-match, as the tiebreaker.
4575
4562
  */
@@ -4598,14 +4585,14 @@ declare type SubagentResultMessage = CustomMessage<SubagentResultDetails> & {
4598
4585
  /**
4599
4586
  * One unified diagnostic for the extension substrates (tools, URI modules, converters, search
4600
4587
  * providers): a component misbehaved or an ambiguous registration was detected. Carries enough to
4601
- * answer "where in the pipeline + which component" — the owning extension/layer is resolved at
4588
+ * answer "where in the pipeline + which component" - the owning extension/layer is resolved at
4602
4589
  * normalization via the substrate attribution index. Never alters dispatch; the chosen/fallback
4603
4590
  * path still runs (and for `execute_threw` the original error still propagates to the agent).
4604
4591
  * Diagnostic; herd-internal.
4605
4592
  *
4606
- * - `stage` — `match` (a predicate threw), `merge` (layer assembly dropped it), `execute` (the
4593
+ * - `stage` - `match` (a predicate threw), `merge` (layer assembly dropped it), `execute` (the
4607
4594
  * component's `read`/`convert`/`write` threw).
4608
- * - `reason` — `match_threw` | `reserved_id` (claimed the reserved `builtin:` id) |
4595
+ * - `reason` - `match_threw` | `reserved_id` (claimed the reserved `builtin:` id) |
4609
4596
  * `scheme_conflict` (scheme ownership rejected the module) | `overlap`
4610
4597
  * (2+ matched the same pass; first wins) | `spoof_mismatch` (a declared mime the leading
4611
4598
  * bytes definitively contradict; selection re-keyed onto the true type) | `sync_threw` (the
@@ -6864,6 +6851,7 @@ declare const toolCallFailureCauseSchema: z.ZodObject<{
6864
6851
  "not-found": "not-found";
6865
6852
  permission: "permission";
6866
6853
  unavailable: "unavailable";
6854
+ waiting: "waiting";
6867
6855
  }>;
6868
6856
  retryable: z.ZodBoolean;
6869
6857
  action: z.ZodEnum<{
@@ -6872,6 +6860,7 @@ declare const toolCallFailureCauseSchema: z.ZodObject<{
6872
6860
  retry: "retry";
6873
6861
  "correct-input": "correct-input";
6874
6862
  connect: "connect";
6863
+ wait: "wait";
6875
6864
  }>;
6876
6865
  details: z.ZodOptional<z.ZodObject<{
6877
6866
  moduleId: z.ZodOptional<z.ZodString>;
@@ -6880,6 +6869,7 @@ declare const toolCallFailureCauseSchema: z.ZodObject<{
6880
6869
  uri: z.ZodOptional<z.ZodString>;
6881
6870
  path: z.ZodOptional<z.ZodString>;
6882
6871
  validationField: z.ZodOptional<z.ZodString>;
6872
+ validationRule: z.ZodOptional<z.ZodString>;
6883
6873
  errorName: z.ZodOptional<z.ZodString>;
6884
6874
  errorCode: z.ZodOptional<z.ZodString>;
6885
6875
  providerCode: z.ZodOptional<z.ZodString>;
@@ -7768,7 +7758,7 @@ declare interface TUppercaseMapping extends TMappingType {
7768
7758
  *
7769
7759
  * `error` and `aborted` are kept apart rather than folded into one "not ok":
7770
7760
  * a provider that failed and a user who interrupted produce the same shape of
7771
- * cost fact — a turn with no output — and only this distinguishes them.
7761
+ * cost fact - a turn with no output - and only this distinguishes them.
7772
7762
  * Mirrors the vocabulary already exported for tool calls, plus the abort case
7773
7763
  * a model call has and a tool call does not.
7774
7764
  */
@@ -7780,7 +7770,7 @@ declare const TURN_COST_OUTCOMES: readonly ["ok", "error", "aborted"];
7780
7770
  *
7781
7771
  * Turn-bound kinds die with the run they were queued against
7782
7772
  * (`TURN_BOUND_CUSTOM_TYPES`), and that includes a placement a DURABLE rail
7783
- * made — the rail's copy of the message is deleted from the kernel's queues
7773
+ * made - the rail's copy of the message is deleted from the kernel's queues
7784
7774
  * with everyone else's. The rail cannot see that from outside: its push
7785
7775
  * resolved, so without this event its row stays marked delivered while nothing
7786
7776
  * is queued anywhere, and the delivery is owed forever.
@@ -7792,7 +7782,7 @@ declare const TURN_COST_OUTCOMES: readonly ["ok", "error", "aborted"];
7792
7782
  */
7793
7783
  declare interface TurnBoundDeliveryDiscardedSessionEvent {
7794
7784
  readonly type: "turn_bound_delivery_discarded";
7795
- /** `details.deliveryId` of the discarded message — the rail's own row identity. */
7785
+ /** `details.deliveryId` of the discarded message - the rail's own row identity. */
7796
7786
  readonly deliveryId: string;
7797
7787
  /** The discarded message's `customType`, for the host's own diagnostics. */
7798
7788
  readonly customType: string;
@@ -7811,7 +7801,7 @@ declare interface TurnCostFact {
7811
7801
  * Without it a failed provider call is indistinguishable from a success at
7812
7802
  * call granularity: both arrive as a fact with zero tokens and no cost, and
7813
7803
  * the only failure signal anywhere is `run.settled.failureCategory`, which
7814
- * is absent whenever a run dies unsettled — exactly the incident shape.
7804
+ * is absent whenever a run dies unsettled - exactly the incident shape.
7815
7805
  */
7816
7806
  readonly outcome?: TurnCostOutcome;
7817
7807
  /** pi provider id that served the turn. */
@@ -7835,7 +7825,7 @@ declare interface TurnCostFact {
7835
7825
  *
7836
7826
  * Absent whenever the span cannot be paired: the kernel's one-shot
7837
7827
  * completions (compaction, branch-summary) never fire pi's provider-request
7838
- * hook, and a turn the human aborted is deliberately left unmeasured — its
7828
+ * hook, and a turn the human aborted is deliberately left unmeasured - its
7839
7829
  * wall time records when someone hit stop, not how fast the provider was.
7840
7830
  * A reader must treat absence as "not measured", never as zero.
7841
7831
  */
@@ -8197,7 +8187,7 @@ declare type TZipDistributionArray<Arguments extends TSchema[], DistributionArra
8197
8187
 
8198
8188
  declare const UI_ACTION_CUSTOM_TYPE = "ui_action";
8199
8189
 
8200
- /** A generative-UI interaction — the human acting, carried with its originating tool call. */
8190
+ /** A generative-UI interaction - the human acting, carried with its originating tool call. */
8201
8191
  declare interface UiActionDetails {
8202
8192
  readonly provenance: AttributionSource;
8203
8193
  /**
@@ -8287,21 +8277,14 @@ declare interface UriAccessSessionEvent {
8287
8277
  readonly phase: UriAccessPhase;
8288
8278
  /**
8289
8279
  * The resolved connection's record id when connection resolution ran (see
8290
- * `UriAccess.connectionId`) — an opaque identity, never the account
8280
+ * `UriAccess.connectionId`) - an opaque identity, never the account
8291
8281
  * `@selector` the `uri` contract strips. Replay consumers pass it back so a
8292
8282
  * re-read binds the SAME connection instead of blindly re-resolving.
8293
8283
  */
8294
8284
  readonly connectionId?: string;
8295
- /**
8296
- * Present (always `true`) when the owning module's `observes(uri)` predicate
8297
- * marks THIS resource observable (see `UriAccess.observable`) — the
8298
- * per-resource replayability signal ambient index consumers gate on for
8299
- * reads and CRUD mutations.
8300
- */
8301
- readonly observable?: true;
8302
8285
  /**
8303
8286
  * Present (always `true`) on an executed read whose provider fetch
8304
- * concluded with a principled not-found (see `UriAccess.notFound`) — the
8287
+ * concluded with a principled not-found (see `UriAccess.notFound`) - the
8305
8288
  * retirement trigger for consumers holding state under this uri.
8306
8289
  */
8307
8290
  readonly notFound?: true;
@@ -8313,7 +8296,7 @@ declare interface UriAccessSessionEvent {
8313
8296
  };
8314
8297
  /**
8315
8298
  * The result identities an executed `search` dispatch returned, in rank
8316
- * order (see `UriAccess.resultUris`) — what the model actually saw, for
8299
+ * order (see `UriAccess.resultUris`) - what the model actually saw, for
8317
8300
  * joining against later reads of the same URIs. Empty means a real
8318
8301
  * zero-hit search; absent means no result set applies.
8319
8302
  */
@@ -8322,6 +8305,33 @@ declare interface UriAccessSessionEvent {
8322
8305
  readonly at: string;
8323
8306
  }
8324
8307
 
8308
+ /**
8309
+ * The indexable form a module returned with one executed read (see
8310
+ * `RawResource.observation` in `@herd/uri`, whose `ObservationMaterial` this
8311
+ * restates). Carries document text, so it is never a herd fact: the host
8312
+ * routes it to its index alone and neither publishes nor stores it.
8313
+ * Synthetic; herd-owned; live-only.
8314
+ */
8315
+ declare interface UriObservationSessionEvent {
8316
+ readonly type: "uri_observation";
8317
+ /** The dispatch URI the read served (see `UriAccessSessionEvent.uri`). */
8318
+ readonly uri: string;
8319
+ readonly ownerModuleId: string;
8320
+ /** The resolved connection's record id (see `UriAccessSessionEvent.connectionId`). */
8321
+ readonly connectionId?: string;
8322
+ readonly observation: {
8323
+ readonly uri: string;
8324
+ readonly kind: string;
8325
+ readonly title?: string;
8326
+ readonly text?: readonly string[];
8327
+ readonly createdAt?: string;
8328
+ readonly updatedAt?: string;
8329
+ readonly version?: string;
8330
+ readonly retainForMs?: number;
8331
+ };
8332
+ readonly sessionId: string;
8333
+ }
8334
+
8325
8335
  declare interface Usage {
8326
8336
  input: number;
8327
8337
  output: number;
@@ -8347,14 +8357,14 @@ declare interface Usage {
8347
8357
 
8348
8358
  /**
8349
8359
  * The user-invoked message: everything the composer INTENTIONALLY pulled into a
8350
- * send — today the resolved content of skill- and prompt-template-bound slash
8351
- * commands — carried beside the human turn instead of fabricated into its text.
8360
+ * send - today the resolved content of skill- and prompt-template-bound slash
8361
+ * commands - carried beside the human turn instead of fabricated into its text.
8352
8362
  * The user turn stays exactly what was typed (`/pr-review 123`); this message
8353
8363
  * delivers what that intent resolved to, one message per send, in per-feature
8354
- * sections (`skills`, `prompt_templates` — a future feature adds a SIBLING
8364
+ * sections (`skills`, `prompt_templates` - a future feature adds a SIBLING
8355
8365
  * section, never a second meaning for an existing one). Sibling of
8356
8366
  * `dynamic_context` in grammar (a sectioned wrapper) but not in policy: it is
8357
- * assembled synchronously and fail-closed at command dispatch — never a
8367
+ * assembled synchronously and fail-closed at command dispatch - never a
8358
8368
  * retrieval pass, budget, or debounce, because the content IS the send's
8359
8369
  * meaning, not something computed from it.
8360
8370
  */
@@ -8369,18 +8379,18 @@ declare const USER_PASTED_CONTENT_CUSTOM_TYPE = "user_pasted_content";
8369
8379
 
8370
8380
  /**
8371
8381
  * The user shell command result: a command the HUMAN ran directly through the
8372
- * composer's `!` shell escape — no model in the loop, no permission prompt —
8382
+ * composer's `!` shell escape - no model in the loop, no permission prompt -
8373
8383
  * carried into context so the agent can pick up where the user's manual work
8374
8384
  * left off. The third verb of the user-origin family: `tab_context` is what the
8375
8385
  * user is looking at, `ui_action` is what they clicked, `user_shell_command` is
8376
- * what they DID. Durable (never turn-bound) and it must never wake the agent —
8386
+ * what they DID. Durable (never turn-bound) and it must never wake the agent -
8377
8387
  * delivery policy lives with the host (D1: silent context).
8378
8388
  */
8379
8389
  declare const USER_SHELL_COMMAND_CUSTOM_TYPE = "user_shell_command";
8380
8390
 
8381
8391
  /**
8382
8392
  * Details of a `user_invoked` message. The message `content` is empty by
8383
- * construction — the model wrapper renders entirely from these typed sections
8393
+ * construction - the model wrapper renders entirely from these typed sections
8384
8394
  * (the `dynamic_context` details-first posture). One typed slot per feature
8385
8395
  * section; both are always present (empty arrays elide their section at the
8386
8396
  * model boundary).
@@ -8393,7 +8403,7 @@ declare interface UserInvokedDetails {
8393
8403
 
8394
8404
  /**
8395
8405
  * One invocation entry inside a `user_invoked` feature section: the resource's
8396
- * resolved name, the literal command the user typed (`/pr-review 123` — kept
8406
+ * resolved name, the literal command the user typed (`/pr-review 123` - kept
8397
8407
  * verbatim, alias and all), and the resolved content that command pulled in.
8398
8408
  */
8399
8409
  declare interface UserInvokedEntry {
@@ -8454,7 +8464,7 @@ declare type UserPastedContentMessage = CustomMessage<UserPastedContentDetails>
8454
8464
  */
8455
8465
  declare interface UserShellCommandDetails {
8456
8466
  readonly provenance: AttributionSource;
8457
- /** The background-task id the run rode — correlates the card with live task events. */
8467
+ /** The background-task id the run rode - correlates the card with live task events. */
8458
8468
  readonly taskId: string;
8459
8469
  readonly command: string;
8460
8470
  readonly cwd: string;
@@ -8474,7 +8484,7 @@ declare type UserShellCommandMessage = CustomMessage<UserShellCommandDetails> &
8474
8484
 
8475
8485
  /**
8476
8486
  * Live-only control signal emitted after a user shell command's typed result
8477
- * landed. The host's delivery policy keys off it — today that policy is "never
8487
+ * landed. The host's delivery policy keys off it - today that policy is "never
8478
8488
  * wake the agent" (D1 silent context), and this event is the seam a host would
8479
8489
  * use to flip a surface to conditional/auto respond later. Sibling of
8480
8490
  * {@link BackgroundTaskResultQueuedEvent}, split by origin: that one may wake,
@@ -8491,7 +8501,7 @@ declare interface UserShellCommandResultQueuedSessionEvent {
8491
8501
  * Where a user shell command's typed result landed (see
8492
8502
  * `AgentSession.runUserShellCommand`): `"follow_up"` joined a live run at
8493
8503
  * its follow-up boundary; `"appended"` was persisted straight into durable
8494
- * history because the session was idle — model-visible from the next run,
8504
+ * history because the session was idle - model-visible from the next run,
8495
8505
  * with NO run started.
8496
8506
  */
8497
8507
  declare type UserShellResultChannel = "follow_up" | "appended";