@camstack/types 1.2.399 → 1.2.401

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/addon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_sleep = require("./sleep-CD18m9HF.js");
2
+ const require_sleep = require("./sleep-DVovpDRU.js");
3
3
  const require_event_category = require("./event-category-7AwNbPjm.js");
4
4
  const require_err_msg = require("./err-msg-BhVbr0NX.js");
5
5
  //#region src/generated/cap-input-defaults.ts
@@ -1067,24 +1067,6 @@ var CAP_STATE_LEAVES = Object.freeze({
1067
1067
  "path": "powerState",
1068
1068
  "valueType": "string"
1069
1069
  },
1070
- {
1071
- "path": "saltLevel",
1072
- "valueType": "enum",
1073
- "enumValues": [
1074
- "ok",
1075
- "low",
1076
- "empty"
1077
- ]
1078
- },
1079
- {
1080
- "path": "rinseAidLevel",
1081
- "valueType": "enum",
1082
- "enumValues": [
1083
- "ok",
1084
- "low",
1085
- "empty"
1086
- ]
1087
- },
1088
1070
  {
1089
1071
  "path": "filterCleaningDue",
1090
1072
  "valueType": "boolean"
@@ -2110,58 +2092,6 @@ var CAP_STATE_LEAVES = Object.freeze({
2110
2092
  "path": "fanSpeed",
2111
2093
  "valueType": "string"
2112
2094
  },
2113
- {
2114
- "path": "cleanWater.level",
2115
- "valueType": "number"
2116
- },
2117
- {
2118
- "path": "cleanWater.status",
2119
- "valueType": "enum",
2120
- "enumValues": [
2121
- "ok",
2122
- "low",
2123
- "full"
2124
- ]
2125
- },
2126
- {
2127
- "path": "dirtyWater.level",
2128
- "valueType": "number"
2129
- },
2130
- {
2131
- "path": "dirtyWater.status",
2132
- "valueType": "enum",
2133
- "enumValues": [
2134
- "ok",
2135
- "low",
2136
- "full"
2137
- ]
2138
- },
2139
- {
2140
- "path": "detergent.level",
2141
- "valueType": "number"
2142
- },
2143
- {
2144
- "path": "detergent.status",
2145
- "valueType": "enum",
2146
- "enumValues": [
2147
- "ok",
2148
- "low",
2149
- "full"
2150
- ]
2151
- },
2152
- {
2153
- "path": "dustBin.level",
2154
- "valueType": "number"
2155
- },
2156
- {
2157
- "path": "dustBin.status",
2158
- "valueType": "enum",
2159
- "enumValues": [
2160
- "ok",
2161
- "low",
2162
- "full"
2163
- ]
2164
- },
2165
2095
  {
2166
2096
  "path": "progressPercent",
2167
2097
  "valueType": "number"
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $t as recordArrayItemPath, A as HF_REPO, An as RECORD_DELETE_BATCH, B as describeCustomActions, Bn as REVALIDATE_AFTER_MS, Br as isSecretMarker, Bt as RecordFieldPathSchema, C as addonSliceHandleApi, Cn as asRecordsError, Dn as RECORD_CLASSES, En as RECORD_BATCH_MAX_BYTES, Er as emitReadiness, F as DEVICE_CHILDREN_BATCH_MAX, Fn as RECORD_QUERY_MAX, Ft as defineEntryKind, Gn as knownSecretCount, Gt as StoredRecordKindDeclarationSchema, H as adminUiCapability, Hn as MIN_SCRUBBED_LENGTH, Hr as makeSecretMarker, Ht as RecordKindDeclarationSchema, I as CALLER_STAMPED_CAPABILITIES, In as RECORD_SECRET_COLLECTION_PREFIX, Ir as SECRET_CLEAR, It as entryBody, Jn as shortSecretRefHash, Jt as defineRecordKinds, Kn as registerKnownSecret, Kt as assertValidDeclaration, L as withoutCallerStamp, Ln as RECORD_SETTINGS_MAX_ROWS, Lr as classifySecretWrite, Lt as createRecordsAccess, Mn as RECORD_MAX_DATA_BYTES, N as deviceOpsCapability, Nn as RECORD_MAX_INDEXES, On as RECORD_DATABASES, P as viewerUiCapability, Pn as RECORD_MAX_INDEX_FIELDS, Pt as makeInMemoryRecords, Qn as PEER_BYTES_TICKET_TTL_MS, Qt as parseSecretPath, Rn as RECORD_SWEEP_INTERVAL_MS, Rr as isSecretClear, Rt as assertTransactScope, Sn as UnknownRecordKindError, Sr as parseSecretRef, Tn as RECORD_BATCH_MAX, Tr as createEvent, Un as clearKnownSecrets, Ur as toSecretFieldView, Ut as RecordKindNameSchema, Vn as createSecretsAccess, Vr as isSecretMarkerLike, Vt as RecordIndexSchema, Wn as forgetKnownSecret, Wt as RecordRetentionSchema, X as expandCapMethods, Xn as PEER_BYTES_MAX_OUTSTANDING, Xt as collectSecretLeaves, Yn as PEER_BYTES_CHUNK_BYTES, Yt as REMOVE_LEAF, Zn as PEER_BYTES_STALL_MS, Zt as mapSecretLeaves, _ as readErrorI18n, _n as RecordUniqueViolationError, _r as buildSecretRef, an as isZodSecret, ar as normalizeAddonInitResult, b as isDeviceScopedCap, bn as TransactRefusedError, br as isSecretRef, c as asString, cn as FilterRequiredError, ct as ReadinessTimeoutError, d as parseJsonUnknown, dn as NoCallerError, dt as scopeKey, en as recordSecretCollection, er as DATAPLANE_SECRET_HEADER, f as hfModelUrl, fn as PlaintextSecretError, g as ErrorI18nPayloadSchema, gn as RecordTooLargeError, gr as arrayItemFieldPath, hn as RecordSecretUnavailableError, hr as SECRET_REF_SCHEME, in as collectZodSecretPaths, it as readNodePin, jn as RECORD_ID_MAX_LENGTH, kn as RECORD_DEFAULT_MAX_DATA_BYTES, ln as ForeignSecretMarkerError, mn as RecordNotFoundError, nn as secretArrayPrefixes, nr as DisposerChain, o as asJsonObject, on as BatchTooLargeError, ot as MODEL_FORMATS, p as BOOT_RECOVERY_BACKOFF_MS, pn as RECORDS_ERROR_CODES, qn as scrubKnownSecrets, qt as declarationsOf, r as maskUrlCredentials, rr as BaseAddon, rt as nodePin, sn as DeclarationRefusedError, st as ReadinessRegistry, t as sleep, tn as recordSecretRef, un as InvalidRecordError, vn as RecordsError, vr as formatSecretScope, w as createEventBusSliceSource, wn as recordsErrorFromMessage, x as createDeviceProxy, xn as UnindexedFilterError, xr as normalizeSecretOwner, y as DEVICE_SCOPED_CAPS, yn as RevConflictError, yr as globalSecretScope, zn as resolveSecretViewsIn, zr as isSecretFieldView, zt as EntryDescriptorSchema } from "./sleep-DJFUfKvA.mjs";
1
+ import { $n as PEER_BYTES_TICKET_TTL_MS, $t as parseSecretPath, A as HF_REPO, An as RECORD_DEFAULT_MAX_DATA_BYTES, B as describeCustomActions, Bn as resolveSecretViewsIn, Br as isSecretFieldView, Bt as EntryDescriptorSchema, C as addonSliceHandleApi, Cn as UnknownRecordKindError, Cr as parseSecretRef, Dn as RECORD_BATCH_MAX_BYTES, Dr as emitReadiness, En as RECORD_BATCH_MAX, Er as createEvent, F as DEVICE_CHILDREN_BATCH_MAX, Fn as RECORD_MAX_INDEX_FIELDS, Ft as makeInMemoryRecords, Gn as forgetKnownSecret, Gt as RecordRetentionSchema, H as adminUiCapability, Hn as createSecretsAccess, Hr as isSecretMarkerLike, Ht as RecordIndexSchema, I as CALLER_STAMPED_CAPABILITIES, In as RECORD_QUERY_MAX, It as defineEntryKind, Jn as scrubKnownSecrets, Jt as declarationsOf, Kn as knownSecretCount, Kt as StoredRecordKindDeclarationSchema, L as withoutCallerStamp, Ln as RECORD_SECRET_COLLECTION_PREFIX, Lr as SECRET_CLEAR, Lt as entryBody, Mn as RECORD_ID_MAX_LENGTH, N as deviceOpsCapability, Nn as RECORD_MAX_DATA_BYTES, On as RECORD_CLASSES, P as viewerUiCapability, Pn as RECORD_MAX_INDEXES, Qn as PEER_BYTES_STALL_MS, Qt as mapSecretLeaves, Rn as RECORD_SETTINGS_MAX_ROWS, Rr as classifySecretWrite, Rt as createRecordsAccess, Sn as UnindexedFilterError, Sr as normalizeSecretOwner, Tn as recordsErrorFromMessage, Un as MIN_SCRUBBED_LENGTH, Ur as makeSecretMarker, Ut as RecordKindDeclarationSchema, Vn as REVALIDATE_AFTER_MS, Vr as isSecretMarker, Vt as RecordFieldPathSchema, Wn as clearKnownSecrets, Wr as toSecretFieldView, Wt as RecordKindNameSchema, X as expandCapMethods, Xn as PEER_BYTES_CHUNK_BYTES, Xt as REMOVE_LEAF, Yn as shortSecretRefHash, Yt as defineRecordKinds, Zn as PEER_BYTES_MAX_OUTSTANDING, Zt as collectSecretLeaves, _ as readErrorI18n, _n as RecordTooLargeError, _r as arrayItemFieldPath, an as collectZodSecretPaths, at as readNodePin, b as isDeviceScopedCap, bn as RevConflictError, br as globalSecretScope, c as asString, cn as DeclarationRefusedError, ct as ReadinessRegistry, d as parseJsonUnknown, dn as InvalidRecordError, en as recordArrayItemPath, f as hfModelUrl, fn as NoCallerError, ft as scopeKey, g as ErrorI18nPayloadSchema, gn as RecordSecretUnavailableError, gr as SECRET_REF_SCHEME, hn as RecordNotFoundError, ir as BaseAddon, it as nodePin, jn as RECORD_DELETE_BATCH, kn as RECORD_DATABASES, ln as FilterRequiredError, lt as ReadinessTimeoutError, mn as RECORDS_ERROR_CODES, nn as recordSecretRef, o as asJsonObject, on as isZodSecret, or as normalizeAddonInitResult, p as BOOT_RECOVERY_BACKOFF_MS, pn as PlaintextSecretError, qn as registerKnownSecret, qt as assertValidDeclaration, r as maskUrlCredentials, rn as secretArrayPrefixes, rr as DisposerChain, sn as BatchTooLargeError, st as MODEL_FORMATS, t as sleep, tn as recordSecretCollection, tr as DATAPLANE_SECRET_HEADER, un as ForeignSecretMarkerError, vn as RecordUniqueViolationError, vr as buildSecretRef, w as createEventBusSliceSource, wn as asRecordsError, x as createDeviceProxy, xn as TransactRefusedError, xr as isSecretRef, y as DEVICE_SCOPED_CAPS, yn as RecordsError, yr as formatSecretScope, zn as RECORD_SWEEP_INTERVAL_MS, zr as isSecretClear, zt as assertTransactScope } from "./sleep-CUp20JkO.mjs";
2
2
  import { t as EventCategory } from "./event-category-BfJwUd2S.mjs";
3
3
  import { a as DeviceType, t as errMsg } from "./err-msg-BXKzRBwg.mjs";
4
4
  //#region src/generated/cap-input-defaults.ts
@@ -1066,24 +1066,6 @@ var CAP_STATE_LEAVES = Object.freeze({
1066
1066
  "path": "powerState",
1067
1067
  "valueType": "string"
1068
1068
  },
1069
- {
1070
- "path": "saltLevel",
1071
- "valueType": "enum",
1072
- "enumValues": [
1073
- "ok",
1074
- "low",
1075
- "empty"
1076
- ]
1077
- },
1078
- {
1079
- "path": "rinseAidLevel",
1080
- "valueType": "enum",
1081
- "enumValues": [
1082
- "ok",
1083
- "low",
1084
- "empty"
1085
- ]
1086
- },
1087
1069
  {
1088
1070
  "path": "filterCleaningDue",
1089
1071
  "valueType": "boolean"
@@ -2109,58 +2091,6 @@ var CAP_STATE_LEAVES = Object.freeze({
2109
2091
  "path": "fanSpeed",
2110
2092
  "valueType": "string"
2111
2093
  },
2112
- {
2113
- "path": "cleanWater.level",
2114
- "valueType": "number"
2115
- },
2116
- {
2117
- "path": "cleanWater.status",
2118
- "valueType": "enum",
2119
- "enumValues": [
2120
- "ok",
2121
- "low",
2122
- "full"
2123
- ]
2124
- },
2125
- {
2126
- "path": "dirtyWater.level",
2127
- "valueType": "number"
2128
- },
2129
- {
2130
- "path": "dirtyWater.status",
2131
- "valueType": "enum",
2132
- "enumValues": [
2133
- "ok",
2134
- "low",
2135
- "full"
2136
- ]
2137
- },
2138
- {
2139
- "path": "detergent.level",
2140
- "valueType": "number"
2141
- },
2142
- {
2143
- "path": "detergent.status",
2144
- "valueType": "enum",
2145
- "enumValues": [
2146
- "ok",
2147
- "low",
2148
- "full"
2149
- ]
2150
- },
2151
- {
2152
- "path": "dustBin.level",
2153
- "valueType": "number"
2154
- },
2155
- {
2156
- "path": "dustBin.status",
2157
- "valueType": "enum",
2158
- "enumValues": [
2159
- "ok",
2160
- "low",
2161
- "full"
2162
- ]
2163
- },
2164
2094
  {
2165
2095
  "path": "progressPercent",
2166
2096
  "valueType": "number"
@@ -20,6 +20,7 @@ declare const ConfigSectionWithValuesSchema: z.ZodObject<{
20
20
  columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
21
21
  tab: z.ZodOptional<z.ZodString>;
22
22
  location: z.ZodOptional<z.ZodEnum<{
23
+ hero: "hero";
23
24
  settings: "settings";
24
25
  "top-tab": "top-tab";
25
26
  }>>;
@@ -47,6 +48,7 @@ declare const SettingsSchemaWithValuesSchema: z.ZodObject<{
47
48
  columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
48
49
  tab: z.ZodOptional<z.ZodString>;
49
50
  location: z.ZodOptional<z.ZodEnum<{
51
+ hero: "hero";
50
52
  settings: "settings";
51
53
  "top-tab": "top-tab";
52
54
  }>>;
@@ -118,6 +120,7 @@ export declare const addonSettingsCapability: {
118
120
  columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
119
121
  tab: z.ZodOptional<z.ZodString>;
120
122
  location: z.ZodOptional<z.ZodEnum<{
123
+ hero: "hero";
121
124
  settings: "settings";
122
125
  "top-tab": "top-tab";
123
126
  }>>;
@@ -156,6 +159,7 @@ export declare const addonSettingsCapability: {
156
159
  columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
157
160
  tab: z.ZodOptional<z.ZodString>;
158
161
  location: z.ZodOptional<z.ZodEnum<{
162
+ hero: "hero";
159
163
  settings: "settings";
160
164
  "top-tab": "top-tab";
161
165
  }>>;
@@ -188,6 +192,7 @@ export declare const addonSettingsCapability: {
188
192
  columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
189
193
  tab: z.ZodOptional<z.ZodString>;
190
194
  location: z.ZodOptional<z.ZodEnum<{
195
+ hero: "hero";
191
196
  settings: "settings";
192
197
  "top-tab": "top-tab";
193
198
  }>>;
@@ -334,6 +334,14 @@ export interface DeviceConfigWidgetUi {
334
334
  /** Tab id; with `topTab:true` the section is hoisted to its own device tab. */
335
335
  readonly tab: string;
336
336
  readonly topTab?: boolean;
337
+ /**
338
+ * Where the section lands on the device page. `'tab'` (default) follows
339
+ * `tab` / `topTab`; `'hero'` shows it ONCE directly under the device's
340
+ * hero card, in the same block, on every tab of the device page, for every
341
+ * device bound to the cap (D915). A hero section never also appears in a
342
+ * tab.
343
+ */
344
+ readonly placement?: 'tab' | 'hero';
337
345
  /** Section title + field label shown in the UI. */
338
346
  readonly label: string;
339
347
  /** Section ordering within the tab. Default 0. */
@@ -447,14 +455,45 @@ export interface CapabilityHistoryField {
447
455
  */
448
456
  readonly excludeDeviceTypes?: readonly DeviceType[];
449
457
  }
458
+ /**
459
+ * Series recorded from a KEYED ARRAY of `runtimeState` (D917): one series per
460
+ * (item field, item key). The item key is the series SCOPE — the same
461
+ * dimension a producer's per-zone or per-location series uses — so the store,
462
+ * rollups, retention and queries need nothing new. The series key is
463
+ * `cap:<capName>.<path>[].<field>` ({@link historyItemFieldPath}).
464
+ *
465
+ * An item that appears later gets its series on its first reading; an item
466
+ * that disappears keeps its history until retention ages it out. The display
467
+ * name of an item's series is read at query time from the item's `label`
468
+ * field in the device's current slice (the key when the item is gone).
469
+ */
470
+ export interface CapabilityHistoryItems {
471
+ /** Path of the array: a top-level or fixed-object (`a.b`) `runtimeState` path. */
472
+ readonly path: string;
473
+ /** Field of an item that identifies it across readings: a non-empty string. */
474
+ readonly key: string;
475
+ /** Field of an item that names it for display (a string). */
476
+ readonly label?: string;
477
+ /**
478
+ * ITEM-relative paths (top-level or fixed-object `a.b`) to a series spec.
479
+ * `unitFrom` and `skipWhenSet` are item-relative as well.
480
+ */
481
+ readonly fields: Readonly<Record<string, CapabilityHistoryField>>;
482
+ }
483
+ /** The catalog field path of an item field: `<itemsPath>[].<field>` (`items[].level`). */
484
+ export declare function historyItemFieldPath(itemsPath: string, field: string): string;
450
485
  /**
451
486
  * The `history` block of a cap with `runtimeState`: `'none'` is an explicit
452
487
  * answer; otherwise `fields` maps TOP-LEVEL or fixed-object (`a.b`) paths of
453
488
  * `runtimeState` to a series. A path never goes into an array or a record keyed
454
- * by runtime ids. Enforced by `scripts/check-cap-history-declared.ts`.
489
+ * by runtime ids — a keyed array is declared through `items`
490
+ * ({@link CapabilityHistoryItems}), whose item key becomes the series scope.
491
+ * `fields` may be empty only when `items` is declared. Enforced by
492
+ * `scripts/check-cap-history-declared.ts`.
455
493
  */
456
494
  export type CapabilityHistory = 'none' | {
457
495
  readonly fields: Readonly<Record<string, CapabilityHistoryField>>;
496
+ readonly items?: CapabilityHistoryItems;
458
497
  };
459
498
  /** Capture floor (ms) applied to `gauge` / `counter` series when a field states none. */
460
499
  export declare const HISTORY_DEFAULT_MIN_INTERVAL_MS = 10000;
@@ -851,6 +890,7 @@ export declare const DEVICE_SETTINGS_CONTRIBUTION_METHODS: {
851
890
  columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
852
891
  tab: z.ZodOptional<z.ZodString>;
853
892
  location: z.ZodOptional<z.ZodEnum<{
893
+ hero: "hero";
854
894
  settings: "settings";
855
895
  "top-tab": "top-tab";
856
896
  }>>;
@@ -884,6 +924,7 @@ export declare const DEVICE_SETTINGS_CONTRIBUTION_METHODS: {
884
924
  columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
885
925
  tab: z.ZodOptional<z.ZodString>;
886
926
  location: z.ZodOptional<z.ZodEnum<{
927
+ hero: "hero";
887
928
  settings: "settings";
888
929
  "top-tab": "top-tab";
889
930
  }>>;
@@ -2,17 +2,87 @@ import { z } from 'zod';
2
2
  import { type InferProvider } from './capability-definition.js';
3
3
  import { DeviceType } from '../device/device-type.js';
4
4
  /**
5
- * Generic device-consumables capability — surfaces a device's
6
- * maintenance items (vacuum filters/brushes, replaceable cartridges,
7
- * descaling cycles, …) with their remaining life and an optional
8
- * "Replaced" reset action. Device-agnostic: any provider that knows its
9
- * device tracks consumables can register it; the cap declares no
10
- * vocabulary of its own — the provider names each item verbatim.
5
+ * Generic device-consumables capability — the ONE place a device reports what
6
+ * it uses up or fills: wear parts (vacuum filters/brushes, cartridges,
7
+ * descaling cycles), supplies it draws from (a vacuum's clean-water tank and
8
+ * detergent, a dishwasher's salt and rinse aid) and waste it collects (a dirty
9
+ * water tank, a dust bin). Each item carries its remaining life or fill and an
10
+ * optional "Replaced" reset action. Device-agnostic: any provider that knows
11
+ * its device tracks consumables registers it; the provider names each item
12
+ * verbatim and says which `kind` it is.
13
+ *
14
+ * The admin UI renders it as ONE collapsible section directly under the
15
+ * device page's hero card (`placement: 'hero'`), for every device bound to
16
+ * this cap — never drawn by a device type's hero card itself (D915).
11
17
  *
12
18
  * Like `childLayout`, the cap is INERT until a provider sets items: no
13
19
  * provider populates it by guessing (no HA inference). The UI renders a
14
20
  * "No consumables reported" placeholder when `items` is empty.
15
21
  */
22
+ /**
23
+ * What an item IS, which decides which direction is bad:
24
+ * - `wear` — a part that wears out (a brush, a filter); low life is bad.
25
+ * - `supply` — something the device draws from (clean water, detergent,
26
+ * salt, rinse aid); low or empty is bad.
27
+ * - `waste` — something the device fills (dirty water, a dust bin); full is
28
+ * bad.
29
+ * Absent = `wear`.
30
+ */
31
+ export declare const ConsumableKindSchema: z.ZodEnum<{
32
+ supply: "supply";
33
+ waste: "waste";
34
+ wear: "wear";
35
+ }>;
36
+ export type ConsumableKind = z.infer<typeof ConsumableKindSchema>;
37
+ /**
38
+ * What an item LOOKS like, which decides how a client draws it — independent
39
+ * of `kind`, which decides which direction is bad:
40
+ * - `part` — a part that wears (a brush, a filter, a mop pad): a wear bar,
41
+ * remaining time and a reset.
42
+ * - `tank` — a container of liquid (clean water, dirty water): a fill gauge.
43
+ * - `product` — something bought and refilled (detergent, salt, rinse aid):
44
+ * a stepped level and "refill".
45
+ * - `bin` — a container that collects waste (a dust bin): a fill gauge
46
+ * that warns when full.
47
+ * Absent = derived from the kind ({@link consumableFormOf}).
48
+ */
49
+ export declare const ConsumableFormSchema: z.ZodEnum<{
50
+ bin: "bin";
51
+ part: "part";
52
+ product: "product";
53
+ tank: "tank";
54
+ }>;
55
+ export type ConsumableForm = z.infer<typeof ConsumableFormSchema>;
56
+ /** The provider's own discrete verdict on an item. */
57
+ export declare const ConsumableStatusSchema: z.ZodEnum<{
58
+ empty: "empty";
59
+ full: "full";
60
+ low: "low";
61
+ ok: "ok";
62
+ replace: "replace";
63
+ }>;
64
+ export type ConsumableStatus = z.infer<typeof ConsumableStatusSchema>;
65
+ /**
66
+ * The level vocabulary every client draws a consumable in (badge tone, bar
67
+ * colour): derived from an item by its kind, level and status. `null` beside
68
+ * it means unknown (D393).
69
+ */
70
+ export declare const ConsumableLevelSchema: z.ZodEnum<{
71
+ empty: "empty";
72
+ full: "full";
73
+ low: "low";
74
+ ok: "ok";
75
+ }>;
76
+ export type ConsumableLevel = z.infer<typeof ConsumableLevelSchema>;
77
+ /** The kind of an item, with the documented default for an absent one. */
78
+ export declare function consumableKindOf(item: {
79
+ readonly kind?: ConsumableKind;
80
+ }): ConsumableKind;
81
+ /** The form of an item: its own when the provider names one, else its kind's default. */
82
+ export declare function consumableFormOf(item: {
83
+ readonly kind?: ConsumableKind;
84
+ readonly form?: ConsumableForm;
85
+ }): ConsumableForm;
16
86
  /** Units a remaining-life counter is reported in. Closed: the panel renders
17
87
  * each. */
18
88
  export declare const ConsumableRemainingUnitSchema: z.ZodEnum<{
@@ -33,17 +103,32 @@ export declare const ConsumableRemainingSchema: z.ZodObject<{
33
103
  }, z.core.$strip>;
34
104
  export type ConsumableRemaining = z.infer<typeof ConsumableRemainingSchema>;
35
105
  /** A single consumable item. Either a continuous `level` (remaining
36
- * life %) or a discrete `status` may be known — both may be null when a
37
- * provider only knows the item exists. `level` and `status` are not
38
- * mutually exclusive; a provider may report both. */
106
+ * life %, or fill % for a `supply` / `waste` item) or a discrete `status`
107
+ * may be known — both may be null when a provider only knows the item
108
+ * exists. `level` and `status` are not mutually exclusive; a provider may
109
+ * report both. */
39
110
  export declare const ConsumableItemSchema: z.ZodObject<{
40
111
  key: z.ZodString;
41
112
  label: z.ZodString;
42
113
  level: z.ZodNullable<z.ZodNumber>;
43
114
  status: z.ZodNullable<z.ZodEnum<{
115
+ empty: "empty";
116
+ full: "full";
117
+ low: "low";
44
118
  ok: "ok";
45
119
  replace: "replace";
46
120
  }>>;
121
+ kind: z.ZodOptional<z.ZodEnum<{
122
+ supply: "supply";
123
+ waste: "waste";
124
+ wear: "wear";
125
+ }>>;
126
+ form: z.ZodOptional<z.ZodEnum<{
127
+ bin: "bin";
128
+ part: "part";
129
+ product: "product";
130
+ tank: "tank";
131
+ }>>;
47
132
  lastResetAt: z.ZodNullable<z.ZodNumber>;
48
133
  resettable: z.ZodBoolean;
49
134
  remaining: z.ZodOptional<z.ZodObject<{
@@ -61,9 +146,23 @@ export declare const ConsumablesStatusSchema: z.ZodObject<{
61
146
  label: z.ZodString;
62
147
  level: z.ZodNullable<z.ZodNumber>;
63
148
  status: z.ZodNullable<z.ZodEnum<{
149
+ empty: "empty";
150
+ full: "full";
151
+ low: "low";
64
152
  ok: "ok";
65
153
  replace: "replace";
66
154
  }>>;
155
+ kind: z.ZodOptional<z.ZodEnum<{
156
+ supply: "supply";
157
+ waste: "waste";
158
+ wear: "wear";
159
+ }>>;
160
+ form: z.ZodOptional<z.ZodEnum<{
161
+ bin: "bin";
162
+ part: "part";
163
+ product: "product";
164
+ tank: "tank";
165
+ }>>;
67
166
  lastResetAt: z.ZodNullable<z.ZodNumber>;
68
167
  resettable: z.ZodBoolean;
69
168
  remaining: z.ZodOptional<z.ZodObject<{
@@ -90,7 +189,7 @@ export declare const consumablesCapability: {
90
189
  readonly kind: 'widget';
91
190
  readonly widgetId: 'host/consumables-panel';
92
191
  readonly tab: 'consumables';
93
- readonly topTab: true;
192
+ readonly placement: 'hero';
94
193
  readonly label: 'Consumables';
95
194
  readonly order: 5;
96
195
  };
@@ -122,9 +221,23 @@ export declare const consumablesCapability: {
122
221
  label: z.ZodString;
123
222
  level: z.ZodNullable<z.ZodNumber>;
124
223
  status: z.ZodNullable<z.ZodEnum<{
224
+ empty: "empty";
225
+ full: "full";
226
+ low: "low";
125
227
  ok: "ok";
126
228
  replace: "replace";
127
229
  }>>;
230
+ kind: z.ZodOptional<z.ZodEnum<{
231
+ supply: "supply";
232
+ waste: "waste";
233
+ wear: "wear";
234
+ }>>;
235
+ form: z.ZodOptional<z.ZodEnum<{
236
+ bin: "bin";
237
+ part: "part";
238
+ product: "product";
239
+ tank: "tank";
240
+ }>>;
128
241
  lastResetAt: z.ZodNullable<z.ZodNumber>;
129
242
  resettable: z.ZodBoolean;
130
243
  remaining: z.ZodOptional<z.ZodObject<{
@@ -144,7 +257,9 @@ export declare const consumablesCapability: {
144
257
  key: string;
145
258
  label: string;
146
259
  level: number | null;
147
- status: "ok" | "replace" | null;
260
+ status: "empty" | "full" | "low" | "ok" | "replace" | null;
261
+ kind?: "supply" | "waste" | "wear" | undefined;
262
+ form?: "bin" | "part" | "product" | "tank" | undefined;
148
263
  lastResetAt: number | null;
149
264
  resettable: boolean;
150
265
  remaining?: {
@@ -163,9 +278,23 @@ export declare const consumablesCapability: {
163
278
  label: z.ZodString;
164
279
  level: z.ZodNullable<z.ZodNumber>;
165
280
  status: z.ZodNullable<z.ZodEnum<{
281
+ empty: "empty";
282
+ full: "full";
283
+ low: "low";
166
284
  ok: "ok";
167
285
  replace: "replace";
168
286
  }>>;
287
+ kind: z.ZodOptional<z.ZodEnum<{
288
+ supply: "supply";
289
+ waste: "waste";
290
+ wear: "wear";
291
+ }>>;
292
+ form: z.ZodOptional<z.ZodEnum<{
293
+ bin: "bin";
294
+ part: "part";
295
+ product: "product";
296
+ tank: "tank";
297
+ }>>;
169
298
  lastResetAt: z.ZodNullable<z.ZodNumber>;
170
299
  resettable: z.ZodBoolean;
171
300
  remaining: z.ZodOptional<z.ZodObject<{
@@ -181,7 +310,9 @@ export declare const consumablesCapability: {
181
310
  key: string;
182
311
  label: string;
183
312
  level: number | null;
184
- status: "ok" | "replace" | null;
313
+ status: "empty" | "full" | "low" | "ok" | "replace" | null;
314
+ kind?: "supply" | "waste" | "wear" | undefined;
315
+ form?: "bin" | "part" | "product" | "tank" | undefined;
185
316
  lastResetAt: number | null;
186
317
  resettable: boolean;
187
318
  remaining?: {
@@ -197,9 +328,23 @@ export declare const consumablesCapability: {
197
328
  label: z.ZodString;
198
329
  level: z.ZodNullable<z.ZodNumber>;
199
330
  status: z.ZodNullable<z.ZodEnum<{
331
+ empty: "empty";
332
+ full: "full";
333
+ low: "low";
200
334
  ok: "ok";
201
335
  replace: "replace";
202
336
  }>>;
337
+ kind: z.ZodOptional<z.ZodEnum<{
338
+ supply: "supply";
339
+ waste: "waste";
340
+ wear: "wear";
341
+ }>>;
342
+ form: z.ZodOptional<z.ZodEnum<{
343
+ bin: "bin";
344
+ part: "part";
345
+ product: "product";
346
+ tank: "tank";
347
+ }>>;
203
348
  lastResetAt: z.ZodNullable<z.ZodNumber>;
204
349
  resettable: z.ZodBoolean;
205
350
  remaining: z.ZodOptional<z.ZodObject<{
@@ -228,9 +373,37 @@ export declare const consumablesCapability: {
228
373
  */
229
374
  readonly durability: 'restored';
230
375
  /**
231
- * History (D850): none — `items` is an array keyed by runtime ids; a history path never enters it.
376
+ * History (D850, D917): one series per (item field, item `key`) — the item key
377
+ * is the series scope, the item `label` names it. A vacuum tank's fill, a
378
+ * brush's remaining life and a dishwasher's salt are each recorded the moment
379
+ * their provider reports them; an item that appears later gets its series.
232
380
  */
233
- readonly history: 'none';
381
+ readonly history: {
382
+ readonly fields: {};
383
+ readonly items: {
384
+ readonly path: 'items';
385
+ readonly key: 'key';
386
+ readonly label: 'label';
387
+ readonly fields: {
388
+ readonly level: {
389
+ readonly kind: 'gauge';
390
+ readonly unit: '%';
391
+ readonly deadband: 2;
392
+ readonly displayName: 'Level';
393
+ };
394
+ readonly status: {
395
+ readonly kind: 'enum';
396
+ readonly displayName: 'Status';
397
+ };
398
+ readonly 'remaining.value': {
399
+ readonly kind: 'gauge';
400
+ readonly unitFrom: 'remaining.unit';
401
+ readonly deadband: 1;
402
+ readonly displayName: 'Remaining';
403
+ };
404
+ };
405
+ };
406
+ };
234
407
  /** Clocks, not content: a re-read that changed no item costs no commit. */
235
408
  readonly volatileStateFields: readonly ["lastChangedAt", "lastFetchedAt"];
236
409
  };
@@ -2509,6 +2509,7 @@ export declare const coreBlocksCapability: {
2509
2509
  columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
2510
2510
  tab: z.ZodOptional<z.ZodString>;
2511
2511
  location: z.ZodOptional<z.ZodEnum<{
2512
+ hero: "hero";
2512
2513
  settings: "settings";
2513
2514
  "top-tab": "top-tab";
2514
2515
  }>>;