@planu/cli 8.2.4 → 8.2.6

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,5 +1,19 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [8.2.6] - 2026-09-29
4
+
5
+ - refresh in-range direct dependencies: MCP SDK 1.30.1, vitest 5.0.2, vite 8.3.1, typescript-eslint 8.70.1, prettier 3.9.9, knip 6.38.0, lint-staged 17.6.0, commitlint 21.2.3, and secretlint 13.0.6
6
+ - keep @types/node on 22.20.4 and engines on Node >=22.13.0
7
+
8
+ ## [8.2.5] - 2026-09-24
9
+
10
+ - `sdd_complete_task` keeps up to 500 characters of verification evidence, cut at a word boundary, and stores `$` sequences literally
11
+ - `sdd_apply_file_patch` writes `replace_content` literally; `$&`, `` $` ``, `$'` and `$$` are no longer expanded
12
+ - `sdd_lock_spec` rejects File Manifest write entries under `.sdd`, `.git` or `planu/specs`, which `sdd_apply_file_patch` would always refuse
13
+ - `planu-guard` denies quoted flags git parses as `-n`/`--no-verify` (`git commit "-nm fix"`) and no longer flags the value of `-m`/`-F`
14
+ - `pnpm eval:skills` reports writes to `READ_ONLY` manifest paths as `OUT_OF_MANIFEST`
15
+ - `scripts/publish-local.sh` publishes with the existing npm session when no token is set
16
+
3
17
  ## [8.2.4] - 2026-09-24
4
18
 
5
19
  - MCP handshake reports the package.json version instead of a hardcoded one
@@ -20,6 +20,13 @@ function assessTrinityCompleteness(specContent, planContent, tasksContent) {
20
20
  message: 'DELETE File Manifest entries must be exact paths, not globs.',
21
21
  };
22
22
  }
23
+ if (manifest.protectedWrite !== null) {
24
+ return {
25
+ ok: false,
26
+ code: 'ERR_TRINITY_INCOMPLETE',
27
+ message: `File Manifest cannot grant writes on protected root path '${manifest.protectedWrite}' (.sdd, .git, planu/specs).`,
28
+ };
29
+ }
23
30
  if (specOk && planOk && hasTask && manifest.hasPath) {
24
31
  return { ok: true };
25
32
  }
@@ -99,15 +106,23 @@ function hasHeading(content, needle) {
99
106
  const escaped = needle.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
100
107
  return new RegExp(`^#{1,3}\\s+.*${escaped}`, 'imu').test(content);
101
108
  }
109
+ const PROTECTED_ROOTS = ['.sdd', '.git', 'planu/specs'];
102
110
  function scanManifest(planContent) {
103
111
  const { allowedFiles } = parseManifestContent(planContent);
104
112
  let globDelete = false;
113
+ let protectedWrite = null;
105
114
  for (const [entryPath, permission] of allowedFiles) {
106
115
  if (permission === 'DELETE' && entryPath.includes('*')) {
107
116
  globDelete = true;
108
117
  }
118
+ const normalized = path.posix.normalize(entryPath).toLowerCase();
119
+ if (permission !== 'READ_ONLY' &&
120
+ protectedWrite === null &&
121
+ PROTECTED_ROOTS.some((root) => normalized === root || normalized.startsWith(`${root}/`))) {
122
+ protectedWrite = entryPath;
123
+ }
109
124
  }
110
- return { hasPath: allowedFiles.size > 0, globDelete };
125
+ return { hasPath: allowedFiles.size > 0, globDelete, protectedWrite };
111
126
  }
112
127
  export function parseManifestContent(content) {
113
128
  const allowedFiles = new Map();
@@ -249,7 +249,7 @@ export class PatchSandbox {
249
249
  };
250
250
  }
251
251
  const updatedContent = searchContent
252
- ? existingContent.replace(searchContent, replaceContent)
252
+ ? existingContent.replace(searchContent, () => replaceContent)
253
253
  : replaceContent;
254
254
  try {
255
255
  await fs.writeFile(fullPath, updatedContent, 'utf-8');
@@ -128,13 +128,13 @@ export class TaskWindowManager {
128
128
  },
129
129
  };
130
130
  }
131
- const cleanOutput = verificationOutput.trim().replace(/\s+/g, ' ').slice(0, 120);
131
+ const cleanOutput = summarizeEvidence(verificationOutput);
132
132
  const regexExact = new RegExp(`^(\\s*[-*]\\s*\\[)[\\s/](\\]\\s*(?:${taskId}\\b|.*\\b${taskId}\\b.*))`, 'i');
