zas-agent 0.5.1 → 0.6.1

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 CHANGED
@@ -7,6 +7,50 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.1] - 2026-09-04
11
+
12
+ ### Added
13
+
14
+ - A Directo run now answers with the engine's own account of itself, not
15
+ only with one word. `zas_send_direct`, `zas_receive_direct` and `zas_jobs`
16
+ carry the candidate counts by type for both ends, the ICE and gathering
17
+ states, how many TURN URLs were supplied against how many the connection
18
+ kept, the selected pair, the restarts, and a timestamped trace of the
19
+ session: every candidate as it arrived, the state changes, and the verdict.
20
+ Types, transports and timings only — never an address, a port, a host name
21
+ or a credential. A run that fails on a machine you are not sitting at can
22
+ now be diagnosed from the tool result.
23
+ - The thrown error behind a failure is kept as `detail`. The reason stays a
24
+ closed word for grouping; `detail` is the sentence the exception carried,
25
+ which every failure used to discard at the catch.
26
+
27
+ ### Fixed
28
+
29
+ - The receiver pre-gathers a candidate pool. An agent hands its whole
30
+ candidate set over at once, so the far end could start checking before its
31
+ own relay candidates existed, connect on the first pair it found, and be
32
+ left with nothing when that pair died seconds later.
33
+ - The transport of a candidate is read whichever way the peer wrote the line.
34
+ This package prefixes the SDP attribute, so its candidates used to be
35
+ reported with an unknown transport.
36
+
37
+ ## [0.6.0] - 2026-09-03
38
+
39
+ ### Added
40
+
41
+ - Usage reporting, so a defect like 0.5.0's — a release that could not
42
+ receive a file at all — is visible without somebody writing in. One report
43
+ after each tool call: the tool, whether it worked, the closed error code
44
+ when it did not, a duration bucket and the version. Never a file name, a
45
+ path, a channel name, a message or a stack. It goes to Zas, not to an
46
+ analytics service: this package holds no analytics token and opens no
47
+ connection to a third party.
48
+ - `zas-agent telemetry [on|off]`, `ZAS_AGENT_TELEMETRY` and `DO_NOT_TRACK`.
49
+ Reporting is on by default; `pair` prints what it collects before it opens
50
+ a browser, the first `serve` on a machine prints it once, and `zas_status`
51
+ always says which way it is set. The choice lives in
52
+ `~/.zas/agent/settings.json` and survives pairing again.
53
+
10
54
  ## [0.5.1] - 2026-09-03
11
55
 
12
56
  ### Fixed
@@ -139,7 +183,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
139
183
  two separate identities that cannot read each other's keys.
140
184
  - Install snippets for Claude Code and Codex, printed by `zas-agent pair`.
141
185
 
142
- [Unreleased]: https://github.com/soke1556/zas-agent/compare/v0.3.0...HEAD
186
+ [Unreleased]: https://github.com/soke1556/zas-agent/compare/v0.6.1...HEAD
187
+ [0.6.1]: https://github.com/soke1556/zas-agent/compare/v0.6.0...v0.6.1
188
+ [0.6.0]: https://github.com/soke1556/zas-agent/compare/v0.5.1...v0.6.0
189
+ [0.5.1]: https://github.com/soke1556/zas-agent/compare/v0.5.0...v0.5.1
190
+ [0.5.0]: https://github.com/soke1556/zas-agent/compare/v0.4.0...v0.5.0
191
+ [0.4.0]: https://github.com/soke1556/zas-agent/compare/v0.3.0...v0.4.0
143
192
  [0.3.0]: https://github.com/soke1556/zas-agent/compare/v0.2.1...v0.3.0
144
193
  [0.2.1]: https://github.com/soke1556/zas-agent/compare/v0.2.0...v0.2.1
145
194
  [0.2.0]: https://github.com/soke1556/zas-agent/compare/v0.1.1...v0.2.0
package/README.md CHANGED
@@ -252,6 +252,36 @@ Two things worth knowing before you point a model at your account:
252
252
  Everything those tools touch lands inside your own account and your own
253
253
  machine. Revoking the agent stops all of them.
254
254
 
