@ai-ecoverse/slicc-spectrum 1.13.0 → 1.15.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 (42) hide show
  1. package/README.md +9 -3
  2. package/dist/chunk-4HA3YAGQ.js +8 -0
  3. package/dist/{chunk-4JUIYZ4Q.js → chunk-BSD7LN5H.js} +3 -3
  4. package/dist/{chunk-MJOCPOXZ.js → chunk-CO65RT7N.js} +4 -4
  5. package/dist/{chunk-2BBOXTOJ.js → chunk-CVTEN6SV.js} +2 -2
  6. package/dist/{chunk-CDYGCBW7.js → chunk-F6EKG2TU.js} +8 -8
  7. package/dist/{chunk-ER3HU7OE.js → chunk-JPIG5BAD.js} +2 -2
  8. package/dist/{chunk-7PY7B3ZW.js → chunk-MZMRYCS6.js} +2 -2
  9. package/dist/{chunk-364Y2XOJ.js → chunk-OS3ZND7O.js} +2 -2
  10. package/dist/{chunk-H57UPFSK.js → chunk-SSBUEGCT.js} +6 -6
  11. package/dist/{chunk-LR5GBIK7.js → chunk-T27VPCPJ.js} +3 -3
  12. package/dist/{chunk-TS7SL372.js → chunk-WXAII75O.js} +2 -1
  13. package/dist/{chunk-JCRICTXR.js → chunk-ZBRMKBQV.js} +6 -6
  14. package/dist/slicc-dummy.js +121 -3
  15. package/dist/slicc-dummy.js.map +4 -4
  16. package/dist/slicc-ui.js +7226 -4625
  17. package/dist/slicc-ui.js.map +4 -4
  18. package/dist/types/app/app.d.ts +2 -0
  19. package/dist/types/app/fonts.d.ts +5 -3
  20. package/dist/types/app/spectrum.d.ts +23 -23
  21. package/dist/types/app/sprinkle.d.ts +1 -1
  22. package/dist/types/app/theme.d.ts +3 -0
  23. package/dist/types/app/updates.d.ts +31 -0
  24. package/dist/types/dummy/index.d.ts +6 -1
  25. package/dist/types/dummy/updates.d.ts +15 -0
  26. package/dist/types/dummy.d.ts +3 -1
  27. package/dist/types/model/types.d.ts +28 -0
  28. package/dist/types/ui.d.ts +2 -1
  29. package/package.json +5 -4
  30. package/dist/chunk-N27WNL5Q.js +0 -8
  31. /package/dist/{chunk-H57UPFSK.js.map → chunk-4HA3YAGQ.js.map} +0 -0
  32. /package/dist/{chunk-4JUIYZ4Q.js.map → chunk-BSD7LN5H.js.map} +0 -0
  33. /package/dist/{chunk-MJOCPOXZ.js.map → chunk-CO65RT7N.js.map} +0 -0
  34. /package/dist/{chunk-2BBOXTOJ.js.map → chunk-CVTEN6SV.js.map} +0 -0
  35. /package/dist/{chunk-CDYGCBW7.js.map → chunk-F6EKG2TU.js.map} +0 -0
  36. /package/dist/{chunk-ER3HU7OE.js.map → chunk-JPIG5BAD.js.map} +0 -0
  37. /package/dist/{chunk-7PY7B3ZW.js.map → chunk-MZMRYCS6.js.map} +0 -0
  38. /package/dist/{chunk-364Y2XOJ.js.map → chunk-OS3ZND7O.js.map} +0 -0
  39. /package/dist/{chunk-N27WNL5Q.js.map → chunk-SSBUEGCT.js.map} +0 -0
  40. /package/dist/{chunk-LR5GBIK7.js.map → chunk-T27VPCPJ.js.map} +0 -0
  41. /package/dist/{chunk-TS7SL372.js.map → chunk-WXAII75O.js.map} +0 -0
  42. /package/dist/{chunk-JCRICTXR.js.map → chunk-ZBRMKBQV.js.map} +0 -0
package/README.md CHANGED
@@ -103,7 +103,7 @@ Things found while building this against wterm 0.5.4, recorded here, not pushed
103
103
 
104
104
  ## UI
105
105
 
