zk-agent-cli 0.1.0-rc.8 → 0.1.0-rc.9
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/README.md +72 -26
- package/dist/index.js +690 -166
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,8 @@ zkSync Era and zkSync Sepolia.
|
|
|
5
5
|
|
|
6
6
|
This is the packaged CLI manual for the public product shell:
|
|
7
7
|
`start -> next -> wallet create/reapprove -> next -> pay -> suite`,
|
|
8
|
-
with `submit` and `
|
|
8
|
+
with `submit`, `workspace`, `handoff`, and `feed` as the current Agent Pay
|
|
9
|
+
shortcuts.
|
|
9
10
|
|
|
10
11
|
## Why This CLI Exists
|
|
11
12
|
|
|
@@ -22,6 +23,20 @@ with `submit` and `workspace` as the current Agent Pay shortcuts.
|
|
|
22
23
|
- one Agent Pay layer that stays attached to the same wallet runtime instead
|
|
23
24
|
of splitting into a separate product
|
|
24
25
|
|
|
26
|
+
## Best Fit
|
|
27
|
+
|
|
28
|
+
- local-first wallet and session control on zkSync is the real need
|
|
29
|
+
- the first proof should be one zkSync-native pay path, not broad multichain
|
|
30
|
+
exploration
|
|
31
|
+
- Agent Pay should stay attached to the same wallet runtime instead of
|
|
32
|
+
becoming a separate operator tool
|
|
33
|
+
|
|
34
|
+
## Current Boundary
|
|
35
|
+
|
|
36
|
+
- hosted relay is still the fallback path, not the default onboarding story
|
|
37
|
+
- Agent Pay is a local-first workbench today, not yet a hosted multi-tenant
|
|
38
|
+
control plane
|
|
39
|
+
|
|
25
40
|
Use:
|
|
26
41
|
|
|
27
42
|
- [`skills/QUICKSTART.md`](../../skills/QUICKSTART.md) for the shortest
|
|
@@ -31,11 +46,14 @@ Use:
|
|
|
31
46
|
|
|
32
47
|
## Start Here
|
|
33
48
|
|
|
49
|
+
- clean machine bootstrap: `zk-agent setup` once
|
|
34
50
|
- first touch: `zk-agent start`
|
|
35
51
|
- first successful proof: follow the one-minute path and stop at the first
|
|
36
52
|
`zk-agent pay`
|
|
37
53
|
- compact Agent Pay ingress: `zk-agent submit`
|
|
38
54
|
- cross-request Agent Pay workbench: `zk-agent workspace`
|
|
55
|
+
- single-request Agent Pay export: `zk-agent handoff --request-id <id>`
|
|
56
|
+
- cross-request Agent Pay export: `zk-agent feed`
|
|
39
57
|
- broader post-flagship packaged surface: `zk-agent suite`
|
|
40
58
|
- remote-browser fallback: `zk-agent relay baseline --relay-url <relay-url>`
|
|
41
59
|
|
|
@@ -44,12 +62,13 @@ Rule of thumb:
|
|
|
44
62
|
- start with `start`
|
|
45
63
|
- prove the product once with `pay`
|
|
46
64
|
- stay on `suite` when the question is broader than one send
|
|
47
|
-
- stay on `submit` / `workspace` when the question is specifically Agent Pay
|
|
65
|
+
- stay on `submit` / `workspace` / `handoff` / `feed` when the question is specifically Agent Pay
|
|
48
66
|
- switch to relay only when the browser is remote
|
|
49
67
|
|
|
50
68
|
## One-minute path
|
|
51
69
|
|
|
52
|
-
Use this path unless the task explicitly needs a lower-level command
|
|
70
|
+
Use this path unless the task explicitly needs a lower-level command. This is
|
|
71
|
+
the first proof from a clean machine:
|
|
53
72
|
|
|
54
73
|
```bash
|
|
55
74
|
zk-agent setup
|
|
@@ -59,6 +78,10 @@ zk-agent next
|
|
|
59
78
|
zk-agent pay --wallet main --to <address> --amount <amount>
|
|
60
79
|
```
|
|
61
80
|
|
|
81
|
+
On the default local-first path, the approved wallet now auto-syncs its local
|
|
82
|
+
smart-account metadata when chain reads are available, so the happy path does
|
|
83
|
+
not depend on a separate manual `zk-agent wallet sync`.
|
|
84
|
+
|
|
62
85
|
If you are not sure whether the question is onboarding, recovery, direct send,
|
|
63
86
|
or Agent Pay follow-up, jump to `Start here by question` below and take the
|
|
64
87
|
smallest matching entrypoint.
|
|
@@ -66,12 +89,18 @@ smallest matching entrypoint.
|
|
|
66
89
|
`zk-agent start` is the public onboarding command that keeps the same output
|
|
67
90
|
contract as `zk-agent next`. Use `start` when you want the shortest obvious
|
|
68
91
|
first-touch command. Keep `next` as the canonical operator/runtime contract in
|
|
69
|
-
scripts and JSON examples.
|
|
92
|
+
scripts and JSON examples. If local defaults do not exist yet, both `start`
|
|
93
|
+
and `next` still send you through `zk-agent setup` first.
|
|
70
94
|
|
|
71
95
|
`zk-agent pay` is the public shortcut for the flagship send path. The scoped
|
|
72
96
|
form remains `zk-agent workflow pay`.
|
|
73
97
|
`zk-agent submit` is the public shortcut for the compact Agent Pay ingress
|
|
74
98
|
path. The scoped form remains `zk-agent payment submit`.
|
|
99
|
+
`zk-agent handoff --request-id <id>` is the public shortcut for the
|
|
100
|
+
single-request integration-ready Agent Pay export. The scoped form remains
|
|
101
|
+
`zk-agent payment handoff`.
|
|
102
|
+
`zk-agent feed` is the public shortcut for the integration-ready Agent Pay
|
|
103
|
+
cross-request export. The scoped form remains `zk-agent payment feed`.
|
|
75
104
|
|
|
76
105
|
If you are new, stop at the first successful `zk-agent pay`. Ignore
|
|
77
106
|
`suite`, `payment`, and `relay` until that baseline path works once, unless
|
|
@@ -159,30 +188,34 @@ The current local-first Agent Pay entry surface is:
|
|
|
159
188
|
zk-agent submit --wallet main --to <address> --amount <amount>
|
|
160
189
|
zk-agent workspace
|
|
161
190
|
zk-agent payment dashboard
|
|
162
|
-
zk-agent
|
|
191
|
+
zk-agent feed
|
|
163
192
|
zk-agent payment queue
|
|
164
193
|
zk-agent payment report
|
|
165
|
-
zk-agent
|
|
194
|
+
zk-agent approval --request-id <id>
|
|
166
195
|
```
|
|
167
196
|
|
|
168
|
-
The scoped equivalents remain `zk-agent payment submit
|
|
169
|
-
`zk-agent payment workspace
|
|
197
|
+
The scoped equivalents remain `zk-agent payment submit`,
|
|
198
|
+
`zk-agent payment workspace`, `zk-agent payment handoff`,
|
|
199
|
+
`zk-agent payment feed`, and `zk-agent payment approval`.
|
|
170
200
|
|
|
171
201
|
The fastest Agent Pay proof path is:
|
|
172
202
|
|
|
173
203
|
```bash
|
|
174
204
|
zk-agent submit --wallet main --to <address> --amount <amount>
|
|
175
205
|
zk-agent payment next --request-id <id>
|
|
176
|
-
zk-agent
|
|
206
|
+
zk-agent approval --request-id <id>
|
|
177
207
|
zk-agent workspace
|
|
178
|
-
zk-agent
|
|
179
|
-
zk-agent
|
|
208
|
+
zk-agent handoff --request-id <id>
|
|
209
|
+
zk-agent feed
|
|
180
210
|
```
|
|
181
211
|
|
|
182
212
|
That path shows compact ingress, wallet-aware follow-up, approval readiness,
|
|
183
213
|
workspace summary, single-request handoff bundling, and cross-request feed
|
|
184
214
|
export without leaving the local-first surface.
|
|
185
215
|
|
|
216
|
+
For the shortest product demo narrative behind that path, use
|
|
217
|
+
[`docs/20-agent-pay-demo-narrative.md`](../../docs/20-agent-pay-demo-narrative.md).
|
|
218
|
+
|
|
186
219
|
If request capture is no longer enough and you need one current cross-request
|
|
187
220
|
operator view, open the workbench directly:
|
|
188
221
|
|
|
@@ -218,6 +251,8 @@ Current compact Agent Pay command layer:
|
|
|
218
251
|
- `submit`: capture one payment request through the compact ingress surface
|
|
219
252
|
- `dashboard`: review one cross-request dashboard summary above wallet groups,
|
|
220
253
|
actionable queue items, and recent payment activity
|
|
254
|
+
- `handoff`: expose one stable single-request export bundle for external
|
|
255
|
+
dashboards, agents, or backend ingestion
|
|
221
256
|
- `feed`: expose an integration-ready cross-request batch feed for external
|
|
222
257
|
dashboards, agents, or backend ingestion
|
|
223
258
|
- `queue`: review the current actionable request queue
|
|
@@ -240,11 +275,11 @@ Use `zk-agent payment parties --request-id <id>` when an external agent or
|
|
|
240
275
|
backend needs the stable request parties model with separate local and
|
|
241
276
|
share-safe payer projections.
|
|
242
277
|
|
|
243
|
-
Use `zk-agent
|
|
278
|
+
Use `zk-agent handoff --request-id <id>` when an external dashboard,
|
|
244
279
|
agent, or backend needs one stable integration bundle instead of
|
|
245
280
|
reassembling local reads.
|
|
246
281
|
|
|
247
|
-
Use `zk-agent
|
|
282
|
+
Use `zk-agent feed` when that same external surface needs the stable
|
|
248
283
|
cross-request batch feed instead of one request at a time.
|
|
249
284
|
|
|
250
285
|
If readiness is unclear before you choose a fix, use:
|
|
@@ -340,6 +375,10 @@ ZK_AGENT_STORAGE_DIR=
|
|
|
340
375
|
the Agent Pay request layer around the write path
|
|
341
376
|
- `zk-agent workspace`: you already know you need the current cross-request
|
|
342
377
|
Agent Pay workbench anchor
|
|
378
|
+
- `zk-agent handoff --request-id <id>`: you already need one stable
|
|
379
|
+
single-request Agent Pay export bundle
|
|
380
|
+
- `zk-agent feed`: you already need the integration-ready cross-request Agent
|
|
381
|
+
Pay export
|
|
343
382
|
- `zk-agent suite`: wallet readiness is clear and the question is broader than
|
|
344
383
|
one immediate send
|
|
345
384
|
- `zk-agent relay baseline --relay-url <relay-url>`: the browser is remote and
|
|
@@ -381,20 +420,27 @@ zk-agent wallet next --name main
|
|
|
381
420
|
|
|
382
421
|
## Switch to remote approval only when needed
|
|
383
422
|
|
|
384
|
-
Use the relay-backed path only when the browser is
|
|
385
|
-
terminal
|
|
423
|
+
Use the relay-backed path only when the browser is remote and cannot return to
|
|
424
|
+
the waiting terminal.
|
|
425
|
+
|
|
426
|
+
Start with `relay baseline`. It is the packaged hosted-approval entrypoint and
|
|
427
|
+
tells you whether the relay matches the current supported fallback contract.
|
|
428
|
+
Open `relay inspect` only when you need the raw hosted-readiness, URL-shape,
|
|
429
|
+
and persistence fields directly.
|
|
430
|
+
|
|
431
|
+
Existing wallet:
|
|
386
432
|
|
|
387
433
|
```bash
|
|
388
434
|
zk-agent relay baseline --relay-url <relay-url>
|
|
389
|
-
zk-agent wallet
|
|
390
|
-
zk-agent
|
|
435
|
+
zk-agent wallet reapprove --name main --relay-url <relay-url> --wait-relay --prompt-code
|
|
436
|
+
zk-agent wallet status --name main
|
|
391
437
|
```
|
|
392
438
|
|
|
393
|
-
|
|
439
|
+
No saved wallet yet:
|
|
394
440
|
|
|
395
441
|
```bash
|
|
396
442
|
zk-agent relay baseline --relay-url <relay-url>
|
|
397
|
-
zk-agent wallet
|
|
443
|
+
zk-agent wallet create --relay-url <relay-url> --wait-relay --prompt-code
|
|
398
444
|
zk-agent next
|
|
399
445
|
```
|
|
400
446
|
|
|
@@ -413,10 +459,6 @@ If the relay is self-hosted through the built-in server:
|
|
|
413
459
|
zk-agent relay serve --public-origin https://relay.example.com
|
|
414
460
|
```
|
|
415
461
|
|
|
416
|
-
Use `relay baseline` before sending users to a share link when you want the
|
|
417
|
-
packaged public summary and proof paths first. Use `relay inspect` when you
|
|
418
|
-
need the lower-level hosted-readiness, URL shape, and persistence contract.
|
|
419
|
-
|
|
420
462
|
For the supported hosted operating contract, use
|
|
421
463
|
[`docs/16-hosted-approval-operated-baseline.md`](../../docs/16-hosted-approval-operated-baseline.md).
|
|
422
464
|
|
|
@@ -466,6 +508,10 @@ Current `suite` product journeys:
|
|
|
466
508
|
- `unstick a write`
|
|
467
509
|
- `recover remote approval`
|
|
468
510
|
|
|
511
|
+
In JSON mode, `suite` now also returns a top-level `platformLayer` summary so
|
|
512
|
+
wrappers, docs, and demos can read the current product shell directly without
|
|
513
|
+
reconstructing it from `proofPaths[]` and `journeys[]`.
|
|
514
|
+
|
|
469
515
|
If you only need one default starting point inside `suite`, start with
|
|
470
516
|
`send value now`.
|
|
471
517
|
|
|
@@ -484,10 +530,10 @@ For the clearest Agent Pay proof path inside `suite`, follow:
|
|
|
484
530
|
```bash
|
|
485
531
|
zk-agent submit --wallet main --to <address> --amount <amount>
|
|
486
532
|
zk-agent payment next --request-id <id>
|
|
487
|
-
zk-agent
|
|
533
|
+
zk-agent approval --request-id <id>
|
|
488
534
|
zk-agent workspace
|
|
489
|
-
zk-agent
|
|
490
|
-
zk-agent
|
|
535
|
+
zk-agent handoff --request-id <id>
|
|
536
|
+
zk-agent feed
|
|
491
537
|
```
|
|
492
538
|
|
|
493
539
|
That is the shortest packaged route from one local request write into
|