@ai-ecoverse/slicc 1.56.0 → 1.57.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.
Files changed (2) hide show
  1. package/README.md +81 -1
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -16,6 +16,7 @@
16
16
  | `slicc launch` | launch a browser with CDP in a separate SLICC profile and print its CDP URL |
17
17
  | `slicc <join-url> follow [--exit] [--runner …] [--cdp <url>] [--mount <path>]` | follow a seven's tray from another machine and offer its network, compute (over SSH), browsers or folders (`--exit`, `--runner`, `--cdp` and `--mount` work now; see [Remote setup](#remote-setup-slicc-join-url-follow)). `-` or `@<file>` in place of `<join-url>` reads it from stdin or a file, out of sight of `ps` |
18
18
  | `slicc <join-url> prompt <text>`, `watch`, `wait`, `abort` | send a prompt to seven's agent and stream its answer, follow the agent as it works, wait until it has nothing left to do, or abort its run; `--cdp <url>` instead of a join URL links locally (works now; see [Remote control](#remote-control-slicc-prompt-watch-wait-and-abort)) |
19
+ | `slicc <join-url> agents [--watch] [--json]` | list seven's agents, the active cone and its live scoops, with their status, queue and model, once or as they change; `--cdp <url>` instead of a join URL links locally (see [Agent inventory](#agent-inventory-slicc-agents)) |
19
20
  | `slicc <join-url> prompt`, `watch`, `wait`, `abort` inside seven | the same commands from seven's kernel, as `@ai-ecoverse/wasi-slicc` (works now; see [Inside seven](#inside-seven)) |
20
21
  | `slicc tray [url \| rotate \| unlink <device> \| retry]` inside seven | this seven's tray: its state and devices, the join URL on request, rotate it, drop a device, reconnect (see [Inside seven](#inside-seven)) |
21
22
  | `slicc browsers --json` | list running CDP endpoints and installed browsers, ranked |
@@ -340,7 +341,7 @@ slicc capabilities [--json]
340
341
  - **`schema`:** the shape of this document, 1.
341
342
  - **`version`:** the version `slicc --version` prints.
342
343
  - **`contract`:** 1. It goes up only for a breaking change to a contract this document describes: a field or event that changes meaning or goes away. New commands, fields, events and ops leave it alone.
