@tekmidian/pai 1.0.6 → 1.0.7

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.
Files changed (130) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dist/auto-route-CAlZ5p-h.mjs +11 -0
  3. package/dist/{auto-route-YaEGVrFl.mjs → auto-route-PDOAYszN.mjs} +2 -2
  4. package/dist/{budget-DEiebT2A.mjs → budget-BXmsSBLI.mjs} +10 -10
  5. package/dist/{caller-identity-C6Nc96iM.mjs → caller-identity-DPDSrZE2.mjs} +2 -2
  6. package/dist/{capacity-B2PgKAg4.mjs → capacity-CThSydrd.mjs} +25 -13
  7. package/dist/{chain-CtK49-Ma.mjs → chain-BvdKqRiZ.mjs} +5 -5
  8. package/dist/cli/index.mjs +182 -111
  9. package/dist/{cockpit-actions-D1OPP6Es.mjs → cockpit-actions-BgdKB9G3.mjs} +19 -19
  10. package/dist/{cockpit-actions-C73mJAJ8.mjs → cockpit-actions-DNl0rKfW.mjs} +14 -14
  11. package/dist/cockpit-memory-CqLPjcWe.mjs +20 -0
  12. package/dist/config/defaults/config.yaml +6 -0
  13. package/dist/config/defaults/workers.yaml +2 -0
  14. package/dist/{config-DLmyEK2q.mjs → config-C2dd2SXS.mjs} +1 -1
  15. package/dist/{config-Bz8pAU5Q.mjs → config-DGV64YJa.mjs} +9 -1
  16. package/dist/{controls-rIItFeIJ.mjs → controls-ByrcupcA.mjs} +14 -14
  17. package/dist/daemon/index.mjs +29 -29
  18. package/dist/{daemon-SoUvPUOf.mjs → daemon-BjgJyJMP.mjs} +22 -22
  19. package/dist/daemon-iymy18Ie.mjs +46 -0
  20. package/dist/daemon-mcp/index.mjs +27 -27
  21. package/dist/{embed-pass-CN1D8MXl.mjs → embed-pass-DdTMn4DH.mjs} +4 -4
  22. package/dist/{endreason-C2-hYK0_.mjs → endreason-BjPom527.mjs} +4 -4
  23. package/dist/{fallback-CwPSCrX8.mjs → fallback-CQ8_CuVu.mjs} +4 -4
  24. package/dist/{health-D0mUAVdw.mjs → health-Bb2U4PNK.mjs} +4 -4
  25. package/dist/hooks/block-sleep-poll.mjs +9 -0
  26. package/dist/hooks/capture-all-events.mjs +38 -7
  27. package/dist/hooks/capture-tool-output.mjs +38 -7
  28. package/dist/hooks/handoff-link.mjs +37 -6
  29. package/dist/hooks/load-project-context.mjs +9 -0
  30. package/dist/hooks/local-model-hint.mjs +9 -0
  31. package/dist/hooks/route-agents-to-worker.mjs +9 -0
  32. package/dist/hooks/security-validator.mjs +124 -28
  33. package/dist/hooks/supervision-banner.mjs +40 -7
  34. package/dist/hooks/worker-edit-repair.mjs +9 -0
  35. package/dist/hooks/worker-guard.mjs +46 -6
  36. package/dist/hooks/worker-note.mjs +47 -7
  37. package/dist/hooks/worker-pool-host.mjs +308 -146
  38. package/dist/hooks/worker-proxy.mjs +9 -0
  39. package/dist/hooks/worker-status-line.mjs +49 -7
  40. package/dist/hooks/worker-supervision.mjs +9 -0
  41. package/dist/hooks/worker-tool-name-repair.mjs +9 -0
  42. package/dist/index.mjs +7 -7
  43. package/dist/kill-tree-BlPw1vaU.mjs +10 -0
  44. package/dist/{kill-tree-DPiMscaY.mjs → kill-tree-DTmiEb3T.mjs} +7 -7
  45. package/dist/{launch-Bn2Zf90h.mjs → launch-CV6oPHI2.mjs} +3 -3
  46. package/dist/{launch-BZT3JDoZ.mjs → launch-Dy8qQnSD.mjs} +3 -3
  47. package/dist/{lessons-CFVU0cwA.mjs → lessons-CdmqZD0G.mjs} +21 -21
  48. package/dist/{local-candidate-DFd4pp-w.mjs → local-candidate-C2FGhf54.mjs} +2 -2
  49. package/dist/{local-instances-KTh8IeOT.mjs → local-instances-GgXydQ2P.mjs} +1 -1
  50. package/dist/{local-tiers-DSlIYvvm.mjs → local-tiers-X_dQfI4Q.mjs} +1 -1
  51. package/dist/{main-config-ops-rda08BCD.mjs → main-config-ops-C_fkINDv.mjs} +2 -2
  52. package/dist/{main-resolver-BKwI0I6H.mjs → main-resolver-CN_sfG1R.mjs} +13 -13
  53. package/dist/{model-inventory-BXv15B0d.mjs → model-inventory-BYNrSTaY.mjs} +10 -10
  54. package/dist/{models-add-5yXTyz3g.mjs → models-add-Dc7VXmcu.mjs} +30 -30
  55. package/dist/operator-IrLbk8hy.mjs +7 -0
  56. package/dist/{operator-Br6GeswF.mjs → operator-lRGvYr3D.mjs} +2 -2
  57. package/dist/{pai-marker-D6OoVbM_.mjs → pai-marker-kA0iM7rP.mjs} +2 -2
  58. package/dist/{pane-audit-DLYy9-4g.mjs → pane-audit-DUuilP1V.mjs} +8 -8
  59. package/dist/{paths-CypxFTfn.mjs → paths-BwfwHOvN.mjs} +2 -2
  60. package/dist/{paths-DIOwNcj-.mjs → paths-CKGYM0Lb.mjs} +2 -2
  61. package/dist/{planner-BzZ_2lc-.mjs → planner-BDHVUkIM.mjs} +22 -22
  62. package/dist/{pool-9EsbKD-U.mjs → pool-CFeHGX7q.mjs} +2 -2
  63. package/dist/{pool-cli-Cy5mlycP.mjs → pool-cli-Bj2TeA-d.mjs} +5 -5
  64. package/dist/{pool-cli-Db0uDwB9.mjs → pool-cli-DOLgPgOM.mjs} +5 -5
  65. package/dist/{project-setup-DHxdJjEc.mjs → project-setup-i5D0xkTn.mjs} +21 -21
  66. package/dist/{providers-BNV7CzC-.mjs → providers-BC2Myo_O.mjs} +5 -5
  67. package/dist/{providers-BH6hQYbU.mjs → providers-C-mnlH1b.mjs} +11 -11
  68. package/dist/{registrable-BwFiqazy.mjs → registrable-Ct0DKNKS.mjs} +6 -6
  69. package/dist/{registrable-Dxs4oKIj.mjs → registrable-D_4qXCnq.mjs} +4 -4
  70. package/dist/{render-jPpMrudf.mjs → render-CbifCwTb.mjs} +175 -65
  71. package/dist/{render-DVGXpfaT.mjs → render-FB4Fv_fi.mjs} +10 -10
  72. package/dist/{root-C8cxhdn9.mjs → root-80ESg6b7.mjs} +21 -21
  73. package/dist/{root-DmOzMeSv.mjs → root-B-ZYiEgi.mjs} +10 -10
  74. package/dist/{route-table-COAmc1nB.mjs → route-table-DcBZCuco.mjs} +10 -10
  75. package/dist/{routing-aJKMIagQ.mjs → routing-CF0wlR-_.mjs} +10 -10
  76. package/dist/{routing-B_cg1_Xx.mjs → routing-CJ8ioPl2.mjs} +10 -10
  77. package/dist/{run-DE9Q0ldN.mjs → run-CAjfKBQV.mjs} +53 -26
  78. package/dist/{scan-CNMcltOX.mjs → scan-ew8M6tTH.mjs} +3 -3
  79. package/dist/{scope-BTWstJ1B.mjs → scope-BRcaPw5D.mjs} +4 -4
  80. package/dist/session-BmQsXF_a.mjs +35 -0
  81. package/dist/{session-HBYOABWU.mjs → session-C1JnDXvP.mjs} +14 -14
  82. package/dist/{session-scan-BZxnYN1v.mjs → session-scan-DWCUKhDM.mjs} +5 -5
  83. package/dist/{session-scan-CX3MKCNg.mjs → session-scan-DihMibI-.mjs} +4 -4
  84. package/dist/{session-usage-CCmPFFa6.mjs → session-usage-BRIWFYPS.mjs} +2 -2
  85. package/dist/{status-D52xC_i0.mjs → status-Bj4yVKj0.mjs} +3 -3
  86. package/dist/{status-Cecau8Ps.mjs → status-DTMT5lyn.mjs} +2 -2
  87. package/dist/{tool-errors-BFw1gv-z.mjs → tool-errors-BOW2n882.mjs} +2 -2
  88. package/dist/{tool-errors-COM2JGEr.mjs → tool-errors-jNJj3Gzm.mjs} +5 -5
  89. package/dist/{viewer-DvBg6N22.mjs → viewer-4BU8w_gK.mjs} +14 -14
  90. package/dist/viewer-D3VEdqhC.mjs +22 -0
  91. package/dist/{wait-C5iWILj_.mjs → wait-BindDA5w.mjs} +3 -3
  92. package/dist/{worker-config-DkONNk_H.mjs → worker-config-CdPmb4_2.mjs} +25 -25
  93. package/dist/{worker-config-BmcJ9R0U.mjs → worker-config-CfV2dgSb.mjs} +29 -29
  94. package/dist/{workers-config-DwzrtdYu.mjs → workers-config-2VipVOYk.mjs} +1 -1
  95. package/dist/{worktree-O_kU6Q3y.mjs → worktree-7ZS3RBf8.mjs} +21 -11
  96. package/gemini-extension.json +1 -1
  97. package/package.json +1 -1
  98. package/pai-plugin.json +1 -1
  99. package/plugins/context-preservation/plugin.json +1 -1
  100. package/plugins/core/plugin.json +1 -1
  101. package/plugins/creative/plugin.json +1 -1
  102. package/plugins/observability/plugin.json +1 -1
  103. package/plugins/productivity/plugin.json +1 -1
  104. package/plugins/semantic-search/plugin.json +1 -1
  105. package/plugins/ui/plugin.json +1 -1
  106. package/plugins/zettelkasten/plugin.json +1 -1
  107. package/src/hooks/ts/lib/rules/builtin/base64-decode-to-shell.rule.yaml +3 -1
  108. package/src/hooks/ts/lib/rules/builtin/chmod-zero.rule.yaml +2 -0
  109. package/src/hooks/ts/lib/rules/builtin/curl-piped-to-shell.rule.yaml +8 -1
  110. package/src/hooks/ts/lib/rules/builtin/find-root-delete.rule.yaml +4 -1
  111. package/src/hooks/ts/lib/rules/builtin/instruction-override-disregard.rule.yaml +2 -0
  112. package/src/hooks/ts/lib/rules/builtin/reverse-shell-dev-tcp.rule.yaml +3 -0
  113. package/src/hooks/ts/lib/rules/builtin/reverse-shell-interactive-bash.rule.yaml +1 -0
  114. package/src/hooks/ts/lib/rules/builtin/rm-recursive-parent.rule.yaml +3 -1
  115. package/src/hooks/ts/lib/rules/builtin/rm-recursive-relative.rule.yaml +2 -1
  116. package/src/hooks/ts/lib/rules/builtin/rm-recursive-root.rule.yaml +4 -1
  117. package/src/hooks/ts/lib/rules/builtin/rm-trailing-tilde.rule.yaml +2 -1
  118. package/src/hooks/ts/lib/rules/builtin.generated.ts +34 -7
  119. package/src/hooks/ts/lib/rules/eval.ts +6 -4
  120. package/src/hooks/ts/lib/rules/lint.ts +7 -1
  121. package/src/hooks/ts/lib/rules/load.ts +55 -20
  122. package/src/hooks/ts/lib/rules/types.ts +2 -0
  123. package/src/hooks/ts/pre-tool-use/security-validator.ts +10 -2
  124. package/dist/auto-route-Bc8xP6TQ.mjs +0 -11
  125. package/dist/cockpit-memory-CLHZD64W.mjs +0 -20
  126. package/dist/daemon-176qA79N.mjs +0 -46
  127. package/dist/kill-tree-Dxei6qlR.mjs +0 -10
  128. package/dist/operator-Bmv5tiHQ.mjs +0 -7
  129. package/dist/session-DgZifjLx.mjs +0 -35
  130. package/dist/viewer-Ce-Xa9L3.mjs +0 -22
