@camstack/addon-model-studio 1.1.319 → 1.1.321

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{MotionZonesSettings-Dc4Kv4_B.mjs → MotionZonesSettings-Bb_BJah5.mjs} +2 -2
  3. package/dist/{PrivacyMaskSettings-QuXzMphU.mjs → PrivacyMaskSettings-kCHid95c.mjs} +4 -4
  4. package/dist/{SceneMonitorEditor-DTMWWxoE.mjs → SceneMonitorEditor-BqNgh047.mjs} +3 -3
  5. package/dist/_stub.js +4629 -4284
  6. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BEwAo6V7.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-_UWN0dyv.mjs} +3 -3
  7. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DF4vj9Lw.mjs +26 -0
  8. package/dist/addon-model-studio.css +1 -1
  9. package/dist/{hostInit-C5q4H84T.mjs → hostInit-DuXRhYzb.mjs} +2 -2
  10. package/dist/model-studio.addon.js +1284 -867
  11. package/dist/model-studio.addon.mjs +1284 -867
  12. package/dist/{player-overlays-CGbBkJ3j.mjs → player-overlays-CNVhS2-N.mjs} +1 -1
  13. package/dist/remoteEntry.js +1 -1
  14. package/dist/{responsive-Cw4YAdTr.mjs → responsive-oPhme86z.mjs} +1 -1
  15. package/dist/{scene-monitor-copy-Dz9xLx8-.mjs → scene-monitor-copy-Ct1WyOQx.mjs} +1 -1
  16. package/dist/{square-Dyvwj3m5.mjs → square-WmNfgZ5W.mjs} +1 -1
  17. package/dist/{trash-2-CPAMsWG5.mjs → trash-2-BUJwssR_.mjs} +1 -1
  18. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DWDyoPcG.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CYL3AKrE.mjs} +1 -1
  19. package/package.json +1 -1
  20. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-COf25W99.mjs +0 -26
@@ -5437,6 +5437,14 @@ function object(shape, params) {
5437
5437
  ...normalizeParams(params)
5438
5438
  });
5439
5439
  }
