zk-agent-cli 0.1.0-beta.6 → 0.1.0-beta.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 +89 -4
- package/dist/connector-ui/assets/index-B7BdrG9K.js +40 -0
- package/dist/connector-ui/index.html +1 -1
- package/dist/index.js +1000 -115
- package/package.json +1 -1
- package/dist/connector-ui/assets/index-8Wcy2mMo.js +0 -40
package/README.md
CHANGED
|
@@ -11,7 +11,22 @@ Current strengths:
|
|
|
11
11
|
- workflow orchestration for send, swap, bridge, deposit, and withdraw
|
|
12
12
|
- machine-readable JSON output for agent callers
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Public Entry Points
|
|
15
|
+
|
|
16
|
+
Choose the entrypoint that matches the environment.
|
|
17
|
+
|
|
18
|
+
If you are installing this repository into a compatible agent harness instead
|
|
19
|
+
of using the CLI directly, prefer the repo skill surface:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx skills add https://github.com/AgiWeb3/zk-agent-cli
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
This repo currently ships a repository skill bundle for compatible harnesses.
|
|
26
|
+
It does not yet ship a native ChatGPT/Codex plugin bundle such as
|
|
27
|
+
`.codex-plugin/plugin.json`.
|
|
28
|
+
|
|
29
|
+
For direct terminal use, install the packaged CLI:
|
|
15
30
|
|
|
16
31
|
One-shot execution:
|
|
17
32
|
|
|
@@ -75,12 +90,23 @@ zk-agent next
|
|
|
75
90
|
zk-agent workflow pay --wallet main --to <address> --amount <amount>
|
|
76
91
|
```
|
|
77
92
|
|
|
93
|
+
If the browser is not colocated with the terminal, keep the same flow but
|
|
94
|
+
replace the wallet-creation step with:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
zk-agent relay inspect --relay-url <relay-url>
|
|
98
|
+
zk-agent wallet create --relay-url <relay-url> --wait-relay --prompt-code
|
|
99
|
+
zk-agent next
|
|
100
|
+
```
|
|
101
|
+
|
|
78
102
|
If a wallet already exists, inspect the blocker first. Use `wallet reapprove`
|
|
79
|
-
when approval is missing or expired
|
|
80
|
-
is still present but the local execution
|
|
103
|
+
when approval is missing or expired, then return to `zk-agent next`. Use
|
|
104
|
+
`wallet signer attach` when approval is still present but the local execution
|
|
105
|
+
signer is missing:
|
|
81
106
|
|
|
82
107
|
```bash
|
|
83
108
|
zk-agent wallet reapprove --name main --await-local
|
|
109
|
+
zk-agent next
|
|
84
110
|
zk-agent wallet signer attach --name main --private-key <hex>
|
|
85
111
|
zk-agent next
|
|
86
112
|
```
|
|
@@ -106,6 +132,58 @@ operator baseline.
|
|
|
106
132
|
checkpoint, executes immediately when ready, reopens a missing writable session
|
|
107
133
|
through the intent-scoped approval path, and defaults to the validated
|
|
108
134
|
approval-based paymaster mode unless you override it.
|
|
135
|
+
When that approval-based path still needs a fee-token candidate, recover with
|
|
136
|
+
`zk-agent tokens --chain zksync-sepolia --role paymaster-fee-token` and
|
|
137
|
+
`zk-agent resolve-token --chain zksync-sepolia --symbol <symbol> --role paymaster-fee-token`.
|
|
138
|
+
|
|
139
|
+
## Discovery Path
|
|
140
|
+
|
|
141
|
+
Use the discovery surfaces in this order when a workflow or direct command
|
|
142
|
+
needs token context:
|
|
143
|
+
|
|
144
|
+
- `zk-agent assets --wallet main` for the preferred single-chain asset view
|
|
145
|
+
- `zk-agent tokens --wallet main --owned` for the narrower owned ERC-20 subset
|
|
146
|
+
- `zk-agent tokens --chain zksync-sepolia` and
|
|
147
|
+
`zk-agent resolve-token --chain zksync-sepolia --symbol USDC` for
|
|
148
|
+
symbol-first discovery before choosing an explicit token address
|
|
149
|
+
- `zk-agent tokens --chain zksync-sepolia --role paymaster-fee-token` and
|
|
150
|
+
`zk-agent resolve-token --chain zksync-sepolia --symbol <symbol> --role paymaster-fee-token`
|
|
151
|
+
for approval-based paymaster fee-token discovery on the flagship pay path
|
|
152
|
+
- `zk-agent defaults` for the machine-readable registry/defaults catalog:
|
|
153
|
+
tracked token roles, paymaster metadata, source order, and validated/fallback
|
|
154
|
+
route metadata
|
|
155
|
+
|
|
156
|
+
## Direct Command Escape Hatches
|
|
157
|
+
|
|
158
|
+
Use the guided workflow layer first, but the lower-level direct commands now
|
|
159
|
+
keep the same symbol/discovery contract:
|
|
160
|
+
|
|
161
|
+
- `zk-agent send-token --wallet main --symbol USDC --to <address> --amount <amount>`
|
|
162
|
+
- `zk-agent swap --wallet main --token-in-symbol USDC --token-out-symbol ETH --amount-in <amount>`
|
|
163
|
+
- `zk-agent fund --wallet main --symbol USDC --amount <amount>`
|
|
164
|
+
- `zk-agent deposit --wallet main --symbol USDC --amount <amount>`
|
|
165
|
+
- `zk-agent withdraw --wallet main --symbol USDC --amount <amount>`
|
|
166
|
+
|
|
167
|
+
Current direct-command behavior:
|
|
168
|
+
|
|
169
|
+
- `send-token`, `fund`, `deposit`, and `withdraw` accept symbol-first token
|
|
170
|
+
resolution when the local registry can resolve the active chain token
|
|
171
|
+
- `swap` follows the current registry-backed validated route by default when
|
|
172
|
+
`--protocol` is omitted
|
|
173
|
+
- `bridge` can reuse the tracked default destination route when one is already
|
|
174
|
+
known for the current wallet chain
|
|
175
|
+
|
|
176
|
+
## Local Agent Identity
|
|
177
|
+
|
|
178
|
+
The local operator profile is optional. It helps agent harnesses and operators
|
|
179
|
+
persist stable metadata, but wallet approval and workflow execution do not
|
|
180
|
+
depend on it.
|
|
181
|
+
|
|
182
|
+
Use:
|
|
183
|
+
|
|
184
|
+
- `zk-agent agent status`
|
|
185
|
+
- `zk-agent agent set --name "<operator-name>" --wallet main`
|
|
186
|
+
- `zk-agent agent show`
|
|
109
187
|
|
|
110
188
|
## Remote Approval
|
|
111
189
|
|
|
@@ -122,11 +200,15 @@ If the wallet already exists and approval metadata needs to be refreshed, use:
|
|
|
122
200
|
zk-agent wallet reapprove --name main --relay-url <relay-url> --wait-relay --prompt-code
|
|
123
201
|
```
|
|
124
202
|
|
|
203
|
+
Treat that hosted path as the fallback when the browser is not colocated with
|
|
204
|
+
the terminal; keep the local `--await-local` path as the default baseline.
|
|
205
|
+
|
|
125
206
|
If approval is still present and only the local execution signer is missing,
|
|
126
207
|
repair that locally instead of forcing a new approval round-trip:
|
|
127
208
|
|
|
128
209
|
```bash
|
|
129
210
|
zk-agent wallet signer attach --name main --private-key <hex>
|
|
211
|
+
zk-agent next
|
|
130
212
|
```
|
|
131
213
|
|
|
132
214
|
Local relay prototype path:
|
|
@@ -143,7 +225,10 @@ reverse proxy, pass `--public-origin` so the emitted share/status URLs point at
|
|
|
143
225
|
the externally reachable hosted URL instead of the local bind address. The
|
|
144
226
|
published package now also ships the bundled connector UI build used by
|
|
145
227
|
`relay serve`, so hosted share-link approval no longer depends on a separate
|
|
146
|
-
source checkout just to serve the UI.
|
|
228
|
+
source checkout just to serve the UI. `relay inspect` now also reports
|
|
229
|
+
`stateBackend`, `deploymentScope`, and `sameHostRestartPersists` so the
|
|
230
|
+
single-host local-filesystem constraint is explicit before you rely on a hosted
|
|
231
|
+
URL.
|
|
147
232
|
|
|
148
233
|
## Local Storage
|
|
149
234
|
|