@cmdoss/agent-pass-plugin 0.0.0-stage → 0.1.0

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 (68) hide show
  1. package/README.md +131 -2
  2. package/dist/agentpass.js +199 -0
  3. package/dist/cli.js +37 -0
  4. package/dist/domain.js +103 -0
  5. package/dist/engine.js +260 -0
  6. package/dist/http.js +170 -0
  7. package/dist/mcp.js +259 -0
  8. package/dist/onboarding.js +258 -0
  9. package/dist/public/catalog.js +35 -0
  10. package/dist/public/http.js +89 -0
  11. package/dist/public-server.js +11 -0
  12. package/dist/runtime/config.js +16 -0
  13. package/dist/runtime/installation.js +107 -0
  14. package/dist/runtime/lock.js +38 -0
  15. package/dist/runtime/paths.js +56 -0
  16. package/dist/runtime/setup.js +155 -0
  17. package/dist/sdk-ui.js +48 -0
  18. package/dist/server.js +107 -0
  19. package/dist/shared/constants.js +9 -0
  20. package/dist/store.js +84 -0
  21. package/dist/testnet/adapter.js +275 -0
  22. package/dist/testnet/authorization.js +620 -0
  23. package/dist/testnet/chain/codec.js +68 -0
  24. package/dist/testnet/chain/inspection.js +54 -0
  25. package/dist/testnet/chain/policy.js +78 -0
  26. package/dist/testnet/chain/prepared.js +150 -0
  27. package/dist/testnet/chain/receipt.js +49 -0
  28. package/dist/testnet/chain/sdk.js +34 -0
  29. package/dist/testnet/chain/types.js +1 -0
  30. package/dist/testnet/engine.js +395 -0
  31. package/dist/testnet/http.js +139 -0
  32. package/dist/testnet/model.js +49 -0
  33. package/dist/testnet/policy.js +44 -0
  34. package/dist/testnet/read-model.js +217 -0
  35. package/dist/testnet/repository.js +62 -0
  36. package/dist/testnet/runner.js +306 -0
  37. package/dist/testnet/types.js +1 -0
  38. package/dist/workflows.js +379 -0
  39. package/docs/agent-pass-integration.md +75 -0
  40. package/docs/architecture.md +93 -0
  41. package/docs/npm-release.md +83 -0
  42. package/npm-shrinkwrap.json +5376 -0
  43. package/package.json +72 -4
  44. package/public/assets/agent-pass-plugin-client.js +16 -0
  45. package/public/assets/agent-pass-plugin-sdk.js +1 -0
  46. package/public/assets/sui-payment-rails.avif +0 -0
  47. package/public/assets/sui-payments-hero.json +1 -0
  48. package/public/fonts/TWKEverett-Medium.woff2 +0 -0
  49. package/public/fonts/TWKEverett-Regular.woff2 +0 -0
  50. package/public/fonts/TWKEverettMono-Medium.woff2 +0 -0
  51. package/public/fonts/TWKEverettMono-Regular.woff2 +0 -0
  52. package/public/index.html +81 -0
  53. package/public/styles/base.css +117 -0
  54. package/public/styles/catalog.css +279 -0
  55. package/public/styles/controls.css +118 -0
  56. package/public/styles/dialog.css +257 -0
  57. package/public/styles/home.css +82 -0
  58. package/public/styles/layout.css +45 -0
  59. package/public/styles/plans.css +271 -0
  60. package/public/styles/responsive.css +643 -0
  61. package/public/styles/review.css +150 -0
  62. package/public/styles/sdk-wallet.css +125 -0
  63. package/public/styles/sdk.css +441 -0
  64. package/public/styles/shell.css +348 -0
  65. package/public/styles/tokens.css +75 -0
  66. package/public/styles.css +11 -0
  67. package/scripts/setup.mjs +10 -0
  68. package/skills/agent-pass-plugin-trading/SKILL.md +60 -0
