@camstack/server 1.2.785 → 1.2.787

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 (109) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/api/core/cap-providers.js +106 -103
  3. package/dist/api/trpc/generated-cap-mounts.js +1 -10
  4. package/dist/api/trpc/generated-cap-routers.js +2289 -2375
  5. package/dist/core/addon/addon-registry.service.js +17 -13
  6. package/dist/core/addon/instances-of-cap.js +35 -0
  7. package/package.json +32 -13
  8. package/system/dist/addon-runner.js +11 -2
  9. package/system/dist/addon-runner.mjs +12 -3
  10. package/system/dist/addon-utils.mjs +1 -1
  11. package/system/dist/{agent-https-B7lqIrF1.js → agent-https--lvZp4PX.js} +1 -1
  12. package/system/dist/{agent-https-CACfLh65.mjs → agent-https-pSCzmbQd.mjs} +1 -1
  13. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  14. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
  15. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  16. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
  17. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  18. package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
  19. package/system/dist/builtins/autotrack/index.js +1 -1
  20. package/system/dist/builtins/autotrack/index.mjs +1 -1
  21. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  22. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
  23. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  24. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  25. package/system/dist/builtins/camera-grid/index.js +1 -1
  26. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  27. package/system/dist/builtins/composer/composed-device.d.ts +16 -0
  28. package/system/dist/builtins/composer/composer.addon.js +62 -13
  29. package/system/dist/builtins/composer/composer.addon.mjs +62 -13
  30. package/system/dist/builtins/console-logging/index.js +1 -1
  31. package/system/dist/builtins/console-logging/index.mjs +1 -1
  32. package/system/dist/builtins/core-blocks/actions-service.d.ts +16 -0
  33. package/system/dist/builtins/core-blocks/core-blocks.addon.js +235 -37
  34. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +235 -37
  35. package/system/dist/builtins/core-blocks/migrations/fountain-drink-drop.d.ts +21 -0
  36. package/system/dist/builtins/core-blocks/migrations/index.d.ts +1 -0
  37. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  38. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  39. package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
  40. package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  41. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  42. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  43. package/system/dist/builtins/keychain/index.js +4 -4
  44. package/system/dist/builtins/keychain/index.mjs +4 -4
  45. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  46. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  47. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  48. package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
  49. package/system/dist/builtins/local-network/local-network.addon.js +2 -2
  50. package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
  51. package/system/dist/builtins/loki-logging/index.js +2 -2
  52. package/system/dist/builtins/loki-logging/index.mjs +2 -2
  53. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  54. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
  55. package/system/dist/builtins/platform-probe/index.js +1 -1
  56. package/system/dist/builtins/platform-probe/index.mjs +10 -10
  57. package/system/dist/builtins/record-entries/index.js +1 -1
  58. package/system/dist/builtins/record-entries/index.mjs +1 -1
  59. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  60. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  61. package/system/dist/builtins/snapshot/index.js +1 -1
  62. package/system/dist/builtins/snapshot/index.mjs +1 -1
  63. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  64. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
  65. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  66. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  67. package/system/dist/builtins/sqlite-storage/integration-record-kinds.d.ts +0 -1
  68. package/system/dist/builtins/sqlite-storage/integration-registry.d.ts +2 -4
  69. package/system/dist/builtins/sqlite-storage/migrations/migration-types.d.ts +6 -1
  70. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +7 -4
  71. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +7 -4
  72. package/system/dist/builtins/storage-orchestrator/drain-state-store.d.ts +4 -8
  73. package/system/dist/builtins/storage-orchestrator/location-store.d.ts +9 -26
  74. package/system/dist/builtins/storage-orchestrator/record-kinds.d.ts +0 -1
  75. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +35 -407
  76. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +36 -407
  77. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  78. package/system/dist/builtins/system-config/system-config.addon.mjs +285 -285
  79. package/system/dist/builtins/winston-logging/index.js +1 -1
  80. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  81. package/system/dist/{capture-engine-n5mJUHzf.js → capture-engine-CTFHb-UX.js} +1 -1
  82. package/system/dist/{capture-engine-Dw82x5UW.mjs → capture-engine-N1-UaQr0.mjs} +1 -1
  83. package/system/dist/{composition-sources-D-bbLadz.mjs → composition-sources-Qe3MRI1x.mjs} +1 -1
  84. package/system/dist/{composition-sources-Cdow6PNn.js → composition-sources-Yjz-b6-8.js} +1 -1
  85. package/system/dist/{constants-Dmc-T4Zw.js → constants-7gannWcO.js} +1 -1
  86. package/system/dist/{constants-C6UsfDdP.mjs → constants-lWMAnwmj.mjs} +1 -1
  87. package/system/dist/{coral-accelerators-DBlgWB8k.mjs → coral-accelerators-BW3OcrLD.mjs} +6 -6
  88. package/system/dist/{custom-action-registry-B9zFBNVa.mjs → custom-action-registry-N7flBDwT.mjs} +37 -37
  89. package/system/dist/{device-ca-OQqtK7Yy.mjs → device-ca-8lpRo9Ss.mjs} +1 -1
  90. package/system/dist/{device-ca-v8lGdWVk.js → device-ca-HGx3Pwb6.js} +1 -1
  91. package/system/dist/{dist-CRWinpyX.mjs → dist-DgZrPBbX.mjs} +1865 -1818
  92. package/system/dist/{dist-1X5ccoX2.js → dist-j7uy5oG9.js} +1876 -1775
  93. package/system/dist/file-host-worker.js +1 -1
  94. package/system/dist/file-host-worker.mjs +1 -1
  95. package/system/dist/{hub-mdns-ciao-BQqm5eSM.mjs → hub-mdns-ciao-BM3peDu1.mjs} +2 -2
  96. package/system/dist/{hub-mdns-ciao-hBZgojNT.js → hub-mdns-ciao-BUKHJL6N.js} +2 -2
  97. package/system/dist/index.d.ts +2 -2
  98. package/system/dist/index.js +51 -222
  99. package/system/dist/index.mjs +265 -434
  100. package/system/dist/kernel/moleculer/migration-api-facade.d.ts +2 -0
  101. package/system/dist/kernel/transport/local-child-client.d.ts +9 -0
  102. package/system/dist/{legacy-integration-rows-door-BUjw8YoW.js → legacy-integration-rows-door-D51X6Fdr.js} +1 -1
  103. package/system/dist/{legacy-integration-rows-door-B7bwfRev.mjs → legacy-integration-rows-door-DIm4Q3Jj.mjs} +1 -1
  104. package/system/dist/migrations/hub/2026-11-06-drop-legacy-integrations-and-storage-locations.d.ts +12 -0
  105. package/system/dist/{restore-archive-D9vM-Kzb.js → restore-archive-8jRnSzmw.js} +1 -1
  106. package/system/dist/{restore-archive-TST7tvBk.mjs → restore-archive-D-Wmp8OK.mjs} +150 -150
  107. package/system/dist/{wal-maintenance-C7dJSaPS.mjs → wal-maintenance-CBnqPn4u.mjs} +0 -0
  108. package/system/dist/{wal-maintenance-wfVwXxO4.js → wal-maintenance-D0FMnpba.js} +0 -0
  109. package/system/package.json +1 -1
