@bobannomi/app-host 0.1.1 → 0.3.0

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.
@@ -201,6 +201,8 @@ declare const APP_HOST_ERROR_RETRY: {
201
201
  readonly resource_revision_conflict: "query";
202
202
  readonly request_conflict: "never";
203
203
  readonly cursor_stale: "query";
204
+ readonly model_provider_not_configured: "never";
205
+ readonly model_not_configured: "never";
204
206
  };
205
207
  type AppHostErrorCode = keyof typeof APP_HOST_ERROR_RETRY;
206
208
  type AppHostRetry = "safe" | "never" | "query";
@@ -229,26 +231,7 @@ declare class AppHostError extends Error {
229
231
  });
230
232
  }
231
233
 
232
- interface ServiceStatus {
233
- state: "absent" | "unauthorized" | "stopped" | "starting" | "recovering" | "ready" | "failed";
234
- reason?: "dependency_missing" | "service_start_failed" | "service_unavailable" | "result_unknown" | "incompatible" | "revoked";
235
- instanceId?: string;
236
- apiVersion?: string;
237
- }
238
- interface ServiceWork {
239
- requestId: string;
240
- state: ServiceWorkState;
241
- updatedAt: string;
242
- result?: JsonValue;
243
- error?: JsonValue;
244
- }
245
- interface ServiceConnectionDescriptor {
246
- connectionId: string;
247
- baseUrl: string;
248
- apiVersion: string;
249
- }
250
-
251
- declare const APP_HOST_FEATURES: readonly ["fetch-v1", "fetch-inline-body-v1", "fetch-target-close-v1", "service-v1", "extended-errors-v1", "workspace-v1", "session-resources-v1", "session-controls-v1", "conversation-creation-session-v1", "trusted-desktop-v1", "attachments-v1", "auxiliary-sessions-v1", "system-ui-v1", "lifecycle-v1", "commands-v1", "resource-catalog-v1", "file-content-v1", "window-chrome-v1", "window-updates-v1", "window-update-check-v1", "embedded-browser-v1", "browser-binding-invalidation-v1", "browser-capture-preview-v1"];
234
+ declare const APP_HOST_FEATURES: readonly ["fetch-v1", "fetch-inline-body-v1", "fetch-target-close-v1", "service-v1", "extended-errors-v1", "workspace-v1", "session-resources-v1", "session-controls-v1", "conversation-creation-session-v1", "trusted-desktop-v1", "attachments-v1", "auxiliary-sessions-v1", "system-ui-v1", "lifecycle-v1", "commands-v1", "resource-catalog-v1", "file-content-v1", "window-chrome-v1", "window-updates-v1", "window-update-check-v1", "embedded-browser-v1", "browser-binding-invalidation-v1", "browser-capture-preview-v1", "workbench-computer-v1"];
252
235
  type AppHostFeature = (typeof APP_HOST_FEATURES)[number];
253
236
  declare const FETCH_CHUNK_BYTES: number;
254
237
  declare const FETCH_INLINE_BODY_BYTES: number;
@@ -315,167 +298,6 @@ declare function isPageFetchFrame(value: unknown): value is PageFetchFrame;
315
298
  /** This URL is only an opaque document-local descriptor; it is never fetched over a network. */
316
299
  declare function pageFetchPath(baseUrl: string, input: string): string;
317
300
 
318
- interface ServiceContext {
319
- protocolVersion: 1;
320
- registrationId: string;
321
- instanceId: string;
322
- dataScopeId: string;
323
- scope: {
324
- appId: string;
325
- installationId: string;
326
- contentDigest: string;
327
- };
328
- installationRevision: number;
329
- phase: "starting" | "ready";
330
- }
331
- interface ServiceInvocation {
332
- invocationId: string;
333
- dataScopeId: string;
334
- sessionId: string;
335
- runId: string;
336
- inputId?: string;
337
- workspaceId?: string;
338
- executionRoot?: string;
339
- privateSessionId?: string;
340
- }
341
- interface CreateWorktree {
342
- requestId: string;
343
- workspaceId: string;
344
- expectedHead: string;
345
- branch: string;
346
- }
347
- interface WorktreeQuery {
348
- requestId: string;
349
- original: Omit<CreateWorktree, "requestId">;
350
- }
351
- interface WorktreeReceipt {
352
- requestId: string;
353
- state: "accepted" | "completed" | "failed" | "unknown";
354
- result?: {
355
- executionRoot: string;
356
- workspaceId: string;
357
- branch: string;
358
- sourceHead: string;
359
- };
360
- }
361
- interface RootReleaseReceipt {
362
- requestId: string;
363
- executionRoot: string;
364
- state: "released" | "retained-dirty" | "in-use" | "unknown";
365
- }
366
- interface GitStatus {
367
- root: string;
368
- commonDir: string;
369
- head: string;
370
- branch: string;
371
- changes: string[];
372
- }
373
- type Entry$1<P, R> = {
374
- params: P;
375
- result: R;
376
- };
377
- interface ServiceHostMethodMap {
378
- "secrets.get": Entry$1<{
379
- key: string;
380
- }, string | null>;
381
- "secrets.set": Entry$1<{
382
- key: string;
383
- value: string;
384
- }, {
385
- stored: true;
386
- }>;
387
- "secrets.delete": Entry$1<{
388
- key: string;
389
- }, {
390
- deleted: true;
391
- }>;
392
- "context.get": Entry$1<Record<string, never>, ServiceContext>;
393
- "context.resolveInvocation": Entry$1<{
394
- ticket: string;
395
- }, ServiceInvocation>;
396
- "agent.listModels": Entry$1<Record<string, never>, {
397
- id: string;
398
- name: string;
399
- }[]>;
400
- "agent.getConnection": Entry$1<{
401
- workspaceId?: string;
402
- executionRoot?: string;
403
- privateSessionId?: string;
404
- }, {
405
- connectionId: string;
406
- baseUrl: string;
407
- }>;
408
- "agent.resolveSkills": Entry$1<{
409
- skillIds: string[];
410
- }, {
411
- type: "skill";
412
- name: string;
413
- path: string;
414
- }[]>;
415
- "sessions.getConnection": Entry$1<{
416
- dataScopeId: string;
417
- sessionId: string;
418
- }, {
419
- connectionId: string;
420
- baseUrl: string;
421
- }>;
422
- "workspace.gitStatus": Entry$1<{
423
- workspaceId: string;
424
- }, GitStatus>;
425
- "workspace.createTaskWorktree": Entry$1<CreateWorktree, WorktreeReceipt>;
426
- "workspace.getWorktree": Entry$1<WorktreeQuery, WorktreeReceipt | null>;
427
- "workspace.releaseExecutionRoot": Entry$1<{
428
- requestId: string;
429
- workspaceId: string;
430
- executionRoot: string;
431
- }, RootReleaseReceipt>;
432
- "work.list": Entry$1<Record<string, never>, ServiceWork[]>;
433
- "work.get": Entry$1<{
434
- requestId: string;
435
- }, ServiceWork | null>;
436
- }
437
- type ServiceHostMethod = keyof ServiceHostMethodMap;
438
- declare const SERVICE_HOST_METHODS: readonly ["secrets.get", "secrets.set", "secrets.delete", "context.get", "context.resolveInvocation", "agent.listModels", "agent.getConnection", "agent.resolveSkills", "sessions.getConnection", "workspace.gitStatus", "workspace.createTaskWorktree", "workspace.getWorktree", "workspace.releaseExecutionRoot", "work.list", "work.get"];
439
- declare const SERVICE_HOST_MAX_FRAME_BYTES: number;
440
- declare const SERVICE_HOST_MAX_PENDING = 64;
441
- declare const validServiceContext: (v: unknown) => v is ServiceContext;
442
- declare function validServiceHostInput(method: ServiceHostMethod, v: unknown): boolean;
443
- declare function validServiceHostResult(method: ServiceHostMethod, v: unknown): boolean;
444
- type ServiceHostFrame = PageFetchFrame | {
445
- protocol: 1;
446
- type: "service-host-connect";
447
- id: string;
448
- } | {
449
- protocol: 1;
450
- type: "service-host-ready";
451
- id: string;
452
- context: ServiceContext;
453
- } | {
454
- protocol: 1;
455
- type: "service-host-context";
456
- context: ServiceContext;
457
- } | {
458
- protocol: 1;
459
- type: "service-host-request";
460
- id: string;
461
- method: ServiceHostMethod;
462
- params: ServiceHostMethodMap[ServiceHostMethod]["params"];
463
- } | ({
464
- protocol: 1;
465
- type: "service-host-response";
466
- id: string;
467
- } & ({
468
- ok: true;
469
- value: unknown;
470
- } | {
471
- ok: false;
472
- error: AppHostErrorInfo;
473
- })) | {
474
- protocol: 1;
475
- type: "service-host-close";
476
- };
477
- declare function isServiceHostFrame(v: unknown): v is ServiceHostFrame;
478
-
479
301
  interface AgentApiRoute {
480
302
  readonly id: string;
481
303
  }
