@agentcomms/events-daemon 0.24.0 → 0.26.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 CHANGED
@@ -154,8 +154,30 @@ Two kinds of judge are available:
154
154
  as Jev. A server that answers in its own JSON says where its number is, with `"protocol": "json-score"` and a
155
155
  `scorePointer`, and that number is labelled an uncalibrated score. Nothing leaves this machine.
156
156
 
157
- The third kind, **`laya`**, runs the Laya model inside the daemon. It is not available yet: `agent-events judge kinds
158
- list` shows it as unavailable, and a judge naming it is refused.
157
+ The third kind, **`laya`**, will run the Laya model on this machine, in an isolated worker. This release does not offer
158
+ it yet: a release offers Laya only once its exact runtime, model and prompt template have passed the owner's labelled
159
+ quality gate on real Gmail and Slack messages, and its worker boundary has been proved on a real Mac. Neither has run
160
+ yet, so this release ships no reviewed runtime lock. `agent-events judge kinds list` and
161
+ `agent-events judge model status` show Laya as unavailable with the reason `E2_EXTERNAL_REFERENCE_BLOCKED`,
162
+ and `agent-events judge kind enable laya` refuses before anything is prepared. You can still add a Laya judge, and a
163
+ rule that names it: both are configuration, and a Laya judge answers only once you have enabled Laya and its model is
164
+ ready. Until then `rule enable` refuses that rule with Laya's reason: in this release that is
165
+ `E2_EXTERNAL_REFERENCE_BLOCKED` on every platform; once a release offers Laya, it is `LAYA_PLATFORM_UNAVAILABLE` on
166
+ Linux and Windows and to a daemon Rosetta translates on an Apple-silicon Mac, and `LAYA_SANDBOX_UNAVAILABLE` on a Mac
167
+ whose sandbox does not apply.
168
+ The first release that offers it will offer it on macOS only, with one prompt template, `laya-noul-v1`: English only, a
169
+ 512-token context, on the CPU, one call at a time, in a worker whose `sandbox-exec` profile lets it open no network
170
+ connection (Unix-domain sockets included), start no other process, send no Apple event, look up no system service and
171
+ write nowhere but its own temporary folder, so the worker has no way of its own to send what a rule asks it anywhere.
172
+ Each worker proves, before it loads anything, that a connection and a process start are refused. Linux and Windows
173
+ show Laya as not available. Once you enable it there,
174
+ the daemon downloads the runtime (about 300 MB) and the model (about 1.69 GB) — ordinary network traffic, and the only
175
+ network traffic Laya has — and checks every file against the release's lock and manifest before each start.
176
+ `judge model status` then reports the runtime and model installation (`idle`, `installing`, `downloading`, `verifying`,
177
+ `ready`, `failed` or `unavailable`), its byte progress and any failure or unavailable reason;
178
+ `judge kind disable laya` cancels a download and keeps the verified files; `judge model remove` deletes every verified
179
+ runtime and model, only while Laya is disabled; and once a newly approved entry's model is ready, the daemon deletes the
180
+ files of every entry it replaced.
159
181
 
160
182
  **Every judge kind is off until you enable it, at your terminal.** Installing, updating, a rule or a budget never
161
183
  turns one on. Turning a kind off also cancels any pending global enablement that captured a rule of that kind. Removing
@@ -242,6 +264,25 @@ is the judge document exactly as you added it:
242
264
  A local judge has `"kind": "local-endpoint"`, your server's `provider`, `model` and `endpoint`, and that endpoint's
243
265
  address in `"approvedAddressSet": ["127.0.0.1"]`. It needs no key.
244
266
 
267
+ A Laya judge names the Laya provider, this release's reviewed model as `model` (the `manifestId` that
268
+ `judge model status` shows) and the yes/no template `laya-noul-v1`. It needs no key and no endpoint:
269
+
270
+ ```json
271
+ {
272
+ "judgeId": "laya",
273
+ "version": 1,
274
+ "kind": "laya",
275
+ "provider": "laya",
276
+ "model": "laya-en-onnx-68f27dfe",
277
+ "promptTemplate": "laya-noul-v1"
278
+ }
279
+ ```
280
+
281
+ It runs on this Mac, in English only, with a 512-token context, on the CPU and one call at a time, and the approval
282
+ view of a rule that names it says so. Another model is refused (`LAYA_MANIFEST_NOT_REVIEWED`), and so is the two-option
283
+ template `laya-choice2-v1` (`LAYA_TEMPLATE_BLOCKED`) until where its answer comes from has been reviewed. A budget's
284
+ `laya` provider entry allows at most one call at a time.
285
+
245
286
  **What a judge sees, and what it decides:**
