zk-agent-cli 0.1.0-beta.7 → 0.1.0-beta.9

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 +82 -2
  2. package/dist/index.js +1291 -80
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -11,7 +11,23 @@ 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
- ## Install
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
+ The repository root now also ships a native ChatGPT/Codex plugin manifest at
27
+ `.codex-plugin/plugin.json`, but that plugin source belongs to the repository
28
+ surface rather than this published npm tarball.
29
+
30
+ For direct terminal use, install the packaged CLI:
15
31
 
16
32
  One-shot execution:
17
33
 
@@ -75,6 +91,15 @@ zk-agent next
75
91
  zk-agent workflow pay --wallet main --to <address> --amount <amount>
76
92
  ```
77
93
 
94
+ If the browser is not colocated with the terminal, keep the same flow but
95
+ replace the wallet-creation step with:
96
+
97
+ ```bash
98
+ zk-agent relay inspect --relay-url <relay-url>
99
+ zk-agent wallet create --relay-url <relay-url> --wait-relay --prompt-code
100
+ zk-agent next
101
+ ```
102
+
78
103
  If a wallet already exists, inspect the blocker first. Use `wallet reapprove`
79
104
  when approval is missing or expired, then return to `zk-agent next`. Use
80
105
  `wallet signer attach` when approval is still present but the local execution
@@ -108,6 +133,58 @@ operator baseline.
108
133
  checkpoint, executes immediately when ready, reopens a missing writable session
109
134
  through the intent-scoped approval path, and defaults to the validated
110
135
  approval-based paymaster mode unless you override it.
136
+ When that approval-based path still needs a fee-token candidate, recover with
137
+ `zk-agent tokens --chain zksync-sepolia --role paymaster-fee-token` and
138
+ `zk-agent resolve-token --chain zksync-sepolia --symbol <symbol> --role paymaster-fee-token`.
139
+
140
+ ## Discovery Path
141
+
142
+ Use the discovery surfaces in this order when a workflow or direct command
143
+ needs token context:
144
+
145
+ - `zk-agent assets --wallet main` for the preferred single-chain asset view
146
+ - `zk-agent tokens --wallet main --owned` for the narrower owned ERC-20 subset
147
+ - `zk-agent tokens --chain zksync-sepolia` and
148
+ `zk-agent resolve-token --chain zksync-sepolia --symbol USDC` for
149
+ symbol-first discovery before choosing an explicit token address
150
+ - `zk-agent tokens --chain zksync-sepolia --role paymaster-fee-token` and
151
+ `zk-agent resolve-token --chain zksync-sepolia --symbol <symbol> --role paymaster-fee-token`
152
+ for approval-based paymaster fee-token discovery on the flagship pay path
153
+ - `zk-agent defaults` for the machine-readable registry/defaults catalog:
154
+ tracked token roles, paymaster metadata, source order, and validated/fallback
155
+ route metadata
156
+
157
+ ## Direct Command Escape Hatches
158
+
159
+ Use the guided workflow layer first, but the lower-level direct commands now
160
+ keep the same symbol/discovery contract:
161
+
162
+ - `zk-agent send-token --wallet main --symbol USDC --to <address> --amount <amount>`
163
+ - `zk-agent swap --wallet main --token-in-symbol USDC --token-out-symbol ETH --amount-in <amount>`
164
+ - `zk-agent fund --wallet main --symbol USDC --amount <amount>`
165
+ - `zk-agent deposit --wallet main --symbol USDC --amount <amount>`
166
+ - `zk-agent withdraw --wallet main --symbol USDC --amount <amount>`
167
+
168
+ Current direct-command behavior:
169
+
170
+ - `send-token`, `fund`, `deposit`, and `withdraw` accept symbol-first token
171
+ resolution when the local registry can resolve the active chain token
172
+ - `swap` follows the current registry-backed validated route by default when
173
+ `--protocol` is omitted
174
+ - `bridge` can reuse the tracked default destination route when one is already
175
+ known for the current wallet chain
176
+
177
+ ## Local Agent Identity
178
+
179
+ The local operator profile is optional. It helps agent harnesses and operators
180
+ persist stable metadata, but wallet approval and workflow execution do not
181
+ depend on it.
182
+
183
+ Use:
184
+
185
+ - `zk-agent agent status`
186
+ - `zk-agent agent set --name "<operator-name>" --wallet main`
187
+ - `zk-agent agent show`
111
188
 
112
189
  ## Remote Approval
113
190
 
@@ -149,7 +226,10 @@ reverse proxy, pass `--public-origin` so the emitted share/status URLs point at
149
226
  the externally reachable hosted URL instead of the local bind address. The
150
227
  published package now also ships the bundled connector UI build used by
151
228
  `relay serve`, so hosted share-link approval no longer depends on a separate
152
- source checkout just to serve the UI.
229
+ source checkout just to serve the UI. `relay inspect` now also reports
230
+ `stateBackend`, `deploymentScope`, and `sameHostRestartPersists` so the
231
+ single-host local-filesystem constraint is explicit before you rely on a hosted
232
+ URL.
153
233
 
154
234
  ## Local Storage
155
235