@symerian/symi 2.6.1 → 2.6.2

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 (103) hide show
  1. package/dist/{agents-DQIz-_on.js → agents-qLMWAYwU.js} +4 -4
  2. package/dist/{agents.config-D8WPDf-m.js → agents.config-BfjAwFCr.js} +1 -1
  3. package/dist/{agents.config-CIJRaVWl.js → agents.config-BmdFH4J5.js} +1 -1
  4. package/dist/{auth-choice-DTDyJL1r.js → auth-choice-D1u_GPfQ.js} +1 -1
  5. package/dist/{auth-choice-BqFbNDuP.js → auth-choice-zFq3WRQ0.js} +1 -1
  6. package/dist/{banner-DYDCxnDL.js → banner-DpH44qlJ.js} +1 -1
  7. package/dist/build-info.json +3 -3
  8. package/dist/bundled/boot-md/handler.js +1 -1
  9. package/dist/bundled/session-memory/handler.js +1 -1
  10. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  11. package/dist/{channel-options-vBCJhJB7.js → channel-options-0iOfzVR3.js} +1 -1
  12. package/dist/{channel-options-CvHSm_Kx.js → channel-options-C8tKm8re.js} +1 -1
  13. package/dist/{channel-web-CM2LyWZW.js → channel-web-DYinYBz4.js} +1 -1
  14. package/dist/{channels-cli-DzOjNNFn.js → channels-cli-93tLT17t.js} +4 -4
  15. package/dist/{channels-cli-D5H3Wcho.js → channels-cli-C8HgSMTH.js} +4 -4
  16. package/dist/{cli-8hqssnRJ.js → cli-BYJyRW2M.js} +1 -1
  17. package/dist/{cli-DNZwCDRe.js → cli-DapZXGSB.js} +1 -1
  18. package/dist/{command-registry-CHtN2HeK.js → command-registry-9EhYc6da.js} +9 -9
  19. package/dist/{completion-cli-Cov6N3BO.js → completion-cli-BFZv3K5D.js} +2 -2
  20. package/dist/{completion-cli-C8y_J5KC.js → completion-cli-CCeQlMlC.js} +1 -1
  21. package/dist/{config-cli-B2REEd2l.js → config-cli-DbWMIBUz.js} +1 -1
  22. package/dist/{config-cli-BwO0xAbV.js → config-cli-Dv2mtIeM.js} +1 -1
  23. package/dist/{configure-BWSYSi2-.js → configure-B8zV6Hxj.js} +3 -3
  24. package/dist/{configure-C6yNe33U.js → configure-CVQf2UJE.js} +3 -3
  25. package/dist/{doctor-completion-BKKzstt6.js → doctor-completion-BunqvoqZ.js} +1 -1
  26. package/dist/{doctor-completion-D7CDLFLg.js → doctor-completion-CLeX1kaN.js} +1 -1
  27. package/dist/entry.js +1 -1
  28. package/dist/extensionAPI.js +1 -1
  29. package/dist/{gateway-cli-Datohp3m.js → gateway-cli-Co-tp-WC.js} +9 -9
  30. package/dist/{gateway-cli-BhFM4Bkm.js → gateway-cli-DMey_29a.js} +9 -9
  31. package/dist/{glass-ui-ws-D9yvYULL.js → glass-ui-ws-C4O227UO.js} +7 -7
  32. package/dist/{glass-ui-ws-BzqfD_wX.js → glass-ui-ws-CKb1jTZR.js} +7 -7
  33. package/dist/{health-BjwDRAdd.js → health-CDGOsNeD.js} +1 -1
  34. package/dist/{health-C5XJPwpt.js → health-CM1asUG8.js} +1 -1
  35. package/dist/{hooks-cli-U12oVyLH.js → hooks-cli-DFKB3Z6X.js} +2 -2
  36. package/dist/{hooks-cli-CafMq9Vr.js → hooks-cli-Tx0TzSju.js} +2 -2
  37. package/dist/index.js +6 -6
  38. package/dist/llm-slug-generator.js +1 -1
  39. package/dist/{models-Bo4iHJy-.js → models-CiqHYwje.js} +2 -2
  40. package/dist/{models-cli-6aNi3eN9.js → models-cli-B-b-gBKG.js} +2 -2
  41. package/dist/{models-cli-B5vh-XK8.js → models-cli-B4ATSsNS.js} +3 -3
  42. package/dist/{onboard-f-GJ26Ix.js → onboard-B_ECX48L.js} +2 -2
  43. package/dist/{onboard-Bm-pmstf.js → onboard-DcnGZKZX.js} +2 -2
  44. package/dist/{onboard-channels-CUl5U8kV.js → onboard-channels-FFQPpuEN.js} +1 -1
  45. package/dist/{onboard-channels-BRd1cXye.js → onboard-channels-pfSGhg_C.js} +1 -1
  46. package/dist/{onboarding-DIVKvosg.js → onboarding-BU14cspo.js} +3 -3
  47. package/dist/{onboarding-CvBDWlBJ.js → onboarding-jhZxQcZ3.js} +3 -3
  48. package/dist/{onboarding.finalize-DJX6mSLa.js → onboarding.finalize-B8oOMfHc.js} +6 -6
  49. package/dist/{onboarding.finalize-WSac-JKd.js → onboarding.finalize-ByZT4dF5.js} +5 -5
  50. package/dist/{pi-embedded-BmbbC1Sb.js → pi-embedded-BY9AnmoP.js} +83 -13
  51. package/dist/{plugin-registry-2zUJMasm.js → plugin-registry-CNf1_8hj.js} +1 -1
  52. package/dist/{plugin-registry-5yf-hu_W.js → plugin-registry-DXWJkJX6.js} +1 -1
  53. package/dist/plugin-sdk/agents/pi-tools.validate-wrapper.d.ts +6 -6
  54. package/dist/plugin-sdk/{channel-web-DPyyTvFo.js → channel-web-DZQQ0mzN.js} +1 -1
  55. package/dist/plugin-sdk/index.js +2 -2
  56. package/dist/plugin-sdk/{reply-QAcAd9ev.js → reply-DvZeyOVA.js} +83 -13
  57. package/dist/plugin-sdk/{web-DaTTL9M0.js → web-BCsJFuQu.js} +2 -2
  58. package/dist/{plugins-cli-D4eRESV2.js → plugins-cli-BiedlZMy.js} +2 -2
  59. package/dist/{plugins-cli-DksVl33N.js → plugins-cli-C9TYM40P.js} +2 -2
  60. package/dist/{program-BjORH7Cc.js → program-bnWda72r.js} +7 -7
  61. package/dist/{program-context-DaNGrTOm.js → program-context-CY1jWc5A.js} +17 -17
  62. package/dist/{prompt-select-styled-YOj4xigd.js → prompt-select-styled-BEnZY8wI.js} +4 -4
  63. package/dist/{prompt-select-styled-QaS2zul_.js → prompt-select-styled-B_lFTtqp.js} +4 -4
  64. package/dist/{provider-auth-helpers-DCEbm2hz.js → provider-auth-helpers-DApJuzBd.js} +1 -1
  65. package/dist/{provider-auth-helpers-BAGT_RXV.js → provider-auth-helpers-DcNKxc7D.js} +1 -1
  66. package/dist/{push-apns-Bek3ANJa.js → push-apns-CKKHlj6j.js} +1 -1
  67. package/dist/{push-apns-BECodU1i.js → push-apns-DA7UMNQH.js} +1 -1
  68. package/dist/{register.agent-B34lxx7F.js → register.agent-8lxVlmzQ.js} +5 -5
  69. package/dist/{register.agent-DJHQo-Iq.js → register.agent-ulu0VmOg.js} +6 -6
  70. package/dist/{register.configure-BdhhIzb0.js → register.configure-45--Sly1.js} +6 -6
  71. package/dist/{register.configure-DC_-t5kj.js → register.configure-rq0h5r3X.js} +6 -6
  72. package/dist/{register.maintenance-CITur3O_.js → register.maintenance-CXbxRtWI.js} +8 -8
  73. package/dist/{register.maintenance-cs-A4kHF.js → register.maintenance-DyEJx7NY.js} +7 -7
  74. package/dist/{register.message--RhtnEYn.js → register.message-C7Yh1uky.js} +2 -2
  75. package/dist/{register.message-PIaHm2pZ.js → register.message-CiN_pt6K.js} +2 -2
  76. package/dist/{register.onboard-CTJQoDcK.js → register.onboard-BWaRkbei.js} +4 -4
  77. package/dist/{register.onboard-DucZgrF7.js → register.onboard-e_2hc2Rm.js} +4 -4
  78. package/dist/{register.setup-2ZiUN7ui.js → register.setup-BIIFHtF7.js} +4 -4
  79. package/dist/{register.setup-DD4Rgkt9.js → register.setup-zwh90Vn-.js} +4 -4
  80. package/dist/{register.status-health-sessions-BqD7L8XL.js → register.status-health-sessions-D6t5maEr.js} +3 -3
  81. package/dist/{register.status-health-sessions-sLgA92t7.js → register.status-health-sessions-O-sVAFHE.js} +3 -3
  82. package/dist/{register.subclis-B2dGWFur.js → register.subclis-DOiZocR6.js} +9 -9
  83. package/dist/{reply-DYnTEYoa.js → reply-05js8eGB.js} +83 -13
  84. package/dist/{run-main-DWmu2b6D.js → run-main-u-Eyc8Wm.js} +14 -14
  85. package/dist/{server-methods-C8EWZt2g.js → server-methods-Bvl1xubo.js} +7 -7
  86. package/dist/{server-methods-vDGoM3xL.js → server-methods-Dds-iEoY.js} +7 -7
  87. package/dist/{server-node-events-CKi12bol.js → server-node-events-Qp-gJMET.js} +2 -2
  88. package/dist/{server-node-events-DFwGbkcO.js → server-node-events-qGqpsPxm.js} +2 -2
  89. package/dist/{status--iNVOTMO.js → status-BATOXGRi.js} +2 -2
  90. package/dist/{status-B1_iHrOg.js → status-BRSo-LY3.js} +2 -2
  91. package/dist/{status-DiX0DAtH.js → status-BqQ9mm64.js} +1 -1
  92. package/dist/{status-BQcdARV4.js → status-CfYa1Q9K.js} +1 -1
  93. package/dist/{subagent-registry-CXrOOgPW.js → subagent-registry-lbDgDwLy.js} +83 -13
  94. package/dist/{unified-runner-CulJZMxc.js → unified-runner-B4ICXRlg.js} +83 -13
  95. package/dist/{update-cli-D1pLX3eo.js → update-cli-BOaP4XyQ.js} +8 -8
  96. package/dist/{update-cli-560gprSp.js → update-cli-R8-SSkbS.js} +7 -7
  97. package/dist/{update-runner-BQxFFCGc.js → update-runner-B8UmqtLI.js} +1 -1
  98. package/dist/{update-runner-CLKHrONW.js → update-runner-CWJ4pC1b.js} +1 -1
  99. package/dist/{web-Dr5cOn-1.js → web-BWybtnEa.js} +2 -2
  100. package/dist/{web-hHX9a9YO.js → web-CQH9fSkH.js} +1 -1
  101. package/dist/{web-Bqrgp43v.js → web-CSrDbJJ7.js} +1 -1
  102. package/dist/{web-D4qJ9XKP.js → web-DBFW0ejP.js} +1 -1
  103. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import "./paths-Cqn-zk3M.js";