5440
+ function strictObject(shape, params) {
5441
+ return new ZodObject({
5442
+ type: "object",
5443
+ shape,
5444
+ catchall: never(),
5445
+ ...normalizeParams(params)
5446
+ });
5447
+ }
5440
5448
  function looseObject(shape, params) {
5441
5449
  return new ZodObject({
5442
5450
  type: "object",
@@ -5816,7 +5824,7 @@ var ZodIssueCode = {
5816
5824
  var ZodFirstPartyTypeKind;
5817
5825
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5818
5826
  //#endregion
5819
- //#region ../types/dist/sleep-C_u6cEAJ.mjs
5827
+ //#region ../types/dist/sleep-6eG9C8Xl.mjs
5820
5828
  /**
5821
5829
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5822
5830
  * window to float samples (D455).
@@ -8704,65 +8712,6 @@ var MODEL_FORMATS = [
8704
8712
  "pt",
8705
8713
  "gguf"
8706
8714
  ];
8707
- /**
8708
- * Per-call node pinning for `ctx.api` capability calls.
8709
- *
8710
- * A capability call normally resolves to its DEFAULT provider — a `singleton`
8711
- * cap resolves to the hub, a device-scoped cap to the device's owning node. To
8712
- * query a SPECIFIC node's provider instead (e.g. a remote agent's own
8713
- * in-process `platform-probe` hardware, which the hub cannot probe), pin the
8714
- * call to that node.
8715
- *
8716
- * The nodeId rides OUT-OF-BAND in the tRPC call context (NOT in the validated
8717
- * method args), so capability method signatures stay `nodeId`-free — node
8718
- * targeting is a property of the CALL, not of the method. The transport lifts
8719
- * it from `op.context` onto the `CapCallInput.nodeId` field (`ipcParentLink`),
8720
- * and the hub parent's `onUnownedCall` passes it to the `CapRouteResolver`,
8721
- * which classifies a pinned agent node as `agent-child-forward`
8722
- * (`$agent-cap-fwd.forward` → the agent's in-process provider).
8723
- *
8724
- * Usage at a call site:
8725
- *
8726
- * await api.platformProbe.getCapabilities.query(undefined, nodePin(nodeId))
8727
- */
8728
- /** tRPC `op.context` key carrying a per-call node pin. */
8729
- var CAP_NODE_PIN_CONTEXT_KEY = "__camstackNodePin";
8730
- /**
8731
- * Build the tRPC request options that pin a single capability call to `nodeId`.
8732
- * Pass as the second argument to `.query(input, …)` / `.mutate(input, …)`.
8733
- *
8734
- * ## The id is normalised here, and it has to be
8735
- *
8736
- * A forked addon reads its own node from `ctx.kernel.localNodeId`, and inside a
8737
- * worker that value is a RUNNER id — `hub/export-hap`, not `hub`. Routing
8738
- * compares a pin against real node ids, so such a pin matches nothing and the
8739
- * call fails with `no provider registered for cap "…"`. The local-first
8740
- * resolver already guarded against this (`localNodeId.split('/')[0]`), which
8741
- * made the hazard invisible: unpinned calls worked, and only an explicit pin —
8742
- * the thing you reach for when you specifically need THIS node — silently
8743
- * addressed a node that does not exist.
8744
- *
8745
- * Cost of it being missing: `addon-export-hap` pinned `decoder.getInfo` to its
8746
- * own node to read the host's hardware-decode backend. It never once answered,
8747
- * so every HomeKit egress transcode decoded in SOFTWARE — including 4K H.265 —
8748
- * while D67's whole premise was that the decoder addon is the authority on
8749
- * hardware. The warn said `decoding in SOFTWARE` and read as "this node has no
8750
- * hardware", which was false.
8751
- *
8752
- * Normalising in the ONE constructor fixes every caller at once, which is why
8753
- * it is here and not at the call sites.
8754
- */
8755
- function nodePin(nodeId) {
8756
- return { context: { [CAP_NODE_PIN_CONTEXT_KEY]: toNodeId(nodeId) } };
8757
- }
8758
- /**
8759
- * A runner id is `<nodeId>/<addonId>`; a node id has no slash. Taking the head
8760
- * is idempotent, so passing an already-clean id costs nothing.
8761
- */
8762
- function toNodeId(idOrRunnerId) {
8763
- const head = idOrRunnerId.split("/")[0];
8764
- return head === void 0 || head.length === 0 ? idOrRunnerId : head;
8765
- }
8766
8715
  object({
8767
8716
  field: string().min(1),
8768
8717
  on: literal("advance")
@@ -8851,6 +8800,128 @@ function optionalMethod(input, output, options) {
8851
8800
  providerOptional: true
8852
8801
  };
8853
8802
  }
8803
+ /**
8804
+ * Per-call node pinning for `ctx.api` capability calls.
8805
+ *
8806
+ * A capability call normally resolves to its DEFAULT provider — a `singleton`
8807
+ * cap resolves to the hub, a device-scoped cap to the device's owning node. To
8808
+ * query a SPECIFIC node's provider instead (e.g. a remote agent's own
8809
+ * in-process `platform-probe` hardware, which the hub cannot probe), pin the
8810
+ * call to that node.
8811
+ *
8812
+ * The nodeId rides OUT-OF-BAND in the tRPC call context (NOT in the validated
8813
+ * method args), so capability method signatures stay `nodeId`-free — node
8814
+ * targeting is a property of the CALL, not of the method. The transport lifts
8815
+ * it from `op.context` onto the `CapCallInput.nodeId` field (`ipcParentLink`),
8816
+ * and the hub parent's `onUnownedCall` passes it to the `CapRouteResolver`,
8817
+ * which classifies a pinned agent node as `agent-child-forward`
8818
+ * (`$agent-cap-fwd.forward` → the agent's in-process provider).
8819
+ *
8820
+ * Usage at a call site:
8821
+ *
8822
+ * await api.platformProbe.getCapabilities.query(undefined, nodePin(nodeId))
8823
+ */
8824
+ /** tRPC `op.context` key carrying a per-call node pin. */
8825
+ var CAP_NODE_PIN_CONTEXT_KEY = "__camstackNodePin";
8826
+ /**
8827
+ * Build the tRPC request options that pin a single capability call to `nodeId`.
8828
+ * Pass as the second argument to `.query(input, …)` / `.mutate(input, …)`.
8829
+ *
8830
+ * ## The id is normalised here, and it has to be
8831
+ *
8832
+ * A forked addon reads its own node from `ctx.kernel.localNodeId`, and inside a
8833
+ * worker that value is a RUNNER id — `hub/export-hap`, not `hub`. Routing
8834
+ * compares a pin against real node ids, so such a pin matches nothing and the
8835
+ * call fails with `no provider registered for cap "…"`. The local-first
8836
+ * resolver already guarded against this (`localNodeId.split('/')[0]`), which
8837
+ * made the hazard invisible: unpinned calls worked, and only an explicit pin —
8838
+ * the thing you reach for when you specifically need THIS node — silently
8839
+ * addressed a node that does not exist.
8840
+ *
8841
+ * Cost of it being missing: `addon-export-hap` pinned `decoder.getInfo` to its
8842
+ * own node to read the host's hardware-decode backend. It never once answered,
8843
+ * so every HomeKit egress transcode decoded in SOFTWARE — including 4K H.265 —
8844
+ * while D67's whole premise was that the decoder addon is the authority on
8845
+ * hardware. The warn said `decoding in SOFTWARE` and read as "this node has no
8846
+ * hardware", which was false.
8847
+ *
8848
+ * Normalising in the ONE constructor fixes every caller at once, which is why
8849
+ * it is here and not at the call sites.
8850
+ */
8851
+ function nodePin(nodeId) {
8852
+ return { context: { [CAP_NODE_PIN_CONTEXT_KEY]: toNodeId(nodeId) } };
8853
+ }
8854
+ /**
8855
+ * A runner id is `<nodeId>/<addonId>`; a node id has no slash. Taking the head
8856
+ * is idempotent, so passing an already-clean id costs nothing.
8857
+ */
8858
+ function toNodeId(idOrRunnerId) {
8859
+ const head = idOrRunnerId.split("/")[0];
8860
+ return head === void 0 || head.length === 0 ? idOrRunnerId : head;
8861
+ }
8862
+ /**
8863
+ * `addon-pages-source` — collection cap exposing per-provider raw page
8864
+ * declarations. Every addon that contributes a UI page registers a
8865
+ * provider here. The hub-side singleton aggregator (`addon-pages` cap,
8866
+ * see `addon-pages.cap.ts`) walks this collection, stamps versioned
8867
+ * `bundleUrl` values, and returns the enriched `AddonPageInfo[]` list
8868
+ * that admin-ui consumes.
8869
+ *
8870
+ * The split exists because the public listing has a different output
8871
+ * shape than the per-provider raw declarations, and we want both ends
8872
+ * to flow through codegen instead of relying on a hand-written wrapper.
8873
+ */
8874
+ var AddonPageDeclarationSchema = object({
8875
+ id: string(),
8876
+ label: string(),
8877
+ icon: string(),
8878
+ path: string(),
8879
+ /**
8880
+ * Module Federation remote name — must match the `name` field on the
8881
+ * page addon's `federation()` plugin config. Used by admin-ui's
8882
+ * `<AddonPageLoader>` to call `loadRemote('<remoteName>/page')`.
8883
+ * Conventionally `addon_<id>_page` (snake_case; MF names cannot
8884
+ * contain hyphens).
8885
+ */
8886
+ remoteName: string(),
8887
+ /**
8888
+ * Bundle filename inside the addon's `dist/` dir served at
8889
+ * `/api/addon-pages/<addonId>/<bundle>`. With Module Federation this
8890
+ * is always `'remoteEntry.js'`; the value is kept on the metadata so
8891
+ * the static-file route can compute an mtime-based cache-buster URL
8892
+ * without a separate filesystem stat.
8893
+ */
8894
+ bundle: string(),
8895
+ /**
8896
+ * Sidebar section this page docks into. Well-known ids: `'detection'`,
8897
+ * `'cluster'`, `'administration'` — the page renders inside that group.
8898
+ * Any OTHER string creates (or joins) a custom section rendered after
8899
+ * the built-in groups; its label comes from `sectionLabel` (first
8900
+ * declaration wins), falling back to the id. Absent → the legacy
8901
+ * "Addon Pages" group.
8902
+ */
8903
+ section: string().optional(),
8904
+ /** Display label for a CUSTOM `section` id (ignored for well-known ids). */
8905
+ sectionLabel: string().optional()
8906
+ });
8907
+ var addonPagesSourceCapability = {
8908
+ name: "addon-pages-source",
8909
+ scope: "system",
8910
+ mode: "collection",
8911
+ internal: true,
8912
+ methods: {
8913
+ /**
8914
+ * `internal: true` did not gate the mount (see the 2026-08-26 note on
8915
+ * `data-store-provider`) — this was reachable on the AppRouter by ANY
8916
+ * authenticated session at the default `auth: 'protected'`. The only
8917
+ * consumer, the `addon-pages-aggregator` builtin, reads it via
8918
+ * `ctx.capabilities.getCollection('addon-pages-source')` — LOCAL-PROCESS
8919
+ * only, never tRPC (per `ctx.capabilities` seeing only the local
8920
+ * process). The public, enriched listing admin-ui actually consumes is
8921
+ * the separate `addon-pages` cap, unaffected by this change.
8922
+ */
8923
+ listPages: method(_void(), array(AddonPageDeclarationSchema).readonly(), { auth: "admin" }) }
8924
+ };
8854
8925
  var StaticDirOutputSchema$1 = object({ staticDir: string() });
8855
8926
  var VersionOutputSchema$1 = object({ version: string() });
8856
8927
  method(_void(), StaticDirOutputSchema$1, { auth: "admin" }), method(_void(), VersionOutputSchema$1, { auth: "admin" });
@@ -8876,6 +8947,27 @@ function customAction(input, output, options) {
8876
8947
  ...options?.caller ? { caller: "required" } : {}
8877
8948
  };
8878
8949
  }
8950
+ /**
8951
+ * The pipeline step-input shape and the run-result bridge, in a module that
8952
+ * imports nothing but zod and types.
8953
+ *
8954
+ * WHY A SEPARATE FILE (addon footprint, D28): both were declared in
8955
+ * `pipeline-executor.cap.ts`, whose import evaluates the whole executor schema
8956
+ * graph. An addon that only needs these two (the benchmark's `runPipelineTest`
8957
+ * action) paid ~130 MB of heap at load. `pipeline-executor.cap.ts` re-exports
8958
+ * them, so every existing import keeps working; addon server code takes them
8959
+ * from `@camstack/types/addon`.
8960
+ */
8961
+ var PipelineStepInputSchema = lazy(() => object({
8962
+ addonId: string(),
8963
+ modelId: string().optional(),
8964
+ enabled: boolean().default(true),
8965
+ children: array(PipelineStepInputSchema).optional(),
8966
+ settings: record(string(), unknown()).optional(),
8967
+ jumpDeviceKey: string().optional()
8968
+ }));
8969
+ /** Typed bridge to the recursive `FrameResult` graph; validation is structural. */
8970
+ var PipelineRunResultBridge = custom();
8879
8971
  var StaticDirOutputSchema = object({ staticDir: string() });
8880
8972
  var VersionOutputSchema = object({ version: string() });
8881
8973
  method(_void(), StaticDirOutputSchema, { auth: "admin" }), method(_void(), VersionOutputSchema, { auth: "admin" });
@@ -9071,6 +9163,7 @@ var CAP_NAMES = Object.freeze([
9071
9163
  "osd",
9072
9164
  "osd-manager",
9073
9165
  "pet-feeder",
9166
+ "pet-fountain",
9074
9167
  "pipeline-analytics",
9075
9168
  "pipeline-executor",
9076
9169
  "pipeline-orchestrator",
@@ -10350,6 +10443,56 @@ Object.freeze({
10350
10443
  "valueType": "number"
10351
10444
  }
10352
10445
  ],
10446
+ "pet-fountain": [
10447
+ {
10448
+ "path": "waterLevel",
10449
+ "valueType": "number"
10450
+ },
10451
+ {
10452
+ "path": "waterVolume",
10453
+ "valueType": "number"
10454
+ },
10455
+ {
10456
+ "path": "empty",
10457
+ "valueType": "boolean"
10458
+ },
10459
+ {
10460
+ "path": "pumpRunning",
10461
+ "valueType": "boolean"
10462
+ },
10463
+ {
10464
+ "path": "pumpIntervalEnabled",
10465
+ "valueType": "boolean"
10466
+ },
10467
+ {
10468
+ "path": "pumpOnTime",
10469
+ "valueType": "number"
10470
+ },
10471
+ {
10472
+ "path": "pumpOffTime",
10473
+ "valueType": "number"
10474
+ },
10475
+ {
10476
+ "path": "lastDrink",
10477
+ "valueType": "number"
10478
+ },
10479
+ {
10480
+ "path": "currentHourDrink",
10481
+ "valueType": "number"
10482
+ },
10483
+ {
10484
+ "path": "last24hDrink",
10485
+ "valueType": "number"
10486
+ },
10487
+ {
10488
+ "path": "todayDrink",
10489
+ "valueType": "number"
10490
+ },
10491
+ {
10492
+ "path": "error",
10493
+ "valueType": "string"
10494
+ }
10495
+ ],
10353
10496
  "power-meter": [
10354
10497
  {
10355
10498
  "path": "power",
@@ -10887,7 +11030,7 @@ object({
10887
11030
  params: record(string(), union([string(), number()])).optional()
10888
11031
  });
10889
11032
  //#endregion
10890
- //#region ../types/dist/err-msg-BCdlR2Li.mjs
11033
+ //#region ../types/dist/err-msg-DWXWc0Di.mjs
10891
11034
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
10892
11035
  DeviceType["Camera"] = "camera";
10893
11036
  DeviceType["Hub"] = "hub";
@@ -10979,6 +11122,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
10979
11122
  * native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
10980
11123
  * integrations sharing the same food/desiccant/hopper surface. */
10981
11124
  DeviceType["PetFeeder"] = "pet-feeder";
11125
+ /** Pet water fountain — tank level, water drunk, pump and its duty cycle.
11126
+ * Installed with the `pet-fountain` cap. Reaches CamStack as loose entities
11127
+ * of a container and is BUILT as a composed device (D967). */
11128
+ DeviceType["PetFountain"] = "pet-fountain";
10982
11129
  /** Built-in dishwasher — program lifecycle, door / remote-start gates,
10983
11130
  * salt and rinse-aid levels. Installed with the `dishwasher` cap.
10984
11131
  * Sources: native Bosch Home Connect, reusable by similar integrations.
@@ -11239,7 +11386,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
11239
11386
  return DeviceRole;
11240
11387
  }({});
11241
11388
  //#endregion
11242
- //#region ../types/dist/composition-bIBW5_13.mjs
11389
+ //#region ../types/dist/composition-kSuOifuG.mjs
11243
11390
  /**
11244
11391
  * The ffmpeg build every CamStack node downloads, per platform and arch.
11245
11392
  *
@@ -12324,12 +12471,28 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
12324
12471
  ])
12325
12472
  })
12326
12473
  ]);
12327
- var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
12474
+ var forwardArgUnion = union([
12475
+ string(),
12476
+ number(),
12477
+ boolean(),
12478
+ strictObject({ ["$input"]: string().min(1) }),
12479
+ record(string().min(1), lazy(() => forwardArgUnion))
12480
+ ]);
12481
+ var CompositionForwardArgSchema = forwardArgUnion;
12482
+ /**
12483
+ * `forward` (D659, amended by D967): one method of a BUILT capability is one
12484
+ * call of `cap.method` on `source`. Without `args` the built method's input
12485
+ * passes through minus `deviceId`; with `args` the template IS the source's
12486
+ * whole input. `deviceId` is always the source's own, never an argument.
12487
+ */
12488
+ var CompositionForwardCommandSchema = object({
12328
12489
  kind: literal("forward"),
12329
12490
  source: CompositionSourceRefSchema,
12330
12491
  cap: string().min(1),
12331
- method: string().min(1)
12332
- }), CompositionCodeSourceSchema]);
12492
+ method: string().min(1),
12493
+ args: record(string().min(1), CompositionForwardArgSchema).optional()
12494
+ });
12495
+ var CompositionCommandTargetSchema = discriminatedUnion("kind", [CompositionForwardCommandSchema, CompositionCodeSourceSchema]);
12333
12496
  /** An item key inside an item-array cap (`consumables.items[<key>]`). */
12334
12497
  var COMPOSITION_ITEM_KEY_RE = /^[a-z0-9][a-z0-9-]{0,47}$/;
12335
12498
  /**
@@ -12339,7 +12502,13 @@ var COMPOSITION_ITEM_KEY_RE = /^[a-z0-9][a-z0-9-]{0,47}$/;
12339
12502
  */
12340
12503
  var CompositionItemEntrySchema = object({
12341
12504
  label: string().min(1).max(80),
12342
- fields: record(string().min(1), CompositionFieldSourceSchema)
12505
+ fields: record(string().min(1), CompositionFieldSourceSchema),
12506
+ /**
12507
+ * What the cap's `reset` does for THIS item (consumables). Present = the item
12508
+ * is resettable and a `reset` call naming its key forwards here. The item key
12509
+ * selects the command, so it is never an argument: there is no pass-through.
12510
+ */
12511
+ reset: CompositionForwardCommandSchema.optional()
12343
12512
  });
12344
12513
  var CompositionFeatureSchema = discriminatedUnion("kind", [object({
12345
12514
  kind: literal("fields"),
@@ -12351,7 +12520,7 @@ var CompositionFeatureSchema = discriminatedUnion("kind", [object({
12351
12520
  * owns the WHOLE array field: the composed value holds exactly these items.
12352
12521
  */
12353
12522
  items: record(string().regex(COMPOSITION_ITEM_KEY_RE), CompositionItemEntrySchema).refine((items) => Object.keys(items).length <= 16, { message: `at most 16 items` }).optional(),
12354
- /** RESERVED for slice 3; refused by the validator when non-empty. */
12523
+ /** Method name → what serves it. Only a BUILT capability takes commands (D967). */
12355
12524
  commands: record(string().min(1), CompositionCommandTargetSchema).optional()
12356
12525
  }), object({
12357
12526
  kind: literal("passthrough"),
@@ -16430,120 +16599,478 @@ object({
16430
16599
  lastError: string().nullable()
16431
16600
  });
16432
16601
  /**
16433
- * `addon-pages` — system-scoped singleton aggregator cap. Public-facing
16434
- * surface that admin-ui consumes through `useAddonPagesListPages()`.
16602
+ * notification-output — canonical, capability-gated notification delivery.
16435
16603
  *
16436
- * The provider iterates every `addon-pages-source` (collection) provider
16437
- * and emits `AddonPageInfo[]` enriched with versioned `bundleUrl` strings
16438
- * pointing at `/api/addon-pages/<addonId>/<bundle>?v=<mtime>`. The
16439
- * filesystem `mtime` cache-buster lets the browser pick up addon
16440
- * rebuilds without manual reload.
16604
+ * Apprise-derived model (see
16605
+ * `docs/superpowers/specs/2026-07-03-notification-output-notifier-matrix.md`):
16606
+ * callers emit ONE canonical `Notification`; each provider declares a
16607
+ * per-kind capability descriptor (`TargetKind`), and the pure degrade
16608
+ * engine (`@camstack/types` `prepareNotification`) transcodes / degrades the
16609
+ * message to what the kind supports — callers never special-case a service.
16441
16610
  *
16442
- * The hub-local builtin `addon-pages-aggregator` (see
16443
- * `@camstack/system/builtins/addon-pages-aggregator`) registers the
16444
- * provider. Splitting the public aggregator from the raw collection
16445
- * keeps both ends in codegen — there's no hand-written
16446
- * `addon-pages.router.ts` wrapper anymore.
16611
+ * DESIGN DECISIONS (locked):
16612
+ * - Target CRUD lives on THIS cap (`upsertTarget` / `deleteTarget` /
16613
+ * `setTargetEnabled`), each provider persisting via the `settings-store`
16614
+ * cap. Rationale: the admin UI needs one uniform surface across the
16615
+ * notifiers addon AND the HA addon; the addon-`globalSettingsSchema`-array
16616
+ * alternative would fork the UI per addon and cannot host the
16617
+ * discovery→adopt flow.
16618
+ * - `listTargetKinds` / `listTargets` / `discoverTargets` return arrays →
16619
+ * the generated cap-mount auto-`concatCollection`-fans them across every
16620
+ * registered provider (notifiers addon + HA addon) so one catalog is
16621
+ * routable. `send` / `testTarget` / CRUD route to ONE provider by the
16622
+ * `addonId` the generated collection router extracts from the call input.
16623
+ * - `Attachment.bytes` is `Uint8Array`. Transport-safe: superjson (the tRPC
16624
+ * transformer) + UDS MsgPack both round-trip typed arrays — already used by
16625
+ * `storage` / `storage-provider` / `recording` caps over the same path. No
16626
+ * base64 fallback needed.
16627
+ *
16628
+ * TODO (deferred, closed-set change — separate decision): add
16629
+ * `providerKind: 'notify'` so notification providers surface on the unified
16630
+ * admin "Integrations" page.
16447
16631
  */
16448
- var AddonPageDeclarationSchema$1 = object({
16449
- id: string(),
16450
- label: string(),
16451
- icon: string(),
16452
- path: string(),
16453
- remoteName: string(),
16454
- bundle: string(),
16455
- section: string().optional(),
16456
- sectionLabel: string().optional()
16457
- });
16458
- var AddonPageInfoSchema = object({
16459
- addonId: string(),
16460
- page: AddonPageDeclarationSchema$1,
16461
- bundleUrl: string()
16462
- });
16463
- method(_void(), array(AddonPageInfoSchema).readonly());
16464
16632
  /**
16465
- * `addon-pages-source` — collection cap exposing per-provider raw page
16466
- * declarations. Every addon that contributes a UI page registers a
16467
- * provider here. The hub-side singleton aggregator (`addon-pages` cap,
16468
- * see `addon-pages.cap.ts`) walks this collection, stamps versioned
16469
- * `bundleUrl` values, and returns the enriched `AddonPageInfo[]` list
16470
- * that admin-ui consumes.
16633
+ * Zentik-derived typed-media enum — the superset across every kind. Each
16634
+ * adapter picks what it supports and the degrade engine filters the rest.
16635
+ */
16636
+ var AttachmentMediaTypeSchema = _enum([
16637
+ "image",
16638
+ "video",
16639
+ "gif",
16640
+ "audio",
16641
+ "icon"
16642
+ ]);
16643
+ /**
16644
+ * A single attachment. Exactly one of `url` (remote source, most adapters
16645
+ * prefer this) or `bytes` (inline source; required for Pushover-style
16646
+ * bytes-only kinds) MUST be present — the degrade engine expresses a
16647
+ * url→bytes fetch as a `needsFetch` directive the adapter executes.
16648
+ */
16649
+ var AttachmentSchema = object({
16650
+ mediaType: AttachmentMediaTypeSchema,
16651
+ url: string().optional(),
16652
+ bytes: _instanceof(Uint8Array).optional(),
16653
+ mime: string().optional(),
16654
+ name: string().optional()
16655
+ }).refine((a) => a.url !== void 0 || a.bytes !== void 0, { message: "Attachment requires either `url` or `bytes`" });
16656
+ var NotificationFormatSchema = _enum([
16657
+ "text",
16658
+ "markdown",
16659
+ "html"
16660
+ ]);
16661
+ /**
16662
+ * The CLOSED icon vocabulary an action button may use.
16471
16663
  *
16472
- * The split exists because the public listing has a different output
16473
- * shape than the per-provider raw declarations, and we want both ends
16474
- * to flow through codegen instead of relying on a hand-written wrapper.
16664
+ * A closed set, not a free string, and that is the whole point: an arbitrary
16665
+ * icon name is one that ntfy renders, zentik silently drops, and nobody
16666
+ * notices — the same class of gap as a zone vocabulary nothing produced
16667
+ * ([D35](../../../docs/decisions/adr-0035.md)). Every adapter maps this set or
16668
+ * declares `actionIcons: false` and the degrade engine strips the field.
16669
+ *
16670
+ * Named by INTENT, never by glyph. "check" would tie the vocabulary to one
16671
+ * renderer's icon set; "acknowledge" survives an adapter that draws it
16672
+ * differently.
16673
+ *
16674
+ * ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
16675
+ *
16676
+ * These names are for US. **No adapter may forward one verbatim.** Each maps
16677
+ * the whole set onto its own renderer's vocabulary through a
16678
+ * `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
16679
+ * fallback, so adding a member here fails every adapter's build until someone
16680
+ * decides its glyph, which is the only place that decision can be made
16681
+ * honestly.
16682
+ *
16683
+ * This paragraph is the bug. Zentik declared `actionIcons: true` and passed
16684
+ * `disarm` straight through; iOS feeds that string to
16685
+ * `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
16686
+ * and every snooze and alarm button arrived BLANK. A pass-through is not a
16687
+ * mapping, and "the field is documented" is not "the value renders".
16688
+ *
16689
+ * Adding a member is TRAIN-BOUND. The enum lives in the published
16690
+ * `@camstack/server` closure and the cap seam validates against the HUB's copy,
16691
+ * so an addon that emits a token the running hub does not know does not lose an
16692
+ * icon — its whole `send` fails Zod validation and the notification never
16693
+ * arrives. Never emit a new token from an addon before the train carrying it.
16475
16694
  */
16476
- var AddonPageDeclarationSchema = object({
16695
+ var NotificationActionIconSchema = _enum([
16696
+ "acknowledge",
16697
+ "dismiss",
16698
+ "silence",
16699
+ "snooze",
16700
+ "view",
16701
+ "play",
16702
+ "open",
16703
+ "close",
16704
+ "lock",
16705
+ "unlock",
16706
+ "arm",
16707
+ "arm-home",
16708
+ "arm-away",
16709
+ "arm-night",
16710
+ "disarm",
16711
+ "light",
16712
+ "alert",
16713
+ "camera"
16714
+ ]);
16715
+ /** A single tap-through action button. */
16716
+ var NotificationActionSchema = object({
16477
16717
  id: string(),
16478
16718
  label: string(),
16479
- icon: string(),
16480
- path: string(),
16481
- /**
16482
- * Module Federation remote name — must match the `name` field on the
16483
- * page addon's `federation()` plugin config. Used by admin-ui's
16484
- * `<AddonPageLoader>` to call `loadRemote('<remoteName>/page')`.
16485
- * Conventionally `addon_<id>_page` (snake_case; MF names cannot
16486
- * contain hyphens).
16487
- */
16488
- remoteName: string(),
16719
+ url: string().optional(),
16720
+ /** Dropped by the degrade engine for a kind with `caps.actionIcons: false`. */
16721
+ icon: NotificationActionIconSchema.optional(),
16489
16722
  /**
16490
- * Bundle filename inside the addon's `dist/` dir served at
16491
- * `/api/addon-pages/<addonId>/<bundle>`. With Module Federation this
16492
- * is always `'remoteEntry.js'`; the value is kept on the metadata so
16493
- * the static-file route can compute an mtime-based cache-buster URL
16494
- * without a separate filesystem stat.
16723
+ * Renders in a warning style where the notifier supports it.
16724
+ *
16725
+ * A HINT, never a gate. The callback's authority is its token and nothing
16726
+ * else — see `notification-center/action-token.ts` for what that does and
16727
+ * does not buy.
16495
16728
  */
16496
- bundle: string(),
16729
+ destructive: boolean().optional(),
16497
16730
  /**
16498
- * Sidebar section this page docks into. Well-known ids: `'detection'`,
16499
- * `'cluster'`, `'administration'` — the page renders inside that group.
16500
- * Any OTHER string creates (or joins) a custom section rendered after
16501
- * the built-in groups; its label comes from `sectionLabel` (first
16502
- * declaration wins), falling back to the id. Absent → the legacy
16503
- * "Addon Pages" group.
16731
+ * How the tap should REACH the url.
16732
+ *
16733
+ * `navigate` (absent, and every button authored before this field) opens it:
16734
+ * the phone leaves the notification and shows whatever the callback returns.
16735
+ * That is right for a button whose answer the operator wants to read.
16736
+ *
16737
+ * `background` fires it as a POST and stays put. It exists for the buttons
16738
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
16739
+ * an answer to the notification, and being thrown into a browser tab to
16740
+ * confirm it costs more attention than the notification did. A backend that
16741
+ * cannot do a background call renders it as an ordinary link (the adapters
16742
+ * fall back rather than dropping the button), so this is a preference, never
16743
+ * a requirement.
16504
16744
  */
16505
- section: string().optional(),
16506
- /** Display label for a CUSTOM `section` id (ignored for well-known ids). */
16507
- sectionLabel: string().optional()
16745
+ mode: _enum(["navigate", "background"]).optional()
16508
16746
  });
16509
- var addonPagesSourceCapability = {
16510
- name: "addon-pages-source",
16511
- scope: "system",
16512
- mode: "collection",
16513
- internal: true,
16514
- methods: {
16515
- /**
16516
- * `internal: true` did not gate the mount (see the 2026-08-26 note on
16517
- * `data-store-provider`) — this was reachable on the AppRouter by ANY
16518
- * authenticated session at the default `auth: 'protected'`. The only
16519
- * consumer, the `addon-pages-aggregator` builtin, reads it via
16520
- * `ctx.capabilities.getCollection('addon-pages-source')` — LOCAL-PROCESS
16521
- * only, never tRPC (per `ctx.capabilities` seeing only the local
16522
- * process). The public, enriched listing admin-ui actually consumes is
16523
- * the separate `addon-pages` cap, unaffected by this change.
16524
- */
16525
- listPages: method(_void(), array(AddonPageDeclarationSchema).readonly(), { auth: "admin" }) }
16526
- };
16527
- var AddonHttpRouteSchema = object({
16528
- method: _enum([
16529
- "GET",
16530
- "POST",
16531
- "PUT",
16532
- "DELETE",
16533
- "PATCH"
16747
+ /** A delivery parameter value: what a notifier declared it takes. */
16748
+ var DeliveryParamValueSchema = union([
16749
+ string(),
16750
+ number(),
16751
+ boolean()
16752
+ ]);
16753
+ /**
16754
+ * One extra delivery parameter a notifier KIND declares (D938). A rule that
16755
+ * addresses a target of that kind may set it; a kind that declares nothing is
16756
+ * never handed one. The admin UI derives its control from this descriptor —
16757
+ * no editor knows a service by name.
16758
+ *
16759
+ * Optional fields are `.optional()`, never `.default()` (a Zod default does not
16760
+ * run on the addon cap path).
16761
+ */
16762
+ var DeliveryParamSchema = object({
16763
+ key: string().min(1),
16764
+ label: string(),
16765
+ /** i18n key of the label, resolved by the declaring addon's namespace. */
16766
+ labelKey: string().optional(),
16767
+ type: _enum([
16768
+ "enum",
16769
+ "number",
16770
+ "boolean",
16771
+ "string"
16534
16772
  ]),
16535
- path: string(),
16536
- access: _enum([
16537
- "public",
16538
- "authenticated",
16539
- "admin"
16540
- ]).optional(),
16541
- description: string().optional(),
16542
- /** The hub limits this route per client address before the handler runs. */
16543
- rateLimit: _enum(["auth"]).optional()
16773
+ /** `enum` only: the closed set of accepted values. */
16774
+ options: array(object({
16775
+ value: string(),
16776
+ label: string()
16777
+ })).optional(),
16778
+ /** `number` only. */
16779
+ min: number().optional(),
16780
+ max: number().optional(),
16781
+ /** What the notifier does when the rule sets nothing; shown as the placeholder. */
16782
+ default: DeliveryParamValueSchema.optional()
16544
16783
  });
16545
16784
  /**
16546
- * Cross-process route invocation envelope. The hub captures the
16785
+ * The canonical notification. `body` is the only hard field (Apprise model).
16786
+ * `priority` is a 5-level ORDINAL (1=lowest … 3=normal(default) … 5=urgent),
16787
+ * NOT a fixed severity enum — each kind declares its own `caps.levels` and
16788
+ * the adapter maps this ordinal onto its native level. `level?` is an
16789
+ * optional kind-native level id (`emergency`, `silent`, …) that overrides
16790
+ * `priority` for that one target.
16791
+ */
16792
+ var NotificationSchema = object({
16793
+ body: string(),
16794
+ title: string().optional(),
16795
+ format: NotificationFormatSchema.default("text"),
16796
+ priority: number().int().min(1).max(5).default(3),
16797
+ level: string().optional(),
16798
+ attachments: array(AttachmentSchema).optional(),
16799
+ clickUrl: string().optional(),
16800
+ actions: array(NotificationActionSchema).optional(),
16801
+ sound: string().optional(),
16802
+ ttl: number().optional(),
16803
+ tag: string().optional(),
16804
+ deviceId: number().optional(),
16805
+ eventId: string().optional(),
16806
+ metadata: record(string(), unknown()).optional(),
16807
+ /**
16808
+ * Values for the parameters the target's kind DECLARES in
16809
+ * {@link TargetKindSchema} `deliveryParams`. Already validated against the
16810
+ * declaration by the sender; a notifier reads only the keys it declared.
16811
+ */
16812
+ delivery: record(string(), DeliveryParamValueSchema).optional()
16813
+ });
16814
+ /** One declared native severity/priority level for a kind. */
16815
+ var TargetKindLevelSchema = object({
16816
+ id: string(),
16817
+ label: string(),
16818
+ /** Which canonical priority (1..5) this level maps to. `null` = qualitative-only. */
16819
+ ordinal: number().int().min(1).max(5).nullable(),
16820
+ flags: object({
16821
+ critical: boolean().optional(),
16822
+ silent: boolean().optional(),
16823
+ noPush: boolean().optional()
16824
+ }).optional(),
16825
+ /** e.g. Pushover `emergency` requires `retry` / `expire`. */
16826
+ requires: array(string()).optional(),
16827
+ description: string().optional()
16828
+ });
16829
+ /** The full capability block consulted before dispatch. */
16830
+ var TargetKindCapsSchema = object({
16831
+ attachments: object({
16832
+ mediaTypes: array(AttachmentMediaTypeSchema),
16833
+ mode: _enum([
16834
+ "url",
16835
+ "bytes",
16836
+ "both"
16837
+ ]),
16838
+ max: number().int().nonnegative(),
16839
+ maxBytes: number().int().positive().optional()
16840
+ }),
16841
+ /** Max action buttons (0 = none). */
16842
+ actions: number().int().nonnegative(),
16843
+ /**
16844
+ * Whether this kind renders a per-action ICON.
16845
+ *
16846
+ * `.optional()`, deliberately NOT `.default(false)`: a Zod default does not
16847
+ * run on the addon cap path — three production failures in one day taught
16848
+ * this repo that once. Absent is read as false by the degrade engine, which
16849
+ * is the safe direction: an icon that is not rendered costs nothing, an icon
16850
+ * assumed and dropped costs the operator's trust in the field.
16851
+ */
16852
+ actionIcons: boolean().optional(),
16853
+ levels: array(TargetKindLevelSchema),
16854
+ format: array(NotificationFormatSchema),
16855
+ clickUrl: boolean(),
16856
+ sound: boolean(),
16857
+ ttl: boolean(),
16858
+ bodyMaxLen: number().int().positive()
16859
+ });
16860
+ /**
16861
+ * `configSchema` is a `ConfigUISchema` tree passed through to the admin
16862
+ * FormBuilder. Stored as `z.unknown()` at the cap seam (mirrors
16863
+ * `device-provider.getChildCreationSchema` `CreationSchemaOutputSchema`) —
16864
+ * the union is large and not meant for runtime validation here; the exported
16865
+ * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
16866
+ */
16867
+ var ConfigSchemaPassthrough$3 = unknown();
16868
+ var TargetKindSchema = object({
16869
+ kind: string(),
16870
+ label: string(),
16871
+ icon: string(),
16872
+ /** Stamped by each provider so the concat-fanned catalog stays routable. */
16873
+ addonId: string(),
16874
+ /**
16875
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
16876
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
16877
+ * when the addon bundles no icon for that kind — the client then falls back
16878
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
16879
+ *
16880
+ * Root-relative on purpose: it resolves against whatever origin serves a web
16881
+ * client, and a native client joins it onto its own hub base.
16882
+ *
16883
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
16884
+ * field that survived only because the runtime cap-router forwards provider
16885
+ * output verbatim — so every consumer had to re-declare it by hand to stop
16886
+ * its own Zod parse from stripping it, and the whole arrangement would have
16887
+ * broken silently the moment output validation was tightened anywhere.
16888
+ */
16889
+ iconUrl: string().optional(),
16890
+ /**
16891
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
16892
+ *
16893
+ * The server knows this and therefore says it, because the client cannot
16894
+ * safely guess: a React-Native client renders SVG and raster through two
16895
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
16896
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
16897
+ * placeholder glyph for every vector icon while the web build looked fine.
16898
+ *
16899
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
16900
+ * not been updated — a client that cannot determine the type should prefer
16901
+ * its raster path, which is the safe default for an unknown image.
16902
+ */
16903
+ iconMediaType: string().optional(),
16904
+ configSchema: ConfigSchemaPassthrough$3,
16905
+ /**
16906
+ * The config keys that decide WHERE this kind's secrets are sent (server,
16907
+ * base URL, instance, chat, recipient). A save that changes any of them
16908
+ * while leaving a secret redacted is refused by the provider (D634), so an
16909
+ * editor uses this to ask for the secret on exactly those edits instead of
16910
+ * on every edit.
16911
+ *
16912
+ * Optional: absent from a provider that holds no secret (the Home Assistant
16913
+ * kinds) and from a provider older than this field — an editor that finds
16914
+ * it absent must assume ANY edit may need the secret.
16915
+ */
16916
+ destinationKeys: array(string()).optional(),
16917
+ supportsDiscovery: boolean(),
16918
+ /**
16919
+ * Extra delivery parameters a rule may set for a target of this kind (D938).
16920
+ * Absent = none; the rule editor then offers nothing.
16921
+ */
16922
+ deliveryParams: array(DeliveryParamSchema).optional(),
16923
+ caps: TargetKindCapsSchema
16924
+ });
16925
+ /**
16926
+ * A persisted target. `config` holds secrets; providers REDACT secret fields
16927
+ * (return a presence marker only) when serving `listTargets` — never
16928
+ * round-trip a stored secret to the UI.
16929
+ */
16930
+ var TargetSchema = object({
16931
+ id: string(),
16932
+ name: string(),
16933
+ kind: string(),
16934
+ addonId: string(),
16935
+ enabled: boolean(),
16936
+ config: record(string(), unknown())
16937
+ });
16938
+ /** A discovery-surfaced candidate (config is partial + non-secret). */
16939
+ var DiscoveredTargetSchema = object({
16940
+ kind: string(),
16941
+ suggestedName: string(),
16942
+ config: record(string(), unknown())
16943
+ });
16944
+ /** The degrade engine's report — what was resolved / dropped / degraded. */
16945
+ var RenderedAsSchema = object({
16946
+ level: string(),
16947
+ format: NotificationFormatSchema,
16948
+ attachmentsSent: number().int().nonnegative(),
16949
+ actionsSent: number().int().nonnegative(),
16950
+ truncated: boolean(),
16951
+ dropped: array(string())
16952
+ });
16953
+ var SendResultSchema = object({
16954
+ success: boolean(),
16955
+ error: string().optional(),
16956
+ renderedAs: RenderedAsSchema.optional()
16957
+ });
16958
+ /** Same shape as SendResult — kept as a distinct name for the test panel. */
16959
+ var TestResultSchema = SendResultSchema;
16960
+ /**
16961
+ * Pre-save credential probe against a partial (unsaved) target config.
16962
+ * `resolvedUrl` never includes secrets (token stripped from path).
16963
+ */
16964
+ var ProbeTargetConfigResultSchema = object({
16965
+ ok: boolean(),
16966
+ resolvedUrl: string(),
16967
+ httpStatus: number().int().optional(),
16968
+ stateInstance: string().optional(),
16969
+ error: string().optional()
16970
+ });
16971
+ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSchema), { auth: "admin" }), method(object({ targetId: string() }), TargetSchema, { auth: "admin" }), method(object({
16972
+ kind: string(),
16973
+ config: record(string(), unknown()).optional(),
16974
+ /**
16975
+ * When editing / duplicating, the blank password field never round-trips
16976
+ * the stored token. Pass the source target id so the provider can restore
16977
+ * secrets server-side before dialling (same merge as upsert).
16978
+ */
16979
+ targetId: string().optional()
16980
+ }), array(DiscoveredTargetSchema), { auth: "admin" }), method(object({
16981
+ kind: string(),
16982
+ config: record(string(), unknown()),
16983
+ /** See `discoverTargets.targetId` — restore stored secrets for a blank password. */
16984
+ targetId: string().optional()
16985
+ }), ProbeTargetConfigResultSchema, {
16986
+ kind: "mutation",
16987
+ auth: "admin"
16988
+ }), method(object({
16989
+ targetId: string(),
16990
+ notification: NotificationSchema
16991
+ }), SendResultSchema, {
16992
+ kind: "mutation",
16993
+ auth: "admin"
16994
+ }), method(object({
16995
+ targetId: string(),
16996
+ sample: NotificationSchema.optional()
16997
+ }), TestResultSchema, {
16998
+ kind: "mutation",
16999
+ auth: "admin"
17000
+ }), method(object({
17001
+ target: TargetSchema,
17002
+ /**
17003
+ * Duplicate flow: create a NEW target id while copying secrets from an
17004
+ * existing row. The UI never holds the stored token; blank / redacted
17005
+ * password fields are restored from this source (D634 still applies if
17006
+ * destinations diverge without a re-typed secret).
17007
+ */
17008
+ cloneSecretsFrom: string().optional()
17009
+ }), TargetSchema, {
17010
+ kind: "mutation",
17011
+ auth: "admin"
17012
+ }), method(object({ targetId: string() }), _void(), {
17013
+ kind: "mutation",
17014
+ auth: "admin"
17015
+ }), method(object({
17016
+ targetId: string(),
17017
+ enabled: boolean()
17018
+ }), _void(), {
17019
+ kind: "mutation",
17020
+ auth: "admin"
17021
+ });
17022
+ /**
17023
+ * `addon-pages` — system-scoped singleton aggregator cap. Public-facing
17024
+ * surface that admin-ui consumes through `useAddonPagesListPages()`.
17025
+ *
17026
+ * The provider iterates every `addon-pages-source` (collection) provider
17027
+ * and emits `AddonPageInfo[]` enriched with versioned `bundleUrl` strings
17028
+ * pointing at `/api/addon-pages/<addonId>/<bundle>?v=<mtime>`. The
17029
+ * filesystem `mtime` cache-buster lets the browser pick up addon
17030
+ * rebuilds without manual reload.
17031
+ *
17032
+ * The hub-local builtin `addon-pages-aggregator` (see
17033
+ * `@camstack/system/builtins/addon-pages-aggregator`) registers the
17034
+ * provider. Splitting the public aggregator from the raw collection
17035
+ * keeps both ends in codegen — there's no hand-written
17036
+ * `addon-pages.router.ts` wrapper anymore.
17037
+ */
17038
+ var AddonPageDeclarationSchema$1 = object({
17039
+ id: string(),
17040
+ label: string(),
17041
+ icon: string(),
17042
+ path: string(),
17043
+ remoteName: string(),
17044
+ bundle: string(),
17045
+ section: string().optional(),
17046
+ sectionLabel: string().optional()
17047
+ });
17048
+ var AddonPageInfoSchema = object({
17049
+ addonId: string(),
17050
+ page: AddonPageDeclarationSchema$1,
17051
+ bundleUrl: string()
17052
+ });
17053
+ method(_void(), array(AddonPageInfoSchema).readonly());
17054
+ var AddonHttpRouteSchema = object({
17055
+ method: _enum([
17056
+ "GET",
17057
+ "POST",
17058
+ "PUT",
17059
+ "DELETE",
17060
+ "PATCH"
17061
+ ]),
17062
+ path: string(),
17063
+ access: _enum([
17064
+ "public",
17065
+ "authenticated",
17066
+ "admin"
17067
+ ]).optional(),
17068
+ description: string().optional(),
17069
+ /** The hub limits this route per client address before the handler runs. */
17070
+ rateLimit: _enum(["auth"]).optional()
17071
+ });
17072
+ /**
17073
+ * Cross-process route invocation envelope. The hub captures the
16547
17074
  * request as plain data, ships it to the worker via Moleculer, and
16548
17075
  * the worker runs the local handler against a capturing reply. The
16549
17076
  * envelope returned describes what the handler intended (status,
@@ -19066,7 +19593,11 @@ var CompositionProblemSchema = object({
19066
19593
  "mixed-quantity",
19067
19594
  "helper-mismatch",
19068
19595
  "member-constraint",
19069
- "retention"
19596
+ "retention",
19597
+ "command-method-unknown",
19598
+ "command-source-unknown",
19599
+ "command-input-unknown",
19600
+ "command-input-missing"
19070
19601
  ]),
19071
19602
  path: string(),
19072
19603
  message: string()
@@ -19105,7 +19636,9 @@ var CompositionFieldRoleSchema = _enum([
19105
19636
  var CompositionFieldItemSchema = object({
19106
19637
  arrayPath: string(),
19107
19638
  key: string(),
19108
- label: string()
19639
+ label: string(),
19640
+ /** True when the item carries a `reset` forward: the composer writes `resettable` from this (D967). */
19641
+ resettable: boolean().optional()
19109
19642
  });
19110
19643
  var CompositionFieldPlanSchema = object({
19111
19644
  cap: string(),
@@ -19310,7 +19843,7 @@ Object.freeze({
19310
19843
  * One catalog row per base reading a group helper can build (D944 §3).
19311
19844
  * Data, not a form default written into the block.
19312
19845
  */
19313
- var NOW$2 = {
19846
+ var NOW$3 = {
19314
19847
  fieldPath: "lastFetchedAt",
19315
19848
  expr: "now"
19316
19849
  };
@@ -19362,7 +19895,7 @@ var GROUP_TEMPLATES = [
19362
19895
  quantity: "temperature",
19363
19896
  defaultAggregate: "mean",
19364
19897
  empty: "null",
19365
- companions: [NOW$2],
19898
+ companions: [NOW$3],
19366
19899
  alsoFrom: {
19367
19900
  deviceTypes: CLIMATE_DEVICES,
19368
19901
  accept: {
@@ -19380,7 +19913,7 @@ var GROUP_TEMPLATES = [
19380
19913
  quantity: "humidity",
19381
19914
  defaultAggregate: "mean",
19382
19915
  empty: "null",
19383
- companions: [NOW$2],
19916
+ companions: [NOW$3],
19384
19917
  alsoFrom: {
19385
19918
  deviceTypes: CLIMATE_DEVICES,
19386
19919
  accept: {
@@ -19398,7 +19931,7 @@ var GROUP_TEMPLATES = [
19398
19931
  quantity: "pressure",
19399
19932
  defaultAggregate: "mean",
19400
19933
  empty: "null",
19401
- companions: [NOW$2]
19934
+ companions: [NOW$3]
19402
19935
  }),
19403
19936
  numeric({
19404
19937
  id: "illuminance",
@@ -19409,7 +19942,7 @@ var GROUP_TEMPLATES = [
19409
19942
  quantity: "illuminance",
19410
19943
  defaultAggregate: "mean",
19411
19944
  empty: "null",
19412
- companions: [NOW$2]
19945
+ companions: [NOW$3]
19413
19946
  }),
19414
19947
  numeric({
19415
19948
  id: "power",
@@ -19420,7 +19953,7 @@ var GROUP_TEMPLATES = [
19420
19953
  quantity: "power",
19421
19954
  defaultAggregate: "sum",
19422
19955
  empty: "omit",
19423
- companions: [NOW$2]
19956
+ companions: [NOW$3]
19424
19957
  }),
19425
19958
  numeric({
19426
19959
  id: "energy",
@@ -19431,7 +19964,7 @@ var GROUP_TEMPLATES = [
19431
19964
  quantity: "energy",
19432
19965
  defaultAggregate: "sum",
19433
19966
  empty: "omit",
19434
- companions: [NOW$2]
19967
+ companions: [NOW$3]
19435
19968
  }),
19436
19969
  numeric({
19437
19970
  id: "battery",
@@ -19466,7 +19999,7 @@ var GROUP_TEMPLATES = [
19466
19999
  quantity: "device",
19467
20000
  defaultAggregate: "mean",
19468
20001
  empty: "null",
19469
- companions: [NOW$2]
20002
+ companions: [NOW$3]
19470
20003
  }),
19471
20004
  binary({
19472
20005
  id: "motion",
@@ -21840,12 +22373,48 @@ var ExposeInputSchema = object({
21840
22373
  capabilities: array(string()).optional()
21841
22374
  });
21842
22375
  var UnexposeInputSchema = object({ deviceId: string() });
22376
+ /**
22377
+ * What an exporter may expose besides devices (D968). An action and a
22378
+ * notification target are LIST ENTRIES, never devices (D954): they enter an
22379
+ * exporter's own selection, not the device registry.
22380
+ */
22381
+ var ExportEntityKindSchema = _enum([
22382
+ "device",
22383
+ "action",
22384
+ "notifier"
22385
+ ]);
22386
+ var ExportEntityRefSchema = discriminatedUnion("kind", [
22387
+ object({
22388
+ kind: literal("device"),
22389
+ deviceId: string()
22390
+ }),
22391
+ object({
22392
+ kind: literal("action"),
22393
+ actionId: string().min(1)
22394
+ }),
22395
+ object({
22396
+ kind: literal("notifier"),
22397
+ targetId: string().min(1)
22398
+ })
22399
+ ]);
22400
+ var ExposedEntitySchema = object({
22401
+ entity: ExportEntityRefSchema,
22402
+ exposedAs: string().optional()
22403
+ });
22404
+ var ExposeEntityInputSchema = object({ entity: ExportEntityRefSchema });
22405
+ var UnexposeEntityInputSchema = object({ entity: ExportEntityRefSchema });
21843
22406
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), {
21844
22407
  kind: "mutation",
21845
22408
  auth: "admin"
21846
22409
  }), method(UnexposeInputSchema, _void(), {
21847
22410
  kind: "mutation",
21848
22411
  auth: "admin"
22412
+ }), optionalMethod(_void(), array(ExportEntityKindSchema)), optionalMethod(_void(), array(ExposedEntitySchema)), optionalMethod(ExposeEntityInputSchema, _void(), {
22413
+ kind: "mutation",
22414
+ auth: "admin"
22415
+ }), optionalMethod(UnexposeEntityInputSchema, _void(), {
22416
+ kind: "mutation",
22417
+ auth: "admin"
21849
22418
  });
21850
22419
  /** Lucide category ids, alphabetical. `ICON_META` indexes into this. */
21851
22420
  var ICON_CATEGORY_IDS = [
@@ -43714,7 +44283,7 @@ var LlmProviderWidgetSchema = object({
43714
44283
  /** ConfigUISchema tree passed through untyped on the wire (the
43715
44284
  * notification-output `ConfigSchemaPassthrough` precedent at
43716
44285
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
43717
- var ConfigSchemaPassthrough$3 = unknown();
44286
+ var ConfigSchemaPassthrough$2 = unknown();
43718
44287
  var LlmProfileKindDescriptorSchema = object({
43719
44288
  kind: LlmProfileKindSchema,
43720
44289
  label: string(),
@@ -43723,9 +44292,9 @@ var LlmProfileKindDescriptorSchema = object({
43723
44292
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
43724
44293
  addonId: string(),
43725
44294
  /** The provider's own fields (`providerConfig`); `password` fields are keychain-held. */
43726
- connectionSchema: ConfigSchemaPassthrough$3,
44295
+ connectionSchema: ConfigSchemaPassthrough$2,
43727
44296
  /** Provider fields that belong under "Advanced" (extra headers, runtime tuning). */
43728
- advancedSchema: ConfigSchemaPassthrough$3.optional(),
44297
+ advancedSchema: ConfigSchemaPassthrough$2.optional(),
43729
44298
  /** The kind's defaults; a model from `listModels` may override any of them. */
43730
44299
  features: LlmModelFeaturesSchema,
43731
44300
  /** `false` = the provider stamps `supportsVision` itself (from what a node reports). */
@@ -44251,10 +44820,10 @@ var CpuBreakdownSchema = object({
44251
44820
  cores: number()
44252
44821
  });
44253
44822
  var MemoryInfoSchema = object({
44254
- percent: number(),
44823
+ percent: number().nullable(),
44255
44824
  totalBytes: number(),
44256
- usedBytes: number(),
44257
- availableBytes: number(),
44825
+ usedBytes: number().nullable(),
44826
+ availableBytes: number().nullable(),
44258
44827
  swapUsedBytes: number(),
44259
44828
  swapTotalBytes: number()
44260
44829
  });
@@ -44542,686 +45111,266 @@ var GetLoadSeriesInputSchema = object({
44542
45111
  */
44543
45112
  forNodeId: string(),
44544
45113
  /**
44545
- * EXCLUSIVE lower bound. A caller passes the newest `atMs` it already
44546
- * holds and receives only what it is missing, so seeding a live chart
44547
- * from this method cannot double a point already drawn.
44548
- */
44549
- sinceMs: number().optional(),
44550
- /**
44551
- * Most points the caller wants PER FUNCTION. The window is reduced to fit,
44552
- * preserving min and max per bucket.
44553
- *
44554
- * Absent means NO reduction — legitimate for a short window and a trap for a
44555
- * long one, which is why a chart passes its own pixel width.
44556
- */
44557
- maxPoints: number().int().positive().optional()
44558
- });
44559
- var SystemMetricsSchema = object({
44560
- cpuPercent: number(),
44561
- memoryPercent: number(),
44562
- memoryUsedMB: number(),
44563
- memoryTotalMB: number(),
44564
- diskPercent: number().optional(),
44565
- temperature: number().optional(),
44566
- gpuPercent: number().optional(),
44567
- gpuMemoryPercent: number().optional()
44568
- });
44569
- 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);
44570
- var modelConvertCapability = {
44571
- name: "model-convert",
44572
- scope: "system",
44573
- mode: "singleton",
44574
- internal: true,
44575
- methods: { convert: method(object({
44576
- sourceUrl: string(),
44577
- metadata: ModelConvertMetadataSchema,
44578
- targets: array(ConvertTargetSchema).min(1).readonly(),
44579
- calibrationRef: string().optional(),
44580
- sessionId: string().optional()
44581
- }), ConvertResultSchema, {
44582
- kind: "mutation",
44583
- auth: "admin",
44584
- timeoutMs: 6e5
44585
- }) }
44586
- };
44587
- method(object({
44588
- targetNodeId: string(),
44589
- modelId: string(),
44590
- format: _enum(MODEL_FORMATS),
44591
- entry: ModelCatalogEntrySchema
44592
- }), object({
44593
- ok: boolean(),
44594
- /** sha256 of the staged tarball (empty for a hub-local no-op). */
44595
- sha256: string(),
44596
- bytes: number(),
44597
- /** The target node's modelsDir the artifact landed in. */
44598
- path: string()
44599
- }), {
44600
- kind: "mutation",
44601
- auth: "admin"
44602
- });
44603
- var MotionRegionSchema = object({
44604
- bbox: BoundingBoxSchema,
44605
- pixelCount: number(),
44606
- intensity: number()
44607
- });
44608
- var MotionAnalysisResultSchema = object({
44609
- detected: boolean(),
44610
- regionCount: number(),
44611
- /** Regions passing minArea filter — used for pipeline triggering. */
44612
- regions: array(MotionRegionSchema).readonly(),
44613
- /** All raw regions from CCL before minArea filter — used for UI debug overlay. */
44614
- rawRegions: array(MotionRegionSchema).readonly(),
44615
- frameWidth: number(),
44616
- frameHeight: number(),
44617
- analysisMs: number()
44618
- });
44619
- DeviceType.Camera, method(object({
44620
- deviceId: number(),
44621
- frame: FrameInputSchema.optional(),
44622
- frameHandle: FrameHandleSchema.optional()
44623
- }), MotionAnalysisResultSchema, {
44624
- role: "admin",
44625
- kind: "mutation"
44626
- }), method(object({ deviceId: number() }), _void(), {
44627
- role: "admin",
44628
- kind: "mutation"
44629
- }), method(_void(), _void(), {
44630
- role: "admin",
44631
- kind: "mutation"
44632
- }), object({
44633
- deviceId: number(),
44634
- detected: boolean(),
44635
- regionCount: number()
44636
- });
44637
- /**
44638
- * `mqtt-broker` — broker-registry cap.
44639
- *
44640
- * NOT a pub/sub proxy. The cap exposes (a) a registry of configured
44641
- * MQTT brokers (external + optionally an embedded `aedes`-backed one)
44642
- * and (b) the connection details a consumer addon needs to spin up
44643
- * its OWN `mqtt.js` client.
44644
- *
44645
- * Why: pub/sub routing over the system event-bus loses fidelity
44646
- * (callback shape, QoS guarantees, will/retain semantics) and adds
44647
- * refcount bookkeeping that addons would rather own themselves. The
44648
- * canonical consumer needs raw `mqtt.js`
44649
- * features anyway — give it the connection config, get out of the way.
44650
- *
44651
- * Consumer flow:
44652
- * const cfg = await ctx.api.mqttBroker.getBrokerConfig({ id })
44653
- * const client = mqtt.connect(cfg.url, { username: cfg.username, … })
44654
- * client.subscribe('zigbee2mqtt/+')
44655
- *
44656
- * Collection mode: multiple brokers (e.g. one local mosquitto + one
44657
- * cloud bridge). The "embedded" entry (when present) is just another
44658
- * broker in the registry — its lifecycle is owned by the addon that
44659
- * spawned it.
44660
- */
44661
- var BrokerKindSchema = _enum(["external", "embedded"]);
44662
- /**
44663
- * Broker live-probe status.
44664
- *
44665
- * - `connected` — last probe completed a clean CONNACK
44666
- * - `disconnected` — no probe has run yet (cold cache)
44667
- * - `auth-failed` — CONNACK refused with auth error (RC 4 / 5)
44668
- * - `unreachable` — TCP connect timed out / refused
44669
- * - `tls-error` — TLS handshake failed (cert / SNI / cipher)
44670
- */
44671
- var BrokerStatusSchema$1 = _enum([
44672
- "connected",
44673
- "disconnected",
44674
- "auth-failed",
44675
- "unreachable",
44676
- "tls-error"
44677
- ]);
44678
- var BrokerInfoSchema$1 = object({
44679
- id: string(),
44680
- name: string(),
44681
- url: string(),
44682
- kind: BrokerKindSchema,
44683
- status: BrokerStatusSchema$1,
44684
- latencyMs: number().nullable(),
44685
- error: string().optional(),
44686
- /** Embedded brokers only: number of MQTT clients currently connected. */
44687
- connectedClients: number().int().nonnegative().optional(),
44688
- /** Epoch ms of the last live probe (external) or aedes snapshot (embedded). */
44689
- lastCheckedAt: number().optional()
44690
- });
44691
- /**
44692
- * Connection details — what a consumer needs to call
44693
- * `mqtt.connect(url, options)`. We split URL + credentials so the
44694
- * consumer can pass them as `mqtt.connect(url, { username, password })`
44695
- * instead of stuffing creds into the URL (which leaks them into logs).
44696
- */
44697
- var BrokerConnectionDetailsSchema = object({
44698
- url: string(),
44699
- username: string().optional(),
44700
- password: string().optional(),
44701
- /**
44702
- * Suggested prefix for `clientId`. Each consumer should suffix this
44703
- * with its own discriminator (addon id, instance id) so reconnects
44704
- * don't kick each other off (MQTT spec: clientId must be unique per
44705
- * broker).
44706
- */
44707
- clientIdPrefix: string().optional()
44708
- });
44709
- var AddBrokerInputSchema = object({
44710
- name: string().min(1),
44711
- url: string().regex(/^(mqtt|mqtts|ws|wss):\/\//, "URL must start with mqtt(s):// or ws(s)://"),
44712
- username: string().optional(),
44713
- password: string().optional(),
44714
- clientIdPrefix: string().optional()
44715
- });
44716
- var AddBrokerResultSchema = object({ id: string() });
44717
- var IdInputSchema = object({ id: string() });
44718
- var TestResultSchema$1 = discriminatedUnion("ok", [object({
44719
- ok: literal(true),
44720
- latencyMs: number()
44721
- }), object({
44722
- ok: literal(false),
44723
- error: string()
44724
- })]);
44725
- var StartEmbeddedInputSchema = object({
44726
- port: number().int().min(1).max(65535).default(1883),
44727
- /** Allow anonymous connect (no username/password). Default: false. */
44728
- allowAnonymous: boolean().default(false),
44729
- /** Optional shared username/password for clients. */
44730
- username: string().optional(),
44731
- password: string().optional()
44732
- });
44733
- var StartEmbeddedResultSchema = object({
44734
- id: string(),
44735
- url: string()
44736
- });
44737
- var StatusSchema = object({
44738
- brokerCount: number(),
44739
- embeddedRunning: boolean()
44740
- });
44741
- method(_void(), array(BrokerInfoSchema$1)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
44742
- kind: "mutation",
44743
- auth: "admin"
44744
- }), method(IdInputSchema, _void(), {
44745
- kind: "mutation",
44746
- auth: "admin"
44747
- }), method(IdInputSchema, TestResultSchema$1, {
44748
- kind: "mutation",
44749
- auth: "admin"
44750
- }), method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, {
44751
- kind: "mutation",
44752
- auth: "admin"
44753
- }), method(IdInputSchema, _void(), {
44754
- kind: "mutation",
44755
- auth: "admin"
44756
- }), method(_void(), StatusSchema);
44757
- var NetworkEndpointSchema = object({
44758
- url: string(),
44759
- hostname: string(),
44760
- port: number(),
44761
- protocol: _enum(["http", "https"]),
44762
- /**
44763
- * Whether this address survives a restart of its provider. `false` = it is
44764
- * re-issued every time (a Quick tunnel's random `*.trycloudflare.com`); the
44765
- * hub never selects such an address AUTOMATICALLY for a role (D860), though
44766
- * it stays visible and an operator may still flag it. Absent = stable: every
44767
- * provider except a Quick tunnel owns a name that does not change.
44768
- */
44769
- stable: boolean().optional()
44770
- });
44771
- object({
44772
- url: string(),
44773
- /** Mirrors {@link NetworkEndpointSchema} `stable`; absent = stable. */
44774
- stable: boolean().optional(),
44775
- updated: boolean().optional()
44776
- });
44777
- var NetworkAccessStatusSchema = object({
44778
- connected: boolean(),
44779
- endpoint: NetworkEndpointSchema.nullable(),
44780
- error: string().optional()
44781
- });
44782
- /**
44783
- * Optional, richer endpoint shape returned by providers that expose
44784
- * MORE than one ingress concurrently (Tailscale Funnel with mixed
44785
- * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
44786
- * the originating provider config (mode + sourcePort) so the
44787
- * orchestrator UI can label rows distinctly. Providers that expose only
44788
- * one endpoint just omit `listEndpoints` from their provider impl.
44789
- */
44790
- var NetworkEndpointEntrySchema = NetworkEndpointSchema.extend({
44791
- /**
44792
- * Stable id within the provider — typically `<mode>-<sourcePort>` so
44793
- * the orchestrator can dedupe across `listEndpoints` polls.
44794
- */
44795
- id: string(),
44796
- /** Operator-facing label (mirrors `MeshEndpoint.label`). */
44797
- label: string(),
44798
- /** Optional provider-specific mode tag, used for icon/colour in admin UI. */
44799
- mode: string().optional(),
44800
- /** Originating local port the ingress fronts (informational). */
44801
- sourcePort: number().optional()
44802
- });
44803
- method(_void(), NetworkEndpointSchema, { kind: "mutation" }), method(_void(), _void(), { kind: "mutation" }), method(_void(), NetworkEndpointSchema.nullable()), method(_void(), NetworkAccessStatusSchema), method(_void(), array(NetworkEndpointEntrySchema).readonly());
44804
- /**
44805
- * notification-output — canonical, capability-gated notification delivery.
44806
- *
44807
- * Apprise-derived model (see
44808
- * `docs/superpowers/specs/2026-07-03-notification-output-notifier-matrix.md`):
44809
- * callers emit ONE canonical `Notification`; each provider declares a
44810
- * per-kind capability descriptor (`TargetKind`), and the pure degrade
44811
- * engine (`@camstack/types` `prepareNotification`) transcodes / degrades the
44812
- * message to what the kind supports — callers never special-case a service.
44813
- *
44814
- * DESIGN DECISIONS (locked):
44815
- * - Target CRUD lives on THIS cap (`upsertTarget` / `deleteTarget` /
44816
- * `setTargetEnabled`), each provider persisting via the `settings-store`
44817
- * cap. Rationale: the admin UI needs one uniform surface across the
44818
- * notifiers addon AND the HA addon; the addon-`globalSettingsSchema`-array
44819
- * alternative would fork the UI per addon and cannot host the
44820
- * discovery→adopt flow.
44821
- * - `listTargetKinds` / `listTargets` / `discoverTargets` return arrays →
44822
- * the generated cap-mount auto-`concatCollection`-fans them across every
44823
- * registered provider (notifiers addon + HA addon) so one catalog is
44824
- * routable. `send` / `testTarget` / CRUD route to ONE provider by the
44825
- * `addonId` the generated collection router extracts from the call input.
44826
- * - `Attachment.bytes` is `Uint8Array`. Transport-safe: superjson (the tRPC
44827
- * transformer) + UDS MsgPack both round-trip typed arrays — already used by
44828
- * `storage` / `storage-provider` / `recording` caps over the same path. No
44829
- * base64 fallback needed.
44830
- *
44831
- * TODO (deferred, closed-set change — separate decision): add
44832
- * `providerKind: 'notify'` so notification providers surface on the unified
44833
- * admin "Integrations" page.
44834
- */
44835
- /**
44836
- * Zentik-derived typed-media enum — the superset across every kind. Each
44837
- * adapter picks what it supports and the degrade engine filters the rest.
44838
- */
44839
- var AttachmentMediaTypeSchema = _enum([
44840
- "image",
44841
- "video",
44842
- "gif",
44843
- "audio",
44844
- "icon"
44845
- ]);
44846
- /**
44847
- * A single attachment. Exactly one of `url` (remote source, most adapters
44848
- * prefer this) or `bytes` (inline source; required for Pushover-style
44849
- * bytes-only kinds) MUST be present — the degrade engine expresses a
44850
- * url→bytes fetch as a `needsFetch` directive the adapter executes.
44851
- */
44852
- var AttachmentSchema = object({
44853
- mediaType: AttachmentMediaTypeSchema,
44854
- url: string().optional(),
44855
- bytes: _instanceof(Uint8Array).optional(),
44856
- mime: string().optional(),
44857
- name: string().optional()
44858
- }).refine((a) => a.url !== void 0 || a.bytes !== void 0, { message: "Attachment requires either `url` or `bytes`" });
44859
- var NotificationFormatSchema = _enum([
44860
- "text",
44861
- "markdown",
44862
- "html"
44863
- ]);
44864
- /**
44865
- * The CLOSED icon vocabulary an action button may use.
44866
- *
44867
- * A closed set, not a free string, and that is the whole point: an arbitrary
44868
- * icon name is one that ntfy renders, zentik silently drops, and nobody
44869
- * notices — the same class of gap as a zone vocabulary nothing produced
44870
- * ([D35](../../../docs/decisions/adr-0035.md)). Every adapter maps this set or
44871
- * declares `actionIcons: false` and the degrade engine strips the field.
44872
- *
44873
- * Named by INTENT, never by glyph. "check" would tie the vocabulary to one
44874
- * renderer's icon set; "acknowledge" survives an adapter that draws it
44875
- * differently.
44876
- *
44877
- * ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
44878
- *
44879
- * These names are for US. **No adapter may forward one verbatim.** Each maps
44880
- * the whole set onto its own renderer's vocabulary through a
44881
- * `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
44882
- * fallback, so adding a member here fails every adapter's build until someone
44883
- * decides its glyph, which is the only place that decision can be made
44884
- * honestly.
44885
- *
44886
- * This paragraph is the bug. Zentik declared `actionIcons: true` and passed
44887
- * `disarm` straight through; iOS feeds that string to
44888
- * `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
44889
- * and every snooze and alarm button arrived BLANK. A pass-through is not a
44890
- * mapping, and "the field is documented" is not "the value renders".
44891
- *
44892
- * Adding a member is TRAIN-BOUND. The enum lives in the published
44893
- * `@camstack/server` closure and the cap seam validates against the HUB's copy,
44894
- * so an addon that emits a token the running hub does not know does not lose an
44895
- * icon — its whole `send` fails Zod validation and the notification never
44896
- * arrives. Never emit a new token from an addon before the train carrying it.
44897
- */
44898
- var NotificationActionIconSchema = _enum([
44899
- "acknowledge",
44900
- "dismiss",
44901
- "silence",
44902
- "snooze",
44903
- "view",
44904
- "play",
44905
- "open",
44906
- "close",
44907
- "lock",
44908
- "unlock",
44909
- "arm",
44910
- "arm-home",
44911
- "arm-away",
44912
- "arm-night",
44913
- "disarm",
44914
- "light",
44915
- "alert",
44916
- "camera"
44917
- ]);
44918
- /** A single tap-through action button. */
44919
- var NotificationActionSchema = object({
44920
- id: string(),
44921
- label: string(),
44922
- url: string().optional(),
44923
- /** Dropped by the degrade engine for a kind with `caps.actionIcons: false`. */
44924
- icon: NotificationActionIconSchema.optional(),
44925
- /**
44926
- * Renders in a warning style where the notifier supports it.
44927
- *
44928
- * A HINT, never a gate. The callback's authority is its token and nothing
44929
- * else — see `notification-center/action-token.ts` for what that does and
44930
- * does not buy.
44931
- */
44932
- destructive: boolean().optional(),
44933
- /**
44934
- * How the tap should REACH the url.
44935
- *
44936
- * `navigate` (absent, and every button authored before this field) opens it:
44937
- * the phone leaves the notification and shows whatever the callback returns.
44938
- * That is right for a button whose answer the operator wants to read.
44939
- *
44940
- * `background` fires it as a POST and stays put. It exists for the buttons
44941
- * whose whole point is not to interrupt — "silence this for 30 minutes" is
44942
- * an answer to the notification, and being thrown into a browser tab to
44943
- * confirm it costs more attention than the notification did. A backend that
44944
- * cannot do a background call renders it as an ordinary link (the adapters
44945
- * fall back rather than dropping the button), so this is a preference, never
44946
- * a requirement.
44947
- */
44948
- mode: _enum(["navigate", "background"]).optional()
44949
- });
44950
- /** A delivery parameter value: what a notifier declared it takes. */
44951
- var DeliveryParamValueSchema = union([
44952
- string(),
44953
- number(),
44954
- boolean()
44955
- ]);
44956
- /**
44957
- * One extra delivery parameter a notifier KIND declares (D938). A rule that
44958
- * addresses a target of that kind may set it; a kind that declares nothing is
44959
- * never handed one. The admin UI derives its control from this descriptor —
44960
- * no editor knows a service by name.
44961
- *
44962
- * Optional fields are `.optional()`, never `.default()` (a Zod default does not
44963
- * run on the addon cap path).
44964
- */
44965
- var DeliveryParamSchema = object({
44966
- key: string().min(1),
44967
- label: string(),
44968
- /** i18n key of the label, resolved by the declaring addon's namespace. */
44969
- labelKey: string().optional(),
44970
- type: _enum([
44971
- "enum",
44972
- "number",
44973
- "boolean",
44974
- "string"
44975
- ]),
44976
- /** `enum` only: the closed set of accepted values. */
44977
- options: array(object({
44978
- value: string(),
44979
- label: string()
44980
- })).optional(),
44981
- /** `number` only. */
44982
- min: number().optional(),
44983
- max: number().optional(),
44984
- /** What the notifier does when the rule sets nothing; shown as the placeholder. */
44985
- default: DeliveryParamValueSchema.optional()
44986
- });
44987
- /**
44988
- * The canonical notification. `body` is the only hard field (Apprise model).
44989
- * `priority` is a 5-level ORDINAL (1=lowest … 3=normal(default) … 5=urgent),
44990
- * NOT a fixed severity enum — each kind declares its own `caps.levels` and
44991
- * the adapter maps this ordinal onto its native level. `level?` is an
44992
- * optional kind-native level id (`emergency`, `silent`, …) that overrides
44993
- * `priority` for that one target.
44994
- */
44995
- var NotificationSchema = object({
44996
- body: string(),
44997
- title: string().optional(),
44998
- format: NotificationFormatSchema.default("text"),
44999
- priority: number().int().min(1).max(5).default(3),
45000
- level: string().optional(),
45001
- attachments: array(AttachmentSchema).optional(),
45002
- clickUrl: string().optional(),
45003
- actions: array(NotificationActionSchema).optional(),
45004
- sound: string().optional(),
45005
- ttl: number().optional(),
45006
- tag: string().optional(),
45007
- deviceId: number().optional(),
45008
- eventId: string().optional(),
45009
- metadata: record(string(), unknown()).optional(),
45010
- /**
45011
- * Values for the parameters the target's kind DECLARES in
45012
- * {@link TargetKindSchema} `deliveryParams`. Already validated against the
45013
- * declaration by the sender; a notifier reads only the keys it declared.
45014
- */
45015
- delivery: record(string(), DeliveryParamValueSchema).optional()
45016
- });
45017
- /** One declared native severity/priority level for a kind. */
45018
- var TargetKindLevelSchema = object({
45019
- id: string(),
45020
- label: string(),
45021
- /** Which canonical priority (1..5) this level maps to. `null` = qualitative-only. */
45022
- ordinal: number().int().min(1).max(5).nullable(),
45023
- flags: object({
45024
- critical: boolean().optional(),
45025
- silent: boolean().optional(),
45026
- noPush: boolean().optional()
45027
- }).optional(),
45028
- /** e.g. Pushover `emergency` requires `retry` / `expire`. */
45029
- requires: array(string()).optional(),
45030
- description: string().optional()
45031
- });
45032
- /** The full capability block consulted before dispatch. */
45033
- var TargetKindCapsSchema = object({
45034
- attachments: object({
45035
- mediaTypes: array(AttachmentMediaTypeSchema),
45036
- mode: _enum([
45037
- "url",
45038
- "bytes",
45039
- "both"
45040
- ]),
45041
- max: number().int().nonnegative(),
45042
- maxBytes: number().int().positive().optional()
45043
- }),
45044
- /** Max action buttons (0 = none). */
45045
- actions: number().int().nonnegative(),
45046
- /**
45047
- * Whether this kind renders a per-action ICON.
45048
- *
45049
- * `.optional()`, deliberately NOT `.default(false)`: a Zod default does not
45050
- * run on the addon cap path — three production failures in one day taught
45051
- * this repo that once. Absent is read as false by the degrade engine, which
45052
- * is the safe direction: an icon that is not rendered costs nothing, an icon
45053
- * assumed and dropped costs the operator's trust in the field.
45054
- */
45055
- actionIcons: boolean().optional(),
45056
- levels: array(TargetKindLevelSchema),
45057
- format: array(NotificationFormatSchema),
45058
- clickUrl: boolean(),
45059
- sound: boolean(),
45060
- ttl: boolean(),
45061
- bodyMaxLen: number().int().positive()
45062
- });
45063
- /**
45064
- * `configSchema` is a `ConfigUISchema` tree passed through to the admin
45065
- * FormBuilder. Stored as `z.unknown()` at the cap seam (mirrors
45066
- * `device-provider.getChildCreationSchema` `CreationSchemaOutputSchema`) —
45067
- * the union is large and not meant for runtime validation here; the exported
45068
- * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
45069
- */
45070
- var ConfigSchemaPassthrough$2 = unknown();
45071
- var TargetKindSchema = object({
45072
- kind: string(),
45073
- label: string(),
45074
- icon: string(),
45075
- /** Stamped by each provider so the concat-fanned catalog stays routable. */
45076
- addonId: string(),
45077
- /**
45078
- * URL of the kind's bundled BRAND icon, served by the providing addon over
45079
- * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
45080
- * when the addon bundles no icon for that kind — the client then falls back
45081
- * to a neutral glyph rather than rendering the raw `icon` NAME as text.
45082
- *
45083
- * Root-relative on purpose: it resolves against whatever origin serves a web
45084
- * client, and a native client joins it onto its own hub base.
45085
- *
45086
- * DECLARED here deliberately. It used to travel as an undeclared passthrough
45087
- * field that survived only because the runtime cap-router forwards provider
45088
- * output verbatim — so every consumer had to re-declare it by hand to stop
45089
- * its own Zod parse from stripping it, and the whole arrangement would have
45090
- * broken silently the moment output validation was tightened anywhere.
45091
- */
45092
- iconUrl: string().optional(),
45093
- /**
45094
- * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
45095
- *
45096
- * The server knows this and therefore says it, because the client cannot
45097
- * safely guess: a React-Native client renders SVG and raster through two
45098
- * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
45099
- * not decode SVG on iOS/Android), so without this it silently fell back to a
45100
- * placeholder glyph for every vector icon while the web build looked fine.
45101
- *
45102
- * Absent when {@link iconUrl} is absent, or for a legacy provider that has
45103
- * not been updated — a client that cannot determine the type should prefer
45104
- * its raster path, which is the safe default for an unknown image.
45105
- */
45106
- iconMediaType: string().optional(),
45107
- configSchema: ConfigSchemaPassthrough$2,
45108
- /**
45109
- * The config keys that decide WHERE this kind's secrets are sent (server,
45110
- * base URL, instance, chat, recipient). A save that changes any of them
45111
- * while leaving a secret redacted is refused by the provider (D634), so an
45112
- * editor uses this to ask for the secret on exactly those edits instead of
45113
- * on every edit.
45114
- *
45115
- * Optional: absent from a provider that holds no secret (the Home Assistant
45116
- * kinds) and from a provider older than this field — an editor that finds
45117
- * it absent must assume ANY edit may need the secret.
45114
+ * EXCLUSIVE lower bound. A caller passes the newest `atMs` it already
45115
+ * holds and receives only what it is missing, so seeding a live chart
45116
+ * from this method cannot double a point already drawn.
45118
45117
  */
45119
- destinationKeys: array(string()).optional(),
45120
- supportsDiscovery: boolean(),
45118
+ sinceMs: number().optional(),
45121
45119
  /**
45122
- * Extra delivery parameters a rule may set for a target of this kind (D938).
45123
- * Absent = none; the rule editor then offers nothing.
45120
+ * Most points the caller wants PER FUNCTION. The window is reduced to fit,
45121
+ * preserving min and max per bucket.
45122
+ *
45123
+ * Absent means NO reduction — legitimate for a short window and a trap for a
45124
+ * long one, which is why a chart passes its own pixel width.
45124
45125
  */
45125
- deliveryParams: array(DeliveryParamSchema).optional(),
45126
- caps: TargetKindCapsSchema
45126
+ maxPoints: number().int().positive().optional()
45127
+ });
45128
+ var SystemMetricsSchema = object({
45129
+ cpuPercent: number(),
45130
+ /** `null` when the memory sample failed or was not taken yet (D393). */
45131
+ memoryPercent: number().nullable(),
45132
+ memoryUsedMB: number().nullable(),
45133
+ memoryTotalMB: number(),
45134
+ diskPercent: number().optional(),
45135
+ temperature: number().optional(),
45136
+ gpuPercent: number().optional(),
45137
+ gpuMemoryPercent: number().optional()
45138
+ });
45139
+ 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);
45140
+ var modelConvertCapability = {
45141
+ name: "model-convert",
45142
+ scope: "system",
45143
+ mode: "singleton",
45144
+ internal: true,
45145
+ methods: { convert: method(object({
45146
+ sourceUrl: string(),
45147
+ metadata: ModelConvertMetadataSchema,
45148
+ targets: array(ConvertTargetSchema).min(1).readonly(),
45149
+ calibrationRef: string().optional(),
45150
+ sessionId: string().optional()
45151
+ }), ConvertResultSchema, {
45152
+ kind: "mutation",
45153
+ auth: "admin",
45154
+ timeoutMs: 6e5
45155
+ }) }
45156
+ };
45157
+ method(object({
45158
+ targetNodeId: string(),
45159
+ modelId: string(),
45160
+ format: _enum(MODEL_FORMATS),
45161
+ entry: ModelCatalogEntrySchema
45162
+ }), object({
45163
+ ok: boolean(),
45164
+ /** sha256 of the staged tarball (empty for a hub-local no-op). */
45165
+ sha256: string(),
45166
+ bytes: number(),
45167
+ /** The target node's modelsDir the artifact landed in. */
45168
+ path: string()
45169
+ }), {
45170
+ kind: "mutation",
45171
+ auth: "admin"
45172
+ });
45173
+ var MotionRegionSchema = object({
45174
+ bbox: BoundingBoxSchema,
45175
+ pixelCount: number(),
45176
+ intensity: number()
45177
+ });
45178
+ var MotionAnalysisResultSchema = object({
45179
+ detected: boolean(),
45180
+ regionCount: number(),
45181
+ /** Regions passing minArea filter — used for pipeline triggering. */
45182
+ regions: array(MotionRegionSchema).readonly(),
45183
+ /** All raw regions from CCL before minArea filter — used for UI debug overlay. */
45184
+ rawRegions: array(MotionRegionSchema).readonly(),
45185
+ frameWidth: number(),
45186
+ frameHeight: number(),
45187
+ analysisMs: number()
45188
+ });
45189
+ DeviceType.Camera, method(object({
45190
+ deviceId: number(),
45191
+ frame: FrameInputSchema.optional(),
45192
+ frameHandle: FrameHandleSchema.optional()
45193
+ }), MotionAnalysisResultSchema, {
45194
+ role: "admin",
45195
+ kind: "mutation"
45196
+ }), method(object({ deviceId: number() }), _void(), {
45197
+ role: "admin",
45198
+ kind: "mutation"
45199
+ }), method(_void(), _void(), {
45200
+ role: "admin",
45201
+ kind: "mutation"
45202
+ }), object({
45203
+ deviceId: number(),
45204
+ detected: boolean(),
45205
+ regionCount: number()
45127
45206
  });
45128
45207
  /**
45129
- * A persisted target. `config` holds secrets; providers REDACT secret fields
45130
- * (return a presence marker only) when serving `listTargets` — never
45131
- * round-trip a stored secret to the UI.
45208
+ * `mqtt-broker` — broker-registry cap.
45209
+ *
45210
+ * NOT a pub/sub proxy. The cap exposes (a) a registry of configured
45211
+ * MQTT brokers (external + optionally an embedded `aedes`-backed one)
45212
+ * and (b) the connection details a consumer addon needs to spin up
45213
+ * its OWN `mqtt.js` client.
45214
+ *
45215
+ * Why: pub/sub routing over the system event-bus loses fidelity
45216
+ * (callback shape, QoS guarantees, will/retain semantics) and adds
45217
+ * refcount bookkeeping that addons would rather own themselves. The
45218
+ * canonical consumer needs raw `mqtt.js`
45219
+ * features anyway — give it the connection config, get out of the way.
45220
+ *
45221
+ * Consumer flow:
45222
+ * const cfg = await ctx.api.mqttBroker.getBrokerConfig({ id })
45223
+ * const client = mqtt.connect(cfg.url, { username: cfg.username, … })
45224
+ * client.subscribe('zigbee2mqtt/+')
45225
+ *
45226
+ * Collection mode: multiple brokers (e.g. one local mosquitto + one
45227
+ * cloud bridge). The "embedded" entry (when present) is just another
45228
+ * broker in the registry — its lifecycle is owned by the addon that
45229
+ * spawned it.
45132
45230
  */
45133
- var TargetSchema = object({
45231
+ var BrokerKindSchema = _enum(["external", "embedded"]);
45232
+ /**
45233
+ * Broker live-probe status.
45234
+ *
45235
+ * - `connected` — last probe completed a clean CONNACK
45236
+ * - `disconnected` — no probe has run yet (cold cache)
45237
+ * - `auth-failed` — CONNACK refused with auth error (RC 4 / 5)
45238
+ * - `unreachable` — TCP connect timed out / refused
45239
+ * - `tls-error` — TLS handshake failed (cert / SNI / cipher)
45240
+ */
45241
+ var BrokerStatusSchema$1 = _enum([
45242
+ "connected",
45243
+ "disconnected",
45244
+ "auth-failed",
45245
+ "unreachable",
45246
+ "tls-error"
45247
+ ]);
45248
+ var BrokerInfoSchema$1 = object({
45134
45249
  id: string(),
45135
45250
  name: string(),
45136
- kind: string(),
45137
- addonId: string(),
45138
- enabled: boolean(),
45139
- config: record(string(), unknown())
45140
- });
45141
- /** A discovery-surfaced candidate (config is partial + non-secret). */
45142
- var DiscoveredTargetSchema = object({
45143
- kind: string(),
45144
- suggestedName: string(),
45145
- config: record(string(), unknown())
45146
- });
45147
- /** The degrade engine's report — what was resolved / dropped / degraded. */
45148
- var RenderedAsSchema = object({
45149
- level: string(),
45150
- format: NotificationFormatSchema,
45151
- attachmentsSent: number().int().nonnegative(),
45152
- actionsSent: number().int().nonnegative(),
45153
- truncated: boolean(),
45154
- dropped: array(string())
45155
- });
45156
- var SendResultSchema = object({
45157
- success: boolean(),
45251
+ url: string(),
45252
+ kind: BrokerKindSchema,
45253
+ status: BrokerStatusSchema$1,
45254
+ latencyMs: number().nullable(),
45158
45255
  error: string().optional(),
45159
- renderedAs: RenderedAsSchema.optional()
45256
+ /** Embedded brokers only: number of MQTT clients currently connected. */
45257
+ connectedClients: number().int().nonnegative().optional(),
45258
+ /** Epoch ms of the last live probe (external) or aedes snapshot (embedded). */
45259
+ lastCheckedAt: number().optional()
45160
45260
  });
45161
- /** Same shape as SendResult — kept as a distinct name for the test panel. */
45162
- var TestResultSchema = SendResultSchema;
45163
45261
  /**
45164
- * Pre-save credential probe against a partial (unsaved) target config.
45165
- * `resolvedUrl` never includes secrets (token stripped from path).
45262
+ * Connection details — what a consumer needs to call
45263
+ * `mqtt.connect(url, options)`. We split URL + credentials so the
45264
+ * consumer can pass them as `mqtt.connect(url, { username, password })`
45265
+ * instead of stuffing creds into the URL (which leaks them into logs).
45166
45266
  */
45167
- var ProbeTargetConfigResultSchema = object({
45168
- ok: boolean(),
45169
- resolvedUrl: string(),
45170
- httpStatus: number().int().optional(),
45171
- stateInstance: string().optional(),
45172
- error: string().optional()
45173
- });
45174
- method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSchema), { auth: "admin" }), method(object({ targetId: string() }), TargetSchema, { auth: "admin" }), method(object({
45175
- kind: string(),
45176
- config: record(string(), unknown()).optional(),
45267
+ var BrokerConnectionDetailsSchema = object({
45268
+ url: string(),
45269
+ username: string().optional(),
45270
+ password: string().optional(),
45177
45271
  /**
45178
- * When editing / duplicating, the blank password field never round-trips
45179
- * the stored token. Pass the source target id so the provider can restore
45180
- * secrets server-side before dialling (same merge as upsert).
45272
+ * Suggested prefix for `clientId`. Each consumer should suffix this
45273
+ * with its own discriminator (addon id, instance id) so reconnects
45274
+ * don't kick each other off (MQTT spec: clientId must be unique per
45275
+ * broker).
45181
45276
  */
45182
- targetId: string().optional()
45183
- }), array(DiscoveredTargetSchema), { auth: "admin" }), method(object({
45184
- kind: string(),
45185
- config: record(string(), unknown()),
45186
- /** See `discoverTargets.targetId` — restore stored secrets for a blank password. */
45187
- targetId: string().optional()
45188
- }), ProbeTargetConfigResultSchema, {
45189
- kind: "mutation",
45190
- auth: "admin"
45191
- }), method(object({
45192
- targetId: string(),
45193
- notification: NotificationSchema
45194
- }), SendResultSchema, {
45277
+ clientIdPrefix: string().optional()
45278
+ });
45279
+ var AddBrokerInputSchema = object({
45280
+ name: string().min(1),
45281
+ url: string().regex(/^(mqtt|mqtts|ws|wss):\/\//, "URL must start with mqtt(s):// or ws(s)://"),
45282
+ username: string().optional(),
45283
+ password: string().optional(),
45284
+ clientIdPrefix: string().optional()
45285
+ });
45286
+ var AddBrokerResultSchema = object({ id: string() });
45287
+ var IdInputSchema = object({ id: string() });
45288
+ var TestResultSchema$1 = discriminatedUnion("ok", [object({
45289
+ ok: literal(true),
45290
+ latencyMs: number()
45291
+ }), object({
45292
+ ok: literal(false),
45293
+ error: string()
45294
+ })]);
45295
+ var StartEmbeddedInputSchema = object({
45296
+ port: number().int().min(1).max(65535).default(1883),
45297
+ /** Allow anonymous connect (no username/password). Default: false. */
45298
+ allowAnonymous: boolean().default(false),
45299
+ /** Optional shared username/password for clients. */
45300
+ username: string().optional(),
45301
+ password: string().optional()
45302
+ });
45303
+ var StartEmbeddedResultSchema = object({
45304
+ id: string(),
45305
+ url: string()
45306
+ });
45307
+ var StatusSchema = object({
45308
+ brokerCount: number(),
45309
+ embeddedRunning: boolean()
45310
+ });
45311
+ method(_void(), array(BrokerInfoSchema$1)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
45195
45312
  kind: "mutation",
45196
45313
  auth: "admin"
45197
- }), method(object({
45198
- targetId: string(),
45199
- sample: NotificationSchema.optional()
45200
- }), TestResultSchema, {
45314
+ }), method(IdInputSchema, _void(), {
45201
45315
  kind: "mutation",
45202
45316
  auth: "admin"
45203
- }), method(object({
45204
- target: TargetSchema,
45205
- /**
45206
- * Duplicate flow: create a NEW target id while copying secrets from an
45207
- * existing row. The UI never holds the stored token; blank / redacted
45208
- * password fields are restored from this source (D634 still applies if
45209
- * destinations diverge without a re-typed secret).
45210
- */
45211
- cloneSecretsFrom: string().optional()
45212
- }), TargetSchema, {
45317
+ }), method(IdInputSchema, TestResultSchema$1, {
45213
45318
  kind: "mutation",
45214
45319
  auth: "admin"
45215
- }), method(object({ targetId: string() }), _void(), {
45320
+ }), method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, {
45216
45321
  kind: "mutation",
45217
45322
  auth: "admin"
45218
- }), method(object({
45219
- targetId: string(),
45220
- enabled: boolean()
45221
- }), _void(), {
45323
+ }), method(IdInputSchema, _void(), {
45222
45324
  kind: "mutation",
45223
45325
  auth: "admin"
45326
+ }), method(_void(), StatusSchema);
45327
+ var NetworkEndpointSchema = object({
45328
+ url: string(),
45329
+ hostname: string(),
45330
+ port: number(),
45331
+ protocol: _enum(["http", "https"]),
45332
+ /**
45333
+ * Whether this address survives a restart of its provider. `false` = it is
45334
+ * re-issued every time (a Quick tunnel's random `*.trycloudflare.com`); the
45335
+ * hub never selects such an address AUTOMATICALLY for a role (D860), though
45336
+ * it stays visible and an operator may still flag it. Absent = stable: every
45337
+ * provider except a Quick tunnel owns a name that does not change.
45338
+ */
45339
+ stable: boolean().optional()
45340
+ });
45341
+ object({
45342
+ url: string(),
45343
+ /** Mirrors {@link NetworkEndpointSchema} `stable`; absent = stable. */
45344
+ stable: boolean().optional(),
45345
+ updated: boolean().optional()
45346
+ });
45347
+ var NetworkAccessStatusSchema = object({
45348
+ connected: boolean(),
45349
+ endpoint: NetworkEndpointSchema.nullable(),
45350
+ error: string().optional()
45351
+ });
45352
+ /**
45353
+ * Optional, richer endpoint shape returned by providers that expose
45354
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
45355
+ * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
45356
+ * the originating provider config (mode + sourcePort) so the
45357
+ * orchestrator UI can label rows distinctly. Providers that expose only
45358
+ * one endpoint just omit `listEndpoints` from their provider impl.
45359
+ */
45360
+ var NetworkEndpointEntrySchema = NetworkEndpointSchema.extend({
45361
+ /**
45362
+ * Stable id within the provider — typically `<mode>-<sourcePort>` so
45363
+ * the orchestrator can dedupe across `listEndpoints` polls.
45364
+ */
45365
+ id: string(),
45366
+ /** Operator-facing label (mirrors `MeshEndpoint.label`). */
45367
+ label: string(),
45368
+ /** Optional provider-specific mode tag, used for icon/colour in admin UI. */
45369
+ mode: string().optional(),
45370
+ /** Originating local port the ingress fronts (informational). */
45371
+ sourcePort: number().optional()
45224
45372
  });
45373
+ method(_void(), NetworkEndpointSchema, { kind: "mutation" }), method(_void(), _void(), { kind: "mutation" }), method(_void(), NetworkEndpointSchema.nullable()), method(_void(), NetworkAccessStatusSchema), method(_void(), array(NetworkEndpointEntrySchema).readonly());
45225
45374
  var AUDIO_MACRO_LABELS = [
45226
45375
  {
45227
45376
  id: "speech",
@@ -51622,14 +51771,6 @@ var EngineProvisioningSchema = object({
51622
51771
  */
51623
51772
  configIssues: array(string()).optional()
51624
51773
  });
51625
- var PipelineStepInputSchema = lazy(() => object({
51626
- addonId: string(),
51627
- modelId: string().optional(),
51628
- enabled: boolean().default(true),
51629
- children: array(PipelineStepInputSchema).optional(),
51630
- settings: record(string(), unknown()).optional(),
51631
- jumpDeviceKey: string().optional()
51632
- }));
51633
51774
  var ModelSubstitutionSchema = object({
51634
51775
  addonId: string(),
51635
51776
  chosen: string(),
@@ -51708,7 +51849,6 @@ var ConfigUISchemaBridge = custom();
51708
51849
  var ConfigUISchemaNullableBridge = custom();
51709
51850
  var InferenceCapabilitiesBridge = custom();
51710
51851
  var ModelAvailabilityListBridge = custom();
51711
- var PipelineRunResultBridge = custom();
51712
51852
  method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
51713
51853
  modelId: string(),
51714
51854
  settings: record(string(), unknown()).readonly()
@@ -54870,6 +55010,12 @@ var ServerUpdateActionResultSchema = object({
54870
55010
  */
54871
55011
  blockers: array(UpdateBlockerSchema).optional()
54872
55012
  });
55013
+ var LaunchOverridesSchema = object({
55014
+ /** The persisted heap ceiling in MB, or `null` when none is set. */
55015
+ heapMb: number().int().nullable() });
55016
+ var SetLaunchOverridesResultSchema = LaunchOverridesSchema.extend({
55017
+ /** Always true: the override is read at launch, not by the running process. */
55018
+ restartRequired: boolean() });
54873
55019
  method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
54874
55020
  kind: "mutation",
54875
55021
  auth: "admin"
@@ -54892,6 +55038,9 @@ method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), S
54892
55038
  }), method(_void(), ServerUpdateActionResultSchema, {
54893
55039
  kind: "mutation",
54894
55040
  auth: "admin"
55041
+ }), method(_void(), LaunchOverridesSchema, { auth: "admin" }), method(object({ heapMb: number().int().min(512).max(65536).nullable() }), SetLaunchOverridesResultSchema, {
55042
+ kind: "mutation",
55043
+ auth: "admin"
54895
55044
  });
54896
55045
  /**
54897
55046
  * `smtp-provider` — pluggable email delivery surface.
@@ -59382,7 +59531,7 @@ object({
59382
59531
  /** Ms epoch of the last value received from the appliance; 0 = never. */
59383
59532
  lastFetchedAt: number()
59384
59533
  });
59385
- var DeviceIdSchema = number().int().nonnegative();
59534
+ var DeviceIdSchema$1 = number().int().nonnegative();
59386
59535
  /** A value a program option or setting can take. */
59387
59536
  var DishwasherValueSchema = union([
59388
59537
  boolean(),
@@ -59446,77 +59595,77 @@ var DishwasherOptionsSchema = object({
59446
59595
  options: array(DishwasherOptionDescriptorSchema)
59447
59596
  });
59448
59597
  DeviceType.Dishwasher, method(object({
59449
- deviceId: DeviceIdSchema,
59598
+ deviceId: DeviceIdSchema$1,
59450
59599
  program: string().min(1).optional(),
59451
59600
  options: record(string(), DishwasherValueSchema).optional()
59452
59601
  }), _void(), {
59453
59602
  kind: "mutation",
59454
59603
  auth: "protected"
59455
- }), method(object({ deviceId: DeviceIdSchema }), _void(), {
59604
+ }), method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
59456
59605
  kind: "mutation",
59457
59606
  auth: "protected"
59458
- }), method(object({ deviceId: DeviceIdSchema }), _void(), {
59607
+ }), method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
59459
59608
  kind: "mutation",
59460
59609
  auth: "protected"
59461
- }), method(object({ deviceId: DeviceIdSchema }), _void(), {
59610
+ }), method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
59462
59611
  kind: "mutation",
59463
59612
  auth: "protected"
59464
59613
  }), method(object({
59465
- deviceId: DeviceIdSchema,
59614
+ deviceId: DeviceIdSchema$1,
59466
59615
  program: string().min(1)
59467
59616
  }), _void(), {
59468
59617
  kind: "mutation",
59469
59618
  auth: "protected"
59470
59619
  }), method(object({
59471
- deviceId: DeviceIdSchema,
59620
+ deviceId: DeviceIdSchema$1,
59472
59621
  on: boolean()
59473
59622
  }), _void(), {
59474
59623
  kind: "mutation",
59475
59624
  auth: "protected"
59476
59625
  }), method(object({
59477
- deviceId: DeviceIdSchema,
59626
+ deviceId: DeviceIdSchema$1,
59478
59627
  on: boolean()
59479
59628
  }), _void(), {
59480
59629
  kind: "mutation",
59481
59630
  auth: "protected"
59482
59631
  }), method(object({
59483
- deviceId: DeviceIdSchema,
59632
+ deviceId: DeviceIdSchema$1,
59484
59633
  on: boolean()
59485
59634
  }), _void(), {
59486
59635
  kind: "mutation",
59487
59636
  auth: "protected"
59488
59637
  }), method(object({
59489
- deviceId: DeviceIdSchema,
59638
+ deviceId: DeviceIdSchema$1,
59490
59639
  on: boolean()
59491
59640
  }), _void(), {
59492
59641
  kind: "mutation",
59493
59642
  auth: "protected"
59494
59643
  }), method(object({
59495
- deviceId: DeviceIdSchema,
59644
+ deviceId: DeviceIdSchema$1,
59496
59645
  on: boolean()
59497
59646
  }), _void(), {
59498
59647
  kind: "mutation",
59499
59648
  auth: "protected"
59500
59649
  }), method(object({
59501
- deviceId: DeviceIdSchema,
59650
+ deviceId: DeviceIdSchema$1,
59502
59651
  on: boolean()
59503
59652
  }), _void(), {
59504
59653
  kind: "mutation",
59505
59654
  auth: "protected"
59506
59655
  }), method(object({
59507
- deviceId: DeviceIdSchema,
59656
+ deviceId: DeviceIdSchema$1,
59508
59657
  on: boolean()
59509
59658
  }), _void(), {
59510
59659
  kind: "mutation",
59511
59660
  auth: "protected"
59512
59661
  }), method(object({
59513
- deviceId: DeviceIdSchema,
59662
+ deviceId: DeviceIdSchema$1,
59514
59663
  key: string().min(1),
59515
59664
  value: DishwasherValueSchema
59516
59665
  }), _void(), {
59517
59666
  kind: "mutation",
59518
59667
  auth: "protected"
59519
- }), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
59668
+ }), method(object({ deviceId: DeviceIdSchema$1 }), DishwasherOptionsSchema, { auth: "protected" });
59520
59669
  DeviceType.Camera;
59521
59670
  object({
59522
59671
  /** Ms epoch of the last press. null = never observed since this provider started. */
@@ -61954,7 +62103,8 @@ var TopologyNodeSchema = object({
61954
62103
  isHub: boolean(),
61955
62104
  isOnline: boolean(),
61956
62105
  cpuPercent: number(),
61957
- memoryPercent: number(),
62106
+ /** `null` when the node's memory read failed or it has not reported one (D393). */
62107
+ memoryPercent: number().nullable(),
61958
62108
  uptime: number(),
61959
62109
  lastSeen: string(),
61960
62110
  localIps: array(string()).readonly(),
@@ -62489,9 +62639,10 @@ object({
62489
62639
  * combined reading; per-hopper levels live in `food1`/`food2`. Null when
62490
62640
  * the device has not reported yet. */
62491
62641
  foodLevel: number().nullable().meta(readingMeta("none")),
62492
- /** Food in the BOWL as the feeder reports it (`state.bowl`), in the
62493
- * feeder's own units. Null when the model reports none. */
62494
- bowlFood: number().nullable().meta(readingMeta("none")),
62642
+ /** Food in the BOWL, a mass (stored in kilograms, D944). Reported only by a
62643
+ * feeder with a bowl scale; null when the model has none or its reading is
62644
+ * of an unproven unit. */
62645
+ bowlFood: number().nullable().meta(readingMeta("mass")),
62495
62646
  /** True while the pet is eating (`state.eating`). */
62496
62647
  eating: boolean(),
62497
62648
  /** Whether `markFoodReplenished` does anything on this model. When false
@@ -62604,6 +62755,64 @@ DeviceType.PetFeeder, method(object({
62604
62755
  kind: "mutation",
62605
62756
  auth: "protected"
62606
62757
  });
62758
+ object({
62759
+ /** Water in the tank, 0..100 (%). Null while the source has not reported. */
62760
+ waterLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
62761
+ /** Water in the tank, in litres. Null while the source has not reported. */
62762
+ waterVolume: number().min(0).nullable().meta(readingMeta("volume")),
62763
+ /** True when the tank is empty. Null while unknown. */
62764
+ empty: boolean().nullable(),
62765
+ /** True while the pump is running. Null while unknown. */
62766
+ pumpRunning: boolean().nullable(),
62767
+ /** True when the pump works on an on/off duty cycle rather than continuously. */
62768
+ pumpIntervalEnabled: boolean().nullable(),
62769
+ /** How long the pump runs per cycle, in seconds. */
62770
+ pumpOnTime: number().min(0).nullable().meta(readingMeta("duration")),
62771
+ /** How long the pump rests per cycle, in seconds. */
62772
+ pumpOffTime: number().min(0).nullable().meta(readingMeta("duration")),
62773
+ /** Water drunk in the last drink, in litres. */
62774
+ lastDrink: number().min(0).nullable().meta(readingMeta("volume")),
62775
+ /** Water drunk in the current hour, in litres. */
62776
+ currentHourDrink: number().min(0).nullable().meta(readingMeta("volume")),
62777
+ /** Water drunk over the last 24 hours (rolling), in litres. */
62778
+ last24hDrink: number().min(0).nullable().meta(readingMeta("volume")),
62779
+ /** Water drunk since local midnight, in litres. */
62780
+ todayDrink: number().min(0).nullable().meta(readingMeta("volume")),
62781
+ /** Decoded fault message. Null means healthy; a non-null string is an active fault. */
62782
+ error: string().nullable(),
62783
+ /** Ms epoch when the slice was last refreshed. */
62784
+ lastFetchedAt: number()
62785
+ });
62786
+ var DeviceIdSchema = number().int().nonnegative();
62787
+ var MinutesSchema = number().int().min(0);
62788
+ DeviceType.PetFountain, method(object({
62789
+ deviceId: DeviceIdSchema,
62790
+ on: boolean()
62791
+ }), _void(), {
62792
+ kind: "mutation",
62793
+ auth: "protected"
62794
+ }), method(object({
62795
+ deviceId: DeviceIdSchema,
62796
+ on: boolean()
62797
+ }), _void(), {
62798
+ kind: "mutation",
62799
+ auth: "protected"
62800
+ }), method(object({
62801
+ deviceId: DeviceIdSchema,
62802
+ minutes: MinutesSchema
62803
+ }), _void(), {
62804
+ kind: "mutation",
62805
+ auth: "protected"
62806
+ }), method(object({
62807
+ deviceId: DeviceIdSchema,
62808
+ minutes: MinutesSchema
62809
+ }), _void(), {
62810
+ kind: "mutation",
62811
+ auth: "protected"
62812
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
62813
+ kind: "mutation",
62814
+ auth: "protected"
62815
+ });
62607
62816
  var VehicleSchema = object({
62608
62817
  id: string(),
62609
62818
  name: string(),
@@ -67201,7 +67410,7 @@ discriminatedUnion("kind", [object({
67201
67410
  })]);
67202
67411
  DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
67203
67412
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
67204
- 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.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;
67413
+ 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;
67205
67414
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
67206
67415
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
67207
67416
  new Set(CAP_NAMES);
@@ -67352,7 +67561,7 @@ var AccessoryKind = {
67352
67561
  PrivacyMask: DeviceRole.PrivacyMask
67353
67562
  };
67354
67563
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
67355
- 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;
67564
+ 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;
67356
67565
  new Set(Object.values(DeviceType));
67357
67566
  Object.freeze({
67358
67567
  "accessories.getStatus": {
@@ -69287,6 +69496,13 @@ Object.freeze({
69287
69496
  access: "create",
69288
69497
  role: "admin"
69289
69498
  },
69499
+ "deviceExport.exposeEntity": {
69500
+ capName: "device-export",
69501
+ capScope: "system",
69502
+ addonId: null,
69503
+ access: "create",
69504
+ role: "admin"
69505
+ },
69290
69506
  "deviceExport.getDeviceLiveContribution": {
69291
69507
  capName: "device-export",
69292
69508
  capScope: "system",
@@ -69315,6 +69531,13 @@ Object.freeze({
69315
69531
  access: "view",
69316
69532
  role: "admin"
69317
69533
  },
69534
+ "deviceExport.listExposedEntities": {
69535
+ capName: "device-export",
69536
+ capScope: "system",
69537
+ addonId: null,
69538
+ access: "view",
69539
+ role: "admin"
69540
+ },
69318
69541
  "deviceExport.listSupportedDeviceKinds": {
69319
69542
  capName: "device-export",
69320
69543
  capScope: "system",
@@ -69322,6 +69545,13 @@ Object.freeze({
69322
69545
  access: "view",
69323
69546
  role: "admin"
69324
69547
  },
69548
+ "deviceExport.listSupportedEntityKinds": {
69549
+ capName: "device-export",
69550
+ capScope: "system",
69551
+ addonId: null,
69552
+ access: "view",
69553
+ role: "admin"
69554
+ },
69325
69555
  "deviceExport.unexposeDevice": {
69326
69556
  capName: "device-export",
69327
69557
  capScope: "system",
@@ -69329,6 +69559,13 @@ Object.freeze({
69329
69559
  access: "create",
69330
69560
  role: "admin"
69331
69561
  },
69562
+ "deviceExport.unexposeEntity": {
69563
+ capName: "device-export",
69564
+ capScope: "system",
69565
+ addonId: null,
69566
+ access: "create",
69567
+ role: "admin"
69568
+ },
69332
69569
  "deviceExtension.listCandidates": {
69333
69570
  capName: "device-extension",
69334
69571
  capScope: "device",
@@ -72794,6 +73031,48 @@ Object.freeze({
72794
73031
  access: "create",
72795
73032
  role: "viewer"
72796
73033
  },
73034
+ "petFountain.getStatus": {
73035
+ capName: "pet-fountain",
73036
+ capScope: "device",
73037
+ addonId: null,
73038
+ access: "view",
73039
+ role: "viewer"
73040
+ },
73041
+ "petFountain.resetDailyConsumption": {
73042
+ capName: "pet-fountain",
73043
+ capScope: "device",
73044
+ addonId: null,
73045
+ access: "delete",
73046
+ role: "viewer"
73047
+ },
73048
+ "petFountain.setPump": {
73049
+ capName: "pet-fountain",
73050
+ capScope: "device",
73051
+ addonId: null,
73052
+ access: "create",
73053
+ role: "viewer"
73054
+ },
73055
+ "petFountain.setPumpInterval": {
73056
+ capName: "pet-fountain",
73057
+ capScope: "device",
73058
+ addonId: null,
73059
+ access: "create",
73060
+ role: "viewer"
73061
+ },
73062
+ "petFountain.setPumpOffMinutes": {
73063
+ capName: "pet-fountain",
73064
+ capScope: "device",
73065
+ addonId: null,
73066
+ access: "create",
73067
+ role: "viewer"
73068
+ },
73069
+ "petFountain.setPumpOnMinutes": {
73070
+ capName: "pet-fountain",
73071
+ capScope: "device",
73072
+ addonId: null,
73073
+ access: "create",
73074
+ role: "viewer"
73075
+ },
72797
73076
  "pipelineAnalytics.addRetrainFrameFromRecording": {
72798
73077
  capName: "pipeline-analytics",
72799
73078
  capScope: "device",
@@ -75195,6 +75474,13 @@ Object.freeze({
75195
75474
  access: "create",
75196
75475
  role: "admin"
75197
75476
  },
75477
+ "serverManagement.getLaunchOverrides": {
75478
+ capName: "server-management",
75479
+ capScope: "system",
75480
+ addonId: null,
75481
+ access: "view",
75482
+ role: "admin"
75483
+ },
75198
75484
  "serverManagement.getServerPackageStatus": {
75199
75485
  capName: "server-management",
75200
75486
  capScope: "system",
@@ -75216,6 +75502,13 @@ Object.freeze({
75216
75502
  access: "create",
75217
75503
  role: "admin"
75218
75504
  },
75505
+ "serverManagement.setLaunchOverrides": {
75506
+ capName: "server-management",
75507
+ capScope: "system",
75508
+ addonId: null,
75509
+ access: "create",
75510
+ role: "admin"
75511
+ },
75219
75512
  "settingsStore.aggregate": {
75220
75513
  capName: "settings-store",
75221
75514
  capScope: "system",
@@ -79276,6 +79569,100 @@ var APPLIANCE_CAP_VOCABULARY = {
79276
79569
  }
79277
79570
  ]
79278
79571
  },
79572
+ "pet-fountain": {
79573
+ scope: "device",
79574
+ noun: t("Pet fountain", "Fontana per animali"),
79575
+ actions: [
79576
+ {
79577
+ id: "petFountain.pumpOn",
79578
+ method: "setPump",
79579
+ label: t("Pump on", "Pompa accesa"),
79580
+ phrase: t("Start the pump of {device}", "Avvia la pompa di {device}"),
79581
+ icon: "play",
79582
+ args: { on: true }
79583
+ },
79584
+ {
79585
+ id: "petFountain.pumpOff",
79586
+ method: "setPump",
79587
+ label: t("Pump off", "Pompa spenta"),
79588
+ phrase: t("Stop the pump of {device}", "Ferma la pompa di {device}"),
79589
+ icon: "square",
79590
+ args: { on: false }
79591
+ },
79592
+ {
79593
+ id: "petFountain.intervalOn",
79594
+ method: "setPumpInterval",
79595
+ label: t("Pump cycle on", "Ciclo pompa attivo"),
79596
+ phrase: t("Run the pump of {device} on its on/off cycle", "Fai lavorare la pompa di {device} a ciclo acceso/spento"),
79597
+ icon: "timer",
79598
+ args: { on: true }
79599
+ },
79600
+ {
79601
+ id: "petFountain.intervalOff",
79602
+ method: "setPumpInterval",
79603
+ label: t("Pump cycle off", "Ciclo pompa spento"),
79604
+ phrase: t("Run the pump of {device} continuously", "Fai lavorare la pompa di {device} in continuo"),
79605
+ icon: "timer-off",
79606
+ args: { on: false }
79607
+ },
79608
+ {
79609
+ id: "petFountain.pumpOnMinutes",
79610
+ method: "setPumpOnMinutes",
79611
+ label: t("Set pump run time", "Imposta il tempo di lavoro della pompa"),
79612
+ phrase: t("Set the pump of {device} to run {minutes} minutes per cycle", "Imposta la pompa di {device} a lavorare {minutes} minuti per ciclo"),
79613
+ icon: "timer",
79614
+ openArgs: [{
79615
+ key: "minutes",
79616
+ label: t("Minutes", "Minuti"),
79617
+ offer: {
79618
+ kind: "number",
79619
+ min: 0,
79620
+ step: 1,
79621
+ unit: "min"
79622
+ }
79623
+ }]
79624
+ },
79625
+ {
79626
+ id: "petFountain.pumpOffMinutes",
79627
+ method: "setPumpOffMinutes",
79628
+ label: t("Set pump rest time", "Imposta il tempo di riposo della pompa"),
79629
+ phrase: t("Set the pump of {device} to rest {minutes} minutes per cycle", "Imposta la pompa di {device} a riposare {minutes} minuti per ciclo"),
79630
+ icon: "timer-off",
79631
+ openArgs: [{
79632
+ key: "minutes",
79633
+ label: t("Minutes", "Minuti"),
79634
+ offer: {
79635
+ kind: "number",
79636
+ min: 0,
79637
+ step: 1,
79638
+ unit: "min"
79639
+ }
79640
+ }]
79641
+ },
79642
+ {
79643
+ id: "petFountain.resetDailyConsumption",
79644
+ method: "resetDailyConsumption",
79645
+ label: t("Clear daily consumption", "Azzera il consumo giornaliero"),
79646
+ phrase: t("Clear the daily water consumption of {device}", "Azzera il consumo giornaliero di acqua di {device}"),
79647
+ icon: "rotate-ccw"
79648
+ }
79649
+ ],
79650
+ state: [{
79651
+ kind: "boolean",
79652
+ field: "empty",
79653
+ label: t("Tank empty", "Serbatoio vuoto"),
79654
+ whenTrue: t("When the tank of {device} is empty", "Quando il serbatoio di {device} è vuoto"),
79655
+ whenFalse: t("When the tank of {device} is refilled", "Quando il serbatoio di {device} viene riempito"),
79656
+ icon: "droplet"
79657
+ }, {
79658
+ kind: "numeric",
79659
+ field: "waterLevel",
79660
+ quantity: t("the water level", "il livello dell’acqua"),
79661
+ label: t("Water level", "Livello dell’acqua"),
79662
+ unit: "%",
79663
+ icon: "droplets"
79664
+ }]
79665
+ },
79279
79666
  "media-player": {
79280
79667
  scope: "device",
79281
79668
  noun: t("Media player", "Lettore multimediale"),
@@ -81213,7 +81600,7 @@ function projectAction(cap, action) {
81213
81600
  };
81214
81601
  }
81215
81602
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
81216
- 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;
81603
+ 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;
81217
81604
  DeviceFeature.BatteryOperated;
81218
81605
  DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
81219
81606
  var HA_AS = "a power sensor (device_class power). Home Assistant has no laundry domain. running-state stays unexported until a null reading can be published as unavailable.";
@@ -82764,6 +83151,36 @@ Object.freeze({
82764
83151
  form: "single",
82765
83152
  optional: false
82766
83153
  }],
83154
+ "petFountain.getStatus": [{
83155
+ name: "deviceId",
83156
+ form: "single",
83157
+ optional: false
83158
+ }],
83159
+ "petFountain.resetDailyConsumption": [{
83160
+ name: "deviceId",
83161
+ form: "single",
83162
+ optional: false
83163
+ }],
83164
+ "petFountain.setPump": [{
83165
+ name: "deviceId",
83166
+ form: "single",
83167
+ optional: false
83168
+ }],
83169
+ "petFountain.setPumpInterval": [{
83170
+ name: "deviceId",
83171
+ form: "single",
83172
+ optional: false
83173
+ }],
83174
+ "petFountain.setPumpOffMinutes": [{
83175
+ name: "deviceId",
83176
+ form: "single",
83177
+ optional: false
83178
+ }],
83179
+ "petFountain.setPumpOnMinutes": [{
83180
+ name: "deviceId",
83181
+ form: "single",
83182
+ optional: false
83183
+ }],
82767
83184
  "pipelineAnalytics.addRetrainFrameFromRecording": [{
82768
83185
  name: "deviceId",
82769
83186
  form: "single",