@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.
Files changed (103) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +20 -22
  3. package/config/sat-runtime.env +6 -2
  4. package/config/signer-protocol-v2.json +6 -0
  5. package/dist/agents/tools/wallet-action-tool.js +2 -0
  6. package/dist/agents/tools/wallet-tool.js +5 -3
  7. package/dist/brand.js +1 -1
  8. package/dist/build-info.json +3 -3
  9. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  10. package/dist/cli/program/register.wallet.js +88 -5
  11. package/dist/commands/wallet.js +842 -57
  12. package/dist/config/sat-runtime-ids.js +6 -1
  13. package/dist/control-ui/assets/{app-DyPTS0oM.js → app-BLFLoFPk.js} +8 -8
  14. package/dist/control-ui/assets/{federation-DgA9e-Pn.js → federation-SGMAnM_8.js} +2 -2
  15. package/dist/control-ui/assets/{index-Cu13yYHr.js → index-S88kp5ZQ.js} +3 -3
  16. package/dist/control-ui/assets/{mining-Dg-3ll0F.js → mining-ClI8RW4u.js} +2 -2
  17. package/dist/control-ui/assets/{wallet-ByKBcYhm.js → wallet-CRIhDQbW.js} +201 -116
  18. package/dist/control-ui/index.html +1 -1
  19. package/dist/control-ui/version.json +1 -1
  20. package/dist/gateway/server-http.js +46 -9
  21. package/dist/mining/mainnet-sync.js +67 -5
  22. package/dist/operator/operator-readiness.js +1 -1
  23. package/dist/plugin-sdk/{audio-preflight-_FVQjR1r.js → audio-preflight-CS7Q_7-R.js} +2 -2
  24. package/dist/plugin-sdk/channel-plugin-common.d.ts +2 -2
  25. package/dist/plugin-sdk/{chunk-items-LH4uKSnh.js → chunk-items-BLBZNORg.js} +1 -1
  26. package/dist/plugin-sdk/command-status.js +2 -2
  27. package/dist/plugin-sdk/{config-schema-DjU_uD-6.js → config-schema-BiBOUW89.js} +255 -47
  28. package/dist/plugin-sdk/device-pair.d.ts +1 -1
  29. package/dist/plugin-sdk/discord.d.ts +4 -4
  30. package/dist/plugin-sdk/index.d.ts +16 -16
  31. package/dist/plugin-sdk/index.js +2 -2
  32. package/dist/plugin-sdk/{monitor-DUMMbG4h.js → monitor-WXdn4mR-.js} +4 -4
  33. package/dist/plugin-sdk/{monitor-DXIM16Hj.js → monitor-xzVAPbg2.js} +6 -6
  34. package/dist/plugin-sdk/{openresponses-http-C8lKwta1.js → openresponses-http-DnI1LFgq.js} +2 -2
  35. package/dist/plugin-sdk/{pairing-message-mKO92L-M.d.ts → pairing-message-CiTcdD6m.d.ts} +1 -1
  36. package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +1 -1
  37. package/dist/plugin-sdk/{pw-ai-DJ_gTc4M.js → pw-ai-DZYLDC-S.js} +1 -1
  38. package/dist/plugin-sdk/{runtime-dependency-nup8niQL.js → runtime-dependency-DczkvPxn.js} +9 -9
  39. package/dist/plugin-sdk/sat-runtime.d.ts +89 -10
  40. package/dist/plugin-sdk/sat-runtime.js +2 -2
  41. package/dist/plugin-sdk/{slack-B-nOOLM0.js → slack-CkIRVDUK.js} +4 -4
  42. package/dist/plugin-sdk/slack.d.ts +4 -4
  43. package/dist/plugin-sdk/{sticker-cache-BLiId8Em.js → sticker-cache-Dpap5ce_.js} +2 -2
  44. package/dist/plugin-sdk/{telegram-actions-1X9A32Dn.js → telegram-actions-Cewdga8H.js} +3 -3
  45. package/dist/plugin-sdk/telegram.d.ts +4 -4
  46. package/dist/plugin-sdk/{tmp-fased-dir-BkpWlGUe.d.ts → tmp-fased-dir-BSEHc8MQ.d.ts} +2 -2
  47. package/dist/plugin-sdk/{types-DtCOO_hW.d.ts → types-BakzIzGN.d.ts} +1 -1
  48. package/dist/plugin-sdk/{types-B-zL9gSv.d.ts → types-CzF0YQqK.d.ts} +2 -2
  49. package/dist/plugin-sdk/{web-BvjNyYBz.js → web-DGWi7i3B.js} +2 -2
  50. package/dist/plugin-sdk/whatsapp.d.ts +9 -9
  51. package/dist/plugin-sdk/{zod-schema.providers-core-BCDlgtls.d.ts → zod-schema.providers-core-CIzCjXH9.d.ts} +63 -63
  52. package/dist/wallet/local-socket-signer-lifecycle.js +79 -3
  53. package/dist/wallet/local-socket-signer-protocol.js +70 -10
  54. package/dist/wallet/mining-wallet-retirement.js +256 -0
  55. package/dist/wallet/providers/local-socket-signer-adapter.js +2 -0
  56. package/dist/wallet/signer-protocol-v2.generated.js +6 -0
  57. package/dist/wallet/wallet-agent-selection.js +6 -10
  58. package/dist/wallet/wallet-provider-registry.js +70 -29
  59. package/dist/wallet/wallet-send-approvals.js +6 -2
  60. package/dist/wallet/wallet-status.js +56 -1
  61. package/dist/wizard/onboarding.js +32 -30
  62. package/dist/wizard/onboarding.wallet.js +10 -1
  63. package/extensions/acpx/package.json +1 -1
  64. package/extensions/bluebubbles/package.json +1 -1
  65. package/extensions/copilot-proxy/package.json +1 -1
  66. package/extensions/diagnostics-otel/package.json +1 -1
  67. package/extensions/fased-federation/package.json +1 -1
  68. package/extensions/google-gemini-cli-auth/package.json +1 -1
  69. package/extensions/imessage/package.json +1 -1
  70. package/extensions/irc/package.json +1 -1
  71. package/extensions/line/package.json +1 -1
  72. package/extensions/llm-task/package.json +1 -1
  73. package/extensions/lobster/package.json +1 -1
  74. package/extensions/matrix/CHANGELOG.md +6 -0
  75. package/extensions/matrix/package.json +1 -1
  76. package/extensions/mattermost/package.json +1 -1
  77. package/extensions/memory-core/package.json +2 -2
  78. package/extensions/memory-lancedb/package.json +1 -1
  79. package/extensions/minimax-portal-auth/package.json +1 -1
  80. package/extensions/msteams/CHANGELOG.md +6 -0
  81. package/extensions/msteams/package.json +1 -1
  82. package/extensions/nextcloud-talk/package.json +1 -1
  83. package/extensions/nostr/CHANGELOG.md +6 -0
  84. package/extensions/nostr/package.json +1 -1
  85. package/extensions/open-prose/package.json +1 -1
  86. package/extensions/sat-mining/package.json +1 -1
  87. package/extensions/signal/package.json +1 -1
  88. package/extensions/synology-chat/package.json +1 -1
  89. package/extensions/tlon/package.json +1 -1
  90. package/extensions/twitch/CHANGELOG.md +6 -0
  91. package/extensions/twitch/package.json +1 -1
  92. package/extensions/voice-call/CHANGELOG.md +6 -0
  93. package/extensions/voice-call/package.json +1 -1
  94. package/extensions/zalo/CHANGELOG.md +6 -0
  95. package/extensions/zalo/package.json +1 -1
  96. package/extensions/zalouser/CHANGELOG.md +6 -0
  97. package/extensions/zalouser/package.json +1 -1
  98. package/install.sh +276 -103
  99. package/package.json +4 -3
  100. package/scripts/install-fased-signerd.sh +4 -8
  101. package/scripts/install-runtime-profile.sh +27 -0
  102. package/scripts/start-managed.sh +13 -1
  103. package/scripts/fased-signer-wallet-import-hosting.sh +0 -78
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fased/fased",
3
- "version": "0.1.68",
3
+ "version": "0.1.69",
4
4
  "description": "Fased Agent self-hosted AI gateway with channels, tools, plugins, and operator modules",
