@ai-matrx/vault 0.1.52 → 0.1.54

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.js CHANGED
@@ -146,7 +146,7 @@ function PasswordHealthView(props) {
146
146
  const latest = useRef(props);
147
147
  latest.current = props;
148
148
  const [result, setResult] = useState2(null);
149
- const [status, setStatus] = useState2("No report");
149
+ const [status, setStatus] = useState2(requestId || executionId ? "Checking status" : "No report");
150
150
  const [error, setError] = useState2(null);
151
151
  const [progress, setProgress] = useState2(null);
152
152
  const [busy, setBusy] = useState2(false);
@@ -198,6 +198,7 @@ function PasswordHealthView(props) {
198
198
  if (!owns(controller)) return;
199
199
  id = known.operations[0]?.execution_id;
200
200
  if (!id) {
201
+ setStatus("Unavailable");
201
202
  setError("Status unavailable");
202
203
  return;
203
204
  }
@@ -234,10 +235,12 @@ function PasswordHealthView(props) {
234
235
  const own = ownedAddress.current;
235
236
  if (own && own.request === requestId && own.execution === executionId && own.items === items && own.retry === retry && active.current && !active.current.signal.aborted) return;
236
237
  const controller = fresh();
238
+ setStatus(requestId || executionId ? "Checking status" : "No report");
237
239
  void recover(requestId, executionId, controller).catch((e) => {
238
240
  if (owns(controller)) {
239
241
  setResult(null);
240
242
  setError(problem(e));
243
+ setStatus((value) => value === "Checking status" ? "Unavailable" : value);
241
244
  }
242
245
  }).finally(() => {
243
246
  if (owns(controller)) setBusy(false);
@@ -325,6 +328,7 @@ function PasswordHealthView(props) {
325
328
  }
326
329
  setResult(null);
327
330
  setError(problem(e));
331
+ setStatus((value) => value === "Checking status" ? "Unavailable" : value);
328
332
  } finally {
329
333
  starting.current = false;
330
334
  if (owns(controller)) {
@@ -9150,7 +9154,7 @@ import { startPasswordHealthScan, getPasswordHealthScan, resumePasswordHealthSca
9150
9154
  import { operationStatus } from "@ai-matrx/api/architecture";
9151
9155
  function createHealthPort(api) {
9152
9156
  return {
9153
- start: (requestId, signal, body) => startPasswordHealthScan(api, { body }, { requestId, signal, totalTimeoutMs: null }),
9157
+ start: (requestId, signal, options) => startPasswordHealthScan(api, { body: options.check_breaches ? { check_breaches: true } : {} }, { requestId, signal, totalTimeoutMs: null }),
9154
9158
  resume: (executionId, requestId, signal) => resumePasswordHealthScan(api, { path: { execution_id: executionId } }, { requestId, signal, totalTimeoutMs: null }),
9155
9159
  read: (executionId, signal) => getPasswordHealthScan(api, { path: { execution_id: executionId } }, { signal }),
9156
9160
  identify: (requestId, signal) => operationStatus(api, { path: { request_id: requestId } }, { signal }),