@camstack/server 1.2.945 → 1.2.947

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/package.json +9 -11
  3. package/system/dist/builtins/alerts/alerts.addon.js +2 -2
  4. package/system/dist/builtins/alerts/alerts.addon.mjs +2 -2
  5. package/system/dist/builtins/camera-grid/index.js +1 -1
  6. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  7. package/system/dist/builtins/composer/composer.addon.js +4 -4
  8. package/system/dist/builtins/composer/composer.addon.mjs +4 -4
  9. package/system/dist/builtins/core-blocks/core-blocks.addon.js +67 -22
  10. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +67 -22
  11. package/system/dist/builtins/core-blocks/timed-run/timed-run-service.d.ts +19 -2
  12. package/system/dist/builtins/device-manager/device-manager.addon.js +8 -7
  13. package/system/dist/builtins/device-manager/device-manager.addon.mjs +8 -7
  14. package/system/dist/builtins/local-auth/local-auth.addon.js +1 -1
  15. package/system/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  16. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  17. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  18. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +1 -1
  19. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -1
  20. package/system/dist/{compile-SpeAhaZ6.js → compile-BpAtMSvc.js} +1 -1
  21. package/system/dist/{compile-OBMHlqD-.mjs → compile-DPGk4aRg.mjs} +1 -1
  22. package/system/dist/{composition-sources-DubMf_ii.mjs → composition-sources-D5bWS3nC.mjs} +2 -2
  23. package/system/dist/{composition-sources-D1nPv7dJ.js → composition-sources-hmri4Cu4.js} +2 -2
  24. package/system/dist/{core-blocks.cap-DEYCvF9J.js → core-blocks.cap-9xvotd_3.js} +2 -2
  25. package/system/dist/{core-blocks.cap-sW5HLDlB.mjs → core-blocks.cap-C6REo0Dd.mjs} +2 -2
  26. package/system/dist/{device-kind-C37Ra2wd.mjs → device-kind-B6G_HfgC.mjs} +19 -2
  27. package/system/dist/{device-kind-FMhJg8uC.js → device-kind-B7ESmha7.js} +24 -1
  28. package/system/dist/file-host-worker.js +1 -1
  29. package/system/dist/file-host-worker.mjs +1 -1
  30. package/system/dist/index.js +3 -3
  31. package/system/dist/index.mjs +3 -3
  32. package/system/dist/{named-entity-store-O_hi1y_o.js → named-entity-store-CzJ28TsK.js} +2 -2
  33. package/system/dist/{named-entity-store-Cq2oVrN5.mjs → named-entity-store-DJxyweoS.mjs} +2 -2
  34. package/system/dist/{record-kinds-BV8Gcpsx.js → record-kinds-DP2-HG3W.js} +1 -1
  35. package/system/dist/{record-kinds-BD2xv4Pd.mjs → record-kinds-WosKAa-D.mjs} +1 -1
  36. package/system/dist/{rename-composition-block-C60O0P16.js → rename-composition-block--abG_xyW.js} +27 -35
  37. package/system/dist/{rename-composition-block-DcX3vkwS.mjs → rename-composition-block-kmkoIx0R.mjs} +27 -35
  38. package/system/dist/{user-management.cap-4IEUCSdL.mjs → user-management.cap-C3eqqVdz.mjs} +1 -1
  39. package/system/dist/{user-management.cap-DV9Jfsj3.js → user-management.cap-D4r3UKtG.js} +1 -1
  40. package/system/dist/{wal-maintenance-CkPfVApC.js → wal-maintenance-CZKvoKfx.js} +0 -0
  41. package/system/dist/{wal-maintenance-u84_1sVl.mjs → wal-maintenance-WLoThDXX.mjs} +0 -0
  42. package/system/package.json +1 -1
@@ -16,13 +16,13 @@ import { y as StorageMigrationLeaseInputSchema } from "./relocate-CoZZTui1.mjs";
16
16
  import { n as storageCapability, t as storageMigrationCapability } from "./storage-migration.cap-Ciw84XPm.mjs";
