@ai-ecoverse/slicc-spectrum 1.65.2 → 1.66.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.
@@ -0,0 +1,5 @@
1
+ import type { Account, RecordKind } from '../model/types.js';
2
+ export declare const upper: (text: string) => string;
3
+ export declare function serverOf(account: Account): string;
4
+ export declare function recordKind(account: Account): RecordKind;
5
+ export declare function recordName(account: Account): string;
@@ -7,7 +7,7 @@ import '@adobe/spectrum-wc-icons/swc-icon-info-circle.js';
7
7
  import '@spectrum-web-components/menu/sp-menu-item.js';
8
8
  import '@spectrum-web-components/picker/sp-picker.js';
9
9
  import { nothing, type PropertyValues, type TemplateResult } from 'lit';
10
- import type { AuditEntry, ImportCandidate, ImportKind, LinkedDevice, PendingRequest, PolicyEntry, SecretView, SliccModel, VaultPort } from '../model/types.js';
10
+ import type { AuditEntry, ImportCandidate, ImportKind, LinkedDevice, PendingRequest, PolicyEntry, PutOptions, SecretView, SliccModel, VaultPort } from '../model/types.js';
11
11
  import { ThemedElement } from './base.js';
12
12
  import { type PopupDetail } from './vault.js';
13
13
  export declare function until(at: number, now?: number): string;
@@ -17,6 +17,8 @@ export declare function who(entry: {
17
17
  }): string;
18
18
  export declare function asker(request: PendingRequest): string;
19
19
  export declare function asking(request: PendingRequest): TemplateResult;
20
+ export declare function putOptions(secret: SecretView): PutOptions | undefined;
21
+ export declare function agentUse(secret: SecretView): boolean;
20
22
  export declare function byName(a: SecretView, b: SecretView): number;
21
23
  export declare function sourceLine(secret: SecretView, devices: readonly LinkedDevice[]): string;
22
24
  export declare function revealed(name: string, entries: readonly AuditEntry[], now?: number, more?: boolean): TemplateResult | null;
