@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.
- package/CHANGELOG.md +12 -0
- package/dist/{MotionZonesSettings-Dc4Kv4_B.mjs → MotionZonesSettings-Bb_BJah5.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-QuXzMphU.mjs → PrivacyMaskSettings-kCHid95c.mjs} +4 -4
- package/dist/{SceneMonitorEditor-DTMWWxoE.mjs → SceneMonitorEditor-BqNgh047.mjs} +3 -3
- package/dist/_stub.js +4629 -4284
- 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
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DF4vj9Lw.mjs +26 -0
- package/dist/addon-model-studio.css +1 -1
- package/dist/{hostInit-C5q4H84T.mjs → hostInit-DuXRhYzb.mjs} +2 -2
- package/dist/model-studio.addon.js +1284 -867
- package/dist/model-studio.addon.mjs +1284 -867
- package/dist/{player-overlays-CGbBkJ3j.mjs → player-overlays-CNVhS2-N.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-Cw4YAdTr.mjs → responsive-oPhme86z.mjs} +1 -1
- package/dist/{scene-monitor-copy-Dz9xLx8-.mjs → scene-monitor-copy-Ct1WyOQx.mjs} +1 -1
- package/dist/{square-Dyvwj3m5.mjs → square-WmNfgZ5W.mjs} +1 -1
- package/dist/{trash-2-CPAMsWG5.mjs → trash-2-BUJwssR_.mjs} +1 -1
- 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
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-COf25W99.mjs +0 -26
|
@@ -5463,6 +5463,14 @@ function object(shape, params) {
|
|
|
5463
5463
|
...normalizeParams(params)
|
|
5464
5464
|
});
|
|
5465
5465
|
}
|
|
5466
|
+
function strictObject(shape, params) {
|
|
5467
|
+
return new ZodObject({
|
|
5468
|
+
type: "object",
|
|
5469
|
+
shape,
|
|
5470
|
+
catchall: never(),
|
|
5471
|
+
...normalizeParams(params)
|
|
5472
|
+
});
|
|
5473
|
+
}
|
|
5466
5474
|
function looseObject(shape, params) {
|
|
5467
5475
|
return new ZodObject({
|
|
5468
5476
|
type: "object",
|
|
@@ -5842,7 +5850,7 @@ var ZodIssueCode = {
|
|
|
5842
5850
|
var ZodFirstPartyTypeKind;
|
|
5843
5851
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5844
5852
|
//#endregion
|
|
5845
|
-
//#region ../types/dist/sleep-
|
|
5853
|
+
//#region ../types/dist/sleep-6eG9C8Xl.mjs
|
|
5846
5854
|
/**
|
|
5847
5855
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5848
5856
|
* window to float samples (D455).
|
|
@@ -8730,65 +8738,6 @@ var MODEL_FORMATS = [
|
|
|
8730
8738
|
"pt",
|
|
8731
8739
|
"gguf"
|
|
8732
8740
|
];
|
|
8733
|
-
/**
|
|
8734
|
-
* Per-call node pinning for `ctx.api` capability calls.
|
|
8735
|
-
*
|
|
8736
|
-
* A capability call normally resolves to its DEFAULT provider — a `singleton`
|
|
8737
|
-
* cap resolves to the hub, a device-scoped cap to the device's owning node. To
|
|
8738
|
-
* query a SPECIFIC node's provider instead (e.g. a remote agent's own
|
|
8739
|
-
* in-process `platform-probe` hardware, which the hub cannot probe), pin the
|
|
8740
|
-
* call to that node.
|
|
8741
|
-
*
|
|
8742
|
-
* The nodeId rides OUT-OF-BAND in the tRPC call context (NOT in the validated
|
|
8743
|
-
* method args), so capability method signatures stay `nodeId`-free — node
|
|
8744
|
-
* targeting is a property of the CALL, not of the method. The transport lifts
|
|
8745
|
-
* it from `op.context` onto the `CapCallInput.nodeId` field (`ipcParentLink`),
|
|
8746
|
-
* and the hub parent's `onUnownedCall` passes it to the `CapRouteResolver`,
|
|
8747
|
-
* which classifies a pinned agent node as `agent-child-forward`
|
|
8748
|
-
* (`$agent-cap-fwd.forward` → the agent's in-process provider).
|
|
8749
|
-
*
|
|
8750
|
-
* Usage at a call site:
|
|
8751
|
-
*
|
|
8752
|
-
* await api.platformProbe.getCapabilities.query(undefined, nodePin(nodeId))
|
|
8753
|
-
*/
|
|
8754
|
-
/** tRPC `op.context` key carrying a per-call node pin. */
|
|
8755
|
-
var CAP_NODE_PIN_CONTEXT_KEY = "__camstackNodePin";
|
|
8756
|
-
/**
|
|
8757
|
-
* Build the tRPC request options that pin a single capability call to `nodeId`.
|
|
8758
|
-
* Pass as the second argument to `.query(input, …)` / `.mutate(input, …)`.
|
|
8759
|
-
*
|
|
8760
|
-
* ## The id is normalised here, and it has to be
|
|
8761
|
-
*
|
|
8762
|
-
* A forked addon reads its own node from `ctx.kernel.localNodeId`, and inside a
|
|
8763
|
-
* worker that value is a RUNNER id — `hub/export-hap`, not `hub`. Routing
|
|
8764
|
-
* compares a pin against real node ids, so such a pin matches nothing and the
|
|
8765
|
-
* call fails with `no provider registered for cap "…"`. The local-first
|
|
8766
|
-
* resolver already guarded against this (`localNodeId.split('/')[0]`), which
|
|
8767
|
-
* made the hazard invisible: unpinned calls worked, and only an explicit pin —
|
|
8768
|
-
* the thing you reach for when you specifically need THIS node — silently
|
|
8769
|
-
* addressed a node that does not exist.
|
|
8770
|
-
*
|
|
8771
|
-
* Cost of it being missing: `addon-export-hap` pinned `decoder.getInfo` to its
|
|
8772
|
-
* own node to read the host's hardware-decode backend. It never once answered,
|
|
8773
|
-
* so every HomeKit egress transcode decoded in SOFTWARE — including 4K H.265 —
|
|
8774
|
-
* while D67's whole premise was that the decoder addon is the authority on
|
|
8775
|
-
* hardware. The warn said `decoding in SOFTWARE` and read as "this node has no
|
|
8776
|
-
* hardware", which was false.
|
|
8777
|
-
*
|
|
8778
|
-
* Normalising in the ONE constructor fixes every caller at once, which is why
|
|
8779
|
-
* it is here and not at the call sites.
|
|
8780
|
-
*/
|
|
8781
|
-
function nodePin(nodeId) {
|
|
8782
|
-
return { context: { [CAP_NODE_PIN_CONTEXT_KEY]: toNodeId(nodeId) } };
|
|
8783
|
-
}
|
|
8784
|
-
/**
|
|
8785
|
-
* A runner id is `<nodeId>/<addonId>`; a node id has no slash. Taking the head
|
|
8786
|
-
* is idempotent, so passing an already-clean id costs nothing.
|
|
8787
|
-
*/
|
|
8788
|
-
function toNodeId(idOrRunnerId) {
|
|
8789
|
-
const head = idOrRunnerId.split("/")[0];
|
|
8790
|
-
return head === void 0 || head.length === 0 ? idOrRunnerId : head;
|
|
8791
|
-
}
|
|
8792
8741
|
object({
|
|
8793
8742
|
field: string().min(1),
|
|
8794
8743
|
on: literal("advance")
|
|
@@ -8877,6 +8826,128 @@ function optionalMethod(input, output, options) {
|
|
|
8877
8826
|
providerOptional: true
|
|
8878
8827
|
};
|
|
8879
8828
|
}
|
|
8829
|
+
/**
|
|
8830
|
+
* Per-call node pinning for `ctx.api` capability calls.
|
|
8831
|
+
*
|
|
8832
|
+
* A capability call normally resolves to its DEFAULT provider — a `singleton`
|
|
8833
|
+
* cap resolves to the hub, a device-scoped cap to the device's owning node. To
|
|
8834
|
+
* query a SPECIFIC node's provider instead (e.g. a remote agent's own
|
|
8835
|
+
* in-process `platform-probe` hardware, which the hub cannot probe), pin the
|
|
8836
|
+
* call to that node.
|
|
8837
|
+
*
|
|
8838
|
+
* The nodeId rides OUT-OF-BAND in the tRPC call context (NOT in the validated
|
|
8839
|
+
* method args), so capability method signatures stay `nodeId`-free — node
|
|
8840
|
+
* targeting is a property of the CALL, not of the method. The transport lifts
|
|
8841
|
+
* it from `op.context` onto the `CapCallInput.nodeId` field (`ipcParentLink`),
|
|
8842
|
+
* and the hub parent's `onUnownedCall` passes it to the `CapRouteResolver`,
|
|
8843
|
+
* which classifies a pinned agent node as `agent-child-forward`
|
|
8844
|
+
* (`$agent-cap-fwd.forward` → the agent's in-process provider).
|
|
8845
|
+
*
|
|
8846
|
+
* Usage at a call site:
|
|
8847
|
+
*
|
|
8848
|
+
* await api.platformProbe.getCapabilities.query(undefined, nodePin(nodeId))
|
|
8849
|
+
*/
|
|
8850
|
+
/** tRPC `op.context` key carrying a per-call node pin. */
|
|
8851
|
+
var CAP_NODE_PIN_CONTEXT_KEY = "__camstackNodePin";
|
|
8852
|
+
/**
|
|
8853
|
+
* Build the tRPC request options that pin a single capability call to `nodeId`.
|
|
8854
|
+
* Pass as the second argument to `.query(input, …)` / `.mutate(input, …)`.
|
|
8855
|
+
*
|
|
8856
|
+
* ## The id is normalised here, and it has to be
|
|
8857
|
+
*
|
|
8858
|
+
* A forked addon reads its own node from `ctx.kernel.localNodeId`, and inside a
|
|
8859
|
+
* worker that value is a RUNNER id — `hub/export-hap`, not `hub`. Routing
|
|
8860
|
+
* compares a pin against real node ids, so such a pin matches nothing and the
|
|
8861
|
+
* call fails with `no provider registered for cap "…"`. The local-first
|
|
8862
|
+
* resolver already guarded against this (`localNodeId.split('/')[0]`), which
|
|
8863
|
+
* made the hazard invisible: unpinned calls worked, and only an explicit pin —
|
|
8864
|
+
* the thing you reach for when you specifically need THIS node — silently
|
|
8865
|
+
* addressed a node that does not exist.
|
|
8866
|
+
*
|
|
8867
|
+
* Cost of it being missing: `addon-export-hap` pinned `decoder.getInfo` to its
|
|
8868
|
+
* own node to read the host's hardware-decode backend. It never once answered,
|
|
8869
|
+
* so every HomeKit egress transcode decoded in SOFTWARE — including 4K H.265 —
|
|
8870
|
+
* while D67's whole premise was that the decoder addon is the authority on
|
|
8871
|
+
* hardware. The warn said `decoding in SOFTWARE` and read as "this node has no
|
|
8872
|
+
* hardware", which was false.
|
|
8873
|
+
*
|
|
8874
|
+
* Normalising in the ONE constructor fixes every caller at once, which is why
|
|
8875
|
+
* it is here and not at the call sites.
|
|
8876
|
+
*/
|
|
8877
|
+
function nodePin(nodeId) {
|
|
8878
|
+
return { context: { [CAP_NODE_PIN_CONTEXT_KEY]: toNodeId(nodeId) } };
|
|
8879
|
+
}
|
|
8880
|
+
/**
|
|
8881
|
+
* A runner id is `<nodeId>/<addonId>`; a node id has no slash. Taking the head
|
|
8882
|
+
* is idempotent, so passing an already-clean id costs nothing.
|
|
8883
|
+
*/
|
|
8884
|
+
function toNodeId(idOrRunnerId) {
|
|
8885
|
+
const head = idOrRunnerId.split("/")[0];
|
|
8886
|
+
return head === void 0 || head.length === 0 ? idOrRunnerId : head;
|
|
8887
|
+
}
|
|
8888
|
+
/**
|
|
8889
|
+
* `addon-pages-source` — collection cap exposing per-provider raw page
|
|
8890
|
+
* declarations. Every addon that contributes a UI page registers a
|
|
8891
|
+
* provider here. The hub-side singleton aggregator (`addon-pages` cap,
|
|
8892
|
+
* see `addon-pages.cap.ts`) walks this collection, stamps versioned
|
|
8893
|
+
* `bundleUrl` values, and returns the enriched `AddonPageInfo[]` list
|
|
8894
|
+
* that admin-ui consumes.
|
|
8895
|
+
*
|
|
8896
|
+
* The split exists because the public listing has a different output
|
|
8897
|
+
* shape than the per-provider raw declarations, and we want both ends
|
|
8898
|
+
* to flow through codegen instead of relying on a hand-written wrapper.
|
|
8899
|
+
*/
|
|
8900
|
+
var AddonPageDeclarationSchema = object({
|
|
8901
|
+
id: string(),
|
|
8902
|
+
label: string(),
|
|
8903
|
+
icon: string(),
|
|
8904
|
+
path: string(),
|
|
8905
|
+
/**
|
|
8906
|
+
* Module Federation remote name — must match the `name` field on the
|
|
8907
|
+
* page addon's `federation()` plugin config. Used by admin-ui's
|
|
8908
|
+
* `<AddonPageLoader>` to call `loadRemote('<remoteName>/page')`.
|
|
8909
|
+
* Conventionally `addon_<id>_page` (snake_case; MF names cannot
|
|
8910
|
+
* contain hyphens).
|
|
8911
|
+
*/
|
|
8912
|
+
remoteName: string(),
|
|
8913
|
+
/**
|
|
8914
|
+
* Bundle filename inside the addon's `dist/` dir served at
|
|
8915
|
+
* `/api/addon-pages/<addonId>/<bundle>`. With Module Federation this
|
|
8916
|
+
* is always `'remoteEntry.js'`; the value is kept on the metadata so
|
|
8917
|
+
* the static-file route can compute an mtime-based cache-buster URL
|
|
8918
|
+
* without a separate filesystem stat.
|
|
8919
|
+
*/
|
|
8920
|
+
bundle: string(),
|
|
8921
|
+
/**
|
|
8922
|
+
* Sidebar section this page docks into. Well-known ids: `'detection'`,
|
|
8923
|
+
* `'cluster'`, `'administration'` — the page renders inside that group.
|
|
8924
|
+
* Any OTHER string creates (or joins) a custom section rendered after
|
|
8925
|
+
* the built-in groups; its label comes from `sectionLabel` (first
|
|
8926
|
+
* declaration wins), falling back to the id. Absent → the legacy
|
|
8927
|
+
* "Addon Pages" group.
|
|
8928
|
+
*/
|
|
8929
|
+
section: string().optional(),
|
|
8930
|
+
/** Display label for a CUSTOM `section` id (ignored for well-known ids). */
|
|
8931
|
+
sectionLabel: string().optional()
|
|
8932
|
+
});
|
|
8933
|
+
var addonPagesSourceCapability = {
|
|
8934
|
+
name: "addon-pages-source",
|
|
8935
|
+
scope: "system",
|
|
8936
|
+
mode: "collection",
|
|
8937
|
+
internal: true,
|
|
8938
|
+
methods: {
|
|
8939
|
+
/**
|
|
8940
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
8941
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
8942
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
8943
|
+
* consumer, the `addon-pages-aggregator` builtin, reads it via
|
|
8944
|
+
* `ctx.capabilities.getCollection('addon-pages-source')` — LOCAL-PROCESS
|
|
8945
|
+
* only, never tRPC (per `ctx.capabilities` seeing only the local
|
|
8946
|
+
* process). The public, enriched listing admin-ui actually consumes is
|
|
8947
|
+
* the separate `addon-pages` cap, unaffected by this change.
|
|
8948
|
+
*/
|
|
8949
|
+
listPages: method(_void(), array(AddonPageDeclarationSchema).readonly(), { auth: "admin" }) }
|
|
8950
|
+
};
|
|
8880
8951
|
var StaticDirOutputSchema$1 = object({ staticDir: string() });
|
|
8881
8952
|
var VersionOutputSchema$1 = object({ version: string() });
|
|
8882
8953
|
method(_void(), StaticDirOutputSchema$1, { auth: "admin" }), method(_void(), VersionOutputSchema$1, { auth: "admin" });
|
|
@@ -8902,6 +8973,27 @@ function customAction(input, output, options) {
|
|
|
8902
8973
|
...options?.caller ? { caller: "required" } : {}
|
|
8903
8974
|
};
|
|
8904
8975
|
}
|
|
8976
|
+
/**
|
|
8977
|
+
* The pipeline step-input shape and the run-result bridge, in a module that
|
|
8978
|
+
* imports nothing but zod and types.
|
|
8979
|
+
*
|
|
8980
|
+
* WHY A SEPARATE FILE (addon footprint, D28): both were declared in
|
|
8981
|
+
* `pipeline-executor.cap.ts`, whose import evaluates the whole executor schema
|
|
8982
|
+
* graph. An addon that only needs these two (the benchmark's `runPipelineTest`
|
|
8983
|
+
* action) paid ~130 MB of heap at load. `pipeline-executor.cap.ts` re-exports
|
|
8984
|
+
* them, so every existing import keeps working; addon server code takes them
|
|
8985
|
+
* from `@camstack/types/addon`.
|
|
8986
|
+
*/
|
|
8987
|
+
var PipelineStepInputSchema = lazy(() => object({
|
|
8988
|
+
addonId: string(),
|
|
8989
|
+
modelId: string().optional(),
|
|
8990
|
+
enabled: boolean().default(true),
|
|
8991
|
+
children: array(PipelineStepInputSchema).optional(),
|
|
8992
|
+
settings: record(string(), unknown()).optional(),
|
|
8993
|
+
jumpDeviceKey: string().optional()
|
|
8994
|
+
}));
|
|
8995
|
+
/** Typed bridge to the recursive `FrameResult` graph; validation is structural. */
|
|
8996
|
+
var PipelineRunResultBridge = custom();
|
|
8905
8997
|
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
8906
8998
|
var VersionOutputSchema = object({ version: string() });
|
|
8907
8999
|
method(_void(), StaticDirOutputSchema, { auth: "admin" }), method(_void(), VersionOutputSchema, { auth: "admin" });
|
|
@@ -9097,6 +9189,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
9097
9189
|
"osd",
|
|
9098
9190
|
"osd-manager",
|
|
9099
9191
|
"pet-feeder",
|
|
9192
|
+
"pet-fountain",
|
|
9100
9193
|
"pipeline-analytics",
|
|
9101
9194
|
"pipeline-executor",
|
|
9102
9195
|
"pipeline-orchestrator",
|
|
@@ -10376,6 +10469,56 @@ Object.freeze({
|
|
|
10376
10469
|
"valueType": "number"
|
|
10377
10470
|
}
|
|
10378
10471
|
],
|
|
10472
|
+
"pet-fountain": [
|
|
10473
|
+
{
|
|
10474
|
+
"path": "waterLevel",
|
|
10475
|
+
"valueType": "number"
|
|
10476
|
+
},
|
|
10477
|
+
{
|
|
10478
|
+
"path": "waterVolume",
|
|
10479
|
+
"valueType": "number"
|
|
10480
|
+
},
|
|
10481
|
+
{
|
|
10482
|
+
"path": "empty",
|
|
10483
|
+
"valueType": "boolean"
|
|
10484
|
+
},
|
|
10485
|
+
{
|
|
10486
|
+
"path": "pumpRunning",
|
|
10487
|
+
"valueType": "boolean"
|
|
10488
|
+
},
|
|
10489
|
+
{
|
|
10490
|
+
"path": "pumpIntervalEnabled",
|
|
10491
|
+
"valueType": "boolean"
|
|
10492
|
+
},
|
|
10493
|
+
{
|
|
10494
|
+
"path": "pumpOnTime",
|
|
10495
|
+
"valueType": "number"
|
|
10496
|
+
},
|
|
10497
|
+
{
|
|
10498
|
+
"path": "pumpOffTime",
|
|
10499
|
+
"valueType": "number"
|
|
10500
|
+
},
|
|
10501
|
+
{
|
|
10502
|
+
"path": "lastDrink",
|
|
10503
|
+
"valueType": "number"
|
|
10504
|
+
},
|
|
10505
|
+
{
|
|
10506
|
+
"path": "currentHourDrink",
|
|
10507
|
+
"valueType": "number"
|
|
10508
|
+
},
|
|
10509
|
+
{
|
|
10510
|
+
"path": "last24hDrink",
|
|
10511
|
+
"valueType": "number"
|
|
10512
|
+
},
|
|
10513
|
+
{
|
|
10514
|
+
"path": "todayDrink",
|
|
10515
|
+
"valueType": "number"
|
|
10516
|
+
},
|
|
10517
|
+
{
|
|
10518
|
+
"path": "error",
|
|
10519
|
+
"valueType": "string"
|
|
10520
|
+
}
|
|
10521
|
+
],
|
|
10379
10522
|
"power-meter": [
|
|
10380
10523
|
{
|
|
10381
10524
|
"path": "power",
|
|
@@ -10913,7 +11056,7 @@ object({
|
|
|
10913
11056
|
params: record(string(), union([string(), number()])).optional()
|
|
10914
11057
|
});
|
|
10915
11058
|
//#endregion
|
|
10916
|
-
//#region ../types/dist/err-msg-
|
|
11059
|
+
//#region ../types/dist/err-msg-DWXWc0Di.mjs
|
|
10917
11060
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
10918
11061
|
DeviceType["Camera"] = "camera";
|
|
10919
11062
|
DeviceType["Hub"] = "hub";
|
|
@@ -11005,6 +11148,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
11005
11148
|
* native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
|
|
11006
11149
|
* integrations sharing the same food/desiccant/hopper surface. */
|
|
11007
11150
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
11151
|
+
/** Pet water fountain — tank level, water drunk, pump and its duty cycle.
|
|
11152
|
+
* Installed with the `pet-fountain` cap. Reaches CamStack as loose entities
|
|
11153
|
+
* of a container and is BUILT as a composed device (D967). */
|
|
11154
|
+
DeviceType["PetFountain"] = "pet-fountain";
|
|
11008
11155
|
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
11009
11156
|
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
11010
11157
|
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
@@ -11265,7 +11412,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
11265
11412
|
return DeviceRole;
|
|
11266
11413
|
}({});
|
|
11267
11414
|
//#endregion
|
|
11268
|
-
//#region ../types/dist/composition-
|
|
11415
|
+
//#region ../types/dist/composition-kSuOifuG.mjs
|
|
11269
11416
|
/**
|
|
11270
11417
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
11271
11418
|
*
|
|
@@ -12350,12 +12497,28 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
|
12350
12497
|
])
|
|
12351
12498
|
})
|
|
12352
12499
|
]);
|
|
12353
|
-
var
|
|
12500
|
+
var forwardArgUnion = union([
|
|
12501
|
+
string(),
|
|
12502
|
+
number(),
|
|
12503
|
+
boolean(),
|
|
12504
|
+
strictObject({ ["$input"]: string().min(1) }),
|
|
12505
|
+
record(string().min(1), lazy(() => forwardArgUnion))
|
|
12506
|
+
]);
|
|
12507
|
+
var CompositionForwardArgSchema = forwardArgUnion;
|
|
12508
|
+
/**
|
|
12509
|
+
* `forward` (D659, amended by D967): one method of a BUILT capability is one
|
|
12510
|
+
* call of `cap.method` on `source`. Without `args` the built method's input
|
|
12511
|
+
* passes through minus `deviceId`; with `args` the template IS the source's
|
|
12512
|
+
* whole input. `deviceId` is always the source's own, never an argument.
|
|
12513
|
+
*/
|
|
12514
|
+
var CompositionForwardCommandSchema = object({
|
|
12354
12515
|
kind: literal("forward"),
|
|
12355
12516
|
source: CompositionSourceRefSchema,
|
|
12356
12517
|
cap: string().min(1),
|
|
12357
|
-
method: string().min(1)
|
|
12358
|
-
|
|
12518
|
+
method: string().min(1),
|
|
12519
|
+
args: record(string().min(1), CompositionForwardArgSchema).optional()
|
|
12520
|
+
});
|
|
12521
|
+
var CompositionCommandTargetSchema = discriminatedUnion("kind", [CompositionForwardCommandSchema, CompositionCodeSourceSchema]);
|
|
12359
12522
|
/** An item key inside an item-array cap (`consumables.items[<key>]`). */
|
|
12360
12523
|
var COMPOSITION_ITEM_KEY_RE = /^[a-z0-9][a-z0-9-]{0,47}$/;
|
|
12361
12524
|
/**
|
|
@@ -12365,7 +12528,13 @@ var COMPOSITION_ITEM_KEY_RE = /^[a-z0-9][a-z0-9-]{0,47}$/;
|
|
|
12365
12528
|
*/
|
|
12366
12529
|
var CompositionItemEntrySchema = object({
|
|
12367
12530
|
label: string().min(1).max(80),
|
|
12368
|
-
fields: record(string().min(1), CompositionFieldSourceSchema)
|
|
12531
|
+
fields: record(string().min(1), CompositionFieldSourceSchema),
|
|
12532
|
+
/**
|
|
12533
|
+
* What the cap's `reset` does for THIS item (consumables). Present = the item
|
|
12534
|
+
* is resettable and a `reset` call naming its key forwards here. The item key
|
|
12535
|
+
* selects the command, so it is never an argument: there is no pass-through.
|
|
12536
|
+
*/
|
|
12537
|
+
reset: CompositionForwardCommandSchema.optional()
|
|
12369
12538
|
});
|
|
12370
12539
|
var CompositionFeatureSchema = discriminatedUnion("kind", [object({
|
|
12371
12540
|
kind: literal("fields"),
|
|
@@ -12377,7 +12546,7 @@ var CompositionFeatureSchema = discriminatedUnion("kind", [object({
|
|
|
12377
12546
|
* owns the WHOLE array field: the composed value holds exactly these items.
|
|
12378
12547
|
*/
|
|
12379
12548
|
items: record(string().regex(COMPOSITION_ITEM_KEY_RE), CompositionItemEntrySchema).refine((items) => Object.keys(items).length <= 16, { message: `at most 16 items` }).optional(),
|
|
12380
|
-
/**
|
|
12549
|
+
/** Method name → what serves it. Only a BUILT capability takes commands (D967). */
|
|
12381
12550
|
commands: record(string().min(1), CompositionCommandTargetSchema).optional()
|
|
12382
12551
|
}), object({
|
|
12383
12552
|
kind: literal("passthrough"),
|
|
@@ -16456,120 +16625,478 @@ object({
|
|
|
16456
16625
|
lastError: string().nullable()
|
|
16457
16626
|
});
|
|
16458
16627
|
/**
|
|
16459
|
-
*
|
|
16460
|
-
* surface that admin-ui consumes through `useAddonPagesListPages()`.
|
|
16628
|
+
* notification-output — canonical, capability-gated notification delivery.
|
|
16461
16629
|
*
|
|
16462
|
-
*
|
|
16463
|
-
*
|
|
16464
|
-
*
|
|
16465
|
-
*
|
|
16466
|
-
*
|
|
16630
|
+
* Apprise-derived model (see
|
|
16631
|
+
* `docs/superpowers/specs/2026-07-03-notification-output-notifier-matrix.md`):
|
|
16632
|
+
* callers emit ONE canonical `Notification`; each provider declares a
|
|
16633
|
+
* per-kind capability descriptor (`TargetKind`), and the pure degrade
|
|
16634
|
+
* engine (`@camstack/types` `prepareNotification`) transcodes / degrades the
|
|
16635
|
+
* message to what the kind supports — callers never special-case a service.
|
|
16467
16636
|
*
|
|
16468
|
-
*
|
|
16469
|
-
*
|
|
16470
|
-
* provider
|
|
16471
|
-
*
|
|
16472
|
-
*
|
|
16637
|
+
* DESIGN DECISIONS (locked):
|
|
16638
|
+
* - Target CRUD lives on THIS cap (`upsertTarget` / `deleteTarget` /
|
|
16639
|
+
* `setTargetEnabled`), each provider persisting via the `settings-store`
|
|
16640
|
+
* cap. Rationale: the admin UI needs one uniform surface across the
|
|
16641
|
+
* notifiers addon AND the HA addon; the addon-`globalSettingsSchema`-array
|
|
16642
|
+
* alternative would fork the UI per addon and cannot host the
|
|
16643
|
+
* discovery→adopt flow.
|
|
16644
|
+
* - `listTargetKinds` / `listTargets` / `discoverTargets` return arrays →
|
|
16645
|
+
* the generated cap-mount auto-`concatCollection`-fans them across every
|
|
16646
|
+
* registered provider (notifiers addon + HA addon) so one catalog is
|
|
16647
|
+
* routable. `send` / `testTarget` / CRUD route to ONE provider by the
|
|
16648
|
+
* `addonId` the generated collection router extracts from the call input.
|
|
16649
|
+
* - `Attachment.bytes` is `Uint8Array`. Transport-safe: superjson (the tRPC
|
|
16650
|
+
* transformer) + UDS MsgPack both round-trip typed arrays — already used by
|
|
16651
|
+
* `storage` / `storage-provider` / `recording` caps over the same path. No
|
|
16652
|
+
* base64 fallback needed.
|
|
16653
|
+
*
|
|
16654
|
+
* TODO (deferred, closed-set change — separate decision): add
|
|
16655
|
+
* `providerKind: 'notify'` so notification providers surface on the unified
|
|
16656
|
+
* admin "Integrations" page.
|
|
16473
16657
|
*/
|
|
16474
|
-
var AddonPageDeclarationSchema$1 = object({
|
|
16475
|
-
id: string(),
|
|
16476
|
-
label: string(),
|
|
16477
|
-
icon: string(),
|
|
16478
|
-
path: string(),
|
|
16479
|
-
remoteName: string(),
|
|
16480
|
-
bundle: string(),
|
|
16481
|
-
section: string().optional(),
|
|
16482
|
-
sectionLabel: string().optional()
|
|
16483
|
-
});
|
|
16484
|
-
var AddonPageInfoSchema = object({
|
|
16485
|
-
addonId: string(),
|
|
16486
|
-
page: AddonPageDeclarationSchema$1,
|
|
16487
|
-
bundleUrl: string()
|
|
16488
|
-
});
|
|
16489
|
-
method(_void(), array(AddonPageInfoSchema).readonly());
|
|
16490
16658
|
/**
|
|
16491
|
-
*
|
|
16492
|
-
*
|
|
16493
|
-
|
|
16494
|
-
|
|
16495
|
-
|
|
16496
|
-
|
|
16659
|
+
* Zentik-derived typed-media enum — the superset across every kind. Each
|
|
16660
|
+
* adapter picks what it supports and the degrade engine filters the rest.
|
|
16661
|
+
*/
|
|
16662
|
+
var AttachmentMediaTypeSchema = _enum([
|
|
16663
|
+
"image",
|
|
16664
|
+
"video",
|
|
16665
|
+
"gif",
|
|
16666
|
+
"audio",
|
|
16667
|
+
"icon"
|
|
16668
|
+
]);
|
|
16669
|
+
/**
|
|
16670
|
+
* A single attachment. Exactly one of `url` (remote source, most adapters
|
|
16671
|
+
* prefer this) or `bytes` (inline source; required for Pushover-style
|
|
16672
|
+
* bytes-only kinds) MUST be present — the degrade engine expresses a
|
|
16673
|
+
* url→bytes fetch as a `needsFetch` directive the adapter executes.
|
|
16674
|
+
*/
|
|
16675
|
+
var AttachmentSchema = object({
|
|
16676
|
+
mediaType: AttachmentMediaTypeSchema,
|
|
16677
|
+
url: string().optional(),
|
|
16678
|
+
bytes: _instanceof(Uint8Array).optional(),
|
|
16679
|
+
mime: string().optional(),
|
|
16680
|
+
name: string().optional()
|
|
16681
|
+
}).refine((a) => a.url !== void 0 || a.bytes !== void 0, { message: "Attachment requires either `url` or `bytes`" });
|
|
16682
|
+
var NotificationFormatSchema = _enum([
|
|
16683
|
+
"text",
|
|
16684
|
+
"markdown",
|
|
16685
|
+
"html"
|
|
16686
|
+
]);
|
|
16687
|
+
/**
|
|
16688
|
+
* The CLOSED icon vocabulary an action button may use.
|
|
16497
16689
|
*
|
|
16498
|
-
*
|
|
16499
|
-
*
|
|
16500
|
-
*
|
|
16690
|
+
* A closed set, not a free string, and that is the whole point: an arbitrary
|
|
16691
|
+
* icon name is one that ntfy renders, zentik silently drops, and nobody
|
|
16692
|
+
* notices — the same class of gap as a zone vocabulary nothing produced
|
|
16693
|
+
* ([D35](../../../docs/decisions/adr-0035.md)). Every adapter maps this set or
|
|
16694
|
+
* declares `actionIcons: false` and the degrade engine strips the field.
|
|
16695
|
+
*
|
|
16696
|
+
* Named by INTENT, never by glyph. "check" would tie the vocabulary to one
|
|
16697
|
+
* renderer's icon set; "acknowledge" survives an adapter that draws it
|
|
16698
|
+
* differently.
|
|
16699
|
+
*
|
|
16700
|
+
* ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
|
|
16701
|
+
*
|
|
16702
|
+
* These names are for US. **No adapter may forward one verbatim.** Each maps
|
|
16703
|
+
* the whole set onto its own renderer's vocabulary through a
|
|
16704
|
+
* `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
|
|
16705
|
+
* fallback, so adding a member here fails every adapter's build until someone
|
|
16706
|
+
* decides its glyph, which is the only place that decision can be made
|
|
16707
|
+
* honestly.
|
|
16708
|
+
*
|
|
16709
|
+
* This paragraph is the bug. Zentik declared `actionIcons: true` and passed
|
|
16710
|
+
* `disarm` straight through; iOS feeds that string to
|
|
16711
|
+
* `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
|
|
16712
|
+
* and every snooze and alarm button arrived BLANK. A pass-through is not a
|
|
16713
|
+
* mapping, and "the field is documented" is not "the value renders".
|
|
16714
|
+
*
|
|
16715
|
+
* Adding a member is TRAIN-BOUND. The enum lives in the published
|
|
16716
|
+
* `@camstack/server` closure and the cap seam validates against the HUB's copy,
|
|
16717
|
+
* so an addon that emits a token the running hub does not know does not lose an
|
|
16718
|
+
* icon — its whole `send` fails Zod validation and the notification never
|
|
16719
|
+
* arrives. Never emit a new token from an addon before the train carrying it.
|
|
16501
16720
|
*/
|
|
16502
|
-
var
|
|
16721
|
+
var NotificationActionIconSchema = _enum([
|
|
16722
|
+
"acknowledge",
|
|
16723
|
+
"dismiss",
|
|
16724
|
+
"silence",
|
|
16725
|
+
"snooze",
|
|
16726
|
+
"view",
|
|
16727
|
+
"play",
|
|
16728
|
+
"open",
|
|
16729
|
+
"close",
|
|
16730
|
+
"lock",
|
|
16731
|
+
"unlock",
|
|
16732
|
+
"arm",
|
|
16733
|
+
"arm-home",
|
|
16734
|
+
"arm-away",
|
|
16735
|
+
"arm-night",
|
|
16736
|
+
"disarm",
|
|
16737
|
+
"light",
|
|
16738
|
+
"alert",
|
|
16739
|
+
"camera"
|
|
16740
|
+
]);
|
|
16741
|
+
/** A single tap-through action button. */
|
|
16742
|
+
var NotificationActionSchema = object({
|
|
16503
16743
|
id: string(),
|
|
16504
16744
|
label: string(),
|
|
16505
|
-
|
|
16506
|
-
|
|
16507
|
-
|
|
16508
|
-
* Module Federation remote name — must match the `name` field on the
|
|
16509
|
-
* page addon's `federation()` plugin config. Used by admin-ui's
|
|
16510
|
-
* `<AddonPageLoader>` to call `loadRemote('<remoteName>/page')`.
|
|
16511
|
-
* Conventionally `addon_<id>_page` (snake_case; MF names cannot
|
|
16512
|
-
* contain hyphens).
|
|
16513
|
-
*/
|
|
16514
|
-
remoteName: string(),
|
|
16745
|
+
url: string().optional(),
|
|
16746
|
+
/** Dropped by the degrade engine for a kind with `caps.actionIcons: false`. */
|
|
16747
|
+
icon: NotificationActionIconSchema.optional(),
|
|
16515
16748
|
/**
|
|
16516
|
-
*
|
|
16517
|
-
*
|
|
16518
|
-
*
|
|
16519
|
-
*
|
|
16520
|
-
*
|
|
16749
|
+
* Renders in a warning style where the notifier supports it.
|
|
16750
|
+
*
|
|
16751
|
+
* A HINT, never a gate. The callback's authority is its token and nothing
|
|
16752
|
+
* else — see `notification-center/action-token.ts` for what that does and
|
|
16753
|
+
* does not buy.
|
|
16521
16754
|
*/
|
|
16522
|
-
|
|
16755
|
+
destructive: boolean().optional(),
|
|
16523
16756
|
/**
|
|
16524
|
-
*
|
|
16525
|
-
*
|
|
16526
|
-
*
|
|
16527
|
-
* the
|
|
16528
|
-
*
|
|
16529
|
-
*
|
|
16757
|
+
* How the tap should REACH the url.
|
|
16758
|
+
*
|
|
16759
|
+
* `navigate` (absent, and every button authored before this field) opens it:
|
|
16760
|
+
* the phone leaves the notification and shows whatever the callback returns.
|
|
16761
|
+
* That is right for a button whose answer the operator wants to read.
|
|
16762
|
+
*
|
|
16763
|
+
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
16764
|
+
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
16765
|
+
* an answer to the notification, and being thrown into a browser tab to
|
|
16766
|
+
* confirm it costs more attention than the notification did. A backend that
|
|
16767
|
+
* cannot do a background call renders it as an ordinary link (the adapters
|
|
16768
|
+
* fall back rather than dropping the button), so this is a preference, never
|
|
16769
|
+
* a requirement.
|
|
16530
16770
|
*/
|
|
16531
|
-
|
|
16532
|
-
/** Display label for a CUSTOM `section` id (ignored for well-known ids). */
|
|
16533
|
-
sectionLabel: string().optional()
|
|
16771
|
+
mode: _enum(["navigate", "background"]).optional()
|
|
16534
16772
|
});
|
|
16535
|
-
|
|
16536
|
-
|
|
16537
|
-
|
|
16538
|
-
|
|
16539
|
-
|
|
16540
|
-
|
|
16541
|
-
|
|
16542
|
-
|
|
16543
|
-
|
|
16544
|
-
|
|
16545
|
-
|
|
16546
|
-
|
|
16547
|
-
|
|
16548
|
-
|
|
16549
|
-
|
|
16550
|
-
|
|
16551
|
-
|
|
16552
|
-
|
|
16553
|
-
|
|
16554
|
-
|
|
16555
|
-
|
|
16556
|
-
"
|
|
16557
|
-
"
|
|
16558
|
-
"
|
|
16559
|
-
"
|
|
16773
|
+
/** A delivery parameter value: what a notifier declared it takes. */
|
|
16774
|
+
var DeliveryParamValueSchema = union([
|
|
16775
|
+
string(),
|
|
16776
|
+
number(),
|
|
16777
|
+
boolean()
|
|
16778
|
+
]);
|
|
16779
|
+
/**
|
|
16780
|
+
* One extra delivery parameter a notifier KIND declares (D938). A rule that
|
|
16781
|
+
* addresses a target of that kind may set it; a kind that declares nothing is
|
|
16782
|
+
* never handed one. The admin UI derives its control from this descriptor —
|
|
16783
|
+
* no editor knows a service by name.
|
|
16784
|
+
*
|
|
16785
|
+
* Optional fields are `.optional()`, never `.default()` (a Zod default does not
|
|
16786
|
+
* run on the addon cap path).
|
|
16787
|
+
*/
|
|
16788
|
+
var DeliveryParamSchema = object({
|
|
16789
|
+
key: string().min(1),
|
|
16790
|
+
label: string(),
|
|
16791
|
+
/** i18n key of the label, resolved by the declaring addon's namespace. */
|
|
16792
|
+
labelKey: string().optional(),
|
|
16793
|
+
type: _enum([
|
|
16794
|
+
"enum",
|
|
16795
|
+
"number",
|
|
16796
|
+
"boolean",
|
|
16797
|
+
"string"
|
|
16560
16798
|
]),
|
|
16561
|
-
|
|
16562
|
-
|
|
16563
|
-
|
|
16564
|
-
|
|
16565
|
-
|
|
16566
|
-
|
|
16567
|
-
|
|
16568
|
-
|
|
16569
|
-
|
|
16799
|
+
/** `enum` only: the closed set of accepted values. */
|
|
16800
|
+
options: array(object({
|
|
16801
|
+
value: string(),
|
|
16802
|
+
label: string()
|
|
16803
|
+
})).optional(),
|
|
16804
|
+
/** `number` only. */
|
|
16805
|
+
min: number().optional(),
|
|
16806
|
+
max: number().optional(),
|
|
16807
|
+
/** What the notifier does when the rule sets nothing; shown as the placeholder. */
|
|
16808
|
+
default: DeliveryParamValueSchema.optional()
|
|
16570
16809
|
});
|
|
16571
16810
|
/**
|
|
16572
|
-
*
|
|
16811
|
+
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
16812
|
+
* `priority` is a 5-level ORDINAL (1=lowest … 3=normal(default) … 5=urgent),
|
|
16813
|
+
* NOT a fixed severity enum — each kind declares its own `caps.levels` and
|
|
16814
|
+
* the adapter maps this ordinal onto its native level. `level?` is an
|
|
16815
|
+
* optional kind-native level id (`emergency`, `silent`, …) that overrides
|
|
16816
|
+
* `priority` for that one target.
|
|
16817
|
+
*/
|
|
16818
|
+
var NotificationSchema = object({
|
|
16819
|
+
body: string(),
|
|
16820
|
+
title: string().optional(),
|
|
16821
|
+
format: NotificationFormatSchema.default("text"),
|
|
16822
|
+
priority: number().int().min(1).max(5).default(3),
|
|
16823
|
+
level: string().optional(),
|
|
16824
|
+
attachments: array(AttachmentSchema).optional(),
|
|
16825
|
+
clickUrl: string().optional(),
|
|
16826
|
+
actions: array(NotificationActionSchema).optional(),
|
|
16827
|
+
sound: string().optional(),
|
|
16828
|
+
ttl: number().optional(),
|
|
16829
|
+
tag: string().optional(),
|
|
16830
|
+
deviceId: number().optional(),
|
|
16831
|
+
eventId: string().optional(),
|
|
16832
|
+
metadata: record(string(), unknown()).optional(),
|
|
16833
|
+
/**
|
|
16834
|
+
* Values for the parameters the target's kind DECLARES in
|
|
16835
|
+
* {@link TargetKindSchema} `deliveryParams`. Already validated against the
|
|
16836
|
+
* declaration by the sender; a notifier reads only the keys it declared.
|
|
16837
|
+
*/
|
|
16838
|
+
delivery: record(string(), DeliveryParamValueSchema).optional()
|
|
16839
|
+
});
|
|
16840
|
+
/** One declared native severity/priority level for a kind. */
|
|
16841
|
+
var TargetKindLevelSchema = object({
|
|
16842
|
+
id: string(),
|
|
16843
|
+
label: string(),
|
|
16844
|
+
/** Which canonical priority (1..5) this level maps to. `null` = qualitative-only. */
|
|
16845
|
+
ordinal: number().int().min(1).max(5).nullable(),
|
|
16846
|
+
flags: object({
|
|
16847
|
+
critical: boolean().optional(),
|
|
16848
|
+
silent: boolean().optional(),
|
|
16849
|
+
noPush: boolean().optional()
|
|
16850
|
+
}).optional(),
|
|
16851
|
+
/** e.g. Pushover `emergency` requires `retry` / `expire`. */
|
|
16852
|
+
requires: array(string()).optional(),
|
|
16853
|
+
description: string().optional()
|
|
16854
|
+
});
|
|
16855
|
+
/** The full capability block consulted before dispatch. */
|
|
16856
|
+
var TargetKindCapsSchema = object({
|
|
16857
|
+
attachments: object({
|
|
16858
|
+
mediaTypes: array(AttachmentMediaTypeSchema),
|
|
16859
|
+
mode: _enum([
|
|
16860
|
+
"url",
|
|
16861
|
+
"bytes",
|
|
16862
|
+
"both"
|
|
16863
|
+
]),
|
|
16864
|
+
max: number().int().nonnegative(),
|
|
16865
|
+
maxBytes: number().int().positive().optional()
|
|
16866
|
+
}),
|
|
16867
|
+
/** Max action buttons (0 = none). */
|
|
16868
|
+
actions: number().int().nonnegative(),
|
|
16869
|
+
/**
|
|
16870
|
+
* Whether this kind renders a per-action ICON.
|
|
16871
|
+
*
|
|
16872
|
+
* `.optional()`, deliberately NOT `.default(false)`: a Zod default does not
|
|
16873
|
+
* run on the addon cap path — three production failures in one day taught
|
|
16874
|
+
* this repo that once. Absent is read as false by the degrade engine, which
|
|
16875
|
+
* is the safe direction: an icon that is not rendered costs nothing, an icon
|
|
16876
|
+
* assumed and dropped costs the operator's trust in the field.
|
|
16877
|
+
*/
|
|
16878
|
+
actionIcons: boolean().optional(),
|
|
16879
|
+
levels: array(TargetKindLevelSchema),
|
|
16880
|
+
format: array(NotificationFormatSchema),
|
|
16881
|
+
clickUrl: boolean(),
|
|
16882
|
+
sound: boolean(),
|
|
16883
|
+
ttl: boolean(),
|
|
16884
|
+
bodyMaxLen: number().int().positive()
|
|
16885
|
+
});
|
|
16886
|
+
/**
|
|
16887
|
+
* `configSchema` is a `ConfigUISchema` tree passed through to the admin
|
|
16888
|
+
* FormBuilder. Stored as `z.unknown()` at the cap seam (mirrors
|
|
16889
|
+
* `device-provider.getChildCreationSchema` `CreationSchemaOutputSchema`) —
|
|
16890
|
+
* the union is large and not meant for runtime validation here; the exported
|
|
16891
|
+
* `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
|
|
16892
|
+
*/
|
|
16893
|
+
var ConfigSchemaPassthrough$3 = unknown();
|
|
16894
|
+
var TargetKindSchema = object({
|
|
16895
|
+
kind: string(),
|
|
16896
|
+
label: string(),
|
|
16897
|
+
icon: string(),
|
|
16898
|
+
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
16899
|
+
addonId: string(),
|
|
16900
|
+
/**
|
|
16901
|
+
* URL of the kind's bundled BRAND icon, served by the providing addon over
|
|
16902
|
+
* its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
|
|
16903
|
+
* when the addon bundles no icon for that kind — the client then falls back
|
|
16904
|
+
* to a neutral glyph rather than rendering the raw `icon` NAME as text.
|
|
16905
|
+
*
|
|
16906
|
+
* Root-relative on purpose: it resolves against whatever origin serves a web
|
|
16907
|
+
* client, and a native client joins it onto its own hub base.
|
|
16908
|
+
*
|
|
16909
|
+
* DECLARED here deliberately. It used to travel as an undeclared passthrough
|
|
16910
|
+
* field that survived only because the runtime cap-router forwards provider
|
|
16911
|
+
* output verbatim — so every consumer had to re-declare it by hand to stop
|
|
16912
|
+
* its own Zod parse from stripping it, and the whole arrangement would have
|
|
16913
|
+
* broken silently the moment output validation was tightened anywhere.
|
|
16914
|
+
*/
|
|
16915
|
+
iconUrl: string().optional(),
|
|
16916
|
+
/**
|
|
16917
|
+
* Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
|
|
16918
|
+
*
|
|
16919
|
+
* The server knows this and therefore says it, because the client cannot
|
|
16920
|
+
* safely guess: a React-Native client renders SVG and raster through two
|
|
16921
|
+
* DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
|
|
16922
|
+
* not decode SVG on iOS/Android), so without this it silently fell back to a
|
|
16923
|
+
* placeholder glyph for every vector icon while the web build looked fine.
|
|
16924
|
+
*
|
|
16925
|
+
* Absent when {@link iconUrl} is absent, or for a legacy provider that has
|
|
16926
|
+
* not been updated — a client that cannot determine the type should prefer
|
|
16927
|
+
* its raster path, which is the safe default for an unknown image.
|
|
16928
|
+
*/
|
|
16929
|
+
iconMediaType: string().optional(),
|
|
16930
|
+
configSchema: ConfigSchemaPassthrough$3,
|
|
16931
|
+
/**
|
|
16932
|
+
* The config keys that decide WHERE this kind's secrets are sent (server,
|
|
16933
|
+
* base URL, instance, chat, recipient). A save that changes any of them
|
|
16934
|
+
* while leaving a secret redacted is refused by the provider (D634), so an
|
|
16935
|
+
* editor uses this to ask for the secret on exactly those edits instead of
|
|
16936
|
+
* on every edit.
|
|
16937
|
+
*
|
|
16938
|
+
* Optional: absent from a provider that holds no secret (the Home Assistant
|
|
16939
|
+
* kinds) and from a provider older than this field — an editor that finds
|
|
16940
|
+
* it absent must assume ANY edit may need the secret.
|
|
16941
|
+
*/
|
|
16942
|
+
destinationKeys: array(string()).optional(),
|
|
16943
|
+
supportsDiscovery: boolean(),
|
|
16944
|
+
/**
|
|
16945
|
+
* Extra delivery parameters a rule may set for a target of this kind (D938).
|
|
16946
|
+
* Absent = none; the rule editor then offers nothing.
|
|
16947
|
+
*/
|
|
16948
|
+
deliveryParams: array(DeliveryParamSchema).optional(),
|
|
16949
|
+
caps: TargetKindCapsSchema
|
|
16950
|
+
});
|
|
16951
|
+
/**
|
|
16952
|
+
* A persisted target. `config` holds secrets; providers REDACT secret fields
|
|
16953
|
+
* (return a presence marker only) when serving `listTargets` — never
|
|
16954
|
+
* round-trip a stored secret to the UI.
|
|
16955
|
+
*/
|
|
16956
|
+
var TargetSchema = object({
|
|
16957
|
+
id: string(),
|
|
16958
|
+
name: string(),
|
|
16959
|
+
kind: string(),
|
|
16960
|
+
addonId: string(),
|
|
16961
|
+
enabled: boolean(),
|
|
16962
|
+
config: record(string(), unknown())
|
|
16963
|
+
});
|
|
16964
|
+
/** A discovery-surfaced candidate (config is partial + non-secret). */
|
|
16965
|
+
var DiscoveredTargetSchema = object({
|
|
16966
|
+
kind: string(),
|
|
16967
|
+
suggestedName: string(),
|
|
16968
|
+
config: record(string(), unknown())
|
|
16969
|
+
});
|
|
16970
|
+
/** The degrade engine's report — what was resolved / dropped / degraded. */
|
|
16971
|
+
var RenderedAsSchema = object({
|
|
16972
|
+
level: string(),
|
|
16973
|
+
format: NotificationFormatSchema,
|
|
16974
|
+
attachmentsSent: number().int().nonnegative(),
|
|
16975
|
+
actionsSent: number().int().nonnegative(),
|
|
16976
|
+
truncated: boolean(),
|
|
16977
|
+
dropped: array(string())
|
|
16978
|
+
});
|
|
16979
|
+
var SendResultSchema = object({
|
|
16980
|
+
success: boolean(),
|
|
16981
|
+
error: string().optional(),
|
|
16982
|
+
renderedAs: RenderedAsSchema.optional()
|
|
16983
|
+
});
|
|
16984
|
+
/** Same shape as SendResult — kept as a distinct name for the test panel. */
|
|
16985
|
+
var TestResultSchema = SendResultSchema;
|
|
16986
|
+
/**
|
|
16987
|
+
* Pre-save credential probe against a partial (unsaved) target config.
|
|
16988
|
+
* `resolvedUrl` never includes secrets (token stripped from path).
|
|
16989
|
+
*/
|
|
16990
|
+
var ProbeTargetConfigResultSchema = object({
|
|
16991
|
+
ok: boolean(),
|
|
16992
|
+
resolvedUrl: string(),
|
|
16993
|
+
httpStatus: number().int().optional(),
|
|
16994
|
+
stateInstance: string().optional(),
|
|
16995
|
+
error: string().optional()
|
|
16996
|
+
});
|
|
16997
|
+
method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSchema), { auth: "admin" }), method(object({ targetId: string() }), TargetSchema, { auth: "admin" }), method(object({
|
|
16998
|
+
kind: string(),
|
|
16999
|
+
config: record(string(), unknown()).optional(),
|
|
17000
|
+
/**
|
|
17001
|
+
* When editing / duplicating, the blank password field never round-trips
|
|
17002
|
+
* the stored token. Pass the source target id so the provider can restore
|
|
17003
|
+
* secrets server-side before dialling (same merge as upsert).
|
|
17004
|
+
*/
|
|
17005
|
+
targetId: string().optional()
|
|
17006
|
+
}), array(DiscoveredTargetSchema), { auth: "admin" }), method(object({
|
|
17007
|
+
kind: string(),
|
|
17008
|
+
config: record(string(), unknown()),
|
|
17009
|
+
/** See `discoverTargets.targetId` — restore stored secrets for a blank password. */
|
|
17010
|
+
targetId: string().optional()
|
|
17011
|
+
}), ProbeTargetConfigResultSchema, {
|
|
17012
|
+
kind: "mutation",
|
|
17013
|
+
auth: "admin"
|
|
17014
|
+
}), method(object({
|
|
17015
|
+
targetId: string(),
|
|
17016
|
+
notification: NotificationSchema
|
|
17017
|
+
}), SendResultSchema, {
|
|
17018
|
+
kind: "mutation",
|
|
17019
|
+
auth: "admin"
|
|
17020
|
+
}), method(object({
|
|
17021
|
+
targetId: string(),
|
|
17022
|
+
sample: NotificationSchema.optional()
|
|
17023
|
+
}), TestResultSchema, {
|
|
17024
|
+
kind: "mutation",
|
|
17025
|
+
auth: "admin"
|
|
17026
|
+
}), method(object({
|
|
17027
|
+
target: TargetSchema,
|
|
17028
|
+
/**
|
|
17029
|
+
* Duplicate flow: create a NEW target id while copying secrets from an
|
|
17030
|
+
* existing row. The UI never holds the stored token; blank / redacted
|
|
17031
|
+
* password fields are restored from this source (D634 still applies if
|
|
17032
|
+
* destinations diverge without a re-typed secret).
|
|
17033
|
+
*/
|
|
17034
|
+
cloneSecretsFrom: string().optional()
|
|
17035
|
+
}), TargetSchema, {
|
|
17036
|
+
kind: "mutation",
|
|
17037
|
+
auth: "admin"
|
|
17038
|
+
}), method(object({ targetId: string() }), _void(), {
|
|
17039
|
+
kind: "mutation",
|
|
17040
|
+
auth: "admin"
|
|
17041
|
+
}), method(object({
|
|
17042
|
+
targetId: string(),
|
|
17043
|
+
enabled: boolean()
|
|
17044
|
+
}), _void(), {
|
|
17045
|
+
kind: "mutation",
|
|
17046
|
+
auth: "admin"
|
|
17047
|
+
});
|
|
17048
|
+
/**
|
|
17049
|
+
* `addon-pages` — system-scoped singleton aggregator cap. Public-facing
|
|
17050
|
+
* surface that admin-ui consumes through `useAddonPagesListPages()`.
|
|
17051
|
+
*
|
|
17052
|
+
* The provider iterates every `addon-pages-source` (collection) provider
|
|
17053
|
+
* and emits `AddonPageInfo[]` enriched with versioned `bundleUrl` strings
|
|
17054
|
+
* pointing at `/api/addon-pages/<addonId>/<bundle>?v=<mtime>`. The
|
|
17055
|
+
* filesystem `mtime` cache-buster lets the browser pick up addon
|
|
17056
|
+
* rebuilds without manual reload.
|
|
17057
|
+
*
|
|
17058
|
+
* The hub-local builtin `addon-pages-aggregator` (see
|
|
17059
|
+
* `@camstack/system/builtins/addon-pages-aggregator`) registers the
|
|
17060
|
+
* provider. Splitting the public aggregator from the raw collection
|
|
17061
|
+
* keeps both ends in codegen — there's no hand-written
|
|
17062
|
+
* `addon-pages.router.ts` wrapper anymore.
|
|
17063
|
+
*/
|
|
17064
|
+
var AddonPageDeclarationSchema$1 = object({
|
|
17065
|
+
id: string(),
|
|
17066
|
+
label: string(),
|
|
17067
|
+
icon: string(),
|
|
17068
|
+
path: string(),
|
|
17069
|
+
remoteName: string(),
|
|
17070
|
+
bundle: string(),
|
|
17071
|
+
section: string().optional(),
|
|
17072
|
+
sectionLabel: string().optional()
|
|
17073
|
+
});
|
|
17074
|
+
var AddonPageInfoSchema = object({
|
|
17075
|
+
addonId: string(),
|
|
17076
|
+
page: AddonPageDeclarationSchema$1,
|
|
17077
|
+
bundleUrl: string()
|
|
17078
|
+
});
|
|
17079
|
+
method(_void(), array(AddonPageInfoSchema).readonly());
|
|
17080
|
+
var AddonHttpRouteSchema = object({
|
|
17081
|
+
method: _enum([
|
|
17082
|
+
"GET",
|
|
17083
|
+
"POST",
|
|
17084
|
+
"PUT",
|
|
17085
|
+
"DELETE",
|
|
17086
|
+
"PATCH"
|
|
17087
|
+
]),
|
|
17088
|
+
path: string(),
|
|
17089
|
+
access: _enum([
|
|
17090
|
+
"public",
|
|
17091
|
+
"authenticated",
|
|
17092
|
+
"admin"
|
|
17093
|
+
]).optional(),
|
|
17094
|
+
description: string().optional(),
|
|
17095
|
+
/** The hub limits this route per client address before the handler runs. */
|
|
17096
|
+
rateLimit: _enum(["auth"]).optional()
|
|
17097
|
+
});
|
|
17098
|
+
/**
|
|
17099
|
+
* Cross-process route invocation envelope. The hub captures the
|
|
16573
17100
|
* request as plain data, ships it to the worker via Moleculer, and
|
|
16574
17101
|
* the worker runs the local handler against a capturing reply. The
|
|
16575
17102
|
* envelope returned describes what the handler intended (status,
|
|
@@ -19092,7 +19619,11 @@ var CompositionProblemSchema = object({
|
|
|
19092
19619
|
"mixed-quantity",
|
|
19093
19620
|
"helper-mismatch",
|
|
19094
19621
|
"member-constraint",
|
|
19095
|
-
"retention"
|
|
19622
|
+
"retention",
|
|
19623
|
+
"command-method-unknown",
|
|
19624
|
+
"command-source-unknown",
|
|
19625
|
+
"command-input-unknown",
|
|
19626
|
+
"command-input-missing"
|
|
19096
19627
|
]),
|
|
19097
19628
|
path: string(),
|
|
19098
19629
|
message: string()
|
|
@@ -19131,7 +19662,9 @@ var CompositionFieldRoleSchema = _enum([
|
|
|
19131
19662
|
var CompositionFieldItemSchema = object({
|
|
19132
19663
|
arrayPath: string(),
|
|
19133
19664
|
key: string(),
|
|
19134
|
-
label: string()
|
|
19665
|
+
label: string(),
|
|
19666
|
+
/** True when the item carries a `reset` forward: the composer writes `resettable` from this (D967). */
|
|
19667
|
+
resettable: boolean().optional()
|
|
19135
19668
|
});
|
|
19136
19669
|
var CompositionFieldPlanSchema = object({
|
|
19137
19670
|
cap: string(),
|
|
@@ -19336,7 +19869,7 @@ Object.freeze({
|
|
|
19336
19869
|
* One catalog row per base reading a group helper can build (D944 §3).
|
|
19337
19870
|
* Data, not a form default written into the block.
|
|
19338
19871
|
*/
|
|
19339
|
-
var NOW$
|
|
19872
|
+
var NOW$3 = {
|
|
19340
19873
|
fieldPath: "lastFetchedAt",
|
|
19341
19874
|
expr: "now"
|
|
19342
19875
|
};
|
|
@@ -19388,7 +19921,7 @@ var GROUP_TEMPLATES = [
|
|
|
19388
19921
|
quantity: "temperature",
|
|
19389
19922
|
defaultAggregate: "mean",
|
|
19390
19923
|
empty: "null",
|
|
19391
|
-
companions: [NOW$
|
|
19924
|
+
companions: [NOW$3],
|
|
19392
19925
|
alsoFrom: {
|
|
19393
19926
|
deviceTypes: CLIMATE_DEVICES,
|
|
19394
19927
|
accept: {
|
|
@@ -19406,7 +19939,7 @@ var GROUP_TEMPLATES = [
|
|
|
19406
19939
|
quantity: "humidity",
|
|
19407
19940
|
defaultAggregate: "mean",
|
|
19408
19941
|
empty: "null",
|
|
19409
|
-
companions: [NOW$
|
|
19942
|
+
companions: [NOW$3],
|
|
19410
19943
|
alsoFrom: {
|
|
19411
19944
|
deviceTypes: CLIMATE_DEVICES,
|
|
19412
19945
|
accept: {
|
|
@@ -19424,7 +19957,7 @@ var GROUP_TEMPLATES = [
|
|
|
19424
19957
|
quantity: "pressure",
|
|
19425
19958
|
defaultAggregate: "mean",
|
|
19426
19959
|
empty: "null",
|
|
19427
|
-
companions: [NOW$
|
|
19960
|
+
companions: [NOW$3]
|
|
19428
19961
|
}),
|
|
19429
19962
|
numeric({
|
|
19430
19963
|
id: "illuminance",
|
|
@@ -19435,7 +19968,7 @@ var GROUP_TEMPLATES = [
|
|
|
19435
19968
|
quantity: "illuminance",
|
|
19436
19969
|
defaultAggregate: "mean",
|
|
19437
19970
|
empty: "null",
|
|
19438
|
-
companions: [NOW$
|
|
19971
|
+
companions: [NOW$3]
|
|
19439
19972
|
}),
|
|
19440
19973
|
numeric({
|
|
19441
19974
|
id: "power",
|
|
@@ -19446,7 +19979,7 @@ var GROUP_TEMPLATES = [
|
|
|
19446
19979
|
quantity: "power",
|
|
19447
19980
|
defaultAggregate: "sum",
|
|
19448
19981
|
empty: "omit",
|
|
19449
|
-
companions: [NOW$
|
|
19982
|
+
companions: [NOW$3]
|
|
19450
19983
|
}),
|
|
19451
19984
|
numeric({
|
|
19452
19985
|
id: "energy",
|
|
@@ -19457,7 +19990,7 @@ var GROUP_TEMPLATES = [
|
|
|
19457
19990
|
quantity: "energy",
|
|
19458
19991
|
defaultAggregate: "sum",
|
|
19459
19992
|
empty: "omit",
|
|
19460
|
-
companions: [NOW$
|
|
19993
|
+
companions: [NOW$3]
|
|
19461
19994
|
}),
|
|
19462
19995
|
numeric({
|
|
19463
19996
|
id: "battery",
|
|
@@ -19492,7 +20025,7 @@ var GROUP_TEMPLATES = [
|
|
|
19492
20025
|
quantity: "device",
|
|
19493
20026
|
defaultAggregate: "mean",
|
|
19494
20027
|
empty: "null",
|
|
19495
|
-
companions: [NOW$
|
|
20028
|
+
companions: [NOW$3]
|
|
19496
20029
|
}),
|
|
19497
20030
|
binary({
|
|
19498
20031
|
id: "motion",
|
|
@@ -21866,12 +22399,48 @@ var ExposeInputSchema = object({
|
|
|
21866
22399
|
capabilities: array(string()).optional()
|
|
21867
22400
|
});
|
|
21868
22401
|
var UnexposeInputSchema = object({ deviceId: string() });
|
|
22402
|
+
/**
|
|
22403
|
+
* What an exporter may expose besides devices (D968). An action and a
|
|
22404
|
+
* notification target are LIST ENTRIES, never devices (D954): they enter an
|
|
22405
|
+
* exporter's own selection, not the device registry.
|
|
22406
|
+
*/
|
|
22407
|
+
var ExportEntityKindSchema = _enum([
|
|
22408
|
+
"device",
|
|
22409
|
+
"action",
|
|
22410
|
+
"notifier"
|
|
22411
|
+
]);
|
|
22412
|
+
var ExportEntityRefSchema = discriminatedUnion("kind", [
|
|
22413
|
+
object({
|
|
22414
|
+
kind: literal("device"),
|
|
22415
|
+
deviceId: string()
|
|
22416
|
+
}),
|
|
22417
|
+
object({
|
|
22418
|
+
kind: literal("action"),
|
|
22419
|
+
actionId: string().min(1)
|
|
22420
|
+
}),
|
|
22421
|
+
object({
|
|
22422
|
+
kind: literal("notifier"),
|
|
22423
|
+
targetId: string().min(1)
|
|
22424
|
+
})
|
|
22425
|
+
]);
|
|
22426
|
+
var ExposedEntitySchema = object({
|
|
22427
|
+
entity: ExportEntityRefSchema,
|
|
22428
|
+
exposedAs: string().optional()
|
|
22429
|
+
});
|
|
22430
|
+
var ExposeEntityInputSchema = object({ entity: ExportEntityRefSchema });
|
|
22431
|
+
var UnexposeEntityInputSchema = object({ entity: ExportEntityRefSchema });
|
|
21869
22432
|
method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), {
|
|
21870
22433
|
kind: "mutation",
|
|
21871
22434
|
auth: "admin"
|
|
21872
22435
|
}), method(UnexposeInputSchema, _void(), {
|
|
21873
22436
|
kind: "mutation",
|
|
21874
22437
|
auth: "admin"
|
|
22438
|
+
}), optionalMethod(_void(), array(ExportEntityKindSchema)), optionalMethod(_void(), array(ExposedEntitySchema)), optionalMethod(ExposeEntityInputSchema, _void(), {
|
|
22439
|
+
kind: "mutation",
|
|
22440
|
+
auth: "admin"
|
|
22441
|
+
}), optionalMethod(UnexposeEntityInputSchema, _void(), {
|
|
22442
|
+
kind: "mutation",
|
|
22443
|
+
auth: "admin"
|
|
21875
22444
|
});
|
|
21876
22445
|
/** Lucide category ids, alphabetical. `ICON_META` indexes into this. */
|
|
21877
22446
|
var ICON_CATEGORY_IDS = [
|
|
@@ -43740,7 +44309,7 @@ var LlmProviderWidgetSchema = object({
|
|
|
43740
44309
|
/** ConfigUISchema tree passed through untyped on the wire (the
|
|
43741
44310
|
* notification-output `ConfigSchemaPassthrough` precedent at
|
|
43742
44311
|
* notification-output.cap.ts:151); the exported TS type re-tightens it. */
|
|
43743
|
-
var ConfigSchemaPassthrough$
|
|
44312
|
+
var ConfigSchemaPassthrough$2 = unknown();
|
|
43744
44313
|
var LlmProfileKindDescriptorSchema = object({
|
|
43745
44314
|
kind: LlmProfileKindSchema,
|
|
43746
44315
|
label: string(),
|
|
@@ -43749,9 +44318,9 @@ var LlmProfileKindDescriptorSchema = object({
|
|
|
43749
44318
|
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
43750
44319
|
addonId: string(),
|
|
43751
44320
|
/** The provider's own fields (`providerConfig`); `password` fields are keychain-held. */
|
|
43752
|
-
connectionSchema: ConfigSchemaPassthrough$
|
|
44321
|
+
connectionSchema: ConfigSchemaPassthrough$2,
|
|
43753
44322
|
/** Provider fields that belong under "Advanced" (extra headers, runtime tuning). */
|
|
43754
|
-
advancedSchema: ConfigSchemaPassthrough$
|
|
44323
|
+
advancedSchema: ConfigSchemaPassthrough$2.optional(),
|
|
43755
44324
|
/** The kind's defaults; a model from `listModels` may override any of them. */
|
|
43756
44325
|
features: LlmModelFeaturesSchema,
|
|
43757
44326
|
/** `false` = the provider stamps `supportsVision` itself (from what a node reports). */
|
|
@@ -44277,10 +44846,10 @@ var CpuBreakdownSchema = object({
|
|
|
44277
44846
|
cores: number()
|
|
44278
44847
|
});
|
|
44279
44848
|
var MemoryInfoSchema = object({
|
|
44280
|
-
percent: number(),
|
|
44849
|
+
percent: number().nullable(),
|
|
44281
44850
|
totalBytes: number(),
|
|
44282
|
-
usedBytes: number(),
|
|
44283
|
-
availableBytes: number(),
|
|
44851
|
+
usedBytes: number().nullable(),
|
|
44852
|
+
availableBytes: number().nullable(),
|
|
44284
44853
|
swapUsedBytes: number(),
|
|
44285
44854
|
swapTotalBytes: number()
|
|
44286
44855
|
});
|
|
@@ -44568,686 +45137,266 @@ var GetLoadSeriesInputSchema = object({
|
|
|
44568
45137
|
*/
|
|
44569
45138
|
forNodeId: string(),
|
|
44570
45139
|
/**
|
|
44571
|
-
* EXCLUSIVE lower bound. A caller passes the newest `atMs` it already
|
|
44572
|
-
* holds and receives only what it is missing, so seeding a live chart
|
|
44573
|
-
* from this method cannot double a point already drawn.
|
|
44574
|
-
*/
|
|
44575
|
-
sinceMs: number().optional(),
|
|
44576
|
-
/**
|
|
44577
|
-
* Most points the caller wants PER FUNCTION. The window is reduced to fit,
|
|
44578
|
-
* preserving min and max per bucket.
|
|
44579
|
-
*
|
|
44580
|
-
* Absent means NO reduction — legitimate for a short window and a trap for a
|
|
44581
|
-
* long one, which is why a chart passes its own pixel width.
|
|
44582
|
-
*/
|
|
44583
|
-
maxPoints: number().int().positive().optional()
|
|
44584
|
-
});
|
|
44585
|
-
var SystemMetricsSchema = object({
|
|
44586
|
-
cpuPercent: number(),
|
|
44587
|
-
memoryPercent: number(),
|
|
44588
|
-
memoryUsedMB: number(),
|
|
44589
|
-
memoryTotalMB: number(),
|
|
44590
|
-
diskPercent: number().optional(),
|
|
44591
|
-
temperature: number().optional(),
|
|
44592
|
-
gpuPercent: number().optional(),
|
|
44593
|
-
gpuMemoryPercent: number().optional()
|
|
44594
|
-
});
|
|
44595
|
-
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);
|
|
44596
|
-
var modelConvertCapability = {
|
|
44597
|
-
name: "model-convert",
|
|
44598
|
-
scope: "system",
|
|
44599
|
-
mode: "singleton",
|
|
44600
|
-
internal: true,
|
|
44601
|
-
methods: { convert: method(object({
|
|
44602
|
-
sourceUrl: string(),
|
|
44603
|
-
metadata: ModelConvertMetadataSchema,
|
|
44604
|
-
targets: array(ConvertTargetSchema).min(1).readonly(),
|
|
44605
|
-
calibrationRef: string().optional(),
|
|
44606
|
-
sessionId: string().optional()
|
|
44607
|
-
}), ConvertResultSchema, {
|
|
44608
|
-
kind: "mutation",
|
|
44609
|
-
auth: "admin",
|
|
44610
|
-
timeoutMs: 6e5
|
|
44611
|
-
}) }
|
|
44612
|
-
};
|
|
44613
|
-
method(object({
|
|
44614
|
-
targetNodeId: string(),
|
|
44615
|
-
modelId: string(),
|
|
44616
|
-
format: _enum(MODEL_FORMATS),
|
|
44617
|
-
entry: ModelCatalogEntrySchema
|
|
44618
|
-
}), object({
|
|
44619
|
-
ok: boolean(),
|
|
44620
|
-
/** sha256 of the staged tarball (empty for a hub-local no-op). */
|
|
44621
|
-
sha256: string(),
|
|
44622
|
-
bytes: number(),
|
|
44623
|
-
/** The target node's modelsDir the artifact landed in. */
|
|
44624
|
-
path: string()
|
|
44625
|
-
}), {
|
|
44626
|
-
kind: "mutation",
|
|
44627
|
-
auth: "admin"
|
|
44628
|
-
});
|
|
44629
|
-
var MotionRegionSchema = object({
|
|
44630
|
-
bbox: BoundingBoxSchema,
|
|
44631
|
-
pixelCount: number(),
|
|
44632
|
-
intensity: number()
|
|
44633
|
-
});
|
|
44634
|
-
var MotionAnalysisResultSchema = object({
|
|
44635
|
-
detected: boolean(),
|
|
44636
|
-
regionCount: number(),
|
|
44637
|
-
/** Regions passing minArea filter — used for pipeline triggering. */
|
|
44638
|
-
regions: array(MotionRegionSchema).readonly(),
|
|
44639
|
-
/** All raw regions from CCL before minArea filter — used for UI debug overlay. */
|
|
44640
|
-
rawRegions: array(MotionRegionSchema).readonly(),
|
|
44641
|
-
frameWidth: number(),
|
|
44642
|
-
frameHeight: number(),
|
|
44643
|
-
analysisMs: number()
|
|
44644
|
-
});
|
|
44645
|
-
DeviceType.Camera, method(object({
|
|
44646
|
-
deviceId: number(),
|
|
44647
|
-
frame: FrameInputSchema.optional(),
|
|
44648
|
-
frameHandle: FrameHandleSchema.optional()
|
|
44649
|
-
}), MotionAnalysisResultSchema, {
|
|
44650
|
-
role: "admin",
|
|
44651
|
-
kind: "mutation"
|
|
44652
|
-
}), method(object({ deviceId: number() }), _void(), {
|
|
44653
|
-
role: "admin",
|
|
44654
|
-
kind: "mutation"
|
|
44655
|
-
}), method(_void(), _void(), {
|
|
44656
|
-
role: "admin",
|
|
44657
|
-
kind: "mutation"
|
|
44658
|
-
}), object({
|
|
44659
|
-
deviceId: number(),
|
|
44660
|
-
detected: boolean(),
|
|
44661
|
-
regionCount: number()
|
|
44662
|
-
});
|
|
44663
|
-
/**
|
|
44664
|
-
* `mqtt-broker` — broker-registry cap.
|
|
44665
|
-
*
|
|
44666
|
-
* NOT a pub/sub proxy. The cap exposes (a) a registry of configured
|
|
44667
|
-
* MQTT brokers (external + optionally an embedded `aedes`-backed one)
|
|
44668
|
-
* and (b) the connection details a consumer addon needs to spin up
|
|
44669
|
-
* its OWN `mqtt.js` client.
|
|
44670
|
-
*
|
|
44671
|
-
* Why: pub/sub routing over the system event-bus loses fidelity
|
|
44672
|
-
* (callback shape, QoS guarantees, will/retain semantics) and adds
|
|
44673
|
-
* refcount bookkeeping that addons would rather own themselves. The
|
|
44674
|
-
* canonical consumer needs raw `mqtt.js`
|
|
44675
|
-
* features anyway — give it the connection config, get out of the way.
|
|
44676
|
-
*
|
|
44677
|
-
* Consumer flow:
|
|
44678
|
-
* const cfg = await ctx.api.mqttBroker.getBrokerConfig({ id })
|
|
44679
|
-
* const client = mqtt.connect(cfg.url, { username: cfg.username, … })
|
|
44680
|
-
* client.subscribe('zigbee2mqtt/+')
|
|
44681
|
-
*
|
|
44682
|
-
* Collection mode: multiple brokers (e.g. one local mosquitto + one
|
|
44683
|
-
* cloud bridge). The "embedded" entry (when present) is just another
|
|
44684
|
-
* broker in the registry — its lifecycle is owned by the addon that
|
|
44685
|
-
* spawned it.
|
|
44686
|
-
*/
|
|
44687
|
-
var BrokerKindSchema = _enum(["external", "embedded"]);
|
|
44688
|
-
/**
|
|
44689
|
-
* Broker live-probe status.
|
|
44690
|
-
*
|
|
44691
|
-
* - `connected` — last probe completed a clean CONNACK
|
|
44692
|
-
* - `disconnected` — no probe has run yet (cold cache)
|
|
44693
|
-
* - `auth-failed` — CONNACK refused with auth error (RC 4 / 5)
|
|
44694
|
-
* - `unreachable` — TCP connect timed out / refused
|
|
44695
|
-
* - `tls-error` — TLS handshake failed (cert / SNI / cipher)
|
|
44696
|
-
*/
|
|
44697
|
-
var BrokerStatusSchema$1 = _enum([
|
|
44698
|
-
"connected",
|
|
44699
|
-
"disconnected",
|
|
44700
|
-
"auth-failed",
|
|
44701
|
-
"unreachable",
|
|
44702
|
-
"tls-error"
|
|
44703
|
-
]);
|
|
44704
|
-
var BrokerInfoSchema$1 = object({
|
|
44705
|
-
id: string(),
|
|
44706
|
-
name: string(),
|
|
44707
|
-
url: string(),
|
|
44708
|
-
kind: BrokerKindSchema,
|
|
44709
|
-
status: BrokerStatusSchema$1,
|
|
44710
|
-
latencyMs: number().nullable(),
|
|
44711
|
-
error: string().optional(),
|
|
44712
|
-
/** Embedded brokers only: number of MQTT clients currently connected. */
|
|
44713
|
-
connectedClients: number().int().nonnegative().optional(),
|
|
44714
|
-
/** Epoch ms of the last live probe (external) or aedes snapshot (embedded). */
|
|
44715
|
-
lastCheckedAt: number().optional()
|
|
44716
|
-
});
|
|
44717
|
-
/**
|
|
44718
|
-
* Connection details — what a consumer needs to call
|
|
44719
|
-
* `mqtt.connect(url, options)`. We split URL + credentials so the
|
|
44720
|
-
* consumer can pass them as `mqtt.connect(url, { username, password })`
|
|
44721
|
-
* instead of stuffing creds into the URL (which leaks them into logs).
|
|
44722
|
-
*/
|
|
44723
|
-
var BrokerConnectionDetailsSchema = object({
|
|
44724
|
-
url: string(),
|
|
44725
|
-
username: string().optional(),
|
|
44726
|
-
password: string().optional(),
|
|
44727
|
-
/**
|
|
44728
|
-
* Suggested prefix for `clientId`. Each consumer should suffix this
|
|
44729
|
-
* with its own discriminator (addon id, instance id) so reconnects
|
|
44730
|
-
* don't kick each other off (MQTT spec: clientId must be unique per
|
|
44731
|
-
* broker).
|
|
44732
|
-
*/
|
|
44733
|
-
clientIdPrefix: string().optional()
|
|
44734
|
-
});
|
|
44735
|
-
var AddBrokerInputSchema = object({
|
|
44736
|
-
name: string().min(1),
|
|
44737
|
-
url: string().regex(/^(mqtt|mqtts|ws|wss):\/\//, "URL must start with mqtt(s):// or ws(s)://"),
|
|
44738
|
-
username: string().optional(),
|
|
44739
|
-
password: string().optional(),
|
|
44740
|
-
clientIdPrefix: string().optional()
|
|
44741
|
-
});
|
|
44742
|
-
var AddBrokerResultSchema = object({ id: string() });
|
|
44743
|
-
var IdInputSchema = object({ id: string() });
|
|
44744
|
-
var TestResultSchema$1 = discriminatedUnion("ok", [object({
|
|
44745
|
-
ok: literal(true),
|
|
44746
|
-
latencyMs: number()
|
|
44747
|
-
}), object({
|
|
44748
|
-
ok: literal(false),
|
|
44749
|
-
error: string()
|
|
44750
|
-
})]);
|
|
44751
|
-
var StartEmbeddedInputSchema = object({
|
|
44752
|
-
port: number().int().min(1).max(65535).default(1883),
|
|
44753
|
-
/** Allow anonymous connect (no username/password). Default: false. */
|
|
44754
|
-
allowAnonymous: boolean().default(false),
|
|
44755
|
-
/** Optional shared username/password for clients. */
|
|
44756
|
-
username: string().optional(),
|
|
44757
|
-
password: string().optional()
|
|
44758
|
-
});
|
|
44759
|
-
var StartEmbeddedResultSchema = object({
|
|
44760
|
-
id: string(),
|
|
44761
|
-
url: string()
|
|
44762
|
-
});
|
|
44763
|
-
var StatusSchema = object({
|
|
44764
|
-
brokerCount: number(),
|
|
44765
|
-
embeddedRunning: boolean()
|
|
44766
|
-
});
|
|
44767
|
-
method(_void(), array(BrokerInfoSchema$1)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
|
|
44768
|
-
kind: "mutation",
|
|
44769
|
-
auth: "admin"
|
|
44770
|
-
}), method(IdInputSchema, _void(), {
|
|
44771
|
-
kind: "mutation",
|
|
44772
|
-
auth: "admin"
|
|
44773
|
-
}), method(IdInputSchema, TestResultSchema$1, {
|
|
44774
|
-
kind: "mutation",
|
|
44775
|
-
auth: "admin"
|
|
44776
|
-
}), method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, {
|
|
44777
|
-
kind: "mutation",
|
|
44778
|
-
auth: "admin"
|
|
44779
|
-
}), method(IdInputSchema, _void(), {
|
|
44780
|
-
kind: "mutation",
|
|
44781
|
-
auth: "admin"
|
|
44782
|
-
}), method(_void(), StatusSchema);
|
|
44783
|
-
var NetworkEndpointSchema = object({
|
|
44784
|
-
url: string(),
|
|
44785
|
-
hostname: string(),
|
|
44786
|
-
port: number(),
|
|
44787
|
-
protocol: _enum(["http", "https"]),
|
|
44788
|
-
/**
|
|
44789
|
-
* Whether this address survives a restart of its provider. `false` = it is
|
|
44790
|
-
* re-issued every time (a Quick tunnel's random `*.trycloudflare.com`); the
|
|
44791
|
-
* hub never selects such an address AUTOMATICALLY for a role (D860), though
|
|
44792
|
-
* it stays visible and an operator may still flag it. Absent = stable: every
|
|
44793
|
-
* provider except a Quick tunnel owns a name that does not change.
|
|
44794
|
-
*/
|
|
44795
|
-
stable: boolean().optional()
|
|
44796
|
-
});
|
|
44797
|
-
object({
|
|
44798
|
-
url: string(),
|
|
44799
|
-
/** Mirrors {@link NetworkEndpointSchema} `stable`; absent = stable. */
|
|
44800
|
-
stable: boolean().optional(),
|
|
44801
|
-
updated: boolean().optional()
|
|
44802
|
-
});
|
|
44803
|
-
var NetworkAccessStatusSchema = object({
|
|
44804
|
-
connected: boolean(),
|
|
44805
|
-
endpoint: NetworkEndpointSchema.nullable(),
|
|
44806
|
-
error: string().optional()
|
|
44807
|
-
});
|
|
44808
|
-
/**
|
|
44809
|
-
* Optional, richer endpoint shape returned by providers that expose
|
|
44810
|
-
* MORE than one ingress concurrently (Tailscale Funnel with mixed
|
|
44811
|
-
* serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
|
|
44812
|
-
* the originating provider config (mode + sourcePort) so the
|
|
44813
|
-
* orchestrator UI can label rows distinctly. Providers that expose only
|
|
44814
|
-
* one endpoint just omit `listEndpoints` from their provider impl.
|
|
44815
|
-
*/
|
|
44816
|
-
var NetworkEndpointEntrySchema = NetworkEndpointSchema.extend({
|
|
44817
|
-
/**
|
|
44818
|
-
* Stable id within the provider — typically `<mode>-<sourcePort>` so
|
|
44819
|
-
* the orchestrator can dedupe across `listEndpoints` polls.
|
|
44820
|
-
*/
|
|
44821
|
-
id: string(),
|
|
44822
|
-
/** Operator-facing label (mirrors `MeshEndpoint.label`). */
|
|
44823
|
-
label: string(),
|
|
44824
|
-
/** Optional provider-specific mode tag, used for icon/colour in admin UI. */
|
|
44825
|
-
mode: string().optional(),
|
|
44826
|
-
/** Originating local port the ingress fronts (informational). */
|
|
44827
|
-
sourcePort: number().optional()
|
|
44828
|
-
});
|
|
44829
|
-
method(_void(), NetworkEndpointSchema, { kind: "mutation" }), method(_void(), _void(), { kind: "mutation" }), method(_void(), NetworkEndpointSchema.nullable()), method(_void(), NetworkAccessStatusSchema), method(_void(), array(NetworkEndpointEntrySchema).readonly());
|
|
44830
|
-
/**
|
|
44831
|
-
* notification-output — canonical, capability-gated notification delivery.
|
|
44832
|
-
*
|
|
44833
|
-
* Apprise-derived model (see
|
|
44834
|
-
* `docs/superpowers/specs/2026-07-03-notification-output-notifier-matrix.md`):
|
|
44835
|
-
* callers emit ONE canonical `Notification`; each provider declares a
|
|
44836
|
-
* per-kind capability descriptor (`TargetKind`), and the pure degrade
|
|
44837
|
-
* engine (`@camstack/types` `prepareNotification`) transcodes / degrades the
|
|
44838
|
-
* message to what the kind supports — callers never special-case a service.
|
|
44839
|
-
*
|
|
44840
|
-
* DESIGN DECISIONS (locked):
|
|
44841
|
-
* - Target CRUD lives on THIS cap (`upsertTarget` / `deleteTarget` /
|
|
44842
|
-
* `setTargetEnabled`), each provider persisting via the `settings-store`
|
|
44843
|
-
* cap. Rationale: the admin UI needs one uniform surface across the
|
|
44844
|
-
* notifiers addon AND the HA addon; the addon-`globalSettingsSchema`-array
|
|
44845
|
-
* alternative would fork the UI per addon and cannot host the
|
|
44846
|
-
* discovery→adopt flow.
|
|
44847
|
-
* - `listTargetKinds` / `listTargets` / `discoverTargets` return arrays →
|
|
44848
|
-
* the generated cap-mount auto-`concatCollection`-fans them across every
|
|
44849
|
-
* registered provider (notifiers addon + HA addon) so one catalog is
|
|
44850
|
-
* routable. `send` / `testTarget` / CRUD route to ONE provider by the
|
|
44851
|
-
* `addonId` the generated collection router extracts from the call input.
|
|
44852
|
-
* - `Attachment.bytes` is `Uint8Array`. Transport-safe: superjson (the tRPC
|
|
44853
|
-
* transformer) + UDS MsgPack both round-trip typed arrays — already used by
|
|
44854
|
-
* `storage` / `storage-provider` / `recording` caps over the same path. No
|
|
44855
|
-
* base64 fallback needed.
|
|
44856
|
-
*
|
|
44857
|
-
* TODO (deferred, closed-set change — separate decision): add
|
|
44858
|
-
* `providerKind: 'notify'` so notification providers surface on the unified
|
|
44859
|
-
* admin "Integrations" page.
|
|
44860
|
-
*/
|
|
44861
|
-
/**
|
|
44862
|
-
* Zentik-derived typed-media enum — the superset across every kind. Each
|
|
44863
|
-
* adapter picks what it supports and the degrade engine filters the rest.
|
|
44864
|
-
*/
|
|
44865
|
-
var AttachmentMediaTypeSchema = _enum([
|
|
44866
|
-
"image",
|
|
44867
|
-
"video",
|
|
44868
|
-
"gif",
|
|
44869
|
-
"audio",
|
|
44870
|
-
"icon"
|
|
44871
|
-
]);
|
|
44872
|
-
/**
|
|
44873
|
-
* A single attachment. Exactly one of `url` (remote source, most adapters
|
|
44874
|
-
* prefer this) or `bytes` (inline source; required for Pushover-style
|
|
44875
|
-
* bytes-only kinds) MUST be present — the degrade engine expresses a
|
|
44876
|
-
* url→bytes fetch as a `needsFetch` directive the adapter executes.
|
|
44877
|
-
*/
|
|
44878
|
-
var AttachmentSchema = object({
|
|
44879
|
-
mediaType: AttachmentMediaTypeSchema,
|
|
44880
|
-
url: string().optional(),
|
|
44881
|
-
bytes: _instanceof(Uint8Array).optional(),
|
|
44882
|
-
mime: string().optional(),
|
|
44883
|
-
name: string().optional()
|
|
44884
|
-
}).refine((a) => a.url !== void 0 || a.bytes !== void 0, { message: "Attachment requires either `url` or `bytes`" });
|
|
44885
|
-
var NotificationFormatSchema = _enum([
|
|
44886
|
-
"text",
|
|
44887
|
-
"markdown",
|
|
44888
|
-
"html"
|
|
44889
|
-
]);
|
|
44890
|
-
/**
|
|
44891
|
-
* The CLOSED icon vocabulary an action button may use.
|
|
44892
|
-
*
|
|
44893
|
-
* A closed set, not a free string, and that is the whole point: an arbitrary
|
|
44894
|
-
* icon name is one that ntfy renders, zentik silently drops, and nobody
|
|
44895
|
-
* notices — the same class of gap as a zone vocabulary nothing produced
|
|
44896
|
-
* ([D35](../../../docs/decisions/adr-0035.md)). Every adapter maps this set or
|
|
44897
|
-
* declares `actionIcons: false` and the degrade engine strips the field.
|
|
44898
|
-
*
|
|
44899
|
-
* Named by INTENT, never by glyph. "check" would tie the vocabulary to one
|
|
44900
|
-
* renderer's icon set; "acknowledge" survives an adapter that draws it
|
|
44901
|
-
* differently.
|
|
44902
|
-
*
|
|
44903
|
-
* ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
|
|
44904
|
-
*
|
|
44905
|
-
* These names are for US. **No adapter may forward one verbatim.** Each maps
|
|
44906
|
-
* the whole set onto its own renderer's vocabulary through a
|
|
44907
|
-
* `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
|
|
44908
|
-
* fallback, so adding a member here fails every adapter's build until someone
|
|
44909
|
-
* decides its glyph, which is the only place that decision can be made
|
|
44910
|
-
* honestly.
|
|
44911
|
-
*
|
|
44912
|
-
* This paragraph is the bug. Zentik declared `actionIcons: true` and passed
|
|
44913
|
-
* `disarm` straight through; iOS feeds that string to
|
|
44914
|
-
* `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
|
|
44915
|
-
* and every snooze and alarm button arrived BLANK. A pass-through is not a
|
|
44916
|
-
* mapping, and "the field is documented" is not "the value renders".
|
|
44917
|
-
*
|
|
44918
|
-
* Adding a member is TRAIN-BOUND. The enum lives in the published
|
|
44919
|
-
* `@camstack/server` closure and the cap seam validates against the HUB's copy,
|
|
44920
|
-
* so an addon that emits a token the running hub does not know does not lose an
|
|
44921
|
-
* icon — its whole `send` fails Zod validation and the notification never
|
|
44922
|
-
* arrives. Never emit a new token from an addon before the train carrying it.
|
|
44923
|
-
*/
|
|
44924
|
-
var NotificationActionIconSchema = _enum([
|
|
44925
|
-
"acknowledge",
|
|
44926
|
-
"dismiss",
|
|
44927
|
-
"silence",
|
|
44928
|
-
"snooze",
|
|
44929
|
-
"view",
|
|
44930
|
-
"play",
|
|
44931
|
-
"open",
|
|
44932
|
-
"close",
|
|
44933
|
-
"lock",
|
|
44934
|
-
"unlock",
|
|
44935
|
-
"arm",
|
|
44936
|
-
"arm-home",
|
|
44937
|
-
"arm-away",
|
|
44938
|
-
"arm-night",
|
|
44939
|
-
"disarm",
|
|
44940
|
-
"light",
|
|
44941
|
-
"alert",
|
|
44942
|
-
"camera"
|
|
44943
|
-
]);
|
|
44944
|
-
/** A single tap-through action button. */
|
|
44945
|
-
var NotificationActionSchema = object({
|
|
44946
|
-
id: string(),
|
|
44947
|
-
label: string(),
|
|
44948
|
-
url: string().optional(),
|
|
44949
|
-
/** Dropped by the degrade engine for a kind with `caps.actionIcons: false`. */
|
|
44950
|
-
icon: NotificationActionIconSchema.optional(),
|
|
44951
|
-
/**
|
|
44952
|
-
* Renders in a warning style where the notifier supports it.
|
|
44953
|
-
*
|
|
44954
|
-
* A HINT, never a gate. The callback's authority is its token and nothing
|
|
44955
|
-
* else — see `notification-center/action-token.ts` for what that does and
|
|
44956
|
-
* does not buy.
|
|
44957
|
-
*/
|
|
44958
|
-
destructive: boolean().optional(),
|
|
44959
|
-
/**
|
|
44960
|
-
* How the tap should REACH the url.
|
|
44961
|
-
*
|
|
44962
|
-
* `navigate` (absent, and every button authored before this field) opens it:
|
|
44963
|
-
* the phone leaves the notification and shows whatever the callback returns.
|
|
44964
|
-
* That is right for a button whose answer the operator wants to read.
|
|
44965
|
-
*
|
|
44966
|
-
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
44967
|
-
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
44968
|
-
* an answer to the notification, and being thrown into a browser tab to
|
|
44969
|
-
* confirm it costs more attention than the notification did. A backend that
|
|
44970
|
-
* cannot do a background call renders it as an ordinary link (the adapters
|
|
44971
|
-
* fall back rather than dropping the button), so this is a preference, never
|
|
44972
|
-
* a requirement.
|
|
44973
|
-
*/
|
|
44974
|
-
mode: _enum(["navigate", "background"]).optional()
|
|
44975
|
-
});
|
|
44976
|
-
/** A delivery parameter value: what a notifier declared it takes. */
|
|
44977
|
-
var DeliveryParamValueSchema = union([
|
|
44978
|
-
string(),
|
|
44979
|
-
number(),
|
|
44980
|
-
boolean()
|
|
44981
|
-
]);
|
|
44982
|
-
/**
|
|
44983
|
-
* One extra delivery parameter a notifier KIND declares (D938). A rule that
|
|
44984
|
-
* addresses a target of that kind may set it; a kind that declares nothing is
|
|
44985
|
-
* never handed one. The admin UI derives its control from this descriptor —
|
|
44986
|
-
* no editor knows a service by name.
|
|
44987
|
-
*
|
|
44988
|
-
* Optional fields are `.optional()`, never `.default()` (a Zod default does not
|
|
44989
|
-
* run on the addon cap path).
|
|
44990
|
-
*/
|
|
44991
|
-
var DeliveryParamSchema = object({
|
|
44992
|
-
key: string().min(1),
|
|
44993
|
-
label: string(),
|
|
44994
|
-
/** i18n key of the label, resolved by the declaring addon's namespace. */
|
|
44995
|
-
labelKey: string().optional(),
|
|
44996
|
-
type: _enum([
|
|
44997
|
-
"enum",
|
|
44998
|
-
"number",
|
|
44999
|
-
"boolean",
|
|
45000
|
-
"string"
|
|
45001
|
-
]),
|
|
45002
|
-
/** `enum` only: the closed set of accepted values. */
|
|
45003
|
-
options: array(object({
|
|
45004
|
-
value: string(),
|
|
45005
|
-
label: string()
|
|
45006
|
-
})).optional(),
|
|
45007
|
-
/** `number` only. */
|
|
45008
|
-
min: number().optional(),
|
|
45009
|
-
max: number().optional(),
|
|
45010
|
-
/** What the notifier does when the rule sets nothing; shown as the placeholder. */
|
|
45011
|
-
default: DeliveryParamValueSchema.optional()
|
|
45012
|
-
});
|
|
45013
|
-
/**
|
|
45014
|
-
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
45015
|
-
* `priority` is a 5-level ORDINAL (1=lowest … 3=normal(default) … 5=urgent),
|
|
45016
|
-
* NOT a fixed severity enum — each kind declares its own `caps.levels` and
|
|
45017
|
-
* the adapter maps this ordinal onto its native level. `level?` is an
|
|
45018
|
-
* optional kind-native level id (`emergency`, `silent`, …) that overrides
|
|
45019
|
-
* `priority` for that one target.
|
|
45020
|
-
*/
|
|
45021
|
-
var NotificationSchema = object({
|
|
45022
|
-
body: string(),
|
|
45023
|
-
title: string().optional(),
|
|
45024
|
-
format: NotificationFormatSchema.default("text"),
|
|
45025
|
-
priority: number().int().min(1).max(5).default(3),
|
|
45026
|
-
level: string().optional(),
|
|
45027
|
-
attachments: array(AttachmentSchema).optional(),
|
|
45028
|
-
clickUrl: string().optional(),
|
|
45029
|
-
actions: array(NotificationActionSchema).optional(),
|
|
45030
|
-
sound: string().optional(),
|
|
45031
|
-
ttl: number().optional(),
|
|
45032
|
-
tag: string().optional(),
|
|
45033
|
-
deviceId: number().optional(),
|
|
45034
|
-
eventId: string().optional(),
|
|
45035
|
-
metadata: record(string(), unknown()).optional(),
|
|
45036
|
-
/**
|
|
45037
|
-
* Values for the parameters the target's kind DECLARES in
|
|
45038
|
-
* {@link TargetKindSchema} `deliveryParams`. Already validated against the
|
|
45039
|
-
* declaration by the sender; a notifier reads only the keys it declared.
|
|
45040
|
-
*/
|
|
45041
|
-
delivery: record(string(), DeliveryParamValueSchema).optional()
|
|
45042
|
-
});
|
|
45043
|
-
/** One declared native severity/priority level for a kind. */
|
|
45044
|
-
var TargetKindLevelSchema = object({
|
|
45045
|
-
id: string(),
|
|
45046
|
-
label: string(),
|
|
45047
|
-
/** Which canonical priority (1..5) this level maps to. `null` = qualitative-only. */
|
|
45048
|
-
ordinal: number().int().min(1).max(5).nullable(),
|
|
45049
|
-
flags: object({
|
|
45050
|
-
critical: boolean().optional(),
|
|
45051
|
-
silent: boolean().optional(),
|
|
45052
|
-
noPush: boolean().optional()
|
|
45053
|
-
}).optional(),
|
|
45054
|
-
/** e.g. Pushover `emergency` requires `retry` / `expire`. */
|
|
45055
|
-
requires: array(string()).optional(),
|
|
45056
|
-
description: string().optional()
|
|
45057
|
-
});
|
|
45058
|
-
/** The full capability block consulted before dispatch. */
|
|
45059
|
-
var TargetKindCapsSchema = object({
|
|
45060
|
-
attachments: object({
|
|
45061
|
-
mediaTypes: array(AttachmentMediaTypeSchema),
|
|
45062
|
-
mode: _enum([
|
|
45063
|
-
"url",
|
|
45064
|
-
"bytes",
|
|
45065
|
-
"both"
|
|
45066
|
-
]),
|
|
45067
|
-
max: number().int().nonnegative(),
|
|
45068
|
-
maxBytes: number().int().positive().optional()
|
|
45069
|
-
}),
|
|
45070
|
-
/** Max action buttons (0 = none). */
|
|
45071
|
-
actions: number().int().nonnegative(),
|
|
45072
|
-
/**
|
|
45073
|
-
* Whether this kind renders a per-action ICON.
|
|
45074
|
-
*
|
|
45075
|
-
* `.optional()`, deliberately NOT `.default(false)`: a Zod default does not
|
|
45076
|
-
* run on the addon cap path — three production failures in one day taught
|
|
45077
|
-
* this repo that once. Absent is read as false by the degrade engine, which
|
|
45078
|
-
* is the safe direction: an icon that is not rendered costs nothing, an icon
|
|
45079
|
-
* assumed and dropped costs the operator's trust in the field.
|
|
45080
|
-
*/
|
|
45081
|
-
actionIcons: boolean().optional(),
|
|
45082
|
-
levels: array(TargetKindLevelSchema),
|
|
45083
|
-
format: array(NotificationFormatSchema),
|
|
45084
|
-
clickUrl: boolean(),
|
|
45085
|
-
sound: boolean(),
|
|
45086
|
-
ttl: boolean(),
|
|
45087
|
-
bodyMaxLen: number().int().positive()
|
|
45088
|
-
});
|
|
45089
|
-
/**
|
|
45090
|
-
* `configSchema` is a `ConfigUISchema` tree passed through to the admin
|
|
45091
|
-
* FormBuilder. Stored as `z.unknown()` at the cap seam (mirrors
|
|
45092
|
-
* `device-provider.getChildCreationSchema` `CreationSchemaOutputSchema`) —
|
|
45093
|
-
* the union is large and not meant for runtime validation here; the exported
|
|
45094
|
-
* `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
|
|
45095
|
-
*/
|
|
45096
|
-
var ConfigSchemaPassthrough$2 = unknown();
|
|
45097
|
-
var TargetKindSchema = object({
|
|
45098
|
-
kind: string(),
|
|
45099
|
-
label: string(),
|
|
45100
|
-
icon: string(),
|
|
45101
|
-
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
45102
|
-
addonId: string(),
|
|
45103
|
-
/**
|
|
45104
|
-
* URL of the kind's bundled BRAND icon, served by the providing addon over
|
|
45105
|
-
* its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
|
|
45106
|
-
* when the addon bundles no icon for that kind — the client then falls back
|
|
45107
|
-
* to a neutral glyph rather than rendering the raw `icon` NAME as text.
|
|
45108
|
-
*
|
|
45109
|
-
* Root-relative on purpose: it resolves against whatever origin serves a web
|
|
45110
|
-
* client, and a native client joins it onto its own hub base.
|
|
45111
|
-
*
|
|
45112
|
-
* DECLARED here deliberately. It used to travel as an undeclared passthrough
|
|
45113
|
-
* field that survived only because the runtime cap-router forwards provider
|
|
45114
|
-
* output verbatim — so every consumer had to re-declare it by hand to stop
|
|
45115
|
-
* its own Zod parse from stripping it, and the whole arrangement would have
|
|
45116
|
-
* broken silently the moment output validation was tightened anywhere.
|
|
45117
|
-
*/
|
|
45118
|
-
iconUrl: string().optional(),
|
|
45119
|
-
/**
|
|
45120
|
-
* Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
|
|
45121
|
-
*
|
|
45122
|
-
* The server knows this and therefore says it, because the client cannot
|
|
45123
|
-
* safely guess: a React-Native client renders SVG and raster through two
|
|
45124
|
-
* DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
|
|
45125
|
-
* not decode SVG on iOS/Android), so without this it silently fell back to a
|
|
45126
|
-
* placeholder glyph for every vector icon while the web build looked fine.
|
|
45127
|
-
*
|
|
45128
|
-
* Absent when {@link iconUrl} is absent, or for a legacy provider that has
|
|
45129
|
-
* not been updated — a client that cannot determine the type should prefer
|
|
45130
|
-
* its raster path, which is the safe default for an unknown image.
|
|
45131
|
-
*/
|
|
45132
|
-
iconMediaType: string().optional(),
|
|
45133
|
-
configSchema: ConfigSchemaPassthrough$2,
|
|
45134
|
-
/**
|
|
45135
|
-
* The config keys that decide WHERE this kind's secrets are sent (server,
|
|
45136
|
-
* base URL, instance, chat, recipient). A save that changes any of them
|
|
45137
|
-
* while leaving a secret redacted is refused by the provider (D634), so an
|
|
45138
|
-
* editor uses this to ask for the secret on exactly those edits instead of
|
|
45139
|
-
* on every edit.
|
|
45140
|
-
*
|
|
45141
|
-
* Optional: absent from a provider that holds no secret (the Home Assistant
|
|
45142
|
-
* kinds) and from a provider older than this field — an editor that finds
|
|
45143
|
-
* it absent must assume ANY edit may need the secret.
|
|
45140
|
+
* EXCLUSIVE lower bound. A caller passes the newest `atMs` it already
|
|
45141
|
+
* holds and receives only what it is missing, so seeding a live chart
|
|
45142
|
+
* from this method cannot double a point already drawn.
|
|
45144
45143
|
*/
|
|
45145
|
-
|
|
45146
|
-
supportsDiscovery: boolean(),
|
|
45144
|
+
sinceMs: number().optional(),
|
|
45147
45145
|
/**
|
|
45148
|
-
*
|
|
45149
|
-
*
|
|
45146
|
+
* Most points the caller wants PER FUNCTION. The window is reduced to fit,
|
|
45147
|
+
* preserving min and max per bucket.
|
|
45148
|
+
*
|
|
45149
|
+
* Absent means NO reduction — legitimate for a short window and a trap for a
|
|
45150
|
+
* long one, which is why a chart passes its own pixel width.
|
|
45150
45151
|
*/
|
|
45151
|
-
|
|
45152
|
-
|
|
45152
|
+
maxPoints: number().int().positive().optional()
|
|
45153
|
+
});
|
|
45154
|
+
var SystemMetricsSchema = object({
|
|
45155
|
+
cpuPercent: number(),
|
|
45156
|
+
/** `null` when the memory sample failed or was not taken yet (D393). */
|
|
45157
|
+
memoryPercent: number().nullable(),
|
|
45158
|
+
memoryUsedMB: number().nullable(),
|
|
45159
|
+
memoryTotalMB: number(),
|
|
45160
|
+
diskPercent: number().optional(),
|
|
45161
|
+
temperature: number().optional(),
|
|
45162
|
+
gpuPercent: number().optional(),
|
|
45163
|
+
gpuMemoryPercent: number().optional()
|
|
45164
|
+
});
|
|
45165
|
+
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);
|
|
45166
|
+
var modelConvertCapability = {
|
|
45167
|
+
name: "model-convert",
|
|
45168
|
+
scope: "system",
|
|
45169
|
+
mode: "singleton",
|
|
45170
|
+
internal: true,
|
|
45171
|
+
methods: { convert: method(object({
|
|
45172
|
+
sourceUrl: string(),
|
|
45173
|
+
metadata: ModelConvertMetadataSchema,
|
|
45174
|
+
targets: array(ConvertTargetSchema).min(1).readonly(),
|
|
45175
|
+
calibrationRef: string().optional(),
|
|
45176
|
+
sessionId: string().optional()
|
|
45177
|
+
}), ConvertResultSchema, {
|
|
45178
|
+
kind: "mutation",
|
|
45179
|
+
auth: "admin",
|
|
45180
|
+
timeoutMs: 6e5
|
|
45181
|
+
}) }
|
|
45182
|
+
};
|
|
45183
|
+
method(object({
|
|
45184
|
+
targetNodeId: string(),
|
|
45185
|
+
modelId: string(),
|
|
45186
|
+
format: _enum(MODEL_FORMATS),
|
|
45187
|
+
entry: ModelCatalogEntrySchema
|
|
45188
|
+
}), object({
|
|
45189
|
+
ok: boolean(),
|
|
45190
|
+
/** sha256 of the staged tarball (empty for a hub-local no-op). */
|
|
45191
|
+
sha256: string(),
|
|
45192
|
+
bytes: number(),
|
|
45193
|
+
/** The target node's modelsDir the artifact landed in. */
|
|
45194
|
+
path: string()
|
|
45195
|
+
}), {
|
|
45196
|
+
kind: "mutation",
|
|
45197
|
+
auth: "admin"
|
|
45198
|
+
});
|
|
45199
|
+
var MotionRegionSchema = object({
|
|
45200
|
+
bbox: BoundingBoxSchema,
|
|
45201
|
+
pixelCount: number(),
|
|
45202
|
+
intensity: number()
|
|
45203
|
+
});
|
|
45204
|
+
var MotionAnalysisResultSchema = object({
|
|
45205
|
+
detected: boolean(),
|
|
45206
|
+
regionCount: number(),
|
|
45207
|
+
/** Regions passing minArea filter — used for pipeline triggering. */
|
|
45208
|
+
regions: array(MotionRegionSchema).readonly(),
|
|
45209
|
+
/** All raw regions from CCL before minArea filter — used for UI debug overlay. */
|
|
45210
|
+
rawRegions: array(MotionRegionSchema).readonly(),
|
|
45211
|
+
frameWidth: number(),
|
|
45212
|
+
frameHeight: number(),
|
|
45213
|
+
analysisMs: number()
|
|
45214
|
+
});
|
|
45215
|
+
DeviceType.Camera, method(object({
|
|
45216
|
+
deviceId: number(),
|
|
45217
|
+
frame: FrameInputSchema.optional(),
|
|
45218
|
+
frameHandle: FrameHandleSchema.optional()
|
|
45219
|
+
}), MotionAnalysisResultSchema, {
|
|
45220
|
+
role: "admin",
|
|
45221
|
+
kind: "mutation"
|
|
45222
|
+
}), method(object({ deviceId: number() }), _void(), {
|
|
45223
|
+
role: "admin",
|
|
45224
|
+
kind: "mutation"
|
|
45225
|
+
}), method(_void(), _void(), {
|
|
45226
|
+
role: "admin",
|
|
45227
|
+
kind: "mutation"
|
|
45228
|
+
}), object({
|
|
45229
|
+
deviceId: number(),
|
|
45230
|
+
detected: boolean(),
|
|
45231
|
+
regionCount: number()
|
|
45153
45232
|
});
|
|
45154
45233
|
/**
|
|
45155
|
-
*
|
|
45156
|
-
*
|
|
45157
|
-
*
|
|
45234
|
+
* `mqtt-broker` — broker-registry cap.
|
|
45235
|
+
*
|
|
45236
|
+
* NOT a pub/sub proxy. The cap exposes (a) a registry of configured
|
|
45237
|
+
* MQTT brokers (external + optionally an embedded `aedes`-backed one)
|
|
45238
|
+
* and (b) the connection details a consumer addon needs to spin up
|
|
45239
|
+
* its OWN `mqtt.js` client.
|
|
45240
|
+
*
|
|
45241
|
+
* Why: pub/sub routing over the system event-bus loses fidelity
|
|
45242
|
+
* (callback shape, QoS guarantees, will/retain semantics) and adds
|
|
45243
|
+
* refcount bookkeeping that addons would rather own themselves. The
|
|
45244
|
+
* canonical consumer needs raw `mqtt.js`
|
|
45245
|
+
* features anyway — give it the connection config, get out of the way.
|
|
45246
|
+
*
|
|
45247
|
+
* Consumer flow:
|
|
45248
|
+
* const cfg = await ctx.api.mqttBroker.getBrokerConfig({ id })
|
|
45249
|
+
* const client = mqtt.connect(cfg.url, { username: cfg.username, … })
|
|
45250
|
+
* client.subscribe('zigbee2mqtt/+')
|
|
45251
|
+
*
|
|
45252
|
+
* Collection mode: multiple brokers (e.g. one local mosquitto + one
|
|
45253
|
+
* cloud bridge). The "embedded" entry (when present) is just another
|
|
45254
|
+
* broker in the registry — its lifecycle is owned by the addon that
|
|
45255
|
+
* spawned it.
|
|
45158
45256
|
*/
|
|
45159
|
-
var
|
|
45257
|
+
var BrokerKindSchema = _enum(["external", "embedded"]);
|
|
45258
|
+
/**
|
|
45259
|
+
* Broker live-probe status.
|
|
45260
|
+
*
|
|
45261
|
+
* - `connected` — last probe completed a clean CONNACK
|
|
45262
|
+
* - `disconnected` — no probe has run yet (cold cache)
|
|
45263
|
+
* - `auth-failed` — CONNACK refused with auth error (RC 4 / 5)
|
|
45264
|
+
* - `unreachable` — TCP connect timed out / refused
|
|
45265
|
+
* - `tls-error` — TLS handshake failed (cert / SNI / cipher)
|
|
45266
|
+
*/
|
|
45267
|
+
var BrokerStatusSchema$1 = _enum([
|
|
45268
|
+
"connected",
|
|
45269
|
+
"disconnected",
|
|
45270
|
+
"auth-failed",
|
|
45271
|
+
"unreachable",
|
|
45272
|
+
"tls-error"
|
|
45273
|
+
]);
|
|
45274
|
+
var BrokerInfoSchema$1 = object({
|
|
45160
45275
|
id: string(),
|
|
45161
45276
|
name: string(),
|
|
45162
|
-
|
|
45163
|
-
|
|
45164
|
-
|
|
45165
|
-
|
|
45166
|
-
});
|
|
45167
|
-
/** A discovery-surfaced candidate (config is partial + non-secret). */
|
|
45168
|
-
var DiscoveredTargetSchema = object({
|
|
45169
|
-
kind: string(),
|
|
45170
|
-
suggestedName: string(),
|
|
45171
|
-
config: record(string(), unknown())
|
|
45172
|
-
});
|
|
45173
|
-
/** The degrade engine's report — what was resolved / dropped / degraded. */
|
|
45174
|
-
var RenderedAsSchema = object({
|
|
45175
|
-
level: string(),
|
|
45176
|
-
format: NotificationFormatSchema,
|
|
45177
|
-
attachmentsSent: number().int().nonnegative(),
|
|
45178
|
-
actionsSent: number().int().nonnegative(),
|
|
45179
|
-
truncated: boolean(),
|
|
45180
|
-
dropped: array(string())
|
|
45181
|
-
});
|
|
45182
|
-
var SendResultSchema = object({
|
|
45183
|
-
success: boolean(),
|
|
45277
|
+
url: string(),
|
|
45278
|
+
kind: BrokerKindSchema,
|
|
45279
|
+
status: BrokerStatusSchema$1,
|
|
45280
|
+
latencyMs: number().nullable(),
|
|
45184
45281
|
error: string().optional(),
|
|
45185
|
-
|
|
45282
|
+
/** Embedded brokers only: number of MQTT clients currently connected. */
|
|
45283
|
+
connectedClients: number().int().nonnegative().optional(),
|
|
45284
|
+
/** Epoch ms of the last live probe (external) or aedes snapshot (embedded). */
|
|
45285
|
+
lastCheckedAt: number().optional()
|
|
45186
45286
|
});
|
|
45187
|
-
/** Same shape as SendResult — kept as a distinct name for the test panel. */
|
|
45188
|
-
var TestResultSchema = SendResultSchema;
|
|
45189
45287
|
/**
|
|
45190
|
-
*
|
|
45191
|
-
* `
|
|
45288
|
+
* Connection details — what a consumer needs to call
|
|
45289
|
+
* `mqtt.connect(url, options)`. We split URL + credentials so the
|
|
45290
|
+
* consumer can pass them as `mqtt.connect(url, { username, password })`
|
|
45291
|
+
* instead of stuffing creds into the URL (which leaks them into logs).
|
|
45192
45292
|
*/
|
|
45193
|
-
var
|
|
45194
|
-
|
|
45195
|
-
|
|
45196
|
-
|
|
45197
|
-
stateInstance: string().optional(),
|
|
45198
|
-
error: string().optional()
|
|
45199
|
-
});
|
|
45200
|
-
method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSchema), { auth: "admin" }), method(object({ targetId: string() }), TargetSchema, { auth: "admin" }), method(object({
|
|
45201
|
-
kind: string(),
|
|
45202
|
-
config: record(string(), unknown()).optional(),
|
|
45293
|
+
var BrokerConnectionDetailsSchema = object({
|
|
45294
|
+
url: string(),
|
|
45295
|
+
username: string().optional(),
|
|
45296
|
+
password: string().optional(),
|
|
45203
45297
|
/**
|
|
45204
|
-
*
|
|
45205
|
-
*
|
|
45206
|
-
*
|
|
45298
|
+
* Suggested prefix for `clientId`. Each consumer should suffix this
|
|
45299
|
+
* with its own discriminator (addon id, instance id) so reconnects
|
|
45300
|
+
* don't kick each other off (MQTT spec: clientId must be unique per
|
|
45301
|
+
* broker).
|
|
45207
45302
|
*/
|
|
45208
|
-
|
|
45209
|
-
})
|
|
45210
|
-
|
|
45211
|
-
|
|
45212
|
-
|
|
45213
|
-
|
|
45214
|
-
|
|
45215
|
-
|
|
45216
|
-
|
|
45217
|
-
|
|
45218
|
-
|
|
45219
|
-
|
|
45220
|
-
|
|
45303
|
+
clientIdPrefix: string().optional()
|
|
45304
|
+
});
|
|
45305
|
+
var AddBrokerInputSchema = object({
|
|
45306
|
+
name: string().min(1),
|
|
45307
|
+
url: string().regex(/^(mqtt|mqtts|ws|wss):\/\//, "URL must start with mqtt(s):// or ws(s)://"),
|
|
45308
|
+
username: string().optional(),
|
|
45309
|
+
password: string().optional(),
|
|
45310
|
+
clientIdPrefix: string().optional()
|
|
45311
|
+
});
|
|
45312
|
+
var AddBrokerResultSchema = object({ id: string() });
|
|
45313
|
+
var IdInputSchema = object({ id: string() });
|
|
45314
|
+
var TestResultSchema$1 = discriminatedUnion("ok", [object({
|
|
45315
|
+
ok: literal(true),
|
|
45316
|
+
latencyMs: number()
|
|
45317
|
+
}), object({
|
|
45318
|
+
ok: literal(false),
|
|
45319
|
+
error: string()
|
|
45320
|
+
})]);
|
|
45321
|
+
var StartEmbeddedInputSchema = object({
|
|
45322
|
+
port: number().int().min(1).max(65535).default(1883),
|
|
45323
|
+
/** Allow anonymous connect (no username/password). Default: false. */
|
|
45324
|
+
allowAnonymous: boolean().default(false),
|
|
45325
|
+
/** Optional shared username/password for clients. */
|
|
45326
|
+
username: string().optional(),
|
|
45327
|
+
password: string().optional()
|
|
45328
|
+
});
|
|
45329
|
+
var StartEmbeddedResultSchema = object({
|
|
45330
|
+
id: string(),
|
|
45331
|
+
url: string()
|
|
45332
|
+
});
|
|
45333
|
+
var StatusSchema = object({
|
|
45334
|
+
brokerCount: number(),
|
|
45335
|
+
embeddedRunning: boolean()
|
|
45336
|
+
});
|
|
45337
|
+
method(_void(), array(BrokerInfoSchema$1)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
|
|
45221
45338
|
kind: "mutation",
|
|
45222
45339
|
auth: "admin"
|
|
45223
|
-
}), method(
|
|
45224
|
-
targetId: string(),
|
|
45225
|
-
sample: NotificationSchema.optional()
|
|
45226
|
-
}), TestResultSchema, {
|
|
45340
|
+
}), method(IdInputSchema, _void(), {
|
|
45227
45341
|
kind: "mutation",
|
|
45228
45342
|
auth: "admin"
|
|
45229
|
-
}), method(
|
|
45230
|
-
target: TargetSchema,
|
|
45231
|
-
/**
|
|
45232
|
-
* Duplicate flow: create a NEW target id while copying secrets from an
|
|
45233
|
-
* existing row. The UI never holds the stored token; blank / redacted
|
|
45234
|
-
* password fields are restored from this source (D634 still applies if
|
|
45235
|
-
* destinations diverge without a re-typed secret).
|
|
45236
|
-
*/
|
|
45237
|
-
cloneSecretsFrom: string().optional()
|
|
45238
|
-
}), TargetSchema, {
|
|
45343
|
+
}), method(IdInputSchema, TestResultSchema$1, {
|
|
45239
45344
|
kind: "mutation",
|
|
45240
45345
|
auth: "admin"
|
|
45241
|
-
}), method(
|
|
45346
|
+
}), method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, {
|
|
45242
45347
|
kind: "mutation",
|
|
45243
45348
|
auth: "admin"
|
|
45244
|
-
}), method(
|
|
45245
|
-
targetId: string(),
|
|
45246
|
-
enabled: boolean()
|
|
45247
|
-
}), _void(), {
|
|
45349
|
+
}), method(IdInputSchema, _void(), {
|
|
45248
45350
|
kind: "mutation",
|
|
45249
45351
|
auth: "admin"
|
|
45352
|
+
}), method(_void(), StatusSchema);
|
|
45353
|
+
var NetworkEndpointSchema = object({
|
|
45354
|
+
url: string(),
|
|
45355
|
+
hostname: string(),
|
|
45356
|
+
port: number(),
|
|
45357
|
+
protocol: _enum(["http", "https"]),
|
|
45358
|
+
/**
|
|
45359
|
+
* Whether this address survives a restart of its provider. `false` = it is
|
|
45360
|
+
* re-issued every time (a Quick tunnel's random `*.trycloudflare.com`); the
|
|
45361
|
+
* hub never selects such an address AUTOMATICALLY for a role (D860), though
|
|
45362
|
+
* it stays visible and an operator may still flag it. Absent = stable: every
|
|
45363
|
+
* provider except a Quick tunnel owns a name that does not change.
|
|
45364
|
+
*/
|
|
45365
|
+
stable: boolean().optional()
|
|
45366
|
+
});
|
|
45367
|
+
object({
|
|
45368
|
+
url: string(),
|
|
45369
|
+
/** Mirrors {@link NetworkEndpointSchema} `stable`; absent = stable. */
|
|
45370
|
+
stable: boolean().optional(),
|
|
45371
|
+
updated: boolean().optional()
|
|
45372
|
+
});
|
|
45373
|
+
var NetworkAccessStatusSchema = object({
|
|
45374
|
+
connected: boolean(),
|
|
45375
|
+
endpoint: NetworkEndpointSchema.nullable(),
|
|
45376
|
+
error: string().optional()
|
|
45377
|
+
});
|
|
45378
|
+
/**
|
|
45379
|
+
* Optional, richer endpoint shape returned by providers that expose
|
|
45380
|
+
* MORE than one ingress concurrently (Tailscale Funnel with mixed
|
|
45381
|
+
* serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
|
|
45382
|
+
* the originating provider config (mode + sourcePort) so the
|
|
45383
|
+
* orchestrator UI can label rows distinctly. Providers that expose only
|
|
45384
|
+
* one endpoint just omit `listEndpoints` from their provider impl.
|
|
45385
|
+
*/
|
|
45386
|
+
var NetworkEndpointEntrySchema = NetworkEndpointSchema.extend({
|
|
45387
|
+
/**
|
|
45388
|
+
* Stable id within the provider — typically `<mode>-<sourcePort>` so
|
|
45389
|
+
* the orchestrator can dedupe across `listEndpoints` polls.
|
|
45390
|
+
*/
|
|
45391
|
+
id: string(),
|
|
45392
|
+
/** Operator-facing label (mirrors `MeshEndpoint.label`). */
|
|
45393
|
+
label: string(),
|
|
45394
|
+
/** Optional provider-specific mode tag, used for icon/colour in admin UI. */
|
|
45395
|
+
mode: string().optional(),
|
|
45396
|
+
/** Originating local port the ingress fronts (informational). */
|
|
45397
|
+
sourcePort: number().optional()
|
|
45250
45398
|
});
|
|
45399
|
+
method(_void(), NetworkEndpointSchema, { kind: "mutation" }), method(_void(), _void(), { kind: "mutation" }), method(_void(), NetworkEndpointSchema.nullable()), method(_void(), NetworkAccessStatusSchema), method(_void(), array(NetworkEndpointEntrySchema).readonly());
|
|
45251
45400
|
var AUDIO_MACRO_LABELS = [
|
|
45252
45401
|
{
|
|
45253
45402
|
id: "speech",
|
|
@@ -51648,14 +51797,6 @@ var EngineProvisioningSchema = object({
|
|
|
51648
51797
|
*/
|
|
51649
51798
|
configIssues: array(string()).optional()
|
|
51650
51799
|
});
|
|
51651
|
-
var PipelineStepInputSchema = lazy(() => object({
|
|
51652
|
-
addonId: string(),
|
|
51653
|
-
modelId: string().optional(),
|
|
51654
|
-
enabled: boolean().default(true),
|
|
51655
|
-
children: array(PipelineStepInputSchema).optional(),
|
|
51656
|
-
settings: record(string(), unknown()).optional(),
|
|
51657
|
-
jumpDeviceKey: string().optional()
|
|
51658
|
-
}));
|
|
51659
51800
|
var ModelSubstitutionSchema = object({
|
|
51660
51801
|
addonId: string(),
|
|
51661
51802
|
chosen: string(),
|
|
@@ -51734,7 +51875,6 @@ var ConfigUISchemaBridge = custom();
|
|
|
51734
51875
|
var ConfigUISchemaNullableBridge = custom();
|
|
51735
51876
|
var InferenceCapabilitiesBridge = custom();
|
|
51736
51877
|
var ModelAvailabilityListBridge = custom();
|
|
51737
|
-
var PipelineRunResultBridge = custom();
|
|
51738
51878
|
method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
|
|
51739
51879
|
modelId: string(),
|
|
51740
51880
|
settings: record(string(), unknown()).readonly()
|
|
@@ -54896,6 +55036,12 @@ var ServerUpdateActionResultSchema = object({
|
|
|
54896
55036
|
*/
|
|
54897
55037
|
blockers: array(UpdateBlockerSchema).optional()
|
|
54898
55038
|
});
|
|
55039
|
+
var LaunchOverridesSchema = object({
|
|
55040
|
+
/** The persisted heap ceiling in MB, or `null` when none is set. */
|
|
55041
|
+
heapMb: number().int().nullable() });
|
|
55042
|
+
var SetLaunchOverridesResultSchema = LaunchOverridesSchema.extend({
|
|
55043
|
+
/** Always true: the override is read at launch, not by the running process. */
|
|
55044
|
+
restartRequired: boolean() });
|
|
54899
55045
|
method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
|
|
54900
55046
|
kind: "mutation",
|
|
54901
55047
|
auth: "admin"
|
|
@@ -54918,6 +55064,9 @@ method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), S
|
|
|
54918
55064
|
}), method(_void(), ServerUpdateActionResultSchema, {
|
|
54919
55065
|
kind: "mutation",
|
|
54920
55066
|
auth: "admin"
|
|
55067
|
+
}), method(_void(), LaunchOverridesSchema, { auth: "admin" }), method(object({ heapMb: number().int().min(512).max(65536).nullable() }), SetLaunchOverridesResultSchema, {
|
|
55068
|
+
kind: "mutation",
|
|
55069
|
+
auth: "admin"
|
|
54921
55070
|
});
|
|
54922
55071
|
/**
|
|
54923
55072
|
* `smtp-provider` — pluggable email delivery surface.
|
|
@@ -59408,7 +59557,7 @@ object({
|
|
|
59408
59557
|
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
59409
59558
|
lastFetchedAt: number()
|
|
59410
59559
|
});
|
|
59411
|
-
var DeviceIdSchema = number().int().nonnegative();
|
|
59560
|
+
var DeviceIdSchema$1 = number().int().nonnegative();
|
|
59412
59561
|
/** A value a program option or setting can take. */
|
|
59413
59562
|
var DishwasherValueSchema = union([
|
|
59414
59563
|
boolean(),
|
|
@@ -59472,77 +59621,77 @@ var DishwasherOptionsSchema = object({
|
|
|
59472
59621
|
options: array(DishwasherOptionDescriptorSchema)
|
|
59473
59622
|
});
|
|
59474
59623
|
DeviceType.Dishwasher, method(object({
|
|
59475
|
-
deviceId: DeviceIdSchema,
|
|
59624
|
+
deviceId: DeviceIdSchema$1,
|
|
59476
59625
|
program: string().min(1).optional(),
|
|
59477
59626
|
options: record(string(), DishwasherValueSchema).optional()
|
|
59478
59627
|
}), _void(), {
|
|
59479
59628
|
kind: "mutation",
|
|
59480
59629
|
auth: "protected"
|
|
59481
|
-
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
59630
|
+
}), method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
|
|
59482
59631
|
kind: "mutation",
|
|
59483
59632
|
auth: "protected"
|
|
59484
|
-
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
59633
|
+
}), method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
|
|
59485
59634
|
kind: "mutation",
|
|
59486
59635
|
auth: "protected"
|
|
59487
|
-
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
59636
|
+
}), method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
|
|
59488
59637
|
kind: "mutation",
|
|
59489
59638
|
auth: "protected"
|
|
59490
59639
|
}), method(object({
|
|
59491
|
-
deviceId: DeviceIdSchema,
|
|
59640
|
+
deviceId: DeviceIdSchema$1,
|
|
59492
59641
|
program: string().min(1)
|
|
59493
59642
|
}), _void(), {
|
|
59494
59643
|
kind: "mutation",
|
|
59495
59644
|
auth: "protected"
|
|
59496
59645
|
}), method(object({
|
|
59497
|
-
deviceId: DeviceIdSchema,
|
|
59646
|
+
deviceId: DeviceIdSchema$1,
|
|
59498
59647
|
on: boolean()
|
|
59499
59648
|
}), _void(), {
|
|
59500
59649
|
kind: "mutation",
|
|
59501
59650
|
auth: "protected"
|
|
59502
59651
|
}), method(object({
|
|
59503
|
-
deviceId: DeviceIdSchema,
|
|
59652
|
+
deviceId: DeviceIdSchema$1,
|
|
59504
59653
|
on: boolean()
|
|
59505
59654
|
}), _void(), {
|
|
59506
59655
|
kind: "mutation",
|
|
59507
59656
|
auth: "protected"
|
|
59508
59657
|
}), method(object({
|
|
59509
|
-
deviceId: DeviceIdSchema,
|
|
59658
|
+
deviceId: DeviceIdSchema$1,
|
|
59510
59659
|
on: boolean()
|
|
59511
59660
|
}), _void(), {
|
|
59512
59661
|
kind: "mutation",
|
|
59513
59662
|
auth: "protected"
|
|
59514
59663
|
}), method(object({
|
|
59515
|
-
deviceId: DeviceIdSchema,
|
|
59664
|
+
deviceId: DeviceIdSchema$1,
|
|
59516
59665
|
on: boolean()
|
|
59517
59666
|
}), _void(), {
|
|
59518
59667
|
kind: "mutation",
|
|
59519
59668
|
auth: "protected"
|
|
59520
59669
|
}), method(object({
|
|
59521
|
-
deviceId: DeviceIdSchema,
|
|
59670
|
+
deviceId: DeviceIdSchema$1,
|
|
59522
59671
|
on: boolean()
|
|
59523
59672
|
}), _void(), {
|
|
59524
59673
|
kind: "mutation",
|
|
59525
59674
|
auth: "protected"
|
|
59526
59675
|
}), method(object({
|
|
59527
|
-
deviceId: DeviceIdSchema,
|
|
59676
|
+
deviceId: DeviceIdSchema$1,
|
|
59528
59677
|
on: boolean()
|
|
59529
59678
|
}), _void(), {
|
|
59530
59679
|
kind: "mutation",
|
|
59531
59680
|
auth: "protected"
|
|
59532
59681
|
}), method(object({
|
|
59533
|
-
deviceId: DeviceIdSchema,
|
|
59682
|
+
deviceId: DeviceIdSchema$1,
|
|
59534
59683
|
on: boolean()
|
|
59535
59684
|
}), _void(), {
|
|
59536
59685
|
kind: "mutation",
|
|
59537
59686
|
auth: "protected"
|
|
59538
59687
|
}), method(object({
|
|
59539
|
-
deviceId: DeviceIdSchema,
|
|
59688
|
+
deviceId: DeviceIdSchema$1,
|
|
59540
59689
|
key: string().min(1),
|
|
59541
59690
|
value: DishwasherValueSchema
|
|
59542
59691
|
}), _void(), {
|
|
59543
59692
|
kind: "mutation",
|
|
59544
59693
|
auth: "protected"
|
|
59545
|
-
}), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
|
|
59694
|
+
}), method(object({ deviceId: DeviceIdSchema$1 }), DishwasherOptionsSchema, { auth: "protected" });
|
|
59546
59695
|
DeviceType.Camera;
|
|
59547
59696
|
object({
|
|
59548
59697
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
@@ -61980,7 +62129,8 @@ var TopologyNodeSchema = object({
|
|
|
61980
62129
|
isHub: boolean(),
|
|
61981
62130
|
isOnline: boolean(),
|
|
61982
62131
|
cpuPercent: number(),
|
|
61983
|
-
|
|
62132
|
+
/** `null` when the node's memory read failed or it has not reported one (D393). */
|
|
62133
|
+
memoryPercent: number().nullable(),
|
|
61984
62134
|
uptime: number(),
|
|
61985
62135
|
lastSeen: string(),
|
|
61986
62136
|
localIps: array(string()).readonly(),
|
|
@@ -62515,9 +62665,10 @@ object({
|
|
|
62515
62665
|
* combined reading; per-hopper levels live in `food1`/`food2`. Null when
|
|
62516
62666
|
* the device has not reported yet. */
|
|
62517
62667
|
foodLevel: number().nullable().meta(readingMeta("none")),
|
|
62518
|
-
/** Food in the BOWL
|
|
62519
|
-
* feeder
|
|
62520
|
-
|
|
62668
|
+
/** Food in the BOWL, a mass (stored in kilograms, D944). Reported only by a
|
|
62669
|
+
* feeder with a bowl scale; null when the model has none or its reading is
|
|
62670
|
+
* of an unproven unit. */
|
|
62671
|
+
bowlFood: number().nullable().meta(readingMeta("mass")),
|
|
62521
62672
|
/** True while the pet is eating (`state.eating`). */
|
|
62522
62673
|
eating: boolean(),
|
|
62523
62674
|
/** Whether `markFoodReplenished` does anything on this model. When false
|
|
@@ -62630,6 +62781,64 @@ DeviceType.PetFeeder, method(object({
|
|
|
62630
62781
|
kind: "mutation",
|
|
62631
62782
|
auth: "protected"
|
|
62632
62783
|
});
|
|
62784
|
+
object({
|
|
62785
|
+
/** Water in the tank, 0..100 (%). Null while the source has not reported. */
|
|
62786
|
+
waterLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
62787
|
+
/** Water in the tank, in litres. Null while the source has not reported. */
|
|
62788
|
+
waterVolume: number().min(0).nullable().meta(readingMeta("volume")),
|
|
62789
|
+
/** True when the tank is empty. Null while unknown. */
|
|
62790
|
+
empty: boolean().nullable(),
|
|
62791
|
+
/** True while the pump is running. Null while unknown. */
|
|
62792
|
+
pumpRunning: boolean().nullable(),
|
|
62793
|
+
/** True when the pump works on an on/off duty cycle rather than continuously. */
|
|
62794
|
+
pumpIntervalEnabled: boolean().nullable(),
|
|
62795
|
+
/** How long the pump runs per cycle, in seconds. */
|
|
62796
|
+
pumpOnTime: number().min(0).nullable().meta(readingMeta("duration")),
|
|
62797
|
+
/** How long the pump rests per cycle, in seconds. */
|
|
62798
|
+
pumpOffTime: number().min(0).nullable().meta(readingMeta("duration")),
|
|
62799
|
+
/** Water drunk in the last drink, in litres. */
|
|
62800
|
+
lastDrink: number().min(0).nullable().meta(readingMeta("volume")),
|
|
62801
|
+
/** Water drunk in the current hour, in litres. */
|
|
62802
|
+
currentHourDrink: number().min(0).nullable().meta(readingMeta("volume")),
|
|
62803
|
+
/** Water drunk over the last 24 hours (rolling), in litres. */
|
|
62804
|
+
last24hDrink: number().min(0).nullable().meta(readingMeta("volume")),
|
|
62805
|
+
/** Water drunk since local midnight, in litres. */
|
|
62806
|
+
todayDrink: number().min(0).nullable().meta(readingMeta("volume")),
|
|
62807
|
+
/** Decoded fault message. Null means healthy; a non-null string is an active fault. */
|
|
62808
|
+
error: string().nullable(),
|
|
62809
|
+
/** Ms epoch when the slice was last refreshed. */
|
|
62810
|
+
lastFetchedAt: number()
|
|
62811
|
+
});
|
|
62812
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
62813
|
+
var MinutesSchema = number().int().min(0);
|
|
62814
|
+
DeviceType.PetFountain, method(object({
|
|
62815
|
+
deviceId: DeviceIdSchema,
|
|
62816
|
+
on: boolean()
|
|
62817
|
+
}), _void(), {
|
|
62818
|
+
kind: "mutation",
|
|
62819
|
+
auth: "protected"
|
|
62820
|
+
}), method(object({
|
|
62821
|
+
deviceId: DeviceIdSchema,
|
|
62822
|
+
on: boolean()
|
|
62823
|
+
}), _void(), {
|
|
62824
|
+
kind: "mutation",
|
|
62825
|
+
auth: "protected"
|
|
62826
|
+
}), method(object({
|
|
62827
|
+
deviceId: DeviceIdSchema,
|
|
62828
|
+
minutes: MinutesSchema
|
|
62829
|
+
}), _void(), {
|
|
62830
|
+
kind: "mutation",
|
|
62831
|
+
auth: "protected"
|
|
62832
|
+
}), method(object({
|
|
62833
|
+
deviceId: DeviceIdSchema,
|
|
62834
|
+
minutes: MinutesSchema
|
|
62835
|
+
}), _void(), {
|
|
62836
|
+
kind: "mutation",
|
|
62837
|
+
auth: "protected"
|
|
62838
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
62839
|
+
kind: "mutation",
|
|
62840
|
+
auth: "protected"
|
|
62841
|
+
});
|
|
62633
62842
|
var VehicleSchema = object({
|
|
62634
62843
|
id: string(),
|
|
62635
62844
|
name: string(),
|
|
@@ -67227,7 +67436,7 @@ discriminatedUnion("kind", [object({
|
|
|
67227
67436
|
})]);
|
|
67228
67437
|
DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
|
|
67229
67438
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
67230
|
-
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;
|
|
67439
|
+
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;
|
|
67231
67440
|
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
67232
67441
|
DeviceRole.BinarySensor, DeviceRole.MotionSensor;
|
|
67233
67442
|
new Set(CAP_NAMES);
|
|
@@ -67378,7 +67587,7 @@ var AccessoryKind = {
|
|
|
67378
67587
|
PrivacyMask: DeviceRole.PrivacyMask
|
|
67379
67588
|
};
|
|
67380
67589
|
AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
|
|
67381
|
-
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;
|
|
67590
|
+
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;
|
|
67382
67591
|
new Set(Object.values(DeviceType));
|
|
67383
67592
|
Object.freeze({
|
|
67384
67593
|
"accessories.getStatus": {
|
|
@@ -69313,6 +69522,13 @@ Object.freeze({
|
|
|
69313
69522
|
access: "create",
|
|
69314
69523
|
role: "admin"
|
|
69315
69524
|
},
|
|
69525
|
+
"deviceExport.exposeEntity": {
|
|
69526
|
+
capName: "device-export",
|
|
69527
|
+
capScope: "system",
|
|
69528
|
+
addonId: null,
|
|
69529
|
+
access: "create",
|
|
69530
|
+
role: "admin"
|
|
69531
|
+
},
|
|
69316
69532
|
"deviceExport.getDeviceLiveContribution": {
|
|
69317
69533
|
capName: "device-export",
|
|
69318
69534
|
capScope: "system",
|
|
@@ -69341,6 +69557,13 @@ Object.freeze({
|
|
|
69341
69557
|
access: "view",
|
|
69342
69558
|
role: "admin"
|
|
69343
69559
|
},
|
|
69560
|
+
"deviceExport.listExposedEntities": {
|
|
69561
|
+
capName: "device-export",
|
|
69562
|
+
capScope: "system",
|
|
69563
|
+
addonId: null,
|
|
69564
|
+
access: "view",
|
|
69565
|
+
role: "admin"
|
|
69566
|
+
},
|
|
69344
69567
|
"deviceExport.listSupportedDeviceKinds": {
|
|
69345
69568
|
capName: "device-export",
|
|
69346
69569
|
capScope: "system",
|
|
@@ -69348,6 +69571,13 @@ Object.freeze({
|
|
|
69348
69571
|
access: "view",
|
|
69349
69572
|
role: "admin"
|
|
69350
69573
|
},
|
|
69574
|
+
"deviceExport.listSupportedEntityKinds": {
|
|
69575
|
+
capName: "device-export",
|
|
69576
|
+
capScope: "system",
|
|
69577
|
+
addonId: null,
|
|
69578
|
+
access: "view",
|
|
69579
|
+
role: "admin"
|
|
69580
|
+
},
|
|
69351
69581
|
"deviceExport.unexposeDevice": {
|
|
69352
69582
|
capName: "device-export",
|
|
69353
69583
|
capScope: "system",
|
|
@@ -69355,6 +69585,13 @@ Object.freeze({
|
|
|
69355
69585
|
access: "create",
|
|
69356
69586
|
role: "admin"
|
|
69357
69587
|
},
|
|
69588
|
+
"deviceExport.unexposeEntity": {
|
|
69589
|
+
capName: "device-export",
|
|
69590
|
+
capScope: "system",
|
|
69591
|
+
addonId: null,
|
|
69592
|
+
access: "create",
|
|
69593
|
+
role: "admin"
|
|
69594
|
+
},
|
|
69358
69595
|
"deviceExtension.listCandidates": {
|
|
69359
69596
|
capName: "device-extension",
|
|
69360
69597
|
capScope: "device",
|
|
@@ -72820,6 +73057,48 @@ Object.freeze({
|
|
|
72820
73057
|
access: "create",
|
|
72821
73058
|
role: "viewer"
|
|
72822
73059
|
},
|
|
73060
|
+
"petFountain.getStatus": {
|
|
73061
|
+
capName: "pet-fountain",
|
|
73062
|
+
capScope: "device",
|
|
73063
|
+
addonId: null,
|
|
73064
|
+
access: "view",
|
|
73065
|
+
role: "viewer"
|
|
73066
|
+
},
|
|
73067
|
+
"petFountain.resetDailyConsumption": {
|
|
73068
|
+
capName: "pet-fountain",
|
|
73069
|
+
capScope: "device",
|
|
73070
|
+
addonId: null,
|
|
73071
|
+
access: "delete",
|
|
73072
|
+
role: "viewer"
|
|
73073
|
+
},
|
|
73074
|
+
"petFountain.setPump": {
|
|
73075
|
+
capName: "pet-fountain",
|
|
73076
|
+
capScope: "device",
|
|
73077
|
+
addonId: null,
|
|
73078
|
+
access: "create",
|
|
73079
|
+
role: "viewer"
|
|
73080
|
+
},
|
|
73081
|
+
"petFountain.setPumpInterval": {
|
|
73082
|
+
capName: "pet-fountain",
|
|
73083
|
+
capScope: "device",
|
|
73084
|
+
addonId: null,
|
|
73085
|
+
access: "create",
|
|
73086
|
+
role: "viewer"
|
|
73087
|
+
},
|
|
73088
|
+
"petFountain.setPumpOffMinutes": {
|
|
73089
|
+
capName: "pet-fountain",
|
|
73090
|
+
capScope: "device",
|
|
73091
|
+
addonId: null,
|
|
73092
|
+
access: "create",
|
|
73093
|
+
role: "viewer"
|
|
73094
|
+
},
|
|
73095
|
+
"petFountain.setPumpOnMinutes": {
|
|
73096
|
+
capName: "pet-fountain",
|
|
73097
|
+
capScope: "device",
|
|
73098
|
+
addonId: null,
|
|
73099
|
+
access: "create",
|
|
73100
|
+
role: "viewer"
|
|
73101
|
+
},
|
|
72823
73102
|
"pipelineAnalytics.addRetrainFrameFromRecording": {
|
|
72824
73103
|
capName: "pipeline-analytics",
|
|
72825
73104
|
capScope: "device",
|
|
@@ -75221,6 +75500,13 @@ Object.freeze({
|
|
|
75221
75500
|
access: "create",
|
|
75222
75501
|
role: "admin"
|
|
75223
75502
|
},
|
|
75503
|
+
"serverManagement.getLaunchOverrides": {
|
|
75504
|
+
capName: "server-management",
|
|
75505
|
+
capScope: "system",
|
|
75506
|
+
addonId: null,
|
|
75507
|
+
access: "view",
|
|
75508
|
+
role: "admin"
|
|
75509
|
+
},
|
|
75224
75510
|
"serverManagement.getServerPackageStatus": {
|
|
75225
75511
|
capName: "server-management",
|
|
75226
75512
|
capScope: "system",
|
|
@@ -75242,6 +75528,13 @@ Object.freeze({
|
|
|
75242
75528
|
access: "create",
|
|
75243
75529
|
role: "admin"
|
|
75244
75530
|
},
|
|
75531
|
+
"serverManagement.setLaunchOverrides": {
|
|
75532
|
+
capName: "server-management",
|
|
75533
|
+
capScope: "system",
|
|
75534
|
+
addonId: null,
|
|
75535
|
+
access: "create",
|
|
75536
|
+
role: "admin"
|
|
75537
|
+
},
|
|
75245
75538
|
"settingsStore.aggregate": {
|
|
75246
75539
|
capName: "settings-store",
|
|
75247
75540
|
capScope: "system",
|
|
@@ -79302,6 +79595,100 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
79302
79595
|
}
|
|
79303
79596
|
]
|
|
79304
79597
|
},
|
|
79598
|
+
"pet-fountain": {
|
|
79599
|
+
scope: "device",
|
|
79600
|
+
noun: t("Pet fountain", "Fontana per animali"),
|
|
79601
|
+
actions: [
|
|
79602
|
+
{
|
|
79603
|
+
id: "petFountain.pumpOn",
|
|
79604
|
+
method: "setPump",
|
|
79605
|
+
label: t("Pump on", "Pompa accesa"),
|
|
79606
|
+
phrase: t("Start the pump of {device}", "Avvia la pompa di {device}"),
|
|
79607
|
+
icon: "play",
|
|
79608
|
+
args: { on: true }
|
|
79609
|
+
},
|
|
79610
|
+
{
|
|
79611
|
+
id: "petFountain.pumpOff",
|
|
79612
|
+
method: "setPump",
|
|
79613
|
+
label: t("Pump off", "Pompa spenta"),
|
|
79614
|
+
phrase: t("Stop the pump of {device}", "Ferma la pompa di {device}"),
|
|
79615
|
+
icon: "square",
|
|
79616
|
+
args: { on: false }
|
|
79617
|
+
},
|
|
79618
|
+
{
|
|
79619
|
+
id: "petFountain.intervalOn",
|
|
79620
|
+
method: "setPumpInterval",
|
|
79621
|
+
label: t("Pump cycle on", "Ciclo pompa attivo"),
|
|
79622
|
+
phrase: t("Run the pump of {device} on its on/off cycle", "Fai lavorare la pompa di {device} a ciclo acceso/spento"),
|
|
79623
|
+
icon: "timer",
|
|
79624
|
+
args: { on: true }
|
|
79625
|
+
},
|
|
79626
|
+
{
|
|
79627
|
+
id: "petFountain.intervalOff",
|
|
79628
|
+
method: "setPumpInterval",
|
|
79629
|
+
label: t("Pump cycle off", "Ciclo pompa spento"),
|
|
79630
|
+
phrase: t("Run the pump of {device} continuously", "Fai lavorare la pompa di {device} in continuo"),
|
|
79631
|
+
icon: "timer-off",
|
|
79632
|
+
args: { on: false }
|
|
79633
|
+
},
|
|
79634
|
+
{
|
|
79635
|
+
id: "petFountain.pumpOnMinutes",
|
|
79636
|
+
method: "setPumpOnMinutes",
|
|
79637
|
+
label: t("Set pump run time", "Imposta il tempo di lavoro della pompa"),
|
|
79638
|
+
phrase: t("Set the pump of {device} to run {minutes} minutes per cycle", "Imposta la pompa di {device} a lavorare {minutes} minuti per ciclo"),
|
|
79639
|
+
icon: "timer",
|
|
79640
|
+
openArgs: [{
|
|
79641
|
+
key: "minutes",
|
|
79642
|
+
label: t("Minutes", "Minuti"),
|
|
79643
|
+
offer: {
|
|
79644
|
+
kind: "number",
|
|
79645
|
+
min: 0,
|
|
79646
|
+
step: 1,
|
|
79647
|
+
unit: "min"
|
|
79648
|
+
}
|
|
79649
|
+
}]
|
|
79650
|
+
},
|
|
79651
|
+
{
|
|
79652
|
+
id: "petFountain.pumpOffMinutes",
|
|
79653
|
+
method: "setPumpOffMinutes",
|
|
79654
|
+
label: t("Set pump rest time", "Imposta il tempo di riposo della pompa"),
|
|
79655
|
+
phrase: t("Set the pump of {device} to rest {minutes} minutes per cycle", "Imposta la pompa di {device} a riposare {minutes} minuti per ciclo"),
|
|
79656
|
+
icon: "timer-off",
|
|
79657
|
+
openArgs: [{
|
|
79658
|
+
key: "minutes",
|
|
79659
|
+
label: t("Minutes", "Minuti"),
|
|
79660
|
+
offer: {
|
|
79661
|
+
kind: "number",
|
|
79662
|
+
min: 0,
|
|
79663
|
+
step: 1,
|
|
79664
|
+
unit: "min"
|
|
79665
|
+
}
|
|
79666
|
+
}]
|
|
79667
|
+
},
|
|
79668
|
+
{
|
|
79669
|
+
id: "petFountain.resetDailyConsumption",
|
|
79670
|
+
method: "resetDailyConsumption",
|
|
79671
|
+
label: t("Clear daily consumption", "Azzera il consumo giornaliero"),
|
|
79672
|
+
phrase: t("Clear the daily water consumption of {device}", "Azzera il consumo giornaliero di acqua di {device}"),
|
|
79673
|
+
icon: "rotate-ccw"
|
|
79674
|
+
}
|
|
79675
|
+
],
|
|
79676
|
+
state: [{
|
|
79677
|
+
kind: "boolean",
|
|
79678
|
+
field: "empty",
|
|
79679
|
+
label: t("Tank empty", "Serbatoio vuoto"),
|
|
79680
|
+
whenTrue: t("When the tank of {device} is empty", "Quando il serbatoio di {device} è vuoto"),
|
|
79681
|
+
whenFalse: t("When the tank of {device} is refilled", "Quando il serbatoio di {device} viene riempito"),
|
|
79682
|
+
icon: "droplet"
|
|
79683
|
+
}, {
|
|
79684
|
+
kind: "numeric",
|
|
79685
|
+
field: "waterLevel",
|
|
79686
|
+
quantity: t("the water level", "il livello dell’acqua"),
|
|
79687
|
+
label: t("Water level", "Livello dell’acqua"),
|
|
79688
|
+
unit: "%",
|
|
79689
|
+
icon: "droplets"
|
|
79690
|
+
}]
|
|
79691
|
+
},
|
|
79305
79692
|
"media-player": {
|
|
79306
79693
|
scope: "device",
|
|
79307
79694
|
noun: t("Media player", "Lettore multimediale"),
|
|
@@ -81239,7 +81626,7 @@ function projectAction(cap, action) {
|
|
|
81239
81626
|
};
|
|
81240
81627
|
}
|
|
81241
81628
|
Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
|
|
81242
|
-
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;
|
|
81629
|
+
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;
|
|
81243
81630
|
DeviceFeature.BatteryOperated;
|
|
81244
81631
|
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
81245
81632
|
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.";
|
|
@@ -82790,6 +83177,36 @@ Object.freeze({
|
|
|
82790
83177
|
form: "single",
|
|
82791
83178
|
optional: false
|
|
82792
83179
|
}],
|
|
83180
|
+
"petFountain.getStatus": [{
|
|
83181
|
+
name: "deviceId",
|
|
83182
|
+
form: "single",
|
|
83183
|
+
optional: false
|
|
83184
|
+
}],
|
|
83185
|
+
"petFountain.resetDailyConsumption": [{
|
|
83186
|
+
name: "deviceId",
|
|
83187
|
+
form: "single",
|
|
83188
|
+
optional: false
|
|
83189
|
+
}],
|
|
83190
|
+
"petFountain.setPump": [{
|
|
83191
|
+
name: "deviceId",
|
|
83192
|
+
form: "single",
|
|
83193
|
+
optional: false
|
|
83194
|
+
}],
|
|
83195
|
+
"petFountain.setPumpInterval": [{
|
|
83196
|
+
name: "deviceId",
|
|
83197
|
+
form: "single",
|
|
83198
|
+
optional: false
|
|
83199
|
+
}],
|
|
83200
|
+
"petFountain.setPumpOffMinutes": [{
|
|
83201
|
+
name: "deviceId",
|
|
83202
|
+
form: "single",
|
|
83203
|
+
optional: false
|
|
83204
|
+
}],
|
|
83205
|
+
"petFountain.setPumpOnMinutes": [{
|
|
83206
|
+
name: "deviceId",
|
|
83207
|
+
form: "single",
|
|
83208
|
+
optional: false
|
|
83209
|
+
}],
|
|
82793
83210
|
"pipelineAnalytics.addRetrainFrameFromRecording": [{
|
|
82794
83211
|
name: "deviceId",
|
|
82795
83212
|
form: "single",
|