@ai-ecoverse/slicc-spectrum 2.1.0 → 2.3.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 +19 -3
- package/dist/{chunk-CQDLADJZ.js → chunk-47KEBIYA.js} +8 -1
- package/dist/chunk-47KEBIYA.js.map +7 -0
- package/dist/slicc-dummy.js +315 -7
- package/dist/slicc-dummy.js.map +3 -3
- package/dist/slicc-kernel-model.js +1 -1
- package/dist/slicc-ui.js +4192 -3846
- package/dist/slicc-ui.js.map +4 -4
- package/dist/types/app/approvals.d.ts +14 -1
- package/dist/types/app/command-display.d.ts +1 -0
- package/dist/types/app/command.d.ts +1 -0
- package/dist/types/app/messages.d.ts +4 -0
- package/dist/types/app/secrets.d.ts +2 -1
- package/dist/types/app/vault.d.ts +29 -1
- package/dist/types/dummy/approvals.d.ts +5 -3
- package/dist/types/dummy/vault.d.ts +20 -1
- package/dist/types/dummy.d.ts +1 -1
- package/dist/types/model/types.d.ts +104 -5
- package/dist/types/ui.d.ts +3 -3
- package/package.json +5 -5
- package/dist/chunk-CQDLADJZ.js.map +0 -7
package/README.md
CHANGED
|
@@ -278,7 +278,7 @@ When cones share a name, their accessible names and the Delete cone, Freezer and
|
|
|
278
278
|
One thread's conversation (its `agent`, or the active agent if unset), by day.
|
|
279
279
|
Files dragged anywhere over the pane (not text, links or the dock's own drags) show Spectrum's drop zone over the whole pane (`swc-dropzone[data-surface=drop]`, in its dragged state: an accent border on an opaque accent-subtle fill, so the transcript doesn't show through), with an illustrated message: an attach icon, "Drop files to attach" and what it takes ("Images, text and other files up to 25 MB each join your next message. Folders can’t be attached."); a polite status (`[data-announce=drop]`) says "Drop to attach files to your message". The zone stays while the drag crosses into the composer or another child, and goes 100 ms after the drag leaves the pane (`SliccChat.leaveAfter`), on drop and on <kbd>Esc</kbd>. A drop anywhere on the pane attaches to the composer; while there is no composer (watch-only, frozen), on a guest seat, or while the composer waits to reconnect, the pane shows no zone and still consumes the file drag (`dropEffect` `none`), so a drop never opens the file in the tab.
|
|
280
280
|
A message's time shows only when it is at least two minutes newer than the last time shown, and the first one after each day separator always shows; a hidden time stays for screen readers (`time.sr` with `datetime`, or `.sr` on licks and cards), and a meta row left empty isn't rendered.
|
|
281
|
-
User messages (with attachments and a quiet timestamp, `time.when`, by that rule; the reader's own carry no name or delivery tag, while `data-mode` and `data-delivered` still say how they went; a message from another cone, a follower or a guest says who sent it, and an agent's request carries its name and an Agent badge; a message from another agent, an agent's request or a message `from` a cone (`origin` `agent`, or `from` set without `origin` `follower` or `guest`), is `[data-remote]`: a subtle indigo bubble and a 🤖 pill on its bottom edge, `aria-hidden` since the byline names the sender; people, the reader included, never get it), assistant messages (with the time by that rule, and the model only on the first reply and whenever it changes from the previous one, `.meta .model` with the usage as its tooltip; without a model the usage is the time's tooltip, and with neither it is the reply's own (`.reply[title]`); the turn always carries the usage as its `aria-description`; the cone's name isn't repeated; Markdown with tables, task lists, quotes, code and images, fenced code highlighted like the Files view (below); thinking; tool calls, as the steps of the reply's response status (below); media galleries with images, video and audio; action cards for tools, pull requests and status; plans and checklists; inline diffs; question prompts (as decision cards, below); delegations; link previews; errors with a fix-it action, as a grey card (`.error-card[role=alert]`, `data-id` on system errors) inset by a wide margin on each side, a narrower one under 480 px: a red alert icon, the title in bold, the detail subdued and the action on the right, or under the detail below 360 px, announced as "Error: " and the title; an error with `action: 'login'` and an `account` (an `Account.id`) signs that account in: **Log in** calls `settings.connect(account)` synchronously in the click when the account is OAuth or needs no secret or fields, so a sign-in pop-up opens within the user gesture, and otherwise, or when `accounts()` doesn't have it, opens Settings at its row; the card follows the account's status from `accounts` (`data-login` is `idle`, `signing-in` or `connected`): while it is `signing-in` or `connect` is pending, **Log in** is pending and reads “Signing in…”, for an OAuth account the detail reads “Continue in the sign-in window that opened.” and, after `SliccChat.closedAfter` (20 s, since a closed window can't be detected), “Closed the sign-in window? Cancel, then Log in again.”, with **Cancel** (`data-action="cancel-login"`) when the port has `cancel`; once `connected`, the card is no longer an alert: a neutral info icon in the detail colour replaces the red one, the "Error: " prefix goes, the title reads “Signed in to {provider} again.” (the account's `provider`), the detail reads “Signed in. Retry to send it again.” (a polite status) and the button becomes **Retry**, which sends the last prompt again only when clicked; a rejected `connect` shows its message as negative help text (`[data-error=login]`), keeps **Log in** and adds a quiet **Open settings** (`data-action="settings"`) to that account; without an `account`, **Log in** opens Settings at Accounts, and watch-only and guest seats keep their gating; 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), system messages (error cards; compactions and notices, rewinds and model changes included, as full-width dividers with a line on each side, like the day: a compaction shows only its title, its `text` kept for screen readers, one that lost messages (`state: 'fallback'`, by default "Compaction failed, transcript truncated", or `discarded`, "Context discarded") an alert icon in the negative colour, and a notice its title and text on one line, `role="note"`; a divider that wraps keeps a short line on each side) and licks, SLICC's events into a cone, on every channel, on the right (`.lick-turn`): a byline with the title and the time by the two-minute rule, then a dashed box (`.lick[data-id][data-channel]`) with the text and the count (×3); emoji pills on its bottom edge (`.reactions .reaction`, `aria-hidden`, each named by its `title`) give the channel (⏰ Schedule, 🪝 Webhook, ✨ Sprinkle,
|
|
281
|
+
User messages (with attachments and a quiet timestamp, `time.when`, by that rule; the reader's own carry no name or delivery tag, while `data-mode` and `data-delivered` still say how they went; a message from another cone, a follower or a guest says who sent it, and an agent's request carries its name and an Agent badge; a message from another agent, an agent's request or a message `from` a cone (`origin` `agent`, or `from` set without `origin` `follower` or `guest`), is `[data-remote]`: a subtle indigo bubble and a 🤖 pill on its bottom edge, `aria-hidden` since the byline names the sender; people, the reader included, never get it), assistant messages (with the time by that rule, and the model only on the first reply and whenever it changes from the previous one, `.meta .model` with the usage as its tooltip; without a model the usage is the time's tooltip, and with neither it is the reply's own (`.reply[title]`); the turn always carries the usage as its `aria-description`; the cone's name isn't repeated; Markdown with tables, task lists, quotes, code and images, fenced code highlighted like the Files view (below); thinking; tool calls, as the steps of the reply's response status (below); media galleries with images, video and audio; action cards for tools, pull requests and status; plans and checklists; inline diffs; question prompts (as decision cards, below); delegations; link previews; errors with a fix-it action, as a grey card (`.error-card[role=alert]`, `data-id` on system errors) inset by a wide margin on each side, a narrower one under 480 px: a red alert icon, the title in bold, the detail subdued and the action on the right, or under the detail below 360 px, announced as "Error: " and the title; an error with `action: 'login'` and an `account` (an `Account.id`) signs that account in: **Log in** calls `settings.connect(account)` synchronously in the click when the account is OAuth or needs no secret or fields, so a sign-in pop-up opens within the user gesture, and otherwise, or when `accounts()` doesn't have it, opens Settings at its row; the card follows the account's status from `accounts` (`data-login` is `idle`, `signing-in` or `connected`): while it is `signing-in` or `connect` is pending, **Log in** is pending and reads “Signing in…”, for an OAuth account the detail reads “Continue in the sign-in window that opened.” and, after `SliccChat.closedAfter` (20 s, since a closed window can't be detected), “Closed the sign-in window? Cancel, then Log in again.”, with **Cancel** (`data-action="cancel-login"`) when the port has `cancel`; once `connected`, the card is no longer an alert: a neutral info icon in the detail colour replaces the red one, the "Error: " prefix goes, the title reads “Signed in to {provider} again.” (the account's `provider`), the detail reads “Signed in. Retry to send it again.” (a polite status) and the button becomes **Retry**, which sends the last prompt again only when clicked; a rejected `connect` shows its message as negative help text (`[data-error=login]`), keeps **Log in** and adds a quiet **Open settings** (`data-action="settings"`) to that account; without an `account`, **Log in** opens Settings at Accounts, and watch-only and guest seats keep their gating; 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), system messages (error cards; compactions and notices, rewinds and model changes included, as full-width dividers with a line on each side, like the day: a compaction shows only its title, its `text` kept for screen readers, one that lost messages (`state: 'fallback'`, by default "Compaction failed, transcript truncated", or `discarded`, "Context discarded") an alert icon in the negative colour, and a notice its title and text on one line, `role="note"`; a divider that wraps keeps a short line on each side) and licks, SLICC's events into a cone, on every channel, on the right (`.lick-turn`): a byline with the title and the time by the two-minute rule, then a dashed box (`.lick[data-id][data-channel]`) with the text and the count (×3); emoji pills on its bottom edge (`.reactions .reaction`, `aria-hidden`, each named by its `title`) give the channel (⏰ Schedule, 🪝 Webhook, ✨ Sprinkle, 💬 Cone message, …; a channel spectrum does not know falls back to 📎 Notice) and the outcome (👍 Allowed, 👎 Denied, also said in the box's hidden text).
|
|
282
282
|
A lick with a body is a `details.lick` whose head (`summary.lick-head`, with a quiet chevron that turns when open) toggles it with a click, <kbd>Enter</kbd> or <kbd>Space</kbd>; clicking the body doesn't close it.
|
|
283
283
|
A reply's tool calls are the steps of its response status (`swc-response-status[slot=status]`, `data-id` the reply's), at the top of the reply: one `swc-response-status-step` per call (`id` `run-` and the call's id, `data-tool`, `data-status`, `data-kind`, and `data-id` the message the call came from), labelled with the tool and its `title`, `active` while it runs, `complete` when done and `stopped` when it failed or was cancelled, which its label says in words (" · Failed", " · Cancelled").
|
|
284
284
|
The status keeps `data-action="open-cluster"` and each step `data-action="open-run"` with `data-target` the call's id: clicking the host from script opens it, as the old strip's buttons did, and opening a step opens its status too.
|
|
@@ -335,6 +335,11 @@ Sudo and guest requests show the verdict under the command, in a live region (`.
|
|
|
335
335
|
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.
|
|
336
336
|
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.
|
|
337
337
|
Tray requests (`tray`) get their own title and one sentence (`#asking`), and only **Deny** (`deny`, focused) and **Allow once** (`once`), never Always allow.
|
|
338
|
+
Secret requests (`secret`, `dialog[data-kind=secret]`) read "Enter a value for {name}?" (`mode: 'enter'`) or "Reveal {name} to a program?" (`reveal`). Under the title comes the trusted block, which only bios and the kernel fill: "{name} ran this[ in {where}]:" for an agent or "You ran this[ in {where}] (as {name}):" for a user, then the command (`[data-command]`), which is `process.exe` followed by `argv[1…]`, each word shell-quoted (`argv[0]` is the program's own choice), then "In {cwd}". The command follows sudo's rules: the same scrolling box, the same control-character chips, and the same end-in-view rule. Then the untrusted `prompt`, if any, in its own block (`[data-prompt]`) under "From the agent, not checked by SLICC:", with control characters as chips and cut at 200 characters. With `reveal`, a negative block (`[data-reveal]`) says "{exe} gets the plaintext. It can send it anywhere.", and adds "The agent asked for this." when `requester.kind` is `agent`.
|
|
339
|
+
The body is the vault's own frame (`[data-value-frame]`, a `<slicc-vault-value>` on `vault.valueFrame(id)`). The value is typed and Save or Allow clicked there, so spectrum never sees the value and can't fake the consent. The frame is `inert` until the end of the command has been in view, and "Scroll to the end of the command to answer it." (`[data-allow-hint]`) shows while it isn't. Without `vault.valueFrame`, "The vault isn’t available here, so this request can only be denied." (`[data-id="no-frame"]`) stands in its place.
|
|
340
|
+
The title shows control characters in the name as chips, and so does the notice. The only button is **Deny** (`deny`, focused). The element's `decide()` takes only `deny` for a secret, and only while that request is the one showing: not once it was denied, answered in its frame, closed, or ended (timed out, answered elsewhere, withdrawn). A late `escape` from the frame does nothing either.
|
|
341
|
+
When a listed request is replaced (the same `id` with another `createdAt`, command, mode, name, `reveal`, prompt or requester), or an `id` comes back after it left `list()`, the dialog counts it as a new request: a new frame, the end of its command unseen again, and the half-second guard again. Escape on the dialog denies, and so does the frame's `escape` event, posted when Escape is pressed inside the frame. The frame's `done` for this request closes the dialog and moves on to the next request, with no "answered" dialog. The frame's `gone` shows "Secret request timed out" (`expired`) or "Answered elsewhere", or closes silently (`withdrawn`), except for a request this tab denied or answered. The frame's `error` shows its message under the frame (`[data-frame-error]`). A secret request that leaves `list()` without `ended` before `expiresAt` closes silently, because the frame's `done` and the list change can arrive in either order. Focus then goes back as for sudo, to the `<slicc-terminal>` that had it.
|
|
342
|
+
`approvalKinds` (from `/ui`) is a frozen array of the kinds this build shows (`sudo`, `guest-message`, `guest-tool`, `tray`, `secret`), so an embedder can hold back the kinds an older UI would leave waiting unseen.
|
|
338
343
|
|
|
339
344
|
#### `<slicc-follow>`
|
|
340
345
|
|
|
@@ -480,7 +485,7 @@ The secrets, sorted by name (`li[data-secret][data-state]`, with `[data-rules]`,
|
|
|
480
485
|
Locked, every form (Add secret, Replace value, Import, Export) says "Unlock the vault first" (`p[data-locked]`) next to the vault's own small **Unlock** button (`slicc-vault-button[data-action=unlock]`) and disables its submit; once unlocked, the form stays open with what was typed and its submit enables.
|
|
481
486
|
Vault errors show their message, EACCES as "Unlock the vault first", an EACCES with `cause: 'policy-paused'` as "Secrets are paused until the missing policy file is back", and ENOTSUP as "This arrives with a later vault version".
|
|
482
487
|
Each action shows only when the port has its method.
|
|
483
|
-
Then **Rules SLICC refused** (`[data-refused]`), where the rules live (`[data-policy]`) and **Activity** (`ol.audit li[data-seq][data-type]`; an entry with `uid` and `tag` both `null` reads "by you", a `refresh` entry "Refreshed automatically" (with the sign-in it used), an `endpoints` entry (vault-originated, no "by …") one part per field it carries: (1.91.0's `EndpointsEntry` had a required `purged` with `url`; no vault wrote it before 1.13.0, so the shape was corrected rather than kept, with `purged` optional and `host` replacing `url`) `purged` "Removed custom model URLs an agent set, automatically: {provider name} at {host}, …. Only you can set a model URL now, in Settings › Accounts" (the provider's name from `settings.accounts()`, else its id), `adopted` "Kept the MCP servers your tokens use, automatically: {server} at {host}, …", `pinned` "{name} pinned to {host} automatically, on first use" with **Unpin** (`data-action=unpin`, calling the vault port's optional `unpin([name])`; disabled while the vault is locked; a failure shows in the row as `[data-error=unpin]`, in the same words as other vault failures; it's hidden once a newer `unpinned` entry for that name is in the log), and `unpinned` "{name} unpinned from {host}; the next use pins it again", an `mcp` entry "Sent to the MCP server SERVER at DOMAIN" with its request and exit, a `session` entry (a value the vault handed the kernel for a verified TLS session, vault 1.15.0) "Sent over {HTTP/1.1, SMTP or Postgres} to {domain}:{port}, {trusted by public roots, or trusted by its pinned anchor}, through {exit}" (no trust part when an older entry has no `verifiedBy` or a newer vault sends one spectrum doesn't know; a protocol it doesn't know reads as its raw name), and a policy entry lists its changes, its warning and, when accepted, how to change the file back, except that an entry with `absent` reads "{file} was removed. Secrets are paused until it’s back." and the accepted entry that ends its pause reads "{file} is back. Secrets are running again." ("Secrets stay paused until the other file is back." while the other file is still missing), neither with the way back; **Only reveals to programs**, `data-action="reveals"`, and **Show older**, `data-action="older"`).
|
|
488
|
+
Then **Rules SLICC refused** (`[data-refused]`), where the rules live (`[data-policy]`) and **Activity** (`ol.audit li[data-seq][data-type]`; an entry with `uid` and `tag` both `null` reads "by you", a `refresh` entry "Refreshed automatically" (with the sign-in it used), an `endpoints` entry (vault-originated, no "by …") one part per field it carries: (1.91.0's `EndpointsEntry` had a required `purged` with `url`; no vault wrote it before 1.13.0, so the shape was corrected rather than kept, with `purged` optional and `host` replacing `url`) `purged` "Removed custom model URLs an agent set, automatically: {provider name} at {host}, …. Only you can set a model URL now, in Settings › Accounts" (the provider's name from `settings.accounts()`, else its id), `adopted` "Kept the MCP servers your tokens use, automatically: {server} at {host}, …", `pinned` "{name} pinned to {host} automatically, on first use" with **Unpin** (`data-action=unpin`, calling the vault port's optional `unpin([name])`; disabled while the vault is locked; a failure shows in the row as `[data-error=unpin]`, in the same words as other vault failures; it's hidden once a newer `unpinned` entry for that name is in the log), and `unpinned` "{name} unpinned from {host}; the next use pins it again", an `mcp` entry "Sent to the MCP server SERVER at DOMAIN" with its request and exit, a `reveal` entry (vault 1.23.0, a secret ask whose plaintext the user allowed) "Revealed to {argv} in {cwd}, allowed in a dialog", (the argv, cwd and "by …" of `materialize` and `reveal` entries, and of a secret's "Revealed to programs…, last by … with {argv}" line, show control characters as chips, as the approval dialog does), which counts as a reveal for **Only reveals to programs** and for the secret's "Revealed to programs…" line, a policy change of `[reveal] agent` "Programs an agent runs may no longer ask for a secret’s plaintext" (or "…may ask for a secret’s plaintext again, in a dialog each time"), a `session` entry (a value the vault handed the kernel for a verified TLS session, vault 1.15.0) "Sent over {HTTP/1.1, SMTP or Postgres} to {domain}:{port}, {trusted by public roots, or trusted by its pinned anchor}, through {exit}" (no trust part when an older entry has no `verifiedBy` or a newer vault sends one spectrum doesn't know; a protocol it doesn't know reads as its raw name), and a policy entry lists its changes, its warning and, when accepted, how to change the file back, except that an entry with `absent` reads "{file} was removed. Secrets are paused until it’s back." and the accepted entry that ends its pause reads "{file} is back. Secrets are running again." ("Secrets stay paused until the other file is back." while the other file is still missing), neither with the way back; **Only reveals to programs**, `data-action="reveals"`, and **Show older**, `data-action="older"`).
|
|
484
489
|
The section's `data-vault` is `locked`, `unlocked` or `loading`.
|
|
485
490
|
A popup the browser blocked shows how to allow it (`[data-popup=blocked]`).
|
|
486
491
|
Widened-rule notices aren't shown.
|
|
@@ -490,8 +495,14 @@ An open **Removed** list (`details[data-removed]`) stays open across a layout sw
|
|
|
490
495
|
|
|
491
496
|
Places `vault.button()`'s element (the vault's own button frame), posts its `config` (`ButtonConfig` plus `theme`) once the button is `ready`, sets the frame's `color-scheme` to `theme` (or leaves it to the page) so the frame stays transparent, takes the reported `size` (with the focus-ring `inset` as negative margin) and `label` (as its title), moves focus to the control before or after it when the frame reports `focus` (`previous` or `next`), and fires `vault-popup` (bubbles, composed) with each `popup` event's `{ intent, state }`. spectrum sends only the `unlock` and `protect` intents.
|
|
492
497
|
|
|
498
|
+
#### `<slicc-vault-value>`
|
|
499
|
+
|
|
500
|
+
Places `vault.valueFrame(request)`'s element (the vault's `value.html` frame) and, once the frame is `ready`, posts `{ type: 'slicc-vault', v: 1, op: 'value', request, config }`, where `config` is a `ValueConfig` (`theme`, `dir`, `lang`, `scale`). It posts again when `config` changes, and mounts a new frame when `vault` or `request` changes. It sets the frame's `color-scheme` to `theme`. From `size` it takes the height, at most 480 px (and at most `45dvh`, beyond which the frame scrolls), and makes the frame its own width, with the `inset` (at most 4 px) as a negative margin above and below only, so the dialog never scrolls sideways. A value that isn't a finite number counts as 0. The element clips the frame to its own box (with room above and below for the largest inset it allows, 4 px, for the focus ring), so a frame can't paint over the command above it or the dialog's buttons. On the frame's `focus` event it moves focus to the control after or before the frame (`next` or `previous`), within its `<dialog>` and wrapping around. `focus()` posts `{ op: 'focus' }`, which focuses the frame's first control. It fires `vault-value` (bubbles, composed) with each `done`, `gone`, `error` and `escape` event. The detail holds only `event`, `request`, `state`, `code` and `message` (each when it's a string), so anything else the frame sends goes no further.
|
|
501
|
+
|
|
493
502
|
#### `<slicc-value-request>`
|
|
494
503
|
|
|
504
|
+
For the older `value` requests only, until bios stops sending them: `ask` requests show in `<slicc-approvals>` instead.
|
|
505
|
+
|
|
495
506
|
The vault's waiting `value` requests (`fnox set` on a terminal) as a modal dialog, one at a time, oldest first, with "N more waiting"; `<slicc-app>` mounts it.
|
|
496
507
|
`dialog[data-request]`: "Enter a value for NAME" (a Name field when the request has no name), who asks, as on the Settings card ("docs-pass asks for NAME", or "A program running as uid N asks for NAME"), the prompt under "From the agent, not checked by SLICC:", a masked value field with the same rules as Settings › Secrets, "Expires in N min", and **Later** (`data-action="later"`, or Escape: closes, the request stays in Settings › Secrets, whose **Enter value** reopens it), **Cancel request** (`data-action="cancel-request"`, with `cancel`) and **Save** (`data-action="save"`, `put(name, value, request.id)`, with `put`).
|
|
497
508
|
Locked, it shows the vault's Unlock button and disables Save.
|
|
@@ -967,6 +978,9 @@ It has no `always`: the dialog never offers Always allow for it, even when the i
|
|
|
967
978
|
Its dialog reads "Share this seven’s join URL?" with "{name} wants this seven’s join URL. Anyone with it can ask to link to this seven.", "Make a new join URL?" with "{name} wants a new join URL. Linked devices move to it, and the old one stops working.", or "Unlink {device.name}?" with "{name} wants to unlink {device.name} from this seven." ("Unlink a device?" and "…unlink a device from this seven." without `device`), then the countdown, **Deny** and **Allow once**.
|
|
968
979
|
Ended tray requests read "Answered in another tab" or "Tray request timed out", and a withdrawn one closes silently.
|
|
969
980
|
Without `decide`, its notice reads "Waiting for tray approval" with the same sentence, then "It waits for the owner's approval. Denied automatically at {time}."
|
|
981
|
+
A secret request (`kind` `secret`, a `SecretApproval`) is a program asking for a secret through `/dev/sealed`. Its fields are `mode` (`enter` when there is no live secret of that name, `reveal` when there is), `name`, an optional `prompt` (the program's own words, ≤ 200 characters, untrusted), `reveal` (the process gets the plaintext back too), `requester` (`kind` `agent` or `user`, `name`, optional `where`), `process` (`exe`, the resolved program file; `argv`; `cwd`, all from the kernel), `createdAt` and `expiresAt`.
|
|
982
|
+
`decide(id, 'deny')` cancels it in the vault, and the UI never sends `once` or `always` for it: the answer is given in the vault's frame. Send `ended` (`answered`, `expired` or `withdrawn`) only for a request that ended outside this tab: not for one this tab denied, and not for one whose frame in this tab posted `done`.
|
|
983
|
+
Without `decide`, its notice (`[data-approval-kind=secret]`) reads "Waiting for a secret" with "{name} ran {exe}, which asks for a value for {secret}." ("You ran…" for a user, "…the plaintext of {secret}." for `reveal`), then "It waits for the owner's answer. Denied automatically at {time}."
|
|
970
984
|
An approval whose `kind` this build doesn't know shows neither a dialog nor a notice, so it waits until it ends and is never allowed from here.
|
|
971
985
|
|
|
972
986
|
#### `vault` (optional)
|
|
@@ -977,10 +991,12 @@ The vault's view for SLICC, typed after `@ai-ecoverse/slicc-vault` (spectrum re-
|
|
|
977
991
|
Emit `status` and `list` when they change (bios re-lists after the vault's `changed` events), and `availability` when the optional `availability()` (`connecting`, `waiting`, `locked` or `ready`) changes.
|
|
978
992
|
`audit(before?, limit?)` resolves with an older `AuditPage` (`before` is a `seq`).
|
|
979
993
|
The optional page ops, each hiding its control when missing: `put(name, value, request?)` (a value request's `put` must use its `name`), `cancel(request)`, `remove(name, kind?)`, `restore(name, kind?)`, `import(kind, bytes, { password?, pick? })` (a `pick` stage, then `done`), `export(passphrase)` (the bundle's bytes), `lock()`, `dismissBackupReminder()` and `endpoints({ add?, remove? })`, which registers or takes back the URLs a page-sealed credential may be filled on (each an `EndpointSet`, `{ model?: [{ name, url }], mcp?: [{ server, url }] }`, a model URL bound to one record by name), checks the whole change first (`EINVAL` changes nothing) and rejects with a sentence. Settings registers them itself, never through the agent. `settings(name, kind, settings)` replaces a record's tenant settings as a whole without touching its key (the vault's `put` without a value); `put`'s options take the same `settings` on a first save.
|
|
980
|
-
They reject with a `VaultFailure`, an `Error` with an `ErrorCode` `code` (`isVaultFailure` from `/ui`) and an optional `ErrorCause` `cause`, matching slicc-vault 1.22.0’s stable refusal causes; `isPolicyPaused` still identifies only `policy-paused`.
|
|
994
|
+
They reject with a `VaultFailure`, an `Error` with an `ErrorCode` `code` (`isVaultFailure` from `/ui`) and an optional `ErrorCause` `cause`, matching slicc-vault 1.22.0’s stable refusal causes (checked against the pinned 1.23.0, whose ask types `compat/vault.ts` also checks: `Requester`, `ValueConfig`, `ValueEvent` and, the other way, `ValueMessage`); `isPolicyPaused` still identifies only `policy-paused`.
|
|
981
995
|
Values go to the vault only through `put`, and never through another port.
|
|
982
996
|
`button()` returns a new `VaultButton`, `{ element, post(message), listen(fn) }` returning an unsubscribe: bios wraps the vault's `button.html` frame and its postMessage protocol, and spectrum only sends `ButtonMessage`s and receives `ButtonEvent`s.
|
|
983
997
|
The passkey lock (unlock and protect) happens in the vault's own popup, which only a click in that frame can open.
|
|
998
|
+
The optional `valueFrame(request)` returns a new `VaultValueFrame` for an `ask` request, `{ element, post(message), listen(fn) }` like `button()`. bios wraps the vault's `value.html` frame. spectrum sends only `ValueMessage`s (`op: 'value'` with the request and a `ValueConfig`, and `op: 'focus'`) and receives only `ValueEvent`s (`ready`, `size`, `focus`, `done { request, state: 'sealed' | 'allowed' }`, `gone { request, state }`, `error { code, message }`, `escape`). The value is typed in that frame, and a reveal is allowed only by a click there, so the page never holds the value or the consent.
|
|
999
|
+
An `ask` request in `status.waiting` also carries `mode`, `reveal` and `requester` (`{ kind, name?, where?, exe, argv, cwd, tty, stdin }`). Settings › Secrets lists it with Cancel request only, and `RequestState` includes `withdrawn`.
|
|
984
1000
|
`notices`, `acknowledge` and the `notice` event are still typed, and ignored.
|
|
985
1001
|
|
|
986
1002
|
#### `guests` (optional)
|
|
@@ -286,6 +286,13 @@ var licks = [
|
|
|
286
286
|
"Wants to run: rm -rf /workspace/harbor/node_modules",
|
|
287
287
|
void 0,
|
|
288
288
|
{ state: "dismissed" }
|
|
289
|
+
],
|
|
290
|
+
[
|
|
291
|
+
"cone-message",
|
|
292
|
+
"Message from landlording",
|
|
293
|
+
'[slicc message from cone:cone-32 "landlording" (user cone-32)]',
|
|
294
|
+
"Can you take the Friday on-call?",
|
|
295
|
+
{}
|
|
289
296
|
]
|
|
290
297
|
];
|
|
291
298
|
var attachmentsMessage = {
|
|
@@ -2120,4 +2127,4 @@ export {
|
|
|
2120
2127
|
dummySettingsKey,
|
|
2121
2128
|
DummySettings
|
|
2122
2129
|
};
|
|
2123
|
-
//# sourceMappingURL=chunk-
|
|
2130
|
+
//# sourceMappingURL=chunk-47KEBIYA.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/dummy/showcase.ts", "../src/dummy/fixtures.ts", "../src/dummy/providers.ts", "../src/dummy/clock.ts", "../src/dummy/settings.ts"],
|
|
4
|
+
"sourcesContent": ["import type { Agent, LickChannel, Message, ToolCall, UserMessage } from '../model/types.ts';\n\nconst start = Date.UTC(2026, 9, 4, 16, 0);\nconst at = (minutes: number) => start + minutes * 60_000;\n\nexport function picture(\n label: string,\n from: string,\n to: string,\n width = 640,\n height = 400\n): string {\n const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"${width}\" height=\"${height}\" viewBox=\"0 0 ${width} ${height}\"><defs><linearGradient id=\"g\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\"><stop offset=\"0\" stop-color=\"${from}\"/><stop offset=\"1\" stop-color=\"${to}\"/></linearGradient></defs><rect width=\"${width}\" height=\"${height}\" fill=\"url(#g)\"/><text x=\"50%\" y=\"50%\" font-family=\"sans-serif\" font-size=\"${Math.round(height / 9)}\" fill=\"#ffffff\" text-anchor=\"middle\" dominant-baseline=\"middle\">${label}</text></svg>`;\n return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}`;\n}\n\nexport function tone(seconds = 0.6, frequency = 440, rate = 8000): string {\n const samples = Math.round(seconds * rate);\n const bytes = new Uint8Array(44 + samples);\n const view = new DataView(bytes.buffer);\n const text = (offset: number, value: string) => {\n for (let i = 0; i < value.length; i++) bytes[offset + i] = value.charCodeAt(i);\n };\n text(0, 'RIFF');\n view.setUint32(4, 36 + samples, true);\n text(8, 'WAVEfmt ');\n view.setUint32(16, 16, true);\n view.setUint16(20, 1, true);\n view.setUint16(22, 1, true);\n view.setUint32(24, rate, true);\n view.setUint32(28, rate, true);\n view.setUint16(32, 1, true);\n view.setUint16(34, 8, true);\n text(36, 'data');\n view.setUint32(40, samples, true);\n for (let i = 0; i < samples; i++) {\n const fade = Math.min(1, (samples - i) / (rate / 10));\n bytes[44 + i] = 128 + Math.round(60 * fade * Math.sin((2 * Math.PI * frequency * i) / rate));\n }\n let binary = '';\n for (const byte of bytes) binary += String.fromCharCode(byte);\n return `data:audio/wav;base64,${btoa(binary)}`;\n}\n\nfunction tool(\n id: string,\n name: string,\n title: string,\n input: string,\n output: string,\n extra: Partial<ToolCall> = {}\n): ToolCall {\n return { id, name, title, input, output, status: 'done', paths: [], ...extra };\n}\n\nconst markdown = [\n '## The forecast API in one page',\n '',\n 'harbor answers `GET /forecast?city=\u2026` with the day\u2019s **high**, **low** and a *short summary*, and caches per city for an hour. ~~XML output~~ is gone.',\n '',\n '### How a request flows',\n '',\n '1. The worker parses the city.',\n '2. The cache answers if it has a fresh entry:',\n ' - same UTC day',\n ' - younger than one hour',\n '3. Otherwise the upstream call runs, with three retries.',\n '',\n '> Upstream is slow at the top of the hour. Retries back off at 250, 500 and 1000 ms.',\n '',\n '```ts',\n 'export async function forecast(city: string): Promise<Forecast> {',\n ' const cached = cache.get(city);',\n ' if (cached) return cached;',\n ' return cache.set(city, await retry(() => upstream(city)));',\n '}',\n '```',\n '',\n '| Route | Cache | Typical latency |',\n '| --- | --- | ---: |',\n '| `/forecast` | 1 hour, per city | 38 ms |',\n '| `/health` | none | 2 ms |',\n '| `/forecast` (miss) | \u2014 | 410 ms |',\n '',\n '- [x] TTL fix merged',\n '- [ ] Move the cache to KV',\n '',\n 'Details are in the [API reference](https://api.example.com/docs/v2/forecast). A long path that must wrap: `/workspace/harbor/node_modules/.cache/wrangler/state/v3/cache/miniflare-CacheObject/7c1f0e3b9a5d4e2f8b6a1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f.sqlite`.',\n].join('\\n');\n\nconst toolShapes: ToolCall[] = [\n tool('k-t1', 'bash', 'Count the routes', \"rg -c 'pathname ===' src\", 'src/index.ts:2'),\n tool(\n 'k-t2',\n 'read_file',\n 'Read the router',\n '/workspace/harbor/src/index.ts',\n \"import { forecast } from './routes/forecast.ts';\\n\u2026\",\n {\n paths: ['/workspace/harbor/src/index.ts'],\n }\n ),\n tool(\n 'k-t3',\n 'write_file',\n 'Create the KV binding notes',\n '/workspace/harbor/docs/kv.md',\n 'Wrote 18 lines',\n {\n paths: ['/workspace/harbor/docs/kv.md'],\n }\n ),\n tool(\n 'k-t4',\n 'edit_file',\n 'Rename the cache key',\n '/workspace/harbor/src/lib/cache.ts',\n 'No match for \"cityKey(\" in src/lib/cache.ts',\n {\n status: 'error',\n paths: ['/workspace/harbor/src/lib/cache.ts'],\n }\n ),\n tool(\n 'k-t5',\n 'grep',\n 'Find TODOs',\n 'TODO --glob \"src/**\"',\n 'src/routes/forecast.ts:14: TODO: cache negative results\\nsrc/lib/units.ts:3: TODO: round half to even'\n ),\n tool(\n 'k-t6',\n 'web_fetch',\n 'Fetch the API changelog',\n 'https://api.example.com/changelog.json',\n '{ \"latest\": \"2.4.1\", \"breaking\": false }'\n ),\n tool(\n 'k-t7',\n 'browser',\n 'Screenshot the preview',\n 'screenshot http://localhost:8787/',\n 'Captured 1280\u00D7800',\n {\n image: picture('localhost:8787', '#3b63fb', '#0a7a43', 640, 400),\n }\n ),\n tool(\n 'k-t8',\n 'scoop_scoop',\n 'Start a scoop for the docs',\n 'name: docs-pass\\ntask: Update the forecast page to Celsius',\n 'Scoop docs-pass is running'\n ),\n tool(\n 'k-t9',\n 'feed_scoop',\n 'Hand the screenshots to docs-pass',\n 'scoop_name: docs-pass\\nmessage: Use the new screenshots in /tmp/shots',\n 'Delivered'\n ),\n tool(\n 'k-t10',\n 'send_message',\n 'Tell quiet-otter the tests pass',\n 'to: quiet-otter\\nmessage: CI is green, merge when ready',\n 'Delivered'\n ),\n tool(\n 'k-t11',\n 'drop_scoop',\n 'Wrap up amber-heron',\n 'scoop_name: amber-heron',\n 'Dropped amber-heron; its notes are in /shared/notes'\n ),\n tool(\n 'k-t12',\n 'update_global_memory',\n 'Remember the cache rule',\n 'Cache keys are per city and per UTC day.',\n 'Memory updated (3 sections, 412 characters)'\n ),\n tool(\n 'k-mcp',\n 'mcp__docs__search',\n 'docs \u00B7 search',\n '{\\n \"query\": \"forecast units\"\\n}',\n '2 pages: /forecast, /units'\n ),\n tool('k-t13', 'bash', 'Deploy to staging', 'wrangler deploy --env staging', 'Stopped', {\n status: 'cancelled',\n }),\n tool('k-t14', 'bash', 'Watch the logs', 'wrangler tail --env staging', '', { status: 'running' }),\n tool(\n 'k-t16',\n 'bash',\n 'Check the staging routes',\n 'wrangler routes list --env staging',\n '\\x1b[1mROUTE ZONE WORKER ENV\\x1b[0m\\nforecast.harbor.example/v2/forecast/* harbor.example \\x1b[36mharbor-forecast-v2\\x1b[0m \\x1b[2mstaging\\x1b[0m\\n\\x1b[33mwarning:\\x1b[0m the zone \\x1b[1mharbor.example\\x1b[0m has \\x1b[37m2\\x1b[0m routes on an old plan\\n\\x1b[1;31merror:\\x1b[0m the route forecast.harbor.example/v2/units/* belongs to another account; ask its owner to release it first',\n {\n status: 'error',\n notes: [\n { severity: 'error', text: 'Exited with code 5' },\n {\n severity: 'warn',\n text: 'Output truncated: 12 lines and 1,840 bytes dropped from the start',\n },\n { severity: 'info', text: 'Full output in /tmp/pi-bash-7f3a.log' },\n ],\n }\n ),\n];\n\nconst licks: Array<[LickChannel, string, string, string | undefined, Partial<Message>]> = [\n [\n 'webhook',\n 'GitHub \u00B7 pull_request.opened',\n 'example/harbor#58 Add retries for upstream timeouts',\n '{\\n \"action\": \"opened\",\\n \"number\": 58,\\n \"repository\": { \"full_name\": \"example/harbor\" }\\n}',\n {},\n ],\n [\n 'cron',\n 'Every weekday 09:00',\n 'Morning summary for the harbor cone',\n undefined,\n { count: 3 } as Partial<Message>,\n ],\n [\n 'sprinkle',\n 'Release board',\n 'Button \u201CShip 1.9.0\u201D clicked',\n '{ \"button\": \"ship\", \"version\": \"1.9.0\" }',\n {},\n ],\n [\n 'fswatch',\n '/workspace/harbor/src',\n '2 files changed',\n 'modified /workspace/harbor/src/lib/cache.ts\\ncreated /workspace/harbor/src/lib/retry.ts',\n {},\n ],\n [\n 'session-reload',\n 'Session restored',\n 'The page reloaded; 4 cones resumed from storage',\n undefined,\n {},\n ],\n [\n 'navigate',\n 'api.example.com',\n 'A page offered a SLICC handoff: open the forecast docs',\n '{ \"verb\": \"open\", \"target\": \"https://api.example.com/docs/v2/forecast\" }',\n {},\n ],\n [\n 'discovery',\n 'api.example.com',\n 'Found an ai-catalog.json with 3 tools',\n 'https://api.example.com/.well-known/ai-catalog.json',\n {},\n ],\n ['upgrade', 'SLICC updated', '6.4.0 \u2192 6.5.0', undefined, {}],\n [\n 'workflow',\n 'release-notes',\n 'Step 2 of 4 finished: collect merged pull requests',\n undefined,\n {},\n ],\n ['bash', 'Job 3', 'npm run build exited with status 0 after 41 s', undefined, {}],\n ['jshd', 'collect.jsh', 'Script finished: 12 pull requests since v1.8.0', undefined, {}],\n ['preview', 'Preview bridge', 'Connected from localhost:8787', undefined, {}],\n [\n 'cherry',\n 'Host page',\n 'Event \u201Ccart-updated\u201D from shop.example.com',\n '{ \"items\": 3, \"total\": 42.5 }',\n {},\n ],\n ['scoop-notify', 'docs-pass', 'Finished: the forecast page now shows Celsius', undefined, {}],\n ['scoop-idle', 'amber-heron', 'Idle for 30 minutes', undefined, {}],\n ['scoop-wait', 'quiet-otter', 'The wait for CI resolved: all checks passed', undefined, {}],\n [\n 'sudo-request',\n 'docs-pass',\n 'Wants to push to example/harbor (branch docs/celsius)',\n 'git push origin docs/celsius',\n { state: 'pending', expiresAt: Date.now() + 10 * 60_000 } as Partial<Message>,\n ],\n [\n 'sudo-request',\n 'quiet-otter',\n 'Wants to read secrets: UPSTREAM_TOKEN',\n undefined,\n { state: 'confirmed' } as Partial<Message>,\n ],\n [\n 'sudo-request',\n 'amber-heron',\n 'Wants to run: rm -rf /workspace/harbor/node_modules',\n undefined,\n { state: 'dismissed' } as Partial<Message>,\n ],\n [\n 'cone-message',\n 'Message from landlording',\n '[slicc message from cone:cone-32 \"landlording\" (user cone-32)]',\n 'Can you take the Friday on-call?',\n {},\n ],\n];\n\nconst attachmentsMessage: UserMessage = {\n id: 'k-u2',\n role: 'user',\n text: 'Here is the mockup, my notes and the old spec.',\n createdAt: at(4),\n attachments: [\n {\n id: 'k-a1',\n name: 'forecast-card.png',\n kind: 'image',\n mimeType: 'image/png',\n size: 48211,\n url: picture('Mockup', '#f5a623', '#d0021b', 480, 320),\n },\n {\n id: 'k-a2',\n name: 'notes.txt',\n kind: 'text',\n mimeType: 'text/plain',\n size: 214,\n text: 'Show \u00B0C first.\\nRound to whole degrees.\\nKeep the summary under 60 characters.',\n },\n {\n id: 'k-a3',\n name: 'spec-v1.pdf',\n kind: 'file',\n mimeType: 'application/pdf',\n size: 1_204_331,\n path: '/home/user/downloads/spec-v1.pdf',\n },\n {\n id: 'k-a4',\n name: 'UPSTREAM_TOKEN',\n kind: 'secret',\n mimeType: 'application/octet-stream',\n size: 0,\n },\n {\n id: 'k-a5',\n name: 'recording.mov',\n kind: 'file',\n mimeType: 'video/quicktime',\n size: 98_304_000,\n error: 'Too large: attachments are limited to 25 MB',\n },\n ],\n};\n\nexport const showcaseAgent: Agent = {\n id: 'cone-kitchen',\n name: 'kitchen-sink',\n kind: 'cone',\n parentId: null,\n status: 'idle',\n model: 'claude-opus-5-5',\n contextFill: 0.47,\n unread: 0,\n};\n\nfunction opening(): Message[] {\n return [\n {\n id: 'k-u1',\n role: 'user',\n text: 'Give me the full tour of harbor, everything you can show.',\n createdAt: at(0),\n },\n {\n id: 'k-m1',\n role: 'assistant',\n status: 'done',\n createdAt: at(1),\n model: 'claude-sonnet-5-5',\n usage: { input: 18_204, output: 912, cost: 0.31 },\n parts: [\n {\n type: 'thinking',\n text: 'Start with the shape of the API, then show the pieces one kind at a time.',\n },\n { type: 'text', text: markdown },\n ],\n },\n attachmentsMessage,\n {\n id: 'k-m2',\n role: 'assistant',\n status: 'done',\n createdAt: at(5),\n model: 'claude-sonnet-5-5',\n parts: [\n {\n type: 'text',\n text: 'Mockup, notes and spec received. The recording was too large to attach. Here are the current screens and the alert sound:',\n },\n {\n type: 'media',\n items: [\n {\n kind: 'image',\n src: picture('Forecast card', '#3b63fb', '#7a5af8'),\n alt: 'The forecast card in light mode',\n },\n {\n kind: 'image',\n src: picture('Dark card', '#1d1d1d', '#3b63fb'),\n alt: 'The forecast card in dark mode',\n },\n {\n kind: 'image',\n src: picture('Phone', '#0a7a43', '#12b886', 360, 640),\n alt: 'The forecast card on a phone',\n },\n {\n kind: 'video',\n src: '',\n poster: picture('\u25B6 Walkthrough', '#292929', '#717171'),\n alt: 'A walkthrough of the forecast page',\n },\n { kind: 'audio', src: tone(), alt: 'The storm alert sound' },\n ],\n },\n ],\n },\n { id: 'k-u3', role: 'user', text: 'Show me every tool you used.', createdAt: at(8) },\n {\n id: 'k-m3',\n role: 'assistant',\n status: 'done',\n createdAt: at(9),\n model: 'claude-sonnet-5-5',\n parts: [\n { type: 'text', text: 'Every tool from today\u2019s run, in order:' },\n ...toolShapes.map((call) => ({ type: 'tool' as const, tool: call })),\n ],\n },\n {\n id: 'k-tool1',\n role: 'tool',\n createdAt: at(12),\n tool: tool(\n 'k-t15',\n 'bash',\n 'You ran a command',\n 'git log --oneline -3',\n 'a1b2c3d fix: expire entries from the previous day\\ne4f5a6b feat: retry upstream timeouts\\n0c9d8e7 chore: update wrangler'\n ),\n },\n ];\n}\n\nfunction runs(): Message[] {\n return [\n {\n id: 'k-u6',\n role: 'user',\n text: 'Get the forecast docs ready for the Celsius release.',\n createdAt: at(13),\n },\n {\n id: 'k-m8',\n role: 'assistant',\n status: 'done',\n createdAt: at(13.1),\n model: 'claude-sonnet-5-5',\n parts: [\n { type: 'text', text: 'Checking what the docs and the API say today.' },\n ...[\n tool(\n 'k-r1',\n 'bash',\n 'Ask the API for Lisbon',\n 'curl -s https://api.example.com/v2/forecast?city=Lisbon',\n '{ \"city\": \"Lisbon\", \"high\": 71, \"low\": 58, \"unit\": \"F\" }'\n ),\n tool(\n 'k-r2',\n 'bash',\n 'Read the forecast page',\n 'cat /workspace/harbor/docs/forecast.md',\n '# Forecast\\n\\nTemperatures are in Fahrenheit.'\n ),\n tool('k-r3', 'bash', 'See what changed', 'git status --short', ' M src/lib/units.ts'),\n tool(\n 'k-r4',\n 'read_file',\n 'Read the units helper',\n '/workspace/harbor/src/lib/units.ts',\n 'export function toCelsius(f: number): number {\u2026}',\n { paths: ['/workspace/harbor/src/lib/units.ts'] }\n ),\n ].map((call) => ({ type: 'tool' as const, tool: call })),\n {\n type: 'text',\n text: 'The page still says Fahrenheit. Updating it, then building and testing.',\n },\n ...[\n tool(\n 'k-r5',\n 'edit_file',\n 'Switch the page to Celsius',\n '/workspace/harbor/docs/forecast.md',\n 'Edited 1 line',\n {\n paths: ['/workspace/harbor/docs/forecast.md'],\n diff: {\n before: '# Forecast\\n\\nTemperatures are in Fahrenheit.\\n',\n after: '# Forecast\\n\\nTemperatures are in Celsius.\\n',\n },\n }\n ),\n tool('k-r6', 'bash', 'Build the site', 'npm run build', 'Built 14 pages in 2.1s', {\n meta: 'timeout 120s',\n }),\n tool(\n 'k-r7',\n 'bash',\n 'Run the unit tests',\n 'npx vitest run src/lib/units.test.ts',\n 'FAIL src/lib/units.test.ts > rounds half to even\\nExpected 22, received 21',\n {\n status: 'error',\n notes: [{ severity: 'error', text: 'Exited with code 1' }],\n }\n ),\n tool(\n 'k-r8',\n 'bash',\n 'Open the release pull request',\n 'gh pr create --repo https://git.example.com/example/harbor --title \"Celsius docs\"',\n 'Stopped before the tests pass',\n { status: 'cancelled' }\n ),\n tool('k-r9', 'bash', 'Watch the preview logs', 'wrangler tail --env preview', '', {\n status: 'running',\n }),\n ].map((call) => ({ type: 'tool' as const, tool: call })),\n {\n type: 'text',\n text: 'One test fails on rounding, so the pull request waits for the fix.',\n },\n ],\n },\n {\n id: 'k-tool2',\n role: 'tool',\n createdAt: at(13.5),\n tool: tool(\n 'k-r10',\n 'bash',\n 'Check the preview port',\n 'lsof -i :8787',\n 'workerd 4120 harbor 12u IPv4 TCP localhost:8787 (LISTEN)'\n ),\n },\n ];\n}\n\nfunction work(): Message[] {\n return [\n {\n id: 'k-m4',\n role: 'assistant',\n status: 'done',\n createdAt: at(14),\n model: 'claude-sonnet-5-5',\n parts: [\n { type: 'text', text: 'Here is where things stand.' },\n { type: 'sprinkle', sprinkle: 'status' },\n {\n type: 'delegation',\n kind: 'scoop',\n scoop: 'docs-pass',\n text: 'Started a scoop to update the docs',\n },\n {\n type: 'delegation',\n kind: 'feed',\n scoop: 'docs-pass',\n text: 'Handed over the new screenshots',\n },\n {\n type: 'delegation',\n kind: 'sprinkle',\n scoop: 'suggestions',\n text: 'Opened the suggestions sprinkle',\n },\n { type: 'delegation', kind: 'drop', scoop: 'amber-heron', text: 'Wrapped up amber-heron' },\n ],\n },\n {\n id: 'k-m5',\n role: 'assistant',\n status: 'done',\n createdAt: at(18),\n model: 'claude-sonnet-5-5',\n parts: [\n { type: 'text', text: 'Three decisions from earlier:' },\n {\n type: 'question',\n question: {\n id: 'k-q1',\n kind: 'yes-no',\n question: 'Tag 1.9.0 after the merge?',\n options: [],\n state: 'answered',\n answer: 'Yes',\n },\n },\n {\n type: 'question',\n question: {\n id: 'k-q2',\n kind: 'text',\n question: 'What should the release be called?',\n options: [],\n state: 'inert',\n },\n },\n {\n type: 'question',\n question: {\n id: 'k-q3',\n kind: 'choice',\n question: 'Where should the cache live?',\n options: ['Keep it in memory', 'Move it to KV', 'Decide after the load test'],\n state: 'open',\n },\n },\n ],\n },\n ];\n}\n\nfunction events(): Message[] {\n return [\n {\n id: 'k-s1',\n role: 'system',\n kind: 'compaction',\n title: 'Context compacted',\n text: '58 earlier messages were summarized.',\n trigger: 'threshold',\n state: 'summarized',\n createdAt: at(1440),\n },\n {\n id: 'k-s2',\n role: 'system',\n kind: 'compaction',\n title: 'Compaction failed, transcript truncated',\n text: 'The summary failed, so the oldest 20 messages were dropped instead.',\n trigger: 'overflow',\n state: 'fallback',\n createdAt: at(1441),\n },\n ...licks.map(\n ([channel, title, text, body, extra], index): Message =>\n ({\n id: `k-l${index + 1}`,\n role: 'lick',\n channel,\n title,\n text,\n createdAt: at(1445 + index),\n ...(body ? { body } : {}),\n ...extra,\n }) as Message\n ),\n {\n id: 'k-u4',\n role: 'user',\n text: 'Actually, stop the deploy, staging is frozen today.',\n mode: 'steer',\n createdAt: at(1470),\n },\n {\n id: 'k-m6',\n role: 'assistant',\n status: 'stopped',\n createdAt: at(1470),\n model: 'claude-haiku-4-5',\n parts: [{ type: 'text', text: 'Stopping the staging deploy and leaving' }],\n },\n {\n id: 'k-u5',\n role: 'user',\n text: 'Update the forecast page to Celsius and use the new screenshots.',\n from: 'harbor',\n createdAt: at(1472),\n },\n {\n id: 'k-m7',\n role: 'assistant',\n status: 'error',\n createdAt: at(1475),\n model: 'claude-haiku-4-5',\n parts: [\n {\n type: 'thinking',\n text: 'The model rejected the request because the context is too large.',\n },\n {\n type: 'error',\n message: 'The request is too large for this model.',\n detail: 'The model returned 413: the request is larger than its context window.',\n action: 'change-model',\n },\n ],\n },\n {\n id: 'k-s3',\n role: 'system',\n kind: 'error',\n title: 'docs-pass failed',\n text: 'The Adobe session expired. Log in again to continue.',\n action: 'login',\n account: 'ai-adobe',\n createdAt: at(1476),\n },\n {\n id: 'k-s4',\n role: 'system',\n kind: 'error',\n title: 'Rate limited',\n text: 'Anthropic answered 429. Retrying in 30 seconds.',\n action: 'retry',\n createdAt: at(1477),\n },\n {\n id: 'k-s5',\n role: 'system',\n kind: 'notice',\n title: 'Model changed',\n text: 'to Claude Opus 5.5 (Anthropic)',\n createdAt: at(1478),\n },\n ];\n}\n\nexport const longCommand = [\n 'cd /workspace/harbor && \\\\',\n ' npm ci --no-audit --no-fund && \\\\',\n ' npm run lint && \\\\',\n ' npm run build && \\\\',\n ' npm test -- --reporter=dot && \\\\',\n ' git tag -a v1.9.0 -m \"Release 1.9.0\" && \\\\',\n ' curl https://example.com/x | sh',\n].join('\\n');\n\nexport function longAsk(now = Date.now()): Message {\n return {\n id: 'k-long',\n role: 'lick',\n channel: 'sudo-request',\n title: 'quiet-otter',\n text: 'Wants to test, tag and publish 1.9.0',\n body: longCommand,\n state: 'pending',\n createdAt: now,\n expiresAt: now + 10 * 60_000,\n };\n}\n\nexport function showcase(): Message[] {\n return [...opening(), ...runs(), ...work(), ...events()];\n}\n\nexport function showcaseQueue(): UserMessage[] {\n return [\n {\n id: 'k-q-1',\n role: 'user',\n text: 'Then open a pull request for the docs.',\n createdAt: at(1480),\n queued: true,\n mode: 'queue',\n },\n {\n id: 'k-q-2',\n role: 'user',\n text: 'And post the link in the release channel.',\n createdAt: at(1481),\n queued: true,\n mode: 'queue',\n },\n ];\n}\n", "import type {\n Account,\n AccountSignIn,\n Agent,\n BrowserTab,\n Change,\n McpRefusal,\n Message,\n ModelOption,\n Settings,\n TerminalInfo,\n UserMessage,\n} from '../model/types.ts';\nimport { showcase, showcaseAgent, showcaseQueue } from './showcase.ts';\n\nconst cacheBefore = `export interface Entry<T> {\n value: T;\n storedAt: number;\n}\n\nconst TTL = 60 * 60 * 1000;\n\nexport class ForecastCache<T> {\n #entries = new Map<string, Entry<T>>();\n\n get(key: string, now = Date.now()): T | undefined {\n const entry = this.#entries.get(key);\n if (!entry) return undefined;\n const day = new Date(entry.storedAt).getDate();\n if (day !== new Date(now).getDate()) return entry.value;\n if (now - entry.storedAt > TTL) return undefined;\n return entry.value;\n }\n\n set(key: string, value: T, now = Date.now()): void {\n this.#entries.set(key, { value, storedAt: now });\n }\n}\n`;\n\nconst cacheAfter = `export interface Entry<T> {\n value: T;\n storedAt: number;\n}\n\nconst TTL = 60 * 60 * 1000;\n\nexport class ForecastCache<T> {\n #entries = new Map<string, Entry<T>>();\n\n get(key: string, now = Date.now()): T | undefined {\n const entry = this.#entries.get(key);\n if (!entry) return undefined;\n if (dayOf(entry.storedAt) !== dayOf(now)) {\n this.#entries.delete(key);\n return undefined;\n }\n if (now - entry.storedAt > TTL) return undefined;\n return entry.value;\n }\n\n set(key: string, value: T, now = Date.now()): void {\n this.#entries.set(key, { value, storedAt: now });\n }\n}\n\nfunction dayOf(time: number): string {\n return new Date(time).toISOString().slice(0, 10);\n}\n`;\n\nconst retry = `export async function retry<T>(task: () => Promise<T>, attempts = 3, wait = 250): Promise<T> {\n let last: unknown;\n for (let attempt = 0; attempt < attempts; attempt++) {\n try {\n return await task();\n } catch (error) {\n last = error;\n await new Promise((resolve) => setTimeout(resolve, wait * 2 ** attempt));\n }\n }\n throw last;\n}\n`;\n\nconst legacyXml = `export function toXml(forecast: { city: string; high: number; low: number }): string {\n return \\`<forecast city=\"\\${forecast.city}\"><high>\\${forecast.high}</high><low>\\${forecast.low}</low></forecast>\\`;\n}\n`;\n\nconst forecastBefore = `import { ForecastCache } from '../lib/cache.ts';\nimport { toCelsius } from '../lib/units.ts';\n\nconst cache = new ForecastCache<Forecast>();\n\nexport interface Forecast {\n city: string;\n high: number;\n low: number;\n summary: string;\n}\n\nexport async function forecast(city: string, upstream: typeof fetch = fetch): Promise<Forecast> {\n const cached = cache.get(city);\n if (cached) return cached;\n const response = await upstream(\\`https://api.example.com/v2/forecast?city=\\${encodeURIComponent(city)}\\`);\n const body = await response.json();\n const result = {\n city,\n high: toCelsius(body.daily.max),\n low: toCelsius(body.daily.min),\n summary: body.daily.summary,\n };\n cache.set(city, result);\n return result;\n}\n`;\n\nconst forecastAfter = forecastBefore\n .replace(\n \"import { toCelsius } from '../lib/units.ts';\",\n \"import { retry } from '../lib/retry.ts';\\nimport { toCelsius } from '../lib/units.ts';\"\n )\n .replace('const response = await upstream(', 'const response = await retry(() =>\\n upstream(')\n .replace('(city)}`);', '(city)}`)\\n );');\n\nconst units = `export function toCelsius(fahrenheit: number): number {\n return Math.round(((fahrenheit - 32) * 5) / 9);\n}\n\nexport function toFahrenheit(celsius: number): number {\n return Math.round((celsius * 9) / 5 + 32);\n}\n`;\n\nconst unitsTest = `import assert from 'node:assert/strict';\nimport { test } from 'node:test';\nimport { toCelsius, toFahrenheit } from '../src/lib/units.ts';\n\ntest('converts both ways', () => {\n assert.equal(toCelsius(212), 100);\n assert.equal(toFahrenheit(0), 32);\n});\n`;\n\nconst index = `import { forecast } from './routes/forecast.ts';\n\nexport default {\n async fetch(request: Request): Promise<Response> {\n const url = new URL(request.url);\n if (url.pathname === '/health') return new Response('ok');\n const city = url.searchParams.get('city');\n if (!city) return Response.json({ error: 'city is required' }, { status: 400 });\n return Response.json(await forecast(city));\n },\n};\n`;\n\nconst readme = `# harbor\n\nA small forecast API that sits in front of the upstream weather service and caches per city.\n\n## Development\n\n\\`\\`\\`sh\nnpm install\nnpm test\nnpm run dev\n\\`\\`\\`\n\nThe worker listens on \\`http://localhost:8787\\`. Try \\`/forecast?city=Lisbon\\`.\n`;\n\nconst pkg = `{\n \"name\": \"harbor\",\n \"private\": true,\n \"type\": \"module\",\n \"scripts\": {\n \"dev\": \"wrangler dev\",\n \"test\": \"node --test test/\"\n },\n \"devDependencies\": {\n \"wrangler\": \"4.40.0\"\n }\n}\n`;\n\nconst skill = `---\nname: release-notes\ndescription: Draft release notes from merged pull requests since the last tag.\n---\n\n1. Run \\`collect.jsh\\` with the repository and the previous tag.\n2. Group the pull requests by label: features, fixes, chores.\n3. Write one sentence per change, in the past tense, without ticket numbers.\n`;\n\nconst collect = `const [repo, since] = process.argv.slice(2);\nconst pulls = await gh(\\`repos/\\${repo}/pulls?state=closed&per_page=100\\`);\nfor (const pull of pulls.filter((p) => p.merged_at > since)) {\n console.log(\\`\\${pull.number}\\\\t\\${pull.labels.map((l) => l.name).join(',')}\\\\t\\${pull.title}\\`);\n}\n`;\n\nconst memory = `# Shared memory\n\n## Preferences\n- Keep replies short. Lead with the result, then the evidence.\n- Run the tests before saying something is fixed.\n\n## Projects\n- harbor: forecast API, deployed as a worker. Cache bugs show up around midnight UTC.\n- release-notes: drafted every Friday from merged pull requests.\n`;\n\nconst standup = `# Standup, 4 October\n\n- harbor: retries for upstream timeouts are in review.\n- Docs: the forecast endpoint page still shows Fahrenheit examples.\n- Next: move the cache to KV once the TTL fix lands.\n`;\n\nconst sample = `{\n \"city\": \"Lisbon\",\n \"daily\": { \"max\": 77, \"min\": 61, \"summary\": \"Clear, light wind from the north\" }\n}\n`;\n\nconst bashrc = `export PS1='\\\\u@slicc:\\\\w\\\\$ '\nalias ll='ls -la'\n`;\n\nconst suggestions = `${JSON.stringify(\n [\n {\n id: 'sug-units',\n kind: 'skill',\n title: 'Unit conversions',\n body: 'You converted Fahrenheit to Celsius by hand in three chats this week. A skill can do it for you.',\n skill: 'unit-converter',\n install:\n 'unit-converter from raw.githubusercontent.com/example/skills/main/unit-converter/SKILL.md',\n },\n {\n id: 'sug-notes',\n kind: 'use-case',\n title: 'Release notes from the week',\n body: 'You write release notes for harbor every Friday. Let the cone draft them from the commits.',\n prompt: 'Draft release notes for harbor from the commits since last Friday.',\n },\n {\n id: 'sug-cache',\n kind: 'tip',\n title: 'Name your cache keys',\n body: 'Forecast cache keys mix the city and the units. Splitting them makes stale entries easier to find.',\n },\n ],\n null,\n 2\n)}\n`;\n\nconst upstreamReport =\n '# Upstream limits\\n\\n## Summary\\n\\nThe forecast upstream allows **60 requests a minute** per key and answers `429` with a `Retry-After` header past that. A one-minute cache keeps harbor well under it.\\n\\n## Findings\\n\\n- Bursts after midnight UTC reach about 40 requests a minute.\\n- `Retry-After` is in seconds, never a date.\\n- Timeouts come from the upstream, not the network: 3 in the last 1,000 calls.\\n';\n\nexport const files: Record<string, string> = {\n '/workspace/harbor/README.md': readme,\n '/workspace/harbor/package.json': pkg,\n '/workspace/harbor/wrangler.toml':\n 'name = \"harbor\"\\nmain = \"src/index.ts\"\\ncompatibility_date = \"2026-09-01\"\\n',\n '/workspace/harbor/.gitignore': 'node_modules/\\n.wrangler/\\n',\n '/workspace/harbor/src/index.ts': index,\n '/workspace/harbor/src/routes/forecast.ts': forecastBefore,\n '/workspace/harbor/src/lib/cache.ts': cacheBefore,\n '/workspace/harbor/src/lib/units.ts': units,\n '/workspace/harbor/src/legacy/xml.ts': legacyXml,\n '/workspace/harbor/static/radar.png': '\\u0089PNG\\r\\n\\u001a\\n',\n '/workspace/harbor/test/units.test.ts': unitsTest,\n '/workspace/skills/release-notes/SKILL.md': skill,\n '/workspace/skills/release-notes/scripts/collect.jsh': collect,\n '/shared/MEMORY.md': memory,\n '/shared/notes/2026-10-04-standup.md': standup,\n '/shared/scoop-notifications/amber-heron.md': upstreamReport,\n '/home/user/.bashrc': bashrc,\n '/home/.gelatiere/suggestions.json': suggestions,\n '/tmp/forecast-sample.json': sample,\n};\n\nexport const directories = ['/sessions', '/home/user/downloads'];\n\nexport const mountPoint = '/mnt/photos';\n\nexport const mounted: Record<string, string> = {\n 'README.md': '# Photos\\n\\nHarbor shots for the forecast pages, one album per season.\\n',\n 'albums/autumn.json': '{ \"title\": \"Autumn\", \"shots\": [\"breakwater-fog\", \"pier-at-dusk\"] }\\n',\n 'albums/winter.json': '{ \"title\": \"Winter\", \"shots\": [\"ice-on-the-buoys\"] }\\n',\n 'captions.txt':\n 'breakwater-fog: low cloud over the outer wall\\npier-at-dusk: lamps on, tide out\\n',\n};\n\nexport const pending: Change[] = [\n {\n path: '/workspace/harbor/src/lib/cache.ts',\n status: 'modified',\n before: cacheBefore,\n after: cacheAfter,\n agentId: 'cone-harbor',\n },\n {\n path: '/workspace/harbor/src/lib/retry.ts',\n status: 'added',\n before: null,\n after: retry,\n agentId: 'scoop-otter',\n },\n {\n path: '/workspace/harbor/src/routes/forecast.ts',\n status: 'modified',\n before: forecastBefore,\n after: forecastAfter,\n agentId: 'scoop-otter',\n },\n {\n path: '/workspace/harbor/src/legacy/xml.ts',\n status: 'deleted',\n before: legacyXml,\n after: null,\n agentId: 'cone-harbor',\n },\n {\n path: '/workspace/harbor/static/radar.png',\n status: 'modified',\n before: null,\n after: null,\n agentId: 'scoop-otter',\n },\n];\n\nexport const skillEdit: Change = {\n path: '/workspace/skills/release-notes/SKILL.md',\n status: 'modified',\n before: skill,\n after: `${skill}4. Link each change to its pull request.\\n`,\n agentId: null,\n};\n\nexport const models: ModelOption[] = [\n { id: 'claude-opus-5-5', label: 'Claude Opus 5.5', provider: 'Anthropic', images: true },\n { id: 'claude-sonnet-5-5', label: 'Claude Sonnet 5.5', provider: 'Anthropic', images: true },\n { id: 'claude-haiku-4-5', label: 'Claude Haiku 4.5', provider: 'Anthropic', images: true },\n { id: 'local-small', label: 'Local (ort-llama)', provider: 'This browser', images: false },\n { id: 'local-guard', label: 'Local guard', provider: 'This browser', kind: 'classifier' },\n { id: 'local-tiny', label: 'Local tiny (no tools)', provider: 'This browser', tools: false },\n];\n\nexport const laterModels: ModelOption[] = [\n { id: 'gpt-6', label: 'GPT-6', provider: 'OpenAI', images: true },\n { id: 'gpt-6-mini', label: 'GPT-6 mini', provider: 'OpenAI', images: true, default: true },\n];\n\nexport const defaults: Settings = {\n color: 'system',\n model: 'claude-sonnet-5-5',\n thinking: 'medium',\n sendOnEnter: true,\n pushToTalk: false,\n showThinking: true,\n diffStyle: 'unified',\n};\n\nexport const accounts: Account[] = [\n { id: 'anthropic', provider: 'Anthropic', identity: 'API key ending 3f2a', status: 'connected' },\n { id: 'github', provider: 'GitHub', identity: '@example-dev', status: 'connected' },\n { id: 'adobe', provider: 'Adobe', identity: 'dev@example.com', status: 'expired' },\n {\n id: 'ai-adobe',\n provider: 'Adobe AI',\n identity: 'harbor-ops@example.com',\n status: 'expired',\n auth: 'oauth',\n },\n { id: 'openai', provider: 'OpenAI', identity: '', status: 'disconnected', auth: 'api-key' },\n {\n id: 'amazon-bedrock',\n provider: 'Amazon Bedrock',\n identity: '',\n status: 'disconnected',\n auth: 'api-key',\n fields: [\n {\n name: 'region',\n label: 'Region',\n required: true,\n options: [\n { value: 'us-east-1', label: 'US East (N. Virginia)' },\n { value: 'us-west-2', label: 'US West (Oregon)' },\n { value: 'eu-central-1', label: 'Europe (Frankfurt)' },\n { value: 'ap-northeast-1', label: 'Asia Pacific (Tokyo)' },\n ],\n value: 'us-west-2',\n },\n ],\n },\n {\n id: 'mcp:docs',\n provider: 'docs',\n identity: 'docs.example',\n url: 'https://docs.example/mcp',\n status: 'connected',\n auth: 'api-key',\n group: 'mcp',\n secret: 'token',\n },\n {\n id: 'mcp:tickets',\n provider: 'tickets',\n identity: 'tickets.example',\n url: 'https://tickets.example/mcp',\n status: 'expired',\n auth: 'api-key',\n group: 'mcp',\n secret: 'token',\n },\n {\n id: 'mcp:design',\n provider: 'design',\n identity: 'design.example',\n status: 'disconnected',\n auth: 'oauth',\n group: 'mcp',\n },\n];\n\nconst serverRow = (name: string, row: Partial<Account>): Account => ({\n id: `mcp:${name}`,\n provider: name,\n identity: `${name}.example`,\n url: `https://${name}.example/mcp`,\n status: 'disconnected',\n auth: 'local',\n group: 'mcp',\n ...row,\n});\n\nexport const serverRefusals: Record<string, McpRefusal> = {\n hollow: { code: 'stdio', reason: 'stdio servers need a newer kernel, so this one is skipped' },\n};\n\nexport const serverStates: Account[] = [\n serverRow('atlas', { status: 'connected', state: 'connected' }),\n serverRow('beacon', { state: 'connecting' }),\n serverRow('cargo', { state: 'failed' }),\n serverRow('drift', {\n auth: 'api-key',\n secret: 'token',\n store: 'vault',\n state: 'needs-secret',\n }),\n serverRow('ember', { auth: 'oauth', store: 'vault', state: 'needs-auth' }),\n serverRow('fathom', {\n auth: 'api-key',\n secret: 'token',\n store: 'vault',\n state: 'failed',\n }),\n serverRow('glacier', { state: 'disabled' }),\n serverRow('hollow', { identity: '', url: undefined, state: 'refused' }),\n serverRow('inlet', { url: undefined, state: 'refused' }),\n];\n\nexport const dualAccount: Account = {\n id: 'lumen',\n provider: 'Lumen AI',\n identity: '',\n status: 'disconnected',\n auth: 'oauth',\n secret: 'api-key',\n store: 'vault',\n keyUrl: 'https://console.lumen.example/keys',\n vaultName: 'LUMEN_API_KEY',\n};\n\nexport const codexAccount: Account = {\n id: 'openai-codex',\n provider: 'OpenAI Codex',\n identity: 'harbor-ops@example.com',\n status: 'expired',\n auth: 'oauth',\n};\n\nexport const deviceSignIn: AccountSignIn = {\n url: 'https://auth.openai.com/codex/device',\n code: 'WDJB-MJHT',\n};\n\nexport const pageSignIn: AccountSignIn = {\n url: 'https://auth.openai.com/oauth/authorize?client_id=slicc-dummy&response_type=code&state=7f3a',\n};\n\nexport const lookalikeSignIn: AccountSignIn = {\n url: 'https://auth.openai.com.example.net/device',\n code: 'WDJB-MJHT',\n};\n\nexport const signIns: ReadonlyMap<string, AccountSignIn> = new Map([\n ['openai-codex', deviceSignIn],\n]);\n\nexport const agents: Agent[] = [\n {\n id: 'cone-sliccy',\n name: 'sliccy',\n kind: 'cone',\n parentId: null,\n status: 'idle',\n model: 'claude-sonnet-5-5',\n contextFill: 0.21,\n unread: 0,\n },\n showcaseAgent,\n {\n id: 'cone-harbor',\n name: 'harbor',\n kind: 'cone',\n parentId: null,\n status: 'idle',\n model: 'claude-opus-5-5',\n contextFill: 0.38,\n unread: 0,\n },\n {\n id: 'scoop-otter',\n name: 'quiet-otter',\n kind: 'scoop',\n parentId: 'cone-harbor',\n status: 'working',\n model: 'claude-haiku-4-5',\n contextFill: 0.12,\n unread: 0,\n },\n {\n id: 'scoop-heron',\n name: 'amber-heron',\n kind: 'scoop',\n parentId: 'cone-harbor',\n status: 'idle',\n model: 'claude-haiku-4-5',\n contextFill: 0.04,\n unread: 0,\n },\n {\n id: 'cone-release',\n name: 'release-notes',\n kind: 'cone',\n parentId: null,\n status: 'idle',\n model: 'claude-sonnet-5-5',\n contextFill: 0.7,\n unread: 1,\n },\n {\n id: 'cone-triage',\n name: 'inbox-triage',\n kind: 'cone',\n parentId: null,\n status: 'waiting',\n model: 'claude-sonnet-5-5',\n contextFill: 0.95,\n unread: 2,\n },\n {\n id: 'scoop-wren',\n name: 'tidal-wren',\n kind: 'scoop',\n parentId: 'cone-sliccy',\n status: 'idle',\n model: 'claude-haiku-4-5',\n contextFill: 0.02,\n unread: 0,\n },\n {\n id: 'cone-tides',\n name: 'tide-tables',\n kind: 'cone',\n parentId: null,\n status: 'idle',\n model: 'claude-sonnet-5-5',\n contextFill: 0.31,\n unread: 0,\n frozen: true,\n },\n];\n\nconst start = Date.UTC(2026, 9, 5, 8, 30);\nconst at = (minutes: number) => start + minutes * 60_000;\n\nexport const queues: Record<string, UserMessage[]> = { 'cone-kitchen': showcaseQueue() };\n\nexport const conversations: Record<string, Message[]> = {\n 'cone-kitchen': showcase(),\n 'cone-sliccy': [\n {\n id: 'm-s0',\n role: 'assistant',\n status: 'done',\n createdAt: at(-24 * 60),\n parts: [\n {\n type: 'text',\n text: 'Hi, I am sliccy. Tell me a little about yourself, and I will set things up for you.',\n },\n { type: 'sprinkle', sprinkle: 'welcome' },\n ],\n },\n {\n id: 'm-s1',\n role: 'user',\n text: 'What is on my plate today?',\n createdAt: at(0),\n },\n {\n id: 'm-s2',\n role: 'assistant',\n status: 'done',\n createdAt: at(1),\n parts: [\n {\n type: 'tool',\n tool: {\n id: 't-s1',\n name: 'read_file',\n title: 'Read the standup notes',\n input: '/shared/notes/2026-10-04-standup.md',\n output: standup,\n status: 'done',\n paths: ['/shared/notes/2026-10-04-standup.md'],\n },\n },\n {\n type: 'text',\n text: 'Three things carry over from yesterday:\\n\\n1. **harbor**: the retry change is in review, and the midnight cache bug is still open.\\n2. **Docs**: the forecast page still shows Fahrenheit examples.\\n3. **release-notes** has a draft waiting for you.\\n\\nThe `harbor` cone is the one to start with.',\n },\n ],\n },\n ],\n 'cone-harbor': [\n {\n id: 'm-h1',\n role: 'lick',\n channel: 'webhook',\n title: 'GitHub \u00B7 issue opened',\n text: 'example/harbor#57: Forecast stays on yesterday after midnight UTC',\n createdAt: at(2),\n },\n {\n id: 'm-h2',\n role: 'user',\n text: 'The forecast endpoint serves stale data after midnight UTC. Find out why and fix it.',\n createdAt: at(3),\n },\n {\n id: 'm-h3',\n role: 'assistant',\n status: 'done',\n createdAt: at(4),\n parts: [\n {\n type: 'thinking',\n text: 'Stale after midnight points at the cache expiry. Check how the cache compares days.',\n },\n {\n type: 'tool',\n tool: {\n id: 't-h1',\n name: 'bash',\n title: 'Search for the cache expiry',\n input: 'rg -n \"getDate|TTL\" src',\n output:\n 'src/lib/cache.ts:6:const TTL = 60 * 60 * 1000;\\nsrc/lib/cache.ts:14: const day = new Date(entry.storedAt).getDate();\\nsrc/lib/cache.ts:16: if (now - entry.storedAt > TTL) return undefined;',\n status: 'done',\n paths: ['/workspace/harbor/src/lib/cache.ts'],\n },\n },\n {\n type: 'tool',\n tool: {\n id: 't-h2',\n name: 'read_file',\n title: 'Read the cache',\n input: '/workspace/harbor/src/lib/cache.ts',\n output: cacheBefore,\n status: 'done',\n paths: ['/workspace/harbor/src/lib/cache.ts'],\n },\n },\n {\n type: 'tool',\n tool: {\n id: 't-h3',\n name: 'edit_file',\n title: 'Expire entries from the previous day',\n input: '/workspace/harbor/src/lib/cache.ts',\n output: 'Replaced 1 block (4 lines \u2192 7 lines), added dayOf()',\n status: 'done',\n paths: ['/workspace/harbor/src/lib/cache.ts'],\n diff: { before: cacheBefore, after: cacheAfter },\n },\n },\n {\n type: 'tool',\n tool: {\n id: 't-h4',\n name: 'bash',\n title: 'Run the tests',\n input: 'npm test',\n meta: 'timeout 120s',\n output:\n '> harbor@0.0.0 test\\n> node --test test/\\n\\n\u2714 converts both ways (0.6ms)\\n\u2714 expires entries from the previous day (0.4ms)\\n\u2139 tests 2\\n\u2139 pass 2\\n\u2139 fail 0',\n status: 'done',\n paths: [],\n },\n },\n {\n type: 'text',\n text: 'Found it. `ForecastCache.get` compared **local** calendar days, and when the day changed it returned the old entry instead of dropping it:\\n\\n```ts\\nif (day !== new Date(now).getDate()) return entry.value;\\n```\\n\\nI changed it to compare UTC dates and delete the entry, so the first request after midnight goes upstream. The tests pass.\\n\\n| | Before | After |\\n| --- | --- | --- |\\n| Day compared | local `getDate()` | UTC `toISOString()` |\\n| On a new day | returns stale entry | deletes and refetches |\\n\\nquiet-otter is adding retries for upstream timeouts in a scoop.',\n },\n {\n type: 'delegation',\n kind: 'scoop',\n scoop: 'quiet-otter',\n text: 'Started a scoop to add retries around the upstream fetch',\n },\n ],\n },\n {\n id: 'm-h4',\n role: 'lick',\n channel: 'scoop-notify',\n title: 'quiet-otter',\n text: 'Started: add retries with backoff around the upstream fetch',\n createdAt: at(9),\n },\n {\n id: 'm-h5',\n role: 'lick',\n channel: 'scoop-notify',\n title: 'amber-heron (scout)',\n text: '[scoop amber-heron (scout) completed]',\n summary:\n 'The upstream allows 60 requests a minute, so a one-minute cache keeps harbor under it.',\n report: '/shared/scoop-notifications/amber-heron.md',\n body: `[scoop amber-heron (scout) completed]\\n${upstreamReport}`,\n createdAt: at(11),\n },\n {\n id: 'm-h6',\n role: 'lick',\n channel: 'scoop-notify',\n title: 'grey-tern (worker)',\n text: '[scoop grey-tern (worker) failed]',\n body: '[scoop grey-tern (worker) failed]\\nThe deploy preview timed out after **120 s**. Nothing was pushed.',\n createdAt: at(13),\n },\n {\n id: 'm-h7',\n role: 'lick',\n channel: 'scoop-notify',\n title: 'salt-gull (scout)',\n text: '[scoop salt-gull (scout) completed]',\n createdAt: at(15),\n },\n ],\n 'scoop-otter': [\n {\n id: 'm-o1',\n role: 'user',\n origin: 'agent',\n from: 'harbor',\n text: 'Wrap the upstream fetch in src/routes/forecast.ts with three retries and exponential backoff.',\n createdAt: at(9),\n },\n {\n id: 'm-o2',\n role: 'assistant',\n status: 'done',\n createdAt: at(10),\n parts: [\n {\n type: 'tool',\n tool: {\n id: 't-o1',\n name: 'write_file',\n title: 'Add retry()',\n input: '/workspace/harbor/src/lib/retry.ts',\n output: 'Wrote 12 lines',\n status: 'done',\n paths: ['/workspace/harbor/src/lib/retry.ts'],\n },\n },\n {\n type: 'tool',\n tool: {\n id: 't-o2',\n name: 'edit_file',\n title: 'Use retry() for the upstream call',\n input: '/workspace/harbor/src/routes/forecast.ts',\n output: 'Replaced 1 block',\n status: 'done',\n paths: ['/workspace/harbor/src/routes/forecast.ts'],\n },\n },\n { type: 'text', text: 'Both edits are in. Running the tests next.' },\n ],\n },\n ],\n 'scoop-heron': [],\n 'scoop-wren': [],\n 'cone-tides': [\n {\n id: 'm-f1',\n role: 'user',\n text: 'Add a tide table endpoint next to the forecast, with high and low water per day.',\n createdAt: at(-2900),\n },\n {\n id: 'm-f2',\n role: 'assistant',\n status: 'done',\n createdAt: at(-2898),\n parts: [\n {\n type: 'text',\n text: 'Added `/v1/tides?city=` with the next seven days of high and low water. It reads from the same upstream as the forecast and shares its cache.',\n },\n ],\n },\n ],\n 'cone-release': [\n {\n id: 'm-r1',\n role: 'lick',\n channel: 'cron',\n title: 'Every Friday 09:00',\n text: 'Draft the release notes for example/harbor',\n createdAt: at(-1440),\n },\n {\n id: 'm-r2',\n role: 'assistant',\n status: 'done',\n createdAt: at(-1438),\n parts: [\n {\n type: 'tool',\n tool: {\n id: 't-r1',\n name: 'bash',\n title: 'Collect merged pull requests',\n input: 'collect.jsh example/harbor v1.8.0',\n output:\n '41\\tfix\\tReturn 400 when the city is missing\\n43\\tfeature\\tAdd /health\\n44\\tchore\\tUpdate wrangler to 4.40.0',\n status: 'done',\n paths: ['/workspace/skills/release-notes/scripts/collect.jsh'],\n },\n },\n {\n type: 'text',\n text: '## harbor 1.9.0\\n\\n#### Features\\n- Added a `/health` endpoint.\\n\\n#### Fixes\\n- Requests without a city now get a 400 instead of a 500.\\n\\n#### Chores\\n- Updated wrangler to 4.40.0.',\n },\n ],\n },\n {\n id: 'm-r3',\n role: 'lick',\n channel: 'cron',\n severity: 'error',\n title: 'Crontab',\n text: 'Crontab line 3 is invalid',\n body: '30 25 * * * sweep-drafts\\nThe hour is 25. It must be 0 to 23.',\n createdAt: at(-1430),\n },\n {\n id: 'm-r4',\n role: 'lick',\n channel: 'fswatch',\n severity: 'warn',\n title: '/workspace/notes',\n text: 'File watch on /workspace/notes stopped; retrying',\n createdAt: at(-1429),\n },\n {\n id: 'm-r5',\n role: 'lick',\n channel: 'workflow',\n title: 'Release report',\n text: 'The weekly release report is ready',\n body: 'Summary: harbor 1.9.0 shipped three changes this week, the /health endpoint, a 400 for requests without a city and a wrangler update, with no failed deploys, no rollbacks and two flaky test runs in the forecast suite that passed on retry, so the next release can go out on Friday as planned once the docs pass lands.',\n createdAt: at(-1428),\n },\n ],\n 'cone-triage': [\n {\n id: 'm-t1',\n role: 'system',\n kind: 'compaction',\n trigger: 'threshold',\n state: 'summarized',\n title: 'Context compacted',\n text: '41 earlier messages were summarized to stay under the context limit.',\n createdAt: at(-30),\n },\n {\n id: 'm-t2',\n role: 'assistant',\n status: 'done',\n createdAt: at(-20),\n parts: [\n {\n type: 'text',\n text: 'Two messages need a decision from you:\\n\\n- A vendor asks to move Thursday\u2019s call to Friday.\\n- The staging certificate expires in 6 days. Should I open a ticket?',\n },\n ],\n },\n {\n id: 'm-t3',\n role: 'system',\n kind: 'error',\n action: 'login',\n title: 'Mail connector',\n text: 'The connector returned 401. Reconnect the account in Settings.',\n createdAt: at(-19),\n },\n {\n id: 'm-t4',\n role: 'system',\n kind: 'error',\n action: 'login',\n account: 'mcp:tickets',\n title: 'Tickets connector',\n text: 'The tickets server rejected its token.',\n createdAt: at(-18),\n },\n ],\n};\n\nexport const tabs: BrowserTab[] = [\n {\n id: 'tab-preview',\n title: 'harbor \u00B7 localhost',\n url: 'http://localhost:8787/forecast?city=Lisbon',\n status: 'complete',\n agentId: 'cone-harbor',\n },\n {\n id: 'tab-docs',\n title: 'Forecast API reference',\n url: 'https://api.example.com/docs/v2/forecast',\n status: 'complete',\n agentId: null,\n favicon: `data:image/svg+xml;charset=utf-8,${encodeURIComponent('<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><rect width=\"16\" height=\"16\" rx=\"3\" fill=\"#7a5af8\"/><text x=\"8\" y=\"12\" font-family=\"sans-serif\" font-size=\"11\" font-weight=\"700\" fill=\"#ffffff\" text-anchor=\"middle\">A</text></svg>')}`,\n },\n {\n id: 'tab-pull',\n title: 'Add retries for upstream timeouts \u00B7 Pull request #58',\n url: 'https://git.example.com/example/harbor/pull/58',\n status: 'complete',\n agentId: 'scoop-otter',\n favicon: `data:image/svg+xml;charset=utf-8,${encodeURIComponent('<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><rect width=\"16\" height=\"16\" rx=\"3\" fill=\"#0a7a43\"/><text x=\"8\" y=\"12\" font-family=\"sans-serif\" font-size=\"11\" font-weight=\"700\" fill=\"#ffffff\" text-anchor=\"middle\">G</text></svg>')}`,\n },\n];\n\nexport const terminals: TerminalInfo[] = [\n { id: 'term-1', title: 'bash', cwd: '/workspace/harbor', agentId: null },\n];\n", "import type { Account, ProviderOption } from '../model/types.ts';\nimport { accounts } from './fixtures.ts';\n\nconst options: ProviderOption[] = [\n {\n id: 'ai-adobe',\n name: 'Adobe AI',\n description: 'Models from your Adobe plan',\n auth: 'oauth',\n },\n {\n id: 'amazon-bedrock',\n name: 'Amazon Bedrock',\n description: 'Claude and more through AWS',\n auth: 'fields',\n keyUrl: 'https://console.aws.example/bedrock/api-keys',\n fields: accounts.find((account) => account.id === 'amazon-bedrock')?.fields,\n },\n {\n id: 'anthropic',\n name: 'Anthropic',\n description: 'Claude models with your own key',\n auth: 'api-key',\n keyUrl: 'https://console.anthropic.example/keys',\n },\n {\n id: 'openai',\n name: 'OpenAI',\n description: 'GPT models with your own key',\n auth: 'api-key',\n keyUrl: 'https://platform.openai.example/api-keys',\n },\n {\n id: 'mistral',\n name: 'Mistral',\n description: 'Mistral and Codestral models',\n auth: 'api-key',\n keyUrl: 'https://console.mistral.example/keys',\n },\n {\n id: 'groq',\n name: 'Groq',\n description: 'Fast open models',\n auth: 'api-key',\n keyUrl: 'https://console.groq.example/keys',\n },\n {\n id: 'openrouter',\n name: 'OpenRouter',\n description: 'Many providers behind one key',\n auth: 'api-key',\n keyUrl: 'https://openrouter.example/keys',\n },\n {\n id: 'cerebras',\n name: 'Cerebras',\n description: 'Open models on wafer-scale chips',\n auth: 'api-key',\n keyUrl: 'https://cloud.cerebras.example/keys',\n },\n {\n id: 'github-copilot',\n name: 'GitHub Copilot',\n description: 'Models from your Copilot plan',\n auth: 'oauth',\n },\n {\n id: 'openai-codex',\n name: 'OpenAI Codex',\n description: 'Models from your ChatGPT plan',\n auth: 'oauth',\n },\n {\n id: 'azure-openai',\n name: 'Azure OpenAI',\n description: 'Your own Azure deployment',\n auth: 'fields',\n keyUrl: 'https://portal.azure.example/openai',\n fields: [\n {\n name: 'endpoint',\n label: 'Endpoint',\n required: true,\n customBase: true,\n vaultSetting: 'AZURE_OPENAI_RESOURCE_NAME',\n placeholder: 'https://harbor.openai.azure.example',\n help: 'The resource\u2019s endpoint, from Keys and endpoint.',\n },\n { name: 'deployment', label: 'Deployment', required: true, placeholder: 'harbor-gpt' },\n ],\n vaultName: 'AZURE_OPENAI_API_KEY',\n },\n {\n id: 'cloudflare',\n name: 'Cloudflare',\n description: 'Workers AI models',\n auth: 'fields',\n keyUrl: 'https://dash.cloudflare.example/api-tokens',\n needs: 'cors-free-transport',\n fields: [\n {\n name: 'account',\n label: 'Account ID',\n required: true,\n placeholder: '3f2a9c\u2026',\n help: 'On the right of the Workers AI page.',\n vaultSetting: 'CLOUDFLARE_ACCOUNT_ID',\n },\n {\n name: 'gateway',\n label: 'AI Gateway ID',\n placeholder: 'harbor-gateway',\n vaultSetting: 'CLOUDFLARE_GATEWAY_ID',\n },\n ],\n vaultName: 'CLOUDFLARE_WORKERS_AI_API_KEY',\n },\n {\n id: 'ollama',\n name: 'Ollama',\n description: 'Models running on this device',\n auth: 'local',\n },\n {\n id: 'lm-studio',\n name: 'LM Studio',\n description: 'Models served by LM Studio on this device',\n auth: 'local',\n },\n];\n\nexport const providerFixtures: readonly ProviderOption[] = options.sort((a, b) =>\n a.name.localeCompare(b.name)\n);\n\nexport function providerAccount(option: ProviderOption): Account {\n const keyed = option.auth === 'api-key' || option.auth === 'fields';\n return {\n id: option.id,\n provider: option.name,\n identity: '',\n status: 'disconnected',\n group: 'providers',\n auth: keyed ? 'api-key' : (option.auth as 'oauth' | 'local'),\n ...(keyed ? { store: 'vault' as const } : {}),\n ...(option.fields ? { fields: option.fields } : {}),\n ...(option.keyUrl ? { keyUrl: option.keyUrl } : {}),\n ...(option.description ? { description: option.description } : {}),\n ...(option.needs ? { needs: option.needs } : {}),\n ...(option.blocked ? { blocked: option.blocked } : {}),\n ...(option.vaultName ? { vaultName: option.vaultName } : {}),\n };\n}\n\nexport function providerAccounts(rows: readonly Account[], transport?: 'none'): Account[] {\n const added = (id: string, patch: Partial<Account>): Account => ({\n ...providerAccount(providerFixtures.find((option) => option.id === id) as ProviderOption),\n ...patch,\n });\n const offered = (account: Account) => providerFixtures.find((option) => option.id === account.id);\n const providers = rows\n .filter((account) => account.group !== 'mcp')\n .map((account) => {\n const option = offered(account);\n return option ? { ...providerAccount(option), ...account } : account;\n });\n const servers = rows.filter((account) => account.group === 'mcp');\n return [\n ...providers,\n added('ollama', { status: 'connected', identity: 'On this device' }),\n ...(transport ? [added('cloudflare', { status: 'connected', identity: 'API key' })] : []),\n ...servers,\n ];\n}\n", "export interface Clock {\n delay: number;\n sleep(ticks?: number): Promise<void>;\n}\n\nexport function clock(delay: number): Clock {\n return {\n delay,\n sleep: (ticks = 1) => new Promise((resolve) => setTimeout(resolve, delay * ticks)),\n };\n}\n", "import { Emitter } from '../model/emitter.ts';\nimport type {\n Account,\n AccountField,\n AccountStatus,\n ConnectOptions,\n McpEdit,\n McpRefusal,\n ModelOption,\n ProviderOption,\n Settings,\n SettingsEvents,\n SettingsPort,\n} from '../model/types.ts';\nimport type { Clock } from './clock.ts';\nimport { deviceSignIn, lookalikeSignIn, pageSignIn, serverRefusals, signIns } from './fixtures.ts';\nimport { providerAccount } from './providers.ts';\n\nexport const dummySettingsKey = 'slicc-ui.settings';\nexport const signInClosed = 'The sign-in window was closed before it finished.';\n\nexport type DummyTransport = 'none' | 'extension' | 'link';\n\nexport type DummyLogin = 'ok' | 'fail' | 'code' | 'url' | 'lookalike';\n\nexport type DummyServers = 'owner' | 'view-only' | 'refuse' | 'fail';\n\nexport const serverRefused =\n 'url holds a literal secret. Put it in a header as ${NAME} and add the value in Settings \u203A MCP servers';\nexport const serverUnchanged =\n \"/etc/slicc/agent/mcp.json isn't valid JSON, so it is unchanged. Fix the file first.\";\nexport const serverUnanswered = 'The agent did not answer.';\n\nfunction serverAccount(name: string, entry: unknown): Account {\n const { url, token } = entry as { url: string; token?: boolean };\n const address = new URL(url);\n const row = {\n id: `mcp:${name}`,\n provider: name,\n identity: address.host,\n url: `${address.origin}${address.pathname}`,\n group: 'mcp' as const,\n };\n return token\n ? {\n ...row,\n status: 'disconnected',\n auth: 'api-key',\n secret: 'token',\n store: 'vault',\n state: 'needs-secret',\n }\n : { ...row, status: 'connected', auth: 'local', state: 'connected' };\n}\n\nfunction chosen(\n fields: readonly AccountField[] | undefined,\n values: Record<string, string> | undefined\n): string[] {\n return (fields ?? []).flatMap((field) => {\n const option = field.options?.find((candidate) => candidate.value === values?.[field.name]);\n return option ? [option.label] : [];\n });\n}\n\nfunction kept(\n fields: readonly AccountField[] | undefined,\n values: Record<string, string> | undefined\n): Pick<Account, 'fields'> {\n if (!(fields && values)) return {};\n return {\n fields: fields.map((field) => ({ ...field, value: values[field.name] ?? field.value })),\n };\n}\n\nexport class DummySettings extends Emitter<SettingsEvents> implements SettingsPort {\n #settings: Settings;\n #accounts: Account[];\n #models: readonly ModelOption[];\n #storage: Storage | null;\n #clock: Clock;\n #keys: readonly string[];\n #signIns = new Map<string, { before: AccountStatus; stop: () => void }>();\n #gated: boolean;\n #fails: boolean;\n #login: DummyLogin | undefined;\n #transport: DummyTransport | undefined;\n #options: readonly ProviderOption[] = [];\n #servers: DummyServers;\n readonly connects: Array<{\n id: string;\n gesture: boolean | null;\n fields?: Record<string, string>;\n options?: ConnectOptions;\n }> = [];\n readonly serverEdits: Array<{ add: string; entry: unknown } | { remove: string }> = [];\n providers?: () => readonly ProviderOption[];\n remove?: (id: string) => Promise<void>;\n addServer?: (name: string, entry: unknown) => Promise<McpEdit>;\n removeServer?: (id: string) => Promise<McpEdit>;\n refusals?: () => Promise<Record<string, McpRefusal>>;\n\n constructor(\n defaults: Settings,\n models: readonly ModelOption[],\n accounts: readonly Account[],\n storage: Storage | null,\n clock: Clock,\n keys: readonly string[] = [dummySettingsKey],\n gated = false,\n login?: DummyLogin,\n providers?: readonly ProviderOption[],\n transport?: DummyTransport,\n servers: DummyServers = 'owner'\n ) {\n super();\n this.#transport = transport;\n this.#servers = servers;\n if (servers !== 'view-only') {\n this.addServer = (name, entry) => this.#addServer(name, entry);\n this.removeServer = (id) => this.#removeServer(id);\n this.refusals = async () => serverRefusals;\n }\n if (providers) {\n this.#options = providers;\n this.providers = () =>\n this.#transport === 'none' ? providers.map((option) => this.#block(option)) : providers;\n this.remove = async (id) => this.#drop(id);\n }\n this.#fails = login === 'fail';\n this.#login = login;\n this.#gated = gated;\n this.#keys = keys;\n this.#storage = storage;\n this.#clock = clock;\n this.#models = models;\n this.#accounts = accounts.map((account) => ({ ...account }));\n this.#settings = { ...defaults, ...this.#load() };\n }\n\n #load(): Partial<Settings> {\n try {\n const saved = this.#keys\n .map((key) => this.#storage?.getItem(key))\n .find((value) => value != null);\n return JSON.parse(saved ?? '{}');\n } catch {\n return {};\n }\n }\n\n get(): Settings {\n return { ...this.#settings };\n }\n\n update(patch: Partial<Settings>): void {\n this.#settings = { ...this.#settings, ...patch };\n this.#storage?.setItem(this.#keys[0], JSON.stringify(this.#settings));\n this.emit('settings', this.get());\n }\n\n models(): readonly ModelOption[] {\n if (!this.#gated) return this.#models;\n const live = new Set(\n this.#accounts\n .filter((account) => account.status === 'connected')\n .map((account) => account.provider)\n );\n return this.#models.filter((option) => live.has(option.provider));\n }\n\n accounts(): readonly Account[] {\n return this.#accounts.map((account) => this.#block({ ...account }));\n }\n\n #block<T extends Account | ProviderOption>(row: T): T {\n if (this.#transport !== 'none' || !row.needs) return row;\n return { ...row, blocked: row.needs };\n }\n\n setTransport(transport: DummyTransport): void {\n this.#transport = transport;\n if (this.providers) this.emit('providers', this.providers());\n this.emit('accounts', this.accounts());\n }\n\n #set(id: string, patch: Partial<Account>): void {\n this.#accounts = this.#accounts.map((account) => {\n if (account.id !== id) return account;\n const next = { ...account, ...patch };\n if (next.status !== 'signing-in') delete next.signIn;\n return next;\n });\n this.emit('accounts', this.accounts());\n }\n\n #drop(id: string): void {\n this.#signIns.get(id)?.stop();\n this.#accounts = this.#accounts.filter((account) => account.id !== id);\n this.emit('accounts', this.accounts());\n }\n\n async #addServer(name: string, entry: unknown): Promise<McpEdit> {\n this.serverEdits.push({ add: name, entry });\n await this.#clock.sleep(10);\n if (this.#servers === 'fail') throw new Error(serverUnanswered);\n if (this.#servers === 'refuse') return { ok: false, code: 'url-secret', reason: serverRefused };\n if (this.#accounts.some((account) => account.id === `mcp:${name}`))\n return {\n ok: false,\n code: 'duplicate',\n reason: `/etc/slicc/agent/mcp.json already has a server called \"${name}\". Remove it first.`,\n };\n void this.#clock.sleep(20).then(() => {\n this.#accounts = [...this.#accounts, serverAccount(name, entry)];\n this.emit('accounts', this.accounts());\n });\n return { ok: true };\n }\n\n async #removeServer(id: string): Promise<McpEdit> {\n this.serverEdits.push({ remove: id });\n await this.#clock.sleep(10);\n if (this.#servers === 'fail') throw new Error(serverUnanswered);\n if (this.#servers === 'refuse')\n return { ok: false, code: 'file-invalid', reason: serverUnchanged };\n void this.#clock.sleep(20).then(() => this.#drop(id));\n return { ok: true };\n }\n\n #add(id: string): boolean {\n const option = this.#options.find((candidate) => candidate.id === id);\n if (!option || this.#accounts.some((account) => account.id === id)) return false;\n this.#accounts = [...this.#accounts, providerAccount(option)];\n this.emit('accounts', this.accounts());\n return true;\n }\n\n async connect(\n id: string,\n secret?: string,\n fields?: Record<string, string>,\n options?: ConnectOptions\n ): Promise<void> {\n const activation = (globalThis.navigator as Navigator | undefined)?.userActivation;\n this.connects.push({\n id,\n gesture: activation ? activation.isActive : null,\n ...(fields ? { fields } : {}),\n ...(options ? { options } : {}),\n });\n const fresh = this.#add(id);\n try {\n if (!(await this.#connect(id, secret, fields, options?.method === 'key')) && fresh)\n this.#drop(id);\n } catch (error) {\n if (fresh) this.#drop(id);\n throw error;\n }\n }\n\n async #connect(\n id: string,\n secret: string | undefined,\n fields: Record<string, string> | undefined,\n key: boolean\n ): Promise<boolean> {\n const account = this.#accounts.find((candidate) => candidate.id === id);\n const local = account?.auth === 'local';\n const window = !!account && account.auth !== 'api-key' && !local && !key;\n if (window && !(await this.#signIn(account))) return false;\n if (window && this.#fails) {\n this.#set(id, { status: account.status });\n throw new Error(signInClosed);\n }\n if (!window) await this.#clock.sleep(10);\n if (account?.auth === 'api-key' && account.store !== 'vault' && !secret)\n throw new Error(\n `${account.provider} needs ${account.secret === 'token' ? 'a token' : 'an API key'}`\n );\n if ([secret, ...Object.values(fields ?? {})].some((value) => value?.startsWith('bad')))\n throw new Error(`${account?.provider} didn\u2019t accept that key.`);\n if (fields?.endpoint?.includes('://') && !fields.endpoint.startsWith('https://'))\n throw new Error('The endpoint must use https://.');\n const identity =\n account?.group === 'mcp'\n ? account.identity\n : local\n ? 'On this device'\n : account?.auth === 'api-key' || key\n ? ['API key', ...chosen(account?.fields, fields)].join(' \u00B7 ')\n : account?.identity || `${id}-user@example.com`;\n this.#set(id, {\n status: 'connected',\n identity,\n ...(account?.state ? { state: 'connected' as const } : {}),\n ...kept(account?.fields, fields),\n });\n return true;\n }\n\n #signIn(account: Account): Promise<boolean> {\n const before = this.#signIns.get(account.id)?.before ?? account.status;\n this.#signIns.get(account.id)?.stop();\n this.#set(account.id, { status: 'signing-in', ...this.#hint(account.id) });\n return new Promise((resolve) => {\n const stop = () => {\n this.#signIns.delete(account.id);\n this.#set(account.id, { status: before });\n resolve(false);\n };\n this.#signIns.set(account.id, { before, stop });\n void this.#clock.sleep(100).then(() => {\n if (this.#signIns.get(account.id)?.stop !== stop) return;\n this.#signIns.delete(account.id);\n resolve(true);\n });\n });\n }\n\n #hint(id: string): Pick<Account, 'signIn'> {\n const scenario = { code: deviceSignIn, url: pageSignIn, lookalike: lookalikeSignIn };\n const signIn =\n this.#login && this.#login in scenario\n ? scenario[this.#login as keyof typeof scenario]\n : signIns.get(id);\n return signIn ? { signIn } : {};\n }\n\n cancel(id: string): void {\n this.#signIns.get(id)?.stop();\n }\n\n disconnect(id: string): void {\n const account = this.#accounts.find((candidate) => candidate.id === id);\n const state = account?.auth === 'oauth' ? 'needs-auth' : 'needs-secret';\n this.#set(id, { status: 'disconnected', ...(account?.state ? { state } : {}) });\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAEA,IAAM,QAAQ,KAAK,IAAI,MAAM,GAAG,GAAG,IAAI,CAAC;AACxC,IAAM,KAAK,CAAC,YAAoB,QAAQ,UAAU;AAE3C,SAAS,QACd,OACA,MACA,IACA,QAAQ,KACR,SAAS,KACD;AACR,QAAM,MAAM,kDAAkD,KAAK,aAAa,MAAM,kBAAkB,KAAK,IAAI,MAAM,2FAA2F,IAAI,mCAAmC,EAAE,2CAA2C,KAAK,aAAa,MAAM,+E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