@ai-ecoverse/slicc-spectrum 1.34.0 → 1.36.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.
@@ -1,5 +1,5 @@
1
1
  import { LitElement, type PropertyValues, type TemplateResult } from 'lit';
2
- import type { AgentStatus, ColorScheme, ModelOption, SliccModel } from '../model/types.js';
2
+ import type { AgentStatus, ChangesPort, ColorScheme, ModelOption, SliccModel } from '../model/types.js';
3
3
  export declare class ModelElement extends LitElement {
4
4
  #private;
5
5
  static properties: {
@@ -16,6 +16,7 @@ export declare class ModelElement extends LitElement {
16
16
  disconnectedCallback(): void;
17
17
  protected willUpdate(changed: PropertyValues): void;
18
18
  }
19
+ export declare function changesOf(model: SliccModel): ChangesPort;
19
20
  export type Color = 'light' | 'dark';
20
21
  export declare function resolveColor(scheme: ColorScheme, prefersDark: boolean): Color;
21
22
  export declare class ThemedElement extends ModelElement {
@@ -1,10 +1,23 @@
1
1
  import '@adobe/spectrum-wc/components/action-button/swc-action-button.js';
2
2
  import '@adobe/spectrum-wc/components/action-group/swc-action-group.js';
3
+ import '@adobe/spectrum-wc-icons/swc-icon-alert-diamond.js';
3
4
  import { type TemplateResult } from 'lit';
4
- import type { SliccModel } from '../model/types.js';
5
+ import type { Change, ChangesPort, SliccModel } from '../model/types.js';
5
6
  import { ModelElement, ThemedElement } from './base.js';
7
+ export declare function revertPaths(port: ChangesPort, paths: readonly string[]): Promise<string>;
8
+ export declare function groups(changes: readonly Change[]): Array<[string, Change[]]>;
6
9
  export declare class SliccChanges extends ModelElement {
7
10
  #private;
11
+ static properties: {
12
+ model: {
13
+ attribute: boolean;
14
+ };
15
+ error: {
16
+ state: boolean;
17
+ };
18
+ };
19
+ error: string;
20
+ constructor();
8
21
  static styles: import("lit").CSSResult[];
9
22
  protected subscribe(model: SliccModel): Array<() => void>;
10
23
  focus(): void;
@@ -17,8 +30,12 @@ export declare class SliccDiffPanel extends ThemedElement {
17
30
  attribute: boolean;
18
31
  };
19
32
  path: {};
33
+ error: {
34
+ state: boolean;
35
+ };
20
36
  };
21
37
  path: string;
38
+ error: string;
22
39
  constructor();
23
40
  static styles: import("lit").CSSResult[];
24
41
  protected subscribe(model: SliccModel): Array<() => void>;
@@ -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/tooltip/swc-tooltip.js';
4
5
  import '@adobe/spectrum-wc/patterns/ai-toolkit/conversation-thread/swc-conversation-thread.js';
5
6
  import '@adobe/spectrum-wc-icons/swc-icon-new.js';
6
7
  import { type TemplateResult } from 'lit';
@@ -10,6 +10,7 @@ export interface ConfirmOptions {
10
10
  body: string;
11
11
  action: string;
12
12
  variant?: ConfirmVariant;
13
+ cancel?: string;
13
14
  trigger?: HTMLElement | null;
14
15
  }
15
16
  export interface PromptOptions {
@@ -27,11 +28,13 @@ export declare class SliccConfirm extends LitElement {
27
28
  body: {};
28
29
  action: {};
29
30
  variant: {};
31
+ cancel: {};
30
32
  };
31
33
  heading: string;
32
34
  body: string;
33
35
  action: string;
34
36
  variant: ConfirmVariant;
37
+ cancel: string;
35
38
  trigger: HTMLElement | null;
36
39
  constructor();
37
40
  static styles: import("lit").CSSResult;
@@ -13,6 +13,7 @@ export declare function treePaths(entries: readonly FileEntry[]): string[];
13
13
  export declare function treeStatus(changes: readonly Change[]): GitStatusEntry[];
14
14
  export declare function ancestors(paths: readonly string[]): string[];
15
15
  export declare function agentName(model: SliccModel | null, id: string | null): string;
16
+ export declare function author(model: SliccModel | null, change: Change): string | null;
16
17
  export declare function request(target: EventTarget, type: 'open-file' | 'open-diff', path: string): void;
17
18
  export declare const panelCss: import("lit").CSSResult;
18
19
  export declare const letters: {
@@ -27,6 +28,7 @@ export declare const statusLabels: {
27
28
  };
28
29
  export declare function statusMark(status: Change['status'], announce?: boolean): TemplateResult;
29
30
  export declare function failure(error: unknown): string;
31
+ export declare const errorCss: import("lit").CSSResult;
30
32
  export declare class SliccFiles extends ModelElement {
31
33
  #private;
32
34
  static properties: {
@@ -8,10 +8,12 @@ import '@adobe/spectrum-wc-icons/swc-icon-cloud-state-online.js';
8
8
  import '@adobe/spectrum-wc-icons/swc-icon-cloud-state-slow-connection.js';
9
9
  import '@adobe/spectrum-wc-icons/swc-icon-copy.js';
10
10
  import { type TemplateResult } from 'lit';
11
- import type { NetworkStatus, SliccModel } from '../model/types.js';
11
+ import type { BrowserAutomation, NetworkStatus, SliccModel } from '../model/types.js';
12
12
  import { ModelElement } from './base.js';
13
13
  export declare const command = "npx @ai-ecoverse/slicc-node";
14
14
  export declare const networkHealth: Record<NetworkStatus['health'], readonly ['positive' | 'notice' | 'negative', string]>;
15
+ export declare const automation: Record<NonNullable<BrowserAutomation['via']> | 'none' | 'declined', string>;
16
+ export declare function automationOf(browser: BrowserAutomation): keyof typeof automation;
15
17
  export declare function networkLabel(status: NetworkStatus): string;
16
18
  export declare const networkIcon: Record<NetworkStatus['health'], TemplateResult>;
17
19
  export declare function host(url: string): string;
@@ -0,0 +1,17 @@
1
+ import type { Subscribable } from '../model/emitter.js';
2
+ import type { Change, ChangesPort } from '../model/types.js';
3
+ import type { DummyFiles } from './files.js';
4
+ export type ChangesScenario = 'files' | 'git' | 'nogit';
5
+ export declare const repos: string[];
6
+ export declare const noGit = "Changes needs git and a git repository. Install git with pnpm add -g @ai-ecoverse/wasm-git, then git init, or clone with slicc-node or the extension connected.";
7
+ export declare class DummyChanges implements ChangesPort {
8
+ #private;
9
+ constructor(files: DummyFiles, git: boolean);
10
+ on: Subscribable<{
11
+ changes: readonly Change[];
12
+ }>['on'];
13
+ changes(): readonly Change[];
14
+ accept(path: string): void;
15
+ revert(path: string): Promise<void>;
16
+ unavailable(): string | null;
17
+ }
@@ -4,6 +4,7 @@ export declare const directories: string[];
4
4
  export declare const mountPoint = "/mnt/photos";
5
5
  export declare const mounted: Record<string, string>;
6
6
  export declare const pending: Change[];
7
+ export declare const skillEdit: Change;
7
8
  export declare const models: ModelOption[];
8
9
  export declare const defaults: Settings;
9
10
  export declare const accounts: Account[];
@@ -1,4 +1,5 @@
1
1
  import type { SliccModel } from '../model/types.js';
2
+ import { type ChangesScenario } from './changes.js';
2
3
  import { type MountScenario } from './files.js';
3
4
  import { DummyNetwork, type NetworkScenario } from './network.js';
4
5
  import { DummyUpdates, type UpdateScenario } from './updates.js';
@@ -8,9 +9,10 @@ export interface DummyOptions {
8
9
  updates?: UpdateScenario;
9
10
  mounts?: MountScenario | 'off';
10
11
  network?: NetworkScenario | 'off';
12
+ changes?: ChangesScenario;
11
13
  }
12
14
  export interface DummyModel extends SliccModel {
13
15
  updates: DummyUpdates;
14
16
  network?: DummyNetwork;
15
17
  }
16
- export declare function createDummyModel({ delay, storage, updates, mounts, network, }?: DummyOptions): DummyModel;
18
+ export declare function createDummyModel({ delay, storage, updates, mounts, network, changes, }?: DummyOptions): DummyModel;
@@ -1,3 +1,5 @@
1
+ export type { ChangesScenario } from './dummy/changes.js';
2
+ export { DummyChanges } from './dummy/changes.js';
1
3
  export type { DummyMount, MountScenario } from './dummy/files.js';
2
4
  export type { DummyModel, DummyOptions } from './dummy/index.js';
3
5
  export { createDummyModel } from './dummy/index.js';
@@ -278,6 +278,15 @@ export interface Change {
278
278
  before: string | null;
279
279
  after: string | null;
280
280
  agentId: string | null;
281
+ repo?: string;
282
+ }
283
+ export interface ChangesPort extends Subscribable<{
284
+ changes: readonly Change[];
285
+ }> {
286
+ changes(): readonly Change[];
287
+ accept(path: string): void;
288
+ revert(path: string): Promise<void>;
289
+ unavailable?(): string | null;
281
290
  }
282
291
  export interface FileEvents {
283
292
  files: readonly FileEntry[];
@@ -529,12 +538,18 @@ export interface NetworkFailure {
529
538
  error: string;
530
539
  at: number;
531
540
  }
541
+ export interface BrowserAutomation {
542
+ via: 'extension' | 'proxy' | null;
543
+ detail?: string;
544
+ declined?: boolean;
545
+ }
532
546
  export interface NetworkStatus {
533
547
  route: NetworkRoute | null;
534
548
  health: 'ok' | 'limited' | 'failing';
535
549
  detail: string | null;
536
550
  failures: readonly NetworkFailure[];
537
551
  extensionUrl?: string;
552
+ browser?: BrowserAutomation;
538
553
  }
539
554
  export interface NetworkPort extends Subscribable<{
540
555
  network: NetworkStatus;
@@ -554,4 +569,5 @@ export interface SliccModel {
554
569
  tray: TrayPort;
555
570
  updates?: UpdatesPort;
556
571
  network?: NetworkPort;
572
+ changes?: ChangesPort;
557
573
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-spectrum",
3
- "version": "1.34.0",
3
+ "version": "1.36.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",
@@ -72,7 +72,7 @@
72
72
  "devDependencies": {
73
73
  "@adobe/spectrum-wc": "2.0.0-beta.4",
74
74
  "@adobe/spectrum-wc-icons": "2.0.0-beta.4",
75
- "@ai-ecoverse/slicc-kernel": "1.21.1",
75
+ "@ai-ecoverse/slicc-kernel": "1.26.1",
76
76
  "@ai-ecoverse/slicc-shared-web": "1.10.0",
77
77
  "@ai-ecoverse/wasm-bash": "5.3.0-8",
78
78
  "@ai-ecoverse/wasm-coreutils": "9.7.0-3",