@fased/fased 0.1.68 → 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 +15 -0
- package/README.md +20 -22
- package/config/sat-runtime.env +6 -2
- package/config/signer-protocol-v2.json +6 -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 +88 -5
- package/dist/commands/wallet.js +842 -57
- package/dist/config/sat-runtime-ids.js +6 -1
- package/dist/control-ui/assets/{app-DyPTS0oM.js → app-BLFLoFPk.js} +8 -8
- package/dist/control-ui/assets/{federation-DgA9e-Pn.js → federation-SGMAnM_8.js} +2 -2
- package/dist/control-ui/assets/{index-Cu13yYHr.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-ByKBcYhm.js → wallet-CRIhDQbW.js} +201 -116
- package/dist/control-ui/index.html +1 -1
- package/dist/control-ui/version.json +1 -1
- package/dist/gateway/server-http.js +46 -9
- package/dist/mining/mainnet-sync.js +67 -5
- package/dist/operator/operator-readiness.js +1 -1
- package/dist/plugin-sdk/{audio-preflight-_FVQjR1r.js → audio-preflight-CS7Q_7-R.js} +2 -2
- package/dist/plugin-sdk/channel-plugin-common.d.ts +2 -2
- package/dist/plugin-sdk/{chunk-items-LH4uKSnh.js → chunk-items-BLBZNORg.js} +1 -1
- package/dist/plugin-sdk/command-status.js +2 -2
- package/dist/plugin-sdk/{config-schema-DjU_uD-6.js → config-schema-BiBOUW89.js} +255 -47
- package/dist/plugin-sdk/device-pair.d.ts +1 -1
- package/dist/plugin-sdk/discord.d.ts +4 -4
- package/dist/plugin-sdk/index.d.ts +16 -16
- package/dist/plugin-sdk/index.js +2 -2
- package/dist/plugin-sdk/{monitor-DUMMbG4h.js → monitor-WXdn4mR-.js} +4 -4
- package/dist/plugin-sdk/{monitor-DXIM16Hj.js → monitor-xzVAPbg2.js} +6 -6
- package/dist/plugin-sdk/{openresponses-http-C8lKwta1.js → openresponses-http-DnI1LFgq.js} +2 -2
- package/dist/plugin-sdk/{pairing-message-mKO92L-M.d.ts → pairing-message-CiTcdD6m.d.ts} +1 -1
- package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +1 -1
- package/dist/plugin-sdk/{pw-ai-DJ_gTc4M.js → pw-ai-DZYLDC-S.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 +89 -10
- package/dist/plugin-sdk/sat-runtime.js +2 -2
- package/dist/plugin-sdk/{slack-B-nOOLM0.js → slack-CkIRVDUK.js} +4 -4
- package/dist/plugin-sdk/slack.d.ts +4 -4
- package/dist/plugin-sdk/{sticker-cache-BLiId8Em.js → sticker-cache-Dpap5ce_.js} +2 -2
- package/dist/plugin-sdk/{telegram-actions-1X9A32Dn.js → telegram-actions-Cewdga8H.js} +3 -3
- package/dist/plugin-sdk/telegram.d.ts +4 -4
- package/dist/plugin-sdk/{tmp-fased-dir-BkpWlGUe.d.ts → tmp-fased-dir-BSEHc8MQ.d.ts} +2 -2
- package/dist/plugin-sdk/{types-DtCOO_hW.d.ts → types-BakzIzGN.d.ts} +1 -1
- package/dist/plugin-sdk/{types-B-zL9gSv.d.ts → types-CzF0YQqK.d.ts} +2 -2
- package/dist/plugin-sdk/{web-BvjNyYBz.js → web-DGWi7i3B.js} +2 -2
- package/dist/plugin-sdk/whatsapp.d.ts +9 -9
- package/dist/plugin-sdk/{zod-schema.providers-core-BCDlgtls.d.ts → zod-schema.providers-core-CIzCjXH9.d.ts} +63 -63
- package/dist/wallet/local-socket-signer-lifecycle.js +79 -3
- package/dist/wallet/local-socket-signer-protocol.js +70 -10
- package/dist/wallet/mining-wallet-retirement.js +256 -0
- package/dist/wallet/providers/local-socket-signer-adapter.js +2 -0
- package/dist/wallet/signer-protocol-v2.generated.js +6 -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 +56 -1
- package/dist/wizard/onboarding.js +32 -30
- 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 +6 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +2 -2
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +6 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +6 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/sat-mining/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +6 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +6 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +6 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +6 -0
- package/extensions/zalouser/package.json +1 -1
- package/install.sh +276 -103
- package/package.json +4 -3
- package/scripts/install-fased-signerd.sh +4 -8
- package/scripts/install-runtime-profile.sh +27 -0
- package/scripts/start-managed.sh +13 -1
- package/scripts/fased-signer-wallet-import-hosting.sh +0 -78
|
@@ -49,7 +49,7 @@ import { c as normalizeExtraMemoryPaths, s as listMemoryFiles } from "./internal
|
|
|
49
49
|
import { i as resolveQmdScopeDenial } from "./qmd-scope-CdX34VCV.js";
|
|
50
50
|
import { _ as estimateBase64DecodedBytes, a as jsonResult, d as readStringParam, f as sanitizeContentBlocksImages, g as canonicalizeBase64, h as resolveImageSanitizationLimits, i as imageResultFromFile, l as readStringArrayParam, m as sanitizeToolResultImages, n as createActionGate, p as sanitizeImageBlocks, r as imageResult, s as readNumberParam, u as readStringOrNumberParam } from "./common-HCcXU-NR.js";
|
|
51
51
|
import { S as isCommandFlagEnabled, _ as normalizeElevatedLevel, a as listChatCommands, b as normalizeVerboseLevel, g as shouldHandleTextCommands, i as isCommandEnabled, l as maybeResolveTextAlias, m as resolveNativeCommandName, o as listChatCommandsForConfig, u as normalizeCommandBody, v as normalizeReasoningLevel, w as isRestartEnabled, x as resolveResponseUsageMode, y as normalizeUsageDisplay } from "./commands-registry-G5KXSi_y.js";
|
|
52
|
-
import { A as fetchJson$1, B as DEFAULT_BROWSER_EVALUATE_ENABLED, C as normalizeCdpWsUrl, D as assertBrowserNavigationResultAllowed, E as assertBrowserNavigationAllowed, F as stopChromeExtensionRelayServer, G as isLoopbackHost, H as DEFAULT_FASED_BROWSER_ENABLED, I as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, J as resolveClientIp, K as isSecureWebSocketUrl, L as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, O as withBrowserNavigationPolicy, P as ensureChromeExtensionRelayServer, R as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as InvalidBrowserNavigationUrlError, U as DEFAULT_FASED_BROWSER_PROFILE_NAME, V as DEFAULT_FASED_BROWSER_COLOR, W as isLoopbackAddress, X as rawDataToString, Y as resolveForwardedClientIp, _ as stopFasedAgentChrome, a as DEFAULT_TRACE_DIR, b as captureScreenshot, d as normalizeBrowserFormField, g as resolveFasedAgentUserDataDir, h as launchFasedAgentChrome, i as DEFAULT_DOWNLOAD_DIR, j as fetchOk, k as appendCdpPath, l as resolveWritablePathWithinRoot, m as isChromeReachable, o as DEFAULT_UPLOAD_DIR, p as isChromeCdpReady, q as isTrustedProxyAddress, r as loadReadability, s as resolveExistingPathsWithinRoot, t as loadLinkedom, v as resolveBrowserExecutableForPlatform, w as snapshotAria, x as createTargetViaCdp, y as resolveLsofCommandSync, z as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME } from "./runtime-dependency-
|
|
52
|
+
import { A as fetchJson$1, B as DEFAULT_BROWSER_EVALUATE_ENABLED, C as normalizeCdpWsUrl, D as assertBrowserNavigationResultAllowed, E as assertBrowserNavigationAllowed, F as stopChromeExtensionRelayServer, G as isLoopbackHost, H as DEFAULT_FASED_BROWSER_ENABLED, I as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, J as resolveClientIp, K as isSecureWebSocketUrl, L as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, O as withBrowserNavigationPolicy, P as ensureChromeExtensionRelayServer, R as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as InvalidBrowserNavigationUrlError, U as DEFAULT_FASED_BROWSER_PROFILE_NAME, V as DEFAULT_FASED_BROWSER_COLOR, W as isLoopbackAddress, X as rawDataToString, Y as resolveForwardedClientIp, _ as stopFasedAgentChrome, a as DEFAULT_TRACE_DIR, b as captureScreenshot, d as normalizeBrowserFormField, g as resolveFasedAgentUserDataDir, h as launchFasedAgentChrome, i as DEFAULT_DOWNLOAD_DIR, j as fetchOk, k as appendCdpPath, l as resolveWritablePathWithinRoot, m as isChromeReachable, o as DEFAULT_UPLOAD_DIR, p as isChromeCdpReady, q as isTrustedProxyAddress, r as loadReadability, s as resolveExistingPathsWithinRoot, t as loadLinkedom, v as resolveBrowserExecutableForPlatform, w as snapshotAria, x as createTargetViaCdp, y as resolveLsofCommandSync, z as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME } from "./runtime-dependency-DczkvPxn.js";
|
|
53
53
|
import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-DjgDArrp.js";
|
|
54
54
|
import { a as writeFileWithinRoot, n as openFileWithinRoot, r as readFileWithinRoot, t as SafeOpenError } from "./fs-safe-g4g7GT02.js";
|
|
55
55
|
import { a as fetchRemoteMedia, d as readResponseWithLimit, i as MediaFetchError, l as getAgentScopedMediaLocalRoots, n as loadWebMedia, t as getDefaultLocalRoots, u as getDefaultMediaLocalRoots } from "./media-BAoaxCrt.js";
|
|
@@ -97,7 +97,7 @@ import { AsyncLocalStorage } from "node:async_hooks";
|
|
|
97
97
|
import readline from "node:readline";
|
|
98
98
|
import { createJiti } from "jiti";
|
|
99
99
|
import { Type } from "@sinclair/typebox";
|
|
100
|
-
import WebSocket
|
|
100
|
+
import WebSocket, { WebSocket as WebSocket$1 } from "ws";
|
|
101
101
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
102
102
|
import net from "node:net";
|
|
103
103
|
import { request } from "node:https";
|
|
@@ -12570,7 +12570,7 @@ var GatewayClient = class {
|
|
|
12570
12570
|
if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
|
|
12571
12571
|
});
|
|
12572
12572
|
}
|
|
12573
|
-
this.ws = new WebSocket(url, wsOptions);
|
|
12573
|
+
this.ws = new WebSocket$1(url, wsOptions);
|
|
12574
12574
|
this.ws.on("open", () => {
|
|
12575
12575
|
if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
|
|
12576
12576
|
const tlsError = this.validateTlsFingerprint();
|
|
@@ -12766,7 +12766,7 @@ var GatewayClient = class {
|
|
|
12766
12766
|
const connectChallengeTimeoutMs = typeof rawConnectDelayMs === "number" && Number.isFinite(rawConnectDelayMs) ? Math.max(250, Math.min(1e4, rawConnectDelayMs)) : 2e3;
|
|
12767
12767
|
if (this.connectTimer) clearTimeout(this.connectTimer);
|
|
12768
12768
|
this.connectTimer = setTimeout(() => {
|
|
12769
|
-
if (this.connectSent || this.ws?.readyState !== WebSocket.OPEN) return;
|
|
12769
|
+
if (this.connectSent || this.ws?.readyState !== WebSocket$1.OPEN) return;
|
|
12770
12770
|
this.opts.onConnectError?.(/* @__PURE__ */ new Error("gateway connect challenge timeout"));
|
|
12771
12771
|
this.ws?.close(1008, "connect challenge timeout");
|
|
12772
12772
|
}, connectChallengeTimeoutMs);
|
|
@@ -12808,7 +12808,7 @@ var GatewayClient = class {
|
|
|
12808
12808
|
return null;
|
|
12809
12809
|
}
|
|
12810
12810
|
async request(method, params, opts) {
|
|
12811
|
-
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
|
|
12811
|
+
if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error("gateway not connected");
|
|
12812
12812
|
const id = randomUUID();
|
|
12813
12813
|
const frame = {
|
|
12814
12814
|
type: "req",
|
|
@@ -14972,6 +14972,11 @@ const SAT_RUNTIME_ENV_KEYS = {
|
|
|
14972
14972
|
mintAddress: "FASED_SAT_MINT_ADDRESS",
|
|
14973
14973
|
mintProgramId: "FASED_SAT_MINT_PROGRAM_ID"
|
|
14974
14974
|
};
|
|
14975
|
+
const SAT_RUNTIME_TRUST_ENV_KEYS = {
|
|
14976
|
+
manifestPath: "FASED_SAT_RUNTIME_MANIFEST_PATH",
|
|
14977
|
+
manifestSha256: "FASED_SAT_RUNTIME_MANIFEST_SHA256",
|
|
14978
|
+
manifestSignaturePath: "FASED_SAT_RUNTIME_MANIFEST_SIGNATURE_PATH"
|
|
14979
|
+
};
|
|
14975
14980
|
const MISSING_SAT_RUNTIME_IDS_MESSAGE = "SAT runtime IDs are not configured. Use Mining Sync after mainnet launch or set the complete SAT runtime env tuple for an explicit test network.";
|
|
14976
14981
|
function readExplicitSatRuntimeIds(env) {
|
|
14977
14982
|
const programId = String(env[SAT_RUNTIME_ENV_KEYS.programId] ?? "").trim();
|
|
@@ -15233,24 +15238,43 @@ function readLocalIds(env) {
|
|
|
15233
15238
|
function idsEqual(left, right) {
|
|
15234
15239
|
return Boolean(left && right && left.programId === right.programId && left.bondProgramId === right.bondProgramId && left.mintAddress === right.mintAddress && left.mintProgramId === right.mintProgramId);
|
|
15235
15240
|
}
|
|
15236
|
-
function buildEnvFile(ids) {
|
|
15241
|
+
function buildEnvFile(ids, trust) {
|
|
15237
15242
|
return [
|
|
15238
15243
|
"# Managed by Fased Agent official SAT mainnet sync.",
|
|
15239
15244
|
`${SAT_RUNTIME_ENV_KEYS.programId}=${ids.programId}`,
|
|
15240
15245
|
`${SAT_RUNTIME_ENV_KEYS.bondProgramId}=${ids.bondProgramId}`,
|
|
15241
15246
|
`${SAT_RUNTIME_ENV_KEYS.mintAddress}=${ids.mintAddress}`,
|
|
15242
15247
|
`${SAT_RUNTIME_ENV_KEYS.mintProgramId}=${ids.mintProgramId}`,
|
|
15248
|
+
`${SAT_RUNTIME_TRUST_ENV_KEYS.manifestPath}=${trust.manifestPath}`,
|
|
15249
|
+
`${SAT_RUNTIME_TRUST_ENV_KEYS.manifestSha256}=${trust.manifestSha256}`,
|
|
15250
|
+
`${SAT_RUNTIME_TRUST_ENV_KEYS.manifestSignaturePath}=${trust.manifestSignaturePath}`,
|
|
15243
15251
|
""
|
|
15244
15252
|
].join("\n");
|
|
15245
15253
|
}
|
|
15246
|
-
async function writeRuntimeIds(ids, env) {
|
|
15254
|
+
async function writeRuntimeIds(ids, env, trust) {
|
|
15247
15255
|
const runtimeFile = resolveWritableSatRuntimeDefaultsFile(env);
|
|
15256
|
+
const manifestPath = `${runtimeFile}.manifest.json`;
|
|
15257
|
+
const manifestSignaturePath = `${runtimeFile}.manifest.sig`;
|
|
15248
15258
|
await fs$1.mkdir(path.dirname(runtimeFile), { recursive: true });
|
|
15249
|
-
await fs$1.writeFile(
|
|
15259
|
+
await fs$1.writeFile(manifestPath, trust.rawManifest, { mode: 384 });
|
|
15260
|
+
await fs$1.writeFile(manifestSignaturePath, `${trust.signature.trim()}\n`, { mode: 384 });
|
|
15261
|
+
await fs$1.writeFile(runtimeFile, buildEnvFile(ids, {
|
|
15262
|
+
manifestPath,
|
|
15263
|
+
manifestSha256: trust.manifestSha256,
|
|
15264
|
+
manifestSignaturePath
|
|
15265
|
+
}), { mode: 384 });
|
|
15266
|
+
await Promise.all([
|
|
15267
|
+
fs$1.chmod(manifestPath, 384),
|
|
15268
|
+
fs$1.chmod(manifestSignaturePath, 384),
|
|
15269
|
+
fs$1.chmod(runtimeFile, 384)
|
|
15270
|
+
]);
|
|
15250
15271
|
env[SAT_RUNTIME_ENV_KEYS.programId] = ids.programId;
|
|
15251
15272
|
env[SAT_RUNTIME_ENV_KEYS.bondProgramId] = ids.bondProgramId;
|
|
15252
15273
|
env[SAT_RUNTIME_ENV_KEYS.mintAddress] = ids.mintAddress;
|
|
15253
15274
|
env[SAT_RUNTIME_ENV_KEYS.mintProgramId] = ids.mintProgramId;
|
|
15275
|
+
env[SAT_RUNTIME_TRUST_ENV_KEYS.manifestPath] = manifestPath;
|
|
15276
|
+
env[SAT_RUNTIME_TRUST_ENV_KEYS.manifestSha256] = trust.manifestSha256;
|
|
15277
|
+
env[SAT_RUNTIME_TRUST_ENV_KEYS.manifestSignaturePath] = manifestSignaturePath;
|
|
15254
15278
|
return runtimeFile;
|
|
15255
15279
|
}
|
|
15256
15280
|
async function getSatMainnetSyncStatus(opts) {
|
|
@@ -15350,7 +15374,43 @@ async function syncSatMainnetRuntimeIds(opts) {
|
|
|
15350
15374
|
ok: false,
|
|
15351
15375
|
message: before.state === "not_live" ? "Satcoin mainnet is not live yet." : before.message || "SAT mainnet manifest is not ready to apply."
|
|
15352
15376
|
};
|
|
15353
|
-
const
|
|
15377
|
+
const manifestUrl = opts?.manifestUrl?.trim() || resolveManifestUrl(env);
|
|
15378
|
+
const rawManifest = await fetchText(manifestUrl, { required: true });
|
|
15379
|
+
const manifestSha256 = parseSha256(await fetchText(`${manifestUrl}.sha256`, { required: true }));
|
|
15380
|
+
const signature = await fetchText(`${manifestUrl}.sig`, { required: true });
|
|
15381
|
+
if (!rawManifest || !manifestSha256 || !signature?.trim()) return {
|
|
15382
|
+
...before,
|
|
15383
|
+
ok: false,
|
|
15384
|
+
state: "failed",
|
|
15385
|
+
message: "Verified SAT manifest artifacts could not be persisted for the native signer.",
|
|
15386
|
+
error: "signed SAT runtime manifest, hash, or detached signature is missing"
|
|
15387
|
+
};
|
|
15388
|
+
const finalVerification = await verifyLiveManifest({
|
|
15389
|
+
manifestUrl,
|
|
15390
|
+
raw: rawManifest,
|
|
15391
|
+
env
|
|
15392
|
+
});
|
|
15393
|
+
if (finalVerification.verification.hash !== "valid" || finalVerification.verification.signature !== "valid" || sha256Hex(rawManifest) !== manifestSha256) return {
|
|
15394
|
+
...before,
|
|
15395
|
+
ok: false,
|
|
15396
|
+
state: "failed",
|
|
15397
|
+
message: "SAT manifest changed before signer runtime persistence.",
|
|
15398
|
+
verification: finalVerification.verification,
|
|
15399
|
+
trustKeySource: finalVerification.trustKeySource,
|
|
15400
|
+
error: "signed SAT runtime manifest verification raced or failed"
|
|
15401
|
+
};
|
|
15402
|
+
if (!idsEqual(readOfficialIds(JSON.parse(rawManifest)), before.officialIds)) return {
|
|
15403
|
+
...before,
|
|
15404
|
+
ok: false,
|
|
15405
|
+
state: "failed",
|
|
15406
|
+
message: "SAT manifest IDs changed before signer runtime persistence.",
|
|
15407
|
+
error: "signed SAT runtime ID tuple changed during sync"
|
|
15408
|
+
};
|
|
15409
|
+
const runtimeFile = await writeRuntimeIds(before.officialIds, env, {
|
|
15410
|
+
rawManifest,
|
|
15411
|
+
manifestSha256,
|
|
15412
|
+
signature
|
|
15413
|
+
});
|
|
15354
15414
|
const after = await getSatMainnetSyncStatus({
|
|
15355
15415
|
env,
|
|
15356
15416
|
manifestUrl: opts?.manifestUrl
|
|
@@ -16312,14 +16372,18 @@ const SignerPolicyAssetV2Schema = Type.Object({
|
|
|
16312
16372
|
asset: Type.String(),
|
|
16313
16373
|
destinations: Type.Array(Type.String()),
|
|
16314
16374
|
maxPerTx: Type.String(),
|
|
16315
|
-
maxDaily: Type.String()
|
|
16375
|
+
maxDaily: Type.String(),
|
|
16376
|
+
reviewedDestinations: Type.Optional(Type.Boolean()),
|
|
16377
|
+
typedSatDestinations: Type.Optional(Type.Boolean())
|
|
16316
16378
|
}, { additionalProperties: false });
|
|
16317
16379
|
const SignerPolicyInputV2Schema = Type.Object({
|
|
16318
16380
|
walletId: Type.Optional(Type.String()),
|
|
16319
16381
|
role: SignerWalletRoleSchema,
|
|
16320
16382
|
version: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
16383
|
+
baselineVersion: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
16321
16384
|
operations: Type.Array(Type.String()),
|
|
16322
16385
|
programs: Type.Array(Type.String()),
|
|
16386
|
+
typedSatPrograms: Type.Optional(Type.Boolean()),
|
|
16323
16387
|
assets: Type.Array(SignerPolicyAssetV2Schema),
|
|
16324
16388
|
hash: Type.Optional(Type.String())
|
|
16325
16389
|
}, { additionalProperties: false });
|
|
@@ -16327,8 +16391,10 @@ const LocalSocketSignerPolicyV2Schema = Type.Object({
|
|
|
16327
16391
|
walletId: Type.String(),
|
|
16328
16392
|
role: SignerWalletRoleSchema,
|
|
16329
16393
|
version: Type.Integer({ minimum: 1 }),
|
|
16394
|
+
baselineVersion: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
16330
16395
|
operations: Type.Array(Type.String()),
|
|
16331
16396
|
programs: Type.Array(Type.String()),
|
|
16397
|
+
typedSatPrograms: Type.Optional(Type.Boolean()),
|
|
16332
16398
|
assets: Type.Array(SignerPolicyAssetV2Schema),
|
|
16333
16399
|
hash: Type.String({ pattern: "^sha256:[0-9a-f]{64}$" })
|
|
16334
16400
|
}, { additionalProperties: false });
|
|
@@ -16514,10 +16580,13 @@ const SignerSolanaTransactionEnvelopeV2Schema = Type.Object({
|
|
|
16514
16580
|
}),
|
|
16515
16581
|
submission: Type.Literal("rpc")
|
|
16516
16582
|
}, { additionalProperties: false });
|
|
16517
|
-
const SignerReviewAuthorizationV2Schema = Type.Object({
|
|
16583
|
+
const SignerReviewAuthorizationV2Schema = Type.Union([Type.Object({
|
|
16518
16584
|
type: Type.Literal("webauthn"),
|
|
16519
16585
|
proof: Type.Object({ proofId: Type.String({ minLength: 1 }) }, { additionalProperties: false })
|
|
16520
|
-
}, { additionalProperties: false })
|
|
16586
|
+
}, { additionalProperties: false }), Type.Object({
|
|
16587
|
+
type: Type.Literal("control-ui"),
|
|
16588
|
+
proof: Type.Object({ proofId: Type.String({ pattern: "^[0-9a-f]{64}$" }) }, { additionalProperties: false })
|
|
16589
|
+
}, { additionalProperties: false })]);
|
|
16521
16590
|
const LocalSocketSignerJupiterTriggerHistoryV2Schema = Type.Object({ orders: Type.Array(Type.Object({
|
|
16522
16591
|
orderId: Type.String({ minLength: 1 }),
|
|
16523
16592
|
orderState: Type.String({ minLength: 1 }),
|
|
@@ -16542,10 +16611,17 @@ const LocalSocketSignerJupiterTriggerHistoryV2Schema = Type.Object({ orders: Typ
|
|
|
16542
16611
|
program: Type.String({ minLength: 1 })
|
|
16543
16612
|
}, { additionalProperties: false }))
|
|
16544
16613
|
}, { additionalProperties: false })) }, { additionalProperties: false });
|
|
16545
|
-
const
|
|
16614
|
+
const SignerRoleBaselineV1Schema = Type.Object({
|
|
16615
|
+
version: Type.Literal(1),
|
|
16616
|
+
role: SignerWalletRoleSchema
|
|
16617
|
+
}, { additionalProperties: false });
|
|
16618
|
+
const SignerWalletPolicyCreateV2Schema = Type.Union([Type.Object({
|
|
16546
16619
|
expectedPolicyVersion: Type.Literal(0),
|
|
16547
16620
|
policy: SignerPolicyInputV2Schema
|
|
16548
|
-
}, { additionalProperties: false })
|
|
16621
|
+
}, { additionalProperties: false }), Type.Object({
|
|
16622
|
+
expectedPolicyVersion: Type.Literal(0),
|
|
16623
|
+
baseline: SignerRoleBaselineV1Schema
|
|
16624
|
+
}, { additionalProperties: false })]);
|
|
16549
16625
|
const SignerOperationLookupV2Schema = Type.Object({ requestId: Type.String() }, { additionalProperties: false });
|
|
16550
16626
|
const SignerSatLookupBindingRequestV2Schema = Type.Object({
|
|
16551
16627
|
cycleId: Type.String({ pattern: "^(0|[1-9][0-9]*)$" }),
|
|
@@ -16624,6 +16700,18 @@ const LocalSocketSignerRequestSchema = Type.Union([
|
|
|
16624
16700
|
op: Type.Literal("v2.wallet.get"),
|
|
16625
16701
|
walletId: Type.String()
|
|
16626
16702
|
}, { additionalProperties: false }),
|
|
16703
|
+
Type.Object({
|
|
16704
|
+
op: Type.Literal("v2.wallet.readiness"),
|
|
16705
|
+
walletId: Type.String()
|
|
16706
|
+
}, { additionalProperties: false }),
|
|
16707
|
+
Type.Object({
|
|
16708
|
+
op: Type.Literal("v2.policy.activateBaseline"),
|
|
16709
|
+
walletId: Type.String(),
|
|
16710
|
+
request: Type.Object({
|
|
16711
|
+
expectedPolicyVersion: Type.Integer({ minimum: 1 }),
|
|
16712
|
+
baseline: SignerRoleBaselineV1Schema
|
|
16713
|
+
}, { additionalProperties: false })
|
|
16714
|
+
}, { additionalProperties: false }),
|
|
16627
16715
|
Type.Object({
|
|
16628
16716
|
op: Type.Literal("v2.wallet.create"),
|
|
16629
16717
|
walletId: Type.String(),
|
|
@@ -16632,21 +16720,30 @@ const LocalSocketSignerRequestSchema = Type.Union([
|
|
|
16632
16720
|
Type.Object({
|
|
16633
16721
|
op: Type.Literal("v2.wallet.import"),
|
|
16634
16722
|
walletId: Type.String(),
|
|
16635
|
-
request: Type.Object({
|
|
16723
|
+
request: Type.Union([Type.Object({
|
|
16636
16724
|
expectedPolicyVersion: Type.Literal(0),
|
|
16637
16725
|
policy: SignerPolicyInputV2Schema,
|
|
16638
16726
|
path: Type.String()
|
|
16639
|
-
}, { additionalProperties: false })
|
|
16727
|
+
}, { additionalProperties: false }), Type.Object({
|
|
16728
|
+
expectedPolicyVersion: Type.Literal(0),
|
|
16729
|
+
baseline: SignerRoleBaselineV1Schema,
|
|
16730
|
+
path: Type.String()
|
|
16731
|
+
}, { additionalProperties: false })])
|
|
16640
16732
|
}, { additionalProperties: false }),
|
|
16641
16733
|
Type.Object({
|
|
16642
16734
|
op: Type.Literal("v2.wallet.importLegacy"),
|
|
16643
16735
|
walletId: Type.String(),
|
|
16644
|
-
request: Type.Object({
|
|
16736
|
+
request: Type.Union([Type.Object({
|
|
16645
16737
|
expectedPolicyVersion: Type.Literal(0),
|
|
16646
16738
|
policy: SignerPolicyInputV2Schema,
|
|
16647
16739
|
path: Type.String(),
|
|
16648
16740
|
passphrasePath: Type.String()
|
|
16649
|
-
}, { additionalProperties: false })
|
|
16741
|
+
}, { additionalProperties: false }), Type.Object({
|
|
16742
|
+
expectedPolicyVersion: Type.Literal(0),
|
|
16743
|
+
baseline: SignerRoleBaselineV1Schema,
|
|
16744
|
+
path: Type.String(),
|
|
16745
|
+
passphrasePath: Type.String()
|
|
16746
|
+
}, { additionalProperties: false })])
|
|
16650
16747
|
}, { additionalProperties: false }),
|
|
16651
16748
|
Type.Object({
|
|
16652
16749
|
op: Type.Literal("v2.wallet.reencrypt"),
|
|
@@ -16926,6 +17023,27 @@ const LocalSocketSignerWalletPolicyResultV2Schema = Type.Object({
|
|
|
16926
17023
|
wallet: LocalSocketSignerWalletV2Schema,
|
|
16927
17024
|
policy: LocalSocketSignerPolicyV2Schema
|
|
16928
17025
|
}, { additionalProperties: false });
|
|
17026
|
+
const LocalSocketSignerWalletReadinessV2Schema = Type.Object({
|
|
17027
|
+
walletId: Type.String({ minLength: 1 }),
|
|
17028
|
+
publicKey: Type.String({ minLength: 1 }),
|
|
17029
|
+
walletVersion: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
17030
|
+
role: SignerWalletRoleSchema,
|
|
17031
|
+
baselineVersion: Type.Integer({ minimum: 0 }),
|
|
17032
|
+
policyVersion: Type.Integer({ minimum: 1 }),
|
|
17033
|
+
policyHash: Type.String({ pattern: "^sha256:[0-9a-f]{64}$" }),
|
|
17034
|
+
networkVersion: Type.Integer({ minimum: 0 }),
|
|
17035
|
+
networkHash: Type.Optional(Type.String({ pattern: "^hmac-sha256:[0-9a-f]{64}$" })),
|
|
17036
|
+
keyReady: Type.Boolean(),
|
|
17037
|
+
policyReady: Type.Boolean(),
|
|
17038
|
+
networkReady: Type.Boolean(),
|
|
17039
|
+
operationLane: Type.Union([
|
|
17040
|
+
Type.Literal("blocked"),
|
|
17041
|
+
Type.Literal("agent-reviewed-and-autonomous"),
|
|
17042
|
+
Type.Literal("mining-typed-sat"),
|
|
17043
|
+
Type.Literal("vault-reviewed-only")
|
|
17044
|
+
]),
|
|
17045
|
+
ready: Type.Boolean()
|
|
17046
|
+
}, { additionalProperties: false });
|
|
16929
17047
|
function isPositiveUnsignedInteger(value) {
|
|
16930
17048
|
return typeof value === "string" && /^[1-9][0-9]*$/.test(value);
|
|
16931
17049
|
}
|
|
@@ -16956,9 +17074,11 @@ function validateLocalSocketSignerResult(op, result) {
|
|
|
16956
17074
|
case "v2.network.bootstrap": return Value.Check(LocalSocketSignerNetworkSummaryV2Schema, result);
|
|
16957
17075
|
case "v2.policy.get":
|
|
16958
17076
|
case "v2.policy.put":
|
|
16959
|
-
case "v2.policy.tighten":
|
|
17077
|
+
case "v2.policy.tighten":
|
|
17078
|
+
case "v2.policy.activateBaseline": return Value.Check(LocalSocketSignerPolicyV2Schema, result);
|
|
16960
17079
|
case "v2.wallet.get":
|
|
16961
17080
|
case "v2.wallet.reencrypt": return Value.Check(LocalSocketSignerWalletV2Schema, result);
|
|
17081
|
+
case "v2.wallet.readiness": return Value.Check(LocalSocketSignerWalletReadinessV2Schema, result);
|
|
16962
17082
|
case "v2.wallet.create":
|
|
16963
17083
|
case "v2.wallet.import":
|
|
16964
17084
|
case "v2.wallet.importLegacy": return Value.Check(LocalSocketSignerWalletPolicyResultV2Schema, result);
|
|
@@ -16988,6 +17108,8 @@ const SIGNER_PROTOCOL_V2_REQUIRED_CLIENT_FEATURES = [
|
|
|
16988
17108
|
"atomicIdempotency",
|
|
16989
17109
|
"ambiguousBroadcastReconciliation",
|
|
16990
17110
|
"signerOwnedKeys",
|
|
17111
|
+
"signerOwnedRoleBaselines",
|
|
17112
|
+
"liveWalletReadiness",
|
|
16991
17113
|
"signerOwnedRPC",
|
|
16992
17114
|
"applicationNetworkBootstrap",
|
|
16993
17115
|
"typedSolanaTransactions",
|
|
@@ -17208,7 +17330,9 @@ const SIGNER_SOCKET_TIMEOUT_MS = {
|
|
|
17208
17330
|
"v2.policy.get": 5e3,
|
|
17209
17331
|
"v2.policy.put": 5e3,
|
|
17210
17332
|
"v2.policy.tighten": 5e3,
|
|
17333
|
+
"v2.policy.activateBaseline": 1e4,
|
|
17211
17334
|
"v2.wallet.get": 5e3,
|
|
17335
|
+
"v2.wallet.readiness": 5e3,
|
|
17212
17336
|
"v2.wallet.create": 1e4,
|
|
17213
17337
|
"v2.wallet.import": 2e4,
|
|
17214
17338
|
"v2.wallet.importLegacy": 3e4,
|
|
@@ -18004,21 +18128,23 @@ function upsertNamedWallet(params) {
|
|
|
18004
18128
|
updatedAt: now
|
|
18005
18129
|
};
|
|
18006
18130
|
registry.wallets = [...registry.wallets.filter((entry) => entry.id !== next.id), next].toSorted((a, b) => a.createdAt.localeCompare(b.createdAt));
|
|
18007
|
-
if (!registry.defaultWalletId || !registry.wallets.some((wallet) => wallet.id === registry.defaultWalletId)) registry.defaultWalletId = resolveWalletUserRole(next) === "agent" ? next.id : void 0;
|
|
18008
18131
|
writeWalletProviderRegistry(registry, env);
|
|
18009
18132
|
return next;
|
|
18010
18133
|
}
|
|
18011
18134
|
function resolveWalletSelectionForAgent(params) {
|
|
18012
18135
|
const registry = readWalletProviderRegistry(params.env ?? process.env);
|
|
18013
18136
|
const directAgent = params.agentId?.trim();
|
|
18014
|
-
const
|
|
18137
|
+
const directWalletId = directAgent ? registry.assignments[directAgent] : void 0;
|
|
18138
|
+
const skillWalletId = params.skillWalletId?.trim();
|
|
18139
|
+
const walletId = skillWalletId ?? directWalletId ?? registry.defaultWalletId;
|
|
18015
18140
|
if (!walletId) return {};
|
|
18016
18141
|
const wallet = registry.wallets.find((entry) => entry.id === walletId);
|
|
18017
18142
|
if (!wallet) return {};
|
|
18018
18143
|
return {
|
|
18019
18144
|
walletId: wallet.id,
|
|
18020
18145
|
walletName: wallet.name,
|
|
18021
|
-
providerId: wallet.providerId
|
|
18146
|
+
providerId: wallet.providerId,
|
|
18147
|
+
source: skillWalletId ? "skill" : directWalletId ? "agent" : "default"
|
|
18022
18148
|
};
|
|
18023
18149
|
}
|
|
18024
18150
|
function resolveWalletSelection(params) {
|
|
@@ -18062,11 +18188,12 @@ function resolveWalletSelection(params) {
|
|
|
18062
18188
|
}
|
|
18063
18189
|
const fallback = resolveWalletSelectionForAgent({
|
|
18064
18190
|
agentId: params.agentId,
|
|
18191
|
+
skillWalletId: params.skillWalletId,
|
|
18065
18192
|
env
|
|
18066
18193
|
});
|
|
18067
18194
|
if (fallback.walletId || fallback.providerId) return {
|
|
18068
18195
|
...fallback,
|
|
18069
|
-
source: "fallback"
|
|
18196
|
+
source: fallback.source ?? "fallback"
|
|
18070
18197
|
};
|
|
18071
18198
|
return { source: "none" };
|
|
18072
18199
|
}
|
|
@@ -23892,6 +24019,36 @@ function findRequest(file, requestId) {
|
|
|
23892
24019
|
return file.requests.find((request) => request.id === requestId.trim());
|
|
23893
24020
|
}
|
|
23894
24021
|
|
|
24022
|
+
//#endregion
|
|
24023
|
+
//#region src/wallet/local-socket-signer-lifecycle.ts
|
|
24024
|
+
async function requireSignerOwnedProtocolV2(socketPath, requiredFeatures = []) {
|
|
24025
|
+
const result = await callLocalSocketSigner(socketPath, { op: "v2.capabilities" });
|
|
24026
|
+
const capabilities = result.capabilities;
|
|
24027
|
+
const missing = [
|
|
24028
|
+
"failClosedPolicies",
|
|
24029
|
+
"policyHashes",
|
|
24030
|
+
"signerOwnedKeys",
|
|
24031
|
+
"applicationNetworkBootstrap",
|
|
24032
|
+
"atomicMultiAssetCaps",
|
|
24033
|
+
"signerControlledNativeFeeCaps",
|
|
24034
|
+
...requiredFeatures
|
|
24035
|
+
].filter((feature) => !capabilities?.features.includes(feature));
|
|
24036
|
+
if (result.ready !== true || capabilities?.protocol.current !== 2 || capabilities.protocol.min > 2 || capabilities.protocol.max < 2 || capabilities.nativeFeeReservationLamports !== LOCAL_SIGNER_NATIVE_FEE_RESERVATION_LAMPORTS_V2 || missing.length > 0) throw new Error(`fased-signerd does not provide the required signer-owned protocol-v2 capabilities${missing.length > 0 ? `: ${missing.join(", ")}` : ""}`);
|
|
24037
|
+
}
|
|
24038
|
+
async function readSignerOwnedWalletReadiness(params) {
|
|
24039
|
+
await requireSignerOwnedProtocolV2(params.socketPath, ["liveWalletReadiness"]);
|
|
24040
|
+
return await callLocalSocketSigner(params.socketPath, {
|
|
24041
|
+
op: "v2.wallet.readiness",
|
|
24042
|
+
walletId: params.walletId
|
|
24043
|
+
});
|
|
24044
|
+
}
|
|
24045
|
+
|
|
24046
|
+
//#endregion
|
|
24047
|
+
//#region src/wallet/native-signer-wallet-id.ts
|
|
24048
|
+
function normalizeNativeSignerWalletId(value) {
|
|
24049
|
+
return value.trim().toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "") || "default";
|
|
24050
|
+
}
|
|
24051
|
+
|
|
23895
24052
|
//#endregion
|
|
23896
24053
|
//#region src/wallet/wallet-approval-auth.ts
|
|
23897
24054
|
function nowMs$1() {
|
|
@@ -24073,6 +24230,7 @@ async function readWalletStatusSnapshot(params) {
|
|
|
24073
24230
|
const statePaths = resolveWalletStatePaths(effectiveEnv);
|
|
24074
24231
|
const approvalAuth = readWalletApprovalAuthSnapshot(effectiveEnv, cfg);
|
|
24075
24232
|
const checkedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
24233
|
+
const registeredWallets = params?.walletId ? providerRegistry.wallets.filter((wallet) => wallet.id === params.walletId) : providerRegistry.wallets;
|
|
24076
24234
|
let providerHealth = {
|
|
24077
24235
|
ok: false,
|
|
24078
24236
|
provider: providerId,
|
|
@@ -24120,6 +24278,55 @@ async function readWalletStatusSnapshot(params) {
|
|
|
24120
24278
|
summary: "Real-chain settlement depends on the configured wallet provider and RPC connectivity."
|
|
24121
24279
|
},
|
|
24122
24280
|
chains: resolved.chains,
|
|
24281
|
+
wallets: await Promise.all(registeredWallets.map(async (wallet) => {
|
|
24282
|
+
if (wallet.providerId !== "local-socket-signer") return {
|
|
24283
|
+
id: wallet.id,
|
|
24284
|
+
name: wallet.name,
|
|
24285
|
+
providerId: wallet.providerId,
|
|
24286
|
+
addresses: wallet.addresses,
|
|
24287
|
+
readiness: {
|
|
24288
|
+
keystore: Boolean(wallet.addresses?.solana),
|
|
24289
|
+
rpc: serviceHealthy,
|
|
24290
|
+
ready: serviceHealthy && Boolean(wallet.addresses?.solana)
|
|
24291
|
+
}
|
|
24292
|
+
};
|
|
24293
|
+
const signerWalletId = (typeof wallet.metadata?.signerWalletId === "string" ? wallet.metadata.signerWalletId.trim() : "") || normalizeNativeSignerWalletId(wallet.id);
|
|
24294
|
+
try {
|
|
24295
|
+
const signer = await readSignerOwnedWalletReadiness({
|
|
24296
|
+
socketPath: resolveLocalSignerSocketPath(effectiveEnv),
|
|
24297
|
+
walletId: signerWalletId
|
|
24298
|
+
});
|
|
24299
|
+
const addressMatches = typeof wallet.addresses?.solana === "string" && wallet.addresses.solana === signer.publicKey;
|
|
24300
|
+
const roleMatches = typeof wallet.metadata?.role === "string" && wallet.metadata.role === signer.role;
|
|
24301
|
+
const ready = signer.ready && addressMatches && roleMatches;
|
|
24302
|
+
return {
|
|
24303
|
+
id: wallet.id,
|
|
24304
|
+
name: wallet.name,
|
|
24305
|
+
providerId: wallet.providerId,
|
|
24306
|
+
addresses: wallet.addresses,
|
|
24307
|
+
readiness: {
|
|
24308
|
+
keystore: signer.keyReady,
|
|
24309
|
+
rpc: signer.networkReady,
|
|
24310
|
+
ready,
|
|
24311
|
+
...!ready && signer.ready ? { error: "registry address or immutable role does not match live signer state" } : {},
|
|
24312
|
+
signer
|
|
24313
|
+
}
|
|
24314
|
+
};
|
|
24315
|
+
} catch (error) {
|
|
24316
|
+
return {
|
|
24317
|
+
id: wallet.id,
|
|
24318
|
+
name: wallet.name,
|
|
24319
|
+
providerId: wallet.providerId,
|
|
24320
|
+
addresses: wallet.addresses,
|
|
24321
|
+
readiness: {
|
|
24322
|
+
keystore: false,
|
|
24323
|
+
rpc: false,
|
|
24324
|
+
ready: false,
|
|
24325
|
+
error: walletDiagnosticErrorMessage(error)
|
|
24326
|
+
}
|
|
24327
|
+
};
|
|
24328
|
+
}
|
|
24329
|
+
})),
|
|
24123
24330
|
service: {
|
|
24124
24331
|
host: resolved.service.host,
|
|
24125
24332
|
port: resolved.service.port,
|
|
@@ -28701,7 +28908,7 @@ function createOutboundSendDepsFromCliSource(deps) {
|
|
|
28701
28908
|
function createDefaultDeps() {
|
|
28702
28909
|
return {
|
|
28703
28910
|
sendMessageWhatsApp: async (...args) => {
|
|
28704
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
28911
|
+
const { sendMessageWhatsApp } = await import("./web-DGWi7i3B.js");
|
|
28705
28912
|
return await sendMessageWhatsApp(...args);
|
|
28706
28913
|
},
|
|
28707
28914
|
sendMessageTelegram: async (...args) => {
|
|
@@ -36709,7 +36916,7 @@ function isModuleNotFoundError(err) {
|
|
|
36709
36916
|
}
|
|
36710
36917
|
async function loadPwAiModule(mode) {
|
|
36711
36918
|
try {
|
|
36712
|
-
return await import("./pw-ai-
|
|
36919
|
+
return await import("./pw-ai-DZYLDC-S.js");
|
|
36713
36920
|
} catch (err) {
|
|
36714
36921
|
if (mode === "soft") return null;
|
|
36715
36922
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -37103,11 +37310,11 @@ function createProfileContext(opts, profile) {
|
|
|
37103
37310
|
const userDataDir = resolveFasedAgentUserDataDir(profile.name);
|
|
37104
37311
|
const profileState = getProfileState();
|
|
37105
37312
|
if (await isHttpReachable(300) && !profileState.running) try {
|
|
37106
|
-
await (await import("./pw-ai-
|
|
37313
|
+
await (await import("./pw-ai-DZYLDC-S.js")).closePlaywrightBrowserConnection();
|
|
37107
37314
|
} catch {}
|
|
37108
37315
|
if (profileState.running) await stopRunningBrowser();
|
|
37109
37316
|
try {
|
|
37110
|
-
await (await import("./pw-ai-
|
|
37317
|
+
await (await import("./pw-ai-DZYLDC-S.js")).closePlaywrightBrowserConnection();
|
|
37111
37318
|
} catch {}
|
|
37112
37319
|
if (!fs.existsSync(userDataDir)) return {
|
|
37113
37320
|
moved: false,
|
|
@@ -49255,21 +49462,17 @@ function resolveWalletActionSelection(params) {
|
|
|
49255
49462
|
providerId: params.providerId,
|
|
49256
49463
|
env
|
|
49257
49464
|
});
|
|
49258
|
-
else
|
|
49259
|
-
|
|
49260
|
-
|
|
49261
|
-
|
|
49262
|
-
|
|
49263
|
-
providerId: fallback.providerId,
|
|
49264
|
-
source: "fallback"
|
|
49265
|
-
} : { source: "none" };
|
|
49266
|
-
} else selection = { source: "none" };
|
|
49465
|
+
else selection = resolveWalletSelection({
|
|
49466
|
+
agentId: params.agentId,
|
|
49467
|
+
skillWalletId: params.skillWalletId,
|
|
49468
|
+
env
|
|
49469
|
+
});
|
|
49267
49470
|
} catch (error) {
|
|
49268
49471
|
const message = error instanceof Error ? error.message : "wallet selection failed";
|
|
49269
49472
|
if (message.includes("ambiguous")) throw new WalletActionSelectionError("wallet_ambiguous", message);
|
|
49270
49473
|
throw new WalletActionSelectionError("wallet_not_found", message);
|
|
49271
49474
|
}
|
|
49272
|
-
if (!selection.walletId) throw new WalletActionSelectionError("wallet_handle_required", "Agent wallet
|
|
49475
|
+
if (!selection.walletId) throw new WalletActionSelectionError("wallet_handle_required", "Select an Agent wallet: use an explicit wallet, skill override, Agent assignment, or Default Agent wallet fallback");
|
|
49273
49476
|
const wallet = registry.wallets.find((entry) => entry.id === selection.walletId);
|
|
49274
49477
|
if (!wallet) throw new WalletActionSelectionError("wallet_not_found", `wallet not found: ${selection.walletId}`);
|
|
49275
49478
|
if (params.providerId && wallet.providerId !== params.providerId) throw new WalletActionSelectionError("wallet_not_found", `wallet ${wallet.name} (${wallet.id}) belongs to provider ${wallet.providerId}, not ${params.providerId}`);
|
|
@@ -58906,11 +59109,13 @@ function createWalletActionTool(opts) {
|
|
|
58906
59109
|
const scheduled = action === "schedule_plan";
|
|
58907
59110
|
const requesterSkillId = opts?.requesterSkillId?.trim() || null;
|
|
58908
59111
|
const permissions = readSkillWalletActionPermissions(cfg, requesterSkillId);
|
|
59112
|
+
const skillWalletId = permissions?.walletIds?.length === 1 ? permissions.walletIds[0] : void 0;
|
|
58909
59113
|
const selection = resolveAgentWalletSelection({
|
|
58910
59114
|
config: cfg,
|
|
58911
59115
|
walletHandle,
|
|
58912
59116
|
walletId,
|
|
58913
59117
|
agentId: requesterAgentId ?? ownerAgentId ?? void 0,
|
|
59118
|
+
skillWalletId,
|
|
58914
59119
|
env: process.env
|
|
58915
59120
|
});
|
|
58916
59121
|
const rpcUrl = resolveScopedRpcUrlForWallet({
|
|
@@ -59985,7 +60190,7 @@ function createWalletTool(opts) {
|
|
|
59985
60190
|
return {
|
|
59986
60191
|
label: "Wallet",
|
|
59987
60192
|
name: "wallet",
|
|
59988
|
-
description: "Query wallet status/list/balance/assets/address and prepare/send policy-limited Solana transactions via configured wallet provider. If the user asks for one exact @wallet handle or one external Solana address, call only that exact read action; do not also call balances/list. Use action=\"list\" to list local wallets with handles and action=\"balances\" only when the user asks for every/all local wallet balances. Use walletHandle=\"@wallet:<walletId>\" to select exact local wallets for read-only balance/assets/status/address and risky actions. Use action=\"assets\" for all visible Solana native and SPL balances, or address=\"<solana-address>\" for read-only external Solana balance/assets. For address/balance reads, omit chain when the user does not specify it; the tool returns the available Solana address or balance set. Risky prepare/send actions
|
|
60193
|
+
description: "Query wallet status/list/balance/assets/address and prepare/send policy-limited Solana transactions via configured wallet provider. If the user asks for one exact @wallet handle or one external Solana address, call only that exact read action; do not also call balances/list. Use action=\"list\" to list local wallets with handles and action=\"balances\" only when the user asks for every/all local wallet balances. Use walletHandle=\"@wallet:<walletId>\" to select exact local wallets for read-only balance/assets/status/address and risky actions. Use action=\"assets\" for all visible Solana native and SPL balances, or address=\"<solana-address>\" for read-only external Solana balance/assets. For address/balance reads, omit chain when the user does not specify it; the tool returns the available Solana address or balance set. Risky prepare/send actions use explicit wallet, skill override, Agent assignment, then the optional Default Agent wallet fallback. For normal SOL amounts such as 0.1, pass amountFormat=\"human\"; decimal amounts without amountFormat are treated as human units. Destination wallet handles like @wallet:vault are resolved to receive addresses.",
|
|
59989
60194
|
parameters: WalletToolSchema,
|
|
59990
60195
|
execute: async (_toolCallId, args) => {
|
|
59991
60196
|
if (!access.ok) {
|
|
@@ -60009,6 +60214,9 @@ function createWalletTool(opts) {
|
|
|
60009
60214
|
const explicitWalletId = readStringParam(params, "walletId");
|
|
60010
60215
|
const selectedWalletId = (explicitWalletHandle ? parseWalletHandle(explicitWalletHandle) : void 0) ?? explicitWalletId;
|
|
60011
60216
|
const explicitWalletName = readStringParam(params, "walletName");
|
|
60217
|
+
const requesterSkillId = opts?.requesterSkillId?.trim() || null;
|
|
60218
|
+
const permissions = readSkillWalletActionPermissions(cfg, requesterSkillId);
|
|
60219
|
+
const skillWalletId = permissions?.walletIds?.length === 1 ? permissions.walletIds[0] : void 0;
|
|
60012
60220
|
const walletSelection = riskyWalletAction ? resolveAgentWalletSelection({
|
|
60013
60221
|
config: cfg,
|
|
60014
60222
|
providerId: explicitProviderId,
|
|
@@ -60016,6 +60224,7 @@ function createWalletTool(opts) {
|
|
|
60016
60224
|
walletId: explicitWalletId,
|
|
60017
60225
|
walletName: explicitWalletName,
|
|
60018
60226
|
agentId: requesterAgentId ?? ownerAgentId ?? void 0,
|
|
60227
|
+
skillWalletId,
|
|
60019
60228
|
env: process.env
|
|
60020
60229
|
}) : resolveWalletSelection({
|
|
60021
60230
|
providerId: explicitProviderId,
|
|
@@ -60232,10 +60441,9 @@ function createWalletTool(opts) {
|
|
|
60232
60441
|
walletName: walletSelection.walletName
|
|
60233
60442
|
};
|
|
60234
60443
|
if (chain === "solana" && payload.program) assertValidSolanaAddress(payload.program, "SPL mint address");
|
|
60235
|
-
const requesterSkillId = opts?.requesterSkillId?.trim() || null;
|
|
60236
60444
|
await enforceWalletSkillPolicy({
|
|
60237
60445
|
cfg,
|
|
60238
|
-
permissions
|
|
60446
|
+
permissions,
|
|
60239
60447
|
requesterAgentId,
|
|
60240
60448
|
requesterSkillId,
|
|
60241
60449
|
action,
|
|
@@ -97359,7 +97567,7 @@ const signalMessageActions = {
|
|
|
97359
97567
|
//#region src/channels/plugins/actions/telegram.ts
|
|
97360
97568
|
const providerId = "telegram";
|
|
97361
97569
|
async function loadTelegramActionHandler() {
|
|
97362
|
-
const { handleTelegramAction } = await import("./telegram-actions-
|
|
97570
|
+
const { handleTelegramAction } = await import("./telegram-actions-Cewdga8H.js");
|
|
97363
97571
|
return handleTelegramAction;
|
|
97364
97572
|
}
|
|
97365
97573
|
function readTelegramSendParams(params) {
|
|
@@ -99769,7 +99977,7 @@ function buildPairingReply(params) {
|
|
|
99769
99977
|
|
|
99770
99978
|
//#endregion
|
|
99771
99979
|
//#region src/brand.ts
|
|
99772
|
-
const FASED_PRODUCT_VERSION = "0.1.
|
|
99980
|
+
const FASED_PRODUCT_VERSION = "0.1.69";
|
|
99773
99981
|
const FASED_DISPLAY_VERSION = `v${FASED_PRODUCT_VERSION}`;
|
|
99774
99982
|
|
|
99775
99983
|
//#endregion
|
|
@@ -103680,7 +103888,7 @@ const sendPollDiscordLazy = async (...args) => {
|
|
|
103680
103888
|
return sendPollDiscord(...args);
|
|
103681
103889
|
};
|
|
103682
103890
|
const monitorDiscordProviderLazy = async (...args) => {
|
|
103683
|
-
const { monitorDiscordProvider } = await import("./monitor-
|
|
103891
|
+
const { monitorDiscordProvider } = await import("./monitor-xzVAPbg2.js");
|
|
103684
103892
|
return monitorDiscordProvider(...args);
|
|
103685
103893
|
};
|
|
103686
103894
|
const listSlackDirectoryGroupsLiveLazy = async (...args) => {
|
|
@@ -103708,7 +103916,7 @@ const sendMessageSlackLazy = async (...args) => {
|
|
|
103708
103916
|
return sendMessageSlack(...args);
|
|
103709
103917
|
};
|
|
103710
103918
|
const monitorSlackProviderLazy = async (...args) => {
|
|
103711
|
-
const { monitorSlackProvider } = await import("./slack-
|
|
103919
|
+
const { monitorSlackProvider } = await import("./slack-CkIRVDUK.js");
|
|
103712
103920
|
return monitorSlackProvider(...args);
|
|
103713
103921
|
};
|
|
103714
103922
|
const handleSlackActionLazy = async (...args) => {
|
|
@@ -103728,7 +103936,7 @@ const sendPollTelegramLazy = async (...args) => {
|
|
|
103728
103936
|
return sendPollTelegram(...args);
|
|
103729
103937
|
};
|
|
103730
103938
|
const monitorTelegramProviderLazy = async (...args) => {
|
|
103731
|
-
const { monitorTelegramProvider } = await import("./monitor-
|
|
103939
|
+
const { monitorTelegramProvider } = await import("./monitor-WXdn4mR-.js");
|
|
103732
103940
|
return monitorTelegramProvider(...args);
|
|
103733
103941
|
};
|
|
103734
103942
|
let webOutboundPromise = null;
|
|
@@ -103749,7 +103957,7 @@ function loadWebLoginQr() {
|
|
|
103749
103957
|
return webLoginQrPromise;
|
|
103750
103958
|
}
|
|
103751
103959
|
function loadWebChannel() {
|
|
103752
|
-
webChannelPromise ??= import("./web-
|
|
103960
|
+
webChannelPromise ??= import("./web-DGWi7i3B.js");
|
|
103753
103961
|
return webChannelPromise;
|
|
103754
103962
|
}
|
|
103755
103963
|
function loadWhatsAppActions() {
|
|
@@ -114327,7 +114535,7 @@ function createOpenAIReasoningEffortWrapper(baseStreamFn, reasoningEffort) {
|
|
|
114327
114535
|
function createCodexDefaultTransportWrapper(baseStreamFn) {
|
|
114328
114536
|
const underlying = baseStreamFn ?? streamSimple;
|
|
114329
114537
|
return (model, context, options) => {
|
|
114330
|
-
if (typeof process !== "undefined" && process.versions?.node) globalThis.WebSocket = WebSocket
|
|
114538
|
+
if (typeof process !== "undefined" && process.versions?.node) globalThis.WebSocket = WebSocket;
|
|
114331
114539
|
return underlying(model, context, {
|
|
114332
114540
|
...options,
|
|
114333
114541
|
transport: options?.transport ?? "auto"
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { _ as FasedAgentPluginApi } from "./types-
|
|
1
|
+
import { _ as FasedAgentPluginApi } from "./types-BakzIzGN.js";
|
|
2
2
|
import { a as listDevicePairing, i as approveDevicePairing, n as resolveTailnetHostWithRunner, r as resolveGatewayBindUrl, t as runPluginCommandWithTimeout } from "./run-command-i_W6EFb1.js";
|
|
3
3
|
export { type FasedAgentPluginApi, approveDevicePairing, listDevicePairing, resolveGatewayBindUrl, resolveTailnetHostWithRunner, runPluginCommandWithTimeout };
|