@ai-ecoverse/slicc-spectrum 1.51.0 → 1.53.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.
@@ -48,7 +48,7 @@ export declare class SliccApp extends ThemedElement {
48
48
  protected updated(changed: PropertyValues<this>): void;
49
49
  get storageKey(): string;
50
50
  resetLayout(): void;
51
- show(id: string): void;
51
+ show(id: string, section?: string): void;
52
52
  newTerminal(): void;
53
53
  open(kind: DocumentKind, path: string): void;
54
54
  toggleColor(): void;
@@ -0,0 +1,60 @@
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/popover/swc-popover.js';
4
+ import '@adobe/spectrum-wc/components/progress-circle/swc-progress-circle.js';
5
+ import '@adobe/spectrum-wc/components/status-light/swc-status-light.js';
6
+ import '@adobe/spectrum-wc/components/tooltip/swc-tooltip.js';
7
+ import '@adobe/spectrum-wc-icons/swc-icon-alert-triangle.js';
8
+ import '@adobe/spectrum-wc-icons/swc-icon-user-following.js';
9
+ import { nothing, type TemplateResult } from 'lit';
10
+ import type { FollowState, SliccModel } from '../model/types.js';
11
+ import { ModelElement } from './base.js';
12
+ export type FollowVariant = 'info' | 'positive' | 'notice' | 'negative';
13
+ export interface FollowLight {
14
+ variant: FollowVariant;
15
+ text: string;
16
+ }
17
+ export declare function followLight(state: FollowState): FollowLight;
18
+ export type FollowPageKind = 'connecting' | 'waiting' | 'unlinked' | 'failed';
19
+ export interface FollowPage {
20
+ kind: FollowPageKind;
21
+ title: string;
22
+ body: string;
23
+ }
24
+ export declare function followPage(state: FollowState | undefined): FollowPage | null;
25
+ export declare function followCan(state: FollowState): string;
26
+ export declare function following(model: SliccModel | null | undefined): FollowState | null;
27
+ export declare function watchOnly(model: SliccModel | null | undefined): string;
28
+ export declare function terminalsAllowed(model: SliccModel | null | undefined): boolean;
29
+ export declare class SliccFollow extends ModelElement {
30
+ #private;
31
+ static properties: {
32
+ model: {
33
+ attribute: boolean;
34
+ };
35
+ page: {
36
+ type: BooleanConstructor;
37
+ reflect: boolean;
38
+ };
39
+ compact: {
40
+ type: BooleanConstructor;
41
+ reflect: boolean;
42
+ };
43
+ busy: {
44
+ state: boolean;
45
+ };
46
+ error: {
47
+ state: boolean;
48
+ };
49
+ };
50
+ page: boolean;
51
+ compact: boolean;
52
+ busy: '' | 'leave' | 'retry';
53
+ error: string;
54
+ constructor();
55
+ static styles: import("lit").CSSResult[];
56
+ protected subscribe(model: SliccModel): Array<() => void>;
57
+ leave(): Promise<void>;
58
+ retry(): Promise<void>;
59
+ render(): TemplateResult | typeof nothing;
60
+ }
@@ -10,8 +10,9 @@ import '@adobe/spectrum-wc-icons/swc-icon-cloud-state-slow-connection.js';
10
10
  import '@adobe/spectrum-wc-icons/swc-icon-copy.js';
11
11
  import '@adobe/spectrum-wc-icons/swc-icon-info-circle.js';
12
12
  import { type TemplateResult } from 'lit';
13
- import type { BrowserAutomation, LinkedDevice, LinkState, NetworkExit, NetworkLinks, NetworkRoute, NetworkStatus, RemoteControlMode, SliccModel, TailnetState, TailnetStatus } from '../model/types.js';
13
+ import type { AccessKey, BrowserAutomation, DeviceAccess, LinkedDevice, LinkState, NetworkExit, NetworkLinks, NetworkPort, NetworkRoute, NetworkStatus, RemoteControlMode, SliccModel, TailnetState, TailnetStatus } from '../model/types.js';
14
14
  import { ModelElement } from './base.js';
15
+ import { type ConfirmOptions } from './confirm.js';
15
16
  export { command } from './reach.js';
16
17
  export declare const networkHealth: Record<NetworkStatus['health'], readonly ['positive' | 'notice' | 'negative', string]>;
17
18
  export declare const automation: Record<NonNullable<BrowserAutomation['via']> | 'none', string>;
@@ -22,11 +23,18 @@ export declare function tailnetAddress(addresses: readonly string[]): string | u
22
23
  export declare function exitNodeValue(tailnet: TailnetStatus): string;
23
24
  export declare const linkStates: Record<LinkState, readonly ['neutral' | 'info' | 'positive' | 'notice', string]>;
24
25
  export declare const controlBadges: Record<RemoteControlMode, string>;
26
+ export declare const accessLabels: Record<AccessKey, string>;
27
+ export declare function accessShown(access: DeviceAccess): AccessKey[];
28
+ export declare function terminalsText(count: number): string;
29
+ export declare function accessConfirm(device: LinkedDevice, key: AccessKey | 'follow'): ConfirmOptions;
25
30
  export interface RemoteLight {
26
- mode: RemoteControlMode;
31
+ mode: RemoteControlMode | 'terminal' | 'ask';
32
+ variant: 'info' | 'notice';
27
33
  text: string;
28
34
  tooltip: string;
29
35
  }
36
+ export declare function deviceName(name: string): string;
37
+ export declare function networkStatus(port: NetworkPort): NetworkStatus;
30
38
  export declare function remoteLight(status: NetworkStatus | undefined): RemoteLight | null;
31
39
  export type LinksSummary = 'permission' | 'none' | 'reconnecting' | 'connecting' | 'offline' | 'linked';
32
40
  export declare function linksSummary(links: NetworkLinks): LinksSummary;
@@ -71,6 +79,9 @@ export declare class SliccNetwork extends ModelElement {
71
79
  linksError: {
72
80
  state: boolean;
73
81
  };
82
+ syncError: {
83
+ state: boolean;
84
+ };
74
85
  };
75
86
  checking: boolean;
76
87
  copied: boolean;
@@ -80,9 +91,11 @@ export declare class SliccNetwork extends ModelElement {
80
91
  tailnetError: string;
81
92
  tailnetCopied: string;
82
93
  linksError: string;
94
+ syncError: string;
83
95
  constructor();
84
96
  static styles: import("lit").CSSResult[];
85
97
  protected subscribe(model: SliccModel): Array<() => void>;
98
+ reveal(section: string): void;
86
99
  focus(): void;
87
100
  check(): Promise<void>;
88
101
  copy(): Promise<void>;
@@ -49,7 +49,7 @@ export declare function defaultLayout(dock: SliccDock, screen: ScreenClass, agen
49
49
  id: string;
50
50
  name: string;
51
51
  } | null, items?: readonly Surface[], terminals?: readonly TerminalInfo[]): void;
52
- export declare function closed(dock: SliccDock, items?: readonly Surface[]): Surface[];
52
+ export declare function shown(dock: SliccDock, id: string): boolean;
53
53
  export declare function sprinkleSurface(sprinkle: Sprinkle): Surface;
54
54
  export declare function dropPlacement(panel: string | null, position: string): Placement | null;
55
55
  export declare function openSprinkle(dock: SliccDock, sprinkle: Sprinkle, screen: ScreenClass, place?: Placement | null): string;
@@ -0,0 +1,6 @@
1
+ import { type TemplateResult } from 'lit';
2
+ export declare function qrPath(text: string): {
3
+ size: number;
4
+ path: string;
5
+ };
6
+ export declare function qrCode(text: string, label: string): TemplateResult;
@@ -1,22 +1,23 @@
1
1
  import { type TemplateResult } from 'lit';
2
- import type { SliccModel, TrayConnection } from '../model/types.js';
2
+ import type { SliccModel, TrayConnection, TrayStatus } from '../model/types.js';
3
3
  import { ModelElement } from './base.js';
4
4
  export declare const connectionVariant: Record<TrayConnection, string>;
5
5
  export declare const connectionLabel: Record<TrayConnection, string>;
6
+ export declare function budgetVariant(percent: number): string;
7
+ export declare function budgetLine(status: TrayStatus): string;
6
8
  export declare class SliccTray extends ModelElement {
7
9
  #private;
8
10
  static properties: {
9
11
  model: {
10
12
  attribute: boolean;
11
13
  };
12
- copied: {
13
- state: boolean;
14
+ panels: {
15
+ attribute: boolean;
14
16
  };
15
17
  };
16
- copied: boolean;
18
+ panels: readonly string[];
17
19
  constructor();
18
20
  static styles: import("lit").CSSResult[];
19
21
  protected subscribe(model: SliccModel): Array<() => void>;
20
- copy(): Promise<void>;
21
22
  render(): TemplateResult;
22
23
  }
@@ -0,0 +1,16 @@
1
+ import { Emitter } from '../model/emitter.js';
2
+ import type { FollowPort, FollowState } from '../model/types.js';
3
+ import type { Clock } from './clock.js';
4
+ export type FollowScenario = 'connecting' | 'waiting' | 'watch' | 'control' | 'full' | 'reconnecting' | 'unlinked' | 'failed';
5
+ export declare function followFixtures(scenario: FollowScenario): FollowState;
6
+ export declare class DummyFollow extends Emitter<{
7
+ follow: FollowState;
8
+ }> implements FollowPort {
9
+ #private;
10
+ left: number;
11
+ constructor(scenario: FollowScenario, time: Clock);
12
+ state(): FollowState;
13
+ setScenario(scenario: FollowScenario): void;
14
+ leave(): Promise<void>;
15
+ retry(): Promise<void>;
16
+ }
@@ -3,6 +3,7 @@ import { type ApprovalScenario, DummyApprovals } from './approvals.js';
3
3
  import { type BrowserScenario, DummyBrowser } from './browser.js';
4
4
  import { type ChangesScenario } from './changes.js';
5
5
  import { type MountScenario } from './files.js';
6
+ import { DummyFollow, type FollowScenario } from './follow.js';
6
7
  import { DummyNetwork, type LinksScenario, type NetworkScenario, type TailnetScenario } from './network.js';
7
8
  import { DummyNotices, type NoticeScenario } from './notices.js';
8
9
  import { DummyTabs, type TabsScenario } from './tabs.js';
@@ -21,6 +22,7 @@ export interface DummyOptions {
21
22
  notices?: NoticeScenario | 'off';
22
23
  tabs?: TabsScenario | 'off';
23
24
  approvals?: ApprovalScenario | 'off';
25
+ follow?: FollowScenario | 'off';
24
26
  browser?: BrowserScenario;
25
27
  }
26
28
  export interface DummyModel extends SliccModel {
@@ -30,5 +32,6 @@ export interface DummyModel extends SliccModel {
30
32
  notices?: DummyNotices;
31
33
  tabs?: DummyTabs;
32
34
  approvals?: DummyApprovals;
35
+ follow?: DummyFollow;
33
36
  }
34
- export declare function createDummyModel({ delay, storage, updates, packages, confirm, mounts, network, tailnet, links, changes, notices, tabs, approvals, browser: scenario, }?: DummyOptions): DummyModel;
37
+ export declare function createDummyModel({ delay, storage, updates, packages, confirm, mounts, network, tailnet, links, changes, notices, tabs, approvals, follow, browser: scenario, }?: DummyOptions): DummyModel;
@@ -1,12 +1,14 @@
1
1
  import { Emitter } from '../model/emitter.js';
2
- import type { NetworkExit, NetworkLinks, NetworkPort, NetworkStatus, TailnetStatus } from '../model/types.js';
2
+ import type { AccessKey, LinkedDevice, NetworkExit, NetworkLinks, NetworkPort, NetworkStatus, TailnetStatus } from '../model/types.js';
3
3
  import type { Clock } from './clock.js';
4
4
  export type NetworkScenario = 'ok' | 'limited' | 'failing';
5
5
  export type TailnetScenario = 'off' | 'needs-login' | 'running' | 'failed';
6
- export type LinksScenario = 'none' | 'preparing' | 'linked' | 'reconnecting' | 'exit' | 'prompt' | 'denied' | 'remote';
6
+ export type LinksScenario = 'none' | 'preparing' | 'linked' | 'reconnecting' | 'exit' | 'prompt' | 'denied' | 'remote' | 'followers';
7
7
  export declare function networkFixtures(scenario: NetworkScenario, now?: number): NetworkStatus;
8
8
  export declare function tailnetFixtures(scenario: TailnetScenario): TailnetStatus;
9
9
  export declare function joinUrl(rotation?: number): string;
10
+ export declare function followUrl(rotation?: number): string;
11
+ export declare function grant(device: LinkedDevice, key: AccessKey, allowed: boolean): LinkedDevice;
10
12
  export declare function linksFixtures(scenario: LinksScenario, rotation?: number): {
11
13
  links: NetworkLinks;
12
14
  exit: NetworkExit;
@@ -19,6 +21,7 @@ export declare class DummyNetwork extends Emitter<{
19
21
  setExit?: (exit: NetworkExit) => Promise<void>;
20
22
  unlink?: (id: string) => Promise<void>;
21
23
  setRemoteControl?: (id: string, allowed: boolean) => Promise<void>;
24
+ setAccess?: (id: string, key: AccessKey, allowed: boolean) => Promise<void>;
22
25
  rotateJoinUrl?: () => Promise<void>;
23
26
  retryLinks?: () => Promise<void>;
24
27
  constructor(scenario: NetworkScenario, clock: Clock, tailnet?: TailnetScenario, links?: LinksScenario);
@@ -5,6 +5,8 @@ export { browserHistory, DummyBrowser, page } from './dummy/browser.js';
5
5
  export type { ChangesScenario } from './dummy/changes.js';
6
6
  export { DummyChanges } from './dummy/changes.js';
7
7
  export type { DummyMount, MountScenario } from './dummy/files.js';
8
+ export type { FollowScenario } from './dummy/follow.js';
9
+ export { DummyFollow, followFixtures } from './dummy/follow.js';
8
10
  export type { DummyModel, DummyOptions } from './dummy/index.js';
9
11
  export { createDummyModel } from './dummy/index.js';
10
12
  export type { NetworkScenario, TailnetScenario } from './dummy/network.js';
@@ -624,6 +624,14 @@ export interface RemoteControl {
624
624
  fixed?: boolean;
625
625
  }
626
626
  export type RemoteControlMode = 'prompt' | 'watch';
627
+ export type LinkKind = 'cli' | 'seven';
628
+ export type AccessKey = 'view' | 'control' | 'terminal';
629
+ export interface DeviceAccess {
630
+ view?: boolean;
631
+ control?: boolean;
632
+ terminal?: boolean;
633
+ fixed?: boolean;
634
+ }
627
635
  export interface LinkedBrowser {
628
636
  runtime: string;
629
637
  name: string;
@@ -641,10 +649,15 @@ export interface LinkedDevice {
641
649
  browsers?: readonly LinkedBrowser[];
642
650
  control?: RemoteControl;
643
651
  controlling?: RemoteControlMode;
652
+ kind?: LinkKind;
653
+ access?: DeviceAccess;
654
+ asking?: boolean;
655
+ terminals?: number;
644
656
  }
645
657
  export interface NetworkLinks {
646
658
  joinUrl: string | null;
647
659
  joinCommand: string | null;
660
+ followUrl?: string | null;
648
661
  devices: readonly LinkedDevice[];
649
662
  permission?: 'prompt' | 'denied' | null;
650
663
  }
@@ -687,6 +700,7 @@ export interface NetworkPort extends Subscribable<{
687
700
  setExit?(exit: NetworkExit): Promise<void>;
688
701
  unlink?(id: string): Promise<void>;
689
702
  setRemoteControl?(id: string, allowed: boolean): Promise<void>;
703
+ setAccess?(id: string, key: AccessKey, allowed: boolean): Promise<void>;
690
704
  rotateJoinUrl?(): Promise<void>;
691
705
  retryLinks?(): Promise<void>;
692
706
  }
@@ -752,6 +766,21 @@ export interface TabsPort extends Subscribable<{
752
766
  state(): TabsState;
753
767
  reload(): void;
754
768
  }
769
+ export type FollowLink = 'connecting' | 'connected' | 'reconnecting' | 'unlinked' | 'failed';
770
+ export interface FollowState {
771
+ owner: string;
772
+ link: FollowLink;
773
+ access: DeviceAccess;
774
+ name?: string;
775
+ error?: string;
776
+ }
777
+ export interface FollowPort extends Subscribable<{
778
+ follow: FollowState;
779
+ }> {
780
+ state(): FollowState;
781
+ leave(): Promise<void>;
782
+ retry?(): Promise<void>;
783
+ }
755
784
  export interface SliccModel {
756
785
  agent: AgentPort;
757
786
  files: FilePort;
@@ -768,4 +797,5 @@ export interface SliccModel {
768
797
  notices?: NoticesPort;
769
798
  tabs?: TabsPort;
770
799
  approvals?: ApprovalsPort;
800
+ follow?: FollowPort;
771
801
  }
@@ -8,6 +8,7 @@ import { SliccChat } from './app/chat.js';
8
8
  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
+ import { SliccFollow } from './app/follow.js';
11
12
  import { SliccNetwork } from './app/network.js';
12
13
  import { SliccNotices } from './app/notices.js';
13
14
  import { SliccUpdates } from './app/updates.js';
@@ -28,5 +29,5 @@ export type { GitStatusEntry } from './components/file-tree.js';
28
29
  export type { Listener, Subscribable } from './model/emitter.js';
29
30
  export { Emitter } from './model/emitter.js';
30
31
  export type * from './model/types.js';
31
- export { SliccAgents, SliccApp, SliccApprovals, SliccBrowser, SliccChanges, SliccChat, SliccCodeView, SliccComposer, SliccConfirm, SliccDiffPanel, SliccDiffView, SliccDock, SliccFiles, SliccFileTree, SliccFileView, SliccNetwork, SliccNotices, SliccPrompt, SliccUpdates, };
32
+ export { SliccAgents, SliccApp, SliccApprovals, SliccBrowser, SliccChanges, SliccChat, SliccCodeView, SliccComposer, SliccConfirm, SliccDiffPanel, SliccDiffView, SliccDock, SliccFiles, SliccFileTree, SliccFileView, SliccFollow, SliccNetwork, SliccNotices, SliccPrompt, SliccUpdates, };
32
33
  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.51.0",
3
+ "version": "1.53.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",
@@ -107,6 +107,7 @@
107
107
  "monocart-coverage-reports": "2.13.0",
108
108
  "playwright-core": "1.63.0",
109
109
  "semantic-release": "25.0.9",
110
- "typescript": "7.0.2"
110
+ "typescript": "7.0.2",
111
+ "uqr": "0.1.3"
111
112
  }
112
113
  }