@camstack/addon-export-google 0.1.117 → 0.1.118

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.
@@ -5142,6 +5142,14 @@ function object(shape, params) {
5142
5142
  ...normalizeParams(params)
5143
5143
  });
5144
5144
  }
5145
+ function strictObject(shape, params) {
5146
+ return new ZodObject({
5147
+ type: "object",
5148
+ shape,
5149
+ catchall: never(),
5150
+ ...normalizeParams(params)
5151
+ });
5152
+ }
5145
5153
  function looseObject(shape, params) {
5146
5154
  return new ZodObject({
5147
5155
  type: "object",
@@ -5521,7 +5529,7 @@ var ZodIssueCode = {
5521
5529
  var ZodFirstPartyTypeKind;
5522
5530
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5523
5531
  //#endregion
5524
- //#region ../types/dist/sleep-Crlmu_tO.mjs
5532
+ //#region ../types/dist/sleep-6eG9C8Xl.mjs
5525
5533
  /**
5526
5534
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5527
5535
  * window to float samples (D455).
@@ -8497,6 +8505,52 @@ function optionalMethod(input, output, options) {
8497
8505
  providerOptional: true
8498
8506
  };
8499
8507
  }
8508
+ /**
8509
+ * `addon-pages-source` — collection cap exposing per-provider raw page
8510
+ * declarations. Every addon that contributes a UI page registers a
8511
+ * provider here. The hub-side singleton aggregator (`addon-pages` cap,
8512
+ * see `addon-pages.cap.ts`) walks this collection, stamps versioned
8513
+ * `bundleUrl` values, and returns the enriched `AddonPageInfo[]` list
8514
+ * that admin-ui consumes.
8515
+ *
8516
+ * The split exists because the public listing has a different output
8517
+ * shape than the per-provider raw declarations, and we want both ends
8518
+ * to flow through codegen instead of relying on a hand-written wrapper.
8519
+ */
8520
+ var AddonPageDeclarationSchema = object({
8521
+ id: string(),
8522
+ label: string(),
8523
+ icon: string(),
8524
+ path: string(),
8525
+ /**
8526
+ * Module Federation remote name — must match the `name` field on the
8527
+ * page addon's `federation()` plugin config. Used by admin-ui's
8528
+ * `<AddonPageLoader>` to call `loadRemote('<remoteName>/page')`.
8529
+ * Conventionally `addon_<id>_page` (snake_case; MF names cannot
8530
+ * contain hyphens).
8531
+ */
8532
+ remoteName: string(),
8533
+ /**
8534
+ * Bundle filename inside the addon's `dist/` dir served at
8535
+ * `/api/addon-pages/<addonId>/<bundle>`. With Module Federation this
8536
+ * is always `'remoteEntry.js'`; the value is kept on the metadata so
8537
+ * the static-file route can compute an mtime-based cache-buster URL
8538
+ * without a separate filesystem stat.
8539
+ */
8540
+ bundle: string(),
8541
+ /**
8542
+ * Sidebar section this page docks into. Well-known ids: `'detection'`,
8543
+ * `'cluster'`, `'administration'` — the page renders inside that group.
8544
+ * Any OTHER string creates (or joins) a custom section rendered after
8545
+ * the built-in groups; its label comes from `sectionLabel` (first
8546
+ * declaration wins), falling back to the id. Absent → the legacy
8547
+ * "Addon Pages" group.
8548
+ */
8549
+ section: string().optional(),
8550
+ /** Display label for a CUSTOM `section` id (ignored for well-known ids). */
8551
+ sectionLabel: string().optional()
8552
+ });
8553
+ method(_void(), array(AddonPageDeclarationSchema).readonly(), { auth: "admin" });
8500
8554
  var StaticDirOutputSchema$1 = object({ staticDir: string() });
8501
8555
  var VersionOutputSchema$1 = object({ version: string() });
8502
8556
  method(_void(), StaticDirOutputSchema$1, { auth: "admin" }), method(_void(), VersionOutputSchema$1, { auth: "admin" });
@@ -8522,6 +8576,27 @@ function customAction(input, output, options) {
8522
8576
  ...options?.caller ? { caller: "required" } : {}
8523
8577
  };
8524
8578
  }
8579
+ /**
8580
+ * The pipeline step-input shape and the run-result bridge, in a module that
8581
+ * imports nothing but zod and types.
8582
+ *
8583
+ * WHY A SEPARATE FILE (addon footprint, D28): both were declared in
8584
+ * `pipeline-executor.cap.ts`, whose import evaluates the whole executor schema
8585
+ * graph. An addon that only needs these two (the benchmark's `runPipelineTest`
8586
+ * action) paid ~130 MB of heap at load. `pipeline-executor.cap.ts` re-exports
8587
+ * them, so every existing import keeps working; addon server code takes them
8588
+ * from `@camstack/types/addon`.
8589
+ */
8590
+ var PipelineStepInputSchema = lazy(() => object({
8591
+ addonId: string(),
8592
+ modelId: string().optional(),
8593
+ enabled: boolean().default(true),
8594
+ children: array(PipelineStepInputSchema).optional(),
8595
+ settings: record(string(), unknown()).optional(),
8596
+ jumpDeviceKey: string().optional()
8597
+ }));
8598
+ /** Typed bridge to the recursive `FrameResult` graph; validation is structural. */
8599
+ var PipelineRunResultBridge = custom();
8525
8600
  var StaticDirOutputSchema = object({ staticDir: string() });
8526
8601
  var VersionOutputSchema = object({ version: string() });
8527
8602
  method(_void(), StaticDirOutputSchema, { auth: "admin" }), method(_void(), VersionOutputSchema, { auth: "admin" });
@@ -8677,6 +8752,7 @@ var CAP_NAMES = Object.freeze([
8677
8752
  "image-settings",
8678
8753
  "integrations",
8679
8754
  "intercom",
8755
+ "ir-transmitter",
8680
8756
  "keychain",
8681
8757
  "keychain-admin",
8682
8758
  "lawn-mower-control",
@@ -8705,6 +8781,7 @@ var CAP_NAMES = Object.freeze([
8705
8781
  "network-link",
8706
8782
  "network-quality",
8707
8783
  "node-certificates",
8784
+ "node-removal-hook",
8708
8785
  "nodes",
8709
8786
  "notification-output",
8710
8787
  "notification-rules",
@@ -8715,6 +8792,7 @@ var CAP_NAMES = Object.freeze([
8715
8792
  "osd",
8716
8793
  "osd-manager",
8717
8794
  "pet-feeder",
8795
+ "pet-fountain",
8718
8796
  "pipeline-analytics",
8719
8797
  "pipeline-executor",
8720
8798
  "pipeline-orchestrator",
@@ -8735,6 +8813,7 @@ var CAP_NAMES = Object.freeze([
8735
8813
  "recording-onboard",
8736
8814
  "recording-signal",
8737
8815
  "records",
8816
+ "remote",
8738
8817
  "running-state",
8739
8818
  "scene-monitor",
8740
8819
  "script-runner",
@@ -8758,6 +8837,7 @@ var CAP_NAMES = Object.freeze([
8758
8837
  "system",
8759
8838
  "tamper",
8760
8839
  "temperature-sensor",
8840
+ "template",
8761
8841
  "terminal-session",
8762
8842
  "toast",
8763
8843
  "training",
@@ -9698,6 +9778,11 @@ Object.freeze({
9698
9778
  "standby"
9699
9779
  ]
9700
9780
  },
9781
+ {
9782
+ "path": "stateSource",
9783
+ "valueType": "enum",
9784
+ "enumValues": ["reported", "assumed"]
9785
+ },
9701
9786
  {
9702
9787
  "path": "volumeLevel",
9703
9788
  "valueType": "number"
@@ -9924,6 +10009,11 @@ Object.freeze({
9924
10009
  "path": "batteryPower",
9925
10010
  "valueType": "number"
9926
10011
  },
10012
+ {
10013
+ "path": "powerSource",
10014
+ "valueType": "enum",
10015
+ "enumValues": ["mains", "battery"]
10016
+ },
9927
10017
  {
9928
10018
  "path": "desiccantLeftDays",
9929
10019
  "valueType": "number"
@@ -9968,6 +10058,68 @@ Object.freeze({
9968
10058
  {
9969
10059
  "path": "volume",
9970
10060
  "valueType": "number"
10061
+ },
10062
+ {
10063
+ "path": "lastFeedGrams",
10064
+ "valueType": "number"
10065
+ },
10066
+ {
10067
+ "path": "lastFeedHopper1",
10068
+ "valueType": "number"
10069
+ },
10070
+ {
10071
+ "path": "lastFeedHopper2",
10072
+ "valueType": "number"
10073
+ }
10074
+ ],
10075
+ "pet-fountain": [
10076
+ {
10077
+ "path": "waterLevel",
10078
+ "valueType": "number"
10079
+ },
10080
+ {
10081
+ "path": "waterVolume",
10082
+ "valueType": "number"
10083
+ },
10084
+ {
10085
+ "path": "empty",
10086
+ "valueType": "boolean"
10087
+ },
10088
+ {
10089
+ "path": "pumpRunning",
10090
+ "valueType": "boolean"
10091
+ },
10092
+ {
10093
+ "path": "pumpIntervalEnabled",
10094
+ "valueType": "boolean"
10095
+ },
10096
+ {
10097
+ "path": "pumpOnTime",
10098
+ "valueType": "number"
10099
+ },
10100
+ {
10101
+ "path": "pumpOffTime",
10102
+ "valueType": "number"
10103
+ },
10104
+ {
10105
+ "path": "lastDrink",
10106
+ "valueType": "number"
10107
+ },
10108
+ {
10109
+ "path": "currentHourDrink",
10110
+ "valueType": "number"
10111
+ },
10112
+ {
10113
+ "path": "last24hDrink",
10114
+ "valueType": "number"
10115
+ },
10116
+ {
10117
+ "path": "todayDrink",
10118
+ "valueType": "number"
10119
+ },
10120
+ {
10121
+ "path": "error",
10122
+ "valueType": "string"
9971
10123
  }
9972
10124
  ],
9973
10125
  "power-meter": [
@@ -10507,7 +10659,7 @@ object({
10507
10659
  params: record(string(), union([string(), number()])).optional()
10508
10660
  });
10509
10661
  //#endregion
10510
- //#region ../types/dist/err-msg-DIorGYeC.mjs
10662
+ //#region ../types/dist/err-msg-DWXWc0Di.mjs
10511
10663
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
10512
10664
  DeviceType["Camera"] = "camera";
10513
10665
  DeviceType["Hub"] = "hub";
@@ -10599,6 +10751,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
10599
10751
  * native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
10600
10752
  * integrations sharing the same food/desiccant/hopper surface. */
10601
10753
  DeviceType["PetFeeder"] = "pet-feeder";
10754
+ /** Pet water fountain — tank level, water drunk, pump and its duty cycle.
10755
+ * Installed with the `pet-fountain` cap. Reaches CamStack as loose entities
10756
+ * of a container and is BUILT as a composed device (D967). */
10757
+ DeviceType["PetFountain"] = "pet-fountain";
10602
10758
  /** Built-in dishwasher — program lifecycle, door / remote-start gates,
10603
10759
  * salt and rinse-aid levels. Installed with the `dishwasher` cap.
10604
10760
  * Sources: native Bosch Home Connect, reusable by similar integrations.
@@ -10853,6 +11009,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
10853
11009
  /** Fallback when the notifier service name doesn't match a known
10854
11010
  * pattern. */
10855
11011
  DeviceRole["GenericNotifier"] = "generic-notifier";
11012
+ /** Emits a pulse train (infrared or RF) on request — the `ir-transmitter`
11013
+ * cap. A `DeviceType.Generic` device. */
11014
+ DeviceRole["IrTransmitter"] = "ir-transmitter";
10856
11015
  return DeviceRole;
10857
11016
  }({});
10858
11017
  /**
@@ -10866,7 +11025,7 @@ function errMsg(err) {
10866
11025
  return String(err);
10867
11026
  }
10868
11027
  //#endregion
10869
- //#region ../types/dist/composition-CZImLpOI.mjs
11028
+ //#region ../types/dist/composition-kSuOifuG.mjs
10870
11029
  /**
10871
11030
  * The ffmpeg build every CamStack node downloads, per platform and arch.
10872
11031
  *
@@ -11951,12 +12110,28 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11951
12110
  ])
11952
12111
  })
11953
12112
  ]);
11954
- var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
12113
+ var forwardArgUnion = union([
12114
+ string(),
12115
+ number(),
12116
+ boolean(),
12117
+ strictObject({ ["$input"]: string().min(1) }),
12118
+ record(string().min(1), lazy(() => forwardArgUnion))
12119
+ ]);
12120
+ var CompositionForwardArgSchema = forwardArgUnion;
12121
+ /**
12122
+ * `forward` (D659, amended by D967): one method of a BUILT capability is one
12123
+ * call of `cap.method` on `source`. Without `args` the built method's input
12124
+ * passes through minus `deviceId`; with `args` the template IS the source's
12125
+ * whole input. `deviceId` is always the source's own, never an argument.
12126
+ */
12127
+ var CompositionForwardCommandSchema = object({
11955
12128
  kind: literal("forward"),
11956
12129
  source: CompositionSourceRefSchema,
11957
12130
  cap: string().min(1),
11958
- method: string().min(1)
11959
- }), CompositionCodeSourceSchema]);
12131
+ method: string().min(1),
12132
+ args: record(string().min(1), CompositionForwardArgSchema).optional()
12133
+ });
12134
+ var CompositionCommandTargetSchema = discriminatedUnion("kind", [CompositionForwardCommandSchema, CompositionCodeSourceSchema]);
11960
12135
  /** An item key inside an item-array cap (`consumables.items[<key>]`). */
11961
12136
  var COMPOSITION_ITEM_KEY_RE = /^[a-z0-9][a-z0-9-]{0,47}$/;
11962
12137
  /**
@@ -11966,7 +12141,13 @@ var COMPOSITION_ITEM_KEY_RE = /^[a-z0-9][a-z0-9-]{0,47}$/;
11966
12141
  */
11967
12142
  var CompositionItemEntrySchema = object({
11968
12143
  label: string().min(1).max(80),
11969
- fields: record(string().min(1), CompositionFieldSourceSchema)
12144
+ fields: record(string().min(1), CompositionFieldSourceSchema),
12145
+ /**
12146
+ * What the cap's `reset` does for THIS item (consumables). Present = the item
12147
+ * is resettable and a `reset` call naming its key forwards here. The item key
12148
+ * selects the command, so it is never an argument: there is no pass-through.
12149
+ */
12150
+ reset: CompositionForwardCommandSchema.optional()
11970
12151
  });
11971
12152
  var CompositionFeatureSchema = discriminatedUnion("kind", [object({
11972
12153
  kind: literal("fields"),
@@ -11978,7 +12159,7 @@ var CompositionFeatureSchema = discriminatedUnion("kind", [object({
11978
12159
  * owns the WHOLE array field: the composed value holds exactly these items.
11979
12160
  */
11980
12161
  items: record(string().regex(COMPOSITION_ITEM_KEY_RE), CompositionItemEntrySchema).refine((items) => Object.keys(items).length <= 16, { message: `at most 16 items` }).optional(),
11981
- /** RESERVED for slice 3; refused by the validator when non-empty. */
12162
+ /** Method name → what serves it. Only a BUILT capability takes commands (D967). */
11982
12163
  commands: record(string().min(1), CompositionCommandTargetSchema).optional()
11983
12164
  }), object({
11984
12165
  kind: literal("passthrough"),
@@ -16042,6 +16223,427 @@ object({
16042
16223
  lastError: string().nullable()
16043
16224
  });
16044
16225
  /**
16226
+ * notification-output — canonical, capability-gated notification delivery.
16227
+ *
16228
+ * Apprise-derived model (see
16229
+ * `docs/superpowers/specs/2026-07-03-notification-output-notifier-matrix.md`):
16230
+ * callers emit ONE canonical `Notification`; each provider declares a
16231
+ * per-kind capability descriptor (`TargetKind`), and the pure degrade
16232
+ * engine (`@camstack/types` `prepareNotification`) transcodes / degrades the
16233
+ * message to what the kind supports — callers never special-case a service.
16234
+ *
16235
+ * DESIGN DECISIONS (locked):
16236
+ * - Target CRUD lives on THIS cap (`upsertTarget` / `deleteTarget` /
16237
+ * `setTargetEnabled`), each provider persisting via the `settings-store`
16238
+ * cap. Rationale: the admin UI needs one uniform surface across the
16239
+ * notifiers addon AND the HA addon; the addon-`globalSettingsSchema`-array
16240
+ * alternative would fork the UI per addon and cannot host the
16241
+ * discovery→adopt flow.
16242
+ * - `listTargetKinds` / `listTargets` / `discoverTargets` return arrays →
16243
+ * the generated cap-mount auto-`concatCollection`-fans them across every
16244
+ * registered provider (notifiers addon + HA addon) so one catalog is
16245
+ * routable. `send` / `testTarget` / CRUD route to ONE provider by the
16246
+ * `addonId` the generated collection router extracts from the call input.
16247
+ * - `Attachment.bytes` is `Uint8Array`. Transport-safe: superjson (the tRPC
16248
+ * transformer) + UDS MsgPack both round-trip typed arrays — already used by
16249
+ * `storage` / `storage-provider` / `recording` caps over the same path. No
16250
+ * base64 fallback needed.
16251
+ *
16252
+ * TODO (deferred, closed-set change — separate decision): add
16253
+ * `providerKind: 'notify'` so notification providers surface on the unified
16254
+ * admin "Integrations" page.
16255
+ */
16256
+ /**
16257
+ * Zentik-derived typed-media enum — the superset across every kind. Each
16258
+ * adapter picks what it supports and the degrade engine filters the rest.
16259
+ */
16260
+ var AttachmentMediaTypeSchema = _enum([
16261
+ "image",
16262
+ "video",
16263
+ "gif",
16264
+ "audio",
16265
+ "icon"
16266
+ ]);
16267
+ /**
16268
+ * A single attachment. Exactly one of `url` (remote source, most adapters
16269
+ * prefer this) or `bytes` (inline source; required for Pushover-style
16270
+ * bytes-only kinds) MUST be present — the degrade engine expresses a
16271
+ * url→bytes fetch as a `needsFetch` directive the adapter executes.
16272
+ */
16273
+ var AttachmentSchema = object({
16274
+ mediaType: AttachmentMediaTypeSchema,
16275
+ url: string().optional(),
16276
+ bytes: _instanceof(Uint8Array).optional(),
16277
+ mime: string().optional(),
16278
+ name: string().optional()
16279
+ }).refine((a) => a.url !== void 0 || a.bytes !== void 0, { message: "Attachment requires either `url` or `bytes`" });
16280
+ var NotificationFormatSchema = _enum([
16281
+ "text",
16282
+ "markdown",
16283
+ "html"
16284
+ ]);
16285
+ /**
16286
+ * The CLOSED icon vocabulary an action button may use.
16287
+ *
16288
+ * A closed set, not a free string, and that is the whole point: an arbitrary
16289
+ * icon name is one that ntfy renders, zentik silently drops, and nobody
16290
+ * notices — the same class of gap as a zone vocabulary nothing produced
16291
+ * ([D35](../../../docs/decisions/adr-0035.md)). Every adapter maps this set or
16292
+ * declares `actionIcons: false` and the degrade engine strips the field.
16293
+ *
16294
+ * Named by INTENT, never by glyph. "check" would tie the vocabulary to one
16295
+ * renderer's icon set; "acknowledge" survives an adapter that draws it
16296
+ * differently.
16297
+ *
16298
+ * ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
16299
+ *
16300
+ * These names are for US. **No adapter may forward one verbatim.** Each maps
16301
+ * the whole set onto its own renderer's vocabulary through a
16302
+ * `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
16303
+ * fallback, so adding a member here fails every adapter's build until someone
16304
+ * decides its glyph, which is the only place that decision can be made
16305
+ * honestly.
16306
+ *
16307
+ * This paragraph is the bug. Zentik declared `actionIcons: true` and passed
16308
+ * `disarm` straight through; iOS feeds that string to
16309
+ * `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
16310
+ * and every snooze and alarm button arrived BLANK. A pass-through is not a
16311
+ * mapping, and "the field is documented" is not "the value renders".
16312
+ *
16313
+ * Adding a member is TRAIN-BOUND. The enum lives in the published
16314
+ * `@camstack/server` closure and the cap seam validates against the HUB's copy,
16315
+ * so an addon that emits a token the running hub does not know does not lose an
16316
+ * icon — its whole `send` fails Zod validation and the notification never
16317
+ * arrives. Never emit a new token from an addon before the train carrying it.
16318
+ */
16319
+ var NotificationActionIconSchema = _enum([
16320
+ "acknowledge",
16321
+ "dismiss",
16322
+ "silence",
16323
+ "snooze",
16324
+ "view",
16325
+ "play",
16326
+ "open",
16327
+ "close",
16328
+ "lock",
16329
+ "unlock",
16330
+ "arm",
16331
+ "arm-home",
16332
+ "arm-away",
16333
+ "arm-night",
16334
+ "disarm",
16335
+ "light",
16336
+ "alert",
16337
+ "camera"
16338
+ ]);
16339
+ /** A single tap-through action button. */
16340
+ var NotificationActionSchema = object({
16341
+ id: string(),
16342
+ label: string(),
16343
+ url: string().optional(),
16344
+ /** Dropped by the degrade engine for a kind with `caps.actionIcons: false`. */
16345
+ icon: NotificationActionIconSchema.optional(),
16346
+ /**
16347
+ * Renders in a warning style where the notifier supports it.
16348
+ *
16349
+ * A HINT, never a gate. The callback's authority is its token and nothing
16350
+ * else — see `notification-center/action-token.ts` for what that does and
16351
+ * does not buy.
16352
+ */
16353
+ destructive: boolean().optional(),
16354
+ /**
16355
+ * How the tap should REACH the url.
16356
+ *
16357
+ * `navigate` (absent, and every button authored before this field) opens it:
16358
+ * the phone leaves the notification and shows whatever the callback returns.
16359
+ * That is right for a button whose answer the operator wants to read.
16360
+ *
16361
+ * `background` fires it as a POST and stays put. It exists for the buttons
16362
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
16363
+ * an answer to the notification, and being thrown into a browser tab to
16364
+ * confirm it costs more attention than the notification did. A backend that
16365
+ * cannot do a background call renders it as an ordinary link (the adapters
16366
+ * fall back rather than dropping the button), so this is a preference, never
16367
+ * a requirement.
16368
+ */
16369
+ mode: _enum(["navigate", "background"]).optional()
16370
+ });
16371
+ /** A delivery parameter value: what a notifier declared it takes. */
16372
+ var DeliveryParamValueSchema = union([
16373
+ string(),
16374
+ number(),
16375
+ boolean()
16376
+ ]);
16377
+ /**
16378
+ * One extra delivery parameter a notifier KIND declares (D938). A rule that
16379
+ * addresses a target of that kind may set it; a kind that declares nothing is
16380
+ * never handed one. The admin UI derives its control from this descriptor —
16381
+ * no editor knows a service by name.
16382
+ *
16383
+ * Optional fields are `.optional()`, never `.default()` (a Zod default does not
16384
+ * run on the addon cap path).
16385
+ */
16386
+ var DeliveryParamSchema = object({
16387
+ key: string().min(1),
16388
+ label: string(),
16389
+ /** i18n key of the label, resolved by the declaring addon's namespace. */
16390
+ labelKey: string().optional(),
16391
+ type: _enum([
16392
+ "enum",
16393
+ "number",
16394
+ "boolean",
16395
+ "string"
16396
+ ]),
16397
+ /** `enum` only: the closed set of accepted values. */
16398
+ options: array(object({
16399
+ value: string(),
16400
+ label: string()
16401
+ })).optional(),
16402
+ /** `number` only. */
16403
+ min: number().optional(),
16404
+ max: number().optional(),
16405
+ /** What the notifier does when the rule sets nothing; shown as the placeholder. */
16406
+ default: DeliveryParamValueSchema.optional()
16407
+ });
16408
+ /**
16409
+ * The canonical notification. `body` is the only hard field (Apprise model).
16410
+ * `priority` is a 5-level ORDINAL (1=lowest … 3=normal(default) … 5=urgent),
16411
+ * NOT a fixed severity enum — each kind declares its own `caps.levels` and
16412
+ * the adapter maps this ordinal onto its native level. `level?` is an
16413
+ * optional kind-native level id (`emergency`, `silent`, …) that overrides
16414
+ * `priority` for that one target.
16415
+ */
16416
+ var NotificationSchema = object({
16417
+ body: string(),
16418
+ title: string().optional(),
16419
+ format: NotificationFormatSchema.default("text"),
16420
+ priority: number().int().min(1).max(5).default(3),
16421
+ level: string().optional(),
16422
+ attachments: array(AttachmentSchema).optional(),
16423
+ clickUrl: string().optional(),
16424
+ actions: array(NotificationActionSchema).optional(),
16425
+ sound: string().optional(),
16426
+ ttl: number().optional(),
16427
+ tag: string().optional(),
16428
+ deviceId: number().optional(),
16429
+ eventId: string().optional(),
16430
+ metadata: record(string(), unknown()).optional(),
16431
+ /**
16432
+ * Values for the parameters the target's kind DECLARES in
16433
+ * {@link TargetKindSchema} `deliveryParams`. Already validated against the
16434
+ * declaration by the sender; a notifier reads only the keys it declared.
16435
+ */
16436
+ delivery: record(string(), DeliveryParamValueSchema).optional()
16437
+ });
16438
+ /** One declared native severity/priority level for a kind. */
16439
+ var TargetKindLevelSchema = object({
16440
+ id: string(),
16441
+ label: string(),
16442
+ /** Which canonical priority (1..5) this level maps to. `null` = qualitative-only. */
16443
+ ordinal: number().int().min(1).max(5).nullable(),
16444
+ flags: object({
16445
+ critical: boolean().optional(),
16446
+ silent: boolean().optional(),
16447
+ noPush: boolean().optional()
16448
+ }).optional(),
16449
+ /** e.g. Pushover `emergency` requires `retry` / `expire`. */
16450
+ requires: array(string()).optional(),
16451
+ description: string().optional()
16452
+ });
16453
+ /** The full capability block consulted before dispatch. */
16454
+ var TargetKindCapsSchema = object({
16455
+ attachments: object({
16456
+ mediaTypes: array(AttachmentMediaTypeSchema),
16457
+ mode: _enum([
16458
+ "url",
16459
+ "bytes",
16460
+ "both"
16461
+ ]),
16462
+ max: number().int().nonnegative(),
16463
+ maxBytes: number().int().positive().optional()
16464
+ }),
16465
+ /** Max action buttons (0 = none). */
16466
+ actions: number().int().nonnegative(),
16467
+ /**
16468
+ * Whether this kind renders a per-action ICON.
16469
+ *
16470
+ * `.optional()`, deliberately NOT `.default(false)`: a Zod default does not
16471
+ * run on the addon cap path — three production failures in one day taught
16472
+ * this repo that once. Absent is read as false by the degrade engine, which
16473
+ * is the safe direction: an icon that is not rendered costs nothing, an icon
16474
+ * assumed and dropped costs the operator's trust in the field.
16475
+ */
16476
+ actionIcons: boolean().optional(),
16477
+ levels: array(TargetKindLevelSchema),
16478
+ format: array(NotificationFormatSchema),
16479
+ clickUrl: boolean(),
16480
+ sound: boolean(),
16481
+ ttl: boolean(),
16482
+ bodyMaxLen: number().int().positive()
16483
+ });
16484
+ /**
16485
+ * `configSchema` is a `ConfigUISchema` tree passed through to the admin
16486
+ * FormBuilder. Stored as `z.unknown()` at the cap seam (mirrors
16487
+ * `device-provider.getChildCreationSchema` `CreationSchemaOutputSchema`) —
16488
+ * the union is large and not meant for runtime validation here; the exported
16489
+ * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
16490
+ */
16491
+ var ConfigSchemaPassthrough$3 = unknown();
16492
+ var TargetKindSchema = object({
16493
+ kind: string(),
16494
+ label: string(),
16495
+ icon: string(),
16496
+ /** Stamped by each provider so the concat-fanned catalog stays routable. */
16497
+ addonId: string(),
16498
+ /**
16499
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
16500
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
16501
+ * when the addon bundles no icon for that kind — the client then falls back
16502
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
16503
+ *
16504
+ * Root-relative on purpose: it resolves against whatever origin serves a web
16505
+ * client, and a native client joins it onto its own hub base.
16506
+ *
16507
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
16508
+ * field that survived only because the runtime cap-router forwards provider
16509
+ * output verbatim — so every consumer had to re-declare it by hand to stop
16510
+ * its own Zod parse from stripping it, and the whole arrangement would have
16511
+ * broken silently the moment output validation was tightened anywhere.
16512
+ */
16513
+ iconUrl: string().optional(),
16514
+ /**
16515
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
16516
+ *
16517
+ * The server knows this and therefore says it, because the client cannot
16518
+ * safely guess: a React-Native client renders SVG and raster through two
16519
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
16520
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
16521
+ * placeholder glyph for every vector icon while the web build looked fine.
16522
+ *
16523
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
16524
+ * not been updated — a client that cannot determine the type should prefer
16525
+ * its raster path, which is the safe default for an unknown image.
16526
+ */
16527
+ iconMediaType: string().optional(),
16528
+ configSchema: ConfigSchemaPassthrough$3,
16529
+ /**
16530
+ * The config keys that decide WHERE this kind's secrets are sent (server,
16531
+ * base URL, instance, chat, recipient). A save that changes any of them
16532
+ * while leaving a secret redacted is refused by the provider (D634), so an
16533
+ * editor uses this to ask for the secret on exactly those edits instead of
16534
+ * on every edit.
16535
+ *
16536
+ * Optional: absent from a provider that holds no secret (the Home Assistant
16537
+ * kinds) and from a provider older than this field — an editor that finds
16538
+ * it absent must assume ANY edit may need the secret.
16539
+ */
16540
+ destinationKeys: array(string()).optional(),
16541
+ supportsDiscovery: boolean(),
16542
+ /**
16543
+ * Extra delivery parameters a rule may set for a target of this kind (D938).
16544
+ * Absent = none; the rule editor then offers nothing.
16545
+ */
16546
+ deliveryParams: array(DeliveryParamSchema).optional(),
16547
+ caps: TargetKindCapsSchema
16548
+ });
16549
+ /**
16550
+ * A persisted target. `config` holds secrets; providers REDACT secret fields
16551
+ * (return a presence marker only) when serving `listTargets` — never
16552
+ * round-trip a stored secret to the UI.
16553
+ */
16554
+ var TargetSchema = object({
16555
+ id: string(),
16556
+ name: string(),
16557
+ kind: string(),
16558
+ addonId: string(),
16559
+ enabled: boolean(),
16560
+ config: record(string(), unknown())
16561
+ });
16562
+ /** A discovery-surfaced candidate (config is partial + non-secret). */
16563
+ var DiscoveredTargetSchema = object({
16564
+ kind: string(),
16565
+ suggestedName: string(),
16566
+ config: record(string(), unknown())
16567
+ });
16568
+ /** The degrade engine's report — what was resolved / dropped / degraded. */
16569
+ var RenderedAsSchema = object({
16570
+ level: string(),
16571
+ format: NotificationFormatSchema,
16572
+ attachmentsSent: number().int().nonnegative(),
16573
+ actionsSent: number().int().nonnegative(),
16574
+ truncated: boolean(),
16575
+ dropped: array(string())
16576
+ });
16577
+ var SendResultSchema = object({
16578
+ success: boolean(),
16579
+ error: string().optional(),
16580
+ renderedAs: RenderedAsSchema.optional()
16581
+ });
16582
+ /** Same shape as SendResult — kept as a distinct name for the test panel. */
16583
+ var TestResultSchema = SendResultSchema;
16584
+ /**
16585
+ * Pre-save credential probe against a partial (unsaved) target config.
16586
+ * `resolvedUrl` never includes secrets (token stripped from path).
16587
+ */
16588
+ var ProbeTargetConfigResultSchema = object({
16589
+ ok: boolean(),
16590
+ resolvedUrl: string(),
16591
+ httpStatus: number().int().optional(),
16592
+ stateInstance: string().optional(),
16593
+ error: string().optional()
16594
+ });
16595
+ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSchema), { auth: "admin" }), method(object({ targetId: string() }), TargetSchema, { auth: "admin" }), method(object({
16596
+ kind: string(),
16597
+ config: record(string(), unknown()).optional(),
16598
+ /**
16599
+ * When editing / duplicating, the blank password field never round-trips
16600
+ * the stored token. Pass the source target id so the provider can restore
16601
+ * secrets server-side before dialling (same merge as upsert).
16602
+ */
16603
+ targetId: string().optional()
16604
+ }), array(DiscoveredTargetSchema), { auth: "admin" }), method(object({
16605
+ kind: string(),
16606
+ config: record(string(), unknown()),
16607
+ /** See `discoverTargets.targetId` — restore stored secrets for a blank password. */
16608
+ targetId: string().optional()
16609
+ }), ProbeTargetConfigResultSchema, {
16610
+ kind: "mutation",
16611
+ auth: "admin"
16612
+ }), method(object({
16613
+ targetId: string(),
16614
+ notification: NotificationSchema
16615
+ }), SendResultSchema, {
16616
+ kind: "mutation",
16617
+ auth: "admin"
16618
+ }), method(object({
16619
+ targetId: string(),
16620
+ sample: NotificationSchema.optional()
16621
+ }), TestResultSchema, {
16622
+ kind: "mutation",
16623
+ auth: "admin"
16624
+ }), method(object({
16625
+ target: TargetSchema,
16626
+ /**
16627
+ * Duplicate flow: create a NEW target id while copying secrets from an
16628
+ * existing row. The UI never holds the stored token; blank / redacted
16629
+ * password fields are restored from this source (D634 still applies if
16630
+ * destinations diverge without a re-typed secret).
16631
+ */
16632
+ cloneSecretsFrom: string().optional()
16633
+ }), TargetSchema, {
16634
+ kind: "mutation",
16635
+ auth: "admin"
16636
+ }), method(object({ targetId: string() }), _void(), {
16637
+ kind: "mutation",
16638
+ auth: "admin"
16639
+ }), method(object({
16640
+ targetId: string(),
16641
+ enabled: boolean()
16642
+ }), _void(), {
16643
+ kind: "mutation",
16644
+ auth: "admin"
16645
+ });
16646
+ /**
16045
16647
  * `addon-pages` — system-scoped singleton aggregator cap. Public-facing
16046
16648
  * surface that admin-ui consumes through `useAddonPagesListPages()`.
16047
16649
  *
@@ -16073,52 +16675,6 @@ var AddonPageInfoSchema = object({
16073
16675
  bundleUrl: string()
16074
16676
  });
16075
16677
  method(_void(), array(AddonPageInfoSchema).readonly());
16076
- /**
16077
- * `addon-pages-source` — collection cap exposing per-provider raw page
16078
- * declarations. Every addon that contributes a UI page registers a
16079
- * provider here. The hub-side singleton aggregator (`addon-pages` cap,
16080
- * see `addon-pages.cap.ts`) walks this collection, stamps versioned
16081
- * `bundleUrl` values, and returns the enriched `AddonPageInfo[]` list
16082
- * that admin-ui consumes.
16083
- *
16084
- * The split exists because the public listing has a different output
16085
- * shape than the per-provider raw declarations, and we want both ends
16086
- * to flow through codegen instead of relying on a hand-written wrapper.
16087
- */
16088
- var AddonPageDeclarationSchema = object({
16089
- id: string(),
16090
- label: string(),
16091
- icon: string(),
16092
- path: string(),
16093
- /**
16094
- * Module Federation remote name — must match the `name` field on the
16095
- * page addon's `federation()` plugin config. Used by admin-ui's
16096
- * `<AddonPageLoader>` to call `loadRemote('<remoteName>/page')`.
16097
- * Conventionally `addon_<id>_page` (snake_case; MF names cannot
16098
- * contain hyphens).
16099
- */
16100
- remoteName: string(),
16101
- /**
16102
- * Bundle filename inside the addon's `dist/` dir served at
16103
- * `/api/addon-pages/<addonId>/<bundle>`. With Module Federation this
16104
- * is always `'remoteEntry.js'`; the value is kept on the metadata so
16105
- * the static-file route can compute an mtime-based cache-buster URL
16106
- * without a separate filesystem stat.
16107
- */
16108
- bundle: string(),
16109
- /**
16110
- * Sidebar section this page docks into. Well-known ids: `'detection'`,
16111
- * `'cluster'`, `'administration'` — the page renders inside that group.
16112
- * Any OTHER string creates (or joins) a custom section rendered after
16113
- * the built-in groups; its label comes from `sectionLabel` (first
16114
- * declaration wins), falling back to the id. Absent → the legacy
16115
- * "Addon Pages" group.
16116
- */
16117
- section: string().optional(),
16118
- /** Display label for a CUSTOM `section` id (ignored for well-known ids). */
16119
- sectionLabel: string().optional()
16120
- });
16121
- method(_void(), array(AddonPageDeclarationSchema).readonly(), { auth: "admin" });
16122
16678
  var AddonHttpRouteSchema = object({
16123
16679
  method: _enum([
16124
16680
  "GET",
@@ -16419,9 +16975,21 @@ var AlertSeveritySchema = _enum([
16419
16975
  "error",
16420
16976
  "critical"
16421
16977
  ]);
16978
+ /**
16979
+ * An action that RUNS something instead of going somewhere: the admin UI calls
16980
+ * the addon's custom action (`addons.custom`) with exactly these fields. The
16981
+ * producer owns the meaning; the UI knows nothing about the addon or the kind.
16982
+ */
16983
+ var AlertActionInvokeSchema = object({
16984
+ addonId: string().min(1),
16985
+ action: string().min(1),
16986
+ input: record(string(), unknown()).optional()
16987
+ });
16988
+ /** An action has `href` (a link) OR `invoke` (a button that runs a custom action). */
16422
16989
  var AlertActionSchema = object({
16423
16990
  label: string(),
16424
16991
  href: string().optional(),
16992
+ invoke: AlertActionInvokeSchema.optional(),
16425
16993
  /**
16426
16994
  * How `href` is followed. Absent / `app`: an admin-ui route (client-side).
16427
16995
  * `server`: a route the HUB serves (an addon HTTP route such as an OAuth
@@ -18668,7 +19236,11 @@ var CompositionProblemSchema = object({
18668
19236
  "mixed-quantity",
18669
19237
  "helper-mismatch",
18670
19238
  "member-constraint",
18671
- "retention"
19239
+ "retention",
19240
+ "command-method-unknown",
19241
+ "command-source-unknown",
19242
+ "command-input-unknown",
19243
+ "command-input-missing"
18672
19244
  ]),
18673
19245
  path: string(),
18674
19246
  message: string()
@@ -18707,7 +19279,9 @@ var CompositionFieldRoleSchema = _enum([
18707
19279
  var CompositionFieldItemSchema = object({
18708
19280
  arrayPath: string(),
18709
19281
  key: string(),
18710
- label: string()
19282
+ label: string(),
19283
+ /** True when the item carries a `reset` forward: the composer writes `resettable` from this (D967). */
19284
+ resettable: boolean().optional()
18711
19285
  });
18712
19286
  var CompositionFieldPlanSchema = object({
18713
19287
  cap: string(),
@@ -18912,7 +19486,7 @@ Object.freeze({
18912
19486
  * One catalog row per base reading a group helper can build (D944 §3).
18913
19487
  * Data, not a form default written into the block.
18914
19488
  */
18915
- var NOW$2 = {
19489
+ var NOW$3 = {
18916
19490
  fieldPath: "lastFetchedAt",
18917
19491
  expr: "now"
18918
19492
  };
@@ -18921,12 +19495,13 @@ var CHANGED = {
18921
19495
  expr: "now"
18922
19496
  };
18923
19497
  function numeric(input) {
19498
+ const { alsoFrom, ...base } = input;
18924
19499
  return {
18925
- ...input,
19500
+ ...base,
18926
19501
  family: "numeric",
18927
19502
  deviceType: DeviceType.Sensor,
18928
19503
  memberDeviceType: DeviceType.Sensor,
18929
- memberDeviceTypes: [DeviceType.Sensor],
19504
+ memberDeviceTypes: [DeviceType.Sensor, ...alsoFrom?.deviceTypes ?? []],
18930
19505
  activeWhen: void 0,
18931
19506
  commandCaps: [],
18932
19507
  baseUnit: baseUnitOf(input.quantity),
@@ -18934,9 +19509,10 @@ function numeric(input) {
18934
19509
  accept: [{
18935
19510
  cap: input.outputCap,
18936
19511
  fieldPath: input.outputField
18937
- }]
19512
+ }, ...alsoFrom === void 0 ? [] : [alsoFrom.accept]]
18938
19513
  };
18939
19514
  }
19515
+ var CLIMATE_DEVICES = [DeviceType.Thermostat, DeviceType.Climate];
18940
19516
  function binary(input) {
18941
19517
  return {
18942
19518
  ...input,
@@ -18962,7 +19538,14 @@ var GROUP_TEMPLATES = [
18962
19538
  quantity: "temperature",
18963
19539
  defaultAggregate: "mean",
18964
19540
  empty: "null",
18965
- companions: [NOW$2]
19541
+ companions: [NOW$3],
19542
+ alsoFrom: {
19543
+ deviceTypes: CLIMATE_DEVICES,
19544
+ accept: {
19545
+ cap: "climate-control",
19546
+ fieldPath: "currentTemp"
19547
+ }
19548
+ }
18966
19549
  }),
18967
19550
  numeric({
18968
19551
  id: "humidity",
@@ -18973,7 +19556,14 @@ var GROUP_TEMPLATES = [
18973
19556
  quantity: "humidity",
18974
19557
  defaultAggregate: "mean",
18975
19558
  empty: "null",
18976
- companions: [NOW$2]
19559
+ companions: [NOW$3],
19560
+ alsoFrom: {
19561
+ deviceTypes: CLIMATE_DEVICES,
19562
+ accept: {
19563
+ cap: "climate-control",
19564
+ fieldPath: "currentHumidity"
19565
+ }
19566
+ }
18977
19567
  }),
18978
19568
  numeric({
18979
19569
  id: "pressure",
@@ -18984,7 +19574,7 @@ var GROUP_TEMPLATES = [
18984
19574
  quantity: "pressure",
18985
19575
  defaultAggregate: "mean",
18986
19576
  empty: "null",
18987
- companions: [NOW$2]
19577
+ companions: [NOW$3]
18988
19578
  }),
18989
19579
  numeric({
18990
19580
  id: "illuminance",
@@ -18995,7 +19585,7 @@ var GROUP_TEMPLATES = [
18995
19585
  quantity: "illuminance",
18996
19586
  defaultAggregate: "mean",
18997
19587
  empty: "null",
18998
- companions: [NOW$2]
19588
+ companions: [NOW$3]
18999
19589
  }),
19000
19590
  numeric({
19001
19591
  id: "power",
@@ -19006,7 +19596,7 @@ var GROUP_TEMPLATES = [
19006
19596
  quantity: "power",
19007
19597
  defaultAggregate: "sum",
19008
19598
  empty: "omit",
19009
- companions: [NOW$2]
19599
+ companions: [NOW$3]
19010
19600
  }),
19011
19601
  numeric({
19012
19602
  id: "energy",
@@ -19017,7 +19607,7 @@ var GROUP_TEMPLATES = [
19017
19607
  quantity: "energy",
19018
19608
  defaultAggregate: "sum",
19019
19609
  empty: "omit",
19020
- companions: [NOW$2]
19610
+ companions: [NOW$3]
19021
19611
  }),
19022
19612
  numeric({
19023
19613
  id: "battery",
@@ -19052,7 +19642,7 @@ var GROUP_TEMPLATES = [
19052
19642
  quantity: "device",
19053
19643
  defaultAggregate: "mean",
19054
19644
  empty: "null",
19055
- companions: [NOW$2]
19645
+ companions: [NOW$3]
19056
19646
  }),
19057
19647
  binary({
19058
19648
  id: "motion",
@@ -21398,6 +21988,36 @@ var ExposeInputSchema = object({
21398
21988
  capabilities: array(string()).optional()
21399
21989
  });
21400
21990
  var UnexposeInputSchema = object({ deviceId: string() });
21991
+ /**
21992
+ * What an exporter may expose besides devices (D968). An action and a
21993
+ * notification target are LIST ENTRIES, never devices (D954): they enter an
21994
+ * exporter's own selection, not the device registry.
21995
+ */
21996
+ var ExportEntityKindSchema = _enum([
21997
+ "device",
21998
+ "action",
21999
+ "notifier"
22000
+ ]);
22001
+ var ExportEntityRefSchema = discriminatedUnion("kind", [
22002
+ object({
22003
+ kind: literal("device"),
22004
+ deviceId: string()
22005
+ }),
22006
+ object({
22007
+ kind: literal("action"),
22008
+ actionId: string().min(1)
22009
+ }),
22010
+ object({
22011
+ kind: literal("notifier"),
22012
+ targetId: string().min(1)
22013
+ })
22014
+ ]);
22015
+ var ExposedEntitySchema = object({
22016
+ entity: ExportEntityRefSchema,
22017
+ exposedAs: string().optional()
22018
+ });
22019
+ var ExposeEntityInputSchema = object({ entity: ExportEntityRefSchema });
22020
+ var UnexposeEntityInputSchema = object({ entity: ExportEntityRefSchema });
21401
22021
  var deviceExportCapability = {
21402
22022
  name: "device-export",
21403
22023
  scope: "system",
@@ -21427,6 +22047,16 @@ var deviceExportCapability = {
21427
22047
  unexposeDevice: method(UnexposeInputSchema, _void(), {
21428
22048
  kind: "mutation",
21429
22049
  auth: "admin"
22050
+ }),
22051
+ listSupportedEntityKinds: optionalMethod(_void(), array(ExportEntityKindSchema)),
22052
+ listExposedEntities: optionalMethod(_void(), array(ExposedEntitySchema)),
22053
+ exposeEntity: optionalMethod(ExposeEntityInputSchema, _void(), {
22054
+ kind: "mutation",
22055
+ auth: "admin"
22056
+ }),
22057
+ unexposeEntity: optionalMethod(UnexposeEntityInputSchema, _void(), {
22058
+ kind: "mutation",
22059
+ auth: "admin"
21430
22060
  })
21431
22061
  }
21432
22062
  };
@@ -42569,6 +43199,14 @@ method(object({
42569
43199
  kind: "mutation",
42570
43200
  auth: "admin"
42571
43201
  });
43202
+ method(object({
43203
+ nodeId: string().min(1),
43204
+ /** Epoch ms the node was forgotten (the tombstone's `removedAt`). */
43205
+ removedAt: number()
43206
+ }), object({ counts: record(string(), number().int().nonnegative()) }), {
43207
+ kind: "mutation",
43208
+ auth: "admin"
43209
+ });
42572
43210
  /**
42573
43211
  * `device-removal-hook` — the reliable way an addon learns a device was DELETED,
42574
43212
  * so it can delete what it keeps for that device (D865).
@@ -43216,6 +43854,17 @@ var LlmProfileSchema = object({
43216
43854
  * field in its editor only when its descriptor lists it in `profileFields`. */
43217
43855
  topK: number().int().positive().optional(),
43218
43856
  maxTokens: number().int().positive().optional(),
43857
+ /** How hard the model "thinks" before it answers. Omitted = the model's own
43858
+ * default. `off` matters for structured output: a thinking model can spend
43859
+ * the whole completion on reasoning and return an empty `content`. Carried
43860
+ * only by the wires that have it — a kind offers the field in its editor
43861
+ * only when its descriptor lists it in `profileFields`. */
43862
+ reasoningEffort: _enum([
43863
+ "off",
43864
+ "low",
43865
+ "medium",
43866
+ "high"
43867
+ ]).optional(),
43219
43868
  /** Prompt context window. Advisory for cloud kinds (they enforce their own). */
43220
43869
  contextLength: number().int().positive().optional(),
43221
43870
  /** Default system prompt. A caller's `system` REPLACES it (never appends —
@@ -43254,6 +43903,7 @@ var LlmProfileFieldSchema = _enum([
43254
43903
  "topP",
43255
43904
  "topK",
43256
43905
  "maxTokens",
43906
+ "reasoningEffort",
43257
43907
  "contextLength",
43258
43908
  "systemPrompt",
43259
43909
  "timeoutMs",
@@ -43277,7 +43927,7 @@ var LlmProviderWidgetSchema = object({
43277
43927
  /** ConfigUISchema tree passed through untyped on the wire (the
43278
43928
  * notification-output `ConfigSchemaPassthrough` precedent at
43279
43929
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
43280
- var ConfigSchemaPassthrough$3 = unknown();
43930
+ var ConfigSchemaPassthrough$2 = unknown();
43281
43931
  var LlmProfileKindDescriptorSchema = object({
43282
43932
  kind: LlmProfileKindSchema,
43283
43933
  label: string(),
@@ -43286,9 +43936,9 @@ var LlmProfileKindDescriptorSchema = object({
43286
43936
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
43287
43937
  addonId: string(),
43288
43938
  /** The provider's own fields (`providerConfig`); `password` fields are keychain-held. */
43289
- connectionSchema: ConfigSchemaPassthrough$3,
43939
+ connectionSchema: ConfigSchemaPassthrough$2,
43290
43940
  /** Provider fields that belong under "Advanced" (extra headers, runtime tuning). */
43291
- advancedSchema: ConfigSchemaPassthrough$3.optional(),
43941
+ advancedSchema: ConfigSchemaPassthrough$2.optional(),
43292
43942
  /** The kind's defaults; a model from `listModels` may override any of them. */
43293
43943
  features: LlmModelFeaturesSchema,
43294
43944
  /** `false` = the provider stamps `supportsVision` itself (from what a node reports). */
@@ -43814,10 +44464,10 @@ var CpuBreakdownSchema = object({
43814
44464
  cores: number()
43815
44465
  });
43816
44466
  var MemoryInfoSchema = object({
43817
- percent: number(),
44467
+ percent: number().nullable(),
43818
44468
  totalBytes: number(),
43819
- usedBytes: number(),
43820
- availableBytes: number(),
44469
+ usedBytes: number().nullable(),
44470
+ availableBytes: number().nullable(),
43821
44471
  swapUsedBytes: number(),
43822
44472
  swapTotalBytes: number()
43823
44473
  });
@@ -44085,652 +44735,280 @@ var NodeLoadSeriesSchema = object({
44085
44735
  /** The fixed sampling cadence in force on the cluster, in ms. */
44086
44736
  cadenceMs: number(),
44087
44737
  /**
44088
- * Did the DURABLE tier contribute? `false` means the answer is the hot ring
44089
- * alone — an agent (which holds no table), or a store that refused.
44090
- * Reported because "the last hour" and "the last six hours" are different
44091
- * questions and an operator must not have to guess which was answered.
44092
- */
44093
- durable: boolean()
44094
- });
44095
- var GetLoadSeriesInputSchema = object({
44096
- /**
44097
- * The node whose series is wanted.
44098
- *
44099
- * NOT named `nodeId`: the generated cap router strips a top-level
44100
- * `nodeId` from every method input and uses it to ROUTE the call to
44101
- * that node's provider (`generated-cap-routers.ts`). A series target
44102
- * called `nodeId` would silently become a routing pin and never reach
44103
- * the provider. The hub holds every node it hears from, so the
44104
- * ordinary call is unpinned — answered by the hub, for any node.
44105
- */
44106
- forNodeId: string(),
44107
- /**
44108
- * EXCLUSIVE lower bound. A caller passes the newest `atMs` it already
44109
- * holds and receives only what it is missing, so seeding a live chart
44110
- * from this method cannot double a point already drawn.
44111
- */
44112
- sinceMs: number().optional(),
44113
- /**
44114
- * Most points the caller wants PER FUNCTION. The window is reduced to fit,
44115
- * preserving min and max per bucket.
44116
- *
44117
- * Absent means NO reduction — legitimate for a short window and a trap for a
44118
- * long one, which is why a chart passes its own pixel width.
44119
- */
44120
- maxPoints: number().int().positive().optional()
44121
- });
44122
- var SystemMetricsSchema = object({
44123
- cpuPercent: number(),
44124
- memoryPercent: number(),
44125
- memoryUsedMB: number(),
44126
- memoryTotalMB: number(),
44127
- diskPercent: number().optional(),
44128
- temperature: number().optional(),
44129
- gpuPercent: number().optional(),
44130
- gpuMemoryPercent: number().optional()
44131
- });
44132
- method(_void(), SystemResourceSnapshotSchema), method(_void(), SystemResourceSnapshotSchema.nullable()), method(_void(), SystemMetricsSchema), method(object({ dirPath: string() }), DiskSpaceInfoSchema), method(_void(), MetricsGpuInfoSchema.nullable()), method(_void(), number().nullable()), method(object({ pids: array(number()) }), array(PidResourceStatsSchema)), method(_void(), array(AddonInstanceSchema).readonly()), method(object({ addonId: string() }), PidResourceStatsSchema.nullable()), method(_void(), array(NodeProcessSchema).readonly()), method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema);
44133
- method(object({
44134
- sourceUrl: string(),
44135
- metadata: ModelConvertMetadataSchema,
44136
- targets: array(ConvertTargetSchema).min(1).readonly(),
44137
- calibrationRef: string().optional(),
44138
- sessionId: string().optional()
44139
- }), ConvertResultSchema, {
44140
- kind: "mutation",
44141
- auth: "admin",
44142
- timeoutMs: 6e5
44143
- });
44144
- method(object({
44145
- targetNodeId: string(),
44146
- modelId: string(),
44147
- format: _enum(MODEL_FORMATS),
44148
- entry: ModelCatalogEntrySchema
44149
- }), object({
44150
- ok: boolean(),
44151
- /** sha256 of the staged tarball (empty for a hub-local no-op). */
44152
- sha256: string(),
44153
- bytes: number(),
44154
- /** The target node's modelsDir the artifact landed in. */
44155
- path: string()
44156
- }), {
44157
- kind: "mutation",
44158
- auth: "admin"
44159
- });
44160
- var MotionRegionSchema = object({
44161
- bbox: BoundingBoxSchema,
44162
- pixelCount: number(),
44163
- intensity: number()
44164
- });
44165
- var MotionAnalysisResultSchema = object({
44166
- detected: boolean(),
44167
- regionCount: number(),
44168
- /** Regions passing minArea filter — used for pipeline triggering. */
44169
- regions: array(MotionRegionSchema).readonly(),
44170
- /** All raw regions from CCL before minArea filter — used for UI debug overlay. */
44171
- rawRegions: array(MotionRegionSchema).readonly(),
44172
- frameWidth: number(),
44173
- frameHeight: number(),
44174
- analysisMs: number()
44175
- });
44176
- DeviceType.Camera, method(object({
44177
- deviceId: number(),
44178
- frame: FrameInputSchema.optional(),
44179
- frameHandle: FrameHandleSchema.optional()
44180
- }), MotionAnalysisResultSchema, {
44181
- role: "admin",
44182
- kind: "mutation"
44183
- }), method(object({ deviceId: number() }), _void(), {
44184
- role: "admin",
44185
- kind: "mutation"
44186
- }), method(_void(), _void(), {
44187
- role: "admin",
44188
- kind: "mutation"
44189
- }), object({
44190
- deviceId: number(),
44191
- detected: boolean(),
44192
- regionCount: number()
44193
- });
44194
- /**
44195
- * `mqtt-broker` — broker-registry cap.
44196
- *
44197
- * NOT a pub/sub proxy. The cap exposes (a) a registry of configured
44198
- * MQTT brokers (external + optionally an embedded `aedes`-backed one)
44199
- * and (b) the connection details a consumer addon needs to spin up
44200
- * its OWN `mqtt.js` client.
44201
- *
44202
- * Why: pub/sub routing over the system event-bus loses fidelity
44203
- * (callback shape, QoS guarantees, will/retain semantics) and adds
44204
- * refcount bookkeeping that addons would rather own themselves. The
44205
- * canonical consumer needs raw `mqtt.js`
44206
- * features anyway — give it the connection config, get out of the way.
44207
- *
44208
- * Consumer flow:
44209
- * const cfg = await ctx.api.mqttBroker.getBrokerConfig({ id })
44210
- * const client = mqtt.connect(cfg.url, { username: cfg.username, … })
44211
- * client.subscribe('zigbee2mqtt/+')
44212
- *
44213
- * Collection mode: multiple brokers (e.g. one local mosquitto + one
44214
- * cloud bridge). The "embedded" entry (when present) is just another
44215
- * broker in the registry — its lifecycle is owned by the addon that
44216
- * spawned it.
44217
- */
44218
- var BrokerKindSchema = _enum(["external", "embedded"]);
44219
- /**
44220
- * Broker live-probe status.
44221
- *
44222
- * - `connected` — last probe completed a clean CONNACK
44223
- * - `disconnected` — no probe has run yet (cold cache)
44224
- * - `auth-failed` — CONNACK refused with auth error (RC 4 / 5)
44225
- * - `unreachable` — TCP connect timed out / refused
44226
- * - `tls-error` — TLS handshake failed (cert / SNI / cipher)
44227
- */
44228
- var BrokerStatusSchema$1 = _enum([
44229
- "connected",
44230
- "disconnected",
44231
- "auth-failed",
44232
- "unreachable",
44233
- "tls-error"
44234
- ]);
44235
- var BrokerInfoSchema$1 = object({
44236
- id: string(),
44237
- name: string(),
44238
- url: string(),
44239
- kind: BrokerKindSchema,
44240
- status: BrokerStatusSchema$1,
44241
- latencyMs: number().nullable(),
44242
- error: string().optional(),
44243
- /** Embedded brokers only: number of MQTT clients currently connected. */
44244
- connectedClients: number().int().nonnegative().optional(),
44245
- /** Epoch ms of the last live probe (external) or aedes snapshot (embedded). */
44246
- lastCheckedAt: number().optional()
44247
- });
44248
- /**
44249
- * Connection details — what a consumer needs to call
44250
- * `mqtt.connect(url, options)`. We split URL + credentials so the
44251
- * consumer can pass them as `mqtt.connect(url, { username, password })`
44252
- * instead of stuffing creds into the URL (which leaks them into logs).
44253
- */
44254
- var BrokerConnectionDetailsSchema = object({
44255
- url: string(),
44256
- username: string().optional(),
44257
- password: string().optional(),
44258
- /**
44259
- * Suggested prefix for `clientId`. Each consumer should suffix this
44260
- * with its own discriminator (addon id, instance id) so reconnects
44261
- * don't kick each other off (MQTT spec: clientId must be unique per
44262
- * broker).
44263
- */
44264
- clientIdPrefix: string().optional()
44265
- });
44266
- var AddBrokerInputSchema = object({
44267
- name: string().min(1),
44268
- url: string().regex(/^(mqtt|mqtts|ws|wss):\/\//, "URL must start with mqtt(s):// or ws(s)://"),
44269
- username: string().optional(),
44270
- password: string().optional(),
44271
- clientIdPrefix: string().optional()
44272
- });
44273
- var AddBrokerResultSchema = object({ id: string() });
44274
- var IdInputSchema = object({ id: string() });
44275
- var TestResultSchema$1 = discriminatedUnion("ok", [object({
44276
- ok: literal(true),
44277
- latencyMs: number()
44278
- }), object({
44279
- ok: literal(false),
44280
- error: string()
44281
- })]);
44282
- var StartEmbeddedInputSchema = object({
44283
- port: number().int().min(1).max(65535).default(1883),
44284
- /** Allow anonymous connect (no username/password). Default: false. */
44285
- allowAnonymous: boolean().default(false),
44286
- /** Optional shared username/password for clients. */
44287
- username: string().optional(),
44288
- password: string().optional()
44289
- });
44290
- var StartEmbeddedResultSchema = object({
44291
- id: string(),
44292
- url: string()
44293
- });
44294
- var StatusSchema = object({
44295
- brokerCount: number(),
44296
- embeddedRunning: boolean()
44297
- });
44298
- method(_void(), array(BrokerInfoSchema$1)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
44299
- kind: "mutation",
44300
- auth: "admin"
44301
- }), method(IdInputSchema, _void(), {
44302
- kind: "mutation",
44303
- auth: "admin"
44304
- }), method(IdInputSchema, TestResultSchema$1, {
44305
- kind: "mutation",
44306
- auth: "admin"
44307
- }), method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, {
44308
- kind: "mutation",
44309
- auth: "admin"
44310
- }), method(IdInputSchema, _void(), {
44311
- kind: "mutation",
44312
- auth: "admin"
44313
- }), method(_void(), StatusSchema);
44314
- var NetworkEndpointSchema = object({
44315
- url: string(),
44316
- hostname: string(),
44317
- port: number(),
44318
- protocol: _enum(["http", "https"]),
44319
- /**
44320
- * Whether this address survives a restart of its provider. `false` = it is
44321
- * re-issued every time (a Quick tunnel's random `*.trycloudflare.com`); the
44322
- * hub never selects such an address AUTOMATICALLY for a role (D860), though
44323
- * it stays visible and an operator may still flag it. Absent = stable: every
44324
- * provider except a Quick tunnel owns a name that does not change.
44325
- */
44326
- stable: boolean().optional()
44327
- });
44328
- object({
44329
- url: string(),
44330
- /** Mirrors {@link NetworkEndpointSchema} `stable`; absent = stable. */
44331
- stable: boolean().optional(),
44332
- updated: boolean().optional()
44333
- });
44334
- var NetworkAccessStatusSchema = object({
44335
- connected: boolean(),
44336
- endpoint: NetworkEndpointSchema.nullable(),
44337
- error: string().optional()
44338
- });
44339
- /**
44340
- * Optional, richer endpoint shape returned by providers that expose
44341
- * MORE than one ingress concurrently (Tailscale Funnel with mixed
44342
- * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
44343
- * the originating provider config (mode + sourcePort) so the
44344
- * orchestrator UI can label rows distinctly. Providers that expose only
44345
- * one endpoint just omit `listEndpoints` from their provider impl.
44346
- */
44347
- var NetworkEndpointEntrySchema = NetworkEndpointSchema.extend({
44348
- /**
44349
- * Stable id within the provider — typically `<mode>-<sourcePort>` so
44350
- * the orchestrator can dedupe across `listEndpoints` polls.
44351
- */
44352
- id: string(),
44353
- /** Operator-facing label (mirrors `MeshEndpoint.label`). */
44354
- label: string(),
44355
- /** Optional provider-specific mode tag, used for icon/colour in admin UI. */
44356
- mode: string().optional(),
44357
- /** Originating local port the ingress fronts (informational). */
44358
- sourcePort: number().optional()
44359
- });
44360
- method(_void(), NetworkEndpointSchema, { kind: "mutation" }), method(_void(), _void(), { kind: "mutation" }), method(_void(), NetworkEndpointSchema.nullable()), method(_void(), NetworkAccessStatusSchema), method(_void(), array(NetworkEndpointEntrySchema).readonly());
44361
- /**
44362
- * notification-output — canonical, capability-gated notification delivery.
44363
- *
44364
- * Apprise-derived model (see
44365
- * `docs/superpowers/specs/2026-07-03-notification-output-notifier-matrix.md`):
44366
- * callers emit ONE canonical `Notification`; each provider declares a
44367
- * per-kind capability descriptor (`TargetKind`), and the pure degrade
44368
- * engine (`@camstack/types` `prepareNotification`) transcodes / degrades the
44369
- * message to what the kind supports — callers never special-case a service.
44370
- *
44371
- * DESIGN DECISIONS (locked):
44372
- * - Target CRUD lives on THIS cap (`upsertTarget` / `deleteTarget` /
44373
- * `setTargetEnabled`), each provider persisting via the `settings-store`
44374
- * cap. Rationale: the admin UI needs one uniform surface across the
44375
- * notifiers addon AND the HA addon; the addon-`globalSettingsSchema`-array
44376
- * alternative would fork the UI per addon and cannot host the
44377
- * discovery→adopt flow.
44378
- * - `listTargetKinds` / `listTargets` / `discoverTargets` return arrays →
44379
- * the generated cap-mount auto-`concatCollection`-fans them across every
44380
- * registered provider (notifiers addon + HA addon) so one catalog is
44381
- * routable. `send` / `testTarget` / CRUD route to ONE provider by the
44382
- * `addonId` the generated collection router extracts from the call input.
44383
- * - `Attachment.bytes` is `Uint8Array`. Transport-safe: superjson (the tRPC
44384
- * transformer) + UDS MsgPack both round-trip typed arrays — already used by
44385
- * `storage` / `storage-provider` / `recording` caps over the same path. No
44386
- * base64 fallback needed.
44387
- *
44388
- * TODO (deferred, closed-set change — separate decision): add
44389
- * `providerKind: 'notify'` so notification providers surface on the unified
44390
- * admin "Integrations" page.
44391
- */
44392
- /**
44393
- * Zentik-derived typed-media enum — the superset across every kind. Each
44394
- * adapter picks what it supports and the degrade engine filters the rest.
44395
- */
44396
- var AttachmentMediaTypeSchema = _enum([
44397
- "image",
44398
- "video",
44399
- "gif",
44400
- "audio",
44401
- "icon"
44402
- ]);
44403
- /**
44404
- * A single attachment. Exactly one of `url` (remote source, most adapters
44405
- * prefer this) or `bytes` (inline source; required for Pushover-style
44406
- * bytes-only kinds) MUST be present — the degrade engine expresses a
44407
- * url→bytes fetch as a `needsFetch` directive the adapter executes.
44408
- */
44409
- var AttachmentSchema = object({
44410
- mediaType: AttachmentMediaTypeSchema,
44411
- url: string().optional(),
44412
- bytes: _instanceof(Uint8Array).optional(),
44413
- mime: string().optional(),
44414
- name: string().optional()
44415
- }).refine((a) => a.url !== void 0 || a.bytes !== void 0, { message: "Attachment requires either `url` or `bytes`" });
44416
- var NotificationFormatSchema = _enum([
44417
- "text",
44418
- "markdown",
44419
- "html"
44420
- ]);
44421
- /**
44422
- * The CLOSED icon vocabulary an action button may use.
44423
- *
44424
- * A closed set, not a free string, and that is the whole point: an arbitrary
44425
- * icon name is one that ntfy renders, zentik silently drops, and nobody
44426
- * notices — the same class of gap as a zone vocabulary nothing produced
44427
- * ([D35](../../../docs/decisions/adr-0035.md)). Every adapter maps this set or
44428
- * declares `actionIcons: false` and the degrade engine strips the field.
44429
- *
44430
- * Named by INTENT, never by glyph. "check" would tie the vocabulary to one
44431
- * renderer's icon set; "acknowledge" survives an adapter that draws it
44432
- * differently.
44433
- *
44434
- * ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
44435
- *
44436
- * These names are for US. **No adapter may forward one verbatim.** Each maps
44437
- * the whole set onto its own renderer's vocabulary through a
44438
- * `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
44439
- * fallback, so adding a member here fails every adapter's build until someone
44440
- * decides its glyph, which is the only place that decision can be made
44441
- * honestly.
44442
- *
44443
- * This paragraph is the bug. Zentik declared `actionIcons: true` and passed
44444
- * `disarm` straight through; iOS feeds that string to
44445
- * `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
44446
- * and every snooze and alarm button arrived BLANK. A pass-through is not a
44447
- * mapping, and "the field is documented" is not "the value renders".
44448
- *
44449
- * Adding a member is TRAIN-BOUND. The enum lives in the published
44450
- * `@camstack/server` closure and the cap seam validates against the HUB's copy,
44451
- * so an addon that emits a token the running hub does not know does not lose an
44452
- * icon — its whole `send` fails Zod validation and the notification never
44453
- * arrives. Never emit a new token from an addon before the train carrying it.
44454
- */
44455
- var NotificationActionIconSchema = _enum([
44456
- "acknowledge",
44457
- "dismiss",
44458
- "silence",
44459
- "snooze",
44460
- "view",
44461
- "play",
44462
- "open",
44463
- "close",
44464
- "lock",
44465
- "unlock",
44466
- "arm",
44467
- "arm-home",
44468
- "arm-away",
44469
- "arm-night",
44470
- "disarm",
44471
- "light",
44472
- "alert",
44473
- "camera"
44474
- ]);
44475
- /** A single tap-through action button. */
44476
- var NotificationActionSchema = object({
44477
- id: string(),
44478
- label: string(),
44479
- url: string().optional(),
44480
- /** Dropped by the degrade engine for a kind with `caps.actionIcons: false`. */
44481
- icon: NotificationActionIconSchema.optional(),
44482
- /**
44483
- * Renders in a warning style where the notifier supports it.
44484
- *
44485
- * A HINT, never a gate. The callback's authority is its token and nothing
44486
- * else — see `notification-center/action-token.ts` for what that does and
44487
- * does not buy.
44488
- */
44489
- destructive: boolean().optional(),
44490
- /**
44491
- * How the tap should REACH the url.
44492
- *
44493
- * `navigate` (absent, and every button authored before this field) opens it:
44494
- * the phone leaves the notification and shows whatever the callback returns.
44495
- * That is right for a button whose answer the operator wants to read.
44496
- *
44497
- * `background` fires it as a POST and stays put. It exists for the buttons
44498
- * whose whole point is not to interrupt — "silence this for 30 minutes" is
44499
- * an answer to the notification, and being thrown into a browser tab to
44500
- * confirm it costs more attention than the notification did. A backend that
44501
- * cannot do a background call renders it as an ordinary link (the adapters
44502
- * fall back rather than dropping the button), so this is a preference, never
44503
- * a requirement.
44504
- */
44505
- mode: _enum(["navigate", "background"]).optional()
44506
- });
44507
- /**
44508
- * The canonical notification. `body` is the only hard field (Apprise model).
44509
- * `priority` is a 5-level ORDINAL (1=lowest … 3=normal(default) … 5=urgent),
44510
- * NOT a fixed severity enum — each kind declares its own `caps.levels` and
44511
- * the adapter maps this ordinal onto its native level. `level?` is an
44512
- * optional kind-native level id (`emergency`, `silent`, …) that overrides
44513
- * `priority` for that one target.
44514
- */
44515
- var NotificationSchema = object({
44516
- body: string(),
44517
- title: string().optional(),
44518
- format: NotificationFormatSchema.default("text"),
44519
- priority: number().int().min(1).max(5).default(3),
44520
- level: string().optional(),
44521
- attachments: array(AttachmentSchema).optional(),
44522
- clickUrl: string().optional(),
44523
- actions: array(NotificationActionSchema).optional(),
44524
- sound: string().optional(),
44525
- ttl: number().optional(),
44526
- tag: string().optional(),
44527
- deviceId: number().optional(),
44528
- eventId: string().optional(),
44529
- metadata: record(string(), unknown()).optional()
44530
- });
44531
- /** One declared native severity/priority level for a kind. */
44532
- var TargetKindLevelSchema = object({
44533
- id: string(),
44534
- label: string(),
44535
- /** Which canonical priority (1..5) this level maps to. `null` = qualitative-only. */
44536
- ordinal: number().int().min(1).max(5).nullable(),
44537
- flags: object({
44538
- critical: boolean().optional(),
44539
- silent: boolean().optional(),
44540
- noPush: boolean().optional()
44541
- }).optional(),
44542
- /** e.g. Pushover `emergency` requires `retry` / `expire`. */
44543
- requires: array(string()).optional(),
44544
- description: string().optional()
44545
- });
44546
- /** The full capability block consulted before dispatch. */
44547
- var TargetKindCapsSchema = object({
44548
- attachments: object({
44549
- mediaTypes: array(AttachmentMediaTypeSchema),
44550
- mode: _enum([
44551
- "url",
44552
- "bytes",
44553
- "both"
44554
- ]),
44555
- max: number().int().nonnegative(),
44556
- maxBytes: number().int().positive().optional()
44557
- }),
44558
- /** Max action buttons (0 = none). */
44559
- actions: number().int().nonnegative(),
44560
- /**
44561
- * Whether this kind renders a per-action ICON.
44562
- *
44563
- * `.optional()`, deliberately NOT `.default(false)`: a Zod default does not
44564
- * run on the addon cap path — three production failures in one day taught
44565
- * this repo that once. Absent is read as false by the degrade engine, which
44566
- * is the safe direction: an icon that is not rendered costs nothing, an icon
44567
- * assumed and dropped costs the operator's trust in the field.
44568
- */
44569
- actionIcons: boolean().optional(),
44570
- levels: array(TargetKindLevelSchema),
44571
- format: array(NotificationFormatSchema),
44572
- clickUrl: boolean(),
44573
- sound: boolean(),
44574
- ttl: boolean(),
44575
- bodyMaxLen: number().int().positive()
44576
- });
44577
- /**
44578
- * `configSchema` is a `ConfigUISchema` tree passed through to the admin
44579
- * FormBuilder. Stored as `z.unknown()` at the cap seam (mirrors
44580
- * `device-provider.getChildCreationSchema` `CreationSchemaOutputSchema`) —
44581
- * the union is large and not meant for runtime validation here; the exported
44582
- * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
44583
- */
44584
- var ConfigSchemaPassthrough$2 = unknown();
44585
- var TargetKindSchema = object({
44586
- kind: string(),
44587
- label: string(),
44588
- icon: string(),
44589
- /** Stamped by each provider so the concat-fanned catalog stays routable. */
44590
- addonId: string(),
44591
- /**
44592
- * URL of the kind's bundled BRAND icon, served by the providing addon over
44593
- * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
44594
- * when the addon bundles no icon for that kind — the client then falls back
44595
- * to a neutral glyph rather than rendering the raw `icon` NAME as text.
44596
- *
44597
- * Root-relative on purpose: it resolves against whatever origin serves a web
44598
- * client, and a native client joins it onto its own hub base.
44599
- *
44600
- * DECLARED here deliberately. It used to travel as an undeclared passthrough
44601
- * field that survived only because the runtime cap-router forwards provider
44602
- * output verbatim — so every consumer had to re-declare it by hand to stop
44603
- * its own Zod parse from stripping it, and the whole arrangement would have
44604
- * broken silently the moment output validation was tightened anywhere.
44738
+ * Did the DURABLE tier contribute? `false` means the answer is the hot ring
44739
+ * alone — an agent (which holds no table), or a store that refused.
44740
+ * Reported because "the last hour" and "the last six hours" are different
44741
+ * questions and an operator must not have to guess which was answered.
44605
44742
  */
44606
- iconUrl: string().optional(),
44743
+ durable: boolean()
44744
+ });
44745
+ var GetLoadSeriesInputSchema = object({
44607
44746
  /**
44608
- * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
44609
- *
44610
- * The server knows this and therefore says it, because the client cannot
44611
- * safely guess: a React-Native client renders SVG and raster through two
44612
- * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
44613
- * not decode SVG on iOS/Android), so without this it silently fell back to a
44614
- * placeholder glyph for every vector icon while the web build looked fine.
44747
+ * The node whose series is wanted.
44615
44748
  *
44616
- * Absent when {@link iconUrl} is absent, or for a legacy provider that has
44617
- * not been updated — a client that cannot determine the type should prefer
44618
- * its raster path, which is the safe default for an unknown image.
44749
+ * NOT named `nodeId`: the generated cap router strips a top-level
44750
+ * `nodeId` from every method input and uses it to ROUTE the call to
44751
+ * that node's provider (`generated-cap-routers.ts`). A series target
44752
+ * called `nodeId` would silently become a routing pin and never reach
44753
+ * the provider. The hub holds every node it hears from, so the
44754
+ * ordinary call is unpinned — answered by the hub, for any node.
44619
44755
  */
44620
- iconMediaType: string().optional(),
44621
- configSchema: ConfigSchemaPassthrough$2,
44756
+ forNodeId: string(),
44622
44757
  /**
44623
- * The config keys that decide WHERE this kind's secrets are sent (server,
44624
- * base URL, instance, chat, recipient). A save that changes any of them
44625
- * while leaving a secret redacted is refused by the provider (D634), so an
44626
- * editor uses this to ask for the secret on exactly those edits instead of
44627
- * on every edit.
44758
+ * EXCLUSIVE lower bound. A caller passes the newest `atMs` it already
44759
+ * holds and receives only what it is missing, so seeding a live chart
44760
+ * from this method cannot double a point already drawn.
44761
+ */
44762
+ sinceMs: number().optional(),
44763
+ /**
44764
+ * Most points the caller wants PER FUNCTION. The window is reduced to fit,
44765
+ * preserving min and max per bucket.
44628
44766
  *
44629
- * Optional: absent from a provider that holds no secret (the Home Assistant
44630
- * kinds) and from a provider older than this field — an editor that finds
44631
- * it absent must assume ANY edit may need the secret.
44767
+ * Absent means NO reduction — legitimate for a short window and a trap for a
44768
+ * long one, which is why a chart passes its own pixel width.
44632
44769
  */
44633
- destinationKeys: array(string()).optional(),
44634
- supportsDiscovery: boolean(),
44635
- caps: TargetKindCapsSchema
44770
+ maxPoints: number().int().positive().optional()
44771
+ });
44772
+ var SystemMetricsSchema = object({
44773
+ cpuPercent: number(),
44774
+ /** `null` when the memory sample failed or was not taken yet (D393). */
44775
+ memoryPercent: number().nullable(),
44776
+ memoryUsedMB: number().nullable(),
44777
+ memoryTotalMB: number(),
44778
+ diskPercent: number().optional(),
44779
+ temperature: number().optional(),
44780
+ gpuPercent: number().optional(),
44781
+ gpuMemoryPercent: number().optional()
44782
+ });
44783
+ method(_void(), SystemResourceSnapshotSchema), method(_void(), SystemResourceSnapshotSchema.nullable()), method(_void(), SystemMetricsSchema), method(object({ dirPath: string() }), DiskSpaceInfoSchema), method(_void(), MetricsGpuInfoSchema.nullable()), method(_void(), number().nullable()), method(object({ pids: array(number()) }), array(PidResourceStatsSchema)), method(_void(), array(AddonInstanceSchema).readonly()), method(object({ addonId: string() }), PidResourceStatsSchema.nullable()), method(_void(), array(NodeProcessSchema).readonly()), method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema);
44784
+ method(object({
44785
+ sourceUrl: string(),
44786
+ metadata: ModelConvertMetadataSchema,
44787
+ targets: array(ConvertTargetSchema).min(1).readonly(),
44788
+ calibrationRef: string().optional(),
44789
+ sessionId: string().optional()
44790
+ }), ConvertResultSchema, {
44791
+ kind: "mutation",
44792
+ auth: "admin",
44793
+ timeoutMs: 6e5
44794
+ });
44795
+ method(object({
44796
+ targetNodeId: string(),
44797
+ modelId: string(),
44798
+ format: _enum(MODEL_FORMATS),
44799
+ entry: ModelCatalogEntrySchema
44800
+ }), object({
44801
+ ok: boolean(),
44802
+ /** sha256 of the staged tarball (empty for a hub-local no-op). */
44803
+ sha256: string(),
44804
+ bytes: number(),
44805
+ /** The target node's modelsDir the artifact landed in. */
44806
+ path: string()
44807
+ }), {
44808
+ kind: "mutation",
44809
+ auth: "admin"
44810
+ });
44811
+ var MotionRegionSchema = object({
44812
+ bbox: BoundingBoxSchema,
44813
+ pixelCount: number(),
44814
+ intensity: number()
44815
+ });
44816
+ var MotionAnalysisResultSchema = object({
44817
+ detected: boolean(),
44818
+ regionCount: number(),
44819
+ /** Regions passing minArea filter — used for pipeline triggering. */
44820
+ regions: array(MotionRegionSchema).readonly(),
44821
+ /** All raw regions from CCL before minArea filter — used for UI debug overlay. */
44822
+ rawRegions: array(MotionRegionSchema).readonly(),
44823
+ frameWidth: number(),
44824
+ frameHeight: number(),
44825
+ analysisMs: number()
44826
+ });
44827
+ DeviceType.Camera, method(object({
44828
+ deviceId: number(),
44829
+ frame: FrameInputSchema.optional(),
44830
+ frameHandle: FrameHandleSchema.optional()
44831
+ }), MotionAnalysisResultSchema, {
44832
+ role: "admin",
44833
+ kind: "mutation"
44834
+ }), method(object({ deviceId: number() }), _void(), {
44835
+ role: "admin",
44836
+ kind: "mutation"
44837
+ }), method(_void(), _void(), {
44838
+ role: "admin",
44839
+ kind: "mutation"
44840
+ }), object({
44841
+ deviceId: number(),
44842
+ detected: boolean(),
44843
+ regionCount: number()
44636
44844
  });
44637
44845
  /**
44638
- * A persisted target. `config` holds secrets; providers REDACT secret fields
44639
- * (return a presence marker only) when serving `listTargets` — never
44640
- * round-trip a stored secret to the UI.
44846
+ * `mqtt-broker` — broker-registry cap.
44847
+ *
44848
+ * NOT a pub/sub proxy. The cap exposes (a) a registry of configured
44849
+ * MQTT brokers (external + optionally an embedded `aedes`-backed one)
44850
+ * and (b) the connection details a consumer addon needs to spin up
44851
+ * its OWN `mqtt.js` client.
44852
+ *
44853
+ * Why: pub/sub routing over the system event-bus loses fidelity
44854
+ * (callback shape, QoS guarantees, will/retain semantics) and adds
44855
+ * refcount bookkeeping that addons would rather own themselves. The
44856
+ * canonical consumer needs raw `mqtt.js`
44857
+ * features anyway — give it the connection config, get out of the way.
44858
+ *
44859
+ * Consumer flow:
44860
+ * const cfg = await ctx.api.mqttBroker.getBrokerConfig({ id })
44861
+ * const client = mqtt.connect(cfg.url, { username: cfg.username, … })
44862
+ * client.subscribe('zigbee2mqtt/+')
44863
+ *
44864
+ * Collection mode: multiple brokers (e.g. one local mosquitto + one
44865
+ * cloud bridge). The "embedded" entry (when present) is just another
44866
+ * broker in the registry — its lifecycle is owned by the addon that
44867
+ * spawned it.
44641
44868
  */
44642
- var TargetSchema = object({
44869
+ var BrokerKindSchema = _enum(["external", "embedded"]);
44870
+ /**
44871
+ * Broker live-probe status.
44872
+ *
44873
+ * - `connected` — last probe completed a clean CONNACK
44874
+ * - `disconnected` — no probe has run yet (cold cache)
44875
+ * - `auth-failed` — CONNACK refused with auth error (RC 4 / 5)
44876
+ * - `unreachable` — TCP connect timed out / refused
44877
+ * - `tls-error` — TLS handshake failed (cert / SNI / cipher)
44878
+ */
44879
+ var BrokerStatusSchema$1 = _enum([
44880
+ "connected",
44881
+ "disconnected",
44882
+ "auth-failed",
44883
+ "unreachable",
44884
+ "tls-error"
44885
+ ]);
44886
+ var BrokerInfoSchema$1 = object({
44643
44887
  id: string(),
44644
44888
  name: string(),
44645
- kind: string(),
44646
- addonId: string(),
44647
- enabled: boolean(),
44648
- config: record(string(), unknown())
44649
- });
44650
- /** A discovery-surfaced candidate (config is partial + non-secret). */
44651
- var DiscoveredTargetSchema = object({
44652
- kind: string(),
44653
- suggestedName: string(),
44654
- config: record(string(), unknown())
44655
- });
44656
- /** The degrade engine's report — what was resolved / dropped / degraded. */
44657
- var RenderedAsSchema = object({
44658
- level: string(),
44659
- format: NotificationFormatSchema,
44660
- attachmentsSent: number().int().nonnegative(),
44661
- actionsSent: number().int().nonnegative(),
44662
- truncated: boolean(),
44663
- dropped: array(string())
44664
- });
44665
- var SendResultSchema = object({
44666
- success: boolean(),
44889
+ url: string(),
44890
+ kind: BrokerKindSchema,
44891
+ status: BrokerStatusSchema$1,
44892
+ latencyMs: number().nullable(),
44667
44893
  error: string().optional(),
44668
- renderedAs: RenderedAsSchema.optional()
44894
+ /** Embedded brokers only: number of MQTT clients currently connected. */
44895
+ connectedClients: number().int().nonnegative().optional(),
44896
+ /** Epoch ms of the last live probe (external) or aedes snapshot (embedded). */
44897
+ lastCheckedAt: number().optional()
44669
44898
  });
44670
- /** Same shape as SendResult — kept as a distinct name for the test panel. */
44671
- var TestResultSchema = SendResultSchema;
44672
44899
  /**
44673
- * Pre-save credential probe against a partial (unsaved) target config.
44674
- * `resolvedUrl` never includes secrets (token stripped from path).
44900
+ * Connection details — what a consumer needs to call
44901
+ * `mqtt.connect(url, options)`. We split URL + credentials so the
44902
+ * consumer can pass them as `mqtt.connect(url, { username, password })`
44903
+ * instead of stuffing creds into the URL (which leaks them into logs).
44675
44904
  */
44676
- var ProbeTargetConfigResultSchema = object({
44677
- ok: boolean(),
44678
- resolvedUrl: string(),
44679
- httpStatus: number().int().optional(),
44680
- stateInstance: string().optional(),
44681
- error: string().optional()
44682
- });
44683
- method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSchema), { auth: "admin" }), method(object({ targetId: string() }), TargetSchema, { auth: "admin" }), method(object({
44684
- kind: string(),
44685
- config: record(string(), unknown()).optional(),
44905
+ var BrokerConnectionDetailsSchema = object({
44906
+ url: string(),
44907
+ username: string().optional(),
44908
+ password: string().optional(),
44686
44909
  /**
44687
- * When editing / duplicating, the blank password field never round-trips
44688
- * the stored token. Pass the source target id so the provider can restore
44689
- * secrets server-side before dialling (same merge as upsert).
44910
+ * Suggested prefix for `clientId`. Each consumer should suffix this
44911
+ * with its own discriminator (addon id, instance id) so reconnects
44912
+ * don't kick each other off (MQTT spec: clientId must be unique per
44913
+ * broker).
44690
44914
  */
44691
- targetId: string().optional()
44692
- }), array(DiscoveredTargetSchema), { auth: "admin" }), method(object({
44693
- kind: string(),
44694
- config: record(string(), unknown()),
44695
- /** See `discoverTargets.targetId` — restore stored secrets for a blank password. */
44696
- targetId: string().optional()
44697
- }), ProbeTargetConfigResultSchema, {
44698
- kind: "mutation",
44699
- auth: "admin"
44700
- }), method(object({
44701
- targetId: string(),
44702
- notification: NotificationSchema
44703
- }), SendResultSchema, {
44915
+ clientIdPrefix: string().optional()
44916
+ });
44917
+ var AddBrokerInputSchema = object({
44918
+ name: string().min(1),
44919
+ url: string().regex(/^(mqtt|mqtts|ws|wss):\/\//, "URL must start with mqtt(s):// or ws(s)://"),
44920
+ username: string().optional(),
44921
+ password: string().optional(),
44922
+ clientIdPrefix: string().optional()
44923
+ });
44924
+ var AddBrokerResultSchema = object({ id: string() });
44925
+ var IdInputSchema = object({ id: string() });
44926
+ var TestResultSchema$1 = discriminatedUnion("ok", [object({
44927
+ ok: literal(true),
44928
+ latencyMs: number()
44929
+ }), object({
44930
+ ok: literal(false),
44931
+ error: string()
44932
+ })]);
44933
+ var StartEmbeddedInputSchema = object({
44934
+ port: number().int().min(1).max(65535).default(1883),
44935
+ /** Allow anonymous connect (no username/password). Default: false. */
44936
+ allowAnonymous: boolean().default(false),
44937
+ /** Optional shared username/password for clients. */
44938
+ username: string().optional(),
44939
+ password: string().optional()
44940
+ });
44941
+ var StartEmbeddedResultSchema = object({
44942
+ id: string(),
44943
+ url: string()
44944
+ });
44945
+ var StatusSchema = object({
44946
+ brokerCount: number(),
44947
+ embeddedRunning: boolean()
44948
+ });
44949
+ method(_void(), array(BrokerInfoSchema$1)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
44704
44950
  kind: "mutation",
44705
44951
  auth: "admin"
44706
- }), method(object({
44707
- targetId: string(),
44708
- sample: NotificationSchema.optional()
44709
- }), TestResultSchema, {
44952
+ }), method(IdInputSchema, _void(), {
44710
44953
  kind: "mutation",
44711
44954
  auth: "admin"
44712
- }), method(object({
44713
- target: TargetSchema,
44714
- /**
44715
- * Duplicate flow: create a NEW target id while copying secrets from an
44716
- * existing row. The UI never holds the stored token; blank / redacted
44717
- * password fields are restored from this source (D634 still applies if
44718
- * destinations diverge without a re-typed secret).
44719
- */
44720
- cloneSecretsFrom: string().optional()
44721
- }), TargetSchema, {
44955
+ }), method(IdInputSchema, TestResultSchema$1, {
44722
44956
  kind: "mutation",
44723
44957
  auth: "admin"
44724
- }), method(object({ targetId: string() }), _void(), {
44958
+ }), method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, {
44725
44959
  kind: "mutation",
44726
44960
  auth: "admin"
44727
- }), method(object({
44728
- targetId: string(),
44729
- enabled: boolean()
44730
- }), _void(), {
44961
+ }), method(IdInputSchema, _void(), {
44731
44962
  kind: "mutation",
44732
44963
  auth: "admin"
44964
+ }), method(_void(), StatusSchema);
44965
+ var NetworkEndpointSchema = object({
44966
+ url: string(),
44967
+ hostname: string(),
44968
+ port: number(),
44969
+ protocol: _enum(["http", "https"]),
44970
+ /**
44971
+ * Whether this address survives a restart of its provider. `false` = it is
44972
+ * re-issued every time (a Quick tunnel's random `*.trycloudflare.com`); the
44973
+ * hub never selects such an address AUTOMATICALLY for a role (D860), though
44974
+ * it stays visible and an operator may still flag it. Absent = stable: every
44975
+ * provider except a Quick tunnel owns a name that does not change.
44976
+ */
44977
+ stable: boolean().optional()
44978
+ });
44979
+ object({
44980
+ url: string(),
44981
+ /** Mirrors {@link NetworkEndpointSchema} `stable`; absent = stable. */
44982
+ stable: boolean().optional(),
44983
+ updated: boolean().optional()
44984
+ });
44985
+ var NetworkAccessStatusSchema = object({
44986
+ connected: boolean(),
44987
+ endpoint: NetworkEndpointSchema.nullable(),
44988
+ error: string().optional()
44989
+ });
44990
+ /**
44991
+ * Optional, richer endpoint shape returned by providers that expose
44992
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
44993
+ * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
44994
+ * the originating provider config (mode + sourcePort) so the
44995
+ * orchestrator UI can label rows distinctly. Providers that expose only
44996
+ * one endpoint just omit `listEndpoints` from their provider impl.
44997
+ */
44998
+ var NetworkEndpointEntrySchema = NetworkEndpointSchema.extend({
44999
+ /**
45000
+ * Stable id within the provider — typically `<mode>-<sourcePort>` so
45001
+ * the orchestrator can dedupe across `listEndpoints` polls.
45002
+ */
45003
+ id: string(),
45004
+ /** Operator-facing label (mirrors `MeshEndpoint.label`). */
45005
+ label: string(),
45006
+ /** Optional provider-specific mode tag, used for icon/colour in admin UI. */
45007
+ mode: string().optional(),
45008
+ /** Originating local port the ingress fronts (informational). */
45009
+ sourcePort: number().optional()
44733
45010
  });
45011
+ method(_void(), NetworkEndpointSchema, { kind: "mutation" }), method(_void(), _void(), { kind: "mutation" }), method(_void(), NetworkEndpointSchema.nullable()), method(_void(), NetworkAccessStatusSchema), method(_void(), array(NetworkEndpointEntrySchema).readonly());
44734
45012
  var AUDIO_MACRO_LABELS = [
44735
45013
  {
44736
45014
  id: "speech",
@@ -51147,14 +51425,6 @@ var EngineProvisioningSchema = object({
51147
51425
  */
51148
51426
  configIssues: array(string()).optional()
51149
51427
  });
51150
- var PipelineStepInputSchema = lazy(() => object({
51151
- addonId: string(),
51152
- modelId: string().optional(),
51153
- enabled: boolean().default(true),
51154
- children: array(PipelineStepInputSchema).optional(),
51155
- settings: record(string(), unknown()).optional(),
51156
- jumpDeviceKey: string().optional()
51157
- }));
51158
51428
  var ModelSubstitutionSchema = object({
51159
51429
  addonId: string(),
51160
51430
  chosen: string(),
@@ -51233,7 +51503,6 @@ var ConfigUISchemaBridge = custom();
51233
51503
  var ConfigUISchemaNullableBridge = custom();
51234
51504
  var InferenceCapabilitiesBridge = custom();
51235
51505
  var ModelAvailabilityListBridge = custom();
51236
- var PipelineRunResultBridge = custom();
51237
51506
  method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
51238
51507
  modelId: string(),
51239
51508
  settings: record(string(), unknown()).readonly()
@@ -54395,6 +54664,12 @@ var ServerUpdateActionResultSchema = object({
54395
54664
  */
54396
54665
  blockers: array(UpdateBlockerSchema).optional()
54397
54666
  });
54667
+ var LaunchOverridesSchema = object({
54668
+ /** The persisted heap ceiling in MB, or `null` when none is set. */
54669
+ heapMb: number().int().nullable() });
54670
+ var SetLaunchOverridesResultSchema = LaunchOverridesSchema.extend({
54671
+ /** Always true: the override is read at launch, not by the running process. */
54672
+ restartRequired: boolean() });
54398
54673
  method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
54399
54674
  kind: "mutation",
54400
54675
  auth: "admin"
@@ -54417,6 +54692,9 @@ method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), S
54417
54692
  }), method(_void(), ServerUpdateActionResultSchema, {
54418
54693
  kind: "mutation",
54419
54694
  auth: "admin"
54695
+ }), method(_void(), LaunchOverridesSchema, { auth: "admin" }), method(object({ heapMb: number().int().min(512).max(65536).nullable() }), SetLaunchOverridesResultSchema, {
54696
+ kind: "mutation",
54697
+ auth: "admin"
54420
54698
  });
54421
54699
  /**
54422
54700
  * `smtp-provider` — pluggable email delivery surface.
@@ -56818,7 +57096,9 @@ var ManifestShapeSchema = object({
56818
57096
  icon: string().optional()
56819
57097
  }).optional(),
56820
57098
  protected: boolean().optional(),
56821
- removable: boolean().optional()
57099
+ removable: boolean().optional(),
57100
+ /** Declared Integrations-page block (mirror of `AddonDeclaration.integrationSection`). */
57101
+ integrationSection: _enum(["system", "providers"]).optional()
56822
57102
  });
56823
57103
  var AddonProcessSchema = object({
56824
57104
  pid: number().optional(),
@@ -57547,11 +57827,373 @@ DeviceType.Light, method(object({
57547
57827
  level: number().min(0).max(100),
57548
57828
  lastChangedAt: number()
57549
57829
  });
57830
+ /**
57831
+ * The role vocabulary of a remote (D963): what a button MEANS, independent of
57832
+ * how it is wired. A layout template places buttons by role; a device binds a
57833
+ * role to an action; an exporter asks for a role by name. Roles are shared so
57834
+ * one layout fits every appliance and one voice command fits every binding.
57835
+ *
57836
+ * A role outside this list is `custom:<key>` — the operator's own button (a
57837
+ * SmartIR source, a channel preset). The key is a lowercase slug.
57838
+ */
57839
+ var REMOTE_KNOWN_ROLES = [
57840
+ "power",
57841
+ "power_on",
57842
+ "power_off",
57843
+ "volume_up",
57844
+ "volume_down",
57845
+ "mute",
57846
+ "channel_up",
57847
+ "channel_down",
57848
+ "up",
57849
+ "down",
57850
+ "left",
57851
+ "right",
57852
+ "ok",
57853
+ "back",
57854
+ "home",
57855
+ "menu",
57856
+ "info",
57857
+ "guide",
57858
+ "exit",
57859
+ "input",
57860
+ "play",
57861
+ "pause",
57862
+ "play_pause",
57863
+ "stop",
57864
+ "next",
57865
+ "previous",
57866
+ "fast_forward",
57867
+ "rewind",
57868
+ "digit_0",
57869
+ "digit_1",
57870
+ "digit_2",
57871
+ "digit_3",
57872
+ "digit_4",
57873
+ "digit_5",
57874
+ "digit_6",
57875
+ "digit_7",
57876
+ "digit_8",
57877
+ "digit_9"
57878
+ ];
57879
+ var CUSTOM_KEY_RE = /^[a-z0-9][a-z0-9_]{0,47}$/;
57880
+ var KNOWN_ROLES = new Set(REMOTE_KNOWN_ROLES);
57881
+ function isRemoteKnownRole(value) {
57882
+ return KNOWN_ROLES.has(value);
57883
+ }
57884
+ function isRemoteCustomKey(key) {
57885
+ return CUSTOM_KEY_RE.test(key);
57886
+ }
57887
+ /** The key of a `custom:<key>` role, or null for any other string. */
57888
+ function customKeyOfRole(role) {
57889
+ if (!role.startsWith("custom:")) return null;
57890
+ const key = role.slice(7);
57891
+ return isRemoteCustomKey(key) ? key : null;
57892
+ }
57893
+ function isRemoteRole(value) {
57894
+ return isRemoteKnownRole(value) || customKeyOfRole(value) !== null;
57895
+ }
57896
+ var RemoteRoleSchema = string().refine(isRemoteRole, { message: "a role is one of the known roles or custom:<key> (lowercase letters, digits, _)" });
57897
+ var RemoteBindingSchema = object({ action: AutomationCapStepSchema.extend({ deviceId: number().int().nonnegative() }) });
57898
+ var RemoteCustomButtonSchema = object({
57899
+ /** The slug after `custom:` in the role. */
57900
+ key: string().refine(isRemoteCustomKey, { message: "a lowercase slug" }),
57901
+ /** What the operator calls it, and what a voice command may name. */
57902
+ name: string().min(1).max(60)
57903
+ });
57904
+ var RemotePowerModeSchema = _enum(["toggle", "discrete"]);
57905
+ var RemoteConfigSchema = object({
57906
+ layoutTemplateId: string().min(1).nullable(),
57907
+ /**
57908
+ * The transmitter device new bindings and an import send through. A binding
57909
+ * names its own device, so one command may override it.
57910
+ */
57911
+ defaultTransmitterId: number().int().nonnegative().nullable().default(null),
57912
+ /** Keyed by role. A role with no entry falls back to the native cap. */
57913
+ bindings: record(string(), RemoteBindingSchema),
57914
+ customButtons: array(RemoteCustomButtonSchema).max(100),
57915
+ power: object({ mode: RemotePowerModeSchema })
57916
+ }).superRefine((config, ctx) => {
57917
+ const roles = Object.keys(config.bindings);
57918
+ if (roles.length > 200) ctx.addIssue({
57919
+ code: "custom",
57920
+ message: "too many bindings",
57921
+ path: ["bindings"]
57922
+ });
57923
+ for (const role of roles) if (!isRemoteRole(role)) ctx.addIssue({
57924
+ code: "custom",
57925
+ message: `"${role}" is not a role`,
57926
+ path: ["bindings", role]
57927
+ });
57928
+ const keys = /* @__PURE__ */ new Set();
57929
+ config.customButtons.forEach((button, index) => {
57930
+ if (keys.has(button.key)) ctx.addIssue({
57931
+ code: "custom",
57932
+ message: `custom button "${button.key}" is listed twice`,
57933
+ path: [
57934
+ "customButtons",
57935
+ index,
57936
+ "key"
57937
+ ]
57938
+ });
57939
+ keys.add(button.key);
57940
+ });
57941
+ for (const role of roles) {
57942
+ const key = customKeyOfRole(role);
57943
+ if (key !== null && !keys.has(key)) ctx.addIssue({
57944
+ code: "custom",
57945
+ message: `${role} is bound but has no entry in customButtons`,
57946
+ path: ["bindings", role]
57947
+ });
57948
+ }
57949
+ });
57950
+ object({
57951
+ power: object({
57952
+ state: _enum(["on", "off"]),
57953
+ at: number()
57954
+ }).nullable(),
57955
+ muted: object({
57956
+ value: boolean(),
57957
+ at: number()
57958
+ }).nullable()
57959
+ });
57960
+ var RemoteLayoutButtonSchema = object({
57961
+ id: string().min(1).max(40),
57962
+ /** 0-based grid position. */
57963
+ row: number().int().min(0).max(24),
57964
+ col: number().int().min(0).max(24),
57965
+ rowSpan: number().int().min(1).max(24),
57966
+ colSpan: number().int().min(1).max(24),
57967
+ icon: string().min(1).max(60).optional(),
57968
+ label: string().min(1).max(40).optional(),
57969
+ role: RemoteRoleSchema
57970
+ });
57971
+ object({
57972
+ columns: number().int().min(1).max(24),
57973
+ rows: number().int().min(1).max(24),
57974
+ buttons: array(RemoteLayoutButtonSchema).max(200)
57975
+ }).superRefine((grid, ctx) => {
57976
+ const ids = /* @__PURE__ */ new Set();
57977
+ const taken = /* @__PURE__ */ new Map();
57978
+ grid.buttons.forEach((button, index) => {
57979
+ if (ids.has(button.id)) ctx.addIssue({
57980
+ code: "custom",
57981
+ message: `button id "${button.id}" is used twice`,
57982
+ path: [
57983
+ "buttons",
57984
+ index,
57985
+ "id"
57986
+ ]
57987
+ });
57988
+ ids.add(button.id);
57989
+ if (button.row + button.rowSpan > grid.rows || button.col + button.colSpan > grid.columns) {
57990
+ ctx.addIssue({
57991
+ code: "custom",
57992
+ message: `button "${button.id}" leaves the grid`,
57993
+ path: ["buttons", index]
57994
+ });
57995
+ return;
57996
+ }
57997
+ for (let r = button.row; r < button.row + button.rowSpan; r += 1) for (let c = button.col; c < button.col + button.colSpan; c += 1) {
57998
+ const cell = `${r}:${c}`;
57999
+ const other = taken.get(cell);
58000
+ if (other !== void 0) {
58001
+ ctx.addIssue({
58002
+ code: "custom",
58003
+ message: `buttons "${other}" and "${button.id}" overlap`,
58004
+ path: ["buttons", index]
58005
+ });
58006
+ return;
58007
+ }
58008
+ taken.set(cell, button.id);
58009
+ }
58010
+ });
58011
+ });
58012
+ var RemoteBoundCommandSchema = object({
58013
+ role: RemoteRoleSchema,
58014
+ /** The operator's name for a custom button; absent for a known role. */
58015
+ label: string().optional(),
58016
+ custom: boolean()
58017
+ });
58018
+ var RemoteCommandListSchema = object({
58019
+ layoutTemplateId: string().nullable(),
58020
+ power: object({ mode: RemotePowerModeSchema }),
58021
+ /** Only the roles that are BOUND — the ones a press can reach. */
58022
+ commands: array(RemoteBoundCommandSchema)
58023
+ });
58024
+ var RemoteRefusalReasonSchema = _enum([
58025
+ "no-remote",
58026
+ "unbound-role",
58027
+ "action-failed"
58028
+ ]);
58029
+ var RemoteSendResultSchema = discriminatedUnion("status", [
58030
+ object({
58031
+ status: literal("sent"),
58032
+ /** How many times the action ran. */
58033
+ sends: number().int().min(1)
58034
+ }),
58035
+ object({
58036
+ status: literal("skipped"),
58037
+ reason: literal("already-in-state")
58038
+ }),
58039
+ object({
58040
+ status: literal("refused"),
58041
+ reason: RemoteRefusalReasonSchema,
58042
+ detail: string().optional()
58043
+ })
58044
+ ]);
58045
+ var RemoteMediaCommandSchema = _enum([
58046
+ "play",
58047
+ "pause",
58048
+ "stop",
58049
+ "next",
58050
+ "previous",
58051
+ "setMute",
58052
+ "selectSource"
58053
+ ]);
58054
+ /** A send result, or `not-routed`: the role is not bound, so the native cap answers. */
58055
+ var RemoteMediaCommandResultSchema = discriminatedUnion("status", [...RemoteSendResultSchema.options, object({ status: literal("not-routed") })]);
58056
+ var RemoteSetConfigResultSchema = discriminatedUnion("status", [object({ status: literal("saved") }), object({
58057
+ status: literal("refused"),
58058
+ reason: _enum(["unknown-template", "not-a-media-player"]),
58059
+ detail: string()
58060
+ })]);
58061
+ var deviceInput = object({ deviceId: number().int().nonnegative() });
58062
+ DeviceType.MediaPlayer;
58063
+ method(deviceInput, RemoteConfigSchema, { auth: "admin" }), method(deviceInput.extend({ config: RemoteConfigSchema }), RemoteSetConfigResultSchema, {
58064
+ kind: "mutation",
58065
+ auth: "admin"
58066
+ }), method(deviceInput, RemoteCommandListSchema, { auth: "protected" }), method(deviceInput.extend({
58067
+ role: RemoteRoleSchema,
58068
+ /** Sends in a row (volume steps). */
58069
+ repeat: number().int().min(1).max(50).default(1)
58070
+ }), RemoteSendResultSchema, {
58071
+ kind: "mutation",
58072
+ auth: "protected"
58073
+ }), method(deviceInput.extend({
58074
+ command: RemoteMediaCommandSchema,
58075
+ muted: boolean().optional(),
58076
+ source: string().optional(),
58077
+ repeat: number().int().min(1).max(50).default(1)
58078
+ }), RemoteMediaCommandResultSchema, {
58079
+ kind: "mutation",
58080
+ auth: "protected"
58081
+ });
58082
+ var TemplateKindSchema = _enum(["remote"]);
58083
+ /**
58084
+ * template — the generic store of reusable, named operator data (D963). A
58085
+ * record is `{ id, kind, name, payload }`; the kinds (today only `remote`, the
58086
+ * button grid of a remote) and the schema each payload must satisfy are
58087
+ * declared by the system in `template-kinds.ts`. Nothing here is specific to a
58088
+ * kind: the engine validates a payload against its kind's schema and, on a
58089
+ * delete, asks the kind's owner whether anything still points at the record.
58090
+ *
58091
+ * Every refusal is a typed result — a UI says "unknown kind" or names the
58092
+ * devices that still use a template, without parsing text.
58093
+ */
58094
+ var TemplateRecordSchema = object({
58095
+ id: string().min(1),
58096
+ kind: TemplateKindSchema,
58097
+ name: string().min(1).max(120),
58098
+ /** Shaped by the kind; `checkTemplatePayload(kind, payload)` reads it. */
58099
+ payload: unknown(),
58100
+ createdAt: number(),
58101
+ updatedAt: number()
58102
+ });
58103
+ var TemplateWriteResultSchema = discriminatedUnion("status", [object({
58104
+ status: literal("saved"),
58105
+ template: TemplateRecordSchema
58106
+ }), object({
58107
+ status: literal("refused"),
58108
+ reason: _enum(["invalid-payload", "not-found"]),
58109
+ detail: string()
58110
+ })]);
58111
+ /** A device still pointing at a template. */
58112
+ var TemplateUserSchema = object({
58113
+ deviceId: number().int().nonnegative(),
58114
+ name: string()
58115
+ });
58116
+ var TemplateDeleteResultSchema = discriminatedUnion("status", [
58117
+ object({ status: literal("deleted") }),
58118
+ object({ status: literal("not-found") }),
58119
+ object({
58120
+ status: literal("in-use"),
58121
+ devices: array(TemplateUserSchema).min(1)
58122
+ })
58123
+ ]);
58124
+ method(object({ kind: TemplateKindSchema.optional() }), array(TemplateRecordSchema), { auth: "protected" }), method(object({ id: string().min(1) }), TemplateRecordSchema.nullable(), { auth: "protected" }), method(object({
58125
+ kind: TemplateKindSchema,
58126
+ name: string().min(1).max(120),
58127
+ payload: unknown()
58128
+ }), TemplateWriteResultSchema, {
58129
+ kind: "mutation",
58130
+ auth: "admin"
58131
+ }), method(object({
58132
+ id: string().min(1),
58133
+ name: string().min(1).max(120).optional(),
58134
+ payload: unknown().optional()
58135
+ }), TemplateWriteResultSchema, {
58136
+ kind: "mutation",
58137
+ auth: "admin"
58138
+ }), method(object({ id: string().min(1) }), TemplateDeleteResultSchema, {
58139
+ kind: "mutation",
58140
+ auth: "admin"
58141
+ });
57550
58142
  DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
57551
58143
  kind: "mutation",
57552
58144
  auth: "protected"
57553
58145
  });
57554
58146
  /**
58147
+ * A pulse train in signed microseconds: mark (+) first, then space (-), strictly
58148
+ * alternating, no zeros, 2..1024 entries.
58149
+ */
58150
+ var IrTimingsSchema = array(number().int()).min(2).max(1024).superRefine((timings, ctx) => {
58151
+ timings.forEach((value, index) => {
58152
+ const expectMark = index % 2 === 0;
58153
+ if (value === 0 || value > 0 !== expectMark) ctx.addIssue({
58154
+ code: "custom",
58155
+ message: `timing ${index} must be a non-zero ${expectMark ? "mark (positive)" : "space (negative)"}`,
58156
+ path: [index]
58157
+ });
58158
+ });
58159
+ });
58160
+ /** Per-command transmit options. Every key is optional; a transmitter applies what it can. */
58161
+ var TransmitSettingsSchema = object({
58162
+ carrierHz: number().int().positive().optional(),
58163
+ dutyCyclePercent: number().int().min(1).max(100).optional(),
58164
+ repeat: number().int().min(0).max(20).optional(),
58165
+ repeatDelayMs: number().int().min(0).optional()
58166
+ });
58167
+ /** The setting keys a transmitter may declare as settable (`getInfo.settable`). */
58168
+ var TransmitSettingKeySchema = _enum([
58169
+ "carrierHz",
58170
+ "dutyCyclePercent",
58171
+ "repeat",
58172
+ "repeatDelayMs"
58173
+ ]);
58174
+ var IrMediumSchema = _enum(["ir", "rf"]);
58175
+ var IrSendResultSchema = object({
58176
+ ok: literal(true),
58177
+ /** Settings the transmitter could not apply; the train was still sent. */
58178
+ ignoredSettings: array(string())
58179
+ });
58180
+ var IrTransmitterInfoSchema = object({
58181
+ media: array(IrMediumSchema),
58182
+ settable: array(TransmitSettingKeySchema),
58183
+ maxTimings: number().int().positive()
58184
+ });
58185
+ DeviceType.Generic, method(object({
58186
+ deviceId: number().int().nonnegative(),
58187
+ timings: IrTimingsSchema,
58188
+ settings: TransmitSettingsSchema.optional()
58189
+ }), IrSendResultSchema, {
58190
+ kind: "mutation",
58191
+ auth: "protected"
58192
+ }), method(object({ deviceId: number().int().nonnegative() }), IrTransmitterInfoSchema, {
58193
+ kind: "query",
58194
+ auth: "protected"
58195
+ });
58196
+ /**
57555
58197
  * `calendar-source` — collection cap exposing per-provider calendars and
57556
58198
  * their events. Every addon that contributes calendars (Home Assistant,
57557
58199
  * a future Google Calendar addon, …) registers a provider here. The hub
@@ -58555,7 +59197,7 @@ object({
58555
59197
  /** Ms epoch of the last value received from the appliance; 0 = never. */
58556
59198
  lastFetchedAt: number()
58557
59199
  });
58558
- var DeviceIdSchema = number().int().nonnegative();
59200
+ var DeviceIdSchema$1 = number().int().nonnegative();
58559
59201
  /** A value a program option or setting can take. */
58560
59202
  var DishwasherValueSchema = union([
58561
59203
  boolean(),
@@ -58619,77 +59261,77 @@ var DishwasherOptionsSchema = object({
58619
59261
  options: array(DishwasherOptionDescriptorSchema)
58620
59262
  });
58621
59263
  DeviceType.Dishwasher, method(object({
58622
- deviceId: DeviceIdSchema,
59264
+ deviceId: DeviceIdSchema$1,
58623
59265
  program: string().min(1).optional(),
58624
59266
  options: record(string(), DishwasherValueSchema).optional()
58625
59267
  }), _void(), {
58626
59268
  kind: "mutation",
58627
59269
  auth: "protected"
58628
- }), method(object({ deviceId: DeviceIdSchema }), _void(), {
59270
+ }), method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
58629
59271
  kind: "mutation",
58630
59272
  auth: "protected"
58631
- }), method(object({ deviceId: DeviceIdSchema }), _void(), {
59273
+ }), method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
58632
59274
  kind: "mutation",
58633
59275
  auth: "protected"
58634
- }), method(object({ deviceId: DeviceIdSchema }), _void(), {
59276
+ }), method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
58635
59277
  kind: "mutation",
58636
59278
  auth: "protected"
58637
59279
  }), method(object({
58638
- deviceId: DeviceIdSchema,
59280
+ deviceId: DeviceIdSchema$1,
58639
59281
  program: string().min(1)
58640
59282
  }), _void(), {
58641
59283
  kind: "mutation",
58642
59284
  auth: "protected"
58643
59285
  }), method(object({
58644
- deviceId: DeviceIdSchema,
59286
+ deviceId: DeviceIdSchema$1,
58645
59287
  on: boolean()
58646
59288
  }), _void(), {
58647
59289
  kind: "mutation",
58648
59290
  auth: "protected"
58649
59291
  }), method(object({
58650
- deviceId: DeviceIdSchema,
59292
+ deviceId: DeviceIdSchema$1,
58651
59293
  on: boolean()
58652
59294
  }), _void(), {
58653
59295
  kind: "mutation",
58654
59296
  auth: "protected"
58655
59297
  }), method(object({
58656
- deviceId: DeviceIdSchema,
59298
+ deviceId: DeviceIdSchema$1,
58657
59299
  on: boolean()
58658
59300
  }), _void(), {
58659
59301
  kind: "mutation",
58660
59302
  auth: "protected"
58661
59303
  }), method(object({
58662
- deviceId: DeviceIdSchema,
59304
+ deviceId: DeviceIdSchema$1,
58663
59305
  on: boolean()
58664
59306
  }), _void(), {
58665
59307
  kind: "mutation",
58666
59308
  auth: "protected"
58667
59309
  }), method(object({
58668
- deviceId: DeviceIdSchema,
59310
+ deviceId: DeviceIdSchema$1,
58669
59311
  on: boolean()
58670
59312
  }), _void(), {
58671
59313
  kind: "mutation",
58672
59314
  auth: "protected"
58673
59315
  }), method(object({
58674
- deviceId: DeviceIdSchema,
59316
+ deviceId: DeviceIdSchema$1,
58675
59317
  on: boolean()
58676
59318
  }), _void(), {
58677
59319
  kind: "mutation",
58678
59320
  auth: "protected"
58679
59321
  }), method(object({
58680
- deviceId: DeviceIdSchema,
59322
+ deviceId: DeviceIdSchema$1,
58681
59323
  on: boolean()
58682
59324
  }), _void(), {
58683
59325
  kind: "mutation",
58684
59326
  auth: "protected"
58685
59327
  }), method(object({
58686
- deviceId: DeviceIdSchema,
59328
+ deviceId: DeviceIdSchema$1,
58687
59329
  key: string().min(1),
58688
59330
  value: DishwasherValueSchema
58689
59331
  }), _void(), {
58690
59332
  kind: "mutation",
58691
59333
  auth: "protected"
58692
- }), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
59334
+ }), method(object({ deviceId: DeviceIdSchema$1 }), DishwasherOptionsSchema, { auth: "protected" });
58693
59335
  DeviceType.Camera;
58694
59336
  object({
58695
59337
  /** Ms epoch of the last press. null = never observed since this provider started. */
@@ -60246,9 +60888,35 @@ var MediaInfoSchema = object({
60246
60888
  /** Optional cover-art / thumbnail URL. */
60247
60889
  imageUrl: string().optional()
60248
60890
  });
60891
+ /**
60892
+ * Where `state`, `volumeLevel`, `isMuted` and `source` come from. `reported`:
60893
+ * the device said so. `assumed`: the driver has no feedback (infrared) and
60894
+ * tracks what it last SENT; it moves only after a send was accepted, and a
60895
+ * human at the real remote makes it wrong. A UI shows an assumed value as a
60896
+ * guess, never as a reading.
60897
+ */
60898
+ var MediaPlayerStateSourceSchema = _enum(["reported", "assumed"]);
60899
+ /** The fields of a media-player status a driver can only guess. */
60900
+ var MediaPlayerAssumedFieldSchema = _enum([
60901
+ "state",
60902
+ "volumeLevel",
60903
+ "isMuted",
60904
+ "source"
60905
+ ]);
60249
60906
  object({
60250
60907
  /** Playback lifecycle state. */
60251
60908
  state: MediaPlayerStateSchema,
60909
+ /**
60910
+ * Whether the state fields are readings or the driver's own bookkeeping.
60911
+ * A slice written before this field existed parses as `reported`.
60912
+ */
60913
+ stateSource: MediaPlayerStateSourceSchema.default("reported"),
60914
+ /**
60915
+ * Which fields are the driver's own guess. `stateSource` is `assumed` when
60916
+ * this is not empty; a field not listed here is a reading even then (power
60917
+ * from a running-state source, mute guessed from the last send).
60918
+ */
60919
+ assumedFields: array(MediaPlayerAssumedFieldSchema).default([]),
60252
60920
  /** Volume as 0..100 inclusive. Null when the device has no volume
60253
60921
  * surface. Pair with `DeviceFeature.MediaPlayerVolume`. */
60254
60922
  volumeLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
@@ -61101,7 +61769,8 @@ var TopologyNodeSchema = object({
61101
61769
  isHub: boolean(),
61102
61770
  isOnline: boolean(),
61103
61771
  cpuPercent: number(),
61104
- memoryPercent: number(),
61772
+ /** `null` when the node's memory read failed or it has not reported one (D393). */
61773
+ memoryPercent: number().nullable(),
61105
61774
  uptime: number(),
61106
61775
  lastSeen: string(),
61107
61776
  localIps: array(string()).readonly(),
@@ -61636,9 +62305,10 @@ object({
61636
62305
  * combined reading; per-hopper levels live in `food1`/`food2`. Null when
61637
62306
  * the device has not reported yet. */
61638
62307
  foodLevel: number().nullable().meta(readingMeta("none")),
61639
- /** Food in the BOWL as the feeder reports it (`state.bowl`), in the
61640
- * feeder's own units. Null when the model reports none. */
61641
- bowlFood: number().nullable().meta(readingMeta("none")),
62308
+ /** Food in the BOWL, a mass (stored in kilograms, D944). Reported only by a
62309
+ * feeder with a bowl scale; null when the model has none or its reading is
62310
+ * of an unproven unit. */
62311
+ bowlFood: number().nullable().meta(readingMeta("mass")),
61642
62312
  /** True while the pet is eating (`state.eating`). */
61643
62313
  eating: boolean(),
61644
62314
  /** Whether `markFoodReplenished` does anything on this model. When false
@@ -61654,9 +62324,14 @@ object({
61654
62324
  * (`device_class: problem`, on = low). True when the tank reports empty,
61655
62325
  * or, on a dual-hopper model, when EITHER hopper is empty. */
61656
62326
  lowFood: boolean(),
61657
- /** Battery charge 0..100 (%). Null on mains-powered models or when the
61658
- * device has no battery reading. */
62327
+ /** Battery charge 0..100 (%). On a feeder running on `mains` this is the
62328
+ * BACKUP battery's charge, not the power source. Null when the device has
62329
+ * no battery reading. */
61659
62330
  batteryPower: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
62331
+ /** What the feeder is powered from right now: `mains` (plugged in, the
62332
+ * battery is only a backup) or `battery`. Null when the device does not
62333
+ * report it. */
62334
+ powerSource: _enum(["mains", "battery"]).nullable(),
61660
62335
  /**
61661
62336
  * Desiccant life remaining, stored in seconds (duration base, D944).
61662
62337
  * Providers convert from the days the feeder reports. Null when the
@@ -61684,6 +62359,14 @@ object({
61684
62359
  feedSound: boolean(),
61685
62360
  /** Speaker / prompt volume level (device-scaled integer). */
61686
62361
  volume: number().meta(readingMeta("none")),
62362
+ /** Portion (grams) of the last manual feed sent from a single-hopper
62363
+ * stepper — the default the next manual feed starts from. Persisted per
62364
+ * device by the provider; null until a manual feed has been sent. */
62365
+ lastFeedGrams: gramsPortion.nullable(),
62366
+ /** Hopper-1 portion of the last manual feed (dual-hopper); null until sent. */
62367
+ lastFeedHopper1: gramsPortion.nullable(),
62368
+ /** Hopper-2 portion of the last manual feed (dual-hopper); null until sent. */
62369
+ lastFeedHopper2: gramsPortion.nullable(),
61687
62370
  /** Ms epoch when the slice was last refreshed from the cloud. */
61688
62371
  lastFetchedAt: number()
61689
62372
  });
@@ -61738,6 +62421,64 @@ DeviceType.PetFeeder, method(object({
61738
62421
  kind: "mutation",
61739
62422
  auth: "protected"
61740
62423
  });
62424
+ object({
62425
+ /** Water in the tank, 0..100 (%). Null while the source has not reported. */
62426
+ waterLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
62427
+ /** Water in the tank, in litres. Null while the source has not reported. */
62428
+ waterVolume: number().min(0).nullable().meta(readingMeta("volume")),
62429
+ /** True when the tank is empty. Null while unknown. */
62430
+ empty: boolean().nullable(),
62431
+ /** True while the pump is running. Null while unknown. */
62432
+ pumpRunning: boolean().nullable(),
62433
+ /** True when the pump works on an on/off duty cycle rather than continuously. */
62434
+ pumpIntervalEnabled: boolean().nullable(),
62435
+ /** How long the pump runs per cycle, in seconds. */
62436
+ pumpOnTime: number().min(0).nullable().meta(readingMeta("duration")),
62437
+ /** How long the pump rests per cycle, in seconds. */
62438
+ pumpOffTime: number().min(0).nullable().meta(readingMeta("duration")),
62439
+ /** Water drunk in the last drink, in litres. */
62440
+ lastDrink: number().min(0).nullable().meta(readingMeta("volume")),
62441
+ /** Water drunk in the current hour, in litres. */
62442
+ currentHourDrink: number().min(0).nullable().meta(readingMeta("volume")),
62443
+ /** Water drunk over the last 24 hours (rolling), in litres. */
62444
+ last24hDrink: number().min(0).nullable().meta(readingMeta("volume")),
62445
+ /** Water drunk since local midnight, in litres. */
62446
+ todayDrink: number().min(0).nullable().meta(readingMeta("volume")),
62447
+ /** Decoded fault message. Null means healthy; a non-null string is an active fault. */
62448
+ error: string().nullable(),
62449
+ /** Ms epoch when the slice was last refreshed. */
62450
+ lastFetchedAt: number()
62451
+ });
62452
+ var DeviceIdSchema = number().int().nonnegative();
62453
+ var MinutesSchema = number().int().min(0);
62454
+ DeviceType.PetFountain, method(object({
62455
+ deviceId: DeviceIdSchema,
62456
+ on: boolean()
62457
+ }), _void(), {
62458
+ kind: "mutation",
62459
+ auth: "protected"
62460
+ }), method(object({
62461
+ deviceId: DeviceIdSchema,
62462
+ on: boolean()
62463
+ }), _void(), {
62464
+ kind: "mutation",
62465
+ auth: "protected"
62466
+ }), method(object({
62467
+ deviceId: DeviceIdSchema,
62468
+ minutes: MinutesSchema
62469
+ }), _void(), {
62470
+ kind: "mutation",
62471
+ auth: "protected"
62472
+ }), method(object({
62473
+ deviceId: DeviceIdSchema,
62474
+ minutes: MinutesSchema
62475
+ }), _void(), {
62476
+ kind: "mutation",
62477
+ auth: "protected"
62478
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
62479
+ kind: "mutation",
62480
+ auth: "protected"
62481
+ });
61741
62482
  var VehicleSchema = object({
61742
62483
  id: string(),
61743
62484
  name: string(),
@@ -66332,9 +67073,17 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
66332
67073
  kind: "mutation",
66333
67074
  auth: "admin"
66334
67075
  });
67076
+ discriminatedUnion("kind", [object({
67077
+ kind: literal("raw"),
67078
+ timings: array(number().int()),
67079
+ settings: TransmitSettingsSchema.optional()
67080
+ }), object({
67081
+ kind: literal("pronto"),
67082
+ code: string()
67083
+ })]);
66335
67084
  DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
66336
67085
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
66337
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
67086
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
66338
67087
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
66339
67088
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
66340
67089
  new Set(CAP_NAMES);
@@ -66387,7 +67136,7 @@ var AccessoryKind = {
66387
67136
  PrivacyMask: DeviceRole.PrivacyMask
66388
67137
  };
66389
67138
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
66390
- DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer;
67139
+ DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer;
66391
67140
  new Set(Object.values(DeviceType));
66392
67141
  Object.freeze({
66393
67142
  "accessories.getStatus": {
@@ -68322,6 +69071,13 @@ Object.freeze({
68322
69071
  access: "create",
68323
69072
  role: "admin"
68324
69073
  },
69074
+ "deviceExport.exposeEntity": {
69075
+ capName: "device-export",
69076
+ capScope: "system",
69077
+ addonId: null,
69078
+ access: "create",
69079
+ role: "admin"
69080
+ },
68325
69081
  "deviceExport.getDeviceLiveContribution": {
68326
69082
  capName: "device-export",
68327
69083
  capScope: "system",
@@ -68350,6 +69106,13 @@ Object.freeze({
68350
69106
  access: "view",
68351
69107
  role: "admin"
68352
69108
  },
69109
+ "deviceExport.listExposedEntities": {
69110
+ capName: "device-export",
69111
+ capScope: "system",
69112
+ addonId: null,
69113
+ access: "view",
69114
+ role: "admin"
69115
+ },
68353
69116
  "deviceExport.listSupportedDeviceKinds": {
68354
69117
  capName: "device-export",
68355
69118
  capScope: "system",
@@ -68357,6 +69120,13 @@ Object.freeze({
68357
69120
  access: "view",
68358
69121
  role: "admin"
68359
69122
  },
69123
+ "deviceExport.listSupportedEntityKinds": {
69124
+ capName: "device-export",
69125
+ capScope: "system",
69126
+ addonId: null,
69127
+ access: "view",
69128
+ role: "admin"
69129
+ },
68360
69130
  "deviceExport.unexposeDevice": {
68361
69131
  capName: "device-export",
68362
69132
  capScope: "system",
@@ -68364,6 +69134,13 @@ Object.freeze({
68364
69134
  access: "create",
68365
69135
  role: "admin"
68366
69136
  },
69137
+ "deviceExport.unexposeEntity": {
69138
+ capName: "device-export",
69139
+ capScope: "system",
69140
+ addonId: null,
69141
+ access: "create",
69142
+ role: "admin"
69143
+ },
68367
69144
  "deviceExtension.listCandidates": {
68368
69145
  capName: "device-extension",
68369
69146
  capScope: "device",
@@ -69939,6 +70716,20 @@ Object.freeze({
69939
70716
  access: "create",
69940
70717
  role: "viewer"
69941
70718
  },
70719
+ "irTransmitter.getInfo": {
70720
+ capName: "ir-transmitter",
70721
+ capScope: "device",
70722
+ addonId: null,
70723
+ access: "view",
70724
+ role: "viewer"
70725
+ },
70726
+ "irTransmitter.send": {
70727
+ capName: "ir-transmitter",
70728
+ capScope: "device",
70729
+ addonId: null,
70730
+ access: "create",
70731
+ role: "viewer"
70732
+ },
69942
70733
  "keychain.delete": {
69943
70734
  capName: "keychain",
69944
70735
  capScope: "system",
@@ -71171,6 +71962,13 @@ Object.freeze({
71171
71962
  access: "create",
71172
71963
  role: "admin"
71173
71964
  },
71965
+ "nodeRemovalHook.onNodeRemoved": {
71966
+ capName: "node-removal-hook",
71967
+ capScope: "system",
71968
+ addonId: null,
71969
+ access: "create",
71970
+ role: "admin"
71971
+ },
71174
71972
  "nodes.clusterAddonStatus": {
71175
71973
  capName: "nodes",
71176
71974
  capScope: "system",
@@ -71808,6 +72606,48 @@ Object.freeze({
71808
72606
  access: "create",
71809
72607
  role: "viewer"
71810
72608
  },
72609
+ "petFountain.getStatus": {
72610
+ capName: "pet-fountain",
72611
+ capScope: "device",
72612
+ addonId: null,
72613
+ access: "view",
72614
+ role: "viewer"
72615
+ },
72616
+ "petFountain.resetDailyConsumption": {
72617
+ capName: "pet-fountain",
72618
+ capScope: "device",
72619
+ addonId: null,
72620
+ access: "delete",
72621
+ role: "viewer"
72622
+ },
72623
+ "petFountain.setPump": {
72624
+ capName: "pet-fountain",
72625
+ capScope: "device",
72626
+ addonId: null,
72627
+ access: "create",
72628
+ role: "viewer"
72629
+ },
72630
+ "petFountain.setPumpInterval": {
72631
+ capName: "pet-fountain",
72632
+ capScope: "device",
72633
+ addonId: null,
72634
+ access: "create",
72635
+ role: "viewer"
72636
+ },
72637
+ "petFountain.setPumpOffMinutes": {
72638
+ capName: "pet-fountain",
72639
+ capScope: "device",
72640
+ addonId: null,
72641
+ access: "create",
72642
+ role: "viewer"
72643
+ },
72644
+ "petFountain.setPumpOnMinutes": {
72645
+ capName: "pet-fountain",
72646
+ capScope: "device",
72647
+ addonId: null,
72648
+ access: "create",
72649
+ role: "viewer"
72650
+ },
71811
72651
  "pipelineAnalytics.addRetrainFrameFromRecording": {
71812
72652
  capName: "pipeline-analytics",
71813
72653
  capScope: "device",
@@ -74062,6 +74902,41 @@ Object.freeze({
74062
74902
  access: "create",
74063
74903
  role: "admin"
74064
74904
  },
74905
+ "remote.getConfig": {
74906
+ capName: "remote",
74907
+ capScope: "system",
74908
+ addonId: null,
74909
+ access: "view",
74910
+ role: "admin"
74911
+ },
74912
+ "remote.listCommands": {
74913
+ capName: "remote",
74914
+ capScope: "system",
74915
+ addonId: null,
74916
+ access: "view",
74917
+ role: "admin"
74918
+ },
74919
+ "remote.sendCommand": {
74920
+ capName: "remote",
74921
+ capScope: "system",
74922
+ addonId: null,
74923
+ access: "create",
74924
+ role: "admin"
74925
+ },
74926
+ "remote.sendMediaCommand": {
74927
+ capName: "remote",
74928
+ capScope: "system",
74929
+ addonId: null,
74930
+ access: "create",
74931
+ role: "admin"
74932
+ },
74933
+ "remote.setConfig": {
74934
+ capName: "remote",
74935
+ capScope: "system",
74936
+ addonId: null,
74937
+ access: "create",
74938
+ role: "admin"
74939
+ },
74065
74940
  "runningState.getStatus": {
74066
74941
  capName: "running-state",
74067
74942
  capScope: "device",
@@ -74174,6 +75049,13 @@ Object.freeze({
74174
75049
  access: "create",
74175
75050
  role: "admin"
74176
75051
  },
75052
+ "serverManagement.getLaunchOverrides": {
75053
+ capName: "server-management",
75054
+ capScope: "system",
75055
+ addonId: null,
75056
+ access: "view",
75057
+ role: "admin"
75058
+ },
74177
75059
  "serverManagement.getServerPackageStatus": {
74178
75060
  capName: "server-management",
74179
75061
  capScope: "system",
@@ -74195,6 +75077,13 @@ Object.freeze({
74195
75077
  access: "create",
74196
75078
  role: "admin"
74197
75079
  },
75080
+ "serverManagement.setLaunchOverrides": {
75081
+ capName: "server-management",
75082
+ capScope: "system",
75083
+ addonId: null,
75084
+ access: "create",
75085
+ role: "admin"
75086
+ },
74198
75087
  "settingsStore.aggregate": {
74199
75088
  capName: "settings-store",
74200
75089
  capScope: "system",
@@ -75252,6 +76141,41 @@ Object.freeze({
75252
76141
  access: "view",
75253
76142
  role: "viewer"
75254
76143
  },
76144
+ "template.create": {
76145
+ capName: "template",
76146
+ capScope: "system",
76147
+ addonId: null,
76148
+ access: "create",
76149
+ role: "admin"
76150
+ },
76151
+ "template.delete": {
76152
+ capName: "template",
76153
+ capScope: "system",
76154
+ addonId: null,
76155
+ access: "delete",
76156
+ role: "admin"
76157
+ },
76158
+ "template.get": {
76159
+ capName: "template",
76160
+ capScope: "system",
76161
+ addonId: null,
76162
+ access: "view",
76163
+ role: "admin"
76164
+ },
76165
+ "template.list": {
76166
+ capName: "template",
76167
+ capScope: "system",
76168
+ addonId: null,
76169
+ access: "view",
76170
+ role: "admin"
76171
+ },
76172
+ "template.update": {
76173
+ capName: "template",
76174
+ capScope: "system",
76175
+ addonId: null,
76176
+ access: "create",
76177
+ role: "admin"
76178
+ },
75255
76179
  "terminalSession.adoptLegacyMonitor": {
75256
76180
  capName: "terminal-session",
75257
76181
  capScope: "system",
@@ -77562,6 +78486,11 @@ var ACTUATOR_CAP_VOCABULARY = {
77562
78486
  icon: "circle-dot"
77563
78487
  }]
77564
78488
  },
78489
+ "ir-transmitter": {
78490
+ scope: "device",
78491
+ noun: t("IR / RF transmitter", "Trasmettitore IR / RF"),
78492
+ notOperatorFacing: { send: "a raw pulse train is not something an operator composes in an automation; the remote that owns the command table sends it" }
78493
+ },
77565
78494
  control: {
77566
78495
  scope: "device",
77567
78496
  noun: t("Control", "Controllo"),
@@ -78215,6 +79144,100 @@ var APPLIANCE_CAP_VOCABULARY = {
78215
79144
  }
78216
79145
  ]
78217
79146
  },
79147
+ "pet-fountain": {
79148
+ scope: "device",
79149
+ noun: t("Pet fountain", "Fontana per animali"),
79150
+ actions: [
79151
+ {
79152
+ id: "petFountain.pumpOn",
79153
+ method: "setPump",
79154
+ label: t("Pump on", "Pompa accesa"),
79155
+ phrase: t("Start the pump of {device}", "Avvia la pompa di {device}"),
79156
+ icon: "play",
79157
+ args: { on: true }
79158
+ },
79159
+ {
79160
+ id: "petFountain.pumpOff",
79161
+ method: "setPump",
79162
+ label: t("Pump off", "Pompa spenta"),
79163
+ phrase: t("Stop the pump of {device}", "Ferma la pompa di {device}"),
79164
+ icon: "square",
79165
+ args: { on: false }
79166
+ },
79167
+ {
79168
+ id: "petFountain.intervalOn",
79169
+ method: "setPumpInterval",
79170
+ label: t("Pump cycle on", "Ciclo pompa attivo"),
79171
+ phrase: t("Run the pump of {device} on its on/off cycle", "Fai lavorare la pompa di {device} a ciclo acceso/spento"),
79172
+ icon: "timer",
79173
+ args: { on: true }
79174
+ },
79175
+ {
79176
+ id: "petFountain.intervalOff",
79177
+ method: "setPumpInterval",
79178
+ label: t("Pump cycle off", "Ciclo pompa spento"),
79179
+ phrase: t("Run the pump of {device} continuously", "Fai lavorare la pompa di {device} in continuo"),
79180
+ icon: "timer-off",
79181
+ args: { on: false }
79182
+ },
79183
+ {
79184
+ id: "petFountain.pumpOnMinutes",
79185
+ method: "setPumpOnMinutes",
79186
+ label: t("Set pump run time", "Imposta il tempo di lavoro della pompa"),
79187
+ phrase: t("Set the pump of {device} to run {minutes} minutes per cycle", "Imposta la pompa di {device} a lavorare {minutes} minuti per ciclo"),
79188
+ icon: "timer",
79189
+ openArgs: [{
79190
+ key: "minutes",
79191
+ label: t("Minutes", "Minuti"),
79192
+ offer: {
79193
+ kind: "number",
79194
+ min: 0,
79195
+ step: 1,
79196
+ unit: "min"
79197
+ }
79198
+ }]
79199
+ },
79200
+ {
79201
+ id: "petFountain.pumpOffMinutes",
79202
+ method: "setPumpOffMinutes",
79203
+ label: t("Set pump rest time", "Imposta il tempo di riposo della pompa"),
79204
+ phrase: t("Set the pump of {device} to rest {minutes} minutes per cycle", "Imposta la pompa di {device} a riposare {minutes} minuti per ciclo"),
79205
+ icon: "timer-off",
79206
+ openArgs: [{
79207
+ key: "minutes",
79208
+ label: t("Minutes", "Minuti"),
79209
+ offer: {
79210
+ kind: "number",
79211
+ min: 0,
79212
+ step: 1,
79213
+ unit: "min"
79214
+ }
79215
+ }]
79216
+ },
79217
+ {
79218
+ id: "petFountain.resetDailyConsumption",
79219
+ method: "resetDailyConsumption",
79220
+ label: t("Clear daily consumption", "Azzera il consumo giornaliero"),
79221
+ phrase: t("Clear the daily water consumption of {device}", "Azzera il consumo giornaliero di acqua di {device}"),
79222
+ icon: "rotate-ccw"
79223
+ }
79224
+ ],
79225
+ state: [{
79226
+ kind: "boolean",
79227
+ field: "empty",
79228
+ label: t("Tank empty", "Serbatoio vuoto"),
79229
+ whenTrue: t("When the tank of {device} is empty", "Quando il serbatoio di {device} è vuoto"),
79230
+ whenFalse: t("When the tank of {device} is refilled", "Quando il serbatoio di {device} viene riempito"),
79231
+ icon: "droplet"
79232
+ }, {
79233
+ kind: "numeric",
79234
+ field: "waterLevel",
79235
+ quantity: t("the water level", "il livello dell’acqua"),
79236
+ label: t("Water level", "Livello dell’acqua"),
79237
+ unit: "%",
79238
+ icon: "droplets"
79239
+ }]
79240
+ },
78218
79241
  "media-player": {
78219
79242
  scope: "device",
78220
79243
  noun: t("Media player", "Lettore multimediale"),
@@ -80039,6 +81062,7 @@ var SYSTEM_CAP_VOCABULARY = {
80039
81062
  "device-manager": system("the device registry itself — rename, move and remove are administration"),
80040
81063
  "device-provider": system(INTERNAL),
80041
81064
  "device-removal-hook": system(INTERNAL),
81065
+ "node-removal-hook": system(INTERNAL),
80042
81066
  "device-state": system("the runtime-state mirror every trigger already reads through"),
80043
81067
  "display-palette": system("the cluster display palette — one colour table for every client, not a device action"),
80044
81068
  "embedding-encoder": system(ML),
@@ -80078,6 +81102,7 @@ var SYSTEM_CAP_VOCABULARY = {
80078
81102
  "recording-archive": system(STORAGE),
80079
81103
  "recording-export": system("recording exports — requested from the timeline, not an automation step"),
80080
81104
  records: system(INTERNAL),
81105
+ remote: system("the per-device remote setup — authored in the Customize remote editor, sent through the remote UI"),
80081
81106
  "server-management": system(CLUSTER),
80082
81107
  "settings-store": system(INTERNAL),
80083
81108
  "smtp-provider": system(INTERNAL),
@@ -80090,6 +81115,7 @@ var SYSTEM_CAP_VOCABULARY = {
80090
81115
  "storage-provider": system(STORAGE),
80091
81116
  "stream-broker": system(PIPELINE),
80092
81117
  system: system(CLUSTER),
81118
+ template: system("operator-authored templates — edited in their own editor, never actuated"),
80093
81119
  "terminal-session": system(CLUSTER),
80094
81120
  toast: system(UI_PLUMBING),
80095
81121
  training: system(ML),
@@ -80149,7 +81175,7 @@ function projectAction(cap, action) {
80149
81175
  };
80150
81176
  }
80151
81177
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
80152
- DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer;
81178
+ DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer;
80153
81179
  DeviceFeature.BatteryOperated;
80154
81180
  /**
80155
81181
  * How a washer, dryer or dishwasher leaves CamStack.
@@ -81306,6 +82332,16 @@ Object.freeze({
81306
82332
  form: "single",
81307
82333
  optional: false
81308
82334
  }],
82335
+ "irTransmitter.getInfo": [{
82336
+ name: "deviceId",
82337
+ form: "single",
82338
+ optional: false
82339
+ }],
82340
+ "irTransmitter.send": [{
82341
+ name: "deviceId",
82342
+ form: "single",
82343
+ optional: false
82344
+ }],
81309
82345
  "keychain.deleteDeviceScope": [{
81310
82346
  name: "deviceId",
81311
82347
  form: "single",
@@ -81715,6 +82751,36 @@ Object.freeze({
81715
82751
  form: "single",
81716
82752
  optional: false
81717
82753
  }],
82754
+ "petFountain.getStatus": [{
82755
+ name: "deviceId",
82756
+ form: "single",
82757
+ optional: false
82758
+ }],
82759
+ "petFountain.resetDailyConsumption": [{
82760
+ name: "deviceId",
82761
+ form: "single",
82762
+ optional: false
82763
+ }],
82764
+ "petFountain.setPump": [{
82765
+ name: "deviceId",
82766
+ form: "single",
82767
+ optional: false
82768
+ }],
82769
+ "petFountain.setPumpInterval": [{
82770
+ name: "deviceId",
82771
+ form: "single",
82772
+ optional: false
82773
+ }],
82774
+ "petFountain.setPumpOffMinutes": [{
82775
+ name: "deviceId",
82776
+ form: "single",
82777
+ optional: false
82778
+ }],
82779
+ "petFountain.setPumpOnMinutes": [{
82780
+ name: "deviceId",
82781
+ form: "single",
82782
+ optional: false
82783
+ }],
81718
82784
  "pipelineAnalytics.addRetrainFrameFromRecording": [{
81719
82785
  name: "deviceId",
81720
82786
  form: "single",
@@ -82531,6 +83597,31 @@ Object.freeze({
82531
83597
  form: "single",
82532
83598
  optional: true
82533
83599
  }],
83600
+ "remote.getConfig": [{
83601
+ name: "deviceId",
83602
+ form: "single",
83603
+ optional: false
83604
+ }],
83605
+ "remote.listCommands": [{
83606
+ name: "deviceId",
83607
+ form: "single",
83608
+ optional: false
83609
+ }],
83610
+ "remote.sendCommand": [{
83611
+ name: "deviceId",
83612
+ form: "single",
83613
+ optional: false
83614
+ }],
83615
+ "remote.sendMediaCommand": [{
83616
+ name: "deviceId",
83617
+ form: "single",
83618
+ optional: false
83619
+ }],
83620
+ "remote.setConfig": [{
83621
+ name: "deviceId",
83622
+ form: "single",
83623
+ optional: false
83624
+ }],
82534
83625
  "runningState.getStatus": [{
82535
83626
  name: "deviceId",
82536
83627
  form: "single",
@@ -84339,6 +85430,14 @@ DEFAULT_NATIVE_LEASE_SETTINGS.admission;
84339
85430
  String.raw`(?<=^|["'(\s>,\[{])`;
84340
85431
  var MB = 1024 * 1024;
84341
85432
  1024 * MB, 3072 * MB;
85433
+ object({
85434
+ manufacturer: string().optional(),
85435
+ supportedModels: array(string()).optional(),
85436
+ supportedController: string().optional(),
85437
+ commandsEncoding: string(),
85438
+ delay: number().nonnegative().optional(),
85439
+ commands: record(string(), unknown())
85440
+ });
84342
85441
  //#endregion
84343
85442
  //#region src/custom-actions.ts
84344
85443
  /**