@camstack/addon-agent-ui 1.2.319 → 1.2.321

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.321] - 2026-11-03
11
+
12
+ ### Changed
13
+
14
+ - Rebuilt against updated dependencies.
15
+
16
+ ## [1.2.320] - 2026-11-03
17
+
18
+ ### Changed
19
+
20
+ - Rebuilt against updated dependencies.
21
+
10
22
  ## [1.2.319] - 2026-11-03
11
23
 
12
24
  ### Changed
@@ -368,13 +368,13 @@
368
368
  "server/server/packages/addon-agent-ui/src/updates-panel.tsx": "ec6b5b3701322bbb68dbe581703409cd373418cf9227ce829ea0945e70e60d54",
369
369
  "server/server/packages/addon-agent-ui/src/use-pairing-status.ts": "46193a1e83a64250dfff75d417448d74ba0159465e710861b996e903b03e427a",
370
370
  "server/server/packages/sdk/dist/index.js": "89409bfb9632c46ed63ee4882c70b7994c1ff90c67d27a5d4b86b0990c41a131",
371
- "server/server/packages/types/dist/client.mjs": "29aec32cd1776767c51423f18198dab43b87e4608e76b85ffd6c9f837b4fa705",
372
- "server/server/packages/types/dist/composition-CD1GdFuv.mjs": "968b9e385cf4b36059c28614f34427cecd938ace7fb34002926dce0c1bd5cad8",
371
+ "server/server/packages/types/dist/client.mjs": "45e65b47085b8da478fb007edb2d8a1b9dd63bd038fce1824703e9dc545be007",
372
+ "server/server/packages/types/dist/composition-CRNwcFYY.mjs": "1048403c738696fa02e5c3d680003d33b6c13751d157ed871e2f3ac11b9b5eaf",
373
373
  "server/server/packages/types/dist/device-type-D1fH5kaC.mjs": "4002ae7c812789715d7a35271c91b8133511b710eaeb07fea061d285db3dc14a",
374
374
  "server/server/packages/types/dist/event-category-BmPm98n0.mjs": "3617fc3941b34f1dcc8ebd3c1360e8c302747400d43e3ab694388496c2bb568d",
375
- "server/server/packages/types/dist/index.mjs": "053943c477da6f25c94271757454c598144e107cc2c885226b2b996515448b44",
375
+ "server/server/packages/types/dist/index.mjs": "742cfe608dddbc9f7e8576161d3ea9255346c06156bffdbc12c270ad2fc50538",
376
376
  "server/server/packages/types/dist/node-color.mjs": "942e663074f0a4ed2f8643848ec139eba4b5fd16d0d01c8a23e08a4819a8843b",
377
- "server/server/packages/types/dist/sleep-DV4qxEyD.mjs": "39684da29db5b6f370d1e303bcb1e10fd0dc2f7b14f2d2dec006069eed98e3f7",
377
+ "server/server/packages/types/dist/sleep-BSQ0OgQT.mjs": "9a7acfc6a077a292338dbd6ba9c05467cadec6e5b123611692ac4aa074812207",
378
378
  "server/server/packages/ui-library/src/composites/adaptive-downlink.ts": "6e9698e97721461b72a3750f930dd7214d049be865491bfb5a64b87c032b0e22",
379
379
  "server/server/packages/ui-library/src/composites/camera-stream-player.tsx": "c04809229b4e091fed09e2bcfe643d6b36cb3a39e294229b49f8a095e4e6ebd3",
380
380
  "server/server/packages/ui-library/src/composites/cap-settings/CameraGridLayoutEditor.tsx": "bfe36ccad931ef0981fe24fa315f136d35dbc3164df221346806173447178324",
@@ -487,7 +487,7 @@
487
487
  "server/server/packages/ui-library/src/contexts/vod-playback.tsx": "c07bc3ecc786182ef2f27d13bec3f520288e0b47367edd7ddf1c2e7b4a2bbaee",
488
488
  "server/server/packages/ui-library/src/contexts/widget-registry.tsx": "71a2815c645abe96821a9e9e5668e321187527d569414f5ca197d615856cc17a",
489
489
  "server/server/packages/ui-library/src/contexts/zone-editing.tsx": "275f680304ab09dd747fd9e859dc5aa0535df33eb2d33eb669a6de66bdd848d0",
