pi-task-tracker 0.2.3 → 0.2.4
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/index.ts +5 -5
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -110,7 +110,7 @@ function findEnclosingRepo(dir: string): string | null {
|
|
|
110
110
|
// ---- External-write guard ----
|
|
111
111
|
// Enforces the tracking boundary as a write boundary: pi-task-tracker can
|
|
112
112
|
// only track (and therefore only roll back) the session directory, so by
|
|
113
|
-
// default (config taskTracker.externalWrite="
|
|
113
|
+
// default (config taskTracker.externalWrite="ask") tool calls that would
|
|
114
114
|
// create/modify files OUTSIDE it are denied. Reads stay free. Git command
|
|
115
115
|
// protection is inherited from pi-permission-system's bash rules (rebase/
|
|
116
116
|
// reset/amend/force-push/... ask there): this guard never inspects git
|
|
@@ -308,7 +308,7 @@ async function guardExternalWriteHit(
|
|
|
308
308
|
if (ok) return null;
|
|
309
309
|
return `pi-task-tracker scope guard: user denied external write to '${hit.block}'. Do not retry or bypass.`;
|
|
310
310
|
}
|
|
311
|
-
return `pi-task-tracker scope guard (externalWrite
|
|
311
|
+
return `pi-task-tracker scope guard (externalWrite=${mode}): this command writes to '${hit.block}' outside the session directory. ${why} Stay inside the session directory, or have the user adjust taskTracker.externalWrite / run it manually.`;
|
|
312
312
|
}
|
|
313
313
|
return null;
|
|
314
314
|
}
|
|
@@ -330,7 +330,7 @@ async function guardExternalWriteHit(
|
|
|
330
330
|
if (ok) return "__ask__";
|
|
331
331
|
return `pi-task-tracker scope guard: user denied external write to '${p}'. Do not retry or bypass.`;
|
|
332
332
|
}
|
|
333
|
-
return `pi-task-tracker scope guard (externalWrite
|
|
333
|
+
return `pi-task-tracker scope guard (externalWrite=${mode}): tool '${toolName}' targets '${p}' outside the session directory. ${why} Ask the user to adjust taskTracker.externalWrite or perform the change manually.`;
|
|
334
334
|
}
|
|
335
335
|
|
|
336
336
|
function isExternalAbs2(base: string, p: string): boolean {
|
|
@@ -589,7 +589,7 @@ interface TrackerConfig {
|
|
|
589
589
|
}
|
|
590
590
|
|
|
591
591
|
function readConfig(): TrackerConfig {
|
|
592
|
-
const fallback: TrackerConfig = { todo: true, readme: true, autoCommit: true, externalWrite: "
|
|
592
|
+
const fallback: TrackerConfig = { todo: true, readme: true, autoCommit: true, externalWrite: "ask", guard: true };
|
|
593
593
|
try {
|
|
594
594
|
const dir = process.env.PI_CODING_AGENT_DIR || path.join(os.homedir(), ".pi", "agent");
|
|
595
595
|
const file = process.env.PI_TRACKER_SETTINGS || path.join(dir, "settings.json");
|
|
@@ -600,7 +600,7 @@ function readConfig(): TrackerConfig {
|
|
|
600
600
|
readme: t.readme !== false,
|
|
601
601
|
autoCommit: t.autoCommit !== false,
|
|
602
602
|
guard: t.guard !== false,
|
|
603
|
-
externalWrite: t.externalWrite === "
|
|
603
|
+
externalWrite: t.externalWrite === "block" || t.externalWrite === "off" ? t.externalWrite : "ask",
|
|
604
604
|
};
|
|
605
605
|
} catch {
|
|
606
606
|
return fallback;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-task-tracker",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Task workflow tracking for the pi coding agent: TODO/README maintenance, per-task git auto-commits as checkpoints, and an interactive /rollback. Hashline-aware, nested-repo aware, subagent-artifact-safe.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|