@github/copilot-sdk 1.0.15-unstable.35395657398.gad69ee1 → 1.0.15

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.
@@ -67,6 +67,15 @@ function createServerRpc(connection) {
67
67
  getBuiltInCatalog: async () => connection.sendRequest("models.getBuiltInCatalog", {})
68
68
  },
69
69
  /** @experimental */
70
+ sandbox: {
71
+ /**
72
+ * Reports whether the host running this runtime can run the command sandbox, without starting a session or spawning a sandboxed command.
73
+ *
74
+ * @returns Whether the host running this runtime can run the command sandbox. The runtime checks `supported` once per process. A capability answer can change while the process runs, for example after the user installs a missing package.
75
+ */
76
+ getHostSupport: async () => connection.sendRequest("sandbox.getHostSupport", {})
77
+ },
78
+ /** @experimental */
70
79
  tools: {
71
80
  /**
72
81
  * Lists built-in tools available for a model.
@@ -187,7 +196,74 @@ function createServerRpc(connection) {
187
196
  *
188
197
  * @returns Outcome of an mcp.planInstall call: either a normalised plan, or one typed refusal. Nothing is written in either case.
189
198
  */
190
- planInstall: async (params) => connection.sendRequest("mcp.planInstall", params)
199
+ planInstall: async (params) => connection.sendRequest("mcp.planInstall", params),
200
+ /**
201
+ * Consumes a bound catalogue plan and retains one exact fully resolved personal remote MCP operation requiring no supplied values or configured secrets. Returns its runtime operation ID and original expiry before any confirmation, activation, writer initialisation or installation effect. Register the original connection, operation and selected-session binding before calling applyInstall. Missing lower owned admission is unavailable, never a raw-config fallback.
202
+ *
203
+ * @param params Side-effect-free preparation of one original bound remote MCP choice.
204
+ *
205
+ * @returns Management result with contract receipt, or a typed request/negotiation refusal.
206
+ */
207
+ prepareInstall: async (params) => connection.sendRequest("mcp.prepareInstall", params),
208
+ /**
209
+ * Consumes a retained prepared MCP operation once, revalidates its original authority, requests explicit human consent through installations.confirm on the original connection, then revalidates source and applies the sealed transaction. An uncertain result requires original-operation inspection or recovery, never replay.
210
+ *
211
+ * @param params Applies exactly one previously prepared operation on its original connection.
212
+ *
213
+ * @returns An installation result together with the exact honoured contract, or a negotiation refusal.
214
+ */
215
+ applyInstall: async (params) => connection.sendRequest("mcp.applyInstall", params),
216
+ /**
217
+ * Prepares a read-only removal plan for an exact owned receipt under the selected existing session. Returns the original operation ID before confirmation; neither planning nor abandonment changes configuration or shared OAuth credentials.
218
+ *
219
+ * @param params Read-only preparation of one owned removal under fresh selected-session authority.
220
+ *
221
+ * @returns Management result with contract receipt, or a typed request/negotiation refusal.
222
+ */
223
+ planUninstall: async (params) => connection.sendRequest("mcp.planUninstall", params),
224
+ /**
225
+ * Consumes the original owned-removal plan once and requests fresh exact human confirmation on its original connection. Drift is refused; unrelated manual configuration and shared OAuth credentials are preserved.
226
+ *
227
+ * @param params One-use application of the exact retained removal plan.
228
+ *
229
+ * @returns An installation result together with the exact honoured contract, or a negotiation refusal.
230
+ */
231
+ applyUninstall: async (params) => connection.sendRequest("mcp.applyUninstall", params),
232
+ /** @experimental */
233
+ installations: {
234
+ /**
235
+ * Reads receipt-owned MCP inventory for the selected account and host without activating servers or reconstructing missing ownership. Configuration ownership does not prove session-specific usability.
236
+ *
237
+ * @param params New-work inventory or recovery request under an explicitly selected existing session.
238
+ *
239
+ * @returns Management result with contract receipt, or a typed request/negotiation refusal.
240
+ */
241
+ list: async (params) => connection.sendRequest("mcp.installations.list", params),
242
+ /**
243
+ * Reconciles already-confirmed durable MCP transactions, then inspects owned inventory. Does not replay apply or reconstruct deleted ownership metadata; unresolved or unsafe evidence remains an explicit refusal.
244
+ *
245
+ * @param params New-work inventory or recovery request under an explicitly selected existing session.
246
+ *
247
+ * @returns Management result with contract receipt, or a typed request/negotiation refusal.
248
+ */
249
+ recover: async (params) => connection.sendRequest("mcp.installations.recover", params),
250
+ /**
251
+ * Inspects a known operation only on its original connection. Remains available after account or selected-session loss; does not acquire new authority or rebind an operation.
252
+ *
253
+ * @param params Existing-operation control. A new session selector is deliberately not accepted.
254
+ *
255
+ * @returns Management result with contract receipt, or a typed request/negotiation refusal.
256
+ */
257
+ status: async (params) => connection.sendRequest("mcp.installations.status", params),
258
+ /**
259
+ * Requests cancellation of a known operation on its original connection, including before apply or confirmation. Already-started effects retain their transaction lease and report an honest terminal or recovery outcome.
260
+ *
261
+ * @param params Existing-operation control. A new session selector is deliberately not accepted.
262
+ *
263
+ * @returns Management result with contract receipt, or a typed request/negotiation refusal.
264
+ */
265
+ cancel: async (params) => connection.sendRequest("mcp.installations.cancel", params)
266
+ }
191
267
  },
192
268
  /** @experimental */
