@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.
Files changed (248) hide show
  1. package/.claude-plugin/marketplace.json +20 -0
  2. package/.openclaw/AGENTS.md +100 -0
  3. package/.openclaw/extensions/agent-wallet/README.md +195 -0
  4. package/.openclaw/extensions/agent-wallet/dist/index.js +2198 -0
  5. package/.openclaw/extensions/agent-wallet/index.ts +2198 -0
  6. package/.openclaw/extensions/agent-wallet/openclaw.plugin.json +251 -0
  7. package/.openclaw/extensions/agent-wallet/package.json +49 -0
  8. package/.openclaw/extensions/agent-wallet/skills/cards/SKILL.md +211 -0
  9. package/.openclaw/extensions/agent-wallet/skills/wallet-operator/SKILL.md +30 -0
  10. package/CHANGELOG.md +1232 -0
  11. package/LICENSE +104 -0
  12. package/README.md +193 -2
  13. package/VERSION +1 -0
  14. package/agent-wallet/.env.example +63 -0
  15. package/agent-wallet/AGENTS.md +130 -0
  16. package/agent-wallet/CARD_VAULT.md +640 -0
  17. package/agent-wallet/README.md +615 -0
  18. package/agent-wallet/UPGRADE_COMPATIBILITY.md +66 -0
  19. package/agent-wallet/agent_wallet/__init__.py +16 -0
  20. package/agent-wallet/agent_wallet/approval.py +165 -0
  21. package/agent-wallet/agent_wallet/autonomous_permissions.py +281 -0
  22. package/agent-wallet/agent_wallet/autonomous_policy.py +305 -0
  23. package/agent-wallet/agent_wallet/autonomous_session.py +236 -0
  24. package/agent-wallet/agent_wallet/boot_key_migration.py +155 -0
  25. package/agent-wallet/agent_wallet/boot_key_recovery.py +57 -0
  26. package/agent-wallet/agent_wallet/bootstrap.py +194 -0
  27. package/agent-wallet/agent_wallet/card_catalog.py +243 -0
  28. package/agent-wallet/agent_wallet/card_runtime_secrets.py +108 -0
  29. package/agent-wallet/agent_wallet/card_vault.py +331 -0
  30. package/agent-wallet/agent_wallet/card_vault_cli.py +174 -0
  31. package/agent-wallet/agent_wallet/card_vault_import.py +65 -0
  32. package/agent-wallet/agent_wallet/card_vault_keychain.py +239 -0
  33. package/agent-wallet/agent_wallet/config.py +719 -0
  34. package/agent-wallet/agent_wallet/connector_cli.py +198 -0
  35. package/agent-wallet/agent_wallet/connectors/__init__.py +28 -0
  36. package/agent-wallet/agent_wallet/connectors/catalog.py +68 -0
  37. package/agent-wallet/agent_wallet/connectors/client.py +308 -0
  38. package/agent-wallet/agent_wallet/connectors/intent_policy.py +243 -0
  39. package/agent-wallet/agent_wallet/connectors/manifest.py +192 -0
  40. package/agent-wallet/agent_wallet/connectors/registry.py +341 -0
  41. package/agent-wallet/agent_wallet/encrypted_storage.py +314 -0
  42. package/agent-wallet/agent_wallet/evm_user_wallets.py +910 -0
  43. package/agent-wallet/agent_wallet/exceptions.py +10 -0
  44. package/agent-wallet/agent_wallet/file_ops.py +34 -0
  45. package/agent-wallet/agent_wallet/http_client.py +25 -0
  46. package/agent-wallet/agent_wallet/kernel_browser.py +479 -0
  47. package/agent-wallet/agent_wallet/kernel_cli.py +57 -0
  48. package/agent-wallet/agent_wallet/kernel_gateway.py +95 -0
  49. package/agent-wallet/agent_wallet/keystore.py +503 -0
  50. package/agent-wallet/agent_wallet/laso_card_vault.py +246 -0
  51. package/agent-wallet/agent_wallet/models.py +66 -0
  52. package/agent-wallet/agent_wallet/morpho_monitor.py +298 -0
  53. package/agent-wallet/agent_wallet/nonce_registry.py +59 -0
  54. package/agent-wallet/agent_wallet/openclaw_adapter.py +9129 -0
  55. package/agent-wallet/agent_wallet/openclaw_cli.py +658 -0
  56. package/agent-wallet/agent_wallet/openclaw_runtime.py +194 -0
  57. package/agent-wallet/agent_wallet/plugin_bundle.py +44 -0
  58. package/agent-wallet/agent_wallet/providers/__init__.py +1 -0
  59. package/agent-wallet/agent_wallet/providers/bags.py +202 -0
  60. package/agent-wallet/agent_wallet/providers/dexscreener.py +147 -0
  61. package/agent-wallet/agent_wallet/providers/evm_activity.py +257 -0
  62. package/agent-wallet/agent_wallet/providers/evm_portfolio.py +459 -0
  63. package/agent-wallet/agent_wallet/providers/imd.py +720 -0
  64. package/agent-wallet/agent_wallet/providers/jupiter.py +519 -0
  65. package/agent-wallet/agent_wallet/providers/kamino.py +404 -0
  66. package/agent-wallet/agent_wallet/providers/lifi.py +302 -0
  67. package/agent-wallet/agent_wallet/providers/solana_rpc.py +447 -0
  68. package/agent-wallet/agent_wallet/providers/tokenized_stocks.py +189 -0
  69. package/agent-wallet/agent_wallet/providers/wdk_evm_local.py +346 -0
  70. package/agent-wallet/agent_wallet/providers/x402.py +1972 -0
  71. package/agent-wallet/agent_wallet/sealed_keys.py +118 -0
  72. package/agent-wallet/agent_wallet/solana_stake.py +103 -0
  73. package/agent-wallet/agent_wallet/solana_tx.py +93 -0
  74. package/agent-wallet/agent_wallet/spending_limits.py +119 -0
  75. package/agent-wallet/agent_wallet/telemetry.py +481 -0
  76. package/agent-wallet/agent_wallet/transaction_policy.py +573 -0
  77. package/agent-wallet/agent_wallet/update_check.py +190 -0
  78. package/agent-wallet/agent_wallet/user_wallets.py +573 -0
  79. package/agent-wallet/agent_wallet/validation.py +31 -0
  80. package/agent-wallet/agent_wallet/vault_executor.py +456 -0
  81. package/agent-wallet/agent_wallet/wallet_layer/__init__.py +1 -0
  82. package/agent-wallet/agent_wallet/wallet_layer/base.py +1204 -0
  83. package/agent-wallet/agent_wallet/wallet_layer/base58.py +44 -0
  84. package/agent-wallet/agent_wallet/wallet_layer/factory.py +117 -0
  85. package/agent-wallet/agent_wallet/wallet_layer/solana.py +5246 -0
  86. package/agent-wallet/agent_wallet/wallet_layer/wdk_evm.py +2705 -0
  87. package/agent-wallet/examples/bootstrap_wallet.py +21 -0
  88. package/agent-wallet/examples/openclaw_runtime_onboarding.py +28 -0
  89. package/agent-wallet/examples/openclaw_user_wallet_example.py +31 -0
  90. package/agent-wallet/examples/openclaw_wallet_adapter_example.py +33 -0
  91. package/agent-wallet/openclaw.plugin.json +118 -0
  92. package/agent-wallet/pyproject.toml +36 -0
  93. package/agent-wallet/scripts/bootstrap_openclaw_evm.py +312 -0
  94. package/agent-wallet/scripts/build_release_bundle.py +210 -0
  95. package/agent-wallet/scripts/finalize_openclaw_local_wallet_config.py +121 -0
  96. package/agent-wallet/scripts/install_agent_wallet.py +1357 -0
  97. package/agent-wallet/scripts/install_openclaw_local_config.py +421 -0
  98. package/agent-wallet/scripts/install_openclaw_sealed_keys.py +117 -0
  99. package/agent-wallet/scripts/manage_openclaw_evm_wallet.py +333 -0
  100. package/agent-wallet/scripts/security_utils.py +37 -0
  101. package/agent-wallet/scripts/setup_evm_wallet.sh +140 -0
  102. package/agent-wallet/scripts/switch_openclaw_wallet_network.py +109 -0
  103. package/agent-wallet/skills/wallet-operator/SKILL.md +157 -0
  104. package/bin/lib/boot-key.mjs +184 -0
  105. package/bin/lib/evm-daemon.mjs +389 -0
  106. package/bin/lib/host-detection.mjs +259 -0
  107. package/bin/lib/integrations.mjs +578 -0
  108. package/bin/lib/release-python.mjs +9 -0
  109. package/bin/lib/update-transaction.mjs +235 -0
  110. package/bin/openclaw-agent-wallet.mjs +3354 -0
  111. package/claude-code/plugins/agent-wallet/.claude-plugin/plugin.json +19 -0
  112. package/claude-code/plugins/agent-wallet/.mcp.json +14 -0
  113. package/claude-code/plugins/agent-wallet/AGENTLAYER_AGENT_GUIDE.md +282 -0
  114. package/claude-code/plugins/agent-wallet/README.md +134 -0
  115. package/claude-code/plugins/agent-wallet/commands/agentlayer-autonomous-approve.md +39 -0
  116. package/claude-code/plugins/agent-wallet/commands/agentlayer-autonomous-revoke.md +17 -0
  117. package/claude-code/plugins/agent-wallet/commands/cards.md +129 -0
  118. package/claude-code/plugins/agent-wallet/commands/guide.md +40 -0
  119. package/claude-code/plugins/agent-wallet/commands/imd.md +125 -0
  120. package/claude-code/plugins/agent-wallet/commands/wallet-base.md +60 -0
  121. package/claude-code/plugins/agent-wallet/commands/wallet-ethereum.md +37 -0
  122. package/claude-code/plugins/agent-wallet/commands/wallet-evm.md +39 -0
  123. package/claude-code/plugins/agent-wallet/commands/wallet-setup.md +25 -0
  124. package/claude-code/plugins/agent-wallet/commands/wallet-sol.md +51 -0
  125. package/claude-code/plugins/agent-wallet/commands/wallet-statusline.md +34 -0
  126. package/claude-code/plugins/agent-wallet/commands/x402.md +121 -0
  127. package/claude-code/plugins/agent-wallet/commands/yield.md +62 -0
  128. package/claude-code/plugins/agent-wallet/hooks/hooks.json +16 -0
  129. package/claude-code/plugins/agent-wallet/scripts/bootstrap_backend.sh +136 -0
  130. package/claude-code/plugins/agent-wallet/scripts/enable_statusline.py +52 -0
  131. package/claude-code/plugins/agent-wallet/scripts/resolve_wallet_addresses.py +69 -0
  132. package/claude-code/plugins/agent-wallet/scripts/run_mcp.sh +66 -0
  133. package/claude-code/plugins/agent-wallet/scripts/wallet_statusline.py +130 -0
  134. package/claude-code/plugins/agent-wallet/scripts/wallet_statusline_setup.sh +40 -0
  135. package/claude-code/plugins/agent-wallet/skills/wallet-operator/SKILL.md +21 -0
  136. package/codex/plugins/agent-wallet/.codex-plugin/plugin.json +37 -0
  137. package/codex/plugins/agent-wallet/.mcp.json +15 -0
  138. package/codex/plugins/agent-wallet/README.md +158 -0
  139. package/codex/plugins/agent-wallet/scripts/run_mcp.sh +47 -0
  140. package/codex/plugins/agent-wallet/server.py +1797 -0
  141. package/codex/plugins/agent-wallet/skills/cards/SKILL.md +225 -0
  142. package/codex/plugins/agent-wallet/skills/imd/SKILL.md +145 -0
  143. package/codex/plugins/agent-wallet/skills/wallet-base/SKILL.md +56 -0
  144. package/codex/plugins/agent-wallet/skills/wallet-operator/SKILL.md +85 -0
  145. package/codex/plugins/agent-wallet/skills/wallet-sol/SKILL.md +29 -0
  146. package/codex/plugins/agent-wallet/skills/x402/SKILL.md +159 -0
  147. package/codex/plugins/agent-wallet/skills/yield/SKILL.md +65 -0
  148. package/connectors/AGENTS.md +37 -0
  149. package/connectors/DEVELOPER_GUIDE.md +131 -0
  150. package/connectors/README.md +139 -0
  151. package/connectors/READ_ONLY_BETA.md +54 -0
  152. package/connectors/RELEASING.md +48 -0
  153. package/connectors/conformance/README.md +31 -0
  154. package/connectors/conformance/package.json +54 -0
  155. package/connectors/conformance/scripts/sync-license.mjs +3 -0
  156. package/connectors/conformance/scripts/sync-spec.mjs +16 -0
  157. package/connectors/conformance/src/cli.ts +43 -0
  158. package/connectors/conformance/src/index.ts +7 -0
  159. package/connectors/conformance/src/runner.ts +314 -0
  160. package/connectors/conformance/src/types.ts +27 -0
  161. package/connectors/conformance/test/fixtures/invalid-response-identity.json +14 -0
  162. package/connectors/conformance/test/fixtures/missing-tool-fixture.json +4 -0
  163. package/connectors/conformance/test/runner.test.mjs +151 -0
  164. package/connectors/conformance/tsconfig.json +17 -0
  165. package/connectors/examples/reference-crypto-data/Dockerfile +21 -0
  166. package/connectors/examples/reference-crypto-data/README.md +51 -0
  167. package/connectors/examples/reference-crypto-data/conformance.json +11 -0
  168. package/connectors/examples/reference-crypto-data/connector.json +95 -0
  169. package/connectors/examples/reference-crypto-data/package.json +21 -0
  170. package/connectors/examples/reference-crypto-data/railway.toml +9 -0
  171. package/connectors/examples/reference-crypto-data/src/connector.ts +137 -0
  172. package/connectors/examples/reference-crypto-data/src/server.ts +13 -0
  173. package/connectors/examples/reference-crypto-data/test/connector.test.mjs +97 -0
  174. package/connectors/examples/reference-crypto-data/tsconfig.json +17 -0
  175. package/connectors/package-lock.json +561 -0
  176. package/connectors/package.json +19 -0
  177. package/connectors/scripts/smoke-packed-packages.mjs +121 -0
  178. package/connectors/sdk-typescript/README.md +47 -0
  179. package/connectors/sdk-typescript/package.json +49 -0
  180. package/connectors/sdk-typescript/scripts/sync-license.mjs +3 -0
  181. package/connectors/sdk-typescript/src/connector.ts +204 -0
  182. package/connectors/sdk-typescript/src/errors.ts +11 -0
  183. package/connectors/sdk-typescript/src/http.ts +116 -0
  184. package/connectors/sdk-typescript/src/index.ts +26 -0
  185. package/connectors/sdk-typescript/src/types.ts +101 -0
  186. package/connectors/sdk-typescript/test/sdk.test.mjs +181 -0
  187. package/connectors/sdk-typescript/tsconfig.json +21 -0
  188. package/connectors/spec/connector-manifest.schema.json +340 -0
  189. package/connectors/spec/connector-protocol.md +159 -0
  190. package/connectors/spec/transaction-intent.schema.json +281 -0
  191. package/connectors/templates/read-only/.env.example +1 -0
  192. package/connectors/templates/read-only/Dockerfile +11 -0
  193. package/connectors/templates/read-only/README.md +33 -0
  194. package/connectors/templates/read-only/conformance.json +11 -0
  195. package/connectors/templates/read-only/connector.json +64 -0
  196. package/connectors/templates/read-only/package.json +21 -0
  197. package/connectors/templates/read-only/railway.toml +9 -0
  198. package/connectors/templates/read-only/src/connector.ts +61 -0
  199. package/connectors/templates/read-only/src/server.ts +14 -0
  200. package/connectors/templates/read-only/test/connector.test.mjs +62 -0
  201. package/connectors/templates/read-only/tsconfig.json +17 -0
  202. package/cursor/plugins/agent-wallet/.cursor-plugin/plugin.json +14 -0
  203. package/cursor/plugins/agent-wallet/README.md +62 -0
  204. package/cursor/plugins/agent-wallet/mcp.json +16 -0
  205. package/cursor/plugins/agent-wallet/scripts/run_mcp.sh +33 -0
  206. package/cursor/plugins/agent-wallet/server.py +33 -0
  207. package/cursor/plugins/agent-wallet/skills/cards/SKILL.md +210 -0
  208. package/cursor/plugins/agent-wallet/skills/wallet-base/SKILL.md +56 -0
  209. package/cursor/plugins/agent-wallet/skills/wallet-operator/SKILL.md +23 -0
  210. package/cursor/plugins/agent-wallet/skills/wallet-sol/SKILL.md +29 -0
  211. package/cursor/plugins/agent-wallet/skills/x402/SKILL.md +130 -0
  212. package/hermes/plugins/agent_wallet/README.md +54 -0
  213. package/hermes/plugins/agent_wallet/__init__.py +55 -0
  214. package/hermes/plugins/agent_wallet/plugin.yaml +9 -0
  215. package/hermes/plugins/agent_wallet/schemas.py +211 -0
  216. package/hermes/plugins/agent_wallet/tools.py +622 -0
  217. package/install-from-github.sh +139 -0
  218. package/integrations/hedera/treasury-guard/README.md +92 -0
  219. package/integrations/hedera/treasury-guard/examples/treasury-policy.example.json +9 -0
  220. package/integrations/hedera/treasury-guard/package-lock.json +880 -0
  221. package/integrations/hedera/treasury-guard/package.json +8 -0
  222. package/integrations/hedera/treasury-guard/skills/onecraft-hedera-treasury/SKILL.md +22 -0
  223. package/integrations/hedera/treasury-guard/src/hedera-mirror-client.mjs +106 -0
  224. package/integrations/hedera/treasury-guard/src/hedera-signer.mjs +120 -0
  225. package/integrations/hedera/treasury-guard/src/treasury-cli.mjs +177 -0
  226. package/integrations/hedera/treasury-guard/src/treasury-policy.mjs +155 -0
  227. package/mcp/README.md +39 -0
  228. package/mcp/scripts/run_mcp.sh +37 -0
  229. package/mcp/server.py +33 -0
  230. package/package.json +106 -4
  231. package/scripts/check_release_version.mjs +72 -0
  232. package/scripts/version_targets.mjs +60 -0
  233. package/setup.sh +87 -0
  234. package/wdk-evm-wallet/.env.example +38 -0
  235. package/wdk-evm-wallet/README.md +254 -0
  236. package/wdk-evm-wallet/bootstrap.sh +8 -0
  237. package/wdk-evm-wallet/package-lock.json +2359 -0
  238. package/wdk-evm-wallet/package.json +43 -0
  239. package/wdk-evm-wallet/run-local.sh +12 -0
  240. package/wdk-evm-wallet/src/config.js +461 -0
  241. package/wdk-evm-wallet/src/imd.js +231 -0
  242. package/wdk-evm-wallet/src/json.js +35 -0
  243. package/wdk-evm-wallet/src/local_vault.js +407 -0
  244. package/wdk-evm-wallet/src/network_state.js +96 -0
  245. package/wdk-evm-wallet/src/pending_transactions.js +148 -0
  246. package/wdk-evm-wallet/src/server.js +849 -0
  247. package/wdk-evm-wallet/src/shutdown.js +63 -0
  248. package/wdk-evm-wallet/src/wdk_evm_wallet.js +10036 -0