@@ -31,6 +33,7 @@ export type SecretForm = {
31
33
  } | {
32
34
  kind: 'replace';
33
35
  name: string;
36
+ options?: PutOptions;
34
37
  } | {
35
38
  kind: 'import';
36
39
  } | {
@@ -2,9 +2,9 @@ import '@adobe/spectrum-wc/components/button/swc-button.js';
2
2
  import '@adobe/spectrum-wc/components/status-light/swc-status-light.js';
3
3
  import '@adobe/spectrum-wc-icons/swc-icon-alert-triangle.js';
4
4
  import { type TemplateResult } from 'lit';
5
- import type { SliccModel } from '../model/types.js';
6
- import { ModelElement } from './base.js';
7
- export declare class SliccSettings extends ModelElement {
5
+ import type { Account, SliccModel } from '../model/types.js';
6
+ import { ThemedElement } from './base.js';
7
+ export declare class SliccSettings extends ThemedElement {
8
8
  #private;
9
9
  static properties: {
10
10
  model: {
@@ -19,6 +19,12 @@ export declare class SliccSettings extends ModelElement {
19
19
  failure: {
20
20
  state: boolean;
21
21
  };
22
+ problem: {
23
+ state: boolean;
24
+ };
25
+ blocked: {
26
+ state: boolean;
27
+ };
22
28
  };
23
29
  pending: ReadonlySet<string>;
24
30
  entering: string | null;
@@ -26,11 +32,18 @@ export declare class SliccSettings extends ModelElement {
26
32
  id: string;
27
33
  message: string;
28
34
  } | null;
35
+ problem: {
36
+ id: string;
37
+ field: string;
38
+ message: string;
39
+ } | null;
40
+ blocked: boolean;
29
41
  constructor();
30
42
  static styles: import("lit").CSSResult[];
31
43
  protected subscribe(model: SliccModel): Array<() => void>;
32
44
  focus(): void;
33
- connect(id: string, secret?: string): Promise<void>;
45
+ connect(id: string, secret?: string, fields?: Record<string, string>): Promise<void>;
46
+ keep(account: Account, value: string, fields?: Record<string, string>): Promise<void>;
34
47
  get busyReason(): string | null;
35
48
  render(): TemplateResult;
36
49
  }
@@ -1,4 +1,4 @@
1
- import type { AgentHold, SliccModel } from '../model/types.js';
1
+ import type { Account, AgentHold, SliccModel } from '../model/types.js';
2
2
  import { type ApprovalScenario, DummyApprovals } from './approvals.js';
3
3
  import { type BrowserScenario, DummyBrowser } from './browser.js';
4
4
  import { type ChangesScenario } from './changes.js';
@@ -25,6 +25,7 @@ export interface DummyOptions {
25
25
  approvals?: ApprovalScenario | 'off';
26
26
  follow?: FollowScenario | 'off';
27
27
  vault?: VaultScenario | 'off';
28
+ accounts?: 'settings' | 'vault';
28
29
  hold?: AgentHold['reason'] | 'off';
29
30
  browser?: BrowserScenario;
30
31
  sprinkles?: 'builtin' | 'cones';
@@ -40,4 +41,5 @@ export interface DummyModel extends SliccModel {
40
41
  follow?: DummyFollow;
41
42
  vault?: DummyVault;
42
43
  }
43
- export declare function createDummyModel({ delay, storage, updates, packages, confirm, mounts, network, tailnet, links, changes, notices, tabs, approvals, follow, vault, hold, browser: scenario, sprinkles, monitor, }?: DummyOptions): DummyModel;
44
+ export declare function vaultAccounts(accounts: readonly Account[]): Account[];
45
+ export declare function createDummyModel({ delay, storage, updates, packages, confirm, mounts, network, tailnet, links, changes, notices, tabs, approvals, follow, vault, accounts, hold, browser: scenario, sprinkles, monitor, }?: DummyOptions): DummyModel;
@@ -1,8 +1,9 @@
1
1
  import { Emitter } from '../model/emitter.js';
2
- import type { AuditEntry, AuditPage, Availability, ButtonConfig, ButtonEvent, ButtonMessage, ErrorCode, ImportKind, ImportPick, ImportResult, PolicyNotice, PopupIntent, RecordKind, RefusedRule, RequestState, SealResult, SecretView, VaultButton, VaultEvents, VaultList, VaultPort, VaultStatus } from '../model/types.js';
2
+ import type { AuditEntry, AuditPage, Availability, ButtonConfig, ButtonEvent, ButtonMessage, ErrorCode, ImportKind, ImportPick, ImportResult, PolicyNotice, PopupIntent, PutOptions, RecordKind, RefusedRule, RequestState, SealResult, SecretView, VaultButton, VaultEvents, VaultList, VaultPort, VaultStatus } from '../model/types.js';
3
3
  import type { Clock } from './clock.js';
4
4
  export type VaultScenario = 'empty' | 'secrets' | 'policy' | 'notice' | 'locked' | 'request' | 'backup' | 'waiting';
5
5
  export declare function vaultSecrets(now?: number): SecretView[];
6
+ export declare function accountRecords(now?: number): SecretView[];
6
7
  export declare function vaultAudit(now?: number): AuditEntry[];
7
8
  export declare function vaultOlder(now?: number): AuditEntry[];
8
9
  export declare function vaultRefused(): RefusedRule[];
@@ -32,12 +33,13 @@ export declare class DummyVault extends Emitter<VaultEvents> implements VaultPor
32
33
  puts: {
33
34
  name: string;
34
35
  request?: string;
36
+ options?: PutOptions;
35
37
  }[];
36
38
  cancelled: string[];
37
39
  imports: DummyImport[];
38
40
  exported: number;
39
41
  acknowledged: string[];
40
- constructor(scenario: VaultScenario, time: Clock);
42
+ constructor(scenario: VaultScenario, time: Clock, records?: readonly SecretView[]);
41
43
  status(): VaultStatus | null;
42
44
  list(): VaultList | null;
43
45
  availability(): Availability;
@@ -46,7 +48,7 @@ export declare class DummyVault extends Emitter<VaultEvents> implements VaultPor
46
48
  acknowledge(notice: string): Promise<void>;
47
49
  dismissBackupReminder(): Promise<void>;
48
50
  audit(before?: number, limit?: number): Promise<AuditPage>;
49
- put(name: string, value: string, request?: string): Promise<SealResult>;
51
+ put(name: string, value: string, request?: string, options?: PutOptions): Promise<SealResult>;
50
52
  cancel(request: string): Promise<RequestState>;
51
53
  remove(name: string, kind?: RecordKind): Promise<SealResult>;
52
54
  restore(name: string, kind?: RecordKind): Promise<SealResult>;
@@ -415,6 +415,13 @@ export interface Account {
415
415
  needs?: 'cors-free-transport';
416
416
  group?: 'providers' | 'mcp';
417
417
  secret?: 'api-key' | 'token';
418
+ store?: 'vault';
419
+ fields?: AccountField[];
420
+ }
421
+ export interface AccountField {
422
+ name: string;
423
+ label: string;
424
+ required?: boolean;
418
425
  }
419
426
  export interface ModelOption {
420
427
  id: string;
@@ -434,7 +441,7 @@ export interface SettingsPort extends Subscribable<SettingsEvents> {
434
441
  update(patch: Partial<Settings>): void;
435
442
  models(): readonly ModelOption[];
436
443
  accounts(): readonly Account[];
437
- connect(id: string, secret?: string): Promise<void>;
444
+ connect(id: string, secret?: string, fields?: Record<string, string>): Promise<void>;
438
445
  disconnect(id: string): void;
439
446
  cancel?(id: string): void;
440
447
  }
@@ -857,6 +864,8 @@ export interface SecretView {
857
864
  sourceDevice: DeviceId | null;
858
865
  provider?: string;
859
866
  account?: string;
867
+ server?: string;
868
+ settings?: Record<string, string>;
860
869
  domains: string[];
861
870
  rules: Rule[];
862
871
  exits?: ExitName[];
@@ -1150,13 +1159,19 @@ export interface VaultEvents {
1150
1159
  notice: PolicyNotice;
1151
1160
  availability: Availability;
1152
1161
  }
1162
+ export interface PutOptions {
1163
+ kind?: 'secret' | 'model' | 'mcp';
1164
+ provider?: string;
1165
+ server?: string;
1166
+ settings?: Record<string, string>;
1167
+ }
1153
1168
  export interface VaultPort extends Subscribable<VaultEvents> {
1154
1169
  status(): VaultStatus | null;
1155
1170
  list(): VaultList | null;
1156
1171
  audit(before?: number, limit?: number): Promise<AuditPage>;
1157
1172
  acknowledge?(notice: string): Promise<void>;
1158
1173
  availability?(): Availability;
1159
- put?(name: string, value: string, request?: string): Promise<SealResult>;
1174
+ put?(name: string, value: string, request?: string, options?: PutOptions): Promise<SealResult>;
1160
1175
  cancel?(request: string): Promise<RequestState>;
1161
1176
  remove?(name: string, kind?: RecordKind): Promise<SealResult>;
1162
1177
  restore?(name: string, kind?: RecordKind): Promise<SealResult>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-spectrum",
3
- "version": "1.65.2",
3
+ "version": "1.66.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",
@@ -74,8 +74,8 @@
74
74
  "@adobe/spectrum-wc-icons": "2.0.0-beta.4",
75
75
  "@ai-ecoverse/slicc-kernel": "1.73.1",
76
76
  "@ai-ecoverse/slicc-shared-web": "1.13.1",
77
- "@ai-ecoverse/slicc-vault": "1.7.2",
78
- "@ai-ecoverse/wasm-bash": "5.3.0-17",
77
+ "@ai-ecoverse/slicc-vault": "1.8.0",
78
+ "@ai-ecoverse/wasm-bash": "5.3.0-18",
79
79
  "@ai-ecoverse/wasm-coreutils": "9.7.0-3",
80
80
  "@biomejs/biome": "2.5.15",
81
81
  "@fontsource/source-code-pro": "5.3.0",