17
17
  import { a as TagsFieldSchema, d as IconKeySchema, n as TagIdsFieldSchema, r as TagNameSchema, t as TagColorIdSchema } from "./tag-DU8pm9Bi.mjs";
18
18
  import { r as MODEL_FORMATS, t as platformProbeCapability } from "./platform-probe.cap-DzZ7xUfS.mjs";
19
- import { a as authProviderCapability, c as TokenScopeSchema, i as deviceCredentialsCapability, r as ssoBridgeCapability, t as userManagementCapability } from "./user-management.cap-4IEUCSdL.mjs";
19
+ import { a as authProviderCapability, c as TokenScopeSchema, i as deviceCredentialsCapability, r as ssoBridgeCapability, t as userManagementCapability } from "./user-management.cap-C3eqqVdz.mjs";
20
20
  import { n as DeviceRole, r as DeviceType } from "./device-type-TUGqGmaI.mjs";
21
21
  import { d as AppLoginPathSchema } from "./device-certificate-Cddm4Idn.mjs";
22
- import { $t as EventVocabularyEntrySchema, A as MediaPlayerStatusSchema, At as TemplateEventValueSchema, B as isRemoteCustomKey, Dt as TemplateActionValueSchema, F as irSourceProblem, G as IrNativeFormatSchema, Gt as QuantityUnitError, H as isRemoteWidgetRole, I as remoteSourceSteps, Jt as paramMeta, K as IrTimingsSchema, Kt as convertQuantityInput, M as REMOTE_STEP_DELAY_MAX_MS, Mt as AutomationWhenSchema, N as RemoteSourceSchema, Nt as EVENT_LEAF_ID_RE, Ot as TemplateDeviceStateValueSchema, Qt as unwrapSchema, R as RemoteRoleSchema, V as isRemoteRole, W as IrNativeCodeSchema, Xt as enumerateItemArrayFields, Yt as paramMetaOf, Zt as enumerateSchemaFields, bt as AutomationRecipeSchema, c as coreBlocksCapability, dt as SchedulerConflictSchema, et as CompositionBlockStateSchema, gt as SchedulerStatusSchema, ht as SchedulerSchema, it as AutomationRunTraceSchema, j as mediaPlayerCapability, jt as TemplateTimeWindowValueSchema, kt as TemplateEntriesValueSchema, mt as SchedulerPreviewSchema, pt as SchedulerInputSchema, q as TransmitSettingsSchema, qt as isQuantityValue, rt as AutomationRunOutcomeSchema, tt as CompositionRunStatusSchema, ut as LOCAL_DATE_PATTERN, vt as ActionStepSchema, w as powerSourceCapability, yt as AutomationBranchStepSchema, z as customKeyOfRole } from "./core-blocks.cap-sW5HLDlB.mjs";
22
+ import { $t as EventVocabularyEntrySchema, A as MediaPlayerStatusSchema, At as TemplateEventValueSchema, B as isRemoteCustomKey, Dt as TemplateActionValueSchema, F as irSourceProblem, G as IrNativeFormatSchema, Gt as QuantityUnitError, H as isRemoteWidgetRole, I as remoteSourceSteps, Jt as paramMeta, K as IrTimingsSchema, Kt as convertQuantityInput, M as REMOTE_STEP_DELAY_MAX_MS, Mt as AutomationWhenSchema, N as RemoteSourceSchema, Nt as EVENT_LEAF_ID_RE, Ot as TemplateDeviceStateValueSchema, Qt as unwrapSchema, R as RemoteRoleSchema, V as isRemoteRole, W as IrNativeCodeSchema, Xt as enumerateItemArrayFields, Yt as paramMetaOf, Zt as enumerateSchemaFields, bt as AutomationRecipeSchema, c as coreBlocksCapability, dt as SchedulerConflictSchema, et as CompositionBlockStateSchema, gt as SchedulerStatusSchema, ht as SchedulerSchema, it as AutomationRunTraceSchema, j as mediaPlayerCapability, jt as TemplateTimeWindowValueSchema, kt as TemplateEntriesValueSchema, mt as SchedulerPreviewSchema, pt as SchedulerInputSchema, q as TransmitSettingsSchema, qt as isQuantityValue, rt as AutomationRunOutcomeSchema, tt as CompositionRunStatusSchema, ut as LOCAL_DATE_PATTERN, vt as ActionStepSchema, w as powerSourceCapability, yt as AutomationBranchStepSchema, z as customKeyOfRole } from "./core-blocks.cap-C6REo0Dd.mjs";
23
23
  import { a as findVocabAction, s as vocabCall } from "./action-index-DwPHO2nz.mjs";