193
269
  extensions: {
@@ -210,6 +286,115 @@ function createServerRpc(connection) {
210
286
  */
211
287
  disable: async (params) => connection.sendRequest("extensions.disable", params)
212
288
  },
289
+ /** @experimental */
290
+ skills: {
291
+ /**
292
+ * Plans installation of a verified Agent Finder Skill candidate without writing files. The returned review is safe to present to a user and installing always leaves the Skill disabled until separately enabled.
293
+ *
294
+ * @param params Side-effect-free planning of one verified Agent Finder Skill candidate.
295
+ *
296
+ * @returns Skill installation management result with the honoured contract, or a typed refusal.
297
+ */
298
+ planInstall: async (params) => connection.sendRequest("skills.planInstall", params),
299
+ /**
300
+ * Consumes one verified Skill installation plan, requests explicit human consent through installations.confirm on the original connection, then revalidates and installs the Skill disabled.
301
+ *
302
+ * @param params Applies exactly one retained verified Skill installation plan.
303
+ *
304
+ * @returns Skill installation result with the honoured contract, or a typed request/negotiation refusal.
305
+ */
306
+ applyInstall: async (params) => connection.sendRequest("skills.applyInstall", params),
307
+ /** @experimental */
308
+ installations: {
309
+ /**
310
+ * Lists owned verified Agent Finder Skill installations for the selected existing session. Listing is never gated by the Skill-install feature flag.
311
+ *
312
+ * @param params Inventory request under an explicitly selected existing session.
313
+ *
314
+ * @returns Skill installation management result with the honoured contract, or a typed refusal.
315
+ */
316
+ list: async (params) => connection.sendRequest("skills.installations.list", params),
317
+ /**
318
+ * Reconciles interrupted owned Skill installation work for the selected existing session, then inspects owned inventory. Recovery is never gated by the Skill-install feature flag.
319
+ *
320
+ * @param params Inventory request under an explicitly selected existing session.
321
+ *
322
+ * @returns Skill installation management result with the honoured contract, or a typed refusal.
323
+ */
324
+ recover: async (params) => connection.sendRequest("skills.installations.recover", params),
325
+ /**
326
+ * Inspects a known Skill installation operation on its original runtime connection. Status is never gated by the Skill-install feature flag.
327
+ *
328
+ * @param params Existing-operation control. A new session selector is deliberately not accepted.
329
+ *
330
+ * @returns Skill installation management result with the honoured contract, or a typed refusal.
331
+ */
332
+ status: async (params) => connection.sendRequest("skills.installations.status", params),
333
+ /**
334
+ * Requests cancellation of a known Skill installation operation before commit. Already-started durable work requires recovery instead of silent replay.
335
+ *
336
+ * @param params Existing-operation control. A new session selector is deliberately not accepted.
337
+ *
338
+ * @returns Skill installation management result with the honoured contract, or a typed refusal.
339
+ */
340
+ cancel: async (params) => connection.sendRequest("skills.installations.cancel", params),
341
+ /**
342
+ * Atomically persists enablement for one owned Agent Finder Skill and reconciles the selected bound session. Enablement is installation-scoped by receipt identity and is never gated by the Skill-install feature flag.
343
+ *
344
+ * @param params Persisted enablement update for one owned Skill installation.
345
+ *
346
+ * @returns Skill installation management result with the honoured contract, or a typed refusal.
347
+ */
348
+ setEnabled: async (params) => connection.sendRequest("skills.installations.setEnabled", params)
349
+ },
350
+ /**
351
+ * Prepares a read-only removal plan for an owned verified Agent Finder Skill installation. Uninstall planning is never gated by the Skill-install feature flag.
352
+ *
353
+ * @param params Read-only preparation of one owned Skill removal under fresh selected-session authority.
354
+ *
355
+ * @returns Skill installation management result with the honoured contract, or a typed refusal.
356
+ */
357
+ planUninstall: async (params) => connection.sendRequest("skills.planUninstall", params),
358
+ /**
359
+ * Consumes an owned Skill removal plan, requests explicit human consent through installations.confirm, refuses drift, and removes the exact owned files through quarantine.
360
+ *
361
+ * @param params One-use application of the exact retained Skill removal plan.
362
+ *
363
+ * @returns Skill installation result with the honoured contract, or a typed request/negotiation refusal.
364
+ */
365
+ applyUninstall: async (params) => connection.sendRequest("skills.applyUninstall", params),
366
+ /** @experimental */
367
+ config: {
368
+ /**
369
+ * Replaces the global list of disabled skills.
370
+ *
371
+ * @param params Skill names to mark as disabled in global configuration, replacing any previous list.
372
+ */
373
+ setDisabledSkills: async (params) => connection.sendRequest("skills.config.setDisabledSkills", params),
374
+ /**
375
+ * Atomically adds or removes one skill from the disabled list.
376
+ *
377
+ * @param params Adds or removes a single skill from the global disabled list, leaving every other entry untouched.
378
+ */
379
+ setSkillDisabled: async (params) => connection.sendRequest("skills.config.setSkillDisabled", params)
380
+ },
381
+ /**
382
+ * Discovers skills across global and project sources.
383
+ *
384
+ * @param params Optional project paths and additional skill directories to include in discovery.
385
+ *
386
+ * @returns Skills discovered across global and project sources.
387
+ */
388
+ discover: async (params) => connection.sendRequest("skills.discover", params),
389
+ /**
390
+ * Returns the canonical directories where a client may create skills that the runtime will recognize, including ones that do not exist yet. Project directories become active once created.
391
+ *
392
+ * @param params Optional project paths to enumerate.
393
+ *
394
+ * @returns Canonical locations where skills can be created so the runtime will recognize them.
395
+ */
396
+ getDiscoveryPaths: async (params) => connection.sendRequest("skills.getDiscoveryPaths", params)
397
+ },
213
398
  /**
214
399
  * Registers the calling SDK client as the per-entrypoint extension launch provider. Call before creating any sessions. When omitted, the runtime uses its built-in extension launcher.
215
400
  *
@@ -225,7 +410,15 @@ function createServerRpc(connection) {
225
410
  *
226
411
  * @returns Outcome of a catalog.search call: either bounded inert candidates, or one typed refusal. Never a partial success.
227
412
  */
228
- search: async (params) => connection.sendRequest("catalog.search", params)
413
+ search: async (params) => connection.sendRequest("catalog.search", params),
414
+ /**
415
+ * Terminates one retained catalog selection group. A selected outcome returns the native host a fresh single-use candidate handle plus the original searchId for a later explicit mcp.planInstall call; non-selected outcomes release the group without producing a planning input. Candidate state, cards, URLs, credentials and private identifiers remain inside the runtime. The model-facing catalog_select tool projects the result separately and never exposes the candidate handle or searchId.
416
+ *
417
+ * @param params Terminates one retained catalog selection group through an opaque reference previously returned by the model-safe search projection.
418
+ *
419
+ * @returns Typed outcome of catalog.select. Only the selected host result carries a fresh candidate handle; the model-facing projection removes both that handle and searchId.
420
+ */
421
+ select: async (params) => connection.sendRequest("catalog.select", params)
229
422
  },
230
423
  /** @experimental */
231
424
  plugins: {
@@ -327,40 +520,6 @@ function createServerRpc(connection) {
327
520
  }
328
521
  },
329
522
  /** @experimental */