490
- "server/server/packages/ui-library/src/generated/system-hooks.ts": "50a1c989d50a9116a65e0e8349cb67f4a3e6d08e6478ed86ef47190fef191594",
490
+ "server/server/packages/ui-library/src/generated/system-hooks.ts": "c2bfff736e496d41ff925445be816e59803d5f11b45214f4a01547d2c9d5782e",
491
491
  "server/server/packages/ui-library/src/hooks/turn-server-cache.ts": "fab22f069c3761e0d268449e056d9c499b6ea63b879684a40023735b34bad061",
492
492
  "server/server/packages/ui-library/src/hooks/use-device-capability.ts": "b74ede60be8039c45f6c712a407ee838ab208610435870ddabaa8598cb7cd7f3",
493
493
  "server/server/packages/ui-library/src/hooks/use-device-detections.ts": "61cc54cf2e7f53864e5aa533c05679e4c204c4004a0296f63ab169b003888611",
@@ -528,7 +528,7 @@
528
528
  "server/server/packages/ui-library/src/primitives/popover.tsx": "f9ba386cb8ce82780a791667fa4f1e35d0d7a435ab9e323012a6753316a8d636",
529
529
  "server/server/packages/ui-library/src/primitives/radio.tsx": "bbb7e67e2e5a07e60c0d0545d4a8fa6f02f80758be8b820b6963760ff7f0561d",
530
530
  "server/server/packages/ui-library/src/primitives/scroll-area.tsx": "681c6f6852b294808b946689e276457baa6cd3ed4b0b943ab51d637863d8d58e",
531
- "server/server/packages/ui-library/src/primitives/select.tsx": "fda85853e194f9211642765c303d1812b4402de9003d86a659d323f747d88d99",
531
+ "server/server/packages/ui-library/src/primitives/select.tsx": "b88105f1bfccd1e62e78cb07badfcca423b3447f39ac39770237ff7b9724d819",
532
532
  "server/server/packages/ui-library/src/primitives/separator.tsx": "a619d82e35635e269d1ac9799c8e3846bd9a13481804e7ff69efb734184c3f6c",
533
533
  "server/server/packages/ui-library/src/primitives/skeleton.tsx": "039478c8d7d6741a30cae85650ec2798d0dd1e41b772de42be896471df082e50",
534
534
  "server/server/packages/ui-library/src/primitives/slider.tsx": "6d931092aaa4923c1b2f31aea78aac78b9ca4f7a68425ad6f973a8f1389dbd10",
package/dist/addon.js CHANGED
@@ -5849,7 +5849,7 @@ var ZodIssueCode = {
5849
5849
  var ZodFirstPartyTypeKind;
5850
5850
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5851
5851
  //#endregion
5852
- //#region ../types/dist/sleep-DV4qxEyD.mjs
5852
+ //#region ../types/dist/sleep-BSQ0OgQT.mjs
5853
5853
  /**
5854
5854
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5855
5855
  * window to float samples (D455).
@@ -11309,7 +11309,7 @@ object({
11309
11309
  params: record(string(), union([string(), number()])).optional()
11310
11310
  });
11311
11311
  //#endregion
11312
- //#region ../types/dist/composition-CD1GdFuv.mjs
11312
+ //#region ../types/dist/composition-CRNwcFYY.mjs
11313
11313
  /**
11314
11314
  * The ffmpeg build every CamStack node downloads, per platform and arch.
11315
11315
  *
@@ -12072,38 +12072,6 @@ function validateExpressionSource(src) {
12072
12072
  return null;
12073
12073
  }
12074
12074
  /**
12075
- * One power reading becomes a washer, dryer or dishwasher (D944 helper).
12076
- *
12077
- * Standby of the control board is under 5 W; a motor or a heater is far
12078
- * above that, so 5 W is the line. A door lock or a short pump spike is not
12079
- * a cycle, so running starts only after 30 s above the line.
12080
- *
12081
- * A wash, dry or dishwasher pause (soak, heat-wait, heater off between
12082
- * bursts) lasts several minutes. Ending the cycle on the first dip would
12083
- * report "finished" in the middle of the program, so the stop dwell is
12084
- * 10 minutes on every type. The number is stored per type so one machine
12085
- * can move later without moving the others.
12086
- */
12087
- var APPLIANCE_TEMPLATE_ID = "appliance";
12088
- var APPLIANCE_KINDS = [
12089
- "washer",
12090
- "dryer",
12091
- "dishwasher"
12092
- ];
12093
- DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
12094
- /**
12095
- * A dumb plug-in stove or heater, built from a smart plug (a `Heater`).
12096
- *
12097
- * The plug is the actuator: `switch.setState` is a FORWARD to the plug's own
12098
- * (D967), so the heater switches exactly as the plug does. Running is the
12099
- * plug being on; when a power reading is also named, running is the draw
12100
- * staying above the line instead (a plug left on with the stove's own
12101
- * thermostat open is not heating). 50 W is far above any standby and below
12102
- * the smallest radiator.
12103
- */
12104
- var HEATER_TEMPLATE_ID = "heater";
12105
- DeviceType.Heater;
12106
- /**
12107
12075
  * Statistics and integrals over a history read (D944).
12108
12076
  *
12109
12077
  * Pure: the same points always give the same answer, so a restart recomputes
@@ -12247,34 +12215,6 @@ var HelperSpecSchema = discriminatedUnion("kind", [
12247
12215
  /** Actuator groups only. Readings leave this unset. */
12248
12216
  active: ActiveCriterionSchema.optional()
12249
12217
  }),
