@ai-ecoverse/slicc-spectrum 1.3.0 → 1.5.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 +32 -6
- package/dist/{chunk-JASEW37G.js → chunk-2BBOXTOJ.js} +5 -3
- package/dist/chunk-2EPADERK.js +25260 -0
- package/dist/chunk-2EPADERK.js.map +7 -0
- package/dist/{chunk-HBUX7E54.js → chunk-4JUIYZ4Q.js} +4 -4
- package/dist/{chunk-OFQ56DAN.js → chunk-CDYGCBW7.js} +5 -5
- package/dist/{chunk-YPQKCWWG.js → chunk-FXM4K5WL.js} +4 -4
- package/dist/{chunk-I2NMYJ25.js → chunk-H57UPFSK.js} +3 -3
- package/dist/{chunk-4GQ6THC2.js → chunk-JCRICTXR.js} +6 -6
- package/dist/{chunk-6JNYNXUQ.js → chunk-LR5GBIK7.js} +7 -7
- package/dist/{chunk-6N3GZNXH.js → chunk-MJOCPOXZ.js} +8 -8
- package/dist/{chunk-5XWUZJTT.js → chunk-N27WNL5Q.js} +4 -4
- package/dist/chunk-WCSKGA5W.js +30 -0
- package/dist/chunk-WCSKGA5W.js.map +7 -0
- package/dist/chunk-YWO2TNED.js +71 -0
- package/dist/chunk-YWO2TNED.js.map +7 -0
- package/dist/slicc-dummy.js +981 -115
- package/dist/slicc-dummy.js.map +4 -4
- package/dist/slicc-kernel-model.js +379 -0
- package/dist/slicc-kernel-model.js.map +7 -0
- package/dist/slicc-terminal.js +3 -26
- package/dist/slicc-terminal.js.map +3 -3
- package/dist/slicc-ui.js +2638 -2243
- package/dist/slicc-ui.js.map +4 -4
- package/dist/types/app/app.d.ts +5 -1
- package/dist/types/app/files.d.ts +11 -0
- package/dist/types/app/fonts.d.ts +8 -0
- package/dist/types/app/lucide.d.ts +24 -0
- package/dist/types/app/messages.d.ts +2 -1
- package/dist/types/app/panels.d.ts +3 -3
- package/dist/types/app/spectrum.d.ts +2 -0
- package/dist/types/app/sprinkle.d.ts +18 -1
- package/dist/types/kernel/files.d.ts +20 -0
- package/dist/types/kernel/idle.d.ts +51 -0
- package/dist/types/kernel/index.d.ts +17 -0
- package/dist/types/kernel/terminals.d.ts +21 -0
- package/dist/types/kernel.d.ts +7 -0
- package/dist/types/model/types.d.ts +4 -0
- package/package.json +7 -2
- /package/dist/{chunk-JASEW37G.js.map → chunk-2BBOXTOJ.js.map} +0 -0
- /package/dist/{chunk-HBUX7E54.js.map → chunk-4JUIYZ4Q.js.map} +0 -0
- /package/dist/{chunk-OFQ56DAN.js.map → chunk-CDYGCBW7.js.map} +0 -0
- /package/dist/{chunk-YPQKCWWG.js.map → chunk-FXM4K5WL.js.map} +0 -0
- /package/dist/{chunk-5XWUZJTT.js.map → chunk-H57UPFSK.js.map} +0 -0
- /package/dist/{chunk-4GQ6THC2.js.map → chunk-JCRICTXR.js.map} +0 -0
- /package/dist/{chunk-6JNYNXUQ.js.map → chunk-LR5GBIK7.js.map} +0 -0
- /package/dist/{chunk-6N3GZNXH.js.map → chunk-MJOCPOXZ.js.map} +0 -0
- /package/dist/{chunk-I2NMYJ25.js.map → chunk-N27WNL5Q.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
|
|
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)).
|
|
107
107
|
|
|
108
108
|
```html
|
|
109
109
|
<slicc-app></slicc-app>
|
|
@@ -121,6 +121,8 @@ Things found while building this against wterm 0.5.4, recorded here, not pushed
|
|
|
121
121
|
|
|
122
122
|
The layout follows the width of `<slicc-app>`, which it reflects as its `screen` attribute: `phone` (under 640 px) has one column, `tablet` (under 1200 px) two, `desktop` three, like SLICC v6. Each screen class starts with few panels open and saves its own layout (`slicc-ui.layout.<screen>`). Every surface has a home side, left, center or right. Closed panels wait as icons in the left and right rails (on a phone, in one bar at the bottom); one click puts a panel back on its side, next to its neighbours.
|
|
123
123
|
|
|
124
|
+
`surfaces` on `<slicc-app>` (default: every surface, exported as `surfaces`) is what the app offers: the panels it can open, the View menu, the rails and `Alt+1…9`. A saved layout with a panel it doesn't offer is dropped for the default. An embedder can pass a subset with its own `open` per screen class. The agent picker, the tray and the agent part of the status bar show only when `chat` is offered, the change count only with `changes`, and the settings button only with `settings`. Elements with `slot="status"` go into the status bar, after the built-in items.
|
|
125
|
+
|
|
124
126
|
### Fonts
|
|
125
127
|
|
|
126
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.
|
|
@@ -144,7 +146,7 @@ Text is Adobe Clean and code Spectrum's Source Code Pro. Source Code Pro (OFL) i
|
|
|
144
146
|
| `<slicc-memory>` | What agents remember, globally or per cone, grouped by section: search, filter by tag, expand, edit, add and forget. |
|
|
145
147
|
| `<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). |
|
|
146
148
|
| `<slicc-freezer>` | Frozen cones, archived with their scoops: thaw to bring one back, delete, or freeze the active cone (also `/freeze`). |
|
|
147
|
-
| `<slicc-sprinkle>` |
|
|
149
|
+
| `<slicc-sprinkle>` | A SLICC sprinkle (`.shtml`), as a panel or, with `inline`, as a dip in the chat that grows to fit. 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()`). Its only way back is `slicc.lick({ action, data })`, which reaches the owning cone as a `sprinkle` lick. Panel sprinkles sit at the top of the right rail with their Lucide icon. |
|
|
148
150
|
| `<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. |
|
|
149
151
|
| `<slicc-file-tree>` | Generic. [`@pierre/trees`](https://www.npmjs.com/package/@pierre/trees) through its `web-components` entry: `paths` (folders end in `/`), `gitStatus`, `expanded`, `reveal(path, focus)`. Fires `file-open` on click and on <kbd>Enter</kbd>. |
|
|
150
152
|
| `<slicc-code-view>` | Generic. A highlighted file through [`@pierre/diffs`](https://www.npmjs.com/package/@pierre/diffs): `path`, `contents`, `color`. |
|
|
@@ -167,14 +169,38 @@ Keys: <kbd>Alt</kbd>+<kbd>1</kbd>… opens and focuses a panel, <kbd>F6</kbd> an
|
|
|
167
169
|
| `settings` | local storage | Theme, model, thinking level, composer and diff preferences, the models on offer, and accounts. |
|
|
168
170
|
| `memory` | `@ai-ecoverse/slicc-agent` | Memories with scope, section, tag and body; `save` and `remove`. |
|
|
169
171
|
| `monitor` | all of them | A snapshot of vitals, alerts and sections, re-emitted as the system changes, and `resync`. |
|
|
170
|
-
| `sprinkles` | `@ai-ecoverse/slicc-agent` |
|
|
172
|
+
| `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. |
|
|
171
173
|
| `tray` | the tray protocol | Connection, role, float kind, followers, spend and budget; `reconnect` and `disconnect`. |
|
|
172
174
|
|
|
173
|
-
|
|
175
|
+
### Kernel model
|
|
176
|
+
|
|
177
|
+
`@ai-ecoverse/slicc-spectrum/kernel` (`dist/slicc-kernel-model.js`) backs the sections that work without an agent:
|
|
178
|
+
|
|
179
|
+
```js
|
|
180
|
+
import { createKernel } from '@ai-ecoverse/slicc-kernel';
|
|
181
|
+
import { createKernelModel } from '@ai-ecoverse/slicc-spectrum/kernel';
|
|
182
|
+
import { surfaces } from '@ai-ecoverse/slicc-spectrum/ui';
|
|
183
|
+
|
|
184
|
+
const root = await navigator.storage.getDirectory();
|
|
185
|
+
const kernel = await createKernel({ root });
|
|
186
|
+
const app = document.querySelector('slicc-app');
|
|
187
|
+
app.surfaces = surfaces.filter((item) => item.id === 'files' || item.id === 'terminal');
|
|
188
|
+
app.model = createKernelModel({ kernel, root, storage: localStorage, files: { skip: ['/node_modules'] } });
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
- **`KernelFiles`** lists the OPFS root as the tree, reads and writes files through the OPFS API, and removes them recursively. Directories in `skip` show up but aren't scanned. `start()` rescans on every `FileSystemObserver` record, or every `interval` ms (default 2000) where the browser can't observe OPFS, and emits `files` and a `file` per changed file, so open tabs follow what the terminal writes. Without an agent there are no pending changes.
|
|
192
|
+
- **`KernelTerminals`** opens `bash -i` (or `argv`) in `cwd` (default `/home`) through `kernelBackend`, one session per terminal, as many as the user opens. `open` (default 1) is how many it starts with.
|
|
193
|
+
- Everything else is idle (`IdleAgent`, `IdleBrowser`, `IdleMemory`, `IdleMonitor`, `IdleSprinkles`, `IdleTray`, from `idleModel(storage)`): empty lists, and actions that need a backend throw. Settings are kept in `storage`. Leave their surfaces out of `surfaces`.
|
|
194
|
+
|
|
195
|
+
Each section is its own port, so an embedder can mix real and dummy per section, for example `{ ...createDummyModel(), files: new KernelFiles(root) }`.
|
|
196
|
+
|
|
197
|
+
`<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.
|
|
198
|
+
|
|
199
|
+
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`. Without file access, `suggestions` shows its empty state. 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.
|
|
174
200
|
|
|
175
201
|
### Distribution
|
|
176
202
|
|
|
177
|
-
The UI is ESM with code splitting: `slicc-ui.js`, `slicc-dummy.js` and `chunk-*.js` next to them in `dist/`, with no bare imports, so the folder can be served as plain files from OPFS. dockview's ESM build has no CSS; the build takes it from dockview's UMD bundle. `@pierre/diffs` highlights with Shiki. `dist/` carries the grammars SLICC needs most (CSS, diff, HTML, JavaScript, JSON, JSX, Markdown, Python, shell, SQL, TOML, TSX, TypeScript, XML, YAML); every other grammar and theme stays out of `dist/` and loads the first time a file needs it. It loads from `grammarBase` first, if set, and then from `https://cdn.jsdelivr.net/npm/@shikijs/` (pinned to the installed version, CORS and CORP headers set). For offline use, install the optional peer dependencies `@shikijs/langs` and `@shikijs/themes` (pinned to the same version; plain relative ESM, no bare imports), serve them, and point `grammarBase` (on `<slicc-app>`, or `setGrammarBase()`) at the folder holding `langs/` and `themes/`, for example `/node_modules/@shikijs/`. The build fails if the peer versions drift from the installed ones. `SLICC_GRAMMAR_BASE` points the build at another CDN. `dist/` is about 55 files and 5.5 MB of JavaScript. The build fails if React is bundled; `@pierre/trees` lists React as a peer dependency, so npm installs it, but the `web-components` entry runs on Preact. Types are in `dist/types/ui.d.ts` and `dist/types/
|
|
203
|
+
The UI is ESM with code splitting: `slicc-ui.js`, `slicc-dummy.js` and `chunk-*.js` next to them in `dist/`, with no bare imports, so the folder can be served as plain files from OPFS. dockview's ESM build has no CSS; the build takes it from dockview's UMD bundle. `@pierre/diffs` highlights with Shiki. `dist/` carries the grammars SLICC needs most (CSS, diff, HTML, JavaScript, JSON, JSX, Markdown, Python, shell, SQL, TOML, TSX, TypeScript, XML, YAML); every other grammar and theme stays out of `dist/` and loads the first time a file needs it. It loads from `grammarBase` first, if set, and then from `https://cdn.jsdelivr.net/npm/@shikijs/` (pinned to the installed version, CORS and CORP headers set). For offline use, install the optional peer dependencies `@shikijs/langs` and `@shikijs/themes` (pinned to the same version; plain relative ESM, no bare imports), serve them, and point `grammarBase` (on `<slicc-app>`, or `setGrammarBase()`) at the folder holding `langs/` and `themes/`, for example `/node_modules/@shikijs/`. The build fails if the peer versions drift from the installed ones. `SLICC_GRAMMAR_BASE` points the build at another CDN. `dist/` is about 55 files and 5.5 MB of JavaScript. The build fails if React is bundled; `@pierre/trees` lists React as a peer dependency, so npm installs it, but the `web-components` entry runs on Preact. Types are in `dist/types/ui.d.ts`, `dist/types/dummy.d.ts` and `dist/types/kernel.d.ts`, exported as `@ai-ecoverse/slicc-spectrum/ui`, `/dummy` and `/kernel`.
|
|
178
204
|
|
|
179
205
|
### dockview notes
|
|
180
206
|
|
|
@@ -189,7 +215,7 @@ npm run lint
|
|
|
189
215
|
npm test
|
|
190
216
|
```
|
|
191
217
|
|
|
192
|
-
`npm test` builds `dist/` and runs the integration tests in headless Chromium over raw CDP, through the [harness from slicc-shared-web](https://github.com/ai-ecoverse/slicc-shared-web#integration-test-harness), against a fake backend (`test/integration/page/fake-backend.js`). It writes V8 coverage to `coverage/` and CPU profiles, screenshots and console logs to `artifacts/`. The test page is served cross-origin isolated (COOP/COEP), as slicc-kernel requires. `test/integration/kernel.test.mjs` runs `bash -i` end to end on `@ai-ecoverse/slicc-kernel` (a pinned dev dependency), with `@ai-ecoverse/wasm-bash` and `@ai-ecoverse/wasm-coreutils` installed into OPFS by the page (`/kernel.html`). `npm start` serves the test page on port 8080, and the UI at `/ui/`. `test/integration/ui.test.mjs` covers the shell, the layout (moving, closing, floating, reopening and reloading), streaming a reply with a tool call, stopping it, switching themes and the keyboard, and saves screenshots to `artifacts/ui/`.
|
|
218
|
+
`npm test` builds `dist/` and runs the integration tests in headless Chromium over raw CDP, through the [harness from slicc-shared-web](https://github.com/ai-ecoverse/slicc-shared-web#integration-test-harness), against a fake backend (`test/integration/page/fake-backend.js`). It writes V8 coverage to `coverage/` and CPU profiles, screenshots and console logs to `artifacts/`. The test page is served cross-origin isolated (COOP/COEP), as slicc-kernel requires. `test/integration/kernel.test.mjs` runs `bash -i` end to end on `@ai-ecoverse/slicc-kernel` (a pinned dev dependency), with `@ai-ecoverse/wasm-bash` and `@ai-ecoverse/wasm-coreutils` installed into OPFS by the page (`/kernel.html`). `npm start` serves the test page on port 8080, and the UI at `/ui/`. `test/integration/kernel-ui.test.mjs` boots `<slicc-app>` on the kernel model (`/kernel-ui/`): a command in the terminal, its file in the tree, an edit in a file tab read back in the terminal, a second terminal, and a reload. `test/integration/ui.test.mjs` covers the shell, the layout (moving, closing, floating, reopening and reloading), streaming a reply with a tool call, stopping it, switching themes and the keyboard, and saves screenshots to `artifacts/ui/`.
|
|
193
219
|
|
|
194
220
|
The Biome, TypeScript, lefthook, Renovate and CI configuration comes from [slicc-shared-web](https://github.com/ai-ecoverse/slicc-shared-web), which also provides the `slicc-lint-comments`, `slicc-no-unit-tests` and `slicc-diff-cover` commands used by `npm run lint` and the pre-commit hook.
|
|
195
221
|
|
|
@@ -363,10 +363,12 @@ var n5 = e(class extends f {
|
|
|
363
363
|
|
|
364
364
|
export {
|
|
365
365
|
o,
|
|
366
|
+
e,
|
|
366
367
|
c,
|
|
367
|
-
e2
|
|
368
|
+
e2,
|
|
368
369
|
o2,
|
|
369
|
-
l
|
|
370
|
+
l,
|
|
371
|
+
e3
|
|
370
372
|
};
|
|
371
373
|
/*! Bundled license information:
|
|
372
374
|
|
|
@@ -408,4 +410,4 @@ lit-html/directives/join.js:
|
|
|
408
410
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
409
411
|
*)
|
|
410
412
|
*/
|
|
411
|
-
//# sourceMappingURL=chunk-
|
|
413
|
+
//# sourceMappingURL=chunk-2BBOXTOJ.js.map
|