@tekmidian/pai 1.0.4 → 1.0.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/.claude-plugin/plugin.json +1 -1
- package/dist/{aibroker-client-CQPGqLxL.mjs → aibroker-client-CXsyC7A8.mjs} +2 -2
- package/dist/aibroker-client-ChB7gSxV.mjs +3 -0
- package/dist/auto-route-Bc8xP6TQ.mjs +11 -0
- package/dist/{auto-route-21GdHL70.mjs → auto-route-YaEGVrFl.mjs} +2 -2
- package/dist/budget-DEiebT2A.mjs +15 -0
- package/dist/{caller-identity-yLFb7CKq.mjs → caller-identity-C6Nc96iM.mjs} +4 -4
- package/dist/{capacity-DEveQdFV.mjs → capacity-B2PgKAg4.mjs} +69 -6
- package/dist/{chain-D7PFur8Y.mjs → chain-CtK49-Ma.mjs} +5 -5
- package/dist/cli/index.mjs +2126 -290
- package/dist/{cockpit-actions-BfRMr2sm.mjs → cockpit-actions-C73mJAJ8.mjs} +18 -18
- package/dist/{cockpit-actions-OodH_vx_.mjs → cockpit-actions-D1OPP6Es.mjs} +30 -26
- package/dist/cockpit-memory-CLHZD64W.mjs +20 -0
- package/dist/config/defaults/config.yaml +21 -1
- package/dist/{config-XpZWOYOG.mjs → config-Bz8pAU5Q.mjs} +30 -5
- package/dist/{config-DtENJ6cL.mjs → config-DHgPx3ER.mjs} +1 -1
- package/dist/config-DLmyEK2q.mjs +4 -0
- package/dist/{config-Bu1_vbY8.mjs → config-SlZ-Z52i.mjs} +4 -3
- package/dist/{controls-JLm6g0yP.mjs → controls-rIItFeIJ.mjs} +59 -66
- package/dist/daemon/index.mjs +40 -39
- package/dist/daemon-176qA79N.mjs +46 -0
- package/dist/{daemon-nXanenDM.mjs → daemon-SoUvPUOf.mjs} +80 -30
- package/dist/daemon-mcp/index.mjs +49 -38
- package/dist/detect-C8nFP-kR.mjs +10 -0
- package/dist/{detect-BLKsUOgG.mjs → detect-DLjeYwnt.mjs} +2 -2
- package/dist/{embed-pass-e64AwDCa.mjs → embed-pass-CN1D8MXl.mjs} +5 -5
- package/dist/{embedding-gate-Cnk4YCyX.mjs → embedding-gate-BVQvUmox.mjs} +2 -2
- package/dist/{embedding-gate-6rZrWRXa.mjs → embedding-gate-iq0oQEkF.mjs} +3 -3
- package/dist/{endreason-BC-v05H_.mjs → endreason-C2-hYK0_.mjs} +4 -4
- package/dist/{factory-B7nv75rC.mjs → factory-CYwa0jYj.mjs} +6 -6
- package/dist/factory-DFwez99M.mjs +9 -0
- package/dist/{fallback-CBWpp2F2.mjs → fallback-CwPSCrX8.mjs} +9 -231
- package/dist/{health-C4FQmkJn.mjs → health-D0mUAVdw.mjs} +5 -5
- package/dist/{helpers-DSNK_1KP.mjs → helpers-Dj2nY56t.mjs} +2 -2
- package/dist/{helpers-Dz7mjTSw.mjs → helpers-DyHKAwrW.mjs} +6 -6
- package/dist/hooks/block-sleep-poll.mjs +1 -1
- package/dist/hooks/capture-all-events.mjs +68 -3
- package/dist/hooks/capture-tool-output.mjs +68 -3
- package/dist/hooks/handoff-link.mjs +128 -0
- package/dist/hooks/load-project-context.mjs +8 -8
- package/dist/hooks/local-model-hint.mjs +1 -1
- package/dist/hooks/route-agents-to-worker.mjs +1 -1
- package/dist/hooks/security-validator.mjs +842 -90
- package/dist/hooks/supervision-banner.mjs +186 -48
- package/dist/hooks/worker-edit-repair.mjs +2 -2
- package/dist/hooks/worker-guard.mjs +65 -9
- package/dist/hooks/worker-note.mjs +70 -5
- package/dist/hooks/worker-pool-host.mjs +1518 -265
- package/dist/hooks/worker-proxy.mjs +1 -1
- package/dist/hooks/worker-status-line.mjs +225 -86
- package/dist/hooks/worker-supervision.mjs +1 -1
- package/dist/hooks/worker-tool-name-repair.mjs +2 -2
- package/dist/index.mjs +9 -9
- package/dist/{ipc-client-CnYEF31R.mjs → ipc-client-CmagIFLh.mjs} +2 -2
- package/dist/{ipc-client-DN7EvoVo.mjs → ipc-client-DmbSIBUK.mjs} +1 -1
- package/dist/{kill-tree-DleMNZX3.mjs → kill-tree-DPiMscaY.mjs} +8 -8
- package/dist/kill-tree-Dxei6qlR.mjs +10 -0
- package/dist/{launch-DlZTKE3u.mjs → launch-BZT3JDoZ.mjs} +3 -3
- package/dist/{launch-Di7N-J5X.mjs → launch-Bn2Zf90h.mjs} +3 -3
- package/dist/{indexer-backend-BdjeL4P8.mjs → lessons-CFVU0cwA.mjs} +262 -43
- package/dist/{local-candidate-DLdwQt0s.mjs → local-candidate-DFd4pp-w.mjs} +3 -3
- package/dist/{local-instances-DOxSgT_L.mjs → local-instances-DhF4_sV2.mjs} +2 -2
- package/dist/{local-instances-ZeRkkuS5.mjs → local-instances-KTh8IeOT.mjs} +4 -4
- package/dist/{local-tiers-BE4jGaMa.mjs → local-tiers-CqwGUcEn.mjs} +3 -3
- package/dist/{local-tiers-DNMI5W86.mjs → local-tiers-DSlIYvvm.mjs} +3 -3
- package/dist/{main-config-ops-kTXR8Pyv.mjs → main-config-ops-rda08BCD.mjs} +3 -3
- package/dist/{main-resolver-yp_puSSb.mjs → main-resolver-BKwI0I6H.mjs} +18 -18
- package/dist/{migrate-DrA_OwlZ.mjs → migrate-C2z1YmWC.mjs} +2 -2
- package/dist/{model-inventory-h6Z9fN_o.mjs → model-inventory-BXv15B0d.mjs} +13 -13
- package/dist/{models-add-TVni3A7V.mjs → models-add-5yXTyz3g.mjs} +38 -37
- package/dist/operator-Bmv5tiHQ.mjs +7 -0
- package/dist/{operator-CyuB3aVw.mjs → operator-Br6GeswF.mjs} +2 -2
- package/dist/{pai-marker-BcZyJguM.mjs → pai-marker-D6OoVbM_.mjs} +2 -2
- package/dist/{pane-audit-Lqy9N_Ki.mjs → pane-audit-DLYy9-4g.mjs} +13 -23
- package/dist/{paths-CHifubDh.mjs → paths-CypxFTfn.mjs} +4 -4
- package/dist/{paths-CFHTloSe.mjs → paths-DIOwNcj-.mjs} +3 -3
- package/dist/{planner-j77ndkBf.mjs → planner-BzZ_2lc-.mjs} +29 -29
- package/dist/{pool-Dh-q3iJi.mjs → pool-9EsbKD-U.mjs} +2 -2
- package/dist/{pool-cli-DQ6OzRy2.mjs → pool-cli-Cy5mlycP.mjs} +6 -6
- package/dist/{pool-cli-BggU8GRp.mjs → pool-cli-Db0uDwB9.mjs} +5 -5
- package/dist/{postgres-BK4FP9Zg.mjs → postgres-B1B80bcj.mjs} +3 -3
- package/dist/{postgres-DNIOQijl.mjs → postgres-BL5oBBgY.mjs} +3 -3
- package/dist/{project-setup-CBRtFFh0.mjs → project-setup-DHxdJjEc.mjs} +24 -25
- package/dist/providers-BH6hQYbU.mjs +16 -0
- package/dist/{providers-C9QC0TtO.mjs → providers-BNV7CzC-.mjs} +6 -6
- package/dist/{query-feedback-DN52N9C5.mjs → query-feedback-BWl2HRwN.mjs} +2 -2
- package/dist/registrable-BwFiqazy.mjs +9 -0
- package/dist/{registrable-DpyTtajg.mjs → registrable-Dxs4oKIj.mjs} +4 -4
- package/dist/render-DVGXpfaT.mjs +13 -0
- package/dist/render-jPpMrudf.mjs +2240 -0
- package/dist/root-C8cxhdn9.mjs +36 -0
- package/dist/{root-C4oXlXS_.mjs → root-DmOzMeSv.mjs} +10 -10
- package/dist/route-table-COAmc1nB.mjs +15 -0
- package/dist/{router-CQSc3lk3.mjs → router-D2476pOp.mjs} +2 -2
- package/dist/{router-DwHJRgG9.mjs → router-ghujlEFb.mjs} +1 -1
- package/dist/{routing-f2zulGwD.mjs → routing-B_cg1_Xx.mjs} +13 -13
- package/dist/{routing-DmkheCRH.mjs → routing-aJKMIagQ.mjs} +16 -16
- package/dist/{run-BwZKBJZZ.mjs → run-DE9Q0ldN.mjs} +55 -31
- package/dist/{runtime-paths-WsO9sJFc.mjs → runtime-paths-twfV23YL.mjs} +2 -2
- package/dist/{scan-BBGvU5EB.mjs → scan-CNMcltOX.mjs} +7 -7
- package/dist/{scope-D-h6F6DN.mjs → scope-BTWstJ1B.mjs} +4 -4
- package/dist/session-DgZifjLx.mjs +35 -0
- package/dist/{session-Dn5OJXlg.mjs → session-HBYOABWU.mjs} +28 -28
- package/dist/session-scan-BZxnYN1v.mjs +9 -0
- package/dist/{session-scan-DUn10MBd.mjs → session-scan-CX3MKCNg.mjs} +6 -6
- package/dist/{session-usage-CPvXvSkw.mjs → session-usage-CCmPFFa6.mjs} +117 -2
- package/dist/{status-ggJ7lgVg.mjs → status-Cecau8Ps.mjs} +9 -5
- package/dist/status-D52xC_i0.mjs +6 -0
- package/dist/{tool-errors-7E13StWd.mjs → tool-errors-BFw1gv-z.mjs} +2 -2
- package/dist/{tool-errors-CJWODvlo.mjs → tool-errors-COM2JGEr.mjs} +6 -6
- package/dist/viewer-Ce-Xa9L3.mjs +22 -0
- package/dist/{viewer-wfKnvnrI.mjs → viewer-DvBg6N22.mjs} +16 -14
- package/dist/{wait-ByV0OyMZ.mjs → wait-C5iWILj_.mjs} +3 -3
- package/dist/worker-config-BmcJ9R0U.mjs +42 -0
- package/dist/{worker-config-eY5Qy4vl.mjs → worker-config-DkONNk_H.mjs} +164 -107
- package/dist/workers-config-DwzrtdYu.mjs +4 -0
- package/dist/{worktree-CRs2gyg0.mjs → worktree-O_kU6Q3y.mjs} +164 -8
- package/dist/{zettelkasten-tpCRBYvH.mjs → zettelkasten-BH8AdNh8.mjs} +4 -4
- package/dist/{zettelkasten-_h_tUm2T.mjs → zettelkasten-FFhQFESJ.mjs} +2 -2
- package/docs/commands/README.md +33 -2
- package/docs/commands/audit.md +34 -3
- package/docs/commands/backup.md +1 -1
- package/docs/commands/build.md +4 -4
- package/docs/commands/cd.md +1 -1
- package/docs/commands/clear-names.md +1 -1
- package/docs/commands/cockpit.md +1 -1
- package/docs/commands/config.md +21 -1
- package/docs/commands/daemon.md +1 -1
- package/docs/commands/db.md +1 -1
- package/docs/commands/doc.md +1 -1
- package/docs/commands/end.md +1 -1
- package/docs/commands/find.md +1 -1
- package/docs/commands/git.md +110 -0
- package/docs/commands/handoff.md +70 -0
- package/docs/commands/harness.md +74 -0
- package/docs/commands/help.md +1 -1
- package/docs/commands/home.md +1 -1
- package/docs/commands/hooks-db.md +1 -1
- package/docs/commands/identity.md +1 -1
- package/docs/commands/install.md +1 -1
- package/docs/commands/issue.md +1 -1
- package/docs/commands/kg.md +1 -1
- package/docs/commands/launch.md +1 -1
- package/docs/commands/lessons.md +201 -0
- package/docs/commands/list.md +1 -1
- package/docs/commands/ls.md +1 -1
- package/docs/commands/mcp.md +1 -1
- package/docs/commands/memory.md +1 -1
- package/docs/commands/models.md +1 -1
- package/docs/commands/more.md +1 -1
- package/docs/commands/new.md +1 -1
- package/docs/commands/notes.md +1 -1
- package/docs/commands/notify.md +1 -1
- package/docs/commands/observation.md +1 -1
- package/docs/commands/obsidian.md +1 -1
- package/docs/commands/open.md +1 -1
- package/docs/commands/pane.md +1 -1
- package/docs/commands/pause.md +1 -1
- package/docs/commands/plan.md +1 -1
- package/docs/commands/project.md +1 -1
- package/docs/commands/projects.md +1 -1
- package/docs/commands/providers.md +1 -1
- package/docs/commands/queue.md +1 -1
- package/docs/commands/registry.md +1 -1
- package/docs/commands/reload.md +1 -1
- package/docs/commands/rename.md +1 -1
- package/docs/commands/restore.md +1 -1
- package/docs/commands/resume.md +1 -1
- package/docs/commands/router.md +1 -1
- package/docs/commands/rules.md +70 -0
- package/docs/commands/session.md +1 -1
- package/docs/commands/sessions.md +1 -1
- package/docs/commands/setup.md +1 -1
- package/docs/commands/setups.md +1 -1
- package/docs/commands/shell-init.md +1 -1
- package/docs/commands/skill.md +1 -1
- package/docs/commands/task.md +1 -1
- package/docs/commands/tasks.md +1 -1
- package/docs/commands/topic.md +1 -1
- package/docs/commands/update.md +1 -1
- package/docs/commands/worker.md +1 -1
- package/docs/commands/zettel.md +1 -1
- package/docs/concepts/panes.md +3 -2
- package/gemini-extension.json +1 -1
- package/package.json +2 -2
- package/pai-plugin.json +1 -1
- package/plugins/context-preservation/plugin.json +1 -1
- package/plugins/core/plugin.json +1 -1
- package/plugins/creative/plugin.json +1 -1
- package/plugins/observability/plugin.json +1 -1
- package/plugins/productivity/plugin.json +1 -1
- package/plugins/semantic-search/plugin.json +1 -1
- package/plugins/ui/plugin.json +1 -1
- package/plugins/zettelkasten/plugin.json +1 -1
- package/src/hooks/ts/lib/loop-guard.ts +3 -5
- package/src/hooks/ts/lib/rules/builtin/base64-decode-to-shell.rule.yaml +13 -0
- package/src/hooks/ts/lib/rules/builtin/chmod-world-writable.rule.yaml +13 -0
- package/src/hooks/ts/lib/rules/builtin/chmod-zero.rule.yaml +11 -0
- package/src/hooks/ts/lib/rules/builtin/credential-file-read.rule.yaml +13 -0
- package/src/hooks/ts/lib/rules/builtin/credential-read-then-network.rule.yaml +29 -0
- package/src/hooks/ts/lib/rules/builtin/crontab-persistence.rule.yaml +10 -0
- package/src/hooks/ts/lib/rules/builtin/curl-piped-to-shell.rule.yaml +15 -0
- package/src/hooks/ts/lib/rules/builtin/download-then-execute.rule.yaml +30 -0
- package/src/hooks/ts/lib/rules/builtin/find-root-delete.rule.yaml +11 -0
- package/src/hooks/ts/lib/rules/builtin/git-push-force.rule.yaml +24 -0
- package/src/hooks/ts/lib/rules/builtin/git-push-plus-refspec.rule.yaml +12 -0
- package/src/hooks/ts/lib/rules/builtin/git-reset-hard.rule.yaml +12 -0
- package/src/hooks/ts/lib/rules/builtin/injection-then-tool.rule.yaml +30 -0
- package/src/hooks/ts/lib/rules/builtin/instruction-override-disregard.rule.yaml +12 -0
- package/src/hooks/ts/lib/rules/builtin/instruction-override-ignore.rule.yaml +13 -0
- package/src/hooks/ts/lib/rules/builtin/launchagents-write-persistence.rule.yaml +12 -0
- package/src/hooks/ts/lib/rules/builtin/launchctl-load-persistence.rule.yaml +10 -0
- package/src/hooks/ts/lib/rules/builtin/reverse-shell-dev-tcp.rule.yaml +11 -0
- package/src/hooks/ts/lib/rules/builtin/reverse-shell-interactive-bash.rule.yaml +11 -0
- package/src/hooks/ts/lib/rules/builtin/rm-recursive-parent.rule.yaml +11 -0
- package/src/hooks/ts/lib/rules/builtin/rm-recursive-relative.rule.yaml +11 -0
- package/src/hooks/ts/lib/rules/builtin/rm-recursive-root.rule.yaml +24 -0
- package/src/hooks/ts/lib/rules/builtin/rm-trailing-tilde.rule.yaml +11 -0
- package/src/hooks/ts/lib/rules/builtin/sudoers-nopasswd.rule.yaml +15 -0
- package/src/hooks/ts/lib/rules/builtin.generated.ts +530 -0
- package/src/hooks/ts/lib/rules/eval.ts +74 -0
- package/src/hooks/ts/lib/rules/lint.ts +102 -0
- package/src/hooks/ts/lib/rules/load.ts +229 -0
- package/src/hooks/ts/lib/rules/types.ts +56 -0
- package/src/hooks/ts/pre-tool-use/security-validator.ts +27 -96
- package/src/hooks/ts/user-prompt/handoff-link.ts +34 -0
- package/dist/aibroker-client-BxzeEHPF.mjs +0 -3
- package/dist/auto-route-C3S2W3Bc.mjs +0 -11
- package/dist/budget-BrloTOZW.mjs +0 -15
- package/dist/cockpit-memory-teG9M8bG.mjs +0 -20
- package/dist/config-Cxi-aBf4.mjs +0 -4
- package/dist/daemon-DeYImF1F.mjs +0 -45
- package/dist/detect-Rrimh0xc.mjs +0 -10
- package/dist/factory-Bs9imVMq.mjs +0 -9
- package/dist/kill-tree-SV6hrIa3.mjs +0 -10
- package/dist/operator-BTqvTIc8.mjs +0 -7
- package/dist/providers-FvCLzFge.mjs +0 -16
- package/dist/registrable-BzH4TObg.mjs +0 -9
- package/dist/render-B35bQTE-.mjs +0 -13
- package/dist/render-C84BqQRC.mjs +0 -903
- package/dist/root-DD1xx_Vu.mjs +0 -36
- package/dist/route-table-FEfDuhIV.mjs +0 -15
- package/dist/session-BAhtXdxj.mjs +0 -35
- package/dist/session-scan-B57dNuA4.mjs +0 -9
- package/dist/status-Dm4dYciN.mjs +0 -6
- package/dist/viewer-DEySE4c_.mjs +0 -22
- package/dist/worker-config-CO5FXLAT.mjs +0 -41
- package/dist/workers-config-f8KrkY4L.mjs +0 -4
|
@@ -7408,7 +7408,7 @@ function parseEscalate(v, bad2) {
|
|
|
7408
7408
|
}
|
|
7409
7409
|
|
|
7410
7410
|
// src/workers/config.ts
|
|
7411
|
-
import { existsSync as existsSync6, readFileSync as readFileSync6 } from "node:fs";
|
|
7411
|
+
import { existsSync as existsSync6, readFileSync as readFileSync6, statSync as statSync2 } from "node:fs";
|
|
7412
7412
|
|
|
7413
7413
|
// src/daemon/config.ts
|
|
7414
7414
|
import { homedir as homedir2, userInfo } from "node:os";
|
|
@@ -7445,7 +7445,7 @@ var require_public_api = __commonJS({
|
|
|
7445
7445
|
}
|
|
7446
7446
|
return doc;
|
|
7447
7447
|
}
|
|
7448
|
-
function
|
|
7448
|
+
function parse5(src, reviver, options) {
|
|
7449
7449
|
let _reviver = void 0;
|
|
7450
7450
|
if (typeof reviver === "function") {
|
|
7451
7451
|
_reviver = reviver;
|
|
@@ -7486,7 +7486,7 @@ var require_public_api = __commonJS({
|
|
|
7486
7486
|
return value.toString(options);
|
|
7487
7487
|
return new Document5.Document(value, _replacer, options).toString(options);
|
|
7488
7488
|
}
|
|
7489
|
-
exports.parse =
|
|
7489
|
+
exports.parse = parse5;
|
|
7490
7490
|
exports.parseAllDocuments = parseAllDocuments;
|
|
7491
7491
|
exports.parseDocument = parseDocument5;
|
|
7492
7492
|
exports.stringify = stringify2;
|
|
@@ -8322,7 +8322,7 @@ var init_loopback = __esm({
|
|
|
8322
8322
|
});
|
|
8323
8323
|
|
|
8324
8324
|
// src/workers/config.ts
|
|
8325
|
-
import { existsSync as existsSync6, readFileSync as readFileSync6 } from "node:fs";
|
|
8325
|
+
import { existsSync as existsSync6, readFileSync as readFileSync6, statSync as statSync2 } from "node:fs";
|
|
8326
8326
|
function nativeAnthropicModels() {
|
|
8327
8327
|
const d = shippedWorkersDefaults();
|
|
8328
8328
|
const providers = d.providers;
|
|
@@ -9452,7 +9452,7 @@ import {
|
|
|
9452
9452
|
readdirSync as readdirSync2,
|
|
9453
9453
|
renameSync as renameSync4,
|
|
9454
9454
|
rmSync,
|
|
9455
|
-
statSync as
|
|
9455
|
+
statSync as statSync3,
|
|
9456
9456
|
writeFileSync as writeFileSync3
|
|
9457
9457
|
} from "node:fs";
|
|
9458
9458
|
import { join as join8 } from "node:path";
|
|
@@ -9560,7 +9560,7 @@ function ownsPid(status) {
|
|
|
9560
9560
|
env: { ...process.env, LC_ALL: "C" }
|
|
9561
9561
|
}).trim();
|
|
9562
9562
|
const psStart = Date.parse(out);
|
|
9563
|
-
const started = spawnTimeOf(status) ?? Date.parse(status.started.replace(" ", "T"));
|
|
9563
|
+
const started = status.procStart ?? spawnTimeOf(status) ?? Date.parse(status.started.replace(" ", "T"));
|
|
9564
9564
|
if (Number.isNaN(psStart) || Number.isNaN(started)) return alive(status.pid);
|
|
9565
9565
|
return Math.abs(psStart - started) <= 12e4;
|
|
9566
9566
|
} catch {
|
|
@@ -9763,7 +9763,7 @@ var init_pool = __esm({
|
|
|
9763
9763
|
|
|
9764
9764
|
// src/workers/worktree.ts
|
|
9765
9765
|
import { execFile, execFileSync as execFileSync5, spawnSync as spawnSync2 } from "node:child_process";
|
|
9766
|
-
import { existsSync as existsSync10, lstatSync, mkdirSync as mkdirSync6, readFileSync as readFileSync10, mkdtempSync, writeFileSync as writeFileSync6, readdirSync as readdirSync3, readlinkSync, realpathSync, rmSync as rmSync3, statSync as
|
|
9766
|
+
import { existsSync as existsSync10, lstatSync, mkdirSync as mkdirSync6, readFileSync as readFileSync10, mkdtempSync, writeFileSync as writeFileSync6, readdirSync as readdirSync3, readlinkSync, realpathSync, rmSync as rmSync3, statSync as statSync4 } from "node:fs";
|
|
9767
9767
|
function runGit(cwd2, args, env, timeout = 3e4) {
|
|
9768
9768
|
try {
|
|
9769
9769
|
return execFileSync5("git", ["-C", cwd2, ...args], {
|
|
@@ -9813,6 +9813,7 @@ var init_worktree = __esm({
|
|
|
9813
9813
|
init_paths();
|
|
9814
9814
|
init_pending();
|
|
9815
9815
|
init_pool();
|
|
9816
|
+
init_config2();
|
|
9816
9817
|
}
|
|
9817
9818
|
});
|
|
9818
9819
|
|
|
@@ -9832,7 +9833,7 @@ var init_fmt_age = __esm({
|
|
|
9832
9833
|
});
|
|
9833
9834
|
|
|
9834
9835
|
// src/workers/pending.ts
|
|
9835
|
-
import { existsSync as existsSync11, readFileSync as readFileSync11, statSync as
|
|
9836
|
+
import { existsSync as existsSync11, readFileSync as readFileSync11, statSync as statSync5 } from "node:fs";
|
|
9836
9837
|
import { join as join10 } from "node:path";
|
|
9837
9838
|
function toplevel(dir) {
|
|
9838
9839
|
try {
|
|
@@ -9864,7 +9865,7 @@ function pendingResults(logDir, repoRoot, now = Date.now()) {
|
|
|
9864
9865
|
if (!commits && !dirty) continue;
|
|
9865
9866
|
let ageMs = 0;
|
|
9866
9867
|
try {
|
|
9867
|
-
ageMs = Math.max(0, now -
|
|
9868
|
+
ageMs = Math.max(0, now - statSync5(statusPath(logDir, st.id)).mtimeMs);
|
|
9868
9869
|
} catch {
|
|
9869
9870
|
}
|
|
9870
9871
|
out.push({ id: st.id, label: st.label, repo, ageMs, age: fmtAge(ageMs, { dayAfterHours: 48 }), commits, dirty });
|
|
@@ -9958,27 +9959,6 @@ var init_pane_title = __esm({
|
|
|
9958
9959
|
}
|
|
9959
9960
|
});
|
|
9960
9961
|
|
|
9961
|
-
// src/workers/chatui.ts
|
|
9962
|
-
var init_chatui = __esm({
|
|
9963
|
-
"src/workers/chatui.ts"() {
|
|
9964
|
-
"use strict";
|
|
9965
|
-
}
|
|
9966
|
-
});
|
|
9967
|
-
|
|
9968
|
-
// src/workers/deadline.ts
|
|
9969
|
-
var init_deadline = __esm({
|
|
9970
|
-
"src/workers/deadline.ts"() {
|
|
9971
|
-
"use strict";
|
|
9972
|
-
}
|
|
9973
|
-
});
|
|
9974
|
-
|
|
9975
|
-
// src/workers/active-time.ts
|
|
9976
|
-
var init_active_time = __esm({
|
|
9977
|
-
"src/workers/active-time.ts"() {
|
|
9978
|
-
"use strict";
|
|
9979
|
-
}
|
|
9980
|
-
});
|
|
9981
|
-
|
|
9982
9962
|
// src/workers/stagger.ts
|
|
9983
9963
|
var init_stagger = __esm({
|
|
9984
9964
|
"src/workers/stagger.ts"() {
|
|
@@ -9987,6 +9967,14 @@ var init_stagger = __esm({
|
|
|
9987
9967
|
}
|
|
9988
9968
|
});
|
|
9989
9969
|
|
|
9970
|
+
// src/workers/waiting.ts
|
|
9971
|
+
var init_waiting = __esm({
|
|
9972
|
+
"src/workers/waiting.ts"() {
|
|
9973
|
+
"use strict";
|
|
9974
|
+
init_args();
|
|
9975
|
+
}
|
|
9976
|
+
});
|
|
9977
|
+
|
|
9990
9978
|
// src/workers/capacity.ts
|
|
9991
9979
|
function resolveCap(maxConcurrent, local, localDefaultCap = DEFAULT_CAPACITY.localDefaultCap) {
|
|
9992
9980
|
return maxConcurrent ?? (local ? localDefaultCap : void 0);
|
|
@@ -9997,23 +9985,37 @@ var init_capacity = __esm({
|
|
|
9997
9985
|
"use strict";
|
|
9998
9986
|
init_stagger();
|
|
9999
9987
|
init_config3();
|
|
9988
|
+
init_waiting();
|
|
10000
9989
|
init_status();
|
|
10001
9990
|
DEFAULT_CAPACITY = { enabled: true, localDefaultCap: 1, uncappedQueueCap: 3, maxTotalWaitMs: 2 * 36e5, heartbeatMs: 6e4, agingMs: 15 * 6e4 };
|
|
10002
9991
|
}
|
|
10003
9992
|
});
|
|
10004
9993
|
|
|
10005
|
-
// src/workers/
|
|
10006
|
-
var
|
|
10007
|
-
"src/workers/
|
|
9994
|
+
// src/workers/chatui.ts
|
|
9995
|
+
var init_chatui = __esm({
|
|
9996
|
+
"src/workers/chatui.ts"() {
|
|
10008
9997
|
"use strict";
|
|
10009
9998
|
}
|
|
10010
9999
|
});
|
|
10011
10000
|
|
|
10012
|
-
// src/workers/
|
|
10013
|
-
var
|
|
10014
|
-
"src/workers/
|
|
10001
|
+
// src/workers/deadline.ts
|
|
10002
|
+
var init_deadline = __esm({
|
|
10003
|
+
"src/workers/deadline.ts"() {
|
|
10004
|
+
"use strict";
|
|
10005
|
+
}
|
|
10006
|
+
});
|
|
10007
|
+
|
|
10008
|
+
// src/workers/active-time.ts
|
|
10009
|
+
var init_active_time = __esm({
|
|
10010
|
+
"src/workers/active-time.ts"() {
|
|
10011
|
+
"use strict";
|
|
10012
|
+
}
|
|
10013
|
+
});
|
|
10014
|
+
|
|
10015
|
+
// src/workers/denials.ts
|
|
10016
|
+
var init_denials = __esm({
|
|
10017
|
+
"src/workers/denials.ts"() {
|
|
10015
10018
|
"use strict";
|
|
10016
|
-
init_args();
|
|
10017
10019
|
}
|
|
10018
10020
|
});
|
|
10019
10021
|
|
|
@@ -10195,6 +10197,147 @@ var init_endreason = __esm({
|
|
|
10195
10197
|
}
|
|
10196
10198
|
});
|
|
10197
10199
|
|
|
10200
|
+
// src/workers/ps-table.ts
|
|
10201
|
+
var PS_MAX_BUFFER;
|
|
10202
|
+
var init_ps_table = __esm({
|
|
10203
|
+
"src/workers/ps-table.ts"() {
|
|
10204
|
+
"use strict";
|
|
10205
|
+
PS_MAX_BUFFER = 64 * 1024 * 1024;
|
|
10206
|
+
}
|
|
10207
|
+
});
|
|
10208
|
+
|
|
10209
|
+
// src/workers/hang-probe.ts
|
|
10210
|
+
var init_hang_probe = __esm({
|
|
10211
|
+
"src/workers/hang-probe.ts"() {
|
|
10212
|
+
"use strict";
|
|
10213
|
+
init_ps_table();
|
|
10214
|
+
}
|
|
10215
|
+
});
|
|
10216
|
+
|
|
10217
|
+
// src/utils/redact.ts
|
|
10218
|
+
var REDACTED, REDACTED_RE, KEY_WORDS, VAL, REDACT_RULES, LINE_RULES, LONG_RUN, KEY_LINE;
|
|
10219
|
+
var init_redact = __esm({
|
|
10220
|
+
"src/utils/redact.ts"() {
|
|
10221
|
+
"use strict";
|
|
10222
|
+
REDACTED = "[REDACTED]";
|
|
10223
|
+
REDACTED_RE = String.raw`\[REDACTED\]`;
|
|
10224
|
+
KEY_WORDS = "password|passwd|secret|token|api[_-]?key|credential|auth(?:orization)?|bearer";
|
|
10225
|
+
VAL = String.raw`(?:"[^"]*"|'[^']*'|[^\s'"]+)`;
|
|
10226
|
+
REDACT_RULES = [
|
|
10227
|
+
{
|
|
10228
|
+
// `Authorization: Bearer xxx` / `Authorization: Basic xxx` — keep the scheme
|
|
10229
|
+
id: "authorization",
|
|
10230
|
+
re: /(Authorization\s*:\s*)(Bearer|Basic)\s+(\S+)/gi,
|
|
10231
|
+
replace: (_m, head, scheme) => `${head}${scheme} ${REDACTED}`
|
|
10232
|
+
},
|
|
10233
|
+
{
|
|
10234
|
+
// `key=value`, `key: value`, `"key": "value"` — key carries a secret-ish word;
|
|
10235
|
+
// the word must be a whole key segment, so `monkeys=` stays untouched
|
|
10236
|
+
id: "key-value",
|
|
10237
|
+
re: new RegExp(String.raw`(?<![A-Za-z0-9])((?:[A-Za-z0-9]+[_-])?(?:${KEY_WORDS})(?![A-Za-z0-9])[A-Za-z0-9_-]*)(\s*[:=]\s*)(?!(?:Bearer|Basic) ${REDACTED_RE})(${VAL})`, "gi"),
|
|
10238
|
+
replace: (_m, key, sep) => `${key}${sep}${REDACTED}`
|
|
10239
|
+
},
|
|
10240
|
+
{
|
|
10241
|
+
// `export FOO_TOKEN=...` / `FOO_KEY=...` — SCREAMING_SNAKE env style
|
|
10242
|
+
id: "env-style",
|
|
10243
|
+
re: new RegExp(String.raw`(?<![A-Za-z0-9])((?:export\s+)?[A-Z][A-Z0-9]*_(?:KEY|SECRET|TOKEN|PASS\w*|CRED\w*|AUTH\w*)\s*=\s*)(${VAL})`, "g"),
|
|
10244
|
+
replace: (_m, head) => `${head}${REDACTED}`
|
|
10245
|
+
},
|
|
10246
|
+
{
|
|
10247
|
+
// long CLI flags only: `--password X`, `--token X`, `--api-key X`, `--secret X`, `--passwd X`
|
|
10248
|
+
id: "cli-flag",
|
|
10249
|
+
re: new RegExp(String.raw`(--(?:password|token|api-key|secret|passwd)(?:\s*=\s*|\s+))(${VAL})`, "gi"),
|
|
10250
|
+
replace: (_m, head) => `${head}${REDACTED}`
|
|
10251
|
+
},
|
|
10252
|
+
{
|
|
10253
|
+
// `scheme://user:pass@host` — redact the password, keep user and host
|
|
10254
|
+
id: "url-credentials",
|
|
10255
|
+
re: /((?<![a-z0-9+.-])[a-z][a-z0-9+.-]*:\/\/[^\s/@:]+:)([^\s/@]+)(@)/gi,
|
|
10256
|
+
replace: (_m, head, _pass, at) => `${head}${REDACTED}${at}`
|
|
10257
|
+
},
|
|
10258
|
+
{
|
|
10259
|
+
// provider token prefixes: sk-ant-, sk-, ghp_/gho_/ghu_/ghs_/ghr_, github_pat_,
|
|
10260
|
+
// glpat-, xoxb-/xoxp-/xoxa-, AKIA/ASIA + 16 chars, AIza + 35 chars, JWT (eyJ… three segments)
|
|
10261
|
+
id: "token-prefix",
|
|
10262
|
+
re: /\b(?:sk-ant-[A-Za-z0-9_-]{20,}|sk-[A-Za-z0-9_-]{20,}|gh[pousr]_[A-Za-z0-9]{30,}|github_pat_[A-Za-z0-9_]{22,}|glpat-[A-Za-z0-9_-]{20,}|xox[bap]-[A-Za-z0-9-]{10,}|(?:AKIA|ASIA)[A-Z0-9]{16}|AIza[A-Za-z0-9_-]{35}(?![A-Za-z0-9_-])|eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+)(?![A-Za-z0-9_-])/g,
|
|
10263
|
+
replace: REDACTED
|
|
10264
|
+
},
|
|
10265
|
+
{
|
|
10266
|
+
// 40+ char opaque base64/hex run, only on a line that also has a secret-ish key word
|
|
10267
|
+
id: "long-run",
|
|
10268
|
+
re: /\b[A-Za-z0-9+/]{40,}={0,2}(?![\w/])/g,
|
|
10269
|
+
// a bare 40-hex git SHA stays; it is only redacted as the value of a secret key
|
|
10270
|
+
replace: (m) => /^[0-9a-f]{40}$/i.test(m) ? m : REDACTED
|
|
10271
|
+
}
|
|
10272
|
+
];
|
|
10273
|
+
LINE_RULES = REDACT_RULES.filter((r) => r.id !== "long-run");
|
|
10274
|
+
LONG_RUN = REDACT_RULES.find((r) => r.id === "long-run");
|
|
10275
|
+
KEY_LINE = new RegExp(`(?:${KEY_WORDS})`, "i");
|
|
10276
|
+
}
|
|
10277
|
+
});
|
|
10278
|
+
|
|
10279
|
+
// src/hooks/ts/lib/build-gate.ts
|
|
10280
|
+
var init_build_gate = __esm({
|
|
10281
|
+
"src/hooks/ts/lib/build-gate.ts"() {
|
|
10282
|
+
"use strict";
|
|
10283
|
+
}
|
|
10284
|
+
});
|
|
10285
|
+
|
|
10286
|
+
// src/hooks/ts/lib/loop-guard.ts
|
|
10287
|
+
var LOOP_MAX_REPEATS, LOOP_READ_STREAK, SELF, LOOP_DENY_REASON, WAIT_CAP_MS, FP_FULL_READ_BYTES, FP_TOTAL_BYTES;
|
|
10288
|
+
var init_loop_guard = __esm({
|
|
10289
|
+
"src/hooks/ts/lib/loop-guard.ts"() {
|
|
10290
|
+
"use strict";
|
|
10291
|
+
init_hang_probe();
|
|
10292
|
+
init_redact();
|
|
10293
|
+
init_build_gate();
|
|
10294
|
+
LOOP_MAX_REPEATS = 4;
|
|
10295
|
+
LOOP_READ_STREAK = Number(process.env.PAI_LOOP_READ_STREAK) > 0 ? Number(process.env.PAI_LOOP_READ_STREAK) : 15;
|
|
10296
|
+
SELF = "If your part is done, commit and write your R report. If you are stuck, report the blocker in R x= (or use pai worker help if available).";
|
|
10297
|
+
LOOP_DENY_REASON = `loop guard: you ran this command ${LOOP_MAX_REPEATS} times with the same result and nothing changed. Stop repeating it. ${SELF}`;
|
|
10298
|
+
WAIT_CAP_MS = 45 * 6e4;
|
|
10299
|
+
FP_FULL_READ_BYTES = 256 * 1024;
|
|
10300
|
+
FP_TOTAL_BYTES = 4 * 1024 * 1024;
|
|
10301
|
+
}
|
|
10302
|
+
});
|
|
10303
|
+
|
|
10304
|
+
// src/audit/scan.ts
|
|
10305
|
+
var init_scan = __esm({
|
|
10306
|
+
"src/audit/scan.ts"() {
|
|
10307
|
+
"use strict";
|
|
10308
|
+
init_loop_guard();
|
|
10309
|
+
}
|
|
10310
|
+
});
|
|
10311
|
+
|
|
10312
|
+
// src/hooks/ts/lib/rules/builtin.generated.ts
|
|
10313
|
+
var init_builtin_generated = __esm({
|
|
10314
|
+
"src/hooks/ts/lib/rules/builtin.generated.ts"() {
|
|
10315
|
+
"use strict";
|
|
10316
|
+
}
|
|
10317
|
+
});
|
|
10318
|
+
|
|
10319
|
+
// src/hooks/ts/lib/rules/load.ts
|
|
10320
|
+
var import_yaml6;
|
|
10321
|
+
var init_load = __esm({
|
|
10322
|
+
"src/hooks/ts/lib/rules/load.ts"() {
|
|
10323
|
+
"use strict";
|
|
10324
|
+
import_yaml6 = __toESM(require_dist(), 1);
|
|
10325
|
+
init_pai_home();
|
|
10326
|
+
init_builtin_generated();
|
|
10327
|
+
}
|
|
10328
|
+
});
|
|
10329
|
+
|
|
10330
|
+
// src/workers/scan.ts
|
|
10331
|
+
var init_scan2 = __esm({
|
|
10332
|
+
"src/workers/scan.ts"() {
|
|
10333
|
+
"use strict";
|
|
10334
|
+
init_scan();
|
|
10335
|
+
init_load();
|
|
10336
|
+
init_paths();
|
|
10337
|
+
init_status();
|
|
10338
|
+
}
|
|
10339
|
+
});
|
|
10340
|
+
|
|
10198
10341
|
// src/workers/render.ts
|
|
10199
10342
|
function shortModel(model) {
|
|
10200
10343
|
const raw = String(model ?? "").trim();
|
|
@@ -10257,6 +10400,7 @@ var init_render = __esm({
|
|
|
10257
10400
|
init_scope();
|
|
10258
10401
|
init_endreason();
|
|
10259
10402
|
init_report();
|
|
10403
|
+
init_scan2();
|
|
10260
10404
|
}
|
|
10261
10405
|
});
|
|
10262
10406
|
|
|
@@ -10266,6 +10410,8 @@ var init_pane_bar = __esm({
|
|
|
10266
10410
|
"use strict";
|
|
10267
10411
|
init_chatui();
|
|
10268
10412
|
init_render();
|
|
10413
|
+
init_capacity();
|
|
10414
|
+
init_pane_exec();
|
|
10269
10415
|
init_pane_policy();
|
|
10270
10416
|
}
|
|
10271
10417
|
});
|
|
@@ -10275,20 +10421,12 @@ var init_pane_exec = __esm({
|
|
|
10275
10421
|
"src/workers/pane-exec.ts"() {
|
|
10276
10422
|
"use strict";
|
|
10277
10423
|
init_pai_home();
|
|
10424
|
+
init_capacity();
|
|
10278
10425
|
init_pane_bar();
|
|
10279
10426
|
init_pane_policy();
|
|
10280
10427
|
}
|
|
10281
10428
|
});
|
|
10282
10429
|
|
|
10283
|
-
// src/workers/ps-table.ts
|
|
10284
|
-
var PS_MAX_BUFFER;
|
|
10285
|
-
var init_ps_table = __esm({
|
|
10286
|
-
"src/workers/ps-table.ts"() {
|
|
10287
|
-
"use strict";
|
|
10288
|
-
PS_MAX_BUFFER = 64 * 1024 * 1024;
|
|
10289
|
-
}
|
|
10290
|
-
});
|
|
10291
|
-
|
|
10292
10430
|
// src/workers/pane.ts
|
|
10293
10431
|
var FIND_SESSION, CAPTURE_ACTIVE, RESTORE_ACTIVE, REBALANCE, TAB_SIZES_SCRIPT, WORKER_SPLIT_SCRIPT, TAB_TTYS_SCRIPT, WINDOW_BOUNDS_SCRIPT, SPLIT_SCRIPT, SESSION_TTY_SCRIPT, END_SESSION_SCRIPT, REBALANCE_SCRIPT, VERIFY_PANE_SCRIPT, HOST_TAB_SCRIPT;
|
|
10294
10432
|
var init_pane = __esm({
|
|
@@ -10591,11 +10729,11 @@ var init_run_lock = __esm({
|
|
|
10591
10729
|
});
|
|
10592
10730
|
|
|
10593
10731
|
// src/workers/plan.ts
|
|
10594
|
-
var
|
|
10732
|
+
var import_yaml7;
|
|
10595
10733
|
var init_plan = __esm({
|
|
10596
10734
|
"src/workers/plan.ts"() {
|
|
10597
10735
|
"use strict";
|
|
10598
|
-
|
|
10736
|
+
import_yaml7 = __toESM(require_dist(), 1);
|
|
10599
10737
|
}
|
|
10600
10738
|
});
|
|
10601
10739
|
|
|
@@ -10653,11 +10791,11 @@ var init_run_events = __esm({
|
|
|
10653
10791
|
});
|
|
10654
10792
|
|
|
10655
10793
|
// src/workers/local-tiers.ts
|
|
10656
|
-
var
|
|
10794
|
+
var import_yaml8, VLLM_READY_MS, STRATA_READY_MS;
|
|
10657
10795
|
var init_local_tiers = __esm({
|
|
10658
10796
|
"src/workers/local-tiers.ts"() {
|
|
10659
10797
|
"use strict";
|
|
10660
|
-
|
|
10798
|
+
import_yaml8 = __toESM(require_dist(), 1);
|
|
10661
10799
|
init_pai_home();
|
|
10662
10800
|
init_config3();
|
|
10663
10801
|
VLLM_READY_MS = 10 * 60 * 1e3;
|
|
@@ -10816,6 +10954,7 @@ var init_viewer = __esm({
|
|
|
10816
10954
|
init_render();
|
|
10817
10955
|
init_waiting();
|
|
10818
10956
|
init_denials();
|
|
10957
|
+
init_scan2();
|
|
10819
10958
|
init_tool_errors();
|
|
10820
10959
|
init_wait();
|
|
10821
10960
|
init_ps_table();
|
|
@@ -10904,11 +11043,11 @@ var init_timeouts = __esm({
|
|
|
10904
11043
|
});
|
|
10905
11044
|
|
|
10906
11045
|
// src/workers/local-provider.ts
|
|
10907
|
-
var
|
|
11046
|
+
var import_yaml9;
|
|
10908
11047
|
var init_local_provider = __esm({
|
|
10909
11048
|
"src/workers/local-provider.ts"() {
|
|
10910
11049
|
"use strict";
|
|
10911
|
-
|
|
11050
|
+
import_yaml9 = __toESM(require_dist(), 1);
|
|
10912
11051
|
init_config3();
|
|
10913
11052
|
init_run_env();
|
|
10914
11053
|
init_status();
|
|
@@ -10964,7 +11103,7 @@ function cleanProfile(v) {
|
|
|
10964
11103
|
function writeAtomic(path, profiles) {
|
|
10965
11104
|
mkdirSync8(dirname7(path), { recursive: true });
|
|
10966
11105
|
const tmp = `${path}.tmp-${process.pid}`;
|
|
10967
|
-
writeFileSync8(tmp, (0,
|
|
11106
|
+
writeFileSync8(tmp, (0, import_yaml10.stringify)(profiles));
|
|
10968
11107
|
renameSync7(tmp, path);
|
|
10969
11108
|
}
|
|
10970
11109
|
function migrateLegacy(path, profiles) {
|
|
@@ -10989,7 +11128,7 @@ function readProfiles(path = profilesPath()) {
|
|
|
10989
11128
|
const profiles = {};
|
|
10990
11129
|
if (existsSync13(path)) {
|
|
10991
11130
|
try {
|
|
10992
|
-
const raw = (0,
|
|
11131
|
+
const raw = (0, import_yaml10.parse)(readFileSync14(path, "utf8"));
|
|
10993
11132
|
for (const [name, v] of Object.entries(raw ?? {})) profiles[name] = cleanProfile(v);
|
|
10994
11133
|
} catch {
|
|
10995
11134
|
return {};
|
|
@@ -11008,11 +11147,11 @@ function getProfile(name, path = profilesPath()) {
|
|
|
11008
11147
|
function currentSessionName(env = process.env) {
|
|
11009
11148
|
return env[SESSION_NAME_ENV]?.trim() || void 0;
|
|
11010
11149
|
}
|
|
11011
|
-
var
|
|
11150
|
+
var import_yaml10, SESSION_NAME_ENV, profilesPath, legacyWorkersPath;
|
|
11012
11151
|
var init_session_profile_store = __esm({
|
|
11013
11152
|
"src/workers/session-profile-store.ts"() {
|
|
11014
11153
|
"use strict";
|
|
11015
|
-
|
|
11154
|
+
import_yaml10 = __toESM(require_dist(), 1);
|
|
11016
11155
|
init_pai_home();
|
|
11017
11156
|
init_route_lists();
|
|
11018
11157
|
SESSION_NAME_ENV = "PAI_SESSION_NAME";
|
|
@@ -11262,7 +11401,7 @@ var require_postgres_interval = __commonJS({
|
|
|
11262
11401
|
if (!(this instanceof PostgresInterval)) {
|
|
11263
11402
|
return new PostgresInterval(raw);
|
|
11264
11403
|
}
|
|
11265
|
-
extend(this,
|
|
11404
|
+
extend(this, parse5(raw));
|
|
11266
11405
|
}
|
|
11267
11406
|
var properties = ["seconds", "minutes", "hours", "days", "months", "years"];
|
|
11268
11407
|
PostgresInterval.prototype.toPostgres = function() {
|
|
@@ -11323,7 +11462,7 @@ var require_postgres_interval = __commonJS({
|
|
|
11323
11462
|
var microseconds = fraction + "000000".slice(fraction.length);
|
|
11324
11463
|
return parseInt(microseconds, 10) / 1e3;
|
|
11325
11464
|
}
|
|
11326
|
-
function
|
|
11465
|
+
function parse5(interval) {
|
|
11327
11466
|
if (!interval) return {};
|
|
11328
11467
|
var matches = INTERVAL.exec(interval);
|
|
11329
11468
|
var isNegative = matches[8] === "-";
|
|
@@ -11810,13 +11949,13 @@ var require_binaryParsers = __commonJS({
|
|
|
11810
11949
|
console.log("ERROR: ElementType not implemented: " + elementType2);
|
|
11811
11950
|
}
|
|
11812
11951
|
};
|
|
11813
|
-
var
|
|
11952
|
+
var parse5 = function(dimension, elementType2) {
|
|
11814
11953
|
var array = [];
|
|
11815
11954
|
var i2;
|
|
11816
11955
|
if (dimension.length > 1) {
|
|
11817
11956
|
var count = dimension.shift();
|
|
11818
11957
|
for (i2 = 0; i2 < count; i2++) {
|
|
11819
|
-
array[i2] =
|
|
11958
|
+
array[i2] = parse5(dimension, elementType2);
|
|
11820
11959
|
}
|
|
11821
11960
|
dimension.unshift(count);
|
|
11822
11961
|
} else {
|
|
@@ -11826,7 +11965,7 @@ var require_binaryParsers = __commonJS({
|
|
|
11826
11965
|
}
|
|
11827
11966
|
return array;
|
|
11828
11967
|
};
|
|
11829
|
-
return
|
|
11968
|
+
return parse5(dims, elementType);
|
|
11830
11969
|
};
|
|
11831
11970
|
var parseText = function(value) {
|
|
11832
11971
|
return value.toString("utf8");
|
|
@@ -12614,7 +12753,7 @@ var require_type_overrides = __commonJS({
|
|
|
12614
12753
|
var require_pg_connection_string = __commonJS({
|
|
12615
12754
|
"node_modules/pg-connection-string/index.js"(exports, module) {
|
|
12616
12755
|
"use strict";
|
|
12617
|
-
function
|
|
12756
|
+
function parse5(str2, options = {}) {
|
|
12618
12757
|
if (str2.charAt(0) === "/") {
|
|
12619
12758
|
const config2 = str2.split(" ");
|
|
12620
12759
|
return { host: config2[0], database: config2[1] };
|
|
@@ -12773,7 +12912,7 @@ var require_pg_connection_string = __commonJS({
|
|
|
12773
12912
|
return poolConfig;
|
|
12774
12913
|
}
|
|
12775
12914
|
function parseIntoClientConfig(str2) {
|
|
12776
|
-
return toClientConfig(
|
|
12915
|
+
return toClientConfig(parse5(str2));
|
|
12777
12916
|
}
|
|
12778
12917
|
function deprecatedSslModeWarning(sslmode) {
|
|
12779
12918
|
if (!deprecatedSslModeWarning.warned && typeof process !== "undefined" && process.emitWarning) {
|
|
@@ -12788,10 +12927,10 @@ To prepare for this change:
|
|
|
12788
12927
|
See https://www.postgresql.org/docs/current/libpq-ssl.html for libpq SSL mode definitions.`);
|
|
12789
12928
|
}
|
|
12790
12929
|
}
|
|
12791
|
-
module.exports =
|
|
12792
|
-
|
|
12793
|
-
|
|
12794
|
-
|
|
12930
|
+
module.exports = parse5;
|
|
12931
|
+
parse5.parse = parse5;
|
|
12932
|
+
parse5.toClientConfig = toClientConfig;
|
|
12933
|
+
parse5.parseIntoClientConfig = parseIntoClientConfig;
|
|
12795
12934
|
}
|
|
12796
12935
|
});
|
|
12797
12936
|
|
|
@@ -12801,7 +12940,7 @@ var require_connection_parameters = __commonJS({
|
|
|
12801
12940
|
"use strict";
|
|
12802
12941
|
var dns = __require("dns");
|
|
12803
12942
|
var defaults3 = require_defaults();
|
|
12804
|
-
var
|
|
12943
|
+
var parse5 = require_pg_connection_string().parse;
|
|
12805
12944
|
var val = function(key, config, envVar) {
|
|
12806
12945
|
if (config[key]) {
|
|
12807
12946
|
return config[key];
|
|
@@ -12839,9 +12978,9 @@ var require_connection_parameters = __commonJS({
|
|
|
12839
12978
|
};
|
|
12840
12979
|
var ConnectionParameters = class {
|
|
12841
12980
|
constructor(config) {
|
|
12842
|
-
config = typeof config === "string" ?
|
|
12981
|
+
config = typeof config === "string" ? parse5(config) : config || {};
|
|
12843
12982
|
if (config.connectionString) {
|
|
12844
|
-
config = Object.assign({}, config,
|
|
12983
|
+
config = Object.assign({}, config, parse5(config.connectionString));
|
|
12845
12984
|
}
|
|
12846
12985
|
this.user = val("user", config);
|
|
12847
12986
|
this.database = val("database", config);
|
|
@@ -13520,7 +13659,7 @@ var require_serializer = __commonJS({
|
|
|
13520
13659
|
);
|
|
13521
13660
|
};
|
|
13522
13661
|
var emptyArray = [];
|
|
13523
|
-
var
|
|
13662
|
+
var parse5 = (query2) => {
|
|
13524
13663
|
const name = query2.name || "";
|
|
13525
13664
|
if (name.length > 63) {
|
|
13526
13665
|
console.error("Warning! Postgres only supports 63 characters for query names.");
|
|
@@ -13670,7 +13809,7 @@ var require_serializer = __commonJS({
|
|
|
13670
13809
|
sendSASLInitialResponseMessage,
|
|
13671
13810
|
sendSCRAMClientFinalMessage,
|
|
13672
13811
|
query,
|
|
13673
|
-
parse:
|
|
13812
|
+
parse: parse5,
|
|
13674
13813
|
bind,
|
|
13675
13814
|
execute,
|
|
13676
13815
|
describe,
|
|
@@ -14069,12 +14208,12 @@ var require_dist2 = __commonJS({
|
|
|
14069
14208
|
return serializer_1.serialize;
|
|
14070
14209
|
} });
|
|
14071
14210
|
var parser_1 = require_parser2();
|
|
14072
|
-
function
|
|
14211
|
+
function parse5(stream, callback) {
|
|
14073
14212
|
const parser = new parser_1.Parser();
|
|
14074
14213
|
stream.on("data", (buffer) => parser.parse(buffer, callback));
|
|
14075
14214
|
return new Promise((resolve4) => stream.on("end", () => resolve4()));
|
|
14076
14215
|
}
|
|
14077
|
-
exports.parse =
|
|
14216
|
+
exports.parse = parse5;
|
|
14078
14217
|
}
|
|
14079
14218
|
});
|
|
14080
14219
|
|
|
@@ -14158,7 +14297,7 @@ var require_connection = __commonJS({
|
|
|
14158
14297
|
"node_modules/pg/lib/connection.js"(exports, module) {
|
|
14159
14298
|
"use strict";
|
|
14160
14299
|
var EventEmitter = __require("events").EventEmitter;
|
|
14161
|
-
var { parse:
|
|
14300
|
+
var { parse: parse5, serialize } = require_dist2();
|
|
14162
14301
|
var { getStream, getSecureStream } = require_stream();
|
|
14163
14302
|
var flushBuffer = serialize.flush();
|
|
14164
14303
|
var syncBuffer = serialize.sync();
|
|
@@ -14244,7 +14383,7 @@ var require_connection = __commonJS({
|
|
|
14244
14383
|
});
|
|
14245
14384
|
}
|
|
14246
14385
|
attachListeners(stream) {
|
|
14247
|
-
|
|
14386
|
+
parse5(stream, (msg) => {
|
|
14248
14387
|
const eventName = msg.name === "error" ? "errorMessage" : msg.name;
|
|
14249
14388
|
if (this._emitMessage) {
|
|
14250
14389
|
this.emit("message", msg);
|
|
@@ -17545,7 +17684,7 @@ var init_retry = __esm({
|
|
|
17545
17684
|
});
|
|
17546
17685
|
|
|
17547
17686
|
// src/memory/indexer/async.ts
|
|
17548
|
-
import { readFileSync as readFileSync15, statSync as
|
|
17687
|
+
import { readFileSync as readFileSync15, statSync as statSync6, existsSync as existsSync16 } from "node:fs";
|
|
17549
17688
|
import { join as join14, relative, basename as basename4 } from "node:path";
|
|
17550
17689
|
async function indexFileWithBackend(backend, projectId, rootPath, relativePath, source, tier, pathPrefix = "") {
|
|
17551
17690
|
const absPath = join14(rootPath, relativePath);
|
|
@@ -17554,7 +17693,7 @@ async function indexFileWithBackend(backend, projectId, rootPath, relativePath,
|
|
|
17554
17693
|
let stat;
|
|
17555
17694
|
try {
|
|
17556
17695
|
content = readFileSync15(absPath, "utf8");
|
|
17557
|
-
stat =
|
|
17696
|
+
stat = statSync6(absPath);
|
|
17558
17697
|
} catch {
|
|
17559
17698
|
return false;
|
|
17560
17699
|
}
|
|
@@ -20432,7 +20571,7 @@ var init_federation_db = __esm({
|
|
|
20432
20571
|
});
|
|
20433
20572
|
|
|
20434
20573
|
// src/storage/sqlite/indexer.ts
|
|
20435
|
-
import { readFileSync as readFileSync17, statSync as
|
|
20574
|
+
import { readFileSync as readFileSync17, statSync as statSync7, existsSync as existsSync17 } from "node:fs";
|
|
20436
20575
|
import { join as join16, relative as relative2, basename as basename5 } from "node:path";
|
|
20437
20576
|
function indexFile(db, projectId, rootPath, relativePath, source, tier) {
|
|
20438
20577
|
const absPath = join16(rootPath, relativePath);
|
|
@@ -20440,7 +20579,7 @@ function indexFile(db, projectId, rootPath, relativePath, source, tier) {
|
|
|
20440
20579
|
let stat;
|
|
20441
20580
|
try {
|
|
20442
20581
|
content = readFileSync17(absPath, "utf8");
|
|
20443
|
-
stat =
|
|
20582
|
+
stat = statSync7(absPath);
|
|
20444
20583
|
} catch {
|
|
20445
20584
|
return false;
|
|
20446
20585
|
}
|
|
@@ -23756,7 +23895,7 @@ var init_detect = __esm({
|
|
|
23756
23895
|
|
|
23757
23896
|
// src/cli/lib/utils.ts
|
|
23758
23897
|
import { resolve as resolve3, basename as basename6, join as join18 } from "node:path";
|
|
23759
|
-
import { mkdirSync as mkdirSync11, existsSync as existsSync18, writeFileSync as writeFileSync9, readdirSync as readdirSync6, statSync as
|
|
23898
|
+
import { mkdirSync as mkdirSync11, existsSync as existsSync18, writeFileSync as writeFileSync9, readdirSync as readdirSync6, statSync as statSync8 } from "node:fs";
|
|
23760
23899
|
function encIndex(entries) {
|
|
23761
23900
|
let idx = indexes.get(entries);
|
|
23762
23901
|
if (!idx) {
|
|
@@ -23805,7 +23944,7 @@ function smartDecodeDir(encoded, listings) {
|
|
|
23805
23944
|
return nextPath;
|
|
23806
23945
|
}
|
|
23807
23946
|
try {
|
|
23808
|
-
if (
|
|
23947
|
+
if (statSync8(nextPath).isDirectory()) {
|
|
23809
23948
|
current2 = nextPath;
|
|
23810
23949
|
remaining = nextRemaining;
|
|
23811
23950
|
matched = true;
|
|
@@ -23888,7 +24027,7 @@ __export(session_scan_exports, {
|
|
|
23888
24027
|
});
|
|
23889
24028
|
import {
|
|
23890
24029
|
readdirSync as readdirSync8,
|
|
23891
|
-
statSync as
|
|
24030
|
+
statSync as statSync9,
|
|
23892
24031
|
readFileSync as readFileSync19,
|
|
23893
24032
|
openSync as openSync2,
|
|
23894
24033
|
readSync,
|
|
@@ -23995,7 +24134,7 @@ function flushScanCache(prune) {
|
|
|
23995
24134
|
function parseTopLevel(filePath) {
|
|
23996
24135
|
let st;
|
|
23997
24136
|
try {
|
|
23998
|
-
st =
|
|
24137
|
+
st = statSync9(filePath);
|
|
23999
24138
|
} catch {
|
|
24000
24139
|
return { systemLines: 0, size: 0, mtime: 0 };
|
|
24001
24140
|
}
|
|
@@ -24067,7 +24206,7 @@ function resolveFriendlyName(p) {
|
|
|
24067
24206
|
function parseTranscript(filePath) {
|
|
24068
24207
|
let mtime = 0;
|
|
24069
24208
|
try {
|
|
24070
|
-
const st =
|
|
24209
|
+
const st = statSync9(filePath);
|
|
24071
24210
|
mtime = st.mtimeMs;
|
|
24072
24211
|
const hit = loadScanCache().tr[filePath];
|
|
24073
24212
|
if (hit && hit.m === st.mtimeMs && hit.s === st.size) {
|
|
@@ -24163,7 +24302,7 @@ async function scanSessions(opts = {}) {
|
|
|
24163
24302
|
for (const encodedDir of encodedDirs) {
|
|
24164
24303
|
const projectDir = join20(CLAUDE_PROJECTS_DIR, encodedDir);
|
|
24165
24304
|
try {
|
|
24166
|
-
if (!
|
|
24305
|
+
if (!statSync9(projectDir).isDirectory()) continue;
|
|
24167
24306
|
} catch {
|
|
24168
24307
|
continue;
|
|
24169
24308
|
}
|
|
@@ -24425,7 +24564,7 @@ function scanFilesystemForUuidPrefix(prefix) {
|
|
|
24425
24564
|
for (const encodedDir of encodedDirs) {
|
|
24426
24565
|
const projectDir = join20(CLAUDE_PROJECTS_DIR, encodedDir);
|
|
24427
24566
|
try {
|
|
24428
|
-
if (!
|
|
24567
|
+
if (!statSync9(projectDir).isDirectory()) continue;
|
|
24429
24568
|
} catch {
|
|
24430
24569
|
continue;
|
|
24431
24570
|
}
|
|
@@ -7415,7 +7415,7 @@ function parseEscalate(v, bad2) {
|
|
|
7415
7415
|
}
|
|
7416
7416
|
|
|
7417
7417
|
// src/workers/config.ts
|
|
7418
|
-
import { existsSync as existsSync6, readFileSync as readFileSync6 } from "node:fs";
|
|
7418
|
+
import { existsSync as existsSync6, readFileSync as readFileSync6, statSync as statSync2 } from "node:fs";
|
|
7419
7419
|
|
|
7420
7420
|
// src/daemon/config.ts
|
|
7421
7421
|
import { homedir as homedir2, userInfo } from "node:os";
|