2
2
  import "./utils-B-0b9bGM.js";
3
3
  import "./thinking-EAliFiVK.js";
4
- import "./reply-DYnTEYoa.js";
4
+ import "./reply-05js8eGB.js";
5
5
  import "./registry-Cja8eT7G.js";
6
6
  import "./subsystem-D9vIQve0.js";
7
7
  import "./exec-CWkblSrI.js";
@@ -113,18 +113,18 @@ import "./service-Cl74hx8J.js";
113
113
  import "./diagnostics-BAMlsVVX.js";
114
114
  import "./table-BTgkRafz.js";
115
115
  import "./audit-CrITRV6w.js";
116
- import "./status--iNVOTMO.js";
117
- import "./health-BjwDRAdd.js";
116
+ import "./status-BATOXGRi.js";
117
+ import "./health-CDGOsNeD.js";
118
118
  import "./control-ui-assets-Z947tKLt.js";
119
119
  import "./update-check-CtckACbb.js";
120
- import { n as handleGatewayRequest } from "./server-methods-vDGoM3xL.js";
121
- import "./push-apns-BECodU1i.js";
122
- import "./agents.config-CIJRaVWl.js";
120
+ import { n as handleGatewayRequest } from "./server-methods-Dds-iEoY.js";
121
+ import "./push-apns-DA7UMNQH.js";
122
+ import "./agents.config-BmdFH4J5.js";
123
123
  import "./dm-policy-shared-Bh3TbexU.js";
124
124
  import "./node-service-Cxz4e-Qd.js";
125
125
  import "./status.update-DtwCUTf-.js";
126
126
  import "./skills-install-D67isO1L.js";
127
- import "./update-runner-CLKHrONW.js";
127
+ import "./update-runner-CWJ4pC1b.js";
128
128
 
129
129
  //#region src/gateway/glass-ui-ws.ts
130
130
  const SESSION_KEY = "agent:main:main";
@@ -1,5 +1,5 @@
1
1
  import { B as theme, k as info, l as escapeRegExp, z as isRich } from "./utils-B-0b9bGM.js";
2
- import { At as resolveHeartbeatDeliveryTarget, Cr as peekSystemEventEntries, Vn as resolveUserTimezone, cr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, ct as setHeartbeatWakeHandler, dr as resolveHeartbeatPrompt$1, fr as stripHeartbeatToken, jt as resolveHeartbeatSenderContext, lr as DEFAULT_HEARTBEAT_EVERY, lt as resolveHeartbeatReasonKind, nr as getQueueSize, r as appendCronStyleCurrentTimeLine, sr as CommandLane, st as requestHeartbeatNow, t as getReplyFromConfig, ur as isHeartbeatContentEffectivelyEmpty } from "./reply-DYnTEYoa.js";
2
+ import { At as resolveHeartbeatDeliveryTarget, Cr as peekSystemEventEntries, Vn as resolveUserTimezone, cr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, ct as setHeartbeatWakeHandler, dr as resolveHeartbeatPrompt$1, fr as stripHeartbeatToken, jt as resolveHeartbeatSenderContext, lr as DEFAULT_HEARTBEAT_EVERY, lt as resolveHeartbeatReasonKind, nr as getQueueSize, r as appendCronStyleCurrentTimeLine, sr as CommandLane, st as requestHeartbeatNow, t as getReplyFromConfig, ur as isHeartbeatContentEffectivelyEmpty } from "./reply-05js8eGB.js";
3
3
  import { l as resolveAgentIdFromSessionKey, p as toAgentStoreSessionKey, s as normalizeAgentId } from "./session-key-DCt45XZa.js";
4
4
  import { f as defaultRuntime, t as createSubsystemLogger } from "./subsystem-D9vIQve0.js";
5
5
  import { b as DEFAULT_SYMIPULSE_FILENAME, c as resolveAgentWorkspaceDir, l as resolveDefaultAgentId, r as resolveAgentConfig } from "./agent-scope-CgUHAtCo.js";
