@symerian/symi 2.3.4 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/dist/{accounts-tNElYrCH.js → accounts-CI6zQTJj.js} +14 -14
  2. package/dist/{accounts-qtxJ-6em.js → accounts-CJR8j_Kq.js} +1 -1
  3. package/dist/{accounts-CWktKM8a.js → accounts-ChTFYj8Q.js} +1 -1
  4. package/dist/{active-listener-C9r8ZB9m.js → active-listener-D6sXIjAg.js} +1 -1
  5. package/dist/{agent-scope-BxoUQqgM.js → agent-scope-Bw1Ed8W9.js} +3 -3
  6. package/dist/{agents-E_Ere0qU.js → agents-BrpbYYTb.js} +4 -4
  7. package/dist/{agents.config-Cv_wsBXL.js → agents.config-Bf8u_0ts.js} +1 -1
  8. package/dist/{agents.config-DJTb7Jka.js → agents.config-j4SWyB6K.js} +1 -1
  9. package/dist/{audio-preflight-O3ASWbaG.js → audio-preflight-BkIfnmpi.js} +29 -29
  10. package/dist/{auth-choice-B3D_jLQw.js → auth-choice-BYB9fJiu.js} +1 -1
  11. package/dist/{auth-choice-D8ynWABO.js → auth-choice-DlrjQI-v.js} +1 -1
  12. package/dist/{banner-ChYzCy5p.js → banner-DRJJmkv1.js} +1 -1
  13. package/dist/{bindings-B7Ke6LJi.js → bindings-BU2hsBd9.js} +2 -2
  14. package/dist/build-info.json +3 -3
  15. package/dist/bundled/boot-md/handler.js +53 -53
  16. package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
  17. package/dist/bundled/command-logger/handler.js +1 -1
  18. package/dist/bundled/session-memory/handler.js +53 -53
  19. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  20. package/dist/{channel-activity-CsM_hJ_s.js → channel-activity-C9-gaquj.js} +1 -1
  21. package/dist/{channel-options-BYUiEgev.js → channel-options-BQz0F4El.js} +1 -1
  22. package/dist/{channel-options-CMNzHg4p.js → channel-options-CxSIp3x-.js} +1 -1
  23. package/dist/{channel-web-C-HLPbLL.js → channel-web-BY4lhNxW.js} +1 -1
  24. package/dist/{channels-cli-CyhXPEWq.js → channels-cli--rkhLJvR.js} +4 -4
  25. package/dist/{channels-cli-CcCmH-Tp.js → channels-cli-B5Nj_nHr.js} +4 -4
  26. package/dist/{chrome-BFekevcE.js → chrome-CxSAp8x3.js} +20 -20
  27. package/dist/{chunk-BW5f05BR.js → chunk-ClbN9Pqy.js} +1 -1
  28. package/dist/{cli-Cp-NQ7yu.js → cli-CATf6JAq.js} +1 -1
  29. package/dist/{cli-Gcuf3NTF.js → cli-Ds6poYQ6.js} +1 -1
  30. package/dist/{command-format-BaxDnULz.js → command-format-UKHV-j0K.js} +1 -1
  31. package/dist/{command-registry-Cvr_dlLY.js → command-registry-DXt0PsFy.js} +9 -9
  32. package/dist/{commands-registry-D7CTCQPm.js → commands-registry-VSmULp-g.js} +4 -4
  33. package/dist/{completion-cli-DaOHSXM3.js → completion-cli-BsSDzZNA.js} +1 -1
  34. package/dist/{completion-cli-DDlYn0ya.js → completion-cli-CPMOXTf2.js} +2 -2
  35. package/dist/{config-cli-CmUPAVUz.js → config-cli-B_KCvdli.js} +1 -1
  36. package/dist/{config-cli-BcuAsDOu.js → config-cli-C_GarUko.js} +1 -1
  37. package/dist/{config-DRbjHIwD.js → config-eEaJddXj.js} +12 -12
  38. package/dist/{configure-Ctwt1377.js → configure-CM-z8YCS.js} +3 -3
  39. package/dist/{configure-OxYdT2hU.js → configure-vfmJApU8.js} +3 -3
  40. package/dist/{deliver-CvCK5Mm9.js → deliver-BA7ZN3iM.js} +20 -20
  41. package/dist/{diagnostic-CI0kRQkt.js → diagnostic-C3nsWaw3.js} +1 -1
  42. package/dist/{doctor-completion-D7ShsgUp.js → doctor-completion-8qbLmeX0.js} +1 -1
  43. package/dist/{doctor-completion-Dw78bQaQ.js → doctor-completion-Dnxn_-ov.js} +1 -1
  44. package/dist/entry.js +1 -1
  45. package/dist/extensionAPI.js +1 -1
  46. package/dist/{frontmatter-C_bv_0P8.js → frontmatter-DPlG6yha.js} +2 -2
  47. package/dist/{gateway-cli-D7nxPtEc.js → gateway-cli-DKDpOBp-.js} +9 -9
  48. package/dist/{gateway-cli-Bd7u0krH.js → gateway-cli-XIsXoJZ3.js} +9 -9
  49. package/dist/{gemini-auth-CdSPHuLl.js → gemini-auth-CF48hUR9.js} +1 -1
  50. package/dist/{github-copilot-token-C_qUP7p5.js → github-copilot-token-DJqsJ2-r.js} +7 -7
  51. package/dist/{glass-ui-ws-CzH0ikhI.js → glass-ui-ws-Be_AOhp7.js} +7 -7
  52. package/dist/{glass-ui-ws-DBivjzVA.js → glass-ui-ws-Z_wtGa_A.js} +7 -7
  53. package/dist/{health-rR61mwm3.js → health-BBGgp_dC.js} +1 -1
  54. package/dist/{health-BSOMI4B6.js → health-BmaWws9G.js} +1 -1
  55. package/dist/{hooks-cli-dS4fMEKE.js → hooks-cli-C5eV9sxP.js} +2 -2
  56. package/dist/{hooks-cli-BbiA-gGi.js → hooks-cli-W_aoP9nb.js} +2 -2
  57. package/dist/{image-B0wGflxA.js → image-BGmVDkkw.js} +4 -4
  58. package/dist/{image-ops-CvJzsyvE.js → image-ops-S8-8dAhx.js} +1 -1
  59. package/dist/index.js +6 -6
  60. package/dist/{ir-DccrnjsE.js → ir-CbFUkv_T.js} +4 -4
  61. package/dist/llm-slug-generator.js +53 -53
  62. package/dist/{local-roots-DMwIh5cS.js → local-roots-C7OCYACU.js} +5 -5
  63. package/dist/{login-CwCoxapk.js → login-B8uiUAnV.js} +7 -7
  64. package/dist/{login-qr-Batf3PT5.js → login-qr-CIZk8uKX.js} +12 -12
  65. package/dist/{manager-D_LwXbc6.js → manager-BoLr3xR_.js} +13 -13
  66. package/dist/{manifest-registry-D0IQ3WuX.js → manifest-registry-CneMHk0N.js} +19 -19
  67. package/dist/{markdown-tables-iMQQZu4Q.js → markdown-tables-DSHvnTLx.js} +1 -1
  68. package/dist/{message-channel-Dz5lr5b0.js → message-channel-DbsRltF2.js} +1 -1
  69. package/dist/{model-auth-DK43VicI.js → model-auth-CwOuTuXl.js} +9 -9
  70. package/dist/{models-DqE1s0YL.js → models-COaQWNz5.js} +2 -2
  71. package/dist/{models-cli-6v9jkDxp.js → models-cli-DH17yK8M.js} +3 -3
  72. package/dist/{models-cli-BWC7jYp4.js → models-cli-DeG1qheS.js} +2 -2
  73. package/dist/{onboard-Bxoibs4p.js → onboard-CXOUIg28.js} +2 -2
  74. package/dist/{onboard-BUEYf2m9.js → onboard-DBeHwdks.js} +2 -2
  75. package/dist/{onboard-channels-C3UYzZNC.js → onboard-channels-BCUkNB26.js} +1 -1
  76. package/dist/{onboard-channels-af6Cu6fT.js → onboard-channels-D93AAHMd.js} +1 -1
  77. package/dist/{onboarding-DW-7o6Ln.js → onboarding-C58wjONa.js} +3 -3
  78. package/dist/{onboarding-CDdMZbov.js → onboarding-Dfjn2-9q.js} +3 -3
  79. package/dist/{onboarding.finalize-29jsMLO2.js → onboarding.finalize-7r1HYXWd.js} +6 -6
  80. package/dist/{onboarding.finalize-BI70KOeI.js → onboarding.finalize-DGD56sXW.js} +5 -5
  81. package/dist/{outbound-attachment-DjNDa3zn.js → outbound-attachment-Co2diKdP.js} +2 -2
  82. package/dist/{outbound-D4fN_ZlE.js → outbound-opDNxv-l.js} +7 -7
  83. package/dist/{paths-DLyHUt31.js → paths-Cb87-LzP.js} +1 -1
  84. package/dist/{paths-Cce4PUkG.js → paths-CySxpNhH.js} +5 -5
  85. package/dist/{pi-auth-json-0SYBFZTt.js → pi-auth-json-DPWPoruO.js} +8 -8
  86. package/dist/{pi-embedded-PkSwAmVq.js → pi-embedded-B6uRrG1f.js} +355 -328
  87. package/dist/{pi-embedded-JXvD5-F-.js → pi-embedded-CAJ6egA1.js} +195 -168
  88. package/dist/{pi-embedded-helpers-DLFjnVBb.js → pi-embedded-helpers-DEEaCvEp.js} +52 -52
  89. package/dist/{plugin-registry-Reem6P3K.js → plugin-registry-C0iHnZ7j.js} +1 -1
  90. package/dist/{plugin-registry-B7AdPXfF.js → plugin-registry-D_BAH1V5.js} +1 -1
  91. package/dist/plugin-sdk/agents/model-aware-stream.d.ts +41 -0
  92. package/dist/plugin-sdk/agents/pi-embedded-runner/extra-params.d.ts +19 -0
  93. package/dist/plugin-sdk/agents/stream-monitor.d.ts +62 -0
  94. package/dist/plugin-sdk/{channel-web-CM7A3Y7G.js → channel-web-ilY3YUmF.js} +1 -1
  95. package/dist/plugin-sdk/index.js +2 -2
  96. package/dist/plugin-sdk/{reply-CDloTGFF.js → reply-CSgeVqcV.js} +195 -168
  97. package/dist/plugin-sdk/{web-CWNoMlnF.js → web-BVg5EjiY.js} +2 -2
  98. package/dist/{plugins-DQYI3Fr-.js → plugins-C4C9637U.js} +9 -9
  99. package/dist/{plugins-cli-V8mTTTnD.js → plugins-cli-BhOXY_Ay.js} +2 -2
  100. package/dist/{plugins-cli-B-6wVg3A.js → plugins-cli-LqQNHF1I.js} +2 -2
  101. package/dist/{program-DBtlRiFS.js → program-CutjuJj0.js} +7 -7
  102. package/dist/{program-context-BHPNVgg2.js → program-context-qVc_lsLV.js} +17 -17
  103. package/dist/{prompt-select-styled-Bh-zAqW1.js → prompt-select-styled-BCHe7Fks.js} +4 -4
  104. package/dist/{prompt-select-styled-Cup1c9RJ.js → prompt-select-styled-C0yn8YjW.js} +4 -4
  105. package/dist/{provider-auth-helpers-CiuLdUK3.js → provider-auth-helpers-BzczCfh8.js} +1 -1
  106. package/dist/{provider-auth-helpers-BNmU48Ez.js → provider-auth-helpers-Ds_HwlgY.js} +1 -1
  107. package/dist/{push-apns-9zUNNHgy.js → push-apns-CT8-VcK5.js} +1 -1
  108. package/dist/{push-apns-8VJkVSdh.js → push-apns-DvcqkHld.js} +1 -1
  109. package/dist/{pw-ai-BnAKvSuw.js → pw-ai-DhwRiS06.js} +11 -11
  110. package/dist/{qmd-manager-QHUP-_em.js → qmd-manager-DdZh9PHs.js} +7 -7
  111. package/dist/{register.agent-BtNmleKV.js → register.agent-DMvHFw16.js} +6 -6
  112. package/dist/{register.agent-DnglG42G.js → register.agent-yoXoJ_5O.js} +5 -5
  113. package/dist/{register.configure-CLW9tdE4.js → register.configure-B8UDTEcS.js} +6 -6
  114. package/dist/{register.configure-DfQOfV1W.js → register.configure-BqrNBkwZ.js} +6 -6
  115. package/dist/{register.maintenance-jFYcRLEN.js → register.maintenance-D1MuIUlv.js} +7 -7
  116. package/dist/{register.maintenance-BQfMsgo7.js → register.maintenance-DMLPFSKI.js} +8 -8
  117. package/dist/{register.message-DUsBvFSF.js → register.message-BnLBwUw9.js} +2 -2
  118. package/dist/{register.message-BhoZYcqM.js → register.message-CgtrjEFw.js} +2 -2
  119. package/dist/{register.onboard-BBwhoeoE.js → register.onboard-CXHhSH4B.js} +4 -4
  120. package/dist/{register.onboard-DQOkpYBY.js → register.onboard-D1X2dUGZ.js} +4 -4
  121. package/dist/{register.setup-Ca6khTSz.js → register.setup-DFDb5BDi.js} +4 -4
  122. package/dist/{register.setup-6jlL3L1h.js → register.setup-Q58lN0TV.js} +4 -4
  123. package/dist/{register.status-health-sessions-DQDXZYI3.js → register.status-health-sessions-CP7JWQHw.js} +3 -3
  124. package/dist/{register.status-health-sessions-DsYNMl06.js → register.status-health-sessions-DhTfQ530.js} +3 -3
  125. package/dist/{register.subclis-DJf3ihsW.js → register.subclis-CrTXa8cj.js} +9 -9
  126. package/dist/{registry-CK4e9hn8.js → registry-DP24za6g.js} +17 -17
  127. package/dist/{replies-BIX_isV7.js → replies-DpPvWiGF.js} +3 -3
  128. package/dist/{reply-DSjeqLEz.js → reply-DkwaBRX-.js} +195 -168
  129. package/dist/{reply-prefix-XlyuyChD.js → reply-prefix-CtL0omgM.js} +1 -1
  130. package/dist/{resolve-route-CZ-1eqw0.js → resolve-route-BVikmvWO.js} +4 -4
  131. package/dist/{retry-Cly39XZB.js → retry-dGG-MbxL.js} +1 -1
  132. package/dist/{run-main-B2coomPj.js → run-main-BLKPL_vM.js} +14 -14
  133. package/dist/{runner-odEv83vv.js → runner-B_KP4voe.js} +9 -9
  134. package/dist/{send-DeFniOjh.js → send-CHEOWVc8.js} +6 -6
  135. package/dist/{send-WyRqb4WD.js → send-DbcLJb0P.js} +7 -7
  136. package/dist/{send-B1u-LrcS.js → send-DeEosX8F.js} +18 -18
  137. package/dist/{send-CiTGOvEc.js → send-DwKJK3sM.js} +10 -10
  138. package/dist/{send-DW96zgDL.js → send-zSarozV2.js} +6 -6
  139. package/dist/{server-methods-QNBQbsvr.js → server-methods-CbeCo-6O.js} +7 -7
  140. package/dist/{server-methods-DHo5e8Gj.js → server-methods-EQ0JkHOg.js} +7 -7
  141. package/dist/{server-node-events-D_S0NRCQ.js → server-node-events-C1FDqJb9.js} +2 -2
  142. package/dist/{server-node-events-CJOo8WcL.js → server-node-events-CBHpc_25.js} +2 -2
  143. package/dist/{session-SM36BTsl.js → session-DV1MNlbV.js} +8 -8
  144. package/dist/{skill-commands-BJMb_psG.js → skill-commands-D610IKhm.js} +9 -9
  145. package/dist/{skills-BFekKL7i.js → skills-o5WVqM4V.js} +21 -21
  146. package/dist/{sqlite-DRbx2dhW.js → sqlite-6H6Zw1cs.js} +4 -4
  147. package/dist/{status-B8yaGk2o.js → status-B1r3Wp0-.js} +2 -2
  148. package/dist/{status-D_J6qcC1.js → status-Cksz7z4T.js} +1 -1
  149. package/dist/{status-4DaGE8j5.js → status-CnogoaI_.js} +2 -2
  150. package/dist/{status-kfEtYX22.js → status-jVJSC_Ga.js} +1 -1
  151. package/dist/{store-C0wvOkae.js → store-vVE6N2mH.js} +2 -2
  152. package/dist/{subagent-registry-CyW0EDWw.js → subagent-registry-Jwg44JMf.js} +195 -168
  153. package/dist/{subsystem-Bs9YvKLa.js → subsystem-DgpxyDQ_.js} +1 -1
  154. package/dist/{tables-DuZspiBu.js → tables-BIWsCKXJ.js} +1 -1
  155. package/dist/{target-errors-Be1SwYlW.js → target-errors-DyItGyW9.js} +2 -2
  156. package/dist/{thinking-CdlENGRW.js → thinking-Ni0HF-w6.js} +5 -5
  157. package/dist/{tokens-H1H1LiSQ.js → tokens-c_SLAkVb.js} +1 -1
  158. package/dist/{tool-images-DXB7tqWi.js → tool-images-DBCfXdli.js} +2 -2
  159. package/dist/{tool-loop-detection-Cs8_HCsx.js → tool-loop-detection-Bbc9OPFR.js} +3 -3
  160. package/dist/{update-cli-C-ZGqknl.js → update-cli-BkU6ori8.js} +8 -8
  161. package/dist/{update-cli-DJupxo-f.js → update-cli-D18nWvzY.js} +7 -7
  162. package/dist/{update-runner-AiIhp7fw.js → update-runner-BQg__DB5.js} +1 -1
  163. package/dist/{update-runner-BF5UULe-.js → update-runner-le1Hcqx4.js} +1 -1
  164. package/dist/{web-HeObJp6A.js → web-BSs2eYJa.js} +2 -2
  165. package/dist/{web-6vYYN17n.js → web-BsjZ2RTT.js} +57 -57
  166. package/dist/{web-6026eRzJ.js → web-DajtZMaX.js} +1 -1
  167. package/dist/{web-CryqKXT4.js → web-KYh3LgI0.js} +1 -1
  168. package/dist/{whatsapp-actions-D1RsnX7P.js → whatsapp-actions-oRQjcdQe.js} +23 -23
  169. package/dist/{workspace-wAaHI8-5.js → workspace-CbvamIU6.js} +6 -6
  170. package/package.json +1 -1