133
133
  let taskFound = false;
134
134
  for (let i = 0; i < lines.length; i++) {
135
135
  const line = lines[i];
136
136
  if (line !== undefined && regexExact.test(line)) {
137
- lines[i] = line.replace(regexExact, `$1x$2 — [Verified: ${cleanOutput}]`);
137
+ lines[i] = line.replace(regexExact, (_, open, rest) => `${open}x${rest} — [Verified: ${cleanOutput}]`);
138
138
  taskFound = true;
139
139
  break;
140
140
  }
@@ -166,6 +166,16 @@ export class TaskWindowManager {
166
166
  };
167
167
  }
168
168
  }
169
+ const EVIDENCE_LIMIT = 500;
170
+ function summarizeEvidence(output) {
171
+ const collapsed = output.trim().replace(/\s+/g, ' ');
172
+ if (collapsed.length <= EVIDENCE_LIMIT) {
173
+ return collapsed;
174
+ }
175
+ const head = Array.from(collapsed).slice(0, EVIDENCE_LIMIT).join('');
176
+ const lastSpace = head.lastIndexOf(' ');
177
+ return `${(lastSpace > 0 ? head.slice(0, lastSpace) : head).trimEnd()}…`;
178
+ }
169
179
  async function refreshTasksHashIfLocked(tasksFilePath, tasksContent) {
170
180
  const lockPath = path.join(path.dirname(tasksFilePath), '.lock');
171
181
  let raw;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planu/cli",
3
- "version": "8.2.4",
3
+ "version": "8.2.6",
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",
@@ -71,18 +71,18 @@
71
71
  ],
72
72
  "license": "SEE LICENSE IN LICENSE",
73
73
  "dependencies": {
74
- "@modelcontextprotocol/sdk": "^1.30.0",
74
+ "@modelcontextprotocol/sdk": "^1.30.1",
75
75
  "zod": "^4.6.5"
76
76
  },
77
77
  "devDependencies": {
78
- "@commitlint/cli": "^21.2.2",
79
- "@commitlint/config-conventional": "^21.2.2",
78
+ "@commitlint/cli": "^21.2.3",
79
+ "@commitlint/config-conventional": "^21.2.3",
80
80
  "@eslint/js": "^10.0.1",
81
- "@secretlint/secretlint-rule-no-homedir": "^13.0.5",
82
- "@secretlint/secretlint-rule-preset-recommend": "^13.0.5",
81
+ "@secretlint/secretlint-rule-no-homedir": "^13.0.6",
82
+ "@secretlint/secretlint-rule-preset-recommend": "^13.0.6",
83
83
  "@types/node": "^22.20.4",
84
84
  "@typescript/native": "npm:typescript@^7.0.2",
85
- "@vitest/coverage-v8": "^5.0.1",
85
+ "@vitest/coverage-v8": "^5.0.2",
86
86
  "eslint": "10.11.0",
87
87
  "eslint-config-prettier": "^10.1.8",
88
88
  "eslint-import-resolver-typescript": "^4.4.5",
@@ -90,18 +90,18 @@
90
90
  "happy-dom": "^20.14.5",
91
91
  "husky": "^9.1.7",
92
92
  "jiti": "2.7.0",
93
- "knip": "^6.37.0",
94
- "lint-staged": "^17.5.1",
93
+ "knip": "^6.38.0",
94
+ "lint-staged": "^17.6.0",
95
95
  "madge": "^8.0.0",
96
- "prettier": "^3.9.8",
96
+ "prettier": "^3.9.9",
97
97
  "qrcode": "1.5.4",
98
- "secretlint": "^13.0.5",
98
+ "secretlint": "^13.0.6",
99
99
  "tsc-alias": "^1.9.5",
100
100
  "type-coverage": "^2.30.1",
101
101
  "typescript": "npm:@typescript/typescript6@^6.0.2",
102
- "typescript-eslint": "^8.70.0",
103
- "vite": "^8.3.0",
104
- "vitest": "^5.0.1"
102
+ "typescript-eslint": "^8.70.1",
103
+ "vite": "^8.3.1",
104
+ "vitest": "^5.0.2"
105
105
  },
106
106
  "scripts": {
107
107
  "check:tool-registration": "bash scripts/check-tool-registration.sh",