246
287
  - Only the fields in `inputs`, sanitised and marked as untrusted inside a fixed prompt. The rule's `condition` must
247
288
  check a content field too (`/subject` above), so a judge is never asked about every event.
@@ -266,7 +307,8 @@ name its judges stay, but cannot call them; turning the kind back on needs a new
266
307
  along with everything else.
267
308
 
268
309
  `doctor` shows each kind's state, the active budget version and its reservations, how many decisions are held and
269
- when the next one expires, any hosted judge whose key is missing, and Laya as not available yet, all without content.
310
+ when the next one expires, any hosted judge whose key is missing, and Laya's runtime, model and sandbox-boundary state
311
+ with its reason, all without content.
270
312
 
271
313
  ## For desktop and tool builders
272
314
 
@@ -275,8 +317,29 @@ The data-only control contract is
275
317
  request, result and error vectors are in [`test/fixtures/b3-control-contract-v1`](test/fixtures/b3-control-contract-v1),
276
318
  and the terminal approval-preview vectors are in [`test/fixtures/b3-approval-preview-v1`](test/fixtures/b3-approval-preview-v1).
277
319
  It covers every B3 capability a desktop app may call, and never contains a secret value. Its frozen doctor result is
278
- the closed [`doctor-v1.schema.json`](src/operations/contracts/doctor-v1.schema.json); the released daemon reports the
279
- additive Phase-E [`doctor-v2.schema.json`](src/operations/contracts/doctor-v2.schema.json).
320
+ the closed [`doctor-v1.schema.json`](src/operations/contracts/doctor-v1.schema.json), and Phase E's
321
+ [`doctor-v2.schema.json`](src/operations/contracts/doctor-v2.schema.json) stays as it was. The released daemon reports
322
+ [`doctor-v3.schema.json`](src/operations/contracts/doctor-v3.schema.json), which keeps every v2 property, has no judge
323
+ kind left behind a phase boundary, and adds Laya's content-free `judge.laya` entry.
324
+
325
+ [`b3-control-v2.schema.json`](src/operations/contracts/b3-control-v2.schema.json) is v1 with the real Laya answers: it
326
+ replaces exactly the six results that carried v1's typed `E2_REQUIRED` placeholder (`judgeKindsList`,
327
+ `enableJudgeKind`, `disableJudgeKind`, `judgeModelStatus`, `removeJudgeModel` and `doctor`); its vectors are in
328
+ [`test/fixtures/b3-control-contract-v2`](test/fixtures/b3-control-contract-v2). `judge model status` and
329
+ `judge model remove` answer the stable
330
+ [`laya-model-status-v1.schema.json`](src/operations/contracts/laya-model-status-v1.schema.json): eight closed fields —
331
+ the state, the reviewed manifest id and runtime-lock digest, `bytesVerified` of `totalBytes`, a failure code, an
332
+ unavailable reason and the last update time — and never a path, input, request, response, key or token.
333
+
334
+ [`b3-control-v3.schema.json`](src/operations/contracts/b3-control-v3.schema.json) is v2 with a Laya judge variant: a
335
+ Laya judge document is exactly `judgeId`, `version`, `kind` and `provider` `laya`, the reviewed manifest id as `model`
336
+ and `promptTemplate` `laya-noul-v1`, and v3 accepts one in `judge add` and `judge update` and in the rule documents of
337
+ `rule create`, `rule update` and `rule test`. It replaces the results of `judgesList`, `addJudge`, `updateJudge`,
338
+ `rule-create` and `rule-update`, and the approval view of a rule that names a Laya judge adds `layaJudge`: its template,
339
+ manifest id and D11's limits, and no input text. A refusal is `BAD_DATA` with one of five closed reasons in
340
+ `details.reason`, named in its message too. Its vectors are in
341
+ [`test/fixtures/b3-control-contract-v3`](test/fixtures/b3-control-contract-v3). An owner without E2's artifact manager
342
+ still answers v1.
280
343
 
281
344
  ## Licence
282
345