106
- `dist/slicc-ui.js` is SLICC's app shell on Spectrum Web Components 1.12 with the Spectrum 2 theme (`<sp-theme system="spectrum-two">`), in light and dark. It runs against a typed model, not against the kernel, the agent or the browser directly. `dist/slicc-dummy.js` provides a dummy model that streams replies and tool calls with timers, and `dist/slicc-kernel-model.js` a real one for files and terminals on slicc-kernel (see [Kernel model](#kernel-model)).
106
+ `dist/slicc-ui.js` is SLICC's app shell on Spectrum 2, in light and dark. It is moving from Spectrum Web Components 1.12 to Gen2 ([`@adobe/spectrum-wc`](https://www.npmjs.com/package/@adobe/spectrum-wc)): the Gen2 theme classes (`swc-theme swc-theme--sizeM swc-theme--light|dark`) and `--swc-*` tokens apply inside `<slicc-app>`, and icons are Spectrum 2 workflow icons from `@adobe/spectrum-wc-icons`. Components Gen2 doesn't ship yet stay on 1.12 inside a scoped `<sp-theme system="spectrum-two">` ([#60](https://github.com/ai-ecoverse/slicc-spectrum/issues/60)). It runs against a typed model, not against the kernel, the agent or the browser directly. `dist/slicc-dummy.js` provides a dummy model that streams replies and tool calls with timers, and `dist/slicc-kernel-model.js` a real one for files and terminals on slicc-kernel (see [Kernel model](#kernel-model)).
107
107
 
108
108
  ```html
109
109
  <slicc-app></slicc-app>
@@ -115,7 +115,7 @@ Things found while building this against wterm 0.5.4, recorded here, not pushed
115
115
  </script>
116
116
  ```
117
117
 
118
- `npm start` serves it at `/ui/`. `?fonts=<url>` loads Adobe Clean from another folder (see [Fonts](#fonts)).
118
+ `npm start` serves it at `/ui/`. `?fonts=<url>` loads Adobe Clean from another folder, `?vf=<url>` Adobe Clean Spectrum VF from another file, and `?vf=` turns it off (see [Fonts](#fonts)).
119
119
 
120
120
  ### Layouts and rails
121
121
 
@@ -125,7 +125,7 @@ The layout follows the width of `<slicc-app>`, which it reflects as its `screen`
125
125
 
126
126
  ### Fonts
127
127
 
128
- Text is Adobe Clean and code Spectrum's Source Code Pro. Source Code Pro (OFL) is in `dist/fonts/`, same origin. Adobe Clean can't ship in a public package, so `<slicc-app>` loads it from `fontBase` (`AdobeClean-{Regular,Medium,Bold,ExtraBold}.otf`), which defaults to `/fonts/` on the current origin. Every `*.sliccy.ai` host passes it through to v6, and `npm start` proxies it from `seven.sliccy.ai`. Where it 404s, text falls back to the system font stack. `?delay=` sets the dummy's tick in milliseconds (default 30) , `?color=light|dark|system` the theme, and `?grammars=` the grammar base.
128
+ Text is Adobe Clean Spectrum VF, falling back to Adobe Clean, and code is Spectrum's Source Code Pro. Source Code Pro (OFL) is in `dist/fonts/`, same origin. Neither Adobe Clean can ship in a public package. `<slicc-app>` registers the variable face (`adobe-clean-spectrum-vf`, weights 100–900) from `variableFont`, a woff2 URL that defaults to the Adobe Fonts file React Spectrum S2 uses; a host can point it at its own copy, or set it to `null` to leave it out. The legacy faces come from `fontBase` (`AdobeClean-{Regular,Medium,Bold,ExtraBold}.otf`), which defaults to `/fonts/` on the current origin. Every `*.sliccy.ai` host passes it through to v6, and `npm start` proxies it from `seven.sliccy.ai`. The sans stack (`--swc-sans-font-family-stack`, also used by the 1.12 components) is the variable face, then Adobe Clean, then the system font stack, so text falls back face by face wherever a file doesn't load. `?delay=` sets the dummy's tick in milliseconds (default 30) , `?color=light|dark|system` the theme, and `?grammars=` the grammar base.
129
129
 
130
130
  ### Elements
131
131
 
@@ -143,6 +143,7 @@ Text is Adobe Clean and code Spectrum's Source Code Pro. Source Code Pro (OFL) i
143
143
  | `<slicc-terminals>` | Terminal sessions in tabs, each a `<slicc-terminal>` on the session's `TerminalBackend`. Sessions stay alive while hidden; `exit` closes the tab. |
144
144
  | `<slicc-browser>` | Browser tabs with the agent driving each, an address bar, reload, and the active tab's screenshot. |
145
145
  | `<slicc-settings>` | Theme, the model and thinking level for new cones, composer and diff preferences, and accounts to connect, reconnect or disconnect. |
146
+ | `<slicc-updates>` | Install / Update: component states, version changes, last checks, download and link counts, action buttons, failures with Retry, and collapsible install logs. Opens at boot until the agent is ready without failures. Background updates stay in the status bar; new failures reopen the panel. Also available through View and the rails. |
146
147
  | `<slicc-memory>` | What agents remember, globally or per cone, grouped by section: search, filter by tag, expand, edit, add and forget. |
147
148
  | `<slicc-monitor>` | The live monitor: vitals with sparklines (active agents, spend, budget, fullest context), alerts, and the topology (cones and scoops, terminals, tabs, pending changes, sprinkles, tray followers). |
148
149
  | `<slicc-freezer>` | Frozen cones, archived with their scoops: thaw to bring one back, delete, or freeze the active cone (also `/freeze`). |
@@ -171,6 +172,11 @@ Keys: <kbd>Alt</kbd>+<kbd>1</kbd>… opens and focuses a panel, <kbd>F6</kbd> an
171
172
  | `monitor` | all of them | A snapshot of vitals, alerts and sections, re-emitted as the system changes, and `resync`. |
172
173
  | `sprinkles` | `@ai-ecoverse/slicc-agent` | Sprinkles (`inline` ones show as dips in the chat, not in the rail) and `send`, which turns a sprinkle's lick into a lick on its cone. |
173
174
  | `tray` | the tray protocol | Connection, role, float kind, followers, spend and budget; `reconnect` and `disconnect`. |
175
+ | `updates` (optional) | BIOS installers | `list()` returns `UpdateItem` rows for BIOS, kernel, agent, grammars, global pnpm packages, skills and UI. `ready()` explicitly reports agent readiness, independently of agent activity. Emit `items` whenever rows or readiness change. `act(id, action)` resolves when dispatched or rejects with a displayed error; actions are `retry`, `update-now`, `restart-agent` and `reload`. Missing ports preserve existing adapters and report disconnected information in the panel. Real installer wiring belongs to ai-ecoverse/slicc-bios#70. |
176
+
177
+ The dummy supports `createDummyModel({ updates: 'boot' | 'current' | 'available' | 'restart' | 'failure' })`, also selectable with `?updates=` on `/ui/`. Fixtures stay stable for inspection; `model.updates.setScenario('current')` completes boot. 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. `updateFixtures` and `DummyUpdates` are exported from `/dummy`.
178
+
179
+ On phones the tray uses a compact indicator (its full status remains available on activation), the agent picker shrinks to fit, and the bottom rail scrolls when needed. The update status comes first so progress and failures remain reachable on narrow screens.
174
180
 
175
181
  ### Kernel model
176
182
 
@@ -0,0 +1,8 @@
1
+ import "./chunk-BSD7LN5H.js";
2
+ import "./chunk-OS3ZND7O.js";
3
+ import "./chunk-JPIG5BAD.js";
4
+ import "./chunk-CVTEN6SV.js";
5
+ import "./chunk-6A6NIESE.js";
6
+ import "./chunk-WXAII75O.js";
7
+ import "./chunk-AXQFWXYZ.js";
8
+ //# sourceMappingURL=chunk-4HA3YAGQ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  o
3
- } from "./chunk-2BBOXTOJ.js";
3
+ } from "./chunk-CVTEN6SV.js";
4
4
  import {
5
5
  defineElement
6
6
  } from "./chunk-6A6NIESE.js";
@@ -11,7 +11,7 @@ import {
11
11
  e2,
12
12
  i,
13
13
  n
14
- } from "./chunk-TS7SL372.js";
14
+ } from "./chunk-WXAII75O.js";
15
15
 
16
16
  // node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js
17
17
  function n2(n3) {
@@ -231,4 +231,4 @@ export {
231
231
  * SPDX-License-Identifier: BSD-3-Clause
232
232
  *)
233
233
  */
234
- //# sourceMappingURL=chunk-4JUIYZ4Q.js.map
234
+ //# sourceMappingURL=chunk-BSD7LN5H.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-EN3XGF2M.js";
7
7
  import {
8
8
  o
9
- } from "./chunk-2BBOXTOJ.js";
9
+ } from "./chunk-CVTEN6SV.js";
10
10
  import {
11
11
  defineElement
12
12
  } from "./chunk-6A6NIESE.js";
@@ -16,7 +16,7 @@ import {
16
16
  e2 as e,
17
17
  i,
18
18
  n
19
- } from "./chunk-TS7SL372.js";
19
+ } from "./chunk-WXAII75O.js";
20
20
  import "./chunk-AXQFWXYZ.js";
21
21
 
22
22
  // node_modules/@spectrum-web-components/tooltip/src/tooltip.css.js
@@ -146,7 +146,7 @@ var Tooltip = class extends SpectrumElement {
146
146
  <span id="tip" aria-hidden="true"></span>
147
147
  </sp-tooltip-openable>
148
148
  `;
149
- return this.selfManaged ? (this.dependencyManager.add("sp-overlay"), import("./chunk-JCRICTXR.js"), b`
149
+ return this.selfManaged ? (this.dependencyManager.add("sp-overlay"), import("./chunk-ZBRMKBQV.js"), b`
150
150
  <sp-overlay
151
151
  ?open=${this.open && !this.disabled && this.dependencyManager.loaded}
152
152
  ?delayed=${this.delayed}
@@ -178,4 +178,4 @@ o3([n({ type: Boolean })], Tooltip.prototype, "delayed", 2), o3([n({ type: Boole
178
178
 
179
179
  // node_modules/@spectrum-web-components/tooltip/sp-tooltip.js
180
180
  defineElement("sp-tooltip", Tooltip);
181
- //# sourceMappingURL=chunk-MJOCPOXZ.js.map
181
+ //# sourceMappingURL=chunk-CO65RT7N.js.map
@@ -2,7 +2,7 @@ import {
2
2
  A,
3
3
  E,
4
4
  j
5
- } from "./chunk-TS7SL372.js";
5
+ } from "./chunk-WXAII75O.js";
6
6
 
7
7
  // node_modules/lit-html/directives/if-defined.js
8
8
  var o = (o7) => o7 ?? A;
@@ -410,4 +410,4 @@ lit-html/directives/join.js:
410
410
  * SPDX-License-Identifier: BSD-3-Clause
411
411
  *)
412
412
  */
413
- //# sourceMappingURL=chunk-2BBOXTOJ.js.map
413
+ //# sourceMappingURL=chunk-CVTEN6SV.js.map
@@ -16,14 +16,14 @@ import {
16
16
  } from "./chunk-Y4Z7K443.js";
17
17
  import {
18
18
  o
19
- } from "./chunk-364Y2XOJ.js";
19
+ } from "./chunk-OS3ZND7O.js";
20
20
  import {
21
21
  r
22
- } from "./chunk-ER3HU7OE.js";
22
+ } from "./chunk-JPIG5BAD.js";
23
23
  import {
24
24
  o as o2,
25
25
  o2 as o3
26
- } from "./chunk-2BBOXTOJ.js";
26
+ } from "./chunk-CVTEN6SV.js";
27
27
  import {
28
28
  A,
29
29
  SpectrumElement,
@@ -31,7 +31,7 @@ import {
31
31
  e2 as e,
32
32
  i,
33
33
  n
34
- } from "./chunk-TS7SL372.js";
34
+ } from "./chunk-WXAII75O.js";
35
35
 
36
36
  // node_modules/@spectrum-web-components/reactive-controllers/src/ElementResolution.js
37
37
  var elementResolverUpdatedSymbol = /* @__PURE__ */ Symbol("element resolver updated");
@@ -243,7 +243,7 @@ var AbstractOverlay = class _AbstractOverlay extends SpectrumElement {
243
243
  document.dispatchEvent(e2);
244
244
  }
245
245
  static async open(e2, r3, n2, a) {
246
- await import("./chunk-JCRICTXR.js");
246
+ await import("./chunk-ZBRMKBQV.js");
247
247
  const m = arguments.length === 2, l2 = n2 || e2, t = new this();
248
248
  let p = false;
249
249
  t.dispose = () => {
@@ -2164,9 +2164,9 @@ var InteractionController = class {
2164
2164
  return;
2165
2165
  }
2166
2166
  e2 && (customElements.whenDefined("sp-overlay").then(async () => {
2167
- const { Overlay: t } = await import("./chunk-H57UPFSK.js");
2167
+ const { Overlay: t } = await import("./chunk-SSBUEGCT.js");
2168
2168
  this.overlay = new t(), this.overlay.open = true, this.target[lastInteractionType] = this.type;
2169
- }), import("./chunk-JCRICTXR.js"));
2169
+ }), import("./chunk-ZBRMKBQV.js"));
2170
2170
  }
2171
2171
  }
2172
2172
  get overlay() {
@@ -2635,4 +2635,4 @@ export {
2635
2635
  LONGPRESS_INSTRUCTIONS,
2636
2636
  Overlay
2637
2637
  };
2638
- //# sourceMappingURL=chunk-CDYGCBW7.js.map
2638
+ //# sourceMappingURL=chunk-F6EKG2TU.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  n
3
- } from "./chunk-TS7SL372.js";
3
+ } from "./chunk-WXAII75O.js";
4
4
 
5
5
  // node_modules/@lit/reactive-element/decorators/state.js
6
6
  function r(r2) {
@@ -19,4 +19,4 @@ export {
19
19
  * SPDX-License-Identifier: BSD-3-Clause
20
20
  *)
21
21
  */
22
- //# sourceMappingURL=chunk-ER3HU7OE.js.map
22
+ //# sourceMappingURL=chunk-JPIG5BAD.js.map
@@ -8,7 +8,7 @@ import {
8
8
  e2 as e,
9
9
  i,
10
10
  n
11
- } from "./chunk-TS7SL372.js";
11
+ } from "./chunk-WXAII75O.js";
12
12
  import "./chunk-AXQFWXYZ.js";
13
13
 
14
14
  // node_modules/@spectrum-web-components/popover/src/popover.css.js
@@ -56,4 +56,4 @@ r([n({ type: Boolean, reflect: true })], Popover.prototype, "open", 2), r([n({ r
56
56
 
57
57
  // node_modules/@spectrum-web-components/popover/sp-popover.js
58
58
  defineElement("sp-popover", Popover);
59
- //# sourceMappingURL=chunk-7PY7B3ZW.js.map
59
+ //# sourceMappingURL=chunk-MZMRYCS6.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  e
3
- } from "./chunk-TS7SL372.js";
3
+ } from "./chunk-WXAII75O.js";
4
4
 
5
5
  // node_modules/@lit/reactive-element/decorators/query-assigned-elements.js
6
6
  function o(o2) {
@@ -25,4 +25,4 @@ export {
25
25
  * SPDX-License-Identifier: BSD-3-Clause
26
26
  *)
27
27
  */
28
- //# sourceMappingURL=chunk-364Y2XOJ.js.map
28
+ //# sourceMappingURL=chunk-OS3ZND7O.js.map
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  LONGPRESS_INSTRUCTIONS,
3
3
  Overlay
4
- } from "./chunk-CDYGCBW7.js";
4
+ } from "./chunk-F6EKG2TU.js";
5
5
  import "./chunk-IBQ4O4NO.js";
6
6
  import "./chunk-ZMBN6APP.js";
7
7
  import "./chunk-Y4Z7K443.js";
8
- import "./chunk-364Y2XOJ.js";
9
- import "./chunk-ER3HU7OE.js";
10
- import "./chunk-2BBOXTOJ.js";
11
- import "./chunk-TS7SL372.js";
8
+ import "./chunk-OS3ZND7O.js";
9
+ import "./chunk-JPIG5BAD.js";
10
+ import "./chunk-CVTEN6SV.js";
11
+ import "./chunk-WXAII75O.js";
12
12
  import "./chunk-AXQFWXYZ.js";
13
13
  export {
14
14
  LONGPRESS_INSTRUCTIONS,
15
15
  Overlay
16
16
  };
17
- //# sourceMappingURL=chunk-H57UPFSK.js.map
17
+ //# sourceMappingURL=chunk-SSBUEGCT.js.map
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-5OVGH7HO.js";
8
8
  import {
9
9
  r
10
- } from "./chunk-ER3HU7OE.js";
10
+ } from "./chunk-JPIG5BAD.js";
11
11
  import {
12
12
  defineElement
13
13
  } from "./chunk-6A6NIESE.js";
@@ -18,7 +18,7 @@ import {
18
18
  e2 as e,
19
19
  i,
20
20
  n
21
- } from "./chunk-TS7SL372.js";
21
+ } from "./chunk-WXAII75O.js";
22
22
  import "./chunk-AXQFWXYZ.js";
23
23
 
24
24
  // node_modules/@spectrum-web-components/modal/src/modal.css.js
@@ -177,4 +177,4 @@ i3([n({ type: Boolean, reflect: true })], Tray.prototype, "open", 2), i3([e(".tr
177
177
 
178
178
  // node_modules/@spectrum-web-components/tray/sp-tray.js
179
179
  defineElement("sp-tray", Tray);
180
- //# sourceMappingURL=chunk-LR5GBIK7.js.map
180
+ //# sourceMappingURL=chunk-T27VPCPJ.js.map
@@ -642,6 +642,7 @@ SpectrumElement.VERSION = version;
642
642
 
643
643
  export {
644
644
  version,
645
+ r2 as r,
645
646
  i2 as i,
646
647
  b,
647
648
  w,
@@ -684,4 +685,4 @@ lit-html/is-server.js:
684
685
  * SPDX-License-Identifier: BSD-3-Clause
685
686
  *)
686
687
  */
687
- //# sourceMappingURL=chunk-TS7SL372.js.map
688
+ //# sourceMappingURL=chunk-WXAII75O.js.map
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  Overlay
3
- } from "./chunk-CDYGCBW7.js";
3
+ } from "./chunk-F6EKG2TU.js";
4
4
  import "./chunk-IBQ4O4NO.js";
5
5
  import "./chunk-ZMBN6APP.js";
6
6
  import "./chunk-Y4Z7K443.js";
7
- import "./chunk-364Y2XOJ.js";
8
- import "./chunk-ER3HU7OE.js";
9
- import "./chunk-2BBOXTOJ.js";
7
+ import "./chunk-OS3ZND7O.js";
8
+ import "./chunk-JPIG5BAD.js";
9
+ import "./chunk-CVTEN6SV.js";
10
10
  import {
11
11
  defineElement
12
12
  } from "./chunk-6A6NIESE.js";
13
- import "./chunk-TS7SL372.js";
13
+ import "./chunk-WXAII75O.js";
14
14
  import "./chunk-AXQFWXYZ.js";
15
15
 
16
16
  // node_modules/@spectrum-web-components/overlay/sp-overlay.js
17
17
  defineElement("sp-overlay", Overlay);
18
- //# sourceMappingURL=chunk-JCRICTXR.js.map
18
+ //# sourceMappingURL=chunk-ZBRMKBQV.js.map
@@ -3723,8 +3723,123 @@ var DummyTray = class extends Emitter {
3723
3723
  }
3724
3724
  };
3725
3725
 
3726
+ // src/dummy/updates.ts
3727
+ var checkedAt = Date.UTC(2026, 9, 8, 8, 42);
3728
+ function updateFixtures(scenario) {
3729
+ const components = [
3730
+ ["bios", "BIOS packages", "0.8.2"],
3731
+ ["kernel", "Kernel", "1.12.0"],
3732
+ ["agent", "Agent (/opt/agent)", "0.24.0"],
3733
+ ["grammars", "Syntax grammars", "4.5.0"],
3734
+ ["global", "Global pnpm packages", "2.3.0"],
3735
+ ["skills", "Skills", "1.6.0"]
3736
+ ];
3737
+ const items = components.map(([kind, label, version]) => ({
3738
+ id: kind,
3739
+ label,
3740
+ kind,
3741
+ state: "current",
3742
+ progress: null,
3743
+ from: version,
3744
+ to: version,
3745
+ checkedAt,
3746
+ error: null,
3747
+ actions: []
3748
+ }));
3749
+ const agent = items[2];
3750
+ if (scenario === "boot") {
3751
+ Object.assign(agent, {
3752
+ state: "downloading",
3753
+ from: null,
3754
+ progress: { phase: "download", done: 63, total: 95 },
3755
+ log: "Packages: +95\nProgress: resolved 95, reused 0, downloaded 63, added 0\nDownloading @slicc/demo-agent..."
3756
+ });
3757
+ Object.assign(items[3], {
3758
+ state: "linking",
3759
+ progress: { phase: "link", done: 12, total: 15 },
3760
+ log: "Linking syntax grammars\nProgress: linked 12 of 15"
3761
+ });
3762
+ items[4].state = "checking";
3763
+ } else if (scenario === "available" || scenario === "restart") {
3764
+ Object.assign(agent, {
3765
+ state: scenario === "available" ? "available" : "ready",
3766
+ to: "0.25.0",
3767
+ actions: [scenario === "available" ? "update-now" : "restart-agent"],
3768
+ log: scenario === "restart" ? "Packages: +95\nProgress: resolved 95, downloaded 95, added 95\nDone in 48.2s" : void 0
3769
+ });
3770
+ Object.assign(items[1], { state: "ready", to: "1.13.0", actions: ["reload"] });
3771
+ } else if (scenario === "failure") {
3772
+ Object.assign(items[4], {
3773
+ state: "failed",
3774
+ to: "2.4.0",
3775
+ error: "The package registry did not respond. Installed commands are still available.",
3776
+ actions: ["retry"],
3777
+ log: "pnpm add -g @harbor/demo-cli@2.4.0\nERR_PNPM_FETCH_TIMEOUT Request timed out after 30000ms"
3778
+ });
3779
+ }
3780
+ return items;
3781
+ }
3782
+ var DummyUpdates = class extends Emitter {
3783
+ #items;
3784
+ #ready;
3785
+ #clock;
3786
+ constructor(scenario, clock2) {
3787
+ super();
3788
+ this.#items = updateFixtures(scenario);
3789
+ this.#ready = scenario !== "boot";
3790
+ this.#clock = clock2;
3791
+ }
3792
+ list() {
3793
+ return this.#items;
3794
+ }
3795
+ ready() {
3796
+ return this.#ready;
3797
+ }
3798
+ setScenario(scenario) {
3799
+ this.#items = updateFixtures(scenario);
3800
+ this.#ready = scenario !== "boot";
3801
+ this.emit("items", this.#items);
3802
+ }
3803
+ #patch(id, patch) {
3804
+ this.#items = this.#items.map((item) => item.id === id ? { ...item, ...patch } : item);
3805
+ this.emit("items", this.#items);
3806
+ }
3807
+ async act(id, action) {
3808
+ const item = this.#items.find((candidate) => candidate.id === id);
3809
+ if (!item?.actions.includes(action)) throw new Error(`Update action unavailable: ${id}`);
3810
+ if (action === "update-now" || action === "retry") {
3811
+ this.#patch(id, {
3812
+ state: "downloading",
3813
+ progress: { phase: "download", done: 0, total: 95 },
3814
+ error: null,
3815
+ actions: [],
3816
+ log: "Packages: +95\nProgress: resolved 95, downloaded 0, added 0"
3817
+ });
3818
+ await this.#clock.sleep(4);
3819
+ this.#patch(id, {
3820
+ state: "linking",
3821
+ progress: { phase: "link", done: 95, total: 95 },
3822
+ log: "Packages: +95\nProgress: resolved 95, downloaded 95, added 95"
3823
+ });
3824
+ await this.#clock.sleep(2);
3825
+ }
3826
+ const apply = action === "update-now" && ["agent", "bios", "kernel", "ui"].includes(item.kind);
3827
+ this.#patch(id, {
3828
+ state: apply ? "ready" : "installed",
3829
+ from: apply ? item.from : item.to,
3830
+ progress: null,
3831
+ checkedAt,
3832
+ actions: apply ? [item.kind === "agent" ? "restart-agent" : "reload"] : []
3833
+ });
3834
+ }
3835
+ };
3836
+
3726
3837
  // src/dummy/index.ts
3727
- function createDummyModel({ delay = 30, storage = null } = {}) {
3838
+ function createDummyModel({
3839
+ delay = 30,
3840
+ storage = null,
3841
+ updates = "current"
3842
+ } = {}) {
3728
3843
  const time = clock(delay);
3729
3844
  const files3 = new DummyFiles(files2, directories, pending, time);
3730
3845
  const browser = new DummyBrowser(tabs, time);
@@ -3750,11 +3865,14 @@ function createDummyModel({ delay = 30, storage = null } = {}) {
3750
3865
  ),
3751
3866
  memory: new DummyMemory(memories),
3752
3867
  sprinkles: new DummySprinkles(sprinkles, agent),
3753
- tray: new DummyTray(tray, time)
3868
+ tray: new DummyTray(tray, time),
3869
+ updates: new DummyUpdates(updates, time)
3754
3870
  };
3755
3871
  return { ...base, monitor: new DummyMonitor(base) };
3756
3872
  }
3757
3873
  export {
3758
- createDummyModel
3874
+ DummyUpdates,
3875
+ createDummyModel,
3876
+ updateFixtures
3759
3877
  };
3760
3878
  //# sourceMappingURL=slicc-dummy.js.map