@fased/fased 0.1.62 → 0.1.64
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/CHANGELOG.md +32 -0
- package/README.md +38 -30
- package/config/dependency-ownership.json +1 -1
- package/config/signer-policies/README.md +49 -0
- package/config/signer-policies/agent.json.template +32 -0
- package/config/signer-policies/mining.json.template +69 -0
- package/config/signer-policies/network.json.template +5 -0
- package/config/signer-policies/vault.json.template +70 -0
- package/config/signer-protocol-v2.json +76 -0
- package/config/typescript-noemit-baseline.json +680 -0
- package/dist/agents/auth-profiles/store.js +267 -31
- package/dist/agents/bash-tools.exec.js +10 -4
- package/dist/agents/current-model-catalog.js +3 -3
- package/dist/agents/memory-search.js +7 -1
- package/dist/agents/model-catalog-access.js +1 -2
- package/dist/agents/model-catalog-snapshot.js +1 -1
- package/dist/agents/model-catalog-source.js +1 -1
- package/dist/agents/model-metadata.js +1 -1
- package/dist/agents/model-selection.js +2 -28
- package/dist/agents/models-config.providers.js +6 -6
- package/dist/agents/pi-embedded-runner/compact.js +15 -7
- package/dist/agents/pi-embedded-runner/model.js +1 -1
- package/dist/agents/pi-embedded-runner/run/attempt.js +24 -13
- package/dist/agents/pi-embedded-runner/run.js +2 -0
- package/dist/agents/pi-embedded-runner/tool-split.js +40 -2
- package/dist/agents/pi-tool-definition-adapter.js +16 -1
- package/dist/agents/pi-tools.js +2 -1
- package/dist/agents/sandbox/config.js +1 -1
- package/dist/agents/sandbox/context.js +27 -2
- package/dist/agents/skills/env-overrides.js +38 -28
- package/dist/agents/skills/trust.js +93 -0
- package/dist/agents/skills/workspace.js +128 -0
- package/dist/agents/skills-clawhub.js +36 -11
- package/dist/agents/skills-marketplace-scan.js +49 -0
- package/dist/agents/tools/marketplace-offer-draft-tool.js +1 -1
- package/dist/agents/tools/mining-tool.js +1 -1
- package/dist/agents/tools/session-status-tool.js +1 -1
- package/dist/agents/tools/wallet-action-tool.js +172 -36
- package/dist/agents/tools/wallet-skill-policy.js +65 -23
- package/dist/agents/tools/wallet-tool.js +7 -11
- package/dist/auto-reply/reply/directive-handling.fast-lane.js +2 -1
- package/dist/auto-reply/reply/directive-handling.impl.js +2 -1
- package/dist/auto-reply/reply/directive-handling.model.js +2 -1
- package/dist/auto-reply/reply/directive-handling.persist.js +2 -2
- package/dist/auto-reply/reply/get-reply-directives-apply.js +2 -0
- package/dist/auto-reply/reply/get-reply-inline-actions.js +25 -1
- package/dist/auto-reply/reply/model-selection.js +7 -4
- package/dist/auto-reply/reply/session-reset-model.js +4 -4
- package/dist/brand.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/channel-web.js +2 -2
- package/dist/cli/gateway-cli/run.js +8 -0
- package/dist/cli/program/command-registry.js +1 -1
- package/dist/cli/program/register.onboard.js +2 -3
- package/dist/cli/program/register.wallet.js +16 -123
- package/dist/cli/providers-cli.js +1 -1
- package/dist/cli/sat-cli.js +129 -2
- package/dist/cli/update-cli/update-command.js +260 -11
- package/dist/commands/auth-choice.apply.api-providers.js +3 -3
- package/dist/commands/doctor-config-flow.js +1 -1
- package/dist/commands/doctor-legacy-config.js +2 -13
- package/dist/commands/model-picker.js +6 -6
- package/dist/commands/models/auth.js +1 -1
- package/dist/commands/onboard-auth.config-gateways.js +1 -1
- package/dist/commands/onboard-auth.credentials.js +32 -8
- package/dist/commands/onboard-non-interactive/local/wallet-config.js +28 -27
- package/dist/commands/onboard-non-interactive/local.js +5 -1
- package/dist/commands/wallet.js +568 -1911
- package/dist/config/config.js +2 -2
- package/dist/config/io.js +64 -2
- package/dist/config/schema.help.js +8 -7
- package/dist/config/schema.labels.js +5 -4
- package/dist/config/zod-schema.agent-runtime.js +1 -0
- package/dist/config/zod-schema.js +5 -0
- package/dist/control-ui/assets/{app-DLil9VO1.js → app-bR-fO5ty.js} +1511 -1555
- package/dist/control-ui/assets/{config-CU5Zi8Dh.js → config-LeImukCW.js} +10 -10
- package/dist/control-ui/assets/{federation-D10Q4eP_.js → federation-DgA9e-Pn.js} +364 -422
- package/dist/control-ui/assets/{index-DdE_NIXo.js → index-ckCxHwjy.js} +3 -3
- package/dist/control-ui/assets/{mining-BdhMn18r.js → mining-BgHFh0ei.js} +134 -114
- package/dist/control-ui/assets/mining-commit-DFpB_4JN.js +2 -0
- package/dist/control-ui/assets/{open-external-url-DwSiwMPl.js → open-external-url-ulF1B-sA.js} +3 -3
- package/dist/control-ui/assets/{providers-QMn4w2_f.js → providers-CIx9fxc6.js} +2 -2
- package/dist/control-ui/assets/{wallet-C2g294QT.js → wallet-DvStR_AT.js} +259 -377
- package/dist/control-ui/index.html +1 -1
- package/dist/control-ui/version.json +1 -1
- package/dist/daemon/systemd-system.js +56 -50
- package/dist/extensions/sat-mining/src/protocol-contract.js +43 -3
- package/dist/extensions/sat-mining/src/rpc-read.js +235 -67
- package/dist/extensions/sat-mining/src/sat-bond-layout.js +5 -2
- package/dist/extensions/sat-mining/src/signer-codec-manifest.js +406 -0
- package/dist/extensions/sat-mining/src/solana-submit.js +1038 -397
- package/dist/extensions/sat-mining/src/submission-ledger.js +349 -0
- package/dist/federation/auto-connect.js +98 -8
- package/dist/federation/marketplace-capability-adapter.js +33 -7
- package/dist/federation/marketplace-delivery-outbox.js +196 -0
- package/dist/federation/marketplace-delivery.js +351 -215
- package/dist/federation/marketplace-direct-payment.js +272 -141
- package/dist/federation/marketplace-escrow.js +607 -249
- package/dist/federation/marketplace-settlement-ledger.js +352 -0
- package/dist/federation/offers.js +9 -7
- package/dist/federation/peer-auth-v2.js +529 -0
- package/dist/gateway/a2a-http.js +425 -96
- package/dist/gateway/a2a-settlement.js +259 -153
- package/dist/gateway/a2a-task-store.js +524 -0
- package/dist/gateway/auth.js +38 -2
- package/dist/gateway/config-reload.js +46 -33
- package/dist/gateway/durable-capacity.js +31 -0
- package/dist/gateway/federation-http.js +540 -135
- package/dist/gateway/federation-marketplace-run-store.js +397 -0
- package/dist/gateway/federation-marketplace.js +535 -230
- package/dist/gateway/mutating-admin-rpc-rate-limit.js +5 -0
- package/dist/gateway/security-path.js +1 -1
- package/dist/gateway/server-http.js +1084 -1205
- package/dist/gateway/server-methods/models.js +1 -1
- package/dist/gateway/server-methods/secrets.js +40 -0
- package/dist/gateway/server-methods.js +1 -2
- package/dist/gateway/server-reload-handlers.js +196 -66
- package/dist/gateway/server-runtime-config.js +1 -1
- package/dist/gateway/server-secrets-runtime.js +288 -0
- package/dist/gateway/server.impl.js +73 -42
- package/dist/gateway/sessions-patch.js +3 -5
- package/dist/index.js +4 -2
- package/dist/infra/fasedhub.js +64 -1
- package/dist/infra/local-source-paired-update.js +538 -0
- package/dist/infra/restart.js +41 -10
- package/dist/infra/update-runner.js +96 -0
- package/dist/light-update-status.js +11 -11
- package/dist/memory/backend-config.js +2 -1
- package/dist/memory/session-files.js +16 -2
- package/dist/plugin-sdk/{accounts-DxblobYM.js → accounts-Brn3-uWN.js} +1 -1
- package/dist/plugin-sdk/{actions-D4UNimWa.js → actions-DRu135h0.js} +2 -2
- package/dist/plugin-sdk/{active-listener-CFuy106s.js → active-listener-B_NMtgPL.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-Bwi2Oq03.js → audio-preflight-BYxAt775.js} +27 -27
- package/dist/plugin-sdk/{audit-Cs0K7LBp.js → audit-C5d2z5U1.js} +1 -1
- package/dist/plugin-sdk/{channel-access-D5aHoTY8.js → channel-access-CcFRdRPO.js} +1 -1
- package/dist/plugin-sdk/{channel-access-configure-Dvch9mMQ.js → channel-access-configure-DaI5wevh.js} +1 -1
- package/dist/plugin-sdk/channel-plugin-common.d.ts +3 -3
- package/dist/plugin-sdk/channel-plugin-common.js +4 -4
- package/dist/plugin-sdk/{chunk-B0FUGc5A.js → chunk-CyoyqpbG.js} +1 -1
- package/dist/plugin-sdk/{chunk-items-DzT4L4Ty.js → chunk-items-DIRHG2gJ.js} +1 -1
- package/dist/plugin-sdk/command-status.d.ts +2 -2
- package/dist/plugin-sdk/command-status.js +27 -27
- package/dist/plugin-sdk/{commands-registry-DmDRhRAU.js → commands-registry-BfqdEWdF.js} +2 -2
- package/dist/plugin-sdk/{common-CfUOowOp.js → common-HCcXU-NR.js} +1 -1
- package/dist/plugin-sdk/{config-mxULv0fQ.js → config-DlWVeLFB.js} +7113 -6877
- package/dist/plugin-sdk/{config-schema-BrkmtFxB.js → config-schema-BOT7kHb6.js} +6779 -3696
- package/dist/plugin-sdk/device-pair.d.ts +1 -1
- package/dist/plugin-sdk/discord.d.ts +6 -6
- package/dist/plugin-sdk/discord.js +19 -19
- package/dist/plugin-sdk/file-lock.js +35 -4
- package/dist/plugin-sdk/{filesystem-manager-ZoHU8oA7.js → filesystem-manager-DoI8IBNF.js} +1 -1
- package/dist/plugin-sdk/{group-mentions-BHRff6j8.d.ts → group-mentions-q3hUTCt7.d.ts} +1 -1
- package/dist/plugin-sdk/{handle-action-DbVCF9HZ.js → handle-action-hvwapMKg.js} +13 -13
- package/dist/plugin-sdk/{helpers-BXbdgs5H.js → helpers-DMBU4oTo.js} +1 -1
- package/dist/plugin-sdk/{image-ops-D7jPxaph.js → image-ops-DQi0n_Tt.js} +1 -1
- package/dist/plugin-sdk/index.d.ts +21 -39
- package/dist/plugin-sdk/index.js +29 -29
- package/dist/plugin-sdk/{login-BRxww6nv.js → login-Ca583Okc.js} +3 -3
- package/dist/plugin-sdk/{login-qr-DJXsk9XH.js → login-qr-CGciBSNP.js} +3 -3
- package/dist/plugin-sdk/{manager-Y2S_5IlI.js → manager-BegWxNYX.js} +4 -4
- package/dist/plugin-sdk/{markdown-tables-DHLFQqaF.js → markdown-tables-DCOXEUfZ.js} +1 -1
- package/dist/plugin-sdk/{media-Czo4carg.js → media-CAdQF5TG.js} +47 -47
- package/dist/plugin-sdk/{memory-search-DTjIMw8J.js → memory-search-CrFPOeTH.js} +4 -1
- package/dist/plugin-sdk/{monitor-M_ta2lMc.js → monitor-BCFDaqJ-.js} +31 -31
- package/dist/plugin-sdk/{monitor-wYVncM9w.js → monitor-BgbjRiPM.js} +32 -32
- package/dist/plugin-sdk/{openresponses-http-B2GmeSt4.js → openresponses-http-DFf87SMM.js} +27 -27
- package/dist/plugin-sdk/{optional-runtime-dependency-DdMbxS24.js → optional-runtime-dependency-0dznm3ZO.js} +1 -1
- package/dist/plugin-sdk/{outbound-Db8mRN6P.js → outbound-BgVDdHxx.js} +6 -6
- package/dist/plugin-sdk/{outbound-attachment-BqFjcypb.js → outbound-attachment-QqTnIhZL.js} +2 -2
- package/dist/plugin-sdk/{pairing-message-B3bHYGaw.d.ts → pairing-message-CS-9BHug.d.ts} +2 -2
- package/dist/plugin-sdk/{pairing-message-B3GC_7CD.js → pairing-message-D0CoLHRJ.js} +1 -1
- package/dist/plugin-sdk/{pairing-store-CQikgIbw.js → pairing-store-BChahgI2.js} +2 -2
- package/dist/plugin-sdk/{pi-model-discovery-CY3m5zJP.js → pi-model-discovery-BX_JLcEJ.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-runtime-DSh1T2pn.js → pi-model-discovery-runtime-DxTMz_XF.js} +2 -2
- package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +2 -2
- package/dist/plugin-sdk/{pw-ai-AFUqn-tQ.js → pw-ai-natjh3rm.js} +3 -3
- package/dist/plugin-sdk/{qmd-manager-DSyx77KY.js → qmd-manager-CgRaTxUq.js} +1 -1
- package/dist/plugin-sdk/{query-expansion-CAI2kKLQ.js → query-expansion-BG3FgzF7.js} +14 -3
- package/dist/plugin-sdk/{replies-Fzh9PhXl.js → replies-ChYo5ZQM.js} +2 -2
- package/dist/plugin-sdk/{resolve-outbound-target-KpF3co6T.js → resolve-outbound-target-D-KGgHJZ.js} +1 -1
- package/dist/plugin-sdk/{resolve-route-CDl74O19.js → resolve-route-C8tvQm8Z.js} +1 -1
- package/dist/plugin-sdk/{retry-policy-D4uiqUOG.js → retry-policy-C6SjKjQA.js} +1 -1
- package/dist/plugin-sdk/{runtime-Bb6KRnCC.js → runtime-2B9_WKoI.js} +8 -3
- package/dist/plugin-sdk/{runtime-dependency-DLDmB94f.js → runtime-dependency-DczkvPxn.js} +2 -2
- package/dist/plugin-sdk/sat-runtime.d.ts +549 -309
- package/dist/plugin-sdk/sat-runtime.js +29 -29
- package/dist/plugin-sdk/{send-C4k4JuJN.js → send-B6KkGKZD.js} +6 -6
- package/dist/plugin-sdk/{send-D-uDKGIq.js → send-CFzGKJXo.js} +6 -6
- package/dist/plugin-sdk/{send-Du8ykP1k.js → send-DCO441U7.js} +8 -8
- package/dist/plugin-sdk/{send-5nFktR1n.js → send-gDoGA-7e.js} +5 -5
- package/dist/plugin-sdk/{send-Bfzf11VY.js → send-q9HXrSwK.js} +7 -7
- package/dist/plugin-sdk/{session-CS-Td9EM.js → session-DHD4ZKyG.js} +2 -2
- package/dist/plugin-sdk/{skill-commands-CFAlXWHk.js → skill-commands-FKEPLS7T.js} +201 -26
- package/dist/plugin-sdk/{slack-CxE1mfzj.js → slack-BUTt8cxK.js} +39 -39
- package/dist/plugin-sdk/{slack-actions-BcMkNv1Z.js → slack-actions-DhbMcp8M.js} +11 -11
- package/dist/plugin-sdk/slack.d.ts +6 -6
- package/dist/plugin-sdk/slack.js +9 -9
- package/dist/plugin-sdk/{sticker-cache-CGzGWu00.js → sticker-cache-D0wHVqjt.js} +3 -3
- package/dist/plugin-sdk/{tables-bFXyRpkx.js → tables-B3jr0Pvq.js} +1 -1
- package/dist/plugin-sdk/{targets-DH7a9lKB.js → targets-CtSbTxYX.js} +1 -1
- package/dist/plugin-sdk/{telegram-actions-DaEcYQ8r.js → telegram-actions-CC_qN4v0.js} +30 -30
- package/dist/plugin-sdk/telegram.d.ts +6 -6
- package/dist/plugin-sdk/telegram.js +8 -8
- package/dist/plugin-sdk/{thread-bindings.lifecycle-CgOvvdw8.js → thread-bindings.lifecycle-QbkNl-m6.js} +3 -3
- package/dist/plugin-sdk/{thread-bindings.state-CQpk44Hq.js → thread-bindings.state-D9hg_M1c.js} +2 -2
- package/dist/plugin-sdk/tmp-fased-dir-xOTGlzBE.d.ts +486 -0
- package/dist/plugin-sdk/{types-vcJrC_uv.d.ts → types-C3avNytw.d.ts} +3 -4
- package/dist/plugin-sdk/{types-DyhXnYUr.d.ts → types-D0kDG8l0.d.ts} +3 -2
- package/dist/plugin-sdk/{types-DFAW-n1J.d.ts → types-DWfbSAaM.d.ts} +2 -2
- package/dist/plugin-sdk/{types.plugin-_fbu40Re.d.ts → types.plugin-BcSBq42x.d.ts} +8 -3
- package/dist/plugin-sdk/{web-CInY-lCv.js → web-BXsJ1vqe.js} +32 -32
- package/dist/plugin-sdk/{whatsapp-actions-BtSc2CBv.js → whatsapp-actions-Bj_rOncr.js} +13 -13
- package/dist/plugin-sdk/{whatsapp-heartbeat-Bg9TuYzl.js → whatsapp-heartbeat-B1WHkJIg.js} +2 -2
- package/dist/plugin-sdk/whatsapp.d.ts +13 -13
- package/dist/plugin-sdk/whatsapp.js +12 -12
- package/dist/plugin-sdk/{wsl-C4DGFkOd.js → wsl-J-HscWxS.js} +3 -3
- package/dist/plugin-sdk/{zod-schema.providers-core-BEbNizPe.d.ts → zod-schema.providers-core-CIzCjXH9.d.ts} +61 -61
- package/dist/providers/refresh.js +1 -1
- package/dist/providers/registry.js +1 -1
- package/dist/secrets/apply.js +1 -1
- package/dist/secrets/runtime.js +1 -1
- package/dist/wallet/external-submission-ledger.js +376 -0
- package/dist/wallet/legacy-embedded-keystore.js +40 -0
- package/dist/wallet/local-socket-signer-archive.js +30 -0
- package/dist/wallet/local-socket-signer-lifecycle.js +97 -0
- package/dist/wallet/local-socket-signer-policy.js +166 -0
- package/dist/wallet/local-socket-signer-protocol.js +561 -118
- package/dist/wallet/native-signer-wallet-id.js +25 -0
- package/dist/wallet/providers/alchemy-adapter.js +3 -0
- package/dist/wallet/providers/local-socket-signer-adapter.js +380 -105
- package/dist/wallet/providers/turnkey-adapter.js +292 -34
- package/dist/wallet/providers/wallet-standard-adapter.js +100 -0
- package/dist/wallet/signer-network-admin.js +184 -0
- package/dist/wallet/signer-protocol-v2.generated.js +90 -0
- package/dist/wallet/solana-bond-signing.js +157 -69
- package/dist/wallet/solana-reviewed-transaction.js +375 -0
- package/dist/wallet/solana-swap.js +520 -64
- package/dist/wallet/solana-transaction-inspection.js +106 -4
- package/dist/wallet/solana-trigger.js +658 -320
- package/dist/wallet/turnkey-reviewed-state.js +370 -0
- package/dist/wallet/wallet-approval-auth.js +17 -28
- package/dist/wallet/wallet-atomic-state.js +53 -0
- package/dist/wallet/wallet-canary.js +0 -1
- package/dist/wallet/wallet-inbound-events.js +16 -11
- package/dist/wallet/wallet-policy-simulation.js +1 -1
- package/dist/wallet/wallet-policy.js +90 -36
- package/dist/wallet/wallet-provider-capabilities.js +28 -4
- package/dist/wallet/wallet-provider-registry.js +57 -44
- package/dist/wallet/wallet-provider-resolver.js +62 -63
- package/dist/wallet/wallet-runtime-config.js +28 -41
- package/dist/wallet/wallet-secrets-store.js +22 -0
- package/dist/wallet/wallet-send-approvals.js +1891 -589
- package/dist/wallet/wallet-send-execution-ledger.js +292 -0
- package/dist/wallet/wallet-settlement-links.js +14 -13
- package/dist/wallet/wallet-standard-review.js +353 -0
- package/dist/wallet/wallet-status.js +0 -9
- package/dist/wallet/wallet-task-ledger.js +16 -2
- package/dist/web/auto-reply/heartbeat-runner.js +1 -1
- package/dist/web/auto-reply/monitor.js +2 -2
- package/dist/wizard/host-security-capability.js +14 -23
- package/dist/wizard/onboarding.finalize.js +63 -184
- package/dist/wizard/onboarding.host-security.js +117 -1367
- package/dist/wizard/onboarding.js +172 -217
- package/dist/wizard/onboarding.wallet.js +232 -785
- package/extensions/acpx/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/fased-federation/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +12 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +2 -2
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +12 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +12 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/sat-mining/index.ts +498 -153
- package/extensions/sat-mining/package.json +1 -1
- package/extensions/sat-mining/signer-codec-schema.v1.json +374 -0
- package/extensions/sat-mining/src/audit-store.ts +50 -5
- package/extensions/sat-mining/src/claim-service.ts +85 -14
- package/extensions/sat-mining/src/config.ts +9 -0
- package/extensions/sat-mining/src/cycle-progress.ts +16 -8
- package/extensions/sat-mining/src/epoch-service.ts +9 -5
- package/extensions/sat-mining/src/gateway-runner.ts +21 -1
- package/extensions/sat-mining/src/protocol-contract.ts +45 -1
- package/extensions/sat-mining/src/recovery-service.ts +312 -0
- package/extensions/sat-mining/src/round-watcher.ts +391 -81
- package/extensions/sat-mining/src/rpc-read.ts +330 -89
- package/extensions/sat-mining/src/runtime.ts +14 -0
- package/extensions/sat-mining/src/sat-bond-layout.ts +6 -0
- package/extensions/sat-mining/src/signer-codec-manifest.ts +429 -0
- package/extensions/sat-mining/src/solana-submit.ts +1199 -428
- package/extensions/sat-mining/src/submission-ledger.ts +433 -0
- package/extensions/signal/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +12 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +12 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +12 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +12 -0
- package/extensions/zalouser/package.json +1 -1
- package/install.sh +4955 -0
- package/package.json +23 -5
- package/scripts/fased-host-updater.mjs +1421 -0
- package/scripts/fased-host-updaterctl.mjs +186 -0
- package/scripts/fased-managed-service.sh +36 -0
- package/scripts/fased-managed-updater.mjs +3065 -156
- package/scripts/fased-signer-enroll-hosting.sh +275 -0
- package/scripts/fased-signer-network-hosting.sh +143 -0
- package/scripts/fased-signer-owner-policy.mjs +1430 -0
- package/scripts/fased-signer-policy-hosting.sh +50 -0
- package/scripts/fased-signer-policy-local.sh +26 -0
- package/scripts/hosted-release-manifest.mjs +185 -0
- package/scripts/install-fased-signerd.sh +183 -108
- package/scripts/install-managed-runtime.mjs +212 -10
- package/scripts/managed-runtime-layout.mjs +75 -3
- package/scripts/migrate-hosted-signer-v2.mjs +58 -0
- package/scripts/start-managed.sh +169 -360
- package/dist/control-ui/assets/mining-commit-R-6nu87p.js +0 -2
- package/dist/plugin-sdk/tmp-fased-dir-CS6zsYEE.d.ts +0 -77
- package/dist/wallet/local-socket-signer-broker.js +0 -224
- package/dist/wallet/local-socket-signer-custody.js +0 -42
- package/dist/wallet/providers/embedded-keystore-adapter.js +0 -402
- package/dist/wallet/providers/privy-adapter.js +0 -80
- package/dist/wallet/wallet-custody.js +0 -1836
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./runtime-
|
|
1
|
+
import { Ar as errorShape, Cr as tryResolveSatRuntimeIds, Dr as callGatewayScoped, Jn as createSignerReviewApprovalRequest, Kn as readWalletStatusSnapshot, Mr as publicKeyRawBase64UrlFromPem, Nr as signDevicePayload, Pr as verifyDeviceSignature, Sr as resolveSatProgramIdFromEnv, _r as syncSatMainnetRuntimeIds, ar as readWalletProviderRegistry, br as resolveSatMintAddressFromEnv, cr as LEGACY_EMBEDDED_KEYSTORE_MIGRATION_MESSAGE, dr as requireLocalSocketSignerPath, er as resolveWalletPolicyConfig, fr as resolveLocalSignerSocketPath, gr as getSatMainnetSyncStatus, hr as buildAttestation, ir as loadWalletProviderSecret, j as resolveModel, jr as loadOrCreateDeviceIdentity, kr as ErrorCodes, lr as callLocalSocketSigner, mr as fetchSolanaWalletAssetsViaRpc, nr as createWalletProviderAdapter, or as resolveWalletUserRole, pr as resolveWalletRuntimeConfig, qn as createOrExecuteWalletSend, rr as resolveWalletProviderId, sr as upsertNamedWallet, tr as resolveWalletRolePolicyProfile, ur as probeLocalSocketSignerHealth, vr as SAT_RUNTIME_DEFAULTS, xr as resolveSatMintProgramIdFromEnv, yr as resolveSatBondProgramIdFromEnv } from "./config-schema-BOT7kHb6.js";
|
|
2
|
+
import "./runtime-2B9_WKoI.js";
|
|
3
3
|
import { t as createSubsystemLogger } from "./subsystem-DBPNbQDQ.js";
|
|
4
4
|
import { w as resolvePreferredFasedAgentTmpDir } from "./globals-B_jjtAje.js";
|
|
5
|
-
import { i as resolveGatewayPort } from "./paths-BEmvSyOV.js";
|
|
5
|
+
import { i as resolveGatewayPort, s as resolveStateDir } from "./paths-BEmvSyOV.js";
|
|
6
6
|
import "./utils-CYk9EKoq.js";
|
|
7
|
-
import {
|
|
7
|
+
import { $i as DEFAULT_PROVIDER, Qt as resolveModelRefFromString, Vt as buildModelAliasIndex, Xt as resolveDefaultModelForAgent, Yt as resolveConfiguredModelRef, cn as requireApiKey, ma as withFileLock, on as getApiKeyForModel, r as loadConfig } from "./config-DlWVeLFB.js";
|
|
8
8
|
import { a as resolveAgentDir, i as resolveAgentConfig, o as resolveAgentEffectiveModelPrimary, u as resolveDefaultAgentId } from "./agent-scope-CCjfjKoO.js";
|
|
9
9
|
import "./accounts-RHZyaB73.js";
|
|
10
10
|
import "./accounts-CuqIKU8X.js";
|
|
11
11
|
import "./logger-BbFvCoKk.js";
|
|
12
12
|
import "./exec-DQ8j4Fm3.js";
|
|
13
|
-
import "./accounts-
|
|
13
|
+
import "./accounts-Brn3-uWN.js";
|
|
14
14
|
import "./allow-list-DyAxs4yw.js";
|
|
15
15
|
import "./redact-Bm8vu_ju.js";
|
|
16
16
|
import "./github-copilot-token-CUK__1s1.js";
|
|
@@ -18,41 +18,41 @@ import "./retry-DstNBhDW.js";
|
|
|
18
18
|
import "./paths-CTZ2RS_E.js";
|
|
19
19
|
import "./ssrf-fG4UHKBw.js";
|
|
20
20
|
import "./fetch-guard-CeG6u6ld.js";
|
|
21
|
-
import "./send-
|
|
22
|
-
import "./helpers-
|
|
23
|
-
import "./wsl-
|
|
24
|
-
import "./pairing-store-
|
|
25
|
-
import "./chunk-
|
|
21
|
+
import "./send-CFzGKJXo.js";
|
|
22
|
+
import "./helpers-DMBU4oTo.js";
|
|
23
|
+
import "./wsl-J-HscWxS.js";
|
|
24
|
+
import "./pairing-store-BChahgI2.js";
|
|
25
|
+
import "./chunk-CyoyqpbG.js";
|
|
26
26
|
import "./tailscale-status-DwpNdO3Z.js";
|
|
27
27
|
import "./reply-prefix-CeVw7Mn2.js";
|
|
28
28
|
import "./tokens-BbnqfVuu.js";
|
|
29
29
|
import "./pairing-token-Cs3BRKc0.js";
|
|
30
30
|
import "./diagnostic-DLL_zekv.js";
|
|
31
31
|
import "./diagnostic-session-state-DqgfGYqZ.js";
|
|
32
|
-
import "./optional-runtime-dependency-
|
|
33
|
-
import "./image-ops-
|
|
34
|
-
import "./memory-search-
|
|
35
|
-
import "./manager-
|
|
36
|
-
import "./query-expansion-
|
|
37
|
-
import "./common-
|
|
38
|
-
import "./commands-registry-
|
|
39
|
-
import "./runtime-dependency-
|
|
32
|
+
import "./optional-runtime-dependency-0dznm3ZO.js";
|
|
33
|
+
import "./image-ops-DQi0n_Tt.js";
|
|
34
|
+
import "./memory-search-CrFPOeTH.js";
|
|
35
|
+
import "./manager-BegWxNYX.js";
|
|
36
|
+
import "./query-expansion-BG3FgzF7.js";
|
|
37
|
+
import "./common-HCcXU-NR.js";
|
|
38
|
+
import "./commands-registry-BfqdEWdF.js";
|
|
39
|
+
import "./runtime-dependency-DczkvPxn.js";
|
|
40
40
|
import "./path-alias-guards-DjgDArrp.js";
|
|
41
41
|
import "./fs-safe-g4g7GT02.js";
|
|
42
|
-
import "./
|
|
43
|
-
import "./
|
|
44
|
-
import "./send-
|
|
45
|
-
import "./outbound-attachment-
|
|
42
|
+
import "./media-CAdQF5TG.js";
|
|
43
|
+
import "./markdown-tables-DCOXEUfZ.js";
|
|
44
|
+
import "./send-B6KkGKZD.js";
|
|
45
|
+
import "./outbound-attachment-QqTnIhZL.js";
|
|
46
46
|
import "./fetch-BtmoPIlf.js";
|
|
47
|
-
import "./thread-bindings.state-
|
|
48
|
-
import "./skill-commands-
|
|
47
|
+
import "./thread-bindings.state-D9hg_M1c.js";
|
|
48
|
+
import "./skill-commands-FKEPLS7T.js";
|
|
49
49
|
import "./sandbox-paths-Dx2lUqCu.js";
|
|
50
50
|
import "./directory-live-CSuYxdwk.js";
|
|
51
|
-
import "./targets-
|
|
52
|
-
import "./pi-model-discovery-
|
|
53
|
-
import "./resolve-route-
|
|
51
|
+
import "./targets-CtSbTxYX.js";
|
|
52
|
+
import "./pi-model-discovery-BX_JLcEJ.js";
|
|
53
|
+
import "./resolve-route-C8tvQm8Z.js";
|
|
54
54
|
import "./render-e7fENCYH.js";
|
|
55
|
-
import "./tables-
|
|
55
|
+
import "./tables-B3jr0Pvq.js";
|
|
56
56
|
import "./shared-CBgp_GBw.js";
|
|
57
57
|
|
|
58
58
|
//#region src/plugin-sdk/sat-runtime.ts
|
|
@@ -61,4 +61,4 @@ async function fetchWithSsrFGuard(params) {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
//#endregion
|
|
64
|
-
export { DEFAULT_PROVIDER, ErrorCodes, SAT_RUNTIME_DEFAULTS, buildAttestation, buildModelAliasIndex, callGatewayScoped, callLocalSocketSigner, createOrExecuteWalletSend, createSubsystemLogger, createWalletProviderAdapter,
|
|
64
|
+
export { DEFAULT_PROVIDER, ErrorCodes, LEGACY_EMBEDDED_KEYSTORE_MIGRATION_MESSAGE, SAT_RUNTIME_DEFAULTS, buildAttestation, buildModelAliasIndex, callGatewayScoped, callLocalSocketSigner, createOrExecuteWalletSend, createSignerReviewApprovalRequest, createSubsystemLogger, createWalletProviderAdapter, errorShape, fetchSolanaWalletAssetsViaRpc, fetchWithSsrFGuard, getApiKeyForModel, getSatMainnetSyncStatus, loadConfig, loadOrCreateDeviceIdentity, loadWalletProviderSecret, probeLocalSocketSignerHealth, publicKeyRawBase64UrlFromPem, readWalletProviderRegistry, readWalletStatusSnapshot, requireApiKey, requireLocalSocketSignerPath, resolveAgentConfig, resolveAgentDir, resolveAgentEffectiveModelPrimary, resolveConfiguredModelRef, resolveDefaultAgentId, resolveDefaultModelForAgent, resolveGatewayPort, resolveLocalSignerSocketPath, resolveModel, resolveModelRefFromString, resolvePreferredFasedAgentTmpDir, resolveSatBondProgramIdFromEnv, resolveSatMintAddressFromEnv, resolveSatMintProgramIdFromEnv, resolveSatProgramIdFromEnv, resolveStateDir, resolveWalletPolicyConfig, resolveWalletProviderId, resolveWalletRolePolicyProfile, resolveWalletRuntimeConfig, resolveWalletUserRole, signDevicePayload, syncSatMainnetRuntimeIds, tryResolveSatRuntimeIds, upsertNamedWallet, verifyDeviceSignature, withFileLock };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { fn as resolveSignalAccount } from "./runtime-
|
|
3
|
-
import {
|
|
2
|
+
import { fn as resolveSignalAccount } from "./runtime-2B9_WKoI.js";
|
|
3
|
+
import { r as loadConfig } from "./config-DlWVeLFB.js";
|
|
4
4
|
import { n as fetchWithTimeout } from "./fetch-timeout-l_6RdoMw.js";
|
|
5
5
|
import { n as generateSecureUuid } from "./secure-random-BIkG-k4s.js";
|
|
6
|
-
import { v as mediaKindFromMime } from "./image-ops-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-
|
|
6
|
+
import { v as mediaKindFromMime } from "./image-ops-DQi0n_Tt.js";
|
|
7
|
+
import { o as chunkMarkdownIR, s as markdownToIR } from "./media-CAdQF5TG.js";
|
|
8
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-DCOXEUfZ.js";
|
|
9
|
+
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-QqTnIhZL.js";
|
|
10
10
|
import { t as resolveFetch } from "./fetch-BtmoPIlf.js";
|
|
11
11
|
|
|
12
12
|
//#region src/signal/format.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { hn as resolveIMessageAccount } from "./runtime-
|
|
2
|
+
import { hn as resolveIMessageAccount } from "./runtime-2B9_WKoI.js";
|
|
3
3
|
import { d as normalizeE164, h as resolveUserPath } from "./utils-CYk9EKoq.js";
|
|
4
|
-
import {
|
|
5
|
-
import { v as mediaKindFromMime } from "./image-ops-
|
|
6
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
7
|
-
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-
|
|
8
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
4
|
+
import { r as loadConfig } from "./config-DlWVeLFB.js";
|
|
5
|
+
import { v as mediaKindFromMime } from "./image-ops-DQi0n_Tt.js";
|
|
6
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-DCOXEUfZ.js";
|
|
7
|
+
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-QqTnIhZL.js";
|
|
8
|
+
import { t as convertMarkdownTables } from "./tables-B3jr0Pvq.js";
|
|
9
9
|
import { spawn } from "node:child_process";
|
|
10
10
|
import { createInterface } from "node:readline";
|
|
11
11
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
2
|
import { w as resolvePreferredFasedAgentTmpDir } from "./globals-B_jjtAje.js";
|
|
3
|
-
import {
|
|
3
|
+
import { r as loadConfig } from "./config-DlWVeLFB.js";
|
|
4
4
|
import { a as resolveDiscordAccount } from "./accounts-RHZyaB73.js";
|
|
5
5
|
import { t as normalizeDiscordToken } from "./token-D4-H0ByG.js";
|
|
6
|
-
import { c as resolveChunkMode, i as chunkMarkdownTextWithMode } from "./chunk-
|
|
7
|
-
import { _ as maxBytesForKind, l as extensionForMime } from "./image-ops-
|
|
8
|
-
import { n as
|
|
9
|
-
import { n as
|
|
10
|
-
import { r as resolveDiscordTarget, t as parseDiscordTarget } from "./targets-
|
|
6
|
+
import { c as resolveChunkMode, i as chunkMarkdownTextWithMode } from "./chunk-CyoyqpbG.js";
|
|
7
|
+
import { _ as maxBytesForKind, l as extensionForMime } from "./image-ops-DQi0n_Tt.js";
|
|
8
|
+
import { n as loadWebMedia, r as loadWebMediaRaw } from "./media-CAdQF5TG.js";
|
|
9
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-DCOXEUfZ.js";
|
|
10
|
+
import { r as resolveDiscordTarget, t as parseDiscordTarget } from "./targets-CtSbTxYX.js";
|
|
11
11
|
import { n as normalizePollInput, t as normalizePollDurationHours } from "./polls-DKQXVfJp.js";
|
|
12
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
12
|
+
import { t as convertMarkdownTables } from "./tables-B3jr0Pvq.js";
|
|
13
13
|
import { n as recordChannelActivity } from "./channel-activity-DBDMQ3yI.js";
|
|
14
|
-
import { t as createDiscordRetryRunner } from "./retry-policy-
|
|
14
|
+
import { t as createDiscordRetryRunner } from "./retry-policy-C6SjKjQA.js";
|
|
15
15
|
import path from "node:path";
|
|
16
16
|
import { promisify } from "node:util";
|
|
17
17
|
import fs from "node:fs/promises";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { bt as parseSlackTarget } from "./runtime-
|
|
2
|
+
import { bt as parseSlackTarget } from "./runtime-2B9_WKoI.js";
|
|
3
3
|
import { i as logVerbose } from "./globals-B_jjtAje.js";
|
|
4
|
-
import {
|
|
4
|
+
import { r as loadConfig } from "./config-DlWVeLFB.js";
|
|
5
5
|
import { i as resolveSlackAccount, s as resolveSlackBotToken } from "./accounts-CuqIKU8X.js";
|
|
6
|
-
import { c as resolveChunkMode, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit } from "./chunk-
|
|
6
|
+
import { c as resolveChunkMode, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit } from "./chunk-CyoyqpbG.js";
|
|
7
7
|
import { i as isSilentReplyText } from "./tokens-BbnqfVuu.js";
|
|
8
|
-
import { n as
|
|
9
|
-
import {
|
|
8
|
+
import { n as loadWebMedia, o as chunkMarkdownIR, s as markdownToIR } from "./media-CAdQF5TG.js";
|
|
9
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-DCOXEUfZ.js";
|
|
10
10
|
import { t as renderMarkdownWithMarkers } from "./render-e7fENCYH.js";
|
|
11
11
|
import { n as validateSlackBlocksArray } from "./blocks-input-Bg-8S2pl.js";
|
|
12
12
|
import { n as createSlackWebClient } from "./client-pI228AVT.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { in as resolveTelegramAccount } from "./runtime-
|
|
2
|
+
import { in as resolveTelegramAccount } from "./runtime-2B9_WKoI.js";
|
|
3
3
|
import { t as createSubsystemLogger } from "./subsystem-DBPNbQDQ.js";
|
|
4
4
|
import { i as logVerbose, t as danger } from "./globals-B_jjtAje.js";
|
|
5
|
-
import {
|
|
5
|
+
import { c as writeConfigFile, ca as formatUncaughtError, o as readConfigFileSnapshotForWrite, oa as extractErrorCode, r as loadConfig, sa as formatErrorMessage, wa as isTruthyEnvValue } from "./config-DlWVeLFB.js";
|
|
6
6
|
import { n as redactSensitiveText } from "./redact-Bm8vu_ju.js";
|
|
7
|
-
import { M as isTelegramVoiceCompatibleAudio, a as resolveCronStorePath, i as loadCronStore, o as saveCronStore, p as buildTelegramThreadParams, t as isWSL2Sync } from "./wsl-
|
|
7
|
+
import { M as isTelegramVoiceCompatibleAudio, a as resolveCronStorePath, i as loadCronStore, o as saveCronStore, p as buildTelegramThreadParams, t as isWSL2Sync } from "./wsl-J-HscWxS.js";
|
|
8
8
|
import { n as normalizeTelegramLookupTarget, r as parseTelegramTarget, t as normalizeTelegramChatId } from "./targets-CoMJ1ry1.js";
|
|
9
|
-
import { p as isGifMedia, v as mediaKindFromMime } from "./image-ops-
|
|
10
|
-
import { n as
|
|
11
|
-
import {
|
|
9
|
+
import { p as isGifMedia, v as mediaKindFromMime } from "./image-ops-DQi0n_Tt.js";
|
|
10
|
+
import { n as loadWebMedia, o as chunkMarkdownIR, s as markdownToIR } from "./media-CAdQF5TG.js";
|
|
11
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-DCOXEUfZ.js";
|
|
12
12
|
import { t as resolveFetch } from "./fetch-BtmoPIlf.js";
|
|
13
13
|
import { n as normalizePollInput } from "./polls-DKQXVfJp.js";
|
|
14
14
|
import { t as renderMarkdownWithMarkers } from "./render-e7fENCYH.js";
|
|
15
15
|
import { n as recordChannelActivity } from "./channel-activity-DBDMQ3yI.js";
|
|
16
|
-
import { n as createTelegramRetryRunner } from "./retry-policy-
|
|
16
|
+
import { n as createTelegramRetryRunner } from "./retry-policy-C6SjKjQA.js";
|
|
17
17
|
import { t as makeProxyFetch } from "./proxy-DWpYcsvR.js";
|
|
18
18
|
import process$1 from "node:process";
|
|
19
19
|
import { Agent, setGlobalDispatcher } from "undici";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as toPinoLikeLogger, c as success, p as getChildLogger, t as danger } from "./globals-B_jjtAje.js";
|
|
2
2
|
import { a as ensureDir, h as resolveUserPath } from "./utils-CYk9EKoq.js";
|
|
3
|
-
import {
|
|
4
|
-
import { f as readCredsJsonRaw, g as resolveWebCredsPath, h as resolveWebCredsBackupPath, m as resolveDefaultWebAuthDir, u as maybeRestoreCredsFromBackup } from "./accounts-
|
|
3
|
+
import { Sa as formatCliCommand, ea as VERSION } from "./config-DlWVeLFB.js";
|
|
4
|
+
import { f as readCredsJsonRaw, g as resolveWebCredsPath, h as resolveWebCredsBackupPath, m as resolveDefaultWebAuthDir, u as maybeRestoreCredsFromBackup } from "./accounts-Brn3-uWN.js";
|
|
5
5
|
import { n as redactSensitiveText } from "./redact-Bm8vu_ju.js";
|
|
6
6
|
import { n as redactSensitiveUrlLikeString } from "./redact-sensitive-url-g-ukZjwA.js";
|
|
7
7
|
import fs from "node:fs";
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
2
|
import { t as createSubsystemLogger } from "./subsystem-DBPNbQDQ.js";
|
|
3
3
|
import { h as resolveUserPath, t as CONFIG_DIR } from "./utils-CYk9EKoq.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Aa as resolveMemorySlotDecision, Mi as loadPluginManifestRegistry, Oa as normalizePluginsConfig, Ta as parseBooleanValue, aa as MANIFEST_KEY, ka as resolveEffectiveEnableState, n as getRuntimeConfigSnapshot, va as isDangerousHostEnvVarName } from "./config-DlWVeLFB.js";
|
|
5
5
|
import { B as normalizeSkillFilter, O as resolveFasedAgentPackageRootSync, l as resolveAgentWorkspaceDir, q as normalizeStringEntries, r as listAgentIds, z as resolveEffectiveAgentSkillFilter } from "./agent-scope-CCjfjKoO.js";
|
|
6
6
|
import { o as createAsyncLock } from "./pairing-token-Cs3BRKc0.js";
|
|
7
|
-
import { a as listChatCommands } from "./commands-registry-
|
|
7
|
+
import { a as listChatCommands } from "./commands-registry-BfqdEWdF.js";
|
|
8
8
|
import { i as resolveSandboxPath } from "./sandbox-paths-Dx2lUqCu.js";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import fs from "node:fs";
|
|
11
11
|
import os from "node:os";
|
|
12
12
|
import JSON5 from "json5";
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
|
-
import { randomUUID } from "node:crypto";
|
|
14
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
15
15
|
import { formatSkillsForPrompt, loadSkillsFromDir } from "@mariozechner/pi-coding-agent";
|
|
16
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
16
17
|
import chokidar from "chokidar";
|
|
17
18
|
import YAML from "yaml";
|
|
18
19
|
|
|
@@ -502,10 +503,80 @@ function sanitizeEnvVars(envVars, options = {}) {
|
|
|
502
503
|
};
|
|
503
504
|
}
|
|
504
505
|
|
|
506
|
+
//#endregion
|
|
507
|
+
//#region src/agents/skills/trust.ts
|
|
508
|
+
const MARKETPLACE_ORIGIN_DIRS = [".clawhub", ".clawdhub"];
|
|
509
|
+
function hasMarketplaceOriginMarker(root) {
|
|
510
|
+
return MARKETPLACE_ORIGIN_DIRS.some((dir) => fs.existsSync(path.join(root, dir, "origin.json")));
|
|
511
|
+
}
|
|
512
|
+
function isTrackedMarketplaceSkill(root) {
|
|
513
|
+
const skillsDir = path.dirname(root);
|
|
514
|
+
if (path.basename(skillsDir) !== "skills") return false;
|
|
515
|
+
const slug = path.basename(root);
|
|
516
|
+
const workspaceDir = path.dirname(skillsDir);
|
|
517
|
+
for (const directory of MARKETPLACE_ORIGIN_DIRS) try {
|
|
518
|
+
const lock = JSON.parse(fs.readFileSync(path.join(workspaceDir, directory, "lock.json"), "utf8"));
|
|
519
|
+
if (lock.version === 1 && lock.skills?.[slug]) return true;
|
|
520
|
+
} catch {}
|
|
521
|
+
return false;
|
|
522
|
+
}
|
|
523
|
+
function computeSkillContentSha256Sync(skillDir) {
|
|
524
|
+
try {
|
|
525
|
+
const digest = createHash("sha256");
|
|
526
|
+
const queue = [path.resolve(skillDir)];
|
|
527
|
+
while (queue.length > 0) {
|
|
528
|
+
const current = queue.shift();
|
|
529
|
+
if (!current) continue;
|
|
530
|
+
const entries = fs.readdirSync(current, { withFileTypes: true }).toSorted((left, right) => left.name.localeCompare(right.name));
|
|
531
|
+
for (const entry of entries) {
|
|
532
|
+
if (entry.name.startsWith(".")) continue;
|
|
533
|
+
const fullPath = path.join(current, entry.name);
|
|
534
|
+
if (entry.isDirectory() && !entry.isSymbolicLink()) {
|
|
535
|
+
queue.push(fullPath);
|
|
536
|
+
continue;
|
|
537
|
+
}
|
|
538
|
+
if (!entry.isFile() || entry.isSymbolicLink()) return null;
|
|
539
|
+
digest.update(path.relative(skillDir, fullPath).split(path.sep).join("/"));
|
|
540
|
+
digest.update("\n");
|
|
541
|
+
digest.update(fs.readFileSync(fullPath));
|
|
542
|
+
digest.update("\n");
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
return digest.digest("hex");
|
|
546
|
+
} catch {
|
|
547
|
+
return null;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
function marketplaceSkillProvenanceMatchesContent(skillDir) {
|
|
551
|
+
const root = skillDir.trim();
|
|
552
|
+
if (!root) return false;
|
|
553
|
+
for (const directory of MARKETPLACE_ORIGIN_DIRS) try {
|
|
554
|
+
const origin = JSON.parse(fs.readFileSync(path.join(root, directory, "origin.json"), "utf8"));
|
|
555
|
+
if (origin.version === 1 && origin.archiveIntegrityVerified === true && typeof origin.archiveSha256 === "string" && /^[a-f0-9]{64}$/u.test(origin.archiveSha256) && typeof origin.contentSha256 === "string" && /^[a-f0-9]{64}$/u.test(origin.contentSha256) && computeSkillContentSha256Sync(root) === origin.contentSha256) return true;
|
|
556
|
+
} catch {}
|
|
557
|
+
return false;
|
|
558
|
+
}
|
|
559
|
+
function isMarketplaceSkillDir(skillDir) {
|
|
560
|
+
const root = skillDir.trim();
|
|
561
|
+
return Boolean(root && (hasMarketplaceOriginMarker(root) || isTrackedMarketplaceSkill(root)));
|
|
562
|
+
}
|
|
563
|
+
function marketplaceSkillIdsFromEntries(entries) {
|
|
564
|
+
return [...new Set(entries.filter((entry) => isMarketplaceSkillDir(entry.skill.baseDir)).map((entry) => entry.skill.name.trim()).filter(Boolean))].toSorted();
|
|
565
|
+
}
|
|
566
|
+
function marketplaceSkillIdsFromSnapshot(snapshot) {
|
|
567
|
+
if (!snapshot) return [];
|
|
568
|
+
if (snapshot.marketplaceSkillIds) return [...new Set(snapshot.marketplaceSkillIds.map((id) => id.trim()).filter(Boolean))].toSorted();
|
|
569
|
+
return [...new Set((snapshot.resolvedSkills ?? []).filter((skill) => isMarketplaceSkillDir(skill.baseDir)).map((skill) => skill.name.trim()).filter(Boolean))].toSorted();
|
|
570
|
+
}
|
|
571
|
+
|
|
505
572
|
//#endregion
|
|
506
573
|
//#region src/agents/skills/env-overrides.ts
|
|
507
574
|
const log$3 = createSubsystemLogger("env-overrides");
|
|
508
|
-
const
|
|
575
|
+
const skillEnvStorage = new AsyncLocalStorage();
|
|
576
|
+
/** Trusted, invocation-scoped env consumed by exec without mutating process.env. */
|
|
577
|
+
function getActiveSkillEnvOverrides() {
|
|
578
|
+
return skillEnvStorage.getStore() ?? {};
|
|
579
|
+
}
|
|
509
580
|
const SKILL_ALWAYS_BLOCKED_ENV_PATTERNS = [/^OPENSSL_CONF$/i];
|
|
510
581
|
function matchesAnyPattern(value, patterns) {
|
|
511
582
|
return patterns.some((pattern) => pattern.test(value));
|
|
@@ -554,7 +625,7 @@ function sanitizeSkillEnvOverrides(params) {
|
|
|
554
625
|
};
|
|
555
626
|
}
|
|
556
627
|
function applySkillConfigEnvOverrides(params) {
|
|
557
|
-
const {
|
|
628
|
+
const { overrides, skillConfig, primaryEnv, requiredEnv, skillKey } = params;
|
|
558
629
|
const allowedSensitiveKeys = /* @__PURE__ */ new Set();
|
|
559
630
|
const normalizedPrimaryEnv = primaryEnv?.trim();
|
|
560
631
|
if (normalizedPrimaryEnv) allowedSensitiveKeys.add(normalizedPrimaryEnv);
|
|
@@ -580,56 +651,57 @@ function applySkillConfigEnvOverrides(params) {
|
|
|
580
651
|
if (sanitized.warnings.length > 0) log$3.warn(`Suspicious skill env overrides for ${skillKey}: ${sanitized.warnings.join(", ")}`);
|
|
581
652
|
for (const [envKey, envValue] of Object.entries(sanitized.allowed)) {
|
|
582
653
|
if (process.env[envKey]) continue;
|
|
583
|
-
|
|
584
|
-
key: envKey,
|
|
585
|
-
prev: process.env[envKey]
|
|
586
|
-
});
|
|
587
|
-
process.env[envKey] = envValue;
|
|
588
|
-
activeSkillEnvKeys.add(envKey);
|
|
654
|
+
overrides[envKey] = envValue;
|
|
589
655
|
}
|
|
590
656
|
}
|
|
591
|
-
function
|
|
657
|
+
function activateSkillEnv(overrides) {
|
|
658
|
+
const previous = skillEnvStorage.getStore();
|
|
659
|
+
skillEnvStorage.enterWith(Object.freeze({
|
|
660
|
+
...previous ?? {},
|
|
661
|
+
...overrides
|
|
662
|
+
}));
|
|
592
663
|
return () => {
|
|
593
|
-
|
|
594
|
-
if (update.prev === void 0) delete process.env[update.key];
|
|
595
|
-
else process.env[update.key] = update.prev;
|
|
596
|
-
activeSkillEnvKeys.delete(update.key);
|
|
597
|
-
}
|
|
664
|
+
skillEnvStorage.enterWith(previous ?? Object.freeze({}));
|
|
598
665
|
};
|
|
599
666
|
}
|
|
600
667
|
function applySkillEnvOverrides(params) {
|
|
601
|
-
const
|
|
602
|
-
const
|
|
668
|
+
const skills = params.skills;
|
|
669
|
+
const config = getRuntimeConfigSnapshot() ?? params.config;
|
|
670
|
+
const overrides = {};
|
|
603
671
|
for (const entry of skills) {
|
|
672
|
+
if (params.excludeMarketplace !== false && isMarketplaceSkillDir(entry.skill.baseDir)) continue;
|
|
604
673
|
const skillKey = resolveSkillKey(entry.skill, entry);
|
|
605
674
|
const skillConfig = resolveSkillConfig(config, skillKey);
|
|
606
675
|
if (!skillConfig) continue;
|
|
607
676
|
applySkillConfigEnvOverrides({
|
|
608
|
-
|
|
677
|
+
overrides,
|
|
609
678
|
skillConfig,
|
|
610
679
|
primaryEnv: entry.metadata?.primaryEnv,
|
|
611
680
|
requiredEnv: entry.metadata?.requires?.env,
|
|
612
681
|
skillKey
|
|
613
682
|
});
|
|
614
683
|
}
|
|
615
|
-
return
|
|
684
|
+
return activateSkillEnv(overrides);
|
|
616
685
|
}
|
|
617
686
|
function applySkillEnvOverridesFromSnapshot(params) {
|
|
618
|
-
const
|
|
687
|
+
const snapshot = params.snapshot;
|
|
688
|
+
const config = getRuntimeConfigSnapshot() ?? params.config;
|
|
619
689
|
if (!snapshot) return () => {};
|
|
620
|
-
const
|
|
690
|
+
const overrides = {};
|
|
691
|
+
const marketplaceSkills = new Set(params.excludeMarketplace === false ? [] : snapshot.marketplaceSkillIds ?? []);
|
|
621
692
|
for (const skill of snapshot.skills) {
|
|
693
|
+
if (marketplaceSkills.has(skill.name)) continue;
|
|
622
694
|
const skillConfig = resolveSkillConfig(config, skill.name);
|
|
623
695
|
if (!skillConfig) continue;
|
|
624
696
|
applySkillConfigEnvOverrides({
|
|
625
|
-
|
|
697
|
+
overrides,
|
|
626
698
|
skillConfig,
|
|
627
699
|
primaryEnv: skill.primaryEnv,
|
|
628
700
|
requiredEnv: skill.requiredEnv,
|
|
629
701
|
skillKey: skill.name
|
|
630
702
|
});
|
|
631
703
|
}
|
|
632
|
-
return
|
|
704
|
+
return activateSkillEnv(overrides);
|
|
633
705
|
}
|
|
634
706
|
|
|
635
707
|
//#endregion
|
|
@@ -750,6 +822,7 @@ async function serializeByKey(key, task) {
|
|
|
750
822
|
const fsp = fs.promises;
|
|
751
823
|
const skillsLogger = createSubsystemLogger("skills");
|
|
752
824
|
const skillCommandDebugOnce = /* @__PURE__ */ new Set();
|
|
825
|
+
const CLAUDE_BUNDLE_MANIFEST_MAX_BYTES = 64 * 1024;
|
|
753
826
|
/**
|
|
754
827
|
* Replace the user's home directory prefix with `~` in skill file paths
|
|
755
828
|
* to reduce system prompt token usage. Models understand `~` expansion,
|
|
@@ -1048,6 +1121,7 @@ function buildWorkspaceSkillSnapshot(workspaceDir, opts) {
|
|
|
1048
1121
|
})),
|
|
1049
1122
|
...skillFilter === void 0 ? {} : { skillFilter },
|
|
1050
1123
|
resolvedSkills,
|
|
1124
|
+
marketplaceSkillIds: marketplaceSkillIdsFromEntries(eligible),
|
|
1051
1125
|
version: opts?.snapshotVersion
|
|
1052
1126
|
};
|
|
1053
1127
|
}
|
|
@@ -1058,6 +1132,92 @@ function resolveEffectiveSkillFilter(opts) {
|
|
|
1058
1132
|
if (opts?.skillFilter !== void 0) return normalizeSkillFilter(opts.skillFilter) ?? [];
|
|
1059
1133
|
if (opts?.agentId !== void 0) return resolveEffectiveAgentSkillFilter(opts.config, opts.agentId);
|
|
1060
1134
|
}
|
|
1135
|
+
function isExplicitlyEnabledClaudeBundle(pluginId, config) {
|
|
1136
|
+
const plugins = config?.plugins;
|
|
1137
|
+
if (plugins?.enabled === false || plugins?.deny?.includes(pluginId)) return false;
|
|
1138
|
+
if (plugins?.allow?.length && !plugins.allow.includes(pluginId)) return false;
|
|
1139
|
+
return plugins?.entries?.[pluginId]?.enabled === true;
|
|
1140
|
+
}
|
|
1141
|
+
function stripMarkdownFrontmatter(content) {
|
|
1142
|
+
const normalized = content.replace(/\r\n?/gu, "\n");
|
|
1143
|
+
if (!normalized.startsWith("---\n")) return normalized.trim();
|
|
1144
|
+
const end = normalized.indexOf("\n---", 4);
|
|
1145
|
+
if (end < 0) return "";
|
|
1146
|
+
return normalized.slice(end + 4).replace(/^\n/u, "").trim();
|
|
1147
|
+
}
|
|
1148
|
+
function listImmediateDirectories(root) {
|
|
1149
|
+
try {
|
|
1150
|
+
return fs.readdirSync(root, { withFileTypes: true }).filter((entry) => entry.isDirectory() && !entry.isSymbolicLink()).map((entry) => path.join(root, entry.name));
|
|
1151
|
+
} catch {
|
|
1152
|
+
return [];
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
function loadClaudeBundleCommandSpecs(params) {
|
|
1156
|
+
const roots = [
|
|
1157
|
+
...listImmediateDirectories(path.join(CONFIG_DIR, "extensions")),
|
|
1158
|
+
...listImmediateDirectories(path.join(params.workspaceDir, ".fased", "extensions")),
|
|
1159
|
+
...(params.config?.plugins?.load?.paths ?? []).map((entry) => resolveUserPath(entry))
|
|
1160
|
+
];
|
|
1161
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1162
|
+
const specs = [];
|
|
1163
|
+
for (const unresolvedRoot of roots) {
|
|
1164
|
+
let root;
|
|
1165
|
+
try {
|
|
1166
|
+
const stat = fs.lstatSync(unresolvedRoot);
|
|
1167
|
+
if (!stat.isDirectory() || stat.isSymbolicLink()) continue;
|
|
1168
|
+
root = fs.realpathSync(unresolvedRoot);
|
|
1169
|
+
} catch {
|
|
1170
|
+
continue;
|
|
1171
|
+
}
|
|
1172
|
+
if (seen.has(root) || isMarketplaceSkillDir(root)) continue;
|
|
1173
|
+
seen.add(root);
|
|
1174
|
+
const manifestPath = path.join(root, ".claude-plugin", "plugin.json");
|
|
1175
|
+
let pluginId = "";
|
|
1176
|
+
try {
|
|
1177
|
+
const stat = fs.lstatSync(manifestPath);
|
|
1178
|
+
if (!stat.isFile() || stat.isSymbolicLink() || stat.size <= 0 || stat.size > CLAUDE_BUNDLE_MANIFEST_MAX_BYTES) continue;
|
|
1179
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
|
|
1180
|
+
pluginId = typeof manifest.name === "string" ? manifest.name.trim() : "";
|
|
1181
|
+
} catch {
|
|
1182
|
+
continue;
|
|
1183
|
+
}
|
|
1184
|
+
if (!pluginId || !isExplicitlyEnabledClaudeBundle(pluginId, params.config)) continue;
|
|
1185
|
+
const commandsDir = path.join(root, "commands");
|
|
1186
|
+
let entries;
|
|
1187
|
+
try {
|
|
1188
|
+
const stat = fs.lstatSync(commandsDir);
|
|
1189
|
+
if (!stat.isDirectory() || stat.isSymbolicLink()) continue;
|
|
1190
|
+
entries = fs.readdirSync(commandsDir, { withFileTypes: true });
|
|
1191
|
+
} catch {
|
|
1192
|
+
continue;
|
|
1193
|
+
}
|
|
1194
|
+
for (const entry of entries.filter((candidate) => candidate.isFile() && !candidate.isSymbolicLink()).toSorted((left, right) => left.name.localeCompare(right.name)).slice(0, params.maxCandidates)) {
|
|
1195
|
+
if (path.extname(entry.name).toLowerCase() !== ".md") continue;
|
|
1196
|
+
const filePath = path.join(commandsDir, entry.name);
|
|
1197
|
+
let content;
|
|
1198
|
+
try {
|
|
1199
|
+
const stat = fs.lstatSync(filePath);
|
|
1200
|
+
if (stat.size <= 0 || stat.size > params.maxFileBytes) continue;
|
|
1201
|
+
content = fs.readFileSync(filePath, "utf8");
|
|
1202
|
+
} catch {
|
|
1203
|
+
continue;
|
|
1204
|
+
}
|
|
1205
|
+
const frontmatter = parseFrontmatter(content);
|
|
1206
|
+
const skillName = frontmatter.name?.trim();
|
|
1207
|
+
const description = frontmatter.description?.trim();
|
|
1208
|
+
const promptTemplate = stripMarkdownFrontmatter(content);
|
|
1209
|
+
if (!skillName || !description || !promptTemplate) continue;
|
|
1210
|
+
specs.push({
|
|
1211
|
+
name: sanitizeSkillCommandName(skillName),
|
|
1212
|
+
skillName,
|
|
1213
|
+
description: description.length > SKILL_COMMAND_DESCRIPTION_MAX_LENGTH ? `${description.slice(0, SKILL_COMMAND_DESCRIPTION_MAX_LENGTH - 1)}…` : description,
|
|
1214
|
+
promptTemplate,
|
|
1215
|
+
sourceFilePath: filePath
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
return specs;
|
|
1220
|
+
}
|
|
1061
1221
|
function resolveWorkspaceSkillPromptState(workspaceDir, opts) {
|
|
1062
1222
|
const eligible = filterSkillEntries(opts?.entries ?? loadSkillEntries(workspaceDir, opts), opts?.config, resolveEffectiveSkillFilter(opts), opts?.eligibility);
|
|
1063
1223
|
const promptEntries = eligible.filter((entry) => entry.invocation?.disableModelInvocation !== true);
|
|
@@ -1221,9 +1381,24 @@ function buildWorkspaceSkillCommandSpecs(workspaceDir, opts) {
|
|
|
1221
1381
|
name: unique,
|
|
1222
1382
|
skillName: rawName,
|
|
1223
1383
|
description,
|
|
1384
|
+
sourceFilePath: entry.skill.filePath,
|
|
1224
1385
|
...dispatch ? { dispatch } : {}
|
|
1225
1386
|
});
|
|
1226
1387
|
}
|
|
1388
|
+
const limits = resolveSkillsLimits(opts?.config);
|
|
1389
|
+
for (const bundleCommand of loadClaudeBundleCommandSpecs({
|
|
1390
|
+
workspaceDir,
|
|
1391
|
+
config: opts?.config,
|
|
1392
|
+
maxCandidates: limits.maxCandidatesPerRoot,
|
|
1393
|
+
maxFileBytes: limits.maxSkillFileBytes
|
|
1394
|
+
})) {
|
|
1395
|
+
const unique = resolveUniqueSkillCommandName(bundleCommand.name, used);
|
|
1396
|
+
used.add(unique.toLowerCase());
|
|
1397
|
+
specs.push({
|
|
1398
|
+
...bundleCommand,
|
|
1399
|
+
name: unique
|
|
1400
|
+
});
|
|
1401
|
+
}
|
|
1227
1402
|
return specs;
|
|
1228
1403
|
}
|
|
1229
1404
|
|
|
@@ -1511,4 +1686,4 @@ function resolveSkillCommandInvocation(params) {
|
|
|
1511
1686
|
}
|
|
1512
1687
|
|
|
1513
1688
|
//#endregion
|
|
1514
|
-
export { skill_commands_exports as a, getSkillsSnapshotVersion as c, resolveSkillsPromptForRun as d, syncSkillsToWorkspace as f,
|
|
1689
|
+
export { marketplaceSkillIdsFromEntries as _, skill_commands_exports as a, sanitizeEnvVars as b, getSkillsSnapshotVersion as c, resolveSkillsPromptForRun as d, syncSkillsToWorkspace as f, isMarketplaceSkillDir as g, getActiveSkillEnvOverrides as h, resolveSkillCommandInvocation as i, buildWorkspaceSkillSnapshot as l, applySkillEnvOverridesFromSnapshot as m, listSkillCommandsForAgents as n, getRemoteSkillEligibility as o, applySkillEnvOverrides as p, listSkillCommandsForWorkspace as r, ensureSkillsWatcher as s, listReservedChatSlashCommandNames as t, loadWorkspaceSkillEntries as u, marketplaceSkillIdsFromSnapshot as v, marketplaceSkillProvenanceMatchesContent as y };
|