@ai-matrx/vault 0.1.50 → 0.1.52

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/dist/index.d.cts CHANGED
@@ -1,10 +1,12 @@
1
1
  import * as react from 'react';
2
2
  import { Look } from '@ai-matrx/design-system';
3
+ import { ApiStream, NdjsonEvent, JsonOrStream, FollowRuntimeOperationToEndOptions, FollowRuntimeOperationToEndResult, Api } from '@ai-matrx/api';
4
+ import * as account from '@ai-matrx/api/account';
5
+ import { VaultPasswordHealthScanRequest, VaultPasswordHealthScanReferenceData, PasswordHealthDurableResult } from '@ai-matrx/api/account';
6
+ import { OperationStatusResult } from '@ai-matrx/api/architecture';
3
7
  import { VaultIdentity } from './identity.cjs';
4
8
  export { CONFIRM_RETURN_KEY, Confirmed, IdentityAccount, IdentityGate, IdentityMethod, ReturnStore, SupabaseAuthLike, SupabaseIdentityOptions, createSupabaseIdentity, needsRecentSignIn, useConfirmed, wasCancelled } from './identity.cjs';
5
9
  import { KnobClient } from '@ai-matrx/data/knobs';
6
- import * as account from '@ai-matrx/api/account';
7
- import { Api } from '@ai-matrx/api';
8
10
 
9
11
  /**
10
12
  * The Vault as the screens see it. Hosts map the wire shape into this once, in their VaultPort
@@ -114,8 +116,10 @@ type VaultSort = "name" | "name-desc" | "website" | "updated" | "created" | "vie
114
116
  /** Which vault to look in. `all` is everything the person can see, shared with them included. */
115
117
  type VaultSelection = "all" | "mine" | "shared" | (string & {});