@@ -1,7 +1,7 @@
1
- import { $ as EMPTY_REMOTE_CONFIG, $i as resolveCoreBlockEntry, Ao as BaseAddon, C as CORE_BLOCK_ADDON_PREFIX, Ci as normalizeCoreBlockWrite, Cn as buildActionSteps, D as ConditionMirror, Er as fanPresetsCapability, Fa as timedRunLimitOf, Ft as QuantityUnitError, Gn as coreBlockIdFromAddonId, Gr as isInternalActionId, Hi as proposeRunningThreshold, Hn as compositionSourceRefs, Ht as RemoteConfigSchema, I as DEFAULT_HOLD_OVERRIDE, Ia as timedRunSeconds, Ii as powerSourceCapability, In as collectWhenMirrorSources, Ir as internalActionId, Ji as remoteLayoutComponentsCapability, K as DeclaredDevices, Ka as vocabActionIdFor, Kn as coreBlockSourceKind, Kt as SchedulerError, Li as powerSourceLinkOfComposition, Lt as REMOTE_MEDIA_COMMANDS, Na as templateCapability, Ns as hydrateSchema, O as ControlStatusSchema, Oi as occurrenceOn, Pa as timedRunCapability, Pi as planComposition, Pn as checkTemplatePayload, Q as EMPTY_REMOTE_ASSUMED_STATE, Qa as DAY_MS, S as CORE_BLOCKS_ADDON_ID, Si as normalizeCapStep, Ss as defineAddonMigrations, Ts as defineRecordKinds, Un as coreBlockAddonId, Us as isSecretRefOwnedBy, Ut as RunningStateStatusSchema, Va as validateSchedulerInput, Vs as isSecretMarker, Vt as RemoteAssumedStateSchema, Wn as coreBlockComposition, Xi as resolveActionVariables, Xn as customKeyOfRole, Xr as kebabToCamel, Ya as zoneOnlySite, Yi as replacedFieldKeys, Z as EMPTY_AUTOMATION_STATE, Za as CompositionSchema, Zn as customRole, _c as EventCategory$1, _o as helperMembers, ac as secretTreeFromSchema, ar as describeComposableCaps, ba as siteFor, bi as nextOccurrence, c as ActionStepSchema, cn as actionsCapability, da as schedulersCapability, ea as resolveCoreBlockFiles, et as FAN_CAPTURE_FIELDS, f as AutomationStateDocSchema, fo as compositionSourceKey, gc as errMsg$1, gn as appendTrace, hc as DeviceType$1, it as FanPresetSchema, jn as capUnitResolver, jt as PowerSourceInfoSchema, k as CoreBlockSchema, l as ActionTargetResolver, la as runSteps, ln as addonIdOfActionId, mt as INTERNAL_ACTION_PREFIX, nc as resolveSecretMarkers, ni as localDateOf, nn as TemplateKindSchema, nt as FanControlStatusSchema, o as ALL_CAPABILITY_DEFINITIONS, oi as lockDoorLinkOfComposition, on as actionEffect, p as BUILTIN_REMOTE_COMPONENTS, pt as IDLE_ACTION_STATUS, qa as weekdayOfLocalDate, qi as remoteCapability, qn as coreBlocksCapability, qt as SchedulerSchema, ro as HelperMemberSchema, s as ActionError, sa as resolveStepArgs, sn as actionSourceCapability, so as composedDeviceRef, t as ACTION_TARGET_INVALIDATION_EVENTS, tn as SwitchStatusSchema, u as ActionVariableSchema, uc as transformSecretWrite, vo as historyRetentionFromSettings, vs as collectSecretMarkerRefs, wi as normalizeStepTargets, wn as buildCapabilityLookup, wt as MediaPlayerStatusSchema, x as COMPOSER_RUNNER_ID, xi as normalizeActionUnits, yr as evaluateWhenTree, za as validateComposition, zi as problemsBlockSave, zn as compileScalarOverride } from "../../dist-CRWinpyX.mjs";
1
+ import { $ as EMPTY_AUTOMATION_STATE, $a as vocabActionIdFor, A as ControlStatusSchema, As as defineAddonMigrations, Ba as templateCapability, Bn as collectWhenMirrorSources, C as CORE_BLOCKS_ADDON_ID, Da as siteFor, Di as normalizeCapStep, Dn as buildActionSteps, Ec as EventCategory$1, Ei as normalizeActionUnits, Es as collectSecretMarkerRefs, Et as MediaPlayerStatusSchema, Fn as capUnitResolver, Ft as PowerSourceInfoSchema, Gt as RemoteConfigSchema, Ha as timedRunLimitOf, J as DeclaredDevices, Ja as validateSchedulerInput, Jn as coreBlockAddonId, Ka as validateComposition, Ki as problemsBlockSave, Kn as compositionSourceRefs, Kt as RunningStateStatusSchema, Lo as BaseAddon, Ni as occurrenceOn, Ns as defineRecordKinds, O as ConditionMirror, Oi as normalizeCoreBlockWrite, On as buildCapabilityLookup, Qn as coreBlocksCapability, Qs as isSecretRefOwnedBy, R as DEFAULT_HOLD_OVERRIDE, Rn as checkTemplatePayload, S as COMPOSER_RUNNER_ID, Tc as errMsg$1, Ti as nextOccurrence, To as historyRetentionFromSettings, Ua as timedRunSeconds, Ui as powerSourceCapability, Un as compileScalarOverride, Va as timedRunCapability, Vi as planComposition, Vr as internalActionId, Vs as hydrateSchema, Vt as REMOTE_MEDIA_COMMANDS, Wi as powerSourceLinkOfComposition, Wt as RemoteAssumedStateSchema, Xn as coreBlockIdFromAddonId, Xr as isInternalActionId, Xs as isSecretMarker, Xt as SchedulerSchema, Yi as proposeRunningThreshold, Yn as coreBlockComposition, Yt as SchedulerError, Zn as coreBlockSourceKind, an as TemplateKindSchema, ao as DAY_MS, bn as appendTrace, c as ActionError, d as ActionVariableSchema, dc as resolveSecretMarkers, di as lockDoorLinkOfComposition, dn as actionWaitTotalMs, ea as remoteCapability, eo as weekdayOfLocalDate, et as EMPTY_REMOTE_ASSUMED_STATE, fn as actionsCapability, ga as runSteps, gt as INTERNAL_ACTION_PREFIX, ht as IDLE_ACTION_STATUS, in as SwitchStatusSchema, io as CompositionSchema, it as FanControlStatusSchema, j as CoreBlockSchema, jr as fanPresetsCapability, ki as normalizeStepTargets, l as ActionStepSchema, ln as actionEffect, m as BUILTIN_REMOTE_COMPONENTS, ma as resolveStepArgs, mc as secretTreeFromSchema, mo as composedDeviceRef, n as ACTION_TARGET_INVALIDATION_EVENTS, na as replacedFieldKeys, no as zoneOnlySite, nr as customRole, nt as FAN_CAPTURE_FIELDS, oa as resolveCoreBlockEntry, ot as FanPresetSchema, p as AutomationStateDocSchema, pn as addonIdOfActionId, ra as resolveActionVariables, s as ALL_CAPABILITY_DEFINITIONS, sa as resolveCoreBlockFiles, si as localDateOf, ta as remoteLayoutComponentsCapability, ti as kebabToCamel, tr as customKeyOfRole, tt as EMPTY_REMOTE_CONFIG, u as ActionTargetResolver, un as actionSourceCapability, uo as HelperMemberSchema, ur as describeComposableCaps, va as schedulersCapability, w as CORE_BLOCK_ADDON_PREFIX, wc as DeviceType$1, wo as helperMembers, wr as evaluateWhenTree, yc as transformSecretWrite, yo as compositionSourceKey, zt as QuantityUnitError } from "../../dist-DgZrPBbX.mjs";
2
2
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
3
- import { i as parseDeviceStateChanged, t as describeCompositionSources } from "../../composition-sources-D-bbLadz.mjs";
4
- import { i as capSeriesKey } from "../../capture-engine-Dw82x5UW.mjs";
3
+ import { i as parseDeviceStateChanged, t as describeCompositionSources } from "../../composition-sources-Qe3MRI1x.mjs";
4
+ import { i as capSeriesKey } from "../../capture-engine-N1-UaQr0.mjs";
5
5
  import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
