@hearsay-tools/squawk 0.18.0-pr3977.7544 → 0.18.0-pr3979.7547
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/agent-config/model-settings/shared.d.ts +1 -2
- package/dist/agent-config/model-settings/shared.js.map +1 -1
- package/dist/agent-config/models.d.ts +3 -4
- package/dist/agent-config/models.js +4 -5
- package/dist/agent-config/models.js.map +1 -1
- package/dist/automations/automation-cli.js +2 -2
- package/dist/automations/automation-cli.js.map +1 -1
- package/dist/automations/prompts.d.ts +1 -1
- package/dist/automations/prompts.js +5 -3
- package/dist/automations/prompts.js.map +1 -1
- package/dist/ci-wait/controller.d.ts +4 -4
- package/dist/config.d.ts +1 -7
- package/dist/config.js +4 -3
- package/dist/config.js.map +1 -1
- package/dist/core/agent-env.d.ts +1 -2
- package/dist/core/agent-env.js +2 -2
- package/dist/core/agent-env.js.map +1 -1
- package/dist/core/agent-runner-values.d.ts +68 -0
- package/dist/core/agent-runner-values.js +111 -0
- package/dist/core/agent-runner-values.js.map +1 -0
- package/dist/core/agent-runner.d.ts +4 -74
- package/dist/core/agent-runner.js +3 -119
- package/dist/core/agent-runner.js.map +1 -1
- package/dist/core/backend-detect.d.ts +1 -2
- package/dist/core/backend-detect.js.map +1 -1
- package/dist/core/host-model-catalog.d.ts +1 -2
- package/dist/core/host-model-catalog.js +4 -6
- package/dist/core/host-model-catalog.js.map +1 -1
- package/dist/core/host-skill-catalog.d.ts +1 -2
- package/dist/core/host-skill-catalog.js +2 -3
- package/dist/core/host-skill-catalog.js.map +1 -1
- package/dist/core/model-identity.d.ts +4 -9
- package/dist/core/model-identity.js +6 -1
- package/dist/core/model-identity.js.map +1 -1
- package/dist/core/model-presets.d.ts +1 -2
- package/dist/core/model-presets.js.map +1 -1
- package/dist/core/model-probe-spawn.d.ts +1 -2
- package/dist/core/model-probe-spawn.js.map +1 -1
- package/dist/core/model-probe-teardown.js +1 -1
- package/dist/core/model-probe-teardown.js.map +1 -1
- package/dist/core/provider-auth.d.ts +3 -2
- package/dist/core/provider-auth.js +0 -2
- package/dist/core/provider-auth.js.map +1 -1
- package/dist/core/runner-cli.d.ts +2 -3
- package/dist/core/runner-cli.js.map +1 -1
- package/dist/core/runner-config-files.d.ts +1 -2
- package/dist/core/runner-config-files.js +6 -0
- package/dist/core/runner-config-files.js.map +1 -1
- package/dist/core/runner-definition.d.ts +2 -2
- package/dist/core/runner-facts.d.ts +8 -6
- package/dist/core/runner-facts.js +31 -5
- package/dist/core/runner-facts.js.map +1 -1
- package/dist/core/runner-fields.js +4 -1
- package/dist/core/runner-fields.js.map +1 -1
- package/dist/core/runner-id-schema.d.ts +8 -0
- package/dist/core/runner-id-schema.js +16 -0
- package/dist/core/runner-id-schema.js.map +1 -0
- package/dist/core/runner-ids.d.ts +9 -0
- package/dist/core/runner-ids.js +10 -0
- package/dist/core/runner-ids.js.map +1 -0
- package/dist/core/runner-model-catalog.d.ts +3 -4
- package/dist/core/runner-model-catalog.js.map +1 -1
- package/dist/core/runner-model-settings.d.ts +1 -2
- package/dist/core/runner-model-settings.js +1 -0
- package/dist/core/runner-model-settings.js.map +1 -1
- package/dist/core/runner-registry.d.ts +16 -19
- package/dist/core/runner-registry.js +20 -19
- package/dist/core/runner-registry.js.map +1 -1
- package/dist/core/runner-runtime.js +1 -1
- package/dist/core/runner-runtime.js.map +1 -1
- package/dist/core/runner-skill-catalog.d.ts +3 -4
- package/dist/core/runner-skill-catalog.js.map +1 -1
- package/dist/core/runner-skill-reference.d.ts +1 -2
- package/dist/core/runner-skill-reference.js.map +1 -1
- package/dist/core/runner-tool-grants.d.ts +1 -1
- package/dist/core/runner-tool-grants.js +1 -1
- package/dist/core/runner-tool-grants.js.map +1 -1
- package/dist/core/skill-probe.d.ts +2 -3
- package/dist/core/skill-probe.js.map +1 -1
- package/dist/delegation/cli.js +4 -5
- package/dist/delegation/cli.js.map +1 -1
- package/dist/delegation/execution-identity.d.ts +8 -44
- package/dist/delegation/execution-identity.js +2 -2
- package/dist/delegation/execution-identity.js.map +1 -1
- package/dist/delegation/execution-settings.d.ts +1 -2
- package/dist/delegation/execution-settings.js.map +1 -1
- package/dist/delegation/provision.js +2 -2
- package/dist/delegation/provision.js.map +1 -1
- package/dist/delegation/routes.d.ts +20 -20
- package/dist/delegation/service.js.map +1 -1
- package/dist/delegation/transport.d.ts +11 -11
- package/dist/discovery/choices.d.ts +1 -2
- package/dist/discovery/choices.js.map +1 -1
- package/dist/discovery/cli.js +2 -3
- package/dist/discovery/cli.js.map +1 -1
- package/dist/planner.js.map +1 -1
- package/dist/runners/built-in.js.map +1 -1
- package/dist/runners/claude/claude-cli-runner.js +1 -1
- package/dist/runners/claude/claude-cli-runner.js.map +1 -1
- package/dist/runners/claude/claude-model-catalog.js +1 -1
- package/dist/runners/claude/claude-model-catalog.js.map +1 -1
- package/dist/runners/claude/spec-support.js +1 -1
- package/dist/runners/claude/spec-support.js.map +1 -1
- package/dist/runners/codex/codex-app-server-runner.d.ts +1 -1
- package/dist/runners/codex/codex-app-server-runner.js +2 -3
- package/dist/runners/codex/codex-app-server-runner.js.map +1 -1
- package/dist/runners/codex/codex-app-server-transport.d.ts +1 -1
- package/dist/runners/codex/codex-app-server-transport.js +1 -1
- package/dist/runners/codex/codex-app-server-transport.js.map +1 -1
- package/dist/runners/codex/codex-native-frames.js +1 -1
- package/dist/runners/codex/codex-native-frames.js.map +1 -1
- package/dist/runners/codex/spec-support.js +1 -1
- package/dist/runners/codex/spec-support.js.map +1 -1
- package/dist/runners/ids.d.ts +8 -0
- package/dist/runners/ids.js +9 -0
- package/dist/runners/ids.js.map +1 -0
- package/dist/runners/omp/omp-runner.js +1 -1
- package/dist/runners/omp/omp-runner.js.map +1 -1
- package/dist/runners/omp/spec-support.js +1 -1
- package/dist/runners/omp/spec-support.js.map +1 -1
- package/dist/runners/opencode/opencode-server-runner.d.ts +1 -1
- package/dist/runners/opencode/opencode-server-runner.js +1 -1
- package/dist/runners/opencode/opencode-server-runner.js.map +1 -1
- package/dist/runners/opencode/spec-support.js +1 -1
- package/dist/runners/opencode/spec-support.js.map +1 -1
- package/dist/runners/pi/pi-rpc-turn.js +1 -1
- package/dist/runners/pi/pi-rpc-turn.js.map +1 -1
- package/dist/runners/pi/pi-runner.js +1 -1
- package/dist/runners/pi/pi-runner.js.map +1 -1
- package/dist/runners/pi/spec-support.js +1 -1
- package/dist/runners/pi/spec-support.js.map +1 -1
- package/dist/runs/auto-name.js.map +1 -1
- package/dist/runs/legacy-run-rows.d.ts +4 -2
- package/dist/runs/legacy-run-rows.js +10 -4
- package/dist/runs/legacy-run-rows.js.map +1 -1
- package/dist/runs/store.d.ts +1 -2
- package/dist/runs/store.js +1 -1
- package/dist/runs/store.js.map +1 -1
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/open-in-app.d.ts +1 -2
- package/dist/server/open-in-app.js.map +1 -1
- package/dist/server/open-in-targets.d.ts +4 -5
- package/dist/server/open-in-targets.js.map +1 -1
- package/dist/server/provider-action-gate.js +2 -2
- package/dist/server/provider-action-gate.js.map +1 -1
- package/dist/server/provider-auth-runtime.js +3 -2
- package/dist/server/provider-auth-runtime.js.map +1 -1
- package/dist/server/runner-skills.d.ts +1 -2
- package/dist/server/runner-skills.js.map +1 -1
- package/dist/server/server.d.ts +120 -120
- package/dist/server/server.js +11 -12
- package/dist/server/server.js.map +1 -1
- package/dist/server/start-run-options.d.ts +2 -3
- package/dist/server/start-run-options.js.map +1 -1
- package/dist/server/workspace-config-patch.js +2 -3
- package/dist/server/workspace-config-patch.js.map +1 -1
- package/dist/server/workspace-live-routes.d.ts +6 -6
- package/dist/server-install/steps.js +5 -6
- package/dist/server-install/steps.js.map +1 -1
- package/dist/task-cli/cli.js +2 -2
- package/dist/task-cli/cli.js.map +1 -1
- package/dist/workflows/continuation-admission.d.ts +12 -13
- package/dist/workflows/continuation-admission.js +3 -2
- package/dist/workflows/continuation-admission.js.map +1 -1
- package/dist/workflows/execution-account.d.ts +2 -3
- package/dist/workflows/execution-account.js +1 -1
- package/dist/workflows/execution-account.js.map +1 -1
- package/dist/workflows/run/compose.d.ts +2 -3
- package/dist/workflows/run/continuation-acceptance.d.ts +1 -2
- package/dist/workflows/run/continuation-acceptance.js.map +1 -1
- package/dist/workflows/run/continuation-session.d.ts +2 -2
- package/dist/workflows/run/continuation-session.js +1 -1
- package/dist/workflows/run/continuation-session.js.map +1 -1
- package/dist/workflows/run/input-delivery.d.ts +1 -1
- package/dist/workflows/run/input-delivery.js +1 -1
- package/dist/workflows/run/input-delivery.js.map +1 -1
- package/dist/workflows/run/launch-read-resolver.d.ts +16 -16
- package/dist/workflows/run/launch-read-resolver.js +3 -2
- package/dist/workflows/run/launch-read-resolver.js.map +1 -1
- package/dist/workflows/run/launch-settings.d.ts +2 -2
- package/dist/workflows/run/launch-settings.js.map +1 -1
- package/dist/workflows/run/native-skill-input-queue.js.map +1 -1
- package/dist/workflows/run/queued-revival.d.ts +1 -1
- package/dist/workflows/run/run-line.d.ts +3 -5
- package/dist/workflows/run/run-line.js +1 -1
- package/dist/workflows/run/run-line.js.map +1 -1
- package/dist/workflows/run/run-skills.d.ts +2 -2
- package/dist/workflows/run/run-skills.js.map +1 -1
- package/dist/workflows/run/run-start.d.ts +2 -2
- package/dist/workflows/run/session-events.d.ts +5 -5
- package/dist/workflows/run/session-events.js.map +1 -1
- package/dist/workflows/run/step-loop.d.ts +1 -2
- package/dist/workflows/run/step-loop.js.map +1 -1
- package/dist/workflows/run/step-session.d.ts +3 -3
- package/dist/workflows/run/step-session.js +2 -2
- package/dist/workflows/run/step-session.js.map +1 -1
- package/dist/workflows/run/subagent-waits.d.ts +2 -2
- package/dist/workflows/run/subagent-waits.js.map +1 -1
- package/dist/workflows/run/turn-markers.d.ts +2 -2
- package/dist/workflows/run/turn-markers.js.map +1 -1
- package/dist/workflows/run/types.d.ts +5 -5
- package/dist/workflows/run/usage-accounting.d.ts +1 -2
- package/dist/workflows/run/usage-accounting.js +2 -2
- package/dist/workflows/run/usage-accounting.js.map +1 -1
- package/dist/workflows/run/wake-admission.js +1 -1
- package/dist/workflows/run/wake-admission.js.map +1 -1
- package/dist/workflows/run-scheduling.d.ts +2 -3
- package/dist/workflows/run-scheduling.js +3 -3
- package/dist/workflows/run-scheduling.js.map +1 -1
- package/dist/workflows/run.d.ts +2 -2
- package/dist/workflows/run.js.map +1 -1
- package/dist/workflows/types.d.ts +3 -3
- package/dist/workflows/types.js +2 -2
- package/dist/workflows/types.js.map +1 -1
- package/dist/workspace/agent-accounts.d.ts +3 -9
- package/dist/workspace/agent-accounts.js +2 -2
- package/dist/workspace/agent-accounts.js.map +1 -1
- package/dist/workspace/config.d.ts +2 -8
- package/dist/workspace/config.js +6 -11
- package/dist/workspace/config.js.map +1 -1
- package/package.json +4 -4
- package/scripts/parity-rows.ts +3 -3
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/** The rejection of an agent-input acknowledgement that the session's own `end()` cut off
|
|
2
|
+
* (hearsay-tools/squawk#3508). Squawk keeps such input owed as a closed-session delivery
|
|
3
|
+
* failure. A runner raises it only for the abort its `end()` fired: a provider error that
|
|
4
|
+
* arrived first, even one whose body the close cut off, keeps its own error. */
|
|
5
|
+
export class SessionEndedBeforeAcknowledgement extends Error {
|
|
6
|
+
constructor() {
|
|
7
|
+
super('the session ended before the input was acknowledged');
|
|
8
|
+
this.name = 'SessionEndedBeforeAcknowledgement';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
/** The abort an `AbortController` fires rejects a fetch or a read with this name. */
|
|
12
|
+
export function isAbortError(error) {
|
|
13
|
+
return typeof error === 'object' && error !== null && error.name === 'AbortError';
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Every `AgentRunSpec` field, as a runtime list. Typed as a full `Record` over
|
|
17
|
+
* `keyof AgentRunSpec`, so the interface gaining or losing a field is a compile
|
|
18
|
+
* error here — and, through `AgentRunSpecSupport`, in every runner (#284).
|
|
19
|
+
*/
|
|
20
|
+
const AGENT_RUN_SPEC_FIELD_SET = {
|
|
21
|
+
timings: true,
|
|
22
|
+
scope: true,
|
|
23
|
+
systemPrompt: true,
|
|
24
|
+
squawkTools: true,
|
|
25
|
+
userPrompt: true,
|
|
26
|
+
skill: true,
|
|
27
|
+
resumeFallbackSkill: true,
|
|
28
|
+
images: true,
|
|
29
|
+
cwd: true,
|
|
30
|
+
toolGrant: true,
|
|
31
|
+
restrictCrossSessionMessaging: true,
|
|
32
|
+
minimal: true,
|
|
33
|
+
additionalDirectories: true,
|
|
34
|
+
env: true,
|
|
35
|
+
model: true,
|
|
36
|
+
effort: true,
|
|
37
|
+
timeoutMs: true,
|
|
38
|
+
sessionId: true,
|
|
39
|
+
resume: true,
|
|
40
|
+
resumeFallbackSystemPrompt: true,
|
|
41
|
+
};
|
|
42
|
+
export const AGENT_RUN_SPEC_FIELDS = Object.keys(AGENT_RUN_SPEC_FIELD_SET);
|
|
43
|
+
/** Every `ToolGrant` kind, as a runtime list; a `Record`, so a new kind is a compile error here. */
|
|
44
|
+
const TOOL_GRANT_KIND_SET = {
|
|
45
|
+
unset: true,
|
|
46
|
+
'step-default': true,
|
|
47
|
+
inherited: true,
|
|
48
|
+
explicit: true,
|
|
49
|
+
};
|
|
50
|
+
export const TOOL_GRANT_KINDS = Object.keys(TOOL_GRANT_KIND_SET);
|
|
51
|
+
/** The `default` of a runner's switch over `ToolGrant['kind']`: only a kind it does not map reaches here. */
|
|
52
|
+
export function unknownToolGrant(grant) {
|
|
53
|
+
throw new Error(`Unknown tool grant kind: ${String(grant.kind)}`);
|
|
54
|
+
}
|
|
55
|
+
/** The spec fields every runner honors the same way: Squawk-side settings that never reach a
|
|
56
|
+
* native wire. Each runner spreads these into its `specSupport`. */
|
|
57
|
+
export const SQUAWK_SIDE_SPEC_SUPPORT = {
|
|
58
|
+
timings: { honored: true, via: 'internal runner deadlines; omitted fields retain production defaults' },
|
|
59
|
+
scope: { honored: true, via: 'every session process starts inside the worker scope (ADR 0032)' },
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Backends without a dedicated system-prompt channel (codex app-server,
|
|
63
|
+
* opencode serve) deliver `spec.systemPrompt` as a leading block of the
|
|
64
|
+
* opening user message — the documented per-backend mapping (spec §protocol
|
|
65
|
+
* v2: claude = `--append-system-prompt`, codex/opencode = prepended here).
|
|
66
|
+
*/
|
|
67
|
+
export function prependSystemPrompt(systemPrompt, userPrompt) {
|
|
68
|
+
return systemPrompt ? `${systemPrompt}\n\n---\n\n${userPrompt}` : userPrompt;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* True for the `128 + signal` exit codes an agent CLI reports when it handles
|
|
72
|
+
* a stop signal itself instead of dying from it (SIGINT/SIGKILL/SIGTERM).
|
|
73
|
+
*
|
|
74
|
+
* Every runner arms a SIGTERM→SIGKILL watchdog on `end()` and signals on
|
|
75
|
+
* `interrupt()` (#703): the CLIs install their own handlers, so a session the
|
|
76
|
+
* runner tore down on purpose comes back as a NON-ZERO exit. Paired with a
|
|
77
|
+
* "we sent the signal" flag, this predicate keeps that teardown out of the
|
|
78
|
+
* error path — an exit Squawk caused is never an agent failure.
|
|
79
|
+
*/
|
|
80
|
+
export function isSignalTerminationExit(exitCode) {
|
|
81
|
+
return exitCode === 130 || exitCode === 137 || exitCode === 143;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Returns a predicate that answers "has this child actually terminated?".
|
|
85
|
+
*
|
|
86
|
+
* `ChildProcess.killed` answers a different question — it flips as soon as a
|
|
87
|
+
* signal is *delivered*, whether or not the child dies from it. Every agent CLI
|
|
88
|
+
* installs its own SIGTERM handler, so gating a SIGTERM→SIGKILL watchdog on
|
|
89
|
+
* `!child.killed` disables the escalation for exactly the child it exists for:
|
|
90
|
+
* `killed` is true, `exitCode` stays null, and the process outlives the whole
|
|
91
|
+
* grace window (#844, same defect fixed for the discovery probe in #841).
|
|
92
|
+
*
|
|
93
|
+
* Seeded from `exitCode`/`signalCode` so a child that died before the watchdog
|
|
94
|
+
* was armed is recognized without waiting for an event that already fired.
|
|
95
|
+
*/
|
|
96
|
+
export function trackChildExit(child) {
|
|
97
|
+
let exited = child.exitCode != null || child.signalCode != null;
|
|
98
|
+
child.once('exit', () => {
|
|
99
|
+
exited = true;
|
|
100
|
+
});
|
|
101
|
+
return () => exited;
|
|
102
|
+
}
|
|
103
|
+
export const BOUNDARY_INPUT_DELIVERY = {
|
|
104
|
+
mode: 'boundary', consumption: 'unobservable', acknowledgement: 'response', humanInputAtTurnEnd: 'always-held', via: 'next idle turn',
|
|
105
|
+
};
|
|
106
|
+
/** Absent means the pre-#505 behavior every runner had. No shipped runner declares `boundary`;
|
|
107
|
+
* it remains the delivery of a runner that declares none. */
|
|
108
|
+
export function inputDeliveryOf(runner) {
|
|
109
|
+
return runner.inputDelivery ?? BOUNDARY_INPUT_DELIVERY;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=agent-runner-values.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-runner-values.js","sourceRoot":"","sources":["../../src/core/agent-runner-values.ts"],"names":[],"mappings":"AAgBA;;;iFAGiF;AACjF,MAAM,OAAO,iCAAkC,SAAQ,KAAK;IAC1D;QACE,KAAK,CAAC,qDAAqD,CAAC,CAAC;QAC7D,IAAI,CAAC,IAAI,GAAG,mCAAmC,CAAC;IAClD,CAAC;CACF;AAED,qFAAqF;AACrF,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAK,KAA4B,CAAC,IAAI,KAAK,YAAY,CAAC;AAC5G,CAAC;AAED;;;;GAIG;AACH,MAAM,wBAAwB,GAA+C;IAC3E,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,IAAI;IACX,YAAY,EAAE,IAAI;IAClB,WAAW,EAAE,IAAI;IACjB,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;IACX,mBAAmB,E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M,UAAU,uBAAuB,CAAC,QAAuB;IAC7D,OAAO,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC;AAClE,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,cAAc,CAAC,KAAqB;IAClD,IAAI,MAAM,GAAG,KAAK,CAAC,QAAQ,IAAI,IAAI,IAAI,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC;IAChE,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;QACtB,MAAM,GAAG,IAAI,CAAC;IAChB,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC;AACtB,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAkB;IACpD,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,mBAAmB,EAAE,aAAa,EAAE,GAAG,EAAE,gBAAgB;CACtI,CAAC;AACF;8DAC8D;AAC9D,MAAM,UAAU,eAAe,CAAC,MAA0C;IACxE,OAAO,MAAM,CAAC,aAAa,IAAI,uBAAuB,CAAC;AACzD,CAAC"}
|
|
@@ -1,31 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Backend-neutral logical sessions for task execution, follow-ups, waiting, interrupt and
|
|
3
3
|
* resume. Adapters own native process lifetimes and emit normalized events behind this seam.
|
|
4
|
+
* A runner id is an open string (spec 2026-11-18-runner-definitions, decision 5): the registry
|
|
5
|
+
* (`core/runner-registry.ts`) resolves it, and `runners/built-in.ts` is the one roster.
|
|
4
6
|
*/
|
|
5
7
|
import type { UiEvent } from './ui-events.ts';
|
|
6
8
|
import type { RunnerTimings } from './runner-runtime.ts';
|
|
7
9
|
import type { SpawnScope } from '../worker-scope/scope.ts';
|
|
8
10
|
import type { RunnerFacts } from './runner-facts.ts';
|
|
9
|
-
/**
|
|
10
|
-
* Canonical user-selectable runner tuple in display order. Derive runtime enumerations and
|
|
11
|
-
* schemas from this set; keep legacy backend ids separate for persisted records.
|
|
12
|
-
*/
|
|
13
|
-
export declare const RUNNER_IDS: readonly ['claude', 'codex', 'opencode', 'pi', 'omp'];
|
|
14
|
-
/** The user-selectable runners (what config/GUI expose). */
|
|
15
|
-
export type RunnerId = (typeof RUNNER_IDS)[number];
|
|
16
|
-
/** `claude-cli` is the legacy id kept so old run records still parse. */
|
|
17
|
-
export type AgentBackend = RunnerId | 'claude-cli';
|
|
18
|
-
/** Narrow an arbitrary string (a config value, a check name) to a runner id. */
|
|
19
|
-
/** The rejection of an agent-input acknowledgement that the session's own `end()` cut off
|
|
20
|
-
* (hearsay-tools/squawk#3508). Squawk keeps such input owed as a closed-session delivery
|
|
21
|
-
* failure. A runner raises it only for the abort its `end()` fired: a provider error that
|
|
22
|
-
* arrived first, even one whose body the close cut off, keeps its own error. */
|
|
23
|
-
export declare class SessionEndedBeforeAcknowledgement extends Error {
|
|
24
|
-
constructor();
|
|
25
|
-
}
|
|
26
|
-
/** The abort an `AbortController` fires rejects a fetch or a read with this name. */
|
|
27
|
-
export declare function isAbortError(error: unknown): boolean;
|
|
28
|
-
export declare function isRunnerId(value: string): value is RunnerId;
|
|
29
11
|
export interface AgentRunSpec {
|
|
30
12
|
/** Internal deadline overrides; never persisted or sent to the native wire. */
|
|
31
13
|
timings?: Partial<RunnerTimings> | undefined;
|
|
@@ -99,7 +81,6 @@ export interface AgentRunSpec {
|
|
|
99
81
|
resumeFallbackSystemPrompt?: string;
|
|
100
82
|
}
|
|
101
83
|
export type AgentRunSpecField = keyof AgentRunSpec;
|
|
102
|
-
export declare const AGENT_RUN_SPEC_FIELDS: readonly AgentRunSpecField[];
|
|
103
84
|
/** A tool list a runner receives, with the command prefixes `Bash` is limited to. */
|
|
104
85
|
type ToolList = {
|
|
105
86
|
readonly tools: readonly string[];
|
|
@@ -132,9 +113,6 @@ export type ToolGrant =
|
|
|
132
113
|
readonly kind: 'explicit';
|
|
133
114
|
} & ToolList);
|
|
134
115
|
export type ToolGrantKind = ToolGrant['kind'];
|
|
135
|
-
export declare const TOOL_GRANT_KINDS: readonly ToolGrantKind[];
|
|
136
|
-
/** The `default` of a runner's switch over `ToolGrant['kind']`: only a kind it does not map reaches here. */
|
|
137
|
-
export declare function unknownToolGrant(grant: never): never;
|
|
138
116
|
/**
|
|
139
117
|
* What one runner does with one `AgentRunSpec` field. `honored` means setting
|
|
140
118
|
* the field changes what reaches the backend, and `via` names the flag, request
|
|
@@ -157,36 +135,6 @@ export type SpecFieldSupport = {
|
|
|
157
135
|
* what the backend actually receives, not what the adapter meant to send.
|
|
158
136
|
*/
|
|
159
137
|
export type AgentRunSpecSupport = Readonly<Record<AgentRunSpecField, SpecFieldSupport>>;
|
|
160
|
-
/** The spec fields every runner honors the same way: Squawk-side settings that never reach a
|
|
161
|
-
* native wire. Each runner spreads these into its `specSupport`. */
|
|
162
|
-
export declare const SQUAWK_SIDE_SPEC_SUPPORT: {
|
|
163
|
-
readonly timings: {
|
|
164
|
-
readonly honored: true;
|
|
165
|
-
readonly via: 'internal runner deadlines; omitted fields retain production defaults';
|
|
166
|
-
};
|
|
167
|
-
readonly scope: {
|
|
168
|
-
readonly honored: true;
|
|
169
|
-
readonly via: 'every session process starts inside the worker scope (ADR 0032)';
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
|
-
/**
|
|
173
|
-
* Backends without a dedicated system-prompt channel (codex app-server,
|
|
174
|
-
* opencode serve) deliver `spec.systemPrompt` as a leading block of the
|
|
175
|
-
* opening user message — the documented per-backend mapping (spec §protocol
|
|
176
|
-
* v2: claude = `--append-system-prompt`, codex/opencode = prepended here).
|
|
177
|
-
*/
|
|
178
|
-
export declare function prependSystemPrompt(systemPrompt: string | undefined, userPrompt: string): string;
|
|
179
|
-
/**
|
|
180
|
-
* True for the `128 + signal` exit codes an agent CLI reports when it handles
|
|
181
|
-
* a stop signal itself instead of dying from it (SIGINT/SIGKILL/SIGTERM).
|
|
182
|
-
*
|
|
183
|
-
* Every runner arms a SIGTERM→SIGKILL watchdog on `end()` and signals on
|
|
184
|
-
* `interrupt()` (#703): the CLIs install their own handlers, so a session the
|
|
185
|
-
* runner tore down on purpose comes back as a NON-ZERO exit. Paired with a
|
|
186
|
-
* "we sent the signal" flag, this predicate keeps that teardown out of the
|
|
187
|
-
* error path — an exit Squawk caused is never an agent failure.
|
|
188
|
-
*/
|
|
189
|
-
export declare function isSignalTerminationExit(exitCode: number | null): boolean;
|
|
190
138
|
/** The slice of `ChildProcess` a termination tracker needs — keeps the helper
|
|
191
139
|
* usable from the transport layer and from test fakes alike. */
|
|
192
140
|
export interface TrackableChild {
|
|
@@ -194,20 +142,6 @@ export interface TrackableChild {
|
|
|
194
142
|
signalCode: NodeJS.Signals | null;
|
|
195
143
|
once(event: 'exit', listener: () => void): unknown;
|
|
196
144
|
}
|
|
197
|
-
/**
|
|
198
|
-
* Returns a predicate that answers "has this child actually terminated?".
|
|
199
|
-
*
|
|
200
|
-
* `ChildProcess.killed` answers a different question — it flips as soon as a
|
|
201
|
-
* signal is *delivered*, whether or not the child dies from it. Every agent CLI
|
|
202
|
-
* installs its own SIGTERM handler, so gating a SIGTERM→SIGKILL watchdog on
|
|
203
|
-
* `!child.killed` disables the escalation for exactly the child it exists for:
|
|
204
|
-
* `killed` is true, `exitCode` stays null, and the process outlives the whole
|
|
205
|
-
* grace window (#844, same defect fixed for the discovery probe in #841).
|
|
206
|
-
*
|
|
207
|
-
* Seeded from `exitCode`/`signalCode` so a child that died before the watchdog
|
|
208
|
-
* was armed is recognized without waiting for an event that already fired.
|
|
209
|
-
*/
|
|
210
|
-
export declare function trackChildExit(child: TrackableChild): () => boolean;
|
|
211
145
|
/** One content block of a user message — mirrors the Anthropic wire format
|
|
212
146
|
* so it can be written to the claude CLI's stdin verbatim. */
|
|
213
147
|
export interface SkillTrigger {
|
|
@@ -433,10 +367,6 @@ export type InputDelivery = InputDeliveryFacts & ({
|
|
|
433
367
|
readonly mode: 'boundary';
|
|
434
368
|
readonly humanInputAtTurnEnd: 'always-held';
|
|
435
369
|
});
|
|
436
|
-
export declare const BOUNDARY_INPUT_DELIVERY: InputDelivery;
|
|
437
|
-
/** Absent means the pre-#505 behavior every runner had. No shipped runner declares `boundary`;
|
|
438
|
-
* it remains the delivery of a runner that declares none. */
|
|
439
|
-
export declare function inputDeliveryOf(runner: Pick<AgentRunner, 'inputDelivery'>): InputDelivery;
|
|
440
370
|
/**
|
|
441
371
|
* How this runner delivers `spec.systemPrompt` across session/process boundaries (#790).
|
|
442
372
|
*
|
|
@@ -463,9 +393,9 @@ export type SystemPromptOnResume = 'resent' | 'in-thread';
|
|
|
463
393
|
/** Builds the runner for a backend id. The engine depends on this type only; the entry points
|
|
464
394
|
* pass `createRunner` from `runner-registry.ts`, which loads the registered runner's adapter, and
|
|
465
395
|
* a test passes a factory for the one runner it drives (hearsay-tools/cezarion#2939). */
|
|
466
|
-
export type RunnerFactory = (backend:
|
|
396
|
+
export type RunnerFactory = (backend: string | undefined) => Promise<AgentRunner>;
|
|
467
397
|
export interface AgentRunner {
|
|
468
|
-
readonly backend:
|
|
398
|
+
readonly backend: string;
|
|
469
399
|
/** Which `AgentRunSpec` fields this runner honors, and how — see `AgentRunSpecSupport`. */
|
|
470
400
|
readonly specSupport: AgentRunSpecSupport;
|
|
471
401
|
/** How this runner carries `spec.systemPrompt` onto a resumed session (#790). Required. */
|
|
@@ -1,124 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Backend-neutral logical sessions for task execution, follow-ups, waiting, interrupt and
|
|
3
3
|
* resume. Adapters own native process lifetimes and emit normalized events behind this seam.
|
|
4
|
+
* A runner id is an open string (spec 2026-11-18-runner-definitions, decision 5): the registry
|
|
5
|
+
* (`core/runner-registry.ts`) resolves it, and `runners/built-in.ts` is the one roster.
|
|
4
6
|
*/
|
|
5
|
-
|
|
6
|
-
* Canonical user-selectable runner tuple in display order. Derive runtime enumerations and
|
|
7
|
-
* schemas from this set; keep legacy backend ids separate for persisted records.
|
|
8
|
-
*/
|
|
9
|
-
export const RUNNER_IDS = ['claude', 'codex', 'opencode', 'pi', 'omp'];
|
|
10
|
-
/** Narrow an arbitrary string (a config value, a check name) to a runner id. */
|
|
11
|
-
/** The rejection of an agent-input acknowledgement that the session's own `end()` cut off
|
|
12
|
-
* (hearsay-tools/squawk#3508). Squawk keeps such input owed as a closed-session delivery
|
|
13
|
-
* failure. A runner raises it only for the abort its `end()` fired: a provider error that
|
|
14
|
-
* arrived first, even one whose body the close cut off, keeps its own error. */
|
|
15
|
-
export class SessionEndedBeforeAcknowledgement extends Error {
|
|
16
|
-
constructor() {
|
|
17
|
-
super('the session ended before the input was acknowledged');
|
|
18
|
-
this.name = 'SessionEndedBeforeAcknowledgement';
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
/** The abort an `AbortController` fires rejects a fetch or a read with this name. */
|
|
22
|
-
export function isAbortError(error) {
|
|
23
|
-
return typeof error === 'object' && error !== null && error.name === 'AbortError';
|
|
24
|
-
}
|
|
25
|
-
export function isRunnerId(value) {
|
|
26
|
-
return RUNNER_IDS.includes(value);
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Every `AgentRunSpec` field, as a runtime list. Typed as a full `Record` over
|
|
30
|
-
* `keyof AgentRunSpec`, so the interface gaining or losing a field is a compile
|
|
31
|
-
* error here — and, through `AgentRunSpecSupport`, in every runner (#284).
|
|
32
|
-
*/
|
|
33
|
-
const AGENT_RUN_SPEC_FIELD_SET = {
|
|
34
|
-
timings: true,
|
|
35
|
-
scope: true,
|
|
36
|
-
systemPrompt: true,
|
|
37
|
-
squawkTools: true,
|
|
38
|
-
userPrompt: true,
|
|
39
|
-
skill: true,
|
|
40
|
-
resumeFallbackSkill: true,
|
|
41
|
-
images: true,
|
|
42
|
-
cwd: true,
|
|
43
|
-
toolGrant: true,
|
|
44
|
-
restrictCrossSessionMessaging: true,
|
|
45
|
-
minimal: true,
|
|
46
|
-
additionalDirectories: true,
|
|
47
|
-
env: true,
|
|
48
|
-
model: true,
|
|
49
|
-
effort: true,
|
|
50
|
-
timeoutMs: true,
|
|
51
|
-
sessionId: true,
|
|
52
|
-
resume: true,
|
|
53
|
-
resumeFallbackSystemPrompt: true,
|
|
54
|
-
};
|
|
55
|
-
export const AGENT_RUN_SPEC_FIELDS = Object.keys(AGENT_RUN_SPEC_FIELD_SET);
|
|
56
|
-
/** Every `ToolGrant` kind, as a runtime list; a `Record`, so a new kind is a compile error here. */
|
|
57
|
-
const TOOL_GRANT_KIND_SET = {
|
|
58
|
-
unset: true,
|
|
59
|
-
'step-default': true,
|
|
60
|
-
inherited: true,
|
|
61
|
-
explicit: true,
|
|
62
|
-
};
|
|
63
|
-
export const TOOL_GRANT_KINDS = Object.keys(TOOL_GRANT_KIND_SET);
|
|
64
|
-
/** The `default` of a runner's switch over `ToolGrant['kind']`: only a kind it does not map reaches here. */
|
|
65
|
-
export function unknownToolGrant(grant) {
|
|
66
|
-
throw new Error(`Unknown tool grant kind: ${String(grant.kind)}`);
|
|
67
|
-
}
|
|
68
|
-
/** The spec fields every runner honors the same way: Squawk-side settings that never reach a
|
|
69
|
-
* native wire. Each runner spreads these into its `specSupport`. */
|
|
70
|
-
export const SQUAWK_SIDE_SPEC_SUPPORT = {
|
|
71
|
-
timings: { honored: true, via: 'internal runner deadlines; omitted fields retain production defaults' },
|
|
72
|
-
scope: { honored: true, via: 'every session process starts inside the worker scope (ADR 0032)' },
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* Backends without a dedicated system-prompt channel (codex app-server,
|
|
76
|
-
* opencode serve) deliver `spec.systemPrompt` as a leading block of the
|
|
77
|
-
* opening user message — the documented per-backend mapping (spec §protocol
|
|
78
|
-
* v2: claude = `--append-system-prompt`, codex/opencode = prepended here).
|
|
79
|
-
*/
|
|
80
|
-
export function prependSystemPrompt(systemPrompt, userPrompt) {
|
|
81
|
-
return systemPrompt ? `${systemPrompt}\n\n---\n\n${userPrompt}` : userPrompt;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* True for the `128 + signal` exit codes an agent CLI reports when it handles
|
|
85
|
-
* a stop signal itself instead of dying from it (SIGINT/SIGKILL/SIGTERM).
|
|
86
|
-
*
|
|
87
|
-
* Every runner arms a SIGTERM→SIGKILL watchdog on `end()` and signals on
|
|
88
|
-
* `interrupt()` (#703): the CLIs install their own handlers, so a session the
|
|
89
|
-
* runner tore down on purpose comes back as a NON-ZERO exit. Paired with a
|
|
90
|
-
* "we sent the signal" flag, this predicate keeps that teardown out of the
|
|
91
|
-
* error path — an exit Squawk caused is never an agent failure.
|
|
92
|
-
*/
|
|
93
|
-
export function isSignalTerminationExit(exitCode) {
|
|
94
|
-
return exitCode === 130 || exitCode === 137 || exitCode === 143;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Returns a predicate that answers "has this child actually terminated?".
|
|
98
|
-
*
|
|
99
|
-
* `ChildProcess.killed` answers a different question — it flips as soon as a
|
|
100
|
-
* signal is *delivered*, whether or not the child dies from it. Every agent CLI
|
|
101
|
-
* installs its own SIGTERM handler, so gating a SIGTERM→SIGKILL watchdog on
|
|
102
|
-
* `!child.killed` disables the escalation for exactly the child it exists for:
|
|
103
|
-
* `killed` is true, `exitCode` stays null, and the process outlives the whole
|
|
104
|
-
* grace window (#844, same defect fixed for the discovery probe in #841).
|
|
105
|
-
*
|
|
106
|
-
* Seeded from `exitCode`/`signalCode` so a child that died before the watchdog
|
|
107
|
-
* was armed is recognized without waiting for an event that already fired.
|
|
108
|
-
*/
|
|
109
|
-
export function trackChildExit(child) {
|
|
110
|
-
let exited = child.exitCode != null || child.signalCode != null;
|
|
111
|
-
child.once('exit', () => {
|
|
112
|
-
exited = true;
|
|
113
|
-
});
|
|
114
|
-
return () => exited;
|
|
115
|
-
}
|
|
116
|
-
export const BOUNDARY_INPUT_DELIVERY = {
|
|
117
|
-
mode: 'boundary', consumption: 'unobservable', acknowledgement: 'response', humanInputAtTurnEnd: 'always-held', via: 'next idle turn',
|
|
118
|
-
};
|
|
119
|
-
/** Absent means the pre-#505 behavior every runner had. No shipped runner declares `boundary`;
|
|
120
|
-
* it remains the delivery of a runner that declares none. */
|
|
121
|
-
export function inputDeliveryOf(runner) {
|
|
122
|
-
return runner.inputDelivery ?? BOUNDARY_INPUT_DELIVERY;
|
|
123
|
-
}
|
|
7
|
+
export {};
|
|
124
8
|
//# sourceMappingURL=agent-runner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-runner.js","sourceRoot":"","sources":["../../src/core/agent-runner.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"agent-runner.js","sourceRoot":"","sources":["../../src/core/agent-runner.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { RunnerId } from './agent-runner.ts';
|
|
2
1
|
import type { RunnerDetection } from './runner-definition.ts';
|
|
3
2
|
export interface BackendCheck {
|
|
4
3
|
/** A runner id, `gh` or `git`. */
|
|
@@ -19,6 +18,6 @@ export declare function detectEnvironment(): Promise<BackendCheck[]>;
|
|
|
19
18
|
* Probe one runner's CLI, as its definition describes it (`RunnerDetection`): an override key or
|
|
20
19
|
* the PATH name, a `--version` call, and the definition's hints.
|
|
21
20
|
*/
|
|
22
|
-
export declare function probeRunner(name:
|
|
21
|
+
export declare function probeRunner(name: string, detection: RunnerDetection): Promise<BackendCheck>;
|
|
23
22
|
/** The host's GitHub token: logged-in `gh` first, `GITHUB_TOKEN` fallback. */
|
|
24
23
|
export declare function readHostGithubToken(): Promise<string | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend-detect.js","sourceRoot":"","sources":["../../src/core/backend-detect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"backend-detect.js","sourceRoot":"","sources":["../../src/core/backend-detect.ts"],"names":[],"mappings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AAQ;IACrB,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,CAAC,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;QACpE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;IAClE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAChE,CAAC;AACH,CAAC;AAED,8EAA8E;AAC9E,MAAM,CAAC,KAAK,UAAU,mBAAmB;IACvC,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;QAC5E,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;QAC5B,IAAI,KAAK;YAAE,OAAO,KAAK,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,8BAA8B;IAChC,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC;AAClD,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { ModelDiscoveryRunner } from '../contract/index.js';
|
|
2
2
|
import type { RunnerModelCatalogAdapter } from './runner-model-catalog.ts';
|
|
3
3
|
/**
|
|
4
|
-
* Host model-discovery adapters,
|
|
5
|
-
* RUNNER_IDS guard aligned so a missing adapter fails validation. Each adapter loads its runner's
|
|
4
|
+
* Host model-discovery adapters, one per registered runner. Each adapter loads its runner's
|
|
6
5
|
* catalog through the registered definition's `loadModelCatalog` when it first discovers.
|
|
7
6
|
*/
|
|
8
7
|
export declare function hostModelCatalogAdapters(cwd: string): Record<ModelDiscoveryRunner, RunnerModelCatalogAdapter>;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { runnerDefinition } from './runner-registry.js';
|
|
1
|
+
import { knownRunnerIds, runnerDefinition } from './runner-registry.js';
|
|
3
2
|
/**
|
|
4
|
-
* Host model-discovery adapters,
|
|
5
|
-
* RUNNER_IDS guard aligned so a missing adapter fails validation. Each adapter loads its runner's
|
|
3
|
+
* Host model-discovery adapters, one per registered runner. Each adapter loads its runner's
|
|
6
4
|
* catalog through the registered definition's `loadModelCatalog` when it first discovers.
|
|
7
5
|
*/
|
|
8
6
|
export function hostModelCatalogAdapters(cwd) {
|
|
9
|
-
return Object.fromEntries(
|
|
10
|
-
discover: async () => (await runnerDefinition(
|
|
7
|
+
return Object.fromEntries(knownRunnerIds().map(id => [id, {
|
|
8
|
+
discover: async () => (await runnerDefinition(id).loadModelCatalog())({ cwd }),
|
|
11
9
|
}]));
|
|
12
10
|
}
|
|
13
11
|
//# sourceMappingURL=host-model-catalog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-model-catalog.js","sourceRoot":"","sources":["../../src/core/host-model-catalog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"host-model-catalog.js","sourceRoot":"","sources":["../../src/core/host-model-catalog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxE;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,GAAW;IAClD,OAAO,MAAM,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;YACxD,QAAQ,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,gBAAgB,CAAC,EAAE,CAAC,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;SAC/E,CAAC,CAAC,CAA4D,CAAC;AAClE,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { type RunnerId } from './agent-runner.ts';
|
|
2
1
|
import type { RunnerSkillCatalogAdapter } from './runner-skill-catalog.ts';
|
|
3
2
|
import type { SkillDiscoveryOptions } from './skill-probe.ts';
|
|
4
3
|
/**
|
|
5
4
|
* Each caller supplies its folder and account home. Each adapter loads its runner's skill list
|
|
6
5
|
* through the registered definition's `loadSkillCatalog` when it first discovers.
|
|
7
6
|
*/
|
|
8
|
-
export declare function hostSkillCatalogAdapters(overrides?: Partial<Record<
|
|
7
|
+
export declare function hostSkillCatalogAdapters(overrides?: Partial<Record<string, SkillDiscoveryOptions['bin']>>): Record<string, RunnerSkillCatalogAdapter>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { runnerDefinition } from './runner-registry.js';
|
|
1
|
+
import { knownRunnerIds, runnerDefinition } from './runner-registry.js';
|
|
3
2
|
/**
|
|
4
3
|
* Each caller supplies its folder and account home. Each adapter loads its runner's skill list
|
|
5
4
|
* through the registered definition's `loadSkillCatalog` when it first discovers.
|
|
@@ -8,6 +7,6 @@ export function hostSkillCatalogAdapters(overrides = {}) {
|
|
|
8
7
|
const adapter = (runner) => ({
|
|
9
8
|
discover: async (query, signal) => (await runnerDefinition(runner).loadSkillCatalog())({ ...query, bin: overrides[runner], signal }),
|
|
10
9
|
});
|
|
11
|
-
return Object.fromEntries(
|
|
10
|
+
return Object.fromEntries(knownRunnerIds().map(id => [id, adapter(id)]));
|
|
12
11
|
}
|
|
13
12
|
//# sourceMappingURL=host-skill-catalog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-skill-catalog.js","sourceRoot":"","sources":["../../src/core/host-skill-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"host-skill-catalog.js","sourceRoot":"","sources":["../../src/core/host-skill-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAIxE;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,SAAS,GAA0D,EAAE;IAC5G,MAAM,OAAO,GAAG,CAAC,MAAc,EAA6B,EAAE,CAAC,CAAC;QAC9D,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,gBAAgB,CAAC,MAAM,CAAC,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;KACrI,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Canonical provider/model identity and conversion to backend wire forms. Keep backend-specific
|
|
3
|
-
* wire types behind the AgentRunner seam.
|
|
4
|
-
*/
|
|
5
|
-
import type { AgentBackend } from './agent-runner.ts';
|
|
6
1
|
/**
|
|
7
2
|
* A backend-agnostic model identity. Serialized as `provider/model` (see
|
|
8
3
|
* {@link formatModelIdentity}). Treated as an identifier, never display text.
|
|
@@ -56,7 +51,7 @@ export interface BackendModelMap {
|
|
|
56
51
|
* and a lookup resolves it through the registry's legacy map first. An id that no runner
|
|
57
52
|
* registered has no map.
|
|
58
53
|
*/
|
|
59
|
-
export declare function backendModelMap(backend:
|
|
54
|
+
export declare function backendModelMap(backend: string): BackendModelMap | undefined;
|
|
60
55
|
/** Serialize a canonical identity to its `provider/model` string form. */
|
|
61
56
|
export declare function formatModelIdentity(id: ModelIdentity): string;
|
|
62
57
|
/**
|
|
@@ -81,7 +76,7 @@ export declare function parseModelIdentity(raw: string | undefined | null): Mode
|
|
|
81
76
|
* - a bare id on a backend with no default provider → throws
|
|
82
77
|
* {@link ModelIdentityError}.
|
|
83
78
|
*/
|
|
84
|
-
export declare function resolveModelIdentity(backend:
|
|
79
|
+
export declare function resolveModelIdentity(backend: string, raw: string | undefined, options?: {
|
|
85
80
|
configuredProvider?: string | undefined;
|
|
86
81
|
}): ModelIdentity | undefined;
|
|
87
82
|
/**
|
|
@@ -91,14 +86,14 @@ export declare function resolveModelIdentity(backend: AgentBackend, raw: string
|
|
|
91
86
|
* multi-provider backends (opencode) want the full `provider/model`, which
|
|
92
87
|
* they re-split into their own request shape.
|
|
93
88
|
*/
|
|
94
|
-
export declare function toBackendModel(backend:
|
|
89
|
+
export declare function toBackendModel(backend: string, id: ModelIdentity): string;
|
|
95
90
|
/**
|
|
96
91
|
* Normalise a raw model string for `backend` in one step: the backend-native
|
|
97
92
|
* string to hand the runner, plus the canonical identity to persist. Returns
|
|
98
93
|
* `undefined` for empty/auto. Throws {@link ModelIdentityError} on an
|
|
99
94
|
* unresolvable model — the single fail-loud gate the run wiring calls.
|
|
100
95
|
*/
|
|
101
|
-
export declare function normalizeModelForBackend(backend:
|
|
96
|
+
export declare function normalizeModelForBackend(backend: string, raw: string | undefined, options?: {
|
|
102
97
|
configuredProvider?: string | undefined;
|
|
103
98
|
}): {
|
|
104
99
|
backendModel: string;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Canonical provider/model identity and conversion to backend wire forms. Keep backend-specific
|
|
3
|
+
* wire types behind the AgentRunner seam.
|
|
4
|
+
*/
|
|
5
|
+
import { isRegisteredRunner, runnerDefinition } from './runner-registry.js';
|
|
6
|
+
import { LEGACY_RUNNER_IDS } from './runner-ids.js';
|
|
2
7
|
/**
|
|
3
8
|
* Thrown when a non-empty model string cannot be resolved to a canonical
|
|
4
9
|
* identity for the chosen backend (a bare id on a backend that spans
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-identity.js","sourceRoot":"","sources":["../../src/core/model-identity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"model-identity.js","sourceRoot":"","sources":["../../src/core/model-identity.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAapD;;;;;GAKG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAC3C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;CACF;AA+BD;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,MAAM,EAAE,GAAG,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC;IACrD,OAAO,kBAAkB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAChF,CAAC;AAED,MAAM,KAAK,GAAG,GAAG,CAAC;AAElB,0EAA0E;AAC1E,MAAM,UAAU,mBAAmB,CAAC,EAAiB;IACnD,OAAO,GAAG,EAAE,CAAC,QAAQ,GAAG,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC;AAC7C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAA8B;IAC/D,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IACtB,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IACrB,MAAM,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC7B,wEAAwE;IACxE,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,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|
1
|
-
import type { RunnerId } from './agent-runner.ts';
|
|
2
1
|
/** True when `model` is recognizably a preset of a runner OTHER than `runner` (and not also one
|
|
3
2
|
* of `runner`'s own presets), or when its provider prefix is one this runner is known not to
|
|
4
3
|
* serve. `''`/unknown/custom ids never conflict. */
|
|
5
|
-
export declare function modelConflictsWithRunner(model: string, runner:
|
|
4
|
+
export declare function modelConflictsWithRunner(model: string, runner: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-presets.js","sourceRoot":"","sources":["../../src/core/model-presets.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"model-presets.js","sourceRoot":"","sources":["../../src/core/model-presets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE/F;;;;;;GAMG;AACH,MAAM,eAAe,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAU,CAAC;AAEjF;;;GAGG;AACH,SAAS,YAAY,CAAC,MAAc;IAClC,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACxF,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,yBAAyB,CAAC,KAAa,EAAE,MAAc;IAC9D,MAAM,GAAG,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IACpC,2FAA2F;IAC3F,0DAA0D;IAC1D,IAAI,GAAG,EAAE,eAAe,KAAK,SAAS,IAAI,GAAG,CAAC,qBAAqB;QAAE,OAAO,KAAK,CAAC;IAClF,MAAM,QAAQ,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC3C,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,KAAK,GAAG,CAAC,eAAe;QAAE,OAAO,KAAK,CAAC;IACzE,OAAQ,eAAqC,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC5E,CAAC;AAED;;qDAEqD;AACrD,MAAM,UAAU,wBAAwB,CAAC,KAAa,EAAE,MAAc;IACpE,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,IAAI,YAAY,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACxD,yFAAyF;IACzF,0FAA0F;IAC1F,mFAAmF;IACnF,IAAI,yBAAyB,CAAC,KAAK,EAAE,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1D,OAAO,iBAAiB,EAAE,CAAC,IAAI,CAC7B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CACrE,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { type ChildProcessWithoutNullStreams } from 'node:child_process';
|
|
2
|
-
import type { AgentBackend } from './agent-runner.ts';
|
|
3
2
|
/** The spawn a model probe uses; tests pass their own. */
|
|
4
3
|
export type ModelProbeSpawnImpl = (bin: string, args: string[], options: {
|
|
5
4
|
cwd: string;
|
|
6
5
|
env: NodeJS.ProcessEnv;
|
|
7
6
|
}) => ChildProcessWithoutNullStreams;
|
|
8
7
|
/** Start a host model probe in `cwd` under the backend's own child environment. */
|
|
9
|
-
export declare function spawnModelProbe(backend:
|
|
8
|
+
export declare function spawnModelProbe(backend: string, bin: string, args: readonly string[], cwd: string, spawnImpl?: ModelProbeSpawnImpl): ChildProcessWithoutNullStreams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-probe-spawn.js","sourceRoot":"","sources":["../../src/core/model-probe-spawn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAuC,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"model-probe-spawn.js","sourceRoot":"","sources":["../../src/core/model-probe-spawn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAuC,MAAM,oBAAoB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAS/C,mFAAmF;AACnF,MAAM,UAAU,eAAe,CAC7B,OAAe,EACf,GAAW,EACX,IAAuB,EACvB,GAAW,EACX,SAAS,GAAwB,SAAS;IAE1C,OAAO,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { trackChildExit } from './agent-runner.js';
|
|
1
|
+
import { trackChildExit } from './agent-runner-values.js';
|
|
2
2
|
/** Send SIGTERM once, then SIGKILL after the grace period unless the process exits.
|
|
3
3
|
* Track real exit: ChildProcess.killed only records signal delivery. */
|
|
4
4
|
export function modelProbeTeardown(child, graceMs) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-probe-teardown.js","sourceRoot":"","sources":["../../src/core/model-probe-teardown.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"model-probe-teardown.js","sourceRoot":"","sources":["../../src/core/model-probe-teardown.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D;wEACwE;AACxE,MAAM,UAAU,kBAAkB,CAAC,KAAqC,EAAE,OAAe;IACvF,MAAM,SAAS,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACxC,IAAI,SAAS,GAAG,KAAK,CAAC;IACtB,OAAO,GAAG,EAAE;QACV,IAAI,SAAS,IAAI,SAAS,EAAE;YAAE,OAAO;QACrC,SAAS,GAAG,IAAI,CAAC;QACjB,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACtB,MAAM,UAAU,GAAG,UAAU,CAAC,GAAG,EAAE;YACjC,IAAI,SAAS,EAAE;gBAAE,OAAO;YACxB,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACxB,CAAC,EAAE,OAAO,CAAC,CAAC;QACZ,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC;IACvB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/** A provider of agent sessions: a runner id. The registered runners (`core/runner-registry.ts`)
|
|
2
|
+
* are the ones this process knows. */
|
|
3
|
+
export type ProviderId = string;
|
|
3
4
|
export type ProviderConnectionState = 'connected' | 'disconnected' | 'not-installed' | 'unknown';
|
|
4
5
|
export interface ProviderStatus {
|
|
5
6
|
provider: ProviderId;
|