@deepseek-ai/dsh-tool-cordis 0.2.1-rc.3 → 0.2.2-alpha.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.
@@ -13,6 +13,38 @@
13
13
  */
14
14
  /** Every harness `ctx.<key>` service, sorted by key. */
15
15
  export const SERVICE_API = [
16
+ {
17
+ key: 'actionCards',
18
+ summary: 'Card tool, kind registry, Session projection, user actions and status notices.',
19
+ description: 'Card tool, kind registry, Session projection, user actions and status notices.',
20
+ methods: [
21
+ {
22
+ signature: 'register<Details>(kind: ActionCardKind<Details>): () => void',
23
+ description: 'Register one action kind for the caller\'s lifetime.',
24
+ parameters: [{ name: 'kind', description: 'the kind\'s skill, details schema, verbs and handler.' }],
25
+ returns: 'disposer removing the kind; actions on its cards are then unavailable.',
26
+ throws: ['when another kind already registered the same action.'],
27
+ },
28
+ {
29
+ signature: 'record(agent: Agent, decision: ActionCardDecision): void',
30
+ description: 'Record a card decision in the Session log; the next model request reports it.',
31
+ parameters: [{ name: 'agent', description: 'agent whose Session owns the card.' }, { name: 'decision', description: 'the card\'s new state.' }],
32
+ throws: ['when no kind ever registered the decision\'s action with this service, or its phase is one the projection derives.'],
33
+ },
34
+ {
35
+ signature: 'view(session: Session): ActionCardView',
36
+ description: 'Read the cards of one Session.',
37
+ parameters: [{ name: 'session', description: 'a Session whose projections are prepared.' }],
38
+ returns: 'proposals and decisions by call id.',
39
+ },
40
+ {
41
+ signature: '@Remote act(agent: Agent, callId: ToolCallId, verb: string, payload?: Record<string, JsonValue>): Promise<ActionCardResult>',
42
+ description: 'Apply a user action to a logged card. Shared checks run first, then the kind reconciles the card; `dismiss` is recorded here and every other verb goes to the card\'s kind. `dismiss` also works on an unstarted card whose kind is no longer registered. Concurrent actions on one card share one operation.',
43
+ parameters: [{ name: 'agent', description: 'live root resolved from the displayed Session.' }, { name: 'callId', description: 'the card\'s `propose_action` call id.' }, { name: 'verb', description: '`dismiss` or one of the kind\'s verbs.' }, { name: 'payload', description: 'kind-defined fields such as a chosen location.' }],
44
+ returns: 'acceptance of background work, the decision in effect, or a refusal.',
45
+ },
46
+ ],
47
+ },
16
48
  {
17
49
  key: 'agentDefaultModel',
18
50
  summary: 'Owns the default model selection independently of any Host or transport.',
@@ -67,6 +99,12 @@ export const SERVICE_API = [
67
99
  summary: 'Registry of YAML-declared presets and the revisions live Agents retain.',
68
100
  description: 'Registry of YAML-declared presets and the revisions live Agents retain.',
69
101
  methods: [
102
+ {
103
+ signature: 'presetForSession(session: Session): string | null',
104
+ description: 'Read the preset recorded for a Session, including selections no longer in the roster.',
105
+ parameters: [{ name: 'session', description: 'Session whose committed preset selection is read.' }],
106
+ returns: 'the recorded preset, or null when none was selected.',
107
+ },
70
108
  {
71
109
  signature: 'async register(definition: PresetDefinition): Promise<() => Promise<void>>',
72
110
  description: 'Register and eagerly load a definition; activation failure remains visible in the roster.',
@@ -158,6 +196,12 @@ export const SERVICE_API = [
158
196
  summary: 'Agent service (`ctx.agents`): tracks live agents and carries the initiating Agent through one process-local asynchronous driver chain.',
159
197
  description: 'Agent service (`ctx.agents`): tracks live agents and carries the initiating Agent through one process-local asynchronous driver chain. Agent *creation* is provided by whichever plugin implements the AgentFactory (`@deepseek-ai/dsh-agent-loop`), registered via setFactory.\n\nInitiator methods provide same-process causal attribution only. Ambient presence is neither liveness proof nor authorization; subjects and owners remain explicit, as does identity at worker, process, persistence, and wire boundaries. Returned Promise boundaries drain during teardown, except a nested lineage that starts an owning-fiber unload is excluded from its own drain.',
160
198
  methods: [
199
+ {
200
+ signature: 'turnBoundaryOf(session: Session): TurnBoundaryProjection',
201
+ description: 'Read the turn and step positions recorded in a Session.',
202
+ parameters: [{ name: 'session', description: 'Session whose committed events are read.' }],
203
+ returns: 'the current turn and step positions; do not mutate the returned value.',
204
+ },
161
205
  {
162
206
  signature: 'currentInitiator(): Agent | undefined',
163
207
  description: 'Read the Agent that initiated the inherited asynchronous driver chain. Use this optional form for logging, tracing, metrics, or host attribution that also supports agentless calls. When a parent creates a child, setup reports the causal parent while the setup callback\'s Agent parameter identifies the child.',
@@ -371,8 +415,8 @@ export const SERVICE_API = [
371
415
  },
372
416
  {
373
417
  signature: 'async admitPromptContent( content: readonly AttachmentAdmissionPart[], ): Promise<AdmittedPromptContentPart[]>',
374
- description: 'Admit one Host prompt and replace each uploaded image with its durable reference. Text and durable file references pass through unchanged. A prompt without image parts performs no storage operation.',
375
- parameters: [{ name: 'content', description: 'prompt parts in message order after file receipt resolution.' }],
418
+ description: 'Admit one Host prompt and replace each encoded image with its durable reference. Text, durable file references, and already stored images pass through unchanged. Every image part counts toward `maxImagesPerMessage` and `maxMessageImageBytes`; a stored image counts the bytes of the upload that stored it. Refused content starts no writes. A prompt without encoded images performs no storage operation.',
419
+ parameters: [{ name: 'content', description: 'prompt parts in message order after upload receipt resolution.' }],
376
420
  returns: 'admitted prompt parts in the same order as `content`.',
377
421
  throws: ['AttachmentError when the image batch is refused.'],
378
422
  },
@@ -397,8 +441,8 @@ export const SERVICE_API = [
397
441
  },
398
442
  {
399
443
  signature: 'abstract readImage(ref: ImageAttachmentRef, signal?: AbortSignal): Promise<StoredImageAttachment>',
400
- description: 'Read one image and verify that bytes still match the recorded reference.',
401
- parameters: [{ name: 'ref', description: 'durable reference from the session log.' }, { name: 'signal', description: 'optional cancellation for backend read and verification work.' }],
444
+ description: 'Read one image and verify its ID, format, byte length, and dimensions against the supplied reference.',
445
+ parameters: [{ name: 'ref', description: 'supplied image reference; name and originalDimensions are preserved without file verification.' }, { name: 'signal', description: 'optional cancellation for backend read and verification work.' }],
402
446
  returns: 'the verified bytes and normalized attachment reference.',
403
447
  throws: ['the signal reason when aborted, or a storage error when verification fails.'],
404
448
  },
@@ -424,7 +468,7 @@ export const SERVICE_API = [
424
468
  {
425
469
  signature: 'async *readFileStream( ref: FileAttachmentRef, signal?: AbortSignal, ): AsyncIterable<Uint8Array>',
426
470
  description: 'Read and verify one verbatim stored file as bounded chunks. Providers must not collect the complete file in memory. Backends without verbatim file reads keep this default rejection.',
427
- parameters: [{ name: 'ref', description: 'durable reference from the session log.' }, { name: 'signal', description: 'optional cancellation for backend reads and verification work.' }],
471
+ parameters: [{ name: 'ref', description: 'durable file reference from the session log.' }, { name: 'signal', description: 'optional cancellation for backend reads and verification work.' }],
428
472
  returns: 'exact file bytes in order; integrity failures reject the iteration.',
429
473
  },
430
474
  {
@@ -521,8 +565,8 @@ export const SERVICE_API = [
521
565
  },
522
566
  {
523
567
  key: 'clientModules',
524
- summary: 'The web plugin table service: incremental `dsh.client` scan + wire composition + bundle route + index injection rows.',
525
- description: 'The web plugin table service: incremental `dsh.client` scan + wire composition + bundle route + index injection rows. Construction runs the activation scan synchronously — a malformed declaration or missing bundle among the already-loaded entries aggregates into one loud throw (FAILED fiber; the boot activation audit reports it).',
568
+ summary: 'The web plugin table service: incremental `dsh.client` scan + wire composition + bundle and package-asset route + index injection rows.',
569
+ description: 'The web plugin table service: incremental `dsh.client` scan + wire composition + bundle and package-asset route + index injection rows. Construction runs the activation scan synchronously — a malformed declaration or missing bundle among the already-loaded entries aggregates into one loud throw (FAILED fiber; the boot activation audit reports it).',
526
570
  methods: [
527
571
  {
528
572
  signature: 'graph(): WebBootGraph',
@@ -538,7 +582,7 @@ export const SERVICE_API = [
538
582
  },
539
583
  {
540
584
  signature: 'async fetchBundle(request: Request): Promise<Response>',
541
- description: 'Serve an advertised revisioned bundle or source map without a Web server. Unknown URLs return 404, unsupported methods return 405, and `HEAD` returns the same immutable headers without materializing a body. Each body is built once on its first `GET`; script construction never reads maps.',
585
+ description: 'Serve an advertised revisioned bundle, source map, chunk, or package asset without a Web server. Unknown URLs return 404, unsupported methods return 405, and `HEAD` returns the same immutable headers without materializing a body. Each bundle body is built once on its first `GET`; script construction never reads maps. A package asset is read on every request and answers 304 without a body when `If-None-Match` equals its entity tag; its body holds the file open until the caller consumes or cancels it. A bundle, map, or chunk body is the held buffer itself, not a copy, so a caller must not modify its bytes.',
542
586
  parameters: [{ name: 'request', description: 'shell-carrier request for a `/plugins` resource.' }],
543
587
  returns: 'the exact response also exposed by the optional Web route.',
544
588
  },
@@ -550,13 +594,13 @@ export const SERVICE_API = [
550
594
  },
551
595
  {
552
596
  signature: 'rebuilt(id: string): string | undefined',
553
- description: 'Publish one completed bundle generation (the HMR watch\'s registration hook — the only entry point through which build changes reach the graph). Unchanged mtime, ctime and size preserve the graph without reading the bundle.',
597
+ description: 'Publish one completed bundle generation (the HMR watch\'s registration hook; an entry restart publishes through reconciliation instead). Unchanged mtime, ctime and size preserve the graph without reading the bundle.',
554
598
  parameters: [{ name: 'id', description: 'entry id (package name).' }],
555
599
  returns: 'the current artifact rev, or undefined for an unknown id.',
556
600
  },
557
601
  {
558
602
  signature: 'onRebuilt(listener: (id: string, rev: string) => void): () => void',
559
- description: 'Subscribe to bundle rebuilds; fires only when artifact metadata changes the rev.',
603
+ description: 'Subscribe to bundle rebuilds; fires when rebuilt changes a rev. A rev an entry restart publishes reaches only onGraphChanged listeners.',
560
604
  parameters: [{ name: 'listener', description: 'receives the entry id and its new bundle rev.' }],
561
605
  returns: 'the unsubscriber.',
562
606
  },
@@ -842,6 +886,67 @@ export const SERVICE_API = [
842
886
  },
843
887
  ],
844
888
  },
889
+ {
890
+ key: 'cuaAccess',
891
+ summary: 'Browser controls for provider-owned native permission and application decisions.',
892
+ description: 'Browser controls for provider-owned native permission and application decisions.',
893
+ methods: [
894
+ {
895
+ signature: '@Remote ptcConfiguration(): { persistent: boolean; writable: boolean }',
896
+ description: 'Read PTC execution state separately from native permission checks.',
897
+ parameters: [],
898
+ returns: 'Whether the shared runtime retains memory and has an editable profile entry.',
899
+ },
900
+ {
901
+ signature: '@Remote async enablePersistentPtc(): Promise<void>',
902
+ description: 'Persist in-memory PTC execution through the existing profile editor and Loader lifecycle.',
903
+ parameters: [],
904
+ returns: 'Completion after the shared runtime reload; already-persistent runtimes are left intact.',
905
+ },
906
+ {
907
+ signature: '@Remote applications(): Promise<CuaApplicationState>',
908
+ description: 'Read fresh stored application decisions without issuing a native request.',
909
+ parameters: [],
910
+ returns: 'Saved grants, refused applications and durable-storage availability.',
911
+ },
912
+ {
913
+ signature: '@Remote async systemStatus(): Promise<CuaSystemPermissionState>',
914
+ description: 'Inspect system privileges independently of application decisions and icons.',
915
+ parameters: [],
916
+ returns: 'Fresh native preflight and launch metadata.',
917
+ },
918
+ {
919
+ signature: '@Remote async applicationIcons(): Promise<Record<string, string>>',
920
+ description: 'Load presentation icons separately from application decisions.',
921
+ parameters: [],
922
+ returns: 'Optional native PNG icons keyed by executable path; applications without paths are skipped.',
923
+ },
924
+ {
925
+ signature: '@Remote async requestPermission(permission: CuaSystemPermission): Promise<CuaSystemPermissionState>',
926
+ description: 'Request a system privilege explicitly selected by the user.',
927
+ parameters: [{ name: 'permission', description: 'macOS privilege to request.' }],
928
+ returns: 'Preflight state after requesting; a false value never implies consent.',
929
+ },
930
+ {
931
+ signature: '@Remote async openSettings(permission: CuaSystemPermission): Promise<void>',
932
+ description: 'Open the macOS privacy pane selected by the user.',
933
+ parameters: [{ name: 'permission', description: 'Corresponding system privilege.' }],
934
+ returns: 'Completion after macOS accepted the open request.',
935
+ },
936
+ {
937
+ signature: '@Remote revoke(id: CuaApplicationId): Promise<void>',
938
+ description: 'Remove saved and session access and join affected operations.',
939
+ parameters: [{ name: 'id', description: 'Application identity displayed on the permission page.' }],
940
+ returns: 'Completion after persistence and cancellation; dispatched input cannot be undone.',
941
+ },
942
+ {
943
+ signature: '@Remote async retryApproval(id: CuaApplicationId): Promise<void>',
944
+ description: 'Clear this application\'s refusals across sessions so each session may ask for access again.',
945
+ parameters: [{ name: 'id', description: 'Refused or revoked application displayed on the permission page.' }],
946
+ returns: 'Completion after clearing refusals; no permission is granted and no action is replayed.',
947
+ },
948
+ ],
949
+ },
845
950
  {
846
951
  key: 'deepseekAccount',
847
952
  summary: 'Account operations; only Host consumers can obtain a request credential.',
@@ -1009,7 +1114,7 @@ export const SERVICE_API = [
1009
1114
  returns: 'disposer removing this resolver.',
1010
1115
  },
1011
1116
  {
1012
- signature: '@Remote(\'upload\') upload(agent: Agent, request: EncodedFileUploadRequest, signal: AbortSignal): Promise<FileUploadValue>',
1117
+ signature: '@Remote(\'upload\') async upload(agent: Agent, request: EncodedFileUploadRequest, signal: AbortSignal): Promise<FileUploadValue>',
1013
1118
  description: 'Persist one encoded upload and stage it under the Agent receiver selected by Typert.',
1014
1119
  parameters: [{ name: 'agent', description: 'receiving Agent resolved from the Remote Agent scope.' }, { name: 'request', description: 'canonical base64 bytes and optional display name.' }, { name: 'signal', description: 'caller cancellation before storage begins.' }],
1015
1120
  returns: 'the staged receipt and durable file reference.',
@@ -1021,10 +1126,16 @@ export const SERVICE_API = [
1021
1126
  returns: 'the staged receipt and durable file reference.',
1022
1127
  },
1023
1128
  {
1024
- signature: 'resolve(agent: Agent, receiptId: FileUploadReceiptId): FileAttachmentRef | undefined',
1129
+ signature: 'async uploadImageStream(request: { readonly sessionId: SessionId readonly data: AsyncIterable<Uint8Array> readonly mediaType: string readonly signal?: AbortSignal readonly name?: string }): Promise<ImageUploadValue>',
1130
+ description: 'Persist one prompt image for a Session: read at most the smaller of the deployment\'s per-image and per-message byte limits, then validate, normalize, and store the image the way prompt admission does, so a later prompt cites it by receipt. Cancellation before storage begins stores nothing; a cancelled upload never receives a receipt, although an image whose storage already began stays in the content-addressed store.',
1131
+ parameters: [{ name: 'request', description: 'Session identity, ordered bytes, the declared media type that this deployment must accept, cancellation, and optional display name.' }],
1132
+ returns: 'the staged receipt and durable normalized image reference.',
1133
+ },
1134
+ {
1135
+ signature: 'resolve(agent: Agent, receiptId: FileUploadReceiptId): StagedAttachment | undefined',
1025
1136
  description: 'Resolve one staged receipt for the receiving Agent\'s exact Session.',
1026
1137
  parameters: [{ name: 'agent', description: 'receiving Agent.' }, { name: 'receiptId', description: 'opaque receipt minted for one completed upload.' }],
1027
- returns: 'durable file reference, or `undefined` for an unknown or foreign receipt.',
1138
+ returns: 'the staged file or image, or `undefined` for an unknown or foreign receipt.',
1028
1139
  },
1029
1140
  {
1030
1141
  signature: 'bindPrompt( agent: Agent, receiptIds: readonly FileUploadReceiptId[], requestId: string, ): PromptFileBinding',
@@ -1039,6 +1150,260 @@ export const SERVICE_API = [
1039
1150
  },
1040
1151
  ],
1041
1152
  },
1153
+ {
1154
+ key: 'forge',
1155
+ summary: 'Registry of forge providers.',
1156
+ description: 'Registry of forge providers. Watchers of one change request share a single polling loop; each forge has at most one fetch in flight, which batches every due change request of that forge.',
1157
+ methods: [
1158
+ {
1159
+ signature: 'register(provider: ForgeProvider): () => Promise<void>',
1160
+ description: 'Register the provider of one forge family as an effect on the calling fiber. Watches of that forge receive an `unavailable` failure when the registration ends. Unregistering cancels and awaits its in-flight calls; results from the withdrawn registration are discarded.',
1161
+ parameters: [{ name: 'provider', description: 'provider to serve `provider.forge`.' }],
1162
+ returns: 'the disposer that unregisters the provider and waits for its calls to finish.',
1163
+ throws: ['when another provider already serves the same forge.'],
1164
+ },
1165
+ {
1166
+ signature: 'repositoryFromRemote(url: string): ForgeRepository | undefined',
1167
+ description: 'Map a Git remote URL to a repository through the first provider that serves it.',
1168
+ parameters: [{ name: 'url', description: 'fetch or push URL as Git reports it.' }],
1169
+ returns: 'the repository, or undefined when no provider serves the URL.',
1170
+ },
1171
+ {
1172
+ signature: 'changeRequestFromUrl(url: string): ChangeRequestRef | undefined',
1173
+ description: 'Map a change request web URL through the first provider that serves it.',
1174
+ parameters: [{ name: 'url', description: 'web URL of a pull or merge request.' }],
1175
+ returns: 'the change request, or undefined when no provider serves the URL.',
1176
+ },
1177
+ {
1178
+ signature: 'changeRequestUrl(ref: ChangeRequestRef): string',
1179
+ description: 'Build the canonical web URL of a change request.',
1180
+ parameters: [{ name: 'ref', description: 'change request served by a registered provider.' }],
1181
+ returns: 'the provider\'s canonical URL.',
1182
+ throws: ['when no provider serves the change request\'s forge.'],
1183
+ },
1184
+ {
1185
+ signature: 'async findByHead(repository: ForgeRepository, branch: string, signal: AbortSignal): Promise<readonly ChangeRequestRef[]>',
1186
+ description: 'Find open change requests whose head is `branch`, excluding the default branch and forks.',
1187
+ parameters: [{ name: 'repository', description: 'repository served by a registered provider.' }, { name: 'branch', description: 'head branch name on the host.' }, { name: 'signal', description: 'cancellation for the lookup.' }],
1188
+ returns: 'matching change requests, newest first as the provider reports them.',
1189
+ throws: ['when no provider serves the repository\'s forge or the lookup fails.'],
1190
+ },
1191
+ {
1192
+ signature: 'async readiness(repository: ForgeRepository, signal: AbortSignal): Promise<ForgeReadiness>',
1193
+ description: 'Report whether the provider can reach the repository\'s host with current credentials.',
1194
+ parameters: [{ name: 'repository', description: 'repository served by a registered provider.' }, { name: 'signal', description: 'cancellation for the probe.' }],
1195
+ returns: 'the provider\'s readiness for the host.',
1196
+ throws: ['when no provider serves the repository\'s forge.'],
1197
+ },
1198
+ {
1199
+ signature: 'async markReady(ref: ChangeRequestRef, signal: AbortSignal): Promise<ForgeActionFailure | undefined>',
1200
+ description: 'Mark a draft change request ready for review, then poll it at once when it is watched.',
1201
+ parameters: [{ name: 'ref', description: 'change request served by a registered provider.' }, { name: 'signal', description: 'cancellation of the request.' }],
1202
+ returns: 'undefined once the host accepted the change, or why it did not.',
1203
+ throws: ['when no provider serves the change request\'s forge, or with `signal.reason` when it aborts.'],
1204
+ },
1205
+ {
1206
+ signature: 'async merge(ref: ChangeRequestRef, request: MergeRequest, signal: AbortSignal): Promise<ForgeActionFailure | undefined>',
1207
+ description: 'Merge a change request while its head is still `request.headSha`, then poll it at once when it is watched.',
1208
+ parameters: [{ name: 'ref', description: 'change request served by a registered provider.' }, { name: 'request', description: 'merge method and the head commit the user confirmed.' }, { name: 'signal', description: 'cancellation of the request.' }],
1209
+ returns: 'undefined once the host merged it, or why it did not.',
1210
+ throws: ['when no provider serves the change request\'s forge, or with `signal.reason` when it aborts.'],
1211
+ },
1212
+ {
1213
+ signature: 'async diff(ref: ChangeRequestRef, signal: AbortSignal): Promise<string | ForgeFailure>',
1214
+ description: 'Read the changes of a change request as its host computes them.',
1215
+ parameters: [{ name: 'ref', description: 'change request served by a registered provider.' }, { name: 'signal', description: 'cancellation of the read.' }],
1216
+ returns: 'one unified patch with `a/` and `b/` path prefixes, or why the host did not provide it.',
1217
+ throws: ['when no provider serves the change request\'s forge, or with `signal.reason` when it aborts.'],
1218
+ },
1219
+ {
1220
+ signature: 'async fileText(ref: ChangeRequestRef, commit: string, path: string, signal: AbortSignal): Promise<string | ForgeFailure>',
1221
+ description: 'Read the text of one file at a commit of a change request\'s repository.',
1222
+ parameters: [{ name: 'ref', description: 'change request served by a registered provider.' }, { name: 'commit', description: 'commit object name.' }, { name: 'path', description: 'path relative to the repository root.' }, { name: 'signal', description: 'cancellation of the read.' }],
1223
+ returns: 'the text, or why the host did not provide it.',
1224
+ throws: ['when no provider serves the change request\'s forge, or with `signal.reason` when it aborts.'],
1225
+ },
1226
+ {
1227
+ signature: 'fileUrl(ref: ChangeRequestRef, commit: string, path: string): string',
1228
+ description: 'Build the web page of one file at a commit of a change request\'s repository.',
1229
+ parameters: [{ name: 'ref', description: 'change request served by a registered provider.' }, { name: 'commit', description: 'commit object name.' }, { name: 'path', description: 'path relative to the repository root.' }],
1230
+ returns: 'the provider\'s URL.',
1231
+ throws: ['when no provider serves the change request\'s forge.'],
1232
+ },
1233
+ {
1234
+ signature: 'watch(ref: ChangeRequestRef, listener: ChangeRequestListener): () => void',
1235
+ description: 'Watch one change request as an effect on the calling fiber. The first watcher starts polling at once; listeners receive every later result, and `latest` returns the current one. Polling stops when the last watcher leaves. Listeners must not throw; a thrown error is logged and skipped.',
1236
+ parameters: [{ name: 'ref', description: 'change request to poll.' }, { name: 'listener', description: 'receives each polling result.' }],
1237
+ returns: 'the disposer that stops this watch.',
1238
+ },
1239
+ {
1240
+ signature: 'refresh(ref: ChangeRequestRef): void',
1241
+ description: 'Poll a watched change request at once, including after a terminal state. A fetch already in flight is followed immediately by another fetch; an unwatched change request is unchanged.',
1242
+ parameters: [{ name: 'ref', description: 'change request to poll.' }],
1243
+ },
1244
+ {
1245
+ signature: 'latest(ref: ChangeRequestRef): ChangeRequestUpdate | undefined',
1246
+ description: 'Read the latest polling result of a watched change request.',
1247
+ parameters: [{ name: 'ref', description: 'change request to read.' }],
1248
+ returns: 'the latest result, or undefined before the first result or without a watch.',
1249
+ },
1250
+ ],
1251
+ },
1252
+ {
1253
+ key: 'forgePanel',
1254
+ summary: 'Serves the forge panel.',
1255
+ description: 'Serves the forge panel. Following a Session inspects the checkout of its current directory read-only in the Session\'s execution world, recognizes the code host of the upstream remote or `origin`, probes sign-in for that host, and polls the Session\'s bound change requests through `ctx.forge` until the last follower of that Session leaves. A worktree request makes the panel create a branch and checkout through an optional `ctx.worktrees` and enter it while the Session\'s first message waits in the inbox, or at the first step proposal of a message no wait took. After a failed or stopped attempt the message keeps waiting for another attempt or for the request to be withdrawn. A message also waits while the worktree the Session works in is gone, until that worktree is checked out again or left for the source checkout. Changes to a Session\'s checkout run as Agent maintenance, so a message that arrives meanwhile waits for them.',
1256
+ methods: [
1257
+ {
1258
+ signature: '@Remote({ mode: \'stream\' }) async *follow(session: Session, signal: AbortSignal): AsyncIterable<ForgePanelState>',
1259
+ description: 'Stream the panel state of a Session: the current state first, then each later state. Intermediate states may be skipped when the reader is slower than the updates. The stream ends when `signal` aborts or the Remote stops.',
1260
+ parameters: [{ name: 'session', description: 'Session to follow.' }, { name: 'signal', description: 'ends the stream.' }],
1261
+ returns: 'panel states in publication order.',
1262
+ },
1263
+ {
1264
+ signature: '@Remote({ mode: \'stream\' }) async *changeRequestStates(signal: AbortSignal): AsyncIterable<ForgeChangeRequestStatesFrame>',
1265
+ description: 'Stream the last known state of every change request that a listed Session the caller may read binds: the stored states first, then each state a poll changes or a new binding reveals. Listing reads no Session log: loaded Sessions report their bindings, others the cached Session summary, and a Session without one shows nothing until it is opened. Closed requests are polled at the idle cadence so reopening is observed. The stream ends when `signal` aborts or the Remote stops.',
1266
+ parameters: [{ name: 'signal', description: 'ends the stream.' }],
1267
+ returns: 'frames in publication order.',
1268
+ throws: ['when the Host lacks the Session query, projection cache, storage, or Session store service.'],
1269
+ },
1270
+ {
1271
+ signature: '@Remote async branches(session: Session, signal: AbortSignal): Promise<ForgeBranches>',
1272
+ description: 'List the local branches that can start a worktree of the Session\'s current checkout.',
1273
+ parameters: [{ name: 'session', description: 'Session whose current directory is listed.' }, { name: 'signal', description: 'request cancellation.' }],
1274
+ returns: 'the checked-out branch and at most `maxBranches` local branches, the checked-out one first.',
1275
+ throws: ['when the current directory is not inside a checkout or Git fails.'],
1276
+ },
1277
+ {
1278
+ signature: '@Remote async track(session: Session, url: string, signal: AbortSignal): Promise<void>',
1279
+ description: 'Bind a change request to a Session by URL, or restore a dismissed binding.',
1280
+ parameters: [{ name: 'session', description: 'Session that receives the binding.' }, { name: 'url', description: 'web URL of the change request.' }, { name: 'signal', description: 'request cancellation.' }],
1281
+ throws: ['`forgePanel/unrecognized-url` when no registered provider serves the URL.'],
1282
+ },
1283
+ {
1284
+ signature: '@Remote async dismiss(session: Session, url: string, signal: AbortSignal): Promise<void>',
1285
+ description: 'Hide a visible binding of a Session; other URLs leave the Session unchanged.',
1286
+ parameters: [{ name: 'session', description: 'Session that owns the binding.' }, { name: 'url', description: 'web URL of the change request.' }, { name: 'signal', description: 'request cancellation.' }],
1287
+ },
1288
+ {
1289
+ signature: '@Remote async refresh(session: Session, signal: AbortSignal): Promise<void>',
1290
+ description: 'Reinspect a followed Session\'s checkout, probe sign-in again, and poll its change requests at once; an unfollowed Session is unchanged.',
1291
+ parameters: [{ name: 'session', description: 'Session whose panel refreshes.' }, { name: 'signal', description: 'request cancellation.' }],
1292
+ returns: 'settles once the inspection and the sign-in probe have ended; poll results reach the panel stream later.',
1293
+ },
1294
+ {
1295
+ signature: '@Remote async localDiff(session: Session, scope: ForgeLocalScope, signal: AbortSignal): Promise<ForgeLocalDiff>',
1296
+ description: 'Read the changes one scope covers in the checkout of the Session\'s current directory, with Git confined to the Session\'s read-only sandbox.',
1297
+ parameters: [{ name: 'session', description: 'Session whose checkout is read.' }, { name: 'scope', description: 'which changes to read.' }, { name: 'signal', description: 'request cancellation.' }],
1298
+ returns: 'the files, the base of the `branch` scope, and the untracked files left out.',
1299
+ throws: ['`forgePanel/not-a-checkout` outside a checkout; `forgePanel/no-fork-point` for the `branch` scope of a checkout without one; `forgePanel/diff-too-large` over `maxDiffBytes`; the Git error when Git fails.'],
1300
+ },
1301
+ {
1302
+ signature: '@Remote async localText(session: Session, scope: ForgeLocalScope, path: string, signal: AbortSignal): Promise<string>',
1303
+ description: 'Read the new side of one changed file in a scope, which supplies the unchanged lines between its hunks: the index for `staged`, else the working tree.',
1304
+ parameters: [{ name: 'session', description: 'Session whose checkout is read.' }, { name: 'scope', description: 'the scope the diff was read in.' }, { name: 'path', description: 'path relative to the checkout\'s top-level directory, as the diff names it.' }, { name: 'signal', description: 'request cancellation.' }],
1305
+ returns: 'the text.',
1306
+ throws: ['`forgePanel/not-a-checkout` outside a checkout; `forgePanel/diff-too-large` over `maxDiffBytes`; an error for a path outside the checkout, binary content, or a failed read.'],
1307
+ },
1308
+ {
1309
+ signature: '@Remote async changeRequestDiff(session: Session, url: string, signal: AbortSignal): Promise<ForgeChangeRequestDiff>',
1310
+ description: 'Read the changes of a change request of a Session as its code host computes them, at the head commit of its latest status. A patch already read at the same head commit and base branch is reused from memory, for any Session, until `maxCachedDiffBytes` evicts it.',
1311
+ parameters: [{ name: 'session', description: 'Session the change request is bound to.' }, { name: 'url', description: 'binding URL of the change request.' }, { name: 'signal', description: 'request cancellation.' }],
1312
+ returns: 'the files, the head commit, each file\'s web page, and the commits the checkout has beyond the head.',
1313
+ throws: ['`forgePanel/not-bound` unless the URL is a visible binding of the Session that a provider serves; `forgePanel/diff-too-large` when the host or its provider refuses the diff over a size limit; `forgePanel/diff-failed` before its status was read and when the host does not provide the diff otherwise.'],
1314
+ },
1315
+ {
1316
+ signature: '@Remote async changeRequestText(session: Session, url: string, commit: string, path: string, signal: AbortSignal): Promise<string>',
1317
+ description: 'Read one file of a change request\'s repository at a commit, which supplies the unchanged lines between the hunks of its diff.',
1318
+ parameters: [{ name: 'session', description: 'Session the change request is bound to.' }, { name: 'url', description: 'binding URL of the change request.' }, { name: 'commit', description: 'commit object name, the head commit of the diff.' }, { name: 'path', description: 'path relative to the repository root.' }, { name: 'signal', description: 'request cancellation.' }],
1319
+ returns: 'the text.',
1320
+ throws: ['`forgePanel/not-bound` unless the URL is a visible binding of the Session that a provider serves; `forgePanel/diff-too-large` when the host or its provider refuses the file over a size limit; `forgePanel/diff-failed` when the host does not provide the file otherwise.'],
1321
+ },
1322
+ {
1323
+ signature: '@Remote async markReady(session: Session, url: string, signal: AbortSignal): Promise<void>',
1324
+ description: 'Mark a draft change request of a Session ready for review; the change request is polled again once the host answers.',
1325
+ parameters: [{ name: 'session', description: 'Session the change request is bound to.' }, { name: 'url', description: 'binding URL of the change request.' }, { name: 'signal', description: 'request cancellation.' }],
1326
+ throws: ['`forgePanel/not-bound` unless the URL is a visible binding of the Session that a provider serves; `forgePanel/action-failed` with the host\'s reason when the host refuses or cannot be reached.'],
1327
+ },
1328
+ {
1329
+ signature: '@Remote async merge(session: Session, url: string, method: MergeMethod, headSha: string, signal: AbortSignal): Promise<void>',
1330
+ description: 'Merge a change request of a Session while its head is still `headSha`; the change request is polled again once the host answers.',
1331
+ parameters: [{ name: 'session', description: 'Session the change request is bound to.' }, { name: 'url', description: 'binding URL of the change request.' }, { name: 'method', description: 'how the commits enter the base branch.' }, { name: 'headSha', description: 'head commit the user confirmed.' }, { name: 'signal', description: 'request cancellation.' }],
1332
+ throws: ['`forgePanel/not-bound` unless the URL is a visible binding of the Session that a provider serves; `forgePanel/stale-head` when the head moved past `headSha`; `forgePanel/action-failed` with the host\'s reason when the host refuses otherwise or cannot be reached.'],
1333
+ },
1334
+ {
1335
+ signature: '@Remote async requestWorktree(session: Session, from: string | null, signal: AbortSignal): Promise<void>',
1336
+ description: 'Ask for a new worktree before the Session\'s first turn, replacing an open request and forgetting a failed attempt. While the next message waits in the inbox, or else at the first step proposal, the panel creates a branch from `from`, or from HEAD of the current checkout when it is null, and enters its checkout. A message that already waits after a failed or stopped attempt keeps waiting for ForgePanelController.retryWorktree.',
1337
+ parameters: [{ name: 'session', description: 'Session without a started turn.' }, { name: 'from', description: 'local base branch, or null for HEAD.' }, { name: 'signal', description: 'request cancellation.' }],
1338
+ throws: ['`forgePanel/invalid-branch` when `from` is empty; `forgePanel/worktrees-unavailable` without a worktree service; `forgePanel/session-started` after a turn started or the worktree was created; `forgePanel/session-busy` while the worktree is being created.'],
1339
+ },
1340
+ {
1341
+ signature: '@Remote async cancelWorktree(session: Session, signal: AbortSignal): Promise<void>',
1342
+ description: 'Withdraw the open worktree request of a Session with its failed attempt, which lets a waiting message go on in the current checkout; without a request the Session is unchanged. Withdrawing needs no worktree service.',
1343
+ parameters: [{ name: 'session', description: 'Session without a started turn.' }, { name: 'signal', description: 'request cancellation.' }],
1344
+ throws: ['`forgePanel/session-started` after a turn started or the worktree was created; `forgePanel/session-busy` while the worktree is being created.'],
1345
+ },
1346
+ {
1347
+ signature: '@Remote async stopCreation(session: Session, signal: AbortSignal): Promise<void>',
1348
+ description: 'Stop the creation a message of the Session waits for; the message keeps waiting with the request still open. Without such a creation the Session is unchanged.',
1349
+ parameters: [{ name: 'session', description: 'Session whose creation stops.' }, { name: 'signal', description: 'request cancellation.' }],
1350
+ },
1351
+ {
1352
+ signature: '@Remote async retryWorktree(session: Session, signal: AbortSignal): Promise<void>',
1353
+ description: 'Make another attempt, with a new branch name, at the worktree a message of the Session waits for after a failed or stopped attempt.',
1354
+ parameters: [{ name: 'session', description: 'Session whose message waits.' }, { name: 'signal', description: 'request cancellation.' }],
1355
+ throws: ['`forgePanel/not-waiting` when no message waits or an attempt is running.'],
1356
+ },
1357
+ {
1358
+ signature: '@Remote async restoreWorktree(session: Session, signal: AbortSignal): Promise<void>',
1359
+ description: 'Check out the created worktree of a Session again at its recorded directory when that directory is gone: its branch when the branch still exists, otherwise a new branch of the same name at the base commit. Changes that were never committed are not recovered. Runs as Agent maintenance, inside the wait of a message that waits for the restoration, which then goes on; without a missing directory the Session is unchanged.',
1360
+ parameters: [{ name: 'session', description: 'Session whose worktree directory is gone.' }, { name: 'signal', description: 'request cancellation, which aborts the restoration.' }],
1361
+ throws: ['`forgePanel/no-worktree` without a created worktree; `forgePanel/worktrees-unavailable` without a worktree service; `forgePanel/session-busy` while the Session\'s Agent is not loaded or has other work; `forgePanel/restore-failed` when Git fails.'],
1362
+ },
1363
+ {
1364
+ signature: '@Remote async continueInProject(session: Session, signal: AbortSignal): Promise<void>',
1365
+ description: 'Move a Session from its created worktree to the source checkout the worktree came from; the Session no longer works in the worktree. Runs as Agent maintenance, inside the wait of a message that waits for the removed worktree, which then goes on.',
1366
+ parameters: [{ name: 'session', description: 'Session with a created worktree.' }, { name: 'signal', description: 'request cancellation.' }],
1367
+ throws: ['`forgePanel/no-worktree` without a created worktree; `forgePanel/session-busy` while the Session\'s Agent is not loaded or has other work; the working-directory service\'s error when the source checkout no longer exists.'],
1368
+ },
1369
+ ],
1370
+ },
1371
+ {
1372
+ key: 'forgeSession',
1373
+ summary: 'Session-scoped change request bindings.',
1374
+ description: 'Session-scoped change request bindings. The `forgeChangeRequests` projection derives them from `gh pr create`, `gh pr view`, `gh pr edit`, `gh pr checkout`, and `git push` results and from `plugin:forge-session/binding` records. After each push result, and when a caller reports the branch a Session works on, the service looks up open change requests whose head is that branch and records the unbound ones as discovered. Watching a Session polls its visible change requests through `ctx.forge`.',
1375
+ methods: [
1376
+ {
1377
+ signature: 'changeRequests(session: Session): SessionChangeRequest[]',
1378
+ description: 'List the change requests bound to a Session and not dismissed.',
1379
+ parameters: [{ name: 'session', description: 'Session whose bindings are read.' }],
1380
+ returns: 'visible bindings in first-recorded order, each with its latest polling result.',
1381
+ },
1382
+ {
1383
+ signature: 'track(session: Session, url: string): void',
1384
+ description: 'Bind a change request to a Session by URL, or restore a dismissed binding. Appends a `track` record with the provider\'s canonical URL unless the change request is already visible.',
1385
+ parameters: [{ name: 'session', description: 'Session that receives the binding.' }, { name: 'url', description: 'web URL of the change request.' }],
1386
+ throws: ['when no registered provider recognizes the URL.'],
1387
+ },
1388
+ {
1389
+ signature: 'discoverBranch(session: Session, remote: string, branch: string): Promise<void>',
1390
+ description: 'Look up open change requests whose head is a branch the Session works on, and record the unbound ones as discovered, as after a push of that branch. A remote that no provider recognizes changes nothing; a failed lookup is logged and changes nothing.',
1391
+ parameters: [{ name: 'session', description: 'Session that receives the bindings.' }, { name: 'remote', description: 'URL of the remote that holds the branch.' }, { name: 'branch', description: 'branch name on that remote.' }],
1392
+ returns: 'resolves once the lookup has recorded its bindings or failed.',
1393
+ },
1394
+ {
1395
+ signature: 'dismiss(session: Session, url: string): void',
1396
+ description: 'Hide a visible binding. Appends a `dismiss` record; a URL that is not visibly bound leaves the log unchanged. Discovery never restores a dismissed binding; `track` does.',
1397
+ parameters: [{ name: 'session', description: 'Session that owns the binding.' }, { name: 'url', description: 'web URL of the change request.' }],
1398
+ },
1399
+ {
1400
+ signature: 'watch(session: Session, listener: SessionChangeRequestsListener): () => void',
1401
+ description: 'Watch a Session\'s visible change requests as an effect on the calling fiber. Every visible change request that a provider recognizes is polled through `ctx.forge` while the Session has a watcher. Listeners receive the complete list after each later binding or provider change, or polling result; read the current list with changeRequests. Listeners must not throw; a thrown error is logged and skipped.',
1402
+ parameters: [{ name: 'session', description: 'Session to watch.' }, { name: 'listener', description: 'receives the complete visible list.' }],
1403
+ returns: 'the disposer that stops this watch.',
1404
+ },
1405
+ ],
1406
+ },
1042
1407
  {
1043
1408
  key: 'fs',
1044
1409
  summary: 'Abstract filesystem provider.',
@@ -1205,6 +1570,43 @@ export const SERVICE_API = [
1205
1570
  },
1206
1571
  ],
1207
1572
  },
1573
+ {
1574
+ key: 'headlessStartup',
1575
+ summary: 'What the runner row reads from HEADLESS_STARTUP_SERVICE.',
1576
+ description: 'What the runner row reads from HEADLESS_STARTUP_SERVICE.',
1577
+ methods: [
1578
+ {
1579
+ signature: 'task: string | undefined',
1580
+ description: 'The task text this invocation asked for; absent when the runner reads stdin.',
1581
+ parameters: [],
1582
+ },
1583
+ {
1584
+ signature: 'sessionId: string | undefined',
1585
+ description: 'Exact Session identity to adopt; absent for a fresh random identity.',
1586
+ parameters: [],
1587
+ },
1588
+ {
1589
+ signature: 'json: boolean',
1590
+ description: 'Whether stdout carries the machine-readable event stream instead of final text.',
1591
+ parameters: [],
1592
+ },
1593
+ {
1594
+ signature: 'permissionMode?: string',
1595
+ description: 'Permission preset to apply before the task; absent preserves session policy.',
1596
+ parameters: [],
1597
+ },
1598
+ {
1599
+ signature: 'approvalPolicy?: ApprovalPolicy',
1600
+ description: 'Approval behavior applied after the permission preset; absent keeps the current policy.',
1601
+ parameters: [],
1602
+ },
1603
+ {
1604
+ signature: 'additionalWritableRoots?: string[]',
1605
+ description: 'Explicit absolute write grants for this invocation; absent adds no directories.',
1606
+ parameters: [],
1607
+ },
1608
+ ],
1609
+ },
1208
1610
  {
1209
1611
  key: 'hmr',
1210
1612
  summary: 'Hot reload service with Cordis-compatible module configuration and events.',
@@ -1355,6 +1757,85 @@ export const SERVICE_API = [
1355
1757
  },
1356
1758
  ],
1357
1759
  },
1760
+ {
1761
+ key: 'liveshareShares',
1762
+ summary: 'Owner-only Remote surface over the share-management operations.',
1763
+ description: 'Owner-only Remote surface over the share-management operations.\n\nThe Gateway decides each call through remote access, so a `share-viewer` Peer is refused before a method runs; the owner Peer reaches the one implementation that owns each share-management side effect. `create` takes its Session as the `sessionId` of its single request object, so the Session resource kind\'s default resolver names that Session for the call without a reader declared here.',
1764
+ methods: [
1765
+ {
1766
+ signature: '@Remote(\'create\') create(request: CreateShareRequest): Promise<CreatedShare>',
1767
+ description: 'Publish one Session and store the share.',
1768
+ parameters: [{ name: 'request', description: 'Session, title, access, lifetime, and both switches the owner chose.' }],
1769
+ returns: 'The created share\'s link and stored values.',
1770
+ },
1771
+ {
1772
+ signature: '@Remote(\'list\') list(): Promise<OwnerShareList>',
1773
+ description: 'Refresh titles and Liveshare server authority, then list this host\'s shares.',
1774
+ parameters: [],
1775
+ returns: 'Every share this host publishes.',
1776
+ },
1777
+ {
1778
+ signature: '@Remote(\'stop\') stop(request: StopShareRequest): Promise<StopShareResult>',
1779
+ description: 'Stop one share locally, revoke its forks, and delete its row on the Liveshare server when reachable.',
1780
+ parameters: [{ name: 'request', description: 'Share to stop.' }],
1781
+ returns: 'Whether the row on the Liveshare server still needs a retry.',
1782
+ },
1783
+ {
1784
+ signature: '@Remote(\'updatePermissions\') updatePermissions(request: UpdateSharePermissionsRequest): Promise<SharePermissions>',
1785
+ description: 'Change one share\'s tier, fork switch, or both.',
1786
+ parameters: [{ name: 'request', description: 'Share and the switches to change.' }],
1787
+ returns: 'The permissions the share now carries.',
1788
+ },
1789
+ {
1790
+ signature: '@Remote(\'setCapabilities\') setCapabilities(request: SetShareCapabilitiesRequest): Promise<ShareCapabilities>',
1791
+ description: 'Replace one share\'s exposed plugin endpoints.',
1792
+ parameters: [{ name: 'request', description: 'Share and the selection to store.' }],
1793
+ returns: 'The capability selection the share now carries.',
1794
+ },
1795
+ {
1796
+ signature: '@Remote(\'capabilities\') capabilities(): ShareCapabilityOffers',
1797
+ description: 'Read the endpoints plugins currently offer.',
1798
+ parameters: [],
1799
+ returns: 'The live offer list.',
1800
+ },
1801
+ {
1802
+ signature: '@Remote(\'relay\') relay(): OwnerRelayState',
1803
+ description: 'Read the Liveshare server address the owner saved.',
1804
+ parameters: [],
1805
+ returns: 'The current Liveshare server state, with both address fields absent while none is saved.',
1806
+ },
1807
+ {
1808
+ signature: '@Remote(\'setRelay\') setRelay(request: SetRelayRequest): Promise<OwnerRelayState>',
1809
+ description: 'Choose the Liveshare server address later shares publish to.',
1810
+ parameters: [{ name: 'request', description: 'Normalized address or null to clear the saved one.' }],
1811
+ returns: 'The Liveshare server state after the change.',
1812
+ },
1813
+ {
1814
+ signature: '@Remote(\'identity\') identity(request: OwnerIdentityRequest): Promise<OwnerIdentityStatus>',
1815
+ description: 'Report this host\'s owner identity for one Liveshare server address.',
1816
+ parameters: [{ name: 'request', description: 'Address to report, or the effective one when absent.' }],
1817
+ returns: 'The owner identity status, without the credential.',
1818
+ },
1819
+ {
1820
+ signature: '@Remote(\'audit\') audit(request: ShareAuditRequest): Promise<ShareAudit>',
1821
+ description: 'Read the Liveshare server\'s durable audit trail for one share.',
1822
+ parameters: [{ name: 'request', description: 'Share whose audit is read.' }],
1823
+ returns: 'The audit events, or a structured failure when the Liveshare server cannot answer.',
1824
+ },
1825
+ {
1826
+ signature: '@Remote(\'testRelay\') testRelay(): Promise<RelayConnectivityView>',
1827
+ description: 'Check that the effective Liveshare server answers at all.',
1828
+ parameters: [],
1829
+ returns: 'The anonymous connectivity result.',
1830
+ },
1831
+ {
1832
+ signature: '@Remote(\'testPublish\') testPublish(request: TestPublishRequest): Promise<RelayPublishView>',
1833
+ description: 'Register one throwaway share to check whether this host may publish.',
1834
+ parameters: [{ name: 'request', description: 'Session the throwaway registration names.' }],
1835
+ returns: 'The Liveshare server\'s decision about this host\'s credential.',
1836
+ },
1837
+ ],
1838
+ },
1358
1839
  {
1359
1840
  key: 'llm',
1360
1841
  summary: 'The abstract `llm` service: an adapter registry plus a streaming model-call API, interceptable via the `llm/stream` waterfall.',
@@ -1612,8 +2093,8 @@ export const SERVICE_API = [
1612
2093
  },
1613
2094
  {
1614
2095
  key: 'planMode',
1615
- summary: '`ctx.planMode`: owns logged plan state, applies and narrates selected state at step start, the `plan:policy` section, the `/plan` command, and the stable exit tool.',
1616
- description: '`ctx.planMode`: owns logged plan state, applies and narrates selected state at step start, the `plan:policy` section, the `/plan` command, and the stable exit tool. Client carriers expose the projection\'s cropped `{ active, pending }` view.',
2096
+ summary: '`ctx.planMode`: owns logged plan state, applies and narrates selected state at step start, the `plan:policy` section, the `/plan` command, and the conditional exit tool.',
2097
+ description: '`ctx.planMode`: owns logged plan state, applies and narrates selected state at step start, the `plan:policy` section, the `/plan` command, and the conditional exit tool. Client carriers expose the projection\'s cropped `{ active, pending }` view. Agent prompt assembly fails while the projection reader is not ready; callers must await plugin activation before running an agent.',
1617
2098
  methods: [
1618
2099
  {
1619
2100
  signature: 'get(agent: Agent): { active: boolean; pending?: boolean }',
@@ -1634,6 +2115,13 @@ export const SERVICE_API = [
1634
2115
  summary: 'Manage profile files and apply their declared reload lifecycle.',
1635
2116
  description: 'Manage profile files and apply their declared reload lifecycle.',
1636
2117
  methods: [
2118
+ {
2119
+ signature: '@Remote async readBundleDetail(name: string, language: string, options?: { npmFileSources?: NpmFileSource[] }): Promise<BundleDetail>',
2120
+ description: 'Read a bundle\'s long description: the Markdown file its locale `meta.detail` names in `language`, otherwise its README. An installed bundle is read from its directory without network access; an official bundle the installation offers before it is installed is read from the npm file CDNs at its offered version. Nothing is cached.',
2121
+ parameters: [{ name: 'name', description: 'the bundle\'s package name, as `listBundles()` lists it.' }, { name: 'language', description: 'the display language, such as `zh-CN`; documents fall back through its prefixes to English.' }, { name: 'options', description: '`npmFileSources` names npm file CDNs to ask first for an offered bundle, in order, such as the one a Client measured as fastest; configured CDNs it omits follow, and CDNs that are not configured are not asked.' }],
2122
+ returns: 'the document with its origin and path, or `none`.',
2123
+ throws: ['{RemoteError} `plugin-manager/unknown-bundle`, `plugin-manager/invalid-language`, or `plugin-manager/detail-unavailable`.'],
2124
+ },
1637
2125
  {
1638
2126
  signature: '@Remote listVersionExemptions(): { exemptions: Record<string, string[]>; warnings: string[] }',
1639
2127
  description: 'Read exact plugin-version exemptions saved in this profile.',
@@ -1670,6 +2158,18 @@ export const SERVICE_API = [
1670
2158
  parameters: [{ name: 'spec', description: 'One package spec: a registry name, an absolute path, a git address, or a tarball.' }, { name: 'options', description: 'The registry asked first.' }, { name: 'signal', description: 'Ends a registry lookup early.' }],
1671
2159
  returns: 'The package the spec names, or why it is refused.',
1672
2160
  },
2161
+ {
2162
+ signature: '@Remote async listVersions(name: string, options?: ListVersionsOptions, signal?: AbortSignal): Promise<PluginVersionList>',
2163
+ description: 'Read the published versions newer than an installed registry package\'s version, from the first registry that answers. Official bundles follow the DSH version and are not listed.',
2164
+ parameters: [{ name: 'name', description: 'Installed profile dependency name.' }, { name: 'options', description: 'The registry asked first; absent, the one the package was installed from in this process, else the configured one.' }, { name: 'signal', description: 'Ends the lookups early.' }],
2165
+ returns: 'At most `versionListLimit` newer versions, newest first, with their tags, deprecation, bundle declaration, and DSH compatibility, and the registry that answered; or why no list could be read, with every registry asked.',
2166
+ },
2167
+ {
2168
+ signature: '@Remote async updateBundle(name: string, version: string, options?: UpdateBundleOptions): Promise<PluginUpdateResult>',
2169
+ description: 'Replace an installed registry bundle with a newer published version. The target is checked on the registry first: it must exist, declare a bundle, and accept the running DSH version, or nothing changes. With HMR the installed version is removed, so its plugins stop, and the target is installed with the same selection; when that installation fails or is cancelled, the removed version is installed again from the registry it came from. Without HMR the target is installed over the running version and the result reports the restart.',
2170
+ parameters: [{ name: 'name', description: 'Installed profile dependency name.' }, { name: 'version', description: 'Exact published version newer than the installed one.' }, { name: 'options', description: 'The registry asked first, as for `listVersions`, and the request id naming the progress and the target installation\'s logs and cancellation.' }],
2171
+ returns: 'The versions, the last step that ran with its result, and the reinstallation when one ran.',
2172
+ },
1673
2173
  {
1674
2174
  signature: '@Remote setPluginEnabled(id: PluginEntryId, enabled: boolean): Promise<ChangeResult>',
1675
2175
  description: 'Persist a plugin entry\'s desired enablement and apply it on live profiles.',
@@ -1684,7 +2184,7 @@ export const SERVICE_API = [
1684
2184
  },
1685
2185
  {
1686
2186
  signature: '@Remote installBundle(spec: string, options?: InstallBundleOptions): Promise<ChangeResult>',
1687
- description: 'Install a package using the same pnpm implementation as dsh plugin. GitHub repositories get a connection check bounded by githubConnectionTimeoutMs before pnpm starts; only network failures or timeouts stop installation, while pnpm owns authentication and transport fallback. A run that fails, is cancelled, or adds a package without a bundle patch restores `package.json` and `pnpm-lock.yaml` as they were; downloaded files can stay.',
2187
+ description: 'Install a package using the same pnpm implementation as dsh plugin. GitHub repositories get a connection check bounded by githubConnectionTimeoutMs before pnpm starts; only network failures or timeouts stop installation, while pnpm owns authentication and transport fallback. An HTTP(S) Git URL on another host is installed over SSH instead when access probes bounded by gitTransportTimeoutMs find that only SSH can read it. A run that fails, is cancelled, or adds a package without a bundle patch restores `package.json` and `pnpm-lock.yaml` as they were; downloaded files can stay.',
1688
2188
  parameters: [{ name: 'spec', description: 'One package spec, including local paths relative to the invocation directory.' }, { name: 'options', description: 'Whether to activate the installed bundle (defaults to true), the request id a cancellation names, the pending build scripts to allow, whether to save an exact dependency, and the registry asked first.' }],
1689
2189
  returns: 'Package-manager diagnostics, the registries asked, and the observed activation outcome.',
1690
2190
  },
@@ -1739,6 +2239,26 @@ export const SERVICE_API = [
1739
2239
  returns: 'the plugin with its default version, installation status, and annotated versions; undefined when the index does not list it.',
1740
2240
  throws: ['{RemoteError} `plugin-market/unknown-index`, `plugin-market/invalid-index-url`, `plugin-market/fetch-failed`, or `plugin-market/invalid-index`.'],
1741
2241
  },
2242
+ {
2243
+ signature: '@Remote async readEntryDetail( url: string, name: string, version: string, language: string, options?: { refresh?: boolean; npmFileSources?: NpmFileSource[] }, ): Promise<PluginDetail>',
2244
+ description: 'Read the long description of one listed version of a plugin market entry, from the version\'s source: the npm file CDNs for a public npm version, or its pinned Git commit. The Markdown file the package\'s locale `meta.detail` names in `language` comes first, then the package\'s README, then the README of the entry\'s `repository`, or for an npm version without one, of its `package.json` `repository`, at the default branch. An npm version from another registry has no readable package files, so only the entry\'s `repository` is read.',
2245
+ parameters: [{ name: 'url', description: 'a configured index URL.' }, { name: 'name', description: 'the plugin\'s package name.' }, { name: 'version', description: 'one listed version.' }, { name: 'language', description: 'the display language, such as `zh-CN`; documents fall back through its prefixes to English.' }, { name: 'options', description: '`refresh` reads again instead of reusing a result cached for `cacheTtlMs`; `npmFileSources` names npm file CDNs to ask first for an npm version, in order; configured CDNs it omits follow, and CDNs that are not configured are not asked.' }],
2246
+ returns: 'the document with its origin and image document id, or `none`.',
2247
+ throws: ['{RemoteError} the failures of `search`, `plugin-market/unknown-plugin` for an unlisted plugin or version, `plugin-market/invalid-query`, or `plugin-market/detail-unavailable`.'],
2248
+ },
2249
+ ],
2250
+ },
2251
+ {
2252
+ key: 'pluginRecommendations',
2253
+ summary: 'Catalog lookups for card text and the enabling behind the `enable_official_plugin` card.',
2254
+ description: 'Catalog lookups for card text and the enabling behind the `enable_official_plugin` card.',
2255
+ methods: [
2256
+ {
2257
+ signature: '@Remote async describe(agent: Agent, callId: ToolCallId): Promise<RecommendationDetails>',
2258
+ description: 'Read the current catalog text for a logged card.',
2259
+ parameters: [{ name: 'agent', description: 'Exact live root resolved by the Gateway from the Session id.' }, { name: 'callId', description: 'The card\'s `propose_action` call id, never a package supplied by the browser.' }],
2260
+ returns: 'the plugin\'s title, description and selection, or a refusal when the card names no available official plugin.',
2261
+ },
1742
2262
  ],
1743
2263
  },
1744
2264
  {
@@ -1826,7 +2346,7 @@ export const SERVICE_API = [
1826
2346
  methods: [
1827
2347
  {
1828
2348
  signature: 'abstract readonly language: string',
1829
- description: 'The source language run expects `program` to be written in, as a lowercase identifier. Informational, not gating — a consumer that generates language-specific presentation (typed SDK stubs, usage instructions) switches on it and fails loud on a language it cannot present. Well-known values: `\'typescript\'` and `\'python\'`, those `dsh-tools` presents; the TypeScript backend is released, the Python backend is experimental and private (not published).',
2349
+ description: 'The source language run expects `program` to be written in, as a lowercase identifier. Informational, not gating — a consumer that generates language-specific presentation (typed SDK stubs, usage instructions) switches on it and fails loud on a language it cannot present. Well-known values: `\'typescript\'` and `\'python\'`, those `dsh-tool-executor-ptc` presents; the TypeScript backend is released, the Python backend is experimental and private (not published).',
1830
2350
  parameters: [],
1831
2351
  },
1832
2352
  {
@@ -1887,7 +2407,7 @@ export const SERVICE_API = [
1887
2407
  },
1888
2408
  {
1889
2409
  signature: 'snapshotFor(principal: Principal): RemoteAccessBaseline',
1890
- description: 'The baseline a page opens with before its snapshot stream connects. A business package rendering a non-owner page assigns this value to REMOTE_ACCESS_SNAPSHOT_KEY after every index injection row, replacing the owner baseline the webServer index carries.',
2410
+ description: 'The baseline a page opens with before its snapshot stream connects; every index the webServer renders carries it under REMOTE_ACCESS_SNAPSHOT_KEY for the Peer the page speaks for.',
1891
2411
  parameters: [{ name: 'principal', description: 'the page\'s caller identity.' }],
1892
2412
  returns: 'the owner baseline for the owner; otherwise the principal\'s current grants.',
1893
2413
  },
@@ -1927,6 +2447,11 @@ export const SERVICE_API = [
1927
2447
  description: 'The absolute `workspace-write` fallback root for calls without a session cwd.',
1928
2448
  parameters: [],
1929
2449
  },
2450
+ {
2451
+ signature: 'readonly additionalWritableRoots: readonly string[] | undefined',
2452
+ description: 'The frozen extra writable directories shared by every resolved policy, or `undefined` for none.',
2453
+ parameters: [],
2454
+ },
1930
2455
  {
1931
2456
  signature: 'resolve(request: SandboxPolicyRequest = {}): SandboxExecutionPolicy',
1932
2457
  description: 'Resolve the complete policy for one capability call. An approved explicit mode outranks the session\'s last `sandbox/mode` event, which outranks the deployment default. A session cwd is its workspace-write boundary; the configured root is the fallback for agentless calls and sessions without a cwd.',
@@ -1977,6 +2502,12 @@ export const SERVICE_API = [
1977
2502
  parameters: [{ name: 'request', description: 'Session and exact task identity.' }, { name: 'signal', description: 'Optional cancellation checked before persistence begins, including after FIFO waits.' }],
1978
2503
  returns: 'Whether that Session owned a deleted task. Cancellation does not roll back an in-flight write.',
1979
2504
  },
2505
+ {
2506
+ signature: '@Remote(\'deleteInactive\') async deleteInactive(): Promise<ScheduleDeleteInactiveResult>',
2507
+ description: 'Delete every ended Host task, leaving active tasks armed.\n\nEnded tasks never schedule another delivery, so the removal changes no pending target and no timer is recomputed. Rows are enumerated and removed in one FIFO slot, so a delivery ordered behind this call ends its task after the enumeration rather than during it. The batch is one domain write: a normal failure rejects with every listed row still stored, while a backend `unknown-state` failure may have removed rows and quarantines the Host domain, so later schedule operations reject until the domain is reopened. Every rejection announces `schedule/changed` because it does not establish which rows landed, and clients then re-read the catalog.',
2508
+ parameters: [],
2509
+ returns: 'Count of removed rows; zero when the Host held no ended task.',
2510
+ },
1980
2511
  {
1981
2512
  signature: '@Remote(\'update\') async update(request: ScheduleUpdateRequest, signal?: AbortSignal): Promise<ScheduleUpdateResult>',
1982
2513
  description: 'Update the name, instruction, and timing of an active task within the original Session binding without activating the Session or changing saved deliveries.\n\nEach supplied field replaces its stored value; an omitted field keeps it. A name or instruction change alone does not reset the committed target. A Session a delegated child owns returns the non-mutating `subagent_session` result, so an edit cannot re-arm a task bound to a Session delivery can never reach, and the Web editor can explain the refusal through the ordinary result it already renders.',
@@ -1996,12 +2527,6 @@ export const SERVICE_API = [
1996
2527
  parameters: [{ name: 'sessionId', description: 'Session identity whose Agent owns the operation.' }],
1997
2528
  returns: 'the live Agent or the stable Session-domain failure.',
1998
2529
  },
1999
- {
2000
- signature: 'inspect( sessionId: SessionId, signal?: AbortSignal, ): Promise<SessionInspection>',
2001
- description: 'Inspect one attached or persisted Session without activating its Agent.',
2002
- parameters: [{ name: 'sessionId', description: 'durable Session identity.' }, { name: 'signal', description: 'optional caller cancellation for persistence reads.' }],
2003
- returns: 'the current attached state or persisted header and event prefix.',
2004
- },
2005
2530
  {
2006
2531
  signature: '@Remote(\'list\') async list(_request: SessionListRequest, signal: AbortSignal): Promise<SessionListValue>',
2007
2532
  description: 'Read all visible Session rows without resuming an Agent.',
@@ -2084,8 +2609,8 @@ export const SERVICE_API = [
2084
2609
  },
2085
2610
  {
2086
2611
  signature: '@Remote(\'attachment\') attachment(request: SessionAttachmentRequest): Promise<SessionAttachmentValue>',
2087
- description: 'Read one image proven reachable from the addressed Session log.',
2088
- parameters: [{ name: 'request', description: 'Session and attachment identities used for authorization.' }],
2612
+ description: 'Read one image from the attachment store after gateway authorization.',
2613
+ parameters: [{ name: 'request', description: 'image reference and gateway permission scope; Session existence is not checked.' }],
2089
2614
  returns: 'the durable attachment reference and base64-encoded bytes.',
2090
2615
  },
2091
2616
  {
@@ -2101,19 +2626,49 @@ export const SERVICE_API = [
2101
2626
  returns: 'acknowledgement that cancellation was requested.',
2102
2627
  },
2103
2628
  {
2104
- signature: '@Remote({ name: \'page\', resources: { session: addressedSession } }) page(request: SessionPageRequest, signal: AbortSignal): Promise<SessionPage>',
2629
+ signature: '@Remote events(request: SessionPageRequest, signal: AbortSignal): Promise<SessionEventsPage>',
2105
2630
  description: 'Read one cold-safe, message-aligned Session history page.',
2106
- parameters: [{ name: 'request', description: 'durable address, backward cursor, and page budget.' }, { name: 'signal', description: 'cancellation for persistence reads.' }],
2107
- returns: 'one chronological page.',
2631
+ parameters: [{ name: 'request', description: 'durable address, optional fixed cut, backward cursor, and page budget.' }, { name: 'signal', description: 'cancellation for persistence reads.' }],
2632
+ returns: 'one chronological page with its inclusive cursor.',
2633
+ },
2634
+ {
2635
+ signature: '@Remote({ mode: \'stream\' }) observeEvent(request: SessionObserveEventRequest, signal: AbortSignal): AsyncIterable<SessionEventFrame>',
2636
+ description: 'Subscribe to Session events without reading a snapshot.',
2637
+ parameters: [{ name: 'request', description: 'Session address.' }, { name: 'signal', description: 'subscription cancellation.' }],
2638
+ returns: 'readiness and subsequent events, without a snapshot.',
2639
+ },
2640
+ {
2641
+ signature: '@Remote({ mode: \'stream\' }) observeProjections(request: SessionProjectionsRequest, signal: AbortSignal): AsyncIterable<SessionProjectionFrame>',
2642
+ description: 'Subscribe to sparse Session projection changes.',
2643
+ parameters: [{ name: 'request', description: 'target Session.' }, { name: 'signal', description: 'subscription cancellation.' }],
2644
+ returns: 'readiness and sparse projection changes.',
2645
+ },
2646
+ {
2647
+ signature: '@Remote state(request: SessionStateRequest, signal: AbortSignal): Promise<SessionState>',
2648
+ description: 'Read passive Session state.',
2649
+ parameters: [{ name: 'request', description: 'target Session.' }, { name: 'signal', description: 'read cancellation.' }],
2650
+ returns: 'current passive state.',
2651
+ },
2652
+ {
2653
+ signature: '@Remote({ mode: \'stream\' }) observeState(request: SessionStateRequest, signal: AbortSignal): AsyncIterable<SessionState>',
2654
+ description: 'Subscribe to complete Session state replacements.',
2655
+ parameters: [{ name: 'request', description: 'target Session.' }, { name: 'signal', description: 'subscription cancellation.' }],
2656
+ returns: 'complete passive state replacements.',
2657
+ },
2658
+ {
2659
+ signature: '@Remote wait(request: SessionWaitRequest, signal: AbortSignal): Promise<SessionWaitValue>',
2660
+ description: 'Wait for Session quiescence or pending input with bounded assistant output.',
2661
+ parameters: [{ name: 'request', description: 'Session, wait bounds and output window.' }, { name: 'signal', description: 'caller cancellation.' }],
2662
+ returns: 'stopping state and bounded assistant output.',
2108
2663
  },
2109
2664
  {
2110
- signature: '@Remote({ mode: \'stream\', resources: { session: addressedSession } }) follow(request: SessionFollowRequest, signal: AbortSignal): AsyncIterable<SessionFollowFrame>',
2665
+ signature: '@Remote({ mode: \'stream\' }) follow(request: SessionFollowRequest, signal: AbortSignal): AsyncIterable<SessionFollowFrame>',
2111
2666
  description: 'Follow one Session log from its opening or resume cursor.',
2112
2667
  parameters: [{ name: 'request', description: 'durable address and last committed sequence already held by the caller.' }, { name: 'signal', description: 'cancellation owned by the Remote stream carrier.' }],
2113
2668
  returns: 'a complete opening snapshot followed by gap-free durable event frames and optional cursorless assistant-stream frames.',
2114
2669
  },
2115
2670
  {
2116
- signature: '@Remote(\'projections\') async projections(request: SessionProjectionsRequest, signal: AbortSignal): Promise<SessionProjectionsValue>',
2671
+ signature: '@Remote(\'projections\') projections(request: SessionProjectionsRequest, signal: AbortSignal): Promise<SessionProjectionsValue>',
2117
2672
  description: 'Read exact projections, returning cached hints only when migration is required.',
2118
2673
  parameters: [{ name: 'request', description: 'Session whose current values are required.' }, { name: 'signal', description: 'cancellation for the Session read.' }],
2119
2674
  returns: 'a sequenced baseline, cached hints when migration is deferred, or null when absent.',
@@ -2203,7 +2758,7 @@ export const SERVICE_API = [
2203
2758
  description: 'The persisted projection cache service. Opens the `session_projcache` domain at init, checkpoints live sessions on a throttled write-behind (count/interval triggers from Config) plus three mandatory points — session creation, `turn/end`, and session disposal (the live-to-cold moment) — and serves the cached rows for a session header. Every durable write is fail-soft: failures log a warning and the cache self-heals on the next write.',
2204
2759
  methods: [
2205
2760
  {
2206
- signature: 'cachedSnapshot( meta: SessionHeader, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot | undefined',
2761
+ signature: 'cachedSnapshot( meta: SessionHeader, keys?: ProjectionKeySelection, ): ProjectionSnapshot | undefined',
2207
2762
  description: 'The zero-I/O listing read: whole values viewed straight from the stored rows (version-matching keys only) of the record bound to the caller\'s lifecycle. The header is the only identity witness a listing holds, so this face matches the lifecycle identity (`formatVersion`, `createdAt`, `cwd`, `isSeeded`) and not the inherited cut: within one format generation the cut is fixed at fork time, so it distinguishes no lifecycle the other fields do not, and a viewed value never seeds a fold. The view is as stale as the last durable checkpoint but never wrong and never from an unrelated log. Its `asOfSeq` is the lowest watermark among the served rows: the stored record\'s own position, which the header cannot relate to the log the caller later opens. The Session list therefore labels the block as cached, and the client lets every value the connected Session produces supersede it whatever this number says.',
2208
2763
  parameters: [{ name: 'meta', description: 'the listed session\'s header (identity witness; no log read).' }, { name: 'keys', description: 'optional projection keys required by the caller\'s audience.' }],
2209
2764
  returns: 'the viewed block, or `undefined` when no usable row exists for this lifecycle at the current Session format.',
@@ -2237,19 +2792,19 @@ export const SERVICE_API = [
2237
2792
  {
2238
2793
  key: 'sessionProjections',
2239
2794
  summary: '`ctx.sessionProjections`: the projection unit table and its drive.',
2240
- description: '`ctx.sessionProjections`: the projection unit table and its drive. The service subscribes to `session/event` once; every committed event passes every registered unit\'s `apply` (eager drive). A changed state reference computes the next client view; the change feed is notified only when its raw result changes by `Object.is`. Cells build lazily — a unit registered after events flowed, or a session older than the registry, folds `init` over the in-memory log on first touch (event or read). Registration is an effect (disposer rides the calling fiber): an unloaded domain plugin\'s key disappears from snapshots and clients read it as capability absence. A host reader either declares `sessionProjections` in its plugin `inject` or fails explicitly when the registry or required key is absent. Contributors may preserve optional registration through `ctx.inject([\'sessionProjections\'], ...)`. Registrants sharing a key share one unit and are counted: the same tool package mounted in N agent presets registers N times, and the key survives until the last one unloads.',
2795
+ description: '`ctx.sessionProjections`: the projection unit table and its drive. The service subscribes to `session/event` once; every committed event passes every registered unit\'s `apply` (eager drive). A changed state reference computes the next client view; the change feed is notified only when its raw result changes by `Object.is`. Cells build lazily — a unit registered after events flowed, or a session older than the registry, folds `init` over the in-memory log on first touch (event or read). Consumers declare `sessionProjections` as a required injection, await registration during activation, and retain its ready handle. Registrants sharing a key share one unit and are counted. The last release removes the unit from live drives, checkpoints, and client snapshots; retained handles still fold new events on demand using the original unit.',
2241
2796
  methods: [
2242
2797
  {
2243
- signature: 'register< K extends keyof SessionProjectionMap, S extends SessionProjectionStateMap[K], >( definition: Omit<ProjectionDefinition<K, S>, \'wire\'> & { wire: NonNullable<ProjectionDefinition<K, S>[\'wire\']> }, ): () => void',
2244
- description: 'Register one domain\'s unit. The registration is an effect on the calling context\'s fiber: disposing the fiber (or calling the returned disposer) removes the key — and the unit\'s cached cells — from subsequent drives and snapshots.',
2798
+ signature: 'register<K extends keyof SessionProjectionMap, S>( definition: Omit<ProjectionDefinition<K, S>, \'wire\'> & { wire: NonNullable<ProjectionDefinition<K, S>[\'wire\']> }, ): Promise<ProjectionHandle<S>>',
2799
+ description: 'Register one domain\'s unit on the calling context\'s fiber. Fiber or handle disposal releases one reference; the final release removes live participation. Retained handles remain readable after release. Callers must await registration before publishing consumers; registration may perform asynchronous work.',
2245
2800
  parameters: [{ name: 'definition', description: 'key, state schema, pure unit functions, and stateVersion.' }],
2246
- returns: 'the exact disposer that unregisters this unit.',
2801
+ returns: 'an awaitable yielding a ready handle; the callable runtime value is deprecated.',
2247
2802
  },
2248
2803
  {
2249
- signature: 'register< K extends Exclude<keyof SessionProjectionStateMap, keyof SessionProjectionMap>, S extends SessionProjectionStateMap[K], >( definition: Omit<ProjectionDefinition<K, S>, \'wire\'>, ): () => void',
2250
- description: 'Register one host-only unit. Its state is omitted from client snapshots and always checkpointed like every other unit.',
2804
+ signature: 'register<K extends string, S>( definition: ProjectionDefinition<K, S> & { key: Exclude<K, keyof SessionProjectionMap> }, ): Promise<ProjectionHandle<S>>',
2805
+ description: 'Register one host-only unit. Its state is omitted from client snapshots and always checkpointed like every other unit. Callers must await registration before publishing consumers; registration may perform asynchronous work.',
2251
2806
  parameters: [{ name: 'definition', description: 'key, state schema, pure unit functions, and stateVersion.' }],
2252
- returns: 'the exact disposer that unregisters this unit.',
2807
+ returns: 'an awaitable yielding a ready handle; the callable runtime value is deprecated.',
2253
2808
  },
2254
2809
  {
2255
2810
  signature: 'onChanged(listener: ProjectionChangeListener): () => void',
@@ -2258,23 +2813,23 @@ export const SERVICE_API = [
2258
2813
  returns: 'the exact disposer that unsubscribes.',
2259
2814
  },
2260
2815
  {
2261
- signature: 'stateOf<K extends keyof SessionProjectionStateMap>( session: Session, key: K, ): SessionProjectionStateMap[K] | undefined',
2262
- description: 'Read one unit\'s current host state after materializing every registered unit at the Session cursor. Unrelated wire views are not produced. The returned value is live; callers must not mutate it.',
2263
- parameters: [{ name: 'session', description: 'the session whose state is read.' }, { name: 'key', description: 'the registered unit key.' }],
2264
- returns: 'current state, or `undefined` when the key is not registered.',
2265
- },
2266
- {
2267
- signature: 'snapshot( session: Session, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot',
2816
+ signature: 'snapshot( session: Session, keys?: ProjectionKeySelection, ): ProjectionSnapshot',
2268
2817
  description: 'One consistent cut over every registered client-visible unit for one session, read from the watermark cache (missing cells fold lazily over the in-memory log). Fully synchronous — every value and `asOfSeq` reflect the same log position. Each value passes its unit\'s `viewSchema` before leaving.',
2269
2818
  parameters: [{ name: 'session', description: 'the session whose projection values are read.' }, { name: 'keys', description: 'optional client-visible outputs; state materialization remains complete.' }],
2270
2819
  returns: 'the snapshot; `values` is empty when no selected client-visible unit is registered.',
2271
2820
  },
2272
2821
  {
2273
- signature: 'cachedSnapshot( session: Session, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot | undefined',
2822
+ signature: 'cachedSnapshot( session: Session, keys?: ProjectionKeySelection, ): ProjectionSnapshot | undefined',
2274
2823
  description: 'Read only already-materialized client-visible cells without folding history. Values may trail the live Session and are therefore hints, not a complete baseline. Missing cells are omitted.',
2275
2824
  parameters: [{ name: 'session', description: 'attached Session whose cached cells are inspected.' }, { name: 'keys', description: 'optional wire keys to view.' }],
2276
2825
  returns: 'the lowest common cached cut, or `undefined` when no wire cell exists.',
2277
2826
  },
2827
+ {
2828
+ signature: 'summaryKeys(): ReadonlySet<Extract<keyof SessionProjectionMap, string>>',
2829
+ description: 'The keys a Session summary carries: every registered client-visible key whose unit does not declare `summary: false`. The returned set is stable — the same instance on every call — until a registration or its disposal changes the key table, so a consumer may hold it across rows. Callers pass it to a key-taking read face such as `cachedSnapshot(session, summaryKeys())` or `viewCheckpoint(rows, summaryKeys())`; those faces use the set as-is.',
2830
+ parameters: [],
2831
+ returns: 'the current summary key set; do not mutate it.',
2832
+ },
2278
2833
  {
2279
2834
  signature: 'checkpoint(session: Session): ProjectionCheckpoint',
2280
2835
  description: 'State-level checkpoint of every persisted unit for one session, read from the watermark cache (missing cells fold lazily over the in-memory log). This is the write side of the persisted projection cache: the returned rows are the `(key → {ver, seq, val})` part of the durable `(sessionId, key, ver, seq, val)` rows. Every `val` is a DETACHED structured clone — never the live cell reference: the watermark cache is this registry\'s authoritative mutable state, and a caller reaching the live reference could corrupt every subsequent snapshot and frame through it (plain JSON by the unit contract, so the clone is total).',
@@ -2288,7 +2843,7 @@ export const SERVICE_API = [
2288
2843
  returns: 'the offset for the stored-log suffix read (`SessionHandle.read`), or `undefined` when no unit is registered (no read needed — {@link restore} would serve empty values regardless).',
2289
2844
  },
2290
2845
  {
2291
- signature: 'viewCheckpoint( checkpoint: ProjectionCheckpoint, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): Partial<SessionProjectionMap>',
2846
+ signature: 'viewCheckpoint( checkpoint: ProjectionCheckpoint, keys?: ProjectionKeySelection, ): Partial<SessionProjectionMap>',
2292
2847
  description: 'View a checkpoint\'s rows without any log read: for every registered client-visible unit whose row\'s `ver` matches, serve the schema-validated `view` of the schema-validated stored state; mismatched, malformed, or absent rows leave their key absent (a cold or listing consumer treats it as not-yet-available and a fuller read path refolds it). The zero-I/O rung of the read ladder — values are as stale as their rows, never wrong.',
2293
2848
  parameters: [{ name: 'checkpoint', description: 'persisted rows for one session (possibly stale or empty).' }, { name: 'keys', description: 'optional wire keys to view.' }],
2294
2849
  returns: 'whole values per key with a usable row; empty when none.',
@@ -2426,9 +2981,9 @@ export const SERVICE_API = [
2426
2981
  returns: 'mention-carrying candidates in rank order.',
2427
2982
  },
2428
2983
  {
2429
- signature: 'async prepare( agent: Agent, content: ContentBlock[], references: SessionReferenceInput[], signal?: AbortSignal, ): Promise<PreparedReferencedMessage>',
2430
- description: 'Snapshot all references for one accepted direct message and return one aggregated durable context. Automatic budgets use the last assembled route, or agent options before any assembly. Missing model capacity or adapter uses 64 KiB; other metadata lookup failures and cancellation reject preparation. Truncated previews include omission facts and a full-snapshot spill locator, or an explicit unavailable notice. Cancellation prevents context publication, including when storage completes after cancellation.',
2431
- parameters: [{ name: 'agent', description: 'target agent; references to it are rejected.' }, { name: 'content', description: 'already host-normalized readable message content.' }, { name: 'references', description: 'structured source sessions in mention order.' }, { name: 'signal', description: 'optional cancellation boundary for the active turn.' }],
2984
+ signature: 'async prepare( agent: Agent, content: ContentBlock[], references: SessionReferenceInput[], route: Readonly<Pick<LlmCallConfig, \'provider\' | \'model\'>>, signal?: AbortSignal, ): Promise<PreparedReferencedMessage>',
2985
+ description: 'Snapshot all references for one accepted direct message and return one aggregated durable context. Automatic budgets use the context capacity of `route`. Missing model capacity or adapter uses 64 KiB; other metadata lookup failures and cancellation reject preparation. Truncated previews include omission facts and a full-snapshot spill locator, or an explicit unavailable notice. Cancellation prevents context publication, including when storage completes after cancellation.',
2986
+ parameters: [{ name: 'agent', description: 'target agent; references to it are rejected.' }, { name: 'content', description: 'already host-normalized readable message content.' }, { name: 'references', description: 'structured source sessions in mention order.' }, { name: 'route', description: 'provider and model whose context capacity sizes the previews.' }, { name: 'signal', description: 'optional cancellation boundary for the active turn.' }],
2432
2987
  returns: 'detached content and optional referenced-session context.',
2433
2988
  },
2434
2989
  ],
@@ -2456,19 +3011,19 @@ export const SERVICE_API = [
2456
3011
  signature: 'prepare(id?: SessionId, options?: PrepareSessionOptions): Session',
2457
3012
  description: 'Build a session WITHOUT entering it into the store — validate the id/cwd and construct the Session (with its immutable SessionHeader). Pairs with enter + announce: a caller that owns a composite `ctx.effect` (the agent factory) folds the session lifecycle into that ONE effect so a fiber unload tears the session + agent down as a single ORDERED chain rather than as racing sibling effects — which would remove the publication hooks before the driver\'s closing events commit, dropping them.',
2458
3013
  parameters: [{ name: 'id', description: 'the session id; omitted, the store mints `session-<n>`.' }, { name: 'options', description: 'seed events and/or creation metadata for the header. With `eventState`, every seed event is either independently owned or any shared value is deeply frozen; {@link Session.fromRestore} validates and adopts those values without copying or freezing them.' }],
2459
- returns: 'the constructed session, NOT yet in the store.',
3014
+ returns: 'the store-owned session, not yet entered and read-only until announced.',
2460
3015
  throws: ['if a session with `id` already exists, metadata is not a plain lossless-JSON record with valid scalar fields, or `meta.cwd` is a non-absolute path.'],
2461
3016
  },
2462
3017
  {
2463
3018
  signature: 'enter(session: Session): () => void',
2464
- description: 'Enter a prepared session into the store: install the module-private append publication hooks and add it to the store. Returns the DETACH disposer (hooks + store removal). Does NOT emit `session/created` — the caller yields this disposer inside its effect and THEN calls announce, so a throwing `session/created` listener rolls the attach back instead of leaking it.\n\nRe-checks the id for a duplicate: `prepare` and `enter` are public cross-package primitives and a caller may interleave arbitrary work (or another create) between them, so a stale prepared session must NOT overwrite a live store entry of the same id — its detach disposer would later delete the REAL session. The create convenience and the agent factory call the two back-to-back so they never trip this, but the public API cannot assume that.',
2465
- parameters: [{ name: 'session', description: 'a {@link prepare}d session not yet in the store.' }],
3019
+ description: 'Enter a session into the store: install the module-private append publication hooks and add it to the store. Writes remain disabled until announce completes successfully. Returns the DETACH disposer (hooks + store removal). Does NOT emit `session/created` — the caller yields this disposer inside its effect and THEN calls announce, so a throwing `session/created` listener rolls the attach back instead of leaking it.\n\nRe-checks the id for a duplicate: `prepare` and `enter` are public cross-package primitives and a caller may interleave arbitrary work (or another create) between them, so a stale prepared session must NOT overwrite a live store entry of the same id — its detach disposer would later delete the REAL session. The create convenience and the agent factory call the two back-to-back so they never trip this, but the public API cannot assume that.',
3020
+ parameters: [{ name: 'session', description: 'an unentered session; independent instances become store-owned.' }],
2466
3021
  returns: 'the detach disposer (publication hooks + store removal). When called from a synchronous `session/created` listener, removal and disposal wait until that creation dispatch unwinds.',
2467
3022
  throws: ['if a session with this id is already in the store.'],
2468
3023
  },
2469
3024
  {
2470
3025
  signature: 'announce(session: Session): void',
2471
- description: 'Emit `session/created` exactly once for an entered session (with the carrier enter captured). Separate from enter so the caller can yield the detach disposer first (rollback safety — see enter).',
3026
+ description: 'Emit `session/created` exactly once for an entered session (with the carrier enter captured). Separate from enter so the caller can yield the detach disposer first (rollback safety — see enter). The Session remains read-only throughout synchronous dispatch; successful completion enables appends. A failed announcement leaves it read-only and cannot be retried.',
2472
3027
  parameters: [{ name: 'session', description: 'the entered session to announce to listeners.' }],
2473
3028
  throws: ['if the session is not live or its announcement already began, including a reentrant call from a creation listener.'],
2474
3029
  },
@@ -2493,7 +3048,7 @@ export const SERVICE_API = [
2493
3048
  },
2494
3049
  {
2495
3050
  signature: 'fork(source: SessionForkSource, boundary?: SessionSeq, childSessionId?: SessionId): Session',
2496
- description: 'Create a live child session from an exact prefix of a live source. `boundary` is an inclusive source event seq; omitted means the source\'s current last event. An open tail receives synthetic tool results and step/turn closers with the forked cause. Closed steps and turns remain unchanged, including any failed tool calls already missing results. `inheritedEventCount` counts only copied source events, excluding these closers.',
3051
+ description: 'Create an independent live session from an exact prefix of a live source. `boundary` is an inclusive source event seq; omitted means the source\'s current last event. An open tail receives synthetic tool results and step/turn closers with the forked cause. Closed steps and turns remain unchanged, including any failed tool calls already missing results. `inheritedEventCount` counts only copied source events, excluding these closers.',
2497
3052
  parameters: [{ name: 'source', description: 'Live source session object or id.' }, { name: 'boundary', description: 'Inclusive source event seq to fork through; omitted means the source\'s current last event, and omitted on an empty source forks an empty child.' }, { name: 'childSessionId', description: 'Optional child session id; omitted delegates to `SessionStore`\'s id policy.' }],
2498
3053
  returns: 'The created live child session.',
2499
3054
  },
@@ -2933,16 +3488,9 @@ export const SERVICE_API = [
2933
3488
  },
2934
3489
  {
2935
3490
  key: 'subagentModelSelection',
2936
- summary: 'Singleton settings owner read when delegation tools are composed for a Session.',
2937
- description: 'Singleton settings owner read when delegation tools are composed for a Session.',
2938
- methods: [
2939
- {
2940
- signature: 'current(): SubagentModelSelectionSettings',
2941
- description: 'Read a detached selection preference for the next eligible Session composition.',
2942
- parameters: [],
2943
- returns: 'the enabled state and exact allowed routes.',
2944
- },
2945
- ],
3491
+ summary: 'Host settings owner that records Session authorization before the first model request.',
3492
+ description: 'Host settings owner that records Session authorization before the first model request.',
3493
+ methods: [],
2946
3494
  },
2947
3495
  {
2948
3496
  key: 'subagents',
@@ -3135,9 +3683,9 @@ export const SERVICE_API = [
3135
3683
  },
3136
3684
  {
3137
3685
  signature: 'async assemble(context: AssembleContext = {}): Promise<PromptAssembly>',
3138
- description: 'Assemble global and scoped providers, detach tool parameters, apply canonical ordering, then run the assembly waterfall. Scoped sections and variables shadow globals. The returned waterfall value is authoritative except that an effective complete section is restored afterwards as the sole prompt section.',
3139
- parameters: [{ name: 'context', description: 'the optional scope and plugin-defined assembly fields.' }],
3140
- returns: 'the post-waterfall assembly with any complete prompt enforced.',
3686
+ description: 'Assemble global and scoped providers, detach tool parameters, apply canonical ordering, then run the presentation waterfall. Scoped sections and variables shadow globals. The waterfall\'s text is authoritative except that an effective complete section is restored afterwards as the sole prompt section; tool declarations stay provider-owned.',
3687
+ parameters: [{ name: 'context', description: 'the optional scope, step tool set, and plugin-defined assembly fields.' }],
3688
+ returns: 'the post-waterfall assembly with ordered tool declarations and any complete prompt enforced.',
3141
3689
  },
3142
3690
  ],
3143
3691
  },
@@ -3282,12 +3830,12 @@ export const SERVICE_API = [
3282
3830
  parameters: [],
3283
3831
  },
3284
3832
  {
3285
- signature: 'throttle<F extends (...args: any[]) => void>(callback: F, delay: number, noTrailing?: boolean): F & { dispose: () => void }',
3833
+ signature: 'throttle<F extends (...args: any[]) => any>(callback: F, delay: number, noTrailing?: boolean): ((...args: Parameters<F>) => void) & { dispose: () => void }',
3286
3834
  description: 'Return a throttled function whose timer is disposed with the current fiber.',
3287
3835
  parameters: [],
3288
3836
  },
3289
3837
  {
3290
- signature: 'debounce<F extends (...args: any[]) => void>(callback: F, delay: number): F & { dispose: () => void }',
3838
+ signature: 'debounce<F extends (...args: any[]) => any>(callback: F, delay: number): ((...args: Parameters<F>) => void) & { dispose: () => void }',
3291
3839
  description: 'Return a debounced function whose timer is disposed with the current fiber.',
3292
3840
  parameters: [],
3293
3841
  },
@@ -3298,6 +3846,12 @@ export const SERVICE_API = [
3298
3846
  summary: 'Replay owner for one service-wide estimator and isolated per-session folds.',
3299
3847
  description: 'Replay owner for one service-wide estimator and isolated per-session folds.',
3300
3848
  methods: [
3849
+ {
3850
+ signature: 'contextPressure(session: Session): Pick<ContextPressureProjection, \'pressureTokens\' | \'contextWindow\'>',
3851
+ description: 'Read the latest logged provider prompt size and route capacity.',
3852
+ parameters: [{ name: 'session', description: 'Session whose committed usage and request capacity are read.' }],
3853
+ returns: 'context pressure; fields remain absent until their source events are recorded.',
3854
+ },
3301
3855
  {
3302
3856
  signature: 'measure(session: Session, requestHeader?: EpochHeader): TokenMeasurement',
3303
3857
  description: 'Measure current request pressure and surface through the durable tail.\n\nThe effective envelope\'s routed provider/model selects the request-image pricing every node is priced under: a route whose adapter declares image pricing charges each retained image its visual tokens plus its model-visible text, while other routes keep the fixed heuristic. Provider usage is reused only when the latest successful call\'s canonical request envelope matches `requestHeader` and its total is no lower than that call\'s full route-priced anchor; otherwise the complete envelope and surface are repriced. The anchor includes all surface nodes immediately before the assistant message, including inputs admitted after step/start.\n\n`requestHeader` replaces the latest logged envelope for pressure and node pricing; the node set always describes the current session surface. Every call clones those positional nodes, so measurement is O(surface).',
@@ -3345,19 +3899,13 @@ export const SERVICE_API = [
3345
3899
  },
3346
3900
  {
3347
3901
  key: 'tools',
3348
- summary: 'Tool registry and execution pipeline.',
3349
- description: 'Tool registry and execution pipeline. Scoped registrations shadow globals; one visibility resolver feeds presentation, lookup, and dispatch.',
3902
+ summary: 'Concrete tool registry and scoped executor dispatcher.',
3903
+ description: 'Concrete tool registry and scoped executor dispatcher.',
3350
3904
  methods: [
3351
3905
  {
3352
- signature: 'presentAs(mode: ToolPresentationMode): () => void',
3353
- description: 'Present the calling scope\'s tools in `mode` instead of the deployment default. Nearest scope on the chain wins, so a preset\'s standing declaration covers every agent joined under it.\n\nScoped only, and one declaration per scope: this is how an agent preset composes PTC mode agents beside native ones in the same process, and a process-global override would be the `mode` config field instead.',
3354
- parameters: [{ name: 'mode', description: 'the presentation the covered agents\' models see.' }],
3355
- returns: 'the exact disposer that restores the deployment default.',
3356
- },
3357
- {
3358
- signature: 'register(definition: ToolDefinition): () => void',
3906
+ signature: 'register(definition: ToolDefinition, options: ToolRegistrationOptions = {}): () => void',
3359
3907
  description: 'Register globally or in the calling agent scope. Scoped tools shadow globals; duplicates within one layer and the reserved `run_code` name fail.',
3360
- parameters: [{ name: 'definition', description: 'tool schema, execution, and optional finalization/presentation callbacks.' }],
3908
+ parameters: [{ name: 'definition', description: 'tool schema, execution, and optional finalization/presentation callbacks.' }, { name: 'options', description: 'optional step-time activation condition.' }],
3361
3909
  returns: 'the exact disposer that unregisters the tool.',
3362
3910
  },
3363
3911
  {
@@ -3367,34 +3915,58 @@ export const SERVICE_API = [
3367
3915
  returns: 'the exact disposer that lifts this restriction.',
3368
3916
  },
3369
3917
  {
3370
- signature: 'guard(guard: ToolGuard): () => void',
3371
- description: 'Register a monotonic guard after the extensible `tools/pre-execute` waterfall. A plain-context guard applies globally; one registered through `agent.ctx` applies only to that agent. Any matching guard may deny by returning a reason, while no guard can force-allow a call another guard denied. The exact effect disposer is returned for ordered ownership and HMR cleanup.',
3372
- parameters: [{ name: 'guard', description: 'synchronous check; a returned string denies the execution.' }],
3373
- returns: 'the exact disposer that unregisters the guard.',
3374
- },
3375
- {
3376
- signature: 'get(name: string, scope?: ScopeKey): ToolDefinition | undefined',
3918
+ signature: 'get(name: string, scope?: ScopeKey, toolSet?: ResolvedToolSet): ToolDefinition | undefined',
3377
3919
  description: 'Look up a tool as one scope sees it (scoped shadows global; a restricted-away global reads as absent). Presenters pass the calling agent so the rendered card matches the definition that actually executed.',
3378
- parameters: [{ name: 'name', description: 'the tool name as registered.' }, { name: 'scope', description: 'the viewing scope (the agent); omitted = the global view.' }],
3920
+ parameters: [{ name: 'name', description: 'the tool name as registered.' }, { name: 'scope', description: 'the viewing scope (the agent); omitted = the global view.' }, { name: 'toolSet', description: 'step admission; omit only to inspect registered definitions.' }],
3379
3921
  returns: 'the definition the scope resolves, or undefined when none is visible.',
3380
3922
  },
3381
3923
  {
3382
- signature: 'schemas(scope?: ScopeKey): ToolSchema[]',
3924
+ signature: 'executable(name: string, scope?: ScopeKey, toolSet?: ResolvedToolSet): ToolDefinition | undefined',
3925
+ description: 'Resolve the definition a call may execute. With a step\'s admitted set, the set decides; without one, conditional registrations are unavailable.',
3926
+ parameters: [{ name: 'name', description: 'the tool name as registered.' }, { name: 'scope', description: 'the calling agent; omitted = the global view.' }, { name: 'toolSet', description: 'step admission, or omitted for a call outside a model step.' }],
3927
+ returns: 'the executable definition, or undefined when the call must fail as `UNKNOWN_TOOL`.',
3928
+ },
3929
+ {
3930
+ signature: 'async resolve(context: ToolActivationContext): Promise<ResolvedToolSet>',
3931
+ description: 'Resolve conditions once for this step without changing shared registrations. Cancellation or a rejected condition publishes no partial selection. Removed registrations cannot be restored by a late condition result.',
3932
+ parameters: [{ name: 'context', description: 'preparing agent, captured model selection, and cancellation.' }],
3933
+ returns: 'the complete selection; the caller disposes it after its tool batch settles.',
3934
+ },
3935
+ {
3936
+ signature: 'definitions(scope?: ScopeKey, toolSet?: ResolvedToolSet): readonly ToolDefinition[]',
3937
+ description: 'Read the visible capability definitions for descriptions and program bindings.',
3938
+ parameters: [{ name: 'scope', description: 'viewing Agent or preset; omitted selects the global view.' }, { name: 'toolSet', description: 'step admission; omit only to inspect registered definitions.' }],
3939
+ returns: 'definitions after scoped shadowing and restrictions, limited to the step\'s admission when given.',
3940
+ },
3941
+ {
3942
+ signature: 'schemas(scope?: ScopeKey, toolSet?: ResolvedToolSet): ToolSchema[]',
3383
3943
  description: 'Project visible definitions onto the allowlisted model-facing schema fields, excluding execution and presentation callbacks.',
3384
- parameters: [{ name: 'scope', description: 'the viewing scope (the agent); omitted = the global view.' }],
3944
+ parameters: [{ name: 'scope', description: 'the viewing scope (the agent); omitted = the global view.' }, { name: 'toolSet', description: 'step admission, or omitted for registered-definition inspection.' }],
3385
3945
  returns: 'one deep-cloned schema per visible tool.',
3386
3946
  },
3387
3947
  {
3388
- signature: 'executionMode(exec: ToolExecutionInput): ToolExecutionMode',
3389
- description: 'Classify a pending call through the caller\'s visible tool definition. Only an exact `true` is parallel; unknown, hidden, undeclared, invalid, or throwing classifiers are exclusive.',
3390
- parameters: [{ name: 'exec', description: 'call name, parsed arguments, and optional agent scope.' }],
3391
- returns: 'the fail-closed scheduling mode.',
3948
+ signature: 'setExecutor(executor: ToolExecutor): () => void',
3949
+ description: 'Provide the executor for the calling scope; an unscoped contribution is the deployment default. Rendering any executor-owned section requires the viewing scope\'s selection to remain available.',
3950
+ parameters: [{ name: 'executor', description: 'initialized provider owned by the contributing plugin.' }],
3951
+ returns: 'the effect disposer. Unloading leaves the selection unavailable until it is replaced.',
3392
3952
  },
3393
3953
  {
3394
- signature: 'async execute(exec: ToolExecutionInput): Promise<ToolExecutionResult>',
3395
- description: 'Execute through pre-policy, guards, around-dispatch, post-policy, definition-owned content finalization, and final notification. Tool and listener failures resolve as materialized error results; an invisible tool reports `UNKNOWN_TOOL`. The returned outcome is the same lossless, frozen snapshot final observers receive. Cancellation arriving after entry and before final result materialization skips a not-yet-started body with `ABORTED_BEFORE_DISPATCH` or replaces a successful started outcome with `ABORTED`; already-started work is still drained and may retain a tool-owned structured error.',
3396
- parameters: [{ name: 'exec', description: 'the typed same-process call input. The registry assigns its correlation token before policy begins.' }],
3397
- returns: 'the materialized final result.',
3954
+ signature: 'async execute(input: ToolBatchInput): Promise<ToolBatchResult>',
3955
+ description: 'Delegate a raw call batch to its Agent\'s provider or the deployment default. Select at dispatch; accepted batches settle through that provider even if it unloads.',
3956
+ parameters: [{ name: 'input', description: 'original calls, optional owning Agent, and optional logging step.' }],
3957
+ returns: 'the selected executor\'s settled batch; unavailable selections reject.',
3958
+ },
3959
+ {
3960
+ signature: 'guard(guard: ToolGuard): () => void',
3961
+ description: 'Register a monotonic denial in the calling scope.',
3962
+ parameters: [{ name: 'guard', description: 'evaluated after extensible pre-execute policy by the shared pipeline.' }],
3963
+ returns: 'the effect disposer that removes this guard.',
3964
+ },
3965
+ {
3966
+ signature: 'checkGuards(exec: ToolExecution): string | undefined',
3967
+ description: 'Check global and inherited guards after pre-execute policy and approval resolve.',
3968
+ parameters: [{ name: 'exec', description: 'invocation whose guards are checked before dispatch.' }],
3969
+ returns: 'the first denial reason, or undefined when no guard denies.',
3398
3970
  },
3399
3971
  ],
3400
3972
  },
@@ -3489,6 +4061,12 @@ export const SERVICE_API = [
3489
4061
  parameters: [],
3490
4062
  returns: 'whether an owner stream is open and has not been cancelled.',
3491
4063
  },
4064
+ {
4065
+ signature: 'getPendingRemoteEvents(): readonly PendingRemoteEventInfo[]',
4066
+ description: 'Inspect unsettled forwarded events without changing their lifetime.',
4067
+ parameters: [],
4068
+ returns: 'detached event names and Agent identities.',
4069
+ },
3492
4070
  {
3493
4071
  signature: 'registerRemoteEvents( source: TypertRemoteEventSource, host: RemoteEventHostInfo, ): () => Promise<void>',
3494
4072
  description: 'Register the sole application-selected forwarded-event source.',
@@ -3567,12 +4145,24 @@ export const SERVICE_API = [
3567
4145
  parameters: [{ name: 'request', description: 'the query and optional result limit.' }, { name: 'signal', description: 'optional cancellation signal forwarded to the provider.' }],
3568
4146
  returns: 'the provider\'s results, capped to `request.maxResults`.',
3569
4147
  },
4148
+ {
4149
+ signature: 'async searchReady(llmProvider?: string): Promise<boolean>',
4150
+ description: 'Whether the provider `search()` would select can authenticate a search made for a model request on the `llmProvider` chat route. Asks only that provider\'s `ready()`; one without `ready()` counts as ready. Makes no network calls. A selection failure answers true, because `search()` reports that failure as a structured `WebError`.',
4151
+ parameters: [{ name: 'llmProvider', description: 'the provider route id of the model request, when known.' }],
4152
+ returns: 'false only when the selected provider reports that it cannot authenticate.',
4153
+ },
3570
4154
  {
3571
4155
  signature: 'async fetch(request: WebFetchRequest, signal?: AbortSignal): Promise<WebFetchResult>',
3572
4156
  description: 'Retrieve one URL through the selected provider. Resolves the provider at call time with the selection rules above; throws WebError when the capability cannot run. A non-2xx response is a result, not a throw.',
3573
4157
  parameters: [{ name: 'request', description: 'the URL plus retrieval options.' }, { name: 'signal', description: 'optional cancellation signal forwarded to the provider.' }],
3574
4158
  returns: 'the retrieval outcome; non-2xx responses resolve descriptively.',
3575
4159
  },
4160
+ {
4161
+ signature: 'async fetchReady(llmProvider?: string): Promise<boolean>',
4162
+ description: 'Whether the provider `fetch()` would select can authenticate a fetch made for a model request on the `llmProvider` chat route. Asks only that provider\'s `ready()`; one without `ready()` counts as ready. Makes no network calls. A selection failure answers true, because `fetch()` reports that failure as a structured `WebError`.',
4163
+ parameters: [{ name: 'llmProvider', description: 'the provider route id of the model request, when known.' }],
4164
+ returns: 'false only when the selected provider reports that it cannot authenticate.',
4165
+ },
3576
4166
  ],
3577
4167
  },
3578
4168
  {
@@ -3610,7 +4200,7 @@ export const SERVICE_API = [
3610
4200
  {
3611
4201
  key: 'webServer',
3612
4202
  summary: 'The browser HTTP carrier service.',
3613
- description: 'The browser HTTP carrier service. Activation loads any configured TLS material, then listens immediately; a material or listen failure rejects initialization, and the boot process reports the failed fiber. Route registration order does not affect requests because configured named routes must be distinct, and the fallback handler answers anything not yet claimed during startup with 404 until its owner registers.',
4203
+ description: 'The browser HTTP carrier service. Activation loads any configured TLS material, then listens immediately; a material or listen failure rejects initialization, and the boot process reports the failed fiber. Route registration order does not affect requests because configured named routes must be distinct, and a request no named route matches is answered 404 until the fallback owner registers.',
3614
4204
  methods: [
3615
4205
  {
3616
4206
  signature: 'getOrigin(): string',
@@ -3620,9 +4210,9 @@ export const SERVICE_API = [
3620
4210
  throws: ['before `listen` binds a port, or when the bind address has no URL form.'],
3621
4211
  },
3622
4212
  {
3623
- signature: 'register(route: WebRoute): () => void',
4213
+ signature: 'register(route: WebRoute | WebResourceRoute): () => void',
3624
4214
  description: 'Register a named route. Duplicate (kind, path) throws — route patterns are a composition-level contract, so a collision is a misconfiguration.',
3625
- parameters: [{ name: 'route', description: 'kind, path, and the owning handler.' }],
4215
+ parameters: [{ name: 'route', description: 'kind, path, and the owning handler or resource.' }],
3626
4216
  returns: 'the disposer removing the route.',
3627
4217
  },
3628
4218
  {
@@ -3632,11 +4222,17 @@ export const SERVICE_API = [
3632
4222
  returns: 'the disposer removing the route.',
3633
4223
  },
3634
4224
  {
3635
- signature: 'registerFallback(handler: WebRoute[\'handler\']): () => void',
3636
- description: 'Claim the fallback seat: the handler answering every request no named route matches (the SPA dist server in the shipped Web composition). One owner only — a second registration throws, because two fallbacks cannot compose.',
3637
- parameters: [{ name: 'handler', description: 'owns the full response lifecycle of unmatched requests.' }],
4225
+ signature: 'registerFallback(fallback: WebRoute[\'handler\'] | Pick<WebResourceRoute, \'resource\'>): () => void',
4226
+ description: 'Claim the fallback seat: the handler or resource answering every request no named route matches (the SPA dist server in the shipped Web composition). One owner only — a second registration throws, because two fallbacks cannot compose.',
4227
+ parameters: [{ name: 'fallback', description: 'a handler owning the full response lifecycle of unmatched requests, or `{ resource }` answering them.' }],
3638
4228
  returns: 'the disposer releasing the seat.',
3639
4229
  },
4230
+ {
4231
+ signature: 'async readResource(request: Request, peer: PeerScope): Promise<Response>',
4232
+ description: 'Read the response an HTTP request for the same URL would receive, as the resource computes it for `peer`, without an HTTP exchange. The request path picks the responder by the HTTP match order — exact, longest prefix, then the fallback — and only a resource answers. This method checks no cookie, Host, or Origin: the caller admits the reader before reading.',
4233
+ parameters: [{ name: 'request', description: 'the read; its URL path selects the responder.' }, { name: 'peer', description: 'the Peer the read speaks for, passed to the resource.' }],
4234
+ returns: 'the resource\'s response, without a body for HEAD as over HTTP; 405 with `Allow: GET, HEAD` for any other method, checked before matching, where over HTTP a handler route or an unmatched path answers such a method itself; 404 when the path matches a handler route, or reaches the fallback seat while it is unclaimed or holds a handler. A resource that throws rejects the read, where an HTTP request would receive 400.',
4235
+ },
3640
4236
  {
3641
4237
  signature: 'tapIndex(transform: (html: string) => string): () => void',
3642
4238
  description: 'Register a raw-HTML index transform, the escape hatch for markup no IndexInjection row expresses: renderIndex applies taps in registration order after rendering the structured rows.',
@@ -3650,15 +4246,15 @@ export const SERVICE_API = [
3650
4246
  returns: 'the transformed body.',
3651
4247
  },
3652
4248
  {
3653
- signature: 'collectIndexInjections(): IndexInjection[]',
3654
- description: 'Gather the structured injection table: one `webserver/index-inject` emit, every subscriber pushes its current rows. Fresh per call, so subscribers read live state (module graph, theme preference) at emit time.',
3655
- parameters: [],
4249
+ signature: 'collectIndexInjections(peer: PeerScope): IndexInjection[]',
4250
+ description: 'Gather the structured injection table for one Peer: one `webserver/index-inject` emit, every subscriber pushes its current rows. Fresh per call, so subscribers read live state (module graph, theme preference, the Peer\'s access) at emit time.',
4251
+ parameters: [{ name: 'peer', description: 'the Peer the page speaks for.' }],
3656
4252
  returns: 'rows in subscriber activation order.',
3657
4253
  },
3658
4254
  {
3659
- signature: 'renderIndex(html: string): string',
3660
- description: 'Render one index.html body: the structured injection table first, then the raw `tapIndex` transforms over the result.',
3661
- parameters: [{ name: 'html', description: 'the raw index.html body.' }],
4255
+ signature: 'renderIndex(html: string, peer: PeerScope): string',
4256
+ description: 'Render one index.html body for one Peer: the structured injection table first, then the raw `tapIndex` transforms over the result.',
4257
+ parameters: [{ name: 'html', description: 'the raw index.html body.' }, { name: 'peer', description: 'the Peer the page speaks for.' }],
3662
4258
  returns: 'the transformed body.',
3663
4259
  },
3664
4260
  ],
@@ -3918,11 +4514,17 @@ export const SERVICE_API = [
3918
4514
  description: 'Creates retained Git worktrees under the mounted filesystem and sandbox providers.',
3919
4515
  methods: [
3920
4516
  {
3921
- signature: 'async create(agent: Agent, request: CreateWorktreeRequest = {}, signal?: AbortSignal): Promise<CreatedWorktree>',
4517
+ signature: 'async create( agent: Agent, request: CreateWorktreeRequest = {}, signal?: AbortSignal, onPhase?: (phase: CreateWorktreePhase) => void, ): Promise<CreatedWorktree>',
3922
4518
  description: 'Create a fresh branch and checkout at a pinned local revision, then enter it. Existing branches or checkout paths fail. Uncommitted files stay in the source checkout. Checkout disables configured clean, smudge, and process filters without changing Git config. Repository-local replacement refs still apply; baseCommit reports the resolved object name. The new checkout becomes current only after Git setup succeeds. Failures may retain newly allocated Git/filesystem artifacts; no branch or checkout is removed automatically.',
3923
- parameters: [{ name: 'agent', description: 'caller whose current directory selects the source repository and file policy.' }, { name: 'request', description: 'optional new name and local revision; defaults are generated name and HEAD.' }, { name: 'signal', description: 'cancellation of lookup, creation, and working-directory publication.' }],
4519
+ parameters: [{ name: 'agent', description: 'caller whose current directory selects the source repository and file policy.' }, { name: 'request', description: 'optional new name and local revision; defaults are generated name and HEAD.' }, { name: 'signal', description: 'cancellation of lookup, creation, and working-directory publication.' }, { name: 'onPhase', description: 'receives each stage before it begins; it must not throw.' }],
3924
4520
  returns: 'canonical checkout path, branch name, pinned commit, and source repository root.',
3925
4521
  },
4522
+ {
4523
+ signature: 'async restore( agent: Agent, request: RestoreWorktreeRequest, signal?: AbortSignal, onPhase?: (phase: CreateWorktreePhase) => void, ): Promise<RestoredWorktree>',
4524
+ description: 'Check out a removed worktree again at its recorded directory: its branch when the branch still exists, otherwise a new branch of the same name at `baseCommit`. Only the missing target\'s unlocked registration is removed, and an existing directory fails. Changes that were never committed are not recovered. Checkout disables configured clean, smudge, and process filters, as creation does. The calling Session\'s working directory does not change. Failures may retain newly allocated Git/filesystem artifacts.',
4525
+ parameters: [{ name: 'agent', description: 'caller whose sandbox policy confines the commands.' }, { name: 'request', description: 'recorded directory, branch, base commit, and source repository root.' }, { name: 'signal', description: 'cancellation of the restoration.' }, { name: 'onPhase', description: 'receives each stage before it begins; it must not throw.' }],
4526
+ returns: 'the directory and whether the branch was created again.',
4527
+ },
3926
4528
  ],
3927
4529
  },
3928
4530
  ];
@@ -4003,18 +4605,10 @@ export const EVENT_API = [
4003
4605
  {
4004
4606
  name: 'agent/pre-step',
4005
4607
  mode: 'waterfall',
4006
- signature: '\'agent/pre-step\'(this: Scoped<Agent>, payload: { agent: Agent; messages: UserMessage[]; turn: number; step: number; signal: AbortSignal }, next: () => Promise<PreStepDecision>): Promise<PreStepDecision>',
4608
+ signature: '\'agent/pre-step\'(this: Scoped<Agent>, payload: { agent: Agent; messages: UserMessage[]; turn: number; step: number; signal: AbortSignal; modelSelection: Readonly<ModelSelection> }, next: () => Promise<PreStepDecision>): Promise<PreStepDecision>',
4007
4609
  summary: 'Reject a proposed step or replace the messages that enter it.',
4008
4610
  description: 'Reject a proposed step or replace the messages that enter it. Calling `next()` preserves the current messages.',
4009
- parameters: [{ name: 'payload', description: '.signal - the current turn\'s cancellation signal. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.' }],
4010
- },
4011
- {
4012
- name: 'agent/request',
4013
- mode: 'waterfall',
4014
- signature: '\'agent/request\'(this: Scoped<Agent>, payload: { agent: Agent; turn: number; step: number; signal: AbortSignal }, next: () => Promise<LlmCallConfig>): Promise<LlmCallConfig>',
4015
- summary: 'Replace the frozen call configuration.',
4016
- description: 'Replace the frozen call configuration. `await next()` yields the config the machine would use (agent options on the first request, the logged header afterwards); return a replacement to switch. On step admission, this runs after assembly and `step/start`, before the system prompt and accepted user batch are committed. Cancellation here or during subsequent `prepareCall()` resolution commits neither. The prepared call capability governs prompt admission. Model-visible content must use logged channels; this waterfall cannot mutate messages.',
4017
- parameters: [{ name: 'payload', description: '.signal - the current turn\'s explicit abort signal. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.' }],
4611
+ parameters: [{ name: 'payload', description: '.modelSelection - captured step selection, retained across retries; omitted effort uses adapter defaults. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.' }],
4018
4612
  },
4019
4613
  {
4020
4614
  name: 'agent/request-error',
@@ -4232,6 +4826,14 @@ export const EVENT_API = [
4232
4826
  description: 'Observe a durable cold feedback mutation without publishing a live Session. Observers run before write ownership is released and must not await another message-feedback operation for this Session. The payload is borrowed read-only; deep-clone it before transferring ownership (for example, to Session.fromRestore).',
4233
4827
  parameters: [{ name: 'inspection', description: 'committed canonical prefix, including the feedback as its last event.' }],
4234
4828
  },
4829
+ {
4830
+ name: 'forge/providers-changed',
4831
+ mode: 'parallel',
4832
+ signature: '\'forge/providers-changed\'(forge: string): void | Promise<void>',
4833
+ summary: 'Announces a provider registration or withdrawal after the registry changes.',
4834
+ description: 'Announces a provider registration or withdrawal after the registry changes. Listener failures are logged without preventing other listeners from running.',
4835
+ parameters: [{ name: 'forge', description: 'family whose provider changed.' }],
4836
+ },
4235
4837
  {
4236
4838
  name: 'fs/edit-intent',
4237
4839
  mode: 'waterfall',
@@ -4296,6 +4898,14 @@ export const EVENT_API = [
4296
4898
  description: 'The provider topology changed: an adapter registered or unregistered routes, or the configurable-provider directory gained or lost entries. This payload-free registry notification fires at each commit point (including registration disposal); consumers re-read `listProviders()`, `listModels()`, or `listConfigurableProviders()` for the new state. Observer failures are contained and cannot veto the registry mutation.',
4297
4899
  parameters: [],
4298
4900
  },
4901
+ {
4902
+ name: 'llm/models-updated',
4903
+ mode: 'emit',
4904
+ signature: '\'llm/models-updated\'(provider: string): void',
4905
+ summary: 'A provider\'s advertised models or display metadata changed; consumers reload `listModels()`.',
4906
+ description: 'A provider\'s advertised models or display metadata changed; consumers reload `listModels()`.',
4907
+ parameters: [{ name: 'provider', description: 'route whose model catalog changed.' }],
4908
+ },
4299
4909
  {
4300
4910
  name: 'llm/stream',
4301
4911
  mode: 'waterfall',
@@ -4336,6 +4946,22 @@ export const EVENT_API = [
4336
4946
  description: 'An installation moved between its Host phases. `installing` is announced once per registry the installation asks, with the attempt\'s registry and position; `cancelling` and `applying` once.',
4337
4947
  parameters: [{ name: 'progress', description: 'the installation\'s request id and phase, with the attempt while installing.' }],
4338
4948
  },
4949
+ {
4950
+ name: 'plugin-manager/operation',
4951
+ mode: 'parallel',
4952
+ signature: '\'plugin-manager/operation\'(operation: PluginOperation): void | Promise<void>',
4953
+ summary: 'One manager invocation started or ended; subscribers run independently without delaying management.',
4954
+ description: 'One manager invocation started or ended; subscribers run independently without delaying management.',
4955
+ parameters: [{ name: 'operation', description: 'Correlated operation facts; a start without an end has an unknown outcome.' }],
4956
+ },
4957
+ {
4958
+ name: 'plugin-manager/update-state',
4959
+ mode: 'emit',
4960
+ signature: '\'plugin-manager/update-state\'(progress: PluginUpdateProgress): void',
4961
+ summary: 'An update moved to its next step: checking the target, removing the installed version, installing the target, or reinstalling the removed version after the target failed.',
4962
+ description: 'An update moved to its next step: checking the target, removing the installed version, installing the target, or reinstalling the removed version after the target failed. Announced once per step.',
4963
+ parameters: [{ name: 'progress', description: 'the update\'s request id and step.' }],
4964
+ },
4339
4965
  {
4340
4966
  name: 'plugin-market/changed',
4341
4967
  mode: 'emit',
@@ -4352,6 +4978,14 @@ export const EVENT_API = [
4352
4978
  description: 'Durable task set changed; clients refetch global task and Session-active catalogs.',
4353
4979
  parameters: [],
4354
4980
  },
4981
+ {
4982
+ name: 'schedule/resolve-agent',
4983
+ mode: 'waterfall',
4984
+ signature: '\'schedule/resolve-agent\'(sessionId: SessionId, next: () => Promise<Agent>): Promise<Agent>',
4985
+ summary: 'Restore a reminder\'s Session through its embedding\'s owning controller.',
4986
+ description: 'Restore a reminder\'s Session through its embedding\'s owning controller. Call next() to use the Web Session controller.',
4987
+ parameters: [{ name: 'sessionId', description: 'Original Session receiving the reminder.' }],
4988
+ },
4355
4989
  {
4356
4990
  name: 'session-telemetry/record',
4357
4991
  mode: 'waterfall',
@@ -4364,8 +4998,8 @@ export const EVENT_API = [
4364
4998
  name: 'session/created',
4365
4999
  mode: 'emit',
4366
5000
  signature: '\'session/created\'(this: Scoped<Session>, session: Session): void',
4367
- summary: 'Creation announcement during session publication.',
4368
- description: 'Creation announcement during session publication. A synchronous throw vetoes and rolls back with a paired disposal; detach requested during dispatch is deferred. A returned-promise rejection is logged but cannot retroactively veto this synchronous boundary. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only sessions entered through that agent\'s context.',
5001
+ summary: 'Read-only creation announcement after store entry.',
5002
+ description: 'Read-only creation announcement after store entry. New events reject until every synchronous listener has returned successfully. A synchronous throw vetoes creation and rolls back with a paired disposal; detach requested during dispatch is deferred. A returned-promise rejection is logged but cannot retroactively veto this synchronous boundary. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only sessions entered through that agent\'s context.',
4369
5003
  parameters: [{ name: 'session', description: 'the session just entered and announced.' }],
4370
5004
  },
4371
5005
  {
@@ -4443,9 +5077,9 @@ export const EVENT_API = [
4443
5077
  {
4444
5078
  name: 'system-prompt/assemble',
4445
5079
  mode: 'waterfall',
4446
- signature: '\'system-prompt/assemble\'(this: Scoped<SystemPrompt>, assembly: PromptAssembly, context: AssembleContext, next: () => Promise<PromptAssembly>): Promise<PromptAssembly>',
4447
- summary: 'Expert waterfall over the assembled sections, contexts, tools, and variables.',
4448
- description: 'Expert waterfall over the assembled sections, contexts, tools, and variables. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): scoped listeners receive only that scope\'s assemblies. The returned value is authoritative. A supplied signal controls only this explicit assembly request and must not be retained to control later turns. A registered complete section is restored after this waterfall, so listeners cannot add to or replace that scope\'s system prompt.',
5080
+ signature: '\'system-prompt/assemble\'(this: Scoped<SystemPrompt>, assembly: PromptPresentation, context: AssembleContext, next: () => Promise<PromptPresentation>): Promise<PromptPresentation>',
5081
+ summary: 'Presentation waterfall over assembled sections, contexts, and variables.',
5082
+ description: 'Presentation waterfall over assembled sections, contexts, and variables. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): scoped listeners receive only that scope\'s assemblies. The returned text is authoritative; tool declarations remain provider-owned. A supplied signal controls only this explicit assembly request and must not be retained to control later turns. A registered complete section is restored after this waterfall, so listeners cannot add to or replace that scope\'s system prompt.',
4449
5083
  parameters: [{ name: 'assembly', description: 'the mutable assembly built from registered providers.' }, { name: 'context', description: 'the caller\'s per-assembly context.' }],
4450
5084
  },
4451
5085
  {
@@ -4460,14 +5094,14 @@ export const EVENT_API = [
4460
5094
  name: 'tools/change',
4461
5095
  mode: 'emit',
4462
5096
  signature: '\'tools/change\'(): void',
4463
- summary: 'A tool was registered or unregistered, or a scoped restriction changed (the available tool set changed — possibly for one scope only).',
4464
- description: 'A tool was registered or unregistered, or a scoped restriction changed (the available tool set changed — possibly for one scope only). An UNFILTERED registry-subject notification, deliberately not scope-filtered dispatch: a global change concerns every agent\'s next assembly, so a scoped listener subscribing here sees every change, not just its own scope\'s.',
5097
+ summary: 'A tool was registered or unregistered, or a scoped restriction changed.',
5098
+ description: 'A tool was registered or unregistered, or a scoped restriction changed. Unfiltered registry notification: scoped listeners receive changes from every scope because a global contribution can affect every agent\'s next assembly.',
4465
5099
  parameters: [],
4466
5100
  },
4467
5101
  {
4468
5102
  name: 'tools/execute',
4469
5103
  mode: 'waterfall',
4470
- signature: '\'tools/execute\'(this: Scoped<ToolRuntime>, exec: ToolDispatchExecution, next: () => Promise<ToolExecutionResult>): Promise<ToolExecutionResult>',
5104
+ signature: '\'tools/execute\'(this: Scoped<ToolsService>, exec: ToolDispatchExecution, next: () => Promise<ToolExecutionResult>): Promise<ToolExecutionResult>',
4471
5105
  summary: 'Around-dispatch waterfall for timeout, retry, or metrics.',
4472
5106
  description: 'Around-dispatch waterfall for timeout, retry, or metrics. `next()` returns a normalized result; wrappers may change only `exec.signal`, while call identity remains immutable. The registry re-fuses the original caller signal before the body, so replacement cannot detach caller cancellation; wrappers must still restore their signal and reach quiescence. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent\'s calls.',
4473
5107
  parameters: [{ name: 'exec', description: 'the allowed call about to dispatch (name, parsed arguments, caller agent, signal).' }],
@@ -4475,7 +5109,7 @@ export const EVENT_API = [
4475
5109
  {
4476
5110
  name: 'tools/post-execute',
4477
5111
  mode: 'waterfall',
4478
- signature: '\'tools/post-execute\'(this: Scoped<ToolRuntime>, exec: ToolExecution, result: Readonly<ToolExecutionResult>, next: () => Promise<PostToolDecision>): Promise<PostToolDecision>',
5112
+ signature: '\'tools/post-execute\'(this: Scoped<ToolsService>, exec: ToolExecution, result: Readonly<ToolExecutionResult>, next: () => Promise<PostToolDecision>): Promise<PostToolDecision>',
4479
5113
  summary: 'Accept, replace, enrich, or block a normalized dispatch result.',
4480
5114
  description: 'Accept, replace, enrich, or block a normalized dispatch result. `next()` accepts it unchanged; thrown tools still reach this waterfall as errors. Async listeners must observe `exec.signal`; after they settle, caller cancellation replaces only a successful accepted outcome with the code selected by whether the tool body was invoked. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent\'s calls.',
4481
5115
  parameters: [{ name: 'exec', description: 'the call that just ran (name, parsed arguments, caller agent).' }, { name: 'result', description: 'the dispatch outcome a listener may accept, replace, or block.' }],
@@ -4483,7 +5117,7 @@ export const EVENT_API = [
4483
5117
  {
4484
5118
  name: 'tools/pre-execute',
4485
5119
  mode: 'waterfall',
4486
- signature: '\'tools/pre-execute\'(this: Scoped<ToolRuntime>, exec: ToolExecution, next: () => Promise<PreToolDecision>): Promise<PreToolDecision>',
5120
+ signature: '\'tools/pre-execute\'(this: Scoped<ToolsService>, exec: ToolExecution, next: () => Promise<PreToolDecision>): Promise<PreToolDecision>',
4487
5121
  summary: 'Allow, deny, cancel, or ask before dispatch.',
4488
5122
  description: 'Allow, deny, cancel, or ask before dispatch. `next()` delegates to allow; `cancel` selects the canonical pre-dispatch cancellation result, and missing approval support turns `ask` into denial. Async gates must observe `exec.signal`; the registry rechecks cancellation after they settle but never abandons their promise. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent\'s calls.',
4489
5123
  parameters: [{ name: 'exec', description: 'the pending call (name, parsed arguments, caller agent).' }],
@@ -4491,7 +5125,7 @@ export const EVENT_API = [
4491
5125
  {
4492
5126
  name: 'tools/ptc-dispatch-log',
4493
5127
  mode: 'waterfall',
4494
- signature: '\'tools/ptc-dispatch-log\'(this: Scoped<ToolRuntime>, dispatch: PtcDispatchLog, next: () => Promise<ContentBlock[]>): Promise<ContentBlock[]>',
5128
+ signature: '\'tools/ptc-dispatch-log\'(this: Scoped<ToolsService>, dispatch: PtcDispatchLog, next: () => Promise<ContentBlock[]>): Promise<ContentBlock[]>',
4495
5129
  summary: 'Allow a listener to replace content in the DURABLE LOG COPY of one `run_code` sub-dispatch outcome before the bridge appends its `tool/ptc-dispatch` event.',
4496
5130
  description: 'Allow a listener to replace content in the DURABLE LOG COPY of one `run_code` sub-dispatch outcome before the bridge appends its `tool/ptc-dispatch` event. `next()` keeps the content unchanged; a listener may return replacement blocks (e.g. the spill policy\'s preview + locator for an oversized text result). Only the logged copy is affected — the program already received the complete value, and the model sees neither. A throwing listener is contained: the bridge falls back to logging the original settled content. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent\'s dispatches.',
4497
5131
  parameters: [{ name: 'dispatch', description: 'the parent execution, sub-call identity, and the settled content to log.' }],
@@ -4499,7 +5133,7 @@ export const EVENT_API = [
4499
5133
  {
4500
5134
  name: 'tools/result',
4501
5135
  mode: 'emit',
4502
- signature: '\'tools/result\'(this: Scoped<ToolRuntime>, exec: Readonly<ToolExecution>, result: Readonly<ToolExecutionResult>): undefined',
5136
+ signature: '\'tools/result\'(this: Scoped<ToolsService>, exec: Readonly<ToolExecution>, result: Readonly<ToolExecutionResult>): undefined',
4503
5137
  summary: 'Observe the frozen, lossless-JSON final outcome.',
4504
5138
  description: 'Observe the frozen, lossless-JSON final outcome. Listener failures are contained. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): keyed by `exec.agent`.',
4505
5139
  parameters: [{ name: 'exec', description: 'the execution object that traversed the pipeline.' }, { name: 'result', description: 'a deep-frozen snapshot of the final returned result.' }],
@@ -4515,10 +5149,10 @@ export const EVENT_API = [
4515
5149
  {
4516
5150
  name: 'webserver/index-inject',
4517
5151
  mode: 'emit',
4518
- signature: '\'webserver/index-inject\'(table: IndexInjection[]): void',
4519
- summary: 'Collect the structured index injection table.',
4520
- description: 'Collect the structured index injection table. Emitted on every index render and every worker boot-payload request; listeners push their current rows, so a row\'s data is read fresh at emit time.',
4521
- parameters: [{ name: 'table', description: 'Mutable row table; listeners append in activation order.' }],
5152
+ signature: '\'webserver/index-inject\'(table: IndexInjection[], peer: PeerScope): void',
5153
+ summary: 'Collect the structured index injection table for the page `peer` speaks for.',
5154
+ description: 'Collect the structured index injection table for the page `peer` speaks for. Emitted on every index render and every worker boot-payload request; listeners push their current rows, so a row\'s data is read fresh at emit time.',
5155
+ parameters: [{ name: 'table', description: 'Mutable row table; listeners append in activation order.' }, { name: 'peer', description: 'The Peer the rendered page speaks for.' }],
4522
5156
  },
4523
5157
  {
4524
5158
  name: 'workflow/agent-end',
@@ -4627,6 +5261,38 @@ export const TYPE_API = [
4627
5261
  name: 'AccountWallet',
4628
5262
  declaration: 'export interface AccountWallet {\n readonly currency: \'CNY\' | \'USD\';\n readonly balance: string;\n}',
4629
5263
  },
5264
+ {
5265
+ name: 'ActionCardDecision',
5266
+ declaration: 'export interface ActionCardDecision {\n readonly callId: ToolCallId;\n readonly action: string;\n readonly phase: string;\n readonly data?: ActionCardFields | undefined;\n}',
5267
+ },
5268
+ {
5269
+ name: 'ActionCardFields',
5270
+ declaration: 'export type ActionCardFields = Readonly<Record<string, JsonValue>>;',
5271
+ },
5272
+ {
5273
+ name: 'ActionCardKind',
5274
+ declaration: 'export interface ActionCardKind<Details> {\n readonly action: string;\n readonly skill: string;\n readonly invitation: string;\n readonly details: ZodType<Details>;\n readonly verbs: Readonly<Record<string, ActionCardVerb>>;\n readonly openPhases?: readonly string[];\n readonly statusGuidance?: string;\n readonly statusFields?: readonly string[];\n dismissal?(proposal: ActionCardProposalOf<Details>, payload: ActionCardFields | undefined): ActionCardFields | undefined;\n reconcile?(agent: Agent, proposal: ActionCardProposalOf<Details>): Promise<void>;\n act(agent: Agent, proposal: ActionCardProposalOf<Details>, verb: string, payload: ActionCardFields | undefined): Promise<ActionCardResult>;\n}',
5275
+ },
5276
+ {
5277
+ name: 'ActionCardProposal',
5278
+ declaration: 'export interface ActionCardProposal {\n readonly callId: ToolCallId;\n readonly turn: number;\n readonly action: string;\n readonly title: string;\n readonly brief: string;\n readonly details: ActionCardFields;\n}',
5279
+ },
5280
+ {
5281
+ name: 'ActionCardProposalOf',
5282
+ declaration: 'export type ActionCardProposalOf<Details> = Omit<ActionCardProposal, \'details\'> & {\n readonly details: Details;\n};',
5283
+ },
5284
+ {
5285
+ name: 'ActionCardResult',
5286
+ declaration: 'export type ActionCardResult = {\n readonly status: \'accepted\';\n} | {\n readonly status: \'settled\';\n readonly decision: ActionCardDecision;\n} | {\n readonly status: \'refused\';\n readonly reason: string;\n} | {\n readonly status: \'unconfirmed\';\n readonly reason: string;\n};',
5287
+ },
5288
+ {
5289
+ name: 'ActionCardVerb',
5290
+ declaration: 'export interface ActionCardVerb {\n readonly global?: true;\n readonly writes?: true;\n}',
5291
+ },
5292
+ {
5293
+ name: 'ActionCardView',
5294
+ declaration: 'export interface ActionCardView {\n readonly proposals: Readonly<Record<string, ActionCardProposal>>;\n readonly decisions: Readonly<Record<string, ActionCardDecision>>;\n}',
5295
+ },
4630
5296
  {
4631
5297
  name: 'AdapterRegistrationHandle',
4632
5298
  declaration: 'export interface AdapterRegistrationHandle {\n (): void;\n replace(providers: string[]): void;\n}',
@@ -4657,7 +5323,7 @@ export const TYPE_API = [
4657
5323
  },
4658
5324
  {
4659
5325
  name: 'AgentOptions',
4660
- declaration: 'export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId;\n maxTokens?: number;\n}',
5326
+ declaration: 'export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId | undefined;\n maxTokens?: number;\n}',
4661
5327
  },
4662
5328
  {
4663
5329
  name: 'AgentPresetComposition',
@@ -4761,7 +5427,7 @@ export const TYPE_API = [
4761
5427
  },
4762
5428
  {
4763
5429
  name: 'AskUserQuestionIntent',
4764
- declaration: 'export type AskUserQuestionIntent = {\n kind: \'plan-review\';\n approve: string;\n callId?: ToolCallId;\n};',
5430
+ declaration: 'export type AskUserQuestionIntent = {\n kind: \'plan-review\';\n approve: string;\n callId?: ToolCallId;\n} | {\n kind: \'approval\';\n approve: string;\n reject: string;\n always?: string;\n subject?: {\n name: string;\n icon?: string;\n };\n display?: {\n question: {\n en: string;\n [locale: string]: string;\n };\n detail?: {\n en: string;\n [locale: string]: string;\n };\n approve?: {\n en: string;\n [locale: string]: string;\n };\n };\n};',
4765
5431
  },
4766
5432
  {
4767
5433
  name: 'AskUserQuestionItem',
@@ -4817,7 +5483,7 @@ export const TYPE_API = [
4817
5483
  },
4818
5484
  {
4819
5485
  name: 'AttachmentAdmissionPart',
4820
- declaration: 'export type AttachmentAdmissionPart = PromptContentPart | {\n readonly type: \'file\';\n readonly attachment: FileAttachmentRef;\n};',
5486
+ declaration: 'export type AttachmentAdmissionPart = PromptContentPart | {\n readonly type: \'file\';\n readonly attachment: FileAttachmentRef;\n} | {\n readonly type: \'image\';\n readonly attachment: ImageAttachmentRef;\n readonly encodedBytes: number;\n};',
4821
5487
  },
4822
5488
  {
4823
5489
  name: 'AttachmentError',
@@ -4895,6 +5561,10 @@ export const TYPE_API = [
4895
5561
  name: 'BashEnvVariableInfo',
4896
5562
  declaration: 'export interface BashEnvVariableInfo extends BashEnvVariable {\n contributor: string;\n key: DshEnvironmentKey;\n}',
4897
5563
  },
5564
+ {
5565
+ name: 'BindingOrigin',
5566
+ declaration: 'export type BindingOrigin = \'created\' | \'referenced\' | \'discovered\' | \'tracked\';',
5567
+ },
4898
5568
  {
4899
5569
  name: 'BoxProps',
4900
5570
  declaration: 'export interface BoxProps {\n readonly flexDirection?: \'row\' | \'column\' | undefined;\n readonly paddingX?: number | undefined;\n readonly paddingY?: number | undefined;\n readonly padding?: number | undefined;\n readonly gap?: number | undefined;\n readonly border?: boolean | string | undefined;\n readonly borderColor?: string | undefined;\n readonly children?: UiNode | undefined;\n}',
@@ -4911,9 +5581,13 @@ export const TYPE_API = [
4911
5581
  name: 'BrowserUseProviderName',
4912
5582
  declaration: 'export type BrowserUseProviderName = Branded<\'BrowserUseProviderName\'>;',
4913
5583
  },
5584
+ {
5585
+ name: 'BundleDetail',
5586
+ declaration: 'export type BundleDetail = {\n readonly status: \'found\';\n readonly origin: \'locale\' | \'readme\';\n readonly path: string;\n readonly markdown: string;\n} | {\n readonly status: \'none\';\n};',
5587
+ },
4914
5588
  {
4915
5589
  name: 'BundleInfo',
4916
- declaration: 'export interface BundleInfo {\n name: string;\n official: boolean;\n availability: \'installation\' | \'profile\' | \'missing\';\n installTarget?: {\n spec: string;\n version: string;\n };\n version?: string;\n meta?: PluginLocalizedMeta;\n description?: string;\n enabled: boolean;\n installed: boolean;\n source?: string;\n optional: boolean;\n removable: boolean;\n readOnlyReason?: ReadOnlyReason;\n error?: ManagementError;\n rows: BundleRowInfo[];\n overrides: string[];\n}',
5590
+ declaration: 'export interface BundleInfo {\n name: string;\n official: boolean;\n availability: \'installation\' | \'profile\' | \'missing\';\n installTarget?: {\n spec: string;\n version: string;\n };\n version?: string;\n meta?: PluginLocalizedMeta;\n description?: string;\n listedByDefault?: boolean;\n enabled: boolean;\n installed: boolean;\n source?: string;\n optional: boolean;\n removable: boolean;\n updatable: boolean;\n readOnlyReason?: ReadOnlyReason;\n error?: ManagementError;\n rows: BundleRowInfo[];\n overrides: string[];\n}',
4917
5591
  },
4918
5592
  {
4919
5593
  name: 'BundleRowInfo',
@@ -4923,10 +5597,50 @@ export const TYPE_API = [
4923
5597
  name: 'ButtonProps',
4924
5598
  declaration: 'export interface ButtonProps {\n readonly label: string;\n readonly hotkey?: string | undefined;\n readonly disabled?: boolean | undefined;\n readonly onPress?: (() => unknown) | undefined;\n}',
4925
5599
  },
5600
+ {
5601
+ name: 'ChangeRequestCheck',
5602
+ declaration: 'export interface ChangeRequestCheck {\n readonly name: string;\n readonly state: CheckState;\n readonly url: string | null;\n readonly workflow: string | null;\n readonly startedAt: string | null;\n readonly completedAt: string | null;\n}',
5603
+ },
5604
+ {
5605
+ name: 'ChangeRequestKey',
5606
+ declaration: 'export type ChangeRequestKey = Branded<\'ChangeRequestKey\'>;',
5607
+ },
5608
+ {
5609
+ name: 'ChangeRequestListener',
5610
+ declaration: 'export type ChangeRequestListener = (update: ChangeRequestUpdate) => void;',
5611
+ },
5612
+ {
5613
+ name: 'ChangeRequestRef',
5614
+ declaration: 'export interface ChangeRequestRef {\n readonly repository: ForgeRepository;\n readonly number: number;\n}',
5615
+ },
5616
+ {
5617
+ name: 'ChangeRequestSnapshot',
5618
+ declaration: 'export interface ChangeRequestSnapshot {\n readonly ref: ChangeRequestRef;\n readonly url: string;\n readonly title: string;\n readonly state: ChangeRequestState;\n readonly draft: boolean;\n readonly author: string | null;\n readonly headBranch: string;\n readonly headSha: string;\n readonly baseBranch: string;\n readonly additions: number;\n readonly deletions: number;\n readonly mergeability: Mergeability;\n readonly mergeReady: boolean;\n readonly mergeMethods: readonly MergeMethod[];\n readonly reviewDecision: ReviewDecision;\n readonly checks: readonly ChangeRequestCheck[];\n readonly checksRollup: ChecksRollup;\n readonly checksTruncated: boolean;\n readonly unresolvedThreads: number;\n readonly updatedAt: string;\n readonly closedAt: string | null;\n}',
5619
+ },
5620
+ {
5621
+ name: 'ChangeRequestState',
5622
+ declaration: 'export type ChangeRequestState = \'open\' | \'closed\' | \'merged\';',
5623
+ },
5624
+ {
5625
+ name: 'ChangeRequestUpdate',
5626
+ declaration: 'export type ChangeRequestUpdate = {\n readonly key: ChangeRequestKey;\n readonly fetchedAt: number;\n} & ({\n readonly snapshot: ChangeRequestSnapshot;\n} | {\n readonly failure: ForgeFailure;\n});',
5627
+ },
4926
5628
  {
4927
5629
  name: 'ChangeResult',
4928
5630
  declaration: 'export interface ChangeResult {\n changed: boolean;\n application: \'applied\' | \'restart-required\' | \'overridden\' | \'failed\' | \'cancelled\';\n restartReason?: RestartReason;\n stage: \'install\' | \'enable\' | \'remove\';\n target: string;\n enabled?: boolean;\n error?: ManagementError;\n warnings?: string[];\n packageResult?: PackageResult;\n bundle?: string;\n version?: string;\n pendingBuilds?: string[];\n approvedBuilds?: string[];\n registries?: Registry[];\n failedAt?: \'registry\' | \'spec-host\';\n}',
4929
5631
  },
5632
+ {
5633
+ name: 'ChecksRollup',
5634
+ declaration: 'export type ChecksRollup = \'none\' | \'pending\' | \'success\' | \'failure\';',
5635
+ },
5636
+ {
5637
+ name: 'CheckState',
5638
+ declaration: 'export type CheckState = \'pending\' | \'success\' | \'failure\' | \'neutral\' | \'skipped\' | \'cancelled\';',
5639
+ },
5640
+ {
5641
+ name: 'ClaimOutcome',
5642
+ declaration: 'export interface ClaimOutcome {\n readonly claimed: number;\n readonly skipped: number;\n}',
5643
+ },
4930
5644
  {
4931
5645
  name: 'ClientArtifactBaseline',
4932
5646
  declaration: 'export interface ClientArtifactBaseline {\n readonly path: string;\n readonly mtimeMs: number;\n readonly ctimeMs: number;\n readonly size: number;\n}',
@@ -5095,6 +5809,10 @@ export const TYPE_API = [
5095
5809
  name: 'ContentBlockType',
5096
5810
  declaration: 'export type ContentBlockType = keyof ContentBlockMap;',
5097
5811
  },
5812
+ {
5813
+ name: 'ContextPressureProjection',
5814
+ declaration: 'export interface ContextPressureProjection {\n pressureTokens?: number;\n projectedTokens?: number;\n contextWindow?: number;\n}',
5815
+ },
5098
5816
  {
5099
5817
  name: 'ContinuableCreateRequest',
5100
5818
  declaration: 'export interface ContinuableCreateRequest {\n readonly cwd: string;\n readonly sessionId: SessionId;\n readonly parent: Agent;\n readonly signal: AbortSignal;\n}',
@@ -5183,6 +5901,10 @@ export const TYPE_API = [
5183
5901
  name: 'CreateAgentOptions',
5184
5902
  declaration: 'export interface CreateAgentOptions {\n readonly sessionId: SessionId;\n readonly parentAgent?: Agent;\n readonly meta?: {\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly isSeeded?: boolean;\n readonly origin?: \'subagent\';\n readonly delegationDepth?: number;\n readonly agentPreset?: string;\n };\n readonly inheritedEventCount?: SessionLogOffset;\n readonly seed?: readonly SessionEvent[];\n readonly agentOptions?: AgentOptions;\n readonly signal?: AbortSignal;\n readonly setup?: AgentSetup;\n}',
5185
5903
  },
5904
+ {
5905
+ name: 'CreatedShare',
5906
+ declaration: 'export interface CreatedShare {\n readonly link: string;\n readonly shareId: string;\n readonly sessionId: string;\n readonly sessionMode: \'view\' | \'write\';\n readonly access: ShareAccess;\n}',
5907
+ },
5186
5908
  {
5187
5909
  name: 'CreatedWorktree',
5188
5910
  declaration: 'export interface CreatedWorktree {\n path: string;\n branch: string;\n baseCommit: string;\n repositoryRoot: string;\n}',
@@ -5199,10 +5921,18 @@ export const TYPE_API = [
5199
5921
  name: 'CreateSessionOptions',
5200
5922
  declaration: 'export interface CreateSessionOptions {\n readonly seed?: readonly SessionEvent[];\n readonly inheritedEventCount?: SessionLogOffset;\n readonly meta?: {\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly createdAt?: number;\n readonly isSeeded?: boolean;\n readonly origin?: \'subagent\';\n readonly delegationDepth?: number;\n readonly agentPreset?: string;\n };\n}',
5201
5923
  },
5924
+ {
5925
+ name: 'CreateShareRequest',
5926
+ declaration: 'export interface CreateShareRequest {\n readonly sessionId: string;\n readonly sessionTitle?: string;\n readonly accessMode?: \'open\' | \'selected\';\n readonly ttlMinutes?: number;\n readonly allowedSubjectIds?: readonly string[];\n readonly allowsFork?: boolean;\n readonly sessionMode?: \'view\' | \'write\';\n}',
5927
+ },
5202
5928
  {
5203
5929
  name: 'CreateTeamTaskRequest',
5204
5930
  declaration: 'export interface CreateTeamTaskRequest {\n readonly subject: string;\n readonly description: string;\n readonly blockedBy?: readonly TeamTaskId[];\n readonly writeScopes?: readonly string[];\n}',
5205
5931
  },
5932
+ {
5933
+ name: 'CreateWorktreePhase',
5934
+ declaration: 'export type CreateWorktreePhase = \'prepare\' | \'checkout\';',
5935
+ },
5206
5936
  {
5207
5937
  name: 'CreateWorktreeRequest',
5208
5938
  declaration: 'export interface CreateWorktreeRequest {\n name?: string;\n from?: string;\n}',
@@ -5239,6 +5969,30 @@ export const TYPE_API = [
5239
5969
  name: 'CronScheduleRecord',
5240
5970
  declaration: 'export interface CronScheduleRecord {\n readonly id: ScheduleId;\n readonly kind: \'cron\';\n readonly title: string;\n readonly prompt: string;\n readonly expression: string;\n readonly timeZone: string;\n readonly scheduledAt: string;\n}',
5241
5971
  },
5972
+ {
5973
+ name: 'CuaApplicationGrant',
5974
+ declaration: 'export interface CuaApplicationGrant {\n id: CuaApplicationId;\n name: string;\n executablePath?: string | undefined;\n}',
5975
+ },
5976
+ {
5977
+ name: 'CuaApplicationId',
5978
+ declaration: 'export type CuaApplicationId = Branded<\'CuaApplicationId\'>;',
5979
+ },
5980
+ {
5981
+ name: 'CuaApplicationState',
5982
+ declaration: 'export interface CuaApplicationState {\n allowedApps: readonly CuaApplicationGrant[];\n blockedApps: readonly CuaApplicationGrant[];\n persistentAvailable: boolean;\n}',
5983
+ },
5984
+ {
5985
+ name: 'CuaPermissionProcess',
5986
+ declaration: 'export interface CuaPermissionProcess {\n pid: number;\n path?: string | undefined;\n name?: string | undefined;\n}',
5987
+ },
5988
+ {
5989
+ name: 'CuaSystemPermission',
5990
+ declaration: 'export type CuaSystemPermission = \'accessibility\' | \'screenRecording\';',
5991
+ },
5992
+ {
5993
+ name: 'CuaSystemPermissionState',
5994
+ declaration: 'export interface CuaSystemPermissionState {\n accessibility: boolean;\n screenRecording: boolean;\n helper: CuaPermissionProcess;\n parent: CuaPermissionProcess;\n launchApplication?: {\n name: string;\n path: string;\n icon?: string | undefined;\n } | undefined;\n}',
5995
+ },
5242
5996
  {
5243
5997
  name: 'DailyInput',
5244
5998
  declaration: 'export interface DailyInput {\n readonly time: string;\n readonly time_zone: string;\n}',
@@ -5451,6 +6205,122 @@ export const TYPE_API = [
5451
6205
  name: 'FinishReasonMap',
5452
6206
  declaration: 'export interface FinishReasonMap {\n \'stop\': {\n kind: \'stop\';\n };\n \'tool-calls\': {\n kind: \'tool-calls\';\n };\n \'max-tokens\': {\n kind: \'max-tokens\';\n };\n \'aborted\': {\n kind: \'aborted\';\n failure: LlmFailure;\n };\n \'error\': {\n kind: \'error\';\n failure: LlmFailure;\n };\n}',
5453
6207
  },
6208
+ {
6209
+ name: 'ForgeActionFailure',
6210
+ declaration: 'export interface ForgeActionFailure {\n readonly code: \'unauthenticated\' | \'stale\' | \'failed\';\n readonly message: string;\n}',
6211
+ },
6212
+ {
6213
+ name: 'ForgeBranches',
6214
+ declaration: 'export interface ForgeBranches {\n readonly current: string | null;\n readonly branches: readonly string[];\n}',
6215
+ },
6216
+ {
6217
+ name: 'ForgeChangedFile',
6218
+ declaration: 'export interface ForgeChangedFile {\n readonly path: string;\n readonly additions: number;\n readonly deletions: number;\n readonly binary: boolean;\n}',
6219
+ },
6220
+ {
6221
+ name: 'ForgeChangeRequestDiff',
6222
+ declaration: 'export interface ForgeChangeRequestDiff {\n readonly headSha: string;\n readonly files: readonly ForgeDiffFile[];\n readonly localAhead: number | null;\n readonly fileUrls: Readonly<Record<string, string>>;\n}',
6223
+ },
6224
+ {
6225
+ name: 'ForgeChangeRequestListState',
6226
+ declaration: 'export type ForgeChangeRequestListState = Pick<ChangeRequestSnapshot, \'url\' | \'title\' | \'state\' | \'draft\' | \'checksRollup\' | \'reviewDecision\' | \'mergeability\'> & {\n readonly number: number;\n};',
6227
+ },
6228
+ {
6229
+ name: 'ForgeChangeRequestStatesFrame',
6230
+ declaration: 'export type ForgeChangeRequestStatesFrame = {\n readonly type: \'baseline\';\n readonly states: readonly ForgeChangeRequestListState[];\n} | {\n readonly type: \'changed\';\n readonly states: readonly ForgeChangeRequestListState[];\n};',
6231
+ },
6232
+ {
6233
+ name: 'ForgeCheckout',
6234
+ declaration: 'export interface ForgeCheckout {\n readonly root: string;\n readonly branch: string | null;\n readonly linked: boolean;\n readonly commit: string | null;\n}',
6235
+ },
6236
+ {
6237
+ name: 'ForgeCheckoutState',
6238
+ declaration: 'export type ForgeCheckoutState = {\n readonly state: \'pending\';\n} | {\n readonly state: \'none\';\n} | {\n readonly state: \'failed\';\n readonly message: string;\n} | {\n readonly state: \'ready\';\n readonly checkout: ForgeCheckout;\n};',
6239
+ },
6240
+ {
6241
+ name: 'ForgeDiffFile',
6242
+ declaration: 'export interface ForgeDiffFile {\n readonly path: string;\n readonly previousPath: string | null;\n readonly status: ForgeDiffStatus;\n readonly binary: boolean;\n readonly oversized: boolean;\n readonly untracked: boolean;\n readonly additions: number;\n readonly deletions: number;\n readonly hunks: readonly ForgeDiffHunk[];\n}',
6243
+ },
6244
+ {
6245
+ name: 'ForgeDiffHunk',
6246
+ declaration: 'export interface ForgeDiffHunk {\n readonly oldStart: number;\n readonly oldLines: number;\n readonly newStart: number;\n readonly newLines: number;\n readonly lines: readonly string[];\n}',
6247
+ },
6248
+ {
6249
+ name: 'ForgeDiffStatus',
6250
+ declaration: 'export type ForgeDiffStatus = \'added\' | \'deleted\' | \'modified\' | \'renamed\';',
6251
+ },
6252
+ {
6253
+ name: 'ForgeFailure',
6254
+ declaration: 'export interface ForgeFailure {\n readonly code: \'not-found\' | \'unauthenticated\' | \'too-large\' | \'unavailable\';\n readonly message: string;\n}',
6255
+ },
6256
+ {
6257
+ name: 'ForgeLocalChanges',
6258
+ declaration: 'export interface ForgeLocalChanges {\n readonly base: string;\n readonly files: readonly ForgeChangedFile[];\n}',
6259
+ },
6260
+ {
6261
+ name: 'ForgeLocalDiff',
6262
+ declaration: 'export interface ForgeLocalDiff {\n readonly base: string | null;\n readonly files: readonly ForgeDiffFile[];\n readonly omitted: number;\n}',
6263
+ },
6264
+ {
6265
+ name: 'ForgeLocalScope',
6266
+ declaration: 'export type ForgeLocalScope = {\n readonly kind: \'branch\';\n} | {\n readonly kind: \'uncommitted\';\n} | {\n readonly kind: \'unstaged\';\n} | {\n readonly kind: \'staged\';\n};',
6267
+ },
6268
+ {
6269
+ name: 'ForgeMissingWorktree',
6270
+ declaration: 'export interface ForgeMissingWorktree {\n readonly branchExists: boolean | null;\n}',
6271
+ },
6272
+ {
6273
+ name: 'ForgePanelChangeRequest',
6274
+ declaration: 'export interface ForgePanelChangeRequest extends SessionChangeRequest {\n readonly snapshot: ChangeRequestSnapshot | null;\n}',
6275
+ },
6276
+ {
6277
+ name: 'ForgePanelState',
6278
+ declaration: 'export interface ForgePanelState {\n readonly directory: string;\n readonly checkout: ForgeCheckoutState;\n readonly repository: ForgeRepository | null;\n readonly readiness: ForgeReadiness | null;\n readonly changeRequests: readonly ForgePanelChangeRequest[];\n readonly worktree: ForgePanelWorktree;\n readonly local: ForgeLocalChanges | null;\n}',
6279
+ },
6280
+ {
6281
+ name: 'ForgePanelWorktree',
6282
+ declaration: 'export interface ForgePanelWorktree {\n readonly editable: boolean;\n readonly blocker: ForgeWorktreeBlocker | null;\n readonly request: ForgeWorktreeRequest | null;\n readonly created: ForgeSessionWorktree | null;\n readonly creation: ForgeWorktreeCreation | null;\n readonly failure: ForgeWorktreeFailure | null;\n readonly missing: ForgeMissingWorktree | null;\n readonly restoration: ForgeWorktreeRestoration | null;\n readonly waiting: ForgeWorktreeWaiting | null;\n}',
6283
+ },
6284
+ {
6285
+ name: 'ForgeProvider',
6286
+ declaration: 'export interface ForgeProvider {\n readonly forge: string;\n repositoryFromRemote(url: string): ForgeRepository | undefined;\n changeRequestFromUrl(url: string): ChangeRequestRef | undefined;\n changeRequestUrl(ref: ChangeRequestRef): string;\n fetch(refs: readonly ChangeRequestRef[], signal: AbortSignal): Promise<ReadonlyMap<ChangeRequestKey, ChangeRequestSnapshot | ForgeFailure>>;\n findByHead(repository: ForgeRepository, branch: string, signal: AbortSignal): Promise<readonly ChangeRequestRef[]>;\n readiness(host: string, signal: AbortSignal): Promise<ForgeReadiness>;\n markReady(ref: ChangeRequestRef, signal: AbortSignal): Promise<ForgeActionFailure | undefined>;\n merge(ref: ChangeRequestRef, request: MergeRequest, signal: AbortSignal): Promise<ForgeActionFailure | undefined>;\n diff(ref: ChangeRequestRef, signal: AbortSignal): Promise<string | ForgeFailure>;\n fileText(ref: ChangeRequestRef, commit: string, path: string, signal: AbortSignal): Promise<string | ForgeFailure>;\n fileUrl(ref: ChangeRequestRef, commit: string, path: string): string;\n}',
6287
+ },
6288
+ {
6289
+ name: 'ForgeReadiness',
6290
+ declaration: 'export interface ForgeReadiness {\n readonly state: \'ready\' | \'unauthenticated\' | \'unavailable\';\n readonly message: string | null;\n}',
6291
+ },
6292
+ {
6293
+ name: 'ForgeRepository',
6294
+ declaration: 'export interface ForgeRepository {\n readonly forge: string;\n readonly host: string;\n readonly owner: string;\n readonly name: string;\n}',
6295
+ },
6296
+ {
6297
+ name: 'ForgeSessionWorktree',
6298
+ declaration: 'export interface ForgeSessionWorktree {\n readonly path: string;\n readonly branch: string;\n readonly from: string | null;\n readonly baseCommit: string;\n readonly repositoryRoot: string;\n}',
6299
+ },
6300
+ {
6301
+ name: 'ForgeWorktreeBlocker',
6302
+ declaration: 'export type ForgeWorktreeBlocker = \'not-git\' | \'outside-writable-root\' | \'read-only\';',
6303
+ },
6304
+ {
6305
+ name: 'ForgeWorktreeCreation',
6306
+ declaration: 'export interface ForgeWorktreeCreation {\n readonly phase: \'prepare\' | \'checkout\';\n readonly branch: string;\n readonly from: string | null;\n readonly held: boolean;\n}',
6307
+ },
6308
+ {
6309
+ name: 'ForgeWorktreeFailure',
6310
+ declaration: 'export interface ForgeWorktreeFailure {\n readonly branch: string | null;\n readonly from: string | null;\n readonly phase: \'prepare\' | \'checkout\';\n readonly message: string;\n}',
6311
+ },
6312
+ {
6313
+ name: 'ForgeWorktreeRequest',
6314
+ declaration: 'export interface ForgeWorktreeRequest {\n readonly from: string | null;\n}',
6315
+ },
6316
+ {
6317
+ name: 'ForgeWorktreeRestoration',
6318
+ declaration: 'export interface ForgeWorktreeRestoration {\n readonly phase: \'prepare\' | \'checkout\';\n}',
6319
+ },
6320
+ {
6321
+ name: 'ForgeWorktreeWaiting',
6322
+ declaration: 'export type ForgeWorktreeWaiting = \'creation\' | \'restoration\';',
6323
+ },
5454
6324
  {
5455
6325
  name: 'FrequencyTooHighError',
5456
6326
  declaration: 'export interface FrequencyTooHighError {\n readonly code: \'frequency_too_high\';\n readonly message: string;\n}',
@@ -5607,6 +6477,10 @@ export const TYPE_API = [
5607
6477
  name: 'ImageRequestTarget',
5608
6478
  declaration: 'export interface ImageRequestTarget {\n width: number;\n height: number;\n maxBytes: number;\n}',
5609
6479
  },
6480
+ {
6481
+ name: 'ImageUploadValue',
6482
+ declaration: 'export interface ImageUploadValue {\n readonly receiptId: FileUploadReceiptId;\n readonly image: ImageAttachmentRef;\n}',
6483
+ },
5610
6484
  {
5611
6485
  name: 'ImageVariantId',
5612
6486
  declaration: 'export type ImageVariantId = Branded<\'ImageVariantId\'>;',
@@ -5821,16 +6695,20 @@ export const TYPE_API = [
5821
6695
  },
5822
6696
  {
5823
6697
  name: 'KvTable',
5824
- declaration: 'export interface KvTable<K extends string, V> {\n get(key: K): V | undefined;\n entries(): IterableIterator<[\n K,\n V\n ]>;\n keys(): IterableIterator<K>;\n readonly size: number;\n put(key: K, value: V): Promise<void>;\n delete(key: K): Promise<boolean>;\n update(key: K, fn: (current: V) => V): Promise<V>;\n}',
6698
+ declaration: 'export interface KvTable<K extends string, V> {\n get(key: K): V | undefined;\n entries(): IterableIterator<[\n K,\n V\n ]>;\n keys(): IterableIterator<K>;\n readonly size: number;\n put(key: K, value: V): Promise<void>;\n delete(key: K): Promise<boolean>;\n deleteMany(keys: readonly K[]): Promise<number>;\n update(key: K, fn: (current: V) => V): Promise<V>;\n}',
5825
6699
  },
5826
6700
  {
5827
6701
  name: 'KvUnit',
5828
- declaration: 'export interface KvUnit {\n loadAll(): Promise<{\n tables: Record<string, Record<string, unknown>>;\n global: unknown;\n }>;\n putRecord(table: string, key: string, value: unknown): Promise<void>;\n deleteRecord(table: string, key: string): Promise<void>;\n backupRecord?(table: string, key: string): Promise<string>;\n setGlobal(value: unknown): Promise<void>;\n close(): Promise<void>;\n}',
6702
+ declaration: 'export interface KvUnit {\n loadAll(): Promise<{\n tables: Record<string, Record<string, unknown>>;\n global: unknown;\n }>;\n putRecord(table: string, key: string, value: unknown): Promise<void>;\n deleteRecord(table: string, key: string): Promise<void>;\n deleteRecords(table: string, keys: readonly string[]): Promise<void>;\n backupRecord?(table: string, key: string): Promise<string>;\n setGlobal(value: unknown): Promise<void>;\n close(): Promise<void>;\n}',
5829
6703
  },
5830
6704
  {
5831
6705
  name: 'KvUnitDescriptor',
5832
6706
  declaration: 'export interface KvUnitDescriptor {\n readonly name: string;\n readonly version: number;\n readonly tables: readonly string[];\n readonly hasGlobal: boolean;\n readonly layout?: \'single\' | \'per-record\';\n readonly compatibleVersions?: readonly number[];\n}',
5833
6707
  },
6708
+ {
6709
+ name: 'ListVersionsOptions',
6710
+ declaration: 'export interface ListVersionsOptions {\n readonly registry?: Registry;\n}',
6711
+ },
5834
6712
  {
5835
6713
  name: 'LlmAdapter',
5836
6714
  declaration: 'export abstract class LlmAdapter {\n providerInfo(provider: string): LlmProviderInfo;\n providerRetryPolicy(_provider: string): ResolvedRetryPolicy | undefined;\n imageRequestPricing(_provider: string, _model: string): LlmImageRequestPricing | undefined;\n imageRequestTarget(_provider: string, _model: string, image: ImageAttachmentRef): ImageRequestTarget;\n listModels(_provider: string): Promise<readonly LlmModelInfo[]>;\n resolveModel(provider: string, model: string, _signal?: AbortSignal): Promise<LlmResolvedModelInfo>;\n async prepareCall(provider: string, model: string, signal?: AbortSignal): Promise<PreparedAdapterCall>;\n abstract stream(options: GenerateOptions): AsyncIterable<StreamChunk>;\n}',
@@ -5871,6 +6749,14 @@ export const TYPE_API = [
5871
6749
  name: 'LlmImageRequestPricing',
5872
6750
  declaration: 'export interface LlmImageRequestPricing {\n priceImages(images: readonly ImageBlock[]): readonly LlmImageRequestPrice[];\n}',
5873
6751
  },
6752
+ {
6753
+ name: 'LlmModelBadge',
6754
+ declaration: 'export interface LlmModelBadge {\n text: LocalizedText;\n tone: LlmModelBadgeTone;\n}',
6755
+ },
6756
+ {
6757
+ name: 'LlmModelBadgeTone',
6758
+ declaration: 'export type LlmModelBadgeTone = \'neutral\' | \'info\' | \'success\' | \'warning\';',
6759
+ },
5874
6760
  {
5875
6761
  name: 'LlmModelContext',
5876
6762
  declaration: 'export interface LlmModelContext {\n contextWindow: number;\n}',
@@ -5881,7 +6767,7 @@ export const TYPE_API = [
5881
6767
  },
5882
6768
  {
5883
6769
  name: 'LlmModelInfo',
5884
- declaration: 'export interface LlmModelInfo {\n provider: string;\n id: string;\n name: string;\n description?: string;\n inputModalities?: readonly ModelModality[];\n}',
6770
+ declaration: 'export interface LlmModelInfo {\n provider: string;\n id: string;\n name: string;\n description?: string;\n inputModalities?: readonly ModelModality[];\n badge?: LlmModelBadge;\n}',
5885
6771
  },
5886
6772
  {
5887
6773
  name: 'LlmModelReasoningInfo',
@@ -5961,7 +6847,7 @@ export const TYPE_API = [
5961
6847
  },
5962
6848
  {
5963
6849
  name: 'ManagementError',
5964
- declaration: 'export interface ManagementError {\n code: ReadOnlyReason | \'unknown-plugin\' | \'invalid-spec\' | \'already-installed\' | \'ambiguous-install\' | \'not-bundle\' | \'not-removable\' | \'stop-profile\' | \'bundle-in-use\' | \'stale-approval\' | \'incompatible-version\' | \'operation-error\';\n diagnostic?: string;\n incompatible?: IncompatiblePlugin[];\n}',
6850
+ declaration: 'export interface ManagementError {\n code: ReadOnlyReason | \'unknown-plugin\' | \'invalid-spec\' | \'already-installed\' | \'ambiguous-install\' | \'not-bundle\' | \'not-removable\' | \'stop-profile\' | \'bundle-in-use\' | \'stale-approval\' | \'incompatible-version\' | \'unsupported-platform\' | \'operation-error\';\n diagnostic?: string;\n incompatible?: IncompatiblePlugin[];\n}',
5965
6851
  },
5966
6852
  {
5967
6853
  name: 'ManualCompactAgentContext',
@@ -6055,6 +6941,18 @@ export const TYPE_API = [
6055
6941
  name: 'McpResourceRequest',
6056
6942
  declaration: 'export type McpResourceRequest = {\n method: \'resources/list\' | \'resources/templates/list\';\n cursor?: string;\n} | {\n method: \'resources/read\';\n uri: string;\n};',
6057
6943
  },
6944
+ {
6945
+ name: 'Mergeability',
6946
+ declaration: 'export type Mergeability = \'mergeable\' | \'conflicting\' | \'unknown\';',
6947
+ },
6948
+ {
6949
+ name: 'MergeMethod',
6950
+ declaration: 'export type MergeMethod = \'merge\' | \'squash\' | \'rebase\';',
6951
+ },
6952
+ {
6953
+ name: 'MergeRequest',
6954
+ declaration: 'export interface MergeRequest {\n readonly method: MergeMethod;\n readonly headSha: string;\n}',
6955
+ },
6058
6956
  {
6059
6957
  name: 'Message',
6060
6958
  declaration: 'export type Message = MessageRoleMap[keyof MessageRoleMap];',
@@ -6161,7 +7059,7 @@ export const TYPE_API = [
6161
7059
  },
6162
7060
  {
6163
7061
  name: 'ModelCatalogModel',
6164
- declaration: 'export interface ModelCatalogModel {\n readonly id: string;\n readonly name: string;\n readonly description?: string;\n readonly reasoning?: ModelReasoning;\n}',
7062
+ declaration: 'export interface ModelCatalogModel {\n readonly id: string;\n readonly name: string;\n readonly description?: string;\n readonly reasoning?: ModelReasoning;\n readonly badge?: LlmModelBadge;\n}',
6165
7063
  },
6166
7064
  {
6167
7065
  name: 'ModelMessageSource',
@@ -6219,6 +7117,10 @@ export const TYPE_API = [
6219
7117
  name: 'NotFutureError',
6220
7118
  declaration: 'export interface NotFutureError {\n readonly code: \'not_future\';\n readonly message: string;\n}',
6221
7119
  },
7120
+ {
7121
+ name: 'NpmFileSource',
7122
+ declaration: 'export type NpmFileSource = \'jsdelivr\' | \'unpkg\' | \'npmmirror\';',
7123
+ },
6222
7124
  {
6223
7125
  name: 'ObjectJsonSchema',
6224
7126
  declaration: 'export type ObjectJsonSchema = JsonSchemaNode & {\n type: \'object\';\n};',
@@ -6271,6 +7173,30 @@ export const TYPE_API = [
6271
7173
  name: 'OTelEventScalar',
6272
7174
  declaration: 'export type OTelEventScalar = string | number | boolean;',
6273
7175
  },
7176
+ {
7177
+ name: 'OwnerIdentityRequest',
7178
+ declaration: 'export interface OwnerIdentityRequest {\n readonly relay?: string;\n}',
7179
+ },
7180
+ {
7181
+ name: 'OwnerIdentityState',
7182
+ declaration: 'export type OwnerIdentityState = \'verified\' | \'expired\' | \'unverified\' | \'relay-unsupported\';',
7183
+ },
7184
+ {
7185
+ name: 'OwnerIdentityStatus',
7186
+ declaration: 'export interface OwnerIdentityStatus {\n readonly state: OwnerIdentityState;\n readonly relay: string;\n readonly displayName?: string;\n readonly subjectId?: string;\n readonly avatarUrl?: string;\n readonly expiresAt?: string;\n readonly renewed?: boolean;\n readonly claim?: ClaimOutcome;\n}',
7187
+ },
7188
+ {
7189
+ name: 'OwnerRelayState',
7190
+ declaration: 'export interface OwnerRelayState {\n readonly configured?: string;\n readonly override?: string;\n readonly effective?: string;\n}',
7191
+ },
7192
+ {
7193
+ name: 'OwnerShareList',
7194
+ declaration: 'export interface OwnerShareList {\n readonly shares: readonly OwnerShareView[];\n}',
7195
+ },
7196
+ {
7197
+ name: 'OwnerShareView',
7198
+ declaration: 'export interface OwnerShareView {\n readonly shareId: string;\n readonly sessionId: string;\n readonly sessionTitle: string;\n readonly link: string;\n readonly createdAt: string;\n readonly expiresAt?: string;\n readonly allowsFork: boolean;\n readonly sessionMode: \'view\' | \'write\';\n readonly viewerCapabilities: readonly ShareCapabilityGroup[];\n readonly online: boolean;\n readonly access?: ShareAccess;\n}',
7199
+ },
6274
7200
  {
6275
7201
  name: 'PackageResult',
6276
7202
  declaration: 'export interface PackageResult {\n exitCode: number;\n output: string;\n truncated: boolean;\n logPath: string;\n kind?: PluginInstallFailureKind;\n timedOut?: boolean;\n incompatible?: IncompatiblePlugin[];\n}',
@@ -6307,6 +7233,10 @@ export const TYPE_API = [
6307
7233
  name: 'PendingModule',
6308
7234
  declaration: 'export interface PendingModule {\n url: string;\n reason: \'host-module\' | \'unmanaged-plugin\' | \'module-comparison\';\n}',
6309
7235
  },
7236
+ {
7237
+ name: 'PendingRemoteEventInfo',
7238
+ declaration: 'export interface PendingRemoteEventInfo {\n readonly event: string;\n readonly agentId: RemoteEventAgentId;\n}',
7239
+ },
6310
7240
  {
6311
7241
  name: 'PermissionCatalog',
6312
7242
  declaration: 'export interface PermissionCatalog {\n options: PresetOption[];\n defaultOptions: PresetOption[];\n defaultPreset: string;\n}',
@@ -6319,6 +7249,18 @@ export const TYPE_API = [
6319
7249
  name: 'PluginChange',
6320
7250
  declaration: 'export interface PluginChange {\n readonly reason: \'plugin\' | \'bundle\' | \'install\' | \'remove\';\n}',
6321
7251
  },
7252
+ {
7253
+ name: 'PluginDetail',
7254
+ declaration: 'export type PluginDetail = {\n readonly status: \'found\';\n readonly origin: PluginDetailOrigin;\n readonly markdown: string;\n readonly document: PluginDetailDocumentId;\n} | {\n readonly status: \'none\';\n};',
7255
+ },
7256
+ {
7257
+ name: 'PluginDetailDocumentId',
7258
+ declaration: 'export type PluginDetailDocumentId = Branded<\'PluginDetailDocumentId\'>;',
7259
+ },
7260
+ {
7261
+ name: 'PluginDetailOrigin',
7262
+ declaration: 'export type PluginDetailOrigin = \'locale\' | \'readme\' | \'repository\';',
7263
+ },
6322
7264
  {
6323
7265
  name: 'PluginEntryId',
6324
7266
  declaration: 'export type PluginEntryId = Branded<\'PluginEntryId\'>;',
@@ -6357,12 +7299,20 @@ export const TYPE_API = [
6357
7299
  },
6358
7300
  {
6359
7301
  name: 'PluginInventoryEntry',
6360
- declaration: 'export interface PluginInventoryEntry {\n readonly entryId: PluginEntryId;\n readonly moduleName: string;\n readonly meta?: PluginLocalizedMeta;\n readonly enabled: boolean;\n readonly fiberPhase: PluginFiberPhase;\n}',
7302
+ declaration: 'export interface PluginInventoryEntry {\n readonly entryId: PluginEntryId;\n readonly moduleName: string;\n readonly meta?: PluginLocalizedMeta;\n readonly enabled: boolean;\n readonly fiberPhase: PluginFiberPhase;\n readonly diagnostic?: string;\n}',
6361
7303
  },
6362
7304
  {
6363
7305
  name: 'PluginLocalizedMeta',
6364
7306
  declaration: 'export interface PluginLocalizedMeta {\n readonly title?: LocalizedText;\n readonly description?: LocalizedText;\n readonly icon?: string;\n readonly error?: string;\n}',
6365
7307
  },
7308
+ {
7309
+ name: 'PluginOperation',
7310
+ declaration: 'export type PluginOperation = {\n readonly id: PluginOperationId;\n readonly time: string;\n readonly reason: PluginChange[\'reason\'];\n readonly target: string | null;\n readonly stage: ChangeResult[\'stage\'];\n readonly enabled?: boolean | undefined;\n readonly version?: string | undefined;\n} & ({\n readonly phase: \'started\';\n} | {\n readonly phase: \'settled\';\n readonly application: ChangeResult[\'application\'];\n readonly changed: boolean;\n readonly errorCode?: ManagementError[\'code\'] | undefined;\n readonly restartReason?: RestartReason | undefined;\n} | {\n readonly phase: \'unknown\';\n});',
7311
+ },
7312
+ {
7313
+ name: 'PluginOperationId',
7314
+ declaration: 'export type PluginOperationId = Branded<\'PluginOperationId\'>;',
7315
+ },
6366
7316
  {
6367
7317
  name: 'PluginOptions',
6368
7318
  declaration: 'export type PluginOptions = Readonly<Record<string, PluginOptionValue>>;',
@@ -6379,6 +7329,26 @@ export const TYPE_API = [
6379
7329
  name: 'PluginSpecInspection',
6380
7330
  declaration: 'export type PluginSpecInspection = {\n readonly status: \'accepted\';\n readonly kind: InstallSpecKind;\n readonly name?: string;\n readonly version?: string;\n readonly description?: string;\n readonly bundle: boolean | null;\n readonly registry: Registry;\n readonly host?: string;\n} | {\n readonly status: \'refused\';\n readonly problem: PluginInspectProblem;\n readonly reason: string;\n readonly registries?: Registry[];\n};',
6381
7331
  },
7332
+ {
7333
+ name: 'PluginUpdateProgress',
7334
+ declaration: 'export interface PluginUpdateProgress {\n readonly requestId: PluginInstallRequestId;\n readonly step: PluginUpdateStep;\n}',
7335
+ },
7336
+ {
7337
+ name: 'PluginUpdateResult',
7338
+ declaration: 'export interface PluginUpdateResult {\n readonly from: string;\n readonly to: string;\n readonly step: \'check\' | \'remove\' | \'install\';\n readonly result: ChangeResult;\n readonly restore?: ChangeResult;\n}',
7339
+ },
7340
+ {
7341
+ name: 'PluginUpdateStep',
7342
+ declaration: 'export type PluginUpdateStep = \'checking\' | \'removing\' | \'installing\' | \'restoring\';',
7343
+ },
7344
+ {
7345
+ name: 'PluginVersion',
7346
+ declaration: 'export interface PluginVersion {\n readonly version: string;\n readonly publishedAt?: string;\n readonly tags: readonly string[];\n readonly prerelease: boolean;\n readonly deprecated?: string;\n readonly bundle: boolean;\n readonly incompatible?: IncompatiblePlugin;\n}',
7347
+ },
7348
+ {
7349
+ name: 'PluginVersionList',
7350
+ declaration: 'export type PluginVersionList = {\n readonly status: \'listed\';\n readonly installed: string;\n readonly registry: Registry;\n readonly attempts: readonly RegistryAttempt[];\n readonly versions: readonly PluginVersion[];\n readonly omitted: number;\n} | {\n readonly status: \'refused\';\n readonly problem: \'not-updatable\' | \'not-found\' | \'network\' | \'unknown\';\n readonly reason: string;\n readonly attempts: readonly RegistryAttempt[];\n};',
7351
+ },
6382
7352
  {
6383
7353
  name: 'PostToolDecision',
6384
7354
  declaration: 'export type PostToolDecision = {\n kind: \'accept\';\n content?: ContentBlock[];\n value?: never;\n additionalContexts?: UserMessage[];\n} | {\n kind: \'accept\';\n value: JsonValue;\n content?: never;\n additionalContexts?: UserMessage[];\n} | {\n kind: \'block\';\n feedback: ContentBlock[];\n additionalContexts?: UserMessage[];\n};',
@@ -6469,7 +7439,15 @@ export const TYPE_API = [
6469
7439
  },
6470
7440
  {
6471
7441
  name: 'ProjectionDefinition',
6472
- declaration: 'export interface ProjectionDefinition<K extends keyof SessionProjectionStateMap, S extends SessionProjectionStateMap[K] = SessionProjectionStateMap[K]> {\n key: K;\n stateSchema: ZodType<S>;\n init(header: SessionHeader, inheritedEventCount: SessionLogOffset): NoInfer<S>;\n apply(state: NoInfer<S>, event: SessionEvent): NoInfer<S>;\n wire?: K extends keyof SessionProjectionMap ? {\n viewSchema: ZodType<SessionProjectionMap[K]>;\n view(state: NoInfer<S>): SessionProjectionMap[K];\n } : never;\n stateVersion: number;\n}',
7442
+ declaration: 'export interface ProjectionDefinition<K extends string, S> {\n key: K;\n stateSchema: ZodType<S>;\n init(header: SessionHeader, inheritedEventCount: SessionLogOffset): NoInfer<S>;\n apply(state: NoInfer<S>, event: SessionEvent): NoInfer<S>;\n wire?: K extends keyof SessionProjectionMap ? {\n viewSchema: ZodType<SessionProjectionViewValue<SessionProjectionMap[K]>>;\n view(state: NoInfer<S>): SessionProjectionViewValue<SessionProjectionMap[K]>;\n summary?: boolean;\n } : never;\n stateVersion: number;\n}',
7443
+ },
7444
+ {
7445
+ name: 'ProjectionHandle',
7446
+ declaration: 'export interface ProjectionHandle<S> {\n stateOf(session: Session): S;\n readerFor(session: Session): () => S;\n dispose(): Promise<void>;\n}',
7447
+ },
7448
+ {
7449
+ name: 'ProjectionKeySelection',
7450
+ declaration: 'export type ProjectionKeySelection = readonly Extract<keyof SessionProjectionMap, string>[] | ReadonlySet<Extract<keyof SessionProjectionMap, string>>;',
6473
7451
  },
6474
7452
  {
6475
7453
  name: 'ProjectionSnapshot',
@@ -6477,7 +7455,7 @@ export const TYPE_API = [
6477
7455
  },
6478
7456
  {
6479
7457
  name: 'PromptAssembly',
6480
- declaration: 'export interface PromptAssembly {\n sections: AssembledSection[];\n contexts: AssembledContext[];\n tools: ToolSchema[];\n variables: Record<string, string | undefined>;\n}',
7458
+ declaration: 'export interface PromptAssembly extends PromptPresentation {\n tools: ToolSchema[];\n}',
6481
7459
  },
6482
7460
  {
6483
7461
  name: 'PromptContext',
@@ -6495,6 +7473,10 @@ export const TYPE_API = [
6495
7473
  name: 'PromptOrigin',
6496
7474
  declaration: 'export type PromptOrigin = {\n kind: \'composer\';\n} | {\n kind: \'plugin\';\n name: string;\n};',
6497
7475
  },
7476
+ {
7477
+ name: 'PromptPresentation',
7478
+ declaration: 'export interface PromptPresentation {\n sections: AssembledSection[];\n contexts: AssembledContext[];\n variables: Record<string, string | undefined>;\n}',
7479
+ },
6498
7480
  {
6499
7481
  name: 'PromptSection',
6500
7482
  declaration: 'export interface PromptSection {\n readonly name: string;\n readonly order: number;\n readonly text: string | ((context: AssembleContext) => string);\n readonly interpolate?: boolean;\n readonly complete?: boolean;\n}',
@@ -6591,6 +7573,10 @@ export const TYPE_API = [
6591
7573
  name: 'ReasoningEffortId',
6592
7574
  declaration: 'export type ReasoningEffortId = Branded<\'ReasoningEffortId\'>;',
6593
7575
  },
7576
+ {
7577
+ name: 'RecommendationDetails',
7578
+ declaration: 'export type RecommendationDetails = {\n readonly status: \'available\';\n readonly title: LocalizedText;\n readonly description: LocalizedText;\n readonly enabled: boolean;\n} | {\n readonly status: \'refused\';\n readonly reason: \'unknown\' | \'unavailable\' | \'not-live-root\' | \'closing\';\n};',
7579
+ },
6594
7580
  {
6595
7581
  name: 'RecurringScheduleRecord',
6596
7582
  declaration: 'export type RecurringScheduleRecord = EveryScheduleRecord | DailyScheduleRecord | WeeklyScheduleRecord | CronScheduleRecord;',
@@ -6603,6 +7589,18 @@ export const TYPE_API = [
6603
7589
  name: 'Registry',
6604
7590
  declaration: 'export type Registry = string | null;',
6605
7591
  },
7592
+ {
7593
+ name: 'RegistryAttempt',
7594
+ declaration: 'export interface RegistryAttempt {\n readonly registry: Registry;\n readonly problem?: \'not-found\' | \'network\' | \'unknown\';\n readonly reason?: string;\n}',
7595
+ },
7596
+ {
7597
+ name: 'RelayConnectivityView',
7598
+ declaration: 'export interface RelayConnectivityView {\n readonly ok: boolean;\n readonly httpReachable: boolean;\n readonly blocking: boolean;\n readonly error?: string;\n}',
7599
+ },
7600
+ {
7601
+ name: 'RelayPublishView',
7602
+ declaration: 'export interface RelayPublishView {\n readonly ok: boolean;\n readonly blocking: boolean;\n readonly error?: string;\n}',
7603
+ },
6606
7604
  {
6607
7605
  name: 'Reload',
6608
7606
  declaration: 'export interface Reload {\n filename: string;\n modules: ReloadModules;\n runtime?: Plugin.Runtime | undefined;\n}',
@@ -6675,6 +7673,10 @@ export const TYPE_API = [
6675
7673
  name: 'RemoteErrorDetailsMap',
6676
7674
  declaration: 'export interface RemoteErrorDetailsMap {\n \'gateway/bad-request\': {\n readonly issues?: readonly object[];\n };\n \'gateway/cancelled\': {};\n \'gateway/internal\': {};\n}',
6677
7675
  },
7676
+ {
7677
+ name: 'RemoteEventAgentId',
7678
+ declaration: 'export type RemoteEventAgentId = Branded<\'RemoteEventAgentId\'>;',
7679
+ },
6678
7680
  {
6679
7681
  name: 'RemoteEventHostInfo',
6680
7682
  declaration: 'export interface RemoteEventHostInfo {\n readonly home: string;\n}',
@@ -6747,6 +7749,10 @@ export const TYPE_API = [
6747
7749
  name: 'ResolvedSubagentStartRequest',
6748
7750
  declaration: 'export interface ResolvedSubagentStartRequest extends SubagentStartRequest {\n readonly cwd: string;\n}',
6749
7751
  },
7752
+ {
7753
+ name: 'ResolvedToolSet',
7754
+ declaration: 'export interface ResolvedToolSet {\n dispose(): void;\n view(scope: ScopeKey | undefined): ReadonlyMap<string, ToolDefinition>;\n}',
7755
+ },
6750
7756
  {
6751
7757
  name: 'RestartReason',
6752
7758
  declaration: 'export type RestartReason = \'no-hmr\' | \'package-moved\' | \'host-module\' | \'unmanaged-plugin\' | \'module-comparison\';',
@@ -6755,10 +7761,22 @@ export const TYPE_API = [
6755
7761
  name: 'RestoredSessionOptions',
6756
7762
  declaration: 'export interface RestoredSessionOptions {\n readonly seed: SessionEvent[];\n readonly meta: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n readonly eventState: SessionSeedEventState;\n}',
6757
7763
  },
7764
+ {
7765
+ name: 'RestoredWorktree',
7766
+ declaration: 'export interface RestoredWorktree {\n path: string;\n branchRecreated: boolean;\n}',
7767
+ },
7768
+ {
7769
+ name: 'RestoreWorktreeRequest',
7770
+ declaration: 'export interface RestoreWorktreeRequest {\n path: string;\n branch: string;\n baseCommit: string;\n repositoryRoot: string;\n}',
7771
+ },
6758
7772
  {
6759
7773
  name: 'ResumeAgentOptions',
6760
7774
  declaration: 'export interface ResumeAgentOptions {\n readonly resumeSessionId: SessionId;\n readonly parentAgent?: Agent;\n readonly agentOptions?: AgentOptions;\n readonly signal?: AbortSignal;\n readonly setup?: AgentSetup;\n}',
6761
7775
  },
7776
+ {
7777
+ name: 'ReviewDecision',
7778
+ declaration: 'export type ReviewDecision = \'approved\' | \'changes-requested\' | \'review-required\' | \'none\';',
7779
+ },
6762
7780
  {
6763
7781
  name: 'RpcId',
6764
7782
  declaration: 'export type RpcId = Branded<\'rpc-id\'>;',
@@ -6773,7 +7791,7 @@ export const TYPE_API = [
6773
7791
  },
6774
7792
  {
6775
7793
  name: 'SandboxExecutionPolicy',
6776
- declaration: 'export interface SandboxExecutionPolicy {\n mode: SandboxMode;\n workspaceRoot: string;\n sessionId?: SessionId;\n}',
7794
+ declaration: 'export interface SandboxExecutionPolicy {\n mode: SandboxMode;\n workspaceRoot: string;\n additionalWritableRoots?: readonly string[];\n sessionId?: SessionId;\n}',
6777
7795
  },
6778
7796
  {
6779
7797
  name: 'SandboxMode',
@@ -6811,6 +7829,10 @@ export const TYPE_API = [
6811
7829
  name: 'ScheduleCreateRequest',
6812
7830
  declaration: 'export interface ScheduleCreateRequest {\n prompt: string;\n title: string;\n after_seconds?: number;\n at?: AtInput;\n every_seconds?: number;\n daily?: DailyInput;\n weekly?: WeeklyInput;\n cron?: CronInput;\n}',
6813
7831
  },
7832
+ {
7833
+ name: 'ScheduleDeleteInactiveResult',
7834
+ declaration: 'export interface ScheduleDeleteInactiveResult {\n readonly deleted: number;\n}',
7835
+ },
6814
7836
  {
6815
7837
  name: 'ScheduleDeleteRequest',
6816
7838
  declaration: 'export interface ScheduleDeleteRequest extends ScheduleListRequest {\n id: ScheduleId;\n}',
@@ -6835,14 +7857,6 @@ export const TYPE_API = [
6835
7857
  name: 'ScheduleDeliveryRecord',
6836
7858
  declaration: 'export interface ScheduleDeliveryRecord extends ScheduleDeliveryReceipt {\n readonly prompt?: string;\n}',
6837
7859
  },
6838
- {
6839
- name: 'ScheduledToolDispatch',
6840
- declaration: 'export type ScheduledToolDispatch = {\n kind: \'post-result\';\n result: ToolExecutionResult;\n} | {\n kind: \'final-result\';\n result: ToolExecutionResult;\n};',
6841
- },
6842
- {
6843
- name: 'ScheduledToolPreparation',
6844
- declaration: 'export type ScheduledToolPreparation = {\n kind: \'dispatch\';\n exec: ToolRunContext;\n} | {\n kind: \'post-result\';\n exec: ToolRunContext;\n result: ToolExecutionResult;\n} | {\n kind: \'final-result\';\n exec: ToolRunContext;\n result: ToolExecutionResult;\n};',
6845
- },
6846
7860
  {
6847
7861
  name: 'ScheduleId',
6848
7862
  declaration: 'export type ScheduleId = Branded<\'ScheduleId\'>;',
@@ -6973,7 +7987,7 @@ export const TYPE_API = [
6973
7987
  },
6974
7988
  {
6975
7989
  name: 'SessionAttachmentRequest',
6976
- declaration: 'export interface SessionAttachmentRequest {\n readonly sessionId: SessionId;\n readonly attachmentId: AttachmentIdType;\n}',
7990
+ declaration: 'export interface SessionAttachmentRequest {\n readonly sessionId: SessionId;\n readonly attachment: ImageAttachmentRef;\n}',
6977
7991
  },
6978
7992
  {
6979
7993
  name: 'SessionAttachmentValue',
@@ -6991,6 +8005,14 @@ export const TYPE_API = [
6991
8005
  name: 'SessionCancelValue',
6992
8006
  declaration: 'export interface SessionCancelValue {\n readonly accepted: true;\n}',
6993
8007
  },
8008
+ {
8009
+ name: 'SessionChangeRequest',
8010
+ declaration: 'export interface SessionChangeRequest {\n readonly url: string;\n readonly origin: BindingOrigin;\n readonly ref: ChangeRequestRef | null;\n readonly update: ChangeRequestUpdate | null;\n}',
8011
+ },
8012
+ {
8013
+ name: 'SessionChangeRequestsListener',
8014
+ declaration: 'export type SessionChangeRequestsListener = (changeRequests: readonly SessionChangeRequest[]) => void;',
8015
+ },
6994
8016
  {
6995
8017
  name: 'SessionControlBaseline',
6996
8018
  declaration: 'export interface SessionControlBaseline {\n readonly projections: Readonly<Record<SessionId, SessionProjectionBaseline>>;\n}',
@@ -7023,6 +8045,10 @@ export const TYPE_API = [
7023
8045
  name: 'SessionEventEntry',
7024
8046
  declaration: 'export interface SessionEventEntry {\n readonly type: \'event\';\n readonly event: SessionWireEvent;\n}',
7025
8047
  },
8048
+ {
8049
+ name: 'SessionEventFrame',
8050
+ declaration: 'export type SessionEventFrame = {\n readonly type: \'ready\';\n} | SessionEventEntry;',
8051
+ },
7026
8052
  {
7027
8053
  name: 'SessionEventMap',
7028
8054
  declaration: 'export interface SessionEventMap {\n \'turn/start\': {\n turn: number;\n };\n \'turn/end\': {\n turn: number;\n reason: TurnEndReason;\n };\n \'step/start\': {\n turn: number;\n step: number;\n };\n \'step/end\': {\n turn: number;\n step: number;\n };\n \'user/message\': UserMessage;\n \'developer/message\': {\n turn: number;\n step: number;\n message: DeveloperMessage;\n headerSeq?: SessionSeq;\n };\n \'system/message\': {\n turn: number;\n step: number;\n message: SystemMessage;\n };\n \'assistant/message\': {\n turn: number;\n step: number;\n message: AssistantMessage;\n stream: AssistantStreamRecord[];\n usage?: TokenUsage;\n interrupted?: true;\n };\n \'assistant/attempt\': {\n turn: number;\n step: number;\n stream: AssistantStreamRecord[];\n };\n \'tool/call\': {\n turn: number;\n step: number;\n callId: ToolCallId;\n name: string;\n arguments: string;\n };\n \'tool/result\': {\n turn: number;\n step: number;\n message: ToolResultMessage;\n error?: {\n name: string;\n code: string;\n reason?: string;\n };\n meta?: JsonValue;\n };\n \'request/header\': {\n header: EpochHeader;\n reason: RequestHeaderReason;\n startsSeries?: true;\n };\n \'request/context\': RequestContext;\n \'session/end-seed\': {\n /* …truncated — full shape in source */',
@@ -7059,6 +8085,10 @@ export const TYPE_API = [
7059
8085
  name: 'SessionEventSearchRequest',
7060
8086
  declaration: 'export interface SessionEventSearchRequest {\n sessionId: SessionId;\n query: string;\n filters?: readonly SessionEventMetadataFilter[];\n limit?: number;\n cursor?: SessionSearchCursor;\n}',
7061
8087
  },
8088
+ {
8089
+ name: 'SessionEventsPage',
8090
+ declaration: 'export interface SessionEventsPage extends SessionPage {\n readonly cursor: number;\n}',
8091
+ },
7062
8092
  {
7063
8093
  name: 'SessionEventSurface',
7064
8094
  declaration: 'export type SessionEventSurface = \'current\' | \'shadowed\' | \'log-only\';',
@@ -7105,7 +8135,7 @@ export const TYPE_API = [
7105
8135
  },
7106
8136
  {
7107
8137
  name: 'SessionFollowRequest',
7108
- declaration: 'export interface SessionFollowRequest extends Pick<SessionPageRequest, \'maxMessages\' | \'turnWindow\'> {\n readonly address: SessionAddress;\n readonly assistantStream?: true;\n}',
8138
+ declaration: 'export interface SessionFollowRequest extends Pick<SessionPageRequest, \'maxMessages\' | \'turnWindow\'> {\n readonly address: SessionAddress;\n readonly activate?: boolean;\n readonly assistantStream?: true;\n}',
7109
8139
  },
7110
8140
  {
7111
8141
  name: 'SessionForkRequest',
@@ -7171,6 +8201,10 @@ export const TYPE_API = [
7171
8201
  name: 'SessionListValue',
7172
8202
  declaration: 'export interface SessionListValue {\n readonly items: readonly SessionSummary[];\n}',
7173
8203
  },
8204
+ {
8205
+ name: 'SessionLocation',
8206
+ declaration: 'export interface SessionLocation {\n readonly kind: string;\n readonly path: string;\n}',
8207
+ },
7174
8208
  {
7175
8209
  name: 'SessionLogOffset',
7176
8210
  declaration: 'export type SessionLogOffset = BrandedNumber<\'SessionLogOffset\'>;',
@@ -7215,6 +8249,10 @@ export const TYPE_API = [
7215
8249
  name: 'SessionObservationOptions',
7216
8250
  declaration: 'export interface SessionObservationOptions {\n readonly signal?: AbortSignal;\n readonly projectionMode?: \'all\' | \'none\';\n}',
7217
8251
  },
8252
+ {
8253
+ name: 'SessionObserveEventRequest',
8254
+ declaration: 'export interface SessionObserveEventRequest {\n readonly address: SessionAddress;\n}',
8255
+ },
7218
8256
  {
7219
8257
  name: 'SessionOpenWorkspacePathRequest',
7220
8258
  declaration: 'export interface SessionOpenWorkspacePathRequest {\n readonly action?: \'reveal\';\n readonly application?: string;\n readonly path: string;\n}',
@@ -7229,7 +8267,11 @@ export const TYPE_API = [
7229
8267
  },
7230
8268
  {
7231
8269
  name: 'SessionPageRequest',
7232
- declaration: 'export interface SessionPageRequest {\n readonly address: SessionAddress;\n readonly throughSeq: number;\n readonly beforeSeq?: number;\n readonly maxMessages?: number;\n readonly turnWindow?: {\n readonly minMessages: number;\n readonly minTurns: number;\n };\n}',
8270
+ declaration: 'export interface SessionPageRequest {\n readonly address: SessionAddress;\n readonly throughSeq?: number;\n readonly beforeSeq?: number;\n readonly maxMessages?: number;\n readonly turnWindow?: {\n readonly minMessages: number;\n readonly minTurns: number;\n };\n}',
8271
+ },
8272
+ {
8273
+ name: 'SessionPendingInput',
8274
+ declaration: 'export type SessionPendingInput = \'approval\' | \'question\' | \'other\';',
7233
8275
  },
7234
8276
  {
7235
8277
  name: 'SessionPersistenceCreateOptions',
@@ -7249,7 +8291,7 @@ export const TYPE_API = [
7249
8291
  },
7250
8292
  {
7251
8293
  name: 'SessionPersistenceSnapshot',
7252
- declaration: 'export interface SessionPersistenceSnapshot {\n readonly header: SessionHeader;\n readonly formatStatus?: \'current\' | \'migration-required\';\n readonly revision: SessionPersistenceRevision;\n readonly eventCount?: number;\n readonly sizeBytes?: number;\n}',
8294
+ declaration: 'export interface SessionPersistenceSnapshot {\n readonly header: SessionHeader;\n readonly formatStatus?: \'current\' | \'migration-required\';\n readonly revision: SessionPersistenceRevision;\n readonly eventCount?: number;\n readonly sizeBytes?: number;\n readonly location?: SessionLocation;\n}',
7253
8295
  },
7254
8296
  {
7255
8297
  name: 'SessionPersistenceStatOptions',
@@ -7259,9 +8301,17 @@ export const TYPE_API = [
7259
8301
  name: 'SessionProjectionBaseline',
7260
8302
  declaration: 'export interface SessionProjectionBaseline {\n readonly asOfSeq: number;\n readonly values: SessionProjectionValues;\n}',
7261
8303
  },
8304
+ {
8305
+ name: 'SessionProjectionChange',
8306
+ declaration: 'export type SessionProjectionChange = {\n readonly type: \'projection\';\n} & Omit<SessionProjectionUpdate, \'sessionId\'>;',
8307
+ },
8308
+ {
8309
+ name: 'SessionProjectionFrame',
8310
+ declaration: 'export type SessionProjectionFrame = {\n readonly type: \'ready\';\n} | SessionProjectionChange;',
8311
+ },
7262
8312
  {
7263
8313
  name: 'SessionProjectionHints',
7264
- declaration: 'export interface SessionProjectionHints {\n readonly kind: \'cached\' | \'sequenced\';\n readonly asOfSeq: number;\n readonly values: SessionProjectionValues;\n}',
8314
+ declaration: 'export interface SessionProjectionHints {\n readonly kind: \'cached\' | \'sequenced\';\n readonly asOfSeq: number;\n readonly values: Partial<SessionProjectionSummaryValues>;\n}',
7265
8315
  },
7266
8316
  {
7267
8317
  name: 'SessionProjectionMap',
@@ -7272,8 +8322,16 @@ export const TYPE_API = [
7272
8322
  declaration: 'export interface SessionProjectionsRequest {\n readonly sessionId: SessionId;\n}',
7273
8323
  },
7274
8324
  {
7275
- name: 'SessionProjectionStateMap',
7276
- declaration: 'export interface SessionProjectionStateMap {\n}',
8325
+ name: 'SessionProjectionSummaryExcluded',
8326
+ declaration: 'export type SessionProjectionSummaryExcluded<T> = T & {\n readonly [sessionProjectionSummaryExcluded]: true;\n};',
8327
+ },
8328
+ {
8329
+ name: 'SessionProjectionSummaryExcludedKey',
8330
+ declaration: 'export type SessionProjectionSummaryExcludedKey = {\n [K in keyof SessionProjectionMap]: NonNullable<SessionProjectionMap[K]> extends SessionProjectionSummaryExcluded<unknown> ? K : never;\n}[keyof SessionProjectionMap];',
8331
+ },
8332
+ {
8333
+ name: 'SessionProjectionSummaryValues',
8334
+ declaration: 'export type SessionProjectionSummaryValues = Omit<SessionProjectionViewValues, SessionProjectionSummaryExcludedKey>;',
7277
8335
  },
7278
8336
  {
7279
8337
  name: 'SessionProjectionsValue',
@@ -7291,6 +8349,14 @@ export const TYPE_API = [
7291
8349
  name: 'SessionProjectionValues',
7292
8350
  declaration: 'export type SessionProjectionValues = Partial<SessionProjectionMap> & Readonly<Record<string, SessionProjectionValue>>;',
7293
8351
  },
8352
+ {
8353
+ name: 'SessionProjectionViewValue',
8354
+ declaration: 'export type SessionProjectionViewValue<T> = T extends SessionProjectionSummaryExcluded<infer Value> ? Value : T;',
8355
+ },
8356
+ {
8357
+ name: 'SessionProjectionViewValues',
8358
+ declaration: 'export type SessionProjectionViewValues = {\n [K in keyof SessionProjectionMap]: SessionProjectionViewValue<SessionProjectionMap[K]>;\n};',
8359
+ },
7294
8360
  {
7295
8361
  name: 'SessionPromptRequest',
7296
8362
  declaration: 'export interface SessionPromptRequest {\n readonly requestId: SessionRequestId;\n readonly sessionId: SessionId;\n readonly mode: \'queue\' | \'steer\';\n readonly content: readonly PromptContentPart[];\n readonly clientTimeZone?: string;\n}',
@@ -7299,6 +8365,10 @@ export const TYPE_API = [
7299
8365
  name: 'SessionPromptValue',
7300
8366
  declaration: 'export interface SessionPromptValue {\n readonly accepted: true;\n}',
7301
8367
  },
8368
+ {
8369
+ name: 'SessionQueuedItem',
8370
+ declaration: 'export interface SessionQueuedItem {\n readonly id: MessageId;\n readonly placement: \'queued\' | \'steering\' | \'context\';\n readonly rpcId?: SessionRequestId;\n readonly content: readonly JsonValue[];\n}',
8371
+ },
7302
8372
  {
7303
8373
  name: 'SessionRecord',
7304
8374
  declaration: 'export interface SessionRecord {\n header: SessionHeader;\n live: boolean;\n persisted: boolean;\n formatStatus?: \'current\' | \'migration-required\';\n}',
@@ -7391,6 +8461,14 @@ export const TYPE_API = [
7391
8461
  name: 'SessionStartSource',
7392
8462
  declaration: 'export type SessionStartSource = \'startup\' | \'resume\' | \'clear\' | \'compact\';',
7393
8463
  },
8464
+ {
8465
+ name: 'SessionState',
8466
+ declaration: 'export interface SessionState {\n readonly cursor: number;\n readonly active: boolean;\n readonly running: boolean;\n readonly queue: readonly SessionQueuedItem[] | null;\n readonly pendingInput: readonly SessionPendingInput[];\n}',
8467
+ },
8468
+ {
8469
+ name: 'SessionStateRequest',
8470
+ declaration: 'export interface SessionStateRequest {\n readonly sessionId: SessionId;\n}',
8471
+ },
7394
8472
  {
7395
8473
  name: 'SessionStorageMetadata',
7396
8474
  declaration: 'export interface SessionStorageMetadata {\n readonly meta: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n}',
@@ -7471,6 +8549,18 @@ export const TYPE_API = [
7471
8549
  name: 'SessionUpdateQueueValue',
7472
8550
  declaration: 'export interface SessionUpdateQueueValue {\n readonly accepted: true;\n}',
7473
8551
  },
8552
+ {
8553
+ name: 'SessionWaitOutput',
8554
+ declaration: 'export interface SessionWaitOutput {\n readonly records: readonly SessionHistoryRecord[];\n readonly truncated: boolean;\n}',
8555
+ },
8556
+ {
8557
+ name: 'SessionWaitRequest',
8558
+ declaration: 'export interface SessionWaitRequest extends SessionStateRequest {\n readonly timeoutMs?: number;\n readonly afterSeq?: number;\n readonly maxMessages?: number;\n}',
8559
+ },
8560
+ {
8561
+ name: 'SessionWaitValue',
8562
+ declaration: 'export interface SessionWaitValue {\n readonly reason: \'idle\' | \'input-required\' | \'timeout\';\n readonly state: SessionState;\n readonly output: SessionWaitOutput;\n}',
8563
+ },
7474
8564
  {
7475
8565
  name: 'SessionWireEvent',
7476
8566
  declaration: 'export interface SessionWireEvent {\n readonly type: string;\n readonly seq: number;\n readonly time: number;\n readonly data: JsonValue;\n readonly ignorable?: true;\n readonly sourceEventSeqs?: JsonValue;\n readonly surfaceOp?: JsonValue;\n}',
@@ -7483,6 +8573,14 @@ export const TYPE_API = [
7483
8573
  name: 'SessionWorkspacePathApplication',
7484
8574
  declaration: 'export type SessionWorkspacePathApplication = NativeFileApplication;',
7485
8575
  },
8576
+ {
8577
+ name: 'SetRelayRequest',
8578
+ declaration: 'export interface SetRelayRequest {\n readonly relayUrl: string | null;\n}',
8579
+ },
8580
+ {
8581
+ name: 'SetShareCapabilitiesRequest',
8582
+ declaration: 'export interface SetShareCapabilitiesRequest {\n readonly shareId: string;\n readonly capabilities?: readonly ShareCapabilityGroup[];\n}',
8583
+ },
7486
8584
  {
7487
8585
  name: 'SettingsDescribeOptions',
7488
8586
  declaration: 'export interface SettingsDescribeOptions {\n redactSecrets?: boolean;\n}',
@@ -7519,6 +8617,38 @@ export const TYPE_API = [
7519
8617
  name: 'SettingsSecretView',
7520
8618
  declaration: 'export interface SettingsSecretView {\n path: string[];\n set: boolean;\n}',
7521
8619
  },
8620
+ {
8621
+ name: 'ShareAccess',
8622
+ declaration: 'export interface ShareAccess {\n readonly mode: \'open\' | \'selected\';\n readonly selected: readonly ShareAccessSelection[];\n readonly deploymentAllowedSubjectIds: readonly string[];\n readonly shareAllowedSubjectIds: readonly string[];\n readonly broadenedByDeploymentSubjects: boolean;\n readonly identityKeyAcl: true;\n}',
8623
+ },
8624
+ {
8625
+ name: 'ShareAccessSelection',
8626
+ declaration: 'export interface ShareAccessSelection {\n readonly providerId: string;\n readonly tenantId: string;\n readonly subjectId: string;\n readonly identityKey: string;\n}',
8627
+ },
8628
+ {
8629
+ name: 'ShareAudit',
8630
+ declaration: 'export interface ShareAudit {\n readonly events: readonly ShareAuditEntryView[];\n}',
8631
+ },
8632
+ {
8633
+ name: 'ShareAuditEntryView',
8634
+ declaration: 'export interface ShareAuditEntryView {\n readonly id: string;\n readonly action: string;\n readonly createdAt: string;\n readonly actor?: string;\n readonly detail?: JsonValue;\n}',
8635
+ },
8636
+ {
8637
+ name: 'ShareAuditRequest',
8638
+ declaration: 'export interface ShareAuditRequest {\n readonly shareId: string;\n}',
8639
+ },
8640
+ {
8641
+ name: 'ShareCapabilities',
8642
+ declaration: 'export interface ShareCapabilities {\n readonly shareId: string;\n readonly viewerCapabilities: readonly ShareCapabilityGroup[];\n}',
8643
+ },
8644
+ {
8645
+ name: 'ShareCapabilityGroup',
8646
+ declaration: 'export interface ShareCapabilityGroup {\n readonly plugin: string;\n readonly readable: readonly string[];\n readonly writable: readonly string[];\n}',
8647
+ },
8648
+ {
8649
+ name: 'ShareCapabilityOffers',
8650
+ declaration: 'export interface ShareCapabilityOffers {\n readonly capabilities: readonly ShareCapabilityGroup[];\n}',
8651
+ },
7522
8652
  {
7523
8653
  name: 'ShellExecRequest',
7524
8654
  declaration: 'export interface ShellExecRequest {\n command: string;\n workdir?: string | undefined;\n timeoutMs?: number | undefined;\n onExpiry?: ShellExpiryPolicy | undefined;\n stdoutMaxBytes?: number | undefined;\n signal?: AbortSignal | undefined;\n stdin?: string | undefined;\n env?: Record<string, string> | undefined;\n dshEnv?: DshEnvironment | undefined;\n sandboxPolicy?: SandboxExecutionPolicy | undefined;\n}',
@@ -7735,6 +8865,18 @@ export const TYPE_API = [
7735
8865
  name: 'SshStreamEndpoint',
7736
8866
  declaration: 'export type SshStreamEndpoint = z.infer<typeof streamEndpointSchema>;',
7737
8867
  },
8868
+ {
8869
+ name: 'StagedAttachment',
8870
+ declaration: 'export type StagedAttachment = {\n readonly type: \'file\';\n readonly attachment: FileAttachmentRef;\n} | {\n readonly type: \'image\';\n readonly attachment: ImageAttachmentRef;\n readonly encodedBytes: number;\n};',
8871
+ },
8872
+ {
8873
+ name: 'StopShareRequest',
8874
+ declaration: 'export interface StopShareRequest {\n readonly shareId: string;\n}',
8875
+ },
8876
+ {
8877
+ name: 'StopShareResult',
8878
+ declaration: 'export interface StopShareResult {\n readonly ok: true;\n readonly relay?: \'unreachable\';\n}',
8879
+ },
7738
8880
  {
7739
8881
  name: 'StorageBackend',
7740
8882
  declaration: 'export interface StorageBackend {\n readonly kv?: KvFacet;\n close(): Promise<void>;\n}',
@@ -8091,6 +9233,10 @@ export const TYPE_API = [
8091
9233
  name: 'TerminalWaitReason',
8092
9234
  declaration: 'export type TerminalWaitReason = \'stdin_read\' | \'inferred_idle\' | \'timeout\' | \'session_exit\';',
8093
9235
  },
9236
+ {
9237
+ name: 'TestPublishRequest',
9238
+ declaration: 'export interface TestPublishRequest {\n readonly sessionId: string;\n}',
9239
+ },
8094
9240
  {
8095
9241
  name: 'TextProps',
8096
9242
  declaration: 'export interface TextProps {\n readonly color?: string | undefined;\n readonly bold?: boolean | undefined;\n readonly dimColor?: boolean | undefined;\n readonly italic?: boolean | undefined;\n readonly underline?: boolean | undefined;\n readonly children?: UiNode | undefined;\n}',
@@ -8123,10 +9269,22 @@ export const TYPE_API = [
8123
9269
  name: 'TokenUsage',
8124
9270
  declaration: 'export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}',
8125
9271
  },
9272
+ {
9273
+ name: 'ToolActivationContext',
9274
+ declaration: 'export interface ToolActivationContext {\n readonly agent: Agent;\n readonly modelSelection: Readonly<ModelSelection>;\n readonly signal: AbortSignal;\n}',
9275
+ },
8126
9276
  {
8127
9277
  name: 'ToolAdditionBlock',
8128
9278
  declaration: 'export interface ToolAdditionBlock {\n type: \'tool-addition\';\n toolName: string;\n tool?: never;\n}',
8129
9279
  },
9280
+ {
9281
+ name: 'ToolBatchInput',
9282
+ declaration: 'export interface ToolBatchInput {\n readonly calls: readonly ToolCallBlock[];\n readonly signal: AbortSignal;\n readonly maxParallelToolCalls?: number;\n readonly agent?: Agent;\n readonly toolSet?: ResolvedToolSet;\n readonly log?: {\n readonly turn: number;\n readonly step: number;\n };\n}',
9283
+ },
9284
+ {
9285
+ name: 'ToolBatchResult',
9286
+ declaration: 'export interface ToolBatchResult {\n readonly results: readonly ToolCallResult[];\n readonly additionalContexts: readonly UserMessage[];\n readonly concluded: boolean;\n}',
9287
+ },
8130
9288
  {
8131
9289
  name: 'ToolCallBlock',
8132
9290
  declaration: 'export interface ToolCallBlock {\n type: \'tool-call\';\n id: ToolCallId;\n name: string;\n arguments: string;\n}',
@@ -8143,10 +9301,6 @@ export const TYPE_API = [
8143
9301
  name: 'ToolCallKind',
8144
9302
  declaration: 'export type ToolCallKind = \'read\' | \'edit\' | \'delete\' | \'move\' | \'search\' | \'execute\' | \'fetch\' | \'other\';',
8145
9303
  },
8146
- {
8147
- name: 'ToolCallResult',
8148
- declaration: 'export type ToolCallResult = {\n deny: string;\n result?: undefined;\n isError?: undefined;\n} | {\n result: unknown;\n isError?: true;\n deny?: undefined;\n};',
8149
- },
8150
9304
  {
8151
9305
  name: 'ToolCallView',
8152
9306
  declaration: 'export type ToolCallView = GenericCallView | TerminalCallView | DiffCallView;',
@@ -8173,11 +9327,7 @@ export const TYPE_API = [
8173
9327
  },
8174
9328
  {
8175
9329
  name: 'ToolExecutionInput',
8176
- declaration: 'export interface ToolExecutionInput {\n readonly callId: ToolCallId;\n readonly rootCallId?: ToolCallId;\n readonly name: string;\n readonly schema?: ToolSchema;\n readonly arguments: unknown;\n readonly agent?: Agent;\n readonly parent?: ToolExecutionToken;\n readonly signal: AbortSignal;\n}',
8177
- },
8178
- {
8179
- name: 'ToolExecutionMode',
8180
- declaration: 'export type ToolExecutionMode = {\n kind: \'parallel\';\n} | {\n kind: \'exclusive\';\n};',
9330
+ declaration: 'export interface ToolExecutionInput {\n readonly callId: ToolCallId;\n readonly rootCallId?: ToolCallId;\n readonly name: string;\n readonly schema?: ToolSchema;\n readonly arguments: unknown;\n readonly agent?: Agent;\n readonly toolSet?: ResolvedToolSet;\n readonly parent?: ToolExecutionToken;\n readonly signal: AbortSignal;\n}',
8181
9331
  },
8182
9332
  {
8183
9333
  name: 'ToolExecutionResult',
@@ -8191,6 +9341,10 @@ export const TYPE_API = [
8191
9341
  name: 'ToolExecutionToken',
8192
9342
  declaration: 'export type ToolExecutionToken = symbol & {\n readonly [toolExecutionTokenBrand]: true;\n};',
8193
9343
  },
9344
+ {
9345
+ name: 'ToolExecutor',
9346
+ declaration: 'export interface ToolExecutor {\n readonly sections?: readonly ToolPromptSection[];\n describe(tools: readonly ToolDefinition[]): ToolModelInput;\n execute(input: ToolBatchInput): Promise<ToolBatchResult>;\n}',
9347
+ },
8194
9348
  {
8195
9349
  name: 'ToolFailure',
8196
9350
  declaration: 'export interface ToolFailure {\n message: string;\n info?: ToolErrorInfo;\n}',
@@ -8211,18 +9365,26 @@ export const TYPE_API = [
8211
9365
  name: 'ToolMessageSource',
8212
9366
  declaration: 'export interface ToolMessageSource {\n kind: \'tool\';\n callId: ToolCallId;\n}',
8213
9367
  },
9368
+ {
9369
+ name: 'ToolModelInput',
9370
+ declaration: 'export type ToolModelInput = Pick<ToolProviderResult, \'schemas\' | \'knownNames\'>;',
9371
+ },
8214
9372
  {
8215
9373
  name: 'ToolOutputDefinition',
8216
9374
  declaration: 'export interface ToolOutputDefinition {\n readonly schema: JsonSchemaNode;\n render(args: unknown, value: JsonValue): ContentBlock[];\n presentationMeta?(args: unknown, value: JsonValue): JsonValue;\n}',
8217
9375
  },
8218
9376
  {
8219
- name: 'ToolPresentationMode',
8220
- declaration: 'export type ToolPresentationMode = \'native\' | \'ptc\';',
9377
+ name: 'ToolPromptSection',
9378
+ declaration: 'export interface ToolPromptSection extends Pick<PromptSection, \'name\' | \'order\' | \'interpolate\'> {\n readonly text: string | ((tools: readonly ToolDefinition[]) => string);\n}',
8221
9379
  },
8222
9380
  {
8223
9381
  name: 'ToolProviderResult',
8224
9382
  declaration: 'export interface ToolProviderResult {\n readonly schemas: readonly ToolSchema[];\n readonly knownNames?: readonly string[];\n}',
8225
9383
  },
9384
+ {
9385
+ name: 'ToolRegistrationOptions',
9386
+ declaration: 'export interface ToolRegistrationOptions {\n readonly when?: (context: ToolActivationContext) => boolean | Promise<boolean>;\n}',
9387
+ },
8226
9388
  {
8227
9389
  name: 'ToolRemovalBlock',
8228
9390
  declaration: 'export interface ToolRemovalBlock {\n type: \'tool-removal\';\n toolName: string;\n}',
@@ -8247,14 +9409,6 @@ export const TYPE_API = [
8247
9409
  name: 'ToolRunContext',
8248
9410
  declaration: 'export interface ToolRunContext extends ToolExecution {\n deferContext(context: UserMessage): void;\n concludeTurn(): void;\n}',
8249
9411
  },
8250
- {
8251
- name: 'ToolRuntime',
8252
- declaration: 'export class ToolRuntime extends Service {\n static inject;\n static Config: z<Config>;\n readonly [TOOL_RUNTIME_SCHEDULER]: ToolRuntimeScheduler;\n constructor(ctx: Context, config: Config = {});\n presentAs(mode: ToolPresentationMode): () => void;\n register(definition: ToolDefinition): () => void;\n restrict(filter: ToolRestriction): () => void;\n guard(guard: ToolGuard): () => void;\n get(name: string, scope?: ScopeKey): ToolDefinition | undefined;\n schemas(scope?: ScopeKey): ToolSchema[];\n executionMode(exec: ToolExecutionInput): ToolExecutionMode;\n async execute(exec: ToolExecutionInput): Promise<ToolExecutionResult>;\n}',
8253
- },
8254
- {
8255
- name: 'ToolRuntimeScheduler',
8256
- declaration: 'export interface ToolRuntimeScheduler {\n prepare(exec: ToolExecutionInput): Promise<ScheduledToolPreparation>;\n dispatch(exec: ToolRunContext): Promise<ScheduledToolDispatch>;\n finalize(exec: ToolRunContext, result: ToolExecutionResult): Promise<ToolExecutionResult>;\n finish(exec: ToolRunContext, result: ToolExecutionResult): ToolExecutionResult;\n}',
8257
- },
8258
9412
  {
8259
9413
  name: 'ToolSchema',
8260
9414
  declaration: 'export interface ToolSchema {\n deferLoading?: true;\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}',
@@ -8263,6 +9417,10 @@ export const TYPE_API = [
8263
9417
  name: 'ToolSpec',
8264
9418
  declaration: 'export interface ToolSpec {\n name: string;\n description: string;\n inputSchema?: Record<string, unknown>;\n}',
8265
9419
  },
9420
+ {
9421
+ name: 'ToolsService',
9422
+ declaration: 'export class ToolsService extends Service {\n static inject;\n static Config;\n constructor(ctx: Context);\n register(definition: ToolDefinition, options: ToolRegistrationOptions = {}): () => void;\n restrict(filter: ToolRestriction): () => void;\n get(name: string, scope?: ScopeKey, toolSet?: ResolvedToolSet): ToolDefinition | undefined;\n executable(name: string, scope?: ScopeKey, toolSet?: ResolvedToolSet): ToolDefinition | undefined;\n async resolve(context: ToolActivationContext): Promise<ResolvedToolSet>;\n definitions(scope?: ScopeKey, toolSet?: ResolvedToolSet): readonly ToolDefinition[];\n schemas(scope?: ScopeKey, toolSet?: ResolvedToolSet): ToolSchema[];\n setExecutor(executor: ToolExecutor): () => void;\n async execute(input: ToolBatchInput): Promise<ToolBatchResult>;\n guard(guard: ToolGuard): () => void;\n checkGuards(exec: ToolExecution): string | undefined;\n}',
9423
+ },
8266
9424
  {
8267
9425
  name: 'ToolUpdate',
8268
9426
  declaration: 'export type ToolUpdate = \'in-history\' | \'addition-only\';',
@@ -8291,6 +9449,10 @@ export const TYPE_API = [
8291
9449
  name: 'TranslationSpec',
8292
9450
  declaration: 'export type TranslationSpec = AnonymousTranslationSpec | PaidTranslationSpec;',
8293
9451
  },
9452
+ {
9453
+ name: 'TurnBoundaryProjection',
9454
+ declaration: 'export interface TurnBoundaryProjection {\n readonly openTurnStartSeq: OptionalSessionSeq;\n readonly lastStepStartSeq: OptionalSessionSeq;\n readonly lastStepBoundary: {\n readonly kind: \'start\' | \'end\';\n readonly seq: SessionSeq;\n } | null;\n readonly lastTurn: number;\n}',
9455
+ },
8294
9456
  {
8295
9457
  name: 'TurnCompleteInput',
8296
9458
  declaration: 'export interface TurnCompleteInput {\n turnId: string;\n answer: string;\n durationMs: number;\n isAborted: boolean;\n reason: \'answer\' | \'aborted\' | \'error\';\n agentId?: string;\n usage?: TurnUsage;\n}',
@@ -8475,6 +9637,14 @@ export const TYPE_API = [
8475
9637
  name: 'UiRenderResult',
8476
9638
  declaration: 'export type UiRenderResult = UiNode;',
8477
9639
  },
9640
+ {
9641
+ name: 'UpdateBundleOptions',
9642
+ declaration: 'export interface UpdateBundleOptions {\n readonly registry?: Registry;\n readonly requestId?: PluginInstallRequestId;\n}',
9643
+ },
9644
+ {
9645
+ name: 'UpdateSharePermissionsRequest',
9646
+ declaration: 'export interface UpdateSharePermissionsRequest {\n readonly shareId: string;\n readonly sessionMode?: \'view\' | \'write\';\n readonly allowsFork?: boolean;\n readonly ttlMinutes?: number | null;\n}',
9647
+ },
8478
9648
  {
8479
9649
  name: 'UpdateTeamTaskRequest',
8480
9650
  declaration: 'export interface UpdateTeamTaskRequest {\n readonly taskId: TeamTaskId;\n readonly expectedRevision: number;\n readonly action: TeamTaskAction;\n readonly subject?: string;\n readonly description?: string;\n readonly blockedBy?: readonly TeamTaskId[];\n readonly writeScopes?: readonly string[];\n readonly owner?: string;\n}',
@@ -8513,7 +9683,7 @@ export const TYPE_API = [
8513
9683
  },
8514
9684
  {
8515
9685
  name: 'WebFetchProvider',
8516
- declaration: 'export interface WebFetchProvider {\n readonly id: string;\n available(): boolean;\n fetch(request: WebFetchRequest, signal?: AbortSignal): Promise<WebFetchResult>;\n}',
9686
+ declaration: 'export interface WebFetchProvider {\n readonly id: string;\n available(): boolean;\n ready?(llmProvider: string | undefined): Promise<boolean>;\n fetch(request: WebFetchRequest, signal?: AbortSignal): Promise<WebFetchResult>;\n}',
8517
9687
  },
8518
9688
  {
8519
9689
  name: 'WebFetchRequest',
@@ -8559,6 +9729,14 @@ export const TYPE_API = [
8559
9729
  name: 'WebhookSourceId',
8560
9730
  declaration: 'export type WebhookSourceId = Branded<\'WebhookSourceId\'>;',
8561
9731
  },
9732
+ {
9733
+ name: 'WebResource',
9734
+ declaration: 'export type WebResource = (request: Request, peer?: PeerScope) => Promise<Response>;',
9735
+ },
9736
+ {
9737
+ name: 'WebResourceRoute',
9738
+ declaration: 'export interface WebResourceRoute {\n kind: WebRouteKind;\n path: string;\n resource: WebResource;\n}',
9739
+ },
8562
9740
  {
8563
9741
  name: 'WebResultView',
8564
9742
  declaration: 'export type WebResultView = WebSearchResultView | WebFetchResultView;',
@@ -8573,7 +9751,7 @@ export const TYPE_API = [
8573
9751
  },
8574
9752
  {
8575
9753
  name: 'WebSearchProvider',
8576
- declaration: 'export interface WebSearchProvider {\n readonly id: string;\n available(): boolean;\n search(request: WebSearchRequest, signal?: AbortSignal): Promise<WebSearchResult>;\n}',
9754
+ declaration: 'export interface WebSearchProvider {\n readonly id: string;\n available(): boolean;\n ready?(llmProvider: string | undefined): Promise<boolean>;\n search(request: WebSearchRequest, signal?: AbortSignal): Promise<WebSearchResult>;\n}',
8577
9755
  },
8578
9756
  {
8579
9757
  name: 'WebSearchRequest',
@@ -8589,7 +9767,7 @@ export const TYPE_API = [
8589
9767
  },
8590
9768
  {
8591
9769
  name: 'WebSearchSource',
8592
- declaration: 'export interface WebSearchSource {\n readonly url: string;\n readonly title?: string;\n readonly snippet?: string;\n readonly publishedAt?: string;\n}',
9770
+ declaration: 'export interface WebSearchSource {\n readonly url: string;\n readonly title?: string;\n readonly snippet?: string;\n readonly summary?: string;\n readonly publishedAt?: string;\n}',
8593
9771
  },
8594
9772
  {
8595
9773
  name: 'WebSource',