zk-agent-cli 0.1.0-rc.5 → 0.1.0-rc.7

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 (3) hide show
  1. package/README.md +168 -35
  2. package/dist/index.js +1774 -476
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,16 +1,22 @@
1
1
  # zk-agent-cli
2
2
 
3
- `zk-agent-cli` is the packaged terminal CLI for the zk-agent operator path on
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 canonical CLI operator manual.
6
+ This is the canonical CLI manual.
7
+
8
+ ## Why This CLI Exists
9
+
10
+ - keep wallet and session control local-first
11
+ - keep the default execution story zkSync-native and `sed-lite`-first
12
+ - add an Agent Pay request layer above direct workflow execution
7
13
 
8
14
  Use:
9
15
 
10
16
  - [`skills/QUICKSTART.md`](../../skills/QUICKSTART.md) for the shortest
11
17
  verified path
12
18
  - [`docs/15-codex-plugin-onboarding.md`](../../docs/15-codex-plugin-onboarding.md)
13
- for the native Codex plugin/local marketplace path
19
+ for the native Codex plugin install path
14
20
 
15
21
  ## One-minute path
16
22
 
@@ -25,6 +31,16 @@ zk-agent workflow pay --wallet main --to <address> --amount <amount>
25
31
  zk-agent suite
26
32
  ```
27
33
 
34
+ `zk-agent start` is the public onboarding command that keeps the same output
35
+ contract as `zk-agent next`. Use `start` when you want the shortest obvious
36
+ first-touch command. Keep `next` as the canonical operator/runtime contract in
37
+ scripts and JSON examples.
38
+
39
+ If you are new, stop at the first successful `zk-agent workflow pay`. Ignore
40
+ remote approval and Agent Pay until that baseline path works once. Use
41
+ `zk-agent suite` only after that first success or when you want the broader
42
+ question-first packaged surface.
43
+
28
44
  What each step is doing:
29
45
 
30
46
  - `setup` writes local defaults
@@ -32,63 +48,158 @@ What each step is doing:
32
48
  product question as `bootstrap`, `recover`, `operate`, or `workflow`
33
49
  - `wallet create --await-local` is the preferred local approval path
34
50
  - `workflow pay` is the flagship zkSync-native AA native-send path
35
- - `suite` is the packaged surface
51
+ - `suite` is the broader question-first packaged surface
36
52
 
37
53
  The packaged default story is payment-first: send native value now, stay on
38
54
  the approval-based pay path when fee-token/default state matters, and recover
39
55
  funding only when the workflow says the write path is blocked.
40
56
 
41
- The first Agent Pay platform primitive now exists as a local-first payment
42
- ingress, request, routing, and approval-orchestration surface:
57
+ The three public proof paths today are:
58
+
59
+ - flagship pay: prove the default ready-wallet zkSync-native send path
60
+ - Agent Pay: prove local request capture plus follow-up surfaces around the
61
+ same wallet runtime
62
+ - hosted approval recovery: prove remote-browser session recovery on the
63
+ current single-host relay baseline
64
+
65
+ The fastest flagship proof path after wallet readiness is:
66
+
67
+ ```bash
68
+ zk-agent workflow pay --wallet main --to <address> --amount <amount>
69
+ zk-agent workflow next --request-id <id>
70
+ zk-agent workflow status --request-id <id>
71
+ ```
72
+
73
+ That path proves the default ready-wallet execution route plus checkpoint
74
+ follow-up and status inspection without leaving the flagship workflow surface.
75
+
76
+ The current local-first Agent Pay entry surface is:
43
77
 
44
78
  ```bash
45
79
  zk-agent payment submit --wallet main --to <address> --amount <amount>
80
+ zk-agent payment dashboard
81
+ zk-agent payment feed
46
82
  zk-agent payment queue
47
83
  zk-agent payment report
48
84
  zk-agent payment approval --request-id <id>
49
- zk-agent payment sync-approval --request-id <id>
50
- zk-agent payment create --wallet main --to <address> --amount <amount>
85
+ ```
86
+
87
+ The fastest Agent Pay proof path is:
88
+
89
+ ```bash
90
+ zk-agent payment submit --wallet main --to <address> --amount <amount>
51
91
  zk-agent payment next --request-id <id>
