@ai-ecoverse/slicc-spectrum 1.82.0 → 1.84.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.
@@ -15,6 +15,7 @@ export interface SecretRulesVerdict {
15
15
  }
16
16
  export declare function secretRules(command: string, cwd?: string | null): SecretRulesVerdict;
17
17
  export declare function alwaysHint(approval: SudoApproval): string;
18
+ export declare function guestAlwaysHint(approval: GuestMessageApproval | GuestToolApproval): string;
18
19
  export declare function guestAsking(approval: GuestMessageApproval | GuestToolApproval): string;
19
20
  export declare function guestWaiting(approval: GuestMessageApproval | GuestToolApproval): string;
20
21
  export declare function waiting(model: SliccModel | null, now: number): Approval[];
@@ -23,7 +23,8 @@ export interface GateOption {
23
23
  description: string;
24
24
  }
25
25
  export type GateField = 'messages' | 'tools';
26
- export declare function gateOptions(field: GateField, cone: GuestCone): GateOption[];
26
+ export declare function gateOptions(field: GateField, cone: GuestCone, allowed?: readonly GuestGate[]): GateOption[];
27
+ export declare function defaultGate(options: readonly GateOption[]): GuestGate;
27
28
  export declare function guestCones(agents: readonly Agent[]): GuestCone[];
28
29
  export declare function activeCone(agents: readonly Agent[], active: string): string;
29
30
  export declare function guestNameProblem(label: string): string | null;
@@ -85,6 +86,7 @@ export declare class SliccGuestInvite extends LitElement {
85
86
  get result(): Promise<GuestSeat | null>;
86
87
  protected firstUpdated(): void;
87
88
  disconnectedCallback(): void;
89
+ protected willUpdate(): void;
88
90
  create(): Promise<void>;
89
91
  copy(): Promise<void>;
90
92
  render(): TemplateResult;
@@ -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' | 'guest' | 'guest-follower' | 'none';
4
+ export type ApprovalScenario = 'agent' | 'user' | 'many' | 'follower' | 'fail' | 'soon' | 'elsewhere' | 'withdrawn' | 'secrets' | 'guest' | 'guest-follower' | 'guest-always' | '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;
@@ -5,6 +5,7 @@ export type SeatScenario = 'review' | 'reject' | 'off' | 'expiring';
5
5
  export declare const guestOnly = "a guest can only watch and send messages";
6
6
  export declare const guestReview = "Messages from guests need a review, and this agent can't review them yet.";
7
7
  export declare const guestDeclined = "It was declined.";
8
+ export declare const guestApproved = "It was approved.";
8
9
  export declare const guestLabel = "Seat 2 (Mara)";
9
10
  export declare const guestSettingsKey = "slicc-guest-settings";
10
11
  export declare const otherGuest = "Seat 3 (Jonas)";
@@ -1,13 +1,15 @@
1
1
  import { Emitter } from '../model/emitter.js';
2
- import type { GuestDraft, GuestEvents, GuestPort, GuestSeat } from '../model/types.js';
2
+ import type { GuestDraft, GuestEvents, GuestGateChoices, GuestPort, GuestSeat } from '../model/types.js';
3
3
  import type { Clock } from './clock.js';
4
- export type GuestsScenario = 'on' | 'none' | 'unavailable' | 'fail';
4
+ export type GuestsScenario = 'on' | 'none' | 'unavailable' | 'fail' | 'policy';
5
5
  export declare const guestsUnavailable = "Guests need the tray hub. Connect this SLICC to a tray to invite one.";
6
6
  export declare const guestsRefused = "The hub couldn\u2019t make a link right now. Try again in a minute.";
7
+ export declare const guestsPolicy: GuestGateChoices;
7
8
  export declare function guestsFixtures(scenario: GuestsScenario, now?: number): GuestSeat[];
8
9
  export declare class DummyGuests extends Emitter<GuestEvents> implements GuestPort {
9
10
  #private;
10
11
  scenario: GuestsScenario;
12
+ gates?: () => GuestGateChoices;
11
13
  constructor(scenario: GuestsScenario, clock: Clock);
12
14
  list(): readonly GuestSeat[];
13
15
  unavailable(): string | null;
@@ -8,9 +8,9 @@ export type { DummyMount, MountScenario } from './dummy/files.js';
8
8
  export type { FollowScenario } from './dummy/follow.js';
9
9
  export { DummyFollow, followFixtures } from './dummy/follow.js';
10
10
  export type { GuestModel, GuestOptions, SeatScenario } from './dummy/guest.js';
11
- export { createGuestModel, DummyGuestAgent, forecastSprinkle, guestDeclined, guestLabel, guestOnly, guestReview, guestSeat, guestTranscript, otherGuest, } from './dummy/guest.js';
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
- export { DummyGuests, guestsFixtures, guestsRefused, guestsUnavailable, } from './dummy/guests.js';
13
+ export { DummyGuests, guestsFixtures, guestsPolicy, guestsRefused, guestsUnavailable, } from './dummy/guests.js';
14
14
  export type { DummyModel, DummyOptions } from './dummy/index.js';
15
15
  export { createDummyModel } from './dummy/index.js';
16
16
  export type { LeadersScenario, NetworkScenario, TailnetScenario } from './dummy/network.js';
@@ -827,7 +827,7 @@ export interface GuestMessageApproval {
827
827
  }[];
828
828
  createdAt: number;
829
829
  expiresAt: number;
830
- always: false;
830
+ always: boolean;
831
831
  verdict?: ApprovalVerdict;
832
832
  }
833
833
  export interface GuestToolApproval {
@@ -840,7 +840,7 @@ export interface GuestToolApproval {
840
840
  summary: string;
841
841
  createdAt: number;
842
842
  expiresAt: number;
843
- always: false;
843
+ always: boolean;
844
844
  verdict?: ApprovalVerdict;
845
845
  }
846
846
  export type Approval = SudoApproval | GuestMessageApproval | GuestToolApproval;
@@ -1247,6 +1247,10 @@ export interface GuestGates {
1247
1247
  messages: GuestGate;
1248
1248
  tools: GuestGate;
1249
1249
  }
1250
+ export interface GuestGateChoices {
1251
+ messages: readonly GuestGate[];
1252
+ tools: readonly GuestGate[];
1253
+ }
1250
1254
  export interface GuestSeat {
1251
1255
  id: string;
1252
1256
  label: string;
@@ -1281,6 +1285,7 @@ export interface GuestPort extends Subscribable<GuestEvents> {
1281
1285
  }>;
1282
1286
  revoke(id: string): Promise<void>;
1283
1287
  unavailable?(): string | null;
1288
+ gates?(): GuestGateChoices;
1284
1289
  }
1285
1290
  export interface SliccModel {
1286
1291
  agent: AgentPort;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-spectrum",
3
- "version": "1.82.0",
3
+ "version": "1.84.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,10 +72,10 @@
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.103.3",
76
- "@ai-ecoverse/slicc-shared-web": "1.21.0",
75
+ "@ai-ecoverse/slicc-kernel": "1.103.4",
76
+ "@ai-ecoverse/slicc-shared-web": "1.21.1",
77
77
  "@ai-ecoverse/slicc-vault": "1.9.1",
78
- "@ai-ecoverse/wasm-bash": "5.3.0-18",
78
+ "@ai-ecoverse/wasm-bash": "5.3.0-19",
79
79
  "@ai-ecoverse/wasm-coreutils": "9.12.0-8",
80
80
  "@biomejs/biome": "2.5.15",
81
81
  "@fontsource/source-code-pro": "5.3.0",