@camstack/types 1.2.539 → 1.2.540

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 (44) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/addon.js +44 -12
  3. package/dist/addon.mjs +44 -12
  4. package/dist/capabilities/capability-definition.d.ts +4 -0
  5. package/dist/capabilities/climate-control.cap.d.ts +18 -6
  6. package/dist/capabilities/cover.cap.d.ts +9 -3
  7. package/dist/capabilities/device-manager.cap.d.ts +14 -0
  8. package/dist/capabilities/fan-control.cap.d.ts +12 -4
  9. package/dist/capabilities/index.d.ts +3 -3
  10. package/dist/capabilities/lock-control.cap.d.ts +3 -1
  11. package/dist/capabilities/media-player.cap.d.ts +48 -16
  12. package/dist/capabilities/notification-output.cap.d.ts +40 -0
  13. package/dist/capabilities/notification-rules.cap.d.ts +252 -0
  14. package/dist/capabilities/osd-manager.cap.d.ts +40 -277
  15. package/dist/capabilities/valve.cap.d.ts +3 -1
  16. package/dist/client.js +41 -1
  17. package/dist/client.mjs +41 -1
  18. package/dist/{composed-stable-id-C3J6LxC9.js → composed-stable-id-BtaMj_W7.js} +4 -0
  19. package/dist/{composed-stable-id-DLcPInGv.mjs → composed-stable-id-jnvhwGoH.mjs} +4 -0
  20. package/dist/device/device-binding.d.ts +6 -0
  21. package/dist/device/device-feature-requirements.d.ts +137 -0
  22. package/dist/device/device-type.d.ts +5 -1
  23. package/dist/device/implemented-methods.d.ts +6 -0
  24. package/dist/expression/device-template.d.ts +31 -1
  25. package/dist/generated/addon-api.d.ts +7 -7
  26. package/dist/generated/collection-array-methods.d.ts +1 -1
  27. package/dist/generated/device-proxy.d.ts +1 -1
  28. package/dist/generated/method-access-map.d.ts +1 -1
  29. package/dist/{composition-BcVAbtBc.js → implemented-methods-C_iV6BiP.js} +17 -1
  30. package/dist/{composition-BFJq1Y88.mjs → implemented-methods-OitwyO1Y.mjs} +12 -2
  31. package/dist/index.d.ts +6 -2
  32. package/dist/index.js +728 -426
  33. package/dist/index.mjs +471 -185
  34. package/dist/interfaces/addon.d.ts +7 -0
  35. package/dist/interfaces/event-bus.d.ts +2 -0
  36. package/dist/migrations/api/migration-api.v1.d.ts +11 -0
  37. package/dist/migrations/api/migration-api.v1.schema.d.ts +25 -0
  38. package/dist/node.d.ts +1 -0
  39. package/dist/node.js +26 -25
  40. package/dist/node.mjs +3 -3
  41. package/dist/notification/notification-fields.d.ts +51 -0
  42. package/dist/{sleep-DgCXXFc3.js → sleep-DPMn-Sik.js} +2 -2
  43. package/dist/{sleep-VrfKAAGN.mjs → sleep-Dz1P6--1.mjs} +2 -2
  44. package/package.json +1 -1
@@ -14,72 +14,27 @@ import { type InferProvider } from './capability-definition.js';
14
14
  * fields into one overlay string (plugin catalog OSD Manager parity).
15
15
  */
16
16
  /**
17
- * How a parser token expands one binding. Not stored on the binding —
18
- * the parser picks the mode per insert (`{alias.value}` / `.unit` / `.full`).
19
- */
20
- export declare const OsdTemplateTokenKindSchema: z.ZodEnum<{
21
- full: "full";
22
- unit: "unit";
23
- value: "value";
24
- }>;
25
- export type OsdTemplateTokenKind = z.infer<typeof OsdTemplateTokenKindSchema>;
26
- /** @deprecated Use `OsdTemplateTokenKind` — kept for generated import churn. */
27
- export declare const OsdTemplateFormatSchema: z.ZodEnum<{
28
- unit: "unit";
29
- value: "value";
30
- "value+unit": "value+unit";
31
- }>;
32
- /** @deprecated Use `OsdTemplateTokenKind`. */
33
- export type OsdTemplateFormat = z.infer<typeof OsdTemplateFormatSchema>;
34
- /**
35
- * How the operator reached the leaf device. `deviceId` is ALWAYS the
36
- * OSD-supported leaf that is read; `containerId` is set when the pick
37
- * went through a container (gateway) first.
38
- */
39
- export declare const OsdTemplatePickSchema: z.ZodObject<{
40
- containerId: z.ZodOptional<z.ZodNumber>;
41
- deviceId: z.ZodNumber;
42
- }, z.core.$strip>;
43
- export type OsdTemplatePick = z.infer<typeof OsdTemplatePickSchema>;
44
- /**
45
- * One named binding inside a multi-device template: device path + unit
46
- * selection + precision. The parser expands `{alias}`, `{alias.value}`,
47
- * `{alias.unit}`, or `{alias.full}` from the same binding — there is no
48
- * per-binding format lock.
17
+ * The text of a named template: a device template (D1021) —
18
+ * `{{ camera.temperature | round(1) }}`, `{{ now | time('HH:mm') }}`,
19
+ * `{% if camera.motion %}MOTION{% endif %}` — rendered by the ONE hub renderer
20
+ * (`device-manager.renderDeviceTemplates`), never by this addon.
21
+ *
22
+ * Two names belong to the render rather than to a device:
23
+ * - `now` is the clock; `time('HH:mm')` prints it in the server's zone.
24
+ * - `camera` is the camera the overlay is on, so one template serves every
25
+ * camera. `camera.lastPerson` and `camera.lastPlate` are the most recent
26
+ * recognition persisted for it (empty text until there is one, with
27
+ * `| default('')`).
49
28
  */
