@camstack/types 1.2.364 → 1.2.366

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 (93) hide show
  1. package/dist/addon.js +3 -2
  2. package/dist/addon.mjs +3 -2
  3. package/dist/auth/device-certificate.d.ts +372 -0
  4. package/dist/auth/request-origin.d.ts +43 -0
  5. package/dist/capabilities/air-quality-sensor.cap.d.ts +32 -0
  6. package/dist/capabilities/alarm-panel.cap.d.ts +4 -0
  7. package/dist/capabilities/ambient-light-sensor.cap.d.ts +13 -0
  8. package/dist/capabilities/audio-metrics.cap.d.ts +4 -0
  9. package/dist/capabilities/automation-control.cap.d.ts +4 -0
  10. package/dist/capabilities/battery.cap.d.ts +11 -0
  11. package/dist/capabilities/binary.cap.d.ts +10 -0
  12. package/dist/capabilities/brightness.cap.d.ts +12 -0
  13. package/dist/capabilities/camera-streams.cap.d.ts +4 -0
  14. package/dist/capabilities/capability-definition.d.ts +70 -0
  15. package/dist/capabilities/carbon-monoxide.cap.d.ts +10 -0
  16. package/dist/capabilities/climate-control.cap.d.ts +32 -0
  17. package/dist/capabilities/color.cap.d.ts +4 -0
  18. package/dist/capabilities/connectivity.cap.d.ts +4 -0
  19. package/dist/capabilities/consumables.cap.d.ts +4 -0
  20. package/dist/capabilities/contact.cap.d.ts +10 -0
  21. package/dist/capabilities/control.cap.d.ts +4 -0
  22. package/dist/capabilities/cover.cap.d.ts +12 -0
  23. package/dist/capabilities/day-night.cap.d.ts +4 -0
  24. package/dist/capabilities/device-credentials.cap.d.ts +174 -0
  25. package/dist/capabilities/device-discovery.cap.d.ts +4 -0
  26. package/dist/capabilities/device-status.cap.d.ts +10 -0
  27. package/dist/capabilities/doorbell.cap.d.ts +4 -0
  28. package/dist/capabilities/enum-sensor.cap.d.ts +4 -0
  29. package/dist/capabilities/event-emitter.cap.d.ts +4 -0
  30. package/dist/capabilities/fan-control.cap.d.ts +15 -0
  31. package/dist/capabilities/feature-probe.cap.d.ts +4 -0
  32. package/dist/capabilities/flood.cap.d.ts +10 -0
  33. package/dist/capabilities/gas.cap.d.ts +10 -0
  34. package/dist/capabilities/humidifier.cap.d.ts +15 -0
  35. package/dist/capabilities/humidity-sensor.cap.d.ts +12 -0
  36. package/dist/capabilities/image-settings.cap.d.ts +4 -0
  37. package/dist/capabilities/image.cap.d.ts +4 -0
  38. package/dist/capabilities/index.d.ts +7 -3
  39. package/dist/capabilities/intercom.cap.d.ts +4 -0
  40. package/dist/capabilities/lawn-mower-control.cap.d.ts +12 -0
  41. package/dist/capabilities/lock-control.cap.d.ts +4 -0
  42. package/dist/capabilities/media-player.cap.d.ts +4 -0
  43. package/dist/capabilities/motion-trigger.cap.d.ts +4 -0
  44. package/dist/capabilities/motion-zones.cap.d.ts +4 -0
  45. package/dist/capabilities/motion.cap.d.ts +11 -0
  46. package/dist/capabilities/native-object-detection.cap.d.ts +4 -0
  47. package/dist/capabilities/navigation.cap.d.ts +4 -0
  48. package/dist/capabilities/network-link.cap.d.ts +19 -0
  49. package/dist/capabilities/node-certificates.cap.d.ts +128 -0
  50. package/dist/capabilities/notifier.cap.d.ts +4 -0
  51. package/dist/capabilities/numeric-sensor.cap.d.ts +12 -0
  52. package/dist/capabilities/pet-feeder.cap.d.ts +25 -0
  53. package/dist/capabilities/power-meter.cap.d.ts +43 -0
  54. package/dist/capabilities/presence.cap.d.ts +12 -0
  55. package/dist/capabilities/pressure-sensor.cap.d.ts +12 -0
  56. package/dist/capabilities/privacy-mask.cap.d.ts +4 -0
  57. package/dist/capabilities/ptz-autotrack.cap.d.ts +4 -0
  58. package/dist/capabilities/recording-onboard.cap.d.ts +4 -0
  59. package/dist/capabilities/recording-signal.cap.d.ts +4 -0
  60. package/dist/capabilities/scene-monitor.cap.d.ts +4 -0
  61. package/dist/capabilities/script-runner.cap.d.ts +4 -0
  62. package/dist/capabilities/smoke.cap.d.ts +10 -0
  63. package/dist/capabilities/stream-catalog.cap.d.ts +4 -0
  64. package/dist/capabilities/stream-params.cap.d.ts +4 -0
  65. package/dist/capabilities/stream-signals.cap.d.ts +4 -0
  66. package/dist/capabilities/switch.cap.d.ts +10 -0
  67. package/dist/capabilities/tamper.cap.d.ts +10 -0
  68. package/dist/capabilities/temperature-sensor.cap.d.ts +12 -0
  69. package/dist/capabilities/update.cap.d.ts +4 -0
  70. package/dist/capabilities/vacuum-control.cap.d.ts +32 -0
  71. package/dist/capabilities/valve.cap.d.ts +12 -0
  72. package/dist/capabilities/vibration.cap.d.ts +10 -0
  73. package/dist/capabilities/water-heater.cap.d.ts +17 -0
  74. package/dist/capabilities/weather.cap.d.ts +27 -0
  75. package/dist/capabilities/zone-analytics.cap.d.ts +4 -0
  76. package/dist/capabilities/zone-rules.cap.d.ts +4 -0
  77. package/dist/capabilities/zones.cap.d.ts +4 -0
  78. package/dist/client.d.ts +1 -1
  79. package/dist/client.js +255 -0
  80. package/dist/client.mjs +245 -1
  81. package/dist/generated/addon-api.d.ts +797 -4
  82. package/dist/generated/cap-input-defaults.d.ts +1 -1
  83. package/dist/generated/capability-router-map.d.ts +8 -2
  84. package/dist/generated/history-catalog.d.ts +11 -0
  85. package/dist/generated/method-access-map.d.ts +1 -1
  86. package/dist/generated/system-proxy.d.ts +2 -0
  87. package/dist/index.d.ts +3 -0
  88. package/dist/index.js +1574 -34
  89. package/dist/index.mjs +1522 -35
  90. package/dist/interfaces/auth.d.ts +6 -0
  91. package/dist/{sleep-BBF1iXUi.mjs → sleep-DxJdzHni.mjs} +26 -1
  92. package/dist/{sleep-BBXNq778.js → sleep-NZlEFYGX.js} +37 -0
  93. package/package.json +1 -1
