@onecraft/wallet 0.0.0-stage → 0.1.145
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/.claude-plugin/marketplace.json +20 -0
- package/.openclaw/AGENTS.md +100 -0
- package/.openclaw/extensions/agent-wallet/README.md +195 -0
- package/.openclaw/extensions/agent-wallet/dist/index.js +2198 -0
- package/.openclaw/extensions/agent-wallet/index.ts +2198 -0
- package/.openclaw/extensions/agent-wallet/openclaw.plugin.json +251 -0
- package/.openclaw/extensions/agent-wallet/package.json +49 -0
- package/.openclaw/extensions/agent-wallet/skills/cards/SKILL.md +211 -0
- package/.openclaw/extensions/agent-wallet/skills/wallet-operator/SKILL.md +30 -0
- package/CHANGELOG.md +1232 -0
- package/LICENSE +104 -0
- package/README.md +193 -2
- package/VERSION +1 -0
- package/agent-wallet/.env.example +63 -0
- package/agent-wallet/AGENTS.md +130 -0
- package/agent-wallet/CARD_VAULT.md +640 -0
- package/agent-wallet/README.md +615 -0
- package/agent-wallet/UPGRADE_COMPATIBILITY.md +66 -0
- package/agent-wallet/agent_wallet/__init__.py +16 -0
- package/agent-wallet/agent_wallet/approval.py +165 -0
- package/agent-wallet/agent_wallet/autonomous_permissions.py +281 -0
- package/agent-wallet/agent_wallet/autonomous_policy.py +305 -0
- package/agent-wallet/agent_wallet/autonomous_session.py +236 -0
- package/agent-wallet/agent_wallet/boot_key_migration.py +155 -0
- package/agent-wallet/agent_wallet/boot_key_recovery.py +57 -0
- package/agent-wallet/agent_wallet/bootstrap.py +194 -0
- package/agent-wallet/agent_wallet/card_catalog.py +243 -0
- package/agent-wallet/agent_wallet/card_runtime_secrets.py +108 -0
- package/agent-wallet/agent_wallet/card_vault.py +331 -0
- package/agent-wallet/agent_wallet/card_vault_cli.py +174 -0
- package/agent-wallet/agent_wallet/card_vault_import.py +65 -0
- package/agent-wallet/agent_wallet/card_vault_keychain.py +239 -0
- package/agent-wallet/agent_wallet/config.py +719 -0
- package/agent-wallet/agent_wallet/connector_cli.py +198 -0
- package/agent-wallet/agent_wallet/connectors/__init__.py +28 -0
- package/agent-wallet/agent_wallet/connectors/catalog.py +68 -0
- package/agent-wallet/agent_wallet/connectors/client.py +308 -0
- package/agent-wallet/agent_wallet/connectors/intent_policy.py +243 -0
- package/agent-wallet/agent_wallet/connectors/manifest.py +192 -0
- package/agent-wallet/agent_wallet/connectors/registry.py +341 -0
- package/agent-wallet/agent_wallet/encrypted_storage.py +314 -0
- package/agent-wallet/agent_wallet/evm_user_wallets.py +910 -0
- package/agent-wallet/agent_wallet/exceptions.py +10 -0
- package/agent-wallet/agent_wallet/file_ops.py +34 -0
- package/agent-wallet/agent_wallet/http_client.py +25 -0
- package/agent-wallet/agent_wallet/kernel_browser.py +479 -0
- package/agent-wallet/agent_wallet/kernel_cli.py +57 -0
- package/agent-wallet/agent_wallet/kernel_gateway.py +95 -0
- package/agent-wallet/agent_wallet/keystore.py +503 -0
- package/agent-wallet/agent_wallet/laso_card_vault.py +246 -0
- package/agent-wallet/agent_wallet/models.py +66 -0
- package/agent-wallet/agent_wallet/morpho_monitor.py +298 -0
- package/agent-wallet/agent_wallet/nonce_registry.py +59 -0
- package/agent-wallet/agent_wallet/openclaw_adapter.py +9129 -0
- package/agent-wallet/agent_wallet/openclaw_cli.py +658 -0
- package/agent-wallet/agent_wallet/openclaw_runtime.py +194 -0
- package/agent-wallet/agent_wallet/plugin_bundle.py +44 -0
- package/agent-wallet/agent_wallet/providers/__init__.py +1 -0
- package/agent-wallet/agent_wallet/providers/bags.py +202 -0
- package/agent-wallet/agent_wallet/providers/dexscreener.py +147 -0
- package/agent-wallet/agent_wallet/providers/evm_activity.py +257 -0
- package/agent-wallet/agent_wallet/providers/evm_portfolio.py +459 -0
- package/agent-wallet/agent_wallet/providers/imd.py +720 -0
- package/agent-wallet/agent_wallet/providers/jupiter.py +519 -0
- package/agent-wallet/agent_wallet/providers/kamino.py +404 -0
- package/agent-wallet/agent_wallet/providers/lifi.py +302 -0
- package/agent-wallet/agent_wallet/providers/solana_rpc.py +447 -0
- package/agent-wallet/agent_wallet/providers/tokenized_stocks.py +189 -0
- package/agent-wallet/agent_wallet/providers/wdk_evm_local.py +346 -0
- package/agent-wallet/agent_wallet/providers/x402.py +1972 -0
- package/agent-wallet/agent_wallet/sealed_keys.py +118 -0
- package/agent-wallet/agent_wallet/solana_stake.py +103 -0
- package/agent-wallet/agent_wallet/solana_tx.py +93 -0
- package/agent-wallet/agent_wallet/spending_limits.py +119 -0
- package/agent-wallet/agent_wallet/telemetry.py +481 -0
- package/agent-wallet/agent_wallet/transaction_policy.py +573 -0
- package/agent-wallet/agent_wallet/update_check.py +190 -0
- package/agent-wallet/agent_wallet/user_wallets.py +573 -0
- package/agent-wallet/agent_wallet/validation.py +31 -0
- package/agent-wallet/agent_wallet/vault_executor.py +456 -0
- package/agent-wallet/agent_wallet/wallet_layer/__init__.py +1 -0
- package/agent-wallet/agent_wallet/wallet_layer/base.py +1204 -0
- package/agent-wallet/agent_wallet/wallet_layer/base58.py +44 -0
- package/agent-wallet/agent_wallet/wallet_layer/factory.py +117 -0
- package/agent-wallet/agent_wallet/wallet_layer/solana.py +5246 -0
- package/agent-wallet/agent_wallet/wallet_layer/wdk_evm.py +2705 -0
- package/agent-wallet/examples/bootstrap_wallet.py +21 -0
- package/agent-wallet/examples/openclaw_runtime_onboarding.py +28 -0
- package/agent-wallet/examples/openclaw_user_wallet_example.py +31 -0
- package/agent-wallet/examples/openclaw_wallet_adapter_example.py +33 -0
- package/agent-wallet/openclaw.plugin.json +118 -0
- package/agent-wallet/pyproject.toml +36 -0
- package/agent-wallet/scripts/bootstrap_openclaw_evm.py +312 -0
- package/agent-wallet/scripts/build_release_bundle.py +210 -0
- package/agent-wallet/scripts/finalize_openclaw_local_wallet_config.py +121 -0
- package/agent-wallet/scripts/install_agent_wallet.py +1357 -0
- package/agent-wallet/scripts/install_openclaw_local_config.py +421 -0
- package/agent-wallet/scripts/install_openclaw_sealed_keys.py +117 -0
- package/agent-wallet/scripts/manage_openclaw_evm_wallet.py +333 -0
- package/agent-wallet/scripts/security_utils.py +37 -0
- package/agent-wallet/scripts/setup_evm_wallet.sh +140 -0
- package/agent-wallet/scripts/switch_openclaw_wallet_network.py +109 -0
- package/agent-wallet/skills/wallet-operator/SKILL.md +157 -0
- package/bin/lib/boot-key.mjs +184 -0
- package/bin/lib/evm-daemon.mjs +389 -0
- package/bin/lib/host-detection.mjs +259 -0
- package/bin/lib/integrations.mjs +578 -0
- package/bin/lib/release-python.mjs +9 -0
- package/bin/lib/update-transaction.mjs +235 -0
- package/bin/openclaw-agent-wallet.mjs +3354 -0
- package/claude-code/plugins/agent-wallet/.claude-plugin/plugin.json +19 -0
- package/claude-code/plugins/agent-wallet/.mcp.json +14 -0
- package/claude-code/plugins/agent-wallet/AGENTLAYER_AGENT_GUIDE.md +282 -0
- package/claude-code/plugins/agent-wallet/README.md +134 -0
- package/claude-code/plugins/agent-wallet/commands/agentlayer-autonomous-approve.md +39 -0
- package/claude-code/plugins/agent-wallet/commands/agentlayer-autonomous-revoke.md +17 -0
- package/claude-code/plugins/agent-wallet/commands/cards.md +129 -0
- package/claude-code/plugins/agent-wallet/commands/guide.md +40 -0
- package/claude-code/plugins/agent-wallet/commands/imd.md +125 -0
- package/claude-code/plugins/agent-wallet/commands/wallet-base.md +60 -0
- package/claude-code/plugins/agent-wallet/commands/wallet-ethereum.md +37 -0
- package/claude-code/plugins/agent-wallet/commands/wallet-evm.md +39 -0
- package/claude-code/plugins/agent-wallet/commands/wallet-setup.md +25 -0
- package/claude-code/plugins/agent-wallet/commands/wallet-sol.md +51 -0
- package/claude-code/plugins/agent-wallet/commands/wallet-statusline.md +34 -0
- package/claude-code/plugins/agent-wallet/commands/x402.md +121 -0
- package/claude-code/plugins/agent-wallet/commands/yield.md +62 -0
- package/claude-code/plugins/agent-wallet/hooks/hooks.json +16 -0
- package/claude-code/plugins/agent-wallet/scripts/bootstrap_backend.sh +136 -0
- package/claude-code/plugins/agent-wallet/scripts/enable_statusline.py +52 -0
- package/claude-code/plugins/agent-wallet/scripts/resolve_wallet_addresses.py +69 -0
- package/claude-code/plugins/agent-wallet/scripts/run_mcp.sh +66 -0
- package/claude-code/plugins/agent-wallet/scripts/wallet_statusline.py +130 -0
- package/claude-code/plugins/agent-wallet/scripts/wallet_statusline_setup.sh +40 -0
- package/claude-code/plugins/agent-wallet/skills/wallet-operator/SKILL.md +21 -0
- package/codex/plugins/agent-wallet/.codex-plugin/plugin.json +37 -0
- package/codex/plugins/agent-wallet/.mcp.json +15 -0
- package/codex/plugins/agent-wallet/README.md +158 -0
- package/codex/plugins/agent-wallet/scripts/run_mcp.sh +47 -0
- package/codex/plugins/agent-wallet/server.py +1797 -0
- package/codex/plugins/agent-wallet/skills/cards/SKILL.md +225 -0
- package/codex/plugins/agent-wallet/skills/imd/SKILL.md +145 -0
- package/codex/plugins/agent-wallet/skills/wallet-base/SKILL.md +56 -0
- package/codex/plugins/agent-wallet/skills/wallet-operator/SKILL.md +85 -0
- package/codex/plugins/agent-wallet/skills/wallet-sol/SKILL.md +29 -0
- package/codex/plugins/agent-wallet/skills/x402/SKILL.md +159 -0
- package/codex/plugins/agent-wallet/skills/yield/SKILL.md +65 -0
- package/connectors/AGENTS.md +37 -0
- package/connectors/DEVELOPER_GUIDE.md +131 -0
- package/connectors/README.md +139 -0
- package/connectors/READ_ONLY_BETA.md +54 -0
- package/connectors/RELEASING.md +48 -0
- package/connectors/conformance/README.md +31 -0
- package/connectors/conformance/package.json +54 -0
- package/connectors/conformance/scripts/sync-license.mjs +3 -0
- package/connectors/conformance/scripts/sync-spec.mjs +16 -0
- package/connectors/conformance/src/cli.ts +43 -0
- package/connectors/conformance/src/index.ts +7 -0
- package/connectors/conformance/src/runner.ts +314 -0
- package/connectors/conformance/src/types.ts +27 -0
- package/connectors/conformance/test/fixtures/invalid-response-identity.json +14 -0
- package/connectors/conformance/test/fixtures/missing-tool-fixture.json +4 -0
- package/connectors/conformance/test/runner.test.mjs +151 -0
- package/connectors/conformance/tsconfig.json +17 -0
- package/connectors/examples/reference-crypto-data/Dockerfile +21 -0
- package/connectors/examples/reference-crypto-data/README.md +51 -0
- package/connectors/examples/reference-crypto-data/conformance.json +11 -0
- package/connectors/examples/reference-crypto-data/connector.json +95 -0
- package/connectors/examples/reference-crypto-data/package.json +21 -0
- package/connectors/examples/reference-crypto-data/railway.toml +9 -0
- package/connectors/examples/reference-crypto-data/src/connector.ts +137 -0
- package/connectors/examples/reference-crypto-data/src/server.ts +13 -0
- package/connectors/examples/reference-crypto-data/test/connector.test.mjs +97 -0
- package/connectors/examples/reference-crypto-data/tsconfig.json +17 -0
- package/connectors/package-lock.json +561 -0
- package/connectors/package.json +19 -0
- package/connectors/scripts/smoke-packed-packages.mjs +121 -0
- package/connectors/sdk-typescript/README.md +47 -0
- package/connectors/sdk-typescript/package.json +49 -0
- package/connectors/sdk-typescript/scripts/sync-license.mjs +3 -0
- package/connectors/sdk-typescript/src/connector.ts +204 -0
- package/connectors/sdk-typescript/src/errors.ts +11 -0
- package/connectors/sdk-typescript/src/http.ts +116 -0
- package/connectors/sdk-typescript/src/index.ts +26 -0
- package/connectors/sdk-typescript/src/types.ts +101 -0
- package/connectors/sdk-typescript/test/sdk.test.mjs +181 -0
- package/connectors/sdk-typescript/tsconfig.json +21 -0
- package/connectors/spec/connector-manifest.schema.json +340 -0
- package/connectors/spec/connector-protocol.md +159 -0
- package/connectors/spec/transaction-intent.schema.json +281 -0
- package/connectors/templates/read-only/.env.example +1 -0
- package/connectors/templates/read-only/Dockerfile +11 -0
- package/connectors/templates/read-only/README.md +33 -0
- package/connectors/templates/read-only/conformance.json +11 -0
- package/connectors/templates/read-only/connector.json +64 -0
- package/connectors/templates/read-only/package.json +21 -0
- package/connectors/templates/read-only/railway.toml +9 -0
- package/connectors/templates/read-only/src/connector.ts +61 -0
- package/connectors/templates/read-only/src/server.ts +14 -0
- package/connectors/templates/read-only/test/connector.test.mjs +62 -0
- package/connectors/templates/read-only/tsconfig.json +17 -0
- package/cursor/plugins/agent-wallet/.cursor-plugin/plugin.json +14 -0
- package/cursor/plugins/agent-wallet/README.md +62 -0
- package/cursor/plugins/agent-wallet/mcp.json +16 -0
- package/cursor/plugins/agent-wallet/scripts/run_mcp.sh +33 -0
- package/cursor/plugins/agent-wallet/server.py +33 -0
- package/cursor/plugins/agent-wallet/skills/cards/SKILL.md +210 -0
- package/cursor/plugins/agent-wallet/skills/wallet-base/SKILL.md +56 -0
- package/cursor/plugins/agent-wallet/skills/wallet-operator/SKILL.md +23 -0
- package/cursor/plugins/agent-wallet/skills/wallet-sol/SKILL.md +29 -0
- package/cursor/plugins/agent-wallet/skills/x402/SKILL.md +130 -0
- package/hermes/plugins/agent_wallet/README.md +54 -0
- package/hermes/plugins/agent_wallet/__init__.py +55 -0
- package/hermes/plugins/agent_wallet/plugin.yaml +9 -0
- package/hermes/plugins/agent_wallet/schemas.py +211 -0
- package/hermes/plugins/agent_wallet/tools.py +622 -0
- package/install-from-github.sh +139 -0
- package/integrations/hedera/treasury-guard/README.md +92 -0
- package/integrations/hedera/treasury-guard/examples/treasury-policy.example.json +9 -0
- package/integrations/hedera/treasury-guard/package-lock.json +880 -0
- package/integrations/hedera/treasury-guard/package.json +8 -0
- package/integrations/hedera/treasury-guard/skills/onecraft-hedera-treasury/SKILL.md +22 -0
- package/integrations/hedera/treasury-guard/src/hedera-mirror-client.mjs +106 -0
- package/integrations/hedera/treasury-guard/src/hedera-signer.mjs +120 -0
- package/integrations/hedera/treasury-guard/src/treasury-cli.mjs +177 -0
- package/integrations/hedera/treasury-guard/src/treasury-policy.mjs +155 -0
- package/mcp/README.md +39 -0
- package/mcp/scripts/run_mcp.sh +37 -0
- package/mcp/server.py +33 -0
- package/package.json +106 -4
- package/scripts/check_release_version.mjs +72 -0
- package/scripts/version_targets.mjs +60 -0
- package/setup.sh +87 -0
- package/wdk-evm-wallet/.env.example +38 -0
- package/wdk-evm-wallet/README.md +254 -0
- package/wdk-evm-wallet/bootstrap.sh +8 -0
- package/wdk-evm-wallet/package-lock.json +2359 -0
- package/wdk-evm-wallet/package.json +43 -0
- package/wdk-evm-wallet/run-local.sh +12 -0
- package/wdk-evm-wallet/src/config.js +461 -0
- package/wdk-evm-wallet/src/imd.js +231 -0
- package/wdk-evm-wallet/src/json.js +35 -0
- package/wdk-evm-wallet/src/local_vault.js +407 -0
- package/wdk-evm-wallet/src/network_state.js +96 -0
- package/wdk-evm-wallet/src/pending_transactions.js +148 -0
- package/wdk-evm-wallet/src/server.js +849 -0
- package/wdk-evm-wallet/src/shutdown.js +63 -0
- package/wdk-evm-wallet/src/wdk_evm_wallet.js +10036 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Agent Wallet Codex Plugin
|
|
2
|
+
|
|
3
|
+
This plugin adds the existing local OneCraft wallet runtime to Codex.
|
|
4
|
+
|
|
5
|
+
It does not create a new wallet. It reuses the current runtime under:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
~/.openclaw/agent-wallet-runtime/current/agent-wallet
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Primary design rules:
|
|
12
|
+
|
|
13
|
+
- keep wallet policy, approvals, and signing in `agent-wallet/`
|
|
14
|
+
- keep this plugin as a thin MCP bridge for Codex
|
|
15
|
+
- reuse the same wallets, networks, and tool surface already used by OpenClaw and Hermes
|
|
16
|
+
- avoid secrets in plugin config or marketplace metadata
|
|
17
|
+
|
|
18
|
+
## What it exposes
|
|
19
|
+
|
|
20
|
+
- direct wallet tools for Solana and EVM
|
|
21
|
+
- session wallet selection with `set_wallet_backend`
|
|
22
|
+
- EVM network selection with `set_evm_network`
|
|
23
|
+
- auto-managed approval binding for `preview -> execute` write flows
|
|
24
|
+
- bundled Codex skills, including `wallet-sol` for showing the Solana wallet
|
|
25
|
+
portfolio directly in chat, `wallet-base` for showing the Base EVM
|
|
26
|
+
wallet portfolio and switching the session's active backend to Base,
|
|
27
|
+
`cards` for issuing a Laso Finance prepaid card paid via x402, and `x402`
|
|
28
|
+
for discovering and paying arbitrary x402 services via CDP Bazaar or
|
|
29
|
+
Agentic Market
|
|
30
|
+
|
|
31
|
+
## MCP tool approvals
|
|
32
|
+
|
|
33
|
+
The bridge publishes the backend's `read_only` classification as MCP
|
|
34
|
+
`readOnlyHint` and `destructiveHint` annotations. Balance reads, active-wallet
|
|
35
|
+
inspection, service discovery and x402 previews are advertised as reads.
|
|
36
|
+
Payments and other writes remain potentially destructive; tools without an
|
|
37
|
+
explicit read-only classification are treated as writes.
|
|
38
|
+
|
|
39
|
+
These hints help Codex classify calls, but do not override its MCP approval
|
|
40
|
+
settings. A host that requires approval while its session disallows approval
|
|
41
|
+
prompts can still reject a call before it reaches this bridge. After updating
|
|
42
|
+
the plugin, restart the host to reload tool metadata. Wallet payment approval
|
|
43
|
+
tokens and execution checks are independent and still apply.
|
|
44
|
+
|
|
45
|
+
See the [Codex configuration reference](https://learn.chatgpt.com/docs/config-file/config-reference)
|
|
46
|
+
for per-server and per-tool approval settings.
|
|
47
|
+
|
|
48
|
+
## Question menus in Codex
|
|
49
|
+
|
|
50
|
+
Like Claude's explicit `AskUserQuestion` calls, Codex skills call the native
|
|
51
|
+
`functions.request_user_input_async` at the relevant choice/confirmation step.
|
|
52
|
+
The payload uses `questions[].title` and string `options`; it is not a wallet
|
|
53
|
+
MCP tool and is not configured through Claude's `allowed-tools` metadata.
|
|
54
|
+
Claude's `mcp__plugin_wallet_agent-wallet__*` aliases are not copied: resolve
|
|
55
|
+
wallet tool names against the active Codex MCP surface (for example,
|
|
56
|
+
`mcp__agent_wallet__swap_evm_tokens`). The short names in skills refer to those
|
|
57
|
+
existing wallet tools, not new wrapper commands.
|
|
58
|
+
`wallet-operator` also covers plain-language swaps, transfers and other wallet
|
|
59
|
+
writes: render a compact transaction-preview table in chat before opening the
|
|
60
|
+
confirmation menu. Swap tables normally have four rows (spend, estimated receive,
|
|
61
|
+
slippage, gas); disclose exceptional fees or material warnings below instead of
|
|
62
|
+
adding routine allowance, self-recipient, zero-fee or pending-simulation rows. Existing consent and backend approvals still apply;
|
|
63
|
+
chat is the fallback when the async tool is absent or disallows the purpose.
|
|
64
|
+
After an async question is accepted, skills keep the turn open using native
|
|
65
|
+
wake-on-input `clock.sleep` calls, without a final answer until the user replies.
|
|
66
|
+
Hosts without both tools use chat fallback. Host-mandated explanations and
|
|
67
|
+
skill citations remain controlled by the host.
|
|
68
|
+
|
|
69
|
+
## Runtime requirements
|
|
70
|
+
|
|
71
|
+
- The primary route is `npx @onecraft/wallet install --yes`.
|
|
72
|
+
- The alternative Git marketplace route is:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
codex plugin marketplace add lopushok9/Agent-Layer
|
|
76
|
+
codex plugin add agent-wallet@agentlayer
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The marketplace plugin installs the shared runtime through the npm package
|
|
80
|
+
on first MCP start if it is missing. Node.js 24, npm, and Python 3 are
|
|
81
|
+
required. Restart ChatGPT desktop or Codex after installation.
|
|
82
|
+
- keep the local wallet files and `~/.openclaw/sealed_keys.json` in place
|
|
83
|
+
- `wallet codex install --yes` remains available for the npm-managed local
|
|
84
|
+
plugin path
|
|
85
|
+
|
|
86
|
+
## Bundled skills
|
|
87
|
+
|
|
88
|
+
After either installation route and a host restart, the plugin ships bundled
|
|
89
|
+
skills:
|
|
90
|
+
|
|
91
|
+
- `wallet-sol` — invoke from the slash menu or explicitly as `$wallet-sol`
|
|
92
|
+
to render the connected Solana wallet portfolio as a compact chat table.
|
|
93
|
+
- `wallet-base` — invoke from the slash menu or explicitly as `$wallet-base`
|
|
94
|
+
to render the connected Base EVM wallet portfolio as a compact chat table
|
|
95
|
+
and switch the session's active wallet backend to Base.
|
|
96
|
+
- `cards` -- invoke from the slash menu or explicitly as `$cards` to issue a
|
|
97
|
+
Laso Finance prepaid card (US or international), paid via x402 from the
|
|
98
|
+
connected wallet.
|
|
99
|
+
- `x402` -- invoke from the slash menu or explicitly as `$x402` to discover
|
|
100
|
+
x402-paid services via CDP Bazaar or Agentic Market (or use a URL already
|
|
101
|
+
given), preview the payment terms, and pay from the connected wallet.
|
|
102
|
+
- `yield` -- invoke from the slash menu or explicitly as `$yield` to scan the
|
|
103
|
+
wallet's Morpho vault positions on Base and Ethereum for better-yielding
|
|
104
|
+
vaults with the same asset, set the scan up as a Codex automation every 3
|
|
105
|
+
days, or move a position after an explicit confirmation.
|
|
106
|
+
|
|
107
|
+
## Path resolution
|
|
108
|
+
|
|
109
|
+
The bridge resolves the wallet runtime from:
|
|
110
|
+
|
|
111
|
+
1. `AGENT_WALLET_PACKAGE_ROOT`
|
|
112
|
+
2. `OPENCLAW_AGENT_WALLET_PACKAGE_ROOT`
|
|
113
|
+
3. `~/.openclaw/agent-wallet-runtime/current/agent-wallet`
|
|
114
|
+
|
|
115
|
+
If the runtime lives elsewhere, set one of the env overrides before starting Codex.
|
|
116
|
+
|
|
117
|
+
## Saved card catalog
|
|
118
|
+
|
|
119
|
+
`list_saved_cards` returns this runtime user's references and masked metadata.
|
|
120
|
+
`get_saved_card_status` refreshes pending issuance when due by default;
|
|
121
|
+
`refresh=false` is a cached read. `refresh_saved_card` performs the same free,
|
|
122
|
+
rate-limited retrieval explicitly. No owner unlock, signing or payment is needed.
|
|
123
|
+
Outputs never contain PAN, CVV or provider tokens. Once issuance is complete,
|
|
124
|
+
working credentials are retired and statuses/balances remain cached snapshots.
|
|
125
|
+
These tools are advertised as reads: issuer retrieval may update local encrypted
|
|
126
|
+
cache files but never places orders or moves funds. Host MCP approval settings
|
|
127
|
+
still apply. Full reveal remains an owner CLI operation with macOS authentication.
|
|
128
|
+
|
|
129
|
+
### Private card use
|
|
130
|
+
|
|
131
|
+
`use_saved_card` previews an exact HTTPS request with card-field placeholders
|
|
132
|
+
and can combine Laso issuance and use under one normal host confirmation.
|
|
133
|
+
Execute with its `operation_id`. `continue_vault_operation` resumes an already
|
|
134
|
+
authorized delayed task without a second approval or owner unlock;
|
|
135
|
+
`get_vault_operation` reads its cached state. The fixed executor substitutes
|
|
136
|
+
fields internally and returns HTTP status only. It never exposes PAN/CVV or
|
|
137
|
+
raw provider output and never automatically repeats an uncertain payment.
|
|
138
|
+
|
|
139
|
+
Runtime-encrypted `.use` card capsules enable this path without a Keychain
|
|
140
|
+
prompt per use. They are decryptable by the wallet runtime, including after
|
|
141
|
+
issuance; this is a different boundary from the owner-authenticated reveal CLI.
|
|
142
|
+
Authorization lasts 48 hours and binds the exact request/card/wallet. This
|
|
143
|
+
supports private HTTPS use and managed Kernel checkout; local Chrome autofill remains separate.
|
|
144
|
+
|
|
145
|
+
### Kernel browser connection
|
|
146
|
+
|
|
147
|
+
Run `wallet vault kernel-connect` in your own terminal and paste the dashboard
|
|
148
|
+
API key at the hidden prompt. The key is saved in the encrypted runtime bundle,
|
|
149
|
+
never in plugin config or chat. `wallet vault kernel-status` reports configuration;
|
|
150
|
+
`wallet vault kernel-disconnect` removes the saved key.
|
|
151
|
+
|
|
152
|
+
`kernel_browser` prepares a billable cloud checkout with public form data.
|
|
153
|
+
`use_saved_card(checkout=...)` binds the browser, exact page, USD total, field
|
|
154
|
+
selectors and submit action to the existing host confirmation. It can issue a
|
|
155
|
+
card in that same task. The backend fills privately, locks observations and
|
|
156
|
+
closes the session after one attempt. Kernel and the merchant process the real
|
|
157
|
+
card data; the model receives only safe status. No local browser installation
|
|
158
|
+
is needed. See [the vault guide](../../../agent-wallet/CARD_VAULT.md) for limits and cleanup behavior.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
set -eu
|
|
3
|
+
|
|
4
|
+
# Physical paths (pwd -P) so symlinked install layouts resolve to the real dir.
|
|
5
|
+
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
|
|
6
|
+
PLUGIN_ROOT=$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd -P)
|
|
7
|
+
OPENCLAW_HOME=${OPENCLAW_HOME:-"$HOME/.openclaw"}
|
|
8
|
+
PACKAGE_ROOT=${AGENT_WALLET_PACKAGE_ROOT:-${OPENCLAW_AGENT_WALLET_PACKAGE_ROOT:-"$OPENCLAW_HOME/agent-wallet-runtime/current/agent-wallet"}}
|
|
9
|
+
|
|
10
|
+
if [ -n "${AGENT_WALLET_PYTHON:-}" ]; then
|
|
11
|
+
PYTHON_BIN=$AGENT_WALLET_PYTHON
|
|
12
|
+
elif [ -n "${OPENCLAW_AGENT_WALLET_PYTHON:-}" ]; then
|
|
13
|
+
PYTHON_BIN=$OPENCLAW_AGENT_WALLET_PYTHON
|
|
14
|
+
elif [ -x "$PACKAGE_ROOT/.venv/bin/python" ]; then
|
|
15
|
+
PYTHON_BIN=$PACKAGE_ROOT/.venv/bin/python
|
|
16
|
+
elif [ -x "$PACKAGE_ROOT/.runtime-venv/bin/python" ]; then
|
|
17
|
+
PYTHON_BIN=$PACKAGE_ROOT/.runtime-venv/bin/python
|
|
18
|
+
else
|
|
19
|
+
PYTHON_BIN=python3
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
if [ ! -f "$PLUGIN_ROOT/server.py" ]; then
|
|
23
|
+
printf '{"error":"agent-wallet server.py not found in codex plugin.","fix":"npx @onecraft/wallet install --yes"}\n' >&2
|
|
24
|
+
exit 1
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
# Fail loudly (not -32000) if the resolved server cannot even be parsed.
|
|
28
|
+
# Use ast.parse (no bytecode written) so a read-only install dir cannot trigger
|
|
29
|
+
# a false "runtime broken" error from py_compile failing to write __pycache__.
|
|
30
|
+
if ! "$PYTHON_BIN" -c 'import sys, ast; ast.parse(open(sys.argv[1], encoding="utf-8").read())' "$PLUGIN_ROOT/server.py" 2>/dev/null; then
|
|
31
|
+
"$PYTHON_BIN" - "$PLUGIN_ROOT/server.py" >&2 <<'PY'
|
|
32
|
+
import json, sys
|
|
33
|
+
print(json.dumps({
|
|
34
|
+
"error": "agent-wallet server.py failed to parse — runtime likely broken.",
|
|
35
|
+
"server_py": sys.argv[1],
|
|
36
|
+
"fix": "npx @onecraft/wallet install --yes (or: npx @onecraft/wallet rollback)",
|
|
37
|
+
}))
|
|
38
|
+
PY
|
|
39
|
+
exit 1
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
# Tag anonymous telemetry with this frontend so adoption can be split per host
|
|
43
|
+
# (claude-code / codex / hermes / openclaw). An explicit override still wins.
|
|
44
|
+
: "${AGENT_WALLET_HOST:=codex}"
|
|
45
|
+
export AGENT_WALLET_HOST
|
|
46
|
+
|
|
47
|
+
exec "$PYTHON_BIN" "$PLUGIN_ROOT/server.py"
|