@camstack/types 1.2.536 → 1.2.538

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 (37) hide show
  1. package/CHANGELOG.md +17 -5
  2. package/dist/addon.d.ts +3 -2
  3. package/dist/addon.js +7 -4
  4. package/dist/addon.mjs +3 -3
  5. package/dist/audit/command-origin-claim.d.ts +79 -0
  6. package/dist/audit/device-transition.d.ts +2 -2
  7. package/dist/automation/action.d.ts +4 -0
  8. package/dist/automation/index.d.ts +0 -1
  9. package/dist/automation/recipe.d.ts +9 -18
  10. package/dist/capabilities/action-source.cap.d.ts +1 -0
  11. package/dist/capabilities/actions.cap.d.ts +7 -0
  12. package/dist/capabilities/device-manager.cap.d.ts +1 -0
  13. package/dist/capabilities/index.d.ts +1 -1
  14. package/dist/capabilities/notification-rules.cap.d.ts +79 -1897
  15. package/dist/client.d.ts +1 -1
  16. package/dist/client.js +70 -985
  17. package/dist/client.mjs +70 -986
  18. package/dist/{device-type-BfvqqzRp.js → composed-stable-id-C3J6LxC9.js} +14 -0
  19. package/dist/{device-type-DTTZKB2I.mjs → composed-stable-id-DLcPInGv.mjs} +9 -1
  20. package/dist/composition/composed-stable-id.d.ts +6 -0
  21. package/dist/composition/composition.d.ts +2 -2
  22. package/dist/{composition-C6TZGqUb.mjs → composition-BFJq1Y88.mjs} +2 -4
  23. package/dist/{composition-BxalDSTt.js → composition-BcVAbtBc.js} +4 -12
  24. package/dist/device/container-primary-child.d.ts +37 -5
  25. package/dist/device/device-context.d.ts +9 -2
  26. package/dist/generated/addon-api.d.ts +0 -35
  27. package/dist/generated/system-proxy.d.ts +1 -1
  28. package/dist/index.d.ts +2 -3
  29. package/dist/index.js +973 -1075
  30. package/dist/index.mjs +120 -220
  31. package/dist/node.js +6 -6
  32. package/dist/node.mjs +2 -2
  33. package/dist/notification/alarm-membership.d.ts +12 -11
  34. package/dist/{sleep-CCAQ_PEp.js → sleep-DgCXXFc3.js} +100 -45
  35. package/dist/{sleep-DnVqHJc4.mjs → sleep-VrfKAAGN.mjs} +54 -11
  36. package/package.json +1 -1
  37. package/dist/automation/nc-action-target.d.ts +0 -21
@@ -418,6 +418,20 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
418
418
  return DeviceRole;
419
419
  }({});
420
420
  //#endregion
