@camstack/system 1.1.41 → 1.1.43

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 (47) hide show
  1. package/dist/addon-runner.js +1 -1
  2. package/dist/addon-runner.mjs +1 -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/device-manager/device-manager.addon.js +1 -1
  14. package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  15. package/dist/builtins/hub-forwarder/index.js +1 -1
  16. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  17. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  18. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  19. package/dist/builtins/local-network/local-network.addon.js +1 -1
  20. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  21. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  22. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  23. package/dist/builtins/platform-probe/index.js +1 -1
  24. package/dist/builtins/platform-probe/index.mjs +1 -1
  25. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  26. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  27. package/dist/builtins/snapshot/index.js +337 -27
  28. package/dist/builtins/snapshot/index.mjs +337 -27
  29. package/dist/builtins/snapshot/snapshot-coalescing.d.ts +130 -0
  30. package/dist/builtins/snapshot/snapshot.addon.d.ts +40 -4
  31. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  32. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  33. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +1 -1
  34. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -1
  35. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  36. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  37. package/dist/builtins/system-config/system-config.addon.js +1 -1
  38. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  39. package/dist/builtins/winston-logging/index.js +1 -1
  40. package/dist/builtins/winston-logging/index.mjs +1 -1
  41. package/dist/{dist-BCseJMTD.js → dist-BP89I7gi.js} +33 -2
  42. package/dist/{dist-ClOjKsC4.mjs → dist-C68OyuEd.mjs} +33 -2
  43. package/dist/index.js +2 -2
  44. package/dist/index.mjs +2 -2
  45. package/dist/{manifest-python-deps-BVUZVpma.js → manifest-python-deps-CJn9aExb.js} +1 -1
  46. package/dist/{manifest-python-deps-DyIcZtF5.mjs → manifest-python-deps-MJEshIKy.mjs} +1 -1
  47. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { $ as errMsg, G as settingsStoreCapability, dt as asJsonObject, et as BaseAddon, s as RUNTIME_DEFAULTS, xt as parseJsonUnknown } from "../../dist-ClOjKsC4.mjs";
1
+ import { $ as errMsg, G as settingsStoreCapability, dt as asJsonObject, et as BaseAddon, s as RUNTIME_DEFAULTS, xt as parseJsonUnknown } from "../../dist-C68OyuEd.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import Database from "better-sqlite3";
4
4
  //#region src/builtins/sqlite-storage/sqlite-settings-backend.ts
@@ -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-BCseJMTD.js");
6
+ const require_dist = require("../../dist-BP89I7gi.js");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_chunk.__toESM(node_path);
9
9
  let node_fs_promises = require("node:fs/promises");
@@ -1,4 +1,4 @@
1
- import { bt as parseJsonObject, et as BaseAddon, q as storageCapability, u as StorageLocationTypeSchema } from "../../dist-ClOjKsC4.mjs";
1
+ import { bt as parseJsonObject, et as BaseAddon, q as storageCapability, u as StorageLocationTypeSchema } from "../../dist-C68OyuEd.mjs";
2
2
  import * as path$1 from "node:path";
3
3
  import * as fs from "node:fs/promises";
4
4
  import { buildStorageLocationRegistry } from "@camstack/system";
@@ -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-BCseJMTD.js");
6
+ const require_dist = require("../../dist-BP89I7gi.js");
7
7
  //#region src/builtins/system-config/system-config.addon.ts
8
8
  /**
9
9
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -1,4 +1,4 @@
1
- import { $ as errMsg, et as BaseAddon, vt as hydrateSchema } from "../../dist-ClOjKsC4.mjs";
1
+ import { $ as errMsg, et as BaseAddon, vt as hydrateSchema } from "../../dist-C68OyuEd.mjs";
2
2
  //#region src/builtins/system-config/system-config.addon.ts
3
3
  /**
4
4
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -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-BCseJMTD.js");
6
+ const require_dist = require("../../dist-BP89I7gi.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  let node_path = require("node:path");
9
9
  node_path = require_chunk.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { P as logDestinationCapability, et as BaseAddon } from "../../dist-ClOjKsC4.mjs";
1
+ import { P as logDestinationCapability, et as BaseAddon } from "../../dist-C68OyuEd.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  import * as path$1 from "node:path";
4
4
  import path from "node:path";
@@ -1,5 +1,5 @@
1
1
  let zod = require("zod");
2
- //#region ../types/dist/sleep-DJaTV2D7.mjs
2
+ //#region ../types/dist/sleep-b4Jf2n33.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -2594,6 +2594,18 @@ function method(input, output, options) {
2594
2594
  timeoutMs: options?.timeoutMs
2595
2595
  };
2596
2596
  }
2597
+ /**
2598
+ * A wrapper/system-only method: served exclusively by the cap's system-level
2599
+ * provider (`InferProvider`), and OPTIONAL on `InferNativeProvider` so per-device
2600
+ * driver natives don't stub out a wrapper concern (e.g. a cross-device cache
2601
+ * overview). The `systemOnly: true` literal is what `InferNativeProvider` keys on.
2602
+ */
2603
+ function systemMethod(input, output, options) {
2604
+ return {
2605
+ ...method(input, output, options),
2606
+ systemOnly: true
2607
+ };
2608
+ }
2597
2609
  /** Shorthand to define an event schema */
