@camstack/system 1.2.471 → 1.2.473

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.
Files changed (95) hide show
  1. package/dist/addon-runner.js +202 -8
  2. package/dist/addon-runner.mjs +203 -9
  3. package/dist/addon-utils.mjs +1 -1
  4. package/dist/{agent-https-bH6bKDeK.js → agent-https-B9Q3-IKd.js} +2 -5
  5. package/dist/{agent-https-DHBvFZJS.mjs → agent-https-DOwn4pqL.mjs} +3 -6
  6. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  7. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  9. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
  10. package/dist/builtins/alerts/alerts.addon.js +1 -1
  11. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  12. package/dist/builtins/autotrack/index.js +1 -1
  13. package/dist/builtins/autotrack/index.mjs +1 -1
  14. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  15. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
  16. package/dist/builtins/calendars/calendars.addon.js +1 -1
  17. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  18. package/dist/builtins/camera-grid/index.js +1 -1
  19. package/dist/builtins/camera-grid/index.mjs +1 -1
  20. package/dist/builtins/composer/composer.addon.js +2 -2
  21. package/dist/builtins/composer/composer.addon.mjs +2 -2
  22. package/dist/builtins/console-logging/index.js +1 -1
  23. package/dist/builtins/console-logging/index.mjs +1 -1
  24. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  25. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  26. package/dist/builtins/device-history/device-history.addon.js +1 -1
  27. package/dist/builtins/device-history/device-history.addon.mjs +1 -1
  28. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  29. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  30. package/dist/builtins/hub-forwarder/index.js +1 -1
  31. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  32. package/dist/builtins/keychain/index.js +3 -3
  33. package/dist/builtins/keychain/index.mjs +3 -3
  34. package/dist/builtins/liveness-monitor/liveness-monitor.addon.d.ts +9 -25
  35. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +240 -39
  36. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +237 -38
  37. package/dist/builtins/liveness-monitor/liveness-reporter.d.ts +28 -0
  38. package/dist/builtins/liveness-monitor/storage-root-access.d.ts +53 -0
  39. package/dist/builtins/local-auth/local-auth.addon.js +16 -2
  40. package/dist/builtins/local-auth/local-auth.addon.mjs +19 -5
  41. package/dist/builtins/local-auth/person-scopes.d.ts +7 -0
  42. package/dist/builtins/local-network/local-network.addon.js +2 -2
  43. package/dist/builtins/local-network/local-network.addon.mjs +2 -2
  44. package/dist/builtins/loki-logging/index.js +1 -1
  45. package/dist/builtins/loki-logging/index.mjs +1 -1
  46. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  47. package/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
  48. package/dist/builtins/platform-probe/accelerator-facts-probe.d.ts +24 -0
  49. package/dist/builtins/platform-probe/index.js +110 -10
  50. package/dist/builtins/platform-probe/index.mjs +116 -17
  51. package/dist/builtins/platform-probe/platform-scorer.d.ts +10 -2
  52. package/dist/builtins/record-entries/index.js +1 -1
  53. package/dist/builtins/record-entries/index.mjs +1 -1
  54. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  55. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  56. package/dist/builtins/snapshot/index.js +1 -1
  57. package/dist/builtins/snapshot/index.mjs +1 -1
  58. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  59. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
  60. package/dist/builtins/sqlite-storage/index.js +1 -1
  61. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  62. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  63. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  64. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  65. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  66. package/dist/builtins/system-config/system-config.addon.js +3 -3
  67. package/dist/builtins/system-config/system-config.addon.mjs +115 -115
  68. package/dist/builtins/winston-logging/index.js +1 -1
  69. package/dist/builtins/winston-logging/index.mjs +1 -1
  70. package/dist/{composition-sources-B5uJZXZ1.js → composition-sources-Dj_nInUQ.js} +1 -1
  71. package/dist/{composition-sources-DRw_vBKH.mjs → composition-sources-cwD35HB0.mjs} +1 -1
  72. package/dist/{constants-CToE4OFp.js → constants-XkWSVvgY.js} +1 -1
  73. package/dist/{constants-5lA8Z9d8.mjs → constants-p5mPM1iL.mjs} +1 -1
  74. package/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
  75. package/dist/{custom-action-registry-BGYDjTqY.mjs → custom-action-registry-DZSCLBuT.mjs} +37 -37
  76. package/dist/{device-ca-nOCYVFS4.js → device-ca-BXzQ1pYj.js} +1 -1
  77. package/dist/{device-ca-URrs1lxK.mjs → device-ca-DyUtcpf4.mjs} +1 -1
  78. package/dist/{dist-BjcWEfRy.js → dist-Bmah6waF.js} +209 -266
  79. package/dist/{dist-5XUG7iYJ.mjs → dist-C9lbdBL5.mjs} +204 -267
  80. package/dist/file-host-worker.js +1 -1
  81. package/dist/file-host-worker.mjs +1 -1
  82. package/dist/{hub-mdns-ciao-zD3JojB_.mjs → hub-mdns-ciao-BemeCNGe.mjs} +2 -2
  83. package/dist/{hub-mdns-ciao-vEWhJ_SD.js → hub-mdns-ciao-CUr6ewsX.js} +2 -2
  84. package/dist/index.js +236 -16
  85. package/dist/index.mjs +455 -235
  86. package/dist/kernel/hwaccel/hwaccel-resolver.d.ts +24 -4
  87. package/dist/kernel/hwaccel/vaapi-init-probe.d.ts +29 -0
  88. package/dist/kernel/moleculer/runner-process-group.d.ts +4 -0
  89. package/dist/{restore-archive-CN1pJTRn.mjs → restore-archive-C0aohmAK.mjs} +94 -94
  90. package/dist/{restore-archive-B64m2nAj.js → restore-archive-DbPmyjiM.js} +1 -1
  91. package/dist/{retired-settings-keys-C_Kjp-Bj.mjs → retired-settings-keys-CWp7ZSeA.mjs} +8 -0
  92. package/dist/{retired-settings-keys-CGUqX-Oz.js → retired-settings-keys-DorakcxV.js} +8 -0
  93. package/dist/{wal-maintenance-BNXVX-ot.js → wal-maintenance-BT8Ns0W3.js} +0 -0
  94. package/dist/{wal-maintenance-Bl2I-ZcR.mjs → wal-maintenance-BuB731DK.mjs} +0 -0
  95. package/package.json +6 -6