52
- zk-agent payment inspect --request-id <id>
53
- zk-agent payment intent --request-id <id>
54
- zk-agent payment describe --request-id <id>
55
- zk-agent payment execution --request-id <id>
56
- zk-agent payment quote --request-id <id>
57
- zk-agent payment refresh-quote --request-id <id>
58
- zk-agent payment settlement --request-id <id>
59
- zk-agent payment reconcile --request-id <id> --status <status>
60
- zk-agent payment list
92
+ zk-agent payment approval --request-id <id>
93
+ zk-agent payment dashboard
94
+ zk-agent payment handoff --request-id <id>
95
+ zk-agent payment feed
96
+ ```
97
+
98
+ That path shows compact ingress, wallet-aware follow-up, approval readiness,
99
+ dashboard summary, single-request handoff bundling, and cross-request feed
100
+ export without leaving the local-first surface.
101
+
102
+ When the browser is remote, the fastest hosted approval proof path on the
103
+ current supported recovery baseline is:
104
+
105
+ ```bash
106
+ zk-agent relay inspect --relay-url <relay-url>
107
+ zk-agent wallet reapprove --name main --relay-url <relay-url> --wait-relay --prompt-code
108
+ zk-agent wallet status --name main
61
109
  ```
62
110
 
111
+ That path proves outside-in relay readiness, one hosted reapproval, and the
112
+ post-approval wallet-readiness readout without claiming multi-host durability.
113
+
114
+ If the wallet does not exist yet, swap `wallet reapprove` for:
115
+
116
+ ```bash
117
+ zk-agent wallet create --relay-url <relay-url> --wait-relay --prompt-code
118
+ zk-agent next
119
+ ```
120
+
121
+ Use those commands for the public "start here" path:
122
+
123
+ - `submit`: capture one payment request through the compact ingress surface
124
+ - `dashboard`: review one cross-request dashboard summary above wallet groups,
125
+ actionable queue items, and recent payment activity
126
+ - `feed`: expose an integration-ready cross-request batch feed for external
127
+ dashboards, agents, or backend ingestion
128
+ - `queue`: review the current actionable request queue
129
+ - `report`: summarize cross-request state and next-action distribution
130
+ - `approval`: inspect whether the linked wallet is still blocking execution
131
+
132
+ When you already have a request id and need the deeper local lifecycle,
133
+ integration-ready handoff bundle, request parties model, share-safe request
134
+ view, routing, quote, settlement, or reconciliation views, use:
135
+
136
+ ```bash
137
+ zk-agent payment --help
138
+ ```
139
+
140
+ Use `zk-agent payment share --request-id <id>` when the request must be shared
141
+ with a payee or external reviewer without exposing local wallet linkage or
142
+ execution-preference details.
143
+
144
+ Use `zk-agent payment parties --request-id <id>` when an external agent or
145
+ backend needs the stable request parties model with separate local and
146
+ share-safe payer projections.
147
+
148
+ Use `zk-agent payment handoff --request-id <id>` when an external dashboard,
149
+ agent, or backend needs one stable integration bundle instead of
150
+ reassembling local reads.
151
+
152
+ Use `zk-agent payment feed` when that same external surface needs the stable
153
+ cross-request batch feed instead of one request at a time.
154
+
63
155
  If readiness is unclear before you choose a fix, use:
64
156
 
65
157
  ```bash
66
158
  zk-agent doctor
67
159
  ```
68
160
 
69
- When `doctor` shows local readiness is clear and the question is broader than
70
- one immediate next step, move to:
161
+ When `doctor` shows local readiness is clear and you want the broader
162
+ question-first packaged surface, move to:
71
163
 
72
164
  ```bash
73
165
  zk-agent suite
74
166
  ```
75
167
 
76
168
  If you want one packaged readout that includes both first-run onboarding and
77
- the post-flagship operator surface, use:
169
+ the post-flagship packaged surface, use:
78
170
 
79
171
  ```bash
80
172
  zk-agent suite --include-onboarding
81
173
  ```
82
174
 
175
+ Inside `suite`, the smallest question-first entry layer is:
176
+
177
+ - `send now`
178
+ - `track payments`
179
+ - `inspect before token action`
180
+ - `unstick write`
181
+ - `recover remote approval`
182
+
83
183
  Use the surfaces this way:
84
184
 
185
+ - `start`: you are just beginning and want the public onboarding command that
186
+ mirrors `next`
85
187
  - `next`: the CLI is still deciding the shortest path across setup, wallet
86
188
  readiness, recovery, or workflow continuation
87
- - `suite`: the wallet is already ready and you want the packaged operator
88
- catalog after the flagship pay path
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
89
196
  - `suite --include-onboarding`: you want one combined readout from first-run
90
197
  bootstrap through the packaged post-flagship surface
91
198
 
199
+ The remote relay path is a fallback, not part of the default happy path. Only
200
+ open it when the browser is on another machine or cannot return directly to
201
+ the waiting terminal.
202
+
92
203
  ## Install
93
204
 
94
205
  One-shot execution:
@@ -110,7 +221,7 @@ The package also ships the alias:
110
221
  zksync-agent --help
111
222
  ```
112
223
 
113
- The `npx skills add ...` path belongs to the repo skill bundle, not the
224
+ The `npx skills add ...` path belongs to the skill bundle, not the
114
225
  packaged CLI install surface.
115
226
 
116
227
  ## Defaults
@@ -137,15 +248,19 @@ ZK_AGENT_STORAGE_DIR=
137
248
 
138
249
  - `zk-agent next`: the top-level product entrypoint when the CLI still needs to
139
250
  choose the shortest path