@@ -4,7 +4,7 @@ import { l as resolveAgentIdFromSessionKey, p as toAgentStoreSessionKey, s as no
4
4
  import { b as DEFAULT_SYMIPULSE_FILENAME, c as resolveAgentWorkspaceDir, l as resolveDefaultAgentId, r as resolveAgentConfig } from "./agent-scope-D-jRCY0d.js";
5
5
  import { C as parseDurationMs, i as loadConfig } from "./config-DHBLS1Hl.js";
6
6
  import { n as callGateway, t as buildGatewayConnectionDetails } from "./call-BcE47FtD.js";
7
- import { Jn as resolveUserTimezone, K as appendCronStyleCurrentTimeLine, Tn as peekSystemEventEntries, W as getReplyFromConfig, _r as isHeartbeatContentEffectivelyEmpty, dn as requestHeartbeatNow, fn as setHeartbeatWakeHandler, gr as DEFAULT_HEARTBEAT_EVERY, hr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, lr as getQueueSize, lt as resolveHeartbeatDeliveryTarget, mr as CommandLane, pn as resolveHeartbeatReasonKind, ut as resolveHeartbeatSenderContext, vr as resolveHeartbeatPrompt$1, yr as stripHeartbeatToken } from "./subagent-registry-CXrOOgPW.js";
7
+ import { Jn as resolveUserTimezone, K as appendCronStyleCurrentTimeLine, Tn as peekSystemEventEntries, W as getReplyFromConfig, _r as isHeartbeatContentEffectivelyEmpty, dn as requestHeartbeatNow, fn as setHeartbeatWakeHandler, gr as DEFAULT_HEARTBEAT_EVERY, hr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, lr as getQueueSize, lt as resolveHeartbeatDeliveryTarget, mr as CommandLane, pn as resolveHeartbeatReasonKind, ut as resolveHeartbeatSenderContext, vr as resolveHeartbeatPrompt$1, yr as stripHeartbeatToken } from "./subagent-registry-lbDgDwLy.js";
8
8
  import { M as canonicalizeMainSessionAlias, N as resolveAgentMainSessionKey, d as updateSessionStore, l as saveSessionStore, o as loadSessionStore } from "./sessions-CJXnZVjR.js";
9
9
  import { r as SYMIPULSE_TOKEN } from "./tokens-Csntmwwn.js";
10
10
  import { n as listChannelPlugins, t as getChannelPlugin } from "./plugins-CwSlLxM8.js";
@@ -1,7 +1,7 @@
1
1
  import "./paths-Cqn-zk3M.js";
2
2
  import { B as theme, S as shortenHomePath, t as CONFIG_DIR, y as resolveUserPath } from "./utils-B-0b9bGM.js";
3
3
  import "./thinking-EAliFiVK.js";
4
- import "./reply-DYnTEYoa.js";
4
+ import "./reply-05js8eGB.js";
5
5
  import "./registry-Cja8eT7G.js";
6
6
  import { f as defaultRuntime } from "./subsystem-D9vIQve0.js";
7
7
  import "./exec-CWkblSrI.js";
@@ -108,7 +108,7 @@ import { a as installPackageDir, i as withTempDir, n as installFromNpmSpecArchiv
108
108
  import { t as renderTable } from "./table-BTgkRafz.js";
109
109
  import { a as parseFrontmatter, t as loadWorkspaceHookEntries } from "./workspace-CYxdoAlY.js";
110
110
  import { t as buildWorkspaceHookStatus } from "./hooks-status-BqLZtMLa.js";
111
- import { t as buildPluginStatusReport } from "./status-DiX0DAtH.js";
111
+ import { t as buildPluginStatusReport } from "./status-BqQ9mm64.js";
112
112
  import fs from "node:fs";
113
113
  import path from "node:path";
114
114
  import fs$1 from "node:fs/promises";
@@ -15,7 +15,7 @@ import "./client-DMBZpU6X.js";
15
15
  import "./call-BcE47FtD.js";
16
16
  import "./message-channel-C9dERklz.js";
17
17
  import "./pairing-token-Byh6drgn.js";
18
- import "./subagent-registry-CXrOOgPW.js";
18
+ import "./subagent-registry-lbDgDwLy.js";
19
19
  import "./sessions-CJXnZVjR.js";
20
20
  import "./tokens-Csntmwwn.js";
21
21
  import "./plugins-CwSlLxM8.js";
@@ -104,7 +104,7 @@ import { a as installPackageDir, i as withTempDir, n as installFromNpmSpecArchiv
104
104
  import { t as renderTable } from "./table-D01d2GuY.js";
105
105
  import { a as parseFrontmatter, t as loadWorkspaceHookEntries } from "./workspace-B51TF6q3.js";
106
106
  import { t as buildWorkspaceHookStatus } from "./hooks-status-CEoLdlyb.js";
107
- import { t as buildPluginStatusReport } from "./status-BQcdARV4.js";
107
+ import { t as buildPluginStatusReport } from "./status-CfYa1Q9K.js";
108
108
  import path from "node:path";
109
109
  import fs from "node:fs";
110
110
  import fs$1 from "node:fs/promises";
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import "./paths-Cqn-zk3M.js";
3
3
  import { B as theme, P as setVerbose, T as toWhatsappJid, l as escapeRegExp, m as normalizeE164, n as assertWebChannel, z as isRich } from "./utils-B-0b9bGM.js";
4
4
  import "./thinking-EAliFiVK.js";
5
- import { Lt as createDefaultDeps, bt as resolveCommitHash, t as getReplyFromConfig } from "./reply-DYnTEYoa.js";
5
+ import { Lt as createDefaultDeps, bt as resolveCommitHash, t as getReplyFromConfig } from "./reply-05js8eGB.js";
6
6
  import "./registry-Cja8eT7G.js";
7
7
  import { f as defaultRuntime, r as enableConsoleCapture, u as visibleWidth } from "./subsystem-D9vIQve0.js";
8
8
  import { n as runExec, t as runCommandWithTimeout } from "./exec-CWkblSrI.js";
@@ -103,7 +103,7 @@ import "./pi-tools.policy-CIDBbw6x.js";
103
103
  import "./control-service-Bz7rxLWq.js";
104
104
  import "./stagger-BUClb97_.js";
105
105
  import "./channel-selection-DuWs0Aak.js";
106
- import { r as waitForever, t as monitorWebChannel } from "./channel-web-CM2LyWZW.js";
106
+ import { r as waitForever, t as monitorWebChannel } from "./channel-web-DYinYBz4.js";
107
107
  import "./outbound-DB5Zus0-.js";
108
108
  import "./session-DIBTkyvE.js";
109
109
  import "./login-dIlDkG4X.js";
@@ -112,10 +112,10 @@ import { t as ensureSymiCliOnPath } from "./path-env-MnzRq6nD.js";
112
112
  import { t as assertSupportedRuntime } from "./runtime-guard-B37eizu-.js";
113
113
  import "./ports-BX0kKI0g.js";
114
114
  import { a as hasFlag, i as getVerboseFlag, n as getCommandPath, o as hasHelpOrVersion, s as hasRootVersionAlias } from "./argv-C6ovOie2.js";
115
- import { i as getCoreCliCommandsWithSubcommands, n as setProgramContext, o as registerProgramCommands, s as getSubCliCommandsWithSubcommands } from "./program-context-DaNGrTOm.js";
115
+ import { i as getCoreCliCommandsWithSubcommands, n as setProgramContext, o as registerProgramCommands, s as getSubCliCommandsWithSubcommands } from "./program-context-CY1jWc5A.js";
116
116
  import "./catalog-RiADx7MA.js";
117
- import "./plugin-registry-2zUJMasm.js";
118
- import { n as resolveCliChannelOptions } from "./channel-options-vBCJhJB7.js";
117
+ import "./plugin-registry-CNf1_8hj.js";
118
+ import { n as resolveCliChannelOptions } from "./channel-options-0iOfzVR3.js";
119
119
  import process$1 from "node:process";
120
120
  import { fileURLToPath } from "node:url";
121
121
  import { Command } from "commander";
@@ -515,7 +515,7 @@ function registerPreActionHooks(program, programVersion) {
515
515
  commandPath
516
516
  });
517
517
  if (PLUGIN_REQUIRED_COMMANDS.has(commandPath[0])) {
518
- const { ensurePluginRegistryLoaded } = await import("./plugin-registry-2zUJMasm.js").then((n) => n.n);
518
+ const { ensurePluginRegistryLoaded } = await import("./plugin-registry-CNf1_8hj.js").then((n) => n.n);
519
519
  ensurePluginRegistryLoaded();
520
520
  }
521
521
  });
@@ -3,7 +3,7 @@ import "./registry-DYq1AYOv.js";
3
3
  import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope-CpEJ0B88.js";
4
4
  import "./subsystem-BjyjJF-d.js";
5
5
  import "./workspace-DscDraUb.js";
6
- import { t as runAgentTurn } from "./unified-runner-CulJZMxc.js";
6
+ import { t as runAgentTurn } from "./unified-runner-B4ICXRlg.js";
7
7
  import "./paths-CbQV9WEg.js";
8
8
  import "./auth-profiles-DdK1Hxaa.js";
9
9
  import "./env-BDXYbTKj.js";