@@ -1,9 +1,10 @@
1
1
  import { o as __toESM, r as __exportAll } from "../../chunk-CNf5ZN-e.mjs";
2
- import { $n as platformProbeCapability, $r as errMsg, Da as EventCategory, Ji as emitReadiness, _r as scoreRuntimes, an as enumerateInferenceDevices, ei as BaseAddon } from "../../dist-5XUG7iYJ.mjs";
3
- import { n as detectCoralAccelerator, r as nodeCoralFs } from "../../coral-accelerators-BW3OcrLD.mjs";
2
+ import { Oa as EventCategory, Xn as parseAcceleratorFactsJson, Yi as emitReadiness, an as enumerateInferenceDevices, ei as errMsg, er as platformProbeCapability, ti as BaseAddon, vr as scoreRuntimes } from "../../dist-C9lbdBL5.mjs";
3
+ import { n as detectCoralAccelerator, r as nodeCoralFs } from "../../coral-accelerators-DBlgWB8k.mjs";
4
+ import * as path$1 from "node:path";
4
5
  import { promisify } from "node:util";
5
6
  import * as os$1 from "node:os";
6
- import * as fs from "node:fs";
7
+ import * as fs$1 from "node:fs";
7
8
  import { execFile } from "node:child_process";
8
9
  //#region src/builtins/platform-probe/accelerator-reprobe.ts
9
10
  /**
@@ -307,7 +308,7 @@ var WINDOWS_PROBE_TIMEOUT_MS = 15e3;
307
308
  * entire Node process (WS handshakes, tRPC subscriptions, metrics — all
308
309
  * stalled). Keeping it async turns the probe into a true background task.
309
310
  */
310
- var execFileAsync = promisify(execFile);
311
+ var execFileAsync$1 = promisify(execFile);
311
312
  /** Minimal no-op logger for default parameter */
