@ai-ecoverse/slicc-spectrum 1.34.0 → 1.36.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 +12 -11
- package/dist/slicc-dummy.js +100 -13
- package/dist/slicc-dummy.js.map +4 -4
- package/dist/slicc-ui.js +232 -108
- package/dist/slicc-ui.js.map +3 -3
- package/dist/types/app/base.d.ts +2 -1
- package/dist/types/app/changes.d.ts +18 -1
- package/dist/types/app/chat.d.ts +1 -0
- package/dist/types/app/confirm.d.ts +3 -0
- package/dist/types/app/files.d.ts +2 -0
- package/dist/types/app/network.d.ts +3 -1
- package/dist/types/dummy/changes.d.ts +17 -0
- package/dist/types/dummy/fixtures.d.ts +1 -0
- package/dist/types/dummy/index.d.ts +3 -1
- package/dist/types/dummy.d.ts +2 -0
- package/dist/types/model/types.d.ts +16 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -134,21 +134,21 @@ Text is Adobe Clean Spectrum VF, falling back to Adobe Clean, and code is Spectr
|
|
|
134
134
|
| `<slicc-app>` | The shell: header with the agent picker, status items, the update status, the network indicator, the tray, the View menu and the theme switch, rails, and a `<slicc-dock>`. Saves the dock layout per screen class to `storage` (default `localStorage`) under `layoutKey`. While connected it sets `overscroll-behavior` to `none !important` on the page's `html` and `body`, so only scroll areas inside panels rubber-band. When the last app on the page is removed, the page's own inline values come back. |
|
|
135
135
|
| `<slicc-dock>` | Generic. [dockview-core](https://dockview.dev/) 8 with a theme mapped to Spectrum tokens, in its own shadow root. Panels come from `factories` (`name → (params) => HTMLElement`). `open`, `close`, `has`, `content`, `focusPanel`, `cycleGroup`, `cycleTab`, `toJSON`, `restore`, `clear`, and the full `api`. Tabs have a context menu (close, close others, float, maximize). Events: `layout-change`, `active-panel-change`, `panel-close`. |
|
|
136
136
|
| `<slicc-agents>` | Cones with their scoops, status, context fill and unread count. Selecting one makes it the active agent. |
|
|
137
|
-
| `<slicc-chat>` | One thread's conversation (its `agent`, or the active agent if unset), by day: user messages (with attachments, tagged as steered or follow-up by `delivered`, or delegated from another cone), assistant messages (Markdown with tables, task lists, quotes, code and images; thinking; tool calls, grouped into a collapsible cluster from three in a row, each with its input (a shell command after `$`), an optional `meta` such as a timeout, and an edit's `diff` shown as a diff view; media galleries with images, video and audio; action cards for tools, pull requests and status; plans and checklists; inline diffs; question prompts; delegations; link previews; errors with a fix-it action; a content-filter stop offers **Drop the last turn**, which rewinds that turn and puts its prompt back into the composer; when the turns right before it failed too, the button reads **Drop N failed turns** and rewinds to before the first of them, putting the latest prompt back), standalone tool results, system messages (compaction markers, error cards, notices) and licks, SLICC's events into a cone, on every channel; a lick's `severity` (`warn` or `error`) turns its channel badge into a notice or negative one with an alert icon. Permission requests are allowed or denied in place. The header shows the status, a model picker that names each model's provider and leaves out classifiers and models with `tools: false`, the thinking picker, the context meter and **New chat**, which calls `clear` and puts focus back in the composer. |
|
|
137
|
+
| `<slicc-chat>` | One thread's conversation (its `agent`, or the active agent if unset), by day: user messages (with attachments, tagged as steered or follow-up by `delivered`, or delegated from another cone), assistant messages (Markdown with tables, task lists, quotes, code and images; thinking; tool calls, grouped into a collapsible cluster from three in a row, each with its input (a shell command after `$`), an optional `meta` such as a timeout, and an edit's `diff` shown as a diff view; media galleries with images, video and audio; action cards for tools, pull requests and status; plans and checklists; inline diffs; question prompts; delegations; link previews; errors with a fix-it action; a content-filter stop offers **Drop the last turn**, which rewinds that turn and puts its prompt back into the composer; when the turns right before it failed too, the button reads **Drop N failed turns** and rewinds to before the first of them, putting the latest prompt back), standalone tool results, system messages (compaction markers, error cards, notices) and licks, SLICC's events into a cone, on every channel; a lick's `severity` (`warn` or `error`) turns its channel badge into a notice or negative one with an alert icon. Permission requests are allowed or denied in place. The header shows the status, a model picker that names each model's provider and leaves out classifiers and models with `tools: false`, the thinking picker, the context meter and **New chat**, which calls `clear` and puts focus back in the composer; on a cone, when the port can freeze, its tooltip says the old chat goes to the freezer. |
|
|
138
138
|
| `<slicc-composer>` | The message box. <kbd>Enter</kbd> sends, or steers a running reply: the message joins after the current tool round, without interrupting; <kbd>Ctrl</kbd>/<kbd>⌘</kbd>+<kbd>Enter</kbd> queues a follow-up that runs after the reply and can be withdrawn; <kbd>Shift</kbd>+<kbd>Enter</kbd> adds a line; <kbd>Tab</kbd> takes the suggested follow-up; <kbd>↑</kbd>/<kbd>↓</kbd> at the start or end walk this agent's history; <kbd>Esc</kbd> stops. `/` completes commands (`/clear`, `/compact`, `/model`, `/thinking`, `/scoop`, `/stop`, `/freeze` when the port can freeze, `/theme`) and their arguments, `@` mentions agents and files. Attach from the computer, from SLICC's files, a browser screenshot or a shared secret, or paste and drop files (25 MB each). Queued messages wait above it, to send now or drop. Model and thinking pickers, and dictation where the browser has speech recognition. Drafts are kept per agent. |
|
|
139
139
|
| `<slicc-files>` | The file system as a `<slicc-file-tree>`, with pending changes as git status. Opening a file opens it in a tab. With `files.mountFolder`, **Mount a folder…** (`data-action="mount-folder"`) mounts a local folder, then selects and expands it in the tree; with `files.mounts`, a **Mounted** strip lists the mount points, each with **Eject** (`data-action="eject"`, `data-path` the mount point) when the port has `eject`. With `files.needsFolder`, a **Needs a folder** section lists the mount points waiting for a folder, each with **Insert folder…** (`data-action="insert-folder"`, `data-id` the mount point), which calls `mountFolder(path)`. A failed mount, insert or eject shows its message under the bar. |
|
|
140
140
|
| `<slicc-file-view>` | One file (`path`), highlighted, with its pending change and a link to the diff. |
|
|
141
|
-
| `<slicc-changes>` | Pending changes with their author. Opens the diff, accepts or reverts one change or all of them. |
|
|
142
|
-
| `<slicc-diff-panel>` | The diff of one pending change (`path`), unified or split, with accept and revert. |
|
|
141
|
+
| `<slicc-changes>` | Pending changes with their author. Opens the diff, accepts or reverts one change or all of them. Changes with a `repo` show their folder relative to it, and no author when `agentId` is `null`; with more than one repository they group under a header per repository (its path and count), in the order the port returns them. Revert and Revert all ask with a destructive confirm that says the uncommitted (or, without a repo, pending) changes can't be undone; a failed revert shows its message under the bar. When the port's `unavailable()` returns a string, the panel shows it instead of the list. |
|
|
142
|
+
| `<slicc-diff-panel>` | The diff of one pending change (`path`), unified or split, with accept and revert. A change with `before` and `after` both `null` (a binary file, or text over 1 MB) shows “No diff for this file” and Open the file instead, and keeps Accept and Revert. |
|
|
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. An account whose status is `signing-in` (or a non-API-key account while its `connect` is pending) reads “Signing in…”; when the port has `cancel(id)`, its row offers Cancel (`data-action="cancel-sign-in"`), and the rejected `connect` that follows shows no error. |
|
|
146
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 header's update status; new failures reopen the panel. Also available through View and the rails. |
|
|
147
147
|
| `<slicc-memory>` | What agents remember, per scope (everyone, a cone or a role), grouped by section: search, filter by tag, expand, edit, add and forget. Free text outside an entry shows “From MEMORY.md”. |
|
|
148
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). |
|
|
149
|
-
| `<slicc-freezer>` | Frozen cones, archived with their scoops: thaw to bring one back, delete, or freeze the active cone (also `/freeze`). |
|
|
149
|
+
| `<slicc-freezer>` | Frozen cones, archived with their scoops, and the chats New chat put away: thaw to bring one back, delete, or freeze the active cone (also `/freeze`). |
|
|
150
150
|
| `<slicc-sprinkle>` | A SLICC sprinkle (`.shtml`), as a panel or, with `inline`, as a dip in the chat that grows to fit. A dip has a tab-like handle: drag it into the dock (or onto a rail, or use its open-as-panel button) and it lives on as a sprinkle panel, with a note in the chat where it was; which dips are out is saved in `slicc-ui.dips`. It runs in a sandboxed frame (`allow-scripts` only) with SLICC's sprinkle theme (the `--s2-*` tokens and `.sprinkle-*` classes), the app's fonts, and Lucide icons (`<i data-lucide>`, `LucideIcons.render()`). It talks back through `slicc.lick({ action, data })`, which reaches the owning cone as a `sprinkle` lick, and, when the port has `call`, reads files and keeps state (see [Sprinkle bridge](#sprinkle-bridge)). Panel sprinkles sit at the top of the right rail with their Lucide icon. |
|
|
151
|
-
| `<slicc-network>` | Network: the route and its health in plain words with the bios `detail`, **Check again** (`data-action="check"`) when the port has `check`, **Get the whole web** with the Chrome extension link (`data-action="install-extension"`, when `extensionUrl` is set) and `npx @ai-ecoverse/slicc-node` with a copy button (`data-action="copy-command"`), folded away when the route already reaches the whole web, and recent failures with host, error and time. The header's **Network** indicator (`data-network`, `data-health`) opens it: a status light, green for `ok`, yellow for `limited` and red for `failing`, with the state in its text and label and `detail` as its tooltip; on a phone, a cloud icon for the state. Offered only when the model has a `network` port. |
|
|
151
|
+
| `<slicc-network>` | Network: the route and its health in plain words with the bios `detail`, a line on browser automation (`data-browser`: through the SLICC extension, through slicc-node, not available with how to get it, or `declined`, muted: off for this session, reload to be asked again) when the status has `browser`, **Check again** (`data-action="check"`) when the port has `check`, **Get the whole web** with the Chrome extension link (`data-action="install-extension"`, when `extensionUrl` is set) and `npx @ai-ecoverse/slicc-node` with a copy button (`data-action="copy-command"`), folded away when the route already reaches the whole web, and recent failures with host, error and time. The header's **Network** indicator (`data-network`, `data-health`) opens it: a status light, green for `ok`, yellow for `limited` and red for `failing`, with the state in its text and label and `detail` as its tooltip; on a phone, a cloud icon for the state. Offered only when the model has a `network` port. |
|
|
152
152
|
| `<slicc-tray>` | The tray indicator in the header: connection, the float's name, followers and budget; its panel adds role, runtime, spend, the follower list, the join link, and disconnect or reconnect. |
|
|
153
153
|
| `<slicc-confirm>` | The confirmation dialog `confirm()` opens. Not for direct use. |
|
|
154
154
|
| `<slicc-prompt>` | The name dialog `prompt()` opens. Not for direct use. |
|
|
@@ -162,7 +162,7 @@ Keys: <kbd>Alt</kbd>+<kbd>1</kbd>… opens and focuses a panel, <kbd>F6</kbd> an
|
|
|
162
162
|
|
|
163
163
|
### Confirmations
|
|
164
164
|
|
|
165
|
-
Destructive actions ask first: reverting one change or all, deleting a frozen cone, forgetting a memory, disconnecting an account or the tray, and closing a terminal. `confirm({ title, body, action, variant, trigger })`, exported from `dist/slicc-ui.js`, opens a modal alert dialog (1.12 `sp-alert-dialog`, as Gen2 has no dialog yet) inside `<slicc-app>`'s themed shadow root and resolves `true` on the action and `false` on Cancel or <kbd>Esc</kbd>. Focus starts on Cancel and goes back to `trigger` (default: the focused element) when it closes. `variant` is `destructive` (default, a negative action button) for actions that lose data for good, or `confirmation` (accent) for ones you can take back, like disconnecting. Title the dialog with a question, say what can’t be undone in `body`, and name the action with a verb.
|
|
165
|
+
Destructive actions ask first: reverting one change or all, deleting a frozen cone, forgetting a memory, disconnecting an account or the tray, and closing a terminal. `confirm({ title, body, action, variant, cancel, trigger })`, exported from `dist/slicc-ui.js`, opens a modal alert dialog (1.12 `sp-alert-dialog`, as Gen2 has no dialog yet) inside `<slicc-app>`'s themed shadow root and resolves `true` on the action and `false` on Cancel or <kbd>Esc</kbd>. `cancel` renames Cancel, for example “Don’t allow” next to “Allow” in a permission prompt. Focus starts on Cancel and goes back to `trigger` (default: the focused element) when it closes. `variant` is `destructive` (default, a negative action button) for actions that lose data for good, or `confirmation` (accent) for ones you can take back, like disconnecting. Title the dialog with a question, say what can’t be undone in `body`, and name the action with a verb.
|
|
166
166
|
|
|
167
167
|
```js
|
|
168
168
|
import { confirm } from './dist/slicc-ui.js';
|
|
@@ -195,21 +195,22 @@ Paths are the agent's: `/shared/…` and `/home/…`, nothing else. A refusal or
|
|
|
195
195
|
|
|
196
196
|
| Port | Later backed by | |
|
|
197
197
|
| :--- | :--- | :--- |
|
|
198
|
-
| `agent` | `@ai-ecoverse/slicc-agent` | Cones and scoops, the active agent, conversations, `send` (with attachments, as a send, a steer or a queued follow-up) and `stop`, the queue, suggestions, answers to questions, permission decisions, compaction, clearing, the model per agent and new scoops. The optional `rewind(agentId, messageId)` drops the user turn before that message and everything after it, and resolves with the turn's prompt (text and attachments) for the composer, or `null`. The optional `drop(agentId)` removes a scoop: it stops and its working folder is deleted, while its conversation and reports are kept, and `createCone(name)` resolves with a new cone; the dummy rejects a cone name that is taken. `freeze(agentId)` is optional too: without it, `/freeze` and the Freezer's freeze button don't show. Assistant messages stream: the same message is re-emitted as its parts grow and its tool calls go from `running` to `done`. |
|
|
198
|
+
| `agent` | `@ai-ecoverse/slicc-agent` | Cones and scoops, the active agent, conversations, `send` (with attachments, as a send, a steer or a queued follow-up) and `stop`, the queue, suggestions, answers to questions, permission decisions, compaction, clearing (`clear(agentId)` starts a new chat: on a cone, a port with `freeze` first puts the old chat in the freezer as its own entry, which thaws into a cone of its own; a scoop's chat is just reset), the model per agent and new scoops. The optional `rewind(agentId, messageId)` drops the user turn before that message and everything after it, and resolves with the turn's prompt (text and attachments) for the composer, or `null`. The optional `drop(agentId)` removes a scoop: it stops and its working folder is deleted, while its conversation and reports are kept, and `createCone(name)` resolves with a new cone; the dummy rejects a cone name that is taken, and names a thawed cone `<name> (earlier)`, then `(earlier 2)` and so on, when its name is taken. `freeze(agentId)` is optional too: without it, `/freeze` and the Freezer's freeze button don't show. Assistant messages stream: the same message is re-emitted as its parts grow and its tool calls go from `running` to `done`. |
|
|
199
199
|
| `files` | slicc-kernel's OPFS | `list`, `read`, `write`, `remove`, and pending changes with their before and after text (`accept`, `revert`). The optional `mountFolder()` asks for a local folder and resolves with its mount point (for example `/mnt/photos`), or `null` when the user cancels; the panel calls it synchronously in the click, so the port can call `showDirectoryPicker()`. The optional `mounts()` lists the mount points, and `eject(path)` unmounts one (the folder stays on disk). `mountFolder(path)` inserts the picked folder at a mount point that waits for one; the optional `needsFolder()` lists those mount points. The port emits `mounts` and then `files` after every mount and eject, including those made from the shell, and `mounts` whenever `needsFolder()` changes. |
|
|
200
200
|
| `terminals` | slicc-kernel's terminal API | Terminal sessions; `backend(id)` returns a `TerminalBackend` for `<slicc-terminal>`. |
|
|
201
201
|
| `browser` | `@ai-ecoverse/slicc-cdp` | Tabs, the active tab, `open`, `navigate`, `close`, `screenshot`. |
|
|
202
202
|
| `settings` | local storage | Theme, model, thinking level, composer and diff preferences, the models on offer, and accounts. |
|
|
203
|
+
| `changes` (optional) | `@ai-ecoverse/slicc-agent` | Pending changes from git instead of the file system: `changes()`, `accept(path)` (stage), `revert(path)` (discard), and a `changes` event, as on `files`. When present, the UI reads changes only from this port, including the rail's count. A `Change` may carry `repo`, its repository root; put the active agent's repository first. The optional `unavailable()` returns why there can be no changes (no git, no repository), which the panel shows as is, or `null`; emit `changes` when it flips. |
|
|
203
204
|
| `memory` | `@ai-ecoverse/slicc-agent` | Memories with scope, section, tag and body; `save` and `remove`. `source: 'notes'` marks free text the panel shows as an entry titled after its section; saving it makes it an entry. The optional `scopes()` lists the scope picker's choices as `{ id, label, group }`, ungrouped first, then under “Cones” and “Roles”; without it the picker offers “Everyone” (`global`) and each cone. The panel re-reads `scopes()` on `memories` and `agents`, so emit `memories` when the list changes. A scope that disappears falls back to `global`. |
|
|
204
205
|
| `monitor` | all of them | A snapshot of vitals, alerts and sections, re-emitted as the system changes, and `resync`. |
|
|
205
206
|
| `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. The optional `call(id, method, args)` serves the [sprinkle bridge](#sprinkle-bridge) for sprinkle `id`: `readFile` and `exists` (`[path]`) resolve with a string and a boolean, `getState` (`[]`) with the saved value or `null`, and `setState` (`[value]`) once it is saved. The adapter owns path policy and keeps state per sprinkle; `<slicc-sprinkle>` awaits `getState` before it builds a frame, mirrors what the frame saves, and forwards only these four methods from its own frame. The dummy keeps state in memory and maps `/shared/x` to `/home/x` in its files, refusing anything outside `/home`. |
|
|
206
207
|
| `tray` | the tray protocol | Connection, role, float kind, followers, spend and budget; `reconnect` and `disconnect`. |
|
|
207
208
|
| `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. Use `queued` for a row that waits for another component before it starts; it reads "Waiting" and doesn't count as updating. A `failed` row with an installed `from` version reads "Update failed". `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. |
|
|
208
|
-
| `network` (optional) | BIOS | `status()` returns the `NetworkStatus`: `route` (`proxy` for slicc-node, `extension` for the Chrome extension relay, `page` for the page's own fetch, limited by CORS, or `null`), `health` (`ok`, `limited` or `failing`, decided by the port), a one-line `detail`, recent `failures` (`{ url, error, at }`, newest first) and an optional `
|
|
209
|
+
| `network` (optional) | BIOS | `status()` returns the `NetworkStatus`: `route` (`proxy` for slicc-node, `extension` for the Chrome extension relay, `page` for the page's own fetch, limited by CORS, or `null`), `health` (`ok`, `limited` or `failing`, decided by the port), a one-line `detail`, recent `failures` (`{ url, error, at }`, newest first), an optional `extensionUrl` and an optional `browser` (`{ via, detail?, declined? }`, `via` being `extension`, `proxy` or `null` when browser automation isn't available, and `declined: true` once the user declined browser control for the session). Emit `network` when it changes. The optional `check()` tests the route again. Without the port, the indicator and the Network panel don't show. |
|
|
209
210
|
|
|
210
|
-
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`. `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. `createDummyModel({ network: 'ok' | 'limited' | 'failing' | 'off' })` (or `?network=` on `/ui/`, default `limited`) sets the dummy network: slicc-node, the page fetch with CORS failures, or no route, all invented; `off` leaves out the port. `model.network.setScenario()` switches it and Check again re-emits after a short wait. `networkFixtures` and `DummyNetwork` are exported from `/dummy`.
|
|
211
|
+
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`. `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. `createDummyModel({ network: 'ok' | 'limited' | 'failing' | 'off' })` (or `?network=` on `/ui/`, default `limited`) sets the dummy network: slicc-node (with browser automation through it), the page fetch with CORS failures, or no route, all invented; `off` leaves out the port. `model.network.setScenario()` switches it and Check again re-emits after a short wait. `networkFixtures` and `DummyNetwork` are exported from `/dummy`. `createDummyModel({ changes: 'files' | 'git' | 'nogit' })` (or `?changes=` on `/ui/`, default `files`) adds a git `changes` port: `git` lists the pending changes under `/workspace/harbor` and `/workspace/skills` with their `repo` and no author, and `nogit` reports git as unavailable. `DummyChanges` is exported from `/dummy`.
|
|
211
212
|
|
|
212
|
-
On phones the tray and the network indicator
|
|
213
|
+
On phones the update status and the tray show only their status light and the network indicator a cloud icon, with the text in their labels and tooltips; the agent picker keeps room for the cone's name, cut with an ellipsis when long, and the bottom rail scrolls when needed. The update status comes first so progress and failures remain reachable on narrow screens.
|
|
213
214
|
|
|
214
215
|
### Kernel model
|
|
215
216
|
|
|
@@ -235,7 +236,7 @@ Each section is its own port, so an embedder can mix real and dummy per section,
|
|
|
235
236
|
|
|
236
237
|
`<slicc-file-view>` has **Edit**: the file opens in a plain text area, and **Save** or `Mod+S` writes it through `files.write`; `Escape` cancels.
|
|
237
238
|
|
|
238
|
-
The `kitchen-sink` cone holds every kind of message, content and lick in one conversation, for design work and screenshots. The dummy's fixtures are invented: a small forecast API called harbor, with cones, scoops, a conversation per agent, pending changes, browser tabs and accounts. Its only sprinkles are SLICC's own: `welcome` (the onboarding wizard, as a dip in the sliccy cone) and `suggestions`, copied from `slicc` (`packages/vfs-root/shared/sprinkles/`, commit `aa29784`) with their comments stripped, as is the sprinkle theme in `src/app/sprinkle-theme.css`. `suggestions` reads its stream from the invented `/home/.gelatiere/suggestions.json` through the bridge; there is no `/home/.welcomed`, so `welcome` starts its wizard. Its replies are scripted by keyword (tests, fix or add, open or docs, files, anything else), and their tool calls act on the other ports: an edit writes a file and shows up as a change, a browse opens a tab.
|
|
239
|
+
The `kitchen-sink` cone holds every kind of message, content and lick in one conversation, for design work and screenshots. The dummy's fixtures are invented: a small forecast API called harbor, with cones, scoops, a conversation per agent, pending changes (one of them binary, without a diff), browser tabs and accounts. Its only sprinkles are SLICC's own: `welcome` (the onboarding wizard, as a dip in the sliccy cone) and `suggestions`, copied from `slicc` (`packages/vfs-root/shared/sprinkles/`, commit `aa29784`) with their comments stripped, as is the sprinkle theme in `src/app/sprinkle-theme.css`. `suggestions` reads its stream from the invented `/home/.gelatiere/suggestions.json` through the bridge; there is no `/home/.welcomed`, so `welcome` starts its wizard. Its replies are scripted by keyword (tests, fix or add, open or docs, files, anything else), and their tool calls act on the other ports: an edit writes a file and shows up as a change, a browse opens a tab.
|
|
239
240
|
|
|
240
241
|
### Distribution
|
|
241
242
|
|
package/dist/slicc-dummy.js
CHANGED
|
@@ -7,6 +7,38 @@ import {
|
|
|
7
7
|
} from "./chunk-T5NHW4KC.js";
|
|
8
8
|
import "./chunk-AXQFWXYZ.js";
|
|
9
9
|
|
|
10
|
+
// src/dummy/changes.ts
|
|
11
|
+
var repos = ["/workspace/harbor", "/workspace/skills"];
|
|
12
|
+
var noGit = "Changes needs git and a git repository. Install git with pnpm add -g @ai-ecoverse/wasm-git, then git init, or clone with slicc-node or the extension connected.";
|
|
13
|
+
function repoOf(path) {
|
|
14
|
+
return repos.find((repo) => path.startsWith(`${repo}/`));
|
|
15
|
+
}
|
|
16
|
+
var DummyChanges = class {
|
|
17
|
+
#files;
|
|
18
|
+
#git;
|
|
19
|
+
constructor(files3, git) {
|
|
20
|
+
this.#files = files3;
|
|
21
|
+
this.#git = git;
|
|
22
|
+
}
|
|
23
|
+
on = (type, listener) => this.#files.on(type, () => listener(this.changes()));
|
|
24
|
+
changes() {
|
|
25
|
+
if (!this.#git) return [];
|
|
26
|
+
return this.#files.changes().flatMap((change) => {
|
|
27
|
+
const repo = repoOf(change.path);
|
|
28
|
+
return repo ? [{ ...change, agentId: null, repo }] : [];
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
accept(path) {
|
|
32
|
+
this.#files.accept(path);
|
|
33
|
+
}
|
|
34
|
+
revert(path) {
|
|
35
|
+
return this.#files.revert(path);
|
|
36
|
+
}
|
|
37
|
+
unavailable() {
|
|
38
|
+
return this.#git ? null : noGit;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
10
42
|
// src/dummy/script.ts
|
|
11
43
|
var units = "/workspace/harbor/src/lib/units.ts";
|
|
12
44
|
var kelvin = `
|
|
@@ -232,6 +264,7 @@ var DummyAgent = class extends Emitter {
|
|
|
232
264
|
#effects;
|
|
233
265
|
#next = 1;
|
|
234
266
|
#cones = 1;
|
|
267
|
+
#chats = 1;
|
|
235
268
|
constructor(agents2, conversations2, effects, clock2, queues2 = {}, frozen2 = []) {
|
|
236
269
|
super();
|
|
237
270
|
this.#clock = clock2;
|
|
@@ -533,11 +566,28 @@ var DummyAgent = class extends Emitter {
|
|
|
533
566
|
if (!this.#messages.has(agentId)) return;
|
|
534
567
|
this.#runs.get(agentId)?.steers.splice(0);
|
|
535
568
|
this.stop(agentId);
|
|
569
|
+
const agent = this.#agent(agentId);
|
|
570
|
+
const messages = this.#messages.get(agentId);
|
|
571
|
+
if (agent.kind === "cone" && messages.length) this.#shelve(agent, messages);
|
|
536
572
|
this.#messages.set(agentId, []);
|
|
537
573
|
this.#queues.set(agentId, []);
|
|
538
574
|
this.#suggestions.delete(agentId);
|
|
539
575
|
this.emit("messages", agentId);
|
|
540
576
|
}
|
|
577
|
+
#shelve(agent, messages) {
|
|
578
|
+
const id = `${agent.id}-chat-${this.#chats++}`;
|
|
579
|
+
const first = messages.find((message) => message.role === "user");
|
|
580
|
+
this.#frozen.unshift({
|
|
581
|
+
id,
|
|
582
|
+
name: agent.name,
|
|
583
|
+
title: first?.role === "user" ? first.text.slice(0, 80) : agent.name,
|
|
584
|
+
model: agent.model,
|
|
585
|
+
messages: messages.length,
|
|
586
|
+
frozenAt: Date.now()
|
|
587
|
+
});
|
|
588
|
+
this.#ice.set(id, [{ agent: { ...agent, id, status: "idle", unread: 0 }, messages }]);
|
|
589
|
+
this.emit("frozen", this.frozen());
|
|
590
|
+
}
|
|
541
591
|
setModel(agentId, model) {
|
|
542
592
|
const agent = this.#agent(agentId);
|
|
543
593
|
if (!agent) return;
|
|
@@ -679,7 +729,15 @@ var DummyAgent = class extends Emitter {
|
|
|
679
729
|
return { ...agent };
|
|
680
730
|
}
|
|
681
731
|
this.#ice.delete(id);
|
|
682
|
-
this.#frozen = this.#frozen.filter((
|
|
732
|
+
this.#frozen = this.#frozen.filter((cone2) => cone2.id !== id);
|
|
733
|
+
const cone = ice[0].agent;
|
|
734
|
+
const taken = (name) => this.#agents.some((agent) => agent.kind === "cone" && agent.name === name);
|
|
735
|
+
if (taken(cone.name)) {
|
|
736
|
+
const base = cone.name;
|
|
737
|
+
let n = 1;
|
|
738
|
+
cone.name = `${base} (earlier)`;
|
|
739
|
+
while (taken(cone.name)) cone.name = `${base} (earlier ${++n})`;
|
|
740
|
+
}
|
|
683
741
|
for (const { agent, messages } of ice) {
|
|
684
742
|
this.#agents.push(agent);
|
|
685
743
|
this.#messages.set(agent.id, messages);
|
|
@@ -1961,8 +2019,8 @@ var DummyFiles = class extends Emitter {
|
|
|
1961
2019
|
for (const [path, text] of Object.entries(contents)) this.#put(path, text, 0);
|
|
1962
2020
|
for (const change of changes) this.#changes.set(change.path, { ...change });
|
|
1963
2021
|
for (const change of changes) {
|
|
1964
|
-
if (change.
|
|
1965
|
-
else this.#put(change.path, change.after, 0);
|
|
2022
|
+
if (change.status === "deleted") this.#contents.delete(change.path);
|
|
2023
|
+
else if (change.after !== null) this.#put(change.path, change.after, 0);
|
|
1966
2024
|
}
|
|
1967
2025
|
}
|
|
1968
2026
|
#mkdirs(path) {
|
|
@@ -2037,8 +2095,8 @@ var DummyFiles = class extends Emitter {
|
|
|
2037
2095
|
if (!change) return;
|
|
2038
2096
|
await this.#clock.sleep();
|
|
2039
2097
|
this.#changes.delete(path);
|
|
2040
|
-
if (change.before
|
|
2041
|
-
else
|
|
2098
|
+
if (change.before !== null) this.#put(path, change.before, Date.now());
|
|
2099
|
+
else if (change.status === "added") this.#contents.delete(path);
|
|
2042
2100
|
this.#announce(path);
|
|
2043
2101
|
}
|
|
2044
2102
|
async #mountFolder(mount, point) {
|
|
@@ -2982,6 +3040,7 @@ var files2 = {
|
|
|
2982
3040
|
"/workspace/harbor/src/lib/cache.ts": cacheBefore,
|
|
2983
3041
|
"/workspace/harbor/src/lib/units.ts": units2,
|
|
2984
3042
|
"/workspace/harbor/src/legacy/xml.ts": legacyXml,
|
|
3043
|
+
"/workspace/harbor/static/radar.png": "\x89PNG\r\n\n",
|
|
2985
3044
|
"/workspace/harbor/test/units.test.ts": unitsTest,
|
|
2986
3045
|
"/workspace/skills/release-notes/SKILL.md": skill,
|
|
2987
3046
|
"/workspace/skills/release-notes/scripts/collect.jsh": collect,
|
|
@@ -3027,8 +3086,23 @@ var pending = [
|
|
|
3027
3086
|
before: legacyXml,
|
|
3028
3087
|
after: null,
|
|
3029
3088
|
agentId: "cone-harbor"
|
|
3089
|
+
},
|
|
3090
|
+
{
|
|
3091
|
+
path: "/workspace/harbor/static/radar.png",
|
|
3092
|
+
status: "modified",
|
|
3093
|
+
before: null,
|
|
3094
|
+
after: null,
|
|
3095
|
+
agentId: "scoop-otter"
|
|
3030
3096
|
}
|
|
3031
3097
|
];
|
|
3098
|
+
var skillEdit = {
|
|
3099
|
+
path: "/workspace/skills/release-notes/SKILL.md",
|
|
3100
|
+
status: "modified",
|
|
3101
|
+
before: skill,
|
|
3102
|
+
after: `${skill}4. Link each change to its pull request.
|
|
3103
|
+
`,
|
|
3104
|
+
agentId: null
|
|
3105
|
+
};
|
|
3032
3106
|
var models = [
|
|
3033
3107
|
{ id: "claude-opus-5-5", label: "Claude Opus 5.5", provider: "Anthropic", images: true },
|
|
3034
3108
|
{ id: "claude-sonnet-5-5", label: "Claude Sonnet 5.5", provider: "Anthropic", images: true },
|
|
@@ -3527,11 +3601,13 @@ var DummyMonitor = class extends Emitter {
|
|
|
3527
3601
|
model.agent.on("agents", update);
|
|
3528
3602
|
model.terminals.on("terminals", update);
|
|
3529
3603
|
model.browser.on("tabs", update);
|
|
3530
|
-
model.
|
|
3604
|
+
const changes = model.changes ?? model.files;
|
|
3605
|
+
changes.on("changes", update);
|
|
3531
3606
|
model.tray.on("status", update);
|
|
3532
3607
|
}
|
|
3533
3608
|
snapshot() {
|
|
3534
3609
|
const { agent, terminals: terminals2, browser, files: files3, sprinkles: sprinkles2, tray: tray2 } = this.#model;
|
|
3610
|
+
const changes = this.#model.changes ?? files3;
|
|
3535
3611
|
const listed = agent.list();
|
|
3536
3612
|
const agents2 = listed.filter((candidate) => candidate.kind === "cone").flatMap((cone) => [cone, ...listed.filter((candidate) => candidate.parentId === cone.id)]);
|
|
3537
3613
|
const active = agents2.filter((candidate) => candidate.status !== "idle").length;
|
|
@@ -3616,7 +3692,11 @@ var DummyMonitor = class extends Emitter {
|
|
|
3616
3692
|
{
|
|
3617
3693
|
id: "changes",
|
|
3618
3694
|
label: "Pending changes",
|
|
3619
|
-
rows:
|
|
3695
|
+
rows: (changes.unavailable?.() ? [] : changes.changes()).map((change) => ({
|
|
3696
|
+
name: change.path,
|
|
3697
|
+
meta: change.status,
|
|
3698
|
+
status: "warn"
|
|
3699
|
+
}))
|
|
3620
3700
|
},
|
|
3621
3701
|
{
|
|
3622
3702
|
id: "sprinkles",
|
|
@@ -3655,7 +3735,8 @@ function networkFixtures(scenario, now2 = Date.now()) {
|
|
|
3655
3735
|
health: "ok",
|
|
3656
3736
|
detail: "slicc-node on localhost:5710 reaches every site.",
|
|
3657
3737
|
failures: [],
|
|
3658
|
-
extensionUrl
|
|
3738
|
+
extensionUrl,
|
|
3739
|
+
browser: { via: "proxy", detail: "Chrome on localhost:9222." }
|
|
3659
3740
|
};
|
|
3660
3741
|
}
|
|
3661
3742
|
if (scenario === "limited") {
|
|
@@ -3675,7 +3756,8 @@ function networkFixtures(scenario, now2 = Date.now()) {
|
|
|
3675
3756
|
at: now2 - 14 * minute
|
|
3676
3757
|
}
|
|
3677
3758
|
],
|
|
3678
|
-
extensionUrl
|
|
3759
|
+
extensionUrl,
|
|
3760
|
+
browser: { via: null }
|
|
3679
3761
|
};
|
|
3680
3762
|
}
|
|
3681
3763
|
return {
|
|
@@ -3699,7 +3781,8 @@ function networkFixtures(scenario, now2 = Date.now()) {
|
|
|
3699
3781
|
at: now2 - 75 * minute
|
|
3700
3782
|
}
|
|
3701
3783
|
],
|
|
3702
|
-
extensionUrl
|
|
3784
|
+
extensionUrl,
|
|
3785
|
+
browser: { via: null }
|
|
3703
3786
|
};
|
|
3704
3787
|
}
|
|
3705
3788
|
var DummyNetwork = class extends Emitter {
|
|
@@ -4171,11 +4254,13 @@ function createDummyModel({
|
|
|
4171
4254
|
storage = null,
|
|
4172
4255
|
updates = "current",
|
|
4173
4256
|
mounts = "off",
|
|
4174
|
-
network = "limited"
|
|
4257
|
+
network = "limited",
|
|
4258
|
+
changes = "files"
|
|
4175
4259
|
} = {}) {
|
|
4176
4260
|
const time = clock(delay);
|
|
4177
4261
|
const mount = mounts === "off" ? null : { scenario: mounts, point: mountPoint, files: mounted };
|
|
4178
|
-
const
|
|
4262
|
+
const pending2 = changes === "git" ? [...pending, skillEdit] : pending;
|
|
4263
|
+
const files3 = new DummyFiles(files2, directories, pending2, time, mount);
|
|
4179
4264
|
const browser = new DummyBrowser(tabs, time);
|
|
4180
4265
|
const agent = new DummyAgent(
|
|
4181
4266
|
agents,
|
|
@@ -4205,11 +4290,13 @@ function createDummyModel({
|
|
|
4205
4290
|
sprinkles: new DummySprinkles(sprinkles, agent, files3),
|
|
4206
4291
|
tray: new DummyTray(tray, time),
|
|
4207
4292
|
updates: new DummyUpdates(updates, time),
|
|
4208
|
-
...network === "off" ? {} : { network: new DummyNetwork(network, time) }
|
|
4293
|
+
...network === "off" ? {} : { network: new DummyNetwork(network, time) },
|
|
4294
|
+
...changes === "files" ? {} : { changes: new DummyChanges(files3, changes === "git") }
|
|
4209
4295
|
};
|
|
4210
4296
|
return { ...base, monitor: new DummyMonitor(base) };
|
|
4211
4297
|
}
|
|
4212
4298
|
export {
|
|
4299
|
+
DummyChanges,
|
|
4213
4300
|
DummyNetwork,
|
|
4214
4301
|
DummyUpdates,
|
|
4215
4302
|
createDummyModel,
|