@camstack/system 1.2.20 → 1.2.22

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 (48) hide show
  1. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  2. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  3. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/alerts/alerts.addon.js +1 -1
  6. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  7. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.d.ts +26 -13
  8. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1366 -1098
  9. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1366 -1098
  10. package/dist/builtins/backup-orchestrator/schedule-store.d.ts +33 -0
  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/doorbell/virtual-doorbell.addon.js +1 -1
  16. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  17. package/dist/builtins/hub-forwarder/index.js +1 -1
  18. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  19. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  20. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  21. package/dist/builtins/local-network/local-network.addon.js +1 -1
  22. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  23. package/dist/builtins/loki-logging/index.js +1 -1
  24. package/dist/builtins/loki-logging/index.mjs +1 -1
  25. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  26. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  27. package/dist/builtins/platform-probe/index.js +1 -1
  28. package/dist/builtins/platform-probe/index.mjs +1 -1
  29. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  30. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  31. package/dist/builtins/snapshot/index.js +1 -1
  32. package/dist/builtins/snapshot/index.mjs +1 -1
  33. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  34. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  35. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +1 -1
  36. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -1
  37. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +5 -3
  38. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +5 -3
  39. package/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +6 -0
  40. package/dist/builtins/system-config/system-config.addon.js +1 -1
  41. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  42. package/dist/builtins/winston-logging/index.js +1 -1
  43. package/dist/builtins/winston-logging/index.mjs +1 -1
  44. package/dist/{dist-DmQ6thmF.mjs → dist-C9_XdXl5.mjs} +100 -4
  45. package/dist/{dist-OQ1yU92D.js → dist-j49ewCPY.js} +100 -4
  46. package/dist/index.js +1 -1
  47. package/dist/index.mjs +1 -1
  48. package/package.json +3 -2
@@ -3567,16 +3567,23 @@ var StorageLocationDeclarationSchema = zod.z.object({
3567
3567
  * Which node root the seeded `<id>:default` instance is placed under on a
3568
3568
  * FRESH install:
3569
3569
  * - `'data'` (default) — the node's data dir (`CAMSTACK_DATA` / boot dir),
3570
- * the appData volume. Right for small/durable data (backups, logs, models).
3570
+ * the appData volume. Right for small/durable data (logs, models).
3571
3571
  * - `'media'` — the dedicated media volume (`CAMSTACK_MEDIA_ROOT`) when that
3572
3572
  * env is set, else falls back to the data root. Right for bulky, hot media
3573
3573
  * (recordings, event media) that should stay off the appData disk.
3574
+ * - `'backup'` — the dedicated backup volume (`CAMSTACK_BACKUP_ROOT`, default
3575
+ * `/backups` in the image) so archives live on their own mount rather than
3576
+ * filling the appData disk. Falls back to the data root when unset.
3574
3577
  *
3575
3578
  * Only affects the seeded default's `basePath`; operators can repoint any
3576
3579
  * location afterwards, and a `defaultsTo` slot inherits its parent's root
3577
3580
  * regardless of this field. Absent (the common case) is treated as `'data'`.
3578
3581
  */
3579
- defaultRoot: zod.z.enum(["data", "media"]).optional()
3582
+ defaultRoot: zod.z.enum([
3583
+ "data",
3584
+ "media",
3585
+ "backup"
3586
+ ]).optional()
3580
3587
  });
3581
3588
  /** Friendly display labels for stream quality IDs. */
