@ai-ecoverse/slicc-spectrum 2.3.0 → 2.4.1

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.
@@ -2,7 +2,7 @@ import '@adobe/spectrum-wc/components/button/swc-button.js';
2
2
  import '@adobe/spectrum-wc-icons/swc-icon-alert-triangle.js';
3
3
  import '@spectrum-web-components/alert-dialog/sp-alert-dialog.js';
4
4
  import { type PropertyValues } from 'lit';
5
- import type { Approval, ApprovalDecision, GuestMessageApproval, GuestToolApproval, SecretApproval, SliccModel, SudoApproval, TrayApproval } from '../model/types.js';
5
+ import type { Approval, ApprovalDecision, CaptureApproval, ClickApproval, GuestMessageApproval, GuestToolApproval, SecretApproval, SliccModel, SudoApproval, TrayApproval } from '../model/types.js';
6
6
  import { ModelElement } from './base.js';
7
7
  export { deadline } from './messages.js';
8
8
  export declare function countdown(ms: number): string;
@@ -13,6 +13,11 @@ export declare function guestAlwaysHint(approval: GuestMessageApproval | GuestTo
13
13
  export declare function guestAsking(approval: GuestMessageApproval | GuestToolApproval): string;
14
14
  export declare function trayTitle(approval: TrayApproval): string;
15
15
  export declare function trayAsking(approval: TrayApproval): string;
16
+ export declare function captureLine(approval: CaptureApproval): string;
17
+ export declare function captureAsking(approval: CaptureApproval): string;
18
+ export declare function captureWaiting(approval: CaptureApproval): string;
19
+ export declare function captureAlwaysHint(approval: CaptureApproval): string;
20
+ export declare function clickWhere(approval: ClickApproval): string;
16
21
  export declare function secretTitle(approval: SecretApproval): string;
17
22
  export declare function secretAsking(approval: SecretApproval): string;
18
23
  export declare function processLine(approval: SecretApproval): string;
@@ -21,7 +26,7 @@ export declare function secretWaiting(approval: SecretApproval): string;
21
26
  export declare function approved(approval: Approval): string;
22
27
  export declare function truncated(approval: Approval): boolean;
23
28
  export declare function guestWaiting(approval: GuestMessageApproval | GuestToolApproval): string;
24
- type Judged = GuestMessageApproval | GuestToolApproval | SudoApproval;
29
+ type Judged = GuestMessageApproval | GuestToolApproval | SudoApproval | CaptureApproval;
25
30
  export declare function offersAlways(approval: Approval): boolean;
26
31
  export declare function verdictNote(approval: Judged): string;
27
32
  export declare function waiting(model: SliccModel | null, now: number): Approval[];
@@ -66,6 +71,7 @@ export declare class SliccApprovals extends ModelElement {
66
71
  constructor();
67
72
  static styles: (import("lit").CSSResult[] | import("lit").CSSResult)[];
68
73
  protected subscribe(model: SliccModel): Array<() => void>;
74
+ connectedCallback(): void;
69
75
  disconnectedCallback(): void;
70
76
  decide(approval: Approval, decision: ApprovalDecision): Promise<void>;
71
77
  protected willUpdate(changed: PropertyValues): void;
@@ -37,6 +37,7 @@ export declare class SliccChat extends ThemedElement {
37
37
  behind: boolean;
38
38
  constructor();
39
39
  static styles: import("lit").CSSResult[];
40
+ arming: number;
40
41
  protected subscribe(model: SliccModel): Array<() => void>;
41
42
  connectedCallback(): void;
42
43
  disconnectedCallback(): void;
@@ -1,14 +1,12 @@
1
- import '@adobe/spectrum-wc/components/action-button/swc-action-button.js';
2
- import '@adobe/spectrum-wc-icons/swc-icon-chevron-down.js';
3
1
  import { type TemplateResult } from 'lit';
4
- export declare const toShow = "Show the full command to allow it.";
5
2
  export declare const toScroll = "Scroll to the end of the command to allow it.";
6
- export declare const clampCss: import("lit").CSSResult;
7
- export declare class Cuts {
3
+ export declare const endCss: import("lit").CSSResult;
4
+ export declare const end: (id: string) => TemplateResult;
5
+ type Observer = Pick<ResizeObserver, 'observe' | 'unobserve' | 'disconnect'>;
6
+ export declare class Watched {
8
7
  #private;
9
- constructor(root: () => ParentNode, changed: () => void);
10
- get(id: string): boolean | undefined;
11
- measure(): void;
8
+ constructor(observer: Observer);
9
+ sync(targets: Iterable<Element>): void;
12
10
  disconnect(): void;
13
11
  }
14
12
  export declare class Ends {
@@ -21,4 +19,15 @@ export declare class Ends {
21
19
  observe(): void;
22
20
  disconnect(): void;
23
21
  }
24
- export declare function fullCommand(shown: boolean, toggle: () => void): TemplateResult;
22
+ export declare class Arming {
23
+ #private;
24
+ constructor(ms: () => number);
25
+ arm(): void;
26
+ press: () => void;
27
+ settled(at?: number): boolean;
28
+ counts(event: MouseEvent): boolean;
29
+ watch(layout: string): void;
30
+ forget(): void;
31
+ }
32
+ export declare function layout(buttons: readonly HTMLElement[], head?: readonly unknown[], frame?: HTMLElement | null): string;
33
+ export {};
@@ -128,6 +128,7 @@ export declare class SliccComposer extends ThemedElement {
128
128
  screenshot(): Promise<void>;
129
129
  attachPath(path: string): Promise<void>;
130
130
  shareSecret(name: string, field?: HTMLInputElement | null): Promise<void>;
131
+ closeSecret(): void;
131
132
  openPopup(kind: 'file' | 'secret'): void;
132
133
  pick(choice: Choice): void;
133
134
  dictate(): void;
@@ -0,0 +1,29 @@
1
+ import '@adobe/spectrum-wc/components/action-button/swc-action-button.js';
2
+ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
3
+ import type { LiveItem, SliccModel } from '../model/types.js';
4
+ import { ModelElement } from './base.js';
5
+ export declare function elapsed(ms: number): string;
6
+ export declare function liveLine(item: LiveItem, now: number): string;
7
+ export declare class SliccLive extends ModelElement {
8
+ #private;
9
+ static properties: {
10
+ model: {
11
+ attribute: boolean;
12
+ };
13
+ compact: {
14
+ type: BooleanConstructor;
15
+ reflect: boolean;
16
+ };
17
+ now: {
18
+ state: boolean;
19
+ };
20
+ };
21
+ compact: boolean;
22
+ now: number;
23
+ constructor();
24
+ static styles: import("lit").CSSResult;
25
+ protected subscribe(model: SliccModel): Array<() => void>;
26
+ disconnectedCallback(): void;
27
+ protected updated(changed: PropertyValues): void;
28
+ render(): TemplateResult | typeof nothing;
29
+ }
@@ -48,9 +48,8 @@ export interface Handlers {
48
48
  toggle(id: string): void;
49
49
  };
50
50
  commands?: {
51
- cut(id: string): boolean | undefined;
52
- has(id: string): boolean;
53
- toggle(id: string): void;
51
+ seen(id: string): boolean;
52
+ armed(event: MouseEvent): boolean;
54
53
  };
55
54
  }
56
55
  export interface Login {
@@ -1,5 +1,7 @@
1
1
  import type { Agent, SliccModel } from '../model/types.js';
2
2
  export declare const untitled = "No messages yet";
3
+ export declare const earlier = "Earlier messages";
4
+ export declare const unnamed = "Untitled chat";
3
5
  export declare function short(text: string, max?: number): string;
4
6
  export declare function agentTitle(model: SliccModel, agent: Agent): string;
5
7
  export declare function twinned(name: string, id: string, rows: ReadonlyArray<{
@@ -2,7 +2,7 @@ import { Emitter } from '../model/emitter.js';
2
2
  import type { Approval, ApprovalDecision, ApprovalEnd, ApprovalsEvents, ApprovalsPort, PendingRequest, SecretApproval } from '../model/types.js';
3
3
  import type { Clock } from './clock.js';
4
4
  import type { DummyVault } from './vault.js';
5
- export type ApprovalScenario = 'agent' | 'user' | 'many' | 'follower' | 'fail' | 'soon' | 'elsewhere' | 'withdrawn' | 'secrets' | 'judge-denied' | 'level-1' | 'level-2' | 'level-3' | 'checking' | 'no-verdict' | 'legacy' | 'guest' | 'guest-follower' | 'guest-always' | 'long' | 'controls-cr' | 'controls-lf' | 'controls-place' | 'controls-cwd' | 'guest-args' | 'guest-empty' | 'guest-truncated' | 'tray' | 'tray-url' | 'tray-rotate' | 'tray-unlink' | 'tray-expired' | 'secret' | 'secret-enter' | 'secret-reveal' | 'secret-long' | 'none';
5
+ export type ApprovalScenario = 'agent' | 'user' | 'many' | 'follower' | 'fail' | 'soon' | 'elsewhere' | 'withdrawn' | 'secrets' | 'judge-denied' | 'level-1' | 'level-2' | 'level-3' | 'checking' | 'no-verdict' | 'legacy' | 'guest' | 'guest-follower' | 'guest-always' | 'long' | 'controls-cr' | 'controls-lf' | 'controls-place' | 'controls-cwd' | 'guest-args' | 'guest-empty' | 'guest-truncated' | 'tray' | 'tray-url' | 'tray-rotate' | 'tray-unlink' | 'tray-expired' | 'secret' | 'secret-enter' | 'secret-reveal' | 'secret-long' | 'click' | 'click-remote' | 'capture' | 'none';
6
6
  export declare const guestArgs: string;
7
7
  export declare function pendingAsk(approval: SecretApproval): PendingRequest;
8
8
  export declare function approvalFixtures(scenario: ApprovalScenario, now?: number): Approval[];
@@ -7,6 +7,7 @@ import { type MountScenario } from './files.js';
7
7
  import { DummyFollow, type FollowScenario } from './follow.js';
8
8
  import { DummyGuests, type GuestsScenario } from './guests.js';
9
9
  import { type ImportScenario } from './import.js';
10
+ import { DummyLive, DummySwitches, type LiveScenario } from './live.js';
10
11
  import { DummyNetwork, type LeadersScenario, type LinksScenario, type NetworkScenario, type TailnetScenario } from './network.js';
11
12
  import { DummyNotices, type NoticeScenario } from './notices.js';
12
13
  import { type DummyLogin, type DummyServers, DummySettings, type DummyTransport } from './settings.js';
@@ -30,6 +31,8 @@ export interface DummyOptions {
30
31
  tabs?: TabsScenario | 'off';
31
32
  approvals?: ApprovalScenario | 'off';
32
33
  asks?: 'long' | 'off';
34
+ live?: LiveScenario | 'off';
35
+ switches?: 'capture' | 'off';
33
36
  follow?: FollowScenario | 'off';
34
37
  vault?: VaultScenario | 'off';
35
38
  guests?: GuestsScenario | 'off';
@@ -57,6 +60,8 @@ export interface DummyModel extends SliccModel {
57
60
  notices?: DummyNotices;
58
61
  tabs?: DummyTabs;
59
62
  approvals?: DummyApprovals;
63
+ live?: DummyLive;
64
+ switches?: DummySwitches;
60
65
  follow?: DummyFollow;
61
66
  vault?: DummyVault;
62
67
  guests?: DummyGuests;
@@ -64,4 +69,4 @@ export interface DummyModel extends SliccModel {
64
69
  export declare function vaultAccounts(accounts: readonly Account[]): Account[];
65
70
  export declare const docsUrl = "https://docs.example/mcp";
66
71
  export declare const movedDocs = "https://docs.eu.example/mcp";
67
- export declare function createDummyModel({ delay, storage, updates, packages, confirm, beta, mounts, network, tailnet, links, leaders, changes, notices, tabs, approvals, asks, follow, vault, guests, accounts, providers, mcp, servers, transport, hold, readonly, agent: arrival, browser: scenario, sprinkles, monitor, import: imports, login, budget, older, }?: DummyOptions): DummyModel;
72
+ export declare function createDummyModel({ delay, storage, updates, packages, confirm, beta, mounts, network, tailnet, links, leaders, changes, notices, tabs, approvals, asks, live, switches, follow, vault, guests, accounts, providers, mcp, servers, transport, hold, readonly, agent: arrival, browser: scenario, sprinkles, monitor, import: imports, login, budget, older, }?: DummyOptions): DummyModel;
@@ -0,0 +1,23 @@
1
+ import { Emitter } from '../model/emitter.js';
2
+ import type { LiveItem, LivePort, Switch, SwitchesPort } from '../model/types.js';
3
+ export type LiveScenario = 'screen' | 'both';
4
+ export declare function liveFixtures(scenario: LiveScenario, now?: number): LiveItem[];
5
+ export declare class DummyLive extends Emitter<{
6
+ items: readonly LiveItem[];
7
+ }> implements LivePort {
8
+ #private;
9
+ acted: string[];
10
+ constructor(scenario: LiveScenario);
11
+ items(): readonly LiveItem[];
12
+ add(item: LiveItem): void;
13
+ act(id: string): void;
14
+ }
15
+ export declare const switchFixtures: readonly Switch[];
16
+ export declare class DummySwitches extends Emitter<{
17
+ switches: readonly Switch[];
18
+ }> implements SwitchesPort {
19
+ #private;
20
+ sets: Array<[string, boolean]>;
21
+ list(): readonly Switch[];
22
+ set(key: string, on: boolean): void;
23
+ }
@@ -15,6 +15,8 @@ export type { ImportScenario } from './dummy/import.js';
15
15
  export { DummyImport, importBefore, importCancelled, importCones, importNotV6, importPreview, importReport, importTotal, } from './dummy/import.js';
16
16
  export type { DummyModel, DummyOptions } from './dummy/index.js';
17
17
  export { createDummyModel, movedDocs } from './dummy/index.js';
18
+ export type { LiveScenario } from './dummy/live.js';
19
+ export { DummyLive, DummySwitches, liveFixtures, switchFixtures } from './dummy/live.js';
18
20
  export type { LeadersScenario, NetworkScenario, TailnetScenario } from './dummy/network.js';
19
21
  export { DummyNetwork, forgottenDevice, joinUrl, leadersFixtures, linksFixtures, networkFixtures, outdatedDevice, pairedDevice, pairingCode, pairingRefused, pairingStopped, tailnetFixtures, } from './dummy/network.js';
20
22
  export type { NoticeScenario } from './dummy/notices.js';
@@ -1078,7 +1078,50 @@ export interface SecretApproval {
1078
1078
  createdAt: number;
1079
1079
  expiresAt: number;
1080
1080
  }
1081
- export type Approval = SudoApproval | GuestMessageApproval | GuestToolApproval | TrayApproval | SecretApproval;
1081
+ export interface ClickApproval {
1082
+ id: string;
1083
+ kind: 'click';
1084
+ subject: 'capture' | 'device';
1085
+ what: string;
1086
+ program: string;
1087
+ requester: ApprovalRequester;
1088
+ title: string;
1089
+ body: string;
1090
+ action: string;
1091
+ here: boolean;
1092
+ device?: {
1093
+ id: string;
1094
+ name: string;
1095
+ };
1096
+ createdAt: number;
1097
+ expiresAt: number;
1098
+ }
1099
+ export type CaptureWhat = 'screen' | 'camera' | 'microphone';
1100
+ export type CaptureMode = 'still' | 'video' | 'audio';
1101
+ export interface CaptureDetail {
1102
+ what: CaptureWhat;
1103
+ mode: CaptureMode;
1104
+ seconds?: number;
1105
+ system?: boolean;
1106
+ microphone?: boolean;
1107
+ device?: string;
1108
+ program: string;
1109
+ }
1110
+ export interface CaptureApproval {
1111
+ id: string;
1112
+ kind: 'capture';
1113
+ requester: ApprovalRequester;
1114
+ agentId?: string;
1115
+ agentName?: string;
1116
+ detail: CaptureDetail;
1117
+ createdAt: number;
1118
+ expiresAt: number;
1119
+ always: boolean;
1120
+ verdict?: ApprovalVerdict;
1121
+ judging?: boolean;
1122
+ verdictError?: string;
1123
+ }
1124
+ export type Approval = SudoApproval | GuestMessageApproval | GuestToolApproval | TrayApproval | SecretApproval | ClickApproval | CaptureApproval;
1082
1125
  export type ApprovalEnd = 'answered' | 'withdrawn' | 'expired';
1083
1126
  export interface ApprovalsEvents {
1084
1127
  approvals: readonly Approval[];
@@ -1091,6 +1134,34 @@ export interface ApprovalsPort extends Subscribable<ApprovalsEvents> {
1091
1134
  list(): readonly Approval[];
1092
1135
  decide?(id: string, decision: ApprovalDecision, reason?: string): Promise<void>;
1093
1136
  }
1137
+ export interface LiveItem {
1138
+ id: string;
1139
+ kind: string;
1140
+ label: string;
1141
+ what: string;
1142
+ asker: string;
1143
+ since: number;
1144
+ action: {
1145
+ label: string;
1146
+ };
1147
+ }
1148
+ export interface LivePort extends Subscribable<{
1149
+ items: readonly LiveItem[];
1150
+ }> {
1151
+ items(): readonly LiveItem[];
1152
+ act(id: string): void;
1153
+ }
1154
+ export interface Switch {
1155
+ key: string;
1156
+ label: string;
1157
+ on: boolean;
1158
+ }
1159
+ export interface SwitchesPort extends Subscribable<{
1160
+ switches: readonly Switch[];
1161
+ }> {
1162
+ list(): readonly Switch[];
1163
+ set(key: string, on: boolean): void;
1164
+ }
1094
1165
  export type TabRole = 'owner' | 'follower' | 'connecting' | 'alone';
1095
1166
  export type TabSkew = 'newer' | 'older';
1096
1167
  export interface TabsState {
@@ -1672,6 +1743,8 @@ export interface SliccModel {
1672
1743
  notices?: NoticesPort;
1673
1744
  tabs?: TabsPort;
1674
1745
  approvals?: ApprovalsPort;
1746
+ live?: LivePort;
1747
+ switches?: SwitchesPort;
1675
1748
  follow?: FollowPort;
1676
1749
  vault?: VaultPort;
1677
1750
  guests?: GuestPort;
@@ -11,6 +11,7 @@ import { SliccFiles, SliccFileView } from './app/files.js';
11
11
  import { SliccFollow } from './app/follow.js';
12
12
  import { SliccFreezerImport } from './app/freezer-import.js';
13
13
  import { SliccGuestInvite } from './app/guests.js';
14
+ import { SliccLive } from './app/live.js';
14
15
  import { SliccNetwork } from './app/network.js';
15
16
  import { SliccNotices } from './app/notices.js';
16
17
  import { SliccSecrets } from './app/secrets.js';
@@ -36,5 +37,5 @@ export type { Listener, Subscribable } from './model/emitter.js';
36
37
  export { Emitter } from './model/emitter.js';
37
38
  export type * from './model/types.js';
38
39
  export { isVaultFailure } from './model/values.js';
39
- export { approvalKinds, 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, SliccVaultValue, };
40
+ export { approvalKinds, SliccAgents, SliccApp, SliccApprovals, SliccBrowser, SliccChanges, SliccChat, SliccCodeView, SliccComposer, SliccConfirm, SliccDiffPanel, SliccDiffView, SliccDock, SliccFiles, SliccFileTree, SliccFileView, SliccFollow, SliccFreezerImport, SliccGuestInvite, SliccLive, SliccNetwork, SliccNotices, SliccPrompt, SliccSecrets, SliccUpdates, SliccValueRequest, SliccVaultButton, SliccVaultValue, };
40
41
  export declare function define(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-spectrum",
3
- "version": "2.3.0",
3
+ "version": "2.4.1",
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",
@@ -62,8 +62,8 @@
62
62
  "devDependencies": {
63
63
  "@adobe/spectrum-wc": "2.0.0-beta.6",
64
64
  "@adobe/spectrum-wc-icons": "2.0.0-beta.6",
65
- "@ai-ecoverse/slicc-cdp": "1.46.5",
66
- "@ai-ecoverse/slicc-kernel": "1.175.1",
65
+ "@ai-ecoverse/slicc-cdp": "1.46.7",
66
+ "@ai-ecoverse/slicc-kernel": "1.176.0",
67
67
  "@ai-ecoverse/slicc-shared-web": "2.13.10",
68
68
  "@ai-ecoverse/slicc-vault": "1.23.1",
69
69
  "@ai-ecoverse/wasm-bash": "5.3.0-23",