@camstack/types 1.2.423 → 1.2.424
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/composer.cap.d.ts +6 -0
- package/dist/capabilities/core-blocks.cap.d.ts +43 -0
- package/dist/capabilities/group-active.cap.d.ts +46 -0
- package/dist/capabilities/group-commands.cap.d.ts +1 -1
- package/dist/capabilities/group-status.cap.d.ts +1 -1
- package/dist/capabilities/index.d.ts +3 -1
- package/dist/capabilities/lock-control.cap.d.ts +1 -0
- package/dist/capabilities/switch.cap.d.ts +1 -1
- package/dist/client.js +3 -0
- package/dist/client.mjs +3 -0
- package/dist/composition/composition-report.d.ts +2 -0
- package/dist/composition/composition.d.ts +9 -0
- package/dist/composition/helpers/actuator-methods.d.ts +39 -0
- package/dist/composition/helpers/aggregate.d.ts +2 -0
- package/dist/composition/helpers/catalog.d.ts +7 -1
- package/dist/composition/helpers/compile-history.d.ts +16 -1
- package/dist/composition/helpers/compile-math.d.ts +9 -0
- package/dist/composition/helpers/history-math.d.ts +8 -0
- package/dist/composition/helpers/index.d.ts +6 -4
- package/dist/composition/helpers/source-pick.d.ts +8 -1
- package/dist/composition/helpers/spec.d.ts +49 -3
- package/dist/{composition-CpETZ4HL.mjs → composition-Bb8iwHEJ.mjs} +175 -5
- package/dist/{composition-CPRAP41h.js → composition-CpAc0YfQ.js} +228 -4
- package/dist/device/cap-vocabulary/entries/sensors.d.ts +1 -1
- package/dist/expression/builtins.d.ts +11 -2
- package/dist/expression/expression-source.d.ts +6 -1
- package/dist/generated/addon-api.d.ts +14 -0
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/cap-status-types.d.ts +3 -1
- package/dist/generated/capability-router-map.d.ts +5 -2
- package/dist/generated/device-local-state.d.ts +3 -0
- package/dist/generated/device-proxy.d.ts +3 -0
- package/dist/generated/device-scoped-caps.d.ts +1 -1
- package/dist/generated/history-catalog.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/generated/runtime-state-durability.d.ts +1 -1
- package/dist/index.js +634 -33
- package/dist/index.mjs +611 -34
- package/dist/node.js +1 -1
- package/dist/node.mjs +1 -1
- package/dist/{sleep-0sD_LHLI.mjs → sleep--jXS9hWo.mjs} +10 -1
- package/dist/{sleep-CEKGW7A5.js → sleep-edKiOXLo.js} +10 -1
- package/package.json +1 -1
|
@@ -128,6 +128,7 @@ export declare const CompositionAggregateSourceSchema: z.ZodObject<{
|
|
|
128
128
|
cap: z.ZodString;
|
|
129
129
|
fieldPath: z.ZodString;
|
|
130
130
|
}, z.core.$strip>>;
|
|
131
|
+
activeWhen: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
131
132
|
publish: z.ZodEnum<{
|
|
132
133
|
excluded: "excluded";
|
|
133
134
|
included: "included";
|
|
@@ -213,6 +214,7 @@ export declare const CompositionFieldSourceSchema: z.ZodDiscriminatedUnion<[z.Zo
|
|
|
213
214
|
cap: z.ZodString;
|
|
214
215
|
fieldPath: z.ZodString;
|
|
215
216
|
}, z.core.$strip>>;
|
|
217
|
+
activeWhen: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
216
218
|
publish: z.ZodEnum<{
|
|
217
219
|
excluded: "excluded";
|
|
218
220
|
included: "included";
|
|
@@ -328,6 +330,7 @@ export declare const CompositionItemEntrySchema: z.ZodObject<{
|
|
|
328
330
|
cap: z.ZodString;
|
|
329
331
|
fieldPath: z.ZodString;
|
|
330
332
|
}, z.core.$strip>>;
|
|
333
|
+
activeWhen: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
331
334
|
publish: z.ZodEnum<{
|
|
332
335
|
excluded: "excluded";
|
|
333
336
|
included: "included";
|
|
@@ -412,6 +415,7 @@ export declare const CompositionFieldsFeatureSchema: z.ZodObject<{
|
|
|
412
415
|
cap: z.ZodString;
|
|
413
416
|
fieldPath: z.ZodString;
|
|
414
417
|
}, z.core.$strip>>;
|
|
418
|
+
activeWhen: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
415
419
|
publish: z.ZodEnum<{
|
|
416
420
|
excluded: "excluded";
|
|
417
421
|
included: "included";
|
|
@@ -492,6 +496,7 @@ export declare const CompositionFieldsFeatureSchema: z.ZodObject<{
|
|
|
492
496
|
cap: z.ZodString;
|
|
493
497
|
fieldPath: z.ZodString;
|
|
494
498
|
}, z.core.$strip>>;
|
|
499
|
+
activeWhen: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
495
500
|
publish: z.ZodEnum<{
|
|
496
501
|
excluded: "excluded";
|
|
497
502
|
included: "included";
|
|
@@ -600,6 +605,7 @@ export declare const CompositionFeatureSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
600
605
|
cap: z.ZodString;
|
|
601
606
|
fieldPath: z.ZodString;
|
|
602
607
|
}, z.core.$strip>>;
|
|
608
|
+
activeWhen: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
603
609
|
publish: z.ZodEnum<{
|
|
604
610
|
excluded: "excluded";
|
|
605
611
|
included: "included";
|
|
@@ -680,6 +686,7 @@ export declare const CompositionFeatureSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
680
686
|
cap: z.ZodString;
|
|
681
687
|
fieldPath: z.ZodString;
|
|
682
688
|
}, z.core.$strip>>;
|
|
689
|
+
activeWhen: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
683
690
|
publish: z.ZodEnum<{
|
|
684
691
|
excluded: "excluded";
|
|
685
692
|
included: "included";
|
|
@@ -830,6 +837,7 @@ export declare const CompositionSchema: z.ZodObject<{
|
|
|
830
837
|
cap: z.ZodString;
|
|
831
838
|
fieldPath: z.ZodString;
|
|
832
839
|
}, z.core.$strip>>;
|
|
840
|
+
activeWhen: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
833
841
|
publish: z.ZodEnum<{
|
|
834
842
|
excluded: "excluded";
|
|
835
843
|
included: "included";
|
|
@@ -910,6 +918,7 @@ export declare const CompositionSchema: z.ZodObject<{
|
|
|
910
918
|
cap: z.ZodString;
|
|
911
919
|
fieldPath: z.ZodString;
|
|
912
920
|
}, z.core.$strip>>;
|
|
921
|
+
activeWhen: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
913
922
|
publish: z.ZodEnum<{
|
|
914
923
|
excluded: "excluded";
|
|
915
924
|
included: "included";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One method table per actuator type (D944). A group offers a method only
|
|
3
|
+
* when every member can take it, so a command never reaches a member that
|
|
4
|
+
* lacks the surface: the cap must be bound by every member (the primary cap of
|
|
5
|
+
* the type is the exception — a member that lacks it is simply not commanded),
|
|
6
|
+
* and a row that names a device feature needs every member to advertise it.
|
|
7
|
+
* Offline does not remove a method: capability is the binding, not liveness.
|
|
8
|
+
*/
|
|
9
|
+
import { DeviceFeature } from '../../device/device-type.js';
|
|
10
|
+
export declare const ACTUATOR_TEMPLATE_IDS: readonly ['switch', 'light', 'fan', 'cover', 'valve', 'lock', 'media-player', 'climate'];
|
|
11
|
+
export type ActuatorTemplateId = (typeof ACTUATOR_TEMPLATE_IDS)[number];
|
|
12
|
+
export interface ActuatorMethodRow {
|
|
13
|
+
readonly cap: string;
|
|
14
|
+
readonly method: string;
|
|
15
|
+
/** Every member must advertise this feature for the row to be shared. */
|
|
16
|
+
readonly requires: DeviceFeature | null;
|
|
17
|
+
/** The call must say `confirm: true`; the group refuses it otherwise. */
|
|
18
|
+
readonly confirm: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** The first row's cap is the type's own: always offered, members without it are skipped. */
|
|
21
|
+
export declare const ACTUATOR_METHODS: Readonly<Record<ActuatorTemplateId, readonly ActuatorMethodRow[]>>;
|
|
22
|
+
export interface ActuatorMemberSurface {
|
|
23
|
+
readonly caps: readonly string[];
|
|
24
|
+
readonly features: readonly string[];
|
|
25
|
+
}
|
|
26
|
+
export declare function actuatorMethodRow(templateId: ActuatorTemplateId, cap: string, method: string): ActuatorMethodRow | null;
|
|
27
|
+
/**
|
|
28
|
+
* The rows every member can take. An empty member list shares nothing; the
|
|
29
|
+
* caller passes a surface for every member it could read, or none at all.
|
|
30
|
+
*/
|
|
31
|
+
export declare function sharedActuatorMethods(templateId: ActuatorTemplateId, members: readonly ActuatorMemberSurface[]): readonly ActuatorMethodRow[];
|
|
32
|
+
/** The device features every member has, among those the table gates on, in table order. */
|
|
33
|
+
export declare function sharedActuatorFeatures(templateId: ActuatorTemplateId, featureLists: readonly (readonly string[])[]): readonly DeviceFeature[];
|
|
34
|
+
export declare const UNLOCK_CONFIRMATION: string;
|
|
35
|
+
/**
|
|
36
|
+
* Why a call must not be fanned out, or null. Only a confirmed row passes
|
|
37
|
+
* without `confirm: true`; anything else is the caller's to refuse by name.
|
|
38
|
+
*/
|
|
39
|
+
export declare function methodRefusal(method: ActuatorMethodRow | null, args: Readonly<Record<string, unknown>>): string | null;
|
|
@@ -20,6 +20,8 @@ export interface AggregateCounts {
|
|
|
20
20
|
export type AggregatePublish = 'value' | 'included' | 'excluded' | 'total';
|
|
21
21
|
export type AggregateEmpty = 'null' | 'omit' | 'offline';
|
|
22
22
|
export interface EvaluateAggregateInput {
|
|
23
|
+
/** Enum states that count as active, for a reducer over states instead of booleans. */
|
|
24
|
+
readonly activeWhen?: readonly string[];
|
|
23
25
|
readonly reducer: AggregateReducer;
|
|
24
26
|
readonly members: readonly AggregateReadResult[];
|
|
25
27
|
readonly publish: AggregatePublish;
|
|
@@ -20,8 +20,14 @@ export interface GroupTemplate {
|
|
|
20
20
|
readonly summary: string;
|
|
21
21
|
readonly deviceType: DeviceType;
|
|
22
22
|
readonly role: DeviceRole | undefined;
|
|
23
|
-
/** Members are this one device type. */
|
|
23
|
+
/** Members are this one device type — or, for a climate group, one of a few. */
|
|
24
24
|
readonly memberDeviceType: DeviceType;
|
|
25
|
+
readonly memberDeviceTypes: readonly DeviceType[];
|
|
26
|
+
/**
|
|
27
|
+
* Enum states of the member field that count as active. Set when the member
|
|
28
|
+
* field is a state rather than a yes/no (a cover is `open`, a lock `locked`).
|
|
29
|
+
*/
|
|
30
|
+
readonly activeWhen: readonly string[] | undefined;
|
|
25
31
|
readonly outputCap: string;
|
|
26
32
|
readonly outputField: string;
|
|
27
33
|
/**
|
|
@@ -1,12 +1,27 @@
|
|
|
1
1
|
import type { CompositionProblem } from '../composition-report.js';
|
|
2
2
|
import type { SeriesKind } from './history-math.js';
|
|
3
3
|
import { type HistoryRetention } from './history-window.js';
|
|
4
|
-
import type { HelperMember, IntegralHelperSpec, StatisticHelperSpec } from './spec.js';
|
|
4
|
+
import type { DerivativeHelperSpec, HelperMember, IntegralHelperSpec, StatisticHelperSpec } from './spec.js';
|
|
5
|
+
/**
|
|
6
|
+
* The unit of a rate: the source series' unit per second, minute or hour
|
|
7
|
+
* (`°C/h`). A source with no unit of its own (a generic number) has none to
|
|
8
|
+
* borrow, so the label is null and the chart shows the bare number.
|
|
9
|
+
*/
|
|
10
|
+
export declare function derivativeUnitLabel(spec: DerivativeHelperSpec): string | null;
|
|
5
11
|
export declare function declaredSeriesKind(member: HelperMember): SeriesKind | 'enum' | null;
|
|
6
12
|
export declare function statisticDraft(spec: StatisticHelperSpec, retention?: HistoryRetention): {
|
|
7
13
|
readonly draft: unknown;
|
|
8
14
|
readonly problems: readonly CompositionProblem[];
|
|
9
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* A derivative reads a gauge or a counter and publishes its rate per second,
|
|
18
|
+
* minute or hour. The output is a plain number: a rate of a temperature is not
|
|
19
|
+
* a temperature, so the chart carries no inherited unit.
|
|
20
|
+
*/
|
|
21
|
+
export declare function derivativeDraft(spec: DerivativeHelperSpec, retention?: HistoryRetention): {
|
|
22
|
+
readonly draft: unknown;
|
|
23
|
+
readonly problems: readonly CompositionProblem[];
|
|
24
|
+
};
|
|
10
25
|
export declare function integralDraft(spec: IntegralHelperSpec, retention?: HistoryRetention): {
|
|
11
26
|
readonly draft: unknown;
|
|
12
27
|
readonly problems: readonly CompositionProblem[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CompositionProblem } from '../composition-report.js';
|
|
2
|
+
import type { ArithmeticHelperSpec, ExpressionHelperSpec, ThresholdHelperSpec } from './spec.js';
|
|
3
|
+
export interface MathDraft {
|
|
4
|
+
readonly draft: unknown;
|
|
5
|
+
readonly problems: readonly CompositionProblem[];
|
|
6
|
+
}
|
|
7
|
+
export declare function thresholdDraft(spec: ThresholdHelperSpec): MathDraft;
|
|
8
|
+
export declare function arithmeticDraft(spec: ArithmeticHelperSpec): MathDraft;
|
|
9
|
+
export declare function expressionDraft(spec: ExpressionHelperSpec): MathDraft;
|
|
@@ -37,3 +37,11 @@ export interface HistoryValue {
|
|
|
37
37
|
export declare function evaluateStatistic(stat: StatisticStat, read: SeriesRead): HistoryValue;
|
|
38
38
|
export type IntegralScale = 'energy-kwh' | 'per-second';
|
|
39
39
|
export declare function integrateReading(read: SeriesRead, scale: IntegralScale): HistoryValue;
|
|
40
|
+
/**
|
|
41
|
+
* Rate of change over a window, per `perMs`. The slope is taken between the
|
|
42
|
+
* first and the last measured sample, so a hole inside the window neither
|
|
43
|
+
* counts as zero nor stretches the elapsed time. A gauge that reported
|
|
44
|
+
* nothing after the value held at the start is flat (rate 0); fewer than two
|
|
45
|
+
* samples and no held value is a known gap (D393).
|
|
46
|
+
*/
|
|
47
|
+
export declare function evaluateDerivative(read: SeriesRead, perMs: number): HistoryValue;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
export { ACTUATOR_METHODS, ACTUATOR_TEMPLATE_IDS, type ActuatorMemberSurface, type ActuatorMethodRow, type ActuatorTemplateId, actuatorMethodRow, methodRefusal, sharedActuatorFeatures, sharedActuatorMethods, UNLOCK_CONFIRMATION, } from './actuator-methods.js';
|
|
1
2
|
export { FAN_OUT_CONCURRENCY, LIGHT_SHARED_CAPS, type FanOutCall, type FanOutFailed, type FanOutMember, type FanOutMemberResult, type FanOutOk, type LightSharedCap, activeForReducer, fanOutTargets, reducerForActive, runFanOut, sharedColorModes, sharedLightCaps, } from './actuator.js';
|
|
2
3
|
export { type AggregateCounts, type AggregateEmpty, type AggregateOutcome, type AggregatePublish, type AggregateReadResult, type AggregateUnavailable, type AggregateValue, type EvaluateAggregateInput, evaluateAggregate, } from './aggregate.js';
|
|
3
4
|
export { APPLIANCE_DEFAULTS, APPLIANCE_KINDS, APPLIANCE_TEMPLATE_ID, type ApplianceDefaults, type ApplianceKind, applianceDeviceType, isApplianceKind, sourcePickForAppliance, } from './appliance.js';
|
|
4
5
|
export { type GroupTemplate, type HelperAccept, type HelperCompanion, GROUP_TEMPLATES, groupTemplate, } from './catalog.js';
|
|
5
6
|
export { type HelperCompileResult, type HelperCompiled, type HelperRefused, compileHelper, sameHelperBody, templateDeviceType, } from './compile.js';
|
|
6
|
-
export { declaredSeriesKind, integralDraft, statisticDraft } from './compile-history.js';
|
|
7
|
+
export { declaredSeriesKind, derivativeDraft, derivativeUnitLabel, integralDraft, statisticDraft, } from './compile-history.js';
|
|
8
|
+
export { arithmeticDraft, expressionDraft, thresholdDraft } from './compile-math.js';
|
|
7
9
|
export { KWH_PER_WATT_MS, wattMillisecondsToKwh } from './energy.js';
|
|
8
|
-
export { type HistoryValue, type IntegralScale, type SeriesBefore, type SeriesKind, type SeriesPoint, type SeriesRead, STATISTIC_STATS, SERIES_KINDS, evaluateStatistic, integrateReading, } from './history-math.js';
|
|
10
|
+
export { type HistoryValue, type IntegralScale, type SeriesBefore, type SeriesKind, type SeriesPoint, type SeriesRead, STATISTIC_STATS, SERIES_KINDS, evaluateDerivative, evaluateStatistic, integrateReading, } from './history-math.js';
|
|
9
11
|
export { type CalendarPeriod, type CalendarWindow, type HistoryRetention, type HistoryTier, type HistoryTierPlan, type OpenRange, type ResetPeriod, type RollingSpan, type RollingWindow, type StatisticWindow, CALENDAR_PERIODS, CalendarWindowSchema, DAY_MS, DEFAULT_HISTORY_RETENTION, HISTORY_FAST_MS, HISTORY_SLOW_MS, HISTORY_TIERS, HOUR_MS, MINUTE_MS, MIN_CUSTOM_MINUTES, RESET_PERIODS, ROLLING_SPANS, RollingWindowSchema, StatisticWindowSchema, integralCadenceMs, maxDurationMs, nextLocalMidnight, openReset, openStatistic, planResetTier, planStatisticTier, rollingDurationMs, statisticCadenceMs, } from './history-window.js';
|
|
10
12
|
export { type HelperMemberFact, helperSaveProblems, } from './save.js';
|
|
11
|
-
export { type SourcePick, type SourcePickAccept, type SourcePickHistory, type SourcePickRequest, sourcePickForHistory, sourcePickForTemplate, } from './source-pick.js';
|
|
12
|
-
export { ACTIVE_CRITERIA, AGGREGATE_REDUCERS, ActiveCriterionSchema, AggregateReducerSchema, BINARY_AGGREGATES, GROUP_TEMPLATE_IDS, ApplianceHelperSpecSchema, GroupHelperSpecSchema, GroupTemplateIdSchema, HelperMemberSchema, HelperSpecSchema, INTEGRAL_OUTPUTS, IntegralHelperSpecSchema, MAX_HELPER_MEMBERS, helperMembers, NUMERIC_AGGREGATES, StatisticHelperSpecSchema, type ActiveCriterion, type AggregateReducer, type BinaryAggregate, type ApplianceHelperSpec, type GroupHelperSpec, type GroupTemplateId, type HelperMember, type HelperSpec, type IntegralHelperSpec, type IntegralOutput, type NumericAggregate, type StatisticHelperSpec, type StatisticStat, } from './spec.js';
|
|
13
|
+
export { type SourcePick, type SourcePickAccept, type SourcePickHistory, type SourcePickRequest, type MathSourceKind, sourcePickForHistory, sourcePickForMath, sourcePickForTemplate, } from './source-pick.js';
|
|
14
|
+
export { ACTIVE_CRITERIA, AGGREGATE_REDUCERS, ActiveCriterionSchema, AggregateReducerSchema, BINARY_AGGREGATES, GROUP_TEMPLATE_IDS, ApplianceHelperSpecSchema, ARITHMETIC_OPS, ArithmeticHelperSpecSchema, DERIVATIVE_UNITS, DerivativeHelperSpecSchema, EXPRESSION_OUTPUTS, ExpressionHelperSpecSchema, ThresholdHelperSpecSchema, GroupHelperSpecSchema, GroupTemplateIdSchema, HelperMemberSchema, HelperSpecSchema, INTEGRAL_OUTPUTS, IntegralHelperSpecSchema, MAX_HELPER_MEMBERS, helperMembers, isHistoryHelper, NUMERIC_AGGREGATES, StatisticHelperSpecSchema, type ActiveCriterion, type AggregateReducer, type BinaryAggregate, type ApplianceHelperSpec, type ArithmeticHelperSpec, type ArithmeticOp, type DerivativeHelperSpec, type DerivativeUnit, type ExpressionHelperSpec, type ExpressionInput, type ExpressionOutput, type ThresholdHelperSpec, type GroupHelperSpec, type GroupTemplateId, type HelperMember, type HelperSpec, type HistoryHelperSpec, type IntegralHelperSpec, type IntegralOutput, type NumericAggregate, type StatisticHelperSpec, type StatisticStat, } from './spec.js';
|
|
@@ -9,7 +9,7 @@ import type { GroupTemplate } from './catalog.js';
|
|
|
9
9
|
export interface SourcePickAccept {
|
|
10
10
|
readonly cap: string;
|
|
11
11
|
readonly fieldPath: string;
|
|
12
|
-
readonly valueKind: 'number' | 'boolean';
|
|
12
|
+
readonly valueKind: 'number' | 'boolean' | 'state';
|
|
13
13
|
}
|
|
14
14
|
export interface SourcePickHistory {
|
|
15
15
|
readonly required: boolean;
|
|
@@ -40,3 +40,10 @@ export interface SourcePick {
|
|
|
40
40
|
export declare function sourcePickForTemplate(template: GroupTemplate): SourcePickRequest;
|
|
41
41
|
/** A statistic or integral reads one field that declares history. */
|
|
42
42
|
export declare function sourcePickForHistory(kind: 'statistic' | 'integral'): SourcePickRequest;
|
|
43
|
+
export type MathSourceKind = 'threshold' | 'sum' | 'difference' | 'ratio' | 'expression' | 'derivative';
|
|
44
|
+
/**
|
|
45
|
+
* What the input step asks the selector for a math helper. A threshold reads
|
|
46
|
+
* one number, a difference or a ratio two, a sum and an expression several.
|
|
47
|
+
* A derivative reads one historised number.
|
|
48
|
+
*/
|
|
49
|
+
export declare function sourcePickForMath(kind: MathSourceKind): SourcePickRequest;
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { APPLIANCE_TEMPLATE_ID } from './appliance.js';
|
|
7
7
|
import { STATISTIC_STATS } from './history-math.js';
|
|
8
|
-
import { type ResetPeriod, type StatisticWindow } from './history-window.js';
|
|
8
|
+
import { type ResetPeriod, type RollingWindow, type StatisticWindow } from './history-window.js';
|
|
9
9
|
import { CompositionSourceRefSchema } from '../source-ref.js';
|
|
10
10
|
/** A group may name more members than an expression call (the 16-arg cap). */
|
|
11
11
|
export declare const MAX_HELPER_MEMBERS: number;
|
|
12
|
-
export declare const GROUP_TEMPLATE_IDS: readonly ['temperature', 'humidity', 'pressure', 'illuminance', 'power', 'energy', 'battery', 'numeric', 'motion', 'contact', 'leak', 'smoke', 'occupancy', 'binary', 'switch', 'light'];
|
|
12
|
+
export declare const GROUP_TEMPLATE_IDS: readonly ['temperature', 'humidity', 'pressure', 'illuminance', 'power', 'energy', 'battery', 'numeric', 'motion', 'contact', 'leak', 'smoke', 'occupancy', 'binary', 'switch', 'light', 'fan', 'cover', 'valve', 'lock', 'media-player', 'climate'];
|
|
13
13
|
export type GroupTemplateId = (typeof GROUP_TEMPLATE_IDS)[number];
|
|
14
14
|
export declare const NUMERIC_AGGREGATES: readonly ['mean', 'median', 'min', 'max', 'sum'];
|
|
15
15
|
export type NumericAggregate = (typeof NUMERIC_AGGREGATES)[number];
|
|
@@ -70,7 +70,53 @@ export type IntegralHelperSpec = {
|
|
|
70
70
|
readonly source: HelperMember;
|
|
71
71
|
};
|
|
72
72
|
export declare const IntegralHelperSpecSchema: z.ZodType<IntegralHelperSpec>;
|
|
73
|
-
|
|
73
|
+
/** Math (D944 phase 3). A reading in, a reading or a yes/no out. */
|
|
74
|
+
export type ThresholdHelperSpec = {
|
|
75
|
+
readonly kind: 'threshold';
|
|
76
|
+
readonly source: HelperMember;
|
|
77
|
+
/** The output turns on once the reading is at or above this. */
|
|
78
|
+
readonly high: number;
|
|
79
|
+
/** The output turns off once the reading is at or below this. `low <= high`. */
|
|
80
|
+
readonly low: number;
|
|
81
|
+
readonly onForMs: number;
|
|
82
|
+
readonly offForMs: number;
|
|
83
|
+
};
|
|
84
|
+
export declare const ThresholdHelperSpecSchema: z.ZodType<ThresholdHelperSpec>;
|
|
85
|
+
export declare const ARITHMETIC_OPS: readonly ['sum', 'difference', 'ratio'];
|
|
86
|
+
export type ArithmeticOp = (typeof ARITHMETIC_OPS)[number];
|
|
87
|
+
export type ArithmeticHelperSpec = {
|
|
88
|
+
readonly kind: 'arithmetic';
|
|
89
|
+
readonly op: ArithmeticOp;
|
|
90
|
+
/** Sum: two or more. Difference and ratio: exactly two, first minus / over second. */
|
|
91
|
+
readonly inputs: readonly HelperMember[];
|
|
92
|
+
};
|
|
93
|
+
export declare const ArithmeticHelperSpecSchema: z.ZodType<ArithmeticHelperSpec>;
|
|
94
|
+
export declare const EXPRESSION_OUTPUTS: readonly ['number', 'boolean'];
|
|
95
|
+
export type ExpressionOutput = (typeof EXPRESSION_OUTPUTS)[number];
|
|
96
|
+
export interface ExpressionInput {
|
|
97
|
+
readonly name: string;
|
|
98
|
+
readonly member: HelperMember;
|
|
99
|
+
}
|
|
100
|
+
export type ExpressionHelperSpec = {
|
|
101
|
+
readonly kind: 'expression';
|
|
102
|
+
readonly expr: string;
|
|
103
|
+
readonly inputs: readonly ExpressionInput[];
|
|
104
|
+
readonly output: ExpressionOutput;
|
|
105
|
+
};
|
|
106
|
+
export declare const ExpressionHelperSpecSchema: z.ZodType<ExpressionHelperSpec>;
|
|
107
|
+
export declare const DERIVATIVE_UNITS: readonly ['second', 'minute', 'hour'];
|
|
108
|
+
export type DerivativeUnit = (typeof DERIVATIVE_UNITS)[number];
|
|
109
|
+
export type DerivativeHelperSpec = {
|
|
110
|
+
readonly kind: 'derivative';
|
|
111
|
+
readonly window: RollingWindow;
|
|
112
|
+
readonly per: DerivativeUnit;
|
|
113
|
+
readonly source: HelperMember;
|
|
114
|
+
};
|
|
115
|
+
export declare const DerivativeHelperSpecSchema: z.ZodType<DerivativeHelperSpec>;
|
|
116
|
+
export type HelperSpec = GroupHelperSpec | ApplianceHelperSpec | StatisticHelperSpec | IntegralHelperSpec | ThresholdHelperSpec | ArithmeticHelperSpec | ExpressionHelperSpec | DerivativeHelperSpec;
|
|
74
117
|
export declare const HelperSpecSchema: z.ZodType<HelperSpec>;
|
|
118
|
+
/** The kinds the composer runs from device history, on a schedule. */
|
|
119
|
+
export type HistoryHelperSpec = StatisticHelperSpec | IntegralHelperSpec | DerivativeHelperSpec;
|
|
120
|
+
export declare function isHistoryHelper(spec: HelperSpec): spec is HistoryHelperSpec;
|
|
75
121
|
/** Every member a helper reads. A group has many; the others have one. */
|
|
76
122
|
export declare function helperMembers(spec: HelperSpec): readonly HelperMember[];
|
|
@@ -1138,7 +1138,7 @@ var ExpressionEvalError = class extends Error {
|
|
|
1138
1138
|
//#endregion
|
|
1139
1139
|
//#region src/expression/builtins.ts
|
|
1140
1140
|
function isStatefulBuiltin(name) {
|
|
1141
|
-
return name === "rose" || name === "count" || name === "dwell" || name === "latchedAt";
|
|
1141
|
+
return name === "rose" || name === "count" || name === "dwell" || name === "latchedAt" || name === "schmitt";
|
|
1142
1142
|
}
|
|
1143
1143
|
function asFiniteNumber(value, name, index) {
|
|
1144
1144
|
if (typeof value !== "number" || !Number.isFinite(value)) throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a finite number`);
|
|
@@ -1266,6 +1266,41 @@ function evaluateDwell(activeRaw, onForMsRaw, offForMsRaw, call, nowMs, hooks) {
|
|
|
1266
1266
|
hooks?.noteDeadline?.(call.pendingSince + delay);
|
|
1267
1267
|
return call.latched;
|
|
1268
1268
|
}
|
|
1269
|
+
/**
|
|
1270
|
+
* `schmitt(x, high, low[, onForMs, offForMs])`: true once `x >= high`, false
|
|
1271
|
+
* once `x <= low`, and the last answer in between. A transition waits its delay
|
|
1272
|
+
* and is dropped if `x` returns to the held side first. The first answer needs
|
|
1273
|
+
* a crossing, or the restored output as `seed`: a reading inside the band with
|
|
1274
|
+
* nothing to hold is unknown, never off (D393). A null reading throws, so the
|
|
1275
|
+
* field is unavailable and the latch is kept.
|
|
1276
|
+
*/
|
|
1277
|
+
function evaluateSchmitt(args, call, nowMs, seed, hooks) {
|
|
1278
|
+
const x = asFiniteNumber(args[0], "schmitt", 0);
|
|
1279
|
+
const high = asFiniteNumber(args[1], "schmitt", 1);
|
|
1280
|
+
const low = asFiniteNumber(args[2], "schmitt", 2);
|
|
1281
|
+
const onForMs = args.length > 3 ? asNonNegativeMs(args[3], "schmitt", 3) : 0;
|
|
1282
|
+
const offForMs = args.length > 4 ? asNonNegativeMs(args[4], "schmitt", 4) : 0;
|
|
1283
|
+
if (low > high) throw new ExpressionEvalError("schmitt: the low edge is above the high edge");
|
|
1284
|
+
if (call.latched === null && seed !== null) call.latched = seed;
|
|
1285
|
+
const wants = x >= high ? true : x <= low ? false : call.latched;
|
|
1286
|
+
if (call.latched === null) {
|
|
1287
|
+
if (wants !== null) call.latched = wants;
|
|
1288
|
+
return call.latched;
|
|
1289
|
+
}
|
|
1290
|
+
if (wants === null || wants === call.latched) {
|
|
1291
|
+
call.pendingSince = null;
|
|
1292
|
+
return call.latched;
|
|
1293
|
+
}
|
|
1294
|
+
if (call.pendingSince === null) call.pendingSince = nowMs;
|
|
1295
|
+
const delay = wants ? onForMs : offForMs;
|
|
1296
|
+
if (nowMs - call.pendingSince >= delay) {
|
|
1297
|
+
call.latched = wants;
|
|
1298
|
+
call.pendingSince = null;
|
|
1299
|
+
return call.latched;
|
|
1300
|
+
}
|
|
1301
|
+
hooks?.noteDeadline?.(call.pendingSince + delay);
|
|
1302
|
+
return call.latched;
|
|
1303
|
+
}
|
|
1269
1304
|
/** `latchedAt(value)`: epoch ms when `value` last changed; null clears the stamp. */
|
|
1270
1305
|
function evaluateLatchedAt(value, call, nowMs) {
|
|
1271
1306
|
if (value === null) {
|
|
@@ -1463,6 +1498,13 @@ var table = {
|
|
|
1463
1498
|
apply: () => {
|
|
1464
1499
|
throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
|
|
1465
1500
|
}
|
|
1501
|
+
},
|
|
1502
|
+
schmitt: {
|
|
1503
|
+
minArgs: 3,
|
|
1504
|
+
maxArgs: 5,
|
|
1505
|
+
apply: () => {
|
|
1506
|
+
throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
|
|
1507
|
+
}
|
|
1466
1508
|
}
|
|
1467
1509
|
};
|
|
1468
1510
|
/** Frozen, null-prototype builtin table. */
|
|
@@ -2072,6 +2114,16 @@ function evaluateStatefulExpressionCall(invocation, memory, env, hooks) {
|
|
|
2072
2114
|
memory.calls.set(invocation.path, call);
|
|
2073
2115
|
return evaluateDwell(invocation.args[0], invocation.args[1], invocation.args[2], call, env.nowMs, hooks);
|
|
2074
2116
|
}
|
|
2117
|
+
case "schmitt": {
|
|
2118
|
+
const call = existing?.kind === "schmitt" ? existing : {
|
|
2119
|
+
kind: "schmitt",
|
|
2120
|
+
latched: null,
|
|
2121
|
+
pendingSince: null
|
|
2122
|
+
};
|
|
2123
|
+
memory.calls.set(invocation.path, call);
|
|
2124
|
+
const seed = typeof env.currentOutput === "boolean" ? env.currentOutput : null;
|
|
2125
|
+
return evaluateSchmitt(invocation.args, call, env.nowMs, seed, hooks);
|
|
2126
|
+
}
|
|
2075
2127
|
case "latchedAt": {
|
|
2076
2128
|
const call = existing?.kind === "latchedAt" ? existing : {
|
|
2077
2129
|
kind: "latchedAt",
|
|
@@ -2442,6 +2494,58 @@ function integrateReading(read, scale) {
|
|
|
2442
2494
|
for (const segment of covered.segments) unitMs += segment.value * segment.ms;
|
|
2443
2495
|
return numberValue(scale === "energy-kwh" ? wattMillisecondsToKwh(unitMs) : unitMs / 1e3, covered.included, covered.gaps, GAP_REASON);
|
|
2444
2496
|
}
|
|
2497
|
+
function samplesOf(read) {
|
|
2498
|
+
const out = [];
|
|
2499
|
+
if (read.before !== null && finite(read.before.value)) out.push({
|
|
2500
|
+
at: read.from,
|
|
2501
|
+
value: read.before.value
|
|
2502
|
+
});
|
|
2503
|
+
for (const point of read.points) {
|
|
2504
|
+
if (point.t < read.from || point.t > read.to) continue;
|
|
2505
|
+
const value = pointValue(point);
|
|
2506
|
+
if (value === null) continue;
|
|
2507
|
+
const at = read.tier === "raw" || !finite(point.twMs) ? point.t : point.t + point.twMs;
|
|
2508
|
+
out.push({
|
|
2509
|
+
at: Math.min(at, read.to),
|
|
2510
|
+
value
|
|
2511
|
+
});
|
|
2512
|
+
}
|
|
2513
|
+
return out.toSorted((a, b) => a.at - b.at);
|
|
2514
|
+
}
|
|
2515
|
+
/** A sample-less tail or head longer than this share of the window is counted as a gap. */
|
|
2516
|
+
var UNCOVERED_LIMIT = .1;
|
|
2517
|
+
var DERIVATIVE_GAP_REASON = "history stops short of the window — the rate is over the part that was measured";
|
|
2518
|
+
function derivativeValue(change, spanMs, perMs, included, windowMs) {
|
|
2519
|
+
return numberValue(change / (spanMs / perMs), included, windowMs - spanMs > windowMs * UNCOVERED_LIMIT ? 1 : 0, DERIVATIVE_GAP_REASON);
|
|
2520
|
+
}
|
|
2521
|
+
/**
|
|
2522
|
+
* Rate of change over a window, per `perMs`. The slope is taken between the
|
|
2523
|
+
* first and the last measured sample, so a hole inside the window neither
|
|
2524
|
+
* counts as zero nor stretches the elapsed time. A gauge that reported
|
|
2525
|
+
* nothing after the value held at the start is flat (rate 0); fewer than two
|
|
2526
|
+
* samples and no held value is a known gap (D393).
|
|
2527
|
+
*/
|
|
2528
|
+
function evaluateDerivative(read, perMs) {
|
|
2529
|
+
if (read.truncated) return hold("the history query was truncated — the last rate is kept");
|
|
2530
|
+
if (read.to <= read.from) return gapValue("the range is empty", 0);
|
|
2531
|
+
const windowMs = read.to - read.from;
|
|
2532
|
+
const samples = samplesOf(read);
|
|
2533
|
+
const first = samples[0];
|
|
2534
|
+
const last = samples[samples.length - 1];
|
|
2535
|
+
if (first === void 0 || last === void 0) return gapValue("history has no reading in this window", 0);
|
|
2536
|
+
if (read.kind === "counter") {
|
|
2537
|
+
const heldAtStart = read.before !== null && finite(read.before.value);
|
|
2538
|
+
const startsAt = heldAtStart ? read.from : first.at;
|
|
2539
|
+
const deltas = read.points.flatMap((point) => point.t >= read.from && point.t <= read.to && finite(point.delta) && (heldAtStart || point.t > first.at) ? [point.delta] : []);
|
|
2540
|
+
const spanMs = last.at - startsAt;
|
|
2541
|
+
if (deltas.length === 0 || spanMs <= 0) return gapValue("the counter has no growth in this window", samples.length);
|
|
2542
|
+
return derivativeValue(deltas.reduce((sum, delta) => sum + delta, 0), spanMs, perMs, samples.length, windowMs);
|
|
2543
|
+
}
|
|
2544
|
+
if (samples.length === 1 && first.at === read.from && read.before !== null) return numberValue(0, 1, 0, null);
|
|
2545
|
+
const spanMs = last.at - first.at;
|
|
2546
|
+
if (samples.length < 2 || spanMs <= 0) return gapValue("the rate needs two readings in the window", samples.length);
|
|
2547
|
+
return derivativeValue(last.value - first.value, spanMs, perMs, samples.length, windowMs);
|
|
2548
|
+
}
|
|
2445
2549
|
//#endregion
|
|
2446
2550
|
//#region src/composition/helpers/history-window.ts
|
|
2447
2551
|
/**
|
|
@@ -2805,7 +2909,13 @@ var GROUP_TEMPLATE_IDS = [
|
|
|
2805
2909
|
"occupancy",
|
|
2806
2910
|
"binary",
|
|
2807
2911
|
"switch",
|
|
2808
|
-
"light"
|
|
2912
|
+
"light",
|
|
2913
|
+
"fan",
|
|
2914
|
+
"cover",
|
|
2915
|
+
"valve",
|
|
2916
|
+
"lock",
|
|
2917
|
+
"media-player",
|
|
2918
|
+
"climate"
|
|
2809
2919
|
];
|
|
2810
2920
|
var NUMERIC_AGGREGATES = [
|
|
2811
2921
|
"mean",
|
|
@@ -2868,19 +2978,73 @@ var integralHelperObject = z.object({
|
|
|
2868
2978
|
source: HelperMemberSchema
|
|
2869
2979
|
});
|
|
2870
2980
|
var IntegralHelperSpecSchema = integralHelperObject;
|
|
2981
|
+
var thresholdHelperObject = z.object({
|
|
2982
|
+
kind: z.literal("threshold"),
|
|
2983
|
+
source: HelperMemberSchema,
|
|
2984
|
+
high: z.number(),
|
|
2985
|
+
low: z.number(),
|
|
2986
|
+
onForMs: z.number().int().nonnegative(),
|
|
2987
|
+
offForMs: z.number().int().nonnegative()
|
|
2988
|
+
});
|
|
2989
|
+
var ThresholdHelperSpecSchema = thresholdHelperObject;
|
|
2990
|
+
var ARITHMETIC_OPS = [
|
|
2991
|
+
"sum",
|
|
2992
|
+
"difference",
|
|
2993
|
+
"ratio"
|
|
2994
|
+
];
|
|
2995
|
+
var arithmeticHelperObject = z.object({
|
|
2996
|
+
kind: z.literal("arithmetic"),
|
|
2997
|
+
op: z.enum(ARITHMETIC_OPS),
|
|
2998
|
+
inputs: z.array(HelperMemberSchema).min(2).max(64)
|
|
2999
|
+
});
|
|
3000
|
+
var ArithmeticHelperSpecSchema = arithmeticHelperObject;
|
|
3001
|
+
var EXPRESSION_OUTPUTS = ["number", "boolean"];
|
|
3002
|
+
var expressionHelperObject = z.object({
|
|
3003
|
+
kind: z.literal("expression"),
|
|
3004
|
+
expr: z.string().min(1),
|
|
3005
|
+
inputs: z.array(z.object({
|
|
3006
|
+
name: z.string().min(1),
|
|
3007
|
+
member: HelperMemberSchema
|
|
3008
|
+
})).min(1).max(64),
|
|
3009
|
+
output: z.enum(EXPRESSION_OUTPUTS)
|
|
3010
|
+
});
|
|
3011
|
+
var ExpressionHelperSpecSchema = expressionHelperObject;
|
|
3012
|
+
var DERIVATIVE_UNITS = [
|
|
3013
|
+
"second",
|
|
3014
|
+
"minute",
|
|
3015
|
+
"hour"
|
|
3016
|
+
];
|
|
3017
|
+
var derivativeHelperObject = z.object({
|
|
3018
|
+
kind: z.literal("derivative"),
|
|
3019
|
+
window: RollingWindowSchema,
|
|
3020
|
+
per: z.enum(DERIVATIVE_UNITS),
|
|
3021
|
+
source: HelperMemberSchema
|
|
3022
|
+
});
|
|
3023
|
+
var DerivativeHelperSpecSchema = derivativeHelperObject;
|
|
2871
3024
|
var HelperSpecSchema = z.discriminatedUnion("kind", [
|
|
2872
3025
|
GroupHelperSpecSchema,
|
|
2873
3026
|
ApplianceHelperSpecSchema,
|
|
2874
3027
|
statisticHelperObject,
|
|
2875
|
-
integralHelperObject
|
|
3028
|
+
integralHelperObject,
|
|
3029
|
+
thresholdHelperObject,
|
|
3030
|
+
arithmeticHelperObject,
|
|
3031
|
+
expressionHelperObject,
|
|
3032
|
+
derivativeHelperObject
|
|
2876
3033
|
]);
|
|
3034
|
+
function isHistoryHelper(spec) {
|
|
3035
|
+
return spec.kind === "statistic" || spec.kind === "integral" || spec.kind === "derivative";
|
|
3036
|
+
}
|
|
2877
3037
|
/** Every member a helper reads. A group has many; the others have one. */
|
|
2878
3038
|
function helperMembers(spec) {
|
|
2879
3039
|
switch (spec.kind) {
|
|
2880
3040
|
case "group": return spec.members;
|
|
2881
3041
|
case "appliance": return [spec.member];
|
|
2882
3042
|
case "statistic":
|
|
2883
|
-
case "integral":
|
|
3043
|
+
case "integral":
|
|
3044
|
+
case "threshold":
|
|
3045
|
+
case "derivative": return [spec.source];
|
|
3046
|
+
case "arithmetic": return spec.inputs;
|
|
3047
|
+
case "expression": return spec.inputs.map((input) => input.member);
|
|
2884
3048
|
}
|
|
2885
3049
|
}
|
|
2886
3050
|
//#endregion
|
|
@@ -2978,6 +3142,12 @@ var CompositionAggregateSourceSchema = z.object({
|
|
|
2978
3142
|
"all"
|
|
2979
3143
|
]),
|
|
2980
3144
|
reads: z.array(CompositionFieldReadSchema).min(1).max(64),
|
|
3145
|
+
/**
|
|
3146
|
+
* Set when the reads are an enum state, not a yes/no: the listed states
|
|
3147
|
+
* count as active (a cover is `open`). A state outside the list is inactive;
|
|
3148
|
+
* a read that is not a state at all is left out. Only `any` / `all` use it.
|
|
3149
|
+
*/
|
|
3150
|
+
activeWhen: z.array(z.string().min(1)).min(1).optional(),
|
|
2981
3151
|
/** `value` is the reading; the others are the member counts. */
|
|
2982
3152
|
publish: z.enum([
|
|
2983
3153
|
"value",
|
|
@@ -3168,4 +3338,4 @@ function featureSources(feature) {
|
|
|
3168
3338
|
return featureFieldEntries(feature).map((e) => e.source);
|
|
3169
3339
|
}
|
|
3170
3340
|
//#endregion
|
|
3171
|
-
export {
|
|
3341
|
+
export { GroupTemplateIdSchema as $, validateExpressionSource as $t, composedDeviceStableId as A, sliceActiveValue as An, planResetTier as At, AGGREGATE_REDUCERS as B, AUDIO_PRESETS as Bn, wattMillisecondsToKwh as Bt, CompositionSeriesSourceSchema as C, SOURCE_CAPS as Cn, RollingWindowSchema as Ct, MAX_COMPOSITION_FIELDS_PER_FEATURE as D, evaluateSensorEdge as Dn, nextLocalMidnight as Dt, MAX_COMPOSITION_FEATURES as E, SOURCE_DEVICE_TYPES as En, maxDurationMs as Et, compositionSourceKey as F, FFMPEG_RELEASE as Fn, STATISTIC_STATS as Ft, ArithmeticHelperSpecSchema as G, buildVideoArgs as Gn, isApplianceKind as Gt, ActiveCriterionSchema as H, buildAudioArgs as Hn, APPLIANCE_KINDS as Ht, featureFieldEntries as I, getFfmpegArtifact as In, evaluateDerivative as It, DerivativeHelperSpecSchema as J, logBannerArgs as Jn, cloneStatefulExpressionMemory as Jt, BINARY_AGGREGATES as K, invocationFromEncodeProfile as Kn, sourcePickForAppliance as Kt, featureSources as L, getFfmpegDownloadUrl as Ln, evaluateStatistic as Lt, compositionItemFieldPath as M, FFMPEG_PATH_ENV as Mn, rollingDurationMs as Mt, compositionReadKey as N, chooseFfmpegBinary as Nn, statisticCadenceMs as Nt, MAX_COMPOSITION_ITEMS as O, evaluateSensorLevelEdge as On, openReset as Ot, compositionSliceKey as P, ffmpegBinaryName as Pn, SERIES_KINDS as Pt, GroupHelperSpecSchema as Q, toExpressionValue as Qt, fieldReads as R, canonicalHash as Rn, integrateReading as Rt, CompositionSchema as S, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as Sn, ROLLING_SPANS as St, MAX_COMPOSITION_CODE_LENGTH as T, SOURCE_CAP_CHANGED_AT_FIELD as Tn, integralCadenceMs as Tt, AggregateReducerSchema as U, buildFfmpegArgs as Un, APPLIANCE_TEMPLATE_ID as Ut, ARITHMETIC_OPS as V, audioPlanFromEncodeProfile as Vn, APPLIANCE_DEFAULTS as Vt, ApplianceHelperSpecSchema as W, buildInputArgs as Wn, applianceDeviceType as Wt, ExpressionHelperSpecSchema as X, resolveStreamMaps as Xn, evaluateExpressionSource as Xt, EXPRESSION_OUTPUTS as Y, pickVideoEncoder as Yn, createStatefulExpressionMemory as Yt, GROUP_TEMPLATE_IDS as Z, evaluateStatefulExpressionCall as Zt, CompositionFromSourceSchema as _, evaluateCount as _n, HISTORY_TIERS as _t, CUSTOMIZATION_BLOCK_NAME_PREFIX as a, tokenize as an, NUMERIC_AGGREGATES as at, CompositionNewTargetSchema as b, ExpressionEvalError as bn, MIN_CUSTOM_MINUTES as bt, CompositionCodeSourceSchema as c, MAX_EXPRESSION_AST_NODES as cn, helperMembers as ct, CompositionExpressionSourceSchema as d, MAX_EXPRESSION_EVAL_STEPS as dn, CALENDAR_PERIODS as dt, createExpressionScope as en, HelperMemberSchema as et, CompositionFeatureSchema as f, MAX_EXPRESSION_SOURCE_LENGTH as fn, CalendarWindowSchema as ft, CompositionForwardCommandSchema as g, disarmRoseMemory as gn, HISTORY_SLOW_MS as gt, CompositionFieldsFeatureSchema as h, EXPRESSION_BUILTIN_NAMES as hn, HISTORY_FAST_MS as ht, COMPOSITION_ITEM_KEY_RE as i, parseExpression as in, MAX_HELPER_MEMBERS as it, compositionFeatureEnabled as j, sliceChangedAt as jn, planStatisticTier as jt, composedDeviceRef as k, isSourceCap as kn, openStatistic as kt, CompositionCommandTargetSchema as l, MAX_EXPRESSION_BINDINGS as ln, isHistoryHelper as lt, CompositionFieldSourceSchema as m, EXPRESSION_BUILTINS as mn, DEFAULT_HISTORY_RETENTION as mt, COMPOSER_ADDON_ID as n, compileExpression as nn, INTEGRAL_OUTPUTS as nt, CompositionAggregateSourceSchema as o, EXPRESSION_COMPILE_CACHE_CAPACITY as on, StatisticHelperSpecSchema as ot, CompositionFieldReadSchema as p, RESERVED_BINDING_NAMES as pn, DAY_MS as pt, DERIVATIVE_UNITS as q, isSoftwareDecode as qn, EXPRESSION_INJECTED_NOW as qt, COMPOSITION_ITEM_ARRAY_PATH as r, compileExpressionSafe as rn, IntegralHelperSpecSchema as rt, CompositionBindingSchema as s, EXPRESSION_IDENTIFIER_RE as sn, ThresholdHelperSpecSchema as st, COMPOSED_DEVICE_STABLE_ID_PREFIX as t, evaluateAst as tn, HelperSpecSchema as tt, CompositionExistingTargetSchema as u, MAX_EXPRESSION_CALL_ARGS as un, CompositionSourceRefSchema as ut, CompositionItemEntrySchema as v, evaluateRose as vn, HOUR_MS as vt, CompositionTargetSchema as w, SOURCE_CAP_ACTIVE_FIELD as wn, StatisticWindowSchema as wt, CompositionPassthroughFeatureSchema as x, ExpressionParseError as xn, RESET_PERIODS as xt, CompositionLiteralBindingSchema as y, isStatefulBuiltin as yn, MINUTE_MS as yt, ACTIVE_CRITERIA as z, Fmp4BoxSplitter as zn, KWH_PER_WATT_MS as zt };
|