@hearsay-tools/squawk 0.18.0-dev.7764 → 0.18.0-dev.7779
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.
- package/dist/ci-wait/controller.d.ts +46 -46
- package/dist/cli-dispatch.js +2 -1
- package/dist/cli-dispatch.js.map +1 -1
- package/dist/contract/index.js +2 -1
- package/dist/core/backend-detect.js +3 -3
- package/dist/core/backend-detect.js.map +1 -1
- package/dist/core/runner-definition.d.ts +8 -1
- package/dist/core/runner-definition.js.map +1 -1
- package/dist/delegation/routes.d.ts +80 -80
- package/dist/delegation/transport.d.ts +65 -65
- package/dist/managed-install/runtime-home.d.ts +8 -0
- package/dist/managed-install/runtime-home.js +14 -0
- package/dist/managed-install/runtime-home.js.map +1 -0
- package/dist/runners/acp/events.d.ts +15 -0
- package/dist/runners/acp/events.js +58 -2
- package/dist/runners/acp/events.js.map +1 -1
- package/dist/runners/acp/protocol.d.ts +10 -2
- package/dist/runners/acp/session.d.ts +11 -3
- package/dist/runners/acp/session.js +48 -16
- package/dist/runners/acp/session.js.map +1 -1
- package/dist/runners/acp/usage.d.ts +3 -0
- package/dist/runners/acp/usage.js +12 -0
- package/dist/runners/acp/usage.js.map +1 -0
- package/dist/runners/antigravity/account-home.js +1 -1
- package/dist/runners/antigravity/account-home.js.map +1 -1
- package/dist/runners/antigravity/accounts.d.ts +1 -1
- package/dist/runners/antigravity/accounts.js +1 -1
- package/dist/runners/antigravity/accounts.js.map +1 -1
- package/dist/runners/antigravity/antigravity-model-catalog.d.ts +4 -2
- package/dist/runners/antigravity/antigravity-model-catalog.js +25 -20
- package/dist/runners/antigravity/antigravity-model-catalog.js.map +1 -1
- package/dist/runners/antigravity/antigravity-runner.d.ts +6 -6
- package/dist/runners/antigravity/antigravity-runner.js +3 -2
- package/dist/runners/antigravity/antigravity-runner.js.map +1 -1
- package/dist/runners/antigravity/antigravity-session.d.ts +27 -2
- package/dist/runners/antigravity/antigravity-session.js +204 -96
- package/dist/runners/antigravity/antigravity-session.js.map +1 -1
- package/dist/runners/antigravity/antigravity-skill-catalog.d.ts +2 -2
- package/dist/runners/antigravity/antigravity-skill-catalog.js +6 -4
- package/dist/runners/antigravity/antigravity-skill-catalog.js.map +1 -1
- package/dist/runners/antigravity/antigravity-ui-mapper.d.ts +5 -3
- package/dist/runners/antigravity/antigravity-ui-mapper.js +27 -12
- package/dist/runners/antigravity/antigravity-ui-mapper.js.map +1 -1
- package/dist/runners/antigravity/ask-question.d.ts +9 -0
- package/dist/runners/antigravity/ask-question.js +37 -0
- package/dist/runners/antigravity/ask-question.js.map +1 -0
- package/dist/runners/antigravity/browser-sign-in.d.ts +8 -2
- package/dist/runners/antigravity/browser-sign-in.js +100 -122
- package/dist/runners/antigravity/browser-sign-in.js.map +1 -1
- package/dist/runners/antigravity/definition.js +3 -2
- package/dist/runners/antigravity/definition.js.map +1 -1
- package/dist/runners/antigravity/detection.d.ts +6 -4
- package/dist/runners/antigravity/detection.js +8 -5
- package/dist/runners/antigravity/detection.js.map +1 -1
- package/dist/runners/antigravity/display.d.ts +3 -3
- package/dist/runners/antigravity/display.js +2 -2
- package/dist/runners/antigravity/display.js.map +1 -1
- package/dist/runners/antigravity/executable.d.ts +45 -0
- package/dist/runners/antigravity/executable.js +184 -0
- package/dist/runners/antigravity/executable.js.map +1 -0
- package/dist/runners/antigravity/facts.d.ts +4 -4
- package/dist/runners/antigravity/facts.js +10 -5
- package/dist/runners/antigravity/facts.js.map +1 -1
- package/dist/runners/antigravity/launch-args.d.ts +4 -2
- package/dist/runners/antigravity/launch-args.js +5 -4
- package/dist/runners/antigravity/launch-args.js.map +1 -1
- package/dist/runners/antigravity/login-probe.d.ts +6 -1
- package/dist/runners/antigravity/login-probe.js +41 -19
- package/dist/runners/antigravity/login-probe.js.map +1 -1
- package/dist/runners/antigravity/login.d.ts +1 -1
- package/dist/runners/antigravity/login.js +1 -1
- package/dist/runners/antigravity/login.js.map +1 -1
- package/dist/runners/antigravity/mock.d.ts +24 -13
- package/dist/runners/antigravity/mock.js +19 -15
- package/dist/runners/antigravity/mock.js.map +1 -1
- package/dist/runners/antigravity/native-diagnostics.d.ts +3 -2
- package/dist/runners/antigravity/native-diagnostics.js +9 -6
- package/dist/runners/antigravity/native-diagnostics.js.map +1 -1
- package/dist/runners/antigravity/permissions.d.ts +2 -3
- package/dist/runners/antigravity/permissions.js +1 -32
- package/dist/runners/antigravity/permissions.js.map +1 -1
- package/dist/runners/antigravity/probe-process.d.ts +4 -1
- package/dist/runners/antigravity/probe-process.js +21 -5
- package/dist/runners/antigravity/probe-process.js.map +1 -1
- package/dist/runners/antigravity/runtime-env.d.ts +4 -3
- package/dist/runners/antigravity/runtime-env.js +14 -26
- package/dist/runners/antigravity/runtime-env.js.map +1 -1
- package/dist/runners/antigravity/spec-support.js +8 -8
- package/dist/runners/antigravity/spec-support.js.map +1 -1
- package/dist/runners/antigravity/tool-normalization.d.ts +6 -2
- package/dist/runners/antigravity/tool-normalization.js +23 -12
- package/dist/runners/antigravity/tool-normalization.js.map +1 -1
- package/dist/runners/antigravity/wire-updates.d.ts +14 -1
- package/dist/runners/antigravity/wire-updates.js +21 -6
- package/dist/runners/antigravity/wire-updates.js.map +1 -1
- package/dist/runs/lifecycle.d.ts +1 -1
- package/dist/runs/ports.d.ts +0 -11
- package/dist/runs/store.d.ts +2 -3
- package/dist/runs/store.js +5 -22
- package/dist/runs/store.js.map +1 -1
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/project-context.js +3 -3
- package/dist/server/project-context.js.map +1 -1
- package/dist/server/provider-sign-in-routes.d.ts +2 -2
- package/dist/server/provider-sign-in-routes.js +1 -1
- package/dist/server/provider-sign-in-routes.js.map +1 -1
- package/dist/server/runner-install-routes.d.ts +10 -10
- package/dist/server/server.d.ts +1652 -1652
- package/package.json +4 -4
- package/scripts/mock-acp-login.mjs +20 -0
- package/scripts/mock-acp-sessions.mjs +30 -0
- package/scripts/mock-acp.mjs +128 -79
- package/scripts/mock-antigravity-auth.mjs +39 -37
- package/web/dist/assets/{activity-motion-BSsgWgJe.js → activity-motion-CMaQA87f.js} +1 -1
- package/web/dist/assets/{activity-route-q9sOR4Wb.js → activity-route-CTJT4zv2.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-Btiebm6D.js → commit-diff-panel-BoK-qLXZ.js} +1 -1
- package/web/dist/assets/{diff-DNIkChMc.js → diff-BHFOGiZQ.js} +2 -2
- package/web/dist/assets/{diff-view-jhjgH27W.js → diff-view-BcEpsdxN.js} +1 -1
- package/web/dist/assets/{file-preview-De5UjJTG.js → file-preview-DQmUdQku.js} +1 -1
- package/web/dist/assets/{git-toolbar-Ol1142ti.js → git-toolbar-CIMGnrx-.js} +1 -1
- package/web/dist/assets/{github-BylUlaAL.js → github-DNt7fatG.js} +1 -1
- package/web/dist/assets/{global-activity-route-DI3QqvQL.js → global-activity-route-DvJfgzVz.js} +1 -1
- package/web/dist/assets/{index-Dbb0-RtK.js → index-Bcs60T3F.js} +4 -4
- package/web/dist/assets/{markdown-D3aDM4O5.js → markdown-C78nwKGh.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-C-f5rJGZ.js → preview-pane-connected-DAkxP33O.js} +1 -1
- package/web/dist/assets/{repo-git-D-j1tyQj.js → repo-git-DTINuV7R.js} +1 -1
- package/web/dist/assets/{report-reader-0-k8FTCM.js → report-reader-TsL5jS1q.js} +1 -1
- package/web/dist/assets/{reports--2BDXGSj.js → reports-MBONm90i.js} +1 -1
- package/web/dist/assets/{run-header-B69_lBSt.js → run-header-BbuegkrJ.js} +1 -1
- package/web/dist/assets/{skills-CzyYKL6l.js → skills-Cc2FsHZq.js} +1 -1
- package/web/dist/assets/{task-changes-D1Oi0yoX.js → task-changes-Bis3iY6D.js} +1 -1
- package/web/dist/assets/{task-commits-DV91fVHF.js → task-commits-CELN07IE.js} +1 -1
- package/web/dist/assets/{task-files-_ap-MUjL.js → task-files-Xj9SbIQY.js} +1 -1
- package/web/dist/assets/{task-github-item-9oibIBa8.js → task-github-item-8Wi29msX.js} +1 -1
- package/web/dist/assets/{task-thread-D8IfseH4.js → task-thread-BpprgiEm.js} +1 -1
- package/web/dist/assets/{thread-state-BLS3a1XA.js → thread-state-DjdzGdTP.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-DaPTyzCV.js → use-hand-to-agent-state-BrTzbU6r.js} +1 -1
- package/web/dist/assets/{workflows-BAIP3wxi.js → workflows-BgbhcFeb.js} +1 -1
- package/web/dist/index.html +1 -1
- package/dist/runners/antigravity/build-label.d.ts +0 -2
- package/dist/runners/antigravity/build-label.js +0 -32
- package/dist/runners/antigravity/build-label.js.map +0 -1
- package/dist/runners/antigravity/catalog-home.d.ts +0 -2
- package/dist/runners/antigravity/catalog-home.js +0 -23
- package/dist/runners/antigravity/catalog-home.js.map +0 -1
- package/dist/runners/antigravity/stderr.d.ts +0 -2
- package/dist/runners/antigravity/stderr.js +0 -15
- package/dist/runners/antigravity/stderr.js.map +0 -1
|
@@ -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;
|
|
@@ -85,12 +73,35 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
85
73
|
offset?: string | undefined;
|
|
86
74
|
};
|
|
87
75
|
};
|
|
76
|
+
} | {
|
|
77
|
+
output: {
|
|
78
|
+
error: string;
|
|
79
|
+
code?: "invalid_input" | undefined;
|
|
80
|
+
};
|
|
81
|
+
outputFormat: "json";
|
|
82
|
+
status: 400;
|
|
83
|
+
input: {
|
|
84
|
+
query: {
|
|
85
|
+
offset?: string | undefined;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
88
|
};
|
|
89
89
|
};
|
|
90
90
|
} & {
|
|
91
91
|
"/discover": {
|
|
92
92
|
$post: {
|
|
93
93
|
output: {
|
|
94
|
+
runner: string;
|
|
95
|
+
models: {
|
|
96
|
+
id: string;
|
|
97
|
+
label: string;
|
|
98
|
+
description: string;
|
|
99
|
+
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
100
|
+
}[];
|
|
101
|
+
source: "cache" | "live" | "unavailable";
|
|
102
|
+
stale: boolean;
|
|
103
|
+
reason?: string | undefined;
|
|
104
|
+
} | {
|
|
94
105
|
scope: "host-default-account";
|
|
95
106
|
runners: {
|
|
96
107
|
requiresAccountHome?: boolean | undefined;
|
|
@@ -112,17 +123,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
112
123
|
reason?: string | undefined;
|
|
113
124
|
}[];
|
|
114
125
|
nextOffset?: number | undefined;
|
|
115
|
-
} | {
|
|
116
|
-
runner: string;
|
|
117
|
-
models: {
|
|
118
|
-
id: string;
|
|
119
|
-
label: string;
|
|
120
|
-
description: string;
|
|
121
|
-
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
122
|
-
}[];
|
|
123
|
-
source: "cache" | "live" | "unavailable";
|
|
124
|
-
stale: boolean;
|
|
125
|
-
reason?: string | undefined;
|
|
126
126
|
};
|
|
127
127
|
outputFormat: "json";
|
|
128
128
|
status: 200;
|
|
@@ -232,13 +232,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
232
232
|
status: 200;
|
|
233
233
|
input: {
|
|
234
234
|
json: {
|
|
235
|
-
workerIds: string[];
|
|
236
|
-
timeoutSeconds?: number | undefined;
|
|
237
|
-
mode?: "all" | "any" | "one" | undefined;
|
|
238
|
-
} | {
|
|
239
235
|
requestIds: string[];
|
|
240
236
|
mode?: "all" | "any" | "one" | undefined;
|
|
241
237
|
timeoutSeconds?: number | undefined;
|
|
238
|
+
} | {
|
|
239
|
+
workerIds: string[];
|
|
240
|
+
timeoutSeconds?: number | undefined;
|
|
241
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
242
242
|
} | {
|
|
243
243
|
peerIds: string[];
|
|
244
244
|
timeoutSeconds?: number | undefined;
|
|
@@ -629,18 +629,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
629
629
|
} & {
|
|
630
630
|
"/:workerId": {
|
|
631
631
|
$get: {
|
|
632
|
-
output: {
|
|
633
|
-
error: string;
|
|
634
|
-
code?: "invalid_input" | undefined;
|
|
635
|
-
};
|
|
636
|
-
outputFormat: "json";
|
|
637
|
-
status: 400;
|
|
638
|
-
input: {
|
|
639
|
-
param: {
|
|
640
|
-
workerId: string;
|
|
641
|
-
};
|
|
642
|
-
};
|
|
643
|
-
} | {
|
|
644
632
|
output: {
|
|
645
633
|
workerId: string;
|
|
646
634
|
settled: boolean;
|
|
@@ -758,11 +746,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
758
746
|
workerId: string;
|
|
759
747
|
};
|
|
760
748
|
};
|
|
761
|
-
}
|
|
762
|
-
};
|
|
763
|
-
} & {
|
|
764
|
-
"/:workerId/collect": {
|
|
765
|
-
$post: {
|
|
749
|
+
} | {
|
|
766
750
|
output: {
|
|
767
751
|
error: string;
|
|
768
752
|
code?: "invalid_input" | undefined;
|
|
@@ -773,10 +757,12 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
773
757
|
param: {
|
|
774
758
|
workerId: string;
|
|
775
759
|
};
|
|
776
|
-
} & {
|
|
777
|
-
json: Record<string, never>;
|
|
778
760
|
};
|
|
779
|
-
}
|
|
761
|
+
};
|
|
762
|
+
};
|
|
763
|
+
} & {
|
|
764
|
+
"/:workerId/collect": {
|
|
765
|
+
$post: {
|
|
780
766
|
output: {
|
|
781
767
|
workerId: string;
|
|
782
768
|
parentRunId: string;
|
|
@@ -899,11 +885,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
899
885
|
} & {
|
|
900
886
|
json: Record<string, never>;
|
|
901
887
|
};
|
|
902
|
-
}
|
|
903
|
-
};
|
|
904
|
-
} & {
|
|
905
|
-
"/:workerId/steer": {
|
|
906
|
-
$post: {
|
|
888
|
+
} | {
|
|
907
889
|
output: {
|
|
908
890
|
error: string;
|
|
909
891
|
code?: "invalid_input" | undefined;
|
|
@@ -915,11 +897,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
915
897
|
workerId: string;
|
|
916
898
|
};
|
|
917
899
|
} & {
|
|
918
|
-
json:
|
|
919
|
-
text: string;
|
|
920
|
-
};
|
|
900
|
+
json: Record<string, never>;
|
|
921
901
|
};
|
|
922
|
-
}
|
|
902
|
+
};
|
|
903
|
+
};
|
|
904
|
+
} & {
|
|
905
|
+
"/:workerId/steer": {
|
|
906
|
+
$post: {
|
|
923
907
|
output: {
|
|
924
908
|
workerId: string;
|
|
925
909
|
state: "delivered" | "queued";
|
|
@@ -935,11 +919,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
935
919
|
text: string;
|
|
936
920
|
};
|
|
937
921
|
};
|
|
938
|
-
}
|
|
939
|
-
};
|
|
940
|
-
} & {
|
|
941
|
-
"/:workerId/stop": {
|
|
942
|
-
$post: {
|
|
922
|
+
} | {
|
|
943
923
|
output: {
|
|
944
924
|
error: string;
|
|
945
925
|
code?: "invalid_input" | undefined;
|
|
@@ -951,9 +931,15 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
951
931
|
workerId: string;
|
|
952
932
|
};
|
|
953
933
|
} & {
|
|
954
|
-
json:
|
|
934
|
+
json: {
|
|
935
|
+
text: string;
|
|
936
|
+
};
|
|
955
937
|
};
|
|
956
|
-
}
|
|
938
|
+
};
|
|
939
|
+
};
|
|
940
|
+
} & {
|
|
941
|
+
"/:workerId/stop": {
|
|
942
|
+
$post: {
|
|
957
943
|
output: {
|
|
958
944
|
workerId: string;
|
|
959
945
|
state: "stopping" | "terminated";
|
|
@@ -967,11 +953,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
967
953
|
} & {
|
|
968
954
|
json: Record<string, never>;
|
|
969
955
|
};
|
|
970
|
-
}
|
|
971
|
-
};
|
|
972
|
-
} & {
|
|
973
|
-
"/:workerId/destroy": {
|
|
974
|
-
$post: {
|
|
956
|
+
} | {
|
|
975
957
|
output: {
|
|
976
958
|
error: string;
|
|
977
959
|
code?: "invalid_input" | undefined;
|
|
@@ -983,11 +965,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
983
965
|
workerId: string;
|
|
984
966
|
};
|
|
985
967
|
} & {
|
|
986
|
-
json:
|
|
987
|
-
discardWork?: true | undefined;
|
|
988
|
-
};
|
|
968
|
+
json: Record<string, never>;
|
|
989
969
|
};
|
|
990
|
-
}
|
|
970
|
+
};
|
|
971
|
+
};
|
|
972
|
+
} & {
|
|
973
|
+
"/:workerId/destroy": {
|
|
974
|
+
$post: {
|
|
991
975
|
output: {
|
|
992
976
|
workerId: string;
|
|
993
977
|
state: "complete" | "incomplete";
|
|
@@ -1016,6 +1000,22 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1016
1000
|
discardWork?: true | undefined;
|
|
1017
1001
|
};
|
|
1018
1002
|
};
|
|
1003
|
+
} | {
|
|
1004
|
+
output: {
|
|
1005
|
+
error: string;
|
|
1006
|
+
code?: "invalid_input" | undefined;
|
|
1007
|
+
};
|
|
1008
|
+
outputFormat: "json";
|
|
1009
|
+
status: 400;
|
|
1010
|
+
input: {
|
|
1011
|
+
param: {
|
|
1012
|
+
workerId: string;
|
|
1013
|
+
};
|
|
1014
|
+
} & {
|
|
1015
|
+
json: {
|
|
1016
|
+
discardWork?: true | undefined;
|
|
1017
|
+
};
|
|
1018
|
+
};
|
|
1019
1019
|
} | {
|
|
1020
1020
|
output: {
|
|
1021
1021
|
workerId: string;
|
|
@@ -1051,11 +1051,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1051
1051
|
"/:workerId/diff": {
|
|
1052
1052
|
$get: {
|
|
1053
1053
|
output: {
|
|
1054
|
-
|
|
1055
|
-
|
|
1054
|
+
workerId: string;
|
|
1055
|
+
baselineSha: string;
|
|
1056
|
+
diff: string;
|
|
1057
|
+
truncated: boolean;
|
|
1056
1058
|
};
|
|
1057
1059
|
outputFormat: "json";
|
|
1058
|
-
status:
|
|
1060
|
+
status: 200;
|
|
1059
1061
|
input: {
|
|
1060
1062
|
param: {
|
|
1061
1063
|
workerId: string;
|
|
@@ -1063,13 +1065,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1063
1065
|
};
|
|
1064
1066
|
} | {
|
|
1065
1067
|
output: {
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
diff: string;
|
|
1069
|
-
truncated: boolean;
|
|
1068
|
+
error: string;
|
|
1069
|
+
code?: "invalid_input" | undefined;
|
|
1070
1070
|
};
|
|
1071
1071
|
outputFormat: "json";
|
|
1072
|
-
status:
|
|
1072
|
+
status: 400;
|
|
1073
1073
|
input: {
|
|
1074
1074
|
param: {
|
|
1075
1075
|
workerId: string;
|
|
@@ -2,18 +2,6 @@ import type { DelegationRoutes } from './routes.ts';
|
|
|
2
2
|
export declare function createDelegationApp(routes: DelegationRoutes): import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
3
3
|
"/list": {
|
|
4
4
|
$get: {
|
|
5
|
-
output: {
|
|
6
|
-
error: string;
|
|
7
|
-
code?: "invalid_input" | undefined;
|
|
8
|
-
};
|
|
9
|
-
outputFormat: "json";
|
|
10
|
-
status: 400;
|
|
11
|
-
input: {
|
|
12
|
-
query: {
|
|
13
|
-
offset?: string | undefined;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
} | {
|
|
17
5
|
output: {
|
|
18
6
|
workers: {
|
|
19
7
|
workerId: string;
|
|
@@ -60,6 +48,18 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
60
48
|
offset?: string | undefined;
|
|
61
49
|
};
|
|
62
50
|
};
|
|
51
|
+
} | {
|
|
52
|
+
output: {
|
|
53
|
+
error: string;
|
|
54
|
+
code?: "invalid_input" | undefined;
|
|
55
|
+
};
|
|
56
|
+
outputFormat: "json";
|
|
57
|
+
status: 400;
|
|
58
|
+
input: {
|
|
59
|
+
query: {
|
|
60
|
+
offset?: string | undefined;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
65
|
} & {
|
|
@@ -604,18 +604,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
604
604
|
} & {
|
|
605
605
|
"/:workerId": {
|
|
606
606
|
$get: {
|
|
607
|
-
output: {
|
|
608
|
-
error: string;
|
|
609
|
-
code?: "invalid_input" | undefined;
|
|
610
|
-
};
|
|
611
|
-
outputFormat: "json";
|
|
612
|
-
status: 400;
|
|
613
|
-
input: {
|
|
614
|
-
param: {
|
|
615
|
-
workerId: string;
|
|
616
|
-
};
|
|
617
|
-
};
|
|
618
|
-
} | {
|
|
619
607
|
output: {
|
|
620
608
|
workerId: string;
|
|
621
609
|
settled: boolean;
|
|
@@ -733,11 +721,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
733
721
|
workerId: string;
|
|
734
722
|
};
|
|
735
723
|
};
|
|
736
|
-
}
|
|
737
|
-
};
|
|
738
|
-
} & {
|
|
739
|
-
"/:workerId/collect": {
|
|
740
|
-
$post: {
|
|
724
|
+
} | {
|
|
741
725
|
output: {
|
|
742
726
|
error: string;
|
|
743
727
|
code?: "invalid_input" | undefined;
|
|
@@ -748,10 +732,12 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
748
732
|
param: {
|
|
749
733
|
workerId: string;
|
|
750
734
|
};
|
|
751
|
-
} & {
|
|
752
|
-
json: Record<string, never>;
|
|
753
735
|
};
|
|
754
|
-
}
|
|
736
|
+
};
|
|
737
|
+
};
|
|
738
|
+
} & {
|
|
739
|
+
"/:workerId/collect": {
|
|
740
|
+
$post: {
|
|
755
741
|
output: {
|
|
756
742
|
workerId: string;
|
|
757
743
|
parentRunId: string;
|
|
@@ -874,11 +860,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
874
860
|
} & {
|
|
875
861
|
json: Record<string, never>;
|
|
876
862
|
};
|
|
877
|
-
}
|
|
878
|
-
};
|
|
879
|
-
} & {
|
|
880
|
-
"/:workerId/steer": {
|
|
881
|
-
$post: {
|
|
863
|
+
} | {
|
|
882
864
|
output: {
|
|
883
865
|
error: string;
|
|
884
866
|
code?: "invalid_input" | undefined;
|
|
@@ -890,11 +872,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
890
872
|
workerId: string;
|
|
891
873
|
};
|
|
892
874
|
} & {
|
|
893
|
-
json:
|
|
894
|
-
text: string;
|
|
895
|
-
};
|
|
875
|
+
json: Record<string, never>;
|
|
896
876
|
};
|
|
897
|
-
}
|
|
877
|
+
};
|
|
878
|
+
};
|
|
879
|
+
} & {
|
|
880
|
+
"/:workerId/steer": {
|
|
881
|
+
$post: {
|
|
898
882
|
output: {
|
|
899
883
|
workerId: string;
|
|
900
884
|
state: "delivered" | "queued";
|
|
@@ -910,11 +894,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
910
894
|
text: string;
|
|
911
895
|
};
|
|
912
896
|
};
|
|
913
|
-
}
|
|
914
|
-
};
|
|
915
|
-
} & {
|
|
916
|
-
"/:workerId/stop": {
|
|
917
|
-
$post: {
|
|
897
|
+
} | {
|
|
918
898
|
output: {
|
|
919
899
|
error: string;
|
|
920
900
|
code?: "invalid_input" | undefined;
|
|
@@ -926,9 +906,15 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
926
906
|
workerId: string;
|
|
927
907
|
};
|
|
928
908
|
} & {
|
|
929
|
-
json:
|
|
909
|
+
json: {
|
|
910
|
+
text: string;
|
|
911
|
+
};
|
|
930
912
|
};
|
|
931
|
-
}
|
|
913
|
+
};
|
|
914
|
+
};
|
|
915
|
+
} & {
|
|
916
|
+
"/:workerId/stop": {
|
|
917
|
+
$post: {
|
|
932
918
|
output: {
|
|
933
919
|
workerId: string;
|
|
934
920
|
state: "stopping" | "terminated";
|
|
@@ -942,11 +928,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
942
928
|
} & {
|
|
943
929
|
json: Record<string, never>;
|
|
944
930
|
};
|
|
945
|
-
}
|
|
946
|
-
};
|
|
947
|
-
} & {
|
|
948
|
-
"/:workerId/destroy": {
|
|
949
|
-
$post: {
|
|
931
|
+
} | {
|
|
950
932
|
output: {
|
|
951
933
|
error: string;
|
|
952
934
|
code?: "invalid_input" | undefined;
|
|
@@ -958,11 +940,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
958
940
|
workerId: string;
|
|
959
941
|
};
|
|
960
942
|
} & {
|
|
961
|
-
json:
|
|
962
|
-
discardWork?: true | undefined;
|
|
963
|
-
};
|
|
943
|
+
json: Record<string, never>;
|
|
964
944
|
};
|
|
965
|
-
}
|
|
945
|
+
};
|
|
946
|
+
};
|
|
947
|
+
} & {
|
|
948
|
+
"/:workerId/destroy": {
|
|
949
|
+
$post: {
|
|
966
950
|
output: {
|
|
967
951
|
workerId: string;
|
|
968
952
|
state: "complete" | "incomplete";
|
|
@@ -991,6 +975,22 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
991
975
|
discardWork?: true | undefined;
|
|
992
976
|
};
|
|
993
977
|
};
|
|
978
|
+
} | {
|
|
979
|
+
output: {
|
|
980
|
+
error: string;
|
|
981
|
+
code?: "invalid_input" | undefined;
|
|
982
|
+
};
|
|
983
|
+
outputFormat: "json";
|
|
984
|
+
status: 400;
|
|
985
|
+
input: {
|
|
986
|
+
param: {
|
|
987
|
+
workerId: string;
|
|
988
|
+
};
|
|
989
|
+
} & {
|
|
990
|
+
json: {
|
|
991
|
+
discardWork?: true | undefined;
|
|
992
|
+
};
|
|
993
|
+
};
|
|
994
994
|
} | {
|
|
995
995
|
output: {
|
|
996
996
|
workerId: string;
|
|
@@ -1026,11 +1026,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
1026
1026
|
"/:workerId/diff": {
|
|
1027
1027
|
$get: {
|
|
1028
1028
|
output: {
|
|
1029
|
-
|
|
1030
|
-
|
|
1029
|
+
workerId: string;
|
|
1030
|
+
baselineSha: string;
|
|
1031
|
+
diff: string;
|
|
1032
|
+
truncated: boolean;
|
|
1031
1033
|
};
|
|
1032
1034
|
outputFormat: "json";
|
|
1033
|
-
status:
|
|
1035
|
+
status: 200;
|
|
1034
1036
|
input: {
|
|
1035
1037
|
param: {
|
|
1036
1038
|
workerId: string;
|
|
@@ -1038,13 +1040,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
1038
1040
|
};
|
|
1039
1041
|
} | {
|
|
1040
1042
|
output: {
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
diff: string;
|
|
1044
|
-
truncated: boolean;
|
|
1043
|
+
error: string;
|
|
1044
|
+
code?: "invalid_input" | undefined;
|
|
1045
1045
|
};
|
|
1046
1046
|
outputFormat: "json";
|
|
1047
|
-
status:
|
|
1047
|
+
status: 400;
|
|
1048
1048
|
input: {
|
|
1049
1049
|
param: {
|
|
1050
1050
|
workerId: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Home } from '../home/home.ts';
|
|
2
|
+
/**
|
|
3
|
+
* The operator entry's Home, for managed CLI reads and leases. `cli-dispatch` binds it once, when it
|
|
4
|
+
* resolves the Home for a command; the first binding wins and later calls change nothing. A process
|
|
5
|
+
* with no bound Home (a test, a library caller) has no managed CLI and falls back to PATH.
|
|
6
|
+
*/
|
|
7
|
+
export declare function bindManagedCliHome(home: Home): Home;
|
|
8
|
+
export declare function managedCliHome(): Home | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
let bound;
|
|
2
|
+
/**
|
|
3
|
+
* The operator entry's Home, for managed CLI reads and leases. `cli-dispatch` binds it once, when it
|
|
4
|
+
* resolves the Home for a command; the first binding wins and later calls change nothing. A process
|
|
5
|
+
* with no bound Home (a test, a library caller) has no managed CLI and falls back to PATH.
|
|
6
|
+
*/
|
|
7
|
+
export function bindManagedCliHome(home) {
|
|
8
|
+
bound ??= home;
|
|
9
|
+
return home;
|
|
10
|
+
}
|
|
11
|
+
export function managedCliHome() {
|
|
12
|
+
return bound;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=runtime-home.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-home.js","sourceRoot":"","sources":["../../src/managed-install/runtime-home.ts"],"names":[],"mappings":"AAEA,IAAI,KAAuB,CAAC;AAE5B;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAU;IAC3C,KAAK,KAAK,IAAI,CAAC;IACf,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -11,12 +11,27 @@ export declare class AcpEvents {
|
|
|
11
11
|
private readonly hooks;
|
|
12
12
|
private serial;
|
|
13
13
|
private turnId;
|
|
14
|
+
/** The open turn was started by the agent's own work, and no prompt carries it yet. */
|
|
15
|
+
private agentStarted;
|
|
16
|
+
/** The kind of the open turn's latest work update. */
|
|
17
|
+
private lastWork;
|
|
18
|
+
/** A provider failure reported as text in the open turn. */
|
|
19
|
+
private failure;
|
|
14
20
|
private block;
|
|
15
21
|
private tools;
|
|
16
22
|
constructor(sink: AcpEventSink, hooks: AcpHooks);
|
|
23
|
+
get turnOpen(): boolean;
|
|
24
|
+
/** The provider failure of the open turn, if its text reported one. */
|
|
25
|
+
get turnFailure(): string | undefined;
|
|
17
26
|
begin(): string;
|
|
27
|
+
/** A prompt joins the agent-started turn that is open; its response ends that turn. */
|
|
28
|
+
adopt(): void;
|
|
29
|
+
/** The open turn was started by the agent and no prompt carries it. */
|
|
30
|
+
get agentTurn(): boolean;
|
|
18
31
|
finish(stopReason: StopReason, usage?: TokenUsage): void;
|
|
19
32
|
update(update: Record<string, unknown>): void;
|
|
33
|
+
/** A late update for a tool already closed (a failed call the agent reports after cancel). */
|
|
34
|
+
private closedTool;
|
|
20
35
|
notice(message: string): void;
|
|
21
36
|
/** A mapper can fold one frame without mutating its caller's state. */
|
|
22
37
|
fork(sink: AcpEventSink): AcpEvents;
|
|
@@ -10,6 +10,8 @@ const toolSchema = z.object({
|
|
|
10
10
|
locations: z.array(z.object({ path: z.string(), line: z.number().optional() })).nullish(),
|
|
11
11
|
}).passthrough();
|
|
12
12
|
const planStatusSchema = z.enum(['pending', 'in_progress', 'completed']);
|
|
13
|
+
/** Updates that are the agent's own work, as opposed to session metadata. */
|
|
14
|
+
const WORK_UPDATES = new Set(['agent_message_chunk', 'agent_thought_chunk', 'tool_call', 'tool_call_update', 'plan']);
|
|
13
15
|
const planSchema = z.array(z.object({ content: z.string(), status: planStatusSchema.catch('pending'), priority: z.enum(['high', 'medium', 'low']) }));
|
|
14
16
|
/** Stateful ACP-v1 -> Squawk v1/v2 mapping. No provider names or tool arguments live here. */
|
|
15
17
|
export class AcpEvents {
|
|
@@ -17,36 +19,81 @@ export class AcpEvents {
|
|
|
17
19
|
hooks;
|
|
18
20
|
serial = 0;
|
|
19
21
|
turnId;
|
|
22
|
+
/** The open turn was started by the agent's own work, and no prompt carries it yet. */
|
|
23
|
+
agentStarted = false;
|
|
24
|
+
/** The kind of the open turn's latest work update. */
|
|
25
|
+
lastWork;
|
|
26
|
+
/** A provider failure reported as text in the open turn. */
|
|
27
|
+
failure;
|
|
20
28
|
block;
|
|
21
29
|
tools = new Map();
|
|
22
30
|
constructor(sink, hooks) {
|
|
23
31
|
this.sink = sink;
|
|
24
32
|
this.hooks = hooks;
|
|
25
33
|
}
|
|
34
|
+
get turnOpen() { return this.turnId !== undefined; }
|
|
35
|
+
/** The provider failure of the open turn, if its text reported one. */
|
|
36
|
+
get turnFailure() { return this.failure; }
|
|
26
37
|
begin() {
|
|
27
38
|
if (this.turnId)
|
|
28
39
|
throw new Error('ACP prompt already active');
|
|
29
40
|
this.turnId = `acp-turn-${++this.serial}`;
|
|
41
|
+
this.lastWork = undefined;
|
|
30
42
|
this.sink.uiEvent?.({ type: 'turn.started', turnId: this.turnId });
|
|
31
43
|
return this.turnId;
|
|
32
44
|
}
|
|
45
|
+
/** A prompt joins the agent-started turn that is open; its response ends that turn. */
|
|
46
|
+
adopt() {
|
|
47
|
+
if (!this.agentStarted)
|
|
48
|
+
throw new Error('ACP has no agent-started turn to adopt');
|
|
49
|
+
this.agentStarted = false;
|
|
50
|
+
}
|
|
51
|
+
/** The open turn was started by the agent and no prompt carries it. */
|
|
52
|
+
get agentTurn() { return this.agentStarted; }
|
|
33
53
|
finish(stopReason, usage) {
|
|
34
54
|
this.flush();
|
|
35
55
|
if (!this.turnId)
|
|
36
56
|
return;
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
57
|
+
const reason = this.failure ? 'error' : stopReason;
|
|
58
|
+
this.finishTools(reason);
|
|
59
|
+
// A turn-end listener sees the turn closed: it may start the next one or close the session.
|
|
60
|
+
const turnId = this.turnId;
|
|
39
61
|
this.turnId = undefined;
|
|
62
|
+
this.agentStarted = false;
|
|
63
|
+
this.failure = undefined;
|
|
64
|
+
this.sink.uiEvent?.({ type: 'turn.completed', turnId, stopReason: reason, ...(usage ? { usage } : {}) });
|
|
40
65
|
this.sink.event?.({ type: 'turn-end' });
|
|
41
66
|
}
|
|
42
67
|
update(update) {
|
|
43
68
|
try {
|
|
69
|
+
if (this.closedTool(update))
|
|
70
|
+
return;
|
|
71
|
+
const work = WORK_UPDATES.has(update.sessionUpdate);
|
|
72
|
+
if (work && !this.turnId && this.hooks.agentWorkEnds) {
|
|
73
|
+
this.begin();
|
|
74
|
+
this.agentStarted = true;
|
|
75
|
+
}
|
|
76
|
+
const failure = this.turnId ? this.hooks.updateError?.(update) : undefined;
|
|
77
|
+
if (failure)
|
|
78
|
+
this.failure ??= failure;
|
|
44
79
|
this.mapUpdate(update);
|
|
80
|
+
const previous = this.lastWork;
|
|
81
|
+
if (work)
|
|
82
|
+
this.lastWork = update.sessionUpdate;
|
|
83
|
+
if (this.agentStarted && this.hooks.agentWorkEnds?.(update, previous))
|
|
84
|
+
this.finish('end_turn');
|
|
45
85
|
}
|
|
46
86
|
catch {
|
|
47
87
|
this.notice('ACP ignored malformed session/update');
|
|
48
88
|
}
|
|
49
89
|
}
|
|
90
|
+
/** A late update for a tool already closed (a failed call the agent reports after cancel). */
|
|
91
|
+
closedTool(update) {
|
|
92
|
+
if (update.sessionUpdate !== 'tool_call' && update.sessionUpdate !== 'tool_call_update')
|
|
93
|
+
return false;
|
|
94
|
+
const status = this.tools.get(String(update.toolCallId))?.status;
|
|
95
|
+
return status === 'completed' || status === 'failed';
|
|
96
|
+
}
|
|
50
97
|
notice(message) {
|
|
51
98
|
this.sink.event?.({ type: 'note', message });
|
|
52
99
|
this.sink.uiEvent?.({ type: 'session.error', message, fatal: false });
|
|
@@ -56,6 +103,9 @@ export class AcpEvents {
|
|
|
56
103
|
const next = new AcpEvents(sink, this.hooks);
|
|
57
104
|
next.serial = this.serial;
|
|
58
105
|
next.turnId = this.turnId;
|
|
106
|
+
next.agentStarted = this.agentStarted;
|
|
107
|
+
next.lastWork = this.lastWork;
|
|
108
|
+
next.failure = this.failure;
|
|
59
109
|
next.block = this.block ? { ...this.block } : undefined;
|
|
60
110
|
// Updates replace tool snapshots; their nested input/output values are never mutated.
|
|
61
111
|
next.tools = new Map(this.tools);
|
|
@@ -83,6 +133,8 @@ export class AcpEvents {
|
|
|
83
133
|
this.hooks.normalizeOptions?.(update.configOptions);
|
|
84
134
|
break;
|
|
85
135
|
case 'available_commands_update': break; // Native command catalog, not a fault.
|
|
136
|
+
case 'session_info_update': break; // A native session title.
|
|
137
|
+
case 'current_mode_update': break; // The native mode the session/set_config_option call chose.
|
|
86
138
|
default: this.notice('ACP ignored unsupported session/update');
|
|
87
139
|
}
|
|
88
140
|
}
|
|
@@ -124,6 +176,10 @@ export class AcpEvents {
|
|
|
124
176
|
this.block = undefined;
|
|
125
177
|
}
|
|
126
178
|
finishTools(reason) {
|
|
179
|
+
// A wire whose idle session wakes on its own keeps a call running past a normal turn end: a
|
|
180
|
+
// background command, a timer or a question completes in a later turn.
|
|
181
|
+
if (this.hooks.agentWorkEnds && reason !== 'cancelled' && reason !== 'error')
|
|
182
|
+
return;
|
|
127
183
|
for (const [id, tool] of this.tools) {
|
|
128
184
|
if (tool.status === 'completed' || tool.status === 'failed')
|
|
129
185
|
continue;
|