@fased/fased 0.1.54 → 0.1.56
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/config/capability-catalog.json +12 -0
- package/dist/acp/client.js +2 -2
- package/dist/acp/secret-file.js +2 -2
- package/dist/agents/agent-scope.js +2 -2
- package/dist/agents/apply-patch.js +8 -8
- package/dist/agents/auth-profiles/paths.js +2 -2
- package/dist/agents/auth-profiles/store.js +2 -2
- package/dist/agents/authenticated-model-catalog.js +28 -0
- package/dist/agents/bash-tools.exec-host-node.js +1 -1
- package/dist/agents/bash-tools.exec.js +1 -1
- package/dist/agents/bash-tools.shared.js +2 -2
- package/dist/agents/cli-credentials.js +4 -4
- package/dist/agents/copilot-dynamic-headers.js +37 -0
- package/dist/agents/current-model-catalog.js +9 -13
- package/dist/agents/docs-path.js +3 -3
- package/dist/agents/embedded-pi-mcp.js +4 -4
- package/dist/agents/identity-avatar.js +3 -3
- package/dist/agents/identity-file.js +2 -2
- package/dist/agents/model-catalog-normalized.js +1 -0
- package/dist/agents/model-catalog-source.js +2 -2
- package/dist/agents/model-catalog.js +1 -1
- package/dist/agents/model-metadata.js +58 -9
- package/dist/agents/openai-codex-app-server.js +499 -0
- package/dist/agents/pi-embedded-runner/compact.js +3 -3
- package/dist/agents/pi-embedded-runner/extra-params.js +168 -79
- package/dist/agents/pi-embedded-runner/model.js +62 -1
- package/dist/agents/pi-embedded-runner/moonshot-stream-wrappers.js +46 -0
- package/dist/agents/pi-embedded-runner/openai-stream-wrappers.js +221 -0
- package/dist/agents/pi-embedded-runner/run/attempt.js +6 -4
- package/dist/agents/pi-embedded-runner/run.js +5 -2
- package/dist/agents/pi-embedded-runner/utils.js +1 -1
- package/dist/agents/pi-embedded-runner.js +1 -1
- package/dist/agents/pi-embedded-subscribe.raw-stream.js +3 -3
- package/dist/agents/pi-extensions/compaction-safeguard.js +3 -3
- package/dist/agents/pi-model-discovery.js +6 -6
- package/dist/agents/pi-project-settings.js +3 -3
- package/dist/agents/pi-tools.js +2 -2
- package/dist/agents/sandbox/fs-bridge.js +2 -2
- package/dist/agents/session-dirs.js +4 -4
- package/dist/agents/session-write-lock.js +13 -13
- package/dist/agents/shell-utils.js +5 -5
- package/dist/agents/skills/bundled-dir.js +4 -4
- package/dist/agents/skills/local-loader.js +6 -6
- package/dist/agents/skills/plugin-skills.js +2 -2
- package/dist/agents/skills/workspace.js +13 -13
- package/dist/agents/skills-install-download.js +7 -7
- package/dist/agents/skills-install-plan.js +2 -2
- package/dist/agents/skills-install.js +2 -2
- package/dist/agents/skills-status.js +2 -2
- package/dist/agents/subagent-depth.js +2 -2
- package/dist/agents/system-prompt-params.js +2 -2
- package/dist/agents/tools/discord-actions-messaging.js +1 -1
- package/dist/agents/tools/message-tool.js +1 -1
- package/dist/agents/tools/session-status-tool.js +3 -3
- package/dist/agents/tools/slack-actions.js +1 -1
- package/dist/agents/tools/tts-tool.js +1 -1
- package/dist/agents/workspace.js +22 -22
- package/dist/auto-reply/reply/agent-runner-execution.js +2 -2
- package/dist/auto-reply/reply/agent-runner.js +2 -2
- package/dist/auto-reply/reply/commands-export-session.js +7 -7
- package/dist/auto-reply/reply/commands-models.js +1 -1
- package/dist/auto-reply/reply/directive-handling.impl.js +4 -1
- package/dist/auto-reply/reply/dispatch-acp.js +1 -1
- package/dist/auto-reply/reply/dispatch-from-config.js +1 -1
- package/dist/auto-reply/reply/get-reply-run.js +20 -2
- package/dist/auto-reply/reply/model-selection.js +1 -1
- package/dist/auto-reply/reply/post-compaction-audit.js +3 -3
- package/dist/auto-reply/reply/post-compaction-context.js +3 -3
- package/dist/auto-reply/reply/session-reset-model.js +1 -1
- package/dist/auto-reply/reply/session.js +3 -3
- package/dist/auto-reply/skill-commands.js +3 -3
- package/dist/auto-reply/status.js +7 -7
- package/dist/auto-reply/thinking.js +1 -1
- package/dist/brand.js +1 -1
- package/dist/browser/cdp.helpers.js +2 -2
- package/dist/browser/chrome.executables.js +3 -3
- package/dist/browser/chrome.js +5 -5
- package/dist/browser/chrome.profile-decoration.js +6 -6
- package/dist/browser/extension-relay.js +7 -7
- package/dist/browser/profiles-service.js +2 -2
- package/dist/browser/server-context.js +2 -2
- package/dist/browser/trash.js +4 -4
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/canvas-host/server.js +4 -4
- package/dist/capabilities/catalog.js +3 -3
- package/dist/channels/plugins/catalog.js +3 -3
- package/dist/cli/browser-cli-extension.js +6 -6
- package/dist/cli/command-format.js +2 -2
- package/dist/cli/cron-cli/register.cron-add.js +1 -1
- package/dist/cli/cron-cli/register.cron-simple.js +2 -2
- package/dist/cli/dns-cli.js +9 -9
- package/dist/cli/gateway-cli/dev.js +5 -5
- package/dist/cli/gateway-cli/run.js +2 -2
- package/dist/cli/hooks-cli.js +5 -5
- package/dist/cli/lightweight/gateway-runtime-probe.js +2 -2
- package/dist/cli/memory-cli.js +7 -7
- package/dist/cli/nodes-media-utils.js +2 -2
- package/dist/cli/plugins-cli.js +2 -2
- package/dist/cli/program/register.agent.js +1 -1
- package/dist/cli/providers-cli.js +3 -2
- package/dist/cli/secrets-cli.js +3 -3
- package/dist/cli/windows-argv.js +2 -2
- package/dist/commands/agent.js +22 -3
- package/dist/commands/auth-choice.apply.api-providers.js +3 -8
- package/dist/commands/auth-choice.apply.openai.js +13 -7
- package/dist/commands/auth-choice.model-check.js +1 -2
- package/dist/commands/configure.gateway-auth.js +14 -16
- package/dist/commands/dashboard-link.js +3 -3
- package/dist/commands/doctor-config-flow.js +1 -1
- package/dist/commands/doctor-install.js +5 -5
- package/dist/commands/doctor-memory-search.js +2 -2
- package/dist/commands/doctor-platform-notes.js +2 -2
- package/dist/commands/doctor-sandbox.js +2 -2
- package/dist/commands/doctor-state-integrity.js +23 -23
- package/dist/commands/doctor-workspace.js +3 -3
- package/dist/commands/doctor.js +3 -3
- package/dist/commands/hosted-dashboard-probe.js +3 -3
- package/dist/commands/managed-up.js +2 -2
- package/dist/commands/model-picker.js +27 -8
- package/dist/commands/models/list.probe.js +1 -1
- package/dist/commands/models/list.registry.js +13 -17
- package/dist/commands/models/list.status-command.js +2 -2
- package/dist/commands/onboard-auth.config-core.js +1 -1
- package/dist/commands/onboard-auth.config-litellm.js +21 -21
- package/dist/commands/onboard-auth.credentials.js +3 -4
- package/dist/commands/onboard-auth.js +0 -1
- package/dist/commands/onboarding/plugin-install.js +2 -2
- package/dist/commands/openai-codex-model-default.js +28 -5
- package/dist/commands/sessions-cleanup.js +2 -2
- package/dist/commands/signal-install.js +6 -6
- package/dist/commands/status-all/channels.js +2 -2
- package/dist/commands/wallet.js +47 -47
- package/dist/config/cache-utils.js +2 -2
- package/dist/config/includes.js +5 -5
- package/dist/config/io.js +2 -2
- package/dist/config/paths.js +3 -3
- package/dist/config/sat-runtime-ids.js +3 -3
- package/dist/config/sessions/disk-budget.js +6 -6
- package/dist/config/sessions/paths.js +2 -2
- package/dist/config/sessions/store.js +17 -17
- package/dist/config/sessions/transcript.js +4 -4
- package/dist/config/talk.js +2 -2
- package/dist/config/zod-schema.agent-defaults.js +6 -2
- package/dist/config/zod-schema.agent-runtime.js +6 -2
- package/dist/config/zod-schema.core.js +6 -2
- package/dist/control-ui/assets/{app-BKlu6OKz.js → app-D7TXyNRi.js} +1548 -1540
- package/dist/control-ui/assets/chat-model-ref-Djkv93yn.js +2 -0
- package/dist/control-ui/assets/{index-nrFcGMv-.js → index-BmSBom-w.js} +3 -3
- package/dist/control-ui/assets/{providers-BQFrRqym.js → providers-Cc89iMdx.js} +5 -5
- package/dist/control-ui/index.html +1 -1
- package/dist/control-ui/version.json +1 -0
- package/dist/cron/isolated-agent/run.js +6 -2
- package/dist/cron/service/jobs.js +11 -1
- package/dist/cron/service/store.js +2 -2
- package/dist/cron/store.js +6 -6
- package/dist/daemon/systemd-system.js +5 -5
- package/dist/discord/monitor/gateway-plugin.js +2 -2
- package/dist/discord/monitor/thread-bindings.state.js +2 -2
- package/dist/discord/voice/manager.js +1 -1
- package/dist/extensions/sat-mining/src/sat-bond-layout.js +9 -9
- package/dist/gateway/client.js +4 -4
- package/dist/gateway/control-ui-boot-check.js +6 -6
- package/dist/gateway/control-ui-login.js +7 -7
- package/dist/gateway/control-ui.js +11 -9
- package/dist/gateway/hooks-mapping.js +4 -4
- package/dist/gateway/protocol/schema/agents-models-skills.js +66 -4
- package/dist/gateway/server-discovery.js +2 -2
- package/dist/gateway/server-http.js +4 -4
- package/dist/gateway/server-methods/chat.js +3 -3
- package/dist/gateway/server-methods/models.js +8 -8
- package/dist/gateway/server-methods/sessions.js +8 -8
- package/dist/gateway/server-methods/tts.js +2 -2
- package/dist/gateway/server-methods/usage.js +2 -2
- package/dist/gateway/server-model-catalog.js +3 -0
- package/dist/gateway/server.impl.js +3 -3
- package/dist/gateway/session-compaction-checkpoints.js +4 -4
- package/dist/gateway/session-utils.fs.js +24 -24
- package/dist/gateway/session-utils.js +6 -6
- package/dist/gateway/sessions-patch.js +27 -24
- package/dist/hooks/bundled-dir.js +4 -4
- package/dist/hooks/gmail-setup-utils.js +6 -6
- package/dist/hooks/import-url.js +2 -2
- package/dist/hooks/loader.js +4 -4
- package/dist/hooks/workspace.js +7 -7
- package/dist/infra/archive.js +17 -17
- package/dist/infra/boundary-file-read.js +2 -2
- package/dist/infra/boundary-path.js +15 -15
- package/dist/infra/brew.js +2 -2
- package/dist/infra/control-ui-assets.js +14 -14
- package/dist/infra/device-auth-store.js +8 -8
- package/dist/infra/device-identity.js +8 -8
- package/dist/infra/dotenv.js +2 -2
- package/dist/infra/exec-approvals.js +8 -8
- package/dist/infra/exec-command-resolution.js +4 -4
- package/dist/infra/exec-safe-bin-trust.js +2 -2
- package/dist/infra/fased-root.js +5 -5
- package/dist/infra/fs-safe.js +14 -14
- package/dist/infra/gateway-lock.js +11 -11
- package/dist/infra/git-commit.js +5 -5
- package/dist/infra/git-root.js +4 -4
- package/dist/infra/hosted-runtime-artifact.js +3 -3
- package/dist/infra/is-main.js +2 -2
- package/dist/infra/json-file.js +7 -7
- package/dist/infra/outbound/delivery-queue.js +16 -16
- package/dist/infra/path-env.js +3 -3
- package/dist/infra/ports-lsof.js +4 -4
- package/dist/infra/provider-usage.auth.js +3 -3
- package/dist/infra/safe-open-sync.js +2 -2
- package/dist/infra/session-cost-usage.js +9 -9
- package/dist/infra/shell-env.js +2 -2
- package/dist/infra/state-migrations.fs.js +6 -6
- package/dist/infra/state-migrations.js +23 -23
- package/dist/infra/tmp-fased-dir.js +6 -6
- package/dist/infra/update-runner.js +31 -3
- package/dist/infra/widearea-dns.js +3 -3
- package/dist/infra/wsl.js +2 -2
- package/dist/light-update-status.js +1 -1
- package/dist/line/accounts.js +2 -2
- package/dist/line/download.js +2 -2
- package/dist/logging/config.js +3 -3
- package/dist/logging/logger.js +7 -7
- package/dist/managed/federation.js +3 -3
- package/dist/managed/tunnel.js +3 -3
- package/dist/media/store.js +13 -13
- package/dist/media-understanding/runner.js +3 -3
- package/dist/memory/embeddings.js +2 -2
- package/dist/memory/internal.js +10 -10
- package/dist/memory/inventory.js +19 -2
- package/dist/memory/manager-sync-ops.js +7 -7
- package/dist/memory/repair-executor.js +17 -17
- package/dist/node-host/invoke-system-run-plan.js +8 -8
- package/dist/node-host/invoke.js +2 -2
- package/dist/node-host/runner.js +3 -3
- package/dist/pairing/pairing-store.js +3 -3
- package/dist/plugin-sdk/{accounts-DW9OS5Ll.js → accounts-DzWlKv1U.js} +1 -1
- package/dist/plugin-sdk/{actions-DQUXohRr.js → actions-BplQVLL6.js} +4 -4
- package/dist/plugin-sdk/{active-listener-BZQWZPF7.js → active-listener-x4MLhYUw.js} +1 -1
- package/dist/plugin-sdk/{allow-list-BYeKk0Sy.js → allow-list-DyAxs4yw.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-t4mmHsI2.js → audio-preflight-G8h3Sn8_.js} +43 -47
- package/dist/plugin-sdk/{audit-BZk_6Buw.js → audit-CWknklvI.js} +1 -1
- package/dist/plugin-sdk/{channel-access-CN5HiWdb.js → channel-access-a9Dnfw7-.js} +1 -1
- package/dist/plugin-sdk/{channel-access-configure-B7Kkvx9K.js → channel-access-configure-CD4QDN5E.js} +1 -1
- package/dist/plugin-sdk/{channel-adapters.discord-IOZP8Cv5.js → channel-adapters.discord-BS4S4Svh.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-B2ffJ-LR.js → chunk-B8EZkwiT.js} +1 -1
- package/dist/plugin-sdk/{chunk-items-jOdkyP53.js → chunk-items-CEPklxGe.js} +1 -1
- package/dist/plugin-sdk/command-status.d.ts +2 -2
- package/dist/plugin-sdk/command-status.js +43 -47
- package/dist/plugin-sdk/{commands-registry-BWb4NcfW.js → commands-registry-BfEa4tFA.js} +2 -2
- package/dist/plugin-sdk/{common-C4XrB73N.js → common-CbfckC19.js} +1 -1
- package/dist/plugin-sdk/{config-rySyVtKs.js → config-Bt5GhnA-.js} +105 -73
- package/dist/plugin-sdk/{config-schema-BaybPPrJ.js → config-schema-B9DKr6J5.js} +96239 -81587
- package/dist/plugin-sdk/device-pair.d.ts +1 -1
- package/dist/plugin-sdk/device-pair.js +2 -3
- package/dist/plugin-sdk/{diagnostic-Dfn1iERm.js → diagnostic-DLL_zekv.js} +3 -3
- package/dist/plugin-sdk/{directory-live-DatqU-eS.js → directory-live-CSuYxdwk.js} +1 -1
- package/dist/plugin-sdk/{directory-live-ClwN5KKq.js → directory-live-Dw7ZgC9_.js} +1 -1
- package/dist/plugin-sdk/discord.d.ts +5 -5
- package/dist/plugin-sdk/discord.js +31 -32
- package/dist/plugin-sdk/{draft-stream-controls-D4Tb_iS_.js → draft-stream-controls-BqchW1vi.js} +1 -1
- package/dist/plugin-sdk/{fetch-guard-BuYrl6q2.js → fetch-guard-CeG6u6ld.js} +1 -1
- package/dist/plugin-sdk/{filesystem-manager-B9DDPgfU.js → filesystem-manager-BGGGrkiN.js} +2 -2
- package/dist/plugin-sdk/{fs-safe-BG-VzVkL.js → fs-safe-xBqok6yR.js} +1 -1
- package/dist/plugin-sdk/{group-mentions-DLOOve8d.d.ts → group-mentions-BHRff6j8.d.ts} +1 -1
- package/dist/plugin-sdk/{guilds-BeT3iHHJ.js → guilds-CDhRIX57.js} +1 -1
- package/dist/plugin-sdk/{handle-action-CGF-Qnp0.js → handle-action-DbzZFYnG.js} +24 -25
- package/dist/plugin-sdk/{helpers-DgRMfCnT.js → helpers-CluGKuIV.js} +1 -1
- package/dist/plugin-sdk/{image-ops-CcBfoMLW.js → image-ops-CUaLtIFj.js} +1 -1
- package/dist/plugin-sdk/index.d.ts +8 -8
- package/dist/plugin-sdk/index.js +47 -51
- package/dist/plugin-sdk/json-store.js +6 -6
- package/dist/plugin-sdk/{login-DpDQyM7r.js → login-DJuHYDiK.js} +3 -3
- package/dist/plugin-sdk/{login-qr-COaSAPY5.js → login-qr-CbHL5ayf.js} +3 -3
- package/dist/plugin-sdk/{manager-Cqz30lA3.js → manager-oHAvZCT3.js} +7 -7
- package/dist/plugin-sdk/{markdown-tables-BOG5sSQQ.js → markdown-tables-Mkx7k92Y.js} +1 -1
- package/dist/plugin-sdk/{media-Bu-nJpPs.js → media-CA8sTmVE.js} +4 -4
- package/dist/plugin-sdk/{monitor-II_NIq3G.js → monitor-CZrN9pev.js} +51 -55
- package/dist/plugin-sdk/{monitor-DL6oEVo8.js → monitor-CmwGqNyV.js} +61 -65
- package/dist/plugin-sdk/{openresponses-http-vkHBBpGY.js → openresponses-http-CWOd4war.js} +43 -47
- package/dist/plugin-sdk/{optional-runtime-dependency-DEojVNfv.js → optional-runtime-dependency-DKmk9PZa.js} +1 -1
- package/dist/plugin-sdk/{outbound-mf2y6KuY.js → outbound-0oN9IfNw.js} +9 -9
- package/dist/plugin-sdk/{outbound-attachment-ivAHpWnn.js → outbound-attachment-DdVkqUzE.js} +2 -2
- package/dist/plugin-sdk/{pairing-message-CvJ6Qa1Q.d.ts → pairing-message-BMkkS038.d.ts} +2 -2
- package/dist/plugin-sdk/{pairing-message-CqYG12t-.js → pairing-message-ClqhfCUk.js} +1 -1
- package/dist/plugin-sdk/{pairing-store-D-21Sphe.js → pairing-store-B01mCSct.js} +2 -2
- package/dist/plugin-sdk/{pi-model-discovery-B6gD1clF.js → pi-model-discovery-Buz0JC1Y.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-runtime-3yDxS3ro.js → pi-model-discovery-runtime-DuwuoteY.js} +2 -2
- package/dist/plugin-sdk/{probe-Cyb-DGA3.js → probe--7xtfzMm.js} +3 -3
- package/dist/plugin-sdk/{probe-Dlk0Jxpw.js → probe-BFroeK3g.js} +1 -1
- package/dist/plugin-sdk/{probe-D8JAILir.js → probe-l_whvGLY.js} +1 -1
- package/dist/plugin-sdk/{resolve-channels-zEnvugag.js → probe-xY3Ky0Tx.js} +3 -4
- package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +2 -2
- package/dist/plugin-sdk/{pw-ai-CMplwiwf.js → pw-ai-B0domrii.js} +6 -8
- package/dist/plugin-sdk/{qmd-manager-DCUE21Kj.js → qmd-manager-CFFeM4Fl.js} +3 -3
- package/dist/plugin-sdk/{query-expansion-Zr9qQixm.js → query-expansion-CAI2kKLQ.js} +1 -1
- package/dist/plugin-sdk/{replies-wiI4veI7.js → replies-1macZ1mZ.js} +4 -4
- package/dist/plugin-sdk/{resolve-channels-ChWKWtA9.js → resolve-channels-87LZrFk_.js} +2 -2
- package/dist/plugin-sdk/resolve-channels-CwB2_019.js +4 -0
- package/dist/plugin-sdk/{resolve-outbound-target-bm9RUK5q.js → resolve-outbound-target-BdH6LUoW.js} +2 -2
- package/dist/plugin-sdk/{resolve-route-ekGNc6os.js → resolve-route-CkNIKKEW.js} +1 -1
- package/dist/plugin-sdk/{resolve-users-BTvjQuui.js → resolve-users-Cxb5wpAQ.js} +1 -1
- package/dist/plugin-sdk/{resolve-users-CTzoruIZ.js → resolve-users-V6dHh_2B.js} +2 -2
- package/dist/plugin-sdk/{retry-policy-BvlC2SPh.js → retry-policy-9ybIh4Fq.js} +1 -1
- package/dist/plugin-sdk/{runtime-ClSakPxR.js → runtime-Dy420wBu.js} +3 -3
- package/dist/plugin-sdk/{runtime-dependency-yAWxH4El.js → runtime-dependency-CIw9t7-k.js} +123 -15
- package/dist/plugin-sdk/{sandbox-paths-lj7_EVuA.js → sandbox-paths-w64tYl0v.js} +1 -1
- package/dist/plugin-sdk/sat-runtime.d.ts +3 -3
- package/dist/plugin-sdk/sat-runtime.js +44 -10
- package/dist/plugin-sdk/{send-D264hFVb.js → send-2VcOMTN5.js} +9 -9
- package/dist/plugin-sdk/{send-CgyS75Av.js → send-BQUtCJFW.js} +10 -10
- package/dist/plugin-sdk/{send-D58yEeH4.js → send-DPJIIYAs.js} +6 -6
- package/dist/plugin-sdk/{send-C7x6gzSl.js → send-Dqes9tdU.js} +13 -13
- package/dist/plugin-sdk/{send-DrAtUGLM.js → send-J4JWKP62.js} +8 -8
- package/dist/plugin-sdk/{session-DyMtb5YQ.js → session-C_n2S5ub.js} +3 -3
- package/dist/plugin-sdk/{skill-commands-Q80wCyry.js → skill-commands-B7wx9ax8.js} +102 -102
- package/dist/plugin-sdk/{slack-C-I6q3NB.js → slack-BouRQG-W.js} +64 -68
- package/dist/plugin-sdk/{slack-actions-dGE_t_Un.js → slack-actions-CasHVtiq.js} +20 -21
- package/dist/plugin-sdk/slack.d.ts +5 -5
- package/dist/plugin-sdk/slack.js +13 -13
- package/dist/plugin-sdk/{ssrf-BZG8Ztod.js → ssrf-fG4UHKBw.js} +180 -2
- package/dist/plugin-sdk/{sticker-cache-DCrDTYIi.js → sticker-cache-BvGEUas3.js} +3 -3
- package/dist/plugin-sdk/{tables-0mhUOh5v.js → tables-CjlQJV4r.js} +2 -2
- package/dist/plugin-sdk/{device-pairing-D2Yq-_U6.js → tailscale-status-DwpNdO3Z.js} +104 -2
- package/dist/plugin-sdk/{targets-znKHngSk.js → targets-QfP164Dh.js} +2 -2
- package/dist/plugin-sdk/{telegram-actions-GBYY8-x9.js → telegram-actions-CwYjV6Db.js} +48 -52
- package/dist/plugin-sdk/telegram.d.ts +5 -5
- package/dist/plugin-sdk/telegram.js +11 -11
- package/dist/plugin-sdk/{thread-bindings.lifecycle-ClzPBK70.js → thread-bindings.lifecycle-DU4iX_Jr.js} +3 -3
- package/dist/plugin-sdk/{thread-bindings.state-Ha01nmrq.js → thread-bindings.state-BgYWFjNF.js} +2 -2
- package/dist/plugin-sdk/{tmp-fased-dir-C_xfeEN9.d.ts → tmp-fased-dir-BdFQvrvw.d.ts} +2 -2
- package/dist/plugin-sdk/{types-DV5TNhMK.d.ts → types-BYDL6dQj.d.ts} +2 -2
- package/dist/plugin-sdk/{types-BI2njxWJ.d.ts → types-CLIvQaVg.d.ts} +39 -5
- package/dist/plugin-sdk/{types-CBCtqtMn.d.ts → types-DyhXnYUr.d.ts} +1 -1
- package/dist/plugin-sdk/{types.plugin-CvUiB3Kh.d.ts → types.plugin-_fbu40Re.d.ts} +8 -5
- package/dist/plugin-sdk/{web-CJMfhGFY.js → web-D0yENDve.js} +52 -56
- package/dist/plugin-sdk/{whatsapp-actions-0ZbGo5ZV.js → whatsapp-actions-BT2nPLyo.js} +18 -19
- package/dist/plugin-sdk/{whatsapp-heartbeat-DGTsuvQ8.js → whatsapp-heartbeat-CiABSZ6G.js} +2 -2
- package/dist/plugin-sdk/whatsapp.d.ts +5 -5
- package/dist/plugin-sdk/whatsapp.js +14 -14
- package/dist/plugin-sdk/{wsl-D5jDUlms.js → wsl-B_ojyEtC.js} +53 -53
- package/dist/plugins/bundled-dir.js +3 -3
- package/dist/plugins/discovery.js +11 -11
- package/dist/plugins/loader.js +13 -13
- package/dist/plugins/manifest-registry.js +2 -2
- package/dist/plugins/manifest.js +4 -4
- package/dist/plugins/path-safety.js +3 -3
- package/dist/plugins/runtime/index.js +1 -1
- package/dist/plugins/status-cache.js +9 -9
- package/dist/plugins/update.js +3 -3
- package/dist/plugins/web-search-install-catalog.js +3 -3
- package/dist/providers/github-copilot-model-discovery.js +51 -0
- package/dist/providers/litellm-models.js +1 -1
- package/dist/providers/openai-codex-model-discovery.js +166 -0
- package/dist/providers/refresh.js +311 -67
- package/dist/providers/registry.js +16 -6
- package/dist/providers/runtime-model-catalog.js +250 -0
- package/dist/secrets/apply.js +16 -16
- package/dist/secrets/audit.js +11 -11
- package/dist/secrets/shared.js +9 -9
- package/dist/security/scan-paths.js +2 -2
- package/dist/shared/config-eval.js +2 -2
- package/dist/shared/model-thinking.js +54 -4
- package/dist/shared/pid-alive.js +2 -2
- package/dist/tasks/standing-orders.js +5 -5
- package/dist/tasks/task-flow-registry.js +5 -5
- package/dist/tasks/task-registry.js +5 -5
- package/dist/tasks/workflow-definitions.js +6 -6
- package/dist/telegram/bot-message-context.js +1 -1
- package/dist/telegram/token.js +5 -5
- package/dist/utils.js +5 -5
- package/dist/wallet/local-socket-signer-broker.js +16 -16
- package/dist/wallet/providers/embedded-keystore-adapter.js +5 -5
- package/dist/wallet/providers/local-socket-signer-adapter.js +2 -2
- package/dist/wallet/wallet-approval-auth.js +5 -5
- package/dist/wallet/wallet-audit-log.js +5 -5
- package/dist/wallet/wallet-custody.js +21 -21
- package/dist/wallet/wallet-inbound-events.js +5 -5
- package/dist/wallet/wallet-observability.js +5 -5
- package/dist/wallet/wallet-policy.js +9 -9
- package/dist/wallet/wallet-provider-registry.js +7 -7
- package/dist/wallet/wallet-runtime-config.js +3 -3
- package/dist/wallet/wallet-secrets-store.js +22 -22
- package/dist/wallet/wallet-send-approvals.js +5 -5
- package/dist/wallet/wallet-settlement-links.js +5 -5
- package/dist/web/accounts.js +3 -3
- package/dist/web/auth-store.js +18 -18
- package/dist/web/session.js +4 -4
- package/dist/wizard/host-security-capability.js +2 -2
- package/dist/wizard/onboarding.host-security.js +7 -7
- package/dist/wizard/onboarding.js +31 -13
- package/dist/wizard/onboarding.wallet.js +44 -44
- 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/package.json +1 -1
- 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/package.json +2 -1
- package/dist/control-ui/assets/chat-model-ref-B9sWop67.js +0 -2
- package/dist/plugin-sdk/ip-C70a-YlD.js +0 -181
- package/dist/plugin-sdk/tailscale-status-ClsquRGs.js +0 -104
- package/dist/plugin-sdk/wallet-status-CyovJojz.js +0 -11944
- package/dist/plugin-sdk/ws-CocpWGhl.js +0 -114
- /package/dist/plugin-sdk/{blocks-input-Dcitfh7h.js → blocks-input-Bg-8S2pl.js} +0 -0
- /package/dist/plugin-sdk/{channel-activity-Cg1xRoc2.js → channel-activity-DBDMQ3yI.js} +0 -0
- /package/dist/plugin-sdk/{channel-core-BOkyXXLa.js → channel-core-CFRs8LPy.js} +0 -0
- /package/dist/plugin-sdk/{client-D2N7hqVu.js → client-pI228AVT.js} +0 -0
- /package/dist/plugin-sdk/{command-poll-backoff-NAePk3eL.js → command-poll-backoff-yJU83wEq.js} +0 -0
- /package/dist/plugin-sdk/{date-time-CE3Uer3C.js → date-time-uUevHscU.js} +0 -0
- /package/dist/plugin-sdk/{diagnostic-session-state-HO94DMou.js → diagnostic-session-state-DqgfGYqZ.js} +0 -0
- /package/dist/plugin-sdk/{draft-stream-loop-CKyHn8IX.js → draft-stream-loop-CrOPfV3F.js} +0 -0
- /package/dist/plugin-sdk/{fetch-Cu-ahkie.js → fetch-BtmoPIlf.js} +0 -0
- /package/dist/plugin-sdk/{gateway-registry-DFsoY6C0.js → gateway-registry-DZDsqicG.js} +0 -0
- /package/dist/plugin-sdk/{inbound-context-BFnIdcqI.js → inbound-context-DrAcXE0y.js} +0 -0
- /package/dist/plugin-sdk/{internal-qo16nNU1.js → internal-CG_nHo-2.js} +0 -0
- /package/dist/plugin-sdk/{memory-search-C3C0bD2H.js → memory-search-VFll-AIb.js} +0 -0
- /package/dist/plugin-sdk/{pairing-token-N_6Jbt1L.js → pairing-token-Cs3BRKc0.js} +0 -0
- /package/dist/plugin-sdk/{path-alias-guards-Dg3gU-MA.js → path-alias-guards-BJZD5JMJ.js} +0 -0
- /package/dist/plugin-sdk/{polls-DQrR-qT3.js → polls-DKQXVfJp.js} +0 -0
- /package/dist/plugin-sdk/{proxy-7xs_rsnV.js → proxy-DWpYcsvR.js} +0 -0
- /package/dist/plugin-sdk/{qmd-scope-D1sSG_Rx.js → qmd-scope-CdX34VCV.js} +0 -0
- /package/dist/plugin-sdk/{redact-identifier-Q3tkvxhm.js → redact-identifier-Lt7t3l7S.js} +0 -0
- /package/dist/plugin-sdk/{redact-sensitive-url-dPvnFFsK.js → redact-sensitive-url-g-ukZjwA.js} +0 -0
- /package/dist/plugin-sdk/{render-Bwu_WxwA.js → render-e7fENCYH.js} +0 -0
- /package/dist/plugin-sdk/{reply-prefix-Bqzm6DC1.js → reply-prefix-ClpxvL_w.js} +0 -0
- /package/dist/plugin-sdk/{reply-reference-BkbK_DWT.js → reply-reference-Bqk-7HXE.js} +0 -0
- /package/dist/plugin-sdk/{secure-random-Bl-AVLVb.js → secure-random-BIkG-k4s.js} +0 -0
- /package/dist/plugin-sdk/{shared-clhhbWN3.js → shared-CBgp_GBw.js} +0 -0
- /package/dist/plugin-sdk/{target-errors-C_SVKoEv.js → target-errors-Ckufe179.js} +0 -0
- /package/dist/plugin-sdk/{targets-BDvvnlph.js → targets-CoMJ1ry1.js} +0 -0
- /package/dist/plugin-sdk/{tokens-BvtlOzVP.js → tokens-BbnqfVuu.js} +0 -0
- /package/dist/plugin-sdk/{tool-loop-detection-CWphm1k_.js → tool-loop-detection-Bp8bPJLs.js} +0 -0
- /package/dist/plugin-sdk/{ui-e020ouhJ.js → ui-Be8cLHIS.js} +0 -0
- /package/dist/plugin-sdk/{with-timeout-BYrRAYFV.js → with-timeout-ckWB8rTo.js} +0 -0
|
@@ -8,7 +8,7 @@ import { formatDocsLink } from "../terminal/links.js";
|
|
|
8
8
|
import { movePathToTrash } from "../browser/trash.js";
|
|
9
9
|
import { copyToClipboard } from "../infra/clipboard.js";
|
|
10
10
|
import { fileURLToPath } from "node:url";
|
|
11
|
-
import
|
|
11
|
+
import syncFs from "node:fs";
|
|
12
12
|
import path from "node:path";
|
|
13
13
|
|
|
14
14
|
//#region src/cli/browser-cli-extension.ts
|
|
@@ -31,7 +31,7 @@ function installedExtensionRootDir() {
|
|
|
31
31
|
return path.join(resolveStateDir(), "browser", "chrome-extension");
|
|
32
32
|
}
|
|
33
33
|
function hasManifest(dir) {
|
|
34
|
-
return
|
|
34
|
+
return syncFs.existsSync(path.join(dir, "manifest.json"));
|
|
35
35
|
}
|
|
36
36
|
async function installChromeExtension(opts) {
|
|
37
37
|
const src = opts?.sourceDir ?? resolveBundledExtensionRootDir();
|
|
@@ -40,14 +40,14 @@ async function installChromeExtension(opts) {
|
|
|
40
40
|
}
|
|
41
41
|
const stateDir = opts?.stateDir ?? resolveStateDir();
|
|
42
42
|
const dest = path.join(stateDir, "browser", "chrome-extension");
|
|
43
|
-
|
|
44
|
-
if (
|
|
43
|
+
syncFs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
44
|
+
if (syncFs.existsSync(dest)) {
|
|
45
45
|
await movePathToTrash(dest).catch(() => {
|
|
46
46
|
const backup = `${dest}.old-${Date.now()}`;
|
|
47
|
-
|
|
47
|
+
syncFs.renameSync(dest, backup);
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
await
|
|
50
|
+
await syncFs.promises.cp(src, dest, { recursive: true });
|
|
51
51
|
if (!hasManifest(dest)) {
|
|
52
52
|
throw new Error("Chrome extension install failed (manifest.json missing). Try again.");
|
|
53
53
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { replaceCliName, resolveCliName } from "./cli-name.js";
|
|
2
2
|
import { normalizeProfileName } from "./profile-utils.js";
|
|
3
|
-
import
|
|
3
|
+
import syncFs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
|
|
6
6
|
//#region src/cli/command-format.ts
|
|
@@ -17,7 +17,7 @@ function resolveHintCliInvocation(argv = process.argv) {
|
|
|
17
17
|
return fallback;
|
|
18
18
|
}
|
|
19
19
|
const localRunner = path.resolve(process.cwd(), "scripts", "run-node.mjs");
|
|
20
|
-
if (!
|
|
20
|
+
if (!syncFs.existsSync(localRunner)) {
|
|
21
21
|
return fallback;
|
|
22
22
|
}
|
|
23
23
|
return "node scripts/run-node.mjs";
|
|
@@ -38,7 +38,7 @@ function registerCronListCommand(cron) {
|
|
|
38
38
|
}));
|
|
39
39
|
}
|
|
40
40
|
function registerCronAddCommand(cron) {
|
|
41
|
-
addGatewayClientOptions(cron.command("add").alias("create").description("Add a scheduled task").requiredOption("--name <name>", "Task name").option("--description <text>", "Optional description").option("--disabled", "Create task disabled", false).option("--delete-after-run", "Delete one-shot task after it succeeds", false).option("--keep-after-run", "Keep one-shot task after it succeeds", false).option("--agent <id>", "Agent id for this task").option("--session <target>", "Session target (main|isolated)").option("--session-key <key>", "Session key for task routing (e.g. agent:my-agent:my-session)").option("--wake <mode>", "Wake mode (now|next-heartbeat)", "now").option("--at <when>", "Run once at time (ISO) or +duration (e.g. 20m)").option("--every <duration>", "Run every duration (e.g. 10m, 1h)").option("--cron <expr>", "Cron expression (5-field or 6-field with seconds)").option("--tz <iana>", "Timezone for cron expressions (IANA)", "").option("--stagger <duration>", "Cron stagger window (e.g. 30s, 5m)").option("--exact", "Disable cron staggering (set stagger to 0)", false).option("--system-event <text>", "System event payload (main session)").option("--message <text>", "Agent message payload").option("--thinking <level>", "Thinking level for agent tasks (off|minimal|low|medium|high)").option("--model <model>", "Model override for agent tasks (provider/model or alias)").option("--timeout-seconds <n>", "Timeout seconds for agent tasks").option("--announce", "Announce summary to a chat (subagent-style)", false).option("--deliver", "Deprecated (use --announce). Announces a summary to a chat.").option("--no-deliver", "Disable announce delivery and skip main-session summary").option("--channel <channel>", `Delivery channel (${getCronChannelOptions()})`, "last").option("--to <dest>", "Delivery destination (E.164, Telegram chatId, or Discord channel/user)").option("--best-effort-deliver", "Do not fail the task if delivery fails", false).option("--json", "Output JSON", false).action(async (opts, cmd) => {
|
|
41
|
+
addGatewayClientOptions(cron.command("add").alias("create").description("Add a scheduled task").requiredOption("--name <name>", "Task name").option("--description <text>", "Optional description").option("--disabled", "Create task disabled", false).option("--delete-after-run", "Delete one-shot task after it succeeds", false).option("--keep-after-run", "Keep one-shot task after it succeeds", false).option("--agent <id>", "Agent id for this task").option("--session <target>", "Session target (main|isolated)").option("--session-key <key>", "Session key for task routing (e.g. agent:my-agent:my-session)").option("--wake <mode>", "Wake mode (now|next-heartbeat)", "now").option("--at <when>", "Run once at time (ISO) or +duration (e.g. 20m)").option("--every <duration>", "Run every duration (e.g. 10m, 1h)").option("--cron <expr>", "Cron expression (5-field or 6-field with seconds)").option("--tz <iana>", "Timezone for cron expressions (IANA)", "").option("--stagger <duration>", "Cron stagger window (e.g. 30s, 5m)").option("--exact", "Disable cron staggering (set stagger to 0)", false).option("--system-event <text>", "System event payload (main session)").option("--message <text>", "Agent message payload").option("--thinking <level>", "Thinking level for agent tasks (off|minimal|low|medium|high|xhigh|max|ultra)").option("--model <model>", "Model override for agent tasks (provider/model or alias)").option("--timeout-seconds <n>", "Timeout seconds for agent tasks").option("--announce", "Announce summary to a chat (subagent-style)", false).option("--deliver", "Deprecated (use --announce). Announces a summary to a chat.").option("--no-deliver", "Disable announce delivery and skip main-session summary").option("--channel <channel>", `Delivery channel (${getCronChannelOptions()})`, "last").option("--to <dest>", "Delivery destination (E.164, Telegram chatId, or Discord channel/user)").option("--best-effort-deliver", "Do not fail the task if delivery fails", false).option("--json", "Output JSON", false).action(async (opts, cmd) => {
|
|
42
42
|
try {
|
|
43
43
|
const staggerRaw = typeof opts.stagger === "string" ? opts.stagger.trim() : "";
|
|
44
44
|
const useExact = Boolean(opts.exact);
|
|
@@ -4,7 +4,7 @@ import { formatCronEscalationContext, formatCronEscalationPasses, formatCronRunL
|
|
|
4
4
|
import { withTaskCoordinationRequest } from "../../cron/task-planner.js";
|
|
5
5
|
import { addGatewayClientOptions, callGatewayFromCli } from "../gateway-rpc.js";
|
|
6
6
|
import { warnIfCronSchedulerDisabled } from "./shared.js";
|
|
7
|
-
import
|
|
7
|
+
import syncFs from "node:fs";
|
|
8
8
|
|
|
9
9
|
//#region src/cli/cron-cli/register.cron-simple.ts
|
|
10
10
|
const QUEUE_CONTROL_METHODS = {
|
|
@@ -100,7 +100,7 @@ function formatUnknownField(value, fallback) {
|
|
|
100
100
|
return JSON.stringify(value);
|
|
101
101
|
}
|
|
102
102
|
function readWorkflowJsonFile(filePath) {
|
|
103
|
-
const raw =
|
|
103
|
+
const raw = syncFs.readFileSync(filePath, "utf8");
|
|
104
104
|
const parsed = JSON.parse(raw);
|
|
105
105
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
106
106
|
throw new Error("Workflow file must contain a JSON object.");
|
package/dist/cli/dns-cli.js
CHANGED
|
@@ -6,7 +6,7 @@ import { pickPrimaryTailnetIPv4, pickPrimaryTailnetIPv6 } from "../infra/tailnet
|
|
|
6
6
|
import { formatDocsLink } from "../terminal/links.js";
|
|
7
7
|
import { renderTable } from "../terminal/table.js";
|
|
8
8
|
import { getWideAreaZonePath, resolveWideAreaDiscoveryDomain } from "../infra/widearea-dns.js";
|
|
9
|
-
import
|
|
9
|
+
import syncFs from "node:fs";
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
import { spawnSync } from "node:child_process";
|
|
12
12
|
|
|
@@ -27,7 +27,7 @@ function run(cmd, args, opts) {
|
|
|
27
27
|
}
|
|
28
28
|
function writeFileSudoIfNeeded(filePath, content) {
|
|
29
29
|
try {
|
|
30
|
-
|
|
30
|
+
syncFs.writeFileSync(filePath, content, "utf-8");
|
|
31
31
|
return;
|
|
32
32
|
} catch (err) {
|
|
33
33
|
const code = err.code;
|
|
@@ -53,7 +53,7 @@ function writeFileSudoIfNeeded(filePath, content) {
|
|
|
53
53
|
}
|
|
54
54
|
function mkdirSudoIfNeeded(dirPath) {
|
|
55
55
|
try {
|
|
56
|
-
|
|
56
|
+
syncFs.mkdirSync(dirPath, { recursive: true });
|
|
57
57
|
return;
|
|
58
58
|
} catch (err) {
|
|
59
59
|
const code = err.code;
|
|
@@ -68,11 +68,11 @@ function mkdirSudoIfNeeded(dirPath) {
|
|
|
68
68
|
], { inherit: true });
|
|
69
69
|
}
|
|
70
70
|
function zoneFileNeedsBootstrap(zonePath) {
|
|
71
|
-
if (!
|
|
71
|
+
if (!syncFs.existsSync(zonePath)) {
|
|
72
72
|
return true;
|
|
73
73
|
}
|
|
74
74
|
try {
|
|
75
|
-
const content =
|
|
75
|
+
const content = syncFs.readFileSync(zonePath, "utf-8");
|
|
76
76
|
return !/\bSOA\b/.test(content) || !/\bNS\b/.test(content);
|
|
77
77
|
} catch {
|
|
78
78
|
return true;
|
|
@@ -87,7 +87,7 @@ function detectBrewPrefix() {
|
|
|
87
87
|
return prefix;
|
|
88
88
|
}
|
|
89
89
|
function ensureImportLine(corefilePath, importGlob) {
|
|
90
|
-
const existing =
|
|
90
|
+
const existing = syncFs.readFileSync(corefilePath, "utf-8");
|
|
91
91
|
if (existing.includes(importGlob)) {
|
|
92
92
|
return false;
|
|
93
93
|
}
|
|
@@ -171,7 +171,7 @@ function registerDnsCli(program) {
|
|
|
171
171
|
allowFailure: true
|
|
172
172
|
});
|
|
173
173
|
mkdirSudoIfNeeded(confDir);
|
|
174
|
-
if (!
|
|
174
|
+
if (!syncFs.existsSync(corefilePath)) {
|
|
175
175
|
writeFileSudoIfNeeded(corefilePath, `import ${importGlob}\n`);
|
|
176
176
|
} else {
|
|
177
177
|
ensureImportLine(corefilePath, importGlob);
|
|
@@ -189,7 +189,7 @@ function registerDnsCli(program) {
|
|
|
189
189
|
``
|
|
190
190
|
].join("\n");
|
|
191
191
|
writeFileSudoIfNeeded(serverPath, server);
|
|
192
|
-
await
|
|
192
|
+
await syncFs.promises.mkdir(path.dirname(zonePath), { recursive: true });
|
|
193
193
|
if (zoneFileNeedsBootstrap(zonePath)) {
|
|
194
194
|
const y = new Date().getUTCFullYear();
|
|
195
195
|
const m = String(new Date().getUTCMonth() + 1).padStart(2, "0");
|
|
@@ -205,7 +205,7 @@ function registerDnsCli(program) {
|
|
|
205
205
|
tailnetIPv6 ? `ns1 IN AAAA ${tailnetIPv6}` : null,
|
|
206
206
|
``
|
|
207
207
|
].filter((line) => Boolean(line));
|
|
208
|
-
|
|
208
|
+
syncFs.writeFileSync(zonePath, zoneLines.join("\n"), "utf-8");
|
|
209
209
|
}
|
|
210
210
|
defaultRuntime.log("");
|
|
211
211
|
defaultRuntime.log(theme.heading("Starting CoreDNS (sudo)…"));
|
|
@@ -5,7 +5,7 @@ import { resolveDefaultAgentWorkspaceDir } from "../../agents/workspace.js";
|
|
|
5
5
|
import { createConfigIO, writeConfigFile } from "../../config/io.js";
|
|
6
6
|
import "../../config/config.js";
|
|
7
7
|
import { handleReset } from "../../commands/onboard-helpers.js";
|
|
8
|
-
import
|
|
8
|
+
import syncFs from "node:fs";
|
|
9
9
|
import os from "node:os";
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ const DEV_AGENT_WORKSPACE_SUFFIX = "dev";
|
|
|
17
17
|
async function loadDevTemplate(name, fallback) {
|
|
18
18
|
try {
|
|
19
19
|
const templateDir = await resolveWorkspaceTemplateDir();
|
|
20
|
-
const raw = await
|
|
20
|
+
const raw = await syncFs.promises.readFile(path.join(templateDir, name), "utf-8");
|
|
21
21
|
if (!raw.startsWith("---")) {
|
|
22
22
|
return raw;
|
|
23
23
|
}
|
|
@@ -40,7 +40,7 @@ const resolveDevWorkspaceDir = (env = process.env) => {
|
|
|
40
40
|
};
|
|
41
41
|
async function writeFileIfMissing(filePath, content) {
|
|
42
42
|
try {
|
|
43
|
-
await
|
|
43
|
+
await syncFs.promises.writeFile(filePath, content, {
|
|
44
44
|
encoding: "utf-8",
|
|
45
45
|
flag: "wx"
|
|
46
46
|
});
|
|
@@ -53,7 +53,7 @@ async function writeFileIfMissing(filePath, content) {
|
|
|
53
53
|
}
|
|
54
54
|
async function ensureDevWorkspace(dir) {
|
|
55
55
|
const resolvedDir = resolveUserPath(dir);
|
|
56
|
-
await
|
|
56
|
+
await syncFs.promises.mkdir(resolvedDir, { recursive: true });
|
|
57
57
|
const [agents, soul, tools, identity, user] = await Promise.all([
|
|
58
58
|
loadDevTemplate("AGENTS.dev.md", `# AGENTS.md - FasedAgent Dev Workspace\n\nDefault dev workspace for fased gateway --dev.\n`),
|
|
59
59
|
loadDevTemplate("SOUL.dev.md", `# SOUL.md - Dev Persona\n\nProtocol droid for debugging and operations.\n`),
|
|
@@ -74,7 +74,7 @@ async function ensureDevGatewayConfig(opts) {
|
|
|
74
74
|
}
|
|
75
75
|
const io = createConfigIO();
|
|
76
76
|
const configPath = io.configPath;
|
|
77
|
-
const configExists =
|
|
77
|
+
const configExists = syncFs.existsSync(configPath);
|
|
78
78
|
if (!opts.reset && configExists) {
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
@@ -20,7 +20,7 @@ import { startGatewayServer } from "../../gateway/server.impl.js";
|
|
|
20
20
|
import "../../gateway/server.js";
|
|
21
21
|
import { ensureDevGatewayConfig } from "./dev.js";
|
|
22
22
|
import { runGatewayLoop } from "./run-loop.js";
|
|
23
|
-
import
|
|
23
|
+
import syncFs from "node:fs";
|
|
24
24
|
import path from "node:path";
|
|
25
25
|
|
|
26
26
|
//#region src/cli/gateway-cli/run.ts
|
|
@@ -145,7 +145,7 @@ async function runGatewayCommand(opts) {
|
|
|
145
145
|
const passwordRaw = toOptionString(opts.password);
|
|
146
146
|
const tokenRaw = toOptionString(opts.token);
|
|
147
147
|
const snapshot = await readConfigFileSnapshot().catch(() => null);
|
|
148
|
-
const configExists = snapshot?.exists ??
|
|
148
|
+
const configExists = snapshot?.exists ?? syncFs.existsSync(CONFIG_PATH);
|
|
149
149
|
const configAuditPath = path.join(resolveStateDir(process.env), "logs", "config-audit.jsonl");
|
|
150
150
|
const mode = cfg.gateway?.mode;
|
|
151
151
|
if (!opts.allowUnconfigured && mode !== "local") {
|
package/dist/cli/hooks-cli.js
CHANGED
|
@@ -14,9 +14,9 @@ import { buildWorkspaceHookStatus } from "../hooks/hooks-status.js";
|
|
|
14
14
|
import { installHooksFromNpmSpec, installHooksFromPath, resolveHookInstallDir } from "../hooks/install.js";
|
|
15
15
|
import { recordHookInstall } from "../hooks/installs.js";
|
|
16
16
|
import { buildNpmInstallRecordFields, resolvePinnedNpmInstallRecordForCli } from "./npm-resolution.js";
|
|
17
|
-
import
|
|
17
|
+
import syncFs from "node:fs";
|
|
18
18
|
import path from "node:path";
|
|
19
|
-
import fs
|
|
19
|
+
import fs from "node:fs/promises";
|
|
20
20
|
|
|
21
21
|
//#region src/cli/hooks-cli.ts
|
|
22
22
|
function mergeHookEntries(pluginEntries, workspaceEntries) {
|
|
@@ -139,7 +139,7 @@ function logIntegrityDriftWarning(hookId, drift) {
|
|
|
139
139
|
}
|
|
140
140
|
async function readInstalledPackageVersion(dir) {
|
|
141
141
|
try {
|
|
142
|
-
const raw = await fs
|
|
142
|
+
const raw = await fs.readFile(path.join(dir, "package.json"), "utf-8");
|
|
143
143
|
const parsed = JSON.parse(raw);
|
|
144
144
|
return typeof parsed.version === "string" ? parsed.version : undefined;
|
|
145
145
|
} catch {
|
|
@@ -430,9 +430,9 @@ function registerHooksCli(program) {
|
|
|
430
430
|
hooks.command("install").description("Install a hook pack (path, archive, or npm spec)").argument("<path-or-spec>", "Path to a hook pack or npm package spec").option("-l, --link", "Link a local path instead of copying", false).option("--pin", "Record npm installs as exact resolved <name>@<version>", false).action(async (raw, opts) => {
|
|
431
431
|
const resolved = resolveUserPath(raw);
|
|
432
432
|
const cfg = loadConfig();
|
|
433
|
-
if (
|
|
433
|
+
if (syncFs.existsSync(resolved)) {
|
|
434
434
|
if (opts.link) {
|
|
435
|
-
const stat =
|
|
435
|
+
const stat = syncFs.statSync(resolved);
|
|
436
436
|
if (!stat.isDirectory()) {
|
|
437
437
|
defaultRuntime.error("Linked hook paths must be directories.");
|
|
438
438
|
process.exit(1);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { resolvePluginStatusConfigPath } from "../../plugins/status-cache.js";
|
|
2
|
-
import
|
|
2
|
+
import syncFs from "node:fs";
|
|
3
3
|
|
|
4
4
|
//#region src/cli/lightweight/gateway-runtime-probe.ts
|
|
5
5
|
function readGatewayProbeConfig(configPath) {
|
|
6
6
|
try {
|
|
7
|
-
const parsed = JSON.parse(
|
|
7
|
+
const parsed = JSON.parse(syncFs.readFileSync(configPath, "utf8"));
|
|
8
8
|
const configuredPort = parsed.gateway?.port;
|
|
9
9
|
return {
|
|
10
10
|
port: typeof configuredPort === "number" && Number.isInteger(configuredPort) ? configuredPort : 18789,
|
package/dist/cli/memory-cli.js
CHANGED
|
@@ -17,10 +17,10 @@ import { formatDocsLink } from "../terminal/links.js";
|
|
|
17
17
|
import { withManager } from "./cli-utils.js";
|
|
18
18
|
import { formatHelpExamples } from "./help-format.js";
|
|
19
19
|
import { withProgress, withProgressTotals } from "./progress.js";
|
|
20
|
-
import
|
|
20
|
+
import syncFs from "node:fs";
|
|
21
21
|
import os from "node:os";
|
|
22
22
|
import path from "node:path";
|
|
23
|
-
import fs
|
|
23
|
+
import fs from "node:fs/promises";
|
|
24
24
|
|
|
25
25
|
//#region src/cli/memory-cli.ts
|
|
26
26
|
function formatSourceLabel(source, workspaceDir, agentId) {
|
|
@@ -74,7 +74,7 @@ async function withMemoryManagerForAgent(params) {
|
|
|
74
74
|
}
|
|
75
75
|
async function checkReadableFile(pathname) {
|
|
76
76
|
try {
|
|
77
|
-
await fs
|
|
77
|
+
await fs.access(pathname, syncFs.constants.R_OK);
|
|
78
78
|
return { exists: true };
|
|
79
79
|
} catch (err) {
|
|
80
80
|
const code = err.code;
|
|
@@ -91,7 +91,7 @@ async function scanSessionFiles(agentId) {
|
|
|
91
91
|
const issues = [];
|
|
92
92
|
const sessionsDir = resolveSessionTranscriptsDirForAgent(agentId);
|
|
93
93
|
try {
|
|
94
|
-
const entries = await fs
|
|
94
|
+
const entries = await fs.readdir(sessionsDir, { withFileTypes: true });
|
|
95
95
|
const totalFiles = entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).length;
|
|
96
96
|
return {
|
|
97
97
|
source: "sessions",
|
|
@@ -132,7 +132,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
132
132
|
const resolvedExtraPaths = normalizeExtraMemoryPaths(workspaceDir, extraPaths);
|
|
133
133
|
for (const extraPath of resolvedExtraPaths) {
|
|
134
134
|
try {
|
|
135
|
-
const stat = await fs
|
|
135
|
+
const stat = await fs.lstat(extraPath);
|
|
136
136
|
if (stat.isSymbolicLink()) {
|
|
137
137
|
continue;
|
|
138
138
|
}
|
|
@@ -151,7 +151,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
151
151
|
}
|
|
152
152
|
let dirReadable = null;
|
|
153
153
|
try {
|
|
154
|
-
await fs
|
|
154
|
+
await fs.access(memoryDir, syncFs.constants.R_OK);
|
|
155
155
|
dirReadable = true;
|
|
156
156
|
} catch (err) {
|
|
157
157
|
const code = err.code;
|
|
@@ -210,7 +210,7 @@ async function summarizeQmdIndexArtifact(manager) {
|
|
|
210
210
|
}
|
|
211
211
|
let stat;
|
|
212
212
|
try {
|
|
213
|
-
stat = await fs
|
|
213
|
+
stat = await fs.stat(dbPath);
|
|
214
214
|
} catch (err) {
|
|
215
215
|
const code = err.code;
|
|
216
216
|
if (code === "ENOENT") {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolvePreferredFasedAgentTmpDir } from "../infra/tmp-fased-dir.js";
|
|
2
|
-
import
|
|
2
|
+
import syncFs from "node:fs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
|
|
5
5
|
//#region src/cli/nodes-media-utils.ts
|
|
@@ -18,7 +18,7 @@ function asBoolean(value) {
|
|
|
18
18
|
function resolveTempPathParts(opts) {
|
|
19
19
|
const tmpDir = opts.tmpDir ?? resolvePreferredFasedAgentTmpDir();
|
|
20
20
|
if (!opts.tmpDir) {
|
|
21
|
-
|
|
21
|
+
syncFs.mkdirSync(tmpDir, {
|
|
22
22
|
recursive: true,
|
|
23
23
|
mode: 448
|
|
24
24
|
});
|
package/dist/cli/plugins-cli.js
CHANGED
|
@@ -22,7 +22,7 @@ import "./plugins-config.js";
|
|
|
22
22
|
import { pluginDoctorCommand } from "./plugins-doctor-cli.js";
|
|
23
23
|
import { pluginInfoCommand } from "./plugins-info-cli.js";
|
|
24
24
|
import "./plugins-status-cli.js";
|
|
25
|
-
import
|
|
25
|
+
import syncFs from "node:fs";
|
|
26
26
|
import os from "node:os";
|
|
27
27
|
import path from "node:path";
|
|
28
28
|
|
|
@@ -428,7 +428,7 @@ function registerPluginsCli(program) {
|
|
|
428
428
|
const normalized = fileSpec && fileSpec.ok ? fileSpec.path : raw;
|
|
429
429
|
const resolved = resolveUserPath(normalized);
|
|
430
430
|
const cfg = loadConfig();
|
|
431
|
-
if (
|
|
431
|
+
if (syncFs.existsSync(resolved)) {
|
|
432
432
|
if (opts.link) {
|
|
433
433
|
const probe = await installPluginFromPath({
|
|
434
434
|
path: resolved,
|
|
@@ -18,7 +18,7 @@ import "../../commands/agents.js";
|
|
|
18
18
|
|
|
19
19
|
//#region src/cli/program/register.agent.ts
|
|
20
20
|
function registerAgentCommands(program, args) {
|
|
21
|
-
program.command("agent").description("Run an agent turn via the Gateway (use --local for embedded)").requiredOption("-m, --message <text>", "Message body for the agent").option("-t, --to <number>", "Recipient number in E.164 used to derive the session key").option("--session-id <id>", "Use an explicit session id").option("--agent <id>", "Agent id (overrides routing bindings)").option("--thinking <level>", "Thinking level: off | minimal | low | medium | high").option("--verbose <on|off>", "Persist agent verbose level for the session").option("--channel <channel>", `Delivery channel: ${args.agentChannelOptions} (omit to use the main session channel)`).option("--reply-to <target>", "Delivery target override (separate from session routing)").option("--reply-channel <channel>", "Delivery channel override (separate from routing)").option("--reply-account <id>", "Delivery account id override").option("--local", "Run the embedded agent locally (requires model provider API keys in your shell)", false).option("--deliver", "Send the agent's reply back to the selected channel", false).option("--json", "Output result as JSON", false).option("--timeout <seconds>", "Override agent command timeout (seconds, default 600 or config value)").addHelpText("after", () => `
|
|
21
|
+
program.command("agent").description("Run an agent turn via the Gateway (use --local for embedded)").requiredOption("-m, --message <text>", "Message body for the agent").option("-t, --to <number>", "Recipient number in E.164 used to derive the session key").option("--session-id <id>", "Use an explicit session id").option("--agent <id>", "Agent id (overrides routing bindings)").option("--thinking <level>", "Thinking level: off | minimal | low | medium | high | xhigh | max | ultra").option("--verbose <on|off>", "Persist agent verbose level for the session").option("--channel <channel>", `Delivery channel: ${args.agentChannelOptions} (omit to use the main session channel)`).option("--reply-to <target>", "Delivery target override (separate from session routing)").option("--reply-channel <channel>", "Delivery channel override (separate from routing)").option("--reply-account <id>", "Delivery account id override").option("--local", "Run the embedded agent locally (requires model provider API keys in your shell)", false).option("--deliver", "Send the agent's reply back to the selected channel", false).option("--json", "Output result as JSON", false).option("--timeout <seconds>", "Override agent command timeout (seconds, default 600 or config value)").addHelpText("after", () => `
|
|
22
22
|
${theme.heading("Examples:")}
|
|
23
23
|
${formatHelpExamples([
|
|
24
24
|
["fased agent --to +15555550123 --message \"status update\"", "Start a new session."],
|
|
@@ -5,8 +5,8 @@ import { loadAuthProfileStoreForRuntime } from "../agents/auth-profiles/store.js
|
|
|
5
5
|
import { loadConfig, writeConfigFile } from "../config/io.js";
|
|
6
6
|
import "../config/config.js";
|
|
7
7
|
import "../agents/auth-profiles.js";
|
|
8
|
-
import { createClackPrompter } from "../wizard/clack-prompter.js";
|
|
9
8
|
import { applyProviderRefreshToRegistrySource, buildProviderCapabilityOverridesSource, buildProviderRefreshEnvFromCredentials, buildProviderRefreshReport, buildProviderRegistryReviewPatch, fetchOfficialProviderRefreshSnapshot, loadProviderRefreshSnapshotFromFile } from "../providers/refresh.js";
|
|
9
|
+
import { createClackPrompter } from "../wizard/clack-prompter.js";
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
12
12
|
|
|
@@ -284,7 +284,8 @@ async function applyRegistryRefresh(report) {
|
|
|
284
284
|
} catch {
|
|
285
285
|
existingCapabilities = "";
|
|
286
286
|
}
|
|
287
|
-
const
|
|
287
|
+
const normalizeCapabilityTimestamps = (source) => source.replace(/refreshedAt: "[^"]+",/g, "refreshedAt: \"<reviewed-at>\",");
|
|
288
|
+
const capabilitiesChanged = normalizeCapabilityTimestamps(capabilitiesSource) !== normalizeCapabilityTimestamps(existingCapabilities);
|
|
288
289
|
if (capabilitiesChanged) {
|
|
289
290
|
await writeFile(CAPABILITIES_PATH, capabilitiesSource, "utf8");
|
|
290
291
|
}
|
package/dist/cli/secrets-cli.js
CHANGED
|
@@ -7,12 +7,12 @@ import { isSecretsApplyPlan } from "../secrets/plan.js";
|
|
|
7
7
|
import { runSecretsApply } from "../secrets/apply.js";
|
|
8
8
|
import { resolveSecretsAuditExitCode, runSecretsAudit } from "../secrets/audit.js";
|
|
9
9
|
import { runSecretsConfigureInteractive } from "../secrets/configure.js";
|
|
10
|
-
import
|
|
10
|
+
import syncFs from "node:fs";
|
|
11
11
|
import { confirm } from "@clack/prompts";
|
|
12
12
|
|
|
13
13
|
//#region src/cli/secrets-cli.ts
|
|
14
14
|
function readPlanFile(pathname) {
|
|
15
|
-
const raw =
|
|
15
|
+
const raw = syncFs.readFileSync(pathname, "utf8");
|
|
16
16
|
const parsed = JSON.parse(raw);
|
|
17
17
|
if (!isSecretsApplyPlan(parsed)) {
|
|
18
18
|
throw new Error(`Invalid secrets plan file: ${pathname}`);
|
|
@@ -71,7 +71,7 @@ function registerSecretsCli(program) {
|
|
|
71
71
|
skipProviderSetup: Boolean(opts.skipProviderSetup)
|
|
72
72
|
});
|
|
73
73
|
if (opts.planOut) {
|
|
74
|
-
|
|
74
|
+
syncFs.writeFileSync(opts.planOut, `${JSON.stringify(configured.plan, null, 2)}\n`, "utf8");
|
|
75
75
|
}
|
|
76
76
|
if (opts.json) {
|
|
77
77
|
defaultRuntime.log(JSON.stringify({
|
package/dist/cli/windows-argv.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import syncFs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
|
|
4
4
|
//#region src/cli/windows-argv.ts
|
|
@@ -33,7 +33,7 @@ function normalizeWindowsArgv(argv) {
|
|
|
33
33
|
return false;
|
|
34
34
|
}
|
|
35
35
|
const lower = normalized.toLowerCase();
|
|
36
|
-
return lower === execPathLower || path.basename(lower) === execBase || lower.endsWith("\\node.exe") || lower.endsWith("/node.exe") || lower.includes("node.exe") || path.basename(lower) === "node.exe" &&
|
|
36
|
+
return lower === execPathLower || path.basename(lower) === execBase || lower.endsWith("\\node.exe") || lower.endsWith("/node.exe") || lower.includes("node.exe") || path.basename(lower) === "node.exe" && syncFs.existsSync(normalized);
|
|
37
37
|
};
|
|
38
38
|
const next = [...argv];
|
|
39
39
|
for (let i = 1; i <= 3 && i < next.length;) {
|
package/dist/commands/agent.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { formatThinkingLevels, formatXHighModelHint, normalizeThinkLevel, supportsXHighThinking } from "../shared/model-thinking.js";
|
|
1
|
+
import { formatThinkingLevels, formatXHighModelHint, normalizeThinkLevel, supportsThinkingLevel, supportsXHighThinking } from "../shared/model-thinking.js";
|
|
2
2
|
import { normalizeVerboseLevel } from "../auto-reply/thinking.js";
|
|
3
3
|
import { defaultRuntime } from "../runtime.js";
|
|
4
4
|
import { normalizeAgentId, resolveAgentIdFromSessionKey } from "../routing/session-key.js";
|
|
@@ -19,6 +19,7 @@ import { resolveAndPersistSessionFile } from "../config/sessions/session-file.js
|
|
|
19
19
|
import { parseSessionThreadInfo } from "../config/sessions/delivery-info.js";
|
|
20
20
|
import "../config/sessions.js";
|
|
21
21
|
import { resolveMessageChannel } from "../utils/message-channel.js";
|
|
22
|
+
import { buildCredentialScopedAllowedModelSet } from "../agents/model-catalog-access.js";
|
|
22
23
|
import { clearAgentRunContext, emitAgentEvent, registerAgentRunContext } from "../infra/agent-events.js";
|
|
23
24
|
import { AGENT_LANE_SUBAGENT } from "../agents/lanes.js";
|
|
24
25
|
import { buildOutboundSessionContext } from "../infra/outbound/session-context.js";
|
|
@@ -26,10 +27,9 @@ import { resolveSendPolicy } from "../sessions/send-policy.js";
|
|
|
26
27
|
import { toAcpRuntimeError } from "../acp/runtime/errors.js";
|
|
27
28
|
import { getAcpSessionManager } from "../acp/control-plane/manager.js";
|
|
28
29
|
import { resolveAcpAgentPolicyError, resolveAcpDispatchPolicyError } from "../acp/policy.js";
|
|
30
|
+
import { loadModelCatalog } from "../agents/model-catalog.js";
|
|
29
31
|
import { runWithModelFallback } from "../agents/model-fallback.js";
|
|
30
32
|
import { applyModelOverrideToSessionEntry } from "../sessions/model-overrides.js";
|
|
31
|
-
import { buildCredentialScopedAllowedModelSet } from "../agents/model-catalog-access.js";
|
|
32
|
-
import { loadModelCatalog } from "../agents/model-catalog.js";
|
|
33
33
|
import { buildWorkspaceSkillSnapshot } from "../agents/skills/workspace.js";
|
|
34
34
|
import "../agents/skills.js";
|
|
35
35
|
import { getSkillsSnapshotVersion } from "../agents/skills/refresh-state.js";
|
|
@@ -492,6 +492,25 @@ async function agentCommand(opts, runtime = defaultRuntime, deps = createDefault
|
|
|
492
492
|
});
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
+
if ((resolvedThinkLevel === "max" || resolvedThinkLevel === "ultra") && !supportsThinkingLevel(provider, model, resolvedThinkLevel)) {
|
|
496
|
+
const explicitThink = Boolean(thinkOnce || thinkOverride);
|
|
497
|
+
if (explicitThink) {
|
|
498
|
+
throw new Error(`Thinking level "${resolvedThinkLevel}" is not supported for ${provider}/${model}. Supported levels: ${formatThinkingLevels(provider, model)}.`);
|
|
499
|
+
}
|
|
500
|
+
const unsupportedLevel = resolvedThinkLevel;
|
|
501
|
+
resolvedThinkLevel = "high";
|
|
502
|
+
if (sessionEntry && sessionStore && sessionKey && sessionEntry.thinkingLevel === unsupportedLevel) {
|
|
503
|
+
const entry = sessionEntry;
|
|
504
|
+
entry.thinkingLevel = "high";
|
|
505
|
+
entry.updatedAt = Date.now();
|
|
506
|
+
await persistSessionEntry({
|
|
507
|
+
sessionStore,
|
|
508
|
+
sessionKey,
|
|
509
|
+
storePath,
|
|
510
|
+
entry
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
}
|
|
495
514
|
const sessionPathOpts = resolveSessionFilePathOptions({
|
|
496
515
|
agentId: sessionAgentId,
|
|
497
516
|
storePath
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CLOUDFLARE_AI_GATEWAY_DEFAULT_MODEL_REF } from "../providers/cloudflare-ai-gateway-shared.js";
|
|
2
|
-
import { LITELLM_DEFAULT_MODEL_REF } from "../providers/litellm-models.js";
|
|
3
2
|
import { SYNTHETIC_DEFAULT_MODEL_REF } from "../providers/synthetic-models.js";
|
|
4
3
|
import { TOGETHER_DEFAULT_MODEL_REF } from "../providers/together-models.js";
|
|
5
4
|
import { VENICE_DEFAULT_MODEL_REF } from "../providers/venice-models.js";
|
|
@@ -14,7 +13,7 @@ import { createAuthChoiceAgentModelNoter, createAuthChoiceDefaultModelApplier, c
|
|
|
14
13
|
import { KIMI_CODING_MODEL_REF, MISTRAL_DEFAULT_MODEL_REF, MOONSHOT_DEFAULT_MODEL_REF, QIANFAN_DEFAULT_MODEL_REF } from "./onboard-auth.models.js";
|
|
15
14
|
import { XIAOMI_DEFAULT_MODEL_REF, ZAI_DEFAULT_MODEL_REF, setChutesApiKey, setCloudflareAiGatewayConfig, setGeminiApiKey, setKimiCodingApiKey, setLitellmApiKey, setMistralApiKey, setMoonshotApiKey, setOpencodeZenApiKey, setQianfanApiKey, setQwenApiKey, setQwenCodingPlanApiKey, setSyntheticApiKey, setTogetherApiKey, setVeniceApiKey, setVercelAiGatewayApiKey, setXiaomiApiKey, setZaiApiKey } from "./onboard-auth.credentials.js";
|
|
16
15
|
import { applyCloudflareAiGatewayConfig, applyCloudflareAiGatewayProviderConfig, applyVercelAiGatewayConfig, applyVercelAiGatewayProviderConfig } from "./onboard-auth.config-gateways.js";
|
|
17
|
-
import {
|
|
16
|
+
import { applyLitellmProviderConfig } from "./onboard-auth.config-litellm.js";
|
|
18
17
|
import { applyAuthProfileConfig, applyChutesConfig, applyChutesProviderConfig, applyKimiCodeConfig, applyKimiCodeProviderConfig, applyMistralConfig, applyMistralProviderConfig, applyMoonshotConfig, applyMoonshotConfigCn, applyMoonshotProviderConfig, applyMoonshotProviderConfigCn, applyQianfanConfig, applyQianfanProviderConfig, applyQwenCodingPlanConfig, applyQwenCodingPlanProviderConfig, applyQwenConfig, applyQwenProviderConfig, applySyntheticConfig, applySyntheticProviderConfig, applyTogetherConfig, applyTogetherProviderConfig, applyVeniceConfig, applyVeniceProviderConfig, applyXiaomiConfig, applyXiaomiProviderConfig, applyZaiConfig, applyZaiProviderConfig } from "./onboard-auth.config-core.js";
|
|
19
18
|
import { applyOpencodeZenConfig, applyOpencodeZenProviderConfig } from "./onboard-auth.config-opencode.js";
|
|
20
19
|
import "./onboard-auth.js";
|
|
@@ -342,12 +341,8 @@ async function applyAuthChoiceApiProviders(params) {
|
|
|
342
341
|
mode: "api_key"
|
|
343
342
|
});
|
|
344
343
|
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
applyDefaultConfig: applyLitellmConfig,
|
|
348
|
-
applyProviderConfig: applyLitellmProviderConfig,
|
|
349
|
-
noteDefault: LITELLM_DEFAULT_MODEL_REF
|
|
350
|
-
});
|
|
344
|
+
nextConfig = applyLitellmProviderConfig(nextConfig);
|
|
345
|
+
await params.prompter.note("LiteLLM is connected. Choose a model returned by this proxy after discovery completes.", "LiteLLM model discovery");
|
|
351
346
|
return {
|
|
352
347
|
config: nextConfig,
|
|
353
348
|
agentModelOverride
|
|
@@ -6,7 +6,7 @@ import { isRemoteEnvironment } from "./oauth-env.js";
|
|
|
6
6
|
import { setOpenaiApiKey, writeOAuthCredentials } from "./onboard-auth.credentials.js";
|
|
7
7
|
import { applyAuthProfileConfig } from "./onboard-auth.config-core.js";
|
|
8
8
|
import "./onboard-auth.js";
|
|
9
|
-
import {
|
|
9
|
+
import { applyOpenAICodexModelDefault, discoverOpenAICodexDefaultModel } from "./openai-codex-model-default.js";
|
|
10
10
|
import { loginOpenAICodexOAuth } from "./openai-codex-oauth.js";
|
|
11
11
|
import { OPENAI_DEFAULT_MODEL, applyOpenAIConfig, applyOpenAIProviderConfig } from "./openai-model-default.js";
|
|
12
12
|
|
|
@@ -88,15 +88,21 @@ async function applyAuthChoiceOpenAI(params) {
|
|
|
88
88
|
provider: "openai-codex",
|
|
89
89
|
mode: "oauth"
|
|
90
90
|
});
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
const discoveredModel = await discoverOpenAICodexDefaultModel({
|
|
92
|
+
config: nextConfig,
|
|
93
|
+
agentDir: params.agentDir
|
|
94
|
+
});
|
|
95
|
+
if (params.setDefaultModel && discoveredModel) {
|
|
96
|
+
const applied = applyOpenAICodexModelDefault(nextConfig, discoveredModel);
|
|
93
97
|
nextConfig = applied.next;
|
|
94
98
|
if (applied.changed) {
|
|
95
|
-
await params.prompter.note(`Default model set to ${
|
|
99
|
+
await params.prompter.note(`Default model set to ${discoveredModel}`, "Model configured");
|
|
96
100
|
}
|
|
97
|
-
} else {
|
|
98
|
-
agentModelOverride =
|
|
99
|
-
await noteAgentModel(
|
|
101
|
+
} else if (!params.setDefaultModel && discoveredModel) {
|
|
102
|
+
agentModelOverride = discoveredModel;
|
|
103
|
+
await noteAgentModel(discoveredModel);
|
|
104
|
+
} else if (!discoveredModel) {
|
|
105
|
+
await params.prompter.note("Sign-in completed, but the authenticated runtime did not return an executable model. Refresh Agent > Models or run `fased models list --all --provider openai-codex`.", "No sign-in model available");
|
|
100
106
|
}
|
|
101
107
|
}
|
|
102
108
|
return {
|
|
@@ -4,7 +4,6 @@ import "../agents/auth-profiles.js";
|
|
|
4
4
|
import { getCustomProviderApiKey, resolveEnvApiKey } from "../agents/model-auth.js";
|
|
5
5
|
import { resolveDefaultModelForAgent } from "../agents/model-selection.js";
|
|
6
6
|
import { loadModelCatalog } from "../agents/model-catalog.js";
|
|
7
|
-
import { OPENAI_CODEX_DEFAULT_MODEL } from "./openai-codex-model-default.js";
|
|
8
7
|
|
|
9
8
|
//#region src/commands/auth-choice.model-check.ts
|
|
10
9
|
async function warnIfModelConfigLooksOff(config, prompter, options) {
|
|
@@ -33,7 +32,7 @@ async function warnIfModelConfigLooksOff(config, prompter, options) {
|
|
|
33
32
|
if (ref.provider === "openai") {
|
|
34
33
|
const hasCodex = listProfilesForProvider(store, "openai-codex").length > 0;
|
|
35
34
|
if (hasCodex) {
|
|
36
|
-
warnings.push(
|
|
35
|
+
warnings.push("Detected OpenAI sign-in. Choose a model returned by `fased models list --all --provider openai-codex`.");
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
38
|
if (warnings.length > 0) {
|