zk-agent-cli 0.1.0-rc.4 → 0.1.0-rc.6

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 +116 -23
  2. package/dist/index.js +3425 -279
  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,11 @@ zk-agent workflow pay --wallet main --to <address> --amount <amount>
25
31
  zk-agent suite
26
32
  ```
27
33
 
34
+ If you are new, stop at the first successful `zk-agent workflow pay`. Ignore
35
+ remote approval and Agent Pay until that baseline path works once. Use
36
+ `zk-agent suite` only after that first success or when the question becomes
37
+ broader than one immediate write.
38
+
28
39
  What each step is doing:
29
40
 
30
41
  - `setup` writes local defaults
@@ -38,14 +49,66 @@ The packaged default story is payment-first: send native value now, stay on
38
49
  the approval-based pay path when fee-token/default state matters, and recover
39
50
  funding only when the workflow says the write path is blocked.
40
51
 
41
- The first Agent Pay platform primitive now exists as a local-first payment
42
- request surface:
52
+ The current local-first Agent Pay entry surface is:
53
+
54
+ ```bash
55
+ zk-agent payment submit --wallet main --to <address> --amount <amount>
56
+ zk-agent payment dashboard
57
+ zk-agent payment feed
58
+ zk-agent payment queue
59
+ zk-agent payment report
60
+ zk-agent payment approval --request-id <id>
61
+ ```
62
+
63
+ The fastest Agent Pay proof path is:
64
+
65
+ ```bash
66
+ zk-agent payment submit --wallet main --to <address> --amount <amount>
67
+ zk-agent payment next --request-id <id>
68
+ zk-agent payment approval --request-id <id>
69
+ zk-agent payment dashboard
70
+ zk-agent payment handoff --request-id <id>
71
+ zk-agent payment feed
72
+ ```
73
+
74
+ That path shows compact ingress, wallet-aware follow-up, approval readiness,
75
+ dashboard summary, single-request handoff bundling, and cross-request feed
76
+ export without leaving the local-first surface.
77
+
78
+ Use those commands for the public "start here" path:
79
+
80
+ - `submit`: capture one payment request through the compact ingress surface
81
+ - `dashboard`: review one cross-request dashboard summary above wallet groups,
82
+ actionable queue items, and recent payment activity
83
+ - `feed`: expose an integration-ready cross-request batch feed for external
84
+ dashboards, agents, or backend ingestion
85
+ - `queue`: review the current actionable request queue
86
+ - `report`: summarize cross-request state and next-action distribution
87
+ - `approval`: inspect whether the linked wallet is still blocking execution
88
+
89
+ When you already have a request id and need the deeper local lifecycle,
90
+ integration-ready handoff bundle, request parties model, share-safe request
91
+ view, routing, quote, settlement, or reconciliation views, use:
43
92
 
44
93
  ```bash
45
- zk-agent payment create --wallet main --to <address> --amount <amount>
46
- zk-agent payment list
94
+ zk-agent payment --help
47
95
  ```
48
96
 
97
+ Use `zk-agent payment share --request-id <id>` when the request must be shared
98
+ with a payee or external reviewer without exposing local wallet linkage or
99
+ execution-preference details.
100
+
101
+ Use `zk-agent payment parties --request-id <id>` when an external agent or
102
+ backend needs the stable request parties model with separate local and
103
+ share-safe payer projections.
104
+
105
+ Use `zk-agent payment handoff --request-id <id>` when an external dashboard,
106
+ agent, or backend needs one stable integration bundle instead of
107
+ reassembling local reads.
108
+
109
+ Use `zk-agent payment feed` when that same external surface needs the stable
110
+ cross-request batch feed instead of one request at a time.
111
+
49
112
  If readiness is unclear before you choose a fix, use:
50
113
 
51
114
  ```bash
@@ -60,7 +123,7 @@ zk-agent suite
60
123
  ```
61
124
 
62
125
  If you want one packaged readout that includes both first-run onboarding and
63
- the post-flagship operator surface, use:
126
+ the post-flagship packaged surface, use:
64
127
 
65
128
  ```bash
66
129
  zk-agent suite --include-onboarding
@@ -70,11 +133,19 @@ Use the surfaces this way:
70
133
 
71
134
  - `next`: the CLI is still deciding the shortest path across setup, wallet
72
135
  readiness, recovery, or workflow continuation
73
- - `suite`: the wallet is already ready and you want the packaged operator
74
- catalog after the flagship pay path
136
+ - `workflow pay`: the wallet is already ready and you want the flagship
137
+ native-send path now
138
+ - `suite`: the wallet is already ready and you want the packaged surface
139
+ because the question is broader than one immediate flagship pay step
140
+ - `payment`: the execution path is no longer the whole story and you need
141
+ local request capture, queueing, reporting, or approval tracking around it
75
142
  - `suite --include-onboarding`: you want one combined readout from first-run
76
143
  bootstrap through the packaged post-flagship surface
77
144
 
145
+ The remote relay path is a fallback, not part of the default happy path. Only
146
+ open it when the browser is on another machine or cannot return directly to
147
+ the waiting terminal.
148
+
78
149
  ## Install
79
150
 
80
151
  One-shot execution:
@@ -96,7 +167,7 @@ The package also ships the alias:
96
167
  zksync-agent --help
