@fased/fased 0.1.47 → 0.1.48
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 +21 -3
- 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/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/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/channels/plugins/catalog.js +3 -3
- package/dist/cli/browser-cli-extension.js +6 -6
- package/dist/cli/command-format.js +2 -2
- package/dist/cli/cron-cli/register.cron-simple.js +2 -2
- package/dist/cli/dns-cli.js +9 -9
- package/dist/cli/gateway-cli/dev.js +5 -5
- package/dist/cli/gateway-cli/run.js +2 -2
- package/dist/cli/hooks-cli.js +5 -5
- package/dist/cli/memory-cli.js +7 -7
- package/dist/cli/nodes-media-utils.js +2 -2
- package/dist/cli/plugins-cli.js +2 -2
- package/dist/cli/secrets-cli.js +3 -3
- package/dist/cli/windows-argv.js +2 -2
- 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/onboarding/plugin-install.js +2 -2
- 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/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/protocol-contract.js +63 -0
- package/dist/extensions/sat-mining/src/sat-bond-layout.js +9 -9
- package/dist/extensions/sat-mining/src/solana-submit.js +3 -52
- 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/server-discovery.js +2 -2
- package/dist/gateway/server-http.js +4 -4
- package/dist/gateway/server-methods/chat.js +6 -6
- package/dist/gateway/server-methods/sessions.js +6 -6
- 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/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 +1 -1
- package/dist/line/accounts.js +2 -2
- package/dist/line/download.js +2 -2
- package/dist/logging/config.js +3 -3
- package/dist/logging/logger.js +7 -7
- package/dist/managed/federation.js +3 -3
- package/dist/managed/tunnel.js +3 -3
- package/dist/media/store.js +13 -13
- package/dist/media-understanding/runner.js +3 -3
- package/dist/memory/embeddings.js +2 -2
- package/dist/memory/internal.js +10 -10
- package/dist/memory/inventory.js +25 -4
- package/dist/memory/manager-sync-ops.js +7 -7
- package/dist/memory/repair-executor.js +17 -17
- package/dist/mining/mainnet-sync.js +70 -26
- 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-DzLdrOVC.js → accounts-DI5226U8.js} +1 -1
- package/dist/plugin-sdk/{actions-PhofTgnO.js → actions-CEj4gOU2.js} +2 -2
- package/dist/plugin-sdk/{active-listener-C8a74qPO.js → active-listener-Ss4UKXZb.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-CARAVcz-.js → audio-preflight-Cu4alGjb.js} +26 -26
- package/dist/plugin-sdk/{audit-ByK45Q1d.js → audit-BTskqjJ_.js} +1 -1
- package/dist/plugin-sdk/{channel-access-BEin0yA4.js → channel-access-B1KciKmw.js} +1 -1
- package/dist/plugin-sdk/{channel-access-configure-Di_DoR-Q.js → channel-access-configure-Y91FLOJc.js} +1 -1
- package/dist/plugin-sdk/channel-plugin-common.d.ts +2 -2
- package/dist/plugin-sdk/channel-plugin-common.js +4 -4
- package/dist/plugin-sdk/{chunk-CwN3c1Fq.js → chunk-CSUjIQSx.js} +1 -1
- package/dist/plugin-sdk/{chunk-items-DH7ooQBZ.js → chunk-items-Q8HhMuSe.js} +1 -1
- package/dist/plugin-sdk/command-status.js +26 -26
- package/dist/plugin-sdk/{commands-registry-Bea-V_lR.js → commands-registry-DJ0pfCcY.js} +2 -2
- package/dist/plugin-sdk/{common-BJPuBxmx.js → common-Cjm8psuW.js} +1 -1
- package/dist/plugin-sdk/{config-BxOWD3gF.js → config-DutIeFge.js} +21 -3
- package/dist/plugin-sdk/{config-schema-ChJcPn7x.js → config-schema-Cg6PYSHR.js} +85 -64
- 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 +19 -19
- package/dist/plugin-sdk/{handle-action-Bk-L2J84.js → handle-action-Dp2741iu.js} +13 -13
- package/dist/plugin-sdk/{helpers-0E444CR0.js → helpers-BCZ9d3fl.js} +1 -1
- package/dist/plugin-sdk/{image-ops-BYc-Ol7C.js → image-ops-B-QR_M9Z.js} +1 -1
- package/dist/plugin-sdk/index.d.ts +20 -20
- package/dist/plugin-sdk/index.js +28 -28
- package/dist/plugin-sdk/json-store.js +6 -6
- package/dist/plugin-sdk/{login-B_At7IVI.js → login-BFvQxf9o.js} +3 -3
- package/dist/plugin-sdk/{login-qr-BlSQ8QJF.js → login-qr-CERTe_nD.js} +3 -3
- package/dist/plugin-sdk/{manager-VNI6sxbG.js → manager-Dhq3SXpO.js} +2 -2
- package/dist/plugin-sdk/{markdown-tables-CpNefu6e.js → markdown-tables-B1Tx7c77.js} +1 -1
- package/dist/plugin-sdk/{media-QBCmvhBQ.js → media-BwsqooWC.js} +2 -2
- package/dist/plugin-sdk/{monitor-C9UczH5N.js → monitor-BYzN5Qr4.js} +31 -31
- package/dist/plugin-sdk/{monitor-BhHlerHI.js → monitor-CJiacqtR.js} +30 -30
- package/dist/plugin-sdk/{openresponses-http-CtuFHD5w.js → openresponses-http-VLSSqCZZ.js} +26 -26
- package/dist/plugin-sdk/{optional-runtime-dependency-BaVO1F3i.js → optional-runtime-dependency-BEBP4VFJ.js} +1 -1
- package/dist/plugin-sdk/{outbound-CWrcAWpE.js → outbound-BqWgaC5M.js} +6 -6
- package/dist/plugin-sdk/{outbound-attachment-Dhi2Q-_f.js → outbound-attachment-L1q40kiu.js} +2 -2
- package/dist/plugin-sdk/{pairing-message-D01_6FkJ.js → pairing-message-CZBahREg.js} +1 -1
- package/dist/plugin-sdk/{pairing-message-6XVXW554.d.ts → pairing-message-DWXHX-jt.d.ts} +1 -1
- package/dist/plugin-sdk/{pairing-store-DADXOv-J.js → pairing-store-D7I1Qmiw.js} +2 -2
- package/dist/plugin-sdk/{pi-model-discovery-D9-CQFS2.js → pi-model-discovery-C5klknQZ.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-runtime-DhNNXQgq.js → pi-model-discovery-runtime-DIEMhCZ5.js} +2 -2
- package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +1 -1
- package/dist/plugin-sdk/{pw-ai-CQG7vp-Y.js → pw-ai-Bv-q25gY.js} +3 -3
- package/dist/plugin-sdk/{replies-C_FeIOF4.js → replies-Bd9ktEkq.js} +2 -2
- package/dist/plugin-sdk/{resolve-outbound-target-DD8edEdz.js → resolve-outbound-target-CCIyBb5H.js} +1 -1
- package/dist/plugin-sdk/{resolve-route-BPkfG5Pg.js → resolve-route-B7vZ3nKp.js} +1 -1
- package/dist/plugin-sdk/{retry-policy-C0YsRX_6.js → retry-policy-ChC3G4lv.js} +1 -1
- package/dist/plugin-sdk/{runtime-CyTWeylK.js → runtime-BLknHFGz.js} +3 -3
- package/dist/plugin-sdk/{runtime-dependency-D6tYtvtU.js → runtime-dependency-C5rJfC0u.js} +2 -2
- package/dist/plugin-sdk/sat-runtime.d.ts +3 -2
- package/dist/plugin-sdk/sat-runtime.js +5 -5
- package/dist/plugin-sdk/{send-CNxLDNQ9.js → send-Bd3Z-jAd.js} +6 -6
- package/dist/plugin-sdk/{send-Qckp3h4k.js → send-Bmtz9ICm.js} +8 -8
- package/dist/plugin-sdk/{send-BedQ8ekw.js → send-CMoWt-EX.js} +7 -7
- package/dist/plugin-sdk/{send-FcEJfLTd.js → send-CUGEhiUa.js} +6 -6
- package/dist/plugin-sdk/{send-BtFuV6zU.js → send-mkyZzhCO.js} +5 -5
- package/dist/plugin-sdk/{session-C3Ul4abD.js → session-D2zmelOL.js} +2 -2
- package/dist/plugin-sdk/{skill-commands-C2CnUTPX.js → skill-commands-BybEjJ1_.js} +2 -2
- package/dist/plugin-sdk/{slack-bSeSOI9d.js → slack-DogXvGG3.js} +38 -38
- package/dist/plugin-sdk/{slack-actions-CLyEd8FK.js → slack-actions-uXb55QWW.js} +11 -11
- package/dist/plugin-sdk/slack.d.ts +4 -4
- package/dist/plugin-sdk/slack.js +9 -9
- package/dist/plugin-sdk/{sticker-cache-DBnS3hHh.js → sticker-cache-BuPw7fTf.js} +3 -3
- package/dist/plugin-sdk/{tables-L5mXZ5y_.js → tables-CVDOT5dX.js} +1 -1
- package/dist/plugin-sdk/{targets-eG595pY0.js → targets-DskkhJAp.js} +1 -1
- package/dist/plugin-sdk/{telegram-actions-D0Kyqy_e.js → telegram-actions-_KQPbjpI.js} +29 -29
- package/dist/plugin-sdk/telegram.d.ts +4 -4
- package/dist/plugin-sdk/telegram.js +8 -8
- package/dist/plugin-sdk/{thread-bindings.lifecycle-C_5BEWmL.js → thread-bindings.lifecycle-CrhQXYEU.js} +3 -3
- package/dist/plugin-sdk/{thread-bindings.state-DRZAbcUu.js → thread-bindings.state-ssxdG7xV.js} +2 -2
- package/dist/plugin-sdk/{tmp-fased-dir-BpMLNd4L.d.ts → tmp-fased-dir-Be1wBhVz.d.ts} +1 -1
- package/dist/plugin-sdk/{types-0CsXVmg8.d.ts → types-CJGVZX6j.d.ts} +1 -1
- package/dist/plugin-sdk/{types-DMLEeE52.d.ts → types-CXLEOrJX.d.ts} +1 -1
- package/dist/plugin-sdk/{wallet-status-2yrXvqSS.js → wallet-status-CQI89c_6.js} +70 -28
- package/dist/plugin-sdk/{web-CSRe4zy2.js → web-C8DwA0eO.js} +31 -31
- package/dist/plugin-sdk/{whatsapp-actions-CkLkpg8M.js → whatsapp-actions-DfvM-mlZ.js} +13 -13
- package/dist/plugin-sdk/{whatsapp-heartbeat-DuAE9_88.js → whatsapp-heartbeat-DyJasLDB.js} +2 -2
- package/dist/plugin-sdk/whatsapp.d.ts +13 -13
- package/dist/plugin-sdk/whatsapp.js +12 -12
- package/dist/plugin-sdk/{wsl-CXVwPntb.js → wsl-JwmI6Zu8.js} +3 -3
- package/dist/plugin-sdk/{zod-schema.providers-core-FaYR6KdD.d.ts → zod-schema.providers-core-BE_5DNhj.d.ts} +80 -80
- package/dist/plugins/bundled-dir.js +3 -3
- package/dist/plugins/discovery.js +11 -11
- package/dist/plugins/loader.js +13 -13
- package/dist/plugins/manifest-registry.js +2 -2
- package/dist/plugins/manifest.js +4 -4
- package/dist/plugins/path-safety.js +3 -3
- package/dist/plugins/status-cache.js +9 -9
- package/dist/plugins/update.js +3 -3
- package/dist/plugins/web-search-install-catalog.js +3 -3
- 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.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/index.ts +1 -1
- package/extensions/sat-mining/package.json +1 -1
- package/extensions/sat-mining/src/protocol-contract.ts +64 -0
- package/extensions/sat-mining/src/round-watcher.ts +6 -4
- package/extensions/sat-mining/src/solana-submit.ts +7 -53
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolvePreferredFasedAgentTmpDir } from "../infra/tmp-fased-dir.js";
|
|
2
|
-
import
|
|
2
|
+
import fs from "node:fs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
|
|
5
5
|
//#region src/cli/nodes-media-utils.ts
|
|
@@ -18,7 +18,7 @@ function asBoolean(value) {
|
|
|
18
18
|
function resolveTempPathParts(opts) {
|
|
19
19
|
const tmpDir = opts.tmpDir ?? resolvePreferredFasedAgentTmpDir();
|
|
20
20
|
if (!opts.tmpDir) {
|
|
21
|
-
|
|
21
|
+
fs.mkdirSync(tmpDir, {
|
|
22
22
|
recursive: true,
|
|
23
23
|
mode: 448
|
|
24
24
|
});
|
package/dist/cli/plugins-cli.js
CHANGED
|
@@ -22,7 +22,7 @@ import "./plugins-config.js";
|
|
|
22
22
|
import { pluginDoctorCommand } from "./plugins-doctor-cli.js";
|
|
23
23
|
import { pluginInfoCommand } from "./plugins-info-cli.js";
|
|
24
24
|
import "./plugins-status-cli.js";
|
|
25
|
-
import
|
|
25
|
+
import fs from "node:fs";
|
|
26
26
|
import os from "node:os";
|
|
27
27
|
import path from "node:path";
|
|
28
28
|
|
|
@@ -428,7 +428,7 @@ function registerPluginsCli(program) {
|
|
|
428
428
|
const normalized = fileSpec && fileSpec.ok ? fileSpec.path : raw;
|
|
429
429
|
const resolved = resolveUserPath(normalized);
|
|
430
430
|
const cfg = loadConfig();
|
|
431
|
-
if (
|
|
431
|
+
if (fs.existsSync(resolved)) {
|
|
432
432
|
if (opts.link) {
|
|
433
433
|
const probe = await installPluginFromPath({
|
|
434
434
|
path: resolved,
|
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({
|
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;) {
|
|
@@ -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
|
|
@@ -10,28 +10,28 @@ import { resolveSessionFilePath, resolveSessionFilePathOptions, resolveSessionTr
|
|
|
10
10
|
import { loadSessionStore } from "../config/sessions/store.js";
|
|
11
11
|
import "../config/sessions.js";
|
|
12
12
|
import { note } from "../terminal/note.js";
|
|
13
|
-
import
|
|
13
|
+
import fs from "node:fs";
|
|
14
14
|
import os from "node:os";
|
|
15
15
|
import path from "node:path";
|
|
16
16
|
|
|
17
17
|
//#region src/commands/doctor-state-integrity.ts
|
|
18
18
|
function existsDir(dir) {
|
|
19
19
|
try {
|
|
20
|
-
return
|
|
20
|
+
return fs.existsSync(dir) && fs.statSync(dir).isDirectory();
|
|
21
21
|
} catch {
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
function existsFile(filePath) {
|
|
26
26
|
try {
|
|
27
|
-
return
|
|
27
|
+
return fs.existsSync(filePath) && fs.statSync(filePath).isFile();
|
|
28
28
|
} catch {
|
|
29
29
|
return false;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
function canWriteDir(dir) {
|
|
33
33
|
try {
|
|
34
|
-
|
|
34
|
+
fs.accessSync(dir, fs.constants.W_OK);
|
|
35
35
|
return true;
|
|
36
36
|
} catch {
|
|
37
37
|
return false;
|
|
@@ -39,7 +39,7 @@ function canWriteDir(dir) {
|
|
|
39
39
|
}
|
|
40
40
|
function ensureDir(dir) {
|
|
41
41
|
try {
|
|
42
|
-
|
|
42
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
43
43
|
return { ok: true };
|
|
44
44
|
} catch (err) {
|
|
45
45
|
return {
|
|
@@ -52,7 +52,7 @@ function dirPermissionHint(dir) {
|
|
|
52
52
|
const uid = typeof process.getuid === "function" ? process.getuid() : null;
|
|
53
53
|
const gid = typeof process.getgid === "function" ? process.getgid() : null;
|
|
54
54
|
try {
|
|
55
|
-
const stat =
|
|
55
|
+
const stat = fs.statSync(dir);
|
|
56
56
|
if (uid !== null && stat.uid !== uid) {
|
|
57
57
|
return `Owner mismatch (uid ${stat.uid}). Run: sudo chown -R $USER "${dir}"`;
|
|
58
58
|
}
|
|
@@ -70,7 +70,7 @@ function addUserRwx(mode) {
|
|
|
70
70
|
}
|
|
71
71
|
function countJsonlLines(filePath) {
|
|
72
72
|
try {
|
|
73
|
-
const raw =
|
|
73
|
+
const raw = fs.readFileSync(filePath, "utf-8");
|
|
74
74
|
if (!raw) {
|
|
75
75
|
return 0;
|
|
76
76
|
}
|
|
@@ -95,7 +95,7 @@ function findOtherStateDirs(stateDir) {
|
|
|
95
95
|
for (const root of roots) {
|
|
96
96
|
let entries = [];
|
|
97
97
|
try {
|
|
98
|
-
entries =
|
|
98
|
+
entries = fs.readdirSync(root, { withFileTypes: true });
|
|
99
99
|
} catch {
|
|
100
100
|
continue;
|
|
101
101
|
}
|
|
@@ -225,9 +225,9 @@ async function noteStateIntegrity(cfg, prompter, configPath) {
|
|
|
225
225
|
});
|
|
226
226
|
if (repair) {
|
|
227
227
|
try {
|
|
228
|
-
const stat =
|
|
228
|
+
const stat = fs.statSync(stateDir);
|
|
229
229
|
const target = addUserRwx(stat.mode);
|
|
230
|
-
|
|
230
|
+
fs.chmodSync(stateDir, target);
|
|
231
231
|
changes.push(`- Repaired permissions on ${displayStateDir}`);
|
|
232
232
|
} catch (err) {
|
|
233
233
|
warnings.push(`- Failed to repair ${displayStateDir}: ${String(err)}`);
|
|
@@ -236,10 +236,10 @@ async function noteStateIntegrity(cfg, prompter, configPath) {
|
|
|
236
236
|
}
|
|
237
237
|
if (stateDirExists && process.platform !== "win32") {
|
|
238
238
|
try {
|
|
239
|
-
const dirLstat =
|
|
239
|
+
const dirLstat = fs.lstatSync(stateDir);
|
|
240
240
|
const isDirSymlink = dirLstat.isSymbolicLink();
|
|
241
|
-
const stat = isDirSymlink ?
|
|
242
|
-
const resolvedDir = isDirSymlink ?
|
|
241
|
+
const stat = isDirSymlink ? fs.statSync(stateDir) : dirLstat;
|
|
242
|
+
const resolvedDir = isDirSymlink ? fs.realpathSync(stateDir) : stateDir;
|
|
243
243
|
const isImmutableStore = resolvedDir.startsWith("/nix/store/");
|
|
244
244
|
if (!isImmutableStore && (stat.mode & 63) !== 0) {
|
|
245
245
|
warnings.push(`- State directory permissions are too open (${displayStateDir}). Recommend chmod 700.`);
|
|
@@ -248,7 +248,7 @@ async function noteStateIntegrity(cfg, prompter, configPath) {
|
|
|
248
248
|
initialValue: true
|
|
249
249
|
});
|
|
250
250
|
if (tighten) {
|
|
251
|
-
|
|
251
|
+
fs.chmodSync(stateDir, 448);
|
|
252
252
|
changes.push(`- Tightened permissions on ${displayStateDir} to 700`);
|
|
253
253
|
}
|
|
254
254
|
}
|
|
@@ -258,10 +258,10 @@ async function noteStateIntegrity(cfg, prompter, configPath) {
|
|
|
258
258
|
}
|
|
259
259
|
if (configPath && existsFile(configPath) && process.platform !== "win32") {
|
|
260
260
|
try {
|
|
261
|
-
const configLstat =
|
|
261
|
+
const configLstat = fs.lstatSync(configPath);
|
|
262
262
|
const isSymlink = configLstat.isSymbolicLink();
|
|
263
|
-
const stat = isSymlink ?
|
|
264
|
-
const resolvedConfig = isSymlink ?
|
|
263
|
+
const stat = isSymlink ? fs.statSync(configPath) : configLstat;
|
|
264
|
+
const resolvedConfig = isSymlink ? fs.realpathSync(configPath) : configPath;
|
|
265
265
|
const isImmutableConfig = resolvedConfig.startsWith("/nix/store/");
|
|
266
266
|
if (!isImmutableConfig && (stat.mode & 63) !== 0) {
|
|
267
267
|
warnings.push(`- Config file is group/world readable (${displayConfigPath ?? configPath}). Recommend chmod 600.`);
|
|
@@ -270,7 +270,7 @@ async function noteStateIntegrity(cfg, prompter, configPath) {
|
|
|
270
270
|
initialValue: true
|
|
271
271
|
});
|
|
272
272
|
if (tighten) {
|
|
273
|
-
|
|
273
|
+
fs.chmodSync(configPath, 384);
|
|
274
274
|
changes.push(`- Tightened permissions on ${displayConfigPath ?? configPath} to 600`);
|
|
275
275
|
}
|
|
276
276
|
}
|
|
@@ -329,9 +329,9 @@ async function noteStateIntegrity(cfg, prompter, configPath) {
|
|
|
329
329
|
});
|
|
330
330
|
if (repair) {
|
|
331
331
|
try {
|
|
332
|
-
const stat =
|
|
332
|
+
const stat = fs.statSync(dir);
|
|
333
333
|
const target = addUserRwx(stat.mode);
|
|
334
|
-
|
|
334
|
+
fs.chmodSync(dir, target);
|
|
335
335
|
changes.push(`- Repaired permissions on ${label}: ${displayDir}`);
|
|
336
336
|
} catch (err) {
|
|
337
337
|
warnings.push(`- Failed to repair ${displayDir}: ${String(err)}`);
|
|
@@ -409,7 +409,7 @@ async function noteStateIntegrity(cfg, prompter, configPath) {
|
|
|
409
409
|
referencedTranscriptPaths.add(path.resolve(resolveSessionFilePath(entry.sessionId, entry, sessionPathOpts)));
|
|
410
410
|
} catch {}
|
|
411
411
|
}
|
|
412
|
-
const sessionDirEntries =
|
|
412
|
+
const sessionDirEntries = fs.readdirSync(sessionsDir, { withFileTypes: true });
|
|
413
413
|
const orphanTranscriptPaths = sessionDirEntries.filter((entry) => entry.isFile() && isPrimarySessionTranscriptFileName(entry.name)).map((entry) => path.resolve(path.join(sessionsDir, entry.name))).filter((filePath) => !referencedTranscriptPaths.has(filePath));
|
|
414
414
|
if (orphanTranscriptPaths.length > 0) {
|
|
415
415
|
warnings.push(`- Found ${orphanTranscriptPaths.length} orphan transcript file(s) in ${displaySessionsDir}. They are not referenced by sessions.json and can consume disk over time.`);
|
|
@@ -423,7 +423,7 @@ async function noteStateIntegrity(cfg, prompter, configPath) {
|
|
|
423
423
|
for (const orphanPath of orphanTranscriptPaths) {
|
|
424
424
|
const archivedPath = `${orphanPath}.deleted.${archivedAt}`;
|
|
425
425
|
try {
|
|
426
|
-
|
|
426
|
+
fs.renameSync(orphanPath, archivedPath);
|
|
427
427
|
archived += 1;
|
|
428
428
|
} catch (err) {
|
|
429
429
|
warnings.push(`- Failed to archive orphan transcript ${shortenHomePath(orphanPath)}: ${String(err)}`);
|
|
@@ -447,7 +447,7 @@ function noteWorkspaceBackupTip(workspaceDir) {
|
|
|
447
447
|
return;
|
|
448
448
|
}
|
|
449
449
|
const gitMarker = path.join(workspaceDir, ".git");
|
|
450
|
-
if (
|
|
450
|
+
if (fs.existsSync(gitMarker)) {
|
|
451
451
|
return;
|
|
452
452
|
}
|
|
453
453
|
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
|
}
|
|
@@ -12,7 +12,7 @@ import { upsertAuthProfile } from "../agents/auth-profiles/profiles.js";
|
|
|
12
12
|
import "../agents/auth-profiles.js";
|
|
13
13
|
import { PROVIDER_ENV_VARS } from "../secrets/provider-env-vars.js";
|
|
14
14
|
import { MISTRAL_DEFAULT_MODEL_REF, XAI_DEFAULT_MODEL_REF } from "./onboard-auth.models.js";
|
|
15
|
-
import
|
|
15
|
+
import fs from "node:fs";
|
|
16
16
|
import path from "node:path";
|
|
17
17
|
|
|
18
18
|
//#region src/commands/onboard-auth.credentials.ts
|
|
@@ -75,7 +75,7 @@ function buildApiKeyCredential(provider, input, metadata, options) {
|
|
|
75
75
|
/** Resolve real path, returning null if the target doesn't exist. */
|
|
76
76
|
function safeRealpathSync(dir) {
|
|
77
77
|
try {
|
|
78
|
-
return
|
|
78
|
+
return fs.realpathSync(path.resolve(dir));
|
|
79
79
|
} catch {
|
|
80
80
|
return null;
|
|
81
81
|
}
|
|
@@ -88,7 +88,7 @@ function resolveSiblingAgentDirs(primaryAgentDir) {
|
|
|
88
88
|
const agentsRoot = looksLikeStandardLayout ? candidateAgentsRoot : path.join(resolveStateDir(), "agents");
|
|
89
89
|
const entries = (() => {
|
|
90
90
|
try {
|
|
91
|
-
return
|
|
91
|
+
return fs.readdirSync(agentsRoot, { withFileTypes: true });
|
|
92
92
|
} catch {
|
|
93
93
|
return [];
|
|
94
94
|
}
|
|
@@ -7,7 +7,7 @@ import { createPluginLoaderLogger } from "../../plugins/logger.js";
|
|
|
7
7
|
import { resolveChannelPluginExpectedPluginIds } from "../../channels/plugins/catalog.js";
|
|
8
8
|
import { buildNpmResolutionInstallFields } from "../../plugins/installs.js";
|
|
9
9
|
import { finalizeInstalledPluginConfig } from "../../plugins/lifecycle.js";
|
|
10
|
-
import
|
|
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);
|
|
@@ -5,7 +5,7 @@ import { resolveBrewExecutable } from "../infra/brew.js";
|
|
|
5
5
|
import { createWriteStream } from "node:fs";
|
|
6
6
|
import os from "node:os";
|
|
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 { pipeline } from "node:stream/promises";
|
|
10
10
|
import { request } from "node:https";
|
|
11
11
|
|
|
@@ -79,7 +79,7 @@ async function findSignalCliBinary(root) {
|
|
|
79
79
|
if (depth > 3) {
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
const entries = await fs.readdir(dir, { withFileTypes: true }).catch(() => []);
|
|
82
|
+
const entries = await fs$1.readdir(dir, { withFileTypes: true }).catch(() => []);
|
|
83
83
|
for (const entry of entries) {
|
|
84
84
|
const full = path.join(dir, entry.name);
|
|
85
85
|
if (entry.isDirectory()) {
|
|
@@ -103,7 +103,7 @@ async function resolveBrewSignalCliPath(brewExe) {
|
|
|
103
103
|
const prefix = result.stdout.trim();
|
|
104
104
|
const candidate = path.join(prefix, "bin", "signal-cli");
|
|
105
105
|
try {
|
|
106
|
-
await fs.access(candidate);
|
|
106
|
+
await fs$1.access(candidate);
|
|
107
107
|
return candidate;
|
|
108
108
|
} catch {
|
|
109
109
|
return findSignalCliBinary(prefix);
|
|
@@ -172,12 +172,12 @@ async function installSignalCliFromRelease(runtime) {
|
|
|
172
172
|
error: "No compatible release asset found for this platform."
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
-
const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "fased-signal-"));
|
|
175
|
+
const tmpDir = await fs$1.mkdtemp(path.join(os.tmpdir(), "fased-signal-"));
|
|
176
176
|
const archivePath = path.join(tmpDir, asset.name);
|
|
177
177
|
runtime.log(`Downloading signal-cli ${version} (${asset.name})…`);
|
|
178
178
|
await downloadToFile(asset.browser_download_url, archivePath);
|
|
179
179
|
const installRoot = path.join(CONFIG_DIR, "tools", "signal-cli", version);
|
|
180
|
-
await fs.mkdir(installRoot, { recursive: true });
|
|
180
|
+
await fs$1.mkdir(installRoot, { recursive: true });
|
|
181
181
|
if (!looksLikeArchive(asset.name.toLowerCase())) {
|
|
182
182
|
return {
|
|
183
183
|
ok: false,
|
|
@@ -200,7 +200,7 @@ async function installSignalCliFromRelease(runtime) {
|
|
|
200
200
|
error: `signal-cli binary not found after extracting ${asset.name}`
|
|
201
201
|
};
|
|
202
202
|
}
|
|
203
|
-
await fs.chmod(cliPath, 493).catch(() => {});
|
|
203
|
+
await fs$1.chmod(cliPath, 493).catch(() => {});
|
|
204
204
|
return {
|
|
205
205
|
ok: true,
|
|
206
206
|
cliPath,
|
|
@@ -4,7 +4,7 @@ import { formatTimeAgo } from "../../infra/format-time/format-relative.js";
|
|
|
4
4
|
import { resolveChannelDefaultAccountId } from "../../channels/plugins/helpers.js";
|
|
5
5
|
import { buildChannelAccountSnapshot, formatChannelAllowFrom } from "../../channels/account-summary.js";
|
|
6
6
|
import "./format.js";
|
|
7
|
-
import
|
|
7
|
+
import fs from "node:fs";
|
|
8
8
|
|
|
9
9
|
//#region src/commands/status-all/channels.ts
|
|
10
10
|
const asRecord = (value) => value && typeof value === "object" ? value : {};
|
|
@@ -27,7 +27,7 @@ function existsSyncMaybe(p) {
|
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
29
29
|
try {
|
|
30
|
-
return
|
|
30
|
+
return fs.existsSync(path);
|
|
31
31
|
} catch {
|
|
32
32
|
return null;
|
|
33
33
|
}
|