@ai-ecoverse/slicc-spectrum 1.5.0 → 1.7.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.
@@ -2,6 +2,7 @@ import { type TemplateResult } from 'lit';
2
2
  import type { SliccDock } from '../components/dock.js';
3
3
  import type { SliccModel } from '../model/types.js';
4
4
  import { ThemedElement } from './base.js';
5
+ import { Dips } from './dips.js';
5
6
  import { type DocumentKind, type ScreenClass, type Surface } from './panels.js';
6
7
  export declare class SliccApp extends ThemedElement {
7
8
  #private;
@@ -20,6 +21,7 @@ export declare class SliccApp extends ThemedElement {
20
21
  surfaces: readonly Surface[];
21
22
  storage: Storage | null;
22
23
  layoutKey: string;
24
+ readonly dips: Dips;
23
25
  constructor();
24
26
  static styles: import("lit").CSSResult[];
25
27
  get dock(): SliccDock;
@@ -3,6 +3,14 @@ import type { SliccModel } from '../model/types.js';
3
3
  import { ThemedElement } from './base.js';
4
4
  export declare class SliccChat extends ThemedElement {
5
5
  #private;
6
+ static properties: {
7
+ model: {
8
+ attribute: boolean;
9
+ };
10
+ agent: {};
11
+ };
12
+ agent: string;
13
+ constructor();
6
14
  static styles: import("lit").CSSResult[];
7
15
  protected subscribe(model: SliccModel): Array<() => void>;
8
16
  protected firstUpdated(): void;
@@ -1,4 +1,4 @@
1
- import { type TemplateResult } from 'lit';
1
+ import { type PropertyValues, type TemplateResult } from 'lit';
2
2
  import type { Attachment, SendMode, SliccModel } from '../model/types.js';
3
3
  import { ModelElement } from './base.js';
4
4
  export declare const limit: number;
@@ -47,13 +47,16 @@ export declare class SliccComposer extends ModelElement {
47
47
  dictating: {
48
48
  state: boolean;
49
49
  };
50
+ agent: {};
50
51
  };
51
52
  value: string;
52
53
  attachments: Attachment[];
53
54
  popup: Popup | null;
54
55
  dictating: boolean;
56
+ agent: string;
55
57
  constructor();
56
58
  static styles: import("lit").CSSResult[];
59
+ protected willUpdate(changed: PropertyValues<this>): void;
57
60
  protected subscribe(model: SliccModel): Array<() => void>;
58
61
  focus(): void;
59
62
  send(mode?: SendMode): void;
@@ -0,0 +1,13 @@
1
+ import { Emitter } from '../model/emitter.js';
2
+ export declare const dipType = "application/x-slicc-sprinkle";
3
+ export declare class Dips extends Emitter<{
4
+ change: readonly string[];
5
+ }> {
6
+ #private;
7
+ key: string;
8
+ load(storage: Storage | null): void;
9
+ list(): readonly string[];
10
+ has(id: string): boolean;
11
+ detach(id: string): void;
12
+ }
13
+ export declare function dipsOf(node: Node): Dips | null;
@@ -32,8 +32,19 @@ export declare function surface(id: string, items?: readonly Surface[]): Surface
32
32
  export declare function create(tag: string, model: SliccModel, params?: PanelParams): HTMLElement;
33
33
  export declare function placement(dock: SliccDock, side: Side, screen: ScreenClass): Placement;
34
34
  export declare function openSurface(dock: SliccDock, item: Surface, screen: ScreenClass): void;
35
+ export declare function chatId(agentId: string): string;
36
+ export declare function chatAgent(id: string | null | undefined): string | null;
37
+ export declare function chats(dock: SliccDock): string[];
38
+ export declare function openChat(dock: SliccDock, agent: {
39
+ id: string;
40
+ name: string;
41
+ }, screen: ScreenClass, focus?: boolean): string;
35
42
  export declare function openDocument(dock: SliccDock, kind: DocumentKind, path: string, screen: ScreenClass): string;
36
- export declare function defaultLayout(dock: SliccDock, screen: ScreenClass, items?: readonly Surface[]): void;
43
+ export declare function defaultLayout(dock: SliccDock, screen: ScreenClass, agent: {
44
+ id: string;
45
+ name: string;
46
+ } | null, items?: readonly Surface[]): void;
37
47
  export declare function closed(dock: SliccDock, items?: readonly Surface[]): Surface[];
38
48
  export declare function sprinkleSurface(sprinkle: Sprinkle): Surface;
39
- export declare function openSprinkle(dock: SliccDock, sprinkle: Sprinkle, screen: ScreenClass): string;
49
+ export declare function dropPlacement(panel: string | null, position: string): Placement | null;
50
+ export declare function openSprinkle(dock: SliccDock, sprinkle: Sprinkle, screen: ScreenClass, place?: Placement | null): string;
@@ -27,6 +27,7 @@ import '@spectrum-web-components/icons-workflow/icons/sp-icon-data.js';
27
27
  import '@spectrum-web-components/icons-workflow/icons/sp-icon-history.js';
28
28
  import '@spectrum-web-components/icons-workflow/icons/sp-icon-lightbulb.js';
29
29
  import '@spectrum-web-components/icons-workflow/icons/sp-icon-save-floppy.js';
30
+ import '@spectrum-web-components/icons-workflow/icons/sp-icon-open-in.js';
30
31
  import '@spectrum-web-components/icons-workflow/icons/sp-icon-globe-grid.js';
31
32
  import '@spectrum-web-components/icons-workflow/icons/sp-icon-code.js';
32
33
  import '@spectrum-web-components/icons-workflow/icons/sp-icon-folder.js';
@@ -6,12 +6,14 @@ export declare const theme: DockviewTheme;
6
6
  export declare class SliccDock extends HTMLElement {
7
7
  #private;
8
8
  factories: Record<string, PanelFactory>;
9
+ accepts: string[];
9
10
  get api(): DockviewApi;
10
11
  connectedCallback(): void;
11
12
  disconnectedCallback(): void;
12
13
  has(id: string): boolean;
13
14
  content(id: string): HTMLElement | undefined;
14
15
  open(options: AddPanelOptions): IDockviewPanel;
16
+ reveal(id: string): void;
15
17
  close(id: string): void;
16
18
  focusPanel(id: string): void;
17
19
  cycleGroup(delta: number): string | null;
@@ -1,5 +1,5 @@
1
1
  import { Emitter } from '../model/emitter.js';
2
- import type { Agent, AgentEvents, AgentPort, FrozenCone, LickChannel, LickState, Message, Outgoing, UserMessage } from '../model/types.js';
2
+ import type { Agent, AgentEvents, AgentPort, FrozenCone, LickChannel, LickState, Message, Outgoing, SlashCommand, Thinking, UserMessage } from '../model/types.js';
3
3
  import type { Clock } from './clock.js';
4
4
  import { type Effects } from './script.js';
5
5
  export declare class DummyAgent extends Emitter<AgentEvents> implements AgentPort {
@@ -23,6 +23,10 @@ export declare class DummyAgent extends Emitter<AgentEvents> implements AgentPor
23
23
  compact(agentId: string): void;
24
24
  clear(agentId: string): void;
25
25
  setModel(agentId: string, model: string): void;
26
+ setThinking(agentId: string, thinking: Thinking): void;
27
+ older(): Promise<readonly Message[]>;
28
+ commands(): readonly SlashCommand[];
29
+ ready(): Promise<void>;
26
30
  createScoop(parentId: string, name: string): Agent;
27
31
  lick(agentId: string, channel: LickChannel, title: string, text: string, body?: string): void;
28
32
  frozen(): readonly FrozenCone[];
@@ -1,5 +1,5 @@
1
1
  import { Emitter } from '../model/emitter.js';
2
- import type { Agent, AgentEvents, AgentPort, BrowserEvents, BrowserPort, BrowserTab, FrozenCone, Memory, MemoryEvents, MemoryPort, Message, MonitorEvents, MonitorPort, MonitorSnapshot, SprinkleEvents, SprinklePort, TrayEvents, TrayPort, TrayStatus, UserMessage } from '../model/types.js';
2
+ import type { Agent, AgentEvents, AgentPort, BrowserEvents, BrowserPort, BrowserTab, FrozenCone, Memory, MemoryEvents, MemoryPort, Message, MonitorEvents, MonitorPort, MonitorSnapshot, SlashCommand, SprinkleEvents, SprinklePort, TrayEvents, TrayPort, TrayStatus, UserMessage } from '../model/types.js';
3
3
  export declare class IdleAgent extends Emitter<AgentEvents> implements AgentPort {
4
4
  list(): readonly Agent[];
5
5
  active(): string;
@@ -16,6 +16,10 @@ export declare class IdleAgent extends Emitter<AgentEvents> implements AgentPort
16
16
  compact(): void;
17
17
  clear(): void;
18
18
  setModel(): void;
19
+ setThinking(): void;
20
+ older(): Promise<readonly Message[]>;
21
+ commands(): readonly SlashCommand[];
22
+ ready(): Promise<void>;
19
23
  createScoop(): Agent;
20
24
  frozen(): readonly FrozenCone[];
21
25
  freeze(): void;
@@ -11,6 +11,8 @@ export interface Agent {
11
11
  model: string;
12
12
  contextFill: number;
13
13
  unread: number;
14
+ thinking?: Thinking;
15
+ frozen?: boolean;
14
16
  }
15
17
  export type ToolStatus = 'running' | 'done' | 'error' | 'cancelled';
16
18
  export interface ToolCall {
@@ -22,6 +24,8 @@ export interface ToolCall {
22
24
  status: ToolStatus;
23
25
  paths: string[];
24
26
  image?: string;
27
+ agentId?: string;
28
+ pid?: number;
25
29
  }
26
30
  export type AttachmentKind = 'image' | 'text' | 'file' | 'secret';
27
31
  export interface Attachment {
@@ -132,6 +136,8 @@ export type MessagePart = {
132
136
  action?: ErrorAction;
133
137
  };
134
138
  export type SendMode = 'send' | 'steer' | 'queue';
139
+ export type DeliveredAs = 'run' | 'steer' | 'follow-up';
140
+ export type MessageOrigin = 'user' | 'follower' | 'guest';
135
141
  export interface UserMessage {
136
142
  id: string;
137
143
  role: 'user';
@@ -141,12 +147,16 @@ export interface UserMessage {
141
147
  mode?: SendMode;
142
148
  queued?: boolean;
143
149
  from?: string;
150
+ delivered?: DeliveredAs;
151
+ origin?: MessageOrigin;
144
152
  }
145
153
  export type AssistantStatus = 'streaming' | 'done' | 'stopped' | 'error';
146
154
  export interface Usage {
147
155
  input: number;
148
156
  output: number;
149
157
  cost: number;
158
+ cacheRead?: number;
159
+ cacheWrite?: number;
150
160
  }
151
161
  export interface AssistantMessage {
152
162
  id: string;
@@ -221,12 +231,20 @@ export interface AgentPort extends Subscribable<AgentEvents> {
221
231
  compact(agentId: string): void;
222
232
  clear(agentId: string): void;
223
233
  setModel(agentId: string, model: string): void;
234
+ setThinking(agentId: string, thinking: Thinking): void;
235
+ older(agentId: string, before: string): Promise<readonly Message[]>;
236
+ commands(agentId: string): readonly SlashCommand[];
237
+ ready(): Promise<void>;
224
238
  createScoop(parentId: string, name: string): Agent;
225
239
  frozen(): readonly FrozenCone[];
226
240
  freeze(agentId: string): void;
227
241
  thaw(id: string): Agent | null;
228
242
  discard(id: string): void;
229
243
  }
244
+ export interface SlashCommand {
245
+ name: string;
246
+ description: string;
247
+ }
230
248
  export interface FrozenCone {
231
249
  id: string;
232
250
  name: string;
@@ -319,11 +337,15 @@ export interface Account {
319
337
  provider: string;
320
338
  identity: string;
321
339
  status: AccountStatus;
340
+ auth?: 'oauth' | 'api-key' | 'local';
341
+ needs?: 'cors-free-transport';
322
342
  }
323
343
  export interface ModelOption {
324
344
  id: string;
325
345
  label: string;
326
346
  provider: string;
347
+ kind?: 'chat' | 'classifier';
348
+ reasoning?: boolean;
327
349
  }
328
350
  export interface SettingsEvents {
329
351
  settings: Settings;
@@ -334,7 +356,7 @@ export interface SettingsPort extends Subscribable<SettingsEvents> {
334
356
  update(patch: Partial<Settings>): void;
335
357
  models(): readonly ModelOption[];
336
358
  accounts(): readonly Account[];
337
- connect(id: string): Promise<void>;
359
+ connect(id: string, secret?: string): Promise<void>;
338
360
  disconnect(id: string): void;
339
361
  }
340
362
  export type MemoryTag = 'user' | 'feedback' | 'project';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-spectrum",
3
- "version": "1.5.0",
3
+ "version": "1.7.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",
@@ -70,7 +70,7 @@
70
70
  }
71
71
  },
72
72
  "devDependencies": {
73
- "@ai-ecoverse/slicc-kernel": "1.8.2",
73
+ "@ai-ecoverse/slicc-kernel": "1.8.10",
74
74
  "@ai-ecoverse/slicc-shared-web": "1.4.1",
75
75
  "@ai-ecoverse/wasm-bash": "5.3.0-7",
76
76
  "@ai-ecoverse/wasm-coreutils": "9.7.0-3",