@knpkv/herdr-connect 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +2 -0
  2. package/dist/client.d.ts +986 -2
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +353 -54
  5. package/dist/client.js.map +1 -1
  6. package/dist/directory.d.ts +7 -1
  7. package/dist/directory.d.ts.map +1 -1
  8. package/dist/directory.js +1 -1
  9. package/dist/directory.js.map +1 -1
  10. package/dist/id.d.ts.map +1 -1
  11. package/dist/id.js +3 -2
  12. package/dist/id.js.map +1 -1
  13. package/dist/index.d.ts +4 -0
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +4 -0
  16. package/dist/index.js.map +1 -1
  17. package/dist/internal/terminal-release.d.ts.map +1 -1
  18. package/dist/internal/terminal-release.js +3 -1
  19. package/dist/internal/terminal-release.js.map +1 -1
  20. package/dist/model.d.ts.map +1 -1
  21. package/dist/model.js +3 -2
  22. package/dist/model.js.map +1 -1
  23. package/dist/terminal-dimensions.d.ts +25 -0
  24. package/dist/terminal-dimensions.d.ts.map +1 -0
  25. package/dist/terminal-dimensions.js +19 -0
  26. package/dist/terminal-dimensions.js.map +1 -0
  27. package/dist/terminal-keyboard.d.ts +52 -0
  28. package/dist/terminal-keyboard.d.ts.map +1 -0
  29. package/dist/terminal-keyboard.js +141 -0
  30. package/dist/terminal-keyboard.js.map +1 -0
  31. package/dist/terminal-output.d.ts +30 -0
  32. package/dist/terminal-output.d.ts.map +1 -0
  33. package/dist/terminal-output.js +54 -0
  34. package/dist/terminal-output.js.map +1 -0
  35. package/dist/terminal-rail-navigation.d.ts +4 -0
  36. package/dist/terminal-rail-navigation.d.ts.map +1 -0
  37. package/dist/terminal-rail-navigation.js +13 -0
  38. package/dist/terminal-rail-navigation.js.map +1 -0
  39. package/dist/terminal-viewport.d.ts +32 -2
  40. package/dist/terminal-viewport.d.ts.map +1 -1
  41. package/dist/terminal-viewport.js +131 -12
  42. package/dist/terminal-viewport.js.map +1 -1
  43. package/dist/terminal-worker-guard.d.ts +7 -0
  44. package/dist/terminal-worker-guard.d.ts.map +1 -0
  45. package/dist/terminal-worker-guard.js +11 -0
  46. package/dist/terminal-worker-guard.js.map +1 -0
  47. package/dist/terminal.d.ts +1667 -25
  48. package/dist/terminal.d.ts.map +1 -1
  49. package/dist/terminal.js +1 -1
  50. package/dist/terminal.js.map +1 -1
  51. package/dist/view.d.ts +15 -2
  52. package/dist/view.d.ts.map +1 -1
  53. package/dist/view.js +46 -2
  54. package/dist/view.js.map +1 -1
  55. package/dist/work-goal-link-view.d.ts +8 -0
  56. package/dist/work-goal-link-view.d.ts.map +1 -0
  57. package/dist/work-goal-link-view.js +3 -0
  58. package/dist/work-goal-link-view.js.map +1 -0
  59. package/dist/work-goal-link.d.ts +24 -0
  60. package/dist/work-goal-link.d.ts.map +1 -0
  61. package/dist/work-goal-link.js +34 -0
  62. package/dist/work-goal-link.js.map +1 -0
  63. package/dist/work-poll.d.ts +6 -0
  64. package/dist/work-poll.d.ts.map +1 -0
  65. package/dist/work-poll.js +7 -0
  66. package/dist/work-poll.js.map +1 -0
  67. package/dist/workspace-focus.d.ts +23 -0
  68. package/dist/workspace-focus.d.ts.map +1 -0
  69. package/dist/workspace-focus.js +69 -0
  70. package/dist/workspace-focus.js.map +1 -0
  71. package/package.json +17 -15
  72. package/src/styles.css +139 -12
@@ -1,6 +1,6 @@
1
1
  import type { Scope } from "effect";
2
2
  import { Crypto, Effect, Stream } from "effect";
3
- import { ChildProcessSpawner } from "effect/unstable/process";
3
+ import { ChildProcessSpawner } from "effect/process";
4
4
  import { TerminalAgentNotFoundError, TerminalProtocolError, TerminalTransportError } from "./errors.js";
5
5
  import { HerdrTerminalEvent, type TerminalClientCommand, type TerminalSelection } from "./model.js";
6
6
  export type TerminalError = TerminalAgentNotFoundError | TerminalProtocolError | TerminalTransportError;