6
6
  import { n as unwrapStoredValue, t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
7
7
  import { createRequire } from "node:module";
@@ -1861,6 +1861,110 @@ var CoreBlockStore = class CoreBlockStore {
1861
1861
  }
1862
1862
  };
1863
1863
  //#endregion
1864
+ //#region src/builtins/core-blocks/migrations/fountain-drink-drop.ts
1865
+ /**
1866
+ * The drink counters leave the `pet-fountain` feature of a stored composition.
1867
+ *
1868
+ * The cap no longer has `lastDrink`, `currentHourDrink`, `last24hDrink` or
1869
+ * `todayDrink`, nor the `resetDailyConsumption` method (a fountain's tank is now a
1870
+ * `water` consumable derived from `waterLevel`). A fountain composed by the
1871
+ * previous preset still names them as fields and forwards the reset to a button,
1872
+ * which no longer validates. This removes the four fields and the one forward from
1873
+ * the `pet-fountain` feature and nothing else: the pump forward, the other fields,
1874
+ * the other features, the name and the enabled flag are kept.
1875
+ *
1876
+ * Only compositions that BUILD a pet fountain are touched. A row that does not
1877
+ * parse, a code block, a customization of an existing device, and a fountain
1878
+ * already without the counters are left exactly as they are, so a rerun edits
1879
+ * nothing. The block's `updatedAt` moves (it is the version an editor's
1880
+ * `expectedUpdatedAt` is checked against).
1881
+ */
1882
+ var FOUNTAIN_DRINK_DROP_ID = "core-blocks/2026-11-06-fountain-drink-drop";
1883
+ var DROPPED_FIELDS = [
1884
+ "lastDrink",
1885
+ "currentHourDrink",
1886
+ "last24hDrink",
1887
+ "todayDrink"
1888
+ ];
1889
+ var DROPPED_COMMANDS = ["resetDailyConsumption"];
1890
+ function without$1(record, keys) {
1891
+ return Object.fromEntries(Object.entries(record).filter(([key]) => !keys.includes(key)));
1892
+ }
1893
+ /** The composition without the counters, or null when this one has none. */
1894
+ function dropCounters(composition) {
1895
+ if (composition.target.kind !== "new" || composition.target.type !== DeviceType$1.PetFountain) return null;
1896
+ let changed = false;
1897
+ const features = composition.features.map((feature) => {
1898
+ if (feature.kind !== "fields" || feature.cap !== "pet-fountain") return feature;
1899
+ const commands = feature.commands ?? {};
1900
+ if (!(DROPPED_FIELDS.some((key) => key in feature.fields) || DROPPED_COMMANDS.some((key) => key in commands))) return feature;
1901
+ changed = true;
1902
+ return {
1903
+ ...feature,
1904
+ fields: without$1(feature.fields, DROPPED_FIELDS),
1905
+ commands: without$1(commands, DROPPED_COMMANDS)
1906
+ };
1907
+ });
1908
+ return changed ? {
1909
+ ...composition,
1910
+ features
1911
+ } : null;
1912
+ }
1913
+ function dropFromBlock(block) {
1914
+ const source = block.source;
1915
+ if (source === void 0 || source.kind !== "composition") return null;
1916
+ const composition = dropCounters(source.composition);
1917
+ if (composition === null) return null;
1918
+ return {
1919
+ ...block,
1920
+ source: {
1921
+ kind: "composition",
1922
+ composition
1923
+ }
1924
+ };
1925
+ }
1926
+ function rewriteOf$2(row, ports) {
1927
+ const parsed = CoreBlockSchema.safeParse(row.data.block);
1928
+ if (!parsed.success) return null;
1929
+ const dropped = dropFromBlock(parsed.data);
1930
+ if (dropped === null) return null;
1931
+ const updatedAt = Math.max(parsed.data.updatedAt + 1, ports.now());
1932
+ const next = CoreBlockSchema.safeParse({
1933
+ ...dropped,
1934
+ updatedAt
1935
+ });
1936
+ if (!next.success) {
1937
+ ports.warn("core block left as it is: the fountain without drink counters does not validate", {
1938
+ blockId: row.id,
1939
+ error: next.error.message
1940
+ });
1941
+ return null;
1942
+ }
1943
+ return {
1944
+ row,
1945
+ data: {
1946
+ ...row.data,
1947
+ updatedAt,
1948
+ block: next.data
1949
+ }
1950
+ };
1951
+ }
1952
+ async function dropFountainDrinkCounters(ports) {
1953
+ const rewrites = (await ports.listBlockRows()).flatMap((row) => {
1954
+ const rewrite = rewriteOf$2(row, ports);
1955
+ return rewrite === null ? [] : [rewrite];
1956
+ });
1957
+ if (rewrites.length === 0) return {
1958
+ outcome: "already-done",
1959
+ summary: { blocks: 0 }
1960
+ };
1961
+ for (const { row, data } of rewrites) await ports.replaceBlockRow(row.id, data, row.rev);
1962
+ return {
1963
+ outcome: "done",
1964
+ summary: { blocks: rewrites.length }
1965
+ };
1966
+ }
1967
+ //#endregion
1864
1968
  //#region src/builtins/core-blocks/migrations/helper-to-customize.ts
