@ai-ecoverse/slicc-spectrum 1.77.1 → 1.78.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,6 +1,7 @@
1
1
  import '@adobe/spectrum-wc/components/action-button/swc-action-button.js';
2
2
  import '@adobe/spectrum-wc/components/tooltip/swc-tooltip.js';
3
3
  import '@adobe/spectrum-wc-icons/swc-icon-add.js';
4
+ import '@adobe/spectrum-wc-icons/swc-icon-chevron-right.js';
4
5
  import '@adobe/spectrum-wc-icons/swc-icon-close.js';
5
6
  import '@adobe/spectrum-wc-icons/swc-icon-delete.js';
6
7
  import { type TemplateResult } from 'lit';
@@ -10,6 +11,7 @@ export declare function ordered(agents: readonly Agent[]): Agent[];
10
11
  export declare function creatable(model: SliccModel | null | undefined): boolean;
11
12
  export declare function createCone(model: SliccModel, trigger: HTMLElement): Promise<Agent | undefined>;
12
13
  export declare function scoopSummary(scoops: readonly Agent[]): string;
14
+ export declare function scoopBrief(scoops: readonly Agent[]): string;
13
15
  export declare function unreadCount(unread: number): string;
14
16
  export declare function fillShown(fill: number): boolean;
15
17
  export declare class SliccAgents extends ModelElement {
@@ -27,5 +29,6 @@ export declare class SliccAgents extends ModelElement {
27
29
  static styles: import("lit").CSSResult[];
28
30
  protected subscribe(model: SliccModel): Array<() => void>;
29
31
  focus(): void;
32
+ protected updated(): void;
30
33
  render(): TemplateResult;
31
34
  }
@@ -2,18 +2,20 @@ 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, SliccModel } from '../model/types.js';
5
+ import type { Approval, ApprovalDecision, GuestMessageApproval, GuestToolApproval, SliccModel, SudoApproval } from '../model/types.js';
6
6
  import { ModelElement } from './base.js';
7
7
  export declare function countdown(ms: number): string;
8
- export declare function asking(approval: Approval): string;
9
- export declare function sudo(approval: Approval): string;
8
+ export declare function asking(approval: SudoApproval): string;
9
+ export declare function sudo(approval: SudoApproval): string;
10
10
  export declare const certain: (rules: string) => boolean;
11
11
  export interface SecretRulesVerdict {
12
12
  certain: string | null;
13
13
  maybe: string | null;
14
14
  }
15
15
  export declare function secretRules(command: string, cwd?: string | null): SecretRulesVerdict;
16
- export declare function alwaysHint(approval: Approval): string;
16
+ export declare function alwaysHint(approval: SudoApproval): string;
17
+ export declare function guestAsking(approval: GuestMessageApproval | GuestToolApproval): string;
18
+ export declare function guestWaiting(approval: GuestMessageApproval | GuestToolApproval): string;
17
19
  export declare function waiting(model: SliccModel | null, now: number): Approval[];
