@ai-ecoverse/slicc-spectrum 1.0.0 → 1.2.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.
Files changed (160) hide show
  1. package/README.md +86 -3
  2. package/dist/chunk-364Y2XOJ.js +28 -0
  3. package/dist/chunk-364Y2XOJ.js.map +7 -0
  4. package/dist/chunk-4GQ6THC2.js +18 -0
  5. package/dist/chunk-4GQ6THC2.js.map +7 -0
  6. package/dist/chunk-5OVGH7HO.js +28 -0
  7. package/dist/chunk-5OVGH7HO.js.map +7 -0
  8. package/dist/chunk-5XWUZJTT.js +8 -0
  9. package/dist/chunk-5XWUZJTT.js.map +7 -0
  10. package/dist/chunk-64K5VONJ.js +11 -0
  11. package/dist/chunk-64K5VONJ.js.map +7 -0
  12. package/dist/chunk-6A6NIESE.js +9 -0
  13. package/dist/chunk-6A6NIESE.js.map +7 -0
  14. package/dist/chunk-6JNYNXUQ.js +180 -0
  15. package/dist/chunk-6JNYNXUQ.js.map +7 -0
  16. package/dist/chunk-6JYCQXDO.js +8 -0
  17. package/dist/chunk-6JYCQXDO.js.map +7 -0
  18. package/dist/chunk-6N3GZNXH.js +181 -0
  19. package/dist/chunk-6N3GZNXH.js.map +7 -0
  20. package/dist/chunk-6ODADG7T.js +8 -0
  21. package/dist/chunk-6ODADG7T.js.map +7 -0
  22. package/dist/chunk-6T3O5K6R.js +8 -0
  23. package/dist/chunk-6T3O5K6R.js.map +7 -0
  24. package/dist/chunk-7PY7B3ZW.js +59 -0
  25. package/dist/chunk-7PY7B3ZW.js.map +7 -0
  26. package/dist/chunk-AXQFWXYZ.js +19 -0
  27. package/dist/chunk-AXQFWXYZ.js.map +7 -0
  28. package/dist/chunk-BDOI3WEE.js +8 -0
  29. package/dist/chunk-BDOI3WEE.js.map +7 -0
  30. package/dist/chunk-BHAGWMDD.js +8 -0
  31. package/dist/chunk-BHAGWMDD.js.map +7 -0
  32. package/dist/chunk-C7X653JJ.js +8 -0
  33. package/dist/chunk-C7X653JJ.js.map +7 -0
  34. package/dist/chunk-CGS66GRP.js +11 -0
  35. package/dist/chunk-CGS66GRP.js.map +7 -0
  36. package/dist/chunk-CONYKGKV.js +11 -0
  37. package/dist/chunk-CONYKGKV.js.map +7 -0
  38. package/dist/chunk-CU7BC2RI.js +11 -0
  39. package/dist/chunk-CU7BC2RI.js.map +7 -0
  40. package/dist/chunk-EN3XGF2M.js +26 -0
  41. package/dist/chunk-EN3XGF2M.js.map +7 -0
  42. package/dist/chunk-ER3HU7OE.js +22 -0
  43. package/dist/chunk-ER3HU7OE.js.map +7 -0
  44. package/dist/chunk-EX57SDII.js +8 -0
  45. package/dist/chunk-EX57SDII.js.map +7 -0
  46. package/dist/chunk-GKXQPI4G.js +8 -0
  47. package/dist/chunk-GKXQPI4G.js.map +7 -0
  48. package/dist/chunk-HBUX7E54.js +234 -0
  49. package/dist/chunk-HBUX7E54.js.map +7 -0
  50. package/dist/chunk-I2NMYJ25.js +17 -0
  51. package/dist/chunk-I2NMYJ25.js.map +7 -0
  52. package/dist/chunk-I4OYHPAU.js +11 -0
  53. package/dist/chunk-I4OYHPAU.js.map +7 -0
  54. package/dist/chunk-IBQ4O4NO.js +13 -0
  55. package/dist/chunk-IBQ4O4NO.js.map +7 -0
  56. package/dist/chunk-J3QOBXZJ.js +1093 -0
  57. package/dist/chunk-J3QOBXZJ.js.map +7 -0
  58. package/dist/chunk-JASEW37G.js +411 -0
  59. package/dist/chunk-JASEW37G.js.map +7 -0
  60. package/dist/chunk-JBYBW627.js +8 -0
  61. package/dist/chunk-JBYBW627.js.map +7 -0
  62. package/dist/chunk-JWTAKXQS.js +8 -0
  63. package/dist/chunk-JWTAKXQS.js.map +7 -0
  64. package/dist/chunk-KMP5HO3E.js +11 -0
  65. package/dist/chunk-KMP5HO3E.js.map +7 -0
  66. package/dist/chunk-KWPU2PY3.js +14 -0
  67. package/dist/chunk-KWPU2PY3.js.map +7 -0
  68. package/dist/chunk-KYBD6ZRT.js +8 -0
  69. package/dist/chunk-KYBD6ZRT.js.map +7 -0
  70. package/dist/chunk-LBXW6XNL.js +18 -0
  71. package/dist/chunk-LBXW6XNL.js.map +7 -0
  72. package/dist/chunk-LDR4U5KX.js +8 -0
  73. package/dist/chunk-LDR4U5KX.js.map +7 -0
  74. package/dist/chunk-LII3WY6Y.js +11 -0
  75. package/dist/chunk-LII3WY6Y.js.map +7 -0
  76. package/dist/chunk-LY7WVBCB.js +10 -0
  77. package/dist/chunk-LY7WVBCB.js.map +7 -0
  78. package/dist/chunk-MJVAL555.js +8 -0
  79. package/dist/chunk-MJVAL555.js.map +7 -0
  80. package/dist/chunk-NLDFGCIL.js +11 -0
  81. package/dist/chunk-NLDFGCIL.js.map +7 -0
  82. package/dist/chunk-OFQ56DAN.js +2638 -0
  83. package/dist/chunk-OFQ56DAN.js.map +7 -0
  84. package/dist/chunk-S5EGO4NA.js +11 -0
  85. package/dist/chunk-S5EGO4NA.js.map +7 -0
  86. package/dist/chunk-T2LAT2D6.js +168 -0
  87. package/dist/chunk-T2LAT2D6.js.map +7 -0
  88. package/dist/chunk-T5NHW4KC.js +23 -0
  89. package/dist/chunk-T5NHW4KC.js.map +7 -0
  90. package/dist/chunk-TAZBKRHT.js +10 -0
  91. package/dist/chunk-TAZBKRHT.js.map +7 -0
  92. package/dist/chunk-TK4ZJ7LA.js +5346 -0
  93. package/dist/chunk-TK4ZJ7LA.js.map +7 -0
  94. package/dist/chunk-TS7SL372.js +687 -0
  95. package/dist/chunk-TS7SL372.js.map +7 -0
  96. package/dist/chunk-UCIBH53C.js +11 -0
  97. package/dist/chunk-UCIBH53C.js.map +7 -0
  98. package/dist/chunk-XZM23TK4.js +11 -0
  99. package/dist/chunk-XZM23TK4.js.map +7 -0
  100. package/dist/chunk-Y4Z7K443.js +64 -0
  101. package/dist/chunk-Y4Z7K443.js.map +7 -0
  102. package/dist/chunk-YPQKCWWG.js +19 -0
  103. package/dist/chunk-YPQKCWWG.js.map +7 -0
  104. package/dist/chunk-YX6SI5VA.js +11 -0
  105. package/dist/chunk-YX6SI5VA.js.map +7 -0
  106. package/dist/chunk-ZMBN6APP.js +11 -0
  107. package/dist/chunk-ZMBN6APP.js.map +7 -0
  108. package/dist/fonts/source-code-pro-latin-400-normal.woff2 +0 -0
  109. package/dist/fonts/source-code-pro-latin-600-normal.woff2 +0 -0
  110. package/dist/slicc-dummy.js +2811 -0
  111. package/dist/slicc-dummy.js.map +7 -0
  112. package/dist/slicc-terminal.js +7 -5369
  113. package/dist/slicc-terminal.js.map +4 -4
  114. package/dist/slicc-ui.js +61411 -0
  115. package/dist/slicc-ui.js.map +7 -0
  116. package/dist/types/app/agents.d.ts +11 -0
  117. package/dist/types/app/app.d.ts +34 -0
  118. package/dist/types/app/base.d.ts +35 -0
  119. package/dist/types/app/browser.d.ts +25 -0
  120. package/dist/types/app/changes.d.ts +24 -0
  121. package/dist/types/app/chat.d.ts +11 -0
  122. package/dist/types/app/composer.d.ts +69 -0
  123. package/dist/types/app/files.d.ts +56 -0
  124. package/dist/types/app/fonts.d.ts +3 -0
  125. package/dist/types/app/freezer.d.ts +11 -0
  126. package/dist/types/app/markdown.d.ts +33 -0
  127. package/dist/types/app/memory.d.ts +39 -0
  128. package/dist/types/app/messages.d.ts +21 -0
  129. package/dist/types/app/monitor.d.ts +11 -0
  130. package/dist/types/app/panels.d.ts +39 -0
  131. package/dist/types/app/settings.d.ts +21 -0
  132. package/dist/types/app/spectrum.d.ts +37 -0
  133. package/dist/types/app/sprinkle.d.ts +18 -0
  134. package/dist/types/app/terminals.d.ts +25 -0
  135. package/dist/types/app/tray.d.ts +25 -0
  136. package/dist/types/components/code-view.d.ts +47 -0
  137. package/dist/types/components/dock.d.ts +24 -0
  138. package/dist/types/components/file-tree.d.ts +18 -0
  139. package/dist/types/components/sheets.d.ts +1 -0
  140. package/dist/types/dummy/agent.d.ts +32 -0
  141. package/dist/types/dummy/browser.d.ts +15 -0
  142. package/dist/types/dummy/clock.d.ts +5 -0
  143. package/dist/types/dummy/extras.d.ts +8 -0
  144. package/dist/types/dummy/files.d.ts +14 -0
  145. package/dist/types/dummy/fixtures.d.ts +12 -0
  146. package/dist/types/dummy/index.d.ts +6 -0
  147. package/dist/types/dummy/memory.d.ts +9 -0
  148. package/dist/types/dummy/monitor.d.ts +9 -0
  149. package/dist/types/dummy/script.d.ts +29 -0
  150. package/dist/types/dummy/settings.d.ts +13 -0
  151. package/dist/types/dummy/shell.d.ts +16 -0
  152. package/dist/types/dummy/showcase.d.ts +6 -0
  153. package/dist/types/dummy/sprinkles.d.ts +9 -0
  154. package/dist/types/dummy/terminals.d.ts +15 -0
  155. package/dist/types/dummy/tray.d.ts +10 -0
  156. package/dist/types/dummy.d.ts +2 -0
  157. package/dist/types/model/emitter.d.ts +9 -0
  158. package/dist/types/model/types.d.ts +455 -0
  159. package/dist/types/ui.d.ts +23 -0
  160. package/package.json +34 -11