@@ -8179,6 +8179,7 @@ function defaultWorkersConfig() {
8179
8179
  cacheKeepaliveSecs: num(w.cacheKeepaliveSecs, 0),
8180
8180
  defaultMaxMinutes: num(w.defaultMaxMinutes, 60),
8181
8181
  waitAlarmMinutes: num(w.waitAlarmMinutes, 120),
8182
+ scanBudgetMs: num(w.scanBudgetMs, 5e3),
8182
8183
  stagger: {
8183
8184
  enabled: bool(stagger.enabled, true),
8184
8185
  localDefaultSec: num(stagger.localDefaultSec, 20),
@@ -8773,6 +8774,13 @@ function parseWorkersConfig(raw, yamlProviders = {}) {
8773
8774
  }
8774
8775
  waitAlarmMinutes = w.waitAlarmMinutes;
8775
8776
  }
8777
+ let scanBudgetMs = d.scanBudgetMs ?? 5e3;
8778
+ if (w.scanBudgetMs !== void 0) {
8779
+ if (typeof w.scanBudgetMs !== "number" || !Number.isInteger(w.scanBudgetMs) || w.scanBudgetMs < 1) {
8780
+ bad(".scanBudgetMs", "must be a positive integer (milliseconds)");
8781
+ }
8782
+ scanBudgetMs = w.scanBudgetMs;
8783
+ }
8776
8784
  const stagger = { ...d.stagger };
8777
8785
  if (w.stagger !== void 0) {
8778
8786
  if (typeof w.stagger !== "object" || w.stagger === null || Array.isArray(w.stagger)) {
@@ -8909,6 +8917,7 @@ function parseWorkersConfig(raw, yamlProviders = {}) {
8909
8917
  cacheKeepaliveSecs,
8910
8918
  defaultMaxMinutes,
8911
8919
  waitAlarmMinutes,
8920
+ scanBudgetMs,
8912
8921
  stagger,
8913
8922
  capacity,
8914
8923
  localIdle,
@@ -8416,6 +8416,7 @@ function defaultWorkersConfig() {
8416
8416
  cacheKeepaliveSecs: num2(w.cacheKeepaliveSecs, 0),
8417
8417
  defaultMaxMinutes: num2(w.defaultMaxMinutes, 60),
8418
8418
  waitAlarmMinutes: num2(w.waitAlarmMinutes, 120),
8419
+ scanBudgetMs: num2(w.scanBudgetMs, 5e3),
8419
8420
  stagger: {
8420
8421
  enabled: bool(stagger.enabled, true),
8421
8422
  localDefaultSec: num2(stagger.localDefaultSec, 20),
@@ -9008,6 +9009,13 @@ function parseWorkersConfig(raw, yamlProviders = {}) {
9008
9009
  }
9009
9010
  waitAlarmMinutes = w.waitAlarmMinutes;
9010
9011
  }
9012
+ let scanBudgetMs = d.scanBudgetMs ?? 5e3;
9013
+ if (w.scanBudgetMs !== void 0) {
9014
+ if (typeof w.scanBudgetMs !== "number" || !Number.isInteger(w.scanBudgetMs) || w.scanBudgetMs < 1) {
9015
+ bad(".scanBudgetMs", "must be a positive integer (milliseconds)");
9016
+ }
9017
+ scanBudgetMs = w.scanBudgetMs;
9018
+ }
9011
9019
  const stagger = { ...d.stagger };
9012
9020
  if (w.stagger !== void 0) {
9013
9021
  if (typeof w.stagger !== "object" || w.stagger === null || Array.isArray(w.stagger)) {
@@ -9144,6 +9152,7 @@ function parseWorkersConfig(raw, yamlProviders = {}) {
9144
9152
  cacheKeepaliveSecs,
9145
9153
  defaultMaxMinutes,
9146
9154
  waitAlarmMinutes,
9155
+ scanBudgetMs,
9147
9156
  stagger,
9148
9157
  capacity,
9149
9158
  localIdle,
@@ -10215,27 +10224,57 @@ var init_hang_probe = __esm({
10215
10224
  });
10216
10225
 
10217
10226
  // src/utils/redact.ts
10218
- var REDACTED, REDACTED_RE, KEY_WORDS, VAL, REDACT_RULES, LINE_RULES, LONG_RUN, KEY_LINE;
10227
+ var REDACTED, REDACTED_RE, KEY_WORDS, PROSE, VAL, REDACT_RULES, LINE_RULES, LONG_RUN, LONG_RUN_MAX_LINE, KEY_LINE;
10219
10228
  var init_redact = __esm({
10220
10229
  "src/utils/redact.ts"() {
10221
10230
  "use strict";
10222
10231
  REDACTED = "[REDACTED]";
10223
10232
  REDACTED_RE = String.raw`\[REDACTED\]`;
10224
10233
  KEY_WORDS = "password|passwd|secret|token|api[_-]?key|credential|auth(?:orization)?|bearer";
10234
+ PROSE = "is|are|was|were|be|to|of|in|on|for|and|or|the|a|an|that|this|it|not|out|here|there|so|as|at|by|with|if|when|which";
10225
10235
  VAL = String.raw`(?:"[^"]*"|'[^']*'|[^\s'"]+)`;
10226
10236
  REDACT_RULES = [
10227
10237
  {
10228
10238
  // `Authorization: Bearer xxx` / `Authorization: Basic xxx` — keep the scheme
10229
10239
  id: "authorization",
10230
- re: /(Authorization\s*:\s*)(Bearer|Basic)\s+(\S+)/gi,
10240
+ re: /(Authorization\s*:\s*)(Bearer|Basic)\s+([^\s'"]+)/gi,
10231
10241
  replace: (_m, head, scheme) => `${head}${scheme} ${REDACTED}`
10232
10242
  },
10243
+ {
10244
+ // `Cookie: a=b; c=d` — keep the cookie names, redact every value
10245
+ id: "cookie",
10246
+ re: /((?:Set-)?Cookie\s*:\s*)([^\n]+)/gi,
10247
+ replace: (_m, head, rest) => `${head}${rest.replace(/([^=;\s'"]+=)[^;'"]*/g, `$1${REDACTED}`)}`
10248
+ },
10233
10249
  {
10234
10250
  // `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
10251
+ // the word must be a whole key segment, so `monkeys=` stays untouched.
10252
+ // The separator may start with the key's closing quote (JSON); it is kept.
10236
10253
  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}`
10254
+ 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})(?!(?:${PROSE})\b)(${VAL})`, "gi"),
10255
+ replace: (m, key, sep, val) => {
10256
+ if (/[_-](?:count|length|len|size|limit|max|min|budget)$/i.test(key) && /^\d+$/.test(val)) return m;
10257
+ const q = sep[0] === '"' || sep[0] === "'" ? val[0] : "";
10258
+ return q && (q === '"' || q === "'") ? `${key}${sep}${q}${REDACTED}${q}` : `${key}${sep}${REDACTED}`;
10259
+ }
10260
+ },
10261
+ {
10262
+ // npmrc `//registry/:_authToken=xxx`
10263
+ id: "npm-auth-token",
10264
+ re: new RegExp(String.raw`(_authToken\s*=\s*)(${VAL})`, "g"),
10265
+ replace: (_m, head) => `${head}${REDACTED}`
10266
+ },
10267
+ {
10268
+ // `curl -u user:pass` / `--user user:pass` — keep the user
10269
+ id: "curl-user",
10270
+ re: /(\bcurl\b[^\n]{0,500}?\s(?:-u|--user)[\s=]+['"]?[^\s:'"]+:)([^\s'"]+)/g,
10271
+ replace: (_m, head) => `${head}${REDACTED}`
10272
+ },
10273
+ {
10274
+ // `mysql -phunter2` / `mysqldump -p'hunter2'` — attached password only
10275
+ id: "mysql-p",
10276
+ re: /(\bmysql(?:dump)?\b[^\n]{0,300}?\s-p)('[^']*'|"[^"]*"|[^\s'"-][^\s'"]*)/g,
10277
+ replace: (_m, head) => `${head}${REDACTED}`
10239
10278
  },
10240
10279
  {
10241
10280
  // `export FOO_TOKEN=...` / `FOO_KEY=...` — SCREAMING_SNAKE env style
@@ -10259,19 +10298,20 @@ var init_redact = __esm({
10259
10298
  // provider token prefixes: sk-ant-, sk-, ghp_/gho_/ghu_/ghs_/ghr_, github_pat_,
10260
10299
  // glpat-, xoxb-/xoxp-/xoxa-, AKIA/ASIA + 16 chars, AIza + 35 chars, JWT (eyJ… three segments)
10261
10300
  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,
10301
+ 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|AGPA|AIDA|AROA)[A-Z0-9]{16}|[sr]k_(?:live|test)_[A-Za-z0-9]{20,}|npm_[A-Za-z0-9]{36}|hf_[A-Za-z0-9]{30,}|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
10302
  replace: REDACTED
10264
10303
  },
10265
10304
  {
10266
10305
  // 40+ char opaque base64/hex run, only on a line that also has a secret-ish key word
10267
10306
  id: "long-run",
10268
- re: /\b[A-Za-z0-9+/]{40,}={0,2}(?![\w/])/g,
10307
+ re: /(?<![A-Za-z0-9+/])[A-Za-z0-9+/]{40,4096}={0,2}(?![\w/])/g,
10269
10308
  // a bare 40-hex git SHA stays; it is only redacted as the value of a secret key
10270
10309
  replace: (m) => /^[0-9a-f]{40}$/i.test(m) ? m : REDACTED
10271
10310
  }
10272
10311
  ];
10273
10312
  LINE_RULES = REDACT_RULES.filter((r) => r.id !== "long-run");
10274
10313
  LONG_RUN = REDACT_RULES.find((r) => r.id === "long-run");
10314
+ LONG_RUN_MAX_LINE = 64 * 1024;
10275
10315
  KEY_LINE = new RegExp(`(?:${KEY_WORDS})`, "i");
10276
10316
  }
10277
10317
  });
@@ -10302,10 +10342,12 @@ var init_loop_guard = __esm({
10302
10342
  });
10303
10343
 
10304
10344
  // src/audit/scan.ts
10345
+ var MAX_TEXT_BYTES;
10305
10346
  var init_scan = __esm({
10306
10347
  "src/audit/scan.ts"() {
10307
10348
  "use strict";
10308
10349
  init_loop_guard();
10350
+ MAX_TEXT_BYTES = 256 * 1024;
10309
10351
  }
10310
10352
  });
10311
10353
 
@@ -8183,6 +8183,7 @@ function defaultWorkersConfig() {
8183
8183
  cacheKeepaliveSecs: num(w.cacheKeepaliveSecs, 0),
8184
8184
  defaultMaxMinutes: num(w.defaultMaxMinutes, 60),
8185
8185
  waitAlarmMinutes: num(w.waitAlarmMinutes, 120),
8186
+ scanBudgetMs: num(w.scanBudgetMs, 5e3),
8186
8187
  stagger: {
8187
8188
  enabled: bool(stagger.enabled, true),
8188
8189
  localDefaultSec: num(stagger.localDefaultSec, 20),
@@ -8777,6 +8778,13 @@ function parseWorkersConfig(raw, yamlProviders = {}) {
8777
8778
  }
8778
8779
  waitAlarmMinutes = w.waitAlarmMinutes;
8779
8780
  }
8781
+ let scanBudgetMs = d.scanBudgetMs ?? 5e3;
8782
+ if (w.scanBudgetMs !== void 0) {
8783
+ if (typeof w.scanBudgetMs !== "number" || !Number.isInteger(w.scanBudgetMs) || w.scanBudgetMs < 1) {
8784
+ bad(".scanBudgetMs", "must be a positive integer (milliseconds)");
8785
+ }
8786
+ scanBudgetMs = w.scanBudgetMs;
8787
+ }
8780
8788
  const stagger = { ...d.stagger };
8781
8789
  if (w.stagger !== void 0) {
8782
8790
  if (typeof w.stagger !== "object" || w.stagger === null || Array.isArray(w.stagger)) {
@@ -8913,6 +8921,7 @@ function parseWorkersConfig(raw, yamlProviders = {}) {
8913
8921
  cacheKeepaliveSecs,
8914
8922
  defaultMaxMinutes,
8915
8923
  waitAlarmMinutes,
8924
+ scanBudgetMs,
8916
8925
  stagger,
8917
8926
  capacity,
8918
8927
  localIdle,
@@ -8177,6 +8177,7 @@ function defaultWorkersConfig() {
8177
8177
  cacheKeepaliveSecs: num(w.cacheKeepaliveSecs, 0),
8178
8178
  defaultMaxMinutes: num(w.defaultMaxMinutes, 60),
8179
8179
  waitAlarmMinutes: num(w.waitAlarmMinutes, 120),
8180
+ scanBudgetMs: num(w.scanBudgetMs, 5e3),
8180
8181
  stagger: {
8181
8182
  enabled: bool(stagger.enabled, true),
8182
8183
  localDefaultSec: num(stagger.localDefaultSec, 20),
@@ -8771,6 +8772,13 @@ function parseWorkersConfig(raw, yamlProviders = {}) {
8771
8772
  }
8772
8773
  waitAlarmMinutes = w.waitAlarmMinutes;
8773
8774
  }
8775
+ let scanBudgetMs = d.scanBudgetMs ?? 5e3;
8776
+ if (w.scanBudgetMs !== void 0) {
8777
+ if (typeof w.scanBudgetMs !== "number" || !Number.isInteger(w.scanBudgetMs) || w.scanBudgetMs < 1) {
8778
+ bad(".scanBudgetMs", "must be a positive integer (milliseconds)");
8779
+ }
8780
+ scanBudgetMs = w.scanBudgetMs;
8781
+ }
8774
8782
  const stagger = { ...d.stagger };
8775
8783
  if (w.stagger !== void 0) {
8776
8784
  if (typeof w.stagger !== "object" || w.stagger === null || Array.isArray(w.stagger)) {
@@ -8907,6 +8915,7 @@ function parseWorkersConfig(raw, yamlProviders = {}) {
8907
8915
  cacheKeepaliveSecs,
8908
8916
  defaultMaxMinutes,
8909
8917
  waitAlarmMinutes,
8918
+ scanBudgetMs,
8910
8919
  stagger,
8911
8920
  capacity,
8912
8921
  localIdle,
package/dist/index.mjs CHANGED
@@ -1,13 +1,13 @@
1
1
  import "./utils-J2b9y8PC.mjs";
2
2
  import { a as slugify, i as parseSessionFilename, n as decodeEncodedDir, r as migrateFromJson } from "./migrate-C2z1YmWC.mjs";
3
- import "./config-Bz8pAU5Q.mjs";
3
+ import "./config-DGV64YJa.mjs";
4
4
  import "./config-SlZ-Z52i.mjs";
5
- import "./paths-CypxFTfn.mjs";
6
- import "./worktree-O_kU6Q3y.mjs";
7
- import "./status-Cecau8Ps.mjs";
8
- import "./pool-9EsbKD-U.mjs";
9
- import "./registrable-Dxs4oKIj.mjs";
10
- import { n as ensurePaiMarker, r as readPaiMarker, t as discoverPaiMarkers } from "./pai-marker-D6OoVbM_.mjs";
5
+ import "./paths-BwfwHOvN.mjs";
6
+ import "./worktree-7ZS3RBf8.mjs";
7
+ import "./status-DTMT5lyn.mjs";
8
+ import "./pool-CFeHGX7q.mjs";
9
+ import "./registrable-D_4qXCnq.mjs";
10
+ import { n as ensurePaiMarker, r as readPaiMarker, t as discoverPaiMarkers } from "./pai-marker-kA0iM7rP.mjs";
11
11
  import { d as estimateTokens, l as buildOutline, p as parseHeadings, r as detectTier, u as chunkMarkdown } from "./helpers-CRuBUas3.mjs";
12
12
  import { i as populateSlugs, n as buildFtsQuery } from "./search-RSyeQqj1.mjs";
13
13
  import { n as rerankResults, t as configureRerankerModel } from "./reranker-CqCbpGnX.mjs";
@@ -0,0 +1,10 @@
1
+ import "./config-DGV64YJa.mjs";
2
+ import "./config-SlZ-Z52i.mjs";
3
+ import "./paths-BwfwHOvN.mjs";
4
+ import "./status-DTMT5lyn.mjs";
5
+ import "./scope-BRcaPw5D.mjs";
6
+ import "./caller-identity-DPDSrZE2.mjs";
7
+ import "./endreason-BjPom527.mjs";
8
+ import { i as killTree, n as isOwner, r as killRefusal, t as descendantsLeavesFirst } from "./kill-tree-DTmiEb3T.mjs";
9
+
10
+ export { killTree };
@@ -1,9 +1,9 @@
1
- import { Et as appendLedger } from "./config-Bz8pAU5Q.mjs";
2
- import { i as ledgerPath } from "./paths-CypxFTfn.mjs";
3
- import { D as pidAlive, F as waitForTerminalStatus, k as saveStatus, v as loadStatus, w as ownsPid, y as loadStatuses } from "./status-Cecau8Ps.mjs";
4
- import { i as itermUuid } from "./scope-BTWstJ1B.mjs";
5
- import { a as buildsDir, d as releaseBuildsOf, t as callerIdentity } from "./caller-identity-C6Nc96iM.mjs";
6
- import { n as callerDescription, s as requestKill, t as appendStopEvent } from "./endreason-C2-hYK0_.mjs";
1
+ import { Et as appendLedger } from "./config-DGV64YJa.mjs";
2
+ import { i as ledgerPath } from "./paths-BwfwHOvN.mjs";
3
+ import { D as pidAlive, F as waitForTerminalStatus, k as saveStatus, v as loadStatus, w as ownsPid, y as loadStatuses } from "./status-DTMT5lyn.mjs";
4
+ import { i as itermUuid } from "./scope-BRcaPw5D.mjs";
5
+ import { a as buildsDir, d as releaseBuildsOf, t as callerIdentity } from "./caller-identity-DPDSrZE2.mjs";
6
+ import { n as callerDescription, s as requestKill, t as appendStopEvent } from "./endreason-BjPom527.mjs";
7
7
  import { readFileSync } from "node:fs";
8
8
  import { join } from "node:path";
9
9
  import { homedir } from "node:os";
@@ -257,4 +257,4 @@ async function killTree(logDir, id, opts = {}) {
257
257
 
258
258
  //#endregion
259
259
  export { killTree as i, isOwner as n, killRefusal as r, descendantsLeavesFirst as t };
260
- //# sourceMappingURL=kill-tree-DPiMscaY.mjs.map
260
+ //# sourceMappingURL=kill-tree-DTmiEb3T.mjs.map
@@ -1,5 +1,5 @@
1
- import { M as readWorkersSection, R as LOOPBACK_HOST, _ as maskKey, a as MODEL_CAPABILITIES, b as nativeOrchestratorModel, c as WorkersConfigError, p as getProviderOrNative, t as ANTHROPIC_NATIVE, y as nativeAnthropicProvider } from "./config-Bz8pAU5Q.mjs";
2
- import { _t as nativeRoutePreflight, b as SESSION_PROVIDER_ENV, ut as buildRunEnv, yt as pinnedSettingsArgs } from "./routing-aJKMIagQ.mjs";
1
+ import { M as readWorkersSection, R as LOOPBACK_HOST, _ as maskKey, a as MODEL_CAPABILITIES, b as nativeOrchestratorModel, c as WorkersConfigError, p as getProviderOrNative, t as ANTHROPIC_NATIVE, y as nativeAnthropicProvider } from "./config-DGV64YJa.mjs";
2
+ import { _t as nativeRoutePreflight, b as SESSION_PROVIDER_ENV, ut as buildRunEnv, yt as pinnedSettingsArgs } from "./routing-CF0wlR-_.mjs";
3
3
  import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
4
4
  import { dirname, join } from "node:path";
5
5
  import { spawn } from "node:child_process";
@@ -258,4 +258,4 @@ function maskLaunchEnv(env) {
258
258
 
259
259
  //#endregion
260
260
  export { detectCurrentProviderName as a, ensureProxyRunning as c, detectCurrentModel as i, proxyPort as l, buildLaunchPlan as n, launchableProviderNames as o, buildLaunchRows as r, maskLaunchEnv as s, LaunchError as t, stopProxy as u };
261
- //# sourceMappingURL=launch-Bn2Zf90h.mjs.map
261
+ //# sourceMappingURL=launch-CV6oPHI2.mjs.map
@@ -1,6 +1,6 @@
1
1
  import { i as err } from "./utils-J2b9y8PC.mjs";
2
- import { M as readWorkersSection, bt as stripModelVariant, t as ANTHROPIC_NATIVE } from "./config-Bz8pAU5Q.mjs";
3
- import { _t as nativeRoutePreflight, b as SESSION_PROVIDER_ENV, dt as claudeCommand, gt as nativeLaunchSettingsArgs, ht as nativeLaunchEnv, ut as buildRunEnv, xt as routeVerdictLine, yt as pinnedSettingsArgs } from "./routing-aJKMIagQ.mjs";
2
+ import { M as readWorkersSection, bt as stripModelVariant, t as ANTHROPIC_NATIVE } from "./config-DGV64YJa.mjs";
3
+ import { _t as nativeRoutePreflight, b as SESSION_PROVIDER_ENV, dt as claudeCommand, gt as nativeLaunchSettingsArgs, ht as nativeLaunchEnv, ut as buildRunEnv, xt as routeVerdictLine, yt as pinnedSettingsArgs } from "./routing-CF0wlR-_.mjs";
4
4
  import { closeSync, copyFileSync, existsSync, fstatSync, linkSync, openSync, readSync, realpathSync } from "node:fs";
5
5
  import { join } from "node:path";
6
6
  import chalk from "chalk";
@@ -740,4 +740,4 @@ function launchInDir(dir, name, opts = {}) {
740
740
 
741
741
  //#endregion
742
742
  export { providerResumePlan as a, resumeOfferBlock as c, printExitDir as d, probeResume as i, resumeRouteFor as l, launchInDir as n, restoreTopLevel as o, launchPrompt as r, resumeArgvText as s, hasConversation as t, transcriptModelFor as u };
743
- //# sourceMappingURL=launch-BZT3JDoZ.mjs.map
743
+ //# sourceMappingURL=launch-Dy8qQnSD.mjs.map
@@ -1,18 +1,18 @@
1
1
  import { _ as paiHomePath, a as paiCacheDir, d as defaultPaiHomeDir, f as legacyConfigDir, h as migratePaiFile, i as daemonPidPath, l as claudeHomeDir, u as claudeProjectsDir, v as resolvePaiFile } from "./runtime-paths-twfV23YL.mjs";
2
2
  import { t as writeFileAtomic } from "./atomic-file-BorMa4T3.mjs";
3
- import { Et as appendLedger, M as readWorkersSection, P as resolveModelCapability, d as defaultWorkersConfig } from "./config-Bz8pAU5Q.mjs";
3
+ import { Et as appendLedger, M as readWorkersSection, P as resolveModelCapability, d as defaultWorkersConfig } from "./config-DGV64YJa.mjs";
4
4
  import { c as loadConfig, f as readMainConfigRaw, k as writeJsonAtomic, n as CONFIG_FILE, p as writeMainConfigRaw } from "./config-SlZ-Z52i.mjs";
5
- import { n as ensureNoMcpConfig, u as workersLogDir } from "./paths-CypxFTfn.mjs";
6
- import { w as worktreesDir } from "./worktree-O_kU6Q3y.mjs";
7
- import { G as writeContinueToForge, V as loadStatusConfig } from "./status-Cecau8Ps.mjs";
8
- import { i as itermUuid, l as sessionMapPath } from "./scope-BTWstJ1B.mjs";
9
- import { _ as resolveTarget, mt as loopbackRouterChoice, ut as buildRunEnv } from "./routing-aJKMIagQ.mjs";
5
+ import { n as ensureNoMcpConfig, u as workersLogDir } from "./paths-BwfwHOvN.mjs";
6
+ import { w as worktreesDir } from "./worktree-7ZS3RBf8.mjs";
7
+ import { G as writeContinueToForge, V as loadStatusConfig } from "./status-DTMT5lyn.mjs";
8
+ import { i as itermUuid, l as sessionMapPath } from "./scope-BRcaPw5D.mjs";
9
+ import { _ as resolveTarget, mt as loopbackRouterChoice, ut as buildRunEnv } from "./routing-CF0wlR-_.mjs";
10
10
  import { i as getRegistryBackend, r as createStorageBackend } from "./factory-CYwa0jYj.mjs";
11
- import { c as ensureProxyRunning, l as proxyPort } from "./launch-Bn2Zf90h.mjs";
11
+ import { c as ensureProxyRunning, l as proxyPort } from "./launch-CV6oPHI2.mjs";
12
12
  import { n as fetchLiveSessions, r as sendToSession } from "./aibroker-client-CXsyC7A8.mjs";
13
- import { E as probeRouter, z as recordSystemJobStart } from "./run-DE9Q0ldN.mjs";
14
- import { J as psTableOrNull, U as redactSecrets } from "./render-jPpMrudf.mjs";
15
- import { n as isRealUserPrompt, t as extractUserPromptText } from "./session-usage-CCmPFFa6.mjs";
13
+ import { E as probeRouter, z as recordSystemJobStart } from "./run-CAjfKBQV.mjs";
14
+ import { W as redactSecrets, Y as psTableOrNull } from "./render-CbifCwTb.mjs";
15
+ import { n as isRealUserPrompt, t as extractUserPromptText } from "./session-usage-BRIWFYPS.mjs";
16
16
  import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
17
17
  import { randomUUID } from "node:crypto";
18
18
  import { basename, delimiter, dirname, join } from "node:path";
@@ -4242,13 +4242,14 @@ function getLesson(id) {
4242
4242
  /** Add a candidate lesson; the slug comes from the title, made unique with -2, -3, ... */
4243
4243
  function addLesson(input) {
4244
4244
  if (!LESSON_KINDS.includes(input.kind)) throw new Error(`invalid kind "${input.kind}" (${LESSON_KINDS.join("|")})`);
4245
- const base = slugify(input.title);
4245
+ const title = redactSecrets(input.title);
4246
+ const base = slugify(title);
4246
4247
  let id = base;
4247
4248
  for (let n = 2; existsSync(lessonPath(id)); n++) id = `${base}-${n}`;
4248
4249
  const now = (/* @__PURE__ */ new Date()).toISOString();
4249
4250
  const lesson = {
4250
4251
  id,
4251
- title: input.title,
4252
+ title,
4252
4253
  state: "candidate",
4253
4254
  kind: input.kind,
4254
4255
  applies_when: input.applies_when,
@@ -4256,7 +4257,7 @@ function addLesson(input) {
4256
4257
  evidence: input.evidence ?? [],
4257
4258
  created: now,
4258
4259
  updated: now,
4259
- body: input.body ?? ""
4260
+ body: redactSecrets(input.body ?? "")
4260
4261
  };
4261
4262
  writeLesson(lesson);
4262
4263
  return lesson;
@@ -4315,18 +4316,17 @@ function promoteLesson(id, opts) {
4315
4316
  writeLesson(lesson);
4316
4317
  return paths;
4317
4318
  }
4319
+ /** A correction signal must sit in the first 30 chars of the message; later words are not corrections. */
4318
4320
  const CORRECTION = [
4319
4321
  /^\s*no\b[,.!]/i,
4320
4322
  /\bdon'?t\b/i,
4321
4323
  /\bnever\b/i,
4322
- /\bstop\b/i,
4323
4324
  /\bwrong\b/i,
4324
4325
  /\bthat'?s not\b/i,
4325
4326
  /\bnein\b/i,
4326
- /\bnicht\b/i,
4327
- /\bfalsch\b/i,
4328
- /\bnie\b/i
4327
+ /\bfalsch\b/i
4329
4328
  ];
4329
+ const CORRECTION_WINDOW = 30;
4330
4330
  function userText(content) {
4331
4331
  if (typeof content === "string") return content;
4332
4332
  if (!Array.isArray(content)) return "";
@@ -4347,8 +4347,8 @@ function proposeFromTranscript(transcriptPath) {
4347
4347
  }
4348
4348
  if (ev.type !== "user" || ev.isMeta) continue;
4349
4349
  const text = userText(ev.message?.content).trim();
4350
- if (!text || text.startsWith("<") || !CORRECTION.some((re) => re.test(text))) continue;
4351
- const title = text.replace(/\s+/g, " ").slice(0, 80);
4350
+ if (!text || text.startsWith("<") || !CORRECTION.some((re) => re.test(text.slice(0, CORRECTION_WINDOW)))) continue;
4351
+ const title = redactSecrets(text.replace(/\s+/g, " ")).slice(0, 80);
4352
4352
  if (seen.has(title)) continue;
4353
4353
  seen.add(title);
4354
4354
  out.push({
@@ -4356,7 +4356,7 @@ function proposeFromTranscript(transcriptPath) {
4356
4356
  kind: "correction",
4357
4357
  applies_when: "",
4358
4358
  evidence: [sessionId],
4359
- body: text.slice(0, 600)
4359
+ body: redactSecrets(text).slice(0, 600)
4360
4360
  });
4361
4361
  }
4362
4362
  return out;
@@ -4364,4 +4364,4 @@ function proposeFromTranscript(transcriptPath) {
4364
4364
 
4365
4365
  //#endregion
4366
4366
  export { setIndexSchedulerTimer as $, readBodyFile as $t, getGitContext as A, jobPaths as At, lastEmbedPass as B, registerQuietRunner as Bt, hasPendingOrProcessingOfType as C, historyDir as Ct, migrateWorkQueue as D, vaultIndexEnabled as Dt, markFailed as E, obsidianEnabled as Et, daemonConfig as F, sessionKeepaliveLedgerSummary as Ft, notificationConfig as G, resolveDaemonPid as Gt, lastIndexPass as H, writeQuiet as Ht, embedInProgress as I, deferIfQuiet as It, setCacheKeepaliveTimer as J, writeContextHandoverCache as Jt, passFailures as K, writeDaemonPidfile as Kt, embedSchedulerTimer as L, describeQuiet as Lt, migrateSummaryCooldowns as M, sweepOrphans as Mt, spawnSummarizer as N, loadSessionKeepaliveState as Nt, contentToText as O, buildWakeupContext as Ot, cacheKeepaliveTimer as P, runSessionKeepaliveTick as Pt, setIndexInProgress as Q, findNotesDir$1 as Qt, indexInProgress as R, nextOccurrence as Rt, getStats as S, findNotesDir as St, markCompleted as T, lessonsIndexEnabled as Tt, lastIndexTime as U, LAUNCHD_LABEL as Ut, lastEmbedTime as V, startQuietWatcher as Vt, lastVaultIndexTime as W, removeDaemonPidfile as Wt, setEmbedInProgress as X, applyContinue as Xt, setDaemonConfig as Y, appendCheckpointToNote as Yt, setEmbedSchedulerTimer as Z, findLatestNote as Zt, NonRetryableError as _, addWorkToSessionNote as _t, lessonsDir as a, setNotificationConfig as at, enqueue as b, getCurrentNotePath as bt, proposeFromTranscript as c, setStartTime as ct, buildPassCommand as d, shutdownRequested as dt, restartRouter as en, setLastEmbedPass as et, cliEntry as f, startTime as ft, migrateKgBackfillState as g, updateTodoContinue as gt, backfillKgFromNotes as h, sessionIdFromTranscript as ht, getLesson as i, setLastVaultIndexTime as it, handleSessionSummary as j, reapJob as jt, findLatestJsonl as k, migrateIdentityFile as kt, setState as l, setStorageBackend as lt, runPassChild as m, vaultIndexInProgress as mt, LESSON_STATES as n, setLastIndexPass as nt, listLessons as o, setRegistryBackend as ot, reexecBackground as p, storageBackend as pt, registryBackend as q, readContextHandoverCache as qt, addLesson as r, setLastIndexTime as rt, promoteLesson as s, setShutdownRequested as st, LESSON_KINDS as t, setLastEmbedTime as tt, PassSpawnError as u, setVaultIndexInProgress as ut, cleanup as v, appendCheckpoint as vt, loadQueue as w, OBSIDIAN_DISABLED_MESSAGE as wt, enqueueCoalesced as x, archiveSessionFilesToSessionsDir as xt, dequeue as y, finalizeSessionNote as yt, indexSchedulerTimer as z, readQuiet as zt };
4367
- //# sourceMappingURL=lessons-CFVU0cwA.mjs.map
4367
+ //# sourceMappingURL=lessons-CdmqZD0G.mjs.map
@@ -1,4 +1,4 @@
1
- import { rt as workersYamlPath, z as isLoopbackHostname } from "./config-Bz8pAU5Q.mjs";
1
+ import { rt as workersYamlPath, z as isLoopbackHostname } from "./config-DGV64YJa.mjs";
2
2
  import { _ as readLocalConfig } from "./local-tiers-CqwGUcEn.mjs";
3
3
  import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
4
4
  import { dirname, join } from "node:path";
@@ -109,4 +109,4 @@ function isLocalCandidate(p, name, tierProviders) {
109
109
 
110
110
  //#endregion
111
111
  export { localStatusReport as a, writeLocalStatus as c, localStatusLine as i, tierProviderNames as n, primaryLocal as o, LOCAL_STATUS_REFRESH_MS as r, readLocalStatus as s, isLocalCandidate as t };
112
- //# sourceMappingURL=local-candidate-DFd4pp-w.mjs.map
112
+ //# sourceMappingURL=local-candidate-C2FGhf54.mjs.map
@@ -1,4 +1,4 @@
1
- import "./config-Bz8pAU5Q.mjs";
1
+ import "./config-DGV64YJa.mjs";
2
2
  import "./config-SlZ-Z52i.mjs";
3
3
  import "./local-tiers-CqwGUcEn.mjs";
4
4
  import { a as instancesFromProcesses, c as pidAlive, d as reconcileInstances, f as registeredInstances, i as instanceNumber, l as readInstances, n as engineKey, o as localInstancesPath, p as writeInstances, r as instanceEngineKey, s as pickInstance, t as endpointRegistry, u as readLiveInstances } from "./local-instances-DhF4_sV2.mjs";
@@ -1,4 +1,4 @@
1
- import "./config-Bz8pAU5Q.mjs";
1
+ import "./config-DGV64YJa.mjs";
2
2
  import "./config-SlZ-Z52i.mjs";
3
3
  import { C as stopLines, S as stopLine, T as tierButtons, _ as readLocalConfig, a as LocalTierError, b as splitCommand, c as fetchServedModels, d as installedModelDirs, f as listensOnPort, g as planStart, h as parseServers, i as DEFAULT_RESERVE_GB, l as fmtRss, m as parseLocalConfig, n as DEFAULT_HEALTH, o as defaultLauncher, p as logPathFor, r as DEFAULT_MAX_INSTANCES, s as defaultStrataPython, t as DEFAULT_COMMON_FLAGS, u as healthUrl, v as resolveModelPath, w as strataInfo, x as stopCommandFor, y as shellQuote } from "./local-tiers-CqwGUcEn.mjs";
4
4
 
@@ -1,4 +1,4 @@
1
- import { M as readWorkersSection, _ as maskKey, rt as workersYamlPath } from "./config-Bz8pAU5Q.mjs";
1
+ import { M as readWorkersSection, _ as maskKey, rt as workersYamlPath } from "./config-DGV64YJa.mjs";
2
2
  import { C as migrateMainConfigToYaml, D as writeYamlFileAtomic, c as loadConfig, d as paiConfigYamlFilePath, f as readMainConfigRaw, i as defaults, p as writeMainConfigRaw, u as paiConfigFilePath, x as userWorkersYamlRaw } from "./config-SlZ-Z52i.mjs";
3
3
  import { existsSync } from "node:fs";
4
4
  import { Document } from "yaml";
@@ -239,4 +239,4 @@ function unsetConfigValueOp(dottedPath) {
239
239
 
240
240
  //#endregion
241
241
  export { listConfigOp as a, getConfigValueOp as i, formatConfigGetOutput as n, setConfigValueOp as o, formatConfigSource as r, unsetConfigValueOp as s, MainConfigOpsError as t };
242
- //# sourceMappingURL=main-config-ops-rda08BCD.mjs.map
242
+ //# sourceMappingURL=main-config-ops-C_fkINDv.mjs.map
@@ -1,20 +1,20 @@
1
1
  import { _ as warn, c as ok, i as err, l as renderTable, n as dim, o as header } from "./utils-J2b9y8PC.mjs";
2
- import "./config-Bz8pAU5Q.mjs";
2
+ import "./config-DGV64YJa.mjs";
3
3
  import "./config-SlZ-Z52i.mjs";
4
- import "./paths-CypxFTfn.mjs";
5
- import "./status-Cecau8Ps.mjs";
6
- import { d as terminalHasName } from "./scope-BTWstJ1B.mjs";
7
- import "./routing-aJKMIagQ.mjs";
8
- import "./tool-errors-BFw1gv-z.mjs";
9
- import "./wait-C5iWILj_.mjs";
4
+ import "./paths-BwfwHOvN.mjs";
5
+ import "./status-DTMT5lyn.mjs";
6
+ import { d as terminalHasName } from "./scope-BRcaPw5D.mjs";
7
+ import "./routing-CF0wlR-_.mjs";
8
+ import "./tool-errors-BOW2n882.mjs";
9
+ import "./wait-BindDA5w.mjs";
10
10
  import "./local-tiers-CqwGUcEn.mjs";
11
- import "./caller-identity-C6Nc96iM.mjs";
12
- import "./capacity-B2PgKAg4.mjs";
11
+ import "./caller-identity-DPDSrZE2.mjs";
12
+ import "./capacity-CThSydrd.mjs";
13
13
  import "./local-instances-DhF4_sV2.mjs";
14
- import "./local-candidate-DFd4pp-w.mjs";
15
- import { c as resumeOfferBlock, l as resumeRouteFor, n as launchInDir } from "./launch-BZT3JDoZ.mjs";
14
+ import "./local-candidate-C2FGhf54.mjs";
15
+ import { c as resumeOfferBlock, l as resumeRouteFor, n as launchInDir } from "./launch-Dy8qQnSD.mjs";
16
16
  import { i as switchToSession, n as fetchLiveSessions } from "./aibroker-client-CXsyC7A8.mjs";
17
- import { s as scanSessions, t as fmtAge } from "./session-scan-CX3MKCNg.mjs";
17
+ import { s as scanSessions, t as fmtAge } from "./session-scan-DihMibI-.mjs";
18
18
  import { createReadStream, existsSync, realpathSync } from "node:fs";
19
19
  import { basename, join } from "node:path";
20
20
  import chalk from "chalk";
@@ -784,4 +784,4 @@ async function cmdMain(query, pickN, opts) {
784
784
 
785
785
  //#endregion
786
786
  export { cmdMain };
787
- //# sourceMappingURL=main-resolver-BKwI0I6H.mjs.map
787
+ //# sourceMappingURL=main-resolver-CN_sfG1R.mjs.map
@@ -1,15 +1,15 @@
1
- import "./config-Bz8pAU5Q.mjs";
1
+ import "./config-DGV64YJa.mjs";
2
2
  import "./config-SlZ-Z52i.mjs";
3
- import "./paths-CypxFTfn.mjs";
4
- import "./status-Cecau8Ps.mjs";
5
- import "./scope-BTWstJ1B.mjs";
6
- import { $ as parseFootprint, B as MODEL_INVENTORY_MAX_AGE_MS, G as fmtMem, H as ProbeHold, J as inventoryRows, K as fmtMemMapped, Q as modelLabel, R as DOWN_AFTER_MISSES, U as computeInventory, V as MODEL_INVENTORY_REFRESH_MS, W as currentInventory, X as liveDeps, Y as inventoryText, Z as modelKind, at as readInventoryInput, ct as writeInventory, et as parseSizeMb, it as readInventory, nt as processTreeMemory, ot as readModelLabels, q as inventoryPath, rt as processTreeRssMb, st as startInventoryRefresh, tt as parseTable, z as INVENTORY_HEADERS } from "./routing-aJKMIagQ.mjs";
7
- import "./tool-errors-BFw1gv-z.mjs";
8
- import "./wait-C5iWILj_.mjs";
3
+ import "./paths-BwfwHOvN.mjs";
4
+ import "./status-DTMT5lyn.mjs";
5
+ import "./scope-BRcaPw5D.mjs";
6
+ import { $ as parseFootprint, B as MODEL_INVENTORY_MAX_AGE_MS, G as fmtMem, H as ProbeHold, J as inventoryRows, K as fmtMemMapped, Q as modelLabel, R as DOWN_AFTER_MISSES, U as computeInventory, V as MODEL_INVENTORY_REFRESH_MS, W as currentInventory, X as liveDeps, Y as inventoryText, Z as modelKind, at as readInventoryInput, ct as writeInventory, et as parseSizeMb, it as readInventory, nt as processTreeMemory, ot as readModelLabels, q as inventoryPath, rt as processTreeRssMb, st as startInventoryRefresh, tt as parseTable, z as INVENTORY_HEADERS } from "./routing-CF0wlR-_.mjs";
7
+ import "./tool-errors-BOW2n882.mjs";
8
+ import "./wait-BindDA5w.mjs";
9
9
  import "./local-tiers-CqwGUcEn.mjs";
10
- import "./caller-identity-C6Nc96iM.mjs";
11
- import "./capacity-B2PgKAg4.mjs";
10
+ import "./caller-identity-DPDSrZE2.mjs";
11
+ import "./capacity-CThSydrd.mjs";
12
12
  import "./local-instances-DhF4_sV2.mjs";
13
- import "./local-candidate-DFd4pp-w.mjs";
13
+ import "./local-candidate-C2FGhf54.mjs";
14
14
 
15
15
  export { computeInventory, currentInventory, processTreeRssMb, readInventoryInput, writeInventory };
@@ -1,43 +1,43 @@
1
1
  import "./utils-J2b9y8PC.mjs";
2
- import { rt as workersYamlPath } from "./config-Bz8pAU5Q.mjs";
2
+ import { rt as workersYamlPath } from "./config-DGV64YJa.mjs";
3
3
  import "./config-SlZ-Z52i.mjs";
4
- import "./paths-CypxFTfn.mjs";
5
- import "./worktree-O_kU6Q3y.mjs";
6
- import "./status-Cecau8Ps.mjs";
7
- import "./pool-9EsbKD-U.mjs";
4
+ import "./paths-BwfwHOvN.mjs";
5
+ import "./worktree-7ZS3RBf8.mjs";
6
+ import "./status-DTMT5lyn.mjs";
7
+ import "./pool-CFeHGX7q.mjs";
8
8
  import "./helpers-CRuBUas3.mjs";
9
- import "./scope-BTWstJ1B.mjs";
10
- import "./routing-aJKMIagQ.mjs";
11
- import "./tool-errors-BFw1gv-z.mjs";
12
- import "./wait-C5iWILj_.mjs";
9
+ import "./scope-BRcaPw5D.mjs";
10
+ import "./routing-CF0wlR-_.mjs";
11
+ import "./tool-errors-BOW2n882.mjs";
12
+ import "./wait-BindDA5w.mjs";
13
13
  import { g as planStart, m as parseLocalConfig, o as defaultLauncher, y as shellQuote } from "./local-tiers-CqwGUcEn.mjs";
14
- import "./caller-identity-C6Nc96iM.mjs";
15
- import "./capacity-B2PgKAg4.mjs";
14
+ import "./caller-identity-DPDSrZE2.mjs";
15
+ import "./capacity-CThSydrd.mjs";
16
16
  import "./local-instances-DhF4_sV2.mjs";
17
- import "./local-candidate-DFd4pp-w.mjs";
17
+ import "./local-candidate-C2FGhf54.mjs";
18
18
  import "./factory-CYwa0jYj.mjs";
19
19
  import "./postgres-BL5oBBgY.mjs";
20
20
  import "./embedding-gate-iq0oQEkF.mjs";
21
21
  import "./embeddings-BVq3esBF.mjs";
22
22
  import "./router-D2476pOp.mjs";
23
- import "./launch-Bn2Zf90h.mjs";
24
- import "./health-D0mUAVdw.mjs";
25
- import "./run-DE9Q0ldN.mjs";
26
- import "./controls-rIItFeIJ.mjs";
27
- import "./endreason-C2-hYK0_.mjs";
28
- import "./render-jPpMrudf.mjs";
29
- import "./operator-Br6GeswF.mjs";
30
- import "./kill-tree-DPiMscaY.mjs";
31
- import "./pool-cli-Db0uDwB9.mjs";
32
- import "./pane-audit-DLYy9-4g.mjs";
33
- import "./providers-BNV7CzC-.mjs";
34
- import { H as canBind, U as sizeOnDiskGb, V as allocatePort, at as defaultRegistryCtx, f as killInstance, g as portListeners, ot as hashText, p as launchDetached, st as saveRegistry, u as healthOk } from "./worker-config-DkONNk_H.mjs";
35
- import "./main-config-ops-rda08BCD.mjs";
36
- import "./cockpit-actions-D1OPP6Es.mjs";
23
+ import "./launch-CV6oPHI2.mjs";
24
+ import "./health-Bb2U4PNK.mjs";
25
+ import "./run-CAjfKBQV.mjs";
26
+ import "./controls-ByrcupcA.mjs";
27
+ import "./endreason-BjPom527.mjs";
28
+ import "./render-CbifCwTb.mjs";
29
+ import "./operator-lRGvYr3D.mjs";
30
+ import "./kill-tree-DTmiEb3T.mjs";
31
+ import "./pool-cli-DOLgPgOM.mjs";
32
+ import "./pane-audit-DUuilP1V.mjs";
33
+ import "./providers-BC2Myo_O.mjs";
34
+ import { H as canBind, U as sizeOnDiskGb, V as allocatePort, at as defaultRegistryCtx, f as killInstance, g as portListeners, ot as hashText, p as launchDetached, st as saveRegistry, u as healthOk } from "./worker-config-CdPmb4_2.mjs";
35
+ import "./main-config-ops-C_fkINDv.mjs";
36
+ import "./cockpit-actions-BgdKB9G3.mjs";
37
37
  import "./ipc-client-CmagIFLh.mjs";
38
- import "./embed-pass-CN1D8MXl.mjs";
39
- import "./session-usage-CCmPFFa6.mjs";
40
- import "./fallback-CwPSCrX8.mjs";
38
+ import "./embed-pass-DdTMn4DH.mjs";
39
+ import "./session-usage-BRIWFYPS.mjs";
40
+ import "./fallback-CQ8_CuVu.mjs";
41
41
  import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
42
42
  import { basename, join } from "node:path";
43
43
  import { homedir } from "node:os";
@@ -333,4 +333,4 @@ async function smokeTest(cfg, name, d = {}) {
333
333
 
334
334
  //#endregion
335
335
  export { addModel };
336
- //# sourceMappingURL=models-add-5yXTyz3g.mjs.map
336
+ //# sourceMappingURL=models-add-Dc7VXmcu.mjs.map
@@ -0,0 +1,7 @@
1
+ import "./config-DGV64YJa.mjs";
2
+ import "./config-SlZ-Z52i.mjs";
3
+ import "./paths-BwfwHOvN.mjs";
4
+ import "./status-DTMT5lyn.mjs";
5
+ import { n as operatorSocketPath, r as sayToWorker, t as createOperatorServer } from "./operator-lRGvYr3D.mjs";
6
+
7
+ export { sayToWorker };
@@ -1,4 +1,4 @@
1
- import { g as isLive, v as loadStatus } from "./status-Cecau8Ps.mjs";
1
+ import { g as isLive, v as loadStatus } from "./status-DTMT5lyn.mjs";
2
2
  import { existsSync, unlinkSync } from "node:fs";
3
3
  import { createHash } from "node:crypto";
4
4
  import { join } from "node:path";
@@ -95,4 +95,4 @@ function sayToWorker(logDir, id, text, timeoutMs = 4e3) {
95
95
 
96
96
  //#endregion
97
97
  export { operatorSocketPath as n, sayToWorker as r, createOperatorServer as t };
98
- //# sourceMappingURL=operator-Br6GeswF.mjs.map
98
+ //# sourceMappingURL=operator-lRGvYr3D.mjs.map