24
24
  import { i as addonSettingsCapability, o as unitDimension, s as unitsForDimension } from "./addon-settings.cap-CHpmuaQG.mjs";
25
- import { F as COMPOSED_DEVICE_STABLE_ID_PREFIX, S as CompositionSchema, it as alertsCapability, v as COMPOSER_ADDON_ID } from "./compile-OBMHlqD-.mjs";
25
+ import { F as COMPOSED_DEVICE_STABLE_ID_PREFIX, S as CompositionSchema, it as alertsCapability, v as COMPOSER_ADDON_ID } from "./compile-DPGk4aRg.mjs";
26
26
  import { a as normalizeUnit } from "./source-info-DGB7SdB_.mjs";
27
27
  import { t } from "./l10n-Bu6aUvSY.mjs";
28
28
  import { t as addonPagesCapability } from "./addon-pages.cap-BLNN6ypr.mjs";
@@ -12494,42 +12494,34 @@ function switchRunLimitOf(deviceType, role) {
12494
12494
  * boot a deadline already past sends the off once (a failed off is logged, never
12495
12495
  * retried in a loop - D49); a future one is re-armed.
12496
12496
  *
12497
- * What a device may be run for, and for how long at most, is per device type
12498
- * and role ({@link timedRunLimitOf}): the maximum is a safety bound, not a preference,
12499
- * so a request above it is REFUSED with a typed reason, never clamped.
12497
+ * It is offered on EVERY device that has a `switch` (and on a pet fountain, which
12498
+ * switches its pump): the binding rule is `bindsWhenDeviceHas: ['switch']` (D1097).
12499
+ * What a device may be run for, and for how long at most, is the one table of
12500
+ * `switchRunLimitOf` by device type and role ({@link timedRunLimitOf}): the maximum
12501
+ * is a safety bound, not a preference, so a request above it is REFUSED with a
12502
+ * typed reason, never clamped.
12500
12503
  */
12501
12504
  var TimedRunUnitSchema = /* @__PURE__ */ z.enum(["s", "min"]);
12502
- /** A plug-in heater (switch + `switch-heater`): up to 3 h, in minutes. */
12503
- var TIMED_RUN_HEATER_LIMIT = {
12504
- actuator: "switch",
12505
- maxSeconds: SWITCH_RUN_HEATER_LIMIT.maxSeconds,
12506
- unit: "min",
12507
- quickRunDefault: SWITCH_RUN_HEATER_LIMIT.quickRunSeconds / 60
12508
- };
12509
- /** A pet fountain's pump: up to 5 min, in seconds. */
12510
- var TIMED_RUN_PET_FOUNTAIN_LIMIT = {
12511
- actuator: "pet-fountain",
12512
- maxSeconds: SWITCH_RUN_PET_FOUNTAIN_LIMIT.maxSeconds,
12513
- unit: "s",
12514
- quickRunDefault: SWITCH_RUN_PET_FOUNTAIN_LIMIT.quickRunSeconds
12515
- };
12516
12505
  /**
12517
- * The device types `timed-run` may be offered on. A `switch` is narrowed by
12518
- * role ({@link TIMED_RUN_DEVICE_ROLES}): only a plug-in heater runs on a timer.
12519
- */
12520
- var TIMED_RUN_DEVICE_TYPES = [DeviceType.Switch, DeviceType.PetFountain];
12521
- /** The roles that make a device of these types timed-run-able (D1033). */
12522
- var TIMED_RUN_DEVICE_ROLES = { [DeviceType.Switch]: [DeviceRole.SwitchHeater] };
12523
- /**
12524
- * The longest run of a device, by its type AND role (D1033): a `switch` is a
12525
- * heater only with role `switch-heater`, a pet fountain always is what it is.
12526
- * `null` - the device is not offered `timed-run`.
12506
+ * The timed-run limit of ANY device the cap is bound to: the numbers come from
12507
+ * the one table (`switchRunLimitOf`), the unit and the actuator from the type.
12508
+ * A pet fountain runs its pump and thinks in seconds; every other device is
12509
+ * switched through `switch.setState` and thinks in minutes.
12527
12510
  */
12528
12511
  function timedRunLimitOf(deviceType, role) {
12529
12512
  const limit = switchRunLimitOf(deviceType, role);
12530
- if (deviceType === DeviceType.PetFountain && limit === SWITCH_RUN_PET_FOUNTAIN_LIMIT) return TIMED_RUN_PET_FOUNTAIN_LIMIT;
12531
- if (deviceType === DeviceType.Switch && role === DeviceRole.SwitchHeater && limit === SWITCH_RUN_HEATER_LIMIT) return TIMED_RUN_HEATER_LIMIT;
12532
- return null;
12513
+ if (deviceType === DeviceType.PetFountain) return {
12514
+ actuator: "pet-fountain",
12515
+ maxSeconds: limit.maxSeconds,
12516
+ unit: "s",
12517
+ quickRunDefault: limit.quickRunSeconds
12518
+ };
12519
+ return {
12520
+ actuator: "switch",
12521
+ maxSeconds: limit.maxSeconds,
12522
+ unit: "min",
12523
+ quickRunDefault: limit.quickRunSeconds / 60
12524
+ };
12533
12525
  }
12534
12526
  var MS_PER_SECOND = 1e3;
12535
12527
  var MS_PER_MINUTE = 6e4;
@@ -12610,8 +12602,8 @@ var timedRunCapability = {
12610
12602
  mode: "singleton",
12611
12603
  kind: "wrapper",
12612
12604
  defaultActive: true,
12613
- deviceTypes: TIMED_RUN_DEVICE_TYPES,
12614
- deviceRoles: TIMED_RUN_DEVICE_ROLES,
12605
+ deviceTypes: [DeviceType.PetFountain],
12606
+ bindsWhenDeviceHas: ["switch"],
12615
12607
  deviceConfig: { ui: {
12616
12608
  kind: "derived-form",
12617
12609
  builderId: "timed-run",
@@ -1,7 +1,7 @@
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
3
  import { r as DeviceType } from "./device-type-TUGqGmaI.mjs";
4
- import { t as canonicalStoredDeviceType } from "./device-kind-C37Ra2wd.mjs";
4
+ import { t as canonicalStoredDeviceType } from "./device-kind-B6G_HfgC.mjs";
5
5
  import { a as DeviceCredentialSchema, o as DeviceCredentialStatusSchema, s as StartEnrollmentOutputSchema } from "./device-certificate-Cddm4Idn.mjs";
6
6
  import { n as RawSecretMigrationReportSchema, t as RawSecretMigrationInputSchema } from "./raw-secret-migration-iv88mLoc.mjs";
7
7
  import { z } from "zod";
@@ -1,7 +1,7 @@
1
1
  const require_capability_definition = require("./capability-definition-BEVd01Xj.js");
2
2
  const require_system_reasons = require("./system-reasons-Be_k1W8g.js");
3
3
  const require_device_type = require("./device-type-Cnc0NiSX.js");
4
- const require_device_kind = require("./device-kind-FMhJg8uC.js");
4
+ const require_device_kind = require("./device-kind-B7ESmha7.js");
5
5
  const require_device_certificate = require("./device-certificate-CguVACQO.js");
6
6
  const require_raw_secret_migration = require("./raw-secret-migration-DxuBFtvi.js");
7
7
  let zod = require("zod");
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/server",
3
- "version": "1.2.945",
3
+ "version": "1.2.947",
4
4
  "description": "CamStack builtins — shipped inside @camstack/server (generated, do not edit)",
5
5
  "license": "MIT",
6
6
  "camstack": {