@tekmidian/pai 1.0.5 → 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.
Files changed (239) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dist/{aibroker-client-CQPGqLxL.mjs → aibroker-client-CXsyC7A8.mjs} +2 -2
  3. package/dist/aibroker-client-ChB7gSxV.mjs +3 -0
  4. package/dist/auto-route-Bc8xP6TQ.mjs +11 -0
  5. package/dist/{auto-route-DUYr57rs.mjs → auto-route-YaEGVrFl.mjs} +2 -2
  6. package/dist/budget-DEiebT2A.mjs +15 -0
  7. package/dist/{caller-identity-Bim8JT-D.mjs → caller-identity-C6Nc96iM.mjs} +4 -4
  8. package/dist/{capacity-CsZMkVyg.mjs → capacity-B2PgKAg4.mjs} +65 -5
  9. package/dist/{chain-Dzz6xcKH.mjs → chain-CtK49-Ma.mjs} +5 -5
  10. package/dist/cli/index.mjs +2102 -282
  11. package/dist/{cockpit-actions-BgsiNcUY.mjs → cockpit-actions-C73mJAJ8.mjs} +18 -18
  12. package/dist/{cockpit-actions-BTA1njMO.mjs → cockpit-actions-D1OPP6Es.mjs} +26 -26
  13. package/dist/cockpit-memory-CLHZD64W.mjs +20 -0
  14. package/dist/config/defaults/config.yaml +18 -1
  15. package/dist/{config-CST2uq1v.mjs → config-Bz8pAU5Q.mjs} +3 -3
  16. package/dist/{config-Dv3t7xnT.mjs → config-DHgPx3ER.mjs} +1 -1
  17. package/dist/{config-h5qK3fst.mjs → config-DLmyEK2q.mjs} +2 -2
  18. package/dist/{config-DYbyEe4-.mjs → config-SlZ-Z52i.mjs} +3 -2
  19. package/dist/{controls-OiVVbe-f.mjs → controls-rIItFeIJ.mjs} +59 -66
  20. package/dist/daemon/index.mjs +40 -40
  21. package/dist/daemon-176qA79N.mjs +46 -0
  22. package/dist/{daemon-C1dycZ3W.mjs → daemon-SoUvPUOf.mjs} +79 -31
  23. package/dist/daemon-mcp/index.mjs +49 -38
  24. package/dist/detect-C8nFP-kR.mjs +10 -0
  25. package/dist/{detect-CHuxFrLy.mjs → detect-DLjeYwnt.mjs} +2 -2
  26. package/dist/{embed-pass-DtVF2fOV.mjs → embed-pass-CN1D8MXl.mjs} +5 -5
  27. package/dist/{embedding-gate-B98PK_wz.mjs → embedding-gate-BVQvUmox.mjs} +2 -2
  28. package/dist/{embedding-gate-CTAk8STe.mjs → embedding-gate-iq0oQEkF.mjs} +3 -3
  29. package/dist/{endreason-BqyyU7BH.mjs → endreason-C2-hYK0_.mjs} +4 -4
  30. package/dist/{factory-BV0MQA3T.mjs → factory-CYwa0jYj.mjs} +6 -6
  31. package/dist/factory-DFwez99M.mjs +9 -0
  32. package/dist/{fallback-Bj2cyVk_.mjs → fallback-CwPSCrX8.mjs} +9 -231
  33. package/dist/{health-kufVIf6i.mjs → health-D0mUAVdw.mjs} +5 -5
  34. package/dist/{helpers-CvbYEKoD.mjs → helpers-Dj2nY56t.mjs} +2 -2
  35. package/dist/{helpers-WV8tdQHM.mjs → helpers-DyHKAwrW.mjs} +6 -6
  36. package/dist/hooks/capture-all-events.mjs +68 -3
  37. package/dist/hooks/capture-tool-output.mjs +68 -3
  38. package/dist/hooks/handoff-link.mjs +128 -0
  39. package/dist/hooks/load-project-context.mjs +1 -1
  40. package/dist/hooks/security-validator.mjs +840 -88
  41. package/dist/hooks/supervision-banner.mjs +186 -48
  42. package/dist/hooks/worker-guard.mjs +57 -1
  43. package/dist/hooks/worker-note.mjs +68 -3
  44. package/dist/hooks/worker-pool-host.mjs +1417 -224
  45. package/dist/hooks/worker-status-line.mjs +209 -70
  46. package/dist/index.mjs +9 -9
  47. package/dist/{ipc-client-CnYEF31R.mjs → ipc-client-CmagIFLh.mjs} +2 -2
  48. package/dist/{ipc-client-DN7EvoVo.mjs → ipc-client-DmbSIBUK.mjs} +1 -1
  49. package/dist/{kill-tree-CcpsRLCZ.mjs → kill-tree-DPiMscaY.mjs} +8 -8
  50. package/dist/kill-tree-Dxei6qlR.mjs +10 -0
  51. package/dist/{launch-UPQBoW2q.mjs → launch-BZT3JDoZ.mjs} +3 -3
  52. package/dist/{launch-DpQPZGsT.mjs → launch-Bn2Zf90h.mjs} +3 -3
  53. package/dist/{indexer-backend-B2vtFl38.mjs → lessons-CFVU0cwA.mjs} +262 -43
  54. package/dist/{local-candidate-Cp_bw4kK.mjs → local-candidate-DFd4pp-w.mjs} +3 -3
  55. package/dist/{local-instances-bdCNNSsL.mjs → local-instances-DhF4_sV2.mjs} +2 -2
  56. package/dist/{local-instances-B-c-CxzP.mjs → local-instances-KTh8IeOT.mjs} +4 -4
  57. package/dist/{local-tiers-BtdEEe5n.mjs → local-tiers-CqwGUcEn.mjs} +3 -3
  58. package/dist/{local-tiers-OBqAAfOg.mjs → local-tiers-DSlIYvvm.mjs} +3 -3
  59. package/dist/{main-config-ops-BYsK3BxM.mjs → main-config-ops-rda08BCD.mjs} +3 -3
  60. package/dist/{main-resolver-CAC3xfZM.mjs → main-resolver-BKwI0I6H.mjs} +18 -18
  61. package/dist/{migrate-DrA_OwlZ.mjs → migrate-C2z1YmWC.mjs} +2 -2
  62. package/dist/{model-inventory-BuTpi9a6.mjs → model-inventory-BXv15B0d.mjs} +13 -13
  63. package/dist/{models-add-CJx2YAwh.mjs → models-add-5yXTyz3g.mjs} +38 -38
  64. package/dist/operator-Bmv5tiHQ.mjs +7 -0
  65. package/dist/{operator-DrwWItVt.mjs → operator-Br6GeswF.mjs} +2 -2
  66. package/dist/{pai-marker-DLKJ9Yr5.mjs → pai-marker-D6OoVbM_.mjs} +2 -2
  67. package/dist/{pane-audit-wv9UkyCe.mjs → pane-audit-DLYy9-4g.mjs} +13 -23
  68. package/dist/{paths-DS5VQKoR.mjs → paths-CypxFTfn.mjs} +4 -4
  69. package/dist/{paths-DBd78I7Z.mjs → paths-DIOwNcj-.mjs} +3 -3
  70. package/dist/{planner-K0mFrCpL.mjs → planner-BzZ_2lc-.mjs} +29 -29
  71. package/dist/{pool-BZ94nFuq.mjs → pool-9EsbKD-U.mjs} +2 -2
  72. package/dist/{pool-cli-BjYQDfx6.mjs → pool-cli-Cy5mlycP.mjs} +6 -6
  73. package/dist/{pool-cli-B1eKySeN.mjs → pool-cli-Db0uDwB9.mjs} +5 -5
  74. package/dist/{postgres-CBHY5PIi.mjs → postgres-B1B80bcj.mjs} +3 -3
  75. package/dist/{postgres-C-T5OWer.mjs → postgres-BL5oBBgY.mjs} +3 -3
  76. package/dist/{project-setup-pIPHZaXf.mjs → project-setup-DHxdJjEc.mjs} +24 -25
  77. package/dist/providers-BH6hQYbU.mjs +16 -0
  78. package/dist/{providers-Dzx5GAUI.mjs → providers-BNV7CzC-.mjs} +6 -6
  79. package/dist/{query-feedback-DN52N9C5.mjs → query-feedback-BWl2HRwN.mjs} +2 -2
  80. package/dist/registrable-BwFiqazy.mjs +9 -0
  81. package/dist/{registrable-CXBBpUcz.mjs → registrable-Dxs4oKIj.mjs} +4 -4
  82. package/dist/render-DVGXpfaT.mjs +13 -0
  83. package/dist/render-jPpMrudf.mjs +2240 -0
  84. package/dist/root-C8cxhdn9.mjs +36 -0
  85. package/dist/{root-bG48WVpW.mjs → root-DmOzMeSv.mjs} +10 -10
  86. package/dist/route-table-COAmc1nB.mjs +15 -0
  87. package/dist/{router-CQSc3lk3.mjs → router-D2476pOp.mjs} +2 -2
  88. package/dist/{router-DwHJRgG9.mjs → router-ghujlEFb.mjs} +1 -1
  89. package/dist/{routing-D27jxj9x.mjs → routing-B_cg1_Xx.mjs} +13 -13
  90. package/dist/{routing-BlD_tKjW.mjs → routing-aJKMIagQ.mjs} +15 -15
  91. package/dist/{run-AZVwceiU.mjs → run-DE9Q0ldN.mjs} +47 -31
  92. package/dist/{runtime-paths-WsO9sJFc.mjs → runtime-paths-twfV23YL.mjs} +2 -2
  93. package/dist/{scan-C3uotg_f.mjs → scan-CNMcltOX.mjs} +7 -7
  94. package/dist/{scope-D8HK6vU7.mjs → scope-BTWstJ1B.mjs} +4 -4
  95. package/dist/session-DgZifjLx.mjs +35 -0
  96. package/dist/{session-BAfypQb9.mjs → session-HBYOABWU.mjs} +28 -28
  97. package/dist/session-scan-BZxnYN1v.mjs +9 -0
  98. package/dist/{session-scan-BmnjSReu.mjs → session-scan-CX3MKCNg.mjs} +6 -6
  99. package/dist/{session-usage-oycSdiD3.mjs → session-usage-CCmPFFa6.mjs} +3 -3
  100. package/dist/{status-COtzewKV.mjs → status-Cecau8Ps.mjs} +9 -5
  101. package/dist/status-D52xC_i0.mjs +6 -0
  102. package/dist/{tool-errors-DXJ70-sr.mjs → tool-errors-BFw1gv-z.mjs} +2 -2
  103. package/dist/{tool-errors-B2LnIqR0.mjs → tool-errors-COM2JGEr.mjs} +6 -6
  104. package/dist/viewer-Ce-Xa9L3.mjs +22 -0
  105. package/dist/{viewer-BgGRqXfD.mjs → viewer-DvBg6N22.mjs} +16 -14
  106. package/dist/{wait-ChpHKJZV.mjs → wait-C5iWILj_.mjs} +3 -3
  107. package/dist/worker-config-BmcJ9R0U.mjs +42 -0
  108. package/dist/{worker-config-DgdT0iTB.mjs → worker-config-DkONNk_H.mjs} +54 -103
  109. package/dist/{workers-config-BhZBrR-Q.mjs → workers-config-DwzrtdYu.mjs} +2 -2
  110. package/dist/{worktree-BY--Rgmy.mjs → worktree-O_kU6Q3y.mjs} +164 -8
  111. package/dist/{zettelkasten-BHVx5zj-.mjs → zettelkasten-BH8AdNh8.mjs} +4 -4
  112. package/dist/{zettelkasten-LoH9RBiN.mjs → zettelkasten-FFhQFESJ.mjs} +2 -2
  113. package/docs/commands/README.md +32 -2
  114. package/docs/commands/audit.md +34 -3
  115. package/docs/commands/backup.md +1 -1
  116. package/docs/commands/build.md +4 -4
  117. package/docs/commands/cd.md +1 -1
  118. package/docs/commands/clear-names.md +1 -1
  119. package/docs/commands/cockpit.md +1 -1
  120. package/docs/commands/config.md +1 -1
  121. package/docs/commands/daemon.md +1 -1
  122. package/docs/commands/db.md +1 -1
  123. package/docs/commands/doc.md +1 -1
  124. package/docs/commands/end.md +1 -1
  125. package/docs/commands/find.md +1 -1
  126. package/docs/commands/git.md +110 -0
  127. package/docs/commands/handoff.md +70 -0
  128. package/docs/commands/harness.md +74 -0
  129. package/docs/commands/help.md +1 -1
  130. package/docs/commands/home.md +1 -1
  131. package/docs/commands/hooks-db.md +1 -1
  132. package/docs/commands/identity.md +1 -1
  133. package/docs/commands/install.md +1 -1
  134. package/docs/commands/issue.md +1 -1
  135. package/docs/commands/kg.md +1 -1
  136. package/docs/commands/launch.md +1 -1
  137. package/docs/commands/lessons.md +201 -0
  138. package/docs/commands/list.md +1 -1
  139. package/docs/commands/ls.md +1 -1
  140. package/docs/commands/mcp.md +1 -1
  141. package/docs/commands/memory.md +1 -1
  142. package/docs/commands/models.md +1 -1
  143. package/docs/commands/more.md +1 -1
  144. package/docs/commands/new.md +1 -1
  145. package/docs/commands/notes.md +1 -1
  146. package/docs/commands/notify.md +1 -1
  147. package/docs/commands/observation.md +1 -1
  148. package/docs/commands/obsidian.md +1 -1
  149. package/docs/commands/open.md +1 -1
  150. package/docs/commands/pane.md +1 -1
  151. package/docs/commands/pause.md +1 -1
  152. package/docs/commands/plan.md +1 -1
  153. package/docs/commands/project.md +1 -1
  154. package/docs/commands/projects.md +1 -1
  155. package/docs/commands/providers.md +1 -1
  156. package/docs/commands/queue.md +1 -1
  157. package/docs/commands/registry.md +1 -1
  158. package/docs/commands/reload.md +1 -1
  159. package/docs/commands/rename.md +1 -1
  160. package/docs/commands/restore.md +1 -1
  161. package/docs/commands/resume.md +1 -1
  162. package/docs/commands/router.md +1 -1
  163. package/docs/commands/rules.md +70 -0
  164. package/docs/commands/session.md +1 -1
  165. package/docs/commands/sessions.md +1 -1
  166. package/docs/commands/setup.md +1 -1
  167. package/docs/commands/setups.md +1 -1
  168. package/docs/commands/shell-init.md +1 -1
  169. package/docs/commands/skill.md +1 -1
  170. package/docs/commands/task.md +1 -1
  171. package/docs/commands/tasks.md +1 -1
  172. package/docs/commands/topic.md +1 -1
  173. package/docs/commands/update.md +1 -1
  174. package/docs/commands/worker.md +1 -1
  175. package/docs/commands/zettel.md +1 -1
  176. package/docs/concepts/panes.md +3 -2
  177. package/gemini-extension.json +1 -1
  178. package/package.json +2 -2
  179. package/pai-plugin.json +1 -1
  180. package/plugins/context-preservation/plugin.json +1 -1
  181. package/plugins/core/plugin.json +1 -1
  182. package/plugins/creative/plugin.json +1 -1
  183. package/plugins/observability/plugin.json +1 -1
  184. package/plugins/productivity/plugin.json +1 -1
  185. package/plugins/semantic-search/plugin.json +1 -1
  186. package/plugins/ui/plugin.json +1 -1
  187. package/plugins/zettelkasten/plugin.json +1 -1
  188. package/src/hooks/ts/lib/loop-guard.ts +3 -5
  189. package/src/hooks/ts/lib/rules/builtin/base64-decode-to-shell.rule.yaml +13 -0
  190. package/src/hooks/ts/lib/rules/builtin/chmod-world-writable.rule.yaml +13 -0
  191. package/src/hooks/ts/lib/rules/builtin/chmod-zero.rule.yaml +11 -0
  192. package/src/hooks/ts/lib/rules/builtin/credential-file-read.rule.yaml +13 -0
  193. package/src/hooks/ts/lib/rules/builtin/credential-read-then-network.rule.yaml +29 -0
  194. package/src/hooks/ts/lib/rules/builtin/crontab-persistence.rule.yaml +10 -0
  195. package/src/hooks/ts/lib/rules/builtin/curl-piped-to-shell.rule.yaml +15 -0
  196. package/src/hooks/ts/lib/rules/builtin/download-then-execute.rule.yaml +30 -0
  197. package/src/hooks/ts/lib/rules/builtin/find-root-delete.rule.yaml +11 -0
  198. package/src/hooks/ts/lib/rules/builtin/git-push-force.rule.yaml +24 -0
  199. package/src/hooks/ts/lib/rules/builtin/git-push-plus-refspec.rule.yaml +12 -0
  200. package/src/hooks/ts/lib/rules/builtin/git-reset-hard.rule.yaml +12 -0
  201. package/src/hooks/ts/lib/rules/builtin/injection-then-tool.rule.yaml +30 -0
  202. package/src/hooks/ts/lib/rules/builtin/instruction-override-disregard.rule.yaml +12 -0
  203. package/src/hooks/ts/lib/rules/builtin/instruction-override-ignore.rule.yaml +13 -0
  204. package/src/hooks/ts/lib/rules/builtin/launchagents-write-persistence.rule.yaml +12 -0
  205. package/src/hooks/ts/lib/rules/builtin/launchctl-load-persistence.rule.yaml +10 -0
  206. package/src/hooks/ts/lib/rules/builtin/reverse-shell-dev-tcp.rule.yaml +11 -0
  207. package/src/hooks/ts/lib/rules/builtin/reverse-shell-interactive-bash.rule.yaml +11 -0
  208. package/src/hooks/ts/lib/rules/builtin/rm-recursive-parent.rule.yaml +11 -0
  209. package/src/hooks/ts/lib/rules/builtin/rm-recursive-relative.rule.yaml +11 -0
  210. package/src/hooks/ts/lib/rules/builtin/rm-recursive-root.rule.yaml +24 -0
  211. package/src/hooks/ts/lib/rules/builtin/rm-trailing-tilde.rule.yaml +11 -0
  212. package/src/hooks/ts/lib/rules/builtin/sudoers-nopasswd.rule.yaml +15 -0
  213. package/src/hooks/ts/lib/rules/builtin.generated.ts +530 -0
  214. package/src/hooks/ts/lib/rules/eval.ts +74 -0
  215. package/src/hooks/ts/lib/rules/lint.ts +102 -0
  216. package/src/hooks/ts/lib/rules/load.ts +229 -0
  217. package/src/hooks/ts/lib/rules/types.ts +56 -0
  218. package/src/hooks/ts/pre-tool-use/security-validator.ts +27 -96
  219. package/src/hooks/ts/user-prompt/handoff-link.ts +34 -0
  220. package/dist/aibroker-client-BxzeEHPF.mjs +0 -3
  221. package/dist/auto-route-DWYK_0i0.mjs +0 -11
  222. package/dist/budget-DX-VIWGf.mjs +0 -15
  223. package/dist/cockpit-memory-DIrNs4xr.mjs +0 -20
  224. package/dist/daemon-ieo0lnpq.mjs +0 -46
  225. package/dist/detect-C0ZBXqDL.mjs +0 -10
  226. package/dist/factory-DeASMV7Z.mjs +0 -9
  227. package/dist/kill-tree-CXZ0WfVf.mjs +0 -10
  228. package/dist/operator-Bpxq_WB5.mjs +0 -7
  229. package/dist/providers-QJzpaNhX.mjs +0 -16
  230. package/dist/registrable-Drn8wIDO.mjs +0 -9
  231. package/dist/render-C4KR8qQ8.mjs +0 -13
  232. package/dist/render-Cz3BWIBO.mjs +0 -903
  233. package/dist/root-Bfb1zgwE.mjs +0 -36
  234. package/dist/route-table-ZVMNBsy7.mjs +0 -15
  235. package/dist/session-BcnhepLZ.mjs +0 -35
  236. package/dist/session-scan-CqUQdCac.mjs +0 -9
  237. package/dist/status-D_SWmOlH.mjs +0 -6
  238. package/dist/viewer-CbGN2Ri4.mjs +0 -22
  239. package/dist/worker-config-D1KVAMp4.mjs +0 -42