@@ -7,7 +7,7 @@ import { t as ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json-CaX_1WHk.j
7
7
  import { i as resolveForwardCompatModel, r as ANTIGRAVITY_OPUS_46_FORWARD_COMPAT_CANDIDATES } from "./model-DiCH8rkE.js";
8
8
  import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-Do3xMEtM.js";
9
9
  import { C as parseDurationMs, i as loadConfig } from "./config-DHBLS1Hl.js";
10
- import { J as runAgentTurn, _n as DEFAULT_OAUTH_WARN_MS, _t as describeFailoverError, an as formatUsageWindowSummary, gn as maskApiKey, on as resolveUsageProviderId, rn as loadProviderUsageSummary, vn as buildAuthHealthSummary, yn as formatRemainingShort } from "./subagent-registry-CXrOOgPW.js";
10
+ import { J as runAgentTurn, _n as DEFAULT_OAUTH_WARN_MS, _t as describeFailoverError, an as formatUsageWindowSummary, gn as maskApiKey, on as resolveUsageProviderId, rn as loadProviderUsageSummary, vn as buildAuthHealthSummary, yn as formatRemainingShort } from "./subagent-registry-lbDgDwLy.js";
11
11
  import { s as resolveSessionTranscriptsDirForAgent } from "./paths-DNdWAq7b.js";
12
12
  import { t as ensureSymiModelsJson } from "./models-config-CCMpqFyr.js";
13
13
  import { n as loadModelCatalog } from "./model-catalog-CqCsARJX.js";
@@ -21,7 +21,7 @@ import { n as redactSecrets } from "./format-DVLB9DNB.js";
21
21
  import { a as isLocalBaseUrl, c as normalizeAlias, d as resolveModelTarget, f as updateConfig, i as formatTokenK, l as resolveKnownAgentId, n as ensureFlagCompatibility, o as loadValidConfigOrThrow, r as formatMs, s as mergePrimaryFallbackConfig, t as applyDefaultModelPrimaryUpdate, u as resolveModelKeysFromEntries } from "./shared-D8K9MkWg.js";
22
22
  import { d as applyAuthProfileConfig, n as validateAnthropicSetupToken } from "./auth-token-Cmrk2TPo.js";
23
23
  import { n as logConfigUpdated } from "./logging-BGewRZy0.js";
24
- import { a as createVpsAwareOAuthHandlers, i as resolveProviderMatch, n as mergeConfigPatch, o as isRemoteEnvironment, r as pickAuthMethod, s as resolvePluginProviders, t as applyDefaultModel } from "./provider-auth-helpers-DCEbm2hz.js";
24
+ import { a as createVpsAwareOAuthHandlers, i as resolveProviderMatch, n as mergeConfigPatch, o as isRemoteEnvironment, r as pickAuthMethod, s as resolvePluginProviders, t as applyDefaultModel } from "./provider-auth-helpers-DApJuzBd.js";
25
25
  import path from "node:path";
26
26
  import fs from "node:fs/promises";
27
27
  import { complete, getEnvApiKey, getModel } from "@mariozechner/pi-ai";
@@ -1,7 +1,7 @@
1
1
  import { t as CONFIG_PATH } from "./paths-Cqn-zk3M.js";
2
2
  import { B as theme, R as colorize, S as shortenHomePath, z as isRich$1 } from "./utils-B-0b9bGM.js";
3
3
  import "./thinking-EAliFiVK.js";
4
- import { Yt as describeFailoverError, _r as formatRemainingShort, gr as buildAuthHealthSummary, gt as loadProviderUsageSummary, hr as DEFAULT_OAUTH_WARN_MS, mr as maskApiKey, vt as formatUsageWindowSummary, yt as resolveUsageProviderId, zt as runAgentTurn } from "./reply-DYnTEYoa.js";
4
+ import { Yt as describeFailoverError, _r as formatRemainingShort, gr as buildAuthHealthSummary, gt as loadProviderUsageSummary, hr as DEFAULT_OAUTH_WARN_MS, mr as maskApiKey, vt as formatUsageWindowSummary, yt as resolveUsageProviderId, zt as runAgentTurn } from "./reply-05js8eGB.js";
5
5
  import "./registry-Cja8eT7G.js";
6
6
  import { f as defaultRuntime } from "./subsystem-D9vIQve0.js";
7
7
  import "./exec-CWkblSrI.js";
@@ -110,7 +110,7 @@ import { n as redactSecrets } from "./format-yQZNwAF2.js";
110
110
  import { a as isLocalBaseUrl, c as normalizeAlias, d as resolveModelTarget, f as updateConfig, i as formatTokenK, l as resolveKnownAgentId, n as ensureFlagCompatibility, o as loadValidConfigOrThrow, r as formatMs, s as mergePrimaryFallbackConfig, t as applyDefaultModelPrimaryUpdate, u as resolveModelKeysFromEntries } from "./shared-Knv1hy6h.js";
111
111
  import { d as applyAuthProfileConfig, n as validateAnthropicSetupToken } from "./auth-token-BnOynwk4.js";
112
112
  import { n as logConfigUpdated } from "./logging-BzzwiKjv.js";
113
- import { a as createVpsAwareOAuthHandlers, c as githubCopilotLoginCommand, i as resolveProviderMatch, n as mergeConfigPatch, o as isRemoteEnvironment, r as pickAuthMethod, s as resolvePluginProviders, t as applyDefaultModel } from "./provider-auth-helpers-BAGT_RXV.js";
113
+ import { a as createVpsAwareOAuthHandlers, c as githubCopilotLoginCommand, i as resolveProviderMatch, n as mergeConfigPatch, o as isRemoteEnvironment, r as pickAuthMethod, s as resolvePluginProviders, t as applyDefaultModel } from "./provider-auth-helpers-DcNKxc7D.js";
114
114
  import { t as ensurePiAuthJsonFromAuthProfiles } from "./system-cli-UMsMEurS.js";
115
115
  import path from "node:path";
116
116
  import fs from "node:fs/promises";
@@ -14,7 +14,7 @@ import "./client-DMBZpU6X.js";
14
14
  import "./call-BcE47FtD.js";
15
15
  import "./message-channel-C9dERklz.js";
16
16
  import "./pairing-token-Byh6drgn.js";
17
- import "./subagent-registry-CXrOOgPW.js";
17
+ import "./subagent-registry-lbDgDwLy.js";
18
18
  import "./sessions-CJXnZVjR.js";
19
19
  import "./tokens-Csntmwwn.js";
20
20
  import "./plugins-CwSlLxM8.js";
@@ -104,8 +104,8 @@ import "./table-D01d2GuY.js";
104
104
  import "./shared-D8K9MkWg.js";
105
105
  import "./auth-token-Cmrk2TPo.js";
106
106
  import "./logging-BGewRZy0.js";
107
- import { c as githubCopilotLoginCommand } from "./provider-auth-helpers-DCEbm2hz.js";
108
- import { C as modelsAliasesListCommand, S as modelsAliasesAddCommand, _ as modelsAuthOrderSetCommand, a as modelsStatusCommand, b as modelsAuthPasteTokenCommand, c as modelsImageFallbacksClearCommand, d as modelsFallbacksAddCommand, f as modelsFallbacksClearCommand, g as modelsAuthOrderGetCommand, h as modelsAuthOrderClearCommand, i as modelsScanCommand, l as modelsImageFallbacksListCommand, m as modelsFallbacksRemoveCommand, n as modelsSetImageCommand, o as modelsListCommand, p as modelsFallbacksListCommand, r as modelsSetCommand, s as modelsImageFallbacksAddCommand, u as modelsImageFallbacksRemoveCommand, v as modelsAuthAddCommand, w as modelsAliasesRemoveCommand, x as modelsAuthSetupTokenCommand, y as modelsAuthLoginCommand } from "./models-Bo4iHJy-.js";
107
+ import { c as githubCopilotLoginCommand } from "./provider-auth-helpers-DApJuzBd.js";
108
+ import { C as modelsAliasesListCommand, S as modelsAliasesAddCommand, _ as modelsAuthOrderSetCommand, a as modelsStatusCommand, b as modelsAuthPasteTokenCommand, c as modelsImageFallbacksClearCommand, d as modelsFallbacksAddCommand, f as modelsFallbacksClearCommand, g as modelsAuthOrderGetCommand, h as modelsAuthOrderClearCommand, i as modelsScanCommand, l as modelsImageFallbacksListCommand, m as modelsFallbacksRemoveCommand, n as modelsSetImageCommand, o as modelsListCommand, p as modelsFallbacksListCommand, r as modelsSetCommand, s as modelsImageFallbacksAddCommand, u as modelsImageFallbacksRemoveCommand, v as modelsAuthAddCommand, w as modelsAliasesRemoveCommand, x as modelsAuthSetupTokenCommand, y as modelsAuthLoginCommand } from "./models-CiqHYwje.js";
109
109
 
110
110
  //#region src/cli/models-cli.ts
111
111
  function runModelsCommand(action) {
@@ -11,8 +11,8 @@ import { t as createClackPrompter } from "./clack-prompter-B7pN13HV.js";
11
11
  import { a as gatewayInstallErrorHint, i as buildGatewayInstallPlan, r as isGatewayDaemonRuntime, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-2mwX-jqj.js";
12
12
  import { r as isSystemdUserServiceAvailable } from "./systemd-riq8uNJQ.js";
13
13
  import { t as resolveGatewayService } from "./service-Cl74hx8J.js";
14
- import { r as healthCommand } from "./health-BjwDRAdd.js";
15
- import { t as runOnboardingWizard } from "./onboarding-DIVKvosg.js";
14
+ import { r as healthCommand } from "./health-CDGOsNeD.js";
15
+ import { t as runOnboardingWizard } from "./onboarding-BU14cspo.js";
16
16
  import { $ as setHuggingfaceApiKey, A as applyXaiConfig, B as applyVercelAiGatewayConfig, E as applyTogetherConfig, I as applyLitellmConfig, M as applyXiaomiConfig, O as applyVeniceConfig, P as applyZaiConfig, Q as setGeminiApiKey, R as applyCloudflareAiGatewayConfig, S as applyQianfanConfig, X as setAnthropicApiKey, Z as setCloudflareAiGatewayConfig, _ as applyMoonshotConfigCn, a as applyMinimaxApiConfig, at as setOpenrouterApiKey, b as applyOpenrouterConfig, ct as setTogetherApiKey, d as applyAuthProfileConfig, dt as setXaiApiKey, et as setKimiCodingApiKey, f as applyHuggingfaceConfig, ft as setXiaomiApiKey, g as applyMoonshotConfig, it as setOpencodeZenApiKey, l as applyMinimaxConfig, lt as setVeniceApiKey, m as applyKimiCodeConfig, n as validateAnthropicSetupToken, nt as setMinimaxApiKey, o as applyMinimaxApiConfigCn, ot as setQianfanApiKey, pt as setZaiApiKey, r as applyOpencodeZenConfig, rt as setMoonshotApiKey, st as setSyntheticApiKey, t as buildTokenProfileId, tt as setLitellmApiKey, ut as setVercelAiGatewayApiKey, w as applySyntheticConfig } from "./auth-token-BnOynwk4.js";
17
17
  import { n as logConfigUpdated } from "./logging-BzzwiKjv.js";
18
18
  import { n as isDeprecatedAuthChoice, r as normalizeLegacyOnboardAuthChoice } from "./auth-choice-legacy-Ch38-Kbr.js";
@@ -9,8 +9,8 @@ import { a as gatewayInstallErrorHint, i as buildGatewayInstallPlan, r as isGate
9
9
  import { t as assertSupportedRuntime } from "./runtime-guard-D7waq_Ho.js";
10
10
  import { r as isSystemdUserServiceAvailable } from "./systemd-DlMdyFDY.js";
11
11
  import { t as resolveGatewayService } from "./service-Cm9j9WzQ.js";
12
- import { r as healthCommand } from "./health-C5XJPwpt.js";
13
- import { t as runOnboardingWizard } from "./onboarding-CvBDWlBJ.js";
12
+ import { r as healthCommand } from "./health-CM1asUG8.js";
13
+ import { t as runOnboardingWizard } from "./onboarding-jhZxQcZ3.js";
14
14
  import { $ as setHuggingfaceApiKey, A as applyXaiConfig, B as applyVercelAiGatewayConfig, E as applyTogetherConfig, I as applyLitellmConfig, M as applyXiaomiConfig, O as applyVeniceConfig, P as applyZaiConfig, Q as setGeminiApiKey, R as applyCloudflareAiGatewayConfig, S as applyQianfanConfig, X as setAnthropicApiKey, Z as setCloudflareAiGatewayConfig, _ as applyMoonshotConfigCn, a as applyMinimaxApiConfig, at as setOpenrouterApiKey, b as applyOpenrouterConfig, ct as setTogetherApiKey, d as applyAuthProfileConfig, dt as setXaiApiKey, et as setKimiCodingApiKey, f as applyHuggingfaceConfig, ft as setXiaomiApiKey, g as applyMoonshotConfig, it as setOpencodeZenApiKey, l as applyMinimaxConfig, lt as setVeniceApiKey, m as applyKimiCodeConfig, n as validateAnthropicSetupToken, nt as setMinimaxApiKey, o as applyMinimaxApiConfigCn, ot as setQianfanApiKey, pt as setZaiApiKey, r as applyOpencodeZenConfig, rt as setMoonshotApiKey, st as setSyntheticApiKey, t as buildTokenProfileId, tt as setLitellmApiKey, ut as setVercelAiGatewayApiKey, w as applySyntheticConfig } from "./auth-token-Cmrk2TPo.js";
15
15
  import { n as logConfigUpdated } from "./logging-BGewRZy0.js";
16
16
  import { n as isDeprecatedAuthChoice, r as normalizeLegacyOnboardAuthChoice } from "./auth-choice-legacy-BKXTgyr4.js";
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { dt as createPluginLoaderLogger, ft as loadSymiPlugins } from "./reply-DYnTEYoa.js";
2
+ import { dt as createPluginLoaderLogger, ft as loadSymiPlugins } from "./reply-05js8eGB.js";
3
3
  import { h as normalizeAccountId, m as DEFAULT_ACCOUNT_ID } from "./session-key-DCt45XZa.js";
4
4
  import { a as formatChannelSelectionLine, i as formatChannelPrimerLine, s as listChatChannels } from "./registry-Cja8eT7G.js";
5
5
  import { t as createSubsystemLogger } from "./subsystem-D9vIQve0.js";
@@ -3,7 +3,7 @@ import { E as formatChannelSelectionLine, O as listChatChannels, T as formatChan
3
3
  import { t as formatCliCommand } from "./command-format-BtYOfWxC.js";
4
4
  import { h as normalizeAccountId, m as DEFAULT_ACCOUNT_ID } from "./session-key-DjZ7Z1hW.js";
5
5
  import { c as resolveAgentWorkspaceDir, l as resolveDefaultAgentId } from "./agent-scope-D-jRCY0d.js";
6
- import { m as loadSymiPlugins, p as createPluginLoaderLogger } from "./subagent-registry-CXrOOgPW.js";
6
+ import { m as loadSymiPlugins, p as createPluginLoaderLogger } from "./subagent-registry-lbDgDwLy.js";
7
7
  import { n as listChannelPlugins, t as getChannelPlugin } from "./plugins-CwSlLxM8.js";
8
8
  import { t as formatDocsLink } from "./links-DlWpl9Yv.js";
9
9
  import { r as listChannelPluginCatalogEntries } from "./catalog-DLQFKucJ.js";
@@ -225,7 +225,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
225
225
  const { ensureAuthProfileStore } = await import("./model-selection-CyFvYcRt.js").then((n) => n.dt);
226
226
  const { promptAuthChoiceGrouped } = await import("./auth-choice-prompt-BLzEBA1v.js").then((n) => n.t);
227
227
  const { promptCustomApiConfig } = await import("./onboard-custom-C7O-zfQ1.js").then((n) => n.r);
228
- const { applyAuthChoice, resolvePreferredProviderForAuthChoice, warnIfModelConfigLooksOff } = await import("./auth-choice-BqFbNDuP.js").then((n) => n.t);
228
+ const { applyAuthChoice, resolvePreferredProviderForAuthChoice, warnIfModelConfigLooksOff } = await import("./auth-choice-zFq3WRQ0.js").then((n) => n.t);
229
229
  const { applyPrimaryModel, promptDefaultModel } = await import("./model-picker-Ddo3jHe-.js").then((n) => n.i);
230
230
  const authStore = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false });
231
231
  const authChoiceFromPrompt = opts.authChoice === void 0;
@@ -278,7 +278,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
278
278
  if (opts.skipChannels ?? opts.skipProviders) await prompter.note("Skipping channel setup.", "Channels");
279
279
  else {
280
280
  const { listChannelPlugins } = await import("./plugins-DKDeQZF0.js").then((n) => n.i);
281
- const { setupChannels } = await import("./onboard-channels-CUl5U8kV.js").then((n) => n.n);
281
+ const { setupChannels } = await import("./onboard-channels-FFQPpuEN.js").then((n) => n.n);
282
282
  const quickstartAllowFromChannels = flow === "quickstart" ? listChannelPlugins().filter((plugin) => plugin.meta.quickstartAllowFrom).map((plugin) => plugin.id) : [];
283
283
  nextConfig = await setupChannels(nextConfig, runtime, prompter, {
284
284
  allowSignalInstall: true,
@@ -304,7 +304,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
304
304
  mode
305
305
  });
306
306
  await writeConfigFile(nextConfig);
307
- const { finalizeOnboardingWizard } = await import("./onboarding.finalize-WSac-JKd.js");
307
+ const { finalizeOnboardingWizard } = await import("./onboarding.finalize-ByZT4dF5.js");
308
308
  const { launchedTui } = await finalizeOnboardingWizard({
309
309
  flow,
310
310
  opts,
@@ -223,7 +223,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
223
223
  const { ensureAuthProfileStore } = await import("./auth-profiles-Q1xTr5SX.js").then((n) => n.t);
224
224
  const { promptAuthChoiceGrouped } = await import("./auth-choice-prompt-DVcYPG2v.js").then((n) => n.t);
225
225
  const { promptCustomApiConfig } = await import("./onboard-custom-DdWPfzJO.js").then((n) => n.r);
226
- const { applyAuthChoice, resolvePreferredProviderForAuthChoice, warnIfModelConfigLooksOff } = await import("./auth-choice-DTDyJL1r.js").then((n) => n.t);
226
+ const { applyAuthChoice, resolvePreferredProviderForAuthChoice, warnIfModelConfigLooksOff } = await import("./auth-choice-D1u_GPfQ.js").then((n) => n.t);
227
227
  const { applyPrimaryModel, promptDefaultModel } = await import("./model-picker-D5nCutGW.js").then((n) => n.i);
228
228
  const authStore = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false });
229
229
  const authChoiceFromPrompt = opts.authChoice === void 0;
@@ -276,7 +276,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
276
276
  if (opts.skipChannels ?? opts.skipProviders) await prompter.note("Skipping channel setup.", "Channels");
277
277
  else {
278
278
  const { listChannelPlugins } = await import("./plugins-CwSlLxM8.js").then((n) => n.i);
279
- const { setupChannels } = await import("./onboard-channels-BRd1cXye.js").then((n) => n.n);
279
+ const { setupChannels } = await import("./onboard-channels-pfSGhg_C.js").then((n) => n.n);
280
280
  const quickstartAllowFromChannels = flow === "quickstart" ? listChannelPlugins().filter((plugin) => plugin.meta.quickstartAllowFrom).map((plugin) => plugin.id) : [];
281
281
  nextConfig = await setupChannels(nextConfig, runtime, prompter, {
282
282
  allowSignalInstall: true,
@@ -302,7 +302,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
302
302
  mode
303
303
  });
304
304
  await writeConfigFile(nextConfig);
305
- const { finalizeOnboardingWizard } = await import("./onboarding.finalize-DJX6mSLa.js");
305
+ const { finalizeOnboardingWizard } = await import("./onboarding.finalize-B8oOMfHc.js");
306
306
  const { launchedTui } = await finalizeOnboardingWizard({
307
307
  flow,
308
308
  opts,
@@ -14,7 +14,7 @@ import "./client-DMBZpU6X.js";
14
14
  import "./call-BcE47FtD.js";
15
15
  import "./message-channel-C9dERklz.js";
16
16
  import "./pairing-token-Byh6drgn.js";
17
- import "./subagent-registry-CXrOOgPW.js";
17
+ import "./subagent-registry-lbDgDwLy.js";
18
18
  import "./sessions-CJXnZVjR.js";
19
19
  import "./tokens-Csntmwwn.js";
20
20
  import "./plugins-CwSlLxM8.js";
@@ -99,18 +99,18 @@ import "./prompt-style-DwCXob2h.js";
99
99
  import "./pairing-labels-D1HDboV2.js";
100
100
  import "./pi-tools.policy-De00gPXt.js";
101
101
  import "./note-DDecZomM.js";
102
- import "./register.subclis-B2dGWFur.js";
103
- import "./command-registry-CHtN2HeK.js";
102
+ import "./register.subclis-DOiZocR6.js";
103
+ import "./command-registry-9EhYc6da.js";
104
104
  import "./program-context-CqzR_m-7.js";
105
- import { r as installCompletion } from "./completion-cli-Cov6N3BO.js";
105
+ import { r as installCompletion } from "./completion-cli-BFZv3K5D.js";
106
106
  import { a as gatewayInstallErrorHint, i as buildGatewayInstallPlan, n as GATEWAY_DAEMON_RUNTIME_OPTIONS, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-CfRwa6qh.js";
107
107
  import "./runtime-guard-D7waq_Ho.js";
108
108
  import { r as isSystemdUserServiceAvailable } from "./systemd-DlMdyFDY.js";
109
109
  import { t as resolveGatewayService } from "./service-Cm9j9WzQ.js";
110
- import { r as healthCommand } from "./health-C5XJPwpt.js";
110
+ import { r as healthCommand } from "./health-CM1asUG8.js";
111
111
  import { t as ensureControlUiAssetsBuilt } from "./control-ui-assets-BseSWee1.js";
112
112
  import { t as formatHealthCheckFailure } from "./health-format-CzgUHmmX.js";
113
- import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-BKKzstt6.js";
113
+ import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-BunqvoqZ.js";
114
114
  import { t as runTui } from "./tui-BJB80muc.js";
115
115
  import os from "node:os";
116
116
  import path from "node:path";
@@ -1,7 +1,7 @@
1
1
  import "./paths-Cqn-zk3M.js";
2
2
  import { h as pathExists, y as resolveUserPath } from "./utils-B-0b9bGM.js";
3
3
  import "./thinking-EAliFiVK.js";
4
- import "./reply-DYnTEYoa.js";
4
+ import "./reply-05js8eGB.js";
5
5
  import "./registry-Cja8eT7G.js";
6
6
  import { p as restoreTerminalState } from "./subsystem-D9vIQve0.js";
7
7
  import "./exec-CWkblSrI.js";
@@ -103,16 +103,16 @@ import "./control-service-Bz7rxLWq.js";
103
103
  import "./stagger-BUClb97_.js";
104
104
  import "./channel-selection-DuWs0Aak.js";
105
105
  import "./runtime-guard-B37eizu-.js";
106
- import "./program-context-DaNGrTOm.js";
106
+ import "./program-context-CY1jWc5A.js";
107
107
  import "./note-DeHoW7xO.js";
108
- import { r as installCompletion } from "./completion-cli-C8y_J5KC.js";
108
+ import { r as installCompletion } from "./completion-cli-CCeQlMlC.js";
109
109
  import { a as gatewayInstallErrorHint, i as buildGatewayInstallPlan, n as GATEWAY_DAEMON_RUNTIME_OPTIONS, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-2mwX-jqj.js";
110
110
  import { r as isSystemdUserServiceAvailable } from "./systemd-riq8uNJQ.js";
111
111
  import { t as resolveGatewayService } from "./service-Cl74hx8J.js";
112
- import { r as healthCommand } from "./health-BjwDRAdd.js";
112
+ import { r as healthCommand } from "./health-CDGOsNeD.js";
113
113
  import { t as ensureControlUiAssetsBuilt } from "./control-ui-assets-Z947tKLt.js";
114
114
  import { t as formatHealthCheckFailure } from "./health-format-DSwnXZPU.js";
115
- import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-D7CDLFLg.js";
115
+ import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-CLeX1kaN.js";
116
116
  import { t as runTui } from "./tui-CriznorL.js";
117
117
  import os from "node:os";
118
118
  import path from "node:path";
@@ -42338,9 +42338,25 @@ function validateShellCommand(command) {
42338
42338
  //#endregion
42339
42339
  //#region src/agents/pi-tools.validate-wrapper.ts
42340
42340
  const EXEC_TOOL_NAMES = new Set(["exec", "bash"]);
42341
+ const FILE_TOOL_NAMES = new Set([
42342
+ "write",
42343
+ "read",
42344
+ "edit",
42345
+ "patch",
42346
+ "file_write",
42347
+ "file_edit",
42348
+ "write_file",
42349
+ "edit_file",
42350
+ "create_file"
42351
+ ]);
42352
+ const FILE_PATH_KEYS = [
42353
+ "file_path",
42354
+ "path",
42355
+ "filePath"
42356
+ ];
42341
42357
  /**
42342
- * Wrap tools with argument validation. Only exec/bash tools are validated.
42343
- * Other tools pass through unchanged.
42358
+ * Wrap tools with argument validation. Exec/bash commands and file paths
42359
+ * are validated. Other tools pass through unchanged.
42344
42360
  *
42345
42361
  * Call this AFTER tools are created and the model profile is resolved.
42346
42362
  */
@@ -42349,24 +42365,55 @@ function wrapToolsWithArgValidation(tools, profile) {
42349
42365
  return tools.map((tool) => wrapToolWithArgValidation(tool));
42350
42366
  }
42351
42367
  /**
42352
- * Wrap a single tool with argument validation for exec/bash commands.
42368
+ * Clean a file path by stripping control token fragments.
42369
+ * Returns null if the path is irreparably corrupted (empty after cleanup).
42370
+ */
42371
+ function cleanFilePath(filePath) {
42372
+ let cleaned = filePath.replace(/<\|[^|>]*(?:\|>)?/g, "");
42373
+ cleaned = cleanResidualTokenFragments(cleaned);
42374
+ cleaned = cleaned.trim();
42375
+ if (!cleaned || !/[a-zA-Z0-9/._~-]/.test(cleaned)) return {
42376
+ valid: false,
42377
+ cleaned
42378
+ };
42379
+ return {
42380
+ valid: true,
42381
+ cleaned
42382
+ };
42383
+ }
42384
+ /**
42385
+ * Wrap a single tool with argument validation.
42353
42386
  */
42354
42387
  function wrapToolWithArgValidation(tool) {
42355
42388
  const toolName = (tool.name ?? "").toLowerCase().trim();
42356
- if (!EXEC_TOOL_NAMES.has(toolName)) return tool;
42389
+ const isExecTool = EXEC_TOOL_NAMES.has(toolName);
42390
+ const isFileTool = FILE_TOOL_NAMES.has(toolName);
42391
+ if (!isExecTool && !isFileTool) return tool;
42357
42392
  const originalExecute = tool.execute;
42358
42393
  return {
42359
42394
  ...tool,
42360
42395
  execute(toolCallId, params, ...rest) {
42361
- const command = params.command ?? params.cmd;
42362
- if (typeof command !== "string") return originalExecute.call(tool, toolCallId, params, ...rest);
42363
- const result = validateShellCommand(command);
42364
- if (!result.valid) return Promise.resolve({ output: `Error: ${result.reason}. The command appears to contain model control tokens. Please provide a clean shell command without any <|, |>, or XML-like tags. Only valid shell syntax is accepted.` });
42365
- if (result.cleaned !== command) return originalExecute.call(tool, toolCallId, {
42396
+ if (isExecTool) {
42397
+ const command = params.command ?? params.cmd;
42398
+ if (typeof command !== "string") return originalExecute.call(tool, toolCallId, params, ...rest);
42399
+ const result = validateShellCommand(command);
42400
+ if (!result.valid) return Promise.resolve({ output: `Error: ${result.reason}. The command appears to contain model control tokens. Please provide a clean shell command without any <|, |>, or XML-like tags. Only valid shell syntax is accepted.` });
42401
+ if (result.cleaned !== command) return originalExecute.call(tool, toolCallId, {
42402
+ ...params,
42403
+ command: result.cleaned
42404
+ }, ...rest);
42405
+ return originalExecute.call(tool, toolCallId, params, ...rest);
42406
+ }
42407
+ const pathKey = FILE_PATH_KEYS.find((k) => typeof params[k] === "string");
42408
+ if (!pathKey) return originalExecute.call(tool, toolCallId, params, ...rest);
42409
+ const rawPath = params[pathKey];
42410
+ if (!rawPath.includes("<|") && !rawPath.includes("|>") && !/^[<"|]/.test(rawPath)) return originalExecute.call(tool, toolCallId, params, ...rest);
42411
+ const pathResult = cleanFilePath(rawPath);
42412
+ if (!pathResult.valid) return Promise.resolve({ output: `Error: file path "${rawPath}" contains model control tokens and could not be cleaned. Please provide a clean file path without any <|, |>, or XML-like tags.` });
42413
+ return originalExecute.call(tool, toolCallId, {
42366
42414
  ...params,
42367
- command: result.cleaned
42415
+ [pathKey]: pathResult.cleaned
42368
42416
  }, ...rest);
42369
- return originalExecute.call(tool, toolCallId, params, ...rest);
42370
42417
  }
42371
42418
  };
42372
42419
  }
@@ -46533,6 +46580,10 @@ async function runEmbeddedAttempt(params) {
46533
46580
  });
46534
46581
  };
46535
46582
  const streamMonitor = createStreamMonitor(modelProfile);
46583
+ const TOOL_ERROR_ABORT_THRESHOLD = 5;
46584
+ const TOOL_ERROR_WARN_THRESHOLD = 3;
46585
+ let consecutiveToolErrors = 0;
46586
+ let lastErrorToolName = "";
46536
46587
  const subscription = subscribeEmbeddedPiSession({
46537
46588
  session: activeSession,
46538
46589
  runId: params.runId,
@@ -46554,6 +46605,25 @@ async function runEmbeddedAttempt(params) {
46554
46605
  onAgentEvent: (evt) => {
46555
46606
  armSymipulseTimer();
46556
46607
  params.onAgentEvent?.(evt);
46608
+ if (evt.stream === "tool" && !aborted) {
46609
+ const phase = typeof evt.data?.phase === "string" ? evt.data.phase : "";
46610
+ const toolName = typeof evt.data?.name === "string" ? evt.data.name : "";
46611
+ const isError = evt.data?.isError === true;
46612
+ if (phase === "result" && toolName) {
46613
+ if (isError && toolName === lastErrorToolName) consecutiveToolErrors++;
46614
+ else if (isError) {
46615
+ consecutiveToolErrors = 1;
46616
+ lastErrorToolName = toolName;
46617
+ } else {
46618
+ consecutiveToolErrors = 0;
46619
+ lastErrorToolName = "";
46620
+ }
46621
+ if (consecutiveToolErrors >= TOOL_ERROR_ABORT_THRESHOLD) {
46622
+ log$4.error(`Agent-loop circuit breaker: ${toolName} failed ${consecutiveToolErrors} consecutive times. Aborting run ${params.runId}.`);
46623
+ abortRun(false, /* @__PURE__ */ new Error(`Tool ${toolName} failed ${consecutiveToolErrors} consecutive times. The model may be generating corrupted tool arguments. Run aborted to prevent infinite loop.`));
46624
+ } else if (consecutiveToolErrors === TOOL_ERROR_WARN_THRESHOLD) log$4.warn(`Agent-loop tool error warning: ${toolName} failed ${consecutiveToolErrors} times consecutively. runId=${params.runId}`);
46625
+ }
46626
+ }
46557
46627
  if (evt.stream === "assistant" && typeof evt.data?.text === "string" && !aborted) {
46558
46628
  streamMonitor.onChunk(evt.data.text);
46559
46629
  if (streamMonitor.shouldStop()) log$4.debug(`stream monitor detection (log-only, no abort): runId=${params.runId} reason=${streamMonitor.getStopReason()}`);
@@ -60518,7 +60588,7 @@ function isVoiceChannelType(type) {
60518
60588
  function createDefaultDeps() {
60519
60589
  return {
60520
60590
  sendMessageWhatsApp: async (...args) => {
60521
- const { sendMessageWhatsApp } = await import("./web-D4qJ9XKP.js");
60591
+ const { sendMessageWhatsApp } = await import("./web-DBFW0ejP.js");
60522
60592
  return await sendMessageWhatsApp(...args);
60523
60593
  },
60524
60594
  sendMessageTelegram: async (...args) => {
@@ -75798,7 +75868,7 @@ function loadWebLoginQr() {
75798
75868
  return webLoginQrPromise;
75799
75869
  }
75800
75870
  function loadWebChannel() {
75801
- webChannelPromise ??= import("./web-D4qJ9XKP.js");
75871
+ webChannelPromise ??= import("./web-DBFW0ejP.js");
75802
75872
  return webChannelPromise;
75803
75873
  }
75804
75874
  function loadWhatsAppActions() {
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { ft as loadSymiPlugins } from "./reply-DYnTEYoa.js";
2
+ import { ft as loadSymiPlugins } from "./reply-05js8eGB.js";
3
3
  import { d as getActivePluginRegistry } from "./registry-Cja8eT7G.js";
4
4
  import { t as createSubsystemLogger } from "./subsystem-D9vIQve0.js";
5
5
  import { c as resolveAgentWorkspaceDir, l as resolveDefaultAgentId } from "./agent-scope-CgUHAtCo.js";
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
2
  import { M as getActivePluginRegistry, o as createSubsystemLogger } from "./entry.js";
3
3
  import { c as resolveAgentWorkspaceDir, l as resolveDefaultAgentId } from "./agent-scope-D-jRCY0d.js";
4
4
  import { i as loadConfig } from "./config-DHBLS1Hl.js";
5
- import { m as loadSymiPlugins } from "./subagent-registry-CXrOOgPW.js";
5
+ import { m as loadSymiPlugins } from "./subagent-registry-lbDgDwLy.js";
6
6
 
7
7
  //#region src/cli/plugin-registry.ts
8
8
  var plugin_registry_exports = /* @__PURE__ */ __exportAll({ ensurePluginRegistryLoaded: () => ensurePluginRegistryLoaded });
@@ -1,23 +1,23 @@
1
1
  /**
2
- * Tool argument validation wrapper — validates exec/bash command args
3
- * before execution when the model profile has validateToolArgs enabled.
2
+ * Tool argument validation wrapper — validates exec/bash commands and
3
+ * file paths before execution when the model profile has validateToolArgs enabled.
4
4
  *
5
5
  * Gated on ModelProfile.filters.validateToolArgs. Returns an instructive
6
6
  * error message when corruption is detected, giving the model a chance
7
- * to retry with a clean command.
7
+ * to retry with clean arguments.
8
8
  *
9
9
  * @module
10
10
  */
11
11
  import type { ModelProfile } from "../config/model-profiles.js";
12
12
  import type { AnyAgentTool } from "./pi-tools.types.js";
13
13
  /**
14
- * Wrap tools with argument validation. Only exec/bash tools are validated.
15
- * Other tools pass through unchanged.
14
+ * Wrap tools with argument validation. Exec/bash commands and file paths
15
+ * are validated. Other tools pass through unchanged.
16
16
  *
17
17
  * Call this AFTER tools are created and the model profile is resolved.
18
18
  */
19
19
  export declare function wrapToolsWithArgValidation(tools: AnyAgentTool[], profile: ModelProfile): AnyAgentTool[];
20
20
  /**
21
- * Wrap a single tool with argument validation for exec/bash commands.
21
+ * Wrap a single tool with argument validation.
22
22
  */
23
23
  export declare function wrapToolWithArgValidation(tool: AnyAgentTool): AnyAgentTool;
@@ -1,6 +1,6 @@
1
1
  import { a as buildGroupHistoryKey, n as DEFAULT_MAIN_KEY, r as buildAgentMainSessionKey, s as normalizeAgentId } from "./session-key-C_0eELjb.js";
2
2
  import { f as readWebSelfId, o as getWebAuthAgeMs, r as resolveWhatsAppAccount } from "./accounts-D9zGZU5t.js";
3
- import { E as enqueueSystemEvent, G as resolveMentionGating, W as shouldAckReactionForWhatsApp, X as buildHistoryContextFromEntries, Y as DEFAULT_GROUP_HISTORY_LIMIT, _ as resolveEnvelopeFormatOptions, c as computeBackoff, d as formatDurationPrecise, f as dispatchReplyWithBufferedBlockDispatcher, g as formatInboundEnvelope, h as resolveInboundDebounceMs, ht as createDedupeCache, l as sleepWithAbort, m as createInboundDebouncer, n as normalizeGroupActivation, nt as buildMentionRegexes, r as parseActivationCommand, rt as normalizeMentionText, t as getReplyFromConfig, tt as recordPendingHistoryEntryIfEnabled, u as buildPairingReply, v as hasControlCommand, y as shouldComputeCommandAuthorized } from "./reply-QAcAd9ev.js";
3
+ import { E as enqueueSystemEvent, G as resolveMentionGating, W as shouldAckReactionForWhatsApp, X as buildHistoryContextFromEntries, Y as DEFAULT_GROUP_HISTORY_LIMIT, _ as resolveEnvelopeFormatOptions, c as computeBackoff, d as formatDurationPrecise, f as dispatchReplyWithBufferedBlockDispatcher, g as formatInboundEnvelope, h as resolveInboundDebounceMs, ht as createDedupeCache, l as sleepWithAbort, m as createInboundDebouncer, n as normalizeGroupActivation, nt as buildMentionRegexes, r as parseActivationCommand, rt as normalizeMentionText, t as getReplyFromConfig, tt as recordPendingHistoryEntryIfEnabled, u as buildPairingReply, v as hasControlCommand, y as shouldComputeCommandAuthorized } from "./reply-DvZeyOVA.js";
4
4
  import { A as normalizeE164, B as toWhatsappJid, K as logVerbose, N as resolveJidToE164, O as isSelfChatMode, R as sleep, Y as shouldLogVerbose, k as jidToE164, s as normalizeChatChannelId, tt as getChildLogger, x as clamp } from "./registry--_pGht6S.js";
5
5
  import { n as loadConfig } from "./config-DDkdiUOR.js";
6
6
  import { i as defaultRuntime, t as createSubsystemLogger } from "./subsystem-Coz2AgU8.js";
@@ -1,6 +1,6 @@
1
1
  import { f as DEFAULT_ACCOUNT_ID, p as normalizeAccountId } from "./session-key-C_0eELjb.js";
2
2
  import { _ as createAccountListHelpers, i as resolveWhatsAppAuthDir, n as resolveDefaultWhatsAppAccountId, r as resolveWhatsAppAccount, t as listWhatsAppAccountIds } from "./accounts-D9zGZU5t.js";
3
- import { $ as clearHistoryEntriesIfEnabled, A as resolveDiscordUserAllowlist, B as logTypingFailure, C as stripMarkdown, Ct as unbindThreadBindingsBySessionKey, D as resolveSlackUserAllowlist, Dt as BLUEBUBBLES_ACTION_NAMES, Et as BLUEBUBBLES_ACTIONS, F as stringEnum, G as resolveMentionGating, H as removeAckReactionAfterReply, I as recordInboundSession, J as summarizeMapping, K as resolveMentionGatingWithBypass, L as resolveControlCommandGate, M as collectDiscordAuditChannelIds, N as formatDocsLink, O as resolveSlackChannelAllowlist, Ot as BLUEBUBBLES_GROUP_ACTIONS, P as optionalStringEnum, Q as clearHistoryEntries, R as logAckFailure, S as processLineMessage, St as listThreadBindingsBySessionKey, T as attachFooterText, Tt as resolveAllowlistMatchSimple, U as shouldAckReaction, V as createTypingCallbacks, W as shouldAckReactionForWhatsApp, Y as DEFAULT_GROUP_HISTORY_LIMIT, Z as buildPendingHistoryContextFromMap, _t as listDevicePairing, a as normalizeAccountId$1, at as isWSLEnv, bt as registerPluginHttpRoute, ct as DEFAULT_WEBHOOK_MAX_BODY_BYTES, dt as isRequestBodyLimitError, et as recordPendingHistoryEntry, ft as readJsonBodyWithLimit, gt as approveDevicePairing, ht as createDedupeCache, i as listLineAccountIds, it as isWSL2Sync, j as resolveDiscordChannelAllowlist, k as detectBinary, kt as CHANNEL_MESSAGE_ACTION_NAMES, lt as RequestBodyLimitError, mt as requestBodyErrorToText, o as resolveDefaultLineAccountId, ot as isWSLSync, pt as readRequestBodyWithLimit, q as mergeAllowlist, s as resolveLineAccount, st as DEFAULT_WEBHOOK_BODY_TIMEOUT_MS, tt as recordPendingHistoryEntryIfEnabled, ut as installRequestBodyLimitGuard, vt as rejectDevicePairing, w as createReceiptCard, wt as formatAllowlistMatchMeta, x as hasMarkdownToConvert, xt as autoBindSpawnedDiscordSubagent, yt as extractToolSend, z as logInboundDrop } from "./reply-QAcAd9ev.js";
3
+ import { $ as clearHistoryEntriesIfEnabled, A as resolveDiscordUserAllowlist, B as logTypingFailure, C as stripMarkdown, Ct as unbindThreadBindingsBySessionKey, D as resolveSlackUserAllowlist, Dt as BLUEBUBBLES_ACTION_NAMES, Et as BLUEBUBBLES_ACTIONS, F as stringEnum, G as resolveMentionGating, H as removeAckReactionAfterReply, I as recordInboundSession, J as summarizeMapping, K as resolveMentionGatingWithBypass, L as resolveControlCommandGate, M as collectDiscordAuditChannelIds, N as formatDocsLink, O as resolveSlackChannelAllowlist, Ot as BLUEBUBBLES_GROUP_ACTIONS, P as optionalStringEnum, Q as clearHistoryEntries, R as logAckFailure, S as processLineMessage, St as listThreadBindingsBySessionKey, T as attachFooterText, Tt as resolveAllowlistMatchSimple, U as shouldAckReaction, V as createTypingCallbacks, W as shouldAckReactionForWhatsApp, Y as DEFAULT_GROUP_HISTORY_LIMIT, Z as buildPendingHistoryContextFromMap, _t as listDevicePairing, a as normalizeAccountId$1, at as isWSLEnv, bt as registerPluginHttpRoute, ct as DEFAULT_WEBHOOK_MAX_BODY_BYTES, dt as isRequestBodyLimitError, et as recordPendingHistoryEntry, ft as readJsonBodyWithLimit, gt as approveDevicePairing, ht as createDedupeCache, i as listLineAccountIds, it as isWSL2Sync, j as resolveDiscordChannelAllowlist, k as detectBinary, kt as CHANNEL_MESSAGE_ACTION_NAMES, lt as RequestBodyLimitError, mt as requestBodyErrorToText, o as resolveDefaultLineAccountId, ot as isWSLSync, pt as readRequestBodyWithLimit, q as mergeAllowlist, s as resolveLineAccount, st as DEFAULT_WEBHOOK_BODY_TIMEOUT_MS, tt as recordPendingHistoryEntryIfEnabled, ut as installRequestBodyLimitGuard, vt as rejectDevicePairing, w as createReceiptCard, wt as formatAllowlistMatchMeta, x as hasMarkdownToConvert, xt as autoBindSpawnedDiscordSubagent, yt as extractToolSend, z as logInboundDrop } from "./reply-DvZeyOVA.js";
4
4
  import "./paths-DR2yt_mP.js";
5
5
  import "./github-copilot-token-D9X2phUj.js";
6
6
  import { D as resolveSlackAccount, E as resolveDefaultSlackAccountId, F as resolveDiscordAccount, M as listDiscordAccountIds, O as resolveSlackReplyToMode, P as resolveDefaultDiscordAccountId, S as resolveTelegramAccount, T as listSlackAccountIds, _ as normalizeWhatsAppTarget, a as listDiscordDirectoryPeersFromConfig, b as listTelegramAccountIds, c as listTelegramDirectoryGroupsFromConfig, d as listWhatsAppDirectoryPeersFromConfig, f as looksLikeSlackTargetId, g as isWhatsAppGroupJid, i as listDiscordDirectoryGroupsFromConfig, l as listTelegramDirectoryPeersFromConfig, o as listSlackDirectoryGroupsFromConfig, p as normalizeSlackMessagingTarget, s as listSlackDirectoryPeersFromConfig, u as listWhatsAppDirectoryGroupsFromConfig, w as listEnabledSlackAccounts, x as resolveDefaultTelegramAccountId } from "./plugins-BbAvhC25.js";
@@ -47,7 +47,7 @@ import "./paths-A0xdf3yk.js";
47
47
  import { h as onDiagnosticEvent, m as isDiagnosticsEnabled, p as emitDiagnosticEvent } from "./diagnostic-mFf4i4G9.js";
48
48
  import { n as extractOriginalFilename } from "./store-Do3t33-c.js";
49
49
  import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-BkCUbYGV.js";
50
- import { r as resolveWhatsAppHeartbeatRecipients } from "./channel-web-DPyyTvFo.js";
50
+ import { r as resolveWhatsAppHeartbeatRecipients } from "./channel-web-DZQQ0mzN.js";
51
51
  import "./image-BOYy0Ump.js";
52
52
  import "./pi-model-discovery-LbcEa65a.js";
53
53
  import "./api-key-rotation-CVBMpnPc.js";