12250
- object({
12251
- kind: literal("appliance"),
12252
- templateId: literal(APPLIANCE_TEMPLATE_ID),
12253
- appliance: _enum(APPLIANCE_KINDS),
12254
- thresholdWatts: number().positive(),
12255
- startDwellMs: number().int().nonnegative(),
12256
- stopDwellMs: number().int().nonnegative(),
12257
- member: HelperMemberSchema,
12258
- /**
12259
- * The plug that powers the appliance (`switch.on`). Optional: when set, the
12260
- * composition carries a `power-source` feature, so the hub can cut and restore
12261
- * that plug (power-source link of a NEW-target composition).
12262
- */
12263
- powerSwitch: HelperMemberSchema.optional(),
12264
- /** How long a forced restart keeps the plug off; the cap's default when unset. */
12265
- offSeconds: number().optional()
12266
- }),
12267
- object({
12268
- kind: literal("heater"),
12269
- templateId: literal(HEATER_TEMPLATE_ID),
12270
- /** The plug, read and commanded at `switch.on`. */
12271
- plug: HelperMemberSchema,
12272
- /** The plug's power reading, when it has one: running is then the draw, not the switch. */
12273
- meter: HelperMemberSchema.optional(),
12274
- thresholdWatts: number().positive(),
12275
- startDwellMs: number().int().nonnegative(),
12276
- stopDwellMs: number().int().nonnegative()
12277
- }),
12278
12218
  object({
12279
12219
  kind: literal("statistic"),
12280
12220
  stat: _enum(STATISTIC_STATS),
@@ -48081,49 +48021,6 @@ function actuator(input) {
48081
48021
  };
48082
48022
  }
48083
48023
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
48084
- var PowerSourceRefusalReasonSchema = _enum([
48085
- "no-power-source",
48086
- "switch-missing",
48087
- "switch-offline",
48088
- "switch-unknown",
48089
- "restart-in-progress",
48090
- "switch-call-failed"
48091
- ]);
48092
- var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
48093
- accepted: literal(false),
48094
- reason: PowerSourceRefusalReasonSchema,
48095
- /** One line for the operator, naming the switch. */
48096
- message: string()
48097
- })]);
48098
- var PowerSourceInfoSchema = object({
48099
- /** False when the device has no power source linked; the rest is then empty. */
48100
- linked: boolean(),
48101
- switchDeviceId: number().nullable(),
48102
- switchName: string().nullable(),
48103
- /** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
48104
- switchOn: boolean().nullable(),
48105
- switchOnline: boolean().nullable(),
48106
- restartInProgress: boolean(),
48107
- offSeconds: number().int()
48108
- });
48109
- object({
48110
- /** Null while the switch has not reported: unknown is never `false` (D393). */
48111
- switchOn: boolean().nullable(),
48112
- offSeconds: number().int(),
48113
- lastFetchedAt: number()
48114
- });
48115
- DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater;
48116
- var deviceInput$2 = object({ deviceId: number().int().nonnegative() });
48117
- systemMethod(deviceInput$2, PowerSourceInfoSchema, { auth: "admin" }), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
48118
- kind: "mutation",
48119
- auth: "admin"
48120
- }), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
48121
- kind: "mutation",
48122
- auth: "admin"
48123
- }), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
48124
- kind: "mutation",
48125
- auth: "admin"
48126
- });
48127
48024
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
48128
48025
  DeviceType.Camera;
48129
48026
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
@@ -48151,6 +48048,165 @@ var ComposableCapabilitiesSchema = object({ caps: array(object({
48151
48048
  }).optional()
48152
48049
  })) });
