@camstack/addon-export-google 0.1.116 → 0.1.118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/export-google.addon.js +2378 -671
- package/dist/export-google.addon.mjs +2378 -671
- package/package.json +3 -2
|
@@ -14,7 +14,7 @@ async function dispatchCapCall(api, call) {
|
|
|
14
14
|
case "brightness.setBrightness":
|
|
15
15
|
await api.brightness.setBrightness.mutate({
|
|
16
16
|
deviceId: call.deviceId,
|
|
17
|
-
|
|
17
|
+
level: call.percentage
|
|
18
18
|
});
|
|
19
19
|
return;
|
|
20
20
|
case "lockControl.lock":
|
|
@@ -77,7 +77,7 @@ function createApiDeviceGateway(deps) {
|
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
//#endregion
|
|
80
|
-
//#region ../types/dist/event-category-
|
|
80
|
+
//#region ../types/dist/event-category-DmZDPDf_.mjs
|
|
81
81
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
82
82
|
EventCategory["SystemBoot"] = "system.boot";
|
|
83
83
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -704,7 +704,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
704
704
|
* (a track was promoted to a stationary-registry entry) or departs (the
|
|
705
705
|
* object moved / was removed). Telemetry (D8): lossy, drives a UI refresh of
|
|
706
706
|
* the dedicated "Stationary" section — never the live event feed. Payload:
|
|
707
|
-
* `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
|
|
707
|
+
* `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp, observedAt, zones }`.
|
|
708
708
|
*/
|
|
709
709
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
710
710
|
/**
|
|
@@ -842,6 +842,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
842
842
|
*/
|
|
843
843
|
EventCategory["AccessoriesChanged"] = "accessories.onAccessoriesChanged";
|
|
844
844
|
/**
|
|
845
|
+
* An action run started or ended. Emitted by the `actions` surface.
|
|
846
|
+
* Payload: `ActionRunChanged` (`{ actionId, runId, isRunning, outcome?, lastRunAt, lastError }`).
|
|
847
|
+
*/
|
|
848
|
+
EventCategory["ActionsRunChanged"] = "actions.onRunChanged";
|
|
849
|
+
/**
|
|
845
850
|
* Progress update from a running model conversion job.
|
|
846
851
|
* Payload: `{ kind: 'model-convert', phase, sessionId?, pct?, detail? }`.
|
|
847
852
|
* Emitted by `addon-model-studio` on the converting node.
|
|
@@ -5141,6 +5146,14 @@ function object(shape, params) {
|
|
|
5141
5146
|
...normalizeParams(params)
|
|
5142
5147
|
});
|
|
5143
5148
|
}
|
|
5149
|
+
function strictObject(shape, params) {
|
|
5150
|
+
return new ZodObject({
|
|
5151
|
+
type: "object",
|
|
5152
|
+
shape,
|
|
5153
|
+
catchall: never(),
|
|
5154
|
+
...normalizeParams(params)
|
|
5155
|
+
});
|
|
5156
|
+
}
|
|
5144
5157
|
function looseObject(shape, params) {
|
|
5145
5158
|
return new ZodObject({
|
|
5146
5159
|
type: "object",
|
|
@@ -5520,7 +5533,7 @@ var ZodIssueCode = {
|
|
|
5520
5533
|
var ZodFirstPartyTypeKind;
|
|
5521
5534
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5522
5535
|
//#endregion
|
|
5523
|
-
//#region ../types/dist/sleep
|
|
5536
|
+
//#region ../types/dist/sleep-6eG9C8Xl.mjs
|
|
5524
5537
|
/**
|
|
5525
5538
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5526
5539
|
* window to float samples (D455).
|
|
@@ -8496,6 +8509,52 @@ function optionalMethod(input, output, options) {
|
|
|
8496
8509
|
providerOptional: true
|
|
8497
8510
|
};
|
|
8498
8511
|
}
|
|
8512
|
+
/**
|
|
8513
|
+
* `addon-pages-source` — collection cap exposing per-provider raw page
|
|
8514
|
+
* declarations. Every addon that contributes a UI page registers a
|
|
8515
|
+
* provider here. The hub-side singleton aggregator (`addon-pages` cap,
|
|
8516
|
+
* see `addon-pages.cap.ts`) walks this collection, stamps versioned
|
|
8517
|
+
* `bundleUrl` values, and returns the enriched `AddonPageInfo[]` list
|
|
8518
|
+
* that admin-ui consumes.
|
|
8519
|
+
*
|
|
8520
|
+
* The split exists because the public listing has a different output
|
|
8521
|
+
* shape than the per-provider raw declarations, and we want both ends
|
|
8522
|
+
* to flow through codegen instead of relying on a hand-written wrapper.
|
|
8523
|
+
*/
|
|
8524
|
+
var AddonPageDeclarationSchema = object({
|
|
8525
|
+
id: string(),
|
|
8526
|
+
label: string(),
|
|
8527
|
+
icon: string(),
|
|
8528
|
+
path: string(),
|
|
8529
|
+
/**
|
|
8530
|
+
* Module Federation remote name — must match the `name` field on the
|
|
8531
|
+
* page addon's `federation()` plugin config. Used by admin-ui's
|
|
8532
|
+
* `<AddonPageLoader>` to call `loadRemote('<remoteName>/page')`.
|
|
8533
|
+
* Conventionally `addon_<id>_page` (snake_case; MF names cannot
|
|
8534
|
+
* contain hyphens).
|
|
8535
|
+
*/
|
|
8536
|
+
remoteName: string(),
|
|
8537
|
+
/**
|
|
8538
|
+
* Bundle filename inside the addon's `dist/` dir served at
|
|
8539
|
+
* `/api/addon-pages/<addonId>/<bundle>`. With Module Federation this
|
|
8540
|
+
* is always `'remoteEntry.js'`; the value is kept on the metadata so
|
|
8541
|
+
* the static-file route can compute an mtime-based cache-buster URL
|
|
8542
|
+
* without a separate filesystem stat.
|
|
8543
|
+
*/
|
|
8544
|
+
bundle: string(),
|
|
8545
|
+
/**
|
|
8546
|
+
* Sidebar section this page docks into. Well-known ids: `'detection'`,
|
|
8547
|
+
* `'cluster'`, `'administration'` — the page renders inside that group.
|
|
8548
|
+
* Any OTHER string creates (or joins) a custom section rendered after
|
|
8549
|
+
* the built-in groups; its label comes from `sectionLabel` (first
|
|
8550
|
+
* declaration wins), falling back to the id. Absent → the legacy
|
|
8551
|
+
* "Addon Pages" group.
|
|
8552
|
+
*/
|
|
8553
|
+
section: string().optional(),
|
|
8554
|
+
/** Display label for a CUSTOM `section` id (ignored for well-known ids). */
|
|
8555
|
+
sectionLabel: string().optional()
|
|
8556
|
+
});
|
|
8557
|
+
method(_void(), array(AddonPageDeclarationSchema).readonly(), { auth: "admin" });
|
|
8499
8558
|
var StaticDirOutputSchema$1 = object({ staticDir: string() });
|
|
8500
8559
|
var VersionOutputSchema$1 = object({ version: string() });
|
|
8501
8560
|
method(_void(), StaticDirOutputSchema$1, { auth: "admin" }), method(_void(), VersionOutputSchema$1, { auth: "admin" });
|
|
@@ -8521,6 +8580,27 @@ function customAction(input, output, options) {
|
|
|
8521
8580
|
...options?.caller ? { caller: "required" } : {}
|
|
8522
8581
|
};
|
|
8523
8582
|
}
|
|
8583
|
+
/**
|
|
8584
|
+
* The pipeline step-input shape and the run-result bridge, in a module that
|
|
8585
|
+
* imports nothing but zod and types.
|
|
8586
|
+
*
|
|
8587
|
+
* WHY A SEPARATE FILE (addon footprint, D28): both were declared in
|
|
8588
|
+
* `pipeline-executor.cap.ts`, whose import evaluates the whole executor schema
|
|
8589
|
+
* graph. An addon that only needs these two (the benchmark's `runPipelineTest`
|
|
8590
|
+
* action) paid ~130 MB of heap at load. `pipeline-executor.cap.ts` re-exports
|
|
8591
|
+
* them, so every existing import keeps working; addon server code takes them
|
|
8592
|
+
* from `@camstack/types/addon`.
|
|
8593
|
+
*/
|
|
8594
|
+
var PipelineStepInputSchema = lazy(() => object({
|
|
8595
|
+
addonId: string(),
|
|
8596
|
+
modelId: string().optional(),
|
|
8597
|
+
enabled: boolean().default(true),
|
|
8598
|
+
children: array(PipelineStepInputSchema).optional(),
|
|
8599
|
+
settings: record(string(), unknown()).optional(),
|
|
8600
|
+
jumpDeviceKey: string().optional()
|
|
8601
|
+
}));
|
|
8602
|
+
/** Typed bridge to the recursive `FrameResult` graph; validation is structural. */
|
|
8603
|
+
var PipelineRunResultBridge = custom();
|
|
8524
8604
|
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
8525
8605
|
var VersionOutputSchema = object({ version: string() });
|
|
8526
8606
|
method(_void(), StaticDirOutputSchema, { auth: "admin" }), method(_void(), VersionOutputSchema, { auth: "admin" });
|
|
@@ -8591,6 +8671,8 @@ Object.freeze({ "doorbell": "lastPressedAt" });
|
|
|
8591
8671
|
/** Every capability name, so addon code can check a name without the schema graph. */
|
|
8592
8672
|
var CAP_NAMES = Object.freeze([
|
|
8593
8673
|
"accessories",
|
|
8674
|
+
"action-source",
|
|
8675
|
+
"actions",
|
|
8594
8676
|
"addon-pages",
|
|
8595
8677
|
"addon-pages-source",
|
|
8596
8678
|
"addon-routes",
|
|
@@ -8674,6 +8756,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8674
8756
|
"image-settings",
|
|
8675
8757
|
"integrations",
|
|
8676
8758
|
"intercom",
|
|
8759
|
+
"ir-transmitter",
|
|
8677
8760
|
"keychain",
|
|
8678
8761
|
"keychain-admin",
|
|
8679
8762
|
"lawn-mower-control",
|
|
@@ -8702,6 +8785,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8702
8785
|
"network-link",
|
|
8703
8786
|
"network-quality",
|
|
8704
8787
|
"node-certificates",
|
|
8788
|
+
"node-removal-hook",
|
|
8705
8789
|
"nodes",
|
|
8706
8790
|
"notification-output",
|
|
8707
8791
|
"notification-rules",
|
|
@@ -8712,6 +8796,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8712
8796
|
"osd",
|
|
8713
8797
|
"osd-manager",
|
|
8714
8798
|
"pet-feeder",
|
|
8799
|
+
"pet-fountain",
|
|
8715
8800
|
"pipeline-analytics",
|
|
8716
8801
|
"pipeline-executor",
|
|
8717
8802
|
"pipeline-orchestrator",
|
|
@@ -8732,6 +8817,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8732
8817
|
"recording-onboard",
|
|
8733
8818
|
"recording-signal",
|
|
8734
8819
|
"records",
|
|
8820
|
+
"remote",
|
|
8735
8821
|
"running-state",
|
|
8736
8822
|
"scene-monitor",
|
|
8737
8823
|
"script-runner",
|
|
@@ -8755,6 +8841,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8755
8841
|
"system",
|
|
8756
8842
|
"tamper",
|
|
8757
8843
|
"temperature-sensor",
|
|
8844
|
+
"template",
|
|
8758
8845
|
"terminal-session",
|
|
8759
8846
|
"toast",
|
|
8760
8847
|
"training",
|
|
@@ -8779,11 +8866,11 @@ var CAP_NAMES = Object.freeze([
|
|
|
8779
8866
|
Object.freeze({
|
|
8780
8867
|
"air-quality-sensor": [
|
|
8781
8868
|
{
|
|
8782
|
-
"path": "
|
|
8869
|
+
"path": "co2",
|
|
8783
8870
|
"valueType": "number"
|
|
8784
8871
|
},
|
|
8785
8872
|
{
|
|
8786
|
-
"path": "
|
|
8873
|
+
"path": "voc",
|
|
8787
8874
|
"valueType": "number"
|
|
8788
8875
|
},
|
|
8789
8876
|
{
|
|
@@ -8833,7 +8920,7 @@ Object.freeze({
|
|
|
8833
8920
|
}
|
|
8834
8921
|
],
|
|
8835
8922
|
"ambient-light-sensor": [{
|
|
8836
|
-
"path": "
|
|
8923
|
+
"path": "illuminance",
|
|
8837
8924
|
"valueType": "number"
|
|
8838
8925
|
}],
|
|
8839
8926
|
"audio-metrics": [
|
|
@@ -8894,7 +8981,7 @@ Object.freeze({
|
|
|
8894
8981
|
],
|
|
8895
8982
|
"battery": [
|
|
8896
8983
|
{
|
|
8897
|
-
"path": "
|
|
8984
|
+
"path": "level",
|
|
8898
8985
|
"valueType": "number"
|
|
8899
8986
|
},
|
|
8900
8987
|
{
|
|
@@ -8916,7 +9003,7 @@ Object.freeze({
|
|
|
8916
9003
|
"valueType": "number"
|
|
8917
9004
|
},
|
|
8918
9005
|
{
|
|
8919
|
-
"path": "
|
|
9006
|
+
"path": "voltage",
|
|
8920
9007
|
"valueType": "number"
|
|
8921
9008
|
},
|
|
8922
9009
|
{
|
|
@@ -8937,7 +9024,7 @@ Object.freeze({
|
|
|
8937
9024
|
"valueType": "boolean"
|
|
8938
9025
|
}],
|
|
8939
9026
|
"brightness": [{
|
|
8940
|
-
"path": "
|
|
9027
|
+
"path": "level",
|
|
8941
9028
|
"valueType": "number"
|
|
8942
9029
|
}],
|
|
8943
9030
|
"broker": [{
|
|
@@ -9138,7 +9225,7 @@ Object.freeze({
|
|
|
9138
9225
|
"valueType": "number"
|
|
9139
9226
|
},
|
|
9140
9227
|
{
|
|
9141
|
-
"path": "
|
|
9228
|
+
"path": "colorTemperature",
|
|
9142
9229
|
"valueType": "number"
|
|
9143
9230
|
}
|
|
9144
9231
|
],
|
|
@@ -9317,15 +9404,15 @@ Object.freeze({
|
|
|
9317
9404
|
"valueType": "string"
|
|
9318
9405
|
},
|
|
9319
9406
|
{
|
|
9320
|
-
"path": "
|
|
9407
|
+
"path": "remaining",
|
|
9321
9408
|
"valueType": "number"
|
|
9322
9409
|
},
|
|
9323
9410
|
{
|
|
9324
|
-
"path": "
|
|
9411
|
+
"path": "delayedStart",
|
|
9325
9412
|
"valueType": "number"
|
|
9326
9413
|
},
|
|
9327
9414
|
{
|
|
9328
|
-
"path": "
|
|
9415
|
+
"path": "progress",
|
|
9329
9416
|
"valueType": "number"
|
|
9330
9417
|
},
|
|
9331
9418
|
{
|
|
@@ -9439,7 +9526,7 @@ Object.freeze({
|
|
|
9439
9526
|
],
|
|
9440
9527
|
"fan-control": [
|
|
9441
9528
|
{
|
|
9442
|
-
"path": "
|
|
9529
|
+
"path": "speed",
|
|
9443
9530
|
"valueType": "number"
|
|
9444
9531
|
},
|
|
9445
9532
|
{
|
|
@@ -9539,7 +9626,7 @@ Object.freeze({
|
|
|
9539
9626
|
}
|
|
9540
9627
|
],
|
|
9541
9628
|
"humidity-sensor": [{
|
|
9542
|
-
"path": "
|
|
9629
|
+
"path": "humidity",
|
|
9543
9630
|
"valueType": "number"
|
|
9544
9631
|
}],
|
|
9545
9632
|
"image": [{
|
|
@@ -9649,7 +9736,7 @@ Object.freeze({
|
|
|
9649
9736
|
"valueType": "number"
|
|
9650
9737
|
},
|
|
9651
9738
|
{
|
|
9652
|
-
"path": "
|
|
9739
|
+
"path": "progress",
|
|
9653
9740
|
"valueType": "number"
|
|
9654
9741
|
},
|
|
9655
9742
|
{
|
|
@@ -9695,6 +9782,11 @@ Object.freeze({
|
|
|
9695
9782
|
"standby"
|
|
9696
9783
|
]
|
|
9697
9784
|
},
|
|
9785
|
+
{
|
|
9786
|
+
"path": "stateSource",
|
|
9787
|
+
"valueType": "enum",
|
|
9788
|
+
"enumValues": ["reported", "assumed"]
|
|
9789
|
+
},
|
|
9698
9790
|
{
|
|
9699
9791
|
"path": "volumeLevel",
|
|
9700
9792
|
"valueType": "number"
|
|
@@ -9728,11 +9820,11 @@ Object.freeze({
|
|
|
9728
9820
|
"valueType": "string"
|
|
9729
9821
|
},
|
|
9730
9822
|
{
|
|
9731
|
-
"path": "
|
|
9823
|
+
"path": "position",
|
|
9732
9824
|
"valueType": "number"
|
|
9733
9825
|
},
|
|
9734
9826
|
{
|
|
9735
|
-
"path": "
|
|
9827
|
+
"path": "duration",
|
|
9736
9828
|
"valueType": "number"
|
|
9737
9829
|
},
|
|
9738
9830
|
{
|
|
@@ -9834,11 +9926,11 @@ Object.freeze({
|
|
|
9834
9926
|
]
|
|
9835
9927
|
},
|
|
9836
9928
|
{
|
|
9837
|
-
"path": "
|
|
9929
|
+
"path": "signal",
|
|
9838
9930
|
"valueType": "number"
|
|
9839
9931
|
},
|
|
9840
9932
|
{
|
|
9841
|
-
"path": "
|
|
9933
|
+
"path": "rssi",
|
|
9842
9934
|
"valueType": "number"
|
|
9843
9935
|
},
|
|
9844
9936
|
{
|
|
@@ -9893,6 +9985,18 @@ Object.freeze({
|
|
|
9893
9985
|
"path": "foodLevel",
|
|
9894
9986
|
"valueType": "number"
|
|
9895
9987
|
},
|
|
9988
|
+
{
|
|
9989
|
+
"path": "bowlFood",
|
|
9990
|
+
"valueType": "number"
|
|
9991
|
+
},
|
|
9992
|
+
{
|
|
9993
|
+
"path": "eating",
|
|
9994
|
+
"valueType": "boolean"
|
|
9995
|
+
},
|
|
9996
|
+
{
|
|
9997
|
+
"path": "supportsMarkRefilled",
|
|
9998
|
+
"valueType": "boolean"
|
|
9999
|
+
},
|
|
9896
10000
|
{
|
|
9897
10001
|
"path": "food1",
|
|
9898
10002
|
"valueType": "number"
|
|
@@ -9909,6 +10013,11 @@ Object.freeze({
|
|
|
9909
10013
|
"path": "batteryPower",
|
|
9910
10014
|
"valueType": "number"
|
|
9911
10015
|
},
|
|
10016
|
+
{
|
|
10017
|
+
"path": "powerSource",
|
|
10018
|
+
"valueType": "enum",
|
|
10019
|
+
"enumValues": ["mains", "battery"]
|
|
10020
|
+
},
|
|
9912
10021
|
{
|
|
9913
10022
|
"path": "desiccantLeftDays",
|
|
9914
10023
|
"valueType": "number"
|
|
@@ -9953,27 +10062,89 @@ Object.freeze({
|
|
|
9953
10062
|
{
|
|
9954
10063
|
"path": "volume",
|
|
9955
10064
|
"valueType": "number"
|
|
10065
|
+
},
|
|
10066
|
+
{
|
|
10067
|
+
"path": "lastFeedGrams",
|
|
10068
|
+
"valueType": "number"
|
|
10069
|
+
},
|
|
10070
|
+
{
|
|
10071
|
+
"path": "lastFeedHopper1",
|
|
10072
|
+
"valueType": "number"
|
|
10073
|
+
},
|
|
10074
|
+
{
|
|
10075
|
+
"path": "lastFeedHopper2",
|
|
10076
|
+
"valueType": "number"
|
|
10077
|
+
}
|
|
10078
|
+
],
|
|
10079
|
+
"pet-fountain": [
|
|
10080
|
+
{
|
|
10081
|
+
"path": "waterLevel",
|
|
10082
|
+
"valueType": "number"
|
|
10083
|
+
},
|
|
10084
|
+
{
|
|
10085
|
+
"path": "waterVolume",
|
|
10086
|
+
"valueType": "number"
|
|
10087
|
+
},
|
|
10088
|
+
{
|
|
10089
|
+
"path": "empty",
|
|
10090
|
+
"valueType": "boolean"
|
|
10091
|
+
},
|
|
10092
|
+
{
|
|
10093
|
+
"path": "pumpRunning",
|
|
10094
|
+
"valueType": "boolean"
|
|
10095
|
+
},
|
|
10096
|
+
{
|
|
10097
|
+
"path": "pumpIntervalEnabled",
|
|
10098
|
+
"valueType": "boolean"
|
|
10099
|
+
},
|
|
10100
|
+
{
|
|
10101
|
+
"path": "pumpOnTime",
|
|
10102
|
+
"valueType": "number"
|
|
10103
|
+
},
|
|
10104
|
+
{
|
|
10105
|
+
"path": "pumpOffTime",
|
|
10106
|
+
"valueType": "number"
|
|
10107
|
+
},
|
|
10108
|
+
{
|
|
10109
|
+
"path": "lastDrink",
|
|
10110
|
+
"valueType": "number"
|
|
10111
|
+
},
|
|
10112
|
+
{
|
|
10113
|
+
"path": "currentHourDrink",
|
|
10114
|
+
"valueType": "number"
|
|
10115
|
+
},
|
|
10116
|
+
{
|
|
10117
|
+
"path": "last24hDrink",
|
|
10118
|
+
"valueType": "number"
|
|
10119
|
+
},
|
|
10120
|
+
{
|
|
10121
|
+
"path": "todayDrink",
|
|
10122
|
+
"valueType": "number"
|
|
10123
|
+
},
|
|
10124
|
+
{
|
|
10125
|
+
"path": "error",
|
|
10126
|
+
"valueType": "string"
|
|
9956
10127
|
}
|
|
9957
10128
|
],
|
|
9958
10129
|
"power-meter": [
|
|
9959
10130
|
{
|
|
9960
|
-
"path": "
|
|
10131
|
+
"path": "power",
|
|
9961
10132
|
"valueType": "number"
|
|
9962
10133
|
},
|
|
9963
10134
|
{
|
|
9964
|
-
"path": "
|
|
10135
|
+
"path": "energy",
|
|
9965
10136
|
"valueType": "number"
|
|
9966
10137
|
},
|
|
9967
10138
|
{
|
|
9968
|
-
"path": "
|
|
10139
|
+
"path": "voltage",
|
|
9969
10140
|
"valueType": "number"
|
|
9970
10141
|
},
|
|
9971
10142
|
{
|
|
9972
|
-
"path": "
|
|
10143
|
+
"path": "current",
|
|
9973
10144
|
"valueType": "number"
|
|
9974
10145
|
},
|
|
9975
10146
|
{
|
|
9976
|
-
"path": "
|
|
10147
|
+
"path": "apparentPower",
|
|
9977
10148
|
"valueType": "number"
|
|
9978
10149
|
},
|
|
9979
10150
|
{
|
|
@@ -10001,14 +10172,10 @@ Object.freeze({
|
|
|
10001
10172
|
{
|
|
10002
10173
|
"path": "gps.accuracyMeters",
|
|
10003
10174
|
"valueType": "number"
|
|
10004
|
-
},
|
|
10005
|
-
{
|
|
10006
|
-
"path": "batteryPercent",
|
|
10007
|
-
"valueType": "number"
|
|
10008
10175
|
}
|
|
10009
10176
|
],
|
|
10010
10177
|
"pressure-sensor": [{
|
|
10011
|
-
"path": "
|
|
10178
|
+
"path": "pressure",
|
|
10012
10179
|
"valueType": "number"
|
|
10013
10180
|
}],
|
|
10014
10181
|
"privacy-mask": [{
|
|
@@ -10322,7 +10489,7 @@ Object.freeze({
|
|
|
10322
10489
|
"valueType": "boolean"
|
|
10323
10490
|
}],
|
|
10324
10491
|
"temperature-sensor": [{
|
|
10325
|
-
"path": "
|
|
10492
|
+
"path": "temperature",
|
|
10326
10493
|
"valueType": "number"
|
|
10327
10494
|
}],
|
|
10328
10495
|
"update": [
|
|
@@ -10370,7 +10537,7 @@ Object.freeze({
|
|
|
10370
10537
|
"valueType": "string"
|
|
10371
10538
|
},
|
|
10372
10539
|
{
|
|
10373
|
-
"path": "
|
|
10540
|
+
"path": "progress",
|
|
10374
10541
|
"valueType": "number"
|
|
10375
10542
|
},
|
|
10376
10543
|
{
|
|
@@ -10496,7 +10663,7 @@ object({
|
|
|
10496
10663
|
params: record(string(), union([string(), number()])).optional()
|
|
10497
10664
|
});
|
|
10498
10665
|
//#endregion
|
|
10499
|
-
//#region ../types/dist/err-msg-
|
|
10666
|
+
//#region ../types/dist/err-msg-DWXWc0Di.mjs
|
|
10500
10667
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
10501
10668
|
DeviceType["Camera"] = "camera";
|
|
10502
10669
|
DeviceType["Hub"] = "hub";
|
|
@@ -10588,6 +10755,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
10588
10755
|
* native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
|
|
10589
10756
|
* integrations sharing the same food/desiccant/hopper surface. */
|
|
10590
10757
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
10758
|
+
/** Pet water fountain — tank level, water drunk, pump and its duty cycle.
|
|
10759
|
+
* Installed with the `pet-fountain` cap. Reaches CamStack as loose entities
|
|
10760
|
+
* of a container and is BUILT as a composed device (D967). */
|
|
10761
|
+
DeviceType["PetFountain"] = "pet-fountain";
|
|
10591
10762
|
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
10592
10763
|
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
10593
10764
|
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
@@ -10842,6 +11013,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
10842
11013
|
/** Fallback when the notifier service name doesn't match a known
|
|
10843
11014
|
* pattern. */
|
|
10844
11015
|
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
11016
|
+
/** Emits a pulse train (infrared or RF) on request — the `ir-transmitter`
|
|
11017
|
+
* cap. A `DeviceType.Generic` device. */
|
|
11018
|
+
DeviceRole["IrTransmitter"] = "ir-transmitter";
|
|
10845
11019
|
return DeviceRole;
|
|
10846
11020
|
}({});
|
|
10847
11021
|
/**
|
|
@@ -10855,7 +11029,7 @@ function errMsg(err) {
|
|
|
10855
11029
|
return String(err);
|
|
10856
11030
|
}
|
|
10857
11031
|
//#endregion
|
|
10858
|
-
//#region ../types/dist/composition-
|
|
11032
|
+
//#region ../types/dist/composition-kSuOifuG.mjs
|
|
10859
11033
|
/**
|
|
10860
11034
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
10861
11035
|
*
|
|
@@ -11940,12 +12114,28 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
|
11940
12114
|
])
|
|
11941
12115
|
})
|
|
11942
12116
|
]);
|
|
11943
|
-
var
|
|
12117
|
+
var forwardArgUnion = union([
|
|
12118
|
+
string(),
|
|
12119
|
+
number(),
|
|
12120
|
+
boolean(),
|
|
12121
|
+
strictObject({ ["$input"]: string().min(1) }),
|
|
12122
|
+
record(string().min(1), lazy(() => forwardArgUnion))
|
|
12123
|
+
]);
|
|
12124
|
+
var CompositionForwardArgSchema = forwardArgUnion;
|
|
12125
|
+
/**
|
|
12126
|
+
* `forward` (D659, amended by D967): one method of a BUILT capability is one
|
|
12127
|
+
* call of `cap.method` on `source`. Without `args` the built method's input
|
|
12128
|
+
* passes through minus `deviceId`; with `args` the template IS the source's
|
|
12129
|
+
* whole input. `deviceId` is always the source's own, never an argument.
|
|
12130
|
+
*/
|
|
12131
|
+
var CompositionForwardCommandSchema = object({
|
|
11944
12132
|
kind: literal("forward"),
|
|
11945
12133
|
source: CompositionSourceRefSchema,
|
|
11946
12134
|
cap: string().min(1),
|
|
11947
|
-
method: string().min(1)
|
|
11948
|
-
|
|
12135
|
+
method: string().min(1),
|
|
12136
|
+
args: record(string().min(1), CompositionForwardArgSchema).optional()
|
|
12137
|
+
});
|
|
12138
|
+
var CompositionCommandTargetSchema = discriminatedUnion("kind", [CompositionForwardCommandSchema, CompositionCodeSourceSchema]);
|
|
11949
12139
|
/** An item key inside an item-array cap (`consumables.items[<key>]`). */
|
|
11950
12140
|
var COMPOSITION_ITEM_KEY_RE = /^[a-z0-9][a-z0-9-]{0,47}$/;
|
|
11951
12141
|
/**
|
|
@@ -11955,7 +12145,13 @@ var COMPOSITION_ITEM_KEY_RE = /^[a-z0-9][a-z0-9-]{0,47}$/;
|
|
|
11955
12145
|
*/
|
|
11956
12146
|
var CompositionItemEntrySchema = object({
|
|
11957
12147
|
label: string().min(1).max(80),
|
|
11958
|
-
fields: record(string().min(1), CompositionFieldSourceSchema)
|
|
12148
|
+
fields: record(string().min(1), CompositionFieldSourceSchema),
|
|
12149
|
+
/**
|
|
12150
|
+
* What the cap's `reset` does for THIS item (consumables). Present = the item
|
|
12151
|
+
* is resettable and a `reset` call naming its key forwards here. The item key
|
|
12152
|
+
* selects the command, so it is never an argument: there is no pass-through.
|
|
12153
|
+
*/
|
|
12154
|
+
reset: CompositionForwardCommandSchema.optional()
|
|
11959
12155
|
});
|
|
11960
12156
|
var CompositionFeatureSchema = discriminatedUnion("kind", [object({
|
|
11961
12157
|
kind: literal("fields"),
|
|
@@ -11967,7 +12163,7 @@ var CompositionFeatureSchema = discriminatedUnion("kind", [object({
|
|
|
11967
12163
|
* owns the WHOLE array field: the composed value holds exactly these items.
|
|
11968
12164
|
*/
|
|
11969
12165
|
items: record(string().regex(COMPOSITION_ITEM_KEY_RE), CompositionItemEntrySchema).refine((items) => Object.keys(items).length <= 16, { message: `at most 16 items` }).optional(),
|
|
11970
|
-
/**
|
|
12166
|
+
/** Method name → what serves it. Only a BUILT capability takes commands (D967). */
|
|
11971
12167
|
commands: record(string().min(1), CompositionCommandTargetSchema).optional()
|
|
11972
12168
|
}), object({
|
|
11973
12169
|
kind: literal("passthrough"),
|
|
@@ -15499,6 +15695,14 @@ var AutomationConditionLeafSchema = object({
|
|
|
15499
15695
|
array(union([string(), number()]))
|
|
15500
15696
|
])
|
|
15501
15697
|
});
|
|
15698
|
+
var AutomationConditionStationaryPresentSchema = object({
|
|
15699
|
+
kind: literal("stationary-present"),
|
|
15700
|
+
deviceId: number().int().nonnegative(),
|
|
15701
|
+
/** Class names; a macro class matches every raw class that maps to it. */
|
|
15702
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15703
|
+
/** The parked object must be in at least one of these zones. */
|
|
15704
|
+
zones: array(string().min(1)).min(1).optional()
|
|
15705
|
+
});
|
|
15502
15706
|
/**
|
|
15503
15707
|
* The expression leaf, declared as a plain object rather than an intersection
|
|
15504
15708
|
* with {@link ExpressionSourceSchema}: a discriminated union has to be able to
|
|
@@ -15532,7 +15736,8 @@ var AutomationConditionSchema = lazy(() => discriminatedUnion("kind", [
|
|
|
15532
15736
|
child: AutomationConditionSchema
|
|
15533
15737
|
}),
|
|
15534
15738
|
AutomationConditionLeafSchema,
|
|
15535
|
-
AutomationConditionExpressionSchema
|
|
15739
|
+
AutomationConditionExpressionSchema,
|
|
15740
|
+
AutomationConditionStationaryPresentSchema
|
|
15536
15741
|
]));
|
|
15537
15742
|
/**
|
|
15538
15743
|
* What starts a run.
|
|
@@ -15573,7 +15778,34 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
|
|
|
15573
15778
|
kind: literal("schedule"),
|
|
15574
15779
|
cron: string().min(1).max(120)
|
|
15575
15780
|
}),
|
|
15576
|
-
object({ kind: literal("manual") })
|
|
15781
|
+
object({ kind: literal("manual") }),
|
|
15782
|
+
object({
|
|
15783
|
+
kind: literal("detection"),
|
|
15784
|
+
/** Class names. A macro class (`animal`, `vehicle`, `person`, `package`)
|
|
15785
|
+
* matches every raw class that maps to it; any other name matches
|
|
15786
|
+
* exactly. */
|
|
15787
|
+
classes: array(string().min(1)).min(1),
|
|
15788
|
+
deviceIds: array(number().int().nonnegative()).min(1),
|
|
15789
|
+
/** The track must have visited at least one of these zones. */
|
|
15790
|
+
zones: array(string().min(1)).min(1).optional(),
|
|
15791
|
+
/** Best-so-far confidence the track must reach. */
|
|
15792
|
+
minScore: number().min(0).max(1).optional()
|
|
15793
|
+
}),
|
|
15794
|
+
object({
|
|
15795
|
+
kind: literal("stationary"),
|
|
15796
|
+
deviceIds: array(number().int().nonnegative()).min(1),
|
|
15797
|
+
/** Class names; a macro class matches like the detection trigger. */
|
|
15798
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15799
|
+
/** The parked object must be in at least one of these zones. */
|
|
15800
|
+
zones: array(string().min(1)).min(1).optional(),
|
|
15801
|
+
/** `appeared`: it became parked. `departed`: the registry retired it.
|
|
15802
|
+
* The vocabulary of `PipelineAnalyticsStationaryChanged`. */
|
|
15803
|
+
phase: _enum(["appeared", "departed"])
|
|
15804
|
+
}),
|
|
15805
|
+
object({
|
|
15806
|
+
kind: literal("interval"),
|
|
15807
|
+
minutes: number().int().min(1).max(1440)
|
|
15808
|
+
})
|
|
15577
15809
|
]);
|
|
15578
15810
|
/**
|
|
15579
15811
|
* One action step.
|
|
@@ -15593,28 +15825,47 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
|
|
|
15593
15825
|
* is called. The runner still receives a number and is untouched; the
|
|
15594
15826
|
* resolution is the recipe's job, not the runner's.
|
|
15595
15827
|
*/
|
|
15828
|
+
var AutomationWaitStepSchema = object({
|
|
15829
|
+
kind: literal("wait"),
|
|
15830
|
+
seconds: number().min(0).max(300)
|
|
15831
|
+
});
|
|
15832
|
+
var AutomationCapStepSchema = object({
|
|
15833
|
+
kind: literal("cap"),
|
|
15834
|
+
/**
|
|
15835
|
+
* One device, several same-family devices (locks / climate family / …),
|
|
15836
|
+
* or `{ $var }` for the device that triggered the run. An array is
|
|
15837
|
+
* fan-out at codegen — each id gets the same cap.method call.
|
|
15838
|
+
*/
|
|
15839
|
+
deviceId: union([
|
|
15840
|
+
number().int(),
|
|
15841
|
+
array(number().int()).min(1),
|
|
15842
|
+
object({ $var: string().min(1) })
|
|
15843
|
+
]),
|
|
15844
|
+
cap: string().min(1),
|
|
15845
|
+
method: string().min(1),
|
|
15846
|
+
/** Values may carry `{{vars.x}}` slots, or be exactly `{ $var: 'name' }`, which
|
|
15847
|
+
* SUBSTITUTE and do not evaluate (§3.2.3). Anything beyond substitution is
|
|
15848
|
+
* the expression leaf. */
|
|
15849
|
+
args: record(string(), unknown()).optional()
|
|
15850
|
+
});
|
|
15851
|
+
/**
|
|
15852
|
+
* The steps an internal Action may contain: cap and wait, and nothing that can
|
|
15853
|
+
* call back into an Action — so an Action can never reach itself (no cycles).
|
|
15854
|
+
*/
|
|
15855
|
+
var ActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepSchema]);
|
|
15596
15856
|
var AutomationActionSchema = discriminatedUnion("kind", [
|
|
15857
|
+
AutomationWaitStepSchema,
|
|
15858
|
+
AutomationCapStepSchema,
|
|
15597
15859
|
object({
|
|
15598
|
-
kind: literal("
|
|
15599
|
-
|
|
15600
|
-
|
|
15601
|
-
|
|
15602
|
-
|
|
15603
|
-
|
|
15604
|
-
|
|
15605
|
-
|
|
15606
|
-
|
|
15607
|
-
*/
|
|
15608
|
-
deviceId: union([
|
|
15609
|
-
number().int(),
|
|
15610
|
-
array(number().int()).min(1),
|
|
15611
|
-
object({ $var: string().min(1) })
|
|
15612
|
-
]),
|
|
15613
|
-
cap: string().min(1),
|
|
15614
|
-
method: string().min(1),
|
|
15615
|
-
/** Values may carry `{{vars.x}}` slots, which SUBSTITUTE and do not
|
|
15616
|
-
* evaluate (§3.2.3). Anything beyond substitution is the expression leaf. */
|
|
15617
|
-
args: record(string(), unknown()).optional()
|
|
15860
|
+
kind: literal("action"),
|
|
15861
|
+
/** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
|
|
15862
|
+
actionId: string().min(1),
|
|
15863
|
+
/** Values for the action's declared variables; the others take their default. */
|
|
15864
|
+
variables: record(string(), union([
|
|
15865
|
+
string(),
|
|
15866
|
+
number(),
|
|
15867
|
+
boolean()
|
|
15868
|
+
])).optional()
|
|
15618
15869
|
}),
|
|
15619
15870
|
object({
|
|
15620
15871
|
kind: literal("code"),
|
|
@@ -15623,10 +15874,778 @@ var AutomationActionSchema = discriminatedUnion("kind", [
|
|
|
15623
15874
|
code: string().min(1).max(2e4)
|
|
15624
15875
|
})
|
|
15625
15876
|
]);
|
|
15877
|
+
/**
|
|
15878
|
+
* How a trigger that arrives while the automation is busy (or cooling down) is
|
|
15879
|
+
* handled. One of the automation's execution modes, never a property of its
|
|
15880
|
+
* actions. Absent means `single`.
|
|
15881
|
+
*
|
|
15882
|
+
* - `single` — drop the trigger while a run is in progress (traced + logged).
|
|
15883
|
+
* - `restart` — abort the run in progress (at its next step boundary), start fresh.
|
|
15884
|
+
* - `queued` — queue up to `max` triggers, drop the rest (traced).
|
|
15885
|
+
* - `parallel` — up to `max` runs at once, drop the rest (traced).
|
|
15886
|
+
* - `cooldown` — `single`, and no new run until `minutes` after the last run
|
|
15887
|
+
* STARTED; persisted across a restart. A manual trigger bypasses only this
|
|
15888
|
+
* wait, never the single/queued limits.
|
|
15889
|
+
*/
|
|
15890
|
+
var AutomationRunModeSchema = discriminatedUnion("mode", [
|
|
15891
|
+
object({ mode: literal("single") }),
|
|
15892
|
+
object({ mode: literal("restart") }),
|
|
15893
|
+
object({
|
|
15894
|
+
mode: literal("queued"),
|
|
15895
|
+
max: number().int().min(1).max(10)
|
|
15896
|
+
}),
|
|
15897
|
+
object({
|
|
15898
|
+
mode: literal("parallel"),
|
|
15899
|
+
max: number().int().min(1).max(10)
|
|
15900
|
+
}),
|
|
15901
|
+
object({
|
|
15902
|
+
mode: literal("cooldown"),
|
|
15903
|
+
minutes: number().int().min(1).max(1440)
|
|
15904
|
+
})
|
|
15905
|
+
]);
|
|
15626
15906
|
var AutomationRecipeSchema = object({
|
|
15627
15907
|
triggers: array(AutomationTriggerSchema),
|
|
15628
15908
|
conditions: AutomationConditionSchema.optional(),
|
|
15629
|
-
actions: array(AutomationActionSchema)
|
|
15909
|
+
actions: array(AutomationActionSchema),
|
|
15910
|
+
runMode: AutomationRunModeSchema.optional(),
|
|
15911
|
+
/** How many run traces the automation keeps (default {@link DEFAULT_TRACE_KEEP}). */
|
|
15912
|
+
keepTraces: number().int().min(1).max(100).optional()
|
|
15913
|
+
});
|
|
15914
|
+
new Set([
|
|
15915
|
+
{
|
|
15916
|
+
id: "person",
|
|
15917
|
+
name: "Person"
|
|
15918
|
+
},
|
|
15919
|
+
{
|
|
15920
|
+
id: "vehicle",
|
|
15921
|
+
name: "Vehicle"
|
|
15922
|
+
},
|
|
15923
|
+
{
|
|
15924
|
+
id: "animal",
|
|
15925
|
+
name: "Animal"
|
|
15926
|
+
},
|
|
15927
|
+
{
|
|
15928
|
+
id: "package",
|
|
15929
|
+
name: "Package"
|
|
15930
|
+
}
|
|
15931
|
+
].map((l) => l.id));
|
|
15932
|
+
var COCO_TO_MACRO = {
|
|
15933
|
+
mapping: {
|
|
15934
|
+
person: "person",
|
|
15935
|
+
bicycle: "vehicle",
|
|
15936
|
+
car: "vehicle",
|
|
15937
|
+
motorcycle: "vehicle",
|
|
15938
|
+
airplane: "vehicle",
|
|
15939
|
+
bus: "vehicle",
|
|
15940
|
+
train: "vehicle",
|
|
15941
|
+
truck: "vehicle",
|
|
15942
|
+
boat: "vehicle",
|
|
15943
|
+
bird: "animal",
|
|
15944
|
+
cat: "animal",
|
|
15945
|
+
dog: "animal",
|
|
15946
|
+
horse: "animal",
|
|
15947
|
+
sheep: "animal",
|
|
15948
|
+
cow: "animal",
|
|
15949
|
+
elephant: "animal",
|
|
15950
|
+
bear: "animal",
|
|
15951
|
+
zebra: "animal",
|
|
15952
|
+
giraffe: "animal",
|
|
15953
|
+
suitcase: "package",
|
|
15954
|
+
backpack: "package",
|
|
15955
|
+
handbag: "package"
|
|
15956
|
+
},
|
|
15957
|
+
preserveOriginal: false
|
|
15958
|
+
};
|
|
15959
|
+
new Set(Object.values(COCO_TO_MACRO.mapping));
|
|
15960
|
+
/**
|
|
15961
|
+
* Run traces — what an automation (or, later, an Action run) DID, node by node,
|
|
15962
|
+
* so the editor can paint every block green or red with its reason.
|
|
15963
|
+
*
|
|
15964
|
+
* A trace is data, not a log: it covers the WHOLE tree — the trigger stage,
|
|
15965
|
+
* every condition node (containers and leaves, including the ones a
|
|
15966
|
+
* short-circuit never reached), the run-mode verdict and every action step —
|
|
15967
|
+
* each addressed by a stable path (`conditions.0.1`, `actions.2`, or `steps.N`
|
|
15968
|
+
* for an Action run). Skipped
|
|
15969
|
+
* evaluations are traced too, and identical consecutive skips collapse into a
|
|
15970
|
+
* repeat count so a trigger that fails every 5 minutes cannot flush real runs.
|
|
15971
|
+
*
|
|
15972
|
+
* {@link AutomationStepTraceSchema} is deliberately free of automation
|
|
15973
|
+
* vocabulary so an Action run records the same step shape.
|
|
15974
|
+
*/
|
|
15975
|
+
/** A value a trace may show: JSON primitives and short lists, nothing deeper. */
|
|
15976
|
+
var TraceValueSchema = union([
|
|
15977
|
+
string(),
|
|
15978
|
+
number(),
|
|
15979
|
+
boolean(),
|
|
15980
|
+
_null(),
|
|
15981
|
+
array(union([string(), number()]))
|
|
15982
|
+
]);
|
|
15983
|
+
var AutomationRunOutcomeSchema = _enum([
|
|
15984
|
+
"ran",
|
|
15985
|
+
"skipped-trigger",
|
|
15986
|
+
"skipped-conditions",
|
|
15987
|
+
"skipped-cooldown",
|
|
15988
|
+
"skipped-overlap",
|
|
15989
|
+
"failed",
|
|
15990
|
+
"aborted"
|
|
15991
|
+
]);
|
|
15992
|
+
/** `not-evaluated` = a short-circuit never reached the node. */
|
|
15993
|
+
var TraceNodeOutcomeSchema = _enum([
|
|
15994
|
+
"pass",
|
|
15995
|
+
"fail",
|
|
15996
|
+
"not-evaluated"
|
|
15997
|
+
]);
|
|
15998
|
+
var AutomationTriggerTraceSchema = object({
|
|
15999
|
+
kind: string().min(1),
|
|
16000
|
+
outcome: _enum(["pass", "fail"]),
|
|
16001
|
+
/** Why an event was rejected ("class person not in [dog]") or what fired. */
|
|
16002
|
+
reason: string(),
|
|
16003
|
+
/** deviceId, className, trackId, score … — only what the trigger exposes. */
|
|
16004
|
+
vars: record(string(), TraceValueSchema)
|
|
16005
|
+
});
|
|
16006
|
+
var AutomationConditionTraceNodeSchema = object({
|
|
16007
|
+
/** `conditions` for the root, `conditions.<i>` for its i-th child, … */
|
|
16008
|
+
path: string().min(1),
|
|
16009
|
+
kind: _enum([
|
|
16010
|
+
"all",
|
|
16011
|
+
"any",
|
|
16012
|
+
"not",
|
|
16013
|
+
"condition",
|
|
16014
|
+
"expression",
|
|
16015
|
+
"stationary-present"
|
|
16016
|
+
]),
|
|
16017
|
+
outcome: TraceNodeOutcomeSchema,
|
|
16018
|
+
reason: string(),
|
|
16019
|
+
deviceId: number().int().optional(),
|
|
16020
|
+
cap: string().optional(),
|
|
16021
|
+
fieldPath: string().optional(),
|
|
16022
|
+
operator: string().optional(),
|
|
16023
|
+
expected: TraceValueSchema.optional(),
|
|
16024
|
+
/** What the mirror held; `null` when it held nothing (unknown). */
|
|
16025
|
+
observed: TraceValueSchema.optional()
|
|
16026
|
+
});
|
|
16027
|
+
var AutomationRunVerdictSchema = object({
|
|
16028
|
+
mode: AutomationRunModeSchema,
|
|
16029
|
+
decision: _enum([
|
|
16030
|
+
"run",
|
|
16031
|
+
"queued",
|
|
16032
|
+
"restart",
|
|
16033
|
+
"drop",
|
|
16034
|
+
"cooldown",
|
|
16035
|
+
"bypass"
|
|
16036
|
+
]),
|
|
16037
|
+
reason: string()
|
|
16038
|
+
});
|
|
16039
|
+
/** One executed (or not-run) step — shared by automations and Action runs. */
|
|
16040
|
+
var AutomationStepTraceSchema = object({
|
|
16041
|
+
/** `actions.<i>` */
|
|
16042
|
+
path: string().min(1),
|
|
16043
|
+
kind: string().min(1),
|
|
16044
|
+
cap: string().optional(),
|
|
16045
|
+
method: string().optional(),
|
|
16046
|
+
deviceId: number().int().optional(),
|
|
16047
|
+
startedAt: number().optional(),
|
|
16048
|
+
endedAt: number().optional(),
|
|
16049
|
+
outcome: _enum([
|
|
16050
|
+
"ok",
|
|
16051
|
+
"error",
|
|
16052
|
+
"not-run"
|
|
16053
|
+
]),
|
|
16054
|
+
message: string().optional()
|
|
16055
|
+
});
|
|
16056
|
+
var AutomationRunTraceSchema = object({
|
|
16057
|
+
runId: string().min(1),
|
|
16058
|
+
startedAt: number(),
|
|
16059
|
+
endedAt: number(),
|
|
16060
|
+
trigger: AutomationTriggerTraceSchema,
|
|
16061
|
+
conditions: array(AutomationConditionTraceNodeSchema),
|
|
16062
|
+
verdict: AutomationRunVerdictSchema.optional(),
|
|
16063
|
+
steps: array(AutomationStepTraceSchema),
|
|
16064
|
+
outcome: AutomationRunOutcomeSchema,
|
|
16065
|
+
/** How many identical consecutive skips this trace stands for (>= 1). */
|
|
16066
|
+
repeat: number().int().min(1),
|
|
16067
|
+
/** When the latest of those repeats happened. */
|
|
16068
|
+
lastAt: number()
|
|
16069
|
+
});
|
|
16070
|
+
/**
|
|
16071
|
+
* What the hub's `runs` ledger holds for one owner (`automation:<blockId>` or
|
|
16072
|
+
* `action:<actionId>`): the cooldown stamp and the trace ring.
|
|
16073
|
+
*/
|
|
16074
|
+
var AutomationStateDocSchema = object({
|
|
16075
|
+
version: literal(1),
|
|
16076
|
+
lastRunStartedAt: number().nullable(),
|
|
16077
|
+
traces: array(AutomationRunTraceSchema)
|
|
16078
|
+
});
|
|
16079
|
+
/**
|
|
16080
|
+
* Actions — named, runnable things an operator (or an automation) can start,
|
|
16081
|
+
* declared as LIST ENTRIES, never as devices.
|
|
16082
|
+
*
|
|
16083
|
+
* An entry is either **internal** (a short list of cap/wait steps kept in the
|
|
16084
|
+
* hub's `actions` record kind) or declared by an addon through the
|
|
16085
|
+
* `action-source` collection (a Home Assistant script, a scene …). The one
|
|
16086
|
+
* surface the UI and automations talk to is the `actions` cap; it keeps no
|
|
16087
|
+
* catalog of its own (D3) — every `list` asks the providers live.
|
|
16088
|
+
*
|
|
16089
|
+
* This file is the data half: the entry schema, the variables an entry may
|
|
16090
|
+
* declare, and the pure resolution of the values a run was given. It holds no
|
|
16091
|
+
* runtime.
|
|
16092
|
+
*/
|
|
16093
|
+
/** What a variable's value is. `select` takes one of `options`. */
|
|
16094
|
+
var ActionVariableTypeSchema = _enum([
|
|
16095
|
+
"string",
|
|
16096
|
+
"number",
|
|
16097
|
+
"boolean",
|
|
16098
|
+
"select"
|
|
16099
|
+
]);
|
|
16100
|
+
var ACTION_VARIABLE_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
16101
|
+
var ActionVariableValueSchema = union([
|
|
16102
|
+
string(),
|
|
16103
|
+
number(),
|
|
16104
|
+
boolean()
|
|
16105
|
+
]);
|
|
16106
|
+
/**
|
|
16107
|
+
* One declared variable. Steps reference it as `{ $var: 'name' }` (the whole
|
|
16108
|
+
* value) or `{{vars.name}}` (inside a string) in their args.
|
|
16109
|
+
*/
|
|
16110
|
+
var ActionVariableSchema = object({
|
|
16111
|
+
name: string().regex(ACTION_VARIABLE_NAME_RE),
|
|
16112
|
+
label: string().min(1).max(120).optional(),
|
|
16113
|
+
type: ActionVariableTypeSchema,
|
|
16114
|
+
required: boolean().optional(),
|
|
16115
|
+
default: ActionVariableValueSchema.optional(),
|
|
16116
|
+
/** The allowed values of a `select`. */
|
|
16117
|
+
options: array(string().min(1)).min(1).optional()
|
|
16118
|
+
}).superRefine((v, ctx) => {
|
|
16119
|
+
if (v.type === "select" && v.options === void 0) ctx.addIssue({
|
|
16120
|
+
code: "custom",
|
|
16121
|
+
message: "a select variable needs options",
|
|
16122
|
+
path: ["options"]
|
|
16123
|
+
});
|
|
16124
|
+
if (v.default !== void 0 && variableValueError(v, v.default) !== null) ctx.addIssue({
|
|
16125
|
+
code: "custom",
|
|
16126
|
+
message: variableValueError(v, v.default) ?? "invalid default",
|
|
16127
|
+
path: ["default"]
|
|
16128
|
+
});
|
|
16129
|
+
});
|
|
16130
|
+
/** Why `value` is not a legal value for the variable, or null when it is. */
|
|
16131
|
+
function variableValueError(variable, value) {
|
|
16132
|
+
switch (variable.type) {
|
|
16133
|
+
case "string": return typeof value === "string" ? null : `variable "${variable.name}" must be a string`;
|
|
16134
|
+
case "number": return typeof value === "number" && Number.isFinite(value) ? null : `variable "${variable.name}" must be a number`;
|
|
16135
|
+
case "boolean": return typeof value === "boolean" ? null : `variable "${variable.name}" must be true or false`;
|
|
16136
|
+
case "select": return typeof value === "string" && (variable.options ?? []).includes(value) ? null : `variable "${variable.name}" must be one of ${(variable.options ?? []).join(", ")}`;
|
|
16137
|
+
}
|
|
16138
|
+
}
|
|
16139
|
+
var ActionSourceKindSchema = _enum(["internal", "addon"]);
|
|
16140
|
+
function isInternalActionId(actionId) {
|
|
16141
|
+
return actionId.startsWith("internal:") && actionId.length > 9;
|
|
16142
|
+
}
|
|
16143
|
+
/** The addon behind a `<addonId>:<localId>` id, or null for anything else (internal included). */
|
|
16144
|
+
function addonIdOfActionId(actionId) {
|
|
16145
|
+
if (isInternalActionId(actionId)) return null;
|
|
16146
|
+
const at = actionId.indexOf(":");
|
|
16147
|
+
return at > 0 && at < actionId.length - 1 ? actionId.slice(0, at) : null;
|
|
16148
|
+
}
|
|
16149
|
+
var ActionStatusSchema = object({
|
|
16150
|
+
isRunning: boolean(),
|
|
16151
|
+
/** Ms epoch the latest run STARTED; null when it never ran. */
|
|
16152
|
+
lastRunAt: number().nullable(),
|
|
16153
|
+
/** The latest run's failure; null on success or when it never ran. */
|
|
16154
|
+
lastError: string().nullable()
|
|
16155
|
+
});
|
|
16156
|
+
var ActionEntrySchema = object({
|
|
16157
|
+
/** `internal:<uuid>` or `<addonId>:<localId>`. */
|
|
16158
|
+
id: string().min(3),
|
|
16159
|
+
name: string().min(1).max(120),
|
|
16160
|
+
/** The addon that declared it; `core-blocks` for an internal one. */
|
|
16161
|
+
addonId: string().min(1),
|
|
16162
|
+
source: ActionSourceKindSchema,
|
|
16163
|
+
/** An addon-declared entry is edited where it was declared. */
|
|
16164
|
+
readOnly: boolean(),
|
|
16165
|
+
/** Internal only: cap and wait steps. No action-in-action, so no cycles. */
|
|
16166
|
+
steps: array(ActionStepSchema).min(1).max(50).optional(),
|
|
16167
|
+
variables: array(ActionVariableSchema).max(20).optional(),
|
|
16168
|
+
status: ActionStatusSchema
|
|
16169
|
+
}).superRefine((entry, ctx) => {
|
|
16170
|
+
if (entry.source === "internal") {
|
|
16171
|
+
if (!isInternalActionId(entry.id)) ctx.addIssue({
|
|
16172
|
+
code: "custom",
|
|
16173
|
+
message: "an internal action id is internal:<uuid>",
|
|
16174
|
+
path: ["id"]
|
|
16175
|
+
});
|
|
16176
|
+
return;
|
|
16177
|
+
}
|
|
16178
|
+
if (entry.steps !== void 0) ctx.addIssue({
|
|
16179
|
+
code: "custom",
|
|
16180
|
+
message: "only an internal action carries steps",
|
|
16181
|
+
path: ["steps"]
|
|
16182
|
+
});
|
|
16183
|
+
if (!entry.readOnly) ctx.addIssue({
|
|
16184
|
+
code: "custom",
|
|
16185
|
+
message: "an addon action is read-only here",
|
|
16186
|
+
path: ["readOnly"]
|
|
16187
|
+
});
|
|
16188
|
+
if (addonIdOfActionId(entry.id) === null) ctx.addIssue({
|
|
16189
|
+
code: "custom",
|
|
16190
|
+
message: "an addon action id is <addonId>:<localId>",
|
|
16191
|
+
path: ["id"]
|
|
16192
|
+
});
|
|
16193
|
+
});
|
|
16194
|
+
/** What an operator writes for an internal action. */
|
|
16195
|
+
var ActionInputSchema = object({
|
|
16196
|
+
name: string().min(1).max(120),
|
|
16197
|
+
steps: array(ActionStepSchema).min(1).max(50),
|
|
16198
|
+
variables: array(ActionVariableSchema).max(20).optional()
|
|
16199
|
+
});
|
|
16200
|
+
/** Who started a run. Absent = the operator pressed it. */
|
|
16201
|
+
var ActionRunOriginSchema = object({
|
|
16202
|
+
/** The automation block whose step started it. */
|
|
16203
|
+
blockId: string().min(1).optional() });
|
|
16204
|
+
/** `started` = the caller did not ask to wait. */
|
|
16205
|
+
var ActionRunOutcomeSchema = union([AutomationRunOutcomeSchema, literal("started")]);
|
|
16206
|
+
var ActionRunResultSchema = object({
|
|
16207
|
+
runId: string().min(1),
|
|
16208
|
+
outcome: ActionRunOutcomeSchema,
|
|
16209
|
+
/** Why it did not run, or what failed. */
|
|
16210
|
+
message: string().optional()
|
|
16211
|
+
});
|
|
16212
|
+
_enum([
|
|
16213
|
+
"not-found",
|
|
16214
|
+
"read-only",
|
|
16215
|
+
"invalid-variables",
|
|
16216
|
+
"invalid-steps",
|
|
16217
|
+
"not-linked",
|
|
16218
|
+
"busy"
|
|
16219
|
+
]);
|
|
16220
|
+
object({
|
|
16221
|
+
actionId: string(),
|
|
16222
|
+
runId: string(),
|
|
16223
|
+
isRunning: boolean(),
|
|
16224
|
+
/** Set when the run ended. */
|
|
16225
|
+
outcome: AutomationRunOutcomeSchema.optional(),
|
|
16226
|
+
lastRunAt: number().nullable(),
|
|
16227
|
+
lastError: string().nullable()
|
|
16228
|
+
});
|
|
16229
|
+
/**
|
|
16230
|
+
* notification-output — canonical, capability-gated notification delivery.
|
|
16231
|
+
*
|
|
16232
|
+
* Apprise-derived model (see
|
|
16233
|
+
* `docs/superpowers/specs/2026-07-03-notification-output-notifier-matrix.md`):
|
|
16234
|
+
* callers emit ONE canonical `Notification`; each provider declares a
|
|
16235
|
+
* per-kind capability descriptor (`TargetKind`), and the pure degrade
|
|
16236
|
+
* engine (`@camstack/types` `prepareNotification`) transcodes / degrades the
|
|
16237
|
+
* message to what the kind supports — callers never special-case a service.
|
|
16238
|
+
*
|
|
16239
|
+
* DESIGN DECISIONS (locked):
|
|
16240
|
+
* - Target CRUD lives on THIS cap (`upsertTarget` / `deleteTarget` /
|
|
16241
|
+
* `setTargetEnabled`), each provider persisting via the `settings-store`
|
|
16242
|
+
* cap. Rationale: the admin UI needs one uniform surface across the
|
|
16243
|
+
* notifiers addon AND the HA addon; the addon-`globalSettingsSchema`-array
|
|
16244
|
+
* alternative would fork the UI per addon and cannot host the
|
|
16245
|
+
* discovery→adopt flow.
|
|
16246
|
+
* - `listTargetKinds` / `listTargets` / `discoverTargets` return arrays →
|
|
16247
|
+
* the generated cap-mount auto-`concatCollection`-fans them across every
|
|
16248
|
+
* registered provider (notifiers addon + HA addon) so one catalog is
|
|
16249
|
+
* routable. `send` / `testTarget` / CRUD route to ONE provider by the
|
|
16250
|
+
* `addonId` the generated collection router extracts from the call input.
|
|
16251
|
+
* - `Attachment.bytes` is `Uint8Array`. Transport-safe: superjson (the tRPC
|
|
16252
|
+
* transformer) + UDS MsgPack both round-trip typed arrays — already used by
|
|
16253
|
+
* `storage` / `storage-provider` / `recording` caps over the same path. No
|
|
16254
|
+
* base64 fallback needed.
|
|
16255
|
+
*
|
|
16256
|
+
* TODO (deferred, closed-set change — separate decision): add
|
|
16257
|
+
* `providerKind: 'notify'` so notification providers surface on the unified
|
|
16258
|
+
* admin "Integrations" page.
|
|
16259
|
+
*/
|
|
16260
|
+
/**
|
|
16261
|
+
* Zentik-derived typed-media enum — the superset across every kind. Each
|
|
16262
|
+
* adapter picks what it supports and the degrade engine filters the rest.
|
|
16263
|
+
*/
|
|
16264
|
+
var AttachmentMediaTypeSchema = _enum([
|
|
16265
|
+
"image",
|
|
16266
|
+
"video",
|
|
16267
|
+
"gif",
|
|
16268
|
+
"audio",
|
|
16269
|
+
"icon"
|
|
16270
|
+
]);
|
|
16271
|
+
/**
|
|
16272
|
+
* A single attachment. Exactly one of `url` (remote source, most adapters
|
|
16273
|
+
* prefer this) or `bytes` (inline source; required for Pushover-style
|
|
16274
|
+
* bytes-only kinds) MUST be present — the degrade engine expresses a
|
|
16275
|
+
* url→bytes fetch as a `needsFetch` directive the adapter executes.
|
|
16276
|
+
*/
|
|
16277
|
+
var AttachmentSchema = object({
|
|
16278
|
+
mediaType: AttachmentMediaTypeSchema,
|
|
16279
|
+
url: string().optional(),
|
|
16280
|
+
bytes: _instanceof(Uint8Array).optional(),
|
|
16281
|
+
mime: string().optional(),
|
|
16282
|
+
name: string().optional()
|
|
16283
|
+
}).refine((a) => a.url !== void 0 || a.bytes !== void 0, { message: "Attachment requires either `url` or `bytes`" });
|
|
16284
|
+
var NotificationFormatSchema = _enum([
|
|
16285
|
+
"text",
|
|
16286
|
+
"markdown",
|
|
16287
|
+
"html"
|
|
16288
|
+
]);
|
|
16289
|
+
/**
|
|
16290
|
+
* The CLOSED icon vocabulary an action button may use.
|
|
16291
|
+
*
|
|
16292
|
+
* A closed set, not a free string, and that is the whole point: an arbitrary
|
|
16293
|
+
* icon name is one that ntfy renders, zentik silently drops, and nobody
|
|
16294
|
+
* notices — the same class of gap as a zone vocabulary nothing produced
|
|
16295
|
+
* ([D35](../../../docs/decisions/adr-0035.md)). Every adapter maps this set or
|
|
16296
|
+
* declares `actionIcons: false` and the degrade engine strips the field.
|
|
16297
|
+
*
|
|
16298
|
+
* Named by INTENT, never by glyph. "check" would tie the vocabulary to one
|
|
16299
|
+
* renderer's icon set; "acknowledge" survives an adapter that draws it
|
|
16300
|
+
* differently.
|
|
16301
|
+
*
|
|
16302
|
+
* ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
|
|
16303
|
+
*
|
|
16304
|
+
* These names are for US. **No adapter may forward one verbatim.** Each maps
|
|
16305
|
+
* the whole set onto its own renderer's vocabulary through a
|
|
16306
|
+
* `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
|
|
16307
|
+
* fallback, so adding a member here fails every adapter's build until someone
|
|
16308
|
+
* decides its glyph, which is the only place that decision can be made
|
|
16309
|
+
* honestly.
|
|
16310
|
+
*
|
|
16311
|
+
* This paragraph is the bug. Zentik declared `actionIcons: true` and passed
|
|
16312
|
+
* `disarm` straight through; iOS feeds that string to
|
|
16313
|
+
* `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
|
|
16314
|
+
* and every snooze and alarm button arrived BLANK. A pass-through is not a
|
|
16315
|
+
* mapping, and "the field is documented" is not "the value renders".
|
|
16316
|
+
*
|
|
16317
|
+
* Adding a member is TRAIN-BOUND. The enum lives in the published
|
|
16318
|
+
* `@camstack/server` closure and the cap seam validates against the HUB's copy,
|
|
16319
|
+
* so an addon that emits a token the running hub does not know does not lose an
|
|
16320
|
+
* icon — its whole `send` fails Zod validation and the notification never
|
|
16321
|
+
* arrives. Never emit a new token from an addon before the train carrying it.
|
|
16322
|
+
*/
|
|
16323
|
+
var NotificationActionIconSchema = _enum([
|
|
16324
|
+
"acknowledge",
|
|
16325
|
+
"dismiss",
|
|
16326
|
+
"silence",
|
|
16327
|
+
"snooze",
|
|
16328
|
+
"view",
|
|
16329
|
+
"play",
|
|
16330
|
+
"open",
|
|
16331
|
+
"close",
|
|
16332
|
+
"lock",
|
|
16333
|
+
"unlock",
|
|
16334
|
+
"arm",
|
|
16335
|
+
"arm-home",
|
|
16336
|
+
"arm-away",
|
|
16337
|
+
"arm-night",
|
|
16338
|
+
"disarm",
|
|
16339
|
+
"light",
|
|
16340
|
+
"alert",
|
|
16341
|
+
"camera"
|
|
16342
|
+
]);
|
|
16343
|
+
/** A single tap-through action button. */
|
|
16344
|
+
var NotificationActionSchema = object({
|
|
16345
|
+
id: string(),
|
|
16346
|
+
label: string(),
|
|
16347
|
+
url: string().optional(),
|
|
16348
|
+
/** Dropped by the degrade engine for a kind with `caps.actionIcons: false`. */
|
|
16349
|
+
icon: NotificationActionIconSchema.optional(),
|
|
16350
|
+
/**
|
|
16351
|
+
* Renders in a warning style where the notifier supports it.
|
|
16352
|
+
*
|
|
16353
|
+
* A HINT, never a gate. The callback's authority is its token and nothing
|
|
16354
|
+
* else — see `notification-center/action-token.ts` for what that does and
|
|
16355
|
+
* does not buy.
|
|
16356
|
+
*/
|
|
16357
|
+
destructive: boolean().optional(),
|
|
16358
|
+
/**
|
|
16359
|
+
* How the tap should REACH the url.
|
|
16360
|
+
*
|
|
16361
|
+
* `navigate` (absent, and every button authored before this field) opens it:
|
|
16362
|
+
* the phone leaves the notification and shows whatever the callback returns.
|
|
16363
|
+
* That is right for a button whose answer the operator wants to read.
|
|
16364
|
+
*
|
|
16365
|
+
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
16366
|
+
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
16367
|
+
* an answer to the notification, and being thrown into a browser tab to
|
|
16368
|
+
* confirm it costs more attention than the notification did. A backend that
|
|
16369
|
+
* cannot do a background call renders it as an ordinary link (the adapters
|
|
16370
|
+
* fall back rather than dropping the button), so this is a preference, never
|
|
16371
|
+
* a requirement.
|
|
16372
|
+
*/
|
|
16373
|
+
mode: _enum(["navigate", "background"]).optional()
|
|
16374
|
+
});
|
|
16375
|
+
/** A delivery parameter value: what a notifier declared it takes. */
|
|
16376
|
+
var DeliveryParamValueSchema = union([
|
|
16377
|
+
string(),
|
|
16378
|
+
number(),
|
|
16379
|
+
boolean()
|
|
16380
|
+
]);
|
|
16381
|
+
/**
|
|
16382
|
+
* One extra delivery parameter a notifier KIND declares (D938). A rule that
|
|
16383
|
+
* addresses a target of that kind may set it; a kind that declares nothing is
|
|
16384
|
+
* never handed one. The admin UI derives its control from this descriptor —
|
|
16385
|
+
* no editor knows a service by name.
|
|
16386
|
+
*
|
|
16387
|
+
* Optional fields are `.optional()`, never `.default()` (a Zod default does not
|
|
16388
|
+
* run on the addon cap path).
|
|
16389
|
+
*/
|
|
16390
|
+
var DeliveryParamSchema = object({
|
|
16391
|
+
key: string().min(1),
|
|
16392
|
+
label: string(),
|
|
16393
|
+
/** i18n key of the label, resolved by the declaring addon's namespace. */
|
|
16394
|
+
labelKey: string().optional(),
|
|
16395
|
+
type: _enum([
|
|
16396
|
+
"enum",
|
|
16397
|
+
"number",
|
|
16398
|
+
"boolean",
|
|
16399
|
+
"string"
|
|
16400
|
+
]),
|
|
16401
|
+
/** `enum` only: the closed set of accepted values. */
|
|
16402
|
+
options: array(object({
|
|
16403
|
+
value: string(),
|
|
16404
|
+
label: string()
|
|
16405
|
+
})).optional(),
|
|
16406
|
+
/** `number` only. */
|
|
16407
|
+
min: number().optional(),
|
|
16408
|
+
max: number().optional(),
|
|
16409
|
+
/** What the notifier does when the rule sets nothing; shown as the placeholder. */
|
|
16410
|
+
default: DeliveryParamValueSchema.optional()
|
|
16411
|
+
});
|
|
16412
|
+
/**
|
|
16413
|
+
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
16414
|
+
* `priority` is a 5-level ORDINAL (1=lowest … 3=normal(default) … 5=urgent),
|
|
16415
|
+
* NOT a fixed severity enum — each kind declares its own `caps.levels` and
|
|
16416
|
+
* the adapter maps this ordinal onto its native level. `level?` is an
|
|
16417
|
+
* optional kind-native level id (`emergency`, `silent`, …) that overrides
|
|
16418
|
+
* `priority` for that one target.
|
|
16419
|
+
*/
|
|
16420
|
+
var NotificationSchema = object({
|
|
16421
|
+
body: string(),
|
|
16422
|
+
title: string().optional(),
|
|
16423
|
+
format: NotificationFormatSchema.default("text"),
|
|
16424
|
+
priority: number().int().min(1).max(5).default(3),
|
|
16425
|
+
level: string().optional(),
|
|
16426
|
+
attachments: array(AttachmentSchema).optional(),
|
|
16427
|
+
clickUrl: string().optional(),
|
|
16428
|
+
actions: array(NotificationActionSchema).optional(),
|
|
16429
|
+
sound: string().optional(),
|
|
16430
|
+
ttl: number().optional(),
|
|
16431
|
+
tag: string().optional(),
|
|
16432
|
+
deviceId: number().optional(),
|
|
16433
|
+
eventId: string().optional(),
|
|
16434
|
+
metadata: record(string(), unknown()).optional(),
|
|
16435
|
+
/**
|
|
16436
|
+
* Values for the parameters the target's kind DECLARES in
|
|
16437
|
+
* {@link TargetKindSchema} `deliveryParams`. Already validated against the
|
|
16438
|
+
* declaration by the sender; a notifier reads only the keys it declared.
|
|
16439
|
+
*/
|
|
16440
|
+
delivery: record(string(), DeliveryParamValueSchema).optional()
|
|
16441
|
+
});
|
|
16442
|
+
/** One declared native severity/priority level for a kind. */
|
|
16443
|
+
var TargetKindLevelSchema = object({
|
|
16444
|
+
id: string(),
|
|
16445
|
+
label: string(),
|
|
16446
|
+
/** Which canonical priority (1..5) this level maps to. `null` = qualitative-only. */
|
|
16447
|
+
ordinal: number().int().min(1).max(5).nullable(),
|
|
16448
|
+
flags: object({
|
|
16449
|
+
critical: boolean().optional(),
|
|
16450
|
+
silent: boolean().optional(),
|
|
16451
|
+
noPush: boolean().optional()
|
|
16452
|
+
}).optional(),
|
|
16453
|
+
/** e.g. Pushover `emergency` requires `retry` / `expire`. */
|
|
16454
|
+
requires: array(string()).optional(),
|
|
16455
|
+
description: string().optional()
|
|
16456
|
+
});
|
|
16457
|
+
/** The full capability block consulted before dispatch. */
|
|
16458
|
+
var TargetKindCapsSchema = object({
|
|
16459
|
+
attachments: object({
|
|
16460
|
+
mediaTypes: array(AttachmentMediaTypeSchema),
|
|
16461
|
+
mode: _enum([
|
|
16462
|
+
"url",
|
|
16463
|
+
"bytes",
|
|
16464
|
+
"both"
|
|
16465
|
+
]),
|
|
16466
|
+
max: number().int().nonnegative(),
|
|
16467
|
+
maxBytes: number().int().positive().optional()
|
|
16468
|
+
}),
|
|
16469
|
+
/** Max action buttons (0 = none). */
|
|
16470
|
+
actions: number().int().nonnegative(),
|
|
16471
|
+
/**
|
|
16472
|
+
* Whether this kind renders a per-action ICON.
|
|
16473
|
+
*
|
|
16474
|
+
* `.optional()`, deliberately NOT `.default(false)`: a Zod default does not
|
|
16475
|
+
* run on the addon cap path — three production failures in one day taught
|
|
16476
|
+
* this repo that once. Absent is read as false by the degrade engine, which
|
|
16477
|
+
* is the safe direction: an icon that is not rendered costs nothing, an icon
|
|
16478
|
+
* assumed and dropped costs the operator's trust in the field.
|
|
16479
|
+
*/
|
|
16480
|
+
actionIcons: boolean().optional(),
|
|
16481
|
+
levels: array(TargetKindLevelSchema),
|
|
16482
|
+
format: array(NotificationFormatSchema),
|
|
16483
|
+
clickUrl: boolean(),
|
|
16484
|
+
sound: boolean(),
|
|
16485
|
+
ttl: boolean(),
|
|
16486
|
+
bodyMaxLen: number().int().positive()
|
|
16487
|
+
});
|
|
16488
|
+
/**
|
|
16489
|
+
* `configSchema` is a `ConfigUISchema` tree passed through to the admin
|
|
16490
|
+
* FormBuilder. Stored as `z.unknown()` at the cap seam (mirrors
|
|
16491
|
+
* `device-provider.getChildCreationSchema` `CreationSchemaOutputSchema`) —
|
|
16492
|
+
* the union is large and not meant for runtime validation here; the exported
|
|
16493
|
+
* `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
|
|
16494
|
+
*/
|
|
16495
|
+
var ConfigSchemaPassthrough$3 = unknown();
|
|
16496
|
+
var TargetKindSchema = object({
|
|
16497
|
+
kind: string(),
|
|
16498
|
+
label: string(),
|
|
16499
|
+
icon: string(),
|
|
16500
|
+
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
16501
|
+
addonId: string(),
|
|
16502
|
+
/**
|
|
16503
|
+
* URL of the kind's bundled BRAND icon, served by the providing addon over
|
|
16504
|
+
* its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
|
|
16505
|
+
* when the addon bundles no icon for that kind — the client then falls back
|
|
16506
|
+
* to a neutral glyph rather than rendering the raw `icon` NAME as text.
|
|
16507
|
+
*
|
|
16508
|
+
* Root-relative on purpose: it resolves against whatever origin serves a web
|
|
16509
|
+
* client, and a native client joins it onto its own hub base.
|
|
16510
|
+
*
|
|
16511
|
+
* DECLARED here deliberately. It used to travel as an undeclared passthrough
|
|
16512
|
+
* field that survived only because the runtime cap-router forwards provider
|
|
16513
|
+
* output verbatim — so every consumer had to re-declare it by hand to stop
|
|
16514
|
+
* its own Zod parse from stripping it, and the whole arrangement would have
|
|
16515
|
+
* broken silently the moment output validation was tightened anywhere.
|
|
16516
|
+
*/
|
|
16517
|
+
iconUrl: string().optional(),
|
|
16518
|
+
/**
|
|
16519
|
+
* Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
|
|
16520
|
+
*
|
|
16521
|
+
* The server knows this and therefore says it, because the client cannot
|
|
16522
|
+
* safely guess: a React-Native client renders SVG and raster through two
|
|
16523
|
+
* DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
|
|
16524
|
+
* not decode SVG on iOS/Android), so without this it silently fell back to a
|
|
16525
|
+
* placeholder glyph for every vector icon while the web build looked fine.
|
|
16526
|
+
*
|
|
16527
|
+
* Absent when {@link iconUrl} is absent, or for a legacy provider that has
|
|
16528
|
+
* not been updated — a client that cannot determine the type should prefer
|
|
16529
|
+
* its raster path, which is the safe default for an unknown image.
|
|
16530
|
+
*/
|
|
16531
|
+
iconMediaType: string().optional(),
|
|
16532
|
+
configSchema: ConfigSchemaPassthrough$3,
|
|
16533
|
+
/**
|
|
16534
|
+
* The config keys that decide WHERE this kind's secrets are sent (server,
|
|
16535
|
+
* base URL, instance, chat, recipient). A save that changes any of them
|
|
16536
|
+
* while leaving a secret redacted is refused by the provider (D634), so an
|
|
16537
|
+
* editor uses this to ask for the secret on exactly those edits instead of
|
|
16538
|
+
* on every edit.
|
|
16539
|
+
*
|
|
16540
|
+
* Optional: absent from a provider that holds no secret (the Home Assistant
|
|
16541
|
+
* kinds) and from a provider older than this field — an editor that finds
|
|
16542
|
+
* it absent must assume ANY edit may need the secret.
|
|
16543
|
+
*/
|
|
16544
|
+
destinationKeys: array(string()).optional(),
|
|
16545
|
+
supportsDiscovery: boolean(),
|
|
16546
|
+
/**
|
|
16547
|
+
* Extra delivery parameters a rule may set for a target of this kind (D938).
|
|
16548
|
+
* Absent = none; the rule editor then offers nothing.
|
|
16549
|
+
*/
|
|
16550
|
+
deliveryParams: array(DeliveryParamSchema).optional(),
|
|
16551
|
+
caps: TargetKindCapsSchema
|
|
16552
|
+
});
|
|
16553
|
+
/**
|
|
16554
|
+
* A persisted target. `config` holds secrets; providers REDACT secret fields
|
|
16555
|
+
* (return a presence marker only) when serving `listTargets` — never
|
|
16556
|
+
* round-trip a stored secret to the UI.
|
|
16557
|
+
*/
|
|
16558
|
+
var TargetSchema = object({
|
|
16559
|
+
id: string(),
|
|
16560
|
+
name: string(),
|
|
16561
|
+
kind: string(),
|
|
16562
|
+
addonId: string(),
|
|
16563
|
+
enabled: boolean(),
|
|
16564
|
+
config: record(string(), unknown())
|
|
16565
|
+
});
|
|
16566
|
+
/** A discovery-surfaced candidate (config is partial + non-secret). */
|
|
16567
|
+
var DiscoveredTargetSchema = object({
|
|
16568
|
+
kind: string(),
|
|
16569
|
+
suggestedName: string(),
|
|
16570
|
+
config: record(string(), unknown())
|
|
16571
|
+
});
|
|
16572
|
+
/** The degrade engine's report — what was resolved / dropped / degraded. */
|
|
16573
|
+
var RenderedAsSchema = object({
|
|
16574
|
+
level: string(),
|
|
16575
|
+
format: NotificationFormatSchema,
|
|
16576
|
+
attachmentsSent: number().int().nonnegative(),
|
|
16577
|
+
actionsSent: number().int().nonnegative(),
|
|
16578
|
+
truncated: boolean(),
|
|
16579
|
+
dropped: array(string())
|
|
16580
|
+
});
|
|
16581
|
+
var SendResultSchema = object({
|
|
16582
|
+
success: boolean(),
|
|
16583
|
+
error: string().optional(),
|
|
16584
|
+
renderedAs: RenderedAsSchema.optional()
|
|
16585
|
+
});
|
|
16586
|
+
/** Same shape as SendResult — kept as a distinct name for the test panel. */
|
|
16587
|
+
var TestResultSchema = SendResultSchema;
|
|
16588
|
+
/**
|
|
16589
|
+
* Pre-save credential probe against a partial (unsaved) target config.
|
|
16590
|
+
* `resolvedUrl` never includes secrets (token stripped from path).
|
|
16591
|
+
*/
|
|
16592
|
+
var ProbeTargetConfigResultSchema = object({
|
|
16593
|
+
ok: boolean(),
|
|
16594
|
+
resolvedUrl: string(),
|
|
16595
|
+
httpStatus: number().int().optional(),
|
|
16596
|
+
stateInstance: string().optional(),
|
|
16597
|
+
error: string().optional()
|
|
16598
|
+
});
|
|
16599
|
+
method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSchema), { auth: "admin" }), method(object({ targetId: string() }), TargetSchema, { auth: "admin" }), method(object({
|
|
16600
|
+
kind: string(),
|
|
16601
|
+
config: record(string(), unknown()).optional(),
|
|
16602
|
+
/**
|
|
16603
|
+
* When editing / duplicating, the blank password field never round-trips
|
|
16604
|
+
* the stored token. Pass the source target id so the provider can restore
|
|
16605
|
+
* secrets server-side before dialling (same merge as upsert).
|
|
16606
|
+
*/
|
|
16607
|
+
targetId: string().optional()
|
|
16608
|
+
}), array(DiscoveredTargetSchema), { auth: "admin" }), method(object({
|
|
16609
|
+
kind: string(),
|
|
16610
|
+
config: record(string(), unknown()),
|
|
16611
|
+
/** See `discoverTargets.targetId` — restore stored secrets for a blank password. */
|
|
16612
|
+
targetId: string().optional()
|
|
16613
|
+
}), ProbeTargetConfigResultSchema, {
|
|
16614
|
+
kind: "mutation",
|
|
16615
|
+
auth: "admin"
|
|
16616
|
+
}), method(object({
|
|
16617
|
+
targetId: string(),
|
|
16618
|
+
notification: NotificationSchema
|
|
16619
|
+
}), SendResultSchema, {
|
|
16620
|
+
kind: "mutation",
|
|
16621
|
+
auth: "admin"
|
|
16622
|
+
}), method(object({
|
|
16623
|
+
targetId: string(),
|
|
16624
|
+
sample: NotificationSchema.optional()
|
|
16625
|
+
}), TestResultSchema, {
|
|
16626
|
+
kind: "mutation",
|
|
16627
|
+
auth: "admin"
|
|
16628
|
+
}), method(object({
|
|
16629
|
+
target: TargetSchema,
|
|
16630
|
+
/**
|
|
16631
|
+
* Duplicate flow: create a NEW target id while copying secrets from an
|
|
16632
|
+
* existing row. The UI never holds the stored token; blank / redacted
|
|
16633
|
+
* password fields are restored from this source (D634 still applies if
|
|
16634
|
+
* destinations diverge without a re-typed secret).
|
|
16635
|
+
*/
|
|
16636
|
+
cloneSecretsFrom: string().optional()
|
|
16637
|
+
}), TargetSchema, {
|
|
16638
|
+
kind: "mutation",
|
|
16639
|
+
auth: "admin"
|
|
16640
|
+
}), method(object({ targetId: string() }), _void(), {
|
|
16641
|
+
kind: "mutation",
|
|
16642
|
+
auth: "admin"
|
|
16643
|
+
}), method(object({
|
|
16644
|
+
targetId: string(),
|
|
16645
|
+
enabled: boolean()
|
|
16646
|
+
}), _void(), {
|
|
16647
|
+
kind: "mutation",
|
|
16648
|
+
auth: "admin"
|
|
15630
16649
|
});
|
|
15631
16650
|
/**
|
|
15632
16651
|
* `addon-pages` — system-scoped singleton aggregator cap. Public-facing
|
|
@@ -15660,52 +16679,6 @@ var AddonPageInfoSchema = object({
|
|
|
15660
16679
|
bundleUrl: string()
|
|
15661
16680
|
});
|
|
15662
16681
|
method(_void(), array(AddonPageInfoSchema).readonly());
|
|
15663
|
-
/**
|
|
15664
|
-
* `addon-pages-source` — collection cap exposing per-provider raw page
|
|
15665
|
-
* declarations. Every addon that contributes a UI page registers a
|
|
15666
|
-
* provider here. The hub-side singleton aggregator (`addon-pages` cap,
|
|
15667
|
-
* see `addon-pages.cap.ts`) walks this collection, stamps versioned
|
|
15668
|
-
* `bundleUrl` values, and returns the enriched `AddonPageInfo[]` list
|
|
15669
|
-
* that admin-ui consumes.
|
|
15670
|
-
*
|
|
15671
|
-
* The split exists because the public listing has a different output
|
|
15672
|
-
* shape than the per-provider raw declarations, and we want both ends
|
|
15673
|
-
* to flow through codegen instead of relying on a hand-written wrapper.
|
|
15674
|
-
*/
|
|
15675
|
-
var AddonPageDeclarationSchema = object({
|
|
15676
|
-
id: string(),
|
|
15677
|
-
label: string(),
|
|
15678
|
-
icon: string(),
|
|
15679
|
-
path: string(),
|
|
15680
|
-
/**
|
|
15681
|
-
* Module Federation remote name — must match the `name` field on the
|
|
15682
|
-
* page addon's `federation()` plugin config. Used by admin-ui's
|
|
15683
|
-
* `<AddonPageLoader>` to call `loadRemote('<remoteName>/page')`.
|
|
15684
|
-
* Conventionally `addon_<id>_page` (snake_case; MF names cannot
|
|
15685
|
-
* contain hyphens).
|
|
15686
|
-
*/
|
|
15687
|
-
remoteName: string(),
|
|
15688
|
-
/**
|
|
15689
|
-
* Bundle filename inside the addon's `dist/` dir served at
|
|
15690
|
-
* `/api/addon-pages/<addonId>/<bundle>`. With Module Federation this
|
|
15691
|
-
* is always `'remoteEntry.js'`; the value is kept on the metadata so
|
|
15692
|
-
* the static-file route can compute an mtime-based cache-buster URL
|
|
15693
|
-
* without a separate filesystem stat.
|
|
15694
|
-
*/
|
|
15695
|
-
bundle: string(),
|
|
15696
|
-
/**
|
|
15697
|
-
* Sidebar section this page docks into. Well-known ids: `'detection'`,
|
|
15698
|
-
* `'cluster'`, `'administration'` — the page renders inside that group.
|
|
15699
|
-
* Any OTHER string creates (or joins) a custom section rendered after
|
|
15700
|
-
* the built-in groups; its label comes from `sectionLabel` (first
|
|
15701
|
-
* declaration wins), falling back to the id. Absent → the legacy
|
|
15702
|
-
* "Addon Pages" group.
|
|
15703
|
-
*/
|
|
15704
|
-
section: string().optional(),
|
|
15705
|
-
/** Display label for a CUSTOM `section` id (ignored for well-known ids). */
|
|
15706
|
-
sectionLabel: string().optional()
|
|
15707
|
-
});
|
|
15708
|
-
method(_void(), array(AddonPageDeclarationSchema).readonly(), { auth: "admin" });
|
|
15709
16682
|
var AddonHttpRouteSchema = object({
|
|
15710
16683
|
method: _enum([
|
|
15711
16684
|
"GET",
|
|
@@ -16006,9 +16979,21 @@ var AlertSeveritySchema = _enum([
|
|
|
16006
16979
|
"error",
|
|
16007
16980
|
"critical"
|
|
16008
16981
|
]);
|
|
16982
|
+
/**
|
|
16983
|
+
* An action that RUNS something instead of going somewhere: the admin UI calls
|
|
16984
|
+
* the addon's custom action (`addons.custom`) with exactly these fields. The
|
|
16985
|
+
* producer owns the meaning; the UI knows nothing about the addon or the kind.
|
|
16986
|
+
*/
|
|
16987
|
+
var AlertActionInvokeSchema = object({
|
|
16988
|
+
addonId: string().min(1),
|
|
16989
|
+
action: string().min(1),
|
|
16990
|
+
input: record(string(), unknown()).optional()
|
|
16991
|
+
});
|
|
16992
|
+
/** An action has `href` (a link) OR `invoke` (a button that runs a custom action). */
|
|
16009
16993
|
var AlertActionSchema = object({
|
|
16010
16994
|
label: string(),
|
|
16011
16995
|
href: string().optional(),
|
|
16996
|
+
invoke: AlertActionInvokeSchema.optional(),
|
|
16012
16997
|
/**
|
|
16013
16998
|
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
16014
16999
|
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
@@ -18226,7 +19211,7 @@ var CompositionEventPlanSchema = object({
|
|
|
18226
19211
|
stateField: string(),
|
|
18227
19212
|
fieldKey: string()
|
|
18228
19213
|
});
|
|
18229
|
-
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.
|
|
19214
|
+
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.temperature`. */
|
|
18230
19215
|
var CompositionProblemSchema = object({
|
|
18231
19216
|
code: _enum([
|
|
18232
19217
|
"reserved-variant",
|
|
@@ -18255,7 +19240,11 @@ var CompositionProblemSchema = object({
|
|
|
18255
19240
|
"mixed-quantity",
|
|
18256
19241
|
"helper-mismatch",
|
|
18257
19242
|
"member-constraint",
|
|
18258
|
-
"retention"
|
|
19243
|
+
"retention",
|
|
19244
|
+
"command-method-unknown",
|
|
19245
|
+
"command-source-unknown",
|
|
19246
|
+
"command-input-unknown",
|
|
19247
|
+
"command-input-missing"
|
|
18259
19248
|
]),
|
|
18260
19249
|
path: string(),
|
|
18261
19250
|
message: string()
|
|
@@ -18294,7 +19283,9 @@ var CompositionFieldRoleSchema = _enum([
|
|
|
18294
19283
|
var CompositionFieldItemSchema = object({
|
|
18295
19284
|
arrayPath: string(),
|
|
18296
19285
|
key: string(),
|
|
18297
|
-
label: string()
|
|
19286
|
+
label: string(),
|
|
19287
|
+
/** True when the item carries a `reset` forward: the composer writes `resettable` from this (D967). */
|
|
19288
|
+
resettable: boolean().optional()
|
|
18298
19289
|
});
|
|
18299
19290
|
var CompositionFieldPlanSchema = object({
|
|
18300
19291
|
cap: string(),
|
|
@@ -18499,7 +19490,7 @@ Object.freeze({
|
|
|
18499
19490
|
* One catalog row per base reading a group helper can build (D944 §3).
|
|
18500
19491
|
* Data, not a form default written into the block.
|
|
18501
19492
|
*/
|
|
18502
|
-
var NOW$
|
|
19493
|
+
var NOW$3 = {
|
|
18503
19494
|
fieldPath: "lastFetchedAt",
|
|
18504
19495
|
expr: "now"
|
|
18505
19496
|
};
|
|
@@ -18508,12 +19499,13 @@ var CHANGED = {
|
|
|
18508
19499
|
expr: "now"
|
|
18509
19500
|
};
|
|
18510
19501
|
function numeric(input) {
|
|
19502
|
+
const { alsoFrom, ...base } = input;
|
|
18511
19503
|
return {
|
|
18512
|
-
...
|
|
19504
|
+
...base,
|
|
18513
19505
|
family: "numeric",
|
|
18514
19506
|
deviceType: DeviceType.Sensor,
|
|
18515
19507
|
memberDeviceType: DeviceType.Sensor,
|
|
18516
|
-
memberDeviceTypes: [DeviceType.Sensor],
|
|
19508
|
+
memberDeviceTypes: [DeviceType.Sensor, ...alsoFrom?.deviceTypes ?? []],
|
|
18517
19509
|
activeWhen: void 0,
|
|
18518
19510
|
commandCaps: [],
|
|
18519
19511
|
baseUnit: baseUnitOf(input.quantity),
|
|
@@ -18521,9 +19513,10 @@ function numeric(input) {
|
|
|
18521
19513
|
accept: [{
|
|
18522
19514
|
cap: input.outputCap,
|
|
18523
19515
|
fieldPath: input.outputField
|
|
18524
|
-
}]
|
|
19516
|
+
}, ...alsoFrom === void 0 ? [] : [alsoFrom.accept]]
|
|
18525
19517
|
};
|
|
18526
19518
|
}
|
|
19519
|
+
var CLIMATE_DEVICES = [DeviceType.Thermostat, DeviceType.Climate];
|
|
18527
19520
|
function binary(input) {
|
|
18528
19521
|
return {
|
|
18529
19522
|
...input,
|
|
@@ -18545,73 +19538,87 @@ var GROUP_TEMPLATES = [
|
|
|
18545
19538
|
summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
|
|
18546
19539
|
role: DeviceRole.TemperatureSensor,
|
|
18547
19540
|
outputCap: "temperature-sensor",
|
|
18548
|
-
outputField: "
|
|
19541
|
+
outputField: "temperature",
|
|
18549
19542
|
quantity: "temperature",
|
|
18550
19543
|
defaultAggregate: "mean",
|
|
18551
19544
|
empty: "null",
|
|
18552
|
-
companions: [NOW$
|
|
19545
|
+
companions: [NOW$3],
|
|
19546
|
+
alsoFrom: {
|
|
19547
|
+
deviceTypes: CLIMATE_DEVICES,
|
|
19548
|
+
accept: {
|
|
19549
|
+
cap: "climate-control",
|
|
19550
|
+
fieldPath: "currentTemp"
|
|
19551
|
+
}
|
|
19552
|
+
}
|
|
18553
19553
|
}),
|
|
18554
19554
|
numeric({
|
|
18555
19555
|
id: "humidity",
|
|
18556
19556
|
summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18557
19557
|
role: DeviceRole.HumiditySensor,
|
|
18558
19558
|
outputCap: "humidity-sensor",
|
|
18559
|
-
outputField: "
|
|
19559
|
+
outputField: "humidity",
|
|
18560
19560
|
quantity: "humidity",
|
|
18561
19561
|
defaultAggregate: "mean",
|
|
18562
19562
|
empty: "null",
|
|
18563
|
-
companions: [NOW$
|
|
19563
|
+
companions: [NOW$3],
|
|
19564
|
+
alsoFrom: {
|
|
19565
|
+
deviceTypes: CLIMATE_DEVICES,
|
|
19566
|
+
accept: {
|
|
19567
|
+
cap: "climate-control",
|
|
19568
|
+
fieldPath: "currentHumidity"
|
|
19569
|
+
}
|
|
19570
|
+
}
|
|
18564
19571
|
}),
|
|
18565
19572
|
numeric({
|
|
18566
19573
|
id: "pressure",
|
|
18567
19574
|
summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
|
|
18568
19575
|
role: DeviceRole.PressureSensor,
|
|
18569
19576
|
outputCap: "pressure-sensor",
|
|
18570
|
-
outputField: "
|
|
19577
|
+
outputField: "pressure",
|
|
18571
19578
|
quantity: "pressure",
|
|
18572
19579
|
defaultAggregate: "mean",
|
|
18573
19580
|
empty: "null",
|
|
18574
|
-
companions: [NOW$
|
|
19581
|
+
companions: [NOW$3]
|
|
18575
19582
|
}),
|
|
18576
19583
|
numeric({
|
|
18577
19584
|
id: "illuminance",
|
|
18578
19585
|
summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
|
|
18579
19586
|
role: DeviceRole.AmbientLightSensor,
|
|
18580
19587
|
outputCap: "ambient-light-sensor",
|
|
18581
|
-
outputField: "
|
|
19588
|
+
outputField: "illuminance",
|
|
18582
19589
|
quantity: "illuminance",
|
|
18583
19590
|
defaultAggregate: "mean",
|
|
18584
19591
|
empty: "null",
|
|
18585
|
-
companions: [NOW$
|
|
19592
|
+
companions: [NOW$3]
|
|
18586
19593
|
}),
|
|
18587
19594
|
numeric({
|
|
18588
19595
|
id: "power",
|
|
18589
19596
|
summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
|
|
18590
19597
|
role: DeviceRole.PowerSensor,
|
|
18591
19598
|
outputCap: "power-meter",
|
|
18592
|
-
outputField: "
|
|
19599
|
+
outputField: "power",
|
|
18593
19600
|
quantity: "power",
|
|
18594
19601
|
defaultAggregate: "sum",
|
|
18595
19602
|
empty: "omit",
|
|
18596
|
-
companions: [NOW$
|
|
19603
|
+
companions: [NOW$3]
|
|
18597
19604
|
}),
|
|
18598
19605
|
numeric({
|
|
18599
19606
|
id: "energy",
|
|
18600
19607
|
summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
|
|
18601
19608
|
role: DeviceRole.EnergySensor,
|
|
18602
19609
|
outputCap: "power-meter",
|
|
18603
|
-
outputField: "
|
|
19610
|
+
outputField: "energy",
|
|
18604
19611
|
quantity: "energy",
|
|
18605
19612
|
defaultAggregate: "sum",
|
|
18606
19613
|
empty: "omit",
|
|
18607
|
-
companions: [NOW$
|
|
19614
|
+
companions: [NOW$3]
|
|
18608
19615
|
}),
|
|
18609
19616
|
numeric({
|
|
18610
19617
|
id: "battery",
|
|
18611
19618
|
summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18612
19619
|
role: DeviceRole.BatterySensor,
|
|
18613
19620
|
outputCap: "battery",
|
|
18614
|
-
outputField: "
|
|
19621
|
+
outputField: "level",
|
|
18615
19622
|
quantity: "percentage",
|
|
18616
19623
|
defaultAggregate: "mean",
|
|
18617
19624
|
empty: "null",
|
|
@@ -18639,7 +19646,7 @@ var GROUP_TEMPLATES = [
|
|
|
18639
19646
|
quantity: "device",
|
|
18640
19647
|
defaultAggregate: "mean",
|
|
18641
19648
|
empty: "null",
|
|
18642
|
-
companions: [NOW$
|
|
19649
|
+
companions: [NOW$3]
|
|
18643
19650
|
}),
|
|
18644
19651
|
binary({
|
|
18645
19652
|
id: "motion",
|
|
@@ -19189,7 +20196,18 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
19189
20196
|
kind: "mutation",
|
|
19190
20197
|
auth: "admin",
|
|
19191
20198
|
access: "view"
|
|
19192
|
-
})
|
|
20199
|
+
}), method(object({
|
|
20200
|
+
blockId: string().min(1),
|
|
20201
|
+
trace: AutomationRunTraceSchema.optional(),
|
|
20202
|
+
runStartedAt: number().optional(),
|
|
20203
|
+
keepTraces: number().int().min(1).max(100).optional()
|
|
20204
|
+
}), _void(), {
|
|
20205
|
+
kind: "mutation",
|
|
20206
|
+
auth: "admin"
|
|
20207
|
+
}), method(object({ blockId: string().min(1) }), AutomationStateDocSchema, { auth: "admin" }), method(object({ blockId: string().min(1) }), object({
|
|
20208
|
+
traces: array(AutomationRunTraceSchema),
|
|
20209
|
+
lastError: string().nullable()
|
|
20210
|
+
}), { auth: "admin" });
|
|
19193
20211
|
/**
|
|
19194
20212
|
* `custom-model-registry` — collection cap exposing operator-registered
|
|
19195
20213
|
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
@@ -20974,6 +21992,36 @@ var ExposeInputSchema = object({
|
|
|
20974
21992
|
capabilities: array(string()).optional()
|
|
20975
21993
|
});
|
|
20976
21994
|
var UnexposeInputSchema = object({ deviceId: string() });
|
|
21995
|
+
/**
|
|
21996
|
+
* What an exporter may expose besides devices (D968). An action and a
|
|
21997
|
+
* notification target are LIST ENTRIES, never devices (D954): they enter an
|
|
21998
|
+
* exporter's own selection, not the device registry.
|
|
21999
|
+
*/
|
|
22000
|
+
var ExportEntityKindSchema = _enum([
|
|
22001
|
+
"device",
|
|
22002
|
+
"action",
|
|
22003
|
+
"notifier"
|
|
22004
|
+
]);
|
|
22005
|
+
var ExportEntityRefSchema = discriminatedUnion("kind", [
|
|
22006
|
+
object({
|
|
22007
|
+
kind: literal("device"),
|
|
22008
|
+
deviceId: string()
|
|
22009
|
+
}),
|
|
22010
|
+
object({
|
|
22011
|
+
kind: literal("action"),
|
|
22012
|
+
actionId: string().min(1)
|
|
22013
|
+
}),
|
|
22014
|
+
object({
|
|
22015
|
+
kind: literal("notifier"),
|
|
22016
|
+
targetId: string().min(1)
|
|
22017
|
+
})
|
|
22018
|
+
]);
|
|
22019
|
+
var ExposedEntitySchema = object({
|
|
22020
|
+
entity: ExportEntityRefSchema,
|
|
22021
|
+
exposedAs: string().optional()
|
|
22022
|
+
});
|
|
22023
|
+
var ExposeEntityInputSchema = object({ entity: ExportEntityRefSchema });
|
|
22024
|
+
var UnexposeEntityInputSchema = object({ entity: ExportEntityRefSchema });
|
|
20977
22025
|
var deviceExportCapability = {
|
|
20978
22026
|
name: "device-export",
|
|
20979
22027
|
scope: "system",
|
|
@@ -21003,6 +22051,16 @@ var deviceExportCapability = {
|
|
|
21003
22051
|
unexposeDevice: method(UnexposeInputSchema, _void(), {
|
|
21004
22052
|
kind: "mutation",
|
|
21005
22053
|
auth: "admin"
|
|
22054
|
+
}),
|
|
22055
|
+
listSupportedEntityKinds: optionalMethod(_void(), array(ExportEntityKindSchema)),
|
|
22056
|
+
listExposedEntities: optionalMethod(_void(), array(ExposedEntitySchema)),
|
|
22057
|
+
exposeEntity: optionalMethod(ExposeEntityInputSchema, _void(), {
|
|
22058
|
+
kind: "mutation",
|
|
22059
|
+
auth: "admin"
|
|
22060
|
+
}),
|
|
22061
|
+
unexposeEntity: optionalMethod(UnexposeEntityInputSchema, _void(), {
|
|
22062
|
+
kind: "mutation",
|
|
22063
|
+
auth: "admin"
|
|
21006
22064
|
})
|
|
21007
22065
|
}
|
|
21008
22066
|
};
|
|
@@ -42145,6 +43203,14 @@ method(object({
|
|
|
42145
43203
|
kind: "mutation",
|
|
42146
43204
|
auth: "admin"
|
|
42147
43205
|
});
|
|
43206
|
+
method(object({
|
|
43207
|
+
nodeId: string().min(1),
|
|
43208
|
+
/** Epoch ms the node was forgotten (the tombstone's `removedAt`). */
|
|
43209
|
+
removedAt: number()
|
|
43210
|
+
}), object({ counts: record(string(), number().int().nonnegative()) }), {
|
|
43211
|
+
kind: "mutation",
|
|
43212
|
+
auth: "admin"
|
|
43213
|
+
});
|
|
42148
43214
|
/**
|
|
42149
43215
|
* `device-removal-hook` — the reliable way an addon learns a device was DELETED,
|
|
42150
43216
|
* so it can delete what it keeps for that device (D865).
|
|
@@ -42792,6 +43858,17 @@ var LlmProfileSchema = object({
|
|
|
42792
43858
|
* field in its editor only when its descriptor lists it in `profileFields`. */
|
|
42793
43859
|
topK: number().int().positive().optional(),
|
|
42794
43860
|
maxTokens: number().int().positive().optional(),
|
|
43861
|
+
/** How hard the model "thinks" before it answers. Omitted = the model's own
|
|
43862
|
+
* default. `off` matters for structured output: a thinking model can spend
|
|
43863
|
+
* the whole completion on reasoning and return an empty `content`. Carried
|
|
43864
|
+
* only by the wires that have it — a kind offers the field in its editor
|
|
43865
|
+
* only when its descriptor lists it in `profileFields`. */
|
|
43866
|
+
reasoningEffort: _enum([
|
|
43867
|
+
"off",
|
|
43868
|
+
"low",
|
|
43869
|
+
"medium",
|
|
43870
|
+
"high"
|
|
43871
|
+
]).optional(),
|
|
42795
43872
|
/** Prompt context window. Advisory for cloud kinds (they enforce their own). */
|
|
42796
43873
|
contextLength: number().int().positive().optional(),
|
|
42797
43874
|
/** Default system prompt. A caller's `system` REPLACES it (never appends —
|
|
@@ -42830,6 +43907,7 @@ var LlmProfileFieldSchema = _enum([
|
|
|
42830
43907
|
"topP",
|
|
42831
43908
|
"topK",
|
|
42832
43909
|
"maxTokens",
|
|
43910
|
+
"reasoningEffort",
|
|
42833
43911
|
"contextLength",
|
|
42834
43912
|
"systemPrompt",
|
|
42835
43913
|
"timeoutMs",
|
|
@@ -42853,7 +43931,7 @@ var LlmProviderWidgetSchema = object({
|
|
|
42853
43931
|
/** ConfigUISchema tree passed through untyped on the wire (the
|
|
42854
43932
|
* notification-output `ConfigSchemaPassthrough` precedent at
|
|
42855
43933
|
* notification-output.cap.ts:151); the exported TS type re-tightens it. */
|
|
42856
|
-
var ConfigSchemaPassthrough$
|
|
43934
|
+
var ConfigSchemaPassthrough$2 = unknown();
|
|
42857
43935
|
var LlmProfileKindDescriptorSchema = object({
|
|
42858
43936
|
kind: LlmProfileKindSchema,
|
|
42859
43937
|
label: string(),
|
|
@@ -42862,9 +43940,9 @@ var LlmProfileKindDescriptorSchema = object({
|
|
|
42862
43940
|
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
42863
43941
|
addonId: string(),
|
|
42864
43942
|
/** The provider's own fields (`providerConfig`); `password` fields are keychain-held. */
|
|
42865
|
-
connectionSchema: ConfigSchemaPassthrough$
|
|
43943
|
+
connectionSchema: ConfigSchemaPassthrough$2,
|
|
42866
43944
|
/** Provider fields that belong under "Advanced" (extra headers, runtime tuning). */
|
|
42867
|
-
advancedSchema: ConfigSchemaPassthrough$
|
|
43945
|
+
advancedSchema: ConfigSchemaPassthrough$2.optional(),
|
|
42868
43946
|
/** The kind's defaults; a model from `listModels` may override any of them. */
|
|
42869
43947
|
features: LlmModelFeaturesSchema,
|
|
42870
43948
|
/** `false` = the provider stamps `supportsVision` itself (from what a node reports). */
|
|
@@ -43390,10 +44468,10 @@ var CpuBreakdownSchema = object({
|
|
|
43390
44468
|
cores: number()
|
|
43391
44469
|
});
|
|
43392
44470
|
var MemoryInfoSchema = object({
|
|
43393
|
-
percent: number(),
|
|
44471
|
+
percent: number().nullable(),
|
|
43394
44472
|
totalBytes: number(),
|
|
43395
|
-
usedBytes: number(),
|
|
43396
|
-
availableBytes: number(),
|
|
44473
|
+
usedBytes: number().nullable(),
|
|
44474
|
+
availableBytes: number().nullable(),
|
|
43397
44475
|
swapUsedBytes: number(),
|
|
43398
44476
|
swapTotalBytes: number()
|
|
43399
44477
|
});
|
|
@@ -43697,8 +44775,9 @@ var GetLoadSeriesInputSchema = object({
|
|
|
43697
44775
|
});
|
|
43698
44776
|
var SystemMetricsSchema = object({
|
|
43699
44777
|
cpuPercent: number(),
|
|
43700
|
-
|
|
43701
|
-
|
|
44778
|
+
/** `null` when the memory sample failed or was not taken yet (D393). */
|
|
44779
|
+
memoryPercent: number().nullable(),
|
|
44780
|
+
memoryUsedMB: number().nullable(),
|
|
43702
44781
|
memoryTotalMB: number(),
|
|
43703
44782
|
diskPercent: number().optional(),
|
|
43704
44783
|
temperature: number().optional(),
|
|
@@ -43934,424 +45013,6 @@ var NetworkEndpointEntrySchema = NetworkEndpointSchema.extend({
|
|
|
43934
45013
|
sourcePort: number().optional()
|
|
43935
45014
|
});
|
|
43936
45015
|
method(_void(), NetworkEndpointSchema, { kind: "mutation" }), method(_void(), _void(), { kind: "mutation" }), method(_void(), NetworkEndpointSchema.nullable()), method(_void(), NetworkAccessStatusSchema), method(_void(), array(NetworkEndpointEntrySchema).readonly());
|
|
43937
|
-
/**
|
|
43938
|
-
* notification-output — canonical, capability-gated notification delivery.
|
|
43939
|
-
*
|
|
43940
|
-
* Apprise-derived model (see
|
|
43941
|
-
* `docs/superpowers/specs/2026-07-03-notification-output-notifier-matrix.md`):
|
|
43942
|
-
* callers emit ONE canonical `Notification`; each provider declares a
|
|
43943
|
-
* per-kind capability descriptor (`TargetKind`), and the pure degrade
|
|
43944
|
-
* engine (`@camstack/types` `prepareNotification`) transcodes / degrades the
|
|
43945
|
-
* message to what the kind supports — callers never special-case a service.
|
|
43946
|
-
*
|
|
43947
|
-
* DESIGN DECISIONS (locked):
|
|
43948
|
-
* - Target CRUD lives on THIS cap (`upsertTarget` / `deleteTarget` /
|
|
43949
|
-
* `setTargetEnabled`), each provider persisting via the `settings-store`
|
|
43950
|
-
* cap. Rationale: the admin UI needs one uniform surface across the
|
|
43951
|
-
* notifiers addon AND the HA addon; the addon-`globalSettingsSchema`-array
|
|
43952
|
-
* alternative would fork the UI per addon and cannot host the
|
|
43953
|
-
* discovery→adopt flow.
|
|
43954
|
-
* - `listTargetKinds` / `listTargets` / `discoverTargets` return arrays →
|
|
43955
|
-
* the generated cap-mount auto-`concatCollection`-fans them across every
|
|
43956
|
-
* registered provider (notifiers addon + HA addon) so one catalog is
|
|
43957
|
-
* routable. `send` / `testTarget` / CRUD route to ONE provider by the
|
|
43958
|
-
* `addonId` the generated collection router extracts from the call input.
|
|
43959
|
-
* - `Attachment.bytes` is `Uint8Array`. Transport-safe: superjson (the tRPC
|
|
43960
|
-
* transformer) + UDS MsgPack both round-trip typed arrays — already used by
|
|
43961
|
-
* `storage` / `storage-provider` / `recording` caps over the same path. No
|
|
43962
|
-
* base64 fallback needed.
|
|
43963
|
-
*
|
|
43964
|
-
* TODO (deferred, closed-set change — separate decision): add
|
|
43965
|
-
* `providerKind: 'notify'` so notification providers surface on the unified
|
|
43966
|
-
* admin "Integrations" page.
|
|
43967
|
-
*/
|
|
43968
|
-
/**
|
|
43969
|
-
* Zentik-derived typed-media enum — the superset across every kind. Each
|
|
43970
|
-
* adapter picks what it supports and the degrade engine filters the rest.
|
|
43971
|
-
*/
|
|
43972
|
-
var AttachmentMediaTypeSchema = _enum([
|
|
43973
|
-
"image",
|
|
43974
|
-
"video",
|
|
43975
|
-
"gif",
|
|
43976
|
-
"audio",
|
|
43977
|
-
"icon"
|
|
43978
|
-
]);
|
|
43979
|
-
/**
|
|
43980
|
-
* A single attachment. Exactly one of `url` (remote source, most adapters
|
|
43981
|
-
* prefer this) or `bytes` (inline source; required for Pushover-style
|
|
43982
|
-
* bytes-only kinds) MUST be present — the degrade engine expresses a
|
|
43983
|
-
* url→bytes fetch as a `needsFetch` directive the adapter executes.
|
|
43984
|
-
*/
|
|
43985
|
-
var AttachmentSchema = object({
|
|
43986
|
-
mediaType: AttachmentMediaTypeSchema,
|
|
43987
|
-
url: string().optional(),
|
|
43988
|
-
bytes: _instanceof(Uint8Array).optional(),
|
|
43989
|
-
mime: string().optional(),
|
|
43990
|
-
name: string().optional()
|
|
43991
|
-
}).refine((a) => a.url !== void 0 || a.bytes !== void 0, { message: "Attachment requires either `url` or `bytes`" });
|
|
43992
|
-
var NotificationFormatSchema = _enum([
|
|
43993
|
-
"text",
|
|
43994
|
-
"markdown",
|
|
43995
|
-
"html"
|
|
43996
|
-
]);
|
|
43997
|
-
/**
|
|
43998
|
-
* The CLOSED icon vocabulary an action button may use.
|
|
43999
|
-
*
|
|
44000
|
-
* A closed set, not a free string, and that is the whole point: an arbitrary
|
|
44001
|
-
* icon name is one that ntfy renders, zentik silently drops, and nobody
|
|
44002
|
-
* notices — the same class of gap as a zone vocabulary nothing produced
|
|
44003
|
-
* ([D35](../../../docs/decisions/adr-0035.md)). Every adapter maps this set or
|
|
44004
|
-
* declares `actionIcons: false` and the degrade engine strips the field.
|
|
44005
|
-
*
|
|
44006
|
-
* Named by INTENT, never by glyph. "check" would tie the vocabulary to one
|
|
44007
|
-
* renderer's icon set; "acknowledge" survives an adapter that draws it
|
|
44008
|
-
* differently.
|
|
44009
|
-
*
|
|
44010
|
-
* ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
|
|
44011
|
-
*
|
|
44012
|
-
* These names are for US. **No adapter may forward one verbatim.** Each maps
|
|
44013
|
-
* the whole set onto its own renderer's vocabulary through a
|
|
44014
|
-
* `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
|
|
44015
|
-
* fallback, so adding a member here fails every adapter's build until someone
|
|
44016
|
-
* decides its glyph, which is the only place that decision can be made
|
|
44017
|
-
* honestly.
|
|
44018
|
-
*
|
|
44019
|
-
* This paragraph is the bug. Zentik declared `actionIcons: true` and passed
|
|
44020
|
-
* `disarm` straight through; iOS feeds that string to
|
|
44021
|
-
* `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
|
|
44022
|
-
* and every snooze and alarm button arrived BLANK. A pass-through is not a
|
|
44023
|
-
* mapping, and "the field is documented" is not "the value renders".
|
|
44024
|
-
*
|
|
44025
|
-
* Adding a member is TRAIN-BOUND. The enum lives in the published
|
|
44026
|
-
* `@camstack/server` closure and the cap seam validates against the HUB's copy,
|
|
44027
|
-
* so an addon that emits a token the running hub does not know does not lose an
|
|
44028
|
-
* icon — its whole `send` fails Zod validation and the notification never
|
|
44029
|
-
* arrives. Never emit a new token from an addon before the train carrying it.
|
|
44030
|
-
*/
|
|
44031
|
-
var NotificationActionIconSchema = _enum([
|
|
44032
|
-
"acknowledge",
|
|
44033
|
-
"dismiss",
|
|
44034
|
-
"silence",
|
|
44035
|
-
"snooze",
|
|
44036
|
-
"view",
|
|
44037
|
-
"play",
|
|
44038
|
-
"open",
|
|
44039
|
-
"close",
|
|
44040
|
-
"lock",
|
|
44041
|
-
"unlock",
|
|
44042
|
-
"arm",
|
|
44043
|
-
"arm-home",
|
|
44044
|
-
"arm-away",
|
|
44045
|
-
"arm-night",
|
|
44046
|
-
"disarm",
|
|
44047
|
-
"light",
|
|
44048
|
-
"alert",
|
|
44049
|
-
"camera"
|
|
44050
|
-
]);
|
|
44051
|
-
/** A single tap-through action button. */
|
|
44052
|
-
var NotificationActionSchema = object({
|
|
44053
|
-
id: string(),
|
|
44054
|
-
label: string(),
|
|
44055
|
-
url: string().optional(),
|
|
44056
|
-
/** Dropped by the degrade engine for a kind with `caps.actionIcons: false`. */
|
|
44057
|
-
icon: NotificationActionIconSchema.optional(),
|
|
44058
|
-
/**
|
|
44059
|
-
* Renders in a warning style where the notifier supports it.
|
|
44060
|
-
*
|
|
44061
|
-
* A HINT, never a gate. The callback's authority is its token and nothing
|
|
44062
|
-
* else — see `notification-center/action-token.ts` for what that does and
|
|
44063
|
-
* does not buy.
|
|
44064
|
-
*/
|
|
44065
|
-
destructive: boolean().optional(),
|
|
44066
|
-
/**
|
|
44067
|
-
* How the tap should REACH the url.
|
|
44068
|
-
*
|
|
44069
|
-
* `navigate` (absent, and every button authored before this field) opens it:
|
|
44070
|
-
* the phone leaves the notification and shows whatever the callback returns.
|
|
44071
|
-
* That is right for a button whose answer the operator wants to read.
|
|
44072
|
-
*
|
|
44073
|
-
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
44074
|
-
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
44075
|
-
* an answer to the notification, and being thrown into a browser tab to
|
|
44076
|
-
* confirm it costs more attention than the notification did. A backend that
|
|
44077
|
-
* cannot do a background call renders it as an ordinary link (the adapters
|
|
44078
|
-
* fall back rather than dropping the button), so this is a preference, never
|
|
44079
|
-
* a requirement.
|
|
44080
|
-
*/
|
|
44081
|
-
mode: _enum(["navigate", "background"]).optional()
|
|
44082
|
-
});
|
|
44083
|
-
/**
|
|
44084
|
-
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
44085
|
-
* `priority` is a 5-level ORDINAL (1=lowest … 3=normal(default) … 5=urgent),
|
|
44086
|
-
* NOT a fixed severity enum — each kind declares its own `caps.levels` and
|
|
44087
|
-
* the adapter maps this ordinal onto its native level. `level?` is an
|
|
44088
|
-
* optional kind-native level id (`emergency`, `silent`, …) that overrides
|
|
44089
|
-
* `priority` for that one target.
|
|
44090
|
-
*/
|
|
44091
|
-
var NotificationSchema = object({
|
|
44092
|
-
body: string(),
|
|
44093
|
-
title: string().optional(),
|
|
44094
|
-
format: NotificationFormatSchema.default("text"),
|
|
44095
|
-
priority: number().int().min(1).max(5).default(3),
|
|
44096
|
-
level: string().optional(),
|
|
44097
|
-
attachments: array(AttachmentSchema).optional(),
|
|
44098
|
-
clickUrl: string().optional(),
|
|
44099
|
-
actions: array(NotificationActionSchema).optional(),
|
|
44100
|
-
sound: string().optional(),
|
|
44101
|
-
ttl: number().optional(),
|
|
44102
|
-
tag: string().optional(),
|
|
44103
|
-
deviceId: number().optional(),
|
|
44104
|
-
eventId: string().optional(),
|
|
44105
|
-
metadata: record(string(), unknown()).optional()
|
|
44106
|
-
});
|
|
44107
|
-
/** One declared native severity/priority level for a kind. */
|
|
44108
|
-
var TargetKindLevelSchema = object({
|
|
44109
|
-
id: string(),
|
|
44110
|
-
label: string(),
|
|
44111
|
-
/** Which canonical priority (1..5) this level maps to. `null` = qualitative-only. */
|
|
44112
|
-
ordinal: number().int().min(1).max(5).nullable(),
|
|
44113
|
-
flags: object({
|
|
44114
|
-
critical: boolean().optional(),
|
|
44115
|
-
silent: boolean().optional(),
|
|
44116
|
-
noPush: boolean().optional()
|
|
44117
|
-
}).optional(),
|
|
44118
|
-
/** e.g. Pushover `emergency` requires `retry` / `expire`. */
|
|
44119
|
-
requires: array(string()).optional(),
|
|
44120
|
-
description: string().optional()
|
|
44121
|
-
});
|
|
44122
|
-
/** The full capability block consulted before dispatch. */
|
|
44123
|
-
var TargetKindCapsSchema = object({
|
|
44124
|
-
attachments: object({
|
|
44125
|
-
mediaTypes: array(AttachmentMediaTypeSchema),
|
|
44126
|
-
mode: _enum([
|
|
44127
|
-
"url",
|
|
44128
|
-
"bytes",
|
|
44129
|
-
"both"
|
|
44130
|
-
]),
|
|
44131
|
-
max: number().int().nonnegative(),
|
|
44132
|
-
maxBytes: number().int().positive().optional()
|
|
44133
|
-
}),
|
|
44134
|
-
/** Max action buttons (0 = none). */
|
|
44135
|
-
actions: number().int().nonnegative(),
|
|
44136
|
-
/**
|
|
44137
|
-
* Whether this kind renders a per-action ICON.
|
|
44138
|
-
*
|
|
44139
|
-
* `.optional()`, deliberately NOT `.default(false)`: a Zod default does not
|
|
44140
|
-
* run on the addon cap path — three production failures in one day taught
|
|
44141
|
-
* this repo that once. Absent is read as false by the degrade engine, which
|
|
44142
|
-
* is the safe direction: an icon that is not rendered costs nothing, an icon
|
|
44143
|
-
* assumed and dropped costs the operator's trust in the field.
|
|
44144
|
-
*/
|
|
44145
|
-
actionIcons: boolean().optional(),
|
|
44146
|
-
levels: array(TargetKindLevelSchema),
|
|
44147
|
-
format: array(NotificationFormatSchema),
|
|
44148
|
-
clickUrl: boolean(),
|
|
44149
|
-
sound: boolean(),
|
|
44150
|
-
ttl: boolean(),
|
|
44151
|
-
bodyMaxLen: number().int().positive()
|
|
44152
|
-
});
|
|
44153
|
-
/**
|
|
44154
|
-
* `configSchema` is a `ConfigUISchema` tree passed through to the admin
|
|
44155
|
-
* FormBuilder. Stored as `z.unknown()` at the cap seam (mirrors
|
|
44156
|
-
* `device-provider.getChildCreationSchema` `CreationSchemaOutputSchema`) —
|
|
44157
|
-
* the union is large and not meant for runtime validation here; the exported
|
|
44158
|
-
* `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
|
|
44159
|
-
*/
|
|
44160
|
-
var ConfigSchemaPassthrough$2 = unknown();
|
|
44161
|
-
var TargetKindSchema = object({
|
|
44162
|
-
kind: string(),
|
|
44163
|
-
label: string(),
|
|
44164
|
-
icon: string(),
|
|
44165
|
-
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
44166
|
-
addonId: string(),
|
|
44167
|
-
/**
|
|
44168
|
-
* URL of the kind's bundled BRAND icon, served by the providing addon over
|
|
44169
|
-
* its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
|
|
44170
|
-
* when the addon bundles no icon for that kind — the client then falls back
|
|
44171
|
-
* to a neutral glyph rather than rendering the raw `icon` NAME as text.
|
|
44172
|
-
*
|
|
44173
|
-
* Root-relative on purpose: it resolves against whatever origin serves a web
|
|
44174
|
-
* client, and a native client joins it onto its own hub base.
|
|
44175
|
-
*
|
|
44176
|
-
* DECLARED here deliberately. It used to travel as an undeclared passthrough
|
|
44177
|
-
* field that survived only because the runtime cap-router forwards provider
|
|
44178
|
-
* output verbatim — so every consumer had to re-declare it by hand to stop
|
|
44179
|
-
* its own Zod parse from stripping it, and the whole arrangement would have
|
|
44180
|
-
* broken silently the moment output validation was tightened anywhere.
|
|
44181
|
-
*/
|
|
44182
|
-
iconUrl: string().optional(),
|
|
44183
|
-
/**
|
|
44184
|
-
* Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
|
|
44185
|
-
*
|
|
44186
|
-
* The server knows this and therefore says it, because the client cannot
|
|
44187
|
-
* safely guess: a React-Native client renders SVG and raster through two
|
|
44188
|
-
* DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
|
|
44189
|
-
* not decode SVG on iOS/Android), so without this it silently fell back to a
|
|
44190
|
-
* placeholder glyph for every vector icon while the web build looked fine.
|
|
44191
|
-
*
|
|
44192
|
-
* Absent when {@link iconUrl} is absent, or for a legacy provider that has
|
|
44193
|
-
* not been updated — a client that cannot determine the type should prefer
|
|
44194
|
-
* its raster path, which is the safe default for an unknown image.
|
|
44195
|
-
*/
|
|
44196
|
-
iconMediaType: string().optional(),
|
|
44197
|
-
configSchema: ConfigSchemaPassthrough$2,
|
|
44198
|
-
/**
|
|
44199
|
-
* The config keys that decide WHERE this kind's secrets are sent (server,
|
|
44200
|
-
* base URL, instance, chat, recipient). A save that changes any of them
|
|
44201
|
-
* while leaving a secret redacted is refused by the provider (D634), so an
|
|
44202
|
-
* editor uses this to ask for the secret on exactly those edits instead of
|
|
44203
|
-
* on every edit.
|
|
44204
|
-
*
|
|
44205
|
-
* Optional: absent from a provider that holds no secret (the Home Assistant
|
|
44206
|
-
* kinds) and from a provider older than this field — an editor that finds
|
|
44207
|
-
* it absent must assume ANY edit may need the secret.
|
|
44208
|
-
*/
|
|
44209
|
-
destinationKeys: array(string()).optional(),
|
|
44210
|
-
supportsDiscovery: boolean(),
|
|
44211
|
-
caps: TargetKindCapsSchema
|
|
44212
|
-
});
|
|
44213
|
-
/**
|
|
44214
|
-
* A persisted target. `config` holds secrets; providers REDACT secret fields
|
|
44215
|
-
* (return a presence marker only) when serving `listTargets` — never
|
|
44216
|
-
* round-trip a stored secret to the UI.
|
|
44217
|
-
*/
|
|
44218
|
-
var TargetSchema = object({
|
|
44219
|
-
id: string(),
|
|
44220
|
-
name: string(),
|
|
44221
|
-
kind: string(),
|
|
44222
|
-
addonId: string(),
|
|
44223
|
-
enabled: boolean(),
|
|
44224
|
-
config: record(string(), unknown())
|
|
44225
|
-
});
|
|
44226
|
-
/** A discovery-surfaced candidate (config is partial + non-secret). */
|
|
44227
|
-
var DiscoveredTargetSchema = object({
|
|
44228
|
-
kind: string(),
|
|
44229
|
-
suggestedName: string(),
|
|
44230
|
-
config: record(string(), unknown())
|
|
44231
|
-
});
|
|
44232
|
-
/** The degrade engine's report — what was resolved / dropped / degraded. */
|
|
44233
|
-
var RenderedAsSchema = object({
|
|
44234
|
-
level: string(),
|
|
44235
|
-
format: NotificationFormatSchema,
|
|
44236
|
-
attachmentsSent: number().int().nonnegative(),
|
|
44237
|
-
actionsSent: number().int().nonnegative(),
|
|
44238
|
-
truncated: boolean(),
|
|
44239
|
-
dropped: array(string())
|
|
44240
|
-
});
|
|
44241
|
-
var SendResultSchema = object({
|
|
44242
|
-
success: boolean(),
|
|
44243
|
-
error: string().optional(),
|
|
44244
|
-
renderedAs: RenderedAsSchema.optional()
|
|
44245
|
-
});
|
|
44246
|
-
/** Same shape as SendResult — kept as a distinct name for the test panel. */
|
|
44247
|
-
var TestResultSchema = SendResultSchema;
|
|
44248
|
-
/**
|
|
44249
|
-
* Pre-save credential probe against a partial (unsaved) target config.
|
|
44250
|
-
* `resolvedUrl` never includes secrets (token stripped from path).
|
|
44251
|
-
*/
|
|
44252
|
-
var ProbeTargetConfigResultSchema = object({
|
|
44253
|
-
ok: boolean(),
|
|
44254
|
-
resolvedUrl: string(),
|
|
44255
|
-
httpStatus: number().int().optional(),
|
|
44256
|
-
stateInstance: string().optional(),
|
|
44257
|
-
error: string().optional()
|
|
44258
|
-
});
|
|
44259
|
-
method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSchema), { auth: "admin" }), method(object({ targetId: string() }), TargetSchema, { auth: "admin" }), method(object({
|
|
44260
|
-
kind: string(),
|
|
44261
|
-
config: record(string(), unknown()).optional(),
|
|
44262
|
-
/**
|
|
44263
|
-
* When editing / duplicating, the blank password field never round-trips
|
|
44264
|
-
* the stored token. Pass the source target id so the provider can restore
|
|
44265
|
-
* secrets server-side before dialling (same merge as upsert).
|
|
44266
|
-
*/
|
|
44267
|
-
targetId: string().optional()
|
|
44268
|
-
}), array(DiscoveredTargetSchema), { auth: "admin" }), method(object({
|
|
44269
|
-
kind: string(),
|
|
44270
|
-
config: record(string(), unknown()),
|
|
44271
|
-
/** See `discoverTargets.targetId` — restore stored secrets for a blank password. */
|
|
44272
|
-
targetId: string().optional()
|
|
44273
|
-
}), ProbeTargetConfigResultSchema, {
|
|
44274
|
-
kind: "mutation",
|
|
44275
|
-
auth: "admin"
|
|
44276
|
-
}), method(object({
|
|
44277
|
-
targetId: string(),
|
|
44278
|
-
notification: NotificationSchema
|
|
44279
|
-
}), SendResultSchema, {
|
|
44280
|
-
kind: "mutation",
|
|
44281
|
-
auth: "admin"
|
|
44282
|
-
}), method(object({
|
|
44283
|
-
targetId: string(),
|
|
44284
|
-
sample: NotificationSchema.optional()
|
|
44285
|
-
}), TestResultSchema, {
|
|
44286
|
-
kind: "mutation",
|
|
44287
|
-
auth: "admin"
|
|
44288
|
-
}), method(object({
|
|
44289
|
-
target: TargetSchema,
|
|
44290
|
-
/**
|
|
44291
|
-
* Duplicate flow: create a NEW target id while copying secrets from an
|
|
44292
|
-
* existing row. The UI never holds the stored token; blank / redacted
|
|
44293
|
-
* password fields are restored from this source (D634 still applies if
|
|
44294
|
-
* destinations diverge without a re-typed secret).
|
|
44295
|
-
*/
|
|
44296
|
-
cloneSecretsFrom: string().optional()
|
|
44297
|
-
}), TargetSchema, {
|
|
44298
|
-
kind: "mutation",
|
|
44299
|
-
auth: "admin"
|
|
44300
|
-
}), method(object({ targetId: string() }), _void(), {
|
|
44301
|
-
kind: "mutation",
|
|
44302
|
-
auth: "admin"
|
|
44303
|
-
}), method(object({
|
|
44304
|
-
targetId: string(),
|
|
44305
|
-
enabled: boolean()
|
|
44306
|
-
}), _void(), {
|
|
44307
|
-
kind: "mutation",
|
|
44308
|
-
auth: "admin"
|
|
44309
|
-
});
|
|
44310
|
-
new Set([
|
|
44311
|
-
{
|
|
44312
|
-
id: "person",
|
|
44313
|
-
name: "Person"
|
|
44314
|
-
},
|
|
44315
|
-
{
|
|
44316
|
-
id: "vehicle",
|
|
44317
|
-
name: "Vehicle"
|
|
44318
|
-
},
|
|
44319
|
-
{
|
|
44320
|
-
id: "animal",
|
|
44321
|
-
name: "Animal"
|
|
44322
|
-
},
|
|
44323
|
-
{
|
|
44324
|
-
id: "package",
|
|
44325
|
-
name: "Package"
|
|
44326
|
-
}
|
|
44327
|
-
].map((l) => l.id));
|
|
44328
|
-
var COCO_TO_MACRO = {
|
|
44329
|
-
mapping: {
|
|
44330
|
-
person: "person",
|
|
44331
|
-
bicycle: "vehicle",
|
|
44332
|
-
car: "vehicle",
|
|
44333
|
-
motorcycle: "vehicle",
|
|
44334
|
-
airplane: "vehicle",
|
|
44335
|
-
bus: "vehicle",
|
|
44336
|
-
train: "vehicle",
|
|
44337
|
-
truck: "vehicle",
|
|
44338
|
-
boat: "vehicle",
|
|
44339
|
-
bird: "animal",
|
|
44340
|
-
cat: "animal",
|
|
44341
|
-
dog: "animal",
|
|
44342
|
-
horse: "animal",
|
|
44343
|
-
sheep: "animal",
|
|
44344
|
-
cow: "animal",
|
|
44345
|
-
elephant: "animal",
|
|
44346
|
-
bear: "animal",
|
|
44347
|
-
zebra: "animal",
|
|
44348
|
-
giraffe: "animal",
|
|
44349
|
-
suitcase: "package",
|
|
44350
|
-
backpack: "package",
|
|
44351
|
-
handbag: "package"
|
|
44352
|
-
},
|
|
44353
|
-
preserveOriginal: false
|
|
44354
|
-
};
|
|
44355
45016
|
var AUDIO_MACRO_LABELS = [
|
|
44356
45017
|
{
|
|
44357
45018
|
id: "speech",
|
|
@@ -50768,14 +51429,6 @@ var EngineProvisioningSchema = object({
|
|
|
50768
51429
|
*/
|
|
50769
51430
|
configIssues: array(string()).optional()
|
|
50770
51431
|
});
|
|
50771
|
-
var PipelineStepInputSchema = lazy(() => object({
|
|
50772
|
-
addonId: string(),
|
|
50773
|
-
modelId: string().optional(),
|
|
50774
|
-
enabled: boolean().default(true),
|
|
50775
|
-
children: array(PipelineStepInputSchema).optional(),
|
|
50776
|
-
settings: record(string(), unknown()).optional(),
|
|
50777
|
-
jumpDeviceKey: string().optional()
|
|
50778
|
-
}));
|
|
50779
51432
|
var ModelSubstitutionSchema = object({
|
|
50780
51433
|
addonId: string(),
|
|
50781
51434
|
chosen: string(),
|
|
@@ -50854,7 +51507,6 @@ var ConfigUISchemaBridge = custom();
|
|
|
50854
51507
|
var ConfigUISchemaNullableBridge = custom();
|
|
50855
51508
|
var InferenceCapabilitiesBridge = custom();
|
|
50856
51509
|
var ModelAvailabilityListBridge = custom();
|
|
50857
|
-
var PipelineRunResultBridge = custom();
|
|
50858
51510
|
method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
|
|
50859
51511
|
modelId: string(),
|
|
50860
51512
|
settings: record(string(), unknown()).readonly()
|
|
@@ -54016,6 +54668,12 @@ var ServerUpdateActionResultSchema = object({
|
|
|
54016
54668
|
*/
|
|
54017
54669
|
blockers: array(UpdateBlockerSchema).optional()
|
|
54018
54670
|
});
|
|
54671
|
+
var LaunchOverridesSchema = object({
|
|
54672
|
+
/** The persisted heap ceiling in MB, or `null` when none is set. */
|
|
54673
|
+
heapMb: number().int().nullable() });
|
|
54674
|
+
var SetLaunchOverridesResultSchema = LaunchOverridesSchema.extend({
|
|
54675
|
+
/** Always true: the override is read at launch, not by the running process. */
|
|
54676
|
+
restartRequired: boolean() });
|
|
54019
54677
|
method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
|
|
54020
54678
|
kind: "mutation",
|
|
54021
54679
|
auth: "admin"
|
|
@@ -54038,6 +54696,9 @@ method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), S
|
|
|
54038
54696
|
}), method(_void(), ServerUpdateActionResultSchema, {
|
|
54039
54697
|
kind: "mutation",
|
|
54040
54698
|
auth: "admin"
|
|
54699
|
+
}), method(_void(), LaunchOverridesSchema, { auth: "admin" }), method(object({ heapMb: number().int().min(512).max(65536).nullable() }), SetLaunchOverridesResultSchema, {
|
|
54700
|
+
kind: "mutation",
|
|
54701
|
+
auth: "admin"
|
|
54041
54702
|
});
|
|
54042
54703
|
/**
|
|
54043
54704
|
* `smtp-provider` — pluggable email delivery surface.
|
|
@@ -56439,7 +57100,9 @@ var ManifestShapeSchema = object({
|
|
|
56439
57100
|
icon: string().optional()
|
|
56440
57101
|
}).optional(),
|
|
56441
57102
|
protected: boolean().optional(),
|
|
56442
|
-
removable: boolean().optional()
|
|
57103
|
+
removable: boolean().optional(),
|
|
57104
|
+
/** Declared Integrations-page block (mirror of `AddonDeclaration.integrationSection`). */
|
|
57105
|
+
integrationSection: _enum(["system", "providers"]).optional()
|
|
56443
57106
|
});
|
|
56444
57107
|
var AddonProcessSchema = object({
|
|
56445
57108
|
pid: number().optional(),
|
|
@@ -56804,9 +57467,9 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
56804
57467
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
56805
57468
|
object({
|
|
56806
57469
|
/** Carbon dioxide concentration in ppm. */
|
|
56807
|
-
|
|
57470
|
+
co2: number().min(0).optional().meta(readingMeta("concentration-volume")),
|
|
56808
57471
|
/** Total volatile organic compounds in ppb. */
|
|
56809
|
-
|
|
57472
|
+
voc: number().min(0).optional().meta(readingMeta("concentration-ppb")),
|
|
56810
57473
|
/** Particulate matter ≤ 2.5 μm in µg/m³. */
|
|
56811
57474
|
pm25: number().min(0).optional().meta(readingMeta("concentration-mass")),
|
|
56812
57475
|
/** Particulate matter ≤ 10 μm in µg/m³. */
|
|
@@ -56819,7 +57482,7 @@ object({
|
|
|
56819
57482
|
DeviceType.Sensor;
|
|
56820
57483
|
object({
|
|
56821
57484
|
/** Current illuminance in lux (lx). `null` when the sample was refused (D393). */
|
|
56822
|
-
|
|
57485
|
+
illuminance: number().min(0).nullable().meta(readingMeta("illuminance", {
|
|
56823
57486
|
precision: 0,
|
|
56824
57487
|
label: "Illuminance"
|
|
56825
57488
|
})),
|
|
@@ -56916,6 +57579,84 @@ DeviceType.Camera, method(object({ deviceId: number() }), AudioMetricsSnapshotSc
|
|
|
56916
57579
|
* would produce more than `maxPoints` samples. */
|
|
56917
57580
|
sampleEveryMs: number().int().positive().optional()
|
|
56918
57581
|
}), AudioMetricsHistorySchema);
|
|
57582
|
+
method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
|
|
57583
|
+
actionId: string().min(1),
|
|
57584
|
+
variables: record(string(), ActionVariableValueSchema).optional()
|
|
57585
|
+
}), _void(), {
|
|
57586
|
+
kind: "mutation",
|
|
57587
|
+
auth: "admin"
|
|
57588
|
+
}), method(object({ actionId: string().min(1) }), _void(), {
|
|
57589
|
+
kind: "mutation",
|
|
57590
|
+
auth: "admin"
|
|
57591
|
+
});
|
|
57592
|
+
/**
|
|
57593
|
+
* actions — the ONE surface for runnable actions, for the UI and for
|
|
57594
|
+
* automations. Provided by the core-blocks builtin on the hub.
|
|
57595
|
+
*
|
|
57596
|
+
* An action is a LIST ENTRY, not a device (D883): either internal (cap and wait
|
|
57597
|
+
* steps, kept in the hub's `actions` record kind) or declared by an addon over
|
|
57598
|
+
* `action-source`. `list` asks every `action-source` provider LIVE and overlays
|
|
57599
|
+
* the run status from the hub's `runs` ledger; there is no catalog here to
|
|
57600
|
+
* drift (D3).
|
|
57601
|
+
*
|
|
57602
|
+
* **Permissions follow the camera, as linked devices do.** An action is linked
|
|
57603
|
+
* to cameras by the operator (`setLinks`, D356: nothing links itself). A
|
|
57604
|
+
* non-admin may `get` / `run` an action only through a camera they may see that
|
|
57605
|
+
* links it: they name the camera (`deviceId`, a top-level field so the scope
|
|
57606
|
+
* gate sees it) and the provider refuses an action that camera does not link.
|
|
57607
|
+
* An admin, and an in-process caller (an automation block), may run any action.
|
|
57608
|
+
* Every refusal is typed (`[not-linked] …`) and logged.
|
|
57609
|
+
*
|
|
57610
|
+
* A second `run` of an action that is already running is REFUSED — traced and
|
|
57611
|
+
* logged — never queued.
|
|
57612
|
+
*/
|
|
57613
|
+
var ActionIdInput = object({ actionId: string().min(1) });
|
|
57614
|
+
var ActionLinksSchema = object({
|
|
57615
|
+
deviceId: number().int().nonnegative(),
|
|
57616
|
+
actionIds: array(string().min(1)).max(100)
|
|
57617
|
+
});
|
|
57618
|
+
method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
|
|
57619
|
+
actionId: string().min(1),
|
|
57620
|
+
deviceId: number().int().nonnegative().optional()
|
|
57621
|
+
}), object({ action: ActionEntrySchema.nullable() }), {
|
|
57622
|
+
role: "viewer",
|
|
57623
|
+
auth: "protected",
|
|
57624
|
+
kind: "query",
|
|
57625
|
+
caller: "required"
|
|
57626
|
+
}), method(object({
|
|
57627
|
+
actionId: string().min(1),
|
|
57628
|
+
variables: record(string(), ActionVariableValueSchema).optional(),
|
|
57629
|
+
wait: boolean().optional(),
|
|
57630
|
+
origin: ActionRunOriginSchema.optional(),
|
|
57631
|
+
deviceId: number().int().nonnegative().optional()
|
|
57632
|
+
}), ActionRunResultSchema, {
|
|
57633
|
+
role: "viewer",
|
|
57634
|
+
auth: "protected",
|
|
57635
|
+
kind: "mutation",
|
|
57636
|
+
caller: "required"
|
|
57637
|
+
}), method(ActionIdInput, _void(), {
|
|
57638
|
+
kind: "mutation",
|
|
57639
|
+
auth: "admin"
|
|
57640
|
+
}), method(ActionIdInput, object({ traces: array(AutomationRunTraceSchema) }), { auth: "admin" }), method(object({ action: ActionInputSchema }), object({ action: ActionEntrySchema }), {
|
|
57641
|
+
kind: "mutation",
|
|
57642
|
+
auth: "admin"
|
|
57643
|
+
}), method(object({
|
|
57644
|
+
actionId: string().min(1),
|
|
57645
|
+
action: ActionInputSchema.partial()
|
|
57646
|
+
}), object({ action: ActionEntrySchema }), {
|
|
57647
|
+
kind: "mutation",
|
|
57648
|
+
auth: "admin"
|
|
57649
|
+
}), method(ActionIdInput, _void(), {
|
|
57650
|
+
kind: "mutation",
|
|
57651
|
+
auth: "admin"
|
|
57652
|
+
}), method(object({ deviceId: number().int().nonnegative() }), array(ActionEntrySchema), {
|
|
57653
|
+
role: "viewer",
|
|
57654
|
+
auth: "protected",
|
|
57655
|
+
kind: "query"
|
|
57656
|
+
}), method(object({ deviceId: number().int().nonnegative() }), ActionLinksSchema, { auth: "admin" }), method(ActionLinksSchema, ActionLinksSchema, {
|
|
57657
|
+
kind: "mutation",
|
|
57658
|
+
auth: "admin"
|
|
57659
|
+
});
|
|
56919
57660
|
object({
|
|
56920
57661
|
/** Whether the automation is currently enabled. Disabled automations
|
|
56921
57662
|
* ignore their trigger block — manual `trigger` still works. */
|
|
@@ -56969,7 +57710,7 @@ var BatteryStatusSchema = object({
|
|
|
56969
57710
|
* Consumers must SKIP a null rather than coerce it — `battery-band` already
|
|
56970
57711
|
* declines to band a non-finite reading, which is the correct shape.
|
|
56971
57712
|
*/
|
|
56972
|
-
|
|
57713
|
+
level: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
|
|
56973
57714
|
/**
|
|
56974
57715
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
56975
57716
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -56979,7 +57720,7 @@ var BatteryStatusSchema = object({
|
|
|
56979
57720
|
* `'unknown'` is the absence of an answer: the provider has not read the
|
|
56980
57721
|
* power fields yet, or the firmware reported neither. Before it existed,
|
|
56981
57722
|
* two unreadable fields produced `'none'`, and a camera nobody had reached
|
|
56982
|
-
* was drawn "on battery alone" — the same D315 defect `
|
|
57723
|
+
* was drawn "on battery alone" — the same D315 defect `level` closed
|
|
56983
57724
|
* by going nullable. Consumers SKIP it (no charger state published, no
|
|
56984
57725
|
* glyph, no HomeKit ChargingState) rather than coerce it either way.
|
|
56985
57726
|
*/
|
|
@@ -57003,7 +57744,7 @@ var BatteryStatusSchema = object({
|
|
|
57003
57744
|
* that only report charge. A second reading on this cap, not a second
|
|
57004
57745
|
* `numeric-sensor` on the same device.
|
|
57005
57746
|
*/
|
|
57006
|
-
|
|
57747
|
+
voltage: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
57007
57748
|
/**
|
|
57008
57749
|
* Ms epoch of the last time the device PROVED it was reachable — a
|
|
57009
57750
|
* completed firmware round-trip, an observed wake, or an inbound push
|
|
@@ -57037,7 +57778,7 @@ var BatteryStatusSchema = object({
|
|
|
57037
57778
|
/**
|
|
57038
57779
|
* True when the source is a BINARY low-battery indicator (HA
|
|
57039
57780
|
* `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
|
|
57040
|
-
* charge level — `
|
|
57781
|
+
* charge level — `level` is then a coarse stand-in (100 = normal,
|
|
57041
57782
|
* sub-threshold = low). UI MUST render "Normal"/"Low" instead of a
|
|
57042
57783
|
* misleading exact percentage. Absent/false → genuine 0–100 % reading.
|
|
57043
57784
|
*/
|
|
@@ -57068,33 +57809,395 @@ DeviceType.Sensor;
|
|
|
57068
57809
|
* controls to this single-method surface.
|
|
57069
57810
|
*
|
|
57070
57811
|
* The cap is intentionally minimal: a single `setBrightness({deviceId,
|
|
57071
|
-
*
|
|
57812
|
+
* level})` mutation plus the auto-injected `getStatus`. Drivers
|
|
57072
57813
|
* that expose richer controls (color temperature, scenes, schedules)
|
|
57073
57814
|
* should surface those via the device's `getSettingsUISchema()`
|
|
57074
57815
|
* instead of bloating this cap.
|
|
57075
57816
|
*/
|
|
57076
57817
|
var BrightnessStatusSchema = object({
|
|
57077
57818
|
/** Current level as 0..100 inclusive. Firmware-reported. */
|
|
57078
|
-
|
|
57819
|
+
level: number().min(0).max(100).meta(readingMeta("percentage")),
|
|
57079
57820
|
/** Ms epoch of the last operator-driven change. Useful for UI freshness. */
|
|
57080
57821
|
lastChangedAt: number()
|
|
57081
57822
|
});
|
|
57082
57823
|
DeviceType.Light, method(object({
|
|
57083
57824
|
deviceId: number().int().nonnegative(),
|
|
57084
|
-
|
|
57825
|
+
level: number().min(0).max(100)
|
|
57085
57826
|
}), _void(), {
|
|
57086
57827
|
kind: "mutation",
|
|
57087
57828
|
auth: "protected"
|
|
57088
57829
|
}), object({
|
|
57089
57830
|
deviceId: number(),
|
|
57090
|
-
|
|
57831
|
+
level: number().min(0).max(100),
|
|
57091
57832
|
lastChangedAt: number()
|
|
57092
57833
|
});
|
|
57834
|
+
/**
|
|
57835
|
+
* The role vocabulary of a remote (D963): what a button MEANS, independent of
|
|
57836
|
+
* how it is wired. A layout template places buttons by role; a device binds a
|
|
57837
|
+
* role to an action; an exporter asks for a role by name. Roles are shared so
|
|
57838
|
+
* one layout fits every appliance and one voice command fits every binding.
|
|
57839
|
+
*
|
|
57840
|
+
* A role outside this list is `custom:<key>` — the operator's own button (a
|
|
57841
|
+
* SmartIR source, a channel preset). The key is a lowercase slug.
|
|
57842
|
+
*/
|
|
57843
|
+
var REMOTE_KNOWN_ROLES = [
|
|
57844
|
+
"power",
|
|
57845
|
+
"power_on",
|
|
57846
|
+
"power_off",
|
|
57847
|
+
"volume_up",
|
|
57848
|
+
"volume_down",
|
|
57849
|
+
"mute",
|
|
57850
|
+
"channel_up",
|
|
57851
|
+
"channel_down",
|
|
57852
|
+
"up",
|
|
57853
|
+
"down",
|
|
57854
|
+
"left",
|
|
57855
|
+
"right",
|
|
57856
|
+
"ok",
|
|
57857
|
+
"back",
|
|
57858
|
+
"home",
|
|
57859
|
+
"menu",
|
|
57860
|
+
"info",
|
|
57861
|
+
"guide",
|
|
57862
|
+
"exit",
|
|
57863
|
+
"input",
|
|
57864
|
+
"play",
|
|
57865
|
+
"pause",
|
|
57866
|
+
"play_pause",
|
|
57867
|
+
"stop",
|
|
57868
|
+
"next",
|
|
57869
|
+
"previous",
|
|
57870
|
+
"fast_forward",
|
|
57871
|
+
"rewind",
|
|
57872
|
+
"digit_0",
|
|
57873
|
+
"digit_1",
|
|
57874
|
+
"digit_2",
|
|
57875
|
+
"digit_3",
|
|
57876
|
+
"digit_4",
|
|
57877
|
+
"digit_5",
|
|
57878
|
+
"digit_6",
|
|
57879
|
+
"digit_7",
|
|
57880
|
+
"digit_8",
|
|
57881
|
+
"digit_9"
|
|
57882
|
+
];
|
|
57883
|
+
var CUSTOM_KEY_RE = /^[a-z0-9][a-z0-9_]{0,47}$/;
|
|
57884
|
+
var KNOWN_ROLES = new Set(REMOTE_KNOWN_ROLES);
|
|
57885
|
+
function isRemoteKnownRole(value) {
|
|
57886
|
+
return KNOWN_ROLES.has(value);
|
|
57887
|
+
}
|
|
57888
|
+
function isRemoteCustomKey(key) {
|
|
57889
|
+
return CUSTOM_KEY_RE.test(key);
|
|
57890
|
+
}
|
|
57891
|
+
/** The key of a `custom:<key>` role, or null for any other string. */
|
|
57892
|
+
function customKeyOfRole(role) {
|
|
57893
|
+
if (!role.startsWith("custom:")) return null;
|
|
57894
|
+
const key = role.slice(7);
|
|
57895
|
+
return isRemoteCustomKey(key) ? key : null;
|
|
57896
|
+
}
|
|
57897
|
+
function isRemoteRole(value) {
|
|
57898
|
+
return isRemoteKnownRole(value) || customKeyOfRole(value) !== null;
|
|
57899
|
+
}
|
|
57900
|
+
var RemoteRoleSchema = string().refine(isRemoteRole, { message: "a role is one of the known roles or custom:<key> (lowercase letters, digits, _)" });
|
|
57901
|
+
var RemoteBindingSchema = object({ action: AutomationCapStepSchema.extend({ deviceId: number().int().nonnegative() }) });
|
|
57902
|
+
var RemoteCustomButtonSchema = object({
|
|
57903
|
+
/** The slug after `custom:` in the role. */
|
|
57904
|
+
key: string().refine(isRemoteCustomKey, { message: "a lowercase slug" }),
|
|
57905
|
+
/** What the operator calls it, and what a voice command may name. */
|
|
57906
|
+
name: string().min(1).max(60)
|
|
57907
|
+
});
|
|
57908
|
+
var RemotePowerModeSchema = _enum(["toggle", "discrete"]);
|
|
57909
|
+
var RemoteConfigSchema = object({
|
|
57910
|
+
layoutTemplateId: string().min(1).nullable(),
|
|
57911
|
+
/**
|
|
57912
|
+
* The transmitter device new bindings and an import send through. A binding
|
|
57913
|
+
* names its own device, so one command may override it.
|
|
57914
|
+
*/
|
|
57915
|
+
defaultTransmitterId: number().int().nonnegative().nullable().default(null),
|
|
57916
|
+
/** Keyed by role. A role with no entry falls back to the native cap. */
|
|
57917
|
+
bindings: record(string(), RemoteBindingSchema),
|
|
57918
|
+
customButtons: array(RemoteCustomButtonSchema).max(100),
|
|
57919
|
+
power: object({ mode: RemotePowerModeSchema })
|
|
57920
|
+
}).superRefine((config, ctx) => {
|
|
57921
|
+
const roles = Object.keys(config.bindings);
|
|
57922
|
+
if (roles.length > 200) ctx.addIssue({
|
|
57923
|
+
code: "custom",
|
|
57924
|
+
message: "too many bindings",
|
|
57925
|
+
path: ["bindings"]
|
|
57926
|
+
});
|
|
57927
|
+
for (const role of roles) if (!isRemoteRole(role)) ctx.addIssue({
|
|
57928
|
+
code: "custom",
|
|
57929
|
+
message: `"${role}" is not a role`,
|
|
57930
|
+
path: ["bindings", role]
|
|
57931
|
+
});
|
|
57932
|
+
const keys = /* @__PURE__ */ new Set();
|
|
57933
|
+
config.customButtons.forEach((button, index) => {
|
|
57934
|
+
if (keys.has(button.key)) ctx.addIssue({
|
|
57935
|
+
code: "custom",
|
|
57936
|
+
message: `custom button "${button.key}" is listed twice`,
|
|
57937
|
+
path: [
|
|
57938
|
+
"customButtons",
|
|
57939
|
+
index,
|
|
57940
|
+
"key"
|
|
57941
|
+
]
|
|
57942
|
+
});
|
|
57943
|
+
keys.add(button.key);
|
|
57944
|
+
});
|
|
57945
|
+
for (const role of roles) {
|
|
57946
|
+
const key = customKeyOfRole(role);
|
|
57947
|
+
if (key !== null && !keys.has(key)) ctx.addIssue({
|
|
57948
|
+
code: "custom",
|
|
57949
|
+
message: `${role} is bound but has no entry in customButtons`,
|
|
57950
|
+
path: ["bindings", role]
|
|
57951
|
+
});
|
|
57952
|
+
}
|
|
57953
|
+
});
|
|
57954
|
+
object({
|
|
57955
|
+
power: object({
|
|
57956
|
+
state: _enum(["on", "off"]),
|
|
57957
|
+
at: number()
|
|
57958
|
+
}).nullable(),
|
|
57959
|
+
muted: object({
|
|
57960
|
+
value: boolean(),
|
|
57961
|
+
at: number()
|
|
57962
|
+
}).nullable()
|
|
57963
|
+
});
|
|
57964
|
+
var RemoteLayoutButtonSchema = object({
|
|
57965
|
+
id: string().min(1).max(40),
|
|
57966
|
+
/** 0-based grid position. */
|
|
57967
|
+
row: number().int().min(0).max(24),
|
|
57968
|
+
col: number().int().min(0).max(24),
|
|
57969
|
+
rowSpan: number().int().min(1).max(24),
|
|
57970
|
+
colSpan: number().int().min(1).max(24),
|
|
57971
|
+
icon: string().min(1).max(60).optional(),
|
|
57972
|
+
label: string().min(1).max(40).optional(),
|
|
57973
|
+
role: RemoteRoleSchema
|
|
57974
|
+
});
|
|
57975
|
+
object({
|
|
57976
|
+
columns: number().int().min(1).max(24),
|
|
57977
|
+
rows: number().int().min(1).max(24),
|
|
57978
|
+
buttons: array(RemoteLayoutButtonSchema).max(200)
|
|
57979
|
+
}).superRefine((grid, ctx) => {
|
|
57980
|
+
const ids = /* @__PURE__ */ new Set();
|
|
57981
|
+
const taken = /* @__PURE__ */ new Map();
|
|
57982
|
+
grid.buttons.forEach((button, index) => {
|
|
57983
|
+
if (ids.has(button.id)) ctx.addIssue({
|
|
57984
|
+
code: "custom",
|
|
57985
|
+
message: `button id "${button.id}" is used twice`,
|
|
57986
|
+
path: [
|
|
57987
|
+
"buttons",
|
|
57988
|
+
index,
|
|
57989
|
+
"id"
|
|
57990
|
+
]
|
|
57991
|
+
});
|
|
57992
|
+
ids.add(button.id);
|
|
57993
|
+
if (button.row + button.rowSpan > grid.rows || button.col + button.colSpan > grid.columns) {
|
|
57994
|
+
ctx.addIssue({
|
|
57995
|
+
code: "custom",
|
|
57996
|
+
message: `button "${button.id}" leaves the grid`,
|
|
57997
|
+
path: ["buttons", index]
|
|
57998
|
+
});
|
|
57999
|
+
return;
|
|
58000
|
+
}
|
|
58001
|
+
for (let r = button.row; r < button.row + button.rowSpan; r += 1) for (let c = button.col; c < button.col + button.colSpan; c += 1) {
|
|
58002
|
+
const cell = `${r}:${c}`;
|
|
58003
|
+
const other = taken.get(cell);
|
|
58004
|
+
if (other !== void 0) {
|
|
58005
|
+
ctx.addIssue({
|
|
58006
|
+
code: "custom",
|
|
58007
|
+
message: `buttons "${other}" and "${button.id}" overlap`,
|
|
58008
|
+
path: ["buttons", index]
|
|
58009
|
+
});
|
|
58010
|
+
return;
|
|
58011
|
+
}
|
|
58012
|
+
taken.set(cell, button.id);
|
|
58013
|
+
}
|
|
58014
|
+
});
|
|
58015
|
+
});
|
|
58016
|
+
var RemoteBoundCommandSchema = object({
|
|
58017
|
+
role: RemoteRoleSchema,
|
|
58018
|
+
/** The operator's name for a custom button; absent for a known role. */
|
|
58019
|
+
label: string().optional(),
|
|
58020
|
+
custom: boolean()
|
|
58021
|
+
});
|
|
58022
|
+
var RemoteCommandListSchema = object({
|
|
58023
|
+
layoutTemplateId: string().nullable(),
|
|
58024
|
+
power: object({ mode: RemotePowerModeSchema }),
|
|
58025
|
+
/** Only the roles that are BOUND — the ones a press can reach. */
|
|
58026
|
+
commands: array(RemoteBoundCommandSchema)
|
|
58027
|
+
});
|
|
58028
|
+
var RemoteRefusalReasonSchema = _enum([
|
|
58029
|
+
"no-remote",
|
|
58030
|
+
"unbound-role",
|
|
58031
|
+
"action-failed"
|
|
58032
|
+
]);
|
|
58033
|
+
var RemoteSendResultSchema = discriminatedUnion("status", [
|
|
58034
|
+
object({
|
|
58035
|
+
status: literal("sent"),
|
|
58036
|
+
/** How many times the action ran. */
|
|
58037
|
+
sends: number().int().min(1)
|
|
58038
|
+
}),
|
|
58039
|
+
object({
|
|
58040
|
+
status: literal("skipped"),
|
|
58041
|
+
reason: literal("already-in-state")
|
|
58042
|
+
}),
|
|
58043
|
+
object({
|
|
58044
|
+
status: literal("refused"),
|
|
58045
|
+
reason: RemoteRefusalReasonSchema,
|
|
58046
|
+
detail: string().optional()
|
|
58047
|
+
})
|
|
58048
|
+
]);
|
|
58049
|
+
var RemoteMediaCommandSchema = _enum([
|
|
58050
|
+
"play",
|
|
58051
|
+
"pause",
|
|
58052
|
+
"stop",
|
|
58053
|
+
"next",
|
|
58054
|
+
"previous",
|
|
58055
|
+
"setMute",
|
|
58056
|
+
"selectSource"
|
|
58057
|
+
]);
|
|
58058
|
+
/** A send result, or `not-routed`: the role is not bound, so the native cap answers. */
|
|
58059
|
+
var RemoteMediaCommandResultSchema = discriminatedUnion("status", [...RemoteSendResultSchema.options, object({ status: literal("not-routed") })]);
|
|
58060
|
+
var RemoteSetConfigResultSchema = discriminatedUnion("status", [object({ status: literal("saved") }), object({
|
|
58061
|
+
status: literal("refused"),
|
|
58062
|
+
reason: _enum(["unknown-template", "not-a-media-player"]),
|
|
58063
|
+
detail: string()
|
|
58064
|
+
})]);
|
|
58065
|
+
var deviceInput = object({ deviceId: number().int().nonnegative() });
|
|
58066
|
+
DeviceType.MediaPlayer;
|
|
58067
|
+
method(deviceInput, RemoteConfigSchema, { auth: "admin" }), method(deviceInput.extend({ config: RemoteConfigSchema }), RemoteSetConfigResultSchema, {
|
|
58068
|
+
kind: "mutation",
|
|
58069
|
+
auth: "admin"
|
|
58070
|
+
}), method(deviceInput, RemoteCommandListSchema, { auth: "protected" }), method(deviceInput.extend({
|
|
58071
|
+
role: RemoteRoleSchema,
|
|
58072
|
+
/** Sends in a row (volume steps). */
|
|
58073
|
+
repeat: number().int().min(1).max(50).default(1)
|
|
58074
|
+
}), RemoteSendResultSchema, {
|
|
58075
|
+
kind: "mutation",
|
|
58076
|
+
auth: "protected"
|
|
58077
|
+
}), method(deviceInput.extend({
|
|
58078
|
+
command: RemoteMediaCommandSchema,
|
|
58079
|
+
muted: boolean().optional(),
|
|
58080
|
+
source: string().optional(),
|
|
58081
|
+
repeat: number().int().min(1).max(50).default(1)
|
|
58082
|
+
}), RemoteMediaCommandResultSchema, {
|
|
58083
|
+
kind: "mutation",
|
|
58084
|
+
auth: "protected"
|
|
58085
|
+
});
|
|
58086
|
+
var TemplateKindSchema = _enum(["remote"]);
|
|
58087
|
+
/**
|
|
58088
|
+
* template — the generic store of reusable, named operator data (D963). A
|
|
58089
|
+
* record is `{ id, kind, name, payload }`; the kinds (today only `remote`, the
|
|
58090
|
+
* button grid of a remote) and the schema each payload must satisfy are
|
|
58091
|
+
* declared by the system in `template-kinds.ts`. Nothing here is specific to a
|
|
58092
|
+
* kind: the engine validates a payload against its kind's schema and, on a
|
|
58093
|
+
* delete, asks the kind's owner whether anything still points at the record.
|
|
58094
|
+
*
|
|
58095
|
+
* Every refusal is a typed result — a UI says "unknown kind" or names the
|
|
58096
|
+
* devices that still use a template, without parsing text.
|
|
58097
|
+
*/
|
|
58098
|
+
var TemplateRecordSchema = object({
|
|
58099
|
+
id: string().min(1),
|
|
58100
|
+
kind: TemplateKindSchema,
|
|
58101
|
+
name: string().min(1).max(120),
|
|
58102
|
+
/** Shaped by the kind; `checkTemplatePayload(kind, payload)` reads it. */
|
|
58103
|
+
payload: unknown(),
|
|
58104
|
+
createdAt: number(),
|
|
58105
|
+
updatedAt: number()
|
|
58106
|
+
});
|
|
58107
|
+
var TemplateWriteResultSchema = discriminatedUnion("status", [object({
|
|
58108
|
+
status: literal("saved"),
|
|
58109
|
+
template: TemplateRecordSchema
|
|
58110
|
+
}), object({
|
|
58111
|
+
status: literal("refused"),
|
|
58112
|
+
reason: _enum(["invalid-payload", "not-found"]),
|
|
58113
|
+
detail: string()
|
|
58114
|
+
})]);
|
|
58115
|
+
/** A device still pointing at a template. */
|
|
58116
|
+
var TemplateUserSchema = object({
|
|
58117
|
+
deviceId: number().int().nonnegative(),
|
|
58118
|
+
name: string()
|
|
58119
|
+
});
|
|
58120
|
+
var TemplateDeleteResultSchema = discriminatedUnion("status", [
|
|
58121
|
+
object({ status: literal("deleted") }),
|
|
58122
|
+
object({ status: literal("not-found") }),
|
|
58123
|
+
object({
|
|
58124
|
+
status: literal("in-use"),
|
|
58125
|
+
devices: array(TemplateUserSchema).min(1)
|
|
58126
|
+
})
|
|
58127
|
+
]);
|
|
58128
|
+
method(object({ kind: TemplateKindSchema.optional() }), array(TemplateRecordSchema), { auth: "protected" }), method(object({ id: string().min(1) }), TemplateRecordSchema.nullable(), { auth: "protected" }), method(object({
|
|
58129
|
+
kind: TemplateKindSchema,
|
|
58130
|
+
name: string().min(1).max(120),
|
|
58131
|
+
payload: unknown()
|
|
58132
|
+
}), TemplateWriteResultSchema, {
|
|
58133
|
+
kind: "mutation",
|
|
58134
|
+
auth: "admin"
|
|
58135
|
+
}), method(object({
|
|
58136
|
+
id: string().min(1),
|
|
58137
|
+
name: string().min(1).max(120).optional(),
|
|
58138
|
+
payload: unknown().optional()
|
|
58139
|
+
}), TemplateWriteResultSchema, {
|
|
58140
|
+
kind: "mutation",
|
|
58141
|
+
auth: "admin"
|
|
58142
|
+
}), method(object({ id: string().min(1) }), TemplateDeleteResultSchema, {
|
|
58143
|
+
kind: "mutation",
|
|
58144
|
+
auth: "admin"
|
|
58145
|
+
});
|
|
57093
58146
|
DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
57094
58147
|
kind: "mutation",
|
|
57095
58148
|
auth: "protected"
|
|
57096
58149
|
});
|
|
57097
58150
|
/**
|
|
58151
|
+
* A pulse train in signed microseconds: mark (+) first, then space (-), strictly
|
|
58152
|
+
* alternating, no zeros, 2..1024 entries.
|
|
58153
|
+
*/
|
|
58154
|
+
var IrTimingsSchema = array(number().int()).min(2).max(1024).superRefine((timings, ctx) => {
|
|
58155
|
+
timings.forEach((value, index) => {
|
|
58156
|
+
const expectMark = index % 2 === 0;
|
|
58157
|
+
if (value === 0 || value > 0 !== expectMark) ctx.addIssue({
|
|
58158
|
+
code: "custom",
|
|
58159
|
+
message: `timing ${index} must be a non-zero ${expectMark ? "mark (positive)" : "space (negative)"}`,
|
|
58160
|
+
path: [index]
|
|
58161
|
+
});
|
|
58162
|
+
});
|
|
58163
|
+
});
|
|
58164
|
+
/** Per-command transmit options. Every key is optional; a transmitter applies what it can. */
|
|
58165
|
+
var TransmitSettingsSchema = object({
|
|
58166
|
+
carrierHz: number().int().positive().optional(),
|
|
58167
|
+
dutyCyclePercent: number().int().min(1).max(100).optional(),
|
|
58168
|
+
repeat: number().int().min(0).max(20).optional(),
|
|
58169
|
+
repeatDelayMs: number().int().min(0).optional()
|
|
58170
|
+
});
|
|
58171
|
+
/** The setting keys a transmitter may declare as settable (`getInfo.settable`). */
|
|
58172
|
+
var TransmitSettingKeySchema = _enum([
|
|
58173
|
+
"carrierHz",
|
|
58174
|
+
"dutyCyclePercent",
|
|
58175
|
+
"repeat",
|
|
58176
|
+
"repeatDelayMs"
|
|
58177
|
+
]);
|
|
58178
|
+
var IrMediumSchema = _enum(["ir", "rf"]);
|
|
58179
|
+
var IrSendResultSchema = object({
|
|
58180
|
+
ok: literal(true),
|
|
58181
|
+
/** Settings the transmitter could not apply; the train was still sent. */
|
|
58182
|
+
ignoredSettings: array(string())
|
|
58183
|
+
});
|
|
58184
|
+
var IrTransmitterInfoSchema = object({
|
|
58185
|
+
media: array(IrMediumSchema),
|
|
58186
|
+
settable: array(TransmitSettingKeySchema),
|
|
58187
|
+
maxTimings: number().int().positive()
|
|
58188
|
+
});
|
|
58189
|
+
DeviceType.Generic, method(object({
|
|
58190
|
+
deviceId: number().int().nonnegative(),
|
|
58191
|
+
timings: IrTimingsSchema,
|
|
58192
|
+
settings: TransmitSettingsSchema.optional()
|
|
58193
|
+
}), IrSendResultSchema, {
|
|
58194
|
+
kind: "mutation",
|
|
58195
|
+
auth: "protected"
|
|
58196
|
+
}), method(object({ deviceId: number().int().nonnegative() }), IrTransmitterInfoSchema, {
|
|
58197
|
+
kind: "query",
|
|
58198
|
+
auth: "protected"
|
|
58199
|
+
});
|
|
58200
|
+
/**
|
|
57098
58201
|
* `calendar-source` — collection cap exposing per-provider calendars and
|
|
57099
58202
|
* their events. Every addon that contributes calendars (Home Assistant,
|
|
57100
58203
|
* a future Google Calendar addon, …) registers a provider here. The hub
|
|
@@ -57588,11 +58691,11 @@ var ColorInputSchema = discriminatedUnion("mode", [
|
|
|
57588
58691
|
}),
|
|
57589
58692
|
object({
|
|
57590
58693
|
mode: literal("mired"),
|
|
57591
|
-
|
|
58694
|
+
colorTemperature: number().int().min(50).max(1e3)
|
|
57592
58695
|
})
|
|
57593
58696
|
]);
|
|
57594
58697
|
object({
|
|
57595
|
-
/** Active color mode — which of `rgb` / `hsv` / `
|
|
58698
|
+
/** Active color mode — which of `rgb` / `hsv` / `colorTemperature` reflects
|
|
57596
58699
|
* the bulb's current state. */
|
|
57597
58700
|
mode: _enum([
|
|
57598
58701
|
"rgb",
|
|
@@ -57604,7 +58707,7 @@ object({
|
|
|
57604
58707
|
/** Populated when `mode === 'hsv'`. */
|
|
57605
58708
|
hsv: HsvTripletSchema.optional(),
|
|
57606
58709
|
/** Populated when `mode === 'mired'`. */
|
|
57607
|
-
|
|
58710
|
+
colorTemperature: number().int().optional().meta(readingMeta("colour-temperature")),
|
|
57608
58711
|
/** Ms epoch of the last operator-driven change. */
|
|
57609
58712
|
lastChangedAt: number()
|
|
57610
58713
|
});
|
|
@@ -57623,7 +58726,7 @@ DeviceType.Light, method(object({
|
|
|
57623
58726
|
]),
|
|
57624
58727
|
rgb: RgbTripletSchema.optional(),
|
|
57625
58728
|
hsv: HsvTripletSchema.optional(),
|
|
57626
|
-
|
|
58729
|
+
colorTemperature: number().int().optional(),
|
|
57627
58730
|
lastChangedAt: number()
|
|
57628
58731
|
});
|
|
57629
58732
|
var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
|
|
@@ -58049,11 +59152,11 @@ object({
|
|
|
58049
59152
|
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
58050
59153
|
availablePrograms: array(string()),
|
|
58051
59154
|
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
58052
|
-
|
|
59155
|
+
remaining: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
58053
59156
|
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
58054
|
-
|
|
59157
|
+
delayedStart: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
58055
59158
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
58056
|
-
|
|
59159
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58057
59160
|
/** True when the door is reported open; null when the door state is not known. */
|
|
58058
59161
|
doorOpen: boolean().nullable(),
|
|
58059
59162
|
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
@@ -58098,7 +59201,7 @@ object({
|
|
|
58098
59201
|
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
58099
59202
|
lastFetchedAt: number()
|
|
58100
59203
|
});
|
|
58101
|
-
var DeviceIdSchema = number().int().nonnegative();
|
|
59204
|
+
var DeviceIdSchema$1 = number().int().nonnegative();
|
|
58102
59205
|
/** A value a program option or setting can take. */
|
|
58103
59206
|
var DishwasherValueSchema = union([
|
|
58104
59207
|
boolean(),
|
|
@@ -58162,77 +59265,77 @@ var DishwasherOptionsSchema = object({
|
|
|
58162
59265
|
options: array(DishwasherOptionDescriptorSchema)
|
|
58163
59266
|
});
|
|
58164
59267
|
DeviceType.Dishwasher, method(object({
|
|
58165
|
-
deviceId: DeviceIdSchema,
|
|
59268
|
+
deviceId: DeviceIdSchema$1,
|
|
58166
59269
|
program: string().min(1).optional(),
|
|
58167
59270
|
options: record(string(), DishwasherValueSchema).optional()
|
|
58168
59271
|
}), _void(), {
|
|
58169
59272
|
kind: "mutation",
|
|
58170
59273
|
auth: "protected"
|
|
58171
|
-
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
59274
|
+
}), method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
|
|
58172
59275
|
kind: "mutation",
|
|
58173
59276
|
auth: "protected"
|
|
58174
|
-
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
59277
|
+
}), method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
|
|
58175
59278
|
kind: "mutation",
|
|
58176
59279
|
auth: "protected"
|
|
58177
|
-
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
59280
|
+
}), method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
|
|
58178
59281
|
kind: "mutation",
|
|
58179
59282
|
auth: "protected"
|
|
58180
59283
|
}), method(object({
|
|
58181
|
-
deviceId: DeviceIdSchema,
|
|
59284
|
+
deviceId: DeviceIdSchema$1,
|
|
58182
59285
|
program: string().min(1)
|
|
58183
59286
|
}), _void(), {
|
|
58184
59287
|
kind: "mutation",
|
|
58185
59288
|
auth: "protected"
|
|
58186
59289
|
}), method(object({
|
|
58187
|
-
deviceId: DeviceIdSchema,
|
|
59290
|
+
deviceId: DeviceIdSchema$1,
|
|
58188
59291
|
on: boolean()
|
|
58189
59292
|
}), _void(), {
|
|
58190
59293
|
kind: "mutation",
|
|
58191
59294
|
auth: "protected"
|
|
58192
59295
|
}), method(object({
|
|
58193
|
-
deviceId: DeviceIdSchema,
|
|
59296
|
+
deviceId: DeviceIdSchema$1,
|
|
58194
59297
|
on: boolean()
|
|
58195
59298
|
}), _void(), {
|
|
58196
59299
|
kind: "mutation",
|
|
58197
59300
|
auth: "protected"
|
|
58198
59301
|
}), method(object({
|
|
58199
|
-
deviceId: DeviceIdSchema,
|
|
59302
|
+
deviceId: DeviceIdSchema$1,
|
|
58200
59303
|
on: boolean()
|
|
58201
59304
|
}), _void(), {
|
|
58202
59305
|
kind: "mutation",
|
|
58203
59306
|
auth: "protected"
|
|
58204
59307
|
}), method(object({
|
|
58205
|
-
deviceId: DeviceIdSchema,
|
|
59308
|
+
deviceId: DeviceIdSchema$1,
|
|
58206
59309
|
on: boolean()
|
|
58207
59310
|
}), _void(), {
|
|
58208
59311
|
kind: "mutation",
|
|
58209
59312
|
auth: "protected"
|
|
58210
59313
|
}), method(object({
|
|
58211
|
-
deviceId: DeviceIdSchema,
|
|
59314
|
+
deviceId: DeviceIdSchema$1,
|
|
58212
59315
|
on: boolean()
|
|
58213
59316
|
}), _void(), {
|
|
58214
59317
|
kind: "mutation",
|
|
58215
59318
|
auth: "protected"
|
|
58216
59319
|
}), method(object({
|
|
58217
|
-
deviceId: DeviceIdSchema,
|
|
59320
|
+
deviceId: DeviceIdSchema$1,
|
|
58218
59321
|
on: boolean()
|
|
58219
59322
|
}), _void(), {
|
|
58220
59323
|
kind: "mutation",
|
|
58221
59324
|
auth: "protected"
|
|
58222
59325
|
}), method(object({
|
|
58223
|
-
deviceId: DeviceIdSchema,
|
|
59326
|
+
deviceId: DeviceIdSchema$1,
|
|
58224
59327
|
on: boolean()
|
|
58225
59328
|
}), _void(), {
|
|
58226
59329
|
kind: "mutation",
|
|
58227
59330
|
auth: "protected"
|
|
58228
59331
|
}), method(object({
|
|
58229
|
-
deviceId: DeviceIdSchema,
|
|
59332
|
+
deviceId: DeviceIdSchema$1,
|
|
58230
59333
|
key: string().min(1),
|
|
58231
59334
|
value: DishwasherValueSchema
|
|
58232
59335
|
}), _void(), {
|
|
58233
59336
|
kind: "mutation",
|
|
58234
59337
|
auth: "protected"
|
|
58235
|
-
}), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
|
|
59338
|
+
}), method(object({ deviceId: DeviceIdSchema$1 }), DishwasherOptionsSchema, { auth: "protected" });
|
|
58236
59339
|
DeviceType.Camera;
|
|
58237
59340
|
object({
|
|
58238
59341
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
@@ -58671,7 +59774,7 @@ var FanDirectionSchema = _enum(["forward", "reverse"]);
|
|
|
58671
59774
|
object({
|
|
58672
59775
|
/** Active speed as 0..100 inclusive. Null when the device has no
|
|
58673
59776
|
* speed surface (single-speed fan). */
|
|
58674
|
-
|
|
59777
|
+
speed: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58675
59778
|
/** Speed granularity the device accepts (HA `percentage_step`, e.g. 25 for
|
|
58676
59779
|
* a 4-speed fan). Absent when unknown — the UI then falls back to step 1. */
|
|
58677
59780
|
percentageStep: number().positive().optional().meta(readingMeta("percentage")),
|
|
@@ -58691,7 +59794,7 @@ object({
|
|
|
58691
59794
|
});
|
|
58692
59795
|
DeviceType.Fan, method(object({
|
|
58693
59796
|
deviceId: number().int().nonnegative(),
|
|
58694
|
-
|
|
59797
|
+
speed: number().min(0).max(100)
|
|
58695
59798
|
}), _void(), {
|
|
58696
59799
|
kind: "mutation",
|
|
58697
59800
|
auth: "protected"
|
|
@@ -58874,7 +59977,7 @@ DeviceType.Humidifier, method(object({
|
|
|
58874
59977
|
});
|
|
58875
59978
|
object({
|
|
58876
59979
|
/** Current relative humidity, 0..100. `null` when the sample was refused (D393). */
|
|
58877
|
-
|
|
59980
|
+
humidity: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
|
|
58878
59981
|
precision: 0,
|
|
58879
59982
|
label: "Humidity"
|
|
58880
59983
|
})),
|
|
@@ -59317,7 +60420,7 @@ object({
|
|
|
59317
60420
|
batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59318
60421
|
/** 0..100 mowing-completion percentage of the current task, or null when no
|
|
59319
60422
|
* task is active / progress is unavailable. */
|
|
59320
|
-
|
|
60423
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59321
60424
|
/** Current device/event code (dynamic — mostly status, sometimes an error),
|
|
59322
60425
|
* or null when unknown. */
|
|
59323
60426
|
currentCode: number().nullable().meta(readingMeta("none")),
|
|
@@ -59789,9 +60892,35 @@ var MediaInfoSchema = object({
|
|
|
59789
60892
|
/** Optional cover-art / thumbnail URL. */
|
|
59790
60893
|
imageUrl: string().optional()
|
|
59791
60894
|
});
|
|
60895
|
+
/**
|
|
60896
|
+
* Where `state`, `volumeLevel`, `isMuted` and `source` come from. `reported`:
|
|
60897
|
+
* the device said so. `assumed`: the driver has no feedback (infrared) and
|
|
60898
|
+
* tracks what it last SENT; it moves only after a send was accepted, and a
|
|
60899
|
+
* human at the real remote makes it wrong. A UI shows an assumed value as a
|
|
60900
|
+
* guess, never as a reading.
|
|
60901
|
+
*/
|
|
60902
|
+
var MediaPlayerStateSourceSchema = _enum(["reported", "assumed"]);
|
|
60903
|
+
/** The fields of a media-player status a driver can only guess. */
|
|
60904
|
+
var MediaPlayerAssumedFieldSchema = _enum([
|
|
60905
|
+
"state",
|
|
60906
|
+
"volumeLevel",
|
|
60907
|
+
"isMuted",
|
|
60908
|
+
"source"
|
|
60909
|
+
]);
|
|
59792
60910
|
object({
|
|
59793
60911
|
/** Playback lifecycle state. */
|
|
59794
60912
|
state: MediaPlayerStateSchema,
|
|
60913
|
+
/**
|
|
60914
|
+
* Whether the state fields are readings or the driver's own bookkeeping.
|
|
60915
|
+
* A slice written before this field existed parses as `reported`.
|
|
60916
|
+
*/
|
|
60917
|
+
stateSource: MediaPlayerStateSourceSchema.default("reported"),
|
|
60918
|
+
/**
|
|
60919
|
+
* Which fields are the driver's own guess. `stateSource` is `assumed` when
|
|
60920
|
+
* this is not empty; a field not listed here is a reading even then (power
|
|
60921
|
+
* from a running-state source, mute guessed from the last send).
|
|
60922
|
+
*/
|
|
60923
|
+
assumedFields: array(MediaPlayerAssumedFieldSchema).default([]),
|
|
59795
60924
|
/** Volume as 0..100 inclusive. Null when the device has no volume
|
|
59796
60925
|
* surface. Pair with `DeviceFeature.MediaPlayerVolume`. */
|
|
59797
60926
|
volumeLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
@@ -59807,10 +60936,10 @@ object({
|
|
|
59807
60936
|
currentMedia: MediaInfoSchema.nullable(),
|
|
59808
60937
|
/** Current playback position in ms. Null when not seekable or
|
|
59809
60938
|
* nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
|
|
59810
|
-
|
|
60939
|
+
position: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59811
60940
|
/** Total duration of the current media in ms. Null when unknown
|
|
59812
60941
|
* (live stream) or nothing is playing. */
|
|
59813
|
-
|
|
60942
|
+
duration: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59814
60943
|
/** Shuffle toggle. Null when no shuffle surface.
|
|
59815
60944
|
* Pair with `DeviceFeature.MediaPlayerShuffle`. */
|
|
59816
60945
|
shuffle: boolean().nullable(),
|
|
@@ -59837,7 +60966,7 @@ DeviceType.MediaPlayer, method(object({ deviceId: number().int().nonnegative() }
|
|
|
59837
60966
|
auth: "protected"
|
|
59838
60967
|
}), method(object({
|
|
59839
60968
|
deviceId: number().int().nonnegative(),
|
|
59840
|
-
|
|
60969
|
+
position: number().int().nonnegative()
|
|
59841
60970
|
}), _void(), {
|
|
59842
60971
|
kind: "mutation",
|
|
59843
60972
|
auth: "protected"
|
|
@@ -60510,9 +61639,9 @@ var NetworkLinkStatusSchema = object({
|
|
|
60510
61639
|
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
60511
61640
|
* SKIP a null rather than coerce it.
|
|
60512
61641
|
*/
|
|
60513
|
-
|
|
61642
|
+
signal: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
60514
61643
|
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
60515
|
-
|
|
61644
|
+
rssi: number().optional().meta(readingMeta("signal-level")),
|
|
60516
61645
|
/** Network name of a wireless link, when the firmware reports it. */
|
|
60517
61646
|
ssid: string().optional(),
|
|
60518
61647
|
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
@@ -60644,7 +61773,8 @@ var TopologyNodeSchema = object({
|
|
|
60644
61773
|
isHub: boolean(),
|
|
60645
61774
|
isOnline: boolean(),
|
|
60646
61775
|
cpuPercent: number(),
|
|
60647
|
-
|
|
61776
|
+
/** `null` when the node's memory read failed or it has not reported one (D393). */
|
|
61777
|
+
memoryPercent: number().nullable(),
|
|
60648
61778
|
uptime: number(),
|
|
60649
61779
|
lastSeen: string(),
|
|
60650
61780
|
localIps: array(string()).readonly(),
|
|
@@ -61173,10 +62303,21 @@ var PetFeederDeviceStatusSchema = _enum([
|
|
|
61173
62303
|
]);
|
|
61174
62304
|
var gramsPortion = number().int().min(4).max(200);
|
|
61175
62305
|
object({
|
|
61176
|
-
/** Food
|
|
61177
|
-
*
|
|
61178
|
-
* bowl
|
|
62306
|
+
/** Food in the TANK (hopper), as the feeder's own sensor reports it
|
|
62307
|
+
* (`state.food`). A coarse level code, not grams — `0` is empty. The
|
|
62308
|
+
* amount in the bowl is `bowlFood`. On dual-hopper models this is the
|
|
62309
|
+
* combined reading; per-hopper levels live in `food1`/`food2`. Null when
|
|
62310
|
+
* the device has not reported yet. */
|
|
61179
62311
|
foodLevel: number().nullable().meta(readingMeta("none")),
|
|
62312
|
+
/** Food in the BOWL, a mass (stored in kilograms, D944). Reported only by a
|
|
62313
|
+
* feeder with a bowl scale; null when the model has none or its reading is
|
|
62314
|
+
* of an unproven unit. */
|
|
62315
|
+
bowlFood: number().nullable().meta(readingMeta("mass")),
|
|
62316
|
+
/** True while the pet is eating (`state.eating`). */
|
|
62317
|
+
eating: boolean(),
|
|
62318
|
+
/** Whether `markFoodReplenished` does anything on this model. When false
|
|
62319
|
+
* the client must not offer it. */
|
|
62320
|
+
supportsMarkRefilled: boolean(),
|
|
61180
62321
|
/** Hopper-1 food level (grams) on dual-hopper feeders; null on
|
|
61181
62322
|
* single-hopper models. */
|
|
61182
62323
|
food1: number().nullable().meta(readingMeta("none")),
|
|
@@ -61184,12 +62325,17 @@ object({
|
|
|
61184
62325
|
* single-hopper models. */
|
|
61185
62326
|
food2: number().nullable().meta(readingMeta("none")),
|
|
61186
62327
|
/** Derived low-food flag — mirrors the HA `food_level` binary_sensor
|
|
61187
|
-
* (`device_class: problem`, on = low). True when the
|
|
61188
|
-
*
|
|
62328
|
+
* (`device_class: problem`, on = low). True when the tank reports empty,
|
|
62329
|
+
* or, on a dual-hopper model, when EITHER hopper is empty. */
|
|
61189
62330
|
lowFood: boolean(),
|
|
61190
|
-
/** Battery charge 0..100 (%).
|
|
61191
|
-
*
|
|
62331
|
+
/** Battery charge 0..100 (%). On a feeder running on `mains` this is the
|
|
62332
|
+
* BACKUP battery's charge, not the power source. Null when the device has
|
|
62333
|
+
* no battery reading. */
|
|
61192
62334
|
batteryPower: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
62335
|
+
/** What the feeder is powered from right now: `mains` (plugged in, the
|
|
62336
|
+
* battery is only a backup) or `battery`. Null when the device does not
|
|
62337
|
+
* report it. */
|
|
62338
|
+
powerSource: _enum(["mains", "battery"]).nullable(),
|
|
61193
62339
|
/**
|
|
61194
62340
|
* Desiccant life remaining, stored in seconds (duration base, D944).
|
|
61195
62341
|
* Providers convert from the days the feeder reports. Null when the
|
|
@@ -61217,6 +62363,14 @@ object({
|
|
|
61217
62363
|
feedSound: boolean(),
|
|
61218
62364
|
/** Speaker / prompt volume level (device-scaled integer). */
|
|
61219
62365
|
volume: number().meta(readingMeta("none")),
|
|
62366
|
+
/** Portion (grams) of the last manual feed sent from a single-hopper
|
|
62367
|
+
* stepper — the default the next manual feed starts from. Persisted per
|
|
62368
|
+
* device by the provider; null until a manual feed has been sent. */
|
|
62369
|
+
lastFeedGrams: gramsPortion.nullable(),
|
|
62370
|
+
/** Hopper-1 portion of the last manual feed (dual-hopper); null until sent. */
|
|
62371
|
+
lastFeedHopper1: gramsPortion.nullable(),
|
|
62372
|
+
/** Hopper-2 portion of the last manual feed (dual-hopper); null until sent. */
|
|
62373
|
+
lastFeedHopper2: gramsPortion.nullable(),
|
|
61220
62374
|
/** Ms epoch when the slice was last refreshed from the cloud. */
|
|
61221
62375
|
lastFetchedAt: number()
|
|
61222
62376
|
});
|
|
@@ -61271,6 +62425,64 @@ DeviceType.PetFeeder, method(object({
|
|
|
61271
62425
|
kind: "mutation",
|
|
61272
62426
|
auth: "protected"
|
|
61273
62427
|
});
|
|
62428
|
+
object({
|
|
62429
|
+
/** Water in the tank, 0..100 (%). Null while the source has not reported. */
|
|
62430
|
+
waterLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
62431
|
+
/** Water in the tank, in litres. Null while the source has not reported. */
|
|
62432
|
+
waterVolume: number().min(0).nullable().meta(readingMeta("volume")),
|
|
62433
|
+
/** True when the tank is empty. Null while unknown. */
|
|
62434
|
+
empty: boolean().nullable(),
|
|
62435
|
+
/** True while the pump is running. Null while unknown. */
|
|
62436
|
+
pumpRunning: boolean().nullable(),
|
|
62437
|
+
/** True when the pump works on an on/off duty cycle rather than continuously. */
|
|
62438
|
+
pumpIntervalEnabled: boolean().nullable(),
|
|
62439
|
+
/** How long the pump runs per cycle, in seconds. */
|
|
62440
|
+
pumpOnTime: number().min(0).nullable().meta(readingMeta("duration")),
|
|
62441
|
+
/** How long the pump rests per cycle, in seconds. */
|
|
62442
|
+
pumpOffTime: number().min(0).nullable().meta(readingMeta("duration")),
|
|
62443
|
+
/** Water drunk in the last drink, in litres. */
|
|
62444
|
+
lastDrink: number().min(0).nullable().meta(readingMeta("volume")),
|
|
62445
|
+
/** Water drunk in the current hour, in litres. */
|
|
62446
|
+
currentHourDrink: number().min(0).nullable().meta(readingMeta("volume")),
|
|
62447
|
+
/** Water drunk over the last 24 hours (rolling), in litres. */
|
|
62448
|
+
last24hDrink: number().min(0).nullable().meta(readingMeta("volume")),
|
|
62449
|
+
/** Water drunk since local midnight, in litres. */
|
|
62450
|
+
todayDrink: number().min(0).nullable().meta(readingMeta("volume")),
|
|
62451
|
+
/** Decoded fault message. Null means healthy; a non-null string is an active fault. */
|
|
62452
|
+
error: string().nullable(),
|
|
62453
|
+
/** Ms epoch when the slice was last refreshed. */
|
|
62454
|
+
lastFetchedAt: number()
|
|
62455
|
+
});
|
|
62456
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
62457
|
+
var MinutesSchema = number().int().min(0);
|
|
62458
|
+
DeviceType.PetFountain, method(object({
|
|
62459
|
+
deviceId: DeviceIdSchema,
|
|
62460
|
+
on: boolean()
|
|
62461
|
+
}), _void(), {
|
|
62462
|
+
kind: "mutation",
|
|
62463
|
+
auth: "protected"
|
|
62464
|
+
}), method(object({
|
|
62465
|
+
deviceId: DeviceIdSchema,
|
|
62466
|
+
on: boolean()
|
|
62467
|
+
}), _void(), {
|
|
62468
|
+
kind: "mutation",
|
|
62469
|
+
auth: "protected"
|
|
62470
|
+
}), method(object({
|
|
62471
|
+
deviceId: DeviceIdSchema,
|
|
62472
|
+
minutes: MinutesSchema
|
|
62473
|
+
}), _void(), {
|
|
62474
|
+
kind: "mutation",
|
|
62475
|
+
auth: "protected"
|
|
62476
|
+
}), method(object({
|
|
62477
|
+
deviceId: DeviceIdSchema,
|
|
62478
|
+
minutes: MinutesSchema
|
|
62479
|
+
}), _void(), {
|
|
62480
|
+
kind: "mutation",
|
|
62481
|
+
auth: "protected"
|
|
62482
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
62483
|
+
kind: "mutation",
|
|
62484
|
+
auth: "protected"
|
|
62485
|
+
});
|
|
61274
62486
|
var VehicleSchema = object({
|
|
61275
62487
|
id: string(),
|
|
61276
62488
|
name: string(),
|
|
@@ -61652,16 +62864,16 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
|
|
|
61652
62864
|
auth: "admin"
|
|
61653
62865
|
});
|
|
61654
62866
|
object({
|
|
61655
|
-
/** Instantaneous power draw
|
|
61656
|
-
|
|
62867
|
+
/** Instantaneous power draw (watts). */
|
|
62868
|
+
power: number().optional().meta(readingMeta("power", { label: "Power" })),
|
|
61657
62869
|
/** Cumulative energy in kilowatt-hours since the meter was reset. */
|
|
61658
|
-
|
|
61659
|
-
/** Voltage
|
|
61660
|
-
|
|
62870
|
+
energy: number().optional().meta(readingMeta("energy", { label: "Energy" })),
|
|
62871
|
+
/** Voltage (volts). */
|
|
62872
|
+
voltage: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
61661
62873
|
/** Current in amperes. */
|
|
61662
|
-
|
|
62874
|
+
current: number().optional().meta(readingMeta("current", { label: "Current" })),
|
|
61663
62875
|
/** Apparent power in volt-amperes. */
|
|
61664
|
-
|
|
62876
|
+
apparentPower: number().optional().meta(readingMeta("apparent-power")),
|
|
61665
62877
|
/** Power factor (0..1) if reported. */
|
|
61666
62878
|
powerFactor: number().min(0).max(1).optional().meta(readingMeta("ratio")),
|
|
61667
62879
|
/** Ms epoch when the slice was last updated. */
|
|
@@ -61716,16 +62928,13 @@ object({
|
|
|
61716
62928
|
location: string().nullable(),
|
|
61717
62929
|
/** GPS coordinates when available. Null otherwise. */
|
|
61718
62930
|
gps: GpsLocationSchema.nullable(),
|
|
61719
|
-
/** Optional battery level of the tracking device (0..100). Null
|
|
61720
|
-
* when not reported. */
|
|
61721
|
-
batteryPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
61722
62931
|
/** Ms epoch when the slice was last updated. */
|
|
61723
62932
|
lastChangedAt: number()
|
|
61724
62933
|
});
|
|
61725
62934
|
DeviceType.Presence;
|
|
61726
62935
|
object({
|
|
61727
62936
|
/** Current pressure in hPa. `null` when the sample was refused (D393). */
|
|
61728
|
-
|
|
62937
|
+
pressure: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
|
|
61729
62938
|
/** Ms epoch when the slice was last updated. */
|
|
61730
62939
|
lastFetchedAt: number()
|
|
61731
62940
|
});
|
|
@@ -64735,7 +65944,7 @@ object({
|
|
|
64735
65944
|
DeviceType.Sensor;
|
|
64736
65945
|
object({
|
|
64737
65946
|
/** Current temperature in Celsius. `null` when the sample was refused (D393). */
|
|
64738
|
-
|
|
65947
|
+
temperature: number().nullable().meta(readingMeta("temperature", {
|
|
64739
65948
|
precision: 1,
|
|
64740
65949
|
label: "Temperature"
|
|
64741
65950
|
})),
|
|
@@ -64999,7 +66208,7 @@ object({
|
|
|
64999
66208
|
/** Speed tokens the hardware accepts — drives the UI selector. */
|
|
65000
66209
|
availableFanSpeeds: array(string()),
|
|
65001
66210
|
/** 0..100 cleaning-completion percentage of the current task, or null. */
|
|
65002
|
-
|
|
66211
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
65003
66212
|
/** Current error code (0 / null = no error). */
|
|
65004
66213
|
errorCode: number().nullable().meta(readingMeta("none")),
|
|
65005
66214
|
/** Human label for {@link errorCode}, or null when none / undecodable. */
|
|
@@ -65868,9 +67077,17 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
|
|
|
65868
67077
|
kind: "mutation",
|
|
65869
67078
|
auth: "admin"
|
|
65870
67079
|
});
|
|
67080
|
+
discriminatedUnion("kind", [object({
|
|
67081
|
+
kind: literal("raw"),
|
|
67082
|
+
timings: array(number().int()),
|
|
67083
|
+
settings: TransmitSettingsSchema.optional()
|
|
67084
|
+
}), object({
|
|
67085
|
+
kind: literal("pronto"),
|
|
67086
|
+
code: string()
|
|
67087
|
+
})]);
|
|
65871
67088
|
DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
|
|
65872
67089
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
65873
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
67090
|
+
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;
|
|
65874
67091
|
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
65875
67092
|
DeviceRole.BinarySensor, DeviceRole.MotionSensor;
|
|
65876
67093
|
new Set(CAP_NAMES);
|
|
@@ -65923,7 +67140,7 @@ var AccessoryKind = {
|
|
|
65923
67140
|
PrivacyMask: DeviceRole.PrivacyMask
|
|
65924
67141
|
};
|
|
65925
67142
|
AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
|
|
65926
|
-
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;
|
|
67143
|
+
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;
|
|
65927
67144
|
new Set(Object.values(DeviceType));
|
|
65928
67145
|
Object.freeze({
|
|
65929
67146
|
"accessories.getStatus": {
|
|
@@ -65940,6 +67157,104 @@ Object.freeze({
|
|
|
65940
67157
|
access: "create",
|
|
65941
67158
|
role: "admin"
|
|
65942
67159
|
},
|
|
67160
|
+
"actions.create": {
|
|
67161
|
+
capName: "actions",
|
|
67162
|
+
capScope: "system",
|
|
67163
|
+
addonId: null,
|
|
67164
|
+
access: "create",
|
|
67165
|
+
role: "admin"
|
|
67166
|
+
},
|
|
67167
|
+
"actions.delete": {
|
|
67168
|
+
capName: "actions",
|
|
67169
|
+
capScope: "system",
|
|
67170
|
+
addonId: null,
|
|
67171
|
+
access: "delete",
|
|
67172
|
+
role: "admin"
|
|
67173
|
+
},
|
|
67174
|
+
"actions.get": {
|
|
67175
|
+
capName: "actions",
|
|
67176
|
+
capScope: "system",
|
|
67177
|
+
addonId: null,
|
|
67178
|
+
access: "view",
|
|
67179
|
+
role: "viewer"
|
|
67180
|
+
},
|
|
67181
|
+
"actions.getLinks": {
|
|
67182
|
+
capName: "actions",
|
|
67183
|
+
capScope: "system",
|
|
67184
|
+
addonId: null,
|
|
67185
|
+
access: "view",
|
|
67186
|
+
role: "admin"
|
|
67187
|
+
},
|
|
67188
|
+
"actions.getTraces": {
|
|
67189
|
+
capName: "actions",
|
|
67190
|
+
capScope: "system",
|
|
67191
|
+
addonId: null,
|
|
67192
|
+
access: "view",
|
|
67193
|
+
role: "admin"
|
|
67194
|
+
},
|
|
67195
|
+
"actions.list": {
|
|
67196
|
+
capName: "actions",
|
|
67197
|
+
capScope: "system",
|
|
67198
|
+
addonId: null,
|
|
67199
|
+
access: "view",
|
|
67200
|
+
role: "admin"
|
|
67201
|
+
},
|
|
67202
|
+
"actions.listForCamera": {
|
|
67203
|
+
capName: "actions",
|
|
67204
|
+
capScope: "system",
|
|
67205
|
+
addonId: null,
|
|
67206
|
+
access: "view",
|
|
67207
|
+
role: "viewer"
|
|
67208
|
+
},
|
|
67209
|
+
"actions.run": {
|
|
67210
|
+
capName: "actions",
|
|
67211
|
+
capScope: "system",
|
|
67212
|
+
addonId: null,
|
|
67213
|
+
access: "create",
|
|
67214
|
+
role: "viewer"
|
|
67215
|
+
},
|
|
67216
|
+
"actions.setLinks": {
|
|
67217
|
+
capName: "actions",
|
|
67218
|
+
capScope: "system",
|
|
67219
|
+
addonId: null,
|
|
67220
|
+
access: "create",
|
|
67221
|
+
role: "admin"
|
|
67222
|
+
},
|
|
67223
|
+
"actions.stop": {
|
|
67224
|
+
capName: "actions",
|
|
67225
|
+
capScope: "system",
|
|
67226
|
+
addonId: null,
|
|
67227
|
+
access: "create",
|
|
67228
|
+
role: "admin"
|
|
67229
|
+
},
|
|
67230
|
+
"actions.update": {
|
|
67231
|
+
capName: "actions",
|
|
67232
|
+
capScope: "system",
|
|
67233
|
+
addonId: null,
|
|
67234
|
+
access: "create",
|
|
67235
|
+
role: "admin"
|
|
67236
|
+
},
|
|
67237
|
+
"actionSource.listActions": {
|
|
67238
|
+
capName: "action-source",
|
|
67239
|
+
capScope: "system",
|
|
67240
|
+
addonId: null,
|
|
67241
|
+
access: "view",
|
|
67242
|
+
role: "admin"
|
|
67243
|
+
},
|
|
67244
|
+
"actionSource.runAction": {
|
|
67245
|
+
capName: "action-source",
|
|
67246
|
+
capScope: "system",
|
|
67247
|
+
addonId: null,
|
|
67248
|
+
access: "create",
|
|
67249
|
+
role: "admin"
|
|
67250
|
+
},
|
|
67251
|
+
"actionSource.stopAction": {
|
|
67252
|
+
capName: "action-source",
|
|
67253
|
+
capScope: "system",
|
|
67254
|
+
addonId: null,
|
|
67255
|
+
access: "create",
|
|
67256
|
+
role: "admin"
|
|
67257
|
+
},
|
|
65943
67258
|
"addonPages.listPages": {
|
|
65944
67259
|
capName: "addon-pages",
|
|
65945
67260
|
capScope: "system",
|
|
@@ -67221,6 +68536,13 @@ Object.freeze({
|
|
|
67221
68536
|
access: "view",
|
|
67222
68537
|
role: "admin"
|
|
67223
68538
|
},
|
|
68539
|
+
"coreBlocks.getAutomationRunState": {
|
|
68540
|
+
capName: "core-blocks",
|
|
68541
|
+
capScope: "system",
|
|
68542
|
+
addonId: null,
|
|
68543
|
+
access: "view",
|
|
68544
|
+
role: "admin"
|
|
68545
|
+
},
|
|
67224
68546
|
"coreBlocks.getBlockSettings": {
|
|
67225
68547
|
capName: "core-blocks",
|
|
67226
68548
|
capScope: "system",
|
|
@@ -67242,6 +68564,13 @@ Object.freeze({
|
|
|
67242
68564
|
access: "view",
|
|
67243
68565
|
role: "admin"
|
|
67244
68566
|
},
|
|
68567
|
+
"coreBlocks.getTraces": {
|
|
68568
|
+
capName: "core-blocks",
|
|
68569
|
+
capScope: "system",
|
|
68570
|
+
addonId: null,
|
|
68571
|
+
access: "view",
|
|
68572
|
+
role: "admin"
|
|
68573
|
+
},
|
|
67245
68574
|
"coreBlocks.getTypeDefs": {
|
|
67246
68575
|
capName: "core-blocks",
|
|
67247
68576
|
capScope: "system",
|
|
@@ -67277,6 +68606,13 @@ Object.freeze({
|
|
|
67277
68606
|
access: "create",
|
|
67278
68607
|
role: "admin"
|
|
67279
68608
|
},
|
|
68609
|
+
"coreBlocks.reportAutomationRun": {
|
|
68610
|
+
capName: "core-blocks",
|
|
68611
|
+
capScope: "system",
|
|
68612
|
+
addonId: null,
|
|
68613
|
+
access: "create",
|
|
68614
|
+
role: "admin"
|
|
68615
|
+
},
|
|
67280
68616
|
"coreBlocks.restart": {
|
|
67281
68617
|
capName: "core-blocks",
|
|
67282
68618
|
capScope: "system",
|
|
@@ -67739,6 +69075,13 @@ Object.freeze({
|
|
|
67739
69075
|
access: "create",
|
|
67740
69076
|
role: "admin"
|
|
67741
69077
|
},
|
|
69078
|
+
"deviceExport.exposeEntity": {
|
|
69079
|
+
capName: "device-export",
|
|
69080
|
+
capScope: "system",
|
|
69081
|
+
addonId: null,
|
|
69082
|
+
access: "create",
|
|
69083
|
+
role: "admin"
|
|
69084
|
+
},
|
|
67742
69085
|
"deviceExport.getDeviceLiveContribution": {
|
|
67743
69086
|
capName: "device-export",
|
|
67744
69087
|
capScope: "system",
|
|
@@ -67767,6 +69110,13 @@ Object.freeze({
|
|
|
67767
69110
|
access: "view",
|
|
67768
69111
|
role: "admin"
|
|
67769
69112
|
},
|
|
69113
|
+
"deviceExport.listExposedEntities": {
|
|
69114
|
+
capName: "device-export",
|
|
69115
|
+
capScope: "system",
|
|
69116
|
+
addonId: null,
|
|
69117
|
+
access: "view",
|
|
69118
|
+
role: "admin"
|
|
69119
|
+
},
|
|
67770
69120
|
"deviceExport.listSupportedDeviceKinds": {
|
|
67771
69121
|
capName: "device-export",
|
|
67772
69122
|
capScope: "system",
|
|
@@ -67774,6 +69124,13 @@ Object.freeze({
|
|
|
67774
69124
|
access: "view",
|
|
67775
69125
|
role: "admin"
|
|
67776
69126
|
},
|
|
69127
|
+
"deviceExport.listSupportedEntityKinds": {
|
|
69128
|
+
capName: "device-export",
|
|
69129
|
+
capScope: "system",
|
|
69130
|
+
addonId: null,
|
|
69131
|
+
access: "view",
|
|
69132
|
+
role: "admin"
|
|
69133
|
+
},
|
|
67777
69134
|
"deviceExport.unexposeDevice": {
|
|
67778
69135
|
capName: "device-export",
|
|
67779
69136
|
capScope: "system",
|
|
@@ -67781,6 +69138,13 @@ Object.freeze({
|
|
|
67781
69138
|
access: "create",
|
|
67782
69139
|
role: "admin"
|
|
67783
69140
|
},
|
|
69141
|
+
"deviceExport.unexposeEntity": {
|
|
69142
|
+
capName: "device-export",
|
|
69143
|
+
capScope: "system",
|
|
69144
|
+
addonId: null,
|
|
69145
|
+
access: "create",
|
|
69146
|
+
role: "admin"
|
|
69147
|
+
},
|
|
67784
69148
|
"deviceExtension.listCandidates": {
|
|
67785
69149
|
capName: "device-extension",
|
|
67786
69150
|
capScope: "device",
|
|
@@ -69356,6 +70720,20 @@ Object.freeze({
|
|
|
69356
70720
|
access: "create",
|
|
69357
70721
|
role: "viewer"
|
|
69358
70722
|
},
|
|
70723
|
+
"irTransmitter.getInfo": {
|
|
70724
|
+
capName: "ir-transmitter",
|
|
70725
|
+
capScope: "device",
|
|
70726
|
+
addonId: null,
|
|
70727
|
+
access: "view",
|
|
70728
|
+
role: "viewer"
|
|
70729
|
+
},
|
|
70730
|
+
"irTransmitter.send": {
|
|
70731
|
+
capName: "ir-transmitter",
|
|
70732
|
+
capScope: "device",
|
|
70733
|
+
addonId: null,
|
|
70734
|
+
access: "create",
|
|
70735
|
+
role: "viewer"
|
|
70736
|
+
},
|
|
69359
70737
|
"keychain.delete": {
|
|
69360
70738
|
capName: "keychain",
|
|
69361
70739
|
capScope: "system",
|
|
@@ -70588,6 +71966,13 @@ Object.freeze({
|
|
|
70588
71966
|
access: "create",
|
|
70589
71967
|
role: "admin"
|
|
70590
71968
|
},
|
|
71969
|
+
"nodeRemovalHook.onNodeRemoved": {
|
|
71970
|
+
capName: "node-removal-hook",
|
|
71971
|
+
capScope: "system",
|
|
71972
|
+
addonId: null,
|
|
71973
|
+
access: "create",
|
|
71974
|
+
role: "admin"
|
|
71975
|
+
},
|
|
70591
71976
|
"nodes.clusterAddonStatus": {
|
|
70592
71977
|
capName: "nodes",
|
|
70593
71978
|
capScope: "system",
|
|
@@ -71225,6 +72610,48 @@ Object.freeze({
|
|
|
71225
72610
|
access: "create",
|
|
71226
72611
|
role: "viewer"
|
|
71227
72612
|
},
|
|
72613
|
+
"petFountain.getStatus": {
|
|
72614
|
+
capName: "pet-fountain",
|
|
72615
|
+
capScope: "device",
|
|
72616
|
+
addonId: null,
|
|
72617
|
+
access: "view",
|
|
72618
|
+
role: "viewer"
|
|
72619
|
+
},
|
|
72620
|
+
"petFountain.resetDailyConsumption": {
|
|
72621
|
+
capName: "pet-fountain",
|
|
72622
|
+
capScope: "device",
|
|
72623
|
+
addonId: null,
|
|
72624
|
+
access: "delete",
|
|
72625
|
+
role: "viewer"
|
|
72626
|
+
},
|
|
72627
|
+
"petFountain.setPump": {
|
|
72628
|
+
capName: "pet-fountain",
|
|
72629
|
+
capScope: "device",
|
|
72630
|
+
addonId: null,
|
|
72631
|
+
access: "create",
|
|
72632
|
+
role: "viewer"
|
|
72633
|
+
},
|
|
72634
|
+
"petFountain.setPumpInterval": {
|
|
72635
|
+
capName: "pet-fountain",
|
|
72636
|
+
capScope: "device",
|
|
72637
|
+
addonId: null,
|
|
72638
|
+
access: "create",
|
|
72639
|
+
role: "viewer"
|
|
72640
|
+
},
|
|
72641
|
+
"petFountain.setPumpOffMinutes": {
|
|
72642
|
+
capName: "pet-fountain",
|
|
72643
|
+
capScope: "device",
|
|
72644
|
+
addonId: null,
|
|
72645
|
+
access: "create",
|
|
72646
|
+
role: "viewer"
|
|
72647
|
+
},
|
|
72648
|
+
"petFountain.setPumpOnMinutes": {
|
|
72649
|
+
capName: "pet-fountain",
|
|
72650
|
+
capScope: "device",
|
|
72651
|
+
addonId: null,
|
|
72652
|
+
access: "create",
|
|
72653
|
+
role: "viewer"
|
|
72654
|
+
},
|
|
71228
72655
|
"pipelineAnalytics.addRetrainFrameFromRecording": {
|
|
71229
72656
|
capName: "pipeline-analytics",
|
|
71230
72657
|
capScope: "device",
|
|
@@ -73479,6 +74906,41 @@ Object.freeze({
|
|
|
73479
74906
|
access: "create",
|
|
73480
74907
|
role: "admin"
|
|
73481
74908
|
},
|
|
74909
|
+
"remote.getConfig": {
|
|
74910
|
+
capName: "remote",
|
|
74911
|
+
capScope: "system",
|
|
74912
|
+
addonId: null,
|
|
74913
|
+
access: "view",
|
|
74914
|
+
role: "admin"
|
|
74915
|
+
},
|
|
74916
|
+
"remote.listCommands": {
|
|
74917
|
+
capName: "remote",
|
|
74918
|
+
capScope: "system",
|
|
74919
|
+
addonId: null,
|
|
74920
|
+
access: "view",
|
|
74921
|
+
role: "admin"
|
|
74922
|
+
},
|
|
74923
|
+
"remote.sendCommand": {
|
|
74924
|
+
capName: "remote",
|
|
74925
|
+
capScope: "system",
|
|
74926
|
+
addonId: null,
|
|
74927
|
+
access: "create",
|
|
74928
|
+
role: "admin"
|
|
74929
|
+
},
|
|
74930
|
+
"remote.sendMediaCommand": {
|
|
74931
|
+
capName: "remote",
|
|
74932
|
+
capScope: "system",
|
|
74933
|
+
addonId: null,
|
|
74934
|
+
access: "create",
|
|
74935
|
+
role: "admin"
|
|
74936
|
+
},
|
|
74937
|
+
"remote.setConfig": {
|
|
74938
|
+
capName: "remote",
|
|
74939
|
+
capScope: "system",
|
|
74940
|
+
addonId: null,
|
|
74941
|
+
access: "create",
|
|
74942
|
+
role: "admin"
|
|
74943
|
+
},
|
|
73482
74944
|
"runningState.getStatus": {
|
|
73483
74945
|
capName: "running-state",
|
|
73484
74946
|
capScope: "device",
|
|
@@ -73591,6 +75053,13 @@ Object.freeze({
|
|
|
73591
75053
|
access: "create",
|
|
73592
75054
|
role: "admin"
|
|
73593
75055
|
},
|
|
75056
|
+
"serverManagement.getLaunchOverrides": {
|
|
75057
|
+
capName: "server-management",
|
|
75058
|
+
capScope: "system",
|
|
75059
|
+
addonId: null,
|
|
75060
|
+
access: "view",
|
|
75061
|
+
role: "admin"
|
|
75062
|
+
},
|
|
73594
75063
|
"serverManagement.getServerPackageStatus": {
|
|
73595
75064
|
capName: "server-management",
|
|
73596
75065
|
capScope: "system",
|
|
@@ -73612,6 +75081,13 @@ Object.freeze({
|
|
|
73612
75081
|
access: "create",
|
|
73613
75082
|
role: "admin"
|
|
73614
75083
|
},
|
|
75084
|
+
"serverManagement.setLaunchOverrides": {
|
|
75085
|
+
capName: "server-management",
|
|
75086
|
+
capScope: "system",
|
|
75087
|
+
addonId: null,
|
|
75088
|
+
access: "create",
|
|
75089
|
+
role: "admin"
|
|
75090
|
+
},
|
|
73615
75091
|
"settingsStore.aggregate": {
|
|
73616
75092
|
capName: "settings-store",
|
|
73617
75093
|
capScope: "system",
|
|
@@ -74669,6 +76145,41 @@ Object.freeze({
|
|
|
74669
76145
|
access: "view",
|
|
74670
76146
|
role: "viewer"
|
|
74671
76147
|
},
|
|
76148
|
+
"template.create": {
|
|
76149
|
+
capName: "template",
|
|
76150
|
+
capScope: "system",
|
|
76151
|
+
addonId: null,
|
|
76152
|
+
access: "create",
|
|
76153
|
+
role: "admin"
|
|
76154
|
+
},
|
|
76155
|
+
"template.delete": {
|
|
76156
|
+
capName: "template",
|
|
76157
|
+
capScope: "system",
|
|
76158
|
+
addonId: null,
|
|
76159
|
+
access: "delete",
|
|
76160
|
+
role: "admin"
|
|
76161
|
+
},
|
|
76162
|
+
"template.get": {
|
|
76163
|
+
capName: "template",
|
|
76164
|
+
capScope: "system",
|
|
76165
|
+
addonId: null,
|
|
76166
|
+
access: "view",
|
|
76167
|
+
role: "admin"
|
|
76168
|
+
},
|
|
76169
|
+
"template.list": {
|
|
76170
|
+
capName: "template",
|
|
76171
|
+
capScope: "system",
|
|
76172
|
+
addonId: null,
|
|
76173
|
+
access: "view",
|
|
76174
|
+
role: "admin"
|
|
76175
|
+
},
|
|
76176
|
+
"template.update": {
|
|
76177
|
+
capName: "template",
|
|
76178
|
+
capScope: "system",
|
|
76179
|
+
addonId: null,
|
|
76180
|
+
access: "create",
|
|
76181
|
+
role: "admin"
|
|
76182
|
+
},
|
|
74672
76183
|
"terminalSession.adoptLegacyMonitor": {
|
|
74673
76184
|
capName: "terminal-session",
|
|
74674
76185
|
capScope: "system",
|
|
@@ -75850,7 +77361,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75850
77361
|
label: t("Full brightness", "Luminosità massima"),
|
|
75851
77362
|
phrase: t("Set {device} to full brightness", "Porta {device} alla massima luminosità"),
|
|
75852
77363
|
icon: "sun",
|
|
75853
|
-
args: {
|
|
77364
|
+
args: { level: 100 }
|
|
75854
77365
|
},
|
|
75855
77366
|
{
|
|
75856
77367
|
id: "brightness.half",
|
|
@@ -75858,7 +77369,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75858
77369
|
label: t("Half brightness", "Luminosità a metà"),
|
|
75859
77370
|
phrase: t("Dim {device} to half", "Abbassa {device} a metà luminosità"),
|
|
75860
77371
|
icon: "sun-dim",
|
|
75861
|
-
args: {
|
|
77372
|
+
args: { level: 50 }
|
|
75862
77373
|
},
|
|
75863
77374
|
{
|
|
75864
77375
|
id: "brightness.off",
|
|
@@ -75866,16 +77377,16 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75866
77377
|
label: t("Brightness off", "Luminosità a zero"),
|
|
75867
77378
|
phrase: t("Dim {device} to zero", "Abbassa {device} a zero"),
|
|
75868
77379
|
icon: "lightbulb-off",
|
|
75869
|
-
args: {
|
|
77380
|
+
args: { level: 0 }
|
|
75870
77381
|
},
|
|
75871
77382
|
{
|
|
75872
77383
|
id: "brightness.set",
|
|
75873
77384
|
method: "setBrightness",
|
|
75874
77385
|
label: t("Set brightness", "Imposta la luminosità"),
|
|
75875
|
-
phrase: t("Set the brightness of {device} to {
|
|
77386
|
+
phrase: t("Set the brightness of {device} to {level}", "Imposta la luminosità di {device} a {level}"),
|
|
75876
77387
|
icon: "sun-medium",
|
|
75877
77388
|
openArgs: [{
|
|
75878
|
-
key: "
|
|
77389
|
+
key: "level",
|
|
75879
77390
|
label: PERCENT,
|
|
75880
77391
|
offer: {
|
|
75881
77392
|
kind: "number",
|
|
@@ -75889,13 +77400,13 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75889
77400
|
],
|
|
75890
77401
|
state: [{
|
|
75891
77402
|
kind: "numeric",
|
|
75892
|
-
field: "
|
|
77403
|
+
field: "level",
|
|
75893
77404
|
quantity: t("the brightness", "la luminosità"),
|
|
75894
77405
|
label: t("Brightness", "Luminosità"),
|
|
75895
77406
|
unit: "%",
|
|
75896
77407
|
icon: "sun"
|
|
75897
77408
|
}],
|
|
75898
|
-
events: { onBrightnessChanged: { notOperatorFacing: "the `
|
|
77409
|
+
events: { onBrightnessChanged: { notOperatorFacing: "the `level` state trigger reads the same change" } }
|
|
75899
77410
|
},
|
|
75900
77411
|
color: {
|
|
75901
77412
|
scope: "device",
|
|
@@ -75909,7 +77420,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75909
77420
|
icon: "sun",
|
|
75910
77421
|
args: { color: {
|
|
75911
77422
|
mode: "mired",
|
|
75912
|
-
|
|
77423
|
+
colorTemperature: 370
|
|
75913
77424
|
} }
|
|
75914
77425
|
},
|
|
75915
77426
|
{
|
|
@@ -75920,7 +77431,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75920
77431
|
icon: "snowflake",
|
|
75921
77432
|
args: { color: {
|
|
75922
77433
|
mode: "mired",
|
|
75923
|
-
|
|
77434
|
+
colorTemperature: 200
|
|
75924
77435
|
} }
|
|
75925
77436
|
},
|
|
75926
77437
|
{
|
|
@@ -76534,7 +78045,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76534
78045
|
label: t("Fan off", "Ventilatore spento"),
|
|
76535
78046
|
phrase: t("Stop {device}", "Ferma {device}"),
|
|
76536
78047
|
icon: "power-off",
|
|
76537
|
-
args: {
|
|
78048
|
+
args: { speed: 0 }
|
|
76538
78049
|
},
|
|
76539
78050
|
{
|
|
76540
78051
|
id: "fan.full",
|
|
@@ -76542,16 +78053,16 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76542
78053
|
label: t("Fan full", "Ventilatore al massimo"),
|
|
76543
78054
|
phrase: t("Run {device} at full speed", "Porta {device} alla massima velocità"),
|
|
76544
78055
|
icon: "fan",
|
|
76545
|
-
args: {
|
|
78056
|
+
args: { speed: 100 }
|
|
76546
78057
|
},
|
|
76547
78058
|
{
|
|
76548
78059
|
id: "fan.speed",
|
|
76549
78060
|
method: "setPercentage",
|
|
76550
78061
|
label: t("Set speed", "Imposta la velocità"),
|
|
76551
|
-
phrase: t("Set the speed of {device} to {
|
|
78062
|
+
phrase: t("Set the speed of {device} to {speed}", "Imposta la velocità di {device} al {speed}"),
|
|
76552
78063
|
icon: "fan",
|
|
76553
78064
|
openArgs: [{
|
|
76554
|
-
key: "
|
|
78065
|
+
key: "speed",
|
|
76555
78066
|
label: t("Speed", "Velocità"),
|
|
76556
78067
|
offer: {
|
|
76557
78068
|
kind: "number",
|
|
@@ -76613,7 +78124,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76613
78124
|
],
|
|
76614
78125
|
state: [{
|
|
76615
78126
|
kind: "numeric",
|
|
76616
|
-
field: "
|
|
78127
|
+
field: "speed",
|
|
76617
78128
|
quantity: t("the speed", "la velocità"),
|
|
76618
78129
|
label: t("Speed", "Velocità"),
|
|
76619
78130
|
unit: "%",
|
|
@@ -76979,6 +78490,11 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76979
78490
|
icon: "circle-dot"
|
|
76980
78491
|
}]
|
|
76981
78492
|
},
|
|
78493
|
+
"ir-transmitter": {
|
|
78494
|
+
scope: "device",
|
|
78495
|
+
noun: t("IR / RF transmitter", "Trasmettitore IR / RF"),
|
|
78496
|
+
notOperatorFacing: { send: "a raw pulse train is not something an operator composes in an automation; the remote that owns the command table sends it" }
|
|
78497
|
+
},
|
|
76982
78498
|
control: {
|
|
76983
78499
|
scope: "device",
|
|
76984
78500
|
noun: t("Control", "Controllo"),
|
|
@@ -77411,7 +78927,7 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77411
78927
|
},
|
|
77412
78928
|
{
|
|
77413
78929
|
kind: "numeric",
|
|
77414
|
-
field: "
|
|
78930
|
+
field: "progress",
|
|
77415
78931
|
quantity: t("the cycle progress", "l’avanzamento del lavaggio"),
|
|
77416
78932
|
label: t("Progress", "Avanzamento"),
|
|
77417
78933
|
unit: "%",
|
|
@@ -77632,6 +79148,100 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77632
79148
|
}
|
|
77633
79149
|
]
|
|
77634
79150
|
},
|
|
79151
|
+
"pet-fountain": {
|
|
79152
|
+
scope: "device",
|
|
79153
|
+
noun: t("Pet fountain", "Fontana per animali"),
|
|
79154
|
+
actions: [
|
|
79155
|
+
{
|
|
79156
|
+
id: "petFountain.pumpOn",
|
|
79157
|
+
method: "setPump",
|
|
79158
|
+
label: t("Pump on", "Pompa accesa"),
|
|
79159
|
+
phrase: t("Start the pump of {device}", "Avvia la pompa di {device}"),
|
|
79160
|
+
icon: "play",
|
|
79161
|
+
args: { on: true }
|
|
79162
|
+
},
|
|
79163
|
+
{
|
|
79164
|
+
id: "petFountain.pumpOff",
|
|
79165
|
+
method: "setPump",
|
|
79166
|
+
label: t("Pump off", "Pompa spenta"),
|
|
79167
|
+
phrase: t("Stop the pump of {device}", "Ferma la pompa di {device}"),
|
|
79168
|
+
icon: "square",
|
|
79169
|
+
args: { on: false }
|
|
79170
|
+
},
|
|
79171
|
+
{
|
|
79172
|
+
id: "petFountain.intervalOn",
|
|
79173
|
+
method: "setPumpInterval",
|
|
79174
|
+
label: t("Pump cycle on", "Ciclo pompa attivo"),
|
|
79175
|
+
phrase: t("Run the pump of {device} on its on/off cycle", "Fai lavorare la pompa di {device} a ciclo acceso/spento"),
|
|
79176
|
+
icon: "timer",
|
|
79177
|
+
args: { on: true }
|
|
79178
|
+
},
|
|
79179
|
+
{
|
|
79180
|
+
id: "petFountain.intervalOff",
|
|
79181
|
+
method: "setPumpInterval",
|
|
79182
|
+
label: t("Pump cycle off", "Ciclo pompa spento"),
|
|
79183
|
+
phrase: t("Run the pump of {device} continuously", "Fai lavorare la pompa di {device} in continuo"),
|
|
79184
|
+
icon: "timer-off",
|
|
79185
|
+
args: { on: false }
|
|
79186
|
+
},
|
|
79187
|
+
{
|
|
79188
|
+
id: "petFountain.pumpOnMinutes",
|
|
79189
|
+
method: "setPumpOnMinutes",
|
|
79190
|
+
label: t("Set pump run time", "Imposta il tempo di lavoro della pompa"),
|
|
79191
|
+
phrase: t("Set the pump of {device} to run {minutes} minutes per cycle", "Imposta la pompa di {device} a lavorare {minutes} minuti per ciclo"),
|
|
79192
|
+
icon: "timer",
|
|
79193
|
+
openArgs: [{
|
|
79194
|
+
key: "minutes",
|
|
79195
|
+
label: t("Minutes", "Minuti"),
|
|
79196
|
+
offer: {
|
|
79197
|
+
kind: "number",
|
|
79198
|
+
min: 0,
|
|
79199
|
+
step: 1,
|
|
79200
|
+
unit: "min"
|
|
79201
|
+
}
|
|
79202
|
+
}]
|
|
79203
|
+
},
|
|
79204
|
+
{
|
|
79205
|
+
id: "petFountain.pumpOffMinutes",
|
|
79206
|
+
method: "setPumpOffMinutes",
|
|
79207
|
+
label: t("Set pump rest time", "Imposta il tempo di riposo della pompa"),
|
|
79208
|
+
phrase: t("Set the pump of {device} to rest {minutes} minutes per cycle", "Imposta la pompa di {device} a riposare {minutes} minuti per ciclo"),
|
|
79209
|
+
icon: "timer-off",
|
|
79210
|
+
openArgs: [{
|
|
79211
|
+
key: "minutes",
|
|
79212
|
+
label: t("Minutes", "Minuti"),
|
|
79213
|
+
offer: {
|
|
79214
|
+
kind: "number",
|
|
79215
|
+
min: 0,
|
|
79216
|
+
step: 1,
|
|
79217
|
+
unit: "min"
|
|
79218
|
+
}
|
|
79219
|
+
}]
|
|
79220
|
+
},
|
|
79221
|
+
{
|
|
79222
|
+
id: "petFountain.resetDailyConsumption",
|
|
79223
|
+
method: "resetDailyConsumption",
|
|
79224
|
+
label: t("Clear daily consumption", "Azzera il consumo giornaliero"),
|
|
79225
|
+
phrase: t("Clear the daily water consumption of {device}", "Azzera il consumo giornaliero di acqua di {device}"),
|
|
79226
|
+
icon: "rotate-ccw"
|
|
79227
|
+
}
|
|
79228
|
+
],
|
|
79229
|
+
state: [{
|
|
79230
|
+
kind: "boolean",
|
|
79231
|
+
field: "empty",
|
|
79232
|
+
label: t("Tank empty", "Serbatoio vuoto"),
|
|
79233
|
+
whenTrue: t("When the tank of {device} is empty", "Quando il serbatoio di {device} è vuoto"),
|
|
79234
|
+
whenFalse: t("When the tank of {device} is refilled", "Quando il serbatoio di {device} viene riempito"),
|
|
79235
|
+
icon: "droplet"
|
|
79236
|
+
}, {
|
|
79237
|
+
kind: "numeric",
|
|
79238
|
+
field: "waterLevel",
|
|
79239
|
+
quantity: t("the water level", "il livello dell’acqua"),
|
|
79240
|
+
label: t("Water level", "Livello dell’acqua"),
|
|
79241
|
+
unit: "%",
|
|
79242
|
+
icon: "droplets"
|
|
79243
|
+
}]
|
|
79244
|
+
},
|
|
77635
79245
|
"media-player": {
|
|
77636
79246
|
scope: "device",
|
|
77637
79247
|
noun: t("Media player", "Lettore multimediale"),
|
|
@@ -77769,10 +79379,10 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77769
79379
|
id: "media.seek",
|
|
77770
79380
|
method: "seek",
|
|
77771
79381
|
label: t("Seek", "Vai al punto"),
|
|
77772
|
-
phrase: t("Move {device} to {
|
|
79382
|
+
phrase: t("Move {device} to {position}", "Porta {device} al punto {position}"),
|
|
77773
79383
|
icon: "fast-forward",
|
|
77774
79384
|
openArgs: [{
|
|
77775
|
-
key: "
|
|
79385
|
+
key: "position",
|
|
77776
79386
|
label: t("Position", "Posizione"),
|
|
77777
79387
|
offer: {
|
|
77778
79388
|
kind: "number",
|
|
@@ -78821,7 +80431,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78821
80431
|
state: [
|
|
78822
80432
|
{
|
|
78823
80433
|
kind: "numeric",
|
|
78824
|
-
field: "
|
|
80434
|
+
field: "co2",
|
|
78825
80435
|
quantity: t("the CO₂", "la CO₂"),
|
|
78826
80436
|
label: t("CO₂", "CO₂"),
|
|
78827
80437
|
unit: "ppm",
|
|
@@ -78829,7 +80439,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78829
80439
|
},
|
|
78830
80440
|
{
|
|
78831
80441
|
kind: "numeric",
|
|
78832
|
-
field: "
|
|
80442
|
+
field: "voc",
|
|
78833
80443
|
quantity: t("the VOC level", "il livello di COV"),
|
|
78834
80444
|
label: t("VOC", "COV"),
|
|
78835
80445
|
unit: "ppb",
|
|
@@ -78865,7 +80475,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78865
80475
|
noun: t("Light level", "Luminosità ambiente"),
|
|
78866
80476
|
state: [{
|
|
78867
80477
|
kind: "numeric",
|
|
78868
|
-
field: "
|
|
80478
|
+
field: "illuminance",
|
|
78869
80479
|
quantity: t("the light level", "la luminosità"),
|
|
78870
80480
|
label: t("Illuminance", "Illuminamento"),
|
|
78871
80481
|
unit: "lx",
|
|
@@ -79068,7 +80678,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79068
80678
|
noun: t("Humidity", "Umidità"),
|
|
79069
80679
|
state: [{
|
|
79070
80680
|
kind: "numeric",
|
|
79071
|
-
field: "
|
|
80681
|
+
field: "humidity",
|
|
79072
80682
|
quantity: t("the humidity", "l’umidità"),
|
|
79073
80683
|
label: t("Humidity", "Umidità"),
|
|
79074
80684
|
unit: "%",
|
|
@@ -79116,7 +80726,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79116
80726
|
state: [
|
|
79117
80727
|
{
|
|
79118
80728
|
kind: "numeric",
|
|
79119
|
-
field: "
|
|
80729
|
+
field: "power",
|
|
79120
80730
|
quantity: t("the power draw", "il consumo"),
|
|
79121
80731
|
label: t("Power", "Potenza"),
|
|
79122
80732
|
unit: "W",
|
|
@@ -79124,7 +80734,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79124
80734
|
},
|
|
79125
80735
|
{
|
|
79126
80736
|
kind: "numeric",
|
|
79127
|
-
field: "
|
|
80737
|
+
field: "energy",
|
|
79128
80738
|
quantity: t("the energy used", "l’energia consumata"),
|
|
79129
80739
|
label: t("Energy", "Energia"),
|
|
79130
80740
|
unit: "kWh",
|
|
@@ -79132,7 +80742,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79132
80742
|
},
|
|
79133
80743
|
{
|
|
79134
80744
|
kind: "numeric",
|
|
79135
|
-
field: "
|
|
80745
|
+
field: "voltage",
|
|
79136
80746
|
quantity: t("the voltage", "la tensione"),
|
|
79137
80747
|
label: t("Voltage", "Tensione"),
|
|
79138
80748
|
unit: "V",
|
|
@@ -79140,7 +80750,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79140
80750
|
},
|
|
79141
80751
|
{
|
|
79142
80752
|
kind: "numeric",
|
|
79143
|
-
field: "
|
|
80753
|
+
field: "current",
|
|
79144
80754
|
quantity: t("the current", "la corrente"),
|
|
79145
80755
|
label: t("Current", "Corrente"),
|
|
79146
80756
|
unit: "A",
|
|
@@ -79157,13 +80767,6 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79157
80767
|
label: t("Where", "Posizione"),
|
|
79158
80768
|
phrase: t("When {device} is at {value}", "Quando {device} è in {value}"),
|
|
79159
80769
|
icon: "map-pin"
|
|
79160
|
-
}, {
|
|
79161
|
-
kind: "numeric",
|
|
79162
|
-
field: "batteryPercent",
|
|
79163
|
-
quantity: t("the phone battery", "la batteria del telefono"),
|
|
79164
|
-
label: t("Battery", "Batteria"),
|
|
79165
|
-
unit: "%",
|
|
79166
|
-
icon: "battery"
|
|
79167
80770
|
}]
|
|
79168
80771
|
},
|
|
79169
80772
|
"pressure-sensor": {
|
|
@@ -79171,7 +80774,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79171
80774
|
noun: t("Pressure", "Pressione"),
|
|
79172
80775
|
state: [{
|
|
79173
80776
|
kind: "numeric",
|
|
79174
|
-
field: "
|
|
80777
|
+
field: "pressure",
|
|
79175
80778
|
quantity: t("the pressure", "la pressione"),
|
|
79176
80779
|
label: t("Pressure", "Pressione"),
|
|
79177
80780
|
unit: "hPa",
|
|
@@ -79207,7 +80810,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79207
80810
|
noun: t("Temperature", "Temperatura"),
|
|
79208
80811
|
state: [{
|
|
79209
80812
|
kind: "numeric",
|
|
79210
|
-
field: "
|
|
80813
|
+
field: "temperature",
|
|
79211
80814
|
quantity: t("the temperature", "la temperatura"),
|
|
79212
80815
|
label: t("Temperature", "Temperatura"),
|
|
79213
80816
|
unit: "°C",
|
|
@@ -79278,7 +80881,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79278
80881
|
state: [
|
|
79279
80882
|
{
|
|
79280
80883
|
kind: "numeric",
|
|
79281
|
-
field: "
|
|
80884
|
+
field: "level",
|
|
79282
80885
|
quantity: t("the battery level", "il livello della batteria"),
|
|
79283
80886
|
label: t("Battery", "Batteria"),
|
|
79284
80887
|
unit: "%",
|
|
@@ -79320,7 +80923,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79320
80923
|
icon: "battery-charging"
|
|
79321
80924
|
}
|
|
79322
80925
|
],
|
|
79323
|
-
events: { onStatusChanged: { notOperatorFacing: "the
|
|
80926
|
+
events: { onStatusChanged: { notOperatorFacing: "the level / sleeping / charging state triggers each read one field of this change" } },
|
|
79324
80927
|
extraEvents: [{
|
|
79325
80928
|
category: EventCategory.DeviceAwake,
|
|
79326
80929
|
label: t("Woke up", "Risvegliato"),
|
|
@@ -79338,7 +80941,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79338
80941
|
noun: t("Network link", "Collegamento di rete"),
|
|
79339
80942
|
state: [{
|
|
79340
80943
|
kind: "numeric",
|
|
79341
|
-
field: "
|
|
80944
|
+
field: "signal",
|
|
79342
80945
|
quantity: t("the signal strength", "l’intensità del segnale"),
|
|
79343
80946
|
label: t("Signal", "Segnale"),
|
|
79344
80947
|
unit: "%",
|
|
@@ -79431,6 +81034,8 @@ var ML = "model and training machinery — no device action";
|
|
|
79431
81034
|
var INTERNAL = "internal plumbing between addons — never operator-facing";
|
|
79432
81035
|
/** Every system-scoped cap, with why it is not a device's vocabulary. */
|
|
79433
81036
|
var SYSTEM_CAP_VOCABULARY = {
|
|
81037
|
+
"action-source": system(INTERNAL),
|
|
81038
|
+
actions: system("declared actions — run from the Actions page and from the cameras that link them"),
|
|
79434
81039
|
"addon-pages": system(UI_PLUMBING),
|
|
79435
81040
|
"addon-pages-source": system(UI_PLUMBING),
|
|
79436
81041
|
"addon-routes": system(UI_PLUMBING),
|
|
@@ -79461,6 +81066,7 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
79461
81066
|
"device-manager": system("the device registry itself — rename, move and remove are administration"),
|
|
79462
81067
|
"device-provider": system(INTERNAL),
|
|
79463
81068
|
"device-removal-hook": system(INTERNAL),
|
|
81069
|
+
"node-removal-hook": system(INTERNAL),
|
|
79464
81070
|
"device-state": system("the runtime-state mirror every trigger already reads through"),
|
|
79465
81071
|
"display-palette": system("the cluster display palette — one colour table for every client, not a device action"),
|
|
79466
81072
|
"embedding-encoder": system(ML),
|
|
@@ -79500,6 +81106,7 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
79500
81106
|
"recording-archive": system(STORAGE),
|
|
79501
81107
|
"recording-export": system("recording exports — requested from the timeline, not an automation step"),
|
|
79502
81108
|
records: system(INTERNAL),
|
|
81109
|
+
remote: system("the per-device remote setup — authored in the Customize remote editor, sent through the remote UI"),
|
|
79503
81110
|
"server-management": system(CLUSTER),
|
|
79504
81111
|
"settings-store": system(INTERNAL),
|
|
79505
81112
|
"smtp-provider": system(INTERNAL),
|
|
@@ -79512,6 +81119,7 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
79512
81119
|
"storage-provider": system(STORAGE),
|
|
79513
81120
|
"stream-broker": system(PIPELINE),
|
|
79514
81121
|
system: system(CLUSTER),
|
|
81122
|
+
template: system("operator-authored templates — edited in their own editor, never actuated"),
|
|
79515
81123
|
"terminal-session": system(CLUSTER),
|
|
79516
81124
|
toast: system(UI_PLUMBING),
|
|
79517
81125
|
training: system(ML),
|
|
@@ -79571,7 +81179,7 @@ function projectAction(cap, action) {
|
|
|
79571
81179
|
};
|
|
79572
81180
|
}
|
|
79573
81181
|
Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
|
|
79574
|
-
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;
|
|
81182
|
+
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;
|
|
79575
81183
|
DeviceFeature.BatteryOperated;
|
|
79576
81184
|
/**
|
|
79577
81185
|
* How a washer, dryer or dishwasher leaves CamStack.
|
|
@@ -79652,6 +81260,31 @@ Object.freeze({
|
|
|
79652
81260
|
form: "single",
|
|
79653
81261
|
optional: false
|
|
79654
81262
|
}],
|
|
81263
|
+
"actions.get": [{
|
|
81264
|
+
name: "deviceId",
|
|
81265
|
+
form: "single",
|
|
81266
|
+
optional: true
|
|
81267
|
+
}],
|
|
81268
|
+
"actions.getLinks": [{
|
|
81269
|
+
name: "deviceId",
|
|
81270
|
+
form: "single",
|
|
81271
|
+
optional: false
|
|
81272
|
+
}],
|
|
81273
|
+
"actions.listForCamera": [{
|
|
81274
|
+
name: "deviceId",
|
|
81275
|
+
form: "single",
|
|
81276
|
+
optional: false
|
|
81277
|
+
}],
|
|
81278
|
+
"actions.run": [{
|
|
81279
|
+
name: "deviceId",
|
|
81280
|
+
form: "single",
|
|
81281
|
+
optional: true
|
|
81282
|
+
}],
|
|
81283
|
+
"actions.setLinks": [{
|
|
81284
|
+
name: "deviceId",
|
|
81285
|
+
form: "single",
|
|
81286
|
+
optional: false
|
|
81287
|
+
}],
|
|
79655
81288
|
"addonSettings.getDeviceSettings": [{
|
|
79656
81289
|
name: "deviceId",
|
|
79657
81290
|
form: "single",
|
|
@@ -80703,6 +82336,16 @@ Object.freeze({
|
|
|
80703
82336
|
form: "single",
|
|
80704
82337
|
optional: false
|
|
80705
82338
|
}],
|
|
82339
|
+
"irTransmitter.getInfo": [{
|
|
82340
|
+
name: "deviceId",
|
|
82341
|
+
form: "single",
|
|
82342
|
+
optional: false
|
|
82343
|
+
}],
|
|
82344
|
+
"irTransmitter.send": [{
|
|
82345
|
+
name: "deviceId",
|
|
82346
|
+
form: "single",
|
|
82347
|
+
optional: false
|
|
82348
|
+
}],
|
|
80706
82349
|
"keychain.deleteDeviceScope": [{
|
|
80707
82350
|
name: "deviceId",
|
|
80708
82351
|
form: "single",
|
|
@@ -81112,6 +82755,36 @@ Object.freeze({
|
|
|
81112
82755
|
form: "single",
|
|
81113
82756
|
optional: false
|
|
81114
82757
|
}],
|
|
82758
|
+
"petFountain.getStatus": [{
|
|
82759
|
+
name: "deviceId",
|
|
82760
|
+
form: "single",
|
|
82761
|
+
optional: false
|
|
82762
|
+
}],
|
|
82763
|
+
"petFountain.resetDailyConsumption": [{
|
|
82764
|
+
name: "deviceId",
|
|
82765
|
+
form: "single",
|
|
82766
|
+
optional: false
|
|
82767
|
+
}],
|
|
82768
|
+
"petFountain.setPump": [{
|
|
82769
|
+
name: "deviceId",
|
|
82770
|
+
form: "single",
|
|
82771
|
+
optional: false
|
|
82772
|
+
}],
|
|
82773
|
+
"petFountain.setPumpInterval": [{
|
|
82774
|
+
name: "deviceId",
|
|
82775
|
+
form: "single",
|
|
82776
|
+
optional: false
|
|
82777
|
+
}],
|
|
82778
|
+
"petFountain.setPumpOffMinutes": [{
|
|
82779
|
+
name: "deviceId",
|
|
82780
|
+
form: "single",
|
|
82781
|
+
optional: false
|
|
82782
|
+
}],
|
|
82783
|
+
"petFountain.setPumpOnMinutes": [{
|
|
82784
|
+
name: "deviceId",
|
|
82785
|
+
form: "single",
|
|
82786
|
+
optional: false
|
|
82787
|
+
}],
|
|
81115
82788
|
"pipelineAnalytics.addRetrainFrameFromRecording": [{
|
|
81116
82789
|
name: "deviceId",
|
|
81117
82790
|
form: "single",
|
|
@@ -81928,6 +83601,31 @@ Object.freeze({
|
|
|
81928
83601
|
form: "single",
|
|
81929
83602
|
optional: true
|
|
81930
83603
|
}],
|
|
83604
|
+
"remote.getConfig": [{
|
|
83605
|
+
name: "deviceId",
|
|
83606
|
+
form: "single",
|
|
83607
|
+
optional: false
|
|
83608
|
+
}],
|
|
83609
|
+
"remote.listCommands": [{
|
|
83610
|
+
name: "deviceId",
|
|
83611
|
+
form: "single",
|
|
83612
|
+
optional: false
|
|
83613
|
+
}],
|
|
83614
|
+
"remote.sendCommand": [{
|
|
83615
|
+
name: "deviceId",
|
|
83616
|
+
form: "single",
|
|
83617
|
+
optional: false
|
|
83618
|
+
}],
|
|
83619
|
+
"remote.sendMediaCommand": [{
|
|
83620
|
+
name: "deviceId",
|
|
83621
|
+
form: "single",
|
|
83622
|
+
optional: false
|
|
83623
|
+
}],
|
|
83624
|
+
"remote.setConfig": [{
|
|
83625
|
+
name: "deviceId",
|
|
83626
|
+
form: "single",
|
|
83627
|
+
optional: false
|
|
83628
|
+
}],
|
|
81931
83629
|
"runningState.getStatus": [{
|
|
81932
83630
|
name: "deviceId",
|
|
81933
83631
|
form: "single",
|
|
@@ -83733,8 +85431,17 @@ DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
|
83733
85431
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
83734
85432
|
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
83735
85433
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
85434
|
+
String.raw`(?<=^|["'(\s>,\[{])`;
|
|
83736
85435
|
var MB = 1024 * 1024;
|
|
83737
85436
|
1024 * MB, 3072 * MB;
|
|
85437
|
+
object({
|
|
85438
|
+
manufacturer: string().optional(),
|
|
85439
|
+
supportedModels: array(string()).optional(),
|
|
85440
|
+
supportedController: string().optional(),
|
|
85441
|
+
commandsEncoding: string(),
|
|
85442
|
+
delay: number().nonnegative().optional(),
|
|
85443
|
+
commands: record(string(), unknown())
|
|
85444
|
+
});
|
|
83738
85445
|
//#endregion
|
|
83739
85446
|
//#region src/custom-actions.ts
|
|
83740
85447
|
/**
|
|
@@ -83883,7 +85590,7 @@ var TRAIT_CATALOG = [
|
|
|
83883
85590
|
attributes: () => ({}),
|
|
83884
85591
|
projectState: (rawStatus) => {
|
|
83885
85592
|
const parsed = BrightnessStatusSchema.safeParse(rawStatus);
|
|
83886
|
-
return parsed.success ? { brightness: Math.round(parsed.data.
|
|
85593
|
+
return parsed.success ? { brightness: Math.round(parsed.data.level) } : null;
|
|
83887
85594
|
},
|
|
83888
85595
|
commands: ["action.devices.commands.BrightnessAbsolute"],
|
|
83889
85596
|
resolveCommand: ({ deviceId, command, params }) => {
|