330
- skills: {
331
- /** @experimental */
332
- config: {
333
- /**
334
- * Replaces the global list of disabled skills.
335
- *
336
- * @param params Skill names to mark as disabled in global configuration, replacing any previous list.
337
- */
338
- setDisabledSkills: async (params) => connection.sendRequest("skills.config.setDisabledSkills", params),
339
- /**
340
- * Atomically adds or removes one skill from the disabled list.
341
- *
342
- * @param params Adds or removes a single skill from the global disabled list, leaving every other entry untouched.
343
- */
344
- setSkillDisabled: async (params) => connection.sendRequest("skills.config.setSkillDisabled", params)
345
- },
346
- /**
347
- * Discovers skills across global and project sources.
348
- *
349
- * @param params Optional project paths and additional skill directories to include in discovery.
350
- *
351
- * @returns Skills discovered across global and project sources.
352
- */
353
- discover: async (params) => connection.sendRequest("skills.discover", params),
354
- /**
355
- * Returns the canonical directories where a client may create skills that the runtime will recognize, including ones that do not exist yet. Project directories become active once created.
356
- *
357
- * @param params Optional project paths to enumerate.
358
- *
359
- * @returns Canonical locations where skills can be created so the runtime will recognize them.
360
- */
361
- getDiscoveryPaths: async (params) => connection.sendRequest("skills.getDiscoveryPaths", params)
362
- },
363
- /** @experimental */
364
523
  agents: {
365
524
  /**
366
525
  * Discovers custom agents across user, project, plugin, and remote sources.
@@ -456,7 +615,7 @@ function createServerRpc(connection) {
456
615
  /**
457
616
  * Registers an SDK client as the session filesystem provider.
458
617
  *
459
- * @param params Initial working directory, session-state path layout, and path conventions used to register the calling SDK client as the session filesystem provider.
618
+ * @param params Initial working directory, session-state path layout, and path conventions used to register the calling SDK client as the session filesystem provider. A registered provider is authoritative for path interpretation and filesystem facts used by workspace permission validation. Paths are interpreted lexically; home-relative paths (`~` and `~/...`) and Windows drive-relative paths such as `C:foo` are unsupported. Until provider-side canonicalization is supported, providers must not expose symlinks inside allowed roots that escape those roots.
460
619
  *
461
620
  * @returns Indicates whether the calling client was registered as the session filesystem provider.
462
621
  */
@@ -765,6 +924,17 @@ function createInternalServerRpc(connection) {
765
924
  * @param params Params to attach or detach an in-process ExtensionController delegate.
766
925
  */
767
926
  configureSessionExtensions: async (params) => connection.sendRequest("sessions.configureSessionExtensions", params)
927
+ },
928
+ /** @experimental */
929
+ accounts: {
930
+ /**
931
+ * Acquire a Microsoft Entra access token through the runtime's OneAuth broker. Account-scoped because it uses the same native broker as the account stack: a trusted host application mints a scoped Entra token for its own use, most notably to authenticate to a remote MCP server whose authorization server is Entra ID (in place of the generic browser-OAuth flow).
932
+ *
933
+ * @param params OneAuth token request supplied by a trusted host application.
934
+ *
935
+ * @returns Result of a OneAuth token acquisition.
936
+ */
937
+ acquireEntraToken: async (params) => connection.sendRequest("accounts.acquireEntraToken", params)
768
938
  }
769
939
  };
770
940
  }
@@ -867,6 +1037,58 @@ function createSessionRpc(connection, sessionId) {
867
1037
  setCredentials: async (params) => connection.sendRequest("session.gitHubAuth.setCredentials", { sessionId, ...params })
868
1038
  },
869
1039
  /** @experimental */
