@ai-ecoverse/slicc-spectrum 1.63.0 → 1.64.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.
@@ -9,7 +9,7 @@ import '@adobe/spectrum-wc-icons/swc-icon-file.js';
9
9
  import '@adobe/spectrum-wc-icons/swc-icon-file-text.js';
10
10
  import '@adobe/spectrum-wc-icons/swc-icon-lock.js';
11
11
  import { type PropertyValues, type TemplateResult } from 'lit';
12
- import type { Attachment, Outgoing, SendMode, SliccModel } from '../model/types.js';
12
+ import type { Attachment, Outgoing, SendMode, SliccModel, VaultPort } from '../model/types.js';
13
13
  import { ThemedElement } from './base.js';
14
14
  export declare const limit: number;
15
15
  export interface Choice {
@@ -42,6 +42,7 @@ export declare function trigger(text: string, caret: number): {
42
42
  start: number;
43
43
  query: string;
44
44
  } | null;
45
+ export declare function blocked(vault: VaultPort): string | null;
45
46
  export declare class SliccComposer extends ThemedElement {
46
47
  #private;
47
48
  static properties: {
@@ -63,6 +64,15 @@ export declare class SliccComposer extends ThemedElement {
63
64
  blocked: {
64
65
  state: boolean;
65
66
  };
67
+ sharing: {
68
+ state: boolean;
69
+ };
70
+ secretError: {
71
+ state: boolean;
72
+ };
73
+ secretField: {
74
+ state: boolean;
75
+ };
66
76
  agent: {};
67
77
  };
68
78
  value: string;
@@ -70,12 +80,16 @@ export declare class SliccComposer extends ThemedElement {
70
80
  popup: Popup | null;
71
81
  dictating: boolean;
72
82
  blocked: boolean;
83
+ sharing: boolean;
84
+ secretError: string | null;
85
+ secretField: string | null;
73
86
  agent: string;
74
87
  constructor();
75
88
  static styles: import("lit").CSSResult[];
76
89
  protected willUpdate(changed: PropertyValues<this>): void;
77
90
  connectedCallback(): void;
78
91
  protected firstUpdated(): void;
92
+ disconnectedCallback(): void;
79
93
  protected updated(changed: Map<string, unknown>): void;
80
94
  protected subscribe(model: SliccModel): Array<() => void>;
81
95
  focus(): void;
@@ -85,7 +99,7 @@ export declare class SliccComposer extends ThemedElement {
85
99
  detach(id: string): void;
86
100
  screenshot(): Promise<void>;
87
101
  attachPath(path: string): Promise<void>;
88
- shareSecret(name: string): void;
102
+ shareSecret(name: string, field?: HTMLInputElement | null): Promise<void>;
89
103
  openPopup(kind: 'file' | 'secret'): void;
90
104
  pick(choice: Choice): void;
91
105
  dictate(): void;
@@ -1,9 +1,13 @@
1
1
  import '@adobe/spectrum-wc/components/badge/swc-badge.js';
2
2
  import '@adobe/spectrum-wc/components/button/swc-button.js';
3
+ import '@adobe/spectrum-wc/components/progress-circle/swc-progress-circle.js';
3
4
  import '@adobe/spectrum-wc/components/status-light/swc-status-light.js';
4
5
  import '@adobe/spectrum-wc-icons/swc-icon-alert-triangle.js';
6
+ import '@adobe/spectrum-wc-icons/swc-icon-info-circle.js';
7
+ import '@spectrum-web-components/menu/sp-menu-item.js';
8
+ import '@spectrum-web-components/picker/sp-picker.js';
5
9
  import { nothing, type PropertyValues, type TemplateResult } from 'lit';
6
- import type { AuditEntry, LinkedDevice, PolicyNotice, SecretView, SliccModel, VaultPort } from '../model/types.js';
10
+ import type { AuditEntry, ImportCandidate, ImportKind, LinkedDevice, PendingRequest, PolicyEntry, SecretView, SliccModel, VaultPort } from '../model/types.js';
7
11
  import { ThemedElement } from './base.js';
8
12
  import { type PopupDetail } from './vault.js';
9
13
  export declare function until(at: number, now?: number): string;
@@ -11,10 +15,42 @@ export declare function who(entry: {
11
15
  uid: number | null;
12
16
  tag: string | null;
13
17
  }): string;
18
+ export declare function asker(request: PendingRequest): string;
19
+ export declare function asking(request: PendingRequest): TemplateResult;
20
+ export declare function byName(a: SecretView, b: SecretView): number;
14
21
  export declare function sourceLine(secret: SecretView, devices: readonly LinkedDevice[]): string;
15
22
  export declare function revealed(name: string, entries: readonly AuditEntry[], now?: number, more?: boolean): TemplateResult | null;
23
+ export declare function changes(entry: PolicyEntry, devices: readonly LinkedDevice[]): string[][];
16
24
  export declare function auditLine(entry: AuditEntry, devices: readonly LinkedDevice[]): TemplateResult;
17
25
  export declare function merged(...pages: ReadonlyArray<readonly AuditEntry[]>): AuditEntry[];
26
+ export declare function replaceable(secret: SecretView): boolean;
27
+ export declare function filename(now?: number): string;
28
+ export declare function download(bytes: Uint8Array, name: string, root: Node): void;
29
+ export type SecretForm = {
30
+ kind: 'add';
31
+ } | {
32
+ kind: 'replace';
33
+ name: string;
34
+ } | {
35
+ kind: 'import';
36
+ } | {
37
+ kind: 'export';
38
+ };
39
+ export type Said = {
40
+ kind: 'saved';
41
+ name: string;
42
+ } | {
43
+ kind: 'imported';
44
+ imported: number;
45
+ skipped: {
46
+ name: string;
47
+ reason?: string;
48
+ }[];
49
+ } | {
50
+ kind: 'exported';
51
+ file: string;
52
+ };
53
+ export declare function exported(at: number | null | undefined): TemplateResult | typeof nothing;
18
54
  export declare function prompt(text: string): string;
19
55
  export declare class SliccSecrets extends ThemedElement {
20
56
  #private;
@@ -37,10 +73,37 @@ export declare class SliccSecrets extends ThemedElement {
37
73
  popup: {
38
74
  state: boolean;
39
75
  };
40
- acking: {
76
+ failure: {
41
77
  state: boolean;
42
78
  };
43
- failure: {
79
+ form: {
80
+ state: boolean;
81
+ };
82
+ busy: {
83
+ state: boolean;
84
+ };
85
+ problem: {
86
+ state: boolean;
87
+ };
88
+ invalid: {
89
+ state: boolean;
90
+ };
91
+ said: {
92
+ state: boolean;
93
+ };
94
+ acting: {
95
+ state: boolean;
96
+ };
97
+ importKind: {
98
+ state: boolean;
99
+ };
100
+ candidates: {
101
+ state: boolean;
102
+ };
103
+ picked: {
104
+ state: boolean;
105
+ };
106
+ again: {
44
107
  state: boolean;
45
108
  };
46
109
  };
@@ -49,15 +112,33 @@ export declare class SliccSecrets extends ThemedElement {
49
112
  loading: boolean;
50
113
  reveals: boolean;
51
114
  popup: PopupDetail | null;
52
- acking: ReadonlySet<string>;
53
115
  failure: string | null;
116
+ form: SecretForm | null;
117
+ busy: boolean;
118
+ problem: string | null;
119
+ invalid: string | null;
120
+ said: Said | null;
121
+ acting: ReadonlySet<string>;
122
+ importKind: ImportKind;
123
+ candidates: readonly ImportCandidate[] | null;
124
+ picked: ReadonlySet<string>;
125
+ again: boolean;
54
126
  constructor();
55
- static styles: import("lit").CSSResult;
127
+ static styles: import("lit").CSSResult[];
56
128
  disconnectedCallback(): void;
57
129
  protected willUpdate(changed: PropertyValues): void;
58
130
  protected updated(): void;
59
131
  protected subscribe(model: SliccModel): Array<() => void>;
132
+ open(form: SecretForm | null): void;
133
+ save(vault: VaultPort): Promise<void>;
134
+ removeSecret(vault: VaultPort, secret: SecretView, trigger?: HTMLElement | null): Promise<void>;
135
+ restoreSecret(vault: VaultPort, secret: SecretView): Promise<void>;
136
+ cancelRequest(vault: VaultPort, id: string): Promise<void>;
137
+ lockVault(vault: VaultPort): Promise<void>;
138
+ dismissBackup(vault: VaultPort): Promise<void>;
139
+ answer(id: string): void;
140
+ read(vault: VaultPort): Promise<void>;
141
+ exportAll(vault: VaultPort, trigger?: HTMLElement | null): Promise<void>;
60
142
  showOlder(vault: VaultPort, entries: readonly AuditEntry[]): Promise<void>;
61
- acknowledge(vault: VaultPort, notice: PolicyNotice): Promise<void>;
62
143
  render(): TemplateResult | typeof nothing;
63
144
  }
@@ -0,0 +1,47 @@
1
+ import '@adobe/spectrum-wc/components/button/swc-button.js';
2
+ import '@adobe/spectrum-wc-icons/swc-icon-alert-triangle.js';
3
+ import '@spectrum-web-components/alert-dialog/sp-alert-dialog.js';
4
+ import { type PropertyValues } from 'lit';
5
+ import type { PendingRequest, SliccModel, VaultPort } from '../model/types.js';
6
+ import { ThemedElement } from './base.js';
7
+ export declare function valueRequests(vault: VaultPort | undefined, now: number): PendingRequest[];
8
+ export declare class SliccValueRequest extends ThemedElement {
9
+ #private;
10
+ static properties: {
11
+ model: {
12
+ attribute: boolean;
13
+ };
14
+ now: {
15
+ state: boolean;
16
+ };
17
+ busy: {
18
+ state: boolean;
19
+ };
20
+ problem: {
21
+ state: boolean;
22
+ };
23
+ blocked: {
24
+ state: boolean;
25
+ };
26
+ };
27
+ now: number;
28
+ busy: boolean;
29
+ problem: {
30
+ id: string;
31
+ text: string;
32
+ field?: string;
33
+ } | null;
34
+ blocked: boolean;
35
+ constructor();
36
+ static styles: import("lit").CSSResult[];
37
+ connectedCallback(): void;
38
+ disconnectedCallback(): void;
39
+ protected subscribe(model: SliccModel): Array<() => void>;
40
+ reopen(id: string): void;
41
+ later(id: string): void;
42
+ save(request: PendingRequest): Promise<void>;
43
+ cancelRequest(request: PendingRequest): Promise<void>;
44
+ protected willUpdate(changed: PropertyValues): void;
45
+ protected updated(changed: PropertyValues): void;
46
+ render(): unknown;
47
+ }
@@ -1,19 +1,25 @@
1
1
  import { LitElement, type PropertyValues } from 'lit';
2
- import type { ButtonConfig, ExecGrant, ExitName, LinkedDevice, PopupIntent, PopupResult, PopupState, Rule, SliccModel, VaultPort, Widening } from '../model/types.js';
2
+ import type { ButtonConfig, ExecGrant, ExecMode, ExitName, LinkedDevice, PolicyChange, PopupIntent, PopupState, Rule, SliccModel, VaultPort, Widening } from '../model/types.js';
3
3
  export declare function devicesOf(model: SliccModel | null): readonly LinkedDevice[];
4
4
  export declare function deviceName(id: string, devices: readonly LinkedDevice[]): string;
5
5
  export declare function exitLabel(exit: ExitName, devices: readonly LinkedDevice[]): string;
6
6
  export declare function list(items: readonly string[]): string;
7
7
  export declare function ruleLine(rule: Rule): string;
8
8
  export declare function shellWord(word: string): string;
9
- export declare function execLine(grant: ExecGrant): string;
9
+ export declare function execLine(exec: ExecMode | ExecGrant, argv?: readonly string[][]): string | null;
10
+ export declare function changeLine(change: PolicyChange, devices: readonly LinkedDevice[]): string;
10
11
  export declare function widening(change: Widening, devices: readonly LinkedDevice[]): string;
12
+ export declare function failureText(error: unknown): string;
13
+ export declare function fieldOf(error: unknown, field: string): string | null;
14
+ export declare function away(vault: VaultPort): boolean;
15
+ export declare function take(input: HTMLInputElement): string;
16
+ export declare function clearValues(root: ParentNode): void;
17
+ export declare const fieldStyles: import("lit").CSSResult;
11
18
  export declare function tabbables(root: ParentNode, stop: Element, out?: Array<HTMLElement | null>): Array<HTMLElement | null>;
12
19
  export declare function sequential(order: Array<HTMLElement | null>): Array<HTMLElement | null>;
13
20
  export interface PopupDetail {
14
21
  intent: PopupIntent;
15
22
  state: PopupState;
16
- result?: PopupResult;
17
23
  }
18
24
  export declare class SliccVaultButton extends LitElement {
19
25
  #private;
@@ -1,10 +1,12 @@
1
1
  import { Emitter } from '../model/emitter.js';
2
- import type { AuditEntry, AuditPage, ButtonConfig, ButtonEvent, ButtonMessage, PolicyNotice, 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, RecordKind, RefusedRule, RequestState, SealResult, SecretView, VaultButton, VaultEvents, VaultList, VaultPort, VaultStatus } from '../model/types.js';
3
3
  import type { Clock } from './clock.js';
4
- export type VaultScenario = 'empty' | 'secrets' | 'notice' | 'locked';
4
+ export type VaultScenario = 'empty' | 'secrets' | 'policy' | 'notice' | 'locked' | 'request' | 'backup' | 'waiting';
5
5
  export declare function vaultSecrets(now?: number): SecretView[];
6
6
  export declare function vaultAudit(now?: number): AuditEntry[];
7
7
  export declare function vaultOlder(now?: number): AuditEntry[];
8
+ export declare function vaultRefused(): RefusedRule[];
9
+ export declare function vaultPolicy(now?: number): AuditEntry;
8
10
  export declare function vaultNotice(now?: number): PolicyNotice;
9
11
  export declare function vaultFixtures(scenario: VaultScenario, now?: number): {
10
12
  status: VaultStatus;
@@ -18,25 +20,44 @@ export declare class DummyVaultButton implements VaultButton {
18
20
  post(message: ButtonMessage): void;
19
21
  listen(listener: (event: ButtonEvent) => void): () => void;
20
22
  }
23
+ export interface DummyImport {
24
+ kind: ImportKind;
25
+ size: number;
26
+ password: boolean;
27
+ pick?: ImportPick[];
28
+ }
21
29
  export declare class DummyVault extends Emitter<VaultEvents> implements VaultPort {
22
30
  #private;
23
31
  buttons: DummyVaultButton[];
32
+ puts: {
33
+ name: string;
34
+ request?: string;
35
+ }[];
36
+ cancelled: string[];
37
+ imports: DummyImport[];
38
+ exported: number;
24
39
  acknowledged: string[];
25
40
  constructor(scenario: VaultScenario, time: Clock);
26
- status(): VaultStatus;
27
- list(): VaultList;
28
- audit(before?: number, limit?: number): Promise<AuditPage>;
41
+ status(): VaultStatus | null;
42
+ list(): VaultList | null;
43
+ availability(): Availability;
44
+ arrive(): void;
45
+ fail(code: ErrorCode, message: string): void;
29
46
  acknowledge(notice: string): Promise<void>;
47
+ dismissBackupReminder(): Promise<void>;
48
+ audit(before?: number, limit?: number): Promise<AuditPage>;
49
+ put(name: string, value: string, request?: string): Promise<SealResult>;
50
+ cancel(request: string): Promise<RequestState>;
51
+ remove(name: string, kind?: RecordKind): Promise<SealResult>;
52
+ restore(name: string, kind?: RecordKind): Promise<SealResult>;
53
+ import(kind: ImportKind, bytes: Uint8Array, options?: {
54
+ password?: string;
55
+ pick?: ImportPick[];
56
+ }): Promise<ImportResult>;
57
+ export(passphrase: string): Promise<Uint8Array>;
58
+ lock(): Promise<void>;
30
59
  button(): DummyVaultButton;
31
60
  autoLabel(): string;
32
- autoIntent(): {
33
- kind: 'unlock';
34
- } | {
35
- kind: 'manage';
36
- };
37
- answer(intent: Exclude<ButtonConfig['intent'], 'auto'>): Promise<{
38
- name: string;
39
- placeholder: string;
40
- state: 'active';
41
- } | null>;
61
+ autoIntent(): PopupIntent;
62
+ answer(intent: PopupIntent): Promise<void>;
42
63
  }
@@ -18,4 +18,4 @@ export { DummyTabs, tabsFixtures } from './dummy/tabs.js';
18
18
  export type { DummyUpdatesOptions, PackageConfirm, PackageScenario, UpdateScenario, } from './dummy/updates.js';
19
19
  export { DummyUpdates, packageFixtures, updateFixtures } from './dummy/updates.js';
20
20
  export type { VaultScenario } from './dummy/vault.js';
21
- export { DummyVault, DummyVaultButton, vaultAudit, vaultFixtures, vaultNotice, vaultOlder, vaultSecrets, } from './dummy/vault.js';
21
+ export { DummyVault, DummyVaultButton, vaultAudit, vaultFixtures, vaultNotice, vaultOlder, vaultPolicy, vaultRefused, vaultSecrets, } from './dummy/vault.js';
@@ -822,19 +822,32 @@ export interface FollowPort extends Subscribable<{
822
822
  export type DeviceId = string;
823
823
  export type RecordKind = 'secret' | 'grant' | 'model' | 'mcp';
824
824
  export type RecordState = 'active' | 'inert' | 'removed';
825
- export type RecordSource = 'popup' | 'process' | `jerk:${string}@${DeviceId}` | `oauth:${string}` | `import:${string}`;
825
+ export type RecordSource = 'settings' | 'popup' | 'process' | `jerk:${string}@${DeviceId}` | `oauth:${string}` | `import:${string}`;
826
826
  export type LockMode = 'auto' | 'passkey' | 'passphrase';
827
827
  export type RequestKind = 'value' | 'oauth' | 'jerk-seal';
828
- export type ExitName = 'vault-direct' | 'local-proxy' | 'cli-v' | 'tailscale' | 'local-link' | `device:${DeviceId}`;
828
+ export type RequestState = 'pending' | 'done' | 'cancelled' | 'expired';
829
+ export type ErrorCode = 'EINVAL' | 'ENOENT' | 'EACCES' | 'EEXIST' | 'EAGAIN' | 'ETIMEDOUT' | 'ENOTCONN' | 'ENOTSUP';
830
+ export interface VaultError {
831
+ code: ErrorCode;
832
+ message: string;
833
+ }
834
+ export type VaultFailure = Error & VaultError;
835
+ export type ExitName = 'page' | 'proxy' | 'vault-direct' | 'local-proxy' | 'cli-v' | 'tailscale' | 'local-link' | `device:${DeviceId}`;
829
836
  export type ExecGrant = boolean | {
830
837
  argv: string[][];
831
838
  };
839
+ export type ExecMode = false | 'any' | 'argv' | 'shell';
832
840
  export interface Rule {
833
841
  domain: string;
834
842
  header: string;
835
843
  methods: string[];
836
844
  paths: string[];
837
845
  }
846
+ export interface RefusedRule {
847
+ secret: string;
848
+ rule: Rule;
849
+ reason: string;
850
+ }
838
851
  export interface SecretView {
839
852
  name: string;
840
853
  kind: RecordKind;
@@ -846,8 +859,9 @@ export interface SecretView {
846
859
  account?: string;
847
860
  domains: string[];
848
861
  rules: Rule[];
849
- exits: ExitName[];
850
- exec: ExecGrant;
862
+ exits?: ExitName[];
863
+ exec: ExecMode | ExecGrant;
864
+ execArgv?: string[][];
851
865
  createdAt: number;
852
866
  usedAt?: number;
853
867
  expiresAt?: number;
@@ -864,15 +878,25 @@ export interface PendingRequest {
864
878
  createdAt: number;
865
879
  expiresAt: number;
866
880
  }
881
+ export interface ScrubState {
882
+ needed: boolean;
883
+ version: number;
884
+ ready: boolean;
885
+ }
886
+ export type BackupReminder = 'due' | 'dismissed' | null;
867
887
  export interface VaultStatus {
868
888
  version: string;
869
889
  protocol: 1;
870
890
  origin: string;
871
891
  locked: boolean;
872
892
  lock: LockMode;
893
+ scrub?: ScrubState;
873
894
  waiting: PendingRequest[];
874
- notices: number;
895
+ notices?: number;
896
+ exportedAt?: number | null;
897
+ backupReminder?: BackupReminder;
875
898
  }
899
+ export type Availability = 'connecting' | 'waiting' | 'locked' | 'ready';
876
900
  export type Widening = {
877
901
  kind: 'rule';
878
902
  secret: string;
@@ -901,6 +925,27 @@ export type Widening = {
901
925
  from: number;
902
926
  to: number;
903
927
  };
928
+ export type PolicyChange = {
929
+ kind: 'rule';
930
+ secret: string;
931
+ rule: Rule;
932
+ change: 'added' | 'removed';
933
+ } | {
934
+ kind: 'exec';
935
+ secret: string;
936
+ from: ExecMode;
937
+ to: ExecMode;
938
+ } | {
939
+ kind: 'exits';
940
+ secret: string;
941
+ from: ExitName[] | null;
942
+ to: ExitName[] | null;
943
+ } | {
944
+ kind: 'limits';
945
+ field: string;
946
+ from: number;
947
+ to: number;
948
+ };
904
949
  export type PolicyFile = '/etc/fnox/config.toml' | '/etc/slicc/secrets-policy.toml';
905
950
  export interface PolicyNotice {
906
951
  id: string;
@@ -928,7 +973,8 @@ export interface InjectionEntry extends AuditBase {
928
973
  }
929
974
  export interface RevealEntry extends AuditBase {
930
975
  type: 'materialize';
931
- grant: ExecGrant;
976
+ grant?: ExecGrant;
977
+ exec?: ExecMode;
932
978
  path: string;
933
979
  argv: string;
934
980
  argvSha256: string;
@@ -946,6 +992,10 @@ export interface SealEntry extends AuditBase {
946
992
  export interface RemoveEntry extends AuditBase {
947
993
  type: 'remove' | 'restore';
948
994
  }
995
+ export interface RefreshEntry extends AuditBase {
996
+ type: 'refresh';
997
+ grant?: string;
998
+ }
949
999
  export interface PolicyEntry {
950
1000
  type: 'policy';
951
1001
  seq: number;
@@ -954,23 +1004,62 @@ export interface PolicyEntry {
954
1004
  file: PolicyFile;
955
1005
  sha256: string;
956
1006
  accepted: boolean;
957
- widened: Widening[];
1007
+ widened?: Widening[];
1008
+ changes?: PolicyChange[];
958
1009
  warning?: string;
959
1010
  }
960
- export type AuditEntry = InjectionEntry | RevealEntry | SealEntry | RemoveEntry | PolicyEntry;
1011
+ export type AuditEntry = InjectionEntry | RevealEntry | SealEntry | RemoveEntry | RefreshEntry | PolicyEntry;
961
1012
  export interface AuditPage {
962
1013
  audit: AuditEntry[];
963
1014
  more: boolean;
964
1015
  next?: number;
965
1016
  }
1017
+ export interface ExitPolicyView {
1018
+ file: '/etc/slicc/secrets-policy.toml';
1019
+ sha256: string | null;
1020
+ restricted: {
1021
+ name: string;
1022
+ exits: ExitName[];
1023
+ }[];
1024
+ }
966
1025
  export interface VaultList {
967
1026
  secrets: SecretView[];
968
- notices: PolicyNotice[];
1027
+ notices?: PolicyNotice[];
1028
+ refused?: RefusedRule[];
969
1029
  audit: AuditEntry[];
970
1030
  auditMore: boolean;
1031
+ exits?: ExitPolicyView;
1032
+ }
1033
+ export interface SealResult {
1034
+ name: string;
1035
+ placeholder: string;
1036
+ state: RecordState;
1037
+ }
1038
+ export type ImportKind = 'bundle' | 'keepass' | 'six';
1039
+ export interface ImportCandidate {
1040
+ name: string;
1041
+ kind?: RecordKind;
1042
+ exists: boolean;
1043
+ suggestedRules?: string;
1044
+ refused?: string;
971
1045
  }
1046
+ export type ImportPick = string | {
1047
+ name: string;
1048
+ kind: RecordKind;
1049
+ };
1050
+ export type ImportResult = {
1051
+ stage: 'pick';
1052
+ candidates: ImportCandidate[];
1053
+ } | {
1054
+ stage: 'done';
1055
+ imported: SealResult[];
1056
+ skipped: string[];
1057
+ reasons?: Record<string, string>;
1058
+ };
972
1059
  export type PopupIntent = {
973
1060
  kind: 'unlock';
1061
+ } | {
1062
+ kind: 'protect';
974
1063
  } | {
975
1064
  kind: 'enter';
976
1065
  name: string;
@@ -1051,12 +1140,25 @@ export interface VaultEvents {
1051
1140
  status: VaultStatus;
1052
1141
  list: VaultList;
1053
1142
  notice: PolicyNotice;
1143
+ availability: Availability;
1054
1144
  }
1055
1145
  export interface VaultPort extends Subscribable<VaultEvents> {
1056
1146
  status(): VaultStatus | null;
1057
1147
  list(): VaultList | null;
1058
1148
  audit(before?: number, limit?: number): Promise<AuditPage>;
1059
- acknowledge(notice: string): Promise<void>;
1149
+ acknowledge?(notice: string): Promise<void>;
1150
+ availability?(): Availability;
1151
+ put?(name: string, value: string, request?: string): Promise<SealResult>;
1152
+ cancel?(request: string): Promise<RequestState>;
1153
+ remove?(name: string, kind?: RecordKind): Promise<SealResult>;
1154
+ restore?(name: string, kind?: RecordKind): Promise<SealResult>;
1155
+ import?(kind: ImportKind, bytes: Uint8Array, options?: {
1156
+ password?: string;
1157
+ pick?: ImportPick[];
1158
+ }): Promise<ImportResult>;
1159
+ export?(passphrase: string): Promise<Uint8Array>;
1160
+ lock?(): Promise<void>;
1161
+ dismissBackupReminder?(): Promise<void>;
1060
1162
  button(): VaultButton;
1061
1163
  }
1062
1164
  export interface SliccModel {
@@ -0,0 +1,5 @@
1
+ import type { ErrorCode, VaultFailure } from './types.js';
2
+ export declare function valueProblem(value: string): string | null;
3
+ export declare function nameProblem(name: string): string | null;
4
+ export declare function vaultFailure(code: ErrorCode, message: string): VaultFailure;
5
+ export declare function isVaultFailure(error: unknown): error is VaultFailure;
@@ -13,6 +13,7 @@ import { SliccNetwork } from './app/network.js';
13
13
  import { SliccNotices } from './app/notices.js';
14
14
  import { SliccSecrets } from './app/secrets.js';
15
15
  import { SliccUpdates } from './app/updates.js';
16
+ import { SliccValueRequest } from './app/value-request.js';
16
17
  import { SliccVaultButton } from './app/vault.js';
17
18
  import { SliccCodeView, SliccDiffView } from './components/code-view.js';
18
19
  import { SliccDock } from './components/dock.js';
@@ -33,5 +34,6 @@ export type { GitStatusEntry } from './components/file-tree.js';
33
34
  export type { Listener, Subscribable } from './model/emitter.js';
34
35
  export { Emitter } from './model/emitter.js';
35
36
  export type * from './model/types.js';
36
- export { SliccAgents, SliccApp, SliccApprovals, SliccBrowser, SliccChanges, SliccChat, SliccCodeView, SliccComposer, SliccConfirm, SliccDiffPanel, SliccDiffView, SliccDock, SliccFiles, SliccFileTree, SliccFileView, SliccFollow, SliccNetwork, SliccNotices, SliccPrompt, SliccSecrets, SliccUpdates, SliccVaultButton, };
37
+ export { isVaultFailure } from './model/values.js';
38
+ export { SliccAgents, SliccApp, SliccApprovals, SliccBrowser, SliccChanges, SliccChat, SliccCodeView, SliccComposer, SliccConfirm, SliccDiffPanel, SliccDiffView, SliccDock, SliccFiles, SliccFileTree, SliccFileView, SliccFollow, SliccNetwork, SliccNotices, SliccPrompt, SliccSecrets, SliccUpdates, SliccValueRequest, SliccVaultButton, };
37
39
  export declare function define(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-spectrum",
3
- "version": "1.63.0",
3
+ "version": "1.64.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",
@@ -53,7 +53,7 @@
53
53
  "pretest": "npm run build && playwright-core install --no-shell chromium",
54
54
  "test": "node --test --test-global-setup=node_modules/@ai-ecoverse/slicc-shared-web/harness/global.mjs 'test/integration/*.test.mjs'",
55
55
  "test:unit": "NODE_NO_WARNINGS=1 mcr -c node_modules/@ai-ecoverse/slicc-shared-web/mcr.config.mjs node --test 'test/unit/**/*.test.mjs'",
56
- "typecheck": "tsc",
56
+ "typecheck": "tsc && tsc -p compat",
57
57
  "lint": "slicc-lint",
58
58
  "format": "biome check --write ."
59
59
  },
@@ -74,6 +74,7 @@
74
74
  "@adobe/spectrum-wc-icons": "2.0.0-beta.4",
75
75
  "@ai-ecoverse/slicc-kernel": "1.69.0",
76
76
  "@ai-ecoverse/slicc-shared-web": "1.13.1",
77
+ "@ai-ecoverse/slicc-vault": "1.1.0",
77
78
  "@ai-ecoverse/wasm-bash": "5.3.0-17",
78
79
  "@ai-ecoverse/wasm-coreutils": "9.7.0-3",
79
80
  "@biomejs/biome": "2.5.15",