@@ -7351,7 +7351,7 @@ var require_public_api = __commonJS({
7351
7351
  }
7352
7352
  return doc;
7353
7353
  }
7354
- function parse2(src, reviver, options) {
7354
+ function parse3(src, reviver, options) {
7355
7355
  let _reviver = void 0;
7356
7356
  if (typeof reviver === "function") {
7357
7357
  _reviver = reviver;
@@ -7392,7 +7392,7 @@ var require_public_api = __commonJS({
7392
7392
  return value.toString(options);
7393
7393
  return new Document5.Document(value, _replacer, options).toString(options);
7394
7394
  }
7395
- exports.parse = parse2;
7395
+ exports.parse = parse3;
7396
7396
  exports.parseAllDocuments = parseAllDocuments;
7397
7397
  exports.parseDocument = parseDocument5;
7398
7398
  exports.stringify = stringify;
@@ -7777,27 +7777,6 @@ var init_scope = __esm({
7777
7777
  }
7778
7778
  });
7779
7779
 
7780
- // src/workers/chatui.ts
7781
- var init_chatui = __esm({
7782
- "src/workers/chatui.ts"() {
7783
- "use strict";
7784
- }
7785
- });
7786
-
7787
- // src/workers/deadline.ts
7788
- var init_deadline = __esm({
7789
- "src/workers/deadline.ts"() {
7790
- "use strict";
7791
- }
7792
- });
7793
-
7794
- // src/workers/active-time.ts
7795
- var init_active_time = __esm({
7796
- "src/workers/active-time.ts"() {
7797
- "use strict";
7798
- }
7799
- });
7800
-
7801
7780
  // src/workers/stagger.ts
7802
7781
  var init_stagger = __esm({
7803
7782
  "src/workers/stagger.ts"() {
@@ -7806,6 +7785,14 @@ var init_stagger = __esm({
7806
7785
  }
7807
7786
  });
7808
7787
 
7788
+ // src/workers/waiting.ts
7789
+ var init_waiting = __esm({
7790
+ "src/workers/waiting.ts"() {
7791
+ "use strict";
7792
+ init_args();
7793
+ }
7794
+ });
7795
+
7809
7796
  // src/workers/capacity.ts
7810
7797
  var DEFAULT_CAPACITY;
7811
7798
  var init_capacity = __esm({
@@ -7813,23 +7800,37 @@ var init_capacity = __esm({
7813
7800
  "use strict";
7814
7801
  init_stagger();
7815
7802
  init_config3();
7803
+ init_waiting();
7816
7804
  init_status();
7817
7805
  DEFAULT_CAPACITY = { enabled: true, localDefaultCap: 1, uncappedQueueCap: 3, maxTotalWaitMs: 2 * 36e5, heartbeatMs: 6e4, agingMs: 15 * 6e4 };
7818
7806
  }
7819
7807
  });
7820
7808
 
7821
- // src/workers/denials.ts
7822
- var init_denials = __esm({
7823
- "src/workers/denials.ts"() {
7809
+ // src/workers/chatui.ts
7810
+ var init_chatui = __esm({
7811
+ "src/workers/chatui.ts"() {
7824
7812
  "use strict";
7825
7813
  }
7826
7814
  });
7827
7815
 
7828
- // src/workers/waiting.ts
7829
- var init_waiting = __esm({
7830
- "src/workers/waiting.ts"() {
7816
+ // src/workers/deadline.ts
7817
+ var init_deadline = __esm({
7818
+ "src/workers/deadline.ts"() {
7819
+ "use strict";
7820
+ }
7821
+ });
7822
+
7823
+ // src/workers/active-time.ts
7824
+ var init_active_time = __esm({
7825
+ "src/workers/active-time.ts"() {
7826
+ "use strict";
7827
+ }
7828
+ });
7829
+
7830
+ // src/workers/denials.ts
7831
+ var init_denials = __esm({
7832
+ "src/workers/denials.ts"() {
7831
7833
  "use strict";
7832
- init_args();
7833
7834
  }
7834
7835
  });
7835
7836
 
@@ -8072,6 +8073,7 @@ var init_worktree = __esm({
8072
8073
  init_paths();
8073
8074
  init_pending();
8074
8075
  init_pool();
8076
+ init_config2();
8075
8077
  }
8076
8078
  });
8077
8079
 
@@ -8095,6 +8097,156 @@ var init_endreason = __esm({
8095
8097
  }
8096
8098
  });
8097
8099
 
8100
+ // src/workers/ps-table.ts
8101
+ import { execFileSync as execFileSync2 } from "node:child_process";
8102
+ function truncateLines(text, max = PS_MAX_LINE) {
8103
+ return text.split("\n").map((l) => l.length > max ? l.slice(0, max) : l).join("\n");
8104
+ }
8105
+ function psTable(format, run = realRunner, maxLine = PS_MAX_LINE) {
8106
+ return truncateLines(run(["-axo", format]), maxLine);
8107
+ }
8108
+ var PS_MAX_BUFFER, PS_MAX_LINE, realRunner;
8109
+ var init_ps_table = __esm({
8110
+ "src/workers/ps-table.ts"() {
8111
+ "use strict";
8112
+ PS_MAX_BUFFER = 64 * 1024 * 1024;
8113
+ PS_MAX_LINE = 1024;
8114
+ realRunner = (args) => execFileSync2("ps", args, { encoding: "utf8", env: { ...process.env, LC_ALL: "C" }, maxBuffer: PS_MAX_BUFFER, timeout: 15e3 });
8115
+ }
8116
+ });
8117
+
8118
+ // src/workers/hang-probe.ts
8119
+ var init_hang_probe = __esm({
8120
+ "src/workers/hang-probe.ts"() {
8121
+ "use strict";
8122
+ init_ps_table();
8123
+ }
8124
+ });
8125
+
8126
+ // src/utils/redact.ts
8127
+ var REDACTED, REDACTED_RE, KEY_WORDS, VAL, REDACT_RULES, LINE_RULES, LONG_RUN, KEY_LINE;
8128
+ var init_redact = __esm({
8129
+ "src/utils/redact.ts"() {
8130
+ "use strict";
8131
+ REDACTED = "[REDACTED]";
8132
+ REDACTED_RE = String.raw`\[REDACTED\]`;
8133
+ KEY_WORDS = "password|passwd|secret|token|api[_-]?key|credential|auth(?:orization)?|bearer";
8134
+ VAL = String.raw`(?:"[^"]*"|'[^']*'|[^\s'"]+)`;
8135
+ REDACT_RULES = [
8136
+ {
8137
+ // `Authorization: Bearer xxx` / `Authorization: Basic xxx` — keep the scheme
8138
+ id: "authorization",
8139
+ re: /(Authorization\s*:\s*)(Bearer|Basic)\s+(\S+)/gi,
8140
+ replace: (_m, head, scheme) => `${head}${scheme} ${REDACTED}`
8141
+ },
8142
+ {
8143
+ // `key=value`, `key: value`, `"key": "value"` — key carries a secret-ish word;
8144
+ // the word must be a whole key segment, so `monkeys=` stays untouched
8145
+ id: "key-value",
8146
+ 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"),
8147
+ replace: (_m, key, sep) => `${key}${sep}${REDACTED}`
8148
+ },
8149
+ {
8150
+ // `export FOO_TOKEN=...` / `FOO_KEY=...` — SCREAMING_SNAKE env style
8151
+ id: "env-style",
8152
+ 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"),
8153
+ replace: (_m, head) => `${head}${REDACTED}`
8154
+ },
8155
+ {
8156
+ // long CLI flags only: `--password X`, `--token X`, `--api-key X`, `--secret X`, `--passwd X`
8157
+ id: "cli-flag",
8158
+ re: new RegExp(String.raw`(--(?:password|token|api-key|secret|passwd)(?:\s*=\s*|\s+))(${VAL})`, "gi"),
8159
+ replace: (_m, head) => `${head}${REDACTED}`
8160
+ },
8161
+ {
8162
+ // `scheme://user:pass@host` — redact the password, keep user and host
8163
+ id: "url-credentials",
8164
+ re: /((?<![a-z0-9+.-])[a-z][a-z0-9+.-]*:\/\/[^\s/@:]+:)([^\s/@]+)(@)/gi,
8165
+ replace: (_m, head, _pass, at) => `${head}${REDACTED}${at}`
8166
+ },
8167
+ {
8168
+ // provider token prefixes: sk-ant-, sk-, ghp_/gho_/ghu_/ghs_/ghr_, github_pat_,
8169
+ // glpat-, xoxb-/xoxp-/xoxa-, AKIA/ASIA + 16 chars, AIza + 35 chars, JWT (eyJ… three segments)
8170
+ id: "token-prefix",
8171
+ 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,
8172
+ replace: REDACTED
8173
+ },
8174
+ {
8175
+ // 40+ char opaque base64/hex run, only on a line that also has a secret-ish key word
8176
+ id: "long-run",
8177
+ re: /\b[A-Za-z0-9+/]{40,}={0,2}(?![\w/])/g,
8178
+ // a bare 40-hex git SHA stays; it is only redacted as the value of a secret key
8179
+ replace: (m) => /^[0-9a-f]{40}$/i.test(m) ? m : REDACTED
8180
+ }
8181
+ ];
8182
+ LINE_RULES = REDACT_RULES.filter((r) => r.id !== "long-run");
8183
+ LONG_RUN = REDACT_RULES.find((r) => r.id === "long-run");
8184
+ KEY_LINE = new RegExp(`(?:${KEY_WORDS})`, "i");
8185
+ }
8186
+ });
8187
+
8188
+ // src/hooks/ts/lib/build-gate.ts
8189
+ var init_build_gate = __esm({
8190
+ "src/hooks/ts/lib/build-gate.ts"() {
8191
+ "use strict";
8192
+ }
8193
+ });
8194
+
8195
+ // src/hooks/ts/lib/loop-guard.ts
8196
+ var LOOP_MAX_REPEATS, LOOP_READ_STREAK, SELF, LOOP_DENY_REASON, WAIT_CAP_MS, FP_FULL_READ_BYTES, FP_TOTAL_BYTES;
8197
+ var init_loop_guard = __esm({
8198
+ "src/hooks/ts/lib/loop-guard.ts"() {
8199
+ "use strict";
8200
+ init_hang_probe();
8201
+ init_redact();
8202
+ init_build_gate();
8203
+ LOOP_MAX_REPEATS = 4;
8204
+ LOOP_READ_STREAK = Number(process.env.PAI_LOOP_READ_STREAK) > 0 ? Number(process.env.PAI_LOOP_READ_STREAK) : 15;
8205
+ 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).";
8206
+ LOOP_DENY_REASON = `loop guard: you ran this command ${LOOP_MAX_REPEATS} times with the same result and nothing changed. Stop repeating it. ${SELF}`;
8207
+ WAIT_CAP_MS = 45 * 6e4;
8208
+ FP_FULL_READ_BYTES = 256 * 1024;
8209
+ FP_TOTAL_BYTES = 4 * 1024 * 1024;
8210
+ }
8211
+ });
8212
+
8213
+ // src/audit/scan.ts
8214
+ var init_scan = __esm({
8215
+ "src/audit/scan.ts"() {
8216
+ "use strict";
8217
+ init_loop_guard();
8218
+ }
8219
+ });
8220
+
8221
+ // src/hooks/ts/lib/rules/builtin.generated.ts
8222
+ var init_builtin_generated = __esm({
8223
+ "src/hooks/ts/lib/rules/builtin.generated.ts"() {
8224
+ "use strict";
8225
+ }
8226
+ });
8227
+
8228
+ // src/hooks/ts/lib/rules/load.ts
8229
+ var import_yaml6;
8230
+ var init_load = __esm({
8231
+ "src/hooks/ts/lib/rules/load.ts"() {
8232
+ "use strict";
8233
+ import_yaml6 = __toESM(require_dist(), 1);
8234
+ init_pai_home();
8235
+ init_builtin_generated();
8236
+ }
8237
+ });
8238
+
8239
+ // src/workers/scan.ts
8240
+ var init_scan2 = __esm({
8241
+ "src/workers/scan.ts"() {
8242
+ "use strict";
8243
+ init_scan();
8244
+ init_load();
8245
+ init_paths();
8246
+ init_status();
8247
+ }
8248
+ });
8249
+
8098
8250
  // src/workers/render.ts
8099
8251
  var init_render = __esm({
8100
8252
  "src/workers/render.ts"() {
@@ -8114,6 +8266,7 @@ var init_render = __esm({
8114
8266
  init_scope();
8115
8267
  init_endreason();
8116
8268
  init_report();
8269
+ init_scan2();
8117
8270
  }
8118
8271
  });
8119
8272
 
@@ -8170,6 +8323,8 @@ var init_pane_bar = __esm({
8170
8323
  "use strict";
8171
8324
  init_chatui();
8172
8325
  init_render();
8326
+ init_capacity();
8327
+ init_pane_exec();
8173
8328
  init_pane_policy();
8174
8329
  }
8175
8330
  });
@@ -8179,29 +8334,12 @@ var init_pane_exec = __esm({
8179
8334
  "src/workers/pane-exec.ts"() {
8180
8335
  "use strict";
8181
8336
  init_pai_home();
8337
+ init_capacity();
8182
8338
  init_pane_bar();
8183
8339
  init_pane_policy();
8184
8340
  }
8185
8341
  });
8186
8342
 
8187
- // src/workers/ps-table.ts
8188
- import { execFileSync as execFileSync2 } from "node:child_process";
8189
- function truncateLines(text, max = PS_MAX_LINE) {
8190
- return text.split("\n").map((l) => l.length > max ? l.slice(0, max) : l).join("\n");
8191
- }
8192
- function psTable(format, run = realRunner, maxLine = PS_MAX_LINE) {
8193
- return truncateLines(run(["-axo", format]), maxLine);
8194
- }
8195
- var PS_MAX_BUFFER, PS_MAX_LINE, realRunner;
8196
- var init_ps_table = __esm({
8197
- "src/workers/ps-table.ts"() {
8198
- "use strict";
8199
- PS_MAX_BUFFER = 64 * 1024 * 1024;
8200
- PS_MAX_LINE = 1024;
8201
- realRunner = (args) => execFileSync2("ps", args, { encoding: "utf8", env: { ...process.env, LC_ALL: "C" }, maxBuffer: PS_MAX_BUFFER, timeout: 15e3 });
8202
- }
8203
- });
8204
-
8205
8343
  // src/workers/pane-title.ts
8206
8344
  var init_pane_title = __esm({
8207
8345
  "src/workers/pane-title.ts"() {
@@ -9254,7 +9254,7 @@ function ownsPid(status) {
9254
9254
  env: { ...process.env, LC_ALL: "C" }
9255
9255
  }).trim();
9256
9256
  const psStart = Date.parse(out);
9257
- const started = spawnTimeOf(status) ?? Date.parse(status.started.replace(" ", "T"));
9257
+ const started = status.procStart ?? spawnTimeOf(status) ?? Date.parse(status.started.replace(" ", "T"));
9258
9258
  if (Number.isNaN(psStart) || Number.isNaN(started)) return alive(status.pid);
9259
9259
  return Math.abs(psStart - started) <= 12e4;
9260
9260
  } catch {
@@ -10408,6 +10408,62 @@ function wrapTestCommand(command) {
10408
10408
  return `${WRAP} --cmd-b64 ${Buffer.from(command, "utf8").toString("base64")}`;
10409
10409
  }
10410
10410
 
10411
+ // src/utils/redact.ts
10412
+ var REDACTED = "[REDACTED]";
10413
+ var REDACTED_RE = String.raw`\[REDACTED\]`;
10414
+ var KEY_WORDS = "password|passwd|secret|token|api[_-]?key|credential|auth(?:orization)?|bearer";
10415
+ var VAL = String.raw`(?:"[^"]*"|'[^']*'|[^\s'"]+)`;
10416
+ var REDACT_RULES = [
10417
+ {
10418
+ // `Authorization: Bearer xxx` / `Authorization: Basic xxx` — keep the scheme
10419
+ id: "authorization",
10420
+ re: /(Authorization\s*:\s*)(Bearer|Basic)\s+(\S+)/gi,
10421
+ replace: (_m, head, scheme) => `${head}${scheme} ${REDACTED}`
10422
+ },
10423
+ {
10424
+ // `key=value`, `key: value`, `"key": "value"` — key carries a secret-ish word;
10425
+ // the word must be a whole key segment, so `monkeys=` stays untouched
10426
+ id: "key-value",
10427
+ 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"),
10428
+ replace: (_m, key, sep) => `${key}${sep}${REDACTED}`
10429
+ },
10430
+ {
10431
+ // `export FOO_TOKEN=...` / `FOO_KEY=...` — SCREAMING_SNAKE env style
10432
+ id: "env-style",
10433
+ 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"),
10434
+ replace: (_m, head) => `${head}${REDACTED}`
10435
+ },
10436
+ {
10437
+ // long CLI flags only: `--password X`, `--token X`, `--api-key X`, `--secret X`, `--passwd X`
10438
+ id: "cli-flag",
10439
+ re: new RegExp(String.raw`(--(?:password|token|api-key|secret|passwd)(?:\s*=\s*|\s+))(${VAL})`, "gi"),
10440
+ replace: (_m, head) => `${head}${REDACTED}`
10441
+ },
10442
+ {
10443
+ // `scheme://user:pass@host` — redact the password, keep user and host
10444
+ id: "url-credentials",
10445
+ re: /((?<![a-z0-9+.-])[a-z][a-z0-9+.-]*:\/\/[^\s/@:]+:)([^\s/@]+)(@)/gi,
10446
+ replace: (_m, head, _pass, at) => `${head}${REDACTED}${at}`
10447
+ },
10448
+ {
10449
+ // provider token prefixes: sk-ant-, sk-, ghp_/gho_/ghu_/ghs_/ghr_, github_pat_,
10450
+ // glpat-, xoxb-/xoxp-/xoxa-, AKIA/ASIA + 16 chars, AIza + 35 chars, JWT (eyJ… three segments)
10451
+ id: "token-prefix",
10452
+ 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,
10453
+ replace: REDACTED
10454
+ },
10455
+ {
10456
+ // 40+ char opaque base64/hex run, only on a line that also has a secret-ish key word
10457
+ id: "long-run",
10458
+ re: /\b[A-Za-z0-9+/]{40,}={0,2}(?![\w/])/g,
10459
+ // a bare 40-hex git SHA stays; it is only redacted as the value of a secret key
10460
+ replace: (m) => /^[0-9a-f]{40}$/i.test(m) ? m : REDACTED
10461
+ }
10462
+ ];
10463
+ var LINE_RULES = REDACT_RULES.filter((r) => r.id !== "long-run");
10464
+ var LONG_RUN = REDACT_RULES.find((r) => r.id === "long-run");
10465
+ var KEY_LINE = new RegExp(`(?:${KEY_WORDS})`, "i");
10466
+
10411
10467
  // src/hooks/ts/lib/build-gate.ts
10412
10468
  import { execFileSync as execFileSync7 } from "node:child_process";
10413
10469
  import { existsSync as existsSync12, readFileSync as readFileSync12, realpathSync as realpathSync2 } from "node:fs";
@@ -9243,6 +9243,73 @@ function currentWorkerId(env = process.env, logDir) {
9243
9243
  // src/workers/ps-table.ts
9244
9244
  var PS_MAX_BUFFER = 64 * 1024 * 1024;
9245
9245
 
9246
+ // src/utils/redact.ts
9247
+ var REDACTED = "[REDACTED]";
9248
+ var REDACTED_RE = String.raw`\[REDACTED\]`;
9249
+ var KEY_WORDS = "password|passwd|secret|token|api[_-]?key|credential|auth(?:orization)?|bearer";
9250
+ var VAL = String.raw`(?:"[^"]*"|'[^']*'|[^\s'"]+)`;
9251
+ var REDACT_RULES = [
9252
+ {
9253
+ // `Authorization: Bearer xxx` / `Authorization: Basic xxx` — keep the scheme
9254
+ id: "authorization",
9255
+ re: /(Authorization\s*:\s*)(Bearer|Basic)\s+(\S+)/gi,
9256
+ replace: (_m, head, scheme) => `${head}${scheme} ${REDACTED}`
9257
+ },
9258
+ {
9259
+ // `key=value`, `key: value`, `"key": "value"` — key carries a secret-ish word;
9260
+ // the word must be a whole key segment, so `monkeys=` stays untouched
9261
+ id: "key-value",
9262
+ 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"),
9263
+ replace: (_m, key, sep) => `${key}${sep}${REDACTED}`
9264
+ },
9265
+ {
9266
+ // `export FOO_TOKEN=...` / `FOO_KEY=...` — SCREAMING_SNAKE env style
9267
+ id: "env-style",
9268
+ 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"),
9269
+ replace: (_m, head) => `${head}${REDACTED}`
9270
+ },
9271
+ {
9272
+ // long CLI flags only: `--password X`, `--token X`, `--api-key X`, `--secret X`, `--passwd X`
9273
+ id: "cli-flag",
9274
+ re: new RegExp(String.raw`(--(?:password|token|api-key|secret|passwd)(?:\s*=\s*|\s+))(${VAL})`, "gi"),
9275
+ replace: (_m, head) => `${head}${REDACTED}`
9276
+ },
9277
+ {
9278
+ // `scheme://user:pass@host` — redact the password, keep user and host
9279
+ id: "url-credentials",
9280
+ re: /((?<![a-z0-9+.-])[a-z][a-z0-9+.-]*:\/\/[^\s/@:]+:)([^\s/@]+)(@)/gi,
9281
+ replace: (_m, head, _pass, at) => `${head}${REDACTED}${at}`
9282
+ },
9283
+ {
9284
+ // provider token prefixes: sk-ant-, sk-, ghp_/gho_/ghu_/ghs_/ghr_, github_pat_,
9285
+ // glpat-, xoxb-/xoxp-/xoxa-, AKIA/ASIA + 16 chars, AIza + 35 chars, JWT (eyJ… three segments)
9286
+ id: "token-prefix",
9287
+ 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,
9288
+ replace: REDACTED
9289
+ },
9290
+ {
9291
+ // 40+ char opaque base64/hex run, only on a line that also has a secret-ish key word
9292
+ id: "long-run",
9293
+ re: /\b[A-Za-z0-9+/]{40,}={0,2}(?![\w/])/g,
9294
+ // a bare 40-hex git SHA stays; it is only redacted as the value of a secret key
9295
+ replace: (m) => /^[0-9a-f]{40}$/i.test(m) ? m : REDACTED
9296
+ }
9297
+ ];
9298
+ var PEM_BLOCK = /-----BEGIN[^-\n]*PRIVATE KEY-----[\s\S]*?(?:-----END[^-\n]*PRIVATE KEY-----|$)/g;
9299
+ var LINE_RULES = REDACT_RULES.filter((r) => r.id !== "long-run");
9300
+ var LONG_RUN = REDACT_RULES.find((r) => r.id === "long-run");
9301
+ var KEY_LINE = new RegExp(`(?:${KEY_WORDS})`, "i");
9302
+ function redactLine(line) {
9303
+ let out = line;
9304
+ for (const r of LINE_RULES) out = out.replace(r.re, r.replace);
9305
+ if (KEY_LINE.test(out)) out = out.replace(LONG_RUN.re, LONG_RUN.replace);
9306
+ return out;
9307
+ }
9308
+ function redactSecrets(text) {
9309
+ const withPem = text.replace(PEM_BLOCK, `-----BEGIN PRIVATE KEY----- ${REDACTED}`);
9310
+ return withPem.split("\n").map(redactLine).join("\n");
9311
+ }
9312
+
9246
9313
  // src/hooks/ts/lib/loop-guard.ts
9247
9314
  var LOOP_MAX_REPEATS = 4;
9248
9315
  var LOOP_READ_STREAK = Number(process.env.PAI_LOOP_READ_STREAK) > 0 ? Number(process.env.PAI_LOOP_READ_STREAK) : 15;
@@ -9360,10 +9427,8 @@ ${typeof r.stderr === "string" ? r.stderr : ""}`;
9360
9427
  text = text.replace(TMP_PATH, "TMP").replace(/\s+/g, " ").trim();
9361
9428
  return text.length > RESULT_CHARS ? `${text.slice(0, RESULT_CHARS / 2)} ${text.slice(-RESULT_CHARS / 2)}` : text;
9362
9429
  }
9363
- var SECRET_LINE = /pass(?:word|wd)|secret|token|api[_-]?key|credential|authorization|bearer|private key|^\s*(?:export\s+)?[A-Z][A-Z0-9_]*(?:KEY|SECRET|TOKEN|PASS\w*|CRED\w*|AUTH\w*)\s*=|\b(?:sk|ghp|gho|xox[bap])[-_][A-Za-z0-9_-]{16,}|\b[A-Za-z0-9+]{40,}={0,2}(?![\w/])|\b[a-z][a-z0-9+.-]*:\/\/[^\s\/:@]+:[^\s\/@]+@|\b(?:AKIA|ASIA|AGPA|AIDA|AROA)[A-Z0-9]{16}\b|\bgh[pousr]_[A-Za-z0-9]{20,}/i;
9364
- var MASKED_LINE = "[line masked: looks like a secret]";
9365
9430
  function maskSecrets(text) {
9366
- return text.split("\n").map((l) => SECRET_LINE.test(l) ? MASKED_LINE : l).join("\n");
9431
+ return redactSecrets(text);
9367
9432
  }
9368
9433
  function rawText(response) {
9369
9434
  if (typeof response === "string") return response;