97
168
  ```
98
169
 
99
- The `npx skills add ...` path belongs to the repo skill bundle, not the
170
+ The `npx skills add ...` path belongs to the skill bundle, not the
100
171
  packaged CLI install surface.
101
172
 
102
173
  ## Defaults
@@ -123,14 +194,18 @@ ZK_AGENT_STORAGE_DIR=
123
194
 
124
195
  - `zk-agent next`: the top-level product entrypoint when the CLI still needs to
125
196
  choose the shortest path
197
+ - `zk-agent workflow pay ...`: the direct flagship execution surface when you
198
+ already know the wallet is ready and the goal is "send value now"
199
+ - `zk-agent suite`: the packaged post-flagship catalog once wallet readiness is
200
+ no longer the blocker and the question is broader than one immediate write
126
201
  - `zk-agent doctor`: local-only diagnosis before you choose a fix
127
202
  - `zk-agent wallet status --name <wallet>` and
128
203
  `zk-agent wallet next --name <wallet>`: wallet-scoped repair and readiness
129
- - `zk-agent workflow ...`: explicit workflow planning, persistence, status, and
130
- resume questions
131
- - `zk-agent payment ...`: local-first payment request capture and settlement-state tracking for the Agent Pay platform layer
132
- - `zk-agent suite`: the packaged post-flagship catalog once wallet readiness is
133
- no longer the blocker
204
+ - `zk-agent workflow ...`: explicit workflow planning, persistence, status,
205
+ resume questions, and the flagship pay execution path
206
+ - `zk-agent payment ...`: local-first payment ingress, request capture, routing,
207
+ queueing, approval tracking, and settlement-state tracking for the Agent Pay
208
+ platform layer
134
209
 
135
210
  ## Repair locally first
136
211
 
@@ -214,12 +289,13 @@ zk-agent suite
214
289
  ```
215
290
 
216
291
  Use `suite` when the wallet is already ready and you want one packaged surface
217
- for flagship pay, discovery/defaults, funding readiness, approval-based
218
- paymaster readiness, and hosted approval recovery.
292
+ for flagship pay, Agent Pay request work, discovery/defaults, funding
293
+ readiness, approval-based paymaster readiness, and hosted approval recovery.
219
294
 
220
295
  Current `suite` catalog categories:
221
296
 
222
297
  - `operate`
298
+ - `request`
223
299
  - `discover`
224
300
  - `pay`
225
301
  - `fund`
@@ -228,12 +304,14 @@ Current `suite` catalog categories:
228
304
  Current `suite` handoff surfaces:
229
305
 
230
306
  - `workflow`: flagship pay, approval-based pay, and funding recovery
307
+ - `payment`: request capture, queueing, reporting, feed export, and approval repair
231
308
  - `discovery`: assets/defaults/token inspection
232
309
  - `relay`: hosted approval recovery
233
310
 
234
- Current `suite` operator journeys:
311
+ Current `suite` product journeys:
235
312
 
236
313
  - `send value now`
314
+ - `capture and track payments`
237
315
  - `inspect before acting`
238
316
  - `unstick a write`
239
317
  - `recover remote approval`
@@ -241,6 +319,21 @@ Current `suite` operator journeys:
241
319
  If you only need one default starting point inside `suite`, start with
242
320
  `send value now`.
243
321
 
322
+ For the clearest Agent Pay proof path inside `suite`, follow:
323
+
324
+ ```bash
325
+ zk-agent payment submit --wallet main --to <address> --amount <amount>
326
+ zk-agent payment next --request-id <id>
327
+ zk-agent payment approval --request-id <id>
328
+ zk-agent payment dashboard
329
+ zk-agent payment handoff --request-id <id>
330
+ zk-agent payment feed
331
+ ```
332
+
333
+ That is the shortest packaged route from one local request write into
334
+ wallet-aware follow-up, approval readiness, dashboard summary, and
335
+ integration-ready export.
336
+
244
337
  Use `--wallet <name>` or `--chain <chain>` when the returned suite commands
245
338
  should stay on a non-default wallet or chain.
246
339
 
@@ -256,7 +349,7 @@ Do not guess the route. Use the exact funding command suggested by `next`,
256
349
 
257
350
  ## Leave the default path only on purpose
258
351
 
259
- Prefer `suite` first when you want the packaged discovery/defaults/funding/
352
+ Prefer `suite` first when you want the packaged Agent Pay/discovery/funding/
260
353
  paymaster surface. Drop to lower-level commands only when the question is
261
354
  already narrower than the packaged catalog.
262
355
 
@@ -284,7 +377,7 @@ Built-in smart-account profiles remain:
284
377
 
285
378
  Keep `sed-lite` as the default product baseline. Use
286
379
  `zk-agent wallet smart-account --help` when the task is specifically about
287
- predict, deploy, or profile-level self-calls rather than the normal operator
380
+ predict, deploy, or profile-level self-calls rather than the normal default
288
381
  path.
289
382
 
290
383
  ## Common failures
@@ -300,7 +393,7 @@ path.
300
393
  do not guess the route; run the exact `workflow fund` command suggested by
301
394
  the CLI
302
395
  - locked-down environment blocks local callback or relay binding:
303
- rerun from a normal host shell or use the relay/manual approval path that
396
+ rerun from a normal shell or use the relay/manual approval path that
304
397
  matches the environment
305
398
 
306
399
  ## Reference
@@ -333,4 +426,4 @@ zk-agent relay --help
333
426
 
334
427
  ## License
335
428
 
336
- MIT. See the repository `LICENSE`.
429
+ MIT. See the project `LICENSE`.