@@ -512,7 +334,6 @@ interface SessionConfigurationInput {
512
334
  pluginAutoSelectionEnabled?: boolean;
513
335
  activePluginId?: string | null;
514
336
  pluginIds?: string[];
515
- serviceBindings?: string[];
516
337
  memory?: {
517
338
  enabled: boolean;
518
339
  };
@@ -605,20 +426,25 @@ interface SessionRecord {
605
426
  archivedAt?: number;
606
427
  }
607
428
 
608
- interface WorkspaceConversationCreation {
429
+ interface ConversationCreationOptions {
609
430
  dataScopeId: string;
610
431
  requestId: string;
611
432
  sessionId: string;
612
- workspaceId?: string;
613
- outsideProject?: boolean;
614
- taskLocation: "current" | "worktree";
615
433
  configuration: SessionConfigurationInput;
616
434
  preparationRevision?: string;
617
435
  }
436
+ type WorkspaceConversationCreation = ConversationCreationOptions & ({
437
+ workspaceId: string;
438
+ outsideProject?: never;
439
+ taskLocation: "current" | "worktree";
440
+ } | {
441
+ workspaceId?: never;
442
+ outsideProject: true;
443
+ taskLocation: "current";
444
+ });
618
445
  interface WorkspaceConversationResult extends SessionCreationReceipt {
619
446
  session?: SessionRecord;
620
447
  operationState?: "prepared" | "running" | "completed" | "failed" | "unknown";
621
- indexBindingPending?: true;
622
448
  workspaceId?: string;
623
449
  executionRoot?: string;
624
450
  privateSessionId?: string;
@@ -669,7 +495,6 @@ interface SessionControls {
669
495
  efforts: ControlOption[];
670
496
  workModes: ControlOption[];
671
497
  permissionModes?: ControlOption[];
672
- appServiceBindings?: ControlOption[];
673
498
  skills: (ControlOption & {
674
499
  path: string;
675
500
  source?: string;
@@ -715,13 +540,6 @@ interface SessionControlMethodMap {
715
540
  params: WorkspaceConversationCreation;
716
541
  result: WorkspaceConversationResult;
717
542
  };
718
- "sessions.bindConversationIndex": {
719
- params: {
720
- original: WorkspaceConversationCreation;
721
- dataScopeId: string;
722
- };
723
- result: WorkspaceConversationResult;
724
- };
725
543
  "sessions.getConversationCreationResult": {
726
544
  params: WorkspaceConversationCreation;
727
545
  result: WorkspaceConversationResult | null;
@@ -744,6 +562,25 @@ interface SessionControlMethodMap {
744
562
  };
745
563
  }
746
564
 
565
+ interface ServiceStatus {
566
+ state: "absent" | "unauthorized" | "stopped" | "starting" | "recovering" | "ready" | "failed";
567
+ reason?: "dependency_missing" | "service_start_failed" | "service_unavailable" | "result_unknown" | "incompatible" | "revoked";
568
+ instanceId?: string;
569
+ apiVersion?: string;
570
+ }
571
+ interface ServiceWork {
572
+ requestId: string;
573
+ state: ServiceWorkState;
574
+ updatedAt: string;
575
+ result?: JsonValue;
576
+ error?: JsonValue;
577
+ }
578
+ interface ServiceConnectionDescriptor {
579
+ connectionId: string;
580
+ baseUrl: string;
581
+ apiVersion: string;
582
+ }
583
+
747
584
  interface WorkspaceRef {
748
585
  id: string;
749
586
  displayName: string;
@@ -777,6 +614,29 @@ type WorkspaceMethod = "workspace.select" | "workspace.getSelection" | "workspac
777
614
  declare function validWorkspaceInput(method: WorkspaceMethod, v: unknown): boolean;
778
615
  declare function validWorkspaceResult(method: WorkspaceMethod, v: unknown): boolean;
779
616
 
617
+ interface WorkspaceDirectory {
618
+ readonly id: string;
619
+ readonly displayName: string;
620
+ listFiles(options?: {
621
+ directory?: string;
622
+ cursor?: string;
623
+ }): Promise<WorkspaceFilePage>;
624
+ readText(path: string): Promise<WorkspaceText>;
625
+ }
626
+ interface AppHostWorkspace {
627
+ list(input?: {
628
+ cursor?: string;
629
+ }): Promise<WorkspaceDirectoryPage>;
630
+ /** Supply and save requestId before opening the picker if its result needs to be recovered. */
631
+ pick(input?: {
632
+ requestId?: string;
633
+ }): Promise<WorkspaceDirectory | null>;
634
+ open(id: string): Promise<WorkspaceDirectory>;
635
+ getSelection(input: {
636
+ requestId: string;
637
+ }): Promise<WorkspaceSelection>;
638
+ }
639
+
780
640
  interface WorkspaceDirectoryPage {
781
641
  entries: WorkspaceRef[];
782
642
  nextCursor?: string;
@@ -810,7 +670,11 @@ declare function createResourceCatalogApi(rpc: {
810
670
  }) => Promise<WorkspaceDirectoryPage>;
811
671
  };
812
672
 
813
- declare const CONVERSATION_PREPARATION_METHODS: readonly ["sessions.createConversation", "sessions.getConversationCreationResult", "sessions.bindConversationIndex"];
673
+ interface ConversationPreparationGroup {
674
+ create(input: WorkspaceConversationCreation): Promise<WorkspaceConversationResult>;
675
+ getResult(input: WorkspaceConversationCreation): Promise<WorkspaceConversationResult | null>;
676
+ }
677
+ declare const CONVERSATION_PREPARATION_METHODS: readonly ["sessions.createConversation", "sessions.getConversationCreationResult"];
814
678
  type ConversationPreparationMethod = (typeof CONVERSATION_PREPARATION_METHODS)[number];
815
679
  type ConversationPreparationMethodMap = Pick<SessionControlMethodMap, ConversationPreparationMethod>;
816
680
  declare function isConversationPreparationMethod(method: string): method is ConversationPreparationMethod;
@@ -852,7 +716,7 @@ interface DesktopTarget {
852
716
  root?: DesktopRoot;
853
717
  sessionId?: string;
854
718
  }
855
- type WorkspaceOperationKind = "files.writeText" | "git.switchBranch" | "git.createBranch" | "git.createTaskWorktree";
719
+ type WorkspaceOperationKind = "files.writeText" | "git.switchBranch" | "git.createBranch";
856
720
  interface WorkspaceOperation {
857
721
  requestId: string;
858
722
  kind: WorkspaceOperationKind;
@@ -868,6 +732,21 @@ interface WorkspaceOperationOriginal {
868
732
  kind: WorkspaceOperationKind;
869
733
  body: JsonValue;
870
734
  }
735
+ interface FileOperationOriginal {
736
+ kind: "files.writeText";
737
+ body: {
738
+ path: string;
739
+ expectedSha256: string;
740
+ text: string;
741
+ };
742
+ }
743
+ interface GitOperationOriginal {
744
+ kind: "git.switchBranch" | "git.createBranch";
745
+ body: {
746
+ expectedHead: string;
747
+ branch: string;
748
+ };
749
+ }
871
750
  interface BindDesktopTarget {
872
751
  directory?: string;
873
752
  workspaceId?: string;
@@ -1149,7 +1028,7 @@ interface PluginAppCatalog {
1149
1028
  }[];
1150
1029
  }[];
1151
1030
  }
1152
- type Entry<P, R> = {
1031
+ type Entry$1<P, R> = {
1153
1032
  params: P;
1154
1033
  result: R;
1155
1034
  };
@@ -1159,17 +1038,21 @@ type Target = {
1159
1038
  type Mount = Target & {
1160
1039
  mountId: string;
1161
1040
  };
1162
- type Action = Mount & {
1041
+ type Action$1 = Mount & {
1163
1042
  requestId: string;
1164
1043
  expectedRevision: number;
1165
1044
  source: PluginAppSource;
1166
1045
  };
1046
+ type OperationQuery<Original> = Target & {
1047
+ requestId: string;
1048
+ original: Original;
1049
+ };
1167
1050
  interface DesktopMethodMap {
1168
- "desktop.bindTarget": Entry<Omit<BindDesktopTarget, "connection"> & {
1051
+ "desktop.bindTarget": Entry$1<Omit<BindDesktopTarget, "connection"> & {
1169
1052
  connectionId?: string;
1170
1053
  }, DesktopTarget>;
1171
- "desktop.releaseTarget": Entry<Target, void>;
1172
- "desktop.files.listFiles": Entry<Target & {
1054
+ "desktop.releaseTarget": Entry$1<Target, void>;
1055
+ "desktop.files.listFiles": Entry$1<Target & {
1173
1056
  directory?: string;
1174
1057
  recursive?: boolean;
1175
1058
  }, {
@@ -1179,71 +1062,65 @@ interface DesktopMethodMap {
1179
1062
  kind: "file" | "directory";
1180
1063
  }[];
1181
1064
  }>;
1182
- "desktop.files.search": Entry<Target & {
1065
+ "desktop.files.search": Entry$1<Target & {
1183
1066
  query: string;
1184
1067
  directory?: string;
1185
1068
  limit?: number;
1186
1069
  }, DesktopSearch>;
1187
- "desktop.files.openRead": Entry<Target & {
1070
+ "desktop.files.openRead": Entry$1<Target & {
1188
1071
  path: string;
1189
1072
  }, {
1190
1073
  connectionId: string;
1191
1074
  baseUrl: string;
1192
1075
  }>;
1193
- "desktop.files.readText": Entry<Target & {
1076
+ "desktop.files.readText": Entry$1<Target & {
1194
1077
  path: string;
1195
1078
  }, DesktopText>;
1196
- "desktop.files.writeText": Entry<Target & {
1197
- requestId: string;
1198
- path: string;
1199
- expectedSha256: string;
1200
- text: string;
1201
- }, WorkspaceOperation>;
1202
- "desktop.files.getOperation": Entry<Target & {
1079
+ "desktop.files.writeText": Entry$1<Target & {
1203
1080
  requestId: string;
1204
- original: WorkspaceOperationOriginal;
1205
- }, WorkspaceOperation | null>;
1206
- "desktop.files.revealPath": Entry<Target & {
1081
+ } & FileOperationOriginal["body"], WorkspaceOperation>;
1082
+ "desktop.files.getOperation": Entry$1<OperationQuery<WorkspaceOperationOriginal>, WorkspaceOperation | null>;
1083
+ "desktop.files.revealPath": Entry$1<Target & {
1207
1084
  path: string;
1208
1085
  }, void>;
1209
- "desktop.files.listOpeners": Entry<Target, DesktopOpener[]>;
1210
- "desktop.files.openWith": Entry<Target & {
1086
+ "desktop.files.listOpeners": Entry$1<Target, DesktopOpener[]>;
1087
+ "desktop.files.openWith": Entry$1<Target & {
1211
1088
  path: string;
1212
1089
  openerId: string;
1213
1090
  }, void>;
1214
- "desktop.clipboard.readText": Entry<Target, string>;
1215
- "desktop.clipboard.writeText": Entry<Target & {
1091
+ "desktop.clipboard.readText": Entry$1<Target, string>;
1092
+ "desktop.clipboard.writeText": Entry$1<Target & {
1216
1093
  text: string;
1217
1094
  }, void>;
1218
- "desktop.clipboard.showTextMenu": Entry<Target & {
1095
+ "desktop.clipboard.showTextMenu": Entry$1<Target & {
1219
1096
  editable: boolean;
1220
1097
  hasSelection: boolean;
1221
1098
  }, "copy" | "select-all" | null>;
1222
- "desktop.windows.openExternal": Entry<Target & {
1099
+ "desktop.windows.openExternal": Entry$1<Target & {
1223
1100
  url: string;
1224
1101
  }, void>;
1225
- "desktop.windows.getZoom": Entry<Target, {
1102
+ "desktop.windows.getZoom": Entry$1<Target, {
1226
1103
  factor: number;
1227
1104
  }>;
1228
- "desktop.windows.setZoom": Entry<Target & {
1105
+ "desktop.windows.setZoom": Entry$1<Target & {
1229
1106
  factor: number;
1230
1107
  }, {
1231
1108
  factor: number;
1232
1109
  }>;
1233
- "desktop.windows.edit": Entry<Target & {
1110
+ "desktop.windows.edit": Entry$1<Target & {
1234
1111
  action: "undo" | "redo" | "cut" | "copy" | "paste" | "selectAll";
1235
1112
  }, void>;
1236
- "desktop.git.status": Entry<Target, {
1113
+ "desktop.git.status": Entry$1<Target, {
1237
1114
  root: string;
1238
1115
  commonDir: string;
1239
1116
  head: string;
1240
1117
  branch: string;
1241
1118
  changes: string[];
1242
1119
  }>;
1243
- "desktop.git.listBranches": Entry<Target, {
1120
+ "desktop.git.listBranches": Entry$1<Target, {
1244
1121
  branches: string[];
1245
1122
  }>;
1246
- "desktop.git.changes": Entry<Target & {
1123
+ "desktop.git.changes": Entry$1<Target & {
1247
1124
  range?: "uncommitted" | "working" | "staged";
1248
1125
  ignoreWhitespace?: boolean;
1249
1126
  }, {
@@ -1251,7 +1128,7 @@ interface DesktopMethodMap {
1251
1128
  totalAdditions: number;
1252
1129
  totalDeletions: number;
1253
1130
  }>;
1254
- "desktop.git.diff": Entry<Target & {
1131
+ "desktop.git.diff": Entry$1<Target & {
1255
1132
  path?: string;
1256
1133
  base?: string;
1257
1134
  head?: string;
@@ -1261,130 +1138,121 @@ interface DesktopMethodMap {
1261
1138
  text: string;
1262
1139
  truncated: boolean;
1263
1140
  }>;
1264
- "desktop.git.switchBranch": Entry<Target & {
1141
+ "desktop.git.switchBranch": Entry$1<Target & {
1265
1142
  requestId: string;
1266
- expectedHead: string;
1267
- branch: string;
1268
- }, WorkspaceOperation>;
1269
- "desktop.git.createBranch": Entry<Target & {
1143
+ } & GitOperationOriginal["body"], WorkspaceOperation>;
1144
+ "desktop.git.createBranch": Entry$1<Target & {
1270
1145
  requestId: string;
1271
- expectedHead: string;
1272
- branch: string;
1273
- }, WorkspaceOperation>;
1274
- "desktop.git.createTaskWorktree": Entry<Target & {
1275
- requestId: string;
1276
- expectedHead: string;
1277
- branch: string;
1278
- }, WorkspaceOperation>;
1279
- "desktop.terminals.create": Entry<Target & {
1146
+ } & GitOperationOriginal["body"], WorkspaceOperation>;
1147
+ "desktop.terminals.create": Entry$1<Target & {
1280
1148
  requestId: string;
1281
1149
  cols: number;
1282
1150
  rows: number;
1283
1151
  name?: string;
1284
1152
  }, DesktopTerminal>;
1285
- "desktop.terminals.list": Entry<Target, DesktopTerminalInfo[]>;
1286
- "desktop.terminals.restart": Entry<Target & {
1153
+ "desktop.terminals.list": Entry$1<Target, DesktopTerminalInfo[]>;
1154
+ "desktop.terminals.restart": Entry$1<Target & {
1287
1155
  terminalId: string;
1288
1156
  requestId: string;
1289
1157
  }, DesktopTerminal>;
1290
- "desktop.terminals.getRequest": Entry<Target & {
1158
+ "desktop.terminals.getRequest": Entry$1<Target & {
1291
1159
  requestId: string;
1292
1160
  original: DesktopTerminalRequestOriginal;
1293
1161
  }, DesktopTerminalRequestReceipt>;
1294
- "desktop.terminals.snapshot": Entry<Target & {
1162
+ "desktop.terminals.snapshot": Entry$1<Target & {
1295
1163
  terminalId: string;
1296
1164
  after?: number;
1297
1165
  maxChars?: number;
1298
1166
  }, DesktopTerminalSnapshot>;
1299
- "desktop.terminals.subscribe": Entry<Target & {
1167
+ "desktop.terminals.subscribe": Entry$1<Target & {
1300
1168
  terminalId: string;
1301
1169
  }, void>;
1302
- "desktop.terminals.write": Entry<Target & {
1170
+ "desktop.terminals.write": Entry$1<Target & {
1303
1171
  terminalId: string;
1304
1172
  data: string;
1305
1173
  }, void>;
1306
- "desktop.terminals.resize": Entry<Target & {
1174
+ "desktop.terminals.resize": Entry$1<Target & {
1307
1175
  terminalId: string;
1308
1176
  cols: number;
1309
1177
  rows: number;
1310
1178
  }, void>;
1311
- "desktop.terminals.close": Entry<Target & {
1179
+ "desktop.terminals.close": Entry$1<Target & {
1312
1180
  terminalId?: string;
1313
1181
  requestId?: string;
1314
1182
  }, void>;
1315
- "desktop.windows.open": Entry<Target & {
1183
+ "desktop.windows.open": Entry$1<Target & {
1316
1184
  requestId: string;
1317
1185
  mode: "application" | "content";
1318
1186
  url: string;
1319
1187
  }, DesktopWindow>;
1320
- "desktop.windows.adopt": Entry<Target & {
1188
+ "desktop.windows.adopt": Entry$1<Target & {
1321
1189
  requestId: string;
1322
1190
  windowId: number;
1323
1191
  }, DesktopWindow>;
1324
- "desktop.windows.get": Entry<Target & {
1192
+ "desktop.windows.get": Entry$1<Target & {
1325
1193
  requestId: string;
1326
1194
  }, DesktopWindow | null>;
1327
- "desktop.windows.close": Entry<Target & {
1195
+ "desktop.windows.close": Entry$1<Target & {
1328
1196
  requestId: string;
1329
1197
  }, DesktopWindow>;
1330
- "desktop.windows.setAlwaysOnTop": Entry<Target & {
1198
+ "desktop.windows.setAlwaysOnTop": Entry$1<Target & {
1331
1199
  requestId?: string;
1332
1200
  alwaysOnTop: boolean;
1333
1201
  }, {
1334
1202
  alwaysOnTop: boolean;
1335
1203
  }>;
1336
- "desktop.windows.focus": Entry<Target & {
1204
+ "desktop.windows.focus": Entry$1<Target & {
1337
1205
  requestId?: string;
1338
1206
  }, {
1339
1207
  focused: boolean;
1340
1208
  visible: boolean;
1341
1209
  minimized: boolean;
1342
1210
  }>;
1343
- "desktop.browser.register": Entry<Target & {
1211
+ "desktop.browser.register": Entry$1<Target & {
1344
1212
  tabId: string;
1345
1213
  guestId: number;
1346
1214
  }, BrowserAnnotationSnapshot>;
1347
- "desktop.browser.openLocalFile": Entry<Target & {
1215
+ "desktop.browser.openLocalFile": Entry$1<Target & {
1348
1216
  path: string;
1349
1217
  }, {
1350
1218
  url: string;
1351
1219
  }>;
1352
- "desktop.browser.unregister": Entry<Target & {
1220
+ "desktop.browser.unregister": Entry$1<Target & {
1353
1221
  tabId: string;
1354
1222
  }, void>;
1355
- "desktop.browser.setActive": Entry<Target & {
1223
+ "desktop.browser.setActive": Entry$1<Target & {
1356
1224
  tabId: string;
1357
1225
  }, void>;
1358
- "desktop.browser.readAnnotations": Entry<BrowserPage, BrowserAnnotationSnapshot>;
1359
- "desktop.browser.setAnnotationMode": Entry<BrowserPage & {
1226
+ "desktop.browser.readAnnotations": Entry$1<BrowserPage, BrowserAnnotationSnapshot>;
1227
+ "desktop.browser.setAnnotationMode": Entry$1<BrowserPage & {
1360
1228
  mode: AnnotationMode;
1361
1229
  }, BrowserAnnotationSnapshot>;
1362
- "desktop.browser.addAnnotation": Entry<BrowserPage & {
1230
+ "desktop.browser.addAnnotation": Entry$1<BrowserPage & {
1363
1231
  selectionId: string;
1364
1232
  comment: string;
1365
1233
  }, BrowserAnnotationSnapshot>;
1366
- "desktop.browser.focusAnnotation": Entry<BrowserPage & {
1234
+ "desktop.browser.focusAnnotation": Entry$1<BrowserPage & {
1367
1235
  annotationId: string;
1368
1236
  }, BrowserAnnotationSnapshot>;
1369
- "desktop.browser.removeAnnotation": Entry<BrowserPage & {
1237
+ "desktop.browser.removeAnnotation": Entry$1<BrowserPage & {
1370
1238
  annotationId: string;
1371
1239
  }, BrowserAnnotationSnapshot>;
1372
- "desktop.browser.capturePreview": Entry<BrowserPage, {
1240
+ "desktop.browser.capturePreview": Entry$1<BrowserPage, {
1373
1241
  bytes: Uint8Array<ArrayBuffer>;
1374
1242
  width: number;
1375
1243
  height: number;
1376
1244
  }>;
1377
- "desktop.pluginApps.catalog": Entry<Target, PluginAppCatalog>;
1378
- "desktop.pluginApps.composerContext": Entry<Target & {
1245
+ "desktop.pluginApps.catalog": Entry$1<Target, PluginAppCatalog>;
1246
+ "desktop.pluginApps.composerContext": Entry$1<Target & {
1379
1247
  contextIds: string[];
1380
1248
  }, PluginAppComposerContext[]>;
1381
- "desktop.pluginApps.open": Entry<Target & {
1249
+ "desktop.pluginApps.open": Entry$1<Target & {
1382
1250
  requestId: string;
1383
1251
  pluginId: string;
1384
1252
  surfaceId: string;
1385
1253
  expectedRevision?: number;
1386
1254
  }, PluginAppMount>;
1387
- "desktop.pluginApps.openToolResult": Entry<Target & {
1255
+ "desktop.pluginApps.openToolResult": Entry$1<Target & {
1388
1256
  sourcePartId: string;
1389
1257
  }, {
1390
1258
  mounted: PluginAppMount;
@@ -1395,29 +1263,29 @@ interface DesktopMethodMap {
1395
1263
  dataError?: string;
1396
1264
  };
1397
1265
  }>;
1398
- "desktop.pluginApps.mount": Entry<Target & {
1266
+ "desktop.pluginApps.mount": Entry$1<Target & {
1399
1267
  source: PluginAppSource;
1400
1268
  }, PluginAppMount>;
1401
- "desktop.pluginApps.refresh": Entry<Mount, PluginAppHostState>;
1402
- "desktop.pluginApps.rejectMenuOpen": Entry<Mount & {
1269
+ "desktop.pluginApps.refresh": Entry$1<Mount, PluginAppHostState>;
1270
+ "desktop.pluginApps.rejectMenuOpen": Entry$1<Mount & {
1403
1271
  requestId: string;
1404
1272
  menuOpeningRevision: number;
1405
1273
  }, {
1406
1274
  closed: boolean;
1407
1275
  }>;
1408
- "desktop.pluginApps.prepareTool": Entry<Mount & {
1276
+ "desktop.pluginApps.prepareTool": Entry$1<Mount & {
1409
1277
  source: PluginAppSource;
1410
1278
  requestId: string;
1411
1279
  expectedRevision: number;
1412
1280
  name: string;
1413
1281
  arguments: Record<string, JsonValue>;
1414
1282
  }, PluginAppPreparedTool>;
1415
- "desktop.pluginApps.invokeTool": Entry<Action, PluginAppActionResponse | {
1283
+ "desktop.pluginApps.invokeTool": Entry$1<Action$1, PluginAppActionResponse | {
1416
1284
  code: "plugin_app_busy";
1417
1285
  notAccepted: true;
1418
1286
  requestId: string;
1419
1287
  }>;
1420
- "desktop.pluginApps.getAction": Entry<Action | Target & {
1288
+ "desktop.pluginApps.getAction": Entry$1<Action$1 | Target & {
1421
1289
  source: PluginAppSource;
1422
1290
  requestId: string;
1423
1291
  expectedRevision: number;
@@ -1426,70 +1294,82 @@ interface DesktopMethodMap {
1426
1294
  args: Record<string, JsonValue>;
1427
1295
  };
1428
1296
  }, PluginAppActionResponse>;
1429
- "desktop.pluginApps.cancelTool": Entry<Action, void>;
1430
- "desktop.pluginApps.readResource": Entry<Mount & {
1297
+ "desktop.pluginApps.cancelTool": Entry$1<Action$1, void>;
1298
+ "desktop.pluginApps.readResource": Entry$1<Mount & {
1431
1299
  source: PluginAppSource;
1432
1300
  uri: string;
1433
1301
  }, {
1434
1302
  contents: JsonValue[];
1435
1303
  }>;
1436
- "desktop.pluginApps.listResources": Entry<Mount & {
1304
+ "desktop.pluginApps.listResources": Entry$1<Mount & {
1437
1305
  source: PluginAppSource;
1438
1306
  cursor?: string;
1439
1307
  }, {
1440
1308
  resources: JsonValue[];
1441
1309
  nextCursor?: string;
1442
1310
  }>;
1443
- "desktop.pluginApps.listResourceTemplates": Entry<Mount & {
1311
+ "desktop.pluginApps.listResourceTemplates": Entry$1<Mount & {
1444
1312
  source: PluginAppSource;
1445
1313
  cursor?: string;
1446
1314
  }, {
1447
1315
  resourceTemplates: JsonValue[];
1448
1316
  nextCursor?: string;
1449
1317
  }>;
1450
- "desktop.pluginApps.prepareMessage": Entry<Action & {
1318
+ "desktop.pluginApps.prepareMessage": Entry$1<Action$1 & {
1451
1319
  content: JsonValue;
1452
1320
  role: JsonValue;
1453
1321
  }, PluginAppPreparedMessage>;
1454
- "desktop.pluginApps.submitMessage": Entry<Action, PluginAppSubmissionReceipt>;
1455
- "desktop.pluginApps.getMessageSubmission": Entry<Action, PluginAppSubmissionReceipt>;
1456
- "desktop.pluginApps.cancelMessage": Entry<Action, void>;
1457
- "desktop.pluginApps.updateModelContext": Entry<Action & {
1322
+ "desktop.pluginApps.submitMessage": Entry$1<Action$1, PluginAppSubmissionReceipt>;
1323
+ "desktop.pluginApps.getMessageSubmission": Entry$1<Action$1, PluginAppSubmissionReceipt>;
1324
+ "desktop.pluginApps.cancelMessage": Entry$1<Action$1, void>;
1325
+ "desktop.pluginApps.updateModelContext": Entry$1<Action$1 & {
1458
1326
  content?: JsonValue;
1459
1327
  structuredContent?: JsonValue;
1460
1328
  }, PluginAppModelContext>;
1461
- "desktop.pluginApps.release": Entry<Mount, void>;
1462
- "desktop.pluginApps.closePanel": Entry<Mount, void>;
1463
- "desktop.pluginApps.closeApp": Entry<Action, {
1329
+ "desktop.pluginApps.release": Entry$1<Mount, void>;
1330
+ "desktop.pluginApps.closePanel": Entry$1<Mount, void>;
1331
+ "desktop.pluginApps.closeApp": Entry$1<Action$1, {
1464
1332
  app: PluginAppRecord;
1465
1333
  }>;
1466
1334
  }
1467
1335
  type DesktopMethod = keyof DesktopMethodMap;
1336
+ declare const DESKTOP_ADAPTED_METHODS: readonly ["desktop.files.openRead", "desktop.files.getOperation"];
1468
1337
  type ApiGroup<G extends string> = {
1469
- [M in DesktopMethod as M extends `desktop.${G}.${infer N}` ? N : never]: (input: DesktopMethodMap[M]["params"]) => Promise<DesktopMethodMap[M]["result"]>;
1338
+ [M in Exclude<DesktopMethod, (typeof DESKTOP_ADAPTED_METHODS)[number]> as M extends `desktop.${G}.${infer N}` ? N : never]: (input: DesktopMethodMap[M]["params"]) => Promise<DesktopMethodMap[M]["result"]>;
1470
1339
  };
1471
1340
  interface AppHostDesktop {
1472
1341
  bindTarget(input: BindDesktopTarget): Promise<DesktopTarget>;
1473
1342
  releaseTarget(input: Target): Promise<void>;
1474
- files: Omit<ApiGroup<"files">, "openRead"> & {
1475
- readFile(input: {
1476
- targetId: string;
1477
- path: string;
1478
- range?: {
1479
- start: number;
1480
- end?: number;
1481
- };
1482
- }, options?: {
1483
- signal?: AbortSignal;
1484
- }): Promise<Response>;
1485
- };
1343
+ files: AppHostFileOperations;
1486
1344
  clipboard: ApiGroup<"clipboard">;
1487
- git: ApiGroup<"git">;
1488
- terminals: ApiGroup<"terminals">;
1345
+ git: AppHostGitOperations;
1346
+ terminals: AppHostTerminalOperations;
1489
1347
  windows: ApiGroup<"windows">;
1490
1348
  browser: ApiGroup<"browser">;
1491
1349
  pluginApps: ApiGroup<"pluginApps">;
1492
1350
  }
1351
+ interface AppHostFileOperations extends ApiGroup<"files"> {
1352
+ /** Read bytes from a file in the bound desktop target, optionally using a byte range. */
1353
+ readFile(input: {
1354
+ targetId: string;
1355
+ path: string;
1356
+ range?: {
1357
+ start: number;
1358
+ end?: number;
1359
+ };
1360
+ }, options?: {
1361
+ signal?: AbortSignal;
1362
+ }): Promise<Response>;
1363
+ /** Query the original write using the same request ID and original file contents. */
1364
+ getOperation(input: OperationQuery<FileOperationOriginal>): Promise<WorkspaceOperation | null>;
1365
+ }
1366
+ interface AppHostGitOperations extends ApiGroup<"git"> {
1367
+ /** Query the receipt using the original branch operation and request ID. */
1368
+ getOperation(input: OperationQuery<GitOperationOriginal>): Promise<WorkspaceOperation | null>;
1369
+ }
1370
+ /** Interactive terminal operations for an authorized desktop target. */
1371
+ interface AppHostTerminalOperations extends ApiGroup<"terminals"> {
1372
+ }
1493
1373
  declare const validBrowserSnapshot: Check;
1494
1374
  declare const validDesktopTarget: Check;
1495
1375
  declare const validWorkspaceOperation: Check;
@@ -1642,18 +1522,18 @@ interface AuxiliaryMethodMap {
1642
1522
  }
1643
1523
  type AuxiliaryMethod = keyof AuxiliaryMethodMap;
1644
1524
  declare const AUXILIARY_METHODS: readonly ["sessions.getAuxiliaryOptions", "sessions.openAuxiliary", "sessions.getAuxiliary", "sessions.closeAuxiliary"];
1645
- interface AppHostAuxiliarySessions {
1646
- getAuxiliaryOptions(input: {
1525
+ interface AuxiliarySessionsGroup {
1526
+ getOptions(input: {
1647
1527
  connection: AgentConnection;
1648
1528
  sessionId: string;
1649
1529
  }): Promise<AuxiliaryOptions>;
1650
- openAuxiliary(input: AuxiliaryRequest): Promise<{
1530
+ open(input: AuxiliaryRequest): Promise<{
1651
1531
  leaseId: string;
1652
1532
  sessionId: string;
1653
1533
  connection: AgentConnection;
1654
1534
  }>;
1655
- getAuxiliary(input: AuxiliaryRequest): Promise<AuxiliaryReceipt | null>;
1656
- closeAuxiliary(input: AuxiliaryRequest): Promise<AuxiliaryReceipt>;
1535
+ get(input: AuxiliaryRequest): Promise<AuxiliaryReceipt | null>;
1536
+ close(input: AuxiliaryRequest): Promise<AuxiliaryReceipt>;
1657
1537
  }
1658
1538
  declare function isAuxiliaryMethod(method: string): method is AuxiliaryMethod;
1659
1539
  declare function validAuxiliaryInput(method: AuxiliaryMethod, v: unknown): boolean;
@@ -1661,7 +1541,7 @@ declare function validAuxiliaryResult(method: AuxiliaryMethod, v: unknown): bool
1661
1541
  declare function createAppAuxiliarySessionsApi(rpc: {
1662
1542
  requireFeature(): void;
1663
1543
  request<M extends AuxiliaryMethod>(method: M, params: AuxiliaryMethodMap[M]["params"]): Promise<AuxiliaryMethodMap[M]["result"]>;
1664
- }, streams: ConnectionStreams): AppHostAuxiliarySessions;
1544
+ }, streams: ConnectionStreams): AuxiliarySessionsGroup;
1665
1545
 
1666
1546
  /** The extension manager's finite operations. */
1667
1547
  declare const EXTENSION_INPUTS: {
@@ -1713,9 +1593,10 @@ declare const validExtensionResult: (value: unknown) => boolean;
1713
1593
  /** Project records and filesystem locations have separate business identities. */
1714
1594
  interface SystemProject {
1715
1595
  workspaceId: string;
1716
- projectId?: string;
1596
+ projectId: string;
1717
1597
  name: string;
1718
1598
  path: string;
1599
+ rootIdentity?: DesktopRoot["identity"];
1719
1600
  available: boolean;
1720
1601
  lastOpenedAt: number;
1721
1602
  defaultShell?: string;
@@ -1723,6 +1604,7 @@ interface SystemProject {
1723
1604
  interface ProjectSnapshot {
1724
1605
  dataScopeId: string;
1725
1606
  projects: SystemProject[];
1607
+ selectedWorkspaceId?: string;
1726
1608
  }
1727
1609
  type Scope = {
1728
1610
  dataScopeId: string;
@@ -1741,16 +1623,97 @@ type ProjectRequest = {
1741
1623
  shell: string | null;
1742
1624
  } | Project & {
1743
1625
  action: "archive";
1744
- } | Scope & {
1626
+ } | Project & {
1745
1627
  action: "rebind";
1746
- projectId?: string;
1747
- workspaceId: string;
1748
1628
  previousWorkspaceId: string;
1749
- previousPath?: string;
1629
+ expectedPath: string;
1750
1630
  };
1751
1631
  declare function validProjectRequest(value: unknown): value is ProjectRequest;
1752
1632
  declare const validProjectSnapshot: (value: unknown) => value is ProjectSnapshot;
1753
1633
 
1634
+ type Root = {
1635
+ rootPath: string;
1636
+ identity?: {
1637
+ dev: string;
1638
+ ino: string;
1639
+ };
1640
+ };
1641
+ type File = Root & {
1642
+ path: string;
1643
+ };
1644
+ type Write = File & {
1645
+ requestId: string;
1646
+ content: string;
1647
+ originalContent: string;
1648
+ };
1649
+ type Preview = {
1650
+ path: string;
1651
+ name: string;
1652
+ language: string;
1653
+ size: number;
1654
+ binary: boolean;
1655
+ content: string | null;
1656
+ scope: "project" | "extra-root";
1657
+ relativePath: string;
1658
+ rootLabel: string;
1659
+ previewBytes: ArrayBuffer | null;
1660
+ mediaType: "image/avif" | "image/bmp" | "image/gif" | "image/jpeg" | "image/png" | "image/webp" | null;
1661
+ imagePreviewError: "image_too_large" | "image_unsupported" | null;
1662
+ rootIdentity?: Root["identity"];
1663
+ documentPreview?: {
1664
+ format: "pdf" | "epub" | "docx" | "xlsx" | "pptx";
1665
+ bytes: ArrayBuffer;
1666
+ };
1667
+ };
1668
+ type Tree = {
1669
+ rootPath: string;
1670
+ entries: {
1671
+ path: string;
1672
+ type: "file" | "directory";
1673
+ size?: number;
1674
+ }[];
1675
+ truncated?: boolean;
1676
+ };
1677
+ type Entry<Input, Result> = {
1678
+ input: Input;
1679
+ result: Result;
1680
+ };
1681
+ type LocalWorkspaceActions = {
1682
+ pick: Entry<{}, Required<Root> & {
1683
+ workspaceId: string;
1684
+ } | null>;
1685
+ list: Entry<Root & {
1686
+ path?: string;
1687
+ }, Tree>;
1688
+ find: Entry<Root & {
1689
+ query: string;
1690
+ }, {
1691
+ files: string[];
1692
+ truncated: boolean;
1693
+ }>;
1694
+ read: Entry<File, Preview>;
1695
+ write: Entry<Write, Preview>;
1696
+ getWrite: Entry<Write, Preview | null>;
1697
+ reveal: Entry<File, void>;
1698
+ openWith: Entry<File & {
1699
+ openerId: string;
1700
+ }, void>;
1701
+ copyPath: Entry<File & {
1702
+ absolute?: boolean;
1703
+ }, void>;
1704
+ listOpeners: Entry<{}, DesktopOpener[]>;
1705
+ webPreview: Entry<File, {
1706
+ url: string;
1707
+ }>;
1708
+ };
1709
+ type Action = keyof LocalWorkspaceActions;
1710
+ type LocalWorkspaceRequest = {
1711
+ [A in Action]: {
1712
+ action: A;
1713
+ } & LocalWorkspaceActions[A]["input"];
1714
+ }[Action];
1715
+ type LocalWorkspaceResult<A extends Action = Action> = LocalWorkspaceActions[A]["result"];
1716
+
1754
1717
  interface CustomModelProviderInput {
1755
1718
  id: string;
1756
1719
  displayName: string;
@@ -1851,6 +1814,8 @@ interface ProviderDefaultsSnapshot {
1851
1814
  }>;
1852
1815
  fastModeAvailable: false;
1853
1816
  fastModeReason: string;
1817
+ /** Present when the caller supplied a proof for its current account gateway. */
1818
+ accountGatewayMatches?: boolean;
1854
1819
  }
1855
1820
  interface ProviderConnectionTestResult {
1856
1821
  status: "verified" | "failed";
@@ -1860,6 +1825,7 @@ interface ProviderConnectionTestResult {
1860
1825
  }
1861
1826
  type ProviderDefaultsRequest = {
1862
1827
  action: "snapshot";
1828
+ accountGatewayProof?: string;
1863
1829
  } | {
1864
1830
  action: "updateModel";
1865
1831
  provider?: string;
@@ -1876,7 +1842,7 @@ type ProviderDefaultsRequest = {
1876
1842
  model: string;
1877
1843
  };
1878
1844
 
1879
- declare const SYSTEM_SETTINGS_SECTIONS: readonly ["general", "notifications", "profile", "appearance", "keyboard", "providers", "permissions", "personalization", "billing", "connections", "terminal", "git", "runtime", "storage", "diagnostics"];
1845
+ declare const SYSTEM_SETTINGS_SECTIONS: readonly ["general", "notifications", "profile", "appearance", "keyboard", "providers", "permissions", "personalization", "billing", "terminal", "git", "runtime", "storage", "diagnostics"];
1880
1846
  type SessionSettingsOriginal = Extract<SessionControlOriginal, {
1881
1847
  action: "fork";
1882
1848
  }>;
@@ -1997,12 +1963,30 @@ type SystemEvent = {
1997
1963
  type: "git-preferences-changed";
1998
1964
  defaultTaskLocation: "current" | "worktree";
1999
1965
  };
2000
- declare const SYSTEM_METHODS: readonly ["system.projects", "system.extensions", "system.modelProviders", "system.providerDefaults", "system.open", "system.getPresentationPreferences", "system.setTheme", "system.setWindowMaterial", "system.copyText", "system.openExternal", "system.navigationReady", "system.completeNavigation"];
1966
+ declare const CHANNEL_SETTINGS_ACTIONS: readonly ["snapshot", "runtimeStatus", "connect", "patch", "remove", "allowAdd", "allowRemove", "startRegistration", "registrationStatus", "cancelRegistration", "startRuntime", "stopRuntime"];
1967
+ type ChannelSettingsAction = typeof CHANNEL_SETTINGS_ACTIONS[number];
1968
+ type ChannelSettingsRequest = {
1969
+ action: ChannelSettingsAction;
1970
+ input?: unknown;
1971
+ };
1972
+ type ChannelSettingsResult = {
1973
+ value: object;
1974
+ } | {
1975
+ error: "invalid_configuration" | "conflict";
1976
+ };
1977
+ type RequestChannelSettings = (request: ChannelSettingsRequest) => Promise<ChannelSettingsResult>;
1978
+ /** Internal bridge used by the bundled workbench settings page. */
1979
+ declare function workbenchChannelSettings(system: object): RequestChannelSettings;
1980
+ declare const SYSTEM_METHODS: readonly ["system.projects", "system.workspace", "system.extensions", "system.modelProviders", "system.channelSettings", "system.providerDefaults", "system.open", "system.getPresentationPreferences", "system.setTheme", "system.setWindowMaterial", "system.copyText", "system.openExternal", "system.navigationReady", "system.completeNavigation"];
2001
1981
  interface SystemMethodMap {
2002
1982
  "system.projects": {
2003
1983
  params: ProjectRequest;
2004
1984
  result: ProjectSnapshot;
2005
1985
  };
1986
+ "system.workspace": {
1987
+ params: LocalWorkspaceRequest;
1988
+ result: LocalWorkspaceResult;
1989
+ };
2006
1990
  "system.extensions": {
2007
1991
  params: ExtensionRequest;
2008
1992
  result: unknown;
@@ -2011,6 +1995,10 @@ interface SystemMethodMap {
2011
1995
  params: ModelProviderRequest;
2012
1996
  result: ModelProviderConnection[];
2013
1997
  };
1998
+ "system.channelSettings": {
1999
+ params: ChannelSettingsRequest;
2000
+ result: ChannelSettingsResult;
2001
+ };
2014
2002
  "system.providerDefaults": {
2015
2003
  params: ProviderDefaultsRequest;
2016
2004
  result: ProviderDefaultsSnapshot | ProviderConnectionTestResult;
@@ -2073,6 +2061,10 @@ declare function validSystemResult(method: SystemMethod, value: unknown): boolea
2073
2061
  declare function validSystemEvent(value: unknown): value is SystemEvent;
2074
2062
  interface AppHostSystem {
2075
2063
  projects(input: ProjectRequest): Promise<ProjectSnapshot>;
2064
+ /** Local files for the trusted, built-in workbench. */
2065
+ workspace<A extends LocalWorkspaceRequest["action"]>(input: Extract<LocalWorkspaceRequest, {
2066
+ action: A;
2067
+ }>): Promise<LocalWorkspaceResult<A>>;
2076
2068
  /** Requires the explicit extensions.manage installation capability. */
2077
2069
  extensions(input: ExtensionRequest): Promise<unknown>;
2078
2070
  /** Manages connections for the active built-in workbench. */
@@ -2109,6 +2101,13 @@ interface SystemRequester {
2109
2101
  }
2110
2102
  declare function createAppSystemApi(requester: SystemRequester, connectionOwner: object): AppHostSystem;
2111
2103
 
2104
+ interface AppHostSessions {
2105
+ /** Handles share the page's connection. Closing any handle ends the
2106
+ * connection and all its in-flight requests. */
2107
+ getConnection(): Promise<AgentConnection>;
2108
+ preparation: ConversationPreparationGroup;
2109
+ auxiliary: AuxiliarySessionsGroup;
2110
+ }
2112
2111
  type SessionResourceMethod = "sessions.getConnection";
2113
2112
  declare function validSessionResourceInput(method: SessionResourceMethod, v: unknown): boolean;
2114
2113
  declare function validSessionResourceResult(_method: SessionResourceMethod, v: unknown): v is {
@@ -2117,6 +2116,25 @@ declare function validSessionResourceResult(_method: SessionResourceMethod, v: u
2117
2116
  defaultTaskLocation?: "current" | "worktree";
2118
2117
  };
2119
2118
 
2119
+ interface ServiceConnection {
2120
+ readonly baseUrl: string;
2121
+ readonly apiVersion: string;
2122
+ fetch: typeof fetch;
2123
+ isClosed(): boolean;
2124
+ close(): void;
2125
+ }
2126
+ interface AppHostService {
2127
+ getStatus(): Promise<ServiceStatus>;
2128
+ getConnection(input: {
2129
+ apiRange: string;
2130
+ }): Promise<ServiceConnection>;
2131
+ listWork(): Promise<ServiceWork[]>;
2132
+ getWork(requestId: string): Promise<ServiceWork>;
2133
+ interruptWork(requestId: string): Promise<{
2134
+ requested: boolean;
2135
+ }>;
2136
+ }
2137
+
2120
2138
  type AppUnloadReason = "switch" | "reload" | "disable" | "quit";
2121
2139
  type AppLifecycleFrame = {
2122
2140
  protocol: 1;
@@ -2135,6 +2153,179 @@ type AppLifecycleFrame = {
2135
2153
  };
2136
2154
  /** Only finite plain-data frames cross the document port. */
2137
2155
  declare function isAppLifecycleFrame(value: unknown): value is AppLifecycleFrame;
2156
+ interface AppUnloadRequest {
2157
+ id: string;
2158
+ reason: AppUnloadReason;
2159
+ signal: AbortSignal;
2160
+ }
2161
+ type AppUnloadHandler = (request: AppUnloadRequest) => Promise<boolean> | boolean;
2162
+ interface AppHostLifecycle {
2163
+ /** Freeze editing and save/read back current work. Abort restores editing after cancellation. */
2164
+ onPrepareUnload(handler: AppUnloadHandler): () => void;
2165
+ }
2166
+
2167
+ interface AppHostStorage {
2168
+ get(key: string): Promise<StorageGetResult>;
2169
+ set(key: string, value: JsonValue): Promise<void>;
2170
+ delete(key: string): Promise<void>;
2171
+ putFile(name: string, data: Blob): Promise<StoredFile>;
2172
+ readFile(id: string): Promise<Response>;
2173
+ deleteFile(id: string): Promise<void>;
2174
+ }
2175
+ interface AppHost {
2176
+ hasFeature(feature: AppHostFeature): boolean;
2177
+ commands: AppHostCommands;
2178
+ lifecycle: AppHostLifecycle;
2179
+ system: AppHostSystem;
2180
+ window: AppHostWindow;
2181
+ sessions: AppHostSessions;
2182
+ desktop: AppHostDesktop;
2183
+ attachments: AppHostAttachments;
2184
+ workspace: AppHostWorkspace;
2185
+ service: AppHostService;
2186
+ getContext(): Promise<AppContext>;
2187
+ onEvent(listener: (event: AppHostEvent) => void): () => void;
2188
+ storage: AppHostStorage;
2189
+ auth: {
2190
+ openLogin(input: {
2191
+ url: string;
2192
+ }): Promise<LoginResult>;
2193
+ };
2194
+ }
2195
+
2196
+ type DesktopComputerAvailability = "unsupported" | "disabled" | "missing_driver" | "ready";
2197
+ interface DesktopComputerCandidate {
2198
+ id: string;
2199
+ label: string;
2200
+ detail?: string;
2201
+ }
2202
+ type DesktopComputerPrompt = {
2203
+ id: string;
2204
+ } & ({
2205
+ kind: "authorize";
2206
+ sessionId: string;
2207
+ appName: string;
2208
+ } | {
2209
+ kind: "choose";
2210
+ sessionId: string;
2211
+ candidates: readonly DesktopComputerCandidate[];
2212
+ confirmChange?: true;
2213
+ });
2214
+ type DesktopComputerInteractionEvent = {
2215
+ type: "prompt";
2216
+ prompt: DesktopComputerPrompt;
2217
+ } | {
2218
+ type: "dismissed";
2219
+ id: string;
2220
+ };
2221
+ interface DesktopComputerInteractionReply {
2222
+ id: string;
2223
+ choice: string | null;
2224
+ }
2225
+ interface DesktopComputerActivity {
2226
+ sessionId: string;
2227
+ runId: string;
2228
+ phase: "ready" | "observing" | "foreground" | "paused" | "stopped";
2229
+ app?: string;
2230
+ title?: string;
2231
+ action?: string;
2232
+ evidence?: string;
2233
+ reason?: string;
2234
+ captureEnabled?: boolean;
2235
+ captureRevocation?: "pending" | "failed";
2236
+ inputRelease?: "pending" | "failed";
2237
+ preview?: {
2238
+ dataUrl: string;
2239
+ width: number;
2240
+ height: number;
2241
+ };
2242
+ }
2243
+ interface DesktopComputerActivityUpdate {
2244
+ sessionId: string;
2245
+ activity: DesktopComputerActivity | null;
2246
+ }
2247
+ interface DesktopComputerControl {
2248
+ sessionId: string;
2249
+ runId: string;
2250
+ action: "pause" | "resume" | "disable_capture" | "enable_capture";
2251
+ }
2252
+ declare const WORKBENCH_COMPUTER_FEATURE: "workbench-computer-v1";
2253
+ declare const workbenchComputerKey: unique symbol;
2254
+ interface WorkbenchComputer {
2255
+ availability(): Promise<DesktopComputerAvailability>;
2256
+ setConversation(sessionId: string | null): Promise<void>;
2257
+ preparePrompt(sessionId: string, inputId: string): Promise<boolean>;
2258
+ stopLocal(sessionId: string, runId: string): Promise<void>;
2259
+ getActivity(sessionId: string): Promise<DesktopComputerActivity | null>;
2260
+ reply(input: DesktopComputerInteractionReply): Promise<boolean>;
2261
+ control(input: DesktopComputerControl): Promise<boolean>;
2262
+ shareWindow(): Promise<{
2263
+ bytes: Uint8Array;
2264
+ } | null>;
2265
+ onActivity(listener: (event: DesktopComputerActivityUpdate) => void): () => void;
2266
+ onPrompt(listener: (event: DesktopComputerInteractionEvent) => void): () => void;
2267
+ }
2268
+ /** @internal Only for the bundled workbench. Main checks the document on every call. */
2269
+ declare function workbenchComputer(host: AppHost): WorkbenchComputer | undefined;
2270
+ declare const WORKBENCH_COMPUTER_METHODS: readonly ["workbench.computer.availability", "workbench.computer.setConversation", "workbench.computer.preparePrompt", "workbench.computer.getActivity", "workbench.computer.reply", "workbench.computer.control", "workbench.computer.shareWindow", "workbench.computer.stopLocal"];
2271
+ type WorkbenchComputerMethod = typeof WORKBENCH_COMPUTER_METHODS[number];
2272
+ interface WorkbenchComputerMethodMap {
2273
+ "workbench.computer.availability": {
2274
+ params: Record<string, never>;
2275
+ result: DesktopComputerAvailability;
2276
+ };
2277
+ "workbench.computer.setConversation": {
2278
+ params: {
2279
+ sessionId: string | null;
2280
+ };
2281
+ result: void;
2282
+ };
2283
+ "workbench.computer.preparePrompt": {
2284
+ params: {
2285
+ sessionId: string;
2286
+ inputId: string;
2287
+ };
2288
+ result: boolean;
2289
+ };
2290
+ "workbench.computer.stopLocal": {
2291
+ params: {
2292
+ sessionId: string;
2293
+ runId: string;
2294
+ };
2295
+ result: void;
2296
+ };
2297
+ "workbench.computer.getActivity": {
2298
+ params: {
2299
+ sessionId: string;
2300
+ };
2301
+ result: DesktopComputerActivity | null;
2302
+ };
2303
+ "workbench.computer.reply": {
2304
+ params: DesktopComputerInteractionReply;
2305
+ result: boolean;
2306
+ };
2307
+ "workbench.computer.control": {
2308
+ params: DesktopComputerControl;
2309
+ result: boolean;
2310
+ };
2311
+ "workbench.computer.shareWindow": {
2312
+ params: Record<string, never>;
2313
+ result: {
2314
+ bytes: Uint8Array;
2315
+ } | null;
2316
+ };
2317
+ }
2318
+ type WorkbenchComputerEvent = {
2319
+ type: "workbench-computer-activity";
2320
+ update: DesktopComputerActivityUpdate;
2321
+ } | {
2322
+ type: "workbench-computer-prompt";
2323
+ interaction: DesktopComputerInteractionEvent;
2324
+ };
2325
+ declare function isWorkbenchComputerMethod(method: string): method is WorkbenchComputerMethod;
2326
+ declare function validWorkbenchComputerInput(method: WorkbenchComputerMethod, value: unknown): boolean;
2327
+ declare function validWorkbenchComputerResult(method: WorkbenchComputerMethod, value: unknown): boolean;
2328
+ declare function validWorkbenchComputerEvent(value: unknown): value is WorkbenchComputerEvent;
2138
2329
 
2139
2330
  /** Shared data contract. This module has no browser, Node or Electron side effects. */
2140
2331
  declare const APP_HOST_PROTOCOL: 1;
@@ -2146,7 +2337,7 @@ declare const APP_HOST_REQUEST_TIMEOUT_MS = 30000;
2146
2337
  declare const APP_HOST_PORT_TIMEOUT_MS = 10000;
2147
2338
  declare const APP_HOST_LOGIN_TIMEOUT_MS = 300000;
2148
2339
  declare const APP_HOST_LOGIN_TRANSPORT_TIMEOUT_MS: number;
2149
- declare const APP_HOST_METHODS: readonly ["connect", "negotiate", "getContext", "storage.get", "storage.set", "storage.delete", "sessions.getConnection", "service.getStatus", "service.getConnection", "service.listWork", "service.getWork", "service.interruptWork", "storage.putFile", "storage.readFile", "storage.deleteFile", "auth.openLogin", "workspace.select", "workspace.getSelection", "workspace.get", "workspace.listFiles", "workspace.readText", "commands.register", "commands.update", "commands.dispose", "workspace.list", "sessions.createConversation", "sessions.getConversationCreationResult", "sessions.bindConversationIndex", ...(keyof DesktopMethodMap)[], "attachments.getConnection", "sessions.getAuxiliaryOptions", "sessions.openAuxiliary", "sessions.getAuxiliary", "sessions.closeAuxiliary", "system.projects", "system.extensions", "system.modelProviders", "system.providerDefaults", "system.open", "system.getPresentationPreferences", "system.setTheme", "system.setWindowMaterial", "system.copyText", "system.openExternal", "system.navigationReady", "system.completeNavigation", "window.getState", "window.checkForUpdates", "window.minimize", "window.toggleMaximize", "window.requestClose", "window.openHost", "window.reportStartup"];
2340
+ declare const APP_HOST_METHODS: readonly ["connect", "negotiate", "getContext", "storage.get", "storage.set", "storage.delete", "sessions.getConnection", "service.getStatus", "service.getConnection", "service.listWork", "service.getWork", "service.interruptWork", "storage.putFile", "storage.readFile", "storage.deleteFile", "auth.openLogin", "workspace.select", "workspace.getSelection", "workspace.get", "workspace.listFiles", "workspace.readText", "commands.register", "commands.update", "commands.dispose", "workspace.list", "sessions.createConversation", "sessions.getConversationCreationResult", ...(keyof DesktopMethodMap)[], "attachments.getConnection", "sessions.getAuxiliaryOptions", "sessions.openAuxiliary", "sessions.getAuxiliary", "sessions.closeAuxiliary", "system.projects", "system.workspace", "system.extensions", "system.modelProviders", "system.channelSettings", "system.providerDefaults", "system.open", "system.getPresentationPreferences", "system.setTheme", "system.setWindowMaterial", "system.copyText", "system.openExternal", "system.navigationReady", "system.completeNavigation", "window.getState", "window.checkForUpdates", "window.minimize", "window.toggleMaximize", "window.requestClose", "window.openHost", "window.reportStartup", "workbench.computer.availability", "workbench.computer.setConversation", "workbench.computer.preparePrompt", "workbench.computer.getActivity", "workbench.computer.reply", "workbench.computer.control", "workbench.computer.shareWindow", "workbench.computer.stopLocal"];
2150
2341
 
2151
2342
  interface AppContext {
2152
2343
  readonly appId: string;
@@ -2163,7 +2354,7 @@ interface AppContext {
2163
2354
  }>>;
2164
2355
  readonly storageQuotaBytes: number;
2165
2356
  }
2166
- type AppHostEvent = DesktopToolEvent | SystemEvent | CommandInvocation | ResourceChanged | WindowStateChanged | {
2357
+ type AppHostEvent = DesktopToolEvent | SystemEvent | CommandInvocation | ResourceChanged | WindowStateChanged | WorkbenchComputerEvent | {
2167
2358
  type: "service-changed";
2168
2359
  service: ServiceStatus;
2169
2360
  } | {
@@ -2199,7 +2390,7 @@ type LoginResult = {
2199
2390
  interface ConnectParams {
2200
2391
  hostApi: string;
2201
2392
  }
2202
- interface AppHostMethodMap extends CommandsMethodMap, ResourceCatalogMethodMap, ConversationPreparationMethodMap, DesktopMethodMap, AttachmentsMethodMap, AuxiliaryMethodMap, SystemMethodMap, WindowMethodMap {
2393
+ interface AppHostMethodMap extends CommandsMethodMap, ResourceCatalogMethodMap, ConversationPreparationMethodMap, DesktopMethodMap, AttachmentsMethodMap, AuxiliaryMethodMap, SystemMethodMap, WindowMethodMap, WorkbenchComputerMethodMap {
2203
2394
  "sessions.getConnection": {
2204
2395
  params: Record<string, never>;
2205
2396
  result: {
@@ -2367,5 +2558,5 @@ interface AppHostPortMessage {
2367
2558
  protocol: 1;
2368
2559
  }
2369
2560
 
2370
- export { APP_HOST_ERROR_RETRY, APP_HOST_FEATURES, APP_HOST_LOGIN_TIMEOUT_MS, APP_HOST_LOGIN_TRANSPORT_TIMEOUT_MS, APP_HOST_MAX_PAYLOAD_BYTES, APP_HOST_MAX_PENDING, APP_HOST_METHODS, APP_HOST_PORT, APP_HOST_PORT_TIMEOUT_MS, APP_HOST_PROTOCOL, APP_HOST_READY, APP_HOST_REQUEST_TIMEOUT_MS, ATTACHMENTS_METHODS, AUXILIARY_METHODS, AppHostError, BROWSER_CAPTURE_PREVIEW_MAX_BYTES, COMMANDS_METHODS, DESKTOP_METHODS, EXTENSION_INPUTS, FETCH_CHUNK_BYTES, FETCH_HEADERS_TIMEOUT_MS, FETCH_IDLE_TIMEOUT_MS, FETCH_INLINE_BODY_BYTES, FETCH_MAX_STREAMS, FETCH_METADATA_BYTES, FETCH_WINDOW_CHUNKS, HOST_REQUEST_ID, RESOURCE_CATALOG_METHODS, SERVICE_HOST_MAX_FRAME_BYTES, SERVICE_HOST_MAX_PENDING, SERVICE_HOST_METHODS, SYSTEM_METHODS, SYSTEM_SETTINGS_SECTIONS, SYSTEM_SHORTCUT_IDS, WINDOW_METHODS, appHostErrorMessage, canonicalDesktopRequest, createAppAttachmentsApi, createAppAuxiliarySessionsApi, createAppCommandsApi, createAppDesktopApi, createAppSystemApi, createAppWindowApi, createResourceCatalogApi, isAppHostErrorInfo, isAppLifecycleFrame, isAuxiliaryMethod, isCommandsMethod, isConversationPreparationMethod, isDesktopMethod, isPageFetchFrame, isResourceCatalogMethod, isSafeErrorDetails, isServiceHostFrame, isSystemMethod, isWindowMethod, matchAgentApiRoute, normalizeAgentApiPath, pageFetchPath, validAppCommandSnapshot, validAppWindowState, validAttachmentsInput, validAttachmentsResult, validAuxiliaryInput, validAuxiliaryResult, validBrowserSnapshot, validCommandInvocation, validCommandReceipt, validCommandsInput, validConversationPreparationInput, validConversationPreparationResult, validDesktopEvent, validDesktopInput, validDesktopNavigationTarget, validDesktopResult, validDesktopResultForInput, validDesktopTarget, validExtensionRequest, validExtensionResult, validPresentationSnapshot, validProjectRequest, validProjectSnapshot, validResourceCatalogInput, validResourceCatalogResult, validResourceChanged, validServiceContext, validServiceHostInput, validServiceHostResult, validSessionResourceInput, validSessionResourceResult, validSessionSettingsTarget, validSystemEvent, validSystemInput, validSystemResult, validWindowEvent, validWindowInput, validWindowResult, validWorkspaceInput, validWorkspaceOperation, validWorkspaceResult };
2371
- export type { AgentApiRoute, AnnotationMode, AnnotationRect, AnnotationTarget, AppCommandRegistration, AppCommandSnapshot, AppContext, AppHostAttachments, AppHostAuxiliarySessions, AppHostCommands, AppHostDesktop, AppHostErrorCode, AppHostErrorInfo, AppHostEvent, AppHostEventMessage, AppHostFeature, AppHostMethod, AppHostMethodMap, AppHostPortMessage, AppHostReadyMessage, AppHostRequest, AppHostResponse, AppHostRetry, AppHostSystem, AppHostWindow, AppLifecycleFrame, AppUnloadReason, AppWindowMaterialState, AppWindowOpenHostInput, AppWindowStartupResult, AppWindowState, AppWindowUpdateCheckResult, AppWindowUpdateState, AppearancePreferences, AttachmentsMethod, AttachmentsMethodMap, AuxiliaryMethod, AuxiliaryMethodMap, AuxiliaryOptions, AuxiliaryReceipt, AuxiliaryRequest, AuxiliarySelection, AuxiliaryWireRequest, BindDesktopTarget, BrowserAnnotationRecord, BrowserAnnotationSnapshot, BrowserPage, CommandInvocation, CommandReceipt, CommandsMethod, CommandsMethodMap, ConnectParams, ConversationPreparationMethod, ConversationPreparationMethodMap, CreateWorktree, DesktopGitChange, DesktopMethod, DesktopMethodMap, DesktopNavigationTarget, DesktopOpener, DesktopRoot, DesktopSearch, DesktopTarget, DesktopTerminal, DesktopTerminalInfo, DesktopTerminalRequestOriginal, DesktopTerminalRequestReceipt, DesktopTerminalSnapshot, DesktopText, DesktopToolEvent, DesktopWindow, ExtensionOperation, ExtensionRequest, FetchDirection, GitStatus, JsonValue, LoginResult, ModelProviderConnection, ModelProviderRequest, NavigationCompletionStatus, PageFetchFrame, PluginAppActionReceipt, PluginAppActionResponse, PluginAppCatalog, PluginAppComposerContext, PluginAppHostState, PluginAppModelContext, PluginAppMount, PluginAppPreparedMessage, PluginAppPreparedTool, PluginAppRecord, PluginAppSource, PluginAppSubmissionReceipt, PluginAppToolPolicy, PresentationSnapshot, ProjectRequest, ProjectSnapshot, ProviderConnectionTestResult, ProviderDefaultsRequest, ProviderDefaultsSnapshot, ResourceCatalogMethod, ResourceCatalogMethodMap, ResourceChanged, RootReleaseReceipt, ServiceConnectionDescriptor, ServiceContext, ServiceHostFrame, ServiceHostMethod, ServiceHostMethodMap, ServiceInvocation, ServiceStatus, ServiceWork, ServiceWorkState, SessionResourceMethod, SessionSettingsTarget, SessionSettingsWireTarget, StorageGetResult, StoredFile, SystemEvent, SystemMethod, SystemMethodMap, SystemOpenInput, SystemOpenWireInput, SystemProject, SystemRequester, SystemShortcutId, WindowMethod, WindowMethodMap, WindowRequester, WindowStateChanged, WorkspaceDirectoryPage, WorkspaceFilePage, WorkspaceMethod, WorkspaceOperation, WorkspaceOperationKind, WorkspaceOperationOriginal, WorkspaceRef, WorkspaceSelection, WorkspaceText, WorktreeQuery, WorktreeReceipt };
2561
+ export { APP_HOST_ERROR_RETRY, APP_HOST_FEATURES, APP_HOST_LOGIN_TIMEOUT_MS, APP_HOST_LOGIN_TRANSPORT_TIMEOUT_MS, APP_HOST_MAX_PAYLOAD_BYTES, APP_HOST_MAX_PENDING, APP_HOST_METHODS, APP_HOST_PORT, APP_HOST_PORT_TIMEOUT_MS, APP_HOST_PROTOCOL, APP_HOST_READY, APP_HOST_REQUEST_TIMEOUT_MS, ATTACHMENTS_METHODS, AUXILIARY_METHODS, AppHostError, BROWSER_CAPTURE_PREVIEW_MAX_BYTES, COMMANDS_METHODS, DESKTOP_METHODS, EXTENSION_INPUTS, FETCH_CHUNK_BYTES, FETCH_HEADERS_TIMEOUT_MS, FETCH_IDLE_TIMEOUT_MS, FETCH_INLINE_BODY_BYTES, FETCH_MAX_STREAMS, FETCH_METADATA_BYTES, FETCH_WINDOW_CHUNKS, HOST_REQUEST_ID, RESOURCE_CATALOG_METHODS, SYSTEM_METHODS, SYSTEM_SETTINGS_SECTIONS, SYSTEM_SHORTCUT_IDS, WINDOW_METHODS, WORKBENCH_COMPUTER_FEATURE, WORKBENCH_COMPUTER_METHODS, appHostErrorMessage, canonicalDesktopRequest, createAppAttachmentsApi, createAppAuxiliarySessionsApi, createAppCommandsApi, createAppDesktopApi, createAppSystemApi, createAppWindowApi, createResourceCatalogApi, isAppHostErrorInfo, isAppLifecycleFrame, isAuxiliaryMethod, isCommandsMethod, isConversationPreparationMethod, isDesktopMethod, isPageFetchFrame, isResourceCatalogMethod, isSafeErrorDetails, isSystemMethod, isWindowMethod, isWorkbenchComputerMethod, matchAgentApiRoute, normalizeAgentApiPath, pageFetchPath, validAppCommandSnapshot, validAppWindowState, validAttachmentsInput, validAttachmentsResult, validAuxiliaryInput, validAuxiliaryResult, validBrowserSnapshot, validCommandInvocation, validCommandReceipt, validCommandsInput, validConversationPreparationInput, validConversationPreparationResult, validDesktopEvent, validDesktopInput, validDesktopNavigationTarget, validDesktopResult, validDesktopResultForInput, validDesktopTarget, validExtensionRequest, validExtensionResult, validPresentationSnapshot, validProjectRequest, validProjectSnapshot, validResourceCatalogInput, validResourceCatalogResult, validResourceChanged, validSessionResourceInput, validSessionResourceResult, validSessionSettingsTarget, validSystemEvent, validSystemInput, validSystemResult, validWindowEvent, validWindowInput, validWindowResult, validWorkbenchComputerEvent, validWorkbenchComputerInput, validWorkbenchComputerResult, validWorkspaceInput, validWorkspaceOperation, validWorkspaceResult, workbenchChannelSettings, workbenchComputer, workbenchComputerKey };
2562
+ export type { AgentApiRoute, AnnotationMode, AnnotationRect, AnnotationTarget, AppCommandRegistration, AppCommandSnapshot, AppContext, AppHostAttachments, AppHostCommands, AppHostDesktop, AppHostErrorCode, AppHostErrorInfo, AppHostEvent, AppHostEventMessage, AppHostFeature, AppHostFileOperations, AppHostGitOperations, AppHostMethod, AppHostMethodMap, AppHostPortMessage, AppHostReadyMessage, AppHostRequest, AppHostResponse, AppHostRetry, AppHostSystem, AppHostTerminalOperations, AppHostWindow, AppLifecycleFrame, AppUnloadReason, AppWindowMaterialState, AppWindowOpenHostInput, AppWindowStartupResult, AppWindowState, AppWindowUpdateCheckResult, AppWindowUpdateState, AppearancePreferences, AttachmentsMethod, AttachmentsMethodMap, AuxiliaryMethod, AuxiliaryMethodMap, AuxiliaryOptions, AuxiliaryReceipt, AuxiliaryRequest, AuxiliarySelection, AuxiliarySessionsGroup, AuxiliaryWireRequest, BindDesktopTarget, BrowserAnnotationRecord, BrowserAnnotationSnapshot, BrowserPage, ChannelSettingsAction, CommandInvocation, CommandReceipt, CommandsMethod, CommandsMethodMap, ConnectParams, ConversationPreparationMethod, ConversationPreparationMethodMap, DesktopComputerActivity, DesktopComputerActivityUpdate, DesktopComputerAvailability, DesktopComputerCandidate, DesktopComputerControl, DesktopComputerInteractionEvent, DesktopComputerInteractionReply, DesktopComputerPrompt, DesktopGitChange, DesktopMethod, DesktopMethodMap, DesktopNavigationTarget, DesktopOpener, DesktopRoot, DesktopSearch, DesktopTarget, DesktopTerminal, DesktopTerminalInfo, DesktopTerminalRequestOriginal, DesktopTerminalRequestReceipt, DesktopTerminalSnapshot, DesktopText, DesktopToolEvent, DesktopWindow, ExtensionOperation, ExtensionRequest, FetchDirection, FileOperationOriginal, GitOperationOriginal, JsonValue, LocalWorkspaceRequest, LocalWorkspaceResult, LoginResult, ModelProviderConnection, ModelProviderRequest, NavigationCompletionStatus, PageFetchFrame, PluginAppActionReceipt, PluginAppActionResponse, PluginAppCatalog, PluginAppComposerContext, PluginAppHostState, PluginAppModelContext, PluginAppMount, PluginAppPreparedMessage, PluginAppPreparedTool, PluginAppRecord, PluginAppSource, PluginAppSubmissionReceipt, PluginAppToolPolicy, PresentationSnapshot, ProjectRequest, ProjectSnapshot, ProviderConnectionTestResult, ProviderDefaultsRequest, ProviderDefaultsSnapshot, ResourceCatalogMethod, ResourceCatalogMethodMap, ResourceChanged, ServiceConnectionDescriptor, ServiceStatus, ServiceWork, ServiceWorkState, SessionResourceMethod, SessionSettingsTarget, SessionSettingsWireTarget, StorageGetResult, StoredFile, SystemEvent, SystemMethod, SystemMethodMap, SystemOpenInput, SystemOpenWireInput, SystemProject, SystemRequester, SystemShortcutId, WindowMethod, WindowMethodMap, WindowRequester, WindowStateChanged, WorkbenchComputer, WorkbenchComputerEvent, WorkbenchComputerMethod, WorkbenchComputerMethodMap, WorkspaceDirectoryPage, WorkspaceFilePage, WorkspaceMethod, WorkspaceOperation, WorkspaceOperationKind, WorkspaceOperationOriginal, WorkspaceRef, WorkspaceSelection, WorkspaceText };