@fased/fased 0.1.64 → 0.1.65
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 +16 -0
- package/README.md +16 -9
- package/config/signer-policies/README.md +10 -1
- package/config/signer-protocol-v2.json +2 -0
- package/dist/brand.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/control-ui/assets/{app-bR-fO5ty.js → app-MaQnPa5G.js} +5 -5
- package/dist/control-ui/assets/{index-ckCxHwjy.js → index-D4YMr1fA.js} +3 -3
- package/dist/control-ui/assets/{mining-BgHFh0ei.js → mining-qMYs4aD-.js} +120 -120
- package/dist/control-ui/index.html +1 -1
- package/dist/control-ui/version.json +1 -1
- package/dist/extensions/sat-mining/src/rpc-read.js +59 -20
- package/dist/extensions/sat-mining/src/solana-submit.js +251 -8
- package/dist/extensions/sat-mining/src/submission-ledger.js +1 -1
- package/dist/plugin-sdk/{audio-preflight-BYxAt775.js → audio-preflight-I4IngVlJ.js} +1 -1
- package/dist/plugin-sdk/channel-plugin-common.d.ts +2 -2
- package/dist/plugin-sdk/{chunk-items-DIRHG2gJ.js → chunk-items-DLQ6_lLK.js} +1 -1
- package/dist/plugin-sdk/command-status.js +1 -1
- package/dist/plugin-sdk/{config-schema-BOT7kHb6.js → config-schema-D_8FVI1C.js} +28 -8
- package/dist/plugin-sdk/device-pair.d.ts +1 -1
- package/dist/plugin-sdk/discord.d.ts +3 -3
- package/dist/plugin-sdk/index.d.ts +5 -5
- package/dist/plugin-sdk/index.js +1 -1
- package/dist/plugin-sdk/{monitor-BCFDaqJ-.js → monitor-B4KF4Kpo.js} +3 -3
- package/dist/plugin-sdk/{monitor-BgbjRiPM.js → monitor-Bb6x1KAG.js} +3 -3
- package/dist/plugin-sdk/{openresponses-http-DFf87SMM.js → openresponses-http-DCTO8JkL.js} +1 -1
- package/dist/plugin-sdk/{pairing-message-CS-9BHug.d.ts → pairing-message-DHPDFZbC.d.ts} +1 -1
- package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +1 -1
- package/dist/plugin-sdk/sat-runtime.d.ts +18 -2
- package/dist/plugin-sdk/sat-runtime.js +1 -1
- package/dist/plugin-sdk/{slack-BUTt8cxK.js → slack-BHmvqgjH.js} +3 -3
- package/dist/plugin-sdk/slack.d.ts +3 -3
- package/dist/plugin-sdk/{sticker-cache-D0wHVqjt.js → sticker-cache-By5AcorL.js} +2 -2
- package/dist/plugin-sdk/{telegram-actions-CC_qN4v0.js → telegram-actions-DGnBz1YT.js} +2 -2
- package/dist/plugin-sdk/telegram.d.ts +3 -3
- package/dist/plugin-sdk/{tmp-fased-dir-xOTGlzBE.d.ts → tmp-fased-dir-EJGTmL1Q.d.ts} +1 -1
- package/dist/plugin-sdk/{types-C3avNytw.d.ts → types-BdwdFCD6.d.ts} +2 -2
- package/dist/plugin-sdk/{types-DWfbSAaM.d.ts → types-BrCpYMxn.d.ts} +1 -1
- package/dist/plugin-sdk/{web-BXsJ1vqe.js → web-DUJwrTYs.js} +1 -1
- package/dist/plugin-sdk/whatsapp.d.ts +3 -3
- package/dist/wallet/local-socket-signer-protocol.js +18 -0
- package/dist/wallet/signer-protocol-v2.generated.js +2 -0
- package/dist/wallet/wallet-policy.js +3 -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/index.ts +89 -1
- package/extensions/sat-mining/package.json +1 -1
- package/extensions/sat-mining/src/audit-store.ts +45 -4
- package/extensions/sat-mining/src/client.ts +13 -0
- package/extensions/sat-mining/src/rpc-read.ts +105 -21
- package/extensions/sat-mining/src/runtime.ts +2 -0
- package/extensions/sat-mining/src/solana-submit.ts +358 -21
- package/extensions/sat-mining/src/submission-ledger.ts +2 -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 +14 -18
- package/package.json +1 -1
- package/scripts/fased-managed-updater.mjs +1 -1
- package/scripts/fased-signer-owner-policy.mjs +13 -1
- package/scripts/start-managed.sh +4 -0
package/install.sh
CHANGED
|
@@ -35,19 +35,6 @@ if [[ "$install_entry_legacy_ts_authkey" -eq 1 ]]; then
|
|
|
35
35
|
exit 1
|
|
36
36
|
fi
|
|
37
37
|
|
|
38
|
-
if [[ "$install_entry_is_stream" -eq 1 && "$install_entry_hosting" -eq 1 ]]; then
|
|
39
|
-
cat >&2 <<'EOF_STREAMED_HOSTING'
|
|
40
|
-
Refusing streamed VPS Hosting execution before any privileged host mutation.
|
|
41
|
-
Download the exact tagged install.sh and install.sh.attestation.json release assets,
|
|
42
|
-
verify install.sh with `gh attestation verify --bundle ... --source-ref refs/tags/vX.Y.Z
|
|
43
|
-
--signer-workflow fased-ai/fased/.github/workflows/hosted-runtime-release.yml
|
|
44
|
-
--deny-self-hosted-runners`, then run the verified standalone file from the provider
|
|
45
|
-
root console with: bash ./install.sh --hosting --release vX.Y.Z
|
|
46
|
-
See: https://docs.fased.ai/install/vps#3-install-fased-and-connect-through-tailscale
|
|
47
|
-
EOF_STREAMED_HOSTING
|
|
48
|
-
exit 1
|
|
49
|
-
fi
|
|
50
|
-
|
|
51
38
|
# A Hosting request always enters the attest-and-extract bootstrap unless it is
|
|
52
39
|
# the exact inner invocation carrying the root-owned verified bundle marker.
|
|
53
40
|
# This applies equally to stdin and to a standalone install.sh that the
|
|
@@ -58,6 +45,7 @@ if [[ "$install_entry_is_stream" -eq 1 || \
|
|
|
58
45
|
install_base_dir="${FASED_INSTALL_DIR:-$HOME/fased}"
|
|
59
46
|
auto_install=1
|
|
60
47
|
hosting_bootstrap=0
|
|
48
|
+
hosting_repair_bootstrap=0
|
|
61
49
|
hosting_release=""
|
|
62
50
|
verified_hosting_bundle=""
|
|
63
51
|
args=("$@")
|
|
@@ -74,9 +62,13 @@ if [[ "$install_entry_is_stream" -eq 1 || \
|
|
|
74
62
|
--no-auto-install)
|
|
75
63
|
auto_install=0
|
|
76
64
|
;;
|
|
77
|
-
--hosting
|
|
65
|
+
--hosting)
|
|
78
66
|
hosting_bootstrap=1
|
|
79
67
|
;;
|
|
68
|
+
--repair-hosting)
|
|
69
|
+
hosting_bootstrap=1
|
|
70
|
+
hosting_repair_bootstrap=1
|
|
71
|
+
;;
|
|
80
72
|
--host-profile)
|
|
81
73
|
if (( i + 1 < ${#args[@]} )) && [[ "${args[$((i + 1))]}" == "hosting" ]]; then
|
|
82
74
|
hosting_bootstrap=1
|
|
@@ -99,6 +91,10 @@ if [[ "$install_entry_is_stream" -eq 1 || \
|
|
|
99
91
|
esac
|
|
100
92
|
done
|
|
101
93
|
|
|
94
|
+
if [[ "$install_entry_is_stream" -eq 1 && "$hosting_bootstrap" -eq 1 && "$hosting_repair_bootstrap" -eq 0 && -z "$hosting_release" ]]; then
|
|
95
|
+
hosting_release="latest"
|
|
96
|
+
fi
|
|
97
|
+
|
|
102
98
|
bootstrap_as_root() {
|
|
103
99
|
if [[ "$(id -u)" -eq 0 ]]; then
|
|
104
100
|
"$@"
|
|
@@ -1051,9 +1047,9 @@ EOF_NATIVE_WINDOWS
|
|
|
1051
1047
|
fi
|
|
1052
1048
|
if [[ "$(id -u)" -ne 0 ]]; then
|
|
1053
1049
|
echo "--hosting must run as root so the isolated signer and Gateway services can be installed." >&2
|
|
1054
|
-
echo "Open the VPS provider's root console and follow the
|
|
1055
|
-
echo " https://docs.fased.ai/install/vps
|
|
1056
|
-
echo "
|
|
1050
|
+
echo "Open the VPS provider's root console and follow the one-command Hosting guide:" >&2
|
|
1051
|
+
echo " https://docs.fased.ai/install/vps" >&2
|
|
1052
|
+
echo "The Hosting bootstrap selects and verifies the tagged release before privileged Fased installation." >&2
|
|
1057
1053
|
echo "Never run the app-owned checkout with sudo or grant the app account sudo access." >&2
|
|
1058
1054
|
exit 1
|
|
1059
1055
|
fi
|
|
@@ -4483,7 +4479,7 @@ migrate_legacy_hosted_signer_if_needed() {
|
|
|
4483
4479
|
echo "A previous hosted wallet requires a fail-closed signer-v2 migration." >&2
|
|
4484
4480
|
echo "Create root-owned ${policy_file} (mode 0600) with each expected wallet address and explicit policy, then rerun:" >&2
|
|
4485
4481
|
echo "Use the verified release-asset repair procedure at:" >&2
|
|
4486
|
-
echo " https://docs.fased.ai/install/vps#
|
|
4482
|
+
echo " https://docs.fased.ai/install/vps#advanced-verify-the-bootstrap-first" >&2
|
|
4487
4483
|
echo "After verifying the tagged install.sh attestation, run the verified file with --repair-hosting --release v${HOSTING_RELEASE}." >&2
|
|
4488
4484
|
echo "Legacy key files were not changed." >&2
|
|
4489
4485
|
exit 1
|
package/package.json
CHANGED
|
@@ -74,7 +74,7 @@ const LOCAL_SIGNER_REQUIRED_FEATURES = [
|
|
|
74
74
|
export const PRE_V2_HOSTING_MIGRATION_MESSAGE = [
|
|
75
75
|
"This hosted installation needs the one-time signer-v2 security migration before it can update.",
|
|
76
76
|
"From a VPS provider console or a root SSH session, run:",
|
|
77
|
-
"Follow the
|
|
77
|
+
"Follow the manual release-asset and GitHub attestation procedure at https://docs.fased.ai/install/vps#advanced-verify-the-bootstrap-first, then run the verified tagged install.sh with --repair-hosting --release vX.Y.Z.",
|
|
78
78
|
"Never run /home/app/fased/install.sh with sudo or as root.",
|
|
79
79
|
"The current Gateway, signer, wallets, and persistent state were left unchanged.",
|
|
80
80
|
].join(" ");
|
|
@@ -17,6 +17,7 @@ const SYSTEM_PROGRAM = "11111111111111111111111111111111";
|
|
|
17
17
|
const TOKEN_PROGRAM = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
18
18
|
const TOKEN_2022_PROGRAM = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
|
|
19
19
|
const ASSOCIATED_TOKEN_PROGRAM = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
20
|
+
const ADDRESS_LOOKUP_TABLE_PROGRAM = "AddressLookupTab1e1111111111111111111111111";
|
|
20
21
|
const NATIVE_FEE_RESERVATION_LAMPORTS = 5_000_000n;
|
|
21
22
|
const UINT64_MAX = 18_446_744_073_709_551_615n;
|
|
22
23
|
const BASE58_ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
@@ -73,6 +74,7 @@ const SAT_MINING_ACTIONS = new Set([
|
|
|
73
74
|
"validatorAttestation",
|
|
74
75
|
"withdrawMinerCapital",
|
|
75
76
|
]);
|
|
77
|
+
const SAT_LOOKUP_TABLE_ACTIONS = new Set(["create", "extend", "deactivate", "close"]);
|
|
76
78
|
const VAULT_BOND_ACTIONS = new Set([
|
|
77
79
|
"cancelBondUnlock",
|
|
78
80
|
"claimBondStakingRewards",
|
|
@@ -441,7 +443,7 @@ function normalizePolicyOperation(value, role, field) {
|
|
|
441
443
|
if (POLICY_OPERATIONS.has(value)) {
|
|
442
444
|
return value;
|
|
443
445
|
}
|
|
444
|
-
const match = /^(sat|vaultBond)\.([A-Za-z][A-Za-z0-9]*)@(.+)$/u.exec(value);
|
|
446
|
+
const match = /^(sat|satLookup|vaultBond)\.([A-Za-z][A-Za-z0-9]*)@(.+)$/u.exec(value);
|
|
445
447
|
if (!match) {
|
|
446
448
|
if (value === "solana.satAction" || value === "solana.vaultBondAction") {
|
|
447
449
|
throw new Error(`${field} must name an exact action bound to its SAT program`);
|
|
@@ -454,6 +456,14 @@ function normalizePolicyOperation(value, role, field) {
|
|
|
454
456
|
if (role !== "mining" || !SAT_MINING_ACTIONS.has(action)) {
|
|
455
457
|
throw new Error(`${field} is not an allowed program-bound Mining action`);
|
|
456
458
|
}
|
|
459
|
+
} else if (family === "satLookup") {
|
|
460
|
+
if (
|
|
461
|
+
role !== "mining" ||
|
|
462
|
+
!SAT_LOOKUP_TABLE_ACTIONS.has(action) ||
|
|
463
|
+
program !== ADDRESS_LOOKUP_TABLE_PROGRAM
|
|
464
|
+
) {
|
|
465
|
+
throw new Error(`${field} is not an allowed typed Mining lookup-table action`);
|
|
466
|
+
}
|
|
457
467
|
} else if (role !== "vault" || !VAULT_BOND_ACTIONS.has(action)) {
|
|
458
468
|
throw new Error(`${field} is not an allowed program-bound Vault bond action`);
|
|
459
469
|
}
|
|
@@ -1408,6 +1418,7 @@ if (isMain) {
|
|
|
1408
1418
|
}
|
|
1409
1419
|
|
|
1410
1420
|
export const __testing = Object.freeze({
|
|
1421
|
+
ADDRESS_LOOKUP_TABLE_PROGRAM,
|
|
1411
1422
|
ASSOCIATED_TOKEN_PROGRAM,
|
|
1412
1423
|
ASSOCIATED_TOKEN_PROGRAM_ACTIONS,
|
|
1413
1424
|
FEDERATION_POLICY_DOMAIN,
|
|
@@ -1417,6 +1428,7 @@ export const __testing = Object.freeze({
|
|
|
1417
1428
|
TOKEN_2022_PROGRAM,
|
|
1418
1429
|
TOKEN_PROGRAM,
|
|
1419
1430
|
SAT_MINING_ACTIONS,
|
|
1431
|
+
SAT_LOOKUP_TABLE_ACTIONS,
|
|
1420
1432
|
VAULT_BOND_ACTIONS,
|
|
1421
1433
|
assertSafeExecutable,
|
|
1422
1434
|
encodeBase58,
|
package/scripts/start-managed.sh
CHANGED
|
@@ -537,6 +537,8 @@ load_wallet_signer_env_from_config() {
|
|
|
537
537
|
|| [[ "$key" == "FASED_WALLET_LOCAL_SIGNER_MASTER_KEY" ]] \
|
|
538
538
|
|| [[ "$key" == "FASED_WALLET_SIGNER_STATE_DIR" ]] \
|
|
539
539
|
|| [[ "$key" == "FASED_WALLET_LOCAL_SIGNER_BIN" ]] \
|
|
540
|
+
|| [[ "$key" == "FASED_SAT_PROGRAM_ID" ]] \
|
|
541
|
+
|| [[ "$key" == "FASED_SAT_ENABLE_ALT_V0" ]] \
|
|
540
542
|
|| [[ "$key" =~ ^FASED_WALLET_LOCAL_SIGNER_(ROLE|DIRECT_SIGNING|CAPS_ENABLED|SOLANA_MAX_PER_TX|SOLANA_MAX_DAILY|SOLANA_ALLOW_PROGRAMS)(__[A-Za-z0-9_-]+)?$ ]]; then
|
|
541
543
|
export "$key=$value"
|
|
542
544
|
fi
|
|
@@ -554,6 +556,8 @@ load_wallet_signer_env_from_config() {
|
|
|
554
556
|
or . == "FASED_WALLET_LOCAL_SIGNER_MASTER_KEY"
|
|
555
557
|
or . == "FASED_WALLET_SIGNER_STATE_DIR"
|
|
556
558
|
or . == "FASED_WALLET_LOCAL_SIGNER_BIN"
|
|
559
|
+
or . == "FASED_SAT_PROGRAM_ID"
|
|
560
|
+
or . == "FASED_SAT_ENABLE_ALT_V0"
|
|
557
561
|
or test("^FASED_WALLET_LOCAL_SIGNER_(ROLE|DIRECT_SIGNING|CAPS_ENABLED|SOLANA_MAX_PER_TX|SOLANA_MAX_DAILY|SOLANA_ALLOW_PROGRAMS)(__[A-Za-z0-9_-]+)?$")
|
|
558
562
|
)
|
|
559
563
|
| "\(.key)=\(.value|tostring)"
|