@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,64 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region ../types/dist/esm/interfaces/ops-log.mjs
|
|
3
|
+
/**
|
|
4
|
+
* Ops-log — the durable, append-only operations audit shared by the
|
|
5
|
+
* recordings and events management surfaces.
|
|
6
|
+
*
|
|
7
|
+
* ONE row shape is reused for both domains so a single "Activity" view can
|
|
8
|
+
* merge the recorder's DurableState ring (recordings ops-log) and the
|
|
9
|
+
* pipeline-analytics SQLite collection (events ops-log). Each row records a
|
|
10
|
+
* management operation, WHY it ran (reason), and its measurable effect
|
|
11
|
+
* (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
|
|
12
|
+
* never fail the operation it records.
|
|
13
|
+
*/
|
|
14
|
+
/** Which management domain the operation belongs to. */
|
|
15
|
+
var OpsLogDomainSchema = /* @__PURE__ */ z.enum(["recording", "events"]);
|
|
16
|
+
/** The kind of management operation performed. */
|
|
17
|
+
var OpsLogOpSchema = /* @__PURE__ */ z.enum([
|
|
18
|
+
"prune",
|
|
19
|
+
"manual-delete",
|
|
20
|
+
"rescan",
|
|
21
|
+
"retention-run",
|
|
22
|
+
"relocate",
|
|
23
|
+
"orphan-audit"
|
|
24
|
+
]);
|
|
25
|
+
/** Why the operation ran. */
|
|
26
|
+
var OpsLogReasonSchema = /* @__PURE__ */ z.enum([
|
|
27
|
+
"retention",
|
|
28
|
+
"quota",
|
|
29
|
+
"manual",
|
|
30
|
+
"operator",
|
|
31
|
+
"maintenance",
|
|
32
|
+
"orphaned-device"
|
|
33
|
+
]);
|
|
34
|
+
/** One audit row, shared verbatim by both domains. */
|
|
35
|
+
var OpsLogEntrySchema = /* @__PURE__ */ z.object({
|
|
36
|
+
/** Unique row id. */
|
|
37
|
+
id: /* @__PURE__ */ z.string(),
|
|
38
|
+
/** Epoch ms the operation completed. */
|
|
39
|
+
at: /* @__PURE__ */ z.number(),
|
|
40
|
+
domain: OpsLogDomainSchema,
|
|
41
|
+
op: OpsLogOpSchema,
|
|
42
|
+
reason: OpsLogReasonSchema,
|
|
43
|
+
/** The camera the op targeted; null for a cluster/global op. */
|
|
44
|
+
deviceId: /* @__PURE__ */ z.number().nullable(),
|
|
45
|
+
/** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
|
|
46
|
+
nodeId: /* @__PURE__ */ z.string(),
|
|
47
|
+
/** Buckets / rows deleted (op-specific unit). */
|
|
48
|
+
itemsAffected: /* @__PURE__ */ z.number(),
|
|
49
|
+
/** Bytes reclaimed by the op (0 when not measurable). */
|
|
50
|
+
bytesReclaimed: /* @__PURE__ */ z.number(),
|
|
51
|
+
/** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
|
|
52
|
+
detail: /* @__PURE__ */ z.string().nullable(),
|
|
53
|
+
/** Who/what triggered the op. */
|
|
54
|
+
actor: /* @__PURE__ */ z.string()
|
|
55
|
+
});
|
|
56
|
+
/** Shared query input for the per-domain `listOpsLog` cap methods. */
|
|
57
|
+
var OpsLogQueryInputSchema = /* @__PURE__ */ z.object({
|
|
58
|
+
/** Restrict to a single camera; omit for every row. */
|
|
59
|
+
deviceId: /* @__PURE__ */ z.number().optional(),
|
|
60
|
+
/** Max rows returned, newest-first. */
|
|
61
|
+
limit: /* @__PURE__ */ z.number().int().min(1).max(1e3).optional()
|
|
62
|
+
});
|
|
63
|
+
//#endregion
|
|
64
|
+
export { OpsLogQueryInputSchema as n, OpsLogReasonSchema as r, OpsLogEntrySchema as t };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
let zod = require("zod");
|
|
2
|
+
//#region ../types/dist/esm/interfaces/ops-log.mjs
|
|
3
|
+
/**
|
|
4
|
+
* Ops-log — the durable, append-only operations audit shared by the
|
|
5
|
+
* recordings and events management surfaces.
|
|
6
|
+
*
|
|
7
|
+
* ONE row shape is reused for both domains so a single "Activity" view can
|
|
8
|
+
* merge the recorder's DurableState ring (recordings ops-log) and the
|
|
9
|
+
* pipeline-analytics SQLite collection (events ops-log). Each row records a
|
|
10
|
+
* management operation, WHY it ran (reason), and its measurable effect
|
|
11
|
+
* (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
|
|
12
|
+
* never fail the operation it records.
|
|
13
|
+
*/
|
|
14
|
+
/** Which management domain the operation belongs to. */
|
|
15
|
+
var OpsLogDomainSchema = /* @__PURE__ */ zod.z.enum(["recording", "events"]);
|
|
16
|
+
/** The kind of management operation performed. */
|
|
17
|
+
var OpsLogOpSchema = /* @__PURE__ */ zod.z.enum([
|
|
18
|
+
"prune",
|
|
19
|
+
"manual-delete",
|
|
20
|
+
"rescan",
|
|
21
|
+
"retention-run",
|
|
22
|
+
"relocate",
|
|
23
|
+
"orphan-audit"
|
|
24
|
+
]);
|
|
25
|
+
/** Why the operation ran. */
|
|
26
|
+
var OpsLogReasonSchema = /* @__PURE__ */ zod.z.enum([
|
|
27
|
+
"retention",
|
|
28
|
+
"quota",
|
|
29
|
+
"manual",
|
|
30
|
+
"operator",
|
|
31
|
+
"maintenance",
|
|
32
|
+
"orphaned-device"
|
|
33
|
+
]);
|
|
34
|
+
/** One audit row, shared verbatim by both domains. */
|
|
35
|
+
var OpsLogEntrySchema = /* @__PURE__ */ zod.z.object({
|
|
36
|
+
/** Unique row id. */
|
|
37
|
+
id: /* @__PURE__ */ zod.z.string(),
|
|
38
|
+
/** Epoch ms the operation completed. */
|
|
39
|
+
at: /* @__PURE__ */ zod.z.number(),
|
|
40
|
+
domain: OpsLogDomainSchema,
|
|
41
|
+
op: OpsLogOpSchema,
|
|
42
|
+
reason: OpsLogReasonSchema,
|
|
43
|
+
/** The camera the op targeted; null for a cluster/global op. */
|
|
44
|
+
deviceId: /* @__PURE__ */ zod.z.number().nullable(),
|
|
45
|
+
/** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
|
|
46
|
+
nodeId: /* @__PURE__ */ zod.z.string(),
|
|
47
|
+
/** Buckets / rows deleted (op-specific unit). */
|
|
48
|
+
itemsAffected: /* @__PURE__ */ zod.z.number(),
|
|
49
|
+
/** Bytes reclaimed by the op (0 when not measurable). */
|
|
50
|
+
bytesReclaimed: /* @__PURE__ */ zod.z.number(),
|
|
51
|
+
/** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
|
|
52
|
+
detail: /* @__PURE__ */ zod.z.string().nullable(),
|
|
53
|
+
/** Who/what triggered the op. */
|
|
54
|
+
actor: /* @__PURE__ */ zod.z.string()
|
|
55
|
+
});
|
|
56
|
+
/** Shared query input for the per-domain `listOpsLog` cap methods. */
|
|
57
|
+
var OpsLogQueryInputSchema = /* @__PURE__ */ zod.z.object({
|
|
58
|
+
/** Restrict to a single camera; omit for every row. */
|
|
59
|
+
deviceId: /* @__PURE__ */ zod.z.number().optional(),
|
|
60
|
+
/** Max rows returned, newest-first. */
|
|
61
|
+
limit: /* @__PURE__ */ zod.z.number().int().min(1).max(1e3).optional()
|
|
62
|
+
});
|
|
63
|
+
//#endregion
|
|
64
|
+
Object.defineProperty(exports, "OpsLogEntrySchema", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function() {
|
|
67
|
+
return OpsLogEntrySchema;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
Object.defineProperty(exports, "OpsLogQueryInputSchema", {
|
|
71
|
+
enumerable: true,
|
|
72
|
+
get: function() {
|
|
73
|
+
return OpsLogQueryInputSchema;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
Object.defineProperty(exports, "OpsLogReasonSchema", {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function() {
|
|
79
|
+
return OpsLogReasonSchema;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//#region ../types/dist/esm/ffmpeg/pinned-binary.mjs
|
|
2
|
+
/**
|
|
3
|
+
* Memoize `ensure` on SUCCESS only.
|
|
4
|
+
*
|
|
5
|
+
* A failure is not remembered: the next caller asks again, so a node whose
|
|
6
|
+
* first download failed (no network at boot) recovers on the next spawn that
|
|
7
|
+
* needs it — with no timer and no retry loop, because the ask is driven by
|
|
8
|
+
* work that actually wants the binary.
|
|
9
|
+
*/
|
|
10
|
+
function memoizePinnedFfmpeg(ensure) {
|
|
11
|
+
let pending = null;
|
|
12
|
+
return () => {
|
|
13
|
+
if (pending !== null) return pending;
|
|
14
|
+
const attempt = ensure();
|
|
15
|
+
pending = attempt;
|
|
16
|
+
attempt.catch(() => {
|
|
17
|
+
if (pending === attempt) pending = null;
|
|
18
|
+
});
|
|
19
|
+
return attempt;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
Object.defineProperty(exports, "memoizePinnedFfmpeg", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function() {
|
|
26
|
+
return memoizePinnedFfmpeg;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region ../types/dist/esm/ffmpeg/pinned-binary.mjs
|
|
2
|
+
/**
|
|
3
|
+
* Memoize `ensure` on SUCCESS only.
|
|
4
|
+
*
|
|
5
|
+
* A failure is not remembered: the next caller asks again, so a node whose
|
|
6
|
+
* first download failed (no network at boot) recovers on the next spawn that
|
|
7
|
+
* needs it — with no timer and no retry loop, because the ask is driven by
|
|
8
|
+
* work that actually wants the binary.
|
|
9
|
+
*/
|
|
10
|
+
function memoizePinnedFfmpeg(ensure) {
|
|
11
|
+
let pending = null;
|
|
12
|
+
return () => {
|
|
13
|
+
if (pending !== null) return pending;
|
|
14
|
+
const attempt = ensure();
|
|
15
|
+
pending = attempt;
|
|
16
|
+
attempt.catch(() => {
|
|
17
|
+
if (pending === attempt) pending = null;
|
|
18
|
+
});
|
|
19
|
+
return attempt;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { memoizePinnedFfmpeg as t };
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
const require_capability_definition = require("./capability-definition-HCmTem8c.js");
|
|
2
|
+
const require_system_reasons = require("./system-reasons-Be_k1W8g.js");
|
|
3
|
+
let zod = require("zod");
|
|
4
|
+
//#region ../types/dist/esm/types/model-formats.mjs
|
|
5
|
+
/**
|
|
6
|
+
* The model weight formats a catalog entry can ship. Schema-free on purpose:
|
|
7
|
+
* `types/models.ts` builds Zod schemas from it, but a runner-closure consumer
|
|
8
|
+
* (the model downloader in `@camstack/server/system`) needs only the list and must
|
|
9
|
+
* reach it through `@camstack/types/addon` without building the cap schema
|
|
10
|
+
* graph (D28).
|
|
11
|
+
*/
|
|
12
|
+
var MODEL_FORMATS = [
|
|
13
|
+
"onnx",
|
|
14
|
+
"coreml",
|
|
15
|
+
"openvino",
|
|
16
|
+
"tflite",
|
|
17
|
+
"pt",
|
|
18
|
+
"gguf"
|
|
19
|
+
];
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region ../types/dist/esm/pipeline/auto-tune/accelerator-compute.mjs
|
|
22
|
+
var CORE_ULTRA_265K_IGPU_CLOCK_MHZ = 2e3;
|
|
23
|
+
var positiveOrNull = /* @__PURE__ */ zod.z.number().nullable().transform((value) => value !== null && Number.isFinite(value) && value > 0 ? value : null);
|
|
24
|
+
var textOrNull = /* @__PURE__ */ zod.z.string().nullable().transform((value) => value !== null && value.trim() !== "" ? value : null);
|
|
25
|
+
var PrecisionGopsSchema = /* @__PURE__ */ zod.z.object({
|
|
26
|
+
int8: positiveOrNull,
|
|
27
|
+
fp16: positiveOrNull
|
|
28
|
+
});
|
|
29
|
+
/** What one accelerator device reported. Every failed query is null. */
|
|
30
|
+
var AcceleratorComputeSchema = /* @__PURE__ */ zod.z.object({
|
|
31
|
+
deviceKey: /* @__PURE__ */ zod.z.string(),
|
|
32
|
+
fullDeviceName: textOrNull,
|
|
33
|
+
executionUnits: positiveOrNull,
|
|
34
|
+
clockMHz: positiveOrNull,
|
|
35
|
+
gops: /* @__PURE__ */ PrecisionGopsSchema.nullable(),
|
|
36
|
+
architecture: textOrNull,
|
|
37
|
+
npuName: textOrNull,
|
|
38
|
+
tops: positiveOrNull,
|
|
39
|
+
vendor: textOrNull,
|
|
40
|
+
webgpuArchitecture: textOrNull,
|
|
41
|
+
webgpuDevice: textOrNull,
|
|
42
|
+
computeUnits: positiveOrNull
|
|
43
|
+
});
|
|
44
|
+
var AcceleratorFactsPayloadSchema = /* @__PURE__ */ zod.z.object({ accelerators: /* @__PURE__ */ zod.z.array(AcceleratorComputeSchema).nullable() });
|
|
45
|
+
64 * CORE_ULTRA_265K_IGPU_CLOCK_MHZ;
|
|
46
|
+
/** Parse a probe payload. `null` means the probe failed — not "no accelerators". */
|
|
47
|
+
function parseAcceleratorFactsJson(raw) {
|
|
48
|
+
const parsed = AcceleratorFactsPayloadSchema.safeParse(raw);
|
|
49
|
+
if (!parsed.success || parsed.data.accelerators === null) return null;
|
|
50
|
+
return parsed.data.accelerators;
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region ../types/dist/esm/capabilities/platform-probe.cap.mjs
|
|
54
|
+
var ModelFormatSchema = /* @__PURE__ */ zod.z.enum(MODEL_FORMATS);
|
|
55
|
+
var HwAccelBackendInputSchema = /* @__PURE__ */ zod.z.enum([
|
|
56
|
+
"videotoolbox",
|
|
57
|
+
"cuda",
|
|
58
|
+
"nvdec",
|
|
59
|
+
"vaapi",
|
|
60
|
+
"qsv",
|
|
61
|
+
"d3d11va",
|
|
62
|
+
"dxva2",
|
|
63
|
+
"amf",
|
|
64
|
+
"vdpau",
|
|
65
|
+
"drm",
|
|
66
|
+
"coreml",
|
|
67
|
+
"tensorrt",
|
|
68
|
+
"openvino",
|
|
69
|
+
"directml",
|
|
70
|
+
"webgpu",
|
|
71
|
+
"none"
|
|
72
|
+
]).nullable().optional();
|
|
73
|
+
var HwAccelResolutionSchema = /* @__PURE__ */ zod.z.object({
|
|
74
|
+
preferred: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.string()).readonly(),
|
|
75
|
+
rationale: /* @__PURE__ */ zod.z.string()
|
|
76
|
+
});
|
|
77
|
+
var HardwarePlatformSchema = /* @__PURE__ */ zod.z.enum([
|
|
78
|
+
"darwin",
|
|
79
|
+
"linux",
|
|
80
|
+
"win32"
|
|
81
|
+
]);
|
|
82
|
+
var HardwareArchSchema = /* @__PURE__ */ zod.z.enum(["arm64", "x64"]);
|
|
83
|
+
var GpuInfoSchema = /* @__PURE__ */ zod.z.object({
|
|
84
|
+
type: /* @__PURE__ */ zod.z.enum([
|
|
85
|
+
"nvidia",
|
|
86
|
+
"amd",
|
|
87
|
+
"intel",
|
|
88
|
+
"apple"
|
|
89
|
+
]),
|
|
90
|
+
name: /* @__PURE__ */ zod.z.string(),
|
|
91
|
+
memoryMB: /* @__PURE__ */ zod.z.number().optional()
|
|
92
|
+
});
|
|
93
|
+
var NpuInfoSchema = /* @__PURE__ */ zod.z.object({
|
|
94
|
+
type: /* @__PURE__ */ zod.z.enum([
|
|
95
|
+
"apple-ane",
|
|
96
|
+
"intel-npu",
|
|
97
|
+
"amd-xdna"
|
|
98
|
+
]),
|
|
99
|
+
name: /* @__PURE__ */ zod.z.string().optional(),
|
|
100
|
+
generation: /* @__PURE__ */ zod.z.enum(["xdna1", "xdna2"]).optional()
|
|
101
|
+
});
|
|
102
|
+
var CoralBusSchema = /* @__PURE__ */ zod.z.enum(["usb", "pci"]);
|
|
103
|
+
var CoralInfoSchema = /* @__PURE__ */ zod.z.object({
|
|
104
|
+
type: /* @__PURE__ */ zod.z.literal("coral-edgetpu"),
|
|
105
|
+
/** Legacy single-bus report (older nodes) — read via `coralUsableUnits`. */
|
|
106
|
+
bus: /* @__PURE__ */ zod.z.string().optional(),
|
|
107
|
+
/** Legacy USB unit count (older nodes) — read via `coralUsableUnits`. */
|
|
108
|
+
count: /* @__PURE__ */ zod.z.number().int().nonnegative().optional(),
|
|
109
|
+
/** Usable units per bus — each one is its own `edgetpu:<bus>[:N]` device. */
|
|
110
|
+
units: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.object({
|
|
111
|
+
bus: CoralBusSchema,
|
|
112
|
+
count: /* @__PURE__ */ zod.z.number().int().nonnegative()
|
|
113
|
+
})).readonly().optional(),
|
|
114
|
+
/** Present-but-unusable units, each with its typed reason (never "absent"). */
|
|
115
|
+
unavailable: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.object({
|
|
116
|
+
bus: CoralBusSchema,
|
|
117
|
+
count: /* @__PURE__ */ zod.z.number().int().nonnegative(),
|
|
118
|
+
reason: /* @__PURE__ */ zod.z.enum(["driver-missing", "device-not-accessible"])
|
|
119
|
+
})).readonly().optional()
|
|
120
|
+
});
|
|
121
|
+
var NvidiaInfoBaseSchema = /* @__PURE__ */ zod.z.object({
|
|
122
|
+
type: /* @__PURE__ */ zod.z.literal("nvidia"),
|
|
123
|
+
name: /* @__PURE__ */ zod.z.string(),
|
|
124
|
+
memoryMB: /* @__PURE__ */ zod.z.number().optional()
|
|
125
|
+
});
|
|
126
|
+
/** An NVIDIA GPU: usable ⇔ the CUDA execution provider exists; otherwise the reason. */
|
|
127
|
+
var NvidiaInfoSchema = /* @__PURE__ */ zod.z.discriminatedUnion("usable", [/* @__PURE__ */ NvidiaInfoBaseSchema.extend({ usable: /* @__PURE__ */ zod.z.literal(true) }), /* @__PURE__ */ NvidiaInfoBaseSchema.extend({
|
|
128
|
+
usable: /* @__PURE__ */ zod.z.literal(false),
|
|
129
|
+
reason: /* @__PURE__ */ zod.z.enum(["no-cuda-execution-provider"])
|
|
130
|
+
})]);
|
|
131
|
+
var HardwareInfoSchema = /* @__PURE__ */ zod.z.object({
|
|
132
|
+
platform: HardwarePlatformSchema,
|
|
133
|
+
arch: HardwareArchSchema,
|
|
134
|
+
cpuModel: /* @__PURE__ */ zod.z.string(),
|
|
135
|
+
cpuCores: /* @__PURE__ */ zod.z.number(),
|
|
136
|
+
totalRAM_MB: /* @__PURE__ */ zod.z.number(),
|
|
137
|
+
availableRAM_MB: /* @__PURE__ */ zod.z.number(),
|
|
138
|
+
gpu: /* @__PURE__ */ GpuInfoSchema.nullable(),
|
|
139
|
+
npu: /* @__PURE__ */ NpuInfoSchema.nullable(),
|
|
140
|
+
coral: /* @__PURE__ */ CoralInfoSchema.nullable().optional(),
|
|
141
|
+
nvidia: /* @__PURE__ */ NvidiaInfoSchema.nullable().optional(),
|
|
142
|
+
/**
|
|
143
|
+
* Per-accelerator compute (D930). Omitted by a node that has not probed it.
|
|
144
|
+
* `null` fields inside an entry are a failed query, never a zero.
|
|
145
|
+
*/
|
|
146
|
+
accelerators: /* @__PURE__ */ zod.z.array(AcceleratorComputeSchema).readonly().optional()
|
|
147
|
+
});
|
|
148
|
+
var PlatformScoreSchema = /* @__PURE__ */ zod.z.object({
|
|
149
|
+
runtime: /* @__PURE__ */ zod.z.literal("python"),
|
|
150
|
+
backend: /* @__PURE__ */ zod.z.string(),
|
|
151
|
+
format: /* @__PURE__ */ zod.z.enum([
|
|
152
|
+
"onnx",
|
|
153
|
+
"coreml",
|
|
154
|
+
"openvino",
|
|
155
|
+
"tflite"
|
|
156
|
+
]),
|
|
157
|
+
score: /* @__PURE__ */ zod.z.number(),
|
|
158
|
+
reason: /* @__PURE__ */ zod.z.string(),
|
|
159
|
+
available: /* @__PURE__ */ zod.z.boolean()
|
|
160
|
+
});
|
|
161
|
+
var InferenceDeviceDescriptorSchema = /* @__PURE__ */ zod.z.object({
|
|
162
|
+
key: /* @__PURE__ */ zod.z.string(),
|
|
163
|
+
backend: /* @__PURE__ */ zod.z.string(),
|
|
164
|
+
device: /* @__PURE__ */ zod.z.string(),
|
|
165
|
+
format: ModelFormatSchema,
|
|
166
|
+
runtime: /* @__PURE__ */ zod.z.literal("python"),
|
|
167
|
+
score: /* @__PURE__ */ zod.z.number(),
|
|
168
|
+
available: /* @__PURE__ */ zod.z.boolean()
|
|
169
|
+
});
|
|
170
|
+
var PlatformCapabilitiesSchema = /* @__PURE__ */ zod.z.object({
|
|
171
|
+
hardware: HardwareInfoSchema,
|
|
172
|
+
scores: /* @__PURE__ */ zod.z.array(PlatformScoreSchema).readonly(),
|
|
173
|
+
bestScore: PlatformScoreSchema,
|
|
174
|
+
pythonPath: /* @__PURE__ */ zod.z.string().nullable(),
|
|
175
|
+
devices: /* @__PURE__ */ zod.z.array(InferenceDeviceDescriptorSchema).readonly()
|
|
176
|
+
});
|
|
177
|
+
var ModelRequirementSchema = /* @__PURE__ */ zod.z.object({
|
|
178
|
+
modelId: /* @__PURE__ */ zod.z.string(),
|
|
179
|
+
name: /* @__PURE__ */ zod.z.string(),
|
|
180
|
+
minRAM_MB: /* @__PURE__ */ zod.z.number(),
|
|
181
|
+
accuracyScore: /* @__PURE__ */ zod.z.number(),
|
|
182
|
+
formats: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.string()).readonly()
|
|
183
|
+
});
|
|
184
|
+
var ResolvedInferenceConfigSchema = /* @__PURE__ */ zod.z.object({
|
|
185
|
+
modelId: /* @__PURE__ */ zod.z.string(),
|
|
186
|
+
runtime: /* @__PURE__ */ zod.z.literal("python"),
|
|
187
|
+
backend: /* @__PURE__ */ zod.z.string(),
|
|
188
|
+
format: ModelFormatSchema,
|
|
189
|
+
reason: /* @__PURE__ */ zod.z.string()
|
|
190
|
+
});
|
|
191
|
+
/**
|
|
192
|
+
* The answer of an accelerator rescan (D919): the node's device list after
|
|
193
|
+
* the re-probe, what changed, and the evidence that decided the Coral answer
|
|
194
|
+
* (`usbBus` — could the USB bus be read at all; `decidedBy` — USB ids, the PCI
|
|
195
|
+
* bus, the installed-delegate fallback, or nothing).
|
|
196
|
+
*/
|
|
197
|
+
var AcceleratorRescanSchema = /* @__PURE__ */ zod.z.object({
|
|
198
|
+
devices: /* @__PURE__ */ zod.z.array(InferenceDeviceDescriptorSchema).readonly(),
|
|
199
|
+
appeared: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.string()).readonly(),
|
|
200
|
+
disappeared: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.string()).readonly(),
|
|
201
|
+
usbBus: /* @__PURE__ */ zod.z.enum(["observed", "unobservable"]),
|
|
202
|
+
decidedBy: /* @__PURE__ */ zod.z.enum([
|
|
203
|
+
"usb-ids",
|
|
204
|
+
"pci",
|
|
205
|
+
"delegate-fallback",
|
|
206
|
+
"none"
|
|
207
|
+
])
|
|
208
|
+
});
|
|
209
|
+
var platformProbeCapability = {
|
|
210
|
+
name: "platform-probe",
|
|
211
|
+
scope: "system",
|
|
212
|
+
mode: "singleton",
|
|
213
|
+
methods: {
|
|
214
|
+
getCapabilities: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.void(), PlatformCapabilitiesSchema),
|
|
215
|
+
getHardware: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.void(), HardwareInfoSchema),
|
|
216
|
+
resolveInferenceConfig: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({ requirements: /* @__PURE__ */ zod.z.array(ModelRequirementSchema).readonly() }), ResolvedInferenceConfigSchema),
|
|
217
|
+
resolveHwAccel: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({ prefer: HwAccelBackendInputSchema }), HwAccelResolutionSchema),
|
|
218
|
+
/**
|
|
219
|
+
* Re-probe this node's accelerators NOW (Coral USB ids + PCIe apex units;
|
|
220
|
+
* `/sys` and `/dev` reads, no model load) and rebuild the device list that
|
|
221
|
+
* `getCapabilities` serves. The same re-probe runs every 60 s on its own;
|
|
222
|
+
* this is the operator's "rescan inference devices". Target a node with the
|
|
223
|
+
* `{ nodeId }` routing input, like `getCapabilities`.
|
|
224
|
+
*/
|
|
225
|
+
rescanAccelerators: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.void(), AcceleratorRescanSchema, {
|
|
226
|
+
kind: "mutation",
|
|
227
|
+
auth: "admin"
|
|
228
|
+
})
|
|
229
|
+
},
|
|
230
|
+
vocabulary: { notOperatorFacing: require_system_reasons.NOT_A_DEVICE.CLUSTER }
|
|
231
|
+
};
|
|
232
|
+
//#endregion
|
|
233
|
+
Object.defineProperty(exports, "MODEL_FORMATS", {
|
|
234
|
+
enumerable: true,
|
|
235
|
+
get: function() {
|
|
236
|
+
return MODEL_FORMATS;
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
Object.defineProperty(exports, "parseAcceleratorFactsJson", {
|
|
240
|
+
enumerable: true,
|
|
241
|
+
get: function() {
|
|
242
|
+
return parseAcceleratorFactsJson;
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
Object.defineProperty(exports, "platformProbeCapability", {
|
|
246
|
+
enumerable: true,
|
|
247
|
+
get: function() {
|
|
248
|
+
return platformProbeCapability;
|
|
249
|
+
}
|
|
250
|
+
});
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { c as method } from "./capability-definition-C2rJdVeX.mjs";
|
|
2
|
+
import { t as NOT_A_DEVICE } from "./system-reasons-CYj4qwyS.mjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region ../types/dist/esm/types/model-formats.mjs
|
|
5
|
+
/**
|
|
6
|
+
* The model weight formats a catalog entry can ship. Schema-free on purpose:
|
|
7
|
+
* `types/models.ts` builds Zod schemas from it, but a runner-closure consumer
|
|
8
|
+
* (the model downloader in `@camstack/server/system`) needs only the list and must
|
|
9
|
+
* reach it through `@camstack/types/addon` without building the cap schema
|
|
10
|
+
* graph (D28).
|
|
11
|
+
*/
|
|
12
|
+
var MODEL_FORMATS = [
|
|
13
|
+
"onnx",
|
|
14
|
+
"coreml",
|
|
15
|
+
"openvino",
|
|
16
|
+
"tflite",
|
|
17
|
+
"pt",
|
|
18
|
+
"gguf"
|
|
19
|
+
];
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region ../types/dist/esm/pipeline/auto-tune/accelerator-compute.mjs
|
|
22
|
+
var CORE_ULTRA_265K_IGPU_CLOCK_MHZ = 2e3;
|
|
23
|
+
var positiveOrNull = /* @__PURE__ */ z.number().nullable().transform((value) => value !== null && Number.isFinite(value) && value > 0 ? value : null);
|
|
24
|
+
var textOrNull = /* @__PURE__ */ z.string().nullable().transform((value) => value !== null && value.trim() !== "" ? value : null);
|
|
25
|
+
var PrecisionGopsSchema = /* @__PURE__ */ z.object({
|
|
26
|
+
int8: positiveOrNull,
|
|
27
|
+
fp16: positiveOrNull
|
|
28
|
+
});
|
|
29
|
+
/** What one accelerator device reported. Every failed query is null. */
|
|
30
|
+
var AcceleratorComputeSchema = /* @__PURE__ */ z.object({
|
|
31
|
+
deviceKey: /* @__PURE__ */ z.string(),
|
|
32
|
+
fullDeviceName: textOrNull,
|
|
33
|
+
executionUnits: positiveOrNull,
|
|
34
|
+
clockMHz: positiveOrNull,
|
|
35
|
+
gops: /* @__PURE__ */ PrecisionGopsSchema.nullable(),
|
|
36
|
+
architecture: textOrNull,
|
|
37
|
+
npuName: textOrNull,
|
|
38
|
+
tops: positiveOrNull,
|
|
39
|
+
vendor: textOrNull,
|
|
40
|
+
webgpuArchitecture: textOrNull,
|
|
41
|
+
webgpuDevice: textOrNull,
|
|
42
|
+
computeUnits: positiveOrNull
|
|
43
|
+
});
|
|
44
|
+
var AcceleratorFactsPayloadSchema = /* @__PURE__ */ z.object({ accelerators: /* @__PURE__ */ z.array(AcceleratorComputeSchema).nullable() });
|
|
45
|
+
64 * CORE_ULTRA_265K_IGPU_CLOCK_MHZ;
|
|
46
|
+
/** Parse a probe payload. `null` means the probe failed — not "no accelerators". */
|
|
47
|
+
function parseAcceleratorFactsJson(raw) {
|
|
48
|
+
const parsed = AcceleratorFactsPayloadSchema.safeParse(raw);
|
|
49
|
+
if (!parsed.success || parsed.data.accelerators === null) return null;
|
|
50
|
+
return parsed.data.accelerators;
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region ../types/dist/esm/capabilities/platform-probe.cap.mjs
|
|
54
|
+
var ModelFormatSchema = /* @__PURE__ */ z.enum(MODEL_FORMATS);
|
|
55
|
+
var HwAccelBackendInputSchema = /* @__PURE__ */ z.enum([
|
|
56
|
+
"videotoolbox",
|
|
57
|
+
"cuda",
|
|
58
|
+
"nvdec",
|
|
59
|
+
"vaapi",
|
|
60
|
+
"qsv",
|
|
61
|
+
"d3d11va",
|
|
62
|
+
"dxva2",
|
|
63
|
+
"amf",
|
|
64
|
+
"vdpau",
|
|
65
|
+
"drm",
|
|
66
|
+
"coreml",
|
|
67
|
+
"tensorrt",
|
|
68
|
+
"openvino",
|
|
69
|
+
"directml",
|
|
70
|
+
"webgpu",
|
|
71
|
+
"none"
|
|
72
|
+
]).nullable().optional();
|
|
73
|
+
var HwAccelResolutionSchema = /* @__PURE__ */ z.object({
|
|
74
|
+
preferred: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).readonly(),
|
|
75
|
+
rationale: /* @__PURE__ */ z.string()
|
|
76
|
+
});
|
|
77
|
+
var HardwarePlatformSchema = /* @__PURE__ */ z.enum([
|
|
78
|
+
"darwin",
|
|
79
|
+
"linux",
|
|
80
|
+
"win32"
|
|
81
|
+
]);
|
|
82
|
+
var HardwareArchSchema = /* @__PURE__ */ z.enum(["arm64", "x64"]);
|
|
83
|
+
var GpuInfoSchema = /* @__PURE__ */ z.object({
|
|
84
|
+
type: /* @__PURE__ */ z.enum([
|
|
85
|
+
"nvidia",
|
|
86
|
+
"amd",
|
|
87
|
+
"intel",
|
|
88
|
+
"apple"
|
|
89
|
+
]),
|
|
90
|
+
name: /* @__PURE__ */ z.string(),
|
|
91
|
+
memoryMB: /* @__PURE__ */ z.number().optional()
|
|
92
|
+
});
|
|
93
|
+
var NpuInfoSchema = /* @__PURE__ */ z.object({
|
|
94
|
+
type: /* @__PURE__ */ z.enum([
|
|
95
|
+
"apple-ane",
|
|
96
|
+
"intel-npu",
|
|
97
|
+
"amd-xdna"
|
|
98
|
+
]),
|
|
99
|
+
name: /* @__PURE__ */ z.string().optional(),
|
|
100
|
+
generation: /* @__PURE__ */ z.enum(["xdna1", "xdna2"]).optional()
|
|
101
|
+
});
|
|
102
|
+
var CoralBusSchema = /* @__PURE__ */ z.enum(["usb", "pci"]);
|
|
103
|
+
var CoralInfoSchema = /* @__PURE__ */ z.object({
|
|
104
|
+
type: /* @__PURE__ */ z.literal("coral-edgetpu"),
|
|
105
|
+
/** Legacy single-bus report (older nodes) — read via `coralUsableUnits`. */
|
|
106
|
+
bus: /* @__PURE__ */ z.string().optional(),
|
|
107
|
+
/** Legacy USB unit count (older nodes) — read via `coralUsableUnits`. */
|
|
108
|
+
count: /* @__PURE__ */ z.number().int().nonnegative().optional(),
|
|
109
|
+
/** Usable units per bus — each one is its own `edgetpu:<bus>[:N]` device. */
|
|
110
|
+
units: /* @__PURE__ */ z.array(/* @__PURE__ */ z.object({
|
|
111
|
+
bus: CoralBusSchema,
|
|
112
|
+
count: /* @__PURE__ */ z.number().int().nonnegative()
|
|
113
|
+
})).readonly().optional(),
|
|
114
|
+
/** Present-but-unusable units, each with its typed reason (never "absent"). */
|
|
115
|
+
unavailable: /* @__PURE__ */ z.array(/* @__PURE__ */ z.object({
|
|
116
|
+
bus: CoralBusSchema,
|
|
117
|
+
count: /* @__PURE__ */ z.number().int().nonnegative(),
|
|
118
|
+
reason: /* @__PURE__ */ z.enum(["driver-missing", "device-not-accessible"])
|
|
119
|
+
})).readonly().optional()
|
|
120
|
+
});
|
|
121
|
+
var NvidiaInfoBaseSchema = /* @__PURE__ */ z.object({
|
|
122
|
+
type: /* @__PURE__ */ z.literal("nvidia"),
|
|
123
|
+
name: /* @__PURE__ */ z.string(),
|
|
124
|
+
memoryMB: /* @__PURE__ */ z.number().optional()
|
|
125
|
+
});
|
|
126
|
+
/** An NVIDIA GPU: usable ⇔ the CUDA execution provider exists; otherwise the reason. */
|
|
127
|
+
var NvidiaInfoSchema = /* @__PURE__ */ z.discriminatedUnion("usable", [/* @__PURE__ */ NvidiaInfoBaseSchema.extend({ usable: /* @__PURE__ */ z.literal(true) }), /* @__PURE__ */ NvidiaInfoBaseSchema.extend({
|
|
128
|
+
usable: /* @__PURE__ */ z.literal(false),
|
|
129
|
+
reason: /* @__PURE__ */ z.enum(["no-cuda-execution-provider"])
|
|
130
|
+
})]);
|
|
131
|
+
var HardwareInfoSchema = /* @__PURE__ */ z.object({
|
|
132
|
+
platform: HardwarePlatformSchema,
|
|
133
|
+
arch: HardwareArchSchema,
|
|
134
|
+
cpuModel: /* @__PURE__ */ z.string(),
|
|
135
|
+
cpuCores: /* @__PURE__ */ z.number(),
|
|
136
|
+
totalRAM_MB: /* @__PURE__ */ z.number(),
|
|
137
|
+
availableRAM_MB: /* @__PURE__ */ z.number(),
|
|
138
|
+
gpu: /* @__PURE__ */ GpuInfoSchema.nullable(),
|
|
139
|
+
npu: /* @__PURE__ */ NpuInfoSchema.nullable(),
|
|
140
|
+
coral: /* @__PURE__ */ CoralInfoSchema.nullable().optional(),
|
|
141
|
+
nvidia: /* @__PURE__ */ NvidiaInfoSchema.nullable().optional(),
|
|
142
|
+
/**
|
|
143
|
+
* Per-accelerator compute (D930). Omitted by a node that has not probed it.
|
|
144
|
+
* `null` fields inside an entry are a failed query, never a zero.
|
|
145
|
+
*/
|
|
146
|
+
accelerators: /* @__PURE__ */ z.array(AcceleratorComputeSchema).readonly().optional()
|
|
147
|
+
});
|
|
148
|
+
var PlatformScoreSchema = /* @__PURE__ */ z.object({
|
|
149
|
+
runtime: /* @__PURE__ */ z.literal("python"),
|
|
150
|
+
backend: /* @__PURE__ */ z.string(),
|
|
151
|
+
format: /* @__PURE__ */ z.enum([
|
|
152
|
+
"onnx",
|
|
153
|
+
"coreml",
|
|
154
|
+
"openvino",
|
|
155
|
+
"tflite"
|
|
156
|
+
]),
|
|
157
|
+
score: /* @__PURE__ */ z.number(),
|
|
158
|
+
reason: /* @__PURE__ */ z.string(),
|
|
159
|
+
available: /* @__PURE__ */ z.boolean()
|
|
160
|
+
});
|
|
161
|
+
var InferenceDeviceDescriptorSchema = /* @__PURE__ */ z.object({
|
|
162
|
+
key: /* @__PURE__ */ z.string(),
|
|
163
|
+
backend: /* @__PURE__ */ z.string(),
|
|
164
|
+
device: /* @__PURE__ */ z.string(),
|
|
165
|
+
format: ModelFormatSchema,
|
|
166
|
+
runtime: /* @__PURE__ */ z.literal("python"),
|
|
167
|
+
score: /* @__PURE__ */ z.number(),
|
|
168
|
+
available: /* @__PURE__ */ z.boolean()
|
|
169
|
+
});
|
|
170
|
+
var PlatformCapabilitiesSchema = /* @__PURE__ */ z.object({
|
|
171
|
+
hardware: HardwareInfoSchema,
|
|
172
|
+
scores: /* @__PURE__ */ z.array(PlatformScoreSchema).readonly(),
|
|
173
|
+
bestScore: PlatformScoreSchema,
|
|
174
|
+
pythonPath: /* @__PURE__ */ z.string().nullable(),
|
|
175
|
+
devices: /* @__PURE__ */ z.array(InferenceDeviceDescriptorSchema).readonly()
|
|
176
|
+
});
|
|
177
|
+
var ModelRequirementSchema = /* @__PURE__ */ z.object({
|
|
178
|
+
modelId: /* @__PURE__ */ z.string(),
|
|
179
|
+
name: /* @__PURE__ */ z.string(),
|
|
180
|
+
minRAM_MB: /* @__PURE__ */ z.number(),
|
|
181
|
+
accuracyScore: /* @__PURE__ */ z.number(),
|
|
182
|
+
formats: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).readonly()
|
|
183
|
+
});
|
|
184
|
+
var ResolvedInferenceConfigSchema = /* @__PURE__ */ z.object({
|
|
185
|
+
modelId: /* @__PURE__ */ z.string(),
|
|
186
|
+
runtime: /* @__PURE__ */ z.literal("python"),
|
|
187
|
+
backend: /* @__PURE__ */ z.string(),
|
|
188
|
+
format: ModelFormatSchema,
|
|
189
|
+
reason: /* @__PURE__ */ z.string()
|
|
190
|
+
});
|
|
191
|
+
/**
|
|
192
|
+
* The answer of an accelerator rescan (D919): the node's device list after
|
|
193
|
+
* the re-probe, what changed, and the evidence that decided the Coral answer
|
|
194
|
+
* (`usbBus` — could the USB bus be read at all; `decidedBy` — USB ids, the PCI
|
|
195
|
+
* bus, the installed-delegate fallback, or nothing).
|
|
196
|
+
*/
|
|
197
|
+
var AcceleratorRescanSchema = /* @__PURE__ */ z.object({
|
|
198
|
+
devices: /* @__PURE__ */ z.array(InferenceDeviceDescriptorSchema).readonly(),
|
|
199
|
+
appeared: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).readonly(),
|
|
200
|
+
disappeared: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).readonly(),
|
|
201
|
+
usbBus: /* @__PURE__ */ z.enum(["observed", "unobservable"]),
|
|
202
|
+
decidedBy: /* @__PURE__ */ z.enum([
|
|
203
|
+
"usb-ids",
|
|
204
|
+
"pci",
|
|
205
|
+
"delegate-fallback",
|
|
206
|
+
"none"
|
|
207
|
+
])
|
|
208
|
+
});
|
|
209
|
+
var platformProbeCapability = {
|
|
210
|
+
name: "platform-probe",
|
|
211
|
+
scope: "system",
|
|
212
|
+
mode: "singleton",
|
|
213
|
+
methods: {
|
|
214
|
+
getCapabilities: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), PlatformCapabilitiesSchema),
|
|
215
|
+
getHardware: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), HardwareInfoSchema),
|
|
216
|
+
resolveInferenceConfig: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ requirements: /* @__PURE__ */ z.array(ModelRequirementSchema).readonly() }), ResolvedInferenceConfigSchema),
|
|
217
|
+
resolveHwAccel: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ prefer: HwAccelBackendInputSchema }), HwAccelResolutionSchema),
|
|
218
|
+
/**
|
|
219
|
+
* Re-probe this node's accelerators NOW (Coral USB ids + PCIe apex units;
|
|
220
|
+
* `/sys` and `/dev` reads, no model load) and rebuild the device list that
|
|
221
|
+
* `getCapabilities` serves. The same re-probe runs every 60 s on its own;
|
|
222
|
+
* this is the operator's "rescan inference devices". Target a node with the
|
|
223
|
+
* `{ nodeId }` routing input, like `getCapabilities`.
|
|
224
|
+
*/
|
|
225
|
+
rescanAccelerators: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), AcceleratorRescanSchema, {
|
|
226
|
+
kind: "mutation",
|
|
227
|
+
auth: "admin"
|
|
228
|
+
})
|
|
229
|
+
},
|
|
230
|
+
vocabulary: { notOperatorFacing: NOT_A_DEVICE.CLUSTER }
|
|
231
|
+
};
|
|
232
|
+
//#endregion
|
|
233
|
+
export { parseAcceleratorFactsJson as n, MODEL_FORMATS as r, platformProbeCapability as t };
|