@hearsay-tools/squawk 0.18.0-pr3531.6331 → 0.18.0-pr3532.6324

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 (75) hide show
  1. package/dist/ci-wait/controller.d.ts +41 -41
  2. package/dist/ci-wait/tools.d.ts +4 -4
  3. package/dist/delegation/routes.d.ts +75 -75
  4. package/dist/delegation/transport.d.ts +20 -20
  5. package/dist/delegation/workspace-git.d.ts +2 -5
  6. package/dist/delegation/workspace-git.js +5 -11
  7. package/dist/delegation/workspace-git.js.map +1 -1
  8. package/dist/delegation/workspace.js +3 -3
  9. package/dist/delegation/workspace.js.map +1 -1
  10. package/dist/git-command.d.ts +14 -2
  11. package/dist/git-command.js +30 -3
  12. package/dist/git-command.js.map +1 -1
  13. package/dist/git-private-index.js +1 -2
  14. package/dist/git-private-index.js.map +1 -1
  15. package/dist/git-worktree-lock.js +5 -3
  16. package/dist/git-worktree-lock.js.map +1 -1
  17. package/dist/runs/store.d.ts +1 -1
  18. package/dist/runs/store.js +1 -1
  19. package/dist/server/activity-routes.d.ts +23 -23
  20. package/dist/server/checkout.js +1 -2
  21. package/dist/server/checkout.js.map +1 -1
  22. package/dist/server/create-project.js +2 -1
  23. package/dist/server/create-project.js.map +1 -1
  24. package/dist/server/forge/draft-pr.js +2 -1
  25. package/dist/server/forge/draft-pr.js.map +1 -1
  26. package/dist/server/git-changes.d.ts +18 -0
  27. package/dist/server/git-changes.js +22 -17
  28. package/dist/server/git-changes.js.map +1 -1
  29. package/dist/server/live-routes.d.ts +6 -6
  30. package/dist/server/repo-branches.js +2 -4
  31. package/dist/server/repo-branches.js.map +1 -1
  32. package/dist/server/repo-pull.js +2 -1
  33. package/dist/server/repo-pull.js.map +1 -1
  34. package/dist/server/server.js +24 -19
  35. package/dist/server/server.js.map +1 -1
  36. package/dist/server/workspace-live-routes.d.ts +6 -6
  37. package/dist/skills-remote.js +2 -1
  38. package/dist/skills-remote.js.map +1 -1
  39. package/dist/voice/routes.d.ts +19 -19
  40. package/dist/workflows/run/continuation-session.js +1 -1
  41. package/dist/workflows/run/continuation-session.js.map +1 -1
  42. package/dist/workflows/run/family-reconciler.d.ts +1 -0
  43. package/dist/workflows/run/family-reconciler.js +7 -0
  44. package/dist/workflows/run/family-reconciler.js.map +1 -1
  45. package/dist/workflows/run/input-delivery.d.ts +3 -2
  46. package/dist/workflows/run/input-delivery.js +34 -26
  47. package/dist/workflows/run/input-delivery.js.map +1 -1
  48. package/dist/workflows/run/input-receipts.js +2 -1
  49. package/dist/workflows/run/input-receipts.js.map +1 -1
  50. package/dist/workflows/run/session-events.js +1 -0
  51. package/dist/workflows/run/session-events.js.map +1 -1
  52. package/dist/workflows/run/step-session.js +1 -1
  53. package/dist/workflows/run/step-session.js.map +1 -1
  54. package/dist/workflows/run/turn-markers.d.ts +3 -0
  55. package/dist/workflows/run/turn-markers.js +11 -0
  56. package/dist/workflows/run/turn-markers.js.map +1 -1
  57. package/dist/workflows/run/turn-settler.js +2 -2
  58. package/dist/workflows/run/turn-settler.js.map +1 -1
  59. package/dist/workflows/run/types.d.ts +2 -0
  60. package/dist/workflows/run.d.ts +2 -2
  61. package/dist/workflows/run.js +1 -1
  62. package/dist/workflows/run.js.map +1 -1
  63. package/dist/workspace/config.js +1 -2
  64. package/dist/workspace/config.js.map +1 -1
  65. package/package.json +4 -4
  66. package/scripts/mock-claude.mjs +4 -4
  67. package/scripts/mock-codex-app-server.mjs +4 -4
  68. package/scripts/mock-cursor-print.mjs +6 -5
  69. package/scripts/mock-nudge.mjs +1 -1
  70. package/scripts/mock-opencode-serve.mjs +5 -4
  71. package/scripts/mock-scenario.mjs +18 -9
  72. package/scripts/mock-silent-tail.mjs +9 -1
  73. package/dist/core/host-path.d.ts +0 -5
  74. package/dist/core/host-path.js +0 -9
  75. package/dist/core/host-path.js.map +0 -1