251
+ - `zk-agent workflow pay ...`: the direct flagship execution surface when you
252
+ already know the wallet is ready and the goal is "send value now"
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
140
256
  - `zk-agent doctor`: local-only diagnosis before you choose a fix
141
257
  - `zk-agent wallet status --name <wallet>` and
142
258
  `zk-agent wallet next --name <wallet>`: wallet-scoped repair and readiness
143
- - `zk-agent workflow ...`: explicit workflow planning, persistence, status, and
144
- resume questions
259
+ - `zk-agent workflow ...`: explicit workflow planning, persistence, status,
260
+ resume questions, and the flagship pay execution path
145
261
  - `zk-agent payment ...`: local-first payment ingress, request capture, routing,
146
- and settlement-state tracking for the Agent Pay platform layer
147
- - `zk-agent suite`: the packaged post-flagship catalog once wallet readiness is
148
- no longer the blocker
262
+ queueing, approval tracking, and settlement-state tracking for the Agent Pay
263
+ platform layer
149
264
 
150
265
  ## Repair locally first
151
266
 
@@ -229,12 +344,13 @@ zk-agent suite
229
344
  ```
230
345
 
231
346
  Use `suite` when the wallet is already ready and you want one packaged surface
232
- for flagship pay, discovery/defaults, funding readiness, approval-based
233
- paymaster readiness, and hosted approval recovery.
347
+ for flagship pay, Agent Pay request work, discovery/defaults, funding
348
+ readiness, approval-based paymaster readiness, and hosted approval recovery.
234
349
 
235
350
  Current `suite` catalog categories:
236
351
 
237
352
  - `operate`
353
+ - `request`
238
354
  - `discover`
239
355
  - `pay`
240
356
  - `fund`
@@ -243,12 +359,14 @@ Current `suite` catalog categories:
243
359
  Current `suite` handoff surfaces:
244
360
 
245
361
  - `workflow`: flagship pay, approval-based pay, and funding recovery
362
+ - `payment`: request capture, queueing, reporting, feed export, and approval repair
246
363
  - `discovery`: assets/defaults/token inspection
247
364
  - `relay`: hosted approval recovery
248
365
 
249
- Current `suite` operator journeys:
366
+ Current `suite` product journeys:
250
367
 
251
368
  - `send value now`
369
+ - `capture and track payments`
252
370
  - `inspect before acting`
253
371
  - `unstick a write`
254
372
  - `recover remote approval`
@@ -256,6 +374,21 @@ Current `suite` operator journeys:
256
374
  If you only need one default starting point inside `suite`, start with
257
375
  `send value now`.
258
376
 
377
+ For the clearest Agent Pay proof path inside `suite`, follow:
378
+
379
+ ```bash
380
+ zk-agent payment submit --wallet main --to <address> --amount <amount>
381
+ zk-agent payment next --request-id <id>
382
+ zk-agent payment approval --request-id <id>
383
+ zk-agent payment dashboard
384
+ zk-agent payment handoff --request-id <id>
385
+ zk-agent payment feed
386
+ ```
387
+
388
+ That is the shortest packaged route from one local request write into
389
+ wallet-aware follow-up, approval readiness, dashboard summary, and
390
+ integration-ready export.
391
+
259
392
  Use `--wallet <name>` or `--chain <chain>` when the returned suite commands
260
393
  should stay on a non-default wallet or chain.
261
394
 
@@ -271,7 +404,7 @@ Do not guess the route. Use the exact funding command suggested by `next`,
271
404
 
272
405
  ## Leave the default path only on purpose
273
406
 
274
- Prefer `suite` first when you want the packaged discovery/defaults/funding/
407
+ Prefer `suite` first when you want the packaged Agent Pay/discovery/funding/
275
408
  paymaster surface. Drop to lower-level commands only when the question is
276
409
  already narrower than the packaged catalog.
277
410
 
@@ -299,7 +432,7 @@ Built-in smart-account profiles remain:
299
432
 
300
433
  Keep `sed-lite` as the default product baseline. Use
301
434
  `zk-agent wallet smart-account --help` when the task is specifically about
302
- predict, deploy, or profile-level self-calls rather than the normal operator
435
+ predict, deploy, or profile-level self-calls rather than the normal default
303
436
  path.
304
437
 
305
438
  ## Common failures
@@ -315,7 +448,7 @@ path.
315
448
  do not guess the route; run the exact `workflow fund` command suggested by
316
449
  the CLI
317
450
  - locked-down environment blocks local callback or relay binding:
318
- rerun from a normal host shell or use the relay/manual approval path that
451
+ rerun from a normal shell or use the relay/manual approval path that
319
452
  matches the environment
320
453
 
321
454
  ## Reference
@@ -348,4 +481,4 @@ zk-agent relay --help
348
481
 
349
482
  ## License
350
483
 
351
- MIT. See the repository `LICENSE`.
484
+ MIT. See the project `LICENSE`.