312
313
  var noopLogger = {
313
314
  debug() {},
@@ -335,7 +336,7 @@ async function getAvailableRAM_MB() {
335
336
  const platform = os$1.platform();
336
337
  try {
337
338
  if (platform === "darwin") {
338
- const { stdout: output } = await execFileAsync("vm_stat", [], {
339
+ const { stdout: output } = await execFileAsync$1("vm_stat", [], {
339
340
  encoding: "utf8",
340
341
  timeout: 3e3
341
342
  });
@@ -369,10 +370,17 @@ var PlatformScorer = class {
369
370
  embeddedPythonPath;
370
371
  /** Where the Coral scan reads `/sys` and `/dev` (the host's, unless a spec fakes one). */
371
372
  coralFs;
372
- constructor(logger = noopLogger, embeddedPythonPath = null, coralFs = nodeCoralFs) {
373
+ /**
374
+ * Asks OpenVINO / WebGPU for compute (D930). Null in tests and when this
375
+ * process has no embedded interpreter — the pool's published file is the
376
+ * other way the same facts arrive.
377
+ */
378
+ readAcceleratorFacts;
379
+ constructor(logger = noopLogger, embeddedPythonPath = null, coralFs = nodeCoralFs, readAcceleratorFacts = null) {
373
380
  this.logger = logger;
374
381
  this.embeddedPythonPath = embeddedPythonPath;
375
382
  this.coralFs = coralFs;
383
+ this.readAcceleratorFacts = readAcceleratorFacts;
376
384
  }
377
385
  /**
378
386
  * Probe hardware + derive scores from pure rules and score all backend combos.
@@ -484,14 +492,14 @@ var PlatformScorer = class {
484
492
  if (nvidia) gpu = nvidia;
485
493
  const listRenderNodes = () => {
486
494
  try {
487
- return fs.readdirSync("/dev/dri").filter((n) => n.startsWith("renderD")).map((n) => `/dev/dri/${n}`);
495
+ return fs$1.readdirSync("/dev/dri").filter((n) => n.startsWith("renderD")).map((n) => `/dev/dri/${n}`);
488
496
  } catch {
489
497
  return [];
490
498
  }
491
499
  };
492
500
  const readDrmAttr = (node, attr) => {
493
501
  try {
494
- return fs.readFileSync(`/sys/class/drm/${node.split("/").pop()}/device/${attr}`, "utf8");
502
+ return fs$1.readFileSync(`/sys/class/drm/${node.split("/").pop()}/device/${attr}`, "utf8");
495
503
  } catch {
496
504
  return "";
497
505
  }
@@ -517,12 +525,12 @@ var PlatformScorer = class {
517
525
  }
518
526
  const listDir = (p) => {
519
527
  try {
520
- return fs.readdirSync(p);
528
+ return fs$1.readdirSync(p);
521
529
  } catch {
522
530
  return [];
523
531
  }
524
532
  };
525
- const exists = (p) => fs.existsSync(p);
533
+ const exists = (p) => fs$1.existsSync(p);
526
534
  if (!npu) {
527
535
  const { classifyIntelNpu } = await import("../../intel-npu-C8HKvRQF.mjs");
528
536
  npu = classifyIntelNpu({
@@ -550,7 +558,7 @@ var PlatformScorer = class {
550
558
  exists,
551
559
  readFile: (p) => {
552
560
  try {
553
- return fs.readFileSync(p, "utf8");
561
+ return fs$1.readFileSync(p, "utf8");
554
562
  } catch {
555
563
  return "";
556
564
  }
@@ -563,7 +571,7 @@ var PlatformScorer = class {
563
571
  } });
564
572
  }
565
573
  }
566
- return {
574
+ const hardware = {
567
575
  platform,
568
576
  arch,
569
577
  cpuModel,
@@ -574,6 +582,25 @@ var PlatformScorer = class {
574
582
  npu,
575
583
  coral
576
584
  };
585
+ const accelerators = await this.readAcceleratorCompute();
586
+ return accelerators === null ? hardware : {
587
+ ...hardware,
588
+ accelerators
589
+ };
590
+ }
591
+ /** Compute facts, or null when the probe did not run or could not ask. */
592
+ async readAcceleratorCompute() {
593
+ const read = this.readAcceleratorFacts;
594
+ if (read === null) return null;
595
+ try {
596
+ const facts = await read();
597
+ if (facts === null) return null;
598
+ this.logger.info("accelerator compute probed", { meta: { devices: facts.map((row) => row.deviceKey) } });
599
+ return facts;
600
+ } catch (err) {
601
+ this.logger.warn("accelerator compute probe failed", { meta: { error: errMsg(err) } });
602
+ return null;
603
+ }
577
604
  }
578
605
  /**
579
606
  * The Coral part of the probe, with the evidence that decided it logged —
@@ -639,7 +666,7 @@ var PlatformScorer = class {
639
666
  /** NVIDIA's own tool: exact model and VRAM. Null when absent or failing. */
640
667
  async probeNvidiaSmi() {
641
668
  try {
642
- const { stdout } = await execFileAsync("nvidia-smi", ["--query-gpu=name,memory.total", "--format=csv,noheader"], {
669
+ const { stdout } = await execFileAsync$1("nvidia-smi", ["--query-gpu=name,memory.total", "--format=csv,noheader"], {
643
670
  encoding: "utf8",
644
671
  timeout: 5e3,
645
672
  windowsHide: true
@@ -660,7 +687,7 @@ var PlatformScorer = class {
660
687
  /** Windows WMI probe; bounded, and a failure is a log line, never a boot failure. */
661
688
  async probeWindowsHardwareSafely() {
662
689
  const run = async (file, args) => {
663
- const { stdout } = await execFileAsync(file, [...args], {
690
+ const { stdout } = await execFileAsync$1(file, [...args], {
664
691
  encoding: "utf8",
665
692
  timeout: WINDOWS_PROBE_TIMEOUT_MS,
666
693
  windowsHide: true,
@@ -697,7 +724,7 @@ var PlatformScorer = class {
697
724
  "python"
698
725
  ];
699
726
  for (const cmd of candidates) try {
700
- await execFileAsync(cmd, ["--version"], { timeout: 5e3 });
727
+ await execFileAsync$1(cmd, ["--version"], { timeout: 5e3 });
701
728
  return cmd;
702
729
  } catch (err) {
703
730
  this.logger.debug(`Python command "${cmd}" not found`, { meta: { error: errMsg(err) } });
@@ -795,6 +822,68 @@ var InferenceConfigResolver = class {
795
822
  }
796
823
  };
797
824
  //#endregion
825
+ //#region src/builtins/platform-probe/accelerator-facts-probe.ts
826
+ /**
827
+ * Read the accelerator compute the inference worker published (D930), or ask
828
+ * the same script once when this process has the embedded interpreter.
829
+ *
830
+ * A missing file and a failed probe are `null` — not an empty list, and not
831
+ * zeros. `getHardware` overlays a published file onto the cached probe so a
832
+ * pool that starts later still reaches Auto tune.
833
+ */
834
+ /** Same name `accelerator_facts.FACTS_FILENAME` writes under the system temp dir. */
835
+ var ACCELERATOR_FACTS_FILENAME = "camstack-accelerator-facts.json";
836
+ var execFileAsync = promisify(execFile);
837
+ function publishedAcceleratorFactsPath() {
838
+ return path$1.join(os$1.tmpdir(), ACCELERATOR_FACTS_FILENAME);
839
+ }
840
+ function jsonValue(text) {
841
+ return JSON.parse(text);
842
+ }
843
+ /** `null` when the file is absent, unreadable, or not a facts payload. */
844
+ function readPublishedAcceleratorFacts(filePath) {
845
+ let text;
846
+ try {
847
+ text = fs$1.readFileSync(filePath, "utf8");
848
+ } catch {
849
+ return null;
850
+ }
851
+ try {
852
+ return parseAcceleratorFactsJson(jsonValue(text));
853
+ } catch {
854
+ return null;
855
+ }
856
+ }
857
+ /** Where `accelerator_facts.py` lives, or null when this process cannot see the addon. */
858
+ function findAcceleratorFactsScript(dataDir, cwd = process.cwd()) {
859
+ const candidates = [];
860
+ if (typeof dataDir === "string" && dataDir !== "") candidates.push(path$1.join(dataDir, "addons", "@camstack", "addon-pipeline", "python", "accelerator_facts.py"));
861
+ candidates.push(path$1.join(cwd, "packages", "addon-pipeline", "python", "accelerator_facts.py"));
862
+ for (const candidate of candidates) if (fs$1.existsSync(candidate)) return candidate;
863
+ return null;
864
+ }
865
+ async function defaultExec(command, args, timeoutMs) {
866
+ const { stdout } = await execFileAsync(command, [...args], {
867
+ encoding: "utf8",
868
+ timeout: timeoutMs,
869
+ windowsHide: true
870
+ });
871
+ return stdout;
872
+ }
873
+ /**
874
+ * Run the facts script. `null` when there is no interpreter, no script, or
875
+ * the script could not ask the device (it prints `{"accelerators": null}`).
876
+ */
877
+ async function runAcceleratorFactsProbe(input) {
878
+ if (input.pythonPath === null || input.scriptPath === null) return null;
879
+ const exec = input.exec ?? defaultExec;
880
+ try {
881
+ return parseAcceleratorFactsJson(jsonValue(await exec(input.pythonPath, [input.scriptPath], input.timeoutMs ?? 8e3)));
882
+ } catch {
883
+ return null;
884
+ }
885
+ }
886
+ //#endregion
798
887
  //#region src/builtins/platform-probe/index.ts
799
888
  /**
800
889
  * The decode-hwaccel backends `ctx.kernel.hwaccel.resolve` accepts. The cap
@@ -883,7 +972,11 @@ var PlatformProbeNativeAddon = class extends BaseAddon {
883
972
  this.ctx.logger.debug("ensurePython unavailable for platform probe", { meta: { error: errMsg(err) } });
884
973
  return null;
885
974
  });
886
- this.scorer = new PlatformScorer(this.ctx.logger.withTags({ nodeId: this.bareLocalNodeId() }), embeddedPython);
975
+ const factsScript = findAcceleratorFactsScript(this.ctx.dataDir);
976
+ this.scorer = new PlatformScorer(this.ctx.logger.withTags({ nodeId: this.bareLocalNodeId() }), embeddedPython, nodeCoralFs, embeddedPython === null || factsScript === null ? null : () => runAcceleratorFactsProbe({
977
+ pythonPath: embeddedPython,
978
+ scriptPath: factsScript
979
+ }));
887
980
  const emitPhase = (phase, payload) => {
888
981
  this.ctx.eventBus?.emit({
889
982
  id: `platform-probe-${phase}-${Date.now()}`,
@@ -929,7 +1022,13 @@ var PlatformProbeNativeAddon = class extends BaseAddon {
929
1022
  return getCaps();
930
1023
  },
931
1024
  getHardware: async () => {
932
- return (await getCaps()).hardware;
1025
+ const caps = await getCaps();
1026
+ const published = readPublishedAcceleratorFacts(publishedAcceleratorFactsPath());
1027
+ if (published === null) return caps.hardware;
1028
+ return {
1029
+ ...caps.hardware,
1030
+ accelerators: published
1031
+ };
933
1032
  },
934
1033
  resolveInferenceConfig: async (input) => {
935
1034
  const caps = await getCaps();
@@ -1,4 +1,4 @@
1
- import type { HardwareInfo, PlatformCapabilities, IScopedLogger } from "@camstack/types";
1
+ import type { HardwareInfo, PlatformCapabilities, IScopedLogger, AcceleratorCompute } from "@camstack/types";
2
2
  import { type CoralFs } from "./coral-accelerators.js";
3
3
  import { type AcceleratorReprobe } from "./accelerator-reprobe.js";
4
4
  export declare class PlatformScorer {
@@ -15,7 +15,13 @@ export declare class PlatformScorer {
15
15
  private readonly embeddedPythonPath;
16
16
  /** Where the Coral scan reads `/sys` and `/dev` (the host's, unless a spec fakes one). */
17
17
  private readonly coralFs;
18
- constructor(logger?: IScopedLogger, embeddedPythonPath?: string | null, coralFs?: CoralFs);
18
+ /**
19
+ * Asks OpenVINO / WebGPU for compute (D930). Null in tests and when this
20
+ * process has no embedded interpreter — the pool's published file is the
21
+ * other way the same facts arrive.
22
+ */
23
+ private readonly readAcceleratorFacts;
24
+ constructor(logger?: IScopedLogger, embeddedPythonPath?: string | null, coralFs?: CoralFs, readAcceleratorFacts?: (() => Promise<readonly AcceleratorCompute[] | null>) | null);
19
25
  /**
20
26
  * Probe hardware + derive scores from pure rules and score all backend combos.
21
27
  *
@@ -30,6 +36,8 @@ export declare class PlatformScorer {
30
36
  */
31
37
  probe(onPhase?: (phase: string, payload?: Record<string, unknown>) => void): Promise<PlatformCapabilities>;
32
38
  probeHardware(): Promise<HardwareInfo>;
39
+ /** Compute facts, or null when the probe did not run or could not ask. */
40
+ private readAcceleratorCompute;
33
41
  /**
34
42
  * The Coral part of the probe, with the evidence that decided it logged —
35
43
  * a node that reports a Coral, or stops reporting one, says WHY (D919).
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-BjcWEfRy.js");
6
+ const require_dist = require("../../dist-Bmah6waF.js");
7
7
  let zod = require("zod");
8
8
  let node_crypto = require("node:crypto");
9
9
  //#region src/builtins/record-entries/entries-service.ts
@@ -1,4 +1,4 @@
1
- import { ei as BaseAddon, ha as recordSecretRef, ji as UnknownRecordKindError, nr as recordEntriesCapability, sa as mapSecretLeaves, ui as InvalidRecordError } from "../../dist-5XUG7iYJ.mjs";
1
+ import { Mi as UnknownRecordKindError, ca as mapSecretLeaves, di as InvalidRecordError, ga as recordSecretRef, rr as recordEntriesCapability, ti as BaseAddon } from "../../dist-C9lbdBL5.mjs";
2
2
  import { z } from "zod";
3
3
  import { randomUUID } from "node:crypto";
4
4
  //#region src/builtins/record-entries/entries-service.ts
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-BjcWEfRy.js");
6
+ const require_dist = require("../../dist-Bmah6waF.js");
7
7
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
8
8
  /**
9
9
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -1,4 +1,4 @@
1
- import { Da as EventCategory, ei as BaseAddon } from "../../dist-5XUG7iYJ.mjs";
1
+ import { Oa as EventCategory, ti as BaseAddon } from "../../dist-C9lbdBL5.mjs";
2
2
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
3
3
  /**
4
4
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-BjcWEfRy.js");
6
+ const require_dist = require("../../dist-Bmah6waF.js");
7
7
  const require_snapshot_courtesy = require("../../snapshot-courtesy-D_C5-nC0.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { $r as errMsg, Da as EventCategory, Dt as batteryCapability, Et as bareAddonId, Hn as memoizePinnedFfmpeg, Qr as DeviceType, Xr as DeviceFeature, Xt as deriveBatteryPresence, ca as nodePin, ei as BaseAddon, kr as streamQualityLabel, o as BatteryStatusSchema, xr as snapshotCapability } from "../../dist-5XUG7iYJ.mjs";
1
+ import { $r as DeviceType, Ar as streamQualityLabel, Dt as batteryCapability, Et as bareAddonId, Hn as memoizePinnedFfmpeg, Oa as EventCategory, Sr as snapshotCapability, Xt as deriveBatteryPresence, Zr as DeviceFeature, ei as errMsg, la as nodePin, o as BatteryStatusSchema, ti as BaseAddon } from "../../dist-C9lbdBL5.mjs";
2
2
  import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg } from "../../snapshot-courtesy-CyFs1M3I.mjs";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-BjcWEfRy.js");
6
+ const require_dist = require("../../dist-Bmah6waF.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let node_fs_promises = require("node:fs/promises");
9
9
  let node_path = require("node:path");
@@ -1,10 +1,10 @@
1
- import { Dr as storageProviderCapability, ei as BaseAddon, pn as filesystemBrowseCapability } from "../../dist-5XUG7iYJ.mjs";
1
+ import { Or as storageProviderCapability, pn as filesystemBrowseCapability, ti as BaseAddon } from "../../dist-C9lbdBL5.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
4
4
  import * as path$1 from "node:path";
5
5
  import { basename, dirname, isAbsolute, join, resolve, sep } from "node:path";
6
6
  import { homedir } from "node:os";
7
- import * as fs from "node:fs";
7
+ import * as fs$1 from "node:fs";
8
8
  //#region src/builtins/sqlite-storage/path-guard.ts
9
9
  /**
10
10
  * Guards for the filesystem-browse cap. Pure + synchronous so they are
@@ -169,16 +169,16 @@ var FilesystemStorageProvider = class FilesystemStorageProvider {
169
169
  error: "config.basePath must be a non-empty string"
170
170
  };
171
171
  try {
172
- const stat = await fs.promises.stat(basePath).catch(() => null);
172
+ const stat = await fs$1.promises.stat(basePath).catch(() => null);
173
173
  if (stat) {
174
174
  if (!stat.isDirectory()) return {
175
175
  ok: false,
176
176
  error: `Path "${basePath}" exists but is not a directory`
177
177
  };
178
- await fs.promises.access(basePath, fs.constants.W_OK);
178
+ await fs$1.promises.access(basePath, fs$1.constants.W_OK);
179
179
  return { ok: true };
180
180
  }
181
- await fs.promises.mkdir(basePath, { recursive: true });
181
+ await fs$1.promises.mkdir(basePath, { recursive: true });
182
182
  return { ok: true };
183
183
  } catch (err) {
184
184
  return {
@@ -192,12 +192,12 @@ var FilesystemStorageProvider = class FilesystemStorageProvider {
192
192
  }
193
193
  async write({ location, relativePath, data }) {
194
194
  const filePath = safeResolve(getBasePath(location), relativePath);
195
- await fs.promises.mkdir(path$1.dirname(filePath), { recursive: true });
196
- await fs.promises.writeFile(filePath, data);
195
+ await fs$1.promises.mkdir(path$1.dirname(filePath), { recursive: true });
196
+ await fs$1.promises.writeFile(filePath, data);
197
197
  }
198
198
  async read({ location, relativePath }) {
199
199
  const filePath = safeResolve(getBasePath(location), relativePath);
200
- const buf = await fs.promises.readFile(filePath);
200
+ const buf = await fs$1.promises.readFile(filePath);
201
201
  const out = new Uint8Array(new ArrayBuffer(buf.byteLength));
202
202
  out.set(buf);
203
203
  return out;
@@ -205,7 +205,7 @@ var FilesystemStorageProvider = class FilesystemStorageProvider {
205
205
  async exists({ location, relativePath }) {
206
206
  const filePath = safeResolve(getBasePath(location), relativePath);
207
207
  try {
208
- await fs.promises.access(filePath);
208
+ await fs$1.promises.access(filePath);
209
209
  return true;
210
210
  } catch {
211
211
  return false;
@@ -215,25 +215,25 @@ var FilesystemStorageProvider = class FilesystemStorageProvider {
215
215
  const base = getBasePath(location);
216
216
  const dir = prefix ? safeResolve(base, prefix) : path$1.resolve(base);
217
217
  try {
218
- return (await fs.promises.readdir(dir, { withFileTypes: true })).map((e) => prefix ? `${prefix}/${e.name}` : e.name);
218
+ return (await fs$1.promises.readdir(dir, { withFileTypes: true })).map((e) => prefix ? `${prefix}/${e.name}` : e.name);
219
219
  } catch {
220
220
  return [];
221
221
  }
222
222
  }
223
223
  async delete({ location, relativePath }) {
224
224
  const filePath = safeResolve(getBasePath(location), relativePath);
225
- await fs.promises.rm(filePath, { force: true });
225
+ await fs$1.promises.rm(filePath, { force: true });
226
226
  }
227
227
  async getAvailableSpace({ location }) {
228
228
  const base = path$1.resolve(getBasePath(location));
229
229
  try {
230
230
  let target = base;
231
- while (!fs.existsSync(target)) {
231
+ while (!fs$1.existsSync(target)) {
232
232
  const parent = path$1.dirname(target);
233
233
  if (!parent || parent === target) return null;
234
234
  target = parent;
235
235
  }
236
- const stats = await fs.promises.statfs(target);
236
+ const stats = await fs$1.promises.statfs(target);
237
237
  return stats.bavail * stats.bsize;
238
238
  } catch {
239
239
  return null;
@@ -242,9 +242,9 @@ var FilesystemStorageProvider = class FilesystemStorageProvider {
242
242
  async beginUpload({ location, relativePath }) {
243
243
  const target = safeResolve(getBasePath(location), relativePath);
244
244
  const partial = `${target}.partial`;
245
- await fs.promises.mkdir(path$1.dirname(target), { recursive: true });
246
- await fs.promises.unlink(partial).catch(() => {});
247
- const stream = fs.createWriteStream(partial);
245
+ await fs$1.promises.mkdir(path$1.dirname(target), { recursive: true });
246
+ await fs$1.promises.unlink(partial).catch(() => {});
247
+ const stream = fs$1.createWriteStream(partial);
248
248
  const uploadId = randomUUID();
249
249
  const session = {
250
250
  stream,
@@ -285,7 +285,7 @@ var FilesystemStorageProvider = class FilesystemStorageProvider {
285
285
  session.stream.end(() => resolve());
286
286
  session.stream.on("error", reject);
287
287
  });
288
- await fs.promises.rename(session.partial, session.target);
288
+ await fs$1.promises.rename(session.partial, session.target);
289
289
  clearTimeout(session.timer);
290
290
  this.uploads.delete(uploadId);
291
291
  }
@@ -295,14 +295,14 @@ var FilesystemStorageProvider = class FilesystemStorageProvider {
295
295
  try {
296
296
  session.stream.destroy();
297
297
  } catch {}
298
- await fs.promises.unlink(session.partial).catch(() => {});
298
+ await fs$1.promises.unlink(session.partial).catch(() => {});
299
299
  clearTimeout(session.timer);
300
300
  this.uploads.delete(uploadId);
301
301
  }
302
302
  async beginDownload({ location, relativePath }) {
303
303
  const target = safeResolve(getBasePath(location), relativePath);
304
- const stat = await fs.promises.stat(target);
305
- const fd = await fs.promises.open(target, "r");
304
+ const stat = await fs$1.promises.stat(target);
305
+ const fd = await fs$1.promises.open(target, "r");
306
306
  const downloadId = randomUUID();
307
307
  const session = {
308
308
  fd,
@@ -4,7 +4,7 @@ Object.defineProperties(exports, {
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
6
  const require_builtins_sqlite_storage_filesystem_storage_addon = require("./filesystem-storage.addon.js");
7
- const require_wal_maintenance = require("../../wal-maintenance-BNXVX-ot.js");
7
+ const require_wal_maintenance = require("../../wal-maintenance-BT8Ns0W3.js");
8
8
  const require_builtins_sqlite_storage_sqlite_settings_addon = require("./sqlite-settings.addon.js");
9
9
  //#region src/builtins/sqlite-storage/config-store.ts
10
10
  var ConfigStore = class {
@@ -1,5 +1,5 @@
1
1
  import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./filesystem-storage.addon.mjs";
2
- import { A as SQLITE_MMAP_CEILING_BYTES, B as SQLITE_SLOW_CALL_MS, F as sqlitePageCacheKibFor, H as sqliteEngineStorm, I as SQLITE_ENGINE_STORM_WALL_SHARE, L as SQLITE_PROFILE_REPORT_FLOOR_MS, M as SQLITE_PAGE_CACHE_CEILING_KIB, N as SQLITE_PAGE_CACHE_FLOOR_KIB, P as sqliteMmapSizeFor, R as SQLITE_PROFILE_REPORT_INTERVAL_MS, V as SqliteOpProfiler, a as WalMaintenance, i as WAL_MAINTENANCE_INTERVAL_MS, j as SQLITE_MMAP_FLOOR_BYTES, k as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, l as SqliteSettingsBackend, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as SQLITE_PROFILE_TOP_N } from "../../wal-maintenance-Bl2I-ZcR.mjs";
2
+ import { A as SQLITE_MMAP_CEILING_BYTES, B as SQLITE_SLOW_CALL_MS, F as sqlitePageCacheKibFor, H as sqliteEngineStorm, I as SQLITE_ENGINE_STORM_WALL_SHARE, L as SQLITE_PROFILE_REPORT_FLOOR_MS, M as SQLITE_PAGE_CACHE_CEILING_KIB, N as SQLITE_PAGE_CACHE_FLOOR_KIB, P as sqliteMmapSizeFor, R as SQLITE_PROFILE_REPORT_INTERVAL_MS, V as SqliteOpProfiler, a as WalMaintenance, i as WAL_MAINTENANCE_INTERVAL_MS, j as SQLITE_MMAP_FLOOR_BYTES, k as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, l as SqliteSettingsBackend, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as SQLITE_PROFILE_TOP_N } from "../../wal-maintenance-BuB731DK.mjs";
3
3
  import { SqliteSettingsAddon } from "./sqlite-settings.addon.mjs";
4
4
  //#region src/builtins/sqlite-storage/config-store.ts
5
5
  var ConfigStore = class {
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-BjcWEfRy.js");
7
- const require_retired_settings_keys = require("../../retired-settings-keys-CGUqX-Oz.js");
8
- const require_wal_maintenance = require("../../wal-maintenance-BNXVX-ot.js");
6
+ const require_dist = require("../../dist-Bmah6waF.js");
7
+ const require_retired_settings_keys = require("../../retired-settings-keys-DorakcxV.js");
8
+ const require_wal_maintenance = require("../../wal-maintenance-BT8Ns0W3.js");
9
9
  const require_sqlite_snapshot_protocol = require("../../sqlite-snapshot-protocol-B9OndqZv.js");
10
10
  const require_wal_checkpoint_policy = require("../../wal-checkpoint-policy-d2z2qPqx.js");
11
11
  let node_fs_promises = require("node:fs/promises");
@@ -1,6 +1,6 @@
1
- import { $r as errMsg, C as DATA_STORE_DATABASES, Cr as storageAdminCapability, Et as bareAddonId, Gt as dataStoreProviderCapability, Ir as vectorStoreCapability, Kt as databaseSnapshotCapability, S as DATABASE_SNAPSHOT_TIMEOUT_MS, Si as RecordKindDeclarationSchema, b as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, di as NoCallerError, ei as BaseAddon, gi as RECORD_SWEEP_INTERVAL_MS, ji as UnknownRecordKindError, ki as TransactRefusedError, oi as DeclarationRefusedError, rr as recordsCapability, ua as normalizeSecretOwner, ui as InvalidRecordError, x as DATABASE_SNAPSHOT_SUFFIX, yi as RUNTIME_DEFAULTS } from "../../dist-5XUG7iYJ.mjs";
2
- import { r as retiredKeyStoreOf, t as purgeRetiredSettingsKeys } from "../../retired-settings-keys-C_Kjp-Bj.mjs";
3
- import { C as RecordsEngine, D as callVector, E as callRecords, O as controlTargetOf, S as trustResult, T as callData, _ as collectTransferables, a as WalMaintenance, c as vectorProviderOfOwnedFile, d as CrossDatabaseTransactError, f as DatabaseBusyError, l as SqliteSettingsBackend, m as rehydrateError, o as createVectorIndex, p as DuplicatePlacementError, s as vectorProviderOf, u as CollectionPlacementError, v as isFileHostMessage, w as callControl } from "../../wal-maintenance-Bl2I-ZcR.mjs";
1
+ import { Ai as TransactRefusedError, C as DATA_STORE_DATABASES, Ci as RecordKindDeclarationSchema, Et as bareAddonId, Gt as dataStoreProviderCapability, Kt as databaseSnapshotCapability, Lr as vectorStoreCapability, Mi as UnknownRecordKindError, S as DATABASE_SNAPSHOT_TIMEOUT_MS, _i as RECORD_SWEEP_INTERVAL_MS, b as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, bi as RUNTIME_DEFAULTS, da as normalizeSecretOwner, di as InvalidRecordError, ei as errMsg, fi as NoCallerError, ir as recordsCapability, si as DeclarationRefusedError, ti as BaseAddon, wr as storageAdminCapability, x as DATABASE_SNAPSHOT_SUFFIX } from "../../dist-C9lbdBL5.mjs";
2
+ import { r as retiredKeyStoreOf, t as purgeRetiredSettingsKeys } from "../../retired-settings-keys-CWp7ZSeA.mjs";
3
+ import { C as RecordsEngine, D as callVector, E as callRecords, O as controlTargetOf, S as trustResult, T as callData, _ as collectTransferables, a as WalMaintenance, c as vectorProviderOfOwnedFile, d as CrossDatabaseTransactError, f as DatabaseBusyError, l as SqliteSettingsBackend, m as rehydrateError, o as createVectorIndex, p as DuplicatePlacementError, s as vectorProviderOf, u as CollectionPlacementError, v as isFileHostMessage, w as callControl } from "../../wal-maintenance-BuB731DK.mjs";
4
4
  import { r as isSnapshotWorkerMessage } from "../../sqlite-snapshot-protocol-2QaTouWV.mjs";
5
5
  import { a as isWorkerMessage, t as WAL_CHECKPOINT_LARGE_PASS_FRAMES } from "../../wal-checkpoint-policy-BahrTtyD.mjs";
6
6
  import { createRequire } from "node:module";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-BjcWEfRy.js");
6
+ const require_dist = require("../../dist-Bmah6waF.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { Bn as mayReadLocation, Da as EventCategory, En as isLocationEnabled, Ki as defineRecordKinds, Lr as withLocationMode, Nn as legacyModeOf, Tr as storageMigrationCapability, Vn as mayWriteToLocation, Wn as modeMayWrite, _a as resolveSecretMarkers, _i as REDACTED_SECRET, _n as gbToBytes, da as parseJsonObject, dr as resolveLocationMode, dt as StorageLocationModeSchema, ei as BaseAddon, ft as StorageLocationTypeSchema, la as normalizeNodeId, ln as evictionPolicyOfLocation, pt as StorageMigrationJobSchema, q as LegacyStorageLocationDefaultSchema, ra as isSecretMarker, ut as StorageCleanupJobSchema, vr as settingsStoreCapability, wa as transformSecretWrite, wr as storageCapability, ya as secretTreeFromPaths, zi as collectSecretConfigKeys } from "../../dist-5XUG7iYJ.mjs";
1
+ import { Bi as collectSecretConfigKeys, Bn as mayReadLocation, En as isLocationEnabled, Er as storageMigrationCapability, Nn as legacyModeOf, Oa as EventCategory, Rr as withLocationMode, Ta as transformSecretWrite, Tr as storageCapability, Vn as mayWriteToLocation, Wn as modeMayWrite, _n as gbToBytes, ba as secretTreeFromPaths, dt as StorageLocationModeSchema, fa as parseJsonObject, fr as resolveLocationMode, ft as StorageLocationTypeSchema, ia as isSecretMarker, ln as evictionPolicyOfLocation, pt as StorageMigrationJobSchema, q as LegacyStorageLocationDefaultSchema, qi as defineRecordKinds, ti as BaseAddon, ua as normalizeNodeId, ut as StorageCleanupJobSchema, va as resolveSecretMarkers, vi as REDACTED_SECRET, yr as settingsStoreCapability } from "../../dist-C9lbdBL5.mjs";
2
2
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-BjcWEfRy.js");
6
+ const require_dist = require("../../dist-Bmah6waF.js");
7
7
  const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
8
8
  const require_x509_es = require("../../x509.es-C4cOo48M.js");
9
- const require_agent_https = require("../../agent-https-bH6bKDeK.js");
10
- const require_constants$8 = require("../../constants-CToE4OFp.js");
9
+ const require_agent_https = require("../../agent-https-B9Q3-IKd.js");
10
+ const require_constants$8 = require("../../constants-XkWSVvgY.js");
11
11
  const require_src$1 = require("../../src-CnAqG6EF.js");
12
12
  let zod = require("zod");
13
13
  let node_crypto = require("node:crypto");