@@ -0,0 +1,640 @@
1
+ # Private card vault
2
+
3
+ Implementation and research notes, 2026-10-21. This is our own local vault;
4
+ AgentCard, 1Claw, Bitwarden and Infisical are research references, not dependencies.
5
+ Fixed HTTPS and managed Kernel browser executors are included. Local Chrome
6
+ autofill, vault cloud sync and AgentCard integration remain separate.
7
+
8
+ ## Automatic setup and owner access
9
+
10
+ On macOS, installation and updates automatically provision the card vault.
11
+ The backend also provisions a missing vault for the actual runtime user before
12
+ card requests, so a custom host identity needs no manual initialization.
13
+ No new password is created. The vault private key lives in the **login Keychain**
14
+ and access requires its system password dialog. Normally that password matches
15
+ the macOS account password; if the user separately changed the login Keychain
16
+ password, macOS asks for that password. Python never receives the password.
17
+
18
+ ```bash
19
+ wallet vault status
20
+ wallet vault list
21
+ wallet vault show <reference>
22
+ wallet vault refresh <reference>
23
+ wallet vault reveal <reference>
24
+ wallet vault reveal <reference> --output ~/private-card.json
25
+ wallet vault remove <reference>
26
+ ```
27
+
28
+ `status` inspects public local metadata. Other owner read commands require a
29
+ terminal and system authentication for each invocation; there is no persisted
30
+ unlock session. `list`, `show` and `refresh` display masked summaries with issuer
31
+ card IDs and receipt information. `reveal` displays PAN, expiration, CVV, balance
32
+ and billing address, without provider tokens. `--output` explicitly writes a new
33
+ plaintext JSON file with mode 0600 and refuses overwrites; remove it after use.
34
+ `remove` deletes only the local encrypted record after confirmation, not the
35
+ issuer card or copies in backups. Node inherits terminal IO without buffering
36
+ secret output or attaching it to installer telemetry.
37
+
38
+ The CLI resolves identity in the same order as the Codex wallet bridge:
39
+ `AGENT_WALLET_USER_ID`, `OPENCLAW_AGENT_WALLET_USER_ID`, configured OpenClaw
40
+ `plugins.entries.agent-wallet.config.userId`, then `USER`. Explicit `--user-id`
41
+ selects a different identity. `OPENCLAW_HOME` selects the wallet state home.
42
+ Never select the repository as the state home.
43
+
44
+ ```bash
45
+ wallet vault reveal <reference> --user-id my-other-runtime-user
46
+ ```
47
+
48
+ For source-tree development before installing this runtime:
49
+
50
+ ```bash
51
+ PYTHONPATH=agent-wallet agent-wallet/.runtime-venv/bin/python -m agent_wallet.card_vault_cli status
52
+ ```
53
+
54
+ The internal `provision` subcommand runs without a terminal, without reading any
55
+ private key, and with native authentication UI disabled. Repeated provisioning
56
+ checks the existing key and its ACL; it never replaces the recipient. A locked
57
+ or unavailable Keychain is reported in installation results and checked again
58
+ before card payment. Failure does not disable unrelated wallet features.
59
+ Linux and Windows system-authenticated card vaults are not implemented in this
60
+ change. Installation reports that limitation and uses no plaintext or silently
61
+ readable key fallback for cards.
62
+
63
+ ## Key hierarchy and storage
64
+
65
+ The owner has a random X25519 key pair. The runtime can use its public key to
66
+ encrypt independently randomized card records through libsodium sealed boxes.
67
+ It needs no private key or owner interaction to deposit a card.
68
+ [Libsodium sealed boxes](https://libsodium.gitbook.io/doc/public-key_cryptography/sealed_boxes).
69
+
70
+ ```text
71
+ ~/.openclaw/card-vault/<sha256(runtime-user-id)>/
72
+ vault.json # v2: public key, scope, protection type, random key ID
73
+ <random-id>.card # encrypted issuer order, tokens, details and payment receipt
74
+ <random-id>.update # latest details, sealed to owner public key
75
+ <random-id>.auth # rotated credentials, sealed to owner public key
76
+ <random-id>.agent # runtime-encrypted safe metadata + pending retrieval job
77
+ <random-id>.use # runtime-encrypted normalized card fields for executors
78
+ <operation-id>.operation # runtime-encrypted immutable request + authorization/outcome
79
+ <random-id>.lock # serializes record refresh/removal against initial capture
80
+ .owner.lock # serializes provisioning, migration and owner operations
81
+
82
+ macOS login Keychain:
83
+ service = namespace derived from the stable vault directory
84
+ account = user scope + random key ID
85
+ secret = 32-byte private decryption key
86
+ ```
87
+
88
+ A v2 `vault.json` contains no private key or password wrapper. The original card record
89
+ remains compatible with v1. Scope, record ID and snapshot purpose are inside
90
+ authenticated ciphertext to reject cross-user, cross-record and snapshot
91
+ substitution. The original receipt is preserved when refresh writes snapshots. Files use 0600, the user
92
+ vault directory requires 0700, and reads reject symlinks, unsafe ownership,
93
+ permissive modes and oversized files. Writes use atomic replacement and fsync.
94
+ Missing Keychain entries or missing metadata for existing encrypted cards cause
95
+ an error; automatic setup does not generate a replacement key over old cards.
96
+
97
+ `card_vault_keychain.py` calls Security.framework directly through ctypes. It
98
+ uses a separate service from the wallet boot-key store: the boot-key store's
99
+ silent access policy is inappropriate for card decryption. No `security -w`
100
+ subprocess, key in argv, plaintext fallback, or extra password collection is used.
101
+
102
+ The login Keychain uses file-based ACLs. Creation sets an empty trusted-app list
103
+ and requests a password for restricted access. Existing ACLs for wildcard,
104
+ decryption and ACL modification are checked before use, and again after secret
105
+ retrieval. An allow-all or trusted-application ACL is rejected. Native creation
106
+ and readiness checks disable UI; only explicit owner unlock allows a system
107
+ dialog. Keys are not cached between CLI invocations.
108
+
109
+ On macOS 10.13.1 and later, Apple documents that the OS ignores the old prompt
110
+ selector and requires the Keychain password when prompting to trust an app;
111
+ this implementation requires that OS version and an empty trusted-app list.
112
+ Persisted prompt flags may be normalized by the framework. Choosing permanent
113
+ trust, or manually weakening the entry's ACL, causes subsequent validation to
114
+ fail closed. [Apple SecACLCopyContents](https://developer.apple.com/documentation/security/secaclcopycontents(_:_:_:_:)),
115
+ [Apple Keychain ACLs](https://developer.apple.com/documentation/security/access-control-lists).
116
+
117
+ This is a login-Keychain password implementation, not Touch ID or Secure Enclave
118
+ storage. Apple's data protection Keychain and biometric access-control mechanism
119
+ require different signing and packaging for command-line tools.
120
+ [Apple TN3137](https://developer.apple.com/documentation/technotes/tn3137-on-mac-keychains).
121
+ The file-based APIs are deprecated by Apple but remain available; migration to a
122
+ properly signed native application is a future packaging task.
123
+
124
+ ## Agent catalog and delayed issuance
125
+
126
+ The tools are available through the shared wallet adapter in Codex and OpenClaw:
127
+
128
+ | Tool | Behavior |
129
+ | --- | --- |
130
+ | `list_saved_cards(limit=20, after=...)` | Cached catalog, up to 100 records per page; returns `next_cursor`. No issuer request. |
131
+ | `get_saved_card_status(vault_reference, refresh=true)` | Checks a pending order when its next permitted check is due. Set `refresh=false` for cached metadata. |
132
+ | `refresh_saved_card(vault_reference)` | Explicitly checks the saved pending order. Never creates or pays for another card. |
133
+
134
+ All three return allowlisted metadata: opaque reference, provider, card type,
135
+ status, last four digits, cached balance, `details_stored`, timestamps,
136
+ `refresh_available`, `refresh_state` and retry timing. They do not return PAN,
137
+ CVV, issuer card IDs, credentials, payment receipts or raw issuer errors. The
138
+ adapter scopes access to the current runtime user. No system password is needed
139
+ for these operations. Full owner reveal still requires system authentication.
140
+
141
+ New pending orders include a separately encrypted retrieval job in `.agent`.
142
+ A purpose- and user-scoped HMAC-SHA256 key derived from the existing sealed wallet
143
+ runtime master key protects this state with SecretBox. The job contains only
144
+ issuer card ID/type, authentication tokens and retry bookkeeping; it contains no
145
+ PAN or CVV. The runtime master key must be available before a card purchase.
146
+ The owner private key is never used by agent refresh: received details are sealed
147
+ to its public key in `.update`. Rotated credentials are saved to the runtime job
148
+ first and then to the owner-sealed `.auth` snapshot. Credentials are removed from
149
+ the active job only after details are durably saved or a terminal issuer state
150
+ or authentication rejection is confirmed.
151
+
152
+ This enables unattended delayed issuance, with a specific security tradeoff:
153
+ the backend can use pending issuer tokens to retrieve plaintext card details.
154
+ An attacker controlling that runtime or its master key can do the same while
155
+ those credentials remain valid. Laso tokens may have account-wide privileges;
156
+ fixed endpoints and card-ID checks constrain our code, not the issuer token's
157
+ cryptographic permissions. This is not owner-authenticated isolation during the
158
+ pending period. The model itself receives only the safe tool result.
159
+
160
+ Checks are driven by tool calls, with no always-running background service.
161
+ The initial US poll is bounded to five attempts three seconds apart. Subsequent
162
+ checks enforce at least three seconds for US cards and 60 seconds for
163
+ international cards; transient errors use bounded backoff up to 300 seconds.
164
+ Agents should honor `retry_after_seconds` and check in a later turn or scheduled
165
+ run. Once credentials are retired, status and balance remain cached snapshots;
166
+ these tools do not provide continuous live balance refresh for ready cards.
167
+
168
+ Pending credentials have a seven-day local lifetime. Listing reports expired
169
+ jobs as unavailable for refresh; a later refresh/status call clears their active
170
+ credentials without contacting the issuer. There is no background eraser or
171
+ remote token revocation. Backups, old ciphertext and filesystem snapshots may
172
+ retain credentials; local deletion does not invalidate them at Laso. Removal
173
+ clears the runtime job before deleting the owner-encrypted files.
174
+
175
+ Older records without an agent catalog appear as `owner_access_required`.
176
+ One authenticated owner CLI read imports their metadata and eligible pending job.
177
+ A missing runtime key does not block the owner's authenticated card reveal.
178
+
179
+ ## Private use without additional owner prompts
180
+
181
+ `use_saved_card` supports `preview`, `prepare` and `execute`. One normal host
182
+ confirmation covers the exact outbound request and, optionally, new Laso card
183
+ issuance. No second permission grant, unlock session or owner Keychain prompt
184
+ is required for saving, waiting for issuance or passing fields to the executor.
185
+ Prepare requires `user_intent=true`; execute requires the normal host-issued
186
+ approval token with the existing mainnet confirmation rule. Generic HTTPS card
187
+ use does not infer a spend amount for autonomous budget authorization.
188
+
189
+ Example preview for a merchant API that accepts card details directly:
190
+
191
+ ```json
192
+ {
193
+ "mode": "preview",
194
+ "issue_card": {"card_type": "us", "amount_usd": "20.00"},
195
+ "purpose": "Pay the requested subscription at the agreed price",
196
+ "request": {
197
+ "url": "https://merchant.example/api/subscription",
198
+ "method": "POST",
199
+ "json": {
200
+ "amount_cents": 2000,
201
+ "currency": "USD",
202
+ "card_number": "{{card.number}}",
203
+ "cvv": "{{card.cvv}}",
204
+ "exp_month": "{{card.exp_month}}",
205
+ "exp_year": "{{card.exp_year}}"
206
+ }
207
+ }
208
+ }
209
+ ```
210
+
211
+ This is an illustrative merchant contract, not a working integration for an
212
+ arbitrary subscription site. Supply `vault_reference` instead of `issue_card`
213
+ to use an existing saved card. The exact HTTPS URL, method, public headers,
214
+ request template and its digest, wallet owner/network, user scope, card
215
+ reference, expiry and optional Laso debit are bound to `confirmation_summary`.
216
+ The issuance quote is frozen; execution does not silently reprice or fall back
217
+ to a fresh unpaid probe. All template values are public or opaque field
218
+ placeholders. Card secrets are accepted only in body values, never URLs,
219
+ headers or object keys. JSON and form bodies are supported.
220
+
221
+ After the user confirms in the host, execute with the returned `operation_id`.
222
+ If issuance is delayed, `continue_vault_operation(operation_id)` resumes the
223
+ same already authorized task without a fresh token. It cannot authorize a
224
+ prepared task or alter any parameters. Authorization lasts 48 hours from
225
+ preparation. `get_vault_operation(operation_id)` reads cached state without
226
+ network access. An expired operation must be prepared/confirmed again.
227
+ `cancel_vault_operation(operation_id, user_intent=true)` stops the local task
228
+ before its next outbound action without another approval. It preserves any
229
+ already issued card and cannot reverse a sent request or refund a payment.
230
+ There is no automatic recurring payment authority or background worker.
231
+
232
+ New cards store a `.use` capsule before the pending issuer job is retired.
233
+ It contains an allowlist of normalized PAN, CVV, expiry and billing fields,
234
+ encrypted with SecretBox under a separate purpose/user-scoped HMAC-SHA256 key
235
+ derived from the existing sealed runtime master. The owner sealed receipt and
236
+ latest snapshots remain available through the authenticated CLI. Old cards
237
+ need one authenticated owner CLI read to populate their capsule. The catalog
238
+ exposes `private_use_stored`, never the field values. Local removal clears the
239
+ capsule first and serializes with execution on the card lock.
240
+
241
+ **Security tradeoff:** the runtime can now decrypt stored card capsules after
242
+ issuance is complete. Owner authentication protects the manual reveal path and
243
+ owner private key; it is no longer the only cryptographic path to the card
244
+ values. Code or an attacker possessing the runtime master and vault files can
245
+ read the capsule. This design keeps secrets out of normal agent tool results;
246
+ it does not isolate them from arbitrary same-user code that can read the runtime
247
+ master. Host confirmation cannot substitute for operating-system isolation.
248
+
249
+ The fixed HTTPS consumer has the following boundaries; Kernel is described below. It does not execute a
250
+ caller-selected program, load plugins or accept callbacks from model input.
251
+ Before sending secrets it validates all DNS answers as public addresses, pins
252
+ the connection to one address and verifies TLS against the original hostname.
253
+ Redirects, environment proxies and transport retries are disabled. It never
254
+ returns provider bodies, headers, cookies, redirects or remote error messages.
255
+ IPv4 is preferred when validated DNS answers contain both address families.
256
+ A persisted `dispatching` state precedes any outbound request. A caught
257
+ `httpx.ConnectError` or `ConnectTimeout` on this fresh, retry-free connection
258
+ returns to `authorized` with `last_attempt_not_sent=true` and a short retry hint;
259
+ `continue_vault_operation` can retry the unchanged plan under its original
260
+ unexpired authorization. This invocation does not retry automatically.
261
+ Crashes, read/write failures, cancellation and other indeterminate transport
262
+ errors remain `outcome_unknown`, with no automatic resend. Completed operations
263
+ return their stored result on replay. A stable idempotency header is sent as
264
+ an additional precaution, not as a guarantee that every merchant honors it.
265
+
266
+ Similarly, issuance is recorded before signing/payment. A crash can resume a
267
+ captured card receipt, but an uncertain issuance is never purchased again.
268
+ The operation and card locks serialize concurrent execution across processes;
269
+ authorization and terminal state survive host restarts. Lost outcome writes
270
+ leave a dispatch marker and therefore stop automatic retries.
271
+
272
+ `request_succeeded` means only that the endpoint returned a 2xx status.
273
+ `payment_confirmed` remains false because this executor does not interpret
274
+ merchant receipts. It cannot enforce a dollar ceiling independently of the
275
+ approved request's semantics; a merchant-specific consumer must verify the
276
+ actual amount/currency. Kernel checkout adds a dedicated browser consumer below.
277
+ Arbitrary secret exec, token-returning processor chains and subscription renewal
278
+ engines are not included.
279
+
280
+ ## Legacy migration and backups
281
+
282
+ Older local v1 vaults contain a password-encrypted private key (Argon2id and
283
+ SecretBox). Installation reports `migration_required` without changing them.
284
+ On the first owner CLI operation, or explicitly with:
285
+
286
+ ```bash
287
+ wallet vault migrate
288
+ ```
289
+
290
+ The CLI asks for the **old vault password once**, saves the same private key to
291
+ the protected login Keychain, verifies it with system authentication, and only
292
+ then atomically replaces the old password wrapper with v2 public metadata.
293
+ Existing card ciphertext and public key stay identical. A denied authentication
294
+ or failed write preserves the original wrapper. The system password is never
295
+ requested through `getpass`; that input exists only for legacy migration.
296
+ `change-password` explains that system Keychain settings now manage the password.
297
+ `init` is retained as an idempotent setup alias, not a required user step.
298
+
299
+ The runtime catalog and pending jobs also depend on the sealed wallet runtime
300
+ master key. Losing that key requires an authenticated owner read to rebuild them;
301
+ it does not change how owner card ciphertext is decrypted. Executor capsules
302
+ also depend on this master key and can be rebuilt from authenticated owner reads.
303
+
304
+ Backing up only the vault directory is **insufficient** for v2: its private key
305
+ is in the system login Keychain and must be preserved through appropriate system
306
+ backup/migration. Changing the vault location changes its Keychain namespace.
307
+ There is no application recovery key or portable recovery export in this change;
308
+ missing system keys are never silently recreated. Old v1 backups still carry
309
+ their old password protection. Initialization interrupted after adding a system
310
+ key but before publishing metadata may leave an unused protected Keychain entry.
311
+
312
+ ## Issuance, refresh and failures
313
+
314
+ ```mermaid
315
+ sequenceDiagram
316
+ participant I as Installer / updater
317
+ participant A as Agent / host
318
+ participant B as Python backend
319
+ participant L as Laso
320
+ participant V as Local vault
321
+ participant K as macOS Keychain
322
+ I->>K: Create restricted private-key entry, no secret read
323
+ I->>V: Save public recipient metadata
324
+ A->>B: Card preview and approved x402 execution
325
+ B->>V: Check readiness and save encrypted request receipt
326
+ B->>L: Pay and order
327
+ L-->>B: Order and authentication credentials
328
+ B->>V: Encrypt and persist immediately
329
+ B->>L: Poll US card privately, up to 5 attempts
330
+ L-->>B: Card details
331
+ B->>V: Persist encrypted details
332
+ B-->>A: Reference, status, last4
333
+ A->>B: get_saved_card_status(reference), later
334
+ B->>V: Read runtime-encrypted pending job
335
+ B->>L: Retrieve saved order, refresh token if needed
336
+ L-->>B: Card details or pending status
337
+ B->>V: Seal details; retire completed retrieval job
338
+ B-->>A: Masked metadata and retry timing
339
+ Note over K: Owner later invokes wallet vault reveal
340
+ K->>K: System password authentication
341
+ K-->>B: Private key for owner CLI process
342
+ ```
343
+
344
+ The wrapper intercepts both x402 preview and execution for fixed Laso card
345
+ routes, including unexpectedly successful previews. It replaces issuer response
346
+ bodies wholesale with an allowlisted summary, not field-by-field redaction.
347
+ Direct agent requests to `/get-card-data` are blocked. The private refresh backend uses fixed
348
+ HTTPS Laso routes, rejects redirects, bounds response sizes and suppresses
349
+ remote error bodies. Wallet preview, approval tokens and signing policy stay
350
+ in the existing wallet backend.
351
+
352
+ The initial order and credentials are on disk before polling. Nested `card` and
353
+ `auth` responses are supported. US polling is bounded to five attempts three
354
+ seconds apart. International queued orders are saved without repeated polling.
355
+ Owner and agent refresh handle expired credentials via fixed `POST /auth`, persisting
356
+ rotated tokens before retrying card retrieval; it does not buy another card.
357
+ [Laso lifecycle](https://docs.laso.finance/guides/card-lifecycle),
358
+ [Laso authentication](https://docs.laso.finance/guides/authentication).
359
+
360
+ A payment or retrieval error never triggers a second purchase. Preallocated
361
+ receipts identify uncertain execution, and provider error details are retained
362
+ encrypted where possible. A transport failure before receiving card ID/tokens,
363
+ or a disk failure after settlement, can still require issuer support. This is
364
+ not an exactly-once ordering protocol or guaranteed recovery of every paid order.
365
+
366
+ ## Research and future consumer boundary
367
+
368
+ | Reference | Relevant pattern |
369
+ | --- | --- |
370
+ | [AgentCard Vault](https://agentcard.com/vault) and [privacy](https://agentcard.com/privacy) | Device encryption and separate purchase approval; saved and issued cards have different storage paths. Marketing does not establish exact internals. |
371
+ | [1Claw cards](https://docs.1claw.xyz/docs/guides/payment-cards) | Laso/x402 ordering with approval and human-gated reveal; agents cannot reveal by default. |
372
+ | [Bitwarden cards](https://bitwarden.com/help/auto-fill-card-id/) and [CLI](https://bitwarden.com/help/cli/) | Owner vault access plus an independent browser autofill consumer. |
373
+ | [Infisical Agent Vault](https://github.com/Infisical/agent-vault) | Credential use inside a controlled proxy/process rather than returning secrets to the model. |
374
+ | [botiverse agent-vault](https://github.com/botiverse/agent-vault) | Safe output shapes and explicit owner reveal. Terminal checks alone are not authentication. |
375
+
376
+ A future local Chrome autofill consumer can use an extension and native messaging
377
+ host with grants bound to card, HTTPS origin,
378
+ tab/frame and allowed fields. The model receives an opaque reference and result.
379
+ Native messaging allowlists extension IDs; it does not validate merchant origins.
380
+ [Chrome native messaging](https://developer.chrome.com/docs/extensions/develop/concepts/native-messaging).
381
+ No native messaging host or local Chrome profile manipulation is implemented.
382
+ Cloud browser checkout uses the managed Kernel consumer below.
383
+
384
+ ## Security boundaries and verification
385
+
386
+ The runtime and issuer see plaintext at issuance. During owner access, the CLI
387
+ receives the private key in memory; Python cannot guarantee full zeroization.
388
+ The public recipient is trusted local state. Sealed boxes authenticate ciphertext,
389
+ not senders, so processes with write access can inject bogus encrypted records.
390
+ This does not protect against root, malicious modified local code, keyloggers or
391
+ process inspection after authentication. PTYs can be created by agents; the OS
392
+ Keychain policy, not the terminal check, is the decryption boundary. The vault
393
+ lives on the backend machine; a VPS deployment does not put it on the owner's PC.
394
+
395
+ This is not a hosted card-storage or PCI-compliance claim. Retained CVVs have
396
+ specific restrictions in merchant/concierge systems.
397
+ [PCI SSC explanation](https://www.pcisecuritystandards.org/faqs/1280/).
398
+
399
+ Offline tests cover record encryption, legacy and system access, idempotent
400
+ provisioning without key reads, system-authentication denial, migration rollback,
401
+ missing-key protection, issuer output isolation, refresh-token rotation, CLI
402
+ export and installer wiring. Catalog tests cover safe output allowlists,
403
+ user isolation, delayed issuance without owner unlock, token rotation across
404
+ sessions, rate limits, concurrent refresh, expiry, deletion, durable failure
405
+ recovery and matching Python/TypeScript tool schemas. A macOS native test uses a disposable explicitly
406
+ selected keychain to check persisted ACLs, silent-read denial and no overwrite;
407
+ it does not use the login keychain or show authentication UI. Real owner-password
408
+ dialog success and live card issuance are not exercised by these automated tests.
409
+
410
+ The supplied X post was not retrieved during initial research because MCP calls
411
+ were blocked by host approval policy. No conclusion here relies on that post.
412
+
413
+ ## Kernel browser checkout
414
+
415
+ Kernel runs the browser in its cloud. No local Chromium, Playwright installation,
416
+ Kernel SDK or Vercel browser account is required; the wallet uses the fixed
417
+ `https://api.onkernel.com` REST API with the existing HTTP client.
418
+
419
+ Existing personal connections retain direct access. Without a personal key,
420
+ the runtime automatically uses shared access through `providerGatewayUrl` /
421
+ `PROVIDER_GATEWAY_URL` when the gateway advertises `agentlayer-kernel-v1`.
422
+ The default gateway URL is already supplied by the installer. No new host config,
423
+ Kernel account, user API key, or vault migration is required for shared setup.
424
+
425
+ The gateway authenticates an automatically generated per-runtime-user Ed25519
426
+ identity, creates a browser without a profile, and returns a temporary key scoped
427
+ only to that browser. The identity and temporary key stay encrypted locally;
428
+ neither appears in tool output. Browser code and PAN/CVV go directly over TLS to
429
+ Kernel. The gateway handles provisioning and cleanup only. Kernel and Kernel
430
+ organization administrators remain trusted processors.
431
+
432
+ Connection mode is fixed at browser creation. Old browser records remain direct
433
+ and approval summaries are never rewritten. Shared leases have an absolute
434
+ server lifetime independent of activity while the gateway worker is running.
435
+ Cleanup deletes the browser and revokes
436
+ its key: key expiry alone does not invalidate existing connection URLs. Client
437
+ close may leave `cleanup_pending=true` during outages; the server worker retries.
438
+ Neither checkout nor allocation is automatically repeated after an uncertain
439
+ response. A service outage does not require a user to obtain a personal API key.
440
+
441
+ Optional personal connection in the owner's terminal:
442
+
443
+ ```bash
444
+ wallet vault kernel-connect
445
+ wallet vault kernel-status
446
+ # Optional: remove the locally saved API key
447
+ wallet vault kernel-disconnect
448
+ ```
449
+
450
+ `kernel-connect` uses hidden terminal input and validates the key with a read-only
451
+ browser listing. It merges `kernel_api_key` into the existing encrypted runtime
452
+ bundle without changing wallet/approval keys. It never accepts a key argument,
453
+ prints the key, creates a browser during connection, or stores it in host config.
454
+ `kernel-status` reports configuration only, not current API availability.
455
+ Connection is shared by the local runtime; browser state remains user scoped.
456
+ Disconnect does not revoke the key in Kernel's dashboard or cancel active tasks;
457
+ close sessions first. The commands become available after installing this revision.
458
+
459
+ ### Agent workflow
460
+
461
+ 1. `kernel_browser(action="open", url=..., user_intent=true)` creates a billable
462
+ headless session with a 300-second inactivity timeout. No profile or replay is
463
+ requested and browser telemetry capture is disabled. The model receives an
464
+ opaque `browser_reference`, public text/field metadata and iframe metadata;
465
+ no API key, remote session ID, CDP/live-view URL, cookies or input values.
466
+ 2. Use `observe` / `inspect(selector)` to inspect public page content. `click`,
467
+ `fill`, `select` and `press` handle ordinary public checkout setup and require
468
+ `user_intent=true`. These are real browser interactions and can have effects;
469
+ use them only for the user's task, never for entering card values or bypassing
470
+ `use_saved_card`. Page content is untrusted and cannot authorize a purchase.
471
+ 3. Preview `use_saved_card` with `checkout` instead of `request`, and either an
472
+ existing `vault_reference` or `issue_card`. The exact plan enters the normal
473
+ wallet confirmation summary, including any Laso debit. Example plan fragment:
474
+
475
+ ```json
476
+ {
477
+ "browser_reference": "<opaque 32-character reference>",
478
+ "page_url": "https://merchant.example/checkout",
479
+ "fields": [
480
+ {"field": "card.number", "selector": "#card-number"},
481
+ {"field": "card.cvv", "selector": "#cvv"},
482
+ {"field": "card.expiry_short", "selector": "#expiry"}
483
+ ],
484
+ "total_selector": "#order-total",
485
+ "expected_total": "$19.99",
486
+ "amount_usd": "19.99",
487
+ "submit_selector": "#pay",
488
+ "success_selector": "#payment-success"
489
+ }
490
+ ```
491
+
492
+ This example is illustrative; derive real selectors from the merchant page.
493
+ Each field may specify an exact `frame_url` for a hosted payment iframe;
494
+ otherwise it targets the main frame. Zero/multiple matching frames or fields
495
+ fail closed. Expiry formats include `card.expiry` (MM/YYYY), `card.expiry_short`
496
+ (MM/YY), separate month/year and `card.exp_year_short` (YY). Select fields match
497
+ option values. Missing billing values do not become empty fabricated addresses.
498
+ Totals currently require an unambiguous USD string such as `$19.99` or `19.99 USD`.
499
+
500
+ 4. Execute with the normal host approval. The runtime reserves the session before
501
+ issuance, checks the exact page, displayed total, field targets and initially
502
+ absent/hidden success marker, then issues/saves/waits for the card if needed.
503
+ Reservation disables ordinary browser inspection and interaction.
504
+ 5. Resolve all requested card fields locally before setting `dispatching` or
505
+ making the browser `private`. Missing billing/other fields terminate as
506
+ `checkout_unavailable`, without any private fill request. Once fields are
507
+ resolved, persist `dispatching` and set the browser to `private` before fill.
508
+ The trusted backend sends only bound card values to a fixed Playwright script
509
+ through Kernel. It rechecks page and displayed total after filling, clicks
510
+ once and waits for the specified merchant success marker on the same origin.
511
+ No arbitrary code is accepted from the model. Provider error text, stdout,
512
+ stderr and tab details are discarded. The model receives only safe status.
513
+ 6. Close/delete the browser after the attempt, including failures. If deletion
514
+ fails, `cleanup_pending` remains in encrypted browser state; retry
515
+ `kernel_browser(action="close", browser_reference=...)`. Ordinary access
516
+ stays denied, and the remote inactivity timeout is a fallback. Cancellation
517
+ and recovery of an interrupted dispatch also attempt cleanup.
518
+
519
+ `checkout_submitted` plus `merchant_confirmation_observed=true` means the chosen
520
+ merchant UI marker appeared. It is not independent evidence of a bank charge;
521
+ `payment_confirmed` remains false. Any indeterminate dispatch is
522
+ `outcome_unknown`, never automatically refilled or resubmitted. The fixed script
523
+ reports `not_started` if its checks fail before attempting the first fill; this
524
+ maps to `checkout_unavailable`, including a page/total change after preflight.
525
+ The attempt marker is set immediately before calling fill/select, since input
526
+ handlers may cause effects even if the call fails. Exceptions after that marker,
527
+ or a lost Kernel response with no reliable outcome, remain `outcome_unknown`.
528
+ A page/session that disappears before dispatch also yields
529
+ `checkout_unavailable`. Keep any issued
530
+ card; do not purchase another to repair the browser flow.
531
+
532
+ The 48-hour operation authorization does not keep a cloud browser alive for
533
+ 48 hours. Delayed international issuance may outlive its five-minute inactive
534
+ session. Recreate the checkout and prepare a new exact plan with the **existing**
535
+ card reference if the old session expires. There is no background keepalive bill.
536
+ 3-D Secure, CAPTCHA, redirects to a new payment origin, multi-step payment forms
537
+ and non-USD checkout are not automatically handled by this first consumer.
538
+
539
+ ### Cloud trust boundary
540
+
541
+ Kernel is a trusted processor here: it receives the private fill request and
542
+ runs the browser containing real PAN/CVV. The merchant's JavaScript can access
543
+ its payment fields, and Kernel/account administrators or other unrestricted CDP
544
+ clients may be able to inspect the VM. Disabling telemetry and closing a session
545
+ does not establish deletion from all provider logs/backups. Secrets stay out of
546
+ our model-facing tools, not out of Kernel. The exact displayed total is checked;
547
+ it is not a bank-enforced limit on what a malicious merchant can charge.
548
+
549
+ Kernel's credential item specification explicitly prohibits credit-card data in
550
+ ordinary credential items. This implementation therefore does **not** upload
551
+ cards to Kernel credential vaults or integrate AgentCard. See the official
552
+ [Python SDK](https://github.com/kernel/kernel-python-sdk),
553
+ [Playwright API](https://www.kernel.sh/docs/api-reference/browser-playwright/execute-playwrighttypescript-code-against-the-browser)
554
+ and [credential guidance](https://www.kernel.sh/docs/vaults/credentials).
555
+
556
+ ### Failed Laso responses
557
+
558
+ Only HTTP 200 order responses become saved cards. Quotes and explicit non-200
559
+ responses discard their provisional record and retain the original x402 status
560
+ and response, so issuer validation/rate-limit errors do not become catalog cards.
561
+ Combined issuance/use refuses to prepare an operation from a failed issuer response.
562
+ Transport exceptions still preserve an encrypted receipt for outcome review.
563
+
564
+ ## Import an existing card
565
+
566
+ `wallet vault import --card-type us` (or `international`) accepts PAN, expiry
567
+ and CVV through hidden input in the owner's terminal. It does not accept secret
568
+ arguments, redirected input, or echoed fallback input. It writes an owner-sealed
569
+ record and runtime use capsule and prints only catalog metadata/last4/reference.
570
+ It does not unlock the owner key or make an issuer/payment request. Legacy vaults
571
+ must be migrated first. Imported details are owner-provided, not issuer-verified;
572
+ no balance or Laso retrieval credentials are fabricated. Optional billing fields
573
+ are not inferred from the card. Use the returned reference with `use_saved_card`.
574
+
575
+ ### Private checkout diagnostics
576
+
577
+ `checkout_diagnostics` contains only fixed phase/reason enums, number of fields
578
+ filled, submit-attempt/completion booleans, visible validation/alert counts and
579
+ allowlisted field/error categories. It never includes input values, DOM, page
580
+ text, remote exceptions, stdout/stderr or arbitrary provider fields. The fixed
581
+ executor computes diagnostics before closing the session; filled sessions stay
582
+ inaccessible to general browser tools. A confirmation timeout remains
583
+ `outcome_unknown` even when validation errors are detected; diagnostics do not
584
+ permit automatic resubmission or establish a charge/refund outcome.
585
+
586
+ ### Stripe design-preview investigation (2026-10-22)
587
+
588
+ The public `https://checkout.stripe.dev/checkout` page is a design preview, not
589
+ an end-to-end payment acceptance fixture. Its embedded frame's public Stripe
590
+ JavaScript identifies `checkout.stripe.dev` via `document.referrer`; the payment
591
+ submission handler immediately returns when that preview flag is set. Evidence:
592
+
593
+ - [Preview-origin definition in embedded frame source](https://js.stripe.com/v3/embedded-checkout-inner.html)
594
+ - [Payment submission handler in Stripe's embedded application bundle](https://js.stripe.com/v3/fingerprinted/js/checkout-embedded-app-init-e58bbe82a3662bf3c0e5c9d5e8eec362.js)
595
+
596
+ In a live Kernel reproduction using the public Stripe sandbox Visa, all three
597
+ card fields were filled, submit completed, native/ARIA invalid-field count was
598
+ zero, and confirmation timed out after 20 seconds. A separate public-data-only
599
+ UI reproduction identified the single alert as Next.js's route announcer, not a
600
+ payment decline. Both private attempts remain `outcome_unknown`; no resubmission
601
+ is authorized by these findings. Closed private sessions were not inspected.
602
+ All diagnostic/public browser sessions were closed after use.
603
+
604
+ This verifies private fill and button interaction but does not establish an
605
+ end-to-end payment success. Use a functional Stripe test Checkout Session with
606
+ an actual confirmation result for that acceptance check. Public sample stores
607
+ may have other limits; the archived Stripe Payments Demo currently defaults to
608
+ EUR, while this consumer currently supports USD totals only.
609
+
610
+ ### Private fill without submission
611
+
612
+ Use `checkout.action = "fill_only"` with an existing saved card to rehearse
613
+ private filling. Omit `submit_selector` and `success_selector`; the backend
614
+ rejects them in this mode. The browser reference, exact page URL, field bindings,
615
+ displayed USD total and amount remain required. For example, take the checkout
616
+ plan above, add `"action": "fill_only"`, and remove both submission selectors.
617
+ Omitting `action`, or setting it to `submit`, retains the existing payment flow
618
+ and requires both submission selectors.
619
+
620
+ The normal preview/prepare/execute approval binds the action to the immutable
621
+ plan. Fill approval cannot be changed into submission approval. After filling,
622
+ the executor verifies the page and total, returns only safe diagnostics and
623
+ closes the session. Successful completion has final status `checkout_filled`,
624
+ `private_fill_completed=true`, `merchant_confirmation_observed=false`, and
625
+ `submit_attempted=false` / `submit_completed=false` in diagnostics. Validation
626
+ counts describe form validity separately; completion does not imply that the
627
+ merchant accepted the card. Repeating or continuing the operation returns its
628
+ saved final result and cannot refill or submit. A later payment needs a fresh
629
+ browser and a separate approved plan.
630
+
631
+ This mode issues no submit click or Enter key. It is **not** an offline test or
632
+ a guarantee of no merchant activity: Kernel and the page receive real card
633
+ values, and input handlers can tokenize or send data. Keep the existing
634
+ `outcome_unknown` treatment after partial fill or a lost executor response;
635
+ never automatically retry. Private browsers remain inaccessible to general
636
+ observe/inspect/click tools and are closed on success and failure.
637
+
638
+ The exact USD total may also be a button label such as `Donate $1` or
639
+ `Pay $19.99`. Only those fixed prefixes are accepted; the price must match
640
+ `amount_usd`, and the complete label is compared before and after filling.