@planu/cli 8.2.4 → 8.2.5
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,14 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [8.2.5] - 2026-09-24
|
|
4
|
+
|
|
5
|
+
- `sdd_complete_task` keeps up to 500 characters of verification evidence, cut at a word boundary, and stores `$` sequences literally
|
|
6
|
+
- `sdd_apply_file_patch` writes `replace_content` literally; `$&`, `` $` ``, `$'` and `$$` are no longer expanded
|
|
7
|
+
- `sdd_lock_spec` rejects File Manifest write entries under `.sdd`, `.git` or `planu/specs`, which `sdd_apply_file_patch` would always refuse
|
|
8
|
+
- `planu-guard` denies quoted flags git parses as `-n`/`--no-verify` (`git commit "-nm fix"`) and no longer flags the value of `-m`/`-F`
|
|
9
|
+
- `pnpm eval:skills` reports writes to `READ_ONLY` manifest paths as `OUT_OF_MANIFEST`
|
|
10
|
+
- `scripts/publish-local.sh` publishes with the existing npm session when no token is set
|
|
11
|
+
|
|
3
12
|
## [8.2.4] - 2026-09-24
|
|
4
13
|
|
|
5
14
|
- 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
|
|
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, `$
|
|
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;
|