@compozy/extension-sdk 0.3.0-beta.19 → 0.3.0-beta.21

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.
@@ -7,10 +7,11 @@ export interface AcceptedCapabilities {
7
7
  export interface AgentCrashedPatch {
8
8
  labels?: Record<string, string>;
9
9
  }
10
- export type HookEvent = "session.pre_create" | "session.post_create" | "session.pre_resume" | "session.post_resume" | "session.pre_stop" | "session.post_stop" | "session.message_persisted" | "sandbox.prepare" | "sandbox.ready" | "sandbox.sync.before" | "sandbox.sync.after" | "sandbox.stop" | "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" | "network.thread.opened" | "network.direct_room.opened" | "network.message.persisted" | "network.work.opened" | "network.work.transitioned" | "network.work.closed" | "network.peer.joined" | "network.peer.left" | "network.participation.pre_resolve" | "network.participation.resolved" | "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";
10
+ export type HookEvent = "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" | "sandbox.prepare" | "sandbox.ready" | "sandbox.sync.before" | "sandbox.sync.after" | "sandbox.stop" | "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" | "network.thread.opened" | "network.direct_room.opened" | "network.message.persisted" | "network.work.opened" | "network.work.transitioned" | "network.work.closed" | "network.peer.joined" | "network.peer.left" | "network.participation.pre_resolve" | "network.participation.resolved" | "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";
11
11
  export interface AgentCrashedPayload {
12
12
  event: HookEvent;
13
13
  timestamp: ISODateTime;
14
+ profile_id?: string;
14
15
  session_id?: string;
15
16
  session_name?: string;
16
17
  session_type?: string;
@@ -92,6 +93,7 @@ export interface AgentHeartbeatValidateParams {
92
93
  export interface AgentHeartbeatWakeAfterPayload {
93
94
  event: HookEvent;
94
95
  timestamp: ISODateTime;
96
+ profile_id?: string;
95
97
  session_id?: string;
96
98
  session_name?: string;
97
99
  session_type?: string;
@@ -117,6 +119,7 @@ export interface AgentHeartbeatWakeAfterPayload {
117
119
  export interface AgentHeartbeatWakeBeforePayload {
118
120
  event: HookEvent;
119
121
  timestamp: ISODateTime;
122
+ profile_id?: string;
120
123
  session_id?: string;
121
124
  session_name?: string;
122
125
  session_type?: string;
@@ -151,6 +154,7 @@ export interface AgentLifecyclePatch {
151
154
  export interface AgentLifecyclePayload {
152
155
  event: HookEvent;
153
156
  timestamp: ISODateTime;
157
+ profile_id?: string;
154
158
  session_id?: string;
155
159
  session_name?: string;
156
160
  session_type?: string;
@@ -175,6 +179,7 @@ export interface AgentLifecyclePayload {
175
179
  export interface AgentPreStartPayload {
176
180
  event: HookEvent;
177
181
  timestamp: ISODateTime;
182
+ profile_id?: string;
178
183
  session_id?: string;
179
184
  session_name?: string;
180
185
  session_type?: string;
@@ -396,6 +401,7 @@ export interface AgentSpawnedPatch {
396
401
  export interface AgentSpawnedPayload {
397
402
  event: HookEvent;
398
403
  timestamp: ISODateTime;
404
+ profile_id?: string;
399
405
  session_id?: string;
400
406
  session_name?: string;
401
407
  session_type?: string;
@@ -430,6 +436,7 @@ export interface AgentStoppedPatch {
430
436
  export interface AgentStoppedPayload {
431
437
  event: HookEvent;
432
438
  timestamp: ISODateTime;
439
+ profile_id?: string;
433
440
  session_id?: string;
434
441
  session_name?: string;
435
442
  session_type?: string;
@@ -559,6 +566,7 @@ export interface AutomationJobCreateParams {
559
566
  fire_limit?: FireLimitConfig;
560
567
  }
561
568
  export interface AutomationJobPostFirePayload {
569
+ profile_id?: string;
562
570
  job_id: string;
563
571
  job_name?: string;
564
572
  agent_name?: string;
@@ -573,6 +581,7 @@ export interface AutomationSchedulePayload {
573
581
  time?: string;
574
582
  }
575
583
  export interface AutomationJobPreFirePayload {
584
+ profile_id?: string;
576
585
  job_id: string;
577
586
  job_name?: string;
578
587
  agent_name?: string;
@@ -614,6 +623,7 @@ export interface AutomationJobsParams {
614
623
  export type JobSource = string;
615
624
  export interface Job {
616
625
  id: string;
626
+ profile_id: string;
617
627
  scope: Scope;
618
628
  name: string;
619
629
  target_kind: TargetKind;
@@ -642,6 +652,7 @@ export interface AutomationJobsResult {
642
652
  }
643
653
  export type AutomationObservationPatch = Record<string, never>;
644
654
  export interface AutomationRunCompletedPayload {
655
+ profile_id?: string;
645
656
  run_id: string;
646
657
  job_id?: string;
647
658
  trigger_id?: string;
@@ -652,6 +663,7 @@ export interface AutomationRunCompletedPayload {
652
663
  duration_ms?: number;
653
664
  }
654
665
  export interface AutomationRunFailedPayload {
666
+ profile_id?: string;
655
667
  run_id: string;
656
668
  job_id?: string;
657
669
  trigger_id?: string;
@@ -695,6 +707,7 @@ export interface AutomationTriggerFireParams {
695
707
  payload?: Record<string, JSONValue>;
696
708
  }
697
709
  export interface AutomationTriggerPostFirePayload {
710
+ profile_id?: string;
698
711
  trigger_id: string;
699
712
  trigger_name?: string;
700
713
  event?: string;
@@ -704,6 +717,7 @@ export interface AutomationTriggerPostFirePayload {
704
717
  session_id?: string;
705
718
  }
706
719
  export interface AutomationTriggerPreFirePayload {
720
+ profile_id?: string;
707
721
  trigger_id: string;
708
722
  trigger_name?: string;
709
723
  event?: string;
@@ -755,6 +769,10 @@ export interface GatewayIngressPayload {
755
769
  }
756
770
  export interface Trigger {
757
771
  id: string;
772
+ profile_id: string;
773
+ profile_name: string;
774
+ profile_color?: string;
775
+ profile_icon?: string;
758
776
  scope: Scope;
759
777
  name: string;
760
778
  target_kind: TargetKind;
@@ -826,6 +844,12 @@ export interface BridgeDegradation {
826
844
  }
827
845
  export interface BridgeInstance {
828
846
  id: string;
847
+ profile_id: string;
848
+ profile_name?: string;
849
+ profile_color?: string;
850
+ profile_icon?: string;
851
+ profile_emoji?: string;
852
+ profile_archived?: boolean;
829
853
  scope: BridgeScope;
830
854
  workspace_id?: string;
831
855
  platform: string;
@@ -928,6 +952,7 @@ export interface CmdPaletteCommand {
928
952
  title: string;
929
953
  section?: string;
930
954
  icon: string;
955
+ profile?: string;
931
956
  keywords?: string[];
932
957
  arguments?: CmdPaletteArgument[];
933
958
  action: CmdPaletteAction;
@@ -943,6 +968,7 @@ export interface CmdPaletteView {
943
968
  id: string;
944
969
  title: string;
945
970
  kind: string;
971
+ profile?: string;
946
972
  source?: CmdPaletteViewSource;
947
973
  program?: boolean;
948
974
  }
@@ -1007,6 +1033,7 @@ export interface ContextBlock {
1007
1033
  export interface ContextCompactPayload {
1008
1034
  event: HookEvent;
1009
1035
  timestamp: ISODateTime;
1036
+ profile_id?: string;
1010
1037
  session_id?: string;
1011
1038
  session_name?: string;
1012
1039
  session_type?: string;
@@ -1043,6 +1070,7 @@ export interface ContextPostCompactPatch {
1043
1070
  export interface ContextPostCompactPayload {
1044
1071
  event: HookEvent;
1045
1072
  timestamp: ISODateTime;
1073
+ profile_id?: string;
1046
1074
  session_id?: string;
1047
1075
  session_name?: string;
1048
1076
  session_type?: string;
@@ -1072,6 +1100,7 @@ export interface ContextPreCompactPatch {
1072
1100
  export interface ContextPreCompactPayload {
1073
1101
  event: HookEvent;
1074
1102
  timestamp: ISODateTime;
1103
+ profile_id?: string;
1075
1104
  session_id?: string;
1076
1105
  session_name?: string;
1077
1106
  session_type?: string;
@@ -1114,6 +1143,7 @@ export type NetworkParticipationSpec = {
1114
1143
  bounds: NetworkParticipationBounds;
1115
1144
  };
1116
1145
  export interface CoordinatorContext {
1146
+ profile_id?: string;
1117
1147
  workspace_id?: string;
1118
1148
  workspace?: string;
1119
1149
  agent_name?: string;
@@ -1128,6 +1158,7 @@ export interface CoordinatorContext {
1128
1158
  export interface CoordinatorDecisionPayload {
1129
1159
  event: HookEvent;
1130
1160
  timestamp: ISODateTime;
1161
+ profile_id?: string;
1131
1162
  workspace_id?: string;
1132
1163
  workspace?: string;
1133
1164
  agent_name?: string;
@@ -1146,6 +1177,7 @@ export interface CoordinatorDecisionPayload {
1146
1177
  export interface CoordinatorFailedPayload {
1147
1178
  event: HookEvent;
1148
1179
  timestamp: ISODateTime;
1180
+ profile_id?: string;
1149
1181
  workspace_id?: string;
1150
1182
  workspace?: string;
1151
1183
  agent_name?: string;
@@ -1164,6 +1196,7 @@ export interface CoordinatorFailedPayload {
1164
1196
  export interface CoordinatorLifecyclePayload {
1165
1197
  event: HookEvent;
1166
1198
  timestamp: ISODateTime;
1199
+ profile_id?: string;
1167
1200
  workspace_id?: string;
1168
1201
  workspace?: string;
1169
1202
  agent_name?: string;
@@ -1185,6 +1218,7 @@ export interface CoordinatorObservationPatch {
1185
1218
  export interface CoordinatorPreSpawnPayload {
1186
1219
  event: HookEvent;
1187
1220
  timestamp: ISODateTime;
1221
+ profile_id?: string;
1188
1222
  workspace_id?: string;
1189
1223
  workspace?: string;
1190
1224
  agent_name?: string;
@@ -1209,6 +1243,7 @@ export interface CoordinatorSpawnPatch {
1209
1243
  export interface CoordinatorSpawnedPayload {
1210
1244
  event: HookEvent;
1211
1245
  timestamp: ISODateTime;
1246
+ profile_id?: string;
1212
1247
  workspace_id?: string;
1213
1248
  workspace?: string;
1214
1249
  agent_name?: string;
@@ -1227,6 +1262,7 @@ export interface CoordinatorSpawnedPayload {
1227
1262
  export interface CoordinatorStoppedPayload {
1228
1263
  event: HookEvent;
1229
1264
  timestamp: ISODateTime;
1265
+ profile_id?: string;
1230
1266
  workspace_id?: string;
1231
1267
  workspace?: string;
1232
1268
  agent_name?: string;
@@ -1332,12 +1368,33 @@ export interface DescribeNetworkParticipation {
1332
1368
  mode: string;
1333
1369
  channel_scopes?: string[];
1334
1370
  }
1371
+ export interface DescribeProfileDefaults {
1372
+ agent?: string;
1373
+ provider?: string;
1374
+ sandbox?: string;
1375
+ }
1376
+ export interface DescribeProfileCredential {
1377
+ provider: string;
1378
+ slot: string;
1379
+ }
1380
+ export interface DescribeProfile {
1381
+ name: string;
1382
+ color?: string;
1383
+ icon?: string;
1384
+ emoji?: string;
1385
+ defaults?: DescribeProfileDefaults;
1386
+ credentials?: DescribeProfileCredential[];
1387
+ }
1388
+ export interface DescribeResourcePath {
1389
+ path: string;
1390
+ profile?: string;
1391
+ }
1335
1392
  export interface DescribeResources {
1336
- skills?: string[];
1337
- loops?: string[];
1338
- agents?: string[];
1339
- automation?: string[];
1340
- layouts?: string[];
1393
+ skills?: DescribeResourcePath[];
1394
+ loops?: DescribeResourcePath[];
1395
+ agents?: DescribeResourcePath[];
1396
+ automation?: DescribeResourcePath[];
1397
+ layouts?: DescribeResourcePath[];
1341
1398
  cmd_palette?: CmdPaletteConfig;
1342
1399
  }
1343
1400
  export interface DescribeSubprocess {
@@ -1354,6 +1411,7 @@ export interface ExtensionCommandSpec {
1354
1411
  flags?: Record<string, string>;
1355
1412
  }
1356
1413
  export interface ExtensionToolRuntimeDescriptor {
1414
+ profile?: string;
1357
1415
  id: ToolID;
1358
1416
  handler: string;
1359
1417
  description?: string;
@@ -1369,9 +1427,14 @@ export interface ExtensionToolRuntimeDescriptor {
1369
1427
  capabilities?: string[];
1370
1428
  command?: ExtensionCommandSpec;
1371
1429
  }
1430
+ export interface DescribeHookEvent {
1431
+ event: HookEvent;
1432
+ profile?: string;
1433
+ }
1372
1434
  export interface ExtensionCommandGroupSpec {
1373
1435
  path: string;
1374
1436
  summary: string;
1437
+ profile?: string;
1375
1438
  }
1376
1439
  export interface DescribeSDKInfo {
1377
1440
  name: string;
@@ -1386,11 +1449,12 @@ export interface DescribePayload {
1386
1449
  provides: string[];
1387
1450
  permissions: string[];
1388
1451
  requires_env?: string[];
1452
+ profiles?: DescribeProfile[];
1389
1453
  resources: DescribeResources;
1390
1454
  subprocess: DescribeSubprocess;
1391
1455
  network_participation?: DescribeNetworkParticipation;
1392
1456
  tools?: ExtensionToolRuntimeDescriptor[];
1393
- hook_events?: string[];
1457
+ hook_events?: DescribeHookEvent[];
1394
1458
  watch_source_kinds?: string[];
1395
1459
  cmd_palette_views?: string[];
1396
1460
  command_groups?: ExtensionCommandGroupSpec[];
@@ -1407,6 +1471,7 @@ export interface EventPostRecordPatch {
1407
1471
  export interface EventPostRecordPayload {
1408
1472
  event: HookEvent;
1409
1473
  timestamp: ISODateTime;
1474
+ profile_id?: string;
1410
1475
  session_id?: string;
1411
1476
  session_name?: string;
1412
1477
  session_type?: string;
@@ -1431,6 +1496,7 @@ export interface EventPreRecordPatch {
1431
1496
  export interface EventPreRecordPayload {
1432
1497
  event: HookEvent;
1433
1498
  timestamp: ISODateTime;
1499
+ profile_id?: string;
1434
1500
  session_id?: string;
1435
1501
  session_name?: string;
1436
1502
  session_type?: string;
@@ -1455,6 +1521,7 @@ export interface EventRecordPatch {
1455
1521
  export interface EventRecordPayload {
1456
1522
  event: HookEvent;
1457
1523
  timestamp: ISODateTime;
1524
+ profile_id?: string;
1458
1525
  session_id?: string;
1459
1526
  session_name?: string;
1460
1527
  session_type?: string;
@@ -1858,6 +1925,7 @@ export type HookExecutorKind = "native" | "subprocess" | "wasm";
1858
1925
  export type HookSource = "native" | "config" | "extension" | "agent_definition" | "skill";
1859
1926
  export interface HookDecl {
1860
1927
  name: string;
1928
+ profile_id?: string;
1861
1929
  event: HookEvent;
1862
1930
  mode?: HookMode;
1863
1931
  matcher: HookMatcher;
@@ -1875,7 +1943,7 @@ export interface HookDecl {
1875
1943
  }
1876
1944
  export type HookEventFamily = "session" | "sandbox" | "input" | "prompt" | "event" | "automation" | "agent" | "turn" | "message" | "tool" | "permission" | "context" | "coordinator" | "task" | "task.run" | "loop" | "spawn" | "network" | "window_manager" | "worktree";
1877
1945
  export type HookRunOutcome = "applied" | "denied" | "failed" | "skipped" | "dropped" | "rejected";
1878
- export type HookSkillSource = "bundled" | "marketplace" | "user" | "additional" | "workspace";
1946
+ export type HookSkillSource = "bundled" | "marketplace" | "user" | "profile" | "additional" | "workspace" | "workspace_profile";
1879
1947
  export interface InboundAction {
1880
1948
  action_id: string;
1881
1949
  message_id?: string;
@@ -2032,6 +2100,7 @@ export interface InputAttachmentMetadata {
2032
2100
  export interface InputPreSubmitPayload {
2033
2101
  event: HookEvent;
2034
2102
  timestamp: ISODateTime;
2103
+ profile_id?: string;
2035
2104
  session_id?: string;
2036
2105
  session_name?: string;
2037
2106
  session_type?: string;
@@ -2068,6 +2137,7 @@ export interface ListLogsParams {
2068
2137
  limit?: number;
2069
2138
  }
2070
2139
  export interface LoopContext {
2140
+ profile_id?: string;
2071
2141
  loop_run_id?: string;
2072
2142
  parent_loop_run_id?: string;
2073
2143
  workspace_id?: string;
@@ -2093,6 +2163,7 @@ export interface LoopControlPatch {
2093
2163
  export interface LoopGatePostPayload {
2094
2164
  event: HookEvent;
2095
2165
  timestamp: ISODateTime;
2166
+ profile_id?: string;
2096
2167
  loop_run_id?: string;
2097
2168
  parent_loop_run_id?: string;
2098
2169
  workspace_id?: string;
@@ -2127,6 +2198,7 @@ export interface LoopGatePrePatch {
2127
2198
  export interface LoopGatePrePayload {
2128
2199
  event: HookEvent;
2129
2200
  timestamp: ISODateTime;
2201
+ profile_id?: string;
2130
2202
  loop_run_id?: string;
2131
2203
  parent_loop_run_id?: string;
2132
2204
  workspace_id?: string;
@@ -2158,6 +2230,7 @@ export type LoopGenerationOrigin = "initial" | "stop_when" | "reattempt" | "gate
2158
2230
  export interface LoopGenerationPostPayload {
2159
2231
  event: HookEvent;
2160
2232
  timestamp: ISODateTime;
2233
+ profile_id?: string;
2161
2234
  loop_run_id?: string;
2162
2235
  parent_loop_run_id?: string;
2163
2236
  workspace_id?: string;
@@ -2190,6 +2263,7 @@ export interface LoopGenerationPrePatch {
2190
2263
  export interface LoopGenerationPrePayload {
2191
2264
  event: HookEvent;
2192
2265
  timestamp: ISODateTime;
2266
+ profile_id?: string;
2193
2267
  loop_run_id?: string;
2194
2268
  parent_loop_run_id?: string;
2195
2269
  workspace_id?: string;
@@ -2218,6 +2292,7 @@ export interface LoopGenerationPrePayload {
2218
2292
  export interface LoopLifecyclePayload {
2219
2293
  event: HookEvent;
2220
2294
  timestamp: ISODateTime;
2295
+ profile_id?: string;
2221
2296
  loop_run_id?: string;
2222
2297
  parent_loop_run_id?: string;
2223
2298
  workspace_id?: string;
@@ -2243,6 +2318,7 @@ export interface LoopLifecyclePayload {
2243
2318
  export interface LoopNodeTerminalPayload {
2244
2319
  event: HookEvent;
2245
2320
  timestamp: ISODateTime;
2321
+ profile_id?: string;
2246
2322
  loop_run_id?: string;
2247
2323
  parent_loop_run_id?: string;
2248
2324
  workspace_id?: string;
@@ -2275,6 +2351,7 @@ export interface LoopObservationPatch {
2275
2351
  export interface LoopStartedPayload {
2276
2352
  event: HookEvent;
2277
2353
  timestamp: ISODateTime;
2354
+ profile_id?: string;
2278
2355
  loop_run_id?: string;
2279
2356
  parent_loop_run_id?: string;
2280
2357
  workspace_id?: string;
@@ -2300,6 +2377,7 @@ export interface LoopStartedPayload {
2300
2377
  export interface LoopTerminalPayload {
2301
2378
  event: HookEvent;
2302
2379
  timestamp: ISODateTime;
2380
+ profile_id?: string;
2303
2381
  loop_run_id?: string;
2304
2382
  parent_loop_run_id?: string;
2305
2383
  workspace_id?: string;
@@ -2322,7 +2400,7 @@ export interface LoopTerminalPayload {
2322
2400
  reason_code?: string;
2323
2401
  details?: JSONValue;
2324
2402
  }
2325
- export type MemoryScope = "global" | "workspace" | "agent";
2403
+ export type MemoryScope = "profile" | "workspace" | "agent";
2326
2404
  export interface MemoryForgetParams {
2327
2405
  key: string;
2328
2406
  scope?: MemoryScope;
@@ -2356,6 +2434,7 @@ export interface MessageDeltaPatch {
2356
2434
  export interface MessageDeltaPayload {
2357
2435
  event: HookEvent;
2358
2436
  timestamp: ISODateTime;
2437
+ profile_id?: string;
2359
2438
  session_id?: string;
2360
2439
  session_name?: string;
2361
2440
  session_type?: string;
@@ -2386,6 +2465,7 @@ export interface MessageEndPatch {
2386
2465
  export interface MessageEndPayload {
2387
2466
  event: HookEvent;
2388
2467
  timestamp: ISODateTime;
2468
+ profile_id?: string;
2389
2469
  session_id?: string;
2390
2470
  session_name?: string;
2391
2471
  session_type?: string;
@@ -2416,6 +2496,7 @@ export interface MessagePatch {
2416
2496
  export interface MessagePayload {
2417
2497
  event: HookEvent;
2418
2498
  timestamp: ISODateTime;
2499
+ profile_id?: string;
2419
2500
  session_id?: string;
2420
2501
  session_name?: string;
2421
2502
  session_type?: string;
@@ -2446,6 +2527,7 @@ export interface MessageStartPatch {
2446
2527
  export interface MessageStartPayload {
2447
2528
  event: HookEvent;
2448
2529
  timestamp: ISODateTime;
2530
+ profile_id?: string;
2449
2531
  session_id?: string;
2450
2532
  session_name?: string;
2451
2533
  session_type?: string;
@@ -2522,6 +2604,12 @@ export interface ModelsStatusParams {
2522
2604
  provider_id?: string;
2523
2605
  }
2524
2606
  export interface NetworkChannelPayload {
2607
+ profile_id: string;
2608
+ profile_name: string;
2609
+ profile_color?: string;
2610
+ profile_icon?: string;
2611
+ profile_emoji?: string;
2612
+ profile_archived?: boolean;
2525
2613
  channel: string;
2526
2614
  workspace_id?: string;
2527
2615
  purpose?: string;
@@ -2559,6 +2647,12 @@ export interface NetworkDirectResolveParams {
2559
2647
  peer_id: string;
2560
2648
  }
2561
2649
  export interface NetworkConversationMessagePayload {
2650
+ profile_id: string;
2651
+ profile_name: string;
2652
+ profile_color?: string;
2653
+ profile_icon?: string;
2654
+ profile_emoji?: string;
2655
+ profile_archived?: boolean;
2562
2656
  message_id: string;
2563
2657
  workspace_id?: string;
2564
2658
  channel: string;
@@ -2615,6 +2709,12 @@ export interface NetworkDirectRoomOpenedPayload {
2615
2709
  causation_id?: string;
2616
2710
  }
2617
2711
  export interface NetworkDirectRoomPayload {
2712
+ profile_id: string;
2713
+ profile_name: string;
2714
+ profile_color?: string;
2715
+ profile_icon?: string;
2716
+ profile_emoji?: string;
2717
+ profile_archived?: boolean;
2618
2718
  workspace_id?: string;
2619
2719
  channel: string;
2620
2720
  direct_id: string;
@@ -2914,6 +3014,12 @@ export interface NetworkCoordinationCostPayload {
2914
3014
  estimated_prompt_tokens?: number;
2915
3015
  }
2916
3016
  export interface NetworkThreadSummaryPayload {
3017
+ profile_id: string;
3018
+ profile_name: string;
3019
+ profile_color?: string;
3020
+ profile_icon?: string;
3021
+ profile_emoji?: string;
3022
+ profile_archived?: boolean;
2917
3023
  workspace_id?: string;
2918
3024
  channel: string;
2919
3025
  thread_id: string;
@@ -3052,6 +3158,12 @@ export interface NetworkWorkOpenedPayload {
3052
3158
  causation_id?: string;
3053
3159
  }
3054
3160
  export interface NetworkWorkPayload {
3161
+ profile_id: string;
3162
+ profile_name: string;
3163
+ profile_color?: string;
3164
+ profile_icon?: string;
3165
+ profile_emoji?: string;
3166
+ profile_archived?: boolean;
3055
3167
  work_id: string;
3056
3168
  workspace_id?: string;
3057
3169
  channel: string;
@@ -3259,6 +3371,7 @@ export interface PermissionToolCall {
3259
3371
  export interface PermissionDeniedPayload {
3260
3372
  event: HookEvent;
3261
3373
  timestamp: ISODateTime;
3374
+ profile_id?: string;
3262
3375
  session_id?: string;
3263
3376
  session_name?: string;
3264
3377
  session_type?: string;
@@ -3296,6 +3409,7 @@ export interface PermissionRequestPatch {
3296
3409
  export interface PermissionRequestPayload {
3297
3410
  event: HookEvent;
3298
3411
  timestamp: ISODateTime;
3412
+ profile_id?: string;
3299
3413
  session_id?: string;
3300
3414
  session_name?: string;
3301
3415
  session_type?: string;
@@ -3322,6 +3436,7 @@ export interface PermissionRequestPayload {
3322
3436
  export interface PermissionResolutionPayload {
3323
3437
  event: HookEvent;
3324
3438
  timestamp: ISODateTime;
3439
+ profile_id?: string;
3325
3440
  session_id?: string;
3326
3441
  session_name?: string;
3327
3442
  session_type?: string;
@@ -3348,6 +3463,7 @@ export type PermissionResolvedPatch = Record<string, never>;
3348
3463
  export interface PermissionResolvedPayload {
3349
3464
  event: HookEvent;
3350
3465
  timestamp: ISODateTime;
3466
+ profile_id?: string;
3351
3467
  session_id?: string;
3352
3468
  session_name?: string;
3353
3469
  session_type?: string;
@@ -3387,6 +3503,7 @@ export interface PromptPatch {
3387
3503
  export interface PromptPayload {
3388
3504
  event: HookEvent;
3389
3505
  timestamp: ISODateTime;
3506
+ profile_id?: string;
3390
3507
  session_id?: string;
3391
3508
  session_name?: string;
3392
3509
  session_type?: string;
@@ -3510,6 +3627,7 @@ export interface ResourcesSnapshotParams {
3510
3627
  }
3511
3628
  export interface Run {
3512
3629
  id: string;
3630
+ profile_id?: string;
3513
3631
  job_id?: string;
3514
3632
  trigger_id?: string;
3515
3633
  session_id?: string;
@@ -3587,6 +3705,7 @@ export interface SandboxProfilePayload {
3587
3705
  export interface SandboxPreparePayload {
3588
3706
  event: HookEvent;
3589
3707
  timestamp: ISODateTime;
3708
+ profile_id?: string;
3590
3709
  session_id?: string;
3591
3710
  session_name?: string;
3592
3711
  session_type?: string;
@@ -3617,6 +3736,7 @@ export type SandboxReadyPatch = Record<string, never>;
3617
3736
  export interface SandboxReadyPayload {
3618
3737
  event: HookEvent;
3619
3738
  timestamp: ISODateTime;
3739
+ profile_id?: string;
3620
3740
  session_id?: string;
3621
3741
  session_name?: string;
3622
3742
  session_type?: string;
@@ -3644,6 +3764,7 @@ export interface SandboxStopPatch {
3644
3764
  export interface SandboxStopPayload {
3645
3765
  event: HookEvent;
3646
3766
  timestamp: ISODateTime;
3767
+ profile_id?: string;
3647
3768
  session_id?: string;
3648
3769
  session_name?: string;
3649
3770
  session_type?: string;
@@ -3671,6 +3792,7 @@ export type SandboxSyncAfterPatch = Record<string, never>;
3671
3792
  export interface SandboxSyncAfterPayload {
3672
3793
  event: HookEvent;
3673
3794
  timestamp: ISODateTime;
3795
+ profile_id?: string;
3674
3796
  session_id?: string;
3675
3797
  session_name?: string;
3676
3798
  session_type?: string;
@@ -3704,6 +3826,7 @@ export interface SandboxSyncBeforePatch {
3704
3826
  export interface SandboxSyncBeforePayload {
3705
3827
  event: HookEvent;
3706
3828
  timestamp: ISODateTime;
3829
+ profile_id?: string;
3707
3830
  session_id?: string;
3708
3831
  session_name?: string;
3709
3832
  session_type?: string;
@@ -3731,6 +3854,7 @@ export interface SandboxSyncBeforePayload {
3731
3854
  export interface SessionAttentionChangedPayload {
3732
3855
  event: HookEvent;
3733
3856
  timestamp: ISODateTime;
3857
+ profile_id?: string;
3734
3858
  session_id?: string;
3735
3859
  session_name?: string;
3736
3860
  session_type?: string;
@@ -3751,6 +3875,7 @@ export interface SessionAttentionChangedPayload {
3751
3875
  }
3752
3876
  export type SessionAttentionObservationPatch = Record<string, never>;
3753
3877
  export interface SessionContext {
3878
+ profile_id?: string;
3754
3879
  session_id?: string;
3755
3880
  session_name?: string;
3756
3881
  session_type?: string;
@@ -3802,6 +3927,7 @@ export interface SessionHealthResponse {
3802
3927
  export interface SessionHealthUpdateAfterPayload {
3803
3928
  event: HookEvent;
3804
3929
  timestamp: ISODateTime;
3930
+ profile_id?: string;
3805
3931
  session_id?: string;
3806
3932
  session_name?: string;
3807
3933
  session_type?: string;
@@ -3891,6 +4017,7 @@ export interface SessionInspectResponse {
3891
4017
  export interface SessionLifecyclePayload {
3892
4018
  event: HookEvent;
3893
4019
  timestamp: ISODateTime;
4020
+ profile_id?: string;
3894
4021
  session_id?: string;
3895
4022
  session_name?: string;
3896
4023
  session_type?: string;
@@ -3908,6 +4035,7 @@ export interface SessionLifecyclePayload {
3908
4035
  export interface SessionMessagePersistedPayload {
3909
4036
  event: HookEvent;
3910
4037
  timestamp: ISODateTime;
4038
+ profile_id?: string;
3911
4039
  session_id?: string;
3912
4040
  session_name?: string;
3913
4041
  session_type?: string;
@@ -3945,6 +4073,7 @@ export interface SessionPostCreatePatch {
3945
4073
  export interface SessionPostCreatePayload {
3946
4074
  event: HookEvent;
3947
4075
  timestamp: ISODateTime;
4076
+ profile_id?: string;
3948
4077
  session_id?: string;
3949
4078
  session_name?: string;
3950
4079
  session_type?: string;
@@ -3971,6 +4100,7 @@ export interface SessionPostResumePatch {
3971
4100
  export interface SessionPostResumePayload {
3972
4101
  event: HookEvent;
3973
4102
  timestamp: ISODateTime;
4103
+ profile_id?: string;
3974
4104
  session_id?: string;
3975
4105
  session_name?: string;
3976
4106
  session_type?: string;
@@ -3997,6 +4127,7 @@ export interface SessionPostStopPatch {
3997
4127
  export interface SessionPostStopPayload {
3998
4128
  event: HookEvent;
3999
4129
  timestamp: ISODateTime;
4130
+ profile_id?: string;
4000
4131
  session_id?: string;
4001
4132
  session_name?: string;
4002
4133
  session_type?: string;
@@ -4014,6 +4145,7 @@ export interface SessionPostStopPayload {
4014
4145
  export interface SessionPreCreatePayload {
4015
4146
  event: HookEvent;
4016
4147
  timestamp: ISODateTime;
4148
+ profile_id?: string;
4017
4149
  session_id?: string;
4018
4150
  session_name?: string;
4019
4151
  session_type?: string;
@@ -4040,6 +4172,7 @@ export interface SessionPreResumePatch {
4040
4172
  export interface SessionPreResumePayload {
4041
4173
  event: HookEvent;
4042
4174
  timestamp: ISODateTime;
4175
+ profile_id?: string;
4043
4176
  session_id?: string;
4044
4177
  session_name?: string;
4045
4178
  session_type?: string;
@@ -4066,6 +4199,7 @@ export interface SessionPreStopPatch {
4066
4199
  export interface SessionPreStopPayload {
4067
4200
  event: HookEvent;
4068
4201
  timestamp: ISODateTime;
4202
+ profile_id?: string;
4069
4203
  session_id?: string;
4070
4204
  session_name?: string;
4071
4205
  session_type?: string;
@@ -4100,6 +4234,78 @@ export interface SessionRuntimeClearParams {
4100
4234
  session_id: string;
4101
4235
  expected_revision?: number;
4102
4236
  }
4237
+ export interface SessionRuntimeRecoveryExhaustedPayload {
4238
+ event: HookEvent;
4239
+ timestamp: ISODateTime;
4240
+ profile_id?: string;
4241
+ session_id?: string;
4242
+ session_name?: string;
4243
+ session_type?: string;
4244
+ agent_name?: string;
4245
+ workspace_id?: string;
4246
+ workspace?: string;
4247
+ worktree_id?: string;
4248
+ acp_session_id?: string;
4249
+ state?: string;
4250
+ soul_snapshot_id?: string;
4251
+ soul_digest?: string;
4252
+ created_at: ISODateTime;
4253
+ updated_at: ISODateTime;
4254
+ turn_id?: string;
4255
+ attempt: number;
4256
+ max_attempts: number;
4257
+ generation: number;
4258
+ failure_kind?: string;
4259
+ failure_detail?: string;
4260
+ }
4261
+ export interface SessionRuntimeRecoveryStartedPayload {
4262
+ event: HookEvent;
4263
+ timestamp: ISODateTime;
4264
+ profile_id?: string;
4265
+ session_id?: string;
4266
+ session_name?: string;
4267
+ session_type?: string;
4268
+ agent_name?: string;
4269
+ workspace_id?: string;
4270
+ workspace?: string;
4271
+ worktree_id?: string;
4272
+ acp_session_id?: string;
4273
+ state?: string;
4274
+ soul_snapshot_id?: string;
4275
+ soul_digest?: string;
4276
+ created_at: ISODateTime;
4277
+ updated_at: ISODateTime;
4278
+ turn_id?: string;
4279
+ attempt: number;
4280
+ max_attempts: number;
4281
+ generation: number;
4282
+ failure_kind?: string;
4283
+ failure_detail?: string;
4284
+ }
4285
+ export interface SessionRuntimeRecoverySucceededPayload {
4286
+ event: HookEvent;
4287
+ timestamp: ISODateTime;
4288
+ profile_id?: string;
4289
+ session_id?: string;
4290
+ session_name?: string;
4291
+ session_type?: string;
4292
+ agent_name?: string;
4293
+ workspace_id?: string;
4294
+ workspace?: string;
4295
+ worktree_id?: string;
4296
+ acp_session_id?: string;
4297
+ state?: string;
4298
+ soul_snapshot_id?: string;
4299
+ soul_digest?: string;
4300
+ created_at: ISODateTime;
4301
+ updated_at: ISODateTime;
4302
+ turn_id?: string;
4303
+ attempt: number;
4304
+ max_attempts: number;
4305
+ generation: number;
4306
+ failure_kind?: string;
4307
+ failure_detail?: string;
4308
+ }
4103
4309
  export interface SessionRuntimeSelectionPayload {
4104
4310
  provider: string;
4105
4311
  model?: string;
@@ -4124,6 +4330,15 @@ export interface SessionSoulRefreshRequest {
4124
4330
  }
4125
4331
  export type SessionRuntimeStatus = string;
4126
4332
  export type SessionRuntimeTransition = string;
4333
+ export interface SessionRuntimeRecoveryPayload {
4334
+ attempt: number;
4335
+ max_attempts: number;
4336
+ generation: number;
4337
+ started_at: ISODateTime;
4338
+ last_attempt_at: ISODateTime;
4339
+ next_attempt_at?: ISODateTime;
4340
+ last_error?: string;
4341
+ }
4127
4342
  export type ResolutionStatus = string;
4128
4343
  export type ResolutionReason = string;
4129
4344
  export interface Resolution {
@@ -4163,6 +4378,8 @@ export interface SessionRuntimePayload {
4163
4378
  status: SessionRuntimeStatus;
4164
4379
  transition?: SessionRuntimeTransition;
4165
4380
  failure?: string;
4381
+ generation?: number;
4382
+ recovery?: SessionRuntimeRecoveryPayload;
4166
4383
  selected?: PromptRuntimeSelectionPayload;
4167
4384
  selection_revision: number;
4168
4385
  effective?: RuntimeSelectionPayload;
@@ -4274,6 +4491,7 @@ export interface SkillSummary {
4274
4491
  name: string;
4275
4492
  description?: string;
4276
4493
  source: string;
4494
+ origin: string;
4277
4495
  enabled: boolean;
4278
4496
  activation: SkillActivationPayload;
4279
4497
  }
@@ -4282,6 +4500,7 @@ export interface SkillsListParams {
4282
4500
  for_agent?: string;
4283
4501
  }
4284
4502
  export interface SpawnContext {
4503
+ profile_id?: string;
4285
4504
  parent_session_id?: string;
4286
4505
  root_session_id?: string;
4287
4506
  child_session_id?: string;
@@ -4311,6 +4530,7 @@ export interface SpawnCreatePatch {
4311
4530
  export interface SpawnCreatedPayload {
4312
4531
  event: HookEvent;
4313
4532
  timestamp: ISODateTime;
4533
+ profile_id?: string;
4314
4534
  parent_session_id?: string;
4315
4535
  root_session_id?: string;
4316
4536
  child_session_id?: string;
@@ -4337,6 +4557,7 @@ export interface SpawnCreatedPayload {
4337
4557
  export interface SpawnLifecyclePayload {
4338
4558
  event: HookEvent;
4339
4559
  timestamp: ISODateTime;
4560
+ profile_id?: string;
4340
4561
  parent_session_id?: string;
4341
4562
  root_session_id?: string;
4342
4563
  child_session_id?: string;
@@ -4366,6 +4587,7 @@ export interface SpawnObservationPatch {
4366
4587
  export interface SpawnParentStoppedPayload {
4367
4588
  event: HookEvent;
4368
4589
  timestamp: ISODateTime;
4590
+ profile_id?: string;
4369
4591
  parent_session_id?: string;
4370
4592
  root_session_id?: string;
4371
4593
  child_session_id?: string;
@@ -4392,6 +4614,7 @@ export interface SpawnParentStoppedPayload {
4392
4614
  export interface SpawnPreCreatePayload {
4393
4615
  event: HookEvent;
4394
4616
  timestamp: ISODateTime;
4617
+ profile_id?: string;
4395
4618
  parent_session_id?: string;
4396
4619
  root_session_id?: string;
4397
4620
  child_session_id?: string;
@@ -4417,6 +4640,7 @@ export interface SpawnPreCreatePayload {
4417
4640
  export interface SpawnReapedPayload {
4418
4641
  event: HookEvent;
4419
4642
  timestamp: ISODateTime;
4643
+ profile_id?: string;
4420
4644
  parent_session_id?: string;
4421
4645
  root_session_id?: string;
4422
4646
  child_session_id?: string;
@@ -4443,6 +4667,7 @@ export interface SpawnReapedPayload {
4443
4667
  export interface SpawnTTLExpiredPayload {
4444
4668
  event: HookEvent;
4445
4669
  timestamp: ISODateTime;
4670
+ profile_id?: string;
4446
4671
  parent_session_id?: string;
4447
4672
  root_session_id?: string;
4448
4673
  child_session_id?: string;
@@ -4487,8 +4712,21 @@ export interface Origin {
4487
4712
  kind: OriginKind;
4488
4713
  ref: string;
4489
4714
  }
4715
+ export type LoopProvenanceRole = "coordinator" | "cell";
4716
+ export interface LoopProvenance {
4717
+ run_id: string;
4718
+ loop_name?: string;
4719
+ role: LoopProvenanceRole;
4720
+ generation?: number;
4721
+ node_id?: string;
4722
+ item_index?: number;
4723
+ }
4490
4724
  export interface Task {
4491
4725
  id: string;
4726
+ profile_id: string;
4727
+ profile_name: string;
4728
+ profile_color?: string;
4729
+ profile_icon?: string;
4492
4730
  identifier?: string;
4493
4731
  scope: Scope;
4494
4732
  workspace_id?: string;
@@ -4524,10 +4762,12 @@ export interface Task {
4524
4762
  updated_at: ISODateTime;
4525
4763
  closed_at?: ISODateTime;
4526
4764
  metadata?: JSONValue;
4765
+ loop?: LoopProvenance;
4527
4766
  }
4528
4767
  export interface TaskBlockedPayload {
4529
4768
  event: HookEvent;
4530
4769
  timestamp: ISODateTime;
4770
+ profile_id?: string;
4531
4771
  task_id?: string;
4532
4772
  parent_task_id?: string;
4533
4773
  workspace_id?: string;
@@ -4555,6 +4795,7 @@ export interface TaskCancelParams {
4555
4795
  metadata?: JSONValue;
4556
4796
  }
4557
4797
  export interface TaskContext {
4798
+ profile_id?: string;
4558
4799
  task_id?: string;
4559
4800
  parent_task_id?: string;
4560
4801
  workspace_id?: string;
@@ -4796,6 +5037,10 @@ export interface TaskRunSummaryPayload {
4796
5037
  }
4797
5038
  export interface TaskSummaryPayload {
4798
5039
  id: string;
5040
+ profile_id: string;
5041
+ profile_name: string;
5042
+ profile_color?: string;
5043
+ profile_icon?: string;
4799
5044
  identifier?: string;
4800
5045
  scope: Scope;
4801
5046
  workspace_id?: string;
@@ -4843,6 +5088,10 @@ export interface TaskDependencyPayload {
4843
5088
  }
4844
5089
  export interface TaskRun {
4845
5090
  id: string;
5091
+ profile_id?: string;
5092
+ profile_name?: string;
5093
+ profile_color?: string;
5094
+ profile_icon?: string;
4846
5095
  task_id: string;
4847
5096
  status: RunStatus;
4848
5097
  attempt: number;
@@ -4994,6 +5243,7 @@ export interface TaskInboxParams {
4994
5243
  export interface TaskNeedsAttentionPayload {
4995
5244
  event: HookEvent;
4996
5245
  timestamp: ISODateTime;
5246
+ profile_id?: string;
4997
5247
  task_id?: string;
4998
5248
  parent_task_id?: string;
4999
5249
  workspace_id?: string;
@@ -5018,6 +5268,7 @@ export interface TaskObservationPatch {
5018
5268
  export interface TaskRecoveredPayload {
5019
5269
  event: HookEvent;
5020
5270
  timestamp: ISODateTime;
5271
+ profile_id?: string;
5021
5272
  task_id?: string;
5022
5273
  parent_task_id?: string;
5023
5274
  workspace_id?: string;
@@ -5063,6 +5314,7 @@ export interface TaskRunCompleteParams {
5063
5314
  export interface TaskRunCompletedPayload {
5064
5315
  event: HookEvent;
5065
5316
  timestamp: ISODateTime;
5317
+ profile_id?: string;
5066
5318
  task_id?: string;
5067
5319
  run_id?: string;
5068
5320
  run_kind?: string;
@@ -5093,6 +5345,7 @@ export interface TaskRunCompletedPayload {
5093
5345
  recovery_reason?: string;
5094
5346
  }
5095
5347
  export interface TaskRunContext {
5348
+ profile_id?: string;
5096
5349
  task_id?: string;
5097
5350
  run_id?: string;
5098
5351
  run_kind?: string;
@@ -5169,6 +5422,7 @@ export interface TaskRunEnqueueParams {
5169
5422
  export interface TaskRunEnqueuedPayload {
5170
5423
  event: HookEvent;
5171
5424
  timestamp: ISODateTime;
5425
+ profile_id?: string;
5172
5426
  task_id?: string;
5173
5427
  run_id?: string;
5174
5428
  run_kind?: string;
@@ -5203,6 +5457,7 @@ export interface TaskRunFailParams {
5203
5457
  export interface TaskRunFailedPayload {
5204
5458
  event: HookEvent;
5205
5459
  timestamp: ISODateTime;
5460
+ profile_id?: string;
5206
5461
  task_id?: string;
5207
5462
  run_id?: string;
5208
5463
  run_kind?: string;
@@ -5238,6 +5493,7 @@ export interface TaskRunGetParams {
5238
5493
  export interface TaskRunLeaseExpiredPayload {
5239
5494
  event: HookEvent;
5240
5495
  timestamp: ISODateTime;
5496
+ profile_id?: string;
5241
5497
  task_id?: string;
5242
5498
  run_id?: string;
5243
5499
  run_kind?: string;
@@ -5270,6 +5526,7 @@ export interface TaskRunLeaseExpiredPayload {
5270
5526
  export interface TaskRunLeaseExtendedPayload {
5271
5527
  event: HookEvent;
5272
5528
  timestamp: ISODateTime;
5529
+ profile_id?: string;
5273
5530
  task_id?: string;
5274
5531
  run_id?: string;
5275
5532
  run_kind?: string;
@@ -5302,6 +5559,7 @@ export interface TaskRunLeaseExtendedPayload {
5302
5559
  export interface TaskRunLeasePayload {
5303
5560
  event: HookEvent;
5304
5561
  timestamp: ISODateTime;
5562
+ profile_id?: string;
5305
5563
  task_id?: string;
5306
5564
  run_id?: string;
5307
5565
  run_kind?: string;
@@ -5334,6 +5592,7 @@ export interface TaskRunLeasePayload {
5334
5592
  export interface TaskRunLeaseRecoveredPayload {
5335
5593
  event: HookEvent;
5336
5594
  timestamp: ISODateTime;
5595
+ profile_id?: string;
5337
5596
  task_id?: string;
5338
5597
  run_id?: string;
5339
5598
  run_kind?: string;
@@ -5369,6 +5628,7 @@ export interface TaskRunObservationPatch {
5369
5628
  export interface TaskRunPostClaimPayload {
5370
5629
  event: HookEvent;
5371
5630
  timestamp: ISODateTime;
5631
+ profile_id?: string;
5372
5632
  task_id?: string;
5373
5633
  run_id?: string;
5374
5634
  run_kind?: string;
@@ -5404,6 +5664,7 @@ export interface TaskRunPreClaimPatch {
5404
5664
  export interface TaskRunPreClaimPayload {
5405
5665
  event: HookEvent;
5406
5666
  timestamp: ISODateTime;
5667
+ profile_id?: string;
5407
5668
  task_id?: string;
5408
5669
  run_id?: string;
5409
5670
  run_kind?: string;
@@ -5435,6 +5696,7 @@ export interface TaskRunPreClaimPayload {
5435
5696
  export interface TaskRunReleasedPayload {
5436
5697
  event: HookEvent;
5437
5698
  timestamp: ISODateTime;
5699
+ profile_id?: string;
5438
5700
  task_id?: string;
5439
5701
  run_id?: string;
5440
5702
  run_kind?: string;
@@ -5478,6 +5740,7 @@ export interface TaskRunsParams {
5478
5740
  export interface TaskStatusChangedPayload {
5479
5741
  event: HookEvent;
5480
5742
  timestamp: ISODateTime;
5743
+ profile_id?: string;
5481
5744
  task_id?: string;
5482
5745
  parent_task_id?: string;
5483
5746
  workspace_id?: string;
@@ -5504,6 +5767,7 @@ export interface TaskTimelineItem {
5504
5767
  task: TaskReferencePayload;
5505
5768
  run?: TaskRunSummaryPayload;
5506
5769
  event_type: string;
5770
+ reason?: string;
5507
5771
  actor: ActorIdentity;
5508
5772
  origin: Origin;
5509
5773
  payload?: JSONValue;
@@ -5532,6 +5796,7 @@ export interface TaskTreeParams {
5532
5796
  export interface TaskUnblockedPayload {
5533
5797
  event: HookEvent;
5534
5798
  timestamp: ISODateTime;
5799
+ profile_id?: string;
5535
5800
  task_id?: string;
5536
5801
  parent_task_id?: string;
5537
5802
  workspace_id?: string;
@@ -5573,6 +5838,8 @@ export interface TasksParams {
5573
5838
  status?: Status;
5574
5839
  priority?: Priority;
5575
5840
  include_drafts?: boolean;
5841
+ include_loop?: boolean;
5842
+ loop_run_id?: string;
5576
5843
  approval_state?: ApprovalState;
5577
5844
  owner_kind?: OwnerKind;
5578
5845
  owner_ref?: string;
@@ -5586,6 +5853,10 @@ export interface TasksParams {
5586
5853
  }
5587
5854
  export interface TaskCatalogItemPayload {
5588
5855
  id: string;
5856
+ profile_id: string;
5857
+ profile_name: string;
5858
+ profile_color?: string;
5859
+ profile_icon?: string;
5589
5860
  identifier?: string;
5590
5861
  scope: Scope;
5591
5862
  workspace_id?: string;
@@ -5616,6 +5887,7 @@ export interface TaskCatalogItemPayload {
5616
5887
  dependency_count?: number;
5617
5888
  active_run?: TaskCatalogRunPayload;
5618
5889
  last_activity_at?: ISODateTime;
5890
+ loop?: LoopProvenance;
5619
5891
  }
5620
5892
  export interface TaskCatalogStatusFacetPayload {
5621
5893
  status: Status;
@@ -5652,6 +5924,7 @@ export interface SourceRef {
5652
5924
  raw_tool_name?: string;
5653
5925
  resource_id?: string;
5654
5926
  resource_version?: string;
5927
+ profile_id?: string;
5655
5928
  workspace_id?: string;
5656
5929
  scope?: string;
5657
5930
  }
@@ -5696,6 +5969,7 @@ export interface ToolCallRef {
5696
5969
  export interface ToolPostCallPayload {
5697
5970
  event: HookEvent;
5698
5971
  timestamp: ISODateTime;
5972
+ profile_id?: string;
5699
5973
  session_id?: string;
5700
5974
  session_name?: string;
5701
5975
  session_type?: string;
@@ -5727,6 +6001,7 @@ export interface ToolPostErrorPatch {
5727
6001
  export interface ToolPostErrorPayload {
5728
6002
  event: HookEvent;
5729
6003
  timestamp: ISODateTime;
6004
+ profile_id?: string;
5730
6005
  session_id?: string;
5731
6006
  session_name?: string;
5732
6007
  session_type?: string;
@@ -5751,6 +6026,7 @@ export interface ToolPostErrorPayload {
5751
6026
  export interface ToolPreCallPayload {
5752
6027
  event: HookEvent;
5753
6028
  timestamp: ISODateTime;
6029
+ profile_id?: string;
5754
6030
  session_id?: string;
5755
6031
  session_name?: string;
5756
6032
  session_type?: string;
@@ -5792,6 +6068,7 @@ export interface TurnEndPatch {
5792
6068
  export interface TurnEndPayload {
5793
6069
  event: HookEvent;
5794
6070
  timestamp: ISODateTime;
6071
+ profile_id?: string;
5795
6072
  session_id?: string;
5796
6073
  session_name?: string;
5797
6074
  session_type?: string;
@@ -5817,6 +6094,7 @@ export interface TurnPatch {
5817
6094
  export interface TurnPayload {
5818
6095
  event: HookEvent;
5819
6096
  timestamp: ISODateTime;
6097
+ profile_id?: string;
5820
6098
  session_id?: string;
5821
6099
  session_name?: string;
5822
6100
  session_type?: string;
@@ -5842,6 +6120,7 @@ export interface TurnStartPatch {
5842
6120
  export interface TurnStartPayload {
5843
6121
  event: HookEvent;
5844
6122
  timestamp: ISODateTime;
6123
+ profile_id?: string;
5845
6124
  session_id?: string;
5846
6125
  session_name?: string;
5847
6126
  session_type?: string;
@@ -5859,8 +6138,14 @@ export interface TurnStartPayload {
5859
6138
  input_class?: string;
5860
6139
  user_message?: string;
5861
6140
  }
6141
+ export type ProfileLensID = string;
6142
+ export interface ProfileLens {
6143
+ profile_lens_id: ProfileLensID;
6144
+ profile_name: string;
6145
+ }
5862
6146
  export interface ViewCloseRequest {
5863
6147
  view_session: string;
6148
+ profile_lens: ProfileLens;
5864
6149
  reason?: string;
5865
6150
  }
5866
6151
  export interface ViewEvent {
@@ -6070,6 +6355,7 @@ export type ClientID = string;
6070
6355
  export interface ViewOpenRequest {
6071
6356
  view_session: string;
6072
6357
  view: string;
6358
+ profile_lens: ProfileLens;
6073
6359
  workspace: WorkspaceID;
6074
6360
  client: ClientID;
6075
6361
  args?: Record<string, JSONValue>;
@@ -6186,6 +6472,7 @@ export type WorktreeObservationPatch = Record<string, never>;
6186
6472
  export interface WorktreeObservationPayload {
6187
6473
  event: HookEvent;
6188
6474
  timestamp: ISODateTime;
6475
+ profile_id?: string;
6189
6476
  worktree_id: string;
6190
6477
  workspace_id: string;
6191
6478
  workspace_root?: string;
@@ -6198,6 +6485,7 @@ export interface WorktreeObservationPayload {
6198
6485
  export interface WorktreePreCreatePayload {
6199
6486
  event: HookEvent;
6200
6487
  timestamp: ISODateTime;
6488
+ profile_id?: string;
6201
6489
  worktree_id: string;
6202
6490
  workspace_id: string;
6203
6491
  workspace_root?: string;
@@ -6210,6 +6498,7 @@ export interface WorktreePreCreatePayload {
6210
6498
  deny_reason?: string;
6211
6499
  }
6212
6500
  export interface WorktreeContext {
6501
+ profile_id?: string;
6213
6502
  worktree_id: string;
6214
6503
  workspace_id: string;
6215
6504
  workspace_root?: string;
@@ -6243,6 +6532,9 @@ export interface HookPayloadByEvent {
6243
6532
  "session.pre_stop": SessionPreStopPayload;
6244
6533
  "session.post_stop": SessionPostStopPayload;
6245
6534
  "session.message_persisted": SessionMessagePersistedPayload;
6535
+ "session.runtime_recovery.started": SessionRuntimeRecoveryStartedPayload;
6536
+ "session.runtime_recovery.succeeded": SessionRuntimeRecoverySucceededPayload;
6537
+ "session.runtime_recovery.exhausted": SessionRuntimeRecoveryExhaustedPayload;
6246
6538
  "sandbox.prepare": SandboxPreparePayload;
6247
6539
  "sandbox.ready": SandboxReadyPayload;
6248
6540
  "sandbox.sync.before": SandboxSyncBeforePayload;
@@ -6346,6 +6638,9 @@ export interface HookPatchByEvent {
6346
6638
  "session.pre_stop": SessionPreStopPatch;
6347
6639
  "session.post_stop": SessionPostStopPatch;
6348
6640
  "session.message_persisted": AuthoredContextObservationPatch;
6641
+ "session.runtime_recovery.started": AuthoredContextObservationPatch;
6642
+ "session.runtime_recovery.succeeded": AuthoredContextObservationPatch;
6643
+ "session.runtime_recovery.exhausted": AuthoredContextObservationPatch;
6349
6644
  "sandbox.prepare": SandboxPreparePatch;
6350
6645
  "sandbox.ready": SandboxReadyPatch;
6351
6646
  "sandbox.sync.before": SandboxSyncBeforePatch;