48153
48050
  /**
48051
+ * A saved Customize assignment (D936). The schema is the type: callers use
48052
+ * `z.infer`, they do not restate the shape.
48053
+ */
48054
+ var OverrideSourceSchema = object({
48055
+ addonId: string().min(1),
48056
+ stableId: string().min(1),
48057
+ cap: string().min(1),
48058
+ fieldPath: string().min(1)
48059
+ });
48060
+ var IdentityTransformDraftSchema = object({ kind: literal("identity") });
48061
+ var InvertTransformDraftSchema = object({ kind: literal("invert") });
48062
+ var ThresholdTransformDraftSchema = object({
48063
+ kind: literal("threshold"),
48064
+ comparison: _enum(["gte", "lte"]),
48065
+ threshold: number(),
48066
+ startDwellMs: number().nonnegative(),
48067
+ stopDwellMs: number().nonnegative()
48068
+ });
48069
+ var CustomizeTransformDraftSchema = discriminatedUnion("kind", [
48070
+ IdentityTransformDraftSchema,
48071
+ InvertTransformDraftSchema,
48072
+ ThresholdTransformDraftSchema,
48073
+ object({
48074
+ kind: literal("linear"),
48075
+ scale: number(),
48076
+ offset: number(),
48077
+ clampMin: number().optional(),
48078
+ clampMax: number().optional()
48079
+ }),
48080
+ object({
48081
+ kind: literal("enum-map"),
48082
+ mapping: record(string(), string().nullable())
48083
+ }),
48084
+ object({ kind: literal("number") })
48085
+ ]);
48086
+ var ScalarOverrideDraftSchema = object({
48087
+ kind: literal("scalar"),
48088
+ cap: string().min(1),
48089
+ targetId: string().min(1),
48090
+ source: OverrideSourceSchema,
48091
+ transform: CustomizeTransformDraftSchema
48092
+ });
48093
+ var KeyedArrayOverrideDraftSchema = object({
48094
+ kind: literal("keyedArray"),
48095
+ cap: string().min(1),
48096
+ targetId: string().min(1),
48097
+ key: string().min(1),
48098
+ label: string().min(1),
48099
+ fieldPath: string().min(1),
48100
+ source: OverrideSourceSchema,
48101
+ transform: CustomizeTransformDraftSchema
48102
+ });
48103
+ var PulseOverrideDraftSchema = object({
48104
+ kind: literal("pulse"),
48105
+ cap: string().min(1),
48106
+ targetId: string().min(1),
48107
+ enabled: boolean(),
48108
+ debounceMs: number().nonnegative(),
48109
+ edges: array(_enum([
48110
+ "rising",
48111
+ "button",
48112
+ "native-event"
48113
+ ])).min(1).optional(),
48114
+ sources: array(OverrideSourceSchema).min(1)
48115
+ });
48116
+ var SpanSourceDraftSchema = OverrideSourceSchema.extend({ mode: _enum([
48117
+ "in-addition",
48118
+ "confirm",
48119
+ "replace"
48120
+ ]).optional() });
48121
+ discriminatedUnion("kind", [
48122
+ ScalarOverrideDraftSchema,
48123
+ KeyedArrayOverrideDraftSchema,
48124
+ PulseOverrideDraftSchema,
48125
+ object({
48126
+ kind: literal("span"),
48127
+ cap: string().min(1),
48128
+ targetId: string().min(1),
48129
+ timeoutMs: number().nonnegative(),
48130
+ cooldownMs: number().nonnegative().optional(),
48131
+ sources: array(SpanSourceDraftSchema)
48132
+ })
48133
+ ]);
48134
+ object({
48135
+ targetId: string().min(1),
48136
+ configured: boolean(),
48137
+ source: _enum(["native", "assigned"]),
48138
+ state: _enum([
48139
+ "active",
48140
+ "stale",
48141
+ "released",
48142
+ "unavailable"
48143
+ ]),
48144
+ reason: string().nullable()
48145
+ });
48146
+ /**
48147
+ * What a running-threshold proposal says (planning#405). The schema is the
48148
+ * type: the algorithm, the capability method and the UI all read `z.infer`.
48149
+ *
48150
+ * A proposal is read-only advice: it carries the numbers it was derived from
48151
+ * (`evidence`) so the operator can judge it, and an `insufficient` answer names
48152
+ * WHY with a typed reason and the catalog defaults, never an invented number.
48153
+ */
48154
+ var RunningProposalTierSchema = _enum(["raw", "5m"]);
48155
+ var RunningProposalConfidenceSchema = _enum([
48156
+ "high",
48157
+ "medium",
48158
+ "low"
48159
+ ]);
48160
+ var RunningProposalInsufficientReasonSchema = _enum([
48161
+ "no-history",
48162
+ "span-too-short",
48163
+ "truncated",
48164
+ "no-idle-floor",
48165
+ "no-runs",
48166
+ "no-separation"
48167
+ ]);
48168
+ var RunningProposalReplaySchema = object({
48169
+ /** Intervals the real dwell expression held true over the window. */
48170
+ intervals: number().int().nonnegative(),
48171
+ /** Intervals outside every run, or a second interval inside one. */
48172
+ extra: number().int().nonnegative(),
48173
+ /** Runs without an interval of their own (none, or merged into a neighbour). */
48174
+ missed: number().int().nonnegative()
48175
+ });
48176
+ var RunningProposalEvidenceSchema = object({
48177
+ tier: RunningProposalTierSchema,
48178
+ spanMs: number().nonnegative(),
48179
+ from: number(),
48180
+ to: number(),
48181
+ points: number().int().nonnegative(),
48182
+ runsFound: number().int().nonnegative(),
48183
+ pausesFound: number().int().nonnegative(),
48184
+ longestPauseMs: number().nonnegative(),
48185
+ idleFloorW: number(),
48186
+ noiseCeilingW: number(),
48187
+ plateauW: number(),
48188
+ replay: RunningProposalReplaySchema
48189
+ });
48190
+ var RunningProposalInsufficientEvidenceSchema = object({
48191
+ spanMs: number().nonnegative(),
48192
+ points: number().int().nonnegative(),
48193
+ runsFound: number().int().nonnegative()
48194
+ });
48195
+ var RunningThresholdProposalSchema = discriminatedUnion("state", [object({
48196
+ state: literal("proposal"),
48197
+ transform: ThresholdTransformDraftSchema,
48198
+ evidence: RunningProposalEvidenceSchema,
48199
+ confidence: RunningProposalConfidenceSchema,
48200
+ /** Why the confidence is not higher; empty when nothing held it back. */
48201
+ notes: array(string())
48202
+ }), object({
48203
+ state: literal("insufficient"),
48204
+ reason: RunningProposalInsufficientReasonSchema,
48205
+ evidence: RunningProposalInsufficientEvidenceSchema,
48206
+ /** The catalog defaults, offered as what stands when nothing better is known. */
48207
+ fallback: ThresholdTransformDraftSchema
48208
+ })]);
48209
+ /**
48154
48210
  * The report of a one-shot "move this owner's plaintext secrets into the
48155
48211
  * keychain" run (D878). COUNTS only - never a value, never a ref.
48156
48212
  *
@@ -48440,6 +48496,14 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
48440
48496
  kind: "mutation",
48441
48497
  auth: "admin",
48442
48498
  access: "view"
48499
+ }), method(object({
48500
+ deviceId: number().int(),
48501
+ cap: string().min(1),
48502
+ fieldPath: string().min(1),
48503
+ deviceType: _enum(DeviceType).optional()
48504
+ }), RunningThresholdProposalSchema, {
48505
+ auth: "admin",
48506
+ access: "view"
48443
48507
  }), method(object({
48444
48508
  blockId: string().min(1),
48445
48509
  trace: AutomationRunTraceSchema.optional(),
@@ -52540,15 +52604,15 @@ var FanPresetCaptureResultSchema = object({
52540
52604
  items: array(FanCaptureItemSchema),
52541
52605
  omitted: array(FanCaptureOmissionSchema)
52542
52606
  });
52543
- var deviceInput$1 = object({ deviceId: number().int().nonnegative() });
52607
+ var deviceInput$2 = object({ deviceId: number().int().nonnegative() });
52544
52608
  DeviceType.Fan;
52545
- method(deviceInput$1, array(FanPresetSchema), { auth: "protected" }), method(deviceInput$1.extend({ presets: array(FanPresetSchema).max(12) }), FanPresetsSetResultSchema, {
52609
+ method(deviceInput$2, array(FanPresetSchema), { auth: "protected" }), method(deviceInput$2.extend({ presets: array(FanPresetSchema).max(12) }), FanPresetsSetResultSchema, {
52546
52610
  kind: "mutation",
52547
52611
  auth: "admin"
52548
- }), method(deviceInput$1.extend({ presetId: string().min(1) }), FanPresetApplyResultSchema, {
52612
+ }), method(deviceInput$2.extend({ presetId: string().min(1) }), FanPresetApplyResultSchema, {
52549
52613
  kind: "mutation",
52550
52614
  auth: "protected"
52551
- }), method(deviceInput$1.extend({
52615
+ }), method(deviceInput$2.extend({
52552
52616
  fields: array(FanCaptureFieldSchema).optional(),
52553
52617
  steps: array(ActionStepSchema).max(20).default([])
52554
52618
  }), FanPresetCaptureResultSchema, { auth: "protected" });
@@ -54932,6 +54996,11 @@ var LogEntrySchema = object({
54932
54996
  * flight, and not asking for the next slice ends the scan.
54933
54997
  */
