specrails-core 6.5.0 → 6.6.0
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-runtime/capabilities.d.ts +2 -2
- package/dist/agent-runtime/cli.d.ts +4 -4
- package/dist/agent-runtime/compact/environment.d.ts +20 -2
- package/dist/agent-runtime/compact/environment.js +63 -4
- package/dist/agent-runtime/compact/step.d.ts +1 -1
- package/dist/agent-runtime/efficiency-summary.d.ts +1 -1
- package/dist/agent-runtime/efficiency-types.d.ts +1 -1
- package/dist/agent-runtime/engine/checkpoint/database.d.ts +15 -15
- package/dist/agent-runtime/engine/contracts.d.ts +2 -1
- package/dist/agent-runtime/engine/definition-types.d.ts +1 -1
- package/dist/agent-runtime/engine/efficiency-summary.d.ts +8 -8
- package/dist/agent-runtime/engine/fork.d.ts +1 -1
- package/dist/agent-runtime/engine/graph-description.d.ts +16 -16
- package/dist/agent-runtime/engine/implementation-compiler.d.ts +68 -68
- package/dist/agent-runtime/engine/piece-dependencies.js +4 -4
- package/dist/agent-runtime/engine/pieces/implementation-step.d.ts +1 -1
- package/dist/agent-runtime/engine/pieces/role-turn.js +10 -1
- package/dist/agent-runtime/engine/pieces/shared.d.ts +2 -2
- package/dist/agent-runtime/engine/pieces/verify.js +43 -8
- package/dist/agent-runtime/engine/run-status.d.ts +165 -165
- package/dist/agent-runtime/engine/runs.d.ts +168 -168
- package/dist/agent-runtime/engine/state.d.ts +16 -16
- package/dist/agent-runtime/evaluation.d.ts +3 -3
- package/dist/agent-runtime/executor-types.d.ts +10 -10
- package/dist/agent-runtime/graph/convergence.d.ts +2 -2
- package/dist/agent-runtime/graph/convergence.js +11 -0
- package/dist/agent-runtime/graph/nodes.js +35 -4
- package/dist/agent-runtime/graph/review-policy.d.ts +1 -1
- package/dist/agent-runtime/graph/state.d.ts +6 -2
- package/dist/agent-runtime/guardrails.d.ts +1 -1
- package/dist/agent-runtime/guardrails.js +4 -1
- package/dist/agent-runtime/index.d.ts +3 -2
- package/dist/agent-runtime/index.js +1 -0
- package/dist/agent-runtime/openai-executor.d.ts +9 -9
- package/dist/agent-runtime/openspec.d.ts +4 -4
- package/dist/agent-runtime/prompts.d.ts +6 -0
- package/dist/agent-runtime/prompts.js +32 -8
- package/dist/agent-runtime/recovery.d.ts +12 -12
- package/dist/agent-runtime/session/drivers/claude/argv.d.ts +2 -2
- package/dist/agent-runtime/verification-repair.d.ts +31 -2
- package/dist/agent-runtime/verification-repair.js +58 -3
- package/dist/installer/commands/init.d.ts +1 -1
- package/dist/installer/phases/install-config.js +10 -3
- package/dist/installer/util/paths.d.ts +25 -1
- package/dist/pipeline/pipeline-state.d.ts +42 -11
- package/dist/pipeline/pipeline-state.js +47 -8
- package/package.json +13 -11
- package/schemas/agent-runtime.schema.json +1 -1
|
@@ -13,9 +13,9 @@ export declare function configuredCapabilities(config: RuntimeConfig, registry:
|
|
|
13
13
|
schemaVersion: 1;
|
|
14
14
|
roles: {
|
|
15
15
|
transport: string;
|
|
16
|
-
continuation:
|
|
16
|
+
continuation: 'supported' | 'unsupported' | 'unknown';
|
|
17
17
|
resumeRequiresFullContext?: boolean;
|
|
18
|
-
effortSupport:
|
|
18
|
+
effortSupport: 'supported' | 'unsupported' | 'unknown';
|
|
19
19
|
supportedEfforts: string[] | null;
|
|
20
20
|
observedModel: boolean;
|
|
21
21
|
observedEffort: boolean;
|
|
@@ -4,13 +4,13 @@ export declare function runtimeFailure(error: unknown): {
|
|
|
4
4
|
type: string;
|
|
5
5
|
status: string;
|
|
6
6
|
error: string | {
|
|
7
|
-
details?: import("./workflow-types.js").JsonValue | undefined;
|
|
8
7
|
code: string;
|
|
9
8
|
message: string;
|
|
9
|
+
details?: import("./workflow-types.js").JsonValue | undefined;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
/** Machine operations are mirrored in integration-contract.json; help is presentation-only. */
|
|
13
|
-
export declare const RUNTIME_CLI_OPERATIONS: readonly [
|
|
13
|
+
export declare const RUNTIME_CLI_OPERATIONS: readonly ['api', 'validate', 'run', 'status', 'resume', 'prompts', 'capabilities', 'evidence', 'recovery', 'evaluate', 'workflows', 'fork', 'signal', 'cancel', 'host', 'help'];
|
|
14
14
|
/** The host-facing summary: phase status, pending interrupts and usage without accumulated outputs. */
|
|
15
15
|
export declare function compactState(state: WorkflowState | null): {
|
|
16
16
|
runId: string;
|
|
@@ -42,13 +42,13 @@ export declare function compactState(state: WorkflowState | null): {
|
|
|
42
42
|
};
|
|
43
43
|
steps: {
|
|
44
44
|
[k: string]: {
|
|
45
|
-
status: "
|
|
45
|
+
status: "interrupted" | "pending" | "running" | import("./workflow-types.js").StepStatus;
|
|
46
46
|
visits: number;
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
recentFailures: {
|
|
50
50
|
stepId: string;
|
|
51
|
-
status: "
|
|
51
|
+
status: "interrupted" | "running" | import("./workflow-types.js").StepStatus;
|
|
52
52
|
attempt: number;
|
|
53
53
|
visit: number;
|
|
54
54
|
at: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { spawnSync } from 'node:child_process';
|
|
2
|
-
/** `timeoutMs` overrides the default bound for one plan (a browser download is far larger than a dependency install). */
|
|
2
|
+
/** `timeoutMs` overrides the default bound for one plan (a browser download is far larger than a dependency install). `drift`: installed direct dependencies the install must bring back inside their declared ranges. */
|
|
3
3
|
export interface EnvironmentInstall {
|
|
4
4
|
ecosystem: 'node' | 'python' | 'go' | 'rust';
|
|
5
5
|
root: string;
|
|
@@ -7,12 +7,20 @@ export interface EnvironmentInstall {
|
|
|
7
7
|
args: string[];
|
|
8
8
|
timeoutMs?: number;
|
|
9
9
|
installs?: string;
|
|
10
|
+
drift?: DriftedDependency[];
|
|
10
11
|
}
|
|
11
|
-
/** `precondition`: the install failed for a reason only the host can repair (see hostPreconditionFailure). */
|
|
12
|
+
/** `precondition`: the install failed for a reason only the host can repair (see hostPreconditionFailure). `driftPersists`: drifted packages a successful install left drifted (the lockfile pins them). */
|
|
12
13
|
export interface InstallOutcome extends EnvironmentInstall {
|
|
13
14
|
ok: boolean;
|
|
14
15
|
detail: string;
|
|
15
16
|
precondition?: string;
|
|
17
|
+
driftPersists?: DriftedDependency[];
|
|
18
|
+
}
|
|
19
|
+
/** An installed direct dependency whose version does not satisfy the range package.json declares. */
|
|
20
|
+
export interface DriftedDependency {
|
|
21
|
+
name: string;
|
|
22
|
+
declared: string;
|
|
23
|
+
installed: string;
|
|
16
24
|
}
|
|
17
25
|
export type HostPreconditionKind = 'network' | 'credential' | 'environment-variable' | 'toolchain' | 'setup' | 'environment';
|
|
18
26
|
export interface HostPrecondition {
|
|
@@ -44,6 +52,16 @@ export declare function hostPrecondition(output: string): HostPrecondition | und
|
|
|
44
52
|
export declare function suggestedPackages(output: string): string[];
|
|
45
53
|
/** Dependencies package.json declares that node_modules does not hold (bounded). */
|
|
46
54
|
export declare function missingNodeDependencies(root: string): string[];
|
|
55
|
+
/**
|
|
56
|
+
* Installed direct dependencies whose version fails the range package.json
|
|
57
|
+
* declares (bounded, never throws): a tree installed for other inputs, such as
|
|
58
|
+
* a warm link from a base checkout or a manifest edited after the install,
|
|
59
|
+
* passes `missingNodeDependencies` and then fails lint on an untouched file.
|
|
60
|
+
* Absent packages are `missingNodeDependencies`' to report.
|
|
61
|
+
*/
|
|
62
|
+
export declare function driftedNodeDependencies(root: string): DriftedDependency[];
|
|
63
|
+
/** `@busuu/experiments 5.23.0 does not satisfy ^5.24.0, …` for up to five packages. */
|
|
64
|
+
export declare function describeDrift(drift: readonly DriftedDependency[]): string;
|
|
47
65
|
/** The installs a repository root needs, judged from its manifests and the absence of their install output. */
|
|
48
66
|
export declare function plannedInstalls(root: string, failureOutput?: string): EnvironmentInstall[];
|
|
49
67
|
/** Runs each planned install once, bounded; never throws. */
|
|
@@ -2,6 +2,7 @@ import crossSpawn from 'cross-spawn';
|
|
|
2
2
|
import { existsSync, readFileSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
3
3
|
import { tmpdir } from 'node:os';
|
|
4
4
|
import path from 'node:path';
|
|
5
|
+
import semver from 'semver';
|
|
5
6
|
// npm/pnpm/yarn are `.cmd` shims on Windows: a bare `spawnSync('npm')` is
|
|
6
7
|
// ENOENT there, which read as an environment failure of its own and sent the
|
|
7
8
|
// install/check round in circles. cross-spawn resolves the shim on every OS.
|
|
@@ -133,6 +134,56 @@ export function missingNodeDependencies(root) {
|
|
|
133
134
|
}
|
|
134
135
|
return [...declared].filter(name => !existsSync(path.join(root, 'node_modules', name))).slice(0, 20);
|
|
135
136
|
}
|
|
137
|
+
// Specifiers with no installed-version contract to check locally; reporting
|
|
138
|
+
// them would plan an install on every run.
|
|
139
|
+
const NON_SEMVER_SPECIFIER = /^(?:workspace:|file:|link:|portal:|patch:|npm:|catalog:|git[+:]|github:|gitlab:|bitbucket:|https?:|ssh:)|\//;
|
|
140
|
+
/**
|
|
141
|
+
* Installed direct dependencies whose version fails the range package.json
|
|
142
|
+
* declares (bounded, never throws): a tree installed for other inputs, such as
|
|
143
|
+
* a warm link from a base checkout or a manifest edited after the install,
|
|
144
|
+
* passes `missingNodeDependencies` and then fails lint on an untouched file.
|
|
145
|
+
* Absent packages are `missingNodeDependencies`' to report.
|
|
146
|
+
*/
|
|
147
|
+
export function driftedNodeDependencies(root) {
|
|
148
|
+
let manifest;
|
|
149
|
+
try {
|
|
150
|
+
manifest = JSON.parse(readFileSync(path.join(root, 'package.json'), 'utf8'));
|
|
151
|
+
}
|
|
152
|
+
catch {
|
|
153
|
+
return [];
|
|
154
|
+
}
|
|
155
|
+
const drifted = new Map();
|
|
156
|
+
for (const field of ['dependencies', 'devDependencies', 'optionalDependencies']) {
|
|
157
|
+
const block = manifest[field];
|
|
158
|
+
if (!block || typeof block !== 'object' || Array.isArray(block))
|
|
159
|
+
continue;
|
|
160
|
+
for (const [name, declared] of Object.entries(block)) {
|
|
161
|
+
if (drifted.has(name) || typeof declared !== 'string' || NON_SEMVER_SPECIFIER.test(declared.trim()))
|
|
162
|
+
continue;
|
|
163
|
+
const range = semver.validRange(declared);
|
|
164
|
+
if (!range)
|
|
165
|
+
continue;
|
|
166
|
+
let installed;
|
|
167
|
+
try {
|
|
168
|
+
installed = JSON.parse(readFileSync(path.join(root, 'node_modules', name, 'package.json'), 'utf8')).version;
|
|
169
|
+
}
|
|
170
|
+
catch {
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
if (typeof installed !== 'string' || !semver.valid(installed))
|
|
174
|
+
continue;
|
|
175
|
+
if (!semver.satisfies(installed, range, { includePrerelease: false }))
|
|
176
|
+
drifted.set(name, { name, declared, installed });
|
|
177
|
+
if (drifted.size >= 20)
|
|
178
|
+
return [...drifted.values()];
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return [...drifted.values()];
|
|
182
|
+
}
|
|
183
|
+
/** `@busuu/experiments 5.23.0 does not satisfy ^5.24.0, …` for up to five packages. */
|
|
184
|
+
export function describeDrift(drift) {
|
|
185
|
+
return drift.slice(0, 5).map(item => `${item.name} ${item.installed} does not satisfy ${item.declared}`).join(', ') + (drift.length > 5 ? ` and ${drift.length - 5} more` : '');
|
|
186
|
+
}
|
|
136
187
|
/** Browser builds are ~150 MB each; the default 5-minute install bound is too short on a slow link. */
|
|
137
188
|
const PLAYWRIGHT_INSTALL_TIMEOUT_MS = 10 * 60_000;
|
|
138
189
|
/** True when package.json declares `@playwright/test` or `playwright`; only those repositories get a browser install plan. */
|
|
@@ -161,9 +212,12 @@ export function plannedInstalls(root, failureOutput = '') {
|
|
|
161
212
|
// A manifest edited after the first install (a later task group adds
|
|
162
213
|
// jest-extended) leaves node_modules present but incomplete; verify then
|
|
163
214
|
// fails on the environment, not the code. Declared-but-absent ⇒ reinstall.
|
|
164
|
-
|
|
215
|
+
// A version outside its declared range (a stale warm-linked tree) is the
|
|
216
|
+
// same kind of gap: the same install brings it back in range.
|
|
217
|
+
const drift = has('package.json') && has('node_modules') ? driftedNodeDependencies(root) : [];
|
|
218
|
+
if (has('package.json') && (!has('node_modules') || missingNodeDependencies(root).length || drift.length)) {
|
|
165
219
|
const runner = has('pnpm-lock.yaml') ? 'pnpm' : has('yarn.lock') ? 'yarn' : 'npm';
|
|
166
|
-
plans.push({ ecosystem: 'node', root, command: runner, args: runner === 'npm' ? ['install', '--no-audit', '--no-fund', '--loglevel=error'] : ['install'] });
|
|
220
|
+
plans.push({ ecosystem: 'node', root, command: runner, args: runner === 'npm' ? ['install', '--no-audit', '--no-fund', '--loglevel=error'] : ['install'], ...(drift.length ? { drift } : {}) });
|
|
167
221
|
}
|
|
168
222
|
// After the dependency plan: a fresh worktree needs node_modules before
|
|
169
223
|
// `playwright install` can run at all.
|
|
@@ -262,10 +316,15 @@ export function installEnvironment(roots, io = {}) {
|
|
|
262
316
|
}
|
|
263
317
|
io.onEvent?.({ kind: 'tool-end', tool: plan.command });
|
|
264
318
|
const ok = result.status === 0;
|
|
265
|
-
const detail = ok ? `installed ${plan.installs ?? `${plan.ecosystem} dependencies`} in ${path.basename(root)}` : `${plan.command} ${plan.args.join(' ')} failed in ${path.basename(root)}: ${String(result.stderr || result.error?.message || `exit ${result.status}`).trim().slice(0, 400)}`;
|
|
319
|
+
const detail = ok ? `installed ${plan.installs ?? `${plan.ecosystem} dependencies`} in ${path.basename(root)}${plan.drift?.length ? ` (${describeDrift(plan.drift)})` : ''}` : `${plan.command} ${plan.args.join(' ')} failed in ${path.basename(root)}: ${String(result.stderr || result.error?.message || `exit ${result.status}`).trim().slice(0, 400)}`;
|
|
266
320
|
io.onEvent?.({ kind: 'text', text: `Environment: ${detail}` });
|
|
321
|
+
// An install that leaves the drift in place means the lockfile itself
|
|
322
|
+
// resolves the old version: a code change, never a second install.
|
|
323
|
+
const persisting = ok && plan.drift?.length ? driftedNodeDependencies(root).filter(item => plan.drift.some(before => before.name === item.name)) : [];
|
|
324
|
+
if (persisting.length)
|
|
325
|
+
io.onEvent?.({ kind: 'text', text: `Environment: ${describeDrift(persisting)} after installing in ${path.basename(root)}; the lockfile still resolves the drifted version, so update the lockfile or the declared range.` });
|
|
267
326
|
const precondition = ok ? undefined : hostPreconditionFailure(`${result.stdout ?? ''}\n${result.stderr ?? ''}`);
|
|
268
|
-
outcomes.push({ ...plan, ok, detail, ...(precondition ? { precondition } : {}) });
|
|
327
|
+
outcomes.push({ ...plan, ok, detail, ...(precondition ? { precondition } : {}), ...(persisting.length ? { driftPersists: persisting } : {}) });
|
|
269
328
|
}
|
|
270
329
|
}
|
|
271
330
|
return outcomes;
|
|
@@ -40,7 +40,7 @@ export declare function openspecCall(env: CompactEnv, input: Parameters<OpenSpec
|
|
|
40
40
|
export declare const PLANNING_CONTROLS: {
|
|
41
41
|
readonly temperature: 0.2;
|
|
42
42
|
readonly maxOutputTokens: 16384;
|
|
43
|
-
readonly reasoningEffort:
|
|
43
|
+
readonly reasoningEffort: 'high';
|
|
44
44
|
};
|
|
45
45
|
export declare function structuredStep(env: CompactEnv, name: string, system: string, user: string, schema: Record<string, unknown>, validate?: (value: Record<string, unknown>) => string | undefined, controls?: {
|
|
46
46
|
temperature?: number;
|
|
@@ -25,7 +25,7 @@ export declare function efficiencySummary(state: WorkflowState, context: Pipelin
|
|
|
25
25
|
workflowVersion: string;
|
|
26
26
|
technicalAcceptance: string;
|
|
27
27
|
archive: import("../pipeline/pipeline-state.js").PhaseStatus;
|
|
28
|
-
delivery: "
|
|
28
|
+
delivery: "complete" | "pending" | "pending-host";
|
|
29
29
|
roles: {
|
|
30
30
|
role: string;
|
|
31
31
|
provider: string | null;
|
|
@@ -28,7 +28,7 @@ export interface ProviderInvocation {
|
|
|
28
28
|
costUsd: number | null;
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
export declare const CACHE_TOKEN_KEYS: readonly [
|
|
31
|
+
export declare const CACHE_TOKEN_KEYS: readonly ['uncachedInputTokens', 'cacheReadInputTokens', 'cacheWriteInputTokens'];
|
|
32
32
|
export declare function sumCacheUsage(values: CacheTokenUsage[]): CacheTokenUsage;
|
|
33
33
|
export interface EfficiencyTotals {
|
|
34
34
|
attempts: number;
|
|
@@ -5,21 +5,21 @@ export type DatabaseRow = Record<string, SQLOutputValue>;
|
|
|
5
5
|
export type WriteRow = Record<string, SQLInputValue>;
|
|
6
6
|
/** Every identifier interpolated into SQL comes from this closed adapter-owned map. */
|
|
7
7
|
declare const keys: {
|
|
8
|
-
readonly runs: readonly [
|
|
9
|
-
readonly visits: readonly [
|
|
10
|
-
readonly steps: readonly [
|
|
11
|
-
readonly attempts: readonly [
|
|
12
|
-
readonly invocations: readonly [
|
|
13
|
-
readonly receipts: readonly [
|
|
14
|
-
readonly budget: readonly [
|
|
15
|
-
readonly interrupts: readonly [
|
|
16
|
-
readonly control_inbox: readonly [
|
|
17
|
-
readonly role_sessions: readonly [
|
|
18
|
-
readonly piece_state: readonly [
|
|
19
|
-
readonly reservations: readonly [
|
|
20
|
-
readonly events: readonly [
|
|
21
|
-
readonly checkpoints: readonly [
|
|
22
|
-
readonly writes: readonly [
|
|
8
|
+
readonly runs: readonly ['run_id'];
|
|
9
|
+
readonly visits: readonly ['visit_id'];
|
|
10
|
+
readonly steps: readonly ['run_id', 'node_path', 'scope_id'];
|
|
11
|
+
readonly attempts: readonly ['attempt_id'];
|
|
12
|
+
readonly invocations: readonly ['invocation_id'];
|
|
13
|
+
readonly receipts: readonly ['receipt_id'];
|
|
14
|
+
readonly budget: readonly ['run_id'];
|
|
15
|
+
readonly interrupts: readonly ['interrupt_id'];
|
|
16
|
+
readonly control_inbox: readonly ['request_id'];
|
|
17
|
+
readonly role_sessions: readonly ['session_key'];
|
|
18
|
+
readonly piece_state: readonly ['run_id', 'scope_id', 'node_path', 'key'];
|
|
19
|
+
readonly reservations: readonly ['reservation_id'];
|
|
20
|
+
readonly events: readonly ['run_id', 'sequence'];
|
|
21
|
+
readonly checkpoints: readonly ['thread_id', 'checkpoint_ns', 'checkpoint_id'];
|
|
22
|
+
readonly writes: readonly ['thread_id', 'checkpoint_ns', 'checkpoint_id', 'task_id', 'idx'];
|
|
23
23
|
};
|
|
24
24
|
export type RevisionTable = keyof typeof keys;
|
|
25
25
|
/** Short synchronous transactions own graph writes and ledger evidence together. */
|
|
@@ -103,7 +103,8 @@ export interface ReceiptEvidence {
|
|
|
103
103
|
* is reserved for a correction role that diagnoses the cause outside the change.
|
|
104
104
|
*/
|
|
105
105
|
export interface HostBlocker {
|
|
106
|
-
|
|
106
|
+
/** `nondeterministic-output`: verification rewrites candidate files differently on every run (error code `verification_nondeterministic_output`). */
|
|
107
|
+
kind: 'network' | 'credential' | 'environment-variable' | 'toolchain' | 'setup' | 'environment' | 'scope' | 'nondeterministic-output';
|
|
107
108
|
reason: string;
|
|
108
109
|
command: string;
|
|
109
110
|
args: string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EngineEffect, JsonObject, WorkflowBudget } from './contracts.js';
|
|
2
|
-
export declare const PIECE_KINDS: readonly [
|
|
2
|
+
export declare const PIECE_KINDS: readonly ['prompt', 'role-turn', 'decider', 'condition', 'assign', 'verify', 'shell', 'artifact-contract', 'openspec-validate', 'openspec-archive', 'approval', 'question', 'gate', 'map', 'join', 'component', 'implementation', 'implementation-step', 'end'];
|
|
3
3
|
export type PieceKind = typeof PIECE_KINDS[number];
|
|
4
4
|
export interface DefinitionNode {
|
|
5
5
|
kind: PieceKind;
|
|
@@ -2,13 +2,6 @@ import type { WorkflowState } from '../workflow-types.js';
|
|
|
2
2
|
import type { RunLedger } from './checkpoint/ledger.js';
|
|
3
3
|
/** Derive diagnostics from committed records; status never inspects or mutates a journal. */
|
|
4
4
|
export declare function definitionEfficiencySummary(ledger: RunLedger, state: WorkflowState): {
|
|
5
|
-
reservations: {
|
|
6
|
-
pendingInvocations: number;
|
|
7
|
-
knownTokens: number;
|
|
8
|
-
knownCostUsd: number;
|
|
9
|
-
tokensUnknown: boolean;
|
|
10
|
-
costUnknown: boolean;
|
|
11
|
-
};
|
|
12
5
|
schemaVersion: 1;
|
|
13
6
|
currentEvidenceIds: string[];
|
|
14
7
|
planHash: string | null;
|
|
@@ -17,7 +10,7 @@ export declare function definitionEfficiencySummary(ledger: RunLedger, state: Wo
|
|
|
17
10
|
workflowVersion: string;
|
|
18
11
|
technicalAcceptance: string;
|
|
19
12
|
archive: import("../../pipeline/pipeline-state.js").PhaseStatus;
|
|
20
|
-
delivery: "
|
|
13
|
+
delivery: "complete" | "pending" | "pending-host";
|
|
21
14
|
roles: {
|
|
22
15
|
role: string;
|
|
23
16
|
provider: string | null;
|
|
@@ -59,4 +52,11 @@ export declare function definitionEfficiencySummary(ledger: RunLedger, state: Wo
|
|
|
59
52
|
durationMs: number | null;
|
|
60
53
|
};
|
|
61
54
|
metrics: import("../efficiency-types.js").RuntimeEfficiency;
|
|
55
|
+
reservations: {
|
|
56
|
+
pendingInvocations: number;
|
|
57
|
+
knownTokens: number;
|
|
58
|
+
knownCostUsd: number;
|
|
59
|
+
tokensUnknown: boolean;
|
|
60
|
+
costUnknown: boolean;
|
|
61
|
+
};
|
|
62
62
|
};
|
|
@@ -16,7 +16,7 @@ export interface ForkRunOptions {
|
|
|
16
16
|
}
|
|
17
17
|
/** A fork publishes an independently leased historical cut; the source is opened read-only. */
|
|
18
18
|
export declare function forkRun(directory: string, options: ForkRunOptions): Promise<{
|
|
19
|
-
type:
|
|
19
|
+
type: 'runtime-forked';
|
|
20
20
|
runId: string;
|
|
21
21
|
forkOf: string;
|
|
22
22
|
fromNodePath: string;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { WorkflowDefinition } from './definition-types.js';
|
|
2
2
|
/** Public topology contains no prompts, command arguments, credentials or state. */
|
|
3
3
|
export declare function describeDefinition(runId: string, definition: WorkflowDefinition): {
|
|
4
|
-
type:
|
|
4
|
+
type: 'runtime-graph';
|
|
5
5
|
engineVersion: number;
|
|
6
6
|
runId: string;
|
|
7
7
|
definitionHash: string;
|
|
8
8
|
workflowId: string;
|
|
9
9
|
nodes: {
|
|
10
10
|
path: string;
|
|
11
|
-
kind: "
|
|
11
|
+
kind: "approval" | "artifact-contract" | "assign" | "component" | "condition" | "decider" | "end" | "gate" | "implementation" | "implementation-step" | "join" | "map" | "openspec-archive" | "openspec-validate" | "prompt" | "question" | "role-turn" | "shell" | "verify";
|
|
12
12
|
label: string;
|
|
13
13
|
}[];
|
|
14
14
|
edges: {
|
|
@@ -18,31 +18,31 @@ export declare function describeDefinition(runId: string, definition: WorkflowDe
|
|
|
18
18
|
}[];
|
|
19
19
|
mermaid: string;
|
|
20
20
|
graph: {
|
|
21
|
+
entry: string;
|
|
22
|
+
nodes: {
|
|
23
|
+
id: string;
|
|
24
|
+
kind: "approval" | "artifact-contract" | "assign" | "component" | "condition" | "decider" | "end" | "gate" | "implementation" | "implementation-step" | "join" | "map" | "openspec-archive" | "openspec-validate" | "prompt" | "question" | "role-turn" | "shell" | "verify";
|
|
25
|
+
label: string;
|
|
26
|
+
ends: {
|
|
27
|
+
[x: string]: string | null;
|
|
28
|
+
};
|
|
29
|
+
component?: string | undefined;
|
|
30
|
+
}[];
|
|
31
|
+
id: string;
|
|
32
|
+
version: string;
|
|
21
33
|
components?: {
|
|
22
34
|
[k: string]: {
|
|
23
35
|
entry: string;
|
|
24
36
|
nodes: {
|
|
25
|
-
component?: string | undefined;
|
|
26
37
|
id: string;
|
|
27
|
-
kind: "
|
|
38
|
+
kind: "approval" | "artifact-contract" | "assign" | "component" | "condition" | "decider" | "end" | "gate" | "implementation" | "implementation-step" | "join" | "map" | "openspec-archive" | "openspec-validate" | "prompt" | "question" | "role-turn" | "shell" | "verify";
|
|
28
39
|
label: string;
|
|
29
40
|
ends: {
|
|
30
41
|
[x: string]: string | null;
|
|
31
42
|
};
|
|
43
|
+
component?: string | undefined;
|
|
32
44
|
}[];
|
|
33
45
|
};
|
|
34
46
|
} | undefined;
|
|
35
|
-
entry: string;
|
|
36
|
-
nodes: {
|
|
37
|
-
component?: string | undefined;
|
|
38
|
-
id: string;
|
|
39
|
-
kind: "join" | "map" | "verify" | "shell" | "end" | "approval" | "question" | "prompt" | "gate" | "implementation" | "role-turn" | "decider" | "condition" | "assign" | "openspec-validate" | "openspec-archive" | "component" | "implementation-step" | "artifact-contract";
|
|
40
|
-
label: string;
|
|
41
|
-
ends: {
|
|
42
|
-
[x: string]: string | null;
|
|
43
|
-
};
|
|
44
|
-
}[];
|
|
45
|
-
id: string;
|
|
46
|
-
version: string;
|
|
47
47
|
};
|
|
48
48
|
};
|