@compozy/client 0.6.2 → 0.7.1

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.
@@ -578,6 +578,7 @@ export type AgentProbeHealthPayload = {
578
578
  };
579
579
  export type AgentResponse = {
580
580
  agent: AgentPayload;
581
+ warnings?: Array<string>;
581
582
  };
582
583
  export type AgentSessionMetricsPayload = {
583
584
  active: number;
@@ -995,6 +996,11 @@ export type BindSessionWorktreeRequest = {
995
996
  expected_worktree_id?: string | null;
996
997
  worktree: string;
997
998
  };
999
+ /**
1000
+ * Deprecated: accepted and ignored; remove before v0.8.0.
1001
+ *
1002
+ * @deprecated
1003
+ */
998
1004
  export type BindingsConfig = {
999
1005
  bottom_center: string;
1000
1006
  top_center: string;
@@ -1093,10 +1099,28 @@ export type ChangePatchPayload = {
1093
1099
  export type ChangeSet = {
1094
1100
  client_ids?: Array<string>;
1095
1101
  desktop_ids?: Array<string>;
1102
+ /**
1103
+ * Deprecated: retained for compatibility; removed in v0.8.0. See the window-manager deprecation matrix for its replacement.
1104
+ *
1105
+ * @deprecated
1106
+ */
1096
1107
  group_ids?: Array<string>;
1097
1108
  node_ids?: Array<string>;
1109
+ /**
1110
+ * Deprecated: retained for compatibility; removed in v0.8.0. See the window-manager deprecation matrix for its replacement.
1111
+ *
1112
+ * @deprecated
1113
+ */
1098
1114
  stack_grouped?: Array<string>;
1115
+ /**
1116
+ * Deprecated: retained for compatibility; removed in v0.8.0. See the window-manager deprecation matrix for its replacement.
1117
+ *
1118
+ * @deprecated
1119
+ */
1099
1120
  stack_ungrouped?: Array<string>;
1121
+ tab_ids?: Array<string>;
1122
+ tab_split?: Array<string>;
1123
+ tab_unsplit?: Array<string>;
1100
1124
  window_ids?: Array<string>;
1101
1125
  };
1102
1126
  export type ChangeSidePayload = {
@@ -1405,6 +1429,9 @@ export type ContractWindowManagerClientRegistration = {
1405
1429
  };
1406
1430
  export type ContractWindowManagerClientView = {
1407
1431
  active_desktop_id: string;
1432
+ active_tab: {
1433
+ [key: string]: string;
1434
+ };
1408
1435
  attachment_token?: string;
1409
1436
  client_id: string;
1410
1437
  connected_at: string;
@@ -1415,6 +1442,11 @@ export type ContractWindowManagerClientView = {
1415
1442
  kind: string;
1416
1443
  palette_context: WindowManagerPaletteContext;
1417
1444
  presentation_revision: number;
1445
+ /**
1446
+ * Deprecated: retained for compatibility; removed in v0.8.0. See the window-manager deprecation matrix for its replacement.
1447
+ *
1448
+ * @deprecated
1449
+ */
1418
1450
  stack_active: {
1419
1451
  [key: string]: string;
1420
1452
  };
@@ -1427,7 +1459,7 @@ export type ContractWindowManagerClientsResponse = {
1427
1459
  export type ContractWindowManagerCommandRequest = {
1428
1460
  actor: WindowManagerActor;
1429
1461
  client_id?: string | null;
1430
- command_id: "desktop.create" | "desktop.update" | "desktop.reorder" | "desktop.switch" | "desktop.delete" | "window.open" | "window.navigate" | "window.close" | "window.focus" | "window.move" | "window.resize" | "window.swap" | "window.toggle_floating" | "window.zoom" | "window.stack.group" | "window.stack.reorder" | "window.stack.set_active" | "window.pin" | "window.reopen" | "layout.arrange" | "layout.resize" | "layout.frame_resize" | "layout.balance" | "layout.undo" | "layout.redo" | "layout.replace";
1462
+ command_id: "desktop.create" | "desktop.update" | "desktop.reorder" | "desktop.switch" | "desktop.delete" | "window.open" | "window.navigate" | "window.close" | "window.focus" | "window.move" | "window.resize" | "window.swap" | "window.toggle_floating" | "window.zoom" | "window.stack.group" | "window.stack.reorder" | "window.stack.set_active" | "window.pin" | "window.reopen" | "window.tab.reorder" | "window.tab.activate" | "layout.arrange" | "layout.resize" | "layout.frame_resize" | "layout.balance" | "layout.undo" | "layout.redo" | "layout.replace";
1431
1463
  expected_revision: number;
1432
1464
  origin: string;
1433
1465
  payload: unknown;
@@ -1435,12 +1467,11 @@ export type ContractWindowManagerCommandRequest = {
1435
1467
  workspace_id: string;
1436
1468
  };
1437
1469
  export type ContractWindowManagerDesktop = {
1438
- floating: Array<string>;
1439
- floating_stacks: Array<WindowManagerFloatingStack>;
1440
- groups: Array<ContractWindowManagerLayoutGroup>;
1470
+ active_tab_id: string;
1441
1471
  id: string;
1442
1472
  name: string;
1443
1473
  order: number;
1474
+ tabs: Array<ContractWindowManagerTab>;
1444
1475
  };
1445
1476
  export type ContractWindowManagerErrorPayload = {
1446
1477
  code: "window_manager_workspace_not_found" | "window_manager_revision_conflict" | "window_binding_invalid" | "window_manager_invalid_command" | "window_manager_invalid_topology" | "window_manager_desktop_not_found" | "window_manager_window_not_found" | "window_manager_not_stacked" | "window_manager_window_pinned" | "window_manager_client_not_found" | "window_manager_destination_required" | "window_manager_final_desktop" | "window_manager_history_boundary" | "window_manager_layout_not_found" | "window_manager_slow_consumer" | "window_manager_unavailable";
@@ -1459,11 +1490,6 @@ export type ContractWindowManagerLayoutDocument = {
1459
1490
  };
1460
1491
  workspace_id: string;
1461
1492
  };
1462
- export type ContractWindowManagerLayoutGroup = {
1463
- frame: NormalizedRect;
1464
- id: string;
1465
- root: WindowManagerLayoutNode;
1466
- };
1467
1493
  export type ContractWindowManagerLayoutReplaceRequest = {
1468
1494
  actor: WindowManagerActor;
1469
1495
  client_id?: string | null;
@@ -1478,6 +1504,7 @@ export type ContractWindowManagerLayoutValidationRequest = {
1478
1504
  };
1479
1505
  export type ContractWindowManagerLayoutValidationResponse = {
1480
1506
  diagnostics?: Array<Diagnostic>;
1507
+ document?: ContractWindowManagerLayoutDocument | null;
1481
1508
  valid: boolean;
1482
1509
  workspace_id: string;
1483
1510
  };
@@ -1485,6 +1512,7 @@ export type ContractWindowManagerPreview = {
1485
1512
  changed: boolean;
1486
1513
  changes: ChangeSet;
1487
1514
  client?: ContractWindowManagerClientView | null;
1515
+ deprecations: Array<Deprecation>;
1488
1516
  diagnostics?: Array<Diagnostic>;
1489
1517
  snapshot: ContractWindowManagerSnapshot;
1490
1518
  };
@@ -1492,6 +1520,7 @@ export type ContractWindowManagerResult = {
1492
1520
  applied: boolean;
1493
1521
  changes: ChangeSet;
1494
1522
  client?: ContractWindowManagerClientView | null;
1523
+ deprecations: Array<Deprecation>;
1495
1524
  diagnostics?: Array<Diagnostic>;
1496
1525
  rebased_from?: number;
1497
1526
  snapshot: ContractWindowManagerSnapshot;
@@ -1499,6 +1528,7 @@ export type ContractWindowManagerResult = {
1499
1528
  export type ContractWindowManagerSnapshot = {
1500
1529
  closed_entry_count: number;
1501
1530
  desktops: Array<ContractWindowManagerDesktop>;
1531
+ migration?: MigrationStatus | null;
1502
1532
  overrides: WorkspaceConfig;
1503
1533
  revision: number;
1504
1534
  updated_at: string;
@@ -1508,6 +1538,11 @@ export type ContractWindowManagerSnapshot = {
1508
1538
  };
1509
1539
  workspace_id: string;
1510
1540
  };
1541
+ export type ContractWindowManagerTab = {
1542
+ id: string;
1543
+ pinned: boolean;
1544
+ root: WindowManagerLayoutNode;
1545
+ };
1511
1546
  export type CoordinatorConfigPayload = {
1512
1547
  agent_name: string;
1513
1548
  default_ttl_seconds: number;
@@ -1763,6 +1798,13 @@ export type DeleteProfileResponse = {
1763
1798
  export type DeleteResourceRequest = {
1764
1799
  expected_version: number;
1765
1800
  };
1801
+ export type Deprecation = {
1802
+ code: string;
1803
+ message: string;
1804
+ removal_release: string;
1805
+ replacement?: string;
1806
+ surface: string;
1807
+ };
1766
1808
  export type DetailBody = {
1767
1809
  actions?: Array<RowAction>;
1768
1810
  is_loading?: boolean;
@@ -1922,6 +1964,7 @@ export type Error = {
1922
1964
  };
1923
1965
  export type ErrorPayload = {
1924
1966
  blockers?: Array<WorkspaceArchiveBlocker>;
1967
+ client_message_id?: string;
1925
1968
  code?: string;
1926
1969
  config_path?: string;
1927
1970
  current_turn_id?: string;
@@ -1930,6 +1973,8 @@ export type ErrorPayload = {
1930
1973
  };
1931
1974
  diagnostic?: DiagnosticItem | null;
1932
1975
  error: string;
1976
+ provider_error?: string;
1977
+ retryable?: boolean;
1933
1978
  unknown_keys?: Array<string>;
1934
1979
  };
1935
1980
  export type ExecutionPolicy = {
@@ -3290,6 +3335,10 @@ export type InstallExtensionRequest = {
3290
3335
  */
3291
3336
  profile?: string;
3292
3337
  ref: string;
3338
+ /**
3339
+ * Replace the installed extension of the same name. Applies to local_path installs only, since published sources replace implicitly. The previous version stays installed only when the replacement fails before the reinstall transaction completes; a failure after it returns, such as enable failing, does not restore it. A marketplace-owned name is refused with extension_name_conflict. Replacing a package attached outside the caller's workspace requires operator authority.
3340
+ */
3341
+ replace?: boolean;
3293
3342
  /**
3294
3343
  * Overrides manifest server defaults. Mixed defaults require an explicit scope. A workspace default requires a workspace-bound caller or workspace_id.
3295
3344
  */
@@ -3308,6 +3357,10 @@ export type InstallExtensionResponse = {
3308
3357
  enable_error?: ExtensionEnableError | null;
3309
3358
  extension: ExtensionPayload;
3310
3359
  };
3360
+ export type Inventory = {
3361
+ generated_at: string;
3362
+ runtimes: Array<Snapshot>;
3363
+ };
3311
3364
  export type JobPayload = {
3312
3365
  agent_name: string;
3313
3366
  created_at: string;
@@ -4133,6 +4186,19 @@ export type MCPAuthSummary = {
4133
4186
  registration?: string;
4134
4187
  scopes?: Array<string>;
4135
4188
  };
4189
+ export type MCPReloadRecord = {
4190
+ at: string;
4191
+ outcome: string;
4192
+ reason: string;
4193
+ };
4194
+ export type MCPServerRow = {
4195
+ callable_count: number;
4196
+ name: string;
4197
+ owner: string;
4198
+ reason: string;
4199
+ state: string;
4200
+ tool_count: number;
4201
+ };
4136
4202
  export type MCPServerStatusPayload = {
4137
4203
  auth_status?: string;
4138
4204
  configured: boolean;
@@ -4148,6 +4214,11 @@ export type MCPServerStatusPayload = {
4148
4214
  transport?: string;
4149
4215
  workspace_id?: string;
4150
4216
  };
4217
+ export type MCPSummary = {
4218
+ attention: number;
4219
+ pending_reload: boolean;
4220
+ usable: number;
4221
+ };
4151
4222
  export type ManagedExtensionRemovePayload = {
4152
4223
  data_path?: string;
4153
4224
  name: string;
@@ -4350,6 +4421,35 @@ export type MetricSpec = {
4350
4421
  direction: "maximize" | "minimize";
4351
4422
  min_delta?: number | null;
4352
4423
  };
4424
+ /**
4425
+ * Layout migration status. A conversion diagnostic is present in error only when state is failed; a successful retry clears error.
4426
+ */
4427
+ export type MigrationStatus = {
4428
+ acknowledged: boolean;
4429
+ at?: string;
4430
+ error?: Diagnostic | null;
4431
+ /**
4432
+ * Topology revision installed on conversion failure; cleared after a successful retry.
4433
+ */
4434
+ failure_revision?: number;
4435
+ from_version?: number;
4436
+ state: "none" | "migrated" | "failed";
4437
+ summary?: MigrationSummary | null;
4438
+ /**
4439
+ * Number of set-aside layout backups currently retained for this profile; omitted when zero.
4440
+ */
4441
+ superseded_backups?: number;
4442
+ };
4443
+ export type MigrationSummary = {
4444
+ desktops: number;
4445
+ floating_to_tabs: number;
4446
+ islands_merged: number;
4447
+ minimized_to_tabs: number;
4448
+ pins_dropped: number;
4449
+ tabs: number;
4450
+ windows: number;
4451
+ zoom_desktops_merged: number;
4452
+ };
4353
4453
  export type ModelCatalogCostPayload = {
4354
4454
  cache_read_per_million?: number | null;
4355
4455
  cache_write_per_million?: number | null;
@@ -4422,12 +4522,6 @@ export type NodeCancellation = {
4422
4522
  export type NodeUsage = {
4423
4523
  tokens: number;
4424
4524
  };
4425
- export type NormalizedRect = {
4426
- height: number;
4427
- width: number;
4428
- x: number;
4429
- y: number;
4430
- };
4431
4525
  export type OTelSignalStatusPayload = {
4432
4526
  enabled: boolean;
4433
4527
  failed_exports: number;
@@ -5192,6 +5286,16 @@ export type RemoveDiscoveredWorktreeRequest = {
5192
5286
  force?: boolean;
5193
5287
  path: string;
5194
5288
  };
5289
+ export type RemoveWorktreesRequest = {
5290
+ delete_branch?: boolean;
5291
+ dry_run?: boolean;
5292
+ force?: boolean;
5293
+ targets: Array<WorktreeRemovalTarget>;
5294
+ };
5295
+ export type RemoveWorktreesResponse = {
5296
+ dry_run: boolean;
5297
+ results: Array<WorktreeRemovalResult>;
5298
+ };
5195
5299
  export type RenameProfilePlan = {
5196
5300
  dormant_placements: Array<ProfilePlacement>;
5197
5301
  machine_folders: Array<string>;
@@ -5661,11 +5765,34 @@ export type RuntimeLimits = {
5661
5765
  max_runtime_seconds: number;
5662
5766
  summary_max_bytes: number;
5663
5767
  };
5768
+ export type RuntimeMCPImportRequest = {
5769
+ name?: string;
5770
+ profile?: string;
5771
+ scope?: "user" | "profile" | "workspace" | "agent";
5772
+ workspace_id?: string;
5773
+ };
5774
+ export type RuntimeMCPImportResponse = {
5775
+ mcp_server: SettingsMCPServerItemPayload;
5776
+ notes: Array<string>;
5777
+ partial: boolean;
5778
+ source: Server;
5779
+ warnings?: Array<string>;
5780
+ };
5781
+ export type RuntimeMCPRow = {
5782
+ name: string;
5783
+ scope: string;
5784
+ state: string;
5785
+ transport: string;
5786
+ };
5664
5787
  export type RuntimeMatch = {
5665
5788
  complexity?: string;
5666
5789
  id?: string;
5667
5790
  type?: string;
5668
5791
  };
5792
+ export type RuntimeMode = {
5793
+ can_disable: boolean;
5794
+ mode: string;
5795
+ };
5669
5796
  export type RuntimePolicy = {
5670
5797
  mode: "default" | "evidence";
5671
5798
  };
@@ -5807,6 +5934,24 @@ export type SendPromptResultPayload = {
5807
5934
  export type SendPromptResultResponse = {
5808
5935
  prompt: SendPromptResultPayload;
5809
5936
  };
5937
+ export type Server = {
5938
+ also_in_compozy: boolean;
5939
+ approval: string;
5940
+ auth: string;
5941
+ copy_blocked_reason: string;
5942
+ copyable: boolean;
5943
+ definition_digest: string;
5944
+ enabled_in_runtime: boolean;
5945
+ env_keys: Array<string>;
5946
+ header_keys: Array<string>;
5947
+ name: string;
5948
+ runtime: string;
5949
+ scope: string;
5950
+ source_label: string;
5951
+ source_path: string;
5952
+ target: string;
5953
+ transport: string;
5954
+ };
5810
5955
  export type SessionActivityHealthPayload = {
5811
5956
  current_tool?: string;
5812
5957
  deadline_at?: string | null;
@@ -6103,6 +6248,7 @@ export type SessionDeriveCutPayload = {
6103
6248
  export type SessionDeriveErrorPayload = {
6104
6249
  blockers?: Array<WorkspaceArchiveBlocker>;
6105
6250
  child_session_id?: string;
6251
+ client_message_id?: string;
6106
6252
  code?: string;
6107
6253
  config_path?: string;
6108
6254
  current_turn_id?: string;
@@ -6111,6 +6257,8 @@ export type SessionDeriveErrorPayload = {
6111
6257
  };
6112
6258
  diagnostic?: DiagnosticItem | null;
6113
6259
  error: string;
6260
+ provider_error?: string;
6261
+ retryable?: boolean;
6114
6262
  unknown_keys?: Array<string>;
6115
6263
  };
6116
6264
  export type SessionDerivePreviewResponse = {
@@ -6263,6 +6411,80 @@ export type SessionHealthPayload = {
6263
6411
  export type SessionHealthResponse = {
6264
6412
  health: SessionHealthPayload;
6265
6413
  };
6414
+ export type SessionHistoryCleanupChoices = {
6415
+ children: number;
6416
+ everything: number;
6417
+ subagents: number;
6418
+ };
6419
+ export type SessionHistoryCleanupCounts = {
6420
+ children: number;
6421
+ sessions: number;
6422
+ subagents: number;
6423
+ total: number;
6424
+ };
6425
+ export type SessionHistoryCleanupFailure = {
6426
+ code: string;
6427
+ message: string;
6428
+ session_id: string;
6429
+ title: string;
6430
+ workspace_id: string;
6431
+ };
6432
+ export type SessionHistoryCleanupPlan = {
6433
+ archived_before?: string | null;
6434
+ choices: SessionHistoryCleanupChoices;
6435
+ counted_at: string;
6436
+ counts: SessionHistoryCleanupCounts;
6437
+ kept_live: number;
6438
+ threads: number;
6439
+ workspaces: Array<SessionHistoryCleanupWorkspace>;
6440
+ };
6441
+ export type SessionHistoryCleanupPreviewResponse = {
6442
+ plan: SessionHistoryCleanupPlan;
6443
+ };
6444
+ export type SessionHistoryCleanupRequest = {
6445
+ all_workspaces?: boolean;
6446
+ archived_before?: string | null;
6447
+ counted_at?: string | null;
6448
+ delete: SessionHistoryCleanupSelection;
6449
+ dry_run?: boolean;
6450
+ older_than_days?: number | null;
6451
+ session_ids?: Array<string>;
6452
+ workspace_id?: string;
6453
+ };
6454
+ export type SessionHistoryCleanupRun = {
6455
+ all_workspaces?: boolean;
6456
+ archived_before?: string | null;
6457
+ counted_at: string;
6458
+ delete: SessionHistoryCleanupSelection;
6459
+ deleted: number;
6460
+ done: number;
6461
+ failed_threads: number;
6462
+ failures: Array<SessionHistoryCleanupFailure>;
6463
+ finished_at?: string | null;
6464
+ id: string;
6465
+ profile_id: string;
6466
+ skipped: number;
6467
+ started_at: string;
6468
+ state: string;
6469
+ total: number;
6470
+ workspace_id?: string;
6471
+ };
6472
+ export type SessionHistoryCleanupRunResponse = {
6473
+ run: SessionHistoryCleanupRun | null;
6474
+ };
6475
+ export type SessionHistoryCleanupSelection = {
6476
+ children: boolean;
6477
+ everything: boolean;
6478
+ subagents: boolean;
6479
+ };
6480
+ export type SessionHistoryCleanupStartResponse = {
6481
+ plan: SessionHistoryCleanupPlan;
6482
+ run: SessionHistoryCleanupRun;
6483
+ };
6484
+ export type SessionHistoryCleanupWorkspace = {
6485
+ total: number;
6486
+ workspace_id: string;
6487
+ };
6266
6488
  export type SessionHistoryResponse = {
6267
6489
  history: Array<TurnHistoryPayload>;
6268
6490
  };
@@ -6366,6 +6588,17 @@ export type SessionLinkedWorkSummary = {
6366
6588
  pull_requests: number;
6367
6589
  total: number;
6368
6590
  };
6591
+ export type SessionMCP = {
6592
+ attention: number;
6593
+ compozy_servers: Array<MCPServerRow>;
6594
+ last_reload?: MCPReloadRecord | null;
6595
+ pending_reload: boolean;
6596
+ runtime: string;
6597
+ runtime_display_name: string;
6598
+ runtime_servers: SessionRuntimeMCP;
6599
+ session_id: string;
6600
+ usable: number;
6601
+ };
6369
6602
  export type SessionMonitorPayload = {
6370
6603
  branch?: string;
6371
6604
  created_at: string;
@@ -6437,6 +6670,7 @@ export type SessionPayload = {
6437
6670
  later?: SessionLaterPayload | null;
6438
6671
  lineage?: SessionLineagePayload | null;
6439
6672
  linked_work?: SessionLinkedWorkSummary | null;
6673
+ mcp_summary?: MCPSummary | null;
6440
6674
  monitor_summary?: SessionMonitorSummaryPayload | null;
6441
6675
  name?: string;
6442
6676
  parent_title?: string;
@@ -6463,6 +6697,7 @@ export type SessionPayload = {
6463
6697
  subagent_summary?: SubagentSummaryPayload | null;
6464
6698
  supervision: SupervisionState | null;
6465
6699
  transcript_epoch?: number;
6700
+ tree_parent_session_id?: string;
6466
6701
  type?: "user" | "system" | "coordinator" | "spawned";
6467
6702
  updated_at: string;
6468
6703
  verified?: boolean | null;
@@ -6569,6 +6804,7 @@ export type SessionPullRequestChecksPayload = {
6569
6804
  export type SessionPullRequestErrorPayload = {
6570
6805
  blockers?: Array<WorkspaceArchiveBlocker>;
6571
6806
  cause?: string;
6807
+ client_message_id?: string;
6572
6808
  code?: string;
6573
6809
  config_path?: string;
6574
6810
  current_turn_id?: string;
@@ -6578,6 +6814,8 @@ export type SessionPullRequestErrorPayload = {
6578
6814
  diagnostic?: DiagnosticItem | null;
6579
6815
  error: string;
6580
6816
  message: string;
6817
+ provider_error?: string;
6818
+ retryable?: boolean;
6581
6819
  unknown_keys?: Array<string>;
6582
6820
  };
6583
6821
  export type SessionPullRequestLookupPayload = {
@@ -6640,6 +6878,10 @@ export type SessionRepairResponse = {
6640
6878
  export type SessionResponse = {
6641
6879
  session: SessionPayload;
6642
6880
  };
6881
+ export type SessionRuntimeMCP = {
6882
+ runtime_mcp: string;
6883
+ servers: Array<RuntimeMCPRow>;
6884
+ };
6643
6885
  export type SessionRuntimePayload = {
6644
6886
  acp_caps?: ACPCapsPayload | null;
6645
6887
  acp_session_id?: string;
@@ -7029,7 +7271,7 @@ export type SettingsHookDeclarationPayload = {
7029
7271
  env?: {
7030
7272
  [key: string]: string;
7031
7273
  };
7032
- event: "agent.instance.created" | "agent.instance.paused" | "agent.instance.resumed" | "agent.instance.archived" | "agent.instance.adopted" | "subagent.settled" | "session.pre_create" | "session.post_create" | "session.pre_resume" | "session.post_resume" | "session.pre_stop" | "session.post_stop" | "session.message_persisted" | "session.runtime_recovery.started" | "session.runtime_recovery.succeeded" | "session.runtime_recovery.exhausted" | "input.pre_submit" | "prompt.post_assemble" | "event.pre_record" | "event.post_record" | "automation.job.pre_fire" | "automation.job.post_fire" | "automation.trigger.pre_fire" | "automation.trigger.post_fire" | "automation.run.completed" | "automation.run.failed" | "agent.pre_start" | "agent.spawned" | "agent.crashed" | "agent.stopped" | "agent.soul.snapshot.resolved" | "agent.soul.mutation.after" | "agent.heartbeat.policy.resolved" | "agent.heartbeat.wake.before" | "agent.heartbeat.wake.after" | "session.health.update.after" | "turn.start" | "turn.end" | "message.start" | "message.delta" | "message.end" | "tool.pre_call" | "tool.post_call" | "tool.post_error" | "permission.request" | "permission.resolved" | "permission.denied" | "context.pre_compact" | "context.post_compact" | "coordinator.pre_spawn" | "coordinator.spawned" | "coordinator.decision" | "coordinator.stopped" | "coordinator.failed" | "task.blocked" | "task.unblocked" | "task.needs_attention" | "task.recovered" | "task.status_changed" | "task.run.enqueued" | "task.run.pre_claim" | "task.run.post_claim" | "task.run.lease_extended" | "task.run.lease_expired" | "task.run.lease_recovered" | "task.run.released" | "task.run.completed" | "task.run.failed" | "loop.started" | "loop.generation.pre" | "loop.generation.post" | "loop.gate.pre" | "loop.gate.post" | "loop.node.terminal" | "loop.terminal" | "spawn.pre_create" | "spawn.created" | "spawn.parent_stopped" | "spawn.ttl_expired" | "spawn.reaped" | "session.attention.changed" | "window_manager.layout.applied" | "window_manager.desktop.created" | "window_manager.desktop.deleted" | "window_manager.window.moved" | "window_manager.window.opened" | "window_manager.window.closed" | "window_manager.stack.grouped" | "window_manager.stack.ungrouped" | "window_manager.stack.activated" | "worktree.pre_create" | "worktree.pre_remove" | "worktree.created" | "worktree.adopted" | "worktree.removed" | "terminal.opened" | "terminal.closed" | "terminal.command_started" | "terminal.command_finished" | "terminal.input_requested" | "terminal.input_provided" | "terminal.recording_started" | "terminal.recording_stopped" | "terminal.subscriber_evicted" | "terminal.limit_rejected" | "agent.instance.proposal.picked";
7274
+ event: "agent.instance.created" | "agent.instance.paused" | "agent.instance.resumed" | "agent.instance.archived" | "agent.instance.adopted" | "subagent.settled" | "session.pre_create" | "session.post_create" | "session.pre_resume" | "session.post_resume" | "session.pre_stop" | "session.post_stop" | "session.message_persisted" | "session.runtime_recovery.started" | "session.runtime_recovery.succeeded" | "session.runtime_recovery.exhausted" | "input.pre_submit" | "prompt.post_assemble" | "event.pre_record" | "event.post_record" | "automation.job.pre_fire" | "automation.job.post_fire" | "automation.trigger.pre_fire" | "automation.trigger.post_fire" | "automation.run.completed" | "automation.run.failed" | "agent.pre_start" | "agent.spawned" | "agent.crashed" | "agent.stopped" | "agent.soul.snapshot.resolved" | "agent.soul.mutation.after" | "agent.heartbeat.policy.resolved" | "agent.heartbeat.wake.before" | "agent.heartbeat.wake.after" | "session.health.update.after" | "turn.start" | "turn.end" | "message.start" | "message.delta" | "message.end" | "tool.pre_call" | "tool.post_call" | "tool.post_error" | "permission.request" | "permission.resolved" | "permission.denied" | "context.pre_compact" | "context.post_compact" | "coordinator.pre_spawn" | "coordinator.spawned" | "coordinator.decision" | "coordinator.stopped" | "coordinator.failed" | "task.blocked" | "task.unblocked" | "task.needs_attention" | "task.recovered" | "task.status_changed" | "task.run.enqueued" | "task.run.pre_claim" | "task.run.post_claim" | "task.run.lease_extended" | "task.run.lease_expired" | "task.run.lease_recovered" | "task.run.released" | "task.run.completed" | "task.run.failed" | "loop.started" | "loop.generation.pre" | "loop.generation.post" | "loop.gate.pre" | "loop.gate.post" | "loop.node.terminal" | "loop.terminal" | "spawn.pre_create" | "spawn.created" | "spawn.parent_stopped" | "spawn.ttl_expired" | "spawn.reaped" | "session.attention.changed" | "window_manager.tab.split" | "window_manager.tab.unsplit" | "window_manager.tab.activated" | "window_manager.layout.applied" | "window_manager.desktop.created" | "window_manager.desktop.deleted" | "window_manager.window.moved" | "window_manager.window.opened" | "window_manager.window.closed" | "window_manager.stack.grouped" | "window_manager.stack.ungrouped" | "window_manager.stack.activated" | "worktree.pre_create" | "worktree.pre_remove" | "worktree.created" | "worktree.adopted" | "worktree.removed" | "terminal.opened" | "terminal.closed" | "terminal.command_started" | "terminal.command_finished" | "terminal.input_requested" | "terminal.input_provided" | "terminal.recording_started" | "terminal.recording_stopped" | "terminal.subscriber_evicted" | "terminal.limit_rejected" | "agent.instance.proposal.picked";
7033
7275
  executor_kind?: "native" | "subprocess" | "wasm";
7034
7276
  matcher: HookMatcher;
7035
7277
  metadata?: {
@@ -7106,9 +7348,31 @@ export type SettingsLogTailCapabilityPayload = {
7106
7348
  stream_url?: string;
7107
7349
  transport?: "sse";
7108
7350
  };
7351
+ export type SettingsMCPApprovalPayload = {
7352
+ approved_at?: string;
7353
+ profile: string;
7354
+ server_name: string;
7355
+ state: string;
7356
+ workspace_id: string;
7357
+ };
7358
+ export type SettingsMCPApprovalRequest = {
7359
+ definition_digest: string;
7360
+ profile?: string;
7361
+ workspace_id: string;
7362
+ };
7363
+ export type SettingsMCPApprovalResponse = {
7364
+ approval: SettingsMCPApprovalPayload;
7365
+ };
7366
+ export type SettingsMCPApprovalStatePayload = {
7367
+ definition_digest: string;
7368
+ reason?: string;
7369
+ required: boolean;
7370
+ state: string;
7371
+ };
7109
7372
  export type SettingsMCPAuthBeginRequest = {
7110
7373
  approve_scope_escalation?: boolean;
7111
7374
  approved_scopes?: Array<string>;
7375
+ definition_digest?: string;
7112
7376
  mode: "automatic" | "manual";
7113
7377
  };
7114
7378
  export type SettingsMCPAuthBeginResponse = {
@@ -7174,9 +7438,11 @@ export type SettingsMCPSecretValuesPayload = {
7174
7438
  };
7175
7439
  };
7176
7440
  export type SettingsMCPServerItemPayload = {
7441
+ approval: SettingsMCPApprovalStatePayload;
7177
7442
  args?: Array<string>;
7178
7443
  auth?: SettingsMCPAuthConfigViewPayload | null;
7179
7444
  auth_status?: SettingsMCPAuthStatusPayload | null;
7445
+ callable_in_sessions: boolean;
7180
7446
  catalog_entry?: string;
7181
7447
  catalog_version?: string;
7182
7448
  command?: string;
@@ -7396,6 +7662,7 @@ export type SettingsProviderSettingsPayload = {
7396
7662
  harness?: string;
7397
7663
  home_policy?: string;
7398
7664
  models?: SettingsProviderModelsPayload | null;
7665
+ runtime_mcp?: string;
7399
7666
  runtime_provider?: string;
7400
7667
  session_env?: {
7401
7668
  [key: string]: SessionEnvBindingPayload;
@@ -7438,6 +7705,7 @@ export type SettingsProviderWritePayload = {
7438
7705
  harness?: string;
7439
7706
  home_policy?: string;
7440
7707
  models?: SettingsProviderModelsPayload | null;
7708
+ runtime_mcp?: string;
7441
7709
  runtime_provider?: string;
7442
7710
  session_env?: {
7443
7711
  [key: string]: SessionEnvBindingPayload;
@@ -7731,6 +7999,11 @@ export type SettingsUpdateRuntimePayload = {
7731
7999
  restored_version: string;
7732
8000
  status: "up-to-date" | "available" | "accepted" | "applying" | "staged" | "updated" | "blocked" | "unsupported" | "failed" | "canceled";
7733
8001
  };
8002
+ /**
8003
+ * Deprecated: accepted and ignored; remove before v0.8.0.
8004
+ *
8005
+ * @deprecated
8006
+ */
7734
8007
  export type SettingsWindowManagerBindingPayload = {
7735
8008
  bottom_center: "none" | "reserved" | "zoom";
7736
8009
  top_center: "none" | "reserved" | "zoom";
@@ -7742,9 +8015,19 @@ export type SettingsWindowManagerCommandPayload = {
7742
8015
  title: string;
7743
8016
  };
7744
8017
  export type SettingsWindowManagerConfigPayload = {
8018
+ /**
8019
+ * Deprecated: accepted and ignored; remove before v0.8.0.
8020
+ *
8021
+ * @deprecated
8022
+ */
7745
8023
  bindings: SettingsWindowManagerBindingPayload;
7746
8024
  closed_entry_limit: number;
7747
8025
  desktop_transition: "slide" | "crossfade" | "instant";
8026
+ /**
8027
+ * Deprecated: accepted and ignored; remove before v0.8.0.
8028
+ *
8029
+ * @deprecated
8030
+ */
7748
8031
  drag_away_policy: "window" | "group";
7749
8032
  focus_follows_pointer: boolean;
7750
8033
  focus_policy: "click_directional" | "directional";
@@ -7753,15 +8036,33 @@ export type SettingsWindowManagerConfigPayload = {
7753
8036
  global_shortcuts: {
7754
8037
  [key: string]: string;
7755
8038
  };
8039
+ /**
8040
+ * Deprecated: accepted and ignored; remove before v0.8.0.
8041
+ *
8042
+ * @deprecated
8043
+ */
7756
8044
  group_move_modifier: "alt" | "control" | "meta" | "shift" | "none";
7757
8045
  history_limit: number;
7758
8046
  nav_stack_limit: number;
8047
+ /**
8048
+ * Deprecated value "floating": translated to "tab"; removed in v0.8.0.
8049
+ */
7759
8050
  new_window_policy: "floating" | "beside_focus" | "tab";
8051
+ /**
8052
+ * Deprecated: accepted and ignored; remove before v0.8.0.
8053
+ *
8054
+ * @deprecated
8055
+ */
7760
8056
  raise_on_focus: boolean;
7761
8057
  shortcuts: {
7762
8058
  [key: string]: string | Array<string>;
7763
8059
  };
7764
8060
  small_viewport_policy: "stack" | "reject";
8061
+ /**
8062
+ * Deprecated: accepted and ignored; remove before v0.8.0.
8063
+ *
8064
+ * @deprecated
8065
+ */
7765
8066
  snap: SettingsWindowManagerSnapPayload;
7766
8067
  swap_modifier: "alt" | "control" | "meta" | "shift" | "none";
7767
8068
  };
@@ -7830,6 +8131,11 @@ export type SettingsWindowManagerResponse = {
7830
8131
  section: "general" | "persona" | "roles" | "skills" | "automation" | "window-manager" | "cmd-palette" | "attention" | "shell" | "provider-usage" | "observability" | "hooks-extensions" | "marketplace";
7831
8132
  workspace_id?: string;
7832
8133
  };
8134
+ /**
8135
+ * Deprecated: accepted and ignored; remove before v0.8.0.
8136
+ *
8137
+ * @deprecated
8138
+ */
7833
8139
  export type SettingsWindowManagerSnapPayload = {
7834
8140
  corner_reach: number;
7835
8141
  edge_band: number;
@@ -7978,12 +8284,28 @@ export type SkillVerificationWarningPayload = {
7978
8284
  export type SkillsResponse = {
7979
8285
  skills: Array<SkillPayload>;
7980
8286
  };
8287
+ /**
8288
+ * Deprecated: accepted and ignored; remove before v0.8.0.
8289
+ *
8290
+ * @deprecated
8291
+ */
7981
8292
  export type SnapConfig = {
7982
8293
  corner_reach: number;
7983
8294
  edge_band: number;
7984
8295
  exit_slack: number;
7985
8296
  repeat_ratios: Array<number>;
7986
8297
  };
8298
+ export type Snapshot = {
8299
+ config_files: Array<string>;
8300
+ display_name: string;
8301
+ installed: boolean;
8302
+ notes?: Array<string>;
8303
+ read_error?: string;
8304
+ read_state: string;
8305
+ runtime: string;
8306
+ runtime_mcp: RuntimeMode;
8307
+ servers: Array<Server>;
8308
+ };
7987
8309
  export type SourceOutcome = {
7988
8310
  duration_ms: number;
7989
8311
  error?: Error | null;
@@ -8687,6 +9009,7 @@ export type TaskPayload = {
8687
9009
  };
8688
9010
  export type TaskQueryErrorPayload = {
8689
9011
  blockers?: Array<WorkspaceArchiveBlocker>;
9012
+ client_message_id?: string;
8690
9013
  code?: string;
8691
9014
  config_path?: string;
8692
9015
  current_turn_id?: string;
@@ -8696,6 +9019,8 @@ export type TaskQueryErrorPayload = {
8696
9019
  diagnostic?: DiagnosticItem | null;
8697
9020
  error: string;
8698
9021
  field: string;
9022
+ provider_error?: string;
9023
+ retryable?: boolean;
8699
9024
  unknown_keys?: Array<string>;
8700
9025
  };
8701
9026
  export type TaskQueueDepthPayload = {
@@ -9429,6 +9754,7 @@ export type ToolDescriptorPayload = {
9429
9754
  visibility: "internal" | "operator" | "session" | "model";
9430
9755
  };
9431
9756
  export type ToolErrorPayload = {
9757
+ client_message_id?: string;
9432
9758
  code: "agent_instance_not_found" | "agent_instance_starting" | "approval_rejected" | "attention_requires_action" | "compaction_unsupported" | "generation_fenced" | "input_request_already_answered" | "input_request_limit_reached" | "input_request_not_found" | "input_request_requires_hidden_input" | "input_request_superseded" | "invalid_cwd" | "journal_unavailable" | "message_hop_limit" | "message_rate_limited" | "model_not_found" | "profile_archived" | "profile_selection_conflict" | "profile_session_conflict" | "profile_unavailable" | "provider_disabled" | "reasoning_effort_unsupported" | "recording_already_started" | "recording_not_active" | "recording_unavailable" | "session_archive_stop_failed" | "session_busy" | "session_in_later" | "session_later_stop_failed" | "session_worktree_conflict" | "slow_consumer" | "subagent_later_follows_parent" | "subscriber_limit_reached" | "terminal_exited" | "terminal_expired" | "terminal_interactive_unavailable" | "terminal_limit_reached" | "terminal_not_found" | "terminal_not_interactive" | "terminal_requires_workspace" | "ticket_expired" | "ticket_invalid" | "timeout_out_of_range" | "tool_approval_required" | "tool_backend_failed" | "tool_canceled" | "tool_conflict" | "tool_denied" | "tool_invalid_input" | "tool_not_found" | "tool_result_persistence_failed" | "tool_result_too_large" | "tool_timed_out" | "tool_unavailable" | "workspace_archived" | "workspace_busy" | "workspace_root_missing" | "worktree_missing" | "worktree_not_found" | "worktree_not_ready" | "worktree_operation_in_progress" | "worktree_session_active";
9433
9759
  details?: {
9434
9760
  [key: string]: unknown;
@@ -9436,7 +9762,9 @@ export type ToolErrorPayload = {
9436
9762
  layer?: string;
9437
9763
  message: string;
9438
9764
  partial_result?: ToolResult | null;
9765
+ provider_error?: string;
9439
9766
  reason_codes?: Array<"approval_canceled" | "approval_rejected" | "approval_required" | "approval_timed_out" | "approval_token_expired" | "approval_token_mismatch" | "approval_token_missing" | "approval_token_replayed" | "approval_unreachable" | "backend_not_executable" | "backend_unhealthy" | "call_canceled" | "call_timed_out" | "config_path_not_found" | "conflicted_id" | "conflicted_sanitized_name" | "dependency_missing" | "extension_capability_missing" | "extension_inactive" | "extension_runtime_mismatch" | "generation_fenced" | "handler_missing" | "hook_denied" | "id_empty" | "id_empty_segment" | "id_invalid_format" | "id_too_long" | "input_request_already_answered" | "input_request_limit_reached" | "input_request_not_found" | "input_request_requires_hidden_input" | "input_request_superseded" | "invalid_cwd" | "journal_unavailable" | "loop_source_immutable" | "loop_version_conflict" | "mcp_auth_expired" | "mcp_auth_invalid" | "mcp_auth_refresh_failed" | "mcp_auth_required" | "mcp_auth_unconfigured" | "mcp_unreachable" | "policy_denied" | "profile_archived" | "profile_selection_conflict" | "profile_session_conflict" | "profile_unavailable" | "recording_already_started" | "recording_not_active" | "recording_unavailable" | "reserved_conflict" | "reserved_namespace" | "result_budget_exceeded" | "result_persistence_failed" | "runtime_descriptor_mismatch" | "runtime_descriptor_missing" | "schema_invalid" | "secret_metadata" | "session_denied" | "skill_definition_invalid" | "skill_resource_not_found" | "slow_consumer" | "source_disabled" | "spawn_budget_exhausted" | "subscriber_limit_reached" | "terminal_exited" | "terminal_expired" | "terminal_interactive_unavailable" | "terminal_limit_reached" | "terminal_not_found" | "terminal_not_interactive" | "terminal_requires_workspace" | "ticket_expired" | "ticket_invalid" | "timeout_out_of_range" | "tool_artifact_corrupt" | "tool_artifact_not_found" | "tool_unknown" | "toolset_cycle" | "toolset_unknown" | "visibility_denied" | "worktree_missing" | "worktree_not_found" | "worktree_not_ready">;
9767
+ retryable?: boolean;
9440
9768
  tool_id?: string;
9441
9769
  };
9442
9770
  export type ToolErrorResponse = {
@@ -9907,22 +10235,20 @@ export type WindowManagerClientContextInput = {
9907
10235
  scope_global: boolean;
9908
10236
  workspace_trusted: boolean;
9909
10237
  };
9910
- export type WindowManagerFloatingStack = {
9911
- active_id?: string | null;
9912
- id: string;
9913
- minimized: boolean;
9914
- rect: NormalizedRect;
9915
- window_ids: Array<string>;
9916
- };
9917
10238
  export type WindowManagerLayoutNode = {
9918
- active_id?: string | null;
9919
10239
  axis?: "horizontal" | "vertical";
9920
10240
  children?: Array<WindowManagerLayoutNode>;
9921
10241
  id: string;
9922
- kind: "leaf" | "split" | "stack";
10242
+ kind: "leaf" | "split";
9923
10243
  weights?: Array<number>;
9924
10244
  window_id?: string | null;
9925
- window_ids?: Array<string>;
10245
+ };
10246
+ export type WindowManagerMigrationRequest = {
10247
+ action: "ack" | "retry";
10248
+ /**
10249
+ * Replace the layout on retry when it changed after failure.
10250
+ */
10251
+ replace?: boolean;
9926
10252
  };
9927
10253
  export type WindowManagerPaletteContext = {
9928
10254
  desktop_window_count: number;
@@ -9930,8 +10256,19 @@ export type WindowManagerPaletteContext = {
9930
10256
  focused_session_state?: string;
9931
10257
  scope_global: boolean;
9932
10258
  shell_desktop: boolean;
10259
+ /**
10260
+ * Deprecated: retained for compatibility; removed in v0.8.0. See the window-manager deprecation matrix for its replacement.
10261
+ *
10262
+ * @deprecated
10263
+ */
9933
10264
  window_floating: boolean;
9934
10265
  window_focused: boolean;
10266
+ window_in_split: boolean;
10267
+ /**
10268
+ * Deprecated: retained for compatibility; removed in v0.8.0. See the window-manager deprecation matrix for its replacement.
10269
+ *
10270
+ * @deprecated
10271
+ */
9935
10272
  window_stacked: boolean;
9936
10273
  workspace_trusted: boolean;
9937
10274
  };
@@ -9939,33 +10276,18 @@ export type WindowManagerRebaseGuard = {
9939
10276
  boundary_index?: number | null;
9940
10277
  source_node_id?: string | null;
9941
10278
  split_id?: string | null;
10279
+ tab_id?: string | null;
9942
10280
  target_node_id?: string | null;
9943
10281
  window_id?: string | null;
9944
10282
  };
9945
- export type WindowManagerReturnAnchor = {
9946
- child_index?: number | null;
9947
- desktop_id: string;
9948
- group_id?: string | null;
9949
- neighbor_ids?: Array<string>;
9950
- parent_split_id?: string | null;
9951
- source_group?: ContractWindowManagerLayoutGroup | null;
9952
- source_revision: number;
9953
- weight?: number | null;
9954
- zoomed?: boolean;
9955
- };
9956
10283
  export type WindowManagerWindow = {
9957
10284
  app: string;
9958
10285
  desktop_id: string;
9959
- floating_rect: NormalizedRect;
9960
10286
  id: string;
9961
10287
  instance_key?: string | null;
9962
- minimized: boolean;
9963
10288
  nav_stack: Array<RouteIntent>;
9964
- pinned: boolean;
9965
- placement: "tiled" | "stacked" | "floating";
9966
- return_anchor?: WindowManagerReturnAnchor | null;
9967
10289
  route: RouteIntent;
9968
- zoomed: boolean;
10290
+ tab_id: string;
9969
10291
  };
9970
10292
  export type WorkCandidate = {
9971
10293
  branch: string;
@@ -10013,23 +10335,51 @@ export type WorkspaceAttentionSummaryPayload = {
10013
10335
  workspace_id: string;
10014
10336
  };
10015
10337
  export type WorkspaceConfig = {
10338
+ /**
10339
+ * Deprecated: accepted and ignored; remove before v0.8.0.
10340
+ *
10341
+ * @deprecated
10342
+ */
10016
10343
  bindings?: BindingsConfig | null;
10017
10344
  closed_entry_limit?: number | null;
10018
10345
  desktop_transition?: string | null;
10346
+ /**
10347
+ * Deprecated: accepted and ignored; remove before v0.8.0.
10348
+ *
10349
+ * @deprecated
10350
+ */
10019
10351
  drag_away_policy?: string | null;
10020
10352
  focus_follows_pointer?: boolean | null;
10021
10353
  focus_policy?: string | null;
10022
10354
  focus_wrap?: boolean | null;
10023
10355
  gaps?: GapsConfig | null;
10356
+ /**
10357
+ * Deprecated: accepted and ignored; remove before v0.8.0.
10358
+ *
10359
+ * @deprecated
10360
+ */
10024
10361
  group_move_modifier?: string | null;
10025
10362
  history_limit?: number | null;
10026
10363
  nav_stack_limit?: number | null;
10364
+ /**
10365
+ * Deprecated value "floating": translated to "tab"; removed in v0.8.0.
10366
+ */
10027
10367
  new_window_policy?: string | null;
10368
+ /**
10369
+ * Deprecated: accepted and ignored; remove before v0.8.0.
10370
+ *
10371
+ * @deprecated
10372
+ */
10028
10373
  raise_on_focus?: boolean | null;
10029
10374
  shortcuts?: {
10030
10375
  [key: string]: string | Array<string>;
10031
10376
  };
10032
10377
  small_viewport_policy?: string | null;
10378
+ /**
10379
+ * Deprecated: accepted and ignored; remove before v0.8.0.
10380
+ *
10381
+ * @deprecated
10382
+ */
10033
10383
  snap?: SnapConfig | null;
10034
10384
  swap_modifier?: string | null;
10035
10385
  };
@@ -10221,6 +10571,15 @@ export type WorktreeRemovalRefusalPayload = {
10221
10571
  error?: string;
10222
10572
  risk: WorktreeRemovalRiskPayload;
10223
10573
  };
10574
+ export type WorktreeRemovalResult = {
10575
+ branch?: WorktreeBranchOutcomePayload | null;
10576
+ code?: string;
10577
+ error?: string;
10578
+ risk?: WorktreeRemovalRiskPayload | null;
10579
+ state: string;
10580
+ target: WorktreeRemovalTarget;
10581
+ worktree_id?: string;
10582
+ };
10224
10583
  export type WorktreeRemovalRiskPayload = {
10225
10584
  changed_files: number;
10226
10585
  deletions: number;
@@ -10229,6 +10588,11 @@ export type WorktreeRemovalRiskPayload = {
10229
10588
  leftover_files: number;
10230
10589
  unpushed_commits: number;
10231
10590
  };
10591
+ export type WorktreeRemovalTarget = {
10592
+ expect_stale?: boolean;
10593
+ path?: string;
10594
+ ref?: string;
10595
+ };
10232
10596
  export type WorktreeRepoPayload = {
10233
10597
  diagnostic?: string;
10234
10598
  git_available: boolean;
@@ -10347,6 +10711,10 @@ export type InstallExtensionRequestWritable = {
10347
10711
  */
10348
10712
  profile?: string;
10349
10713
  ref: string;
10714
+ /**
10715
+ * Replace the installed extension of the same name. Applies to local_path installs only, since published sources replace implicitly. The previous version stays installed only when the replacement fails before the reinstall transaction completes; a failure after it returns, such as enable failing, does not restore it. A marketplace-owned name is refused with extension_name_conflict. Replacing a package attached outside the caller's workspace requires operator authority.
10716
+ */
10717
+ replace?: boolean;
10350
10718
  /**
10351
10719
  * Overrides manifest server defaults. Mixed defaults require an explicit scope. A workspace default requires a workspace-bound caller or workspace_id.
10352
10720
  */
@@ -15112,6 +15480,10 @@ export type TriggerAutomationJobData = {
15112
15480
  url: "/api/automation/jobs/{id}/trigger";
15113
15481
  };
15114
15482
  export type TriggerAutomationJobErrors = {
15483
+ /**
15484
+ * Invalid wait or completion budget
15485
+ */
15486
+ 400: ErrorPayload;
15115
15487
  /**
15116
15488
  * Automation job not found
15117
15489
  */
@@ -17666,7 +18038,7 @@ export type GetHookCatalogData = {
17666
18038
  /**
17667
18039
  * Hook event name
17668
18040
  */
17669
- event?: "agent.instance.created" | "agent.instance.paused" | "agent.instance.resumed" | "agent.instance.archived" | "agent.instance.adopted" | "subagent.settled" | "session.pre_create" | "session.post_create" | "session.pre_resume" | "session.post_resume" | "session.pre_stop" | "session.post_stop" | "session.message_persisted" | "session.runtime_recovery.started" | "session.runtime_recovery.succeeded" | "session.runtime_recovery.exhausted" | "input.pre_submit" | "prompt.post_assemble" | "event.pre_record" | "event.post_record" | "automation.job.pre_fire" | "automation.job.post_fire" | "automation.trigger.pre_fire" | "automation.trigger.post_fire" | "automation.run.completed" | "automation.run.failed" | "agent.pre_start" | "agent.spawned" | "agent.crashed" | "agent.stopped" | "agent.soul.snapshot.resolved" | "agent.soul.mutation.after" | "agent.heartbeat.policy.resolved" | "agent.heartbeat.wake.before" | "agent.heartbeat.wake.after" | "session.health.update.after" | "turn.start" | "turn.end" | "message.start" | "message.delta" | "message.end" | "tool.pre_call" | "tool.post_call" | "tool.post_error" | "permission.request" | "permission.resolved" | "permission.denied" | "context.pre_compact" | "context.post_compact" | "coordinator.pre_spawn" | "coordinator.spawned" | "coordinator.decision" | "coordinator.stopped" | "coordinator.failed" | "task.blocked" | "task.unblocked" | "task.needs_attention" | "task.recovered" | "task.status_changed" | "task.run.enqueued" | "task.run.pre_claim" | "task.run.post_claim" | "task.run.lease_extended" | "task.run.lease_expired" | "task.run.lease_recovered" | "task.run.released" | "task.run.completed" | "task.run.failed" | "loop.started" | "loop.generation.pre" | "loop.generation.post" | "loop.gate.pre" | "loop.gate.post" | "loop.node.terminal" | "loop.terminal" | "spawn.pre_create" | "spawn.created" | "spawn.parent_stopped" | "spawn.ttl_expired" | "spawn.reaped" | "session.attention.changed" | "window_manager.layout.applied" | "window_manager.desktop.created" | "window_manager.desktop.deleted" | "window_manager.window.moved" | "window_manager.window.opened" | "window_manager.window.closed" | "window_manager.stack.grouped" | "window_manager.stack.ungrouped" | "window_manager.stack.activated" | "worktree.pre_create" | "worktree.pre_remove" | "worktree.created" | "worktree.adopted" | "worktree.removed" | "terminal.opened" | "terminal.closed" | "terminal.command_started" | "terminal.command_finished" | "terminal.input_requested" | "terminal.input_provided" | "terminal.recording_started" | "terminal.recording_stopped" | "terminal.subscriber_evicted" | "terminal.limit_rejected" | "agent.instance.proposal.picked";
18041
+ event?: "agent.instance.created" | "agent.instance.paused" | "agent.instance.resumed" | "agent.instance.archived" | "agent.instance.adopted" | "subagent.settled" | "session.pre_create" | "session.post_create" | "session.pre_resume" | "session.post_resume" | "session.pre_stop" | "session.post_stop" | "session.message_persisted" | "session.runtime_recovery.started" | "session.runtime_recovery.succeeded" | "session.runtime_recovery.exhausted" | "input.pre_submit" | "prompt.post_assemble" | "event.pre_record" | "event.post_record" | "automation.job.pre_fire" | "automation.job.post_fire" | "automation.trigger.pre_fire" | "automation.trigger.post_fire" | "automation.run.completed" | "automation.run.failed" | "agent.pre_start" | "agent.spawned" | "agent.crashed" | "agent.stopped" | "agent.soul.snapshot.resolved" | "agent.soul.mutation.after" | "agent.heartbeat.policy.resolved" | "agent.heartbeat.wake.before" | "agent.heartbeat.wake.after" | "session.health.update.after" | "turn.start" | "turn.end" | "message.start" | "message.delta" | "message.end" | "tool.pre_call" | "tool.post_call" | "tool.post_error" | "permission.request" | "permission.resolved" | "permission.denied" | "context.pre_compact" | "context.post_compact" | "coordinator.pre_spawn" | "coordinator.spawned" | "coordinator.decision" | "coordinator.stopped" | "coordinator.failed" | "task.blocked" | "task.unblocked" | "task.needs_attention" | "task.recovered" | "task.status_changed" | "task.run.enqueued" | "task.run.pre_claim" | "task.run.post_claim" | "task.run.lease_extended" | "task.run.lease_expired" | "task.run.lease_recovered" | "task.run.released" | "task.run.completed" | "task.run.failed" | "loop.started" | "loop.generation.pre" | "loop.generation.post" | "loop.gate.pre" | "loop.gate.post" | "loop.node.terminal" | "loop.terminal" | "spawn.pre_create" | "spawn.created" | "spawn.parent_stopped" | "spawn.ttl_expired" | "spawn.reaped" | "session.attention.changed" | "window_manager.tab.split" | "window_manager.tab.unsplit" | "window_manager.tab.activated" | "window_manager.layout.applied" | "window_manager.desktop.created" | "window_manager.desktop.deleted" | "window_manager.window.moved" | "window_manager.window.opened" | "window_manager.window.closed" | "window_manager.stack.grouped" | "window_manager.stack.ungrouped" | "window_manager.stack.activated" | "worktree.pre_create" | "worktree.pre_remove" | "worktree.created" | "worktree.adopted" | "worktree.removed" | "terminal.opened" | "terminal.closed" | "terminal.command_started" | "terminal.command_finished" | "terminal.input_requested" | "terminal.input_provided" | "terminal.recording_started" | "terminal.recording_stopped" | "terminal.subscriber_evicted" | "terminal.limit_rejected" | "agent.instance.proposal.picked";
17670
18042
  /**
17671
18043
  * Hook source
17672
18044
  */
@@ -18523,6 +18895,10 @@ export type CompleteMCPAuthCallbackErrors = {
18523
18895
  * Forbidden
18524
18896
  */
18525
18897
  403: ErrorPayload;
18898
+ /**
18899
+ * MCP server waiting for approval or definition changed
18900
+ */
18901
+ 409: ErrorPayload;
18526
18902
  /**
18527
18903
  * MCP OAuth callback runtime is unavailable
18528
18904
  */
@@ -18939,7 +19315,7 @@ export type AcknowledgeAttentionNotificationsErrors = {
18939
19315
  export type AcknowledgeAttentionNotificationsError = AcknowledgeAttentionNotificationsErrors[keyof AcknowledgeAttentionNotificationsErrors];
18940
19316
  export type AcknowledgeAttentionNotificationsResponses = {
18941
19317
  /**
18942
- * Receipts committed atomically; source state unchanged
19318
+ * Receipts committed atomically; bell layout-upgrade notices also acknowledged durably
18943
19319
  */
18944
19320
  204: void;
18945
19321
  };
@@ -21318,6 +21694,10 @@ export type ListSessionsData = {
21318
21694
  * Filter by exact root session id (includes the root itself)
21319
21695
  */
21320
21696
  root?: string;
21697
+ /**
21698
+ * Leave out this session and every session rooted at it (for example, a session's own tree)
21699
+ */
21700
+ exclude_root?: string;
21321
21701
  /**
21322
21702
  * Filter by exact bound worktree id
21323
21703
  */
@@ -21531,6 +21911,10 @@ export type ListSessionFacetsData = {
21531
21911
  * Filter by exact root session id (includes the root itself)
21532
21912
  */
21533
21913
  root?: string;
21914
+ /**
21915
+ * Leave out this session and every session rooted at it (for example, a session's own tree)
21916
+ */
21917
+ exclude_root?: string;
21534
21918
  /**
21535
21919
  * Only count sessions eligible for explicit attach
21536
21920
  */
@@ -21592,6 +21976,124 @@ export type ListSessionFacetsResponses = {
21592
21976
  200: SessionCatalogFacetsResponse;
21593
21977
  };
21594
21978
  export type ListSessionFacetsResponse = ListSessionFacetsResponses[keyof ListSessionFacetsResponses];
21979
+ export type GetSessionHistoryCleanupData = {
21980
+ body?: never;
21981
+ path?: never;
21982
+ query?: {
21983
+ /**
21984
+ * Act as this profile by name
21985
+ */
21986
+ profile?: string;
21987
+ };
21988
+ url: "/api/sessions/history-cleanup";
21989
+ };
21990
+ export type GetSessionHistoryCleanupErrors = {
21991
+ /**
21992
+ * Agent identity is denied
21993
+ */
21994
+ 403: ErrorPayload;
21995
+ /**
21996
+ * Internal server error
21997
+ */
21998
+ 500: ErrorPayload;
21999
+ /**
22000
+ * Service unavailable - dependent service missing
22001
+ */
22002
+ 503: ErrorPayload;
22003
+ };
22004
+ export type GetSessionHistoryCleanupError = GetSessionHistoryCleanupErrors[keyof GetSessionHistoryCleanupErrors];
22005
+ export type GetSessionHistoryCleanupResponses = {
22006
+ /**
22007
+ * OK
22008
+ */
22009
+ 200: SessionHistoryCleanupRunResponse;
22010
+ };
22011
+ export type GetSessionHistoryCleanupResponse = GetSessionHistoryCleanupResponses[keyof GetSessionHistoryCleanupResponses];
22012
+ export type PlanSessionHistoryCleanupData = {
22013
+ /**
22014
+ * JSON request body
22015
+ */
22016
+ body: SessionHistoryCleanupRequest;
22017
+ path?: never;
22018
+ query?: {
22019
+ /**
22020
+ * Act as this profile by name
22021
+ */
22022
+ profile?: string;
22023
+ };
22024
+ url: "/api/sessions/history-cleanup";
22025
+ };
22026
+ export type PlanSessionHistoryCleanupErrors = {
22027
+ /**
22028
+ * Invalid cleanup request
22029
+ */
22030
+ 400: ErrorPayload;
22031
+ /**
22032
+ * Agent identity is denied
22033
+ */
22034
+ 403: ErrorPayload;
22035
+ /**
22036
+ * A cleanup is already running for this profile
22037
+ */
22038
+ 409: ErrorPayload;
22039
+ /**
22040
+ * Internal server error
22041
+ */
22042
+ 500: ErrorPayload;
22043
+ /**
22044
+ * Service unavailable - dependent service missing
22045
+ */
22046
+ 503: ErrorPayload;
22047
+ };
22048
+ export type PlanSessionHistoryCleanupError = PlanSessionHistoryCleanupErrors[keyof PlanSessionHistoryCleanupErrors];
22049
+ export type PlanSessionHistoryCleanupResponses = {
22050
+ /**
22051
+ * Dry run: the sessions the cleanup would delete
22052
+ */
22053
+ 200: SessionHistoryCleanupPreviewResponse;
22054
+ /**
22055
+ * Accepted: the cleanup runs in the background; follow it with getSessionHistoryCleanup
22056
+ */
22057
+ 202: SessionHistoryCleanupStartResponse;
22058
+ };
22059
+ export type PlanSessionHistoryCleanupResponse = PlanSessionHistoryCleanupResponses[keyof PlanSessionHistoryCleanupResponses];
22060
+ export type StopSessionHistoryCleanupData = {
22061
+ body?: never;
22062
+ path?: never;
22063
+ query?: {
22064
+ /**
22065
+ * Act as this profile by name
22066
+ */
22067
+ profile?: string;
22068
+ };
22069
+ url: "/api/sessions/history-cleanup/stop";
22070
+ };
22071
+ export type StopSessionHistoryCleanupErrors = {
22072
+ /**
22073
+ * Agent identity is denied
22074
+ */
22075
+ 403: ErrorPayload;
22076
+ /**
22077
+ * No cleanup is running for this profile
22078
+ */
22079
+ 404: ErrorPayload;
22080
+ /**
22081
+ * Internal server error
22082
+ */
22083
+ 500: ErrorPayload;
22084
+ /**
22085
+ * Service unavailable - dependent service missing
22086
+ */
22087
+ 503: ErrorPayload;
22088
+ };
22089
+ export type StopSessionHistoryCleanupError = StopSessionHistoryCleanupErrors[keyof StopSessionHistoryCleanupErrors];
22090
+ export type StopSessionHistoryCleanupResponses = {
22091
+ /**
22092
+ * OK
22093
+ */
22094
+ 200: SessionHistoryCleanupRunResponse;
22095
+ };
22096
+ export type StopSessionHistoryCleanupResponse = StopSessionHistoryCleanupResponses[keyof StopSessionHistoryCleanupResponses];
21595
22097
  export type GetSessionByIDData = {
21596
22098
  body?: never;
21597
22099
  path: {
@@ -22896,6 +23398,92 @@ export type PutSettingsMCPServerResponses = {
22896
23398
  200: SettingsApplyResponse;
22897
23399
  };
22898
23400
  export type PutSettingsMCPServerResponse = PutSettingsMCPServerResponses[keyof PutSettingsMCPServerResponses];
23401
+ export type DeleteSettingsMCPApprovalData = {
23402
+ body?: never;
23403
+ path: {
23404
+ /**
23405
+ * Configured MCP server name
23406
+ */
23407
+ name: string;
23408
+ };
23409
+ query: {
23410
+ /**
23411
+ * Workspace ID
23412
+ */
23413
+ workspace_id: string;
23414
+ /**
23415
+ * Profile name
23416
+ */
23417
+ profile?: string;
23418
+ };
23419
+ url: "/api/settings/mcp-servers/{name}/approval";
23420
+ };
23421
+ export type DeleteSettingsMCPApprovalErrors = {
23422
+ /**
23423
+ * MCP server or workspace not found
23424
+ */
23425
+ 404: ErrorPayload;
23426
+ /**
23427
+ * Approval not required
23428
+ */
23429
+ 409: ErrorPayload;
23430
+ };
23431
+ export type DeleteSettingsMCPApprovalError = DeleteSettingsMCPApprovalErrors[keyof DeleteSettingsMCPApprovalErrors];
23432
+ export type DeleteSettingsMCPApprovalResponses = {
23433
+ /**
23434
+ * Revoked
23435
+ */
23436
+ 204: void;
23437
+ };
23438
+ export type DeleteSettingsMCPApprovalResponse = DeleteSettingsMCPApprovalResponses[keyof DeleteSettingsMCPApprovalResponses];
23439
+ export type PutSettingsMCPApprovalData = {
23440
+ /**
23441
+ * JSON request body
23442
+ */
23443
+ body: SettingsMCPApprovalRequest;
23444
+ path: {
23445
+ /**
23446
+ * Configured MCP server name
23447
+ */
23448
+ name: string;
23449
+ };
23450
+ query?: never;
23451
+ url: "/api/settings/mcp-servers/{name}/approval";
23452
+ };
23453
+ export type PutSettingsMCPApprovalErrors = {
23454
+ /**
23455
+ * Invalid MCP OAuth request or session
23456
+ */
23457
+ 400: ErrorPayload;
23458
+ /**
23459
+ * Forbidden
23460
+ */
23461
+ 403: ErrorPayload;
23462
+ /**
23463
+ * MCP server or workspace not found
23464
+ */
23465
+ 404: ErrorPayload;
23466
+ /**
23467
+ * MCP server waiting for approval or definition changed
23468
+ */
23469
+ 409: ErrorPayload;
23470
+ /**
23471
+ * Internal server error
23472
+ */
23473
+ 500: ErrorPayload;
23474
+ /**
23475
+ * MCP OAuth runtime is unavailable
23476
+ */
23477
+ 503: ErrorPayload;
23478
+ };
23479
+ export type PutSettingsMCPApprovalError = PutSettingsMCPApprovalErrors[keyof PutSettingsMCPApprovalErrors];
23480
+ export type PutSettingsMCPApprovalResponses = {
23481
+ /**
23482
+ * OK
23483
+ */
23484
+ 200: SettingsMCPApprovalResponse;
23485
+ };
23486
+ export type PutSettingsMCPApprovalResponse = PutSettingsMCPApprovalResponses[keyof PutSettingsMCPApprovalResponses];
22899
23487
  export type BeginSettingsMCPAuthData = {
22900
23488
  /**
22901
23489
  * JSON request body
@@ -22940,6 +23528,10 @@ export type BeginSettingsMCPAuthErrors = {
22940
23528
  * MCP server or workspace not found
22941
23529
  */
22942
23530
  404: ErrorPayload;
23531
+ /**
23532
+ * MCP server waiting for approval or definition changed
23533
+ */
23534
+ 409: ErrorPayload;
22943
23535
  /**
22944
23536
  * Internal server error
22945
23537
  */
@@ -23001,6 +23593,10 @@ export type ExchangeSettingsMCPAuthErrors = {
23001
23593
  * MCP server or workspace not found
23002
23594
  */
23003
23595
  404: ErrorPayload;
23596
+ /**
23597
+ * MCP server waiting for approval or definition changed
23598
+ */
23599
+ 409: ErrorPayload;
23004
23600
  /**
23005
23601
  * Internal server error
23006
23602
  */
@@ -23059,6 +23655,10 @@ export type LogoutSettingsMCPAuthErrors = {
23059
23655
  * MCP server or workspace not found
23060
23656
  */
23061
23657
  404: ErrorPayload;
23658
+ /**
23659
+ * MCP server waiting for approval or definition changed
23660
+ */
23661
+ 409: ErrorPayload;
23062
23662
  /**
23063
23663
  * Internal server error
23064
23664
  */
@@ -23117,6 +23717,10 @@ export type GetSettingsMCPAuthStatusErrors = {
23117
23717
  * MCP server or workspace not found
23118
23718
  */
23119
23719
  404: ErrorPayload;
23720
+ /**
23721
+ * MCP server waiting for approval or definition changed
23722
+ */
23723
+ 409: ErrorPayload;
23120
23724
  /**
23121
23725
  * Internal server error
23122
23726
  */
@@ -23595,6 +24199,96 @@ export type UpdateSettingsRolesResponses = {
23595
24199
  200: SettingsApplyResponse;
23596
24200
  };
23597
24201
  export type UpdateSettingsRolesResponse = UpdateSettingsRolesResponses[keyof UpdateSettingsRolesResponses];
24202
+ export type ListRuntimeMCPServersData = {
24203
+ body?: never;
24204
+ path?: never;
24205
+ query?: {
24206
+ /**
24207
+ * Select the settings scope
24208
+ */
24209
+ scope?: "user" | "profile" | "workspace";
24210
+ /**
24211
+ * Select the workspace context
24212
+ */
24213
+ workspace_id?: string;
24214
+ /**
24215
+ * Select the profile layer
24216
+ */
24217
+ profile?: string;
24218
+ runtime?: string;
24219
+ };
24220
+ url: "/api/settings/runtime-mcp-servers";
24221
+ };
24222
+ export type ListRuntimeMCPServersErrors = {
24223
+ /**
24224
+ * Invalid runtime or settings scope
24225
+ */
24226
+ 400: ErrorPayload;
24227
+ /**
24228
+ * Workspace not found
24229
+ */
24230
+ 404: ErrorPayload;
24231
+ /**
24232
+ * Internal server error
24233
+ */
24234
+ 500: ErrorPayload;
24235
+ };
24236
+ export type ListRuntimeMCPServersError = ListRuntimeMCPServersErrors[keyof ListRuntimeMCPServersErrors];
24237
+ export type ListRuntimeMCPServersResponses = {
24238
+ /**
24239
+ * OK
24240
+ */
24241
+ 200: Inventory;
24242
+ };
24243
+ export type ListRuntimeMCPServersResponse = ListRuntimeMCPServersResponses[keyof ListRuntimeMCPServersResponses];
24244
+ export type ImportRuntimeMCPServerData = {
24245
+ /**
24246
+ * JSON request body
24247
+ */
24248
+ body: RuntimeMCPImportRequest;
24249
+ path: {
24250
+ /**
24251
+ * Source runtime
24252
+ */
24253
+ runtime: string;
24254
+ /**
24255
+ * URL-escaped runtime server name
24256
+ */
24257
+ name: string;
24258
+ };
24259
+ query?: never;
24260
+ url: "/api/settings/runtime-mcp-servers/{runtime}/{name}/import";
24261
+ };
24262
+ export type ImportRuntimeMCPServerErrors = {
24263
+ /**
24264
+ * Invalid import request
24265
+ */
24266
+ 400: ErrorPayload;
24267
+ /**
24268
+ * Runtime server or workspace not found
24269
+ */
24270
+ 404: ErrorPayload;
24271
+ /**
24272
+ * Target name already exists
24273
+ */
24274
+ 409: ErrorPayload;
24275
+ /**
24276
+ * Runtime source, transport or definition cannot be copied
24277
+ */
24278
+ 422: ErrorPayload;
24279
+ /**
24280
+ * Internal server error
24281
+ */
24282
+ 500: ErrorPayload;
24283
+ };
24284
+ export type ImportRuntimeMCPServerError = ImportRuntimeMCPServerErrors[keyof ImportRuntimeMCPServerErrors];
24285
+ export type ImportRuntimeMCPServerResponses = {
24286
+ /**
24287
+ * Copied, possibly with partial cleanup warnings
24288
+ */
24289
+ 201: RuntimeMCPImportResponse;
24290
+ };
24291
+ export type ImportRuntimeMCPServerResponse = ImportRuntimeMCPServerResponses[keyof ImportRuntimeMCPServerResponses];
23598
24292
  export type GetSettingsShellData = {
23599
24293
  body?: never;
23600
24294
  path?: never;
@@ -28240,6 +28934,10 @@ export type DeleteWorkspaceErrors = {
28240
28934
  * Internal server error
28241
28935
  */
28242
28936
  500: ErrorPayload;
28937
+ /**
28938
+ * Removal held by a desktop layout that could not be read; retry finishes it
28939
+ */
28940
+ 503: ErrorPayload;
28243
28941
  };
28244
28942
  export type DeleteWorkspaceError = DeleteWorkspaceErrors[keyof DeleteWorkspaceErrors];
28245
28943
  export type DeleteWorkspaceResponses = {
@@ -28723,6 +29421,72 @@ export type FindFilesResponses = {
28723
29421
  200: FileFindResponse;
28724
29422
  };
28725
29423
  export type FindFilesResponse = FindFilesResponses[keyof FindFilesResponses];
29424
+ export type ReadFileBytesData = {
29425
+ body?: never;
29426
+ path: {
29427
+ /**
29428
+ * Workspace id
29429
+ */
29430
+ workspace_id: string;
29431
+ /**
29432
+ * Root-relative file path; its slashes are path segments
29433
+ */
29434
+ path: string;
29435
+ };
29436
+ query?: {
29437
+ /**
29438
+ * Read one profile's rows by name
29439
+ */
29440
+ profile?: string;
29441
+ /**
29442
+ * Read the owner-labeled all-profiles aggregate
29443
+ */
29444
+ all_profiles?: boolean;
29445
+ };
29446
+ url: "/api/workspaces/{workspace_id}/files/raw/{path}";
29447
+ };
29448
+ export type ReadFileBytesErrors = {
29449
+ /**
29450
+ * File operation failed
29451
+ */
29452
+ 400: ErrorPayload;
29453
+ /**
29454
+ * File operation failed
29455
+ */
29456
+ 403: ErrorPayload;
29457
+ /**
29458
+ * File operation failed
29459
+ */
29460
+ 404: ErrorPayload;
29461
+ /**
29462
+ * File operation failed
29463
+ */
29464
+ 409: ErrorPayload;
29465
+ /**
29466
+ * Requested range not satisfiable
29467
+ */
29468
+ 416: unknown;
29469
+ /**
29470
+ * File operation failed
29471
+ */
29472
+ 422: ErrorPayload;
29473
+ /**
29474
+ * File operation failed
29475
+ */
29476
+ 500: ErrorPayload;
29477
+ };
29478
+ export type ReadFileBytesError = ReadFileBytesErrors[keyof ReadFileBytesErrors];
29479
+ export type ReadFileBytesResponses = {
29480
+ /**
29481
+ * File bytes
29482
+ */
29483
+ 200: Blob | File;
29484
+ /**
29485
+ * Requested byte range
29486
+ */
29487
+ 206: Blob | File;
29488
+ };
29489
+ export type ReadFileBytesResponse = ReadFileBytesResponses[keyof ReadFileBytesResponses];
28726
29490
  export type SearchFileContentsData = {
28727
29491
  body?: never;
28728
29492
  path: {
@@ -28817,7 +29581,7 @@ export type GetHookRunsData = {
28817
29581
  /**
28818
29582
  * Hook event name
28819
29583
  */
28820
- event?: "agent.instance.created" | "agent.instance.paused" | "agent.instance.resumed" | "agent.instance.archived" | "agent.instance.adopted" | "subagent.settled" | "session.pre_create" | "session.post_create" | "session.pre_resume" | "session.post_resume" | "session.pre_stop" | "session.post_stop" | "session.message_persisted" | "session.runtime_recovery.started" | "session.runtime_recovery.succeeded" | "session.runtime_recovery.exhausted" | "input.pre_submit" | "prompt.post_assemble" | "event.pre_record" | "event.post_record" | "automation.job.pre_fire" | "automation.job.post_fire" | "automation.trigger.pre_fire" | "automation.trigger.post_fire" | "automation.run.completed" | "automation.run.failed" | "agent.pre_start" | "agent.spawned" | "agent.crashed" | "agent.stopped" | "agent.soul.snapshot.resolved" | "agent.soul.mutation.after" | "agent.heartbeat.policy.resolved" | "agent.heartbeat.wake.before" | "agent.heartbeat.wake.after" | "session.health.update.after" | "turn.start" | "turn.end" | "message.start" | "message.delta" | "message.end" | "tool.pre_call" | "tool.post_call" | "tool.post_error" | "permission.request" | "permission.resolved" | "permission.denied" | "context.pre_compact" | "context.post_compact" | "coordinator.pre_spawn" | "coordinator.spawned" | "coordinator.decision" | "coordinator.stopped" | "coordinator.failed" | "task.blocked" | "task.unblocked" | "task.needs_attention" | "task.recovered" | "task.status_changed" | "task.run.enqueued" | "task.run.pre_claim" | "task.run.post_claim" | "task.run.lease_extended" | "task.run.lease_expired" | "task.run.lease_recovered" | "task.run.released" | "task.run.completed" | "task.run.failed" | "loop.started" | "loop.generation.pre" | "loop.generation.post" | "loop.gate.pre" | "loop.gate.post" | "loop.node.terminal" | "loop.terminal" | "spawn.pre_create" | "spawn.created" | "spawn.parent_stopped" | "spawn.ttl_expired" | "spawn.reaped" | "session.attention.changed" | "window_manager.layout.applied" | "window_manager.desktop.created" | "window_manager.desktop.deleted" | "window_manager.window.moved" | "window_manager.window.opened" | "window_manager.window.closed" | "window_manager.stack.grouped" | "window_manager.stack.ungrouped" | "window_manager.stack.activated" | "worktree.pre_create" | "worktree.pre_remove" | "worktree.created" | "worktree.adopted" | "worktree.removed" | "terminal.opened" | "terminal.closed" | "terminal.command_started" | "terminal.command_finished" | "terminal.input_requested" | "terminal.input_provided" | "terminal.recording_started" | "terminal.recording_stopped" | "terminal.subscriber_evicted" | "terminal.limit_rejected" | "agent.instance.proposal.picked";
29584
+ event?: "agent.instance.created" | "agent.instance.paused" | "agent.instance.resumed" | "agent.instance.archived" | "agent.instance.adopted" | "subagent.settled" | "session.pre_create" | "session.post_create" | "session.pre_resume" | "session.post_resume" | "session.pre_stop" | "session.post_stop" | "session.message_persisted" | "session.runtime_recovery.started" | "session.runtime_recovery.succeeded" | "session.runtime_recovery.exhausted" | "input.pre_submit" | "prompt.post_assemble" | "event.pre_record" | "event.post_record" | "automation.job.pre_fire" | "automation.job.post_fire" | "automation.trigger.pre_fire" | "automation.trigger.post_fire" | "automation.run.completed" | "automation.run.failed" | "agent.pre_start" | "agent.spawned" | "agent.crashed" | "agent.stopped" | "agent.soul.snapshot.resolved" | "agent.soul.mutation.after" | "agent.heartbeat.policy.resolved" | "agent.heartbeat.wake.before" | "agent.heartbeat.wake.after" | "session.health.update.after" | "turn.start" | "turn.end" | "message.start" | "message.delta" | "message.end" | "tool.pre_call" | "tool.post_call" | "tool.post_error" | "permission.request" | "permission.resolved" | "permission.denied" | "context.pre_compact" | "context.post_compact" | "coordinator.pre_spawn" | "coordinator.spawned" | "coordinator.decision" | "coordinator.stopped" | "coordinator.failed" | "task.blocked" | "task.unblocked" | "task.needs_attention" | "task.recovered" | "task.status_changed" | "task.run.enqueued" | "task.run.pre_claim" | "task.run.post_claim" | "task.run.lease_extended" | "task.run.lease_expired" | "task.run.lease_recovered" | "task.run.released" | "task.run.completed" | "task.run.failed" | "loop.started" | "loop.generation.pre" | "loop.generation.post" | "loop.gate.pre" | "loop.gate.post" | "loop.node.terminal" | "loop.terminal" | "spawn.pre_create" | "spawn.created" | "spawn.parent_stopped" | "spawn.ttl_expired" | "spawn.reaped" | "session.attention.changed" | "window_manager.tab.split" | "window_manager.tab.unsplit" | "window_manager.tab.activated" | "window_manager.layout.applied" | "window_manager.desktop.created" | "window_manager.desktop.deleted" | "window_manager.window.moved" | "window_manager.window.opened" | "window_manager.window.closed" | "window_manager.stack.grouped" | "window_manager.stack.ungrouped" | "window_manager.stack.activated" | "worktree.pre_create" | "worktree.pre_remove" | "worktree.created" | "worktree.adopted" | "worktree.removed" | "terminal.opened" | "terminal.closed" | "terminal.command_started" | "terminal.command_finished" | "terminal.input_requested" | "terminal.input_provided" | "terminal.recording_started" | "terminal.recording_stopped" | "terminal.subscriber_evicted" | "terminal.limit_rejected" | "agent.instance.proposal.picked";
28821
29585
  /**
28822
29586
  * Hook execution outcome
28823
29587
  */
@@ -31434,6 +32198,10 @@ export type ListWorkspaceSessionsData = {
31434
32198
  * Filter by exact root session id (includes the root itself)
31435
32199
  */
31436
32200
  root?: string;
32201
+ /**
32202
+ * Leave out this session and every session rooted at it (for example, a session's own tree)
32203
+ */
32204
+ exclude_root?: string;
31437
32205
  /**
31438
32206
  * Filter by exact bound worktree id
31439
32207
  */
@@ -33034,6 +33802,76 @@ export type FindSessionFilesResponses = {
33034
33802
  200: FileFindResponse;
33035
33803
  };
33036
33804
  export type FindSessionFilesResponse = FindSessionFilesResponses[keyof FindSessionFilesResponses];
33805
+ export type ReadSessionFileBytesData = {
33806
+ body?: never;
33807
+ path: {
33808
+ /**
33809
+ * Workspace id
33810
+ */
33811
+ workspace_id: string;
33812
+ /**
33813
+ * Session id
33814
+ */
33815
+ session_id: string;
33816
+ /**
33817
+ * Root-relative file path; its slashes are path segments
33818
+ */
33819
+ path: string;
33820
+ };
33821
+ query?: {
33822
+ /**
33823
+ * Read one profile's rows by name
33824
+ */
33825
+ profile?: string;
33826
+ /**
33827
+ * Read the owner-labeled all-profiles aggregate
33828
+ */
33829
+ all_profiles?: boolean;
33830
+ };
33831
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/files/raw/{path}";
33832
+ };
33833
+ export type ReadSessionFileBytesErrors = {
33834
+ /**
33835
+ * File operation failed
33836
+ */
33837
+ 400: ErrorPayload;
33838
+ /**
33839
+ * File operation failed
33840
+ */
33841
+ 403: ErrorPayload;
33842
+ /**
33843
+ * File operation failed
33844
+ */
33845
+ 404: ErrorPayload;
33846
+ /**
33847
+ * File operation failed
33848
+ */
33849
+ 409: ErrorPayload;
33850
+ /**
33851
+ * Requested range not satisfiable
33852
+ */
33853
+ 416: unknown;
33854
+ /**
33855
+ * File operation failed
33856
+ */
33857
+ 422: ErrorPayload;
33858
+ /**
33859
+ * File operation failed
33860
+ */
33861
+ 500: ErrorPayload;
33862
+ };
33863
+ export type ReadSessionFileBytesError = ReadSessionFileBytesErrors[keyof ReadSessionFileBytesErrors];
33864
+ export type ReadSessionFileBytesResponses = {
33865
+ /**
33866
+ * File bytes
33867
+ */
33868
+ 200: Blob | File;
33869
+ /**
33870
+ * Requested byte range
33871
+ */
33872
+ 206: Blob | File;
33873
+ };
33874
+ export type ReadSessionFileBytesResponse = ReadSessionFileBytesResponses[keyof ReadSessionFileBytesResponses];
33037
33875
  export type SearchSessionFileContentsData = {
33038
33876
  body?: never;
33039
33877
  path: {
@@ -33890,6 +34728,52 @@ export type MarkSessionSeenResponses = {
33890
34728
  200: SessionResponse;
33891
34729
  };
33892
34730
  export type MarkSessionSeenResponse = MarkSessionSeenResponses[keyof MarkSessionSeenResponses];
34731
+ export type GetSessionMCPData = {
34732
+ body?: never;
34733
+ path: {
34734
+ /**
34735
+ * Workspace id
34736
+ */
34737
+ workspace_id: string;
34738
+ /**
34739
+ * Session id
34740
+ */
34741
+ session_id: string;
34742
+ };
34743
+ query?: {
34744
+ /**
34745
+ * Read one profile's rows by name
34746
+ */
34747
+ profile?: string;
34748
+ /**
34749
+ * Read the owner-labeled all-profiles aggregate
34750
+ */
34751
+ all_profiles?: boolean;
34752
+ };
34753
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/mcp";
34754
+ };
34755
+ export type GetSessionMCPErrors = {
34756
+ /**
34757
+ * Session not found
34758
+ */
34759
+ 404: ErrorPayload;
34760
+ /**
34761
+ * Internal server error
34762
+ */
34763
+ 500: ErrorPayload;
34764
+ /**
34765
+ * Session MCP read model unavailable
34766
+ */
34767
+ 503: ErrorPayload;
34768
+ };
34769
+ export type GetSessionMCPError = GetSessionMCPErrors[keyof GetSessionMCPErrors];
34770
+ export type GetSessionMCPResponses = {
34771
+ /**
34772
+ * OK
34773
+ */
34774
+ 200: SessionMCP;
34775
+ };
34776
+ export type GetSessionMCPResponse = GetSessionMCPResponses[keyof GetSessionMCPResponses];
33893
34777
  export type ListSessionMonitorsData = {
33894
34778
  body?: never;
33895
34779
  path: {
@@ -35243,7 +36127,7 @@ export type ListSessionSubagentsData = {
35243
36127
  */
35244
36128
  cursor?: string;
35245
36129
  /**
35246
- * Row order: newest first (default), or most urgent first (waiting, failed, working, queued, settled) then newest
36130
+ * Row order: newest first (default), or most urgent first (waiting, working, failed, queued, settled) then newest
35247
36131
  */
35248
36132
  order?: "newest" | "urgency";
35249
36133
  /**
@@ -35891,6 +36775,60 @@ export type ForkSessionToWorktreeResponses = {
35891
36775
  201: SessionResponse;
35892
36776
  };
35893
36777
  export type ForkSessionToWorktreeResponse = ForkSessionToWorktreeResponses[keyof ForkSessionToWorktreeResponses];
36778
+ export type DeleteSubagentData = {
36779
+ body?: never;
36780
+ path: {
36781
+ /**
36782
+ * Workspace id
36783
+ */
36784
+ workspace_id: string;
36785
+ /**
36786
+ * Subagent id
36787
+ */
36788
+ subagent_id: string;
36789
+ };
36790
+ query?: {
36791
+ /**
36792
+ * Act as this profile by name
36793
+ */
36794
+ profile?: string;
36795
+ };
36796
+ url: "/api/workspaces/{workspace_id}/subagents/{subagent_id}";
36797
+ };
36798
+ export type DeleteSubagentErrors = {
36799
+ /**
36800
+ * Invalid request
36801
+ */
36802
+ 400: ErrorPayload;
36803
+ /**
36804
+ * Capability denied
36805
+ */
36806
+ 403: ErrorPayload;
36807
+ /**
36808
+ * Session or subagent not found
36809
+ */
36810
+ 404: ErrorPayload;
36811
+ /**
36812
+ * Subagent is provider-native and follows its parent turn
36813
+ */
36814
+ 409: ErrorPayload;
36815
+ /**
36816
+ * Internal server error
36817
+ */
36818
+ 500: ErrorPayload;
36819
+ /**
36820
+ * Subagents unavailable
36821
+ */
36822
+ 503: ErrorPayload;
36823
+ };
36824
+ export type DeleteSubagentError = DeleteSubagentErrors[keyof DeleteSubagentErrors];
36825
+ export type DeleteSubagentResponses = {
36826
+ /**
36827
+ * No Content
36828
+ */
36829
+ 204: void;
36830
+ };
36831
+ export type DeleteSubagentResponse = DeleteSubagentResponses[keyof DeleteSubagentResponses];
35894
36832
  export type GetSubagentData = {
35895
36833
  body?: never;
35896
36834
  path: {
@@ -37094,7 +38032,7 @@ export type ReadToolArtifactData = {
37094
38032
  */
37095
38033
  offset?: number;
37096
38034
  /**
37097
- * Page size in bytes; defaults to and is capped at 65536
38035
+ * Page size in bytes; defaults to 32768 and is capped at 65536
37098
38036
  */
37099
38037
  limit?: number;
37100
38038
  /**
@@ -37649,11 +38587,106 @@ export type ValidateWindowManagerLayoutErrors = {
37649
38587
  export type ValidateWindowManagerLayoutError = ValidateWindowManagerLayoutErrors[keyof ValidateWindowManagerLayoutErrors];
37650
38588
  export type ValidateWindowManagerLayoutResponses = {
37651
38589
  /**
37652
- * Validation result
38590
+ * Validation diagnostics and the canonical v6 document when valid
37653
38591
  */
37654
38592
  200: ContractWindowManagerLayoutValidationResponse;
37655
38593
  };
37656
38594
  export type ValidateWindowManagerLayoutResponse = ValidateWindowManagerLayoutResponses[keyof ValidateWindowManagerLayoutResponses];
38595
+ export type GetWindowManagerMigrationData = {
38596
+ body?: never;
38597
+ path: {
38598
+ /**
38599
+ * Workspace id
38600
+ */
38601
+ workspace_id: string;
38602
+ };
38603
+ query?: {
38604
+ /**
38605
+ * Act as this profile by name
38606
+ */
38607
+ profile?: string;
38608
+ };
38609
+ url: "/api/workspaces/{workspace_id}/window-manager/migration";
38610
+ };
38611
+ export type GetWindowManagerMigrationErrors = {
38612
+ /**
38613
+ * Invalid window workspace binding
38614
+ */
38615
+ 400: ContractWindowManagerErrorPayload;
38616
+ /**
38617
+ * Workspace or referenced entity not found
38618
+ */
38619
+ 404: ContractWindowManagerErrorPayload;
38620
+ /**
38621
+ * Revision or state conflict
38622
+ */
38623
+ 409: ContractWindowManagerErrorPayload;
38624
+ /**
38625
+ * Invalid window-manager request
38626
+ */
38627
+ 422: ContractWindowManagerErrorPayload;
38628
+ /**
38629
+ * Window manager unavailable
38630
+ */
38631
+ 503: ContractWindowManagerErrorPayload;
38632
+ };
38633
+ export type GetWindowManagerMigrationError = GetWindowManagerMigrationErrors[keyof GetWindowManagerMigrationErrors];
38634
+ export type GetWindowManagerMigrationResponses = {
38635
+ /**
38636
+ * OK
38637
+ */
38638
+ 200: MigrationStatus;
38639
+ };
38640
+ export type GetWindowManagerMigrationResponse = GetWindowManagerMigrationResponses[keyof GetWindowManagerMigrationResponses];
38641
+ export type UpdateWindowManagerMigrationData = {
38642
+ /**
38643
+ * JSON request body
38644
+ */
38645
+ body: WindowManagerMigrationRequest;
38646
+ path: {
38647
+ /**
38648
+ * Workspace id
38649
+ */
38650
+ workspace_id: string;
38651
+ };
38652
+ query?: {
38653
+ /**
38654
+ * Act as this profile by name
38655
+ */
38656
+ profile?: string;
38657
+ };
38658
+ url: "/api/workspaces/{workspace_id}/window-manager/migration";
38659
+ };
38660
+ export type UpdateWindowManagerMigrationErrors = {
38661
+ /**
38662
+ * Invalid window workspace binding
38663
+ */
38664
+ 400: ContractWindowManagerErrorPayload;
38665
+ /**
38666
+ * Workspace or referenced entity not found
38667
+ */
38668
+ 404: ContractWindowManagerErrorPayload;
38669
+ /**
38670
+ * Revision or state conflict
38671
+ */
38672
+ 409: ContractWindowManagerErrorPayload;
38673
+ /**
38674
+ * Invalid window-manager request
38675
+ */
38676
+ 422: ContractWindowManagerErrorPayload;
38677
+ /**
38678
+ * Window manager unavailable
38679
+ */
38680
+ 503: ContractWindowManagerErrorPayload;
38681
+ };
38682
+ export type UpdateWindowManagerMigrationError = UpdateWindowManagerMigrationErrors[keyof UpdateWindowManagerMigrationErrors];
38683
+ export type UpdateWindowManagerMigrationResponses = {
38684
+ /**
38685
+ * OK
38686
+ */
38687
+ 200: MigrationStatus;
38688
+ };
38689
+ export type UpdateWindowManagerMigrationResponse = UpdateWindowManagerMigrationResponses[keyof UpdateWindowManagerMigrationResponses];
37657
38690
  export type PreviewWindowManagerCommandData = {
37658
38691
  /**
37659
38692
  * JSON request body
@@ -37916,6 +38949,63 @@ export type RemoveDiscoveredWorktreeResponses = {
37916
38949
  204: void;
37917
38950
  };
37918
38951
  export type RemoveDiscoveredWorktreeResponse = RemoveDiscoveredWorktreeResponses[keyof RemoveDiscoveredWorktreeResponses];
38952
+ export type RemoveWorktreesData = {
38953
+ /**
38954
+ * JSON request body
38955
+ */
38956
+ body: RemoveWorktreesRequest;
38957
+ path: {
38958
+ /**
38959
+ * Workspace id or path
38960
+ */
38961
+ workspace_id: string;
38962
+ };
38963
+ query?: {
38964
+ /**
38965
+ * Act as this profile by name. If omitted, operator requests infer the target record owner; authenticated agents remain scoped to their session profile.
38966
+ */
38967
+ profile?: string;
38968
+ };
38969
+ url: "/api/workspaces/{workspace_id}/worktrees/remove";
38970
+ };
38971
+ export type RemoveWorktreesErrors = {
38972
+ /**
38973
+ * Invalid worktree request
38974
+ */
38975
+ 400: ErrorPayload;
38976
+ /**
38977
+ * Forbidden
38978
+ */
38979
+ 403: ErrorPayload;
38980
+ /**
38981
+ * Worktree or workspace not found
38982
+ */
38983
+ 404: ErrorPayload;
38984
+ /**
38985
+ * Worktree operation conflict
38986
+ */
38987
+ 409: ErrorPayload;
38988
+ /**
38989
+ * Invalid worktree configuration
38990
+ */
38991
+ 422: ErrorPayload;
38992
+ /**
38993
+ * Internal server error
38994
+ */
38995
+ 500: ErrorPayload;
38996
+ /**
38997
+ * Worktree service is unavailable
38998
+ */
38999
+ 503: ErrorPayload;
39000
+ };
39001
+ export type RemoveWorktreesError = RemoveWorktreesErrors[keyof RemoveWorktreesErrors];
39002
+ export type RemoveWorktreesResponses = {
39003
+ /**
39004
+ * Per-target removal results or dry-run risk; inspect every result
39005
+ */
39006
+ 200: RemoveWorktreesResponse;
39007
+ };
39008
+ export type RemoveWorktreesResponse2 = RemoveWorktreesResponses[keyof RemoveWorktreesResponses];
37919
39009
  export type RemoveWorktreeData = {
37920
39010
  body?: never;
37921
39011
  path: {
@@ -38333,6 +39423,76 @@ export type PrepareWorktreeExitPlanResponses = {
38333
39423
  200: WorktreeExitPlanResponse;
38334
39424
  };
38335
39425
  export type PrepareWorktreeExitPlanResponse = PrepareWorktreeExitPlanResponses[keyof PrepareWorktreeExitPlanResponses];
39426
+ export type ReadWorktreeFileBytesData = {
39427
+ body?: never;
39428
+ path: {
39429
+ /**
39430
+ * Workspace id
39431
+ */
39432
+ workspace_id: string;
39433
+ /**
39434
+ * Worktree id
39435
+ */
39436
+ worktree_id: string;
39437
+ /**
39438
+ * Root-relative file path; its slashes are path segments
39439
+ */
39440
+ path: string;
39441
+ };
39442
+ query?: {
39443
+ /**
39444
+ * Read one profile's rows by name
39445
+ */
39446
+ profile?: string;
39447
+ /**
39448
+ * Read the owner-labeled all-profiles aggregate
39449
+ */
39450
+ all_profiles?: boolean;
39451
+ };
39452
+ url: "/api/workspaces/{workspace_id}/worktrees/{worktree_id}/files/raw/{path}";
39453
+ };
39454
+ export type ReadWorktreeFileBytesErrors = {
39455
+ /**
39456
+ * File operation failed
39457
+ */
39458
+ 400: ErrorPayload;
39459
+ /**
39460
+ * File operation failed
39461
+ */
39462
+ 403: ErrorPayload;
39463
+ /**
39464
+ * File operation failed
39465
+ */
39466
+ 404: ErrorPayload;
39467
+ /**
39468
+ * File operation failed
39469
+ */
39470
+ 409: ErrorPayload;
39471
+ /**
39472
+ * Requested range not satisfiable
39473
+ */
39474
+ 416: unknown;
39475
+ /**
39476
+ * File operation failed
39477
+ */
39478
+ 422: ErrorPayload;
39479
+ /**
39480
+ * File operation failed
39481
+ */
39482
+ 500: ErrorPayload;
39483
+ };
39484
+ export type ReadWorktreeFileBytesError = ReadWorktreeFileBytesErrors[keyof ReadWorktreeFileBytesErrors];
39485
+ export type ReadWorktreeFileBytesResponses = {
39486
+ /**
39487
+ * File bytes
39488
+ */
39489
+ 200: Blob | File;
39490
+ /**
39491
+ * Requested byte range
39492
+ */
39493
+ 206: Blob | File;
39494
+ };
39495
+ export type ReadWorktreeFileBytesResponse = ReadWorktreeFileBytesResponses[keyof ReadWorktreeFileBytesResponses];
38336
39496
  export type GetWorktreeStatusData = {
38337
39497
  body?: never;
38338
39498
  path: {