@camstack/server 1.2.928 → 1.2.929
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +10 -8
- package/system/dist/addon-id-CVg1_r5E.mjs +39 -0
- package/system/dist/addon-id-Di0lNJ89.js +50 -0
- package/system/dist/addon-pages.cap-Df9FQwN1.js +49 -0
- package/system/dist/addon-pages.cap-DksUlE8j.mjs +44 -0
- package/system/dist/addon-settings.cap-3-TIIMq_.mjs +592 -0
- package/system/dist/addon-settings.cap-DAiE0Nb0.js +651 -0
- package/system/dist/addon-utils.mjs +1 -1
- package/system/dist/addon-widgets.cap-C4jxflbF.js +200 -0
- package/system/dist/addon-widgets.cap-D9m48X78.mjs +183 -0
- package/system/dist/base-addon-DD5dIfcZ.js +4624 -0
- package/system/dist/base-addon-Md14i7pe.mjs +4505 -0
- package/system/dist/base-device-2sL1DMm1.js +1103 -0
- package/system/dist/base-device-IuM1AwXZ.mjs +1098 -0
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +8 -6
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +6 -4
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +8 -6
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +7 -5
- package/system/dist/builtins/alerts/alerts.addon.js +113 -56
- package/system/dist/builtins/alerts/alerts.addon.mjs +60 -3
- package/system/dist/builtins/autotrack/index.js +21 -17
- package/system/dist/builtins/autotrack/index.mjs +5 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +14 -11
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +8 -5
- package/system/dist/builtins/calendars/calendars.addon.js +8 -6
- package/system/dist/builtins/calendars/calendars.addon.mjs +3 -1
- package/system/dist/builtins/camera-grid/index.js +615 -58
- package/system/dist/builtins/camera-grid/index.mjs +558 -1
- package/system/dist/builtins/composer/composer.addon.js +788 -209
- package/system/dist/builtins/composer/composer.addon.mjs +583 -4
- package/system/dist/builtins/console-logging/index.js +4 -3
- package/system/dist/builtins/console-logging/index.mjs +2 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +7887 -381
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +7511 -5
- package/system/dist/builtins/core-notifier/core-notifier.addon.js +731 -21
- package/system/dist/builtins/core-notifier/core-notifier.addon.mjs +711 -1
- package/system/dist/builtins/device-history/device-history.addon.js +110 -31
- package/system/dist/builtins/device-history/device-history.addon.mjs +81 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +12806 -227
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +12583 -5
- package/system/dist/builtins/hub-forwarder/index.js +4 -3
- package/system/dist/builtins/hub-forwarder/index.mjs +2 -1
- package/system/dist/builtins/keychain/index.js +31 -28
- package/system/dist/builtins/keychain/index.mjs +7 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +15 -12
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +4 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +140 -39
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +106 -6
- package/system/dist/builtins/local-network/local-network.addon.js +43 -39
- package/system/dist/builtins/local-network/local-network.addon.mjs +7 -3
- package/system/dist/builtins/loki-logging/index.js +23 -17
- package/system/dist/builtins/loki-logging/index.mjs +7 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +156 -15
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +151 -10
- package/system/dist/builtins/platform-probe/index.js +25 -23
- package/system/dist/builtins/platform-probe/index.mjs +12 -10
- package/system/dist/builtins/record-entries/index.js +9 -7
- package/system/dist/builtins/record-entries/index.mjs +3 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +4 -4
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +97 -44
- package/system/dist/builtins/snapshot/index.mjs +54 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +5 -4
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +21 -20
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +87 -61
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +29 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +81 -72
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +10 -1
- package/system/dist/builtins/system-config/system-config.addon.js +17 -14
- package/system/dist/builtins/system-config/system-config.addon.mjs +118 -115
- package/system/dist/builtins/winston-logging/index.js +7 -5
- package/system/dist/builtins/winston-logging/index.mjs +3 -1
- package/system/dist/calendars.cap-CaFlShS9.js +155 -0
- package/system/dist/calendars.cap-_C4eD4fi.mjs +138 -0
- package/system/dist/camstack-error-DJ-TUAi1.js +23 -0
- package/system/dist/camstack-error-viZYfcj9.mjs +18 -0
- package/system/dist/cap-call-context-Bd76CbOW.js +95 -0
- package/system/dist/cap-call-context-DNwdgGSQ.mjs +78 -0
- package/system/dist/capability-definition-C2rJdVeX.mjs +177 -0
- package/system/dist/capability-definition-HCmTem8c.js +242 -0
- package/system/dist/{capture-engine-BcuwOSXv.js → capture-engine-DZ0LIUqA.js} +5 -4
- package/system/dist/{capture-engine-Bz7eXFjT.mjs → capture-engine-DiwbjoWp.mjs} +2 -1
- package/system/dist/command-origin-claim-Cief660O.js +35 -0
- package/system/dist/command-origin-claim-D1Wy7Qld.mjs +24 -0
- package/system/dist/composition-sources-Caqv7O7z.mjs +391 -0
- package/system/dist/composition-sources-CgnHjm8Q.js +408 -0
- package/system/dist/{constants-D2etJ02O.js → constants-Ba3FTIHl.js} +1 -1
- package/system/dist/constants-C860Y6U4.js +26 -0
- package/system/dist/{constants-BcUTQd1M.mjs → constants-DB4piTD5.mjs} +1 -1
- package/system/dist/constants-DCLpoF4L.mjs +21 -0
- package/system/dist/coral-accelerators-7o8hqvcN.js +564 -0
- package/system/dist/coral-accelerators-BKcXP59c.mjs +521 -0
- package/system/dist/core-blocks.cap-C6iKAZ-x.mjs +17986 -0
- package/system/dist/core-blocks.cap-LEMqVwxO.js +18705 -0
- package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
- package/system/dist/custom-actions-BFUSalC9.mjs +25 -0
- package/system/dist/custom-actions-D92NRi2c.js +36 -0
- package/system/dist/database-snapshot.cap-DF38e-0P.js +162 -0
- package/system/dist/database-snapshot.cap-dhrc9xnY.mjs +133 -0
- package/system/dist/declared-device-BWphj9WE.js +303 -0
- package/system/dist/declared-device-CKERA1Hi.mjs +286 -0
- package/system/dist/{device-ca-ExMN3xW3.mjs → device-ca-BLM6fccc.mjs} +2 -1
- package/system/dist/{device-ca-CU8zh9Pi.js → device-ca-C5kJE6mL.js} +7 -6
- package/system/dist/device-certificate-Cddm4Idn.mjs +91 -0
- package/system/dist/device-certificate-CguVACQO.js +162 -0
- package/system/dist/device-identifiers-BQg9EQi1.js +600 -0
- package/system/dist/device-identifiers-iSuQCKmK.mjs +529 -0
- package/system/dist/device-kind-BJ2pfsjw.mjs +78 -0
- package/system/dist/device-kind-CsSiv_YF.js +101 -0
- package/system/dist/device-manager.cap-2abwVLCM.js +2874 -0
- package/system/dist/device-manager.cap-CFZSPfUh.mjs +2749 -0
- package/system/dist/device-provider.cap-3Uvk6f5-.mjs +331 -0
- package/system/dist/device-provider.cap-D7TV2kVH.js +366 -0
- package/system/dist/{device-row-store-CeW_GWh9.mjs → device-row-store-YF3jtmkk.mjs} +4 -1
- package/system/dist/{device-row-store-BMIR-n3m.js → device-row-store-doTfMOqn.js} +12 -9
- package/system/dist/device-transitions.cap-B5w5PYU_.js +860 -0
- package/system/dist/device-transitions.cap-DojcwEuX.mjs +819 -0
- package/system/dist/device-type-CbQsnFdC.js +477 -0
- package/system/dist/device-type-DgEvK3ch.mjs +454 -0
- package/system/dist/entry-kind-D9MuVJCK.mjs +44 -0
- package/system/dist/entry-kind-cq90c--V.js +55 -0
- package/system/dist/error.cap-CSM_SRfR.mjs +3423 -0
- package/system/dist/error.cap-DBhgPeWK.js +3848 -0
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/history-catalog-BKRarIL_.js +831 -0
- package/system/dist/history-catalog-BwTeQ4Mr.mjs +802 -0
- package/system/dist/{hub-identity-Csxx2Q8k.js → hub-identity-BMdR3Mw9.js} +2 -2
- package/system/dist/{hub-identity-CYC1820R.mjs → hub-identity-DjMN9Ac2.mjs} +10 -10
- package/system/dist/{hub-mdns-ciao-By5577HM.js → hub-mdns-ciao--0v1TKME.js} +5 -5
- package/system/dist/{hub-mdns-ciao-CCDxM5qz.mjs → hub-mdns-ciao-DBrtHOcc.mjs} +2 -2
- package/system/dist/index.js +763 -151
- package/system/dist/index.mjs +832 -220
- package/system/dist/integration-instances.cap-Cl9O-k4h.mjs +538 -0
- package/system/dist/integration-instances.cap-dJIxg2_s.js +549 -0
- package/system/dist/keychain-admin.cap-Db_oFX4H.js +425 -0
- package/system/dist/keychain-admin.cap-GtM7gVGG.mjs +396 -0
- package/system/dist/l10n-Bu6aUvSY.mjs +10 -0
- package/system/dist/l10n-CGMvp7NF.js +15 -0
- package/system/dist/labels-DX5S8deC.js +81 -0
- package/system/dist/labels-DsBcU7md.mjs +64 -0
- package/system/dist/{legacy-integration-rows-door-CVwOo5aq.js → legacy-integration-rows-door-B1nzxxr5.js} +2 -2
- package/system/dist/{legacy-integration-rows-door-D9tQOUzh.mjs → legacy-integration-rows-door-nTvo_6jQ.mjs} +1 -1
- package/system/dist/log-destination.cap-CxZzAVaR.mjs +143 -0
- package/system/dist/log-destination.cap-DELPJkZ0.js +148 -0
- package/system/dist/low-power-sleep.cap-7lfVU41N.js +103 -0
- package/system/dist/low-power-sleep.cap-tGPmaZ_V.mjs +92 -0
- package/system/dist/mask-shape-Ci8Co9w0.mjs +57 -0
- package/system/dist/mask-shape-CmPA2fst.js +92 -0
- package/system/dist/metrics-provider.cap-BNmcHDkQ.mjs +405 -0
- package/system/dist/metrics-provider.cap-BcmQUt6l.js +410 -0
- package/system/dist/migration-BMjgkyG2.js +380 -0
- package/system/dist/migration-DRJAtdy7.mjs +321 -0
- package/system/dist/network-access.cap-B5TWLDCC.js +1099 -0
- package/system/dist/network-access.cap-BJnGbE6n.mjs +1004 -0
- package/system/dist/notification-rules.cap-B__YBgnG.js +3422 -0
- package/system/dist/notification-rules.cap-D9ArZlwx.mjs +3357 -0
- package/system/dist/ops-log-CB4pIdqi.mjs +64 -0
- package/system/dist/ops-log-pxt9176Z.js +81 -0
- package/system/dist/pinned-binary-BOhOSNff.js +28 -0
- package/system/dist/pinned-binary-CrIRAi4G.mjs +23 -0
- package/system/dist/platform-probe.cap-1WrMhWHx.js +250 -0
- package/system/dist/platform-probe.cap-BFeqFLtQ.mjs +233 -0
- package/system/dist/prefix-walk-B4b2-9aK.mjs +790 -0
- package/system/dist/prefix-walk-DC0ljmbB.js +843 -0
- package/system/dist/ptz-autotrack.cap-BW7w0zHD.js +229 -0
- package/system/dist/ptz-autotrack.cap-DT2GypXw.mjs +224 -0
- package/system/dist/quantity-D3g5SxsZ.mjs +114 -0
- package/system/dist/quantity-lY1KiTSZ.js +143 -0
- package/system/dist/raw-secret-migration-DxuBFtvi.js +50 -0
- package/system/dist/raw-secret-migration-iv88mLoc.mjs +39 -0
- package/system/dist/record-entries.cap-sMUhTvTU.mjs +75 -0
- package/system/dist/record-entries.cap-ti1C046R.js +80 -0
- package/system/dist/record-kind-DoBfYHCs.js +203 -0
- package/system/dist/record-kind-ub6NXqfh.mjs +162 -0
- package/system/dist/recording-archive.cap-7OrIn9e5.mjs +1299 -0
- package/system/dist/recording-archive.cap-D7bo-QSM.js +1328 -0
- package/system/dist/records.cap-ClcWV64i.js +329 -0
- package/system/dist/records.cap-CwLT2ByG.mjs +294 -0
- package/system/dist/relocate-CdVQAk-w.js +804 -0
- package/system/dist/relocate-CoZZTui1.mjs +661 -0
- package/system/dist/rename-composition-block-7WIICIDq.mjs +33525 -0
- package/system/dist/rename-composition-block-CcWLwVhG.js +34692 -0
- package/system/dist/{restore-archive-BJfyu0sG.mjs → restore-archive-CjAyKpgX.mjs} +96 -94
- package/system/dist/{restore-archive-CIFvqOze.js → restore-archive-CkTkv3Ss.js} +6 -4
- package/system/dist/scoped-settings-CylSSq_8.js +955 -0
- package/system/dist/scoped-settings-DVWUIP7Z.mjs +650 -0
- package/system/dist/server-name-BIhLuHvX.mjs +35 -0
- package/system/dist/server-name-OALNvpqC.js +52 -0
- package/system/dist/settings-store.cap-Ci4F2zul.mjs +569 -0
- package/system/dist/settings-store.cap-wlJhCspr.js +640 -0
- package/system/dist/snapshot.cap-3suPdBHV.js +250 -0
- package/system/dist/snapshot.cap-Bs8Oyaqh.mjs +245 -0
- package/system/dist/source-info-DGB7SdB_.mjs +190 -0
- package/system/dist/source-info-DtWf4k2j.js +225 -0
- package/system/dist/storage-admin.cap-BSv1NjKJ.mjs +883 -0
- package/system/dist/storage-admin.cap-he0OqvVM.js +906 -0
- package/system/dist/storage-location-CBT8GCD6.mjs +163 -0
- package/system/dist/storage-location-CTweDMZf.js +198 -0
- package/system/dist/storage-location-mode-B21UVRRX.mjs +167 -0
- package/system/dist/storage-location-mode-CS4sMzo-.js +232 -0
- package/system/dist/storage-migration.cap-CyyATY_p.js +330 -0
- package/system/dist/storage-migration.cap-D7QqGobp.mjs +313 -0
- package/system/dist/storage-occupancy.cap-2rmnS58Z.js +622 -0
- package/system/dist/storage-occupancy.cap-CqBztTl9.mjs +611 -0
- package/system/dist/storage-provider.cap-Bw0CfxVc.js +213 -0
- package/system/dist/storage-provider.cap-CMeck2w4.mjs +202 -0
- package/system/dist/stream-catalog.cap-Bp7SkgIf.mjs +6560 -0
- package/system/dist/stream-catalog.cap-D3uwePiA.js +6763 -0
- package/system/dist/streaming-shared-B8cXatuU.mjs +431 -0
- package/system/dist/streaming-shared-DQwFZOSi.js +526 -0
- package/system/dist/system-reasons-Be_k1W8g.js +25 -0
- package/system/dist/system-reasons-CYj4qwyS.mjs +20 -0
- package/system/dist/tag-BxLazvVb.js +2138 -0
- package/system/dist/tag-uZBAq6ox.mjs +2073 -0
- package/system/dist/user-management.cap-B9QDu8NE.js +825 -0
- package/system/dist/user-management.cap-DBIi77sB.mjs +766 -0
- package/system/dist/vector-store.cap-DnyfrYDn.js +330 -0
- package/system/dist/vector-store.cap-h2GHWQ1t.mjs +319 -0
- package/system/dist/{wal-maintenance-CTrCPzds.mjs → wal-maintenance-BG01rOn9.mjs} +0 -0
- package/system/dist/{wal-maintenance-dq7T3quB.js → wal-maintenance-DyrebYKF.js} +0 -0
- package/system/dist/zod-secret-DS7mj1bk.js +78 -0
- package/system/dist/zod-secret-zY4nM61M.mjs +73 -0
- package/system/package.json +1 -1
- package/system/dist/composition-sources-BI614LJx.mjs +0 -141
- package/system/dist/composition-sources-v_kkb8A9.js +0 -152
- package/system/dist/coral-accelerators-BSVsBVzt.js +0 -250
- package/system/dist/coral-accelerators-BW3OcrLD.mjs +0 -231
- package/system/dist/dist-BCHMSqzc.mjs +0 -143467
- package/system/dist/dist-BZfvhfS1.js +0 -146970
- package/system/dist/prefix-walk-DAOBSyH1.mjs +0 -88
- package/system/dist/prefix-walk-Dv6MLZlM.js +0 -99
- package/system/dist/rename-composition-block-C9HuBrKS.js +0 -112
- package/system/dist/rename-composition-block-DtaYmYAR.mjs +0 -101
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { c as method } from "./capability-definition-C2rJdVeX.mjs";
|
|
2
|
+
import { t as NOT_A_DEVICE } from "./system-reasons-CYj4qwyS.mjs";
|
|
3
|
+
import { C as StorageMigrationResidueSchema, S as StorageMigrationPlanSchema, _ as StorageMigrationInputSchema, f as StorageCleanupInputSchema, h as StorageMigrationDrainInputSchema, m as StorageCleanupStatusInputSchema, p as StorageCleanupJobSchema, v as StorageMigrationJobSchema, x as StorageMigrationMoverSchema } from "./relocate-CoZZTui1.mjs";
|
|
4
|
+
import { i as StorageLocationTypeSchema, n as StorageLocationRefSchema, r as StorageLocationSchema, t as StorageDrainProgressSchema } from "./storage-location-CBT8GCD6.mjs";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
//#region ../types/dist/esm/interfaces/storage-location-declaration.mjs
|
|
7
|
+
/**
|
|
8
|
+
* `StorageLocationDeclaration` — a single storage-location entry declared by
|
|
9
|
+
* an addon in its `package.json` under `camstack.storageLocations`.
|
|
10
|
+
*
|
|
11
|
+
* Design intent:
|
|
12
|
+
* - **Addon declares its needs** — each addon describes the logical storage
|
|
13
|
+
* slots it requires (e.g. `recordings`, `recordingsLow`) without caring
|
|
14
|
+
* about the physical path.
|
|
15
|
+
* - **Kernel aggregates** — at boot the kernel collects declarations from all
|
|
16
|
+
* installed addons, deduplicates by `id`, and exposes the union via the
|
|
17
|
+
* storage-locations settings surface.
|
|
18
|
+
* - **Orchestrator seeds** — for every declared `id` the orchestrator ensures
|
|
19
|
+
* at least one instance named `<id>:default` is present, using
|
|
20
|
+
* `defaultsTo` to inherit the resolved root from another location when the
|
|
21
|
+
* declaration is a derivative slot (e.g. `recordingsLow` defaults to
|
|
22
|
+
* `recordings`).
|
|
23
|
+
* - **ids are global** — `id` values are shared across the entire deployment;
|
|
24
|
+
* two addons declaring the same `id` must agree on `cardinality` (validated
|
|
25
|
+
* at kernel aggregation time, not here).
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* `StorageAccess` — how the service that DECLARED a storage-location kind
|
|
29
|
+
* actually reaches the bytes. It is the constraint that decides which
|
|
30
|
+
* `storage-provider`s may back a location of that kind.
|
|
31
|
+
*
|
|
32
|
+
* - `'local-path'` — the service asks `storage.resolve` for a path string and
|
|
33
|
+
* then does its own `node:fs` I/O on it (the recorder's segment writer, the
|
|
34
|
+
* post-analysis media roots). Only a provider that serves a genuine local
|
|
35
|
+
* filesystem (`getProviderInfo().nodeLocal === true`) can satisfy that: a
|
|
36
|
+
* remote provider's `resolve` returns a path on the REMOTE host, and
|
|
37
|
+
* `fs.readdir` of it on this node either fails or — far worse — succeeds
|
|
38
|
+
* against a same-named local directory that is something else entirely.
|
|
39
|
+
*
|
|
40
|
+
* - `'cap-mediated'` — every byte travels through the `storage` cap
|
|
41
|
+
* (`read`/`write`, or `beginUpload`/`writeChunk`/`finalizeUpload`). The
|
|
42
|
+
* service never sees a path, so any provider can back it. `backups` is the
|
|
43
|
+
* one kind that qualifies today.
|
|
44
|
+
*
|
|
45
|
+
* Before this existed, `recordings` was unreachable by SFTP/S3/WebDAV only as
|
|
46
|
+
* an EMERGENT property of how the recorder happened to be written. Nothing
|
|
47
|
+
* refused the configuration; the first write simply went somewhere wrong, and
|
|
48
|
+
* a recording write that goes wrong surfaces as a silent black window rather
|
|
49
|
+
* than an error (the read path does not `stat`). This turns that accident into
|
|
50
|
+
* a declared, enforced, testable refusal.
|
|
51
|
+
*/
|
|
52
|
+
var StorageAccessSchema = /* @__PURE__ */ z.enum(["local-path", "cap-mediated"]);
|
|
53
|
+
/**
|
|
54
|
+
* What an ABSENT `access` means. Fail-closed: a declaration that says nothing
|
|
55
|
+
* is treated as if it does raw filesystem I/O, so a remote provider is
|
|
56
|
+
* refused for it. The permissive value must be written down.
|
|
57
|
+
*/
|
|
58
|
+
var STORAGE_ACCESS_FALLBACK = "local-path";
|
|
59
|
+
var StorageLocationDeclarationSchema = /* @__PURE__ */ z.object({
|
|
60
|
+
/**
|
|
61
|
+
* Global location identifier, e.g. `recordings` or `recordingsLow`.
|
|
62
|
+
* Must start with a lowercase letter and may contain letters, digits, and
|
|
63
|
+
* hyphens.
|
|
64
|
+
*/
|
|
65
|
+
id: /* @__PURE__ */ z.string().regex(/^[a-z][a-zA-Z0-9-]*$/, { message: "id must start with a lowercase letter and contain only letters, digits, or hyphens" }),
|
|
66
|
+
/** Human-readable name shown in the admin UI. */
|
|
67
|
+
displayName: /* @__PURE__ */ z.string().min(1, { message: "displayName must not be empty" }),
|
|
68
|
+
/** Optional longer explanation of what data this location stores. */
|
|
69
|
+
description: /* @__PURE__ */ z.string().optional(),
|
|
70
|
+
/**
|
|
71
|
+
* `single` — exactly one instance of this location is allowed system-wide
|
|
72
|
+
* (e.g. `logs`, `models`). The operator can edit it but not add more.
|
|
73
|
+
* `multi` — the operator may register several instances (e.g. a second
|
|
74
|
+
* `recordings` on a NAS for disk tiering); one is the default at any time.
|
|
75
|
+
*/
|
|
76
|
+
cardinality: /* @__PURE__ */ z.enum(["single", "multi"]),
|
|
77
|
+
/**
|
|
78
|
+
* HOW the declaring service reaches the bytes — and therefore WHICH
|
|
79
|
+
* providers may back a location of this kind. See {@link StorageAccessSchema}
|
|
80
|
+
* and {@link STORAGE_ACCESS_FALLBACK}.
|
|
81
|
+
*
|
|
82
|
+
* Absent means `'local-path'`. That default is FAIL-CLOSED on purpose: it
|
|
83
|
+
* can only over-restrict (refuse a remote provider for a kind that might
|
|
84
|
+
* have coped) and never under-restrict. Declaring `'cap-mediated'` is the
|
|
85
|
+
* permissive direction and is therefore never inferred — a repo guard
|
|
86
|
+
* (`scripts/check-storage-access-declarations.ts`) refuses to let it be
|
|
87
|
+
* reached by omission.
|
|
88
|
+
*/
|
|
89
|
+
access: /* @__PURE__ */ StorageAccessSchema.optional(),
|
|
90
|
+
/**
|
|
91
|
+
* When set, the default instance for this location inherits its resolved
|
|
92
|
+
* root from the named location's default instance. Useful for derivative
|
|
93
|
+
* slots (e.g. `recordingsLow` → `recordings`) so operators only need to
|
|
94
|
+
* configure the primary location.
|
|
95
|
+
*/
|
|
96
|
+
defaultsTo: /* @__PURE__ */ z.string().optional(),
|
|
97
|
+
/**
|
|
98
|
+
* Which node root the seeded `<id>:default` instance is placed under on a
|
|
99
|
+
* FRESH install:
|
|
100
|
+
* - `'data'` (default) — the node's data dir (`CAMSTACK_DATA` / boot dir),
|
|
101
|
+
* the appData volume. Right for small/durable data (logs, models).
|
|
102
|
+
* - `'media'` — the dedicated media volume (`CAMSTACK_MEDIA_ROOT`) when that
|
|
103
|
+
* env is set, else falls back to the data root. Right for bulky, hot media
|
|
104
|
+
* (recordings, event media) that should stay off the appData disk.
|
|
105
|
+
* - `'backup'` — the dedicated backup volume (`CAMSTACK_BACKUP_ROOT`, default
|
|
106
|
+
* `/backups` in the image) so archives live on their own mount rather than
|
|
107
|
+
* filling the appData disk. Falls back to the data root when unset.
|
|
108
|
+
*
|
|
109
|
+
* Only affects the seeded default's `basePath`; operators can repoint any
|
|
110
|
+
* location afterwards, and a `defaultsTo` slot inherits its parent's root
|
|
111
|
+
* regardless of this field. Absent (the common case) is treated as `'data'`.
|
|
112
|
+
*/
|
|
113
|
+
defaultRoot: /* @__PURE__ */ z.enum([
|
|
114
|
+
"data",
|
|
115
|
+
"media",
|
|
116
|
+
"backup"
|
|
117
|
+
]).optional()
|
|
118
|
+
});
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region ../types/dist/esm/capabilities/storage.cap.mjs
|
|
121
|
+
/**
|
|
122
|
+
* `storage` — singleton consumer-facing capability owned by the
|
|
123
|
+
* `storage-orchestrator` builtin (Task 4 of the storage-unification
|
|
124
|
+
* refactor). All file I/O across the system flows through this cap;
|
|
125
|
+
* the orchestrator resolves each `location` ref to a concrete
|
|
126
|
+
* `StorageLocation` record and dispatches to the matching
|
|
127
|
+
* `storage-provider` registrant.
|
|
128
|
+
*
|
|
129
|
+
* The `location` parameter on every primitive is a `StorageLocationRef`
|
|
130
|
+
* — either a bare `StorageLocationType` (e.g. `'backups'`, resolves to
|
|
131
|
+
* the default of that type) or a fully-qualified id (`'backups:nas-01'`,
|
|
132
|
+
* addresses a specific instance). Both forms are normalised inside the
|
|
133
|
+
* orchestrator's `resolveRef(ref)` step.
|
|
134
|
+
*
|
|
135
|
+
* Mode: `singleton` (was `collection` pre-Task-3). The cap-router mount
|
|
136
|
+
* uses `requireSingleton(reg, 'storage')` — pointing at the orchestrator
|
|
137
|
+
* once it lands.
|
|
138
|
+
*/
|
|
139
|
+
var storageCapability = {
|
|
140
|
+
name: "storage",
|
|
141
|
+
scope: "system",
|
|
142
|
+
mode: "singleton",
|
|
143
|
+
methods: {
|
|
144
|
+
resolve: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
|
|
145
|
+
location: StorageLocationRefSchema,
|
|
146
|
+
relativePath: /* @__PURE__ */ z.string()
|
|
147
|
+
}), /* @__PURE__ */ z.string(), { auth: "admin" }),
|
|
148
|
+
write: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
|
|
149
|
+
location: StorageLocationRefSchema,
|
|
150
|
+
relativePath: /* @__PURE__ */ z.string(),
|
|
151
|
+
data: /* @__PURE__ */ z.instanceof(Uint8Array)
|
|
152
|
+
}), /* @__PURE__ */ z.void(), {
|
|
153
|
+
kind: "mutation",
|
|
154
|
+
auth: "admin"
|
|
155
|
+
}),
|
|
156
|
+
read: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
|
|
157
|
+
location: StorageLocationRefSchema,
|
|
158
|
+
relativePath: /* @__PURE__ */ z.string()
|
|
159
|
+
}), /* @__PURE__ */ z.instanceof(Uint8Array), { auth: "admin" }),
|
|
160
|
+
exists: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
|
|
161
|
+
location: StorageLocationRefSchema,
|
|
162
|
+
relativePath: /* @__PURE__ */ z.string()
|
|
163
|
+
}), /* @__PURE__ */ z.boolean(), { auth: "admin" }),
|
|
164
|
+
list: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
|
|
165
|
+
location: StorageLocationRefSchema,
|
|
166
|
+
prefix: /* @__PURE__ */ z.string().optional()
|
|
167
|
+
}), /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).readonly(), { auth: "admin" }),
|
|
168
|
+
delete: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
|
|
169
|
+
location: StorageLocationRefSchema,
|
|
170
|
+
relativePath: /* @__PURE__ */ z.string()
|
|
171
|
+
}), /* @__PURE__ */ z.void(), {
|
|
172
|
+
kind: "mutation",
|
|
173
|
+
auth: "admin"
|
|
174
|
+
}),
|
|
175
|
+
getAvailableSpace: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ location: StorageLocationRefSchema }), /* @__PURE__ */ z.number().nullable()),
|
|
176
|
+
beginUpload: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
|
|
177
|
+
location: StorageLocationRefSchema,
|
|
178
|
+
relativePath: /* @__PURE__ */ z.string(),
|
|
179
|
+
sizeBytes: /* @__PURE__ */ z.number().optional()
|
|
180
|
+
}), /* @__PURE__ */ z.object({ uploadId: /* @__PURE__ */ z.string() }), {
|
|
181
|
+
kind: "mutation",
|
|
182
|
+
auth: "admin"
|
|
183
|
+
}),
|
|
184
|
+
writeChunk: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
|
|
185
|
+
uploadId: /* @__PURE__ */ z.string(),
|
|
186
|
+
offset: /* @__PURE__ */ z.number(),
|
|
187
|
+
data: /* @__PURE__ */ z.instanceof(Uint8Array)
|
|
188
|
+
}), /* @__PURE__ */ z.void(), {
|
|
189
|
+
kind: "mutation",
|
|
190
|
+
auth: "admin"
|
|
191
|
+
}),
|
|
192
|
+
finalizeUpload: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ uploadId: /* @__PURE__ */ z.string() }), /* @__PURE__ */ z.void(), {
|
|
193
|
+
kind: "mutation",
|
|
194
|
+
auth: "admin"
|
|
195
|
+
}),
|
|
196
|
+
abortUpload: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ uploadId: /* @__PURE__ */ z.string() }), /* @__PURE__ */ z.void(), {
|
|
197
|
+
kind: "mutation",
|
|
198
|
+
auth: "admin"
|
|
199
|
+
}),
|
|
200
|
+
beginDownload: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
|
|
201
|
+
location: StorageLocationRefSchema,
|
|
202
|
+
relativePath: /* @__PURE__ */ z.string()
|
|
203
|
+
}), /* @__PURE__ */ z.object({
|
|
204
|
+
downloadId: /* @__PURE__ */ z.string(),
|
|
205
|
+
sizeBytes: /* @__PURE__ */ z.number()
|
|
206
|
+
}), {
|
|
207
|
+
kind: "mutation",
|
|
208
|
+
auth: "admin"
|
|
209
|
+
}),
|
|
210
|
+
readChunk: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
|
|
211
|
+
downloadId: /* @__PURE__ */ z.string(),
|
|
212
|
+
offset: /* @__PURE__ */ z.number(),
|
|
213
|
+
length: /* @__PURE__ */ z.number()
|
|
214
|
+
}), /* @__PURE__ */ z.instanceof(Uint8Array), { auth: "admin" }),
|
|
215
|
+
endDownload: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ downloadId: /* @__PURE__ */ z.string() }), /* @__PURE__ */ z.void(), {
|
|
216
|
+
kind: "mutation",
|
|
217
|
+
auth: "admin"
|
|
218
|
+
}),
|
|
219
|
+
listLocations: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ type: /* @__PURE__ */ StorageLocationTypeSchema.optional() }), /* @__PURE__ */ z.array(StorageLocationSchema).readonly()),
|
|
220
|
+
listLocationDeclarations: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), /* @__PURE__ */ z.array(StorageLocationDeclarationSchema).readonly()),
|
|
221
|
+
/**
|
|
222
|
+
* How far each draining location has got (D386). A pure READ of what the
|
|
223
|
+
* last pressure sweep computed — it starts no work, and a location that is
|
|
224
|
+
* not draining simply does not appear.
|
|
225
|
+
*/
|
|
226
|
+
listDrainProgress: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), /* @__PURE__ */ z.array(StorageDrainProgressSchema).readonly())
|
|
227
|
+
},
|
|
228
|
+
vocabulary: { notOperatorFacing: NOT_A_DEVICE.STORAGE }
|
|
229
|
+
};
|
|
230
|
+
//#endregion
|
|
231
|
+
//#region ../types/dist/esm/capabilities/storage-migration.cap.mjs
|
|
232
|
+
/**
|
|
233
|
+
* The single operator-facing storage migration surface. It coordinates the
|
|
234
|
+
* pipeline, recorder and post-analysis participants; callers never mutate a
|
|
235
|
+
* camera recording config or invoke an individual mover directly.
|
|
236
|
+
*/
|
|
237
|
+
var storageMigrationCapability = {
|
|
238
|
+
name: "storage-migration",
|
|
239
|
+
scope: "system",
|
|
240
|
+
mode: "singleton",
|
|
241
|
+
methods: {
|
|
242
|
+
plan: /* @__PURE__ */ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }),
|
|
243
|
+
start: /* @__PURE__ */ method(StorageMigrationInputSchema, /* @__PURE__ */ z.object({ jobId: /* @__PURE__ */ z.string() }), {
|
|
244
|
+
kind: "mutation",
|
|
245
|
+
auth: "admin"
|
|
246
|
+
}),
|
|
247
|
+
status: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ jobId: /* @__PURE__ */ z.string().optional() }), /* @__PURE__ */ StorageMigrationJobSchema.nullable(), { auth: "admin" }),
|
|
248
|
+
cancel: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ jobId: /* @__PURE__ */ z.string() }), /* @__PURE__ */ z.object({ cancelled: /* @__PURE__ */ z.boolean() }), {
|
|
249
|
+
kind: "mutation",
|
|
250
|
+
auth: "admin"
|
|
251
|
+
}),
|
|
252
|
+
/**
|
|
253
|
+
* Every mover running RIGHT NOW, in both lanes, with its counters.
|
|
254
|
+
*
|
|
255
|
+
* `status` covers a migration's own moves — the coordinator folds their
|
|
256
|
+
* progress onto the durable job record it is already polling. This covers
|
|
257
|
+
* the other case, and it is not hypothetical: a drain armed straight against
|
|
258
|
+
* `recording.relocateFootage` (the only path that existed before
|
|
259
|
+
* {@link drain}) has no job to fold into and would otherwise be invisible.
|
|
260
|
+
*/
|
|
261
|
+
movers: /* @__PURE__ */ method(/* @__PURE__ */ z.object({}), /* @__PURE__ */ z.array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }),
|
|
262
|
+
/**
|
|
263
|
+
* May a mover that touches these locations run NOW? One claim per physical
|
|
264
|
+
* root is owned by the storage orchestrator: a single-location repoint holds
|
|
265
|
+
* it while it carries its subtree, and a mover (`relocateMedia`,
|
|
266
|
+
* `relocateFootage`, a migration move) asks here AFTER registering its job and
|
|
267
|
+
* cancels itself on `clear: false`. The repoint, in turn, refuses while a
|
|
268
|
+
* registered mover touches its root. Asked, never polled (D3).
|
|
269
|
+
*/
|
|
270
|
+
moverClearance: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ locationIds: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).readonly() }), /* @__PURE__ */ z.object({
|
|
271
|
+
clear: /* @__PURE__ */ z.boolean(),
|
|
272
|
+
repointLocationId: /* @__PURE__ */ z.string().optional()
|
|
273
|
+
}), { auth: "admin" }),
|
|
274
|
+
/**
|
|
275
|
+
* What each class's SOURCE still holds, from the archive — never from the
|
|
276
|
+
* resident index (D295). Only classes with something left (or something
|
|
277
|
+
* unknown) are listed, so an empty list means there is nothing to drain and
|
|
278
|
+
* the UI has no honest button to offer.
|
|
279
|
+
*/
|
|
280
|
+
residue: /* @__PURE__ */ method(/* @__PURE__ */ z.object({}), /* @__PURE__ */ z.array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }),
|
|
281
|
+
/**
|
|
282
|
+
* Run the drain half alone, on a class whose default has ALREADY moved.
|
|
283
|
+
*
|
|
284
|
+
* It never repoints anything, which is what lets `start` keep refusing a
|
|
285
|
+
* destination that is already the default: the two verbs cannot be confused
|
|
286
|
+
* for one another, and no operator can re-repoint a migrated class through
|
|
287
|
+
* this door.
|
|
288
|
+
*/
|
|
289
|
+
drain: /* @__PURE__ */ method(StorageMigrationDrainInputSchema, /* @__PURE__ */ z.object({ jobId: /* @__PURE__ */ z.string() }), {
|
|
290
|
+
kind: "mutation",
|
|
291
|
+
auth: "admin"
|
|
292
|
+
}),
|
|
293
|
+
/**
|
|
294
|
+
* One operator cleanup of leftover analytics (DB + blobs) and ghost
|
|
295
|
+
* ledger rows on frozen footage locations. Optional debug-media sweep.
|
|
296
|
+
* Returns immediately; poll {@link cleanupStatus}.
|
|
297
|
+
*/
|
|
298
|
+
cleanupStart: /* @__PURE__ */ method(StorageCleanupInputSchema, /* @__PURE__ */ z.object({ jobId: /* @__PURE__ */ z.string() }), {
|
|
299
|
+
kind: "mutation",
|
|
300
|
+
auth: "admin"
|
|
301
|
+
}),
|
|
302
|
+
cleanupStatus: /* @__PURE__ */ method(StorageCleanupStatusInputSchema, /* @__PURE__ */ StorageCleanupJobSchema.nullable(), { auth: "admin" }),
|
|
303
|
+
cleanupCancel: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ jobId: /* @__PURE__ */ z.string() }), /* @__PURE__ */ z.object({ cancelled: /* @__PURE__ */ z.boolean() }), {
|
|
304
|
+
kind: "mutation",
|
|
305
|
+
auth: "admin"
|
|
306
|
+
}),
|
|
307
|
+
/** Recent finished migration jobs, newest first. The live job is `status`. */
|
|
308
|
+
history: /* @__PURE__ */ method(/* @__PURE__ */ z.object({}), /* @__PURE__ */ z.array(StorageMigrationJobSchema).readonly(), { auth: "admin" })
|
|
309
|
+
},
|
|
310
|
+
vocabulary: { notOperatorFacing: NOT_A_DEVICE.STORAGE }
|
|
311
|
+
};
|
|
312
|
+
//#endregion
|
|
313
|
+
export { storageCapability as n, STORAGE_ACCESS_FALLBACK as r, storageMigrationCapability as t };
|