2598
2610
  function event(data) {
2599
2611
  return { data };
@@ -16183,7 +16195,20 @@ var snapshotCapability = {
16183
16195
  invalidateCache: method(zod.z.object({ deviceId: zod.z.number() }), zod.z.void(), {
16184
16196
  kind: "mutation",
16185
16197
  auth: "admin"
16186
- })
16198
+ }),
16199
+ /**
16200
+ * Cache-only batch overview — answers from the wrapper's in-memory cache in
16201
+ * O(n) and NEVER triggers a capture. Lets a grid skip requesting images for
16202
+ * devices that never produced a frame, and gives it an ETag per device for
16203
+ * conditional (304-able) image fetches. `lastCapturedAt`/`cacheAgeMs`/`etag`
16204
+ * are null for a device with no cached frame.
16205
+ */
16206
+ getSnapshotOverview: systemMethod(zod.z.object({ deviceIds: zod.z.array(zod.z.number()).min(1).max(200) }), zod.z.array(zod.z.object({
16207
+ deviceId: zod.z.number(),
16208
+ lastCapturedAt: zod.z.number().nullable(),
16209
+ cacheAgeMs: zod.z.number().nullable(),
16210
+ etag: zod.z.string().nullable()
16211
+ })))
16187
16212
  },
16188
16213
  status: {
16189
16214
  schema: SnapshotStatusSchema,
@@ -23898,6 +23923,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
23898
23923
  addonId: null,
23899
23924
  access: "view"
23900
23925
  },
23926
+ "snapshot.getSnapshotOverview": {
23927
+ capName: "snapshot",
23928
+ capScope: "device",
23929
+ addonId: null,
23930
+ access: "view"
23931
+ },
23901
23932
  "snapshot.invalidateCache": {
23902
23933
  capName: "snapshot",
23903
23934
  capScope: "device",
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- //#region ../types/dist/sleep-DJaTV2D7.mjs
2
+ //#region ../types/dist/sleep-b4Jf2n33.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -2594,6 +2594,18 @@ function method(input, output, options) {
2594
2594
  timeoutMs: options?.timeoutMs
2595
2595
  };
2596
2596
  }
2597
+ /**
2598
+ * A wrapper/system-only method: served exclusively by the cap's system-level
2599
+ * provider (`InferProvider`), and OPTIONAL on `InferNativeProvider` so per-device
2600
+ * driver natives don't stub out a wrapper concern (e.g. a cross-device cache
2601
+ * overview). The `systemOnly: true` literal is what `InferNativeProvider` keys on.
2602
+ */
2603
+ function systemMethod(input, output, options) {
2604
+ return {
2605
+ ...method(input, output, options),
2606
+ systemOnly: true
2607
+ };
2608
+ }
2597
2609
  /** Shorthand to define an event schema */
2598
2610
  function event(data) {
2599
2611
  return { data };
@@ -16183,7 +16195,20 @@ var snapshotCapability = {
16183
16195
  invalidateCache: method(z.object({ deviceId: z.number() }), z.void(), {
16184
16196
  kind: "mutation",
16185
16197
  auth: "admin"
16186
- })
16198
+ }),
16199
+ /**
16200
+ * Cache-only batch overview — answers from the wrapper's in-memory cache in
16201
+ * O(n) and NEVER triggers a capture. Lets a grid skip requesting images for
16202
+ * devices that never produced a frame, and gives it an ETag per device for
16203
+ * conditional (304-able) image fetches. `lastCapturedAt`/`cacheAgeMs`/`etag`
16204
+ * are null for a device with no cached frame.
16205
+ */
16206
+ getSnapshotOverview: systemMethod(z.object({ deviceIds: z.array(z.number()).min(1).max(200) }), z.array(z.object({
16207
+ deviceId: z.number(),
16208
+ lastCapturedAt: z.number().nullable(),
16209
+ cacheAgeMs: z.number().nullable(),
16210
+ etag: z.string().nullable()
16211
+ })))
16187
16212
  },
16188
16213
  status: {
16189
16214
  schema: SnapshotStatusSchema,
@@ -23898,6 +23923,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
23898
23923
  addonId: null,
23899
23924
  access: "view"
23900
23925
  },
