zk-agent-cli 0.1.0-rc.7 → 0.1.0-rc.8
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 +158 -53
- package/dist/index.js +1122 -284
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
`zk-agent-cli` is the packaged terminal CLI for the default zk-agent product path on
|
|
4
4
|
zkSync Era and zkSync Sepolia.
|
|
5
5
|
|
|
6
|
-
This is the
|
|
6
|
+
This is the packaged CLI manual for the public product shell:
|
|
7
|
+
`start -> next -> wallet create/reapprove -> next -> pay -> suite`,
|
|
8
|
+
with `submit` and `workspace` as the current Agent Pay shortcuts.
|
|
7
9
|
|
|
8
10
|
## Why This CLI Exists
|
|
9
11
|
|
|
@@ -11,6 +13,15 @@ This is the canonical CLI manual.
|
|
|
11
13
|
- keep the default execution story zkSync-native and `sed-lite`-first
|
|
12
14
|
- add an Agent Pay request layer above direct workflow execution
|
|
13
15
|
|
|
16
|
+
## What Makes It Different
|
|
17
|
+
|
|
18
|
+
- local-first by default, with hosted approval only as a fallback path when
|
|
19
|
+
the browser is remote
|
|
20
|
+
- one zkSync-native operator path from wallet readiness to paymaster-aware
|
|
21
|
+
execution
|
|
22
|
+
- one Agent Pay layer that stays attached to the same wallet runtime instead
|
|
23
|
+
of splitting into a separate product
|
|
24
|
+
|
|
14
25
|
Use:
|
|
15
26
|
|
|
16
27
|
- [`skills/QUICKSTART.md`](../../skills/QUICKSTART.md) for the shortest
|
|
@@ -18,6 +29,24 @@ Use:
|
|
|
18
29
|
- [`docs/15-codex-plugin-onboarding.md`](../../docs/15-codex-plugin-onboarding.md)
|
|
19
30
|
for the native Codex plugin install path
|
|
20
31
|
|
|
32
|
+
## Start Here
|
|
33
|
+
|
|
34
|
+
- first touch: `zk-agent start`
|
|
35
|
+
- first successful proof: follow the one-minute path and stop at the first
|
|
36
|
+
`zk-agent pay`
|
|
37
|
+
- compact Agent Pay ingress: `zk-agent submit`
|
|
38
|
+
- cross-request Agent Pay workbench: `zk-agent workspace`
|
|
39
|
+
- broader post-flagship packaged surface: `zk-agent suite`
|
|
40
|
+
- remote-browser fallback: `zk-agent relay baseline --relay-url <relay-url>`
|
|
41
|
+
|
|
42
|
+
Rule of thumb:
|
|
43
|
+
|
|
44
|
+
- start with `start`
|
|
45
|
+
- prove the product once with `pay`
|
|
46
|
+
- stay on `suite` when the question is broader than one send
|
|
47
|
+
- stay on `submit` / `workspace` when the question is specifically Agent Pay
|
|
48
|
+
- switch to relay only when the browser is remote
|
|
49
|
+
|
|
21
50
|
## One-minute path
|
|
22
51
|
|
|
23
52
|
Use this path unless the task explicitly needs a lower-level command:
|
|
@@ -27,19 +56,33 @@ zk-agent setup
|
|
|
27
56
|
zk-agent next
|
|
28
57
|
zk-agent wallet create --await-local
|
|
29
58
|
zk-agent next
|
|
30
|
-
zk-agent
|
|
31
|
-
zk-agent suite
|
|
59
|
+
zk-agent pay --wallet main --to <address> --amount <amount>
|
|
32
60
|
```
|
|
33
61
|
|
|
62
|
+
If you are not sure whether the question is onboarding, recovery, direct send,
|
|
63
|
+
or Agent Pay follow-up, jump to `Start here by question` below and take the
|
|
64
|
+
smallest matching entrypoint.
|
|
65
|
+
|
|
34
66
|
`zk-agent start` is the public onboarding command that keeps the same output
|
|
35
67
|
contract as `zk-agent next`. Use `start` when you want the shortest obvious
|
|
36
68
|
first-touch command. Keep `next` as the canonical operator/runtime contract in
|
|
37
69
|
scripts and JSON examples.
|
|
38
70
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
`zk-agent
|
|
42
|
-
|
|
71
|
+
`zk-agent pay` is the public shortcut for the flagship send path. The scoped
|
|
72
|
+
form remains `zk-agent workflow pay`.
|
|
73
|
+
`zk-agent submit` is the public shortcut for the compact Agent Pay ingress
|
|
74
|
+
path. The scoped form remains `zk-agent payment submit`.
|
|
75
|
+
|
|
76
|
+
If you are new, stop at the first successful `zk-agent pay`. Ignore
|
|
77
|
+
`suite`, `payment`, and `relay` until that baseline path works once, unless
|
|
78
|
+
the CLI explicitly points you there. Use `zk-agent suite` only after that
|
|
79
|
+
first success or when you want the broader question-first packaged surface.
|
|
80
|
+
|
|
81
|
+
After that first success, the default broader follow-up is:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
zk-agent suite
|
|
85
|
+
```
|
|
43
86
|
|
|
44
87
|
What each step is doing:
|
|
45
88
|
|
|
@@ -47,7 +90,7 @@ What each step is doing:
|
|
|
47
90
|
- `next` gives the shortest valid follow-up step and now labels the current
|
|
48
91
|
product question as `bootstrap`, `recover`, `operate`, or `workflow`
|
|
49
92
|
- `wallet create --await-local` is the preferred local approval path
|
|
50
|
-
- `
|
|
93
|
+
- `pay` is the flagship zkSync-native public native-send shortcut
|
|
51
94
|
- `suite` is the broader question-first packaged surface
|
|
52
95
|
|
|
53
96
|
The packaged default story is payment-first: send native value now, stay on
|
|
@@ -65,7 +108,7 @@ The three public proof paths today are:
|
|
|
65
108
|
The fastest flagship proof path after wallet readiness is:
|
|
66
109
|
|
|
67
110
|
```bash
|
|
68
|
-
zk-agent
|
|
111
|
+
zk-agent pay --wallet main --to <address> --amount <amount>
|
|
69
112
|
zk-agent workflow next --request-id <id>
|
|
70
113
|
zk-agent workflow status --request-id <id>
|
|
71
114
|
```
|
|
@@ -73,10 +116,48 @@ zk-agent workflow status --request-id <id>
|
|
|
73
116
|
That path proves the default ready-wallet execution route plus checkpoint
|
|
74
117
|
follow-up and status inspection without leaving the flagship workflow surface.
|
|
75
118
|
|
|
119
|
+
Choose between the direct flagship pay surface and Agent Pay this way:
|
|
120
|
+
|
|
121
|
+
- `pay`: the same public shortcut when you want the shortest first-screen
|
|
122
|
+
flagship send path
|
|
123
|
+
- `workflow pay`: the same execution surface once you are already working
|
|
124
|
+
inside the scoped workflow layer
|
|
125
|
+
- `submit`: the public shortcut when execution is no longer the whole story
|
|
126
|
+
and you want the shortest Agent Pay ingress path
|
|
127
|
+
- `payment`: execution is no longer the whole story and you need request
|
|
128
|
+
capture plus follow-up, sharing, reporting, export, or approval repair
|
|
129
|
+
around the write path
|
|
130
|
+
|
|
131
|
+
`payment` does not replace the execution path. It keeps local request state,
|
|
132
|
+
follow-up, and export surfaces around `pay`, `submit`, `workflow pay`, and
|
|
133
|
+
`send-token`.
|
|
134
|
+
|
|
135
|
+
Choose between the two Agent Pay-facing surfaces this way:
|
|
136
|
+
|
|
137
|
+
- `payment`: the packaged question has already narrowed to one request layer
|
|
138
|
+
and its follow-up surface
|
|
139
|
+
- `suite`: wallet readiness is already clear, but you still want the broader
|
|
140
|
+
packaged catalog across requests, discovery, paymaster, funding, and hosted
|
|
141
|
+
recovery
|
|
142
|
+
|
|
143
|
+
The shortest way to think about Agent Pay is:
|
|
144
|
+
|
|
145
|
+
- `submit`: capture one payment request
|
|
146
|
+
- `workspace`: review the cross-request operator surface
|
|
147
|
+
- `handoff`: export one stable integration bundle
|
|
148
|
+
- `feed`: export the stable cross-request batch view
|
|
149
|
+
|
|
150
|
+
Why Agent Pay instead of only direct execution:
|
|
151
|
+
|
|
152
|
+
- capture one request before or after the write path
|
|
153
|
+
- keep a cross-request operator workspace around the same wallet runtime
|
|
154
|
+
- export stable handoff and feed views for external agents, dashboards, or backends
|
|
155
|
+
|
|
76
156
|
The current local-first Agent Pay entry surface is:
|
|
77
157
|
|
|
78
158
|
```bash
|
|
79
|
-
zk-agent
|
|
159
|
+
zk-agent submit --wallet main --to <address> --amount <amount>
|
|
160
|
+
zk-agent workspace
|
|
80
161
|
zk-agent payment dashboard
|
|
81
162
|
zk-agent payment feed
|
|
82
163
|
zk-agent payment queue
|
|
@@ -84,26 +165,40 @@ zk-agent payment report
|
|
|
84
165
|
zk-agent payment approval --request-id <id>
|
|
85
166
|
```
|
|
86
167
|
|
|
168
|
+
The scoped equivalents remain `zk-agent payment submit` and
|
|
169
|
+
`zk-agent payment workspace`.
|
|
170
|
+
|
|
87
171
|
The fastest Agent Pay proof path is:
|
|
88
172
|
|
|
89
173
|
```bash
|
|
90
|
-
zk-agent
|
|
174
|
+
zk-agent submit --wallet main --to <address> --amount <amount>
|
|
91
175
|
zk-agent payment next --request-id <id>
|
|
92
176
|
zk-agent payment approval --request-id <id>
|
|
93
|
-
zk-agent
|
|
177
|
+
zk-agent workspace
|
|
94
178
|
zk-agent payment handoff --request-id <id>
|
|
95
179
|
zk-agent payment feed
|
|
96
180
|
```
|
|
97
181
|
|
|
98
182
|
That path shows compact ingress, wallet-aware follow-up, approval readiness,
|
|
99
|
-
|
|
183
|
+
workspace summary, single-request handoff bundling, and cross-request feed
|
|
100
184
|
export without leaving the local-first surface.
|
|
101
185
|
|
|
186
|
+
If request capture is no longer enough and you need one current cross-request
|
|
187
|
+
operator view, open the workbench directly:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
zk-agent workspace
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
That is the current public shortcut to the Agent Pay workbench anchor above
|
|
194
|
+
dashboard, queue, report, and feed. The scoped form remains
|
|
195
|
+
`zk-agent payment workspace`.
|
|
196
|
+
|
|
102
197
|
When the browser is remote, the fastest hosted approval proof path on the
|
|
103
198
|
current supported recovery baseline is:
|
|
104
199
|
|
|
105
200
|
```bash
|
|
106
|
-
zk-agent relay
|
|
201
|
+
zk-agent relay baseline --relay-url <relay-url>
|
|
107
202
|
zk-agent wallet reapprove --name main --relay-url <relay-url> --wait-relay --prompt-code
|
|
108
203
|
zk-agent wallet status --name main
|
|
109
204
|
```
|
|
@@ -118,7 +213,7 @@ zk-agent wallet create --relay-url <relay-url> --wait-relay --prompt-code
|
|
|
118
213
|
zk-agent next
|
|
119
214
|
```
|
|
120
215
|
|
|
121
|
-
|
|
216
|
+
Current compact Agent Pay command layer:
|
|
122
217
|
|
|
123
218
|
- `submit`: capture one payment request through the compact ingress surface
|
|
124
219
|
- `dashboard`: review one cross-request dashboard summary above wallet groups,
|
|
@@ -180,22 +275,6 @@ Inside `suite`, the smallest question-first entry layer is:
|
|
|
180
275
|
- `unstick write`
|
|
181
276
|
- `recover remote approval`
|
|
182
277
|
|
|
183
|
-
Use the surfaces this way:
|
|
184
|
-
|
|
185
|
-
- `start`: you are just beginning and want the public onboarding command that
|
|
186
|
-
mirrors `next`
|
|
187
|
-
- `next`: the CLI is still deciding the shortest path across setup, wallet
|
|
188
|
-
readiness, recovery, or workflow continuation
|
|
189
|
-
- `workflow pay`: the wallet is already ready and you want the flagship
|
|
190
|
-
native-send path now
|
|
191
|
-
- `suite`: the wallet is already ready and you want the broader question-first
|
|
192
|
-
packaged surface because the task is broader than one immediate flagship pay
|
|
193
|
-
step
|
|
194
|
-
- `payment`: the execution path is no longer the whole story and you need
|
|
195
|
-
local request capture, queueing, reporting, or approval tracking around it
|
|
196
|
-
- `suite --include-onboarding`: you want one combined readout from first-run
|
|
197
|
-
bootstrap through the packaged post-flagship surface
|
|
198
|
-
|
|
199
278
|
The remote relay path is a fallback, not part of the default happy path. Only
|
|
200
279
|
open it when the browser is on another machine or cannot return directly to
|
|
201
280
|
the waiting terminal.
|
|
@@ -244,23 +323,38 @@ ZK_AGENT_TOKEN_DIRECTORY_ROOT=
|
|
|
244
323
|
ZK_AGENT_STORAGE_DIR=
|
|
245
324
|
```
|
|
246
325
|
|
|
247
|
-
##
|
|
326
|
+
## Start here by question
|
|
248
327
|
|
|
249
|
-
- `zk-agent
|
|
250
|
-
|
|
251
|
-
- `zk-agent
|
|
252
|
-
|
|
253
|
-
- `zk-agent suite`: the packaged post-flagship catalog once wallet readiness is
|
|
254
|
-
no longer the blocker and you want the broader question-first packaged
|
|
255
|
-
surface
|
|
328
|
+
- `zk-agent start`: the public first-touch command when you want the shortest
|
|
329
|
+
obvious entrypoint
|
|
330
|
+
- `zk-agent next`: the CLI still needs to choose bootstrap, recovery, or
|
|
331
|
+
workflow continuation
|
|
256
332
|
- `zk-agent doctor`: local-only diagnosis before you choose a fix
|
|
257
333
|
- `zk-agent wallet status --name <wallet>` and
|
|
258
|
-
`zk-agent wallet next --name <wallet>`: wallet-scoped
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
- `zk-agent
|
|
262
|
-
|
|
263
|
-
|
|
334
|
+
`zk-agent wallet next --name <wallet>`: the blocker is clearly wallet-scoped
|
|
335
|
+
but the exact repair step is still unclear
|
|
336
|
+
- `zk-agent pay ...`: the wallet is ready and the goal is "send value now"
|
|
337
|
+
- `zk-agent workflow ...`: the question is already workflow-specific and you
|
|
338
|
+
need planning, persistence, status, resume, or multi-intent execution
|
|
339
|
+
- `zk-agent payment ...`: execution is no longer the whole story and you need
|
|
340
|
+
the Agent Pay request layer around the write path
|
|
341
|
+
- `zk-agent workspace`: you already know you need the current cross-request
|
|
342
|
+
Agent Pay workbench anchor
|
|
343
|
+
- `zk-agent suite`: wallet readiness is clear and the question is broader than
|
|
344
|
+
one immediate send
|
|
345
|
+
- `zk-agent relay baseline --relay-url <relay-url>`: the browser is remote and
|
|
346
|
+
approval must move to the hosted fallback path
|
|
347
|
+
|
|
348
|
+
Keep the split strict: `pay` is the public direct send surface, `workflow pay`
|
|
349
|
+
is the scoped workflow form of that same path, and `payment` is the request
|
|
350
|
+
and follow-up layer around the send surface.
|
|
351
|
+
|
|
352
|
+
Use `suite` when the question is broader than one request lifecycle and you
|
|
353
|
+
still need the packaged catalog.
|
|
354
|
+
|
|
355
|
+
Use `workspace` when the question has already narrowed to the current
|
|
356
|
+
cross-request Agent Pay workbench. The scoped form remains
|
|
357
|
+
`payment workspace`.
|
|
264
358
|
|
|
265
359
|
## Repair locally first
|
|
266
360
|
|
|
@@ -291,7 +385,7 @@ Use the relay-backed path only when the browser is not colocated with the
|
|
|
291
385
|
terminal:
|
|
292
386
|
|
|
293
387
|
```bash
|
|
294
|
-
zk-agent relay
|
|
388
|
+
zk-agent relay baseline --relay-url <relay-url>
|
|
295
389
|
zk-agent wallet create --relay-url <relay-url> --wait-relay --prompt-code
|
|
296
390
|
zk-agent next
|
|
297
391
|
```
|
|
@@ -299,6 +393,7 @@ zk-agent next
|
|
|
299
393
|
For an existing wallet:
|
|
300
394
|
|
|
301
395
|
```bash
|
|
396
|
+
zk-agent relay baseline --relay-url <relay-url>
|
|
302
397
|
zk-agent wallet reapprove --name main --relay-url <relay-url> --wait-relay --prompt-code
|
|
303
398
|
zk-agent next
|
|
304
399
|
```
|
|
@@ -318,9 +413,9 @@ If the relay is self-hosted through the built-in server:
|
|
|
318
413
|
zk-agent relay serve --public-origin https://relay.example.com
|
|
319
414
|
```
|
|
320
415
|
|
|
321
|
-
Use `relay
|
|
322
|
-
|
|
323
|
-
|
|
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.
|
|
324
419
|
|
|
325
420
|
For the supported hosted operating contract, use
|
|
326
421
|
[`docs/16-hosted-approval-operated-baseline.md`](../../docs/16-hosted-approval-operated-baseline.md).
|
|
@@ -359,7 +454,7 @@ Current `suite` catalog categories:
|
|
|
359
454
|
Current `suite` handoff surfaces:
|
|
360
455
|
|
|
361
456
|
- `workflow`: flagship pay, approval-based pay, and funding recovery
|
|
362
|
-
- `payment`: request capture,
|
|
457
|
+
- `payment`: request capture, follow-up, sharing, export, and approval repair
|
|
363
458
|
- `discovery`: assets/defaults/token inspection
|
|
364
459
|
- `relay`: hosted approval recovery
|
|
365
460
|
|
|
@@ -374,19 +469,29 @@ Current `suite` product journeys:
|
|
|
374
469
|
If you only need one default starting point inside `suite`, start with
|
|
375
470
|
`send value now`.
|
|
376
471
|
|
|
472
|
+
Inside `suite`, the shortest way to think about Agent Pay is:
|
|
473
|
+
|
|
474
|
+
- `submit`: capture one payment request
|
|
475
|
+
- `workspace`: review the cross-request operator surface
|
|
476
|
+
- `handoff`: export one stable single-request bundle
|
|
477
|
+
- `feed`: export the stable cross-request batch view
|
|
478
|
+
|
|
479
|
+
The shortest tracked route inside `suite` remains:
|
|
480
|
+
`submit -> next -> approval -> workspace -> handoff -> feed`.
|
|
481
|
+
|
|
377
482
|
For the clearest Agent Pay proof path inside `suite`, follow:
|
|
378
483
|
|
|
379
484
|
```bash
|
|
380
|
-
zk-agent
|
|
485
|
+
zk-agent submit --wallet main --to <address> --amount <amount>
|
|
381
486
|
zk-agent payment next --request-id <id>
|
|
382
487
|
zk-agent payment approval --request-id <id>
|
|
383
|
-
zk-agent
|
|
488
|
+
zk-agent workspace
|
|
384
489
|
zk-agent payment handoff --request-id <id>
|
|
385
490
|
zk-agent payment feed
|
|
386
491
|
```
|
|
387
492
|
|
|
388
493
|
That is the shortest packaged route from one local request write into
|
|
389
|
-
wallet-aware follow-up, approval readiness,
|
|
494
|
+
wallet-aware follow-up, approval readiness, workspace summary, and
|
|
390
495
|
integration-ready export.
|
|
391
496
|
|
|
392
497
|
Use `--wallet <name>` or `--chain <chain>` when the returned suite commands
|