@fased/fased 0.1.56 → 0.1.58
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/current-model-catalog.js +5 -2
- 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/model-catalog-status.js +6 -1
- 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-runner/session-manager-init.js +5 -20
- 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/provider-extension-catalog-manifest.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/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-CpgQGqe6.js} +1689 -1689
- package/dist/control-ui/assets/{index-BmSBom-w.js → index-DiBBflpv.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-BJuN64m-.js} +1 -1
- package/dist/plugin-sdk/{actions-BplQVLL6.js → actions-DaEvM9Bl.js} +2 -2
- package/dist/plugin-sdk/{active-listener-x4MLhYUw.js → active-listener-B8Kuanet.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-D7tCO0EH.js} +31 -31
- package/dist/plugin-sdk/{audit-CWknklvI.js → audit-CVWH4BVP.js} +1 -1
- package/dist/plugin-sdk/{channel-access-a9Dnfw7-.js → channel-access-CH9FAS-I.js} +1 -1
- package/dist/plugin-sdk/{channel-access-configure-CD4QDN5E.js → channel-access-configure-CI0je66H.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-01oBnQjh.js} +1 -1
- package/dist/plugin-sdk/{chunk-items-CEPklxGe.js → chunk-items-D2zDJ8q8.js} +1 -1
- package/dist/plugin-sdk/command-status.js +31 -31
- package/dist/plugin-sdk/{commands-registry-BfEa4tFA.js → commands-registry-ckg4fhYa.js} +2 -2
- package/dist/plugin-sdk/{common-CbfckC19.js → common-zHvdO8ly.js} +1 -1
- package/dist/plugin-sdk/{config-Bt5GhnA-.js → config-DrhYEiCM.js} +1128 -3
- package/dist/plugin-sdk/{config-schema-B9DKr6J5.js → config-schema-BtjeV5Hm.js} +1765 -1412
- package/dist/plugin-sdk/device-pair.d.ts +1 -1
- package/dist/plugin-sdk/discord.d.ts +3 -3
- 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-5dhYpMbP.js} +17 -17
- package/dist/plugin-sdk/{helpers-CluGKuIV.js → helpers-E9aafRzA.js} +1 -1
- package/dist/plugin-sdk/{image-ops-CUaLtIFj.js → image-ops-D2U9ctmu.js} +1 -1
- package/dist/plugin-sdk/index.d.ts +5 -5
- 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-hql0fNuL.js} +3 -3
- package/dist/plugin-sdk/{login-qr-CbHL5ayf.js → login-qr-DJJ0svux.js} +4 -4
- package/dist/plugin-sdk/{manager-oHAvZCT3.js → manager-ciNnAMBn.js} +4 -4
- package/dist/plugin-sdk/{markdown-tables-Mkx7k92Y.js → markdown-tables-BKxbua_h.js} +1 -1
- package/dist/plugin-sdk/{media-CA8sTmVE.js → media-DUIZ6x9H.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-CNSGw4uQ.js} +35 -35
- package/dist/plugin-sdk/{monitor-CmwGqNyV.js → monitor-D-giXewh.js} +38 -38
- package/dist/plugin-sdk/{openresponses-http-CWOd4war.js → openresponses-http-dbTd8UMk.js} +31 -31
- package/dist/plugin-sdk/{optional-runtime-dependency-DKmk9PZa.js → optional-runtime-dependency-CKsJL1PD.js} +1 -1
- package/dist/plugin-sdk/{outbound-0oN9IfNw.js → outbound-DhGrjRft.js} +6 -6
- package/dist/plugin-sdk/{outbound-attachment-DdVkqUzE.js → outbound-attachment-DAF8huFz.js} +2 -2
- package/dist/plugin-sdk/{pairing-message-ClqhfCUk.js → pairing-message-BsJVvXkb.js} +1 -1
- package/dist/plugin-sdk/{pairing-message-BMkkS038.d.ts → pairing-message-C403mq4K.d.ts} +1 -1
- package/dist/plugin-sdk/{pairing-store-B01mCSct.js → pairing-store-DwM-BNbj.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-DkIdlJvJ.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-runtime-DuwuoteY.js → pi-model-discovery-runtime-Cv7okUMt.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-Dxd87W3J.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-Bx61SvAC.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-bc-FpPZg.js} +1 -1
- package/dist/plugin-sdk/{resolve-route-CkNIKKEW.js → resolve-route-D0eBYPtb.js} +2 -2
- package/dist/plugin-sdk/{retry-policy-9ybIh4Fq.js → retry-policy-HTrC4zfC.js} +1 -1
- package/dist/plugin-sdk/{runtime-Dy420wBu.js → runtime-BVkIrYLQ.js} +4 -4
- package/dist/plugin-sdk/{runtime-dependency-CIw9t7-k.js → runtime-dependency-B2PqMdBu.js} +13 -13
- 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-J4JWKP62.js → send-BGDGzxUu.js} +6 -6
- package/dist/plugin-sdk/{send-BQUtCJFW.js → send-C3QWSYLR.js} +8 -8
- package/dist/plugin-sdk/{send-Dqes9tdU.js → send-DT2egZNK.js} +7 -7
- package/dist/plugin-sdk/{send-2VcOMTN5.js → send-DgzZUx2i.js} +5 -5
- package/dist/plugin-sdk/{send-DPJIIYAs.js → send-KJy3ajA3.js} +6 -6
- package/dist/plugin-sdk/{session-C_n2S5ub.js → session-BCIEFOu1.js} +2 -2
- package/dist/plugin-sdk/{skill-commands-B7wx9ax8.js → skill-commands-CyIkcR8P.js} +4 -4
- package/dist/plugin-sdk/{slack-BouRQG-W.js → slack-DjKNh2uh.js} +47 -47
- package/dist/plugin-sdk/{slack-actions-CasHVtiq.js → slack-actions-CeM9LWDp.js} +14 -14
- package/dist/plugin-sdk/slack.d.ts +3 -3
- package/dist/plugin-sdk/slack.js +12 -12
- package/dist/plugin-sdk/{sticker-cache-BvGEUas3.js → sticker-cache-DcWzQ2wx.js} +3 -3
- package/dist/plugin-sdk/{tables-CjlQJV4r.js → tables-B2iehyjG.js} +1 -1
- package/dist/plugin-sdk/{targets-QfP164Dh.js → targets-BPket0SF.js} +1 -1
- package/dist/plugin-sdk/{telegram-actions-CwYjV6Db.js → telegram-actions-Cx_HWVht.js} +34 -34
- package/dist/plugin-sdk/telegram.d.ts +3 -3
- package/dist/plugin-sdk/telegram.js +9 -9
- package/dist/plugin-sdk/{thread-bindings.lifecycle-DU4iX_Jr.js → thread-bindings.lifecycle-CYH69SIw.js} +3 -3
- package/dist/plugin-sdk/{thread-bindings.state-BgYWFjNF.js → thread-bindings.state-BN6461WG.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-vR-oNiBv.js} +36 -36
- package/dist/plugin-sdk/{whatsapp-actions-BT2nPLyo.js → whatsapp-actions-BYNf8ceY.js} +16 -16
- package/dist/plugin-sdk/{whatsapp-heartbeat-CiABSZ6G.js → whatsapp-heartbeat-DZwa8MF0.js} +2 -2
- package/dist/plugin-sdk/whatsapp.d.ts +3 -3
- package/dist/plugin-sdk/whatsapp.js +13 -13
- package/dist/plugin-sdk/{wsl-B_ojyEtC.js → wsl-WGtdw_6h.js} +3 -3
- 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 +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 +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/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 fs 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 = fs.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
|
+
fs.writeFileSync(opts.planOut, `${JSON.stringify(configured.plan, null, 2)}\n`, "utf8");
|
|
75
75
|
}
|
|
76
76
|
if (opts.json) {
|
|
77
77
|
defaultRuntime.log(JSON.stringify({
|
|
@@ -9,6 +9,8 @@ import { readConfigFileSnapshot, writeConfigFile } from "../../config/io.js";
|
|
|
9
9
|
import "../../config/config.js";
|
|
10
10
|
import { loadGatewayTlsRuntime } from "../../infra/tls/gateway.js";
|
|
11
11
|
import { stylePromptMessage } from "../../terminal/prompt-style.js";
|
|
12
|
+
import { syncPluginsForUpdateChannel, updateNpmInstalledPlugins } from "../../plugins/update.js";
|
|
13
|
+
import { OPENAI_RUNTIME_COMPONENT_ID, ensureOpenAICodexRuntimeComponent, hasConfiguredOpenAICodexProfile } from "../../agents/openai-codex-runtime-component.js";
|
|
12
14
|
import { DEFAULT_GIT_CHANNEL, DEFAULT_PACKAGE_CHANNEL, channelToNpmTag, normalizeUpdateChannel } from "../../infra/update-channels.js";
|
|
13
15
|
import { cleanupGlobalRenameDirs, globalInstallArgs, resolveGlobalPackageRoot, resolveNodeModulesRootForPackageRoot } from "../../infra/update-global.js";
|
|
14
16
|
import { checkUpdateStatus, compareSemverStrings, resolveNpmChannelTag } from "../../infra/update-check.js";
|
|
@@ -18,7 +20,6 @@ import { renderRestartDiagnostics, terminateStaleGatewayPids, waitForGatewayHeal
|
|
|
18
20
|
import { runDaemonRestart } from "../daemon-cli/lifecycle.js";
|
|
19
21
|
import "../../daemon-cli.js";
|
|
20
22
|
import { installCompletion } from "../completion-cli.js";
|
|
21
|
-
import { syncPluginsForUpdateChannel, updateNpmInstalledPlugins } from "../../plugins/update.js";
|
|
22
23
|
import { readPackageName, readPackageVersion } from "../../infra/package-json.js";
|
|
23
24
|
import { finalizeUpdateTransaction, rollbackUpdateTransaction, runGatewayUpdate } from "../../infra/update-runner.js";
|
|
24
25
|
import { checkShellCompletionStatus, ensureCompletionCacheExists } from "../../commands/doctor-completion.js";
|
|
@@ -422,14 +423,32 @@ async function updatePluginsAfterCoreUpdate(params) {
|
|
|
422
423
|
config: params.configSnapshot.config,
|
|
423
424
|
updateCompleted: true
|
|
424
425
|
});
|
|
425
|
-
|
|
426
|
+
let pluginConfig = repairResult.config;
|
|
427
|
+
let installedOpenAIRuntime = false;
|
|
428
|
+
if (hasConfiguredOpenAICodexProfile(pluginConfig)) {
|
|
429
|
+
const runtimeComponent = await ensureOpenAICodexRuntimeComponent({
|
|
430
|
+
config: pluginConfig,
|
|
431
|
+
version: params.targetVersion
|
|
432
|
+
});
|
|
433
|
+
pluginConfig = runtimeComponent.config;
|
|
434
|
+
installedOpenAIRuntime = runtimeComponent.installed;
|
|
435
|
+
if (runtimeComponent.installed && !params.opts.json) {
|
|
436
|
+
defaultRuntime.log(theme.muted("Installed the managed OpenAI sign-in runtime required by the existing ChatGPT credential."));
|
|
437
|
+
}
|
|
438
|
+
for (const warning of runtimeComponent.slotWarnings) {
|
|
439
|
+
if (!params.opts.json) {
|
|
440
|
+
defaultRuntime.log(theme.warn(warning));
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
const installs = pluginConfig.plugins?.installs ?? {};
|
|
426
445
|
if (Object.keys(installs).length === 0) {
|
|
427
|
-
if (repairResult.changed) {
|
|
428
|
-
await writeConfigFile(
|
|
446
|
+
if (repairResult.changed || installedOpenAIRuntime) {
|
|
447
|
+
await writeConfigFile(pluginConfig);
|
|
429
448
|
}
|
|
430
449
|
return {
|
|
431
|
-
changed: repairResult.changed,
|
|
432
|
-
checked:
|
|
450
|
+
changed: repairResult.changed || installedOpenAIRuntime,
|
|
451
|
+
checked: installedOpenAIRuntime
|
|
433
452
|
};
|
|
434
453
|
}
|
|
435
454
|
const pluginLogger = params.opts.json ? {} : {
|
|
@@ -442,25 +461,25 @@ async function updatePluginsAfterCoreUpdate(params) {
|
|
|
442
461
|
defaultRuntime.log(theme.heading("Updating plugins..."));
|
|
443
462
|
}
|
|
444
463
|
const syncResult = await syncPluginsForUpdateChannel({
|
|
445
|
-
config:
|
|
464
|
+
config: pluginConfig,
|
|
446
465
|
channel: params.channel,
|
|
447
466
|
workspaceDir: params.root,
|
|
448
467
|
logger: pluginLogger
|
|
449
468
|
});
|
|
450
|
-
|
|
469
|
+
pluginConfig = syncResult.config;
|
|
451
470
|
const npmResult = await updateNpmInstalledPlugins({
|
|
452
471
|
config: pluginConfig,
|
|
453
|
-
skipIds: new Set(syncResult.summary.switchedToNpm),
|
|
472
|
+
skipIds: new Set([...syncResult.summary.switchedToNpm, ...installedOpenAIRuntime ? [OPENAI_RUNTIME_COMPONENT_ID] : []]),
|
|
454
473
|
updateChannel: params.channel,
|
|
455
474
|
logger: pluginLogger
|
|
456
475
|
});
|
|
457
476
|
pluginConfig = npmResult.config;
|
|
458
|
-
if (repairResult.changed || syncResult.changed || npmResult.changed) {
|
|
477
|
+
if (repairResult.changed || installedOpenAIRuntime || syncResult.changed || npmResult.changed) {
|
|
459
478
|
await writeConfigFile(pluginConfig);
|
|
460
479
|
}
|
|
461
480
|
if (params.opts.json) {
|
|
462
481
|
return {
|
|
463
|
-
changed: repairResult.changed || syncResult.changed || npmResult.changed,
|
|
482
|
+
changed: repairResult.changed || installedOpenAIRuntime || syncResult.changed || npmResult.changed,
|
|
464
483
|
checked: true
|
|
465
484
|
};
|
|
466
485
|
}
|
|
@@ -511,7 +530,7 @@ async function updatePluginsAfterCoreUpdate(params) {
|
|
|
511
530
|
defaultRuntime.log(theme.error(outcome.message));
|
|
512
531
|
}
|
|
513
532
|
return {
|
|
514
|
-
changed: repairResult.changed || syncResult.changed || npmResult.changed,
|
|
533
|
+
changed: repairResult.changed || installedOpenAIRuntime || syncResult.changed || npmResult.changed,
|
|
515
534
|
checked: true
|
|
516
535
|
};
|
|
517
536
|
}
|
|
@@ -802,6 +821,24 @@ async function updateCommand(opts) {
|
|
|
802
821
|
}
|
|
803
822
|
}
|
|
804
823
|
if (alreadyCurrent && currentVersion && targetVersion) {
|
|
824
|
+
if (configSnapshot.valid && hasConfiguredOpenAICodexProfile(configSnapshot.config)) {
|
|
825
|
+
try {
|
|
826
|
+
const runtimeComponent = await ensureOpenAICodexRuntimeComponent({
|
|
827
|
+
config: configSnapshot.config,
|
|
828
|
+
version: targetVersion
|
|
829
|
+
});
|
|
830
|
+
if (runtimeComponent.installed) {
|
|
831
|
+
await writeConfigFile(runtimeComponent.config);
|
|
832
|
+
if (!opts.json) {
|
|
833
|
+
defaultRuntime.log(theme.muted("Installed the version-matched OpenAI sign-in runtime required by the current release."));
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
} catch (error) {
|
|
837
|
+
defaultRuntime.error(`OpenAI sign-in runtime update failed: ${String(error)}`);
|
|
838
|
+
defaultRuntime.exit(1);
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
}
|
|
805
842
|
const runningRuntime = await probeRunningGatewayRuntimeIdentity({ timeoutMs: 750 });
|
|
806
843
|
if (runningRuntime.reachable && runningRuntime.version !== currentVersion) {
|
|
807
844
|
if (!shouldRestart) {
|
|
@@ -1000,6 +1037,7 @@ async function updateCommand(opts) {
|
|
|
1000
1037
|
const pluginResult = await measureUpdateStage(lifecycleTimings, "plugin updates", () => updatePluginsAfterCoreUpdate({
|
|
1001
1038
|
root,
|
|
1002
1039
|
channel,
|
|
1040
|
+
targetVersion: result.after?.version ?? targetVersion ?? undefined,
|
|
1003
1041
|
configSnapshot,
|
|
1004
1042
|
opts
|
|
1005
1043
|
}));
|
package/dist/cli/windows-argv.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import fs 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" && fs.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
|
@@ -19,7 +19,6 @@ 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";
|
|
23
22
|
import { clearAgentRunContext, emitAgentEvent, registerAgentRunContext } from "../infra/agent-events.js";
|
|
24
23
|
import { AGENT_LANE_SUBAGENT } from "../agents/lanes.js";
|
|
25
24
|
import { buildOutboundSessionContext } from "../infra/outbound/session-context.js";
|
|
@@ -27,6 +26,7 @@ import { resolveSendPolicy } from "../sessions/send-policy.js";
|
|
|
27
26
|
import { toAcpRuntimeError } from "../acp/runtime/errors.js";
|
|
28
27
|
import { getAcpSessionManager } from "../acp/control-plane/manager.js";
|
|
29
28
|
import { resolveAcpAgentPolicyError, resolveAcpDispatchPolicyError } from "../acp/policy.js";
|
|
29
|
+
import { buildCredentialScopedAllowedModelSet } from "../agents/model-catalog-access.js";
|
|
30
30
|
import { loadModelCatalog } from "../agents/model-catalog.js";
|
|
31
31
|
import { runWithModelFallback } from "../agents/model-fallback.js";
|
|
32
32
|
import { applyModelOverrideToSessionEntry } from "../sessions/model-overrides.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { openUrl } from "./onboard-helpers.js";
|
|
2
|
+
import { ensureOpenAICodexRuntimeComponent } from "../agents/openai-codex-runtime-component.js";
|
|
2
3
|
import { normalizeApiKeyInput, validateApiKeyInput } from "./auth-choice.api-key.js";
|
|
3
4
|
import { applyDefaultModelChoice } from "./auth-choice.default-model.js";
|
|
4
5
|
import { createAuthChoiceAgentModelNoter, ensureApiKeyFromOptionEnvOrPrompt, normalizeSecretInputModeInput } from "./auth-choice.apply-helpers.js";
|
|
@@ -82,6 +83,14 @@ async function applyAuthChoiceOpenAI(params) {
|
|
|
82
83
|
};
|
|
83
84
|
}
|
|
84
85
|
if (creds) {
|
|
86
|
+
const runtimeComponent = await ensureOpenAICodexRuntimeComponent({ config: nextConfig });
|
|
87
|
+
nextConfig = runtimeComponent.config;
|
|
88
|
+
for (const warning of runtimeComponent.slotWarnings) {
|
|
89
|
+
await params.prompter.note(warning, "OpenAI runtime warning");
|
|
90
|
+
}
|
|
91
|
+
if (runtimeComponent.installed) {
|
|
92
|
+
await params.prompter.note("Installed the managed OpenAI sign-in runtime for authenticated model discovery and execution.", "OpenAI runtime ready");
|
|
93
|
+
}
|
|
85
94
|
const profileId = await writeOAuthCredentials("openai-codex", creds, params.agentDir, { syncSiblingAgents: true });
|
|
86
95
|
nextConfig = applyAuthProfileConfig(nextConfig, {
|
|
87
96
|
profileId,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { resolveDefaultAgentWorkspaceDir } from "../agents/workspace.js";
|
|
2
2
|
import { resolveAgentDir, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agents/agent-scope.js";
|
|
3
3
|
import { resolveFasedAgentAgentDir } from "../agents/agent-paths.js";
|
|
4
|
-
import { resolvePluginProviders } from "../plugins/providers.js";
|
|
5
4
|
import { enablePluginInConfig } from "../plugins/enable.js";
|
|
5
|
+
import { resolvePluginProviders } from "../plugins/providers.js";
|
|
6
6
|
import { pickAuthMethod, resolveProviderMatch } from "../plugins/provider-auth-choice-helpers.js";
|
|
7
7
|
import { applyPluginProviderAuthRunResult, createPluginProviderAuthContext, runInteractivePluginProviderOAuthDeviceAuth } from "../plugins/provider-auth-runtime.js";
|
|
8
8
|
|
|
@@ -4,7 +4,7 @@ import { parseDurationMs } from "../cli/parse-duration.js";
|
|
|
4
4
|
import { readConfigFileSnapshot } from "../config/io.js";
|
|
5
5
|
import "../config/config.js";
|
|
6
6
|
import { CONTROL_UI_LOGIN_DEFAULT_GRANT_TTL_MS, createLoginGrant, normalizePublicHost } from "../gateway/control-ui-login.js";
|
|
7
|
-
import
|
|
7
|
+
import fs from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/dashboard-link.ts
|
|
@@ -12,10 +12,10 @@ const AGENT_DOMAIN_SUFFIX = ".agents.fased.app";
|
|
|
12
12
|
function readStateGatewayToken(env = process.env) {
|
|
13
13
|
try {
|
|
14
14
|
const filePath = path.join(resolveStateDir(env), "gateway-secret");
|
|
15
|
-
if (!
|
|
15
|
+
if (!fs.existsSync(filePath)) {
|
|
16
16
|
return "";
|
|
17
17
|
}
|
|
18
|
-
return
|
|
18
|
+
return fs.readFileSync(filePath, "utf8").trim();
|
|
19
19
|
} catch {
|
|
20
20
|
return "";
|
|
21
21
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { note } from "../terminal/note.js";
|
|
2
|
-
import
|
|
2
|
+
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
|
|
5
5
|
//#region src/commands/doctor-install.ts
|
|
@@ -8,7 +8,7 @@ function noteSourceInstallIssues(root) {
|
|
|
8
8
|
return;
|
|
9
9
|
}
|
|
10
10
|
const workspaceMarker = path.join(root, "pnpm-workspace.yaml");
|
|
11
|
-
if (!
|
|
11
|
+
if (!fs.existsSync(workspaceMarker)) {
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
14
|
const warnings = [];
|
|
@@ -16,13 +16,13 @@ function noteSourceInstallIssues(root) {
|
|
|
16
16
|
const pnpmStore = path.join(nodeModules, ".pnpm");
|
|
17
17
|
const tsxBin = path.join(nodeModules, ".bin", "tsx");
|
|
18
18
|
const srcEntry = path.join(root, "src", "entry.ts");
|
|
19
|
-
if (
|
|
19
|
+
if (fs.existsSync(nodeModules) && !fs.existsSync(pnpmStore)) {
|
|
20
20
|
warnings.push("- node_modules was not installed by pnpm (missing node_modules/.pnpm). Run: pnpm install");
|
|
21
21
|
}
|
|
22
|
-
if (
|
|
22
|
+
if (fs.existsSync(path.join(root, "package-lock.json"))) {
|
|
23
23
|
warnings.push("- package-lock.json present in a pnpm workspace. If you ran npm install, remove it and reinstall with pnpm.");
|
|
24
24
|
}
|
|
25
|
-
if (
|
|
25
|
+
if (fs.existsSync(srcEntry) && !fs.existsSync(tsxBin)) {
|
|
26
26
|
warnings.push("- tsx binary is missing for source runs. Run: pnpm install");
|
|
27
27
|
}
|
|
28
28
|
if (warnings.length > 0) {
|
|
@@ -5,7 +5,7 @@ import { resolveApiKeyForProvider } from "../agents/model-auth.js";
|
|
|
5
5
|
import { resolveMemoryBackendConfig } from "../memory/backend-config.js";
|
|
6
6
|
import { resolveMemorySearchConfig } from "../agents/memory-search.js";
|
|
7
7
|
import { note } from "../terminal/note.js";
|
|
8
|
-
import
|
|
8
|
+
import fs from "node:fs";
|
|
9
9
|
|
|
10
10
|
//#region src/commands/doctor-memory-search.ts
|
|
11
11
|
/**
|
|
@@ -126,7 +126,7 @@ function hasLocalEmbeddings(local) {
|
|
|
126
126
|
}
|
|
127
127
|
const resolved = resolveUserPath(modelPath);
|
|
128
128
|
try {
|
|
129
|
-
return
|
|
129
|
+
return fs.statSync(resolved).isFile();
|
|
130
130
|
} catch {
|
|
131
131
|
return false;
|
|
132
132
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shortenHomePath } from "../utils.js";
|
|
2
2
|
import { note } from "../terminal/note.js";
|
|
3
|
-
import
|
|
3
|
+
import fs from "node:fs";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { promisify } from "node:util";
|
|
@@ -17,7 +17,7 @@ async function noteMacLaunchAgentOverrides() {
|
|
|
17
17
|
}
|
|
18
18
|
const home = resolveHomeDir();
|
|
19
19
|
const markerCandidates = [path.join(home, ".fased", "disable-launchagent")];
|
|
20
|
-
const markerPath = markerCandidates.find((candidate) =>
|
|
20
|
+
const markerPath = markerCandidates.find((candidate) => fs.existsSync(candidate));
|
|
21
21
|
if (!markerPath) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
@@ -3,7 +3,7 @@ import { DEFAULT_SANDBOX_BROWSER_IMAGE, DEFAULT_SANDBOX_COMMON_IMAGE, DEFAULT_SA
|
|
|
3
3
|
import { resolveSandboxScope } from "../agents/sandbox/config.js";
|
|
4
4
|
import "../agents/sandbox.js";
|
|
5
5
|
import { note } from "../terminal/note.js";
|
|
6
|
-
import
|
|
6
|
+
import fs from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
|
|
9
9
|
//#region src/commands/doctor-sandbox.ts
|
|
@@ -18,7 +18,7 @@ function resolveSandboxScript(scriptRel) {
|
|
|
18
18
|
}
|
|
19
19
|
for (const root of candidates) {
|
|
20
20
|
const scriptPath = path.join(root, scriptRel);
|
|
21
|
-
if (
|
|
21
|
+
if (fs.existsSync(scriptPath)) {
|
|
22
22
|
return {
|
|
23
23
|
scriptPath,
|
|
24
24
|
cwd: root
|
|
@@ -11,28 +11,28 @@ import { loadSessionStore } from "../config/sessions/store.js";
|
|
|
11
11
|
import { ensureSessionTranscriptHeader } from "../config/sessions/transcript.js";
|
|
12
12
|
import "../config/sessions.js";
|
|
13
13
|
import { note } from "../terminal/note.js";
|
|
14
|
-
import
|
|
14
|
+
import fs from "node:fs";
|
|
15
15
|
import os from "node:os";
|
|
16
16
|
import path from "node:path";
|
|
17
17
|
|
|
18
18
|
//#region src/commands/doctor-state-integrity.ts
|
|
19
19
|
function existsDir(dir) {
|
|
20
20
|
try {
|
|
21
|
-
return
|
|
21
|
+
return fs.existsSync(dir) && fs.statSync(dir).isDirectory();
|
|
22
22
|
} catch {
|
|
23
23
|
return false;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
function existsFile(filePath) {
|
|
27
27
|
try {
|
|
28
|
-
return
|
|
28
|
+
return fs.existsSync(filePath) && fs.statSync(filePath).isFile();
|
|
29
29
|
} catch {
|
|
30
30
|
return false;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
function canWriteDir(dir) {
|
|
34
34
|
try {
|
|
35
|
-
|
|
35
|
+
fs.accessSync(dir, fs.constants.W_OK);
|
|
36
36
|
return true;
|
|
37
37
|
} catch {
|
|
38
38
|
return false;
|
|
@@ -40,7 +40,7 @@ function canWriteDir(dir) {
|
|
|
40
40
|
}
|
|
41
41
|
function ensureDir(dir) {
|
|
42
42
|
try {
|
|
43
|
-
|
|
43
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
44
44
|
return { ok: true };
|
|
45
45
|
} catch (err) {
|
|
46
46
|
return {
|
|
@@ -53,7 +53,7 @@ function dirPermissionHint(dir) {
|
|
|
53
53
|
const uid = typeof process.getuid === "function" ? process.getuid() : null;
|
|
54
54
|
const gid = typeof process.getgid === "function" ? process.getgid() : null;
|
|
55
55
|
try {
|
|
56
|
-
const stat =
|
|
56
|
+
const stat = fs.statSync(dir);
|
|
57
57
|
if (uid !== null && stat.uid !== uid) {
|
|
58
58
|
return `Owner mismatch (uid ${stat.uid}). Run: sudo chown -R $USER "${dir}"`;
|
|
59
59
|
}
|
|
@@ -71,7 +71,7 @@ function addUserRwx(mode) {
|
|
|
71
71
|
}
|
|
72
72
|
function countJsonlLines(filePath) {
|
|
73
73
|
try {
|
|
74
|
-
const raw =
|
|
74
|
+
const raw = fs.readFileSync(filePath, "utf-8");
|
|
75
75
|
if (!raw) {
|
|
76
76
|
return 0;
|
|
77
77
|
}
|
|
@@ -96,7 +96,7 @@ function findOtherStateDirs(stateDir) {
|
|
|
96
96
|
for (const root of roots) {
|
|
97
97
|
let entries = [];
|
|
98
98
|
try {
|
|
99
|
-
entries =
|
|
99
|
+
entries = fs.readdirSync(root, { withFileTypes: true });
|
|
100
100
|
} catch {
|
|
101
101
|
continue;
|
|
102
102
|
}
|
|
@@ -226,9 +226,9 @@ async function noteStateIntegrity(cfg, prompter, configPath) {
|
|
|
226
226
|
});
|
|
227
227
|
if (repair) {
|
|
228
228
|
try {
|
|
229
|
-
const stat =
|
|
229
|
+
const stat = fs.statSync(stateDir);
|
|
230
230
|
const target = addUserRwx(stat.mode);
|
|
231
|
-
|
|
231
|
+
fs.chmodSync(stateDir, target);
|
|
232
232
|
changes.push(`- Repaired permissions on ${displayStateDir}`);
|
|
233
233
|
} catch (err) {
|
|
234
234
|
warnings.push(`- Failed to repair ${displayStateDir}: ${String(err)}`);
|
|
@@ -237,10 +237,10 @@ async function noteStateIntegrity(cfg, prompter, configPath) {
|
|
|
237
237
|
}
|
|
238
238
|
if (stateDirExists && process.platform !== "win32") {
|
|
239
239
|
try {
|
|
240
|
-
const dirLstat =
|
|
240
|
+
const dirLstat = fs.lstatSync(stateDir);
|
|
241
241
|
const isDirSymlink = dirLstat.isSymbolicLink();
|
|
242
|
-
const stat = isDirSymlink ?
|
|
243
|
-
const resolvedDir = isDirSymlink ?
|
|
242
|
+
const stat = isDirSymlink ? fs.statSync(stateDir) : dirLstat;
|
|
243
|
+
const resolvedDir = isDirSymlink ? fs.realpathSync(stateDir) : stateDir;
|
|
244
244
|
const isImmutableStore = resolvedDir.startsWith("/nix/store/");
|
|
245
245
|
if (!isImmutableStore && (stat.mode & 63) !== 0) {
|
|
246
246
|
warnings.push(`- State directory permissions are too open (${displayStateDir}). Recommend chmod 700.`);
|
|
@@ -249,7 +249,7 @@ async function noteStateIntegrity(cfg, prompter, configPath) {
|
|
|
249
249
|
initialValue: true
|
|
250
250
|
});
|
|
251
251
|
if (tighten) {
|
|
252
|
-
|
|
252
|
+
fs.chmodSync(stateDir, 448);
|
|
253
253
|
changes.push(`- Tightened permissions on ${displayStateDir} to 700`);
|
|
254
254
|
}
|
|
255
255
|
}
|
|
@@ -259,10 +259,10 @@ async function noteStateIntegrity(cfg, prompter, configPath) {
|
|
|
259
259
|
}
|
|
260
260
|
if (configPath && existsFile(configPath) && process.platform !== "win32") {
|
|
261
261
|
try {
|
|
262
|
-
const configLstat =
|
|
262
|
+
const configLstat = fs.lstatSync(configPath);
|
|
263
263
|
const isSymlink = configLstat.isSymbolicLink();
|
|
264
|
-
const stat = isSymlink ?
|
|
265
|
-
const resolvedConfig = isSymlink ?
|
|
264
|
+
const stat = isSymlink ? fs.statSync(configPath) : configLstat;
|
|
265
|
+
const resolvedConfig = isSymlink ? fs.realpathSync(configPath) : configPath;
|
|
266
266
|
const isImmutableConfig = resolvedConfig.startsWith("/nix/store/");
|
|
267
267
|
if (!isImmutableConfig && (stat.mode & 63) !== 0) {
|
|
268
268
|
warnings.push(`- Config file is group/world readable (${displayConfigPath ?? configPath}). Recommend chmod 600.`);
|
|
@@ -271,7 +271,7 @@ async function noteStateIntegrity(cfg, prompter, configPath) {
|
|
|
271
271
|
initialValue: true
|
|
272
272
|
});
|
|
273
273
|
if (tighten) {
|
|
274
|
-
|
|
274
|
+
fs.chmodSync(configPath, 384);
|
|
275
275
|
changes.push(`- Tightened permissions on ${displayConfigPath ?? configPath} to 600`);
|
|
276
276
|
}
|
|
277
277
|
}
|
|
@@ -330,9 +330,9 @@ async function noteStateIntegrity(cfg, prompter, configPath) {
|
|
|
330
330
|
});
|
|
331
331
|
if (repair) {
|
|
332
332
|
try {
|
|
333
|
-
const stat =
|
|
333
|
+
const stat = fs.statSync(dir);
|
|
334
334
|
const target = addUserRwx(stat.mode);
|
|
335
|
-
|
|
335
|
+
fs.chmodSync(dir, target);
|
|
336
336
|
changes.push(`- Repaired permissions on ${label}: ${displayDir}`);
|
|
337
337
|
} catch (err) {
|
|
338
338
|
warnings.push(`- Failed to repair ${displayDir}: ${String(err)}`);
|
|
@@ -432,7 +432,7 @@ async function noteStateIntegrity(cfg, prompter, configPath) {
|
|
|
432
432
|
referencedTranscriptPaths.add(path.resolve(resolveSessionFilePath(entry.sessionId, entry, sessionPathOpts)));
|
|
433
433
|
} catch {}
|
|
434
434
|
}
|
|
435
|
-
const sessionDirEntries =
|
|
435
|
+
const sessionDirEntries = fs.readdirSync(sessionsDir, { withFileTypes: true });
|
|
436
436
|
const orphanTranscriptPaths = sessionDirEntries.filter((entry) => entry.isFile() && isPrimarySessionTranscriptFileName(entry.name)).map((entry) => path.resolve(path.join(sessionsDir, entry.name))).filter((filePath) => !referencedTranscriptPaths.has(filePath));
|
|
437
437
|
if (orphanTranscriptPaths.length > 0) {
|
|
438
438
|
warnings.push(`- Found ${orphanTranscriptPaths.length} orphan transcript file(s) in ${displaySessionsDir}. They are not referenced by sessions.json and can consume disk over time.`);
|
|
@@ -446,7 +446,7 @@ async function noteStateIntegrity(cfg, prompter, configPath) {
|
|
|
446
446
|
for (const orphanPath of orphanTranscriptPaths) {
|
|
447
447
|
const archivedPath = `${orphanPath}.deleted.${archivedAt}`;
|
|
448
448
|
try {
|
|
449
|
-
|
|
449
|
+
fs.renameSync(orphanPath, archivedPath);
|
|
450
450
|
archived += 1;
|
|
451
451
|
} catch (err) {
|
|
452
452
|
warnings.push(`- Failed to archive orphan transcript ${shortenHomePath(orphanPath)}: ${String(err)}`);
|
|
@@ -470,7 +470,7 @@ function noteWorkspaceBackupTip(workspaceDir) {
|
|
|
470
470
|
return;
|
|
471
471
|
}
|
|
472
472
|
const gitMarker = path.join(workspaceDir, ".git");
|
|
473
|
-
if (
|
|
473
|
+
if (fs.existsSync(gitMarker)) {
|
|
474
474
|
return;
|
|
475
475
|
}
|
|
476
476
|
note([
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shortenHomePath } from "../utils.js";
|
|
2
2
|
import { DEFAULT_AGENTS_FILENAME } from "../agents/workspace.js";
|
|
3
|
-
import
|
|
3
|
+
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
|
|
6
6
|
//#region src/commands/doctor-workspace.ts
|
|
@@ -16,13 +16,13 @@ async function shouldSuggestMemorySystem(workspaceDir) {
|
|
|
16
16
|
const memoryPaths = [path.join(workspaceDir, "MEMORY.md"), path.join(workspaceDir, "memory.md")];
|
|
17
17
|
for (const memoryPath of memoryPaths) {
|
|
18
18
|
try {
|
|
19
|
-
await
|
|
19
|
+
await fs.promises.access(memoryPath);
|
|
20
20
|
return false;
|
|
21
21
|
} catch {}
|
|
22
22
|
}
|
|
23
23
|
const agentsPath = path.join(workspaceDir, DEFAULT_AGENTS_FILENAME);
|
|
24
24
|
try {
|
|
25
|
-
const content = await
|
|
25
|
+
const content = await fs.promises.readFile(agentsPath, "utf-8");
|
|
26
26
|
if (/memory\.md/i.test(content)) {
|
|
27
27
|
return false;
|
|
28
28
|
}
|
package/dist/commands/doctor.js
CHANGED
|
@@ -37,7 +37,7 @@ import { maybeRepairUiProtocolFreshness } from "./doctor-ui.js";
|
|
|
37
37
|
import { maybeOfferUpdateBeforeDoctor } from "./doctor-update.js";
|
|
38
38
|
import { MEMORY_SYSTEM_PROMPT, shouldSuggestMemorySystem } from "./doctor-workspace.js";
|
|
39
39
|
import { noteWorkspaceStatus } from "./doctor-workspace-status.js";
|
|
40
|
-
import
|
|
40
|
+
import fs from "node:fs";
|
|
41
41
|
import { intro, outro } from "@clack/prompts";
|
|
42
42
|
|
|
43
43
|
//#region src/commands/doctor.ts
|
|
@@ -83,7 +83,7 @@ async function doctorCommand(runtime = defaultRuntime, options = {}) {
|
|
|
83
83
|
`Fix: run ${formatCliCommand("fased configure")} and set Gateway mode (local/remote).`,
|
|
84
84
|
`Or set directly: ${formatCliCommand("fased config set gateway.mode local")}`
|
|
85
85
|
];
|
|
86
|
-
if (!
|
|
86
|
+
if (!fs.existsSync(configPath)) {
|
|
87
87
|
lines.push(`Missing config: run ${formatCliCommand("fased setup")} first.`);
|
|
88
88
|
}
|
|
89
89
|
note$1(lines.join("\n"), "Gateway");
|
|
@@ -233,7 +233,7 @@ async function doctorCommand(runtime = defaultRuntime, options = {}) {
|
|
|
233
233
|
await writeConfigFile(cfg);
|
|
234
234
|
logConfigUpdated(runtime);
|
|
235
235
|
const backupPath = `${CONFIG_PATH}.bak`;
|
|
236
|
-
if (
|
|
236
|
+
if (fs.existsSync(backupPath)) {
|
|
237
237
|
runtime.log(`Backup: ${shortenHomePath(backupPath)}`);
|
|
238
238
|
}
|
|
239
239
|
} else if (configResult.hasPendingChanges) {
|
|
@@ -2,7 +2,7 @@ import { defaultRuntime } from "../runtime.js";
|
|
|
2
2
|
import { readManagedFederationTokenSummary } from "../managed/federation.js";
|
|
3
3
|
import { readManagedReservationSummaries } from "../managed/tunnel.js";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
import
|
|
5
|
+
import fs from "node:fs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { spawn } from "node:child_process";
|
|
8
8
|
|
|
@@ -44,7 +44,7 @@ function resolveManagedScriptPath() {
|
|
|
44
44
|
candidates.push(cwdCandidate);
|
|
45
45
|
}
|
|
46
46
|
for (const candidate of candidates) {
|
|
47
|
-
if (
|
|
47
|
+
if (fs.existsSync(candidate)) {
|
|
48
48
|
return candidate;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -11,7 +11,7 @@ import { upsertAuthProfile } from "../agents/auth-profiles/profiles.js";
|
|
|
11
11
|
import "../agents/auth-profiles.js";
|
|
12
12
|
import { PROVIDER_ENV_VARS } from "../secrets/provider-env-vars.js";
|
|
13
13
|
import { MISTRAL_DEFAULT_MODEL_REF, XAI_DEFAULT_MODEL_REF } from "./onboard-auth.models.js";
|
|
14
|
-
import
|
|
14
|
+
import fs from "node:fs";
|
|
15
15
|
import path from "node:path";
|
|
16
16
|
|
|
17
17
|
//#region src/commands/onboard-auth.credentials.ts
|
|
@@ -74,7 +74,7 @@ function buildApiKeyCredential(provider, input, metadata, options) {
|
|
|
74
74
|
/** Resolve real path, returning null if the target doesn't exist. */
|
|
75
75
|
function safeRealpathSync(dir) {
|
|
76
76
|
try {
|
|
77
|
-
return
|
|
77
|
+
return fs.realpathSync(path.resolve(dir));
|
|
78
78
|
} catch {
|
|
79
79
|
return null;
|
|
80
80
|
}
|
|
@@ -87,7 +87,7 @@ function resolveSiblingAgentDirs(primaryAgentDir) {
|
|
|
87
87
|
const agentsRoot = looksLikeStandardLayout ? candidateAgentsRoot : path.join(resolveStateDir(), "agents");
|
|
88
88
|
const entries = (() => {
|
|
89
89
|
try {
|
|
90
|
-
return
|
|
90
|
+
return fs.readdirSync(agentsRoot, { withFileTypes: true });
|
|
91
91
|
} catch {
|
|
92
92
|
return [];
|
|
93
93
|
}
|
|
@@ -4,11 +4,11 @@ import { resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agents/agent
|
|
|
4
4
|
import { formatCliCommand } from "../cli/command-format.js";
|
|
5
5
|
import { getChannelPlugin, listChannelPlugins } from "../channels/plugins/index.js";
|
|
6
6
|
import { formatChannelPrimerLine, formatChannelSelectionLine, listChatChannels } from "../channels/registry.js";
|
|
7
|
+
import { enablePluginInConfig } from "../plugins/enable.js";
|
|
7
8
|
import { formatDocsLink } from "../terminal/links.js";
|
|
8
9
|
import { formatChannelPluginCatalogSelectionHint, formatChannelPluginCatalogStatusLine, listChannelPluginCatalogEntries } from "../channels/plugins/catalog.js";
|
|
9
10
|
import { isChannelConfigured } from "../config/plugin-auto-enable.js";
|
|
10
11
|
import { resolveChannelDefaultAccountId } from "../channels/plugins/helpers.js";
|
|
11
|
-
import { enablePluginInConfig } from "../plugins/enable.js";
|
|
12
12
|
import { ensureOnboardingPluginInstalled, reloadOnboardingPluginRegistry } from "./onboarding/plugin-install.js";
|
|
13
13
|
import { getChannelOnboardingAdapter, listChannelOnboardingAdapters } from "./onboarding/registry.js";
|
|
14
14
|
|
|
@@ -2,12 +2,12 @@ import { createSubsystemLogger } from "../../logging/subsystem.js";
|
|
|
2
2
|
import { resolveFasedAgentPackageRootSync } from "../../infra/fased-root.js";
|
|
3
3
|
import { resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../agents/agent-scope.js";
|
|
4
4
|
import { installPluginFromNpmSpec } from "../../plugins/install.js";
|
|
5
|
+
import { buildNpmResolutionInstallFields } from "../../plugins/installs.js";
|
|
5
6
|
import { loadFasedAgentPlugins } from "../../plugins/loader.js";
|
|
6
7
|
import { createPluginLoaderLogger } from "../../plugins/logger.js";
|
|
7
|
-
import { resolveChannelPluginExpectedPluginIds } from "../../channels/plugins/catalog.js";
|
|
8
|
-
import { buildNpmResolutionInstallFields } from "../../plugins/installs.js";
|
|
9
8
|
import { finalizeInstalledPluginConfig } from "../../plugins/lifecycle.js";
|
|
10
|
-
import
|
|
9
|
+
import { resolveChannelPluginExpectedPluginIds } from "../../channels/plugins/catalog.js";
|
|
10
|
+
import fs from "node:fs";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
|
|
13
13
|
//#region src/commands/onboarding/plugin-install.ts
|
|
@@ -29,7 +29,7 @@ function resolveLocalPath(entry, workspaceDir) {
|
|
|
29
29
|
candidates.add(path.resolve(packageRoot, raw));
|
|
30
30
|
}
|
|
31
31
|
for (const candidate of candidates) {
|
|
32
|
-
if (
|
|
32
|
+
if (fs.existsSync(candidate)) {
|
|
33
33
|
return candidate;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -7,7 +7,7 @@ import { capEntryCount, loadSessionStore, pruneStaleEntries, resolveMaintenanceC
|
|
|
7
7
|
import "../config/sessions.js";
|
|
8
8
|
import { resolveSessionStoreTargets } from "./session-store-targets.js";
|
|
9
9
|
import { SESSION_AGE_PAD, SESSION_KEY_PAD, SESSION_MODEL_PAD, formatSessionAgeCell, formatSessionFlagsCell, formatSessionKeyCell, formatSessionModelCell, resolveSessionDisplayDefaults, resolveSessionDisplayModel, toSessionDisplayRows } from "./sessions-table.js";
|
|
10
|
-
import
|
|
10
|
+
import fs from "node:fs";
|
|
11
11
|
|
|
12
12
|
//#region src/commands/sessions-cleanup.ts
|
|
13
13
|
const ACTION_PAD = 12;
|
|
@@ -65,7 +65,7 @@ function pruneMissingTranscriptEntries(params) {
|
|
|
65
65
|
continue;
|
|
66
66
|
}
|
|
67
67
|
const transcriptPath = resolveSessionFilePath(entry.sessionId, entry, sessionPathOpts);
|
|
68
|
-
if (!
|
|
68
|
+
if (!fs.existsSync(transcriptPath)) {
|
|
69
69
|
delete params.store[key];
|
|
70
70
|
removed += 1;
|
|
71
71
|
params.onPruned?.(key);
|