@@ -0,0 +1,455 @@
1
+ import type { TerminalBackend } from '../backend.js';
2
+ import type { Subscribable } from './emitter.js';
3
+ export type AgentKind = 'cone' | 'scoop';
4
+ export type AgentStatus = 'idle' | 'thinking' | 'working' | 'waiting' | 'error';
5
+ export interface Agent {
6
+ id: string;
7
+ name: string;
8
+ kind: AgentKind;
9
+ parentId: string | null;
10
+ status: AgentStatus;
11
+ model: string;
12
+ contextFill: number;
13
+ unread: number;
14
+ }
15
+ export type ToolStatus = 'running' | 'done' | 'error' | 'cancelled';
16
+ export interface ToolCall {
17
+ id: string;
18
+ name: string;
19
+ title: string;
20
+ input: string;
21
+ output: string;
22
+ status: ToolStatus;
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;
86
+ }
87
+ export type MessagePart = {
88
+ type: 'text';
89
+ text: string;
90
+ } | {
91
+ type: 'thinking';
92
+ text: string;
93
+ } | {
94
+ type: 'tool';
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;
130
+ };
131
+ export type SendMode = 'send' | 'steer' | 'queue';
132
+ export interface UserMessage {
133
+ id: string;
134
+ role: 'user';
135
+ text: string;
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;
147
+ }
148
+ export interface AssistantMessage {
149
+ id: string;
150
+ role: 'assistant';
151
+ parts: MessagePart[];
152
+ status: AssistantStatus;
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;
169
+ }
170
+ export interface ToolMessage {
171
+ id: string;
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;
182
+ title: string;
183
+ text: string;
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;
194
+ }
195
+ export interface AgentEvents {
196
+ agents: readonly Agent[];
197
+ active: string;
198
+ message: {
199
+ agentId: string;
200
+ message: Message;
201
+ };
202
+ messages: string;
203
+ frozen: readonly FrozenCone[];
204
+ }
205
+ export interface AgentPort extends Subscribable<AgentEvents> {
206
+ list(): readonly Agent[];
207
+ active(): string;
208
+ select(id: string): void;
209
+ messages(agentId: string): readonly Message[];
210
+ send(agentId: string, input: string | Outgoing): Promise<void>;
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;
234
+ }
235
+ export type FileKind = 'file' | 'directory';
236
+ export interface FileEntry {
237
+ path: string;
238
+ kind: FileKind;
239
+ size: number;
240
+ modified: number;
241
+ }
242
+ export type ChangeStatus = 'added' | 'modified' | 'deleted';
243
+ export interface Change {
244
+ path: string;
245
+ status: ChangeStatus;
246
+ before: string | null;
247
+ after: string | null;
248
+ agentId: string | null;
249
+ }
250
+ export interface FileEvents {
251
+ files: readonly FileEntry[];
252
+ file: string;
253
+ changes: readonly Change[];
254
+ }
255
+ export interface FilePort extends Subscribable<FileEvents> {
256
+ list(): Promise<readonly FileEntry[]>;
257
+ read(path: string): Promise<string>;
258
+ write(path: string, text: string, agentId?: string | null): Promise<void>;
259
+ remove(path: string, agentId?: string | null): Promise<void>;
260
+ changes(): readonly Change[];
261
+ accept(path: string): void;
262
+ revert(path: string): Promise<void>;
263
+ }
264
+ export interface TerminalInfo {
265
+ id: string;
266
+ title: string;
267
+ cwd: string;
268
+ agentId: string | null;
269
+ }
270
+ export interface TerminalEvents {
271
+ terminals: readonly TerminalInfo[];
272
+ }
273
+ export interface TerminalPort extends Subscribable<TerminalEvents> {
274
+ list(): readonly TerminalInfo[];
275
+ open(options?: {
276
+ cwd?: string;
277
+ agentId?: string | null;
278
+ }): TerminalInfo;
279
+ close(id: string): void;
280
+ backend(id: string): TerminalBackend;
281
+ }
282
+ export type TabStatus = 'loading' | 'complete';
283
+ export interface BrowserTab {
284
+ id: string;
285
+ title: string;
286
+ url: string;
287
+ status: TabStatus;
288
+ agentId: string | null;
289
+ }
290
+ export interface BrowserEvents {
291
+ tabs: readonly BrowserTab[];
292
+ active: string | null;
293
+ }
294
+ export interface BrowserPort extends Subscribable<BrowserEvents> {
295
+ list(): readonly BrowserTab[];
296
+ active(): string | null;
297
+ activate(id: string): void;
298
+ open(url: string, agentId?: string | null): BrowserTab;
299
+ navigate(id: string, url: string): void;
300
+ close(id: string): void;
301
+ screenshot(id: string): Promise<string>;
302
+ }
303
+ export type ColorScheme = 'light' | 'dark' | 'system';
304
+ export type Thinking = 'off' | 'low' | 'medium' | 'high';
305
+ export interface Settings {
306
+ color: ColorScheme;
307
+ model: string;
308
+ thinking: Thinking;
309
+ sendOnEnter: boolean;
310
+ showThinking: boolean;
311
+ diffStyle: 'unified' | 'split';
312
+ }
313
+ export type AccountStatus = 'connected' | 'expired' | 'disconnected';
314
+ export interface Account {
315
+ id: string;
316
+ provider: string;
317
+ identity: string;
318
+ status: AccountStatus;
319
+ }
320
+ export interface ModelOption {
321
+ id: string;
322
+ label: string;
323
+ provider: string;
324
+ }
325
+ export interface SettingsEvents {
326
+ settings: Settings;
327
+ accounts: readonly Account[];
328
+ }
329
+ export interface SettingsPort extends Subscribable<SettingsEvents> {
330
+ get(): Settings;
331
+ update(patch: Partial<Settings>): void;
332
+ models(): readonly ModelOption[];
333
+ accounts(): readonly Account[];
334
+ connect(id: string): Promise<void>;
335
+ disconnect(id: string): void;
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
+ }
445
+ export interface SliccModel {
446
+ agent: AgentPort;
447
+ files: FilePort;
448
+ terminals: TerminalPort;
449
+ browser: BrowserPort;
450
+ settings: SettingsPort;
451
+ memory: MemoryPort;
452
+ monitor: MonitorPort;
453
+ sprinkles: SprinklePort;
454
+ tray: TrayPort;
455
+ }
@@ -0,0 +1,23 @@
1
+ import './app/spectrum.ts';
2
+ import { SliccAgents } from './app/agents.js';
3
+ import { SliccApp } from './app/app.js';
4
+ import { SliccBrowser } from './app/browser.js';
5
+ import { SliccChanges, SliccDiffPanel } from './app/changes.js';
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';
10
+ import { SliccDock } from './components/dock.js';
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 { Placement, Surface } from './app/panels.js';
15
+ export { surfaces } from './app/panels.js';
16
+ export type { CodeColor, DiffStyle } from './components/code-view.js';
17
+ export type { PanelFactory, PanelParams } from './components/dock.js';
18
+ export type { GitStatusEntry } from './components/file-tree.js';
19
+ export type { Listener, Subscribable } from './model/emitter.js';
20
+ export { Emitter } from './model/emitter.js';
21
+ export type * from './model/types.js';
22
+ export { SliccAgents, SliccApp, SliccBrowser, SliccChanges, SliccChat, SliccCodeView, SliccComposer, SliccDiffPanel, SliccDiffView, SliccDock, SliccFiles, SliccFileTree, SliccFileView, };
23
+ export declare function define(): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-spectrum",
3
- "version": "1.0.0",
4
- "description": "A terminal web component for SLICC, built on wterm, that talks to slicc-kernel",
3
+ "version": "1.2.0",
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",
7
7
  "repository": {
@@ -25,6 +25,14 @@
25
25
  ".": {
26
26
  "types": "./dist/types/index.d.ts",
27
27
  "default": "./dist/slicc-terminal.js"
28
+ },
29
+ "./ui": {
30
+ "types": "./dist/types/ui.d.ts",
31
+ "default": "./dist/slicc-ui.js"
32
+ },
33
+ "./dummy": {
34
+ "types": "./dist/types/dummy.d.ts",
35
+ "default": "./dist/slicc-dummy.js"
28
36
  }
29
37
  },
