@ai-ecoverse/slicc-spectrum 1.108.4 → 1.108.6
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 +4 -1
- package/dist/slicc-dummy.js +24 -0
- package/dist/slicc-dummy.js.map +2 -2
- package/dist/slicc-kernel-model.js +102 -9
- package/dist/slicc-kernel-model.js.map +3 -3
- package/dist/slicc-ui.js +68 -17
- package/dist/slicc-ui.js.map +4 -4
- package/dist/types/app/command-display.d.ts +3 -0
- package/dist/types/dummy/approvals.d.ts +1 -1
- package/dist/types/kernel/files.d.ts +2 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -326,6 +326,7 @@ The model's waiting `approvals` as a modal alert dialog, one at a time, oldest f
|
|
|
326
326
|
Renders nothing without `approvals.decide`.
|
|
327
327
|
A request that `secretRules()` flags shows a warning (`[data-secret-rules]`, the path or token) and no **Always allow (**Always allow in this directory**, with the cwd in its hint, when the approval has `alwaysScope: 'cwd'` and a `cwd`)**.
|
|
328
328
|
The command (`[data-command]`, or a guest tool call's `[data-summary]`) wraps in full; past four lines the dialog shows the first four and **Show the full command** (as in the chat, `data-action="full-command"` with `data-shown`), and shown, it scrolls inside its own box of at most `min(16lh, 50dvh)`. Always allow, its hint and Allow once wait until the end of the command has been in view (a zero-size `[data-end]` after its last line), and so does the element's `decide()` for anything but `deny`; once seen, the end stays seen while the request waits, and hiding the command again hides them again. Until then a subdued line (`[data-allow-hint]`) says "Show the full command to allow it." or, shown, "Scroll to the end of the command to allow it." The dialog keeps one width, so only its height changes. A closed request shows its command whole.
|
|
329
|
+
Control characters in the sudo command, target, requester name and place, and cwd are shown: C0 controls use Unicode Control Pictures (including ␍ for CR, ␊ for LF and ␉ for TAB), DEL uses ␡, and C1, format, default-ignorable characters and line/paragraph separators use uppercase `U+XXXX` notation (at least four digits). LF keeps its line break after ␊ in the command and shows only ␊ in paragraphs; ordinary spaces stay spaces. Each shown control has a chip with its character name or notation as its accessible label and title; Control Pictures also show a readable abbreviation or notation. Joiners and variation selectors use the same chips. The clamped and full views show the same symbols.
|
|
329
330
|
Focus starts on Deny (on Close once `decide` rejects) and goes back, after Deny, Always allow, Allow once, <kbd>Esc</kbd> or Close, to what had it when the dialog opened; inside a terminal, to that `<slicc-terminal>` through its own `focus()`, even when it remounted meanwhile.
|
|
330
331
|
Guest requests (`guest-message`, `guest-tool`) get their own copy, the guest's text as plain text (`[data-guest-text]`), attachments (`[data-attachments]`), the automatic check's verdict (`[data-verdict]`), and Deny and Allow once, plus **Always allow** (`data-action="always"`) with a hint saying what it covers when the approval's `always` is `true`; the dialog body carries `[data-approval-kind]` and fills the dialog's width at every size.
|
|
331
332
|
Tray requests (`tray`) get their own title and one sentence (`#asking`), and only **Deny** (`deny`, focused) and **Allow once** (`once`), never Always allow.
|
|
@@ -1087,8 +1088,9 @@ The dummy's `addServer` and `removeServer` record each call in `settings.serverE
|
|
|
1087
1088
|
`createDummyModel({ budget: 'plain' | 'adobe' | 'xai' })` (`?budget=` on `/ui/`, `plain` by default) sets the tray budget's `provider`: none, so it reads "Budget 32%", or Adobe or SuperGrok, which the tray and the monitor's budget vital name.
|
|
1088
1089
|
Like slicc-agent's snapshot, the dummy's vitals are the budget, Spend, Active agents, Processes and Process memory (both with a `series`) and Fullest context.
|
|
1089
1090
|
|
|
1090
|
-
`createDummyModel({ approvals: 'agent' | 'user' | 'many' | 'follower' | 'fail' | 'soon' | 'elsewhere' | 'withdrawn' | 'secrets' | 'guest' | 'guest-follower' | 'guest-always' | 'long' | 'guest-args' | 'guest-empty' | 'guest-truncated' | 'tray' | 'tray-url' | 'tray-rotate' | 'tray-unlink' | 'tray-expired' })` (`?approvals=` on `/ui/`) adds waiting sudo requests: one from an agent, one from a terminal user, three in a row (the last as `www-data`), one without `decide`, one whose `decide` fails, one that expires in 24 seconds, or two whose first is answered in another tab or withdrawn after a few seconds, or one from an agent that copies a file over `/etc/fnox/config.toml`, or (`guest`) three guest requests: a message from Seat 2 (Mara) with attachments and an allow verdict, a tool call with a deny verdict, and a message whose `decide` rejects with "Someone else already answered this."
|
|
1091
|
+
`createDummyModel({ approvals: 'agent' | 'user' | 'many' | 'follower' | 'fail' | 'soon' | 'elsewhere' | 'withdrawn' | 'secrets' | 'guest' | 'guest-follower' | 'guest-always' | 'long' | 'controls-cr' | 'controls-lf' | 'controls-place' | 'controls-cwd' | 'guest-args' | 'guest-empty' | 'guest-truncated' | 'tray' | 'tray-url' | 'tray-rotate' | 'tray-unlink' | 'tray-expired' })` (`?approvals=` on `/ui/`) adds waiting sudo requests: one from an agent, one from a terminal user, three in a row (the last as `www-data`), one without `decide`, one whose `decide` fails, one that expires in 24 seconds, or two whose first is answered in another tab or withdrawn after a few seconds, or one from an agent that copies a file over `/etc/fnox/config.toml`, or (`guest`) three guest requests: a message from Seat 2 (Mara) with attachments and an allow verdict, a tool call with a deny verdict, and a message whose `decide` rejects with "Someone else already answered this."
|
|
1091
1092
|
(`guest-follower`: the same without `decide`), or (`guest-always`) one guest tool call from Seat 2 (Mara) to `read_file` with `always: true`, or (`long`) one sudo request whose seven-line command ends in `curl … | sh`, or one guest `write_file` call with a blank `summary`: with seven lines of `args` ending in the same tail (`guest-args`), with no `args` (`guest-empty`), or with a prefix of them and `argsTruncated` (`guest-truncated`), or tray requests from sliccy: one to share the join URL (`tray-url`), one to make a new one (`tray-rotate`), one to unlink Kitchen tablet (`tray-unlink`), all three in a row (`tray`), or the first, which times out after a few seconds (`tray-expired`).
|
|
1093
|
+
`controls-cr` and `controls-lf` show control characters in a sudo command's quoted word; `controls-place` shows them in the requester name, place and target; `controls-cwd` shows them in the cwd.
|
|
1092
1094
|
`createDummyModel({ asks: 'long' })` (`?asks=long`) adds a pending sudo request with that seven-line command to kitchen-sink (`k-long`).
|
|
1093
1095
|
Decisions are recorded in `model.approvals.decisions`, and `model.approvals.end(id, reason)` ends a request.
|
|
1094
1096
|
|
|
@@ -1123,6 +1125,7 @@ app.model = createKernelModel({ kernel, root, storage: localStorage, files: { sk
|
|
|
1123
1125
|
```
|
|
1124
1126
|
|
|
1125
1127
|
- **`KernelFiles`** lists the OPFS root as the tree, reads and writes files through the OPFS API, and removes them recursively.
|
|
1128
|
+
Each write or removal, once it has committed, posts one `postFsNotice` from `@ai-ecoverse/slicc-kernel/meta`, so the kernels on that root and their watches hear it: a write names the file and, for every directory or file it had to create, that name and its parent; removing a file names it and its parent; removing a folder names the folder in `trees` and its parent in `paths`. A write that fails partway names what it did create. `metadata` is the kernel's `metadata` option (default `slicc-kernel`). The paths are the tree's, so `root` must be the kernel's root.
|
|
1126
1129
|
Directories in `skip` show up but aren't scanned; paths in `hide` (and everything under them) don't show up at all.
|
|
1127
1130
|
`start()` rescans when a `FileSystemObserver` record touches something the tree shows: at once after a quiet `interval` (default 2000 ms), then at most once per `interval`. Records only inside `hide` paths or below `skip` folders start no rescan. Where the browser can't observe OPFS, it rescans every `interval` ms. A rescan that finds changes emits `files` and a `file` per changed file, so open tabs follow what the terminal writes.
|
|
1128
1131
|
Without an agent there are no pending changes.
|
package/dist/slicc-dummy.js
CHANGED
|
@@ -197,6 +197,30 @@ function approvalFixtures(scenario, now2 = Date.now()) {
|
|
|
197
197
|
if (scenario.startsWith("guest-")) return [guestCall(scenario, now2)];
|
|
198
198
|
if (scenario === "none") return [];
|
|
199
199
|
if (scenario === "long") return [{ ...agent, id: "sudo-release", command: longCommand }];
|
|
200
|
+
if (scenario === "controls-cr" || scenario === "controls-lf")
|
|
201
|
+
return [
|
|
202
|
+
{
|
|
203
|
+
...agent,
|
|
204
|
+
command: `printf '%s' 'harbor${scenario === "controls-cr" ? "\r" : "\n"}schedule'`
|
|
205
|
+
}
|
|
206
|
+
];
|
|
207
|
+
if (scenario === "controls-place")
|
|
208
|
+
return [
|
|
209
|
+
{
|
|
210
|
+
...agent,
|
|
211
|
+
requester: { ...agent.requester, name: "docs\rpass", where: "harbor\rterminal\nseat" },
|
|
212
|
+
target: "harbor\ruser"
|
|
213
|
+
}
|
|
214
|
+
];
|
|
215
|
+
if (scenario === "controls-cwd")
|
|
216
|
+
return [
|
|
217
|
+
{
|
|
218
|
+
...user,
|
|
219
|
+
requester: { ...user.requester, name: "co\rne", where: "harbor\rterminal\nseat" },
|
|
220
|
+
cwd: "/home/cone/harbor\rferry\nschedule",
|
|
221
|
+
alwaysScope: "cwd"
|
|
222
|
+
}
|
|
223
|
+
];
|
|
200
224
|
if (scenario === "user") return [user];
|
|
201
225
|
if (scenario === "many") return [agent, user, cache];
|
|
202
226
|
if (scenario === "elsewhere" || scenario === "withdrawn") return [agent, user];
|