@fased/fased 0.1.56 → 0.1.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/bash-tools.shared.js +2 -2
- package/dist/agents/cli-credentials.js +4 -4
- 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-snapshot.js +124 -0
- package/dist/agents/openai-codex-app-server.js +35 -10
- package/dist/agents/openai-codex-runtime-component.js +39 -0
- package/dist/agents/pi-embedded-runner/compact.js +1 -1
- package/dist/agents/pi-embedded-runner/extra-params.js +28 -16
- package/dist/agents/pi-embedded-runner/run/attempt.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/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/session-status-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/post-compaction-audit.js +3 -3
- package/dist/auto-reply/reply/post-compaction-context.js +3 -3
- package/dist/auto-reply/reply/session.js +3 -3
- package/dist/auto-reply/skill-commands.js +3 -3
- package/dist/auto-reply/status.js +6 -6
- package/dist/brand.js +1 -1
- package/dist/browser/chrome.executables.js +3 -3
- package/dist/browser/chrome.js +3 -3
- package/dist/browser/chrome.profile-decoration.js +6 -6
- 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/capabilities/install.js +43 -0
- 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/components-cli.js +9 -31
- 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 +6 -6
- 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 +5 -5
- package/dist/cli/secrets-cli.js +3 -3
- package/dist/cli/update-cli/update-command.js +50 -12
- package/dist/cli/windows-argv.js +2 -2
- package/dist/commands/agent.js +1 -1
- package/dist/commands/auth-choice.apply.openai.js +9 -0
- package/dist/commands/auth-choice.apply.plugin-provider.js +1 -1
- package/dist/commands/dashboard-link.js +3 -3
- 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/managed-up.js +2 -2
- package/dist/commands/onboard-auth.credentials.js +3 -3
- package/dist/commands/onboard-channels.js +1 -1
- package/dist/commands/onboarding/plugin-install.js +4 -4
- 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/control-ui/assets/{app-D7TXyNRi.js → app-DltSyY4Y.js} +1689 -1689
- package/dist/control-ui/assets/{index-BmSBom-w.js → index-D5JlBp7f.js} +3 -3
- package/dist/control-ui/index.html +1 -1
- package/dist/control-ui/version.json +1 -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/thread-bindings.state.js +2 -2
- package/dist/extensions/sat-mining/src/sat-bond-layout.js +9 -9
- 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 +9 -9
- package/dist/gateway/hooks-mapping.js +4 -4
- package/dist/gateway/protocol/schema/agents-models-skills.js +43 -1
- 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/hooks.js +1 -1
- package/dist/gateway/server-methods/models.js +12 -5
- package/dist/gateway/server-methods/plugins-marketplace.js +3 -3
- package/dist/gateway/server-methods/services.js +1 -1
- package/dist/gateway/server-methods/sessions.js +7 -7
- package/dist/gateway/server-methods/usage.js +2 -2
- 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 +1 -1
- 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/widearea-dns.js +3 -3
- package/dist/infra/wsl.js +2 -2
- package/dist/light-update-status.js +11 -11
- 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/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-DzWlKv1U.js → accounts-CmMwe9Dt.js} +1 -1
- package/dist/plugin-sdk/{actions-BplQVLL6.js → actions-DYViFQiX.js} +2 -2
- package/dist/plugin-sdk/{active-listener-x4MLhYUw.js → active-listener-DVbpcisf.js} +1 -1
- package/dist/plugin-sdk/{agent-scope-BbgPlhtw.js → agent-scope-CCjfjKoO.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-G8h3Sn8_.js → audio-preflight-D-Mfay8i.js} +31 -31
- package/dist/plugin-sdk/{audit-CWknklvI.js → audit-JImYFOzJ.js} +1 -1
- package/dist/plugin-sdk/{channel-access-configure-CD4QDN5E.js → channel-access-configure-B_qYjml8.js} +1 -1
- package/dist/plugin-sdk/{channel-access-a9Dnfw7-.js → channel-access-cxCK2mci.js} +1 -1
- package/dist/plugin-sdk/channel-plugin-common.d.ts +2 -2
- package/dist/plugin-sdk/channel-plugin-common.js +5 -5
- package/dist/plugin-sdk/{chunk-B8EZkwiT.js → chunk-CF8nvZNj.js} +1 -1
- package/dist/plugin-sdk/{chunk-items-CEPklxGe.js → chunk-items-yLFoO571.js} +1 -1
- package/dist/plugin-sdk/command-status.js +31 -31
- package/dist/plugin-sdk/{commands-registry-BfEa4tFA.js → commands-registry-CK4KmMG0.js} +2 -2
- package/dist/plugin-sdk/{common-CbfckC19.js → common-Cky4hpqr.js} +1 -1
- package/dist/plugin-sdk/{config-Bt5GhnA-.js → config-Dbxj_jUP.js} +1125 -3
- package/dist/plugin-sdk/{config-schema-B9DKr6J5.js → config-schema-aKPMn6ML.js} +1749 -1387
- package/dist/plugin-sdk/device-pair.d.ts +1 -1
- package/dist/plugin-sdk/discord.d.ts +4 -4
- package/dist/plugin-sdk/discord.js +22 -22
- package/dist/plugin-sdk/{filesystem-manager-BGGGrkiN.js → filesystem-manager-ZoHU8oA7.js} +2 -2
- package/dist/plugin-sdk/{fs-safe-xBqok6yR.js → fs-safe-g4g7GT02.js} +2 -2
- package/dist/plugin-sdk/{handle-action-DbzZFYnG.js → handle-action-BSNDD2Vc.js} +17 -17
- package/dist/plugin-sdk/{helpers-CluGKuIV.js → helpers-CDo2XBSr.js} +1 -1
- package/dist/plugin-sdk/{image-ops-CUaLtIFj.js → image-ops-DbeBxbn4.js} +1 -1
- package/dist/plugin-sdk/index.d.ts +15 -15
- package/dist/plugin-sdk/index.js +33 -33
- package/dist/plugin-sdk/json-store.js +6 -6
- package/dist/plugin-sdk/{login-DJuHYDiK.js → login-CWXvFTd8.js} +3 -3
- package/dist/plugin-sdk/{login-qr-CbHL5ayf.js → login-qr-CJB2zjmM.js} +4 -4
- package/dist/plugin-sdk/{manager-oHAvZCT3.js → manager-CbiFFLKS.js} +4 -4
- package/dist/plugin-sdk/{markdown-tables-Mkx7k92Y.js → markdown-tables-Bskt9r8i.js} +1 -1
- package/dist/plugin-sdk/{media-CA8sTmVE.js → media-B3aAg5rh.js} +4 -4
- package/dist/plugin-sdk/{memory-search-VFll-AIb.js → memory-search-DTjIMw8J.js} +1 -1
- package/dist/plugin-sdk/{monitor-CZrN9pev.js → monitor-BJs6z7AT.js} +35 -35
- package/dist/plugin-sdk/{monitor-CmwGqNyV.js → monitor-BYGbTI5V.js} +36 -36
- package/dist/plugin-sdk/{openresponses-http-CWOd4war.js → openresponses-http-BGCl2dS2.js} +31 -31
- package/dist/plugin-sdk/{optional-runtime-dependency-DKmk9PZa.js → optional-runtime-dependency-BlTVkcAg.js} +1 -1
- package/dist/plugin-sdk/{outbound-0oN9IfNw.js → outbound-CIemga5_.js} +6 -6
- package/dist/plugin-sdk/{outbound-attachment-DdVkqUzE.js → outbound-attachment-2RckWqrk.js} +2 -2
- package/dist/plugin-sdk/{pairing-message-BMkkS038.d.ts → pairing-message-C403mq4K.d.ts} +1 -1
- package/dist/plugin-sdk/{pairing-message-ClqhfCUk.js → pairing-message-r-VQfhFB.js} +1 -1
- package/dist/plugin-sdk/{pairing-store-B01mCSct.js → pairing-store-uPnLfGgB.js} +2 -2
- package/dist/plugin-sdk/{path-alias-guards-BJZD5JMJ.js → path-alias-guards-DjgDArrp.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-Buz0JC1Y.js → pi-model-discovery-BpEilAym.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-runtime-DuwuoteY.js → pi-model-discovery-runtime-DwNdFaz-.js} +3 -3
- package/dist/plugin-sdk/{probe--7xtfzMm.js → probe-CJb5uR8B.js} +1 -1
- package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +1 -1
- package/dist/plugin-sdk/{pw-ai-B0domrii.js → pw-ai-H7UgunQQ.js} +6 -6
- package/dist/plugin-sdk/{qmd-manager-CFFeM4Fl.js → qmd-manager-DSyx77KY.js} +1 -1
- package/dist/plugin-sdk/{replies-1macZ1mZ.js → replies-CKMwkH4G.js} +2 -2
- package/dist/plugin-sdk/{reply-prefix-ClpxvL_w.js → reply-prefix-CeVw7Mn2.js} +1 -1
- package/dist/plugin-sdk/{probe-xY3Ky0Tx.js → resolve-channels-_-nV-EK2.js} +3 -2
- package/dist/plugin-sdk/{resolve-outbound-target-BdH6LUoW.js → resolve-outbound-target-B68fSoGi.js} +1 -1
- package/dist/plugin-sdk/{resolve-route-CkNIKKEW.js → resolve-route-B8fOfihG.js} +2 -2
- package/dist/plugin-sdk/{retry-policy-9ybIh4Fq.js → retry-policy-B6GQldxB.js} +1 -1
- package/dist/plugin-sdk/{runtime-dependency-CIw9t7-k.js → runtime-dependency-DlqVSsSs.js} +4 -4
- package/dist/plugin-sdk/{runtime-Dy420wBu.js → runtime-nVJl3PlS.js} +4 -4
- package/dist/plugin-sdk/{sandbox-paths-w64tYl0v.js → sandbox-paths-Dx2lUqCu.js} +2 -2
- package/dist/plugin-sdk/sat-runtime.d.ts +2 -2
- package/dist/plugin-sdk/sat-runtime.js +31 -31
- package/dist/plugin-sdk/{send-BQUtCJFW.js → send-BCJ4hi3t.js} +8 -8
- package/dist/plugin-sdk/{send-DPJIIYAs.js → send-BHokB4TR.js} +6 -6
- package/dist/plugin-sdk/{send-2VcOMTN5.js → send-CPK_HlYW.js} +5 -5
- package/dist/plugin-sdk/{send-J4JWKP62.js → send-D3DQOg2a.js} +6 -6
- package/dist/plugin-sdk/{send-Dqes9tdU.js → send-hSu1HWms.js} +7 -7
- package/dist/plugin-sdk/{session-C_n2S5ub.js → session-DQ4Dr-mf.js} +2 -2
- package/dist/plugin-sdk/{skill-commands-B7wx9ax8.js → skill-commands-CmdoKLh_.js} +4 -4
- package/dist/plugin-sdk/{slack-BouRQG-W.js → slack-B70NHpMF.js} +47 -47
- package/dist/plugin-sdk/{slack-actions-CasHVtiq.js → slack-actions-fSmP981b.js} +14 -14
- package/dist/plugin-sdk/slack.d.ts +4 -4
- package/dist/plugin-sdk/slack.js +12 -12
- package/dist/plugin-sdk/{sticker-cache-BvGEUas3.js → sticker-cache-B4dG2sKU.js} +3 -3
- package/dist/plugin-sdk/{tables-CjlQJV4r.js → tables-EX4Hy-a-.js} +1 -1
- package/dist/plugin-sdk/{targets-QfP164Dh.js → targets-BeGUCGWK.js} +1 -1
- package/dist/plugin-sdk/{telegram-actions-CwYjV6Db.js → telegram-actions-CM8SJgc9.js} +34 -34
- package/dist/plugin-sdk/telegram.d.ts +4 -4
- package/dist/plugin-sdk/telegram.js +9 -9
- package/dist/plugin-sdk/{thread-bindings.lifecycle-DU4iX_Jr.js → thread-bindings.lifecycle-tHK_1mvp.js} +3 -3
- package/dist/plugin-sdk/{thread-bindings.state-BgYWFjNF.js → thread-bindings.state-D7xG1GHu.js} +2 -2
- package/dist/plugin-sdk/{tmp-fased-dir-BdFQvrvw.d.ts → tmp-fased-dir-Ouj58axY.d.ts} +1 -1
- package/dist/plugin-sdk/{types-BYDL6dQj.d.ts → types-B4hj6HgR.d.ts} +1 -1
- package/dist/plugin-sdk/{types-CLIvQaVg.d.ts → types-dWZFX1fk.d.ts} +2 -2
- package/dist/plugin-sdk/{web-D0yENDve.js → web-BFolfZ3i.js} +36 -36
- package/dist/plugin-sdk/{whatsapp-actions-BT2nPLyo.js → whatsapp-actions-CYmleHCz.js} +16 -16
- package/dist/plugin-sdk/{whatsapp-heartbeat-CiABSZ6G.js → whatsapp-heartbeat-BEwm4GK3.js} +2 -2
- package/dist/plugin-sdk/whatsapp.d.ts +9 -9
- package/dist/plugin-sdk/whatsapp.js +13 -13
- package/dist/plugin-sdk/{wsl-B_ojyEtC.js → wsl-BtMDzMv5.js} +3 -3
- package/dist/plugin-sdk/{zod-schema.providers-core-CIzCjXH9.d.ts → zod-schema.providers-core-FaYR6KdD.d.ts} +61 -61
- package/dist/plugins/bundled-dir.js +3 -3
- package/dist/plugins/discovery.js +11 -11
- package/dist/plugins/lifecycle.js +1 -1
- package/dist/plugins/loader.js +13 -13
- package/dist/plugins/manifest-registry.js +28 -2
- package/dist/plugins/manifest.js +6 -4
- package/dist/plugins/marketplace.js +1 -1
- package/dist/plugins/path-safety.js +3 -3
- package/dist/plugins/status-cache.js +9 -9
- package/dist/plugins/update.js +4 -4
- package/dist/plugins/web-search-install-catalog.js +3 -3
- package/dist/providers/openai-codex-model-discovery.js +11 -1
- package/dist/providers/runtime-model-catalog.js +2 -2
- 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/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/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.finalize.js +1 -1
- package/dist/wizard/onboarding.host-security.js +7 -7
- package/dist/wizard/onboarding.js +7 -7
- 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 +6 -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 +6 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +6 -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 +6 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +6 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +6 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +6 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
- package/dist/plugin-sdk/resolve-channels-CwB2_019.js +0 -4
- /package/dist/plugin-sdk/{resolve-users-Cxb5wpAQ.js → resolve-users-DN9VQBwv.js} +0 -0
package/dist/acp/client.js
CHANGED
|
@@ -2,7 +2,7 @@ import { isKnownCoreToolId } from "../agents/tool-catalog.js";
|
|
|
2
2
|
import { DANGEROUS_ACP_TOOLS } from "../security/dangerous-tools.js";
|
|
3
3
|
import { ensureFasedAgentCliOnPath } from "../infra/path-env.js";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
import
|
|
5
|
+
import fs from "node:fs";
|
|
6
6
|
import { homedir } from "node:os";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { spawn } from "node:child_process";
|
|
@@ -269,7 +269,7 @@ function resolveSelfEntryPath() {
|
|
|
269
269
|
try {
|
|
270
270
|
const here = fileURLToPath(import.meta.url);
|
|
271
271
|
const candidate = path.resolve(path.dirname(here), "..", "entry.js");
|
|
272
|
-
if (
|
|
272
|
+
if (fs.existsSync(candidate)) {
|
|
273
273
|
return candidate;
|
|
274
274
|
}
|
|
275
275
|
} catch {}
|
package/dist/acp/secret-file.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveUserPath } from "../utils.js";
|
|
2
|
-
import
|
|
2
|
+
import fs from "node:fs";
|
|
3
3
|
|
|
4
4
|
//#region src/acp/secret-file.ts
|
|
5
5
|
function readSecretFromFile(filePath, label) {
|
|
@@ -9,7 +9,7 @@ function readSecretFromFile(filePath, label) {
|
|
|
9
9
|
}
|
|
10
10
|
let raw = "";
|
|
11
11
|
try {
|
|
12
|
-
raw =
|
|
12
|
+
raw = fs.readFileSync(resolvedPath, "utf8");
|
|
13
13
|
} catch (err) {
|
|
14
14
|
throw new Error(`Failed to read ${label} file at ${resolvedPath}: ${String(err)}`, { cause: err });
|
|
15
15
|
}
|
|
@@ -6,7 +6,7 @@ import { parseAgentSessionKey } from "../sessions/session-key-utils.js";
|
|
|
6
6
|
import { DEFAULT_AGENT_ID, normalizeAgentId, resolveAgentIdFromSessionKey } from "../routing/session-key.js";
|
|
7
7
|
import { resolveEffectiveAgentSkillFilter } from "./skills/agent-filter.js";
|
|
8
8
|
import { resolveDefaultAgentWorkspaceDir } from "./workspace.js";
|
|
9
|
-
import
|
|
9
|
+
import fs from "node:fs";
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
|
|
12
12
|
//#region src/agents/agent-scope.ts
|
|
@@ -245,7 +245,7 @@ function normalizePathForComparison(input) {
|
|
|
245
245
|
const resolved = path.resolve(stripNullBytes(resolveUserPath(input)));
|
|
246
246
|
let normalized = resolved;
|
|
247
247
|
try {
|
|
248
|
-
normalized =
|
|
248
|
+
normalized = fs.realpathSync.native(resolved);
|
|
249
249
|
} catch {}
|
|
250
250
|
if (process.platform === "win32") {
|
|
251
251
|
return normalized.toLowerCase();
|
|
@@ -3,9 +3,9 @@ import { PATH_ALIAS_POLICIES } from "../infra/path-alias-guards.js";
|
|
|
3
3
|
import { writeFileWithinRoot } from "../infra/fs-safe.js";
|
|
4
4
|
import { applyUpdateHunk } from "./apply-patch-update.js";
|
|
5
5
|
import { assertSandboxPath, resolveSandboxInputPath } from "./sandbox-paths.js";
|
|
6
|
-
import
|
|
6
|
+
import fs from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
8
|
-
import fs from "node:fs/promises";
|
|
8
|
+
import fs$1 from "node:fs/promises";
|
|
9
9
|
import { Type } from "@sinclair/typebox";
|
|
10
10
|
|
|
11
11
|
//#region src/agents/apply-patch.ts
|
|
@@ -159,7 +159,7 @@ function resolvePatchFileOps(options) {
|
|
|
159
159
|
return {
|
|
160
160
|
readFile: async (filePath) => {
|
|
161
161
|
if (!workspaceOnly) {
|
|
162
|
-
return await fs.readFile(filePath, "utf8");
|
|
162
|
+
return await fs$1.readFile(filePath, "utf8");
|
|
163
163
|
}
|
|
164
164
|
const opened = await openBoundaryFile({
|
|
165
165
|
absolutePath: filePath,
|
|
@@ -168,14 +168,14 @@ function resolvePatchFileOps(options) {
|
|
|
168
168
|
});
|
|
169
169
|
assertBoundaryRead(opened, filePath);
|
|
170
170
|
try {
|
|
171
|
-
return
|
|
171
|
+
return fs.readFileSync(opened.fd, "utf8");
|
|
172
172
|
} finally {
|
|
173
|
-
|
|
173
|
+
fs.closeSync(opened.fd);
|
|
174
174
|
}
|
|
175
175
|
},
|
|
176
176
|
writeFile: async (filePath, content) => {
|
|
177
177
|
if (!workspaceOnly) {
|
|
178
|
-
await fs.writeFile(filePath, content, "utf8");
|
|
178
|
+
await fs$1.writeFile(filePath, content, "utf8");
|
|
179
179
|
return;
|
|
180
180
|
}
|
|
181
181
|
const relative = toRelativeWorkspacePath(options.cwd, filePath);
|
|
@@ -186,8 +186,8 @@ function resolvePatchFileOps(options) {
|
|
|
186
186
|
encoding: "utf8"
|
|
187
187
|
});
|
|
188
188
|
},
|
|
189
|
-
remove: (filePath) => fs.rm(filePath),
|
|
190
|
-
mkdirp: (dir) => fs.mkdir(dir, { recursive: true }).then(() => {})
|
|
189
|
+
remove: (filePath) => fs$1.rm(filePath),
|
|
190
|
+
mkdirp: (dir) => fs$1.mkdir(dir, { recursive: true }).then(() => {})
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
193
|
async function ensureDir(filePath, ops) {
|
|
@@ -2,7 +2,7 @@ import { resolveUserPath } from "../../utils.js";
|
|
|
2
2
|
import { saveJsonFile } from "../../infra/json-file.js";
|
|
3
3
|
import { AUTH_PROFILE_FILENAME, AUTH_STORE_VERSION, LEGACY_AUTH_FILENAME } from "./constants.js";
|
|
4
4
|
import { resolveFasedAgentAgentDir } from "../agent-paths.js";
|
|
5
|
-
import
|
|
5
|
+
import fs from "node:fs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
|
|
8
8
|
//#region src/agents/auth-profiles/paths.ts
|
|
@@ -19,7 +19,7 @@ function resolveAuthStorePathForDisplay(agentDir) {
|
|
|
19
19
|
return pathname.startsWith("~") ? pathname : resolveUserPath(pathname);
|
|
20
20
|
}
|
|
21
21
|
function ensureAuthStoreFile(pathname) {
|
|
22
|
-
if (
|
|
22
|
+
if (fs.existsSync(pathname)) {
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
const payload = {
|
|
@@ -5,7 +5,7 @@ import { withFileLock } from "../../plugin-sdk/file-lock.js";
|
|
|
5
5
|
import "../../infra/file-lock.js";
|
|
6
6
|
import { syncExternalCliCredentials } from "./external-cli-sync.js";
|
|
7
7
|
import { ensureAuthStoreFile, resolveAuthStorePath, resolveLegacyAuthStorePath } from "./paths.js";
|
|
8
|
-
import
|
|
8
|
+
import fs from "node:fs";
|
|
9
9
|
|
|
10
10
|
//#region src/agents/auth-profiles/store.ts
|
|
11
11
|
const AUTH_PROFILE_TYPES = new Set([
|
|
@@ -361,7 +361,7 @@ function loadAuthProfileStoreForAgent(agentDir, options) {
|
|
|
361
361
|
if (shouldWrite && legacy !== null) {
|
|
362
362
|
const legacyPath = resolveLegacyAuthStorePath(agentDir);
|
|
363
363
|
try {
|
|
364
|
-
|
|
364
|
+
fs.unlinkSync(legacyPath);
|
|
365
365
|
} catch (err) {
|
|
366
366
|
if (err?.code !== "ENOENT") {
|
|
367
367
|
log.warn("failed to delete legacy auth.json after migration", {
|
|
@@ -3,7 +3,7 @@ import { assertSandboxPath } from "./sandbox-paths.js";
|
|
|
3
3
|
import { existsSync, statSync } from "node:fs";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
5
|
import path from "node:path";
|
|
6
|
-
import fs from "node:fs/promises";
|
|
6
|
+
import fs$1 from "node:fs/promises";
|
|
7
7
|
|
|
8
8
|
//#region src/agents/bash-tools.shared.ts
|
|
9
9
|
const CHUNK_LIMIT = 8 * 1024;
|
|
@@ -67,7 +67,7 @@ async function resolveSandboxWorkdir(params) {
|
|
|
67
67
|
cwd: process.cwd(),
|
|
68
68
|
root: params.sandbox.workspaceDir
|
|
69
69
|
});
|
|
70
|
-
const stats = await fs.stat(resolved.resolved);
|
|
70
|
+
const stats = await fs$1.stat(resolved.resolved);
|
|
71
71
|
if (!stats.isDirectory()) {
|
|
72
72
|
throw new Error("workdir is not a directory");
|
|
73
73
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveUserPath } from "../utils.js";
|
|
2
2
|
import { createSubsystemLogger } from "../logging/subsystem.js";
|
|
3
3
|
import { loadJsonFile, saveJsonFile } from "../infra/json-file.js";
|
|
4
|
-
import
|
|
4
|
+
import fs from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { execFileSync, execSync } from "node:child_process";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
@@ -61,7 +61,7 @@ function resolveCodexHomePath() {
|
|
|
61
61
|
const configured = process.env.CODEX_HOME;
|
|
62
62
|
const home = configured ? resolveUserPath(configured) : resolveUserPath("~/.codex");
|
|
63
63
|
try {
|
|
64
|
-
return
|
|
64
|
+
return fs.realpathSync.native(home);
|
|
65
65
|
} catch {
|
|
66
66
|
return home;
|
|
67
67
|
}
|
|
@@ -264,7 +264,7 @@ function writeClaudeCliKeychainCredentials(newCredentials, options) {
|
|
|
264
264
|
}
|
|
265
265
|
function writeClaudeCliFileCredentials(newCredentials, options) {
|
|
266
266
|
const credPath = resolveClaudeCliCredentialsPath(options?.homeDir);
|
|
267
|
-
if (!
|
|
267
|
+
if (!fs.existsSync(credPath)) {
|
|
268
268
|
return false;
|
|
269
269
|
}
|
|
270
270
|
try {
|
|
@@ -331,7 +331,7 @@ function readCodexCliCredentials(options) {
|
|
|
331
331
|
}
|
|
332
332
|
let expires;
|
|
333
333
|
try {
|
|
334
|
-
const stat =
|
|
334
|
+
const stat = fs.statSync(authPath);
|
|
335
335
|
expires = stat.mtimeMs + 60 * 60 * 1e3;
|
|
336
336
|
} catch {
|
|
337
337
|
expires = Date.now() + 60 * 60 * 1e3;
|
package/dist/agents/docs-path.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveFasedAgentPackageRoot } from "../infra/fased-root.js";
|
|
2
|
-
import
|
|
2
|
+
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
|
|
5
5
|
//#region src/agents/docs-path.ts
|
|
@@ -7,7 +7,7 @@ async function resolveFasedAgentDocsPath(params) {
|
|
|
7
7
|
const workspaceDir = params.workspaceDir?.trim();
|
|
8
8
|
if (workspaceDir) {
|
|
9
9
|
const workspaceDocs = path.join(workspaceDir, "docs");
|
|
10
|
-
if (
|
|
10
|
+
if (fs.existsSync(workspaceDocs)) {
|
|
11
11
|
return workspaceDocs;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -20,7 +20,7 @@ async function resolveFasedAgentDocsPath(params) {
|
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
22
22
|
const packageDocs = path.join(packageRoot, "docs");
|
|
23
|
-
return
|
|
23
|
+
return fs.existsSync(packageDocs) ? packageDocs : null;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { STATE_DIR } from "../config/paths.js";
|
|
2
2
|
import { isRecord, resolveUserPath } from "../utils.js";
|
|
3
|
-
import
|
|
3
|
+
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
|
|
6
6
|
//#region src/agents/embedded-pi-mcp.ts
|
|
@@ -66,10 +66,10 @@ function readBundleMcpFile(params) {
|
|
|
66
66
|
if (relative.startsWith("..") || path.isAbsolute(relative)) {
|
|
67
67
|
return {};
|
|
68
68
|
}
|
|
69
|
-
if (!
|
|
69
|
+
if (!fs.existsSync(filePath)) {
|
|
70
70
|
return {};
|
|
71
71
|
}
|
|
72
|
-
const raw = JSON.parse(
|
|
72
|
+
const raw = JSON.parse(fs.readFileSync(filePath, "utf-8"));
|
|
73
73
|
const servers = extractMcpServerMap(raw);
|
|
74
74
|
const baseDir = path.dirname(filePath);
|
|
75
75
|
return Object.fromEntries(Object.entries(servers).map(([serverName, server]) => [serverName, absolutizeBundleMcpServer({
|
|
@@ -99,7 +99,7 @@ function loadEnabledBundleMcpConfig(params) {
|
|
|
99
99
|
cfg: params.cfg,
|
|
100
100
|
pluginId
|
|
101
101
|
})) {
|
|
102
|
-
if (!
|
|
102
|
+
if (!fs.existsSync(rootDir)) {
|
|
103
103
|
continue;
|
|
104
104
|
}
|
|
105
105
|
for (const fileName of BUNDLE_MCP_FILENAMES) {
|
|
@@ -3,7 +3,7 @@ import { resolveAgentWorkspaceDir } from "./agent-scope.js";
|
|
|
3
3
|
import { AVATAR_MAX_BYTES, isAvatarDataUrl, isAvatarHttpUrl, isPathWithinRoot, isSupportedLocalAvatarExtension } from "../shared/avatar-policy.js";
|
|
4
4
|
import { resolveAgentIdentity } from "./identity.js";
|
|
5
5
|
import { loadAgentIdentityFromWorkspace } from "./identity-file.js";
|
|
6
|
-
import
|
|
6
|
+
import fs from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
|
|
9
9
|
//#region src/agents/identity-avatar.ts
|
|
@@ -28,7 +28,7 @@ function resolveAvatarSource(cfg, agentId, opts) {
|
|
|
28
28
|
}
|
|
29
29
|
function resolveExistingPath(value) {
|
|
30
30
|
try {
|
|
31
|
-
return
|
|
31
|
+
return fs.realpathSync(value);
|
|
32
32
|
} catch {
|
|
33
33
|
return path.resolve(value);
|
|
34
34
|
}
|
|
@@ -51,7 +51,7 @@ function resolveLocalAvatarPath(params) {
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
try {
|
|
54
|
-
const stat =
|
|
54
|
+
const stat = fs.statSync(realPath);
|
|
55
55
|
if (!stat.isFile()) {
|
|
56
56
|
return {
|
|
57
57
|
ok: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_IDENTITY_FILENAME } from "./workspace.js";
|
|
2
|
-
import
|
|
2
|
+
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
|
|
5
5
|
//#region src/agents/identity-file.ts
|
|
@@ -67,7 +67,7 @@ function identityHasValues(identity) {
|
|
|
67
67
|
}
|
|
68
68
|
function loadIdentityFromFile(identityPath) {
|
|
69
69
|
try {
|
|
70
|
-
const content =
|
|
70
|
+
const content = fs.readFileSync(identityPath, "utf-8");
|
|
71
71
|
const parsed = parseIdentityMarkdown(content);
|
|
72
72
|
if (!identityHasValues(parsed)) {
|
|
73
73
|
return null;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { resolveAgentModelFallbackValues } from "../config/model-input.js";
|
|
2
|
+
import { resolveAgentEffectiveModelPrimary, resolveAgentModelFallbacksOverride } from "./agent-scope.js";
|
|
3
|
+
import { deriveModelMetadata } from "./model-metadata.js";
|
|
4
|
+
import { resolveAuthenticatedModelCatalog } from "./authenticated-model-catalog.js";
|
|
5
|
+
import { resolveTaskModelRole } from "../cron/task-model-roles.js";
|
|
6
|
+
|
|
7
|
+
//#region src/agents/model-catalog-snapshot.ts
|
|
8
|
+
const TASK_ROLES = [
|
|
9
|
+
"cheapCheck",
|
|
10
|
+
"strong",
|
|
11
|
+
"escalation",
|
|
12
|
+
"coding",
|
|
13
|
+
"summarizer"
|
|
14
|
+
];
|
|
15
|
+
function normalizeRef(value) {
|
|
16
|
+
const trimmed = value?.trim();
|
|
17
|
+
return trimmed || undefined;
|
|
18
|
+
}
|
|
19
|
+
function collectAssignments(params) {
|
|
20
|
+
const assignments = [];
|
|
21
|
+
const add = (role, ref) => {
|
|
22
|
+
const normalized = normalizeRef(ref);
|
|
23
|
+
if (normalized && !assignments.some((entry) => entry.role === role && entry.ref === normalized)) {
|
|
24
|
+
assignments.push({
|
|
25
|
+
role,
|
|
26
|
+
ref: normalized
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
add("primary", resolveAgentEffectiveModelPrimary(params.cfg, params.agentId));
|
|
31
|
+
const fallbacks = resolveAgentModelFallbacksOverride(params.cfg, params.agentId) ?? resolveAgentModelFallbackValues(params.cfg.agents?.defaults?.model);
|
|
32
|
+
for (const fallback of fallbacks) {
|
|
33
|
+
add("fallback", fallback);
|
|
34
|
+
}
|
|
35
|
+
for (const role of TASK_ROLES) {
|
|
36
|
+
add(role, resolveTaskModelRole({
|
|
37
|
+
cfg: params.cfg,
|
|
38
|
+
agentId: params.agentId,
|
|
39
|
+
role
|
|
40
|
+
})?.model);
|
|
41
|
+
}
|
|
42
|
+
return assignments;
|
|
43
|
+
}
|
|
44
|
+
function modelRef(model) {
|
|
45
|
+
return `${model.provider}/${model.id}`;
|
|
46
|
+
}
|
|
47
|
+
function buildProviderSummaries(models) {
|
|
48
|
+
const summaries = new Map();
|
|
49
|
+
for (const model of models) {
|
|
50
|
+
const providerId = model.metadata.publicProviderId;
|
|
51
|
+
const existing = summaries.get(providerId) ?? {
|
|
52
|
+
id: providerId,
|
|
53
|
+
label: model.metadata.publicProviderLabel,
|
|
54
|
+
routes: [],
|
|
55
|
+
credentialRoutes: [],
|
|
56
|
+
available: 0,
|
|
57
|
+
recommended: 0,
|
|
58
|
+
assigned: 0
|
|
59
|
+
};
|
|
60
|
+
if (!existing.routes.includes(model.provider)) {
|
|
61
|
+
existing.routes.push(model.provider);
|
|
62
|
+
}
|
|
63
|
+
for (const route of model.metadata.credentialRoutes) {
|
|
64
|
+
if (!existing.credentialRoutes.some((entry) => entry.id === route.id)) {
|
|
65
|
+
existing.credentialRoutes.push(route);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
existing.available += 1;
|
|
69
|
+
existing.recommended += model.recommended ? 1 : 0;
|
|
70
|
+
existing.assigned += model.assignedRoles.length > 0 ? 1 : 0;
|
|
71
|
+
summaries.set(providerId, existing);
|
|
72
|
+
}
|
|
73
|
+
return [...summaries.values()].map((summary) => ({
|
|
74
|
+
...summary,
|
|
75
|
+
routes: summary.routes.toSorted(),
|
|
76
|
+
credentialRoutes: summary.credentialRoutes.toSorted((left, right) => left.label.localeCompare(right.label))
|
|
77
|
+
})).toSorted((left, right) => left.label.localeCompare(right.label));
|
|
78
|
+
}
|
|
79
|
+
async function resolveCanonicalModelCatalogSnapshot(params) {
|
|
80
|
+
const authenticated = await resolveAuthenticatedModelCatalog({
|
|
81
|
+
cfg: params.cfg,
|
|
82
|
+
store: params.store,
|
|
83
|
+
catalog: params.catalog,
|
|
84
|
+
defaultProvider: params.defaultProvider,
|
|
85
|
+
agentDir: params.agentDir
|
|
86
|
+
});
|
|
87
|
+
const configuredAssignments = collectAssignments({
|
|
88
|
+
cfg: params.cfg,
|
|
89
|
+
agentId: params.agentId
|
|
90
|
+
});
|
|
91
|
+
const assignmentsByRef = new Map();
|
|
92
|
+
for (const assignment of configuredAssignments) {
|
|
93
|
+
assignmentsByRef.set(assignment.ref, [...assignmentsByRef.get(assignment.ref) ?? [], assignment.role]);
|
|
94
|
+
}
|
|
95
|
+
const availableRefs = new Set(authenticated.usableCatalog.map(modelRef));
|
|
96
|
+
const runnableRefs = new Set(authenticated.allowedCatalog.map(modelRef));
|
|
97
|
+
const models = authenticated.usableCatalog.map((model) => {
|
|
98
|
+
const metadata = model.metadata ?? deriveModelMetadata({
|
|
99
|
+
model,
|
|
100
|
+
cfg: params.cfg
|
|
101
|
+
});
|
|
102
|
+
return {
|
|
103
|
+
...model,
|
|
104
|
+
metadata,
|
|
105
|
+
available: true,
|
|
106
|
+
runnable: runnableRefs.size === 0 || runnableRefs.has(modelRef(model)),
|
|
107
|
+
recommended: metadata.recommended === true,
|
|
108
|
+
assignedRoles: assignmentsByRef.get(modelRef(model)) ?? []
|
|
109
|
+
};
|
|
110
|
+
}).toSorted((left, right) => left.metadata.publicProviderLabel.localeCompare(right.metadata.publicProviderLabel) || Number(right.recommended) - Number(left.recommended) || (left.metadata.recommendationRank ?? Number.MAX_SAFE_INTEGER) - (right.metadata.recommendationRank ?? Number.MAX_SAFE_INTEGER) || left.name.localeCompare(right.name));
|
|
111
|
+
return {
|
|
112
|
+
generatedAt: new Date().toISOString(),
|
|
113
|
+
agentId: params.agentId,
|
|
114
|
+
models,
|
|
115
|
+
providers: buildProviderSummaries(models),
|
|
116
|
+
assignments: configuredAssignments.map((assignment) => ({
|
|
117
|
+
...assignment,
|
|
118
|
+
available: availableRefs.has(assignment.ref)
|
|
119
|
+
}))
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
//#endregion
|
|
124
|
+
export { resolveCanonicalModelCatalogSnapshot };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { resolveFasedAgentPackageRootSync } from "../infra/fased-root.js";
|
|
1
2
|
import { resolvePluginInstallDir } from "../plugins/install.js";
|
|
2
|
-
import
|
|
3
|
+
import fs from "node:fs";
|
|
3
4
|
import os from "node:os";
|
|
4
5
|
import path from "node:path";
|
|
5
6
|
import { spawn } from "node:child_process";
|
|
@@ -42,30 +43,54 @@ function executableName() {
|
|
|
42
43
|
function codexExecutableCandidates() {
|
|
43
44
|
const configured = process.env.FASED_CODEX_BIN?.trim();
|
|
44
45
|
const componentRoot = resolvePluginInstallDir("openai-runtime");
|
|
46
|
+
const packageRoot = resolveFasedAgentPackageRootSync({
|
|
47
|
+
moduleUrl: import.meta.url,
|
|
48
|
+
argv1: process.argv[1],
|
|
49
|
+
cwd: process.cwd()
|
|
50
|
+
});
|
|
45
51
|
const candidates = [
|
|
46
52
|
configured,
|
|
47
53
|
path.join(componentRoot, "node_modules", ".bin", executableName()),
|
|
48
54
|
path.join(componentRoot, "node_modules", "@openai", "codex", "bin", executableName()),
|
|
49
|
-
"
|
|
55
|
+
packageRoot ? path.join(packageRoot, "extensions", "runtime-openai", "node_modules", ".bin", executableName()) : undefined
|
|
50
56
|
].filter((value) => Boolean(value));
|
|
51
57
|
return [...new Set(candidates)];
|
|
52
58
|
}
|
|
53
59
|
function resolveOpenAICodexExecutable() {
|
|
60
|
+
const explicitlyConfigured = process.env.FASED_CODEX_BIN?.trim();
|
|
54
61
|
for (const candidate of codexExecutableCandidates()) {
|
|
55
|
-
if (candidate === "codex") {
|
|
56
|
-
return candidate;
|
|
57
|
-
}
|
|
58
62
|
try {
|
|
59
|
-
if (
|
|
63
|
+
if (!fs.statSync(candidate).isFile()) {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (explicitlyConfigured && candidate === explicitlyConfigured) {
|
|
60
67
|
return candidate;
|
|
61
68
|
}
|
|
69
|
+
const resolved = fs.realpathSync(candidate);
|
|
70
|
+
let current = path.dirname(resolved);
|
|
71
|
+
for (let depth = 0; depth < 6; depth += 1) {
|
|
72
|
+
try {
|
|
73
|
+
const parsed = JSON.parse(fs.readFileSync(path.join(current, "package.json"), "utf8"));
|
|
74
|
+
if (parsed.name === "@openai/codex") {
|
|
75
|
+
if (parsed.version === OPENAI_CODEX_APP_SERVER_VERSION) {
|
|
76
|
+
return candidate;
|
|
77
|
+
}
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
} catch {}
|
|
81
|
+
const parent = path.dirname(current);
|
|
82
|
+
if (parent === current) {
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
current = parent;
|
|
86
|
+
}
|
|
62
87
|
} catch {}
|
|
63
88
|
}
|
|
64
89
|
return null;
|
|
65
90
|
}
|
|
66
91
|
function managedCodexHome() {
|
|
67
92
|
const directory = path.join(stateDir(), "runtime", "openai-codex");
|
|
68
|
-
|
|
93
|
+
fs.mkdirSync(directory, {
|
|
69
94
|
recursive: true,
|
|
70
95
|
mode: 448
|
|
71
96
|
});
|
|
@@ -228,7 +253,7 @@ function parseAppServerModels(value) {
|
|
|
228
253
|
});
|
|
229
254
|
}
|
|
230
255
|
async function listOpenAICodexAppServerModels(params) {
|
|
231
|
-
const executable = params.executable ?? resolveOpenAICodexExecutable();
|
|
256
|
+
const executable = params.executable ?? (params.resolveExecutable ? await params.resolveExecutable() : resolveOpenAICodexExecutable());
|
|
232
257
|
if (!executable) {
|
|
233
258
|
throw new Error("OpenAI sign-in runtime is not installed. Run `fased components install openai-runtime`.");
|
|
234
259
|
}
|
|
@@ -337,7 +362,7 @@ function createOpenAICodexAppServerStreamFn(params) {
|
|
|
337
362
|
if (!token) {
|
|
338
363
|
throw new Error("OpenAI ChatGPT sign-in is required");
|
|
339
364
|
}
|
|
340
|
-
const executable = resolveOpenAICodexExecutable();
|
|
365
|
+
const executable = params?.resolveExecutable ? await params.resolveExecutable() : resolveOpenAICodexExecutable();
|
|
341
366
|
if (!executable) {
|
|
342
367
|
throw new Error("OpenAI sign-in runtime is not installed. Run `fased components install openai-runtime`.");
|
|
343
368
|
}
|
|
@@ -496,4 +521,4 @@ const testing = {
|
|
|
496
521
|
};
|
|
497
522
|
|
|
498
523
|
//#endregion
|
|
499
|
-
export { createOpenAICodexAppServerStreamFn, listOpenAICodexAppServerModels };
|
|
524
|
+
export { createOpenAICodexAppServerStreamFn, listOpenAICodexAppServerModels, resolveOpenAICodexExecutable };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { VERSION } from "../version.js";
|
|
2
|
+
import { resolveOpenAICodexExecutable } from "./openai-codex-app-server.js";
|
|
3
|
+
import { installCapabilityComponent } from "../capabilities/install.js";
|
|
4
|
+
|
|
5
|
+
//#region src/agents/openai-codex-runtime-component.ts
|
|
6
|
+
const OPENAI_RUNTIME_COMPONENT_ID = "openai-runtime";
|
|
7
|
+
function hasConfiguredOpenAICodexProfile(config) {
|
|
8
|
+
return Object.values(config.auth?.profiles ?? {}).some((profile) => profile?.provider === "openai-codex");
|
|
9
|
+
}
|
|
10
|
+
async function ensureOpenAICodexRuntimeComponent(params) {
|
|
11
|
+
const resolveExecutable = params.resolveExecutable ?? resolveOpenAICodexExecutable;
|
|
12
|
+
const existing = resolveExecutable();
|
|
13
|
+
if (existing) {
|
|
14
|
+
return {
|
|
15
|
+
config: params.config,
|
|
16
|
+
executable: existing,
|
|
17
|
+
installed: false,
|
|
18
|
+
slotWarnings: []
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const installed = await (params.installComponent ?? installCapabilityComponent)({
|
|
22
|
+
id: OPENAI_RUNTIME_COMPONENT_ID,
|
|
23
|
+
config: params.config,
|
|
24
|
+
packageSpec: `@fased/openai-runtime@${params.version ?? VERSION}`
|
|
25
|
+
});
|
|
26
|
+
const executable = resolveExecutable();
|
|
27
|
+
if (!executable) {
|
|
28
|
+
throw new Error("OpenAI sign-in runtime installation completed without an executable. Run `fased components install openai-runtime` and retry.");
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
config: installed.config,
|
|
32
|
+
executable,
|
|
33
|
+
installed: true,
|
|
34
|
+
slotWarnings: installed.slotWarnings
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
export { OPENAI_RUNTIME_COMPONENT_ID, ensureOpenAICodexRuntimeComponent, hasConfiguredOpenAICodexProfile };
|
|
@@ -19,8 +19,8 @@ import { enqueueCommandInLane } from "../../process/command-queue.js";
|
|
|
19
19
|
import { resolveSignalReactionLevel } from "../../signal/reaction-level.js";
|
|
20
20
|
import { resolveTelegramInlineButtonsScope } from "../../telegram/inline-buttons.js";
|
|
21
21
|
import { resolveTelegramReactionLevel } from "../../telegram/reaction-level.js";
|
|
22
|
-
import { buildModelAliasLines } from "../model-alias-lines.js";
|
|
23
22
|
import { formatUserTime, resolveUserTimeFormat, resolveUserTimezone } from "../date-time.js";
|
|
23
|
+
import { buildModelAliasLines } from "../model-alias-lines.js";
|
|
24
24
|
import { resolveModelForExecution } from "./model.js";
|
|
25
25
|
import { buildTtsSystemPromptHint } from "../../tts/tts.js";
|
|
26
26
|
import { isReasoningTagProvider } from "../../utils/provider-utils.js";
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { resolveFasedAgentAgentDir } from "../agent-paths.js";
|
|
2
2
|
import { ensureAuthProfileStore } from "../auth-profiles/store.js";
|
|
3
3
|
import { listProfilesForProvider } from "../auth-profiles/profiles.js";
|
|
4
|
+
import { loadConfig, writeConfigFile } from "../../config/io.js";
|
|
5
|
+
import "../../config/config.js";
|
|
4
6
|
import { resolveApiKeyForProfile } from "../auth-profiles/oauth.js";
|
|
5
7
|
import "../auth-profiles.js";
|
|
6
8
|
import { createOpenAICodexAppServerStreamFn } from "../openai-codex-app-server.js";
|
|
9
|
+
import { ensureOpenAICodexRuntimeComponent } from "../openai-codex-runtime-component.js";
|
|
7
10
|
import { log } from "./logger.js";
|
|
8
11
|
import { createMoonshotThinkingWrapper, resolveMoonshotThinkingType } from "./moonshot-stream-wrappers.js";
|
|
9
12
|
import { createOpenAIResponsesContextManagementWrapper } from "./openai-stream-wrappers.js";
|
|
@@ -399,23 +402,32 @@ function usesCodexResponsesLite(model) {
|
|
|
399
402
|
}
|
|
400
403
|
function createCodexResponsesLiteWrapper(baseStreamFn, params) {
|
|
401
404
|
const underlying = baseStreamFn ?? streamSimple;
|
|
402
|
-
const appServer = createOpenAICodexAppServerStreamFn({
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
405
|
+
const appServer = createOpenAICodexAppServerStreamFn({
|
|
406
|
+
resolveExecutable: async () => {
|
|
407
|
+
const runtime = await ensureOpenAICodexRuntimeComponent({ config: params?.cfg ?? loadConfig() });
|
|
408
|
+
if (runtime.installed) {
|
|
409
|
+
await writeConfigFile(runtime.config);
|
|
410
|
+
}
|
|
411
|
+
return runtime.executable;
|
|
412
|
+
},
|
|
413
|
+
resolveToken: async () => {
|
|
414
|
+
if (params?.resolvedApiKey?.trim()) {
|
|
415
|
+
return params.resolvedApiKey.trim();
|
|
416
|
+
}
|
|
417
|
+
const agentDir = params?.agentDir ?? resolveFasedAgentAgentDir();
|
|
418
|
+
const store = ensureAuthProfileStore(agentDir, { allowKeychainPrompt: false });
|
|
419
|
+
const profileId = listProfilesForProvider(store, "openai-codex")[0];
|
|
420
|
+
if (!profileId) {
|
|
421
|
+
return undefined;
|
|
422
|
+
}
|
|
423
|
+
return (await resolveApiKeyForProfile({
|
|
424
|
+
cfg: params?.cfg ?? {},
|
|
425
|
+
store,
|
|
426
|
+
profileId,
|
|
427
|
+
agentDir
|
|
428
|
+
}))?.apiKey;
|
|
411
429
|
}
|
|
412
|
-
|
|
413
|
-
cfg: params?.cfg ?? {},
|
|
414
|
-
store,
|
|
415
|
-
profileId,
|
|
416
|
-
agentDir
|
|
417
|
-
}))?.apiKey;
|
|
418
|
-
} });
|
|
430
|
+
});
|
|
419
431
|
return (model, context, options) => {
|
|
420
432
|
if (!usesCodexResponsesLite(model)) {
|
|
421
433
|
return underlying(model, context, options);
|
|
@@ -19,8 +19,8 @@ import { resolveSignalReactionLevel } from "../../../signal/reaction-level.js";
|
|
|
19
19
|
import { resolveTelegramInlineButtonsScope } from "../../../telegram/inline-buttons.js";
|
|
20
20
|
import { resolveTelegramReactionLevel } from "../../../telegram/reaction-level.js";
|
|
21
21
|
import { MAX_IMAGE_BYTES } from "../../../media/constants.js";
|
|
22
|
-
import { buildModelAliasLines } from "../../model-alias-lines.js";
|
|
23
22
|
import { resolveImageSanitizationLimits } from "../../image-sanitization.js";
|
|
23
|
+
import { buildModelAliasLines } from "../../model-alias-lines.js";
|
|
24
24
|
import "../model.js";
|
|
25
25
|
import { buildTtsSystemPromptHint } from "../../../tts/tts.js";
|
|
26
26
|
import { isReasoningTagProvider } from "../../../utils/provider-utils.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveStateDir } from "../config/paths.js";
|
|
2
2
|
import { isTruthyEnvValue } from "../infra/env.js";
|
|
3
|
-
import
|
|
3
|
+
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
|
|
6
6
|
//#region src/agents/pi-embedded-subscribe.raw-stream.ts
|
|
@@ -14,11 +14,11 @@ function appendRawStream(payload) {
|
|
|
14
14
|
if (!rawStreamReady) {
|
|
15
15
|
rawStreamReady = true;
|
|
16
16
|
try {
|
|
17
|
-
|
|
17
|
+
fs.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
|
|
18
18
|
} catch {}
|
|
19
19
|
}
|
|
20
20
|
try {
|
|
21
|
-
void
|
|
21
|
+
void fs.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
|
|
22
22
|
} catch {}
|
|
23
23
|
}
|
|
24
24
|
|