@planu/cli 8.8.0 → 8.10.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 +14 -0
- package/README.md +9 -3
- package/dist/sdd-engine/canonical-tools.d.ts +38 -0
- package/dist/sdd-engine/canonical-tools.js +105 -2
- package/dist/sdd-engine/catalogue-presentation.d.ts +23 -0
- package/dist/sdd-engine/catalogue-presentation.js +123 -0
- package/dist/sdd-engine/client-workspace.d.ts +8 -1
- package/dist/sdd-engine/client-workspace.js +168 -1
- package/dist/sdd-engine/completion-snapshot.d.ts +2 -1
- package/dist/sdd-engine/completion-snapshot.js +81 -23
- package/dist/sdd-engine/contracts.d.ts +2 -24
- package/dist/sdd-engine/contracts.js +5 -19
- package/dist/sdd-engine/feature-authority.d.ts +3 -2
- package/dist/sdd-engine/feature-authority.js +29 -1
- package/dist/sdd-engine/host-rule-pack.js +16 -4
- package/dist/sdd-engine/host-skill-reader.d.ts +12 -11
- package/dist/sdd-engine/host-skill-reader.js +235 -225
- package/dist/sdd-engine/source-descriptor.d.ts +3 -0
- package/dist/sdd-engine/source-descriptor.js +356 -0
- package/dist/sdd-engine/tools/execution-tools.d.ts +2 -1
- package/dist/sdd-engine/tools/execution-tools.js +58 -33
- package/dist/sdd-engine/tools/feature-store.d.ts +6 -6
- package/dist/sdd-engine/tools/feature-store.js +188 -84
- package/dist/sdd-engine/tools/workspace-tools.d.ts +2 -1
- package/dist/sdd-engine/tools/workspace-tools.js +44 -35
- package/dist/sdd-engine/tools.js +4 -2
- package/dist/sdd-engine/workspace-init.d.ts +6 -0
- package/dist/sdd-engine/workspace-init.js +92 -2
- package/dist/sdd-engine/workspace-root.d.ts +33 -7
- package/dist/sdd-engine/workspace-root.js +222 -139
- package/dist/types/completion.d.ts +46 -2
- package/dist/types/resume-views.d.ts +36 -1
- package/dist/types/sdd-engine.d.ts +35 -61
- package/dist/types/verification.d.ts +59 -0
- package/package.json +2 -2
- 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/spec-executor.md +4 -0
|
@@ -97,4 +97,63 @@ export interface VerificationProcessEvidence {
|
|
|
97
97
|
readonly cleanupScope: 'owned_process_group';
|
|
98
98
|
readonly fixturePostconditions: 'unknown';
|
|
99
99
|
}
|
|
100
|
+
export type VerificationReceipt = Omit<VerificationEvidence, 'gates'> & {
|
|
101
|
+
gateId: string;
|
|
102
|
+
procedureSha256: string;
|
|
103
|
+
environmentSha256: string;
|
|
104
|
+
outcome: 'pass' | 'fail' | 'skipped' | 'partial';
|
|
105
|
+
evidenceSha256: string;
|
|
106
|
+
signature: string;
|
|
107
|
+
};
|
|
108
|
+
export type ReceiptRejectionReason = 'receipt_malformed' | 'receipt_missing' | 'receipt_duplicate' | 'receipt_unexpected' | 'receipt_invalid_signature' | 'receipt_context_mismatch' | 'receipt_candidate_mismatch' | 'receipt_observed_mismatch' | 'receipt_procedure_mismatch' | 'receipt_environment_mismatch' | 'receipt_non_pass';
|
|
109
|
+
export type ReceiptSetResult = {
|
|
110
|
+
ok: true;
|
|
111
|
+
gateCount: number;
|
|
112
|
+
receiptSetSha256: string;
|
|
113
|
+
} | {
|
|
114
|
+
ok: false;
|
|
115
|
+
reason: ReceiptRejectionReason;
|
|
116
|
+
gateId?: string;
|
|
117
|
+
};
|
|
118
|
+
export interface GateAssessment {
|
|
119
|
+
gateId: string;
|
|
120
|
+
state: 'receipt_valid' | 'receipt_missing' | 'receipt_rejected';
|
|
121
|
+
reason?: ReceiptRejectionReason;
|
|
122
|
+
}
|
|
123
|
+
export type PreflightBlockerReason = ReceiptRejectionReason | 'unlocked' | 'command_missing' | 'platform_unsupported' | 'receipt_input_unavailable' | 'receipt_observed_baseline_drift' | 'receipt_scoped_unsupported' | 'receipt_not_configured' | 'verification_policy_mismatch' | 'verification_policy_workspace_mismatch' | 'verification_state_unavailable' | 'verification_in_progress' | 'verification_grant_consumed' | 'verification_grant_quarantined';
|
|
124
|
+
interface PreflightBlocker {
|
|
125
|
+
reason: PreflightBlockerReason;
|
|
126
|
+
}
|
|
127
|
+
export type PreflightAction = 'fix_inputs' | 'review_observed_drift' | 'obtain_receipts' | 'use_supported_runtime' | 'review_lock' | 'review_verification_policy' | 'restore_verification' | 'attempt_integration' | 'none';
|
|
128
|
+
export interface VerificationPreflight {
|
|
129
|
+
budget?: VerificationBudgetDiagnostic;
|
|
130
|
+
version: 1;
|
|
131
|
+
taskId: string | null;
|
|
132
|
+
status: 'blocked' | 'ready_to_attempt' | 'not_applicable';
|
|
133
|
+
gates: GateAssessment[];
|
|
134
|
+
blockers: PreflightBlocker[];
|
|
135
|
+
integration: 'not_run';
|
|
136
|
+
nextAction: PreflightAction;
|
|
137
|
+
}
|
|
138
|
+
export interface ReceiptSetAssessment {
|
|
139
|
+
result: ReceiptSetResult;
|
|
140
|
+
gates: GateAssessment[];
|
|
141
|
+
blockers: PreflightBlocker[];
|
|
142
|
+
}
|
|
143
|
+
export interface VerificationGate {
|
|
144
|
+
id: string;
|
|
145
|
+
procedureSha256: string;
|
|
146
|
+
environmentSha256: string;
|
|
147
|
+
}
|
|
148
|
+
export interface VerificationEvidence {
|
|
149
|
+
version: 1;
|
|
150
|
+
featureId: string;
|
|
151
|
+
taskId: string;
|
|
152
|
+
workspaceSha256: string;
|
|
153
|
+
lockSha256: string;
|
|
154
|
+
candidateSha256: string;
|
|
155
|
+
observedSha256: string;
|
|
156
|
+
gates: readonly VerificationGate[];
|
|
157
|
+
}
|
|
158
|
+
export {};
|
|
100
159
|
//# sourceMappingURL=verification.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planu/cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.10.0",
|
|
4
4
|
"description": "Planu — MCP server for Spec Driven Development. Planning and file operations on macOS/Linux/Windows; automated verification requires macOS/Linux (POSIX).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@types/node": "^22.20.5",
|
|
80
80
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
81
81
|
"@vitest/coverage-v8": "^5.1.0",
|
|
82
|
-
"eslint": "10.
|
|
82
|
+
"eslint": "10.15.0",
|
|
83
83
|
"eslint-config-prettier": "^10.1.8",
|
|
84
84
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
85
85
|
"eslint-plugin-import": "^2.32.0",
|
package/templates/AGENTS.md
CHANGED
|
@@ -11,6 +11,10 @@ After the local client has registered the MCP server and the intended project is
|
|
|
11
11
|
|
|
12
12
|
## Read-only diagnostics
|
|
13
13
|
|
|
14
|
+
For an opt-in feature catalogue, first require `engineCapabilities.version=1`, `views.sdd_list_features` containing `catalogue`, and `observations.featureCatalogue=1` in setup diagnostics. Request `view="catalogue"` and follow each non-null `nextCursor` on the same server, repeating query, status and page size. Each compact response is at most 8192 UTF-8 bytes and each capture stage runs at most eight feature readers concurrently; a complete scan still reads all eligible inputs, so total I/O is not bounded. The cursor grants no permission or certification.
|
|
15
|
+
|
|
16
|
+
For an opt-in bounded source read, first require `engineCapabilities.version=1`, `views.sdd_read_file_slice` containing `bounded`, and `observations.sourceSlice=1` in setup diagnostics. Treat an absent or unknown descriptor version or capability value as unsupported; do not probe a mutation. Use `sdd_read_file_slice` with `view="bounded"` and the required path and line range. Follow a non-null `nextCursor` read-only on the same server instance, repeating the same normalized path and range; the cursor is bound to that server, root, request and physical snapshot. Stop when `nextCursor` is null. The physical snapshot digest is not a content checksum. A same-UID replacement after the last filesystem check is not transactionally excluded. This view and its cursor grant no permission, retry authority or verification time. The default legacy read remains unchanged.
|
|
17
|
+
|
|
14
18
|
Use `sdd_list_features.hostSkills` to identify fixed installed role paths, causes and the bundled reference version. `catalog` stays `unverified` even when files match. An unavailable baseline requires inspecting the installation; unsafe paths require inspection before authorized setup. Project setup and client catalogue reload are explicit, separate actions.
|
|
15
19
|
|
|
16
20
|
For a rejected `sdd_lock_spec`, inspect `error.details.issues` for artifact, stable rule and optional 1-based original source line. Missing or ambiguous locations omit the line. Existing rejection codes and legacy details remain authoritative; rejection writes no lock. Do not automatically relock.
|
|
@@ -10,6 +10,10 @@ After the local client has registered the MCP server and the intended project is
|
|
|
10
10
|
|
|
11
11
|
## Read-only diagnostics
|
|
12
12
|
|
|
13
|
+
For an opt-in feature catalogue, first require `engineCapabilities.version=1`, `views.sdd_list_features` containing `catalogue`, and `observations.featureCatalogue=1` in setup diagnostics. Request `view="catalogue"` and follow each non-null `nextCursor` on the same server, repeating query, status and page size. Each compact response is at most 8192 UTF-8 bytes and each capture stage runs at most eight feature readers concurrently; a complete scan still reads all eligible inputs, so total I/O is not bounded. The cursor grants no permission or certification.
|
|
14
|
+
|
|
15
|
+
For an opt-in bounded source read, first require `engineCapabilities.version=1`, `views.sdd_read_file_slice` containing `bounded`, and `observations.sourceSlice=1` in setup diagnostics. Treat an absent or unknown descriptor version or capability value as unsupported; do not probe a mutation. Use `sdd_read_file_slice` with `view="bounded"` and the required path and line range. Follow a non-null `nextCursor` read-only on the same server instance, repeating the same normalized path and range; the cursor is bound to that server, root, request and physical snapshot. Stop when `nextCursor` is null. The physical snapshot digest is not a content checksum. A same-UID replacement after the last filesystem check is not transactionally excluded. This view and its cursor grant no permission, retry authority or verification time. The default legacy read remains unchanged.
|
|
16
|
+
|
|
13
17
|
Use `sdd_list_features.hostSkills` to identify fixed installed role paths, causes and the bundled reference version. `catalog` stays `unverified` even when files match. An unavailable baseline requires inspecting the installation; unsafe paths require inspection before authorized setup. Project setup and client catalogue reload are explicit, separate actions.
|
|
14
18
|
|
|
15
19
|
For a rejected `sdd_lock_spec`, inspect `error.details.issues` for artifact, stable rule and optional 1-based original source line. Missing or ambiguous locations omit the line. Existing rejection codes and legacy details remain authoritative; rejection writes no lock. Do not automatically relock.
|
|
@@ -54,6 +54,10 @@ Preflight never edits product files and never marks tasks complete.
|
|
|
54
54
|
|
|
55
55
|
## Connection and read-only views
|
|
56
56
|
|
|
57
|
+
For an opt-in feature catalogue, first require `engineCapabilities.version=1`, `views.sdd_list_features` containing `catalogue`, and `observations.featureCatalogue=1` in setup diagnostics. Request `view="catalogue"` and follow each non-null `nextCursor` on the same server, repeating query, status and page size. Each compact response is at most 8192 UTF-8 bytes and each capture stage runs at most eight feature readers concurrently; a complete scan still reads all eligible inputs, so total I/O is not bounded. The cursor grants no permission or certification.
|
|
58
|
+
|
|
59
|
+
For an opt-in bounded source read, first require `engineCapabilities.version=1`, `views.sdd_read_file_slice` containing `bounded`, and `observations.sourceSlice=1` in setup diagnostics. Treat an absent or unknown descriptor version or capability value as unsupported; do not probe a mutation. Use `sdd_read_file_slice` with `view="bounded"` and the required path and line range. Follow a non-null `nextCursor` read-only on the same server instance, repeating the same normalized path and range; the cursor is bound to that server, root, request and physical snapshot. Stop when `nextCursor` is null. The physical snapshot digest is not a content checksum. A same-UID replacement after the last filesystem check is not transactionally excluded. This view and its cursor grant no permission, retry authority or verification time. The default legacy read remains unchanged.
|
|
60
|
+
|
|
57
61
|
For supported connections, inspect `sdd_list_features` with `view="setup_diagnostics"` and an optional fixed `host`; server registration, installed file hashes and client-reported identity do not prove the host-effective catalogue. Reload the client catalogue only when needed. For a locked task use `execution_window`, follow its `execution_detail` cursors and `evidence_history` pages; reread the window when a cursor is stale. These views are non-certifying. Explicitly record an already observed attempt with `sdd_lock_spec(operation="evidence_checkpoint")` only after inspecting the selected connection’s advertised input schema for `operation`, `checkpoint` and `task_id` and confirming a supporting engine version. The global 8.5.1 server does not gain new inputs from source edits: never probe an unknown mutation, or fall back to lock/relock, because old schemas may strip fields and seal instead. Report unsupported capability. The journal retains only explicitly recorded observations; failures are not recorded automatically. Its caller-reported outcome is not certification; the server captures identity and eligible digests. Preserve uncertain guards for operator review.
|
|
58
62
|
|
|
59
63
|
## Outcome
|
|
@@ -37,6 +37,10 @@ You do not make architectural decisions, you do not add dependencies, and you do
|
|
|
37
37
|
|
|
38
38
|
## Evidence and current connection
|
|
39
39
|
|
|
40
|
+
For an opt-in feature catalogue, first require `engineCapabilities.version=1`, `views.sdd_list_features` containing `catalogue`, and `observations.featureCatalogue=1` in setup diagnostics. Request `view="catalogue"` and follow each non-null `nextCursor` on the same server, repeating query, status and page size. Each compact response is at most 8192 UTF-8 bytes and each capture stage runs at most eight feature readers concurrently; a complete scan still reads all eligible inputs, so total I/O is not bounded. The cursor grants no permission or certification.
|
|
41
|
+
|
|
42
|
+
For an opt-in bounded source read, first require `engineCapabilities.version=1`, `views.sdd_read_file_slice` containing `bounded`, and `observations.sourceSlice=1` in setup diagnostics. Treat an absent or unknown descriptor version or capability value as unsupported; do not probe a mutation. Use `sdd_read_file_slice` with `view="bounded"` and the required path and line range. Follow a non-null `nextCursor` read-only on the same server instance, repeating the same normalized path and range; the cursor is bound to that server, root, request and physical snapshot. Stop when `nextCursor` is null. The physical snapshot digest is not a content checksum. A same-UID replacement after the last filesystem check is not transactionally excluded. This view and its cursor grant no permission, retry authority or verification time. The default legacy read remains unchanged.
|
|
43
|
+
|
|
40
44
|
For supported connections, inspect `sdd_list_features` with `view="setup_diagnostics"` and an optional fixed `host`; server registration, installed file hashes and client-reported identity do not prove the host-effective catalogue. Reload the client catalogue only when needed. For a locked task use `execution_window`, follow its `execution_detail` cursors and `evidence_history` pages; reread the window when a cursor is stale. These views are non-certifying. Explicitly record an already observed attempt with `sdd_lock_spec(operation="evidence_checkpoint")` only after inspecting the selected connection’s advertised input schema for `operation`, `checkpoint` and `task_id` and confirming a supporting engine version. The global 8.5.1 server does not gain new inputs from source edits: never probe an unknown mutation, or fall back to lock/relock, because old schemas may strip fields and seal instead. Report unsupported capability. The journal retains only explicitly recorded observations; failures are not recorded automatically. Its caller-reported outcome is not certification; the server captures identity and eligible digests. Preserve uncertain guards for operator review.
|
|
41
45
|
|
|
42
46
|
Display evidence separately: optional smoke is caller-reported and never gate coverage; each required gate needs a valid matching PASS receipt; missing evidence, skipped/partial observations or unavailable inputs are pending; challenge mismatches (workspace, feature, task, lock, candidate, observed input, procedure or environment) and signature, shape or coverage failures are stale/rejected. Receipt v1 has no TTL. Even valid receipts require fresh integration; `ready_to_attempt` permits an attempt only. Obtain signed receipts from the operator-controlled issuer. Do not grant budgets, edit authority or treat the journal as a certificate.
|