54934
54998
  var LogReadQuerySchema = object({
54999
+ /**
55000
+ * Which destination INSTANCE answers (a destination addon may hold several records). Absent ⇒
55001
+ * the provider's first readable one, so a caller written before instances existed is unchanged.
55002
+ */
55003
+ instanceId: string().min(1).max(200).optional(),
54935
55004
  /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
54936
55005
  requestId: string().min(1).max(64).optional(),
54937
55006
  /** The device the line is about (`tags.deviceId`, numeric). */
@@ -54994,6 +55063,8 @@ var LogReadResultSchema = object({
54994
55063
  /** True when `cancelRead` ended this slice early. */
54995
55064
  cancelled: boolean().optional()
54996
55065
  });
55066
+ /** Names one destination instance; absent ⇒ the provider's first readable one. */
55067
+ var LogInstanceSelectorSchema = object({ instanceId: string().min(1).max(200).optional() });
54997
55068
  var LogReadCapabilitiesSchema = object({
54998
55069
  /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
54999
55070
  readable: boolean(),
@@ -55012,7 +55083,7 @@ var LogReadCapabilitiesSchema = object({
55012
55083
  /** How far back the store reaches, when the provider knows (days). */
55013
55084
  retentionDays: number().nullable()
55014
55085
  });
55015
- method(LogEntrySchema, _void(), { kind: "mutation" }), optionalMethod(_void(), LogReadCapabilitiesSchema, { auth: "admin" }), optionalMethod(LogReadQuerySchema, LogReadResultSchema, { auth: "admin" }), optionalMethod(object({ requestId: string().min(1).max(64) }), object({ cancelled: boolean() }), {
55086
+ method(LogEntrySchema, _void(), { kind: "mutation" }), optionalMethod(LogInstanceSelectorSchema, LogReadCapabilitiesSchema, { auth: "admin" }), optionalMethod(LogReadQuerySchema, LogReadResultSchema, { auth: "admin" }), optionalMethod(object({ requestId: string().min(1).max(64) }), object({ cancelled: boolean() }), {
55016
55087
  kind: "mutation",
55017
55088
  auth: "admin"
55018
55089
  });
@@ -66584,6 +66655,49 @@ object({
66584
66655
  DeviceType.PetFeeder,
66585
66656
  DeviceType.Heater
66586
66657
  ].filter((type) => type !== DeviceType.Sensor);
66658
+ var PowerSourceRefusalReasonSchema = _enum([
66659
+ "no-power-source",
66660
+ "switch-missing",
66661
+ "switch-offline",
66662
+ "switch-unknown",
66663
+ "restart-in-progress",
66664
+ "switch-call-failed"
66665
+ ]);
66666
+ var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
66667
+ accepted: literal(false),
66668
+ reason: PowerSourceRefusalReasonSchema,
66669
+ /** One line for the operator, naming the switch. */
66670
+ message: string()
66671
+ })]);
66672
+ var PowerSourceInfoSchema = object({
66673
+ /** False when the device has no power source linked; the rest is then empty. */
66674
+ linked: boolean(),
66675
+ switchDeviceId: number().nullable(),
66676
+ switchName: string().nullable(),
66677
+ /** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
66678
+ switchOn: boolean().nullable(),
66679
+ switchOnline: boolean().nullable(),
66680
+ restartInProgress: boolean(),
66681
+ offSeconds: number().int()
66682
+ });
66683
+ object({
66684
+ /** Null while the switch has not reported: unknown is never `false` (D393). */
66685
+ switchOn: boolean().nullable(),
66686
+ offSeconds: number().int(),
66687
+ lastFetchedAt: number()
66688
+ });
66689
+ DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater;
66690
+ var deviceInput$1 = object({ deviceId: number().int().nonnegative() });
66691
+ systemMethod(deviceInput$1, PowerSourceInfoSchema, { auth: "admin" }), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
66692
+ kind: "mutation",
66693
+ auth: "admin"
66694
+ }), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
66695
+ kind: "mutation",
66696
+ auth: "admin"
66697
+ }), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
66698
+ kind: "mutation",
66699
+ auth: "admin"
66700
+ });
66587
66701
  /**
66588
66702
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
66589
66703
  * on `DeviceType.Presence`. Read-only — no setters: presence is
@@ -74637,6 +74751,25 @@ function buildDescriptor(capName, kind) {
74637
74751
  * contributes one entry per bound cap present in this map.
74638
74752
  */