@@ -0,0 +1,348 @@
1
+ .app-shell {
2
+ height: 100dvh;
3
+ min-width: 0;
4
+ display: grid;
5
+ grid-template-rows: var(--header-height) minmax(0, 1fr);
6
+ }
7
+ .app-header {
8
+ z-index: 5;
9
+ min-width: 0;
10
+ height: 72px;
11
+ margin: 8px 24px;
12
+ padding: 0 24px;
13
+ display: grid;
14
+ grid-template-columns: 1fr auto 1fr;
15
+ align-items: center;
16
+ gap: 32px;
17
+ background: var(--surface);
18
+ }
19
+ .wordmark {
20
+ justify-self: start;
21
+ color: white;
22
+ font-size: 28px;
23
+ line-height: 1;
24
+ letter-spacing: -1px;
25
+ }
26
+ .app-header nav {
27
+ display: flex;
28
+ align-items: center;
29
+ gap: 36px;
30
+ }
31
+ .app-header nav a {
32
+ display: flex;
33
+ align-items: center;
34
+ gap: 10px;
35
+ color: white;
36
+ font-size: 14px;
37
+ line-height: 1;
38
+ border: 0;
39
+ }
40
+ .app-header nav a:hover .nav-label,
41
+ .app-header nav a.active .nav-label {
42
+ color: var(--ink);
43
+ }
44
+ .nav-icon {
45
+ position: relative;
46
+ flex: 0 0 26px;
47
+ width: 26px;
48
+ height: 26px;
49
+ display: inline-block;
50
+ background: #343940;
51
+ color: white;
52
+ font-size: 0;
53
+ line-height: 0;
54
+ }
55
+ .nav-icon::before,
56
+ .nav-icon::after {
57
+ content: "";
58
+ position: absolute;
59
+ top: 50%;
60
+ left: 50%;
61
+ width: 10px;
62
+ height: 1px;
63
+ background: currentColor;
64
+ transform: translate(-50%, -50%);
65
+ }
66
+ .nav-icon::after {
67
+ transform: translate(-50%, -50%) rotate(90deg);
68
+ }
69
+ .app-header nav a.active .nav-icon {
70
+ background: var(--action);
71
+ }
72
+ .wallet-wrap {
73
+ position: relative;
74
+ justify-self: end;
75
+ display: flex;
76
+ align-items: center;
77
+ gap: 16px;
78
+ }
79
+ .button {
80
+ min-height: var(--control-height);
81
+ display: inline-flex;
82
+ align-items: center;
83
+ justify-content: space-between;
84
+ gap: 24px;
85
+ padding: 8px 12px 8px 16px;
86
+ border: 1px solid var(--line-soft);
87
+ border-radius: 0;
88
+ background: transparent;
89
+ color: white;
90
+ white-space: nowrap;
91
+ font-size: 14px;
92
+ line-height: 1.25;
93
+ }
94
+ .button:hover {
95
+ background: var(--raised);
96
+ border-color: var(--line);
97
+ }
98
+ .button:not(.wallet-button) > span[aria-hidden],
99
+ .button:not(.wallet-button) > span:last-child:not(:first-child) {
100
+ width: 24px;
101
+ height: 24px;
102
+ display: inline-flex;
103
+ align-items: center;
104
+ justify-content: center;
105
+ flex-shrink: 0;
106
+ font-size: 24px;
107
+ line-height: 1;
108
+ }
109
+ .button.primary {
110
+ min-width: 240px;
111
+ border-color: var(--action);
112
+ background: var(--action);
113
+ color: white;
114
+ }
115
+ .button.primary:hover {
116
+ background: var(--action-hover);
117
+ border-color: var(--action-hover);
118
+ }
119
+ .button.danger {
120
+ color: white;
121
+ }
122
+ .button.small {
123
+ min-height: 40px;
124
+ padding: 8px 12px 8px 16px;
125
+ font-size: var(--action-label);
126
+ }
127
+ .button.copy-primary,
128
+ .button.centered-action {
129
+ display: grid;
130
+ grid-template-columns: minmax(0, 1fr);
131
+ height: 48px;
132
+ min-height: 48px;
133
+ padding-right: 16px;
134
+ min-width: 0;
135
+ width: 320px;
136
+ max-width: 100%;
137
+ }
138
+ .button.copy-primary.is-copied,
139
+ .button.centered-action {
140
+ grid-template-columns: minmax(0, 1fr) 24px;
141
+ }
142
+ .button.copy-primary:not(.is-copied) > span[aria-hidden] {
143
+ display: none;
144
+ }
145
+ .copy-primary .hero-button-label,
146
+ .centered-action .hero-button-label {
147
+ min-width: 0;
148
+ white-space: normal;
149
+ overflow-wrap: anywhere;
150
+ padding: 0;
151
+ text-align: center;
152
+ }
153
+ .icon-button {
154
+ width: 40px;
155
+ height: 40px;
156
+ flex-shrink: 0;
157
+ display: inline-grid;
158
+ place-items: center;
159
+ padding: 0;
160
+ line-height: 1;
161
+ border: 0;
162
+ background: var(--raised);
163
+ color: white;
164
+ font-size: 26px;
165
+ }
166
+ .close-icon {
167
+ position: relative;
168
+ display: block;
169
+ width: 24px;
170
+ height: 24px;
171
+ }
172
+ .close-icon::before,
173
+ .close-icon::after {
174
+ content: "";
175
+ position: absolute;
176
+ top: 50%;
177
+ left: 50%;
178
+ width: 16px;
179
+ height: 2px;
180
+ background: currentColor;
181
+ transform: translate(-50%, -50%) rotate(45deg);
182
+ }
183
+ .close-icon::after {
184
+ transform: translate(-50%, -50%) rotate(-45deg);
185
+ }
186
+ .icon-button:hover {
187
+ background: #343940;
188
+ }
189
+ .text-button {
190
+ padding: 4px 0;
191
+ border: 0;
192
+ background: transparent;
193
+ color: white;
194
+ font-size: 14px;
195
+ line-height: 1.3;
196
+ text-align: left;
197
+ }
198
+ .text-button:hover {
199
+ color: var(--blue-ink);
200
+ }
201
+ .wallet-button {
202
+ position: relative;
203
+ min-width: 172px;
204
+ display: inline-flex;
205
+ align-items: center;
206
+ justify-content: center;
207
+ gap: 0;
208
+ padding: 8px 16px;
209
+ text-align: center;
210
+ line-height: 1;
211
+ background: var(--action);
212
+ border-color: var(--action);
213
+ color: white;
214
+ }
215
+ .wallet-button.is-connected {
216
+ display: grid;
217
+ grid-template-columns: minmax(0, 1fr) 24px;
218
+ gap: 12px;
219
+ padding: 8px 16px;
220
+ line-height: 1.25;
221
+ }
222
+ .wallet-button > .wallet-address {
223
+ display: block;
224
+ width: auto;
225
+ height: auto;
226
+ font-size: inherit;
227
+ line-height: inherit;
228
+ }
229
+ .wallet-button > .wallet-chevron {
230
+ position: relative;
231
+ justify-self: center;
232
+ align-self: center;
233
+ display: block;
234
+ width: 12px;
235
+ height: 8px;
236
+ transform: none;
237
+ pointer-events: none;
238
+ }
239
+ .wallet-chevron::before,
240
+ .wallet-chevron::after {
241
+ content: "";
242
+ position: absolute;
243
+ top: 1px;
244
+ width: 8.5px;
245
+ height: 1px;
246
+ background: currentColor;
247
+ }
248
+ .wallet-chevron::before {
249
+ left: 0;
250
+ transform: rotate(45deg);
251
+ transform-origin: left center;
252
+ }
253
+ .wallet-chevron::after {
254
+ right: 0;
255
+ transform: rotate(-45deg);
256
+ transform-origin: right center;
257
+ }
258
+ .wallet-button:hover {
259
+ background: var(--action-hover);
260
+ border-color: var(--action-hover);
261
+ }
262
+ .wallet-menu {
263
+ position: absolute;
264
+ right: 0;
265
+ top: calc(100% + 12px);
266
+ width: 280px;
267
+ padding: 12px;
268
+ border: 2px solid var(--raised);
269
+ background: var(--surface);
270
+ }
271
+ .menu-label {
272
+ text-align: center;
273
+ padding: 12px 12px 20px;
274
+ margin-bottom: 4px;
275
+ color: var(--quiet);
276
+ font-size: 13px;
277
+ line-height: 1.5;
278
+ overflow-wrap: anywhere;
279
+ border-bottom: 1px solid var(--line-soft);
280
+ }
281
+ .wallet-menu > button {
282
+ width: 100%;
283
+ min-height: 48px;
284
+ padding: 12px;
285
+ display: flex;
286
+ align-items: center;
287
+ justify-content: space-between;
288
+ border: 0;
289
+ background: transparent;
290
+ color: white;
291
+ font-size: 16px;
292
+ text-align: left;
293
+ }
294
+ .wallet-menu > button:hover {
295
+ background: var(--raised);
296
+ }
297
+ .wallet-menu > .menu-logout {
298
+ background: #c62828;
299
+ color: #ffffff;
300
+ }
301
+ .wallet-menu > .menu-logout:hover {
302
+ background: #de3434;
303
+ }
304
+ .wallet-menu > button span {
305
+ font-size: var(--action-icon);
306
+ }
307
+ .button.logout-confirm {
308
+ min-width: 100px;
309
+ width: auto;
310
+ flex: 0 0 auto;
311
+ justify-content: center;
312
+ text-align: center;
313
+ padding-right: 20px;
314
+ padding-left: 20px;
315
+ background: #c62828;
316
+ border-color: #c62828;
317
+ }
318
+ .button.logout-confirm:hover {
319
+ background: #de3434;
320
+ border-color: #de3434;
321
+ }
322
+ .metric .label.metric-heading {
323
+ display: flex;
324
+ align-items: center;
325
+ justify-content: space-between;
326
+ gap: 16px;
327
+ }
328
+ .metric-funding {
329
+ padding: 0;
330
+ font-size: 14px;
331
+ color: var(--blue-ink);
332
+ }
333
+ main {
334
+ min-width: 0;
335
+ min-height: 0;
336
+ display: flex;
337
+ flex-direction: column;
338
+ overflow: hidden;
339
+ padding: 40px var(--shell-padding) 32px;
340
+ }
341
+ main:has(.home-view) {
342
+ padding: 8px 24px 0;
343
+ }
344
+ .screen-loading {
345
+ margin: auto;
346
+ color: var(--quiet);
347
+ font-size: 16px;
348
+ }
@@ -0,0 +1,75 @@
1
+ @font-face {
2
+ font-family: Everett;
3
+ src: url("/fonts/TWKEverett-Regular.woff2") format("woff2");
4
+ font-weight: 400;
5
+ font-style: normal;
6
+ font-display: swap;
7
+ }
8
+ @font-face {
9
+ font-family: "Everett Mono";
10
+ src: url("/fonts/TWKEverettMono-Regular.woff2") format("woff2");
11
+ font-weight: 400;
12
+ font-style: normal;
13
+ font-display: swap;
14
+ }
15
+ :root {
16
+ color-scheme: dark;
17
+ --canvas: #000000;
18
+ --surface: #131518;
19
+ --raised: #222529;
20
+ --line: #6c7584;
21
+ --line-soft: #343940;
22
+ --ink: #ffffff;
23
+ --secondary: #e0e2e6;
24
+ --quiet: #c2c6cd;
25
+ --action: #298dff;
26
+ --action-hover: #4b9fff;
27
+ --blue-ink: #8fcbff;
28
+ --negative: var(--secondary);
29
+ --warning: var(--secondary);
30
+ --font:
31
+ Everett, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
32
+ --mono: "Everett Mono", ui-monospace, SFMono-Regular, monospace;
33
+ --space-1: 4px;
34
+ --space-2: 8px;
35
+ --space-3: 12px;
36
+ --space-4: 16px;
37
+ --space-6: 24px;
38
+ --space-8: 32px;
39
+ --space-12: 48px;
40
+ --control-height: 40px;
41
+ --header-height: 88px;
42
+ --display: 80px;
43
+ --display-leading: 1.1;
44
+ --heading: 52px;
45
+ --heading-leading: 1.1;
46
+ --card-heading: 32px;
47
+ --body: 16px;
48
+ --label: 14px;
49
+ --action-label: 16px;
50
+ --action-icon: 24px;
51
+ --meta: 13px;
52
+ --shell-padding: 56px;
53
+ }
54
+ @media (max-width: 1100px) {
55
+ :root {
56
+ --shell-padding: 32px;
57
+ --heading: 48px;
58
+ }
59
+ }
60
+ @media (max-width: 760px) {
61
+ :root {
62
+ --shell-padding: 24px;
63
+ --display: 64px;
64
+ --heading: 40px;
65
+ }
66
+ }
67
+ @media (max-width: 520px) {
68
+ :root {
69
+ --shell-padding: 16px;
70
+ --header-height: 118px;
71
+ --display: 48px;
72
+ --heading: 36px;
73
+ --control-height: 44px;
74
+ }
75
+ }
@@ -0,0 +1,11 @@
1
+ /* Ordered layers preserve the verified Sui-style cascade. */
2
+ @import url("./styles/base.css");
3
+ @import url("./styles/shell.css");
4
+ @import url("./styles/layout.css");
5
+ @import url("./styles/home.css");
6
+ @import url("./styles/catalog.css");
7
+ @import url("./styles/plans.css");
8
+ @import url("./styles/review.css");
9
+ @import url("./styles/dialog.css");
10
+ @import url("./styles/responsive.css");
11
+ @import url("./styles/controls.css");
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ // Compatibility entry for source checkouts. Published users run the compiled CLI.
3
+ import { existsSync } from "node:fs";
4
+ const entry = new URL("../dist/cli.js", import.meta.url);
5
+ if (!existsSync(entry))
6
+ throw new Error(
7
+ "Build the checkout first with npm run build, then retry setup.",
8
+ );
9
+ process.argv.splice(2, 0, "setup");
10
+ await import(entry.href);
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: agent-pass-plugin-trading
3
+ description: Set up Agent Pass Plugin locally, inspect Testnet strategies, request official owner authorization and operate a durable local trading loop through MCP; use Paper only when explicitly selected.
4
+ ---
5
+
6
+ # Agent Pass Plugin local trading
7
+
8
+ Agent Pass Plugin defaults to **Sui Testnet**, using test SUI and the installed deployment's demo USDC. It is not mainnet or a real-dollar investment product. The delegated key stays in the official SDK's local session/signer on the user's computer. Never request an owner seed/private key, copy an agent key, export signer tokens or move custody to a remote server.
9
+
10
+ **Report only observed evidence.** Automated tests, a readable pool, a quote, a pending review or a mock receipt do not establish a completed onchain authorization, trade or revocation. The normal live flow recorded in `docs/testnet-acceptance-2026-11-10.md` is complete and its final plan is revoked; inspect current state rather than assuming another plan is authorized. Report exact evidence and remaining testing limits.
11
+
12
+ ## Installation and mode
13
+
14
+ 1. Read the package/project README. Use Node 22.13+. A published npm package is precompiled: never run `npm ci` or a build inside its install/cache directory. In a source checkout only, use `npm ci` when locked dependencies are missing and `npm run build` before setup.
15
+ 2. For the selected client only, run `agent-pass-plugin setup --client codex --register --start` or `agent-pass-plugin setup --client claude --register --start` after npm installation. A source checkout may use `node scripts/setup.mjs` with the same flags after building. The default is Testnet. Use the project path from `/api/setup` outside the checkout. Preserve unrelated MCP entries. Open a new client session if tools are not visible; resume from public `setup.json` rather than repeating setup blindly.
16
+ 3. Read `marketplace_status` and inspect **mode**. In Testnet call `onboard` immediately: it must automatically open Agent Pass Plugin's wallet connection screen if no fresh browser connection exists. Do not merely give the user a URL or ask permission to open this already-requested onboarding page. Poll `onboarding_status` after the user connects their wallet, and report onboarding complete **only** when `onboardingComplete` is true. Then read `account_status` and `agent_pass_readiness`. The wallet connection is observational, not trading authorization; SDK readiness/doctor is read-only.
17
+ 4. Keep the local runtime running independently of this conversation. A startup, client registration or wallet connection is never a trade approval or Start instruction. Mainnet is unavailable; never work around that boundary by selecting another deployment.
18
+
19
+ Public setup metadata lives under `AGENT_PASS_PLUGIN_DATA_DIR` (default `.data` in a source checkout; `~/.agent-pass-plugin/data` for npm installs). The durable executable and assets live separately under `~/.agent-pass-plugin/runtimes`, overridable with `AGENT_PASS_PLUGIN_INSTALL_DIR`; do not move signer data into the npm/npx cache. Testnet and Paper use separate `testnet.sqlite` and `paper.sqlite` files. The SDK manages private local session/signing files under `agent-pass` within that directory. Do not place those files in a public document, browser payload or Git commit.
20
+
21
+ ## Testnet: MCP → official owner review → MCP
22
+
23
+ 1. Read `testnet_capabilities` for the actual coin types/decimals, supported pools/venues and gas defaults. Do not hardcode a remembered deployment, substitute mainnet, or treat an SDK quote as permission.
24
+ 2. Use `onboard` to automatically open the local connection screen and existing wallet chooser when needed. The user selects/connects their intended wallet; never auto-select, sign or grant permissions. Repeated calls reuse the same request and do not open extra tabs; `retryBrowser:true` explicitly retries a failed/dismissed launch. If the OS cannot open the browser, report `browser_open_failed` and the returned manual URL; never report success. Keep waiting for `onboarding_status.onboardingComplete:true`; rejection, dismissal, stale persisted hints, page launch, disconnect or expiry are not completion. Read the explicit owner address from the fresh connection and confirm the intended strategy/direction. If the connected address and plan owner differ, stop approval-changing work and resolve the mismatch; never silently reassign the plan.
25
+ 3. Use `list_strategies` / `get_strategy`. Explain the version, deterministic rules and cadence. Thirty-day PnL stays unavailable without adequate verified history; do not invent rankings.
26
+ 4. Collect the exact parameters for `create_testnet_plan`: `expectedOwner`, `botId`, `direction`, decimal-string `amountIn`, `budgetIn`, `dailyLimitIn`, owner-chosen `limitPrice`, `intervalSeconds`, whole `durationDays` (1–7), `slippageBps`, `venue`, decimal-string `gasSui`, `gasCapSui`, `gasDailySui`.
27
+ - Direction is `sui_to_usdc` or `usdc_to_sui`. Amounts/budgets use the **input asset**, with its supported decimals; preserve strings rather than rounding through floating-point display values.
28
+ - `limitPrice` is **demo USDC per one SUI**: most paid when buying SUI, least accepted when selling SUI. It is mandatory and chosen by the owner. Never invent a permissive price to make a plan start.
29
+ - `gasSui` is the initial agent stipend. `gasCapSui` / `gasDailySui` are lifetime/day gas refill allowance caps, separate from that stipend; they are not total execution-cost ceilings. Agent Pass Plugin does not automatically refill gas.
30
+ - Per-order amount, daily cap, lifetime cap, current funds and agent gas are different quantities. A spending cap is not a portfolio-loss limit.
31
+ 5. Create the draft and read it with `review_plan`. Inspect `list_plans` after an uncertain creation response before retrying: plan creation is not idempotent.
32
+ 6. Call `request_plan_authorization({planId,requestId:newUUID})`. Show the exact official `rules`, `warnings` and `reviewUrl`. Only the user opens the owner review, checks Testnet/owner/funding/gas/policy and signs personally. Never confirm through HTTP, browser automation, another MCP or a signing tool on their behalf.
33
+ 7. Poll `get_review_request({reviewId: returned.id})`; use the returned review ID, not the client retry UUID. The runtime checks actual owner, network/chain, pass/session, deployment, immutable policy and gas/allowance binding. A closed review tab, wallet connection, submitted signature or unverified RPC result is not confirmation. Mismatch/expiry/unknown state blocks progress.
34
+ 8. Only after a matching verified authorization **and the user's separate explicit instruction to run**, call `start_plan({planId})`. Authorizing the pass does not start the loop. The independent local service checks conditions, balances, gas, fresh quote/slippage and permissions on repeated cycles without new model prompts.
35
+
36
+ Retain the same `requestId` and exact original payload for retries of a single authorization request. Use a new UUID only for a new action. An uncertain SDK proposal/session must be reconciled rather than creating another delegated key blindly. Do not bypass a policy mismatch by broadening rules automatically.
37
+
38
+ ## Funding, receipts and controls
39
+
40
+ Testnet uses actual test/demo balances. There is no virtual-credit or Paper-account shortcut. Direct the owner to the official review for required input balance/allowance and gas. Do not claim a funding action completed from a button click; inspect updated chain/account state. Do not move assets or request a wallet signature for the user.
41
+
42
+ Use `list_plans` and `list_transactions({planId?})`. Report actual digests and confirmed chain-derived input/output/gas. Submitted/uncertain transactions remain unresolved until looked up by their persisted digest; never resubmit a fresh economic transaction blindly. After restart, inspect pending work and ask for explicit resume; missed intervals are not replayed.
43
+
44
+ `pause_plan` prevents new local execution; `resume_plan` requires explicit user intent and rechecks the same bound plan. `stop_plan` ends local scheduling. These operations do not liquidate holdings or revoke an onchain pass.
45
+
46
+ `revoke_plan` first blocks new local submissions and returns the official owner review URL. The owner must sign revocation. While status is `revoking`, do not claim it is revoked or offer Start/resume. Report confirmed onchain revocation only after fresh verified state. Transactions submitted before pause/stop/revocation still need reconciliation.
47
+
48
+ The computer/runtime must remain online. Browser/chat closure and Logout do not stop jobs or revoke a pass. If the user's intent is to stop trading, perform the appropriate local control within their authorization and explain the remaining owner-signature step for onchain revoke.
49
+
50
+ PnL is denominated in **demo USDC**, with the valuation source/time disclosed and gas separately recorded in SUI. Unknown/stale valuation or missing cost basis stays unavailable. Selling SUI without acquisition basis is proceeds, not proven profit. Do not combine Testnet records with Paper fills or count funding as trading profit.
51
+
52
+ ## Explicit Paper branch
53
+
54
+ Use Paper only when `AGENT_PASS_PLUGIN_MODE=paper` is deliberately selected. A separate example is `AGENT_PASS_PLUGIN_MODE=paper AGENT_PASS_PLUGIN_DATA_DIR=.data/paper-demo PORT=4318 npm run dev`; pass matching variables when registering that service through setup. Do not silently switch an existing runtime or reuse its live session as a simulated account.
55
+
56
+ In Paper mode, use `create_account` → direct browser confirmation → `get_review_request`; `request_funding` optionally adds virtual USDC through the same explicit review. Use `create_plan`, request its paper authorization, wait for confirmation, then Start only on explicit user instruction. Reuse retry keys only for identical requests. Local confirmation is simulated, not an Agent Pass signature.
57
+
58
+ Paper begins with 1,000 virtual USDC; all prices/fills/fees/gas are simulated. `paper:` IDs are not blockchain digests. Paper revoke removes only local simulated approval. Neither mode exposes an owner confirmation/approval tool.
59
+
60
+ See `docs/agent-pass-integration.md` for implementation boundaries and the owner acceptance runbook.