@fased/fased 0.1.67 → 0.1.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +20 -22
- package/config/sat-runtime.env +6 -2
- package/config/signer-protocol-v2.json +10 -0
- package/dist/agents/tools/wallet-action-tool.js +2 -0
- package/dist/agents/tools/wallet-tool.js +5 -3
- package/dist/brand.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/cli/program/register.wallet.js +119 -5
- package/dist/commands/wallet.js +1286 -74
- package/dist/config/sat-runtime-ids.js +6 -1
- package/dist/control-ui/assets/{app-De8gTtZU.js → app-BLFLoFPk.js} +1526 -1526
- package/dist/control-ui/assets/{federation-DgA9e-Pn.js → federation-SGMAnM_8.js} +2 -2
- package/dist/control-ui/assets/{index-DYYBRBOS.js → index-S88kp5ZQ.js} +3 -3
- package/dist/control-ui/assets/{mining-Dg-3ll0F.js → mining-ClI8RW4u.js} +2 -2
- package/dist/control-ui/assets/{wallet-DvStR_AT.js → wallet-CRIhDQbW.js} +325 -156
- package/dist/control-ui/index.html +1 -1
- package/dist/control-ui/version.json +1 -1
- package/dist/gateway/server-http.js +394 -55
- package/dist/mining/mainnet-sync.js +67 -5
- package/dist/operator/operator-readiness.js +1 -1
- package/dist/plugin-sdk/{actions-DRu135h0.js → actions-B-Vwj64K.js} +3 -3
- package/dist/plugin-sdk/{allow-list-DyAxs4yw.js → allow-list-Bf45HfoP.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-Dq_rJtqH.js → audio-preflight-CS7Q_7-R.js} +26 -25
- package/dist/plugin-sdk/{audit-C5d2z5U1.js → audit-CUULWG22.js} +1 -1
- package/dist/plugin-sdk/{channel-access-configure-DaI5wevh.js → channel-access-configure-BoUsC-Ys.js} +1 -1
- package/dist/plugin-sdk/{channel-adapters.discord-BS4S4Svh.js → channel-adapters.discord-DSiR4X2Y.js} +1 -1
- package/dist/plugin-sdk/channel-plugin-common.d.ts +2 -2
- package/dist/plugin-sdk/channel-plugin-common.js +1 -1
- package/dist/plugin-sdk/{chunk-CyoyqpbG.js → chunk-CBpl-AiQ.js} +1 -1
- package/dist/plugin-sdk/{chunk-items-Dunoq4Er.js → chunk-items-BLBZNORg.js} +1 -1
- package/dist/plugin-sdk/command-status.js +26 -25
- package/dist/plugin-sdk/{commands-registry-BfqdEWdF.js → commands-registry-G5KXSi_y.js} +1 -1
- package/dist/plugin-sdk/{config-schema--vl89M7d.js → config-schema-BiBOUW89.js} +431 -125
- package/dist/plugin-sdk/device-pair.d.ts +1 -1
- package/dist/plugin-sdk/{diagnostic-DLL_zekv.js → diagnostic-sYs6Agr-.js} +1 -1
- package/dist/plugin-sdk/{directory-live-CSuYxdwk.js → directory-live-BXMpuYAF.js} +1 -1
- package/dist/plugin-sdk/{directory-live-Dw7ZgC9_.js → directory-live-Rn1BzPof.js} +1 -1
- package/dist/plugin-sdk/discord.d.ts +4 -4
- package/dist/plugin-sdk/discord.js +20 -20
- package/dist/plugin-sdk/{draft-stream-controls-BqchW1vi.js → draft-stream-controls-CMNdKSx-.js} +1 -1
- package/dist/plugin-sdk/{guilds-CDhRIX57.js → guilds-Dkwl0yHv.js} +1 -1
- package/dist/plugin-sdk/{handle-action-hvwapMKg.js → handle-action-CRdM6B-8.js} +15 -15
- package/dist/plugin-sdk/index.d.ts +15 -15
- package/dist/plugin-sdk/index.js +28 -27
- package/dist/plugin-sdk/{login-Ca583Okc.js → login-D7WnK8-P.js} +1 -1
- package/dist/plugin-sdk/{login-qr-CGciBSNP.js → login-qr-CRueOKZK.js} +2 -114
- package/dist/plugin-sdk/{markdown-tables-DCOXEUfZ.js → markdown-tables-d7GlUs5R.js} +1 -1
- package/dist/plugin-sdk/{media-CAdQF5TG.js → media-BAoaxCrt.js} +1 -1
- package/dist/plugin-sdk/{monitor-DrTy_4CL.js → monitor-WXdn4mR-.js} +34 -33
- package/dist/plugin-sdk/{monitor-CV1sr0p2.js → monitor-xzVAPbg2.js} +44 -43
- package/dist/plugin-sdk/{openresponses-http-BAjgURZa.js → openresponses-http-DnI1LFgq.js} +26 -25
- package/dist/plugin-sdk/{outbound-attachment-QqTnIhZL.js → outbound-attachment-CyXM3cAv.js} +1 -1
- package/dist/plugin-sdk/{outbound-BgVDdHxx.js → outbound-zB6llMGW.js} +6 -6
- package/dist/plugin-sdk/{pairing-message-BjIJYVvp.d.ts → pairing-message-CiTcdD6m.d.ts} +1 -1
- package/dist/plugin-sdk/{pairing-store-BChahgI2.js → pairing-store-B6J2C0vP.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-runtime-DxTMz_XF.js → pi-model-discovery-runtime-6JzLw9Gk.js} +1 -1
- package/dist/plugin-sdk/{probe-CJb5uR8B.js → probe-BM7Oe40M.js} +2 -2
- package/dist/plugin-sdk/{probe-l_whvGLY.js → probe-CMPksimh.js} +1 -1
- package/dist/plugin-sdk/{probe-BFroeK3g.js → probe-oVp12D6L.js} +1 -1
- package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +1 -1
- package/dist/plugin-sdk/{pw-ai-DlxqX6Es.js → pw-ai-DZYLDC-S.js} +1 -1
- package/dist/plugin-sdk/qr-image-B4MlMG4N.js +115 -0
- package/dist/plugin-sdk/{replies-ChYo5ZQM.js → replies-CY-V0Zob.js} +3 -3
- package/dist/plugin-sdk/{resolve-channels-87LZrFk_.js → resolve-channels-1HtDcMqh.js} +2 -2
- package/dist/plugin-sdk/{resolve-channels-_-nV-EK2.js → resolve-channels-CU72Qh2j.js} +1 -1
- package/dist/plugin-sdk/{resolve-outbound-target-D-KGgHJZ.js → resolve-outbound-target-nQSBVYz9.js} +2 -2
- package/dist/plugin-sdk/{resolve-route-C8tvQm8Z.js → resolve-route-Dufnu2cT.js} +1 -1
- package/dist/plugin-sdk/{resolve-users-DN9VQBwv.js → resolve-users-Bk_ss2vC.js} +1 -1
- package/dist/plugin-sdk/{resolve-users-V6dHh_2B.js → resolve-users-IevCOk4W.js} +2 -2
- package/dist/plugin-sdk/{runtime-2B9_WKoI.js → runtime-CXSQwMaR.js} +1 -1
- package/dist/plugin-sdk/{runtime-dependency-nup8niQL.js → runtime-dependency-DczkvPxn.js} +9 -9
- package/dist/plugin-sdk/sat-runtime.d.ts +105 -10
- package/dist/plugin-sdk/sat-runtime.js +26 -25
- package/dist/plugin-sdk/{send-DCO441U7.js → send-BXBS_mRK.js} +8 -8
- package/dist/plugin-sdk/{send-CFzGKJXo.js → send-D-HfKQZm.js} +4 -4
- package/dist/plugin-sdk/{send-B6KkGKZD.js → send-D1j12ZgX.js} +5 -5
- package/dist/plugin-sdk/{send-q9HXrSwK.js → send-DWKm6yay.js} +10 -10
- package/dist/plugin-sdk/{send-gDoGA-7e.js → send-Di1Jit3L.js} +7 -7
- package/dist/plugin-sdk/{skill-commands-FKEPLS7T.js → skill-commands-iJtvpqgb.js} +2 -2
- package/dist/plugin-sdk/{slack-DSC6T2KW.js → slack-CkIRVDUK.js} +45 -44
- package/dist/plugin-sdk/{slack-actions-DhbMcp8M.js → slack-actions-BzUEszJa.js} +10 -10
- package/dist/plugin-sdk/slack.d.ts +4 -4
- package/dist/plugin-sdk/slack.js +6 -6
- package/dist/plugin-sdk/{sticker-cache-C0l_5IKg.js → sticker-cache-Dpap5ce_.js} +2 -2
- package/dist/plugin-sdk/{tables-B3jr0Pvq.js → tables-_1W36GII.js} +2 -2
- package/dist/plugin-sdk/{targets-CtSbTxYX.js → targets-DDbNnLnB.js} +2 -2
- package/dist/plugin-sdk/{telegram-actions-BwGBIVDE.js → telegram-actions-Cewdga8H.js} +30 -29
- package/dist/plugin-sdk/telegram.d.ts +4 -4
- package/dist/plugin-sdk/telegram.js +3 -3
- package/dist/plugin-sdk/{thread-bindings.lifecycle-QbkNl-m6.js → thread-bindings.lifecycle-Y9T3CQGf.js} +3 -3
- package/dist/plugin-sdk/{thread-bindings.state-D9hg_M1c.js → thread-bindings.state-D2oOWDpv.js} +1 -1
- package/dist/plugin-sdk/{tmp-fased-dir-DXnGKKgi.d.ts → tmp-fased-dir-BSEHc8MQ.d.ts} +8 -2
- package/dist/plugin-sdk/{types-eG9aYqXF.d.ts → types-BakzIzGN.d.ts} +1 -1
- package/dist/plugin-sdk/{types-Cegc86EP.d.ts → types-CzF0YQqK.d.ts} +3 -3
- package/dist/plugin-sdk/{web-C_AH5PyB.js → web-DGWi7i3B.js} +33 -32
- package/dist/plugin-sdk/{whatsapp-actions-Bj_rOncr.js → whatsapp-actions-Blu9-eX-.js} +9 -9
- package/dist/plugin-sdk/{whatsapp-heartbeat-B1WHkJIg.js → whatsapp-heartbeat-DjmQM7hq.js} +2 -2
- package/dist/plugin-sdk/whatsapp.d.ts +9 -9
- package/dist/plugin-sdk/whatsapp.js +7 -7
- package/dist/plugin-sdk/{wsl-J-HscWxS.js → wsl-CTvIWvZz.js} +1 -1
- package/dist/plugin-sdk/{zod-schema.providers-core-FaYR6KdD.d.ts → zod-schema.providers-core-CIzCjXH9.d.ts} +61 -61
- package/dist/wallet/local-socket-signer-lifecycle.js +107 -3
- package/dist/wallet/local-socket-signer-protocol.js +97 -10
- package/dist/wallet/mining-wallet-retirement.js +256 -0
- package/dist/wallet/providers/local-socket-signer-adapter.js +10 -0
- package/dist/wallet/signer-network-admin.js +11 -118
- package/dist/wallet/signer-protocol-v2.generated.js +10 -0
- package/dist/wallet/solana-assets.js +9 -3
- package/dist/wallet/solana-rpc-read-fetch.js +65 -0
- package/dist/wallet/wallet-agent-selection.js +6 -10
- package/dist/wallet/wallet-provider-registry.js +70 -29
- package/dist/wallet/wallet-send-approvals.js +6 -2
- package/dist/wallet/wallet-status.js +63 -1
- package/dist/web/login-qr.js +1 -1
- package/dist/wizard/onboarding.js +86 -84
- package/dist/wizard/onboarding.wallet.js +10 -1
- 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/install.sh +286 -107
- package/package.json +4 -2
- package/scripts/fased-managed-updater.mjs +10 -2
- package/scripts/install-fased-signerd.sh +4 -8
- package/scripts/install-managed-runtime.mjs +10 -7
- package/scripts/install-runtime-profile.sh +27 -0
- package/scripts/start-managed.sh +13 -1
- /package/dist/plugin-sdk/{active-listener-B_NMtgPL.js → active-listener-p9Ooc1qj.js} +0 -0
- /package/dist/plugin-sdk/{blocks-input-Bg-8S2pl.js → blocks-input-DiZaqaN7.js} +0 -0
- /package/dist/plugin-sdk/{channel-access-CcFRdRPO.js → channel-access-B0aZBSd2.js} +0 -0
- /package/dist/plugin-sdk/{channel-activity-DBDMQ3yI.js → channel-activity-F07DjroV.js} +0 -0
- /package/dist/plugin-sdk/{channel-core-CFRs8LPy.js → channel-core-DoF4X04L.js} +0 -0
- /package/dist/plugin-sdk/{client-pI228AVT.js → client-DLY-kWF_.js} +0 -0
- /package/dist/plugin-sdk/{command-poll-backoff-yJU83wEq.js → command-poll-backoff-NAePk3eL.js} +0 -0
- /package/dist/plugin-sdk/{date-time-uUevHscU.js → date-time-ChY_tHoG.js} +0 -0
- /package/dist/plugin-sdk/{draft-stream-loop-CrOPfV3F.js → draft-stream-loop-DMBwjjd1.js} +0 -0
- /package/dist/plugin-sdk/{fetch-BtmoPIlf.js → fetch-B0v6OTUZ.js} +0 -0
- /package/dist/plugin-sdk/{filesystem-manager-DoI8IBNF.js → filesystem-manager-BzuIJ9K9.js} +0 -0
- /package/dist/plugin-sdk/{gateway-registry-DZDsqicG.js → gateway-registry-Bgl2GFgy.js} +0 -0
- /package/dist/plugin-sdk/{inbound-context-DrAcXE0y.js → inbound-context-CQnfFFQ9.js} +0 -0
- /package/dist/plugin-sdk/{pi-model-discovery-BX_JLcEJ.js → pi-model-discovery-BHNVyRny.js} +0 -0
- /package/dist/plugin-sdk/{polls-DKQXVfJp.js → polls-DXd67TD8.js} +0 -0
- /package/dist/plugin-sdk/{proxy-DWpYcsvR.js → proxy-CLRUdShp.js} +0 -0
- /package/dist/plugin-sdk/{qmd-manager-CgRaTxUq.js → qmd-manager-B8Vnu0ND.js} +0 -0
- /package/dist/plugin-sdk/{render-e7fENCYH.js → render-DrBfVs0u.js} +0 -0
- /package/dist/plugin-sdk/{reply-reference-Bqk-7HXE.js → reply-reference-BnAk5Wjb.js} +0 -0
- /package/dist/plugin-sdk/{retry-policy-C6SjKjQA.js → retry-policy-CXh1owkc.js} +0 -0
- /package/dist/plugin-sdk/{sandbox-paths-Dx2lUqCu.js → sandbox-paths-Bzh1CuZc.js} +0 -0
- /package/dist/plugin-sdk/{session-DHD4ZKyG.js → session-iuGR_rdi.js} +0 -0
- /package/dist/plugin-sdk/{shared-CBgp_GBw.js → shared-D1AD2Ejn.js} +0 -0
- /package/dist/plugin-sdk/{target-errors-Ckufe179.js → target-errors-DfS1sLR9.js} +0 -0
- /package/dist/plugin-sdk/{tool-loop-detection-Bp8bPJLs.js → tool-loop-detection-sDZl27w7.js} +0 -0
- /package/dist/plugin-sdk/{ui-Be8cLHIS.js → ui-GQDYm_jw.js} +0 -0
- /package/dist/plugin-sdk/{with-timeout-ckWB8rTo.js → with-timeout-CVV8tytk.js} +0 -0
|
@@ -7,12 +7,13 @@ import { ensureAuthProfileStore } from "../agents/auth-profiles/store.js";
|
|
|
7
7
|
import { readConfigFileSnapshot, writeConfigFile } from "../config/io.js";
|
|
8
8
|
import "../config/config.js";
|
|
9
9
|
import "../agents/auth-profiles.js";
|
|
10
|
-
import { ensureWalletStateDir,
|
|
11
|
-
import { checkNamedWalletDeletionSafety, deleteNamedWallet, readWalletProviderRegistry, resolveWalletUserRole,
|
|
10
|
+
import { ensureWalletStateDir, resolveLocalSignerMaterialRootDir, resolveLocalSignerSocketPath } from "../wallet/wallet-runtime-config.js";
|
|
11
|
+
import { checkNamedWalletDeletionSafety, deleteNamedWallet, readWalletProviderRegistry, resolveWalletUserRole, setNamedWalletRole, upsertNamedWallet } from "../wallet/wallet-provider-registry.js";
|
|
12
12
|
import { DEFAULT_WORKSPACE, applyWizardMetadata, ensureWorkspaceAndSessions, handleOnboardingRepair, printWizardHeader, probeGatewayReachable, summarizeExistingConfig } from "../commands/onboard-helpers.js";
|
|
13
13
|
import { configureSignerOwnedWalletNetwork } from "../wallet/signer-network-admin.js";
|
|
14
14
|
import { configureWalletForOnboarding, installSignerdBinary, resolveSignerdBinaryPath, restartLocalSocketSigner } from "./onboarding.wallet.js";
|
|
15
|
-
import { collectWalletSignerDoctorReport, walletSetupCommand } from "../commands/wallet.js";
|
|
15
|
+
import { collectWalletSignerDoctorReport, walletRecoveryExportCommand, walletSetupCommand } from "../commands/wallet.js";
|
|
16
|
+
import { lockSignerOwnedWalletForArchive } from "../wallet/local-socket-signer-archive.js";
|
|
16
17
|
import { promptAuthChoiceGrouped } from "../commands/auth-choice-prompt.js";
|
|
17
18
|
import { applyPrimaryModel, resolveAuthenticatedDefaultModel } from "../commands/model-picker.js";
|
|
18
19
|
import { logConfigUpdated } from "../config/logging.js";
|
|
@@ -26,7 +27,6 @@ import { promptCustomApiConfig } from "../commands/onboard-custom.js";
|
|
|
26
27
|
import { setupInternalHooks } from "../commands/onboard-hooks.js";
|
|
27
28
|
import { promptRemoteGatewayConfig } from "../commands/onboard-remote.js";
|
|
28
29
|
import { setupSkills } from "../commands/onboard-skills.js";
|
|
29
|
-
import { lockSignerOwnedWalletForArchive } from "../wallet/local-socket-signer-archive.js";
|
|
30
30
|
import { discoverSolanaNetworkFromRpc } from "../wallet/solana-network-discovery.js";
|
|
31
31
|
import { isHostedSecurityCapableSession } from "./host-security-capability.js";
|
|
32
32
|
import { noteBullet, noteCommand, noteHeading, noteLabel, noteStep, noteSuccess, noteWarn } from "./onboarding-note-format.js";
|
|
@@ -96,10 +96,6 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
96
96
|
}
|
|
97
97
|
return "FASED_WALLET_SOLANA_RPC_URL";
|
|
98
98
|
};
|
|
99
|
-
const executionFallbackRpcEnvKeyFor = (walletId) => {
|
|
100
|
-
const suffix = walletIdEnvSuffix(walletId);
|
|
101
|
-
return suffix ? `FASED_WALLET_SOLANA_EXECUTION_FALLBACK_RPC_URL__${suffix}` : "FASED_WALLET_SOLANA_EXECUTION_FALLBACK_RPC_URL";
|
|
102
|
-
};
|
|
103
99
|
const setConfigEnvVar = (cfg, key, value) => {
|
|
104
100
|
const vars = { ...cfg.env?.vars };
|
|
105
101
|
if (value == null || value === "") {
|
|
@@ -219,15 +215,6 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
219
215
|
process.env[rpcKey] = effectiveRpcUrl;
|
|
220
216
|
return effectiveRpcUrl;
|
|
221
217
|
};
|
|
222
|
-
const firstNonEmptyEnvValue = (...values) => {
|
|
223
|
-
for (const value of values) {
|
|
224
|
-
const normalized = String(value ?? "").trim();
|
|
225
|
-
if (normalized) {
|
|
226
|
-
return normalized;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
return undefined;
|
|
230
|
-
};
|
|
231
218
|
const readSatMiningConfig = (cfg) => {
|
|
232
219
|
const config = cfg.plugins?.entries?.["sat-mining"]?.config;
|
|
233
220
|
if (!config || typeof config !== "object" || Array.isArray(config)) {
|
|
@@ -960,7 +947,11 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
960
947
|
label: currentBondWalletId && currentBondWalletId !== walletId ? "Switch bond Vault here" : "Use for Fased Network bond",
|
|
961
948
|
hint: currentBondWalletId && currentBondWalletId !== walletId ? `Current bond Vault: ${currentBondWalletId}` : "Use this Vault wallet for longer-lived SAT bond authority."
|
|
962
949
|
}] : [],
|
|
963
|
-
{
|
|
950
|
+
targetWalletPurpose === "mining" ? {
|
|
951
|
+
value: "retire-mining",
|
|
952
|
+
label: "Retire and replace Mining wallet",
|
|
953
|
+
hint: "Stop and drain Mining, verify recovery and balances, tombstone the old signer wallet, then attach a ready successor."
|
|
954
|
+
} : {
|
|
964
955
|
value: "archive",
|
|
965
956
|
label: "Archive/remove from Fased",
|
|
966
957
|
hint: "Disable signer use first, then remove this wallet registration."
|
|
@@ -991,28 +982,23 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
991
982
|
currentValue: configuredSolanaRpcUrl
|
|
992
983
|
});
|
|
993
984
|
let signerNetworkVersion;
|
|
994
|
-
let signerNetworkRootCommand;
|
|
995
985
|
if (targetWallet.providerId === "local-socket-signer") {
|
|
996
986
|
const effectiveEnv = {
|
|
997
987
|
...process.env,
|
|
998
988
|
...nextConfig.env?.vars,
|
|
999
989
|
FASED_HOST_PROFILE: hostProfile
|
|
1000
990
|
};
|
|
1001
|
-
const
|
|
1002
|
-
const legacyExecutionFallbackKey = walletSuffix ? `FASED_WALLET_SOLANA_WRITE_RPC_FALLBACK_URL__${walletSuffix}` : "FASED_WALLET_SOLANA_WRITE_RPC_FALLBACK_URL";
|
|
1003
|
-
const network = configureSignerOwnedWalletNetwork({
|
|
991
|
+
const network = await configureSignerOwnedWalletNetwork({
|
|
1004
992
|
walletId,
|
|
1005
993
|
primaryRpcUrl: effectiveSolanaRpcUrl,
|
|
1006
|
-
executionFallbackRpcUrl: firstNonEmptyEnvValue(effectiveEnv[executionFallbackRpcEnvKeyFor(walletId)], effectiveEnv[legacyExecutionFallbackKey]),
|
|
1007
994
|
env: effectiveEnv,
|
|
1008
|
-
|
|
995
|
+
socketPath: resolveLocalSignerSocketPath(effectiveEnv)
|
|
1009
996
|
});
|
|
1010
997
|
signerNetworkVersion = network.version;
|
|
1011
|
-
signerNetworkRootCommand = network.rootCommand;
|
|
1012
998
|
} else {
|
|
1013
999
|
await restartLocalSocketSigner(ensureWalletStateDir(process.env).rootDir);
|
|
1014
1000
|
}
|
|
1015
|
-
await prompter.note([`Updated the app-side Solana RPC setting for ${targetWallet.name} (${walletId})${signerNetworkVersion ? `; signer network version ${signerNetworkVersion} is ready` : "."}
|
|
1001
|
+
await prompter.note([`Updated the app-side Solana RPC setting for ${targetWallet.name} (${walletId})${signerNetworkVersion ? `; signer network version ${signerNetworkVersion} is ready` : "."}`].join("\n"), "Wallet setup");
|
|
1016
1002
|
addAnotherWallet = await prompter.confirm({
|
|
1017
1003
|
message: "Run another wallet setup action?",
|
|
1018
1004
|
initialValue: false
|
|
@@ -1026,6 +1012,19 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
1026
1012
|
});
|
|
1027
1013
|
continue;
|
|
1028
1014
|
}
|
|
1015
|
+
if (manageAction === "retire-mining") {
|
|
1016
|
+
await prompter.note([
|
|
1017
|
+
"Mining retirement is a coordinated replacement, never a registry-only delete.",
|
|
1018
|
+
`Run: fased wallet recovery export --wallet-id ${targetWallet.id} --output <absolute-recovery-path>`,
|
|
1019
|
+
`Then run: fased wallet retire --wallet-id ${targetWallet.id} --successor-wallet-id <new-id> --successor-wallet-name <name> --recovery-file <absolute-recovery-path> --rpc-url <url>`,
|
|
1020
|
+
"The command stops new jobs, waits for Clearing and reconciliation, records balances, commits the signer tombstone, and attaches the ready successor."
|
|
1021
|
+
].join("\n"), "Retire and replace Mining wallet");
|
|
1022
|
+
addAnotherWallet = await prompter.confirm({
|
|
1023
|
+
message: "Run another wallet setup action?",
|
|
1024
|
+
initialValue: false
|
|
1025
|
+
});
|
|
1026
|
+
continue;
|
|
1027
|
+
}
|
|
1029
1028
|
if (manageAction === "attach-federation-bond") {
|
|
1030
1029
|
const agentDefaultWallet = readAgentDefaultWallet();
|
|
1031
1030
|
if (targetWalletPurpose !== "vault") {
|
|
@@ -1064,6 +1063,14 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
1064
1063
|
});
|
|
1065
1064
|
continue;
|
|
1066
1065
|
}
|
|
1066
|
+
if (resolveWalletUserRole(targetWallet) === "mining") {
|
|
1067
|
+
await prompter.note("Mining wallets cannot be archived or deleted directly. Use Retire and replace Mining wallet so the signer tombstone is committed before registry detachment.", "Mining retirement required");
|
|
1068
|
+
addAnotherWallet = await prompter.confirm({
|
|
1069
|
+
message: "Run another wallet setup action?",
|
|
1070
|
+
initialValue: false
|
|
1071
|
+
});
|
|
1072
|
+
continue;
|
|
1073
|
+
}
|
|
1067
1074
|
const archiveEnv = {
|
|
1068
1075
|
...process.env,
|
|
1069
1076
|
...nextConfig.env?.vars,
|
|
@@ -1160,8 +1167,8 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
1160
1167
|
}
|
|
1161
1168
|
attemptedSelfHostedSetupThisRun = true;
|
|
1162
1169
|
const chain = "solana";
|
|
1163
|
-
const walletPurpose =
|
|
1164
|
-
message: "Wallet
|
|
1170
|
+
const walletPurpose = await prompter.select({
|
|
1171
|
+
message: "Wallet role (required)",
|
|
1165
1172
|
options: [
|
|
1166
1173
|
{
|
|
1167
1174
|
value: "agent",
|
|
@@ -1175,9 +1182,11 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
1175
1182
|
value: "vault",
|
|
1176
1183
|
label: "Vault"
|
|
1177
1184
|
}
|
|
1178
|
-
]
|
|
1179
|
-
initialValue: "agent"
|
|
1185
|
+
]
|
|
1180
1186
|
});
|
|
1187
|
+
if (walletPurpose !== "agent" && walletPurpose !== "mining" && walletPurpose !== "vault") {
|
|
1188
|
+
throw new Error("Wallet role selection is required; Agent is never selected silently.");
|
|
1189
|
+
}
|
|
1181
1190
|
const selfHostedAction = await prompter.select({
|
|
1182
1191
|
message: "Wallet action",
|
|
1183
1192
|
options: [{
|
|
@@ -1193,7 +1202,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
1193
1202
|
const existingMiningWalletId = satMiningAttachment.walletId ?? "";
|
|
1194
1203
|
const existingMiningWallet = readWalletProviderRegistry(process.env).wallets.find((wallet) => wallet.id === "mining");
|
|
1195
1204
|
if (existingMiningWalletId || existingMiningWallet) {
|
|
1196
|
-
await prompter.note([`Mining wallet already exists: ${existingMiningWalletId || "mining"}.`, "
|
|
1205
|
+
await prompter.note([`Mining wallet already exists: ${existingMiningWalletId || "mining"}.`, "Open it to continue, or use the reviewed Replace/Archive flow after mining is stopped, rewards and capital are settled, and backup/readiness checks pass."].join("\n"), "Mining");
|
|
1197
1206
|
addAnotherWallet = await prompter.confirm({
|
|
1198
1207
|
message: "Run another wallet setup action?",
|
|
1199
1208
|
initialValue: false
|
|
@@ -1201,39 +1210,17 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
1201
1210
|
continue;
|
|
1202
1211
|
}
|
|
1203
1212
|
}
|
|
1204
|
-
const mode = "local-signer-create";
|
|
1213
|
+
const mode = selfHostedAction === "import" ? "local-signer-import" : "local-signer-create";
|
|
1205
1214
|
const walletIdentity = await resolveWalletIdentityForOnboarding({
|
|
1206
1215
|
flow,
|
|
1207
1216
|
purpose: walletPurpose
|
|
1208
1217
|
});
|
|
1209
1218
|
const walletName = walletIdentity.walletName;
|
|
1210
1219
|
const walletId = walletIdentity.walletId || undefined;
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
const controlSocket = hosting ? "/run/fased-signerd/control.sock" : resolveLocalSignerControlSocketPath(process.env);
|
|
1216
|
-
const signerImportCommand = [
|
|
1217
|
-
shellQuote(signerBin),
|
|
1218
|
-
"admin wallet import",
|
|
1219
|
-
`--control-socket ${shellQuote(controlSocket)}`,
|
|
1220
|
-
`--wallet-id ${shellQuote(effectiveWalletId)}`,
|
|
1221
|
-
`--locked-role ${shellQuote(walletPurpose)}`,
|
|
1222
|
-
`< ${shellQuote("/absolute/path/to/solana-keypair.json")}`
|
|
1223
|
-
].join(" ");
|
|
1224
|
-
const command = hosting ? `/usr/sbin/runuser -u fased-signer -- /usr/bin/env HOME=/var/lib/fased-signerd ${signerImportCommand}` : signerImportCommand;
|
|
1225
|
-
await prompter.note([
|
|
1226
|
-
"The normal Gateway and Node wizard paths do not accept plaintext wallet keys. Local same-user isolation is not a hard compromise boundary; Hosting isolates the signer account.",
|
|
1227
|
-
hosting ? "Open the VPS provider root console and run this root-administrator command. Do not run it from the app shell and do not grant app sudo:" : "Run this from an authenticated terminal on the signer host:",
|
|
1228
|
-
command,
|
|
1229
|
-
"Then rerun wallet setup and choose Manage wallet to register/verify the returned public address."
|
|
1230
|
-
].join("\n"), "Native signer import");
|
|
1231
|
-
addAnotherWallet = await prompter.confirm({
|
|
1232
|
-
message: "Run another wallet setup action?",
|
|
1233
|
-
initialValue: false
|
|
1234
|
-
});
|
|
1235
|
-
continue;
|
|
1236
|
-
}
|
|
1220
|
+
const importFile = selfHostedAction === "import" ? (await prompter.text({
|
|
1221
|
+
message: "Absolute path to owner-only Solana keypair JSON",
|
|
1222
|
+
validate: (value) => value.trim().startsWith("/") ? undefined : "Enter an absolute path and run chmod 600 on the file first"
|
|
1223
|
+
})).trim() : undefined;
|
|
1237
1224
|
const rpcKey = rpcEnvKeyFor(chain, walletId);
|
|
1238
1225
|
const currentRpcValue = (nextConfig.env?.vars?.[rpcKey] ?? "").trim() || String(process.env[rpcKey] ?? "").trim();
|
|
1239
1226
|
const rpcUrlInput = (await prompter.text({
|
|
@@ -1245,8 +1232,6 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
1245
1232
|
if (!effectiveRpcUrl) {
|
|
1246
1233
|
throw new Error(`${chain.toUpperCase()} RPC URL is required for wallets.`);
|
|
1247
1234
|
}
|
|
1248
|
-
nextConfig = setConfigEnvVar(nextConfig, rpcKey, effectiveRpcUrl);
|
|
1249
|
-
process.env[rpcKey] = effectiveRpcUrl;
|
|
1250
1235
|
try {
|
|
1251
1236
|
if (mode === "local-signer-create") {
|
|
1252
1237
|
try {
|
|
@@ -1256,6 +1241,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
1256
1241
|
walletId,
|
|
1257
1242
|
walletName,
|
|
1258
1243
|
rpcUrl: effectiveRpcUrl,
|
|
1244
|
+
role: walletPurpose,
|
|
1259
1245
|
force: true,
|
|
1260
1246
|
noDoctor: true,
|
|
1261
1247
|
noSignerHints: true,
|
|
@@ -1277,6 +1263,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
1277
1263
|
walletId,
|
|
1278
1264
|
walletName,
|
|
1279
1265
|
rpcUrl: effectiveRpcUrl,
|
|
1266
|
+
role: walletPurpose,
|
|
1280
1267
|
force: true,
|
|
1281
1268
|
noDoctor: true,
|
|
1282
1269
|
noSignerHints: true,
|
|
@@ -1286,17 +1273,22 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
1286
1273
|
throw err;
|
|
1287
1274
|
}
|
|
1288
1275
|
}
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1276
|
+
} else {
|
|
1277
|
+
await walletSetupCommand(runtime, {
|
|
1278
|
+
mode,
|
|
1279
|
+
chain,
|
|
1280
|
+
walletId,
|
|
1281
|
+
walletName,
|
|
1282
|
+
role: walletPurpose,
|
|
1283
|
+
rpcUrl: effectiveRpcUrl,
|
|
1284
|
+
importFile,
|
|
1285
|
+
noDoctor: true,
|
|
1286
|
+
noSignerHints: true,
|
|
1287
|
+
nonInteractive: true
|
|
1288
|
+
});
|
|
1299
1289
|
}
|
|
1290
|
+
nextConfig = setConfigEnvVar(nextConfig, rpcKey, effectiveRpcUrl);
|
|
1291
|
+
process.env[rpcKey] = effectiveRpcUrl;
|
|
1300
1292
|
walletCeremonyEvents.push({
|
|
1301
1293
|
mode,
|
|
1302
1294
|
chain,
|
|
@@ -1307,6 +1299,25 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
1307
1299
|
ok: true
|
|
1308
1300
|
});
|
|
1309
1301
|
createdOrImportedSelfHostedWalletThisRun = true;
|
|
1302
|
+
if (hostProfile !== "hosting") {
|
|
1303
|
+
const exportRecovery = await prompter.confirm({
|
|
1304
|
+
message: "Create an encrypted recovery package now?",
|
|
1305
|
+
initialValue: true
|
|
1306
|
+
});
|
|
1307
|
+
if (exportRecovery) {
|
|
1308
|
+
const defaultRecoveryPath = path.join(process.env.HOME || process.cwd(), `fased-${walletId ?? walletPurpose}-recovery.json`);
|
|
1309
|
+
const recoveryOutput = (await prompter.text({
|
|
1310
|
+
message: "New encrypted recovery package path",
|
|
1311
|
+
initialValue: defaultRecoveryPath,
|
|
1312
|
+
validate: (value) => path.isAbsolute(value.trim()) ? undefined : "Enter an absolute path for a new file"
|
|
1313
|
+
})).trim();
|
|
1314
|
+
await walletRecoveryExportCommand(runtime, {
|
|
1315
|
+
walletId: walletId ?? walletPurpose,
|
|
1316
|
+
output: recoveryOutput
|
|
1317
|
+
});
|
|
1318
|
+
await prompter.note([`Encrypted recovery package: ${recoveryOutput}`, "Keep the recovery password separately. The file contains ciphertext, wallet id, role, public address, and format metadata; it never contains plaintext key material."].join("\n"), "Wallet recovery");
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1310
1321
|
const agentDefaultBefore = readAgentDefaultWallet();
|
|
1311
1322
|
const existingWallet = readWalletProviderRegistry(process.env).wallets.find((entry) => entry.id === walletId);
|
|
1312
1323
|
upsertNamedWallet({
|
|
@@ -1323,20 +1334,11 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
1323
1334
|
await restartLocalSocketSigner(ensureWalletStateDir(process.env).rootDir);
|
|
1324
1335
|
const isAgentWallet = walletPurpose === "agent";
|
|
1325
1336
|
if (walletPurpose === "agent") {
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
});
|
|
1332
|
-
await prompter.note(`Primary Agent wallet set to ${walletName} (${walletId ?? "default"}).`, "Wallet");
|
|
1333
|
-
} else {
|
|
1334
|
-
await prompter.note([
|
|
1335
|
-
`Agent wallet created as ${walletName} (${walletId ?? "default"}).`,
|
|
1336
|
-
`Primary Agent wallet remains ${describeWalletRef(agentDefaultBefore)}.`,
|
|
1337
|
-
`Use @wallet:${walletId ?? "default"} when you want this wallet explicitly.`
|
|
1338
|
-
].join("\n"), "Wallet");
|
|
1339
|
-
}
|
|
1337
|
+
await prompter.note([
|
|
1338
|
+
`Agent wallet created as ${walletName} (${walletId ?? "default"}).`,
|
|
1339
|
+
`Default Agent wallet fallback remains ${describeWalletRef(agentDefaultBefore)}.`,
|
|
1340
|
+
`Use @wallet:${walletId ?? "default"} explicitly, assign it to an Agent or skill, or set it as the optional fallback in Wallet.`
|
|
1341
|
+
].join("\n"), "Wallet");
|
|
1340
1342
|
}
|
|
1341
1343
|
if (walletId) {
|
|
1342
1344
|
setNamedWalletRole({
|
|
@@ -5,6 +5,7 @@ import "../config/config.js";
|
|
|
5
5
|
import { hasLegacyEmbeddedKeystoreMaterialHint, throwLegacyEmbeddedKeystoreMigrationRequired } from "../wallet/legacy-embedded-keystore.js";
|
|
6
6
|
import { ensureWalletStateDir, isLocalSignerExternallyManaged, resolveLocalSignerControlSocketPath, resolveLocalSignerMasterKeyPath, resolveLocalSignerMaterialRootDir, resolveLocalSignerSidecarPaths, resolveLocalSignerSocketPath, resolveLocalSignerStateDbPath } from "../wallet/wallet-runtime-config.js";
|
|
7
7
|
import { WALLET_PROVIDER_IDS, readWalletProviderRegistry, setWalletProvidersEnabled } from "../wallet/wallet-provider-registry.js";
|
|
8
|
+
import { SAT_RUNTIME_ENV_KEYS, SAT_RUNTIME_TRUST_ENV_KEYS } from "../config/sat-runtime-ids.js";
|
|
8
9
|
import { callLocalSocketSigner } from "../wallet/providers/local-socket-signer-adapter.js";
|
|
9
10
|
import { resolveWalletProviderId } from "../wallet/wallet-provider-resolver.js";
|
|
10
11
|
import { fileURLToPath } from "node:url";
|
|
@@ -400,7 +401,7 @@ function resolveSignerChildEnv(materialDir, env = process.env, cfg = loadConfig(
|
|
|
400
401
|
}
|
|
401
402
|
for (const [key, rawValue] of Object.entries(mergedEnv)) {
|
|
402
403
|
const value = String(rawValue ?? "").trim();
|
|
403
|
-
const isSignerRuntimeConfig = key.startsWith("FASED_WALLET_LOCAL_SIGNER_RATE_") || key === "FASED_WALLET_LOCAL_SIGNER_AUDIT_MAX_BYTES" || key === "FASED_WALLET_SOLANA_CONFIRM_TIMEOUT_MS" || key === "FASED_WALLET_SOLANA_WRITE_RPC_TIMEOUT_MS";
|
|
404
|
+
const isSignerRuntimeConfig = key.startsWith("FASED_WALLET_LOCAL_SIGNER_RATE_") || key === "FASED_WALLET_LOCAL_SIGNER_AUDIT_MAX_BYTES" || key === "FASED_WALLET_SOLANA_CONFIRM_TIMEOUT_MS" || key === "FASED_WALLET_SOLANA_WRITE_RPC_TIMEOUT_MS" || [...Object.values(SAT_RUNTIME_ENV_KEYS), ...Object.values(SAT_RUNTIME_TRUST_ENV_KEYS)].includes(key);
|
|
404
405
|
if (value && isSignerRuntimeConfig) {
|
|
405
406
|
childEnv[key] = value;
|
|
406
407
|
}
|
|
@@ -486,6 +487,14 @@ function renderLocalSignerEnvFile(params) {
|
|
|
486
487
|
...materialDir !== walletRoot ? [`export FASED_WALLET_SIGNER_STATE_DIR=${quoteSignerEnvValue(materialDir)}`] : [],
|
|
487
488
|
`export FASED_WALLET_CHAINS=${quoteSignerEnvValue(String(childEnv.FASED_WALLET_CHAINS ?? "solana").trim() || "solana")}`,
|
|
488
489
|
...webAuthn ? [`export FASED_WALLET_WEBAUTHN_RP_ID=${quoteSignerEnvValue(webAuthn.rpId)}`, `export FASED_WALLET_WEBAUTHN_ORIGINS=${quoteSignerEnvValue(webAuthn.origins)}`] : [],
|
|
490
|
+
...Object.values(SAT_RUNTIME_ENV_KEYS).flatMap((key) => {
|
|
491
|
+
const value = String(childEnv[key] ?? "").trim();
|
|
492
|
+
return value ? [`export ${key}=${quoteSignerEnvValue(value)}`] : [];
|
|
493
|
+
}),
|
|
494
|
+
...Object.values(SAT_RUNTIME_TRUST_ENV_KEYS).flatMap((key) => {
|
|
495
|
+
const value = String(childEnv[key] ?? "").trim();
|
|
496
|
+
return value ? [`export ${key}=${quoteSignerEnvValue(value)}`] : [];
|
|
497
|
+
}),
|
|
489
498
|
"",
|
|
490
499
|
`${quoteSignerEnvValue(signerBinPath)} --socket "$FASED_WALLET_LOCAL_SIGNER_SOCKET" --control-socket "$FASED_WALLET_LOCAL_SIGNER_CONTROL_SOCKET" --state-db "$FASED_WALLET_LOCAL_SIGNER_STATE_DB" --master-key "$FASED_WALLET_LOCAL_SIGNER_MASTER_KEY"`
|
|
491
500
|
];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fased/memory-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.69",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "FasedAgent core memory search plugin",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@fased/fased": "^0.1.
|
|
8
|
+
"@fased/fased": "^0.1.69"
|
|
9
9
|
},
|
|
10
10
|
"fased": {
|
|
11
11
|
"extensions": [
|