74639
74753
  var EVENT_KIND_BY_CAP = Object.freeze(Object.fromEntries(Object.entries(CAP_TO_KIND).map(([capName, kind]) => [capName, buildDescriptor(capName, kind)])));
74754
+ /**
74755
+ * What a remote key is CALLED and what it LOOKS like, for every role (D963),
74756
+ * shared by the admin UI and the viewer. A role is data on the wire; each
74757
+ * client resolves its name from `label` (English and Italian side by side) and
74758
+ * its glyph from `icon`, a lucide id from the shared icon catalogue — the
74759
+ * server sends an id, a client maps it to its own icon set.
74760
+ *
74761
+ * `legend` is text printed on the key INSTEAD of a glyph (a digit has no
74762
+ * pictogram): a client that can draw text shows it, one that cannot falls back
74763
+ * to `icon`.
74764
+ */
74765
+ function digit(n) {
74766
+ return {
74767
+ label: t(n, n),
74768
+ icon: "hash",
74769
+ legend: n
74770
+ };
74771
+ }
74772
+ digit("0"), digit("1"), digit("2"), digit("3"), digit("4"), digit("5"), digit("6"), digit("7"), digit("8"), digit("9");
74640
74773
  DeviceFeature.MediaPlayerPower, DeviceFeature.MediaPlayerVolumeStep, DeviceFeature.MediaPlayerChannelStep, DeviceFeature.MediaPlayerMute, DeviceFeature.MediaPlayerStop, DeviceFeature.MediaPlayerNext, DeviceFeature.MediaPlayerPrevious;
