@hearsay-tools/squawk 0.18.0-dev.8054 → 0.18.0-dev.8057
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/automations/agent-tools.d.ts +2 -0
- package/dist/automations/agent-tools.js +24 -0
- package/dist/automations/agent-tools.js.map +1 -0
- package/dist/automations/tool-catalog.d.ts +119 -0
- package/dist/automations/tool-catalog.js +48 -0
- package/dist/automations/tool-catalog.js.map +1 -0
- package/dist/automations/tool-client.d.ts +9 -0
- package/dist/automations/tool-client.js +19 -0
- package/dist/automations/tool-client.js.map +1 -0
- package/dist/automations/tool-env.d.ts +1 -0
- package/dist/automations/tool-env.js +3 -0
- package/dist/automations/tool-env.js.map +1 -0
- package/dist/automations/tool-errors.d.ts +9 -0
- package/dist/automations/tool-errors.js +34 -0
- package/dist/automations/tool-errors.js.map +1 -0
- package/dist/automations/tool-session.d.ts +5 -0
- package/dist/automations/tool-session.js +19 -0
- package/dist/automations/tool-session.js.map +1 -0
- package/dist/automations/tools.d.ts +325 -0
- package/dist/automations/tools.js +30 -0
- package/dist/automations/tools.js.map +1 -0
- package/dist/built-in-tool-definitions.d.ts +0 -2
- package/dist/built-in-tool-definitions.js +3 -35
- package/dist/built-in-tool-definitions.js.map +1 -1
- package/dist/built-in-tools.js +4 -2
- package/dist/built-in-tools.js.map +1 -1
- package/dist/ci-wait/client.d.ts +0 -17
- package/dist/ci-wait/client.js +0 -31
- package/dist/ci-wait/client.js.map +1 -1
- package/dist/ci-wait/controller.js +1 -2
- package/dist/ci-wait/controller.js.map +1 -1
- package/dist/ci-wait/errors.d.ts +1 -14
- package/dist/ci-wait/errors.js +0 -68
- package/dist/ci-wait/errors.js.map +1 -1
- package/dist/ci-wait/tool-catalog.d.ts +0 -263
- package/dist/ci-wait/tool-catalog.js +0 -58
- package/dist/ci-wait/tool-catalog.js.map +1 -1
- package/dist/ci-wait/tool-definition.d.ts +21 -0
- package/dist/ci-wait/tool-definition.js +9 -0
- package/dist/ci-wait/tool-definition.js.map +1 -0
- package/dist/ci-wait/tool-registry.d.ts +2 -0
- package/dist/ci-wait/tool-registry.js.map +1 -1
- package/dist/ci-wait/tools.d.ts +2 -381
- package/dist/ci-wait/tools.js +3 -46
- package/dist/ci-wait/tools.js.map +1 -1
- package/dist/delegation/routes.d.ts +79 -79
- package/dist/preview/agent-address.js +1 -1
- package/dist/preview/agent-address.js.map +1 -1
- package/dist/preview/agent-tools.d.ts +2 -0
- package/dist/preview/agent-tools.js +18 -0
- package/dist/preview/agent-tools.js.map +1 -0
- package/dist/preview/registration.js +1 -1
- package/dist/preview/registration.js.map +1 -1
- package/dist/preview/run-tools.d.ts +1 -0
- package/dist/preview/run-tools.js +2 -1
- package/dist/preview/run-tools.js.map +1 -1
- package/dist/preview/tool-catalog.d.ts +146 -0
- package/dist/preview/tool-catalog.js +14 -0
- package/dist/preview/tool-catalog.js.map +1 -0
- package/dist/preview/tool-client.d.ts +8 -0
- package/dist/preview/tool-client.js +16 -0
- package/dist/preview/tool-client.js.map +1 -0
- package/dist/preview/tool-env.d.ts +2 -0
- package/dist/preview/tool-env.js +4 -0
- package/dist/preview/tool-env.js.map +1 -0
- package/dist/preview/tool-errors.d.ts +7 -0
- package/dist/preview/tool-errors.js +36 -0
- package/dist/preview/tool-errors.js.map +1 -0
- package/dist/preview/tool-session.d.ts +6 -0
- package/dist/preview/tool-session.js +9 -0
- package/dist/preview/tool-session.js.map +1 -0
- package/dist/preview/tools.d.ts +57 -0
- package/dist/preview/tools.js +18 -0
- package/dist/preview/tools.js.map +1 -0
- package/dist/runs/run-archive.d.ts +72 -72
- package/dist/serve-command.d.ts +1 -1
- package/dist/serve-command.js +1 -1
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/preview-cdp-socket.js +1 -1
- package/dist/server/preview-socket.js +1 -1
- package/dist/server/reports-api.d.ts +2 -2
- package/dist/server/runner-install-routes.d.ts +10 -10
- package/dist/server/server.d.ts +1323 -1323
- package/dist/workflows/run/compose.js +2 -2
- package/dist/workflows/run/compose.js.map +1 -1
- package/dist/workflows/run/squawk-tools.d.ts +6 -9
- package/dist/workflows/run/squawk-tools.js +8 -18
- package/dist/workflows/run/squawk-tools.js.map +1 -1
- package/dist/workflows/run/wait-engine.d.ts +72 -72
- package/package.json +4 -4
- package/dist/ci-wait/tool-env.d.ts +0 -4
- package/dist/ci-wait/tool-env.js +0 -11
- package/dist/ci-wait/tool-env.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,34 @@ 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
|
+
scope: "host-default-account";
|
|
95
|
+
runners: {
|
|
96
|
+
requiresAccountHome?: boolean | undefined;
|
|
97
|
+
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
98
|
+
enabled?: boolean | undefined;
|
|
99
|
+
hint?: string | undefined;
|
|
100
|
+
authFailureId?: string | undefined;
|
|
101
|
+
runner: string;
|
|
102
|
+
}[];
|
|
103
|
+
} | {
|
|
94
104
|
runner: string;
|
|
95
105
|
models: {
|
|
96
106
|
id: string;
|
|
@@ -101,16 +111,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
101
111
|
source: "cache" | "live" | "unavailable";
|
|
102
112
|
stale: boolean;
|
|
103
113
|
reason?: string | undefined;
|
|
104
|
-
} | {
|
|
105
|
-
scope: "host-default-account";
|
|
106
|
-
runners: {
|
|
107
|
-
requiresAccountHome?: boolean | undefined;
|
|
108
|
-
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
109
|
-
enabled?: boolean | undefined;
|
|
110
|
-
hint?: string | undefined;
|
|
111
|
-
authFailureId?: string | undefined;
|
|
112
|
-
runner: string;
|
|
113
|
-
}[];
|
|
114
114
|
} | {
|
|
115
115
|
tasks: {
|
|
116
116
|
id: string;
|
|
@@ -232,13 +232,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
232
232
|
status: 200;
|
|
233
233
|
input: {
|
|
234
234
|
json: {
|
|
235
|
-
requestIds: string[];
|
|
236
|
-
mode?: "all" | "any" | "one" | undefined;
|
|
237
|
-
timeoutSeconds?: number | undefined;
|
|
238
|
-
} | {
|
|
239
235
|
workerIds: string[];
|
|
240
236
|
timeoutSeconds?: number | undefined;
|
|
241
237
|
mode?: "all" | "any" | "one" | undefined;
|
|
238
|
+
} | {
|
|
239
|
+
requestIds: string[];
|
|
240
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
241
|
+
timeoutSeconds?: number | 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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { productEnvEntries } from '../core/product-env.js';
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
|
-
import { previewToolEnabled } from '
|
|
3
|
+
import { previewToolEnabled } from './tool-env.js';
|
|
4
4
|
/**
|
|
5
5
|
* The agent's preview browser address (hearsay-tools/cezarion#784, spec
|
|
6
6
|
* 2026-10-26-preview-agent-cdp): the cockpit's own bound origin as `ws:`, at the CDP proxy route,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-address.js","sourceRoot":"","sources":["../../src/preview/agent-address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"agent-address.js","sourceRoot":"","sources":["../../src/preview/agent-address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAA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E,UAAU,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,QAAQ;QAAE,OAAO,OAAO,CAAC;IAC7G,OAAO,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;AACrG,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,iBAAiB,CAAC,KAA0B,EAAE,OAAe,EAAE,KAAa;IAC1F,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAChC,IAAI,CAAC,GAAG,EAAE,YAAY,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,YAAY,CAAC;QAAE,OAAO,SAAS,CAAC;IAC1E,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,CAAC,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AACrF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { previewSessionHandlers } from './tool-session.js';
|
|
2
|
+
import { productEnvEntries } from '../core/product-env.js';
|
|
3
|
+
import { previewStopResult } from './registration.js';
|
|
4
|
+
import { previewInvalidInput, previewOversized, previewRefusal } from './tool-errors.js';
|
|
5
|
+
import { previewToolEnabled } from './tool-env.js';
|
|
6
|
+
import { previewStopRequestSchema, previewStopResultSchema, previewServeRequestSchema, previewServeResultSchema } from '../contract/index.js';
|
|
7
|
+
import { PREVIEW_TOOL, PREVIEW_STOP_TOOL, formatPreviewTool, formatPreviewStopTool } from './tools.js';
|
|
8
|
+
import { bind, metadata } from '../ci-wait/tool-definition.js';
|
|
9
|
+
export const previewAgentTools = [
|
|
10
|
+
{ ...metadata(PREVIEW_TOOL, previewServeResultSchema, formatPreviewTool), ...bind(previewServeRequestSchema, async (h, input, signal) => h.registerPreview ? previewServeResultSchema.parse(await h.registerPreview(input, signal)) : previewRefusal('headless')),
|
|
11
|
+
sessionHandlers: (runId, host) => previewSessionHandlers(host, runId),
|
|
12
|
+
sessionEnv: env => previewToolEnabled(env) ? productEnvEntries('PREVIEW', '1') : {},
|
|
13
|
+
enabled: previewToolEnabled, envNames: env => previewToolEnabled(env) ? ['CEZ_PREVIEW'] : [], maxBodyBytes: 16_384,
|
|
14
|
+
invalid: previewInvalidInput, oversized: previewOversized, disabled: () => previewRefusal('preview_disabled'), unavailable: () => previewRefusal('unavailable') },
|
|
15
|
+
{ ...metadata(PREVIEW_STOP_TOOL, previewStopResultSchema, formatPreviewStopTool), ...bind(previewStopRequestSchema, async (h, input, signal) => h.stopPreview ? previewStopResultSchema.parse(await h.stopPreview(input, signal)) : previewStopResult('headless')),
|
|
16
|
+
enabled: previewToolEnabled, maxBodyBytes: 16_384, invalid: () => previewStopResult('invalid_input'), oversized: () => previewStopResult('invalid_input'), disabled: () => previewStopResult('preview_disabled'), unavailable: () => previewStopResult('unavailable') },
|
|
17
|
+
];
|
|
18
|
+
//# sourceMappingURL=agent-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-tools.js","sourceRoot":"","sources":["../../src/preview/agent-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAE9J,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,iB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C,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,uBAAuB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;QAChQ,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,eAAe,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,aAAa,CAAC,EAAE;CAC1Q,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isAbsolute, relative, resolve, sep } from 'node:path';
|
|
2
|
-
import { previewRefusal } from '
|
|
2
|
+
import { previewRefusal } from './tool-errors.js';
|
|
3
3
|
// The agent's CDP address (hearsay-tools/cezarion#784).
|
|
4
4
|
export { previewCdpSession, previewRunContext } from './agent-address.js';
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registration.js","sourceRoot":"","sources":["../../src/preview/registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAE/D,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"registration.js","sourceRoot":"","sources":["../../src/preview/registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAE/D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,wDAAwD;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,EAAE,CAAC,qCAAqC,EAAE,kEAAkE,CAAC;QACrH,gBAAgB,EAAE,CAAC,wCAAwC,EAAE,eAAe,CAAC;QAC7E,WAAW,EAAE,CAAC,8DAA8D,EAAE,mFAAmF,CAAC;KACnK,CAAC;IACF,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,OAAO,EAAE,EAAE,EAAE,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACjF,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { decoratePreviewSession } from './tool-session.ts';
|
|
1
2
|
import { type PreviewStopRequest, type PreviewStopResult, type PreviewServeRequest, type PreviewServeResult } from '../contract/index.js';
|
|
2
3
|
import type { RunStore } from '../runs/store.ts';
|
|
3
4
|
import { type PreviewHostLike } from './registration.ts';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
export { decoratePreviewSession } from './tool-session.js';
|
|
1
2
|
import { existsSync } from 'node:fs';
|
|
2
3
|
import { previewStopRequestSchema, previewServeRequestSchema } from '../contract/index.js';
|
|
3
|
-
import { previewToolEnabled } from '
|
|
4
|
+
import { previewToolEnabled } from './tool-env.js';
|
|
4
5
|
import { previewStopResult, previewResult, validateRegistration } from './registration.js';
|
|
5
6
|
export async function stopPreviewServer(store, preview, squawkPort, disposed, runId, request, signal) {
|
|
6
7
|
const parsed = previewStopRequestSchema.parse(request);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-tools.js","sourceRoot":"","sources":["../../src/preview/run-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAsG,MAAM,sCAAsC,CAAC;AAE/M,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":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AQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;QACpE,CAAC,CAAC,CAAC,GAAG,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC1B,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC;IAC3C,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,2BAA2B,EAAE,MAAM,EAAE,CAAC,CAAC;IACjF,4FAA4F;IAC5F,IAAI,OAAO;QAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IACxE,OAAO,OAAO,CAAC,MAAM,EAAE,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const previewToolDefinition: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: {
|
|
6
|
+
$schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
|
|
7
|
+
$id?: string;
|
|
8
|
+
$anchor?: string;
|
|
9
|
+
$ref?: string;
|
|
10
|
+
$dynamicRef?: string;
|
|
11
|
+
$dynamicAnchor?: string;
|
|
12
|
+
$vocabulary?: Record<string, boolean>;
|
|
13
|
+
$comment?: string;
|
|
14
|
+
$defs?: Record<string, z.core.JSONSchema.JSONSchema>;
|
|
15
|
+
additionalItems?: z.core.JSONSchema._JSONSchema;
|
|
16
|
+
unevaluatedItems?: z.core.JSONSchema._JSONSchema;
|
|
17
|
+
prefixItems?: z.core.JSONSchema._JSONSchema[];
|
|
18
|
+
items?: z.core.JSONSchema._JSONSchema | z.core.JSONSchema._JSONSchema[];
|
|
19
|
+
contains?: z.core.JSONSchema._JSONSchema;
|
|
20
|
+
additionalProperties?: z.core.JSONSchema._JSONSchema;
|
|
21
|
+
unevaluatedProperties?: z.core.JSONSchema._JSONSchema;
|
|
22
|
+
properties?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
23
|
+
patternProperties?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
24
|
+
dependentSchemas?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
25
|
+
propertyNames?: z.core.JSONSchema._JSONSchema;
|
|
26
|
+
if?: z.core.JSONSchema._JSONSchema;
|
|
27
|
+
then?: z.core.JSONSchema._JSONSchema;
|
|
28
|
+
else?: z.core.JSONSchema._JSONSchema;
|
|
29
|
+
allOf?: z.core.JSONSchema.JSONSchema[];
|
|
30
|
+
anyOf?: z.core.JSONSchema.JSONSchema[];
|
|
31
|
+
oneOf?: z.core.JSONSchema.JSONSchema[];
|
|
32
|
+
not?: z.core.JSONSchema._JSONSchema;
|
|
33
|
+
multipleOf?: number;
|
|
34
|
+
maximum?: number;
|
|
35
|
+
exclusiveMaximum?: number | boolean;
|
|
36
|
+
minimum?: number;
|
|
37
|
+
exclusiveMinimum?: number | boolean;
|
|
38
|
+
maxLength?: number;
|
|
39
|
+
minLength?: number;
|
|
40
|
+
pattern?: string;
|
|
41
|
+
maxItems?: number;
|
|
42
|
+
minItems?: number;
|
|
43
|
+
uniqueItems?: boolean;
|
|
44
|
+
maxContains?: number;
|
|
45
|
+
minContains?: number;
|
|
46
|
+
maxProperties?: number;
|
|
47
|
+
minProperties?: number;
|
|
48
|
+
required?: string[];
|
|
49
|
+
dependentRequired?: Record<string, string[]>;
|
|
50
|
+
enum?: Array<string | number | boolean | null>;
|
|
51
|
+
const?: string | number | boolean | null;
|
|
52
|
+
id?: string;
|
|
53
|
+
title?: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
default?: unknown;
|
|
56
|
+
deprecated?: boolean;
|
|
57
|
+
readOnly?: boolean;
|
|
58
|
+
writeOnly?: boolean;
|
|
59
|
+
nullable?: boolean;
|
|
60
|
+
examples?: unknown[];
|
|
61
|
+
format?: string;
|
|
62
|
+
contentMediaType?: string;
|
|
63
|
+
contentEncoding?: string;
|
|
64
|
+
contentSchema?: z.core.JSONSchema.JSONSchema;
|
|
65
|
+
_prefault?: unknown;
|
|
66
|
+
"~standard": z.core.ZodStandardSchemaWithJSON<z.ZodObject<{
|
|
67
|
+
command: z.ZodString;
|
|
68
|
+
port: z.ZodNumber;
|
|
69
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
70
|
+
label: z.ZodOptional<z.ZodString>;
|
|
71
|
+
path: z.ZodOptional<z.ZodString>;
|
|
72
|
+
}, z.core.$strip>>;
|
|
73
|
+
type: 'object';
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export declare const previewStopToolDefinition: {
|
|
77
|
+
name: string;
|
|
78
|
+
description: string;
|
|
79
|
+
inputSchema: {
|
|
80
|
+
$schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
|
|
81
|
+
$id?: string;
|
|
82
|
+
$anchor?: string;
|
|
83
|
+
$ref?: string;
|
|
84
|
+
$dynamicRef?: string;
|
|
85
|
+
$dynamicAnchor?: string;
|
|
86
|
+
$vocabulary?: Record<string, boolean>;
|
|
87
|
+
$comment?: string;
|
|
88
|
+
$defs?: Record<string, z.core.JSONSchema.JSONSchema>;
|
|
89
|
+
additionalItems?: z.core.JSONSchema._JSONSchema;
|
|
90
|
+
unevaluatedItems?: z.core.JSONSchema._JSONSchema;
|
|
91
|
+
prefixItems?: z.core.JSONSchema._JSONSchema[];
|
|
92
|
+
items?: z.core.JSONSchema._JSONSchema | z.core.JSONSchema._JSONSchema[];
|
|
93
|
+
contains?: z.core.JSONSchema._JSONSchema;
|
|
94
|
+
additionalProperties?: z.core.JSONSchema._JSONSchema;
|
|
95
|
+
unevaluatedProperties?: z.core.JSONSchema._JSONSchema;
|
|
96
|
+
properties?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
97
|
+
patternProperties?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
98
|
+
dependentSchemas?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
99
|
+
propertyNames?: z.core.JSONSchema._JSONSchema;
|
|
100
|
+
if?: z.core.JSONSchema._JSONSchema;
|
|
101
|
+
then?: z.core.JSONSchema._JSONSchema;
|
|
102
|
+
else?: z.core.JSONSchema._JSONSchema;
|
|
103
|
+
allOf?: z.core.JSONSchema.JSONSchema[];
|
|
104
|
+
anyOf?: z.core.JSONSchema.JSONSchema[];
|
|
105
|
+
oneOf?: z.core.JSONSchema.JSONSchema[];
|
|
106
|
+
not?: z.core.JSONSchema._JSONSchema;
|
|
107
|
+
multipleOf?: number;
|
|
108
|
+
maximum?: number;
|
|
109
|
+
exclusiveMaximum?: number | boolean;
|
|
110
|
+
minimum?: number;
|
|
111
|
+
exclusiveMinimum?: number | boolean;
|
|
112
|
+
maxLength?: number;
|
|
113
|
+
minLength?: number;
|
|
114
|
+
pattern?: string;
|
|
115
|
+
maxItems?: number;
|
|
116
|
+
minItems?: number;
|
|
117
|
+
uniqueItems?: boolean;
|
|
118
|
+
maxContains?: number;
|
|
119
|
+
minContains?: number;
|
|
120
|
+
maxProperties?: number;
|
|
121
|
+
minProperties?: number;
|
|
122
|
+
required?: string[];
|
|
123
|
+
dependentRequired?: Record<string, string[]>;
|
|
124
|
+
enum?: Array<string | number | boolean | null>;
|
|
125
|
+
const?: string | number | boolean | null;
|
|
126
|
+
id?: string;
|
|
127
|
+
title?: string;
|
|
128
|
+
description?: string;
|
|
129
|
+
default?: unknown;
|
|
130
|
+
deprecated?: boolean;
|
|
131
|
+
readOnly?: boolean;
|
|
132
|
+
writeOnly?: boolean;
|
|
133
|
+
nullable?: boolean;
|
|
134
|
+
examples?: unknown[];
|
|
135
|
+
format?: string;
|
|
136
|
+
contentMediaType?: string;
|
|
137
|
+
contentEncoding?: string;
|
|
138
|
+
contentSchema?: z.core.JSONSchema.JSONSchema;
|
|
139
|
+
_prefault?: unknown;
|
|
140
|
+
"~standard": z.core.ZodStandardSchemaWithJSON<z.ZodObject<{
|
|
141
|
+
port: z.ZodNumber;
|
|
142
|
+
restart: z.ZodOptional<z.ZodBoolean>;
|
|
143
|
+
}, z.core.$strict>>;
|
|
144
|
+
type: 'object';
|
|
145
|
+
};
|
|
146
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { previewStopRequestSchema, previewServeRequestSchema } from '../contract/index.js';
|
|
3
|
+
export const previewToolDefinition = {
|
|
4
|
+
name: 'cezar_preview_serve',
|
|
5
|
+
description: `Register a web dev server of this task so the user can click through it in the cockpit's live preview. Always pin the port (\`vite --strictPort\`, \`next dev -p\`) so the server comes up on the port you register. Squawk starts the command itself when the user opens the preview; do not wait for the user. ` +
|
|
6
|
+
'To drive the browser the user sees, connect to `$CEZ_PREVIEW_CDP_URL` when it is set, e.g. `agent-browser --cdp "$CEZ_PREVIEW_CDP_URL" --pin-tab open http://localhost:5173`; the user watches your page live. `agent-browser record` needs ffmpeg on PATH.',
|
|
7
|
+
inputSchema: { ...z.toJSONSchema(previewServeRequestSchema, { io: 'input' }), type: 'object' },
|
|
8
|
+
};
|
|
9
|
+
export const previewStopToolDefinition = {
|
|
10
|
+
name: 'cezar_preview_stop',
|
|
11
|
+
description: `Stop a preview server Squawk started for your own task. Set restart to true to reuse the unchanged command the owner approved, including after a crash. Adopted servers cannot be stopped; changed registrations need the owner to press Run and open again.`,
|
|
12
|
+
inputSchema: { ...z.toJSONSchema(previewStopRequestSchema, { io: 'input' }), type: 'object' },
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=tool-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-catalog.js","sourceRoot":"","sources":["../../src/preview/tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAE3G,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,mTAAmT;QAC9T,6PAA6P;IAC/P,WAAW,EAAE,EAAE,GAAG,CAAC,CAAC,YAAY,CAAC,yBAAyB,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,QAAiB,EAAE;CACxG,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,8PAA8P;IAC3Q,WAAW,EAAE,EAAE,GAAG,CAAC,CAAC,YAAY,CAAC,wBAAwB,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,QAAiB,EAAE;CACvG,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type PreviewStopResult, type PreviewServeResult } from '../contract/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* hearsay-tools/cezarion#781: posts the arguments unparsed, so the server names the failing field in its hint. Every
|
|
4
|
+
* transport failure, refusal or unreadable answer becomes the typed `unavailable` result; this
|
|
5
|
+
* never throws.
|
|
6
|
+
*/
|
|
7
|
+
export declare function callPreviewServe(input: unknown, env?: NodeJS.ProcessEnv): Promise<PreviewServeResult>;
|
|
8
|
+
export declare function callPreviewStop(input: unknown, env?: NodeJS.ProcessEnv): Promise<PreviewStopResult>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { callTool } from '../ci-wait/client.js';
|
|
2
|
+
import { previewRefusal } from './tool-errors.js';
|
|
3
|
+
import { previewStopResult } from './registration.js';
|
|
4
|
+
import { previewServeResultSchema, previewStopResultSchema } from '../contract/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* hearsay-tools/cezarion#781: posts the arguments unparsed, so the server names the failing field in its hint. Every
|
|
7
|
+
* transport failure, refusal or unreadable answer becomes the typed `unavailable` result; this
|
|
8
|
+
* never throws.
|
|
9
|
+
*/
|
|
10
|
+
export function callPreviewServe(input, env = process.env) {
|
|
11
|
+
return callTool(input, env, 'cezar_preview_serve', previewServeResultSchema, previewRefusal('unavailable'));
|
|
12
|
+
}
|
|
13
|
+
export function callPreviewStop(input, env = process.env) {
|
|
14
|
+
return callTool(input, env, 'cezar_preview_stop', previewStopResultSchema, previewStopResult('unavailable'));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=tool-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-client.js","sourceRoot":"","sources":["../../src/preview/tool-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAmD,MAAM,sCAAsC,CAAC;AAC1J;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc,EAAE,GAAG,GAAsB,OAAO,CAAC,GAAG;IACnF,OAAO,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC,CAAC;AAC9G,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAc,EAAE,GAAG,GAAsB,OAAO,CAAC,GAAG;IAClF,OAAO,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,iBAAiB,CAAC,aAAa,CAAC,CAAC,CAAC;AAC/G,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-env.js","sourceRoot":"","sources":["../../src/preview/tool-env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,2DAA2D;AAC3D,MAAM,UAAU,kBAAkB,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG,IAAa,OAAO,UAAU,CAAC,SAAS,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PreviewResultCode, PreviewServeResult } from '../contract/index.js';
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
/** The refusals Squawk's tool server answers itself; registration codes come from its owner. */
|
|
4
|
+
export declare function previewRefusal(code: Extract<PreviewResultCode, 'preview_disabled' | 'headless' | 'unavailable'>): PreviewServeResult;
|
|
5
|
+
export declare function previewOversized(): PreviewServeResult;
|
|
6
|
+
/** Names the first failing field and its rule, then a valid example call. */
|
|
7
|
+
export declare function previewInvalidInput(error: z.ZodError, input: unknown): PreviewServeResult;
|