@tekmidian/pai 0.65.0 → 0.65.1
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/README.md +60 -1065
- package/dist/{chain-C8QO8gwj.mjs → chain-CLb6hbFS.mjs} +2 -2
- package/dist/{chain-C8QO8gwj.mjs.map → chain-CLb6hbFS.mjs.map} +1 -1
- package/dist/cli/index.mjs +6 -6
- package/dist/cli/program.mjs +6 -6
- package/dist/config-BbLFD7Uf.mjs.map +1 -1
- package/dist/daemon/index.mjs +3 -3
- package/dist/{daemon-CX9JomIJ.mjs → daemon-BjaPR39W.mjs} +3 -3
- package/dist/{daemon-D2r1AQqE.mjs → daemon-DqCB3fO-.mjs} +3 -3
- package/dist/{daemon-D2r1AQqE.mjs.map → daemon-DqCB3fO-.mjs.map} +1 -1
- package/dist/daemon-mcp/index.mjs +4 -4
- package/dist/daemon-mcp/index.mjs.map +1 -1
- package/dist/{fallback-CWDQYmJi.mjs → fallback-CupzGkuJ.mjs} +2 -2
- package/dist/{fallback-CWDQYmJi.mjs.map → fallback-CupzGkuJ.mjs.map} +1 -1
- package/dist/hooks/block-sleep-poll.mjs.map +1 -1
- package/dist/hooks/context-compression-hook.mjs.map +1 -1
- package/dist/hooks/load-project-context.mjs.map +2 -2
- package/dist/hooks/post-compact-inject.mjs.map +1 -1
- package/dist/hooks/route-agents-to-worker.mjs.map +1 -1
- package/dist/hooks/security-validator.mjs +2 -2
- package/dist/hooks/security-validator.mjs.map +1 -1
- package/dist/hooks/whisper-rules.mjs.map +1 -1
- package/dist/hooks/worker-guard.mjs.map +1 -1
- package/dist/hooks/worker-proxy.mjs.map +1 -1
- package/dist/hooks/worker-status-line.mjs.map +2 -2
- package/dist/hooks/worker-supervision.mjs.map +1 -1
- package/dist/{main-resolver-CDe7DCso.mjs → main-resolver-BeYWNzrt.mjs} +6 -6
- package/dist/{main-resolver-CDe7DCso.mjs.map → main-resolver-BeYWNzrt.mjs.map} +1 -1
- package/dist/{main-resolver-DI-A7lSO.mjs → main-resolver-kHW6FewU.mjs} +1 -1
- package/dist/{planner-8-shIa8t.mjs → planner-DAq4Yx-H.mjs} +3 -3
- package/dist/{planner-8-shIa8t.mjs.map → planner-DAq4Yx-H.mjs.map} +1 -1
- package/dist/{program-DiktbiWa.mjs → program-CWf9mT7Z.mjs} +45 -23
- package/dist/program-CWf9mT7Z.mjs.map +1 -0
- package/dist/{run-DUZRSnIT.mjs → run-uAkNItb6.mjs} +22 -4
- package/dist/run-uAkNItb6.mjs.map +1 -0
- package/dist/{session-keepalive-CZUwp5IQ.mjs → session-keepalive-BWEjcRrh.mjs} +2 -2
- package/dist/{session-keepalive-CZUwp5IQ.mjs.map → session-keepalive-BWEjcRrh.mjs.map} +1 -1
- package/dist/skills/Tasks/SKILL.md +1 -1
- package/docs/auto-compact.md +31 -0
- package/docs/budget-advisor.md +48 -0
- package/docs/command-reference.md +25 -0
- package/docs/companion-projects.md +9 -0
- package/docs/context-preservation.md +43 -0
- package/docs/how-it-works.md +25 -0
- package/docs/install-linux.md +32 -0
- package/docs/install.md +56 -0
- package/docs/memory.md +96 -0
- package/docs/observations.md +58 -0
- package/docs/release-history.md +42 -0
- package/docs/rules-and-privacy.md +37 -0
- package/docs/search.md +169 -0
- package/docs/session-management.md +153 -0
- package/docs/session-notes.md +64 -0
- package/docs/skills.md +45 -0
- package/docs/task-bus.md +1 -2
- package/docs/use-cases.md +194 -0
- package/docs/what-you-can-ask.md +78 -0
- package/docs/worker-providers.md +58 -0
- package/docs/zettelkasten.md +37 -0
- package/package.json +1 -1
- package/plugins/productivity/skills/Tasks/SKILL.md +1 -1
- package/src/hooks/ts/pre-tool-use/security-validator.test.ts +23 -0
- package/src/hooks/ts/pre-tool-use/security-validator.ts +1 -1
- package/src/hooks/ts/session-start/load-project-context.ts +1 -1
- package/dist/program-DiktbiWa.mjs.map +0 -1
- package/dist/run-DUZRSnIT.mjs.map +0 -1
|
@@ -918,6 +918,10 @@ function salvageOnExit(ledger, id, label, wtDir, timeoutMs) {
|
|
|
918
918
|
paths: committed.join(","),
|
|
919
919
|
skipped: skipped.length
|
|
920
920
|
});
|
|
921
|
+
if (skipped.length) appendLedger(ledger, "WORKER-NOTE", {
|
|
922
|
+
id,
|
|
923
|
+
note: `salvage skipped: ${skipped.join("; ")}`
|
|
924
|
+
});
|
|
921
925
|
return committed;
|
|
922
926
|
} catch (e) {
|
|
923
927
|
try {
|
|
@@ -1007,8 +1011,10 @@ function salvageUncommitted(wtDir, label, timeoutMs) {
|
|
|
1007
1011
|
skipped: []
|
|
1008
1012
|
};
|
|
1009
1013
|
const skipped = [];
|
|
1014
|
+
const missing = new Set(git(wtDir, ["ls-files", "--deleted"], timeoutMs).split("\n").filter(Boolean));
|
|
1010
1015
|
const toStage = [];
|
|
1011
|
-
for (const p of paths) if (
|
|
1016
|
+
for (const p of paths) if (missing.has(p)) skipped.push(`${p} (missing, not committed)`);
|
|
1017
|
+
else if (symlinkEscapesWorktree(wtDir, p)) skipped.push(`symlink ${p} -> ${readlinkSync(join(wtDir, p))} (points outside the worktree)`);
|
|
1012
1018
|
else toStage.push(p);
|
|
1013
1019
|
if (!toStage.length) return {
|
|
1014
1020
|
committed: [],
|
|
@@ -1017,11 +1023,21 @@ function salvageUncommitted(wtDir, label, timeoutMs) {
|
|
|
1017
1023
|
try {
|
|
1018
1024
|
git(wtDir, [
|
|
1019
1025
|
"add",
|
|
1020
|
-
"-
|
|
1026
|
+
"--ignore-removal",
|
|
1021
1027
|
"--",
|
|
1022
1028
|
".",
|
|
1023
1029
|
...paths.filter((p) => !toStage.includes(p)).map((p) => `:(exclude,literal)${p}`)
|
|
1024
1030
|
], timeoutMs);
|
|
1031
|
+
const deleted = git(wtDir, [
|
|
1032
|
+
"diff",
|
|
1033
|
+
"--cached",
|
|
1034
|
+
"--diff-filter=D",
|
|
1035
|
+
"--name-only"
|
|
1036
|
+
], timeoutMs).split("\n").filter(Boolean);
|
|
1037
|
+
if (deleted.length > MAX_SALVAGE_DELETES) {
|
|
1038
|
+
git(wtDir, ["reset", "-q"], timeoutMs);
|
|
1039
|
+
throw new Error(`salvage would delete ${deleted.length} tracked files (${deleted.slice(0, 5).join(", ")}, ...), refused`);
|
|
1040
|
+
}
|
|
1025
1041
|
git(wtDir, [
|
|
1026
1042
|
"commit",
|
|
1027
1043
|
"-m",
|
|
@@ -1035,6 +1051,8 @@ function salvageUncommitted(wtDir, label, timeoutMs) {
|
|
|
1035
1051
|
skipped
|
|
1036
1052
|
};
|
|
1037
1053
|
}
|
|
1054
|
+
/** A salvage commit that deletes more tracked files than this is refused. */
|
|
1055
|
+
const MAX_SALVAGE_DELETES = 5;
|
|
1038
1056
|
/**
|
|
1039
1057
|
* The dirty paths of a checkout, parsed from `git status --porcelain -z`:
|
|
1040
1058
|
* NUL-separated (a path with a newline in it cannot corrupt the parse),
|
|
@@ -3505,7 +3523,7 @@ async function runWorker(opts) {
|
|
|
3505
3523
|
if (gc?.length) process.stderr.write(`pai worker: archived ${gc.length} leftover worktree(s) (pai worker gc)\n`);
|
|
3506
3524
|
} catch {}
|
|
3507
3525
|
if (opts.className === "plan" && !opts._planner) {
|
|
3508
|
-
const { runPlanner } = await import("./planner-
|
|
3526
|
+
const { runPlanner } = await import("./planner-DAq4Yx-H.mjs");
|
|
3509
3527
|
return runPlanner(opts);
|
|
3510
3528
|
}
|
|
3511
3529
|
const parent = launchParent(opts.parent);
|
|
@@ -4673,4 +4691,4 @@ function resultFromOutput(out) {
|
|
|
4673
4691
|
|
|
4674
4692
|
//#endregion
|
|
4675
4693
|
export { expandMcpNames as $, ledgerSummary as A, loadStatuses as B, discardWorker as C, uncommittedPaths as D, mergeWorker as E, contextPercent as F, setWorkerLabel as G, nowStamp as H, elapsedOf as I, parseRunnerArgs as J, waitForTerminalStatus as K, isChatPane as L, ageOf as M, alive as N, worktreesDir as O, contextLabel as P, describeMcp as Q, isLive as R, workerInScope as S, git as T, ownsPid as U, newWorkerId as V, saveStatus as W, pinNotices as X, shortText as Y, projectLaunchConfig as Z, itermForClaudeSession as _, parseWorkerReport as a, sessionMapPath as b, readInbox as c, checkPaneForWorker as d, openFollowPane as f, currentTabKey as g, markControlsHeld as h, usageContextTokens as i, UNLABELED as j, appendLedger as k, sayToWorker as l, clickrControlsArgv as m, runWorker as n, renderReport as o, openPaneForWorker as p, longInlinePromptHint as q, testProvider as r, handoffFromInside as s, printResult as t, workerDepth as u, itermUuid as v, gcWorktrees as w, sessionTag as x, resolveSession as y, loadStatus as z };
|
|
4676
|
-
//# sourceMappingURL=run-
|
|
4694
|
+
//# sourceMappingURL=run-uAkNItb6.mjs.map
|