@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
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import * as fs from 'node:fs/promises';
|
|
2
|
+
import { createHash } from 'node:crypto';
|
|
2
3
|
import * as path from 'node:path';
|
|
3
4
|
import { activeTaskFromContent, markTaskVerified, remainingTaskCount, summarizeEvidence, } from './task-content.js';
|
|
4
5
|
import { completionFailure, taskOutOfSequence } from './task-failures.js';
|
|
5
|
-
import { CompletionGuardError, captureDirectories, lastAuthorityDirectory, checkWritable, guardFailure, hashArtifact, readArtifact, revalidateDirectories, rewriteArtifact, sameIdentity, } from './feature-authority.js';
|
|
6
|
+
import { CompletionGuardError, captureDirectories, lastAuthorityDirectory, checkWritable, guardFailure, hashArtifact, readArtifact, revalidateDirectories, rewriteArtifact, sameIdentity, validateSnapshotLock, } from './feature-authority.js';
|
|
6
7
|
import { assertCatalogueAvailable } from './completion-guard.js';
|
|
8
|
+
import { withSourceDescriptor } from './source-descriptor.js';
|
|
9
|
+
import { CatalogueReadError } from './catalogue-presentation.js';
|
|
7
10
|
/** Catalogue reads need task status and lock presence, not an execution readiness card. */
|
|
8
11
|
export async function readCatalogueArtifacts(featDir) {
|
|
9
12
|
const directories = await captureDirectories(featDir);
|
|
@@ -27,6 +30,83 @@ export async function readCatalogueArtifacts(featDir) {
|
|
|
27
30
|
await revalidateDirectories(directories);
|
|
28
31
|
return { tasksContent: tasks.content, locked };
|
|
29
32
|
}
|
|
33
|
+
function catalogueCheck(signal) {
|
|
34
|
+
if (signal?.aborted) {
|
|
35
|
+
guardFailure('cancelled', 'Catalogue read cancelled.');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
async function catalogueFile(root, local, signal) {
|
|
39
|
+
const digest = createHash('sha256');
|
|
40
|
+
const decoder = new TextDecoder('utf-8', { fatal: true, ignoreBOM: true });
|
|
41
|
+
let content = '';
|
|
42
|
+
const result = await withSourceDescriptor(root, local, async (context) => {
|
|
43
|
+
let offset = 0;
|
|
44
|
+
while (offset < context.snapshot.size) {
|
|
45
|
+
const bytes = await context.read(offset, Math.min(4096, context.snapshot.size - offset));
|
|
46
|
+
digest.update(bytes);
|
|
47
|
+
content += decoder.decode(bytes, { stream: true });
|
|
48
|
+
offset += bytes.byteLength;
|
|
49
|
+
}
|
|
50
|
+
content += decoder.decode();
|
|
51
|
+
return {
|
|
52
|
+
content,
|
|
53
|
+
rootIdentitySha256: context.snapshot.rootIdentitySha256,
|
|
54
|
+
rawSha256: digest.digest('hex'),
|
|
55
|
+
descriptor: context.snapshot.snapshotSha256,
|
|
56
|
+
};
|
|
57
|
+
}, 'catalogue', signal);
|
|
58
|
+
if (!result.ok) {
|
|
59
|
+
if (result.cause === 'capability_unavailable') {
|
|
60
|
+
throw new CatalogueReadError('catalogue_capability_unavailable');
|
|
61
|
+
}
|
|
62
|
+
if (result.cause === 'cancelled') {
|
|
63
|
+
guardFailure('cancelled', 'Catalogue read cancelled.');
|
|
64
|
+
}
|
|
65
|
+
if (result.cause === 'unstable') {
|
|
66
|
+
guardFailure('contract_drift', 'Catalogue file changed.', 'ERR_SPEC_DRIFT');
|
|
67
|
+
}
|
|
68
|
+
guardFailure('contract_drift', 'Catalogue file unavailable.', result.cause === 'unsafe_path' ? 'ERR_PERMISSION_VIOLATION' : 'ERR_INVALID_ARTIFACT');
|
|
69
|
+
}
|
|
70
|
+
return result.value;
|
|
71
|
+
}
|
|
72
|
+
async function catalogueLockPresent(feature) {
|
|
73
|
+
try {
|
|
74
|
+
await fs.lstat(path.join(feature, '.lock'));
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
if (error.code === 'ENOENT') {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
throw error;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export async function captureCatalogueArtifacts(featDir, workspaceRoot, signal) {
|
|
85
|
+
catalogueCheck(signal);
|
|
86
|
+
const directories = await captureDirectories(featDir, workspaceRoot);
|
|
87
|
+
catalogueCheck(signal);
|
|
88
|
+
const feature = lastAuthorityDirectory(directories);
|
|
89
|
+
await assertCatalogueAvailable(feature);
|
|
90
|
+
catalogueCheck(signal);
|
|
91
|
+
const local = (name) => path.relative(workspaceRoot, path.join(feature.directory, name));
|
|
92
|
+
const tasks = await catalogueFile(workspaceRoot, local('tasks.md'), signal);
|
|
93
|
+
catalogueCheck(signal);
|
|
94
|
+
const present = await catalogueLockPresent(feature.directory);
|
|
95
|
+
catalogueCheck(signal);
|
|
96
|
+
const lock = present ? await catalogueFile(workspaceRoot, local('.lock'), signal) : null;
|
|
97
|
+
catalogueCheck(signal);
|
|
98
|
+
await assertCatalogueAvailable(feature);
|
|
99
|
+
catalogueCheck(signal);
|
|
100
|
+
const lockAppeared = !present && (await catalogueLockPresent(feature.directory));
|
|
101
|
+
catalogueCheck(signal);
|
|
102
|
+
if (lockAppeared) {
|
|
103
|
+
guardFailure('contract_drift', 'Catalogue lock appeared.', 'ERR_SPEC_DRIFT');
|
|
104
|
+
}
|
|
105
|
+
catalogueCheck(signal);
|
|
106
|
+
await revalidateDirectories(directories);
|
|
107
|
+
catalogueCheck(signal);
|
|
108
|
+
return { directories, tasks, lock };
|
|
109
|
+
}
|
|
30
110
|
export async function captureCompletionSnapshot(requestedFeatDir, options) {
|
|
31
111
|
const directories = await captureDirectories(requestedFeatDir, options?.workspaceRoot);
|
|
32
112
|
const featDir = lastAuthorityDirectory(directories).directory;
|
|
@@ -197,28 +277,6 @@ export async function persistCompletionSnapshot(lease, snapshot, writtenTasks, s
|
|
|
197
277
|
throw error;
|
|
198
278
|
}
|
|
199
279
|
}
|
|
200
|
-
function hasSnapshotHashes(value, artifacts) {
|
|
201
|
-
if (!value || typeof value !== 'object') {
|
|
202
|
-
return false;
|
|
203
|
-
}
|
|
204
|
-
const record = value;
|
|
205
|
-
return (record.specHash === hashArtifact(artifacts['spec.md'].content) &&
|
|
206
|
-
record.planHash === hashArtifact(artifacts['plan.md'].content) &&
|
|
207
|
-
record.tasksHash === hashArtifact(artifacts['tasks.md'].content));
|
|
208
|
-
}
|
|
209
|
-
function validateSnapshotLock(artifacts, validateLock) {
|
|
210
|
-
let lock;
|
|
211
|
-
try {
|
|
212
|
-
lock = JSON.parse(artifacts['.lock'].content);
|
|
213
|
-
}
|
|
214
|
-
catch {
|
|
215
|
-
return guardFailure('contract_drift', 'Lock file is not valid JSON.');
|
|
216
|
-
}
|
|
217
|
-
if (validateLock !== false && !hasSnapshotHashes(lock, artifacts)) {
|
|
218
|
-
guardFailure('contract_drift', 'Locked trinity hashes do not match the authoritative bytes.');
|
|
219
|
-
}
|
|
220
|
-
return lock;
|
|
221
|
-
}
|
|
222
280
|
async function revalidatePersistedContract(snapshot) {
|
|
223
281
|
await revalidateDirectories(snapshot.directories);
|
|
224
282
|
for (const name of ['spec.md', 'plan.md']) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
export { ListFeaturesInputSchema, ReadFileSliceInputSchema } from './canonical-tools.js';
|
|
1
2
|
import { z } from 'zod';
|
|
2
3
|
import type { EvidenceCheckpointInput } from '../types/sdd-engine.js';
|
|
3
|
-
export type { ArtifactType, FilePermission, ErrorCode, SddErrorDetails, SddSuccess, SddFailure, SddResult, InitWorkspaceInput, ListFeaturesInput, CreateFeatureInput, LockSpecInput, ReadSpecArtifactInput, ReadFileSliceInput, GetActiveTaskInput, ApplyFilePatchInput, CompleteTaskInput, ParsedManifest, ActiveTaskDetails, ActiveTaskResult, CompleteTaskResult, FeatureSummary, } from '../types/sdd-engine.js';
|
|
4
|
+
export type { ArtifactType, FilePermission, ErrorCode, SddErrorDetails, SddSuccess, SddFailure, SddResult, InitWorkspaceInput, ListFeaturesInput, CreateFeatureInput, LockSpecInput, ReadSpecArtifactInput, ReadFileSliceInput, GetActiveTaskInput, ApplyFilePatchInput, CompleteTaskInput, ParsedManifest, ActiveTaskDetails, ActiveTaskResult, CompleteTaskResult, FeatureSummary, CataloguePageV1, } from '../types/sdd-engine.js';
|
|
4
5
|
export declare const FeatureIdSchema: z.ZodString;
|
|
5
6
|
export declare const ArtifactTypeSchema: z.ZodEnum<{
|
|
6
7
|
plan: "plan";
|
|
@@ -37,24 +38,6 @@ export declare const InitWorkspaceInputSchema: z.ZodObject<{
|
|
|
37
38
|
}>;
|
|
38
39
|
force: z.ZodOptional<z.ZodBoolean>;
|
|
39
40
|
}, z.core.$strip>;
|
|
40
|
-
export declare const ListFeaturesInputSchema: z.ZodObject<{
|
|
41
|
-
status_filter: z.ZodOptional<z.ZodEnum<{
|
|
42
|
-
all: "all";
|
|
43
|
-
done: "done";
|
|
44
|
-
executing: "executing";
|
|
45
|
-
planning: "planning";
|
|
46
|
-
}>>;
|
|
47
|
-
view: z.ZodOptional<z.ZodEnum<{
|
|
48
|
-
setup_diagnostics: "setup_diagnostics";
|
|
49
|
-
}>>;
|
|
50
|
-
host: z.ZodOptional<z.ZodEnum<{
|
|
51
|
-
all: "all";
|
|
52
|
-
claude: "claude";
|
|
53
|
-
codex: "codex";
|
|
54
|
-
cursor: "cursor";
|
|
55
|
-
gemini: "gemini";
|
|
56
|
-
}>>;
|
|
57
|
-
}, z.core.$strip>;
|
|
58
41
|
export declare const CreateFeatureInputSchema: z.ZodObject<{
|
|
59
42
|
id: z.ZodOptional<z.ZodString>;
|
|
60
43
|
title: z.ZodString;
|
|
@@ -211,11 +194,6 @@ export declare const ReadSpecArtifactInputSchema: z.ZodObject<{
|
|
|
211
194
|
tasks: "tasks";
|
|
212
195
|
}>;
|
|
213
196
|
}, z.core.$strip>;
|
|
214
|
-
export declare const ReadFileSliceInputSchema: z.ZodObject<{
|
|
215
|
-
path: z.ZodString;
|
|
216
|
-
start_line: z.ZodNumber;
|
|
217
|
-
end_line: z.ZodNumber;
|
|
218
|
-
}, z.core.$strip>;
|
|
219
197
|
export declare const ApplyFilePatchInputSchema: z.ZodObject<{
|
|
220
198
|
feature_id: z.ZodString;
|
|
221
199
|
path: z.ZodString;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { ListFeaturesInputSchema, ReadFileSliceInputSchema } from './canonical-tools.js';
|
|
1
2
|
import { ExecutionCursorInputSchema, EvidenceCursorInputSchema } from './resume-history.js';
|
|
2
3
|
import { z } from 'zod';
|
|
3
4
|
export const FeatureIdSchema = z
|
|
@@ -29,19 +30,6 @@ export const InitWorkspaceInputSchema = z.object({
|
|
|
29
30
|
scope: z.enum(['global', 'project']),
|
|
30
31
|
force: z.boolean().optional(),
|
|
31
32
|
});
|
|
32
|
-
export const ListFeaturesInputSchema = z
|
|
33
|
-
.object({
|
|
34
|
-
status_filter: z.enum(['all', 'planning', 'executing', 'done']).optional(),
|
|
35
|
-
view: z.enum(['setup_diagnostics'], { error: 'Invalid setup diagnostic view.' }).optional(),
|
|
36
|
-
host: z
|
|
37
|
-
.enum(['all', 'claude', 'cursor', 'codex', 'gemini'], {
|
|
38
|
-
error: 'Invalid setup diagnostic host.',
|
|
39
|
-
})
|
|
40
|
-
.optional(),
|
|
41
|
-
})
|
|
42
|
-
.refine((input) => input.host === undefined || input.view === 'setup_diagnostics', {
|
|
43
|
-
message: 'Host requires setup diagnostics view.',
|
|
44
|
-
});
|
|
45
33
|
export const CreateFeatureInputSchema = z.object({
|
|
46
34
|
id: FeatureIdSchema.optional(),
|
|
47
35
|
title: z.string().min(3),
|
|
@@ -243,11 +231,6 @@ export const ReadSpecArtifactInputSchema = z.object({
|
|
|
243
231
|
feature_id: FeatureIdSchema,
|
|
244
232
|
artifact: ArtifactTypeSchema,
|
|
245
233
|
});
|
|
246
|
-
export const ReadFileSliceInputSchema = z.object({
|
|
247
|
-
path: z.string().min(1),
|
|
248
|
-
start_line: z.number().int().min(1),
|
|
249
|
-
end_line: z.number().int().min(1),
|
|
250
|
-
});
|
|
251
234
|
export const ApplyFilePatchInputSchema = z.object({
|
|
252
235
|
feature_id: FeatureIdSchema,
|
|
253
236
|
path: z.string().min(1),
|
|
@@ -256,7 +239,10 @@ export const ApplyFilePatchInputSchema = z.object({
|
|
|
256
239
|
});
|
|
257
240
|
const VerificationReceiptInputSchema = z.preprocess((input, context) => {
|
|
258
241
|
if (typeof input === 'object' && input !== null && Object.hasOwn(input, '__proto__')) {
|
|
259
|
-
context.addIssue({
|
|
242
|
+
context.addIssue({
|
|
243
|
+
code: 'custom',
|
|
244
|
+
message: 'Invalid verification receipt element.',
|
|
245
|
+
});
|
|
260
246
|
return z.NEVER;
|
|
261
247
|
}
|
|
262
248
|
return input;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Stats } from 'node:fs';
|
|
2
|
-
import type { ErrorCode } from '../types/sdd-engine.js';
|
|
3
|
-
import type { CompletionFailureReason, PhysicalIdentity, ArtifactCapture, AuthorityDirectory } from '../types/completion.js';
|
|
2
|
+
import type { ErrorCode, SddLockFile } from '../types/sdd-engine.js';
|
|
3
|
+
import type { CompletionFailureReason, PhysicalIdentity, ArtifactCapture, AuthorityDirectory, CompletionSnapshot } from '../types/completion.js';
|
|
4
4
|
export declare class CompletionGuardError extends Error {
|
|
5
5
|
readonly reason: CompletionFailureReason;
|
|
6
6
|
readonly code: ErrorCode;
|
|
@@ -19,4 +19,5 @@ export declare function isEvidencePath(value: string): boolean;
|
|
|
19
19
|
export declare function disjointPaths(paths: readonly string[]): boolean;
|
|
20
20
|
export declare function hashArtifact(content: string): string;
|
|
21
21
|
export declare function lastAuthorityDirectory(directories: AuthorityDirectory[]): AuthorityDirectory;
|
|
22
|
+
export declare function validateSnapshotLock(artifacts: CompletionSnapshot['artifacts'], validateLock?: boolean): SddLockFile;
|
|
22
23
|
//# sourceMappingURL=feature-authority.d.ts.map
|
|
@@ -30,7 +30,13 @@ function decodeArtifact(bytes) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
export function physicalIdentity(stat) {
|
|
33
|
-
return {
|
|
33
|
+
return {
|
|
34
|
+
dev: stat.dev,
|
|
35
|
+
ino: stat.ino,
|
|
36
|
+
mode: stat.mode,
|
|
37
|
+
uid: stat.uid,
|
|
38
|
+
nlink: stat.nlink,
|
|
39
|
+
};
|
|
34
40
|
}
|
|
35
41
|
export function sameIdentity(left, right) {
|
|
36
42
|
return (left.dev === right.dev &&
|
|
@@ -228,4 +234,26 @@ export function lastAuthorityDirectory(directories) {
|
|
|
228
234
|
}
|
|
229
235
|
return feature;
|
|
230
236
|
}
|
|
237
|
+
function hasSnapshotHashes(value, artifacts) {
|
|
238
|
+
if (!value || typeof value !== 'object') {
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
const record = value;
|
|
242
|
+
return (record.specHash === hashArtifact(artifacts['spec.md'].content) &&
|
|
243
|
+
record.planHash === hashArtifact(artifacts['plan.md'].content) &&
|
|
244
|
+
record.tasksHash === hashArtifact(artifacts['tasks.md'].content));
|
|
245
|
+
}
|
|
246
|
+
export function validateSnapshotLock(artifacts, validateLock) {
|
|
247
|
+
let lock;
|
|
248
|
+
try {
|
|
249
|
+
lock = JSON.parse(artifacts['.lock'].content);
|
|
250
|
+
}
|
|
251
|
+
catch {
|
|
252
|
+
return guardFailure('contract_drift', 'Lock file is not valid JSON.');
|
|
253
|
+
}
|
|
254
|
+
if (validateLock !== false && !hasSnapshotHashes(lock, artifacts)) {
|
|
255
|
+
guardFailure('contract_drift', 'Locked trinity hashes do not match the authoritative bytes.');
|
|
256
|
+
}
|
|
257
|
+
return lock;
|
|
258
|
+
}
|
|
231
259
|
//# sourceMappingURL=feature-authority.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as compact from './tools/compact-result.js';
|
|
2
|
-
import {
|
|
2
|
+
import { homeFallbackFailure } from './workspace-root.js';
|
|
3
3
|
import { CANONICAL_SDD_TOOL_NAMES, ENGINE_CAPABILITIES } from './canonical-tools.js';
|
|
4
4
|
import * as fs from 'node:fs/promises';
|
|
5
5
|
import * as path from 'node:path';
|
|
6
6
|
import { fileURLToPath } from 'node:url';
|
|
7
|
-
import { scanPack, legacyIssue, diagnosticRow, clientInfo } from './host-skill-reader.js';
|
|
7
|
+
import { scanPack, legacyIssue, diagnosticRow, clientInfo, readTextInsideWorkspaceDetailed, } from './host-skill-reader.js';
|
|
8
8
|
const moduleDir = path.dirname(fileURLToPath(import.meta.url));
|
|
9
9
|
const TEMPLATES_ROOT = path.resolve(moduleDir, '..', '..', 'templates');
|
|
10
10
|
export const MISSING_SDD_HINT = 'No .sdd directory in the client project. Call sdd_init_workspace with scope=project. MCP hosts should advertise roots; do not pin PLANU_WORKSPACE globally.';
|
|
@@ -18,6 +18,10 @@ After the local client has registered the MCP server and the intended project is
|
|
|
18
18
|
|
|
19
19
|
## Read-only diagnostics
|
|
20
20
|
|
|
21
|
+
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.
|
|
22
|
+
|
|
23
|
+
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.
|
|
24
|
+
|
|
21
25
|
Before optional views or observations, inspect setup diagnostics and require a recognized \`engineCapabilities.version=1\` and the relevant advertised value. An absent or unknown version means unsupported; never probe a mutation or fall back to lock/relock to discover support. This describes server implementation only: host catalogues remain unverified, and a host catalogue refresh is separate from restarting MCP.
|
|
22
26
|
|
|
23
27
|
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.
|
|
@@ -181,7 +185,12 @@ async function inspectSetupDiagnostics(root, version, selectedHost, client) {
|
|
|
181
185
|
return {
|
|
182
186
|
version: 1,
|
|
183
187
|
engineCapabilities: ENGINE_CAPABILITIES,
|
|
184
|
-
server: {
|
|
188
|
+
server: {
|
|
189
|
+
version,
|
|
190
|
+
tools: CANONICAL_SDD_TOOL_NAMES,
|
|
191
|
+
count: 9,
|
|
192
|
+
scope: 'server_registration',
|
|
193
|
+
},
|
|
185
194
|
...clientInfo(client),
|
|
186
195
|
effectiveMcpCatalogue: 'unverified',
|
|
187
196
|
skillCatalogue: 'unverified',
|
|
@@ -315,7 +324,10 @@ export async function setupDiagnosticResult(server, workspace, version, args) {
|
|
|
315
324
|
return compact.formatCompactResult(homeError);
|
|
316
325
|
}
|
|
317
326
|
const setupDiagnostics = await inspectSetupDiagnostics(resolved.workspaceRoot, version ?? 'unknown', (args.host ?? 'all'), server.server.getClientVersion());
|
|
318
|
-
return compact.formatCompactResult({
|
|
327
|
+
return compact.formatCompactResult({
|
|
328
|
+
success: true,
|
|
329
|
+
data: { setupDiagnostics },
|
|
330
|
+
});
|
|
319
331
|
}
|
|
320
332
|
catch {
|
|
321
333
|
const failure = compact.compactFailure('artifact_unavailable');
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
}): Promise<HostSkillReadResult>;
|
|
7
|
-
export declare function scanPack(workspaceRoot: string, templatesRoot: string, slugs: string[], targetsFor: (slug: string) => string[], render: (slug: string, source: string) => string, readTarget: typeof readTextInsideWorkspaceDetailed): Promise<{
|
|
1
|
+
import type * as Models from '../types/resume-views.js';
|
|
2
|
+
import type * as Engine from '../types/sdd-engine.js';
|
|
3
|
+
import * as root from './workspace-root.js';
|
|
4
|
+
export { readTextInsideWorkspaceDetailed } from './workspace-root.js';
|
|
5
|
+
export declare function scanPack(workspaceRoot: string, templatesRoot: string, slugs: string[], targetsFor: (slug: string) => string[], render: (slug: string, source: string) => string, readTarget: typeof root.readTextInsideWorkspaceDetailed): Promise<{
|
|
8
6
|
available: boolean;
|
|
9
|
-
rows: HostScanRow[];
|
|
7
|
+
rows: Models.HostScanRow[];
|
|
10
8
|
}>;
|
|
11
|
-
export declare function legacyIssue(row: HostScanRow, available: boolean): HostSkillIssue | undefined;
|
|
12
|
-
export declare function diagnosticRow(row: HostScanRow, version: string): SetupRow;
|
|
13
|
-
export
|
|
9
|
+
export declare function legacyIssue(row: Models.HostScanRow, available: boolean): Engine.HostSkillIssue | undefined;
|
|
10
|
+
export declare function diagnosticRow(row: Models.HostScanRow, version: string): Models.SetupRow;
|
|
11
|
+
export { clientInfo } from './client-workspace.js';
|
|
12
|
+
export declare function readBoundedSource(workspaceRoot: string, input: Engine.ReadFileSliceInput, codec: root.ReadCursorCodec, signal?: AbortSignal): Promise<Engine.SddResult<{
|
|
13
|
+
sourcePage: Engine.SourcePageV1;
|
|
14
|
+
}>>;
|
|
14
15
|
//# sourceMappingURL=host-skill-reader.d.ts.map
|