@fased/fased 0.1.67 → 0.1.69

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 (187) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +20 -22
  3. package/config/sat-runtime.env +6 -2
  4. package/config/signer-protocol-v2.json +10 -0
  5. package/dist/agents/tools/wallet-action-tool.js +2 -0
  6. package/dist/agents/tools/wallet-tool.js +5 -3
  7. package/dist/brand.js +1 -1
  8. package/dist/build-info.json +3 -3
  9. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  10. package/dist/cli/program/register.wallet.js +119 -5
  11. package/dist/commands/wallet.js +1286 -74
  12. package/dist/config/sat-runtime-ids.js +6 -1
  13. package/dist/control-ui/assets/{app-De8gTtZU.js → app-BLFLoFPk.js} +1526 -1526
  14. package/dist/control-ui/assets/{federation-DgA9e-Pn.js → federation-SGMAnM_8.js} +2 -2
  15. package/dist/control-ui/assets/{index-DYYBRBOS.js → index-S88kp5ZQ.js} +3 -3
  16. package/dist/control-ui/assets/{mining-Dg-3ll0F.js → mining-ClI8RW4u.js} +2 -2
  17. package/dist/control-ui/assets/{wallet-DvStR_AT.js → wallet-CRIhDQbW.js} +325 -156
  18. package/dist/control-ui/index.html +1 -1
  19. package/dist/control-ui/version.json +1 -1
  20. package/dist/gateway/server-http.js +394 -55
  21. package/dist/mining/mainnet-sync.js +67 -5
  22. package/dist/operator/operator-readiness.js +1 -1
  23. package/dist/plugin-sdk/{actions-DRu135h0.js → actions-B-Vwj64K.js} +3 -3
  24. package/dist/plugin-sdk/{allow-list-DyAxs4yw.js → allow-list-Bf45HfoP.js} +1 -1
  25. package/dist/plugin-sdk/{audio-preflight-Dq_rJtqH.js → audio-preflight-CS7Q_7-R.js} +26 -25
  26. package/dist/plugin-sdk/{audit-C5d2z5U1.js → audit-CUULWG22.js} +1 -1
  27. package/dist/plugin-sdk/{channel-access-configure-DaI5wevh.js → channel-access-configure-BoUsC-Ys.js} +1 -1
  28. package/dist/plugin-sdk/{channel-adapters.discord-BS4S4Svh.js → channel-adapters.discord-DSiR4X2Y.js} +1 -1
  29. package/dist/plugin-sdk/channel-plugin-common.d.ts +2 -2
  30. package/dist/plugin-sdk/channel-plugin-common.js +1 -1
  31. package/dist/plugin-sdk/{chunk-CyoyqpbG.js → chunk-CBpl-AiQ.js} +1 -1
  32. package/dist/plugin-sdk/{chunk-items-Dunoq4Er.js → chunk-items-BLBZNORg.js} +1 -1
  33. package/dist/plugin-sdk/command-status.js +26 -25
  34. package/dist/plugin-sdk/{commands-registry-BfqdEWdF.js → commands-registry-G5KXSi_y.js} +1 -1
  35. package/dist/plugin-sdk/{config-schema--vl89M7d.js → config-schema-BiBOUW89.js} +431 -125
  36. package/dist/plugin-sdk/device-pair.d.ts +1 -1
  37. package/dist/plugin-sdk/{diagnostic-DLL_zekv.js → diagnostic-sYs6Agr-.js} +1 -1
  38. package/dist/plugin-sdk/{directory-live-CSuYxdwk.js → directory-live-BXMpuYAF.js} +1 -1
  39. package/dist/plugin-sdk/{directory-live-Dw7ZgC9_.js → directory-live-Rn1BzPof.js} +1 -1
  40. package/dist/plugin-sdk/discord.d.ts +4 -4
  41. package/dist/plugin-sdk/discord.js +20 -20
  42. package/dist/plugin-sdk/{draft-stream-controls-BqchW1vi.js → draft-stream-controls-CMNdKSx-.js} +1 -1
  43. package/dist/plugin-sdk/{guilds-CDhRIX57.js → guilds-Dkwl0yHv.js} +1 -1
  44. package/dist/plugin-sdk/{handle-action-hvwapMKg.js → handle-action-CRdM6B-8.js} +15 -15
  45. package/dist/plugin-sdk/index.d.ts +15 -15
  46. package/dist/plugin-sdk/index.js +28 -27
  47. package/dist/plugin-sdk/{login-Ca583Okc.js → login-D7WnK8-P.js} +1 -1
  48. package/dist/plugin-sdk/{login-qr-CGciBSNP.js → login-qr-CRueOKZK.js} +2 -114
  49. package/dist/plugin-sdk/{markdown-tables-DCOXEUfZ.js → markdown-tables-d7GlUs5R.js} +1 -1
  50. package/dist/plugin-sdk/{media-CAdQF5TG.js → media-BAoaxCrt.js} +1 -1
  51. package/dist/plugin-sdk/{monitor-DrTy_4CL.js → monitor-WXdn4mR-.js} +34 -33
  52. package/dist/plugin-sdk/{monitor-CV1sr0p2.js → monitor-xzVAPbg2.js} +44 -43
  53. package/dist/plugin-sdk/{openresponses-http-BAjgURZa.js → openresponses-http-DnI1LFgq.js} +26 -25
  54. package/dist/plugin-sdk/{outbound-attachment-QqTnIhZL.js → outbound-attachment-CyXM3cAv.js} +1 -1
  55. package/dist/plugin-sdk/{outbound-BgVDdHxx.js → outbound-zB6llMGW.js} +6 -6
  56. package/dist/plugin-sdk/{pairing-message-BjIJYVvp.d.ts → pairing-message-CiTcdD6m.d.ts} +1 -1
  57. package/dist/plugin-sdk/{pairing-store-BChahgI2.js → pairing-store-B6J2C0vP.js} +1 -1
  58. package/dist/plugin-sdk/{pi-model-discovery-runtime-DxTMz_XF.js → pi-model-discovery-runtime-6JzLw9Gk.js} +1 -1
  59. package/dist/plugin-sdk/{probe-CJb5uR8B.js → probe-BM7Oe40M.js} +2 -2
  60. package/dist/plugin-sdk/{probe-l_whvGLY.js → probe-CMPksimh.js} +1 -1
  61. package/dist/plugin-sdk/{probe-BFroeK3g.js → probe-oVp12D6L.js} +1 -1
  62. package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +1 -1
  63. package/dist/plugin-sdk/{pw-ai-DlxqX6Es.js → pw-ai-DZYLDC-S.js} +1 -1
  64. package/dist/plugin-sdk/qr-image-B4MlMG4N.js +115 -0
  65. package/dist/plugin-sdk/{replies-ChYo5ZQM.js → replies-CY-V0Zob.js} +3 -3
  66. package/dist/plugin-sdk/{resolve-channels-87LZrFk_.js → resolve-channels-1HtDcMqh.js} +2 -2
  67. package/dist/plugin-sdk/{resolve-channels-_-nV-EK2.js → resolve-channels-CU72Qh2j.js} +1 -1
  68. package/dist/plugin-sdk/{resolve-outbound-target-D-KGgHJZ.js → resolve-outbound-target-nQSBVYz9.js} +2 -2
  69. package/dist/plugin-sdk/{resolve-route-C8tvQm8Z.js → resolve-route-Dufnu2cT.js} +1 -1
  70. package/dist/plugin-sdk/{resolve-users-DN9VQBwv.js → resolve-users-Bk_ss2vC.js} +1 -1
  71. package/dist/plugin-sdk/{resolve-users-V6dHh_2B.js → resolve-users-IevCOk4W.js} +2 -2
  72. package/dist/plugin-sdk/{runtime-2B9_WKoI.js → runtime-CXSQwMaR.js} +1 -1
  73. package/dist/plugin-sdk/{runtime-dependency-nup8niQL.js → runtime-dependency-DczkvPxn.js} +9 -9
  74. package/dist/plugin-sdk/sat-runtime.d.ts +105 -10
  75. package/dist/plugin-sdk/sat-runtime.js +26 -25
  76. package/dist/plugin-sdk/{send-DCO441U7.js → send-BXBS_mRK.js} +8 -8
  77. package/dist/plugin-sdk/{send-CFzGKJXo.js → send-D-HfKQZm.js} +4 -4
  78. package/dist/plugin-sdk/{send-B6KkGKZD.js → send-D1j12ZgX.js} +5 -5
  79. package/dist/plugin-sdk/{send-q9HXrSwK.js → send-DWKm6yay.js} +10 -10
  80. package/dist/plugin-sdk/{send-gDoGA-7e.js → send-Di1Jit3L.js} +7 -7
  81. package/dist/plugin-sdk/{skill-commands-FKEPLS7T.js → skill-commands-iJtvpqgb.js} +2 -2
  82. package/dist/plugin-sdk/{slack-DSC6T2KW.js → slack-CkIRVDUK.js} +45 -44
  83. package/dist/plugin-sdk/{slack-actions-DhbMcp8M.js → slack-actions-BzUEszJa.js} +10 -10
  84. package/dist/plugin-sdk/slack.d.ts +4 -4
  85. package/dist/plugin-sdk/slack.js +6 -6
  86. package/dist/plugin-sdk/{sticker-cache-C0l_5IKg.js → sticker-cache-Dpap5ce_.js} +2 -2
  87. package/dist/plugin-sdk/{tables-B3jr0Pvq.js → tables-_1W36GII.js} +2 -2
  88. package/dist/plugin-sdk/{targets-CtSbTxYX.js → targets-DDbNnLnB.js} +2 -2
  89. package/dist/plugin-sdk/{telegram-actions-BwGBIVDE.js → telegram-actions-Cewdga8H.js} +30 -29
  90. package/dist/plugin-sdk/telegram.d.ts +4 -4
  91. package/dist/plugin-sdk/telegram.js +3 -3
  92. package/dist/plugin-sdk/{thread-bindings.lifecycle-QbkNl-m6.js → thread-bindings.lifecycle-Y9T3CQGf.js} +3 -3
  93. package/dist/plugin-sdk/{thread-bindings.state-D9hg_M1c.js → thread-bindings.state-D2oOWDpv.js} +1 -1
  94. package/dist/plugin-sdk/{tmp-fased-dir-DXnGKKgi.d.ts → tmp-fased-dir-BSEHc8MQ.d.ts} +8 -2
  95. package/dist/plugin-sdk/{types-eG9aYqXF.d.ts → types-BakzIzGN.d.ts} +1 -1
  96. package/dist/plugin-sdk/{types-Cegc86EP.d.ts → types-CzF0YQqK.d.ts} +3 -3
  97. package/dist/plugin-sdk/{web-C_AH5PyB.js → web-DGWi7i3B.js} +33 -32
  98. package/dist/plugin-sdk/{whatsapp-actions-Bj_rOncr.js → whatsapp-actions-Blu9-eX-.js} +9 -9
  99. package/dist/plugin-sdk/{whatsapp-heartbeat-B1WHkJIg.js → whatsapp-heartbeat-DjmQM7hq.js} +2 -2
  100. package/dist/plugin-sdk/whatsapp.d.ts +9 -9
  101. package/dist/plugin-sdk/whatsapp.js +7 -7
  102. package/dist/plugin-sdk/{wsl-J-HscWxS.js → wsl-CTvIWvZz.js} +1 -1
  103. package/dist/plugin-sdk/{zod-schema.providers-core-FaYR6KdD.d.ts → zod-schema.providers-core-CIzCjXH9.d.ts} +61 -61
  104. package/dist/wallet/local-socket-signer-lifecycle.js +107 -3
  105. package/dist/wallet/local-socket-signer-protocol.js +97 -10
  106. package/dist/wallet/mining-wallet-retirement.js +256 -0
  107. package/dist/wallet/providers/local-socket-signer-adapter.js +10 -0
  108. package/dist/wallet/signer-network-admin.js +11 -118
  109. package/dist/wallet/signer-protocol-v2.generated.js +10 -0
  110. package/dist/wallet/solana-assets.js +9 -3
  111. package/dist/wallet/solana-rpc-read-fetch.js +65 -0
  112. package/dist/wallet/wallet-agent-selection.js +6 -10
  113. package/dist/wallet/wallet-provider-registry.js +70 -29
  114. package/dist/wallet/wallet-send-approvals.js +6 -2
  115. package/dist/wallet/wallet-status.js +63 -1
  116. package/dist/web/login-qr.js +1 -1
  117. package/dist/wizard/onboarding.js +86 -84
  118. package/dist/wizard/onboarding.wallet.js +10 -1
  119. package/extensions/acpx/package.json +1 -1
  120. package/extensions/bluebubbles/package.json +1 -1
  121. package/extensions/copilot-proxy/package.json +1 -1
  122. package/extensions/diagnostics-otel/package.json +1 -1
  123. package/extensions/fased-federation/package.json +1 -1
  124. package/extensions/google-gemini-cli-auth/package.json +1 -1
  125. package/extensions/imessage/package.json +1 -1
  126. package/extensions/irc/package.json +1 -1
  127. package/extensions/line/package.json +1 -1
  128. package/extensions/llm-task/package.json +1 -1
  129. package/extensions/lobster/package.json +1 -1
  130. package/extensions/matrix/CHANGELOG.md +12 -0
  131. package/extensions/matrix/package.json +1 -1
  132. package/extensions/mattermost/package.json +1 -1
  133. package/extensions/memory-core/package.json +2 -2
  134. package/extensions/memory-lancedb/package.json +1 -1
  135. package/extensions/minimax-portal-auth/package.json +1 -1
  136. package/extensions/msteams/CHANGELOG.md +12 -0
  137. package/extensions/msteams/package.json +1 -1
  138. package/extensions/nextcloud-talk/package.json +1 -1
  139. package/extensions/nostr/CHANGELOG.md +12 -0
  140. package/extensions/nostr/package.json +1 -1
  141. package/extensions/open-prose/package.json +1 -1
  142. package/extensions/sat-mining/package.json +1 -1
  143. package/extensions/signal/package.json +1 -1
  144. package/extensions/synology-chat/package.json +1 -1
  145. package/extensions/tlon/package.json +1 -1
  146. package/extensions/twitch/CHANGELOG.md +12 -0
  147. package/extensions/twitch/package.json +1 -1
  148. package/extensions/voice-call/CHANGELOG.md +12 -0
  149. package/extensions/voice-call/package.json +1 -1
  150. package/extensions/zalo/CHANGELOG.md +12 -0
  151. package/extensions/zalo/package.json +1 -1
  152. package/extensions/zalouser/CHANGELOG.md +12 -0
  153. package/extensions/zalouser/package.json +1 -1
  154. package/install.sh +286 -107
  155. package/package.json +4 -2
  156. package/scripts/fased-managed-updater.mjs +10 -2
  157. package/scripts/install-fased-signerd.sh +4 -8
  158. package/scripts/install-managed-runtime.mjs +10 -7
  159. package/scripts/install-runtime-profile.sh +27 -0
  160. package/scripts/start-managed.sh +13 -1
  161. /package/dist/plugin-sdk/{active-listener-B_NMtgPL.js → active-listener-p9Ooc1qj.js} +0 -0
  162. /package/dist/plugin-sdk/{blocks-input-Bg-8S2pl.js → blocks-input-DiZaqaN7.js} +0 -0
  163. /package/dist/plugin-sdk/{channel-access-CcFRdRPO.js → channel-access-B0aZBSd2.js} +0 -0
  164. /package/dist/plugin-sdk/{channel-activity-DBDMQ3yI.js → channel-activity-F07DjroV.js} +0 -0
  165. /package/dist/plugin-sdk/{channel-core-CFRs8LPy.js → channel-core-DoF4X04L.js} +0 -0
  166. /package/dist/plugin-sdk/{client-pI228AVT.js → client-DLY-kWF_.js} +0 -0
  167. /package/dist/plugin-sdk/{command-poll-backoff-yJU83wEq.js → command-poll-backoff-NAePk3eL.js} +0 -0
  168. /package/dist/plugin-sdk/{date-time-uUevHscU.js → date-time-ChY_tHoG.js} +0 -0
  169. /package/dist/plugin-sdk/{draft-stream-loop-CrOPfV3F.js → draft-stream-loop-DMBwjjd1.js} +0 -0
  170. /package/dist/plugin-sdk/{fetch-BtmoPIlf.js → fetch-B0v6OTUZ.js} +0 -0
  171. /package/dist/plugin-sdk/{filesystem-manager-DoI8IBNF.js → filesystem-manager-BzuIJ9K9.js} +0 -0
  172. /package/dist/plugin-sdk/{gateway-registry-DZDsqicG.js → gateway-registry-Bgl2GFgy.js} +0 -0
  173. /package/dist/plugin-sdk/{inbound-context-DrAcXE0y.js → inbound-context-CQnfFFQ9.js} +0 -0
  174. /package/dist/plugin-sdk/{pi-model-discovery-BX_JLcEJ.js → pi-model-discovery-BHNVyRny.js} +0 -0
  175. /package/dist/plugin-sdk/{polls-DKQXVfJp.js → polls-DXd67TD8.js} +0 -0
  176. /package/dist/plugin-sdk/{proxy-DWpYcsvR.js → proxy-CLRUdShp.js} +0 -0
  177. /package/dist/plugin-sdk/{qmd-manager-CgRaTxUq.js → qmd-manager-B8Vnu0ND.js} +0 -0
  178. /package/dist/plugin-sdk/{render-e7fENCYH.js → render-DrBfVs0u.js} +0 -0
  179. /package/dist/plugin-sdk/{reply-reference-Bqk-7HXE.js → reply-reference-BnAk5Wjb.js} +0 -0
  180. /package/dist/plugin-sdk/{retry-policy-C6SjKjQA.js → retry-policy-CXh1owkc.js} +0 -0
  181. /package/dist/plugin-sdk/{sandbox-paths-Dx2lUqCu.js → sandbox-paths-Bzh1CuZc.js} +0 -0
  182. /package/dist/plugin-sdk/{session-DHD4ZKyG.js → session-iuGR_rdi.js} +0 -0
  183. /package/dist/plugin-sdk/{shared-CBgp_GBw.js → shared-D1AD2Ejn.js} +0 -0
  184. /package/dist/plugin-sdk/{target-errors-Ckufe179.js → target-errors-DfS1sLR9.js} +0 -0
  185. /package/dist/plugin-sdk/{tool-loop-detection-Bp8bPJLs.js → tool-loop-detection-sDZl27w7.js} +0 -0
  186. /package/dist/plugin-sdk/{ui-Be8cLHIS.js → ui-GQDYm_jw.js} +0 -0
  187. /package/dist/plugin-sdk/{with-timeout-ckWB8rTo.js → with-timeout-CVV8tytk.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { $ as mergeSessionEntry, A as deliveryContextKey, An as GATEWAY_CLIENT_IDS, B as INPUT_PROVENANCE_KIND_VALUES, Bn as CLI_DEFAULT_OPERATOR_SCOPES, C as recordSessionMetaFromInbound, Cn as isGatewayMessageChannel, D as isCacheEnabled, Dn as normalizeMessageChannel, Dt as getChannelDock, E as updateSessionStoreEntry, En as listDeliverableMessageChannels, F as archiveSessionTranscripts, Fn as normalizeAnyChannelId, Ft as trimMessagingTarget, G as resolveSessionLockMaxHoldFromTimeout, Gn as getPluginCommandSpecs, H as hasInterSessionUserProvenance, Hn as resolveLeastPrivilegeOperatorScopesForMethod, I as capArrayByJsonBytes, In as normalizeChannelId$2, It as isWhatsAppGroupJid, J as resolveChannelResetConfig, Jn as createInternalHookEvent, K as resolveSessionKey$1, Kn as listPluginCommands, L as countToolResults, Ln as logMutatingAdminRpcAudit, Lt as normalizeWhatsAppTarget, M as normalizeDeliveryContext, Mn as GATEWAY_CLIENT_NAMES, N as normalizeSessionDeliveryFields, Nn as getChatChannelMeta, O as resolveCacheTtlMs$1, On as resolveGatewayMessageChannel, Ot as listChannelDocks, P as normalizeAccountId$1, Pn as listChatChannels, Pt as looksLikeHandleOrPhoneTarget, Q as DEFAULT_RESET_TRIGGERS, R as extractToolCallNames, Rn as consumeMutatingAdminRpcBudget, S as readSessionUpdatedAt, Sn as isDeliverableMessageChannel, T as updateSessionStore, Tn as isMarkdownCapableMessageChannel, U as normalizeInputProvenance, Un as clearPluginCommands, V as applyInputProvenanceToUserMessage, Vn as authorizeOperatorScopesForMethod, W as acquireSessionWriteLock, Wn as executePluginCommand, X as resolveSessionResetType, Xn as normalizePluginHttpPath, Y as resolveSessionResetPolicy, Yn as triggerInternalHook, Z as resolveThreadFlag, _ as appendAssistantMessageToSessionTranscript, _n as resolveChannelGroupRequireMention, a as createPluginRegistry, an as resolveTelegramToken, at as resolveMainSessionKey, b as resolveAndPersistSessionFile, bn as resolveGroupSessionKey, bt as parseSlackTarget, c as listAgentsForGateway, ct as listChannelPlugins, d as lookupContextTokens, dn as resolveDefaultSignalAccountId, en as createTelegramActionGate, et as resolveFreshSessionTotalTokens, f as resolveContextTokensForModel, fn as resolveSignalAccount, g as parseSessionThreadInfo, gn as resolveChannelGroupPolicy, h as extractDeliveryInfo, hn as resolveIMessageAccount, i as setActivePluginRegistry, in as resolveTelegramAccount, it as resolveExplicitAgentSessionKey, j as mergeDeliveryContext, jn as GATEWAY_CLIENT_MODES, k as deliveryContextFromSession, kn as resolveMessageChannel, l as loadCombinedSessionStoreForGateway, ln as listEnabledSignalAccounts, lt as normalizeChannelId$1, mn as resolveDefaultIMessageAccountId, n as getActivePluginRegistryKey, nn as listTelegramAccountIds, nt as canonicalizeMainSessionAlias, o as createRuntimeHelpers, on as buildChannelAccountBindings, ot as deriveSessionMetaPatch, p as ensureFasedAgentModelsJson, pn as listIMessageAccountIds, q as evaluateSessionFreshness, qn as matchPluginCommand, r as requireActivePluginRegistry, rt as resolveAgentMainSessionKey, s as classifySessionKey, st as getChannelPlugin, t as getActivePluginRegistry, tn as listEnabledTelegramAccounts, tt as setSessionRuntimeModel, u as resolveSessionModelRef, un as listSignalAccountIds, v as resolveMirroredTranscriptText, vn as resolveChannelGroupToolsPolicy, w as updateLastRoute, wn as isInternalMessageChannel, x as loadSessionStore, xn as INTERNAL_MESSAGE_CHANNEL, y as resolveSessionTranscriptFile, z as parseInlineDirectives$1, zn as ADMIN_SCOPE, zt as normalizeSignalMessagingTarget } from "./runtime-2B9_WKoI.js";
2
+ import { $ as mergeSessionEntry, A as deliveryContextKey, An as GATEWAY_CLIENT_IDS, B as INPUT_PROVENANCE_KIND_VALUES, Bn as CLI_DEFAULT_OPERATOR_SCOPES, C as recordSessionMetaFromInbound, Cn as isGatewayMessageChannel, D as isCacheEnabled, Dn as normalizeMessageChannel, Dt as getChannelDock, E as updateSessionStoreEntry, En as listDeliverableMessageChannels, F as archiveSessionTranscripts, Fn as normalizeAnyChannelId, Ft as trimMessagingTarget, G as resolveSessionLockMaxHoldFromTimeout, Gn as getPluginCommandSpecs, H as hasInterSessionUserProvenance, Hn as resolveLeastPrivilegeOperatorScopesForMethod, I as capArrayByJsonBytes, In as normalizeChannelId$2, It as isWhatsAppGroupJid, J as resolveChannelResetConfig, Jn as createInternalHookEvent, K as resolveSessionKey$1, Kn as listPluginCommands, L as countToolResults, Ln as logMutatingAdminRpcAudit, Lt as normalizeWhatsAppTarget, M as normalizeDeliveryContext, Mn as GATEWAY_CLIENT_NAMES, N as normalizeSessionDeliveryFields, Nn as getChatChannelMeta, O as resolveCacheTtlMs$1, On as resolveGatewayMessageChannel, Ot as listChannelDocks, P as normalizeAccountId$1, Pn as listChatChannels, Pt as looksLikeHandleOrPhoneTarget, Q as DEFAULT_RESET_TRIGGERS, R as extractToolCallNames, Rn as consumeMutatingAdminRpcBudget, S as readSessionUpdatedAt, Sn as isDeliverableMessageChannel, T as updateSessionStore, Tn as isMarkdownCapableMessageChannel, U as normalizeInputProvenance, Un as clearPluginCommands, V as applyInputProvenanceToUserMessage, Vn as authorizeOperatorScopesForMethod, W as acquireSessionWriteLock, Wn as executePluginCommand, X as resolveSessionResetType, Xn as normalizePluginHttpPath, Y as resolveSessionResetPolicy, Yn as triggerInternalHook, Z as resolveThreadFlag, _ as appendAssistantMessageToSessionTranscript, _n as resolveChannelGroupRequireMention, a as createPluginRegistry, an as resolveTelegramToken, at as resolveMainSessionKey, b as resolveAndPersistSessionFile, bn as resolveGroupSessionKey, bt as parseSlackTarget, c as listAgentsForGateway, ct as listChannelPlugins, d as lookupContextTokens, dn as resolveDefaultSignalAccountId, en as createTelegramActionGate, et as resolveFreshSessionTotalTokens, f as resolveContextTokensForModel, fn as resolveSignalAccount, g as parseSessionThreadInfo, gn as resolveChannelGroupPolicy, h as extractDeliveryInfo, hn as resolveIMessageAccount, i as setActivePluginRegistry, in as resolveTelegramAccount, it as resolveExplicitAgentSessionKey, j as mergeDeliveryContext, jn as GATEWAY_CLIENT_MODES, k as deliveryContextFromSession, kn as resolveMessageChannel, l as loadCombinedSessionStoreForGateway, ln as listEnabledSignalAccounts, lt as normalizeChannelId$1, mn as resolveDefaultIMessageAccountId, n as getActivePluginRegistryKey, nn as listTelegramAccountIds, nt as canonicalizeMainSessionAlias, o as createRuntimeHelpers, on as buildChannelAccountBindings, ot as deriveSessionMetaPatch, p as ensureFasedAgentModelsJson, pn as listIMessageAccountIds, q as evaluateSessionFreshness, qn as matchPluginCommand, r as requireActivePluginRegistry, rt as resolveAgentMainSessionKey, s as classifySessionKey, st as getChannelPlugin, t as getActivePluginRegistry, tn as listEnabledTelegramAccounts, tt as setSessionRuntimeModel, u as resolveSessionModelRef, un as listSignalAccountIds, v as resolveMirroredTranscriptText, vn as resolveChannelGroupToolsPolicy, w as updateLastRoute, wn as isInternalMessageChannel, x as loadSessionStore, xn as INTERNAL_MESSAGE_CHANNEL, y as resolveSessionTranscriptFile, z as parseInlineDirectives$1, zn as ADMIN_SCOPE, zt as normalizeSignalMessagingTarget } from "./runtime-CXSQwMaR.js";
3
3
  import { a as clearActiveProgressLine, c as CHANNEL_IDS, f as normalizeChatChannelId, i as defaultRuntime, l as CHAT_CHANNEL_ORDER, o as registerActiveProgressLine, r as createNonExitingRuntime, s as unregisterActiveProgressLine, t as createSubsystemLogger } from "./subsystem-DBPNbQDQ.js";
4
4
  import { S as normalizeLogLevel, d as isRich, f as theme, i as logVerbose, l as warn, o as setVerbose, p as getChildLogger, s as shouldLogVerbose, t as danger, u as colorize, w as resolvePreferredFasedAgentTmpDir } from "./globals-B_jjtAje.js";
5
5
  import { c as expandHomePrefix, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-BEmvSyOV.js";
@@ -14,7 +14,7 @@ import { i as resolveSlackAccount } from "./accounts-CuqIKU8X.js";
14
14
  import { i as logWarn, n as logError, r as logInfo, t as logDebug } from "./logger-BbFvCoKk.js";
15
15
  import { n as runExec, r as spawnWithFallback, t as runCommandWithTimeout } from "./exec-DQ8j4Fm3.js";
16
16
  import { _ as webAuthExists, c as logWebSelfId, i as resolveWhatsAppAccount, l as logoutWeb, p as readWebSelfId, s as getWebAuthAgeMs, t as hasAnyWhatsAppAuth } from "./accounts-Brn3-uWN.js";
17
- import { S as resolveChannelEntryMatchWithFallback, b as normalizeChannelSlug, y as buildChannelKeyCandidates } from "./allow-list-DyAxs4yw.js";
17
+ import { S as resolveChannelEntryMatchWithFallback, b as normalizeChannelSlug, y as buildChannelKeyCandidates } from "./allow-list-Bf45HfoP.js";
18
18
  import { n as redactSensitiveText, r as redactToolDetail, t as getDefaultRedactPatterns } from "./redact-Bm8vu_ju.js";
19
19
  import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken } from "./github-copilot-token-CUK__1s1.js";
20
20
  import { t as runTasksWithConcurrency } from "./run-with-concurrency-BsDJWzgM.js";
@@ -24,20 +24,20 @@ import { t as emitSessionTranscriptUpdate } from "./transcript-events-BJQWUdmU.j
24
24
  import { l as resolveChannelDefaultAccountId } from "./pairing-message-D0CoLHRJ.js";
25
25
  import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-l_6RdoMw.js";
26
26
  import { t as normalizeRequestInitHeadersForFetch } from "./fetch-headers-my7hgV2G.js";
27
- import { a as isBlockedHostnameOrIp, t as SsrFBlockedError } from "./ssrf-fG4UHKBw.js";
27
+ import { a as isBlockedHostnameOrIp, n as closeDispatcher, r as createPinnedDispatcher, s as resolvePinnedHostnameWithPolicy, t as SsrFBlockedError } from "./ssrf-fG4UHKBw.js";
28
28
  import { t as fetchWithSsrFGuard } from "./fetch-guard-CeG6u6ld.js";
29
29
  import { n as redactSensitiveUrlLikeString, t as redactSensitiveUrl } from "./redact-sensitive-url-g-ukZjwA.js";
30
- import { a as formatIMessageChatTarget, c as normalizeIMessageHandle, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, l as parseIMessageTarget, o as formatIMessageTargetForLog, r as createIMessageRpcClient, s as isAllowedIMessageSender, t as sendMessageIMessage } from "./send-CFzGKJXo.js";
30
+ import { a as formatIMessageChatTarget, c as normalizeIMessageHandle, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, l as parseIMessageTarget, o as formatIMessageTargetForLog, r as createIMessageRpcClient, s as isAllowedIMessageSender, t as sendMessageIMessage } from "./send-D-HfKQZm.js";
31
31
  import { A as resolveDefaultGroupPolicy, D as formatDocsLink, M as warnMissingProviderGroupPolicyFallbackOnce, b as setOnboardingChannelEnabled, c as parseOnboardingEntriesAllowingWildcard, f as promptParsedAllowFromForScopedChannel, h as resolveAccountIdForConfigure, j as resolveOpenProviderRuntimeGroupPolicy, k as resolveAllowlistProviderRuntimeGroupPolicy, l as patchChannelConfigForAccount, v as setChannelDmPolicyWithAllowFrom } from "./helpers-DMBU4oTo.js";
32
- import { A as formatLocationText, F as isSenderIdAllowed, I as mergeDmAllowFromSources, L as resolveGroupAllowFromSources, N as isVoiceCompatibleAudio, P as firstDefined$1, a as resolveCronStorePath, d as buildTelegramGroupPeerId, i as loadCronStore, j as toLocationContext, o as saveCronStore } from "./wsl-J-HscWxS.js";
33
- import { a as upsertChannelPairingRequest, c as getPairingAdapter, i as removeChannelAllowFromStoreEntry, l as listPairingChannels, n as readChannelAllowFromStore, o as readJsonFileWithFallback, s as writeJsonFileAtomically, t as addChannelAllowFromStoreEntry } from "./pairing-store-BChahgI2.js";
34
- import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, n as chunkByParagraph, o as chunkTextWithMode, p as chunkTextByBreakResolver, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-CyoyqpbG.js";
32
+ import { A as formatLocationText, F as isSenderIdAllowed, I as mergeDmAllowFromSources, L as resolveGroupAllowFromSources, N as isVoiceCompatibleAudio, P as firstDefined$1, a as resolveCronStorePath, d as buildTelegramGroupPeerId, i as loadCronStore, j as toLocationContext, o as saveCronStore } from "./wsl-CTvIWvZz.js";
33
+ import { a as upsertChannelPairingRequest, c as getPairingAdapter, i as removeChannelAllowFromStoreEntry, l as listPairingChannels, n as readChannelAllowFromStore, o as readJsonFileWithFallback, s as writeJsonFileAtomically, t as addChannelAllowFromStoreEntry } from "./pairing-store-B6J2C0vP.js";
34
+ import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, n as chunkByParagraph, o as chunkTextWithMode, p as chunkTextByBreakResolver, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-CBpl-AiQ.js";
35
35
  import { c as normalizeDeviceAuthScopes, i as clearDevicePairing, s as normalizeDeviceAuthRole } from "./tailscale-status-DwpNdO3Z.js";
36
36
  import { c as resolveHumanDelayConfig, i as resolveResponsePrefixTemplate, n as createReplyPrefixOptions, o as resolveAgentIdentity, s as resolveEffectiveMessagesConfig } from "./reply-prefix-CeVw7Mn2.js";
37
37
  import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-BbnqfVuu.js";
38
38
  import { n as safeEqualSecret, o as createAsyncLock, s as readJsonFile$1 } from "./pairing-token-Cs3BRKc0.js";
39
39
  import { n as generateSecureUuid, t as generateSecureToken } from "./secure-random-BIkG-k4s.js";
40
- import { a as logMessageProcessed, i as logLaneEnqueue, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag } from "./diagnostic-DLL_zekv.js";
40
+ import { a as logMessageProcessed, i as logLaneEnqueue, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag } from "./diagnostic-sYs6Agr-.js";
41
41
  import { r as getDiagnosticSessionState } from "./diagnostic-session-state-DqgfGYqZ.js";
42
42
  import { t as redactIdentifier } from "./redact-identifier-Lt7t3l7S.js";
43
43
  import { i as resolveTelegramTargetChatType, r as parseTelegramTarget } from "./targets-CoMJ1ry1.js";
@@ -48,31 +48,31 @@ import { i as executeWithApiKeyRotation, n as parseGeminiAuth, r as collectProvi
48
48
  import { c as normalizeExtraMemoryPaths, s as listMemoryFiles } from "./internal-CG_nHo-2.js";
49
49
  import { i as resolveQmdScopeDenial } from "./qmd-scope-CdX34VCV.js";
50
50
  import { _ as estimateBase64DecodedBytes, a as jsonResult, d as readStringParam, f as sanitizeContentBlocksImages, g as canonicalizeBase64, h as resolveImageSanitizationLimits, i as imageResultFromFile, l as readStringArrayParam, m as sanitizeToolResultImages, n as createActionGate, p as sanitizeImageBlocks, r as imageResult, s as readNumberParam, u as readStringOrNumberParam } from "./common-HCcXU-NR.js";
51
- import { S as isCommandFlagEnabled, _ as normalizeElevatedLevel, a as listChatCommands, b as normalizeVerboseLevel, g as shouldHandleTextCommands, i as isCommandEnabled, l as maybeResolveTextAlias, m as resolveNativeCommandName, o as listChatCommandsForConfig, u as normalizeCommandBody, v as normalizeReasoningLevel, w as isRestartEnabled, x as resolveResponseUsageMode, y as normalizeUsageDisplay } from "./commands-registry-BfqdEWdF.js";
52
- import { A as fetchJson$1, B as DEFAULT_BROWSER_EVALUATE_ENABLED, C as normalizeCdpWsUrl, D as assertBrowserNavigationResultAllowed, E as assertBrowserNavigationAllowed, F as stopChromeExtensionRelayServer, G as isLoopbackHost, H as DEFAULT_FASED_BROWSER_ENABLED, I as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, J as resolveClientIp, K as isSecureWebSocketUrl, L as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, O as withBrowserNavigationPolicy, P as ensureChromeExtensionRelayServer, R as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as InvalidBrowserNavigationUrlError, U as DEFAULT_FASED_BROWSER_PROFILE_NAME, V as DEFAULT_FASED_BROWSER_COLOR, W as isLoopbackAddress, X as rawDataToString, Y as resolveForwardedClientIp, _ as stopFasedAgentChrome, a as DEFAULT_TRACE_DIR, b as captureScreenshot, d as normalizeBrowserFormField, g as resolveFasedAgentUserDataDir, h as launchFasedAgentChrome, i as DEFAULT_DOWNLOAD_DIR, j as fetchOk, k as appendCdpPath, l as resolveWritablePathWithinRoot, m as isChromeReachable, o as DEFAULT_UPLOAD_DIR, p as isChromeCdpReady, q as isTrustedProxyAddress, r as loadReadability, s as resolveExistingPathsWithinRoot, t as loadLinkedom, v as resolveBrowserExecutableForPlatform, w as snapshotAria, x as createTargetViaCdp, y as resolveLsofCommandSync, z as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME } from "./runtime-dependency-nup8niQL.js";
51
+ import { S as isCommandFlagEnabled, _ as normalizeElevatedLevel, a as listChatCommands, b as normalizeVerboseLevel, g as shouldHandleTextCommands, i as isCommandEnabled, l as maybeResolveTextAlias, m as resolveNativeCommandName, o as listChatCommandsForConfig, u as normalizeCommandBody, v as normalizeReasoningLevel, w as isRestartEnabled, x as resolveResponseUsageMode, y as normalizeUsageDisplay } from "./commands-registry-G5KXSi_y.js";
52
+ import { A as fetchJson$1, B as DEFAULT_BROWSER_EVALUATE_ENABLED, C as normalizeCdpWsUrl, D as assertBrowserNavigationResultAllowed, E as assertBrowserNavigationAllowed, F as stopChromeExtensionRelayServer, G as isLoopbackHost, H as DEFAULT_FASED_BROWSER_ENABLED, I as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, J as resolveClientIp, K as isSecureWebSocketUrl, L as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, O as withBrowserNavigationPolicy, P as ensureChromeExtensionRelayServer, R as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as InvalidBrowserNavigationUrlError, U as DEFAULT_FASED_BROWSER_PROFILE_NAME, V as DEFAULT_FASED_BROWSER_COLOR, W as isLoopbackAddress, X as rawDataToString, Y as resolveForwardedClientIp, _ as stopFasedAgentChrome, a as DEFAULT_TRACE_DIR, b as captureScreenshot, d as normalizeBrowserFormField, g as resolveFasedAgentUserDataDir, h as launchFasedAgentChrome, i as DEFAULT_DOWNLOAD_DIR, j as fetchOk, k as appendCdpPath, l as resolveWritablePathWithinRoot, m as isChromeReachable, o as DEFAULT_UPLOAD_DIR, p as isChromeCdpReady, q as isTrustedProxyAddress, r as loadReadability, s as resolveExistingPathsWithinRoot, t as loadLinkedom, v as resolveBrowserExecutableForPlatform, w as snapshotAria, x as createTargetViaCdp, y as resolveLsofCommandSync, z as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME } from "./runtime-dependency-DczkvPxn.js";
53
53
  import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-DjgDArrp.js";
54
54
  import { a as writeFileWithinRoot, n as openFileWithinRoot, r as readFileWithinRoot, t as SafeOpenError } from "./fs-safe-g4g7GT02.js";
55
- import { a as fetchRemoteMedia, d as readResponseWithLimit, i as MediaFetchError, l as getAgentScopedMediaLocalRoots, n as loadWebMedia, t as getDefaultLocalRoots, u as getDefaultMediaLocalRoots } from "./media-CAdQF5TG.js";
56
- import { n as resolveMarkdownTableMode } from "./markdown-tables-DCOXEUfZ.js";
57
- import { a as resolveSignalRpcContext, c as streamSignalEvents, l as markdownToSignalTextChunks, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-B6KkGKZD.js";
58
- import { a as saveMediaBuffer, i as getMediaDir, n as ensureMediaDir } from "./outbound-attachment-QqTnIhZL.js";
59
- import { t as resolveFetch } from "./fetch-BtmoPIlf.js";
60
- import { B as isSessionBindingError, C as resolveThreadBindingMaxAgeMs$1, F as resolveThreadBindingIntroText, G as resolveSessionStorePathForAcp, I as resolveThreadBindingThreadName, K as upsertAcpSessionMeta, L as SYSTEM_MARK, N as formatThreadBindingDurationLabel, R as prefixSystemMessage, S as resolveThreadBindingMaxAgeExpiresAt, U as listAcpSessionEntries, W as readAcpSessionEntry, b as resolveThreadBindingIdleTimeoutMs$1, c as getThreadBindingManager, x as resolveThreadBindingInactivityExpiresAt, z as getSessionBindingService } from "./thread-bindings.state-D9hg_M1c.js";
61
- import { _ as marketplaceSkillIdsFromEntries, b as sanitizeEnvVars, c as getSkillsSnapshotVersion, d as resolveSkillsPromptForRun, f as syncSkillsToWorkspace, g as isMarketplaceSkillDir, h as getActiveSkillEnvOverrides, i as resolveSkillCommandInvocation, l as buildWorkspaceSkillSnapshot, m as applySkillEnvOverridesFromSnapshot, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as applySkillEnvOverrides, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as loadWorkspaceSkillEntries, v as marketplaceSkillIdsFromSnapshot, y as marketplaceSkillProvenanceMatchesContent } from "./skill-commands-FKEPLS7T.js";
62
- import { a as resolveSandboxedMediaSource, i as resolveSandboxPath, n as assertSandboxPath, r as resolveSandboxInputPath, t as assertMediaNotDataUrl } from "./sandbox-paths-Dx2lUqCu.js";
63
- import { n as resolveUserTimeFormat, r as resolveUserTimezone, t as formatUserTime } from "./date-time-uUevHscU.js";
64
- import { t as parseDiscordTarget } from "./targets-CtSbTxYX.js";
65
- import { n as missingTargetError, r as unknownTargetError, t as ambiguousTargetError } from "./target-errors-Ckufe179.js";
66
- import { i as discoverModels, r as discoverAuthStorage } from "./pi-model-discovery-BX_JLcEJ.js";
67
- import { n as normalizePollInput } from "./polls-DKQXVfJp.js";
68
- import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-C8tvQm8Z.js";
69
- import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-DrAcXE0y.js";
70
- import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-yJU83wEq.js";
71
- import { t as convertMarkdownTables } from "./tables-B3jr0Pvq.js";
72
- import { n as recordChannelActivity, t as getChannelActivity } from "./channel-activity-DBDMQ3yI.js";
73
- import { t as withTimeout$3 } from "./with-timeout-ckWB8rTo.js";
74
- import { t as getActiveWebListener } from "./active-listener-B_NMtgPL.js";
75
- import { n as asString$4, r as collectIssuesForEnabledAccounts } from "./shared-CBgp_GBw.js";
55
+ import { a as fetchRemoteMedia, d as readResponseWithLimit, i as MediaFetchError, l as getAgentScopedMediaLocalRoots, n as loadWebMedia, t as getDefaultLocalRoots, u as getDefaultMediaLocalRoots } from "./media-BAoaxCrt.js";
56
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-d7GlUs5R.js";
57
+ import { a as resolveSignalRpcContext, c as streamSignalEvents, l as markdownToSignalTextChunks, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-D1j12ZgX.js";
58
+ import { a as saveMediaBuffer, i as getMediaDir, n as ensureMediaDir } from "./outbound-attachment-CyXM3cAv.js";
59
+ import { t as resolveFetch } from "./fetch-B0v6OTUZ.js";
60
+ import { B as isSessionBindingError, C as resolveThreadBindingMaxAgeMs$1, F as resolveThreadBindingIntroText, G as resolveSessionStorePathForAcp, I as resolveThreadBindingThreadName, K as upsertAcpSessionMeta, L as SYSTEM_MARK, N as formatThreadBindingDurationLabel, R as prefixSystemMessage, S as resolveThreadBindingMaxAgeExpiresAt, U as listAcpSessionEntries, W as readAcpSessionEntry, b as resolveThreadBindingIdleTimeoutMs$1, c as getThreadBindingManager, x as resolveThreadBindingInactivityExpiresAt, z as getSessionBindingService } from "./thread-bindings.state-D2oOWDpv.js";
61
+ import { _ as marketplaceSkillIdsFromEntries, b as sanitizeEnvVars, c as getSkillsSnapshotVersion, d as resolveSkillsPromptForRun, f as syncSkillsToWorkspace, g as isMarketplaceSkillDir, h as getActiveSkillEnvOverrides, i as resolveSkillCommandInvocation, l as buildWorkspaceSkillSnapshot, m as applySkillEnvOverridesFromSnapshot, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as applySkillEnvOverrides, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as loadWorkspaceSkillEntries, v as marketplaceSkillIdsFromSnapshot, y as marketplaceSkillProvenanceMatchesContent } from "./skill-commands-iJtvpqgb.js";
62
+ import { a as resolveSandboxedMediaSource, i as resolveSandboxPath, n as assertSandboxPath, r as resolveSandboxInputPath, t as assertMediaNotDataUrl } from "./sandbox-paths-Bzh1CuZc.js";
63
+ import { n as resolveUserTimeFormat, r as resolveUserTimezone, t as formatUserTime } from "./date-time-ChY_tHoG.js";
64
+ import { t as parseDiscordTarget } from "./targets-DDbNnLnB.js";
65
+ import { n as missingTargetError, r as unknownTargetError, t as ambiguousTargetError } from "./target-errors-DfS1sLR9.js";
66
+ import { i as discoverModels, r as discoverAuthStorage } from "./pi-model-discovery-BHNVyRny.js";
67
+ import { n as normalizePollInput } from "./polls-DXd67TD8.js";
68
+ import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-Dufnu2cT.js";
69
+ import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-CQnfFFQ9.js";
70
+ import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-NAePk3eL.js";
71
+ import { t as convertMarkdownTables } from "./tables-_1W36GII.js";
72
+ import { n as recordChannelActivity, t as getChannelActivity } from "./channel-activity-F07DjroV.js";
73
+ import { t as withTimeout$3 } from "./with-timeout-CVV8tytk.js";
74
+ import { t as getActiveWebListener } from "./active-listener-p9Ooc1qj.js";
75
+ import { n as asString$4, r as collectIssuesForEnabledAccounts } from "./shared-D1AD2Ejn.js";
76
76
  import { createRequire } from "node:module";
77
77
  import * as path$1 from "node:path";
78
78
  import path, { isAbsolute, posix } from "node:path";
@@ -97,7 +97,7 @@ import { AsyncLocalStorage } from "node:async_hooks";
97
97
  import readline from "node:readline";
98
98
  import { createJiti } from "jiti";
99
99
  import { Type } from "@sinclair/typebox";
100
- import WebSocket$1, { WebSocket } from "ws";
100
+ import WebSocket, { WebSocket as WebSocket$1 } from "ws";
101
101
  import { Buffer as Buffer$1 } from "node:buffer";
102
102
  import net from "node:net";
103
103
  import { request } from "node:https";
@@ -8186,7 +8186,7 @@ async function getMemorySearchManager(params) {
8186
8186
  if (cached) return { manager: cached };
8187
8187
  }
8188
8188
  try {
8189
- const { QmdMemoryManager } = await import("./qmd-manager-CgRaTxUq.js");
8189
+ const { QmdMemoryManager } = await import("./qmd-manager-B8Vnu0ND.js");
8190
8190
  const primary = await QmdMemoryManager.create({
8191
8191
  cfg: params.cfg,
8192
8192
  agentId: params.agentId,
@@ -8216,7 +8216,7 @@ async function getMemorySearchManager(params) {
8216
8216
  } catch (err) {
8217
8217
  const message = err instanceof Error ? err.message : String(err);
8218
8218
  if (isNodeSqliteUnavailable(message)) {
8219
- const { FilesystemMemorySearchManager } = await import("./filesystem-manager-DoI8IBNF.js");
8219
+ const { FilesystemMemorySearchManager } = await import("./filesystem-manager-BzuIJ9K9.js");
8220
8220
  const manager = await FilesystemMemorySearchManager.create({
8221
8221
  cfg: params.cfg,
8222
8222
  agentId: params.agentId,
@@ -12570,7 +12570,7 @@ var GatewayClient = class {
12570
12570
  if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
12571
12571
  });
12572
12572
  }
12573
- this.ws = new WebSocket(url, wsOptions);
12573
+ this.ws = new WebSocket$1(url, wsOptions);
12574
12574
  this.ws.on("open", () => {
12575
12575
  if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
12576
12576
  const tlsError = this.validateTlsFingerprint();
@@ -12766,7 +12766,7 @@ var GatewayClient = class {
12766
12766
  const connectChallengeTimeoutMs = typeof rawConnectDelayMs === "number" && Number.isFinite(rawConnectDelayMs) ? Math.max(250, Math.min(1e4, rawConnectDelayMs)) : 2e3;
12767
12767
  if (this.connectTimer) clearTimeout(this.connectTimer);
12768
12768
  this.connectTimer = setTimeout(() => {
12769
- if (this.connectSent || this.ws?.readyState !== WebSocket.OPEN) return;
12769
+ if (this.connectSent || this.ws?.readyState !== WebSocket$1.OPEN) return;
12770
12770
  this.opts.onConnectError?.(/* @__PURE__ */ new Error("gateway connect challenge timeout"));
12771
12771
  this.ws?.close(1008, "connect challenge timeout");
12772
12772
  }, connectChallengeTimeoutMs);
@@ -12808,7 +12808,7 @@ var GatewayClient = class {
12808
12808
  return null;
12809
12809
  }
12810
12810
  async request(method, params, opts) {
12811
- if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
12811
+ if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error("gateway not connected");
12812
12812
  const id = randomUUID();
12813
12813
  const frame = {
12814
12814
  type: "req",
@@ -14972,6 +14972,11 @@ const SAT_RUNTIME_ENV_KEYS = {
14972
14972
  mintAddress: "FASED_SAT_MINT_ADDRESS",
14973
14973
  mintProgramId: "FASED_SAT_MINT_PROGRAM_ID"
14974
14974
  };
14975
+ const SAT_RUNTIME_TRUST_ENV_KEYS = {
14976
+ manifestPath: "FASED_SAT_RUNTIME_MANIFEST_PATH",
14977
+ manifestSha256: "FASED_SAT_RUNTIME_MANIFEST_SHA256",
14978
+ manifestSignaturePath: "FASED_SAT_RUNTIME_MANIFEST_SIGNATURE_PATH"
14979
+ };
14975
14980
  const MISSING_SAT_RUNTIME_IDS_MESSAGE = "SAT runtime IDs are not configured. Use Mining Sync after mainnet launch or set the complete SAT runtime env tuple for an explicit test network.";
14976
14981
  function readExplicitSatRuntimeIds(env) {
14977
14982
  const programId = String(env[SAT_RUNTIME_ENV_KEYS.programId] ?? "").trim();
@@ -15233,24 +15238,43 @@ function readLocalIds(env) {
15233
15238
  function idsEqual(left, right) {
15234
15239
  return Boolean(left && right && left.programId === right.programId && left.bondProgramId === right.bondProgramId && left.mintAddress === right.mintAddress && left.mintProgramId === right.mintProgramId);
15235
15240
  }
15236
- function buildEnvFile(ids) {
15241
+ function buildEnvFile(ids, trust) {
15237
15242
  return [
15238
15243
  "# Managed by Fased Agent official SAT mainnet sync.",
15239
15244
  `${SAT_RUNTIME_ENV_KEYS.programId}=${ids.programId}`,
15240
15245
  `${SAT_RUNTIME_ENV_KEYS.bondProgramId}=${ids.bondProgramId}`,
15241
15246
  `${SAT_RUNTIME_ENV_KEYS.mintAddress}=${ids.mintAddress}`,
15242
15247
  `${SAT_RUNTIME_ENV_KEYS.mintProgramId}=${ids.mintProgramId}`,
15248
+ `${SAT_RUNTIME_TRUST_ENV_KEYS.manifestPath}=${trust.manifestPath}`,
15249
+ `${SAT_RUNTIME_TRUST_ENV_KEYS.manifestSha256}=${trust.manifestSha256}`,
15250
+ `${SAT_RUNTIME_TRUST_ENV_KEYS.manifestSignaturePath}=${trust.manifestSignaturePath}`,
15243
15251
  ""
15244
15252
  ].join("\n");
15245
15253
  }
15246
- async function writeRuntimeIds(ids, env) {
15254
+ async function writeRuntimeIds(ids, env, trust) {
15247
15255
  const runtimeFile = resolveWritableSatRuntimeDefaultsFile(env);
15256
+ const manifestPath = `${runtimeFile}.manifest.json`;
15257
+ const manifestSignaturePath = `${runtimeFile}.manifest.sig`;
15248
15258
  await fs$1.mkdir(path.dirname(runtimeFile), { recursive: true });
15249
- await fs$1.writeFile(runtimeFile, buildEnvFile(ids), { mode: 384 });
15259
+ await fs$1.writeFile(manifestPath, trust.rawManifest, { mode: 384 });
15260
+ await fs$1.writeFile(manifestSignaturePath, `${trust.signature.trim()}\n`, { mode: 384 });
15261
+ await fs$1.writeFile(runtimeFile, buildEnvFile(ids, {
15262
+ manifestPath,
15263
+ manifestSha256: trust.manifestSha256,
15264
+ manifestSignaturePath
15265
+ }), { mode: 384 });
15266
+ await Promise.all([
15267
+ fs$1.chmod(manifestPath, 384),
15268
+ fs$1.chmod(manifestSignaturePath, 384),
15269
+ fs$1.chmod(runtimeFile, 384)
15270
+ ]);
15250
15271
  env[SAT_RUNTIME_ENV_KEYS.programId] = ids.programId;
15251
15272
  env[SAT_RUNTIME_ENV_KEYS.bondProgramId] = ids.bondProgramId;
15252
15273
  env[SAT_RUNTIME_ENV_KEYS.mintAddress] = ids.mintAddress;
15253
15274
  env[SAT_RUNTIME_ENV_KEYS.mintProgramId] = ids.mintProgramId;
15275
+ env[SAT_RUNTIME_TRUST_ENV_KEYS.manifestPath] = manifestPath;
15276
+ env[SAT_RUNTIME_TRUST_ENV_KEYS.manifestSha256] = trust.manifestSha256;
15277
+ env[SAT_RUNTIME_TRUST_ENV_KEYS.manifestSignaturePath] = manifestSignaturePath;
15254
15278
  return runtimeFile;
15255
15279
  }
15256
15280
  async function getSatMainnetSyncStatus(opts) {
@@ -15350,7 +15374,43 @@ async function syncSatMainnetRuntimeIds(opts) {
15350
15374
  ok: false,
15351
15375
  message: before.state === "not_live" ? "Satcoin mainnet is not live yet." : before.message || "SAT mainnet manifest is not ready to apply."
15352
15376
  };
15353
- const runtimeFile = await writeRuntimeIds(before.officialIds, env);
15377
+ const manifestUrl = opts?.manifestUrl?.trim() || resolveManifestUrl(env);
15378
+ const rawManifest = await fetchText(manifestUrl, { required: true });
15379
+ const manifestSha256 = parseSha256(await fetchText(`${manifestUrl}.sha256`, { required: true }));
15380
+ const signature = await fetchText(`${manifestUrl}.sig`, { required: true });
15381
+ if (!rawManifest || !manifestSha256 || !signature?.trim()) return {
15382
+ ...before,
15383
+ ok: false,
15384
+ state: "failed",
15385
+ message: "Verified SAT manifest artifacts could not be persisted for the native signer.",
15386
+ error: "signed SAT runtime manifest, hash, or detached signature is missing"
15387
+ };
15388
+ const finalVerification = await verifyLiveManifest({
15389
+ manifestUrl,
15390
+ raw: rawManifest,
15391
+ env
15392
+ });
15393
+ if (finalVerification.verification.hash !== "valid" || finalVerification.verification.signature !== "valid" || sha256Hex(rawManifest) !== manifestSha256) return {
15394
+ ...before,
15395
+ ok: false,
15396
+ state: "failed",
15397
+ message: "SAT manifest changed before signer runtime persistence.",
15398
+ verification: finalVerification.verification,
15399
+ trustKeySource: finalVerification.trustKeySource,
15400
+ error: "signed SAT runtime manifest verification raced or failed"
15401
+ };
15402
+ if (!idsEqual(readOfficialIds(JSON.parse(rawManifest)), before.officialIds)) return {
15403
+ ...before,
15404
+ ok: false,
15405
+ state: "failed",
15406
+ message: "SAT manifest IDs changed before signer runtime persistence.",
15407
+ error: "signed SAT runtime ID tuple changed during sync"
15408
+ };
15409
+ const runtimeFile = await writeRuntimeIds(before.officialIds, env, {
15410
+ rawManifest,
15411
+ manifestSha256,
15412
+ signature
15413
+ });
15354
15414
  const after = await getSatMainnetSyncStatus({
15355
15415
  env,
15356
15416
  manifestUrl: opts?.manifestUrl
@@ -15593,6 +15653,60 @@ function buildAttestation(options) {
15593
15653
  };
15594
15654
  }
15595
15655
 
15656
+ //#endregion
15657
+ //#region src/wallet/solana-rpc-read-fetch.ts
15658
+ function normalizeRpcHostname(hostname) {
15659
+ const normalized = hostname.trim().toLowerCase().replace(/\.$/, "");
15660
+ return normalized.startsWith("[") && normalized.endsWith("]") ? normalized.slice(1, -1) : normalized;
15661
+ }
15662
+ function isLoopbackRpcHostname(hostname) {
15663
+ const normalized = normalizeRpcHostname(hostname);
15664
+ return normalized === "localhost" || normalized.endsWith(".localhost") || normalized === "::1" || /^127(?:\.\d{1,3}){3}$/.test(normalized);
15665
+ }
15666
+ function isLoopbackRpcAddress(address) {
15667
+ const normalized = normalizeRpcHostname(address);
15668
+ return normalized === "::1" || normalized === "0:0:0:0:0:0:0:1" || /^127(?:\.\d{1,3}){3}$/.test(normalized) || /^::ffff:127(?:\.\d{1,3}){3}$/.test(normalized);
15669
+ }
15670
+ async function resolveWithTimeout(hostname, policy, timeoutMs) {
15671
+ let timer;
15672
+ try {
15673
+ return await Promise.race([resolvePinnedHostnameWithPolicy(hostname, { policy }), new Promise((_resolve, reject) => {
15674
+ timer = setTimeout(() => reject(/* @__PURE__ */ new Error("stored Solana RPC hostname resolution timed out")), Math.max(250, timeoutMs));
15675
+ timer.unref?.();
15676
+ })]);
15677
+ } finally {
15678
+ if (timer) clearTimeout(timer);
15679
+ }
15680
+ }
15681
+ async function fetchPinnedSolanaRpcRead(params) {
15682
+ const parsed = new URL(params.rpcUrl);
15683
+ const hostname = normalizeRpcHostname(parsed.hostname);
15684
+ const loopback = isLoopbackRpcHostname(hostname);
15685
+ if (!hostname || parsed.username || parsed.password || parsed.hash || parsed.protocol !== "https:" && !(parsed.protocol === "http:" && loopback)) throw new Error("stored Solana RPC URL is not safe for Gateway reads");
15686
+ const pinned = await resolveWithTimeout(hostname, {
15687
+ hostnameAllowlist: [hostname],
15688
+ ...loopback ? { allowPrivateNetwork: true } : {}
15689
+ }, params.timeoutMs);
15690
+ if (loopback && !pinned.addresses.every(isLoopbackRpcAddress)) throw new Error("stored Local Solana RPC hostname did not resolve only to loopback addresses");
15691
+ const dispatcher = createPinnedDispatcher(pinned);
15692
+ try {
15693
+ return {
15694
+ response: await fetch(parsed.toString(), {
15695
+ method: "POST",
15696
+ headers: { "content-type": "application/json" },
15697
+ body: params.body,
15698
+ redirect: "error",
15699
+ signal: AbortSignal.timeout(Math.max(250, params.timeoutMs)),
15700
+ dispatcher
15701
+ }),
15702
+ release: async () => closeDispatcher(dispatcher)
15703
+ };
15704
+ } catch (error) {
15705
+ await closeDispatcher(dispatcher);
15706
+ throw error;
15707
+ }
15708
+ }
15709
+
15596
15710
  //#endregion
15597
15711
  //#region src/wallet/solana-assets.ts
15598
15712
  const SOLANA_NATIVE_MINT$1 = "So11111111111111111111111111111111111111112";
@@ -15941,10 +16055,11 @@ function formatTokenAmount(raw, decimals) {
15941
16055
  }
15942
16056
  }
15943
16057
  async function fetchSolanaRpc(rpcUrl, method, params) {
16058
+ let release;
15944
16059
  try {
15945
- const response = await fetch(rpcUrl, {
15946
- method: "POST",
15947
- headers: { "Content-Type": "application/json" },
16060
+ const guarded = await fetchPinnedSolanaRpcRead({
16061
+ rpcUrl,
16062
+ timeoutMs: 1e4,
15948
16063
  body: JSON.stringify({
15949
16064
  jsonrpc: "2.0",
15950
16065
  id: 1,
@@ -15952,6 +16067,8 @@ async function fetchSolanaRpc(rpcUrl, method, params) {
15952
16067
  params
15953
16068
  })
15954
16069
  });
16070
+ release = guarded.release;
16071
+ const response = guarded.response;
15955
16072
  if (!response.ok) {
15956
16073
  recordSolanaAssetRpcMethod(method, "failure");
15957
16074
  return null;
@@ -15966,6 +16083,8 @@ async function fetchSolanaRpc(rpcUrl, method, params) {
15966
16083
  } catch {
15967
16084
  recordSolanaAssetRpcMethod(method, "failure");
15968
16085
  return null;
16086
+ } finally {
16087
+ await release?.();
15969
16088
  }
15970
16089
  }
15971
16090
  async function fetchSolanaMetadataFromMintViaRpc(params) {
@@ -16253,14 +16372,18 @@ const SignerPolicyAssetV2Schema = Type.Object({
16253
16372
  asset: Type.String(),
16254
16373
  destinations: Type.Array(Type.String()),
16255
16374
  maxPerTx: Type.String(),
16256
- maxDaily: Type.String()
16375
+ maxDaily: Type.String(),
16376
+ reviewedDestinations: Type.Optional(Type.Boolean()),
16377
+ typedSatDestinations: Type.Optional(Type.Boolean())
16257
16378
  }, { additionalProperties: false });
16258
16379
  const SignerPolicyInputV2Schema = Type.Object({
16259
16380
  walletId: Type.Optional(Type.String()),
16260
16381
  role: SignerWalletRoleSchema,
16261
16382
  version: Type.Optional(Type.Integer({ minimum: 0 })),
16383
+ baselineVersion: Type.Optional(Type.Integer({ minimum: 1 })),
16262
16384
  operations: Type.Array(Type.String()),
16263
16385
  programs: Type.Array(Type.String()),
16386
+ typedSatPrograms: Type.Optional(Type.Boolean()),
16264
16387
  assets: Type.Array(SignerPolicyAssetV2Schema),
16265
16388
  hash: Type.Optional(Type.String())
16266
16389
  }, { additionalProperties: false });
@@ -16268,8 +16391,10 @@ const LocalSocketSignerPolicyV2Schema = Type.Object({
16268
16391
  walletId: Type.String(),
16269
16392
  role: SignerWalletRoleSchema,
16270
16393
  version: Type.Integer({ minimum: 1 }),
16394
+ baselineVersion: Type.Optional(Type.Integer({ minimum: 1 })),
16271
16395
  operations: Type.Array(Type.String()),
16272
16396
  programs: Type.Array(Type.String()),
16397
+ typedSatPrograms: Type.Optional(Type.Boolean()),
16273
16398
  assets: Type.Array(SignerPolicyAssetV2Schema),
16274
16399
  hash: Type.String({ pattern: "^sha256:[0-9a-f]{64}$" })
16275
16400
  }, { additionalProperties: false });
@@ -16455,10 +16580,13 @@ const SignerSolanaTransactionEnvelopeV2Schema = Type.Object({
16455
16580
  }),
16456
16581
  submission: Type.Literal("rpc")
16457
16582
  }, { additionalProperties: false });
16458
- const SignerReviewAuthorizationV2Schema = Type.Object({
16583
+ const SignerReviewAuthorizationV2Schema = Type.Union([Type.Object({
16459
16584
  type: Type.Literal("webauthn"),
16460
16585
  proof: Type.Object({ proofId: Type.String({ minLength: 1 }) }, { additionalProperties: false })
16461
- }, { additionalProperties: false });
16586
+ }, { additionalProperties: false }), Type.Object({
16587
+ type: Type.Literal("control-ui"),
16588
+ proof: Type.Object({ proofId: Type.String({ pattern: "^[0-9a-f]{64}$" }) }, { additionalProperties: false })
16589
+ }, { additionalProperties: false })]);
16462
16590
  const LocalSocketSignerJupiterTriggerHistoryV2Schema = Type.Object({ orders: Type.Array(Type.Object({
16463
16591
  orderId: Type.String({ minLength: 1 }),
16464
16592
  orderState: Type.String({ minLength: 1 }),
@@ -16483,10 +16611,17 @@ const LocalSocketSignerJupiterTriggerHistoryV2Schema = Type.Object({ orders: Typ
16483
16611
  program: Type.String({ minLength: 1 })
16484
16612
  }, { additionalProperties: false }))
16485
16613
  }, { additionalProperties: false })) }, { additionalProperties: false });
16486
- const SignerWalletPolicyCreateV2Schema = Type.Object({
16614
+ const SignerRoleBaselineV1Schema = Type.Object({
16615
+ version: Type.Literal(1),
16616
+ role: SignerWalletRoleSchema
16617
+ }, { additionalProperties: false });
16618
+ const SignerWalletPolicyCreateV2Schema = Type.Union([Type.Object({
16487
16619
  expectedPolicyVersion: Type.Literal(0),
16488
16620
  policy: SignerPolicyInputV2Schema
16489
- }, { additionalProperties: false });
16621
+ }, { additionalProperties: false }), Type.Object({
16622
+ expectedPolicyVersion: Type.Literal(0),
16623
+ baseline: SignerRoleBaselineV1Schema
16624
+ }, { additionalProperties: false })]);
16490
16625
  const SignerOperationLookupV2Schema = Type.Object({ requestId: Type.String() }, { additionalProperties: false });
16491
16626
  const SignerSatLookupBindingRequestV2Schema = Type.Object({
16492
16627
  cycleId: Type.String({ pattern: "^(0|[1-9][0-9]*)$" }),
@@ -16509,6 +16644,16 @@ const LocalSocketSignerSatLookupBindingV2Schema = Type.Object({
16509
16644
  Type.Literal("unknown")
16510
16645
  ]))
16511
16646
  }, { additionalProperties: false });
16647
+ const LocalSocketSignerNetworkSummaryV2Schema = Type.Object({
16648
+ walletId: Type.String({
16649
+ minLength: 1,
16650
+ maxLength: 64
16651
+ }),
16652
+ configured: Type.Boolean(),
16653
+ version: Type.Integer({ minimum: 0 }),
16654
+ hash: Type.Optional(Type.String({ pattern: "^hmac-sha256:[0-9a-f]{64}$" })),
16655
+ ready: Type.Boolean()
16656
+ }, { additionalProperties: false });
16512
16657
  const LocalSocketSignerRequestSchema = Type.Union([
16513
16658
  Type.Object({ op: Type.Literal("health") }, { additionalProperties: false }),
16514
16659
  Type.Object({ op: Type.Literal("v2.capabilities") }, { additionalProperties: false }),
@@ -16520,6 +16665,21 @@ const LocalSocketSignerRequestSchema = Type.Union([
16520
16665
  op: Type.Literal("v2.policy.get"),
16521
16666
  walletId: Type.String()
16522
16667
  }, { additionalProperties: false }),
16668
+ Type.Object({
16669
+ op: Type.Literal("v2.network.get"),
16670
+ walletId: Type.String()
16671
+ }, { additionalProperties: false }),
16672
+ Type.Object({
16673
+ op: Type.Literal("v2.network.bootstrap"),
16674
+ walletId: Type.String(),
16675
+ request: Type.Object({
16676
+ expectedVersion: Type.Integer({ minimum: 0 }),
16677
+ primaryRpcUrl: Type.String({
16678
+ minLength: 1,
16679
+ maxLength: 2048
16680
+ })
16681
+ }, { additionalProperties: false })
16682
+ }, { additionalProperties: false }),
16523
16683
  Type.Object({
16524
16684
  op: Type.Literal("v2.policy.put"),
16525
16685
  walletId: Type.String(),
@@ -16540,6 +16700,18 @@ const LocalSocketSignerRequestSchema = Type.Union([
16540
16700
  op: Type.Literal("v2.wallet.get"),
16541
16701
  walletId: Type.String()
16542
16702
  }, { additionalProperties: false }),
16703
+ Type.Object({
16704
+ op: Type.Literal("v2.wallet.readiness"),
16705
+ walletId: Type.String()
16706
+ }, { additionalProperties: false }),
16707
+ Type.Object({
16708
+ op: Type.Literal("v2.policy.activateBaseline"),
16709
+ walletId: Type.String(),
16710
+ request: Type.Object({
16711
+ expectedPolicyVersion: Type.Integer({ minimum: 1 }),
16712
+ baseline: SignerRoleBaselineV1Schema
16713
+ }, { additionalProperties: false })
16714
+ }, { additionalProperties: false }),
16543
16715
  Type.Object({
16544
16716
  op: Type.Literal("v2.wallet.create"),
16545
16717
  walletId: Type.String(),
@@ -16548,21 +16720,30 @@ const LocalSocketSignerRequestSchema = Type.Union([
16548
16720
  Type.Object({
16549
16721
  op: Type.Literal("v2.wallet.import"),
16550
16722
  walletId: Type.String(),
16551
- request: Type.Object({
16723
+ request: Type.Union([Type.Object({
16552
16724
  expectedPolicyVersion: Type.Literal(0),
16553
16725
  policy: SignerPolicyInputV2Schema,
16554
16726
  path: Type.String()
16555
- }, { additionalProperties: false })
16727
+ }, { additionalProperties: false }), Type.Object({
16728
+ expectedPolicyVersion: Type.Literal(0),
16729
+ baseline: SignerRoleBaselineV1Schema,
16730
+ path: Type.String()
16731
+ }, { additionalProperties: false })])
16556
16732
  }, { additionalProperties: false }),
16557
16733
  Type.Object({
16558
16734
  op: Type.Literal("v2.wallet.importLegacy"),
16559
16735
  walletId: Type.String(),
16560
- request: Type.Object({
16736
+ request: Type.Union([Type.Object({
16561
16737
  expectedPolicyVersion: Type.Literal(0),
16562
16738
  policy: SignerPolicyInputV2Schema,
16563
16739
  path: Type.String(),
16564
16740
  passphrasePath: Type.String()
16565
- }, { additionalProperties: false })
16741
+ }, { additionalProperties: false }), Type.Object({
16742
+ expectedPolicyVersion: Type.Literal(0),
16743
+ baseline: SignerRoleBaselineV1Schema,
16744
+ path: Type.String(),
16745
+ passphrasePath: Type.String()
16746
+ }, { additionalProperties: false })])
16566
16747
  }, { additionalProperties: false }),
16567
16748
  Type.Object({
16568
16749
  op: Type.Literal("v2.wallet.reencrypt"),
@@ -16842,6 +17023,27 @@ const LocalSocketSignerWalletPolicyResultV2Schema = Type.Object({
16842
17023
  wallet: LocalSocketSignerWalletV2Schema,
16843
17024
  policy: LocalSocketSignerPolicyV2Schema
16844
17025
  }, { additionalProperties: false });
17026
+ const LocalSocketSignerWalletReadinessV2Schema = Type.Object({
17027
+ walletId: Type.String({ minLength: 1 }),
17028
+ publicKey: Type.String({ minLength: 1 }),
17029
+ walletVersion: Type.Optional(Type.Integer({ minimum: 1 })),
17030
+ role: SignerWalletRoleSchema,
17031
+ baselineVersion: Type.Integer({ minimum: 0 }),
17032
+ policyVersion: Type.Integer({ minimum: 1 }),
17033
+ policyHash: Type.String({ pattern: "^sha256:[0-9a-f]{64}$" }),
17034
+ networkVersion: Type.Integer({ minimum: 0 }),
17035
+ networkHash: Type.Optional(Type.String({ pattern: "^hmac-sha256:[0-9a-f]{64}$" })),
17036
+ keyReady: Type.Boolean(),
17037
+ policyReady: Type.Boolean(),
17038
+ networkReady: Type.Boolean(),
17039
+ operationLane: Type.Union([
17040
+ Type.Literal("blocked"),
17041
+ Type.Literal("agent-reviewed-and-autonomous"),
17042
+ Type.Literal("mining-typed-sat"),
17043
+ Type.Literal("vault-reviewed-only")
17044
+ ]),
17045
+ ready: Type.Boolean()
17046
+ }, { additionalProperties: false });
16845
17047
  function isPositiveUnsignedInteger(value) {
16846
17048
  return typeof value === "string" && /^[1-9][0-9]*$/.test(value);
16847
17049
  }
@@ -16868,11 +17070,15 @@ function validateLocalSocketSignerResult(op, result) {
16868
17070
  case "health":
16869
17071
  case "v2.capabilities": return Value.Check(LocalSocketSignerHealthResultSchema, result);
16870
17072
  case "v2.jupiter.trigger.history": return Value.Check(LocalSocketSignerJupiterTriggerHistoryV2Schema, result);
17073
+ case "v2.network.get":
17074
+ case "v2.network.bootstrap": return Value.Check(LocalSocketSignerNetworkSummaryV2Schema, result);
16871
17075
  case "v2.policy.get":
16872
17076
  case "v2.policy.put":
16873
- case "v2.policy.tighten": return Value.Check(LocalSocketSignerPolicyV2Schema, result);
17077
+ case "v2.policy.tighten":
17078
+ case "v2.policy.activateBaseline": return Value.Check(LocalSocketSignerPolicyV2Schema, result);
16874
17079
  case "v2.wallet.get":
16875
17080
  case "v2.wallet.reencrypt": return Value.Check(LocalSocketSignerWalletV2Schema, result);
17081
+ case "v2.wallet.readiness": return Value.Check(LocalSocketSignerWalletReadinessV2Schema, result);
16876
17082
  case "v2.wallet.create":
16877
17083
  case "v2.wallet.import":
16878
17084
  case "v2.wallet.importLegacy": return Value.Check(LocalSocketSignerWalletPolicyResultV2Schema, result);
@@ -16902,7 +17108,10 @@ const SIGNER_PROTOCOL_V2_REQUIRED_CLIENT_FEATURES = [
16902
17108
  "atomicIdempotency",
16903
17109
  "ambiguousBroadcastReconciliation",
16904
17110
  "signerOwnedKeys",
17111
+ "signerOwnedRoleBaselines",
17112
+ "liveWalletReadiness",
16905
17113
  "signerOwnedRPC",
17114
+ "applicationNetworkBootstrap",
16906
17115
  "typedSolanaTransactions",
16907
17116
  "typedA2aPaymentMemos",
16908
17117
  "typedA2aRefundMemos",
@@ -17115,11 +17324,15 @@ const REQUIRED_PROTOCOL_V2_FEATURES = SIGNER_PROTOCOL_V2_REQUIRED_CLIENT_FEATURE
17115
17324
  const SIGNER_SOCKET_TIMEOUT_MS = {
17116
17325
  health: 2e3,
17117
17326
  "v2.capabilities": 2e3,
17327
+ "v2.network.get": 15e3,
17328
+ "v2.network.bootstrap": 3e4,
17118
17329
  "v2.jupiter.trigger.history": 3e4,
17119
17330
  "v2.policy.get": 5e3,
17120
17331
  "v2.policy.put": 5e3,
17121
17332
  "v2.policy.tighten": 5e3,
17333
+ "v2.policy.activateBaseline": 1e4,
17122
17334
  "v2.wallet.get": 5e3,
17335
+ "v2.wallet.readiness": 5e3,
17123
17336
  "v2.wallet.create": 1e4,
17124
17337
  "v2.wallet.import": 2e4,
17125
17338
  "v2.wallet.importLegacy": 3e4,
@@ -17306,6 +17519,12 @@ var LocalSocketSignerAdapter = class {
17306
17519
  provider: this.id,
17307
17520
  configured: true,
17308
17521
  checkedAt: (/* @__PURE__ */ new Date()).toISOString(),
17522
+ ...details.webAuthn ? { nativeSignerApproval: {
17523
+ configured: details.webAuthn.configured,
17524
+ ready: details.webAuthn.ready,
17525
+ credentialCount: details.webAuthn.credentialCount,
17526
+ credentialVersion: details.webAuthn.credentialVersion
17527
+ } } : {},
17309
17528
  details: [
17310
17529
  details?.details ?? "",
17311
17530
  ...!details?.details ? [
@@ -17909,21 +18128,23 @@ function upsertNamedWallet(params) {
17909
18128
  updatedAt: now
17910
18129
  };
17911
18130
  registry.wallets = [...registry.wallets.filter((entry) => entry.id !== next.id), next].toSorted((a, b) => a.createdAt.localeCompare(b.createdAt));
17912
- if (!registry.defaultWalletId || !registry.wallets.some((wallet) => wallet.id === registry.defaultWalletId)) registry.defaultWalletId = resolveWalletUserRole(next) === "agent" ? next.id : void 0;
17913
18131
  writeWalletProviderRegistry(registry, env);
17914
18132
  return next;
17915
18133
  }
17916
18134
  function resolveWalletSelectionForAgent(params) {
17917
18135
  const registry = readWalletProviderRegistry(params.env ?? process.env);
17918
18136
  const directAgent = params.agentId?.trim();
17919
- const walletId = (directAgent ? registry.assignments[directAgent] : void 0) ?? registry.defaultWalletId;
18137
+ const directWalletId = directAgent ? registry.assignments[directAgent] : void 0;
18138
+ const skillWalletId = params.skillWalletId?.trim();
18139
+ const walletId = skillWalletId ?? directWalletId ?? registry.defaultWalletId;
17920
18140
  if (!walletId) return {};
17921
18141
  const wallet = registry.wallets.find((entry) => entry.id === walletId);
17922
18142
  if (!wallet) return {};
17923
18143
  return {
17924
18144
  walletId: wallet.id,
17925
18145
  walletName: wallet.name,
17926
- providerId: wallet.providerId
18146
+ providerId: wallet.providerId,
18147
+ source: skillWalletId ? "skill" : directWalletId ? "agent" : "default"
17927
18148
  };
17928
18149
  }
17929
18150
  function resolveWalletSelection(params) {
@@ -17967,11 +18188,12 @@ function resolveWalletSelection(params) {
17967
18188
  }
17968
18189
  const fallback = resolveWalletSelectionForAgent({
17969
18190
  agentId: params.agentId,
18191
+ skillWalletId: params.skillWalletId,
17970
18192
  env
17971
18193
  });
17972
18194
  if (fallback.walletId || fallback.providerId) return {
17973
18195
  ...fallback,
17974
- source: "fallback"
18196
+ source: fallback.source ?? "fallback"
17975
18197
  };
17976
18198
  return { source: "none" };
17977
18199
  }
@@ -23797,6 +24019,36 @@ function findRequest(file, requestId) {
23797
24019
  return file.requests.find((request) => request.id === requestId.trim());
23798
24020
  }
23799
24021
 
24022
+ //#endregion
24023
+ //#region src/wallet/local-socket-signer-lifecycle.ts
24024
+ async function requireSignerOwnedProtocolV2(socketPath, requiredFeatures = []) {
24025
+ const result = await callLocalSocketSigner(socketPath, { op: "v2.capabilities" });
24026
+ const capabilities = result.capabilities;
24027
+ const missing = [
24028
+ "failClosedPolicies",
24029
+ "policyHashes",
24030
+ "signerOwnedKeys",
24031
+ "applicationNetworkBootstrap",
24032
+ "atomicMultiAssetCaps",
24033
+ "signerControlledNativeFeeCaps",
24034
+ ...requiredFeatures
24035
+ ].filter((feature) => !capabilities?.features.includes(feature));
24036
+ if (result.ready !== true || capabilities?.protocol.current !== 2 || capabilities.protocol.min > 2 || capabilities.protocol.max < 2 || capabilities.nativeFeeReservationLamports !== LOCAL_SIGNER_NATIVE_FEE_RESERVATION_LAMPORTS_V2 || missing.length > 0) throw new Error(`fased-signerd does not provide the required signer-owned protocol-v2 capabilities${missing.length > 0 ? `: ${missing.join(", ")}` : ""}`);
24037
+ }
24038
+ async function readSignerOwnedWalletReadiness(params) {
24039
+ await requireSignerOwnedProtocolV2(params.socketPath, ["liveWalletReadiness"]);
24040
+ return await callLocalSocketSigner(params.socketPath, {
24041
+ op: "v2.wallet.readiness",
24042
+ walletId: params.walletId
24043
+ });
24044
+ }
24045
+
24046
+ //#endregion
24047
+ //#region src/wallet/native-signer-wallet-id.ts
24048
+ function normalizeNativeSignerWalletId(value) {
24049
+ return value.trim().toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "") || "default";
24050
+ }
24051
+
23800
24052
  //#endregion
23801
24053
  //#region src/wallet/wallet-approval-auth.ts
23802
24054
  function nowMs$1() {
@@ -23978,8 +24230,12 @@ async function readWalletStatusSnapshot(params) {
23978
24230
  const statePaths = resolveWalletStatePaths(effectiveEnv);
23979
24231
  const approvalAuth = readWalletApprovalAuthSnapshot(effectiveEnv, cfg);
23980
24232
  const checkedAt = (/* @__PURE__ */ new Date()).toISOString();
24233
+ const registeredWallets = params?.walletId ? providerRegistry.wallets.filter((wallet) => wallet.id === params.walletId) : providerRegistry.wallets;
23981
24234
  let providerHealth = {
23982
24235
  ok: false,
24236
+ provider: providerId,
24237
+ configured: false,
24238
+ checkedAt,
23983
24239
  details: "provider health probe unavailable"
23984
24240
  };
23985
24241
  let addresses;
@@ -24001,6 +24257,9 @@ async function readWalletStatusSnapshot(params) {
24001
24257
  } catch (err) {
24002
24258
  providerHealth = {
24003
24259
  ok: false,
24260
+ provider: providerId,
24261
+ configured: false,
24262
+ checkedAt,
24004
24263
  details: walletDiagnosticErrorString(err)
24005
24264
  };
24006
24265
  }
@@ -24019,6 +24278,55 @@ async function readWalletStatusSnapshot(params) {
24019
24278
  summary: "Real-chain settlement depends on the configured wallet provider and RPC connectivity."
24020
24279
  },
24021
24280
  chains: resolved.chains,
24281
+ wallets: await Promise.all(registeredWallets.map(async (wallet) => {
24282
+ if (wallet.providerId !== "local-socket-signer") return {
24283
+ id: wallet.id,
24284
+ name: wallet.name,
24285
+ providerId: wallet.providerId,
24286
+ addresses: wallet.addresses,
24287
+ readiness: {
24288
+ keystore: Boolean(wallet.addresses?.solana),
24289
+ rpc: serviceHealthy,
24290
+ ready: serviceHealthy && Boolean(wallet.addresses?.solana)
24291
+ }
24292
+ };
24293
+ const signerWalletId = (typeof wallet.metadata?.signerWalletId === "string" ? wallet.metadata.signerWalletId.trim() : "") || normalizeNativeSignerWalletId(wallet.id);
24294
+ try {
24295
+ const signer = await readSignerOwnedWalletReadiness({
24296
+ socketPath: resolveLocalSignerSocketPath(effectiveEnv),
24297
+ walletId: signerWalletId
24298
+ });
24299
+ const addressMatches = typeof wallet.addresses?.solana === "string" && wallet.addresses.solana === signer.publicKey;
24300
+ const roleMatches = typeof wallet.metadata?.role === "string" && wallet.metadata.role === signer.role;
24301
+ const ready = signer.ready && addressMatches && roleMatches;
24302
+ return {
24303
+ id: wallet.id,
24304
+ name: wallet.name,
24305
+ providerId: wallet.providerId,
24306
+ addresses: wallet.addresses,
24307
+ readiness: {
24308
+ keystore: signer.keyReady,
24309
+ rpc: signer.networkReady,
24310
+ ready,
24311
+ ...!ready && signer.ready ? { error: "registry address or immutable role does not match live signer state" } : {},
24312
+ signer
24313
+ }
24314
+ };
24315
+ } catch (error) {
24316
+ return {
24317
+ id: wallet.id,
24318
+ name: wallet.name,
24319
+ providerId: wallet.providerId,
24320
+ addresses: wallet.addresses,
24321
+ readiness: {
24322
+ keystore: false,
24323
+ rpc: false,
24324
+ ready: false,
24325
+ error: walletDiagnosticErrorMessage(error)
24326
+ }
24327
+ };
24328
+ }
24329
+ })),
24022
24330
  service: {
24023
24331
  host: resolved.service.host,
24024
24332
  port: resolved.service.port,
@@ -24038,6 +24346,7 @@ async function readWalletStatusSnapshot(params) {
24038
24346
  }
24039
24347
  },
24040
24348
  approvalAuth,
24349
+ ...providerHealth.nativeSignerApproval ? { nativeSignerApproval: providerHealth.nativeSignerApproval } : {},
24041
24350
  addresses,
24042
24351
  paths: {
24043
24352
  rootDir: paths.rootDir,
@@ -24622,10 +24931,6 @@ const CANVAS_CAPABILITY_TTL_MS = 10 * 6e4;
24622
24931
  //#region src/canvas-host/a2ui.ts
24623
24932
  const CANVAS_HOST_PATH = "/__fased__/canvas";
24624
24933
 
24625
- //#endregion
24626
- //#region src/wallet/signer-network-admin.ts
24627
- const NETWORK_ADMIN_MAX_OUTPUT_BYTES = 256 * 1024;
24628
-
24629
24934
  //#endregion
24630
24935
  //#region src/federation/auto-connect.ts
24631
24936
  const DEFAULT_RENEW_INTERVAL_MS = 2700 * 1e3;
@@ -28603,27 +28908,27 @@ function createOutboundSendDepsFromCliSource(deps) {
28603
28908
  function createDefaultDeps() {
28604
28909
  return {
28605
28910
  sendMessageWhatsApp: async (...args) => {
28606
- const { sendMessageWhatsApp } = await import("./web-C_AH5PyB.js");
28911
+ const { sendMessageWhatsApp } = await import("./web-DGWi7i3B.js");
28607
28912
  return await sendMessageWhatsApp(...args);
28608
28913
  },
28609
28914
  sendMessageTelegram: async (...args) => {
28610
- const { sendMessageTelegram } = await import("./send-q9HXrSwK.js").then((n) => n.c);
28915
+ const { sendMessageTelegram } = await import("./send-DWKm6yay.js").then((n) => n.c);
28611
28916
  return await sendMessageTelegram(...args);
28612
28917
  },
28613
28918
  sendMessageDiscord: async (...args) => {
28614
- const { sendMessageDiscord } = await import("./send-DCO441U7.js").then((n) => n.t);
28919
+ const { sendMessageDiscord } = await import("./send-BXBS_mRK.js").then((n) => n.t);
28615
28920
  return await sendMessageDiscord(...args);
28616
28921
  },
28617
28922
  sendMessageSlack: async (...args) => {
28618
- const { sendMessageSlack } = await import("./send-gDoGA-7e.js").then((n) => n.n);
28923
+ const { sendMessageSlack } = await import("./send-Di1Jit3L.js").then((n) => n.n);
28619
28924
  return await sendMessageSlack(...args);
28620
28925
  },
28621
28926
  sendMessageSignal: async (...args) => {
28622
- const { sendMessageSignal } = await import("./send-B6KkGKZD.js").then((n) => n.i);
28927
+ const { sendMessageSignal } = await import("./send-D1j12ZgX.js").then((n) => n.i);
28623
28928
  return await sendMessageSignal(...args);
28624
28929
  },
28625
28930
  sendMessageIMessage: async (...args) => {
28626
- const { sendMessageIMessage } = await import("./send-CFzGKJXo.js").then((n) => n.n);
28931
+ const { sendMessageIMessage } = await import("./send-D-HfKQZm.js").then((n) => n.n);
28627
28932
  return await sendMessageIMessage(...args);
28628
28933
  }
28629
28934
  };
@@ -30770,7 +31075,7 @@ const log$17 = createSubsystemLogger("model-catalog");
30770
31075
  let modelCatalogPromise = null;
30771
31076
  let hasLoggedModelCatalogError = false;
30772
31077
  let hasLoggedProviderCatalogError = false;
30773
- const defaultImportPiSdk = () => import("./pi-model-discovery-BX_JLcEJ.js").then((n) => n.a);
31078
+ const defaultImportPiSdk = () => import("./pi-model-discovery-BHNVyRny.js").then((n) => n.a);
30774
31079
  let importPiSdk = defaultImportPiSdk;
30775
31080
  const CODEX_PROVIDER = "openai-codex";
30776
31081
  const OPENAI_PROVIDER = "openai";
@@ -36611,7 +36916,7 @@ function isModuleNotFoundError(err) {
36611
36916
  }
36612
36917
  async function loadPwAiModule(mode) {
36613
36918
  try {
36614
- return await import("./pw-ai-DlxqX6Es.js");
36919
+ return await import("./pw-ai-DZYLDC-S.js");
36615
36920
  } catch (err) {
36616
36921
  if (mode === "soft") return null;
36617
36922
  if (isModuleNotFoundError(err)) return null;
@@ -37005,11 +37310,11 @@ function createProfileContext(opts, profile) {
37005
37310
  const userDataDir = resolveFasedAgentUserDataDir(profile.name);
37006
37311
  const profileState = getProfileState();
37007
37312
  if (await isHttpReachable(300) && !profileState.running) try {
37008
- await (await import("./pw-ai-DlxqX6Es.js")).closePlaywrightBrowserConnection();
37313
+ await (await import("./pw-ai-DZYLDC-S.js")).closePlaywrightBrowserConnection();
37009
37314
  } catch {}
37010
37315
  if (profileState.running) await stopRunningBrowser();
37011
37316
  try {
37012
- await (await import("./pw-ai-DlxqX6Es.js")).closePlaywrightBrowserConnection();
37317
+ await (await import("./pw-ai-DZYLDC-S.js")).closePlaywrightBrowserConnection();
37013
37318
  } catch {}
37014
37319
  if (!fs.existsSync(userDataDir)) return {
37015
37320
  moved: false,
@@ -46373,7 +46678,7 @@ function parseDeliveryParam(params) {
46373
46678
  const DEFAULT_ADAPTER = { supportsComponentsV2: false };
46374
46679
  async function loadChannelMessageAdapter(channel) {
46375
46680
  if (channel === "discord") {
46376
- const { discordChannelMessageAdapter } = await import("./channel-adapters.discord-BS4S4Svh.js");
46681
+ const { discordChannelMessageAdapter } = await import("./channel-adapters.discord-DSiR4X2Y.js");
46377
46682
  return discordChannelMessageAdapter;
46378
46683
  }
46379
46684
  return DEFAULT_ADAPTER;
@@ -47349,7 +47654,7 @@ async function resolveSlackChannelType(params) {
47349
47654
  return "unknown";
47350
47655
  }
47351
47656
  try {
47352
- const { createSlackWebClient } = await import("./client-pI228AVT.js").then((n) => n.t);
47657
+ const { createSlackWebClient } = await import("./client-DLY-kWF_.js").then((n) => n.t);
47353
47658
  const channel = (await createSlackWebClient(token).conversations.info({ channel: channelId })).channel;
47354
47659
  const type = channel?.is_im ? "dm" : channel?.is_mpim ? "group" : "channel";
47355
47660
  SLACK_CHANNEL_TYPE_CACHE.set(`${account.accountId}:${channelId}`, type);
@@ -49157,21 +49462,17 @@ function resolveWalletActionSelection(params) {
49157
49462
  providerId: params.providerId,
49158
49463
  env
49159
49464
  });
49160
- else if (registry.defaultWalletId) {
49161
- const fallback = registry.wallets.find((entry) => entry.id === registry.defaultWalletId);
49162
- selection = fallback ? {
49163
- walletId: fallback.id,
49164
- walletName: fallback.name,
49165
- providerId: fallback.providerId,
49166
- source: "fallback"
49167
- } : { source: "none" };
49168
- } else selection = { source: "none" };
49465
+ else selection = resolveWalletSelection({
49466
+ agentId: params.agentId,
49467
+ skillWalletId: params.skillWalletId,
49468
+ env
49469
+ });
49169
49470
  } catch (error) {
49170
49471
  const message = error instanceof Error ? error.message : "wallet selection failed";
49171
49472
  if (message.includes("ambiguous")) throw new WalletActionSelectionError("wallet_ambiguous", message);
49172
49473
  throw new WalletActionSelectionError("wallet_not_found", message);
49173
49474
  }
49174
- if (!selection.walletId) throw new WalletActionSelectionError("wallet_handle_required", "Agent wallet handle, walletId, or default Agent wallet required");
49475
+ if (!selection.walletId) throw new WalletActionSelectionError("wallet_handle_required", "Select an Agent wallet: use an explicit wallet, skill override, Agent assignment, or Default Agent wallet fallback");
49175
49476
  const wallet = registry.wallets.find((entry) => entry.id === selection.walletId);
49176
49477
  if (!wallet) throw new WalletActionSelectionError("wallet_not_found", `wallet not found: ${selection.walletId}`);
49177
49478
  if (params.providerId && wallet.providerId !== params.providerId) throw new WalletActionSelectionError("wallet_not_found", `wallet ${wallet.name} (${wallet.id}) belongs to provider ${wallet.providerId}, not ${params.providerId}`);
@@ -58808,11 +59109,13 @@ function createWalletActionTool(opts) {
58808
59109
  const scheduled = action === "schedule_plan";
58809
59110
  const requesterSkillId = opts?.requesterSkillId?.trim() || null;
58810
59111
  const permissions = readSkillWalletActionPermissions(cfg, requesterSkillId);
59112
+ const skillWalletId = permissions?.walletIds?.length === 1 ? permissions.walletIds[0] : void 0;
58811
59113
  const selection = resolveAgentWalletSelection({
58812
59114
  config: cfg,
58813
59115
  walletHandle,
58814
59116
  walletId,
58815
59117
  agentId: requesterAgentId ?? ownerAgentId ?? void 0,
59118
+ skillWalletId,
58816
59119
  env: process.env
58817
59120
  });
58818
59121
  const rpcUrl = resolveScopedRpcUrlForWallet({
@@ -59887,7 +60190,7 @@ function createWalletTool(opts) {
59887
60190
  return {
59888
60191
  label: "Wallet",
59889
60192
  name: "wallet",
59890
- description: "Query wallet status/list/balance/assets/address and prepare/send policy-limited Solana transactions via configured wallet provider. If the user asks for one exact @wallet handle or one external Solana address, call only that exact read action; do not also call balances/list. Use action=\"list\" to list local wallets with handles and action=\"balances\" only when the user asks for every/all local wallet balances. Use walletHandle=\"@wallet:<walletId>\" to select exact local wallets for read-only balance/assets/status/address and risky actions. Use action=\"assets\" for all visible Solana native and SPL balances, or address=\"<solana-address>\" for read-only external Solana balance/assets. For address/balance reads, omit chain when the user does not specify it; the tool returns the available Solana address or balance set. Risky prepare/send actions require an Agent wallet via walletHandle, structured walletId, or default Agent wallet. For normal SOL amounts such as 0.1, pass amountFormat=\"human\"; decimal amounts without amountFormat are treated as human units. Destination wallet handles like @wallet:vault are resolved to receive addresses.",
60193
+ description: "Query wallet status/list/balance/assets/address and prepare/send policy-limited Solana transactions via configured wallet provider. If the user asks for one exact @wallet handle or one external Solana address, call only that exact read action; do not also call balances/list. Use action=\"list\" to list local wallets with handles and action=\"balances\" only when the user asks for every/all local wallet balances. Use walletHandle=\"@wallet:<walletId>\" to select exact local wallets for read-only balance/assets/status/address and risky actions. Use action=\"assets\" for all visible Solana native and SPL balances, or address=\"<solana-address>\" for read-only external Solana balance/assets. For address/balance reads, omit chain when the user does not specify it; the tool returns the available Solana address or balance set. Risky prepare/send actions use explicit wallet, skill override, Agent assignment, then the optional Default Agent wallet fallback. For normal SOL amounts such as 0.1, pass amountFormat=\"human\"; decimal amounts without amountFormat are treated as human units. Destination wallet handles like @wallet:vault are resolved to receive addresses.",
59891
60194
  parameters: WalletToolSchema,
59892
60195
  execute: async (_toolCallId, args) => {
59893
60196
  if (!access.ok) {
@@ -59911,6 +60214,9 @@ function createWalletTool(opts) {
59911
60214
  const explicitWalletId = readStringParam(params, "walletId");
59912
60215
  const selectedWalletId = (explicitWalletHandle ? parseWalletHandle(explicitWalletHandle) : void 0) ?? explicitWalletId;
59913
60216
  const explicitWalletName = readStringParam(params, "walletName");
60217
+ const requesterSkillId = opts?.requesterSkillId?.trim() || null;
60218
+ const permissions = readSkillWalletActionPermissions(cfg, requesterSkillId);
60219
+ const skillWalletId = permissions?.walletIds?.length === 1 ? permissions.walletIds[0] : void 0;
59914
60220
  const walletSelection = riskyWalletAction ? resolveAgentWalletSelection({
59915
60221
  config: cfg,
59916
60222
  providerId: explicitProviderId,
@@ -59918,6 +60224,7 @@ function createWalletTool(opts) {
59918
60224
  walletId: explicitWalletId,
59919
60225
  walletName: explicitWalletName,
59920
60226
  agentId: requesterAgentId ?? ownerAgentId ?? void 0,
60227
+ skillWalletId,
59921
60228
  env: process.env
59922
60229
  }) : resolveWalletSelection({
59923
60230
  providerId: explicitProviderId,
@@ -60134,10 +60441,9 @@ function createWalletTool(opts) {
60134
60441
  walletName: walletSelection.walletName
60135
60442
  };
60136
60443
  if (chain === "solana" && payload.program) assertValidSolanaAddress(payload.program, "SPL mint address");
60137
- const requesterSkillId = opts?.requesterSkillId?.trim() || null;
60138
60444
  await enforceWalletSkillPolicy({
60139
60445
  cfg,
60140
- permissions: readSkillWalletActionPermissions(cfg, requesterSkillId),
60446
+ permissions,
60141
60447
  requesterAgentId,
60142
60448
  requesterSkillId,
60143
60449
  action,
@@ -73974,7 +74280,7 @@ async function resolveSlackNames(params) {
73974
74280
  });
73975
74281
  const token = account.config.userToken?.trim() || account.botToken?.trim();
73976
74282
  if (!token) return /* @__PURE__ */ new Map();
73977
- const { resolveSlackUserAllowlist } = await import("./resolve-users-DN9VQBwv.js").then((n) => n.n);
74283
+ const { resolveSlackUserAllowlist } = await import("./resolve-users-Bk_ss2vC.js").then((n) => n.n);
73978
74284
  return mapResolvedAllowlistNames(await resolveSlackUserAllowlist({
73979
74285
  token,
73980
74286
  entries: params.entries
@@ -73986,7 +74292,7 @@ async function resolveDiscordNames(params) {
73986
74292
  accountId: params.accountId
73987
74293
  }).token?.trim();
73988
74294
  if (!token) return /* @__PURE__ */ new Map();
73989
- const { resolveDiscordUserAllowlist } = await import("./resolve-users-V6dHh_2B.js").then((n) => n.n);
74295
+ const { resolveDiscordUserAllowlist } = await import("./resolve-users-IevCOk4W.js").then((n) => n.n);
73990
74296
  return mapResolvedAllowlistNames(await resolveDiscordUserAllowlist({
73991
74297
  token,
73992
74298
  entries: params.entries
@@ -84290,7 +84596,7 @@ async function recordLoopOutcome(args) {
84290
84596
  if (!args.ctx?.sessionKey) return;
84291
84597
  try {
84292
84598
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-DqgfGYqZ.js").then((n) => n.n);
84293
- const { recordToolCallOutcome } = await import("./tool-loop-detection-Bp8bPJLs.js");
84599
+ const { recordToolCallOutcome } = await import("./tool-loop-detection-sDZl27w7.js");
84294
84600
  recordToolCallOutcome(getDiagnosticSessionState({
84295
84601
  sessionKey: args.ctx.sessionKey,
84296
84602
  sessionId: args.ctx?.agentId
@@ -84311,8 +84617,8 @@ async function runBeforeToolCallHook(args) {
84311
84617
  const params = args.params;
84312
84618
  if (args.ctx?.sessionKey) {
84313
84619
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-DqgfGYqZ.js").then((n) => n.n);
84314
- const { logToolLoopAction } = await import("./diagnostic-DLL_zekv.js").then((n) => n.n);
84315
- const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-Bp8bPJLs.js");
84620
+ const { logToolLoopAction } = await import("./diagnostic-sYs6Agr-.js").then((n) => n.n);
84621
+ const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-sDZl27w7.js");
84316
84622
  const sessionState = getDiagnosticSessionState({
84317
84623
  sessionKey: args.ctx.sessionKey,
84318
84624
  sessionId: args.ctx?.agentId
@@ -87706,7 +88012,7 @@ const handleSessionCommand = async (params, allowTextCommands) => {
87706
88012
  reply: { text: resolveSessionCommandUsage() }
87707
88013
  };
87708
88014
  }
87709
- const { setThreadBindingIdleTimeoutBySessionKey, setThreadBindingMaxAgeBySessionKey } = await import("./thread-bindings.lifecycle-QbkNl-m6.js").then((n) => n.i);
88015
+ const { setThreadBindingIdleTimeoutBySessionKey, setThreadBindingMaxAgeBySessionKey } = await import("./thread-bindings.lifecycle-Y9T3CQGf.js").then((n) => n.i);
87710
88016
  const updatedBindings = action === SESSION_ACTION_IDLE ? setThreadBindingIdleTimeoutBySessionKey({
87711
88017
  targetSessionKey: binding.targetSessionKey,
87712
88018
  accountId,
@@ -97024,7 +97330,7 @@ const discordMessageActions = {
97024
97330
  return null;
97025
97331
  },
97026
97332
  handleAction: async ({ action, params, cfg, accountId, requesterSenderId, toolContext, mediaLocalRoots }) => {
97027
- const { handleDiscordMessageAction } = await import("./handle-action-hvwapMKg.js");
97333
+ const { handleDiscordMessageAction } = await import("./handle-action-CRdM6B-8.js");
97028
97334
  return await handleDiscordMessageAction({
97029
97335
  action,
97030
97336
  params,
@@ -97261,7 +97567,7 @@ const signalMessageActions = {
97261
97567
  //#region src/channels/plugins/actions/telegram.ts
97262
97568
  const providerId = "telegram";
97263
97569
  async function loadTelegramActionHandler() {
97264
- const { handleTelegramAction } = await import("./telegram-actions-BwGBIVDE.js");
97570
+ const { handleTelegramAction } = await import("./telegram-actions-Cewdga8H.js");
97265
97571
  return handleTelegramAction;
97266
97572
  }
97267
97573
  function readTelegramSendParams(params) {
@@ -97431,7 +97737,7 @@ function createWhatsAppLoginTool() {
97431
97737
  force: Type.Optional(Type.Boolean())
97432
97738
  }),
97433
97739
  execute: async (_toolCallId, args) => {
97434
- const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-CGciBSNP.js");
97740
+ const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-CRueOKZK.js");
97435
97741
  if ((args?.action ?? "start") === "wait") {
97436
97742
  const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
97437
97743
  return {
@@ -99671,7 +99977,7 @@ function buildPairingReply(params) {
99671
99977
 
99672
99978
  //#endregion
99673
99979
  //#region src/brand.ts
99674
- const FASED_PRODUCT_VERSION = "0.1.67";
99980
+ const FASED_PRODUCT_VERSION = "0.1.69";
99675
99981
  const FASED_DISPLAY_VERSION = `v${FASED_PRODUCT_VERSION}`;
99676
99982
 
99677
99983
  //#endregion
@@ -103445,7 +103751,7 @@ async function auditTelegramGroupMembership(params) {
103445
103751
  groups: [],
103446
103752
  elapsedMs: Date.now() - started
103447
103753
  };
103448
- const fetcher = params.proxyUrl ? (await import("./proxy-DWpYcsvR.js").then((n) => n.n)).makeProxyFetch(params.proxyUrl) : fetch;
103754
+ const fetcher = params.proxyUrl ? (await import("./proxy-CLRUdShp.js").then((n) => n.n)).makeProxyFetch(params.proxyUrl) : fetch;
103449
103755
  const { fetchWithTimeout } = await import("./fetch-timeout-l_6RdoMw.js").then((n) => n.r);
103450
103756
  const base = `${TELEGRAM_API_BASE}/bot${token}`;
103451
103757
  const groups = [];
@@ -103550,87 +103856,87 @@ const handleWhatsAppActionLazy = async (...args) => {
103550
103856
  return handleWhatsAppAction(...args);
103551
103857
  };
103552
103858
  const auditDiscordChannelPermissionsLazy = async (...args) => {
103553
- const { auditDiscordChannelPermissions } = await import("./audit-C5d2z5U1.js").then((n) => n.t);
103859
+ const { auditDiscordChannelPermissions } = await import("./audit-CUULWG22.js").then((n) => n.t);
103554
103860
  return auditDiscordChannelPermissions(...args);
103555
103861
  };
103556
103862
  const listDiscordDirectoryGroupsLiveLazy = async (...args) => {
103557
- const { listDiscordDirectoryGroupsLive } = await import("./directory-live-CSuYxdwk.js").then((n) => n.t);
103863
+ const { listDiscordDirectoryGroupsLive } = await import("./directory-live-BXMpuYAF.js").then((n) => n.t);
103558
103864
  return listDiscordDirectoryGroupsLive(...args);
103559
103865
  };
103560
103866
  const listDiscordDirectoryPeersLiveLazy = async (...args) => {
103561
- const { listDiscordDirectoryPeersLive } = await import("./directory-live-CSuYxdwk.js").then((n) => n.t);
103867
+ const { listDiscordDirectoryPeersLive } = await import("./directory-live-BXMpuYAF.js").then((n) => n.t);
103562
103868
  return listDiscordDirectoryPeersLive(...args);
103563
103869
  };
103564
103870
  const probeDiscordLazy = async (...args) => {
103565
- const { probeDiscord } = await import("./probe-BFroeK3g.js").then((n) => n.n);
103871
+ const { probeDiscord } = await import("./probe-oVp12D6L.js").then((n) => n.n);
103566
103872
  return probeDiscord(...args);
103567
103873
  };
103568
103874
  const resolveDiscordChannelAllowlistLazy = async (...args) => {
103569
- const { resolveDiscordChannelAllowlist } = await import("./resolve-channels-87LZrFk_.js").then((n) => n.n);
103875
+ const { resolveDiscordChannelAllowlist } = await import("./resolve-channels-1HtDcMqh.js").then((n) => n.n);
103570
103876
  return resolveDiscordChannelAllowlist(...args);
103571
103877
  };
103572
103878
  const resolveDiscordUserAllowlistLazy = async (...args) => {
103573
- const { resolveDiscordUserAllowlist } = await import("./resolve-users-V6dHh_2B.js").then((n) => n.n);
103879
+ const { resolveDiscordUserAllowlist } = await import("./resolve-users-IevCOk4W.js").then((n) => n.n);
103574
103880
  return resolveDiscordUserAllowlist(...args);
103575
103881
  };
103576
103882
  const sendMessageDiscordLazy = async (...args) => {
103577
- const { sendMessageDiscord } = await import("./send-DCO441U7.js").then((n) => n.t);
103883
+ const { sendMessageDiscord } = await import("./send-BXBS_mRK.js").then((n) => n.t);
103578
103884
  return sendMessageDiscord(...args);
103579
103885
  };
103580
103886
  const sendPollDiscordLazy = async (...args) => {
103581
- const { sendPollDiscord } = await import("./send-DCO441U7.js").then((n) => n.t);
103887
+ const { sendPollDiscord } = await import("./send-BXBS_mRK.js").then((n) => n.t);
103582
103888
  return sendPollDiscord(...args);
103583
103889
  };
103584
103890
  const monitorDiscordProviderLazy = async (...args) => {
103585
- const { monitorDiscordProvider } = await import("./monitor-CV1sr0p2.js");
103891
+ const { monitorDiscordProvider } = await import("./monitor-xzVAPbg2.js");
103586
103892
  return monitorDiscordProvider(...args);
103587
103893
  };
103588
103894
  const listSlackDirectoryGroupsLiveLazy = async (...args) => {
103589
- const { listSlackDirectoryGroupsLive } = await import("./directory-live-Dw7ZgC9_.js");
103895
+ const { listSlackDirectoryGroupsLive } = await import("./directory-live-Rn1BzPof.js");
103590
103896
  return listSlackDirectoryGroupsLive(...args);
103591
103897
  };
103592
103898
  const listSlackDirectoryPeersLiveLazy = async (...args) => {
103593
- const { listSlackDirectoryPeersLive } = await import("./directory-live-Dw7ZgC9_.js");
103899
+ const { listSlackDirectoryPeersLive } = await import("./directory-live-Rn1BzPof.js");
103594
103900
  return listSlackDirectoryPeersLive(...args);
103595
103901
  };
103596
103902
  const probeSlackLazy = async (...args) => {
103597
- const { probeSlack } = await import("./probe-CJb5uR8B.js");
103903
+ const { probeSlack } = await import("./probe-BM7Oe40M.js");
103598
103904
  return probeSlack(...args);
103599
103905
  };
103600
103906
  const resolveSlackChannelAllowlistLazy = async (...args) => {
103601
- const { resolveSlackChannelAllowlist } = await import("./resolve-channels-_-nV-EK2.js").then((n) => n.n);
103907
+ const { resolveSlackChannelAllowlist } = await import("./resolve-channels-CU72Qh2j.js").then((n) => n.n);
103602
103908
  return resolveSlackChannelAllowlist(...args);
103603
103909
  };
103604
103910
  const resolveSlackUserAllowlistLazy = async (...args) => {
103605
- const { resolveSlackUserAllowlist } = await import("./resolve-users-DN9VQBwv.js").then((n) => n.n);
103911
+ const { resolveSlackUserAllowlist } = await import("./resolve-users-Bk_ss2vC.js").then((n) => n.n);
103606
103912
  return resolveSlackUserAllowlist(...args);
103607
103913
  };
103608
103914
  const sendMessageSlackLazy = async (...args) => {
103609
- const { sendMessageSlack } = await import("./send-gDoGA-7e.js").then((n) => n.n);
103915
+ const { sendMessageSlack } = await import("./send-Di1Jit3L.js").then((n) => n.n);
103610
103916
  return sendMessageSlack(...args);
103611
103917
  };
103612
103918
  const monitorSlackProviderLazy = async (...args) => {
103613
- const { monitorSlackProvider } = await import("./slack-DSC6T2KW.js");
103919
+ const { monitorSlackProvider } = await import("./slack-CkIRVDUK.js");
103614
103920
  return monitorSlackProvider(...args);
103615
103921
  };
103616
103922
  const handleSlackActionLazy = async (...args) => {
103617
- const { handleSlackAction } = await import("./slack-actions-DhbMcp8M.js");
103923
+ const { handleSlackAction } = await import("./slack-actions-BzUEszJa.js");
103618
103924
  return handleSlackAction(...args);
103619
103925
  };
103620
103926
  const probeTelegramLazy = async (...args) => {
103621
- const { probeTelegram } = await import("./probe-l_whvGLY.js");
103927
+ const { probeTelegram } = await import("./probe-CMPksimh.js");
103622
103928
  return probeTelegram(...args);
103623
103929
  };
103624
103930
  const sendMessageTelegramLazy = async (...args) => {
103625
- const { sendMessageTelegram } = await import("./send-q9HXrSwK.js").then((n) => n.c);
103931
+ const { sendMessageTelegram } = await import("./send-DWKm6yay.js").then((n) => n.c);
103626
103932
  return sendMessageTelegram(...args);
103627
103933
  };
103628
103934
  const sendPollTelegramLazy = async (...args) => {
103629
- const { sendPollTelegram } = await import("./send-q9HXrSwK.js").then((n) => n.c);
103935
+ const { sendPollTelegram } = await import("./send-DWKm6yay.js").then((n) => n.c);
103630
103936
  return sendPollTelegram(...args);
103631
103937
  };
103632
103938
  const monitorTelegramProviderLazy = async (...args) => {
103633
- const { monitorTelegramProvider } = await import("./monitor-DrTy_4CL.js");
103939
+ const { monitorTelegramProvider } = await import("./monitor-WXdn4mR-.js");
103634
103940
  return monitorTelegramProvider(...args);
103635
103941
  };
103636
103942
  let webOutboundPromise = null;
@@ -103639,23 +103945,23 @@ let webLoginQrPromise = null;
103639
103945
  let webChannelPromise = null;
103640
103946
  let whatsappActionsPromise = null;
103641
103947
  function loadWebOutbound() {
103642
- webOutboundPromise ??= import("./outbound-BgVDdHxx.js").then((n) => n.t);
103948
+ webOutboundPromise ??= import("./outbound-zB6llMGW.js").then((n) => n.t);
103643
103949
  return webOutboundPromise;
103644
103950
  }
103645
103951
  function loadWebLogin() {
103646
- webLoginPromise ??= import("./login-Ca583Okc.js").then((n) => n.n);
103952
+ webLoginPromise ??= import("./login-D7WnK8-P.js").then((n) => n.n);
103647
103953
  return webLoginPromise;
103648
103954
  }
103649
103955
  function loadWebLoginQr() {
103650
- webLoginQrPromise ??= import("./login-qr-CGciBSNP.js");
103956
+ webLoginQrPromise ??= import("./login-qr-CRueOKZK.js");
103651
103957
  return webLoginQrPromise;
103652
103958
  }
103653
103959
  function loadWebChannel() {
103654
- webChannelPromise ??= import("./web-C_AH5PyB.js");
103960
+ webChannelPromise ??= import("./web-DGWi7i3B.js");
103655
103961
  return webChannelPromise;
103656
103962
  }
103657
103963
  function loadWhatsAppActions() {
103658
- whatsappActionsPromise ??= import("./whatsapp-actions-Bj_rOncr.js");
103964
+ whatsappActionsPromise ??= import("./whatsapp-actions-Blu9-eX-.js");
103659
103965
  return whatsappActionsPromise;
103660
103966
  }
103661
103967
  function createPluginRuntime(options = {}) {
@@ -114229,7 +114535,7 @@ function createOpenAIReasoningEffortWrapper(baseStreamFn, reasoningEffort) {
114229
114535
  function createCodexDefaultTransportWrapper(baseStreamFn) {
114230
114536
  const underlying = baseStreamFn ?? streamSimple;
114231
114537
  return (model, context, options) => {
114232
- if (typeof process !== "undefined" && process.versions?.node) globalThis.WebSocket = WebSocket$1;
114538
+ if (typeof process !== "undefined" && process.versions?.node) globalThis.WebSocket = WebSocket;
114233
114539
  return underlying(model, context, {
114234
114540
  ...options,
114235
114541
  transport: options?.transport ?? "auto"