@ai-ecoverse/slicc-spectrum 1.86.7 → 1.88.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 +22 -5
- package/dist/{chunk-X4C3AZJT.js → chunk-VRFAMBWK.js} +12 -2
- package/dist/chunk-VRFAMBWK.js.map +7 -0
- package/dist/slicc-dummy.js +321 -54
- package/dist/slicc-dummy.js.map +4 -4
- package/dist/slicc-kernel-model.js +1 -1
- package/dist/slicc-ui.js +26751 -25918
- package/dist/slicc-ui.js.map +4 -4
- package/dist/types/app/chat.d.ts +1 -0
- package/dist/types/app/freezer-import.d.ts +67 -0
- package/dist/types/app/freezer.d.ts +13 -0
- package/dist/types/app/messages.d.ts +12 -1
- package/dist/types/app/network.d.ts +23 -2
- package/dist/types/app/settings.d.ts +1 -0
- package/dist/types/dummy/agent.d.ts +7 -0
- package/dist/types/dummy/import.d.ts +21 -0
- package/dist/types/dummy/index.d.ts +4 -1
- package/dist/types/dummy/network.d.ts +9 -1
- package/dist/types/dummy/settings.d.ts +6 -1
- package/dist/types/dummy.d.ts +3 -1
- package/dist/types/model/types.d.ts +54 -2
- package/dist/types/ui.d.ts +3 -1
- package/package.json +2 -2
- package/dist/chunk-X4C3AZJT.js.map +0 -7
package/dist/types/app/chat.d.ts
CHANGED
|
@@ -0,0 +1,67 @@
|
|
|
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/progress-bar/swc-progress-bar.js';
|
|
4
|
+
import '@adobe/spectrum-wc/components/progress-circle/swc-progress-circle.js';
|
|
5
|
+
import '@adobe/spectrum-wc-icons/swc-icon-alert-diamond.js';
|
|
6
|
+
import '@adobe/spectrum-wc-icons/swc-icon-alert-triangle.js';
|
|
7
|
+
import '@adobe/spectrum-wc-icons/swc-icon-checkmark-circle.js';
|
|
8
|
+
import '@adobe/spectrum-wc-icons/swc-icon-copy.js';
|
|
9
|
+
import '@adobe/spectrum-wc-icons/swc-icon-info-circle.js';
|
|
10
|
+
import '@spectrum-web-components/alert-dialog/sp-alert-dialog.js';
|
|
11
|
+
import { LitElement, type TemplateResult } from 'lit';
|
|
12
|
+
import type { Account, AgentPort, ProfileImportPreview, ProfileImportProgress, ProfileImportResult } from '../model/types.js';
|
|
13
|
+
export type ImportStage = 'checking' | 'preview' | 'importing' | 'done' | 'failed';
|
|
14
|
+
export type ImportOutcome = ProfileImportResult | 'retry' | null;
|
|
15
|
+
export declare const flaggedShown = 3;
|
|
16
|
+
export declare const unreadable = "Couldn\u2019t read this export. Try another zip.";
|
|
17
|
+
export declare function providerNames(ids: readonly string[], accounts: readonly Account[]): string;
|
|
18
|
+
export declare function flaggedLead(paths: readonly string[]): string;
|
|
19
|
+
export declare function summary(preview: ProfileImportPreview): Array<readonly [string, string]>;
|
|
20
|
+
export declare class SliccFreezerImport extends LitElement {
|
|
21
|
+
#private;
|
|
22
|
+
static properties: {
|
|
23
|
+
stage: {
|
|
24
|
+
reflect: boolean;
|
|
25
|
+
};
|
|
26
|
+
preview: {
|
|
27
|
+
attribute: boolean;
|
|
28
|
+
};
|
|
29
|
+
outcome: {
|
|
30
|
+
attribute: boolean;
|
|
31
|
+
};
|
|
32
|
+
progress: {
|
|
33
|
+
attribute: boolean;
|
|
34
|
+
};
|
|
35
|
+
error: {};
|
|
36
|
+
announce: {};
|
|
37
|
+
copied: {};
|
|
38
|
+
};
|
|
39
|
+
stage: ImportStage;
|
|
40
|
+
preview: ProfileImportPreview | null;
|
|
41
|
+
outcome: ProfileImportResult | null;
|
|
42
|
+
progress: ProfileImportProgress | null;
|
|
43
|
+
error: string;
|
|
44
|
+
announce: string;
|
|
45
|
+
copied: '' | 'done' | 'failed';
|
|
46
|
+
agent: AgentPort | null;
|
|
47
|
+
accounts: readonly Account[];
|
|
48
|
+
file: Blob | null;
|
|
49
|
+
trigger: HTMLElement | null;
|
|
50
|
+
allowed: () => boolean;
|
|
51
|
+
constructor();
|
|
52
|
+
static styles: import("lit").CSSResult[];
|
|
53
|
+
get result(): Promise<ImportOutcome>;
|
|
54
|
+
protected firstUpdated(): void;
|
|
55
|
+
disconnectedCallback(): void;
|
|
56
|
+
confirm(): Promise<void>;
|
|
57
|
+
copy(text: string): Promise<void>;
|
|
58
|
+
render(): TemplateResult;
|
|
59
|
+
}
|
|
60
|
+
export interface ImportDialogOptions {
|
|
61
|
+
agent: AgentPort;
|
|
62
|
+
accounts: readonly Account[];
|
|
63
|
+
file: Blob;
|
|
64
|
+
trigger?: HTMLElement | null;
|
|
65
|
+
allowed?: () => boolean;
|
|
66
|
+
}
|
|
67
|
+
export declare function importProfile(options: ImportDialogOptions): Promise<ImportOutcome>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '@adobe/spectrum-wc/components/action-button/swc-action-button.js';
|
|
2
2
|
import '@adobe/spectrum-wc/components/badge/swc-badge.js';
|
|
3
|
+
import '@adobe/spectrum-wc/components/dropzone/swc-dropzone.js';
|
|
3
4
|
import '@adobe/spectrum-wc/components/status-light/swc-status-light.js';
|
|
4
5
|
import { type TemplateResult } from 'lit';
|
|
5
6
|
import type { Agent, FrozenCone, FrozenKind, SliccModel } from '../model/types.js';
|
|
@@ -7,11 +8,23 @@ import { ModelElement } from './base.js';
|
|
|
7
8
|
export declare function ago(at: number, now?: number): string;
|
|
8
9
|
export declare function deleteCone(model: SliccModel, agent: Agent, trigger?: HTMLElement | null): Promise<boolean>;
|
|
9
10
|
export declare const frozenKinds: Record<FrozenKind, readonly ['indigo' | 'seafoam' | 'purple', string]>;
|
|
11
|
+
export declare function isZip(file: File): boolean;
|
|
10
12
|
export declare function freezerOrder(rows: readonly FrozenCone[]): FrozenCone[];
|
|
11
13
|
export declare class SliccFreezer extends ModelElement {
|
|
12
14
|
#private;
|
|
15
|
+
static properties: {
|
|
16
|
+
model: {
|
|
17
|
+
attribute: boolean;
|
|
18
|
+
};
|
|
19
|
+
dropping: {
|
|
20
|
+
state: boolean;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
dropping: boolean;
|
|
24
|
+
constructor();
|
|
13
25
|
static styles: import("lit").CSSResult[];
|
|
14
26
|
protected subscribe(model: SliccModel): Array<() => void>;
|
|
15
27
|
focus(): void;
|
|
28
|
+
get importable(): boolean;
|
|
16
29
|
render(): TemplateResult;
|
|
17
30
|
}
|
|
@@ -29,6 +29,7 @@ import '@adobe/spectrum-wc-icons/swc-icon-search.js';
|
|
|
29
29
|
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
|
+
import '@spectrum-web-components/help-text/sp-help-text.js';
|
|
32
33
|
import { nothing, type TemplateResult } from 'lit';
|
|
33
34
|
import type { AssistantMessage, ErrorAction, LickChannel, LickMessage, LickState, Message, MessagePart, Question, Seat, SliccModel, SystemMessage, ToolCall, ToolMessage, ToolStatus, UserMessage } from '../model/types.js';
|
|
34
35
|
import type { ViewSet } from './view-state.js';
|
|
@@ -38,7 +39,9 @@ export interface Handlers {
|
|
|
38
39
|
readOnly: boolean;
|
|
39
40
|
answer(questionId: string, answer: string): void;
|
|
40
41
|
resolve(messageId: string, state: Exclude<LickState, 'pending'>): void;
|
|
41
|
-
action(action: ErrorAction, messageId?: string): void;
|
|
42
|
+
action(action: ErrorAction, messageId?: string, account?: string): void;
|
|
43
|
+
login?(account: string, messageId: string): Login | undefined;
|
|
44
|
+
cancelLogin?(account: string, messageId: string): void;
|
|
42
45
|
dropping(messageId: string): number;
|
|
43
46
|
open(path: string): void;
|
|
44
47
|
show(surfaceId: string): void;
|
|
@@ -48,6 +51,14 @@ export interface Handlers {
|
|
|
48
51
|
seat?: string;
|
|
49
52
|
licks?: ViewSet;
|
|
50
53
|
}
|
|
54
|
+
export interface Login {
|
|
55
|
+
state: 'idle' | 'signing-in' | 'connected';
|
|
56
|
+
error?: string;
|
|
57
|
+
cancel?: boolean;
|
|
58
|
+
window?: boolean;
|
|
59
|
+
waited?: boolean;
|
|
60
|
+
provider?: string;
|
|
61
|
+
}
|
|
51
62
|
export interface Owner {
|
|
52
63
|
id?: string;
|
|
53
64
|
at: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '@adobe/spectrum-wc/components/action-button/swc-action-button.js';
|
|
2
2
|
import '@adobe/spectrum-wc/components/badge/swc-badge.js';
|
|
3
3
|
import '@adobe/spectrum-wc/components/button/swc-button.js';
|
|
4
|
+
import '@adobe/spectrum-wc/components/progress-circle/swc-progress-circle.js';
|
|
4
5
|
import '@adobe/spectrum-wc/components/status-light/swc-status-light.js';
|
|
5
6
|
import '@adobe/spectrum-wc/components/tooltip/swc-tooltip.js';
|
|
6
7
|
import '@adobe/spectrum-wc-icons/swc-icon-alert-triangle.js';
|
|
@@ -12,8 +13,11 @@ import '@adobe/spectrum-wc-icons/swc-icon-copy.js';
|
|
|
12
13
|
import '@adobe/spectrum-wc-icons/swc-icon-info-circle.js';
|
|
13
14
|
import '@adobe/spectrum-wc-icons/swc-icon-visibility.js';
|
|
14
15
|
import '@adobe/spectrum-wc-icons/swc-icon-visibility-off.js';
|
|
15
|
-
import
|
|
16
|
-
import
|
|
16
|
+
import '@spectrum-web-components/field-label/sp-field-label.js';
|
|
17
|
+
import '@spectrum-web-components/help-text/sp-help-text.js';
|
|
18
|
+
import '@spectrum-web-components/textfield/sp-textfield.js';
|
|
19
|
+
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
20
|
+
import type { AccessKey, BrowserAutomation, DeviceAccess, GuestSeat, Leader, LeaderState, LinkedDevice, LinkPairing, LinkState, NetworkExit, NetworkLinks, NetworkPort, NetworkRoute, NetworkStatus, RemoteControlMode, SliccModel, TailnetState, TailnetStatus } from '../model/types.js';
|
|
17
21
|
import { ModelElement } from './base.js';
|
|
18
22
|
import { type ConfirmOptions } from './confirm.js';
|
|
19
23
|
export { command } from './reach.js';
|
|
@@ -45,6 +49,9 @@ export declare const leaderStates: Record<LeaderState, readonly ['neutral' | 'in
|
|
|
45
49
|
export declare function leaderConfirm(leader: Leader): ConfirmOptions;
|
|
46
50
|
export declare function guestConfirm(seat: GuestSeat): ConfirmOptions;
|
|
47
51
|
export declare function remoteLight(status: NetworkStatus | undefined): RemoteLight | null;
|
|
52
|
+
export declare function pairingLine(pairing: LinkPairing): string;
|
|
53
|
+
export declare function pairingError(pairing: LinkPairing): string;
|
|
54
|
+
export declare function hasTray(links: NetworkLinks): boolean;
|
|
48
55
|
export type LinksSummary = 'permission' | 'none' | 'reconnecting' | 'connecting' | 'offline' | 'linked';
|
|
49
56
|
export declare function linksSummary(links: NetworkLinks): LinksSummary;
|
|
50
57
|
export declare function linksLight(links: NetworkLinks): readonly ['neutral' | 'info' | 'positive' | 'notice', string];
|
|
@@ -104,6 +111,15 @@ export declare class SliccNetwork extends ModelElement {
|
|
|
104
111
|
guestsOff: {
|
|
105
112
|
state: boolean;
|
|
106
113
|
};
|
|
114
|
+
pairBusy: {
|
|
115
|
+
state: boolean;
|
|
116
|
+
};
|
|
117
|
+
pairError: {
|
|
118
|
+
state: boolean;
|
|
119
|
+
};
|
|
120
|
+
pairFilled: {
|
|
121
|
+
state: boolean;
|
|
122
|
+
};
|
|
107
123
|
};
|
|
108
124
|
checking: boolean;
|
|
109
125
|
copied: string | null;
|
|
@@ -118,11 +134,16 @@ export declare class SliccNetwork extends ModelElement {
|
|
|
118
134
|
leaderError: string;
|
|
119
135
|
guestError: string;
|
|
120
136
|
guestsOff: string | null;
|
|
137
|
+
pairBusy: string;
|
|
138
|
+
pairError: string;
|
|
139
|
+
pairFilled: boolean;
|
|
121
140
|
constructor();
|
|
122
141
|
static styles: import("lit").CSSResult[];
|
|
123
142
|
protected subscribe(model: SliccModel): Array<() => void>;
|
|
124
143
|
reveal(section: string): void;
|
|
125
144
|
focus(): void;
|
|
145
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
146
|
+
protected updated(): void;
|
|
126
147
|
check(): Promise<void>;
|
|
127
148
|
copy(text?: string): Promise<void>;
|
|
128
149
|
render(): TemplateResult;
|
|
@@ -42,6 +42,7 @@ export declare class SliccSettings extends ThemedElement {
|
|
|
42
42
|
static styles: import("lit").CSSResult[];
|
|
43
43
|
protected subscribe(model: SliccModel): Array<() => void>;
|
|
44
44
|
focus(): void;
|
|
45
|
+
reveal(section: string): void;
|
|
45
46
|
connect(id: string, secret?: string, fields?: Record<string, string>): Promise<void>;
|
|
46
47
|
keep(account: Account, value: string, fields?: Record<string, string>): Promise<void>;
|
|
47
48
|
get busyReason(): string | null;
|
|
@@ -4,10 +4,17 @@ 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
|
+
importProfile?: AgentPort['importProfile'];
|
|
8
|
+
importCancel?: AgentPort['importCancel'];
|
|
9
|
+
importing?: AgentPort['importing'];
|
|
7
10
|
constructor(agents: readonly Agent[], conversations: Record<string, readonly Message[]>, effects: Omit<Effects, 'agentId'>, clock: Clock, queues?: Record<string, readonly UserMessage[]>, frozen?: ReadonlyArray<{
|
|
8
11
|
cone: FrozenCone;
|
|
9
12
|
messages: readonly Message[];
|
|
10
13
|
}>);
|
|
14
|
+
addFrozen(rows: ReadonlyArray<{
|
|
15
|
+
cone: FrozenCone;
|
|
16
|
+
messages: readonly Message[];
|
|
17
|
+
}>): void;
|
|
11
18
|
list(): readonly Agent[];
|
|
12
19
|
active(): string;
|
|
13
20
|
select(id: string): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { FrozenCone, ProfileImportOptions, ProfileImportPreview, ProfileImportProgress, ProfileImportResult } from '../model/types.js';
|
|
2
|
+
import type { DummyAgent } from './agent.js';
|
|
3
|
+
import type { Clock } from './clock.js';
|
|
4
|
+
export type ImportScenario = 'v6' | 'again' | 'fail' | 'cancel-check';
|
|
5
|
+
export declare const importNotV6 = "That zip isn\u2019t a SLICC 6 profile export.";
|
|
6
|
+
export declare const importCancelled = "The import was cancelled.";
|
|
7
|
+
export declare const importReport = "/root/v6-import-2026-10-18.md";
|
|
8
|
+
export declare const importTotal = 14;
|
|
9
|
+
export declare const importBefore: number;
|
|
10
|
+
export declare function importPreview(already: number | null): ProfileImportPreview;
|
|
11
|
+
export declare const importCones: ReadonlyArray<Omit<FrozenCone, 'frozenAt'> & {
|
|
12
|
+
age: number;
|
|
13
|
+
}>;
|
|
14
|
+
export declare class DummyImport {
|
|
15
|
+
#private;
|
|
16
|
+
readonly scenario: ImportScenario;
|
|
17
|
+
constructor(scenario: ImportScenario, agent: DummyAgent, clock: Clock);
|
|
18
|
+
importing(): ProfileImportProgress;
|
|
19
|
+
importCancel(): void;
|
|
20
|
+
importProfile(_file: Blob, options: ProfileImportOptions): Promise<ProfileImportResult>;
|
|
21
|
+
}
|
|
@@ -5,6 +5,7 @@ import { type ChangesScenario } from './changes.js';
|
|
|
5
5
|
import { type MountScenario } from './files.js';
|
|
6
6
|
import { DummyFollow, type FollowScenario } from './follow.js';
|
|
7
7
|
import { DummyGuests, type GuestsScenario } from './guests.js';
|
|
8
|
+
import { type ImportScenario } from './import.js';
|
|
8
9
|
import { DummyNetwork, type LeadersScenario, type LinksScenario, type NetworkScenario, type TailnetScenario } from './network.js';
|
|
9
10
|
import { DummyNotices, type NoticeScenario } from './notices.js';
|
|
10
11
|
import { DummyTabs, type TabsScenario } from './tabs.js';
|
|
@@ -35,6 +36,8 @@ export interface DummyOptions {
|
|
|
35
36
|
browser?: BrowserScenario;
|
|
36
37
|
sprinkles?: 'builtin' | 'cones';
|
|
37
38
|
monitor?: 'dummy' | 'agent';
|
|
39
|
+
import?: ImportScenario | 'off';
|
|
40
|
+
login?: 'ok' | 'fail';
|
|
38
41
|
}
|
|
39
42
|
export interface DummyModel extends SliccModel {
|
|
40
43
|
browser: DummyBrowser;
|
|
@@ -48,4 +51,4 @@ export interface DummyModel extends SliccModel {
|
|
|
48
51
|
guests?: DummyGuests;
|
|
49
52
|
}
|
|
50
53
|
export declare function vaultAccounts(accounts: readonly Account[]): Account[];
|
|
51
|
-
export declare function createDummyModel({ delay, storage, updates, packages, confirm, mounts, network, tailnet, links, leaders, changes, notices, tabs, approvals, follow, vault, guests, accounts, providers, hold, readonly, browser: scenario, sprinkles, monitor, }?: DummyOptions): DummyModel;
|
|
54
|
+
export declare function createDummyModel({ delay, storage, updates, packages, confirm, mounts, network, tailnet, links, leaders, changes, notices, tabs, approvals, follow, vault, guests, accounts, providers, hold, readonly, browser: scenario, sprinkles, monitor, import: imports, login, }?: DummyOptions): DummyModel;
|
|
@@ -4,7 +4,7 @@ import type { Clock } from './clock.js';
|
|
|
4
4
|
import type { DummyFiles } from './files.js';
|
|
5
5
|
export type NetworkScenario = 'ok' | 'limited' | 'failing';
|
|
6
6
|
export type TailnetScenario = 'off' | 'needs-login' | 'running' | 'failed';
|
|
7
|
-
export type LinksScenario = 'none' | 'preparing' | 'linked' | 'reconnecting' | 'exit' | 'prompt' | 'denied' | 'remote' | 'followers';
|
|
7
|
+
export type LinksScenario = 'none' | 'preparing' | 'linked' | 'reconnecting' | 'exit' | 'prompt' | 'denied' | 'remote' | 'followers' | 'pairing' | 'pairing-notray' | 'forgotten';
|
|
8
8
|
export type LeadersScenario = 'connected' | 'failed' | 'unlinked' | 'disconnected' | 'two';
|
|
9
9
|
export declare function leadersFixtures(scenario: LeadersScenario): Leader[];
|
|
10
10
|
export declare function networkFixtures(scenario: NetworkScenario, now?: number): NetworkStatus;
|
|
@@ -12,6 +12,11 @@ export declare function tailnetFixtures(scenario: TailnetScenario): TailnetStatu
|
|
|
12
12
|
export declare function folderFiles(folder: LinkedFolder): Record<string, string>;
|
|
13
13
|
export declare function joinUrl(rotation?: number): string;
|
|
14
14
|
export declare function followUrl(rotation?: number): string;
|
|
15
|
+
export declare const pairingCode = "ab12\u2026ef";
|
|
16
|
+
export declare const pairingRefused = "That isn\u2019t a pairing link from slicc pair.";
|
|
17
|
+
export declare const pairingStopped = "slicc on this computer stopped answering. Run slicc pair again.";
|
|
18
|
+
export declare const pairedDevice: LinkedDevice;
|
|
19
|
+
export declare const forgottenDevice: LinkedDevice;
|
|
15
20
|
export declare function grant(device: LinkedDevice, key: AccessKey, allowed: boolean): LinkedDevice;
|
|
16
21
|
export declare function linksFixtures(scenario: LinksScenario, rotation?: number): {
|
|
17
22
|
links: NetworkLinks;
|
|
@@ -34,6 +39,9 @@ export declare class DummyNetwork extends Emitter<{
|
|
|
34
39
|
disconnectLeader?: (id: string) => Promise<void>;
|
|
35
40
|
reconnectLeader?: (id: string) => Promise<void>;
|
|
36
41
|
forgetLeader?: (id: string) => Promise<void>;
|
|
42
|
+
pairComputer?: (url: string) => Promise<void>;
|
|
43
|
+
confirmPairing?: () => Promise<void>;
|
|
44
|
+
cancelPairing?: () => Promise<void>;
|
|
37
45
|
constructor(scenario: NetworkScenario, clock: Clock, tailnet?: TailnetScenario, links?: LinksScenario, files?: DummyFiles, leaders?: LeadersScenario);
|
|
38
46
|
setLinks(scenario: LinksScenario): void;
|
|
39
47
|
status(): NetworkStatus;
|
|
@@ -2,9 +2,14 @@ import { Emitter } from '../model/emitter.js';
|
|
|
2
2
|
import type { Account, ModelOption, Settings, SettingsEvents, SettingsPort } from '../model/types.js';
|
|
3
3
|
import type { Clock } from './clock.js';
|
|
4
4
|
export declare const dummySettingsKey = "slicc-ui.settings";
|
|
5
|
+
export declare const signInClosed = "The sign-in window was closed before it finished.";
|
|
5
6
|
export declare class DummySettings extends Emitter<SettingsEvents> implements SettingsPort {
|
|
6
7
|
#private;
|
|
7
|
-
|
|
8
|
+
readonly connects: Array<{
|
|
9
|
+
id: string;
|
|
10
|
+
gesture: boolean | null;
|
|
11
|
+
}>;
|
|
12
|
+
constructor(defaults: Settings, models: readonly ModelOption[], accounts: readonly Account[], storage: Storage | null, clock: Clock, keys?: readonly string[], gated?: boolean, login?: 'ok' | 'fail');
|
|
8
13
|
get(): Settings;
|
|
9
14
|
update(patch: Partial<Settings>): void;
|
|
10
15
|
models(): readonly ModelOption[];
|
package/dist/types/dummy.d.ts
CHANGED
|
@@ -11,10 +11,12 @@ export type { GuestModel, GuestOptions, SeatScenario } from './dummy/guest.js';
|
|
|
11
11
|
export { createGuestModel, DummyGuestAgent, forecastSprinkle, guestApproved, guestDeclined, guestLabel, guestOnly, guestReview, guestSeat, guestTranscript, otherGuest, } from './dummy/guest.js';
|
|
12
12
|
export type { GuestsScenario } from './dummy/guests.js';
|
|
13
13
|
export { DummyGuests, guestsFixtures, guestsPolicy, guestsRefused, guestsUnavailable, } from './dummy/guests.js';
|
|
14
|
+
export type { ImportScenario } from './dummy/import.js';
|
|
15
|
+
export { DummyImport, importBefore, importCancelled, importCones, importNotV6, importPreview, importReport, importTotal, } from './dummy/import.js';
|
|
14
16
|
export type { DummyModel, DummyOptions } from './dummy/index.js';
|
|
15
17
|
export { createDummyModel } from './dummy/index.js';
|
|
16
18
|
export type { LeadersScenario, NetworkScenario, TailnetScenario } from './dummy/network.js';
|
|
17
|
-
export { DummyNetwork, joinUrl, leadersFixtures, linksFixtures, networkFixtures, tailnetFixtures, } from './dummy/network.js';
|
|
19
|
+
export { DummyNetwork, forgottenDevice, joinUrl, leadersFixtures, linksFixtures, networkFixtures, pairedDevice, pairingCode, pairingRefused, pairingStopped, tailnetFixtures, } from './dummy/network.js';
|
|
18
20
|
export type { NoticeScenario } from './dummy/notices.js';
|
|
19
21
|
export { DummyNotices, noticeFixtures } from './dummy/notices.js';
|
|
20
22
|
export type { TabsScenario } from './dummy/tabs.js';
|
|
@@ -146,6 +146,7 @@ export type MessagePart = {
|
|
|
146
146
|
message: string;
|
|
147
147
|
detail?: string;
|
|
148
148
|
action?: ErrorAction;
|
|
149
|
+
account?: string;
|
|
149
150
|
};
|
|
150
151
|
export type SendMode = 'send' | 'steer' | 'queue';
|
|
151
152
|
export type DeliveredAs = 'run' | 'steer' | 'follow-up';
|
|
@@ -192,6 +193,7 @@ export interface SystemMessage {
|
|
|
192
193
|
trigger?: 'threshold' | 'overflow' | 'idle' | 'manual';
|
|
193
194
|
state?: CompactionState;
|
|
194
195
|
action?: ErrorAction;
|
|
196
|
+
account?: string;
|
|
195
197
|
}
|
|
196
198
|
export interface ToolMessage {
|
|
197
199
|
id: string;
|
|
@@ -235,6 +237,40 @@ export interface AgentEvents {
|
|
|
235
237
|
frozen: readonly FrozenCone[];
|
|
236
238
|
hold: AgentHold | null;
|
|
237
239
|
readOnly: string | null;
|
|
240
|
+
importing: ProfileImportProgress;
|
|
241
|
+
}
|
|
242
|
+
export interface ProfileImportPreview {
|
|
243
|
+
origin: string;
|
|
244
|
+
createdAt: number;
|
|
245
|
+
cones: number;
|
|
246
|
+
scoops: number;
|
|
247
|
+
frozen: number;
|
|
248
|
+
bytes: number;
|
|
249
|
+
skills: string[];
|
|
250
|
+
crons: number;
|
|
251
|
+
webhooks: number;
|
|
252
|
+
flagged: string[];
|
|
253
|
+
providers: string[];
|
|
254
|
+
mounts: string[];
|
|
255
|
+
already: number | null;
|
|
256
|
+
text: string;
|
|
257
|
+
}
|
|
258
|
+
export interface ProfileImportResult {
|
|
259
|
+
preview: ProfileImportPreview | null;
|
|
260
|
+
cones: string[];
|
|
261
|
+
report: string | null;
|
|
262
|
+
text: string;
|
|
263
|
+
}
|
|
264
|
+
export type ProfileImportPhase = 'idle' | 'checking' | 'writing' | 'done' | 'failed';
|
|
265
|
+
export interface ProfileImportProgress {
|
|
266
|
+
phase: ProfileImportPhase;
|
|
267
|
+
done: number;
|
|
268
|
+
total: number;
|
|
269
|
+
text: string;
|
|
270
|
+
}
|
|
271
|
+
export interface ProfileImportOptions {
|
|
272
|
+
preview: boolean;
|
|
273
|
+
again?: boolean;
|
|
238
274
|
}
|
|
239
275
|
export interface AgentPort extends Subscribable<AgentEvents> {
|
|
240
276
|
list(): readonly Agent[];
|
|
@@ -262,6 +298,9 @@ export interface AgentPort extends Subscribable<AgentEvents> {
|
|
|
262
298
|
freeze?(agentId: string): void;
|
|
263
299
|
thaw(id: string): Agent | null;
|
|
264
300
|
discard(id: string): void;
|
|
301
|
+
importProfile?(file: Blob, options: ProfileImportOptions): Promise<ProfileImportResult>;
|
|
302
|
+
importCancel?(): void;
|
|
303
|
+
importing?(): ProfileImportProgress;
|
|
265
304
|
rewind?(agentId: string, messageId: string): Promise<Outgoing | null>;
|
|
266
305
|
drop?(agentId: string): Promise<void>;
|
|
267
306
|
createCone?(name: string): Promise<Agent>;
|
|
@@ -284,6 +323,7 @@ export interface FrozenCone {
|
|
|
284
323
|
kind?: FrozenKind;
|
|
285
324
|
live?: boolean;
|
|
286
325
|
thawedAs?: string;
|
|
326
|
+
v6?: boolean;
|
|
287
327
|
}
|
|
288
328
|
export type FileKind = 'file' | 'directory';
|
|
289
329
|
export interface FileEntry {
|
|
@@ -708,6 +748,7 @@ export interface LinkedDevice {
|
|
|
708
748
|
asking?: boolean;
|
|
709
749
|
terminals?: number;
|
|
710
750
|
folders?: readonly LinkedFolder[];
|
|
751
|
+
note?: string;
|
|
711
752
|
}
|
|
712
753
|
export interface LinkedFolder {
|
|
713
754
|
name: string;
|
|
@@ -715,12 +756,20 @@ export interface LinkedFolder {
|
|
|
715
756
|
readonly: boolean;
|
|
716
757
|
mounted?: string;
|
|
717
758
|
}
|
|
759
|
+
export type PairingState = 'idle' | 'confirm' | 'linking' | 'linked' | 'failed';
|
|
760
|
+
export interface LinkPairing {
|
|
761
|
+
state: PairingState;
|
|
762
|
+
code?: string;
|
|
763
|
+
name?: string;
|
|
764
|
+
error?: string;
|
|
765
|
+
}
|
|
718
766
|
export interface NetworkLinks {
|
|
719
|
-
joinUrl
|
|
720
|
-
joinCommand
|
|
767
|
+
joinUrl?: string | null;
|
|
768
|
+
joinCommand?: string | null;
|
|
721
769
|
followUrl?: string | null;
|
|
722
770
|
devices: readonly LinkedDevice[];
|
|
723
771
|
permission?: 'prompt' | 'denied' | null;
|
|
772
|
+
pairing?: LinkPairing;
|
|
724
773
|
}
|
|
725
774
|
export type NetworkExit = null | {
|
|
726
775
|
kind: 'tailnet';
|
|
@@ -770,6 +819,9 @@ export interface NetworkPort extends Subscribable<{
|
|
|
770
819
|
disconnectLeader?(id: string): Promise<void>;
|
|
771
820
|
reconnectLeader?(id: string): Promise<void>;
|
|
772
821
|
forgetLeader?(id: string): Promise<void>;
|
|
822
|
+
pairComputer?(url: string): Promise<void>;
|
|
823
|
+
confirmPairing?(): Promise<void>;
|
|
824
|
+
cancelPairing?(): Promise<void>;
|
|
773
825
|
}
|
|
774
826
|
export interface NoticeAction {
|
|
775
827
|
id: string;
|
package/dist/types/ui.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { SliccComposer } from './app/composer.js';
|
|
|
9
9
|
import { SliccConfirm, SliccPrompt } from './app/confirm.js';
|
|
10
10
|
import { SliccFiles, SliccFileView } from './app/files.js';
|
|
11
11
|
import { SliccFollow } from './app/follow.js';
|
|
12
|
+
import { SliccFreezerImport } from './app/freezer-import.js';
|
|
12
13
|
import { SliccGuestInvite } from './app/guests.js';
|
|
13
14
|
import { SliccNetwork } from './app/network.js';
|
|
14
15
|
import { SliccNotices } from './app/notices.js';
|
|
@@ -25,6 +26,7 @@ export type { Color } from './app/base.js';
|
|
|
25
26
|
export { resolveColor } from './app/base.js';
|
|
26
27
|
export type { ConfirmOptions, ConfirmVariant, PromptOptions } from './app/confirm.js';
|
|
27
28
|
export { confirm, prompt } from './app/confirm.js';
|
|
29
|
+
export type { ImportOutcome, ImportStage } from './app/freezer-import.js';
|
|
28
30
|
export type { GrammarKind } from './app/grammars.js';
|
|
29
31
|
export { grammarBase, setGrammarBase } from './app/grammars.js';
|
|
30
32
|
export type { PanelCaller, PanelInfo, PanelKind, PanelOpenOptions, PanelOutput, PanelPlace, PanelResult, PanelsHost, } from './app/panel-command.js';
|
|
@@ -38,5 +40,5 @@ export type { Listener, Subscribable } from './model/emitter.js';
|
|
|
38
40
|
export { Emitter } from './model/emitter.js';
|
|
39
41
|
export type * from './model/types.js';
|
|
40
42
|
export { isVaultFailure } from './model/values.js';
|
|
41
|
-
export { SliccAgents, SliccApp, SliccApprovals, SliccBrowser, SliccChanges, SliccChat, SliccCodeView, SliccComposer, SliccConfirm, SliccDiffPanel, SliccDiffView, SliccDock, SliccFiles, SliccFileTree, SliccFileView, SliccFollow, SliccGuestInvite, SliccNetwork, SliccNotices, SliccPrompt, SliccSecrets, SliccUpdates, SliccValueRequest, SliccVaultButton, };
|
|
43
|
+
export { SliccAgents, SliccApp, SliccApprovals, SliccBrowser, SliccChanges, SliccChat, SliccCodeView, SliccComposer, SliccConfirm, SliccDiffPanel, SliccDiffView, SliccDock, SliccFiles, SliccFileTree, SliccFileView, SliccFollow, SliccFreezerImport, SliccGuestInvite, SliccNetwork, SliccNotices, SliccPrompt, SliccSecrets, SliccUpdates, SliccValueRequest, SliccVaultButton, };
|
|
42
44
|
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.88.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",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@adobe/spectrum-wc": "2.0.0-beta.5",
|
|
75
75
|
"@adobe/spectrum-wc-icons": "2.0.0-beta.5",
|
|
76
|
-
"@ai-ecoverse/slicc-kernel": "1.125.
|
|
76
|
+
"@ai-ecoverse/slicc-kernel": "1.125.11",
|
|
77
77
|
"@ai-ecoverse/slicc-shared-web": "1.24.2",
|
|
78
78
|
"@ai-ecoverse/slicc-vault": "1.9.2",
|
|
79
79
|
"@ai-ecoverse/wasm-bash": "5.3.0-20",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/dummy/clock.ts", "../src/dummy/settings.ts"],
|
|
4
|
-
"sourcesContent": ["export interface Clock {\n delay: number;\n sleep(ticks?: number): Promise<void>;\n}\n\nexport function clock(delay: number): Clock {\n return {\n delay,\n sleep: (ticks = 1) => new Promise((resolve) => setTimeout(resolve, delay * ticks)),\n };\n}\n", "import { Emitter } from '../model/emitter.ts';\nimport type {\n Account,\n AccountStatus,\n ModelOption,\n Settings,\n SettingsEvents,\n SettingsPort,\n} from '../model/types.ts';\nimport type { Clock } from './clock.ts';\n\nexport const dummySettingsKey = 'slicc-ui.settings';\n\nexport class DummySettings extends Emitter<SettingsEvents> implements SettingsPort {\n #settings: Settings;\n #accounts: Account[];\n #models: readonly ModelOption[];\n #storage: Storage | null;\n #clock: Clock;\n #keys: readonly string[];\n #signIns = new Map<string, { before: AccountStatus; stop: () => void }>();\n #gated: boolean;\n\n constructor(\n defaults: Settings,\n models: readonly ModelOption[],\n accounts: readonly Account[],\n storage: Storage | null,\n clock: Clock,\n keys: readonly string[] = [dummySettingsKey],\n gated = false\n ) {\n super();\n this.#gated = gated;\n this.#keys = keys;\n this.#storage = storage;\n this.#clock = clock;\n this.#models = models;\n this.#accounts = accounts.map((account) => ({ ...account }));\n this.#settings = { ...defaults, ...this.#load() };\n }\n\n #load(): Partial<Settings> {\n try {\n const saved = this.#keys\n .map((key) => this.#storage?.getItem(key))\n .find((value) => value != null);\n return JSON.parse(saved ?? '{}');\n } catch {\n return {};\n }\n }\n\n get(): Settings {\n return { ...this.#settings };\n }\n\n update(patch: Partial<Settings>): void {\n this.#settings = { ...this.#settings, ...patch };\n this.#storage?.setItem(this.#keys[0], JSON.stringify(this.#settings));\n this.emit('settings', this.get());\n }\n\n models(): readonly ModelOption[] {\n if (!this.#gated) return this.#models;\n const live = new Set(\n this.#accounts\n .filter((account) => account.status === 'connected')\n .map((account) => account.provider)\n );\n return this.#models.filter((option) => live.has(option.provider));\n }\n\n accounts(): readonly Account[] {\n return this.#accounts.map((account) => ({ ...account }));\n }\n\n #set(id: string, patch: Partial<Account>): void {\n this.#accounts = this.#accounts.map((account) =>\n account.id === id ? { ...account, ...patch } : account\n );\n this.emit('accounts', this.accounts());\n }\n\n async connect(id: string, secret?: string): Promise<void> {\n const account = this.#accounts.find((candidate) => candidate.id === id);\n if (account && account.auth !== 'api-key' && !(await this.#signIn(account))) return;\n if (account?.auth === 'api-key' || !account) await this.#clock.sleep(10);\n if (account?.auth === 'api-key' && account.store !== 'vault' && !secret)\n throw new Error(\n `${account.provider} needs ${account.secret === 'token' ? 'a token' : 'an API key'}`\n );\n const identity =\n account?.group === 'mcp'\n ? account.identity\n : account?.auth === 'api-key'\n ? 'API key'\n : account?.identity || `${id}-user@example.com`;\n this.#set(id, { status: 'connected', identity });\n }\n\n #signIn(account: Account): Promise<boolean> {\n const before = this.#signIns.get(account.id)?.before ?? account.status;\n this.#signIns.get(account.id)?.stop();\n this.#set(account.id, { status: 'signing-in' });\n return new Promise((resolve) => {\n const stop = () => {\n this.#signIns.delete(account.id);\n this.#set(account.id, { status: before });\n resolve(false);\n };\n this.#signIns.set(account.id, { before, stop });\n void this.#clock.sleep(100).then(() => {\n if (this.#signIns.get(account.id)?.stop !== stop) return;\n this.#signIns.delete(account.id);\n resolve(true);\n });\n });\n }\n\n cancel(id: string): void {\n this.#signIns.get(id)?.stop();\n }\n\n disconnect(id: string): void {\n this.#set(id, { status: 'disconnected' });\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;AAKO,SAAS,MAAM,OAAsB;AAC1C,SAAO;AAAA,IACL;AAAA,IACA,OAAO,CAAC,QAAQ,MAAM,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,QAAQ,KAAK,CAAC;AAAA,EACnF;AACF;;;ACCO,IAAM,mBAAmB;AAEzB,IAAM,gBAAN,cAA4B,QAAgD;AAAA,EACjF;AAAA,EACA;AAAA,EACA;AAAA,EAC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