@hearsay-tools/squawk 0.18.0-pr3442.6029 → 0.18.0-pr3445.6034
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/enabled.d.ts +2 -0
- package/dist/automations/enabled.js +6 -0
- package/dist/automations/enabled.js.map +1 -0
- package/dist/ci-wait/controller.d.ts +4 -4
- package/dist/ci-wait/tool-catalog.js +2 -1
- package/dist/ci-wait/tool-catalog.js.map +1 -1
- package/dist/core/structured-output.d.ts +9 -0
- package/dist/core/structured-output.js +64 -0
- package/dist/core/structured-output.js.map +1 -0
- package/dist/delegation/routes.d.ts +77 -77
- package/dist/delegation/transport.d.ts +77 -77
- package/dist/planner.d.ts +1 -8
- package/dist/planner.js +2 -63
- package/dist/planner.js.map +1 -1
- package/dist/runs/auto-name.js +1 -1
- package/dist/runs/auto-name.js.map +1 -1
- package/dist/server/capabilities.js +2 -1
- package/dist/server/capabilities.js.map +1 -1
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/reports-api.d.ts +2 -2
- package/dist/server/server.d.ts +1768 -1768
- package/dist/voice/routes.d.ts +19 -19
- package/dist/workflows/run/launch-context.js +2 -2
- package/dist/workflows/run/launch-context.js.map +1 -1
- package/package.json +4 -4
- package/web/dist/assets/{activity-motion-Dwbj6jhc.js → activity-motion-Bqd8S9Xy.js} +1 -1
- package/web/dist/assets/{activity-route-B-nNOAut.js → activity-route-DQI_8J09.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-B2Qdz87E.js → commit-diff-panel-C7BUSPzE.js} +1 -1
- package/web/dist/assets/{diff-CCAF-_Tw.js → diff-Bwy0qFul.js} +2 -2
- package/web/dist/assets/{diff-view-QR0DptKW.js → diff-view-B9kgeZTm.js} +1 -1
- package/web/dist/assets/{file-preview-BwwNesW1.js → file-preview-DrXgM1-S.js} +1 -1
- package/web/dist/assets/{git-toolbar-DnQ6mcCv.js → git-toolbar-B1gOn_1U.js} +1 -1
- package/web/dist/assets/{github-BO-xp8-S.js → github-g-ZOTwHQ.js} +1 -1
- package/web/dist/assets/{global-activity-route-D_S1cV1-.js → global-activity-route-CZ_xwiz3.js} +1 -1
- package/web/dist/assets/{index-CdSsfytt.js → index-75IttVLX.js} +3 -3
- package/web/dist/assets/{preview-pane-connected-C9CbBLtp.js → preview-pane-connected-Cx8q-Yrh.js} +1 -1
- package/web/dist/assets/{repo-git-MeMneNTw.js → repo-git-DgZuI4FP.js} +1 -1
- package/web/dist/assets/{report-reader-CaZy8pSu.js → report-reader-CeBtx_Sf.js} +1 -1
- package/web/dist/assets/{reports-CPGzrxb8.js → reports-CRPxIRMM.js} +1 -1
- package/web/dist/assets/{run-header-tIYs73n7.js → run-header-C8Eeonkx.js} +1 -1
- package/web/dist/assets/{skills-BlAVNiGG.js → skills-DDoJCcmD.js} +1 -1
- package/web/dist/assets/{task-changes-CBQkLl6y.js → task-changes-XAcKfebn.js} +1 -1
- package/web/dist/assets/{task-commits-C4-HlmaT.js → task-commits-D5V0Q0au.js} +1 -1
- package/web/dist/assets/{task-files-BQRbuPWR.js → task-files-CkPJZE0w.js} +1 -1
- package/web/dist/assets/{task-github-item-KnVPnf4G.js → task-github-item-CbCOKkvp.js} +1 -1
- package/web/dist/assets/{task-thread-PNFt0OaW.js → task-thread-DyR8HsDz.js} +3 -3
- package/web/dist/assets/{thread-state-CTnsGWoU.js → thread-state-BtmIMbkZ.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-xcHiowJm.js → use-hand-to-agent-state-BUpbMYM9.js} +1 -1
- package/web/dist/assets/{workflows-YRUh1J50.js → workflows-CEFtJj_h.js} +1 -1
- package/web/dist/index.html +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { productEnv } from '../core/product-env.js';
|
|
2
|
+
/** Automations are on unless the value is exactly `0` (spec 2026-10-02-scheduled-automations). */
|
|
3
|
+
export function automationsEnabled(env = process.env) {
|
|
4
|
+
return productEnv('AUTOMATIONS', env) !== '0';
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=enabled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enabled.js","sourceRoot":"","sources":["../../src/automations/enabled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,kGAAkG;AAClG,MAAM,UAAU,kBAAkB,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IACrE,OAAO,UAAU,CAAC,aAAa,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC;AAChD,CAAC"}
|
|
@@ -646,6 +646,10 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
646
646
|
};
|
|
647
647
|
} | {
|
|
648
648
|
output: {
|
|
649
|
+
ok: false;
|
|
650
|
+
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
651
|
+
message: string;
|
|
652
|
+
} | {
|
|
649
653
|
ok: true;
|
|
650
654
|
task: {
|
|
651
655
|
id: string;
|
|
@@ -657,10 +661,6 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
657
661
|
url?: string | undefined;
|
|
658
662
|
};
|
|
659
663
|
note: string;
|
|
660
|
-
} | {
|
|
661
|
-
ok: false;
|
|
662
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
663
|
-
message: string;
|
|
664
664
|
};
|
|
665
665
|
outputFormat: "json";
|
|
666
666
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { productEnv } from '../core/product-env.js';
|
|
2
|
+
import { automationsEnabled } from '../automations/enabled.js';
|
|
2
3
|
import { cezarAskRequestSchema, cezarCancelWaitRequestSchema, cezarDoneRequestSchema, cezarWaitRequestSchema } from '../contract/index.js';
|
|
3
4
|
import { ASK_LIMITS } from '../contract/index.js';
|
|
4
5
|
import { previewStopRequestSchema, previewServeRequestSchema } from '../contract/index.js';
|
|
@@ -10,7 +11,7 @@ export function previewToolEnabled(env = process.env) {
|
|
|
10
11
|
}
|
|
11
12
|
/** Automations are on unless the value is exactly `0` (spec 2026-10-02-scheduled-automations). */
|
|
12
13
|
export function automationsToolEnabled(env = process.env) {
|
|
13
|
-
return
|
|
14
|
+
return automationsEnabled(env);
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* The Anthropic tool API refuses a top-level `oneOf`/`anyOf`/`allOf`, so `cezar_wait` advertises
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-catalog.js","sourceRoot":"","sources":["../../src/ci-wait/tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACzJ,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAC3G,OAAO,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AACtH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,2FAA2F;AAC3F,MAAM,UAAU,kBAAkB,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IACrE,OAAO,UAAU,CAAC,SAAS,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC;AAC5C,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,sBAAsB,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IACzE,OAAO,
|
|
1
|
+
{"version":3,"file":"tool-catalog.js","sourceRoot":"","sources":["../../src/ci-wait/tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Best-effort structured-output extraction (trimmed from @cezar/core's
|
|
4
|
+
* `parseStructured`): try the whole string after stripping a ```json fence,
|
|
5
|
+
* then scan for balanced top-level `{...}` blocks and return the first that
|
|
6
|
+
* validates. Null when nothing does — the caller decides how to recover.
|
|
7
|
+
*/
|
|
8
|
+
export declare function parseStructured<T>(raw: string, schema: z.ZodType<T, unknown>): T | null;
|
|
9
|
+
export declare function extractJsonObjectCandidates(raw: string): string[];
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Best-effort structured-output extraction (trimmed from @cezar/core's
|
|
3
|
+
* `parseStructured`): try the whole string after stripping a ```json fence,
|
|
4
|
+
* then scan for balanced top-level `{...}` blocks and return the first that
|
|
5
|
+
* validates. Null when nothing does — the caller decides how to recover.
|
|
6
|
+
*/
|
|
7
|
+
export function parseStructured(raw, schema) {
|
|
8
|
+
const cleaned = raw
|
|
9
|
+
.replace(/^```(?:json|javascript|js|jsonl)?\s*\n?/im, '')
|
|
10
|
+
.replace(/\n?```\s*$/m, '')
|
|
11
|
+
.trim();
|
|
12
|
+
try {
|
|
13
|
+
return schema.parse(JSON.parse(cleaned));
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
for (const candidate of extractJsonObjectCandidates(raw)) {
|
|
17
|
+
try {
|
|
18
|
+
return schema.parse(JSON.parse(candidate));
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export function extractJsonObjectCandidates(raw) {
|
|
28
|
+
const candidates = [];
|
|
29
|
+
let start = -1;
|
|
30
|
+
let depth = 0;
|
|
31
|
+
let inString = false;
|
|
32
|
+
let escaped = false;
|
|
33
|
+
for (let i = 0; i < raw.length; i++) {
|
|
34
|
+
const ch = raw[i];
|
|
35
|
+
if (inString) {
|
|
36
|
+
if (escaped)
|
|
37
|
+
escaped = false;
|
|
38
|
+
else if (ch === '\\')
|
|
39
|
+
escaped = true;
|
|
40
|
+
else if (ch === '"')
|
|
41
|
+
inString = false;
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
if (ch === '"') {
|
|
45
|
+
inString = true;
|
|
46
|
+
}
|
|
47
|
+
else if (ch === '{') {
|
|
48
|
+
if (depth === 0)
|
|
49
|
+
start = i;
|
|
50
|
+
depth++;
|
|
51
|
+
}
|
|
52
|
+
else if (ch === '}') {
|
|
53
|
+
if (depth === 0)
|
|
54
|
+
continue;
|
|
55
|
+
depth--;
|
|
56
|
+
if (depth === 0 && start >= 0) {
|
|
57
|
+
candidates.push(raw.slice(start, i + 1));
|
|
58
|
+
start = -1;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return candidates;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=structured-output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structured-output.js","sourceRoot":"","sources":["../../src/core/structured-output.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAI,GAAW,EAAE,MAA6B;IAC3E,MAAM,OAAO,GAAG,GAAG;SAChB,OAAO,CAAC,2CAA2C,EAAE,EAAE,CAAC;SACxD,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC;SAC1B,IAAI,EAAE,CAAC;IACV,IAAI,CAAC;QACH,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3C,CAAC;IAAC,MAAM,CAAC;QACP,KAAK,MAAM,SAAS,IAAI,2BAA2B,CAAC,GAAG,CAAC,EAAE,CAAC;YACzD,IAAI,CAAC;gBACH,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,S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AAC,CAAC;gBACzC,KAAK,GAAG,CAAC,CAAC,CAAC;YACb,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -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,35 @@ 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
|
+
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
86
|
+
models: {
|
|
87
|
+
id: string;
|
|
88
|
+
label: string;
|
|
89
|
+
description: string;
|
|
90
|
+
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
91
|
+
}[];
|
|
92
|
+
source: "cache" | "live" | "unavailable";
|
|
93
|
+
stale: boolean;
|
|
94
|
+
reason?: string | undefined;
|
|
95
|
+
} | {
|
|
85
96
|
scope: "host-default-account";
|
|
86
97
|
runners: {
|
|
87
98
|
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
@@ -102,17 +113,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
102
113
|
reason?: string | undefined;
|
|
103
114
|
}[];
|
|
104
115
|
nextOffset?: number | undefined;
|
|
105
|
-
} | {
|
|
106
|
-
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
107
|
-
models: {
|
|
108
|
-
id: string;
|
|
109
|
-
label: string;
|
|
110
|
-
description: string;
|
|
111
|
-
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
112
|
-
}[];
|
|
113
|
-
source: "cache" | "live" | "unavailable";
|
|
114
|
-
stale: boolean;
|
|
115
|
-
reason?: string | undefined;
|
|
116
116
|
};
|
|
117
117
|
outputFormat: "json";
|
|
118
118
|
status: 200;
|
|
@@ -221,13 +221,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
221
221
|
status: 200;
|
|
222
222
|
input: {
|
|
223
223
|
json: {
|
|
224
|
-
requestIds: string[];
|
|
225
|
-
mode?: "all" | "any" | "one" | undefined;
|
|
226
|
-
timeoutSeconds?: number | undefined;
|
|
227
|
-
} | {
|
|
228
224
|
workerIds: string[];
|
|
229
225
|
timeoutSeconds?: number | undefined;
|
|
230
226
|
mode?: "all" | "any" | "one" | undefined;
|
|
227
|
+
} | {
|
|
228
|
+
requestIds: string[];
|
|
229
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
230
|
+
timeoutSeconds?: number | 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:
|
|
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
|
-
|
|
990
|
-
|
|
989
|
+
workerId: string;
|
|
990
|
+
baselineSha: string;
|
|
991
|
+
diff: string;
|
|
992
|
+
truncated: boolean;
|
|
991
993
|
};
|
|
992
994
|
outputFormat: "json";
|
|
993
|
-
status:
|
|
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
|
-
|
|
1002
|
-
|
|
1003
|
-
diff: string;
|
|
1004
|
-
truncated: boolean;
|
|
1003
|
+
error: string;
|
|
1004
|
+
code?: "invalid_input" | undefined;
|
|
1005
1005
|
};
|
|
1006
1006
|
outputFormat: "json";
|
|
1007
|
-
status:
|
|
1007
|
+
status: 400;
|
|
1008
1008
|
input: {
|
|
1009
1009
|
param: {
|
|
1010
1010
|
workerId: string;
|