@planu/cli 7.1.1 → 7.1.3
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
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [7.1.3] - 2026-09-18
|
|
2
|
+
|
|
3
|
+
- start the MCP stdio server when invoked through an `npx` `.bin` symlink (`npx -y @planu/cli@latest`)
|
|
4
|
+
|
|
5
|
+
## [7.1.2] - 2026-09-18
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
- resolve the SDD workspace from `PLANU_WORKSPACE` or the nearest `.sdd` directory
|
|
9
|
+
- accept `sdd_complete_task` only for the active incomplete task (sequential completion)
|
|
10
|
+
- recheck lock hashes on `sdd_complete_task` so spec.md/plan.md drift after `sdd_lock_spec` fails closed
|
|
11
|
+
|
|
12
|
+
## [7.1.1] - 2026-09-18
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
- include `templates/` in the published `@planu/cli` tarball so `sdd_init_workspace` has the cognitive starter pack
|
|
16
|
+
|
|
1
17
|
## [6.0.2] - 2026-09-10
|
|
2
18
|
|
|
3
19
|
### Reliability
|
|
@@ -2,4 +2,5 @@
|
|
|
2
2
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
3
|
export declare function createUltralightSddServer(workspaceRoot?: string): McpServer;
|
|
4
4
|
export declare function runServer(): Promise<void>;
|
|
5
|
+
export declare function isSameBinEntry(argv1: string | undefined, modulePath: string): boolean;
|
|
5
6
|
//# sourceMappingURL=server.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { realpathSync } from 'node:fs';
|
|
3
3
|
import { resolve } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
4
5
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
6
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
6
7
|
import { registerUltralightSddTools } from './tools.js';
|
|
@@ -8,7 +9,7 @@ import { resolveSddWorkspaceRoot } from './workspace-root.js';
|
|
|
8
9
|
export function createUltralightSddServer(workspaceRoot) {
|
|
9
10
|
const server = new McpServer({
|
|
10
11
|
name: 'sdd-engine',
|
|
11
|
-
version: '7.1.
|
|
12
|
+
version: '7.1.3',
|
|
12
13
|
}, {
|
|
13
14
|
capabilities: {
|
|
14
15
|
tools: {},
|
|
@@ -23,12 +24,19 @@ export async function runServer() {
|
|
|
23
24
|
const transport = new StdioServerTransport();
|
|
24
25
|
await server.connect(transport);
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
if (!entry) {
|
|
27
|
+
export function isSameBinEntry(argv1, modulePath) {
|
|
28
|
+
if (!argv1) {
|
|
29
29
|
return false;
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
try {
|
|
32
|
+
return realpathSync(argv1) === realpathSync(modulePath);
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return resolve(argv1) === resolve(modulePath);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function isDirectInvocation() {
|
|
39
|
+
return isSameBinEntry(process.argv[1], fileURLToPath(import.meta.url));
|
|
32
40
|
}
|
|
33
41
|
if (isDirectInvocation()) {
|
|
34
42
|
runServer().catch((err) => {
|
|
@@ -68,7 +68,12 @@ function registerCompleteTaskTool(server, sddDir, taskWindow) {
|
|
|
68
68
|
inputSchema: CompleteTaskInputSchema.shape,
|
|
69
69
|
}, async (rawArgs) => {
|
|
70
70
|
const args = CompleteTaskInputSchema.parse(rawArgs);
|
|
71
|
-
const
|
|
71
|
+
const featDir = path.join(sddDir, 'features', args.feature_id);
|
|
72
|
+
const lockError = await requireLockedTrinity(featDir, 'sdd_complete_task');
|
|
73
|
+
if (lockError) {
|
|
74
|
+
return lockError;
|
|
75
|
+
}
|
|
76
|
+
const tasksPath = path.join(featDir, 'tasks.md');
|
|
72
77
|
const result = await taskWindow.completeTask(tasksPath, args.task_id, args.verification_output);
|
|
73
78
|
return formatResult(result);
|
|
74
79
|
});
|
|
@@ -115,19 +120,25 @@ async function executeReadFileSlice(workspaceRoot, relPath, startLine, endLine)
|
|
|
115
120
|
});
|
|
116
121
|
}
|
|
117
122
|
}
|
|
123
|
+
async function requireLockedTrinity(featDir, trigger) {
|
|
124
|
+
const lockCheck = await verifyLockedTrinity(featDir);
|
|
125
|
+
if (lockCheck.ok) {
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
return formatResult({
|
|
129
|
+
success: false,
|
|
130
|
+
error: {
|
|
131
|
+
code: lockCheck.code ?? 'ERR_SPEC_NOT_LOCKED',
|
|
132
|
+
message: lockCheck.message ?? `Feature spec at '${featDir}' must be locked before execution.`,
|
|
133
|
+
trigger,
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
}
|
|
118
137
|
async function executeApplyPatch(sddDir, patchSandbox, args) {
|
|
119
138
|
const featDir = path.join(sddDir, 'features', args.feature_id);
|
|
120
|
-
const
|
|
121
|
-
if (
|
|
122
|
-
return
|
|
123
|
-
success: false,
|
|
124
|
-
error: {
|
|
125
|
-
code: lockCheck.code ?? 'ERR_SPEC_NOT_LOCKED',
|
|
126
|
-
message: lockCheck.message ??
|
|
127
|
-
`Feature spec for '${args.feature_id}' must be locked before applying patches.`,
|
|
128
|
-
trigger: 'sdd_apply_file_patch',
|
|
129
|
-
},
|
|
130
|
-
});
|
|
139
|
+
const lockError = await requireLockedTrinity(featDir, 'sdd_apply_file_patch');
|
|
140
|
+
if (lockError) {
|
|
141
|
+
return lockError;
|
|
131
142
|
}
|
|
132
143
|
const planPath = path.join(featDir, 'plan.md');
|
|
133
144
|
const manifest = await patchSandbox.parsePlanManifest(planPath);
|