@spacebar_ai/moldclaw-core 2026.3.43 → 2026.3.45
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.
- package/dist/accounts-5qY-dKca.d.ts +103 -0
- package/dist/accounts-CxV5zzzp.js +114 -0
- package/dist/acp-cli-2JoKJ0xt.js +2093 -0
- package/dist/actions.runtime-BJPd9nat.js +119 -0
- package/dist/actions.runtime-DVs4a2cB.js +133 -0
- package/dist/agent-scope-lZlwP1At.js +208 -0
- package/dist/agents-CmT3Jwvj.js +222 -0
- package/dist/agents-D7Pebhph.js +853 -0
- package/dist/agents.config-CX9CPNfP.js +17 -0
- package/dist/agents.config-DF9Zwn9n.js +121 -0
- package/dist/allow-list-B3f4EqAM.js +81 -0
- package/dist/allowlist-_YpK0-4h.js +142 -0
- package/dist/api-B44giplI.js +117 -0
- package/dist/audit-C3InXm7H.js +787 -0
- package/dist/audit-ChWS6RiF.js +54 -0
- package/dist/audit-channel.collect.runtime-DZzrS6v2.js +605 -0
- package/dist/audit-channel.runtime-B2XTOsSF.js +121 -0
- package/dist/audit-extra.async-C2G0mqmk.js +813 -0
- package/dist/audit-membership-runtime-DOv5-eHo.js +162 -0
- package/dist/audit.deep.runtime-DyL9O_sU.js +25 -0
- package/dist/audit.nondeep.runtime-C6jFgJfH.js +832 -0
- package/dist/audit.runtime-Cvh2wmWM.js +118 -0
- package/dist/auth-Ch3Rchm4.js +101 -0
- package/dist/auth-choice-Beq0dWPS.js +268 -0
- package/dist/auth-choice-DZYg94gS.js +122 -0
- package/dist/auth-choice-TVG_8lJj.js +507 -0
- package/dist/auth-choice-options-B_qxsjdj.js +123 -0
- package/dist/auth-choice-prompt-BayzDobT.js +115 -0
- package/dist/auth-choice-prompt-_UES859x.js +36 -0
- package/dist/auth-choice.apply-helpers-BhbNIV8X.js +66 -0
- package/dist/auth-choice.plugin-providers.runtime-CVC4Jzhp.js +119 -0
- package/dist/auth-profiles-C-Ul-Qkn.js +128139 -0
- package/dist/auth-profiles.runtime-Clyka_jV.js +116 -0
- package/dist/banner-CojBHPWr.js +342 -0
- package/dist/bluebubbles-BnLsj2Fy.d.ts +6 -0
- package/dist/bluebubbles-irYTGbfn.js +64 -0
- package/dist/bot-DdyrB2z9.d.ts +478 -0
- package/dist/brave-w4Fo8WZ3.js +24 -0
- package/dist/browser-cli-DWFs3P_i.js +1494 -0
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.d.ts +1 -1
- package/dist/bundled/boot-md/handler.js +35 -35
- package/dist/bundled/bootstrap-extra-files/handler.d.ts +1 -1
- package/dist/bundled/bootstrap-extra-files/handler.js +1 -1
- package/dist/bundled/command-logger/handler.d.ts +1 -1
- package/dist/bundled/session-memory/handler.d.ts +1 -1
- package/dist/bundled/session-memory/handler.js +36 -36
- package/dist/call-Do7wTSr7.js +39 -0
- package/dist/call-gdDAt07d.js +640 -0
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/channel-34O87pvK.js +949 -0
- package/dist/channel-B3Xo_4d8.js +1598 -0
- package/dist/channel-BEqDvL49.js +397 -0
- package/dist/channel-BLOk9WRE.js +214 -0
- package/dist/channel-BY5H2cdy.js +803 -0
- package/dist/channel-BeOtzXIH.js +4681 -0
- package/dist/channel-Bt8x_5Kj.js +306 -0
- package/dist/channel-C3E8XWLF.js +1321 -0
- package/dist/channel-C6ngVfGr.js +943 -0
- package/dist/channel-CVDBca2b.js +226 -0
- package/dist/channel-Cctli72q.js +562 -0
- package/dist/channel-DEAbU9Dj2.js +316 -0
- package/dist/channel-DIULkrBN.js +575 -0
- package/dist/channel-DXb4gsSd.js +619 -0
- package/dist/channel-Dap9LY-9.js +352 -0
- package/dist/channel-DcJdUnab.js +538 -0
- package/dist/channel-ZYCQj3hP.js +207 -0
- package/dist/channel-account-context-Baszl3_B.js +103 -0
- package/dist/channel-hlzhFHDl.js +497 -0
- package/dist/channel-options-PwBzYYtq.js +50 -0
- package/dist/channel-plugin-ids-TZIY4hFs.js +26 -0
- package/dist/channel-summary-CCEAV13o.js +111 -0
- package/dist/channel-tY2Hg5ac.js +542 -0
- package/dist/channel-vMWcWq1U.js +920 -0
- package/dist/channel.runtime-8qWgkCxX.js +404 -0
- package/dist/channel.runtime-C4jtgrbI.js +179 -0
- package/dist/channel.runtime-CJ4ug6Mp.js +127 -0
- package/dist/channel.runtime-ChKRJAZ8.js +4011 -0
- package/dist/channel.runtime-Cj54LYU-.js +418 -0
- package/dist/channel.runtime-KH06-bu1.js +870 -0
- package/dist/channel.runtime-_GYnBh2X.js +199 -0
- package/dist/channel.runtime-go7Pzt6N.js +241 -0
- package/dist/channel.runtime-iypIZ0EU.js +171 -0
- package/dist/channel.runtime-mukTWpon.js +182 -0
- package/dist/channel.runtime-oNtF1sc3.js +218 -0
- package/dist/channel.setup-BZfok6kX.js +11 -0
- package/dist/channel.setup-CbXfZ2dq.js +9 -0
- package/dist/channel.setup-CfyM55np.js +8 -0
- package/dist/channel.setup-CoG-gJ6n.js +9 -0
- package/dist/channel.setup-Cp4PH_rc.js +57 -0
- package/dist/channel.setup-V2w9Jk9j.js +6 -0
- package/dist/channel.setup-t7F5WZE7.js +8 -0
- package/dist/channels/plugins/actions/discord.d.ts +2 -2
- package/dist/channels/plugins/actions/discord.js +35 -35
- package/dist/channels/plugins/actions/signal.d.ts +1 -1
- package/dist/channels/plugins/actions/signal.js +35 -35
- package/dist/channels/plugins/actions/telegram.d.ts +2 -2
- package/dist/channels/plugins/actions/telegram.js +35 -35
- package/dist/channels/plugins/agent-tools/whatsapp-login.d.ts +3 -3
- package/dist/channels/plugins/agent-tools/whatsapp-login.js +35 -35
- package/dist/channels-H5ThmyG8.js +1118 -0
- package/dist/channels-cQ-6NFCQ.js +404 -0
- package/dist/channels-cli-TmchKLFS.js +291 -0
- package/dist/channels-status-issues-DXnkXEeJ.js +16 -0
- package/dist/clawbot-cli-Cpbxu8dD.js +118 -0
- package/dist/cleanup-utils-D0L17RsX.js +96 -0
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/cli--2bGSKdX.js +154 -0
- package/dist/command-registry-BaVPDmwn.js +242 -0
- package/dist/command-registry-DhLyeSbO.js +14 -0
- package/dist/command-secret-gateway-C5D_-jb0.js +111 -0
- package/dist/compact.runtime-C9a0kRAg.js +116 -0
- package/dist/completion-cli-Bg95upyk.js +17 -0
- package/dist/completion-cli-CrPdlnCH.js +445 -0
- package/dist/config-BbvDRSYp.js +31 -0
- package/dist/config-CwBv71QC.js +44 -0
- package/dist/config-cli-jsZsYhAl.js +678 -0
- package/dist/config-guard-DTaXXqly.js +118 -0
- package/dist/config-validation-Q6U1sP84.js +262 -0
- package/dist/config-value-DT3-5958.js +132 -0
- package/dist/configure-BJfMiVej.js +1100 -0
- package/dist/configure-Cist3Iza.js +243 -0
- package/dist/control-ui-assets-C1YDYi82.js +232 -0
- package/dist/control-ui-shared-Dm5Dh0Lo.js +29 -0
- package/dist/core-BwKq3krw.js +150 -0
- package/dist/core-hjBwfDsW.d.ts +87 -0
- package/dist/cron-cli-Bktbk7iP.js +639 -0
- package/dist/daemon-cli-BXyH8DBL.js +339 -0
- package/dist/daemon-install-mxcGYsRJ.js +180 -0
- package/dist/deliver-BPYUKaSp.js +111 -0
- package/dist/deliver-runtime-CwnLQZTN.js +111 -0
- package/dist/device-id-cli-XvwZbIyC.js +52 -0
- package/dist/device-identity-IG5DngWM.js +365 -0
- package/dist/devices-cli-DIsxj4xp.js +342 -0
- package/dist/diagnostic-DTPopFvh.js +310 -0
- package/dist/directory-cli-D253m0er.js +311 -0
- package/dist/directory-config-helpers-DpFcAbmo.d.ts +38 -0
- package/dist/directory.static-BXv9MXqm.js +44 -0
- package/dist/discord-DwFf1qp7.js +114 -0
- package/dist/discovery-DzRM1wzK.js +48 -0
- package/dist/dm-policy-shared-DKoGdUpY.d.ts +95 -0
- package/dist/dns-cli-BJiz6CLK.js +217 -0
- package/dist/docs-cli-Dq2Yi5qO.js +174 -0
- package/dist/doctor-completion-BPl6HiiZ.js +90 -0
- package/dist/doctor-config-flow-BHR1Ayyh.js +2437 -0
- package/dist/doctor-config-flow-PXVtrfkE.js +112 -0
- package/dist/enable-Cyagpq3b.js +24 -0
- package/dist/entry.js +4 -4
- package/dist/exec-approvals-cli-kLAev6bP.js +421 -0
- package/dist/extensions/acpx/index.d.ts +1 -1
- package/dist/extensions/amazon-bedrock/index.d.ts +1 -1
- package/dist/extensions/amazon-bedrock/index.js +4 -4
- package/dist/extensions/anthropic/index.d.ts +1 -1
- package/dist/extensions/anthropic/index.js +35 -35
- package/dist/extensions/bluebubbles/index.d.ts +1 -1
- package/dist/extensions/bluebubbles/index.js +39 -39
- package/dist/extensions/bluebubbles/setup-entry.d.ts +2 -2
- package/dist/extensions/bluebubbles/setup-entry.js +39 -39
- package/dist/extensions/brave/index.d.ts +1 -1
- package/dist/extensions/brave/index.js +5 -5
- package/dist/extensions/byteplus/index.d.ts +1 -1
- package/dist/extensions/byteplus/index.js +35 -35
- package/dist/extensions/cloudflare-ai-gateway/index.d.ts +1 -1
- package/dist/extensions/cloudflare-ai-gateway/index.js +36 -36
- package/dist/extensions/copilot-proxy/index.d.ts +1 -1
- package/dist/extensions/copilot-proxy/index.js +4 -4
- package/dist/extensions/device-pair/index.d.ts +1 -1
- package/dist/extensions/device-pair/index.js +4 -4
- package/dist/extensions/diagnostics-otel/index.d.ts +1 -1
- package/dist/extensions/diagnostics-otel/index.js +4 -4
- package/dist/extensions/diffs/index.d.ts +1 -1
- package/dist/extensions/discord/index.d.ts +1 -1
- package/dist/extensions/discord/index.js +40 -40
- package/dist/extensions/discord/setup-entry.d.ts +1 -1
- package/dist/extensions/discord/setup-entry.js +38 -38
- package/dist/extensions/elevenlabs/index.d.ts +1 -1
- package/dist/extensions/elevenlabs/index.js +35 -35
- package/dist/extensions/feishu/index.d.ts +2 -2
- package/dist/extensions/feishu/index.js +40 -40
- package/dist/extensions/feishu/setup-entry.d.ts +2 -2
- package/dist/extensions/feishu/setup-entry.js +37 -37
- package/dist/extensions/firecrawl/index.d.ts +1 -1
- package/dist/extensions/firecrawl/index.js +35 -35
- package/dist/extensions/github-copilot/index.d.ts +1 -1
- package/dist/extensions/github-copilot/index.js +35 -35
- package/dist/extensions/google/index.d.ts +1 -1
- package/dist/extensions/google/index.js +35 -35
- package/dist/extensions/googlechat/index.d.ts +1 -1
- package/dist/extensions/googlechat/index.js +38 -38
- package/dist/extensions/googlechat/setup-entry.d.ts +1 -1
- package/dist/extensions/googlechat/setup-entry.js +38 -38
- package/dist/extensions/huggingface/index.d.ts +1 -1
- package/dist/extensions/huggingface/index.js +35 -35
- package/dist/extensions/imessage/index.d.ts +1 -1
- package/dist/extensions/imessage/index.js +39 -39
- package/dist/extensions/imessage/setup-entry.d.ts +1 -1
- package/dist/extensions/imessage/setup-entry.js +39 -39
- package/dist/extensions/irc/index.d.ts +1 -1
- package/dist/extensions/irc/index.js +38 -38
- package/dist/extensions/irc/setup-entry.d.ts +2 -2
- package/dist/extensions/irc/setup-entry.js +38 -38
- package/dist/extensions/kakao-talkchannel/index.d.ts +1 -1
- package/dist/extensions/kakao-talkchannel/index.js +4 -4
- package/dist/extensions/kilocode/index.d.ts +1 -1
- package/dist/extensions/kilocode/index.js +35 -35
- package/dist/extensions/kimi-coding/index.d.ts +1 -1
- package/dist/extensions/kimi-coding/index.js +35 -35
- package/dist/extensions/line/index.d.ts +1 -1
- package/dist/extensions/line/index.js +37 -37
- package/dist/extensions/line/setup-entry.d.ts +1 -1
- package/dist/extensions/line/setup-entry.js +37 -37
- package/dist/extensions/llm-task/index.d.ts +1 -1
- package/dist/extensions/llm-task/index.js +35 -35
- package/dist/extensions/lobster/index.d.ts +1 -1
- package/dist/extensions/lobster/index.js +4 -4
- package/dist/extensions/matrix/index.d.ts +1 -1
- package/dist/extensions/matrix/index.js +40 -40
- package/dist/extensions/matrix/setup-entry.d.ts +2 -2
- package/dist/extensions/matrix/setup-entry.js +40 -40
- package/dist/extensions/mattermost/index.d.ts +1 -1
- package/dist/extensions/mattermost/index.js +37 -37
- package/dist/extensions/mattermost/setup-entry.d.ts +2 -2
- package/dist/extensions/mattermost/setup-entry.js +37 -37
- package/dist/extensions/memory-core/index.d.ts +1 -1
- package/dist/extensions/memory-core/index.js +4 -4
- package/dist/extensions/memory-lancedb/index.d.ts +1 -1
- package/dist/extensions/memory-lancedb/index.js +4 -4
- package/dist/extensions/microsoft/index.d.ts +1 -1
- package/dist/extensions/microsoft/index.js +35 -35
- package/dist/extensions/minimax/index.d.ts +1 -1
- package/dist/extensions/minimax/index.js +35 -35
- package/dist/extensions/mistral/index.d.ts +1 -1
- package/dist/extensions/mistral/index.js +35 -35
- package/dist/extensions/modelstudio/index.d.ts +1 -1
- package/dist/extensions/modelstudio/index.js +35 -35
- package/dist/extensions/moonshot/index.d.ts +1 -1
- package/dist/extensions/moonshot/index.js +35 -35
- package/dist/extensions/msteams/index.d.ts +1 -1
- package/dist/extensions/msteams/index.js +40 -40
- package/dist/extensions/msteams/setup-entry.d.ts +1 -1
- package/dist/extensions/msteams/setup-entry.js +40 -40
- package/dist/extensions/nextcloud-talk/index.d.ts +1 -1
- package/dist/extensions/nextcloud-talk/index.js +37 -37
- package/dist/extensions/nextcloud-talk/setup-entry.d.ts +2 -2
- package/dist/extensions/nextcloud-talk/setup-entry.js +37 -37
- package/dist/extensions/nostr/index.d.ts +1 -1
- package/dist/extensions/nostr/index.js +37 -37
- package/dist/extensions/nostr/setup-entry.d.ts +1 -1
- package/dist/extensions/nostr/setup-entry.js +37 -37
- package/dist/extensions/nvidia/index.d.ts +1 -1
- package/dist/extensions/nvidia/index.js +4 -4
- package/dist/extensions/ollama/index.d.ts +1 -1
- package/dist/extensions/ollama/index.js +7 -7
- package/dist/extensions/open-prose/index.d.ts +1 -1
- package/dist/extensions/open-prose/index.js +4 -4
- package/dist/extensions/openai/index.d.ts +1 -1
- package/dist/extensions/openai/index.js +35 -35
- package/dist/extensions/opencode/index.d.ts +1 -1
- package/dist/extensions/opencode/index.js +35 -35
- package/dist/extensions/opencode-go/index.d.ts +1 -1
- package/dist/extensions/opencode-go/index.js +35 -35
- package/dist/extensions/openrouter/index.d.ts +1 -1
- package/dist/extensions/openrouter/index.js +35 -35
- package/dist/extensions/openshell/index.d.ts +1 -1
- package/dist/extensions/openshell/index.js +35 -35
- package/dist/extensions/perplexity/index.d.ts +1 -1
- package/dist/extensions/perplexity/index.js +5 -5
- package/dist/extensions/phone-control/index.d.ts +1 -1
- package/dist/extensions/phone-control/index.js +4 -4
- package/dist/extensions/qianfan/index.d.ts +1 -1
- package/dist/extensions/qianfan/index.js +35 -35
- package/dist/extensions/qwen-portal-auth/index.d.ts +1 -1
- package/dist/extensions/qwen-portal-auth/index.js +35 -35
- package/dist/extensions/sglang/index.d.ts +1 -1
- package/dist/extensions/sglang/index.js +35 -35
- package/dist/extensions/signal/index.d.ts +1 -1
- package/dist/extensions/signal/index.js +38 -38
- package/dist/extensions/signal/setup-entry.d.ts +1 -1
- package/dist/extensions/signal/setup-entry.js +38 -38
- package/dist/extensions/slack/index.d.ts +1 -1
- package/dist/extensions/slack/index.js +39 -39
- package/dist/extensions/slack/setup-entry.d.ts +1 -1
- package/dist/extensions/slack/setup-entry.js +38 -38
- package/dist/extensions/synology-chat/index.d.ts +1 -1
- package/dist/extensions/synology-chat/index.js +37 -37
- package/dist/extensions/synology-chat/setup-entry.d.ts +1 -1
- package/dist/extensions/synology-chat/setup-entry.js +37 -37
- package/dist/extensions/synthetic/index.d.ts +1 -1
- package/dist/extensions/synthetic/index.js +35 -35
- package/dist/extensions/talk-voice/index.d.ts +1 -1
- package/dist/extensions/talk-voice/index.js +35 -35
- package/dist/extensions/telegram/index.d.ts +1 -1
- package/dist/extensions/telegram/index.js +38 -38
- package/dist/extensions/telegram/setup-entry.d.ts +1 -1
- package/dist/extensions/telegram/setup-entry.js +37 -37
- package/dist/extensions/thread-ownership/index.d.ts +1 -1
- package/dist/extensions/thread-ownership/index.js +4 -4
- package/dist/extensions/tlon/index.d.ts +1 -1
- package/dist/extensions/tlon/index.js +37 -37
- package/dist/extensions/tlon/setup-entry.d.ts +1 -1
- package/dist/extensions/tlon/setup-entry.js +37 -37
- package/dist/extensions/together/index.d.ts +1 -1
- package/dist/extensions/together/index.js +35 -35
- package/dist/extensions/twitch/index.d.ts +2 -2
- package/dist/extensions/twitch/index.js +37 -37
- package/dist/extensions/venice/index.d.ts +1 -1
- package/dist/extensions/venice/index.js +35 -35
- package/dist/extensions/vercel-ai-gateway/index.d.ts +1 -1
- package/dist/extensions/vercel-ai-gateway/index.js +36 -36
- package/dist/extensions/vllm/index.d.ts +1 -1
- package/dist/extensions/vllm/index.js +35 -35
- package/dist/extensions/voice-call/index.d.ts +1 -1
- package/dist/extensions/voice-call/index.js +35 -35
- package/dist/extensions/volcengine/index.d.ts +1 -1
- package/dist/extensions/volcengine/index.js +35 -35
- package/dist/extensions/whatsapp/index.d.ts +1 -1
- package/dist/extensions/whatsapp/index.js +38 -38
- package/dist/extensions/whatsapp/setup-entry.d.ts +1 -1
- package/dist/extensions/whatsapp/setup-entry.js +38 -38
- package/dist/extensions/xai/index.d.ts +1 -1
- package/dist/extensions/xai/index.js +35 -35
- package/dist/extensions/xiaomi/index.d.ts +1 -1
- package/dist/extensions/xiaomi/index.js +35 -35
- package/dist/extensions/zai/index.d.ts +1 -1
- package/dist/extensions/zai/index.js +35 -35
- package/dist/extensions/zalo/index.d.ts +1 -1
- package/dist/extensions/zalo/index.js +39 -39
- package/dist/extensions/zalo/setup-entry.d.ts +1 -1
- package/dist/extensions/zalo/setup-entry.js +39 -39
- package/dist/extensions/zalouser/index.d.ts +1 -1
- package/dist/extensions/zalouser/index.js +40 -40
- package/dist/extensions/zalouser/setup-entry.d.ts +1 -1
- package/dist/extensions/zalouser/setup-entry.js +40 -40
- package/dist/feishu-fIcnHDTd.d.ts +36 -0
- package/dist/gateway-cli-DofujQf3.js +26437 -0
- package/dist/gateway-install-token-vvtOvufH.js +163 -0
- package/dist/gateway-rpc-C0Vk51W7.js +26 -0
- package/dist/gateway-runtime-CBm3CCoA.js +69 -0
- package/dist/git-commit-BTWXFY41.js +177 -0
- package/dist/git-commit-D6GTN5Yt.js +2 -0
- package/dist/googlechat-BvwsCVKl.d.ts +12 -0
- package/dist/googlechat-DzoFLiDG.js +307 -0
- package/dist/group-access-DpiQnd-G.d.ts +61 -0
- package/dist/health-CqUU_ecm.js +570 -0
- package/dist/health-Dzn8BT5I.js +113 -0
- package/dist/heartbeat-summary-Dct2lqJj.js +57 -0
- package/dist/help-CtwSApfq.js +81 -0
- package/dist/hooks-9gokOxZ5.d.ts +6 -0
- package/dist/hooks-cli-DtBvd1lb.js +1000 -0
- package/dist/hooks-status-Bm_pGORf.js +78 -0
- package/dist/http-registry-D-S6a1Na.d.ts +20 -0
- package/dist/identity-file-Diub2a0t.js +60 -0
- package/dist/image-generation-CbIVzmAR.d.ts +9 -0
- package/dist/imessage-C7Z59nbV.js +31 -0
- package/dist/imessage-scXvYYHX.js +115 -0
- package/dist/inbound-reply-dispatch-gzPJFtkc.js +71 -0
- package/dist/inbound-reply-dispatch-n7U3qg15.d.ts +72 -0
- package/dist/index.js +2 -2
- package/dist/install-target-B4n74f_B.js +574 -0
- package/dist/installs-e1WEcS2x.js +532 -0
- package/dist/io-BaBxjB1v.js +9739 -0
- package/dist/io-CgHb1Jld.js +29 -0
- package/dist/irc-DxJ7uOKl.js +672 -0
- package/dist/library-DjjiKiBC.js +112 -0
- package/dist/lifecycle-core-Dn8PK6nk.js +382 -0
- package/dist/line/accounts.d.ts +2 -2
- package/dist/line/send.d.ts +1 -1
- package/dist/line/send.js +7 -7
- package/dist/line/template-messages.d.ts +1 -1
- package/dist/line-B5QFpgN_.d.ts +75 -0
- package/dist/line-BBiBiGgL.js +530 -0
- package/dist/llm-slug-generator-BQ09Fz6D.js +67 -0
- package/dist/llm-slug-generator.d.ts +1 -1
- package/dist/llm-slug-generator.js +36 -36
- package/dist/logging-CdisccbY.js +13 -0
- package/dist/logging-LKQSgX1d.js +30 -0
- package/dist/login-qr-B2ElPfmb.js +112 -0
- package/dist/login-qr-Di3uPIK1.js +233 -0
- package/dist/logs-cli-CNzOvZ2d.js +256 -0
- package/dist/manager-runtime-2RwW64dE.js +111 -0
- package/dist/manager.runtime-BacHmSFL.js +715 -0
- package/dist/manifest-registry-CS_p1OBQ.js +1329 -0
- package/dist/matrix-43_RGLZN.d.ts +68 -0
- package/dist/matrix-6-xpfQHf.js +1269 -0
- package/dist/matrix-DKYdZvGK.js +1495 -0
- package/dist/mcp-cli-Ci2jvv3s.js +87 -0
- package/dist/media-understanding.runtime-0668UZMb.js +116 -0
- package/dist/memory-cli-BGfRJOPh.js +111 -0
- package/dist/memory-search-BHhETk6u.js +17 -0
- package/dist/memory-search-tTD5o_rU.js +204 -0
- package/dist/method-scopes-B2ZKSsxQ.js +2452 -0
- package/dist/model-auth-markers-LqZ4qhrZ.d.ts +20 -0
- package/dist/model-picker-D9Gmg9vM.js +390 -0
- package/dist/model-picker-VOam6Dfa.js +112 -0
- package/dist/model-picker.runtime-B8h4yaGk.js +125 -0
- package/dist/model-selection-bBBxfXdb.js +653 -0
- package/dist/model-suppression.runtime-IpdzuuaW.js +116 -0
- package/dist/models-CEr8OkSA.js +118 -0
- package/dist/models-FgjlnyvT.js +2514 -0
- package/dist/models-cli-CdXULEZe.js +309 -0
- package/dist/models-config-UQxq76ac.js +111 -0
- package/dist/models-config.providers.discovery-puxTsH39.d.ts +18 -0
- package/dist/moldclaw-root-Cb6HRlUO.js +92 -0
- package/dist/monitor-BGAB5pZp.js +772 -0
- package/dist/monitor-C_1qA4q5.js +6823 -0
- package/dist/monitor-D8WcCUuA.js +782 -0
- package/dist/monitor-DesGoihT.js +113 -0
- package/dist/monitor-DhrUY3U6.js +3468 -0
- package/dist/monitor-DsDCIG87.js +3076 -0
- package/dist/monitor-dBB-luY7.js +115 -0
- package/dist/monitor-shared-CkicpwVc.js +444 -0
- package/dist/msteams-qmY7xMCK.js +852 -0
- package/dist/node-cli-B_2nTm80.js +2503 -0
- package/dist/node-resolve-BYC2FbO2.js +835 -0
- package/dist/nodes-cli-CBX71Wd_.js +1380 -0
- package/dist/nostr-BFKRoOlz.d.ts +7 -0
- package/dist/nostr-OB78XVlq.js +8744 -0
- package/dist/npm-resolution-DZJB3Hgh.js +60 -0
- package/dist/oauth-env-CLG8KOrz.js +10 -0
- package/dist/onboard-BON0C360.js +48 -0
- package/dist/onboard-DsKI17iq.js +25 -0
- package/dist/onboard-DyBwXVGT.js +589 -0
- package/dist/onboard-channels-BaVA02kK.js +1241 -0
- package/dist/onboard-channels-JJVMXpKl.js +205 -0
- package/dist/onboard-custom-D6YDrk9n.js +571 -0
- package/dist/onboard-custom-DqsNalL1.js +114 -0
- package/dist/onboard-helpers-DiSRTpZC.js +335 -0
- package/dist/onboard-helpers-DqZsjdb8.js +113 -0
- package/dist/onboard-hooks-pzEPZAvl.js +72 -0
- package/dist/onboard-remote-DFMLELsg.js +181 -0
- package/dist/onboard-remote-DmMYxY80.js +117 -0
- package/dist/onboard-search-B7FsNd7m.js +302 -0
- package/dist/onboard-skills-BJRdI-K3.js +133 -0
- package/dist/onboard-skills-Cg1YQAZa.js +117 -0
- package/dist/outbound-media-BHD4aJEX.d.ts +11 -0
- package/dist/outbound-media-CrraEXXv.js +11 -0
- package/dist/pairing-access-CzHpaM0R.d.ts +21 -0
- package/dist/pairing-cli-DSQTYgc0.js +217 -0
- package/dist/perplexity-CXwMDD3u.js +24 -0
- package/dist/persistent-dedupe-B9vrAf8t.d.ts +26 -0
- package/dist/pi-model-discovery-runtime-vSSbBDFG.js +111 -0
- package/dist/pi-tools.before-tool-call.runtime-C5yLUogH.js +381 -0
- package/dist/plugin-install-B1RfdrdV.js +117 -0
- package/dist/plugin-install-C9aaL42Y.js +184 -0
- package/dist/plugin-install-plan-BlfDt117.js +49 -0
- package/dist/plugin-registry-D2P9SYJ9.js +113 -0
- package/dist/plugin-registry-QtjVXmj3.js +49 -0
- package/dist/plugin-sdk/account-resolution.js +35 -35
- package/dist/plugin-sdk/acp-runtime.js +35 -35
- package/dist/plugin-sdk/agent-runtime.js +35 -35
- package/dist/plugin-sdk/bluebubbles.js +37 -37
- package/dist/plugin-sdk/channel-config-helpers.js +35 -35
- package/dist/plugin-sdk/channel-policy.js +35 -35
- package/dist/plugin-sdk/channel-runtime.js +35 -35
- package/dist/plugin-sdk/compat.js +36 -36
- package/dist/plugin-sdk/config-runtime.js +35 -35
- package/dist/plugin-sdk/conversation-runtime.js +35 -35
- package/dist/plugin-sdk/copilot-proxy.js +4 -4
- package/dist/plugin-sdk/core.js +4 -4
- package/dist/plugin-sdk/device-pair.js +4 -4
- package/dist/plugin-sdk/discord.js +35 -35
- package/dist/plugin-sdk/feishu.js +35 -35
- package/dist/plugin-sdk/gateway-runtime.js +10 -10
- package/dist/plugin-sdk/googlechat.js +37 -37
- package/dist/plugin-sdk/image-generation-runtime.js +35 -35
- package/dist/plugin-sdk/image-generation.js +35 -35
- package/dist/plugin-sdk/imessage.js +36 -36
- package/dist/plugin-sdk/index.js +35 -35
- package/dist/plugin-sdk/infra-runtime.js +35 -35
- package/dist/plugin-sdk/irc.js +37 -37
- package/dist/plugin-sdk/line.js +36 -36
- package/dist/plugin-sdk/llm-task.js +35 -35
- package/dist/plugin-sdk/lobster.js +4 -4
- package/dist/plugin-sdk/matrix.js +37 -37
- package/dist/plugin-sdk/mattermost.js +36 -36
- package/dist/plugin-sdk/media-runtime.js +35 -35
- package/dist/plugin-sdk/media-understanding-runtime.js +35 -35
- package/dist/plugin-sdk/media-understanding.js +35 -35
- package/dist/plugin-sdk/memory-lancedb.js +4 -4
- package/dist/plugin-sdk/minimax-portal-auth.js +4 -4
- package/dist/plugin-sdk/msteams.js +38 -38
- package/dist/plugin-sdk/nextcloud-talk.js +36 -36
- package/dist/plugin-sdk/nostr.js +36 -36
- package/dist/plugin-sdk/ollama-setup.js +9 -9
- package/dist/plugin-sdk/open-prose.js +4 -4
- package/dist/plugin-sdk/phone-control.js +4 -4
- package/dist/plugin-sdk/plugin-runtime.js +35 -35
- package/dist/plugin-sdk/provider-auth.js +35 -35
- package/dist/plugin-sdk/provider-models.js +5 -5
- package/dist/plugin-sdk/provider-onboard.js +4 -4
- package/dist/plugin-sdk/provider-setup.js +39 -39
- package/dist/plugin-sdk/provider-stream.js +4 -4
- package/dist/plugin-sdk/provider-usage.js +4 -4
- package/dist/plugin-sdk/qwen-portal-auth.js +35 -35
- package/dist/plugin-sdk/reply-history.js +35 -35
- package/dist/plugin-sdk/reply-runtime.js +35 -35
- package/dist/plugin-sdk/routing.js +3 -3
- package/dist/plugin-sdk/sandbox.js +35 -35
- package/dist/plugin-sdk/security-runtime.js +35 -35
- package/dist/plugin-sdk/self-hosted-provider-setup.js +37 -37
- package/dist/plugin-sdk/setup.js +35 -35
- package/dist/plugin-sdk/signal.js +35 -35
- package/dist/plugin-sdk/slack.js +35 -35
- package/dist/plugin-sdk/speech-runtime.js +35 -35
- package/dist/plugin-sdk/speech.js +35 -35
- package/dist/plugin-sdk/src/secrets/secure-file-store.d.ts +26 -0
- package/dist/plugin-sdk/src/subscription/provider.d.ts +5 -3
- package/dist/plugin-sdk/synology-chat.js +36 -36
- package/dist/plugin-sdk/talk-voice.js +4 -4
- package/dist/plugin-sdk/telegram.js +35 -35
- package/dist/plugin-sdk/text-runtime.js +7 -7
- package/dist/plugin-sdk/thread-ownership.js +4 -4
- package/dist/plugin-sdk/tlon.js +36 -36
- package/dist/plugin-sdk/twitch.js +35 -35
- package/dist/plugin-sdk/voice-call.js +35 -35
- package/dist/plugin-sdk/whatsapp.js +35 -35
- package/dist/plugin-sdk/zalo.js +38 -38
- package/dist/plugin-sdk/zalouser.js +38 -38
- package/dist/plugins/runtime/index.d.ts +1 -1
- package/dist/plugins/runtime/index.js +35 -35
- package/dist/plugins-CAULK-lt.js +111 -0
- package/dist/plugins-cli-BGAgYy3Z.js +917 -0
- package/dist/policy-WKZJ8cPK.js +143 -0
- package/dist/preflight-audio.runtime-Bc6Hv-u4.js +116 -0
- package/dist/probe-B7a_VBCB.js +47 -0
- package/dist/probe-BLioBOhT.js +6329 -0
- package/dist/probe-BkM5pykD.js +21 -0
- package/dist/probe-DOEaWez2.js +1793 -0
- package/dist/probe-DpcJ0WeP.js +129 -0
- package/dist/probe-auth-BcNjX8hy.js +40 -0
- package/dist/probe-auth-DhuAb8ls.js +48 -0
- package/dist/program-zG0CuBsn.js +253 -0
- package/dist/prompt-select-styled-B-D6NQFO.js +2673 -0
- package/dist/provider-api-key-auth.runtime-DgGM_pHf.js +121 -0
- package/dist/provider-auth-choice-BOQA0idb.js +126 -0
- package/dist/provider-auth-choice-helpers-hzDkh3f1.js +48 -0
- package/dist/provider-auth-choice-preference-BPcuoO9b.js +189 -0
- package/dist/provider-auth-choice.runtime-B4E0A4J8.js +123 -0
- package/dist/provider-auth-choices-0KaDNPBQ.js +57 -0
- package/dist/provider-auth-guidance-BxxMxMEt.js +34 -0
- package/dist/provider-auth-result-Bto1bYtS.d.ts +18 -0
- package/dist/provider-models-DxOmeToO.d.ts +867 -0
- package/dist/provider-models-xnyxy6mO.js +2113 -0
- package/dist/provider-ollama-setup-DBYK__ov.d.ts +32 -0
- package/dist/provider-ollama-setup-QzgCxj44.js +314 -0
- package/dist/provider-onboard-B9ionepI.js +139 -0
- package/dist/provider-onboard-CURxJ_UX.d.ts +40 -0
- package/dist/provider-runtime.runtime-DFAIaPZT.js +111 -0
- package/dist/provider-self-hosted-setup-CclMg3QB.js +182 -0
- package/dist/provider-self-hosted-setup-qeY8BYSy.d.ts +61 -0
- package/dist/provider-stream-Chz_EFw3.js +512 -0
- package/dist/provider-usage-Cn_OrdMP.js +111 -0
- package/dist/provider-usage-kxemdMp2.js +633 -0
- package/dist/provider-wizard-BMc1Dzks.js +152 -0
- package/dist/push-apns-CuIs_G0k.js +1038 -0
- package/dist/pw-ai-DUe4BbH2.js +1867 -0
- package/dist/qmd-manager-CAAFp7qK.js +1570 -0
- package/dist/qr-cli-9H9go9JE.js +113 -0
- package/dist/qr-cli-Bxxttvx3.js +369 -0
- package/dist/reactions-Dx2ypGlm.js +281 -0
- package/dist/read-only-account-inspect.discord.runtime-D_RVd1-r.js +116 -0
- package/dist/read-only-account-inspect.slack.runtime-Ckl92Rhy.js +116 -0
- package/dist/read-only-account-inspect.telegram.runtime-D97ssjQk.js +116 -0
- package/dist/redact-snapshot-ojhTflxp.js +2663 -0
- package/dist/register.agent-DlBmy_RL.js +439 -0
- package/dist/register.backup-8nOYtJqg.js +625 -0
- package/dist/register.configure-BV_GUQ5w.js +252 -0
- package/dist/register.maintenance-BafAHBum.js +574 -0
- package/dist/register.message-CHhfcEq2.js +709 -0
- package/dist/register.onboard-DjPNnlnr.js +192 -0
- package/dist/register.setup-BMGXI9PG.js +212 -0
- package/dist/register.status-health-sessions-BJMsh2AL.js +498 -0
- package/dist/register.subclis-B7nrik3-.js +315 -0
- package/dist/register.subclis-BCoAVyGn.js +13 -0
- package/dist/replies-BU4AvOyD.js +110 -0
- package/dist/resolve-channels-CDfj5NGq.js +226 -0
- package/dist/resolve-channels-Cz120Lvf.js +262 -0
- package/dist/resolve-route-DdX-HBVt.js +538 -0
- package/dist/resolve-users-Bc6nRqpb.js +143 -0
- package/dist/root-help-QAkoA7GD.js +32 -0
- package/dist/routes-CcJNnwTF.js +7097 -0
- package/dist/rpc-DDUAlBbH.js +67 -0
- package/dist/run-main-Cf8vXm6i.js +424 -0
- package/dist/runtime-Bitmi8Er.d.ts +26 -0
- package/dist/runtime-discord-ops.runtime-DWBnG-Hf.js +9078 -0
- package/dist/runtime-slack-ops.runtime-oYfbYvX4.js +4556 -0
- package/dist/runtime-telegram-ops.runtime-EPGDYN1f.js +133 -0
- package/dist/runtime-whatsapp-login.runtime-BGJoKM2h.js +114 -0
- package/dist/runtime-whatsapp-outbound.runtime-D3Sag6Bv.js +117 -0
- package/dist/sandbox-cli-waaYyhsC.js +535 -0
- package/dist/search-manager-BjDsOXzB.js +16 -0
- package/dist/search-manager-D-G9UaXe.js +386 -0
- package/dist/secrets-cli-BmeEhlzt.js +2070 -0
- package/dist/security-cli-CSsLnFuN.js +575 -0
- package/dist/send-6o7piqfv.js +100 -0
- package/dist/send-99FyFLgk.js +629 -0
- package/dist/send-B1pX9_Oc.js +283 -0
- package/dist/send-Dg5-AjXW.js +1025 -0
- package/dist/send-LdV9TRoN.js +631 -0
- package/dist/server-node-events-BAUUKNFW.js +506 -0
- package/dist/server-zI_K-D05.js +107 -0
- package/dist/sessions-DJGywtY2.js +112 -0
- package/dist/sessions-WR0GKdGl.js +218 -0
- package/dist/setup-2LvBON2J.js +387 -0
- package/dist/setup-CFIMq-Pz.d.ts +37 -0
- package/dist/setup-binary-CcAv8NXz.js +406 -0
- package/dist/setup-browser-C4eRV3h6.js +70 -0
- package/dist/setup-core-ByqF8Nvc.js +166 -0
- package/dist/setup-core-COkq8Zop.js +205 -0
- package/dist/setup-core-C_o77DVV.js +143 -0
- package/dist/setup-core-tAdHbqi9.js +47 -0
- package/dist/setup-surface-DMHtZByF.js +490 -0
- package/dist/setup-wizard-helpers-r0J6l8ST.d.ts +203 -0
- package/dist/setup.finalize-pTkXn8pV.js +522 -0
- package/dist/setup.gateway-config-D1wiUQe6.js +343 -0
- package/dist/shared-BaM_tMxk.js +102 -0
- package/dist/shared-BgUgXsM9.js +75 -0
- package/dist/shared-CezRuVfl.js +96 -0
- package/dist/shared-DQgf3R0B.js +298 -0
- package/dist/shared-RA6kxQfu.js +182 -0
- package/dist/signal-xxP4dGx7.js +114 -0
- package/dist/skills-Bio8GwTE.js +20 -0
- package/dist/skills-DE_MXFSN.js +853 -0
- package/dist/skills-cli-BGuW-tKw.js +292 -0
- package/dist/skills-install-BIlG41ei.js +763 -0
- package/dist/skills-status-B08PtBc_.js +21 -0
- package/dist/skills-status-CzM008aB.js +169 -0
- package/dist/slack-Bzt3M7d8.js +114 -0
- package/dist/slash-commands.runtime-EYqj8SbV.js +128 -0
- package/dist/slash-dispatch.runtime-vWH92PUY.js +141 -0
- package/dist/slash-skill-commands.runtime-sUTjM3J0.js +116 -0
- package/dist/src-Iso9-DPo.js +1701 -0
- package/dist/status-8S882KRO.js +43 -0
- package/dist/status-BF7h_jTB.js +126 -0
- package/dist/status-DxOIyRm9.js +131 -0
- package/dist/status-HlvixAOq.js +606 -0
- package/dist/status-json-CShBo8A6.js +288 -0
- package/dist/status-qhtgsJFd.js +1599 -0
- package/dist/status.link-channel-D3dLYZiH.js +143 -0
- package/dist/status.scan.deps.runtime-mCmOLzpG.js +126 -0
- package/dist/status.scan.runtime-CYuUlDeg.js +119 -0
- package/dist/status.summary-BjB1aTjV.js +592 -0
- package/dist/status.summary.runtime-DW4MOt1Z.js +118 -0
- package/dist/status.update-BxblMS7P.js +77 -0
- package/dist/subagent-orphan-recovery-CCVopsdP.js +307 -0
- package/dist/subagent-registry-runtime-oG47Fzvg.js +111 -0
- package/dist/subscription-CpFdxuFS.js +33 -0
- package/dist/subscription-DaA1urx-.js +102 -0
- package/dist/subscription-cli-Bvto9EmO.js +134 -0
- package/dist/synology-chat-CVy1tJGY.js +297 -0
- package/dist/system-cli-BvNps8sl.js +94 -0
- package/dist/telegram/audit.d.ts +1 -1
- package/dist/telegram/audit.js +1 -1
- package/dist/telegram/token.d.ts +1 -1
- package/dist/telegram/token.js +35 -35
- package/dist/telegram-Dug8pd82.js +114 -0
- package/dist/text-chunking-CQ6ttpWs.js +84 -0
- package/dist/text-chunking-DDUU_vAF.d.ts +79 -0
- package/dist/tlon-BnckVr_7.js +433 -0
- package/dist/tui-DXTge9Ac.js +3834 -0
- package/dist/tui-cli-BRUfLUTd.js +137 -0
- package/dist/types-2H_e7eWT.d.ts +45 -0
- package/dist/types-ZKnGUchG.d.ts +22692 -0
- package/dist/types.base-BFiQZ4J9.d.ts +188 -0
- package/dist/ui--iP08xRA.js +31 -0
- package/dist/update-CtxBD-Cf.js +1036 -0
- package/dist/update-cli-DPE3GCHJ.js +1503 -0
- package/dist/update-offset-store-BlBY7dWj.js +112 -0
- package/dist/update-runner-Cfcrhf2j.js +1496 -0
- package/dist/upsert-with-lock-BZU7Le8n.js +33 -0
- package/dist/usage-Czgwvg0h.js +115 -0
- package/dist/web-BGDXhunB.js +112 -0
- package/dist/web-shared-B5Q0mIJq.d.ts +45 -0
- package/dist/webhook-request-guards-CsKDhZJr.d.ts +76 -0
- package/dist/webhook-targets-CjxuEE9C.d.ts +106 -0
- package/dist/webhook-targets-Dtt6rH4N.js +181 -0
- package/dist/webhooks-cli-Wl9y6AWW.js +350 -0
- package/dist/whatsapp-D64cBQ_9.js +114 -0
- package/dist/whatsapp-actions-CVoTcagb.js +167 -0
- package/dist/workspace-DJ_S272u.js +484 -0
- package/dist/workspace-DbZSqjw0.js +289 -0
- package/dist/workspace-cli-D93DLmAh.js +154 -0
- package/dist/workspace-dirs-CGeIPpGN.js +2003 -0
- package/dist/zalo-CK2dlGmu.d.ts +9 -0
- package/dist/zalo-DxoY8M22.js +415 -0
- package/dist/zalouser-DTHIrPvs.js +30911 -0
- package/extensions/discord/src/monitor/allow-list.ts +8 -1
- package/extensions/discord/src/monitor/message-handler.preflight.ts +4 -1
- package/package.json +1 -1
- package/dist/accounts-CS8U4v8C.js +0 -114
- package/dist/accounts-gLr-Udmt.d.ts +0 -103
- package/dist/acp-cli-BGT0jXcC.js +0 -2093
- package/dist/actions.runtime-BfckTw6c.js +0 -119
- package/dist/actions.runtime-Cl9mBfqH.js +0 -133
- package/dist/agent-scope-C-YmLnnb.js +0 -208
- package/dist/agents-CydD54p8.js +0 -222
- package/dist/agents-DpQsZO6O.js +0 -853
- package/dist/agents.config-XU7IsYE-.js +0 -121
- package/dist/agents.config-ssoQXuvF.js +0 -17
- package/dist/allow-list-Cfn6lmMK.js +0 -81
- package/dist/allowlist-CCYXVpM9.js +0 -142
- package/dist/api-BoXoFKxy.js +0 -117
- package/dist/audit-Bv05N5o9.js +0 -787
- package/dist/audit-CIWW1Aqm.js +0 -54
- package/dist/audit-channel.collect.runtime-Bi7yrdcO.js +0 -605
- package/dist/audit-channel.runtime-C_NDweiW.js +0 -121
- package/dist/audit-extra.async-Dp7OKSXg.js +0 -813
- package/dist/audit-membership-runtime-B8FQ6VtN.js +0 -162
- package/dist/audit.deep.runtime-CXhobL6b.js +0 -25
- package/dist/audit.nondeep.runtime-CrEm3T16.js +0 -832
- package/dist/audit.runtime-CJPKj1Zg.js +0 -118
- package/dist/auth-Byfp0flq.js +0 -101
- package/dist/auth-choice-BgOjdeXN.js +0 -507
- package/dist/auth-choice-CD1Heq0M.js +0 -122
- package/dist/auth-choice-ePNfg0iQ.js +0 -268
- package/dist/auth-choice-options-BlewQWI0.js +0 -123
- package/dist/auth-choice-prompt-BP2b6aXz.js +0 -36
- package/dist/auth-choice-prompt-Cmwl4n97.js +0 -115
- package/dist/auth-choice.apply-helpers-Dq-nxuuX.js +0 -66
- package/dist/auth-choice.plugin-providers.runtime-B23kOUzQ.js +0 -119
- package/dist/auth-profiles-1kPLbBwI.js +0 -127823
- package/dist/auth-profiles.runtime-DAfSjku1.js +0 -116
- package/dist/banner-DeOsobLO.js +0 -342
- package/dist/bluebubbles-BsLGedBM.js +0 -64
- package/dist/bluebubbles-U2sAfO4_.d.ts +0 -6
- package/dist/bot-DW12K3bO.d.ts +0 -478
- package/dist/brave-BoWimrLe.js +0 -24
- package/dist/browser-cli-D_S3wEYE.js +0 -1494
- package/dist/call-ByEzDJ1_.js +0 -640
- package/dist/call-CHCWVg-O.js +0 -39
- package/dist/channel-3VC0oOMu.js +0 -214
- package/dist/channel-B9fCBPiS.js +0 -207
- package/dist/channel-B9q775cM.js +0 -562
- package/dist/channel-BG3UK54j.js +0 -803
- package/dist/channel-BRQAdMML.js +0 -352
- package/dist/channel-BmlLp933.js +0 -1321
- package/dist/channel-By6KvdTG.js +0 -920
- package/dist/channel-C8rRsdf6.js +0 -226
- package/dist/channel-CLEDBbXE.js +0 -943
- package/dist/channel-CMvBAG7o.js +0 -306
- package/dist/channel-CmlxxjHY.js +0 -1598
- package/dist/channel-CqG6_xN0.js +0 -949
- package/dist/channel-DNueHKs92.js +0 -316
- package/dist/channel-DUtyN7BX.js +0 -4681
- package/dist/channel-DWD6GrfZ.js +0 -538
- package/dist/channel-DaRYMYzj.js +0 -619
- package/dist/channel-Dj6BgLp8.js +0 -575
- package/dist/channel-account-context-Ba3u5D21.js +0 -103
- package/dist/channel-crabk6Em.js +0 -542
- package/dist/channel-i8uqQaK2.js +0 -497
- package/dist/channel-options-xljvwHS2.js +0 -50
- package/dist/channel-plugin-ids-DAgknSG4.js +0 -26
- package/dist/channel-summary-dHTMCG75.js +0 -111
- package/dist/channel-xVWQ96Ni.js +0 -397
- package/dist/channel.runtime-B6PoZ4BV.js +0 -182
- package/dist/channel.runtime-BPZmo57e.js +0 -404
- package/dist/channel.runtime-B_1uGR-U.js +0 -199
- package/dist/channel.runtime-BiXnPU0d.js +0 -218
- package/dist/channel.runtime-BpvDc9sv.js +0 -870
- package/dist/channel.runtime-CUua3W80.js +0 -418
- package/dist/channel.runtime-CaCBTd0A.js +0 -179
- package/dist/channel.runtime-D0FfYvUj.js +0 -4011
- package/dist/channel.runtime-DhoJtpvJ.js +0 -241
- package/dist/channel.runtime-Kj9EXNE0.js +0 -127
- package/dist/channel.runtime-r4tPuPyh.js +0 -171
- package/dist/channel.setup-B7d_grfe.js +0 -6
- package/dist/channel.setup-C0vu1fhi.js +0 -9
- package/dist/channel.setup-CAI0FNHj.js +0 -11
- package/dist/channel.setup-CkDVwv5R.js +0 -57
- package/dist/channel.setup-Cpd00YqQ.js +0 -8
- package/dist/channel.setup-DbBz1-WT.js +0 -9
- package/dist/channel.setup-GZnAvD9g.js +0 -8
- package/dist/channels-5H484RSw.js +0 -1118
- package/dist/channels-BnPudfyx.js +0 -404
- package/dist/channels-cli-WIC-QeH_.js +0 -291
- package/dist/channels-status-issues-RDmzovJU.js +0 -16
- package/dist/clawbot-cli-BgutNwf8.js +0 -118
- package/dist/cleanup-utils-DBl1Aij1.js +0 -96
- package/dist/cli-1P7u6zqu.js +0 -154
- package/dist/command-registry-B8jovrws.js +0 -232
- package/dist/command-registry-DtDl1FVm.js +0 -14
- package/dist/command-secret-gateway-BgUo3FxJ.js +0 -111
- package/dist/compact.runtime-CXbXM0AU.js +0 -116
- package/dist/completion-cli-Cik_owAE.js +0 -17
- package/dist/completion-cli-RU3P2RSl.js +0 -445
- package/dist/config-5HUpB1L1.js +0 -31
- package/dist/config-cli-QHaUHoZI.js +0 -433
- package/dist/config-guard-C9Sn3pE-.js +0 -118
- package/dist/config-sW57gztj.js +0 -44
- package/dist/config-validation-5LkjIKNt.js +0 -262
- package/dist/config-value-CtTWALxG.js +0 -132
- package/dist/configure-BmR2TPLf.js +0 -243
- package/dist/configure-DaLN-5xM.js +0 -1100
- package/dist/control-ui-assets-CH3MYmAo.js +0 -232
- package/dist/control-ui-shared-CA77PTml.js +0 -29
- package/dist/core-CvDzLs7B.js +0 -150
- package/dist/core-dPA4nFkn.d.ts +0 -87
- package/dist/cron-cli-tguLpzyq.js +0 -639
- package/dist/daemon-cli-ptosOkL8.js +0 -339
- package/dist/daemon-install-DzU4EnVa.js +0 -180
- package/dist/deliver-DwxFoHM3.js +0 -111
- package/dist/deliver-runtime-DOdDyaPI.js +0 -111
- package/dist/device-id-cli-GopvlxxZ.js +0 -52
- package/dist/device-identity-CRfhC3_s.js +0 -365
- package/dist/devices-cli-ain7ESqU.js +0 -342
- package/dist/diagnostic-D96Xaqrj.js +0 -310
- package/dist/directory-cli-fh1UxGgY.js +0 -311
- package/dist/directory-config-helpers-CpU1oflo.d.ts +0 -38
- package/dist/directory.static-CKjJUNGl.js +0 -44
- package/dist/discord-CflhwDEM.js +0 -114
- package/dist/discovery-x0ZqY4AB.js +0 -48
- package/dist/dm-policy-shared-73A52W6E.d.ts +0 -95
- package/dist/dns-cli-DCHyKjGf.js +0 -217
- package/dist/docs-cli-D3OoqYSP.js +0 -174
- package/dist/doctor-completion-Bq2eP87s.js +0 -90
- package/dist/doctor-config-flow-D8XRG9Ku.js +0 -2437
- package/dist/doctor-config-flow-DGiF1HGc.js +0 -112
- package/dist/enable-0QSF4YGH.js +0 -24
- package/dist/exec-approvals-cli-Bncym0Gd.js +0 -421
- package/dist/feishu-B5JDcyF9.d.ts +0 -36
- package/dist/gateway-cli-DYscsmA-.js +0 -26437
- package/dist/gateway-install-token-CNv17ac9.js +0 -163
- package/dist/gateway-rpc-BGC1Rxvg.js +0 -26
- package/dist/gateway-runtime-D89mSQPB.js +0 -69
- package/dist/git-commit-CeLH5Ozm.js +0 -2
- package/dist/git-commit-DUKRiCP-.js +0 -177
- package/dist/googlechat-BgXeXjd1.js +0 -307
- package/dist/googlechat-De-T7C31.d.ts +0 -12
- package/dist/group-access-Deh1tVNr.d.ts +0 -61
- package/dist/health-BEjzWwaB.js +0 -570
- package/dist/health-FjqrWQL6.js +0 -113
- package/dist/heartbeat-summary-CfdSA9M1.js +0 -57
- package/dist/help-BZeVprq1.js +0 -81
- package/dist/hooks-B5pYs_d7.d.ts +0 -6
- package/dist/hooks-cli-B7uGJs2O.js +0 -1000
- package/dist/hooks-status-CfceaUSg.js +0 -78
- package/dist/http-registry-C-KXqwnj.d.ts +0 -20
- package/dist/identity-file-sshkKKIr.js +0 -60
- package/dist/image-generation-CafM5hZh.d.ts +0 -9
- package/dist/imessage-BcV3WGx_.js +0 -31
- package/dist/imessage-Dhje7Ty-.js +0 -115
- package/dist/inbound-reply-dispatch-C73_7SOl.js +0 -71
- package/dist/inbound-reply-dispatch-DmL0KWLe.d.ts +0 -72
- package/dist/install-target-D7NRhfzc.js +0 -574
- package/dist/installs-Bj6jblqc.js +0 -532
- package/dist/io-CMfWWPXQ.js +0 -9738
- package/dist/io-CV844hAM.js +0 -29
- package/dist/irc-DKi1fDYI.js +0 -672
- package/dist/library-rygTG3oA.js +0 -112
- package/dist/lifecycle-core-BPlvShWY.js +0 -382
- package/dist/line-CGsemKWJ.js +0 -530
- package/dist/line-CKU3ER-n.d.ts +0 -75
- package/dist/llm-slug-generator-DlhVyMqT.js +0 -67
- package/dist/logging-5wu9k6w4.js +0 -30
- package/dist/logging-CxP9suT8.js +0 -13
- package/dist/login-qr-BcDsiwHs.js +0 -233
- package/dist/login-qr-Y8pJ5yV4.js +0 -112
- package/dist/logs-cli-XI9oVXpH.js +0 -256
- package/dist/manager-runtime-DkIlXBhD.js +0 -111
- package/dist/manager.runtime-Q0q2rJCC.js +0 -715
- package/dist/manifest-registry-DAd0SRAP.js +0 -1329
- package/dist/matrix-BI0DBBrG.js +0 -1495
- package/dist/matrix-DiABGjJR.js +0 -1269
- package/dist/matrix-fC6NrFM5.d.ts +0 -68
- package/dist/mcp-cli-BOyn_DLL.js +0 -87
- package/dist/media-understanding.runtime-DjUa7Dka.js +0 -116
- package/dist/memory-cli-CJd_vl-Y.js +0 -111
- package/dist/memory-search-CEEItIFR.js +0 -17
- package/dist/memory-search-Cv1SBrn7.js +0 -204
- package/dist/method-scopes-CQE7-bZ-.js +0 -2452
- package/dist/model-auth-markers-B1bbs9Qd.d.ts +0 -20
- package/dist/model-picker-D6_89XHg.js +0 -112
- package/dist/model-picker-Svaw-APs.js +0 -390
- package/dist/model-picker.runtime-Chi9nV7A.js +0 -125
- package/dist/model-selection-hL8i1Jbs.js +0 -653
- package/dist/model-suppression.runtime-DjWJZ0X-.js +0 -116
- package/dist/models-7qj1dG_W.js +0 -118
- package/dist/models-BPOB_xJF.js +0 -2514
- package/dist/models-cli-DdlOVUjS.js +0 -309
- package/dist/models-config-CBqUS-jX.js +0 -111
- package/dist/models-config.providers.discovery-BKB5JH9M.d.ts +0 -18
- package/dist/moldclaw-root-D6PbhbZk.js +0 -88
- package/dist/monitor-BPYhkEqF.js +0 -782
- package/dist/monitor-BuTcQ24j.js +0 -3468
- package/dist/monitor-CuXvNhFh.js +0 -113
- package/dist/monitor-D-TqSIHF.js +0 -6823
- package/dist/monitor-DRSgo9u2.js +0 -3076
- package/dist/monitor-DcHch39z.js +0 -772
- package/dist/monitor-DsHBMrXp.js +0 -115
- package/dist/monitor-shared-CL8T4gt1.js +0 -444
- package/dist/msteams-7FMwTvQG.js +0 -852
- package/dist/node-cli-BCjaSCZM.js +0 -2503
- package/dist/node-resolve-D5Hvcgyx.js +0 -835
- package/dist/nodes-cli-Dd_SNbkt.js +0 -1380
- package/dist/nostr-D8scBiYq.d.ts +0 -7
- package/dist/nostr-DBTFTxKs.js +0 -8744
- package/dist/npm-resolution-CYfb3MHG.js +0 -60
- package/dist/oauth-env-zPt5RywA.js +0 -10
- package/dist/onboard-BEFQQeig.js +0 -25
- package/dist/onboard-CJHNyxJh.js +0 -48
- package/dist/onboard-D_3UeLEN.js +0 -589
- package/dist/onboard-channels-B_JL0Djc.js +0 -1241
- package/dist/onboard-channels-CqZzHt2C.js +0 -205
- package/dist/onboard-custom-CER3Ggbq.js +0 -571
- package/dist/onboard-custom-bNRdGECb.js +0 -114
- package/dist/onboard-helpers-BK0Hsb7Y.js +0 -335
- package/dist/onboard-helpers-CXZ5RPoR.js +0 -113
- package/dist/onboard-hooks-1NsxEDjH.js +0 -72
- package/dist/onboard-remote-DuKhC_7W.js +0 -117
- package/dist/onboard-remote-OwRcDuB3.js +0 -181
- package/dist/onboard-search-Cy8dOq2W.js +0 -302
- package/dist/onboard-skills-D5phRa6r.js +0 -117
- package/dist/onboard-skills-c9qWCNe9.js +0 -133
- package/dist/outbound-media-CgNYEQWb.d.ts +0 -11
- package/dist/outbound-media-DYRO2vTD.js +0 -11
- package/dist/pairing-access-Dsiu5Mvl.d.ts +0 -21
- package/dist/pairing-cli-BOnv0TYn.js +0 -217
- package/dist/perplexity-EZwC3y2b.js +0 -24
- package/dist/persistent-dedupe-DMLOqJ23.d.ts +0 -26
- package/dist/pi-model-discovery-runtime-BToY3A6K.js +0 -111
- package/dist/pi-tools.before-tool-call.runtime-D_acPtld.js +0 -381
- package/dist/plugin-install-CgJpSjYd.js +0 -184
- package/dist/plugin-install-Cl1A4EF6.js +0 -117
- package/dist/plugin-install-plan-Dc2Z4DeU.js +0 -49
- package/dist/plugin-registry-B1UaWrQD.js +0 -49
- package/dist/plugin-registry-Cy8biwnn.js +0 -113
- package/dist/plugins-CXwvg50F.js +0 -111
- package/dist/plugins-cli-Uvzp2aYV.js +0 -917
- package/dist/policy-DsMBbEe7.js +0 -143
- package/dist/preflight-audio.runtime-hWsZIYvc.js +0 -116
- package/dist/probe-CNsSf1Uf.js +0 -6329
- package/dist/probe-CqOIrPhb.js +0 -47
- package/dist/probe-DH6gDw-h.js +0 -129
- package/dist/probe-DM16PLf4.js +0 -21
- package/dist/probe-DvAEEWYr.js +0 -1793
- package/dist/probe-auth-COfgCble.js +0 -48
- package/dist/probe-auth-I_5TX1Eh.js +0 -40
- package/dist/program-Dz80sgTU.js +0 -253
- package/dist/prompt-select-styled-wQehwFxK.js +0 -2673
- package/dist/provider-api-key-auth.runtime-BR9GU4ya.js +0 -121
- package/dist/provider-auth-choice-CdhA84kr.js +0 -126
- package/dist/provider-auth-choice-helpers-kabp_0zA.js +0 -48
- package/dist/provider-auth-choice-preference-se3zAM_2.js +0 -189
- package/dist/provider-auth-choice.runtime-BMc8-xNQ.js +0 -123
- package/dist/provider-auth-choices-CYsCViGi.js +0 -57
- package/dist/provider-auth-guidance-CMjUWlNf.js +0 -34
- package/dist/provider-auth-result-Cw6qIhO-.d.ts +0 -18
- package/dist/provider-models-BCId_Lfu.js +0 -2113
- package/dist/provider-models-Ok-DrSiY.d.ts +0 -867
- package/dist/provider-ollama-setup-B6XJZ0So.js +0 -314
- package/dist/provider-ollama-setup-lGDdTl0b.d.ts +0 -32
- package/dist/provider-onboard-CSPi7jOK.d.ts +0 -40
- package/dist/provider-onboard-Ca0TaNud.js +0 -139
- package/dist/provider-runtime.runtime-DwwkHw_7.js +0 -111
- package/dist/provider-self-hosted-setup-BEKLVGpj.js +0 -182
- package/dist/provider-self-hosted-setup-Df91By-J.d.ts +0 -61
- package/dist/provider-stream-DrUD69ai.js +0 -512
- package/dist/provider-usage-BgKHCnjr.js +0 -111
- package/dist/provider-usage-D8EZpFz9.js +0 -633
- package/dist/provider-wizard-DMdb-zj_.js +0 -152
- package/dist/push-apns-BPH6d4VV.js +0 -1038
- package/dist/pw-ai-DttfldtL.js +0 -1867
- package/dist/qmd-manager-CybcDUfk.js +0 -1570
- package/dist/qr-cli-8NcmJ8Ft.js +0 -369
- package/dist/qr-cli-DWe0Our3.js +0 -113
- package/dist/reactions-D6N0LR16.js +0 -281
- package/dist/read-only-account-inspect.discord.runtime-CqUWTRfl.js +0 -116
- package/dist/read-only-account-inspect.slack.runtime-9-jpln3q.js +0 -116
- package/dist/read-only-account-inspect.telegram.runtime-EKPI1D7n.js +0 -116
- package/dist/redact-snapshot-DwJEIVk9.js +0 -2663
- package/dist/register.agent-D3YdDirP.js +0 -439
- package/dist/register.backup-dR27qCuo.js +0 -625
- package/dist/register.configure-BjFhkkka.js +0 -252
- package/dist/register.maintenance-DiMQJIOa.js +0 -574
- package/dist/register.message-CdZsKYH1.js +0 -709
- package/dist/register.onboard-B0rV1eaO.js +0 -192
- package/dist/register.setup-wKMvohzo.js +0 -212
- package/dist/register.status-health-sessions-BJ68m6pt.js +0 -498
- package/dist/register.subclis-CnnrWt2a.js +0 -315
- package/dist/register.subclis-lSvTkC6z.js +0 -13
- package/dist/replies-BABt9b48.js +0 -110
- package/dist/resolve-channels-BqZFl2Ux.js +0 -262
- package/dist/resolve-channels-DjQLXb7B.js +0 -226
- package/dist/resolve-route-CSHDsa_m.js +0 -538
- package/dist/resolve-users-BG6HaSR5.js +0 -143
- package/dist/root-help-ohmaCyC_.js +0 -32
- package/dist/routes-4k2kpvoT.js +0 -7097
- package/dist/rpc-Cnwn4Q6L.js +0 -67
- package/dist/run-main-VYlacKA0.js +0 -424
- package/dist/runtime-D61jzMiI.d.ts +0 -26
- package/dist/runtime-discord-ops.runtime-DafrU-rI.js +0 -9078
- package/dist/runtime-slack-ops.runtime-CdXBKXwd.js +0 -4556
- package/dist/runtime-telegram-ops.runtime-B12sF7gE.js +0 -133
- package/dist/runtime-whatsapp-login.runtime-CqEudH37.js +0 -114
- package/dist/runtime-whatsapp-outbound.runtime-D5m2qyn-.js +0 -117
- package/dist/sandbox-cli-CHJiEWXB.js +0 -535
- package/dist/search-manager-BtNC3-i_.js +0 -16
- package/dist/search-manager-C7J7B3_a.js +0 -386
- package/dist/secrets-cli-C6yIWBbN.js +0 -2070
- package/dist/security-cli-BVu9BkjD.js +0 -575
- package/dist/send-BSreC7rr.js +0 -631
- package/dist/send-BsLHQG_B.js +0 -1025
- package/dist/send-BuNhp8PH.js +0 -283
- package/dist/send-DOCswVar.js +0 -100
- package/dist/send-Dl0LLErk.js +0 -629
- package/dist/server-node-events-Bq2067EG.js +0 -506
- package/dist/server-y38L7N5H.js +0 -107
- package/dist/sessions-BV8gXURR.js +0 -112
- package/dist/sessions-dl1Kc-Ci.js +0 -218
- package/dist/setup-BSPXdMuK.d.ts +0 -37
- package/dist/setup-DGszQH0_.js +0 -387
- package/dist/setup-binary-C17YnmA8.js +0 -406
- package/dist/setup-browser-CPx-nEsr.js +0 -70
- package/dist/setup-core-BByHN1ME.js +0 -143
- package/dist/setup-core-C0KPlBmL.js +0 -47
- package/dist/setup-core-Cq37G6of.js +0 -166
- package/dist/setup-core-uO84_Y75.js +0 -205
- package/dist/setup-surface-BEMi7Rmb.js +0 -490
- package/dist/setup-wizard-helpers-Ck9wDR0b.d.ts +0 -203
- package/dist/setup.finalize-BzPBa8zW.js +0 -522
- package/dist/setup.gateway-config-DdwkF-8e.js +0 -343
- package/dist/shared-BCw4SKjB.js +0 -96
- package/dist/shared-CjNzsULP.js +0 -75
- package/dist/shared-Cu1BE7ZE.js +0 -298
- package/dist/shared-DSClmyUn.js +0 -182
- package/dist/shared-DyJdGH6y.js +0 -102
- package/dist/signal-Dyv4NZsB.js +0 -114
- package/dist/skills-CbB5b27M.js +0 -853
- package/dist/skills-CnfI7Szw.js +0 -20
- package/dist/skills-cli-CavB1f_3.js +0 -292
- package/dist/skills-install-B1OBdgd0.js +0 -763
- package/dist/skills-status-B3gAmIbW.js +0 -169
- package/dist/skills-status-DrHhFgU9.js +0 -21
- package/dist/slack-BRzqnoAz.js +0 -114
- package/dist/slash-commands.runtime-BK88kgds.js +0 -128
- package/dist/slash-dispatch.runtime-COGywwJE.js +0 -141
- package/dist/slash-skill-commands.runtime-Ti4brxgh.js +0 -116
- package/dist/src-DUR6OQxI.js +0 -1701
- package/dist/status-C6dgQY9a.js +0 -131
- package/dist/status-CNK0Q7QH.js +0 -606
- package/dist/status-DBcX0DSC.js +0 -43
- package/dist/status-DKgFgbwv.js +0 -1599
- package/dist/status-Wn5lhNAc.js +0 -126
- package/dist/status-json-D2EkWqAl.js +0 -288
- package/dist/status.link-channel-D3ULIdEa.js +0 -143
- package/dist/status.scan.deps.runtime-BsjWTAm4.js +0 -126
- package/dist/status.scan.runtime-D4HbzROD.js +0 -119
- package/dist/status.summary-C3YxPrDK.js +0 -592
- package/dist/status.summary.runtime-DAkXPSaK.js +0 -118
- package/dist/status.update-B4NnN9P1.js +0 -77
- package/dist/subagent-orphan-recovery-QiQEBv36.js +0 -307
- package/dist/subagent-registry-runtime-BJatPQFK.js +0 -111
- package/dist/subscription-BhZORXN9.js +0 -100
- package/dist/subscription-QEUjQRMv.js +0 -33
- package/dist/subscription-cli-HrULlAgc.js +0 -134
- package/dist/synology-chat-DB76GWMN.js +0 -297
- package/dist/system-cli-D8jDwWuL.js +0 -94
- package/dist/telegram-BHiiqKkQ.js +0 -114
- package/dist/text-chunking-Baonm9Lu.js +0 -84
- package/dist/text-chunking-DzB11ONk.d.ts +0 -79
- package/dist/tlon-DLESxNgD.js +0 -433
- package/dist/tui-C75zi2Cl.js +0 -3834
- package/dist/tui-cli-DFwx5e6i.js +0 -137
- package/dist/types-BKldC9YN.d.ts +0 -22692
- package/dist/types-MeyueBE0.d.ts +0 -45
- package/dist/types.base-Cw0-zIvE.d.ts +0 -188
- package/dist/ui-B55NOIB6.js +0 -31
- package/dist/update--ojavYQ4.js +0 -1036
- package/dist/update-cli-Cvj5aWYM.js +0 -1503
- package/dist/update-offset-store-upatuWwX.js +0 -112
- package/dist/update-runner-DHkY_-76.js +0 -1496
- package/dist/upsert-with-lock-C171GLaR.js +0 -33
- package/dist/usage-N3bxnbmt.js +0 -115
- package/dist/web-RdvT7gKa.js +0 -112
- package/dist/web-shared-C2qHVxw1.d.ts +0 -45
- package/dist/webhook-request-guards-CosLyl01.d.ts +0 -76
- package/dist/webhook-targets-Bfnag-du.js +0 -181
- package/dist/webhook-targets-DP_EkQa4.d.ts +0 -106
- package/dist/webhooks-cli-ZpnXrq7G.js +0 -350
- package/dist/whatsapp-DNTAyZHt.js +0 -114
- package/dist/whatsapp-actions-o1zKQzKZ.js +0 -167
- package/dist/workspace-CpWi5wPr.js +0 -479
- package/dist/workspace-Ii7aRS7c.js +0 -289
- package/dist/workspace-dirs-x10McA9t.js +0 -2003
- package/dist/zalo-C9OQRYRw.d.ts +0 -9
- package/dist/zalo-zm_bYCKg.js +0 -415
- package/dist/zalouser-CvVEUvc5.js +0 -30911
- /package/dist/{account-id-B3YSn4hl.d.ts → account-id-B8ce6G_4.d.ts} +0 -0
- /package/dist/{acpx-CnNv70m2.d.ts → acpx-Ci50I9T2.d.ts} +0 -0
- /package/dist/{agent-media-payload-DE2pEcsz.d.ts → agent-media-payload-en-gS5p6.d.ts} +0 -0
- /package/dist/{allow-from-DPpHnT2A.d.ts → allow-from-cMeQ47Ot.d.ts} +0 -0
- /package/dist/{allowlist-resolution-CLFiZ6nE.d.ts → allowlist-resolution-DoAWbfXV.d.ts} +0 -0
- /package/dist/{bluebubbles-Duhu-Jer.d.ts → bluebubbles-C6yYmUl0.d.ts} +0 -0
- /package/dist/{boolean-param-BhFjB3gp.d.ts → boolean-param-CdO2TFTk.d.ts} +0 -0
- /package/dist/{channel-config-schema-DnnVMdjR.d.ts → channel-config-schema-Chp38wel.d.ts} +0 -0
- /package/dist/{channel-policy-Baq-Z06b.d.ts → channel-policy-g2h6AbYQ.d.ts} +0 -0
- /package/dist/{chat-type-DpiBgwuG.d.ts → chat-type-BLt59pPT.d.ts} +0 -0
- /package/dist/{command-format-vi4xq8e8.d.ts → command-format-BDJC05Jp.d.ts} +0 -0
- /package/dist/{diffs-DK7fVSDo.d.ts → diffs-D_iNKCyn.d.ts} +0 -0
- /package/dist/{directory-runtime-BTLPaysA.d.ts → directory-runtime-DhMex6HY.d.ts} +0 -0
- /package/dist/{exec-C01wtBHu.d.ts → exec-pjfUY4KM.d.ts} +0 -0
- /package/dist/{gaxios-fetch-compat-wZ38b3w3.js → gaxios-fetch-compat-B_vtINdV.js} +0 -0
- /package/dist/{history-CwXuP2TW.d.ts → history-aqSS5VGQ.d.ts} +0 -0
- /package/dist/{inbound-envelope-SggrBs9m.d.ts → inbound-envelope-C5hWuZod.d.ts} +0 -0
- /package/dist/{index-apAZHsDo.d.ts → index-DXVQFYGX.d.ts} +0 -0
- /package/dist/{json-store-r75IZGk9.d.ts → json-store-UnqQ5aV3.d.ts} +0 -0
- /package/dist/{keyed-async-queue-DHIr7yNe.d.ts → keyed-async-queue-guucpLw3.d.ts} +0 -0
- /package/dist/{links-HeQ3r_L0.d.ts → links-Bar0meEK.d.ts} +0 -0
- /package/dist/{markdown-to-line-CDb4Jy3V.d.ts → markdown-to-line-D8uH_KOj.d.ts} +0 -0
- /package/dist/{mattermost-DtCsxpgg.d.ts → mattermost-xl7jAFJL.d.ts} +0 -0
- /package/dist/{net-BATPDwdQ.d.ts → net-rGOKGds6.d.ts} +0 -0
- /package/dist/{nextcloud-talk-Bb2wHOwp.d.ts → nextcloud-talk-De2CZ9dV.d.ts} +0 -0
- /package/dist/{oauth-utils-u567CLT0.d.ts → oauth-utils-DzN1AlEH.d.ts} +0 -0
- /package/dist/{parse-finite-number-l3tNlrZh.d.ts → parse-finite-number-odgyqhi0.d.ts} +0 -0
- /package/dist/{provider-usage.types-C6061OVN.d.ts → provider-usage.types-EDE9o-H_.d.ts} +0 -0
- /package/dist/{reply-history-BDsFnZFl.d.ts → reply-history-CVuU31xe.d.ts} +0 -0
- /package/dist/{reply-payload-CCvM4W9u.d.ts → reply-payload-CHkpBYwL.d.ts} +0 -0
- /package/dist/{request-url-C54l4-xC.d.ts → request-url-DHisbiHY.d.ts} +0 -0
- /package/dist/{run-command-D3RqWcHu.d.ts → run-command-y0Cndsb1.d.ts} +0 -0
- /package/dist/{secret-input-schema-BLBt-NAP.d.ts → secret-input-schema-b1vpYDQN.d.ts} +0 -0
- /package/dist/{session-key-BQ2-bR-9.d.ts → session-key-DTHQl57f.d.ts} +0 -0
- /package/dist/{ssh-config-C4mcH9Ly.js → ssh-config-hEHBfU2_.js} +0 -0
- /package/dist/{testing-DLkhGsoz.d.ts → testing-DszuZXgK.d.ts} +0 -0
- /package/dist/{thinking-DRkjX18p.d.ts → thinking-IwXTGSeT.d.ts} +0 -0
- /package/dist/{tool-send-CMMD1uDu.d.ts → tool-send-DWHRmKpz.d.ts} +0 -0
- /package/dist/{vllm-defaults-CcGuf4hL.d.ts → vllm-defaults-CrxZgE6-.d.ts} +0 -0
- /package/dist/{wait-Daog8bxM.d.ts → wait-wDWw_MTI.d.ts} +0 -0
- /package/dist/{webhook-memory-guards-C5MrExwT.d.ts → webhook-memory-guards-DreORuJy.d.ts} +0 -0
- /package/dist/{windows-spawn-j2l-dqu8.d.ts → windows-spawn-BIzH92x2.d.ts} +0 -0
- /package/dist/{zod-schema.agent-runtime-krMrBnIn.d.ts → zod-schema.agent-runtime-CP2rmis3.d.ts} +0 -0
- /package/dist/{zod-schema.core-BNDieZDZ.d.ts → zod-schema.core-Foi1tYwi.d.ts} +0 -0
|
@@ -0,0 +1,1329 @@
|
|
|
1
|
+
import { d as isRecord, g as resolveConfigDir, y as resolveUserPath } from "./utils-C7ykRPCQ.js";
|
|
2
|
+
import { l as isPathInside$1, r as openBoundaryFileSync } from "./boundary-file-read-tPYh_8fH.js";
|
|
3
|
+
import { n as resolvemoldClawPackageRootSync } from "./moldclaw-root-Cb6HRlUO.js";
|
|
4
|
+
import { r as normalizePluginsConfig } from "./config-state-h5jUoHya.js";
|
|
5
|
+
import { n as MANIFEST_KEY } from "./legacy-names-DSfTjNOK.js";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
import fs from "node:fs";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
//#region src/plugins/manifest.ts
|
|
10
|
+
const PLUGIN_MANIFEST_FILENAME = "moldclaw.plugin.json";
|
|
11
|
+
const PLUGIN_MANIFEST_FILENAMES = [PLUGIN_MANIFEST_FILENAME];
|
|
12
|
+
function normalizeStringList(value) {
|
|
13
|
+
if (!Array.isArray(value)) return [];
|
|
14
|
+
return value.map((entry) => typeof entry === "string" ? entry.trim() : "").filter(Boolean);
|
|
15
|
+
}
|
|
16
|
+
function normalizeStringListRecord(value) {
|
|
17
|
+
if (!isRecord(value)) return;
|
|
18
|
+
const normalized = {};
|
|
19
|
+
for (const [key, rawValues] of Object.entries(value)) {
|
|
20
|
+
const providerId = typeof key === "string" ? key.trim() : "";
|
|
21
|
+
if (!providerId) continue;
|
|
22
|
+
const values = normalizeStringList(rawValues);
|
|
23
|
+
if (values.length === 0) continue;
|
|
24
|
+
normalized[providerId] = values;
|
|
25
|
+
}
|
|
26
|
+
return Object.keys(normalized).length > 0 ? normalized : void 0;
|
|
27
|
+
}
|
|
28
|
+
function normalizeProviderAuthChoices(value) {
|
|
29
|
+
if (!Array.isArray(value)) return;
|
|
30
|
+
const normalized = [];
|
|
31
|
+
for (const entry of value) {
|
|
32
|
+
if (!isRecord(entry)) continue;
|
|
33
|
+
const provider = typeof entry.provider === "string" ? entry.provider.trim() : "";
|
|
34
|
+
const method = typeof entry.method === "string" ? entry.method.trim() : "";
|
|
35
|
+
const choiceId = typeof entry.choiceId === "string" ? entry.choiceId.trim() : "";
|
|
36
|
+
if (!provider || !method || !choiceId) continue;
|
|
37
|
+
const choiceLabel = typeof entry.choiceLabel === "string" ? entry.choiceLabel.trim() : "";
|
|
38
|
+
const choiceHint = typeof entry.choiceHint === "string" ? entry.choiceHint.trim() : "";
|
|
39
|
+
const groupId = typeof entry.groupId === "string" ? entry.groupId.trim() : "";
|
|
40
|
+
const groupLabel = typeof entry.groupLabel === "string" ? entry.groupLabel.trim() : "";
|
|
41
|
+
const groupHint = typeof entry.groupHint === "string" ? entry.groupHint.trim() : "";
|
|
42
|
+
const optionKey = typeof entry.optionKey === "string" ? entry.optionKey.trim() : "";
|
|
43
|
+
const cliFlag = typeof entry.cliFlag === "string" ? entry.cliFlag.trim() : "";
|
|
44
|
+
const cliOption = typeof entry.cliOption === "string" ? entry.cliOption.trim() : "";
|
|
45
|
+
const cliDescription = typeof entry.cliDescription === "string" ? entry.cliDescription.trim() : "";
|
|
46
|
+
normalized.push({
|
|
47
|
+
provider,
|
|
48
|
+
method,
|
|
49
|
+
choiceId,
|
|
50
|
+
...choiceLabel ? { choiceLabel } : {},
|
|
51
|
+
...choiceHint ? { choiceHint } : {},
|
|
52
|
+
...groupId ? { groupId } : {},
|
|
53
|
+
...groupLabel ? { groupLabel } : {},
|
|
54
|
+
...groupHint ? { groupHint } : {},
|
|
55
|
+
...optionKey ? { optionKey } : {},
|
|
56
|
+
...cliFlag ? { cliFlag } : {},
|
|
57
|
+
...cliOption ? { cliOption } : {},
|
|
58
|
+
...cliDescription ? { cliDescription } : {}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return normalized.length > 0 ? normalized : void 0;
|
|
62
|
+
}
|
|
63
|
+
function resolvePluginManifestPath(rootDir) {
|
|
64
|
+
for (const filename of PLUGIN_MANIFEST_FILENAMES) {
|
|
65
|
+
const candidate = path.join(rootDir, filename);
|
|
66
|
+
if (fs.existsSync(candidate)) return candidate;
|
|
67
|
+
}
|
|
68
|
+
return path.join(rootDir, PLUGIN_MANIFEST_FILENAME);
|
|
69
|
+
}
|
|
70
|
+
function loadPluginManifest(rootDir, rejectHardlinks = true) {
|
|
71
|
+
const manifestPath = resolvePluginManifestPath(rootDir);
|
|
72
|
+
const opened = openBoundaryFileSync({
|
|
73
|
+
absolutePath: manifestPath,
|
|
74
|
+
rootPath: rootDir,
|
|
75
|
+
boundaryLabel: "plugin root",
|
|
76
|
+
rejectHardlinks
|
|
77
|
+
});
|
|
78
|
+
if (!opened.ok) {
|
|
79
|
+
if (opened.reason === "path") return {
|
|
80
|
+
ok: false,
|
|
81
|
+
error: `plugin manifest not found: ${manifestPath}`,
|
|
82
|
+
manifestPath
|
|
83
|
+
};
|
|
84
|
+
return {
|
|
85
|
+
ok: false,
|
|
86
|
+
error: `unsafe plugin manifest path: ${manifestPath} (${opened.reason})`,
|
|
87
|
+
manifestPath
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
let raw;
|
|
91
|
+
try {
|
|
92
|
+
raw = JSON.parse(fs.readFileSync(opened.fd, "utf-8"));
|
|
93
|
+
} catch (err) {
|
|
94
|
+
return {
|
|
95
|
+
ok: false,
|
|
96
|
+
error: `failed to parse plugin manifest: ${String(err)}`,
|
|
97
|
+
manifestPath
|
|
98
|
+
};
|
|
99
|
+
} finally {
|
|
100
|
+
fs.closeSync(opened.fd);
|
|
101
|
+
}
|
|
102
|
+
if (!isRecord(raw)) return {
|
|
103
|
+
ok: false,
|
|
104
|
+
error: "plugin manifest must be an object",
|
|
105
|
+
manifestPath
|
|
106
|
+
};
|
|
107
|
+
const id = typeof raw.id === "string" ? raw.id.trim() : "";
|
|
108
|
+
if (!id) return {
|
|
109
|
+
ok: false,
|
|
110
|
+
error: "plugin manifest requires id",
|
|
111
|
+
manifestPath
|
|
112
|
+
};
|
|
113
|
+
const configSchema = isRecord(raw.configSchema) ? raw.configSchema : null;
|
|
114
|
+
if (!configSchema) return {
|
|
115
|
+
ok: false,
|
|
116
|
+
error: "plugin manifest requires configSchema",
|
|
117
|
+
manifestPath
|
|
118
|
+
};
|
|
119
|
+
const kind = typeof raw.kind === "string" ? raw.kind : void 0;
|
|
120
|
+
const name = typeof raw.name === "string" ? raw.name.trim() : void 0;
|
|
121
|
+
const description = typeof raw.description === "string" ? raw.description.trim() : void 0;
|
|
122
|
+
const version = typeof raw.version === "string" ? raw.version.trim() : void 0;
|
|
123
|
+
const channels = normalizeStringList(raw.channels);
|
|
124
|
+
const providers = normalizeStringList(raw.providers);
|
|
125
|
+
const providerAuthEnvVars = normalizeStringListRecord(raw.providerAuthEnvVars);
|
|
126
|
+
const providerAuthChoices = normalizeProviderAuthChoices(raw.providerAuthChoices);
|
|
127
|
+
const skills = normalizeStringList(raw.skills);
|
|
128
|
+
let uiHints;
|
|
129
|
+
if (isRecord(raw.uiHints)) uiHints = raw.uiHints;
|
|
130
|
+
return {
|
|
131
|
+
ok: true,
|
|
132
|
+
manifest: {
|
|
133
|
+
id,
|
|
134
|
+
configSchema,
|
|
135
|
+
kind,
|
|
136
|
+
channels,
|
|
137
|
+
providers,
|
|
138
|
+
providerAuthEnvVars,
|
|
139
|
+
providerAuthChoices,
|
|
140
|
+
skills,
|
|
141
|
+
name,
|
|
142
|
+
description,
|
|
143
|
+
version,
|
|
144
|
+
uiHints
|
|
145
|
+
},
|
|
146
|
+
manifestPath
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
const DEFAULT_PLUGIN_ENTRY_CANDIDATES = [
|
|
150
|
+
"index.ts",
|
|
151
|
+
"index.js",
|
|
152
|
+
"index.mjs",
|
|
153
|
+
"index.cjs"
|
|
154
|
+
];
|
|
155
|
+
function getPackageManifestMetadata(manifest) {
|
|
156
|
+
if (!manifest) return;
|
|
157
|
+
return manifest[MANIFEST_KEY];
|
|
158
|
+
}
|
|
159
|
+
function resolvePackageExtensionEntries(manifest) {
|
|
160
|
+
const raw = getPackageManifestMetadata(manifest)?.extensions;
|
|
161
|
+
if (!Array.isArray(raw)) return {
|
|
162
|
+
status: "missing",
|
|
163
|
+
entries: []
|
|
164
|
+
};
|
|
165
|
+
const entries = raw.map((entry) => typeof entry === "string" ? entry.trim() : "").filter(Boolean);
|
|
166
|
+
if (entries.length === 0) return {
|
|
167
|
+
status: "empty",
|
|
168
|
+
entries: []
|
|
169
|
+
};
|
|
170
|
+
return {
|
|
171
|
+
status: "ok",
|
|
172
|
+
entries
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region src/plugins/bundle-manifest.ts
|
|
177
|
+
const CODEX_BUNDLE_MANIFEST_RELATIVE_PATH = ".codex-plugin/plugin.json";
|
|
178
|
+
const CLAUDE_BUNDLE_MANIFEST_RELATIVE_PATH = ".claude-plugin/plugin.json";
|
|
179
|
+
const CURSOR_BUNDLE_MANIFEST_RELATIVE_PATH = ".cursor-plugin/plugin.json";
|
|
180
|
+
function normalizeString(value) {
|
|
181
|
+
return (typeof value === "string" ? value.trim() : "") || void 0;
|
|
182
|
+
}
|
|
183
|
+
function normalizePathList(value) {
|
|
184
|
+
if (typeof value === "string") {
|
|
185
|
+
const trimmed = value.trim();
|
|
186
|
+
return trimmed ? [trimmed] : [];
|
|
187
|
+
}
|
|
188
|
+
if (!Array.isArray(value)) return [];
|
|
189
|
+
return value.map((entry) => typeof entry === "string" ? entry.trim() : "").filter(Boolean);
|
|
190
|
+
}
|
|
191
|
+
function normalizeBundlePathList(value) {
|
|
192
|
+
return Array.from(new Set(normalizePathList(value)));
|
|
193
|
+
}
|
|
194
|
+
function mergeBundlePathLists(...groups) {
|
|
195
|
+
const merged = [];
|
|
196
|
+
const seen = /* @__PURE__ */ new Set();
|
|
197
|
+
for (const group of groups) for (const entry of group) {
|
|
198
|
+
if (seen.has(entry)) continue;
|
|
199
|
+
seen.add(entry);
|
|
200
|
+
merged.push(entry);
|
|
201
|
+
}
|
|
202
|
+
return merged;
|
|
203
|
+
}
|
|
204
|
+
function hasInlineCapabilityValue(value) {
|
|
205
|
+
if (typeof value === "string") return value.trim().length > 0;
|
|
206
|
+
if (Array.isArray(value)) return value.length > 0;
|
|
207
|
+
if (isRecord(value)) return Object.keys(value).length > 0;
|
|
208
|
+
return value === true;
|
|
209
|
+
}
|
|
210
|
+
function slugifyPluginId(raw, rootDir) {
|
|
211
|
+
const fallback = path.basename(rootDir);
|
|
212
|
+
return (raw?.trim() || fallback).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "") || "bundle-plugin";
|
|
213
|
+
}
|
|
214
|
+
function loadBundleManifestFile(params) {
|
|
215
|
+
const manifestPath = path.join(params.rootDir, params.manifestRelativePath);
|
|
216
|
+
const opened = openBoundaryFileSync({
|
|
217
|
+
absolutePath: manifestPath,
|
|
218
|
+
rootPath: params.rootDir,
|
|
219
|
+
boundaryLabel: "plugin root",
|
|
220
|
+
rejectHardlinks: params.rejectHardlinks
|
|
221
|
+
});
|
|
222
|
+
if (!opened.ok) {
|
|
223
|
+
if (opened.reason === "path") {
|
|
224
|
+
if (params.allowMissing) return {
|
|
225
|
+
ok: true,
|
|
226
|
+
raw: {},
|
|
227
|
+
manifestPath
|
|
228
|
+
};
|
|
229
|
+
return {
|
|
230
|
+
ok: false,
|
|
231
|
+
error: `plugin manifest not found: ${manifestPath}`,
|
|
232
|
+
manifestPath
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
return {
|
|
236
|
+
ok: false,
|
|
237
|
+
error: `unsafe plugin manifest path: ${manifestPath} (${opened.reason})`,
|
|
238
|
+
manifestPath
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
try {
|
|
242
|
+
const raw = JSON.parse(fs.readFileSync(opened.fd, "utf-8"));
|
|
243
|
+
if (!isRecord(raw)) return {
|
|
244
|
+
ok: false,
|
|
245
|
+
error: "plugin manifest must be an object",
|
|
246
|
+
manifestPath
|
|
247
|
+
};
|
|
248
|
+
return {
|
|
249
|
+
ok: true,
|
|
250
|
+
raw,
|
|
251
|
+
manifestPath
|
|
252
|
+
};
|
|
253
|
+
} catch (err) {
|
|
254
|
+
return {
|
|
255
|
+
ok: false,
|
|
256
|
+
error: `failed to parse plugin manifest: ${String(err)}`,
|
|
257
|
+
manifestPath
|
|
258
|
+
};
|
|
259
|
+
} finally {
|
|
260
|
+
fs.closeSync(opened.fd);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
function resolveCodexSkillDirs(raw, rootDir) {
|
|
264
|
+
const declared = normalizeBundlePathList(raw.skills);
|
|
265
|
+
if (declared.length > 0) return declared;
|
|
266
|
+
return fs.existsSync(path.join(rootDir, "skills")) ? ["skills"] : [];
|
|
267
|
+
}
|
|
268
|
+
function resolveCodexHookDirs(raw, rootDir) {
|
|
269
|
+
const declared = normalizeBundlePathList(raw.hooks);
|
|
270
|
+
if (declared.length > 0) return declared;
|
|
271
|
+
return fs.existsSync(path.join(rootDir, "hooks")) ? ["hooks"] : [];
|
|
272
|
+
}
|
|
273
|
+
function resolveCursorSkillsRootDirs(raw, rootDir) {
|
|
274
|
+
const declared = normalizeBundlePathList(raw.skills);
|
|
275
|
+
return mergeBundlePathLists(fs.existsSync(path.join(rootDir, "skills")) ? ["skills"] : [], declared);
|
|
276
|
+
}
|
|
277
|
+
function resolveCursorCommandRootDirs(raw, rootDir) {
|
|
278
|
+
const declared = normalizeBundlePathList(raw.commands);
|
|
279
|
+
return mergeBundlePathLists(fs.existsSync(path.join(rootDir, ".cursor", "commands")) ? [".cursor/commands"] : [], declared);
|
|
280
|
+
}
|
|
281
|
+
function resolveCursorSkillDirs(raw, rootDir) {
|
|
282
|
+
return mergeBundlePathLists(resolveCursorSkillsRootDirs(raw, rootDir), resolveCursorCommandRootDirs(raw, rootDir));
|
|
283
|
+
}
|
|
284
|
+
function resolveCursorAgentDirs(raw, rootDir) {
|
|
285
|
+
const declared = normalizeBundlePathList(raw.subagents ?? raw.agents);
|
|
286
|
+
return mergeBundlePathLists(fs.existsSync(path.join(rootDir, ".cursor", "agents")) ? [".cursor/agents"] : [], declared);
|
|
287
|
+
}
|
|
288
|
+
function hasCursorHookCapability(raw, rootDir) {
|
|
289
|
+
return hasInlineCapabilityValue(raw.hooks) || fs.existsSync(path.join(rootDir, ".cursor", "hooks.json"));
|
|
290
|
+
}
|
|
291
|
+
function hasCursorRulesCapability(raw, rootDir) {
|
|
292
|
+
return hasInlineCapabilityValue(raw.rules) || fs.existsSync(path.join(rootDir, ".cursor", "rules"));
|
|
293
|
+
}
|
|
294
|
+
function hasCursorMcpCapability(raw, rootDir) {
|
|
295
|
+
return hasInlineCapabilityValue(raw.mcpServers) || fs.existsSync(path.join(rootDir, ".mcp.json"));
|
|
296
|
+
}
|
|
297
|
+
function resolveClaudeComponentPaths(raw, key, rootDir, defaults) {
|
|
298
|
+
const declared = normalizeBundlePathList(raw[key]);
|
|
299
|
+
return mergeBundlePathLists(defaults.filter((candidate) => fs.existsSync(path.join(rootDir, candidate))), declared);
|
|
300
|
+
}
|
|
301
|
+
function resolveClaudeSkillsRootDirs(raw, rootDir) {
|
|
302
|
+
return resolveClaudeComponentPaths(raw, "skills", rootDir, ["skills"]);
|
|
303
|
+
}
|
|
304
|
+
function resolveClaudeCommandRootDirs(raw, rootDir) {
|
|
305
|
+
return resolveClaudeComponentPaths(raw, "commands", rootDir, ["commands"]);
|
|
306
|
+
}
|
|
307
|
+
function resolveClaudeSkillDirs(raw, rootDir) {
|
|
308
|
+
return mergeBundlePathLists(resolveClaudeSkillsRootDirs(raw, rootDir), resolveClaudeCommandRootDirs(raw, rootDir));
|
|
309
|
+
}
|
|
310
|
+
function resolveClaudeAgentDirs(raw, rootDir) {
|
|
311
|
+
return resolveClaudeComponentPaths(raw, "agents", rootDir, ["agents"]);
|
|
312
|
+
}
|
|
313
|
+
function resolveClaudeHookPaths(raw, rootDir) {
|
|
314
|
+
return resolveClaudeComponentPaths(raw, "hooks", rootDir, ["hooks/hooks.json"]);
|
|
315
|
+
}
|
|
316
|
+
function resolveClaudeMcpPaths(raw, rootDir) {
|
|
317
|
+
return resolveClaudeComponentPaths(raw, "mcpServers", rootDir, [".mcp.json"]);
|
|
318
|
+
}
|
|
319
|
+
function resolveClaudeLspPaths(raw, rootDir) {
|
|
320
|
+
return resolveClaudeComponentPaths(raw, "lspServers", rootDir, [".lsp.json"]);
|
|
321
|
+
}
|
|
322
|
+
function resolveClaudeOutputStylePaths(raw, rootDir) {
|
|
323
|
+
return resolveClaudeComponentPaths(raw, "outputStyles", rootDir, ["output-styles"]);
|
|
324
|
+
}
|
|
325
|
+
function resolveClaudeSettingsFiles(_raw, rootDir) {
|
|
326
|
+
return fs.existsSync(path.join(rootDir, "settings.json")) ? ["settings.json"] : [];
|
|
327
|
+
}
|
|
328
|
+
function hasClaudeHookCapability(raw, rootDir) {
|
|
329
|
+
return hasInlineCapabilityValue(raw.hooks) || resolveClaudeHookPaths(raw, rootDir).length > 0;
|
|
330
|
+
}
|
|
331
|
+
function buildCodexCapabilities(raw, rootDir) {
|
|
332
|
+
const capabilities = [];
|
|
333
|
+
if (resolveCodexSkillDirs(raw, rootDir).length > 0) capabilities.push("skills");
|
|
334
|
+
if (resolveCodexHookDirs(raw, rootDir).length > 0) capabilities.push("hooks");
|
|
335
|
+
if (hasInlineCapabilityValue(raw.mcpServers) || fs.existsSync(path.join(rootDir, ".mcp.json"))) capabilities.push("mcpServers");
|
|
336
|
+
if (hasInlineCapabilityValue(raw.apps) || fs.existsSync(path.join(rootDir, ".app.json"))) capabilities.push("apps");
|
|
337
|
+
return capabilities;
|
|
338
|
+
}
|
|
339
|
+
function buildClaudeCapabilities(raw, rootDir) {
|
|
340
|
+
const capabilities = [];
|
|
341
|
+
if (resolveClaudeSkillDirs(raw, rootDir).length > 0) capabilities.push("skills");
|
|
342
|
+
if (resolveClaudeCommandRootDirs(raw, rootDir).length > 0) capabilities.push("commands");
|
|
343
|
+
if (resolveClaudeAgentDirs(raw, rootDir).length > 0) capabilities.push("agents");
|
|
344
|
+
if (hasClaudeHookCapability(raw, rootDir)) capabilities.push("hooks");
|
|
345
|
+
if (hasInlineCapabilityValue(raw.mcpServers) || resolveClaudeMcpPaths(raw, rootDir).length > 0) capabilities.push("mcpServers");
|
|
346
|
+
if (hasInlineCapabilityValue(raw.lspServers) || resolveClaudeLspPaths(raw, rootDir).length > 0) capabilities.push("lspServers");
|
|
347
|
+
if (hasInlineCapabilityValue(raw.outputStyles) || resolveClaudeOutputStylePaths(raw, rootDir).length > 0) capabilities.push("outputStyles");
|
|
348
|
+
if (resolveClaudeSettingsFiles(raw, rootDir).length > 0) capabilities.push("settings");
|
|
349
|
+
return capabilities;
|
|
350
|
+
}
|
|
351
|
+
function buildCursorCapabilities(raw, rootDir) {
|
|
352
|
+
const capabilities = [];
|
|
353
|
+
if (resolveCursorSkillDirs(raw, rootDir).length > 0) capabilities.push("skills");
|
|
354
|
+
if (resolveCursorCommandRootDirs(raw, rootDir).length > 0) capabilities.push("commands");
|
|
355
|
+
if (resolveCursorAgentDirs(raw, rootDir).length > 0) capabilities.push("agents");
|
|
356
|
+
if (hasCursorHookCapability(raw, rootDir)) capabilities.push("hooks");
|
|
357
|
+
if (hasCursorRulesCapability(raw, rootDir)) capabilities.push("rules");
|
|
358
|
+
if (hasCursorMcpCapability(raw, rootDir)) capabilities.push("mcpServers");
|
|
359
|
+
return capabilities;
|
|
360
|
+
}
|
|
361
|
+
function loadBundleManifest(params) {
|
|
362
|
+
const rejectHardlinks = params.rejectHardlinks ?? true;
|
|
363
|
+
const manifestRelativePath = params.bundleFormat === "codex" ? CODEX_BUNDLE_MANIFEST_RELATIVE_PATH : params.bundleFormat === "cursor" ? CURSOR_BUNDLE_MANIFEST_RELATIVE_PATH : CLAUDE_BUNDLE_MANIFEST_RELATIVE_PATH;
|
|
364
|
+
const loaded = loadBundleManifestFile({
|
|
365
|
+
rootDir: params.rootDir,
|
|
366
|
+
manifestRelativePath,
|
|
367
|
+
rejectHardlinks,
|
|
368
|
+
allowMissing: params.bundleFormat === "claude"
|
|
369
|
+
});
|
|
370
|
+
if (!loaded.ok) return loaded;
|
|
371
|
+
const raw = loaded.raw;
|
|
372
|
+
const interfaceRecord = isRecord(raw.interface) ? raw.interface : void 0;
|
|
373
|
+
const name = normalizeString(raw.name);
|
|
374
|
+
const description = normalizeString(raw.description) ?? normalizeString(raw.shortDescription) ?? normalizeString(interfaceRecord?.shortDescription);
|
|
375
|
+
const version = normalizeString(raw.version);
|
|
376
|
+
if (params.bundleFormat === "codex") {
|
|
377
|
+
const skills = resolveCodexSkillDirs(raw, params.rootDir);
|
|
378
|
+
const hooks = resolveCodexHookDirs(raw, params.rootDir);
|
|
379
|
+
return {
|
|
380
|
+
ok: true,
|
|
381
|
+
manifest: {
|
|
382
|
+
id: slugifyPluginId(name, params.rootDir),
|
|
383
|
+
name,
|
|
384
|
+
description,
|
|
385
|
+
version,
|
|
386
|
+
skills,
|
|
387
|
+
settingsFiles: [],
|
|
388
|
+
hooks,
|
|
389
|
+
bundleFormat: "codex",
|
|
390
|
+
capabilities: buildCodexCapabilities(raw, params.rootDir)
|
|
391
|
+
},
|
|
392
|
+
manifestPath: loaded.manifestPath
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
if (params.bundleFormat === "cursor") return {
|
|
396
|
+
ok: true,
|
|
397
|
+
manifest: {
|
|
398
|
+
id: slugifyPluginId(name, params.rootDir),
|
|
399
|
+
name,
|
|
400
|
+
description,
|
|
401
|
+
version,
|
|
402
|
+
skills: resolveCursorSkillDirs(raw, params.rootDir),
|
|
403
|
+
settingsFiles: [],
|
|
404
|
+
hooks: [],
|
|
405
|
+
bundleFormat: "cursor",
|
|
406
|
+
capabilities: buildCursorCapabilities(raw, params.rootDir)
|
|
407
|
+
},
|
|
408
|
+
manifestPath: loaded.manifestPath
|
|
409
|
+
};
|
|
410
|
+
return {
|
|
411
|
+
ok: true,
|
|
412
|
+
manifest: {
|
|
413
|
+
id: slugifyPluginId(name, params.rootDir),
|
|
414
|
+
name,
|
|
415
|
+
description,
|
|
416
|
+
version,
|
|
417
|
+
skills: resolveClaudeSkillDirs(raw, params.rootDir),
|
|
418
|
+
settingsFiles: resolveClaudeSettingsFiles(raw, params.rootDir),
|
|
419
|
+
hooks: [],
|
|
420
|
+
bundleFormat: "claude",
|
|
421
|
+
capabilities: buildClaudeCapabilities(raw, params.rootDir)
|
|
422
|
+
},
|
|
423
|
+
manifestPath: loaded.manifestPath
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
function detectBundleManifestFormat(rootDir) {
|
|
427
|
+
if (fs.existsSync(path.join(rootDir, ".codex-plugin/plugin.json"))) return "codex";
|
|
428
|
+
if (fs.existsSync(path.join(rootDir, ".cursor-plugin/plugin.json"))) return "cursor";
|
|
429
|
+
if (fs.existsSync(path.join(rootDir, ".claude-plugin/plugin.json"))) return "claude";
|
|
430
|
+
if (fs.existsSync(path.join(rootDir, "moldclaw.plugin.json"))) return null;
|
|
431
|
+
if (DEFAULT_PLUGIN_ENTRY_CANDIDATES.some((candidate) => fs.existsSync(path.join(rootDir, candidate)))) return null;
|
|
432
|
+
if ([
|
|
433
|
+
path.join(rootDir, "skills"),
|
|
434
|
+
path.join(rootDir, "commands"),
|
|
435
|
+
path.join(rootDir, "agents"),
|
|
436
|
+
path.join(rootDir, "hooks", "hooks.json"),
|
|
437
|
+
path.join(rootDir, ".mcp.json"),
|
|
438
|
+
path.join(rootDir, ".lsp.json"),
|
|
439
|
+
path.join(rootDir, "settings.json")
|
|
440
|
+
].some((candidate) => fs.existsSync(candidate))) return "claude";
|
|
441
|
+
return null;
|
|
442
|
+
}
|
|
443
|
+
//#endregion
|
|
444
|
+
//#region src/plugins/path-safety.ts
|
|
445
|
+
function isPathInside(baseDir, targetPath) {
|
|
446
|
+
return isPathInside$1(baseDir, targetPath);
|
|
447
|
+
}
|
|
448
|
+
function safeRealpathSync(targetPath, cache) {
|
|
449
|
+
const cached = cache?.get(targetPath);
|
|
450
|
+
if (cached) return cached;
|
|
451
|
+
try {
|
|
452
|
+
const resolved = fs.realpathSync(targetPath);
|
|
453
|
+
cache?.set(targetPath, resolved);
|
|
454
|
+
return resolved;
|
|
455
|
+
} catch {
|
|
456
|
+
return null;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
function safeStatSync(targetPath) {
|
|
460
|
+
try {
|
|
461
|
+
return fs.statSync(targetPath);
|
|
462
|
+
} catch {
|
|
463
|
+
return null;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
function formatPosixMode(mode) {
|
|
467
|
+
return (mode & 511).toString(8).padStart(3, "0");
|
|
468
|
+
}
|
|
469
|
+
//#endregion
|
|
470
|
+
//#region src/plugins/bundled-dir.ts
|
|
471
|
+
function resolveBundledPluginsDir(env = process.env) {
|
|
472
|
+
const override = env.MOLDCLAW_BUNDLED_PLUGINS_DIR?.trim();
|
|
473
|
+
if (override) return resolveUserPath(override, env);
|
|
474
|
+
try {
|
|
475
|
+
const packageRoots = [resolvemoldClawPackageRootSync({ cwd: process.cwd() }), resolvemoldClawPackageRootSync({ moduleUrl: import.meta.url })].filter((entry, index, all) => Boolean(entry) && all.indexOf(entry) === index);
|
|
476
|
+
for (const packageRoot of packageRoots) {
|
|
477
|
+
const runtimeExtensionsDir = path.join(packageRoot, "dist-runtime", "extensions");
|
|
478
|
+
const builtExtensionsDir = path.join(packageRoot, "dist", "extensions");
|
|
479
|
+
if (fs.existsSync(runtimeExtensionsDir) && fs.existsSync(builtExtensionsDir)) return runtimeExtensionsDir;
|
|
480
|
+
}
|
|
481
|
+
} catch {}
|
|
482
|
+
try {
|
|
483
|
+
const execDir = path.dirname(process.execPath);
|
|
484
|
+
const sibling = path.join(execDir, "extensions");
|
|
485
|
+
if (fs.existsSync(sibling)) return sibling;
|
|
486
|
+
} catch {}
|
|
487
|
+
try {
|
|
488
|
+
let cursor = path.dirname(fileURLToPath(import.meta.url));
|
|
489
|
+
for (let i = 0; i < 6; i += 1) {
|
|
490
|
+
const candidate = path.join(cursor, "extensions");
|
|
491
|
+
if (fs.existsSync(candidate)) return candidate;
|
|
492
|
+
const parent = path.dirname(cursor);
|
|
493
|
+
if (parent === cursor) break;
|
|
494
|
+
cursor = parent;
|
|
495
|
+
}
|
|
496
|
+
} catch {}
|
|
497
|
+
}
|
|
498
|
+
//#endregion
|
|
499
|
+
//#region src/plugins/roots.ts
|
|
500
|
+
function resolvePluginSourceRoots(params) {
|
|
501
|
+
const env = params.env ?? process.env;
|
|
502
|
+
const workspaceRoot = params.workspaceDir ? resolveUserPath(params.workspaceDir, env) : void 0;
|
|
503
|
+
return {
|
|
504
|
+
stock: resolveBundledPluginsDir(env),
|
|
505
|
+
global: path.join(resolveConfigDir(env), "extensions"),
|
|
506
|
+
workspace: workspaceRoot ? path.join(workspaceRoot, ".moldclaw", "extensions") : void 0
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
function resolvePluginCacheInputs(params) {
|
|
510
|
+
const env = params.env ?? process.env;
|
|
511
|
+
return {
|
|
512
|
+
roots: resolvePluginSourceRoots({
|
|
513
|
+
workspaceDir: params.workspaceDir,
|
|
514
|
+
env
|
|
515
|
+
}),
|
|
516
|
+
loadPaths: (params.loadPaths ?? []).filter((entry) => typeof entry === "string").map((entry) => entry.trim()).filter(Boolean).map((entry) => resolveUserPath(entry, env))
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
//#endregion
|
|
520
|
+
//#region src/plugins/discovery.ts
|
|
521
|
+
const EXTENSION_EXTS = new Set([
|
|
522
|
+
".ts",
|
|
523
|
+
".js",
|
|
524
|
+
".mts",
|
|
525
|
+
".cts",
|
|
526
|
+
".mjs",
|
|
527
|
+
".cjs"
|
|
528
|
+
]);
|
|
529
|
+
const CANONICAL_PACKAGE_ID_ALIASES = {
|
|
530
|
+
"elevenlabs-speech": "elevenlabs",
|
|
531
|
+
"microsoft-speech": "microsoft",
|
|
532
|
+
"ollama-provider": "ollama",
|
|
533
|
+
"sglang-provider": "sglang",
|
|
534
|
+
"vllm-provider": "vllm"
|
|
535
|
+
};
|
|
536
|
+
const discoveryCache = /* @__PURE__ */ new Map();
|
|
537
|
+
const DEFAULT_DISCOVERY_CACHE_MS = 1e3;
|
|
538
|
+
function clearPluginDiscoveryCache() {
|
|
539
|
+
discoveryCache.clear();
|
|
540
|
+
}
|
|
541
|
+
function resolveDiscoveryCacheMs(env) {
|
|
542
|
+
const raw = env.MOLDCLAW_PLUGIN_DISCOVERY_CACHE_MS?.trim();
|
|
543
|
+
if (raw === "" || raw === "0") return 0;
|
|
544
|
+
if (!raw) return DEFAULT_DISCOVERY_CACHE_MS;
|
|
545
|
+
const parsed = Number.parseInt(raw, 10);
|
|
546
|
+
if (!Number.isFinite(parsed)) return DEFAULT_DISCOVERY_CACHE_MS;
|
|
547
|
+
return Math.max(0, parsed);
|
|
548
|
+
}
|
|
549
|
+
function shouldUseDiscoveryCache(env) {
|
|
550
|
+
if (env.MOLDCLAW_DISABLE_PLUGIN_DISCOVERY_CACHE?.trim()) return false;
|
|
551
|
+
return resolveDiscoveryCacheMs(env) > 0;
|
|
552
|
+
}
|
|
553
|
+
function buildDiscoveryCacheKey(params) {
|
|
554
|
+
const { roots, loadPaths } = resolvePluginCacheInputs({
|
|
555
|
+
workspaceDir: params.workspaceDir,
|
|
556
|
+
loadPaths: params.extraPaths,
|
|
557
|
+
env: params.env
|
|
558
|
+
});
|
|
559
|
+
const workspaceKey = roots.workspace ?? "";
|
|
560
|
+
const configExtensionsRoot = roots.global ?? "";
|
|
561
|
+
const bundledRoot = roots.stock ?? "";
|
|
562
|
+
return `${workspaceKey}::${params.ownershipUid ?? currentUid() ?? "none"}::${configExtensionsRoot}::${bundledRoot}::${JSON.stringify(loadPaths)}`;
|
|
563
|
+
}
|
|
564
|
+
function currentUid(overrideUid) {
|
|
565
|
+
if (overrideUid !== void 0) return overrideUid;
|
|
566
|
+
if (process.platform === "win32") return null;
|
|
567
|
+
if (typeof process.getuid !== "function") return null;
|
|
568
|
+
return process.getuid();
|
|
569
|
+
}
|
|
570
|
+
function checkSourceEscapesRoot(params) {
|
|
571
|
+
const sourceRealPath = safeRealpathSync(params.source);
|
|
572
|
+
const rootRealPath = safeRealpathSync(params.rootDir);
|
|
573
|
+
if (!sourceRealPath || !rootRealPath) return null;
|
|
574
|
+
if (isPathInside(rootRealPath, sourceRealPath)) return null;
|
|
575
|
+
return {
|
|
576
|
+
reason: "source_escapes_root",
|
|
577
|
+
sourcePath: params.source,
|
|
578
|
+
rootPath: params.rootDir,
|
|
579
|
+
targetPath: params.source,
|
|
580
|
+
sourceRealPath,
|
|
581
|
+
rootRealPath
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
function checkPathStatAndPermissions(params) {
|
|
585
|
+
if (process.platform === "win32") return null;
|
|
586
|
+
const pathsToCheck = [params.rootDir, params.source];
|
|
587
|
+
const seen = /* @__PURE__ */ new Set();
|
|
588
|
+
for (const targetPath of pathsToCheck) {
|
|
589
|
+
const normalized = path.resolve(targetPath);
|
|
590
|
+
if (seen.has(normalized)) continue;
|
|
591
|
+
seen.add(normalized);
|
|
592
|
+
let stat = safeStatSync(targetPath);
|
|
593
|
+
if (!stat) return {
|
|
594
|
+
reason: "path_stat_failed",
|
|
595
|
+
sourcePath: params.source,
|
|
596
|
+
rootPath: params.rootDir,
|
|
597
|
+
targetPath
|
|
598
|
+
};
|
|
599
|
+
let modeBits = stat.mode & 511;
|
|
600
|
+
if ((modeBits & 2) !== 0 && params.origin === "bundled") try {
|
|
601
|
+
fs.chmodSync(targetPath, modeBits & -19);
|
|
602
|
+
const repairedStat = safeStatSync(targetPath);
|
|
603
|
+
if (!repairedStat) return {
|
|
604
|
+
reason: "path_stat_failed",
|
|
605
|
+
sourcePath: params.source,
|
|
606
|
+
rootPath: params.rootDir,
|
|
607
|
+
targetPath
|
|
608
|
+
};
|
|
609
|
+
stat = repairedStat;
|
|
610
|
+
modeBits = repairedStat.mode & 511;
|
|
611
|
+
} catch {}
|
|
612
|
+
if ((modeBits & 2) !== 0) return {
|
|
613
|
+
reason: "path_world_writable",
|
|
614
|
+
sourcePath: params.source,
|
|
615
|
+
rootPath: params.rootDir,
|
|
616
|
+
targetPath,
|
|
617
|
+
modeBits
|
|
618
|
+
};
|
|
619
|
+
if (params.origin !== "bundled" && params.uid !== null && typeof stat.uid === "number" && stat.uid !== params.uid && stat.uid !== 0) return {
|
|
620
|
+
reason: "path_suspicious_ownership",
|
|
621
|
+
sourcePath: params.source,
|
|
622
|
+
rootPath: params.rootDir,
|
|
623
|
+
targetPath,
|
|
624
|
+
foundUid: stat.uid,
|
|
625
|
+
expectedUid: params.uid
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
return null;
|
|
629
|
+
}
|
|
630
|
+
function findCandidateBlockIssue(params) {
|
|
631
|
+
const escaped = checkSourceEscapesRoot({
|
|
632
|
+
source: params.source,
|
|
633
|
+
rootDir: params.rootDir
|
|
634
|
+
});
|
|
635
|
+
if (escaped) return escaped;
|
|
636
|
+
return checkPathStatAndPermissions({
|
|
637
|
+
source: params.source,
|
|
638
|
+
rootDir: params.rootDir,
|
|
639
|
+
origin: params.origin,
|
|
640
|
+
uid: currentUid(params.ownershipUid)
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
function formatCandidateBlockMessage(issue) {
|
|
644
|
+
if (issue.reason === "source_escapes_root") return `blocked plugin candidate: source escapes plugin root (${issue.sourcePath} -> ${issue.sourceRealPath}; root=${issue.rootRealPath})`;
|
|
645
|
+
if (issue.reason === "path_stat_failed") return `blocked plugin candidate: cannot stat path (${issue.targetPath})`;
|
|
646
|
+
if (issue.reason === "path_world_writable") return `blocked plugin candidate: world-writable path (${issue.targetPath}, mode=${formatPosixMode(issue.modeBits ?? 0)})`;
|
|
647
|
+
return `blocked plugin candidate: suspicious ownership (${issue.targetPath}, uid=${issue.foundUid}, expected uid=${issue.expectedUid} or root)`;
|
|
648
|
+
}
|
|
649
|
+
function isUnsafePluginCandidate(params) {
|
|
650
|
+
const issue = findCandidateBlockIssue({
|
|
651
|
+
source: params.source,
|
|
652
|
+
rootDir: params.rootDir,
|
|
653
|
+
origin: params.origin,
|
|
654
|
+
ownershipUid: params.ownershipUid
|
|
655
|
+
});
|
|
656
|
+
if (!issue) return false;
|
|
657
|
+
params.diagnostics.push({
|
|
658
|
+
level: "warn",
|
|
659
|
+
source: issue.targetPath,
|
|
660
|
+
message: formatCandidateBlockMessage(issue)
|
|
661
|
+
});
|
|
662
|
+
return true;
|
|
663
|
+
}
|
|
664
|
+
function isExtensionFile(filePath) {
|
|
665
|
+
const ext = path.extname(filePath);
|
|
666
|
+
if (!EXTENSION_EXTS.has(ext)) return false;
|
|
667
|
+
return !filePath.endsWith(".d.ts");
|
|
668
|
+
}
|
|
669
|
+
function shouldIgnoreScannedDirectory(dirName) {
|
|
670
|
+
const normalized = dirName.trim().toLowerCase();
|
|
671
|
+
if (!normalized) return true;
|
|
672
|
+
if (normalized.endsWith(".bak")) return true;
|
|
673
|
+
if (normalized.includes(".backup-")) return true;
|
|
674
|
+
if (normalized.includes(".disabled")) return true;
|
|
675
|
+
return false;
|
|
676
|
+
}
|
|
677
|
+
function readPackageManifest(dir, rejectHardlinks = true) {
|
|
678
|
+
const opened = openBoundaryFileSync({
|
|
679
|
+
absolutePath: path.join(dir, "package.json"),
|
|
680
|
+
rootPath: dir,
|
|
681
|
+
boundaryLabel: "plugin package directory",
|
|
682
|
+
rejectHardlinks
|
|
683
|
+
});
|
|
684
|
+
if (!opened.ok) return null;
|
|
685
|
+
try {
|
|
686
|
+
const raw = fs.readFileSync(opened.fd, "utf-8");
|
|
687
|
+
return JSON.parse(raw);
|
|
688
|
+
} catch {
|
|
689
|
+
return null;
|
|
690
|
+
} finally {
|
|
691
|
+
fs.closeSync(opened.fd);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
function deriveIdHint(params) {
|
|
695
|
+
const base = path.basename(params.filePath, path.extname(params.filePath));
|
|
696
|
+
const rawPackageName = params.packageName?.trim();
|
|
697
|
+
if (!rawPackageName) return base;
|
|
698
|
+
const unscoped = rawPackageName.includes("/") ? rawPackageName.split("/").pop() ?? rawPackageName : rawPackageName;
|
|
699
|
+
const canonicalPackageId = CANONICAL_PACKAGE_ID_ALIASES[unscoped] ?? unscoped;
|
|
700
|
+
if (!params.hasMultipleExtensions) return canonicalPackageId;
|
|
701
|
+
return `${canonicalPackageId}/${base}`;
|
|
702
|
+
}
|
|
703
|
+
function addCandidate(params) {
|
|
704
|
+
const resolved = path.resolve(params.source);
|
|
705
|
+
if (params.seen.has(resolved)) return;
|
|
706
|
+
const resolvedRoot = safeRealpathSync(params.rootDir) ?? path.resolve(params.rootDir);
|
|
707
|
+
if (isUnsafePluginCandidate({
|
|
708
|
+
source: resolved,
|
|
709
|
+
rootDir: resolvedRoot,
|
|
710
|
+
origin: params.origin,
|
|
711
|
+
diagnostics: params.diagnostics,
|
|
712
|
+
ownershipUid: params.ownershipUid
|
|
713
|
+
})) return;
|
|
714
|
+
params.seen.add(resolved);
|
|
715
|
+
const manifest = params.manifest ?? null;
|
|
716
|
+
params.candidates.push({
|
|
717
|
+
idHint: params.idHint,
|
|
718
|
+
source: resolved,
|
|
719
|
+
setupSource: params.setupSource,
|
|
720
|
+
rootDir: resolvedRoot,
|
|
721
|
+
origin: params.origin,
|
|
722
|
+
format: params.format ?? "moldclaw",
|
|
723
|
+
bundleFormat: params.bundleFormat,
|
|
724
|
+
workspaceDir: params.workspaceDir,
|
|
725
|
+
packageName: manifest?.name?.trim() || void 0,
|
|
726
|
+
packageVersion: manifest?.version?.trim() || void 0,
|
|
727
|
+
packageDescription: manifest?.description?.trim() || void 0,
|
|
728
|
+
packageDir: params.packageDir,
|
|
729
|
+
packageManifest: getPackageManifestMetadata(manifest ?? void 0)
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
function discoverBundleInRoot(params) {
|
|
733
|
+
const bundleFormat = detectBundleManifestFormat(params.rootDir);
|
|
734
|
+
if (!bundleFormat) return "none";
|
|
735
|
+
const bundleManifest = loadBundleManifest({
|
|
736
|
+
rootDir: params.rootDir,
|
|
737
|
+
bundleFormat,
|
|
738
|
+
rejectHardlinks: params.origin !== "bundled"
|
|
739
|
+
});
|
|
740
|
+
if (!bundleManifest.ok) {
|
|
741
|
+
params.diagnostics.push({
|
|
742
|
+
level: "error",
|
|
743
|
+
message: bundleManifest.error,
|
|
744
|
+
source: bundleManifest.manifestPath
|
|
745
|
+
});
|
|
746
|
+
return "invalid";
|
|
747
|
+
}
|
|
748
|
+
addCandidate({
|
|
749
|
+
candidates: params.candidates,
|
|
750
|
+
diagnostics: params.diagnostics,
|
|
751
|
+
seen: params.seen,
|
|
752
|
+
idHint: bundleManifest.manifest.id,
|
|
753
|
+
source: params.rootDir,
|
|
754
|
+
rootDir: params.rootDir,
|
|
755
|
+
origin: params.origin,
|
|
756
|
+
format: "bundle",
|
|
757
|
+
bundleFormat,
|
|
758
|
+
ownershipUid: params.ownershipUid,
|
|
759
|
+
workspaceDir: params.workspaceDir
|
|
760
|
+
});
|
|
761
|
+
return "added";
|
|
762
|
+
}
|
|
763
|
+
function resolvePackageEntrySource(params) {
|
|
764
|
+
const opened = openBoundaryFileSync({
|
|
765
|
+
absolutePath: path.resolve(params.packageDir, params.entryPath),
|
|
766
|
+
rootPath: params.packageDir,
|
|
767
|
+
boundaryLabel: "plugin package directory",
|
|
768
|
+
rejectHardlinks: params.rejectHardlinks ?? true
|
|
769
|
+
});
|
|
770
|
+
if (!opened.ok) {
|
|
771
|
+
params.diagnostics.push({
|
|
772
|
+
level: "error",
|
|
773
|
+
message: `extension entry escapes package directory: ${params.entryPath}`,
|
|
774
|
+
source: params.sourceLabel
|
|
775
|
+
});
|
|
776
|
+
return null;
|
|
777
|
+
}
|
|
778
|
+
const safeSource = opened.path;
|
|
779
|
+
fs.closeSync(opened.fd);
|
|
780
|
+
return safeSource;
|
|
781
|
+
}
|
|
782
|
+
function discoverInDirectory(params) {
|
|
783
|
+
if (!fs.existsSync(params.dir)) return;
|
|
784
|
+
let entries = [];
|
|
785
|
+
try {
|
|
786
|
+
entries = fs.readdirSync(params.dir, { withFileTypes: true });
|
|
787
|
+
} catch (err) {
|
|
788
|
+
params.diagnostics.push({
|
|
789
|
+
level: "warn",
|
|
790
|
+
message: `failed to read extensions dir: ${params.dir} (${String(err)})`,
|
|
791
|
+
source: params.dir
|
|
792
|
+
});
|
|
793
|
+
return;
|
|
794
|
+
}
|
|
795
|
+
for (const entry of entries) {
|
|
796
|
+
const fullPath = path.join(params.dir, entry.name);
|
|
797
|
+
if (entry.isFile()) {
|
|
798
|
+
if (!isExtensionFile(fullPath)) continue;
|
|
799
|
+
addCandidate({
|
|
800
|
+
candidates: params.candidates,
|
|
801
|
+
diagnostics: params.diagnostics,
|
|
802
|
+
seen: params.seen,
|
|
803
|
+
idHint: path.basename(entry.name, path.extname(entry.name)),
|
|
804
|
+
source: fullPath,
|
|
805
|
+
rootDir: path.dirname(fullPath),
|
|
806
|
+
origin: params.origin,
|
|
807
|
+
ownershipUid: params.ownershipUid,
|
|
808
|
+
workspaceDir: params.workspaceDir
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
if (!entry.isDirectory()) continue;
|
|
812
|
+
if (shouldIgnoreScannedDirectory(entry.name)) continue;
|
|
813
|
+
const rejectHardlinks = params.origin !== "bundled";
|
|
814
|
+
const manifest = readPackageManifest(fullPath, rejectHardlinks);
|
|
815
|
+
const extensionResolution = resolvePackageExtensionEntries(manifest ?? void 0);
|
|
816
|
+
const extensions = extensionResolution.status === "ok" ? extensionResolution.entries : [];
|
|
817
|
+
const setupEntryPath = getPackageManifestMetadata(manifest ?? void 0)?.setupEntry;
|
|
818
|
+
const setupSource = typeof setupEntryPath === "string" && setupEntryPath.trim().length > 0 ? resolvePackageEntrySource({
|
|
819
|
+
packageDir: fullPath,
|
|
820
|
+
entryPath: setupEntryPath,
|
|
821
|
+
sourceLabel: fullPath,
|
|
822
|
+
diagnostics: params.diagnostics,
|
|
823
|
+
rejectHardlinks
|
|
824
|
+
}) : null;
|
|
825
|
+
if (extensions.length > 0) {
|
|
826
|
+
for (const extPath of extensions) {
|
|
827
|
+
const resolved = resolvePackageEntrySource({
|
|
828
|
+
packageDir: fullPath,
|
|
829
|
+
entryPath: extPath,
|
|
830
|
+
sourceLabel: fullPath,
|
|
831
|
+
diagnostics: params.diagnostics,
|
|
832
|
+
rejectHardlinks
|
|
833
|
+
});
|
|
834
|
+
if (!resolved) continue;
|
|
835
|
+
addCandidate({
|
|
836
|
+
candidates: params.candidates,
|
|
837
|
+
diagnostics: params.diagnostics,
|
|
838
|
+
seen: params.seen,
|
|
839
|
+
idHint: deriveIdHint({
|
|
840
|
+
filePath: resolved,
|
|
841
|
+
packageName: manifest?.name,
|
|
842
|
+
hasMultipleExtensions: extensions.length > 1
|
|
843
|
+
}),
|
|
844
|
+
source: resolved,
|
|
845
|
+
...setupSource ? { setupSource } : {},
|
|
846
|
+
rootDir: fullPath,
|
|
847
|
+
origin: params.origin,
|
|
848
|
+
ownershipUid: params.ownershipUid,
|
|
849
|
+
workspaceDir: params.workspaceDir,
|
|
850
|
+
manifest,
|
|
851
|
+
packageDir: fullPath
|
|
852
|
+
});
|
|
853
|
+
}
|
|
854
|
+
continue;
|
|
855
|
+
}
|
|
856
|
+
if (discoverBundleInRoot({
|
|
857
|
+
rootDir: fullPath,
|
|
858
|
+
origin: params.origin,
|
|
859
|
+
ownershipUid: params.ownershipUid,
|
|
860
|
+
workspaceDir: params.workspaceDir,
|
|
861
|
+
candidates: params.candidates,
|
|
862
|
+
diagnostics: params.diagnostics,
|
|
863
|
+
seen: params.seen
|
|
864
|
+
}) === "added") continue;
|
|
865
|
+
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(fullPath, candidate)).find((candidate) => fs.existsSync(candidate));
|
|
866
|
+
if (indexFile && isExtensionFile(indexFile)) addCandidate({
|
|
867
|
+
candidates: params.candidates,
|
|
868
|
+
diagnostics: params.diagnostics,
|
|
869
|
+
seen: params.seen,
|
|
870
|
+
idHint: entry.name,
|
|
871
|
+
source: indexFile,
|
|
872
|
+
...setupSource ? { setupSource } : {},
|
|
873
|
+
rootDir: fullPath,
|
|
874
|
+
origin: params.origin,
|
|
875
|
+
ownershipUid: params.ownershipUid,
|
|
876
|
+
workspaceDir: params.workspaceDir,
|
|
877
|
+
manifest,
|
|
878
|
+
packageDir: fullPath
|
|
879
|
+
});
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
function discoverFromPath(params) {
|
|
883
|
+
const resolved = resolveUserPath(params.rawPath, params.env);
|
|
884
|
+
if (!fs.existsSync(resolved)) {
|
|
885
|
+
params.diagnostics.push({
|
|
886
|
+
level: "error",
|
|
887
|
+
message: `plugin path not found: ${resolved}`,
|
|
888
|
+
source: resolved
|
|
889
|
+
});
|
|
890
|
+
return;
|
|
891
|
+
}
|
|
892
|
+
const stat = fs.statSync(resolved);
|
|
893
|
+
if (stat.isFile()) {
|
|
894
|
+
if (!isExtensionFile(resolved)) {
|
|
895
|
+
params.diagnostics.push({
|
|
896
|
+
level: "error",
|
|
897
|
+
message: `plugin path is not a supported file: ${resolved}`,
|
|
898
|
+
source: resolved
|
|
899
|
+
});
|
|
900
|
+
return;
|
|
901
|
+
}
|
|
902
|
+
addCandidate({
|
|
903
|
+
candidates: params.candidates,
|
|
904
|
+
diagnostics: params.diagnostics,
|
|
905
|
+
seen: params.seen,
|
|
906
|
+
idHint: path.basename(resolved, path.extname(resolved)),
|
|
907
|
+
source: resolved,
|
|
908
|
+
rootDir: path.dirname(resolved),
|
|
909
|
+
origin: params.origin,
|
|
910
|
+
ownershipUid: params.ownershipUid,
|
|
911
|
+
workspaceDir: params.workspaceDir
|
|
912
|
+
});
|
|
913
|
+
return;
|
|
914
|
+
}
|
|
915
|
+
if (stat.isDirectory()) {
|
|
916
|
+
const rejectHardlinks = params.origin !== "bundled";
|
|
917
|
+
const manifest = readPackageManifest(resolved, rejectHardlinks);
|
|
918
|
+
const extensionResolution = resolvePackageExtensionEntries(manifest ?? void 0);
|
|
919
|
+
const extensions = extensionResolution.status === "ok" ? extensionResolution.entries : [];
|
|
920
|
+
const setupEntryPath = getPackageManifestMetadata(manifest ?? void 0)?.setupEntry;
|
|
921
|
+
const setupSource = typeof setupEntryPath === "string" && setupEntryPath.trim().length > 0 ? resolvePackageEntrySource({
|
|
922
|
+
packageDir: resolved,
|
|
923
|
+
entryPath: setupEntryPath,
|
|
924
|
+
sourceLabel: resolved,
|
|
925
|
+
diagnostics: params.diagnostics,
|
|
926
|
+
rejectHardlinks
|
|
927
|
+
}) : null;
|
|
928
|
+
if (extensions.length > 0) {
|
|
929
|
+
for (const extPath of extensions) {
|
|
930
|
+
const source = resolvePackageEntrySource({
|
|
931
|
+
packageDir: resolved,
|
|
932
|
+
entryPath: extPath,
|
|
933
|
+
sourceLabel: resolved,
|
|
934
|
+
diagnostics: params.diagnostics,
|
|
935
|
+
rejectHardlinks
|
|
936
|
+
});
|
|
937
|
+
if (!source) continue;
|
|
938
|
+
addCandidate({
|
|
939
|
+
candidates: params.candidates,
|
|
940
|
+
diagnostics: params.diagnostics,
|
|
941
|
+
seen: params.seen,
|
|
942
|
+
idHint: deriveIdHint({
|
|
943
|
+
filePath: source,
|
|
944
|
+
packageName: manifest?.name,
|
|
945
|
+
hasMultipleExtensions: extensions.length > 1
|
|
946
|
+
}),
|
|
947
|
+
source,
|
|
948
|
+
...setupSource ? { setupSource } : {},
|
|
949
|
+
rootDir: resolved,
|
|
950
|
+
origin: params.origin,
|
|
951
|
+
ownershipUid: params.ownershipUid,
|
|
952
|
+
workspaceDir: params.workspaceDir,
|
|
953
|
+
manifest,
|
|
954
|
+
packageDir: resolved
|
|
955
|
+
});
|
|
956
|
+
}
|
|
957
|
+
return;
|
|
958
|
+
}
|
|
959
|
+
if (discoverBundleInRoot({
|
|
960
|
+
rootDir: resolved,
|
|
961
|
+
origin: params.origin,
|
|
962
|
+
ownershipUid: params.ownershipUid,
|
|
963
|
+
workspaceDir: params.workspaceDir,
|
|
964
|
+
candidates: params.candidates,
|
|
965
|
+
diagnostics: params.diagnostics,
|
|
966
|
+
seen: params.seen
|
|
967
|
+
}) === "added") return;
|
|
968
|
+
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(resolved, candidate)).find((candidate) => fs.existsSync(candidate));
|
|
969
|
+
if (indexFile && isExtensionFile(indexFile)) {
|
|
970
|
+
addCandidate({
|
|
971
|
+
candidates: params.candidates,
|
|
972
|
+
diagnostics: params.diagnostics,
|
|
973
|
+
seen: params.seen,
|
|
974
|
+
idHint: path.basename(resolved),
|
|
975
|
+
source: indexFile,
|
|
976
|
+
...setupSource ? { setupSource } : {},
|
|
977
|
+
rootDir: resolved,
|
|
978
|
+
origin: params.origin,
|
|
979
|
+
ownershipUid: params.ownershipUid,
|
|
980
|
+
workspaceDir: params.workspaceDir,
|
|
981
|
+
manifest,
|
|
982
|
+
packageDir: resolved
|
|
983
|
+
});
|
|
984
|
+
return;
|
|
985
|
+
}
|
|
986
|
+
discoverInDirectory({
|
|
987
|
+
dir: resolved,
|
|
988
|
+
origin: params.origin,
|
|
989
|
+
ownershipUid: params.ownershipUid,
|
|
990
|
+
workspaceDir: params.workspaceDir,
|
|
991
|
+
candidates: params.candidates,
|
|
992
|
+
diagnostics: params.diagnostics,
|
|
993
|
+
seen: params.seen
|
|
994
|
+
});
|
|
995
|
+
return;
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
function discovermoldClawPlugins(params) {
|
|
999
|
+
const env = params.env ?? process.env;
|
|
1000
|
+
const cacheEnabled = params.cache !== false && shouldUseDiscoveryCache(env);
|
|
1001
|
+
const cacheKey = buildDiscoveryCacheKey({
|
|
1002
|
+
workspaceDir: params.workspaceDir,
|
|
1003
|
+
extraPaths: params.extraPaths,
|
|
1004
|
+
ownershipUid: params.ownershipUid,
|
|
1005
|
+
env
|
|
1006
|
+
});
|
|
1007
|
+
if (cacheEnabled) {
|
|
1008
|
+
const cached = discoveryCache.get(cacheKey);
|
|
1009
|
+
if (cached && cached.expiresAt > Date.now()) return cached.result;
|
|
1010
|
+
}
|
|
1011
|
+
const candidates = [];
|
|
1012
|
+
const diagnostics = [];
|
|
1013
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1014
|
+
const workspaceDir = params.workspaceDir?.trim();
|
|
1015
|
+
const workspaceRoot = workspaceDir ? resolveUserPath(workspaceDir, env) : void 0;
|
|
1016
|
+
const roots = resolvePluginSourceRoots({
|
|
1017
|
+
workspaceDir: workspaceRoot,
|
|
1018
|
+
env
|
|
1019
|
+
});
|
|
1020
|
+
const extra = params.extraPaths ?? [];
|
|
1021
|
+
for (const extraPath of extra) {
|
|
1022
|
+
if (typeof extraPath !== "string") continue;
|
|
1023
|
+
const trimmed = extraPath.trim();
|
|
1024
|
+
if (!trimmed) continue;
|
|
1025
|
+
discoverFromPath({
|
|
1026
|
+
rawPath: trimmed,
|
|
1027
|
+
origin: "config",
|
|
1028
|
+
ownershipUid: params.ownershipUid,
|
|
1029
|
+
workspaceDir: workspaceDir?.trim() || void 0,
|
|
1030
|
+
env,
|
|
1031
|
+
candidates,
|
|
1032
|
+
diagnostics,
|
|
1033
|
+
seen
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
1036
|
+
if (roots.workspace && workspaceRoot) discoverInDirectory({
|
|
1037
|
+
dir: roots.workspace,
|
|
1038
|
+
origin: "workspace",
|
|
1039
|
+
ownershipUid: params.ownershipUid,
|
|
1040
|
+
workspaceDir: workspaceRoot,
|
|
1041
|
+
candidates,
|
|
1042
|
+
diagnostics,
|
|
1043
|
+
seen
|
|
1044
|
+
});
|
|
1045
|
+
if (roots.stock) discoverInDirectory({
|
|
1046
|
+
dir: roots.stock,
|
|
1047
|
+
origin: "bundled",
|
|
1048
|
+
ownershipUid: params.ownershipUid,
|
|
1049
|
+
candidates,
|
|
1050
|
+
diagnostics,
|
|
1051
|
+
seen
|
|
1052
|
+
});
|
|
1053
|
+
discoverInDirectory({
|
|
1054
|
+
dir: roots.global,
|
|
1055
|
+
origin: "global",
|
|
1056
|
+
ownershipUid: params.ownershipUid,
|
|
1057
|
+
candidates,
|
|
1058
|
+
diagnostics,
|
|
1059
|
+
seen
|
|
1060
|
+
});
|
|
1061
|
+
const result = {
|
|
1062
|
+
candidates,
|
|
1063
|
+
diagnostics
|
|
1064
|
+
};
|
|
1065
|
+
if (cacheEnabled) {
|
|
1066
|
+
const ttl = resolveDiscoveryCacheMs(env);
|
|
1067
|
+
if (ttl > 0) discoveryCache.set(cacheKey, {
|
|
1068
|
+
expiresAt: Date.now() + ttl,
|
|
1069
|
+
result
|
|
1070
|
+
});
|
|
1071
|
+
}
|
|
1072
|
+
return result;
|
|
1073
|
+
}
|
|
1074
|
+
//#endregion
|
|
1075
|
+
//#region src/plugins/manifest-registry.ts
|
|
1076
|
+
const PLUGIN_ORIGIN_RANK = {
|
|
1077
|
+
config: 0,
|
|
1078
|
+
workspace: 1,
|
|
1079
|
+
global: 2,
|
|
1080
|
+
bundled: 3
|
|
1081
|
+
};
|
|
1082
|
+
const registryCache = /* @__PURE__ */ new Map();
|
|
1083
|
+
const DEFAULT_MANIFEST_CACHE_MS = 1e3;
|
|
1084
|
+
function clearPluginManifestRegistryCache() {
|
|
1085
|
+
registryCache.clear();
|
|
1086
|
+
}
|
|
1087
|
+
function resolveManifestCacheMs(env) {
|
|
1088
|
+
const raw = env.MOLDCLAW_PLUGIN_MANIFEST_CACHE_MS?.trim();
|
|
1089
|
+
if (raw === "" || raw === "0") return 0;
|
|
1090
|
+
if (!raw) return DEFAULT_MANIFEST_CACHE_MS;
|
|
1091
|
+
const parsed = Number.parseInt(raw, 10);
|
|
1092
|
+
if (!Number.isFinite(parsed)) return DEFAULT_MANIFEST_CACHE_MS;
|
|
1093
|
+
return Math.max(0, parsed);
|
|
1094
|
+
}
|
|
1095
|
+
function shouldUseManifestCache(env) {
|
|
1096
|
+
if (env.MOLDCLAW_DISABLE_PLUGIN_MANIFEST_CACHE?.trim()) return false;
|
|
1097
|
+
return resolveManifestCacheMs(env) > 0;
|
|
1098
|
+
}
|
|
1099
|
+
function buildCacheKey(params) {
|
|
1100
|
+
const { roots, loadPaths } = resolvePluginCacheInputs({
|
|
1101
|
+
workspaceDir: params.workspaceDir,
|
|
1102
|
+
loadPaths: params.plugins.loadPaths,
|
|
1103
|
+
env: params.env
|
|
1104
|
+
});
|
|
1105
|
+
return `${roots.workspace ?? ""}::${roots.global}::${roots.stock ?? ""}::${JSON.stringify(loadPaths)}`;
|
|
1106
|
+
}
|
|
1107
|
+
function safeStatMtimeMs(filePath) {
|
|
1108
|
+
try {
|
|
1109
|
+
return fs.statSync(filePath).mtimeMs;
|
|
1110
|
+
} catch {
|
|
1111
|
+
return null;
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
function normalizeManifestLabel(raw) {
|
|
1115
|
+
const trimmed = raw?.trim();
|
|
1116
|
+
return trimmed ? trimmed : void 0;
|
|
1117
|
+
}
|
|
1118
|
+
function isCompatiblePluginIdHint(idHint, manifestId) {
|
|
1119
|
+
const normalizedHint = idHint?.trim();
|
|
1120
|
+
if (!normalizedHint) return true;
|
|
1121
|
+
if (normalizedHint === manifestId) return true;
|
|
1122
|
+
return normalizedHint === `${manifestId}-provider` || normalizedHint === `${manifestId}-plugin` || normalizedHint === `${manifestId}-sandbox`;
|
|
1123
|
+
}
|
|
1124
|
+
function buildRecord(params) {
|
|
1125
|
+
return {
|
|
1126
|
+
id: params.manifest.id,
|
|
1127
|
+
name: normalizeManifestLabel(params.manifest.name) ?? params.candidate.packageName,
|
|
1128
|
+
description: normalizeManifestLabel(params.manifest.description) ?? params.candidate.packageDescription,
|
|
1129
|
+
version: normalizeManifestLabel(params.manifest.version) ?? params.candidate.packageVersion,
|
|
1130
|
+
format: params.candidate.format ?? "moldclaw",
|
|
1131
|
+
bundleFormat: params.candidate.bundleFormat,
|
|
1132
|
+
kind: params.manifest.kind,
|
|
1133
|
+
channels: params.manifest.channels ?? [],
|
|
1134
|
+
providers: params.manifest.providers ?? [],
|
|
1135
|
+
providerAuthEnvVars: params.manifest.providerAuthEnvVars,
|
|
1136
|
+
providerAuthChoices: params.manifest.providerAuthChoices,
|
|
1137
|
+
skills: params.manifest.skills ?? [],
|
|
1138
|
+
settingsFiles: [],
|
|
1139
|
+
hooks: [],
|
|
1140
|
+
origin: params.candidate.origin,
|
|
1141
|
+
workspaceDir: params.candidate.workspaceDir,
|
|
1142
|
+
rootDir: params.candidate.rootDir,
|
|
1143
|
+
source: params.candidate.source,
|
|
1144
|
+
setupSource: params.candidate.setupSource,
|
|
1145
|
+
startupDeferConfiguredChannelFullLoadUntilAfterListen: params.candidate.packageManifest?.startup?.deferConfiguredChannelFullLoadUntilAfterListen === true,
|
|
1146
|
+
manifestPath: params.manifestPath,
|
|
1147
|
+
schemaCacheKey: params.schemaCacheKey,
|
|
1148
|
+
configSchema: params.configSchema,
|
|
1149
|
+
configUiHints: params.manifest.uiHints
|
|
1150
|
+
};
|
|
1151
|
+
}
|
|
1152
|
+
function buildBundleRecord(params) {
|
|
1153
|
+
return {
|
|
1154
|
+
id: params.manifest.id,
|
|
1155
|
+
name: normalizeManifestLabel(params.manifest.name) ?? params.candidate.idHint,
|
|
1156
|
+
description: normalizeManifestLabel(params.manifest.description),
|
|
1157
|
+
version: normalizeManifestLabel(params.manifest.version),
|
|
1158
|
+
format: "bundle",
|
|
1159
|
+
bundleFormat: params.candidate.bundleFormat,
|
|
1160
|
+
bundleCapabilities: params.manifest.capabilities,
|
|
1161
|
+
channels: [],
|
|
1162
|
+
providers: [],
|
|
1163
|
+
skills: params.manifest.skills ?? [],
|
|
1164
|
+
settingsFiles: params.manifest.settingsFiles ?? [],
|
|
1165
|
+
hooks: params.manifest.hooks ?? [],
|
|
1166
|
+
origin: params.candidate.origin,
|
|
1167
|
+
workspaceDir: params.candidate.workspaceDir,
|
|
1168
|
+
rootDir: params.candidate.rootDir,
|
|
1169
|
+
source: params.candidate.source,
|
|
1170
|
+
manifestPath: params.manifestPath,
|
|
1171
|
+
schemaCacheKey: void 0,
|
|
1172
|
+
configSchema: void 0,
|
|
1173
|
+
configUiHints: void 0
|
|
1174
|
+
};
|
|
1175
|
+
}
|
|
1176
|
+
function matchesInstalledPluginRecord(params) {
|
|
1177
|
+
if (params.candidate.origin !== "global") return false;
|
|
1178
|
+
const record = params.config?.plugins?.installs?.[params.pluginId];
|
|
1179
|
+
if (!record) return false;
|
|
1180
|
+
const candidateSource = resolveUserPath(params.candidate.source, params.env);
|
|
1181
|
+
const trackedPaths = [record.installPath, record.sourcePath].filter((entry) => typeof entry === "string" && entry.trim().length > 0).map((entry) => resolveUserPath(entry, params.env));
|
|
1182
|
+
if (trackedPaths.length === 0) return false;
|
|
1183
|
+
return trackedPaths.some((trackedPath) => {
|
|
1184
|
+
return candidateSource === trackedPath || isPathInside(trackedPath, candidateSource);
|
|
1185
|
+
});
|
|
1186
|
+
}
|
|
1187
|
+
function resolveDuplicatePrecedenceRank(params) {
|
|
1188
|
+
if (params.candidate.origin === "config") return 0;
|
|
1189
|
+
if (params.candidate.origin === "global" && matchesInstalledPluginRecord({
|
|
1190
|
+
pluginId: params.pluginId,
|
|
1191
|
+
candidate: params.candidate,
|
|
1192
|
+
config: params.config,
|
|
1193
|
+
env: params.env
|
|
1194
|
+
})) return 1;
|
|
1195
|
+
if (params.candidate.origin === "bundled") return 2;
|
|
1196
|
+
if (params.candidate.origin === "workspace") return 3;
|
|
1197
|
+
return 4;
|
|
1198
|
+
}
|
|
1199
|
+
function loadPluginManifestRegistry(params) {
|
|
1200
|
+
const config = params.config ?? {};
|
|
1201
|
+
const normalized = normalizePluginsConfig(config.plugins);
|
|
1202
|
+
const env = params.env ?? process.env;
|
|
1203
|
+
const cacheKey = buildCacheKey({
|
|
1204
|
+
workspaceDir: params.workspaceDir,
|
|
1205
|
+
plugins: normalized,
|
|
1206
|
+
env
|
|
1207
|
+
});
|
|
1208
|
+
const cacheEnabled = params.cache !== false && shouldUseManifestCache(env);
|
|
1209
|
+
if (cacheEnabled) {
|
|
1210
|
+
const cached = registryCache.get(cacheKey);
|
|
1211
|
+
if (cached && cached.expiresAt > Date.now()) return cached.registry;
|
|
1212
|
+
}
|
|
1213
|
+
const discovery = params.candidates ? {
|
|
1214
|
+
candidates: params.candidates,
|
|
1215
|
+
diagnostics: params.diagnostics ?? []
|
|
1216
|
+
} : discovermoldClawPlugins({
|
|
1217
|
+
workspaceDir: params.workspaceDir,
|
|
1218
|
+
extraPaths: normalized.loadPaths,
|
|
1219
|
+
env
|
|
1220
|
+
});
|
|
1221
|
+
const diagnostics = [...discovery.diagnostics];
|
|
1222
|
+
const candidates = discovery.candidates;
|
|
1223
|
+
const records = [];
|
|
1224
|
+
const seenIds = /* @__PURE__ */ new Map();
|
|
1225
|
+
const realpathCache = /* @__PURE__ */ new Map();
|
|
1226
|
+
for (const candidate of candidates) {
|
|
1227
|
+
const rejectHardlinks = candidate.origin !== "bundled";
|
|
1228
|
+
const isBundleRecord = (candidate.format ?? "moldclaw") === "bundle";
|
|
1229
|
+
const manifestRes = isBundleRecord && candidate.bundleFormat ? loadBundleManifest({
|
|
1230
|
+
rootDir: candidate.rootDir,
|
|
1231
|
+
bundleFormat: candidate.bundleFormat,
|
|
1232
|
+
rejectHardlinks
|
|
1233
|
+
}) : loadPluginManifest(candidate.rootDir, rejectHardlinks);
|
|
1234
|
+
if (!manifestRes.ok) {
|
|
1235
|
+
diagnostics.push({
|
|
1236
|
+
level: "error",
|
|
1237
|
+
message: manifestRes.error,
|
|
1238
|
+
source: manifestRes.manifestPath
|
|
1239
|
+
});
|
|
1240
|
+
continue;
|
|
1241
|
+
}
|
|
1242
|
+
const manifest = manifestRes.manifest;
|
|
1243
|
+
if (!isCompatiblePluginIdHint(candidate.idHint, manifest.id)) diagnostics.push({
|
|
1244
|
+
level: "warn",
|
|
1245
|
+
pluginId: manifest.id,
|
|
1246
|
+
source: candidate.source,
|
|
1247
|
+
message: `plugin id mismatch (manifest uses "${manifest.id}", entry hints "${candidate.idHint}")`
|
|
1248
|
+
});
|
|
1249
|
+
const configSchema = "configSchema" in manifest ? manifest.configSchema : void 0;
|
|
1250
|
+
const schemaCacheKey = (() => {
|
|
1251
|
+
if (!configSchema) return;
|
|
1252
|
+
const manifestMtime = safeStatMtimeMs(manifestRes.manifestPath);
|
|
1253
|
+
return manifestMtime ? `${manifestRes.manifestPath}:${manifestMtime}` : manifestRes.manifestPath;
|
|
1254
|
+
})();
|
|
1255
|
+
const existing = seenIds.get(manifest.id);
|
|
1256
|
+
if (existing) {
|
|
1257
|
+
const samePath = existing.candidate.rootDir === candidate.rootDir;
|
|
1258
|
+
if ((() => {
|
|
1259
|
+
if (samePath) return true;
|
|
1260
|
+
const existingReal = safeRealpathSync(existing.candidate.rootDir, realpathCache);
|
|
1261
|
+
const candidateReal = safeRealpathSync(candidate.rootDir, realpathCache);
|
|
1262
|
+
return Boolean(existingReal && candidateReal && existingReal === candidateReal);
|
|
1263
|
+
})()) {
|
|
1264
|
+
if (PLUGIN_ORIGIN_RANK[candidate.origin] < PLUGIN_ORIGIN_RANK[existing.candidate.origin]) {
|
|
1265
|
+
records[existing.recordIndex] = isBundleRecord ? buildBundleRecord({
|
|
1266
|
+
manifest,
|
|
1267
|
+
candidate,
|
|
1268
|
+
manifestPath: manifestRes.manifestPath
|
|
1269
|
+
}) : buildRecord({
|
|
1270
|
+
manifest,
|
|
1271
|
+
candidate,
|
|
1272
|
+
manifestPath: manifestRes.manifestPath,
|
|
1273
|
+
schemaCacheKey,
|
|
1274
|
+
configSchema
|
|
1275
|
+
});
|
|
1276
|
+
seenIds.set(manifest.id, {
|
|
1277
|
+
candidate,
|
|
1278
|
+
recordIndex: existing.recordIndex
|
|
1279
|
+
});
|
|
1280
|
+
}
|
|
1281
|
+
continue;
|
|
1282
|
+
}
|
|
1283
|
+
diagnostics.push({
|
|
1284
|
+
level: "warn",
|
|
1285
|
+
pluginId: manifest.id,
|
|
1286
|
+
source: candidate.source,
|
|
1287
|
+
message: resolveDuplicatePrecedenceRank({
|
|
1288
|
+
pluginId: manifest.id,
|
|
1289
|
+
candidate,
|
|
1290
|
+
config,
|
|
1291
|
+
env
|
|
1292
|
+
}) < resolveDuplicatePrecedenceRank({
|
|
1293
|
+
pluginId: manifest.id,
|
|
1294
|
+
candidate: existing.candidate,
|
|
1295
|
+
config,
|
|
1296
|
+
env
|
|
1297
|
+
}) ? `duplicate plugin id detected; ${existing.candidate.origin} plugin will be overridden by ${candidate.origin} plugin (${candidate.source})` : `duplicate plugin id detected; ${candidate.origin} plugin will be overridden by ${existing.candidate.origin} plugin (${candidate.source})`
|
|
1298
|
+
});
|
|
1299
|
+
} else seenIds.set(manifest.id, {
|
|
1300
|
+
candidate,
|
|
1301
|
+
recordIndex: records.length
|
|
1302
|
+
});
|
|
1303
|
+
records.push(isBundleRecord ? buildBundleRecord({
|
|
1304
|
+
manifest,
|
|
1305
|
+
candidate,
|
|
1306
|
+
manifestPath: manifestRes.manifestPath
|
|
1307
|
+
}) : buildRecord({
|
|
1308
|
+
manifest,
|
|
1309
|
+
candidate,
|
|
1310
|
+
manifestPath: manifestRes.manifestPath,
|
|
1311
|
+
schemaCacheKey,
|
|
1312
|
+
configSchema
|
|
1313
|
+
}));
|
|
1314
|
+
}
|
|
1315
|
+
const registry = {
|
|
1316
|
+
plugins: records,
|
|
1317
|
+
diagnostics
|
|
1318
|
+
};
|
|
1319
|
+
if (cacheEnabled) {
|
|
1320
|
+
const ttl = resolveManifestCacheMs(env);
|
|
1321
|
+
if (ttl > 0) registryCache.set(cacheKey, {
|
|
1322
|
+
expiresAt: Date.now() + ttl,
|
|
1323
|
+
registry
|
|
1324
|
+
});
|
|
1325
|
+
}
|
|
1326
|
+
return registry;
|
|
1327
|
+
}
|
|
1328
|
+
//#endregion
|
|
1329
|
+
export { resolvePackageExtensionEntries as _, resolvePluginCacheInputs as a, safeStatSync as c, CURSOR_BUNDLE_MANIFEST_RELATIVE_PATH as d, detectBundleManifestFormat as f, loadPluginManifest as g, normalizeBundlePathList as h, discovermoldClawPlugins as i, CLAUDE_BUNDLE_MANIFEST_RELATIVE_PATH as l, mergeBundlePathLists as m, loadPluginManifestRegistry as n, resolvePluginSourceRoots as o, loadBundleManifest as p, clearPluginDiscoveryCache as r, isPathInside as s, clearPluginManifestRegistryCache as t, CODEX_BUNDLE_MANIFEST_RELATIVE_PATH as u };
|