@planu/cli 8.5.1 → 8.7.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/CHANGELOG.md +12 -0
- package/README.md +16 -4
- package/dist/sdd-engine/completion-guard.js +2 -3
- package/dist/sdd-engine/contracts.d.ts +172 -0
- package/dist/sdd-engine/contracts.js +235 -10
- package/dist/sdd-engine/evidence-checkpoints.d.ts +6 -0
- package/dist/sdd-engine/evidence-checkpoints.js +280 -0
- package/dist/sdd-engine/evidence-journal.d.ts +25 -0
- package/dist/sdd-engine/evidence-journal.js +326 -0
- package/dist/sdd-engine/feature-manifest.d.ts +2 -1
- package/dist/sdd-engine/host-rule-pack.d.ts +4 -0
- package/dist/sdd-engine/host-rule-pack.js +114 -55
- package/dist/sdd-engine/host-skill-reader.d.ts +8 -1
- package/dist/sdd-engine/host-skill-reader.js +73 -0
- package/dist/sdd-engine/resume-history.d.ts +35 -3
- package/dist/sdd-engine/resume-history.js +242 -13
- package/dist/sdd-engine/resume-views.d.ts +7 -6
- package/dist/sdd-engine/resume-views.js +246 -114
- package/dist/sdd-engine/task-content.d.ts +2 -1
- package/dist/sdd-engine/task-failures.d.ts +30 -13
- package/dist/sdd-engine/task-failures.js +284 -115
- package/dist/sdd-engine/task-window.d.ts +6 -3
- package/dist/sdd-engine/task-window.js +12 -23
- package/dist/sdd-engine/tools/compact-result.d.ts +35 -5
- package/dist/sdd-engine/tools/compact-result.js +279 -2
- package/dist/sdd-engine/tools/execution-tools.js +20 -9
- package/dist/sdd-engine/tools/workspace-tools.js +80 -51
- package/dist/sdd-engine/trinity-structure.d.ts +2 -2
- package/dist/sdd-engine/verification-inputs.d.ts +2 -1
- package/dist/sdd-engine/verification-policy.d.ts +7 -6
- package/dist/sdd-engine/verification-policy.js +74 -85
- package/dist/sdd-engine/verification-preflight.d.ts +9 -7
- package/dist/sdd-engine/verification-preflight.js +108 -89
- package/dist/sdd-engine/verification-receipts.d.ts +2 -2
- package/dist/sdd-engine/verification-receipts.js +2 -1
- package/dist/sdd-engine/verification-runner.d.ts +3 -1
- package/dist/sdd-engine/verification-runner.js +12 -7
- package/dist/types/completion.d.ts +183 -3
- package/dist/types/resume-views.d.ts +221 -2
- package/dist/types/sdd-engine.d.ts +52 -112
- package/dist/types/verification.d.ts +26 -9
- package/package.json +5 -5
- package/templates/AGENTS.md +4 -0
- package/templates/host/planu-sdd.md +4 -0
- package/templates/skills/preflight-guardian.md +4 -0
- package/templates/skills/reconciler.md +6 -0
- package/templates/skills/spec-architect.md +44 -0
- package/templates/skills/spec-executor.md +6 -0
- package/templates/skills/verification-auditor.md +6 -0
- package/dist/sdd-engine/tools/format-result.d.ts +0 -3
- package/dist/sdd-engine/tools/format-result.js +0 -22
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as path from 'node:path';
|
|
2
|
+
import { withVerificationProcess } from './task-failures.js';
|
|
2
3
|
import { isScopedVerificationFeature, scopedFeaturePathFailure, scopedVerificationEnvironment, scopedFailure, cancelledVerification, uncertainCompletion, readScopedVerificationSnapshot, revalidateScopedVerificationSnapshot, } from './verification-policy.js';
|
|
3
4
|
import { spawn } from 'node:child_process';
|
|
4
5
|
function groupState(pid) {
|
|
@@ -275,17 +276,21 @@ export class ScopedVerificationCoordinator {
|
|
|
275
276
|
this.pending = undefined;
|
|
276
277
|
}
|
|
277
278
|
}
|
|
278
|
-
|
|
279
|
+
inspectState = (taskId) => {
|
|
279
280
|
if (this.quarantined) {
|
|
280
|
-
return
|
|
281
|
+
return 'verification_grant_quarantined';
|
|
281
282
|
}
|
|
282
283
|
if (this.running) {
|
|
283
|
-
return
|
|
284
|
+
return 'verification_in_progress';
|
|
284
285
|
}
|
|
285
286
|
if (this.consumed && taskId.toUpperCase() === this.policy.taskId) {
|
|
286
|
-
return
|
|
287
|
+
return 'verification_grant_consumed';
|
|
287
288
|
}
|
|
288
289
|
return null;
|
|
290
|
+
};
|
|
291
|
+
stateFailure(taskId) {
|
|
292
|
+
const reason = this.inspectState(taskId);
|
|
293
|
+
return reason ? scopedFailure({ reason }) : null;
|
|
289
294
|
}
|
|
290
295
|
async execute(context) {
|
|
291
296
|
const snapshot = await readScopedVerificationSnapshot(this.policy, context.tasksPath, context.workspaceRoot, context.taskId, context.selectTask);
|
|
@@ -315,7 +320,7 @@ export class ScopedVerificationCoordinator {
|
|
|
315
320
|
this.quarantined = true;
|
|
316
321
|
}
|
|
317
322
|
if (!run.ok) {
|
|
318
|
-
return scopedFailure({
|
|
323
|
+
return withVerificationProcess(scopedFailure({
|
|
319
324
|
reason: 'verification_process_failed',
|
|
320
325
|
exitCode: run.exitCode,
|
|
321
326
|
signal: run.signal,
|
|
@@ -323,7 +328,7 @@ export class ScopedVerificationCoordinator {
|
|
|
323
328
|
cancelled: run.cancelled,
|
|
324
329
|
timeoutMs: run.timeoutMs,
|
|
325
330
|
cleanupComplete: run.cleanupComplete,
|
|
326
|
-
});
|
|
331
|
+
}), run);
|
|
327
332
|
}
|
|
328
333
|
const after = await revalidateScopedVerificationSnapshot(this.policy, snapshot.data, context.selectTask);
|
|
329
334
|
if (!after.success) {
|
|
@@ -341,7 +346,7 @@ export class ScopedVerificationCoordinator {
|
|
|
341
346
|
if (!committed.success && committed.error.details?.completionState === 'uncertain') {
|
|
342
347
|
this.quarantined = true;
|
|
343
348
|
}
|
|
344
|
-
return committed;
|
|
349
|
+
return withVerificationProcess(committed, run);
|
|
345
350
|
}
|
|
346
351
|
}
|
|
347
352
|
//# sourceMappingURL=verification-runner.js.map
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { KeyObject } from 'node:crypto';
|
|
2
|
+
import type { BigIntStats } from 'node:fs';
|
|
3
|
+
import type { SddLockFile, ErrorCode, TrinityIssue, FilePermission, VerificationGate, VerificationReceipt, SddResult, CompleteTaskResult, CheckpointJournalReference, VerificationPreflight } from './sdd-engine.js';
|
|
4
|
+
import type { ScopedVerificationSnapshot, ScopedTaskSelector, ScopedTaskSelection, VerificationBudgetDiagnostic } from './verification.js';
|
|
2
5
|
export type CompletionFailureReason = 'guard_present' | 'contract_drift' | 'cancelled' | 'persistence_uncertain';
|
|
3
6
|
export interface PhysicalIdentity {
|
|
4
7
|
dev: number;
|
|
@@ -21,7 +24,7 @@ export interface GuardRecord {
|
|
|
21
24
|
host: string;
|
|
22
25
|
nonce: string;
|
|
23
26
|
startedAt: string;
|
|
24
|
-
operation: 'complete' | 'patch' | 'lock';
|
|
27
|
+
operation: 'complete' | 'patch' | 'lock' | 'checkpoint';
|
|
25
28
|
phase: 'running' | 'persisting';
|
|
26
29
|
featureDev: number;
|
|
27
30
|
featureIno: number;
|
|
@@ -42,7 +45,7 @@ export interface CompletionSnapshot {
|
|
|
42
45
|
digest: string;
|
|
43
46
|
}
|
|
44
47
|
export interface CompletionLeaseOptions {
|
|
45
|
-
operation?: 'complete' | 'patch' | 'lock';
|
|
48
|
+
operation?: 'complete' | 'patch' | 'lock' | 'checkpoint';
|
|
46
49
|
workspaceRoot?: string;
|
|
47
50
|
}
|
|
48
51
|
export interface CompletionSnapshotOptions {
|
|
@@ -81,4 +84,181 @@ export interface PreflightReadSnapshot {
|
|
|
81
84
|
artifacts: Partial<Record<'spec.md' | 'plan.md' | 'tasks.md' | '.lock', ArtifactCapture | undefined>>;
|
|
82
85
|
locked?: CompletionSnapshot;
|
|
83
86
|
}
|
|
87
|
+
export type VerificationInputCategory = 'candidate' | 'observed';
|
|
88
|
+
export type VerificationInputReason = 'receipt_input_unavailable' | 'receipt_input_drift' | 'cancelled';
|
|
89
|
+
export interface InputRequest {
|
|
90
|
+
category: VerificationInputCategory;
|
|
91
|
+
path: string;
|
|
92
|
+
allowAbsent: boolean;
|
|
93
|
+
}
|
|
94
|
+
interface WalkBase {
|
|
95
|
+
directories: readonly BigIntStats[];
|
|
96
|
+
absolute: string;
|
|
97
|
+
}
|
|
98
|
+
export type Walk = WalkBase & ({
|
|
99
|
+
state: 'absent';
|
|
100
|
+
} | {
|
|
101
|
+
state: 'present';
|
|
102
|
+
stat: BigIntStats;
|
|
103
|
+
});
|
|
104
|
+
export type InputCapture = {
|
|
105
|
+
request: InputRequest;
|
|
106
|
+
walk: WalkBase & {
|
|
107
|
+
state: 'absent';
|
|
108
|
+
};
|
|
109
|
+
} | {
|
|
110
|
+
request: InputRequest;
|
|
111
|
+
walk: WalkBase & {
|
|
112
|
+
state: 'present';
|
|
113
|
+
stat: BigIntStats;
|
|
114
|
+
};
|
|
115
|
+
rawSha256: string;
|
|
116
|
+
mode: number;
|
|
117
|
+
};
|
|
118
|
+
export interface WorkspaceRoot {
|
|
119
|
+
canonical: string;
|
|
120
|
+
stat: BigIntStats;
|
|
121
|
+
}
|
|
122
|
+
export interface VerificationInputSnapshot {
|
|
123
|
+
workspaceSha256: string;
|
|
124
|
+
candidateSha256: string;
|
|
125
|
+
observedSha256: string;
|
|
126
|
+
root: WorkspaceRoot;
|
|
127
|
+
workspaceRoot: string;
|
|
128
|
+
inputs: readonly InputCapture[];
|
|
129
|
+
}
|
|
130
|
+
export interface TaskBlock {
|
|
131
|
+
id: string;
|
|
132
|
+
explicitId: string | undefined;
|
|
133
|
+
legacyId: string | undefined;
|
|
134
|
+
ordinal: number;
|
|
135
|
+
lineIndex: number;
|
|
136
|
+
lines: string[];
|
|
137
|
+
}
|
|
138
|
+
export interface TaskParseAccumulator {
|
|
139
|
+
totalTasks: number;
|
|
140
|
+
completedTasks: number;
|
|
141
|
+
activeTaskIndex: number;
|
|
142
|
+
activeTaskId: string;
|
|
143
|
+
activeTaskTitle: string;
|
|
144
|
+
activeTaskLines: string[];
|
|
145
|
+
isCapturingActive: boolean;
|
|
146
|
+
}
|
|
147
|
+
export interface ManifestEntry {
|
|
148
|
+
rawPath: string;
|
|
149
|
+
permission: FilePermission;
|
|
150
|
+
line: number;
|
|
151
|
+
}
|
|
152
|
+
export interface PolicySourceFrame {
|
|
153
|
+
path: string;
|
|
154
|
+
root: boolean;
|
|
155
|
+
kind: 'object' | 'array';
|
|
156
|
+
indent: number;
|
|
157
|
+
nextArrayIndex: number;
|
|
158
|
+
}
|
|
159
|
+
export interface ReceiptPolicyText {
|
|
160
|
+
locations?: ReadonlyMap<string, number>;
|
|
161
|
+
text: string | null | undefined;
|
|
162
|
+
line?: number;
|
|
163
|
+
}
|
|
164
|
+
export interface ReceiptCandidate {
|
|
165
|
+
path: string;
|
|
166
|
+
requiredFrom: number;
|
|
167
|
+
}
|
|
168
|
+
export interface ReceiptTaskPolicy {
|
|
169
|
+
taskId: string;
|
|
170
|
+
gates: readonly VerificationGate[];
|
|
171
|
+
observed: readonly string[];
|
|
172
|
+
observedBaselineSha256: string;
|
|
173
|
+
command: string;
|
|
174
|
+
ordinal: number;
|
|
175
|
+
lineIndex: number;
|
|
176
|
+
}
|
|
177
|
+
export type ReceiptPolicyResult = {
|
|
178
|
+
status: 'none';
|
|
179
|
+
} | {
|
|
180
|
+
status: 'invalid';
|
|
181
|
+
taskId?: string;
|
|
182
|
+
issue?: TrinityIssue;
|
|
183
|
+
} | {
|
|
184
|
+
status: 'ready';
|
|
185
|
+
publicKey: KeyObject;
|
|
186
|
+
candidates: readonly ReceiptCandidate[];
|
|
187
|
+
tasks: ReadonlyMap<string, ReceiptTaskPolicy>;
|
|
188
|
+
};
|
|
189
|
+
export interface SignedVerificationReceipt {
|
|
190
|
+
receipt: VerificationReceipt;
|
|
191
|
+
message: readonly string[];
|
|
192
|
+
signature: Buffer;
|
|
193
|
+
}
|
|
194
|
+
export type ScopedSnapshotResult = SddResult<ScopedVerificationSnapshot>;
|
|
195
|
+
export interface ScopedVerificationCompletionContext {
|
|
196
|
+
readonly tasksPath: string;
|
|
197
|
+
readonly taskId: string;
|
|
198
|
+
readonly workspaceRoot: string;
|
|
199
|
+
readonly selectTask: ScopedTaskSelector;
|
|
200
|
+
readonly signal?: AbortSignal;
|
|
201
|
+
readonly commit: (snapshot: ScopedVerificationSnapshot, output: string, signal: AbortSignal) => Promise<SddResult<CompleteTaskResult>>;
|
|
202
|
+
}
|
|
203
|
+
export interface CheckpointCapability {
|
|
204
|
+
uid: number;
|
|
205
|
+
noFollow: number;
|
|
206
|
+
}
|
|
207
|
+
export interface CheckpointJournalIdentity {
|
|
208
|
+
dev: number;
|
|
209
|
+
ino: number;
|
|
210
|
+
mode: number;
|
|
211
|
+
uid: number;
|
|
212
|
+
nlink: number;
|
|
213
|
+
ctimeMs: number;
|
|
214
|
+
birthtimeMs: number;
|
|
215
|
+
}
|
|
216
|
+
export interface CheckpointJournalCapture {
|
|
217
|
+
reference: CheckpointJournalReference | null;
|
|
218
|
+
identity: CheckpointJournalIdentity | null;
|
|
219
|
+
size: number;
|
|
220
|
+
bytesSha256: string;
|
|
221
|
+
}
|
|
222
|
+
export interface CheckpointRootProjection {
|
|
223
|
+
canonical: string;
|
|
224
|
+
dev: string;
|
|
225
|
+
ino: string;
|
|
226
|
+
mode: string;
|
|
227
|
+
uid: string;
|
|
228
|
+
gid: string;
|
|
229
|
+
}
|
|
230
|
+
export interface CheckpointDirectoryIdentity {
|
|
231
|
+
dev: number;
|
|
232
|
+
ino: number;
|
|
233
|
+
mode: number;
|
|
234
|
+
uid: number;
|
|
235
|
+
}
|
|
236
|
+
export interface CheckpointStablePhysical {
|
|
237
|
+
root: CheckpointRootProjection;
|
|
238
|
+
directories: (CheckpointDirectoryIdentity & {
|
|
239
|
+
directory: string;
|
|
240
|
+
})[];
|
|
241
|
+
}
|
|
242
|
+
export interface CheckpointWriteState {
|
|
243
|
+
start(): void;
|
|
244
|
+
reset(): void;
|
|
245
|
+
started(): boolean;
|
|
246
|
+
}
|
|
247
|
+
export type CheckpointFailureReason = 'checkpoint_input_invalid' | 'checkpoint_requires_lock' | 'checkpoint_requires_active_task' | 'checkpoint_context_stale' | 'checkpoint_path_unsafe' | 'checkpoint_history_invalid' | 'checkpoint_sequence_exhausted' | 'guard_present' | 'persistence_uncertain' | 'cancelled' | 'checkpoint_unavailable';
|
|
248
|
+
type VerificationBudgetStateReason = 'verification_in_progress' | 'verification_grant_consumed' | 'verification_grant_quarantined';
|
|
249
|
+
export type VerificationBudgetReader = (taskId: string) => VerificationBudgetStateReason | null | undefined;
|
|
250
|
+
export type ScopedVerificationPinCapture = Pick<ScopedVerificationSnapshot, 'workspaceRoot' | 'tasksPath' | 'taskId' | 'specContent' | 'planContent' | 'tasksContent' | 'lockContent'>;
|
|
251
|
+
export type ScopedVerificationTaskPinCheck = (selected: ScopedTaskSelection | null) => SddResult<string>;
|
|
252
|
+
export interface VerificationBudgetContext {
|
|
253
|
+
readonly tasksPath: string;
|
|
254
|
+
readonly workspaceRoot: string;
|
|
255
|
+
readonly root: WorkspaceRoot;
|
|
256
|
+
readonly snapshot: PreflightReadSnapshot;
|
|
257
|
+
readonly selected: ScopedTaskSelection | null;
|
|
258
|
+
readonly preflight: VerificationPreflight;
|
|
259
|
+
}
|
|
260
|
+
export type BudgetDeniedReason = Extract<VerificationBudgetDiagnostic, {
|
|
261
|
+
admission: 'denied';
|
|
262
|
+
}>['reason'];
|
|
263
|
+
export {};
|
|
84
264
|
//# sourceMappingURL=completion.d.ts.map
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ScopedPolicy, VerificationBudgetDiagnostic } from './verification.js';
|
|
2
|
+
import type { WorkspaceRoot, CompletionSnapshot, VerificationInputSnapshot, CheckpointCapability, PreflightReadSnapshot } from './completion.js';
|
|
3
|
+
import type { HostSkillReadCause, HostSkillReadResult, CheckpointReported, CheckpointJournalReference, ExecutionDetailCursor, EvidenceHistoryCursor, SddResult, ActiveTaskResult, ActiveTaskDetails, FilePermission, PreflightAction, RelockHistoryCursor, VerificationEvidence, VerificationPreflight } from './sdd-engine.js';
|
|
2
4
|
export interface PreflightAssessment {
|
|
3
5
|
preflight: VerificationPreflight;
|
|
4
6
|
evidence?: VerificationEvidence;
|
|
5
7
|
inputs?: VerificationInputSnapshot;
|
|
6
8
|
}
|
|
7
9
|
export interface ResumeCheckpoint {
|
|
10
|
+
budget?: VerificationBudgetDiagnostic;
|
|
8
11
|
version: 1;
|
|
9
12
|
featureId: string;
|
|
10
13
|
status: 'active' | 'unlocked' | 'complete' | 'no_tasks';
|
|
@@ -51,5 +54,221 @@ export interface RelockHistoryPage {
|
|
|
51
54
|
records: RelockHistoryRecord[];
|
|
52
55
|
nextCursor: RelockHistoryCursor | null;
|
|
53
56
|
}
|
|
54
|
-
export type CompactFailureReason = 'unlocked' | 'history_cursor_stale' | 'history_cursor_invalid' | 'workspace_unresolved' | 'guard_present' | 'persistence_uncertain' | 'contract_drift' | 'tasks_missing' | 'artifact_unavailable' | 'history_invalid' | 'compact_identifier_invalid' | 'compact_input_invalid' | 'compact_response_too_large' | 'cancelled';
|
|
57
|
+
export type CompactFailureReason = 'unlocked' | 'detail_cursor_invalid' | 'detail_cursor_stale' | 'journal_cursor_invalid' | 'journal_cursor_stale' | 'history_cursor_stale' | 'history_cursor_invalid' | 'workspace_unresolved' | 'guard_present' | 'persistence_uncertain' | 'contract_drift' | 'tasks_missing' | 'artifact_unavailable' | 'history_invalid' | 'compact_identifier_invalid' | 'compact_input_invalid' | 'compact_response_too_large' | 'cancelled';
|
|
58
|
+
export interface EvidenceCheckpointRecord {
|
|
59
|
+
version: 1;
|
|
60
|
+
seq: number;
|
|
61
|
+
recordedAt: string;
|
|
62
|
+
previousSha256: string | null;
|
|
63
|
+
context: {
|
|
64
|
+
featureId: string;
|
|
65
|
+
taskId: string;
|
|
66
|
+
snapshotSha256: string;
|
|
67
|
+
contract: NonNullable<ResumeCheckpoint['contract']>;
|
|
68
|
+
candidate: ResumeCheckpoint['candidate'];
|
|
69
|
+
candidateState: 'captured' | 'not_configured' | 'unavailable';
|
|
70
|
+
};
|
|
71
|
+
reported: CheckpointReported & {
|
|
72
|
+
provenance: 'caller_reported';
|
|
73
|
+
certification: 'none';
|
|
74
|
+
};
|
|
75
|
+
recordSha256: string;
|
|
76
|
+
}
|
|
77
|
+
export interface CheckpointPrepared {
|
|
78
|
+
root: WorkspaceRoot;
|
|
79
|
+
snapshot: CompletionSnapshot;
|
|
80
|
+
assessment: PreflightAssessment;
|
|
81
|
+
context: EvidenceCheckpointRecord['context'];
|
|
82
|
+
}
|
|
83
|
+
export interface CompactCore {
|
|
84
|
+
root: WorkspaceRoot;
|
|
85
|
+
snapshot: PreflightReadSnapshot;
|
|
86
|
+
summary: {
|
|
87
|
+
current: SddResult<ActiveTaskResult>;
|
|
88
|
+
progress: {
|
|
89
|
+
total: number;
|
|
90
|
+
completed: number;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
active: ActiveTaskDetails | null;
|
|
94
|
+
}
|
|
95
|
+
export interface CompactCapture extends CompactCore {
|
|
96
|
+
assessment?: PreflightAssessment;
|
|
97
|
+
authority: string | null;
|
|
98
|
+
journal: CheckpointJournalReference | null;
|
|
99
|
+
records: EvidenceCheckpointRecord[];
|
|
100
|
+
}
|
|
101
|
+
export interface ExecutionDetailPage {
|
|
102
|
+
version: 1;
|
|
103
|
+
featureId: string;
|
|
104
|
+
snapshotSha256: string;
|
|
105
|
+
journalSnapshotSha256: string | null;
|
|
106
|
+
section: ExecutionDetailCursor['section'];
|
|
107
|
+
contentSha256: string;
|
|
108
|
+
totalBytes: number;
|
|
109
|
+
offset: number;
|
|
110
|
+
text: string;
|
|
111
|
+
nextCursor: ExecutionDetailCursor | null;
|
|
112
|
+
}
|
|
113
|
+
export interface EvidenceHistoryPage {
|
|
114
|
+
version: 1;
|
|
115
|
+
featureId: string;
|
|
116
|
+
snapshotSha256: string;
|
|
117
|
+
journal: CheckpointJournalReference | null;
|
|
118
|
+
records: EvidenceCheckpointRecord[];
|
|
119
|
+
nextCursor: EvidenceHistoryCursor | null;
|
|
120
|
+
}
|
|
121
|
+
export interface RelockTransition {
|
|
122
|
+
index: number;
|
|
123
|
+
kind: 'contract_change' | 'identical_contract_reseal' | 'legacy_unknown';
|
|
124
|
+
changedArtifacts: ('spec' | 'plan' | 'tasks')[];
|
|
125
|
+
reasonSha256: string;
|
|
126
|
+
recordSha256: string;
|
|
127
|
+
}
|
|
128
|
+
export interface ExecutionWindow {
|
|
129
|
+
version: 1;
|
|
130
|
+
featureId: string;
|
|
131
|
+
status: ResumeCheckpoint['status'];
|
|
132
|
+
progress: ResumeCheckpoint['progress'];
|
|
133
|
+
task: ResumeCheckpoint['task'];
|
|
134
|
+
snapshotSha256: string | null;
|
|
135
|
+
contract: ResumeCheckpoint['contract'];
|
|
136
|
+
candidate: ResumeCheckpoint['candidate'];
|
|
137
|
+
verification: {
|
|
138
|
+
readiness: ResumeCheckpoint['readiness'];
|
|
139
|
+
integration: ResumeCheckpoint['integration'];
|
|
140
|
+
nextAction: ResumeCheckpoint['nextAction'];
|
|
141
|
+
gateCounts: {
|
|
142
|
+
valid: number;
|
|
143
|
+
missing: number;
|
|
144
|
+
rejected: number;
|
|
145
|
+
};
|
|
146
|
+
blockerReasons: VerificationPreflight['blockers'][number]['reason'][];
|
|
147
|
+
};
|
|
148
|
+
scope: {
|
|
149
|
+
declaredEntries: number;
|
|
150
|
+
create: number;
|
|
151
|
+
modify: number;
|
|
152
|
+
delete: number;
|
|
153
|
+
readOnly: number;
|
|
154
|
+
manifestSha256: string;
|
|
155
|
+
writes: ExecutionDetailCursor | null;
|
|
156
|
+
reads: ExecutionDetailCursor | null;
|
|
157
|
+
} | null;
|
|
158
|
+
taskDetail: ExecutionDetailCursor | null;
|
|
159
|
+
verificationDetail: ExecutionDetailCursor | null;
|
|
160
|
+
delta: {
|
|
161
|
+
basis: 'none' | 'latest_recorded_checkpoint';
|
|
162
|
+
contract: DeltaState;
|
|
163
|
+
candidate: DeltaState;
|
|
164
|
+
observed: DeltaState;
|
|
165
|
+
pathDiff: 'unavailable';
|
|
166
|
+
};
|
|
167
|
+
journal: {
|
|
168
|
+
state: 'absent' | 'available';
|
|
169
|
+
count: number;
|
|
170
|
+
reference: CheckpointJournalReference | null;
|
|
171
|
+
last: {
|
|
172
|
+
seq: number;
|
|
173
|
+
recordSha256: string;
|
|
174
|
+
kind: CheckpointReported['kind'];
|
|
175
|
+
outcome: CheckpointReported['outcome'];
|
|
176
|
+
cause: CheckpointReported['cause'];
|
|
177
|
+
provenance: 'caller_reported';
|
|
178
|
+
certification: 'none';
|
|
179
|
+
} | null;
|
|
180
|
+
firstCursor: EvidenceHistoryCursor | null;
|
|
181
|
+
};
|
|
182
|
+
relocks: {
|
|
183
|
+
count: number;
|
|
184
|
+
firstCursor: RelockHistoryCursor | null;
|
|
185
|
+
latestTransition: RelockTransition | null;
|
|
186
|
+
} | null;
|
|
187
|
+
}
|
|
188
|
+
export type DeltaState = 'same' | 'changed' | 'unavailable';
|
|
189
|
+
export interface ScopeSections {
|
|
190
|
+
entries: {
|
|
191
|
+
path: string;
|
|
192
|
+
permission: FilePermission;
|
|
193
|
+
}[];
|
|
194
|
+
writes: {
|
|
195
|
+
path: string;
|
|
196
|
+
permission: FilePermission;
|
|
197
|
+
}[];
|
|
198
|
+
reads: {
|
|
199
|
+
path: string;
|
|
200
|
+
permission: FilePermission;
|
|
201
|
+
}[];
|
|
202
|
+
texts: Record<ExecutionDetailCursor['section'], string>;
|
|
203
|
+
}
|
|
204
|
+
export interface ExecutionReadContext {
|
|
205
|
+
tasksPath: string;
|
|
206
|
+
workspaceRoot: string;
|
|
207
|
+
capability: CheckpointCapability;
|
|
208
|
+
scopedPolicy?: ScopedPolicy;
|
|
209
|
+
signal?: AbortSignal;
|
|
210
|
+
}
|
|
211
|
+
export type ResumePresentation = Pick<ResumeCheckpoint, 'status' | 'task' | 'readiness' | 'integration' | 'blockers' | 'nextAction'>;
|
|
212
|
+
export type ResumeHistory = ResumeCheckpoint['history'];
|
|
213
|
+
export type SetupHost = 'claude' | 'cursor' | 'codex' | 'gemini';
|
|
214
|
+
export interface SetupRow {
|
|
215
|
+
host: SetupHost;
|
|
216
|
+
role: string;
|
|
217
|
+
path: string;
|
|
218
|
+
referenceVersion: string;
|
|
219
|
+
referenceSha256: string | null;
|
|
220
|
+
installedSha256: string | null;
|
|
221
|
+
installedVersion: 'unverified';
|
|
222
|
+
status: 'match' | 'missing' | 'different' | 'unreadable' | 'reference_unavailable';
|
|
223
|
+
cause: HostSkillReadCause | 'content_mismatch' | 'reference_unavailable' | null;
|
|
224
|
+
proposedAction: 'none' | 'create_on_authorized_setup' | 'replace_on_authorized_setup' | 'inspect_path' | 'inspect_installation';
|
|
225
|
+
}
|
|
226
|
+
export interface SetupDiagnostics {
|
|
227
|
+
version: 1;
|
|
228
|
+
server: {
|
|
229
|
+
version: string;
|
|
230
|
+
tools: readonly string[];
|
|
231
|
+
count: 9;
|
|
232
|
+
scope: 'server_registration';
|
|
233
|
+
};
|
|
234
|
+
client: {
|
|
235
|
+
name: string;
|
|
236
|
+
version: string;
|
|
237
|
+
source: 'initialize';
|
|
238
|
+
provenance: 'client_reported';
|
|
239
|
+
} | null;
|
|
240
|
+
clientMetadataCause?: 'unavailable' | 'invalid' | 'over_limit';
|
|
241
|
+
effectiveMcpCatalogue: 'unverified';
|
|
242
|
+
skillCatalogue: 'unverified';
|
|
243
|
+
bundledVersion: string;
|
|
244
|
+
baseline: 'available' | 'unavailable';
|
|
245
|
+
selectedHost: SetupHost | 'all';
|
|
246
|
+
hosts?: {
|
|
247
|
+
host: SetupHost;
|
|
248
|
+
expectedRoles: 9;
|
|
249
|
+
matched: number;
|
|
250
|
+
missing: number;
|
|
251
|
+
different: number;
|
|
252
|
+
unreadable: number;
|
|
253
|
+
nextAction: string;
|
|
254
|
+
}[];
|
|
255
|
+
rows?: SetupRow[];
|
|
256
|
+
setup: {
|
|
257
|
+
operation: 'sdd_init_workspace';
|
|
258
|
+
scope: 'project';
|
|
259
|
+
force: false;
|
|
260
|
+
existingCurrentAgents: 'preserve';
|
|
261
|
+
authorization: 'required_for_setup';
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
export interface HostScanTarget {
|
|
265
|
+
slug: string;
|
|
266
|
+
relative: string;
|
|
267
|
+
}
|
|
268
|
+
export interface HostScanRow extends HostScanTarget {
|
|
269
|
+
referenceSha256: string | null;
|
|
270
|
+
installedSha256: string | null;
|
|
271
|
+
read: HostSkillReadResult;
|
|
272
|
+
matches: boolean;
|
|
273
|
+
}
|
|
55
274
|
//# sourceMappingURL=resume-views.d.ts.map
|