@@ -280,12 +280,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
280
280
  "/api/v1/tools/ask": {
281
281
  $post: {
282
282
  output: {
283
- ok: false;
284
- code: 'unavailable';
283
+ code: 'capability_revoked';
285
284
  message: string;
286
285
  };
287
286
  outputFormat: "json";
288
- status: import("hono/utils/http-status").ContentfulStatusCode;
287
+ status: 401;
289
288
  input: {
290
289
  json: {
291
290
  questions: {
@@ -303,11 +302,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
303
302
  };
304
303
  } | {
305
304
  output: {
306
- code: 'capability_revoked';
305
+ ok: false;
306
+ code: 'unavailable';
307
307
  message: string;
308
308
  };
309
309
  outputFormat: "json";
310
- status: 401;
310
+ status: import("hono/utils/http-status").ContentfulStatusCode;
311
311
  input: {
312
312
  json: {
313
313
  questions: {
@@ -375,12 +375,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
375
375
  "/api/v1/tools/cancel-wait": {
376
376
  $post: {
377
377
  output: {
378
- cancelled: false;
379
- code: 'unavailable';
378
+ code: 'capability_revoked';
380
379
  message: string;
381
380
  };
382
381
  outputFormat: "json";
383
- status: import("hono/utils/http-status").ContentfulStatusCode;
382
+ status: 401;
384
383
  input: {
385
384
  json: {
386
385
  wait_id: string;
@@ -388,11 +387,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
388
387
  };
389
388
  } | {
390
389
  output: {
391
- code: 'capability_revoked';
390
+ cancelled: false;
391
+ code: 'unavailable';
392
392
  message: string;
393
393
  };
394
394
  outputFormat: "json";
395
- status: 401;
395
+ status: import("hono/utils/http-status").ContentfulStatusCode;
396
396
  input: {
397
397
  json: {
398
398
  wait_id: string;
@@ -440,12 +440,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
440
440
  "/api/v1/tools/done": {
441
441
  $post: {
442
442
  output: {
443
- ok: false;
444
- code: 'unavailable';
443
+ code: 'capability_revoked';
445
444
  message: string;
446
445
  };
447
446
  outputFormat: "json";
448
- status: import("hono/utils/http-status").ContentfulStatusCode;
447
+ status: 401;
449
448
  input: {
450
449
  json: {
451
450
  summary?: string | undefined;
@@ -453,11 +452,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
453
452
  };
454
453
  } | {
455
454
  output: {
456
- code: 'capability_revoked';
455
+ ok: false;
456
+ code: 'unavailable';
457
457
  message: string;
458
458
  };
459
459
  outputFormat: "json";
460
- status: 401;
460
+ status: import("hono/utils/http-status").ContentfulStatusCode;
461
461
  input: {
462
462
  json: {
463
463
  summary?: string | undefined;
@@ -525,13 +525,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
525
525
  "/api/v1/tools/preview-stop": {
526
526
  $post: {
527
527
  output: {
528
- ok: boolean;
529
- code: "adopted" | "approval_required" | "headless" | "invalid_input" | "not_registered" | "port_held" | "port_in_use" | "preview_disabled" | "restarted" | "stopped" | "unavailable" | "worktree_missing";
528
+ code: 'capability_revoked';
530
529
  message: string;
531
- hint: string;
532
530
  };
533
531
  outputFormat: "json";
534
- status: import("hono/utils/http-status").ContentfulStatusCode;
532
+ status: 401;
535
533
  input: {
536
534
  json: {
537
535
  port: number;
@@ -540,11 +538,13 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
540
538
  };
541
539
  } | {
542
540
  output: {
543
- code: 'capability_revoked';
541
+ ok: boolean;
542
+ code: "adopted" | "approval_required" | "headless" | "invalid_input" | "not_registered" | "port_held" | "port_in_use" | "preview_disabled" | "restarted" | "stopped" | "unavailable" | "worktree_missing";
544
543
  message: string;
544
+ hint: string;
545
545
  };
546
546
  outputFormat: "json";
547
- status: 401;
547
+ status: import("hono/utils/http-status").ContentfulStatusCode;
548
548
  input: {
549
549
  json: {
550
550
  port: number;
@@ -557,13 +557,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
557
557
  "/api/v1/tools/preview-serve": {
558
558
  $post: {
559
559
  output: {
560
- ok: boolean;
561
- code: "cezar_port" | "cwd_outside_worktree" | "headless" | "invalid_input" | "port_held" | "preview_disabled" | "registered" | "replaced" | "too_many" | "unavailable" | "worktree_missing";
560
+ code: 'capability_revoked';
562
561
  message: string;
563
- hint: string;
564
562
  };
565
563
  outputFormat: "json";
566
- status: import("hono/utils/http-status").ContentfulStatusCode;
564
+ status: 401;
567
565
  input: {
568
566
  json: {
569
567
  command: string;
@@ -575,11 +573,13 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
575
573
  };
576
574
  } | {
577
575
  output: {
578
- code: 'capability_revoked';
576
+ ok: boolean;
577
+ code: "cezar_port" | "cwd_outside_worktree" | "headless" | "invalid_input" | "port_held" | "preview_disabled" | "registered" | "replaced" | "too_many" | "unavailable" | "worktree_missing";
579
578
  message: string;
579
+ hint: string;
580
580
  };
581
581
  outputFormat: "json";
582
- status: 401;
582
+ status: import("hono/utils/http-status").ContentfulStatusCode;
583
583
  input: {
584
584
  json: {
585
585
  command: string;
@@ -595,12 +595,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
595
595
  "/api/v1/tools/schedule-task": {
596
596
  $post: {
597
597
  output: {
598
- ok: false;
599
- code: import('../contract/index.js').ScheduledTaskRefusalCode;
598
+ code: 'capability_revoked';
600
599
  message: string;
601
600
  };
602
601
  outputFormat: "json";
603
- status: import("hono/utils/http-status").ContentfulStatusCode;
602
+ status: 401;
604
603
  input: {
605
604
  json: {
606
605
  at?: string | undefined;
@@ -617,11 +616,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
617
616
  };
618
617
  } | {
619
618
  output: {
620
- code: 'capability_revoked';
619
+ ok: false;
620
+ code: import('../contract/index.js').ScheduledTaskRefusalCode;
621
621
  message: string;
622
622
  };
623
623
  outputFormat: "json";
624
- status: 401;
624
+ status: import("hono/utils/http-status").ContentfulStatusCode;
625
625
  input: {
626
626
  json: {
627
627
  at?: string | undefined;
@@ -638,6 +638,10 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
638
638
  };
639
639
  } | {
640
640
  output: {
641
+ ok: false;
642
+ code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
643
+ message: string;
644
+ } | {
641
645
  ok: true;
642
646
  task: {
643
647
  id: string;
@@ -649,10 +653,6 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
649
653
  url?: string | undefined;
650
654
  };
651
655
  note: string;
652
- } | {
653
- ok: false;
654
- code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
655
- message: string;
656
656
  };
657
657
  outputFormat: "json";
658
658
  status: import("hono/utils/http-status").ContentfulStatusCode;
@@ -676,12 +676,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
676
676
  "/api/v1/tools/scheduled-tasks": {
677
677
  $post: {
678
678
  output: {
679
- ok: false;
680
- code: import('../contract/index.js').ScheduledTaskRefusalCode;
679
+ code: 'capability_revoked';
681
680
  message: string;
682
681
  };
683
682
  outputFormat: "json";
684
- status: import("hono/utils/http-status").ContentfulStatusCode;
683
+ status: 401;
685
684
  input: {
686
685
  json: {
687
686
  at?: string | undefined;
@@ -714,11 +713,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
714
713
  };
715
714
  } | {
716
715
  output: {
717
- code: 'capability_revoked';
716
+ ok: false;
717
+ code: import('../contract/index.js').ScheduledTaskRefusalCode;
718
718
  message: string;
719
719
  };
720
720
  outputFormat: "json";
721
- status: 401;
721
+ status: import("hono/utils/http-status").ContentfulStatusCode;
722
722
  input: {
723
723
  json: {
724
724
  at?: string | undefined;
@@ -248,6 +248,10 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
248
248
  }[];
249
249
  isError: boolean;
250
250
  details: {
251
+ ok: false;
252
+ code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
253
+ message: string;
254
+ } | {
251
255
  ok: true;
252
256
  task: {
253
257
  id: string;
@@ -259,10 +263,6 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
259
263
  url?: string | undefined;
260
264
  };
261
265
  note: string;
262
- } | {
263
- ok: false;
264
- code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
265
- message: string;
266
266
  };
267
267
  }>;
268
268
  export declare function invokeScheduledTasksTool(input: unknown): Promise<{
@@ -27,18 +27,6 @@ export declare function delegationFailure(error: unknown): {
27
27
  export declare function createDelegationRoutes(service: DelegationService, credentials: CredentialRegistry): import("hono/hono-base").HonoBase<Env, {
28
28
  "/list": {
29
29
  $get: {
30
- output: {
31
- error: string;
32
- code?: "invalid_input" | undefined;
33
- };
34
- outputFormat: "json";
35
- status: 400;
36
- input: {
37
- query: {
38
- offset?: string | undefined;
39
- };
40
- };
41
- } | {
42
30
  output: {
43
31
  workers: {
44
32
  workerId: string;
@@ -76,12 +64,33 @@ export declare function createDelegationRoutes(service: DelegationService, crede
76
64
  offset?: string | undefined;
77
65
  };
78
66
  };
67
+ } | {
68
+ output: {
69
+ error: string;
70
+ code?: "invalid_input" | undefined;
71
+ };
72
+ outputFormat: "json";
73
+ status: 400;
74
+ input: {
75
+ query: {
76
+ offset?: string | undefined;
77
+ };
78
+ };
79
79
  };
80
80
  };
81
81
  } & {
82
82
  "/discover": {
83
83
  $post: {
84
84
  output: {
85
+ scope: "host-default-account";
86
+ runners: {
87
+ status: "connected" | "disconnected" | "not-installed" | "unknown";
88
+ enabled?: boolean | undefined;
89
+ hint?: string | undefined;
90
+ authFailureId?: string | undefined;
91
+ runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
92
+ }[];
93
+ } | {
85
94
  runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
86
95
  models: {
87
96
  id: string;
@@ -92,15 +101,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
92
101
  source: "cache" | "live" | "unavailable";
93
102
  stale: boolean;
94
103
  reason?: string | undefined;
95
- } | {
96
- scope: "host-default-account";
97
- runners: {
98
- status: "connected" | "disconnected" | "not-installed" | "unknown";
99
- enabled?: boolean | undefined;
100
- hint?: string | undefined;
101
- authFailureId?: string | undefined;
102
- runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
103
- }[];
104
104
  } | {
105
105
  tasks: {
106
106
  id: string;
@@ -221,13 +221,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
221
221
  status: 200;
222
222
  input: {
223
223
  json: {
224
- workerIds: string[];
225
- timeoutSeconds?: number | undefined;
226
- mode?: "all" | "any" | "one" | undefined;
227
- } | {
228
224
  requestIds: string[];
229
225
  mode?: "all" | "any" | "one" | undefined;
230
226
  timeoutSeconds?: number | undefined;
227
+ } | {
228
+ workerIds: string[];
229
+ timeoutSeconds?: number | undefined;
230
+ mode?: "all" | "any" | "one" | undefined;
231
231
  } | {
232
232
  peerIds: string[];
233
233
  timeoutSeconds?: number | undefined;
@@ -613,18 +613,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
613
613
  } & {
614
614
  "/:workerId": {
615
615
  $get: {
616
- output: {
617
- error: string;
618
- code?: "invalid_input" | undefined;
619
- };
620
- outputFormat: "json";
621
- status: 400;
622
- input: {
623
- param: {
624
- workerId: string;
625
- };
626
- };
627
- } | {
628
616
  output: {
629
617
  workerId: string;
630
618
  parentRunId: string;
@@ -728,11 +716,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
728
716
  workerId: string;
729
717
  };
730
718
  };
731
- };
732
- };
733
- } & {
734
- "/:workerId/collect": {
735
- $post: {
719
+ } | {
736
720
  output: {
737
721
  error: string;
738
722
  code?: "invalid_input" | undefined;
@@ -743,10 +727,12 @@ export declare function createDelegationRoutes(service: DelegationService, crede
743
727
  param: {
744
728
  workerId: string;
745
729
  };
746
- } & {
747
- json: Record<string, never>;
748
730
  };
749
- } | {
731
+ };
732
+ };
733
+ } & {
734
+ "/:workerId/collect": {
735
+ $post: {
750
736
  output: {
751
737
  workerId: string;
752
738
  parentRunId: string;
@@ -848,11 +834,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
848
834
  } & {
849
835
  json: Record<string, never>;
850
836
  };
851
- };
852
- };
853
- } & {
854
- "/:workerId/steer": {
855
- $post: {
837
+ } | {
856
838
  output: {
857
839
  error: string;
858
840
  code?: "invalid_input" | undefined;
@@ -864,11 +846,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
864
846
  workerId: string;
865
847
  };
866
848
  } & {
867
- json: {
868
- text: string;
869
- };
849
+ json: Record<string, never>;
870
850
  };
871
- } | {
851
+ };
852
+ };
853
+ } & {
854
+ "/:workerId/steer": {
855
+ $post: {
872
856
  output: {
873
857
  workerId: string;
874
858
  state: "delivered" | "queued";
@@ -884,11 +868,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
884
868
  text: string;
885
869
  };
886
870
  };
887
- };
888
- };
889
- } & {
890
- "/:workerId/stop": {
891
- $post: {
871
+ } | {
892
872
  output: {
893
873
  error: string;
894
874
  code?: "invalid_input" | undefined;
@@ -900,9 +880,15 @@ export declare function createDelegationRoutes(service: DelegationService, crede
900
880
  workerId: string;
901
881
  };
902
882
  } & {
903
- json: Record<string, never>;
883
+ json: {
884
+ text: string;
885
+ };
904
886
  };
905
- } | {
887
+ };
888
+ };
889
+ } & {
890
+ "/:workerId/stop": {
891
+ $post: {
906
892
  output: {
907
893
  workerId: string;
908
894
  state: "stopping" | "terminated";
@@ -916,11 +902,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
916
902
  } & {
917
903
  json: Record<string, never>;
918
904
  };
919
- };
920
- };
921
- } & {
922
- "/:workerId/destroy": {
923
- $post: {
905
+ } | {
924
906
  output: {
925
907
  error: string;
926
908
  code?: "invalid_input" | undefined;
@@ -934,7 +916,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
934
916
  } & {
935
917
  json: Record<string, never>;
936
918
  };
937
- } | {
919
+ };
920
+ };
921
+ } & {
922
+ "/:workerId/destroy": {
923
+ $post: {
938
924
  output: {
939
925
  workerId: string;
940
926
  state: "complete" | "incomplete";
@@ -957,6 +943,20 @@ export declare function createDelegationRoutes(service: DelegationService, crede
957
943
  } & {
958
944
  json: Record<string, never>;
959
945
  };
946
+ } | {
947
+ output: {
948
+ error: string;
949
+ code?: "invalid_input" | undefined;
950
+ };
951
+ outputFormat: "json";
952
+ status: 400;
953
+ input: {
954
+ param: {
955
+ workerId: string;
956
+ };
957
+ } & {
958
+ json: Record<string, never>;
959
+ };
960
960
  } | {
961
961
  output: {
962
962
  workerId: string;
@@ -986,11 +986,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
986
986
  "/:workerId/diff": {
987
987
  $get: {
988
988
  output: {
989
- error: string;
990
- code?: "invalid_input" | undefined;
989
+ workerId: string;
990
+ baselineSha: string;
991
+ diff: string;
992
+ truncated: boolean;
991
993
  };
992
994
  outputFormat: "json";
993
- status: 400;
995
+ status: 200;
994
996
  input: {
995
997
  param: {
996
998
  workerId: string;
@@ -998,13 +1000,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
998
1000
  };
999
1001
  } | {
1000
1002
  output: {
1001
- workerId: string;
1002
- baselineSha: string;
1003
- diff: string;
1004
- truncated: boolean;
1003
+ error: string;
1004
+ code?: "invalid_input" | undefined;
1005
1005
  };
1006
1006
  outputFormat: "json";
1007
- status: 200;
1007
+ status: 400;
1008
1008
  input: {
1009
1009
  param: {
1010
1010
  workerId: string;
@@ -57,14 +57,16 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
57
57
  "/discover": {
58
58
  $post: {
59
59
  output: {
60
- scope: "host-default-account";
61
- runners: {
62
- status: "connected" | "disconnected" | "not-installed" | "unknown";
63
- enabled?: boolean | undefined;
64
- hint?: string | undefined;
65
- authFailureId?: string | undefined;
66
- runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
60
+ runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
61
+ models: {
62
+ id: string;
63
+ label: string;
64
+ description: string;
65
+ effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
67
66
  }[];
67
+ source: "cache" | "live" | "unavailable";
68
+ stale: boolean;
69
+ reason?: string | undefined;
68
70
  } | {
69
71
  tasks: {
70
72
  id: string;
@@ -78,16 +80,14 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
78
80
  }[];
79
81
  nextOffset?: number | undefined;
80
82
  } | {
81
- runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
82
- models: {
83
- id: string;
84
- label: string;
85
- description: string;
86
- effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
83
+ scope: "host-default-account";
84
+ runners: {
85
+ status: "connected" | "disconnected" | "not-installed" | "unknown";
86
+ enabled?: boolean | undefined;
87
+ hint?: string | undefined;
88
+ authFailureId?: string | undefined;
89
+ runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
87
90
  }[];
88
- source: "cache" | "live" | "unavailable";
89
- stale: boolean;
90
- reason?: string | undefined;
91
91
  };
92
92
  outputFormat: "json";
93
93
  status: 200;
@@ -196,13 +196,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
196
196
  status: 200;
197
197
  input: {
198
198
  json: {
199
- workerIds: string[];
200
- timeoutSeconds?: number | undefined;
201
- mode?: "all" | "any" | "one" | undefined;
202
- } | {
203
199
  requestIds: string[];
204
200
  mode?: "all" | "any" | "one" | undefined;
205
201
  timeoutSeconds?: number | undefined;
202
+ } | {
203
+ workerIds: string[];
204
+ timeoutSeconds?: number | undefined;
205
+ mode?: "all" | "any" | "one" | undefined;
206
206
  } | {
207
207
  peerIds: string[];
208
208
  timeoutSeconds?: number | undefined;
@@ -8,11 +8,8 @@ export declare function branchLog(repoRoot: string, workspace: WorkerWorkspace):
8
8
  };
9
9
  content: NonSharedBuffer;
10
10
  }>;
11
- export declare function git(cwd: string, args: string[], index?: string, maxBuffer?: number): Promise<{
12
- ok: boolean;
13
- stdout: string;
14
- overflow: boolean;
15
- }>;
11
+ /** Git for the workspace layer: a 30 s bound, and `index` as a private `GIT_INDEX_FILE`. */
12
+ export declare function workspaceGit(cwd: string, args: string[], index?: string, maxBuffer?: number): Promise<import("../git-command.ts").GitResult>;
16
13
  export declare function checkedGit(cwd: string, args: string[], index?: string): Promise<string>;
17
14
  /** The repository's shared Git directory (where refs, reflogs and linked-worktree admin dirs live), resolved. */
18
15
  export declare function gitCommonDir(cwd: string): Promise<string>;
@@ -1,8 +1,8 @@
1
1
  /** Owned-workspace Git primitives: the lowest layer under the workspace record, create/check and removal modules. */
2
- import { execFile } from 'node:child_process';
3
2
  import { constants } from 'node:fs';
4
3
  import { open, realpath } from 'node:fs/promises';
5
4
  import { join, normalize } from 'node:path';
5
+ import { git } from '../git-command.js';
6
6
  // Git for Windows emits forward slashes even for native absolute paths.
7
7
  export function worktreeEntries(listed) {
8
8
  return listed.split('\0').map(entry => entry.startsWith('worktree ') ? `worktree ${normalize(entry.slice(9))}` : entry);
@@ -26,18 +26,12 @@ export async function branchLog(repoRoot, workspace) {
26
26
  await file.close();
27
27
  }
28
28
  }
29
- export function git(cwd, args, index, maxBuffer = 32 * 1024 * 1024) {
30
- return new Promise((done) => {
31
- execFile('git', args, {
32
- cwd, encoding: 'utf8', timeout: 30_000, maxBuffer,
33
- ...(index ? { env: { ...process.env, GIT_INDEX_FILE: index } } : {}),
34
- }, (error, stdout) => done({
35
- ok: !error, stdout: stdout ?? '', overflow: error?.code === 'ERR_CHILD_PROCESS_STDIO_MAXBUFFER',
36
- }));
37
- });
29
+ /** Git for the workspace layer: a 30 s bound, and `index` as a private `GIT_INDEX_FILE`. */
30
+ export function workspaceGit(cwd, args, index, maxBuffer) {
31
+ return git(cwd, args, { timeout: 30_000, ...(index ? { env: { GIT_INDEX_FILE: index } } : {}), ...(maxBuffer ? { maxBuffer } : {}) });
38
32
  }
39
33
  export async function checkedGit(cwd, args, index) {
40
- const result = await git(cwd, args, index);
34
+ const result = await workspaceGit(cwd, args, index);
41
35
  if (!result.ok)
42
36
  throw new Error(`Owned workspace Git ${args[0]} failed`);
43
37
  return result.stdout.trim();
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-git.js","sourceRoot":"","sources":["../../src/delegation/workspace-git.ts"],"names":[],"mappings":"AAAA,q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