zas-agent 0.3.0 → 0.4.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/CHANGELOG.md +26 -0
- package/README.md +27 -9
- package/dist/cli.js +1415 -484
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.4.0] - 2026-09-03
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `zas_send_direct` sends a file through Directo: a live, device-to-device
|
|
15
|
+
transfer into a channel in Directo mode. Nothing is stored. The agent
|
|
16
|
+
offers, the owner presses Receive on another device within ten minutes,
|
|
17
|
+
and the bytes travel encrypted over WebRTC. The call returns the result,
|
|
18
|
+
or a job id after a minute; `zas_jobs` follows the phases `offer`,
|
|
19
|
+
`connecting`, `flight`, `finishing`.
|
|
20
|
+
- `zas_send_direct_fallback` delivers the file of a Directo send that
|
|
21
|
+
failed in flight through reliable delivery: encrypted on this machine,
|
|
22
|
+
stored in Cloudflare R2 for up to 24 hours, off the owner's quota. It is
|
|
23
|
+
the owner's choice; the tool description tells the model to ask.
|
|
24
|
+
- A native dependency: `node-datachannel`, WebRTC for Node. npm installs a
|
|
25
|
+
prebuilt binary; the module loads the first time `zas_send_direct` runs,
|
|
26
|
+
and a machine where it cannot load answers `webrtc_unavailable`.
|
|
27
|
+
- New error codes: `not_claimed`, `direct_cancelled`, `direct_failed`,
|
|
28
|
+
`direct_not_failed`, `file_changed`, `webrtc_unavailable`,
|
|
29
|
+
`fallback_unavailable`.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- `zas_status` says `send (Directo)` for a channel in Directo mode, where it
|
|
34
|
+
said nothing. `zas_send_file` still refuses such a channel.
|
|
35
|
+
|
|
10
36
|
## [0.3.0] - 2026-09-03
|
|
11
37
|
|
|
12
38
|
### Added
|
package/README.md
CHANGED
|
@@ -25,8 +25,9 @@ scope to the channels you choose, and that you can revoke.
|
|
|
25
25
|
|
|
26
26
|
## What it does
|
|
27
27
|
|
|
28
|
-
Your coding agent gets
|
|
29
|
-
you picked, list what is in that channel,
|
|
28
|
+
Your coding agent gets nine tools. It can send a file or a note into a channel
|
|
29
|
+
you picked, send a file live through Directo, list what is in that channel,
|
|
30
|
+
and pull one item back onto disk.
|
|
30
31
|
Everything it sends is encrypted on your machine before it leaves, lands in your
|
|
31
32
|
account, and is marked in the channel as sent by that agent. The agent has an
|
|
32
33
|
identity of its own and never holds your account key: pairing mints a key pair
|
|
@@ -147,8 +148,11 @@ ones marked *(server-side)* are enforced by the Zas server.
|
|
|
147
148
|
*(server-side)*.
|
|
148
149
|
- **No reading unless the grant says so.** `read` is a separate switch from
|
|
149
150
|
`send`; without it, `zas_list_items` and `zas_get_item` are refused.
|
|
150
|
-
- **No sending into a view-only channel, and none into a channel in
|
|
151
|
-
mode.** Both are refused before a byte is uploaded.
|
|
151
|
+
- **No stored sending into a view-only channel, and none into a channel in
|
|
152
|
+
Directo mode.** Both are refused before a byte is uploaded. A channel in
|
|
153
|
+
Directo mode takes `zas_send_direct`, a live transfer that stores nothing.
|
|
154
|
+
- **No receiving.** The agent sends through Directo; it never claims an
|
|
155
|
+
offer, so nothing can be pushed onto this machine through it.
|
|
152
156
|
- **Nothing outside its allowlist.** The API refuses an agent on every route
|
|
153
157
|
that is not on a short, explicit list, and Firestore rules refuse it your
|
|
154
158
|
account document, your devices, and any channel without an active read grant
|
|
@@ -177,6 +181,13 @@ string ever reaches a terminal.
|
|
|
177
181
|
| `read_forbidden` | This agent cannot read that channel. |
|
|
178
182
|
| `direct_mode` | That channel is in Directo mode. |
|
|
179
183
|
| `not_direct_mode` | That channel is not in Directo mode. |
|
|
184
|
+
| `not_claimed` | Nobody received the file within ten minutes; the offer was withdrawn. |
|
|
185
|
+
| `direct_cancelled` | The offer was cancelled from the receiving side. |
|
|
186
|
+
| `direct_failed` | The Directo transfer failed in flight. |
|
|
187
|
+
| `direct_not_failed` | That job is not a Directo send that failed in flight. |
|
|
188
|
+
| `file_changed` | The file changed since the Directo offer. |
|
|
189
|
+
| `webrtc_unavailable` | The WebRTC engine could not be loaded on this machine. |
|
|
190
|
+
| `fallback_unavailable` | Reliable delivery is not available right now. |
|
|
180
191
|
| `key_stale` | The channel key changed; the owner refreshes it by opening Zas. |
|
|
181
192
|
| `quota_exceeded` | The account reached its storage limit. |
|
|
182
193
|
| `rate_limited` | Too many sends in a row. |
|
|
@@ -207,18 +218,25 @@ stack trace.
|
|
|
207
218
|
| `zas_pair` | Pairs this agent with a Zas account. The first call returns a URL for the owner to open; a later call says whether they approved. If the page shows a code, a call with `code` claims with it. In a profile that is already paired, approval replaces the old agent. |
|
|
208
219
|
| `zas_send_file` | Sends a file from this machine into one of the owner's channels. Returns the item id, or a job id when the upload takes longer than a minute. |
|
|
209
220
|
| `zas_send_note` | Sends a note — plain text, or a code snippet with its language — into one of the owner's channels. |
|
|
221
|
+
| `zas_send_direct` | Sends a file through Directo: a live, device-to-device transfer into a channel in Directo mode. Nothing is stored. The owner presses Receive on another device within ten minutes; the call returns the result, or a job id after a minute. |
|
|
222
|
+
| `zas_send_direct_fallback` | After a Directo send failed in flight, delivers the same file through reliable delivery: encrypted on this machine, stored in Cloudflare R2 for up to 24 hours, off the owner's quota. The owner's choice; the model is told to ask. |
|
|
210
223
|
| `zas_list_items` | Lists the most recent items in one of the owner's channels. Needs a grant that includes reading. |
|
|
211
224
|
| `zas_get_item` | Fetches one item. A note comes back as text; a file is written to disk. It never overwrites, so the path it answers with can differ from the one you asked for. |
|
|
212
|
-
| `zas_jobs` | Lists the sends this server started, newest first, with the phase each one reached — and where a `job_id` from a long send is redeemed. |
|
|
225
|
+
| `zas_jobs` | Lists the sends and Directo transfers this server started, newest first, with the phase each one reached — and where a `job_id` from a long send is redeemed. |
|
|
213
226
|
|
|
214
227
|
`channel` takes a channel name or a channel id. A name has to match exactly one
|
|
215
|
-
of the channels you granted; with exactly one grant, `zas_send_file
|
|
216
|
-
`zas_send_note` can leave it out.
|
|
228
|
+
of the channels you granted; with exactly one grant, `zas_send_file`,
|
|
229
|
+
`zas_send_note` and `zas_send_direct` can leave it out.
|
|
230
|
+
|
|
231
|
+
Directo needs a native module, [node-datachannel](https://github.com/murat-dogan/node-datachannel),
|
|
232
|
+
WebRTC for Node. npm installs a prebuilt binary for Windows, macOS and Linux;
|
|
233
|
+
the module loads the first time `zas_send_direct` runs, and a machine where it
|
|
234
|
+
cannot load answers `webrtc_unavailable`. Every other tool works without it.
|
|
217
235
|
|
|
218
236
|
Two things worth knowing before you point a model at your account:
|
|
219
237
|
|
|
220
|
-
- `zas_send_file`
|
|
221
|
-
`.env` included. Confirm with the owner before sending secrets, keys or
|
|
238
|
+
- `zas_send_file` and `zas_send_direct` send any file this process can read —
|
|
239
|
+
`~/.ssh/id_rsa` and a `.env` included. Confirm with the owner before sending secrets, keys or
|
|
222
240
|
credentials. Its tool description says so, so the model reads it too.
|
|
223
241
|
- `zas_get_item` writes a new file under `dest`, or under the system temp
|
|
224
242
|
directory when you leave `dest` out. It never overwrites an existing file: a
|