@camstack/system 1.2.157 → 1.2.159

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 (65) hide show
  1. package/dist/addon-runner.js +17 -16
  2. package/dist/addon-runner.mjs +2 -1
  3. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/alerts/alerts.addon.js +1 -1
  8. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  9. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  10. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  11. package/dist/builtins/console-logging/index.js +1 -1
  12. package/dist/builtins/console-logging/index.mjs +1 -1
  13. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  14. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  15. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  16. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  17. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  18. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  19. package/dist/builtins/hub-forwarder/index.js +1 -1
  20. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  21. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  22. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  23. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  24. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  25. package/dist/builtins/local-network/local-network.addon.js +1 -1
  26. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  27. package/dist/builtins/loki-logging/index.js +1 -1
  28. package/dist/builtins/loki-logging/index.mjs +1 -1
  29. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  30. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  31. package/dist/builtins/platform-probe/index.js +1 -1
  32. package/dist/builtins/platform-probe/index.mjs +1 -1
  33. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  34. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  35. package/dist/builtins/snapshot/index.js +1 -1
  36. package/dist/builtins/snapshot/index.mjs +1 -1
  37. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  38. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  39. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  40. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  41. package/dist/builtins/sqlite-storage/vector-index-shared.d.ts +30 -5
  42. package/dist/builtins/sqlite-storage/vector-index-vec.d.ts +28 -6
  43. package/dist/builtins/storage-orchestrator/access-guards.d.ts +32 -0
  44. package/dist/builtins/storage-orchestrator/location-secrets.d.ts +33 -0
  45. package/dist/builtins/storage-orchestrator/storage-migration-coordinator.d.ts +71 -1
  46. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +26 -0
  47. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +490 -8
  48. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +490 -8
  49. package/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +37 -1
  50. package/dist/builtins/system-config/system-config.addon.js +1 -1
  51. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  52. package/dist/builtins/winston-logging/index.js +1 -1
  53. package/dist/builtins/winston-logging/index.mjs +1 -1
  54. package/dist/{dist-CDgIzo82.js → dist-Ck2jkBZk.js} +463 -10
  55. package/dist/{dist-LvKus-mT.mjs → dist-DLh4_rn3.mjs} +446 -11
  56. package/dist/index.js +140 -139
  57. package/dist/index.mjs +3 -3
  58. package/dist/kernel/deps/manifest-system-deps.d.ts +15 -0
  59. package/dist/kernel/index.d.ts +2 -0
  60. package/dist/kernel/storage-location-registry.d.ts +16 -1
  61. package/dist/{manifest-python-deps-DVODn-qc.js → manifest-system-deps-8boi90D9.js} +202 -7
  62. package/dist/{manifest-python-deps-CD14Pv0-.mjs → manifest-system-deps-tZZYG3RR.mjs} +197 -8
  63. package/dist/{retired-settings-keys-CV4QVdXj.mjs → retired-settings-keys-Bi0ZKBjb.mjs} +1 -1
  64. package/dist/{retired-settings-keys-BfAzWvPC.js → retired-settings-keys-Dp_CyuCW.js} +1 -1
  65. package/package.json +2 -1
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_manifest_python_deps = require("./manifest-python-deps-DVODn-qc.js");
2
+ const require_manifest_system_deps = require("./manifest-system-deps-8boi90D9.js");
3
3
  const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
4
4
  let node_path = require("node:path");
5
5
  node_path = require_chunk.__toESM(node_path);
