@mjasnikovs/pi-task 0.13.32 → 0.13.33
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.
|
@@ -13,7 +13,7 @@ import { renderInlineMarkdown, stripInlineMarkdown } from './inline-markdown.js'
|
|
|
13
13
|
import { AUTO_CLARIFY_PROMPT, AUTO_DECOMPOSE_PROMPT } from './auto-prompts.js';
|
|
14
14
|
import { isDuplicateQuestion, MAX_DUP_STRIKES, DUP_REPROMPT_HINT } from './question-dedup.js';
|
|
15
15
|
import { allocateAutoId, buildAutoBody, parseDecomposeList, parseTaskList, checkOffTask, stampTaskInProgress, findResumableAuto } from './auto-io.js';
|
|
16
|
-
import { writeTaskFile, readTaskFile, updateTaskFrontMatter, taskFilePath } from './task-io.js';
|
|
16
|
+
import { writeTaskFile, readTaskFile, updateTaskFrontMatter, taskFilePath, tasksDir } from './task-io.js';
|
|
17
17
|
import { gitCommitAll } from './auto-commit.js';
|
|
18
18
|
import { runGuidelineEnforcement, classifyEnforceChildFailure, ENFORCE_TIMEOUT_MS } from './enforce-guidelines.js';
|
|
19
19
|
import { runWorker } from '../workers/pi-worker-core.js';
|
|
@@ -328,6 +328,20 @@ function defaultDeps(ctx, cwd, signal, title) {
|
|
|
328
328
|
lastLine = undefined;
|
|
329
329
|
contextUsage = undefined;
|
|
330
330
|
const startedAt = Date.now();
|
|
331
|
+
// Per-pass debug log. The enforce child is otherwise
|
|
332
|
+
// unobservable (it has no per-task file like the impl runner),
|
|
333
|
+
// so a loop/timeout in the verifier was undiagnosable. One
|
|
334
|
+
// rolling file under .pi-tasks/; each pass brackets its
|
|
335
|
+
// tool/text lines with start/end markers naming the task and
|
|
336
|
+
// the terminal outcome, so a kill shows the exact repeated
|
|
337
|
+
// calls that tripped the loop detector. Fire-and-forget.
|
|
338
|
+
const enforceLogPath = path.join(tasksDir(cwd2), 'enforce-debug.log');
|
|
339
|
+
const logEnforce = (msg) => {
|
|
340
|
+
void fsp
|
|
341
|
+
.appendFile(enforceLogPath, `${new Date().toISOString()} ${msg}\n`)
|
|
342
|
+
.catch(() => { });
|
|
343
|
+
};
|
|
344
|
+
logEnforce(`=== enforce start: ${taskTitle} ===`);
|
|
331
345
|
const stopLoader = startAutoLoader(enforceCtx, () => ({
|
|
332
346
|
title: taskTitle,
|
|
333
347
|
kind: 'enforce',
|
|
@@ -347,10 +361,13 @@ function defaultDeps(ctx, cwd, signal, title) {
|
|
|
347
361
|
timeoutMs: ENFORCE_TIMEOUT_MS,
|
|
348
362
|
onLine: line => {
|
|
349
363
|
lastLine = line;
|
|
350
|
-
|
|
364
|
+
logEnforce(line);
|
|
351
365
|
}
|
|
352
366
|
});
|
|
353
367
|
const failure = classifyEnforceChildFailure(r);
|
|
368
|
+
logEnforce(failure ?
|
|
369
|
+
`=== enforce end: FAIL — ${failure} ===`
|
|
370
|
+
: '=== enforce end: verdict captured ===');
|
|
354
371
|
if (failure)
|
|
355
372
|
throw new Error(failure);
|
|
356
373
|
return r.text;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mjasnikovs/pi-task",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.33",
|
|
4
4
|
"description": "Deterministic spec-orchestration for local models, with a bundled real-time remote web view and web/docs/fetch/worker subagent tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|