@ai-ecoverse/slicc-spectrum 1.1.0 → 1.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 +30 -7
- package/dist/{chunk-4RGMMAR4.js → chunk-4GQ6THC2.js} +3 -3
- package/dist/{chunk-H5WU2XYY.js → chunk-5XWUZJTT.js} +2 -2
- package/dist/chunk-64K5VONJ.js +11 -0
- package/dist/chunk-64K5VONJ.js.map +7 -0
- package/dist/{chunk-J45KH7MF.js → chunk-6JNYNXUQ.js} +2 -2
- package/dist/chunk-6JYCQXDO.js +8 -0
- package/dist/chunk-6JYCQXDO.js.map +7 -0
- package/dist/{chunk-ZTPYBVZL.js → chunk-6N3GZNXH.js} +3 -3
- package/dist/chunk-6ODADG7T.js +8 -0
- package/dist/chunk-6ODADG7T.js.map +7 -0
- package/dist/chunk-6T3O5K6R.js +8 -0
- package/dist/{chunk-MR7SU4GJ.js → chunk-7PY7B3ZW.js} +2 -2
- package/dist/{chunk-Q4AC2O6Z.js → chunk-AXQFWXYZ.js} +8 -2
- package/dist/chunk-BDOI3WEE.js +8 -0
- package/dist/chunk-BDOI3WEE.js.map +7 -0
- package/dist/chunk-BHAGWMDD.js +8 -0
- package/dist/chunk-BHAGWMDD.js.map +7 -0
- package/dist/chunk-C7X653JJ.js +8 -0
- package/dist/chunk-CGS66GRP.js +11 -0
- package/dist/chunk-CGS66GRP.js.map +7 -0
- package/dist/chunk-CONYKGKV.js +11 -0
- package/dist/chunk-CONYKGKV.js.map +7 -0
- package/dist/chunk-CU7BC2RI.js +11 -0
- package/dist/chunk-CU7BC2RI.js.map +7 -0
- package/dist/chunk-EX57SDII.js +8 -0
- package/dist/chunk-EX57SDII.js.map +7 -0
- package/dist/chunk-GKXQPI4G.js +8 -0
- package/dist/chunk-GKXQPI4G.js.map +7 -0
- package/dist/{chunk-FN3Y2AYJ.js → chunk-I2NMYJ25.js} +3 -3
- package/dist/chunk-I2NMYJ25.js.map +7 -0
- package/dist/chunk-I4OYHPAU.js +11 -0
- package/dist/chunk-I4OYHPAU.js.map +7 -0
- package/dist/{chunk-MTF6JFSL.js → chunk-J3QOBXZJ.js} +2 -2
- package/dist/chunk-JBYBW627.js +8 -0
- package/dist/chunk-JBYBW627.js.map +7 -0
- package/dist/chunk-JWTAKXQS.js +8 -0
- package/dist/chunk-JWTAKXQS.js.map +7 -0
- package/dist/chunk-KMP5HO3E.js +11 -0
- package/dist/chunk-KMP5HO3E.js.map +7 -0
- package/dist/chunk-KWPU2PY3.js +14 -0
- package/dist/chunk-KWPU2PY3.js.map +7 -0
- package/dist/chunk-KYBD6ZRT.js +8 -0
- package/dist/chunk-KYBD6ZRT.js.map +7 -0
- package/dist/chunk-LBXW6XNL.js +18 -0
- package/dist/chunk-LBXW6XNL.js.map +7 -0
- package/dist/chunk-LDR4U5KX.js +8 -0
- package/dist/chunk-LDR4U5KX.js.map +7 -0
- package/dist/chunk-LII3WY6Y.js +11 -0
- package/dist/chunk-LII3WY6Y.js.map +7 -0
- package/dist/chunk-LY7WVBCB.js +10 -0
- package/dist/chunk-LY7WVBCB.js.map +7 -0
- package/dist/chunk-MJVAL555.js +8 -0
- package/dist/chunk-MJVAL555.js.map +7 -0
- package/dist/chunk-NLDFGCIL.js +11 -0
- package/dist/chunk-NLDFGCIL.js.map +7 -0
- package/dist/{chunk-SZ33GAVH.js → chunk-OFQ56DAN.js} +5 -5
- package/dist/chunk-S5EGO4NA.js +11 -0
- package/dist/chunk-S5EGO4NA.js.map +7 -0
- package/dist/{chunk-24WRGUXG.js → chunk-T2LAT2D6.js} +2 -2
- package/dist/chunk-TAZBKRHT.js +10 -0
- package/dist/chunk-TAZBKRHT.js.map +7 -0
- package/dist/chunk-TK4ZJ7LA.js +5346 -0
- package/dist/chunk-TK4ZJ7LA.js.map +7 -0
- package/dist/chunk-UCIBH53C.js +11 -0
- package/dist/chunk-UCIBH53C.js.map +7 -0
- package/dist/chunk-XZM23TK4.js +11 -0
- package/dist/chunk-XZM23TK4.js.map +7 -0
- package/dist/chunk-YPQKCWWG.js +19 -0
- package/dist/chunk-YPQKCWWG.js.map +7 -0
- package/dist/chunk-YX6SI5VA.js +11 -0
- package/dist/chunk-YX6SI5VA.js.map +7 -0
- package/dist/slicc-dummy.js +1475 -57
- package/dist/slicc-dummy.js.map +4 -4
- package/dist/slicc-terminal.js +7 -5344
- package/dist/slicc-terminal.js.map +4 -4
- package/dist/slicc-ui.js +56890 -17879
- package/dist/slicc-ui.js.map +4 -4
- package/dist/types/app/app.d.ts +7 -11
- package/dist/types/app/base.d.ts +9 -1
- package/dist/types/app/browser.d.ts +25 -0
- package/dist/types/app/changes.d.ts +24 -0
- package/dist/types/app/chat.d.ts +2 -14
- package/dist/types/app/composer.d.ts +69 -0
- package/dist/types/app/files.d.ts +56 -0
- package/dist/types/app/freezer.d.ts +11 -0
- package/dist/types/app/grammars.d.ts +6 -0
- package/dist/types/app/markdown.d.ts +12 -3
- package/dist/types/app/memory.d.ts +39 -0
- package/dist/types/app/messages.d.ts +21 -0
- package/dist/types/app/monitor.d.ts +11 -0
- package/dist/types/app/panels.d.ts +11 -3
- package/dist/types/app/settings.d.ts +21 -0
- package/dist/types/app/spectrum.d.ts +18 -0
- package/dist/types/app/sprinkle.d.ts +18 -0
- package/dist/types/app/terminals.d.ts +25 -0
- package/dist/types/app/tray.d.ts +25 -0
- package/dist/types/components/code-view.d.ts +47 -0
- package/dist/types/components/file-tree.d.ts +18 -0
- package/dist/types/dummy/agent.d.ts +21 -3
- package/dist/types/dummy/extras.d.ts +8 -0
- package/dist/types/dummy/fixtures.d.ts +2 -1
- package/dist/types/dummy/memory.d.ts +9 -0
- package/dist/types/dummy/monitor.d.ts +9 -0
- package/dist/types/dummy/script.d.ts +8 -2
- package/dist/types/dummy/showcase.d.ts +6 -0
- package/dist/types/dummy/sprinkles.d.ts +9 -0
- package/dist/types/dummy/tray.d.ts +10 -0
- package/dist/types/model/types.d.ts +280 -8
- package/dist/types/ui.d.ts +13 -3
- package/package.json +18 -1
- package/dist/chunk-T5QFSUYQ.js +0 -8
- /package/dist/{chunk-4RGMMAR4.js.map → chunk-4GQ6THC2.js.map} +0 -0
- /package/dist/{chunk-FN3Y2AYJ.js.map → chunk-5XWUZJTT.js.map} +0 -0
- /package/dist/{chunk-J45KH7MF.js.map → chunk-6JNYNXUQ.js.map} +0 -0
- /package/dist/{chunk-ZTPYBVZL.js.map → chunk-6N3GZNXH.js.map} +0 -0
- /package/dist/{chunk-H5WU2XYY.js.map → chunk-6T3O5K6R.js.map} +0 -0
- /package/dist/{chunk-MR7SU4GJ.js.map → chunk-7PY7B3ZW.js.map} +0 -0
- /package/dist/{chunk-Q4AC2O6Z.js.map → chunk-AXQFWXYZ.js.map} +0 -0
- /package/dist/{chunk-T5QFSUYQ.js.map → chunk-C7X653JJ.js.map} +0 -0
- /package/dist/{chunk-MTF6JFSL.js.map → chunk-J3QOBXZJ.js.map} +0 -0
- /package/dist/{chunk-SZ33GAVH.js.map → chunk-OFQ56DAN.js.map} +0 -0
- /package/dist/{chunk-24WRGUXG.js.map → chunk-T2LAT2D6.js.map} +0 -0
|
@@ -1,14 +1,32 @@
|
|
|
1
1
|
import { Emitter } from '../model/emitter.js';
|
|
2
|
-
import type { Agent, AgentEvents, AgentPort, Message } from '../model/types.js';
|
|
2
|
+
import type { Agent, AgentEvents, AgentPort, FrozenCone, LickChannel, LickState, Message, Outgoing, 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 {
|
|
6
6
|
#private;
|
|
7
|
-
constructor(agents: readonly Agent[], conversations: Record<string, readonly Message[]>, effects: Omit<Effects, 'agentId'>, clock: Clock
|
|
7
|
+
constructor(agents: readonly Agent[], conversations: Record<string, readonly Message[]>, effects: Omit<Effects, 'agentId'>, clock: Clock, queues?: Record<string, readonly UserMessage[]>, frozen?: ReadonlyArray<{
|
|
8
|
+
cone: FrozenCone;
|
|
9
|
+
messages: readonly Message[];
|
|
10
|
+
}>);
|
|
8
11
|
list(): readonly Agent[];
|
|
9
12
|
active(): string;
|
|
10
13
|
select(id: string): void;
|
|
11
14
|
messages(agentId: string): readonly Message[];
|
|
12
|
-
|
|
15
|
+
queue(agentId: string): readonly UserMessage[];
|
|
16
|
+
busy(agentId: string): boolean;
|
|
17
|
+
suggestion(agentId: string): string | null;
|
|
18
|
+
unqueue(agentId: string, messageId: string): void;
|
|
19
|
+
send(agentId: string, input: string | Outgoing): Promise<void>;
|
|
13
20
|
stop(agentId: string): void;
|
|
21
|
+
answer(agentId: string, questionId: string, answer: string): void;
|
|
22
|
+
resolveLick(agentId: string, messageId: string, state: Exclude<LickState, 'pending'>): void;
|
|
23
|
+
compact(agentId: string): void;
|
|
24
|
+
clear(agentId: string): void;
|
|
25
|
+
setModel(agentId: string, model: string): void;
|
|
26
|
+
createScoop(parentId: string, name: string): Agent;
|
|
27
|
+
lick(agentId: string, channel: LickChannel, title: string, text: string, body?: string): void;
|
|
28
|
+
frozen(): readonly FrozenCone[];
|
|
29
|
+
freeze(agentId: string): void;
|
|
30
|
+
thaw(id: string): Agent | null;
|
|
31
|
+
discard(id: string): void;
|
|
14
32
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FrozenCone, Memory, Message, Sprinkle, TrayStatus } from '../model/types.js';
|
|
2
|
+
export declare const frozen: Array<{
|
|
3
|
+
cone: FrozenCone;
|
|
4
|
+
messages: Message[];
|
|
5
|
+
}>;
|
|
6
|
+
export declare const memories: Memory[];
|
|
7
|
+
export declare const sprinkles: Sprinkle[];
|
|
8
|
+
export declare const tray: TrayStatus;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Account, Agent, BrowserTab, Change, Message, ModelOption, Settings, TerminalInfo } from '../model/types.js';
|
|
1
|
+
import type { Account, Agent, BrowserTab, Change, Message, ModelOption, Settings, TerminalInfo, UserMessage } from '../model/types.js';
|
|
2
2
|
export declare const files: Record<string, string>;
|
|
3
3
|
export declare const directories: string[];
|
|
4
4
|
export declare const pending: Change[];
|
|
@@ -6,6 +6,7 @@ export declare const models: ModelOption[];
|
|
|
6
6
|
export declare const defaults: Settings;
|
|
7
7
|
export declare const accounts: Account[];
|
|
8
8
|
export declare const agents: Agent[];
|
|
9
|
+
export declare const queues: Record<string, UserMessage[]>;
|
|
9
10
|
export declare const conversations: Record<string, Message[]>;
|
|
10
11
|
export declare const tabs: BrowserTab[];
|
|
11
12
|
export declare const terminals: TerminalInfo[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Emitter } from '../model/emitter.js';
|
|
2
|
+
import type { Memory, MemoryDraft, MemoryEvents, MemoryPort } from '../model/types.js';
|
|
3
|
+
export declare class DummyMemory extends Emitter<MemoryEvents> implements MemoryPort {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(memories: readonly Memory[]);
|
|
6
|
+
list(): readonly Memory[];
|
|
7
|
+
save(draft: MemoryDraft): Memory;
|
|
8
|
+
remove(id: string): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Emitter } from '../model/emitter.js';
|
|
2
|
+
import type { MonitorEvents, MonitorPort, MonitorSnapshot, SliccModel } from '../model/types.js';
|
|
3
|
+
export declare function wave(seed: number, length?: number): number[];
|
|
4
|
+
export declare class DummyMonitor extends Emitter<MonitorEvents> implements MonitorPort {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(model: Omit<SliccModel, 'monitor'>);
|
|
7
|
+
snapshot(): MonitorSnapshot;
|
|
8
|
+
resync(): void;
|
|
9
|
+
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import type { BrowserPort, FilePort } from '../model/types.js';
|
|
1
|
+
import type { Attachment, BrowserPort, FilePort, MessagePart } from '../model/types.js';
|
|
2
2
|
export interface Effects {
|
|
3
3
|
files: FilePort;
|
|
4
4
|
browser: BrowserPort;
|
|
5
5
|
agentId: string;
|
|
6
6
|
}
|
|
7
7
|
export type Step = {
|
|
8
|
+
type: 'part';
|
|
9
|
+
part: MessagePart;
|
|
10
|
+
} | {
|
|
8
11
|
type: 'thinking';
|
|
9
12
|
text: string;
|
|
10
13
|
} | {
|
|
@@ -20,4 +23,7 @@ export type Step = {
|
|
|
20
23
|
ticks: number;
|
|
21
24
|
effect?: (effects: Effects) => Promise<unknown> | unknown;
|
|
22
25
|
};
|
|
23
|
-
export declare function script(prompt: string):
|
|
26
|
+
export declare function script(prompt: string, attachments?: readonly Attachment[]): {
|
|
27
|
+
steps: Step[];
|
|
28
|
+
suggestion: string;
|
|
29
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Agent, Message, UserMessage } from '../model/types.js';
|
|
2
|
+
export declare function picture(label: string, from: string, to: string, width?: number, height?: number): string;
|
|
3
|
+
export declare function tone(seconds?: number, frequency?: number, rate?: number): string;
|
|
4
|
+
export declare const showcaseAgent: Agent;
|
|
5
|
+
export declare function showcase(): Message[];
|
|
6
|
+
export declare function showcaseQueue(): UserMessage[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Emitter } from '../model/emitter.js';
|
|
2
|
+
import type { Sprinkle, SprinkleEvents, SprinklePort } from '../model/types.js';
|
|
3
|
+
import type { DummyAgent } from './agent.js';
|
|
4
|
+
export declare class DummySprinkles extends Emitter<SprinkleEvents> implements SprinklePort {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(sprinkles: readonly Sprinkle[], agent: DummyAgent);
|
|
7
|
+
list(): readonly Sprinkle[];
|
|
8
|
+
send(id: string, payload: unknown): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Emitter } from '../model/emitter.js';
|
|
2
|
+
import type { TrayEvents, TrayPort, TrayStatus } from '../model/types.js';
|
|
3
|
+
import type { Clock } from './clock.js';
|
|
4
|
+
export declare class DummyTray extends Emitter<TrayEvents> implements TrayPort {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(status: TrayStatus, clock: Clock);
|
|
7
|
+
status(): TrayStatus;
|
|
8
|
+
reconnect(): void;
|
|
9
|
+
disconnect(): void;
|
|
10
|
+
}
|
|
@@ -12,7 +12,7 @@ export interface Agent {
|
|
|
12
12
|
contextFill: number;
|
|
13
13
|
unread: number;
|
|
14
14
|
}
|
|
15
|
-
export type ToolStatus = 'running' | 'done' | 'error';
|
|
15
|
+
export type ToolStatus = 'running' | 'done' | 'error' | 'cancelled';
|
|
16
16
|
export interface ToolCall {
|
|
17
17
|
id: string;
|
|
18
18
|
name: string;
|
|
@@ -21,6 +21,68 @@ export interface ToolCall {
|
|
|
21
21
|
output: string;
|
|
22
22
|
status: ToolStatus;
|
|
23
23
|
paths: string[];
|
|
24
|
+
image?: string;
|
|
25
|
+
}
|
|
26
|
+
export type AttachmentKind = 'image' | 'text' | 'file' | 'secret';
|
|
27
|
+
export interface Attachment {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
kind: AttachmentKind;
|
|
31
|
+
mimeType: string;
|
|
32
|
+
size: number;
|
|
33
|
+
url?: string;
|
|
34
|
+
text?: string;
|
|
35
|
+
path?: string;
|
|
36
|
+
error?: string;
|
|
37
|
+
}
|
|
38
|
+
export type MediaKind = 'image' | 'video' | 'audio';
|
|
39
|
+
export interface Media {
|
|
40
|
+
kind: MediaKind;
|
|
41
|
+
src: string;
|
|
42
|
+
alt: string;
|
|
43
|
+
poster?: string;
|
|
44
|
+
width?: number;
|
|
45
|
+
height?: number;
|
|
46
|
+
}
|
|
47
|
+
export type CardTone = 'neutral' | 'informative' | 'positive' | 'notice' | 'negative';
|
|
48
|
+
export type ActionCard = {
|
|
49
|
+
variant: 'tool';
|
|
50
|
+
title: string;
|
|
51
|
+
badge: string;
|
|
52
|
+
status: string;
|
|
53
|
+
files: string[];
|
|
54
|
+
tone: CardTone;
|
|
55
|
+
} | {
|
|
56
|
+
variant: 'pr';
|
|
57
|
+
number: number;
|
|
58
|
+
title: string;
|
|
59
|
+
branch: string;
|
|
60
|
+
checks: string;
|
|
61
|
+
additions: number;
|
|
62
|
+
deletions: number;
|
|
63
|
+
files: number;
|
|
64
|
+
tone: CardTone;
|
|
65
|
+
} | {
|
|
66
|
+
variant: 'light';
|
|
67
|
+
title: string;
|
|
68
|
+
detail: string;
|
|
69
|
+
tone: CardTone;
|
|
70
|
+
};
|
|
71
|
+
export type QuestionKind = 'yes-no' | 'choice' | 'text' | 'number' | 'date' | 'email';
|
|
72
|
+
export type QuestionState = 'open' | 'answered' | 'inert';
|
|
73
|
+
export interface Question {
|
|
74
|
+
id: string;
|
|
75
|
+
kind: QuestionKind;
|
|
76
|
+
question: string;
|
|
77
|
+
options: string[];
|
|
78
|
+
state: QuestionState;
|
|
79
|
+
answer?: string;
|
|
80
|
+
}
|
|
81
|
+
export type DelegationKind = 'feed' | 'scoop' | 'drop' | 'sprinkle';
|
|
82
|
+
export type ErrorAction = 'retry' | 'settings' | 'change-model' | 'login';
|
|
83
|
+
export interface CheckItem {
|
|
84
|
+
text: string;
|
|
85
|
+
tone?: CardTone;
|
|
24
86
|
}
|
|
25
87
|
export type MessagePart = {
|
|
26
88
|
type: 'text';
|
|
@@ -31,31 +93,105 @@ export type MessagePart = {
|
|
|
31
93
|
} | {
|
|
32
94
|
type: 'tool';
|
|
33
95
|
tool: ToolCall;
|
|
96
|
+
} | {
|
|
97
|
+
type: 'media';
|
|
98
|
+
items: Media[];
|
|
99
|
+
} | {
|
|
100
|
+
type: 'card';
|
|
101
|
+
card: ActionCard;
|
|
102
|
+
} | {
|
|
103
|
+
type: 'plan';
|
|
104
|
+
items: string[];
|
|
105
|
+
} | {
|
|
106
|
+
type: 'check';
|
|
107
|
+
items: CheckItem[];
|
|
108
|
+
} | {
|
|
109
|
+
type: 'diff';
|
|
110
|
+
path: string;
|
|
111
|
+
before: string | null;
|
|
112
|
+
after: string | null;
|
|
113
|
+
} | {
|
|
114
|
+
type: 'question';
|
|
115
|
+
question: Question;
|
|
116
|
+
} | {
|
|
117
|
+
type: 'delegation';
|
|
118
|
+
kind: DelegationKind;
|
|
119
|
+
scoop: string;
|
|
120
|
+
text: string;
|
|
121
|
+
} | {
|
|
122
|
+
type: 'link';
|
|
123
|
+
url: string;
|
|
124
|
+
title: string;
|
|
125
|
+
description: string;
|
|
126
|
+
} | {
|
|
127
|
+
type: 'error';
|
|
128
|
+
message: string;
|
|
129
|
+
action?: ErrorAction;
|
|
34
130
|
};
|
|
131
|
+
export type SendMode = 'send' | 'steer' | 'queue';
|
|
35
132
|
export interface UserMessage {
|
|
36
133
|
id: string;
|
|
37
134
|
role: 'user';
|
|
38
135
|
text: string;
|
|
39
136
|
createdAt: number;
|
|
137
|
+
attachments?: Attachment[];
|
|
138
|
+
mode?: SendMode;
|
|
139
|
+
queued?: boolean;
|
|
140
|
+
from?: string;
|
|
141
|
+
}
|
|
142
|
+
export type AssistantStatus = 'streaming' | 'done' | 'stopped' | 'error';
|
|
143
|
+
export interface Usage {
|
|
144
|
+
input: number;
|
|
145
|
+
output: number;
|
|
146
|
+
cost: number;
|
|
40
147
|
}
|
|
41
|
-
export type AssistantStatus = 'streaming' | 'done' | 'stopped';
|
|
42
148
|
export interface AssistantMessage {
|
|
43
149
|
id: string;
|
|
44
150
|
role: 'assistant';
|
|
45
151
|
parts: MessagePart[];
|
|
46
152
|
status: AssistantStatus;
|
|
47
153
|
createdAt: number;
|
|
154
|
+
model?: string;
|
|
155
|
+
usage?: Usage;
|
|
156
|
+
}
|
|
157
|
+
export type SystemKind = 'compaction' | 'error' | 'notice';
|
|
158
|
+
export type CompactionState = 'summarizing' | 'summarized' | 'fallback' | 'discarded';
|
|
159
|
+
export interface SystemMessage {
|
|
160
|
+
id: string;
|
|
161
|
+
role: 'system';
|
|
162
|
+
kind: SystemKind;
|
|
163
|
+
text: string;
|
|
164
|
+
createdAt: number;
|
|
165
|
+
title?: string;
|
|
166
|
+
trigger?: 'threshold' | 'overflow' | 'idle' | 'manual';
|
|
167
|
+
state?: CompactionState;
|
|
168
|
+
action?: ErrorAction;
|
|
48
169
|
}
|
|
49
|
-
export
|
|
50
|
-
export interface EventMessage {
|
|
170
|
+
export interface ToolMessage {
|
|
51
171
|
id: string;
|
|
52
|
-
role: '
|
|
53
|
-
|
|
172
|
+
role: 'tool';
|
|
173
|
+
tool: ToolCall;
|
|
174
|
+
createdAt: number;
|
|
175
|
+
}
|
|
176
|
+
export type LickChannel = 'webhook' | 'cron' | 'sprinkle' | 'fswatch' | 'session-reload' | 'navigate' | 'discovery' | 'upgrade' | 'workflow' | 'bash' | 'jshd' | 'preview' | 'cherry' | 'scoop-notify' | 'scoop-idle' | 'scoop-wait' | 'sudo-request';
|
|
177
|
+
export type LickState = 'pending' | 'confirmed' | 'dismissed';
|
|
178
|
+
export interface LickMessage {
|
|
179
|
+
id: string;
|
|
180
|
+
role: 'lick';
|
|
181
|
+
channel: LickChannel;
|
|
54
182
|
title: string;
|
|
55
183
|
text: string;
|
|
56
184
|
createdAt: number;
|
|
185
|
+
body?: string;
|
|
186
|
+
count?: number;
|
|
187
|
+
state?: LickState;
|
|
188
|
+
}
|
|
189
|
+
export type Message = UserMessage | AssistantMessage | SystemMessage | ToolMessage | LickMessage;
|
|
190
|
+
export interface Outgoing {
|
|
191
|
+
text: string;
|
|
192
|
+
attachments?: Attachment[];
|
|
193
|
+
mode?: SendMode;
|
|
57
194
|
}
|
|
58
|
-
export type Message = UserMessage | AssistantMessage | EventMessage;
|
|
59
195
|
export interface AgentEvents {
|
|
60
196
|
agents: readonly Agent[];
|
|
61
197
|
active: string;
|
|
@@ -63,14 +199,38 @@ export interface AgentEvents {
|
|
|
63
199
|
agentId: string;
|
|
64
200
|
message: Message;
|
|
65
201
|
};
|
|
202
|
+
messages: string;
|
|
203
|
+
frozen: readonly FrozenCone[];
|
|
66
204
|
}
|
|
67
205
|
export interface AgentPort extends Subscribable<AgentEvents> {
|
|
68
206
|
list(): readonly Agent[];
|
|
69
207
|
active(): string;
|
|
70
208
|
select(id: string): void;
|
|
71
209
|
messages(agentId: string): readonly Message[];
|
|
72
|
-
send(agentId: string,
|
|
210
|
+
send(agentId: string, input: string | Outgoing): Promise<void>;
|
|
73
211
|
stop(agentId: string): void;
|
|
212
|
+
busy(agentId: string): boolean;
|
|
213
|
+
queue(agentId: string): readonly UserMessage[];
|
|
214
|
+
unqueue(agentId: string, messageId: string): void;
|
|
215
|
+
suggestion(agentId: string): string | null;
|
|
216
|
+
answer(agentId: string, questionId: string, answer: string): void;
|
|
217
|
+
resolveLick(agentId: string, messageId: string, state: Exclude<LickState, 'pending'>): void;
|
|
218
|
+
compact(agentId: string): void;
|
|
219
|
+
clear(agentId: string): void;
|
|
220
|
+
setModel(agentId: string, model: string): void;
|
|
221
|
+
createScoop(parentId: string, name: string): Agent;
|
|
222
|
+
frozen(): readonly FrozenCone[];
|
|
223
|
+
freeze(agentId: string): void;
|
|
224
|
+
thaw(id: string): Agent | null;
|
|
225
|
+
discard(id: string): void;
|
|
226
|
+
}
|
|
227
|
+
export interface FrozenCone {
|
|
228
|
+
id: string;
|
|
229
|
+
name: string;
|
|
230
|
+
title: string;
|
|
231
|
+
model: string;
|
|
232
|
+
messages: number;
|
|
233
|
+
frozenAt: number;
|
|
74
234
|
}
|
|
75
235
|
export type FileKind = 'file' | 'directory';
|
|
76
236
|
export interface FileEntry {
|
|
@@ -174,10 +334,122 @@ export interface SettingsPort extends Subscribable<SettingsEvents> {
|
|
|
174
334
|
connect(id: string): Promise<void>;
|
|
175
335
|
disconnect(id: string): void;
|
|
176
336
|
}
|
|
337
|
+
export type MemoryTag = 'user' | 'feedback' | 'project';
|
|
338
|
+
export interface Memory {
|
|
339
|
+
id: string;
|
|
340
|
+
scope: string;
|
|
341
|
+
section: string;
|
|
342
|
+
title: string;
|
|
343
|
+
body: string;
|
|
344
|
+
tag: MemoryTag | null;
|
|
345
|
+
updatedAt: number;
|
|
346
|
+
}
|
|
347
|
+
export type MemoryDraft = Omit<Memory, 'id' | 'updatedAt'> & {
|
|
348
|
+
id?: string;
|
|
349
|
+
};
|
|
350
|
+
export interface MemoryEvents {
|
|
351
|
+
memories: readonly Memory[];
|
|
352
|
+
}
|
|
353
|
+
export interface MemoryPort extends Subscribable<MemoryEvents> {
|
|
354
|
+
list(): readonly Memory[];
|
|
355
|
+
save(memory: MemoryDraft): Memory;
|
|
356
|
+
remove(id: string): void;
|
|
357
|
+
}
|
|
358
|
+
export type MonitorStatus = 'active' | 'idle' | 'warn' | 'error';
|
|
359
|
+
export interface MonitorVital {
|
|
360
|
+
id: string;
|
|
361
|
+
label: string;
|
|
362
|
+
value: string;
|
|
363
|
+
unit?: string;
|
|
364
|
+
delta?: string;
|
|
365
|
+
series?: number[];
|
|
366
|
+
ratio?: number;
|
|
367
|
+
}
|
|
368
|
+
export interface MonitorRow {
|
|
369
|
+
name: string;
|
|
370
|
+
meta: string;
|
|
371
|
+
status: MonitorStatus;
|
|
372
|
+
badges?: string[];
|
|
373
|
+
}
|
|
374
|
+
export interface MonitorSection {
|
|
375
|
+
id: string;
|
|
376
|
+
label: string;
|
|
377
|
+
rows: MonitorRow[];
|
|
378
|
+
}
|
|
379
|
+
export interface MonitorAlert {
|
|
380
|
+
id: string;
|
|
381
|
+
title: string;
|
|
382
|
+
detail: string;
|
|
383
|
+
severity: 'warn' | 'error';
|
|
384
|
+
}
|
|
385
|
+
export interface MonitorSnapshot {
|
|
386
|
+
vitals: MonitorVital[];
|
|
387
|
+
alerts: MonitorAlert[];
|
|
388
|
+
sections: MonitorSection[];
|
|
389
|
+
updatedAt: number;
|
|
390
|
+
}
|
|
391
|
+
export interface MonitorEvents {
|
|
392
|
+
snapshot: MonitorSnapshot;
|
|
393
|
+
}
|
|
394
|
+
export interface MonitorPort extends Subscribable<MonitorEvents> {
|
|
395
|
+
snapshot(): MonitorSnapshot;
|
|
396
|
+
resync(): void;
|
|
397
|
+
}
|
|
398
|
+
export interface Sprinkle {
|
|
399
|
+
id: string;
|
|
400
|
+
name: string;
|
|
401
|
+
title: string;
|
|
402
|
+
icon: string;
|
|
403
|
+
agentId: string;
|
|
404
|
+
html: string;
|
|
405
|
+
}
|
|
406
|
+
export interface SprinkleEvents {
|
|
407
|
+
sprinkles: readonly Sprinkle[];
|
|
408
|
+
}
|
|
409
|
+
export interface SprinklePort extends Subscribable<SprinkleEvents> {
|
|
410
|
+
list(): readonly Sprinkle[];
|
|
411
|
+
send(id: string, payload: unknown): void;
|
|
412
|
+
}
|
|
413
|
+
export type TrayConnection = 'offline' | 'connecting' | 'live' | 'stalled' | 'reconnecting' | 'error';
|
|
414
|
+
export type FloatKind = 'npx' | 'sliccstart' | 'extension' | 'standalone' | 'cherry' | 'electron' | 'hosted';
|
|
415
|
+
export type TrayRole = 'none' | 'leader' | 'follower';
|
|
416
|
+
export interface Follower {
|
|
417
|
+
id: string;
|
|
418
|
+
name: string;
|
|
419
|
+
device: 'browser' | 'phone' | 'extension';
|
|
420
|
+
since: number;
|
|
421
|
+
}
|
|
422
|
+
export interface TrayStatus {
|
|
423
|
+
name: string;
|
|
424
|
+
kind: FloatKind;
|
|
425
|
+
connection: TrayConnection;
|
|
426
|
+
role: TrayRole;
|
|
427
|
+
followers: Follower[];
|
|
428
|
+
spent: number;
|
|
429
|
+
rate: number;
|
|
430
|
+
budget: {
|
|
431
|
+
percent: number;
|
|
432
|
+
window: 'daily' | 'weekly' | 'monthly';
|
|
433
|
+
resets: string;
|
|
434
|
+
};
|
|
435
|
+
joinUrl: string;
|
|
436
|
+
}
|
|
437
|
+
export interface TrayEvents {
|
|
438
|
+
status: TrayStatus;
|
|
439
|
+
}
|
|
440
|
+
export interface TrayPort extends Subscribable<TrayEvents> {
|
|
441
|
+
status(): TrayStatus;
|
|
442
|
+
reconnect(): void;
|
|
443
|
+
disconnect(): void;
|
|
444
|
+
}
|
|
177
445
|
export interface SliccModel {
|
|
178
446
|
agent: AgentPort;
|
|
179
447
|
files: FilePort;
|
|
180
448
|
terminals: TerminalPort;
|
|
181
449
|
browser: BrowserPort;
|
|
182
450
|
settings: SettingsPort;
|
|
451
|
+
memory: MemoryPort;
|
|
452
|
+
monitor: MonitorPort;
|
|
453
|
+
sprinkles: SprinklePort;
|
|
454
|
+
tray: TrayPort;
|
|
183
455
|
}
|
package/dist/types/ui.d.ts
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import './app/spectrum.ts';
|
|
2
2
|
import { SliccAgents } from './app/agents.js';
|
|
3
3
|
import { SliccApp } from './app/app.js';
|
|
4
|
+
import { SliccBrowser } from './app/browser.js';
|
|
5
|
+
import { SliccChanges, SliccDiffPanel } from './app/changes.js';
|
|
4
6
|
import { SliccChat } from './app/chat.js';
|
|
7
|
+
import { SliccComposer } from './app/composer.js';
|
|
8
|
+
import { SliccFiles, SliccFileView } from './app/files.js';
|
|
9
|
+
import { SliccCodeView, SliccDiffView } from './components/code-view.js';
|
|
5
10
|
import { SliccDock } from './components/dock.js';
|
|
6
|
-
|
|
7
|
-
export {
|
|
11
|
+
import { SliccFileTree } from './components/file-tree.js';
|
|
12
|
+
export type { Color } from './app/base.js';
|
|
13
|
+
export { resolveColor } from './app/base.js';
|
|
14
|
+
export type { GrammarKind } from './app/grammars.js';
|
|
15
|
+
export { grammarBase, setGrammarBase } from './app/grammars.js';
|
|
8
16
|
export type { Placement, Surface } from './app/panels.js';
|
|
9
17
|
export { surfaces } from './app/panels.js';
|
|
18
|
+
export type { CodeColor, DiffStyle } from './components/code-view.js';
|
|
10
19
|
export type { PanelFactory, PanelParams } from './components/dock.js';
|
|
20
|
+
export type { GitStatusEntry } from './components/file-tree.js';
|
|
11
21
|
export type { Listener, Subscribable } from './model/emitter.js';
|
|
12
22
|
export { Emitter } from './model/emitter.js';
|
|
13
23
|
export type * from './model/types.js';
|
|
14
|
-
export { SliccAgents, SliccApp, SliccChat, SliccDock };
|
|
24
|
+
export { SliccAgents, SliccApp, SliccBrowser, SliccChanges, SliccChat, SliccCodeView, SliccComposer, SliccDiffPanel, SliccDiffView, SliccDock, SliccFiles, SliccFileTree, SliccFileView, };
|
|
15
25
|
export declare function define(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-spectrum",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.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",
|
|
@@ -53,6 +53,18 @@
|
|
|
53
53
|
"lint": "slicc-lint",
|
|
54
54
|
"format": "biome check --write ."
|
|
55
55
|
},
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"@shikijs/langs": "4.5.0",
|
|
58
|
+
"@shikijs/themes": "4.5.0"
|
|
59
|
+
},
|
|
60
|
+
"peerDependenciesMeta": {
|
|
61
|
+
"@shikijs/langs": {
|
|
62
|
+
"optional": true
|
|
63
|
+
},
|
|
64
|
+
"@shikijs/themes": {
|
|
65
|
+
"optional": true
|
|
66
|
+
}
|
|
67
|
+
},
|
|
56
68
|
"devDependencies": {
|
|
57
69
|
"@ai-ecoverse/slicc-kernel": "1.7.2",
|
|
58
70
|
"@ai-ecoverse/slicc-shared-web": "1.4.1",
|
|
@@ -61,7 +73,10 @@
|
|
|
61
73
|
"@biomejs/biome": "2.5.15",
|
|
62
74
|
"@fontsource/source-code-pro": "5.3.0",
|
|
63
75
|
"@happy-dom/global-registrator": "20.14.5",
|
|
76
|
+
"@pierre/diffs": "1.5.1",
|
|
77
|
+
"@pierre/trees": "1.0.0-beta.6",
|
|
64
78
|
"@spectrum-web-components/action-button": "1.12.4",
|
|
79
|
+
"@spectrum-web-components/action-group": "1.12.4",
|
|
65
80
|
"@spectrum-web-components/action-menu": "1.12.4",
|
|
66
81
|
"@spectrum-web-components/badge": "1.12.4",
|
|
67
82
|
"@spectrum-web-components/button": "1.12.4",
|
|
@@ -69,6 +84,8 @@
|
|
|
69
84
|
"@spectrum-web-components/menu": "1.12.4",
|
|
70
85
|
"@spectrum-web-components/picker": "1.12.4",
|
|
71
86
|
"@spectrum-web-components/progress-circle": "1.12.4",
|
|
87
|
+
"@spectrum-web-components/search": "1.12.4",
|
|
88
|
+
"@spectrum-web-components/switch": "1.12.4",
|
|
72
89
|
"@spectrum-web-components/textfield": "1.12.4",
|
|
73
90
|
"@spectrum-web-components/theme": "1.12.4",
|
|
74
91
|
"@types/node": "26.6.4",
|
package/dist/chunk-T5QFSUYQ.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|