30
38
  "files": [
@@ -37,29 +45,44 @@
37
45
  "trust": "npx fledgling sync -y --skip-publish",
38
46
  "trust:dry": "npx fledgling sync --dry-run -y --skip-publish",
39
47
  "release": "semantic-release",
40
- "start": "npm run build && node test/integration/server.mjs",
48
+ "start": "npm run build && node test/integration/chrome.mjs",
41
49
  "pretest": "npm run build && playwright-core install --no-shell chromium",
42
- "test": "node --test --test-global-setup=test/integration/global.mjs 'test/integration/*.test.mjs'",
43
- "test:unit": "NODE_NO_WARNINGS=1 mcr -c mcr.config.mjs node --test 'test/unit/**/*.test.mjs'",
44
- "coverage:staged": "npm run --silent test:unit && uvx diff-cover@10.6.0 coverage/unit/lcov.info --compare-branch HEAD --ignore-unstaged --fail-under 100",
50
+ "test": "node --test --test-global-setup=node_modules/@ai-ecoverse/slicc-shared-web/harness/global.mjs 'test/integration/*.test.mjs'",
51
+ "test:unit": "NODE_NO_WARNINGS=1 mcr -c node_modules/@ai-ecoverse/slicc-shared-web/mcr.config.mjs node --test 'test/unit/**/*.test.mjs'",
45
52
  "typecheck": "tsc",
46
- "lint": "biome check . && npm run typecheck && npm run lint:comments && npm run lint:no-unit-tests",
47
- "lint:comments": "d=node_modules/.cache/no-comment-9cc7617; [ -f $d/check.mjs ] || { mkdir -p $d && for f in lib comments marker check; do curl -fsSL -o $d/$f.mjs https://raw.githubusercontent.com/ai-ecoverse/slicc/9cc7617c94c24b84c4d6fd8edf92441378257d07/packages/dev-tools/no-comment/$f.mjs || exit 1; done; } && node $d/check.mjs --force",
48
- "lint:no-unit-tests": "! git ls-files --cached --others --exclude-standard | grep -E '(^|/)(tests?|__tests__)/|\\.(test|spec)\\.' | grep -vE '^test/integration/'",
53
+ "lint": "slicc-lint",
49
54
  "format": "biome check --write ."
50
55
  },