5
5
  "keywords": [
6
6
  "ai-agent",
@@ -46,13 +46,13 @@
46
46
  "scripts/fased-host-updaterctl.mjs",
47
47
  "scripts/fased-signer-enroll-hosting.sh",
48
48
  "scripts/fased-signer-network-hosting.sh",
49
- "scripts/fased-signer-wallet-import-hosting.sh",
50
49
  "scripts/fased-signer-owner-policy.mjs",
51
50
  "scripts/fased-signer-policy-hosting.sh",
52
51
  "scripts/fased-signer-policy-local.sh",
53
52
  "scripts/migrate-hosted-signer-v2.mjs",
54
53
  "scripts/fased-launcher-runtime.mjs",
55
54
  "scripts/install-fased-signerd.sh",
55
+ "scripts/install-runtime-profile.sh",
56
56
  "scripts/install-managed-runtime.mjs",
57
57
  "scripts/managed-runtime-layout.mjs",
58
58
  "scripts/hosted-release-manifest.mjs",
@@ -156,7 +156,7 @@
156
156
  "check": "pnpm check:ci",
157
157
  "check:ci": "pnpm signer:protocol:check && pnpm sat:signer-codecs:check && pnpm format:check && pnpm lint && pnpm lint:tmp:no-random-messaging && pnpm lint:tmp:channel-agnostic-boundaries && pnpm lint:tmp:no-raw-channel-fetch && pnpm lint:auth:no-pairing-store-group && pnpm lint:auth:pairing-account-scope && pnpm check:host-env-policy:swift",
158
158
  "check:dependency-ownership": "node --import tsx scripts/dependency-ownership-report.ts --check",
159
- "check:docs": "pnpm format:docs:check && pnpm lint:docs && pnpm docs:check-links",
159
+ "check:docs": "pnpm format:docs:check && pnpm lint:docs && pnpm docs:check-links && pnpm docs:check-product-contract",
160
160
  "check:host-env-policy:swift": "node scripts/generate-host-env-security-policy-swift.mjs --check",
161
161
  "check:loc": "node --import tsx scripts/check-ts-max-loc.ts --max 500",
162
162
  "check:plugin-sdk:types": "tsc --noEmit --skipLibCheck --module NodeNext --moduleResolution NodeNext --target ES2023 scripts/smoke-plugin-sdk-types.ts",
@@ -177,6 +177,7 @@
177
177
  "dev": "node scripts/run-node.mjs",
178
178
  "docs:bin": "node scripts/build-docs-list.mjs",
179
179
  "docs:check-links": "node scripts/docs-link-audit.mjs",
180
+ "docs:check-product-contract": "node scripts/docs-product-contract.mjs",
180
181
  "docs:dev": "cd docs && mint dev",
181
182
  "docs:list": "node scripts/docs-list.js",
182
183
  "docs:spellcheck": "bash scripts/docs-spellcheck.sh",
@@ -206,12 +206,8 @@ echo "Installed signer enrollment launcher: $INSTALL_DIR/fased-signer-enroll"
206
206
  echo "Installed signer policy launcher: $POLICY_LAUNCHER_PATH"
207
207
  echo "Installed fail-closed policy templates: $POLICY_TEMPLATE_DIR"
208
208
  cat <<EOF
209
- Fresh signer-owned wallets remain deny-all. After wallet setup creates a wallet,
210
- enroll the owner authenticator and apply an explicit reviewed policy as this user:
211
- 1. $INSTALL_DIR/fased-signer-enroll [authenticator-label]
212
- 2. Copy the matching owner-only template from $POLICY_TEMPLATE_DIR and replace
213
- every REPLACE_WITH_ value.
214
- 3. $POLICY_LAUNCHER_PATH --initial-install --policy-file /absolute/path/to/policy.json
215
-
216
- Enrollment never enables signing, and copying a template never applies it.
209
+ Fresh signer-owned wallets receive their versioned Agent, Mining, or Vault
210
+ baseline during normal wallet setup after the primary RPC is verified. Optional
211
+ authenticator enrollment and $POLICY_LAUNCHER_PATH remain available for advanced
212
+ owner-reviewed customization; copying a template never applies it.
217
213
  EOF
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env bash
2
+
3
+ fased_supports_prebuilt_release_runtime() {
4
+ local os_name="$1"
5
+ local architecture="$2"
6
+ [[ "$os_name" == "Linux" ]] || return 1
7
+ case "$architecture" in
8
+ x86_64|amd64|aarch64|arm64) return 0 ;;
9
+ *) return 1 ;;
10
+ esac
11
+ }
12
+
13
+ fased_should_use_prebuilt_release_runtime() {
14
+ local profile="$1"
15
+ local source_requested="$2"
16
+ local source_env="$3"
17
+ local hosting_source_env="$4"
18
+ local os_name="$5"
19
+ local architecture="$6"
20
+
21
+ [[ "$source_requested" != "1" ]] || return 1
22
+ [[ "$source_env" != "1" ]] || return 1
23
+ if [[ "$profile" == "hosting" && "$hosting_source_env" == "1" ]]; then
24
+ return 1
25
+ fi
26
+ fased_supports_prebuilt_release_runtime "$os_name" "$architecture"
27
+ }
@@ -538,6 +538,12 @@ load_wallet_signer_env_from_config() {
538
538
  || [[ "$key" == "FASED_WALLET_SIGNER_STATE_DIR" ]] \
539
539
  || [[ "$key" == "FASED_WALLET_LOCAL_SIGNER_BIN" ]] \
540
540
  || [[ "$key" == "FASED_SAT_PROGRAM_ID" ]] \
541
+ || [[ "$key" == "FASED_SAT_BOND_PROGRAM_ID" ]] \
542
+ || [[ "$key" == "FASED_SAT_MINT_ADDRESS" ]] \
543
+ || [[ "$key" == "FASED_SAT_MINT_PROGRAM_ID" ]] \
544
+ || [[ "$key" == "FASED_SAT_RUNTIME_MANIFEST_PATH" ]] \
545
+ || [[ "$key" == "FASED_SAT_RUNTIME_MANIFEST_SHA256" ]] \
546
+ || [[ "$key" == "FASED_SAT_RUNTIME_MANIFEST_SIGNATURE_PATH" ]] \
541
547
  || [[ "$key" == "FASED_SAT_ENABLE_ALT_V0" ]] \
542
548
  || [[ "$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
543
549
  export "$key=$value"
@@ -557,6 +563,12 @@ load_wallet_signer_env_from_config() {
557
563
  or . == "FASED_WALLET_SIGNER_STATE_DIR"
558
564
  or . == "FASED_WALLET_LOCAL_SIGNER_BIN"
559
565
  or . == "FASED_SAT_PROGRAM_ID"
566
+ or . == "FASED_SAT_BOND_PROGRAM_ID"
567
+ or . == "FASED_SAT_MINT_ADDRESS"
568
+ or . == "FASED_SAT_MINT_PROGRAM_ID"
569
+ or . == "FASED_SAT_RUNTIME_MANIFEST_PATH"
570
+ or . == "FASED_SAT_RUNTIME_MANIFEST_SHA256"
571
+ or . == "FASED_SAT_RUNTIME_MANIFEST_SIGNATURE_PATH"
560
572
  or . == "FASED_SAT_ENABLE_ALT_V0"
561
573
  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_-]+)?$")
562
574
  )
@@ -574,7 +586,7 @@ load_wallet_signer_env_file() {
574
586
  # Older signer.env files may contain Node-era key/passphrase variables. Import only
575
587
  # the non-custody settings required by the native signer, never every wallet variable.
576
588
  source <(
577
- grep -E '^export FASED_WALLET_(SOLANA_RPC_URL(__[A-Za-z0-9_-]+)?|CHAINS|SIGNER_STATE_DIR|WEBAUTHN_(RP_ID|ORIGINS)|LOCAL_SIGNER_(SOCKET|CONTROL_SOCKET|STATE_DB|MASTER_KEY|BIN|ROLE|DIRECT_SIGNING|CAPS_ENABLED|SOLANA_MAX_PER_TX|SOLANA_MAX_DAILY|SOLANA_ALLOW_PROGRAMS)(__[A-Za-z0-9_-]+)?)=' "$SIGNERD_ENV_FILE" || true
589
+ grep -E '^export (FASED_WALLET_(SOLANA_RPC_URL(__[A-Za-z0-9_-]+)?|CHAINS|SIGNER_STATE_DIR|WEBAUTHN_(RP_ID|ORIGINS)|LOCAL_SIGNER_(SOCKET|CONTROL_SOCKET|STATE_DB|MASTER_KEY|BIN|ROLE|DIRECT_SIGNING|CAPS_ENABLED|SOLANA_MAX_PER_TX|SOLANA_MAX_DAILY|SOLANA_ALLOW_PROGRAMS)(__[A-Za-z0-9_-]+)?)|FASED_SAT_(PROGRAM_ID|BOND_PROGRAM_ID|MINT_ADDRESS|MINT_PROGRAM_ID|RUNTIME_MANIFEST_(PATH|SHA256|SIGNATURE_PATH)))=' "$SIGNERD_ENV_FILE" || true
578
590
  )
579
591
  set +a
580
592
  }
@@ -1,78 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- umask 077
5
- PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
6
- export PATH
7
-
8
- if [[ "${EUID}" != "0" ]]; then
9
- echo "Hosted signer wallet import requires the VPS provider root console." >&2
10
- exit 1
11
- fi
12
-
13
- wallet_id=""
14
- locked_role=""
15
- while [[ $# -gt 0 ]]; do
16
- case "$1" in
17
- --wallet-id)
18
- [[ $# -ge 2 ]] || { echo "missing --wallet-id value" >&2; exit 64; }
19
- wallet_id="$2"
20
- shift 2
21
- ;;
22
- --locked-role)
23
- [[ $# -ge 2 ]] || { echo "missing --locked-role value" >&2; exit 64; }
24
- locked_role="$2"
25
- shift 2
26
- ;;
27
- *)
28
- echo "unsupported hosted wallet-import argument" >&2
29
- exit 64
30
- ;;
31
- esac
32
- done
33
-
34
- [[ "$wallet_id" =~ ^[a-z0-9_]{1,64}$ ]] || {
35
- echo "wallet id must already be normalized lowercase letters, numbers, or underscores" >&2
36
- exit 64
37
- }
38
- case "$locked_role" in
39
- agent|mining|vault) ;;
40
- *) echo "locked role must be agent, mining, or vault" >&2; exit 64 ;;
41
- esac
42
-
43
- signer_bin="/opt/fased/signer/fased-signerd"
44
- control_socket="/run/fased-signerd/control.sock"
45
- runuser_bin="/usr/sbin/runuser"
46
- env_bin="/usr/bin/env"
47
- stat_bin="/usr/bin/stat"
48
- signer_user="fased-signer"
49
-
50
- for executable in "$signer_bin" "$runuser_bin" "$env_bin" "$stat_bin"; do
51
- [[ -f "$executable" && -x "$executable" && ! -L "$executable" ]] || {
52
- echo "required hosted signer executable is missing or unsafe" >&2
53
- exit 1
54
- }
55
- read -r owner mode <<<"$($stat_bin -Lc '%u %a' "$executable")"
56
- [[ "$owner" == "0" && $((8#$mode & 8#22)) -eq 0 ]] || {
57
- echo "required hosted signer executable is not root-owned and non-writable" >&2
58
- exit 1
59
- }
60
- done
61
-
62
- [[ -S "$control_socket" && ! -L "$control_socket" ]] || {
63
- echo "hosted signer control socket is unavailable" >&2
64
- exit 1
65
- }
66
-
67
- # The root-console caller supplies only a new wallet id, an immutable role, and
68
- # one keypair on stdin. The signer creates a deny-all policy and refuses
69
- # replacement. The app/Gateway account has no sudo rule for this helper.
70
- exec "$runuser_bin" -u "$signer_user" -- \
71
- "$env_bin" -i \
72
- HOME=/var/lib/fased-signerd \
73
- LANG=C.UTF-8 \
74
- PATH=/usr/bin:/bin:/usr/sbin:/sbin \
75
- "$signer_bin" admin wallet import \
76
- --control-socket "$control_socket" \
77
- --wallet-id "$wallet_id" \
78
- --locked-role "$locked_role"