116
118
  interface VaultLocation {
119
+ healthRequestId?: string;
120
+ healthExecutionId?: string;
117
121
  vault: VaultSelection;
118
- /** `all`, `favorites`, `authenticator`, `trash`, `category:<id>`, `family:<family>`, `type:<definitionKey>` or `tag:<tag>`. */
122
+ /** `all`, `favorites`, `authenticator`, `password-health`, `trash`, `category:<id>`, `family:<family>`, `type:<definitionKey>` or `tag:<tag>`. */
119
123
  view: string;
120
124
  q: string;
121
125
  sort: VaultSort;
@@ -214,6 +218,17 @@ interface ItemDraft {
214
218
  fieldSettings?: Record<string, FieldSettingsDraft>;
215
219
  }
216
220
 
221
+ type HealthScanOptions = VaultPasswordHealthScanRequest;
222
+ type HealthResult = PasswordHealthDurableResult;
223
+ type HealthReference = VaultPasswordHealthScanReferenceData;
224
+ interface HealthPort {
225
+ start(requestId: string, signal: AbortSignal, options: HealthScanOptions): Promise<ApiStream<NdjsonEvent>>;
226
+ resume(executionId: string, requestId: string, signal: AbortSignal): Promise<JsonOrStream<HealthReference, NdjsonEvent>>;
227
+ read(executionId: string, signal: AbortSignal): Promise<HealthResult>;
228
+ identify(requestId: string, signal: AbortSignal): Promise<OperationStatusResult>;
229
+ follow(executionId: string, options: FollowRuntimeOperationToEndOptions): Promise<FollowRuntimeOperationToEndResult>;
230
+ }
231
+
217
232
  /** One recorded earlier value of a secret field. Value-free: the value comes only from `revealHistory`. */
218
233
  interface HistoryEntry {
219
234
  fieldId: string;
@@ -1083,6 +1098,8 @@ interface VaultPort {
1083
1098
  remove(item: VaultItem): Promise<void>;
1084
1099
  /** The item as the server has it now. */
1085
1100
  get(item: VaultItem): Promise<VaultItem>;
1101
+ /** Absent on older custom hosts: the health view stays visible as unavailable. */
1102
+ health?: HealthPort;
1086
1103
  authenticator: AuthenticatorPort;
1087
1104
  sharing: SharingPort;
1088
1105
  activity: ActivityPort;
package/dist/index.d.ts CHANGED
@@ -1,10 +1,12 @@
1
1
  import * as react from 'react';
2
2
  import { Look } from '@ai-matrx/design-system';
3
+ import { ApiStream, NdjsonEvent, JsonOrStream, FollowRuntimeOperationToEndOptions, FollowRuntimeOperationToEndResult, Api } from '@ai-matrx/api';
4
+ import * as account from '@ai-matrx/api/account';
5
+ import { VaultPasswordHealthScanRequest, VaultPasswordHealthScanReferenceData, PasswordHealthDurableResult } from '@ai-matrx/api/account';
6
+ import { OperationStatusResult } from '@ai-matrx/api/architecture';
3
7
  import { VaultIdentity } from './identity.js';
4
8
  export { CONFIRM_RETURN_KEY, Confirmed, IdentityAccount, IdentityGate, IdentityMethod, ReturnStore, SupabaseAuthLike, SupabaseIdentityOptions, createSupabaseIdentity, needsRecentSignIn, useConfirmed, wasCancelled } from './identity.js';
5
9
  import { KnobClient } from '@ai-matrx/data/knobs';
6
- import * as account from '@ai-matrx/api/account';
7
- import { Api } from '@ai-matrx/api';
8
10
 
9
11
  /**
10
12
  * The Vault as the screens see it. Hosts map the wire shape into this once, in their VaultPort
@@ -114,8 +116,10 @@ type VaultSort = "name" | "name-desc" | "website" | "updated" | "created" | "vie
114
116
  /** Which vault to look in. `all` is everything the person can see, shared with them included. */
115
117
  type VaultSelection = "all" | "mine" | "shared" | (string & {});
116
118
  interface VaultLocation {
119
+ healthRequestId?: string;
120
+ healthExecutionId?: string;
117
121
  vault: VaultSelection;
118
- /** `all`, `favorites`, `authenticator`, `trash`, `category:<id>`, `family:<family>`, `type:<definitionKey>` or `tag:<tag>`. */
122
+ /** `all`, `favorites`, `authenticator`, `password-health`, `trash`, `category:<id>`, `family:<family>`, `type:<definitionKey>` or `tag:<tag>`. */
119
123
  view: string;
120
124
  q: string;
121
125
  sort: VaultSort;
@@ -214,6 +218,17 @@ interface ItemDraft {
214
218
  fieldSettings?: Record<string, FieldSettingsDraft>;
215
219
  }
216
220
 
221
+ type HealthScanOptions = VaultPasswordHealthScanRequest;
222
+ type HealthResult = PasswordHealthDurableResult;
223
+ type HealthReference = VaultPasswordHealthScanReferenceData;
224
+ interface HealthPort {
225
+ start(requestId: string, signal: AbortSignal, options: HealthScanOptions): Promise<ApiStream<NdjsonEvent>>;
226
+ resume(executionId: string, requestId: string, signal: AbortSignal): Promise<JsonOrStream<HealthReference, NdjsonEvent>>;
227
+ read(executionId: string, signal: AbortSignal): Promise<HealthResult>;
228
+ identify(requestId: string, signal: AbortSignal): Promise<OperationStatusResult>;
229
+ follow(executionId: string, options: FollowRuntimeOperationToEndOptions): Promise<FollowRuntimeOperationToEndResult>;
230
+ }
231
+
217
232
  /** One recorded earlier value of a secret field. Value-free: the value comes only from `revealHistory`. */
218
233
  interface HistoryEntry {
219
234
  fieldId: string;
@@ -1083,6 +1098,8 @@ interface VaultPort {
1083
1098
  remove(item: VaultItem): Promise<void>;
1084
1099
  /** The item as the server has it now. */
1085
1100
  get(item: VaultItem): Promise<VaultItem>;
1101
+ /** Absent on older custom hosts: the health view stays visible as unavailable. */
1102
+ health?: HealthPort;
1086
1103
  authenticator: AuthenticatorPort;
1087
1104
  sharing: SharingPort;
1088
1105
  activity: ActivityPort;