255
+ ## What it sends back
256
+
257
+ This package reports how it is used, so defects like a release that could not
258
+ receive a file at all stop being invisible. It is on by default and it is
259
+ yours to turn off:
260
+
261
+ ```bash
262
+ npx -y zas-agent telemetry off # and `on` again, and `telemetry` to see
263
+ ```
264
+
265
+ `ZAS_AGENT_TELEMETRY=0` and the cross-vendor `DO_NOT_TRACK=1` do the same
266
+ without writing anything. The choice lives in `~/.zas/agent/settings.json` and
267
+ covers every profile on the machine; pairing again does not reset it.
268
+ `zas_status` always says which way it is set.
269
+
270
+ What one report carries, and nothing else: the tool that ran, whether it
271
+ worked, the closed error code when it did not, which of four duration buckets
272
+ it fell in, and the package version. No file name, no file contents, no path,
273
+ no channel name, no error message, no stack.
274
+
275
+ Where it goes: to Zas, never to an analytics service directly. This package
276
+ holds no analytics token and opens no connection to a third party, so no
277
+ address of yours reaches one. The report is attributed to the Zas account the
278
+ agent is paired with, which the server reads from the session — the request
279
+ carries no identifier of its own. Nothing is reported before pairing, because
280
+ until then there is no account it could belong to.
281
+
282
+ A report is never allowed to matter: it is sent after the answer, waited on
283
+ for at most five seconds, tried once, and dropped in silence if it fails.
284
+
255
285
  ## Data on disk
256
286
 
257
287
  One directory per profile, so one machine can hold a Claude Code agent and a
@@ -262,8 +292,8 @@ Codex agent side by side without either reading the other's keys:
262
292
  | macOS, Linux | `~/.zas/agent/<profile>/` |
263
293
  | Windows | `%USERPROFILE%\.zas\agent\<profile>\` |
264
294
 
265
- Four files, all written through a temporary file and renamed into place, so a
266
- crash mid-write cannot leave half a file behind:
295
+ Four files in the profile directory, all written through a temporary file and
296
+ renamed into place, so a crash mid-write cannot leave half a file behind:
267
297
 
268
298
  - `identity.json` — the agent uid, the owner uid, the name, and the two key
269
299
  pairs. Back it up like a private key, or delete it and pair again.
@@ -276,6 +306,12 @@ crash mid-write cannot leave half a file behind:
276
306
  ten minutes, so a retried tool call answers without touching the network. It
277
307
  stores hashes, never a title or a note's first line. Disposable.
278
308
 
309
+ One more file sits next to the profiles, in `~/.zas/agent/`:
310
+
311
+ - `settings.json` — whether this machine reports usage, and when the notice
312
+ above was last printed. It belongs to the machine, not to a profile, so one
313
+ decision covers every agent on it.
314
+
279
315
  On macOS and Linux the directory is created `0700` and every file `0600`. On
280
316
  Windows those bits have no effect: the files carry the permissions of the user
281
317
  profile they live in, and the package does not try to set any others.
@@ -306,6 +342,8 @@ agent: same keys, same channels, one row.
306
342
  | --- | --- | --- |
307
343
  | `--profile <name>` | `claude-code` | Which identity directory this process uses. Letters, digits, `.`, `_` and `-`, up to 64, and it may not start with a dot. |
308
344
  | `ZAS_AGENT_HOME` | `~/.zas/agent` | Where the profile directories live. |
345
+ | `ZAS_AGENT_TELEMETRY` | unset | `0` turns usage reporting off for this process, `1` on. It outranks the stored choice. |
346
+ | `DO_NOT_TRACK` | unset | `1` turns usage reporting off. Read only to turn it off. |
309
347
  | `ZAS_WEB_BASE` | `https://zas.red` | The web app the pairing URL points at. |
310
348
  | `ZAS_API_BASE` | `https://zas.red/api` | The API. |
311
349
  | `ZAS_TOKEN_BASE` | `https://zas.red/anon-token` | The challenge and token routes. |
@@ -313,7 +351,8 @@ agent: same keys, same channels, one row.
313
351
  | `ZAS_FIREBASE_PROJECT` | `zas-me` | The project whose Firestore the read path queries. |
314
352
  | `ZAS_FIREBASE_API_KEY` | the public web key | The key used to exchange a custom token for a session. |
315
353
 
316
- Only `--profile` and `ZAS_AGENT_HOME` are worth setting by hand. The rest exist
354
+ Only `--profile`, `ZAS_AGENT_HOME` and the two telemetry switches are worth
355
+ setting by hand. The rest exist
317
356
  so the package can be pointed at a test deployment.
318
357
 
319
358
  ## Development