specrails-core 5.2.3 → 5.4.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/README.md +3 -0
- package/bin/specrails-core.mjs +5 -0
- package/dist/agent-runtime/capabilities.d.ts +27 -0
- package/dist/agent-runtime/capabilities.js +73 -0
- package/dist/agent-runtime/capabilities.js.map +1 -0
- package/dist/agent-runtime/cli-executor.d.ts +43 -0
- package/dist/agent-runtime/cli-executor.js +405 -0
- package/dist/agent-runtime/cli-executor.js.map +1 -0
- package/dist/agent-runtime/cli-process.d.ts +32 -0
- package/dist/agent-runtime/cli-process.js +159 -0
- package/dist/agent-runtime/cli-process.js.map +1 -0
- package/dist/agent-runtime/cli.d.ts +39 -0
- package/dist/agent-runtime/cli.js +216 -0
- package/dist/agent-runtime/cli.js.map +1 -0
- package/dist/agent-runtime/codex-schema.d.ts +4 -0
- package/dist/agent-runtime/codex-schema.js +31 -0
- package/dist/agent-runtime/codex-schema.js.map +1 -0
- package/dist/agent-runtime/config.d.ts +11 -0
- package/dist/agent-runtime/config.js +263 -0
- package/dist/agent-runtime/config.js.map +1 -0
- package/dist/agent-runtime/core-host.d.ts +41 -0
- package/dist/agent-runtime/core-host.js +132 -0
- package/dist/agent-runtime/core-host.js.map +1 -0
- package/dist/agent-runtime/durable-store.d.ts +22 -0
- package/dist/agent-runtime/durable-store.js +205 -0
- package/dist/agent-runtime/durable-store.js.map +1 -0
- package/dist/agent-runtime/efficiency-summary.d.ts +67 -0
- package/dist/agent-runtime/efficiency-summary.js +52 -0
- package/dist/agent-runtime/efficiency-summary.js.map +1 -0
- package/dist/agent-runtime/efficiency-types.d.ts +60 -0
- package/dist/agent-runtime/efficiency-types.js +8 -0
- package/dist/agent-runtime/efficiency-types.js.map +1 -0
- package/dist/agent-runtime/efficiency.d.ts +5 -0
- package/dist/agent-runtime/efficiency.js +35 -0
- package/dist/agent-runtime/efficiency.js.map +1 -0
- package/dist/agent-runtime/evaluation-corpus.d.ts +13 -0
- package/dist/agent-runtime/evaluation-corpus.js +8 -0
- package/dist/agent-runtime/evaluation-corpus.js.map +1 -0
- package/dist/agent-runtime/evaluation.d.ts +43 -0
- package/dist/agent-runtime/evaluation.js +171 -0
- package/dist/agent-runtime/evaluation.js.map +1 -0
- package/dist/agent-runtime/executor-types.d.ts +125 -0
- package/dist/agent-runtime/executor-types.js +29 -0
- package/dist/agent-runtime/executor-types.js.map +1 -0
- package/dist/agent-runtime/executors.d.ts +23 -0
- package/dist/agent-runtime/executors.js +48 -0
- package/dist/agent-runtime/executors.js.map +1 -0
- package/dist/agent-runtime/gemini-policy.d.ts +8 -0
- package/dist/agent-runtime/gemini-policy.js +36 -0
- package/dist/agent-runtime/gemini-policy.js.map +1 -0
- package/dist/agent-runtime/graph/artifacts.d.ts +26 -0
- package/dist/agent-runtime/graph/artifacts.js +205 -0
- package/dist/agent-runtime/graph/artifacts.js.map +1 -0
- package/dist/agent-runtime/graph/nodes.d.ts +39 -0
- package/dist/agent-runtime/graph/nodes.js +321 -0
- package/dist/agent-runtime/graph/nodes.js.map +1 -0
- package/dist/agent-runtime/graph/review-policy.d.ts +18 -0
- package/dist/agent-runtime/graph/review-policy.js +32 -0
- package/dist/agent-runtime/graph/review-policy.js.map +1 -0
- package/dist/agent-runtime/graph/roles.d.ts +47 -0
- package/dist/agent-runtime/graph/roles.js +190 -0
- package/dist/agent-runtime/graph/roles.js.map +1 -0
- package/dist/agent-runtime/graph/state.d.ts +83 -0
- package/dist/agent-runtime/graph/state.js +23 -0
- package/dist/agent-runtime/graph/state.js.map +1 -0
- package/dist/agent-runtime/graph-checkpointer.d.ts +61 -0
- package/dist/agent-runtime/graph-checkpointer.js +137 -0
- package/dist/agent-runtime/graph-checkpointer.js.map +1 -0
- package/dist/agent-runtime/index.d.ts +20 -0
- package/dist/agent-runtime/index.js +21 -0
- package/dist/agent-runtime/index.js.map +1 -0
- package/dist/agent-runtime/kimi-acp.d.ts +11 -0
- package/dist/agent-runtime/kimi-acp.js +190 -0
- package/dist/agent-runtime/kimi-acp.js.map +1 -0
- package/dist/agent-runtime/openai-executor.d.ts +26 -0
- package/dist/agent-runtime/openai-executor.js +192 -0
- package/dist/agent-runtime/openai-executor.js.map +1 -0
- package/dist/agent-runtime/openspec-tool-server.d.ts +1 -0
- package/dist/agent-runtime/openspec-tool-server.js +37 -0
- package/dist/agent-runtime/openspec-tool-server.js.map +1 -0
- package/dist/agent-runtime/openspec.d.ts +123 -0
- package/dist/agent-runtime/openspec.js +263 -0
- package/dist/agent-runtime/openspec.js.map +1 -0
- package/dist/agent-runtime/prompts.d.ts +44 -0
- package/dist/agent-runtime/prompts.js +310 -0
- package/dist/agent-runtime/prompts.js.map +1 -0
- package/dist/agent-runtime/provider-diagnostic.d.ts +2 -0
- package/dist/agent-runtime/provider-diagnostic.js +25 -0
- package/dist/agent-runtime/provider-diagnostic.js.map +1 -0
- package/dist/agent-runtime/repository-context.d.ts +25 -0
- package/dist/agent-runtime/repository-context.js +100 -0
- package/dist/agent-runtime/repository-context.js.map +1 -0
- package/dist/agent-runtime/review-context.d.ts +14 -0
- package/dist/agent-runtime/review-context.js +41 -0
- package/dist/agent-runtime/review-context.js.map +1 -0
- package/dist/agent-runtime/role-routing.d.ts +10 -0
- package/dist/agent-runtime/role-routing.js +29 -0
- package/dist/agent-runtime/role-routing.js.map +1 -0
- package/dist/agent-runtime/role-state.d.ts +19 -0
- package/dist/agent-runtime/role-state.js +24 -0
- package/dist/agent-runtime/role-state.js.map +1 -0
- package/dist/agent-runtime/runtime-identity.d.ts +11 -0
- package/dist/agent-runtime/runtime-identity.js +33 -0
- package/dist/agent-runtime/runtime-identity.js.map +1 -0
- package/dist/agent-runtime/tool-event.d.ts +3 -0
- package/dist/agent-runtime/tool-event.js +24 -0
- package/dist/agent-runtime/tool-event.js.map +1 -0
- package/dist/agent-runtime/verification-plan.d.ts +55 -0
- package/dist/agent-runtime/verification-plan.js +206 -0
- package/dist/agent-runtime/verification-plan.js.map +1 -0
- package/dist/agent-runtime/workflow-types.d.ts +226 -0
- package/dist/agent-runtime/workflow-types.js +2 -0
- package/dist/agent-runtime/workflow-types.js.map +1 -0
- package/dist/agent-runtime/workflow.d.ts +17 -0
- package/dist/agent-runtime/workflow.js +636 -0
- package/dist/agent-runtime/workflow.js.map +1 -0
- package/dist/agent-runtime/workspace-tools.d.ts +29 -0
- package/dist/agent-runtime/workspace-tools.js +282 -0
- package/dist/agent-runtime/workspace-tools.js.map +1 -0
- package/dist/installer/cli.d.ts +35 -0
- package/dist/installer/cli.js +3 -0
- package/dist/installer/cli.js.map +1 -1
- package/dist/installer/commands/doctor.d.ts +27 -0
- package/dist/installer/commands/framework.d.ts +85 -0
- package/dist/installer/commands/init.d.ts +147 -0
- package/dist/installer/commands/update.d.ts +56 -0
- package/dist/installer/commands/v5-migration.d.ts +32 -0
- package/dist/installer/phases/framework-lifecycle.d.ts +53 -0
- package/dist/installer/phases/install-config.d.ts +64 -0
- package/dist/installer/phases/manifest.d.ts +45 -0
- package/dist/installer/phases/prereqs.d.ts +51 -0
- package/dist/installer/phases/provider-detect.d.ts +89 -0
- package/dist/installer/phases/scaffold.d.ts +211 -0
- package/dist/installer/phases/scaffold.js +39 -109
- package/dist/installer/phases/scaffold.js.map +1 -1
- package/dist/installer/runtime/kimi.d.ts +84 -0
- package/dist/installer/runtime/pipeline-state.d.ts +351 -0
- package/dist/installer/runtime/pipeline-state.js +514 -41
- package/dist/installer/runtime/pipeline-state.js.map +1 -1
- package/dist/installer/util/errors.d.ts +46 -0
- package/dist/installer/util/exec.d.ts +41 -0
- package/dist/installer/util/fs.d.ts +153 -0
- package/dist/installer/util/git.d.ts +44 -0
- package/dist/installer/util/install-transaction.d.ts +29 -0
- package/dist/installer/util/logger.d.ts +31 -0
- package/dist/installer/util/paths.d.ts +34 -0
- package/dist/installer/util/prompts.d.ts +23 -0
- package/dist/installer/util/registry.d.ts +174 -0
- package/dist/installer/util/template.d.ts +23 -0
- package/docs/README.md +1 -0
- package/docs/agent-runtime-efficiency.md +65 -0
- package/docs/agent-runtime.md +339 -0
- package/integration-contract.json +80 -7
- package/package.json +20 -2
- package/schemas/agent-runtime.schema.json +77 -0
- package/schemas/fixtures/runtime-efficiency-summary.v1.json +790 -0
- package/templates/codex-skills/batch-implement/SKILL.md +33 -58
- package/templates/codex-skills/implement/SKILL.md +21 -124
- package/templates/codex-skills/retry/SKILL.md +8 -34
- package/templates/commands/specrails/batch-implement.md +21 -16
- package/templates/commands/specrails/implement.md +17 -276
- package/templates/commands/specrails/retry.md +6 -34
- package/templates/gemini-commands/batch-implement.toml +34 -28
- package/templates/gemini-commands/implement.toml +34 -55
- package/templates/gemini-commands/retry.toml +10 -16
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
export type PipelinePhase = 'architect' | 'developer' | 'reviewer' | 'archive' | 'ship' | 'ci';
|
|
2
|
+
export type PhaseStatus = 'pending' | 'running' | 'done' | 'blocked' | 'failed' | 'skipped';
|
|
3
|
+
export interface PipelineSpec {
|
|
4
|
+
id: string | number;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
repositoryIds?: string[];
|
|
8
|
+
acceptanceCriteria?: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface PipelineRepository {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
path: string;
|
|
14
|
+
baseSha?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface PipelineContext {
|
|
17
|
+
schemaVersion: 1;
|
|
18
|
+
runId: string;
|
|
19
|
+
backlogRoot: string;
|
|
20
|
+
backlogPath?: string;
|
|
21
|
+
artifactRoot: string;
|
|
22
|
+
artifactRepositoryId: string;
|
|
23
|
+
repositories: PipelineRepository[];
|
|
24
|
+
ownership: {
|
|
25
|
+
git: 'host' | 'core';
|
|
26
|
+
backlog: 'host' | 'core';
|
|
27
|
+
worktrees: 'host' | 'core';
|
|
28
|
+
};
|
|
29
|
+
specs: PipelineSpec[];
|
|
30
|
+
}
|
|
31
|
+
export interface HostCheckPolicy {
|
|
32
|
+
reuse?: 'never' | 'snapshot-local';
|
|
33
|
+
inputs?: string[];
|
|
34
|
+
deterministic?: boolean;
|
|
35
|
+
readOnly?: boolean;
|
|
36
|
+
toolchainInputs?: string[];
|
|
37
|
+
independentGroup?: string;
|
|
38
|
+
resources?: string[];
|
|
39
|
+
}
|
|
40
|
+
export interface VerificationCommand {
|
|
41
|
+
key?: string;
|
|
42
|
+
label?: string;
|
|
43
|
+
policy?: HostCheckPolicy;
|
|
44
|
+
repositoryId: string;
|
|
45
|
+
command: string;
|
|
46
|
+
args: string[];
|
|
47
|
+
cwd?: string;
|
|
48
|
+
env?: Record<string, string>;
|
|
49
|
+
timeoutMs?: number;
|
|
50
|
+
}
|
|
51
|
+
/** `unverified` admits a full request whose commands do not cover every repository
|
|
52
|
+
* (or cover none): the receipt then records which repositories ran no check. */
|
|
53
|
+
export interface VerificationRequest {
|
|
54
|
+
kind: 'full' | 'scoped';
|
|
55
|
+
commands: VerificationCommand[];
|
|
56
|
+
unverified?: boolean;
|
|
57
|
+
planHash?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface CommandReceipt {
|
|
60
|
+
repositoryId: string;
|
|
61
|
+
command: string;
|
|
62
|
+
args: string[];
|
|
63
|
+
cwd: string;
|
|
64
|
+
environmentPolicy?: 'isolated-transport-v1';
|
|
65
|
+
environmentHash: string;
|
|
66
|
+
environmentKeys: string[];
|
|
67
|
+
environmentOverrideKeys: string[];
|
|
68
|
+
environmentOverridesHash: string;
|
|
69
|
+
exitCode: number;
|
|
70
|
+
durationMs: number;
|
|
71
|
+
output: string;
|
|
72
|
+
checkDefinitionHash?: string;
|
|
73
|
+
checkDefinition?: VerificationCommand;
|
|
74
|
+
disposition?: 'executed' | 'reused' | 'not-run';
|
|
75
|
+
reusedFrom?: string;
|
|
76
|
+
reuseReason?: string;
|
|
77
|
+
snapshot?: VerificationSnapshot;
|
|
78
|
+
pending?: boolean;
|
|
79
|
+
evidenceId?: string;
|
|
80
|
+
stdout?: string;
|
|
81
|
+
stderr?: string;
|
|
82
|
+
outputTruncated?: boolean;
|
|
83
|
+
key?: string;
|
|
84
|
+
label?: string;
|
|
85
|
+
configuredTimeoutMs?: number;
|
|
86
|
+
appliedTimeoutMs?: number;
|
|
87
|
+
deadline?: number;
|
|
88
|
+
outcome?: 'passed' | 'failed' | 'cancelled' | 'timed-out' | 'interrupted';
|
|
89
|
+
}
|
|
90
|
+
export interface VerificationReceipt {
|
|
91
|
+
id: string;
|
|
92
|
+
kind: 'full' | 'scoped';
|
|
93
|
+
scopeHash: string;
|
|
94
|
+
candidateHash: string;
|
|
95
|
+
planHash?: string;
|
|
96
|
+
commands: CommandReceipt[];
|
|
97
|
+
notRunEvidenceIds?: string[];
|
|
98
|
+
completedAt: string;
|
|
99
|
+
valid: boolean;
|
|
100
|
+
reason?: string;
|
|
101
|
+
/** Repositories in scope that this receipt ran no command for (explicitly admitted by the request). */
|
|
102
|
+
unverifiedRepositories?: string[];
|
|
103
|
+
}
|
|
104
|
+
export interface AcceptanceCriterion {
|
|
105
|
+
specId: string;
|
|
106
|
+
criterionIndex: number;
|
|
107
|
+
requirement: string;
|
|
108
|
+
status: 'met' | 'exception' | 'blocked' | 'pending';
|
|
109
|
+
evidence: string[];
|
|
110
|
+
exception?: {
|
|
111
|
+
reason: string;
|
|
112
|
+
impact: string;
|
|
113
|
+
material: boolean;
|
|
114
|
+
acceptedBy: 'reviewer' | 'user' | 'host';
|
|
115
|
+
approvalEvidence: string;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
export interface AcceptanceCheck {
|
|
119
|
+
name: string;
|
|
120
|
+
status: 'passed' | 'failed' | 'unavailable';
|
|
121
|
+
required: boolean;
|
|
122
|
+
evidence: string[];
|
|
123
|
+
/** What was measured and what remains outside the measurement. */
|
|
124
|
+
scope: string;
|
|
125
|
+
limitations: string;
|
|
126
|
+
}
|
|
127
|
+
export interface AcceptanceReport {
|
|
128
|
+
criteria: AcceptanceCriterion[];
|
|
129
|
+
checks: AcceptanceCheck[];
|
|
130
|
+
findings: string[];
|
|
131
|
+
}
|
|
132
|
+
export interface AcceptanceReceipt extends AcceptanceReport {
|
|
133
|
+
scopeHash: string;
|
|
134
|
+
candidateHash: string;
|
|
135
|
+
artifactHash: string;
|
|
136
|
+
recordedAt: string;
|
|
137
|
+
planHash?: string;
|
|
138
|
+
}
|
|
139
|
+
export interface PipelineCompletion {
|
|
140
|
+
implementation: 'complete' | 'incomplete';
|
|
141
|
+
validation: 'verified' | 'with-exceptions' | 'pending' | 'blocked';
|
|
142
|
+
archive: PhaseStatus;
|
|
143
|
+
delivery: 'pending-host' | 'complete' | 'pending';
|
|
144
|
+
reasons: string[];
|
|
145
|
+
}
|
|
146
|
+
interface PhaseRecord {
|
|
147
|
+
startedAt?: string;
|
|
148
|
+
durationMs?: number;
|
|
149
|
+
attempts?: number;
|
|
150
|
+
status: PhaseStatus;
|
|
151
|
+
reason?: string;
|
|
152
|
+
candidateHash?: string;
|
|
153
|
+
artifactHash?: string;
|
|
154
|
+
completedAt?: string;
|
|
155
|
+
}
|
|
156
|
+
export interface PipelineState {
|
|
157
|
+
schemaVersion: 1;
|
|
158
|
+
runId: string;
|
|
159
|
+
change: string;
|
|
160
|
+
context: PipelineContext;
|
|
161
|
+
scopeHash: string;
|
|
162
|
+
revision: number;
|
|
163
|
+
createdAt: string;
|
|
164
|
+
updatedAt: string;
|
|
165
|
+
phases: Record<PipelinePhase, PhaseRecord>;
|
|
166
|
+
verificationPlan?: {
|
|
167
|
+
hash: string;
|
|
168
|
+
files: Array<{
|
|
169
|
+
path: string;
|
|
170
|
+
hash: string;
|
|
171
|
+
}>;
|
|
172
|
+
};
|
|
173
|
+
verification?: VerificationReceipt;
|
|
174
|
+
acceptance?: AcceptanceReceipt;
|
|
175
|
+
archivePath?: string;
|
|
176
|
+
archiveApproval?: {
|
|
177
|
+
candidateHash: string;
|
|
178
|
+
artifactHash: string;
|
|
179
|
+
confidenceHash: string;
|
|
180
|
+
acceptanceHash: string;
|
|
181
|
+
};
|
|
182
|
+
artifactExclusions: string[];
|
|
183
|
+
preview?: {
|
|
184
|
+
baseHash: string;
|
|
185
|
+
files: PreviewFile[];
|
|
186
|
+
createdAt: string;
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
export interface PreviewFile {
|
|
190
|
+
repositoryId: string;
|
|
191
|
+
path: string;
|
|
192
|
+
operation: 'write' | 'delete';
|
|
193
|
+
sourcePath?: string;
|
|
194
|
+
contentHash?: string;
|
|
195
|
+
}
|
|
196
|
+
export declare function verificationEnvironment(env: NodeJS.ProcessEnv, overrides?: Record<string, string>, platform?: NodeJS.Platform): NodeJS.ProcessEnv;
|
|
197
|
+
export declare function validatePipelineContext(input: unknown): PipelineContext;
|
|
198
|
+
export declare function pipelineStateDirectory(context: PipelineContext): string;
|
|
199
|
+
export interface CandidateManifest {
|
|
200
|
+
schemaVersion: 1;
|
|
201
|
+
scopeHash: string;
|
|
202
|
+
repositories: Array<{
|
|
203
|
+
id: string;
|
|
204
|
+
path: string;
|
|
205
|
+
files: Array<[string, string]>;
|
|
206
|
+
}>;
|
|
207
|
+
}
|
|
208
|
+
export declare function candidateManifest(state: PipelineState): CandidateManifest;
|
|
209
|
+
export declare function fingerprintCandidate(state: PipelineState): string;
|
|
210
|
+
export declare function initializePipeline(contextInput: unknown, change: string): PipelineState;
|
|
211
|
+
/** Host-owned binding, including immutable harness bytes outside the candidate. */
|
|
212
|
+
export declare function bindVerificationPlan(contextInput: PipelineContext, hash: string, files: Array<{
|
|
213
|
+
path: string;
|
|
214
|
+
hash: string;
|
|
215
|
+
}>): void;
|
|
216
|
+
declare function inspectReceipt(state: PipelineState, env?: NodeJS.ProcessEnv): {
|
|
217
|
+
valid: boolean;
|
|
218
|
+
reasons: string[];
|
|
219
|
+
receipt?: VerificationReceipt;
|
|
220
|
+
};
|
|
221
|
+
/** The frozen requirements an acceptance report must certify, in scope order. */
|
|
222
|
+
export declare function frozenAcceptanceCriteria(contextInput: unknown): Array<Pick<AcceptanceCriterion, 'specId' | 'criterionIndex' | 'requirement'>>;
|
|
223
|
+
/** Validates a report against the frozen scope without recording it; throws the same errors `recordAcceptance` would. */
|
|
224
|
+
export declare function validateAcceptanceReport(contextInput: unknown, input: unknown): AcceptanceReport;
|
|
225
|
+
declare function inspectAcceptance(state: PipelineState): {
|
|
226
|
+
valid: boolean;
|
|
227
|
+
status: PipelineCompletion['validation'];
|
|
228
|
+
reasons: string[];
|
|
229
|
+
receipt?: AcceptanceReceipt;
|
|
230
|
+
};
|
|
231
|
+
export declare function recordAcceptance(contextInput: unknown, input: unknown): PipelineState;
|
|
232
|
+
export declare function checkArchive(contextInput: unknown): PipelineState;
|
|
233
|
+
export declare function transitionPipeline(contextInput: unknown, phase: PipelinePhase, status: PhaseStatus, reason?: string): PipelineState;
|
|
234
|
+
export declare function inspectPipeline(contextInput: unknown): {
|
|
235
|
+
schemaVersion: 1;
|
|
236
|
+
runId: string;
|
|
237
|
+
change: string;
|
|
238
|
+
context: PipelineContext;
|
|
239
|
+
stateDir: string;
|
|
240
|
+
resumePhase: PipelinePhase | null;
|
|
241
|
+
phases: PipelineState['phases'];
|
|
242
|
+
verification: ReturnType<typeof inspectReceipt>;
|
|
243
|
+
acceptance: ReturnType<typeof inspectAcceptance>;
|
|
244
|
+
completion: PipelineCompletion;
|
|
245
|
+
planHash?: string;
|
|
246
|
+
candidateHash: string;
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* Native executables retain structured argv; Windows script shims need cmd.
|
|
250
|
+
* This runtime is copied as one standalone module into .specrails/runtime,
|
|
251
|
+
* without installer util/exec. Keep this builtins-only equivalent local rather
|
|
252
|
+
* than importing a helper absent from installed projects. Like runCommand, it
|
|
253
|
+
* handles Windows shims; unlike a shell string it refuses ambiguous arguments.
|
|
254
|
+
*/
|
|
255
|
+
export declare function verificationInvocation(command: string, args: string[], cwd: string, platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv): {
|
|
256
|
+
command: string;
|
|
257
|
+
args: string[];
|
|
258
|
+
windowsVerbatimArguments?: boolean;
|
|
259
|
+
};
|
|
260
|
+
/** Shared persisted-output/provider diagnostic redaction; preserves line structure. */
|
|
261
|
+
export declare function redactRuntimeText(text: string, env?: NodeJS.ProcessEnv): string;
|
|
262
|
+
export interface VerificationSnapshot {
|
|
263
|
+
eligible: boolean;
|
|
264
|
+
reason: string;
|
|
265
|
+
inputHash?: string;
|
|
266
|
+
toolchainHash?: string;
|
|
267
|
+
}
|
|
268
|
+
/** Host opt-in is a declaration of determinism, not inferred hermeticity. */
|
|
269
|
+
export declare function verificationSnapshot(context: PipelineContext, command: VerificationCommand): VerificationSnapshot;
|
|
270
|
+
/** Contiguous waves preserve baseline order; an uncertain check is a barrier. */
|
|
271
|
+
export declare function verificationWaves<T extends VerificationCommand>(commands: T[], maxConcurrency?: number): T[][];
|
|
272
|
+
export declare function verifyPipeline(contextInput: unknown, raw: unknown, log?: (text: string) => void, signal?: AbortSignal, options?: {
|
|
273
|
+
deadline?: number;
|
|
274
|
+
maxConcurrency?: number;
|
|
275
|
+
onEvidence?: (kind: 'check-started' | 'check-finished' | 'check-reused' | 'check-invalidated', payload: Record<string, string | number | null>) => Promise<void>;
|
|
276
|
+
}): Promise<VerificationReceipt>;
|
|
277
|
+
/** Validate a check plan without creating state or executing commands. */
|
|
278
|
+
export declare function validateVerificationRequest(contextInput: unknown, raw: unknown): void;
|
|
279
|
+
export declare function preparePreview(contextInput: unknown, raw: unknown): PipelineState;
|
|
280
|
+
export declare function applyPreview(contextInput: unknown, verificationRequest: unknown, log?: (text: string) => void): Promise<VerificationReceipt>;
|
|
281
|
+
export declare function runPipelineCommand(flags: Record<string, string | boolean>, positionals: string[]): Promise<number>;
|
|
282
|
+
export declare function runPipelineCli(argv: string[]): Promise<number>;
|
|
283
|
+
export interface VerificationEvidenceQuery {
|
|
284
|
+
id?: string;
|
|
285
|
+
section?: 'summary' | 'stdout' | 'stderr' | 'source';
|
|
286
|
+
sourceId?: string;
|
|
287
|
+
cursor?: string;
|
|
288
|
+
limit?: number;
|
|
289
|
+
}
|
|
290
|
+
/** Historical read: no live repository validation, source execution or lifecycle mutation. */
|
|
291
|
+
export declare function readVerificationEvidence(context: Pick<PipelineContext, 'backlogRoot' | 'runId'>, query?: VerificationEvidenceQuery): {
|
|
292
|
+
nextCursor?: string | undefined;
|
|
293
|
+
schemaVersion: number;
|
|
294
|
+
available: boolean;
|
|
295
|
+
items: Record<string, unknown>[];
|
|
296
|
+
truncated: boolean;
|
|
297
|
+
} | {
|
|
298
|
+
schemaVersion: number;
|
|
299
|
+
available: boolean;
|
|
300
|
+
items: {
|
|
301
|
+
sources: {
|
|
302
|
+
id: string;
|
|
303
|
+
displayPath: string;
|
|
304
|
+
byteCount: number;
|
|
305
|
+
hash: string;
|
|
306
|
+
}[];
|
|
307
|
+
schemaVersion: 1;
|
|
308
|
+
runId: string;
|
|
309
|
+
id: string;
|
|
310
|
+
checkId: string;
|
|
311
|
+
repositoryId: string;
|
|
312
|
+
label: string;
|
|
313
|
+
origin: string[];
|
|
314
|
+
required: true;
|
|
315
|
+
disposition: "executed" | "reused" | "not-run";
|
|
316
|
+
reusedFrom?: string;
|
|
317
|
+
status: "passed" | "failed" | "cancelled" | "interrupted" | "unavailable";
|
|
318
|
+
reuseReason?: string;
|
|
319
|
+
recordedAt: string;
|
|
320
|
+
execution: {
|
|
321
|
+
command: string;
|
|
322
|
+
args: string[];
|
|
323
|
+
cwd: string;
|
|
324
|
+
configuredTimeoutMs: number | null;
|
|
325
|
+
appliedTimeoutMs: number | null;
|
|
326
|
+
deadline: number | null;
|
|
327
|
+
outcome: string | null;
|
|
328
|
+
};
|
|
329
|
+
planHash: string;
|
|
330
|
+
candidateHash: string;
|
|
331
|
+
executionId: string;
|
|
332
|
+
exitCode: number | null;
|
|
333
|
+
durationMs: number | null;
|
|
334
|
+
outputTruncated: boolean;
|
|
335
|
+
stdoutBytes: number;
|
|
336
|
+
stderrBytes: number;
|
|
337
|
+
stdoutHash: string;
|
|
338
|
+
stderrHash: string;
|
|
339
|
+
}[];
|
|
340
|
+
truncated: boolean;
|
|
341
|
+
} | {
|
|
342
|
+
nextCursor?: string | undefined;
|
|
343
|
+
schemaVersion: number;
|
|
344
|
+
available: boolean;
|
|
345
|
+
text: string;
|
|
346
|
+
byteCount: number;
|
|
347
|
+
totalBytes: number;
|
|
348
|
+
truncated: boolean;
|
|
349
|
+
items?: undefined;
|
|
350
|
+
};
|
|
351
|
+
export {};
|