@ai-ecoverse/slicc-spectrum 1.30.0 → 1.32.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 +9 -7
- package/dist/slicc-dummy.js +101 -7
- package/dist/slicc-dummy.js.map +4 -4
- package/dist/slicc-ui.js +4368 -3689
- package/dist/slicc-ui.js.map +4 -4
- package/dist/types/app/files.d.ts +8 -0
- package/dist/types/app/messages.d.ts +9 -0
- package/dist/types/app/network.d.ts +49 -0
- package/dist/types/dummy/files.d.ts +3 -2
- package/dist/types/dummy/index.d.ts +4 -1
- package/dist/types/dummy/network.d.ts +15 -0
- package/dist/types/dummy.d.ts +2 -0
- package/dist/types/model/types.d.ts +22 -1
- package/dist/types/ui.d.ts +2 -1
- package/package.json +1 -1
|
@@ -45,6 +45,12 @@ export declare class SliccFiles extends ModelElement {
|
|
|
45
45
|
ejecting: {
|
|
46
46
|
state: boolean;
|
|
47
47
|
};
|
|
48
|
+
waiting: {
|
|
49
|
+
state: boolean;
|
|
50
|
+
};
|
|
51
|
+
inserting: {
|
|
52
|
+
state: boolean;
|
|
53
|
+
};
|
|
48
54
|
error: {
|
|
49
55
|
state: boolean;
|
|
50
56
|
};
|
|
@@ -53,6 +59,8 @@ export declare class SliccFiles extends ModelElement {
|
|
|
53
59
|
mounted: readonly string[];
|
|
54
60
|
mounting: boolean;
|
|
55
61
|
ejecting: ReadonlySet<string>;
|
|
62
|
+
waiting: readonly string[];
|
|
63
|
+
inserting: ReadonlySet<string>;
|
|
56
64
|
error: string;
|
|
57
65
|
constructor();
|
|
58
66
|
static styles: import("lit").CSSResult[];
|
|
@@ -14,9 +14,18 @@ import '@adobe/spectrum-wc-icons/swc-icon-alert-diamond.js';
|
|
|
14
14
|
import '@adobe/spectrum-wc-icons/swc-icon-alert-triangle.js';
|
|
15
15
|
import '@adobe/spectrum-wc-icons/swc-icon-cancel.js';
|
|
16
16
|
import '@adobe/spectrum-wc-icons/swc-icon-checkmark-circle.js';
|
|
17
|
+
import '@adobe/spectrum-wc-icons/swc-icon-chevron-right.js';
|
|
18
|
+
import '@adobe/spectrum-wc-icons/swc-icon-code.js';
|
|
19
|
+
import '@adobe/spectrum-wc-icons/swc-icon-data.js';
|
|
20
|
+
import '@adobe/spectrum-wc-icons/swc-icon-edit.js';
|
|
17
21
|
import '@adobe/spectrum-wc-icons/swc-icon-file.js';
|
|
18
22
|
import '@adobe/spectrum-wc-icons/swc-icon-file-text.js';
|
|
23
|
+
import '@adobe/spectrum-wc-icons/swc-icon-globe-grid.js';
|
|
19
24
|
import '@adobe/spectrum-wc-icons/swc-icon-lock.js';
|
|
25
|
+
import '@adobe/spectrum-wc-icons/swc-icon-search.js';
|
|
26
|
+
import '@adobe/spectrum-wc-icons/swc-icon-tools.js';
|
|
27
|
+
import '@adobe/spectrum-wc-icons/swc-icon-user-group.js';
|
|
28
|
+
import '@adobe/spectrum-wc-icons/swc-icon-web-page.js';
|
|
20
29
|
import { nothing, type TemplateResult } from 'lit';
|
|
21
30
|
import type { AssistantMessage, ErrorAction, LickChannel, LickMessage, LickState, MessagePart, SliccModel, SystemMessage, ToolCall, ToolMessage, UserMessage } from '../model/types.js';
|
|
22
31
|
export interface Handlers {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import '@adobe/spectrum-wc/components/action-button/swc-action-button.js';
|
|
2
|
+
import '@adobe/spectrum-wc/components/button/swc-button.js';
|
|
3
|
+
import '@adobe/spectrum-wc/components/status-light/swc-status-light.js';
|
|
4
|
+
import '@adobe/spectrum-wc-icons/swc-icon-alert-triangle.js';
|
|
5
|
+
import '@adobe/spectrum-wc-icons/swc-icon-cloud.js';
|
|
6
|
+
import '@adobe/spectrum-wc-icons/swc-icon-cloud-state-error.js';
|
|
7
|
+
import '@adobe/spectrum-wc-icons/swc-icon-cloud-state-online.js';
|
|
8
|
+
import '@adobe/spectrum-wc-icons/swc-icon-cloud-state-slow-connection.js';
|
|
9
|
+
import '@adobe/spectrum-wc-icons/swc-icon-copy.js';
|
|
10
|
+
import { type TemplateResult } from 'lit';
|
|
11
|
+
import type { NetworkStatus, SliccModel } from '../model/types.js';
|
|
12
|
+
import { ModelElement } from './base.js';
|
|
13
|
+
export declare const command = "npx @ai-ecoverse/slicc-node";
|
|
14
|
+
export declare const networkHealth: Record<NetworkStatus['health'], readonly ['positive' | 'notice' | 'negative', string]>;
|
|
15
|
+
export declare function networkLabel(status: NetworkStatus): string;
|
|
16
|
+
export declare const networkIcon: Record<NetworkStatus['health'], TemplateResult>;
|
|
17
|
+
export declare function host(url: string): string;
|
|
18
|
+
export declare function since(at: number, now?: number): string;
|
|
19
|
+
export declare class SliccNetwork extends ModelElement {
|
|
20
|
+
#private;
|
|
21
|
+
static properties: {
|
|
22
|
+
model: {
|
|
23
|
+
attribute: boolean;
|
|
24
|
+
};
|
|
25
|
+
checking: {
|
|
26
|
+
state: boolean;
|
|
27
|
+
};
|
|
28
|
+
copied: {
|
|
29
|
+
state: boolean;
|
|
30
|
+
};
|
|
31
|
+
uncopied: {
|
|
32
|
+
state: boolean;
|
|
33
|
+
};
|
|
34
|
+
error: {
|
|
35
|
+
state: boolean;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
checking: boolean;
|
|
39
|
+
copied: boolean;
|
|
40
|
+
uncopied: boolean;
|
|
41
|
+
error: string;
|
|
42
|
+
constructor();
|
|
43
|
+
static styles: import("lit").CSSResult[];
|
|
44
|
+
protected subscribe(model: SliccModel): Array<() => void>;
|
|
45
|
+
focus(): void;
|
|
46
|
+
check(): Promise<void>;
|
|
47
|
+
copy(): Promise<void>;
|
|
48
|
+
render(): TemplateResult;
|
|
49
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Emitter } from '../model/emitter.js';
|
|
2
2
|
import type { Change, FileEntry, FileEvents, FilePort } from '../model/types.js';
|
|
3
3
|
import type { Clock } from './clock.js';
|
|
4
|
-
export type MountScenario = 'mount' | 'cancel' | 'fail';
|
|
4
|
+
export type MountScenario = 'mount' | 'cancel' | 'fail' | 'needs';
|
|
5
5
|
export interface DummyMount {
|
|
6
6
|
scenario: MountScenario;
|
|
7
7
|
point: string;
|
|
@@ -10,9 +10,10 @@ export interface DummyMount {
|
|
|
10
10
|
export declare class DummyFiles extends Emitter<FileEvents> implements FilePort {
|
|
11
11
|
#private;
|
|
12
12
|
mount: DummyMount | null;
|
|
13
|
-
mountFolder?: () => Promise<string | null>;
|
|
13
|
+
mountFolder?: (path?: string) => Promise<string | null>;
|
|
14
14
|
mounts?: () => readonly string[];
|
|
15
15
|
eject?: (path: string) => Promise<void>;
|
|
16
|
+
needsFolder?: () => readonly string[];
|
|
16
17
|
constructor(contents: Record<string, string>, directories: readonly string[], changes: readonly Change[], clock: Clock, mount?: DummyMount | null);
|
|
17
18
|
list(): Promise<readonly FileEntry[]>;
|
|
18
19
|
read(path: string): Promise<string>;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import type { SliccModel } from '../model/types.js';
|
|
2
2
|
import { type MountScenario } from './files.js';
|
|
3
|
+
import { DummyNetwork, type NetworkScenario } from './network.js';
|
|
3
4
|
import { DummyUpdates, type UpdateScenario } from './updates.js';
|
|
4
5
|
export interface DummyOptions {
|
|
5
6
|
delay?: number;
|
|
6
7
|
storage?: Storage | null;
|
|
7
8
|
updates?: UpdateScenario;
|
|
8
9
|
mounts?: MountScenario | 'off';
|
|
10
|
+
network?: NetworkScenario | 'off';
|
|
9
11
|
}
|
|
10
12
|
export interface DummyModel extends SliccModel {
|
|
11
13
|
updates: DummyUpdates;
|
|
14
|
+
network?: DummyNetwork;
|
|
12
15
|
}
|
|
13
|
-
export declare function createDummyModel({ delay, storage, updates, mounts, }?: DummyOptions): DummyModel;
|
|
16
|
+
export declare function createDummyModel({ delay, storage, updates, mounts, network, }?: DummyOptions): DummyModel;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Emitter } from '../model/emitter.js';
|
|
2
|
+
import type { NetworkPort, NetworkStatus } from '../model/types.js';
|
|
3
|
+
import type { Clock } from './clock.js';
|
|
4
|
+
export type NetworkScenario = 'ok' | 'limited' | 'failing';
|
|
5
|
+
export declare function networkFixtures(scenario: NetworkScenario, now?: number): NetworkStatus;
|
|
6
|
+
export declare class DummyNetwork extends Emitter<{
|
|
7
|
+
network: NetworkStatus;
|
|
8
|
+
}> implements NetworkPort {
|
|
9
|
+
#private;
|
|
10
|
+
scenario: NetworkScenario;
|
|
11
|
+
constructor(scenario: NetworkScenario, clock: Clock);
|
|
12
|
+
status(): NetworkStatus;
|
|
13
|
+
setScenario(scenario: NetworkScenario): void;
|
|
14
|
+
check(): Promise<void>;
|
|
15
|
+
}
|
package/dist/types/dummy.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export type { DummyMount, MountScenario } from './dummy/files.js';
|
|
2
2
|
export type { DummyModel, DummyOptions } from './dummy/index.js';
|
|
3
3
|
export { createDummyModel } from './dummy/index.js';
|
|
4
|
+
export type { NetworkScenario } from './dummy/network.js';
|
|
5
|
+
export { DummyNetwork, networkFixtures } from './dummy/network.js';
|
|
4
6
|
export type { UpdateScenario } from './dummy/updates.js';
|
|
5
7
|
export { DummyUpdates, updateFixtures } from './dummy/updates.js';
|
|
@@ -293,9 +293,10 @@ export interface FilePort extends Subscribable<FileEvents> {
|
|
|
293
293
|
changes(): readonly Change[];
|
|
294
294
|
accept(path: string): void;
|
|
295
295
|
revert(path: string): Promise<void>;
|
|
296
|
-
mountFolder?(): Promise<string | null>;
|
|
296
|
+
mountFolder?(path?: string): Promise<string | null>;
|
|
297
297
|
mounts?(): readonly string[];
|
|
298
298
|
eject?(path: string): Promise<void>;
|
|
299
|
+
needsFolder?(): readonly string[];
|
|
299
300
|
}
|
|
300
301
|
export interface TerminalInfo {
|
|
301
302
|
id: string;
|
|
@@ -519,6 +520,25 @@ export interface UpdatesPort extends Subscribable<{
|
|
|
519
520
|
ready(): boolean;
|
|
520
521
|
act(id: string, action: UpdateAction): Promise<void>;
|
|
521
522
|
}
|
|
523
|
+
export type NetworkRoute = 'proxy' | 'extension' | 'page';
|
|
524
|
+
export interface NetworkFailure {
|
|
525
|
+
url: string;
|
|
526
|
+
error: string;
|
|
527
|
+
at: number;
|
|
528
|
+
}
|
|
529
|
+
export interface NetworkStatus {
|
|
530
|
+
route: NetworkRoute | null;
|
|
531
|
+
health: 'ok' | 'limited' | 'failing';
|
|
532
|
+
detail: string | null;
|
|
533
|
+
failures: readonly NetworkFailure[];
|
|
534
|
+
extensionUrl?: string;
|
|
535
|
+
}
|
|
536
|
+
export interface NetworkPort extends Subscribable<{
|
|
537
|
+
network: NetworkStatus;
|
|
538
|
+
}> {
|
|
539
|
+
status(): NetworkStatus;
|
|
540
|
+
check?(): Promise<void>;
|
|
541
|
+
}
|
|
522
542
|
export interface SliccModel {
|
|
523
543
|
agent: AgentPort;
|
|
524
544
|
files: FilePort;
|
|
@@ -530,4 +550,5 @@ export interface SliccModel {
|
|
|
530
550
|
sprinkles: SprinklePort;
|
|
531
551
|
tray: TrayPort;
|
|
532
552
|
updates?: UpdatesPort;
|
|
553
|
+
network?: NetworkPort;
|
|
533
554
|
}
|
package/dist/types/ui.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { SliccChat } from './app/chat.js';
|
|
|
7
7
|
import { SliccComposer } from './app/composer.js';
|
|
8
8
|
import { SliccConfirm, SliccPrompt } from './app/confirm.js';
|
|
9
9
|
import { SliccFiles, SliccFileView } from './app/files.js';
|
|
10
|
+
import { SliccNetwork } from './app/network.js';
|
|
10
11
|
import { SliccUpdates } from './app/updates.js';
|
|
11
12
|
import { SliccCodeView, SliccDiffView } from './components/code-view.js';
|
|
12
13
|
import { SliccDock } from './components/dock.js';
|
|
@@ -25,5 +26,5 @@ export type { GitStatusEntry } from './components/file-tree.js';
|
|
|
25
26
|
export type { Listener, Subscribable } from './model/emitter.js';
|
|
26
27
|
export { Emitter } from './model/emitter.js';
|
|
27
28
|
export type * from './model/types.js';
|
|
28
|
-
export { SliccAgents, SliccApp, SliccBrowser, SliccChanges, SliccChat, SliccCodeView, SliccComposer, SliccConfirm, SliccDiffPanel, SliccDiffView, SliccDock, SliccFiles, SliccFileTree, SliccFileView, SliccPrompt, SliccUpdates, };
|
|
29
|
+
export { SliccAgents, SliccApp, SliccBrowser, SliccChanges, SliccChat, SliccCodeView, SliccComposer, SliccConfirm, SliccDiffPanel, SliccDiffView, SliccDock, SliccFiles, SliccFileTree, SliccFileView, SliccNetwork, SliccPrompt, SliccUpdates, };
|
|
29
30
|
export declare function define(): void;
|
package/package.json
CHANGED