@hearsay-tools/squawk 0.18.0-dev.6755 → 0.18.0-dev.6774
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 +4 -4
- package/dist/contract/index.d.ts +2 -0
- package/dist/contract/index.js +74 -2
- package/dist/contract/own-lookup.d.ts +5 -0
- package/dist/contract/runner-facts.d.ts +91 -0
- package/dist/contract/runs.d.ts +1 -1
- package/dist/core/claude-cli-runner.d.ts +5 -0
- package/dist/core/claude-forked-command.d.ts +36 -0
- package/dist/core/claude-forked-command.js +65 -0
- package/dist/core/claude-forked-command.js.map +1 -0
- package/dist/core/claude-ui-mapper.d.ts +2 -1
- package/dist/core/claude-ui-mapper.js +17 -1
- package/dist/core/claude-ui-mapper.js.map +1 -1
- package/dist/core/codex-app-server-runner.d.ts +5 -0
- package/dist/core/cursor-print-runner.d.ts +5 -0
- package/dist/core/cursor-runner.d.ts +5 -0
- package/dist/core/omp-runner.d.ts +5 -0
- package/dist/core/opencode-server-runner.d.ts +5 -0
- package/dist/core/own-lookup.d.ts +1 -5
- package/dist/core/own-lookup.js +1 -7
- package/dist/core/own-lookup.js.map +1 -1
- package/dist/core/pi-runner.d.ts +5 -0
- package/dist/core/runner-cli.d.ts +31 -0
- package/dist/core/runner-cli.js +40 -0
- package/dist/core/runner-cli.js.map +1 -0
- package/dist/core/runner-facts.d.ts +57 -0
- package/dist/core/runner-facts.js +53 -0
- package/dist/core/runner-facts.js.map +1 -1
- package/dist/core/runner-model-catalog.js +2 -9
- package/dist/core/runner-model-catalog.js.map +1 -1
- package/dist/delegation/routes.d.ts +21 -21
- package/dist/delegation/transport.d.ts +11 -11
- package/dist/server/checkout.d.ts +1 -1
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/open-in-targets.d.ts +1 -1
- package/dist/server/open-in-targets.js +5 -12
- package/dist/server/open-in-targets.js.map +1 -1
- package/dist/server/provider-action-gate.js +3 -10
- package/dist/server/provider-action-gate.js.map +1 -1
- package/dist/server/server.d.ts +188 -195
- package/dist/server/server.js +33 -68
- package/dist/server/server.js.map +1 -1
- package/dist/workflows/run/compose.js +1 -1
- package/dist/workflows/run/compose.js.map +1 -1
- package/dist/workflows/run/liveness-timers.d.ts +4 -0
- package/dist/workflows/run/liveness-timers.js +2 -0
- package/dist/workflows/run/liveness-timers.js.map +1 -1
- package/dist/workflows/run/session-events.d.ts +2 -2
- package/dist/workflows/run/session-events.js +1 -1
- package/dist/workflows/run/session-events.js.map +1 -1
- package/dist/workflows/run/subagent-waits.d.ts +7 -0
- package/dist/workflows/run/subagent-waits.js +30 -0
- package/dist/workflows/run/subagent-waits.js.map +1 -1
- package/dist/workflows/run/turn-settler.d.ts +4 -1
- package/dist/workflows/run/turn-settler.js +6 -0
- package/dist/workflows/run/turn-settler.js.map +1 -1
- package/dist/workflows/run-states.js +1 -1
- package/dist/workflows/run-states.js.map +1 -1
- package/package.json +4 -4
- package/scripts/mock-ask-answer.d.mts +2 -0
- package/scripts/mock-opencode-questions.d.mts +14 -0
- package/scripts/mock-pi-rpc.mjs +9 -4
- package/web/dist/assets/{activity-motion-CjPL-sr2.js → activity-motion-gOopdagH.js} +1 -1
- package/web/dist/assets/{activity-route-C0tIKFED.js → activity-route-D7bDtXpW.js} +1 -1
- package/web/dist/assets/agent-accounts-otlDWnij.js +18 -0
- package/web/dist/assets/{commit-diff-panel-uIMnjowv.js → commit-diff-panel-iQf0Rlcx.js} +1 -1
- package/web/dist/assets/{diff-CUIYkwMG.js → diff-DQfcliZC.js} +2 -2
- package/web/dist/assets/{diff-view-CH27Vgln.js → diff-view-BbM-71Cs.js} +1 -1
- package/web/dist/assets/{file-preview-wrsPzzjz.js → file-preview-DgU8vo8k.js} +1 -1
- package/web/dist/assets/{git-toolbar-C1v8n8nd.js → git-toolbar-C8agvpYS.js} +1 -1
- package/web/dist/assets/{github-0PYN1Ju2.js → github-hXmxAXmA.js} +1 -1
- package/web/dist/assets/{global-activity-route-KDUFNxgb.js → global-activity-route-D_r1ImUh.js} +1 -1
- package/web/dist/assets/index-tN02NX7A.js +17 -0
- package/web/dist/assets/{preview-pane-connected-B1XJVVoo.js → preview-pane-connected-D__9JwyU.js} +1 -1
- package/web/dist/assets/{prompt-template-menu-DC5XoYEs.js → prompt-template-menu-BJfUg1uF.js} +1 -1
- package/web/dist/assets/queries-BJM44umy.js +1 -0
- package/web/dist/assets/{reference-chip-peKR_0El.js → reference-chip-vraIzoEF.js} +1 -1
- package/web/dist/assets/{repo-git-DU5eh5V8.js → repo-git-B4qZq37d.js} +1 -1
- package/web/dist/assets/{report-reader-DsvVau4u.js → report-reader-Djix-ICM.js} +1 -1
- package/web/dist/assets/{reports-Brs9M380.js → reports-Do-dkavq.js} +1 -1
- package/web/dist/assets/run-header-Di9LaKQs.js +2 -0
- package/web/dist/assets/{skills-TJPEPrU2.js → skills-CPnIvFnR.js} +1 -1
- package/web/dist/assets/{task-changes-BMMqKQZQ.js → task-changes-CW7NzgL5.js} +1 -1
- package/web/dist/assets/{task-commits-DzOQ_acm.js → task-commits-Bkwi7o1B.js} +1 -1
- package/web/dist/assets/{task-files-CqBxJ5lZ.js → task-files-geRzIszC.js} +1 -1
- package/web/dist/assets/{task-github-item-DYZGczpf.js → task-github-item-UbCCP2Ud.js} +1 -1
- package/web/dist/assets/task-thread-CkiEiypn.js +9 -0
- package/web/dist/assets/{thread-state-VHo3TMiY.js → thread-state-CajkV5Ft.js} +1 -1
- package/web/dist/assets/{use-desktop-DBpXK7UB.js → use-desktop-Ct4lvA3b.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-DiPruziF.js → use-hand-to-agent-state-Cnxq_2F6.js} +1 -1
- package/web/dist/assets/workflows-Csr2hbks.js +7 -0
- package/web/dist/index.html +6 -6
- package/web/dist/assets/agent-accounts-Bfv01ivB.js +0 -18
- package/web/dist/assets/index-DgeV0f4H.js +0 -17
- package/web/dist/assets/queries-Ce9CPdRy.js +0 -1
- package/web/dist/assets/run-header-BYyz-dXB.js +0 -2
- package/web/dist/assets/task-thread-DYEBHvdF.js +0 -9
- package/web/dist/assets/workflows-DiURHZJ-.js +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-in-targets.js","sourceRoot":"","sources":["../../src/server/open-in-targets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAE3F,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"open-in-targets.js","sourceRoot":"","sources":["../../src/server/open-in-targets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAE3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAsB,MAAM,uBAAuB,CAAC;AAE/E,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AACxG,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAapD,4FAA4F;AAC5F,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,CAAU,EACV,SAAiB,EACjB,OAA2B,EAC3B,QAAqC;IAErC,IAAI,CAAC,OAAO;QAAE,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,0CAA0C,EAAE,EAAE,GAAG,CAAC,CAAC;IACxF,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC1D,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QAC3B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GAAG,MAAM,wBAAwB,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,GAAY,EAAE,EAAE;QAC9I,IAAI,GAAG,YAAY,4BAA4B;YAAE,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;QAC/E,MAAM,GAAG,CAAC;IACZ,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC;AACjC,CAAC;AAED,2FAA2F;AAC3F,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,CAAU,EAAE,MAAc,EAAE,GAAW,EAAE,OAAyB;IACjG,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1C,IAAI,CAAC,MAAM;QAAE,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,kBAAkB,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,GAAG,CAAC,CAAC;IAClF,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { controlLocation } from '../contract/index.js';
|
|
2
|
+
import { runnerDisplayName } from '../contract/index.js';
|
|
2
3
|
export { providersRequiredByWorkflow } from '../contract/index.js';
|
|
3
|
-
const LABEL = {
|
|
4
|
-
claude: 'Claude Code',
|
|
5
|
-
codex: 'Codex',
|
|
6
|
-
opencode: 'OpenCode',
|
|
7
|
-
pi: 'pi',
|
|
8
|
-
cursor: 'Cursor',
|
|
9
|
-
omp: 'OMP',
|
|
10
|
-
};
|
|
11
4
|
export function providerForExistingRun(run, override) {
|
|
12
5
|
if (override)
|
|
13
6
|
return override;
|
|
@@ -17,10 +10,10 @@ export function unavailableProviderMessage(required, response) {
|
|
|
17
10
|
for (const provider of required) {
|
|
18
11
|
const row = response.providers.find(({ provider: id }) => id === provider);
|
|
19
12
|
if (row?.enabled === false) {
|
|
20
|
-
return `${
|
|
13
|
+
return `${runnerDisplayName(provider)} is disabled. Enable it in ${controlLocation('providers')}.`;
|
|
21
14
|
}
|
|
22
15
|
if (row?.status !== 'connected') {
|
|
23
|
-
return `${
|
|
16
|
+
return `${runnerDisplayName(provider)} credentials are unavailable. Authorize it in ${controlLocation('providers')}.`;
|
|
24
17
|
}
|
|
25
18
|
}
|
|
26
19
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-action-gate.js","sourceRoot":"","sources":["../../src/server/provider-action-gate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;
|
|
1
|
+
{"version":3,"file":"provider-action-gate.js","sourceRoot":"","sources":["../../src/server/provider-action-gate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAM9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAErF,MAAM,UAAU,sBAAsB,CACpC,GAAc,EACd,QAAqB;IAErB,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAC9B,OAAO,GAAG,CAAC,MAAM,IAAI,QAAQ,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,QAA+B,EAC/B,QAAgC;IAEhC,KAAK,MAAM,QAAQ,IAAI,QAAQ,EAAE,CAAC;QAChC,MAAM,GAAG,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC;QAC3E,IAAI,GAAG,EAAE,OAAO,KAAK,KAAK,EAAE,CAAC;YAC3B,OAAO,GAAG,iBAAiB,CAAC,QAAQ,CAAC,8BAA8B,eAAe,CAAC,WAAW,CAAC,GAAG,CAAC;QACrG,CAAC;QACD,IAAI,GAAG,EAAE,MAAM,KAAK,WAAW,EAAE,CAAC;YAChC,OAAO,GAAG,iBAAiB,CAAC,QAAQ,CAAC,iDAAiD,eAAe,CAAC,WAAW,CAAC,GAAG,CAAC;QACxH,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/server/server.d.ts
CHANGED
|
@@ -181,194 +181,6 @@ export declare class WorkspaceEventBus {
|
|
|
181
181
|
on(listener: (event: WorkspaceEventName, data: unknown) => void): () => void;
|
|
182
182
|
}
|
|
183
183
|
export declare function createApp(deps: ServerDeps): import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
184
|
-
"/health": {
|
|
185
|
-
$get: {
|
|
186
|
-
output: {
|
|
187
|
-
version: string;
|
|
188
|
-
latestVersion?: string | undefined;
|
|
189
|
-
repoRoot: string;
|
|
190
|
-
repo: {
|
|
191
|
-
root: string;
|
|
192
|
-
branch: string;
|
|
193
|
-
remote?: string | undefined;
|
|
194
|
-
} | null;
|
|
195
|
-
checks: {
|
|
196
|
-
name: import("../core/agent-runner.ts").RunnerId | 'gh' | 'git';
|
|
197
|
-
available: boolean;
|
|
198
|
-
version?: string;
|
|
199
|
-
hint?: string;
|
|
200
|
-
}[];
|
|
201
|
-
defaultRunner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
202
|
-
forge: {
|
|
203
|
-
available?: boolean | undefined;
|
|
204
|
-
reason?: string;
|
|
205
|
-
kind: "github";
|
|
206
|
-
} | null;
|
|
207
|
-
capabilities: {
|
|
208
|
-
localHandoff: boolean;
|
|
209
|
-
settingsAdmin: boolean;
|
|
210
|
-
remoteSettingsAdmin: boolean;
|
|
211
|
-
automations: boolean;
|
|
212
|
-
preview: boolean;
|
|
213
|
-
tokenMetrics: boolean;
|
|
214
|
-
tokenUsageMetrics: boolean;
|
|
215
|
-
costMetrics: boolean;
|
|
216
|
-
};
|
|
217
|
-
projects: {
|
|
218
|
-
id: string;
|
|
219
|
-
name: string;
|
|
220
|
-
}[];
|
|
221
|
-
bootProject: string;
|
|
222
|
-
};
|
|
223
|
-
outputFormat: "json";
|
|
224
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
225
|
-
input: {};
|
|
226
|
-
};
|
|
227
|
-
};
|
|
228
|
-
}, "/"> | import("hono/types").MergeSchemaPath<{
|
|
229
|
-
"/models": {
|
|
230
|
-
$get: {
|
|
231
|
-
output: {
|
|
232
|
-
error: string;
|
|
233
|
-
code?: "invalid_input" | undefined;
|
|
234
|
-
};
|
|
235
|
-
outputFormat: "json";
|
|
236
|
-
status: 400;
|
|
237
|
-
input: {
|
|
238
|
-
query: {
|
|
239
|
-
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
240
|
-
};
|
|
241
|
-
};
|
|
242
|
-
} | {
|
|
243
|
-
output: {
|
|
244
|
-
runner: import("../core/agent-runner.ts").RunnerId;
|
|
245
|
-
models: {
|
|
246
|
-
id: string;
|
|
247
|
-
label: string;
|
|
248
|
-
description: string;
|
|
249
|
-
effortLevels?: import('../contract/index.js').EffortLevel[];
|
|
250
|
-
}[];
|
|
251
|
-
source: import("../core/runner-model-catalog.ts").ModelCatalogSource;
|
|
252
|
-
stale: boolean;
|
|
253
|
-
reason?: string;
|
|
254
|
-
};
|
|
255
|
-
outputFormat: "json";
|
|
256
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
257
|
-
input: {
|
|
258
|
-
query: {
|
|
259
|
-
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
260
|
-
};
|
|
261
|
-
};
|
|
262
|
-
};
|
|
263
|
-
};
|
|
264
|
-
}, "/"> | import("hono/types").MergeSchemaPath<{
|
|
265
|
-
"/fs/browse": {
|
|
266
|
-
$get: {
|
|
267
|
-
output: {
|
|
268
|
-
error: string;
|
|
269
|
-
code?: "invalid_input" | undefined;
|
|
270
|
-
};
|
|
271
|
-
outputFormat: "json";
|
|
272
|
-
status: 400;
|
|
273
|
-
input: {
|
|
274
|
-
query: {
|
|
275
|
-
path?: string | undefined;
|
|
276
|
-
showHidden?: string | undefined;
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
} | {
|
|
280
|
-
output: {
|
|
281
|
-
error: string;
|
|
282
|
-
};
|
|
283
|
-
outputFormat: "json";
|
|
284
|
-
status: 400 | 403 | 404;
|
|
285
|
-
input: {
|
|
286
|
-
query: {
|
|
287
|
-
path?: string | undefined;
|
|
288
|
-
showHidden?: string | undefined;
|
|
289
|
-
};
|
|
290
|
-
};
|
|
291
|
-
} | {
|
|
292
|
-
output: {
|
|
293
|
-
path: string;
|
|
294
|
-
parent: string | null;
|
|
295
|
-
dirs: {
|
|
296
|
-
name: string;
|
|
297
|
-
path: string;
|
|
298
|
-
isRepo: boolean;
|
|
299
|
-
}[];
|
|
300
|
-
truncated: boolean;
|
|
301
|
-
};
|
|
302
|
-
outputFormat: "json";
|
|
303
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
304
|
-
input: {
|
|
305
|
-
query: {
|
|
306
|
-
path?: string | undefined;
|
|
307
|
-
showHidden?: string | undefined;
|
|
308
|
-
};
|
|
309
|
-
};
|
|
310
|
-
};
|
|
311
|
-
};
|
|
312
|
-
}, "/"> | import("hono/types").MergeSchemaPath<{
|
|
313
|
-
"/automation-checks/:checkId": {
|
|
314
|
-
$get: {
|
|
315
|
-
output: {
|
|
316
|
-
id: string;
|
|
317
|
-
automationId: string;
|
|
318
|
-
mode: 'preview' | 'execute';
|
|
319
|
-
status: 'queued' | 'running' | 'complete' | 'error';
|
|
320
|
-
createdAt: string;
|
|
321
|
-
completedAt?: string;
|
|
322
|
-
matches?: number;
|
|
323
|
-
truncated?: boolean;
|
|
324
|
-
error?: string;
|
|
325
|
-
};
|
|
326
|
-
outputFormat: "json";
|
|
327
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
328
|
-
input: {
|
|
329
|
-
param: {
|
|
330
|
-
checkId: string;
|
|
331
|
-
};
|
|
332
|
-
};
|
|
333
|
-
} | {
|
|
334
|
-
output: {
|
|
335
|
-
error: string;
|
|
336
|
-
};
|
|
337
|
-
outputFormat: "json";
|
|
338
|
-
status: 404;
|
|
339
|
-
input: {
|
|
340
|
-
param: {
|
|
341
|
-
checkId: string;
|
|
342
|
-
};
|
|
343
|
-
};
|
|
344
|
-
};
|
|
345
|
-
};
|
|
346
|
-
}, "/"> | import("hono/types").MergeSchemaPath<{
|
|
347
|
-
"/workspace/events": {
|
|
348
|
-
$get: {
|
|
349
|
-
output: {};
|
|
350
|
-
outputFormat: string;
|
|
351
|
-
status: import("hono/utils/http-status").StatusCode;
|
|
352
|
-
input: {
|
|
353
|
-
query: {
|
|
354
|
-
runs?: "summary" | undefined;
|
|
355
|
-
};
|
|
356
|
-
};
|
|
357
|
-
} | {
|
|
358
|
-
output: {
|
|
359
|
-
error: string;
|
|
360
|
-
code?: "invalid_input" | undefined;
|
|
361
|
-
};
|
|
362
|
-
outputFormat: "json";
|
|
363
|
-
status: 400;
|
|
364
|
-
input: {
|
|
365
|
-
query: {
|
|
366
|
-
runs?: "summary" | undefined;
|
|
367
|
-
};
|
|
368
|
-
};
|
|
369
|
-
};
|
|
370
|
-
};
|
|
371
|
-
}, "/"> | import("hono/types").MergeSchemaPath<{
|
|
372
184
|
"/workspace/activity": {
|
|
373
185
|
$get: {
|
|
374
186
|
output: {
|
|
@@ -626,6 +438,194 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
626
438
|
};
|
|
627
439
|
};
|
|
628
440
|
};
|
|
441
|
+
}, "/"> | import("hono/types").MergeSchemaPath<{
|
|
442
|
+
"/health": {
|
|
443
|
+
$get: {
|
|
444
|
+
output: {
|
|
445
|
+
version: string;
|
|
446
|
+
latestVersion?: string | undefined;
|
|
447
|
+
repoRoot: string;
|
|
448
|
+
repo: {
|
|
449
|
+
root: string;
|
|
450
|
+
branch: string;
|
|
451
|
+
remote?: string | undefined;
|
|
452
|
+
} | null;
|
|
453
|
+
checks: {
|
|
454
|
+
name: import("../core/agent-runner.ts").RunnerId | 'gh' | 'git';
|
|
455
|
+
available: boolean;
|
|
456
|
+
version?: string;
|
|
457
|
+
hint?: string;
|
|
458
|
+
}[];
|
|
459
|
+
defaultRunner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
460
|
+
forge: {
|
|
461
|
+
available?: boolean | undefined;
|
|
462
|
+
reason?: string;
|
|
463
|
+
kind: "github";
|
|
464
|
+
} | null;
|
|
465
|
+
capabilities: {
|
|
466
|
+
localHandoff: boolean;
|
|
467
|
+
settingsAdmin: boolean;
|
|
468
|
+
remoteSettingsAdmin: boolean;
|
|
469
|
+
automations: boolean;
|
|
470
|
+
preview: boolean;
|
|
471
|
+
tokenMetrics: boolean;
|
|
472
|
+
tokenUsageMetrics: boolean;
|
|
473
|
+
costMetrics: boolean;
|
|
474
|
+
};
|
|
475
|
+
projects: {
|
|
476
|
+
id: string;
|
|
477
|
+
name: string;
|
|
478
|
+
}[];
|
|
479
|
+
bootProject: string;
|
|
480
|
+
};
|
|
481
|
+
outputFormat: "json";
|
|
482
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
483
|
+
input: {};
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
}, "/"> | import("hono/types").MergeSchemaPath<{
|
|
487
|
+
"/models": {
|
|
488
|
+
$get: {
|
|
489
|
+
output: {
|
|
490
|
+
error: string;
|
|
491
|
+
code?: "invalid_input" | undefined;
|
|
492
|
+
};
|
|
493
|
+
outputFormat: "json";
|
|
494
|
+
status: 400;
|
|
495
|
+
input: {
|
|
496
|
+
query: {
|
|
497
|
+
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
498
|
+
};
|
|
499
|
+
};
|
|
500
|
+
} | {
|
|
501
|
+
output: {
|
|
502
|
+
runner: import("../core/agent-runner.ts").RunnerId;
|
|
503
|
+
models: {
|
|
504
|
+
id: string;
|
|
505
|
+
label: string;
|
|
506
|
+
description: string;
|
|
507
|
+
effortLevels?: import('../contract/index.js').EffortLevel[];
|
|
508
|
+
}[];
|
|
509
|
+
source: import("../core/runner-model-catalog.ts").ModelCatalogSource;
|
|
510
|
+
stale: boolean;
|
|
511
|
+
reason?: string;
|
|
512
|
+
};
|
|
513
|
+
outputFormat: "json";
|
|
514
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
515
|
+
input: {
|
|
516
|
+
query: {
|
|
517
|
+
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
}, "/"> | import("hono/types").MergeSchemaPath<{
|
|
523
|
+
"/fs/browse": {
|
|
524
|
+
$get: {
|
|
525
|
+
output: {
|
|
526
|
+
error: string;
|
|
527
|
+
code?: "invalid_input" | undefined;
|
|
528
|
+
};
|
|
529
|
+
outputFormat: "json";
|
|
530
|
+
status: 400;
|
|
531
|
+
input: {
|
|
532
|
+
query: {
|
|
533
|
+
path?: string | undefined;
|
|
534
|
+
showHidden?: string | undefined;
|
|
535
|
+
};
|
|
536
|
+
};
|
|
537
|
+
} | {
|
|
538
|
+
output: {
|
|
539
|
+
error: string;
|
|
540
|
+
};
|
|
541
|
+
outputFormat: "json";
|
|
542
|
+
status: 400 | 403 | 404;
|
|
543
|
+
input: {
|
|
544
|
+
query: {
|
|
545
|
+
path?: string | undefined;
|
|
546
|
+
showHidden?: string | undefined;
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
} | {
|
|
550
|
+
output: {
|
|
551
|
+
path: string;
|
|
552
|
+
parent: string | null;
|
|
553
|
+
dirs: {
|
|
554
|
+
name: string;
|
|
555
|
+
path: string;
|
|
556
|
+
isRepo: boolean;
|
|
557
|
+
}[];
|
|
558
|
+
truncated: boolean;
|
|
559
|
+
};
|
|
560
|
+
outputFormat: "json";
|
|
561
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
562
|
+
input: {
|
|
563
|
+
query: {
|
|
564
|
+
path?: string | undefined;
|
|
565
|
+
showHidden?: string | undefined;
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
};
|
|
569
|
+
};
|
|
570
|
+
}, "/"> | import("hono/types").MergeSchemaPath<{
|
|
571
|
+
"/automation-checks/:checkId": {
|
|
572
|
+
$get: {
|
|
573
|
+
output: {
|
|
574
|
+
id: string;
|
|
575
|
+
automationId: string;
|
|
576
|
+
mode: 'preview' | 'execute';
|
|
577
|
+
status: 'queued' | 'running' | 'complete' | 'error';
|
|
578
|
+
createdAt: string;
|
|
579
|
+
completedAt?: string;
|
|
580
|
+
matches?: number;
|
|
581
|
+
truncated?: boolean;
|
|
582
|
+
error?: string;
|
|
583
|
+
};
|
|
584
|
+
outputFormat: "json";
|
|
585
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
586
|
+
input: {
|
|
587
|
+
param: {
|
|
588
|
+
checkId: string;
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
} | {
|
|
592
|
+
output: {
|
|
593
|
+
error: string;
|
|
594
|
+
};
|
|
595
|
+
outputFormat: "json";
|
|
596
|
+
status: 404;
|
|
597
|
+
input: {
|
|
598
|
+
param: {
|
|
599
|
+
checkId: string;
|
|
600
|
+
};
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
}, "/"> | import("hono/types").MergeSchemaPath<{
|
|
605
|
+
"/workspace/events": {
|
|
606
|
+
$get: {
|
|
607
|
+
output: {};
|
|
608
|
+
outputFormat: string;
|
|
609
|
+
status: import("hono/utils/http-status").StatusCode;
|
|
610
|
+
input: {
|
|
611
|
+
query: {
|
|
612
|
+
runs?: "summary" | undefined;
|
|
613
|
+
};
|
|
614
|
+
};
|
|
615
|
+
} | {
|
|
616
|
+
output: {
|
|
617
|
+
error: string;
|
|
618
|
+
code?: "invalid_input" | undefined;
|
|
619
|
+
};
|
|
620
|
+
outputFormat: "json";
|
|
621
|
+
status: 400;
|
|
622
|
+
input: {
|
|
623
|
+
query: {
|
|
624
|
+
runs?: "summary" | undefined;
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
};
|
|
628
|
+
};
|
|
629
629
|
}, "/"> | import("hono/types").MergeSchemaPath<{
|
|
630
630
|
"/workspace/runs-index": {
|
|
631
631
|
$get: {
|
|
@@ -34800,10 +34800,3 @@ export { cockpitOriginFor } from './server-deps.ts';
|
|
|
34800
34800
|
* origins are untrusted and may read only loopbackReadable topics.
|
|
34801
34801
|
*/
|
|
34802
34802
|
export declare function verifyWsUpgrade(req: IncomingMessage, bindHost?: string): WsUpgradeVerdict;
|
|
34803
|
-
/** True for session ids safe to splice into the take-over command (see above). */
|
|
34804
|
-
export declare function isSafeSessionId(sessionId: string): boolean;
|
|
34805
|
-
/**
|
|
34806
|
-
* Build native session takeover commands. Legacy/undefined backend defaults to Claude. Refuse
|
|
34807
|
-
* unrecognized session-id shapes rather than embedding unsafe or platform-misquoted values.
|
|
34808
|
-
*/
|
|
34809
|
-
export declare function resumeCommand(runner: string | undefined, sessionId: string): string | null;
|
package/dist/server/server.js
CHANGED
|
@@ -28,6 +28,7 @@ import { githubRefsQuerySchema } from '../contract/index.js';
|
|
|
28
28
|
import { commitQuerySchema } from '../contract/index.js';
|
|
29
29
|
import { imageMimeType } from '../contract/index.js';
|
|
30
30
|
import { providerForActiveRun } from '../contract/index.js';
|
|
31
|
+
import { RUNNER_COCKPIT_FACTS, cockpitRunnersWhere } from '../contract/index.js';
|
|
31
32
|
import { defined } from '../core/defined.js';
|
|
32
33
|
import { isAbsoluteHostPath } from '../core/host-path.js';
|
|
33
34
|
import { resolveArchiveOnMerge, resolveGlobalArchiveOnMerge } from '../archive-on-merge-setting.js';
|
|
@@ -126,9 +127,8 @@ import { defaultWorkspaceConfig, loadWorkspaceConfig, mergeWriteWorkspaceConfig,
|
|
|
126
127
|
import { CONTROL_CHARS_RE, DEFAULT_AGENT_ACCOUNT_ID, defaultAgentAccountStore, isAbsoluteConfigDir, loadAgentAccounts, mergeWriteAgentAccounts, } from '../workspace/agent-accounts.js';
|
|
127
128
|
import { defaultAgentProfile, listAgentProfiles, namedAccountUnavailable, ompProfileDirError, profileDirState, resolveStoredProfile, sameProfileDir, } from '../workspace/agent-profiles.js';
|
|
128
129
|
import { PROFILE_CAPABLE_PROVIDERS, profileAgentDir, profileEnv, selectsByProfileName, supportsProfiles } from '../core/agent-profiles.js';
|
|
129
|
-
import {
|
|
130
|
-
import {
|
|
131
|
-
import { resolveOmpExecutable } from '../core/omp-model-catalog.js';
|
|
130
|
+
import { shellQuote, withEnvPrefix } from '../core/shell-env.js';
|
|
131
|
+
import { resumeCommand } from '../core/runner-cli.js';
|
|
132
132
|
import { allocateProjectSlug, normalizeProjectTags, probeProjectStatus, toProjectListEntry, registerProject, removeProject, shouldRegisterProject, } from '../workspace/projects.js';
|
|
133
133
|
import { mergeWriteWorkspaceUiState, readWorkspaceUiState } from '../workspace/ui-state.js';
|
|
134
134
|
import { checkoutRepo } from './checkout.js';
|
|
@@ -784,35 +784,39 @@ export function createApp(deps) {
|
|
|
784
784
|
// app in tests does not, so tests never spawn the probes here): the cache
|
|
785
785
|
// fills while the browser is still downloading the bundle, so its first
|
|
786
786
|
// `GET /api/health` reads a warm value instead of the cold ~1 s compute.
|
|
787
|
+
const pushedCatalogRunners = cockpitRunnersWhere(facts => facts.modelCatalogDelivery === 'pushed');
|
|
787
788
|
if (deps.socketHub) {
|
|
788
789
|
void refreshHealth();
|
|
789
|
-
|
|
790
|
+
for (const runner of pushedCatalogRunners)
|
|
791
|
+
void modelCatalog.get(runner);
|
|
790
792
|
}
|
|
791
793
|
// Authenticated SSE carries completion to remote cockpits too. Reuse the HTTP
|
|
792
794
|
// contract; no CLI output, paths or account data enter this payload.
|
|
793
795
|
modelCatalog.onRefresh((result) => {
|
|
794
|
-
if (result.runner === '
|
|
796
|
+
if (RUNNER_COCKPIT_FACTS[result.runner].modelCatalogDelivery === 'pushed')
|
|
795
797
|
workspaceEvents.emit('model-catalog', result);
|
|
796
798
|
});
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
previous
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
799
|
+
for (const runner of pushedCatalogRunners) {
|
|
800
|
+
deps.socketHub?.registerTopic(`models:${runner}`, {
|
|
801
|
+
snapshot: async () => modelCatalog.getCached(runner),
|
|
802
|
+
start: (publish) => {
|
|
803
|
+
let previous = '';
|
|
804
|
+
const off = modelCatalog.onRefresh((result) => {
|
|
805
|
+
if (result.runner !== runner)
|
|
806
|
+
return;
|
|
807
|
+
const body = JSON.stringify(result);
|
|
808
|
+
if (body !== previous) {
|
|
809
|
+
previous = body;
|
|
810
|
+
publish(result);
|
|
811
|
+
}
|
|
812
|
+
});
|
|
813
|
+
// Only active pickers keep discovery warm. Last unsubscribe stops all work.
|
|
814
|
+
const timer = setInterval(() => { void modelCatalog.get(runner); }, 5 * 60_000);
|
|
815
|
+
timer.unref?.();
|
|
816
|
+
return () => { clearInterval(timer); off(); };
|
|
817
|
+
},
|
|
818
|
+
});
|
|
819
|
+
}
|
|
816
820
|
/**
|
|
817
821
|
* Warm the whole of Squawk's agent knowledge — the three discovered defaults AND every extra
|
|
818
822
|
* account — so no reader ever pays the first shell-out.
|
|
@@ -858,9 +862,10 @@ export function createApp(deps) {
|
|
|
858
862
|
// validates, including Claude stream-json discovery (#89).
|
|
859
863
|
.get('/models', queryZodValidator(modelDiscoveryQuerySchema, { message: `runner must be ${MODEL_DISCOVERY_RUNNERS.slice(0, -1).join(', ')}, or ${MODEL_DISCOVERY_RUNNERS.at(-1)}` }), async (c) => {
|
|
860
864
|
const query = { data: c.req.valid('query') };
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
865
|
+
const { runner } = query.data;
|
|
866
|
+
return c.json(RUNNER_COCKPIT_FACTS[runner].modelCatalogDelivery === 'pushed'
|
|
867
|
+
? modelCatalog.getCached(runner)
|
|
868
|
+
: await modelCatalog.get(runner));
|
|
864
869
|
});
|
|
865
870
|
/**
|
|
866
871
|
* Resolve `profileId` (absent = the discovered default) into a concrete account for `provider`.
|
|
@@ -2538,8 +2543,7 @@ export function createApp(deps) {
|
|
|
2538
2543
|
const sessionStep = [...run.steps].reverse().find(step => step.sessionId);
|
|
2539
2544
|
const sessionId = sessionStep?.sessionId;
|
|
2540
2545
|
const backend = sessionStep?.backend ?? run.runner ?? 'claude';
|
|
2541
|
-
|
|
2542
|
-
const command = (backend === 'cursor' || backend === 'omp') && sessionId ? resumeCommand(backend, sessionId) : null;
|
|
2546
|
+
const command = sessionId ? resumeCommand(backend, sessionId) : null;
|
|
2543
2547
|
return { ...run, ...(usage ? { usage } : {}), ...(command ? { cliResumeCommand: command } : {}),
|
|
2544
2548
|
...(finishBlocked !== undefined ? { finishBlocked } : {}) };
|
|
2545
2549
|
};
|
|
@@ -4497,43 +4501,4 @@ function resolveWebDir() {
|
|
|
4497
4501
|
// here = <pkg>/dist/server (built) or <pkg>/src/server (tsx dev).
|
|
4498
4502
|
return join(here, '..', '..', 'web');
|
|
4499
4503
|
}
|
|
4500
|
-
/**
|
|
4501
|
-
* The session id shape every backend actually mints: UUIDs (claude/codex) and
|
|
4502
|
-
* the CLIs' own slug-ish ids. No character here is special to bash, AppleScript
|
|
4503
|
-
* OR cmd.exe, and a leading `-` is refused so the id can never be read as an
|
|
4504
|
-
* option by the CLI it is passed to (same dash-guard as `isSafeGitRef`, #431).
|
|
4505
|
-
* Bounded, like every other input that reaches a spawned process.
|
|
4506
|
-
*/
|
|
4507
|
-
const SAFE_SESSION_ID = /^[A-Za-z0-9._][A-Za-z0-9._-]{0,199}$/;
|
|
4508
|
-
/** True for session ids safe to splice into the take-over command (see above). */
|
|
4509
|
-
export function isSafeSessionId(sessionId) {
|
|
4510
|
-
return SAFE_SESSION_ID.test(sessionId);
|
|
4511
|
-
}
|
|
4512
|
-
/**
|
|
4513
|
-
* Build native session takeover commands. Legacy/undefined backend defaults to Claude. Refuse
|
|
4514
|
-
* unrecognized session-id shapes rather than embedding unsafe or platform-misquoted values.
|
|
4515
|
-
*/
|
|
4516
|
-
export function resumeCommand(runner, sessionId) {
|
|
4517
|
-
if (!isSafeSessionId(sessionId))
|
|
4518
|
-
return null;
|
|
4519
|
-
switch (runner) {
|
|
4520
|
-
case 'codex':
|
|
4521
|
-
return `codex resume ${sessionId}`;
|
|
4522
|
-
case 'opencode':
|
|
4523
|
-
return `opencode --session ${sessionId}`;
|
|
4524
|
-
case 'cursor': {
|
|
4525
|
-
const executable = quoteExecutable(resolveCursorExecutable(), process.platform);
|
|
4526
|
-
return executable === null ? null : `${executable} --resume ${sessionId}`;
|
|
4527
|
-
}
|
|
4528
|
-
case 'pi':
|
|
4529
|
-
return `pi --session ${sessionId}`;
|
|
4530
|
-
case 'omp': {
|
|
4531
|
-
// CEZ_OMP_BIN may name a different install than `omp` on PATH; resume with the configured one.
|
|
4532
|
-
const executable = quoteExecutable(resolveOmpExecutable(), process.platform);
|
|
4533
|
-
return executable === null ? null : `${executable} --resume ${sessionId}`;
|
|
4534
|
-
}
|
|
4535
|
-
default:
|
|
4536
|
-
return `claude --resume ${sessionId}`;
|
|
4537
|
-
}
|
|
4538
|
-
}
|
|
4539
4504
|
//# sourceMappingURL=server.js.map
|