@planu/cli 8.9.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 +7 -0
- package/README.md +4 -2
- package/dist/sdd-engine/canonical-tools.d.ts +13 -1
- package/dist/sdd-engine/canonical-tools.js +76 -3
- package/dist/sdd-engine/catalogue-presentation.d.ts +23 -0
- package/dist/sdd-engine/catalogue-presentation.js +123 -0
- 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 +1 -1
- package/dist/sdd-engine/contracts.js +4 -1
- 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 +12 -2
- package/dist/sdd-engine/source-descriptor.d.ts +2 -2
- package/dist/sdd-engine/source-descriptor.js +38 -14
- 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 +1 -1
- package/dist/sdd-engine/tools/workspace-tools.js +43 -34
- 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 +3 -3
- package/dist/sdd-engine/workspace-root.js +23 -5
- package/dist/types/completion.d.ts +27 -1
- package/dist/types/resume-views.d.ts +15 -1
- package/dist/types/sdd-engine.d.ts +12 -1
- package/package.json +2 -2
- package/templates/AGENTS.md +2 -0
- package/templates/host/planu-sdd.md +2 -0
- package/templates/skills/preflight-guardian.md +2 -0
- package/templates/skills/spec-executor.md +2 -0
|
@@ -17,7 +17,9 @@ function missing(error) {
|
|
|
17
17
|
return error instanceof Error && 'code' in error && error.code === 'ENOENT';
|
|
18
18
|
}
|
|
19
19
|
function unsafe(relative, code = 'EINVAL') {
|
|
20
|
-
return Object.assign(new Error(`Unsafe initialization path: ${relative}`), {
|
|
20
|
+
return Object.assign(new Error(`Unsafe initialization path: ${relative}`), {
|
|
21
|
+
code,
|
|
22
|
+
});
|
|
21
23
|
}
|
|
22
24
|
function containedPath(root, relative) {
|
|
23
25
|
const contained = path.relative(root, path.resolve(root, relative));
|
|
@@ -91,7 +93,10 @@ async function readTemplates() {
|
|
|
91
93
|
}
|
|
92
94
|
const templates = [];
|
|
93
95
|
for (const name of names) {
|
|
94
|
-
templates.push({
|
|
96
|
+
templates.push({
|
|
97
|
+
name,
|
|
98
|
+
content: await readRegular(path.join(packageRoot, source, name)),
|
|
99
|
+
});
|
|
95
100
|
}
|
|
96
101
|
for (const relative of [
|
|
97
102
|
'templates/AGENTS.md',
|
|
@@ -194,4 +199,89 @@ export async function prepareProjectInitialization(workspaceRoot) {
|
|
|
194
199
|
}
|
|
195
200
|
};
|
|
196
201
|
}
|
|
202
|
+
export async function createExplicitFeatureDirectory(featDir, featureId) {
|
|
203
|
+
try {
|
|
204
|
+
await fs.mkdir(featDir);
|
|
205
|
+
return null;
|
|
206
|
+
}
|
|
207
|
+
catch (err) {
|
|
208
|
+
if (isNodeErrorCode(err, 'EEXIST')) {
|
|
209
|
+
return {
|
|
210
|
+
success: false,
|
|
211
|
+
error: {
|
|
212
|
+
code: 'ERR_FEATURE_ALREADY_EXISTS',
|
|
213
|
+
message: `Feature '${featureId}' already exists in the workspace.`,
|
|
214
|
+
trigger: 'sdd_create_feature',
|
|
215
|
+
},
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
throw err;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
export async function reserveAutomaticFeatureDirectory(featuresDir, title) {
|
|
222
|
+
const entries = await fs.readdir(featuresDir, { withFileTypes: true });
|
|
223
|
+
const featureNames = entries
|
|
224
|
+
.filter((entry) => entry.isDirectory() && /^FEAT[-_]/u.test(entry.name))
|
|
225
|
+
.map((entry) => entry.name);
|
|
226
|
+
const allocatedSequences = entries.flatMap((entry) => {
|
|
227
|
+
if (!entry.isDirectory()) {
|
|
228
|
+
return [];
|
|
229
|
+
}
|
|
230
|
+
const sequence = /^FEAT[-_](\d+)(?:[-_]|$)/u.exec(entry.name)?.[1] ??
|
|
231
|
+
/^\.FEAT-(\d+)\.reserve$/u.exec(entry.name)?.[1];
|
|
232
|
+
return sequence ? [Number(sequence)] : [];
|
|
233
|
+
});
|
|
234
|
+
const highestSequence = Math.max(0, ...allocatedSequences);
|
|
235
|
+
let nextSequence = Math.max(highestSequence + 1, featureNames.length + 1);
|
|
236
|
+
const slug = createFeatureSlug(title);
|
|
237
|
+
for (;;) {
|
|
238
|
+
const sequenceLabel = String(nextSequence).padStart(4, '0');
|
|
239
|
+
const reservationDir = path.join(featuresDir, `.FEAT-${sequenceLabel}.reserve`);
|
|
240
|
+
try {
|
|
241
|
+
await fs.mkdir(reservationDir);
|
|
242
|
+
}
|
|
243
|
+
catch (err) {
|
|
244
|
+
if (!isNodeErrorCode(err, 'EEXIST')) {
|
|
245
|
+
throw err;
|
|
246
|
+
}
|
|
247
|
+
nextSequence += 1;
|
|
248
|
+
continue;
|
|
249
|
+
}
|
|
250
|
+
const featureId = `FEAT-${sequenceLabel}-${slug}`;
|
|
251
|
+
const featDir = path.join(featuresDir, featureId);
|
|
252
|
+
try {
|
|
253
|
+
await fs.mkdir(featDir);
|
|
254
|
+
}
|
|
255
|
+
catch (err) {
|
|
256
|
+
await fs.rm(reservationDir, { recursive: true, force: true });
|
|
257
|
+
if (isNodeErrorCode(err, 'EEXIST')) {
|
|
258
|
+
nextSequence += 1;
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
throw err;
|
|
262
|
+
}
|
|
263
|
+
try {
|
|
264
|
+
await fs.rm(reservationDir, { recursive: true, force: false });
|
|
265
|
+
}
|
|
266
|
+
catch (err) {
|
|
267
|
+
await fs.rm(featDir, { recursive: true, force: true });
|
|
268
|
+
throw err;
|
|
269
|
+
}
|
|
270
|
+
return { featureId, featDir };
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
function createFeatureSlug(title) {
|
|
274
|
+
const slug = title
|
|
275
|
+
.normalize('NFKD')
|
|
276
|
+
.replace(/[\u0300-\u036f]/gu, '')
|
|
277
|
+
.toUpperCase()
|
|
278
|
+
.replace(/[^A-Z0-9]+/gu, '-')
|
|
279
|
+
.replace(/^-+|-+$/gu, '')
|
|
280
|
+
.slice(0, 48)
|
|
281
|
+
.replace(/-+$/gu, '');
|
|
282
|
+
return slug || 'FEATURE';
|
|
283
|
+
}
|
|
284
|
+
function isNodeErrorCode(err, code) {
|
|
285
|
+
return typeof err === 'object' && err !== null && 'code' in err && err.code === code;
|
|
286
|
+
}
|
|
197
287
|
//# sourceMappingURL=workspace-init.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as Models from '../types/resume-views.js';
|
|
2
2
|
import type * as Engine from '../types/sdd-engine.js';
|
|
3
3
|
import type * as Completion from '../types/completion.js';
|
|
4
|
-
import type { SourceCursorPayload } from '../types/resume-views.js';
|
|
4
|
+
import type { ReadCursorPayload, SourceCursorPayload } from '../types/resume-views.js';
|
|
5
5
|
import type { HostSkillReadResult } from '../types/sdd-engine.js';
|
|
6
6
|
export { withSourceDescriptor } from './source-descriptor.js';
|
|
7
7
|
export declare function readTextInsideWorkspace(workspaceRoot: string, absolutePath: string, options?: {
|
|
@@ -20,8 +20,8 @@ export declare function readTextInsideWorkspaceDetailed(workspaceRoot: string, a
|
|
|
20
20
|
export declare function sourceRequestSha256(path: string, startLine: number, endLine: number): string;
|
|
21
21
|
export declare class ReadCursorCodec {
|
|
22
22
|
#private;
|
|
23
|
-
encode(payload:
|
|
24
|
-
decode(token: unknown):
|
|
23
|
+
encode(payload: ReadCursorPayload): string;
|
|
24
|
+
decode(token: unknown): ReadCursorPayload | null;
|
|
25
25
|
}
|
|
26
26
|
declare const failures: {
|
|
27
27
|
readonly slice_input_invalid: readonly ["ERR_INVALID_SLICE", "fix_inputs"];
|
|
@@ -159,6 +159,20 @@ function isSourceCursorPayload(value) {
|
|
|
159
159
|
}
|
|
160
160
|
return (line - 1 <= consumed && offset <= consumed - (line - 1) && (line !== 1 || offset === consumed));
|
|
161
161
|
}
|
|
162
|
+
function isCatalogueCursorPayload(value) {
|
|
163
|
+
if (!Array.isArray(value) || value.length !== 6) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
const [domain, kind, root, request, snapshot, lastId] = value;
|
|
167
|
+
return (domain === sourceCursorDomain &&
|
|
168
|
+
kind === 'catalogue' &&
|
|
169
|
+
[root, request, snapshot].every((hash) => typeof hash === 'string' && cursorHashPattern.test(hash)) &&
|
|
170
|
+
typeof lastId === 'string' &&
|
|
171
|
+
/^FEAT[-_][A-Z0-9_-]{1,123}$/u.test(lastId));
|
|
172
|
+
}
|
|
173
|
+
function isReadCursorPayload(value) {
|
|
174
|
+
return isSourceCursorPayload(value) || isCatalogueCursorPayload(value);
|
|
175
|
+
}
|
|
162
176
|
export function sourceRequestSha256(path, startLine, endLine) {
|
|
163
177
|
return createHash('sha256')
|
|
164
178
|
.update(JSON.stringify([sourceCursorDomain, 'source', path, startLine, endLine]))
|
|
@@ -167,7 +181,7 @@ export function sourceRequestSha256(path, startLine, endLine) {
|
|
|
167
181
|
export class ReadCursorCodec {
|
|
168
182
|
#key = randomBytes(32);
|
|
169
183
|
encode(payload) {
|
|
170
|
-
if (!
|
|
184
|
+
if (!isReadCursorPayload(payload)) {
|
|
171
185
|
throw new TypeError('Invalid source cursor payload');
|
|
172
186
|
}
|
|
173
187
|
const mac = createHmac('sha256', this.#key).update(JSON.stringify(payload)).digest('base64url');
|
|
@@ -186,13 +200,16 @@ export class ReadCursorCodec {
|
|
|
186
200
|
if (bytes.toString('base64url') !== token) {
|
|
187
201
|
return null;
|
|
188
202
|
}
|
|
189
|
-
const json = new TextDecoder('utf-8', {
|
|
203
|
+
const json = new TextDecoder('utf-8', {
|
|
204
|
+
fatal: true,
|
|
205
|
+
ignoreBOM: true,
|
|
206
|
+
}).decode(bytes);
|
|
190
207
|
const envelope = JSON.parse(json);
|
|
191
208
|
if (!Array.isArray(envelope) || envelope.length !== 2 || JSON.stringify(envelope) !== json) {
|
|
192
209
|
return null;
|
|
193
210
|
}
|
|
194
211
|
const [payload, mac] = envelope;
|
|
195
|
-
if (!
|
|
212
|
+
if (!isReadCursorPayload(payload) ||
|
|
196
213
|
typeof mac !== 'string' ||
|
|
197
214
|
!cursorBase64Pattern.test(mac)) {
|
|
198
215
|
return null;
|
|
@@ -294,9 +311,10 @@ export function initialPosition(cursor, snapshot, input) {
|
|
|
294
311
|
export function requestCursor(input, path, codec) {
|
|
295
312
|
const cursor = input.cursor === undefined ? null : codec.decode(input.cursor);
|
|
296
313
|
if (input.cursor !== undefined &&
|
|
297
|
-
cursor?.[
|
|
314
|
+
(cursor?.[1] !== 'source' ||
|
|
315
|
+
cursor[3] !== sourceRequestSha256(path, input.start_line, input.end_line))) {
|
|
298
316
|
return undefined;
|
|
299
317
|
}
|
|
300
|
-
return cursor;
|
|
318
|
+
return cursor?.[1] === 'source' ? cursor : null;
|
|
301
319
|
}
|
|
302
320
|
//# sourceMappingURL=workspace-root.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { KeyObject } from 'node:crypto';
|
|
2
2
|
import type { BigIntStats } from 'node:fs';
|
|
3
|
-
import type { HostSkillReadCause, SddLockFile, ErrorCode, TrinityIssue, FilePermission, SddResult, CompleteTaskResult, CheckpointJournalReference } from './sdd-engine.js';
|
|
3
|
+
import type { HostSkillReadCause, FeatureSummary, SddLockFile, ErrorCode, TrinityIssue, FilePermission, SddResult, CompleteTaskResult, CheckpointJournalReference } from './sdd-engine.js';
|
|
4
4
|
import type { VerificationGate, VerificationReceipt, VerificationPreflight, ScopedVerificationSnapshot, ScopedTaskSelector, ScopedTaskSelection, VerificationBudgetDiagnostic } from './verification.js';
|
|
5
5
|
export type CompletionFailureReason = 'guard_present' | 'contract_drift' | 'cancelled' | 'persistence_uncertain';
|
|
6
6
|
export interface PhysicalIdentity {
|
|
@@ -278,5 +278,31 @@ export type SourceDescriptorResult<T> = {
|
|
|
278
278
|
ok: false;
|
|
279
279
|
cause: SourceDescriptorFailure;
|
|
280
280
|
};
|
|
281
|
+
export interface CatalogueFileCapture {
|
|
282
|
+
rootIdentitySha256: string;
|
|
283
|
+
content: string;
|
|
284
|
+
rawSha256: string;
|
|
285
|
+
descriptor: string;
|
|
286
|
+
}
|
|
287
|
+
export interface CatalogueArtifactCapture {
|
|
288
|
+
directories: AuthorityDirectory[];
|
|
289
|
+
tasks: CatalogueFileCapture;
|
|
290
|
+
lock: CatalogueFileCapture | null;
|
|
291
|
+
}
|
|
292
|
+
export type CatalogueError = 'catalogue_input_invalid' | 'catalogue_cursor_invalid' | 'catalogue_cursor_stale' | 'catalogue_identifier_invalid' | 'catalogue_response_too_large' | 'catalogue_unavailable' | 'catalogue_path_unsafe' | 'catalogue_capability_unavailable' | 'guard_present' | 'persistence_uncertain' | 'cancelled';
|
|
293
|
+
export type DescriptorProfile = 'source' | 'catalogue' | number;
|
|
294
|
+
export interface CatalogueHead {
|
|
295
|
+
root: string;
|
|
296
|
+
rootHash: string;
|
|
297
|
+
identity: string[];
|
|
298
|
+
sddIdentity: string[] | null;
|
|
299
|
+
featuresIdentity: string[] | null;
|
|
300
|
+
features: string;
|
|
301
|
+
names: string[];
|
|
302
|
+
}
|
|
303
|
+
export interface CatalogueSnapshot {
|
|
304
|
+
entries: FeatureSummary[];
|
|
305
|
+
digest: string;
|
|
306
|
+
}
|
|
281
307
|
export {};
|
|
282
308
|
//# sourceMappingURL=completion.d.ts.map
|
|
@@ -233,7 +233,7 @@ export interface EngineCapabilitiesV1 {
|
|
|
233
233
|
'sdd_get_active_task'
|
|
234
234
|
];
|
|
235
235
|
readonly views: {
|
|
236
|
-
readonly sdd_list_features: readonly ['setup_diagnostics'];
|
|
236
|
+
readonly sdd_list_features: readonly ['setup_diagnostics', 'catalogue'];
|
|
237
237
|
readonly sdd_read_file_slice?: readonly ['bounded'];
|
|
238
238
|
readonly sdd_get_active_task: readonly [
|
|
239
239
|
'verification_preflight',
|
|
@@ -248,6 +248,7 @@ export interface EngineCapabilitiesV1 {
|
|
|
248
248
|
readonly sdd_lock_spec: readonly ['lock', 'evidence_checkpoint'];
|
|
249
249
|
};
|
|
250
250
|
readonly observations: {
|
|
251
|
+
readonly featureCatalogue: 1;
|
|
251
252
|
readonly sourceSlice?: 1;
|
|
252
253
|
readonly setupDiagnostics: 1;
|
|
253
254
|
readonly verificationPreflight: 1;
|
|
@@ -261,6 +262,10 @@ export interface EngineCapabilitiesV1 {
|
|
|
261
262
|
readonly verificationProcess: 1;
|
|
262
263
|
};
|
|
263
264
|
readonly limits: {
|
|
265
|
+
readonly featureCataloguePageSizeDefault: 16;
|
|
266
|
+
readonly featureCataloguePageSizeMax: 32;
|
|
267
|
+
readonly featureCatalogueQueryBytes: 128;
|
|
268
|
+
readonly featureCatalogueCursorCharacters: 1024;
|
|
264
269
|
readonly sourceSliceBytes?: 65536;
|
|
265
270
|
readonly sourceSliceReadCalls?: 64;
|
|
266
271
|
readonly sourceSliceLines?: 200;
|
|
@@ -333,4 +338,13 @@ export type SourceCursorPayload = [
|
|
|
333
338
|
line: number,
|
|
334
339
|
lineOffsetBytes: number
|
|
335
340
|
];
|
|
341
|
+
export type CatalogueCursorPayload = [
|
|
342
|
+
domain: 'planu.read-cursor.v1',
|
|
343
|
+
kind: 'catalogue',
|
|
344
|
+
rootIdentitySha256: string,
|
|
345
|
+
requestSha256: string,
|
|
346
|
+
snapshotSha256: string,
|
|
347
|
+
lastId: string
|
|
348
|
+
];
|
|
349
|
+
export type ReadCursorPayload = SourceCursorPayload | CatalogueCursorPayload;
|
|
336
350
|
//# sourceMappingURL=resume-views.d.ts.map
|
|
@@ -40,7 +40,10 @@ export interface InitWorkspaceInput {
|
|
|
40
40
|
}
|
|
41
41
|
export interface ListFeaturesInput {
|
|
42
42
|
status_filter?: 'all' | 'planning' | 'executing' | 'done';
|
|
43
|
-
view?: 'setup_diagnostics';
|
|
43
|
+
view?: 'setup_diagnostics' | 'catalogue';
|
|
44
|
+
query?: string;
|
|
45
|
+
page_size?: number;
|
|
46
|
+
cursor?: string;
|
|
44
47
|
host?: 'all' | 'claude' | 'cursor' | 'codex' | 'gemini';
|
|
45
48
|
}
|
|
46
49
|
export interface CreateFeatureInput {
|
|
@@ -189,6 +192,14 @@ export interface CompleteTaskResult {
|
|
|
189
192
|
receiptSetSha256: string;
|
|
190
193
|
};
|
|
191
194
|
}
|
|
195
|
+
export interface CataloguePageV1 {
|
|
196
|
+
version: 1;
|
|
197
|
+
snapshotSha256: string;
|
|
198
|
+
total: number;
|
|
199
|
+
offset: number;
|
|
200
|
+
entries: FeatureSummary[];
|
|
201
|
+
nextCursor: string | null;
|
|
202
|
+
}
|
|
192
203
|
export interface FeatureSummary {
|
|
193
204
|
id: string;
|
|
194
205
|
status: 'planning' | 'executing' | 'done';
|
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,8 @@ 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
|
+
|
|
14
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.
|
|
15
17
|
|
|
16
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.
|
|
@@ -10,6 +10,8 @@ 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
|
+
|
|
13
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.
|
|
14
16
|
|
|
15
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.
|
|
@@ -54,6 +54,8 @@ 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
|
+
|
|
57
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.
|
|
58
60
|
|
|
59
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.
|
|
@@ -37,6 +37,8 @@ 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
|
+
|
|
40
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.
|
|
41
43
|
|
|
42
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.
|