@hearsay-tools/squawk 0.18.0-dev.6743 → 0.18.0-dev.6769
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 +80 -4
- package/dist/contract/own-lookup.d.ts +5 -0
- package/dist/contract/runner-facts.d.ts +91 -0
- package/dist/contract/runs.d.ts +31 -4
- 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/conversations.d.ts +8 -2
- package/dist/delegation/execution-identity.js +2 -1
- package/dist/delegation/execution-identity.js.map +1 -1
- package/dist/delegation/routes.d.ts +16 -16
- package/dist/runs/legacy-run-rows.d.ts +8 -0
- package/dist/runs/legacy-run-rows.js +19 -0
- package/dist/runs/legacy-run-rows.js.map +1 -1
- package/dist/runs/run-exits.d.ts +1366 -51
- package/dist/runs/run-exits.js +18 -7
- package/dist/runs/run-exits.js.map +1 -1
- package/dist/runs/store.d.ts +11 -2
- package/dist/runs/store.js +4 -4
- package/dist/runs/store.js.map +1 -1
- package/dist/serve-boot.js +1 -0
- package/dist/serve-boot.js.map +1 -1
- package/dist/server/checkout.d.ts +1 -1
- 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 +300 -253
- package/dist/server/server.js +33 -68
- package/dist/server/server.js.map +1 -1
- package/dist/workflows/continuation-admission.d.ts +4 -1
- package/dist/workflows/run/auto-resume.d.ts +9 -8
- package/dist/workflows/run/auto-resume.js +17 -27
- package/dist/workflows/run/auto-resume.js.map +1 -1
- package/dist/workflows/run/compose.d.ts +3 -0
- package/dist/workflows/run/compose.js +13 -12
- package/dist/workflows/run/compose.js.map +1 -1
- package/dist/workflows/run/continuation-session.js +2 -0
- package/dist/workflows/run/continuation-session.js.map +1 -1
- package/dist/workflows/run/family-reconciler.d.ts +4 -5
- package/dist/workflows/run/family-reconciler.js +9 -19
- package/dist/workflows/run/family-reconciler.js.map +1 -1
- package/dist/workflows/run/inbox-claims.d.ts +3 -4
- package/dist/workflows/run/inbox-claims.js +7 -17
- package/dist/workflows/run/inbox-claims.js.map +1 -1
- package/dist/workflows/run/input-delivery.d.ts +3 -1
- package/dist/workflows/run/input-delivery.js +14 -15
- package/dist/workflows/run/input-delivery.js.map +1 -1
- package/dist/workflows/run/input-timers.js +3 -2
- package/dist/workflows/run/input-timers.js.map +1 -1
- package/dist/workflows/run/launch-read-resolver.d.ts +4 -1
- package/dist/workflows/run/launch-read-resolver.js +24 -9
- package/dist/workflows/run/launch-read-resolver.js.map +1 -1
- package/dist/workflows/run/liveness-timers.d.ts +97 -0
- package/dist/workflows/run/liveness-timers.js +130 -0
- package/dist/workflows/run/liveness-timers.js.map +1 -0
- package/dist/workflows/run/run-memory.d.ts +11 -3
- package/dist/workflows/run/run-memory.js +34 -8
- package/dist/workflows/run/run-memory.js.map +1 -1
- package/dist/workflows/run/run-settlement.d.ts +9 -4
- package/dist/workflows/run/run-settlement.js +25 -12
- package/dist/workflows/run/run-settlement.js.map +1 -1
- package/dist/workflows/run/squawk-tools.js +2 -0
- package/dist/workflows/run/squawk-tools.js.map +1 -1
- package/dist/workflows/run/step-loop.d.ts +2 -2
- package/dist/workflows/run/step-loop.js +8 -3
- package/dist/workflows/run/step-loop.js.map +1 -1
- package/dist/workflows/run/subagent-waits.d.ts +3 -5
- package/dist/workflows/run/subagent-waits.js +13 -32
- package/dist/workflows/run/subagent-waits.js.map +1 -1
- package/dist/workflows/run/turn-nudges.d.ts +3 -1
- package/dist/workflows/run/turn-nudges.js +9 -6
- package/dist/workflows/run/turn-nudges.js.map +1 -1
- package/dist/workflows/run/turn-settler.d.ts +3 -1
- package/dist/workflows/run/turn-settler.js +7 -4
- package/dist/workflows/run/turn-settler.js.map +1 -1
- package/dist/workflows/run/wait-engine.d.ts +4 -1
- package/dist/workflows/run/wake-retries.d.ts +5 -7
- package/dist/workflows/run/wake-retries.js +17 -42
- package/dist/workflows/run/wake-retries.js.map +1 -1
- package/dist/workflows/run/worker-executions.js +2 -0
- package/dist/workflows/run/worker-executions.js.map +1 -1
- package/dist/workflows/run/workflow-position.d.ts +1 -0
- package/dist/workflows/run/workflow-position.js +1 -0
- package/dist/workflows/run/workflow-position.js.map +1 -1
- package/dist/workflows/run-scheduling.d.ts +4 -1
- package/dist/workflows/run-scheduling.js +10 -1
- package/dist/workflows/run-scheduling.js.map +1 -1
- package/dist/workflows/run-states.js +5 -2
- package/dist/workflows/run-states.js.map +1 -1
- package/dist/workflows/run.js +9 -2
- package/dist/workflows/run.js.map +1 -1
- package/package.json +4 -4
- package/scripts/mock-pi-rpc.mjs +9 -4
- package/web/dist/assets/{activity-motion-DMp6Uo_E.js → activity-motion-gOopdagH.js} +1 -1
- package/web/dist/assets/{activity-route-D04JxCzp.js → activity-route-D7bDtXpW.js} +1 -1
- package/web/dist/assets/agent-accounts-otlDWnij.js +18 -0
- package/web/dist/assets/attention-CVI366xV.js +1 -0
- package/web/dist/assets/{commit-diff-panel-Din879JP.js → commit-diff-panel-iQf0Rlcx.js} +1 -1
- package/web/dist/assets/{diff-Btt23N3M.js → diff-DQfcliZC.js} +2 -2
- package/web/dist/assets/{diff-view-CfWaBIJu.js → diff-view-BbM-71Cs.js} +1 -1
- package/web/dist/assets/{file-preview-DcznUbkx.js → file-preview-DgU8vo8k.js} +1 -1
- package/web/dist/assets/{git-toolbar-DUnmDIe8.js → git-toolbar-C8agvpYS.js} +1 -1
- package/web/dist/assets/{github-C6OOf2Jp.js → github-hXmxAXmA.js} +1 -1
- package/web/dist/assets/{global-activity-route-ko4iBoc3.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-gIoE5-9m.js → preview-pane-connected-D__9JwyU.js} +1 -1
- package/web/dist/assets/{project-router-oKsNlPN6.js → project-router-WQWd3UUn.js} +1 -1
- package/web/dist/assets/project-scope-context-bgdvGX9z.js +4 -0
- package/web/dist/assets/{prompt-template-menu-C3d8Xkvo.js → prompt-template-menu-BJfUg1uF.js} +1 -1
- package/web/dist/assets/queries-BJM44umy.js +1 -0
- package/web/dist/assets/{reference-chip-BliLpdSz.js → reference-chip-vraIzoEF.js} +1 -1
- package/web/dist/assets/{repo-git-DGrhzyWR.js → repo-git-B4qZq37d.js} +1 -1
- package/web/dist/assets/{report-reader-C2yXiPa9.js → report-reader-Djix-ICM.js} +1 -1
- package/web/dist/assets/{reports-mmONzYgk.js → reports-Do-dkavq.js} +1 -1
- package/web/dist/assets/run-header-Di9LaKQs.js +2 -0
- package/web/dist/assets/{skills-N0vkndca.js → skills-CPnIvFnR.js} +1 -1
- package/web/dist/assets/{tab-link-Buy1fRFO.js → tab-link-DiNYVlpl.js} +1 -1
- package/web/dist/assets/{task-changes-BhvqWHW7.js → task-changes-CW7NzgL5.js} +1 -1
- package/web/dist/assets/{task-commits-RGVmBirX.js → task-commits-Bkwi7o1B.js} +1 -1
- package/web/dist/assets/{task-files-B-W_PC8S.js → task-files-geRzIszC.js} +1 -1
- package/web/dist/assets/{task-github-item-csNEiMBa.js → task-github-item-UbCCP2Ud.js} +1 -1
- package/web/dist/assets/task-thread-CkiEiypn.js +9 -0
- package/web/dist/assets/{thread-state-DeDb0lsY.js → thread-state-CajkV5Ft.js} +1 -1
- package/web/dist/assets/{use-desktop-jIeTPw3K.js → use-desktop-Ct4lvA3b.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-CIysCyMM.js → use-hand-to-agent-state-Cnxq_2F6.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-Yn58_Fkn.js → useInfiniteQuery-s3lTx_YX.js} +1 -1
- package/web/dist/assets/useQuery-C0ee1rw5.js +1 -0
- package/web/dist/assets/workflows-Csr2hbks.js +7 -0
- package/web/dist/assets/{ws-DbXGHAke.js → ws-WW6DrfbT.js} +1 -1
- package/web/dist/index.html +12 -12
- package/web/dist/assets/agent-accounts-C48RdN3o.js +0 -18
- package/web/dist/assets/attention-BF8NA1XM.js +0 -1
- package/web/dist/assets/index-C3YyGC-J.js +0 -17
- package/web/dist/assets/project-scope-context-BBVJVcJp.js +0 -4
- package/web/dist/assets/queries-Be8VyHam.js +0 -1
- package/web/dist/assets/run-header-Cin11tct.js +0 -2
- package/web/dist/assets/task-thread-B23Uq5iQ.js +0 -9
- package/web/dist/assets/useQuery-C1xFF0nd.js +0 -1
- package/web/dist/assets/workflows-k0YtC-LB.js +0 -7
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
|