@ai-ecoverse/slicc-spectrum 1.23.3 → 1.25.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 +14 -3
- package/dist/slicc-dummy.js +58 -4
- package/dist/slicc-dummy.js.map +3 -3
- package/dist/slicc-ui.js +7684 -5296
- package/dist/slicc-ui.js.map +4 -4
- package/dist/types/app/composer.d.ts +14 -1
- package/dist/types/app/properties.d.ts +2 -0
- package/dist/types/app/sprinkle.d.ts +7 -1
- package/dist/types/dummy/agent.d.ts +1 -1
- package/dist/types/dummy/sprinkles.d.ts +4 -2
- package/dist/types/model/types.d.ts +3 -0
- package/package.json +3 -3
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
import '@adobe/spectrum-wc/components/button/swc-button.js';
|
|
2
|
+
import '@adobe/spectrum-wc/components/close-button/swc-close-button.js';
|
|
3
|
+
import '@adobe/spectrum-wc/patterns/ai-toolkit/prompt-field/swc-prompt-field.js';
|
|
4
|
+
import '@adobe/spectrum-wc/patterns/ai-toolkit/upload-attachment/swc-upload-attachment.js';
|
|
5
|
+
import '@adobe/spectrum-wc-icons/swc-icon-alert-triangle.js';
|
|
6
|
+
import '@adobe/spectrum-wc-icons/swc-icon-clock.js';
|
|
7
|
+
import '@adobe/spectrum-wc-icons/swc-icon-file.js';
|
|
8
|
+
import '@adobe/spectrum-wc-icons/swc-icon-file-text.js';
|
|
9
|
+
import '@adobe/spectrum-wc-icons/swc-icon-lock.js';
|
|
1
10
|
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
2
11
|
import type { Attachment, Outgoing, SendMode, SliccModel } from '../model/types.js';
|
|
3
12
|
import { ModelElement } from './base.js';
|
|
@@ -6,6 +15,7 @@ export interface Choice {
|
|
|
6
15
|
value: string;
|
|
7
16
|
label: string;
|
|
8
17
|
detail: string;
|
|
18
|
+
group?: string;
|
|
9
19
|
}
|
|
10
20
|
export interface Command {
|
|
11
21
|
name: string;
|
|
@@ -23,7 +33,7 @@ export interface Popup {
|
|
|
23
33
|
index: number;
|
|
24
34
|
}
|
|
25
35
|
export declare function readFile(file: Blob): Promise<string>;
|
|
26
|
-
export declare function filter(items: Choice[], query: string): Choice[];
|
|
36
|
+
export declare function filter(items: Choice[], query: string, limit?: number): Choice[];
|
|
27
37
|
export declare function trigger(text: string, caret: number): {
|
|
28
38
|
kind: PopupKind;
|
|
29
39
|
start: number;
|
|
@@ -57,6 +67,9 @@ export declare class SliccComposer extends ModelElement {
|
|
|
57
67
|
constructor();
|
|
58
68
|
static styles: import("lit").CSSResult[];
|
|
59
69
|
protected willUpdate(changed: PropertyValues<this>): void;
|
|
70
|
+
connectedCallback(): void;
|
|
71
|
+
protected firstUpdated(): void;
|
|
72
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
60
73
|
protected subscribe(model: SliccModel): Array<() => void>;
|
|
61
74
|
focus(): void;
|
|
62
75
|
restore(message: Outgoing): void;
|
|
@@ -3,13 +3,18 @@ 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
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})();";
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function literal(value: unknown): string;
|
|
7
|
+
export declare function store(state: unknown): string;
|
|
8
|
+
export declare function frameDocument(source: string, color: Color, name: string, state?: {
|
|
9
|
+
value: unknown;
|
|
10
|
+
}): string;
|
|
7
11
|
export declare function fontData(url: string): Promise<ArrayBuffer | null>;
|
|
8
12
|
export declare function frameFonts(files: readonly FontFile[], base: string): Promise<Array<{
|
|
9
13
|
family: string;
|
|
10
14
|
weight: number | string;
|
|
11
15
|
data: ArrayBuffer;
|
|
12
16
|
}>>;
|
|
17
|
+
export declare const sprinkleMethods: ReadonlySet<string>;
|
|
13
18
|
export declare class SliccSprinkle extends ThemedElement {
|
|
14
19
|
#private;
|
|
15
20
|
static properties: {
|
|
@@ -30,6 +35,7 @@ export declare class SliccSprinkle extends ThemedElement {
|
|
|
30
35
|
height: number;
|
|
31
36
|
constructor();
|
|
32
37
|
static styles: import("lit").CSSResult;
|
|
38
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
33
39
|
focus(): void;
|
|
34
40
|
protected subscribe(model: SliccModel): Array<() => void>;
|
|
35
41
|
protected updated(changed: PropertyValues): void;
|
|
@@ -26,7 +26,7 @@ export declare class DummyAgent extends Emitter<AgentEvents> implements AgentPor
|
|
|
26
26
|
setModel(agentId: string, model: string): void;
|
|
27
27
|
setThinking(agentId: string, thinking: Thinking): void;
|
|
28
28
|
older(): Promise<readonly Message[]>;
|
|
29
|
-
commands(): readonly SlashCommand[];
|
|
29
|
+
commands(agentId: string): readonly SlashCommand[];
|
|
30
30
|
ready(): Promise<void>;
|
|
31
31
|
createScoop(parentId: string, name: string): Agent;
|
|
32
32
|
drop(agentId: string): Promise<void>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Emitter } from '../model/emitter.js';
|
|
2
|
-
import type { Sprinkle, SprinkleEvents, SprinklePort } from '../model/types.js';
|
|
2
|
+
import type { FilePort, Sprinkle, SprinkleEvents, SprinkleMethod, SprinklePort } from '../model/types.js';
|
|
3
3
|
import type { DummyAgent } from './agent.js';
|
|
4
|
+
export declare function homePath(path: unknown): string;
|
|
4
5
|
export declare class DummySprinkles extends Emitter<SprinkleEvents> implements SprinklePort {
|
|
5
6
|
#private;
|
|
6
|
-
constructor(sprinkles: readonly Sprinkle[], agent: DummyAgent);
|
|
7
|
+
constructor(sprinkles: readonly Sprinkle[], agent: DummyAgent, files: FilePort);
|
|
7
8
|
list(): readonly Sprinkle[];
|
|
8
9
|
send(id: string, payload: unknown): void;
|
|
10
|
+
call(id: string, method: SprinkleMethod, args: readonly unknown[]): Promise<unknown>;
|
|
9
11
|
}
|
|
@@ -254,6 +254,7 @@ export interface AgentPort extends Subscribable<AgentEvents> {
|
|
|
254
254
|
export interface SlashCommand {
|
|
255
255
|
name: string;
|
|
256
256
|
description: string;
|
|
257
|
+
kind?: 'prompt' | 'skill';
|
|
257
258
|
}
|
|
258
259
|
export interface FrozenCone {
|
|
259
260
|
id: string;
|
|
@@ -442,9 +443,11 @@ export interface Sprinkle {
|
|
|
442
443
|
export interface SprinkleEvents {
|
|
443
444
|
sprinkles: readonly Sprinkle[];
|
|
444
445
|
}
|
|
446
|
+
export type SprinkleMethod = 'readFile' | 'exists' | 'getState' | 'setState';
|
|
445
447
|
export interface SprinklePort extends Subscribable<SprinkleEvents> {
|
|
446
448
|
list(): readonly Sprinkle[];
|
|
447
449
|
send(id: string, payload: unknown): void;
|
|
450
|
+
call?(id: string, method: SprinkleMethod, args: readonly unknown[]): Promise<unknown>;
|
|
448
451
|
}
|
|
449
452
|
export type TrayConnection = 'offline' | 'connecting' | 'live' | 'stalled' | 'reconnecting' | 'error';
|
|
450
453
|
export type FloatKind = 'npx' | 'sliccstart' | 'extension' | 'standalone' | 'cherry' | 'electron' | 'hosted';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-spectrum",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.25.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",
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@adobe/spectrum-wc": "2.0.0-beta.4",
|
|
74
74
|
"@adobe/spectrum-wc-icons": "2.0.0-beta.4",
|
|
75
|
-
"@ai-ecoverse/slicc-kernel": "1.
|
|
75
|
+
"@ai-ecoverse/slicc-kernel": "1.17.4",
|
|
76
76
|
"@ai-ecoverse/slicc-shared-web": "1.8.0",
|
|
77
|
-
"@ai-ecoverse/wasm-bash": "5.3.0-
|
|
77
|
+
"@ai-ecoverse/wasm-bash": "5.3.0-8",
|
|
78
78
|
"@ai-ecoverse/wasm-coreutils": "9.7.0-3",
|
|
79
79
|
"@biomejs/biome": "2.5.15",
|
|
80
80
|
"@fontsource/source-code-pro": "5.3.0",
|