51
56
  "devDependencies": {
52
- "@ai-ecoverse/slicc-kernel": "1.1.0",
57
+ "@ai-ecoverse/slicc-kernel": "1.7.2",
58
+ "@ai-ecoverse/slicc-shared-web": "1.4.1",
53
59
  "@ai-ecoverse/wasm-bash": "5.3.0-7",
54
60
  "@ai-ecoverse/wasm-coreutils": "9.7.0-3",
55
61
  "@biomejs/biome": "2.5.15",
62
+ "@fontsource/source-code-pro": "5.3.0",
56
63
  "@happy-dom/global-registrator": "20.14.5",
64
+ "@pierre/diffs": "1.5.1",
65
+ "@pierre/trees": "1.0.0-beta.6",
66
+ "@spectrum-web-components/action-button": "1.12.4",
67
+ "@spectrum-web-components/action-group": "1.12.4",
68
+ "@spectrum-web-components/action-menu": "1.12.4",
69
+ "@spectrum-web-components/badge": "1.12.4",
70
+ "@spectrum-web-components/button": "1.12.4",
71
+ "@spectrum-web-components/icons-workflow": "1.12.4",
72
+ "@spectrum-web-components/menu": "1.12.4",
73
+ "@spectrum-web-components/picker": "1.12.4",
74
+ "@spectrum-web-components/progress-circle": "1.12.4",
75
+ "@spectrum-web-components/search": "1.12.4",
76
+ "@spectrum-web-components/switch": "1.12.4",
77
+ "@spectrum-web-components/textfield": "1.12.4",
78
+ "@spectrum-web-components/theme": "1.12.4",
57
79
  "@types/node": "26.6.4",
58
80
  "@wterm/core": "0.5.4",
59
81
  "@wterm/dom": "0.5.4",
82
+ "dockview-core": "8.4.0",
60
83
  "esbuild": "0.28.2",
61
84
  "happy-dom": "20.14.5",
62
- "lefthook": "2.1.16",
85
+ "lefthook": "2.1.17",
63
86
  "monocart-coverage-reports": "2.13.0",
64
87
  "playwright-core": "1.63.0",
65
88
  "semantic-release": "25.0.9",