@@ -22374,7 +22374,7 @@ async function runWithImageModelFallback(params) {
22374
22374
  function createDefaultDeps() {
22375
22375
  return {
22376
22376
  sendMessageWhatsApp: async (...args) => {
22377
- const { sendMessageWhatsApp } = await import("./web-HeObJp6A.js");
22377
+ const { sendMessageWhatsApp } = await import("./web-BSs2eYJa.js");
22378
22378
  return await sendMessageWhatsApp(...args);
22379
22379
  },
22380
22380
  sendMessageTelegram: async (...args) => {
@@ -40937,7 +40937,7 @@ function loadWebLoginQr() {
40937
40937
  return webLoginQrPromise;
40938
40938
  }
40939
40939
  function loadWebChannel() {
40940
- webChannelPromise ??= import("./web-HeObJp6A.js");
40940
+ webChannelPromise ??= import("./web-BSs2eYJa.js");
40941
40941
  return webChannelPromise;
40942
40942
  }
40943
40943
  function loadWhatsAppActions() {
@@ -59279,10 +59279,6 @@ function resolveModelProfile(modelId, userProfiles) {
59279
59279
 
59280
59280
  //#endregion
59281
59281
  //#region src/agents/pi-embedded-runner/extra-params.ts
59282
- const OPENROUTER_APP_HEADERS = {
59283
- "HTTP-Referer": "https://symi.ai",
59284
- "X-Title": "Symi"
59285
- };
59286
59282
  const ANTHROPIC_CONTEXT_1M_BETA = "context-1m-2025-08-07";
59287
59283
  const ANTHROPIC_1M_MODEL_PREFIXES = ["claude-opus-4", "claude-sonnet-4"];
59288
59284
  const OPENAI_RESPONSES_APIS = new Set(["openai-responses"]);
@@ -59300,70 +59296,6 @@ function resolveExtraParams(params) {
59300
59296
  const profile = resolveModelProfile(modelKey, params.cfg?.models?.profiles);
59301
59297
  if (profile.params && Object.keys(profile.params).length > 0) return { ...profile.params };
59302
59298
  }
59303
- /**
59304
- * Resolve cacheRetention from extraParams, supporting both new `cacheRetention`
59305
- * and legacy `cacheControlTtl` values for backwards compatibility.
59306
- *
59307
- * Mapping: "5m" → "short", "1h" → "long"
59308
- *
59309
- * Only applies to Anthropic provider (OpenRouter uses openai-completions API
59310
- * with hardcoded cache_control, not the cacheRetention stream option).
59311
- *
59312
- * Defaults to "short" for Anthropic provider when not explicitly configured.
59313
- */
59314
- function resolveCacheRetention(extraParams, provider) {
59315
- if (provider !== "anthropic") return;
59316
- const newVal = extraParams?.cacheRetention;
59317
- if (newVal === "none" || newVal === "short" || newVal === "long") return newVal;
59318
- const legacy = extraParams?.cacheControlTtl;
59319
- if (legacy === "5m") return "short";
59320
- if (legacy === "1h") return "long";
59321
- return "short";
59322
- }
59323
- function createStreamFnWithExtraParams(baseStreamFn, extraParams, provider) {
59324
- if (!extraParams || Object.keys(extraParams).length === 0) return;
59325
- const streamParams = {};
59326
- if (typeof extraParams.temperature === "number") streamParams.temperature = extraParams.temperature;
59327
- if (typeof extraParams.maxTokens === "number") streamParams.maxTokens = extraParams.maxTokens;
59328
- if (typeof extraParams.top_p === "number") streamParams.top_p = extraParams.top_p;
59329
- if (typeof extraParams.top_k === "number") streamParams.top_k = extraParams.top_k;
59330
- if (typeof extraParams.repeat_penalty === "number") streamParams.repeat_penalty = extraParams.repeat_penalty;
59331
- if (Array.isArray(extraParams.stop) && extraParams.stop.length > 0) streamParams.stop = extraParams.stop;
59332
- if (extraParams.chat_template_kwargs && typeof extraParams.chat_template_kwargs === "object") streamParams.chat_template_kwargs = extraParams.chat_template_kwargs;
59333
- const cacheRetention = resolveCacheRetention(extraParams, provider);
59334
- if (cacheRetention) streamParams.cacheRetention = cacheRetention;
59335
- if (Object.keys(streamParams).length === 0) return;
59336
- log$2.debug(`creating streamFn wrapper with params: ${JSON.stringify(streamParams)}`);
59337
- const sp = streamParams;
59338
- const payloadOverrides = {};
59339
- if (Array.isArray(sp.stop) && sp.stop.length > 0) payloadOverrides.stop = sp.stop;
59340
- if (typeof sp.top_p === "number") payloadOverrides.top_p = sp.top_p;
59341
- if (typeof sp.top_k === "number") payloadOverrides.top_k = sp.top_k;
59342
- if (typeof sp.repeat_penalty === "number") payloadOverrides.repeat_penalty = sp.repeat_penalty;
59343
- const hasPayloadOverrides = Object.keys(payloadOverrides).length > 0;
59344
- const underlying = baseStreamFn ?? streamSimple;
59345
- const wrappedStreamFn = (model, context, options) => {
59346
- if (hasPayloadOverrides) {
59347
- const originalOnPayload = options?.onPayload;
59348
- return underlying(model, context, {
59349
- ...streamParams,
59350
- ...options,
59351
- onPayload: (payload) => {
59352
- if (payload && typeof payload === "object") {
59353
- const p = payload;
59354
- for (const [key, value] of Object.entries(payloadOverrides)) if (p[key] === void 0) p[key] = value;
59355
- }
59356
- originalOnPayload?.(payload);
59357
- }
59358
- });
59359
- }
59360
- return underlying(model, context, {
59361
- ...streamParams,
59362
- ...options
59363
- });
59364
- };
59365
- return wrappedStreamFn;
59366
- }
59367
59299
  function isDirectOpenAIBaseUrl(baseUrl) {
59368
59300
  if (typeof baseUrl !== "string" || !baseUrl.trim()) return true;
59369
59301
  try {
@@ -59444,20 +59376,6 @@ function createAnthropicBetaHeadersWrapper(baseStreamFn, betas) {
59444
59376
  };
59445
59377
  }
59446
59378
  /**
59447
- * Create a streamFn wrapper that adds OpenRouter app attribution headers.
59448
- * These headers allow Symi to appear on OpenRouter's leaderboard.
59449
- */
59450
- function createOpenRouterHeadersWrapper(baseStreamFn) {
59451
- const underlying = baseStreamFn ?? streamSimple;
59452
- return (model, context, options) => underlying(model, context, {
59453
- ...options,
59454
- headers: {
59455
- ...OPENROUTER_APP_HEADERS,
59456
- ...options?.headers
59457
- }
59458
- });
59459
- }
59460
- /**
59461
59379
  * Create a streamFn wrapper that injects tool_stream=true for Z.AI providers.
59462
59380
  *
59463
59381
  * Z.AI's API supports the `tool_stream` parameter to enable real-time streaming
@@ -59480,82 +59398,6 @@ function createZaiToolStreamWrapper(baseStreamFn, enabled) {
59480
59398
  });
59481
59399
  };
59482
59400
  }
59483
- const GEMMA_STOP_SEQUENCES = ["<end_of_turn>", "<eos>"];
59484
- const VLLM_GEMMA_HINTS = ["gemma", "redsand"];
59485
- function isVllmOrGemmaProvider(provider, modelId, cfg) {
59486
- const lower = `${provider}/${modelId}`.toLowerCase();
59487
- if (VLLM_GEMMA_HINTS.some((h) => lower.includes(h))) return true;
59488
- const baseUrl = ((cfg?.models?.providers?.[provider])?.baseUrl ?? "").toLowerCase();
59489
- return baseUrl.includes("coreweave") || baseUrl.includes("vllm");
59490
- }
59491
- /**
59492
- * Wrap the stream function to fix vLLM/Gemma compat issues via onPayload:
59493
- * 1. Replace `max_completion_tokens` with `max_tokens` (vLLM ignores the former)
59494
- * 2. Inject Gemma stop sequences if none are set
59495
- * 3. Remove unsupported fields (store, stream_options.include_usage on older vLLM)
59496
- */
59497
- function createVllmCompatWrapper(baseStreamFn, extraParams) {
59498
- const underlying = baseStreamFn ?? streamSimple;
59499
- const configuredStop = Array.isArray(extraParams.stop) ? extraParams.stop : GEMMA_STOP_SEQUENCES;
59500
- return (model, context, options) => {
59501
- const originalOnPayload = options?.onPayload;
59502
- return underlying(model, context, {
59503
- ...options,
59504
- onPayload: (payload) => {
59505
- if (payload && typeof payload === "object") {
59506
- const p = payload;
59507
- if (p.max_completion_tokens && !p.max_tokens) {
59508
- p.max_tokens = p.max_completion_tokens;
59509
- delete p.max_completion_tokens;
59510
- }
59511
- if (!p.stop && configuredStop.length > 0) p.stop = configuredStop;
59512
- delete p.store;
59513
- }
59514
- originalOnPayload?.(payload);
59515
- }
59516
- });
59517
- };
59518
- }
59519
- /**
59520
- * Apply extra params (like temperature) to an agent's streamFn.
59521
- * Also adds OpenRouter app attribution headers when using the OpenRouter provider.
59522
- *
59523
- * @internal Exported for testing
59524
- */
59525
- function applyExtraParamsToAgent(agent, cfg, provider, modelId, extraParamsOverride) {
59526
- const extraParams = resolveExtraParams({
59527
- cfg,
59528
- provider,
59529
- modelId
59530
- });
59531
- const override = extraParamsOverride && Object.keys(extraParamsOverride).length > 0 ? Object.fromEntries(Object.entries(extraParamsOverride).filter(([, value]) => value !== void 0)) : void 0;
59532
- const merged = Object.assign({}, extraParams, override);
59533
- const wrappedStreamFn = createStreamFnWithExtraParams(agent.streamFn, merged, provider);
59534
- if (wrappedStreamFn) {
59535
- log$2.debug(`applying extraParams to agent streamFn for ${provider}/${modelId}`);
59536
- agent.streamFn = wrappedStreamFn;
59537
- }
59538
- const anthropicBetas = resolveAnthropicBetas(merged, provider, modelId);
59539
- if (anthropicBetas?.length) {
59540
- log$2.debug(`applying Anthropic beta header for ${provider}/${modelId}: ${anthropicBetas.join(",")}`);
59541
- agent.streamFn = createAnthropicBetaHeadersWrapper(agent.streamFn, anthropicBetas);
59542
- }
59543
- if (provider === "openrouter") {
59544
- log$2.debug(`applying OpenRouter app attribution headers for ${provider}/${modelId}`);
59545
- agent.streamFn = createOpenRouterHeadersWrapper(agent.streamFn);
59546
- }
59547
- if (provider === "zai" || provider === "z-ai") {
59548
- if (merged?.tool_stream !== false) {
59549
- log$2.debug(`enabling Z.AI tool_stream for ${provider}/${modelId}`);
59550
- agent.streamFn = createZaiToolStreamWrapper(agent.streamFn, true);
59551
- }
59552
- }
59553
- if (isVllmOrGemmaProvider(provider, modelId, cfg)) {
59554
- log$2.debug(`applying vLLM/Gemma compat wrapper for ${provider}/${modelId}`);
59555
- agent.streamFn = createVllmCompatWrapper(agent.streamFn, merged);
59556
- }
59557
- agent.streamFn = createOpenAIResponsesStoreWrapper(agent.streamFn);
59558
- }
59559
59401
 
59560
59402
  //#endregion
59561
59403
  //#region src/utils/safe-json.ts
@@ -59832,6 +59674,74 @@ function createCacheTrace(params) {
59832
59674
  };
59833
59675
  }
59834
59676
 
59677
+ //#endregion
59678
+ //#region src/agents/model-aware-stream.ts
59679
+ /**
59680
+ * Create a single stream function wrapper that handles all provider-specific
59681
+ * param injection via one onPayload hook.
59682
+ *
59683
+ * Replaces: createStreamFnWithExtraParams, createVllmCompatWrapper,
59684
+ * createOpenRouterHeadersWrapper.
59685
+ */
59686
+ function createModelAwareStreamFn(opts) {
59687
+ const underlying = opts.baseStreamFn ?? streamSimple;
59688
+ const mergedParams = {
59689
+ ...opts.profile.params,
59690
+ ...opts.configExtraParams,
59691
+ ...opts.streamParamsOverride
59692
+ };
59693
+ const nativeOpts = {};
59694
+ if (typeof mergedParams.temperature === "number") nativeOpts.temperature = mergedParams.temperature;
59695
+ if (typeof mergedParams.max_tokens === "number") nativeOpts.maxTokens = mergedParams.max_tokens;
59696
+ else if (typeof mergedParams.maxTokens === "number") nativeOpts.maxTokens = mergedParams.maxTokens;
59697
+ const injections = {};
59698
+ if (Array.isArray(mergedParams.stop) && mergedParams.stop.length > 0) injections.stop = mergedParams.stop;
59699
+ if (typeof mergedParams.top_p === "number") injections.top_p = mergedParams.top_p;
59700
+ if (typeof mergedParams.top_k === "number") injections.top_k = mergedParams.top_k;
59701
+ if (typeof mergedParams.repeat_penalty === "number") injections.repeat_penalty = mergedParams.repeat_penalty;
59702
+ const isVllm = isVllmProvider(opts.provider, opts.modelId, opts.config);
59703
+ const isOpenRouter = opts.provider === "openrouter";
59704
+ const extraHeaders = {};
59705
+ if (isOpenRouter) {
59706
+ extraHeaders["HTTP-Referer"] = "https://symi.ai";
59707
+ extraHeaders["X-Title"] = "Symi";
59708
+ }
59709
+ const hasExtraHeaders = Object.keys(extraHeaders).length > 0;
59710
+ const onPayloadHook = (payload, callerOnPayload) => {
59711
+ if (payload && typeof payload === "object") {
59712
+ const p = payload;
59713
+ for (const [key, val] of Object.entries(injections)) if (p[key] === void 0) p[key] = val;
59714
+ if (isVllm) {
59715
+ if (p.max_completion_tokens && !p.max_tokens) {
59716
+ p.max_tokens = p.max_completion_tokens;
59717
+ delete p.max_completion_tokens;
59718
+ }
59719
+ delete p.store;
59720
+ }
59721
+ }
59722
+ callerOnPayload?.(payload);
59723
+ };
59724
+ return (model, context, options) => {
59725
+ const callerOnPayload = options?.onPayload;
59726
+ return underlying(model, context, {
59727
+ ...nativeOpts,
59728
+ ...options,
59729
+ onPayload: (payload) => onPayloadHook(payload, callerOnPayload),
59730
+ ...hasExtraHeaders ? { headers: {
59731
+ ...extraHeaders,
59732
+ ...options?.headers
59733
+ } } : {}
59734
+ });
59735
+ };
59736
+ }
59737
+ /** Detect vLLM/Gemma providers by model hints or baseUrl patterns. */
59738
+ function isVllmProvider(provider, modelId, config) {
59739
+ const lower = `${provider}/${modelId}`.toLowerCase();
59740
+ if (["gemma", "redsand"].some((h) => lower.includes(h))) return true;
59741
+ const baseUrl = ((config?.models?.providers?.[provider])?.baseUrl ?? "").toLowerCase();
59742
+ return baseUrl.includes("coreweave") || baseUrl.includes("vllm");
59743
+ }
59744
+
59835
59745
  //#endregion
59836
59746
  //#region src/auto-reply/reply/streaming-directives.ts
59837
59747
  const splitTrailingDirective = (text) => {
@@ -61815,6 +61725,89 @@ Use the message tool with buttons:
61815
61725
  [{"label": "✅ Proceed", "data": "/plan-proceed"}, {"label": "✏️ Modify", "data": "/plan-modify"}, {"label": "❌ Cancel", "data": "/plan-cancel"}]
61816
61726
  </plan_mode>`;
61817
61727
 
61728
+ //#endregion
61729
+ //#region src/agents/stream-monitor.ts
61730
+ /**
61731
+ * Create a stream monitor configured for the given model profile.
61732
+ *
61733
+ * - Claude (hasStructuredThinking: true): repetition detection only
61734
+ * - Gemma/vLLM (hasStructuredThinking: false): tool JSON + repetition detection
61735
+ */
61736
+ function createStreamMonitor(profile, overrides) {
61737
+ const detectToolJson = overrides?.detectToolJson ?? !profile.filters.hasStructuredThinking;
61738
+ const detectRepetition = overrides?.detectRepetition ?? true;
61739
+ const minBlockSize = overrides?.repetitionMinBlockSize ?? 150;
61740
+ let accumulated = "";
61741
+ let stopSignaled = false;
61742
+ let stopReason;
61743
+ return {
61744
+ onChunk(delta) {
61745
+ if (stopSignaled) return;
61746
+ accumulated += delta;
61747
+ if (detectToolJson && hasCompleteToolJson(accumulated)) {
61748
+ stopSignaled = true;
61749
+ stopReason = "complete-tool-json";
61750
+ return;
61751
+ }
61752
+ if (detectRepetition && hasRepetition(accumulated, minBlockSize)) {
61753
+ stopSignaled = true;
61754
+ stopReason = "repetition-detected";
61755
+ return;
61756
+ }
61757
+ },
61758
+ shouldStop: () => stopSignaled,
61759
+ getAccumulated: () => accumulated,
61760
+ getStopReason: () => stopReason,
61761
+ reset() {
61762
+ accumulated = "";
61763
+ stopSignaled = false;
61764
+ stopReason = void 0;
61765
+ }
61766
+ };
61767
+ }
61768
+ /**
61769
+ * Detect if the accumulated text contains a syntactically complete JSON
61770
+ * object with tool_name and tool_args. Used for models that output tool
61771
+ * calls as plain text JSON (not native structured tool calls).
61772
+ */
61773
+ function hasCompleteToolJson(text) {
61774
+ const hasToolKey = text.includes("tool_name") || text.includes("\"tool\"");
61775
+ const hasArgsKey = text.includes("tool_args") || text.includes("\"args\"");
61776
+ if (!hasToolKey || !hasArgsKey) return false;
61777
+ const lastBrace = text.lastIndexOf("}");
61778
+ if (lastBrace < 0) return false;
61779
+ let depth = 0;
61780
+ let start = -1;
61781
+ for (let i = lastBrace; i >= 0; i--) {
61782
+ if (text[i] === "}") depth++;
61783
+ if (text[i] === "{") depth--;
61784
+ if (depth === 0) {
61785
+ start = i;
61786
+ break;
61787
+ }
61788
+ }
61789
+ if (start < 0) return false;
61790
+ const candidate = text.slice(start, lastBrace + 1);
61791
+ try {
61792
+ const parsed = JSON.parse(candidate);
61793
+ return typeof parsed === "object" && parsed !== null && (typeof parsed.tool_name === "string" || typeof parsed.tool === "string") && (typeof parsed.tool_args === "object" || typeof parsed.args === "object");
61794
+ } catch {
61795
+ return false;
61796
+ }
61797
+ }
61798
+ /**
61799
+ * Detect if the accumulated text contains a repeated block, indicating
61800
+ * a looping cascade. Returns true if a block of `minBlockSize` chars
61801
+ * from the first half appears again in the second half.
61802
+ */
61803
+ function hasRepetition(text, minBlockSize) {
61804
+ if (text.length < minBlockSize * 2.5) return false;
61805
+ const sampleStart = Math.floor(text.length * .25);
61806
+ const sample = text.slice(sampleStart, sampleStart + minBlockSize);
61807
+ const searchStart = sampleStart + minBlockSize;
61808
+ return text.indexOf(sample, searchStart) >= 0;
61809
+ }
61810
+
61818
61811
  //#endregion
61819
61812
  //#region src/agents/symipulse-timeout.ts
61820
61813
  /**
@@ -62882,14 +62875,39 @@ async function runEmbeddedAttempt(params) {
62882
62875
  modelApi: params.model.api,
62883
62876
  workspaceDir: params.workspaceDir
62884
62877
  });
62885
- if (params.model.api === "ollama") {
62886
- const providerConfig = params.config?.models?.providers?.[params.model.provider];
62887
- const modelBaseUrl = typeof params.model.baseUrl === "string" ? params.model.baseUrl.trim() : "";
62888
- const providerBaseUrl = typeof providerConfig?.baseUrl === "string" ? providerConfig.baseUrl.trim() : "";
62889
- const ollamaBaseUrl = modelBaseUrl || providerBaseUrl || OLLAMA_NATIVE_BASE_URL;
62890
- activeSession.agent.streamFn = createOllamaStreamFn(ollamaBaseUrl);
62891
- } else activeSession.agent.streamFn = streamSimple;
62892
- applyExtraParamsToAgent(activeSession.agent, params.config, params.provider, params.modelId, params.streamParams);
62878
+ {
62879
+ let baseStreamFn = streamSimple;
62880
+ if (params.model.api === "ollama") {
62881
+ const providerConfig = params.config?.models?.providers?.[params.model.provider];
62882
+ const modelBaseUrl = typeof params.model.baseUrl === "string" ? params.model.baseUrl.trim() : "";
62883
+ const providerBaseUrl = typeof providerConfig?.baseUrl === "string" ? providerConfig.baseUrl.trim() : "";
62884
+ baseStreamFn = createOllamaStreamFn(modelBaseUrl || providerBaseUrl || OLLAMA_NATIVE_BASE_URL);
62885
+ }
62886
+ const configExtraParams = resolveExtraParams({
62887
+ cfg: params.config,
62888
+ provider: params.provider,
62889
+ modelId: params.modelId
62890
+ });
62891
+ activeSession.agent.streamFn = createModelAwareStreamFn({
62892
+ baseStreamFn,
62893
+ profile: modelProfile,
62894
+ provider: params.provider,
62895
+ modelId: params.modelId,
62896
+ config: params.config,
62897
+ configExtraParams,
62898
+ streamParamsOverride: params.streamParams
62899
+ });
62900
+ const merged = {
62901
+ ...configExtraParams,
62902
+ ...params.streamParams
62903
+ };
62904
+ const anthropicBetas = resolveAnthropicBetas(merged, params.provider, params.modelId);
62905
+ if (anthropicBetas?.length) activeSession.agent.streamFn = createAnthropicBetaHeadersWrapper(activeSession.agent.streamFn, anthropicBetas);
62906
+ if (params.provider === "zai" || params.provider === "z-ai") {
62907
+ if (merged?.tool_stream !== false) activeSession.agent.streamFn = createZaiToolStreamWrapper(activeSession.agent.streamFn, true);
62908
+ }
62909
+ activeSession.agent.streamFn = createOpenAIResponsesStoreWrapper(activeSession.agent.streamFn);
62910
+ }
62893
62911
  if (cacheTrace) {
62894
62912
  cacheTrace.recordStage("session:loaded", {
62895
62913
  messages: activeSession.messages,
@@ -63007,6 +63025,7 @@ async function runEmbeddedAttempt(params) {
63007
63025
  return fn(...args);
63008
63026
  });
63009
63027
  };
63028
+ const streamMonitor = createStreamMonitor(modelProfile);
63010
63029
  const subscription = subscribeEmbeddedPiSession({
63011
63030
  session: activeSession,
63012
63031
  runId: params.runId,
@@ -63028,6 +63047,14 @@ async function runEmbeddedAttempt(params) {
63028
63047
  onAgentEvent: (evt) => {
63029
63048
  armSymipulseTimer();
63030
63049
  params.onAgentEvent?.(evt);
63050
+ if (evt.stream === "assistant" && typeof evt.data?.text === "string" && !aborted) {
63051
+ streamMonitor.onChunk(evt.data.text);
63052
+ if (streamMonitor.shouldStop()) {
63053
+ const reason = streamMonitor.getStopReason();
63054
+ log$2.warn(`stream monitor triggered abort: runId=${params.runId} reason=${reason}`);
63055
+ abortRun(false, /* @__PURE__ */ new Error(`stream-monitor:${reason}`));
63056
+ }
63057
+ }
63031
63058
  },
63032
63059
  enforceFinalTag: params.enforceFinalTag,
63033
63060
  config: params.config,
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { n as resolveAgentConfig } from "./agent-scope-BxoUQqgM.js";
2
+ import { n as resolveAgentConfig } from "./agent-scope-Bw1Ed8W9.js";
3
3
 
4
4
  //#region src/agents/identity.ts
5
5
  const DEFAULT_ACK_REACTION = "👀";
@@ -1,10 +1,10 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
2
  import { d as sanitizeAgentId, f as DEFAULT_ACCOUNT_ID, i as buildAgentPeerSessionKey, n as DEFAULT_MAIN_KEY, p as normalizeAccountId, r as buildAgentMainSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID } from "./session-key-BCzIW1Y2.js";
3
- import { Z as shouldLogVerbose } from "./registry-CK4e9hn8.js";
4
- import { c as resolveDefaultAgentId } from "./agent-scope-BxoUQqgM.js";
5
- import { y as logDebug } from "./workspace-wAaHI8-5.js";
3
+ import { Z as shouldLogVerbose } from "./registry-DP24za6g.js";
4
+ import { c as resolveDefaultAgentId } from "./agent-scope-Bw1Ed8W9.js";
5
+ import { y as logDebug } from "./workspace-CbvamIU6.js";
6
6
  import { t as normalizeChatType } from "./chat-type-C_KiWNAH.js";
7
- import { t as listBindings } from "./bindings-B7Ke6LJi.js";
7
+ import { t as listBindings } from "./bindings-BU2hsBd9.js";
8
8
 
9
9
  //#region src/routing/resolve-route.ts
10
10
  var resolve_route_exports = /* @__PURE__ */ __exportAll({
@@ -1,4 +1,4 @@
1
- import { B as sleep } from "./registry-CK4e9hn8.js";
1
+ import { B as sleep } from "./registry-DP24za6g.js";
2
2
 
3
3
  //#region src/infra/retry.ts
4
4
  const DEFAULT_RETRY_CONFIG = {
@@ -13,7 +13,7 @@ import "./client-DMBZpU6X.js";
13
13
  import "./call-BcE47FtD.js";
14
14
  import "./message-channel-C9dERklz.js";
15
15
  import "./pairing-token-Byh6drgn.js";
16
- import "./subagent-registry-CyW0EDWw.js";
16
+ import "./subagent-registry-Jwg44JMf.js";
17
17
  import "./sessions-CJXnZVjR.js";
18
18
  import "./tokens-Csntmwwn.js";
19
19
  import "./plugins-CwSlLxM8.js";
@@ -101,9 +101,9 @@ import { t as ensureSymiCliOnPath } from "./path-env-Bic_wXs9.js";
101
101
  import "./catalog-DLQFKucJ.js";
102
102
  import "./note-DDecZomM.js";
103
103
  import "./plugin-auto-enable-D6ENR3Xg.js";
104
- import { t as ensurePluginRegistryLoaded } from "./plugin-registry-B7AdPXfF.js";
104
+ import { t as ensurePluginRegistryLoaded } from "./plugin-registry-D_BAH1V5.js";
105
105
  import { t as assertSupportedRuntime } from "./runtime-guard-D7waq_Ho.js";
106
- import { t as emitCliBanner } from "./banner-ChYzCy5p.js";
106
+ import { t as emitCliBanner } from "./banner-DRJJmkv1.js";
107
107
  import "./doctor-config-flow-CA3eiKhd.js";
108
108
  import { n as ensureConfigReady } from "./config-guard-CPHvOzsC.js";
109
109
  import process$1 from "node:process";
@@ -118,7 +118,7 @@ const routeHealth = {
118
118
  const verbose = getVerboseFlag(argv, { includeDebug: true });
119
119
  const timeoutMs = getPositiveIntFlagValue(argv, "--timeout");
120
120
  if (timeoutMs === null) return false;
121
- const { healthCommand } = await import("./health-BSOMI4B6.js").then((n) => n.i);
121
+ const { healthCommand } = await import("./health-BmaWws9G.js").then((n) => n.i);
122
122
  await healthCommand({
123
123
  json,
124
124
  timeoutMs,
@@ -138,7 +138,7 @@ const routeStatus = {
138
138
  const verbose = getVerboseFlag(argv, { includeDebug: true });
139
139
  const timeoutMs = getPositiveIntFlagValue(argv, "--timeout");
140
140
  if (timeoutMs === null) return false;
141
- const { statusCommand } = await import("./status-4DaGE8j5.js").then((n) => n.t);
141
+ const { statusCommand } = await import("./status-CnogoaI_.js").then((n) => n.t);
142
142
  await statusCommand({
143
143
  json,
144
144
  deep,
@@ -172,7 +172,7 @@ const routeAgentsList = {
172
172
  run: async (argv) => {
173
173
  const json = hasFlag(argv, "--json");
174
174
  const bindings = hasFlag(argv, "--bindings");
175
- const { agentsListCommand } = await import("./agents-E_Ere0qU.js").then((n) => n.t);
175
+ const { agentsListCommand } = await import("./agents-BrpbYYTb.js").then((n) => n.t);
176
176
  await agentsListCommand({
177
177
  json,
178
178
  bindings
@@ -243,7 +243,7 @@ const routes = [
243
243
  const pathArg = getCommandPositionals(argv)[2];
244
244
  if (!pathArg) return false;
245
245
  const json = hasFlag(argv, "--json");
246
- const { runConfigGet } = await import("./config-cli-BcuAsDOu.js");
246
+ const { runConfigGet } = await import("./config-cli-C_GarUko.js");
247
247
  await runConfigGet({
248
248
  path: pathArg,
249
249
  json
@@ -256,7 +256,7 @@ const routes = [
256
256
  run: async (argv) => {
257
257
  const pathArg = getCommandPositionals(argv)[2];
258
258
  if (!pathArg) return false;
259
- const { runConfigUnset } = await import("./config-cli-BcuAsDOu.js");
259
+ const { runConfigUnset } = await import("./config-cli-C_GarUko.js");
260
260
  await runConfigUnset({ path: pathArg });
261
261
  return true;
262
262
  }
@@ -270,7 +270,7 @@ const routes = [
270
270
  const local = hasFlag(argv, "--local");
271
271
  const json = hasFlag(argv, "--json");
272
272
  const plain = hasFlag(argv, "--plain");
273
- const { modelsListCommand } = await import("./models-DqE1s0YL.js").then((n) => n.t);
273
+ const { modelsListCommand } = await import("./models-COaQWNz5.js").then((n) => n.t);
274
274
  await modelsListCommand({
275
275
  all,
276
276
  local,
@@ -301,7 +301,7 @@ const routes = [
301
301
  const plain = hasFlag(argv, "--plain");
302
302
  const check = hasFlag(argv, "--check");
303
303
  const probe = hasFlag(argv, "--probe");
304
- const { modelsStatusCommand } = await import("./models-DqE1s0YL.js").then((n) => n.t);
304
+ const { modelsStatusCommand } = await import("./models-COaQWNz5.js").then((n) => n.t);
305
305
  await modelsStatusCommand({
306
306
  json,
307
307
  plain,
@@ -379,7 +379,7 @@ async function runCli(argv = process$1.argv) {
379
379
  assertSupportedRuntime();
380
380
  if (await tryRouteCli(normalizedArgv)) return;
381
381
  enableConsoleCapture();
382
- const { buildProgram } = await import("./program-DBtlRiFS.js");
382
+ const { buildProgram } = await import("./program-CutjuJj0.js");
383
383
  const program = buildProgram();
384
384
  installUnhandledRejectionHandler();
385
385
  process$1.on("uncaughtException", (error) => {
@@ -411,10 +411,10 @@ async function runCli(argv = process$1.argv) {
411
411
  const { getProgramContext } = await import("./program-context-CqzR_m-7.js").then((n) => n.n);
412
412
  const ctx = getProgramContext(program);
413
413
  if (ctx) {
414
- const { registerCoreCliByName } = await import("./command-registry-Cvr_dlLY.js").then((n) => n.t);
414
+ const { registerCoreCliByName } = await import("./command-registry-DXt0PsFy.js").then((n) => n.t);
415
415
  await registerCoreCliByName(program, ctx, primary, parseArgv);
416
416
  }
417
- const { registerSubCliByName } = await import("./register.subclis-DJf3ihsW.js").then((n) => n.a);
417
+ const { registerSubCliByName } = await import("./register.subclis-CrTXa8cj.js").then((n) => n.a);
418
418
  await registerSubCliByName(program, primary);
419
419
  }
420
420
  const hasBuiltinPrimary = primary !== null && program.commands.some((command) => command.name() === primary);
@@ -423,7 +423,7 @@ async function runCli(argv = process$1.argv) {
423
423
  primary,
424
424
  hasBuiltinPrimary
425
425
  })) {
426
- const { registerPluginCliCommands } = await import("./cli-Gcuf3NTF.js");
426
+ const { registerPluginCliCommands } = await import("./cli-Ds6poYQ6.js");
427
427
  const { loadConfig } = await import("./config-DHBLS1Hl.js").then((n) => n.t);
428
428
  registerPluginCliCommands(program, loadConfig());
429
429
  }
@@ -1,13 +1,13 @@
1
- import { J as logVerbose, Z as shouldLogVerbose } from "./registry-CK4e9hn8.js";
2
- import { _ as runExec } from "./workspace-wAaHI8-5.js";
1
+ import { J as logVerbose, Z as shouldLogVerbose } from "./registry-DP24za6g.js";
2
+ import { _ as runExec } from "./workspace-CbvamIU6.js";
3
3
  import { t as normalizeChatType } from "./chat-type-C_KiWNAH.js";
4
- import { _ as kindFromMime, d as detectMime, h as isAudioFileName, p as getFileExtension } from "./image-ops-CvJzsyvE.js";
5
- import { A as normalizeProviderId, L as normalizeGoogleModelId, i as resolveApiKeyForProvider, r as requireApiKey, y as resolveSymiAgentDir } from "./model-auth-DK43VicI.js";
6
- import { d as DEFAULT_IMESSAGE_ATTACHMENT_ROOTS, f as isInboundPathAllowed, m as resolveIMessageAttachmentRoots, n as loadConfig, p as mergeInboundPathRoots } from "./config-DRbjHIwD.js";
7
- import { S as ensureSymiModelsJson, t as describeImageWithModel } from "./image-B0wGflxA.js";
8
- import { n as collectProviderApiKeysForExecution, r as executeWithApiKeyRotation, t as parseGeminiAuth } from "./gemini-auth-CdSPHuLl.js";
4
+ import { _ as kindFromMime, d as detectMime, h as isAudioFileName, p as getFileExtension } from "./image-ops-S8-8dAhx.js";
5
+ import { A as normalizeProviderId, L as normalizeGoogleModelId, i as resolveApiKeyForProvider, r as requireApiKey, y as resolveSymiAgentDir } from "./model-auth-CwOuTuXl.js";
6
+ import { d as DEFAULT_IMESSAGE_ATTACHMENT_ROOTS, f as isInboundPathAllowed, m as resolveIMessageAttachmentRoots, n as loadConfig, p as mergeInboundPathRoots } from "./config-eEaJddXj.js";
7
+ import { S as ensureSymiModelsJson, t as describeImageWithModel } from "./image-BGmVDkkw.js";
8
+ import { n as collectProviderApiKeysForExecution, r as executeWithApiKeyRotation, t as parseGeminiAuth } from "./gemini-auth-CF48hUR9.js";
9
9
  import { n as fetchWithTimeout } from "./fetch-timeout-DL3f_O53.js";
10
- import { i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, r as MediaFetchError } from "./local-roots-DMwIh5cS.js";
10
+ import { i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, r as MediaFetchError } from "./local-roots-C7OCYACU.js";
11
11
  import fs from "node:fs/promises";
12
12
  import os from "node:os";
13
13
  import path from "node:path";
@@ -882,7 +882,7 @@ async function loadModelCatalog(params) {
882
882
  });
883
883
  try {
884
884
  await ensureSymiModelsJson(params?.config ?? loadConfig());
885
- await (await import("./pi-auth-json-0SYBFZTt.js")).ensurePiAuthJsonFromAuthProfiles(resolveSymiAgentDir());
885
+ await (await import("./pi-auth-json-DPWPoruO.js")).ensurePiAuthJsonFromAuthProfiles(resolveSymiAgentDir());
886
886
  const piSdk = await importPiSdk();
887
887
  const agentDir = resolveSymiAgentDir();
888
888
  const { join } = await import("node:path");
@@ -1,11 +1,11 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { J as logVerbose } from "./registry-CK4e9hn8.js";
3
- import { d as resolveSlackAccount, m as resolveSlackBotToken } from "./plugins-DQYI3Fr-.js";
2
+ import { J as logVerbose } from "./registry-DP24za6g.js";
3
+ import { d as resolveSlackAccount, m as resolveSlackBotToken } from "./plugins-C4C9637U.js";
4
4
  import { a as requireTargetKind, i as parseTargetPrefixes, n as ensureTargetId, r as parseTargetMention, t as buildMessagingTarget } from "./targets-CFovdgJI.js";
5
- import { n as loadConfig } from "./config-DRbjHIwD.js";
6
- import { c as resolveChunkMode, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit } from "./chunk-BW5f05BR.js";
7
- import { n as resolveMarkdownTableMode } from "./markdown-tables-iMQQZu4Q.js";
8
- import { a as loadWebMedia, n as markdownToIR, t as chunkMarkdownIR } from "./ir-DccrnjsE.js";
5
+ import { n as loadConfig } from "./config-eEaJddXj.js";
6
+ import { c as resolveChunkMode, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit } from "./chunk-ClbN9Pqy.js";
7
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-DSHvnTLx.js";
8
+ import { a as loadWebMedia, n as markdownToIR, t as chunkMarkdownIR } from "./ir-CbFUkv_T.js";
9
9
  import { t as renderMarkdownWithMarkers } from "./render-CDCvpfhh.js";
10
10
  import { WebClient } from "@slack/web-api";
11
11
 
@@ -1,11 +1,11 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { I as resolveUserPath, M as normalizeE164 } from "./registry-CK4e9hn8.js";
3
- import { x as mediaKindFromMime } from "./image-ops-CvJzsyvE.js";
4
- import { n as loadConfig } from "./config-DRbjHIwD.js";
5
- import { t as resolveIMessageAccount } from "./accounts-qtxJ-6em.js";
6
- import { n as resolveMarkdownTableMode } from "./markdown-tables-iMQQZu4Q.js";
7
- import { t as convertMarkdownTables } from "./tables-DuZspiBu.js";
8
- import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-DjNDa3zn.js";
2
+ import { I as resolveUserPath, M as normalizeE164 } from "./registry-DP24za6g.js";
3
+ import { x as mediaKindFromMime } from "./image-ops-S8-8dAhx.js";
4
+ import { n as loadConfig } from "./config-eEaJddXj.js";
5
+ import { t as resolveIMessageAccount } from "./accounts-CJR8j_Kq.js";
6
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-DSHvnTLx.js";
7
+ import { t as convertMarkdownTables } from "./tables-BIWsCKXJ.js";
8
+ import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-Co2diKdP.js";
9
9
  import { spawn } from "node:child_process";
10
10
  import { createInterface } from "node:readline";
11
11