@compozy/client 0.4.8 → 0.5.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.
@@ -21,44 +21,106 @@ class HeyApiRegistry {
21
21
  this.instances.set(key ?? this.defaultKey, value);
22
22
  }
23
23
  }
24
- export class agent extends HeyApiClient {
24
+ export class agents extends HeyApiClient {
25
25
  /**
26
- * Return the bounded calling-agent situation context
26
+ * List agent instances
27
27
  */
28
- getAgentContext(options) {
29
- return (options.client ?? this.client).get({
28
+ listAgentInstances(options) {
29
+ return (options?.client ?? this.client).get({
30
30
  responseStyle: "data",
31
- url: "/api/agent/context",
31
+ url: "/api/agent-instances",
32
32
  ...options,
33
33
  });
34
34
  }
35
35
  /**
36
- * Read resolved coordinator config for the calling agent workspace
36
+ * Create an always-on agent instance
37
37
  */
38
- getAgentCoordinatorConfig(options) {
38
+ createAgentInstance(options) {
39
+ return (options.client ?? this.client).post({
40
+ responseStyle: "data",
41
+ url: "/api/agent-instances",
42
+ ...options,
43
+ headers: {
44
+ "Content-Type": "application/json",
45
+ ...options.headers,
46
+ },
47
+ });
48
+ }
49
+ /**
50
+ * Adopt a root session as an instance
51
+ */
52
+ adoptAgentInstance(options) {
53
+ return (options.client ?? this.client).post({
54
+ responseStyle: "data",
55
+ url: "/api/agent-instances/adopt",
56
+ ...options,
57
+ headers: {
58
+ "Content-Type": "application/json",
59
+ ...options.headers,
60
+ },
61
+ });
62
+ }
63
+ /**
64
+ * Archive an agent instance
65
+ */
66
+ archiveAgentInstance(options) {
67
+ return (options.client ?? this.client).delete({
68
+ responseStyle: "data",
69
+ url: "/api/agent-instances/{id}",
70
+ ...options,
71
+ });
72
+ }
73
+ /**
74
+ * Get an agent instance
75
+ */
76
+ getAgentInstance(options) {
39
77
  return (options.client ?? this.client).get({
40
78
  responseStyle: "data",
41
- url: "/api/agent/coordinator/config",
79
+ url: "/api/agent-instances/{id}",
42
80
  ...options,
43
81
  });
44
82
  }
45
83
  /**
46
- * Resolve the calling agent session
84
+ * Update instance checks
47
85
  */
48
- getAgentMe(options) {
86
+ updateAgentInstance(options) {
87
+ return (options.client ?? this.client).patch({
88
+ responseStyle: "data",
89
+ url: "/api/agent-instances/{id}",
90
+ ...options,
91
+ headers: {
92
+ "Content-Type": "application/json",
93
+ ...options.headers,
94
+ },
95
+ });
96
+ }
97
+ /**
98
+ * Read the operator's instance away digest
99
+ */
100
+ getAgentInstanceAway(options) {
49
101
  return (options.client ?? this.client).get({
50
102
  responseStyle: "data",
51
- url: "/api/agent/me",
103
+ url: "/api/agent-instances/{id}/away",
52
104
  ...options,
53
105
  });
54
106
  }
55
107
  /**
56
- * Notify live operator clients from the calling agent
108
+ * Mark the instance seen by the local operator
57
109
  */
58
- notifyOperator(options) {
110
+ markAgentInstanceSeen(options) {
59
111
  return (options.client ?? this.client).post({
60
112
  responseStyle: "data",
61
- url: "/api/agent/notify",
113
+ url: "/api/agent-instances/{id}/away",
114
+ ...options,
115
+ });
116
+ }
117
+ /**
118
+ * Check an agent instance
119
+ */
120
+ checkAgentInstance(options) {
121
+ return (options.client ?? this.client).post({
122
+ responseStyle: "data",
123
+ url: "/api/agent-instances/{id}/check",
62
124
  ...options,
63
125
  headers: {
64
126
  "Content-Type": "application/json",
@@ -67,22 +129,92 @@ export class agent extends HeyApiClient {
67
129
  });
68
130
  }
69
131
  /**
70
- * Inspect the resolved Soul read model for the calling agent
132
+ * List instance wake events
71
133
  */
72
- getAgentSoul(options) {
134
+ listAgentInstanceCheckIns(options) {
73
135
  return (options.client ?? this.client).get({
74
136
  responseStyle: "data",
75
- url: "/api/agent/soul",
137
+ url: "/api/agent-instances/{id}/check-ins",
76
138
  ...options,
77
139
  });
78
140
  }
79
141
  /**
80
- * Validate a proposed Soul body or the calling agent's current Soul
142
+ * Ensure the main session exists
81
143
  */
82
- validateAgentSoul(options) {
144
+ ensureAgentInstanceMain(options) {
83
145
  return (options.client ?? this.client).post({
84
146
  responseStyle: "data",
85
- url: "/api/agent/soul/validate",
147
+ url: "/api/agent-instances/{id}/ensure-main",
148
+ ...options,
149
+ });
150
+ }
151
+ /**
152
+ * Read an instance check occurrence
153
+ */
154
+ getAgentInstanceOccurrence(options) {
155
+ return (options.client ?? this.client).get({
156
+ responseStyle: "data",
157
+ url: "/api/agent-instances/{id}/occurrences/{occurrence}",
158
+ ...options,
159
+ });
160
+ }
161
+ /**
162
+ * Pause an agent instance
163
+ */
164
+ pauseAgentInstance(options) {
165
+ return (options.client ?? this.client).post({
166
+ responseStyle: "data",
167
+ url: "/api/agent-instances/{id}/pause",
168
+ ...options,
169
+ });
170
+ }
171
+ /**
172
+ * List durable instance reports
173
+ */
174
+ listAgentInstanceReports(options) {
175
+ return (options.client ?? this.client).get({
176
+ responseStyle: "data",
177
+ url: "/api/agent-instances/{id}/reports",
178
+ ...options,
179
+ });
180
+ }
181
+ /**
182
+ * Resume an agent instance
183
+ */
184
+ resumeAgentInstance(options) {
185
+ return (options.client ?? this.client).post({
186
+ responseStyle: "data",
187
+ url: "/api/agent-instances/{id}/resume",
188
+ ...options,
189
+ });
190
+ }
191
+ /**
192
+ * List agent skill reviews (experimental)
193
+ */
194
+ listAgentSkillReviews(options) {
195
+ return (options?.client ?? this.client).get({
196
+ responseStyle: "data",
197
+ url: "/api/agent-skill-reviews",
198
+ ...options,
199
+ });
200
+ }
201
+ /**
202
+ * Read exact proposed skill contents (experimental)
203
+ */
204
+ getAgentSkillReview(options) {
205
+ return (options.client ?? this.client).get({
206
+ responseStyle: "data",
207
+ url: "/api/agent-skill-reviews/{id}",
208
+ ...options,
209
+ });
210
+ }
211
+ /**
212
+ * Decide a skill review as the operator (experimental)
213
+ */
214
+ approveAgentSkillReview(options) {
215
+ return (options.client ?? this.client).post({
216
+ responseStyle: "data",
217
+ url: "/api/agent-skill-reviews/{id}/approve",
86
218
  ...options,
87
219
  headers: {
88
220
  "Content-Type": "application/json",
@@ -91,12 +223,12 @@ export class agent extends HeyApiClient {
91
223
  });
92
224
  }
93
225
  /**
94
- * Spawn a narrowed child session for the calling agent
226
+ * Decide a skill review as the operator (experimental)
95
227
  */
96
- spawnAgentSession(options) {
228
+ rejectAgentSkillReview(options) {
97
229
  return (options.client ?? this.client).post({
98
230
  responseStyle: "data",
99
- url: "/api/agent/spawn",
231
+ url: "/api/agent-skill-reviews/{id}/reject",
100
232
  ...options,
101
233
  headers: {
102
234
  "Content-Type": "application/json",
@@ -105,12 +237,22 @@ export class agent extends HeyApiClient {
105
237
  });
106
238
  }
107
239
  /**
108
- * Atomically claim the next matching task run for the calling agent
240
+ * List all readable agent definitions, optionally resolved for a workspace
109
241
  */
110
- claimNextAgentTask(options) {
242
+ listAgents(options) {
243
+ return (options?.client ?? this.client).get({
244
+ responseStyle: "data",
245
+ url: "/api/agents",
246
+ ...options,
247
+ });
248
+ }
249
+ /**
250
+ * Create a global or workspace-local AGENT.md definition
251
+ */
252
+ createAgent(options) {
111
253
  return (options.client ?? this.client).post({
112
254
  responseStyle: "data",
113
- url: "/api/agent/tasks/claim-next",
255
+ url: "/api/agents",
114
256
  ...options,
115
257
  headers: {
116
258
  "Content-Type": "application/json",
@@ -119,12 +261,32 @@ export class agent extends HeyApiClient {
119
261
  });
120
262
  }
121
263
  /**
122
- * Complete a claimed task run for the calling agent
264
+ * List a filtered agent fleet with exact session metrics
123
265
  */
124
- completeAgentTaskRun(options) {
266
+ listAgentsAggregate(options) {
267
+ return (options?.client ?? this.client).get({
268
+ responseStyle: "data",
269
+ url: "/api/agents/aggregate",
270
+ ...options,
271
+ });
272
+ }
273
+ /**
274
+ * List a filtered agent fleet with exact session metrics
275
+ */
276
+ listAgentCatalog(options) {
277
+ return (options?.client ?? this.client).get({
278
+ responseStyle: "data",
279
+ url: "/api/agents/catalog",
280
+ ...options,
281
+ });
282
+ }
283
+ /**
284
+ * Draft agent instructions without saving a definition
285
+ */
286
+ draftAgentInstructions(options) {
125
287
  return (options.client ?? this.client).post({
126
288
  responseStyle: "data",
127
- url: "/api/agent/tasks/{run_id}/complete",
289
+ url: "/api/agents/draft-instructions",
128
290
  ...options,
129
291
  headers: {
130
292
  "Content-Type": "application/json",
@@ -133,12 +295,56 @@ export class agent extends HeyApiClient {
133
295
  });
134
296
  }
135
297
  /**
136
- * Fail a claimed task run for the calling agent
298
+ * Durably delete one effective authored agent definition
137
299
  */
138
- failAgentTaskRun(options) {
300
+ deleteAgent(options) {
301
+ return (options.client ?? this.client).delete({
302
+ responseStyle: "data",
303
+ url: "/api/agents/{name}",
304
+ ...options,
305
+ });
306
+ }
307
+ /**
308
+ * Get one agent definition by name, optionally resolved for a workspace
309
+ */
310
+ getAgent(options) {
311
+ return (options.client ?? this.client).get({
312
+ responseStyle: "data",
313
+ url: "/api/agents/{name}",
314
+ ...options,
315
+ });
316
+ }
317
+ /**
318
+ * Replace one effective AGENT.md definition with digest CAS
319
+ */
320
+ updateAgent(options) {
321
+ return (options.client ?? this.client).put({
322
+ responseStyle: "data",
323
+ url: "/api/agents/{name}",
324
+ ...options,
325
+ headers: {
326
+ "Content-Type": "application/json",
327
+ ...options.headers,
328
+ },
329
+ });
330
+ }
331
+ /**
332
+ * Read agent activity across authorized workspaces
333
+ */
334
+ getAgentActivity(options) {
335
+ return (options.client ?? this.client).get({
336
+ responseStyle: "data",
337
+ url: "/api/agents/{name}/activity",
338
+ ...options,
339
+ });
340
+ }
341
+ /**
342
+ * Duplicate one effective authored agent definition server-side
343
+ */
344
+ duplicateAgent(options) {
139
345
  return (options.client ?? this.client).post({
140
346
  responseStyle: "data",
141
- url: "/api/agent/tasks/{run_id}/fail",
347
+ url: "/api/agents/{name}/duplicate",
142
348
  ...options,
143
349
  headers: {
144
350
  "Content-Type": "application/json",
@@ -147,12 +353,60 @@ export class agent extends HeyApiClient {
147
353
  });
148
354
  }
149
355
  /**
150
- * Extend a claimed task-run lease for the calling agent
356
+ * Delete HEARTBEAT.md through managed authoring
151
357
  */
152
- heartbeatAgentTaskRun(options) {
358
+ deleteAgentHeartbeat(options) {
359
+ return (options.client ?? this.client).delete({
360
+ responseStyle: "data",
361
+ url: "/api/agents/{name}/heartbeat",
362
+ ...options,
363
+ headers: {
364
+ "Content-Type": "application/json",
365
+ ...options.headers,
366
+ },
367
+ });
368
+ }
369
+ /**
370
+ * Inspect the resolved Heartbeat policy for an agent definition
371
+ */
372
+ getAgentHeartbeat(options) {
373
+ return (options.client ?? this.client).get({
374
+ responseStyle: "data",
375
+ url: "/api/agents/{name}/heartbeat",
376
+ ...options,
377
+ });
378
+ }
379
+ /**
380
+ * Create or replace HEARTBEAT.md through managed authoring
381
+ */
382
+ putAgentHeartbeat(options) {
383
+ return (options.client ?? this.client).put({
384
+ responseStyle: "data",
385
+ url: "/api/agents/{name}/heartbeat",
386
+ ...options,
387
+ headers: {
388
+ "Content-Type": "application/json",
389
+ ...options.headers,
390
+ },
391
+ });
392
+ }
393
+ /**
394
+ * List managed HEARTBEAT.md authoring revisions
395
+ */
396
+ listAgentHeartbeatHistory(options) {
397
+ return (options.client ?? this.client).get({
398
+ responseStyle: "data",
399
+ url: "/api/agents/{name}/heartbeat/history",
400
+ ...options,
401
+ });
402
+ }
403
+ /**
404
+ * Rollback HEARTBEAT.md through managed authoring
405
+ */
406
+ rollbackAgentHeartbeat(options) {
153
407
  return (options.client ?? this.client).post({
154
408
  responseStyle: "data",
155
- url: "/api/agent/tasks/{run_id}/heartbeat",
409
+ url: "/api/agents/{name}/heartbeat/rollback",
156
410
  ...options,
157
411
  headers: {
158
412
  "Content-Type": "application/json",
@@ -161,12 +415,22 @@ export class agent extends HeyApiClient {
161
415
  });
162
416
  }
163
417
  /**
164
- * Release a claimed task run for the calling agent
418
+ * Revoke a source script approval (operator only)
165
419
  */
166
- releaseAgentTaskRun(options) {
420
+ revokeAgentHeartbeatScript(options) {
421
+ return (options.client ?? this.client).delete({
422
+ responseStyle: "data",
423
+ url: "/api/agents/{name}/heartbeat/scripts/{script}/approve",
424
+ ...options,
425
+ });
426
+ }
427
+ /**
428
+ * Approve exact source script bytes (operator only)
429
+ */
430
+ approveAgentHeartbeatScript(options) {
167
431
  return (options.client ?? this.client).post({
168
432
  responseStyle: "data",
169
- url: "/api/agent/tasks/{run_id}/release",
433
+ url: "/api/agents/{name}/heartbeat/scripts/{script}/approve",
170
434
  ...options,
171
435
  headers: {
172
436
  "Content-Type": "application/json",
@@ -175,12 +439,32 @@ export class agent extends HeyApiClient {
175
439
  });
176
440
  }
177
441
  /**
178
- * Start a claimed task run under the calling agent's lease
442
+ * List check-in source kinds, scripts and effective limits
179
443
  */
180
- startAgentTaskRun(options) {
444
+ getAgentHeartbeatSources(options) {
445
+ return (options.client ?? this.client).get({
446
+ responseStyle: "data",
447
+ url: "/api/agents/{name}/heartbeat/sources",
448
+ ...options,
449
+ });
450
+ }
451
+ /**
452
+ * Read Heartbeat policy status, wake state, and optional session health
453
+ */
454
+ getAgentHeartbeatStatus(options) {
455
+ return (options.client ?? this.client).get({
456
+ responseStyle: "data",
457
+ url: "/api/agents/{name}/heartbeat/status",
458
+ ...options,
459
+ });
460
+ }
461
+ /**
462
+ * Validate a proposed HEARTBEAT.md body
463
+ */
464
+ validateAgentHeartbeat(options) {
181
465
  return (options.client ?? this.client).post({
182
466
  responseStyle: "data",
183
- url: "/api/agent/tasks/{run_id}/start",
467
+ url: "/api/agents/{name}/heartbeat/validate",
184
468
  ...options,
185
469
  headers: {
186
470
  "Content-Type": "application/json",
@@ -188,25 +472,89 @@ export class agent extends HeyApiClient {
188
472
  },
189
473
  });
190
474
  }
191
- }
192
- export class agents extends HeyApiClient {
193
475
  /**
194
- * List all readable agent definitions, optionally resolved for a workspace
476
+ * Request one advisory Heartbeat wake for an eligible session
195
477
  */
196
- listAgents(options) {
197
- return (options?.client ?? this.client).get({
478
+ wakeAgentHeartbeat(options) {
479
+ return (options.client ?? this.client).post({
198
480
  responseStyle: "data",
199
- url: "/api/agents",
481
+ url: "/api/agents/{name}/heartbeat/wake",
482
+ ...options,
483
+ headers: {
484
+ "Content-Type": "application/json",
485
+ ...options.headers,
486
+ },
487
+ });
488
+ }
489
+ /**
490
+ * Inspect agent memory (experimental)
491
+ *
492
+ * @stability experimental
493
+ */
494
+ getAgentMemory(options) {
495
+ return (options.client ?? this.client).get({
496
+ responseStyle: "data",
497
+ url: "/api/agents/{name}/memory",
200
498
  ...options,
201
499
  });
202
500
  }
203
501
  /**
204
- * Create a global or workspace-local AGENT.md definition
502
+ * Replace memory with a digest check (experimental)
503
+ *
504
+ * @stability experimental
205
505
  */
206
- createAgent(options) {
506
+ putAgentMemory(options) {
507
+ return (options.client ?? this.client).put({
508
+ responseStyle: "data",
509
+ url: "/api/agents/{name}/memory",
510
+ ...options,
511
+ headers: {
512
+ "Content-Type": "application/json",
513
+ ...options.headers,
514
+ },
515
+ });
516
+ }
517
+ /**
518
+ * Remove matching memory entries (experimental)
519
+ *
520
+ * @stability experimental
521
+ */
522
+ removeAgentMemory(options) {
523
+ return (options.client ?? this.client).delete({
524
+ responseStyle: "data",
525
+ url: "/api/agents/{name}/memory/entries",
526
+ ...options,
527
+ headers: {
528
+ "Content-Type": "application/json",
529
+ ...options.headers,
530
+ },
531
+ });
532
+ }
533
+ /**
534
+ * Replace matching memory text (experimental)
535
+ *
536
+ * @stability experimental
537
+ */
538
+ replaceAgentMemory(options) {
539
+ return (options.client ?? this.client).patch({
540
+ responseStyle: "data",
541
+ url: "/api/agents/{name}/memory/entries",
542
+ ...options,
543
+ headers: {
544
+ "Content-Type": "application/json",
545
+ ...options.headers,
546
+ },
547
+ });
548
+ }
549
+ /**
550
+ * Add a dated memory entry (experimental)
551
+ *
552
+ * @stability experimental
553
+ */
554
+ addAgentMemory(options) {
207
555
  return (options.client ?? this.client).post({
208
556
  responseStyle: "data",
209
- url: "/api/agents",
557
+ url: "/api/agents/{name}/memory/entries",
210
558
  ...options,
211
559
  headers: {
212
560
  "Content-Type": "application/json",
@@ -215,52 +563,96 @@ export class agents extends HeyApiClient {
215
563
  });
216
564
  }
217
565
  /**
218
- * List a filtered agent fleet with exact session metrics
566
+ * List the last fifty memory revisions (experimental)
567
+ *
568
+ * @stability experimental
219
569
  */
220
- listAgentsAggregate(options) {
221
- return (options?.client ?? this.client).get({
570
+ listAgentMemoryHistory(options) {
571
+ return (options.client ?? this.client).get({
222
572
  responseStyle: "data",
223
- url: "/api/agents/aggregate",
573
+ url: "/api/agents/{name}/memory/history",
224
574
  ...options,
225
575
  });
226
576
  }
227
577
  /**
228
- * List a filtered agent fleet with exact session metrics
578
+ * Restore a memory revision (experimental)
579
+ *
580
+ * @stability experimental
229
581
  */
230
- listAgentCatalog(options) {
231
- return (options?.client ?? this.client).get({
582
+ rollbackAgentMemory(options) {
583
+ return (options.client ?? this.client).post({
232
584
  responseStyle: "data",
233
- url: "/api/agents/catalog",
585
+ url: "/api/agents/{name}/memory/rollback",
234
586
  ...options,
587
+ headers: {
588
+ "Content-Type": "application/json",
589
+ ...options.headers,
590
+ },
235
591
  });
236
592
  }
237
593
  /**
238
- * Durably delete one effective authored agent definition
594
+ * Search agent notes and accessible sessions (experimental)
595
+ *
596
+ * @stability experimental
239
597
  */
240
- deleteAgent(options) {
598
+ searchAgentMemory(options) {
599
+ return (options.client ?? this.client).post({
600
+ responseStyle: "data",
601
+ url: "/api/agents/{name}/memory/search",
602
+ ...options,
603
+ headers: {
604
+ "Content-Type": "application/json",
605
+ ...options.headers,
606
+ },
607
+ });
608
+ }
609
+ /**
610
+ * Validate proposed memory content (experimental)
611
+ *
612
+ * @stability experimental
613
+ */
614
+ validateAgentMemory(options) {
615
+ return (options.client ?? this.client).post({
616
+ responseStyle: "data",
617
+ url: "/api/agents/{name}/memory/validate",
618
+ ...options,
619
+ headers: {
620
+ "Content-Type": "application/json",
621
+ ...options.headers,
622
+ },
623
+ });
624
+ }
625
+ /**
626
+ * Delete SOUL.md through managed authoring
627
+ */
628
+ deleteAgentSoul(options) {
241
629
  return (options.client ?? this.client).delete({
242
630
  responseStyle: "data",
243
- url: "/api/agents/{name}",
631
+ url: "/api/agents/{name}/soul",
244
632
  ...options,
633
+ headers: {
634
+ "Content-Type": "application/json",
635
+ ...options.headers,
636
+ },
245
637
  });
246
638
  }
247
639
  /**
248
- * Get one agent definition by name, optionally resolved for a workspace
640
+ * Inspect the resolved Soul read model for an agent definition
249
641
  */
250
- getAgent(options) {
642
+ getAgentDefinitionSoul(options) {
251
643
  return (options.client ?? this.client).get({
252
644
  responseStyle: "data",
253
- url: "/api/agents/{name}",
645
+ url: "/api/agents/{name}/soul",
254
646
  ...options,
255
647
  });
256
648
  }
257
649
  /**
258
- * Replace one effective AGENT.md definition with digest CAS
650
+ * Create or replace SOUL.md through managed authoring
259
651
  */
260
- updateAgent(options) {
652
+ putAgentSoul(options) {
261
653
  return (options.client ?? this.client).put({
262
654
  responseStyle: "data",
263
- url: "/api/agents/{name}",
655
+ url: "/api/agents/{name}/soul",
264
656
  ...options,
265
657
  headers: {
266
658
  "Content-Type": "application/json",
@@ -269,12 +661,22 @@ export class agents extends HeyApiClient {
269
661
  });
270
662
  }
271
663
  /**
272
- * Duplicate one effective authored agent definition server-side
664
+ * List managed SOUL.md authoring revisions
273
665
  */
274
- duplicateAgent(options) {
666
+ listAgentSoulHistory(options) {
667
+ return (options.client ?? this.client).get({
668
+ responseStyle: "data",
669
+ url: "/api/agents/{name}/soul/history",
670
+ ...options,
671
+ });
672
+ }
673
+ /**
674
+ * Rollback SOUL.md through managed authoring
675
+ */
676
+ rollbackAgentSoul(options) {
275
677
  return (options.client ?? this.client).post({
276
678
  responseStyle: "data",
277
- url: "/api/agents/{name}/duplicate",
679
+ url: "/api/agents/{name}/soul/rollback",
278
680
  ...options,
279
681
  headers: {
280
682
  "Content-Type": "application/json",
@@ -283,12 +685,12 @@ export class agents extends HeyApiClient {
283
685
  });
284
686
  }
285
687
  /**
286
- * Delete HEARTBEAT.md through managed authoring
688
+ * Validate a proposed Soul body for an agent definition
287
689
  */
288
- deleteAgentHeartbeat(options) {
289
- return (options.client ?? this.client).delete({
690
+ validateAgentDefinitionSoul(options) {
691
+ return (options.client ?? this.client).post({
290
692
  responseStyle: "data",
291
- url: "/api/agents/{name}/heartbeat",
693
+ url: "/api/agents/{name}/soul/validate",
292
694
  ...options,
293
695
  headers: {
294
696
  "Content-Type": "application/json",
@@ -296,47 +698,45 @@ export class agents extends HeyApiClient {
296
698
  },
297
699
  });
298
700
  }
701
+ }
702
+ export class agent extends HeyApiClient {
299
703
  /**
300
- * Inspect the resolved Heartbeat policy for an agent definition
704
+ * Return the bounded calling-agent situation context
301
705
  */
302
- getAgentHeartbeat(options) {
706
+ getAgentContext(options) {
303
707
  return (options.client ?? this.client).get({
304
708
  responseStyle: "data",
305
- url: "/api/agents/{name}/heartbeat",
709
+ url: "/api/agent/context",
306
710
  ...options,
307
711
  });
308
712
  }
309
713
  /**
310
- * Create or replace HEARTBEAT.md through managed authoring
714
+ * Read resolved coordinator config for the calling agent workspace
311
715
  */
312
- putAgentHeartbeat(options) {
313
- return (options.client ?? this.client).put({
716
+ getAgentCoordinatorConfig(options) {
717
+ return (options.client ?? this.client).get({
314
718
  responseStyle: "data",
315
- url: "/api/agents/{name}/heartbeat",
719
+ url: "/api/agent/coordinator/config",
316
720
  ...options,
317
- headers: {
318
- "Content-Type": "application/json",
319
- ...options.headers,
320
- },
321
721
  });
322
722
  }
323
723
  /**
324
- * List managed HEARTBEAT.md authoring revisions
724
+ * Resolve the calling agent session
325
725
  */
326
- listAgentHeartbeatHistory(options) {
726
+ getAgentMe(options) {
327
727
  return (options.client ?? this.client).get({
328
728
  responseStyle: "data",
329
- url: "/api/agents/{name}/heartbeat/history",
729
+ url: "/api/agent/me",
330
730
  ...options,
331
731
  });
332
732
  }
333
733
  /**
334
- * Rollback HEARTBEAT.md through managed authoring
734
+ * Notify live operator clients from the calling agent
335
735
  */
336
- rollbackAgentHeartbeat(options) {
736
+ notifyOperator(options) {
337
737
  return (options.client ?? this.client).post({
338
738
  responseStyle: "data",
339
- url: "/api/agents/{name}/heartbeat/rollback",
739
+ url: "/api/agent/notify",
340
740
  ...options,
341
741
  headers: {
342
742
  "Content-Type": "application/json",
@@ -345,22 +745,22 @@ export class agents extends HeyApiClient {
345
745
  });
346
746
  }
347
747
  /**
348
- * Read Heartbeat policy status, wake state, and optional session health
748
+ * Inspect the resolved Soul read model for the calling agent
349
749
  */
350
- getAgentHeartbeatStatus(options) {
750
+ getAgentSoul(options) {
351
751
  return (options.client ?? this.client).get({
352
752
  responseStyle: "data",
353
- url: "/api/agents/{name}/heartbeat/status",
753
+ url: "/api/agent/soul",
354
754
  ...options,
355
755
  });
356
756
  }
357
757
  /**
358
- * Validate a proposed HEARTBEAT.md body
758
+ * Validate a proposed Soul body or the calling agent's current Soul
359
759
  */
360
- validateAgentHeartbeat(options) {
760
+ validateAgentSoul(options) {
361
761
  return (options.client ?? this.client).post({
362
762
  responseStyle: "data",
363
- url: "/api/agents/{name}/heartbeat/validate",
763
+ url: "/api/agent/soul/validate",
364
764
  ...options,
365
765
  headers: {
366
766
  "Content-Type": "application/json",
@@ -369,12 +769,12 @@ export class agents extends HeyApiClient {
369
769
  });
370
770
  }
371
771
  /**
372
- * Request one advisory Heartbeat wake for an eligible session
772
+ * Spawn a narrowed child session for the calling agent
373
773
  */
374
- wakeAgentHeartbeat(options) {
774
+ spawnAgentSession(options) {
375
775
  return (options.client ?? this.client).post({
376
776
  responseStyle: "data",
377
- url: "/api/agents/{name}/heartbeat/wake",
777
+ url: "/api/agent/spawn",
378
778
  ...options,
379
779
  headers: {
380
780
  "Content-Type": "application/json",
@@ -383,12 +783,12 @@ export class agents extends HeyApiClient {
383
783
  });
384
784
  }
385
785
  /**
386
- * Delete SOUL.md through managed authoring
786
+ * Atomically claim the next matching task run for the calling agent
387
787
  */
388
- deleteAgentSoul(options) {
389
- return (options.client ?? this.client).delete({
788
+ claimNextAgentTask(options) {
789
+ return (options.client ?? this.client).post({
390
790
  responseStyle: "data",
391
- url: "/api/agents/{name}/soul",
791
+ url: "/api/agent/tasks/claim-next",
392
792
  ...options,
393
793
  headers: {
394
794
  "Content-Type": "application/json",
@@ -397,22 +797,26 @@ export class agents extends HeyApiClient {
397
797
  });
398
798
  }
399
799
  /**
400
- * Inspect the resolved Soul read model for an agent definition
800
+ * Complete a claimed task run for the calling agent
401
801
  */
402
- getAgentDefinitionSoul(options) {
403
- return (options.client ?? this.client).get({
802
+ completeAgentTaskRun(options) {
803
+ return (options.client ?? this.client).post({
404
804
  responseStyle: "data",
405
- url: "/api/agents/{name}/soul",
805
+ url: "/api/agent/tasks/{run_id}/complete",
406
806
  ...options,
807
+ headers: {
808
+ "Content-Type": "application/json",
809
+ ...options.headers,
810
+ },
407
811
  });
408
812
  }
409
813
  /**
410
- * Create or replace SOUL.md through managed authoring
814
+ * Fail a claimed task run for the calling agent
411
815
  */
412
- putAgentSoul(options) {
413
- return (options.client ?? this.client).put({
816
+ failAgentTaskRun(options) {
817
+ return (options.client ?? this.client).post({
414
818
  responseStyle: "data",
415
- url: "/api/agents/{name}/soul",
819
+ url: "/api/agent/tasks/{run_id}/fail",
416
820
  ...options,
417
821
  headers: {
418
822
  "Content-Type": "application/json",
@@ -421,22 +825,26 @@ export class agents extends HeyApiClient {
421
825
  });
422
826
  }
423
827
  /**
424
- * List managed SOUL.md authoring revisions
828
+ * Extend a claimed task-run lease for the calling agent
425
829
  */
426
- listAgentSoulHistory(options) {
427
- return (options.client ?? this.client).get({
830
+ heartbeatAgentTaskRun(options) {
831
+ return (options.client ?? this.client).post({
428
832
  responseStyle: "data",
429
- url: "/api/agents/{name}/soul/history",
833
+ url: "/api/agent/tasks/{run_id}/heartbeat",
430
834
  ...options,
835
+ headers: {
836
+ "Content-Type": "application/json",
837
+ ...options.headers,
838
+ },
431
839
  });
432
840
  }
433
841
  /**
434
- * Rollback SOUL.md through managed authoring
842
+ * Release a claimed task run for the calling agent
435
843
  */
436
- rollbackAgentSoul(options) {
844
+ releaseAgentTaskRun(options) {
437
845
  return (options.client ?? this.client).post({
438
846
  responseStyle: "data",
439
- url: "/api/agents/{name}/soul/rollback",
847
+ url: "/api/agent/tasks/{run_id}/release",
440
848
  ...options,
441
849
  headers: {
442
850
  "Content-Type": "application/json",
@@ -445,12 +853,12 @@ export class agents extends HeyApiClient {
445
853
  });
446
854
  }
447
855
  /**
448
- * Validate a proposed Soul body for an agent definition
856
+ * Start a claimed task run under the calling agent's lease
449
857
  */
450
- validateAgentDefinitionSoul(options) {
858
+ startAgentTaskRun(options) {
451
859
  return (options.client ?? this.client).post({
452
860
  responseStyle: "data",
453
- url: "/api/agents/{name}/soul/validate",
861
+ url: "/api/agent/tasks/{run_id}/start",
454
862
  ...options,
455
863
  headers: {
456
864
  "Content-Type": "application/json",
@@ -902,6 +1310,18 @@ export class cmdPalette extends HeyApiClient {
902
1310
  }
903
1311
  }
904
1312
  export class diagnostics extends HeyApiClient {
1313
+ /**
1314
+ * Capture a runtime profile over the local socket
1315
+ *
1316
+ * @stability experimental
1317
+ */
1318
+ captureDaemonProfile(options) {
1319
+ return (options.client ?? this.client).get({
1320
+ responseStyle: "data",
1321
+ url: "/api/daemon/profile/{kind}",
1322
+ ...options,
1323
+ });
1324
+ }
905
1325
  /**
906
1326
  * Run runtime diagnostics
907
1327
  */
@@ -2800,6 +3220,26 @@ export class observe extends HeyApiClient {
2800
3220
  ...options,
2801
3221
  });
2802
3222
  }
3223
+ /**
3224
+ * List the newest permission decisions with their initiators
3225
+ */
3226
+ listPermissionEntries(options) {
3227
+ return (options?.client ?? this.client).get({
3228
+ responseStyle: "data",
3229
+ url: "/api/permissions",
3230
+ ...options,
3231
+ });
3232
+ }
3233
+ /**
3234
+ * Read daily permission totals by agent and decision
3235
+ */
3236
+ getPermissionRollup(options) {
3237
+ return (options?.client ?? this.client).get({
3238
+ responseStyle: "data",
3239
+ url: "/api/permissions/rollup",
3240
+ ...options,
3241
+ });
3242
+ }
2803
3243
  }
2804
3244
  export class onboarding extends HeyApiClient {
2805
3245
  /**
@@ -3281,6 +3721,16 @@ export class sessions extends HeyApiClient {
3281
3721
  ...options,
3282
3722
  });
3283
3723
  }
3724
+ /**
3725
+ * List a session's child sessions, recursively
3726
+ */
3727
+ listSessionDescendants(options) {
3728
+ return (options.client ?? this.client).get({
3729
+ responseStyle: "data",
3730
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/descendants",
3731
+ ...options,
3732
+ });
3733
+ }
3284
3734
  /**
3285
3735
  * List persisted session events
3286
3736
  */
@@ -3369,6 +3819,78 @@ export class sessions extends HeyApiClient {
3369
3819
  },
3370
3820
  });
3371
3821
  }
3822
+ /**
3823
+ * Search this project for link candidates
3824
+ */
3825
+ searchSessionWorkCandidates(options) {
3826
+ return (options.client ?? this.client).get({
3827
+ responseStyle: "data",
3828
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/link-candidates",
3829
+ ...options,
3830
+ });
3831
+ }
3832
+ /**
3833
+ * Unlink session work
3834
+ */
3835
+ removeSessionWorkLink(options) {
3836
+ return (options.client ?? this.client).delete({
3837
+ responseStyle: "data",
3838
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/links",
3839
+ ...options,
3840
+ headers: {
3841
+ "Content-Type": "application/json",
3842
+ ...options.headers,
3843
+ },
3844
+ });
3845
+ }
3846
+ /**
3847
+ * List session linked work
3848
+ */
3849
+ listSessionLinkedWork(options) {
3850
+ return (options.client ?? this.client).get({
3851
+ responseStyle: "data",
3852
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/links",
3853
+ ...options,
3854
+ });
3855
+ }
3856
+ /**
3857
+ * Link work to a session
3858
+ */
3859
+ addSessionWorkLink(options) {
3860
+ return (options.client ?? this.client).post({
3861
+ responseStyle: "data",
3862
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/links",
3863
+ ...options,
3864
+ headers: {
3865
+ "Content-Type": "application/json",
3866
+ ...options.headers,
3867
+ },
3868
+ });
3869
+ }
3870
+ /**
3871
+ * Ask the forge again about one linked item
3872
+ */
3873
+ refreshSessionWorkLink(options) {
3874
+ return (options.client ?? this.client).post({
3875
+ responseStyle: "data",
3876
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/links/refresh",
3877
+ ...options,
3878
+ headers: {
3879
+ "Content-Type": "application/json",
3880
+ ...options.headers,
3881
+ },
3882
+ });
3883
+ }
3884
+ /**
3885
+ * Mark a session's Needs you as seen until its next occurrence; a session waiting on an answer, a sign-in, or a stop is refused
3886
+ */
3887
+ markSessionSeen(options) {
3888
+ return (options.client ?? this.client).post({
3889
+ responseStyle: "data",
3890
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/mark-seen",
3891
+ ...options,
3892
+ });
3893
+ }
3372
3894
  /**
3373
3895
  * List a session's monitors
3374
3896
  */
@@ -3403,6 +3925,20 @@ export class sessions extends HeyApiClient {
3403
3925
  },
3404
3926
  });
3405
3927
  }
3928
+ /**
3929
+ * Copy a stopped user session into another profile and archive the original
3930
+ */
3931
+ moveSessionToProfile(options) {
3932
+ return (options.client ?? this.client).post({
3933
+ responseStyle: "data",
3934
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/move-to-profile",
3935
+ ...options,
3936
+ headers: {
3937
+ "Content-Type": "application/json",
3938
+ ...options.headers,
3939
+ },
3940
+ });
3941
+ }
3406
3942
  /**
3407
3943
  * Make an adopted child session top-level, or take over a stopped spawned worker
3408
3944
  */
@@ -3427,6 +3963,16 @@ export class sessions extends HeyApiClient {
3427
3963
  },
3428
3964
  });
3429
3965
  }
3966
+ /**
3967
+ * List pending session interactions
3968
+ */
3969
+ listSessionPendingInteractions(options) {
3970
+ return (options.client ?? this.client).get({
3971
+ responseStyle: "data",
3972
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/pending-interactions",
3973
+ ...options,
3974
+ });
3975
+ }
3430
3976
  /**
3431
3977
  * Update operator session presence
3432
3978
  */
@@ -5822,14 +6368,14 @@ export class Compozy extends HeyApiClient {
5822
6368
  super(args);
5823
6369
  Compozy.__registry.set(this, args?.key);
5824
6370
  }
5825
- _agent;
5826
- get agent() {
5827
- return (this._agent ??= new agent({ client: this.client }));
5828
- }
5829
6371
  _agents;
5830
6372
  get agents() {
5831
6373
  return (this._agents ??= new agents({ client: this.client }));
5832
6374
  }
6375
+ _agent;
6376
+ get agent() {
6377
+ return (this._agent ??= new agent({ client: this.client }));
6378
+ }
5833
6379
  _appTokens;
5834
6380
  get appTokens() {
5835
6381
  return (this._appTokens ??= new appTokens({ client: this.client }));