3582
3589
  var STREAM_QUALITY_LABELS = {
@@ -13573,6 +13580,41 @@ var LocationStatSchema = zod.z.object({
13573
13580
  present: zod.z.boolean()
13574
13581
  });
13575
13582
  /**
13583
+ * A backup schedule — the N:M "entry" that binds one cron cadence to a
13584
+ * SET of destination locations. Supersedes the per-location cron on
13585
+ * `BackupDestinationPolicy`: an operator creates a schedule, picks the
13586
+ * `backups` locations it should write to, and the orchestrator fans a
13587
+ * single archive out to all of them when the cron fires.
13588
+ *
13589
+ * `retentionCount` is per-schedule (D-decision 2026-07-28): every
13590
+ * location targeted by this schedule keeps this many archives from
13591
+ * this schedule's runs.
13592
+ *
13593
+ * `dataSources` optionally narrows which top-level state locations
13594
+ * (db, addons, tls, …) are archived; omitted = the orchestrator's
13595
+ * default full set.
13596
+ */
13597
+ var BackupScheduleSchema = zod.z.object({
13598
+ /** Stable id. Generated by the orchestrator on first upsert if absent. */
13599
+ id: zod.z.string(),
13600
+ /** Operator-facing display name. */
13601
+ label: zod.z.string(),
13602
+ /** 5-field POSIX cron. Empty = disabled cadence (kept for editing). */
13603
+ cron: zod.z.string(),
13604
+ /** Master on/off toggle for the whole schedule. */
13605
+ enabled: zod.z.boolean(),
13606
+ /** `backups`-location ids this schedule writes to (fan-out set). */
13607
+ locationIds: zod.z.array(zod.z.string()).readonly(),
13608
+ /** Archives kept per targeted location for this schedule. */
13609
+ retentionCount: zod.z.number().int().min(1).max(1e3),
13610
+ /** Optional subset of source locations to include; omitted = all. */
13611
+ dataSources: zod.z.array(zod.z.string()).readonly().optional(),
13612
+ /** ms-epoch of last successful run. */
13613
+ lastRunAt: zod.z.number().optional(),
13614
+ /** ms-epoch of next computed firing (read-only, filled on list). */
13615
+ nextRunAt: zod.z.number().optional()
13616
+ });
13617
+ /**
13576
13618
  * backup — singleton capability for backup management.
13577
13619
  *
13578
13620
  * Implemented by `local-backup` addon. Future providers (S3, rsync)
@@ -13599,7 +13641,14 @@ var backupCapability = {
13599
13641
  /** Subset of registered `backup-destination` addon ids to write to. */
13600
13642
  destinations: zod.z.array(zod.z.string()).optional(),
13601
13643
  locations: zod.z.array(zod.z.string()).optional(),
13602
- label: zod.z.string().optional()
13644
+ label: zod.z.string().optional(),
13645
+ /**
13646
+ * Per-run retention override applied to every targeted
13647
+ * destination. Used by schedule-driven runs (per-entry
13648
+ * retention). Omitted = each destination's own policy
13649
+ * retention (manual runs).
13650
+ */
13651
+ retentionCount: zod.z.number().int().min(1).max(1e3).optional()
13603
13652
  }).optional(), zod.z.array(BackupEntrySchema).readonly(), {
13604
13653
  kind: "mutation",
13605
13654
  auth: "admin"
@@ -13686,7 +13735,36 @@ var backupCapability = {
13686
13735
  ok: zod.z.boolean(),
13687
13736
  error: zod.z.string().optional(),
13688
13737
  nextRuns: zod.z.array(zod.z.number()).readonly()
13689
- }))
13738
+ })),
13739
+ /**
13740
+ * List every backup schedule (the N:M entries), each with its
13741
+ * computed `nextRunAt`. Powers the Schedules section of the
13742
+ * admin-UI Backups page.
13743
+ */
13744
+ listSchedules: method(zod.z.void(), zod.z.array(BackupScheduleSchema).readonly(), { auth: "admin" }),
13745
+ /**
13746
+ * Create or replace a schedule. An empty / absent `id` mints a new
13747
+ * one; a present `id` replaces in place. `cron` is validated
13748
+ * server-side; `locationIds` must reference existing `backups`
13749
+ * locations (unknown ids are dropped with a warning).
13750
+ */
13751
+ upsertSchedule: method(zod.z.object({
13752
+ id: zod.z.string().optional(),
13753
+ label: zod.z.string(),
13754
+ cron: zod.z.string(),
13755
+ enabled: zod.z.boolean(),
13756
+ locationIds: zod.z.array(zod.z.string()).readonly(),
13757
+ retentionCount: zod.z.number().int().min(1).max(1e3),
13758
+ dataSources: zod.z.array(zod.z.string()).readonly().optional()
13759
+ }), BackupScheduleSchema, {
13760
+ kind: "mutation",
13761
+ auth: "admin"
13762
+ }),
13763
+ /** Delete a schedule by id. Does not touch the target locations. */
13764
+ deleteSchedule: method(zod.z.object({ id: zod.z.string() }), zod.z.void(), {
13765
+ kind: "mutation",
13766
+ auth: "admin"
13767
+ })
13690
13768
  }