1040
+ accounts: {
1041
+ /**
1042
+ * Enumerate a typed accounts collection: the signed-in accounts, or the providers offered for interactive login.
1043
+ *
1044
+ * @param params Enumerate request carrying the typed collection query.
1045
+ *
1046
+ * @returns The enumerated collection, keyed by the same selector as the query.
1047
+ */
1048
+ enumerate: async (params) => connection.sendRequest("session.accounts.enumerate", { sessionId, ...params }),
1049
+ /**
1050
+ * Read one typed accounts datum: the active account, a neutral status summary, or the last authentication errors.
1051
+ *
1052
+ * @param params Read request carrying the typed datum query.
1053
+ *
1054
+ * @returns The read result, keyed by the same selector as the query.
1055
+ */
1056
+ get: async (params) => connection.sendRequest("session.accounts.get", { sessionId, ...params }),
1057
+ /**
1058
+ * Apply one non-interactive accounts mutation: switch the active account, log an account out, or set credentials from a token.
1059
+ *
1060
+ * @param params Mutation request carrying the typed write command.
1061
+ *
1062
+ * @returns Result of a non-interactive accounts mutation.
1063
+ */
1064
+ set: async (params) => connection.sendRequest("session.accounts.set", { sessionId, ...params }),
1065
+ /** @experimental */
1066
+ login: {
1067
+ /**
1068
+ * Begin an interactive login flow for a provider kind (dispatch is kind-only) and return its opaque flow id and first step.
1069
+ *
1070
+ * @param params Begin an interactive login flow for a provider kind. Dispatch is kind-only.
1071
+ *
1072
+ * @returns A started login flow: its opaque id and first step.
1073
+ */
1074
+ begin: async (params) => connection.sendRequest("session.accounts.login.begin", { sessionId, ...params }),
1075
+ /**
1076
+ * Advance an in-flight login flow, optionally fulfilling an input-required step, and return the next step.
1077
+ *
1078
+ * @param params Advance an in-flight login flow, optionally fulfilling an input-required step.
1079
+ *
1080
+ * @returns One step in an interactive login flow. The consumer acts on the step and calls advance to proceed. Browser-open is encoded as two distinct steps by design: `open-url` is CONSUMER-driven (the provider surfaces the authorize URL and the consumer opens it — github.com/GHEC web), while `needs-interaction` is PROVIDER-driven (the provider opens the browser or broker UI itself and does not surface a URL — Entra).
1081
+ */
1082
+ advance: async (params) => connection.sendRequest("session.accounts.login.advance", { sessionId, ...params }),
1083
+ /**
1084
+ * Cancel an in-flight login flow and release its resources.
1085
+ *
1086
+ * @param params Cancel an in-flight login flow.
1087
+ */
1088
+ cancel: async (params) => connection.sendRequest("session.accounts.login.cancel", { sessionId, ...params })
1089
+ }
1090
+ },
1091
+ /** @experimental */
870
1092
  debug: {
871
1093
  /**
872
1094
  * Collects a session debug log bundle into a local archive or staging directory. Logs are redacted by default; redaction can be configured per caller-provided diagnostic entry. The runtime includes session-owned logs by default and accepts caller-provided diagnostic entries so host applications can add their own files without changing this API shape.
@@ -918,105 +1140,105 @@ function createSessionRpc(connection, sessionId) {
918
1140
  }
919
1141
  },
920
1142
  /** @experimental */
921
- factory: {
1143
+ workflow: {
922
1144
  /**
923
- * Runs a registered factory by name at the top level.
1145
+ * Runs a registered dynamic workflow by name at the top level.
924
1146
  *
925
- * @param params Parameters for invoking a registered factory.
1147
+ * @param params Parameters for invoking a registered workflow.
926
1148
  *
927
- * @returns Complete current or terminal factory run envelope.
1149
+ * @returns Complete current or terminal workflow run envelope.
928
1150
  */
929
- run: async (params) => connection.sendRequest("session.factory.run", { sessionId, ...params }),
1151
+ run: async (params) => connection.sendRequest("session.workflow.run", { sessionId, ...params }),
930
1152
  /**
931
- * Resumes a factory run using its persisted name, arguments, journal, and accounting.
1153
+ * Resumes a dynamic workflow run using its persisted name, arguments, journal, and accounting.
932
1154
  *
933
- * @param params Parameters for resuming a factory run from its persisted identity.
1155
+ * @param params Parameters for resuming a workflow run from its persisted identity.
934
1156
  *
935
- * @returns Resolved persisted factory identity and resumed run envelope.
1157
+ * @returns Resolved persisted workflow identity and resumed run envelope.
936
1158
  */
937
- resume: async (params) => connection.sendRequest("session.factory.resume", { sessionId, ...params }),
1159
+ resume: async (params) => connection.sendRequest("session.workflow.resume", { sessionId, ...params }),
938
1160
  /**
939
- * Gets the current or settled envelope for a factory run.
1161
+ * Gets the current or settled envelope for a dynamic workflow run.
940
1162
  *
941
- * @param params Parameters for retrieving a factory run.
1163
+ * @param params Parameters for retrieving a workflow run.
942
1164
  *
943
- * @returns Complete current or terminal factory run envelope.
1165
+ * @returns Complete current or terminal workflow run envelope.
944
1166
  */
945
- getRun: async (params) => connection.sendRequest("session.factory.getRun", { sessionId, ...params }),
1167
+ getRun: async (params) => connection.sendRequest("session.workflow.getRun", { sessionId, ...params }),
946
1168
  /**
947
- * Lists durable factory runs for this session in creation order.
1169
+ * Lists durable dynamic workflow runs for this session in creation order.
948
1170
  *
949
- * @param params Parameters for paging factory runs.
1171
+ * @param params Parameters for paging workflow runs.
950
1172
  *
951
- * @returns A page of factory runs in durable creation order.
1173
+ * @returns A page of workflow runs in durable creation order.
952
1174
  */
953
- listRuns: async (params) => connection.sendRequest("session.factory.listRuns", { sessionId, ...params }),
1175
+ listRuns: async (params) => connection.sendRequest("session.workflow.listRuns", { sessionId, ...params }),
954
1176
  /**
955
- * Gets durable and live observability detail for one factory run.
1177
+ * Gets durable and live observability detail for one dynamic workflow run.
956
1178
  *
957
- * @param params Parameters for retrieving a factory run.
1179
+ * @param params Parameters for retrieving a workflow run.
958
1180
  *
959
- * @returns Full factory run observability detail.
1181
+ * @returns Full workflow run observability detail.
960
1182
  */
961
- getRunDetail: async (params) => connection.sendRequest("session.factory.getRunDetail", { sessionId, ...params }),
1183
+ getRunDetail: async (params) => connection.sendRequest("session.workflow.getRunDetail", { sessionId, ...params }),
962
1184
  /**
963
- * Pages durable progress for one factory run.
1185
+ * Pages durable progress for one dynamic workflow run.
964
1186
  *
965
- * @param params Parameters for paging factory progress.
1187
+ * @param params Parameters for paging workflow progress.
966
1188
  *
967
- * @returns A bidirectional page of factory progress.
1189
+ * @returns A bidirectional page of workflow progress.
968
1190
  */
969
- getRunProgress: async (params) => connection.sendRequest("session.factory.getRunProgress", { sessionId, ...params }),
1191
+ getRunProgress: async (params) => connection.sendRequest("session.workflow.getRunProgress", { sessionId, ...params }),
970
1192
  /**
971
- * Requests cancellation of a factory run and returns its run envelope.
1193
+ * Requests cancellation of a dynamic workflow run and returns its run envelope.
972
1194
  *
973
- * @param params Parameters for cancelling a factory run.
1195
+ * @param params Parameters for cancelling a workflow run.
974
1196
  *
975
- * @returns Complete current or terminal factory run envelope.
1197
+ * @returns Complete current or terminal workflow run envelope.
976
1198
  */
977
- cancel: async (params) => connection.sendRequest("session.factory.cancel", { sessionId, ...params }),
1199
+ cancel: async (params) => connection.sendRequest("session.workflow.cancel", { sessionId, ...params }),
978
1200
  /**
979
- * Pauses a running factory and returns its settled run envelope.
1201
+ * Pauses a running dynamic workflow and returns its settled run envelope.
980
1202
  *
981
- * @param params Parameters for pausing a running factory.
1203
+ * @param params Parameters for pausing a running workflow.
982
1204
  *
983
- * @returns Complete current or terminal factory run envelope.
1205
+ * @returns Complete current or terminal workflow run envelope.
984
1206
  */
985
- pause: async (params) => connection.sendRequest("session.factory.pause", { sessionId, ...params }),
1207
+ pause: async (params) => connection.sendRequest("session.workflow.pause", { sessionId, ...params }),
986
1208
  /**
987
- * Records a batch of ordered factory progress lines.
1209
+ * Records a batch of ordered dynamic workflow progress lines.
988
1210
  *
989
- * @param params Parameters for recording factory progress.
1211
+ * @param params Parameters for recording workflow progress.
990
1212
  *
991
- * @returns Acknowledgement that a factory request was accepted.
1213
+ * @returns Acknowledgement that a workflow request was accepted.
992
1214
  */
993
- log: async (params) => connection.sendRequest("session.factory.log", { sessionId, ...params }),
1215
+ log: async (params) => connection.sendRequest("session.workflow.log", { sessionId, ...params }),
994
1216
  /**
995
- * Runs one factory-scoped subagent and returns its result.
1217
+ * Runs one dynamic-workflow-scoped subagent and returns its result.
996
1218
  *
997
- * @param params Parameters for one factory-scoped subagent call.
1219
+ * @param params Parameters for one workflow-scoped subagent call.
998
1220
  *
999
- * @returns Result of one factory-scoped subagent call.
1221
+ * @returns Result of one workflow-scoped subagent call.
1000
1222
  */
1001
- agent: async (params) => connection.sendRequest("session.factory.agent", { sessionId, ...params }),
1223
+ agent: async (params) => connection.sendRequest("session.workflow.agent", { sessionId, ...params }),
1002
1224
  /** @experimental */
1003
1225
  journal: {
1004
1226
  /**
1005
- * Reads a memoized factory journal entry.
1227
+ * Reads a memoized dynamic workflow journal entry.
1006
1228
  *
1007
- * @param params Parameters for reading a factory journal entry.
1229
+ * @param params Parameters for reading a workflow journal entry.
1008
1230
  *
1009
- * @returns Result of reading a factory journal entry.
1231
+ * @returns Result of reading a workflow journal entry.
1010
1232
  */
1011
- get: async (params) => connection.sendRequest("session.factory.journal.get", { sessionId, ...params }),
1233
+ get: async (params) => connection.sendRequest("session.workflow.journal.get", { sessionId, ...params }),
1012
1234
  /**
1013
- * Stores a memoized factory journal entry.
1235
+ * Stores a memoized dynamic workflow journal entry.
1014
1236
  *
1015
- * @param params Parameters for storing a factory journal entry.
1237
+ * @param params Parameters for storing a workflow journal entry.
1016
1238
  *
1017
- * @returns Acknowledgement that a factory request was accepted.
1239
+ * @returns Acknowledgement that a workflow request was accepted.
1018
1240
  */
1019
- put: async (params) => connection.sendRequest("session.factory.journal.put", { sessionId, ...params })
1241
+ put: async (params) => connection.sendRequest("session.workflow.journal.put", { sessionId, ...params })
1020
1242
  }
1021
1243
  },
1022
1244
  /** @experimental */
@@ -1315,7 +1537,20 @@ function createSessionRpc(connection, sessionId) {
1315
1537
  *
1316
1538
  * @returns Instruction sources loaded for the session, in merge order.
1317
1539
  */
1318
- getSources: async () => connection.sendRequest("session.instructions.getSources", { sessionId })
1540
+ getSources: async () => connection.sendRequest("session.instructions.getSources", { sessionId }),
1541
+ /**
1542
+ * Invalidates cached custom-instruction discovery so subsequent turns and source reads observe instruction files currently on disk.
1543
+ */
1544
+ reload: async () => connection.sendRequest("session.instructions.reload", { sessionId })
1545
+ },
1546
+ /** @experimental */
1547
+ customizations: {
1548
+ /**
1549
+ * Reloads all repository and user customizations for the active session: instructions, plugins and their MCP servers and hooks, custom agents, extensions, and skills. Returns diagnostics from the final skill reload.
1550
+ *
1551
+ * @returns Diagnostics from reloading skill definitions, with warnings and errors as separate lists.
1552
+ */
1553
+ reload: async () => connection.sendRequest("session.customizations.reload", { sessionId })
1319
1554
  },
1320
1555
  /** @experimental */
1321
1556
  fleet: {
@@ -1614,7 +1849,15 @@ function createSessionRpc(connection, sessionId) {
1614
1849
  */
1615
1850
  authenticationStateChanged: async (params) => connection.sendRequest("session.mcp.oauth.authenticationStateChanged", { sessionId, ...params }),
1616
1851
  /**
1617
- * Starts OAuth authentication for a remote MCP server.
1852
+ * Prepares an inert, expiring owned OAuth login bound to the original session requester and exact installation. Does not activate, connect, read credentials or open a browser.
1853
+ *
1854
+ * @param params Effect-free preparation bound to the existing local session, requester and installation, with frozen options.
1855
+ *
1856
+ * @returns An inert runtime-issued login handle. Preparation alone performs no activation or OAuth work.
1857
+ */
1858
+ prepareLogin: async (params) => connection.sendRequest("session.mcp.oauth.prepareLogin", { sessionId, ...params }),
1859
+ /**
1860
+ * Starts OAuth authentication for a remote MCP server. Owned servers require the original one-use prepareLogin handle and exact installation ID; manual servers retain the existing direct login behaviour.
1618
1861
  *
1619
1862
  * @param params Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, callback success-page copy, and static OAuth client selection.
1620
1863
  *
@@ -1629,6 +1872,14 @@ function createSessionRpc(connection, sessionId) {
1629
1872
  * @returns Passive MCP OAuth probe result. `authenticated` means the server accepted the probe request while an OAuth-origin access token was attached; it does not prove the server required or independently validated that token. The probe does not make a second unauthenticated request. Failed is an expected probe-domain outcome; JSON-RPC errors are reserved for API-call failures.
1630
1873
  */
1631
1874
  probe: async (params) => connection.sendRequest("session.mcp.oauth.probe", { sessionId, ...params }),
1875
+ /**
1876
+ * Cancels the exact owned OAuth login issued to this original session requester, without clearing shared credentials.
1877
+ *
1878
+ * @param params Targets only the original prepared/applying owned login on this exact session requester.
1879
+ *
1880
+ * @returns Honest terminal cancellation result; persistence or recovery failures remain RPC errors.
1881
+ */
1882
+ cancelLogin: async (params) => connection.sendRequest("session.mcp.oauth.cancelLogin", { sessionId, ...params }),
1632
1883
  /**
1633
1884
  * Responds to a pending MCP OAuth authorization request by its request id.
1634
1885
  *
@@ -1725,13 +1976,187 @@ function createSessionRpc(connection, sessionId) {
1725
1976
  }
1726
1977
  },
1727
1978
  /** @experimental */
1979
+ diagnostics: {
1980
+ /**
1981
+ * Patches configured session diagnostic sources without restarting their producers. Setting a source level to off clears its retained diagnostics and invalidates cursors selecting that source.
1982
+ *
1983
+ * @param params Patch session diagnostic thresholds for explicitly supplied sources.
1984
+ *
1985
+ * @returns Per-source session diagnostics configuration.
1986
+ */
1987
+ configure: async (params) => connection.sendRequest("session.diagnostics.configure", { sessionId, ...params }),
1988
+ /**
1989
+ * Reads a bounded batch of retained session diagnostics for the selected sources. Records are never consumed and each reader advances independently through its opaque cursor.
1990
+ *
1991
+ * @param params Cursor-based request for session diagnostics. The default limit is 100 (maximum 500); the default waitMs is zero (maximum 30000).
1992
+ *
1993
+ * @returns One cursor-addressed page of retained session diagnostics.
1994
+ */
1995
+ read: async (params) => connection.sendRequest("session.diagnostics.read", { sessionId, ...params })
1996
+ },
1997
+ /** @experimental */
1998
+ connectors: {
1999
+ /**
2000
+ * Returns feature availability and bounded polling limits for the EXPERIMENTAL session connector API. This method never performs a Connector service request.
2001
+ *
2002
+ * @returns Feature detection and hard polling limits for the EXPERIMENTAL session connector API.
2003
+ */
2004
+ getCapabilities: async () => connection.sendRequest("session.connectors.getCapabilities", { sessionId }),
2005
+ /**
2006
+ * Returns authoritative session Connector state from current availability, pinned account selection, cached catalog, and live MCP projection without performing a Connector service request.
2007
+ *
2008
+ * @returns Authoritative session connector state. Account IDs are opaque routing identifiers and credentials are never included.
2009
+ */
2010
+ getStatus: async () => connection.sendRequest("session.connectors.getStatus", { sessionId }),
2011
+ /**
2012
+ * Returns the cached Connector catalog for the pinned opaque account selection, fetching it only when this session has no cached catalog.
2013
+ *
2014
+ * @param params Pins a Connector operation to one host-owned GitHub account through its opaque selection ID. Provider tokens are never accepted.
2015
+ *
2016
+ * @returns Validated Connector catalog snapshot cached by the session.
2017
+ */
2018
+ list: async (params) => connection.sendRequest("session.connectors.list", { sessionId, ...params }),
2019
+ /**
2020
+ * Refreshes and validates the Connector catalog for the pinned opaque account selection.
2021
+ *
2022
+ * @param params Pins a Connector operation to one host-owned GitHub account through its opaque selection ID. Provider tokens are never accepted.
2023
+ *
2024
+ * @returns Validated Connector catalog snapshot cached by the session.
2025
+ */
2026
+ refresh: async (params) => connection.sendRequest("session.connectors.refresh", { sessionId, ...params }),
2027
+ /**
2028
+ * Initiates an idempotent Connector connection request without opening a browser. Returns connected when the service is immediately authoritative, consent_required with a validated URL, or pending with an opaque continuation ID.
2029
+ *
2030
+ * @param params Selects one Connector and the pinned host-owned account used for its service and MCP authorization.
2031
+ *
2032
+ * @returns Typed result of initiating or continuing a Connector connection.
2033
+ */
2034
+ connect: async (params) => connection.sendRequest("session.connectors.connect", { sessionId, ...params }),
2035
+ /**
2036
+ * Re-initiates an idempotent Connector connection request without browser or UI effects, with the same typed outcomes as connect.
2037
+ *
2038
+ * @param params Selects one Connector and the pinned host-owned account used for its service and MCP authorization.
2039
+ *
2040
+ * @returns Typed result of initiating or continuing a Connector connection.
2041
+ */
2042
+ reconnect: async (params) => connection.sendRequest("session.connectors.reconnect", { sessionId, ...params }),
2043
+ /**
2044
+ * Continues a pending Connector connection with caller-supplied attempt, interval, and deadline bounds. The runtime never opens the returned consent URL.
2045
+ *
2046
+ * @param params Explicitly bounded continuation of a pending Connector connection.
2047
+ *
2048
+ * @returns Typed result of initiating or continuing a Connector connection.
2049
+ */
2050
+ continueConnection: async (params) => connection.sendRequest("session.connectors.continueConnection", { sessionId, ...params }),
2051
+ /**
2052
+ * Disconnects one Connector for the pinned opaque account selection, refreshes the authoritative catalog, and removes its session-owned MCP projection.
2053
+ *
2054
+ * @param params Selects one Connector and the pinned host-owned account used for its service and MCP authorization.
2055
+ *
2056
+ * @returns Authoritative result after disconnect and MCP reconciliation.
2057
+ */
2058
+ disconnect: async (params) => connection.sendRequest("session.connectors.disconnect", { sessionId, ...params }),
2059
+ /**
2060
+ * Reconciles the authoritative cached or freshly requested Connector catalog into the session Connector MCP projection and returns live status.
2061
+ *
2062
+ * @param params Requests authoritative Connector-to-MCP reconciliation for the pinned account.
2063
+ *
2064
+ * @returns Authoritative session connector state. Account IDs are opaque routing identifiers and credentials are never included.
2065
+ */
2066
+ reconcile: async (params) => connection.sendRequest("session.connectors.reconcile", { sessionId, ...params })
2067
+ },
2068
+ /** @experimental */
2069
+ managedSettings: {
2070
+ /**
2071
+ * Waits for the live session's in-flight managed-settings application, then returns the retained effective snapshot used by runtime enforcement and by `session.managed_settings_resolved`. It does not perform another account, device, or server resolution, and rejects when resolution has not produced a snapshot.
2072
+ *
2073
+ * @returns Enterprise managed-settings resolution: the effective managed settings the session applied and which channels contributed, so SDK clients can show users what is enterprise-managed. Fires whenever managed policy is (re)applied — at session start, on resume, and on account switch. This is an ephemeral live snapshot (delivered to subscribers but not persisted to the session event log), because at session start it resolves before `session.start` is emitted. Device values take precedence over server values, then the policy helper, per ordinary key, while permissions compose restrictively across device, server, policy-helper, and SDK-client layers. The account-scoped `getManagedSettings()` API does not include session-local client injection. Marked experimental while the managed-settings surface stabilizes.
2074
+ */
2075
+ get: async () => connection.sendRequest("session.managedSettings.get", { sessionId })
2076
+ },
2077
+ /** @experimental */
1728
2078
  plugins: {
1729
2079
  /**
1730
- * Lists plugins installed for the session.
2080
+ * Lists globally installed, live, built-in, and enterprise-managed desired plugins using the live session's authoritative account, working directory, and retained managed policy.
1731
2081
  *
1732
2082
  * @returns Plugins installed for the session, with their enabled state and version metadata.
1733
2083
  */
1734
2084
  list: async () => connection.sendRequest("session.plugins.list", { sessionId }),
2085
+ /**
2086
+ * Installs a plugin using the live session's authoritative account, working directory, and retained managed policy.
2087
+ *
2088
+ * @param params Plugin source resolved relative to the session's authoritative working directory.
2089
+ *
2090
+ * @returns Result of installing a plugin.
2091
+ */
2092
+ install: async (params) => connection.sendRequest("session.plugins.install", { sessionId, ...params }),
2093
+ /**
2094
+ * Uninstalls a plugin when permitted by the live session's retained managed policy.
2095
+ *
2096
+ * @param params Name (or spec) of the plugin to uninstall.
2097
+ */
2098
+ uninstall: async (params) => connection.sendRequest("session.plugins.uninstall", { sessionId, ...params }),
2099
+ /**
2100
+ * Updates an installed plugin using the live session's authoritative account, working directory, and retained managed policy.
2101
+ *
2102
+ * @param params Name (or spec) of the plugin to update.
2103
+ *
2104
+ * @returns Result of updating a single plugin.
2105
+ */
2106
+ update: async (params) => connection.sendRequest("session.plugins.update", { sessionId, ...params }),
2107
+ /**
2108
+ * Enables installed plugins when permitted by the live session's retained managed policy.
2109
+ *
2110
+ * @param params Plugin names (or specs) to enable in the session's authoritative working directory.
2111
+ */
2112
+ enable: async (params) => connection.sendRequest("session.plugins.enable", { sessionId, ...params }),
2113
+ /**
2114
+ * Disables installed plugins when permitted by the live session's retained managed policy.
2115
+ *
2116
+ * @param params Plugin names (or specs) to disable in the session's authoritative working directory.
2117
+ */
2118
+ disable: async (params) => connection.sendRequest("session.plugins.disable", { sessionId, ...params }),
2119
+ /** @experimental */
2120
+ marketplaces: {
2121
+ /**
2122
+ * Lists registered and enterprise-managed desired marketplaces using the live session's retained policy.
2123
+ *
2124
+ * @returns All registered marketplaces, including built-in defaults.
2125
+ */
2126
+ list: async () => connection.sendRequest("session.plugins.marketplaces.list", { sessionId }),
2127
+ /**
2128
+ * Adds a marketplace when permitted by the live session's retained managed policy.
2129
+ *
2130
+ * @param params Marketplace source and optional working directory for relative-path resolution.
2131
+ *
2132
+ * @returns Result of registering a new marketplace.
2133
+ */
2134
+ add: async (params) => connection.sendRequest("session.plugins.marketplaces.add", { sessionId, ...params }),
2135
+ /**
2136
+ * Removes a marketplace when permitted by the live session's retained managed policy.
2137
+ *
2138
+ * @param params Name of the marketplace to remove and an optional force flag.
2139
+ *
2140
+ * @returns Outcome of the remove attempt, including dependent-plugin info when applicable.
2141
+ */
2142
+ remove: async (params) => connection.sendRequest("session.plugins.marketplaces.remove", { sessionId, ...params }),
2143
+ /**
2144
+ * Browses a marketplace resolved through the live session's working directory and retained managed policy.
2145
+ *
2146
+ * @param params Name of the marketplace whose plugin catalog to fetch.
2147
+ *
2148
+ * @returns Plugins advertised by the marketplace.
2149
+ */
2150
+ browse: async (params) => connection.sendRequest("session.plugins.marketplaces.browse", { sessionId, ...params }),
2151
+ /**
2152
+ * Refreshes marketplaces resolved through the live session's working directory and retained managed policy.
2153
+ *
2154
+ * @param params Optional marketplace name; omit to refresh all.
2155
+ *
2156
+ * @returns Result of refreshing one or more marketplace catalogs.
2157
+ */
2158
+ refresh: async (params) => connection.sendRequest("session.plugins.marketplaces.refresh", { sessionId, ...params })
2159
+ },
1735
2160
  /**
1736
2161
  * Reloads the session's plugin set, refreshing MCP servers, custom agents, hooks, and skills cache so SDK-driven changes via `server.plugins.*` take effect immediately.
1737
2162
  *
@@ -1756,7 +2181,15 @@ function createSessionRpc(connection, sessionId) {
1756
2181
  *
1757
2182
  * @returns The selectable model entries synthesized for the models added by this call.
1758
2183
  */
1759
- add: async (params) => connection.sendRequest("session.provider.add", { sessionId, ...params })
2184
+ add: async (params) => connection.sendRequest("session.provider.add", { sessionId, ...params }),
2185
+ /**
2186
+ * Atomically updates the session's BYOK provider and model registry by applying the supplied snapshot, replacing existing entries, updating models, or removing entries absent from the snapshot.
2187
+ *
2188
+ * @param params Authoritative BYOK provider and model registry snapshot to apply atomically to the session.
2189
+ *
2190
+ * @returns The selectable model entries and selection ids synthesized for the synchronized BYOK models.
2191
+ */
2192
+ sync: async (params) => connection.sendRequest("session.provider.sync", { sessionId, ...params })
1760
2193
  },
1761
2194
  /** @experimental */
1762
2195
  options: {
@@ -2082,9 +2515,9 @@ function createSessionRpc(connection, sessionId) {
2082
2515
  */
2083
2516
  setRequired: async (params) => connection.sendRequest("session.permissions.setRequired", { sessionId, ...params }),
2084
2517
  /**
2085
- * Clears session-scoped tool permission approvals.
2518
+ * Clears session-scoped tool approvals and, for full resets, exact session-approved paths.
2086
2519
  *
2087
- * @param params Clears session-scoped tool permission approvals, and optionally the location-scoped ones.
2520
+ * @param params Clears session-scoped tool approvals and optionally clears location-scoped approvals and exact session-approved paths.
2088
2521
  *
2089
2522
  * @returns Indicates whether the operation succeeded.
2090
2523
  */
@@ -2100,9 +2533,9 @@ function createSessionRpc(connection, sessionId) {
2100
2533
  /** @experimental */
2101
2534
  paths: {
2102
2535
  /**
2103
- * Returns the session's allowed directories and primary working directory.
2536
+ * Returns the session's recursive directory grants, exact session-approved paths, and primary working directory.
2104
2537
  *
2105
- * @returns Snapshot of the session's allow-listed directories and primary working directory.
2538
+ * @returns Snapshot of the session's recursive directory grants, exact session-approved paths, and primary working directory.
2106
2539
  */
2107
2540
  list: async () => connection.sendRequest("session.permissions.paths.list", { sessionId }),
2108
2541
  /**
@@ -2440,6 +2873,22 @@ function createSessionRpc(connection, sessionId) {
2440
2873
  * @returns Result of editing a queued message.
2441
2874
  */
2442
2875
  updateText: async (params) => connection.sendRequest("session.queue.updateText", { sessionId, ...params }),
2876
+ /**
2877
+ * Atomically withdraws an unchanged user message of a local session: from the queued or steering lane while unconsumed, or from the running turn it started while the model has not answered it and nothing the user sent after it is pending. Withdrawing from the running turn interrupts that turn and removes its events from history. A client retaining the original draft may restore it only when removed is true.
2878
+ *
2879
+ * @param params Conditional withdrawal of a single user message, from its queue or from the running turn it started.
2880
+ *
2881
+ * @returns Result of withdrawing a user message.
2882
+ */
2883
+ withdrawMessage: async (params) => connection.sendRequest("session.queue.withdrawMessage", { sessionId, ...params }),
2884
+ /**
2885
+ * Atomically appends text and attachments to an unchanged, unconsumed local steering message. Returns updated=false if delivery or withdrawal already claimed the message.
2886
+ *
2887
+ * @param params Append to one pending steering message without changing its identity or delivery position.
2888
+ *
2889
+ * @returns Result of editing a queued message.
2890
+ */
2891
+ appendSteering: async (params) => connection.sendRequest("session.queue.appendSteering", { sessionId, ...params }),
2443
2892
  /**
2444
2893
  * Duplicates an addressable queued item immediately after its source.
2445
2894
  *
@@ -2669,29 +3118,29 @@ function createInternalSessionRpc(connection, sessionId) {
2669
3118
  }
2670
3119
  },
2671
3120
  /** @experimental */
2672
- factory: {
3121
+ workflow: {
2673
3122
  /**
2674
- * Internal tool-originated factory invocation.
3123
+ * Internal tool-originated dynamic workflow invocation.
2675
3124
  *
2676
- * @param params Internal parameters for invoking a registered factory from a tool.
3125
+ * @param params Internal parameters for invoking a registered workflow from a tool.
2677
3126
  *
2678
- * @returns Complete current or terminal factory run envelope.
3127
+ * @returns Complete current or terminal workflow run envelope.
2679
3128
  */
2680
- runFromTool: async (params) => connection.sendRequest("session.factory.runFromTool", { sessionId, ...params }),
3129
+ runFromTool: async (params) => connection.sendRequest("session.workflow.runFromTool", { sessionId, ...params }),
2681
3130
  /**
2682
- * Internal tool-originated factory resume.
3131
+ * Internal tool-originated dynamic workflow resume.
2683
3132
  *
2684
- * @param params Internal parameters for resuming a factory run from a tool.
3133
+ * @param params Internal parameters for resuming a workflow run from a tool.
2685
3134
  *
2686
- * @returns Resolved persisted factory identity and resumed run envelope.
3135
+ * @returns Resolved persisted workflow identity and resumed run envelope.
2687
3136
  */
2688
- resumeFromTool: async (params) => connection.sendRequest("session.factory.resumeFromTool", { sessionId, ...params }),
3137
+ resumeFromTool: async (params) => connection.sendRequest("session.workflow.resumeFromTool", { sessionId, ...params }),
2689
3138
  /**
2690
- * Atomically pauses an owned factory attempt at a durable checkpoint.
3139
+ * Atomically pauses an owned dynamic workflow attempt at a durable checkpoint.
2691
3140
  *
2692
3141
  * @param params Parameters for an owned durable pause checkpoint.
2693
3142
  */
2694
- pauseAtCheckpoint: async (params) => connection.sendRequest("session.factory.pauseAtCheckpoint", { sessionId, ...params })
3143
+ pauseAtCheckpoint: async (params) => connection.sendRequest("session.workflow.pauseAtCheckpoint", { sessionId, ...params })
2695
3144
  },
2696
3145
  /** @experimental */
2697
3146
  model: {
@@ -2736,6 +3185,23 @@ function createInternalSessionRpc(connection, sessionId) {
2736
3185
  unregisterExternalClient: async (params) => connection.sendRequest("session.mcp.unregisterExternalClient", { sessionId, ...params })
2737
3186
  },
2738
3187
  /** @experimental */
3188
+ connectors: {
3189
+ /**
3190
+ * Reconciles the authoritative Connector catalog into the session MCP projection during startup with a bounded deadline and fail-closed cleanup.
3191
+ *
3192
+ * @param params Pins a Connector operation to one host-owned GitHub account through its opaque selection ID. Provider tokens are never accepted.
3193
+ *
3194
+ * @returns Authoritative session connector state. Account IDs are opaque routing identifiers and credentials are never included.
3195
+ */
3196
+ reconcileForStartup: async (params) => connection.sendRequest("session.connectors.reconcileForStartup", { sessionId, ...params }),
3197
+ /**
3198
+ * Removes the runtime-owned Connector MCP projection without changing service-side connections.
3199
+ *
3200
+ * @returns Authoritative session connector state. Account IDs are opaque routing identifiers and credentials are never included.
3201
+ */
3202
+ withdrawProjection: async () => connection.sendRequest("session.connectors.withdrawProjection", { sessionId })
3203
+ },
3204
+ /** @experimental */
2739
3205
  commands: {
2740
3206
  /**
2741
3207
  * Finalizes persistence associated with a client-applied slash-command effect.
@@ -2879,14 +3345,14 @@ function registerClientSessionApiHandlers(connection, getHandlers) {
2879
3345
  if (!handler) throw new Error(`No providerToken handler registered for session: ${params.sessionId}`);
2880
3346
  return handler.getToken(params);
2881
3347
  });
2882
- connection.onRequest("factory.execute", async (params) => {
2883
- const handler = getHandlers(params.sessionId).factory;
2884
- if (!handler) throw new Error(`No factory handler registered for session: ${params.sessionId}`);
3348
+ connection.onRequest("workflow.execute", async (params) => {
3349
+ const handler = getHandlers(params.sessionId).workflow;
3350
+ if (!handler) throw new Error(`No workflow handler registered for session: ${params.sessionId}`);
2885
3351
  return handler.execute(params);
2886
3352
  });
2887
- connection.onRequest("factory.abort", async (params) => {
2888
- const handler = getHandlers(params.sessionId).factory;
2889
- if (!handler) throw new Error(`No factory handler registered for session: ${params.sessionId}`);
3353
+ connection.onRequest("workflow.abort", async (params) => {
3354
+ const handler = getHandlers(params.sessionId).workflow;
3355
+ if (!handler) throw new Error(`No workflow handler registered for session: ${params.sessionId}`);
2890
3356
  return handler.abort(params);
2891
3357
  });
2892
3358
  connection.onRequest("tasks.cancel", async (params) => {
@@ -3001,6 +3467,11 @@ function registerClientGlobalApiHandlers(connection, handlers) {
3001
3467
  if (!handler) throw new Error("No gitHubToken client-global handler registered");
3002
3468
  return handler.getToken(params);
3003
3469
  });
3470
+ connection.onRequest("installations.confirm", async (params) => {
3471
+ const handler = handlers.installations;
3472
+ if (!handler) throw new Error("No installations client-global handler registered");
3473
+ return handler.confirm(params);
3474
+ });
3004
3475
  }
3005
3476
  // Annotate the CommonJS export names for ESM import in node:
3006
3477
  0 && (module.exports = {