50
- export declare const OsdTemplateBindingSchema: z.ZodObject<{
51
- alias: z.ZodString;
52
- pick: z.ZodObject<{
53
- containerId: z.ZodOptional<z.ZodNumber>;
54
- deviceId: z.ZodNumber;
55
- }, z.core.$strip>;
56
- capName: z.ZodString;
57
- valuePath: z.ZodString;
58
- displayUnit: z.ZodOptional<z.ZodString>;
59
- maxDecimals: z.ZodDefault<z.ZodNumber>;
60
- valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
61
- }, z.core.$strip>;
62
- export type OsdTemplateBinding = z.infer<typeof OsdTemplateBindingSchema>;
29
+ export declare const OSD_TEMPLATE_TEXT_MAX = 1024;
63
30
  /**
64
- * A named template: bindings (alias → leaf field) + a parser that
65
- * references `{alias}` / `{alias.value}` / `{alias.unit}` / `{alias.full}`.
31
+ * A named template: the unit of reuse. A slot points at one by id; editing it
32
+ * changes every slot that points at it, on every camera.
66
33
  */
67
34
  export declare const OsdNamedTemplateSchema: z.ZodObject<{
68
35
  id: z.ZodString;
69
36
  name: z.ZodString;
70
- bindings: z.ZodDefault<z.ZodArray<z.ZodObject<{
71
- alias: z.ZodString;
72
- pick: z.ZodObject<{
73
- containerId: z.ZodOptional<z.ZodNumber>;
74
- deviceId: z.ZodNumber;
75
- }, z.core.$strip>;
76
- capName: z.ZodString;
77
- valuePath: z.ZodString;
78
- displayUnit: z.ZodOptional<z.ZodString>;
79
- maxDecimals: z.ZodDefault<z.ZodNumber>;
80
- valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
81
- }, z.core.$strip>>>;
82
- parser: z.ZodDefault<z.ZodString>;
37
+ text: z.ZodDefault<z.ZodString>;
83
38
  }, z.core.$strip>;
84
39
  export type OsdNamedTemplate = z.infer<typeof OsdNamedTemplateSchema>;
85
40
  /** Where a slot's value comes from. */
@@ -88,22 +43,6 @@ export declare const OsdSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
88
43
  }, z.core.$strip>, z.ZodObject<{
89
44
  kind: z.ZodLiteral<"static">;
90
45
  text: z.ZodString;
91
- }, z.core.$strip>, z.ZodObject<{
92
- kind: z.ZodLiteral<"clock">;
93
- pattern: z.ZodDefault<z.ZodString>;
94
- timezone: z.ZodOptional<z.ZodString>;
95
- }, z.core.$strip>, z.ZodObject<{
96
- kind: z.ZodLiteral<"device-state">;
97
- deviceId: z.ZodOptional<z.ZodNumber>;
98
- capName: z.ZodString;
99
- valuePath: z.ZodString;
100
- displayUnit: z.ZodOptional<z.ZodString>;
101
- }, z.core.$strip>, z.ZodObject<{
102
- kind: z.ZodLiteral<"latest-recognition">;
103
- recognition: z.ZodEnum<{
104
- person: "person";
105
- plate: "plate";
106
- }>;
107
46
  }, z.core.$strip>, z.ZodObject<{
108
47
  kind: z.ZodLiteral<"template">;
109
48
  templateId: z.ZodString;
@@ -116,29 +55,10 @@ export declare const OsdSlotBindingSchema: z.ZodObject<{
116
55
  }, z.core.$strip>, z.ZodObject<{
117
56
  kind: z.ZodLiteral<"static">;
118
57
  text: z.ZodString;
119
- }, z.core.$strip>, z.ZodObject<{
120
- kind: z.ZodLiteral<"clock">;
121
- pattern: z.ZodDefault<z.ZodString>;
122
- timezone: z.ZodOptional<z.ZodString>;
123
- }, z.core.$strip>, z.ZodObject<{
124
- kind: z.ZodLiteral<"device-state">;
125
- deviceId: z.ZodOptional<z.ZodNumber>;
126
- capName: z.ZodString;
127
- valuePath: z.ZodString;
128
- displayUnit: z.ZodOptional<z.ZodString>;
129
- }, z.core.$strip>, z.ZodObject<{
130
- kind: z.ZodLiteral<"latest-recognition">;
131
- recognition: z.ZodEnum<{
132
- person: "person";
133
- plate: "plate";
134
- }>;
135
58
  }, z.core.$strip>, z.ZodObject<{
136
59
  kind: z.ZodLiteral<"template">;
137
60
  templateId: z.ZodString;
138
61
  }, z.core.$strip>], "kind">;