421
+ //#region src/composition/composed-stable-id.ts
422
+ /**
423
+ * A composed device's stableId is this prefix plus the block id. Its own module,
424
+ * free of zod, so the addon runner can read it through `@camstack/types/addon`
425
+ * without loading the schema barrel (D28).
426
+ */
427
+ var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
428
+ //#endregion
429
+ Object.defineProperty(exports, "COMPOSED_DEVICE_STABLE_ID_PREFIX", {
430
+ enumerable: true,
431
+ get: function() {
432
+ return COMPOSED_DEVICE_STABLE_ID_PREFIX;
433
+ }
434
+ });
421
435
  Object.defineProperty(exports, "ChargingStatus", {
422
436
  enumerable: true,
423
437
  get: function() {
@@ -418,4 +418,12 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
418
418
  return DeviceRole;
419
419
  }({});
420
420
  //#endregion
421
- export { featuresOfBoundCaps as a, DeviceType as i, DeviceFeature as n, errMsg as o, DeviceRole as r, ChargingStatus as t };
421
+ //#region src/composition/composed-stable-id.ts
422
+ /**
423
+ * A composed device's stableId is this prefix plus the block id. Its own module,
424
+ * free of zod, so the addon runner can read it through `@camstack/types/addon`
425
+ * without loading the schema barrel (D28).
426
+ */
427
+ var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
428
+ //#endregion
429
+ export { DeviceType as a, DeviceRole as i, ChargingStatus as n, featuresOfBoundCaps as o, DeviceFeature as r, errMsg as s, COMPOSED_DEVICE_STABLE_ID_PREFIX as t };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A composed device's stableId is this prefix plus the block id. Its own module,
3
+ * free of zod, so the addon runner can read it through `@camstack/types/addon`
4
+ * without loading the schema barrel (D28).
5
+ */
6
+ export declare const COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
@@ -28,8 +28,8 @@ export declare const COMPOSER_ADDON_ID = "composer";
28
28
  * customization apart: `composition.target.kind === 'existing'` says that (D663).
29
29
  */
30
30
  export declare const CUSTOMIZATION_BLOCK_NAME_PREFIX = "customize:";
31
- /** A composed device's stableId is this prefix plus the block id. */
32
- export declare const COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
31
+ import { COMPOSED_DEVICE_STABLE_ID_PREFIX } from './composed-stable-id.js';
32
+ export { COMPOSED_DEVICE_STABLE_ID_PREFIX };
33
33
  /** A device with more capabilities than this is two devices. */
34
34
  export declare const MAX_COMPOSITION_FEATURES = 16;
35
35
  export declare const MAX_COMPOSITION_FIELDS_PER_FEATURE = 32;
@@ -1,4 +1,4 @@
1
- import { i as DeviceType, r as DeviceRole } from "./device-type-DTTZKB2I.mjs";
1
+ import { a as DeviceType, i as DeviceRole, t as COMPOSED_DEVICE_STABLE_ID_PREFIX } from "./composed-stable-id-DLcPInGv.mjs";
2
2
  import { z } from "zod";
3
3
  import { createHash } from "node:crypto";
4
4
  //#region src/ffmpeg/invocation.ts
@@ -3099,8 +3099,6 @@ var COMPOSER_ADDON_ID = "composer";
3099
3099
  * customization apart: `composition.target.kind === 'existing'` says that (D663).
3100
3100
  */
3101
3101
  var CUSTOMIZATION_BLOCK_NAME_PREFIX = "customize:";
3102
- /** A composed device's stableId is this prefix plus the block id. */
3103
- var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
3104
3102
  /** A device with more capabilities than this is two devices. */
3105
3103
  var MAX_COMPOSITION_FEATURES = 16;
3106
3104
  var MAX_COMPOSITION_FIELDS_PER_FEATURE = 32;
@@ -3401,4 +3399,4 @@ function featureSources(feature) {
3401
3399
  return featureFieldEntries(feature).map((e) => e.source);
3402
3400
  }
3403
3401
  //#endregion
3404
- export { ExpressionHelperSpecSchema as $, evaluateAst as $t, MAX_COMPOSITION_FIELDS_PER_FEATURE as A, sliceChangedAt as An, maxDurationMs as At, featureSources as B, RESTREAM_INPUT_PROBE as Bn, evaluateDerivative as Bt, CompositionPassthroughFeatureSchema as C, SOURCE_CAP_ACTIVE_FIELD as Cn, MIN_CUSTOM_MINUTES as Ct, FORWARD_INPUT_KEY as D, evaluateSensorLevelEdge as Dn, StatisticWindowSchema as Dt, CompositionTargetSchema as E, evaluateSensorEdge as En, RollingWindowSchema as Et, compositionItemFieldPath as F, getFfmpegArtifact as Fn, planStatisticTier as Ft, ARITHMETIC_OPS as G, buildVideoArgs as Gn, EXPRESSION_INJECTED_NOW as Gt, isForwardInputRef as H, buildAudioArgs as Hn, integrateReading as Ht, compositionReadKey as I, getFfmpegDownloadUrl as In, rollingDurationMs as It, ArithmeticHelperSpecSchema as J, logBannerArgs as Jn, evaluateExpressionSource as Jt, ActiveCriterionSchema as K, invocationFromEncodeProfile as Kn, cloneStatefulExpressionMemory as Kt, compositionSliceKey as L, canonicalHash as Ln, statisticCadenceMs as Lt, composedDeviceRef as M, chooseFfmpegBinary as Mn, openReset as Mt, composedDeviceStableId as N, ffmpegBinaryName as Nn, openStatistic as Nt, MAX_COMPOSITION_CODE_LENGTH as O, isSourceCap as On, historyRetentionFromSettings as Ot, compositionFeatureEnabled as P, FFMPEG_RELEASE as Pn, planResetTier as Pt, EXPRESSION_OUTPUTS as Q, createExpressionScope as Qt, compositionSourceKey as R, Fmp4BoxSplitter as Rn, SERIES_KINDS as Rt, CompositionNewTargetSchema as S, SOURCE_CAPS as Sn, MINUTE_MS as St, CompositionSeriesSourceSchema as T, SOURCE_DEVICE_TYPES as Tn, ROLLING_SPANS as Tt, ACTIVE_CRITERIA as U, buildFfmpegArgs as Un, KWH_PER_WATT_MS as Ut, fieldReads as V, audioPlanFromEncodeProfile as Vn, evaluateStatistic as Vt, AGGREGATE_REDUCERS as W, buildInputArgs as Wn, wattMillisecondsToKwh as Wt, DERIVATIVE_UNITS as X, resolveStreamMaps as Xn, toExpressionValue as Xt, BINARY_AGGREGATES as Y, pickVideoEncoder as Yn, evaluateStatefulExpressionCall as Yt, DerivativeHelperSpecSchema as Z, validateExpressionSource as Zt, CompositionForwardArgSchema as _, evaluateRose as _n, DEFAULT_HISTORY_RETENTION as _t, CUSTOMIZATION_BLOCK_NAME_PREFIX as a, EXPRESSION_IDENTIFIER_RE as an, INTEGRAL_OUTPUTS as at, CompositionItemEntrySchema as b, ExpressionParseError as bn, HISTORY_TIERS as bt, CompositionCodeSourceSchema as c, MAX_EXPRESSION_CALL_ARGS as cn, NUMERIC_AGGREGATES as ct, CompositionExpressionSourceSchema as d, RESERVED_BINDING_NAMES as dn, helperMembers as dt, compileExpression as en, GROUP_TEMPLATE_IDS as et, CompositionExtensionCommandSchema as f, EXPRESSION_BUILTINS as fn, isHistoryHelper as ft, CompositionFieldsFeatureSchema as g, evaluateDwell as gn, DAY_MS as gt, CompositionFieldSourceSchema as h, evaluateCount as hn, CalendarWindowSchema as ht, COMPOSITION_ITEM_KEY_RE as i, EXPRESSION_COMPILE_CACHE_CAPACITY as in, HelperSpecSchema as it, MAX_COMPOSITION_ITEMS as j, FFMPEG_PATH_ENV as jn, nextLocalMidnight as jt, MAX_COMPOSITION_FEATURES as k, sliceActiveValue as kn, integralCadenceMs as kt, CompositionCommandTargetSchema as l, MAX_EXPRESSION_EVAL_STEPS as ln, StatisticHelperSpecSchema as lt, CompositionFieldReadSchema as m, disarmRoseMemory as mn, CALENDAR_PERIODS as mt, COMPOSER_ADDON_ID as n, parseExpression as nn, GroupTemplateIdSchema as nt, CompositionAggregateSourceSchema as o, MAX_EXPRESSION_AST_NODES as on, IntegralHelperSpecSchema as ot, CompositionFeatureSchema as p, EXPRESSION_BUILTIN_NAMES as pn, CompositionSourceRefSchema as pt, AggregateReducerSchema as q, isSoftwareDecode as qn, createStatefulExpressionMemory as qt, COMPOSITION_ITEM_ARRAY_PATH as r, tokenize as rn, HelperMemberSchema as rt, CompositionBindingSchema as s, MAX_EXPRESSION_BINDINGS as sn, MAX_HELPER_MEMBERS as st, COMPOSED_DEVICE_STABLE_ID_PREFIX as t, compileExpressionSafe as tn, GroupHelperSpecSchema as tt, CompositionExistingTargetSchema as u, MAX_EXPRESSION_SOURCE_LENGTH as un, ThresholdHelperSpecSchema as ut, CompositionForwardCommandSchema as v, isStatefulBuiltin as vn, HISTORY_FAST_MS as vt, CompositionSchema as w, SOURCE_CAP_CHANGED_AT_FIELD as wn, RESET_PERIODS as wt, CompositionLiteralBindingSchema as x, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as xn, HOUR_MS as xt, CompositionFromSourceSchema as y, ExpressionEvalError as yn, HISTORY_SLOW_MS as yt, featureFieldEntries as z, AUDIO_PRESETS as zn, STATISTIC_STATS as zt };
3402
+ export { GROUP_TEMPLATE_IDS as $, compileExpression as $t, MAX_COMPOSITION_ITEMS as A, FFMPEG_PATH_ENV as An, nextLocalMidnight as At, fieldReads as B, audioPlanFromEncodeProfile as Bn, evaluateStatistic as Bt, CompositionSchema as C, SOURCE_CAP_CHANGED_AT_FIELD as Cn, RESET_PERIODS as Ct, MAX_COMPOSITION_CODE_LENGTH as D, isSourceCap as Dn, historyRetentionFromSettings as Dt, FORWARD_INPUT_KEY as E, evaluateSensorLevelEdge as En, StatisticWindowSchema as Et, compositionReadKey as F, getFfmpegDownloadUrl as Fn, rollingDurationMs as Ft, ActiveCriterionSchema as G, invocationFromEncodeProfile as Gn, cloneStatefulExpressionMemory as Gt, ACTIVE_CRITERIA as H, buildFfmpegArgs as Hn, KWH_PER_WATT_MS as Ht, compositionSliceKey as I, canonicalHash as In, statisticCadenceMs as It, BINARY_AGGREGATES as J, pickVideoEncoder as Jn, evaluateStatefulExpressionCall as Jt, AggregateReducerSchema as K, isSoftwareDecode as Kn, createStatefulExpressionMemory as Kt, compositionSourceKey as L, Fmp4BoxSplitter as Ln, SERIES_KINDS as Lt, composedDeviceStableId as M, ffmpegBinaryName as Mn, openStatistic as Mt, compositionFeatureEnabled as N, FFMPEG_RELEASE as Nn, planResetTier as Nt, MAX_COMPOSITION_FEATURES as O, sliceActiveValue as On, integralCadenceMs as Ot, compositionItemFieldPath as P, getFfmpegArtifact as Pn, planStatisticTier as Pt, ExpressionHelperSpecSchema as Q, evaluateAst as Qt, featureFieldEntries as R, AUDIO_PRESETS as Rn, STATISTIC_STATS as Rt, CompositionPassthroughFeatureSchema as S, SOURCE_CAP_ACTIVE_FIELD as Sn, MIN_CUSTOM_MINUTES as St, CompositionTargetSchema as T, evaluateSensorEdge as Tn, RollingWindowSchema as Tt, AGGREGATE_REDUCERS as U, buildInputArgs as Un, wattMillisecondsToKwh as Ut, isForwardInputRef as V, buildAudioArgs as Vn, integrateReading as Vt, ARITHMETIC_OPS as W, buildVideoArgs as Wn, EXPRESSION_INJECTED_NOW as Wt, DerivativeHelperSpecSchema as X, validateExpressionSource as Xt, DERIVATIVE_UNITS as Y, resolveStreamMaps as Yn, toExpressionValue as Yt, EXPRESSION_OUTPUTS as Z, createExpressionScope as Zt, CompositionForwardCommandSchema as _, isStatefulBuiltin as _n, HISTORY_FAST_MS as _t, CompositionAggregateSourceSchema as a, MAX_EXPRESSION_AST_NODES as an, IntegralHelperSpecSchema as at, CompositionLiteralBindingSchema as b, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as bn, HOUR_MS as bt, CompositionCommandTargetSchema as c, MAX_EXPRESSION_EVAL_STEPS as cn, StatisticHelperSpecSchema as ct, CompositionExtensionCommandSchema as d, EXPRESSION_BUILTINS as dn, isHistoryHelper as dt, compileExpressionSafe as en, GroupHelperSpecSchema as et, CompositionFeatureSchema as f, EXPRESSION_BUILTIN_NAMES as fn, CompositionSourceRefSchema as ft, CompositionForwardArgSchema as g, evaluateRose as gn, DEFAULT_HISTORY_RETENTION as gt, CompositionFieldsFeatureSchema as h, evaluateDwell as hn, DAY_MS as ht, CUSTOMIZATION_BLOCK_NAME_PREFIX as i, EXPRESSION_IDENTIFIER_RE as in, INTEGRAL_OUTPUTS as it, composedDeviceRef as j, chooseFfmpegBinary as jn, openReset as jt, MAX_COMPOSITION_FIELDS_PER_FEATURE as k, sliceChangedAt as kn, maxDurationMs as kt, CompositionExistingTargetSchema as l, MAX_EXPRESSION_SOURCE_LENGTH as ln, ThresholdHelperSpecSchema as lt, CompositionFieldSourceSchema as m, evaluateCount as mn, CalendarWindowSchema as mt, COMPOSITION_ITEM_ARRAY_PATH as n, tokenize as nn, HelperMemberSchema as nt, CompositionBindingSchema as o, MAX_EXPRESSION_BINDINGS as on, MAX_HELPER_MEMBERS as ot, CompositionFieldReadSchema as p, disarmRoseMemory as pn, CALENDAR_PERIODS as pt, ArithmeticHelperSpecSchema as q, logBannerArgs as qn, evaluateExpressionSource as qt, COMPOSITION_ITEM_KEY_RE as r, EXPRESSION_COMPILE_CACHE_CAPACITY as rn, HelperSpecSchema as rt, CompositionCodeSourceSchema as s, MAX_EXPRESSION_CALL_ARGS as sn, NUMERIC_AGGREGATES as st, COMPOSER_ADDON_ID as t, parseExpression as tn, GroupTemplateIdSchema as tt, CompositionExpressionSourceSchema as u, RESERVED_BINDING_NAMES as un, helperMembers as ut, CompositionFromSourceSchema as v, ExpressionEvalError as vn, HISTORY_SLOW_MS as vt, CompositionSeriesSourceSchema as w, SOURCE_DEVICE_TYPES as wn, ROLLING_SPANS as wt, CompositionNewTargetSchema as x, SOURCE_CAPS as xn, MINUTE_MS as xt, CompositionItemEntrySchema as y, ExpressionParseError as yn, HISTORY_TIERS as yt, featureSources as z, RESTREAM_INPUT_PROBE as zn, evaluateDerivative as zt };
@@ -1,4 +1,4 @@
1
- const require_device_type = require("./device-type-BfvqqzRp.js");
1
+ const require_composed_stable_id = require("./composed-stable-id-C3J6LxC9.js");
2
2
  let zod = require("zod");
3
3
  let node_crypto = require("node:crypto");
4
4
  //#region src/ffmpeg/invocation.ts
@@ -3099,8 +3099,6 @@ var COMPOSER_ADDON_ID = "composer";
3099
3099
  * customization apart: `composition.target.kind === 'existing'` says that (D663).
3100
3100
  */
3101
3101
  var CUSTOMIZATION_BLOCK_NAME_PREFIX = "customize:";
3102
- /** A composed device's stableId is this prefix plus the block id. */
3103
- var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
3104
3102
  /** A device with more capabilities than this is two devices. */
3105
3103
  var MAX_COMPOSITION_FEATURES = 16;
3106
3104
  var MAX_COMPOSITION_FIELDS_PER_FEATURE = 32;
@@ -3309,8 +3307,8 @@ function compositionFeatureEnabled(feature) {
3309
3307
  */
3310
3308
  var CompositionNewTargetSchema = zod.z.object({
3311
3309
  kind: zod.z.literal("new"),
3312
- type: zod.z.enum(require_device_type.DeviceType),
3313
- role: zod.z.enum(require_device_type.DeviceRole).optional()
3310
+ type: zod.z.enum(require_composed_stable_id.DeviceType),
3311
+ role: zod.z.enum(require_composed_stable_id.DeviceRole).optional()
3314
3312
  });
3315
3313
  /** Customize an EXISTING device: each feature adds a capability or replaces fields of a native one (D663). */
3316
3314
  var CompositionExistingTargetSchema = zod.z.object({
@@ -3352,7 +3350,7 @@ function compositionReadKey(read) {
3352
3350
  return `${compositionSliceKey(read.source, read.cap)}.${read.fieldPath}`;
3353
3351
  }
3354
3352
  function composedDeviceStableId(blockId) {
3355
- return `${COMPOSED_DEVICE_STABLE_ID_PREFIX}${blockId}`;
3353
+ return `${require_composed_stable_id.COMPOSED_DEVICE_STABLE_ID_PREFIX}${blockId}`;
3356
3354
  }
3357
3355
  function composedDeviceRef(blockId) {
3358
3356
  return {
@@ -3455,12 +3453,6 @@ Object.defineProperty(exports, "CALENDAR_PERIODS", {
3455
3453
  return CALENDAR_PERIODS;
3456
3454
  }
3457
3455
  });
3458
- Object.defineProperty(exports, "COMPOSED_DEVICE_STABLE_ID_PREFIX", {
3459
- enumerable: true,
3460
- get: function() {
3461
- return COMPOSED_DEVICE_STABLE_ID_PREFIX;
3462
- }
3463
- });
3464
3456
  Object.defineProperty(exports, "COMPOSER_ADDON_ID", {
3465
3457
  enumerable: true,
3466
3458
  get: function() {
@@ -23,11 +23,43 @@
23
23
  * priority-in-sync.ts` fails the build when either drifts — the comment that
24
24
  * used to ask for this could not.
25
25
  *
26
- * The rule has two halves and the ORDER matters: an operator's explicit pick
27
- * wins outright, and only in its absence does type priority decide. The pick is
28
- * keyed on the child's re-sync-stable `entityId`, not its numeric id, so it
29
- * survives a re-sync that reallocates ids.
26
+ * The rule has three halves and the ORDER matters: an operator's explicit pick
27
+ * wins outright; else a declaration on the device type
28
+ * ({@link CONTAINER_PRIMARY_CHILD_RULES}); else role, namesake, then type
29
+ * priority. The pick is keyed on the child's re-sync-stable `entityId`, not
30
+ * its numeric id, so it survives a re-sync that reallocates ids.
30
31
  */
32
+ /**
33
+ * What a device type stands for, when it says so itself.
34
+ *
35
+ * `'self'` — the device's own surface is the hero; resolution returns no
36
+ * child. `{ childType }` — the child of that type is primary, ahead of the
37
+ * role / namesake / type-rank heuristic. A type absent from
38
+ * {@link CONTAINER_PRIMARY_CHILD_RULES} keeps the heuristic.
39
+ */
40
+ export type ContainerPrimaryDeclaration = 'self' | {
41
+ readonly childType: string;
42
+ };
43
+ export interface ContainerPrimaryChildRule {
44
+ /** A {@link DeviceType} value. Vendor names do not belong here. */
45
+ readonly deviceType: string;
46
+ readonly primary: ContainerPrimaryDeclaration;
47
+ }
48
+ /**
49
+ * Device types that name their primary child. A heat pump stands for itself:
50
+ * its hero is the system row, not the climate circuit that type-rank would
51
+ * otherwise pick.
52
+ */
53
+ export declare const CONTAINER_PRIMARY_CHILD_RULES: readonly ContainerPrimaryChildRule[];
54
+ export type AppliedPrimaryChildRule = {
55
+ readonly kind: 'fall-through';
56
+ } | {
57
+ readonly kind: 'none';
58
+ } | {
59
+ readonly kind: 'child';
60
+ readonly child: ContainerChildRef;
61
+ };
62
+ export declare function applyPrimaryChildRule(rule: ContainerPrimaryChildRule | undefined, children: readonly ContainerChildRef[]): AppliedPrimaryChildRule;
31
63
  /**
32
64
  * Type priority, most→least "primary". An actuator (climate / lock / cover / …)
33
65
  * outranks a bare `switch` so a container's defining child wins over its
@@ -90,4 +122,4 @@ export interface ContainerChildRef {
90
122
  * they are deliberately absent and fall through to type priority.
91
123
  */
92
124
  export declare const CONTAINER_CHILD_ROLE_PRIORITY: readonly string[];
93
- export declare function resolveContainerPrimaryChild(children: readonly ContainerChildRef[], overrideEntityId: string | null | undefined, containerName?: string): ContainerChildRef | null;
125
+ export declare function resolveContainerPrimaryChild(children: readonly ContainerChildRef[], overrideEntityId: string | null | undefined, containerName: string | undefined, containerType: string | undefined): ContainerChildRef | null;
@@ -139,6 +139,11 @@ export interface DeviceContext {
139
139
  export type DeviceConstructor<T extends IDevice = IDevice> = new (ctx: DeviceContext) => T;
140
140
  /** Map entry helper — concrete camera/hub classes widen to `DeviceConstructor<IDevice>`. */
141
141
  export declare function widenDeviceConstructor<T extends IDevice>(ctor: DeviceConstructor<T>): DeviceConstructor<IDevice>;
142
+ /** Who is writing a device name. Absent means the operator. */
143
+ export interface DeviceNameWrite {
144
+ /** False when the writer is the system, not an operator rename. */
145
+ readonly stampUserNamed: boolean;
146
+ }
142
147
  export interface DeviceManagerApi {
143
148
  /**
144
149
  * Create, register, and persist a device in one call.
@@ -205,8 +210,10 @@ export interface DeviceManagerApi {
205
210
  * initial wizard"). */
206
211
  persistInitialConfig(stableId: string, config: Record<string, unknown>): Promise<number>;
207
212
  /** Update the device's display name. Surfaces immediately in
208
- * the UI device list + on `IDevice.name` for live consumers. */
209
- setName(deviceId: number, name: string): Promise<void>;
213
+ * the UI device list + on `IDevice.name` for live consumers.
214
+ * `stampUserNamed: false` is the system writer (a block name copied
215
+ * onto a composed device); omitted, the write is the operator's. */
216
+ setName(deviceId: number, name: string, opts?: DeviceNameWrite): Promise<void>;
210
217
  /** Set the operator-organisational location label
211
218
  * ("Kitchen" / "Front yard" / …). Pass `null` to clear. */
212
219
  setLocation(deviceId: number, location: string | null): Promise<void>;
@@ -6385,41 +6385,6 @@ export type AppRouter = TrpcCoreRouter<{
6385
6385
  output: z.infer<typeof notificationRulesCapability.methods.setRuleEnabled.output>;
6386
6386
  meta: object;
6387
6387
  }>;
6388
- listSequences: TRPCQueryProcedure<{
6389
- input: {
6390
- [x: string]: unknown;
6391
- } & z.input<typeof notificationRulesCapability.methods.listSequences.input>;
6392
- output: z.infer<typeof notificationRulesCapability.methods.listSequences.output>;
6393
- meta: object;
6394
- }>;
6395
- getSequence: TRPCQueryProcedure<{
6396
- input: {
6397
- [x: string]: unknown;
6398
- } & z.input<typeof notificationRulesCapability.methods.getSequence.input>;
6399
- output: z.infer<typeof notificationRulesCapability.methods.getSequence.output>;
6400
- meta: object;
6401
- }>;
6402
- createSequence: TRPCMutationProcedure<{
6403
- input: {
6404
- [x: string]: unknown;
6405
- } & z.input<typeof notificationRulesCapability.methods.createSequence.input>;
6406
- output: z.infer<typeof notificationRulesCapability.methods.createSequence.output>;
6407
- meta: object;
6408
- }>;
6409
- updateSequence: TRPCMutationProcedure<{
6410
- input: {
6411
- [x: string]: unknown;
6412
- } & z.input<typeof notificationRulesCapability.methods.updateSequence.input>;
6413
- output: z.infer<typeof notificationRulesCapability.methods.updateSequence.output>;
6414
- meta: object;
6415
- }>;
6416
- deleteSequence: TRPCMutationProcedure<{
6417
- input: {
6418
- [x: string]: unknown;
6419
- } & z.input<typeof notificationRulesCapability.methods.deleteSequence.input>;
6420
- output: z.infer<typeof notificationRulesCapability.methods.deleteSequence.output>;
6421
- meta: object;
6422
- }>;
6423
6388
  getClipRetentionAsks: TRPCQueryProcedure<{
6424
6389
  input: {
6425
6390
  [x: string]: unknown;
@@ -110,7 +110,7 @@ export interface SystemProxy {
110
110
  readonly networkQuality: Pick<InferProvider<typeof networkQualityCapability>, 'getAllStats'>;
111
111
  readonly nodes: Pick<InferProvider<typeof nodesCapability>, 'topology' | 'directory' | 'deployAddon' | 'undeployAddon' | 'restartAddon' | 'restartProcess' | 'restartNode' | 'shutdownNode' | 'renameNode' | 'clusterAddonStatus' | 'getCapUsageGraph' | 'getNodeAddons' | 'setProcessLogLevel' | 'executeQuery'>;
112
112
  readonly notificationOutput: Pick<InferProvider<typeof notificationOutputCapability>, 'listTargetKinds' | 'discoverTargets' | 'probeTargetConfig' | 'send' | 'testTarget'>;
113
- readonly notificationRules: Pick<InferProvider<typeof notificationRulesCapability>, 'listRules' | 'getRule' | 'createRule' | 'updateRule' | 'deleteRule' | 'setRuleEnabled' | 'listSequences' | 'getSequence' | 'createSequence' | 'updateSequence' | 'deleteSequence' | 'getClipRetentionAsks' | 'listDeviceMutes' | 'testRule' | 'previewStateSummary' | 'getConditionCatalog' | 'getTemplateCatalog' | 'previewTemplate' | 'getHistory' | 'getRuleLastRuns' | 'resolveArtifactUrl' | 'listSnoozes' | 'createSnooze' | 'cancelSnooze' | 'getAlarmConfig' | 'setAlarmConfig' | 'createAlarmProfile' | 'renameAlarmProfile' | 'deleteAlarmProfile' | 'activateAlarmProfile' | 'getAlarmSensors'>;
113
+ readonly notificationRules: Pick<InferProvider<typeof notificationRulesCapability>, 'listRules' | 'getRule' | 'createRule' | 'updateRule' | 'deleteRule' | 'setRuleEnabled' | 'getClipRetentionAsks' | 'listDeviceMutes' | 'testRule' | 'previewStateSummary' | 'getConditionCatalog' | 'getTemplateCatalog' | 'previewTemplate' | 'getHistory' | 'getRuleLastRuns' | 'resolveArtifactUrl' | 'listSnoozes' | 'createSnooze' | 'cancelSnooze' | 'getAlarmConfig' | 'setAlarmConfig' | 'createAlarmProfile' | 'renameAlarmProfile' | 'deleteAlarmProfile' | 'activateAlarmProfile' | 'getAlarmSensors'>;
114
114
  readonly osdManager: Pick<InferProvider<typeof osdManagerCapability>, 'getConditionSupport' | 'copyDeviceConfiguration' | 'listTemplates' | 'upsertTemplate' | 'deleteTemplate'>;
115
115
  readonly pipelineExecutor: Pick<InferProvider<typeof pipelineExecutorCapability>, 'getAvailableEngines' | 'getSelectedEngine' | 'getEngineProvisioning' | 'getVideoPipelineSteps' | 'setVideoPipelineSteps' | 'getInferenceDeviceHealth' | 'rearmInferenceDevice' | 'getSchema' | 'getOrchestratorConfigSchema' | 'validatePipeline' | 'getCapabilities' | 'getAddonModels' | 'downloadModel' | 'deleteModel' | 'cacheFrameInPool' | 'inferCached' | 'uncacheFrame' | 'getEffectiveTuning' | 'listLoadedEngines' | 'spinEngine' | 'killEngine' | 'listReferenceImages' | 'getReferenceImage' | 'getReferenceAudioFiles' | 'getReferenceAudio' | 'getAudioCapabilities' | 'runAudioTest' | 'getDetectionConfigSchema'>;
116
116
  readonly pipelineOrchestrator: Pick<InferProvider<typeof pipelineOrchestratorCapability>, 'requestOccupancyLook' | 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'rebalance' | 'getPipelineAssignments' | 'getAgentLoad' | 'getClusterModelChoice' | 'getGlobalMetrics' | 'getCapabilityBindings' | 'setCapabilityBinding' | 'getIngestOwner' | 'getAudioNodeLoad' | 'getAudioAssignments' | 'getAgentSettings' | 'listAgentSettings' | 'removeAgentSettings' | 'setAgentMaxCameras' | 'setAgentCapabilities' | 'setAgentDecodeLimits' | 'setAgentReachableHost' | 'setAgentInferenceDevices' | 'setNodeStepSettings' | 'getNodeInferenceDevices' | 'forgetInferenceDevice' | 'resetNodePipelineDefaults' | 'planAutoTune' | 'applyAutoTune' | 'setLoadBalancingShares' | 'getPlacementStats' | 'suggestShares' | 'getEffectiveShares' | 'setShareSource' | 'getNodeBenchmarkPreflight' | 'startNodeBenchmark' | 'getNodeBenchmarkStatus' | 'abortNodeBenchmark' | 'getNodeBenchmarkCandidates' | 'listNodeBenchmarkResults' | 'deleteNodeBenchmarkResult' | 'getCameraStatuses' | 'setCameraSensors' | 'reconcileFromDisk' | 'getReconcileFromDiskStatus'>;
package/dist/index.d.ts CHANGED
@@ -198,7 +198,6 @@ export type { PreparedRecipe, UnitResolver, UnitWarning, UnitsNormalized, } from
198
198
  export * from './automation/action.js';
199
199
  export * from './automation/action-target.js';
200
200
  export * from './automation/scheduler.js';
201
- export * from './automation/nc-action-target.js';
202
201
  export * from './automation/step-condition.js';
203
202
  export * from './automation/step-runner.js';
204
203
  export * from './automation/export-entities.js';
@@ -244,7 +243,7 @@ export { BaseDeviceProvider, toDeviceSummary } from './device/base-device-provid
244
243
  export type { BatteryPresence, BatteryPresenceInput } from './device/battery-presence.js';
245
244
  export { BATTERY_UNREACHABLE_AFTER_MS, deriveBatteryPresence, isBatteryPresenceFault, } from './device/battery-presence.js';
246
245
  export type { ICameraDevice, StreamSourceEntry } from './device/camera-device.js';
247
- export { CONTAINER_CHILD_PRIORITY, type ContainerChildRef, resolveContainerPrimaryChild, } from './device/container-primary-child.js';
246
+ export { applyPrimaryChildRule, CONTAINER_CHILD_PRIORITY, CONTAINER_PRIMARY_CHILD_RULES, type AppliedPrimaryChildRule, type ContainerChildRef, type ContainerPrimaryChildRule, type ContainerPrimaryDeclaration, resolveContainerPrimaryChild, } from './device/container-primary-child.js';
248
247
  export { expandContainer, legacyAutoLinkIds, type LinkCandidate, } from './device/linked-device-resolve.js';
249
248
  export type { DeclarationPlacement, DeclaredDeviceOutcome, DeclaredDevicePorts, DeclaredDeviceRow, DeclaredDevicesResult, DeclaredDevicesSpec, DeclaredInstanceSeed, DeclaredIntegrationRef, DeclaredIntegrationRow, DeviceDeclaration, SeedableInstances, } from './device/declared-device.js';
250
249
  export { DECLARED_DEVICE_SWEEP_LIMIT, DECLARED_INTEGRATION_FIXED_KEY, DeclaredDevices, declarationOwnerNodeId, seedInstanceOnce, } from './device/declared-device.js';
@@ -253,7 +252,7 @@ export { exposeBlockDevices, reconcileBlockDevices } from './device/block-declar
253
252
  export type { IDevice } from './device/device.js';
254
253
  export type { DeviceBinding, DeviceBindingEntry } from './device/device-binding.js';
255
254
  export { DeviceConfig } from './device/device-config.js';
256
- export type { DeviceConstructor, DeviceContext, DeviceManagerApi, DevicePersistConfigOptions, IDeviceRegistry, IDeviceRegistryReader, } from './device/device-context.js';
255
+ export type { DeviceConstructor, DeviceContext, DeviceManagerApi, DeviceNameWrite, DevicePersistConfigOptions, IDeviceRegistry, IDeviceRegistryReader, } from './device/device-context.js';
257
256
  export { widenDeviceConstructor } from './device/device-context.js';
258
257
  export type { AccessoryControlInput, AccessoryControlKind, AccessoryControlPick, DeviceControlKind, SensorMapping, } from './device/device-control-resolution.js';
259
258
  export { DEVICE_TYPE_CONTROL_KIND, hasMotionTrigger, isNode, MOTION_TRIGGER_FEATURE, pickAccessoryControl, resolveDeviceControlKind, resolveMutate, SENSOR_FEATURES, SENSOR_MAP, } from './device/device-control-resolution.js';