343
- - **`commands`:** every command, keyed by name: `default` for `slicc` with no command, `follow`, `prompt`, `watch`, `wait` and `abort` (also after a join URL), `attach`, `open`, `pair`, `unpair`, `tray`, `browsers`, `launch`, `update`, `install`, `capabilities`, `version` and `help`. `json` says what `--json` prints: `document` (one JSON value), `events` (NDJSON, one event a line) or `none` (no `--json`). An `events` command has `vocabulary`: `events` for lines with `schema` and `event` (see [The default](#the-default-slicc) and [`slicc launch`](#slicc-launch---browser-id---profile-name---url-url---headless---no-seven-flags---json)), or `agent` for seven's agent events with `t` (see [`agent`](#agent-page-cap-agent-node--page)).
344
+ - **`commands`:** every command, keyed by name: `default` for `slicc` with no command, `follow`, `prompt`, `watch`, `wait`, `abort` and `agents` (also after a join URL), `attach`, `open`, `pair`, `unpair`, `tray`, `browsers`, `launch`, `update`, `install`, `capabilities`, `version` and `help`. `json` says what `--json` prints: `document` (one JSON value), `events` (NDJSON, one event a line) or `none` (no `--json`). An `events` command has `vocabulary`: `events` for lines with `schema` and `event` (see [The default](#the-default-slicc) and [`slicc launch`](#slicc-launch---browser-id---profile-name---url-url---headless---no-seven-flags---json)), or `agent` for seven's agent events with `t` (see [`agent`](#agent-page-cap-agent-node--page)).
344
345
  - **`events`:** `schema`, the `schema` every `event` line carries, and `names`, every `event` a `vocabulary: "events"` command can print, sorted.
345
346
  - **`agent`:** `events`, the `t` of every agent event slicc knows, and `own`, the lines slicc itself adds to that stream (`settled`, `opened` and `reconnecting`, see [Remote control](#remote-control-slicc-prompt-watch-wait-and-abort)).
346
347
  - **`control`:** `v`, the version of the [control socket](#running-links-slicc-tray) protocol, and `ops`, the ops it answers.
@@ -1326,6 +1327,38 @@ Otherwise, or with `--plain`, there are no escape codes:
1326
1327
 
1327
1328
  Summaries are one line of at most 200 characters. Escape sequences and control characters other than newline and tab are removed from everything seven sends before it's shown.
1328
1329
 
1330
+ ## Agent inventory: `slicc agents`
1331
+
1332
+ ```
1333
+ slicc <join-url> agents [--watch] [--json]
1334
+ slicc agents --cdp <url> [--origin <origin>]... [--watch] [--json]
1335
+ slicc agents --signal stdio [--watch] [--json]
1336
+ ```
1337
+
1338
+ `slicc agents` lists one seven's agents: the cone its tab shows and that cone's live scoops, each with its status, its queue and its model. It's read-only. It sends nothing to the agent, and nothing it gets carries a prompt, transcript text, a tool's name or output, an agent's name or title, a path, a URL or a credential. Agents' ids are opaque (below), so they don't carry names either.
1339
+
1340
+ - **The link:** as for `watch` (see [Remote control](#remote-control-slicc-prompt-watch-wait-and-abort)): a control-only link (`caps: []`) through the tray or over CDP, the same 1-minute wait for HELLO, and `--signal stdio` as there.
1341
+ - **Permission:** the `agent` cap, as for `watch`. Without it, slicc says `this seven doesn't allow remote control from this device; turn it on in seven's Linked devices` and exits 3.
1342
+ - **A seven that doesn't know it:** slicc says `this seven doesn't report its agents; update it` and exits 1.
1343
+ - **A tab without the agent** (seven still starting, or a follower tab): slicc prints seven's reason, such as `the agent is not running`, and exits 1. With `--watch` it keeps trying, as on a lost stream, and says so before each try: `slicc: <reason>; trying again` on stderr, or with `--json` `{"schema":1,"event":"error","message":"<reason>","retryable":true}` on stdout.
1344
+ - **Without `--watch`:** one snapshot, then exit 0.
1345
+ - **With `--watch`:** a new snapshot each time one comes from seven, until Ctrl-C or `SIGTERM`, then exit 0. Status lines, reconnects and their waits are those of `watch`. Every new stream starts with a whole snapshot, so nothing is resumed.
1346
+ - **Output:** a header line, then one row per agent, the cone first, with the first 8 characters of each id (the whole id is in `--json`), and `provider/model`, or `provider` alone when seven leaves the model out:
1347
+
1348
+ ```
1349
+ seven on sliccy.com: 1 running, 1 waiting, 1 idle (reported 2s ago)
1350
+ ID KIND PARENT STATUS QUEUED MODEL SINCE
1351
+ hR7cZ2mV cone - waiting 0 anthropic/claude-opus-4-6 1m
1352
+ x3Lk9aQe scoop hR7cZ2mV running 1 anthropic/claude-sonnet-4-6 40s
1353
+ T7wPq0zR scoop hR7cZ2mV idle 0 azure 3m
1354
+ ```
1355
+
1356
+ With `--watch` on a terminal the table is redrawn in place. Otherwise each snapshot is printed in full, after a blank line. Everything seven sends is stripped of escape and control characters before it's shown.
1357
+ - **`--json`:** one line per snapshot, `{"schema":1,"event":"inventory",…,"receivedAt"}`, with every field of seven's snapshot (see [`inventory`](#511-agent-page-cap-agent-node--page-remote-control)) and `receivedAt`, when slicc got it (RFC 3339, UTC). With `--watch`, slicc's `{"schema":1,"event":"reconnecting","attempt","retryAt","wait"}` comes before each new try, as on `follow`. Fields seven adds later are passed through. Fixture: [`agents.ndjson`](test/integration/testdata/native/agents.ndjson).
1358
+ - **Stale data:** seven repeats its snapshot at least every 30 s on a `--watch` stream, with a new `reportedAt`, so a snapshot whose `reportedAt` is more than a minute old is stale. `changedAt` and `seq` say when the agents last changed.
1359
+ - **Exit status:** `0` as above; `1` for a seven that doesn't report its agents, for a link or stream that ends before the first snapshot without `--watch`, and when the link can't be set up for good; `2` for bad usage; `3` without permission; `130` on Ctrl-C without `--watch`.
1360
+ - **Inside seven** it isn't available yet (`slicc: agents isn't available inside seven`).
1361
+
1329
1362
  ### `agent` (page cap `agent`), node → page
1330
1363
 
1331
1364
  - **Who may:** the node opens `agent` streams only to a page whose HELLO lists `agent`, and the page refuses them with `EACCES` otherwise.
@@ -1348,6 +1381,8 @@ Summaries are one line of at most 200 characters. Escape sequences and control c
1348
1381
 
1349
1382
  **`abort`:** `OPEN { "kind": "agent", "op": "abort" }`, answered OPENED `{ "aborted": true | false }` (`false` when nothing was running), then END.
1350
1383
 
1384
+ **`inventory`:** `OPEN { "kind": "agent", "op": "inventory", "watch"?: true }`, answered OPENED with a snapshot of the agents (§5.11). Without `watch` the page sends END next. With it, a `{"t":"inventory",…}` line with a whole new snapshot follows each change. A seven that doesn't know the op answers `EINVAL` (from before it) or `EOPNOTSUPP`, and the node treats both as unsupported.
1385
+
1351
1386
  **Events,** one JSON object per line:
1352
1387
 
1353
1388
  | event | meaning |
@@ -1955,6 +1990,51 @@ slicc-node's hostfs ([its README, *Host folders*](https://github.com/ai-ecoverse
1955
1990
  - **Read-only status:** `busy` lines carry only the boolean and `why`. They never carry prompt text, tool arguments or output, and asking for `busy` changes nothing in the agent.
1956
1991
  - **Ordering:** a `run start` never comes before the `busy: true` that covers it, and the `busy: false` comes after the last `run end`.
1957
1992
  - **Computed** from the durable documents' subscriptions (the cone's and its scoops' `pi.live`, `ScoopWorkDoc.feeds` and the licks outbox), and a line goes out only when the value flips.
1993
+ - **`inventory`:** `OPEN { "kind": "agent", "op": "inventory", "watch"?: true }` on its own channel, for `slicc agents` and a native app that shows seven's agents. The page serves it through `remoteControl(connection).inventory()` from `@ai-ecoverse/slicc-agent/page`, which reads slicc-agent's owner-only inventory service.
1994
+ - **OPENED:** one snapshot:
1995
+
1996
+ ```json
1997
+ {
1998
+ "v": 1,
1999
+ "instance": { "id": "pL4vT2nQ8sK1mX6zR0bYcA", "name": "seven on sliccy.com" },
2000
+ "seq": 42,
2001
+ "changedAt": 1767268800000,
2002
+ "reportedAt": 1767268802000,
2003
+ "counts": { "running": 1, "queued": 0, "waiting": 1, "idle": 1, "error": 0 },
2004
+ "agents": [
2005
+ { "id": "hR7cZ2mVq9LwX4eN1sKj0A", "kind": "cone", "status": "waiting", "queued": 0, "provider": "anthropic", "model": "claude-opus-4-6", "since": 1767268740000 },
2006
+ { "id": "x3Lk9aQeV2bN0cR5tY8uWg", "kind": "scoop", "parent": "hR7cZ2mVq9LwX4eN1sKj0A", "status": "running", "queued": 1, "provider": "anthropic", "model": "claude-sonnet-4-6", "since": 1767268760000 }
2007
+ ]
2008
+ }
2009
+ ```
2010
+
2011
+ - **Without `watch`,** the page sends END after OPENED.
2012
+ - **With `watch`,** each new snapshot follows as one DATA line, `{"t":"inventory", …}` with the same fields, until either side resets. Lines are always whole snapshots, never deltas.
2013
+ - A line goes out only when something other than `reportedAt` changed, at most one every 250 ms (the page's throttle), and the latest state is always sent. slicc-agent builds a snapshot from the subscriptions that feed seven's transcript and monitor, and drops one whose content didn't change. It has no timers of its own.
2014
+ - The page repeats the current snapshot at least every 30 s, with the same `seq` and `changedAt` and a new `reportedAt`. Its timer runs only while a `watch` stream is open.
2015
+ - **Fields:**
2016
+ - `v`: 1. A change that breaks a reader gets a new `v`.
2017
+ - `instance.id`: seven's own id, 22 characters of base64url from 16 random bytes, minted once per seven profile by the page and kept in its storage. A new profile, or cleared storage, gets a new id (and new agent ids). It isn't derived from anything about the user, the device or the tray. `instance.name`, when present, is the `name` of seven's HELLO.
2018
+ - `seq`: goes up by one with every new snapshot slicc-agent builds, within one run of seven's agent. It isn't kept: after a reload it starts again at 1. All streams of one seven see the same `seq` for the same snapshot while the agent runs. A `seq` lower than the last one seen means the agent restarted, and a client treats the stream as new.
2019
+ - `changedAt`: when slicc-agent built this snapshot, in ms since the epoch, from the commit that changed it. `reportedAt`: when the page sent this line.
2020
+ - `counts`: the number of agents in each status. They add up to the number of `agents`.
2021
+ - `agents`: the cone, then its live scoops in the order seven lists them.
2022
+ - `id`: an opaque id, 22 characters of base64url, such as `"hR7cZ2mVq9LwX4eN1sKj0A"`. The page makes it from slicc-agent's registry id with HMAC-SHA-256 under a random key it minted for this seven with `instance.id`, keeps in its storage and never sends, and takes the first 16 bytes. So it's the same for an agent across streams, reloads and restarts of that seven, and two sevens never share one. It carries nothing else: not the scoop's folder, which comes from the name the scoop was given, nor whether it's the first cone. Clients compare ids and don't read them.
2023
+ - `kind`: `cone` or `scoop`. `parent`, for a scoop only: the opaque `id` of the agent that started it, the cone or another scoop.
2024
+ - `status`, one of:
2025
+ - `running`: it has a run, retries and approval waits included;
2026
+ - `queued`: no run yet, and at least one input waits for it;
2027
+ - `waiting`: no run and nothing queued, but work it waits for is pending: a scoop `wait` of the cone, a feed to the scoop, or a lick for it held in the agent's outbox (the same signals as `busy`);
2028
+ - `error`: none of those, and its last turn ended in an error;
2029
+ - `idle`: none of those.
2030
+ - `queued`: how many inputs (prompts, follow-ups and licks) wait for it, 0 or more.
2031
+ - `provider` and `model`: pi's `provider` and `modelId` for the agent's conversation, such as `anthropic` and `claude-sonnet-4-6`. `provider`, one of slicc-agent's provider ids, is always sent when the agent has a model. `model` may be absent: slicc-agent sends it only when pi's model catalog has that model for that provider, so a user-named deployment (Azure), a custom inference profile or an ARN is left out. Both are left out when the agent has no model. A change of model is a new snapshot.
2032
+ - `since`: when the agent entered its `status`, in ms since the epoch, as slicc-agent saw it since it started.
2033
+ - **Scope:** the cone the tab's agent shows, the same cone `watch` and `prompt` reach, and that cone's live scoops. Never other cones, frozen cones, other kernels' agents or guest seats. When the tab selects another cone, the next snapshot is that cone's.
2034
+ - **Who may:** the `agent` cap, as for the other ops, and slicc-agent serves the inventory only on its owner seat. View and control seats and guests get none. Asking for it changes nothing in the agent.
2035
+ - **Only the tab that runs the agent answers.** Any other page, a follower tab included, answers `EOPNOTSUPP: the agent is not running`.
2036
+ - **Never sent,** in any field: agents' names, folders and titles (they come from chats), prompts, transcript text, tool names, arguments and output, error messages, role text, paths, URLs and base URLs, account names, endpoint registrations, anything from the vault, settings or MCP servers. The fields above are all there is, and new ones are added only under these rules.
2037
+ - **Older sevens:** a page from before this op answers `EINVAL` (an unknown op), and a page whose slicc-agent has no inventory answers `EOPNOTSUPP`. The node treats both as `this seven doesn't report its agents`.
1958
2038
  - **Events:** one JSON object per line, mapped by slicc-agent from pi-durable's agent events (`watchEvents`) and handed to the page by `remoteControl(connection)` from `@ai-ecoverse/slicc-agent/page`.
1959
2039
  - `{"t":"user","id","text","delivered"}`;
1960
2040
  - `{"t":"text","id","delta"}`: assistant text as it streams;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc",
3
- "version": "1.56.0",
3
+ "version": "1.57.0",
4
4
  "description": "SLICC's command line for seven: links a machine's network, compute and browsers to seven over WebRTC",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -18,12 +18,12 @@
18
18
  "node": ">=18"
19
19
  },
20
20
  "optionalDependencies": {
21
- "@ai-ecoverse/slicc-darwin-arm64": "1.56.0",
22
- "@ai-ecoverse/slicc-darwin-amd64": "1.56.0",
23
- "@ai-ecoverse/slicc-linux-arm64": "1.56.0",
24
- "@ai-ecoverse/slicc-linux-amd64": "1.56.0",
25
- "@ai-ecoverse/slicc-windows-arm64": "1.56.0",
26
- "@ai-ecoverse/slicc-windows-amd64": "1.56.0",
21
+ "@ai-ecoverse/slicc-darwin-arm64": "1.57.0",
22
+ "@ai-ecoverse/slicc-darwin-amd64": "1.57.0",
23
+ "@ai-ecoverse/slicc-linux-arm64": "1.57.0",
24
+ "@ai-ecoverse/slicc-linux-amd64": "1.57.0",
25
+ "@ai-ecoverse/slicc-windows-arm64": "1.57.0",
26
+ "@ai-ecoverse/slicc-windows-amd64": "1.57.0",
27
27
  "@ai-ecoverse/slicc-jerk": "^1.4.0"
28
28
  }
29
29
  }