@@ -378,6 +378,68 @@ export interface DeviceConfigSpec {
378
378
  export type RuntimeStateDurability = 'session' | 'restored';
379
379
  /** The default applied to a `runtimeState` cap that declares no `durability`. */
380
380
  export declare const DEFAULT_RUNTIME_STATE_DURABILITY: RuntimeStateDurability;
381
+ /**
382
+ * Unit of a recorded history series. A closed set: the History tab formats by
383
+ * it. `'ug/m3'` is the ASCII-safe id of micrograms per cubic metre — render it
384
+ * through {@link HISTORY_UNIT_LABELS}. A series whose unit is a per-device fact
385
+ * names a sibling field with {@link CapabilityHistoryField.unitFrom} instead.
386
+ */
387
+ export type HistoryUnit = '%' | 'dBFS' | 'dBm' | '°C' | 'W' | 'kWh' | 'V' | 'A' | 'VA' | 'lx' | 'ppm' | 'ppb' | 'ug/m3' | 'hPa' | 'count' | 'ratio' | 'ms' | 's' | 'days' | 'bytes';
388
+ /** Display label per {@link HistoryUnit} (only `'ug/m3'` differs from its id). */
389
+ export declare const HISTORY_UNIT_LABELS: Readonly<Record<HistoryUnit, string>>;
390
+ /** One `runtimeState` field recorded as a history series. */
391
+ export interface CapabilityHistoryField {
392
+ /**
393
+ * `gauge` — a level, averaged in a rollup. `counter` — a MONOTONIC hardware
394
+ * meter only (`kwhTotal`); a drop is a reset, never a negative reading. A
395
+ * counter that restarts with the addon (`pressCountSinceStart`) is not one.
396
+ * `boolean` — stored 0/1; a rollup gives the fraction of time true.
397
+ */
398
+ readonly kind: 'gauge' | 'counter' | 'boolean';
399
+ /** Fixed unit of the series. Mutually exclusive with {@link unitFrom}. */
400
+ readonly unit?: HistoryUnit;
401
+ /**
402
+ * Path of a SIBLING `runtimeState` field (a string or enum) that carries this
403
+ * device's unit — `weather.temperature` takes it from `temperatureUnit`. The
404
+ * catalog records the path; the reader resolves it per device. Mutually
405
+ * exclusive with {@link unit}.
406
+ */
407
+ readonly unitFrom?: string;
408
+ readonly displayName?: string;
409
+ /** Drop a change smaller than this (ABSOLUTE) — anti-jitter for noisy gauges. */
410
+ readonly deadband?: number;
411
+ /**
412
+ * Drop a change smaller than this percentage of the last recorded value
413
+ * (RELATIVE) — for a wide-range gauge such as lux. Applied together with
414
+ * {@link deadband} when both are set: a change must clear both.
415
+ */
416
+ readonly deadbandPct?: number;
417
+ /**
418
+ * At most one raw point per this many ms per series. Absent means the capture
419
+ * floor of the kind: 10 000 for `gauge` and `counter`, none for `boolean`
420
+ * (change-only). Set it ABOVE the floor to be sparser; the floor is not
421
+ * lowered by a smaller value except `0`, which a field may state to opt out
422
+ * of the floor (a flapping state that must not lose an edge).
423
+ */
424
+ readonly minIntervalMs?: number;
425
+ /**
426
+ * Device types for which this field is NOT captured. `motion.detected` is a
427
+ * series for a PIR sensor and not for a camera, whose motion is already an
428
+ * addon series and a ledger.
429
+ */
430
+ readonly excludeDeviceTypes?: readonly DeviceType[];
431
+ }
432
+ /**
433
+ * The `history` block of a cap with `runtimeState`: `'none'` is an explicit
434
+ * answer; otherwise `fields` maps TOP-LEVEL or fixed-object (`a.b`) paths of
435
+ * `runtimeState` to a series. A path never goes into an array or a record keyed
436
+ * by runtime ids. Enforced by `scripts/check-cap-history-declared.ts`.
437
+ */
438
+ export type CapabilityHistory = 'none' | {
439
+ readonly fields: Readonly<Record<string, CapabilityHistoryField>>;
440
+ };
441
+ /** Capture floor (ms) applied to `gauge` / `counter` series when a field states none. */
442
+ export declare const HISTORY_DEFAULT_MIN_INTERVAL_MS = 10000;
381
443
  /**
382
444
  * How a COMPOSED provider answers a method it cannot forward yet (D663). A
383
445
  * composition that ADDS a cap to a device serves this cap's methods from here
@@ -516,6 +578,14 @@ export interface CapabilityDefinition<TName extends string = string, TMethods ex
516
578
  * trick with `ts` for the two hot caps; this is the same idea, declared.
517
579
  */
518
580
  readonly volatileStateFields?: readonly string[];
581
+ /**
582
+ * Which `runtimeState` fields are recorded as long-term history series
583
+ * (D850), or `'none'`. Mandatory for every cap declaring `runtimeState` —
584
+ * `scripts/check-cap-history-declared.ts` fails the build otherwise. See
585
+ * {@link CapabilityHistory}; `npm run codegen` projects it into
586
+ * `generated/history-catalog.ts`.
587
+ */
588
+ readonly history?: CapabilityHistory;
519
589
  /**
520
590
  * Declarative settings spec. When present, the device-manager's
521
591
  * settings aggregator auto-derives the ConfigUISchema and routes
@@ -35,6 +35,16 @@ export declare const carbonMonoxideCapability: {
35
35
  * `scripts/check-runtime-state-durability.ts`.
36
36
  */
37
37
  readonly durability: 'restored';
38
+ /**
39
+ * History (D850): recorded series.
40
+ */
41
+ readonly history: {
42
+ readonly fields: {
43
+ readonly detected: {
44
+ readonly kind: 'boolean';
45
+ };
46
+ };
47
+ };
38
48
  /** Clock fields: written, but excluded from the compare that decides
39
49
  * whether persisting is worth a SQLite commit. */
40
50
  readonly volatileStateFields: readonly ["lastChangedAt"];
@@ -206,5 +206,37 @@ export declare const climateControlCapability: {
206
206
  * `scripts/check-runtime-state-durability.ts`.
207
207
  */
208
208
  readonly durability: 'session';
209
+ /**
210
+ * History (D850): recorded series. Celsius by contract; setpoints keep every change (`minIntervalMs: 0`).
211
+ */
212
+ readonly history: {
213
+ readonly fields: {
214
+ readonly currentTemp: {
215
+ readonly kind: 'gauge';
216
+ readonly unit: '°C';
217
+ readonly deadband: 0.1;
218
+ };
219
+ readonly currentHumidity: {
220
+ readonly kind: 'gauge';
221
+ readonly unit: '%';
222
+ readonly deadband: 0.5;
223
+ };
224
+ readonly target: {
225
+ readonly kind: 'gauge';
226
+ readonly unit: '°C';
227
+ readonly minIntervalMs: 0;
228
+ };
229
+ readonly targetHigh: {
230
+ readonly kind: 'gauge';
231
+ readonly unit: '°C';
232
+ readonly minIntervalMs: 0;
233
+ };
234
+ readonly targetLow: {
235
+ readonly kind: 'gauge';
236
+ readonly unit: '°C';
237
+ readonly minIntervalMs: 0;
238
+ };
239
+ };
240
+ };
209
241
  };
210
242
  export type IClimateControlProvider = InferProvider<typeof climateControlCapability>;
@@ -187,6 +187,10 @@ export declare const colorCapability: {
187
187
  * `scripts/check-runtime-state-durability.ts`.
188
188
  */
189
189
  readonly durability: 'session';
190
+ /**
191
+ * History (D850): none — nested and cosmetic.
192
+ */
193
+ readonly history: 'none';
190
194
  };
191
195
  export type IColorProvider = InferProvider<typeof colorCapability>;
192
196
  export {};
@@ -39,6 +39,10 @@ export declare const connectivityCapability: {
39
39
  * `scripts/check-runtime-state-durability.ts`.
40
40
  */
41
41
  readonly durability: 'restored';
42
+ /**
43
+ * History (D850): none — duplicates device-status.online (one authority for availability).
44
+ */
45
+ readonly history: 'none';
42
46
  /** Clock fields: written, but excluded from the compare that decides
43
47
  * whether persisting is worth a SQLite commit. */
44
48
  readonly volatileStateFields: readonly ["lastChangedAt"];
@@ -227,6 +227,10 @@ export declare const consumablesCapability: {
227
227
  * `scripts/check-runtime-state-durability.ts`.
228
228
  */
229
229
  readonly durability: 'restored';
230
+ /**
231
+ * History (D850): none — `items` is an array keyed by runtime ids; a history path never enters it.
232
+ */
233
+ readonly history: 'none';
230
234
  /** Clocks, not content: a re-read that changed no item costs no commit. */
231
235
  readonly volatileStateFields: readonly ["lastChangedAt", "lastFetchedAt"];
232
236
  };
@@ -43,6 +43,16 @@ export declare const contactCapability: {
43
43
  * `scripts/check-runtime-state-durability.ts`.
44
44
  */
45
45
  readonly durability: 'restored';
46
+ /**
47
+ * History (D850): recorded series.
48
+ */
49
+ readonly history: {
50
+ readonly fields: {
51
+ readonly entryOpen: {
52
+ readonly kind: 'boolean';
53
+ };
54
+ };
55
+ };
46
56
  /** Clock fields: written, but excluded from the compare that decides
47
57
  * whether persisting is worth a SQLite commit. */
48
58
  readonly volatileStateFields: readonly ["lastChangedAt"];
@@ -168,6 +168,10 @@ export declare const controlCapability: {
168
168
  * `scripts/check-runtime-state-durability.ts`.
169
169
  */
170
170
  readonly durability: 'session';
171
+ /**
172
+ * History (D850): none — `value` is a number/string union; configuration entity.
173
+ */
174
+ readonly history: 'none';
171
175
  };
172
176
  export type IControlProvider = InferProvider<typeof controlCapability>;
173
177
  export {};
@@ -106,6 +106,18 @@ export declare const coverCapability: {
106
106
  * `scripts/check-runtime-state-durability.ts`.
107
107
  */
108
108
  readonly durability: 'restored';
109
+ /**
110
+ * History (D850): recorded series. Actuator tier: position keeps every tick of a movement.
111
+ */
112
+ readonly history: {
113
+ readonly fields: {
114
+ readonly position: {
115
+ readonly kind: 'gauge';
116
+ readonly unit: '%';
117
+ readonly minIntervalMs: 0;
118
+ };
119
+ };
120
+ };
109
121
  /** Clock fields: written, but excluded from the compare that decides
110
122
  * whether persisting is worth a SQLite commit. */
111
123
  readonly volatileStateFields: readonly ["lastChangedAt"];
@@ -165,6 +165,10 @@ export declare const dayNightCapability: {
165
165
  * `scripts/check-runtime-state-durability.ts`.
166
166
  */
167
167
  readonly durability: 'restored';
168
+ /**
169
+ * History (D850): none — firmware configuration, not a measurement.
170
+ */
171
+ readonly history: 'none';
168
172
  /** Clock fields: written, but excluded from the compare that decides
169
173
  * whether persisting is worth a SQLite commit. */
170
174
  readonly volatileStateFields: readonly ["lastFetchedAt"];
@@ -0,0 +1,174 @@
1
+ import { z } from 'zod';
2
+ import { type InferProvider } from './capability-definition.js';
3
+ export declare const DeviceCaStatusSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4
+ state: z.ZodLiteral<"absent">;
5
+ }, z.core.$strip>, z.ZodObject<{
6
+ state: z.ZodLiteral<"ready">;
7
+ subject: z.ZodString;
8
+ fingerprintSha256: z.ZodString;
9
+ validTo: z.ZodString;
10
+ }, z.core.$strip>, z.ZodObject<{
11
+ state: z.ZodLiteral<"unavailable">;
12
+ reason: z.ZodString;
13
+ }, z.core.$strip>], "state">;
14
+ export type DeviceCaStatus = z.infer<typeof DeviceCaStatusSchema>;
15
+ export declare const DeviceCertificateSettingsSchema: z.ZodObject<{
16
+ selfEnrollment: z.ZodEnum<{
17
+ allowed: "allowed";
18
+ disabled: "disabled";
19
+ }>;
20
+ }, z.core.$strip>;
21
+ export type DeviceCertificateSettings = z.infer<typeof DeviceCertificateSettingsSchema>;
22
+ /**
23
+ * `device-credentials` — the admin surface of device certificates (D855).
24
+ *
25
+ * Everything a device does ITSELF — completing an enrollment, getting a
26
+ * challenge, signing in, renewing — is a PUBLIC procedure of the hub's `auth`
27
+ * router (`auth.completeEnrollment`, `getDeviceChallenge`,
28
+ * `loginWithDeviceCertificate`, `renewDeviceCertificate`): those legs are
29
+ * proofs of possession, not capability calls, and must not be reachable as
30
+ * cap methods. This cap holds only what an operator does about them.
31
+ *
32
+ * Provider: `local-auth`, which also owns the device CA and the registry.
33
+ * The hub is the only node that persists device credentials.
34
+ */
35
+ export declare const deviceCredentialsCapability: {
36
+ readonly name: 'device-credentials';
37
+ readonly scope: 'system';
38
+ readonly mode: 'singleton';
39
+ readonly methods: {
40
+ /**
41
+ * Every enrolled device, newest first; `userId` narrows to one user.
42
+ * `status` is derived: revoked wins over expired.
43
+ */
44
+ readonly listDeviceCredentials: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
45
+ userId: z.ZodOptional<z.ZodString>;
46
+ includeRevoked: z.ZodDefault<z.ZodBoolean>;
47
+ }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
48
+ id: z.ZodString;
49
+ userId: z.ZodString;
50
+ username: z.ZodNullable<z.ZodString>;
51
+ deviceName: z.ZodString;
52
+ platform: z.ZodEnum<{
53
+ android: "android";
54
+ ios: "ios";
55
+ other: "other";
56
+ web: "web";
57
+ }>;
58
+ enrolledVia: z.ZodEnum<{
59
+ qr: "qr";
60
+ self: "self";
61
+ }>;
62
+ fingerprint: z.ZodString;
63
+ issuedAt: z.ZodNumber;
64
+ expiresAt: z.ZodNumber;
65
+ lastUsedAt: z.ZodNullable<z.ZodNumber>;
66
+ lastUsedFrom: z.ZodNullable<z.ZodString>;
67
+ revokedAt: z.ZodNullable<z.ZodNumber>;
68
+ revokedBy: z.ZodNullable<z.ZodString>;
69
+ status: z.ZodEnum<{
70
+ active: "active";
71
+ expired: "expired";
72
+ revoked: "revoked";
73
+ }>;
74
+ }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
75
+ /**
76
+ * Mint a one-shot enrollment code for `userId` and a device name: 128-bit
77
+ * random, single use, 10 minutes, kept only as a hash. Returns the code
78
+ * once, with the `camstack://enroll?hub=…&code=…` link a QR carries.
79
+ * `caller` (the admin) is recorded in the audit trail.
80
+ */
81
+ readonly startEnrollment: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
82
+ userId: z.ZodString;
83
+ deviceName: z.ZodString;
84
+ }, z.core.$strip>, z.ZodObject<{
85
+ code: z.ZodString;
86
+ expiresAt: z.ZodNumber;
87
+ enrollUrl: z.ZodString;
88
+ hubOrigin: z.ZodNullable<z.ZodString>;
89
+ hubOrigins: z.ZodArray<z.ZodString>;
90
+ }, z.core.$strip>, "mutation"> & {
91
+ readonly caller: 'required';
92
+ };
93
+ /**
94
+ * Revoke a credential: its certificate stops logging in at once, and every
95
+ * session it opened ends (an open session also dies at its next refresh
96
+ * even if this call raced it). Idempotent.
97
+ */
98
+ readonly revokeDeviceCredential: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
99
+ id: z.ZodString;
100
+ }, z.core.$strip>, z.ZodObject<{
101
+ revoked: z.ZodBoolean;
102
+ sessionsEnded: z.ZodNumber;
103
+ status: z.ZodEnum<{
104
+ active: "active";
105
+ expired: "expired";
106
+ revoked: "revoked";
107
+ }>;
108
+ }, z.core.$strip>, "mutation"> & {
109
+ readonly caller: 'required';
110
+ };
111
+ /**
112
+ * Hub-wide device-certificate settings. `selfEnrollment`: `allowed`
113
+ * (default) lets a signed-in user enroll their own device after a step-up
114
+ * sign-in; `disabled` makes `auth.enrollSelf` refuse. The admin QR path is
115
+ * unaffected. Hub-wide only (no per-role switch).
116
+ */
117
+ readonly getDeviceCertificateSettings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
118
+ selfEnrollment: z.ZodEnum<{
119
+ allowed: "allowed";
120
+ disabled: "disabled";
121
+ }>;
122
+ }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
123
+ readonly setDeviceCertificateSettings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
124
+ selfEnrollment: z.ZodEnum<{
125
+ allowed: "allowed";
126
+ disabled: "disabled";
127
+ }>;
128
+ }, z.core.$strip>, z.ZodObject<{
129
+ selfEnrollment: z.ZodEnum<{
130
+ allowed: "allowed";
131
+ disabled: "disabled";
132
+ }>;
133
+ }, z.core.$strip>, "mutation">;
134
+ /**
135
+ * Delete the registry row of a REVOKED credential (clean-up; the audit trail
136
+ * keeps the revocation). Refuses a live credential: revoke it first. After
137
+ * the row is gone the device's next call answers `unknown-credential`.
138
+ */
139
+ readonly deleteDeviceCredential: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
140
+ id: z.ZodString;
141
+ }, z.core.$strip>, z.ZodObject<{
142
+ result: z.ZodEnum<{
143
+ deleted: "deleted";
144
+ live: "live";
145
+ unknown: "unknown";
146
+ }>;
147
+ }, z.core.$strip>, "mutation"> & {
148
+ readonly caller: 'required';
149
+ };
150
+ /**
151
+ * The device CA: `absent` until the first enrollment creates it (lazily,
152
+ * never rotated on boot), `unavailable` while the keychain cannot answer.
153
+ */
154
+ readonly getDeviceCaStatus: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
155
+ state: z.ZodLiteral<"absent">;
156
+ }, z.core.$strip>, z.ZodObject<{
157
+ state: z.ZodLiteral<"ready">;
158
+ subject: z.ZodString;
159
+ fingerprintSha256: z.ZodString;
160
+ validTo: z.ZodString;
161
+ }, z.core.$strip>, z.ZodObject<{
162
+ state: z.ZodLiteral<"unavailable">;
163
+ reason: z.ZodString;
164
+ }, z.core.$strip>], "state">, import("./capability-definition.js").CapabilityMethodKind>;
165
+ /** Rename a credential (the label only; the certificate is unchanged). */
166
+ readonly renameDeviceCredential: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
167
+ id: z.ZodString;
168
+ deviceName: z.ZodString;
169
+ }, z.core.$strip>, z.ZodObject<{
170
+ renamed: z.ZodBoolean;
171
+ }, z.core.$strip>, "mutation">;
172
+ };
173
+ };
174
+ export type IDeviceCredentialsProvider = InferProvider<typeof deviceCredentialsCapability>;
@@ -106,6 +106,10 @@ export declare const deviceDiscoveryCapability: {
106
106
  * `scripts/check-runtime-state-durability.ts`.
107
107
  */
108
108
  readonly durability: 'session';
109
+ /**
110
+ * History (D850): none — inventory.
111
+ */
112
+ readonly history: 'none';
109
113
  readonly methods: {
110
114
  /**
111
115
  * Snapshot of the current `discovered` list. Returns the
@@ -57,6 +57,16 @@ export declare const deviceStatusCapability: {
57
57
  * `scripts/check-runtime-state-durability.ts`.
58
58
  */
59
59
  readonly durability: 'restored';
60
+ /**
61
+ * History (D850): recorded series. The ONE availability series.
62
+ */
63
+ readonly history: {
64
+ readonly fields: {
65
+ readonly online: {
66
+ readonly kind: 'boolean';
67
+ };
68
+ };
69
+ };
60
70
  /** Clock fields: written, but excluded from the compare that decides
61
71
  * whether persisting is worth a SQLite commit. */
62
72
  readonly volatileStateFields: readonly ["lastChangedAt"];
@@ -74,5 +74,9 @@ export declare const doorbellCapability: {
74
74
  * `scripts/check-runtime-state-durability.ts`.
75
75
  */
76
76
  readonly durability: 'restored';
77
+ /**
78
+ * History (D850): none — `pressCountSinceStart` resets with the addon, so it is not a monotonic meter; presses live in the events ledger.
79
+ */
80
+ readonly history: 'none';
77
81
  };
78
82
  export type IDoorbellProvider = InferProvider<typeof doorbellCapability>;
@@ -62,6 +62,10 @@ export declare const enumSensorCapability: {
62
62
  * `scripts/check-runtime-state-durability.ts`.
63
63
  */
64
64
  readonly durability: 'restored';
65
+ /**
66
+ * History (D850): none — text/enum state has no history (non-goal).
67
+ */
68
+ readonly history: 'none';
65
69
  /** Clock fields: written, but excluded from the compare that decides
66
70
  * whether persisting is worth a SQLite commit. */
67
71
  readonly volatileStateFields: readonly ["lastFetchedAt"];
@@ -81,5 +81,9 @@ export declare const eventEmitterCapability: {
81
81
  * `scripts/check-runtime-state-durability.ts`.
82
82
  */
83
83
  readonly durability: 'session';
84
+ /**
85
+ * History (D850): none — `eventCountSinceStart` resets with the addon; events live in ledgers.
86
+ */
87
+ readonly history: 'none';
84
88
  };
85
89
  export type IEventEmitterProvider = InferProvider<typeof eventEmitterCapability>;
@@ -102,5 +102,20 @@ export declare const fanControlCapability: {
102
102
  * `scripts/check-runtime-state-durability.ts`.
103
103
  */
104
104
  readonly durability: 'session';
105
+ /**
106
+ * History (D850): recorded series. Actuator tier: speed keeps every change.
107
+ */
108
+ readonly history: {
109
+ readonly fields: {
110
+ readonly percentage: {
111
+ readonly kind: 'gauge';
112
+ readonly unit: '%';
113
+ readonly minIntervalMs: 0;
114
+ };
115
+ readonly oscillating: {
116
+ readonly kind: 'boolean';
117
+ };
118
+ };
119
+ };
105
120
  };
106
121
  export type IFanControlProvider = InferProvider<typeof fanControlCapability>;
@@ -82,5 +82,9 @@ export declare const featureProbeCapability: {
82
82
  * `scripts/check-runtime-state-durability.ts`.
83
83
  */
84
84
  readonly durability: 'session';
85
+ /**
86
+ * History (D850): none — static identity and capability probe.
87
+ */
88
+ readonly history: 'none';
85
89
  };
86
90
  export type IFeatureProbeProvider = InferProvider<typeof featureProbeCapability>;
@@ -39,6 +39,16 @@ export declare const floodCapability: {
39
39
  * `scripts/check-runtime-state-durability.ts`.
40
40
  */
41
41
  readonly durability: 'restored';
42
+ /**
43
+ * History (D850): recorded series.
44
+ */
45
+ readonly history: {
46
+ readonly fields: {
47
+ readonly flooded: {
48
+ readonly kind: 'boolean';
49
+ };
50
+ };
51
+ };
42
52
  /** Clock fields: written, but excluded from the compare that decides
43
53
  * whether persisting is worth a SQLite commit. */
44
54
  readonly volatileStateFields: readonly ["lastChangedAt"];
@@ -36,6 +36,16 @@ export declare const gasCapability: {
36
36
  * `scripts/check-runtime-state-durability.ts`.
37
37
  */
38
38
  readonly durability: 'restored';
39
+ /**
40
+ * History (D850): recorded series.
41
+ */
42
+ readonly history: {
43
+ readonly fields: {
44
+ readonly detected: {
45
+ readonly kind: 'boolean';
46
+ };
47
+ };
48
+ };
39
49
  /** Clock fields: written, but excluded from the compare that decides
40
50
  * whether persisting is worth a SQLite commit. */
41
51
  readonly volatileStateFields: readonly ["lastChangedAt"];
@@ -84,5 +84,20 @@ export declare const humidifierCapability: {
84
84
  * `scripts/check-runtime-state-durability.ts`.
85
85
  */
86
86
  readonly durability: 'session';
87
+ /**
88
+ * History (D850): recorded series.
89
+ */
90
+ readonly history: {
91
+ readonly fields: {
92
+ readonly currentHumidity: {
93
+ readonly kind: 'gauge';
94
+ readonly unit: '%';
95
+ readonly deadband: 0.5;
96
+ };
97
+ readonly on: {
98
+ readonly kind: 'boolean';
99
+ };
100
+ };
101
+ };
87
102
  };
88
103
  export type IHumidifierProvider = InferProvider<typeof humidifierCapability>;
@@ -45,6 +45,18 @@ export declare const humiditySensorCapability: {
45
45
  * `scripts/check-runtime-state-durability.ts`.
46
46
  */
47
47
  readonly durability: 'restored';
48
+ /**
49
+ * History (D850): recorded series.
50
+ */
51
+ readonly history: {
52
+ readonly fields: {
53
+ readonly percent: {
54
+ readonly kind: 'gauge';
55
+ readonly unit: '%';
56
+ readonly deadband: 0.5;
57
+ };
58
+ };
59
+ };
48
60
  /** Clock fields: written, but excluded from the compare that decides
49
61
  * whether persisting is worth a SQLite commit. */
50
62
  readonly volatileStateFields: readonly ["lastFetchedAt"];
@@ -360,6 +360,10 @@ export declare const imageSettingsCapability: {
360
360
  * `scripts/check-runtime-state-durability.ts`.
361
361
  */
362
362
  readonly durability: 'restored';
363
+ /**
364
+ * History (D850): none — camera image configuration (operator intent), not a trend.
365
+ */
366
+ readonly history: 'none';
363
367
  /** Clock fields: written, but excluded from the compare that decides
364
368
  * whether persisting is worth a SQLite commit. */
365
369
  readonly volatileStateFields: readonly ["lastFetchedAt"];
@@ -49,5 +49,9 @@ export declare const imageCapability: {
49
49
  * `scripts/check-runtime-state-durability.ts`.
50
50
  */
51
51
  readonly durability: 'session';
52
+ /**
53
+ * History (D850): none — not numeric.
54
+ */
55
+ readonly history: 'none';
52
56
  };
53
57
  export type IImageProvider = InferProvider<typeof imageCapability>;