1865
1969
  /**
1866
1970
  * The appliance and heater helper compositions become plain Customize
@@ -2314,37 +2418,56 @@ async function splitPumpCycleFromFountain(ports) {
2314
2418
  //#endregion
2315
2419
  //#region src/builtins/core-blocks/migrations/index.ts
2316
2420
  /** The `core-blocks` catalogue (D987): offered to the engine when the hub-resident addon initialises. */
2317
- var ADDON_MIGRATIONS = [{
2318
- meta: {
2319
- id: PUMP_CYCLE_SPLIT_ID,
2320
- owner: "core-blocks",
2321
- level: "addon-state",
2322
- seq: 1,
2323
- dependsOn: [],
2324
- store: "settings",
2325
- scope: "cluster",
2326
- onFailure: "block-owner",
2327
- bodyKind: "procedure",
2328
- description: "Move the pump duty cycle of a stored pet-fountain composition from the pet-fountain feature to a pump-cycle feature",
2329
- fixtureMark: "the block createdBy and name, which the migration does not know"
2421
+ var ADDON_MIGRATIONS = [
2422
+ {
2423
+ meta: {
2424
+ id: PUMP_CYCLE_SPLIT_ID,
2425
+ owner: "core-blocks",
2426
+ level: "addon-state",
2427
+ seq: 1,
2428
+ dependsOn: [],
2429
+ store: "settings",
2430
+ scope: "cluster",
2431
+ onFailure: "block-owner",
2432
+ bodyKind: "procedure",
2433
+ description: "Move the pump duty cycle of a stored pet-fountain composition from the pet-fountain feature to a pump-cycle feature",
2434
+ fixtureMark: "the block createdBy and name, which the migration does not know"
2435
+ },
2436
+ procedure: splitPumpCycleFromFountain
2330
2437
  },
2331
- procedure: splitPumpCycleFromFountain
2332
- }, {
2333
- meta: {
2334
- id: HELPER_TO_CUSTOMIZE_ID,
2335
- owner: "core-blocks",
2336
- level: "addon-state",
2337
- seq: 2,
2338
- dependsOn: [],
2339
- store: "settings",
2340
- scope: "cluster",
2341
- onFailure: "block-owner",
2342
- bodyKind: "procedure",
2343
- description: "Rewrite each stored appliance and heater helper composition into plain Customize features (running-state, power-meter, power-source) with the same threshold, dwells and plugs, and drop the helper spec",
2344
- fixtureMark: "the marked threshold, start and stop dwell, plug and offSeconds of each helper"
2438
+ {
2439
+ meta: {
2440
+ id: HELPER_TO_CUSTOMIZE_ID,
2441
+ owner: "core-blocks",
2442
+ level: "addon-state",
2443
+ seq: 2,
2444
+ dependsOn: [],
2445
+ store: "settings",
2446
+ scope: "cluster",
2447
+ onFailure: "block-owner",
2448
+ bodyKind: "procedure",
2449
+ description: "Rewrite each stored appliance and heater helper composition into plain Customize features (running-state, power-meter, power-source) with the same threshold, dwells and plugs, and drop the helper spec",
2450
+ fixtureMark: "the marked threshold, start and stop dwell, plug and offSeconds of each helper"
2451
+ },
2452
+ procedure: rewriteHelpersToCustomize
2345
2453
  },
2346
- procedure: rewriteHelpersToCustomize
2347
- }];
2454
+ {
2455
+ meta: {
2456
+ id: FOUNTAIN_DRINK_DROP_ID,
2457
+ owner: "core-blocks",
2458
+ level: "addon-state",
2459
+ seq: 3,
2460
+ dependsOn: [],
2461
+ store: "settings",
2462
+ scope: "cluster",
2463
+ onFailure: "block-owner",
2464
+ bodyKind: "procedure",
2465
+ description: "Remove the drink counters and the reset-daily-count forward from the pet-fountain feature of each stored fountain composition",
2466
+ fixtureMark: "the block createdBy and name, which the migration does not know"
2467
+ },
2468
+ procedure: dropFountainDrinkCounters
2469
+ }
2470
+ ];
2348
2471
  //#endregion
2349
2472
  //#region src/builtins/core-blocks/runs-ledger.ts
2350
2473
  /**
@@ -2508,9 +2631,13 @@ function isSkip(trace) {
2508
2631
  */
2509
2632
  /** The ring an Action keeps. */
2510
2633
  var ACTION_TRACE_KEEP = 20;
2634
+ /** After a timeout stops a run, the call is answered once the run ended or this long passed. */
2635
+ var STOP_GRACE_MS = 1e4;
2511
2636
  /** A run in flight: the stop flag and whatever sleeps it can wake. */
2512
2637
  var RunToken = class {
2513
2638
  aborted = false;
2639
+ /** Set by the ceiling, so a stopped run is told apart from one the operator stopped. */
2640
+ timedOut = false;
2514
2641
  wakers = /* @__PURE__ */ new Set();
2515
2642
  sleep(ms) {
2516
2643
  return new Promise((resolve) => {
@@ -2531,6 +2658,9 @@ var RunToken = class {
2531
2658
  function errorMessage$2(err) {
2532
2659
  return err instanceof Error ? err.message : String(err);
2533
2660
  }
2661
+ function spanLabel(ms) {
2662
+ return ms < 12e4 ? `${Math.round(ms / 1e3)} seconds` : `${Math.round(ms / 6e4)} minutes`;
2663
+ }
2534
2664
  var ActionsService = class {
2535
2665
  store;
2536
2666
  ledger;
@@ -2543,6 +2673,8 @@ var ActionsService = class {
2543
2673
  units;
2544
2674
  targets;
2545
2675
  running = /* @__PURE__ */ new Map();
2676
+ maxRunMs;
2677
+ stopGraceMs;
2546
2678
  constructor(deps) {
2547
2679
  this.store = deps.store;
2548
2680
  this.ledger = deps.ledger;
@@ -2552,6 +2684,8 @@ var ActionsService = class {
2552
2684
  this.logger = deps.logger;
2553
2685
  this.now = deps.now ?? Date.now;
2554
2686
  this.newRunId = deps.newRunId ?? randomUUID;
2687
+ this.maxRunMs = deps.maxRunMs ?? 36e5;
2688
+ this.stopGraceMs = deps.stopGraceMs ?? STOP_GRACE_MS;
2555
2689
  this.units = deps.units ?? capUnitResolver(ALL_CAPABILITY_DEFINITIONS);
2556
2690
  this.targets = new ActionTargetResolver(deps.directory, deps.logger);
2557
2691
  }
@@ -2710,8 +2844,9 @@ var ActionsService = class {
2710
2844
  let outcome = "failed";
2711
2845
  let steps = [];
2712
2846
  let message;
2847
+ const deadline = this.armDeadline(entry.id, runId, token);
2713
2848
  try {
2714
- const result = await runSteps(this.runnableFor(entry, values, token), {
2849
+ const running = runSteps(this.runnableFor(entry, values, token), {
2715
2850
  pathPrefix: "steps",
2716
2851
  isAborted: () => token.aborted,
2717
2852
  abortReason: "the run was stopped",
@@ -2728,9 +2863,16 @@ var ActionsService = class {
2728
2863
  });
2729
2864
  }
2730
2865
  });
2731
- steps = result.steps;
2732
- outcome = result.failed ? "failed" : result.aborted ? "aborted" : "ran";
2733
- message = result.steps.find((s) => s.outcome === "error")?.message;
2866
+ const result = await Promise.race([running, deadline.expired]);
2867
+ if (result !== "expired") {
2868
+ steps = result.steps;
2869
+ outcome = result.failed ? "failed" : result.aborted ? "aborted" : "ran";
2870
+ message = result.steps.find((s) => s.outcome === "error")?.message;
2871
+ }
2872
+ if (token.timedOut) {
2873
+ outcome = "failed";
2874
+ message = this.timeoutMessage();
2875
+ }
2734
2876
  } catch (err) {
2735
2877
  message = errorMessage$2(err);
2736
2878
  this.logger.error("action run crashed", { meta: {
@@ -2738,6 +2880,8 @@ var ActionsService = class {
2738
2880
  runId,
2739
2881
  error: message
2740
2882
  } });
2883
+ } finally {
2884
+ deadline.disarm();
2741
2885
  }
2742
2886
  const endedAt = this.now();
2743
2887
  const trace = {
@@ -2763,10 +2907,49 @@ var ActionsService = class {
2763
2907
  });
2764
2908
  return {
2765
2909
  runId,
2766
- outcome,
2910
+ outcome: token.timedOut ? "timed-out" : outcome,
2767
2911
  ...message === void 0 ? {} : { message }
2768
2912
  };
2769
2913
  }
2914
+ timeoutMessage() {
2915
+ return `the run reached the ${spanLabel(this.maxRunMs)} limit and was stopped`;
2916
+ }
2917
+ /**
2918
+ * The run's ceiling. At `maxRunMs` the run is stopped through the same path
2919
+ * an operator's stop takes; a run that does not wind down within the grace
2920
+ * (an addon script that ignores the stop) is answered `expired` anyway, so a
2921
+ * waiting caller is never held past the limit.
2922
+ */
2923
+ armDeadline(actionId, runId, token) {
2924
+ let grace = null;
2925
+ let expire = () => void 0;
2926
+ const expired = new Promise((resolve) => {
2927
+ expire = resolve;
2928
+ });
2929
+ const limit = setTimeout(() => {
2930
+ token.timedOut = true;
2931
+ this.logger.error("action run reached its time limit — stopping it", { meta: {
2932
+ actionId,
2933
+ runId,
2934
+ maxRunMs: this.maxRunMs
2935
+ } });
2936
+ this.stop({ actionId }).catch((err) => {
2937
+ this.logger.warn("stopping a timed-out action run failed", { meta: {
2938
+ actionId,
2939
+ runId,
2940
+ error: errorMessage$2(err)
2941
+ } });
2942
+ });
2943
+ grace = setTimeout(() => expire("expired"), this.stopGraceMs);
2944
+ }, this.maxRunMs);
2945
+ return {
2946
+ expired,
2947
+ disarm: () => {
2948
+ clearTimeout(limit);
2949
+ if (grace !== null) clearTimeout(grace);
2950
+ }
2951
+ };
2952
+ }
2770
2953
  runnableFor(entry, values, token) {
2771
2954
  if (entry.source === "internal") return buildActionSteps(entry.steps ?? [], values, {
2772
2955
  invokeCap: (call) => this.invokeCap(call),
@@ -2816,6 +2999,7 @@ var ActionsService = class {
2816
2999
  });
2817
3000
  }
2818
3001
  async create(input) {
3002
+ this.requireWithinCeiling(input.action.steps, input.action.name);
2819
3003
  const { steps, warnings } = this.normalizeSteps(input.action.steps, input.action.name);
2820
3004
  const action = await this.store.create({
2821
3005
  ...input.action,
@@ -2835,6 +3019,7 @@ var ActionsService = class {
2835
3019
  const existing = await this.store.get(input.actionId);
2836
3020
  if (existing === null) throw new ActionError("not-found", `no action "${input.actionId}"`);
2837
3021
  const patch = input.action;
3022
+ if (patch.steps !== void 0) this.requireWithinCeiling(patch.steps, patch.name ?? existing.name);
2838
3023
  const { steps, warnings } = this.normalizeSteps(patch.steps ?? existing.steps ?? [], patch.name ?? existing.name);
2839
3024
  const action = await this.store.update(input.actionId, {
2840
3025
  name: patch.name ?? existing.name,
@@ -2847,6 +3032,18 @@ var ActionsService = class {
2847
3032
  ...warnings.length > 0 ? { warnings } : {}
2848
3033
  };
2849
3034
  }
3035
+ /** An action whose waits alone exceed the run ceiling could never finish: refuse the save. */
3036
+ requireWithinCeiling(steps, actionName) {
3037
+ const total = actionWaitTotalMs(steps);
3038
+ if (total <= this.maxRunMs) return;
3039
+ const message = `the wait steps add up to ${spanLabel(total)}; an action may run at most ${spanLabel(this.maxRunMs)}`;
3040
+ this.logger.warn("action save refused — it could never finish within the run limit", { meta: {
3041
+ action: actionName,
3042
+ waitTotalMs: total,
3043
+ maxRunMs: this.maxRunMs
3044
+ } });
3045
+ throw new ActionError("invalid-steps", message);
3046
+ }
2850
3047
  /**
2851
3048
  * D972: a quantity arg sent as `{ value, unit }` is converted to the unit the
2852
3049
  * method declares; a unit that cannot be that quantity refuses the save; a
@@ -5494,6 +5691,7 @@ var RemoteService = class {
5494
5691
  duration: null,
5495
5692
  shuffle: null,
5496
5693
  repeat: null,
5694
+ positionUpdatedAt: null,
5497
5695
  lastChangedAt: input.changedAt
5498
5696
  };
5499
5697
  }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The drink counters leave the `pet-fountain` feature of a stored composition.
3
+ *
4
+ * The cap no longer has `lastDrink`, `currentHourDrink`, `last24hDrink` or
5
+ * `todayDrink`, nor the `resetDailyConsumption` method (a fountain's tank is now a
6
+ * `water` consumable derived from `waterLevel`). A fountain composed by the
7
+ * previous preset still names them as fields and forwards the reset to a button,
8
+ * which no longer validates. This removes the four fields and the one forward from
9
+ * the `pet-fountain` feature and nothing else: the pump forward, the other fields,
10
+ * the other features, the name and the enabled flag are kept.
11
+ *
12
+ * Only compositions that BUILD a pet fountain are touched. A row that does not
13
+ * parse, a code block, a customization of an existing device, and a fountain
14
+ * already without the counters are left exactly as they are, so a rerun edits
15
+ * nothing. The block's `updatedAt` moves (it is the version an editor's
16
+ * `expectedUpdatedAt` is checked against).
17
+ */
18
+ import { type MigrationProcedureResult } from "@camstack/types";
19
+ import type { CoreBlocksMigrationPorts } from "./pump-cycle-split.js";
20
+ export declare const FOUNTAIN_DRINK_DROP_ID = "core-blocks/2026-11-06-fountain-drink-drop";
21
+ export declare function dropFountainDrinkCounters(ports: CoreBlocksMigrationPorts): Promise<MigrationProcedureResult>;
@@ -1,5 +1,6 @@
1
1
  import type { AddonMigration } from "@camstack/types";
2
2
  import { type CoreBlocksMigrationPorts } from "./pump-cycle-split.js";
3
+ export { FOUNTAIN_DRINK_DROP_ID } from "./fountain-drink-drop.js";
3
4
  export { HELPER_TO_CUSTOMIZE_ID } from "./helper-to-customize.js";
4
5
  export { coreBlocksMigrationPorts, PUMP_CYCLE_SPLIT_ID, type CoreBlocksMigrationPorts, type StoredBlockRow } from "./pump-cycle-split.js";
5
6
  /** The `core-blocks` catalogue (D987): offered to the engine when the hub-resident addon initialises. */
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-1X5ccoX2.js");
7
- const require_capture_engine = require("../../capture-engine-n5mJUHzf.js");
6
+ const require_dist = require("../../dist-j7uy5oG9.js");
7
+ const require_capture_engine = require("../../capture-engine-CTFHb-UX.js");
8
8
  const require_retention = require("../../retention-BNONb5X_.js");
9
9
  let node_crypto = require("node:crypto");
10
10
  //#region src/builtins/device-history/capture/point-writer.ts
@@ -1,5 +1,5 @@
1
- import { Ao as BaseAddon, Ds as emitReadiness, Ms as historyUnitFor, Rs as isReadingQuantity, Ts as defineRecordKinds, _c as EventCategory, _n as armRemovalReconcile, ct as HISTORY_CATALOG, dr as deviceRemovalHookCapability, fr as deviceRunsCapability, hc as DeviceType, ko as wattMillisecondsToKwh, lr as deviceHistoryCapability, lt as HISTORY_ITEM_CATALOG, q as DeviceRunSchema, z as DEVICE_HISTORY_ENERGY_KEY } from "../../dist-CRWinpyX.mjs";
2
- import { a as catalogMetrics, c as DeviceDirectory, d as identityOf, f as subjectIdOf, i as capSeriesKey, l as isRealDeviceType, n as CaptureEngine, o as readPath, r as capItemSeriesKey, s as readUnit, t as CAP_KEY_PREFIX, u as SeriesRegistry } from "../../capture-engine-Dw82x5UW.mjs";
1
+ import { Bs as historyUnitFor, Ec as EventCategory, Fs as emitReadiness, Io as wattMillisecondsToKwh, Lo as BaseAddon, Ns as defineRecordKinds, V as DEVICE_HISTORY_ENERGY_KEY, Y as DeviceRunSchema, _r as deviceRunsCapability, dt as HISTORY_ITEM_CATALOG, gr as deviceRemovalHookCapability, mr as deviceHistoryCapability, qs as isReadingQuantity, ut as HISTORY_CATALOG, wc as DeviceType, xn as armRemovalReconcile } from "../../dist-DgZrPBbX.mjs";
2
+ import { a as catalogMetrics, c as DeviceDirectory, d as identityOf, f as subjectIdOf, i as capSeriesKey, l as isRealDeviceType, n as CaptureEngine, o as readPath, r as capItemSeriesKey, s as readUnit, t as CAP_KEY_PREFIX, u as SeriesRegistry } from "../../capture-engine-N1-UaQr0.mjs";
3
3
  import { a as FIVE_MINUTES_MS, c as bucketEndOf, i as DAY_MS, l as bucketStartOf, n as RetentionJob, o as HOUR_MS, r as DepartureTracker, s as ROLLUP_GRACE_MS, t as DEFAULT_RETENTION, u as floorTo } from "../../retention-B9l9TnGE.mjs";
4
4
  import { randomUUID } from "node:crypto";
5
5
  //#region src/builtins/device-history/capture/point-writer.ts
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-1X5ccoX2.js");
6
+ const require_dist = require("../../dist-j7uy5oG9.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
8
  const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
9
9
  const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
@@ -1,4 +1,4 @@
1
- import { $r as legacyAutoLinkIds, An as canonicalIconKey, Ao as BaseAddon, Dn as buildStreamParamsConfigSchema, F as DAY_NAMES, Fs as isDeviceConfigCap, Gt as STREAM_PROFILE_META, Hs as isSecretMarkerLike, J as DeviceStatusSchema, Ls as isKeychainStoredField, Mi as parseStreamParamsFormPatch, St as MINUTES_PER_DAY, Ti as normalizeUnit, Ts as defineRecordKinds, Vs as isSecretMarker, X as DiscoveryProposalBodySchema, Y as DeviceTombstoneSchema, Yn as createDeviceExtensionProvider, _c as EventCategory, _r as enumerateSchemaFields, at as FieldClaimModeSchema, cr as deviceExtensionCapability, dc as userError, g as CAMERA_SWITCH_ORDER, gc as errMsg, gr as enumerateItemArrayFields, hc as DeviceType, ic as secretTreeFromPaths, ii as locationIconKey, is as SECRET_CLEAR, jr as formatMinutes, lc as toSecretFieldView, ls as WELL_KNOWN_TAB_MAP, mc as DeviceRole, mr as deviceStatusCapability, nc as resolveSecretMarkers, o as ALL_CAPABILITY_DEFINITIONS, ot as FieldClaimSchema, pc as DeviceFeature, pr as deviceStateCapability, rr as defineExtensionSlotProvider, sc as sleep$1, ua as runtimeStatePolicyFor, uc as transformSecretWrite, ur as deviceManagerCapability, v as CAP_NAMES_WITH_STATUS, xa as siteZoneKey, xr as expandContainer, ys as collectZodSecretPaths, zs as isSecretClear } from "../../dist-CRWinpyX.mjs";
1
+ import { Ai as normalizeUnit, Cc as DeviceRole, Ds as collectZodSecretPaths, Ec as EventCategory, Er as expandContainer, Ir as formatMinutes, Js as isSecretClear, Jt as STREAM_PROFILE_META, Ks as isKeychainStoredField, L as DAY_NAMES, Li as parseStreamParamsFormPatch, Lo as BaseAddon, Ns as defineRecordKinds, Oa as siteZoneKey, Pn as canonicalIconKey, Q as DiscoveryProposalBodySchema, Sc as DeviceFeature, Sr as enumerateSchemaFields, Tc as errMsg, Us as isDeviceConfigCap, X as DeviceStatusSchema, Xs as isSecretMarker, Z as DeviceTombstoneSchema, Zs as isSecretMarkerLike, _ as CAMERA_SWITCH_ORDER, _a as runtimeStatePolicyFor, _s as WELL_KNOWN_TAB_MAP, bc as userError, cr as defineExtensionSlotProvider, ct as FieldClaimSchema, dc as resolveSecretMarkers, er as createDeviceExtensionProvider, fs as SECRET_CLEAR, gc as sleep$1, hr as deviceManagerCapability, ii as legacyAutoLinkIds, jn as buildStreamParamsConfigSchema, li as locationIconKey, pc as secretTreeFromPaths, pr as deviceExtensionCapability, s as ALL_CAPABILITY_DEFINITIONS, st as FieldClaimModeSchema, vc as toSecretFieldView, vr as deviceStateCapability, wc as DeviceType, wt as MINUTES_PER_DAY, xr as enumerateItemArrayFields, y as CAP_NAMES_WITH_STATUS, yc as transformSecretWrite, yr as deviceStatusCapability } from "../../dist-DgZrPBbX.mjs";
2
2
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
3
3
  import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
4
4
  import { t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-1X5ccoX2.js");
6
+ const require_dist = require("../../dist-j7uy5oG9.js");
7
7
  const require_formatter = require("../../formatter-xbxeV4GD.js");
8
8
  //#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
9
9
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
@@ -1,4 +1,4 @@
1
- import { Ao as BaseAddon, si as logDestinationCapability } from "../../dist-CRWinpyX.mjs";
1
+ import { Lo as BaseAddon, fi as logDestinationCapability } from "../../dist-DgZrPBbX.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
3
3
  //#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
4
4
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-1X5ccoX2.js");
7
- const require_device_ca = require("../../device-ca-v8lGdWVk.js");
6
+ const require_dist = require("../../dist-j7uy5oG9.js");
7
+ const require_device_ca = require("../../device-ca-HGx3Pwb6.js");
8
8
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
9
- const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-BUjw8YoW.js");
10
- const require_constants = require("../../constants-Dmc-T4Zw.js");
9
+ const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-D51X6Fdr.js");
10
+ const require_constants = require("../../constants-7gannWcO.js");
11
11
  const require_platform_key_source = require("../../platform-key-source-Di7HrlGR.js");
12
12
  let node_crypto = require("node:crypto");
13
13
  let _camstack_types_node = require("@camstack/types/node");
@@ -1,8 +1,8 @@
1
- import { Ao as BaseAddon, Qr as keychainCapability, Qs as parseSecretRef, Ts as defineRecordKinds, Ys as normalizeSecretOwner, Zr as keychainAdminCapability, _c as EventCategory, _t as KeychainResetRecordSchema, gt as KeychainAuditEntrySchema, ht as KEYCHAIN_RESET_TRIGGER_ACTOR, ks as formatSecretScope } from "../../dist-CRWinpyX.mjs";
2
- import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-OQqtK7Yy.mjs";
1
+ import { Ec as EventCategory, Lo as BaseAddon, Ls as formatSecretScope, Ns as defineRecordKinds, _t as KEYCHAIN_RESET_TRIGGER_ACTOR, ic as normalizeSecretOwner, ni as keychainAdminCapability, ri as keychainCapability, sc as parseSecretRef, vt as KeychainAuditEntrySchema, yt as KeychainResetRecordSchema } from "../../dist-DgZrPBbX.mjs";
2
+ import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-8lpRo9Ss.mjs";
3
3
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
4
- import { t as LEGACY_INTEGRATION_ROWS_TABLE } from "../../legacy-integration-rows-door-B7bwfRev.mjs";
5
- import { a as MESH_CA_KEY_REF } from "../../constants-C6UsfDdP.mjs";
4
+ import { t as LEGACY_INTEGRATION_ROWS_TABLE } from "../../legacy-integration-rows-door-DIm4Q3Jj.mjs";
5
+ import { a as MESH_CA_KEY_REF } from "../../constants-lWMAnwmj.mjs";
6
6
  import { n as getPlatformKeychainKey } from "../../platform-key-source-BWlq0jjn.mjs";
7
7
  import { createCipheriv, createDecipheriv, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
8
8
  import { restrictDirToOwnerSync, restrictFileToOwnerSync, writeOwnerOnlyFileSync } from "@camstack/types/node";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-1X5ccoX2.js");
3
+ const require_dist = require("../../dist-j7uy5oG9.js");
4
4
  let node_fs = require("node:fs");
5
5
  let node_path = require("node:path");
6
6
  node_path = require_chunk.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { Ao as BaseAddon, Bt as RecordingStatusSchema, It as RECORDING_SOURCE_CAMSTACK_ADDON, _c as EventCategory, bs as createEvent, di as mayWriteToLocation, gc as errMsg } from "../../dist-CRWinpyX.mjs";
1
+ import { Bt as RECORDING_SOURCE_CAMSTACK_ADDON, Ec as EventCategory, Lo as BaseAddon, Os as createEvent, Tc as errMsg, Ut as RecordingStatusSchema, gi as mayWriteToLocation } from "../../dist-DgZrPBbX.mjs";
2
2
  import { constants } from "node:fs";
3
3
  import path from "node:path";
4
4
  import * as fsp from "node:fs/promises";
@@ -3,10 +3,10 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-1X5ccoX2.js");
6
+ const require_dist = require("../../dist-j7uy5oG9.js");
7
7
  const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
8
8
  const require_ms$1 = require("../../ms-LB3giGoU.js");
9
- const require_device_ca = require("../../device-ca-v8lGdWVk.js");
9
+ const require_device_ca = require("../../device-ca-HGx3Pwb6.js");
10
10
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
11
11
  let zod = require("zod");
12
12
  let node_crypto = require("node:crypto");
@@ -1,14 +1,14 @@
1
1
  import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
2
- import { A as CredentialTokenClaimsSchema, Ao as BaseAddon, Ar as formatDeviceRevoker, En as buildDeviceSignatureMessage, Jt as ScopedTokenSchema, Mt as PreferenceDeviceIdSchema, Nt as PreferenceNamespaceSchema, Ot as PREFERENCES_MAX_VALUE_BYTES, Pt as PreferenceValueSchema, R as DEVICE_ENROLLMENT_TTL_MS, Ra as userManagementCapability, Tn as buildDeviceEnrollmentLink, Ts as defineRecordKinds, Ur as isCredentialTokenPayload, V as DEVICE_NONCE_TTL_MS, Vs as isSecretMarker, Ws as makeSecretMarker, Xt as SsoBridgeClaimsSchema, an as UserRecordSchema, dc as userError, rn as TokenScopeSchema, sr as deviceCredentialsCapability, vn as authProviderCapability, w as CREDENTIAL_TOKEN_AUDIENCE } from "../../dist-CRWinpyX.mjs";
2
+ import { $s as makeSecretMarker, $t as SsoBridgeClaimsSchema, An as buildDeviceSignatureMessage, B as DEVICE_ENROLLMENT_TTL_MS, Fr as formatDeviceRevoker, Ga as userManagementCapability, It as PreferenceDeviceIdSchema, Jr as isCredentialTokenPayload, Lo as BaseAddon, Lt as PreferenceNamespaceSchema, M as CredentialTokenClaimsSchema, Ns as defineRecordKinds, Rt as PreferenceValueSchema, Sn as authProviderCapability, T as CREDENTIAL_TOKEN_AUDIENCE, U as DEVICE_NONCE_TTL_MS, Xs as isSecretMarker, Zt as ScopedTokenSchema, bc as userError, cn as UserRecordSchema, fr as deviceCredentialsCapability, jt as PREFERENCES_MAX_VALUE_BYTES, kn as buildDeviceEnrollmentLink, on as TokenScopeSchema } from "../../dist-DgZrPBbX.mjs";
3
3
  import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
4
4
  import { t as require_ms } from "../../ms-CgH2OFlD.mjs";
5
- import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-OQqtK7Yy.mjs";
5
+ import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-8lpRo9Ss.mjs";
6
6
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
7
7
  import { z } from "zod";
8
8
  import * as crypto$1 from "node:crypto";
9
9
  import { X509Certificate, createHash, randomUUID, timingSafeEqual } from "node:crypto";
10
10
  import nodeCrypto from "crypto";
11
- import * as fs$1 from "node:fs";
11
+ import * as fs from "node:fs";
12
12
  import * as path$1 from "node:path";
13
13
  //#region ../../node_modules/bcryptjs/index.js
14
14
  /**
@@ -11912,8 +11912,8 @@ var LocalAuthAddon = class extends BaseAddon {
11912
11912
  users: this.userManager,
11913
11913
  dataDir: this.ctx.nodeDataDir,
11914
11914
  fs: {
11915
- exists: (filePath) => fs$1.existsSync(filePath),
11916
- remove: (filePath) => fs$1.rmSync(filePath, { force: true })
11915
+ exists: (filePath) => fs.existsSync(filePath),
11916
+ remove: (filePath) => fs.rmSync(filePath, { force: true })
11917
11917
  },
11918
11918
  logger: this.ctx.logger
11919
11919
  });
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-1X5ccoX2.js");
3
+ const require_dist = require("../../dist-j7uy5oG9.js");
4
4
  const require_dns_wire = require("../../dns-wire-B1BvF9Ao.js");
5
- const require_hub_mdns_ciao = require("../../hub-mdns-ciao-hBZgojNT.js");
5
+ const require_hub_mdns_ciao = require("../../hub-mdns-ciao-BUKHJL6N.js");
6
6
  let zod = require("zod");
7
7
  let node_net = require("node:net");
8
8
  let node_fs = require("node:fs");
@@ -1,6 +1,6 @@
1
- import { Ao as BaseAddon, Ba as validateCustomAddress, Br as isAppLinkBase, Dt as NetworkTunnelStartedDataSchema, Ni as pickAppLinkHub, Nn as checkRoleAddress, Ri as preconditionOf, Ss as defineAddonMigrations, Wr as isDefaultAppConnectionEndpoint, Zi as resolveAppConnections, _ as CAMSTACK_APP_LINK_ORIGIN, _c as EventCategory, aa as resolveNotificationTapAddress, dt as HUB_MDNS_TXT_KEYS, gc as errMsg, ri as localNetworkCapability, ta as resolveHubAddressRoles, ut as HUB_MDNS_SERVICE_TYPE, ya as shortHostname } from "../../dist-CRWinpyX.mjs";
1
+ import { As as defineAddonMigrations, Bi as pickAppLinkHub, Ea as shortHostname, Ec as EventCategory, Gi as preconditionOf, Gr as isAppLinkBase, Ln as checkRoleAddress, Lo as BaseAddon, Tc as errMsg, Yr as isDefaultAppConnectionEndpoint, ca as resolveHubAddressRoles, ci as localNetworkCapability, fa as resolveNotificationTapAddress, ft as HUB_MDNS_SERVICE_TYPE, ia as resolveAppConnections, kt as NetworkTunnelStartedDataSchema, pt as HUB_MDNS_TXT_KEYS, qa as validateCustomAddress, v as CAMSTACK_APP_LINK_ORIGIN } from "../../dist-DgZrPBbX.mjs";
2
2
  import { a as emptyMdnsRecords, c as parseMdnsMessage, i as buildRecordQuery, l as parseMdnsRecords, n as MDNS_PORT, o as mergeMdnsRecords, r as buildPtrQuery, s as normalizeServiceType, t as MDNS_GROUP } from "../../dns-wire-Dm3H_7ST.mjs";
3
- import { E as ensureTlsCert, I as readLanHttpState, N as applyLanHttp, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, d as servedHttpsLeafFingerprint, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, y as writeExtraSans } from "../../hub-mdns-ciao-BQqm5eSM.mjs";
3
+ import { E as ensureTlsCert, I as readLanHttpState, N as applyLanHttp, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, d as servedHttpsLeafFingerprint, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, y as writeExtraSans } from "../../hub-mdns-ciao-BM3peDu1.mjs";
4
4
  import { z } from "zod";
5
5
  import { isIP } from "node:net";
6
6
  import { readFileSync } from "node:fs";