@camstack/server 1.2.941 → 1.2.943
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 +20 -0
- package/dist/api/trpc/generated-cap-mounts.js +19 -1
- package/dist/api/trpc/generated-cap-routers.js +676 -596
- package/package.json +13 -11
- package/system/dist/action-index-B1fgpQBt.mjs +9925 -0
- package/system/dist/action-index-B_cLRwXJ.js +9972 -0
- package/system/dist/alert-episode-Be--PngO.mjs +64 -0
- package/system/dist/alert-episode-Bqktmt-i.js +93 -0
- package/system/dist/{base-addon-Md14i7pe.mjs → base-addon-BcS6r1cT.mjs} +20 -7
- package/system/dist/{base-addon-DD5dIfcZ.js → base-addon-CRsXtYFG.js} +20 -7
- package/system/dist/{base-device-CH8rfD9j.js → base-device-DAdWzDOl.js} +138 -34
- package/system/dist/{base-device-BcGO6LTT.mjs → base-device-DJXF5eDN.mjs} +138 -34
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/alerts/alert-episode-policy.d.ts +9 -5
- package/system/dist/builtins/alerts/alerts.addon.js +30 -80
- package/system/dist/builtins/alerts/alerts.addon.mjs +18 -68
- package/system/dist/builtins/autotrack/index.js +2 -2
- package/system/dist/builtins/autotrack/index.mjs +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +9 -9
- package/system/dist/builtins/camera-grid/index.mjs +6 -6
- package/system/dist/builtins/composer/composer.addon.js +99 -99
- package/system/dist/builtins/composer/composer.addon.mjs +11 -11
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/automation-template-instances.d.ts +14 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.d.ts +6 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +296 -193
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +237 -134
- package/system/dist/builtins/core-blocks/link-contributions.d.ts +2 -0
- package/system/dist/builtins/core-notifier/core-notifier.addon.js +91 -18
- package/system/dist/builtins/core-notifier/core-notifier.addon.mjs +91 -18
- package/system/dist/builtins/core-notifier/group-notification-output.d.ts +8 -16
- package/system/dist/builtins/device-history/device-history.addon.d.ts +8 -0
- package/system/dist/builtins/device-history/device-history.addon.js +580 -60
- package/system/dist/builtins/device-history/device-history.addon.mjs +569 -49
- package/system/dist/builtins/device-history/retention/device-raw-overrides.d.ts +16 -0
- package/system/dist/builtins/device-history/retention/retention-knobs.d.ts +14 -0
- package/system/dist/builtins/device-history/retention/retention.d.ts +21 -1
- package/system/dist/builtins/device-history/transitions/change-coalescing.d.ts +48 -0
- package/system/dist/builtins/device-history/transitions/derived-changes.d.ts +49 -0
- package/system/dist/builtins/device-history/transitions/history-change-port.d.ts +20 -0
- package/system/dist/builtins/device-history/transitions/transitions-service.d.ts +18 -3
- package/system/dist/builtins/device-manager/device-config-secrets.d.ts +14 -0
- package/system/dist/builtins/device-manager/device-identity-index.d.ts +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +226 -479
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +218 -471
- package/system/dist/builtins/device-manager/device-state-mirror.d.ts +0 -5
- package/system/dist/builtins/device-manager/identity-link-reconciler.d.ts +5 -0
- package/system/dist/builtins/device-manager/transitions/command-recorder.d.ts +38 -0
- package/system/dist/builtins/device-manager/transitions/transitions-wiring.d.ts +8 -9
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +2 -2
- package/system/dist/builtins/keychain/index.mjs +2 -2
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +2 -2
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/system/dist/builtins/local-network/address-book.d.ts +3 -1
- package/system/dist/builtins/local-network/local-network.addon.d.ts +26 -1
- package/system/dist/builtins/local-network/local-network.addon.js +66 -11
- package/system/dist/builtins/local-network/local-network.addon.mjs +66 -11
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +4 -4
- package/system/dist/builtins/snapshot/index.mjs +4 -4
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- 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 +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +1 -1
- package/system/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{capture-engine-CUZ3W0oZ.mjs → capture-engine-B2MmoNND.mjs} +1 -1
- package/system/dist/{capture-engine-mtDXEBAq.js → capture-engine-D_1IJmMs.js} +1 -1
- package/system/dist/command-catalog-C29hVOOg.js +210 -0
- package/system/dist/command-catalog-xAeqxbZk.mjs +169 -0
- package/system/dist/{error.cap-DCwbIGEF.mjs → compile-OBMHlqD-.mjs} +97 -100
- package/system/dist/{error.cap-BxLEHP6z.js → compile-SpeAhaZ6.js} +107 -116
- package/system/dist/{composition-sources-B56CU8hi.mjs → composition-sources-C327LGFn.mjs} +2 -2
- package/system/dist/{composition-sources-D_Bfwji0.js → composition-sources-Do5qM6EB.js} +17 -17
- package/system/dist/{core-blocks.cap-xt5_fK5Z.js → core-blocks.cap-CdTGUKtr.js} +194 -10110
- package/system/dist/{core-blocks.cap-DDECcMeI.mjs → core-blocks.cap-DLkEfV5b.mjs} +54 -9910
- package/system/dist/{device-kind-BJ2pfsjw.mjs → device-kind-C37Ra2wd.mjs} +4 -2
- package/system/dist/{device-kind-CsSiv_YF.js → device-kind-FMhJg8uC.js} +4 -2
- package/system/dist/{device-manager.cap-DyHOIh5T.js → device-manager.cap-DJs8izI6.js} +13 -4
- package/system/dist/{device-manager.cap-DIBK62-r.mjs → device-manager.cap-eYrj1Ezp.mjs} +13 -4
- package/system/dist/{device-provider.cap-BKUGJSo0.js → device-provider.cap-CNlYBQ5D.js} +1 -1
- package/system/dist/{device-provider.cap-DU6HMUXH.mjs → device-provider.cap-D8mJllVM.mjs} +1 -1
- package/system/dist/{device-row-store-O4mNbp5q.js → device-row-store-C0P2H18h.js} +2 -2
- package/system/dist/{device-row-store-C-_R-h1Z.mjs → device-row-store-CTocYKqC.mjs} +2 -2
- package/system/dist/{device-type-CbQsnFdC.js → device-type-Cnc0NiSX.js} +13 -0
- package/system/dist/{device-type-DgEvK3ch.mjs → device-type-TUGqGmaI.mjs} +13 -0
- package/system/dist/error.cap-BuKbL3Ac.js +125 -0
- package/system/dist/error.cap-CU1FB6uE.mjs +102 -0
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{history-catalog-BwTeQ4Mr.mjs → history-catalog-A_dzXNpv.mjs} +98 -3
- package/system/dist/{history-catalog-BKRarIL_.js → history-catalog-CiTMP3-E.js} +98 -3
- package/system/dist/index.js +28 -6
- package/system/dist/index.mjs +28 -6
- package/system/dist/kernel/addon-version-policy.d.ts +10 -0
- package/system/dist/{legacy-integration-rows-door-B1nzxxr5.js → legacy-integration-rows-door-CdqYAj-o.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-nTvo_6jQ.mjs → legacy-integration-rows-door-LSgpClpX.mjs} +1 -1
- package/system/dist/{low-power-sleep.cap-B6mz6ojP.js → low-power-sleep.cap-BJWyAuUQ.js} +1 -1
- package/system/dist/{low-power-sleep.cap-C3Vi8Vxj.mjs → low-power-sleep.cap-D9Orx3LS.mjs} +1 -1
- package/system/dist/migrations/hub/2026-11-22-device-transitions-commands-only.d.ts +10 -0
- package/system/dist/{network-access.cap-BEN_uRVb.js → network-access.cap-CTQ2WQoi.js} +38 -12
- package/system/dist/{network-access.cap-Dy8FNNVs.mjs → network-access.cap-Dx5K0I5i.mjs} +33 -13
- package/system/dist/{notification-rules.cap-Drwz-A4n.js → notification-rules.cap-BJKUjizS.js} +45 -9
- package/system/dist/{notification-rules.cap-0vVvsxQ1.mjs → notification-rules.cap-BUIuYPlQ.mjs} +45 -9
- package/system/dist/{notification-targets-DR-D-vIt.mjs → notification-targets-4bGYH5J7.mjs} +2 -2
- package/system/dist/{notification-targets-Cc_3OBH9.js → notification-targets-DMW7xgR2.js} +2 -2
- package/system/dist/{prefix-walk-CCO_VZVo.js → prefix-walk-BFnw8NBu.js} +5 -5
- package/system/dist/{prefix-walk-BhT0ZoKl.mjs → prefix-walk-Mtij0NNT.mjs} +2 -2
- package/system/dist/{ptz-autotrack.cap-DOz0xL0O.js → ptz-autotrack.cap-B9eyZU8w.js} +1 -1
- package/system/dist/{ptz-autotrack.cap-CDF6FeTK.mjs → ptz-autotrack.cap-Dw2k-po9.mjs} +1 -1
- package/system/dist/{recording-archive.cap-RHAN45fa.mjs → recording-archive.cap-CTlm86R8.mjs} +1 -1
- package/system/dist/{recording-archive.cap-BPJ7kvnd.js → recording-archive.cap-Wo-hEZhz.js} +1 -1
- package/system/dist/{rename-composition-block-DWUkrazx.mjs → rename-composition-block-Cdh-dRmY.mjs} +395 -20
- package/system/dist/{rename-composition-block-CH2vRIW7.js → rename-composition-block-D9Uc1AF7.js} +406 -31
- package/system/dist/{retention-CUOVI1p7.mjs → retention-CQs8QR1B.mjs} +33 -3
- package/system/dist/{device-transitions.cap-DCXP3zwY.mjs → retention-source.cap-550kkyp5.mjs} +98 -21
- package/system/dist/{device-transitions.cap-zOGvAIHz.js → retention-source.cap-C6Hy0hlM.js} +103 -20
- package/system/dist/{retention-BcOSL6b9.js → retention-xcjk_k1w.js} +33 -3
- package/system/dist/{snapshot.cap-Cis6JRwn.js → snapshot.cap-CHm29hBs.js} +1 -1
- package/system/dist/{snapshot.cap-BkfHpJVO.mjs → snapshot.cap-CO68YvJU.mjs} +1 -1
- package/system/dist/{stream-catalog.cap-D8Y-uXcy.js → stream-catalog.cap-CjEQFknc.js} +2 -2
- package/system/dist/{stream-catalog.cap-D1Hy19Yc.mjs → stream-catalog.cap-DVniDdRD.mjs} +2 -2
- package/system/dist/{user-management.cap-Ctd4c_im.mjs → user-management.cap-4IEUCSdL.mjs} +2 -2
- package/system/dist/{user-management.cap-DyVb68rY.js → user-management.cap-DV9Jfsj3.js} +2 -2
- package/system/dist/{wal-maintenance-CjpslZUL.mjs → wal-maintenance-Bey5ChBb.mjs} +0 -0
- package/system/dist/{wal-maintenance-DKTXQ7UF.js → wal-maintenance-BgYiAy5b.js} +0 -0
- package/system/package.json +4 -1
- package/system/dist/builtins/device-manager/transitions/transition-correlator.d.ts +0 -81
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_device_type = require("./device-type-
|
|
1
|
+
const require_device_type = require("./device-type-Cnc0NiSX.js");
|
|
2
2
|
//#region ../types/dist/esm/composition/helpers/energy.mjs
|
|
3
3
|
/**
|
|
4
4
|
* Watts integrated over time, in kWh (D944).
|
|
@@ -14,7 +14,7 @@ function wattMillisecondsToKwh(wattMilliseconds) {
|
|
|
14
14
|
//#region ../types/dist/esm/generated/history-catalog.mjs
|
|
15
15
|
/**
|
|
16
16
|
* Cap history catalog, projected from every `*.cap.ts` `history` block.
|
|
17
|
-
*
|
|
17
|
+
* 49 caps with series (150 series), 40 caps answered `'none'`.
|
|
18
18
|
* Field keys are `runtimeState` paths (`a.b` into fixed objects only).
|
|
19
19
|
*/
|
|
20
20
|
var HISTORY_CATALOG = {
|
|
@@ -353,6 +353,28 @@ var HISTORY_CATALOG = {
|
|
|
353
353
|
unit: "%",
|
|
354
354
|
deadband: 2
|
|
355
355
|
} },
|
|
356
|
+
"location": {
|
|
357
|
+
"latitude": {
|
|
358
|
+
group: "position",
|
|
359
|
+
kind: "gauge",
|
|
360
|
+
unit: "°",
|
|
361
|
+
deadband: 2e-4,
|
|
362
|
+
displayName: "Latitude"
|
|
363
|
+
},
|
|
364
|
+
"longitude": {
|
|
365
|
+
group: "position",
|
|
366
|
+
kind: "gauge",
|
|
367
|
+
unit: "°",
|
|
368
|
+
deadband: 2e-4,
|
|
369
|
+
displayName: "Longitude"
|
|
370
|
+
},
|
|
371
|
+
"speed": {
|
|
372
|
+
kind: "gauge",
|
|
373
|
+
unit: "m/s",
|
|
374
|
+
deadband: .5,
|
|
375
|
+
displayName: "Speed"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
356
378
|
"lock-control": { "state": {
|
|
357
379
|
kind: "enum",
|
|
358
380
|
values: [
|
|
@@ -511,6 +533,75 @@ var HISTORY_CATALOG = {
|
|
|
511
533
|
unit: "%",
|
|
512
534
|
minIntervalMs: 0
|
|
513
535
|
} },
|
|
536
|
+
"vehicle": {
|
|
537
|
+
"odometer": {
|
|
538
|
+
kind: "counter",
|
|
539
|
+
unit: "m",
|
|
540
|
+
displayName: "Distance driven"
|
|
541
|
+
},
|
|
542
|
+
"range": {
|
|
543
|
+
kind: "gauge",
|
|
544
|
+
unit: "m",
|
|
545
|
+
deadband: 1e3,
|
|
546
|
+
displayName: "Range"
|
|
547
|
+
},
|
|
548
|
+
"engineOn": {
|
|
549
|
+
kind: "boolean",
|
|
550
|
+
displayName: "Engine"
|
|
551
|
+
},
|
|
552
|
+
"auxBatteryLevel": {
|
|
553
|
+
kind: "gauge",
|
|
554
|
+
unit: "%",
|
|
555
|
+
deadband: 1,
|
|
556
|
+
displayName: "12 V battery"
|
|
557
|
+
},
|
|
558
|
+
"auxBatteryVoltage": {
|
|
559
|
+
kind: "gauge",
|
|
560
|
+
unit: "V",
|
|
561
|
+
deadband: .1,
|
|
562
|
+
displayName: "12 V voltage"
|
|
563
|
+
},
|
|
564
|
+
"doors.frontLeft": {
|
|
565
|
+
kind: "boolean",
|
|
566
|
+
displayName: "Front left door"
|
|
567
|
+
},
|
|
568
|
+
"doors.frontRight": {
|
|
569
|
+
kind: "boolean",
|
|
570
|
+
displayName: "Front right door"
|
|
571
|
+
},
|
|
572
|
+
"doors.rearLeft": {
|
|
573
|
+
kind: "boolean",
|
|
574
|
+
displayName: "Rear left door"
|
|
575
|
+
},
|
|
576
|
+
"doors.rearRight": {
|
|
577
|
+
kind: "boolean",
|
|
578
|
+
displayName: "Rear right door"
|
|
579
|
+
},
|
|
580
|
+
"tyreWarnings.frontLeft": {
|
|
581
|
+
kind: "boolean",
|
|
582
|
+
displayName: "Front left tyre warning"
|
|
583
|
+
},
|
|
584
|
+
"tyreWarnings.frontRight": {
|
|
585
|
+
kind: "boolean",
|
|
586
|
+
displayName: "Front right tyre warning"
|
|
587
|
+
},
|
|
588
|
+
"tyreWarnings.rearLeft": {
|
|
589
|
+
kind: "boolean",
|
|
590
|
+
displayName: "Rear left tyre warning"
|
|
591
|
+
},
|
|
592
|
+
"tyreWarnings.rearRight": {
|
|
593
|
+
kind: "boolean",
|
|
594
|
+
displayName: "Rear right tyre warning"
|
|
595
|
+
},
|
|
596
|
+
"trunkOpen": {
|
|
597
|
+
kind: "boolean",
|
|
598
|
+
displayName: "Trunk"
|
|
599
|
+
},
|
|
600
|
+
"hoodOpen": {
|
|
601
|
+
kind: "boolean",
|
|
602
|
+
displayName: "Hood"
|
|
603
|
+
}
|
|
604
|
+
},
|
|
514
605
|
"vibration": { "detected": { kind: "boolean" } },
|
|
515
606
|
"water-heater": {
|
|
516
607
|
"currentTemp": {
|
|
@@ -762,7 +853,7 @@ var HISTORY_ITEM_CATALOG = {
|
|
|
762
853
|
};
|
|
763
854
|
/**
|
|
764
855
|
* The series a device card trends, per cap (`history.primary` + `history.priority`):
|
|
765
|
-
*
|
|
856
|
+
* 8 caps. The card shows the primary of the enabled cap with the highest priority.
|
|
766
857
|
*/
|
|
767
858
|
var HISTORY_PRIMARY = {
|
|
768
859
|
"climate-control": {
|
|
@@ -785,6 +876,10 @@ var HISTORY_PRIMARY = {
|
|
|
785
876
|
field: "temperature",
|
|
786
877
|
priority: 100
|
|
787
878
|
},
|
|
879
|
+
"vehicle": {
|
|
880
|
+
field: "range",
|
|
881
|
+
priority: 30
|
|
882
|
+
},
|
|
788
883
|
"weather-station": {
|
|
789
884
|
field: "temperature",
|
|
790
885
|
priority: 60
|
package/system/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
3
|
-
const require_base_addon = require("./base-addon-
|
|
3
|
+
const require_base_addon = require("./base-addon-CRsXtYFG.js");
|
|
4
4
|
const require_scoped_settings = require("./scoped-settings-CylSSq_8.js");
|
|
5
|
-
const require_rename_composition_block = require("./rename-composition-block-
|
|
5
|
+
const require_rename_composition_block = require("./rename-composition-block-D9Uc1AF7.js");
|
|
6
6
|
const require_camstack_error = require("./camstack-error-DJ-TUAi1.js");
|
|
7
7
|
const require_capability_definition = require("./capability-definition-BEVd01Xj.js");
|
|
8
8
|
const require_record_kind = require("./record-kind-DoBfYHCs.js");
|
|
9
|
-
const require_wal_maintenance = require("./wal-maintenance-
|
|
9
|
+
const require_wal_maintenance = require("./wal-maintenance-BgYiAy5b.js");
|
|
10
10
|
const require_device_certificate = require("./device-certificate-CguVACQO.js");
|
|
11
11
|
const require_addon_settings_cap = require("./addon-settings.cap-DrLdMFIe.js");
|
|
12
|
-
const require_prefix_walk = require("./prefix-walk-
|
|
13
|
-
const require_network_access_cap = require("./network-access.cap-
|
|
12
|
+
const require_prefix_walk = require("./prefix-walk-BFnw8NBu.js");
|
|
13
|
+
const require_network_access_cap = require("./network-access.cap-CTQ2WQoi.js");
|
|
14
14
|
const require_constants = require("./constants-C860Y6U4.js");
|
|
15
15
|
const require_addon_id = require("./addon-id-Di0lNJ89.js");
|
|
16
16
|
const require_coral_accelerators = require("./coral-accelerators-7o8hqvcN.js");
|
|
@@ -42,7 +42,7 @@ const require_builtins_loki_logging_index = require("./builtins/loki-logging/ind
|
|
|
42
42
|
const require_builtins_native_metrics_native_metrics_addon = require("./builtins/native-metrics/native-metrics.addon.js");
|
|
43
43
|
const require_builtins_device_history_device_history_addon = require("./builtins/device-history/device-history.addon.js");
|
|
44
44
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
|
|
45
|
-
const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-
|
|
45
|
+
const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-CdqYAj-o.js");
|
|
46
46
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
|
|
47
47
|
const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage/index.js");
|
|
48
48
|
const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
|
|
@@ -7926,6 +7926,23 @@ var AddonManifest = class {
|
|
|
7926
7926
|
//#region src/kernel/addon-version-policy.ts
|
|
7927
7927
|
var ADDON_VERSION_REASON_REGISTRY_LATEST = "installed version differs from registry latest";
|
|
7928
7928
|
var ADDON_VERSION_REASON_HUB = "agent follows the hub installed version";
|
|
7929
|
+
var SEMVER_RE = /^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/;
|
|
7930
|
+
/**
|
|
7931
|
+
* True when `installed` is a prerelease build (`1.2.942-dev.<epoch>`) whose
|
|
7932
|
+
* base triple is strictly above `target`'s: a dev closure ahead of the
|
|
7933
|
+
* registry tag. A release line that moved down (D942) is not this case.
|
|
7934
|
+
*/
|
|
7935
|
+
function isPrereleaseAhead(installed, target) {
|
|
7936
|
+
const i = SEMVER_RE.exec(installed.trim());
|
|
7937
|
+
const t = SEMVER_RE.exec(target.trim());
|
|
7938
|
+
if (!i || !t || i[4] === void 0) return false;
|
|
7939
|
+
for (let k = 1; k <= 3; k += 1) {
|
|
7940
|
+
const a = Number(i[k]);
|
|
7941
|
+
const b = Number(t[k]);
|
|
7942
|
+
if (a !== b) return a > b;
|
|
7943
|
+
}
|
|
7944
|
+
return false;
|
|
7945
|
+
}
|
|
7929
7946
|
/**
|
|
7930
7947
|
* Move when `installed` is not `target`. `target === null` (or empty) means
|
|
7931
7948
|
* the authority could not be read — keep whatever is installed.
|
|
@@ -7934,10 +7951,15 @@ var ADDON_VERSION_REASON_HUB = "agent follows the hub installed version";
|
|
|
7934
7951
|
* `unmet` is what the TARGET declares and this node does not meet (computed by
|
|
7935
7952
|
* the caller from the target's `camstack.requires`). A move that would happen
|
|
7936
7953
|
* is held and says why; a node that is already on the target has nothing to hold.
|
|
7954
|
+
* A prerelease installed ahead of a registry target is never moved down.
|
|
7937
7955
|
*/
|
|
7938
7956
|
function decideAddonVersionMove(installed, target, reason, unmet = []) {
|
|
7939
7957
|
if (target === null || target.length === 0) return { move: false };
|
|
7940
7958
|
if (installed !== null && installed === target) return { move: false };
|
|
7959
|
+
if (reason === "installed version differs from registry latest" && installed !== null && isPrereleaseAhead(installed, target)) return {
|
|
7960
|
+
move: false,
|
|
7961
|
+
installedNewer: true
|
|
7962
|
+
};
|
|
7941
7963
|
if (unmet.length > 0) return {
|
|
7942
7964
|
move: false,
|
|
7943
7965
|
blockedBy: unmet
|
package/system/dist/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { i as __require } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { b as EventCategory$1, i as collectSecretMarkerRefs, p as createEvent$1 } from "./base-addon-
|
|
2
|
+
import { b as EventCategory$1, i as collectSecretMarkerRefs, p as createEvent$1 } from "./base-addon-BcS6r1cT.mjs";
|
|
3
3
|
import { Z as errMsg$1 } from "./scoped-settings-DVWUIP7Z.mjs";
|
|
4
|
-
import { Un as lifecycleJobSchema, a as isCollectionArrayMethod, c as kebabToCamel$1, d as objectInputDeclaresRequiredDeviceId, dr as compareVersions, f as procedureAuthKey, fr as describeUnmet, i as isArrayOutputSchema, l as looseSchema, m as ALL_CAPABILITY_DEFINITIONS, o as isObjectInput, p as resolveMethodAuth, pr as unmetRequirements, r as extractNestedAddonId, s as isVoidInput, u as objectInputDeclaresAddonId, ur as PackageRequiresSchema } from "./rename-composition-block-
|
|
4
|
+
import { Un as lifecycleJobSchema, a as isCollectionArrayMethod, c as kebabToCamel$1, d as objectInputDeclaresRequiredDeviceId, dr as compareVersions, f as procedureAuthKey, fr as describeUnmet, i as isArrayOutputSchema, l as looseSchema, m as ALL_CAPABILITY_DEFINITIONS, o as isObjectInput, p as resolveMethodAuth, pr as unmetRequirements, r as extractNestedAddonId, s as isVoidInput, u as objectInputDeclaresAddonId, ur as PackageRequiresSchema } from "./rename-composition-block-Cdh-dRmY.mjs";
|
|
5
5
|
import { t as userError } from "./camstack-error-viZYfcj9.mjs";
|
|
6
6
|
import { a as expandCapMethods, n as DEVICE_STATUS_METHOD, t as DEVICE_SETTINGS_CONTRIBUTION_METHODS, u as resolveCapMount } from "./capability-definition-C1TLUVJR.mjs";
|
|
7
7
|
import { s as defineRecordKinds } from "./record-kind-ub6NXqfh.mjs";
|
|
8
|
-
import { D as RecordsEngine, J as asNumber, X as parseJsonObject, Y as asString$1, Z as parseJsonUnknown, l as SqliteSettingsBackend, q as asJsonObject$1 } from "./wal-maintenance-
|
|
8
|
+
import { D as RecordsEngine, J as asNumber, X as parseJsonObject, Y as asString$1, Z as parseJsonUnknown, l as SqliteSettingsBackend, q as asJsonObject$1 } from "./wal-maintenance-Bey5ChBb.mjs";
|
|
9
9
|
import { f as AppPageLangSchema } from "./device-certificate-Cddm4Idn.mjs";
|
|
10
10
|
import { i as addonSettingsCapability } from "./addon-settings.cap-CZ4MC7ha.mjs";
|
|
11
|
-
import { t as loadPrefixed } from "./prefix-walk-
|
|
12
|
-
import { a as AGENT_MDNS_TXT_KEYS, i as AGENT_MDNS_SERVICE_TYPE } from "./network-access.cap-
|
|
11
|
+
import { t as loadPrefixed } from "./prefix-walk-Mtij0NNT.mjs";
|
|
12
|
+
import { a as AGENT_MDNS_TXT_KEYS, i as AGENT_MDNS_SERVICE_TYPE } from "./network-access.cap-Dx5K0I5i.mjs";
|
|
13
13
|
import { t as RUNTIME_DEFAULTS } from "./constants-DCLpoF4L.mjs";
|
|
14
14
|
import { t as bareAddonId } from "./addon-id-CVg1_r5E.mjs";
|
|
15
15
|
import { r as nodeCoralFs, s as supportedRuntimes, t as classifyCoralAccelerator } from "./coral-accelerators-BKcXP59c.mjs";
|
|
@@ -41,7 +41,7 @@ import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index
|
|
|
41
41
|
import NativeMetricsAddon, { a as NativeMetricsProvider, i as parseProcStatusRss, n as nodeProcReader, r as parseProcStat } from "./builtins/native-metrics/native-metrics.addon.mjs";
|
|
42
42
|
import { DeviceHistoryAddon } from "./builtins/device-history/device-history.addon.mjs";
|
|
43
43
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
|
|
44
|
-
import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-
|
|
44
|
+
import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-LSgpClpX.mjs";
|
|
45
45
|
import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
|
|
46
46
|
import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
|
|
47
47
|
import { StorageOrchestratorAddon, a as createHubCapForwardService, i as HUB_CAP_FWD_SERVICE, o as stripForwardedCaller, r as HUB_CAP_FWD_ACTION, s as buildStorageLocationRegistry, t as StorageOrchestratorService, u as storageOrchestratorRecordKinds } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
|
|
@@ -7922,6 +7922,23 @@ var AddonManifest = class {
|
|
|
7922
7922
|
//#region src/kernel/addon-version-policy.ts
|
|
7923
7923
|
var ADDON_VERSION_REASON_REGISTRY_LATEST = "installed version differs from registry latest";
|
|
7924
7924
|
var ADDON_VERSION_REASON_HUB = "agent follows the hub installed version";
|
|
7925
|
+
var SEMVER_RE = /^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/;
|
|
7926
|
+
/**
|
|
7927
|
+
* True when `installed` is a prerelease build (`1.2.942-dev.<epoch>`) whose
|
|
7928
|
+
* base triple is strictly above `target`'s: a dev closure ahead of the
|
|
7929
|
+
* registry tag. A release line that moved down (D942) is not this case.
|
|
7930
|
+
*/
|
|
7931
|
+
function isPrereleaseAhead(installed, target) {
|
|
7932
|
+
const i = SEMVER_RE.exec(installed.trim());
|
|
7933
|
+
const t = SEMVER_RE.exec(target.trim());
|
|
7934
|
+
if (!i || !t || i[4] === void 0) return false;
|
|
7935
|
+
for (let k = 1; k <= 3; k += 1) {
|
|
7936
|
+
const a = Number(i[k]);
|
|
7937
|
+
const b = Number(t[k]);
|
|
7938
|
+
if (a !== b) return a > b;
|
|
7939
|
+
}
|
|
7940
|
+
return false;
|
|
7941
|
+
}
|
|
7925
7942
|
/**
|
|
7926
7943
|
* Move when `installed` is not `target`. `target === null` (or empty) means
|
|
7927
7944
|
* the authority could not be read — keep whatever is installed.
|
|
@@ -7930,10 +7947,15 @@ var ADDON_VERSION_REASON_HUB = "agent follows the hub installed version";
|
|
|
7930
7947
|
* `unmet` is what the TARGET declares and this node does not meet (computed by
|
|
7931
7948
|
* the caller from the target's `camstack.requires`). A move that would happen
|
|
7932
7949
|
* is held and says why; a node that is already on the target has nothing to hold.
|
|
7950
|
+
* A prerelease installed ahead of a registry target is never moved down.
|
|
7933
7951
|
*/
|
|
7934
7952
|
function decideAddonVersionMove(installed, target, reason, unmet = []) {
|
|
7935
7953
|
if (target === null || target.length === 0) return { move: false };
|
|
7936
7954
|
if (installed !== null && installed === target) return { move: false };
|
|
7955
|
+
if (reason === "installed version differs from registry latest" && installed !== null && isPrereleaseAhead(installed, target)) return {
|
|
7956
|
+
move: false,
|
|
7957
|
+
installedNewer: true
|
|
7958
|
+
};
|
|
7937
7959
|
if (unmet.length > 0) return {
|
|
7938
7960
|
move: false,
|
|
7939
7961
|
blockedBy: unmet
|
|
@@ -13,6 +13,9 @@ export declare const ADDON_VERSION_REASON_HUB: "agent follows the hub installed
|
|
|
13
13
|
export type AddonVersionReason = typeof ADDON_VERSION_REASON_REGISTRY_LATEST | typeof ADDON_VERSION_REASON_HUB;
|
|
14
14
|
export type AddonVersionMove = {
|
|
15
15
|
readonly move: false;
|
|
16
|
+
} | {
|
|
17
|
+
readonly move: false;
|
|
18
|
+
readonly installedNewer: true;
|
|
16
19
|
} | {
|
|
17
20
|
readonly move: false;
|
|
18
21
|
readonly blockedBy: readonly UnmetRequirement[];
|
|
@@ -23,6 +26,12 @@ export type AddonVersionMove = {
|
|
|
23
26
|
readonly reason: AddonVersionReason;
|
|
24
27
|
};
|
|
25
28
|
/**
|
|
29
|
+
* True when `installed` is a prerelease build (`1.2.942-dev.<epoch>`) whose
|
|
30
|
+
* base triple is strictly above `target`'s: a dev closure ahead of the
|
|
31
|
+
* registry tag. A release line that moved down (D942) is not this case.
|
|
32
|
+
*/
|
|
33
|
+
export declare function isPrereleaseAhead(installed: string, target: string): boolean;
|
|
34
|
+
/**
|
|
26
35
|
* Move when `installed` is not `target`. `target === null` (or empty) means
|
|
27
36
|
* the authority could not be read — keep whatever is installed.
|
|
28
37
|
* `installed === null` with a known target is a first install of that target.
|
|
@@ -30,5 +39,6 @@ export type AddonVersionMove = {
|
|
|
30
39
|
* `unmet` is what the TARGET declares and this node does not meet (computed by
|
|
31
40
|
* the caller from the target's `camstack.requires`). A move that would happen
|
|
32
41
|
* is held and says why; a node that is already on the target has nothing to hold.
|
|
42
|
+
* A prerelease installed ahead of a registry target is never moved down.
|
|
33
43
|
*/
|
|
34
44
|
export declare function decideAddonVersionMove(installed: string | null, target: string | null, reason: AddonVersionReason, unmet?: readonly UnmetRequirement[]): AddonVersionMove;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_base_addon = require("./base-addon-
|
|
1
|
+
const require_base_addon = require("./base-addon-CRsXtYFG.js");
|
|
2
2
|
//#region src/builtins/sqlite-storage/migrations/legacy-integration-rows-door.ts
|
|
3
3
|
/**
|
|
4
4
|
* Migration-only door for the leftover integration rows (planning#416).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as collectSecretMarkerRefs } from "./base-addon-
|
|
1
|
+
import { i as collectSecretMarkerRefs } from "./base-addon-BcS6r1cT.mjs";
|
|
2
2
|
//#region src/builtins/sqlite-storage/migrations/legacy-integration-rows-door.ts
|
|
3
3
|
/**
|
|
4
4
|
* Migration-only door for the leftover integration rows (planning#416).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_capability_definition = require("./capability-definition-BEVd01Xj.js");
|
|
2
2
|
const require_quantity = require("./quantity-lY1KiTSZ.js");
|
|
3
|
-
const require_device_type = require("./device-type-
|
|
3
|
+
const require_device_type = require("./device-type-Cnc0NiSX.js");
|
|
4
4
|
const require_l10n = require("./l10n-CGMvp7NF.js");
|
|
5
5
|
let zod = require("zod");
|
|
6
6
|
//#region ../types/dist/esm/capabilities/low-power-sleep.cap.mjs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as method } from "./capability-definition-C1TLUVJR.mjs";
|
|
2
2
|
import { a as readingMeta } from "./quantity-D3g5SxsZ.mjs";
|
|
3
|
-
import { r as DeviceType } from "./device-type-
|
|
3
|
+
import { r as DeviceType } from "./device-type-TUGqGmaI.mjs";
|
|
4
4
|
import { t } from "./l10n-Bu6aUvSY.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region ../types/dist/esm/capabilities/low-power-sleep.cap.mjs
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HubSqlMigration } from "../../builtins/sqlite-storage/migrations/migration-types.js";
|
|
2
|
+
export declare const DEVICE_TRANSITIONS_COMMANDS_ONLY_MIGRATION_ID = "hub/2026-11-22-device-transitions-commands-only";
|
|
3
|
+
/** The record kind the device-history addon declares, and its owner. */
|
|
4
|
+
export declare const DEVICE_TRANSITIONS_OWNER = "device-history";
|
|
5
|
+
export declare const DEVICE_TRANSITIONS_KIND = "device-transitions";
|
|
6
|
+
/** The outcomes the retired confirmation machinery wrote for a command that did not throw. */
|
|
7
|
+
export declare const RETIRED_COMMAND_OUTCOMES: readonly string[];
|
|
8
|
+
/** Rows one statement touches; a big ledger is rewritten in bounded steps, never one huge statement. */
|
|
9
|
+
export declare const MIGRATION_BATCH_ROWS = 5e3;
|
|
10
|
+
export declare const DEVICE_TRANSITIONS_COMMANDS_ONLY_MIGRATION: HubSqlMigration;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_capability_definition = require("./capability-definition-BEVd01Xj.js");
|
|
2
2
|
const require_system_reasons = require("./system-reasons-Be_k1W8g.js");
|
|
3
|
-
const require_device_provider_cap = require("./device-provider.cap-
|
|
3
|
+
const require_device_provider_cap = require("./device-provider.cap-CNlYBQ5D.js");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
//#region ../types/dist/esm/capabilities/viewer-link-url.mjs
|
|
6
6
|
/** The central link domain the viewer app claims (Universal Links / App Links). */
|
|
@@ -199,25 +199,39 @@ function validFlag(role, flag) {
|
|
|
199
199
|
const check = checkRoleAddress(role, flag, { acceptInsecureHttp: true });
|
|
200
200
|
return check.ok ? check.baseUrl : null;
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
|
|
202
|
+
function pickAutoEndpoint(endpoints, role) {
|
|
203
|
+
return endpoints.flatMap((endpoint) => {
|
|
204
204
|
const rank = autoRankFor(role, endpoint);
|
|
205
205
|
return rank === null ? [] : [{
|
|
206
206
|
rank,
|
|
207
207
|
priority: endpoint.priority,
|
|
208
208
|
endpoint
|
|
209
209
|
}];
|
|
210
|
-
}).toSorted((a, b) => a.rank - b.rank || a.priority - b.priority)[0];
|
|
211
|
-
return best === void 0 ? null : trimSlash(best.endpoint.baseUrl);
|
|
210
|
+
}).toSorted((a, b) => a.rank - b.rank || a.priority - b.priority)[0]?.endpoint ?? null;
|
|
212
211
|
}
|
|
213
|
-
|
|
212
|
+
/**
|
|
213
|
+
* The tunnel address AUTOMATIC `publicEndpoint` resolves to over `endpoints`
|
|
214
|
+
* right now, or `null` when it resolves to anything else (LAN, mesh, nothing).
|
|
215
|
+
* The one thing worth remembering across a boot (D1070).
|
|
216
|
+
*/
|
|
217
|
+
function livePublicTunnelAddress(endpoints) {
|
|
218
|
+
const best = pickAutoEndpoint(endpoints, "publicEndpoint");
|
|
219
|
+
return best !== null && isTunnel(best) ? trimSlash(best.baseUrl) : null;
|
|
220
|
+
}
|
|
221
|
+
function resolveHubRole(endpoints, role, flag, remembered = null) {
|
|
214
222
|
const flagged = validFlag(role, flag);
|
|
215
223
|
if (flagged !== null) return {
|
|
216
224
|
flagged,
|
|
217
225
|
resolved: flagged,
|
|
218
226
|
source: "flagged"
|
|
219
227
|
};
|
|
220
|
-
const
|
|
228
|
+
const best = pickAutoEndpoint(endpoints, role);
|
|
229
|
+
const auto = best === null ? null : trimSlash(best.baseUrl);
|
|
230
|
+
if (role === "publicEndpoint" && remembered !== null && (best === null || !isTunnel(best))) return {
|
|
231
|
+
flagged: null,
|
|
232
|
+
resolved: remembered,
|
|
233
|
+
source: "auto-remembered"
|
|
234
|
+
};
|
|
221
235
|
return {
|
|
222
236
|
flagged: null,
|
|
223
237
|
resolved: auto,
|
|
@@ -233,8 +247,8 @@ function resolveInternalAddress(endpoints, flags) {
|
|
|
233
247
|
* / OAuth2 callbacks, the relying party, and notification buttons,
|
|
234
248
|
* attachments, media and admin links.
|
|
235
249
|
*/
|
|
236
|
-
function resolvePublicEndpoint(endpoints, flags) {
|
|
237
|
-
return resolveHubRole(endpoints, "publicEndpoint", flags.publicEndpoint);
|
|
250
|
+
function resolvePublicEndpoint(endpoints, flags, remembered = null) {
|
|
251
|
+
return resolveHubRole(endpoints, "publicEndpoint", flags.publicEndpoint, remembered);
|
|
238
252
|
}
|
|
239
253
|
/** `notificationTaps`: the flagged address, else the CamStack app link (D709). */
|
|
240
254
|
function resolveNotificationTapAddress(flags) {
|
|
@@ -286,12 +300,12 @@ function resolveAppConnections(endpoints, flags) {
|
|
|
286
300
|
* `hubPalette` is the detected HTTPS palette `internal` and `publicEndpoint`
|
|
287
301
|
* resolve over.
|
|
288
302
|
*/
|
|
289
|
-
function resolveHubAddressRoles(appPalette, hubPalette, flags) {
|
|
303
|
+
function resolveHubAddressRoles(appPalette, hubPalette, flags, rememberedPublicEndpoint = null) {
|
|
290
304
|
return {
|
|
291
305
|
appConnections: resolveAppConnections(appPalette, flags),
|
|
292
306
|
notificationTaps: resolveNotificationTapAddress(flags),
|
|
293
307
|
internal: resolveInternalAddress(hubPalette, flags),
|
|
294
|
-
publicEndpoint: resolvePublicEndpoint(hubPalette, flags)
|
|
308
|
+
publicEndpoint: resolvePublicEndpoint(hubPalette, flags, rememberedPublicEndpoint)
|
|
295
309
|
};
|
|
296
310
|
}
|
|
297
311
|
/**
|
|
@@ -566,7 +580,13 @@ var HubAddressRoleResolutionSchema = /* @__PURE__ */ zod.z.object({
|
|
|
566
580
|
flagged: /* @__PURE__ */ zod.z.string().nullable(),
|
|
567
581
|
/** The address in use, or null when nothing qualifies (never loopback). */
|
|
568
582
|
resolved: /* @__PURE__ */ zod.z.string().nullable(),
|
|
569
|
-
|
|
583
|
+
/** `auto-remembered`: automatic, kept from an earlier tunnel pick while its row is absent. */
|
|
584
|
+
source: /* @__PURE__ */ zod.z.enum([
|
|
585
|
+
"flagged",
|
|
586
|
+
"auto",
|
|
587
|
+
"auto-remembered",
|
|
588
|
+
"none"
|
|
589
|
+
])
|
|
570
590
|
});
|
|
571
591
|
var HubAppConnectionsResolutionSchema = /* @__PURE__ */ zod.z.object({
|
|
572
592
|
/** The addresses flagged `appConnections`, or empty = automatic. */
|
|
@@ -1065,6 +1085,12 @@ Object.defineProperty(exports, "isDefaultAppConnectionEndpoint", {
|
|
|
1065
1085
|
return isDefaultAppConnectionEndpoint;
|
|
1066
1086
|
}
|
|
1067
1087
|
});
|
|
1088
|
+
Object.defineProperty(exports, "livePublicTunnelAddress", {
|
|
1089
|
+
enumerable: true,
|
|
1090
|
+
get: function() {
|
|
1091
|
+
return livePublicTunnelAddress;
|
|
1092
|
+
}
|
|
1093
|
+
});
|
|
1068
1094
|
Object.defineProperty(exports, "localNetworkCapability", {
|
|
1069
1095
|
enumerable: true,
|
|
1070
1096
|
get: function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as method } from "./capability-definition-C1TLUVJR.mjs";
|
|
2
2
|
import { t as NOT_A_DEVICE } from "./system-reasons-CYj4qwyS.mjs";
|
|
3
|
-
import { i as DiscoveryModeSchema, r as DiscoveryHitSchema } from "./device-provider.cap-
|
|
3
|
+
import { i as DiscoveryModeSchema, r as DiscoveryHitSchema } from "./device-provider.cap-D8mJllVM.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region ../types/dist/esm/capabilities/viewer-link-url.mjs
|
|
6
6
|
/** The central link domain the viewer app claims (Universal Links / App Links). */
|
|
@@ -199,25 +199,39 @@ function validFlag(role, flag) {
|
|
|
199
199
|
const check = checkRoleAddress(role, flag, { acceptInsecureHttp: true });
|
|
200
200
|
return check.ok ? check.baseUrl : null;
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
|
|
202
|
+
function pickAutoEndpoint(endpoints, role) {
|
|
203
|
+
return endpoints.flatMap((endpoint) => {
|
|
204
204
|
const rank = autoRankFor(role, endpoint);
|
|
205
205
|
return rank === null ? [] : [{
|
|
206
206
|
rank,
|
|
207
207
|
priority: endpoint.priority,
|
|
208
208
|
endpoint
|
|
209
209
|
}];
|
|
210
|
-
}).toSorted((a, b) => a.rank - b.rank || a.priority - b.priority)[0];
|
|
211
|
-
return best === void 0 ? null : trimSlash(best.endpoint.baseUrl);
|
|
210
|
+
}).toSorted((a, b) => a.rank - b.rank || a.priority - b.priority)[0]?.endpoint ?? null;
|
|
212
211
|
}
|
|
213
|
-
|
|
212
|
+
/**
|
|
213
|
+
* The tunnel address AUTOMATIC `publicEndpoint` resolves to over `endpoints`
|
|
214
|
+
* right now, or `null` when it resolves to anything else (LAN, mesh, nothing).
|
|
215
|
+
* The one thing worth remembering across a boot (D1070).
|
|
216
|
+
*/
|
|
217
|
+
function livePublicTunnelAddress(endpoints) {
|
|
218
|
+
const best = pickAutoEndpoint(endpoints, "publicEndpoint");
|
|
219
|
+
return best !== null && isTunnel(best) ? trimSlash(best.baseUrl) : null;
|
|
220
|
+
}
|
|
221
|
+
function resolveHubRole(endpoints, role, flag, remembered = null) {
|
|
214
222
|
const flagged = validFlag(role, flag);
|
|
215
223
|
if (flagged !== null) return {
|
|
216
224
|
flagged,
|
|
217
225
|
resolved: flagged,
|
|
218
226
|
source: "flagged"
|
|
219
227
|
};
|
|
220
|
-
const
|
|
228
|
+
const best = pickAutoEndpoint(endpoints, role);
|
|
229
|
+
const auto = best === null ? null : trimSlash(best.baseUrl);
|
|
230
|
+
if (role === "publicEndpoint" && remembered !== null && (best === null || !isTunnel(best))) return {
|
|
231
|
+
flagged: null,
|
|
232
|
+
resolved: remembered,
|
|
233
|
+
source: "auto-remembered"
|
|
234
|
+
};
|
|
221
235
|
return {
|
|
222
236
|
flagged: null,
|
|
223
237
|
resolved: auto,
|
|
@@ -233,8 +247,8 @@ function resolveInternalAddress(endpoints, flags) {
|
|
|
233
247
|
* / OAuth2 callbacks, the relying party, and notification buttons,
|
|
234
248
|
* attachments, media and admin links.
|
|
235
249
|
*/
|
|
236
|
-
function resolvePublicEndpoint(endpoints, flags) {
|
|
237
|
-
return resolveHubRole(endpoints, "publicEndpoint", flags.publicEndpoint);
|
|
250
|
+
function resolvePublicEndpoint(endpoints, flags, remembered = null) {
|
|
251
|
+
return resolveHubRole(endpoints, "publicEndpoint", flags.publicEndpoint, remembered);
|
|
238
252
|
}
|
|
239
253
|
/** `notificationTaps`: the flagged address, else the CamStack app link (D709). */
|
|
240
254
|
function resolveNotificationTapAddress(flags) {
|
|
@@ -286,12 +300,12 @@ function resolveAppConnections(endpoints, flags) {
|
|
|
286
300
|
* `hubPalette` is the detected HTTPS palette `internal` and `publicEndpoint`
|
|
287
301
|
* resolve over.
|
|
288
302
|
*/
|
|
289
|
-
function resolveHubAddressRoles(appPalette, hubPalette, flags) {
|
|
303
|
+
function resolveHubAddressRoles(appPalette, hubPalette, flags, rememberedPublicEndpoint = null) {
|
|
290
304
|
return {
|
|
291
305
|
appConnections: resolveAppConnections(appPalette, flags),
|
|
292
306
|
notificationTaps: resolveNotificationTapAddress(flags),
|
|
293
307
|
internal: resolveInternalAddress(hubPalette, flags),
|
|
294
|
-
publicEndpoint: resolvePublicEndpoint(hubPalette, flags)
|
|
308
|
+
publicEndpoint: resolvePublicEndpoint(hubPalette, flags, rememberedPublicEndpoint)
|
|
295
309
|
};
|
|
296
310
|
}
|
|
297
311
|
/**
|
|
@@ -566,7 +580,13 @@ var HubAddressRoleResolutionSchema = /* @__PURE__ */ z.object({
|
|
|
566
580
|
flagged: /* @__PURE__ */ z.string().nullable(),
|
|
567
581
|
/** The address in use, or null when nothing qualifies (never loopback). */
|
|
568
582
|
resolved: /* @__PURE__ */ z.string().nullable(),
|
|
569
|
-
|
|
583
|
+
/** `auto-remembered`: automatic, kept from an earlier tunnel pick while its row is absent. */
|
|
584
|
+
source: /* @__PURE__ */ z.enum([
|
|
585
|
+
"flagged",
|
|
586
|
+
"auto",
|
|
587
|
+
"auto-remembered",
|
|
588
|
+
"none"
|
|
589
|
+
])
|
|
570
590
|
});
|
|
571
591
|
var HubAppConnectionsResolutionSchema = /* @__PURE__ */ z.object({
|
|
572
592
|
/** The addresses flagged `appConnections`, or empty = automatic. */
|
|
@@ -1011,4 +1031,4 @@ var networkAccessCapability = {
|
|
|
1011
1031
|
vocabulary: { notOperatorFacing: NOT_A_DEVICE.NETWORK }
|
|
1012
1032
|
};
|
|
1013
1033
|
//#endregion
|
|
1014
|
-
export { AGENT_MDNS_TXT_KEYS as a, checkRoleAddress as c,
|
|
1034
|
+
export { pickAppLinkHub as _, AGENT_MDNS_TXT_KEYS as a, checkRoleAddress as c, resolveAppConnections as d, resolveHubAddressRoles as f, isAppLinkBase as g, CAMSTACK_APP_LINK_ORIGIN as h, AGENT_MDNS_SERVICE_TYPE as i, isDefaultAppConnectionEndpoint as l, validateCustomAddress as m, networkAccessCapability as n, HUB_MDNS_SERVICE_TYPE as o, resolveNotificationTapAddress as p, localNetworkCapability as r, HUB_MDNS_TXT_KEYS as s, NetworkTunnelStartedDataSchema as t, livePublicTunnelAddress as u };
|
package/system/dist/{notification-rules.cap-Drwz-A4n.js → notification-rules.cap-BJKUjizS.js}
RENAMED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
const require_streaming_shared = require("./streaming-shared-DQwFZOSi.js");
|
|
2
2
|
const require_capability_definition = require("./capability-definition-BEVd01Xj.js");
|
|
3
3
|
const require_tag = require("./tag-BxLazvVb.js");
|
|
4
|
-
const require_device_type = require("./device-type-
|
|
4
|
+
const require_device_type = require("./device-type-Cnc0NiSX.js");
|
|
5
5
|
const require_l10n = require("./l10n-CGMvp7NF.js");
|
|
6
|
+
const require_error_cap = require("./error.cap-BuKbL3Ac.js");
|
|
6
7
|
const require_mask_shape = require("./mask-shape-CmPA2fst.js");
|
|
7
8
|
let zod = require("zod");
|
|
8
9
|
//#region ../types/dist/esm/capabilities/notification-output.cap.mjs
|
|
@@ -391,10 +392,44 @@ var RenderedAsSchema = /* @__PURE__ */ zod.z.object({
|
|
|
391
392
|
truncated: /* @__PURE__ */ zod.z.boolean(),
|
|
392
393
|
dropped: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.string())
|
|
393
394
|
});
|
|
395
|
+
/** Why a notifier-group member got nothing: logged per member (D391) and shown by the test panel. */
|
|
396
|
+
var GroupSkipReasonSchema = /* @__PURE__ */ zod.z.enum([
|
|
397
|
+
"member-disabled",
|
|
398
|
+
"below-min-priority",
|
|
399
|
+
"schedule-inactive",
|
|
400
|
+
"alarm-state",
|
|
401
|
+
"alarm-unreadable",
|
|
402
|
+
"throttled",
|
|
403
|
+
"already-delivered",
|
|
404
|
+
"nested-group",
|
|
405
|
+
"unknown-target",
|
|
406
|
+
"target-disabled",
|
|
407
|
+
"content-filter",
|
|
408
|
+
"escalation-not-needed"
|
|
409
|
+
]);
|
|
410
|
+
/** What happened to one member of one group send: `reason` is set when skipped, `error` when failed. */
|
|
411
|
+
var GroupMemberOutcomeSchema = /* @__PURE__ */ zod.z.discriminatedUnion("status", [
|
|
412
|
+
/* @__PURE__ */ zod.z.object({
|
|
413
|
+
targetId: /* @__PURE__ */ zod.z.string(),
|
|
414
|
+
status: /* @__PURE__ */ zod.z.literal("sent")
|
|
415
|
+
}),
|
|
416
|
+
/* @__PURE__ */ zod.z.object({
|
|
417
|
+
targetId: /* @__PURE__ */ zod.z.string(),
|
|
418
|
+
status: /* @__PURE__ */ zod.z.literal("skipped"),
|
|
419
|
+
reason: GroupSkipReasonSchema
|
|
420
|
+
}),
|
|
421
|
+
/* @__PURE__ */ zod.z.object({
|
|
422
|
+
targetId: /* @__PURE__ */ zod.z.string(),
|
|
423
|
+
status: /* @__PURE__ */ zod.z.literal("failed"),
|
|
424
|
+
error: /* @__PURE__ */ zod.z.string()
|
|
425
|
+
})
|
|
426
|
+
]);
|
|
394
427
|
var SendResultSchema = /* @__PURE__ */ zod.z.object({
|
|
395
428
|
success: /* @__PURE__ */ zod.z.boolean(),
|
|
396
429
|
error: /* @__PURE__ */ zod.z.string().optional(),
|
|
397
|
-
renderedAs: /* @__PURE__ */ RenderedAsSchema.optional()
|
|
430
|
+
renderedAs: /* @__PURE__ */ RenderedAsSchema.optional(),
|
|
431
|
+
/** One entry per member of a notifier group; absent for any other provider. */
|
|
432
|
+
members: /* @__PURE__ */ zod.z.array(GroupMemberOutcomeSchema).optional()
|
|
398
433
|
});
|
|
399
434
|
/** Same shape as SendResult — kept as a distinct name for the test panel. */
|
|
400
435
|
var TestResultSchema = SendResultSchema;
|
|
@@ -1025,13 +1060,14 @@ var NcSystemEventConditionSchema = /* @__PURE__ */ zod.z.object({
|
|
|
1025
1060
|
* fault of the episode is in the list.
|
|
1026
1061
|
*/
|
|
1027
1062
|
faultCodes: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.string().min(1)).optional(),
|
|
1028
|
-
/**
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1063
|
+
/**
|
|
1064
|
+
* `device-attention-*` only: the fault TIERS this rule speaks about. Absent
|
|
1065
|
+
* or empty = every tier, a warning included. A critical device alert that is
|
|
1066
|
+
* not a fault counts as `error`.
|
|
1067
|
+
*/
|
|
1068
|
+
faultSeverities: /* @__PURE__ */ zod.z.array(require_error_cap.DeviceErrorSeveritySchema).optional(),
|
|
1069
|
+
/** `device-command` only: whether the call returned (`ok`) or threw (`failed`). A device's own change is not a command. */
|
|
1070
|
+
commandOutcomes: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.enum(["ok", "failed"])).min(1).optional(),
|
|
1035
1071
|
/** `device-command` only: who asked (`user`, `addon`, `action`, `scheduler`, `composition`, `node`). */
|
|
1036
1072
|
commandActorKinds: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.enum([
|
|
1037
1073
|
"user",
|