@@ -420,7 +420,7 @@ async function loadAddonModule(addonId, addonDir) {
420
420
  if (!node_fs.existsSync(entryPath)) throw new Error(`Entry point not found: ${entryPath}`);
421
421
  const modUnknown = await import(entryPath);
422
422
  const mod = isRecord(modUnknown) ? modUnknown : {};
423
- const AddonClass = require_manifest_python_deps.resolveAddonClass(mod);
423
+ const AddonClass = require_manifest_system_deps.resolveAddonClass(mod);
424
424
  if (!AddonClass) throw new Error(`No addon class exported from ${entryPath}`);
425
425
  return {
426
426
  declaration,
@@ -554,13 +554,13 @@ async function main() {
554
554
  */
555
555
  const customActionRegistry = new require_custom_action_registry.CustomActionRegistry();
556
556
  let shuttingDown = false;
557
- const udsChildClient = new require_manifest_python_deps.LocalChildClient({
557
+ const udsChildClient = new require_manifest_system_deps.LocalChildClient({
558
558
  nodeId: parentNodeId,
559
559
  childId: runnerId,
560
- caps: buildChildCapDescriptors(runnerManifest, require_manifest_python_deps.getWorkerNativeCapSnapshot()),
560
+ caps: buildChildCapDescriptors(runnerManifest, require_manifest_system_deps.getWorkerNativeCapSnapshot()),
561
561
  dispatch: createChildCapDispatch({
562
562
  getSingletonProvider: (capName, addonId) => resolveSingletonProvider(capName, addonId),
563
- getDeviceProvider: (capName, deviceId) => require_manifest_python_deps.getWorkerNativeCapProvider(capName, deviceId) ?? null,
563
+ getDeviceProvider: (capName, deviceId) => require_manifest_system_deps.getWorkerNativeCapProvider(capName, deviceId) ?? null,
564
564
  isCollectionListMethod: (capName, method) => (0, _camstack_types_addon.isCollectionArrayMethodName)(capName, method)
565
565
  })
566
566
  });
@@ -570,7 +570,7 @@ async function main() {
570
570
  getAddonInstance: (addonId) => loadedAddonInstances.get(addonId) ?? null,
571
571
  getDataPlanes: (addonId) => addonDataPlanes.get(addonId) ?? []
572
572
  }));
573
- const { logger: runnerLog, control: runnerLogControl } = require_manifest_python_deps.createUdsLoggerWithControl(udsChildClient, runnerId, nodeId, "addon-runner");
573
+ const { logger: runnerLog, control: runnerLogControl } = require_manifest_system_deps.createUdsLoggerWithControl(udsChildClient, runnerId, nodeId, "addon-runner");
574
574
  udsChildClient.onSetLogLevel((level) => {
575
575
  runnerLogControl.setLevel(level);
576
576
  runnerLog.info(`Log level changed to "${level}" via UDS`);
@@ -585,13 +585,13 @@ async function main() {
585
585
  if (storageProvider) runnerLog.info(`"${nodeId}" storage provider rooted at ${dataDir}`);
586
586
  else runnerLog.warn(`"${nodeId}" failed to load FilesystemStorageProvider`, { meta: { error: (0, _camstack_types_addon.errMsg)(storageProviderError) } });
587
587
  const refreshChildCaps = (reason) => {
588
- const freshDescriptors = buildChildCapDescriptors(runnerManifest, require_manifest_python_deps.getWorkerNativeCapSnapshot());
588
+ const freshDescriptors = buildChildCapDescriptors(runnerManifest, require_manifest_system_deps.getWorkerNativeCapSnapshot());
589
589
  udsChildClient.updateCaps(freshDescriptors).catch((err) => {
590
590
  runnerLog.warn(`UDS updateCaps failed (${reason})`, { meta: { error: err instanceof Error ? err.message : String(err) } });
591
591
  });
592
592
  };
593
593
  let capRefreshTimer;
594
- require_manifest_python_deps.setWorkerNativeCapsChangeListener(() => {
594
+ require_manifest_system_deps.setWorkerNativeCapsChangeListener(() => {
595
595
  if (capRefreshTimer !== void 0) return;
596
596
  capRefreshTimer = setTimeout(() => {
597
597
  capRefreshTimer = void 0;
@@ -603,7 +603,7 @@ async function main() {
603
603
  const deviceRestorePromises = [];
604
604
  for (const { spec, declaration, AddonClass } of loadedModules) try {
605
605
  const addon = new AddonClass();
606
- const context = await require_manifest_python_deps.createUdsAddonContext(udsChildClient, nodeId, declaration, dataDir, {
606
+ const context = await require_manifest_system_deps.createUdsAddonContext(udsChildClient, nodeId, declaration, dataDir, {
607
607
  ...storageProvider ? { storageProvider } : {},
608
608
  dataPlaneSink: { set: (addonId, endpoints) => {
609
609
  addonDataPlanes.set(addonId, endpoints);
@@ -611,12 +611,13 @@ async function main() {
611
611
  });
612
612
  try {
613
613
  const pkgRaw = JSON.parse(node_fs.readFileSync(node_path.join(spec.addonDir, "package.json"), "utf-8"));
614
- await require_manifest_python_deps.installManifestNativeDeps(spec.addonDir, pkgRaw, context.logger);
614
+ await require_manifest_system_deps.installManifestNativeDeps(spec.addonDir, pkgRaw, context.logger);
615
615
  } catch (nativeErr) {
616
616
  console.error(`[addon-runner] native deps install failed for "${spec.addonId}": ${(0, _camstack_types_addon.errMsg)(nativeErr)}`);
617
617
  process.exit(1);
618
618
  }
619
- await require_manifest_python_deps.installManifestPythonDeps(declaration, spec.addonDir, context.deps, context.logger);
619
+ await require_manifest_system_deps.installManifestPythonDeps(declaration, spec.addonDir, context.deps, context.logger);
620
+ await require_manifest_system_deps.installManifestSystemDeps(declaration, context.logger);
620
621
  const registeredProviders = /* @__PURE__ */ new Map();
621
622
  const initWatchdog = startInitWatchdog({
622
623
  addonId: spec.addonId,
@@ -651,7 +652,7 @@ async function main() {
651
652
  return fn(input, caller);
652
653
  });
653
654
  }
654
- require_manifest_python_deps.validateProviderRegistrations(spec.addonId, declaration, registeredProviders, context.logger);
655
+ require_manifest_system_deps.validateProviderRegistrations(spec.addonId, declaration, registeredProviders, context.logger);
655
656
  const capNames = [...registeredProviders.keys()];
656
657
  context.logger.info(`"${spec.addonId}" caps: ${capNames.length > 0 ? capNames.join(", ") : "(none)"}`);
657
658
  runnerManifest.push({
@@ -688,10 +689,10 @@ async function main() {
688
689
  fireHubReachableOnce();
689
690
  runnerLog.info(`"${nodeId}" started — ${loaded.length} addon(s) ready (UDS connected)`);
690
691
  process.stdout.write(`READY:${nodeId}\n`);
691
- const stopHeapWatch = require_manifest_python_deps.startRunnerHeapWatch({
692
+ const stopHeapWatch = require_manifest_system_deps.startRunnerHeapWatch({
692
693
  heapProfile: process.env["CAMSTACK_RUNNER_HEAP_PROFILE"],
693
694
  reclaimSwitch: process.env["CAMSTACK_RUNNER_HEAP_RECLAIM"],
694
- rssBudgetMb: process.env[require_manifest_python_deps.RUNNER_RSS_BUDGET_ENV],
695
+ rssBudgetMb: process.env[require_manifest_system_deps.RUNNER_RSS_BUDGET_ENV],
695
696
  label: nodeId,
696
697
  sink: {
697
698
  info: (line) => {
@@ -703,7 +704,7 @@ async function main() {
703
704
  }
704
705
  });
705
706
  process.on("SIGUSR2", () => {
706
- require_manifest_python_deps.emitHeapDiagnosticReport({
707
+ require_manifest_system_deps.emitHeapDiagnosticReport({
707
708
  label: nodeId,
708
709
  addons: loaded.map((e) => e.addonId),
709
710
  sink: {
@@ -720,7 +721,7 @@ async function main() {
720
721
  const shutdown = async () => {
721
722
  shuttingDown = true;
722
723
  stopHeapWatch?.();
723
- require_manifest_python_deps.setWorkerNativeCapsChangeListener(null);
724
+ require_manifest_system_deps.setWorkerNativeCapsChangeListener(null);
724
725
  if (capRefreshTimer !== void 0) {
725
726
  clearTimeout(capRefreshTimer);
726
727
  capRefreshTimer = void 0;
@@ -1,4 +1,4 @@
1
- import { F as createUdsLoggerWithControl, I as LocalChildClient, It as RUNNER_RSS_BUDGET_ENV, Yt as startRunnerHeapWatch, at as setWorkerNativeCapsChangeListener, bt as installManifestNativeDeps, en as emitHeapDiagnosticReport, i as createUdsAddonContext, nt as getWorkerNativeCapProvider, rt as getWorkerNativeCapSnapshot, st as validateProviderRegistrations, t as installManifestPythonDeps, xt as resolveAddonClass } from "./manifest-python-deps-CD14Pv0-.mjs";
1
+ import { I as createUdsLoggerWithControl, L as LocalChildClient, Lt as RUNNER_RSS_BUDGET_ENV, St as resolveAddonClass, Xt as startRunnerHeapWatch, a as createUdsAddonContext, ct as validateProviderRegistrations, it as getWorkerNativeCapSnapshot, n as installManifestPythonDeps, ot as setWorkerNativeCapsChangeListener, rt as getWorkerNativeCapProvider, t as installManifestSystemDeps, tn as emitHeapDiagnosticReport, xt as installManifestNativeDeps } from "./manifest-system-deps-tZZYG3RR.mjs";
2
2
  import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
3
3
  import { register } from "node:module";
4
4
  import * as path$1 from "node:path";
@@ -614,6 +614,7 @@ async function main() {
614
614
  process.exit(1);
615
615
  }
616
616
  await installManifestPythonDeps(declaration, spec.addonDir, context.deps, context.logger);
617
+ await installManifestSystemDeps(declaration, context.logger);
617
618
  const registeredProviders = /* @__PURE__ */ new Map();
618
619
  const initWatchdog = startInitWatchdog({
619
620
  addonId: spec.addonId,
@@ -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-CDgIzo82.js");
6
+ const require_dist = require("../../dist-Ck2jkBZk.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Ot as errMsg, S as addonPagesCapability, kt as BaseAddon, tn as EventCategory } from "../../dist-LvKus-mT.mjs";
1
+ import { Mt as BaseAddon, in as EventCategory, jt as errMsg, w as addonPagesCapability } from "../../dist-DLh4_rn3.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import * as path$1 from "node:path";
@@ -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-CDgIzo82.js");
6
+ const require_dist = require("../../dist-Ck2jkBZk.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Ot as errMsg, kt as BaseAddon, tn as EventCategory, w as addonWidgetsCapability } from "../../dist-LvKus-mT.mjs";
1
+ import { E as addonWidgetsCapability, Mt as BaseAddon, in as EventCategory, jt as errMsg } from "../../dist-DLh4_rn3.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import * as path$1 from "node:path";
@@ -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-CDgIzo82.js");
6
+ const require_dist = require("../../dist-Ck2jkBZk.js");
7
7
  //#region src/builtins/alerts/prune-policy.ts
8
8
  /**
9
9
  * Ids older than `cutoffMs`, oldest first.
@@ -1,4 +1,4 @@
1
- import { Ht as createEvent, Ot as errMsg, T as alertsCapability, kt as BaseAddon, n as AlertSchema, tn as EventCategory } from "../../dist-LvKus-mT.mjs";
1
+ import { D as alertsCapability, Gt as createEvent, Mt as BaseAddon, in as EventCategory, jt as errMsg, n as AlertSchema } from "../../dist-DLh4_rn3.mjs";
2
2
  //#region src/builtins/alerts/prune-policy.ts
3
3
  /**
4
4
  * Ids older than `cutoffMs`, oldest first.
@@ -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-CDgIzo82.js");
6
+ const require_dist = require("../../dist-Ck2jkBZk.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let buffer = require("buffer");
9
9
  let node_fs_promises = require("node:fs/promises");
@@ -1,4 +1,4 @@
1
- import { D as backupCapability, kt as BaseAddon, tn as EventCategory } from "../../dist-LvKus-mT.mjs";
1
+ import { Mt as BaseAddon, in as EventCategory, k as backupCapability } from "../../dist-DLh4_rn3.mjs";
2
2
  import { randomBytes, randomUUID } from "node:crypto";
3
3
  import { Buffer as Buffer$1 } from "buffer";
4
4
  import * as fsp from "node:fs/promises";
@@ -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-CDgIzo82.js");
6
+ const require_dist = require("../../dist-Ck2jkBZk.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  //#region src/builtins/console-logging/console-destination.ts
9
9
  var LEVEL_RANK = {
@@ -1,4 +1,4 @@
1
- import { kt as BaseAddon, rt as logDestinationCapability } from "../../dist-LvKus-mT.mjs";
1
+ import { Mt as BaseAddon, ot as logDestinationCapability } from "../../dist-DLh4_rn3.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  //#region src/builtins/console-logging/console-destination.ts
4
4
  var LEVEL_RANK = {
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-CDgIzo82.js");
3
+ const require_dist = require("../../dist-Ck2jkBZk.js");
4
4
  let node_crypto = require("node:crypto");
5
5
  let node_fs_promises = require("node:fs/promises");
6
6
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -1,4 +1,4 @@
1
- import { M as coreBlockIdFromAddonId, N as coreBlocksCapability, Ot as errMsg, c as CoreBlockSchema, j as coreBlockAddonId, kt as BaseAddon, o as CORE_BLOCKS_ADDON_ID, s as CORE_BLOCK_ADDON_PREFIX, u as DeclaredDevices } from "../../dist-LvKus-mT.mjs";
1
+ import { F as coreBlockIdFromAddonId, I as coreBlocksCapability, Mt as BaseAddon, P as coreBlockAddonId, c as CoreBlockSchema, jt as errMsg, o as CORE_BLOCKS_ADDON_ID, s as CORE_BLOCK_ADDON_PREFIX, u as DeclaredDevices } from "../../dist-DLh4_rn3.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import * as fs from "node:fs/promises";
4
4
  import * as path$1 from "node:path";
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CDgIzo82.js");
7
- const require_retired_settings_keys = require("../../retired-settings-keys-BfAzWvPC.js");
6
+ const require_dist = require("../../dist-Ck2jkBZk.js");
7
+ const require_retired_settings_keys = require("../../retired-settings-keys-Dp_CyuCW.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let _camstack_types_node = require("@camstack/types/node");
10
10
  //#region src/builtins/device-manager/adoption-job-engine.ts
@@ -1,5 +1,5 @@
1
- import { A as buildStreamParamsConfigSchema, Ft as DeviceType, H as enumerateItemArrayFields, L as deviceManagerCapability, Nt as DeviceFeature, Ot as errMsg, Pt as DeviceRole, R as deviceStateCapability, Rt as WELL_KNOWN_TAB_MAP, U as enumerateSchemaFields, _ as STREAM_PROFILE_META, a as CAP_NAMES_WITH_STATUS, d as DeviceStatusSchema, en as sleep, ht as runtimeStatePolicyFor, kt as BaseAddon, lt as parseStreamParamsFormPatch, qt as isDeviceConfigCap, st as normalizeUnit, t as ALL_CAPABILITY_DEFINITIONS, tn as EventCategory, z as deviceStatusCapability } from "../../dist-LvKus-mT.mjs";
2
- import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-CV4QVdXj.mjs";
1
+ import { B as deviceManagerCapability, G as enumerateItemArrayFields, H as deviceStatusCapability, It as DeviceFeature, K as enumerateSchemaFields, Lt as DeviceRole, M as buildStreamParamsConfigSchema, Mt as BaseAddon, Rt as DeviceType, V as deviceStateCapability, Vt as WELL_KNOWN_TAB_MAP, Xt as isDeviceConfigCap, a as CAP_NAMES_WITH_STATUS, d as DeviceStatusSchema, ft as parseStreamParamsFormPatch, in as EventCategory, jt as errMsg, rn as sleep, t as ALL_CAPABILITY_DEFINITIONS, ut as normalizeUnit, vt as runtimeStatePolicyFor, y as STREAM_PROFILE_META } from "../../dist-DLh4_rn3.mjs";
2
+ import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-Bi0ZKBjb.mjs";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { canonicalDeviceFingerprint } from "@camstack/types/node";
5
5
  //#region src/builtins/device-manager/adoption-job-engine.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-CDgIzo82.js");
6
+ const require_dist = require("../../dist-Ck2jkBZk.js");
7
7
  //#region src/builtins/doorbell/trigger-engine.ts
8
8
  /**
9
9
  * Pure trigger logic for the virtual-doorbell builtin — edge detection over
@@ -1,4 +1,4 @@
1
- import { B as doorbellCapability, Ft as DeviceType, Ht as createEvent, O as bareAddonId, Ot as errMsg, Q as isSourceCap, W as evaluateSensorEdge, Z as isSameAddonId, g as SOURCE_DEVICE_TYPES, h as SOURCE_CAPS, kt as BaseAddon, tn as EventCategory } from "../../dist-LvKus-mT.mjs";
1
+ import { A as bareAddonId, Gt as createEvent, Mt as BaseAddon, Rt as DeviceType, U as doorbellCapability, _ as SOURCE_DEVICE_TYPES, et as isSameAddonId, g as SOURCE_CAPS, in as EventCategory, jt as errMsg, q as evaluateSensorEdge, tt as isSourceCap } from "../../dist-DLh4_rn3.mjs";
2
2
  //#region src/builtins/doorbell/trigger-engine.ts
3
3
  /**
4
4
  * Pure trigger logic for the virtual-doorbell builtin — edge detection over
@@ -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-CDgIzo82.js");
6
+ const require_dist = require("../../dist-Ck2jkBZk.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  //#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
9
9
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
@@ -1,4 +1,4 @@
1
- import { kt as BaseAddon, rt as logDestinationCapability } from "../../dist-LvKus-mT.mjs";
1
+ import { Mt as BaseAddon, ot as logDestinationCapability } from "../../dist-DLh4_rn3.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  //#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
4
4
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-CDgIzo82.js");
3
+ const require_dist = require("../../dist-Ck2jkBZk.js");
4
4
  //#region src/builtins/liveness-monitor/liveness-checks.ts
5
5
  var NO_DEVICES = "liveness:no-devices";
6
6
  var ALL_OFFLINE = "liveness:all-devices-offline";
@@ -1,4 +1,4 @@
1
- import { Ht as createEvent, Ot as errMsg, kt as BaseAddon, tn as EventCategory } from "../../dist-LvKus-mT.mjs";
1
+ import { Gt as createEvent, Mt as BaseAddon, in as EventCategory, jt as errMsg } from "../../dist-DLh4_rn3.mjs";
2
2
  //#region src/builtins/liveness-monitor/liveness-checks.ts
3
3
  var NO_DEVICES = "liveness:no-devices";
4
4
  var ALL_OFFLINE = "liveness:all-devices-offline";
@@ -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-CDgIzo82.js");
6
+ const require_dist = require("../../dist-Ck2jkBZk.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  node_crypto = require_chunk.__toESM(node_crypto);
9
9
  let crypto$1 = require("crypto");
@@ -1,5 +1,5 @@
1
1
  import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
2
- import { E as authProviderCapability, Tt as userManagementCapability, kt as BaseAddon, r as ApiKeyRecordSchema, v as ScopedTokenSchema, x as UserRecordSchema } from "../../dist-LvKus-mT.mjs";
2
+ import { C as UserRecordSchema, Mt as BaseAddon, O as authProviderCapability, Ot as userManagementCapability, b as ScopedTokenSchema, r as ApiKeyRecordSchema } from "../../dist-DLh4_rn3.mjs";
3
3
  import * as crypto$2 from "node:crypto";
4
4
  import { createHash, randomUUID, timingSafeEqual } from "node:crypto";
5
5
  import nodeCrypto from "crypto";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-CDgIzo82.js");
3
+ const require_dist = require("../../dist-Ck2jkBZk.js");
4
4
  const require_tls = require("../../tls-BxQlomxd.js");
5
5
  let node_fs_promises = require("node:fs/promises");
6
6
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { kt as BaseAddon, nt as localNetworkCapability, tn as EventCategory } from "../../dist-LvKus-mT.mjs";
1
+ import { Mt as BaseAddon, at as localNetworkCapability, in as EventCategory } from "../../dist-DLh4_rn3.mjs";
2
2
  import { S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, i as writeExtraSans, l as reissueTlsLeaf, n as readTlsAccessStatus, o as validateUploadedTls, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, y as applyLanHttp } from "../../tls-DOTmtLCW.mjs";
3
3
  import { mkdir, writeFile } from "node:fs/promises";
4
4
  import { join } from "node:path";
@@ -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-CDgIzo82.js");
6
+ const require_dist = require("../../dist-Ck2jkBZk.js");
7
7
  //#region src/builtins/loki-logging/loki-payload.ts
8
8
  /**
9
9
  * Loki rejects a label name that is not a valid Prometheus label
@@ -1,4 +1,4 @@
1
- import { kt as BaseAddon, rt as logDestinationCapability } from "../../dist-LvKus-mT.mjs";
1
+ import { Mt as BaseAddon, ot as logDestinationCapability } from "../../dist-DLh4_rn3.mjs";
2
2
  //#region src/builtins/loki-logging/loki-payload.ts
3
3
  /**
4
4
  * Loki rejects a label name that is not a valid Prometheus label
@@ -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-CDgIzo82.js");
6
+ const require_dist = require("../../dist-Ck2jkBZk.js");
7
7
  let node_fs_promises = require("node:fs/promises");
8
8
  let node_child_process = require("node:child_process");
9
9
  let node_util = require("node:util");
@@ -1,4 +1,4 @@
1
- import { Ht as createEvent, Ot as errMsg, ft as reducePoints, kt as BaseAddon, ot as metricsProviderCapability, pt as resolveBucketMs, q as foldSnapshotByFunction, tn as EventCategory } from "../../dist-LvKus-mT.mjs";
1
+ import { Gt as createEvent, Mt as BaseAddon, X as foldSnapshotByFunction, gt as resolveBucketMs, ht as reducePoints, in as EventCategory, jt as errMsg, lt as metricsProviderCapability } from "../../dist-DLh4_rn3.mjs";
2
2
  import { readFile, readdir } from "node:fs/promises";
3
3
  import { execFile, execFileSync } from "node:child_process";
4
4
  import { promisify } from "node:util";
@@ -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-CDgIzo82.js");
6
+ const require_dist = require("../../dist-Ck2jkBZk.js");
7
7
  let node_child_process = require("node:child_process");
8
8
  let node_util = require("node:util");
9
9
  let node_fs = require("node:fs");
@@ -1,5 +1,5 @@
1
1
  import { o as __toESM } from "../../chunk-CNf5ZN-e.mjs";
2
- import { Ot as errMsg, V as enumerateInferenceDevices, Wt as emitReadiness, kt as BaseAddon, tn as EventCategory, ut as platformProbeCapability, vt as scoreRuntimes } from "../../dist-LvKus-mT.mjs";
2
+ import { Mt as BaseAddon, W as enumerateInferenceDevices, in as EventCategory, jt as errMsg, pt as platformProbeCapability, qt as emitReadiness, xt as scoreRuntimes } from "../../dist-DLh4_rn3.mjs";
3
3
  import { execFile } from "node:child_process";
4
4
  import { promisify } from "node:util";
5
5
  import * as fs from "node:fs";
@@ -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-CDgIzo82.js");
6
+ const require_dist = require("../../dist-Ck2jkBZk.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 { kt as BaseAddon, tn as EventCategory } from "../../dist-LvKus-mT.mjs";
1
+ import { Mt as BaseAddon, in as EventCategory } from "../../dist-DLh4_rn3.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-CDgIzo82.js");
6
+ const require_dist = require("../../dist-Ck2jkBZk.js");
7
7
  let zod = require("zod");
8
8
  let node_crypto = require("node:crypto");
9
9
  let _camstack_types_node = require("@camstack/types/node");
@@ -1,4 +1,4 @@
1
- import { Ft as DeviceType, I as deriveBatteryPresence, Jt as nodePin, Nt as DeviceFeature, O as bareAddonId, Ot as errMsg, bt as snapshotCapability, i as BatteryStatusSchema, k as batteryCapability, kt as BaseAddon, tn as EventCategory, wt as streamQualityLabel } from "../../dist-LvKus-mT.mjs";
1
+ import { A as bareAddonId, Ct as snapshotCapability, Dt as streamQualityLabel, It as DeviceFeature, Mt as BaseAddon, Rt as DeviceType, Zt as nodePin, i as BatteryStatusSchema, in as EventCategory, j as batteryCapability, jt as errMsg, z as deriveBatteryPresence } from "../../dist-DLh4_rn3.mjs";
2
2
  import { z } from "zod";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { signExpiringUrl, verifyExpiringUrl } from "@camstack/types/node";
@@ -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-CDgIzo82.js");
6
+ const require_dist = require("../../dist-Ck2jkBZk.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,4 +1,4 @@
1
- import { Ct as storageProviderCapability, K as filesystemBrowseCapability, kt as BaseAddon } from "../../dist-LvKus-mT.mjs";
1
+ import { Et as storageProviderCapability, Mt as BaseAddon, Y as filesystemBrowseCapability } from "../../dist-DLh4_rn3.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";
@@ -8,6 +8,33 @@ export interface VectorMatchRow {
8
8
  readonly score: number;
9
9
  readonly metadata: VectorMetadata;
10
10
  }
11
+ /**
12
+ * What one ranked search returned, INCLUDING the `k` it really ran with.
13
+ *
14
+ * `effectiveTopK` is part of the answer rather than a log line for the reason
15
+ * `vector-store.cap.ts` records: a ceiling the caller learns about only from
16
+ * the provider's own log is a number truncated in silence.
17
+ */
18
+ export interface VectorQueryOutcome {
19
+ readonly matches: VectorMatchRow[];
20
+ readonly scanned: number;
21
+ readonly truncated: boolean;
22
+ readonly effectiveTopK: number;
23
+ }
24
+ /** One row read back WITH its vector, base64 Float32LE. */
25
+ export interface VectorFetchRow {
26
+ readonly id: string;
27
+ readonly vector: string;
28
+ readonly metadata: VectorMetadata;
29
+ }
30
+ /** One page of an unranked walk. `nextCursor: null` means end of index. */
31
+ export interface VectorScanPage {
32
+ readonly items: Array<{
33
+ id: string;
34
+ metadata: VectorMetadata;
35
+ }>;
36
+ readonly nextCursor: number | null;
37
+ }
11
38
  export interface VectorIndexStats {
12
39
  readonly backend: string;
13
40
  readonly count: number;
@@ -32,15 +59,13 @@ export interface VectorIndexBackend {
32
59
  topK: number;
33
60
  minScore?: number;
34
61
  filter?: VectorFilter;
35
- }): Promise<{
36
- matches: VectorMatchRow[];
37
- scanned: number;
38
- truncated: boolean;
39
- }>;
62
+ }): Promise<VectorQueryOutcome>;
40
63
  getByIds(index: string, ids: readonly string[]): Promise<Array<{
41
64
  id: string;
42
65
  metadata: VectorMetadata;
43
66
  }>>;
67
+ fetchByIds(index: string, ids: readonly string[]): Promise<VectorFetchRow[]>;
68
+ scan(index: string, cursor: number, limit: number): Promise<VectorScanPage>;
44
69
  deleteByIds(index: string, ids: readonly string[]): Promise<number>;
45
70
  deleteByFilter(index: string, filter: VectorFilter): Promise<number>;
46
71
  stats(index: string): Promise<VectorIndexStats>;
@@ -1,6 +1,6 @@
1
1
  import { IScopedLogger, VectorFilter, VectorMetadata, VectorMetric, encodeVectorBase64 } from '@camstack/types';
2
2
  import { SqliteOpProfiler } from './query-profiler.js';
3
- import { VectorIndexStats, VectorMatchRow } from './vector-index-shared.js';
3
+ import { VectorFetchRow, VectorIndexStats, VectorQueryOutcome, VectorScanPage } from './vector-index-shared.js';
4
4
  /** The raw statement surface this index needs from better-sqlite3. */
5
5
  export interface RawSqliteDatabase {
6
6
  exec(sql: string): unknown;
@@ -68,11 +68,33 @@ export declare class SqliteVecVectorIndex {
68
68
  topK: number;
69
69
  minScore?: number;
70
70
  filter?: VectorFilter;
71
- }): Promise<{
72
- matches: VectorMatchRow[];
73
- scanned: number;
74
- truncated: boolean;
75
- }>;
71
+ }): Promise<VectorQueryOutcome>;
72
+ /**
73
+ * Ids read back WITH their vectors.
74
+ *
75
+ * `vec0` returns a vector column as the packed Float32 blob it stores, which
76
+ * is byte-for-byte what `upsert` was given — so the round trip is a base64
77
+ * encode and nothing else. No re-normalisation, no float re-ordering: a
78
+ * gallery loaded through here ranks identically to one loaded from the JSON
79
+ * column it replaced.
80
+ */
81
+ fetchByIds(index: string, ids: readonly string[]): Promise<VectorFetchRow[]>;
82
+ /**
83
+ * One page of the whole index, unranked.
84
+ *
85
+ * `LIMIT ? OFFSET ?` over the `vec0` table with NO `MATCH` clause: a plain
86
+ * scan, so the extension's KNN `k` ceiling ({@link VEC_KNN_MAX_K}) does not
87
+ * apply and no distance is computed at all. Ordered by `id` so a cursor means
88
+ * the same thing across calls — `rowid` order is not stable under the
89
+ * DELETE-then-INSERT upsert this class performs.
90
+ *
91
+ * The cursor is an OFFSET, so rows deleted behind the walk shift the window.
92
+ * That is acceptable and deliberate for the one caller: a reconcile that
93
+ * misses a row this pass sees it next pass, and the alternative — a keyset
94
+ * cursor on a virtual table whose ordering the extension owns — buys nothing
95
+ * for a walk that is idempotent by construction.
96
+ */
97
+ scan(index: string, cursor: number, limit: number): Promise<VectorScanPage>;
76
98
  getByIds(index: string, ids: readonly string[]): Promise<Array<{
77
99
  id: string;
78
100
  metadata: VectorMetadata;
@@ -0,0 +1,32 @@
1
+ import { StorageLocation } from '@camstack/types';
2
+ /** What a provider answered about itself; `undefined` = not yet classified. */
3
+ export type ProviderLocality = boolean | undefined;
4
+ /**
5
+ * May `storage.resolve` return a path for this location?
6
+ *
7
+ * `resolve` is the only method on the cap whose result LEAVES the storage
8
+ * abstraction — every caller of it opens the string with `node:fs`. A remote
9
+ * provider answers with a path on the remote host, which on this node is
10
+ * either missing or an unrelated local directory of the same name. For the
11
+ * recorder, writing to the wrong place is not an error the operator sees; it
12
+ * is a black window in the footage.
13
+ *
14
+ * Only a POSITIVE `false` refuses. `undefined` is "not yet classified", not
15
+ * "remote" — and a conclusion drawn from a read that was never made is how a
16
+ * doorbell rang 0/3 (D49).
17
+ */
18
+ export declare function resolveRefusalFor(location: StorageLocation, locality: ProviderLocality): string | null;
19
+ /**
20
+ * Can this node's filesystem answer "does this location still hold anything?"
21
+ *
22
+ * Only for a provider it KNOWS to be node-local. Everything else is `unknown`,
23
+ * which refuses a delete.
24
+ *
25
+ * The direction that matters is the one this closes. A remote location carries
26
+ * a plain-looking `basePath` (`/backups/camstack`); `fs.readdir` of it on the
27
+ * hub answers `ENOENT`, and `ENOENT` is deliberately read as `empty` — because
28
+ * for a LOCAL location an absent root means there is nothing the delete can
29
+ * strand. Applied to a remote row, that same reasoning turns a full share into
30
+ * a vacant one and walks D293's delete guard straight past it.
31
+ */
32
+ export declare function canProbeOccupancyLocally(locality: ProviderLocality): boolean;