@hearsay-tools/squawk 0.18.0-dev.7536 → 0.18.0-dev.7546
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 +46 -46
- 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 +85 -85
- 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.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
package/dist/core/agent-env.d.ts
CHANGED
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
* per-run overrides. CEZ_ENV_PASSTHROUGH and CEZ_AGENT_ENV_FULL are host-controlled escape
|
|
4
4
|
* hatches.
|
|
5
5
|
*/
|
|
6
|
-
import type { AgentBackend } from './agent-runner.ts';
|
|
7
6
|
/** The provider credentials a backend that selects models as `provider/model` may need — it can
|
|
8
7
|
* be pointed at any of them, so none can be pruned without breaking a legitimate model id.
|
|
9
8
|
* Read by the `env` data of the OpenCode, pi and OMP definitions (`runners/<id>/env.ts`). */
|
|
10
9
|
export declare const MULTI_PROVIDER_PREFIXES: readonly string[];
|
|
11
10
|
export declare function looksSecret(name: string): boolean;
|
|
12
11
|
export interface BuildChildEnvOptions {
|
|
13
|
-
backend:
|
|
12
|
+
backend: string;
|
|
14
13
|
/** Per-run env (CEZ_HANDOFF_FILE etc.) — always applied, wins over host. */
|
|
15
14
|
extraEnv?: Record<string, string> | undefined;
|
|
16
15
|
/** Source env; defaults to `process.env`. */
|
package/dist/core/agent-env.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { productEnv } from './product-env.js';
|
|
7
7
|
import { SECRET_NAME_RE } from './secret-redaction.js';
|
|
8
|
-
import { runnerDefinition,
|
|
8
|
+
import { runnerDefinition, resolveRunnerId } from './runner-registry.js';
|
|
9
9
|
/**
|
|
10
10
|
* Env var names are matched case-INSENSITIVELY (#427 review). Windows spells
|
|
11
11
|
* the essentials `Path`, `SystemRoot`, `ComSpec`, `windir` — an exact-case
|
|
@@ -272,7 +272,7 @@ export function buildChildEnv(opts) {
|
|
|
272
272
|
// A legacy id (`claude-cli`) and an unknown value resolve to the default runner, as the
|
|
273
273
|
// `BACKEND_ALLOW_PREFIXES[backend] ?? BACKEND_ALLOW_PREFIXES.claude` lookup did.
|
|
274
274
|
return curateEnv(opts.source ?? process.env, opts.extraEnv ?? {}, {
|
|
275
|
-
backendPrefixes: runnerDefinition(
|
|
275
|
+
backendPrefixes: runnerDefinition(resolveRunnerId(opts.backend)).env.allowPrefixes,
|
|
276
276
|
gh: true,
|
|
277
277
|
secretCez: true,
|
|
278
278
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-env.js","sourceRoot":"","sources":["../../src/core/agent-env.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"agent-env.js","sourceRoot":"","sources":["../../src/core/agent-env.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEzE;;;;;;;GAOG;AACH,SAAS,QAAQ,CAAC,KAAwB;IACxC,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,6EAA6E;AAC7E,MAAM,gBAAgB,GAAwB,QAAQ,C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agent-runner.ts`, which holds only
|
|
3
|
+
* types): spec-field and tool-grant tables, the Squawk-side spec support, system-prompt prepend,
|
|
4
|
+
* signal-exit predicates and input-delivery defaults. The types they use stay in
|
|
5
|
+
* `core/agent-runner.ts`.
|
|
6
|
+
*/
|
|
7
|
+
import type { AgentRunSpecField, AgentRunner, InputDelivery, ToolGrantKind, TrackableChild } from './agent-runner.ts';
|
|
8
|
+
/** The rejection of an agent-input acknowledgement that the session's own `end()` cut off
|
|
9
|
+
* (hearsay-tools/squawk#3508). Squawk keeps such input owed as a closed-session delivery
|
|
10
|
+
* failure. A runner raises it only for the abort its `end()` fired: a provider error that
|
|
11
|
+
* arrived first, even one whose body the close cut off, keeps its own error. */
|
|
12
|
+
export declare class SessionEndedBeforeAcknowledgement extends Error {
|
|
13
|
+
constructor();
|
|
14
|
+
}
|
|
15
|
+
/** The abort an `AbortController` fires rejects a fetch or a read with this name. */
|
|
16
|
+
export declare function isAbortError(error: unknown): boolean;
|
|
17
|
+
export declare const AGENT_RUN_SPEC_FIELDS: readonly AgentRunSpecField[];
|
|
18
|
+
export declare const TOOL_GRANT_KINDS: readonly ToolGrantKind[];
|
|
19
|
+
/** The `default` of a runner's switch over `ToolGrant['kind']`: only a kind it does not map reaches here. */
|
|
20
|
+
export declare function unknownToolGrant(grant: never): never;
|
|
21
|
+
/** The spec fields every runner honors the same way: Squawk-side settings that never reach a
|
|
22
|
+
* native wire. Each runner spreads these into its `specSupport`. */
|
|
23
|
+
export declare const SQUAWK_SIDE_SPEC_SUPPORT: {
|
|
24
|
+
readonly timings: {
|
|
25
|
+
readonly honored: true;
|
|
26
|
+
readonly via: 'internal runner deadlines; omitted fields retain production defaults';
|
|
27
|
+
};
|
|
28
|
+
readonly scope: {
|
|
29
|
+
readonly honored: true;
|
|
30
|
+
readonly via: 'every session process starts inside the worker scope (ADR 0032)';
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Backends without a dedicated system-prompt channel (codex app-server,
|
|
35
|
+
* opencode serve) deliver `spec.systemPrompt` as a leading block of the
|
|
36
|
+
* opening user message — the documented per-backend mapping (spec §protocol
|
|
37
|
+
* v2: claude = `--append-system-prompt`, codex/opencode = prepended here).
|
|
38
|
+
*/
|
|
39
|
+
export declare function prependSystemPrompt(systemPrompt: string | undefined, userPrompt: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* True for the `128 + signal` exit codes an agent CLI reports when it handles
|
|
42
|
+
* a stop signal itself instead of dying from it (SIGINT/SIGKILL/SIGTERM).
|
|
43
|
+
*
|
|
44
|
+
* Every runner arms a SIGTERM→SIGKILL watchdog on `end()` and signals on
|
|
45
|
+
* `interrupt()` (#703): the CLIs install their own handlers, so a session the
|
|
46
|
+
* runner tore down on purpose comes back as a NON-ZERO exit. Paired with a
|
|
47
|
+
* "we sent the signal" flag, this predicate keeps that teardown out of the
|
|
48
|
+
* error path — an exit Squawk caused is never an agent failure.
|
|
49
|
+
*/
|
|
50
|
+
export declare function isSignalTerminationExit(exitCode: number | null): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Returns a predicate that answers "has this child actually terminated?".
|
|
53
|
+
*
|
|
54
|
+
* `ChildProcess.killed` answers a different question — it flips as soon as a
|
|
55
|
+
* signal is *delivered*, whether or not the child dies from it. Every agent CLI
|
|
56
|
+
* installs its own SIGTERM handler, so gating a SIGTERM→SIGKILL watchdog on
|
|
57
|
+
* `!child.killed` disables the escalation for exactly the child it exists for:
|
|
58
|
+
* `killed` is true, `exitCode` stays null, and the process outlives the whole
|
|
59
|
+
* grace window (#844, same defect fixed for the discovery probe in #841).
|
|
60
|
+
*
|
|
61
|
+
* Seeded from `exitCode`/`signalCode` so a child that died before the watchdog
|
|
62
|
+
* was armed is recognized without waiting for an event that already fired.
|
|
63
|
+
*/
|
|
64
|
+
export declare function trackChildExit(child: TrackableChild): () => boolean;
|
|
65
|
+
export declare const BOUNDARY_INPUT_DELIVERY: InputDelivery;
|
|
66
|
+
/** Absent means the pre-#505 behavior every runner had. No shipped runner declares `boundary`;
|
|
67
|
+
* it remains the delivery of a runner that declares none. */
|
|
68
|
+
export declare function inputDeliveryOf(runner: Pick<AgentRunner, 'inputDelivery'>): InputDelivery;
|
|
@@ -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,EAAE,IAAI;IACzB,MAAM,EAAE,IAAI;IACZ,GAAG,EAAE,IAAI;IACT,SAAS,EAAE,IAAI;IACf,6BAA6B,EAAE,IAAI;IACnC,OAAO,EAAE,IAAI;IACb,qBAAqB,EAAE,IAAI;IAC3B,GAAG,EAAE,IAAI;IACT,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,IAAI;IACZ,0BAA0B,EAAE,IAAI;CACjC,CAAC;AACF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,I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AAC,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":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAUjC;;;;;;GAMG;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E,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"}
|