18
20
  export declare class SliccApprovals extends ModelElement {
19
21
  #private;
@@ -1,7 +1,7 @@
1
1
  import { Emitter } from '../model/emitter.js';
2
2
  import type { Approval, ApprovalDecision, ApprovalEnd, ApprovalsEvents, ApprovalsPort } from '../model/types.js';
3
3
  import type { Clock } from './clock.js';
4
- export type ApprovalScenario = 'agent' | 'user' | 'many' | 'follower' | 'fail' | 'soon' | 'elsewhere' | 'withdrawn' | 'secrets' | 'none';
4
+ export type ApprovalScenario = 'agent' | 'user' | 'many' | 'follower' | 'fail' | 'soon' | 'elsewhere' | 'withdrawn' | 'secrets' | 'guest' | 'guest-follower' | 'none';
5
5
  export declare function approvalFixtures(scenario: ApprovalScenario, now?: number): Approval[];
6
6
  export declare class DummyApprovals extends Emitter<ApprovalsEvents> implements ApprovalsPort {
7
7
  #private;
@@ -791,11 +791,15 @@ export interface NoticesPort extends Subscribable<{
791
791
  }
792
792
  export type ApprovalDecision = 'once' | 'always' | 'deny';
793
793
  export interface ApprovalRequester {
794
- kind: 'agent' | 'user';
794
+ kind: 'agent' | 'user' | 'guest';
795
795
  name: string;
796
796
  agentId?: string;
797
797
  where?: string;
798
798
  }
799
+ export interface ApprovalVerdict {
800
+ decision: 'allow' | 'deny';
801
+ reason: string;
802
+ }
799
803
  export interface SudoApproval {
800
804
  id: string;
801
805
  kind: 'sudo';
@@ -808,7 +812,37 @@ export interface SudoApproval {
808
812
  always: boolean;
809
813
  alwaysScope?: 'cwd';
810
814
  }
811
- export type Approval = SudoApproval;
815
+ export interface GuestMessageApproval {
816
+ id: string;
817
+ kind: 'guest-message';
818
+ requester: ApprovalRequester;
819
+ agentId: string;
820
+ agentName?: string;
821
+ text: string;
822
+ attachments?: readonly {
823
+ name: string;
824
+ mimeType: string;
825
+ size: number;
826
+ }[];
827
+ createdAt: number;
828
+ expiresAt: number;
829
+ always: false;
830
+ verdict?: ApprovalVerdict;
831
+ }
832
+ export interface GuestToolApproval {
833
+ id: string;
834
+ kind: 'guest-tool';
835
+ requester: ApprovalRequester;
836
+ agentId: string;
837
+ agentName?: string;
838
+ tool: string;
839
+ summary: string;
840
+ createdAt: number;
841
+ expiresAt: number;
842
+ always: false;
843
+ verdict?: ApprovalVerdict;
844
+ }
845
+ export type Approval = SudoApproval | GuestMessageApproval | GuestToolApproval;
812
846
  export type ApprovalEnd = 'answered' | 'withdrawn' | 'expired';
813
847
  export interface ApprovalsEvents {
814
848
  approvals: readonly Approval[];
@@ -819,7 +853,7 @@ export interface ApprovalsEvents {
819
853
  }
820
854
  export interface ApprovalsPort extends Subscribable<ApprovalsEvents> {
821
855
  list(): readonly Approval[];
822
- decide?(id: string, decision: ApprovalDecision): Promise<void>;
856
+ decide?(id: string, decision: ApprovalDecision, reason?: string): Promise<void>;
823
857
  }
824
858
  export type TabRole = 'owner' | 'follower' | 'connecting' | 'alone';
825
859
  export type TabSkew = 'newer' | 'older';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-spectrum",
3
- "version": "1.77.1",
3
+ "version": "1.78.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,14 +72,14 @@
72
72
  "devDependencies": {
73
73
  "@adobe/spectrum-wc": "2.0.0-beta.5",
74
74
  "@adobe/spectrum-wc-icons": "2.0.0-beta.5",
75
- "@ai-ecoverse/slicc-kernel": "1.97.1",
75
+ "@ai-ecoverse/slicc-kernel": "1.98.0",
76
76
  "@ai-ecoverse/slicc-shared-web": "1.20.0",
77
77
  "@ai-ecoverse/slicc-vault": "1.9.1",
78
78
  "@ai-ecoverse/wasm-bash": "5.3.0-18",
79
79
  "@ai-ecoverse/wasm-coreutils": "9.12.0-7",
80
80
  "@biomejs/biome": "2.5.15",
81
81
  "@fontsource/source-code-pro": "5.3.0",
82
- "@happy-dom/global-registrator": "20.14.5",
82
+ "@happy-dom/global-registrator": "20.14.6",
83
83
  "@pierre/diffs": "1.5.2",
84
84
  "@pierre/trees": "1.0.0-beta.6",
85
85
  "@spectrum-web-components/action-button": "1.12.4",
@@ -102,7 +102,7 @@
102
102
  "@wterm/dom": "0.5.4",
103
103
  "dockview-core": "8.4.1",
104
104
  "esbuild": "0.28.2",
105
- "happy-dom": "20.14.5",
105
+ "happy-dom": "20.14.6",
106
106
  "lefthook": "2.2.1",
107
107
  "lucide": "1.53.0",
108
108
  "monocart-coverage-reports": "2.13.2",