13691
13769
  };
13692
13770
  /**
@@ -23904,6 +23982,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
23904
23982
  addonId: null,
23905
23983
  access: "delete"
23906
23984
  },
23985
+ "backup.deleteSchedule": {
23986
+ capName: "backup",
23987
+ capScope: "system",
23988
+ addonId: null,
23989
+ access: "delete"
23990
+ },
23907
23991
  "backup.getEntries": {
23908
23992
  capName: "backup",
23909
23993
  capScope: "system",
@@ -23934,6 +24018,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
23934
24018
  addonId: null,
23935
24019
  access: "view"
23936
24020
  },
24021
+ "backup.listSchedules": {
24022
+ capName: "backup",
24023
+ capScope: "system",
24024
+ addonId: null,
24025
+ access: "view"
24026
+ },
23937
24027
  "backup.previewSchedule": {
23938
24028
  capName: "backup",
23939
24029
  capScope: "system",
@@ -23958,6 +24048,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
23958
24048
  addonId: null,
23959
24049
  access: "create"
23960
24050
  },
24051
+ "backup.upsertSchedule": {
24052
+ capName: "backup",
24053
+ capScope: "system",
24054
+ addonId: null,
24055
+ access: "create"
24056
+ },
23961
24057
  "battery.wakeForStream": {
23962
24058
  capName: "battery",
23963
24059
  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-OQ1yU92D.js");
3
+ const require_dist = require("./dist-j49ewCPY.js");
4
4
  const require_model_download_service = require("./model-download-service-hf0ookyy.js");
5
5
  const require_manifest_python_deps = require("./manifest-python-deps-CnRW2Utv.js");
6
6
  const require_resource_monitor = require("./resource-monitor-DNNomR-i.js");
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM$1, r as __exportAll, t as __commonJSMin$1 } from "./chunk-CNf5ZN-e.mjs";
2
- import { B as logLevelAtMost, Dt as readinessKey, Et as parseJsonUnknown$1, F as isVoidInput, I as kebabToCamel, L as lifecycleJobSchema, M as isArrayOutputSchema, N as isCollectionArrayMethod, Ot as resolveCapMount, P as isObjectInput, Tt as parseJsonObject, V as looseSchema, W as objectInputDeclaresAddonId, _t as asString$1, c as RUNTIME_DEFAULTS, ct as DEVICE_STATUS_METHOD, ft as ReadinessRegistry, gt as asNumber, ht as asJsonObject$1, it as errMsg$1, jt as EventCategory$1, k as extractNestedAddonId, kt as scopeKey, m as addonSettingsCapability, ot as DATAPLANE_SECRET_HEADER$1, pt as ReadinessTimeoutError, q as procedureAuthKey, s as METHOD_ACCESS_MAP, st as DEVICE_SETTINGS_CONTRIBUTION_METHODS, t as ALL_CAPABILITY_DEFINITIONS, vt as createEvent, xt as expandCapMethods, yt as emitDownForOwnedCaps } from "./dist-DmQ6thmF.mjs";
2
+ import { B as logLevelAtMost, Dt as readinessKey, Et as parseJsonUnknown$1, F as isVoidInput, I as kebabToCamel, L as lifecycleJobSchema, M as isArrayOutputSchema, N as isCollectionArrayMethod, Ot as resolveCapMount, P as isObjectInput, Tt as parseJsonObject, V as looseSchema, W as objectInputDeclaresAddonId, _t as asString$1, c as RUNTIME_DEFAULTS, ct as DEVICE_STATUS_METHOD, ft as ReadinessRegistry, gt as asNumber, ht as asJsonObject$1, it as errMsg$1, jt as EventCategory$1, k as extractNestedAddonId, kt as scopeKey, m as addonSettingsCapability, ot as DATAPLANE_SECRET_HEADER$1, pt as ReadinessTimeoutError, q as procedureAuthKey, s as METHOD_ACCESS_MAP, st as DEVICE_SETTINGS_CONTRIBUTION_METHODS, t as ALL_CAPABILITY_DEFINITIONS, vt as createEvent, xt as expandCapMethods, yt as emitDownForOwnedCaps } from "./dist-C9_XdXl5.mjs";
3
3
  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-Cp9f4dk6.mjs";
4
4
  import { $ as buildNativeCapProxy, A as createHubCapForwardService, B as AGENT_CAP_FWD_ACTION, C as brokerTransportLink, Ct as resolveAddonClass, D as localProviderLink, E as ipcParentLink, F as createUdsLogger, G as callWithServiceDiscovery, H as CapRouteResolver, I as createUdsLoggerWithControl, J as UdsLocalTransportServer, K as createLocalTransport, L as LocalChildClient, M as createUdsEventBridge, N as createUdsEventBus, O as HUB_CAP_FWD_ACTION, P as udsChildLogToWorkerEntry, Q as encodeFrame, R as LocalChildRegistry, S as brokerCallForCap, St as runNpm, T as ipcChildLink, U as CapRouteError, V as AGENT_CAP_FWD_SERVICE, W as classifyCapRoute, X as localEndpointPath, Y as SocketChannel, Z as FrameDecoder, _ as createKernelHwAccel, _t as CapabilityHandle, a as getWorkerDeviceRegistry, b as __resetCapUsageRegistryForTests, bt as installManifestNativeDeps, c as setHubConnected, ct as NATIVE_PROVIDER_SERVICE_INFIX, d as getBrokerEventBus, dt as capBareAction, et as buildUdsNativeCapProxy, f as getMoleculerEventStats, ft as capServiceName, g as AddonDepsManager, gt as DeviceRegistry, h as subscribePassthrough, ht as serializeTypedArrays, i as createUdsAddonContext, it as mountNativeCapService, j as createParentUnownedCallHandler, k as HUB_CAP_FWD_SERVICE, l as EVENT_TOPIC_PREFIX, lt as capActionName, m as setNodeEventInterest, mt as deserializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as createAddonService, p as registerEventBusService, pt as parseCapAction, q as UdsLocalTransportClient, r as createAddonContext, s as getOrInitReadinessRegistryForClient, st as validateProviderRegistrations, t as installManifestPythonDeps, tt as createBrokerDeviceManagerApi, u as clusterEventTopic, ut as capActionSuffix, v as resolveHwAccel, vt as CapabilityUnavailableError, w as buildLinkChain, wt as createAddonDataPlaneFacility, x as getCapUsageRegistry, xt as resolveNpmInvocation, y as CapUsageRegistry, yt as copyBundledNativeModules, z as UDS_NO_ROUTE_PREFIX } from "./manifest-python-deps-B30qVAuW.mjs";
5
5
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-BkP504Vq.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.2.20",
3
+ "version": "1.2.22",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",
@@ -125,7 +125,8 @@
125
125
  "id": "backups",
126
126
  "displayName": "Backups",
127
127
  "description": "Backup archives.",
128
- "cardinality": "multi"
128
+ "cardinality": "multi",
129
+ "defaultRoot": "backup"
129
130
  }
130
131
  ]
131
132
  },