@ai-ecoverse/slicc-spectrum 1.73.2 → 1.75.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.
@@ -9,6 +9,8 @@ import { ModelElement } from './base.js';
9
9
  export declare function ordered(agents: readonly Agent[]): Agent[];
10
10
  export declare function creatable(model: SliccModel | null | undefined): boolean;
11
11
  export declare function createCone(model: SliccModel, trigger: HTMLElement): Promise<Agent | undefined>;
12
+ export declare function scoopSummary(scoops: readonly Agent[]): string;
13
+ export declare function unreadCount(unread: number): string;
12
14
  export declare function fillShown(fill: number): boolean;
13
15
  export declare class SliccAgents extends ModelElement {
14
16
  #private;
@@ -43,3 +43,4 @@ export declare function meterVariant(value: number): 'informative' | 'notice' |
43
43
  export declare function chatModels(options: readonly ModelOption[]): ModelOption[];
44
44
  export declare function statusLight(status: AgentStatus): TemplateResult;
45
45
  export declare const shared: import("lit").CSSResult;
46
+ export declare function speech<T>(): (new () => T) | undefined;
@@ -25,6 +25,7 @@ export declare function followPage(state: FollowState | undefined): FollowPage |
25
25
  export declare function followCan(state: FollowState): string;
26
26
  export declare function following(model: SliccModel | null | undefined): FollowState | null;
27
27
  export declare function watchOnly(model: SliccModel | null | undefined): string;
28
+ export declare function onWatch(model: SliccModel, listener: () => void): Array<() => void>;
28
29
  export declare function terminalsAllowed(model: SliccModel | null | undefined): boolean;
29
30
  export declare class SliccFollow extends ModelElement {
30
31
  #private;
@@ -2,7 +2,7 @@ import { type PropertyValues, type TemplateResult } from 'lit';
2
2
  import type { SliccModel } from '../model/types.js';
3
3
  import { type Color, ThemedElement } from './base.js';
4
4
  import { type FontFile } from './fonts.js';
5
- export declare const bridge = "(() => {\n const post = (message) => parent.postMessage(message, '*');\n window.slicc = {\n name: document.currentScript.dataset.name,\n lick(event) {\n const value = typeof event === 'string' ? { action: event } : event || {};\n post({ type: 'slicc-lick', action: String(value.action || ''), data: value.data ?? null, target: value.target ?? null });\n },\n };\n const wanted = new Set();\n let timer = 0;\n window.LucideIcons = {\n render() {\n for (const node of document.querySelectorAll('i[data-lucide]')) wanted.add(node.dataset.lucide);\n clearTimeout(timer);\n timer = setTimeout(() => post({ type: 'slicc-icons', names: [...wanted] }));\n },\n };\n const swap = (found) => {\n for (const node of document.querySelectorAll('i[data-lucide]')) {\n const markup = found[node.dataset.lucide];\n if (!markup) continue;\n const template = document.createElement('template');\n template.innerHTML = markup;\n const svg = template.content.firstElementChild;\n for (const { name, value } of node.attributes) {\n if (name === 'class') svg.setAttribute('class', svg.getAttribute('class') + ' ' + value);\n else if (name !== 'data-lucide') svg.setAttribute(name, value);\n }\n node.replaceWith(svg);\n }\n };\n const fonts = (list) => {\n for (const font of list) {\n const face = new FontFace(font.family, font.data, { weight: String(font.weight) });\n document.fonts.add(face);\n face.load().catch(() => {});\n }\n };\n addEventListener('message', (event) => {\n if (event.source !== parent) return;\n const message = event.data || {};\n if (message.type === 'slicc-icons') swap(message.icons);\n if (message.type === 'slicc-fonts') fonts(message.fonts);\n if (message.type === 'slicc-theme') document.documentElement.classList.toggle('theme-light', message.color === 'light');\n });\n const size = () => {\n const style = getComputedStyle(document.body);\n post({ type: 'slicc-size', height: Math.ceil(document.body.offsetHeight + parseFloat(style.marginTop) + parseFloat(style.marginBottom)) });\n };\n document.addEventListener('DOMContentLoaded', () => {\n window.LucideIcons.render();\n new ResizeObserver(size).observe(document.body);\n });\n post({ type: 'slicc-ready' });\n})();";
5
+ export declare const bridge = "(() => {\n const post = (message) => parent.postMessage(message, '*');\n window.slicc = {\n name: document.currentScript.dataset.name,\n lick(event) {\n const value = typeof event === 'string' ? { action: event } : event || {};\n post({ type: 'slicc-lick', action: String(value.action || ''), data: value.data ?? null, target: value.target ?? null });\n },\n };\n const wanted = new Set();\n let timer = 0;\n window.LucideIcons = {\n render() {\n for (const node of document.querySelectorAll('i[data-lucide]')) wanted.add(node.dataset.lucide);\n clearTimeout(timer);\n timer = setTimeout(() => post({ type: 'slicc-icons', names: [...wanted] }));\n },\n };\n const swap = (found) => {\n for (const node of document.querySelectorAll('i[data-lucide]')) {\n const markup = found[node.dataset.lucide];\n if (!markup) continue;\n const template = document.createElement('template');\n template.innerHTML = markup;\n const svg = template.content.firstElementChild;\n for (const { name, value } of node.attributes) {\n if (name === 'class') svg.setAttribute('class', svg.getAttribute('class') + ' ' + value);\n else if (name !== 'data-lucide') svg.setAttribute(name, value);\n }\n node.replaceWith(svg);\n }\n size();\n };\n const fonts = (list) => {\n for (const font of list) {\n const face = new FontFace(font.family, font.data, { weight: String(font.weight) });\n document.fonts.add(face);\n face.load().then(size, () => {});\n }\n };\n addEventListener('message', (event) => {\n if (event.source !== parent) return;\n const message = event.data || {};\n if (message.type === 'slicc-icons') swap(message.icons);\n if (message.type === 'slicc-fonts') fonts(message.fonts);\n if (message.type === 'slicc-theme') document.documentElement.classList.toggle('theme-light', message.color === 'light');\n });\n const size = () => {\n const style = getComputedStyle(document.body);\n post({ type: 'slicc-size', height: Math.ceil(document.body.offsetHeight + parseFloat(style.marginTop) + parseFloat(style.marginBottom)) });\n };\n document.addEventListener('DOMContentLoaded', () => {\n window.LucideIcons.render();\n size();\n new ResizeObserver(size).observe(document.body);\n });\n post({ type: 'slicc-ready' });\n})();";
6
6
  export declare function literal(value: unknown): string;
7
7
  export declare function store(state: unknown): string;
8
8
  export declare function frameDocument(source: string, color: Color, name: string, state?: {
@@ -35,6 +35,8 @@ export declare class DummyAgent extends Emitter<AgentEvents> implements AgentPor
35
35
  lick(agentId: string, channel: LickChannel, title: string, text: string, body?: string): void;
36
36
  hold(): AgentHold | null;
37
37
  setHold(hold: AgentHold | null): void;
38
+ readOnly(): string | null;
39
+ setReadOnly(text: string | null): void;
38
40
  frozen(): readonly FrozenCone[];
39
41
  freeze(agentId: string): void;
40
42
  thaw(id: string): Agent | null;
@@ -29,6 +29,7 @@ export interface DummyOptions {
29
29
  accounts?: 'settings' | 'vault';
30
30
  providers?: 'connected' | 'none';
31
31
  hold?: AgentHold['reason'] | 'off';
32
+ readonly?: 'version' | 'off';
32
33
  browser?: BrowserScenario;
33
34
  sprinkles?: 'builtin' | 'cones';
34
35
  monitor?: 'dummy' | 'agent';
@@ -44,4 +45,4 @@ export interface DummyModel extends SliccModel {
44
45
  vault?: DummyVault;
45
46
  }
46
47
  export declare function vaultAccounts(accounts: readonly Account[]): Account[];
47
- export declare function createDummyModel({ delay, storage, updates, packages, confirm, mounts, network, tailnet, links, leaders, changes, notices, tabs, approvals, follow, vault, accounts, providers, hold, browser: scenario, sprinkles, monitor, }?: DummyOptions): DummyModel;
48
+ export declare function createDummyModel({ delay, storage, updates, packages, confirm, mounts, network, tailnet, links, leaders, changes, notices, tabs, approvals, follow, vault, accounts, providers, hold, readonly, browser: scenario, sprinkles, monitor, }?: DummyOptions): DummyModel;
@@ -1,8 +1,9 @@
1
1
  import { Emitter } from '../model/emitter.js';
2
2
  import type { Notice, NoticesPort } from '../model/types.js';
3
3
  import type { Clock } from './clock.js';
4
- export type NoticeScenario = 'storage' | 'mixed' | 'fail';
5
- export declare const noticeFixtures: Record<'storage' | 'welcome', Notice>;
4
+ export type NoticeScenario = 'storage' | 'mixed' | 'fail' | 'readonly';
5
+ export declare const readOnlyText = "Watch only. The SLICC you follow runs a newer version. Update this one to send prompts.";
6
+ export declare const noticeFixtures: Record<'storage' | 'welcome' | 'readonly', Notice>;
6
7
  export declare class DummyNotices extends Emitter<{
7
8
  notices: readonly Notice[];
8
9
  }> implements NoticesPort {
@@ -11,4 +12,5 @@ export declare class DummyNotices extends Emitter<{
11
12
  list(): readonly Notice[];
12
13
  act(id: string, action: string): Promise<void>;
13
14
  dismiss(id: string): void;
15
+ readOnly(on: boolean): void;
14
16
  }
@@ -232,6 +232,7 @@ export interface AgentEvents {
232
232
  messages: string;
233
233
  frozen: readonly FrozenCone[];
234
234
  hold: AgentHold | null;
235
+ readOnly: string | null;
235
236
  }
236
237
  export interface AgentPort extends Subscribable<AgentEvents> {
237
238
  list(): readonly Agent[];
@@ -263,6 +264,7 @@ export interface AgentPort extends Subscribable<AgentEvents> {
263
264
  drop?(agentId: string): Promise<void>;
264
265
  createCone?(name: string): Promise<Agent>;
265
266
  hold?(): AgentHold | null;
267
+ readOnly?(): string | null;
266
268
  }
267
269
  export interface SlashCommand {
268
270
  name: string;
@@ -404,6 +406,7 @@ export interface Settings {
404
406
  model: string;
405
407
  thinking: Thinking;
406
408
  sendOnEnter: boolean;
409
+ pushToTalk?: boolean;
407
410
  showThinking: boolean;
408
411
  diffStyle: 'unified' | 'split';
409
412
  }
@@ -776,6 +779,7 @@ export interface Notice {
776
779
  title: string;
777
780
  body: string;
778
781
  actions: readonly NoticeAction[];
782
+ dismissible?: false;
779
783
  }
780
784
  export interface NoticesPort extends Subscribable<{
781
785
  notices: readonly Notice[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-spectrum",
3
- "version": "1.73.2",
3
+ "version": "1.75.0",
4
4
  "description": "Web components for SLICC on Spectrum Web Components: the terminal, the app shell and its surfaces",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -51,7 +51,7 @@
51
51
  "release": "semantic-release",
52
52
  "start": "npm run build && node test/integration/chrome.mjs",
53
53
  "pretest": "npm run build && playwright-core install --no-shell chromium",
54
- "test": "node --test --test-global-setup=node_modules/@ai-ecoverse/slicc-shared-web/harness/global.mjs 'test/integration/*.test.mjs'",
54
+ "test": "node --test ${TEST_CONCURRENCY:+--test-concurrency=$TEST_CONCURRENCY} --test-global-setup=node_modules/@ai-ecoverse/slicc-shared-web/harness/global.mjs 'test/integration/*.test.mjs'",
55
55
  "test:unit": "NODE_NO_WARNINGS=1 mcr -c node_modules/@ai-ecoverse/slicc-shared-web/mcr.config.mjs node --test 'test/unit/**/*.test.mjs'",
56
56
  "typecheck": "tsc && tsc -p compat",
57
57
  "lint": "slicc-lint",
@@ -72,11 +72,11 @@
72
72
  "devDependencies": {
73
73
  "@adobe/spectrum-wc": "2.0.0-beta.5",
74
74
  "@adobe/spectrum-wc-icons": "2.0.0-beta.5",
75
- "@ai-ecoverse/slicc-kernel": "1.94.1",
76
- "@ai-ecoverse/slicc-shared-web": "1.16.0",
75
+ "@ai-ecoverse/slicc-kernel": "1.94.2",
76
+ "@ai-ecoverse/slicc-shared-web": "1.20.0",
77
77
  "@ai-ecoverse/slicc-vault": "1.9.1",
78
78
  "@ai-ecoverse/wasm-bash": "5.3.0-18",
79
- "@ai-ecoverse/wasm-coreutils": "9.7.0-3",
79
+ "@ai-ecoverse/wasm-coreutils": "9.12.0-6",
80
80
  "@biomejs/biome": "2.5.15",
81
81
  "@fontsource/source-code-pro": "5.3.0",
82
82
  "@happy-dom/global-registrator": "20.14.5",