23926
+ "snapshot.getSnapshotOverview": {
23927
+ capName: "snapshot",
23928
+ capScope: "device",
23929
+ addonId: null,
23930
+ access: "view"
23931
+ },
23901
23932
  "snapshot.invalidateCache": {
23902
23933
  capName: "snapshot",
23903
23934
  capScope: "device",
package/dist/index.js CHANGED
@@ -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-BCseJMTD.js");
3
+ const require_dist = require("./dist-BP89I7gi.js");
4
4
  const require_model_download_service = require("./model-download-service-D-Umz4-L.js");
5
5
  const require_resource_monitor = require("./resource-monitor-DNNomR-i.js");
6
6
  const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
@@ -21,7 +21,7 @@ const require_builtins_local_auth_local_auth_addon = require("./builtins/local-a
21
21
  require("./builtins/local-auth/index.js");
22
22
  const require_builtins_device_manager_device_manager_addon = require("./builtins/device-manager/device-manager.addon.js");
23
23
  require("./builtins/device-manager/index.js");
24
- const require_manifest_python_deps = require("./manifest-python-deps-BVUZVpma.js");
24
+ const require_manifest_python_deps = require("./manifest-python-deps-CJn9aExb.js");
25
25
  const require_custom_action_registry = require("./custom-action-registry-vLYEFTtv.js");
26
26
  let _camstack_types_node = require("@camstack/types/node");
27
27
  let zod = require("zod");
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as errMsg$1, A as isVoidInput, Ct as resolveCapMount, F as looseSchema, M as lifecycleJobSchema, O as isArrayOutputSchema, St as readinessKey, V as procedureAuthKey, _t as expandCapMethods, bt as parseJsonObject, ct as ReadinessRegistry, dt as asJsonObject$1, ft as asNumber, ht as emitDownForOwnedCaps, j as kebabToCamel, k as isObjectInput, lt as ReadinessTimeoutError, mt as createEvent, nt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, o as METHOD_ACCESS_MAP, p as addonSettingsCapability, pt as asString$1, rt as DEVICE_STATUS_METHOD, s as RUNTIME_DEFAULTS, st as EventCategory$1, t as ALL_CAPABILITY_DEFINITIONS, tt as DATAPLANE_SECRET_HEADER$1, wt as scopeKey, xt as parseJsonUnknown$1 } from "./dist-ClOjKsC4.mjs";
1
+ import { $ as errMsg$1, A as isVoidInput, Ct as resolveCapMount, F as looseSchema, M as lifecycleJobSchema, O as isArrayOutputSchema, St as readinessKey, V as procedureAuthKey, _t as expandCapMethods, bt as parseJsonObject, ct as ReadinessRegistry, dt as asJsonObject$1, ft as asNumber, ht as emitDownForOwnedCaps, j as kebabToCamel, k as isObjectInput, lt as ReadinessTimeoutError, mt as createEvent, nt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, o as METHOD_ACCESS_MAP, p as addonSettingsCapability, pt as asString$1, rt as DEVICE_STATUS_METHOD, s as RUNTIME_DEFAULTS, st as EventCategory$1, t as ALL_CAPABILITY_DEFINITIONS, tt as DATAPLANE_SECRET_HEADER$1, wt as scopeKey, xt as parseJsonUnknown$1 } from "./dist-C68OyuEd.mjs";
2
2
  import { a as downloadModel, c as getModelFilePath, d as contentTypeFor, f as createAuthenticatedFileServer, h as resolveFilePath, i as downloadFile, l as isModelDownloaded, m as parseTokenizedUrl, n as collectModelFiles, o as ensureModel, p as parseRangeHeader, r as deleteModelFromDisk, s as fetchJson, t as ModelDownloadService, u as createFileDataPlaneHandler } from "./model-download-service-C-IHWnXx.mjs";
3
3
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Le3l0qS2.mjs";
4
4
  import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
@@ -19,7 +19,7 @@ import { LocalAuthAddon, a as require_ms, c as __esmMin, d as __toCommonJS, f as
19
19
  import "./builtins/local-auth/index.mjs";
20
20
  import { DeviceManagerAddon } from "./builtins/device-manager/device-manager.addon.mjs";
21
21
  import "./builtins/device-manager/index.mjs";
22
- import { $ as buildUdsNativeCapProxy, A as createParentUnownedCallHandler, B as AGENT_CAP_FWD_SERVICE, C as buildLinkChain, D as HUB_CAP_FWD_ACTION, E as localProviderLink, F as createUdsLoggerWithControl, G as createLocalTransport, H as CapRouteError, I as LocalChildClient, J as SocketChannel, K as UdsLocalTransportClient, L as LocalChildRegistry, M as createUdsEventBus, N as udsChildLogToWorkerEntry, O as HUB_CAP_FWD_SERVICE, P as createUdsLogger, Q as buildNativeCapProxy, R as UDS_NO_ROUTE_PREFIX, S as brokerTransportLink, T as ipcParentLink, U as classifyCapRoute, V as CapRouteResolver, W as callWithServiceDiscovery, X as FrameDecoder, Y as localEndpointPath, Z as encodeFrame, _ as resolveHwAccel, _t as CapabilityUnavailableError, a as getWorkerDeviceRegistry, at as createAddonService, b as getCapUsageRegistry, c as setHubConnected, ct as capActionName, d as getMoleculerEventStats, dt as capServiceName, et as createBrokerDeviceManagerApi, f as registerEventBusService, ft as parseCapAction, g as createKernelHwAccel, gt as CapabilityHandle, h as AddonDepsManager, ht as DeviceRegistry, i as createUdsAddonContext, j as createUdsEventBridge, k as createHubCapForwardService, l as EVENT_TOPIC_PREFIX, lt as capActionSuffix, m as subscribePassthrough, mt as serializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as validateProviderRegistrations, p as setNodeEventInterest, pt as deserializeTypedArrays, q as UdsLocalTransportServer, r as createAddonContext, rt as mountNativeCapService, s as getOrInitReadinessRegistryForClient, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestPythonDeps, u as getBrokerEventBus, ut as capBareAction, v as CapUsageRegistry, vt as installManifestNativeDeps, w as ipcChildLink, x as brokerCallForCap, y as __resetCapUsageRegistryForTests, yt as resolveAddonClass, z as AGENT_CAP_FWD_ACTION } from "./manifest-python-deps-DyIcZtF5.mjs";
22
+ import { $ as buildUdsNativeCapProxy, A as createParentUnownedCallHandler, B as AGENT_CAP_FWD_SERVICE, C as buildLinkChain, D as HUB_CAP_FWD_ACTION, E as localProviderLink, F as createUdsLoggerWithControl, G as createLocalTransport, H as CapRouteError, I as LocalChildClient, J as SocketChannel, K as UdsLocalTransportClient, L as LocalChildRegistry, M as createUdsEventBus, N as udsChildLogToWorkerEntry, O as HUB_CAP_FWD_SERVICE, P as createUdsLogger, Q as buildNativeCapProxy, R as UDS_NO_ROUTE_PREFIX, S as brokerTransportLink, T as ipcParentLink, U as classifyCapRoute, V as CapRouteResolver, W as callWithServiceDiscovery, X as FrameDecoder, Y as localEndpointPath, Z as encodeFrame, _ as resolveHwAccel, _t as CapabilityUnavailableError, a as getWorkerDeviceRegistry, at as createAddonService, b as getCapUsageRegistry, c as setHubConnected, ct as capActionName, d as getMoleculerEventStats, dt as capServiceName, et as createBrokerDeviceManagerApi, f as registerEventBusService, ft as parseCapAction, g as createKernelHwAccel, gt as CapabilityHandle, h as AddonDepsManager, ht as DeviceRegistry, i as createUdsAddonContext, j as createUdsEventBridge, k as createHubCapForwardService, l as EVENT_TOPIC_PREFIX, lt as capActionSuffix, m as subscribePassthrough, mt as serializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as validateProviderRegistrations, p as setNodeEventInterest, pt as deserializeTypedArrays, q as UdsLocalTransportServer, r as createAddonContext, rt as mountNativeCapService, s as getOrInitReadinessRegistryForClient, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestPythonDeps, u as getBrokerEventBus, ut as capBareAction, v as CapUsageRegistry, vt as installManifestNativeDeps, w as ipcChildLink, x as brokerCallForCap, y as __resetCapUsageRegistryForTests, yt as resolveAddonClass, z as AGENT_CAP_FWD_ACTION } from "./manifest-python-deps-MJEshIKy.mjs";
23
23
  import { t as CustomActionRegistry } from "./custom-action-registry-BEXwC-oo.mjs";
24
24
  import { PYTHON_VERSION, buildBinaryPath, downloadBinary, ensureBinary, ensureFfmpeg, ensurePython, findInPath, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
25
25
  import { z } from "zod";
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-BCseJMTD.js");
2
+ const require_dist = require("./dist-BP89I7gi.js");
3
3
  let _camstack_types_node = require("@camstack/types/node");
4
4
  let node_http = require("node:http");
5
5
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { H as readNodePin } from "./dist-ClOjKsC4.mjs";
1
+ import { H as readNodePin } from "./dist-C68OyuEd.mjs";
2
2
  import { ensureBinary, ensureFfmpeg, ensurePython, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
3
3
  import { createServer } from "node:http";
4
4
  import * as fs from "node:fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.1.41",
3
+ "version": "1.1.43",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",