@ai-ecoverse/slicc-spectrum 1.89.1 → 1.90.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
@@ -449,6 +449,7 @@ It closes, clearing the field, when the request leaves `waiting` or while the va
449
449
  #### `<slicc-updates>`
450
450
 
451
451
  Install / Update: component states, version changes, last checks, download and link counts, action buttons, failures with Retry, and collapsible install logs behind a quiet chevron, which stay open across a layout switch.
452
+ An install shows one bar for update rows and package rows alike: it fills 0–50% while downloading and 50–100% while linking (`value` against `max-value="100"`). While the row runs it never goes back, not when pnpm's total grows and not when progress drops out between passes. While a download reports `bytes` with a total above 0, the first half fills by bytes and the value label reads "10.0 MB of 40.0 MB". Otherwise, and always while linking, the label falls back to the phase's "n of m" count. The bar starts at 0 again once the row settles.
452
453
  Opens at boot until the agent is ready without failures.
453
454
  Background updates stay in the header's update status; new failures reopen the panel, and after a reload into a boot that isn't ready yet such a panel closes once the agent is ready.
454
455
  Every automatic close is saved to the layout.
@@ -772,6 +773,7 @@ Connection, role, float kind, followers, spend and budget; `reconnect` and `disc
772
773
 
773
774
  Later backed by: BIOS installers.
774
775
  `list()` returns `UpdateItem` rows for BIOS, kernel, agent, grammars, global pnpm packages, skills and UI.
776
+ A row's and a package's `progress` (`InstallProgress`) is the `phase` (`download` or `link`) with `done` of `total` packages, and an optional `bytes` (`{ done, total }`), which counts only while `phase` is `download` (it's ignored while linking and when its total is 0), summed from pnpm's `Downloading <package>: <done>/<total>` lines; send it even when pnpm counts a single package, since a few large tarballs are most of an install's time.
775
777
  `ready()` explicitly reports agent readiness, independently of agent activity.
776
778
  Emit `items` whenever rows or readiness change.
777
779
  Use `queued` for a row that waits for another component before it starts; it reads "Waiting" and doesn't count as updating.
@@ -780,7 +782,7 @@ A `failed` row with an installed `from` version reads "Update failed".
780
782
  `act(id, action)` resolves when dispatched or rejects with a displayed error; actions are `retry`, `update-now`, `restart-agent` and `reload`.
781
783
  Missing ports preserve existing adapters and report disconnected information in the panel.
782
784
  Optional `packages()` returns `PackageItem` rows for optional tools, each with a short catalog `id`, its npm `package` (shown in the name's tooltip and at the top of its Install log), `label`, a one-sentence `description`, the `commands` it provides, `requires` (other package ids, read as "Uses Python" while it's installed, or "Installs Python too" on a row that isn't installed yet; an installed row leaves out a requirement that isn't installed, since its warning says so), optional `notes` (short plain-text lines shown muted under the row, such as "1 untested dependency: …"; leave it out when there's nothing to say), optional `warnings` (lines with an alert icon, `data-warnings`, such as "Needs Python, which isn't installed.
783
- Install Python again to use it."; the dummy adds that one when a required package is removed), `state` (`available`, `queued`, `installing`, `installed`, `outdated`, `updating`, `removing` or `failed`), the installed `version`, the `offered` version and its `size` in bytes, `progress` counted in packages (or `null` for an indeterminate bar), `error`, `actions` (`install`, `update`, `remove`, `retry`, `unpin`) and an optional `log`.
785
+ Install Python again to use it."; the dummy adds that one when a required package is removed), `state` (`available`, `queued`, `installing`, `installed`, `outdated`, `updating`, `removing` or `failed`), the installed `version`, the `offered` version and its `size` in bytes, `progress` (`InstallProgress`, or `null` for an indeterminate bar), `error`, `actions` (`install`, `update`, `remove`, `retry`, `unpin`) and an optional `log`.
784
786
  A row with `origin: 'user'` (ids such as `user:user:<name>`) goes into Your packages, `section[data-section="user-packages"]`, which only shows when there is one; its `pin` holds `base` (the version seven ships, or `null` for a package seven doesn't ship), the user's `range` and the `project` folder, such as `/opt/user`.
785
787
  An installed pin reads "Pinned" with `0.24.0 · seven ships 0.25.0 · in /opt/agent` ("the version seven ships" when they match), and an addition reads "Added" with `^1.2.0 → 1.2.4 · in /opt/user`; `.meta[data-pin]` is `pinned` or `added`.
786
788
  A pin that is `removing` reads "Unpinning"; other states keep their usual lights.
@@ -926,7 +928,7 @@ Pass only the surfaces a follower has to `<slicc-app>` (agents, chat, terminal a
926
928
 
927
929
  The dummy supports `createDummyModel({ updates: 'boot' | 'starting' | 'current' | 'available' | 'restart' | 'failure' })`, also selectable with `?updates=` on `/ui/`.
928
930
  Fixtures stay stable for inspection; `model.updates.setScenario('current')` completes boot.
929
- Dummy Update now and Retry simulate download and link progress; Restart agent and Reload only change fixture state, never restart a real process or reload the browser.
931
+ Dummy Update now and Retry simulate download and link progress, and a dummy package install reports half its `size` in bytes on the way; Restart agent and Reload only change fixture state, never restart a real process or reload the browser.
930
932
  `createDummyModel({ packages: 'mixed' | 'empty' | 'fail' | 'user' | 'off' })` (or `?packages=` on `/ui/`, off by default) adds invented optional packages in every state: Install and Retry finish after a short wait and install missing requirements too, `fail` makes them fail, `user` adds a pinned agent-kit and two additions (one with a warning) that Unpin and Remove take out of the list, and removing Python while uv is installed asks through the `confirm` option (the `/ui/` page passes spectrum's `confirm`).
931
933
  `updateFixtures`, `packageFixtures` and `DummyUpdates` are exported from `/dummy`.
932
934
  `createDummyModel({ mounts: 'mount' | 'cancel' | 'fail' | 'needs' })` (or `?mounts=` on `/ui/`) turns on the optional mount members, which are off by default: `mountFolder` mounts invented files at `/mnt/photos`, resolves with `null`, or rejects, as `model.files.mount.scenario` says; `needs` also lists `/mnt/photos` in `needsFolder()` until a folder is inserted there.
@@ -6646,10 +6646,21 @@ var DummyUpdates = class extends Emitter {
6646
6646
  log: `${log}
6647
6647
  Progress: resolved 1, downloaded 0, added 0`
6648
6648
  });
6649
- await this.#clock.sleep(4);
6649
+ await this.#clock.sleep(2);
6650
+ if (item.size !== void 0) {
6651
+ const half = Math.round(item.size / 2);
6652
+ this.#patchPackage(id, {
6653
+ progress: { phase: "download", done: 0, total: 1, bytes: { done: half, total: item.size } },
6654
+ log: `${log}
6655
+ Progress: resolved 1, downloaded 0, added 0
6656
+ Downloading ${item.package}@${item.offered}: ${half} B/${item.size} B`
6657
+ });
6658
+ }
6659
+ await this.#clock.sleep(2);
6650
6660
  if (this.#fail) {
6651
6661
  this.#patchPackage(id, {
6652
6662
  state: "failed",
6663
+ progress: null,
6653
6664
  error: fetchFailed,
6654
6665
  actions: ["retry"],
6655
6666
  log: `${log}