74641
74774
  var btn = (idSuffix, row, col, init) => ({
74642
74775
  idSuffix,
@@ -74764,6 +74897,34 @@ discriminatedUnion("kind", [object({
74764
74897
  kind: literal("pronto"),
74765
74898
  code: string()
74766
74899
  })]);
74900
+ /**
74901
+ * Propose a running threshold from a device's own power history (planning#405).
74902
+ *
74903
+ * Pure and deterministic: the same series gives the same answer. The series is
74904
+ * a HELD-VALUE step series — a point's value stands until the next point — which
74905
+ * is how device-history stores a gauge, so "time at a level" is exact, not a
74906
+ * count of samples.
74907
+ *
74908
+ * 1. idle floor F = time-weighted median; noise ceiling N = highest value seen
74909
+ * near F. A device that is not near one level most of the time has no floor.
74910
+ * 2. coarse activity = above max(2N, N + 5 W); consecutive stretches are episodes.
74911
+ * 3. gaps between episodes split in two by the largest log-scale jump (>= 3x):
74912
+ * the short ones are pauses INSIDE a run (a soak), the long ones separate runs.
74913
+ * 4. T = geometric mean of N and the plateau's 10th percentile, snapped to a
74914
+ * grid a person would type; stop dwell covers the longest pause; start dwell
74915
+ * covers the longest standby blip above T.
74916
+ * 5. the numbers are proved by REPLAY through the real `dwell` evaluation: each
74917
+ * run must hold exactly one true interval and nothing may flap outside.
74918
+ */
74919
+ var SECOND_MS = 1e3;
74920
+ var MINUTE_MS$1 = 60 * SECOND_MS;
74921
+ 24 * (60 * MINUTE_MS$1);
74922
+ 10 * MINUTE_MS$1;
74923
+ 30 * SECOND_MS;
74924
+ 60 * SECOND_MS;
74925
+ 20 * MINUTE_MS$1;
74926
+ 10 * SECOND_MS;
74927
+ 10 * SECOND_MS;
74767
74928
  DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverStoppable, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
74768
74929
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
74769
74930
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
@@ -76305,6 +76466,13 @@ Object.freeze({
76305
76466
  access: "create",
76306
76467
  role: "admin"
76307
76468
  },
76469
+ "coreBlocks.proposeRunningThreshold": {
76470
+ capName: "core-blocks",
76471
+ capScope: "system",
76472
+ addonId: null,
76473
+ access: "view",
76474
+ role: "admin"
76475
+ },
76308
76476
  "coreBlocks.reportAutomationRun": {
76309
76477
  capName: "core-blocks",
76310
76478
  capScope: "system",
@@ -85763,6 +85931,11 @@ Object.freeze({
85763
85931
  form: "single",
85764
85932
  optional: false
85765
85933
  }],
85934
+ "coreBlocks.proposeRunningThreshold": [{
85935
+ name: "deviceId",
85936
+ form: "single",
85937
+ optional: false
85938
+ }],
85766
85939
  "cover.close": [{
85767
85940
  name: "deviceId",
85768
85941
  form: "single",
@@ -88426,99 +88599,6 @@ Object.freeze({
88426
88599
  "network-access": "ingress",
88427
88600
  "smtp-provider": "email"
88428
88601
  });
88429
- /**
88430
- * A saved Customize assignment (D936). The schema is the type: callers use
88431
- * `z.infer`, they do not restate the shape.
88432
- */
88433
- var OverrideSourceSchema = object({
88434
- addonId: string().min(1),
88435
- stableId: string().min(1),
88436
- cap: string().min(1),
88437
- fieldPath: string().min(1)
88438
- });
88439
- var CustomizeTransformDraftSchema = discriminatedUnion("kind", [
88440
- object({ kind: literal("identity") }),
88441
- object({ kind: literal("invert") }),
88442
- object({
88443
- kind: literal("threshold"),
88444
- comparison: _enum(["gte", "lte"]),
88445
- threshold: number(),
88446
- startDwellMs: number().nonnegative(),
88447
- stopDwellMs: number().nonnegative()
88448
- }),
88449
- object({
88450
- kind: literal("linear"),
88451
- scale: number(),
88452
- offset: number(),
88453
- clampMin: number().optional(),
88454
- clampMax: number().optional()
88455
- }),
88456
- object({
88457
- kind: literal("enum-map"),
88458
- mapping: record(string(), string().nullable())
88459
- }),
88460
- object({ kind: literal("number") })
88461
- ]);
88462
- var ScalarOverrideDraftSchema = object({
88463
- kind: literal("scalar"),
88464
- cap: string().min(1),
88465
- targetId: string().min(1),
88466
- source: OverrideSourceSchema,
88467
- transform: CustomizeTransformDraftSchema
88468
- });
88469
- var KeyedArrayOverrideDraftSchema = object({
88470
- kind: literal("keyedArray"),
88471
- cap: string().min(1),
88472
- targetId: string().min(1),
88473
- key: string().min(1),
88474
- label: string().min(1),
88475
- fieldPath: string().min(1),
88476
- source: OverrideSourceSchema,
88477
- transform: CustomizeTransformDraftSchema
88478
- });
88479
- var PulseOverrideDraftSchema = object({
88480
- kind: literal("pulse"),
88481
- cap: string().min(1),
88482
- targetId: string().min(1),
88483
- enabled: boolean(),
88484
- debounceMs: number().nonnegative(),
88485
- edges: array(_enum([
88486
- "rising",
88487
- "button",
88488
- "native-event"
88489
- ])).min(1).optional(),
88490
- sources: array(OverrideSourceSchema).min(1)
88491
- });
88492
- var SpanSourceDraftSchema = OverrideSourceSchema.extend({ mode: _enum([
88493
- "in-addition",
88494
- "confirm",
88495
- "replace"
88496
- ]).optional() });
88497
- discriminatedUnion("kind", [
88498
- ScalarOverrideDraftSchema,
88499
- KeyedArrayOverrideDraftSchema,
88500
- PulseOverrideDraftSchema,
88501
- object({
88502
- kind: literal("span"),
88503
- cap: string().min(1),
88504
- targetId: string().min(1),
88505
- timeoutMs: number().nonnegative(),
88506
- cooldownMs: number().nonnegative().optional(),
88507
- sources: array(SpanSourceDraftSchema)
88508
- })
88509
- ]);
88510
- object({
88511
- targetId: string().min(1),
88512
- configured: boolean(),
88513
- source: _enum(["native", "assigned"]),
88514
- state: _enum([
88515
- "active",
88516
- "stale",
88517
- "released",
88518
- "unavailable"
88519
- ]),
88520
- reason: string().nullable()
88521
- });
88522
88602
  var G711_SCALE_CORRECTION_DB = {
88523
88603
  PCMU: 20 * Math.log10(4),
88524
88604
  PCMA: 20 * Math.log10(8)
@@ -89870,7 +89950,7 @@ var AgentUIAddon = class extends BaseAddon {
89870
89950
  capability: adminUiCapability,
89871
89951
  provider: {
89872
89952
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
89873
- getVersion: async () => ({ version: "1.2.319" })
89953
+ getVersion: async () => ({ version: "1.2.321" })
89874
89954
  }
89875
89955
  }];
89876
89956
  }