@ai-ecoverse/slicc-spectrum 1.80.0 → 1.82.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,7 +9,7 @@ import '@adobe/spectrum-wc-icons/swc-icon-file.js';
9
9
  import '@adobe/spectrum-wc-icons/swc-icon-file-text.js';
10
10
  import '@adobe/spectrum-wc-icons/swc-icon-lock.js';
11
11
  import { type PropertyValues, type TemplateResult } from 'lit';
12
- import type { AgentPort, Attachment, Outgoing, SendMode, SliccModel, VaultPort } from '../model/types.js';
12
+ import type { AgentPort, Attachment, Outgoing, Seat, SendMode, SliccModel, VaultPort } from '../model/types.js';
13
13
  import { ThemedElement } from './base.js';
14
14
  export declare const limit: number;
15
15
  export interface Choice {
@@ -45,6 +45,8 @@ export declare function trigger(text: string, caret: number): {
45
45
  start: number;
46
46
  query: string;
47
47
  } | null;
48
+ export declare function reviewer(seat: Seat, cone: string): string | null;
49
+ export declare function seatNote(seat: Seat, cone: string, now?: number): string;
48
50
  export declare function blocked(vault: VaultPort): string | null;
49
51
  export declare class SliccComposer extends ThemedElement {
50
52
  #private;
@@ -79,6 +81,9 @@ export declare class SliccComposer extends ThemedElement {
79
81
  secretField: {
80
82
  state: boolean;
81
83
  };
84
+ failure: {
85
+ state: boolean;
86
+ };
82
87
  agent: {};
83
88
  };
84
89
  value: string;
@@ -90,6 +95,7 @@ export declare class SliccComposer extends ThemedElement {
90
95
  sharing: boolean;
91
96
  secretError: string | null;
92
97
  secretField: string | null;
98
+ failure: string | null;
93
99
  agent: string;
94
100
  constructor();
95
101
  static styles: import("lit").CSSResult[];
@@ -30,7 +30,7 @@ import '@adobe/spectrum-wc-icons/swc-icon-tools.js';
30
30
  import '@adobe/spectrum-wc-icons/swc-icon-user-group.js';
31
31
  import '@adobe/spectrum-wc-icons/swc-icon-web-page.js';
32
32
  import { nothing, type TemplateResult } from 'lit';
33
- import type { AssistantMessage, ErrorAction, LickChannel, LickMessage, LickState, Message, MessagePart, Question, SliccModel, SystemMessage, ToolCall, ToolMessage, ToolStatus, UserMessage } from '../model/types.js';
33
+ import type { AssistantMessage, ErrorAction, LickChannel, LickMessage, LickState, Message, MessagePart, Question, Seat, SliccModel, SystemMessage, ToolCall, ToolMessage, ToolStatus, UserMessage } from '../model/types.js';
34
34
  export interface Handlers {
35
35
  color: 'light' | 'dark';
36
36
  model: SliccModel | null;
@@ -44,6 +44,7 @@ export interface Handlers {
44
44
  suggest(text: string): void;
45
45
  owners?: ReadonlyMap<string, Owner>;
46
46
  agentId?: string;
47
+ seat?: string;
47
48
  }
48
49
  export interface Owner {
49
50
  id?: string;
@@ -90,7 +91,8 @@ export declare function questionTurn(item: Question, handlers: Handlers, pile: P
90
91
  export declare function parts(entries: MessagePart[], handlers: Handlers, showThinking: boolean, extra?: ToolCall[]): Array<TemplateResult | typeof nothing>;
91
92
  export declare function toolTail(message: Message, showThinking: boolean): boolean;
92
93
  export declare function toolOnly(message: Message, showThinking: boolean): ToolCall[] | null;
93
- export declare function user(message: UserMessage, stamp?: boolean): TemplateResult;
94
+ export declare function mine(message: UserMessage, seat: Pick<Seat, 'id' | 'label'>): boolean;
95
+ export declare function user(message: UserMessage, stamp?: boolean, seat?: Seat): TemplateResult;
94
96
  export declare function assistant(message: AssistantMessage, name: string, model: string, handlers: Handlers, showThinking: boolean, suggestion?: string | null, extra?: ToolCall[], stamp?: boolean): TemplateResult;
95
97
  export declare function toolMessage(message: ToolMessage, context?: RunContext & Partial<Pick<Handlers, 'suggest'>>, extra?: ToolCall[], suggestion?: string | null, stamp?: boolean): TemplateResult;
96
98
  export declare function system(message: SystemMessage, handlers: Handlers): TemplateResult;
@@ -0,0 +1,56 @@
1
+ import { Emitter } from '../model/emitter.js';
2
+ import type { Agent, AgentEvents, AgentPort, Message, Outgoing, Seat, SliccModel, Sprinkle, UserMessage } from '../model/types.js';
3
+ import { type Clock } from './clock.js';
4
+ export type SeatScenario = 'review' | 'reject' | 'off' | 'expiring';
5
+ export declare const guestOnly = "a guest can only watch and send messages";
6
+ export declare const guestReview = "Messages from guests need a review, and this agent can't review them yet.";
7
+ export declare const guestDeclined = "It was declined.";
8
+ export declare const guestLabel = "Seat 2 (Mara)";
9
+ export declare const guestSettingsKey = "slicc-guest-settings";
10
+ export declare const otherGuest = "Seat 3 (Jonas)";
11
+ export declare function guestSeat(scenario: SeatScenario, now?: number): Seat;
12
+ export declare const forecastSprinkle: Sprinkle;
13
+ export declare function guestTranscript(now?: number, twin?: boolean): Message[];
14
+ export declare function refusal(): Error;
15
+ export declare class DummyGuestAgent extends Emitter<AgentEvents> implements AgentPort {
16
+ #private;
17
+ readonly refused: string[];
18
+ constructor(cone: Agent, messages: readonly Message[], seat: Seat, time: Clock, refused: string[]);
19
+ list(): readonly Agent[];
20
+ active(): string;
21
+ messages(agentId: string): readonly Message[];
22
+ busy(): boolean;
23
+ queue(agentId: string): readonly UserMessage[];
24
+ suggestion(): null;
25
+ commands(): readonly never[];
26
+ frozen(): readonly never[];
27
+ hold(): null;
28
+ readOnly(): null;
29
+ ready(): Promise<void>;
30
+ older(): Promise<readonly Message[]>;
31
+ select(): Promise<never>;
32
+ stop(): Promise<never>;
33
+ unqueue(): Promise<never>;
34
+ answer(): Promise<never>;
35
+ resolveLick(): Promise<never>;
36
+ compact(): Promise<never>;
37
+ clear(): Promise<never>;
38
+ setModel(): Promise<never>;
39
+ setThinking(): Promise<never>;
40
+ discard(): Promise<never>;
41
+ createScoop(): never;
42
+ thaw(): never;
43
+ send(agentId: string, input: string | Outgoing): Promise<void>;
44
+ }
45
+ export interface GuestOptions {
46
+ seat?: SeatScenario;
47
+ history?: 'on' | 'none' | 'twin';
48
+ delay?: number;
49
+ storage?: Storage | null;
50
+ }
51
+ export interface GuestModel extends SliccModel {
52
+ seat: Seat;
53
+ agent: DummyGuestAgent;
54
+ refused: string[];
55
+ }
56
+ export declare function createGuestModel({ seat: scenario, history, delay, storage, }?: GuestOptions): GuestModel;
@@ -7,6 +7,8 @@ export { DummyChanges } from './dummy/changes.js';
7
7
  export type { DummyMount, MountScenario } from './dummy/files.js';
8
8
  export type { FollowScenario } from './dummy/follow.js';
9
9
  export { DummyFollow, followFixtures } from './dummy/follow.js';
10
+ export type { GuestModel, GuestOptions, SeatScenario } from './dummy/guest.js';
11
+ export { createGuestModel, DummyGuestAgent, forecastSprinkle, guestDeclined, guestLabel, guestOnly, guestReview, guestSeat, guestTranscript, otherGuest, } from './dummy/guest.js';
10
12
  export type { GuestsScenario } from './dummy/guests.js';
11
13
  export { DummyGuests, guestsFixtures, guestsRefused, guestsUnavailable, } from './dummy/guests.js';
12
14
  export type { DummyModel, DummyOptions } from './dummy/index.js';
@@ -159,6 +159,7 @@ export interface UserMessage {
159
159
  mode?: SendMode;
160
160
  queued?: boolean;
161
161
  from?: string;
162
+ seat?: string;
162
163
  delivered?: DeliveredAs;
163
164
  origin?: MessageOrigin;
164
165
  }
@@ -1256,6 +1257,13 @@ export interface GuestSeat {
1256
1257
  connected: boolean;
1257
1258
  pending: number;
1258
1259
  }
1260
+ export interface Seat {
1261
+ id: string;
1262
+ label: string;
1263
+ agentId: string;
1264
+ expiresAt: number | null;
1265
+ gates: GuestGates;
1266
+ }
1259
1267
  export interface GuestDraft {
1260
1268
  label: string;
1261
1269
  expiresAt: number | null;
@@ -1293,5 +1301,6 @@ export interface SliccModel {
1293
1301
  follow?: FollowPort;
1294
1302
  vault?: VaultPort;
1295
1303
  guests?: GuestPort;
1304
+ seat?: Seat;
1296
1305
  }
1297
1306
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-spectrum",
3
- "version": "1.80.0",
3
+ "version": "1.82.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,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.100.3",
75
+ "@ai-ecoverse/slicc-kernel": "1.103.3",
76
76
  "@ai-ecoverse/slicc-shared-web": "1.21.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.12.0-7",
79
+ "@ai-ecoverse/wasm-coreutils": "9.12.0-8",
80
80
  "@biomejs/biome": "2.5.15",
81
81
  "@fontsource/source-code-pro": "5.3.0",
82
82
  "@happy-dom/global-registrator": "20.14.6",
@@ -104,7 +104,7 @@
104
104
  "esbuild": "0.28.2",
105
105
  "happy-dom": "20.14.6",
106
106
  "lefthook": "2.2.1",
107
- "lucide": "1.53.0",
107
+ "lucide": "1.54.0",
108
108
  "monocart-coverage-reports": "2.13.2",
109
109
  "playwright-core": "1.64.0",
110
110
  "semantic-release": "25.0.9",