@@ -22,7 +22,13 @@ export declare const makeHerdrTerminalConnector: (config: {
22
22
  readonly crossHost: boolean;
23
23
  readonly port: number;
24
24
  readonly localPort: number;
25
+ readonly workBindAddress?: string;
25
26
  readonly approvalPort: number;
27
+ readonly lanWork?: {
28
+ readonly address: string;
29
+ readonly host: string;
30
+ readonly port: number;
31
+ };
26
32
  readonly allowedUsers: readonly string[];
27
33
  readonly approvalNodes: readonly string[];
28
34
  readonly machines: readonly {
@@ -58,16 +64,140 @@ export declare const makeHerdrTerminalConnector: (config: {
58
64
  readonly kind: "agent.delegate";
59
65
  readonly repository: string;
60
66
  readonly prompt: string;
61
- readonly mode: "consult" | "review" | "work";
67
+ readonly mode: "consult" | "review" | "transition_summary" | "work";
62
68
  readonly channel?: "coordinator_chat";
63
69
  } | {
64
70
  readonly kind: "agent.message";
65
71
  readonly session: string;
66
72
  readonly message: string;
73
+ } | {
74
+ readonly kind: "work.reconcile";
75
+ readonly repository: string;
76
+ readonly pullRequest: number;
77
+ readonly goalId: string;
78
+ readonly laneId: string;
79
+ readonly operationId: string;
80
+ readonly expectedRevision: number;
81
+ readonly expectedHead: string;
82
+ readonly newHead: string;
83
+ readonly expectedOwner: {
84
+ readonly id: string;
85
+ readonly name: string;
86
+ };
87
+ readonly expectedGoalEventId: string;
88
+ readonly bindingDispatchRequestId: string;
89
+ readonly sessionId: string;
90
+ readonly expectedWork: string;
91
+ readonly worker: {
92
+ readonly host: string;
93
+ readonly agentId: string;
94
+ readonly name: string;
95
+ readonly paneId: string;
96
+ readonly relationship?: {
97
+ readonly parentAgentId: string;
98
+ readonly relation: "delegated" | "pair" | "review";
99
+ };
100
+ };
101
+ readonly worktree: string;
102
+ readonly branch: string;
103
+ } | {
104
+ readonly kind: "work.admit";
105
+ readonly repository: string;
106
+ readonly pullRequest: number;
107
+ readonly reviewUrl: string;
108
+ readonly goalId: string;
109
+ readonly laneId: string;
110
+ readonly operationId: string;
111
+ readonly expectedAbsenceToken: string;
112
+ readonly head: string;
113
+ readonly baseHead: string;
114
+ readonly owner: {
115
+ readonly id: string;
116
+ readonly name: string;
117
+ };
118
+ readonly sessionId: string;
119
+ readonly expectedWork: string;
120
+ readonly worker: {
121
+ readonly host: string;
122
+ readonly agentId: string;
123
+ readonly name: string;
124
+ readonly paneId: string;
125
+ readonly relationship?: {
126
+ readonly parentAgentId: string;
127
+ readonly relation: "delegated" | "pair" | "review";
128
+ };
129
+ };
130
+ readonly worktree: string;
131
+ readonly branch: string;
132
+ readonly title: string;
133
+ readonly summary: string;
134
+ readonly detail: string;
135
+ } | {
136
+ readonly kind: "work.recover";
137
+ readonly repository: string;
138
+ readonly pullRequest: number;
139
+ readonly reviewUrl: string;
140
+ readonly goalId: string;
141
+ readonly laneId: string;
142
+ readonly operationId: string;
143
+ readonly expectedGoalEventId: string;
144
+ readonly expectedGoalUpdatedAt: number;
145
+ readonly expectedHistoryToken: string;
146
+ readonly head: string;
147
+ readonly baseHead: string;
148
+ readonly owner: {
149
+ readonly id: string;
150
+ readonly name: string;
151
+ };
152
+ readonly sessionId: string;
153
+ readonly expectedWork: string;
154
+ readonly worker: {
155
+ readonly host: string;
156
+ readonly agentId: string;
157
+ readonly name: string;
158
+ readonly paneId: string;
159
+ readonly relationship?: {
160
+ readonly parentAgentId: string;
161
+ readonly relation: "delegated" | "pair" | "review";
162
+ };
163
+ };
164
+ readonly worktree: string;
165
+ readonly branch: string;
166
+ } | {
167
+ readonly kind: "work.reassign";
168
+ readonly goalId: string;
169
+ readonly from: {
170
+ readonly id: string;
171
+ readonly name: string;
172
+ };
173
+ readonly to: {
174
+ readonly id: string;
175
+ readonly name: string;
176
+ };
177
+ readonly toAgent: {
178
+ readonly _tag: "clear";
179
+ } | {
180
+ readonly _tag: "keep";
181
+ } | {
182
+ readonly _tag: "set";
183
+ readonly agent: {
184
+ readonly host: string;
185
+ readonly agentId: string;
186
+ readonly name: string;
187
+ readonly paneId: string;
188
+ readonly relationship?: {
189
+ readonly parentAgentId: string;
190
+ readonly relation: "delegated" | "pair" | "review";
191
+ };
192
+ };
193
+ };
194
+ readonly reason: string;
195
+ readonly expectedGoalEventId: string;
196
+ readonly expectedGoalUpdatedAt: number;
67
197
  } | {
68
198
  readonly kind: "browser.mcp.recover";
69
199
  };
70
- }, actor: string) => Effect.Effect<{
200
+ }, actor: string, provenance?: import("@knpkv/herdr-fleet").SubmissionProvenance | undefined) => Effect.Effect<{
71
201
  readonly id: string;
72
202
  readonly createdAt: number;
73
203
  readonly updatedAt: number;
@@ -90,16 +220,142 @@ export declare const makeHerdrTerminalConnector: (config: {
90
220
  readonly kind: "agent.delegate";
91
221
  readonly repository: string;
92
222
  readonly prompt: string;
93
- readonly mode: "consult" | "review" | "work";
223
+ readonly mode: "consult" | "review" | "transition_summary" | "work";
94
224
  readonly channel?: "coordinator_chat";
95
225
  } | {
96
226
  readonly kind: "agent.message";
97
227
  readonly session: string;
98
228
  readonly message: string;
229
+ } | {
230
+ readonly kind: "work.reconcile";
231
+ readonly repository: string;
232
+ readonly pullRequest: number;
233
+ readonly goalId: string;
234
+ readonly laneId: string;
235
+ readonly operationId: string;
236
+ readonly expectedRevision: number;
237
+ readonly expectedHead: string;
238
+ readonly newHead: string;
239
+ readonly expectedOwner: {
240
+ readonly id: string;
241
+ readonly name: string;
242
+ };
243
+ readonly expectedGoalEventId: string;
244
+ readonly bindingDispatchRequestId: string;
245
+ readonly sessionId: string;
246
+ readonly expectedWork: string;
247
+ readonly worker: {
248
+ readonly host: string;
249
+ readonly agentId: string;
250
+ readonly name: string;
251
+ readonly paneId: string;
252
+ readonly relationship?: {
253
+ readonly parentAgentId: string;
254
+ readonly relation: "delegated" | "pair" | "review";
255
+ };
256
+ };
257
+ readonly worktree: string;
258
+ readonly branch: string;
259
+ } | {
260
+ readonly kind: "work.admit";
261
+ readonly repository: string;
262
+ readonly pullRequest: number;
263
+ readonly reviewUrl: string;
264
+ readonly goalId: string;
265
+ readonly laneId: string;
266
+ readonly operationId: string;
267
+ readonly expectedAbsenceToken: string;
268
+ readonly head: string;
269
+ readonly baseHead: string;
270
+ readonly owner: {
271
+ readonly id: string;
272
+ readonly name: string;
273
+ };
274
+ readonly sessionId: string;
275
+ readonly expectedWork: string;
276
+ readonly worker: {
277
+ readonly host: string;
278
+ readonly agentId: string;
279
+ readonly name: string;
280
+ readonly paneId: string;
281
+ readonly relationship?: {
282
+ readonly parentAgentId: string;
283
+ readonly relation: "delegated" | "pair" | "review";
284
+ };
285
+ };
286
+ readonly worktree: string;
287
+ readonly branch: string;
288
+ readonly title: string;
289
+ readonly summary: string;
290
+ readonly detail: string;
291
+ } | {
292
+ readonly kind: "work.recover";
293
+ readonly repository: string;
294
+ readonly pullRequest: number;
295
+ readonly reviewUrl: string;
296
+ readonly goalId: string;
297
+ readonly laneId: string;
298
+ readonly operationId: string;
299
+ readonly expectedGoalEventId: string;
300
+ readonly expectedGoalUpdatedAt: number;
301
+ readonly expectedHistoryToken: string;
302
+ readonly head: string;
303
+ readonly baseHead: string;
304
+ readonly owner: {
305
+ readonly id: string;
306
+ readonly name: string;
307
+ };
308
+ readonly sessionId: string;
309
+ readonly expectedWork: string;
310
+ readonly worker: {
311
+ readonly host: string;
312
+ readonly agentId: string;
313
+ readonly name: string;
314
+ readonly paneId: string;
315
+ readonly relationship?: {
316
+ readonly parentAgentId: string;
317
+ readonly relation: "delegated" | "pair" | "review";
318
+ };
319
+ };
320
+ readonly worktree: string;
321
+ readonly branch: string;
322
+ } | {
323
+ readonly kind: "work.reassign";
324
+ readonly goalId: string;
325
+ readonly from: {
326
+ readonly id: string;
327
+ readonly name: string;
328
+ };
329
+ readonly to: {
330
+ readonly id: string;
331
+ readonly name: string;
332
+ };
333
+ readonly toAgent: {
334
+ readonly _tag: "clear";
335
+ } | {
336
+ readonly _tag: "keep";
337
+ } | {
338
+ readonly _tag: "set";
339
+ readonly agent: {
340
+ readonly host: string;
341
+ readonly agentId: string;
342
+ readonly name: string;
343
+ readonly paneId: string;
344
+ readonly relationship?: {
345
+ readonly parentAgentId: string;
346
+ readonly relation: "delegated" | "pair" | "review";
347
+ };
348
+ };
349
+ };
350
+ readonly reason: string;
351
+ readonly expectedGoalEventId: string;
352
+ readonly expectedGoalUpdatedAt: number;
99
353
  } | {
100
354
  readonly kind: "browser.mcp.recover";
101
355
  };
102
356
  readonly result: string | null;
357
+ readonly acceptedReceipt?: string | null;
358
+ readonly durableOperation?: true;
103
359
  readonly error: string | null;
104
360
  readonly worker?: {
105
361
  readonly host: string;
@@ -117,7 +373,7 @@ export declare const makeHerdrTerminalConnector: (config: {
117
373
  readonly url: string;
118
374
  };
119
375
  readonly workerTerminalObservedAt?: number | null;
120
- }, import("@knpkv/herdr-fleet").FleetJobConflictError | import("@knpkv/herdr-fleet").FleetOperationError | import("@knpkv/herdr-fleet").FleetStoreError | import("@knpkv/herdr-fleet").FleetValidationError, never>;
376
+ }, import("@knpkv/herdr-fleet").FleetJobConflictError | import("@knpkv/herdr-fleet").FleetOperationError | import("@knpkv/herdr-fleet").FleetOperationUnavailableError | import("@knpkv/herdr-fleet").FleetStoreError | import("@knpkv/herdr-fleet").FleetValidationError, never>;
121
377
  approve: (jobId: string, approval: import("@knpkv/herdr-fleet").Approval, actor: string) => Effect.Effect<{
122
378
  readonly id: string;
123
379
  readonly createdAt: number;
@@ -141,16 +397,142 @@ export declare const makeHerdrTerminalConnector: (config: {
141
397
  readonly kind: "agent.delegate";
142
398
  readonly repository: string;
143
399
  readonly prompt: string;
144
- readonly mode: "consult" | "review" | "work";
400
+ readonly mode: "consult" | "review" | "transition_summary" | "work";
145
401
  readonly channel?: "coordinator_chat";
146
402
  } | {
147
403
  readonly kind: "agent.message";
148
404
  readonly session: string;
149
405
  readonly message: string;
406
+ } | {
407
+ readonly kind: "work.reconcile";
408
+ readonly repository: string;
409
+ readonly pullRequest: number;
410
+ readonly goalId: string;
411
+ readonly laneId: string;
412
+ readonly operationId: string;
413
+ readonly expectedRevision: number;
414
+ readonly expectedHead: string;
415
+ readonly newHead: string;
416
+ readonly expectedOwner: {
417
+ readonly id: string;
418
+ readonly name: string;
419
+ };
420
+ readonly expectedGoalEventId: string;
421
+ readonly bindingDispatchRequestId: string;
422
+ readonly sessionId: string;
423
+ readonly expectedWork: string;
424
+ readonly worker: {
425
+ readonly host: string;
426
+ readonly agentId: string;
427
+ readonly name: string;
428
+ readonly paneId: string;
429
+ readonly relationship?: {
430
+ readonly parentAgentId: string;
431
+ readonly relation: "delegated" | "pair" | "review";
432
+ };
433
+ };
434
+ readonly worktree: string;
435
+ readonly branch: string;
436
+ } | {
437
+ readonly kind: "work.admit";
438
+ readonly repository: string;
439
+ readonly pullRequest: number;
440
+ readonly reviewUrl: string;
441
+ readonly goalId: string;
442
+ readonly laneId: string;
443
+ readonly operationId: string;
444
+ readonly expectedAbsenceToken: string;
445
+ readonly head: string;
446
+ readonly baseHead: string;
447
+ readonly owner: {
448
+ readonly id: string;
449
+ readonly name: string;
450
+ };
451
+ readonly sessionId: string;
452
+ readonly expectedWork: string;
453
+ readonly worker: {
454
+ readonly host: string;
455
+ readonly agentId: string;
456
+ readonly name: string;
457
+ readonly paneId: string;
458
+ readonly relationship?: {
459
+ readonly parentAgentId: string;
460
+ readonly relation: "delegated" | "pair" | "review";
461
+ };
462
+ };
463
+ readonly worktree: string;
464
+ readonly branch: string;
465
+ readonly title: string;
466
+ readonly summary: string;
467
+ readonly detail: string;
468
+ } | {
469
+ readonly kind: "work.recover";
470
+ readonly repository: string;
471
+ readonly pullRequest: number;
472
+ readonly reviewUrl: string;
473
+ readonly goalId: string;
474
+ readonly laneId: string;
475
+ readonly operationId: string;
476
+ readonly expectedGoalEventId: string;
477
+ readonly expectedGoalUpdatedAt: number;
478
+ readonly expectedHistoryToken: string;
479
+ readonly head: string;
480
+ readonly baseHead: string;
481
+ readonly owner: {
482
+ readonly id: string;
483
+ readonly name: string;
484
+ };
485
+ readonly sessionId: string;
486
+ readonly expectedWork: string;
487
+ readonly worker: {
488
+ readonly host: string;
489
+ readonly agentId: string;
490
+ readonly name: string;
491
+ readonly paneId: string;
492
+ readonly relationship?: {
493
+ readonly parentAgentId: string;
494
+ readonly relation: "delegated" | "pair" | "review";
495
+ };
496
+ };
497
+ readonly worktree: string;
498
+ readonly branch: string;
499
+ } | {
500
+ readonly kind: "work.reassign";
501
+ readonly goalId: string;
502
+ readonly from: {
503
+ readonly id: string;
504
+ readonly name: string;
505
+ };
506
+ readonly to: {
507
+ readonly id: string;
508
+ readonly name: string;
509
+ };
510
+ readonly toAgent: {
511
+ readonly _tag: "clear";
512
+ } | {
513
+ readonly _tag: "keep";
514
+ } | {
515
+ readonly _tag: "set";
516
+ readonly agent: {
517
+ readonly host: string;
518
+ readonly agentId: string;
519
+ readonly name: string;
520
+ readonly paneId: string;
521
+ readonly relationship?: {
522
+ readonly parentAgentId: string;
523
+ readonly relation: "delegated" | "pair" | "review";
524
+ };
525
+ };
526
+ };
527
+ readonly reason: string;
528
+ readonly expectedGoalEventId: string;
529
+ readonly expectedGoalUpdatedAt: number;
150
530
  } | {
151
531
  readonly kind: "browser.mcp.recover";
152
532
  };
153
533
  readonly result: string | null;
534
+ readonly acceptedReceipt?: string | null;
535
+ readonly durableOperation?: true;
154
536
  readonly error: string | null;
155
537
  readonly worker?: {
156
538
  readonly host: string;
@@ -192,16 +574,142 @@ export declare const makeHerdrTerminalConnector: (config: {
192
574
  readonly kind: "agent.delegate";
193
575
  readonly repository: string;
194
576
  readonly prompt: string;
195
- readonly mode: "consult" | "review" | "work";
577
+ readonly mode: "consult" | "review" | "transition_summary" | "work";
196
578
  readonly channel?: "coordinator_chat";
197
579
  } | {
198
580
  readonly kind: "agent.message";
199
581
  readonly session: string;
200
582
  readonly message: string;
583
+ } | {
584
+ readonly kind: "work.reconcile";
585
+ readonly repository: string;
586
+ readonly pullRequest: number;
587
+ readonly goalId: string;
588
+ readonly laneId: string;
589
+ readonly operationId: string;
590
+ readonly expectedRevision: number;
591
+ readonly expectedHead: string;
592
+ readonly newHead: string;
593
+ readonly expectedOwner: {
594
+ readonly id: string;
595
+ readonly name: string;
596
+ };
597
+ readonly expectedGoalEventId: string;
598
+ readonly bindingDispatchRequestId: string;
599
+ readonly sessionId: string;
600
+ readonly expectedWork: string;
601
+ readonly worker: {
602
+ readonly host: string;
603
+ readonly agentId: string;
604
+ readonly name: string;
605
+ readonly paneId: string;
606
+ readonly relationship?: {
607
+ readonly parentAgentId: string;
608
+ readonly relation: "delegated" | "pair" | "review";
609
+ };
610
+ };
611
+ readonly worktree: string;
612
+ readonly branch: string;
613
+ } | {
614
+ readonly kind: "work.admit";
615
+ readonly repository: string;
616
+ readonly pullRequest: number;
617
+ readonly reviewUrl: string;
618
+ readonly goalId: string;
619
+ readonly laneId: string;
620
+ readonly operationId: string;
621
+ readonly expectedAbsenceToken: string;
622
+ readonly head: string;
623
+ readonly baseHead: string;
624
+ readonly owner: {
625
+ readonly id: string;
626
+ readonly name: string;
627
+ };
628
+ readonly sessionId: string;
629
+ readonly expectedWork: string;
630
+ readonly worker: {
631
+ readonly host: string;
632
+ readonly agentId: string;
633
+ readonly name: string;
634
+ readonly paneId: string;
635
+ readonly relationship?: {
636
+ readonly parentAgentId: string;
637
+ readonly relation: "delegated" | "pair" | "review";
638
+ };
639
+ };
640
+ readonly worktree: string;
641
+ readonly branch: string;
642
+ readonly title: string;
643
+ readonly summary: string;
644
+ readonly detail: string;
645
+ } | {
646
+ readonly kind: "work.recover";
647
+ readonly repository: string;
648
+ readonly pullRequest: number;
649
+ readonly reviewUrl: string;
650
+ readonly goalId: string;
651
+ readonly laneId: string;
652
+ readonly operationId: string;
653
+ readonly expectedGoalEventId: string;
654
+ readonly expectedGoalUpdatedAt: number;
655
+ readonly expectedHistoryToken: string;
656
+ readonly head: string;
657
+ readonly baseHead: string;
658
+ readonly owner: {
659
+ readonly id: string;
660
+ readonly name: string;
661
+ };
662
+ readonly sessionId: string;
663
+ readonly expectedWork: string;
664
+ readonly worker: {
665
+ readonly host: string;
666
+ readonly agentId: string;
667
+ readonly name: string;
668
+ readonly paneId: string;
669
+ readonly relationship?: {
670
+ readonly parentAgentId: string;
671
+ readonly relation: "delegated" | "pair" | "review";
672
+ };
673
+ };
674
+ readonly worktree: string;
675
+ readonly branch: string;
676
+ } | {
677
+ readonly kind: "work.reassign";
678
+ readonly goalId: string;
679
+ readonly from: {
680
+ readonly id: string;
681
+ readonly name: string;
682
+ };
683
+ readonly to: {
684
+ readonly id: string;
685
+ readonly name: string;
686
+ };
687
+ readonly toAgent: {
688
+ readonly _tag: "clear";
689
+ } | {
690
+ readonly _tag: "keep";
691
+ } | {
692
+ readonly _tag: "set";
693
+ readonly agent: {
694
+ readonly host: string;
695
+ readonly agentId: string;
696
+ readonly name: string;
697
+ readonly paneId: string;
698
+ readonly relationship?: {
699
+ readonly parentAgentId: string;
700
+ readonly relation: "delegated" | "pair" | "review";
701
+ };
702
+ };
703
+ };
704
+ readonly reason: string;
705
+ readonly expectedGoalEventId: string;
706
+ readonly expectedGoalUpdatedAt: number;
201
707
  } | {
202
708
  readonly kind: "browser.mcp.recover";
203
709
  };
204
710
  readonly result: string | null;
711
+ readonly acceptedReceipt?: string | null;
712
+ readonly durableOperation?: true;
205
713
  readonly error: string | null;
206
714
  readonly worker?: {
207
715
  readonly host: string;
@@ -243,16 +751,142 @@ export declare const makeHerdrTerminalConnector: (config: {
243
751
  readonly kind: "agent.delegate";
244
752
  readonly repository: string;
245
753
  readonly prompt: string;
246
- readonly mode: "consult" | "review" | "work";
754
+ readonly mode: "consult" | "review" | "transition_summary" | "work";
247
755
  readonly channel?: "coordinator_chat";
248
756
  } | {
249
757
  readonly kind: "agent.message";
250
758
  readonly session: string;
251
759
  readonly message: string;
760
+ } | {
761
+ readonly kind: "work.reconcile";
762
+ readonly repository: string;
763
+ readonly pullRequest: number;
764
+ readonly goalId: string;
765
+ readonly laneId: string;
766
+ readonly operationId: string;
767
+ readonly expectedRevision: number;
768
+ readonly expectedHead: string;
769
+ readonly newHead: string;
770
+ readonly expectedOwner: {
771
+ readonly id: string;
772
+ readonly name: string;
773
+ };
774
+ readonly expectedGoalEventId: string;
775
+ readonly bindingDispatchRequestId: string;
776
+ readonly sessionId: string;
777
+ readonly expectedWork: string;
778
+ readonly worker: {
779
+ readonly host: string;
780
+ readonly agentId: string;
781
+ readonly name: string;
782
+ readonly paneId: string;
783
+ readonly relationship?: {
784
+ readonly parentAgentId: string;
785
+ readonly relation: "delegated" | "pair" | "review";
786
+ };
787
+ };
788
+ readonly worktree: string;
789
+ readonly branch: string;
790
+ } | {
791
+ readonly kind: "work.admit";
792
+ readonly repository: string;
793
+ readonly pullRequest: number;
794
+ readonly reviewUrl: string;
795
+ readonly goalId: string;
796
+ readonly laneId: string;
797
+ readonly operationId: string;
798
+ readonly expectedAbsenceToken: string;
799
+ readonly head: string;
800
+ readonly baseHead: string;
801
+ readonly owner: {
802
+ readonly id: string;
803
+ readonly name: string;
804
+ };
805
+ readonly sessionId: string;
806
+ readonly expectedWork: string;
807
+ readonly worker: {
808
+ readonly host: string;
809
+ readonly agentId: string;
810
+ readonly name: string;
811
+ readonly paneId: string;
812
+ readonly relationship?: {
813
+ readonly parentAgentId: string;
814
+ readonly relation: "delegated" | "pair" | "review";
815
+ };
816
+ };
817
+ readonly worktree: string;
818
+ readonly branch: string;
819
+ readonly title: string;
820
+ readonly summary: string;
821
+ readonly detail: string;
822
+ } | {
823
+ readonly kind: "work.recover";
824
+ readonly repository: string;
825
+ readonly pullRequest: number;
826
+ readonly reviewUrl: string;
827
+ readonly goalId: string;
828
+ readonly laneId: string;
829
+ readonly operationId: string;
830
+ readonly expectedGoalEventId: string;
831
+ readonly expectedGoalUpdatedAt: number;
832
+ readonly expectedHistoryToken: string;
833
+ readonly head: string;
834
+ readonly baseHead: string;
835
+ readonly owner: {
836
+ readonly id: string;
837
+ readonly name: string;
838
+ };
839
+ readonly sessionId: string;
840
+ readonly expectedWork: string;
841
+ readonly worker: {
842
+ readonly host: string;
843
+ readonly agentId: string;
844
+ readonly name: string;
845
+ readonly paneId: string;
846
+ readonly relationship?: {
847
+ readonly parentAgentId: string;
848
+ readonly relation: "delegated" | "pair" | "review";
849
+ };
850
+ };
851
+ readonly worktree: string;
852
+ readonly branch: string;
853
+ } | {
854
+ readonly kind: "work.reassign";
855
+ readonly goalId: string;
856
+ readonly from: {
857
+ readonly id: string;
858
+ readonly name: string;
859
+ };
860
+ readonly to: {
861
+ readonly id: string;
862
+ readonly name: string;
863
+ };
864
+ readonly toAgent: {
865
+ readonly _tag: "clear";
866
+ } | {
867
+ readonly _tag: "keep";
868
+ } | {
869
+ readonly _tag: "set";
870
+ readonly agent: {
871
+ readonly host: string;
872
+ readonly agentId: string;
873
+ readonly name: string;
874
+ readonly paneId: string;
875
+ readonly relationship?: {
876
+ readonly parentAgentId: string;
877
+ readonly relation: "delegated" | "pair" | "review";
878
+ };
879
+ };
880
+ };
881
+ readonly reason: string;
882
+ readonly expectedGoalEventId: string;
883
+ readonly expectedGoalUpdatedAt: number;
252
884
  } | {
253
885
  readonly kind: "browser.mcp.recover";
254
886
  };
255
887
  readonly result: string | null;
888
+ readonly acceptedReceipt?: string | null;
889
+ readonly durableOperation?: true;
256
890
  readonly error: string | null;
257
891
  readonly worker?: {
258
892
  readonly host: string;
@@ -270,7 +904,7 @@ export declare const makeHerdrTerminalConnector: (config: {
270
904
  readonly url: string;
271
905
  };
272
906
  readonly workerTerminalObservedAt?: number | null;
273
- }, import("@knpkv/herdr-fleet").FleetApprovalError | import("@knpkv/herdr-fleet").FleetJobNotFoundError | import("@knpkv/herdr-fleet").FleetStoreError | import("@knpkv/herdr-fleet").FleetTransitionConflictError, never>;
907
+ }, import("@knpkv/herdr-fleet").FleetApprovalError | import("@knpkv/herdr-fleet").FleetJobNotFoundError | import("@knpkv/herdr-fleet").FleetOperationError | import("@knpkv/herdr-fleet").FleetStoreError | import("@knpkv/herdr-fleet").FleetTransitionConflictError | import("@knpkv/herdr-fleet").FleetValidationError, never>;
274
908
  runCoordinatorChat: (jobId: string) => Effect.Effect<{
275
909
  readonly id: string;
276
910
  readonly createdAt: number;
@@ -294,16 +928,142 @@ export declare const makeHerdrTerminalConnector: (config: {
294
928
  readonly kind: "agent.delegate";
295
929
  readonly repository: string;
296
930
  readonly prompt: string;
297
- readonly mode: "consult" | "review" | "work";
931
+ readonly mode: "consult" | "review" | "transition_summary" | "work";
298
932
  readonly channel?: "coordinator_chat";
299
933
  } | {
300
934
  readonly kind: "agent.message";
301
935
  readonly session: string;
302
936
  readonly message: string;
937
+ } | {
938
+ readonly kind: "work.reconcile";
939
+ readonly repository: string;
940
+ readonly pullRequest: number;
941
+ readonly goalId: string;
942
+ readonly laneId: string;
943
+ readonly operationId: string;
944
+ readonly expectedRevision: number;
945
+ readonly expectedHead: string;
946
+ readonly newHead: string;
947
+ readonly expectedOwner: {
948
+ readonly id: string;
949
+ readonly name: string;
950
+ };
951
+ readonly expectedGoalEventId: string;
952
+ readonly bindingDispatchRequestId: string;
953
+ readonly sessionId: string;
954
+ readonly expectedWork: string;
955
+ readonly worker: {
956
+ readonly host: string;
957
+ readonly agentId: string;
958
+ readonly name: string;
959
+ readonly paneId: string;
960
+ readonly relationship?: {
961
+ readonly parentAgentId: string;
962
+ readonly relation: "delegated" | "pair" | "review";
963
+ };
964
+ };
965
+ readonly worktree: string;
966
+ readonly branch: string;
967
+ } | {
968
+ readonly kind: "work.admit";
969
+ readonly repository: string;
970
+ readonly pullRequest: number;
971
+ readonly reviewUrl: string;
972
+ readonly goalId: string;
973
+ readonly laneId: string;
974
+ readonly operationId: string;
975
+ readonly expectedAbsenceToken: string;
976
+ readonly head: string;
977
+ readonly baseHead: string;
978
+ readonly owner: {
979
+ readonly id: string;
980
+ readonly name: string;
981
+ };
982
+ readonly sessionId: string;
983
+ readonly expectedWork: string;
984
+ readonly worker: {
985
+ readonly host: string;
986
+ readonly agentId: string;
987
+ readonly name: string;
988
+ readonly paneId: string;
989
+ readonly relationship?: {
990
+ readonly parentAgentId: string;
991
+ readonly relation: "delegated" | "pair" | "review";
992
+ };
993
+ };
994
+ readonly worktree: string;
995
+ readonly branch: string;
996
+ readonly title: string;
997
+ readonly summary: string;
998
+ readonly detail: string;
999
+ } | {
1000
+ readonly kind: "work.recover";
1001
+ readonly repository: string;
1002
+ readonly pullRequest: number;
1003
+ readonly reviewUrl: string;
1004
+ readonly goalId: string;
1005
+ readonly laneId: string;
1006
+ readonly operationId: string;
1007
+ readonly expectedGoalEventId: string;
1008
+ readonly expectedGoalUpdatedAt: number;
1009
+ readonly expectedHistoryToken: string;
1010
+ readonly head: string;
1011
+ readonly baseHead: string;
1012
+ readonly owner: {
1013
+ readonly id: string;
1014
+ readonly name: string;
1015
+ };
1016
+ readonly sessionId: string;
1017
+ readonly expectedWork: string;
1018
+ readonly worker: {
1019
+ readonly host: string;
1020
+ readonly agentId: string;
1021
+ readonly name: string;
1022
+ readonly paneId: string;
1023
+ readonly relationship?: {
1024
+ readonly parentAgentId: string;
1025
+ readonly relation: "delegated" | "pair" | "review";
1026
+ };
1027
+ };
1028
+ readonly worktree: string;
1029
+ readonly branch: string;
1030
+ } | {
1031
+ readonly kind: "work.reassign";
1032
+ readonly goalId: string;
1033
+ readonly from: {
1034
+ readonly id: string;
1035
+ readonly name: string;
1036
+ };
1037
+ readonly to: {
1038
+ readonly id: string;
1039
+ readonly name: string;
1040
+ };
1041
+ readonly toAgent: {
1042
+ readonly _tag: "clear";
1043
+ } | {
1044
+ readonly _tag: "keep";
1045
+ } | {
1046
+ readonly _tag: "set";
1047
+ readonly agent: {
1048
+ readonly host: string;
1049
+ readonly agentId: string;
1050
+ readonly name: string;
1051
+ readonly paneId: string;
1052
+ readonly relationship?: {
1053
+ readonly parentAgentId: string;
1054
+ readonly relation: "delegated" | "pair" | "review";
1055
+ };
1056
+ };
1057
+ };
1058
+ readonly reason: string;
1059
+ readonly expectedGoalEventId: string;
1060
+ readonly expectedGoalUpdatedAt: number;
303
1061
  } | {
304
1062
  readonly kind: "browser.mcp.recover";
305
1063
  };
306
1064
  readonly result: string | null;
1065
+ readonly acceptedReceipt?: string | null;
1066
+ readonly durableOperation?: true;
307
1067
  readonly error: string | null;
308
1068
  readonly worker?: {
309
1069
  readonly host: string;
@@ -321,7 +1081,7 @@ export declare const makeHerdrTerminalConnector: (config: {
321
1081
  readonly url: string;
322
1082
  };
323
1083
  readonly workerTerminalObservedAt?: number | null;
324
- }, import("@knpkv/herdr-fleet").FleetApprovalError | import("@knpkv/herdr-fleet").FleetJobNotFoundError | import("@knpkv/herdr-fleet").FleetStoreError | import("@knpkv/herdr-fleet").FleetTransitionConflictError | import("@knpkv/herdr-fleet").FleetValidationError, never>;
1084
+ }, import("@knpkv/herdr-fleet").FleetApprovalError | import("@knpkv/herdr-fleet").FleetJobNotFoundError | import("@knpkv/herdr-fleet").FleetOperationError | import("@knpkv/herdr-fleet").FleetStoreError | import("@knpkv/herdr-fleet").FleetTransitionConflictError | import("@knpkv/herdr-fleet").FleetValidationError, never>;
325
1085
  get: (jobId: string) => Effect.Effect<{
326
1086
  readonly id: string;
327
1087
  readonly createdAt: number;
@@ -342,19 +1102,145 @@ export declare const makeHerdrTerminalConnector: (config: {
342
1102
  readonly kind: "nix.apply";
343
1103
  readonly ref: string;
344
1104
  } | {
345
- readonly kind: "agent.delegate";
1105
+ readonly kind: "agent.delegate";
1106
+ readonly repository: string;
1107
+ readonly prompt: string;
1108
+ readonly mode: "consult" | "review" | "transition_summary" | "work";
1109
+ readonly channel?: "coordinator_chat";
1110
+ } | {
1111
+ readonly kind: "agent.message";
1112
+ readonly session: string;
1113
+ readonly message: string;
1114
+ } | {
1115
+ readonly kind: "work.reconcile";
1116
+ readonly repository: string;
1117
+ readonly pullRequest: number;
1118
+ readonly goalId: string;
1119
+ readonly laneId: string;
1120
+ readonly operationId: string;
1121
+ readonly expectedRevision: number;
1122
+ readonly expectedHead: string;
1123
+ readonly newHead: string;
1124
+ readonly expectedOwner: {
1125
+ readonly id: string;
1126
+ readonly name: string;
1127
+ };
1128
+ readonly expectedGoalEventId: string;
1129
+ readonly bindingDispatchRequestId: string;
1130
+ readonly sessionId: string;
1131
+ readonly expectedWork: string;
1132
+ readonly worker: {
1133
+ readonly host: string;
1134
+ readonly agentId: string;
1135
+ readonly name: string;
1136
+ readonly paneId: string;
1137
+ readonly relationship?: {
1138
+ readonly parentAgentId: string;
1139
+ readonly relation: "delegated" | "pair" | "review";
1140
+ };
1141
+ };
1142
+ readonly worktree: string;
1143
+ readonly branch: string;
1144
+ } | {
1145
+ readonly kind: "work.admit";
1146
+ readonly repository: string;
1147
+ readonly pullRequest: number;
1148
+ readonly reviewUrl: string;
1149
+ readonly goalId: string;
1150
+ readonly laneId: string;
1151
+ readonly operationId: string;
1152
+ readonly expectedAbsenceToken: string;
1153
+ readonly head: string;
1154
+ readonly baseHead: string;
1155
+ readonly owner: {
1156
+ readonly id: string;
1157
+ readonly name: string;
1158
+ };
1159
+ readonly sessionId: string;
1160
+ readonly expectedWork: string;
1161
+ readonly worker: {
1162
+ readonly host: string;
1163
+ readonly agentId: string;
1164
+ readonly name: string;
1165
+ readonly paneId: string;
1166
+ readonly relationship?: {
1167
+ readonly parentAgentId: string;
1168
+ readonly relation: "delegated" | "pair" | "review";
1169
+ };
1170
+ };
1171
+ readonly worktree: string;
1172
+ readonly branch: string;
1173
+ readonly title: string;
1174
+ readonly summary: string;
1175
+ readonly detail: string;
1176
+ } | {
1177
+ readonly kind: "work.recover";
346
1178
  readonly repository: string;
347
- readonly prompt: string;
348
- readonly mode: "consult" | "review" | "work";
349
- readonly channel?: "coordinator_chat";
1179
+ readonly pullRequest: number;
1180
+ readonly reviewUrl: string;
1181
+ readonly goalId: string;
1182
+ readonly laneId: string;
1183
+ readonly operationId: string;
1184
+ readonly expectedGoalEventId: string;
1185
+ readonly expectedGoalUpdatedAt: number;
1186
+ readonly expectedHistoryToken: string;
1187
+ readonly head: string;
1188
+ readonly baseHead: string;
1189
+ readonly owner: {
1190
+ readonly id: string;
1191
+ readonly name: string;
1192
+ };
1193
+ readonly sessionId: string;
1194
+ readonly expectedWork: string;
1195
+ readonly worker: {
1196
+ readonly host: string;
1197
+ readonly agentId: string;
1198
+ readonly name: string;
1199
+ readonly paneId: string;
1200
+ readonly relationship?: {
1201
+ readonly parentAgentId: string;
1202
+ readonly relation: "delegated" | "pair" | "review";
1203
+ };
1204
+ };
1205
+ readonly worktree: string;
1206
+ readonly branch: string;
350
1207
  } | {
351
- readonly kind: "agent.message";
352
- readonly session: string;
353
- readonly message: string;
1208
+ readonly kind: "work.reassign";
1209
+ readonly goalId: string;
1210
+ readonly from: {
1211
+ readonly id: string;
1212
+ readonly name: string;
1213
+ };
1214
+ readonly to: {
1215
+ readonly id: string;
1216
+ readonly name: string;
1217
+ };
1218
+ readonly toAgent: {
1219
+ readonly _tag: "clear";
1220
+ } | {
1221
+ readonly _tag: "keep";
1222
+ } | {
1223
+ readonly _tag: "set";
1224
+ readonly agent: {
1225
+ readonly host: string;
1226
+ readonly agentId: string;
1227
+ readonly name: string;
1228
+ readonly paneId: string;
1229
+ readonly relationship?: {
1230
+ readonly parentAgentId: string;
1231
+ readonly relation: "delegated" | "pair" | "review";
1232
+ };
1233
+ };
1234
+ };
1235
+ readonly reason: string;
1236
+ readonly expectedGoalEventId: string;
1237
+ readonly expectedGoalUpdatedAt: number;
354
1238
  } | {
355
1239
  readonly kind: "browser.mcp.recover";
356
1240
  };
357
1241
  readonly result: string | null;
1242
+ readonly acceptedReceipt?: string | null;
1243
+ readonly durableOperation?: true;
358
1244
  readonly error: string | null;
359
1245
  readonly worker?: {
360
1246
  readonly host: string;
@@ -396,16 +1282,142 @@ export declare const makeHerdrTerminalConnector: (config: {
396
1282
  readonly kind: "agent.delegate";
397
1283
  readonly repository: string;
398
1284
  readonly prompt: string;
399
- readonly mode: "consult" | "review" | "work";
1285
+ readonly mode: "consult" | "review" | "transition_summary" | "work";
400
1286
  readonly channel?: "coordinator_chat";
401
1287
  } | {
402
1288
  readonly kind: "agent.message";
403
1289
  readonly session: string;
404
1290
  readonly message: string;
1291
+ } | {
1292
+ readonly kind: "work.reconcile";
1293
+ readonly repository: string;
1294
+ readonly pullRequest: number;
1295
+ readonly goalId: string;
1296
+ readonly laneId: string;
1297
+ readonly operationId: string;
1298
+ readonly expectedRevision: number;
1299
+ readonly expectedHead: string;
1300
+ readonly newHead: string;
1301
+ readonly expectedOwner: {
1302
+ readonly id: string;
1303
+ readonly name: string;
1304
+ };
1305
+ readonly expectedGoalEventId: string;
1306
+ readonly bindingDispatchRequestId: string;
1307
+ readonly sessionId: string;
1308
+ readonly expectedWork: string;
1309
+ readonly worker: {
1310
+ readonly host: string;
1311
+ readonly agentId: string;
1312
+ readonly name: string;
1313
+ readonly paneId: string;
1314
+ readonly relationship?: {
1315
+ readonly parentAgentId: string;
1316
+ readonly relation: "delegated" | "pair" | "review";
1317
+ };
1318
+ };
1319
+ readonly worktree: string;
1320
+ readonly branch: string;
1321
+ } | {
1322
+ readonly kind: "work.admit";
1323
+ readonly repository: string;
1324
+ readonly pullRequest: number;
1325
+ readonly reviewUrl: string;
1326
+ readonly goalId: string;
1327
+ readonly laneId: string;
1328
+ readonly operationId: string;
1329
+ readonly expectedAbsenceToken: string;
1330
+ readonly head: string;
1331
+ readonly baseHead: string;
1332
+ readonly owner: {
1333
+ readonly id: string;
1334
+ readonly name: string;
1335
+ };
1336
+ readonly sessionId: string;
1337
+ readonly expectedWork: string;
1338
+ readonly worker: {
1339
+ readonly host: string;
1340
+ readonly agentId: string;
1341
+ readonly name: string;
1342
+ readonly paneId: string;
1343
+ readonly relationship?: {
1344
+ readonly parentAgentId: string;
1345
+ readonly relation: "delegated" | "pair" | "review";
1346
+ };
1347
+ };
1348
+ readonly worktree: string;
1349
+ readonly branch: string;
1350
+ readonly title: string;
1351
+ readonly summary: string;
1352
+ readonly detail: string;
1353
+ } | {
1354
+ readonly kind: "work.recover";
1355
+ readonly repository: string;
1356
+ readonly pullRequest: number;
1357
+ readonly reviewUrl: string;
1358
+ readonly goalId: string;
1359
+ readonly laneId: string;
1360
+ readonly operationId: string;
1361
+ readonly expectedGoalEventId: string;
1362
+ readonly expectedGoalUpdatedAt: number;
1363
+ readonly expectedHistoryToken: string;
1364
+ readonly head: string;
1365
+ readonly baseHead: string;
1366
+ readonly owner: {
1367
+ readonly id: string;
1368
+ readonly name: string;
1369
+ };
1370
+ readonly sessionId: string;
1371
+ readonly expectedWork: string;
1372
+ readonly worker: {
1373
+ readonly host: string;
1374
+ readonly agentId: string;
1375
+ readonly name: string;
1376
+ readonly paneId: string;
1377
+ readonly relationship?: {
1378
+ readonly parentAgentId: string;
1379
+ readonly relation: "delegated" | "pair" | "review";
1380
+ };
1381
+ };
1382
+ readonly worktree: string;
1383
+ readonly branch: string;
1384
+ } | {
1385
+ readonly kind: "work.reassign";
1386
+ readonly goalId: string;
1387
+ readonly from: {
1388
+ readonly id: string;
1389
+ readonly name: string;
1390
+ };
1391
+ readonly to: {
1392
+ readonly id: string;
1393
+ readonly name: string;
1394
+ };
1395
+ readonly toAgent: {
1396
+ readonly _tag: "clear";
1397
+ } | {
1398
+ readonly _tag: "keep";
1399
+ } | {
1400
+ readonly _tag: "set";
1401
+ readonly agent: {
1402
+ readonly host: string;
1403
+ readonly agentId: string;
1404
+ readonly name: string;
1405
+ readonly paneId: string;
1406
+ readonly relationship?: {
1407
+ readonly parentAgentId: string;
1408
+ readonly relation: "delegated" | "pair" | "review";
1409
+ };
1410
+ };
1411
+ };
1412
+ readonly reason: string;
1413
+ readonly expectedGoalEventId: string;
1414
+ readonly expectedGoalUpdatedAt: number;
405
1415
  } | {
406
1416
  readonly kind: "browser.mcp.recover";
407
1417
  };
408
1418
  readonly result: string | null;
1419
+ readonly acceptedReceipt?: string | null;
1420
+ readonly durableOperation?: true;
409
1421
  readonly error: string | null;
410
1422
  readonly worker?: {
411
1423
  readonly host: string;
@@ -450,16 +1462,142 @@ export declare const makeHerdrTerminalConnector: (config: {
450
1462
  readonly kind: "agent.delegate";
451
1463
  readonly repository: string;
452
1464
  readonly prompt: string;
453
- readonly mode: "consult" | "review" | "work";
1465
+ readonly mode: "consult" | "review" | "transition_summary" | "work";
454
1466
  readonly channel?: "coordinator_chat";
455
1467
  } | {
456
1468
  readonly kind: "agent.message";
457
1469
  readonly session: string;
458
1470
  readonly message: string;
1471
+ } | {
1472
+ readonly kind: "work.reconcile";
1473
+ readonly repository: string;
1474
+ readonly pullRequest: number;
1475
+ readonly goalId: string;
1476
+ readonly laneId: string;
1477
+ readonly operationId: string;
1478
+ readonly expectedRevision: number;
1479
+ readonly expectedHead: string;
1480
+ readonly newHead: string;
1481
+ readonly expectedOwner: {
1482
+ readonly id: string;
1483
+ readonly name: string;
1484
+ };
1485
+ readonly expectedGoalEventId: string;
1486
+ readonly bindingDispatchRequestId: string;
1487
+ readonly sessionId: string;
1488
+ readonly expectedWork: string;
1489
+ readonly worker: {
1490
+ readonly host: string;
1491
+ readonly agentId: string;
1492
+ readonly name: string;
1493
+ readonly paneId: string;
1494
+ readonly relationship?: {
1495
+ readonly parentAgentId: string;
1496
+ readonly relation: "delegated" | "pair" | "review";
1497
+ };
1498
+ };
1499
+ readonly worktree: string;
1500
+ readonly branch: string;
1501
+ } | {
1502
+ readonly kind: "work.admit";
1503
+ readonly repository: string;
1504
+ readonly pullRequest: number;
1505
+ readonly reviewUrl: string;
1506
+ readonly goalId: string;
1507
+ readonly laneId: string;
1508
+ readonly operationId: string;
1509
+ readonly expectedAbsenceToken: string;
1510
+ readonly head: string;
1511
+ readonly baseHead: string;
1512
+ readonly owner: {
1513
+ readonly id: string;
1514
+ readonly name: string;
1515
+ };
1516
+ readonly sessionId: string;
1517
+ readonly expectedWork: string;
1518
+ readonly worker: {
1519
+ readonly host: string;
1520
+ readonly agentId: string;
1521
+ readonly name: string;
1522
+ readonly paneId: string;
1523
+ readonly relationship?: {
1524
+ readonly parentAgentId: string;
1525
+ readonly relation: "delegated" | "pair" | "review";
1526
+ };
1527
+ };
1528
+ readonly worktree: string;
1529
+ readonly branch: string;
1530
+ readonly title: string;
1531
+ readonly summary: string;
1532
+ readonly detail: string;
1533
+ } | {
1534
+ readonly kind: "work.recover";
1535
+ readonly repository: string;
1536
+ readonly pullRequest: number;
1537
+ readonly reviewUrl: string;
1538
+ readonly goalId: string;
1539
+ readonly laneId: string;
1540
+ readonly operationId: string;
1541
+ readonly expectedGoalEventId: string;
1542
+ readonly expectedGoalUpdatedAt: number;
1543
+ readonly expectedHistoryToken: string;
1544
+ readonly head: string;
1545
+ readonly baseHead: string;
1546
+ readonly owner: {
1547
+ readonly id: string;
1548
+ readonly name: string;
1549
+ };
1550
+ readonly sessionId: string;
1551
+ readonly expectedWork: string;
1552
+ readonly worker: {
1553
+ readonly host: string;
1554
+ readonly agentId: string;
1555
+ readonly name: string;
1556
+ readonly paneId: string;
1557
+ readonly relationship?: {
1558
+ readonly parentAgentId: string;
1559
+ readonly relation: "delegated" | "pair" | "review";
1560
+ };
1561
+ };
1562
+ readonly worktree: string;
1563
+ readonly branch: string;
1564
+ } | {
1565
+ readonly kind: "work.reassign";
1566
+ readonly goalId: string;
1567
+ readonly from: {
1568
+ readonly id: string;
1569
+ readonly name: string;
1570
+ };
1571
+ readonly to: {
1572
+ readonly id: string;
1573
+ readonly name: string;
1574
+ };
1575
+ readonly toAgent: {
1576
+ readonly _tag: "clear";
1577
+ } | {
1578
+ readonly _tag: "keep";
1579
+ } | {
1580
+ readonly _tag: "set";
1581
+ readonly agent: {
1582
+ readonly host: string;
1583
+ readonly agentId: string;
1584
+ readonly name: string;
1585
+ readonly paneId: string;
1586
+ readonly relationship?: {
1587
+ readonly parentAgentId: string;
1588
+ readonly relation: "delegated" | "pair" | "review";
1589
+ };
1590
+ };
1591
+ };
1592
+ readonly reason: string;
1593
+ readonly expectedGoalEventId: string;
1594
+ readonly expectedGoalUpdatedAt: number;
459
1595
  } | {
460
1596
  readonly kind: "browser.mcp.recover";
461
1597
  };
462
1598
  readonly result: string | null;
1599
+ readonly acceptedReceipt?: string | null;
1600
+ readonly durableOperation?: true;
463
1601
  readonly error: string | null;
464
1602
  readonly worker?: {
465
1603
  readonly host: string;
@@ -505,16 +1643,142 @@ export declare const makeHerdrTerminalConnector: (config: {
505
1643
  readonly kind: "agent.delegate";
506
1644
  readonly repository: string;
507
1645
  readonly prompt: string;
508
- readonly mode: "consult" | "review" | "work";
1646
+ readonly mode: "consult" | "review" | "transition_summary" | "work";
509
1647
  readonly channel?: "coordinator_chat";
510
1648
  } | {
511
1649
  readonly kind: "agent.message";
512
1650
  readonly session: string;
513
1651
  readonly message: string;
1652
+ } | {
1653
+ readonly kind: "work.reconcile";
1654
+ readonly repository: string;
1655
+ readonly pullRequest: number;
1656
+ readonly goalId: string;
1657
+ readonly laneId: string;
1658
+ readonly operationId: string;
1659
+ readonly expectedRevision: number;
1660
+ readonly expectedHead: string;
1661
+ readonly newHead: string;
1662
+ readonly expectedOwner: {
1663
+ readonly id: string;
1664
+ readonly name: string;
1665
+ };
1666
+ readonly expectedGoalEventId: string;
1667
+ readonly bindingDispatchRequestId: string;
1668
+ readonly sessionId: string;
1669
+ readonly expectedWork: string;
1670
+ readonly worker: {
1671
+ readonly host: string;
1672
+ readonly agentId: string;
1673
+ readonly name: string;
1674
+ readonly paneId: string;
1675
+ readonly relationship?: {
1676
+ readonly parentAgentId: string;
1677
+ readonly relation: "delegated" | "pair" | "review";
1678
+ };
1679
+ };
1680
+ readonly worktree: string;
1681
+ readonly branch: string;
1682
+ } | {
1683
+ readonly kind: "work.admit";
1684
+ readonly repository: string;
1685
+ readonly pullRequest: number;
1686
+ readonly reviewUrl: string;
1687
+ readonly goalId: string;
1688
+ readonly laneId: string;
1689
+ readonly operationId: string;
1690
+ readonly expectedAbsenceToken: string;
1691
+ readonly head: string;
1692
+ readonly baseHead: string;
1693
+ readonly owner: {
1694
+ readonly id: string;
1695
+ readonly name: string;
1696
+ };
1697
+ readonly sessionId: string;
1698
+ readonly expectedWork: string;
1699
+ readonly worker: {
1700
+ readonly host: string;
1701
+ readonly agentId: string;
1702
+ readonly name: string;
1703
+ readonly paneId: string;
1704
+ readonly relationship?: {
1705
+ readonly parentAgentId: string;
1706
+ readonly relation: "delegated" | "pair" | "review";
1707
+ };
1708
+ };
1709
+ readonly worktree: string;
1710
+ readonly branch: string;
1711
+ readonly title: string;
1712
+ readonly summary: string;
1713
+ readonly detail: string;
1714
+ } | {
1715
+ readonly kind: "work.recover";
1716
+ readonly repository: string;
1717
+ readonly pullRequest: number;
1718
+ readonly reviewUrl: string;
1719
+ readonly goalId: string;
1720
+ readonly laneId: string;
1721
+ readonly operationId: string;
1722
+ readonly expectedGoalEventId: string;
1723
+ readonly expectedGoalUpdatedAt: number;
1724
+ readonly expectedHistoryToken: string;
1725
+ readonly head: string;
1726
+ readonly baseHead: string;
1727
+ readonly owner: {
1728
+ readonly id: string;
1729
+ readonly name: string;
1730
+ };
1731
+ readonly sessionId: string;
1732
+ readonly expectedWork: string;
1733
+ readonly worker: {
1734
+ readonly host: string;
1735
+ readonly agentId: string;
1736
+ readonly name: string;
1737
+ readonly paneId: string;
1738
+ readonly relationship?: {
1739
+ readonly parentAgentId: string;
1740
+ readonly relation: "delegated" | "pair" | "review";
1741
+ };
1742
+ };
1743
+ readonly worktree: string;
1744
+ readonly branch: string;
1745
+ } | {
1746
+ readonly kind: "work.reassign";
1747
+ readonly goalId: string;
1748
+ readonly from: {
1749
+ readonly id: string;
1750
+ readonly name: string;
1751
+ };
1752
+ readonly to: {
1753
+ readonly id: string;
1754
+ readonly name: string;
1755
+ };
1756
+ readonly toAgent: {
1757
+ readonly _tag: "clear";
1758
+ } | {
1759
+ readonly _tag: "keep";
1760
+ } | {
1761
+ readonly _tag: "set";
1762
+ readonly agent: {
1763
+ readonly host: string;
1764
+ readonly agentId: string;
1765
+ readonly name: string;
1766
+ readonly paneId: string;
1767
+ readonly relationship?: {
1768
+ readonly parentAgentId: string;
1769
+ readonly relation: "delegated" | "pair" | "review";
1770
+ };
1771
+ };
1772
+ };
1773
+ readonly reason: string;
1774
+ readonly expectedGoalEventId: string;
1775
+ readonly expectedGoalUpdatedAt: number;
514
1776
  } | {
515
1777
  readonly kind: "browser.mcp.recover";
516
1778
  };
517
1779
  readonly result: string | null;
1780
+ readonly acceptedReceipt?: string | null;
1781
+ readonly durableOperation?: true;
518
1782
  readonly error: string | null;
519
1783
  readonly worker?: {
520
1784
  readonly host: string;
@@ -565,16 +1829,142 @@ export declare const makeHerdrTerminalConnector: (config: {
565
1829
  readonly kind: "agent.delegate";
566
1830
  readonly repository: string;
567
1831
  readonly prompt: string;
568
- readonly mode: "consult" | "review" | "work";
1832
+ readonly mode: "consult" | "review" | "transition_summary" | "work";
569
1833
  readonly channel?: "coordinator_chat";
570
1834
  } | {
571
1835
  readonly kind: "agent.message";
572
1836
  readonly session: string;
573
1837
  readonly message: string;
1838
+ } | {
1839
+ readonly kind: "work.reconcile";
1840
+ readonly repository: string;
1841
+ readonly pullRequest: number;
1842
+ readonly goalId: string;
1843
+ readonly laneId: string;
1844
+ readonly operationId: string;
1845
+ readonly expectedRevision: number;
1846
+ readonly expectedHead: string;
1847
+ readonly newHead: string;
1848
+ readonly expectedOwner: {
1849
+ readonly id: string;
1850
+ readonly name: string;
1851
+ };
1852
+ readonly expectedGoalEventId: string;
1853
+ readonly bindingDispatchRequestId: string;
1854
+ readonly sessionId: string;
1855
+ readonly expectedWork: string;
1856
+ readonly worker: {
1857
+ readonly host: string;
1858
+ readonly agentId: string;
1859
+ readonly name: string;
1860
+ readonly paneId: string;
1861
+ readonly relationship?: {
1862
+ readonly parentAgentId: string;
1863
+ readonly relation: "delegated" | "pair" | "review";
1864
+ };
1865
+ };
1866
+ readonly worktree: string;
1867
+ readonly branch: string;
1868
+ } | {
1869
+ readonly kind: "work.admit";
1870
+ readonly repository: string;
1871
+ readonly pullRequest: number;
1872
+ readonly reviewUrl: string;
1873
+ readonly goalId: string;
1874
+ readonly laneId: string;
1875
+ readonly operationId: string;
1876
+ readonly expectedAbsenceToken: string;
1877
+ readonly head: string;
1878
+ readonly baseHead: string;
1879
+ readonly owner: {
1880
+ readonly id: string;
1881
+ readonly name: string;
1882
+ };
1883
+ readonly sessionId: string;
1884
+ readonly expectedWork: string;
1885
+ readonly worker: {
1886
+ readonly host: string;
1887
+ readonly agentId: string;
1888
+ readonly name: string;
1889
+ readonly paneId: string;
1890
+ readonly relationship?: {
1891
+ readonly parentAgentId: string;
1892
+ readonly relation: "delegated" | "pair" | "review";
1893
+ };
1894
+ };
1895
+ readonly worktree: string;
1896
+ readonly branch: string;
1897
+ readonly title: string;
1898
+ readonly summary: string;
1899
+ readonly detail: string;
1900
+ } | {
1901
+ readonly kind: "work.recover";
1902
+ readonly repository: string;
1903
+ readonly pullRequest: number;
1904
+ readonly reviewUrl: string;
1905
+ readonly goalId: string;
1906
+ readonly laneId: string;
1907
+ readonly operationId: string;
1908
+ readonly expectedGoalEventId: string;
1909
+ readonly expectedGoalUpdatedAt: number;
1910
+ readonly expectedHistoryToken: string;
1911
+ readonly head: string;
1912
+ readonly baseHead: string;
1913
+ readonly owner: {
1914
+ readonly id: string;
1915
+ readonly name: string;
1916
+ };
1917
+ readonly sessionId: string;
1918
+ readonly expectedWork: string;
1919
+ readonly worker: {
1920
+ readonly host: string;
1921
+ readonly agentId: string;
1922
+ readonly name: string;
1923
+ readonly paneId: string;
1924
+ readonly relationship?: {
1925
+ readonly parentAgentId: string;
1926
+ readonly relation: "delegated" | "pair" | "review";
1927
+ };
1928
+ };
1929
+ readonly worktree: string;
1930
+ readonly branch: string;
1931
+ } | {
1932
+ readonly kind: "work.reassign";
1933
+ readonly goalId: string;
1934
+ readonly from: {
1935
+ readonly id: string;
1936
+ readonly name: string;
1937
+ };
1938
+ readonly to: {
1939
+ readonly id: string;
1940
+ readonly name: string;
1941
+ };
1942
+ readonly toAgent: {
1943
+ readonly _tag: "clear";
1944
+ } | {
1945
+ readonly _tag: "keep";
1946
+ } | {
1947
+ readonly _tag: "set";
1948
+ readonly agent: {
1949
+ readonly host: string;
1950
+ readonly agentId: string;
1951
+ readonly name: string;
1952
+ readonly paneId: string;
1953
+ readonly relationship?: {
1954
+ readonly parentAgentId: string;
1955
+ readonly relation: "delegated" | "pair" | "review";
1956
+ };
1957
+ };
1958
+ };
1959
+ readonly reason: string;
1960
+ readonly expectedGoalEventId: string;
1961
+ readonly expectedGoalUpdatedAt: number;
574
1962
  } | {
575
1963
  readonly kind: "browser.mcp.recover";
576
1964
  };
577
1965
  readonly result: string | null;
1966
+ readonly acceptedReceipt?: string | null;
1967
+ readonly durableOperation?: true;
578
1968
  readonly error: string | null;
579
1969
  readonly worker?: {
580
1970
  readonly host: string;
@@ -621,16 +2011,142 @@ export declare const makeHerdrTerminalConnector: (config: {
621
2011
  readonly kind: "agent.delegate";
622
2012
  readonly repository: string;
623
2013
  readonly prompt: string;
624
- readonly mode: "consult" | "review" | "work";
2014
+ readonly mode: "consult" | "review" | "transition_summary" | "work";
625
2015
  readonly channel?: "coordinator_chat";
626
2016
  } | {
627
2017
  readonly kind: "agent.message";
628
2018
  readonly session: string;
629
2019
  readonly message: string;
2020
+ } | {
2021
+ readonly kind: "work.reconcile";
2022
+ readonly repository: string;
2023
+ readonly pullRequest: number;
2024
+ readonly goalId: string;
2025
+ readonly laneId: string;
2026
+ readonly operationId: string;
2027
+ readonly expectedRevision: number;
2028
+ readonly expectedHead: string;
2029
+ readonly newHead: string;
2030
+ readonly expectedOwner: {
2031
+ readonly id: string;
2032
+ readonly name: string;
2033
+ };
2034
+ readonly expectedGoalEventId: string;
2035
+ readonly bindingDispatchRequestId: string;
2036
+ readonly sessionId: string;
2037
+ readonly expectedWork: string;
2038
+ readonly worker: {
2039
+ readonly host: string;
2040
+ readonly agentId: string;
2041
+ readonly name: string;
2042
+ readonly paneId: string;
2043
+ readonly relationship?: {
2044
+ readonly parentAgentId: string;
2045
+ readonly relation: "delegated" | "pair" | "review";
2046
+ };
2047
+ };
2048
+ readonly worktree: string;
2049
+ readonly branch: string;
2050
+ } | {
2051
+ readonly kind: "work.admit";
2052
+ readonly repository: string;
2053
+ readonly pullRequest: number;
2054
+ readonly reviewUrl: string;
2055
+ readonly goalId: string;
2056
+ readonly laneId: string;
2057
+ readonly operationId: string;
2058
+ readonly expectedAbsenceToken: string;
2059
+ readonly head: string;
2060
+ readonly baseHead: string;
2061
+ readonly owner: {
2062
+ readonly id: string;
2063
+ readonly name: string;
2064
+ };
2065
+ readonly sessionId: string;
2066
+ readonly expectedWork: string;
2067
+ readonly worker: {
2068
+ readonly host: string;
2069
+ readonly agentId: string;
2070
+ readonly name: string;
2071
+ readonly paneId: string;
2072
+ readonly relationship?: {
2073
+ readonly parentAgentId: string;
2074
+ readonly relation: "delegated" | "pair" | "review";
2075
+ };
2076
+ };
2077
+ readonly worktree: string;
2078
+ readonly branch: string;
2079
+ readonly title: string;
2080
+ readonly summary: string;
2081
+ readonly detail: string;
2082
+ } | {
2083
+ readonly kind: "work.recover";
2084
+ readonly repository: string;
2085
+ readonly pullRequest: number;
2086
+ readonly reviewUrl: string;
2087
+ readonly goalId: string;
2088
+ readonly laneId: string;
2089
+ readonly operationId: string;
2090
+ readonly expectedGoalEventId: string;
2091
+ readonly expectedGoalUpdatedAt: number;
2092
+ readonly expectedHistoryToken: string;
2093
+ readonly head: string;
2094
+ readonly baseHead: string;
2095
+ readonly owner: {
2096
+ readonly id: string;
2097
+ readonly name: string;
2098
+ };
2099
+ readonly sessionId: string;
2100
+ readonly expectedWork: string;
2101
+ readonly worker: {
2102
+ readonly host: string;
2103
+ readonly agentId: string;
2104
+ readonly name: string;
2105
+ readonly paneId: string;
2106
+ readonly relationship?: {
2107
+ readonly parentAgentId: string;
2108
+ readonly relation: "delegated" | "pair" | "review";
2109
+ };
2110
+ };
2111
+ readonly worktree: string;
2112
+ readonly branch: string;
2113
+ } | {
2114
+ readonly kind: "work.reassign";
2115
+ readonly goalId: string;
2116
+ readonly from: {
2117
+ readonly id: string;
2118
+ readonly name: string;
2119
+ };
2120
+ readonly to: {
2121
+ readonly id: string;
2122
+ readonly name: string;
2123
+ };
2124
+ readonly toAgent: {
2125
+ readonly _tag: "clear";
2126
+ } | {
2127
+ readonly _tag: "keep";
2128
+ } | {
2129
+ readonly _tag: "set";
2130
+ readonly agent: {
2131
+ readonly host: string;
2132
+ readonly agentId: string;
2133
+ readonly name: string;
2134
+ readonly paneId: string;
2135
+ readonly relationship?: {
2136
+ readonly parentAgentId: string;
2137
+ readonly relation: "delegated" | "pair" | "review";
2138
+ };
2139
+ };
2140
+ };
2141
+ readonly reason: string;
2142
+ readonly expectedGoalEventId: string;
2143
+ readonly expectedGoalUpdatedAt: number;
630
2144
  } | {
631
2145
  readonly kind: "browser.mcp.recover";
632
2146
  };
633
2147
  readonly result: string | null;
2148
+ readonly acceptedReceipt?: string | null;
2149
+ readonly durableOperation?: true;
634
2150
  readonly error: string | null;
635
2151
  readonly worker?: {
636
2152
  readonly host: string;
@@ -700,7 +2216,7 @@ export declare const makeHerdrTerminalConnector: (config: {
700
2216
  readonly error: string | null;
701
2217
  };
702
2218
  }, import("@knpkv/herdr-fleet").FleetOperationError, never>;
703
- recover: () => Effect.Effect<string[], import("@knpkv/herdr-fleet").FleetStoreError | import("@knpkv/herdr-fleet").FleetTransitionConflictError, never>;
2219
+ recover: () => Effect.Effect<string[], import("@knpkv/herdr-fleet").FleetOperationError | import("@knpkv/herdr-fleet").FleetStoreError | import("@knpkv/herdr-fleet").FleetTransitionConflictError, never>;
704
2220
  abortSubmission: (jobId: string, detail: string) => Effect.Effect<{
705
2221
  readonly id: string;
706
2222
  readonly createdAt: number;
@@ -724,16 +2240,142 @@ export declare const makeHerdrTerminalConnector: (config: {
724
2240
  readonly kind: "agent.delegate";
725
2241
  readonly repository: string;
726
2242
  readonly prompt: string;
727
- readonly mode: "consult" | "review" | "work";
2243
+ readonly mode: "consult" | "review" | "transition_summary" | "work";
728
2244
  readonly channel?: "coordinator_chat";
729
2245
  } | {
730
2246
  readonly kind: "agent.message";
731
2247
  readonly session: string;
732
2248
  readonly message: string;
2249
+ } | {
2250
+ readonly kind: "work.reconcile";
2251
+ readonly repository: string;
2252
+ readonly pullRequest: number;
2253
+ readonly goalId: string;
2254
+ readonly laneId: string;
2255
+ readonly operationId: string;
2256
+ readonly expectedRevision: number;
2257
+ readonly expectedHead: string;
2258
+ readonly newHead: string;
2259
+ readonly expectedOwner: {
2260
+ readonly id: string;
2261
+ readonly name: string;
2262
+ };
2263
+ readonly expectedGoalEventId: string;
2264
+ readonly bindingDispatchRequestId: string;
2265
+ readonly sessionId: string;
2266
+ readonly expectedWork: string;
2267
+ readonly worker: {
2268
+ readonly host: string;
2269
+ readonly agentId: string;
2270
+ readonly name: string;
2271
+ readonly paneId: string;
2272
+ readonly relationship?: {
2273
+ readonly parentAgentId: string;
2274
+ readonly relation: "delegated" | "pair" | "review";
2275
+ };
2276
+ };
2277
+ readonly worktree: string;
2278
+ readonly branch: string;
2279
+ } | {
2280
+ readonly kind: "work.admit";
2281
+ readonly repository: string;
2282
+ readonly pullRequest: number;
2283
+ readonly reviewUrl: string;
2284
+ readonly goalId: string;
2285
+ readonly laneId: string;
2286
+ readonly operationId: string;
2287
+ readonly expectedAbsenceToken: string;
2288
+ readonly head: string;
2289
+ readonly baseHead: string;
2290
+ readonly owner: {
2291
+ readonly id: string;
2292
+ readonly name: string;
2293
+ };
2294
+ readonly sessionId: string;
2295
+ readonly expectedWork: string;
2296
+ readonly worker: {
2297
+ readonly host: string;
2298
+ readonly agentId: string;
2299
+ readonly name: string;
2300
+ readonly paneId: string;
2301
+ readonly relationship?: {
2302
+ readonly parentAgentId: string;
2303
+ readonly relation: "delegated" | "pair" | "review";
2304
+ };
2305
+ };
2306
+ readonly worktree: string;
2307
+ readonly branch: string;
2308
+ readonly title: string;
2309
+ readonly summary: string;
2310
+ readonly detail: string;
2311
+ } | {
2312
+ readonly kind: "work.recover";
2313
+ readonly repository: string;
2314
+ readonly pullRequest: number;
2315
+ readonly reviewUrl: string;
2316
+ readonly goalId: string;
2317
+ readonly laneId: string;
2318
+ readonly operationId: string;
2319
+ readonly expectedGoalEventId: string;
2320
+ readonly expectedGoalUpdatedAt: number;
2321
+ readonly expectedHistoryToken: string;
2322
+ readonly head: string;
2323
+ readonly baseHead: string;
2324
+ readonly owner: {
2325
+ readonly id: string;
2326
+ readonly name: string;
2327
+ };
2328
+ readonly sessionId: string;
2329
+ readonly expectedWork: string;
2330
+ readonly worker: {
2331
+ readonly host: string;
2332
+ readonly agentId: string;
2333
+ readonly name: string;
2334
+ readonly paneId: string;
2335
+ readonly relationship?: {
2336
+ readonly parentAgentId: string;
2337
+ readonly relation: "delegated" | "pair" | "review";
2338
+ };
2339
+ };
2340
+ readonly worktree: string;
2341
+ readonly branch: string;
2342
+ } | {
2343
+ readonly kind: "work.reassign";
2344
+ readonly goalId: string;
2345
+ readonly from: {
2346
+ readonly id: string;
2347
+ readonly name: string;
2348
+ };
2349
+ readonly to: {
2350
+ readonly id: string;
2351
+ readonly name: string;
2352
+ };
2353
+ readonly toAgent: {
2354
+ readonly _tag: "clear";
2355
+ } | {
2356
+ readonly _tag: "keep";
2357
+ } | {
2358
+ readonly _tag: "set";
2359
+ readonly agent: {
2360
+ readonly host: string;
2361
+ readonly agentId: string;
2362
+ readonly name: string;
2363
+ readonly paneId: string;
2364
+ readonly relationship?: {
2365
+ readonly parentAgentId: string;
2366
+ readonly relation: "delegated" | "pair" | "review";
2367
+ };
2368
+ };
2369
+ };
2370
+ readonly reason: string;
2371
+ readonly expectedGoalEventId: string;
2372
+ readonly expectedGoalUpdatedAt: number;
733
2373
  } | {
734
2374
  readonly kind: "browser.mcp.recover";
735
2375
  };
736
2376
  readonly result: string | null;
2377
+ readonly acceptedReceipt?: string | null;
2378
+ readonly durableOperation?: true;
737
2379
  readonly error: string | null;
738
2380
  readonly worker?: {
739
2381
  readonly host: string;