zk-agent-cli 1.0.0 → 1.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.
- package/README.md +133 -14
- package/dist/index.js +14626 -8143
- package/dist/mcp.js +12512 -0
- package/dist/sdk.js +12526 -0
- package/package.json +19 -3
package/README.md
CHANGED
|
@@ -1,18 +1,100 @@
|
|
|
1
1
|
# zk-agent-cli
|
|
2
2
|
|
|
3
|
-
`zk-agent-cli` is the packaged
|
|
4
|
-
zkSync Era and zkSync Sepolia.
|
|
3
|
+
`zk-agent-cli` is the packaged local-first, payment-first CLI for the default
|
|
4
|
+
zk-agent product path on zkSync Era and zkSync Sepolia.
|
|
5
|
+
|
|
6
|
+
**Prove one zkSync-native pay path in minutes, keep wallet control local, and
|
|
7
|
+
grow into Agent Pay on the same runtime.**
|
|
5
8
|
|
|
6
9
|
This is the packaged CLI manual for the public product shell:
|
|
7
|
-
`
|
|
10
|
+
`setup -> start -> wallet create --await-local -> next -> pay -> suite`,
|
|
8
11
|
with `submit`, `workspace`, `handoff`, and `feed` as the current Agent Pay
|
|
9
12
|
shortcuts.
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
For npm users evaluating it quickly, the product claim is simple:
|
|
15
|
+
|
|
16
|
+
- pay first on one local-first zkSync-native path
|
|
17
|
+
- keep Agent Pay follow-up on the same runtime instead of splitting it into
|
|
18
|
+
another product
|
|
19
|
+
- use `payment publish -> payment serve -> verify-preview` as the current
|
|
20
|
+
public hosted-preview proof, not as a claim of multi-tenant hosting
|
|
21
|
+
|
|
22
|
+
## Install in 30 Seconds
|
|
23
|
+
|
|
24
|
+
Use the install path that matches your environment:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx skills add https://github.com/AgiWeb3/zk-agent-cli
|
|
28
|
+
npx zk-agent-cli --help
|
|
29
|
+
npx zk-agent-cli mcp
|
|
30
|
+
npm install -g zk-agent-cli
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- `skills add`: install into an agent harness
|
|
34
|
+
- `npx zk-agent-cli`: one-shot evaluation without a global install
|
|
35
|
+
- `npx zk-agent-cli mcp`: start the AI-facing MCP stdio server instead of the human CLI
|
|
36
|
+
- `npm install -g zk-agent-cli`: keep `zk-agent` on your shell path
|
|
37
|
+
|
|
38
|
+
## AI-native entrypoint
|
|
39
|
+
|
|
40
|
+
When the consumer already speaks MCP and wants tools rather than CLI text,
|
|
41
|
+
start:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx zk-agent-cli mcp
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Current boundary:
|
|
48
|
+
|
|
49
|
+
- the MCP server is built on top of `packages/agent-tools`
|
|
50
|
+
- it exposes the same standard tool catalog plus `zkAgentRecommendedSequence`
|
|
51
|
+
- keep shell automation on `zk-agent --json ...` or
|
|
52
|
+
`zk-agent --format json ...`; use `mcp` when the client already speaks MCP
|
|
53
|
+
- `1.1.0` completes the packaged MCP baseline; it does not yet claim
|
|
54
|
+
framework-specific adapters or a fully expanded MCP ecosystem layer
|
|
55
|
+
|
|
56
|
+
Minimal import surface:
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
import {
|
|
60
|
+
createZkAgentToolContext,
|
|
61
|
+
listZkAgentTools,
|
|
62
|
+
runZkAgentTool
|
|
63
|
+
} from 'zk-agent-cli';
|
|
64
|
+
import { createZkAgentMcpServer } from 'zk-agent-cli/mcp';
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## First Minute After Install
|
|
68
|
+
|
|
69
|
+
If you only want the shortest public proof, do this and stop at the first
|
|
70
|
+
successful pay:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
zk-agent setup
|
|
74
|
+
zk-agent start
|
|
75
|
+
zk-agent wallet create --await-local
|
|
76
|
+
zk-agent next
|
|
77
|
+
zk-agent pay --wallet main --to <address> --amount <amount>
|
|
78
|
+
zk-agent suite
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
That is the current packaged story in one minute:
|
|
82
|
+
|
|
83
|
+
- install once
|
|
84
|
+
- prove one zkSync-native pay path
|
|
85
|
+
- open the broader packaged surface only after that first success
|
|
12
86
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
87
|
+
## Product Shell
|
|
88
|
+
|
|
89
|
+
- pay first: prove one zkSync-native send path before learning the broader
|
|
90
|
+
packaged surface
|
|
91
|
+
- stay on one runtime: keep Agent Pay follow-up, workspace, handoff, and feed
|
|
92
|
+
on the same wallet runtime
|
|
93
|
+
- current public hosted-preview proof:
|
|
94
|
+
`zk-agent payment publish` + `zk-agent payment serve` +
|
|
95
|
+
`zk-agent payment verify-preview`
|
|
96
|
+
already mark the hosted-preview boundary without claiming a multi-tenant
|
|
97
|
+
control plane
|
|
16
98
|
|
|
17
99
|
## What Makes It Different
|
|
18
100
|
|
|
@@ -22,12 +104,16 @@ shortcuts.
|
|
|
22
104
|
execution
|
|
23
105
|
- one Agent Pay layer that stays attached to the same wallet runtime instead
|
|
24
106
|
of splitting into a separate product
|
|
107
|
+
- one public hosted-preview proof on top of that same request/export layer:
|
|
108
|
+
`payment publish -> payment serve -> verify-preview`
|
|
25
109
|
|
|
26
110
|
## Best Fit
|
|
27
111
|
|
|
28
112
|
- local-first wallet and session control on zkSync is the real need
|
|
29
113
|
- the first proof should be one zkSync-native pay path, not broad multichain
|
|
30
114
|
exploration
|
|
115
|
+
- the shortest path should be "prove one pay route first" instead of reading a
|
|
116
|
+
broad command catalog first
|
|
31
117
|
- Agent Pay should stay attached to the same wallet runtime instead of
|
|
32
118
|
becoming a separate operator tool
|
|
33
119
|
|
|
@@ -36,6 +122,8 @@ shortcuts.
|
|
|
36
122
|
- hosted relay is still the fallback path, not the default onboarding story
|
|
37
123
|
- Agent Pay is a local-first workbench today, not yet a hosted multi-tenant
|
|
38
124
|
control plane
|
|
125
|
+
- the hosted-preview proof is real, but it is still one operator-controlled
|
|
126
|
+
boundary rather than a hosted platform or control plane
|
|
39
127
|
|
|
40
128
|
Use:
|
|
41
129
|
|
|
@@ -72,7 +160,7 @@ the first proof from a clean machine:
|
|
|
72
160
|
|
|
73
161
|
```bash
|
|
74
162
|
zk-agent setup
|
|
75
|
-
zk-agent
|
|
163
|
+
zk-agent start
|
|
76
164
|
zk-agent wallet create --await-local
|
|
77
165
|
zk-agent next
|
|
78
166
|
zk-agent pay --wallet main --to <address> --amount <amount>
|
|
@@ -88,9 +176,11 @@ smallest matching entrypoint.
|
|
|
88
176
|
|
|
89
177
|
`zk-agent start` is the public onboarding command that keeps the same output
|
|
90
178
|
contract as `zk-agent next`. Use `start` when you want the shortest obvious
|
|
91
|
-
first-touch command. Keep `next` as the canonical
|
|
92
|
-
scripts and JSON examples. If local defaults do
|
|
93
|
-
and `next` still send you through `zk-agent setup`
|
|
179
|
+
first-touch command after install. Keep `next` as the canonical
|
|
180
|
+
operator/runtime contract in scripts and JSON examples. If local defaults do
|
|
181
|
+
not exist yet, both `start` and `next` still send you through `zk-agent setup`
|
|
182
|
+
first. On the public first-proof path, `start` is the front door and `next`
|
|
183
|
+
is the follow-up step after wallet approval.
|
|
94
184
|
|
|
95
185
|
`zk-agent pay` is the public shortcut for the flagship send path. The scoped
|
|
96
186
|
form remains `zk-agent workflow pay`.
|
|
@@ -101,6 +191,13 @@ single-request integration-ready Agent Pay export. The scoped form remains
|
|
|
101
191
|
`zk-agent payment handoff`.
|
|
102
192
|
`zk-agent feed` is the public shortcut for the integration-ready Agent Pay
|
|
103
193
|
cross-request export. The scoped form remains `zk-agent payment feed`.
|
|
194
|
+
`zk-agent payment publish` materializes the current
|
|
195
|
+
`workspace` / `feed` / `handoff` Agent Pay bundle as a hostable static export.
|
|
196
|
+
`zk-agent payment serve` hosts that same bundle from one operator-controlled
|
|
197
|
+
static endpoint.
|
|
198
|
+
`zk-agent payment verify-preview` validates that one hosted preview URL still
|
|
199
|
+
matches the current `health` / `index` / `manifest` / `workspace` / `feed` /
|
|
200
|
+
`handoff` export contract.
|
|
104
201
|
|
|
105
202
|
If you are new, stop at the first successful `zk-agent pay`. Ignore
|
|
106
203
|
`suite`, `payment`, and `relay` until that baseline path works once, unless
|
|
@@ -126,11 +223,13 @@ The packaged default story is payment-first: send native value now, stay on
|
|
|
126
223
|
the approval-based pay path when fee-token/default state matters, and recover
|
|
127
224
|
funding only when the workflow says the write path is blocked.
|
|
128
225
|
|
|
129
|
-
The
|
|
226
|
+
The four public proof paths today are:
|
|
130
227
|
|
|
131
228
|
- flagship pay: prove the default ready-wallet zkSync-native send path
|
|
132
229
|
- Agent Pay: prove local request capture plus follow-up surfaces around the
|
|
133
230
|
same wallet runtime
|
|
231
|
+
- hosted Agent Pay preview: prove that the current workspace/feed/handoff
|
|
232
|
+
bundle can already be published and served behind one operator-controlled URL, then validated against that same public export contract
|
|
134
233
|
- hosted approval recovery: prove remote-browser session recovery on the
|
|
135
234
|
current single-host relay baseline
|
|
136
235
|
|
|
@@ -213,6 +312,24 @@ That path shows compact ingress, wallet-aware follow-up, approval readiness,
|
|
|
213
312
|
workspace summary, single-request handoff bundling, and cross-request feed
|
|
214
313
|
export without leaving the local-first surface.
|
|
215
314
|
|
|
315
|
+
That same `workspace -> handoff -> feed` chain is also the current public
|
|
316
|
+
Agent Pay proof on the hosted-preview boundary: an external dashboard, agent,
|
|
317
|
+
or backend can consume the stable exports today from the same runtime or one
|
|
318
|
+
operator-controlled host. `zk-agent payment publish` is the static half of
|
|
319
|
+
that proof, `zk-agent payment serve` is the hosted half, and
|
|
320
|
+
`zk-agent payment verify-preview` is the operator validation follow-up against
|
|
321
|
+
the public URL. That preview is already proven on one stable public URL; the
|
|
322
|
+
next step is to grow from that proof toward clearer hosted platform semantics
|
|
323
|
+
without claiming a multi-tenant control plane too early.
|
|
324
|
+
|
|
325
|
+
The fastest hosted Agent Pay preview proof path is:
|
|
326
|
+
|
|
327
|
+
```bash
|
|
328
|
+
zk-agent payment publish --public-base-url <https-url>
|
|
329
|
+
zk-agent payment serve --public-origin <https-url>
|
|
330
|
+
zk-agent payment verify-preview --url <https-url>
|
|
331
|
+
```
|
|
332
|
+
|
|
216
333
|
For the shortest product demo narrative behind that path, use
|
|
217
334
|
[`docs/20-agent-pay-demo-narrative.md`](../../docs/20-agent-pay-demo-narrative.md).
|
|
218
335
|
|
|
@@ -496,7 +613,8 @@ Current `suite` catalog categories:
|
|
|
496
613
|
Current `suite` handoff surfaces:
|
|
497
614
|
|
|
498
615
|
- `workflow`: flagship pay, approval-based pay, and funding recovery
|
|
499
|
-
- `payment`: request capture, follow-up, sharing, export,
|
|
616
|
+
- `payment`: request capture, follow-up, sharing, export, approval repair,
|
|
617
|
+
and hosted preview
|
|
500
618
|
- `discovery`: assets/defaults/token inspection
|
|
501
619
|
- `relay`: hosted approval recovery
|
|
502
620
|
|
|
@@ -504,6 +622,7 @@ Current `suite` product journeys:
|
|
|
504
622
|
|
|
505
623
|
- `send value now`
|
|
506
624
|
- `capture and track payments`
|
|
625
|
+
- `host current Agent Pay preview`
|
|
507
626
|
- `inspect before acting`
|
|
508
627
|
- `unstick a write`
|
|
509
628
|
- `recover remote approval`
|
|
@@ -523,7 +642,7 @@ Inside `suite`, the shortest way to think about Agent Pay is:
|
|
|
523
642
|
- `feed`: export the stable cross-request batch view
|
|
524
643
|
|
|
525
644
|
The shortest tracked route inside `suite` remains:
|
|
526
|
-
`submit -> next -> approval -> workspace -> handoff -> feed`.
|
|
645
|
+
`submit -> payment next -> approval -> workspace -> handoff -> feed`.
|
|
527
646
|
|
|
528
647
|
For the clearest Agent Pay proof path inside `suite`, follow:
|
|
529
648
|
|