@planu/cli 7.1.1 → 7.1.2

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,15 @@
1
+ ## [7.1.2] - 2026-09-18
2
+
3
+ ### Bug Fixes
4
+ - resolve the SDD workspace from `PLANU_WORKSPACE` or the nearest `.sdd` directory
5
+ - accept `sdd_complete_task` only for the active incomplete task (sequential completion)
6
+ - recheck lock hashes on `sdd_complete_task` so spec.md/plan.md drift after `sdd_lock_spec` fails closed
7
+
8
+ ## [7.1.1] - 2026-09-18
9
+
10
+ ### Bug Fixes
11
+ - include `templates/` in the published `@planu/cli` tarball so `sdd_init_workspace` has the cognitive starter pack
12
+
1
13
  ## [6.0.2] - 2026-09-10
2
14
 
3
15
  ### Reliability
@@ -8,7 +8,7 @@ import { resolveSddWorkspaceRoot } from './workspace-root.js';
8
8
  export function createUltralightSddServer(workspaceRoot) {
9
9
  const server = new McpServer({
10
10
  name: 'sdd-engine',
11
- version: '7.1.1',
11
+ version: '7.1.2',
12
12
  }, {
13
13
  capabilities: {
14
14
  tools: {},
@@ -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 tasksPath = path.join(sddDir, 'features', args.feature_id, 'tasks.md');
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 lockCheck = await verifyLockedTrinity(featDir);
121
- if (!lockCheck.ok) {
122
- return formatResult({
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planu/cli",
3
- "version": "7.1.1",
3
+ "version": "7.1.2",
4
4
  "description": "Planu — MCP Server for Spec Driven Development. Cross-platform (Linux/macOS/Windows, x64/arm64).",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",