@ai-ecoverse/slicc-spectrum 1.62.2 → 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.
- package/README.md +8 -7
- package/dist/chunk-XQHRTHDQ.js +26 -0
- package/dist/chunk-XQHRTHDQ.js.map +7 -0
- package/dist/slicc-dummy.js +343 -63
- package/dist/slicc-dummy.js.map +3 -3
- package/dist/slicc-ui.js +1663 -597
- package/dist/slicc-ui.js.map +4 -4
- package/dist/types/app/composer.d.ts +16 -2
- package/dist/types/app/messages.d.ts +1 -0
- package/dist/types/app/monitor.d.ts +9 -0
- package/dist/types/app/secrets.d.ts +87 -6
- package/dist/types/app/value-request.d.ts +47 -0
- package/dist/types/app/vault.d.ts +9 -3
- package/dist/types/dummy/vault.d.ts +36 -15
- package/dist/types/dummy.d.ts +1 -1
- package/dist/types/model/types.d.ts +119 -10
- package/dist/types/model/values.d.ts +5 -0
- package/dist/types/ui.d.ts +3 -1
- package/package.json +3 -2
|
@@ -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;
|
|
@@ -21,6 +21,7 @@ import '@adobe/spectrum-wc-icons/swc-icon-edit.js';
|
|
|
21
21
|
import '@adobe/spectrum-wc-icons/swc-icon-file.js';
|
|
22
22
|
import '@adobe/spectrum-wc-icons/swc-icon-file-text.js';
|
|
23
23
|
import '@adobe/spectrum-wc-icons/swc-icon-globe-grid.js';
|
|
24
|
+
import '@adobe/spectrum-wc-icons/swc-icon-info-circle.js';
|
|
24
25
|
import '@adobe/spectrum-wc-icons/swc-icon-lock.js';
|
|
25
26
|
import '@adobe/spectrum-wc-icons/swc-icon-plugin.js';
|
|
26
27
|
import '@adobe/spectrum-wc-icons/swc-icon-search.js';
|
|
@@ -5,6 +5,7 @@ import '@adobe/spectrum-wc/components/status-light/swc-status-light.js';
|
|
|
5
5
|
import '@adobe/spectrum-wc-icons/swc-icon-alert-triangle.js';
|
|
6
6
|
import '@adobe/spectrum-wc-icons/swc-icon-alert-diamond.js';
|
|
7
7
|
import '@adobe/spectrum-wc-icons/swc-icon-chevron-right.js';
|
|
8
|
+
import '@adobe/spectrum-wc-icons/swc-icon-copy.js';
|
|
8
9
|
import { type TemplateResult } from 'lit';
|
|
9
10
|
import type { MonitorSection, MonitorStatus, SliccModel } from '../model/types.js';
|
|
10
11
|
import { ModelElement } from './base.js';
|
|
@@ -27,8 +28,16 @@ export declare class SliccMonitor extends ModelElement {
|
|
|
27
28
|
expanded: {
|
|
28
29
|
state: boolean;
|
|
29
30
|
};
|
|
31
|
+
copied: {
|
|
32
|
+
state: boolean;
|
|
33
|
+
};
|
|
30
34
|
};
|
|
31
35
|
expanded: Record<string, boolean>;
|
|
36
|
+
copied: {
|
|
37
|
+
id: string;
|
|
38
|
+
text: string;
|
|
39
|
+
done: boolean;
|
|
40
|
+
} | null;
|
|
32
41
|
constructor();
|
|
33
42
|
static styles: import("lit").CSSResult[];
|
|
34
43
|
protected subscribe(model: SliccModel): Array<() => 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,
|
|
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
|
-
|
|
76
|
+
failure: {
|
|
41
77
|
state: boolean;
|
|
42
78
|
};
|
|
43
|
-
|
|
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,
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
}
|
package/dist/types/dummy.d.ts
CHANGED
|
@@ -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';
|
|
@@ -16,6 +16,10 @@ export interface Agent {
|
|
|
16
16
|
title?: string;
|
|
17
17
|
}
|
|
18
18
|
export type ToolStatus = 'running' | 'done' | 'error' | 'cancelled';
|
|
19
|
+
export interface ToolNote {
|
|
20
|
+
severity: 'error' | 'warn' | 'info';
|
|
21
|
+
text: string;
|
|
22
|
+
}
|
|
19
23
|
export interface ToolCall {
|
|
20
24
|
id: string;
|
|
21
25
|
name: string;
|
|
@@ -32,6 +36,7 @@ export interface ToolCall {
|
|
|
32
36
|
before: string;
|
|
33
37
|
after: string;
|
|
34
38
|
};
|
|
39
|
+
notes?: ToolNote[];
|
|
35
40
|
}
|
|
36
41
|
export type AttachmentKind = 'image' | 'text' | 'file' | 'secret';
|
|
37
42
|
export interface Attachment {
|
|
@@ -489,6 +494,8 @@ export interface MonitorAlert {
|
|
|
489
494
|
title: string;
|
|
490
495
|
detail: string;
|
|
491
496
|
severity: 'warn' | 'error';
|
|
497
|
+
command?: string;
|
|
498
|
+
commandLabel?: string;
|
|
492
499
|
}
|
|
493
500
|
export interface MonitorSnapshot {
|
|
494
501
|
vitals: MonitorVital[];
|
|
@@ -815,19 +822,32 @@ export interface FollowPort extends Subscribable<{
|
|
|
815
822
|
export type DeviceId = string;
|
|
816
823
|
export type RecordKind = 'secret' | 'grant' | 'model' | 'mcp';
|
|
817
824
|
export type RecordState = 'active' | 'inert' | 'removed';
|
|
818
|
-
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}`;
|
|
819
826
|
export type LockMode = 'auto' | 'passkey' | 'passphrase';
|
|
820
827
|
export type RequestKind = 'value' | 'oauth' | 'jerk-seal';
|
|
821
|
-
export type
|
|
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}`;
|
|
822
836
|
export type ExecGrant = boolean | {
|
|
823
837
|
argv: string[][];
|
|
824
838
|
};
|
|
839
|
+
export type ExecMode = false | 'any' | 'argv' | 'shell';
|
|
825
840
|
export interface Rule {
|
|
826
841
|
domain: string;
|
|
827
842
|
header: string;
|
|
828
843
|
methods: string[];
|
|
829
844
|
paths: string[];
|
|
830
845
|
}
|
|
846
|
+
export interface RefusedRule {
|
|
847
|
+
secret: string;
|
|
848
|
+
rule: Rule;
|
|
849
|
+
reason: string;
|
|
850
|
+
}
|
|
831
851
|
export interface SecretView {
|
|
832
852
|
name: string;
|
|
833
853
|
kind: RecordKind;
|
|
@@ -839,8 +859,9 @@ export interface SecretView {
|
|
|
839
859
|
account?: string;
|
|
840
860
|
domains: string[];
|
|
841
861
|
rules: Rule[];
|
|
842
|
-
exits
|
|
843
|
-
exec: ExecGrant;
|
|
862
|
+
exits?: ExitName[];
|
|
863
|
+
exec: ExecMode | ExecGrant;
|
|
864
|
+
execArgv?: string[][];
|
|
844
865
|
createdAt: number;
|
|
845
866
|
usedAt?: number;
|
|
846
867
|
expiresAt?: number;
|
|
@@ -857,15 +878,25 @@ export interface PendingRequest {
|
|
|
857
878
|
createdAt: number;
|
|
858
879
|
expiresAt: number;
|
|
859
880
|
}
|
|
881
|
+
export interface ScrubState {
|
|
882
|
+
needed: boolean;
|
|
883
|
+
version: number;
|
|
884
|
+
ready: boolean;
|
|
885
|
+
}
|
|
886
|
+
export type BackupReminder = 'due' | 'dismissed' | null;
|
|
860
887
|
export interface VaultStatus {
|
|
861
888
|
version: string;
|
|
862
889
|
protocol: 1;
|
|
863
890
|
origin: string;
|
|
864
891
|
locked: boolean;
|
|
865
892
|
lock: LockMode;
|
|
893
|
+
scrub?: ScrubState;
|
|
866
894
|
waiting: PendingRequest[];
|
|
867
|
-
notices
|
|
895
|
+
notices?: number;
|
|
896
|
+
exportedAt?: number | null;
|
|
897
|
+
backupReminder?: BackupReminder;
|
|
868
898
|
}
|
|
899
|
+
export type Availability = 'connecting' | 'waiting' | 'locked' | 'ready';
|
|
869
900
|
export type Widening = {
|
|
870
901
|
kind: 'rule';
|
|
871
902
|
secret: string;
|
|
@@ -894,6 +925,27 @@ export type Widening = {
|
|
|
894
925
|
from: number;
|
|
895
926
|
to: number;
|
|
896
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
|
+
};
|
|
897
949
|
export type PolicyFile = '/etc/fnox/config.toml' | '/etc/slicc/secrets-policy.toml';
|
|
898
950
|
export interface PolicyNotice {
|
|
899
951
|
id: string;
|
|
@@ -921,7 +973,8 @@ export interface InjectionEntry extends AuditBase {
|
|
|
921
973
|
}
|
|
922
974
|
export interface RevealEntry extends AuditBase {
|
|
923
975
|
type: 'materialize';
|
|
924
|
-
grant
|
|
976
|
+
grant?: ExecGrant;
|
|
977
|
+
exec?: ExecMode;
|
|
925
978
|
path: string;
|
|
926
979
|
argv: string;
|
|
927
980
|
argvSha256: string;
|
|
@@ -939,6 +992,10 @@ export interface SealEntry extends AuditBase {
|
|
|
939
992
|
export interface RemoveEntry extends AuditBase {
|
|
940
993
|
type: 'remove' | 'restore';
|
|
941
994
|
}
|
|
995
|
+
export interface RefreshEntry extends AuditBase {
|
|
996
|
+
type: 'refresh';
|
|
997
|
+
grant?: string;
|
|
998
|
+
}
|
|
942
999
|
export interface PolicyEntry {
|
|
943
1000
|
type: 'policy';
|
|
944
1001
|
seq: number;
|
|
@@ -947,23 +1004,62 @@ export interface PolicyEntry {
|
|
|
947
1004
|
file: PolicyFile;
|
|
948
1005
|
sha256: string;
|
|
949
1006
|
accepted: boolean;
|
|
950
|
-
widened
|
|
1007
|
+
widened?: Widening[];
|
|
1008
|
+
changes?: PolicyChange[];
|
|
951
1009
|
warning?: string;
|
|
952
1010
|
}
|
|
953
|
-
export type AuditEntry = InjectionEntry | RevealEntry | SealEntry | RemoveEntry | PolicyEntry;
|
|
1011
|
+
export type AuditEntry = InjectionEntry | RevealEntry | SealEntry | RemoveEntry | RefreshEntry | PolicyEntry;
|
|
954
1012
|
export interface AuditPage {
|
|
955
1013
|
audit: AuditEntry[];
|
|
956
1014
|
more: boolean;
|
|
957
1015
|
next?: number;
|
|
958
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
|
+
}
|
|
959
1025
|
export interface VaultList {
|
|
960
1026
|
secrets: SecretView[];
|
|
961
|
-
notices
|
|
1027
|
+
notices?: PolicyNotice[];
|
|
1028
|
+
refused?: RefusedRule[];
|
|
962
1029
|
audit: AuditEntry[];
|
|
963
1030
|
auditMore: boolean;
|
|
1031
|
+
exits?: ExitPolicyView;
|
|
964
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;
|
|
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
|
+
};
|
|
965
1059
|
export type PopupIntent = {
|
|
966
1060
|
kind: 'unlock';
|
|
1061
|
+
} | {
|
|
1062
|
+
kind: 'protect';
|
|
967
1063
|
} | {
|
|
968
1064
|
kind: 'enter';
|
|
969
1065
|
name: string;
|
|
@@ -1044,12 +1140,25 @@ export interface VaultEvents {
|
|
|
1044
1140
|
status: VaultStatus;
|
|
1045
1141
|
list: VaultList;
|
|
1046
1142
|
notice: PolicyNotice;
|
|
1143
|
+
availability: Availability;
|
|
1047
1144
|
}
|
|
1048
1145
|
export interface VaultPort extends Subscribable<VaultEvents> {
|
|
1049
1146
|
status(): VaultStatus | null;
|
|
1050
1147
|
list(): VaultList | null;
|
|
1051
1148
|
audit(before?: number, limit?: number): Promise<AuditPage>;
|
|
1052
|
-
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>;
|
|
1053
1162
|
button(): VaultButton;
|
|
1054
1163
|
}
|
|
1055
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;
|
package/dist/types/ui.d.ts
CHANGED
|
@@ -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 {
|
|
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.
|
|
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",
|