139
- template: z.ZodDefault<z.ZodString>;
140
- maxDecimals: z.ZodDefault<z.ZodNumber>;
141
- valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
142
62
  schedule: z.ZodOptional<z.ZodObject<{
143
63
  windows: z.ZodArray<z.ZodObject<{
144
64
  days: z.ZodArray<z.ZodNumber>;
@@ -320,29 +240,10 @@ export declare const OsdSlotViewSchema: z.ZodObject<{
320
240
  }, z.core.$strip>, z.ZodObject<{
321
241
  kind: z.ZodLiteral<"static">;
322
242
  text: z.ZodString;
323
- }, z.core.$strip>, z.ZodObject<{
324
- kind: z.ZodLiteral<"clock">;
325
- pattern: z.ZodDefault<z.ZodString>;
326
- timezone: z.ZodOptional<z.ZodString>;
327
- }, z.core.$strip>, z.ZodObject<{
328
- kind: z.ZodLiteral<"device-state">;
329
- deviceId: z.ZodOptional<z.ZodNumber>;
330
- capName: z.ZodString;
331
- valuePath: z.ZodString;
332
- displayUnit: z.ZodOptional<z.ZodString>;
333
- }, z.core.$strip>, z.ZodObject<{
334
- kind: z.ZodLiteral<"latest-recognition">;
335
- recognition: z.ZodEnum<{
336
- person: "person";
337
- plate: "plate";
338
- }>;
339
243
  }, z.core.$strip>, z.ZodObject<{
340
244
  kind: z.ZodLiteral<"template">;
341
245
  templateId: z.ZodString;
342
246
  }, z.core.$strip>], "kind">;
343
- template: z.ZodDefault<z.ZodString>;
344
- maxDecimals: z.ZodDefault<z.ZodNumber>;
345
- valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
346
247
  schedule: z.ZodOptional<z.ZodObject<{
347
248
  windows: z.ZodArray<z.ZodObject<{
348
249
  days: z.ZodArray<z.ZodNumber>;
@@ -538,33 +439,17 @@ export declare const OsdRenderResultSchema: z.ZodObject<{
538
439
  reason: z.ZodOptional<z.ZodString>;
539
440
  }, z.core.$strip>;
540
441
  export type OsdRenderResult = z.infer<typeof OsdRenderResultSchema>;
541
- export declare const OsdSourceValueTypeEnum: z.ZodEnum<{
542
- boolean: "boolean";
543
- enum: "enum";
544
- number: "number";
545
- string: "string";
546
- }>;
547
- export type OsdSourceValueType = z.infer<typeof OsdSourceValueTypeEnum>;
548
442
  /**
549
- * One bindable value, derived from a cap's `runtimeState` schema — never
550
- * hand-listed. The editor renders from this, so a cap that ships a new
551
- * state field becomes bindable with no UI change.
443
+ * A template rendered for one camera without being saved: what the editor
444
+ * previews. `text` is what the overlay would carry; a refused render has a
445
+ * `reason` and an empty text.
552
446
  */
553
- export declare const OsdSourceOptionSchema: z.ZodObject<{
554
- deviceId: z.ZodNumber;
555
- deviceName: z.ZodString;
556
- capName: z.ZodString;
557
- valuePath: z.ZodString;
558
- label: z.ZodString;
559
- valueType: z.ZodEnum<{
560
- boolean: "boolean";
561
- enum: "enum";
562
- number: "number";
563
- string: "string";
564
- }>;
565
- enumValues: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
447
+ export declare const OsdTemplatePreviewSchema: z.ZodObject<{
448
+ ok: z.ZodBoolean;
449
+ text: z.ZodString;
450
+ notes: z.ZodArray<z.ZodString>;
566
451
  }, z.core.$strip>;
567
- export type OsdSourceOption = z.infer<typeof OsdSourceOptionSchema>;
452
+ export type OsdTemplatePreview = z.infer<typeof OsdTemplatePreviewSchema>;
568
453
  export declare const osdManagerCapability: {
569
454
  readonly name: 'osd-manager';
570
455
  readonly scope: 'system';
@@ -596,29 +481,10 @@ export declare const osdManagerCapability: {
596
481
  }, z.core.$strip>, z.ZodObject<{
597
482
  kind: z.ZodLiteral<"static">;
598
483
  text: z.ZodString;
599
- }, z.core.$strip>, z.ZodObject<{
600
- kind: z.ZodLiteral<"clock">;
601
- pattern: z.ZodDefault<z.ZodString>;
602
- timezone: z.ZodOptional<z.ZodString>;
603
- }, z.core.$strip>, z.ZodObject<{
604
- kind: z.ZodLiteral<"device-state">;
605
- deviceId: z.ZodOptional<z.ZodNumber>;
606
- capName: z.ZodString;
607
- valuePath: z.ZodString;
608
- displayUnit: z.ZodOptional<z.ZodString>;
609
- }, z.core.$strip>, z.ZodObject<{
610
- kind: z.ZodLiteral<"latest-recognition">;
611
- recognition: z.ZodEnum<{
612
- person: "person";
613
- plate: "plate";
614
- }>;
615
484
  }, z.core.$strip>, z.ZodObject<{
616
485
  kind: z.ZodLiteral<"template">;
617
486
  templateId: z.ZodString;
618
487
  }, z.core.$strip>], "kind">;
619
- template: z.ZodDefault<z.ZodString>;
620
- maxDecimals: z.ZodDefault<z.ZodNumber>;
621
- valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
622
488
  schedule: z.ZodOptional<z.ZodObject<{
623
489
  windows: z.ZodArray<z.ZodObject<{
624
490
  days: z.ZodArray<z.ZodNumber>;
@@ -783,29 +649,6 @@ export declare const osdManagerCapability: {
783
649
  }, z.core.$strip>>;
784
650
  }, z.core.$strip>>;
785
651
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
786
- /**
787
- * Every value bindable on this camera: its own state leaves first,
788
- * then every other device's. Derived from the cap definitions, so it
789
- * cannot drift from what the resolver can actually read.
790
- */
791
- readonly getSourceCatalog: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
792
- deviceId: z.ZodNumber;
793
- }, z.core.$strip>, z.ZodObject<{
794
- sources: z.ZodArray<z.ZodObject<{
795
- deviceId: z.ZodNumber;
796
- deviceName: z.ZodString;
797
- capName: z.ZodString;
798
- valuePath: z.ZodString;
799
- label: z.ZodString;
800
- valueType: z.ZodEnum<{
801
- boolean: "boolean";
802
- enum: "enum";
803
- number: "number";
804
- string: "string";
805
- }>;
806
- enumValues: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
807
- }, z.core.$strip>>;
808
- }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
809
652
  /**
810
653
  * The condition ids this gate can answer, alongside the FULL notification
811
654
  * condition catalog. Both, in one call, on purpose: an editor that showed
@@ -891,29 +734,10 @@ export declare const osdManagerCapability: {
891
734
  }, z.core.$strip>, z.ZodObject<{
892
735
  kind: z.ZodLiteral<"static">;
893
736
  text: z.ZodString;
894
- }, z.core.$strip>, z.ZodObject<{
895
- kind: z.ZodLiteral<"clock">;
896
- pattern: z.ZodDefault<z.ZodString>;
897
- timezone: z.ZodOptional<z.ZodString>;
898
- }, z.core.$strip>, z.ZodObject<{
899
- kind: z.ZodLiteral<"device-state">;
900
- deviceId: z.ZodOptional<z.ZodNumber>;
901
- capName: z.ZodString;
902
- valuePath: z.ZodString;
903
- displayUnit: z.ZodOptional<z.ZodString>;
904
- }, z.core.$strip>, z.ZodObject<{
905
- kind: z.ZodLiteral<"latest-recognition">;
906
- recognition: z.ZodEnum<{
907
- person: "person";
908
- plate: "plate";
909
- }>;
910
737
  }, z.core.$strip>, z.ZodObject<{
911
738
  kind: z.ZodLiteral<"template">;
912
739
  templateId: z.ZodString;
913
740
  }, z.core.$strip>], "kind">;
914
- template: z.ZodDefault<z.ZodString>;
915
- maxDecimals: z.ZodDefault<z.ZodNumber>;
916
- valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
917
741
  schedule: z.ZodOptional<z.ZodObject<{
918
742
  windows: z.ZodArray<z.ZodObject<{
919
743
  days: z.ZodArray<z.ZodNumber>;
@@ -1094,29 +918,10 @@ export declare const osdManagerCapability: {
1094
918
  }, z.core.$strip>, z.ZodObject<{
1095
919
  kind: z.ZodLiteral<"static">;
1096
920
  text: z.ZodString;
1097
- }, z.core.$strip>, z.ZodObject<{
1098
- kind: z.ZodLiteral<"clock">;
1099
- pattern: z.ZodDefault<z.ZodString>;
1100
- timezone: z.ZodOptional<z.ZodString>;
1101
- }, z.core.$strip>, z.ZodObject<{
1102
- kind: z.ZodLiteral<"device-state">;
1103
- deviceId: z.ZodOptional<z.ZodNumber>;
1104
- capName: z.ZodString;
1105
- valuePath: z.ZodString;
1106
- displayUnit: z.ZodOptional<z.ZodString>;
1107
- }, z.core.$strip>, z.ZodObject<{
1108
- kind: z.ZodLiteral<"latest-recognition">;
1109
- recognition: z.ZodEnum<{
1110
- person: "person";
1111
- plate: "plate";
1112
- }>;
1113
921
  }, z.core.$strip>, z.ZodObject<{
1114
922
  kind: z.ZodLiteral<"template">;
1115
923
  templateId: z.ZodString;
1116
924
  }, z.core.$strip>], "kind">;
1117
- template: z.ZodDefault<z.ZodString>;
1118
- maxDecimals: z.ZodDefault<z.ZodNumber>;
1119
- valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1120
925
  schedule: z.ZodOptional<z.ZodObject<{
1121
926
  windows: z.ZodArray<z.ZodObject<{
1122
927
  days: z.ZodArray<z.ZodNumber>;
@@ -1341,29 +1146,10 @@ export declare const osdManagerCapability: {
1341
1146
  }, z.core.$strip>, z.ZodObject<{
1342
1147
  kind: z.ZodLiteral<"static">;
1343
1148
  text: z.ZodString;
1344
- }, z.core.$strip>, z.ZodObject<{
1345
- kind: z.ZodLiteral<"clock">;
1346
- pattern: z.ZodDefault<z.ZodString>;
1347
- timezone: z.ZodOptional<z.ZodString>;
1348
- }, z.core.$strip>, z.ZodObject<{
1349
- kind: z.ZodLiteral<"device-state">;
1350
- deviceId: z.ZodOptional<z.ZodNumber>;
1351
- capName: z.ZodString;
1352
- valuePath: z.ZodString;
1353
- displayUnit: z.ZodOptional<z.ZodString>;
1354
- }, z.core.$strip>, z.ZodObject<{
1355
- kind: z.ZodLiteral<"latest-recognition">;
1356
- recognition: z.ZodEnum<{
1357
- person: "person";
1358
- plate: "plate";
1359
- }>;
1360
1149
  }, z.core.$strip>, z.ZodObject<{
1361
1150
  kind: z.ZodLiteral<"template">;
1362
1151
  templateId: z.ZodString;
1363
1152
  }, z.core.$strip>], "kind">;
1364
- template: z.ZodDefault<z.ZodString>;
1365
- maxDecimals: z.ZodDefault<z.ZodNumber>;
1366
- valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1367
1153
  schedule: z.ZodOptional<z.ZodObject<{
1368
1154
  windows: z.ZodArray<z.ZodObject<{
1369
1155
  days: z.ZodArray<z.ZodNumber>;
@@ -1540,6 +1326,19 @@ export declare const osdManagerCapability: {
1540
1326
  text: z.ZodString;
1541
1327
  reason: z.ZodOptional<z.ZodString>;
1542
1328
  }, z.core.$strip>, "mutation">;
1329
+ /**
1330
+ * Render a template text for a camera without saving it, with the same
1331
+ * context a slot gets (`camera`, `now`, the recognitions). The editor's
1332
+ * preview; no side effects.
1333
+ */
1334
+ readonly previewTemplate: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1335
+ deviceId: z.ZodNumber;
1336
+ text: z.ZodString;
1337
+ }, z.core.$strip>, z.ZodObject<{
1338
+ ok: z.ZodBoolean;
1339
+ text: z.ZodString;
1340
+ notes: z.ZodArray<z.ZodString>;
1341
+ }, z.core.$strip>, "mutation">;
1543
1342
  /** Force a render pass over one camera now, instead of at the next tick. */
1544
1343
  readonly renderDevice: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1545
1344
  deviceId: z.ZodNumber;
@@ -1564,19 +1363,7 @@ export declare const osdManagerCapability: {
1564
1363
  templates: z.ZodArray<z.ZodObject<{
1565
1364
  id: z.ZodString;
1566
1365
  name: z.ZodString;
1567
- bindings: z.ZodDefault<z.ZodArray<z.ZodObject<{
1568
- alias: z.ZodString;
1569
- pick: z.ZodObject<{
1570
- containerId: z.ZodOptional<z.ZodNumber>;
1571
- deviceId: z.ZodNumber;
1572
- }, z.core.$strip>;
1573
- capName: z.ZodString;
1574
- valuePath: z.ZodString;
1575
- displayUnit: z.ZodOptional<z.ZodString>;
1576
- maxDecimals: z.ZodDefault<z.ZodNumber>;
1577
- valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1578
- }, z.core.$strip>>>;
1579
- parser: z.ZodDefault<z.ZodString>;
1366
+ text: z.ZodDefault<z.ZodString>;
1580
1367
  }, z.core.$strip>>;
1581
1368
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
1582
1369
  /**
@@ -1587,40 +1374,16 @@ export declare const osdManagerCapability: {
1587
1374
  template: z.ZodObject<{
1588
1375
  id: z.ZodString;
1589
1376
  name: z.ZodString;
1590
- bindings: z.ZodDefault<z.ZodArray<z.ZodObject<{
1591
- alias: z.ZodString;
1592
- pick: z.ZodObject<{
1593
- containerId: z.ZodOptional<z.ZodNumber>;
1594
- deviceId: z.ZodNumber;
1595
- }, z.core.$strip>;
1596
- capName: z.ZodString;
1597
- valuePath: z.ZodString;
1598
- displayUnit: z.ZodOptional<z.ZodString>;
1599
- maxDecimals: z.ZodDefault<z.ZodNumber>;
1600
- valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1601
- }, z.core.$strip>>>;
1602
- parser: z.ZodDefault<z.ZodString>;
1377
+ text: z.ZodDefault<z.ZodString>;
1603
1378
  }, z.core.$strip>;
1604
1379
  }, z.core.$strip>, z.ZodObject<{
1605
1380
  template: z.ZodObject<{
1606
1381
  id: z.ZodString;
1607
1382
  name: z.ZodString;
1608
- bindings: z.ZodDefault<z.ZodArray<z.ZodObject<{
1609
- alias: z.ZodString;
1610
- pick: z.ZodObject<{
1611
- containerId: z.ZodOptional<z.ZodNumber>;
1612
- deviceId: z.ZodNumber;
1613
- }, z.core.$strip>;
1614
- capName: z.ZodString;
1615
- valuePath: z.ZodString;
1616
- displayUnit: z.ZodOptional<z.ZodString>;
1617
- maxDecimals: z.ZodDefault<z.ZodNumber>;
1618
- valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1619
- }, z.core.$strip>>>;
1620
- parser: z.ZodDefault<z.ZodString>;
1383
+ text: z.ZodDefault<z.ZodString>;
1621
1384
  }, z.core.$strip>;
1622
1385
  }, z.core.$strip>, "mutation">;
1623
- /** Drop a named template. Bindings that still reference it render unreadable. */
1386
+ /** Drop a named template. Slots that still point at it render unreadable and keep their last text. */
1624
1387
  readonly deleteTemplate: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1625
1388
  templateId: z.ZodString;
1626
1389
  }, z.core.$strip>, z.ZodObject<{
@@ -57,7 +57,9 @@ export declare const valveCapability: {
57
57
  readonly setPosition: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
58
58
  deviceId: z.ZodNumber;
59
59
  position: z.ZodNumber;
60
- }, z.core.$strip>, z.ZodVoid, "mutation">;
60
+ }, z.core.$strip>, z.ZodVoid, "mutation"> & {
61
+ readonly providerOptional: true;
62
+ };
61
63
  };
62
64
  readonly status: {
63
65
  readonly schema: z.ZodObject<{
package/dist/client.js CHANGED
@@ -392,8 +392,31 @@ var TargetKindAttachmentsCapsSchema = zod.z.object({
392
392
  max: zod.z.number().int().nonnegative(),
393
393
  maxBytes: zod.z.number().int().positive().optional()
394
394
  });
395
+ /**
396
+ * Which TEXT fields a kind delivers (#483). Alexa speaks a title and nothing
397
+ * else; a push service shows both.
398
+ *
399
+ * `.optional()` on the caps block, never defaulted: absent = both, which is
400
+ * what every kind declared before this field meant (D938's rule for a Zod
401
+ * default on the addon cap path).
402
+ */
403
+ var TargetKindTextCapsSchema = zod.z.object({
404
+ title: zod.z.boolean(),
405
+ body: zod.z.boolean()
406
+ });
407
+ zod.z.enum([
408
+ "title",
409
+ "body",
410
+ "attachments",
411
+ "actions",
412
+ "priority",
413
+ "sound",
414
+ "clickUrl"
415
+ ]);
395
416
  /** The full capability block consulted before dispatch. */
396
417
  var TargetKindCapsSchema = zod.z.object({
418
+ /** Text fields this kind delivers (#483). Absent = title AND body. */
419
+ text: TargetKindTextCapsSchema.optional(),
397
420
  attachments: TargetKindAttachmentsCapsSchema,
398
421
  /** Max action buttons (0 = none). */
399
422
  actions: zod.z.number().int().nonnegative(),
@@ -23742,6 +23765,16 @@ var NcRuleTargetSchema = zod.z.object({
23742
23765
  */
23743
23766
  params: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
23744
23767
  });
23768
+ var NcTargetOverrideSchema = zod.z.object({
23769
+ template: zod.z.object({
23770
+ title: zod.z.string().max(500).optional(),
23771
+ body: zod.z.string().max(2e3).optional()
23772
+ }).optional(),
23773
+ schedule: NcScheduleSchema.optional(),
23774
+ priority: zod.z.number().int().min(1).max(5).optional()
23775
+ });
23776
+ /** Per-target settings keyed by target id (#487). */
23777
+ var NcTargetOverridesSchema = zod.z.record(zod.z.string(), NcTargetOverrideSchema);
23745
23778
  /**
23746
23779
  * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
23747
23780
  *
@@ -24036,6 +24069,13 @@ var NcRuleInputSchema = zod.z.object({
24036
24069
  * targets.
24037
24070
  */
24038
24071
  targetUsers: zod.z.array(zod.z.string()).optional(),
24072
+ /**
24073
+ * Per-target settings keyed by target id (#487): texts, schedule, priority.
24074
+ * Absent (and an absent entry) = the rule's own values. A patch that omits
24075
+ * the key keeps the stored map; a patch that names it REPLACES it whole —
24076
+ * `{}` empties it.
24077
+ */
24078
+ targetOverrides: NcTargetOverridesSchema.optional(),
24039
24079
  /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
24040
24080
  * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
24041
24081
  media: NcMediaPolicySchema.default({}),
@@ -27655,11 +27695,11 @@ function createDeviceProxy(api, binding, opts) {
27655
27695
  const notificationRulesInterface = { setDeviceMuted: (input) => dispatchSystem("notificationRules", "setDeviceMuted", "mutation", input) };
27656
27696
  const osdManagerInterface = {
27657
27697
  getDeviceOsd: (input) => dispatchSystem("osdManager", "getDeviceOsd", "query", input),
27658
- getSourceCatalog: (input) => dispatchSystem("osdManager", "getSourceCatalog", "query", input),
27659
27698
  setSlotBinding: (input) => dispatchSystem("osdManager", "setSlotBinding", "mutation", input),
27660
27699
  clearSlotBinding: (input) => dispatchSystem("osdManager", "clearSlotBinding", "mutation", input),
27661
27700
  setSlotCameraEnabled: (input) => dispatchSystem("osdManager", "setSlotCameraEnabled", "mutation", input),
27662
27701
  previewSlot: (input) => dispatchSystem("osdManager", "previewSlot", "mutation", input),
27702
+ previewTemplate: (input) => dispatchSystem("osdManager", "previewTemplate", "mutation", input),
27663
27703
  renderDevice: (input) => dispatchSystem("osdManager", "renderDevice", "mutation", input)
27664
27704
  };
27665
27705
  const pipelineExecutorInterface = {
package/dist/client.mjs CHANGED
@@ -391,8 +391,31 @@ var TargetKindAttachmentsCapsSchema = z.object({
391
391
  max: z.number().int().nonnegative(),
392
392
  maxBytes: z.number().int().positive().optional()
393
393
  });
394
+ /**
395
+ * Which TEXT fields a kind delivers (#483). Alexa speaks a title and nothing
396
+ * else; a push service shows both.
397
+ *
398
+ * `.optional()` on the caps block, never defaulted: absent = both, which is
399
+ * what every kind declared before this field meant (D938's rule for a Zod
400
+ * default on the addon cap path).
401
+ */
402
+ var TargetKindTextCapsSchema = z.object({
403
+ title: z.boolean(),
404
+ body: z.boolean()
405
+ });
406
+ z.enum([
407
+ "title",
408
+ "body",
409
+ "attachments",
410
+ "actions",
411
+ "priority",
412
+ "sound",
413
+ "clickUrl"
414
+ ]);
394
415
  /** The full capability block consulted before dispatch. */
395
416
  var TargetKindCapsSchema = z.object({
417
+ /** Text fields this kind delivers (#483). Absent = title AND body. */
418
+ text: TargetKindTextCapsSchema.optional(),
396
419
  attachments: TargetKindAttachmentsCapsSchema,
397
420
  /** Max action buttons (0 = none). */
398
421
  actions: z.number().int().nonnegative(),
@@ -23741,6 +23764,16 @@ var NcRuleTargetSchema = z.object({
23741
23764
  */
23742
23765
  params: z.record(z.string(), z.unknown()).optional()
23743
23766
  });
23767
+ var NcTargetOverrideSchema = z.object({
23768
+ template: z.object({
23769
+ title: z.string().max(500).optional(),
23770
+ body: z.string().max(2e3).optional()
23771
+ }).optional(),
23772
+ schedule: NcScheduleSchema.optional(),
23773
+ priority: z.number().int().min(1).max(5).optional()
23774
+ });
23775
+ /** Per-target settings keyed by target id (#487). */
23776
+ var NcTargetOverridesSchema = z.record(z.string(), NcTargetOverrideSchema);
23744
23777
  /**
23745
23778
  * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
23746
23779
  *
@@ -24035,6 +24068,13 @@ var NcRuleInputSchema = z.object({
24035
24068
  * targets.
24036
24069
  */
24037
24070
  targetUsers: z.array(z.string()).optional(),
24071
+ /**
24072
+ * Per-target settings keyed by target id (#487): texts, schedule, priority.
24073
+ * Absent (and an absent entry) = the rule's own values. A patch that omits
24074
+ * the key keeps the stored map; a patch that names it REPLACES it whole —
24075
+ * `{}` empties it.
24076
+ */
24077
+ targetOverrides: NcTargetOverridesSchema.optional(),
24038
24078
  /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
24039
24079
  * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
24040
24080
  media: NcMediaPolicySchema.default({}),
@@ -27654,11 +27694,11 @@ function createDeviceProxy(api, binding, opts) {
27654
27694
  const notificationRulesInterface = { setDeviceMuted: (input) => dispatchSystem("notificationRules", "setDeviceMuted", "mutation", input) };
27655
27695
  const osdManagerInterface = {
27656
27696
  getDeviceOsd: (input) => dispatchSystem("osdManager", "getDeviceOsd", "query", input),
27657
- getSourceCatalog: (input) => dispatchSystem("osdManager", "getSourceCatalog", "query", input),
27658
27697
  setSlotBinding: (input) => dispatchSystem("osdManager", "setSlotBinding", "mutation", input),
27659
27698
  clearSlotBinding: (input) => dispatchSystem("osdManager", "clearSlotBinding", "mutation", input),
27660
27699
  setSlotCameraEnabled: (input) => dispatchSystem("osdManager", "setSlotCameraEnabled", "mutation", input),
27661
27700
  previewSlot: (input) => dispatchSystem("osdManager", "previewSlot", "mutation", input),
27701
+ previewTemplate: (input) => dispatchSystem("osdManager", "previewTemplate", "mutation", input),
27662
27702
  renderDevice: (input) => dispatchSystem("osdManager", "renderDevice", "mutation", input)
27663
27703
  };
27664
27704
  const pipelineExecutorInterface = {
@@ -288,6 +288,10 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
288
288
  /** Robot mower exposes targeted mowing (all-area / zones / edges /
289
289
  * spots) — gates the Mow action + map selectors. */
290
290
  DeviceFeature["MowerHasTargetedMowing"] = "mower-has-targeted-mowing";
291
+ /** The device has a drive/navigation surface (`navigation` cap): a robot camera. */
292
+ DeviceFeature["Navigation"] = "navigation";
293
+ /** The device has a network-link reading (`network-link` cap). */
294
+ DeviceFeature["NetworkLink"] = "network-link";
291
295
  return DeviceFeature;
292
296
  }({});
293
297
  /**
@@ -288,6 +288,10 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
288
288
  /** Robot mower exposes targeted mowing (all-area / zones / edges /
289
289
  * spots) — gates the Mow action + map selectors. */
290
290
  DeviceFeature["MowerHasTargetedMowing"] = "mower-has-targeted-mowing";
291
+ /** The device has a drive/navigation surface (`navigation` cap): a robot camera. */
292
+ DeviceFeature["Navigation"] = "navigation";
293
+ /** The device has a network-link reading (`network-link` cap). */
294
+ DeviceFeature["NetworkLink"] = "network-link";
291
295
  return DeviceFeature;
292
296
  }({});
293
297
  /**
@@ -26,6 +26,12 @@ export interface DeviceBindingEntry {
26
26
  providerNodeId: string;
27
27
  /** Always the addon id of the underlying native provider for the device. */
28
28
  nativeAddonId: string;
29
+ /**
30
+ * Which of the cap's methods the bound NATIVE provider implements. Absent
31
+ * means "all of them" (an older worker, or a wrapper): the kernel then
32
+ * derives device features from the cap being bound alone, never from nothing.
33
+ */
34
+ implementedMethods?: string[];
29
35
  }
30
36
  export interface DeviceBinding {
31
37
  /** Numeric device id — matches `IDevice.id`. */