@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
|
@@ -10,7 +10,7 @@ async function dispatchCapCall(api, call) {
|
|
|
10
10
|
case "brightness.setBrightness":
|
|
11
11
|
await api.brightness.setBrightness.mutate({
|
|
12
12
|
deviceId: call.deviceId,
|
|
13
|
-
|
|
13
|
+
level: call.percentage
|
|
14
14
|
});
|
|
15
15
|
return;
|
|
16
16
|
case "lockControl.lock":
|
|
@@ -73,7 +73,7 @@ function createApiDeviceGateway(deps) {
|
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
//#endregion
|
|
76
|
-
//#region ../types/dist/event-category-
|
|
76
|
+
//#region ../types/dist/event-category-DmZDPDf_.mjs
|
|
77
77
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
78
78
|
EventCategory["SystemBoot"] = "system.boot";
|
|
79
79
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -700,7 +700,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
700
700
|
* (a track was promoted to a stationary-registry entry) or departs (the
|
|
701
701
|
* object moved / was removed). Telemetry (D8): lossy, drives a UI refresh of
|
|
702
702
|
* the dedicated "Stationary" section — never the live event feed. Payload:
|
|
703
|
-
* `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
|
|
703
|
+
* `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp, observedAt, zones }`.
|
|
704
704
|
*/
|
|
705
705
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
706
706
|
/**
|
|
@@ -838,6 +838,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
838
838
|
*/
|
|
839
839
|
EventCategory["AccessoriesChanged"] = "accessories.onAccessoriesChanged";
|
|
840
840
|
/**
|
|
841
|
+
* An action run started or ended. Emitted by the `actions` surface.
|
|
842
|
+
* Payload: `ActionRunChanged` (`{ actionId, runId, isRunning, outcome?, lastRunAt, lastError }`).
|
|
843
|
+
*/
|
|
844
|
+
EventCategory["ActionsRunChanged"] = "actions.onRunChanged";
|
|
845
|
+
/**
|
|
841
846
|
* Progress update from a running model conversion job.
|
|
842
847
|
* Payload: `{ kind: 'model-convert', phase, sessionId?, pct?, detail? }`.
|
|
843
848
|
* Emitted by `addon-model-studio` on the converting node.
|
|
@@ -5137,6 +5142,14 @@ function object(shape, params) {
|
|
|
5137
5142
|
...normalizeParams(params)
|
|
5138
5143
|
});
|
|
5139
5144
|
}
|
|
5145
|
+
function strictObject(shape, params) {
|
|
5146
|
+
return new ZodObject({
|
|
5147
|
+
type: "object",
|
|
5148
|
+
shape,
|
|
5149
|
+
catchall: never(),
|
|
5150
|
+
...normalizeParams(params)
|
|
5151
|
+
});
|
|
5152
|
+
}
|
|
5140
5153
|
function looseObject(shape, params) {
|
|
5141
5154
|
return new ZodObject({
|
|
5142
5155
|
type: "object",
|
|
@@ -5516,7 +5529,7 @@ var ZodIssueCode = {
|
|
|
5516
5529
|
var ZodFirstPartyTypeKind;
|
|
5517
5530
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5518
5531
|
//#endregion
|
|
5519
|
-
//#region ../types/dist/sleep
|
|
5532
|
+
//#region ../types/dist/sleep-6eG9C8Xl.mjs
|
|
5520
5533
|
/**
|
|
5521
5534
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5522
5535
|
* window to float samples (D455).
|
|
@@ -8492,6 +8505,52 @@ function optionalMethod(input, output, options) {
|
|
|
8492
8505
|
providerOptional: true
|
|
8493
8506
|
};
|
|
8494
8507
|
}
|
|
8508
|
+
/**
|
|
8509
|
+
* `addon-pages-source` — collection cap exposing per-provider raw page
|
|
8510
|
+
* declarations. Every addon that contributes a UI page registers a
|
|
8511
|
+
* provider here. The hub-side singleton aggregator (`addon-pages` cap,
|
|
8512
|
+
* see `addon-pages.cap.ts`) walks this collection, stamps versioned
|
|
8513
|
+
* `bundleUrl` values, and returns the enriched `AddonPageInfo[]` list
|
|
8514
|
+
* that admin-ui consumes.
|
|
8515
|
+
*
|
|
8516
|
+
* The split exists because the public listing has a different output
|
|
8517
|
+
* shape than the per-provider raw declarations, and we want both ends
|
|
8518
|
+
* to flow through codegen instead of relying on a hand-written wrapper.
|
|
8519
|
+
*/
|
|
8520
|
+
var AddonPageDeclarationSchema = object({
|
|
8521
|
+
id: string(),
|
|
8522
|
+
label: string(),
|
|
8523
|
+
icon: string(),
|
|
8524
|
+
path: string(),
|
|
8525
|
+
/**
|
|
8526
|
+
* Module Federation remote name — must match the `name` field on the
|
|
8527
|
+
* page addon's `federation()` plugin config. Used by admin-ui's
|
|
8528
|
+
* `<AddonPageLoader>` to call `loadRemote('<remoteName>/page')`.
|
|
8529
|
+
* Conventionally `addon_<id>_page` (snake_case; MF names cannot
|
|
8530
|
+
* contain hyphens).
|
|
8531
|
+
*/
|
|
8532
|
+
remoteName: string(),
|
|
8533
|
+
/**
|
|
8534
|
+
* Bundle filename inside the addon's `dist/` dir served at
|
|
8535
|
+
* `/api/addon-pages/<addonId>/<bundle>`. With Module Federation this
|
|
8536
|
+
* is always `'remoteEntry.js'`; the value is kept on the metadata so
|
|
8537
|
+
* the static-file route can compute an mtime-based cache-buster URL
|
|
8538
|
+
* without a separate filesystem stat.
|
|
8539
|
+
*/
|
|
8540
|
+
bundle: string(),
|
|
8541
|
+
/**
|
|
8542
|
+
* Sidebar section this page docks into. Well-known ids: `'detection'`,
|
|
8543
|
+
* `'cluster'`, `'administration'` — the page renders inside that group.
|
|
8544
|
+
* Any OTHER string creates (or joins) a custom section rendered after
|
|
8545
|
+
* the built-in groups; its label comes from `sectionLabel` (first
|
|
8546
|
+
* declaration wins), falling back to the id. Absent → the legacy
|
|
8547
|
+
* "Addon Pages" group.
|
|
8548
|
+
*/
|
|
8549
|
+
section: string().optional(),
|
|
8550
|
+
/** Display label for a CUSTOM `section` id (ignored for well-known ids). */
|
|
8551
|
+
sectionLabel: string().optional()
|
|
8552
|
+
});
|
|
8553
|
+
method(_void(), array(AddonPageDeclarationSchema).readonly(), { auth: "admin" });
|
|
8495
8554
|
var StaticDirOutputSchema$1 = object({ staticDir: string() });
|
|
8496
8555
|
var VersionOutputSchema$1 = object({ version: string() });
|
|
8497
8556
|
method(_void(), StaticDirOutputSchema$1, { auth: "admin" }), method(_void(), VersionOutputSchema$1, { auth: "admin" });
|
|
@@ -8517,6 +8576,27 @@ function customAction(input, output, options) {
|
|
|
8517
8576
|
...options?.caller ? { caller: "required" } : {}
|
|
8518
8577
|
};
|
|
8519
8578
|
}
|
|
8579
|
+
/**
|
|
8580
|
+
* The pipeline step-input shape and the run-result bridge, in a module that
|
|
8581
|
+
* imports nothing but zod and types.
|
|
8582
|
+
*
|
|
8583
|
+
* WHY A SEPARATE FILE (addon footprint, D28): both were declared in
|
|
8584
|
+
* `pipeline-executor.cap.ts`, whose import evaluates the whole executor schema
|
|
8585
|
+
* graph. An addon that only needs these two (the benchmark's `runPipelineTest`
|
|
8586
|
+
* action) paid ~130 MB of heap at load. `pipeline-executor.cap.ts` re-exports
|
|
8587
|
+
* them, so every existing import keeps working; addon server code takes them
|
|
8588
|
+
* from `@camstack/types/addon`.
|
|
8589
|
+
*/
|
|
8590
|
+
var PipelineStepInputSchema = lazy(() => object({
|
|
8591
|
+
addonId: string(),
|
|
8592
|
+
modelId: string().optional(),
|
|
8593
|
+
enabled: boolean().default(true),
|
|
8594
|
+
children: array(PipelineStepInputSchema).optional(),
|
|
8595
|
+
settings: record(string(), unknown()).optional(),
|
|
8596
|
+
jumpDeviceKey: string().optional()
|
|
8597
|
+
}));
|
|
8598
|
+
/** Typed bridge to the recursive `FrameResult` graph; validation is structural. */
|
|
8599
|
+
var PipelineRunResultBridge = custom();
|
|
8520
8600
|
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
8521
8601
|
var VersionOutputSchema = object({ version: string() });
|
|
8522
8602
|
method(_void(), StaticDirOutputSchema, { auth: "admin" }), method(_void(), VersionOutputSchema, { auth: "admin" });
|
|
@@ -8587,6 +8667,8 @@ Object.freeze({ "doorbell": "lastPressedAt" });
|
|
|
8587
8667
|
/** Every capability name, so addon code can check a name without the schema graph. */
|
|
8588
8668
|
var CAP_NAMES = Object.freeze([
|
|
8589
8669
|
"accessories",
|
|
8670
|
+
"action-source",
|
|
8671
|
+
"actions",
|
|
8590
8672
|
"addon-pages",
|
|
8591
8673
|
"addon-pages-source",
|
|
8592
8674
|
"addon-routes",
|
|
@@ -8670,6 +8752,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8670
8752
|
"image-settings",
|
|
8671
8753
|
"integrations",
|
|
8672
8754
|
"intercom",
|
|
8755
|
+
"ir-transmitter",
|
|
8673
8756
|
"keychain",
|
|
8674
8757
|
"keychain-admin",
|
|
8675
8758
|
"lawn-mower-control",
|
|
@@ -8698,6 +8781,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8698
8781
|
"network-link",
|
|
8699
8782
|
"network-quality",
|
|
8700
8783
|
"node-certificates",
|
|
8784
|
+
"node-removal-hook",
|
|
8701
8785
|
"nodes",
|
|
8702
8786
|
"notification-output",
|
|
8703
8787
|
"notification-rules",
|
|
@@ -8708,6 +8792,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8708
8792
|
"osd",
|
|
8709
8793
|
"osd-manager",
|
|
8710
8794
|
"pet-feeder",
|
|
8795
|
+
"pet-fountain",
|
|
8711
8796
|
"pipeline-analytics",
|
|
8712
8797
|
"pipeline-executor",
|
|
8713
8798
|
"pipeline-orchestrator",
|
|
@@ -8728,6 +8813,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8728
8813
|
"recording-onboard",
|
|
8729
8814
|
"recording-signal",
|
|
8730
8815
|
"records",
|
|
8816
|
+
"remote",
|
|
8731
8817
|
"running-state",
|
|
8732
8818
|
"scene-monitor",
|
|
8733
8819
|
"script-runner",
|
|
@@ -8751,6 +8837,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8751
8837
|
"system",
|
|
8752
8838
|
"tamper",
|
|
8753
8839
|
"temperature-sensor",
|
|
8840
|
+
"template",
|
|
8754
8841
|
"terminal-session",
|
|
8755
8842
|
"toast",
|
|
8756
8843
|
"training",
|
|
@@ -8775,11 +8862,11 @@ var CAP_NAMES = Object.freeze([
|
|
|
8775
8862
|
Object.freeze({
|
|
8776
8863
|
"air-quality-sensor": [
|
|
8777
8864
|
{
|
|
8778
|
-
"path": "
|
|
8865
|
+
"path": "co2",
|
|
8779
8866
|
"valueType": "number"
|
|
8780
8867
|
},
|
|
8781
8868
|
{
|
|
8782
|
-
"path": "
|
|
8869
|
+
"path": "voc",
|
|
8783
8870
|
"valueType": "number"
|
|
8784
8871
|
},
|
|
8785
8872
|
{
|
|
@@ -8829,7 +8916,7 @@ Object.freeze({
|
|
|
8829
8916
|
}
|
|
8830
8917
|
],
|
|
8831
8918
|
"ambient-light-sensor": [{
|
|
8832
|
-
"path": "
|
|
8919
|
+
"path": "illuminance",
|
|
8833
8920
|
"valueType": "number"
|
|
8834
8921
|
}],
|
|
8835
8922
|
"audio-metrics": [
|
|
@@ -8890,7 +8977,7 @@ Object.freeze({
|
|
|
8890
8977
|
],
|
|
8891
8978
|
"battery": [
|
|
8892
8979
|
{
|
|
8893
|
-
"path": "
|
|
8980
|
+
"path": "level",
|
|
8894
8981
|
"valueType": "number"
|
|
8895
8982
|
},
|
|
8896
8983
|
{
|
|
@@ -8912,7 +8999,7 @@ Object.freeze({
|
|
|
8912
8999
|
"valueType": "number"
|
|
8913
9000
|
},
|
|
8914
9001
|
{
|
|
8915
|
-
"path": "
|
|
9002
|
+
"path": "voltage",
|
|
8916
9003
|
"valueType": "number"
|
|
8917
9004
|
},
|
|
8918
9005
|
{
|
|
@@ -8933,7 +9020,7 @@ Object.freeze({
|
|
|
8933
9020
|
"valueType": "boolean"
|
|
8934
9021
|
}],
|
|
8935
9022
|
"brightness": [{
|
|
8936
|
-
"path": "
|
|
9023
|
+
"path": "level",
|
|
8937
9024
|
"valueType": "number"
|
|
8938
9025
|
}],
|
|
8939
9026
|
"broker": [{
|
|
@@ -9134,7 +9221,7 @@ Object.freeze({
|
|
|
9134
9221
|
"valueType": "number"
|
|
9135
9222
|
},
|
|
9136
9223
|
{
|
|
9137
|
-
"path": "
|
|
9224
|
+
"path": "colorTemperature",
|
|
9138
9225
|
"valueType": "number"
|
|
9139
9226
|
}
|
|
9140
9227
|
],
|
|
@@ -9313,15 +9400,15 @@ Object.freeze({
|
|
|
9313
9400
|
"valueType": "string"
|
|
9314
9401
|
},
|
|
9315
9402
|
{
|
|
9316
|
-
"path": "
|
|
9403
|
+
"path": "remaining",
|
|
9317
9404
|
"valueType": "number"
|
|
9318
9405
|
},
|
|
9319
9406
|
{
|
|
9320
|
-
"path": "
|
|
9407
|
+
"path": "delayedStart",
|
|
9321
9408
|
"valueType": "number"
|
|
9322
9409
|
},
|
|
9323
9410
|
{
|
|
9324
|
-
"path": "
|
|
9411
|
+
"path": "progress",
|
|
9325
9412
|
"valueType": "number"
|
|
9326
9413
|
},
|
|
9327
9414
|
{
|
|
@@ -9435,7 +9522,7 @@ Object.freeze({
|
|
|
9435
9522
|
],
|
|
9436
9523
|
"fan-control": [
|
|
9437
9524
|
{
|
|
9438
|
-
"path": "
|
|
9525
|
+
"path": "speed",
|
|
9439
9526
|
"valueType": "number"
|
|
9440
9527
|
},
|
|
9441
9528
|
{
|
|
@@ -9535,7 +9622,7 @@ Object.freeze({
|
|
|
9535
9622
|
}
|
|
9536
9623
|
],
|
|
9537
9624
|
"humidity-sensor": [{
|
|
9538
|
-
"path": "
|
|
9625
|
+
"path": "humidity",
|
|
9539
9626
|
"valueType": "number"
|
|
9540
9627
|
}],
|
|
9541
9628
|
"image": [{
|
|
@@ -9645,7 +9732,7 @@ Object.freeze({
|
|
|
9645
9732
|
"valueType": "number"
|
|
9646
9733
|
},
|
|
9647
9734
|
{
|
|
9648
|
-
"path": "
|
|
9735
|
+
"path": "progress",
|
|
9649
9736
|
"valueType": "number"
|
|
9650
9737
|
},
|
|
9651
9738
|
{
|
|
@@ -9691,6 +9778,11 @@ Object.freeze({
|
|
|
9691
9778
|
"standby"
|
|
9692
9779
|
]
|
|
9693
9780
|
},
|
|
9781
|
+
{
|
|
9782
|
+
"path": "stateSource",
|
|
9783
|
+
"valueType": "enum",
|
|
9784
|
+
"enumValues": ["reported", "assumed"]
|
|
9785
|
+
},
|
|
9694
9786
|
{
|
|
9695
9787
|
"path": "volumeLevel",
|
|
9696
9788
|
"valueType": "number"
|
|
@@ -9724,11 +9816,11 @@ Object.freeze({
|
|
|
9724
9816
|
"valueType": "string"
|
|
9725
9817
|
},
|
|
9726
9818
|
{
|
|
9727
|
-
"path": "
|
|
9819
|
+
"path": "position",
|
|
9728
9820
|
"valueType": "number"
|
|
9729
9821
|
},
|
|
9730
9822
|
{
|
|
9731
|
-
"path": "
|
|
9823
|
+
"path": "duration",
|
|
9732
9824
|
"valueType": "number"
|
|
9733
9825
|
},
|
|
9734
9826
|
{
|
|
@@ -9830,11 +9922,11 @@ Object.freeze({
|
|
|
9830
9922
|
]
|
|
9831
9923
|
},
|
|
9832
9924
|
{
|
|
9833
|
-
"path": "
|
|
9925
|
+
"path": "signal",
|
|
9834
9926
|
"valueType": "number"
|
|
9835
9927
|
},
|
|
9836
9928
|
{
|
|
9837
|
-
"path": "
|
|
9929
|
+
"path": "rssi",
|
|
9838
9930
|
"valueType": "number"
|
|
9839
9931
|
},
|
|
9840
9932
|
{
|
|
@@ -9889,6 +9981,18 @@ Object.freeze({
|
|
|
9889
9981
|
"path": "foodLevel",
|
|
9890
9982
|
"valueType": "number"
|
|
9891
9983
|
},
|
|
9984
|
+
{
|
|
9985
|
+
"path": "bowlFood",
|
|
9986
|
+
"valueType": "number"
|
|
9987
|
+
},
|
|
9988
|
+
{
|
|
9989
|
+
"path": "eating",
|
|
9990
|
+
"valueType": "boolean"
|
|
9991
|
+
},
|
|
9992
|
+
{
|
|
9993
|
+
"path": "supportsMarkRefilled",
|
|
9994
|
+
"valueType": "boolean"
|
|
9995
|
+
},
|
|
9892
9996
|
{
|
|
9893
9997
|
"path": "food1",
|
|
9894
9998
|
"valueType": "number"
|
|
@@ -9905,6 +10009,11 @@ Object.freeze({
|
|
|
9905
10009
|
"path": "batteryPower",
|
|
9906
10010
|
"valueType": "number"
|
|
9907
10011
|
},
|
|
10012
|
+
{
|
|
10013
|
+
"path": "powerSource",
|
|
10014
|
+
"valueType": "enum",
|
|
10015
|
+
"enumValues": ["mains", "battery"]
|
|
10016
|
+
},
|
|
9908
10017
|
{
|
|
9909
10018
|
"path": "desiccantLeftDays",
|
|
9910
10019
|
"valueType": "number"
|
|
@@ -9949,27 +10058,89 @@ Object.freeze({
|
|
|
9949
10058
|
{
|
|
9950
10059
|
"path": "volume",
|
|
9951
10060
|
"valueType": "number"
|
|
10061
|
+
},
|
|
10062
|
+
{
|
|
10063
|
+
"path": "lastFeedGrams",
|
|
10064
|
+
"valueType": "number"
|
|
10065
|
+
},
|
|
10066
|
+
{
|
|
10067
|
+
"path": "lastFeedHopper1",
|
|
10068
|
+
"valueType": "number"
|
|
10069
|
+
},
|
|
10070
|
+
{
|
|
10071
|
+
"path": "lastFeedHopper2",
|
|
10072
|
+
"valueType": "number"
|
|
10073
|
+
}
|
|
10074
|
+
],
|
|
10075
|
+
"pet-fountain": [
|
|
10076
|
+
{
|
|
10077
|
+
"path": "waterLevel",
|
|
10078
|
+
"valueType": "number"
|
|
10079
|
+
},
|
|
10080
|
+
{
|
|
10081
|
+
"path": "waterVolume",
|
|
10082
|
+
"valueType": "number"
|
|
10083
|
+
},
|
|
10084
|
+
{
|
|
10085
|
+
"path": "empty",
|
|
10086
|
+
"valueType": "boolean"
|
|
10087
|
+
},
|
|
10088
|
+
{
|
|
10089
|
+
"path": "pumpRunning",
|
|
10090
|
+
"valueType": "boolean"
|
|
10091
|
+
},
|
|
10092
|
+
{
|
|
10093
|
+
"path": "pumpIntervalEnabled",
|
|
10094
|
+
"valueType": "boolean"
|
|
10095
|
+
},
|
|
10096
|
+
{
|
|
10097
|
+
"path": "pumpOnTime",
|
|
10098
|
+
"valueType": "number"
|
|
10099
|
+
},
|
|
10100
|
+
{
|
|
10101
|
+
"path": "pumpOffTime",
|
|
10102
|
+
"valueType": "number"
|
|
10103
|
+
},
|
|
10104
|
+
{
|
|
10105
|
+
"path": "lastDrink",
|
|
10106
|
+
"valueType": "number"
|
|
10107
|
+
},
|
|
10108
|
+
{
|
|
10109
|
+
"path": "currentHourDrink",
|
|
10110
|
+
"valueType": "number"
|
|
10111
|
+
},
|
|
10112
|
+
{
|
|
10113
|
+
"path": "last24hDrink",
|
|
10114
|
+
"valueType": "number"
|
|
10115
|
+
},
|
|
10116
|
+
{
|
|
10117
|
+
"path": "todayDrink",
|
|
10118
|
+
"valueType": "number"
|
|
10119
|
+
},
|
|
10120
|
+
{
|
|
10121
|
+
"path": "error",
|
|
10122
|
+
"valueType": "string"
|
|
9952
10123
|
}
|
|
9953
10124
|
],
|
|
9954
10125
|
"power-meter": [
|
|
9955
10126
|
{
|
|
9956
|
-
"path": "
|
|
10127
|
+
"path": "power",
|
|
9957
10128
|
"valueType": "number"
|
|
9958
10129
|
},
|
|
9959
10130
|
{
|
|
9960
|
-
"path": "
|
|
10131
|
+
"path": "energy",
|
|
9961
10132
|
"valueType": "number"
|
|
9962
10133
|
},
|
|
9963
10134
|
{
|
|
9964
|
-
"path": "
|
|
10135
|
+
"path": "voltage",
|
|
9965
10136
|
"valueType": "number"
|
|
9966
10137
|
},
|
|
9967
10138
|
{
|
|
9968
|
-
"path": "
|
|
10139
|
+
"path": "current",
|
|
9969
10140
|
"valueType": "number"
|
|
9970
10141
|
},
|
|
9971
10142
|
{
|
|
9972
|
-
"path": "
|
|
10143
|
+
"path": "apparentPower",
|
|
9973
10144
|
"valueType": "number"
|
|
9974
10145
|
},
|
|
9975
10146
|
{
|
|
@@ -9997,14 +10168,10 @@ Object.freeze({
|
|
|
9997
10168
|
{
|
|
9998
10169
|
"path": "gps.accuracyMeters",
|
|
9999
10170
|
"valueType": "number"
|
|
10000
|
-
},
|
|
10001
|
-
{
|
|
10002
|
-
"path": "batteryPercent",
|
|
10003
|
-
"valueType": "number"
|
|
10004
10171
|
}
|
|
10005
10172
|
],
|
|
10006
10173
|
"pressure-sensor": [{
|
|
10007
|
-
"path": "
|
|
10174
|
+
"path": "pressure",
|
|
10008
10175
|
"valueType": "number"
|
|
10009
10176
|
}],
|
|
10010
10177
|
"privacy-mask": [{
|
|
@@ -10318,7 +10485,7 @@ Object.freeze({
|
|
|
10318
10485
|
"valueType": "boolean"
|
|
10319
10486
|
}],
|
|
10320
10487
|
"temperature-sensor": [{
|
|
10321
|
-
"path": "
|
|
10488
|
+
"path": "temperature",
|
|
10322
10489
|
"valueType": "number"
|
|
10323
10490
|
}],
|
|
10324
10491
|
"update": [
|
|
@@ -10366,7 +10533,7 @@ Object.freeze({
|
|
|
10366
10533
|
"valueType": "string"
|
|
10367
10534
|
},
|
|
10368
10535
|
{
|
|
10369
|
-
"path": "
|
|
10536
|
+
"path": "progress",
|
|
10370
10537
|
"valueType": "number"
|
|
10371
10538
|
},
|
|
10372
10539
|
{
|
|
@@ -10492,7 +10659,7 @@ object({
|
|
|
10492
10659
|
params: record(string(), union([string(), number()])).optional()
|
|
10493
10660
|
});
|
|
10494
10661
|
//#endregion
|
|
10495
|
-
//#region ../types/dist/err-msg-
|
|
10662
|
+
//#region ../types/dist/err-msg-DWXWc0Di.mjs
|
|
10496
10663
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
10497
10664
|
DeviceType["Camera"] = "camera";
|
|
10498
10665
|
DeviceType["Hub"] = "hub";
|
|
@@ -10584,6 +10751,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
10584
10751
|
* native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
|
|
10585
10752
|
* integrations sharing the same food/desiccant/hopper surface. */
|
|
10586
10753
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
10754
|
+
/** Pet water fountain — tank level, water drunk, pump and its duty cycle.
|
|
10755
|
+
* Installed with the `pet-fountain` cap. Reaches CamStack as loose entities
|
|
10756
|
+
* of a container and is BUILT as a composed device (D967). */
|
|
10757
|
+
DeviceType["PetFountain"] = "pet-fountain";
|
|
10587
10758
|
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
10588
10759
|
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
10589
10760
|
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
@@ -10838,6 +11009,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
10838
11009
|
/** Fallback when the notifier service name doesn't match a known
|
|
10839
11010
|
* pattern. */
|
|
10840
11011
|
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
11012
|
+
/** Emits a pulse train (infrared or RF) on request — the `ir-transmitter`
|
|
11013
|
+
* cap. A `DeviceType.Generic` device. */
|
|
11014
|
+
DeviceRole["IrTransmitter"] = "ir-transmitter";
|
|
10841
11015
|
return DeviceRole;
|
|
10842
11016
|
}({});
|
|
10843
11017
|
/**
|
|
@@ -10851,7 +11025,7 @@ function errMsg(err) {
|
|
|
10851
11025
|
return String(err);
|
|
10852
11026
|
}
|
|
10853
11027
|
//#endregion
|
|
10854
|
-
//#region ../types/dist/composition-
|
|
11028
|
+
//#region ../types/dist/composition-kSuOifuG.mjs
|
|
10855
11029
|
/**
|
|
10856
11030
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
10857
11031
|
*
|
|
@@ -11936,12 +12110,28 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
|
11936
12110
|
])
|
|
11937
12111
|
})
|
|
11938
12112
|
]);
|
|
11939
|
-
var
|
|
12113
|
+
var forwardArgUnion = union([
|
|
12114
|
+
string(),
|
|
12115
|
+
number(),
|
|
12116
|
+
boolean(),
|
|
12117
|
+
strictObject({ ["$input"]: string().min(1) }),
|
|
12118
|
+
record(string().min(1), lazy(() => forwardArgUnion))
|
|
12119
|
+
]);
|
|
12120
|
+
var CompositionForwardArgSchema = forwardArgUnion;
|
|
12121
|
+
/**
|
|
12122
|
+
* `forward` (D659, amended by D967): one method of a BUILT capability is one
|
|
12123
|
+
* call of `cap.method` on `source`. Without `args` the built method's input
|
|
12124
|
+
* passes through minus `deviceId`; with `args` the template IS the source's
|
|
12125
|
+
* whole input. `deviceId` is always the source's own, never an argument.
|
|
12126
|
+
*/
|
|
12127
|
+
var CompositionForwardCommandSchema = object({
|
|
11940
12128
|
kind: literal("forward"),
|
|
11941
12129
|
source: CompositionSourceRefSchema,
|
|
11942
12130
|
cap: string().min(1),
|
|
11943
|
-
method: string().min(1)
|
|
11944
|
-
|
|
12131
|
+
method: string().min(1),
|
|
12132
|
+
args: record(string().min(1), CompositionForwardArgSchema).optional()
|
|
12133
|
+
});
|
|
12134
|
+
var CompositionCommandTargetSchema = discriminatedUnion("kind", [CompositionForwardCommandSchema, CompositionCodeSourceSchema]);
|
|
11945
12135
|
/** An item key inside an item-array cap (`consumables.items[<key>]`). */
|
|
11946
12136
|
var COMPOSITION_ITEM_KEY_RE = /^[a-z0-9][a-z0-9-]{0,47}$/;
|
|
11947
12137
|
/**
|
|
@@ -11951,7 +12141,13 @@ var COMPOSITION_ITEM_KEY_RE = /^[a-z0-9][a-z0-9-]{0,47}$/;
|
|
|
11951
12141
|
*/
|
|
11952
12142
|
var CompositionItemEntrySchema = object({
|
|
11953
12143
|
label: string().min(1).max(80),
|
|
11954
|
-
fields: record(string().min(1), CompositionFieldSourceSchema)
|
|
12144
|
+
fields: record(string().min(1), CompositionFieldSourceSchema),
|
|
12145
|
+
/**
|
|
12146
|
+
* What the cap's `reset` does for THIS item (consumables). Present = the item
|
|
12147
|
+
* is resettable and a `reset` call naming its key forwards here. The item key
|
|
12148
|
+
* selects the command, so it is never an argument: there is no pass-through.
|
|
12149
|
+
*/
|
|
12150
|
+
reset: CompositionForwardCommandSchema.optional()
|
|
11955
12151
|
});
|
|
11956
12152
|
var CompositionFeatureSchema = discriminatedUnion("kind", [object({
|
|
11957
12153
|
kind: literal("fields"),
|
|
@@ -11963,7 +12159,7 @@ var CompositionFeatureSchema = discriminatedUnion("kind", [object({
|
|
|
11963
12159
|
* owns the WHOLE array field: the composed value holds exactly these items.
|
|
11964
12160
|
*/
|
|
11965
12161
|
items: record(string().regex(COMPOSITION_ITEM_KEY_RE), CompositionItemEntrySchema).refine((items) => Object.keys(items).length <= 16, { message: `at most 16 items` }).optional(),
|
|
11966
|
-
/**
|
|
12162
|
+
/** Method name → what serves it. Only a BUILT capability takes commands (D967). */
|
|
11967
12163
|
commands: record(string().min(1), CompositionCommandTargetSchema).optional()
|
|
11968
12164
|
}), object({
|
|
11969
12165
|
kind: literal("passthrough"),
|
|
@@ -15495,6 +15691,14 @@ var AutomationConditionLeafSchema = object({
|
|
|
15495
15691
|
array(union([string(), number()]))
|
|
15496
15692
|
])
|
|
15497
15693
|
});
|
|
15694
|
+
var AutomationConditionStationaryPresentSchema = object({
|
|
15695
|
+
kind: literal("stationary-present"),
|
|
15696
|
+
deviceId: number().int().nonnegative(),
|
|
15697
|
+
/** Class names; a macro class matches every raw class that maps to it. */
|
|
15698
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15699
|
+
/** The parked object must be in at least one of these zones. */
|
|
15700
|
+
zones: array(string().min(1)).min(1).optional()
|
|
15701
|
+
});
|
|
15498
15702
|
/**
|
|
15499
15703
|
* The expression leaf, declared as a plain object rather than an intersection
|
|
15500
15704
|
* with {@link ExpressionSourceSchema}: a discriminated union has to be able to
|
|
@@ -15528,7 +15732,8 @@ var AutomationConditionSchema = lazy(() => discriminatedUnion("kind", [
|
|
|
15528
15732
|
child: AutomationConditionSchema
|
|
15529
15733
|
}),
|
|
15530
15734
|
AutomationConditionLeafSchema,
|
|
15531
|
-
AutomationConditionExpressionSchema
|
|
15735
|
+
AutomationConditionExpressionSchema,
|
|
15736
|
+
AutomationConditionStationaryPresentSchema
|
|
15532
15737
|
]));
|
|
15533
15738
|
/**
|
|
15534
15739
|
* What starts a run.
|
|
@@ -15569,7 +15774,34 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
|
|
|
15569
15774
|
kind: literal("schedule"),
|
|
15570
15775
|
cron: string().min(1).max(120)
|
|
15571
15776
|
}),
|
|
15572
|
-
object({ kind: literal("manual") })
|
|
15777
|
+
object({ kind: literal("manual") }),
|
|
15778
|
+
object({
|
|
15779
|
+
kind: literal("detection"),
|
|
15780
|
+
/** Class names. A macro class (`animal`, `vehicle`, `person`, `package`)
|
|
15781
|
+
* matches every raw class that maps to it; any other name matches
|
|
15782
|
+
* exactly. */
|
|
15783
|
+
classes: array(string().min(1)).min(1),
|
|
15784
|
+
deviceIds: array(number().int().nonnegative()).min(1),
|
|
15785
|
+
/** The track must have visited at least one of these zones. */
|
|
15786
|
+
zones: array(string().min(1)).min(1).optional(),
|
|
15787
|
+
/** Best-so-far confidence the track must reach. */
|
|
15788
|
+
minScore: number().min(0).max(1).optional()
|
|
15789
|
+
}),
|
|
15790
|
+
object({
|
|
15791
|
+
kind: literal("stationary"),
|
|
15792
|
+
deviceIds: array(number().int().nonnegative()).min(1),
|
|
15793
|
+
/** Class names; a macro class matches like the detection trigger. */
|
|
15794
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15795
|
+
/** The parked object must be in at least one of these zones. */
|
|
15796
|
+
zones: array(string().min(1)).min(1).optional(),
|
|
15797
|
+
/** `appeared`: it became parked. `departed`: the registry retired it.
|
|
15798
|
+
* The vocabulary of `PipelineAnalyticsStationaryChanged`. */
|
|
15799
|
+
phase: _enum(["appeared", "departed"])
|
|
15800
|
+
}),
|
|
15801
|
+
object({
|
|
15802
|
+
kind: literal("interval"),
|
|
15803
|
+
minutes: number().int().min(1).max(1440)
|
|
15804
|
+
})
|
|
15573
15805
|
]);
|
|
15574
15806
|
/**
|
|
15575
15807
|
* One action step.
|
|
@@ -15589,28 +15821,47 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
|
|
|
15589
15821
|
* is called. The runner still receives a number and is untouched; the
|
|
15590
15822
|
* resolution is the recipe's job, not the runner's.
|
|
15591
15823
|
*/
|
|
15824
|
+
var AutomationWaitStepSchema = object({
|
|
15825
|
+
kind: literal("wait"),
|
|
15826
|
+
seconds: number().min(0).max(300)
|
|
15827
|
+
});
|
|
15828
|
+
var AutomationCapStepSchema = object({
|
|
15829
|
+
kind: literal("cap"),
|
|
15830
|
+
/**
|
|
15831
|
+
* One device, several same-family devices (locks / climate family / …),
|
|
15832
|
+
* or `{ $var }` for the device that triggered the run. An array is
|
|
15833
|
+
* fan-out at codegen — each id gets the same cap.method call.
|
|
15834
|
+
*/
|
|
15835
|
+
deviceId: union([
|
|
15836
|
+
number().int(),
|
|
15837
|
+
array(number().int()).min(1),
|
|
15838
|
+
object({ $var: string().min(1) })
|
|
15839
|
+
]),
|
|
15840
|
+
cap: string().min(1),
|
|
15841
|
+
method: string().min(1),
|
|
15842
|
+
/** Values may carry `{{vars.x}}` slots, or be exactly `{ $var: 'name' }`, which
|
|
15843
|
+
* SUBSTITUTE and do not evaluate (§3.2.3). Anything beyond substitution is
|
|
15844
|
+
* the expression leaf. */
|
|
15845
|
+
args: record(string(), unknown()).optional()
|
|
15846
|
+
});
|
|
15847
|
+
/**
|
|
15848
|
+
* The steps an internal Action may contain: cap and wait, and nothing that can
|
|
15849
|
+
* call back into an Action — so an Action can never reach itself (no cycles).
|
|
15850
|
+
*/
|
|
15851
|
+
var ActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepSchema]);
|
|
15592
15852
|
var AutomationActionSchema = discriminatedUnion("kind", [
|
|
15853
|
+
AutomationWaitStepSchema,
|
|
15854
|
+
AutomationCapStepSchema,
|
|
15593
15855
|
object({
|
|
15594
|
-
kind: literal("
|
|
15595
|
-
|
|
15596
|
-
|
|
15597
|
-
|
|
15598
|
-
|
|
15599
|
-
|
|
15600
|
-
|
|
15601
|
-
|
|
15602
|
-
|
|
15603
|
-
*/
|
|
15604
|
-
deviceId: union([
|
|
15605
|
-
number().int(),
|
|
15606
|
-
array(number().int()).min(1),
|
|
15607
|
-
object({ $var: string().min(1) })
|
|
15608
|
-
]),
|
|
15609
|
-
cap: string().min(1),
|
|
15610
|
-
method: string().min(1),
|
|
15611
|
-
/** Values may carry `{{vars.x}}` slots, which SUBSTITUTE and do not
|
|
15612
|
-
* evaluate (§3.2.3). Anything beyond substitution is the expression leaf. */
|
|
15613
|
-
args: record(string(), unknown()).optional()
|
|
15856
|
+
kind: literal("action"),
|
|
15857
|
+
/** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
|
|
15858
|
+
actionId: string().min(1),
|
|
15859
|
+
/** Values for the action's declared variables; the others take their default. */
|
|
15860
|
+
variables: record(string(), union([
|
|
15861
|
+
string(),
|
|
15862
|
+
number(),
|
|
15863
|
+
boolean()
|
|
15864
|
+
])).optional()
|
|
15614
15865
|
}),
|
|
15615
15866
|
object({
|
|
15616
15867
|
kind: literal("code"),
|
|
@@ -15619,10 +15870,778 @@ var AutomationActionSchema = discriminatedUnion("kind", [
|
|
|
15619
15870
|
code: string().min(1).max(2e4)
|
|
15620
15871
|
})
|
|
15621
15872
|
]);
|
|
15873
|
+
/**
|
|
15874
|
+
* How a trigger that arrives while the automation is busy (or cooling down) is
|
|
15875
|
+
* handled. One of the automation's execution modes, never a property of its
|
|
15876
|
+
* actions. Absent means `single`.
|
|
15877
|
+
*
|
|
15878
|
+
* - `single` — drop the trigger while a run is in progress (traced + logged).
|
|
15879
|
+
* - `restart` — abort the run in progress (at its next step boundary), start fresh.
|
|
15880
|
+
* - `queued` — queue up to `max` triggers, drop the rest (traced).
|
|
15881
|
+
* - `parallel` — up to `max` runs at once, drop the rest (traced).
|
|
15882
|
+
* - `cooldown` — `single`, and no new run until `minutes` after the last run
|
|
15883
|
+
* STARTED; persisted across a restart. A manual trigger bypasses only this
|
|
15884
|
+
* wait, never the single/queued limits.
|
|
15885
|
+
*/
|
|
15886
|
+
var AutomationRunModeSchema = discriminatedUnion("mode", [
|
|
15887
|
+
object({ mode: literal("single") }),
|
|
15888
|
+
object({ mode: literal("restart") }),
|
|
15889
|
+
object({
|
|
15890
|
+
mode: literal("queued"),
|
|
15891
|
+
max: number().int().min(1).max(10)
|
|
15892
|
+
}),
|
|
15893
|
+
object({
|
|
15894
|
+
mode: literal("parallel"),
|
|
15895
|
+
max: number().int().min(1).max(10)
|
|
15896
|
+
}),
|
|
15897
|
+
object({
|
|
15898
|
+
mode: literal("cooldown"),
|
|
15899
|
+
minutes: number().int().min(1).max(1440)
|
|
15900
|
+
})
|
|
15901
|
+
]);
|
|
15622
15902
|
var AutomationRecipeSchema = object({
|
|
15623
15903
|
triggers: array(AutomationTriggerSchema),
|
|
15624
15904
|
conditions: AutomationConditionSchema.optional(),
|
|
15625
|
-
actions: array(AutomationActionSchema)
|
|
15905
|
+
actions: array(AutomationActionSchema),
|
|
15906
|
+
runMode: AutomationRunModeSchema.optional(),
|
|
15907
|
+
/** How many run traces the automation keeps (default {@link DEFAULT_TRACE_KEEP}). */
|
|
15908
|
+
keepTraces: number().int().min(1).max(100).optional()
|
|
15909
|
+
});
|
|
15910
|
+
new Set([
|
|
15911
|
+
{
|
|
15912
|
+
id: "person",
|
|
15913
|
+
name: "Person"
|
|
15914
|
+
},
|
|
15915
|
+
{
|
|
15916
|
+
id: "vehicle",
|
|
15917
|
+
name: "Vehicle"
|
|
15918
|
+
},
|
|
15919
|
+
{
|
|
15920
|
+
id: "animal",
|
|
15921
|
+
name: "Animal"
|
|
15922
|
+
},
|
|
15923
|
+
{
|
|
15924
|
+
id: "package",
|
|
15925
|
+
name: "Package"
|
|
15926
|
+
}
|
|
15927
|
+
].map((l) => l.id));
|
|
15928
|
+
var COCO_TO_MACRO = {
|
|
15929
|
+
mapping: {
|
|
15930
|
+
person: "person",
|
|
15931
|
+
bicycle: "vehicle",
|
|
15932
|
+
car: "vehicle",
|
|
15933
|
+
motorcycle: "vehicle",
|
|
15934
|
+
airplane: "vehicle",
|
|
15935
|
+
bus: "vehicle",
|
|
15936
|
+
train: "vehicle",
|
|
15937
|
+
truck: "vehicle",
|
|
15938
|
+
boat: "vehicle",
|
|
15939
|
+
bird: "animal",
|
|
15940
|
+
cat: "animal",
|
|
15941
|
+
dog: "animal",
|
|
15942
|
+
horse: "animal",
|
|
15943
|
+
sheep: "animal",
|
|
15944
|
+
cow: "animal",
|
|
15945
|
+
elephant: "animal",
|
|
15946
|
+
bear: "animal",
|
|
15947
|
+
zebra: "animal",
|
|
15948
|
+
giraffe: "animal",
|
|
15949
|
+
suitcase: "package",
|
|
15950
|
+
backpack: "package",
|
|
15951
|
+
handbag: "package"
|
|
15952
|
+
},
|
|
15953
|
+
preserveOriginal: false
|
|
15954
|
+
};
|
|
15955
|
+
new Set(Object.values(COCO_TO_MACRO.mapping));
|
|
15956
|
+
/**
|
|
15957
|
+
* Run traces — what an automation (or, later, an Action run) DID, node by node,
|
|
15958
|
+
* so the editor can paint every block green or red with its reason.
|
|
15959
|
+
*
|
|
15960
|
+
* A trace is data, not a log: it covers the WHOLE tree — the trigger stage,
|
|
15961
|
+
* every condition node (containers and leaves, including the ones a
|
|
15962
|
+
* short-circuit never reached), the run-mode verdict and every action step —
|
|
15963
|
+
* each addressed by a stable path (`conditions.0.1`, `actions.2`, or `steps.N`
|
|
15964
|
+
* for an Action run). Skipped
|
|
15965
|
+
* evaluations are traced too, and identical consecutive skips collapse into a
|
|
15966
|
+
* repeat count so a trigger that fails every 5 minutes cannot flush real runs.
|
|
15967
|
+
*
|
|
15968
|
+
* {@link AutomationStepTraceSchema} is deliberately free of automation
|
|
15969
|
+
* vocabulary so an Action run records the same step shape.
|
|
15970
|
+
*/
|
|
15971
|
+
/** A value a trace may show: JSON primitives and short lists, nothing deeper. */
|
|
15972
|
+
var TraceValueSchema = union([
|
|
15973
|
+
string(),
|
|
15974
|
+
number(),
|
|
15975
|
+
boolean(),
|
|
15976
|
+
_null(),
|
|
15977
|
+
array(union([string(), number()]))
|
|
15978
|
+
]);
|
|
15979
|
+
var AutomationRunOutcomeSchema = _enum([
|
|
15980
|
+
"ran",
|
|
15981
|
+
"skipped-trigger",
|
|
15982
|
+
"skipped-conditions",
|
|
15983
|
+
"skipped-cooldown",
|
|
15984
|
+
"skipped-overlap",
|
|
15985
|
+
"failed",
|
|
15986
|
+
"aborted"
|
|
15987
|
+
]);
|
|
15988
|
+
/** `not-evaluated` = a short-circuit never reached the node. */
|
|
15989
|
+
var TraceNodeOutcomeSchema = _enum([
|
|
15990
|
+
"pass",
|
|
15991
|
+
"fail",
|
|
15992
|
+
"not-evaluated"
|
|
15993
|
+
]);
|
|
15994
|
+
var AutomationTriggerTraceSchema = object({
|
|
15995
|
+
kind: string().min(1),
|
|
15996
|
+
outcome: _enum(["pass", "fail"]),
|
|
15997
|
+
/** Why an event was rejected ("class person not in [dog]") or what fired. */
|
|
15998
|
+
reason: string(),
|
|
15999
|
+
/** deviceId, className, trackId, score … — only what the trigger exposes. */
|
|
16000
|
+
vars: record(string(), TraceValueSchema)
|
|
16001
|
+
});
|
|
16002
|
+
var AutomationConditionTraceNodeSchema = object({
|
|
16003
|
+
/** `conditions` for the root, `conditions.<i>` for its i-th child, … */
|
|
16004
|
+
path: string().min(1),
|
|
16005
|
+
kind: _enum([
|
|
16006
|
+
"all",
|
|
16007
|
+
"any",
|
|
16008
|
+
"not",
|
|
16009
|
+
"condition",
|
|
16010
|
+
"expression",
|
|
16011
|
+
"stationary-present"
|
|
16012
|
+
]),
|
|
16013
|
+
outcome: TraceNodeOutcomeSchema,
|
|
16014
|
+
reason: string(),
|
|
16015
|
+
deviceId: number().int().optional(),
|
|
16016
|
+
cap: string().optional(),
|
|
16017
|
+
fieldPath: string().optional(),
|
|
16018
|
+
operator: string().optional(),
|
|
16019
|
+
expected: TraceValueSchema.optional(),
|
|
16020
|
+
/** What the mirror held; `null` when it held nothing (unknown). */
|
|
16021
|
+
observed: TraceValueSchema.optional()
|
|
16022
|
+
});
|
|
16023
|
+
var AutomationRunVerdictSchema = object({
|
|
16024
|
+
mode: AutomationRunModeSchema,
|
|
16025
|
+
decision: _enum([
|
|
16026
|
+
"run",
|
|
16027
|
+
"queued",
|
|
16028
|
+
"restart",
|
|
16029
|
+
"drop",
|
|
16030
|
+
"cooldown",
|
|
16031
|
+
"bypass"
|
|
16032
|
+
]),
|
|
16033
|
+
reason: string()
|
|
16034
|
+
});
|
|
16035
|
+
/** One executed (or not-run) step — shared by automations and Action runs. */
|
|
16036
|
+
var AutomationStepTraceSchema = object({
|
|
16037
|
+
/** `actions.<i>` */
|
|
16038
|
+
path: string().min(1),
|
|
16039
|
+
kind: string().min(1),
|
|
16040
|
+
cap: string().optional(),
|
|
16041
|
+
method: string().optional(),
|
|
16042
|
+
deviceId: number().int().optional(),
|
|
16043
|
+
startedAt: number().optional(),
|
|
16044
|
+
endedAt: number().optional(),
|
|
16045
|
+
outcome: _enum([
|
|
16046
|
+
"ok",
|
|
16047
|
+
"error",
|
|
16048
|
+
"not-run"
|
|
16049
|
+
]),
|
|
16050
|
+
message: string().optional()
|
|
16051
|
+
});
|
|
16052
|
+
var AutomationRunTraceSchema = object({
|
|
16053
|
+
runId: string().min(1),
|
|
16054
|
+
startedAt: number(),
|
|
16055
|
+
endedAt: number(),
|
|
16056
|
+
trigger: AutomationTriggerTraceSchema,
|
|
16057
|
+
conditions: array(AutomationConditionTraceNodeSchema),
|
|
16058
|
+
verdict: AutomationRunVerdictSchema.optional(),
|
|
16059
|
+
steps: array(AutomationStepTraceSchema),
|
|
16060
|
+
outcome: AutomationRunOutcomeSchema,
|
|
16061
|
+
/** How many identical consecutive skips this trace stands for (>= 1). */
|
|
16062
|
+
repeat: number().int().min(1),
|
|
16063
|
+
/** When the latest of those repeats happened. */
|
|
16064
|
+
lastAt: number()
|
|
16065
|
+
});
|
|
16066
|
+
/**
|
|
16067
|
+
* What the hub's `runs` ledger holds for one owner (`automation:<blockId>` or
|
|
16068
|
+
* `action:<actionId>`): the cooldown stamp and the trace ring.
|
|
16069
|
+
*/
|
|
16070
|
+
var AutomationStateDocSchema = object({
|
|
16071
|
+
version: literal(1),
|
|
16072
|
+
lastRunStartedAt: number().nullable(),
|
|
16073
|
+
traces: array(AutomationRunTraceSchema)
|
|
16074
|
+
});
|
|
16075
|
+
/**
|
|
16076
|
+
* Actions — named, runnable things an operator (or an automation) can start,
|
|
16077
|
+
* declared as LIST ENTRIES, never as devices.
|
|
16078
|
+
*
|
|
16079
|
+
* An entry is either **internal** (a short list of cap/wait steps kept in the
|
|
16080
|
+
* hub's `actions` record kind) or declared by an addon through the
|
|
16081
|
+
* `action-source` collection (a Home Assistant script, a scene …). The one
|
|
16082
|
+
* surface the UI and automations talk to is the `actions` cap; it keeps no
|
|
16083
|
+
* catalog of its own (D3) — every `list` asks the providers live.
|
|
16084
|
+
*
|
|
16085
|
+
* This file is the data half: the entry schema, the variables an entry may
|
|
16086
|
+
* declare, and the pure resolution of the values a run was given. It holds no
|
|
16087
|
+
* runtime.
|
|
16088
|
+
*/
|
|
16089
|
+
/** What a variable's value is. `select` takes one of `options`. */
|
|
16090
|
+
var ActionVariableTypeSchema = _enum([
|
|
16091
|
+
"string",
|
|
16092
|
+
"number",
|
|
16093
|
+
"boolean",
|
|
16094
|
+
"select"
|
|
16095
|
+
]);
|
|
16096
|
+
var ACTION_VARIABLE_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
16097
|
+
var ActionVariableValueSchema = union([
|
|
16098
|
+
string(),
|
|
16099
|
+
number(),
|
|
16100
|
+
boolean()
|
|
16101
|
+
]);
|
|
16102
|
+
/**
|
|
16103
|
+
* One declared variable. Steps reference it as `{ $var: 'name' }` (the whole
|
|
16104
|
+
* value) or `{{vars.name}}` (inside a string) in their args.
|
|
16105
|
+
*/
|
|
16106
|
+
var ActionVariableSchema = object({
|
|
16107
|
+
name: string().regex(ACTION_VARIABLE_NAME_RE),
|
|
16108
|
+
label: string().min(1).max(120).optional(),
|
|
16109
|
+
type: ActionVariableTypeSchema,
|
|
16110
|
+
required: boolean().optional(),
|
|
16111
|
+
default: ActionVariableValueSchema.optional(),
|
|
16112
|
+
/** The allowed values of a `select`. */
|
|
16113
|
+
options: array(string().min(1)).min(1).optional()
|
|
16114
|
+
}).superRefine((v, ctx) => {
|
|
16115
|
+
if (v.type === "select" && v.options === void 0) ctx.addIssue({
|
|
16116
|
+
code: "custom",
|
|
16117
|
+
message: "a select variable needs options",
|
|
16118
|
+
path: ["options"]
|
|
16119
|
+
});
|
|
16120
|
+
if (v.default !== void 0 && variableValueError(v, v.default) !== null) ctx.addIssue({
|
|
16121
|
+
code: "custom",
|
|
16122
|
+
message: variableValueError(v, v.default) ?? "invalid default",
|
|
16123
|
+
path: ["default"]
|
|
16124
|
+
});
|
|
16125
|
+
});
|
|
16126
|
+
/** Why `value` is not a legal value for the variable, or null when it is. */
|
|
16127
|
+
function variableValueError(variable, value) {
|
|
16128
|
+
switch (variable.type) {
|
|
16129
|
+
case "string": return typeof value === "string" ? null : `variable "${variable.name}" must be a string`;
|
|
16130
|
+
case "number": return typeof value === "number" && Number.isFinite(value) ? null : `variable "${variable.name}" must be a number`;
|
|
16131
|
+
case "boolean": return typeof value === "boolean" ? null : `variable "${variable.name}" must be true or false`;
|
|
16132
|
+
case "select": return typeof value === "string" && (variable.options ?? []).includes(value) ? null : `variable "${variable.name}" must be one of ${(variable.options ?? []).join(", ")}`;
|
|
16133
|
+
}
|
|
16134
|
+
}
|
|
16135
|
+
var ActionSourceKindSchema = _enum(["internal", "addon"]);
|
|
16136
|
+
function isInternalActionId(actionId) {
|
|
16137
|
+
return actionId.startsWith("internal:") && actionId.length > 9;
|
|
16138
|
+
}
|
|
16139
|
+
/** The addon behind a `<addonId>:<localId>` id, or null for anything else (internal included). */
|
|
16140
|
+
function addonIdOfActionId(actionId) {
|
|
16141
|
+
if (isInternalActionId(actionId)) return null;
|
|
16142
|
+
const at = actionId.indexOf(":");
|
|
16143
|
+
return at > 0 && at < actionId.length - 1 ? actionId.slice(0, at) : null;
|
|
16144
|
+
}
|
|
16145
|
+
var ActionStatusSchema = object({
|
|
16146
|
+
isRunning: boolean(),
|
|
16147
|
+
/** Ms epoch the latest run STARTED; null when it never ran. */
|
|
16148
|
+
lastRunAt: number().nullable(),
|
|
16149
|
+
/** The latest run's failure; null on success or when it never ran. */
|
|
16150
|
+
lastError: string().nullable()
|
|
16151
|
+
});
|
|
16152
|
+
var ActionEntrySchema = object({
|
|
16153
|
+
/** `internal:<uuid>` or `<addonId>:<localId>`. */
|
|
16154
|
+
id: string().min(3),
|
|
16155
|
+
name: string().min(1).max(120),
|
|
16156
|
+
/** The addon that declared it; `core-blocks` for an internal one. */
|
|
16157
|
+
addonId: string().min(1),
|
|
16158
|
+
source: ActionSourceKindSchema,
|
|
16159
|
+
/** An addon-declared entry is edited where it was declared. */
|
|
16160
|
+
readOnly: boolean(),
|
|
16161
|
+
/** Internal only: cap and wait steps. No action-in-action, so no cycles. */
|
|
16162
|
+
steps: array(ActionStepSchema).min(1).max(50).optional(),
|
|
16163
|
+
variables: array(ActionVariableSchema).max(20).optional(),
|
|
16164
|
+
status: ActionStatusSchema
|
|
16165
|
+
}).superRefine((entry, ctx) => {
|
|
16166
|
+
if (entry.source === "internal") {
|
|
16167
|
+
if (!isInternalActionId(entry.id)) ctx.addIssue({
|
|
16168
|
+
code: "custom",
|
|
16169
|
+
message: "an internal action id is internal:<uuid>",
|
|
16170
|
+
path: ["id"]
|
|
16171
|
+
});
|
|
16172
|
+
return;
|
|
16173
|
+
}
|
|
16174
|
+
if (entry.steps !== void 0) ctx.addIssue({
|
|
16175
|
+
code: "custom",
|
|
16176
|
+
message: "only an internal action carries steps",
|
|
16177
|
+
path: ["steps"]
|
|
16178
|
+
});
|
|
16179
|
+
if (!entry.readOnly) ctx.addIssue({
|
|
16180
|
+
code: "custom",
|
|
16181
|
+
message: "an addon action is read-only here",
|
|
16182
|
+
path: ["readOnly"]
|
|
16183
|
+
});
|
|
16184
|
+
if (addonIdOfActionId(entry.id) === null) ctx.addIssue({
|
|
16185
|
+
code: "custom",
|
|
16186
|
+
message: "an addon action id is <addonId>:<localId>",
|
|
16187
|
+
path: ["id"]
|
|
16188
|
+
});
|
|
16189
|
+
});
|
|
16190
|
+
/** What an operator writes for an internal action. */
|
|
16191
|
+
var ActionInputSchema = object({
|
|
16192
|
+
name: string().min(1).max(120),
|
|
16193
|
+
steps: array(ActionStepSchema).min(1).max(50),
|
|
16194
|
+
variables: array(ActionVariableSchema).max(20).optional()
|
|
16195
|
+
});
|
|
16196
|
+
/** Who started a run. Absent = the operator pressed it. */
|
|
16197
|
+
var ActionRunOriginSchema = object({
|
|
16198
|
+
/** The automation block whose step started it. */
|
|
16199
|
+
blockId: string().min(1).optional() });
|
|
16200
|
+
/** `started` = the caller did not ask to wait. */
|
|
16201
|
+
var ActionRunOutcomeSchema = union([AutomationRunOutcomeSchema, literal("started")]);
|
|
16202
|
+
var ActionRunResultSchema = object({
|
|
16203
|
+
runId: string().min(1),
|
|
16204
|
+
outcome: ActionRunOutcomeSchema,
|
|
16205
|
+
/** Why it did not run, or what failed. */
|
|
16206
|
+
message: string().optional()
|
|
16207
|
+
});
|
|
16208
|
+
_enum([
|
|
16209
|
+
"not-found",
|
|
16210
|
+
"read-only",
|
|
16211
|
+
"invalid-variables",
|
|
16212
|
+
"invalid-steps",
|
|
16213
|
+
"not-linked",
|
|
16214
|
+
"busy"
|
|
16215
|
+
]);
|
|
16216
|
+
object({
|
|
16217
|
+
actionId: string(),
|
|
16218
|
+
runId: string(),
|
|
16219
|
+
isRunning: boolean(),
|
|
16220
|
+
/** Set when the run ended. */
|
|
16221
|
+
outcome: AutomationRunOutcomeSchema.optional(),
|
|
16222
|
+
lastRunAt: number().nullable(),
|
|
16223
|
+
lastError: string().nullable()
|
|
16224
|
+
});
|
|
16225
|
+
/**
|
|
16226
|
+
* notification-output — canonical, capability-gated notification delivery.
|
|
16227
|
+
*
|
|
16228
|
+
* Apprise-derived model (see
|
|
16229
|
+
* `docs/superpowers/specs/2026-07-03-notification-output-notifier-matrix.md`):
|
|
16230
|
+
* callers emit ONE canonical `Notification`; each provider declares a
|
|
16231
|
+
* per-kind capability descriptor (`TargetKind`), and the pure degrade
|
|
16232
|
+
* engine (`@camstack/types` `prepareNotification`) transcodes / degrades the
|
|
16233
|
+
* message to what the kind supports — callers never special-case a service.
|
|
16234
|
+
*
|
|
16235
|
+
* DESIGN DECISIONS (locked):
|
|
16236
|
+
* - Target CRUD lives on THIS cap (`upsertTarget` / `deleteTarget` /
|
|
16237
|
+
* `setTargetEnabled`), each provider persisting via the `settings-store`
|
|
16238
|
+
* cap. Rationale: the admin UI needs one uniform surface across the
|
|
16239
|
+
* notifiers addon AND the HA addon; the addon-`globalSettingsSchema`-array
|
|
16240
|
+
* alternative would fork the UI per addon and cannot host the
|
|
16241
|
+
* discovery→adopt flow.
|
|
16242
|
+
* - `listTargetKinds` / `listTargets` / `discoverTargets` return arrays →
|
|
16243
|
+
* the generated cap-mount auto-`concatCollection`-fans them across every
|
|
16244
|
+
* registered provider (notifiers addon + HA addon) so one catalog is
|
|
16245
|
+
* routable. `send` / `testTarget` / CRUD route to ONE provider by the
|
|
16246
|
+
* `addonId` the generated collection router extracts from the call input.
|
|
16247
|
+
* - `Attachment.bytes` is `Uint8Array`. Transport-safe: superjson (the tRPC
|
|
16248
|
+
* transformer) + UDS MsgPack both round-trip typed arrays — already used by
|
|
16249
|
+
* `storage` / `storage-provider` / `recording` caps over the same path. No
|
|
16250
|
+
* base64 fallback needed.
|
|
16251
|
+
*
|
|
16252
|
+
* TODO (deferred, closed-set change — separate decision): add
|
|
16253
|
+
* `providerKind: 'notify'` so notification providers surface on the unified
|
|
16254
|
+
* admin "Integrations" page.
|
|
16255
|
+
*/
|
|
16256
|
+
/**
|
|
16257
|
+
* Zentik-derived typed-media enum — the superset across every kind. Each
|
|
16258
|
+
* adapter picks what it supports and the degrade engine filters the rest.
|
|
16259
|
+
*/
|
|
16260
|
+
var AttachmentMediaTypeSchema = _enum([
|
|
16261
|
+
"image",
|
|
16262
|
+
"video",
|
|
16263
|
+
"gif",
|
|
16264
|
+
"audio",
|
|
16265
|
+
"icon"
|
|
16266
|
+
]);
|
|
16267
|
+
/**
|
|
16268
|
+
* A single attachment. Exactly one of `url` (remote source, most adapters
|
|
16269
|
+
* prefer this) or `bytes` (inline source; required for Pushover-style
|
|
16270
|
+
* bytes-only kinds) MUST be present — the degrade engine expresses a
|
|
16271
|
+
* url→bytes fetch as a `needsFetch` directive the adapter executes.
|
|
16272
|
+
*/
|
|
16273
|
+
var AttachmentSchema = object({
|
|
16274
|
+
mediaType: AttachmentMediaTypeSchema,
|
|
16275
|
+
url: string().optional(),
|
|
16276
|
+
bytes: _instanceof(Uint8Array).optional(),
|
|
16277
|
+
mime: string().optional(),
|
|
16278
|
+
name: string().optional()
|
|
16279
|
+
}).refine((a) => a.url !== void 0 || a.bytes !== void 0, { message: "Attachment requires either `url` or `bytes`" });
|
|
16280
|
+
var NotificationFormatSchema = _enum([
|
|
16281
|
+
"text",
|
|
16282
|
+
"markdown",
|
|
16283
|
+
"html"
|
|
16284
|
+
]);
|
|
16285
|
+
/**
|
|
16286
|
+
* The CLOSED icon vocabulary an action button may use.
|
|
16287
|
+
*
|
|
16288
|
+
* A closed set, not a free string, and that is the whole point: an arbitrary
|
|
16289
|
+
* icon name is one that ntfy renders, zentik silently drops, and nobody
|
|
16290
|
+
* notices — the same class of gap as a zone vocabulary nothing produced
|
|
16291
|
+
* ([D35](../../../docs/decisions/adr-0035.md)). Every adapter maps this set or
|
|
16292
|
+
* declares `actionIcons: false` and the degrade engine strips the field.
|
|
16293
|
+
*
|
|
16294
|
+
* Named by INTENT, never by glyph. "check" would tie the vocabulary to one
|
|
16295
|
+
* renderer's icon set; "acknowledge" survives an adapter that draws it
|
|
16296
|
+
* differently.
|
|
16297
|
+
*
|
|
16298
|
+
* ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
|
|
16299
|
+
*
|
|
16300
|
+
* These names are for US. **No adapter may forward one verbatim.** Each maps
|
|
16301
|
+
* the whole set onto its own renderer's vocabulary through a
|
|
16302
|
+
* `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
|
|
16303
|
+
* fallback, so adding a member here fails every adapter's build until someone
|
|
16304
|
+
* decides its glyph, which is the only place that decision can be made
|
|
16305
|
+
* honestly.
|
|
16306
|
+
*
|
|
16307
|
+
* This paragraph is the bug. Zentik declared `actionIcons: true` and passed
|
|
16308
|
+
* `disarm` straight through; iOS feeds that string to
|
|
16309
|
+
* `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
|
|
16310
|
+
* and every snooze and alarm button arrived BLANK. A pass-through is not a
|
|
16311
|
+
* mapping, and "the field is documented" is not "the value renders".
|
|
16312
|
+
*
|
|
16313
|
+
* Adding a member is TRAIN-BOUND. The enum lives in the published
|
|
16314
|
+
* `@camstack/server` closure and the cap seam validates against the HUB's copy,
|
|
16315
|
+
* so an addon that emits a token the running hub does not know does not lose an
|
|
16316
|
+
* icon — its whole `send` fails Zod validation and the notification never
|
|
16317
|
+
* arrives. Never emit a new token from an addon before the train carrying it.
|
|
16318
|
+
*/
|
|
16319
|
+
var NotificationActionIconSchema = _enum([
|
|
16320
|
+
"acknowledge",
|
|
16321
|
+
"dismiss",
|
|
16322
|
+
"silence",
|
|
16323
|
+
"snooze",
|
|
16324
|
+
"view",
|
|
16325
|
+
"play",
|
|
16326
|
+
"open",
|
|
16327
|
+
"close",
|
|
16328
|
+
"lock",
|
|
16329
|
+
"unlock",
|
|
16330
|
+
"arm",
|
|
16331
|
+
"arm-home",
|
|
16332
|
+
"arm-away",
|
|
16333
|
+
"arm-night",
|
|
16334
|
+
"disarm",
|
|
16335
|
+
"light",
|
|
16336
|
+
"alert",
|
|
16337
|
+
"camera"
|
|
16338
|
+
]);
|
|
16339
|
+
/** A single tap-through action button. */
|
|
16340
|
+
var NotificationActionSchema = object({
|
|
16341
|
+
id: string(),
|
|
16342
|
+
label: string(),
|
|
16343
|
+
url: string().optional(),
|
|
16344
|
+
/** Dropped by the degrade engine for a kind with `caps.actionIcons: false`. */
|
|
16345
|
+
icon: NotificationActionIconSchema.optional(),
|
|
16346
|
+
/**
|
|
16347
|
+
* Renders in a warning style where the notifier supports it.
|
|
16348
|
+
*
|
|
16349
|
+
* A HINT, never a gate. The callback's authority is its token and nothing
|
|
16350
|
+
* else — see `notification-center/action-token.ts` for what that does and
|
|
16351
|
+
* does not buy.
|
|
16352
|
+
*/
|
|
16353
|
+
destructive: boolean().optional(),
|
|
16354
|
+
/**
|
|
16355
|
+
* How the tap should REACH the url.
|
|
16356
|
+
*
|
|
16357
|
+
* `navigate` (absent, and every button authored before this field) opens it:
|
|
16358
|
+
* the phone leaves the notification and shows whatever the callback returns.
|
|
16359
|
+
* That is right for a button whose answer the operator wants to read.
|
|
16360
|
+
*
|
|
16361
|
+
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
16362
|
+
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
16363
|
+
* an answer to the notification, and being thrown into a browser tab to
|
|
16364
|
+
* confirm it costs more attention than the notification did. A backend that
|
|
16365
|
+
* cannot do a background call renders it as an ordinary link (the adapters
|
|
16366
|
+
* fall back rather than dropping the button), so this is a preference, never
|
|
16367
|
+
* a requirement.
|
|
16368
|
+
*/
|
|
16369
|
+
mode: _enum(["navigate", "background"]).optional()
|
|
16370
|
+
});
|
|
16371
|
+
/** A delivery parameter value: what a notifier declared it takes. */
|
|
16372
|
+
var DeliveryParamValueSchema = union([
|
|
16373
|
+
string(),
|
|
16374
|
+
number(),
|
|
16375
|
+
boolean()
|
|
16376
|
+
]);
|
|
16377
|
+
/**
|
|
16378
|
+
* One extra delivery parameter a notifier KIND declares (D938). A rule that
|
|
16379
|
+
* addresses a target of that kind may set it; a kind that declares nothing is
|
|
16380
|
+
* never handed one. The admin UI derives its control from this descriptor —
|
|
16381
|
+
* no editor knows a service by name.
|
|
16382
|
+
*
|
|
16383
|
+
* Optional fields are `.optional()`, never `.default()` (a Zod default does not
|
|
16384
|
+
* run on the addon cap path).
|
|
16385
|
+
*/
|
|
16386
|
+
var DeliveryParamSchema = object({
|
|
16387
|
+
key: string().min(1),
|
|
16388
|
+
label: string(),
|
|
16389
|
+
/** i18n key of the label, resolved by the declaring addon's namespace. */
|
|
16390
|
+
labelKey: string().optional(),
|
|
16391
|
+
type: _enum([
|
|
16392
|
+
"enum",
|
|
16393
|
+
"number",
|
|
16394
|
+
"boolean",
|
|
16395
|
+
"string"
|
|
16396
|
+
]),
|
|
16397
|
+
/** `enum` only: the closed set of accepted values. */
|
|
16398
|
+
options: array(object({
|
|
16399
|
+
value: string(),
|
|
16400
|
+
label: string()
|
|
16401
|
+
})).optional(),
|
|
16402
|
+
/** `number` only. */
|
|
16403
|
+
min: number().optional(),
|
|
16404
|
+
max: number().optional(),
|
|
16405
|
+
/** What the notifier does when the rule sets nothing; shown as the placeholder. */
|
|
16406
|
+
default: DeliveryParamValueSchema.optional()
|
|
16407
|
+
});
|
|
16408
|
+
/**
|
|
16409
|
+
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
16410
|
+
* `priority` is a 5-level ORDINAL (1=lowest … 3=normal(default) … 5=urgent),
|
|
16411
|
+
* NOT a fixed severity enum — each kind declares its own `caps.levels` and
|
|
16412
|
+
* the adapter maps this ordinal onto its native level. `level?` is an
|
|
16413
|
+
* optional kind-native level id (`emergency`, `silent`, …) that overrides
|
|
16414
|
+
* `priority` for that one target.
|
|
16415
|
+
*/
|
|
16416
|
+
var NotificationSchema = object({
|
|
16417
|
+
body: string(),
|
|
16418
|
+
title: string().optional(),
|
|
16419
|
+
format: NotificationFormatSchema.default("text"),
|
|
16420
|
+
priority: number().int().min(1).max(5).default(3),
|
|
16421
|
+
level: string().optional(),
|
|
16422
|
+
attachments: array(AttachmentSchema).optional(),
|
|
16423
|
+
clickUrl: string().optional(),
|
|
16424
|
+
actions: array(NotificationActionSchema).optional(),
|
|
16425
|
+
sound: string().optional(),
|
|
16426
|
+
ttl: number().optional(),
|
|
16427
|
+
tag: string().optional(),
|
|
16428
|
+
deviceId: number().optional(),
|
|
16429
|
+
eventId: string().optional(),
|
|
16430
|
+
metadata: record(string(), unknown()).optional(),
|
|
16431
|
+
/**
|
|
16432
|
+
* Values for the parameters the target's kind DECLARES in
|
|
16433
|
+
* {@link TargetKindSchema} `deliveryParams`. Already validated against the
|
|
16434
|
+
* declaration by the sender; a notifier reads only the keys it declared.
|
|
16435
|
+
*/
|
|
16436
|
+
delivery: record(string(), DeliveryParamValueSchema).optional()
|
|
16437
|
+
});
|
|
16438
|
+
/** One declared native severity/priority level for a kind. */
|
|
16439
|
+
var TargetKindLevelSchema = object({
|
|
16440
|
+
id: string(),
|
|
16441
|
+
label: string(),
|
|
16442
|
+
/** Which canonical priority (1..5) this level maps to. `null` = qualitative-only. */
|
|
16443
|
+
ordinal: number().int().min(1).max(5).nullable(),
|
|
16444
|
+
flags: object({
|
|
16445
|
+
critical: boolean().optional(),
|
|
16446
|
+
silent: boolean().optional(),
|
|
16447
|
+
noPush: boolean().optional()
|
|
16448
|
+
}).optional(),
|
|
16449
|
+
/** e.g. Pushover `emergency` requires `retry` / `expire`. */
|
|
16450
|
+
requires: array(string()).optional(),
|
|
16451
|
+
description: string().optional()
|
|
16452
|
+
});
|
|
16453
|
+
/** The full capability block consulted before dispatch. */
|
|
16454
|
+
var TargetKindCapsSchema = object({
|
|
16455
|
+
attachments: object({
|
|
16456
|
+
mediaTypes: array(AttachmentMediaTypeSchema),
|
|
16457
|
+
mode: _enum([
|
|
16458
|
+
"url",
|
|
16459
|
+
"bytes",
|
|
16460
|
+
"both"
|
|
16461
|
+
]),
|
|
16462
|
+
max: number().int().nonnegative(),
|
|
16463
|
+
maxBytes: number().int().positive().optional()
|
|
16464
|
+
}),
|
|
16465
|
+
/** Max action buttons (0 = none). */
|
|
16466
|
+
actions: number().int().nonnegative(),
|
|
16467
|
+
/**
|
|
16468
|
+
* Whether this kind renders a per-action ICON.
|
|
16469
|
+
*
|
|
16470
|
+
* `.optional()`, deliberately NOT `.default(false)`: a Zod default does not
|
|
16471
|
+
* run on the addon cap path — three production failures in one day taught
|
|
16472
|
+
* this repo that once. Absent is read as false by the degrade engine, which
|
|
16473
|
+
* is the safe direction: an icon that is not rendered costs nothing, an icon
|
|
16474
|
+
* assumed and dropped costs the operator's trust in the field.
|
|
16475
|
+
*/
|
|
16476
|
+
actionIcons: boolean().optional(),
|
|
16477
|
+
levels: array(TargetKindLevelSchema),
|
|
16478
|
+
format: array(NotificationFormatSchema),
|
|
16479
|
+
clickUrl: boolean(),
|
|
16480
|
+
sound: boolean(),
|
|
16481
|
+
ttl: boolean(),
|
|
16482
|
+
bodyMaxLen: number().int().positive()
|
|
16483
|
+
});
|
|
16484
|
+
/**
|
|
16485
|
+
* `configSchema` is a `ConfigUISchema` tree passed through to the admin
|
|
16486
|
+
* FormBuilder. Stored as `z.unknown()` at the cap seam (mirrors
|
|
16487
|
+
* `device-provider.getChildCreationSchema` `CreationSchemaOutputSchema`) —
|
|
16488
|
+
* the union is large and not meant for runtime validation here; the exported
|
|
16489
|
+
* `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
|
|
16490
|
+
*/
|
|
16491
|
+
var ConfigSchemaPassthrough$3 = unknown();
|
|
16492
|
+
var TargetKindSchema = object({
|
|
16493
|
+
kind: string(),
|
|
16494
|
+
label: string(),
|
|
16495
|
+
icon: string(),
|
|
16496
|
+
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
16497
|
+
addonId: string(),
|
|
16498
|
+
/**
|
|
16499
|
+
* URL of the kind's bundled BRAND icon, served by the providing addon over
|
|
16500
|
+
* its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
|
|
16501
|
+
* when the addon bundles no icon for that kind — the client then falls back
|
|
16502
|
+
* to a neutral glyph rather than rendering the raw `icon` NAME as text.
|
|
16503
|
+
*
|
|
16504
|
+
* Root-relative on purpose: it resolves against whatever origin serves a web
|
|
16505
|
+
* client, and a native client joins it onto its own hub base.
|
|
16506
|
+
*
|
|
16507
|
+
* DECLARED here deliberately. It used to travel as an undeclared passthrough
|
|
16508
|
+
* field that survived only because the runtime cap-router forwards provider
|
|
16509
|
+
* output verbatim — so every consumer had to re-declare it by hand to stop
|
|
16510
|
+
* its own Zod parse from stripping it, and the whole arrangement would have
|
|
16511
|
+
* broken silently the moment output validation was tightened anywhere.
|
|
16512
|
+
*/
|
|
16513
|
+
iconUrl: string().optional(),
|
|
16514
|
+
/**
|
|
16515
|
+
* Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
|
|
16516
|
+
*
|
|
16517
|
+
* The server knows this and therefore says it, because the client cannot
|
|
16518
|
+
* safely guess: a React-Native client renders SVG and raster through two
|
|
16519
|
+
* DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
|
|
16520
|
+
* not decode SVG on iOS/Android), so without this it silently fell back to a
|
|
16521
|
+
* placeholder glyph for every vector icon while the web build looked fine.
|
|
16522
|
+
*
|
|
16523
|
+
* Absent when {@link iconUrl} is absent, or for a legacy provider that has
|
|
16524
|
+
* not been updated — a client that cannot determine the type should prefer
|
|
16525
|
+
* its raster path, which is the safe default for an unknown image.
|
|
16526
|
+
*/
|
|
16527
|
+
iconMediaType: string().optional(),
|
|
16528
|
+
configSchema: ConfigSchemaPassthrough$3,
|
|
16529
|
+
/**
|
|
16530
|
+
* The config keys that decide WHERE this kind's secrets are sent (server,
|
|
16531
|
+
* base URL, instance, chat, recipient). A save that changes any of them
|
|
16532
|
+
* while leaving a secret redacted is refused by the provider (D634), so an
|
|
16533
|
+
* editor uses this to ask for the secret on exactly those edits instead of
|
|
16534
|
+
* on every edit.
|
|
16535
|
+
*
|
|
16536
|
+
* Optional: absent from a provider that holds no secret (the Home Assistant
|
|
16537
|
+
* kinds) and from a provider older than this field — an editor that finds
|
|
16538
|
+
* it absent must assume ANY edit may need the secret.
|
|
16539
|
+
*/
|
|
16540
|
+
destinationKeys: array(string()).optional(),
|
|
16541
|
+
supportsDiscovery: boolean(),
|
|
16542
|
+
/**
|
|
16543
|
+
* Extra delivery parameters a rule may set for a target of this kind (D938).
|
|
16544
|
+
* Absent = none; the rule editor then offers nothing.
|
|
16545
|
+
*/
|
|
16546
|
+
deliveryParams: array(DeliveryParamSchema).optional(),
|
|
16547
|
+
caps: TargetKindCapsSchema
|
|
16548
|
+
});
|
|
16549
|
+
/**
|
|
16550
|
+
* A persisted target. `config` holds secrets; providers REDACT secret fields
|
|
16551
|
+
* (return a presence marker only) when serving `listTargets` — never
|
|
16552
|
+
* round-trip a stored secret to the UI.
|
|
16553
|
+
*/
|
|
16554
|
+
var TargetSchema = object({
|
|
16555
|
+
id: string(),
|
|
16556
|
+
name: string(),
|
|
16557
|
+
kind: string(),
|
|
16558
|
+
addonId: string(),
|
|
16559
|
+
enabled: boolean(),
|
|
16560
|
+
config: record(string(), unknown())
|
|
16561
|
+
});
|
|
16562
|
+
/** A discovery-surfaced candidate (config is partial + non-secret). */
|
|
16563
|
+
var DiscoveredTargetSchema = object({
|
|
16564
|
+
kind: string(),
|
|
16565
|
+
suggestedName: string(),
|
|
16566
|
+
config: record(string(), unknown())
|
|
16567
|
+
});
|
|
16568
|
+
/** The degrade engine's report — what was resolved / dropped / degraded. */
|
|
16569
|
+
var RenderedAsSchema = object({
|
|
16570
|
+
level: string(),
|
|
16571
|
+
format: NotificationFormatSchema,
|
|
16572
|
+
attachmentsSent: number().int().nonnegative(),
|
|
16573
|
+
actionsSent: number().int().nonnegative(),
|
|
16574
|
+
truncated: boolean(),
|
|
16575
|
+
dropped: array(string())
|
|
16576
|
+
});
|
|
16577
|
+
var SendResultSchema = object({
|
|
16578
|
+
success: boolean(),
|
|
16579
|
+
error: string().optional(),
|
|
16580
|
+
renderedAs: RenderedAsSchema.optional()
|
|
16581
|
+
});
|
|
16582
|
+
/** Same shape as SendResult — kept as a distinct name for the test panel. */
|
|
16583
|
+
var TestResultSchema = SendResultSchema;
|
|
16584
|
+
/**
|
|
16585
|
+
* Pre-save credential probe against a partial (unsaved) target config.
|
|
16586
|
+
* `resolvedUrl` never includes secrets (token stripped from path).
|
|
16587
|
+
*/
|
|
16588
|
+
var ProbeTargetConfigResultSchema = object({
|
|
16589
|
+
ok: boolean(),
|
|
16590
|
+
resolvedUrl: string(),
|
|
16591
|
+
httpStatus: number().int().optional(),
|
|
16592
|
+
stateInstance: string().optional(),
|
|
16593
|
+
error: string().optional()
|
|
16594
|
+
});
|
|
16595
|
+
method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSchema), { auth: "admin" }), method(object({ targetId: string() }), TargetSchema, { auth: "admin" }), method(object({
|
|
16596
|
+
kind: string(),
|
|
16597
|
+
config: record(string(), unknown()).optional(),
|
|
16598
|
+
/**
|
|
16599
|
+
* When editing / duplicating, the blank password field never round-trips
|
|
16600
|
+
* the stored token. Pass the source target id so the provider can restore
|
|
16601
|
+
* secrets server-side before dialling (same merge as upsert).
|
|
16602
|
+
*/
|
|
16603
|
+
targetId: string().optional()
|
|
16604
|
+
}), array(DiscoveredTargetSchema), { auth: "admin" }), method(object({
|
|
16605
|
+
kind: string(),
|
|
16606
|
+
config: record(string(), unknown()),
|
|
16607
|
+
/** See `discoverTargets.targetId` — restore stored secrets for a blank password. */
|
|
16608
|
+
targetId: string().optional()
|
|
16609
|
+
}), ProbeTargetConfigResultSchema, {
|
|
16610
|
+
kind: "mutation",
|
|
16611
|
+
auth: "admin"
|
|
16612
|
+
}), method(object({
|
|
16613
|
+
targetId: string(),
|
|
16614
|
+
notification: NotificationSchema
|
|
16615
|
+
}), SendResultSchema, {
|
|
16616
|
+
kind: "mutation",
|
|
16617
|
+
auth: "admin"
|
|
16618
|
+
}), method(object({
|
|
16619
|
+
targetId: string(),
|
|
16620
|
+
sample: NotificationSchema.optional()
|
|
16621
|
+
}), TestResultSchema, {
|
|
16622
|
+
kind: "mutation",
|
|
16623
|
+
auth: "admin"
|
|
16624
|
+
}), method(object({
|
|
16625
|
+
target: TargetSchema,
|
|
16626
|
+
/**
|
|
16627
|
+
* Duplicate flow: create a NEW target id while copying secrets from an
|
|
16628
|
+
* existing row. The UI never holds the stored token; blank / redacted
|
|
16629
|
+
* password fields are restored from this source (D634 still applies if
|
|
16630
|
+
* destinations diverge without a re-typed secret).
|
|
16631
|
+
*/
|
|
16632
|
+
cloneSecretsFrom: string().optional()
|
|
16633
|
+
}), TargetSchema, {
|
|
16634
|
+
kind: "mutation",
|
|
16635
|
+
auth: "admin"
|
|
16636
|
+
}), method(object({ targetId: string() }), _void(), {
|
|
16637
|
+
kind: "mutation",
|
|
16638
|
+
auth: "admin"
|
|
16639
|
+
}), method(object({
|
|
16640
|
+
targetId: string(),
|
|
16641
|
+
enabled: boolean()
|
|
16642
|
+
}), _void(), {
|
|
16643
|
+
kind: "mutation",
|
|
16644
|
+
auth: "admin"
|
|
15626
16645
|
});
|
|
15627
16646
|
/**
|
|
15628
16647
|
* `addon-pages` — system-scoped singleton aggregator cap. Public-facing
|
|
@@ -15656,52 +16675,6 @@ var AddonPageInfoSchema = object({
|
|
|
15656
16675
|
bundleUrl: string()
|
|
15657
16676
|
});
|
|
15658
16677
|
method(_void(), array(AddonPageInfoSchema).readonly());
|
|
15659
|
-
/**
|
|
15660
|
-
* `addon-pages-source` — collection cap exposing per-provider raw page
|
|
15661
|
-
* declarations. Every addon that contributes a UI page registers a
|
|
15662
|
-
* provider here. The hub-side singleton aggregator (`addon-pages` cap,
|
|
15663
|
-
* see `addon-pages.cap.ts`) walks this collection, stamps versioned
|
|
15664
|
-
* `bundleUrl` values, and returns the enriched `AddonPageInfo[]` list
|
|
15665
|
-
* that admin-ui consumes.
|
|
15666
|
-
*
|
|
15667
|
-
* The split exists because the public listing has a different output
|
|
15668
|
-
* shape than the per-provider raw declarations, and we want both ends
|
|
15669
|
-
* to flow through codegen instead of relying on a hand-written wrapper.
|
|
15670
|
-
*/
|
|
15671
|
-
var AddonPageDeclarationSchema = object({
|
|
15672
|
-
id: string(),
|
|
15673
|
-
label: string(),
|
|
15674
|
-
icon: string(),
|
|
15675
|
-
path: string(),
|
|
15676
|
-
/**
|
|
15677
|
-
* Module Federation remote name — must match the `name` field on the
|
|
15678
|
-
* page addon's `federation()` plugin config. Used by admin-ui's
|
|
15679
|
-
* `<AddonPageLoader>` to call `loadRemote('<remoteName>/page')`.
|
|
15680
|
-
* Conventionally `addon_<id>_page` (snake_case; MF names cannot
|
|
15681
|
-
* contain hyphens).
|
|
15682
|
-
*/
|
|
15683
|
-
remoteName: string(),
|
|
15684
|
-
/**
|
|
15685
|
-
* Bundle filename inside the addon's `dist/` dir served at
|
|
15686
|
-
* `/api/addon-pages/<addonId>/<bundle>`. With Module Federation this
|
|
15687
|
-
* is always `'remoteEntry.js'`; the value is kept on the metadata so
|
|
15688
|
-
* the static-file route can compute an mtime-based cache-buster URL
|
|
15689
|
-
* without a separate filesystem stat.
|
|
15690
|
-
*/
|
|
15691
|
-
bundle: string(),
|
|
15692
|
-
/**
|
|
15693
|
-
* Sidebar section this page docks into. Well-known ids: `'detection'`,
|
|
15694
|
-
* `'cluster'`, `'administration'` — the page renders inside that group.
|
|
15695
|
-
* Any OTHER string creates (or joins) a custom section rendered after
|
|
15696
|
-
* the built-in groups; its label comes from `sectionLabel` (first
|
|
15697
|
-
* declaration wins), falling back to the id. Absent → the legacy
|
|
15698
|
-
* "Addon Pages" group.
|
|
15699
|
-
*/
|
|
15700
|
-
section: string().optional(),
|
|
15701
|
-
/** Display label for a CUSTOM `section` id (ignored for well-known ids). */
|
|
15702
|
-
sectionLabel: string().optional()
|
|
15703
|
-
});
|
|
15704
|
-
method(_void(), array(AddonPageDeclarationSchema).readonly(), { auth: "admin" });
|
|
15705
16678
|
var AddonHttpRouteSchema = object({
|
|
15706
16679
|
method: _enum([
|
|
15707
16680
|
"GET",
|
|
@@ -16002,9 +16975,21 @@ var AlertSeveritySchema = _enum([
|
|
|
16002
16975
|
"error",
|
|
16003
16976
|
"critical"
|
|
16004
16977
|
]);
|
|
16978
|
+
/**
|
|
16979
|
+
* An action that RUNS something instead of going somewhere: the admin UI calls
|
|
16980
|
+
* the addon's custom action (`addons.custom`) with exactly these fields. The
|
|
16981
|
+
* producer owns the meaning; the UI knows nothing about the addon or the kind.
|
|
16982
|
+
*/
|
|
16983
|
+
var AlertActionInvokeSchema = object({
|
|
16984
|
+
addonId: string().min(1),
|
|
16985
|
+
action: string().min(1),
|
|
16986
|
+
input: record(string(), unknown()).optional()
|
|
16987
|
+
});
|
|
16988
|
+
/** An action has `href` (a link) OR `invoke` (a button that runs a custom action). */
|
|
16005
16989
|
var AlertActionSchema = object({
|
|
16006
16990
|
label: string(),
|
|
16007
16991
|
href: string().optional(),
|
|
16992
|
+
invoke: AlertActionInvokeSchema.optional(),
|
|
16008
16993
|
/**
|
|
16009
16994
|
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
16010
16995
|
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
@@ -18222,7 +19207,7 @@ var CompositionEventPlanSchema = object({
|
|
|
18222
19207
|
stateField: string(),
|
|
18223
19208
|
fieldKey: string()
|
|
18224
19209
|
});
|
|
18225
|
-
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.
|
|
19210
|
+
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.temperature`. */
|
|
18226
19211
|
var CompositionProblemSchema = object({
|
|
18227
19212
|
code: _enum([
|
|
18228
19213
|
"reserved-variant",
|
|
@@ -18251,7 +19236,11 @@ var CompositionProblemSchema = object({
|
|
|
18251
19236
|
"mixed-quantity",
|
|
18252
19237
|
"helper-mismatch",
|
|
18253
19238
|
"member-constraint",
|
|
18254
|
-
"retention"
|
|
19239
|
+
"retention",
|
|
19240
|
+
"command-method-unknown",
|
|
19241
|
+
"command-source-unknown",
|
|
19242
|
+
"command-input-unknown",
|
|
19243
|
+
"command-input-missing"
|
|
18255
19244
|
]),
|
|
18256
19245
|
path: string(),
|
|
18257
19246
|
message: string()
|
|
@@ -18290,7 +19279,9 @@ var CompositionFieldRoleSchema = _enum([
|
|
|
18290
19279
|
var CompositionFieldItemSchema = object({
|
|
18291
19280
|
arrayPath: string(),
|
|
18292
19281
|
key: string(),
|
|
18293
|
-
label: string()
|
|
19282
|
+
label: string(),
|
|
19283
|
+
/** True when the item carries a `reset` forward: the composer writes `resettable` from this (D967). */
|
|
19284
|
+
resettable: boolean().optional()
|
|
18294
19285
|
});
|
|
18295
19286
|
var CompositionFieldPlanSchema = object({
|
|
18296
19287
|
cap: string(),
|
|
@@ -18495,7 +19486,7 @@ Object.freeze({
|
|
|
18495
19486
|
* One catalog row per base reading a group helper can build (D944 §3).
|
|
18496
19487
|
* Data, not a form default written into the block.
|
|
18497
19488
|
*/
|
|
18498
|
-
var NOW$
|
|
19489
|
+
var NOW$3 = {
|
|
18499
19490
|
fieldPath: "lastFetchedAt",
|
|
18500
19491
|
expr: "now"
|
|
18501
19492
|
};
|
|
@@ -18504,12 +19495,13 @@ var CHANGED = {
|
|
|
18504
19495
|
expr: "now"
|
|
18505
19496
|
};
|
|
18506
19497
|
function numeric(input) {
|
|
19498
|
+
const { alsoFrom, ...base } = input;
|
|
18507
19499
|
return {
|
|
18508
|
-
...
|
|
19500
|
+
...base,
|
|
18509
19501
|
family: "numeric",
|
|
18510
19502
|
deviceType: DeviceType.Sensor,
|
|
18511
19503
|
memberDeviceType: DeviceType.Sensor,
|
|
18512
|
-
memberDeviceTypes: [DeviceType.Sensor],
|
|
19504
|
+
memberDeviceTypes: [DeviceType.Sensor, ...alsoFrom?.deviceTypes ?? []],
|
|
18513
19505
|
activeWhen: void 0,
|
|
18514
19506
|
commandCaps: [],
|
|
18515
19507
|
baseUnit: baseUnitOf(input.quantity),
|
|
@@ -18517,9 +19509,10 @@ function numeric(input) {
|
|
|
18517
19509
|
accept: [{
|
|
18518
19510
|
cap: input.outputCap,
|
|
18519
19511
|
fieldPath: input.outputField
|
|
18520
|
-
}]
|
|
19512
|
+
}, ...alsoFrom === void 0 ? [] : [alsoFrom.accept]]
|
|
18521
19513
|
};
|
|
18522
19514
|
}
|
|
19515
|
+
var CLIMATE_DEVICES = [DeviceType.Thermostat, DeviceType.Climate];
|
|
18523
19516
|
function binary(input) {
|
|
18524
19517
|
return {
|
|
18525
19518
|
...input,
|
|
@@ -18541,73 +19534,87 @@ var GROUP_TEMPLATES = [
|
|
|
18541
19534
|
summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
|
|
18542
19535
|
role: DeviceRole.TemperatureSensor,
|
|
18543
19536
|
outputCap: "temperature-sensor",
|
|
18544
|
-
outputField: "
|
|
19537
|
+
outputField: "temperature",
|
|
18545
19538
|
quantity: "temperature",
|
|
18546
19539
|
defaultAggregate: "mean",
|
|
18547
19540
|
empty: "null",
|
|
18548
|
-
companions: [NOW$
|
|
19541
|
+
companions: [NOW$3],
|
|
19542
|
+
alsoFrom: {
|
|
19543
|
+
deviceTypes: CLIMATE_DEVICES,
|
|
19544
|
+
accept: {
|
|
19545
|
+
cap: "climate-control",
|
|
19546
|
+
fieldPath: "currentTemp"
|
|
19547
|
+
}
|
|
19548
|
+
}
|
|
18549
19549
|
}),
|
|
18550
19550
|
numeric({
|
|
18551
19551
|
id: "humidity",
|
|
18552
19552
|
summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18553
19553
|
role: DeviceRole.HumiditySensor,
|
|
18554
19554
|
outputCap: "humidity-sensor",
|
|
18555
|
-
outputField: "
|
|
19555
|
+
outputField: "humidity",
|
|
18556
19556
|
quantity: "humidity",
|
|
18557
19557
|
defaultAggregate: "mean",
|
|
18558
19558
|
empty: "null",
|
|
18559
|
-
companions: [NOW$
|
|
19559
|
+
companions: [NOW$3],
|
|
19560
|
+
alsoFrom: {
|
|
19561
|
+
deviceTypes: CLIMATE_DEVICES,
|
|
19562
|
+
accept: {
|
|
19563
|
+
cap: "climate-control",
|
|
19564
|
+
fieldPath: "currentHumidity"
|
|
19565
|
+
}
|
|
19566
|
+
}
|
|
18560
19567
|
}),
|
|
18561
19568
|
numeric({
|
|
18562
19569
|
id: "pressure",
|
|
18563
19570
|
summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
|
|
18564
19571
|
role: DeviceRole.PressureSensor,
|
|
18565
19572
|
outputCap: "pressure-sensor",
|
|
18566
|
-
outputField: "
|
|
19573
|
+
outputField: "pressure",
|
|
18567
19574
|
quantity: "pressure",
|
|
18568
19575
|
defaultAggregate: "mean",
|
|
18569
19576
|
empty: "null",
|
|
18570
|
-
companions: [NOW$
|
|
19577
|
+
companions: [NOW$3]
|
|
18571
19578
|
}),
|
|
18572
19579
|
numeric({
|
|
18573
19580
|
id: "illuminance",
|
|
18574
19581
|
summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
|
|
18575
19582
|
role: DeviceRole.AmbientLightSensor,
|
|
18576
19583
|
outputCap: "ambient-light-sensor",
|
|
18577
|
-
outputField: "
|
|
19584
|
+
outputField: "illuminance",
|
|
18578
19585
|
quantity: "illuminance",
|
|
18579
19586
|
defaultAggregate: "mean",
|
|
18580
19587
|
empty: "null",
|
|
18581
|
-
companions: [NOW$
|
|
19588
|
+
companions: [NOW$3]
|
|
18582
19589
|
}),
|
|
18583
19590
|
numeric({
|
|
18584
19591
|
id: "power",
|
|
18585
19592
|
summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
|
|
18586
19593
|
role: DeviceRole.PowerSensor,
|
|
18587
19594
|
outputCap: "power-meter",
|
|
18588
|
-
outputField: "
|
|
19595
|
+
outputField: "power",
|
|
18589
19596
|
quantity: "power",
|
|
18590
19597
|
defaultAggregate: "sum",
|
|
18591
19598
|
empty: "omit",
|
|
18592
|
-
companions: [NOW$
|
|
19599
|
+
companions: [NOW$3]
|
|
18593
19600
|
}),
|
|
18594
19601
|
numeric({
|
|
18595
19602
|
id: "energy",
|
|
18596
19603
|
summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
|
|
18597
19604
|
role: DeviceRole.EnergySensor,
|
|
18598
19605
|
outputCap: "power-meter",
|
|
18599
|
-
outputField: "
|
|
19606
|
+
outputField: "energy",
|
|
18600
19607
|
quantity: "energy",
|
|
18601
19608
|
defaultAggregate: "sum",
|
|
18602
19609
|
empty: "omit",
|
|
18603
|
-
companions: [NOW$
|
|
19610
|
+
companions: [NOW$3]
|
|
18604
19611
|
}),
|
|
18605
19612
|
numeric({
|
|
18606
19613
|
id: "battery",
|
|
18607
19614
|
summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18608
19615
|
role: DeviceRole.BatterySensor,
|
|
18609
19616
|
outputCap: "battery",
|
|
18610
|
-
outputField: "
|
|
19617
|
+
outputField: "level",
|
|
18611
19618
|
quantity: "percentage",
|
|
18612
19619
|
defaultAggregate: "mean",
|
|
18613
19620
|
empty: "null",
|
|
@@ -18635,7 +19642,7 @@ var GROUP_TEMPLATES = [
|
|
|
18635
19642
|
quantity: "device",
|
|
18636
19643
|
defaultAggregate: "mean",
|
|
18637
19644
|
empty: "null",
|
|
18638
|
-
companions: [NOW$
|
|
19645
|
+
companions: [NOW$3]
|
|
18639
19646
|
}),
|
|
18640
19647
|
binary({
|
|
18641
19648
|
id: "motion",
|
|
@@ -19185,7 +20192,18 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
19185
20192
|
kind: "mutation",
|
|
19186
20193
|
auth: "admin",
|
|
19187
20194
|
access: "view"
|
|
19188
|
-
})
|
|
20195
|
+
}), method(object({
|
|
20196
|
+
blockId: string().min(1),
|
|
20197
|
+
trace: AutomationRunTraceSchema.optional(),
|
|
20198
|
+
runStartedAt: number().optional(),
|
|
20199
|
+
keepTraces: number().int().min(1).max(100).optional()
|
|
20200
|
+
}), _void(), {
|
|
20201
|
+
kind: "mutation",
|
|
20202
|
+
auth: "admin"
|
|
20203
|
+
}), method(object({ blockId: string().min(1) }), AutomationStateDocSchema, { auth: "admin" }), method(object({ blockId: string().min(1) }), object({
|
|
20204
|
+
traces: array(AutomationRunTraceSchema),
|
|
20205
|
+
lastError: string().nullable()
|
|
20206
|
+
}), { auth: "admin" });
|
|
19189
20207
|
/**
|
|
19190
20208
|
* `custom-model-registry` — collection cap exposing operator-registered
|
|
19191
20209
|
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
@@ -20970,6 +21988,36 @@ var ExposeInputSchema = object({
|
|
|
20970
21988
|
capabilities: array(string()).optional()
|
|
20971
21989
|
});
|
|
20972
21990
|
var UnexposeInputSchema = object({ deviceId: string() });
|
|
21991
|
+
/**
|
|
21992
|
+
* What an exporter may expose besides devices (D968). An action and a
|
|
21993
|
+
* notification target are LIST ENTRIES, never devices (D954): they enter an
|
|
21994
|
+
* exporter's own selection, not the device registry.
|
|
21995
|
+
*/
|
|
21996
|
+
var ExportEntityKindSchema = _enum([
|
|
21997
|
+
"device",
|
|
21998
|
+
"action",
|
|
21999
|
+
"notifier"
|
|
22000
|
+
]);
|
|
22001
|
+
var ExportEntityRefSchema = discriminatedUnion("kind", [
|
|
22002
|
+
object({
|
|
22003
|
+
kind: literal("device"),
|
|
22004
|
+
deviceId: string()
|
|
22005
|
+
}),
|
|
22006
|
+
object({
|
|
22007
|
+
kind: literal("action"),
|
|
22008
|
+
actionId: string().min(1)
|
|
22009
|
+
}),
|
|
22010
|
+
object({
|
|
22011
|
+
kind: literal("notifier"),
|
|
22012
|
+
targetId: string().min(1)
|
|
22013
|
+
})
|
|
22014
|
+
]);
|
|
22015
|
+
var ExposedEntitySchema = object({
|
|
22016
|
+
entity: ExportEntityRefSchema,
|
|
22017
|
+
exposedAs: string().optional()
|
|
22018
|
+
});
|
|
22019
|
+
var ExposeEntityInputSchema = object({ entity: ExportEntityRefSchema });
|
|
22020
|
+
var UnexposeEntityInputSchema = object({ entity: ExportEntityRefSchema });
|
|
20973
22021
|
var deviceExportCapability = {
|
|
20974
22022
|
name: "device-export",
|
|
20975
22023
|
scope: "system",
|
|
@@ -20999,6 +22047,16 @@ var deviceExportCapability = {
|
|
|
20999
22047
|
unexposeDevice: method(UnexposeInputSchema, _void(), {
|
|
21000
22048
|
kind: "mutation",
|
|
21001
22049
|
auth: "admin"
|
|
22050
|
+
}),
|
|
22051
|
+
listSupportedEntityKinds: optionalMethod(_void(), array(ExportEntityKindSchema)),
|
|
22052
|
+
listExposedEntities: optionalMethod(_void(), array(ExposedEntitySchema)),
|
|
22053
|
+
exposeEntity: optionalMethod(ExposeEntityInputSchema, _void(), {
|
|
22054
|
+
kind: "mutation",
|
|
22055
|
+
auth: "admin"
|
|
22056
|
+
}),
|
|
22057
|
+
unexposeEntity: optionalMethod(UnexposeEntityInputSchema, _void(), {
|
|
22058
|
+
kind: "mutation",
|
|
22059
|
+
auth: "admin"
|
|
21002
22060
|
})
|
|
21003
22061
|
}
|
|
21004
22062
|
};
|
|
@@ -42141,6 +43199,14 @@ method(object({
|
|
|
42141
43199
|
kind: "mutation",
|
|
42142
43200
|
auth: "admin"
|
|
42143
43201
|
});
|
|
43202
|
+
method(object({
|
|
43203
|
+
nodeId: string().min(1),
|
|
43204
|
+
/** Epoch ms the node was forgotten (the tombstone's `removedAt`). */
|
|
43205
|
+
removedAt: number()
|
|
43206
|
+
}), object({ counts: record(string(), number().int().nonnegative()) }), {
|
|
43207
|
+
kind: "mutation",
|
|
43208
|
+
auth: "admin"
|
|
43209
|
+
});
|
|
42144
43210
|
/**
|
|
42145
43211
|
* `device-removal-hook` — the reliable way an addon learns a device was DELETED,
|
|
42146
43212
|
* so it can delete what it keeps for that device (D865).
|
|
@@ -42788,6 +43854,17 @@ var LlmProfileSchema = object({
|
|
|
42788
43854
|
* field in its editor only when its descriptor lists it in `profileFields`. */
|
|
42789
43855
|
topK: number().int().positive().optional(),
|
|
42790
43856
|
maxTokens: number().int().positive().optional(),
|
|
43857
|
+
/** How hard the model "thinks" before it answers. Omitted = the model's own
|
|
43858
|
+
* default. `off` matters for structured output: a thinking model can spend
|
|
43859
|
+
* the whole completion on reasoning and return an empty `content`. Carried
|
|
43860
|
+
* only by the wires that have it — a kind offers the field in its editor
|
|
43861
|
+
* only when its descriptor lists it in `profileFields`. */
|
|
43862
|
+
reasoningEffort: _enum([
|
|
43863
|
+
"off",
|
|
43864
|
+
"low",
|
|
43865
|
+
"medium",
|
|
43866
|
+
"high"
|
|
43867
|
+
]).optional(),
|
|
42791
43868
|
/** Prompt context window. Advisory for cloud kinds (they enforce their own). */
|
|
42792
43869
|
contextLength: number().int().positive().optional(),
|
|
42793
43870
|
/** Default system prompt. A caller's `system` REPLACES it (never appends —
|
|
@@ -42826,6 +43903,7 @@ var LlmProfileFieldSchema = _enum([
|
|
|
42826
43903
|
"topP",
|
|
42827
43904
|
"topK",
|
|
42828
43905
|
"maxTokens",
|
|
43906
|
+
"reasoningEffort",
|
|
42829
43907
|
"contextLength",
|
|
42830
43908
|
"systemPrompt",
|
|
42831
43909
|
"timeoutMs",
|
|
@@ -42849,7 +43927,7 @@ var LlmProviderWidgetSchema = object({
|
|
|
42849
43927
|
/** ConfigUISchema tree passed through untyped on the wire (the
|
|
42850
43928
|
* notification-output `ConfigSchemaPassthrough` precedent at
|
|
42851
43929
|
* notification-output.cap.ts:151); the exported TS type re-tightens it. */
|
|
42852
|
-
var ConfigSchemaPassthrough$
|
|
43930
|
+
var ConfigSchemaPassthrough$2 = unknown();
|
|
42853
43931
|
var LlmProfileKindDescriptorSchema = object({
|
|
42854
43932
|
kind: LlmProfileKindSchema,
|
|
42855
43933
|
label: string(),
|
|
@@ -42858,9 +43936,9 @@ var LlmProfileKindDescriptorSchema = object({
|
|
|
42858
43936
|
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
42859
43937
|
addonId: string(),
|
|
42860
43938
|
/** The provider's own fields (`providerConfig`); `password` fields are keychain-held. */
|
|
42861
|
-
connectionSchema: ConfigSchemaPassthrough$
|
|
43939
|
+
connectionSchema: ConfigSchemaPassthrough$2,
|
|
42862
43940
|
/** Provider fields that belong under "Advanced" (extra headers, runtime tuning). */
|
|
42863
|
-
advancedSchema: ConfigSchemaPassthrough$
|
|
43941
|
+
advancedSchema: ConfigSchemaPassthrough$2.optional(),
|
|
42864
43942
|
/** The kind's defaults; a model from `listModels` may override any of them. */
|
|
42865
43943
|
features: LlmModelFeaturesSchema,
|
|
42866
43944
|
/** `false` = the provider stamps `supportsVision` itself (from what a node reports). */
|
|
@@ -43386,10 +44464,10 @@ var CpuBreakdownSchema = object({
|
|
|
43386
44464
|
cores: number()
|
|
43387
44465
|
});
|
|
43388
44466
|
var MemoryInfoSchema = object({
|
|
43389
|
-
percent: number(),
|
|
44467
|
+
percent: number().nullable(),
|
|
43390
44468
|
totalBytes: number(),
|
|
43391
|
-
usedBytes: number(),
|
|
43392
|
-
availableBytes: number(),
|
|
44469
|
+
usedBytes: number().nullable(),
|
|
44470
|
+
availableBytes: number().nullable(),
|
|
43393
44471
|
swapUsedBytes: number(),
|
|
43394
44472
|
swapTotalBytes: number()
|
|
43395
44473
|
});
|
|
@@ -43693,8 +44771,9 @@ var GetLoadSeriesInputSchema = object({
|
|
|
43693
44771
|
});
|
|
43694
44772
|
var SystemMetricsSchema = object({
|
|
43695
44773
|
cpuPercent: number(),
|
|
43696
|
-
|
|
43697
|
-
|
|
44774
|
+
/** `null` when the memory sample failed or was not taken yet (D393). */
|
|
44775
|
+
memoryPercent: number().nullable(),
|
|
44776
|
+
memoryUsedMB: number().nullable(),
|
|
43698
44777
|
memoryTotalMB: number(),
|
|
43699
44778
|
diskPercent: number().optional(),
|
|
43700
44779
|
temperature: number().optional(),
|
|
@@ -43930,424 +45009,6 @@ var NetworkEndpointEntrySchema = NetworkEndpointSchema.extend({
|
|
|
43930
45009
|
sourcePort: number().optional()
|
|
43931
45010
|
});
|
|
43932
45011
|
method(_void(), NetworkEndpointSchema, { kind: "mutation" }), method(_void(), _void(), { kind: "mutation" }), method(_void(), NetworkEndpointSchema.nullable()), method(_void(), NetworkAccessStatusSchema), method(_void(), array(NetworkEndpointEntrySchema).readonly());
|
|
43933
|
-
/**
|
|
43934
|
-
* notification-output — canonical, capability-gated notification delivery.
|
|
43935
|
-
*
|
|
43936
|
-
* Apprise-derived model (see
|
|
43937
|
-
* `docs/superpowers/specs/2026-07-03-notification-output-notifier-matrix.md`):
|
|
43938
|
-
* callers emit ONE canonical `Notification`; each provider declares a
|
|
43939
|
-
* per-kind capability descriptor (`TargetKind`), and the pure degrade
|
|
43940
|
-
* engine (`@camstack/types` `prepareNotification`) transcodes / degrades the
|
|
43941
|
-
* message to what the kind supports — callers never special-case a service.
|
|
43942
|
-
*
|
|
43943
|
-
* DESIGN DECISIONS (locked):
|
|
43944
|
-
* - Target CRUD lives on THIS cap (`upsertTarget` / `deleteTarget` /
|
|
43945
|
-
* `setTargetEnabled`), each provider persisting via the `settings-store`
|
|
43946
|
-
* cap. Rationale: the admin UI needs one uniform surface across the
|
|
43947
|
-
* notifiers addon AND the HA addon; the addon-`globalSettingsSchema`-array
|
|
43948
|
-
* alternative would fork the UI per addon and cannot host the
|
|
43949
|
-
* discovery→adopt flow.
|
|
43950
|
-
* - `listTargetKinds` / `listTargets` / `discoverTargets` return arrays →
|
|
43951
|
-
* the generated cap-mount auto-`concatCollection`-fans them across every
|
|
43952
|
-
* registered provider (notifiers addon + HA addon) so one catalog is
|
|
43953
|
-
* routable. `send` / `testTarget` / CRUD route to ONE provider by the
|
|
43954
|
-
* `addonId` the generated collection router extracts from the call input.
|
|
43955
|
-
* - `Attachment.bytes` is `Uint8Array`. Transport-safe: superjson (the tRPC
|
|
43956
|
-
* transformer) + UDS MsgPack both round-trip typed arrays — already used by
|
|
43957
|
-
* `storage` / `storage-provider` / `recording` caps over the same path. No
|
|
43958
|
-
* base64 fallback needed.
|
|
43959
|
-
*
|
|
43960
|
-
* TODO (deferred, closed-set change — separate decision): add
|
|
43961
|
-
* `providerKind: 'notify'` so notification providers surface on the unified
|
|
43962
|
-
* admin "Integrations" page.
|
|
43963
|
-
*/
|
|
43964
|
-
/**
|
|
43965
|
-
* Zentik-derived typed-media enum — the superset across every kind. Each
|
|
43966
|
-
* adapter picks what it supports and the degrade engine filters the rest.
|
|
43967
|
-
*/
|
|
43968
|
-
var AttachmentMediaTypeSchema = _enum([
|
|
43969
|
-
"image",
|
|
43970
|
-
"video",
|
|
43971
|
-
"gif",
|
|
43972
|
-
"audio",
|
|
43973
|
-
"icon"
|
|
43974
|
-
]);
|
|
43975
|
-
/**
|
|
43976
|
-
* A single attachment. Exactly one of `url` (remote source, most adapters
|
|
43977
|
-
* prefer this) or `bytes` (inline source; required for Pushover-style
|
|
43978
|
-
* bytes-only kinds) MUST be present — the degrade engine expresses a
|
|
43979
|
-
* url→bytes fetch as a `needsFetch` directive the adapter executes.
|
|
43980
|
-
*/
|
|
43981
|
-
var AttachmentSchema = object({
|
|
43982
|
-
mediaType: AttachmentMediaTypeSchema,
|
|
43983
|
-
url: string().optional(),
|
|
43984
|
-
bytes: _instanceof(Uint8Array).optional(),
|
|
43985
|
-
mime: string().optional(),
|
|
43986
|
-
name: string().optional()
|
|
43987
|
-
}).refine((a) => a.url !== void 0 || a.bytes !== void 0, { message: "Attachment requires either `url` or `bytes`" });
|
|
43988
|
-
var NotificationFormatSchema = _enum([
|
|
43989
|
-
"text",
|
|
43990
|
-
"markdown",
|
|
43991
|
-
"html"
|
|
43992
|
-
]);
|
|
43993
|
-
/**
|
|
43994
|
-
* The CLOSED icon vocabulary an action button may use.
|
|
43995
|
-
*
|
|
43996
|
-
* A closed set, not a free string, and that is the whole point: an arbitrary
|
|
43997
|
-
* icon name is one that ntfy renders, zentik silently drops, and nobody
|
|
43998
|
-
* notices — the same class of gap as a zone vocabulary nothing produced
|
|
43999
|
-
* ([D35](../../../docs/decisions/adr-0035.md)). Every adapter maps this set or
|
|
44000
|
-
* declares `actionIcons: false` and the degrade engine strips the field.
|
|
44001
|
-
*
|
|
44002
|
-
* Named by INTENT, never by glyph. "check" would tie the vocabulary to one
|
|
44003
|
-
* renderer's icon set; "acknowledge" survives an adapter that draws it
|
|
44004
|
-
* differently.
|
|
44005
|
-
*
|
|
44006
|
-
* ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
|
|
44007
|
-
*
|
|
44008
|
-
* These names are for US. **No adapter may forward one verbatim.** Each maps
|
|
44009
|
-
* the whole set onto its own renderer's vocabulary through a
|
|
44010
|
-
* `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
|
|
44011
|
-
* fallback, so adding a member here fails every adapter's build until someone
|
|
44012
|
-
* decides its glyph, which is the only place that decision can be made
|
|
44013
|
-
* honestly.
|
|
44014
|
-
*
|
|
44015
|
-
* This paragraph is the bug. Zentik declared `actionIcons: true` and passed
|
|
44016
|
-
* `disarm` straight through; iOS feeds that string to
|
|
44017
|
-
* `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
|
|
44018
|
-
* and every snooze and alarm button arrived BLANK. A pass-through is not a
|
|
44019
|
-
* mapping, and "the field is documented" is not "the value renders".
|
|
44020
|
-
*
|
|
44021
|
-
* Adding a member is TRAIN-BOUND. The enum lives in the published
|
|
44022
|
-
* `@camstack/server` closure and the cap seam validates against the HUB's copy,
|
|
44023
|
-
* so an addon that emits a token the running hub does not know does not lose an
|
|
44024
|
-
* icon — its whole `send` fails Zod validation and the notification never
|
|
44025
|
-
* arrives. Never emit a new token from an addon before the train carrying it.
|
|
44026
|
-
*/
|
|
44027
|
-
var NotificationActionIconSchema = _enum([
|
|
44028
|
-
"acknowledge",
|
|
44029
|
-
"dismiss",
|
|
44030
|
-
"silence",
|
|
44031
|
-
"snooze",
|
|
44032
|
-
"view",
|
|
44033
|
-
"play",
|
|
44034
|
-
"open",
|
|
44035
|
-
"close",
|
|
44036
|
-
"lock",
|
|
44037
|
-
"unlock",
|
|
44038
|
-
"arm",
|
|
44039
|
-
"arm-home",
|
|
44040
|
-
"arm-away",
|
|
44041
|
-
"arm-night",
|
|
44042
|
-
"disarm",
|
|
44043
|
-
"light",
|
|
44044
|
-
"alert",
|
|
44045
|
-
"camera"
|
|
44046
|
-
]);
|
|
44047
|
-
/** A single tap-through action button. */
|
|
44048
|
-
var NotificationActionSchema = object({
|
|
44049
|
-
id: string(),
|
|
44050
|
-
label: string(),
|
|
44051
|
-
url: string().optional(),
|
|
44052
|
-
/** Dropped by the degrade engine for a kind with `caps.actionIcons: false`. */
|
|
44053
|
-
icon: NotificationActionIconSchema.optional(),
|
|
44054
|
-
/**
|
|
44055
|
-
* Renders in a warning style where the notifier supports it.
|
|
44056
|
-
*
|
|
44057
|
-
* A HINT, never a gate. The callback's authority is its token and nothing
|
|
44058
|
-
* else — see `notification-center/action-token.ts` for what that does and
|
|
44059
|
-
* does not buy.
|
|
44060
|
-
*/
|
|
44061
|
-
destructive: boolean().optional(),
|
|
44062
|
-
/**
|
|
44063
|
-
* How the tap should REACH the url.
|
|
44064
|
-
*
|
|
44065
|
-
* `navigate` (absent, and every button authored before this field) opens it:
|
|
44066
|
-
* the phone leaves the notification and shows whatever the callback returns.
|
|
44067
|
-
* That is right for a button whose answer the operator wants to read.
|
|
44068
|
-
*
|
|
44069
|
-
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
44070
|
-
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
44071
|
-
* an answer to the notification, and being thrown into a browser tab to
|
|
44072
|
-
* confirm it costs more attention than the notification did. A backend that
|
|
44073
|
-
* cannot do a background call renders it as an ordinary link (the adapters
|
|
44074
|
-
* fall back rather than dropping the button), so this is a preference, never
|
|
44075
|
-
* a requirement.
|
|
44076
|
-
*/
|
|
44077
|
-
mode: _enum(["navigate", "background"]).optional()
|
|
44078
|
-
});
|
|
44079
|
-
/**
|
|
44080
|
-
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
44081
|
-
* `priority` is a 5-level ORDINAL (1=lowest … 3=normal(default) … 5=urgent),
|
|
44082
|
-
* NOT a fixed severity enum — each kind declares its own `caps.levels` and
|
|
44083
|
-
* the adapter maps this ordinal onto its native level. `level?` is an
|
|
44084
|
-
* optional kind-native level id (`emergency`, `silent`, …) that overrides
|
|
44085
|
-
* `priority` for that one target.
|
|
44086
|
-
*/
|
|
44087
|
-
var NotificationSchema = object({
|
|
44088
|
-
body: string(),
|
|
44089
|
-
title: string().optional(),
|
|
44090
|
-
format: NotificationFormatSchema.default("text"),
|
|
44091
|
-
priority: number().int().min(1).max(5).default(3),
|
|
44092
|
-
level: string().optional(),
|
|
44093
|
-
attachments: array(AttachmentSchema).optional(),
|
|
44094
|
-
clickUrl: string().optional(),
|
|
44095
|
-
actions: array(NotificationActionSchema).optional(),
|
|
44096
|
-
sound: string().optional(),
|
|
44097
|
-
ttl: number().optional(),
|
|
44098
|
-
tag: string().optional(),
|
|
44099
|
-
deviceId: number().optional(),
|
|
44100
|
-
eventId: string().optional(),
|
|
44101
|
-
metadata: record(string(), unknown()).optional()
|
|
44102
|
-
});
|
|
44103
|
-
/** One declared native severity/priority level for a kind. */
|
|
44104
|
-
var TargetKindLevelSchema = object({
|
|
44105
|
-
id: string(),
|
|
44106
|
-
label: string(),
|
|
44107
|
-
/** Which canonical priority (1..5) this level maps to. `null` = qualitative-only. */
|
|
44108
|
-
ordinal: number().int().min(1).max(5).nullable(),
|
|
44109
|
-
flags: object({
|
|
44110
|
-
critical: boolean().optional(),
|
|
44111
|
-
silent: boolean().optional(),
|
|
44112
|
-
noPush: boolean().optional()
|
|
44113
|
-
}).optional(),
|
|
44114
|
-
/** e.g. Pushover `emergency` requires `retry` / `expire`. */
|
|
44115
|
-
requires: array(string()).optional(),
|
|
44116
|
-
description: string().optional()
|
|
44117
|
-
});
|
|
44118
|
-
/** The full capability block consulted before dispatch. */
|
|
44119
|
-
var TargetKindCapsSchema = object({
|
|
44120
|
-
attachments: object({
|
|
44121
|
-
mediaTypes: array(AttachmentMediaTypeSchema),
|
|
44122
|
-
mode: _enum([
|
|
44123
|
-
"url",
|
|
44124
|
-
"bytes",
|
|
44125
|
-
"both"
|
|
44126
|
-
]),
|
|
44127
|
-
max: number().int().nonnegative(),
|
|
44128
|
-
maxBytes: number().int().positive().optional()
|
|
44129
|
-
}),
|
|
44130
|
-
/** Max action buttons (0 = none). */
|
|
44131
|
-
actions: number().int().nonnegative(),
|
|
44132
|
-
/**
|
|
44133
|
-
* Whether this kind renders a per-action ICON.
|
|
44134
|
-
*
|
|
44135
|
-
* `.optional()`, deliberately NOT `.default(false)`: a Zod default does not
|
|
44136
|
-
* run on the addon cap path — three production failures in one day taught
|
|
44137
|
-
* this repo that once. Absent is read as false by the degrade engine, which
|
|
44138
|
-
* is the safe direction: an icon that is not rendered costs nothing, an icon
|
|
44139
|
-
* assumed and dropped costs the operator's trust in the field.
|
|
44140
|
-
*/
|
|
44141
|
-
actionIcons: boolean().optional(),
|
|
44142
|
-
levels: array(TargetKindLevelSchema),
|
|
44143
|
-
format: array(NotificationFormatSchema),
|
|
44144
|
-
clickUrl: boolean(),
|
|
44145
|
-
sound: boolean(),
|
|
44146
|
-
ttl: boolean(),
|
|
44147
|
-
bodyMaxLen: number().int().positive()
|
|
44148
|
-
});
|
|
44149
|
-
/**
|
|
44150
|
-
* `configSchema` is a `ConfigUISchema` tree passed through to the admin
|
|
44151
|
-
* FormBuilder. Stored as `z.unknown()` at the cap seam (mirrors
|
|
44152
|
-
* `device-provider.getChildCreationSchema` `CreationSchemaOutputSchema`) —
|
|
44153
|
-
* the union is large and not meant for runtime validation here; the exported
|
|
44154
|
-
* `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
|
|
44155
|
-
*/
|
|
44156
|
-
var ConfigSchemaPassthrough$2 = unknown();
|
|
44157
|
-
var TargetKindSchema = object({
|
|
44158
|
-
kind: string(),
|
|
44159
|
-
label: string(),
|
|
44160
|
-
icon: string(),
|
|
44161
|
-
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
44162
|
-
addonId: string(),
|
|
44163
|
-
/**
|
|
44164
|
-
* URL of the kind's bundled BRAND icon, served by the providing addon over
|
|
44165
|
-
* its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
|
|
44166
|
-
* when the addon bundles no icon for that kind — the client then falls back
|
|
44167
|
-
* to a neutral glyph rather than rendering the raw `icon` NAME as text.
|
|
44168
|
-
*
|
|
44169
|
-
* Root-relative on purpose: it resolves against whatever origin serves a web
|
|
44170
|
-
* client, and a native client joins it onto its own hub base.
|
|
44171
|
-
*
|
|
44172
|
-
* DECLARED here deliberately. It used to travel as an undeclared passthrough
|
|
44173
|
-
* field that survived only because the runtime cap-router forwards provider
|
|
44174
|
-
* output verbatim — so every consumer had to re-declare it by hand to stop
|
|
44175
|
-
* its own Zod parse from stripping it, and the whole arrangement would have
|
|
44176
|
-
* broken silently the moment output validation was tightened anywhere.
|
|
44177
|
-
*/
|
|
44178
|
-
iconUrl: string().optional(),
|
|
44179
|
-
/**
|
|
44180
|
-
* Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
|
|
44181
|
-
*
|
|
44182
|
-
* The server knows this and therefore says it, because the client cannot
|
|
44183
|
-
* safely guess: a React-Native client renders SVG and raster through two
|
|
44184
|
-
* DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
|
|
44185
|
-
* not decode SVG on iOS/Android), so without this it silently fell back to a
|
|
44186
|
-
* placeholder glyph for every vector icon while the web build looked fine.
|
|
44187
|
-
*
|
|
44188
|
-
* Absent when {@link iconUrl} is absent, or for a legacy provider that has
|
|
44189
|
-
* not been updated — a client that cannot determine the type should prefer
|
|
44190
|
-
* its raster path, which is the safe default for an unknown image.
|
|
44191
|
-
*/
|
|
44192
|
-
iconMediaType: string().optional(),
|
|
44193
|
-
configSchema: ConfigSchemaPassthrough$2,
|
|
44194
|
-
/**
|
|
44195
|
-
* The config keys that decide WHERE this kind's secrets are sent (server,
|
|
44196
|
-
* base URL, instance, chat, recipient). A save that changes any of them
|
|
44197
|
-
* while leaving a secret redacted is refused by the provider (D634), so an
|
|
44198
|
-
* editor uses this to ask for the secret on exactly those edits instead of
|
|
44199
|
-
* on every edit.
|
|
44200
|
-
*
|
|
44201
|
-
* Optional: absent from a provider that holds no secret (the Home Assistant
|
|
44202
|
-
* kinds) and from a provider older than this field — an editor that finds
|
|
44203
|
-
* it absent must assume ANY edit may need the secret.
|
|
44204
|
-
*/
|
|
44205
|
-
destinationKeys: array(string()).optional(),
|
|
44206
|
-
supportsDiscovery: boolean(),
|
|
44207
|
-
caps: TargetKindCapsSchema
|
|
44208
|
-
});
|
|
44209
|
-
/**
|
|
44210
|
-
* A persisted target. `config` holds secrets; providers REDACT secret fields
|
|
44211
|
-
* (return a presence marker only) when serving `listTargets` — never
|
|
44212
|
-
* round-trip a stored secret to the UI.
|
|
44213
|
-
*/
|
|
44214
|
-
var TargetSchema = object({
|
|
44215
|
-
id: string(),
|
|
44216
|
-
name: string(),
|
|
44217
|
-
kind: string(),
|
|
44218
|
-
addonId: string(),
|
|
44219
|
-
enabled: boolean(),
|
|
44220
|
-
config: record(string(), unknown())
|
|
44221
|
-
});
|
|
44222
|
-
/** A discovery-surfaced candidate (config is partial + non-secret). */
|
|
44223
|
-
var DiscoveredTargetSchema = object({
|
|
44224
|
-
kind: string(),
|
|
44225
|
-
suggestedName: string(),
|
|
44226
|
-
config: record(string(), unknown())
|
|
44227
|
-
});
|
|
44228
|
-
/** The degrade engine's report — what was resolved / dropped / degraded. */
|
|
44229
|
-
var RenderedAsSchema = object({
|
|
44230
|
-
level: string(),
|
|
44231
|
-
format: NotificationFormatSchema,
|
|
44232
|
-
attachmentsSent: number().int().nonnegative(),
|
|
44233
|
-
actionsSent: number().int().nonnegative(),
|
|
44234
|
-
truncated: boolean(),
|
|
44235
|
-
dropped: array(string())
|
|
44236
|
-
});
|
|
44237
|
-
var SendResultSchema = object({
|
|
44238
|
-
success: boolean(),
|
|
44239
|
-
error: string().optional(),
|
|
44240
|
-
renderedAs: RenderedAsSchema.optional()
|
|
44241
|
-
});
|
|
44242
|
-
/** Same shape as SendResult — kept as a distinct name for the test panel. */
|
|
44243
|
-
var TestResultSchema = SendResultSchema;
|
|
44244
|
-
/**
|
|
44245
|
-
* Pre-save credential probe against a partial (unsaved) target config.
|
|
44246
|
-
* `resolvedUrl` never includes secrets (token stripped from path).
|
|
44247
|
-
*/
|
|
44248
|
-
var ProbeTargetConfigResultSchema = object({
|
|
44249
|
-
ok: boolean(),
|
|
44250
|
-
resolvedUrl: string(),
|
|
44251
|
-
httpStatus: number().int().optional(),
|
|
44252
|
-
stateInstance: string().optional(),
|
|
44253
|
-
error: string().optional()
|
|
44254
|
-
});
|
|
44255
|
-
method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSchema), { auth: "admin" }), method(object({ targetId: string() }), TargetSchema, { auth: "admin" }), method(object({
|
|
44256
|
-
kind: string(),
|
|
44257
|
-
config: record(string(), unknown()).optional(),
|
|
44258
|
-
/**
|
|
44259
|
-
* When editing / duplicating, the blank password field never round-trips
|
|
44260
|
-
* the stored token. Pass the source target id so the provider can restore
|
|
44261
|
-
* secrets server-side before dialling (same merge as upsert).
|
|
44262
|
-
*/
|
|
44263
|
-
targetId: string().optional()
|
|
44264
|
-
}), array(DiscoveredTargetSchema), { auth: "admin" }), method(object({
|
|
44265
|
-
kind: string(),
|
|
44266
|
-
config: record(string(), unknown()),
|
|
44267
|
-
/** See `discoverTargets.targetId` — restore stored secrets for a blank password. */
|
|
44268
|
-
targetId: string().optional()
|
|
44269
|
-
}), ProbeTargetConfigResultSchema, {
|
|
44270
|
-
kind: "mutation",
|
|
44271
|
-
auth: "admin"
|
|
44272
|
-
}), method(object({
|
|
44273
|
-
targetId: string(),
|
|
44274
|
-
notification: NotificationSchema
|
|
44275
|
-
}), SendResultSchema, {
|
|
44276
|
-
kind: "mutation",
|
|
44277
|
-
auth: "admin"
|
|
44278
|
-
}), method(object({
|
|
44279
|
-
targetId: string(),
|
|
44280
|
-
sample: NotificationSchema.optional()
|
|
44281
|
-
}), TestResultSchema, {
|
|
44282
|
-
kind: "mutation",
|
|
44283
|
-
auth: "admin"
|
|
44284
|
-
}), method(object({
|
|
44285
|
-
target: TargetSchema,
|
|
44286
|
-
/**
|
|
44287
|
-
* Duplicate flow: create a NEW target id while copying secrets from an
|
|
44288
|
-
* existing row. The UI never holds the stored token; blank / redacted
|
|
44289
|
-
* password fields are restored from this source (D634 still applies if
|
|
44290
|
-
* destinations diverge without a re-typed secret).
|
|
44291
|
-
*/
|
|
44292
|
-
cloneSecretsFrom: string().optional()
|
|
44293
|
-
}), TargetSchema, {
|
|
44294
|
-
kind: "mutation",
|
|
44295
|
-
auth: "admin"
|
|
44296
|
-
}), method(object({ targetId: string() }), _void(), {
|
|
44297
|
-
kind: "mutation",
|
|
44298
|
-
auth: "admin"
|
|
44299
|
-
}), method(object({
|
|
44300
|
-
targetId: string(),
|
|
44301
|
-
enabled: boolean()
|
|
44302
|
-
}), _void(), {
|
|
44303
|
-
kind: "mutation",
|
|
44304
|
-
auth: "admin"
|
|
44305
|
-
});
|
|
44306
|
-
new Set([
|
|
44307
|
-
{
|
|
44308
|
-
id: "person",
|
|
44309
|
-
name: "Person"
|
|
44310
|
-
},
|
|
44311
|
-
{
|
|
44312
|
-
id: "vehicle",
|
|
44313
|
-
name: "Vehicle"
|
|
44314
|
-
},
|
|
44315
|
-
{
|
|
44316
|
-
id: "animal",
|
|
44317
|
-
name: "Animal"
|
|
44318
|
-
},
|
|
44319
|
-
{
|
|
44320
|
-
id: "package",
|
|
44321
|
-
name: "Package"
|
|
44322
|
-
}
|
|
44323
|
-
].map((l) => l.id));
|
|
44324
|
-
var COCO_TO_MACRO = {
|
|
44325
|
-
mapping: {
|
|
44326
|
-
person: "person",
|
|
44327
|
-
bicycle: "vehicle",
|
|
44328
|
-
car: "vehicle",
|
|
44329
|
-
motorcycle: "vehicle",
|
|
44330
|
-
airplane: "vehicle",
|
|
44331
|
-
bus: "vehicle",
|
|
44332
|
-
train: "vehicle",
|
|
44333
|
-
truck: "vehicle",
|
|
44334
|
-
boat: "vehicle",
|
|
44335
|
-
bird: "animal",
|
|
44336
|
-
cat: "animal",
|
|
44337
|
-
dog: "animal",
|
|
44338
|
-
horse: "animal",
|
|
44339
|
-
sheep: "animal",
|
|
44340
|
-
cow: "animal",
|
|
44341
|
-
elephant: "animal",
|
|
44342
|
-
bear: "animal",
|
|
44343
|
-
zebra: "animal",
|
|
44344
|
-
giraffe: "animal",
|
|
44345
|
-
suitcase: "package",
|
|
44346
|
-
backpack: "package",
|
|
44347
|
-
handbag: "package"
|
|
44348
|
-
},
|
|
44349
|
-
preserveOriginal: false
|
|
44350
|
-
};
|
|
44351
45012
|
var AUDIO_MACRO_LABELS = [
|
|
44352
45013
|
{
|
|
44353
45014
|
id: "speech",
|
|
@@ -50764,14 +51425,6 @@ var EngineProvisioningSchema = object({
|
|
|
50764
51425
|
*/
|
|
50765
51426
|
configIssues: array(string()).optional()
|
|
50766
51427
|
});
|
|
50767
|
-
var PipelineStepInputSchema = lazy(() => object({
|
|
50768
|
-
addonId: string(),
|
|
50769
|
-
modelId: string().optional(),
|
|
50770
|
-
enabled: boolean().default(true),
|
|
50771
|
-
children: array(PipelineStepInputSchema).optional(),
|
|
50772
|
-
settings: record(string(), unknown()).optional(),
|
|
50773
|
-
jumpDeviceKey: string().optional()
|
|
50774
|
-
}));
|
|
50775
51428
|
var ModelSubstitutionSchema = object({
|
|
50776
51429
|
addonId: string(),
|
|
50777
51430
|
chosen: string(),
|
|
@@ -50850,7 +51503,6 @@ var ConfigUISchemaBridge = custom();
|
|
|
50850
51503
|
var ConfigUISchemaNullableBridge = custom();
|
|
50851
51504
|
var InferenceCapabilitiesBridge = custom();
|
|
50852
51505
|
var ModelAvailabilityListBridge = custom();
|
|
50853
|
-
var PipelineRunResultBridge = custom();
|
|
50854
51506
|
method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
|
|
50855
51507
|
modelId: string(),
|
|
50856
51508
|
settings: record(string(), unknown()).readonly()
|
|
@@ -54012,6 +54664,12 @@ var ServerUpdateActionResultSchema = object({
|
|
|
54012
54664
|
*/
|
|
54013
54665
|
blockers: array(UpdateBlockerSchema).optional()
|
|
54014
54666
|
});
|
|
54667
|
+
var LaunchOverridesSchema = object({
|
|
54668
|
+
/** The persisted heap ceiling in MB, or `null` when none is set. */
|
|
54669
|
+
heapMb: number().int().nullable() });
|
|
54670
|
+
var SetLaunchOverridesResultSchema = LaunchOverridesSchema.extend({
|
|
54671
|
+
/** Always true: the override is read at launch, not by the running process. */
|
|
54672
|
+
restartRequired: boolean() });
|
|
54015
54673
|
method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
|
|
54016
54674
|
kind: "mutation",
|
|
54017
54675
|
auth: "admin"
|
|
@@ -54034,6 +54692,9 @@ method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), S
|
|
|
54034
54692
|
}), method(_void(), ServerUpdateActionResultSchema, {
|
|
54035
54693
|
kind: "mutation",
|
|
54036
54694
|
auth: "admin"
|
|
54695
|
+
}), method(_void(), LaunchOverridesSchema, { auth: "admin" }), method(object({ heapMb: number().int().min(512).max(65536).nullable() }), SetLaunchOverridesResultSchema, {
|
|
54696
|
+
kind: "mutation",
|
|
54697
|
+
auth: "admin"
|
|
54037
54698
|
});
|
|
54038
54699
|
/**
|
|
54039
54700
|
* `smtp-provider` — pluggable email delivery surface.
|
|
@@ -56435,7 +57096,9 @@ var ManifestShapeSchema = object({
|
|
|
56435
57096
|
icon: string().optional()
|
|
56436
57097
|
}).optional(),
|
|
56437
57098
|
protected: boolean().optional(),
|
|
56438
|
-
removable: boolean().optional()
|
|
57099
|
+
removable: boolean().optional(),
|
|
57100
|
+
/** Declared Integrations-page block (mirror of `AddonDeclaration.integrationSection`). */
|
|
57101
|
+
integrationSection: _enum(["system", "providers"]).optional()
|
|
56439
57102
|
});
|
|
56440
57103
|
var AddonProcessSchema = object({
|
|
56441
57104
|
pid: number().optional(),
|
|
@@ -56800,9 +57463,9 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
56800
57463
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
56801
57464
|
object({
|
|
56802
57465
|
/** Carbon dioxide concentration in ppm. */
|
|
56803
|
-
|
|
57466
|
+
co2: number().min(0).optional().meta(readingMeta("concentration-volume")),
|
|
56804
57467
|
/** Total volatile organic compounds in ppb. */
|
|
56805
|
-
|
|
57468
|
+
voc: number().min(0).optional().meta(readingMeta("concentration-ppb")),
|
|
56806
57469
|
/** Particulate matter ≤ 2.5 μm in µg/m³. */
|
|
56807
57470
|
pm25: number().min(0).optional().meta(readingMeta("concentration-mass")),
|
|
56808
57471
|
/** Particulate matter ≤ 10 μm in µg/m³. */
|
|
@@ -56815,7 +57478,7 @@ object({
|
|
|
56815
57478
|
DeviceType.Sensor;
|
|
56816
57479
|
object({
|
|
56817
57480
|
/** Current illuminance in lux (lx). `null` when the sample was refused (D393). */
|
|
56818
|
-
|
|
57481
|
+
illuminance: number().min(0).nullable().meta(readingMeta("illuminance", {
|
|
56819
57482
|
precision: 0,
|
|
56820
57483
|
label: "Illuminance"
|
|
56821
57484
|
})),
|
|
@@ -56912,6 +57575,84 @@ DeviceType.Camera, method(object({ deviceId: number() }), AudioMetricsSnapshotSc
|
|
|
56912
57575
|
* would produce more than `maxPoints` samples. */
|
|
56913
57576
|
sampleEveryMs: number().int().positive().optional()
|
|
56914
57577
|
}), AudioMetricsHistorySchema);
|
|
57578
|
+
method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
|
|
57579
|
+
actionId: string().min(1),
|
|
57580
|
+
variables: record(string(), ActionVariableValueSchema).optional()
|
|
57581
|
+
}), _void(), {
|
|
57582
|
+
kind: "mutation",
|
|
57583
|
+
auth: "admin"
|
|
57584
|
+
}), method(object({ actionId: string().min(1) }), _void(), {
|
|
57585
|
+
kind: "mutation",
|
|
57586
|
+
auth: "admin"
|
|
57587
|
+
});
|
|
57588
|
+
/**
|
|
57589
|
+
* actions — the ONE surface for runnable actions, for the UI and for
|
|
57590
|
+
* automations. Provided by the core-blocks builtin on the hub.
|
|
57591
|
+
*
|
|
57592
|
+
* An action is a LIST ENTRY, not a device (D883): either internal (cap and wait
|
|
57593
|
+
* steps, kept in the hub's `actions` record kind) or declared by an addon over
|
|
57594
|
+
* `action-source`. `list` asks every `action-source` provider LIVE and overlays
|
|
57595
|
+
* the run status from the hub's `runs` ledger; there is no catalog here to
|
|
57596
|
+
* drift (D3).
|
|
57597
|
+
*
|
|
57598
|
+
* **Permissions follow the camera, as linked devices do.** An action is linked
|
|
57599
|
+
* to cameras by the operator (`setLinks`, D356: nothing links itself). A
|
|
57600
|
+
* non-admin may `get` / `run` an action only through a camera they may see that
|
|
57601
|
+
* links it: they name the camera (`deviceId`, a top-level field so the scope
|
|
57602
|
+
* gate sees it) and the provider refuses an action that camera does not link.
|
|
57603
|
+
* An admin, and an in-process caller (an automation block), may run any action.
|
|
57604
|
+
* Every refusal is typed (`[not-linked] …`) and logged.
|
|
57605
|
+
*
|
|
57606
|
+
* A second `run` of an action that is already running is REFUSED — traced and
|
|
57607
|
+
* logged — never queued.
|
|
57608
|
+
*/
|
|
57609
|
+
var ActionIdInput = object({ actionId: string().min(1) });
|
|
57610
|
+
var ActionLinksSchema = object({
|
|
57611
|
+
deviceId: number().int().nonnegative(),
|
|
57612
|
+
actionIds: array(string().min(1)).max(100)
|
|
57613
|
+
});
|
|
57614
|
+
method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
|
|
57615
|
+
actionId: string().min(1),
|
|
57616
|
+
deviceId: number().int().nonnegative().optional()
|
|
57617
|
+
}), object({ action: ActionEntrySchema.nullable() }), {
|
|
57618
|
+
role: "viewer",
|
|
57619
|
+
auth: "protected",
|
|
57620
|
+
kind: "query",
|
|
57621
|
+
caller: "required"
|
|
57622
|
+
}), method(object({
|
|
57623
|
+
actionId: string().min(1),
|
|
57624
|
+
variables: record(string(), ActionVariableValueSchema).optional(),
|
|
57625
|
+
wait: boolean().optional(),
|
|
57626
|
+
origin: ActionRunOriginSchema.optional(),
|
|
57627
|
+
deviceId: number().int().nonnegative().optional()
|
|
57628
|
+
}), ActionRunResultSchema, {
|
|
57629
|
+
role: "viewer",
|
|
57630
|
+
auth: "protected",
|
|
57631
|
+
kind: "mutation",
|
|
57632
|
+
caller: "required"
|
|
57633
|
+
}), method(ActionIdInput, _void(), {
|
|
57634
|
+
kind: "mutation",
|
|
57635
|
+
auth: "admin"
|
|
57636
|
+
}), method(ActionIdInput, object({ traces: array(AutomationRunTraceSchema) }), { auth: "admin" }), method(object({ action: ActionInputSchema }), object({ action: ActionEntrySchema }), {
|
|
57637
|
+
kind: "mutation",
|
|
57638
|
+
auth: "admin"
|
|
57639
|
+
}), method(object({
|
|
57640
|
+
actionId: string().min(1),
|
|
57641
|
+
action: ActionInputSchema.partial()
|
|
57642
|
+
}), object({ action: ActionEntrySchema }), {
|
|
57643
|
+
kind: "mutation",
|
|
57644
|
+
auth: "admin"
|
|
57645
|
+
}), method(ActionIdInput, _void(), {
|
|
57646
|
+
kind: "mutation",
|
|
57647
|
+
auth: "admin"
|
|
57648
|
+
}), method(object({ deviceId: number().int().nonnegative() }), array(ActionEntrySchema), {
|
|
57649
|
+
role: "viewer",
|
|
57650
|
+
auth: "protected",
|
|
57651
|
+
kind: "query"
|
|
57652
|
+
}), method(object({ deviceId: number().int().nonnegative() }), ActionLinksSchema, { auth: "admin" }), method(ActionLinksSchema, ActionLinksSchema, {
|
|
57653
|
+
kind: "mutation",
|
|
57654
|
+
auth: "admin"
|
|
57655
|
+
});
|
|
56915
57656
|
object({
|
|
56916
57657
|
/** Whether the automation is currently enabled. Disabled automations
|
|
56917
57658
|
* ignore their trigger block — manual `trigger` still works. */
|
|
@@ -56965,7 +57706,7 @@ var BatteryStatusSchema = object({
|
|
|
56965
57706
|
* Consumers must SKIP a null rather than coerce it — `battery-band` already
|
|
56966
57707
|
* declines to band a non-finite reading, which is the correct shape.
|
|
56967
57708
|
*/
|
|
56968
|
-
|
|
57709
|
+
level: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
|
|
56969
57710
|
/**
|
|
56970
57711
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
56971
57712
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -56975,7 +57716,7 @@ var BatteryStatusSchema = object({
|
|
|
56975
57716
|
* `'unknown'` is the absence of an answer: the provider has not read the
|
|
56976
57717
|
* power fields yet, or the firmware reported neither. Before it existed,
|
|
56977
57718
|
* two unreadable fields produced `'none'`, and a camera nobody had reached
|
|
56978
|
-
* was drawn "on battery alone" — the same D315 defect `
|
|
57719
|
+
* was drawn "on battery alone" — the same D315 defect `level` closed
|
|
56979
57720
|
* by going nullable. Consumers SKIP it (no charger state published, no
|
|
56980
57721
|
* glyph, no HomeKit ChargingState) rather than coerce it either way.
|
|
56981
57722
|
*/
|
|
@@ -56999,7 +57740,7 @@ var BatteryStatusSchema = object({
|
|
|
56999
57740
|
* that only report charge. A second reading on this cap, not a second
|
|
57000
57741
|
* `numeric-sensor` on the same device.
|
|
57001
57742
|
*/
|
|
57002
|
-
|
|
57743
|
+
voltage: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
57003
57744
|
/**
|
|
57004
57745
|
* Ms epoch of the last time the device PROVED it was reachable — a
|
|
57005
57746
|
* completed firmware round-trip, an observed wake, or an inbound push
|
|
@@ -57033,7 +57774,7 @@ var BatteryStatusSchema = object({
|
|
|
57033
57774
|
/**
|
|
57034
57775
|
* True when the source is a BINARY low-battery indicator (HA
|
|
57035
57776
|
* `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
|
|
57036
|
-
* charge level — `
|
|
57777
|
+
* charge level — `level` is then a coarse stand-in (100 = normal,
|
|
57037
57778
|
* sub-threshold = low). UI MUST render "Normal"/"Low" instead of a
|
|
57038
57779
|
* misleading exact percentage. Absent/false → genuine 0–100 % reading.
|
|
57039
57780
|
*/
|
|
@@ -57064,33 +57805,395 @@ DeviceType.Sensor;
|
|
|
57064
57805
|
* controls to this single-method surface.
|
|
57065
57806
|
*
|
|
57066
57807
|
* The cap is intentionally minimal: a single `setBrightness({deviceId,
|
|
57067
|
-
*
|
|
57808
|
+
* level})` mutation plus the auto-injected `getStatus`. Drivers
|
|
57068
57809
|
* that expose richer controls (color temperature, scenes, schedules)
|
|
57069
57810
|
* should surface those via the device's `getSettingsUISchema()`
|
|
57070
57811
|
* instead of bloating this cap.
|
|
57071
57812
|
*/
|
|
57072
57813
|
var BrightnessStatusSchema = object({
|
|
57073
57814
|
/** Current level as 0..100 inclusive. Firmware-reported. */
|
|
57074
|
-
|
|
57815
|
+
level: number().min(0).max(100).meta(readingMeta("percentage")),
|
|
57075
57816
|
/** Ms epoch of the last operator-driven change. Useful for UI freshness. */
|
|
57076
57817
|
lastChangedAt: number()
|
|
57077
57818
|
});
|
|
57078
57819
|
DeviceType.Light, method(object({
|
|
57079
57820
|
deviceId: number().int().nonnegative(),
|
|
57080
|
-
|
|
57821
|
+
level: number().min(0).max(100)
|
|
57081
57822
|
}), _void(), {
|
|
57082
57823
|
kind: "mutation",
|
|
57083
57824
|
auth: "protected"
|
|
57084
57825
|
}), object({
|
|
57085
57826
|
deviceId: number(),
|
|
57086
|
-
|
|
57827
|
+
level: number().min(0).max(100),
|
|
57087
57828
|
lastChangedAt: number()
|
|
57088
57829
|
});
|
|
57830
|
+
/**
|
|
57831
|
+
* The role vocabulary of a remote (D963): what a button MEANS, independent of
|
|
57832
|
+
* how it is wired. A layout template places buttons by role; a device binds a
|
|
57833
|
+
* role to an action; an exporter asks for a role by name. Roles are shared so
|
|
57834
|
+
* one layout fits every appliance and one voice command fits every binding.
|
|
57835
|
+
*
|
|
57836
|
+
* A role outside this list is `custom:<key>` — the operator's own button (a
|
|
57837
|
+
* SmartIR source, a channel preset). The key is a lowercase slug.
|
|
57838
|
+
*/
|
|
57839
|
+
var REMOTE_KNOWN_ROLES = [
|
|
57840
|
+
"power",
|
|
57841
|
+
"power_on",
|
|
57842
|
+
"power_off",
|
|
57843
|
+
"volume_up",
|
|
57844
|
+
"volume_down",
|
|
57845
|
+
"mute",
|
|
57846
|
+
"channel_up",
|
|
57847
|
+
"channel_down",
|
|
57848
|
+
"up",
|
|
57849
|
+
"down",
|
|
57850
|
+
"left",
|
|
57851
|
+
"right",
|
|
57852
|
+
"ok",
|
|
57853
|
+
"back",
|
|
57854
|
+
"home",
|
|
57855
|
+
"menu",
|
|
57856
|
+
"info",
|
|
57857
|
+
"guide",
|
|
57858
|
+
"exit",
|
|
57859
|
+
"input",
|
|
57860
|
+
"play",
|
|
57861
|
+
"pause",
|
|
57862
|
+
"play_pause",
|
|
57863
|
+
"stop",
|
|
57864
|
+
"next",
|
|
57865
|
+
"previous",
|
|
57866
|
+
"fast_forward",
|
|
57867
|
+
"rewind",
|
|
57868
|
+
"digit_0",
|
|
57869
|
+
"digit_1",
|
|
57870
|
+
"digit_2",
|
|
57871
|
+
"digit_3",
|
|
57872
|
+
"digit_4",
|
|
57873
|
+
"digit_5",
|
|
57874
|
+
"digit_6",
|
|
57875
|
+
"digit_7",
|
|
57876
|
+
"digit_8",
|
|
57877
|
+
"digit_9"
|
|
57878
|
+
];
|
|
57879
|
+
var CUSTOM_KEY_RE = /^[a-z0-9][a-z0-9_]{0,47}$/;
|
|
57880
|
+
var KNOWN_ROLES = new Set(REMOTE_KNOWN_ROLES);
|
|
57881
|
+
function isRemoteKnownRole(value) {
|
|
57882
|
+
return KNOWN_ROLES.has(value);
|
|
57883
|
+
}
|
|
57884
|
+
function isRemoteCustomKey(key) {
|
|
57885
|
+
return CUSTOM_KEY_RE.test(key);
|
|
57886
|
+
}
|
|
57887
|
+
/** The key of a `custom:<key>` role, or null for any other string. */
|
|
57888
|
+
function customKeyOfRole(role) {
|
|
57889
|
+
if (!role.startsWith("custom:")) return null;
|
|
57890
|
+
const key = role.slice(7);
|
|
57891
|
+
return isRemoteCustomKey(key) ? key : null;
|
|
57892
|
+
}
|
|
57893
|
+
function isRemoteRole(value) {
|
|
57894
|
+
return isRemoteKnownRole(value) || customKeyOfRole(value) !== null;
|
|
57895
|
+
}
|
|
57896
|
+
var RemoteRoleSchema = string().refine(isRemoteRole, { message: "a role is one of the known roles or custom:<key> (lowercase letters, digits, _)" });
|
|
57897
|
+
var RemoteBindingSchema = object({ action: AutomationCapStepSchema.extend({ deviceId: number().int().nonnegative() }) });
|
|
57898
|
+
var RemoteCustomButtonSchema = object({
|
|
57899
|
+
/** The slug after `custom:` in the role. */
|
|
57900
|
+
key: string().refine(isRemoteCustomKey, { message: "a lowercase slug" }),
|
|
57901
|
+
/** What the operator calls it, and what a voice command may name. */
|
|
57902
|
+
name: string().min(1).max(60)
|
|
57903
|
+
});
|
|
57904
|
+
var RemotePowerModeSchema = _enum(["toggle", "discrete"]);
|
|
57905
|
+
var RemoteConfigSchema = object({
|
|
57906
|
+
layoutTemplateId: string().min(1).nullable(),
|
|
57907
|
+
/**
|
|
57908
|
+
* The transmitter device new bindings and an import send through. A binding
|
|
57909
|
+
* names its own device, so one command may override it.
|
|
57910
|
+
*/
|
|
57911
|
+
defaultTransmitterId: number().int().nonnegative().nullable().default(null),
|
|
57912
|
+
/** Keyed by role. A role with no entry falls back to the native cap. */
|
|
57913
|
+
bindings: record(string(), RemoteBindingSchema),
|
|
57914
|
+
customButtons: array(RemoteCustomButtonSchema).max(100),
|
|
57915
|
+
power: object({ mode: RemotePowerModeSchema })
|
|
57916
|
+
}).superRefine((config, ctx) => {
|
|
57917
|
+
const roles = Object.keys(config.bindings);
|
|
57918
|
+
if (roles.length > 200) ctx.addIssue({
|
|
57919
|
+
code: "custom",
|
|
57920
|
+
message: "too many bindings",
|
|
57921
|
+
path: ["bindings"]
|
|
57922
|
+
});
|
|
57923
|
+
for (const role of roles) if (!isRemoteRole(role)) ctx.addIssue({
|
|
57924
|
+
code: "custom",
|
|
57925
|
+
message: `"${role}" is not a role`,
|
|
57926
|
+
path: ["bindings", role]
|
|
57927
|
+
});
|
|
57928
|
+
const keys = /* @__PURE__ */ new Set();
|
|
57929
|
+
config.customButtons.forEach((button, index) => {
|
|
57930
|
+
if (keys.has(button.key)) ctx.addIssue({
|
|
57931
|
+
code: "custom",
|
|
57932
|
+
message: `custom button "${button.key}" is listed twice`,
|
|
57933
|
+
path: [
|
|
57934
|
+
"customButtons",
|
|
57935
|
+
index,
|
|
57936
|
+
"key"
|
|
57937
|
+
]
|
|
57938
|
+
});
|
|
57939
|
+
keys.add(button.key);
|
|
57940
|
+
});
|
|
57941
|
+
for (const role of roles) {
|
|
57942
|
+
const key = customKeyOfRole(role);
|
|
57943
|
+
if (key !== null && !keys.has(key)) ctx.addIssue({
|
|
57944
|
+
code: "custom",
|
|
57945
|
+
message: `${role} is bound but has no entry in customButtons`,
|
|
57946
|
+
path: ["bindings", role]
|
|
57947
|
+
});
|
|
57948
|
+
}
|
|
57949
|
+
});
|
|
57950
|
+
object({
|
|
57951
|
+
power: object({
|
|
57952
|
+
state: _enum(["on", "off"]),
|
|
57953
|
+
at: number()
|
|
57954
|
+
}).nullable(),
|
|
57955
|
+
muted: object({
|
|
57956
|
+
value: boolean(),
|
|
57957
|
+
at: number()
|
|
57958
|
+
}).nullable()
|
|
57959
|
+
});
|
|
57960
|
+
var RemoteLayoutButtonSchema = object({
|
|
57961
|
+
id: string().min(1).max(40),
|
|
57962
|
+
/** 0-based grid position. */
|
|
57963
|
+
row: number().int().min(0).max(24),
|
|
57964
|
+
col: number().int().min(0).max(24),
|
|
57965
|
+
rowSpan: number().int().min(1).max(24),
|
|
57966
|
+
colSpan: number().int().min(1).max(24),
|
|
57967
|
+
icon: string().min(1).max(60).optional(),
|
|
57968
|
+
label: string().min(1).max(40).optional(),
|
|
57969
|
+
role: RemoteRoleSchema
|
|
57970
|
+
});
|
|
57971
|
+
object({
|
|
57972
|
+
columns: number().int().min(1).max(24),
|
|
57973
|
+
rows: number().int().min(1).max(24),
|
|
57974
|
+
buttons: array(RemoteLayoutButtonSchema).max(200)
|
|
57975
|
+
}).superRefine((grid, ctx) => {
|
|
57976
|
+
const ids = /* @__PURE__ */ new Set();
|
|
57977
|
+
const taken = /* @__PURE__ */ new Map();
|
|
57978
|
+
grid.buttons.forEach((button, index) => {
|
|
57979
|
+
if (ids.has(button.id)) ctx.addIssue({
|
|
57980
|
+
code: "custom",
|
|
57981
|
+
message: `button id "${button.id}" is used twice`,
|
|
57982
|
+
path: [
|
|
57983
|
+
"buttons",
|
|
57984
|
+
index,
|
|
57985
|
+
"id"
|
|
57986
|
+
]
|
|
57987
|
+
});
|
|
57988
|
+
ids.add(button.id);
|
|
57989
|
+
if (button.row + button.rowSpan > grid.rows || button.col + button.colSpan > grid.columns) {
|
|
57990
|
+
ctx.addIssue({
|
|
57991
|
+
code: "custom",
|
|
57992
|
+
message: `button "${button.id}" leaves the grid`,
|
|
57993
|
+
path: ["buttons", index]
|
|
57994
|
+
});
|
|
57995
|
+
return;
|
|
57996
|
+
}
|
|
57997
|
+
for (let r = button.row; r < button.row + button.rowSpan; r += 1) for (let c = button.col; c < button.col + button.colSpan; c += 1) {
|
|
57998
|
+
const cell = `${r}:${c}`;
|
|
57999
|
+
const other = taken.get(cell);
|
|
58000
|
+
if (other !== void 0) {
|
|
58001
|
+
ctx.addIssue({
|
|
58002
|
+
code: "custom",
|
|
58003
|
+
message: `buttons "${other}" and "${button.id}" overlap`,
|
|
58004
|
+
path: ["buttons", index]
|
|
58005
|
+
});
|
|
58006
|
+
return;
|
|
58007
|
+
}
|
|
58008
|
+
taken.set(cell, button.id);
|
|
58009
|
+
}
|
|
58010
|
+
});
|
|
58011
|
+
});
|
|
58012
|
+
var RemoteBoundCommandSchema = object({
|
|
58013
|
+
role: RemoteRoleSchema,
|
|
58014
|
+
/** The operator's name for a custom button; absent for a known role. */
|
|
58015
|
+
label: string().optional(),
|
|
58016
|
+
custom: boolean()
|
|
58017
|
+
});
|
|
58018
|
+
var RemoteCommandListSchema = object({
|
|
58019
|
+
layoutTemplateId: string().nullable(),
|
|
58020
|
+
power: object({ mode: RemotePowerModeSchema }),
|
|
58021
|
+
/** Only the roles that are BOUND — the ones a press can reach. */
|
|
58022
|
+
commands: array(RemoteBoundCommandSchema)
|
|
58023
|
+
});
|
|
58024
|
+
var RemoteRefusalReasonSchema = _enum([
|
|
58025
|
+
"no-remote",
|
|
58026
|
+
"unbound-role",
|
|
58027
|
+
"action-failed"
|
|
58028
|
+
]);
|
|
58029
|
+
var RemoteSendResultSchema = discriminatedUnion("status", [
|
|
58030
|
+
object({
|
|
58031
|
+
status: literal("sent"),
|
|
58032
|
+
/** How many times the action ran. */
|
|
58033
|
+
sends: number().int().min(1)
|
|
58034
|
+
}),
|
|
58035
|
+
object({
|
|
58036
|
+
status: literal("skipped"),
|
|
58037
|
+
reason: literal("already-in-state")
|
|
58038
|
+
}),
|
|
58039
|
+
object({
|
|
58040
|
+
status: literal("refused"),
|
|
58041
|
+
reason: RemoteRefusalReasonSchema,
|
|
58042
|
+
detail: string().optional()
|
|
58043
|
+
})
|
|
58044
|
+
]);
|
|
58045
|
+
var RemoteMediaCommandSchema = _enum([
|
|
58046
|
+
"play",
|
|
58047
|
+
"pause",
|
|
58048
|
+
"stop",
|
|
58049
|
+
"next",
|
|
58050
|
+
"previous",
|
|
58051
|
+
"setMute",
|
|
58052
|
+
"selectSource"
|
|
58053
|
+
]);
|
|
58054
|
+
/** A send result, or `not-routed`: the role is not bound, so the native cap answers. */
|
|
58055
|
+
var RemoteMediaCommandResultSchema = discriminatedUnion("status", [...RemoteSendResultSchema.options, object({ status: literal("not-routed") })]);
|
|
58056
|
+
var RemoteSetConfigResultSchema = discriminatedUnion("status", [object({ status: literal("saved") }), object({
|
|
58057
|
+
status: literal("refused"),
|
|
58058
|
+
reason: _enum(["unknown-template", "not-a-media-player"]),
|
|
58059
|
+
detail: string()
|
|
58060
|
+
})]);
|
|
58061
|
+
var deviceInput = object({ deviceId: number().int().nonnegative() });
|
|
58062
|
+
DeviceType.MediaPlayer;
|
|
58063
|
+
method(deviceInput, RemoteConfigSchema, { auth: "admin" }), method(deviceInput.extend({ config: RemoteConfigSchema }), RemoteSetConfigResultSchema, {
|
|
58064
|
+
kind: "mutation",
|
|
58065
|
+
auth: "admin"
|
|
58066
|
+
}), method(deviceInput, RemoteCommandListSchema, { auth: "protected" }), method(deviceInput.extend({
|
|
58067
|
+
role: RemoteRoleSchema,
|
|
58068
|
+
/** Sends in a row (volume steps). */
|
|
58069
|
+
repeat: number().int().min(1).max(50).default(1)
|
|
58070
|
+
}), RemoteSendResultSchema, {
|
|
58071
|
+
kind: "mutation",
|
|
58072
|
+
auth: "protected"
|
|
58073
|
+
}), method(deviceInput.extend({
|
|
58074
|
+
command: RemoteMediaCommandSchema,
|
|
58075
|
+
muted: boolean().optional(),
|
|
58076
|
+
source: string().optional(),
|
|
58077
|
+
repeat: number().int().min(1).max(50).default(1)
|
|
58078
|
+
}), RemoteMediaCommandResultSchema, {
|
|
58079
|
+
kind: "mutation",
|
|
58080
|
+
auth: "protected"
|
|
58081
|
+
});
|
|
58082
|
+
var TemplateKindSchema = _enum(["remote"]);
|
|
58083
|
+
/**
|
|
58084
|
+
* template — the generic store of reusable, named operator data (D963). A
|
|
58085
|
+
* record is `{ id, kind, name, payload }`; the kinds (today only `remote`, the
|
|
58086
|
+
* button grid of a remote) and the schema each payload must satisfy are
|
|
58087
|
+
* declared by the system in `template-kinds.ts`. Nothing here is specific to a
|
|
58088
|
+
* kind: the engine validates a payload against its kind's schema and, on a
|
|
58089
|
+
* delete, asks the kind's owner whether anything still points at the record.
|
|
58090
|
+
*
|
|
58091
|
+
* Every refusal is a typed result — a UI says "unknown kind" or names the
|
|
58092
|
+
* devices that still use a template, without parsing text.
|
|
58093
|
+
*/
|
|
58094
|
+
var TemplateRecordSchema = object({
|
|
58095
|
+
id: string().min(1),
|
|
58096
|
+
kind: TemplateKindSchema,
|
|
58097
|
+
name: string().min(1).max(120),
|
|
58098
|
+
/** Shaped by the kind; `checkTemplatePayload(kind, payload)` reads it. */
|
|
58099
|
+
payload: unknown(),
|
|
58100
|
+
createdAt: number(),
|
|
58101
|
+
updatedAt: number()
|
|
58102
|
+
});
|
|
58103
|
+
var TemplateWriteResultSchema = discriminatedUnion("status", [object({
|
|
58104
|
+
status: literal("saved"),
|
|
58105
|
+
template: TemplateRecordSchema
|
|
58106
|
+
}), object({
|
|
58107
|
+
status: literal("refused"),
|
|
58108
|
+
reason: _enum(["invalid-payload", "not-found"]),
|
|
58109
|
+
detail: string()
|
|
58110
|
+
})]);
|
|
58111
|
+
/** A device still pointing at a template. */
|
|
58112
|
+
var TemplateUserSchema = object({
|
|
58113
|
+
deviceId: number().int().nonnegative(),
|
|
58114
|
+
name: string()
|
|
58115
|
+
});
|
|
58116
|
+
var TemplateDeleteResultSchema = discriminatedUnion("status", [
|
|
58117
|
+
object({ status: literal("deleted") }),
|
|
58118
|
+
object({ status: literal("not-found") }),
|
|
58119
|
+
object({
|
|
58120
|
+
status: literal("in-use"),
|
|
58121
|
+
devices: array(TemplateUserSchema).min(1)
|
|
58122
|
+
})
|
|
58123
|
+
]);
|
|
58124
|
+
method(object({ kind: TemplateKindSchema.optional() }), array(TemplateRecordSchema), { auth: "protected" }), method(object({ id: string().min(1) }), TemplateRecordSchema.nullable(), { auth: "protected" }), method(object({
|
|
58125
|
+
kind: TemplateKindSchema,
|
|
58126
|
+
name: string().min(1).max(120),
|
|
58127
|
+
payload: unknown()
|
|
58128
|
+
}), TemplateWriteResultSchema, {
|
|
58129
|
+
kind: "mutation",
|
|
58130
|
+
auth: "admin"
|
|
58131
|
+
}), method(object({
|
|
58132
|
+
id: string().min(1),
|
|
58133
|
+
name: string().min(1).max(120).optional(),
|
|
58134
|
+
payload: unknown().optional()
|
|
58135
|
+
}), TemplateWriteResultSchema, {
|
|
58136
|
+
kind: "mutation",
|
|
58137
|
+
auth: "admin"
|
|
58138
|
+
}), method(object({ id: string().min(1) }), TemplateDeleteResultSchema, {
|
|
58139
|
+
kind: "mutation",
|
|
58140
|
+
auth: "admin"
|
|
58141
|
+
});
|
|
57089
58142
|
DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
57090
58143
|
kind: "mutation",
|
|
57091
58144
|
auth: "protected"
|
|
57092
58145
|
});
|
|
57093
58146
|
/**
|
|
58147
|
+
* A pulse train in signed microseconds: mark (+) first, then space (-), strictly
|
|
58148
|
+
* alternating, no zeros, 2..1024 entries.
|
|
58149
|
+
*/
|
|
58150
|
+
var IrTimingsSchema = array(number().int()).min(2).max(1024).superRefine((timings, ctx) => {
|
|
58151
|
+
timings.forEach((value, index) => {
|
|
58152
|
+
const expectMark = index % 2 === 0;
|
|
58153
|
+
if (value === 0 || value > 0 !== expectMark) ctx.addIssue({
|
|
58154
|
+
code: "custom",
|
|
58155
|
+
message: `timing ${index} must be a non-zero ${expectMark ? "mark (positive)" : "space (negative)"}`,
|
|
58156
|
+
path: [index]
|
|
58157
|
+
});
|
|
58158
|
+
});
|
|
58159
|
+
});
|
|
58160
|
+
/** Per-command transmit options. Every key is optional; a transmitter applies what it can. */
|
|
58161
|
+
var TransmitSettingsSchema = object({
|
|
58162
|
+
carrierHz: number().int().positive().optional(),
|
|
58163
|
+
dutyCyclePercent: number().int().min(1).max(100).optional(),
|
|
58164
|
+
repeat: number().int().min(0).max(20).optional(),
|
|
58165
|
+
repeatDelayMs: number().int().min(0).optional()
|
|
58166
|
+
});
|
|
58167
|
+
/** The setting keys a transmitter may declare as settable (`getInfo.settable`). */
|
|
58168
|
+
var TransmitSettingKeySchema = _enum([
|
|
58169
|
+
"carrierHz",
|
|
58170
|
+
"dutyCyclePercent",
|
|
58171
|
+
"repeat",
|
|
58172
|
+
"repeatDelayMs"
|
|
58173
|
+
]);
|
|
58174
|
+
var IrMediumSchema = _enum(["ir", "rf"]);
|
|
58175
|
+
var IrSendResultSchema = object({
|
|
58176
|
+
ok: literal(true),
|
|
58177
|
+
/** Settings the transmitter could not apply; the train was still sent. */
|
|
58178
|
+
ignoredSettings: array(string())
|
|
58179
|
+
});
|
|
58180
|
+
var IrTransmitterInfoSchema = object({
|
|
58181
|
+
media: array(IrMediumSchema),
|
|
58182
|
+
settable: array(TransmitSettingKeySchema),
|
|
58183
|
+
maxTimings: number().int().positive()
|
|
58184
|
+
});
|
|
58185
|
+
DeviceType.Generic, method(object({
|
|
58186
|
+
deviceId: number().int().nonnegative(),
|
|
58187
|
+
timings: IrTimingsSchema,
|
|
58188
|
+
settings: TransmitSettingsSchema.optional()
|
|
58189
|
+
}), IrSendResultSchema, {
|
|
58190
|
+
kind: "mutation",
|
|
58191
|
+
auth: "protected"
|
|
58192
|
+
}), method(object({ deviceId: number().int().nonnegative() }), IrTransmitterInfoSchema, {
|
|
58193
|
+
kind: "query",
|
|
58194
|
+
auth: "protected"
|
|
58195
|
+
});
|
|
58196
|
+
/**
|
|
57094
58197
|
* `calendar-source` — collection cap exposing per-provider calendars and
|
|
57095
58198
|
* their events. Every addon that contributes calendars (Home Assistant,
|
|
57096
58199
|
* a future Google Calendar addon, …) registers a provider here. The hub
|
|
@@ -57584,11 +58687,11 @@ var ColorInputSchema = discriminatedUnion("mode", [
|
|
|
57584
58687
|
}),
|
|
57585
58688
|
object({
|
|
57586
58689
|
mode: literal("mired"),
|
|
57587
|
-
|
|
58690
|
+
colorTemperature: number().int().min(50).max(1e3)
|
|
57588
58691
|
})
|
|
57589
58692
|
]);
|
|
57590
58693
|
object({
|
|
57591
|
-
/** Active color mode — which of `rgb` / `hsv` / `
|
|
58694
|
+
/** Active color mode — which of `rgb` / `hsv` / `colorTemperature` reflects
|
|
57592
58695
|
* the bulb's current state. */
|
|
57593
58696
|
mode: _enum([
|
|
57594
58697
|
"rgb",
|
|
@@ -57600,7 +58703,7 @@ object({
|
|
|
57600
58703
|
/** Populated when `mode === 'hsv'`. */
|
|
57601
58704
|
hsv: HsvTripletSchema.optional(),
|
|
57602
58705
|
/** Populated when `mode === 'mired'`. */
|
|
57603
|
-
|
|
58706
|
+
colorTemperature: number().int().optional().meta(readingMeta("colour-temperature")),
|
|
57604
58707
|
/** Ms epoch of the last operator-driven change. */
|
|
57605
58708
|
lastChangedAt: number()
|
|
57606
58709
|
});
|
|
@@ -57619,7 +58722,7 @@ DeviceType.Light, method(object({
|
|
|
57619
58722
|
]),
|
|
57620
58723
|
rgb: RgbTripletSchema.optional(),
|
|
57621
58724
|
hsv: HsvTripletSchema.optional(),
|
|
57622
|
-
|
|
58725
|
+
colorTemperature: number().int().optional(),
|
|
57623
58726
|
lastChangedAt: number()
|
|
57624
58727
|
});
|
|
57625
58728
|
var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
|
|
@@ -58045,11 +59148,11 @@ object({
|
|
|
58045
59148
|
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
58046
59149
|
availablePrograms: array(string()),
|
|
58047
59150
|
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
58048
|
-
|
|
59151
|
+
remaining: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
58049
59152
|
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
58050
|
-
|
|
59153
|
+
delayedStart: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
58051
59154
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
58052
|
-
|
|
59155
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58053
59156
|
/** True when the door is reported open; null when the door state is not known. */
|
|
58054
59157
|
doorOpen: boolean().nullable(),
|
|
58055
59158
|
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
@@ -58094,7 +59197,7 @@ object({
|
|
|
58094
59197
|
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
58095
59198
|
lastFetchedAt: number()
|
|
58096
59199
|
});
|
|
58097
|
-
var DeviceIdSchema = number().int().nonnegative();
|
|
59200
|
+
var DeviceIdSchema$1 = number().int().nonnegative();
|
|
58098
59201
|
/** A value a program option or setting can take. */
|
|
58099
59202
|
var DishwasherValueSchema = union([
|
|
58100
59203
|
boolean(),
|
|
@@ -58158,77 +59261,77 @@ var DishwasherOptionsSchema = object({
|
|
|
58158
59261
|
options: array(DishwasherOptionDescriptorSchema)
|
|
58159
59262
|
});
|
|
58160
59263
|
DeviceType.Dishwasher, method(object({
|
|
58161
|
-
deviceId: DeviceIdSchema,
|
|
59264
|
+
deviceId: DeviceIdSchema$1,
|
|
58162
59265
|
program: string().min(1).optional(),
|
|
58163
59266
|
options: record(string(), DishwasherValueSchema).optional()
|
|
58164
59267
|
}), _void(), {
|
|
58165
59268
|
kind: "mutation",
|
|
58166
59269
|
auth: "protected"
|
|
58167
|
-
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
59270
|
+
}), method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
|
|
58168
59271
|
kind: "mutation",
|
|
58169
59272
|
auth: "protected"
|
|
58170
|
-
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
59273
|
+
}), method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
|
|
58171
59274
|
kind: "mutation",
|
|
58172
59275
|
auth: "protected"
|
|
58173
|
-
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
59276
|
+
}), method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
|
|
58174
59277
|
kind: "mutation",
|
|
58175
59278
|
auth: "protected"
|
|
58176
59279
|
}), method(object({
|
|
58177
|
-
deviceId: DeviceIdSchema,
|
|
59280
|
+
deviceId: DeviceIdSchema$1,
|
|
58178
59281
|
program: string().min(1)
|
|
58179
59282
|
}), _void(), {
|
|
58180
59283
|
kind: "mutation",
|
|
58181
59284
|
auth: "protected"
|
|
58182
59285
|
}), method(object({
|
|
58183
|
-
deviceId: DeviceIdSchema,
|
|
59286
|
+
deviceId: DeviceIdSchema$1,
|
|
58184
59287
|
on: boolean()
|
|
58185
59288
|
}), _void(), {
|
|
58186
59289
|
kind: "mutation",
|
|
58187
59290
|
auth: "protected"
|
|
58188
59291
|
}), method(object({
|
|
58189
|
-
deviceId: DeviceIdSchema,
|
|
59292
|
+
deviceId: DeviceIdSchema$1,
|
|
58190
59293
|
on: boolean()
|
|
58191
59294
|
}), _void(), {
|
|
58192
59295
|
kind: "mutation",
|
|
58193
59296
|
auth: "protected"
|
|
58194
59297
|
}), method(object({
|
|
58195
|
-
deviceId: DeviceIdSchema,
|
|
59298
|
+
deviceId: DeviceIdSchema$1,
|
|
58196
59299
|
on: boolean()
|
|
58197
59300
|
}), _void(), {
|
|
58198
59301
|
kind: "mutation",
|
|
58199
59302
|
auth: "protected"
|
|
58200
59303
|
}), method(object({
|
|
58201
|
-
deviceId: DeviceIdSchema,
|
|
59304
|
+
deviceId: DeviceIdSchema$1,
|
|
58202
59305
|
on: boolean()
|
|
58203
59306
|
}), _void(), {
|
|
58204
59307
|
kind: "mutation",
|
|
58205
59308
|
auth: "protected"
|
|
58206
59309
|
}), method(object({
|
|
58207
|
-
deviceId: DeviceIdSchema,
|
|
59310
|
+
deviceId: DeviceIdSchema$1,
|
|
58208
59311
|
on: boolean()
|
|
58209
59312
|
}), _void(), {
|
|
58210
59313
|
kind: "mutation",
|
|
58211
59314
|
auth: "protected"
|
|
58212
59315
|
}), method(object({
|
|
58213
|
-
deviceId: DeviceIdSchema,
|
|
59316
|
+
deviceId: DeviceIdSchema$1,
|
|
58214
59317
|
on: boolean()
|
|
58215
59318
|
}), _void(), {
|
|
58216
59319
|
kind: "mutation",
|
|
58217
59320
|
auth: "protected"
|
|
58218
59321
|
}), method(object({
|
|
58219
|
-
deviceId: DeviceIdSchema,
|
|
59322
|
+
deviceId: DeviceIdSchema$1,
|
|
58220
59323
|
on: boolean()
|
|
58221
59324
|
}), _void(), {
|
|
58222
59325
|
kind: "mutation",
|
|
58223
59326
|
auth: "protected"
|
|
58224
59327
|
}), method(object({
|
|
58225
|
-
deviceId: DeviceIdSchema,
|
|
59328
|
+
deviceId: DeviceIdSchema$1,
|
|
58226
59329
|
key: string().min(1),
|
|
58227
59330
|
value: DishwasherValueSchema
|
|
58228
59331
|
}), _void(), {
|
|
58229
59332
|
kind: "mutation",
|
|
58230
59333
|
auth: "protected"
|
|
58231
|
-
}), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
|
|
59334
|
+
}), method(object({ deviceId: DeviceIdSchema$1 }), DishwasherOptionsSchema, { auth: "protected" });
|
|
58232
59335
|
DeviceType.Camera;
|
|
58233
59336
|
object({
|
|
58234
59337
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
@@ -58667,7 +59770,7 @@ var FanDirectionSchema = _enum(["forward", "reverse"]);
|
|
|
58667
59770
|
object({
|
|
58668
59771
|
/** Active speed as 0..100 inclusive. Null when the device has no
|
|
58669
59772
|
* speed surface (single-speed fan). */
|
|
58670
|
-
|
|
59773
|
+
speed: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58671
59774
|
/** Speed granularity the device accepts (HA `percentage_step`, e.g. 25 for
|
|
58672
59775
|
* a 4-speed fan). Absent when unknown — the UI then falls back to step 1. */
|
|
58673
59776
|
percentageStep: number().positive().optional().meta(readingMeta("percentage")),
|
|
@@ -58687,7 +59790,7 @@ object({
|
|
|
58687
59790
|
});
|
|
58688
59791
|
DeviceType.Fan, method(object({
|
|
58689
59792
|
deviceId: number().int().nonnegative(),
|
|
58690
|
-
|
|
59793
|
+
speed: number().min(0).max(100)
|
|
58691
59794
|
}), _void(), {
|
|
58692
59795
|
kind: "mutation",
|
|
58693
59796
|
auth: "protected"
|
|
@@ -58870,7 +59973,7 @@ DeviceType.Humidifier, method(object({
|
|
|
58870
59973
|
});
|
|
58871
59974
|
object({
|
|
58872
59975
|
/** Current relative humidity, 0..100. `null` when the sample was refused (D393). */
|
|
58873
|
-
|
|
59976
|
+
humidity: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
|
|
58874
59977
|
precision: 0,
|
|
58875
59978
|
label: "Humidity"
|
|
58876
59979
|
})),
|
|
@@ -59313,7 +60416,7 @@ object({
|
|
|
59313
60416
|
batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59314
60417
|
/** 0..100 mowing-completion percentage of the current task, or null when no
|
|
59315
60418
|
* task is active / progress is unavailable. */
|
|
59316
|
-
|
|
60419
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59317
60420
|
/** Current device/event code (dynamic — mostly status, sometimes an error),
|
|
59318
60421
|
* or null when unknown. */
|
|
59319
60422
|
currentCode: number().nullable().meta(readingMeta("none")),
|
|
@@ -59785,9 +60888,35 @@ var MediaInfoSchema = object({
|
|
|
59785
60888
|
/** Optional cover-art / thumbnail URL. */
|
|
59786
60889
|
imageUrl: string().optional()
|
|
59787
60890
|
});
|
|
60891
|
+
/**
|
|
60892
|
+
* Where `state`, `volumeLevel`, `isMuted` and `source` come from. `reported`:
|
|
60893
|
+
* the device said so. `assumed`: the driver has no feedback (infrared) and
|
|
60894
|
+
* tracks what it last SENT; it moves only after a send was accepted, and a
|
|
60895
|
+
* human at the real remote makes it wrong. A UI shows an assumed value as a
|
|
60896
|
+
* guess, never as a reading.
|
|
60897
|
+
*/
|
|
60898
|
+
var MediaPlayerStateSourceSchema = _enum(["reported", "assumed"]);
|
|
60899
|
+
/** The fields of a media-player status a driver can only guess. */
|
|
60900
|
+
var MediaPlayerAssumedFieldSchema = _enum([
|
|
60901
|
+
"state",
|
|
60902
|
+
"volumeLevel",
|
|
60903
|
+
"isMuted",
|
|
60904
|
+
"source"
|
|
60905
|
+
]);
|
|
59788
60906
|
object({
|
|
59789
60907
|
/** Playback lifecycle state. */
|
|
59790
60908
|
state: MediaPlayerStateSchema,
|
|
60909
|
+
/**
|
|
60910
|
+
* Whether the state fields are readings or the driver's own bookkeeping.
|
|
60911
|
+
* A slice written before this field existed parses as `reported`.
|
|
60912
|
+
*/
|
|
60913
|
+
stateSource: MediaPlayerStateSourceSchema.default("reported"),
|
|
60914
|
+
/**
|
|
60915
|
+
* Which fields are the driver's own guess. `stateSource` is `assumed` when
|
|
60916
|
+
* this is not empty; a field not listed here is a reading even then (power
|
|
60917
|
+
* from a running-state source, mute guessed from the last send).
|
|
60918
|
+
*/
|
|
60919
|
+
assumedFields: array(MediaPlayerAssumedFieldSchema).default([]),
|
|
59791
60920
|
/** Volume as 0..100 inclusive. Null when the device has no volume
|
|
59792
60921
|
* surface. Pair with `DeviceFeature.MediaPlayerVolume`. */
|
|
59793
60922
|
volumeLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
@@ -59803,10 +60932,10 @@ object({
|
|
|
59803
60932
|
currentMedia: MediaInfoSchema.nullable(),
|
|
59804
60933
|
/** Current playback position in ms. Null when not seekable or
|
|
59805
60934
|
* nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
|
|
59806
|
-
|
|
60935
|
+
position: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59807
60936
|
/** Total duration of the current media in ms. Null when unknown
|
|
59808
60937
|
* (live stream) or nothing is playing. */
|
|
59809
|
-
|
|
60938
|
+
duration: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59810
60939
|
/** Shuffle toggle. Null when no shuffle surface.
|
|
59811
60940
|
* Pair with `DeviceFeature.MediaPlayerShuffle`. */
|
|
59812
60941
|
shuffle: boolean().nullable(),
|
|
@@ -59833,7 +60962,7 @@ DeviceType.MediaPlayer, method(object({ deviceId: number().int().nonnegative() }
|
|
|
59833
60962
|
auth: "protected"
|
|
59834
60963
|
}), method(object({
|
|
59835
60964
|
deviceId: number().int().nonnegative(),
|
|
59836
|
-
|
|
60965
|
+
position: number().int().nonnegative()
|
|
59837
60966
|
}), _void(), {
|
|
59838
60967
|
kind: "mutation",
|
|
59839
60968
|
auth: "protected"
|
|
@@ -60506,9 +61635,9 @@ var NetworkLinkStatusSchema = object({
|
|
|
60506
61635
|
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
60507
61636
|
* SKIP a null rather than coerce it.
|
|
60508
61637
|
*/
|
|
60509
|
-
|
|
61638
|
+
signal: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
60510
61639
|
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
60511
|
-
|
|
61640
|
+
rssi: number().optional().meta(readingMeta("signal-level")),
|
|
60512
61641
|
/** Network name of a wireless link, when the firmware reports it. */
|
|
60513
61642
|
ssid: string().optional(),
|
|
60514
61643
|
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
@@ -60640,7 +61769,8 @@ var TopologyNodeSchema = object({
|
|
|
60640
61769
|
isHub: boolean(),
|
|
60641
61770
|
isOnline: boolean(),
|
|
60642
61771
|
cpuPercent: number(),
|
|
60643
|
-
|
|
61772
|
+
/** `null` when the node's memory read failed or it has not reported one (D393). */
|
|
61773
|
+
memoryPercent: number().nullable(),
|
|
60644
61774
|
uptime: number(),
|
|
60645
61775
|
lastSeen: string(),
|
|
60646
61776
|
localIps: array(string()).readonly(),
|
|
@@ -61169,10 +62299,21 @@ var PetFeederDeviceStatusSchema = _enum([
|
|
|
61169
62299
|
]);
|
|
61170
62300
|
var gramsPortion = number().int().min(4).max(200);
|
|
61171
62301
|
object({
|
|
61172
|
-
/** Food
|
|
61173
|
-
*
|
|
61174
|
-
* bowl
|
|
62302
|
+
/** Food in the TANK (hopper), as the feeder's own sensor reports it
|
|
62303
|
+
* (`state.food`). A coarse level code, not grams — `0` is empty. The
|
|
62304
|
+
* amount in the bowl is `bowlFood`. On dual-hopper models this is the
|
|
62305
|
+
* combined reading; per-hopper levels live in `food1`/`food2`. Null when
|
|
62306
|
+
* the device has not reported yet. */
|
|
61175
62307
|
foodLevel: number().nullable().meta(readingMeta("none")),
|
|
62308
|
+
/** Food in the BOWL, a mass (stored in kilograms, D944). Reported only by a
|
|
62309
|
+
* feeder with a bowl scale; null when the model has none or its reading is
|
|
62310
|
+
* of an unproven unit. */
|
|
62311
|
+
bowlFood: number().nullable().meta(readingMeta("mass")),
|
|
62312
|
+
/** True while the pet is eating (`state.eating`). */
|
|
62313
|
+
eating: boolean(),
|
|
62314
|
+
/** Whether `markFoodReplenished` does anything on this model. When false
|
|
62315
|
+
* the client must not offer it. */
|
|
62316
|
+
supportsMarkRefilled: boolean(),
|
|
61176
62317
|
/** Hopper-1 food level (grams) on dual-hopper feeders; null on
|
|
61177
62318
|
* single-hopper models. */
|
|
61178
62319
|
food1: number().nullable().meta(readingMeta("none")),
|
|
@@ -61180,12 +62321,17 @@ object({
|
|
|
61180
62321
|
* single-hopper models. */
|
|
61181
62322
|
food2: number().nullable().meta(readingMeta("none")),
|
|
61182
62323
|
/** Derived low-food flag — mirrors the HA `food_level` binary_sensor
|
|
61183
|
-
* (`device_class: problem`, on = low). True when the
|
|
61184
|
-
*
|
|
62324
|
+
* (`device_class: problem`, on = low). True when the tank reports empty,
|
|
62325
|
+
* or, on a dual-hopper model, when EITHER hopper is empty. */
|
|
61185
62326
|
lowFood: boolean(),
|
|
61186
|
-
/** Battery charge 0..100 (%).
|
|
61187
|
-
*
|
|
62327
|
+
/** Battery charge 0..100 (%). On a feeder running on `mains` this is the
|
|
62328
|
+
* BACKUP battery's charge, not the power source. Null when the device has
|
|
62329
|
+
* no battery reading. */
|
|
61188
62330
|
batteryPower: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
62331
|
+
/** What the feeder is powered from right now: `mains` (plugged in, the
|
|
62332
|
+
* battery is only a backup) or `battery`. Null when the device does not
|
|
62333
|
+
* report it. */
|
|
62334
|
+
powerSource: _enum(["mains", "battery"]).nullable(),
|
|
61189
62335
|
/**
|
|
61190
62336
|
* Desiccant life remaining, stored in seconds (duration base, D944).
|
|
61191
62337
|
* Providers convert from the days the feeder reports. Null when the
|
|
@@ -61213,6 +62359,14 @@ object({
|
|
|
61213
62359
|
feedSound: boolean(),
|
|
61214
62360
|
/** Speaker / prompt volume level (device-scaled integer). */
|
|
61215
62361
|
volume: number().meta(readingMeta("none")),
|
|
62362
|
+
/** Portion (grams) of the last manual feed sent from a single-hopper
|
|
62363
|
+
* stepper — the default the next manual feed starts from. Persisted per
|
|
62364
|
+
* device by the provider; null until a manual feed has been sent. */
|
|
62365
|
+
lastFeedGrams: gramsPortion.nullable(),
|
|
62366
|
+
/** Hopper-1 portion of the last manual feed (dual-hopper); null until sent. */
|
|
62367
|
+
lastFeedHopper1: gramsPortion.nullable(),
|
|
62368
|
+
/** Hopper-2 portion of the last manual feed (dual-hopper); null until sent. */
|
|
62369
|
+
lastFeedHopper2: gramsPortion.nullable(),
|
|
61216
62370
|
/** Ms epoch when the slice was last refreshed from the cloud. */
|
|
61217
62371
|
lastFetchedAt: number()
|
|
61218
62372
|
});
|
|
@@ -61267,6 +62421,64 @@ DeviceType.PetFeeder, method(object({
|
|
|
61267
62421
|
kind: "mutation",
|
|
61268
62422
|
auth: "protected"
|
|
61269
62423
|
});
|
|
62424
|
+
object({
|
|
62425
|
+
/** Water in the tank, 0..100 (%). Null while the source has not reported. */
|
|
62426
|
+
waterLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
62427
|
+
/** Water in the tank, in litres. Null while the source has not reported. */
|
|
62428
|
+
waterVolume: number().min(0).nullable().meta(readingMeta("volume")),
|
|
62429
|
+
/** True when the tank is empty. Null while unknown. */
|
|
62430
|
+
empty: boolean().nullable(),
|
|
62431
|
+
/** True while the pump is running. Null while unknown. */
|
|
62432
|
+
pumpRunning: boolean().nullable(),
|
|
62433
|
+
/** True when the pump works on an on/off duty cycle rather than continuously. */
|
|
62434
|
+
pumpIntervalEnabled: boolean().nullable(),
|
|
62435
|
+
/** How long the pump runs per cycle, in seconds. */
|
|
62436
|
+
pumpOnTime: number().min(0).nullable().meta(readingMeta("duration")),
|
|
62437
|
+
/** How long the pump rests per cycle, in seconds. */
|
|
62438
|
+
pumpOffTime: number().min(0).nullable().meta(readingMeta("duration")),
|
|
62439
|
+
/** Water drunk in the last drink, in litres. */
|
|
62440
|
+
lastDrink: number().min(0).nullable().meta(readingMeta("volume")),
|
|
62441
|
+
/** Water drunk in the current hour, in litres. */
|
|
62442
|
+
currentHourDrink: number().min(0).nullable().meta(readingMeta("volume")),
|
|
62443
|
+
/** Water drunk over the last 24 hours (rolling), in litres. */
|
|
62444
|
+
last24hDrink: number().min(0).nullable().meta(readingMeta("volume")),
|
|
62445
|
+
/** Water drunk since local midnight, in litres. */
|
|
62446
|
+
todayDrink: number().min(0).nullable().meta(readingMeta("volume")),
|
|
62447
|
+
/** Decoded fault message. Null means healthy; a non-null string is an active fault. */
|
|
62448
|
+
error: string().nullable(),
|
|
62449
|
+
/** Ms epoch when the slice was last refreshed. */
|
|
62450
|
+
lastFetchedAt: number()
|
|
62451
|
+
});
|
|
62452
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
62453
|
+
var MinutesSchema = number().int().min(0);
|
|
62454
|
+
DeviceType.PetFountain, method(object({
|
|
62455
|
+
deviceId: DeviceIdSchema,
|
|
62456
|
+
on: boolean()
|
|
62457
|
+
}), _void(), {
|
|
62458
|
+
kind: "mutation",
|
|
62459
|
+
auth: "protected"
|
|
62460
|
+
}), method(object({
|
|
62461
|
+
deviceId: DeviceIdSchema,
|
|
62462
|
+
on: boolean()
|
|
62463
|
+
}), _void(), {
|
|
62464
|
+
kind: "mutation",
|
|
62465
|
+
auth: "protected"
|
|
62466
|
+
}), method(object({
|
|
62467
|
+
deviceId: DeviceIdSchema,
|
|
62468
|
+
minutes: MinutesSchema
|
|
62469
|
+
}), _void(), {
|
|
62470
|
+
kind: "mutation",
|
|
62471
|
+
auth: "protected"
|
|
62472
|
+
}), method(object({
|
|
62473
|
+
deviceId: DeviceIdSchema,
|
|
62474
|
+
minutes: MinutesSchema
|
|
62475
|
+
}), _void(), {
|
|
62476
|
+
kind: "mutation",
|
|
62477
|
+
auth: "protected"
|
|
62478
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
62479
|
+
kind: "mutation",
|
|
62480
|
+
auth: "protected"
|
|
62481
|
+
});
|
|
61270
62482
|
var VehicleSchema = object({
|
|
61271
62483
|
id: string(),
|
|
61272
62484
|
name: string(),
|
|
@@ -61648,16 +62860,16 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
|
|
|
61648
62860
|
auth: "admin"
|
|
61649
62861
|
});
|
|
61650
62862
|
object({
|
|
61651
|
-
/** Instantaneous power draw
|
|
61652
|
-
|
|
62863
|
+
/** Instantaneous power draw (watts). */
|
|
62864
|
+
power: number().optional().meta(readingMeta("power", { label: "Power" })),
|
|
61653
62865
|
/** Cumulative energy in kilowatt-hours since the meter was reset. */
|
|
61654
|
-
|
|
61655
|
-
/** Voltage
|
|
61656
|
-
|
|
62866
|
+
energy: number().optional().meta(readingMeta("energy", { label: "Energy" })),
|
|
62867
|
+
/** Voltage (volts). */
|
|
62868
|
+
voltage: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
61657
62869
|
/** Current in amperes. */
|
|
61658
|
-
|
|
62870
|
+
current: number().optional().meta(readingMeta("current", { label: "Current" })),
|
|
61659
62871
|
/** Apparent power in volt-amperes. */
|
|
61660
|
-
|
|
62872
|
+
apparentPower: number().optional().meta(readingMeta("apparent-power")),
|
|
61661
62873
|
/** Power factor (0..1) if reported. */
|
|
61662
62874
|
powerFactor: number().min(0).max(1).optional().meta(readingMeta("ratio")),
|
|
61663
62875
|
/** Ms epoch when the slice was last updated. */
|
|
@@ -61712,16 +62924,13 @@ object({
|
|
|
61712
62924
|
location: string().nullable(),
|
|
61713
62925
|
/** GPS coordinates when available. Null otherwise. */
|
|
61714
62926
|
gps: GpsLocationSchema.nullable(),
|
|
61715
|
-
/** Optional battery level of the tracking device (0..100). Null
|
|
61716
|
-
* when not reported. */
|
|
61717
|
-
batteryPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
61718
62927
|
/** Ms epoch when the slice was last updated. */
|
|
61719
62928
|
lastChangedAt: number()
|
|
61720
62929
|
});
|
|
61721
62930
|
DeviceType.Presence;
|
|
61722
62931
|
object({
|
|
61723
62932
|
/** Current pressure in hPa. `null` when the sample was refused (D393). */
|
|
61724
|
-
|
|
62933
|
+
pressure: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
|
|
61725
62934
|
/** Ms epoch when the slice was last updated. */
|
|
61726
62935
|
lastFetchedAt: number()
|
|
61727
62936
|
});
|
|
@@ -64731,7 +65940,7 @@ object({
|
|
|
64731
65940
|
DeviceType.Sensor;
|
|
64732
65941
|
object({
|
|
64733
65942
|
/** Current temperature in Celsius. `null` when the sample was refused (D393). */
|
|
64734
|
-
|
|
65943
|
+
temperature: number().nullable().meta(readingMeta("temperature", {
|
|
64735
65944
|
precision: 1,
|
|
64736
65945
|
label: "Temperature"
|
|
64737
65946
|
})),
|
|
@@ -64995,7 +66204,7 @@ object({
|
|
|
64995
66204
|
/** Speed tokens the hardware accepts — drives the UI selector. */
|
|
64996
66205
|
availableFanSpeeds: array(string()),
|
|
64997
66206
|
/** 0..100 cleaning-completion percentage of the current task, or null. */
|
|
64998
|
-
|
|
66207
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
64999
66208
|
/** Current error code (0 / null = no error). */
|
|
65000
66209
|
errorCode: number().nullable().meta(readingMeta("none")),
|
|
65001
66210
|
/** Human label for {@link errorCode}, or null when none / undecodable. */
|
|
@@ -65864,9 +67073,17 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
|
|
|
65864
67073
|
kind: "mutation",
|
|
65865
67074
|
auth: "admin"
|
|
65866
67075
|
});
|
|
67076
|
+
discriminatedUnion("kind", [object({
|
|
67077
|
+
kind: literal("raw"),
|
|
67078
|
+
timings: array(number().int()),
|
|
67079
|
+
settings: TransmitSettingsSchema.optional()
|
|
67080
|
+
}), object({
|
|
67081
|
+
kind: literal("pronto"),
|
|
67082
|
+
code: string()
|
|
67083
|
+
})]);
|
|
65867
67084
|
DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
|
|
65868
67085
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
65869
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
67086
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
65870
67087
|
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
65871
67088
|
DeviceRole.BinarySensor, DeviceRole.MotionSensor;
|
|
65872
67089
|
new Set(CAP_NAMES);
|
|
@@ -65919,7 +67136,7 @@ var AccessoryKind = {
|
|
|
65919
67136
|
PrivacyMask: DeviceRole.PrivacyMask
|
|
65920
67137
|
};
|
|
65921
67138
|
AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
|
|
65922
|
-
DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer;
|
|
67139
|
+
DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer;
|
|
65923
67140
|
new Set(Object.values(DeviceType));
|
|
65924
67141
|
Object.freeze({
|
|
65925
67142
|
"accessories.getStatus": {
|
|
@@ -65936,6 +67153,104 @@ Object.freeze({
|
|
|
65936
67153
|
access: "create",
|
|
65937
67154
|
role: "admin"
|
|
65938
67155
|
},
|
|
67156
|
+
"actions.create": {
|
|
67157
|
+
capName: "actions",
|
|
67158
|
+
capScope: "system",
|
|
67159
|
+
addonId: null,
|
|
67160
|
+
access: "create",
|
|
67161
|
+
role: "admin"
|
|
67162
|
+
},
|
|
67163
|
+
"actions.delete": {
|
|
67164
|
+
capName: "actions",
|
|
67165
|
+
capScope: "system",
|
|
67166
|
+
addonId: null,
|
|
67167
|
+
access: "delete",
|
|
67168
|
+
role: "admin"
|
|
67169
|
+
},
|
|
67170
|
+
"actions.get": {
|
|
67171
|
+
capName: "actions",
|
|
67172
|
+
capScope: "system",
|
|
67173
|
+
addonId: null,
|
|
67174
|
+
access: "view",
|
|
67175
|
+
role: "viewer"
|
|
67176
|
+
},
|
|
67177
|
+
"actions.getLinks": {
|
|
67178
|
+
capName: "actions",
|
|
67179
|
+
capScope: "system",
|
|
67180
|
+
addonId: null,
|
|
67181
|
+
access: "view",
|
|
67182
|
+
role: "admin"
|
|
67183
|
+
},
|
|
67184
|
+
"actions.getTraces": {
|
|
67185
|
+
capName: "actions",
|
|
67186
|
+
capScope: "system",
|
|
67187
|
+
addonId: null,
|
|
67188
|
+
access: "view",
|
|
67189
|
+
role: "admin"
|
|
67190
|
+
},
|
|
67191
|
+
"actions.list": {
|
|
67192
|
+
capName: "actions",
|
|
67193
|
+
capScope: "system",
|
|
67194
|
+
addonId: null,
|
|
67195
|
+
access: "view",
|
|
67196
|
+
role: "admin"
|
|
67197
|
+
},
|
|
67198
|
+
"actions.listForCamera": {
|
|
67199
|
+
capName: "actions",
|
|
67200
|
+
capScope: "system",
|
|
67201
|
+
addonId: null,
|
|
67202
|
+
access: "view",
|
|
67203
|
+
role: "viewer"
|
|
67204
|
+
},
|
|
67205
|
+
"actions.run": {
|
|
67206
|
+
capName: "actions",
|
|
67207
|
+
capScope: "system",
|
|
67208
|
+
addonId: null,
|
|
67209
|
+
access: "create",
|
|
67210
|
+
role: "viewer"
|
|
67211
|
+
},
|
|
67212
|
+
"actions.setLinks": {
|
|
67213
|
+
capName: "actions",
|
|
67214
|
+
capScope: "system",
|
|
67215
|
+
addonId: null,
|
|
67216
|
+
access: "create",
|
|
67217
|
+
role: "admin"
|
|
67218
|
+
},
|
|
67219
|
+
"actions.stop": {
|
|
67220
|
+
capName: "actions",
|
|
67221
|
+
capScope: "system",
|
|
67222
|
+
addonId: null,
|
|
67223
|
+
access: "create",
|
|
67224
|
+
role: "admin"
|
|
67225
|
+
},
|
|
67226
|
+
"actions.update": {
|
|
67227
|
+
capName: "actions",
|
|
67228
|
+
capScope: "system",
|
|
67229
|
+
addonId: null,
|
|
67230
|
+
access: "create",
|
|
67231
|
+
role: "admin"
|
|
67232
|
+
},
|
|
67233
|
+
"actionSource.listActions": {
|
|
67234
|
+
capName: "action-source",
|
|
67235
|
+
capScope: "system",
|
|
67236
|
+
addonId: null,
|
|
67237
|
+
access: "view",
|
|
67238
|
+
role: "admin"
|
|
67239
|
+
},
|
|
67240
|
+
"actionSource.runAction": {
|
|
67241
|
+
capName: "action-source",
|
|
67242
|
+
capScope: "system",
|
|
67243
|
+
addonId: null,
|
|
67244
|
+
access: "create",
|
|
67245
|
+
role: "admin"
|
|
67246
|
+
},
|
|
67247
|
+
"actionSource.stopAction": {
|
|
67248
|
+
capName: "action-source",
|
|
67249
|
+
capScope: "system",
|
|
67250
|
+
addonId: null,
|
|
67251
|
+
access: "create",
|
|
67252
|
+
role: "admin"
|
|
67253
|
+
},
|
|
65939
67254
|
"addonPages.listPages": {
|
|
65940
67255
|
capName: "addon-pages",
|
|
65941
67256
|
capScope: "system",
|
|
@@ -67217,6 +68532,13 @@ Object.freeze({
|
|
|
67217
68532
|
access: "view",
|
|
67218
68533
|
role: "admin"
|
|
67219
68534
|
},
|
|
68535
|
+
"coreBlocks.getAutomationRunState": {
|
|
68536
|
+
capName: "core-blocks",
|
|
68537
|
+
capScope: "system",
|
|
68538
|
+
addonId: null,
|
|
68539
|
+
access: "view",
|
|
68540
|
+
role: "admin"
|
|
68541
|
+
},
|
|
67220
68542
|
"coreBlocks.getBlockSettings": {
|
|
67221
68543
|
capName: "core-blocks",
|
|
67222
68544
|
capScope: "system",
|
|
@@ -67238,6 +68560,13 @@ Object.freeze({
|
|
|
67238
68560
|
access: "view",
|
|
67239
68561
|
role: "admin"
|
|
67240
68562
|
},
|
|
68563
|
+
"coreBlocks.getTraces": {
|
|
68564
|
+
capName: "core-blocks",
|
|
68565
|
+
capScope: "system",
|
|
68566
|
+
addonId: null,
|
|
68567
|
+
access: "view",
|
|
68568
|
+
role: "admin"
|
|
68569
|
+
},
|
|
67241
68570
|
"coreBlocks.getTypeDefs": {
|
|
67242
68571
|
capName: "core-blocks",
|
|
67243
68572
|
capScope: "system",
|
|
@@ -67273,6 +68602,13 @@ Object.freeze({
|
|
|
67273
68602
|
access: "create",
|
|
67274
68603
|
role: "admin"
|
|
67275
68604
|
},
|
|
68605
|
+
"coreBlocks.reportAutomationRun": {
|
|
68606
|
+
capName: "core-blocks",
|
|
68607
|
+
capScope: "system",
|
|
68608
|
+
addonId: null,
|
|
68609
|
+
access: "create",
|
|
68610
|
+
role: "admin"
|
|
68611
|
+
},
|
|
67276
68612
|
"coreBlocks.restart": {
|
|
67277
68613
|
capName: "core-blocks",
|
|
67278
68614
|
capScope: "system",
|
|
@@ -67735,6 +69071,13 @@ Object.freeze({
|
|
|
67735
69071
|
access: "create",
|
|
67736
69072
|
role: "admin"
|
|
67737
69073
|
},
|
|
69074
|
+
"deviceExport.exposeEntity": {
|
|
69075
|
+
capName: "device-export",
|
|
69076
|
+
capScope: "system",
|
|
69077
|
+
addonId: null,
|
|
69078
|
+
access: "create",
|
|
69079
|
+
role: "admin"
|
|
69080
|
+
},
|
|
67738
69081
|
"deviceExport.getDeviceLiveContribution": {
|
|
67739
69082
|
capName: "device-export",
|
|
67740
69083
|
capScope: "system",
|
|
@@ -67763,6 +69106,13 @@ Object.freeze({
|
|
|
67763
69106
|
access: "view",
|
|
67764
69107
|
role: "admin"
|
|
67765
69108
|
},
|
|
69109
|
+
"deviceExport.listExposedEntities": {
|
|
69110
|
+
capName: "device-export",
|
|
69111
|
+
capScope: "system",
|
|
69112
|
+
addonId: null,
|
|
69113
|
+
access: "view",
|
|
69114
|
+
role: "admin"
|
|
69115
|
+
},
|
|
67766
69116
|
"deviceExport.listSupportedDeviceKinds": {
|
|
67767
69117
|
capName: "device-export",
|
|
67768
69118
|
capScope: "system",
|
|
@@ -67770,6 +69120,13 @@ Object.freeze({
|
|
|
67770
69120
|
access: "view",
|
|
67771
69121
|
role: "admin"
|
|
67772
69122
|
},
|
|
69123
|
+
"deviceExport.listSupportedEntityKinds": {
|
|
69124
|
+
capName: "device-export",
|
|
69125
|
+
capScope: "system",
|
|
69126
|
+
addonId: null,
|
|
69127
|
+
access: "view",
|
|
69128
|
+
role: "admin"
|
|
69129
|
+
},
|
|
67773
69130
|
"deviceExport.unexposeDevice": {
|
|
67774
69131
|
capName: "device-export",
|
|
67775
69132
|
capScope: "system",
|
|
@@ -67777,6 +69134,13 @@ Object.freeze({
|
|
|
67777
69134
|
access: "create",
|
|
67778
69135
|
role: "admin"
|
|
67779
69136
|
},
|
|
69137
|
+
"deviceExport.unexposeEntity": {
|
|
69138
|
+
capName: "device-export",
|
|
69139
|
+
capScope: "system",
|
|
69140
|
+
addonId: null,
|
|
69141
|
+
access: "create",
|
|
69142
|
+
role: "admin"
|
|
69143
|
+
},
|
|
67780
69144
|
"deviceExtension.listCandidates": {
|
|
67781
69145
|
capName: "device-extension",
|
|
67782
69146
|
capScope: "device",
|
|
@@ -69352,6 +70716,20 @@ Object.freeze({
|
|
|
69352
70716
|
access: "create",
|
|
69353
70717
|
role: "viewer"
|
|
69354
70718
|
},
|
|
70719
|
+
"irTransmitter.getInfo": {
|
|
70720
|
+
capName: "ir-transmitter",
|
|
70721
|
+
capScope: "device",
|
|
70722
|
+
addonId: null,
|
|
70723
|
+
access: "view",
|
|
70724
|
+
role: "viewer"
|
|
70725
|
+
},
|
|
70726
|
+
"irTransmitter.send": {
|
|
70727
|
+
capName: "ir-transmitter",
|
|
70728
|
+
capScope: "device",
|
|
70729
|
+
addonId: null,
|
|
70730
|
+
access: "create",
|
|
70731
|
+
role: "viewer"
|
|
70732
|
+
},
|
|
69355
70733
|
"keychain.delete": {
|
|
69356
70734
|
capName: "keychain",
|
|
69357
70735
|
capScope: "system",
|
|
@@ -70584,6 +71962,13 @@ Object.freeze({
|
|
|
70584
71962
|
access: "create",
|
|
70585
71963
|
role: "admin"
|
|
70586
71964
|
},
|
|
71965
|
+
"nodeRemovalHook.onNodeRemoved": {
|
|
71966
|
+
capName: "node-removal-hook",
|
|
71967
|
+
capScope: "system",
|
|
71968
|
+
addonId: null,
|
|
71969
|
+
access: "create",
|
|
71970
|
+
role: "admin"
|
|
71971
|
+
},
|
|
70587
71972
|
"nodes.clusterAddonStatus": {
|
|
70588
71973
|
capName: "nodes",
|
|
70589
71974
|
capScope: "system",
|
|
@@ -71221,6 +72606,48 @@ Object.freeze({
|
|
|
71221
72606
|
access: "create",
|
|
71222
72607
|
role: "viewer"
|
|
71223
72608
|
},
|
|
72609
|
+
"petFountain.getStatus": {
|
|
72610
|
+
capName: "pet-fountain",
|
|
72611
|
+
capScope: "device",
|
|
72612
|
+
addonId: null,
|
|
72613
|
+
access: "view",
|
|
72614
|
+
role: "viewer"
|
|
72615
|
+
},
|
|
72616
|
+
"petFountain.resetDailyConsumption": {
|
|
72617
|
+
capName: "pet-fountain",
|
|
72618
|
+
capScope: "device",
|
|
72619
|
+
addonId: null,
|
|
72620
|
+
access: "delete",
|
|
72621
|
+
role: "viewer"
|
|
72622
|
+
},
|
|
72623
|
+
"petFountain.setPump": {
|
|
72624
|
+
capName: "pet-fountain",
|
|
72625
|
+
capScope: "device",
|
|
72626
|
+
addonId: null,
|
|
72627
|
+
access: "create",
|
|
72628
|
+
role: "viewer"
|
|
72629
|
+
},
|
|
72630
|
+
"petFountain.setPumpInterval": {
|
|
72631
|
+
capName: "pet-fountain",
|
|
72632
|
+
capScope: "device",
|
|
72633
|
+
addonId: null,
|
|
72634
|
+
access: "create",
|
|
72635
|
+
role: "viewer"
|
|
72636
|
+
},
|
|
72637
|
+
"petFountain.setPumpOffMinutes": {
|
|
72638
|
+
capName: "pet-fountain",
|
|
72639
|
+
capScope: "device",
|
|
72640
|
+
addonId: null,
|
|
72641
|
+
access: "create",
|
|
72642
|
+
role: "viewer"
|
|
72643
|
+
},
|
|
72644
|
+
"petFountain.setPumpOnMinutes": {
|
|
72645
|
+
capName: "pet-fountain",
|
|
72646
|
+
capScope: "device",
|
|
72647
|
+
addonId: null,
|
|
72648
|
+
access: "create",
|
|
72649
|
+
role: "viewer"
|
|
72650
|
+
},
|
|
71224
72651
|
"pipelineAnalytics.addRetrainFrameFromRecording": {
|
|
71225
72652
|
capName: "pipeline-analytics",
|
|
71226
72653
|
capScope: "device",
|
|
@@ -73475,6 +74902,41 @@ Object.freeze({
|
|
|
73475
74902
|
access: "create",
|
|
73476
74903
|
role: "admin"
|
|
73477
74904
|
},
|
|
74905
|
+
"remote.getConfig": {
|
|
74906
|
+
capName: "remote",
|
|
74907
|
+
capScope: "system",
|
|
74908
|
+
addonId: null,
|
|
74909
|
+
access: "view",
|
|
74910
|
+
role: "admin"
|
|
74911
|
+
},
|
|
74912
|
+
"remote.listCommands": {
|
|
74913
|
+
capName: "remote",
|
|
74914
|
+
capScope: "system",
|
|
74915
|
+
addonId: null,
|
|
74916
|
+
access: "view",
|
|
74917
|
+
role: "admin"
|
|
74918
|
+
},
|
|
74919
|
+
"remote.sendCommand": {
|
|
74920
|
+
capName: "remote",
|
|
74921
|
+
capScope: "system",
|
|
74922
|
+
addonId: null,
|
|
74923
|
+
access: "create",
|
|
74924
|
+
role: "admin"
|
|
74925
|
+
},
|
|
74926
|
+
"remote.sendMediaCommand": {
|
|
74927
|
+
capName: "remote",
|
|
74928
|
+
capScope: "system",
|
|
74929
|
+
addonId: null,
|
|
74930
|
+
access: "create",
|
|
74931
|
+
role: "admin"
|
|
74932
|
+
},
|
|
74933
|
+
"remote.setConfig": {
|
|
74934
|
+
capName: "remote",
|
|
74935
|
+
capScope: "system",
|
|
74936
|
+
addonId: null,
|
|
74937
|
+
access: "create",
|
|
74938
|
+
role: "admin"
|
|
74939
|
+
},
|
|
73478
74940
|
"runningState.getStatus": {
|
|
73479
74941
|
capName: "running-state",
|
|
73480
74942
|
capScope: "device",
|
|
@@ -73587,6 +75049,13 @@ Object.freeze({
|
|
|
73587
75049
|
access: "create",
|
|
73588
75050
|
role: "admin"
|
|
73589
75051
|
},
|
|
75052
|
+
"serverManagement.getLaunchOverrides": {
|
|
75053
|
+
capName: "server-management",
|
|
75054
|
+
capScope: "system",
|
|
75055
|
+
addonId: null,
|
|
75056
|
+
access: "view",
|
|
75057
|
+
role: "admin"
|
|
75058
|
+
},
|
|
73590
75059
|
"serverManagement.getServerPackageStatus": {
|
|
73591
75060
|
capName: "server-management",
|
|
73592
75061
|
capScope: "system",
|
|
@@ -73608,6 +75077,13 @@ Object.freeze({
|
|
|
73608
75077
|
access: "create",
|
|
73609
75078
|
role: "admin"
|
|
73610
75079
|
},
|
|
75080
|
+
"serverManagement.setLaunchOverrides": {
|
|
75081
|
+
capName: "server-management",
|
|
75082
|
+
capScope: "system",
|
|
75083
|
+
addonId: null,
|
|
75084
|
+
access: "create",
|
|
75085
|
+
role: "admin"
|
|
75086
|
+
},
|
|
73611
75087
|
"settingsStore.aggregate": {
|
|
73612
75088
|
capName: "settings-store",
|
|
73613
75089
|
capScope: "system",
|
|
@@ -74665,6 +76141,41 @@ Object.freeze({
|
|
|
74665
76141
|
access: "view",
|
|
74666
76142
|
role: "viewer"
|
|
74667
76143
|
},
|
|
76144
|
+
"template.create": {
|
|
76145
|
+
capName: "template",
|
|
76146
|
+
capScope: "system",
|
|
76147
|
+
addonId: null,
|
|
76148
|
+
access: "create",
|
|
76149
|
+
role: "admin"
|
|
76150
|
+
},
|
|
76151
|
+
"template.delete": {
|
|
76152
|
+
capName: "template",
|
|
76153
|
+
capScope: "system",
|
|
76154
|
+
addonId: null,
|
|
76155
|
+
access: "delete",
|
|
76156
|
+
role: "admin"
|
|
76157
|
+
},
|
|
76158
|
+
"template.get": {
|
|
76159
|
+
capName: "template",
|
|
76160
|
+
capScope: "system",
|
|
76161
|
+
addonId: null,
|
|
76162
|
+
access: "view",
|
|
76163
|
+
role: "admin"
|
|
76164
|
+
},
|
|
76165
|
+
"template.list": {
|
|
76166
|
+
capName: "template",
|
|
76167
|
+
capScope: "system",
|
|
76168
|
+
addonId: null,
|
|
76169
|
+
access: "view",
|
|
76170
|
+
role: "admin"
|
|
76171
|
+
},
|
|
76172
|
+
"template.update": {
|
|
76173
|
+
capName: "template",
|
|
76174
|
+
capScope: "system",
|
|
76175
|
+
addonId: null,
|
|
76176
|
+
access: "create",
|
|
76177
|
+
role: "admin"
|
|
76178
|
+
},
|
|
74668
76179
|
"terminalSession.adoptLegacyMonitor": {
|
|
74669
76180
|
capName: "terminal-session",
|
|
74670
76181
|
capScope: "system",
|
|
@@ -75846,7 +77357,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75846
77357
|
label: t("Full brightness", "Luminosità massima"),
|
|
75847
77358
|
phrase: t("Set {device} to full brightness", "Porta {device} alla massima luminosità"),
|
|
75848
77359
|
icon: "sun",
|
|
75849
|
-
args: {
|
|
77360
|
+
args: { level: 100 }
|
|
75850
77361
|
},
|
|
75851
77362
|
{
|
|
75852
77363
|
id: "brightness.half",
|
|
@@ -75854,7 +77365,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75854
77365
|
label: t("Half brightness", "Luminosità a metà"),
|
|
75855
77366
|
phrase: t("Dim {device} to half", "Abbassa {device} a metà luminosità"),
|
|
75856
77367
|
icon: "sun-dim",
|
|
75857
|
-
args: {
|
|
77368
|
+
args: { level: 50 }
|
|
75858
77369
|
},
|
|
75859
77370
|
{
|
|
75860
77371
|
id: "brightness.off",
|
|
@@ -75862,16 +77373,16 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75862
77373
|
label: t("Brightness off", "Luminosità a zero"),
|
|
75863
77374
|
phrase: t("Dim {device} to zero", "Abbassa {device} a zero"),
|
|
75864
77375
|
icon: "lightbulb-off",
|
|
75865
|
-
args: {
|
|
77376
|
+
args: { level: 0 }
|
|
75866
77377
|
},
|
|
75867
77378
|
{
|
|
75868
77379
|
id: "brightness.set",
|
|
75869
77380
|
method: "setBrightness",
|
|
75870
77381
|
label: t("Set brightness", "Imposta la luminosità"),
|
|
75871
|
-
phrase: t("Set the brightness of {device} to {
|
|
77382
|
+
phrase: t("Set the brightness of {device} to {level}", "Imposta la luminosità di {device} a {level}"),
|
|
75872
77383
|
icon: "sun-medium",
|
|
75873
77384
|
openArgs: [{
|
|
75874
|
-
key: "
|
|
77385
|
+
key: "level",
|
|
75875
77386
|
label: PERCENT,
|
|
75876
77387
|
offer: {
|
|
75877
77388
|
kind: "number",
|
|
@@ -75885,13 +77396,13 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75885
77396
|
],
|
|
75886
77397
|
state: [{
|
|
75887
77398
|
kind: "numeric",
|
|
75888
|
-
field: "
|
|
77399
|
+
field: "level",
|
|
75889
77400
|
quantity: t("the brightness", "la luminosità"),
|
|
75890
77401
|
label: t("Brightness", "Luminosità"),
|
|
75891
77402
|
unit: "%",
|
|
75892
77403
|
icon: "sun"
|
|
75893
77404
|
}],
|
|
75894
|
-
events: { onBrightnessChanged: { notOperatorFacing: "the `
|
|
77405
|
+
events: { onBrightnessChanged: { notOperatorFacing: "the `level` state trigger reads the same change" } }
|
|
75895
77406
|
},
|
|
75896
77407
|
color: {
|
|
75897
77408
|
scope: "device",
|
|
@@ -75905,7 +77416,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75905
77416
|
icon: "sun",
|
|
75906
77417
|
args: { color: {
|
|
75907
77418
|
mode: "mired",
|
|
75908
|
-
|
|
77419
|
+
colorTemperature: 370
|
|
75909
77420
|
} }
|
|
75910
77421
|
},
|
|
75911
77422
|
{
|
|
@@ -75916,7 +77427,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75916
77427
|
icon: "snowflake",
|
|
75917
77428
|
args: { color: {
|
|
75918
77429
|
mode: "mired",
|
|
75919
|
-
|
|
77430
|
+
colorTemperature: 200
|
|
75920
77431
|
} }
|
|
75921
77432
|
},
|
|
75922
77433
|
{
|
|
@@ -76530,7 +78041,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76530
78041
|
label: t("Fan off", "Ventilatore spento"),
|
|
76531
78042
|
phrase: t("Stop {device}", "Ferma {device}"),
|
|
76532
78043
|
icon: "power-off",
|
|
76533
|
-
args: {
|
|
78044
|
+
args: { speed: 0 }
|
|
76534
78045
|
},
|
|
76535
78046
|
{
|
|
76536
78047
|
id: "fan.full",
|
|
@@ -76538,16 +78049,16 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76538
78049
|
label: t("Fan full", "Ventilatore al massimo"),
|
|
76539
78050
|
phrase: t("Run {device} at full speed", "Porta {device} alla massima velocità"),
|
|
76540
78051
|
icon: "fan",
|
|
76541
|
-
args: {
|
|
78052
|
+
args: { speed: 100 }
|
|
76542
78053
|
},
|
|
76543
78054
|
{
|
|
76544
78055
|
id: "fan.speed",
|
|
76545
78056
|
method: "setPercentage",
|
|
76546
78057
|
label: t("Set speed", "Imposta la velocità"),
|
|
76547
|
-
phrase: t("Set the speed of {device} to {
|
|
78058
|
+
phrase: t("Set the speed of {device} to {speed}", "Imposta la velocità di {device} al {speed}"),
|
|
76548
78059
|
icon: "fan",
|
|
76549
78060
|
openArgs: [{
|
|
76550
|
-
key: "
|
|
78061
|
+
key: "speed",
|
|
76551
78062
|
label: t("Speed", "Velocità"),
|
|
76552
78063
|
offer: {
|
|
76553
78064
|
kind: "number",
|
|
@@ -76609,7 +78120,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76609
78120
|
],
|
|
76610
78121
|
state: [{
|
|
76611
78122
|
kind: "numeric",
|
|
76612
|
-
field: "
|
|
78123
|
+
field: "speed",
|
|
76613
78124
|
quantity: t("the speed", "la velocità"),
|
|
76614
78125
|
label: t("Speed", "Velocità"),
|
|
76615
78126
|
unit: "%",
|
|
@@ -76975,6 +78486,11 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76975
78486
|
icon: "circle-dot"
|
|
76976
78487
|
}]
|
|
76977
78488
|
},
|
|
78489
|
+
"ir-transmitter": {
|
|
78490
|
+
scope: "device",
|
|
78491
|
+
noun: t("IR / RF transmitter", "Trasmettitore IR / RF"),
|
|
78492
|
+
notOperatorFacing: { send: "a raw pulse train is not something an operator composes in an automation; the remote that owns the command table sends it" }
|
|
78493
|
+
},
|
|
76978
78494
|
control: {
|
|
76979
78495
|
scope: "device",
|
|
76980
78496
|
noun: t("Control", "Controllo"),
|
|
@@ -77407,7 +78923,7 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77407
78923
|
},
|
|
77408
78924
|
{
|
|
77409
78925
|
kind: "numeric",
|
|
77410
|
-
field: "
|
|
78926
|
+
field: "progress",
|
|
77411
78927
|
quantity: t("the cycle progress", "l’avanzamento del lavaggio"),
|
|
77412
78928
|
label: t("Progress", "Avanzamento"),
|
|
77413
78929
|
unit: "%",
|
|
@@ -77628,6 +79144,100 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77628
79144
|
}
|
|
77629
79145
|
]
|
|
77630
79146
|
},
|
|
79147
|
+
"pet-fountain": {
|
|
79148
|
+
scope: "device",
|
|
79149
|
+
noun: t("Pet fountain", "Fontana per animali"),
|
|
79150
|
+
actions: [
|
|
79151
|
+
{
|
|
79152
|
+
id: "petFountain.pumpOn",
|
|
79153
|
+
method: "setPump",
|
|
79154
|
+
label: t("Pump on", "Pompa accesa"),
|
|
79155
|
+
phrase: t("Start the pump of {device}", "Avvia la pompa di {device}"),
|
|
79156
|
+
icon: "play",
|
|
79157
|
+
args: { on: true }
|
|
79158
|
+
},
|
|
79159
|
+
{
|
|
79160
|
+
id: "petFountain.pumpOff",
|
|
79161
|
+
method: "setPump",
|
|
79162
|
+
label: t("Pump off", "Pompa spenta"),
|
|
79163
|
+
phrase: t("Stop the pump of {device}", "Ferma la pompa di {device}"),
|
|
79164
|
+
icon: "square",
|
|
79165
|
+
args: { on: false }
|
|
79166
|
+
},
|
|
79167
|
+
{
|
|
79168
|
+
id: "petFountain.intervalOn",
|
|
79169
|
+
method: "setPumpInterval",
|
|
79170
|
+
label: t("Pump cycle on", "Ciclo pompa attivo"),
|
|
79171
|
+
phrase: t("Run the pump of {device} on its on/off cycle", "Fai lavorare la pompa di {device} a ciclo acceso/spento"),
|
|
79172
|
+
icon: "timer",
|
|
79173
|
+
args: { on: true }
|
|
79174
|
+
},
|
|
79175
|
+
{
|
|
79176
|
+
id: "petFountain.intervalOff",
|
|
79177
|
+
method: "setPumpInterval",
|
|
79178
|
+
label: t("Pump cycle off", "Ciclo pompa spento"),
|
|
79179
|
+
phrase: t("Run the pump of {device} continuously", "Fai lavorare la pompa di {device} in continuo"),
|
|
79180
|
+
icon: "timer-off",
|
|
79181
|
+
args: { on: false }
|
|
79182
|
+
},
|
|
79183
|
+
{
|
|
79184
|
+
id: "petFountain.pumpOnMinutes",
|
|
79185
|
+
method: "setPumpOnMinutes",
|
|
79186
|
+
label: t("Set pump run time", "Imposta il tempo di lavoro della pompa"),
|
|
79187
|
+
phrase: t("Set the pump of {device} to run {minutes} minutes per cycle", "Imposta la pompa di {device} a lavorare {minutes} minuti per ciclo"),
|
|
79188
|
+
icon: "timer",
|
|
79189
|
+
openArgs: [{
|
|
79190
|
+
key: "minutes",
|
|
79191
|
+
label: t("Minutes", "Minuti"),
|
|
79192
|
+
offer: {
|
|
79193
|
+
kind: "number",
|
|
79194
|
+
min: 0,
|
|
79195
|
+
step: 1,
|
|
79196
|
+
unit: "min"
|
|
79197
|
+
}
|
|
79198
|
+
}]
|
|
79199
|
+
},
|
|
79200
|
+
{
|
|
79201
|
+
id: "petFountain.pumpOffMinutes",
|
|
79202
|
+
method: "setPumpOffMinutes",
|
|
79203
|
+
label: t("Set pump rest time", "Imposta il tempo di riposo della pompa"),
|
|
79204
|
+
phrase: t("Set the pump of {device} to rest {minutes} minutes per cycle", "Imposta la pompa di {device} a riposare {minutes} minuti per ciclo"),
|
|
79205
|
+
icon: "timer-off",
|
|
79206
|
+
openArgs: [{
|
|
79207
|
+
key: "minutes",
|
|
79208
|
+
label: t("Minutes", "Minuti"),
|
|
79209
|
+
offer: {
|
|
79210
|
+
kind: "number",
|
|
79211
|
+
min: 0,
|
|
79212
|
+
step: 1,
|
|
79213
|
+
unit: "min"
|
|
79214
|
+
}
|
|
79215
|
+
}]
|
|
79216
|
+
},
|
|
79217
|
+
{
|
|
79218
|
+
id: "petFountain.resetDailyConsumption",
|
|
79219
|
+
method: "resetDailyConsumption",
|
|
79220
|
+
label: t("Clear daily consumption", "Azzera il consumo giornaliero"),
|
|
79221
|
+
phrase: t("Clear the daily water consumption of {device}", "Azzera il consumo giornaliero di acqua di {device}"),
|
|
79222
|
+
icon: "rotate-ccw"
|
|
79223
|
+
}
|
|
79224
|
+
],
|
|
79225
|
+
state: [{
|
|
79226
|
+
kind: "boolean",
|
|
79227
|
+
field: "empty",
|
|
79228
|
+
label: t("Tank empty", "Serbatoio vuoto"),
|
|
79229
|
+
whenTrue: t("When the tank of {device} is empty", "Quando il serbatoio di {device} è vuoto"),
|
|
79230
|
+
whenFalse: t("When the tank of {device} is refilled", "Quando il serbatoio di {device} viene riempito"),
|
|
79231
|
+
icon: "droplet"
|
|
79232
|
+
}, {
|
|
79233
|
+
kind: "numeric",
|
|
79234
|
+
field: "waterLevel",
|
|
79235
|
+
quantity: t("the water level", "il livello dell’acqua"),
|
|
79236
|
+
label: t("Water level", "Livello dell’acqua"),
|
|
79237
|
+
unit: "%",
|
|
79238
|
+
icon: "droplets"
|
|
79239
|
+
}]
|
|
79240
|
+
},
|
|
77631
79241
|
"media-player": {
|
|
77632
79242
|
scope: "device",
|
|
77633
79243
|
noun: t("Media player", "Lettore multimediale"),
|
|
@@ -77765,10 +79375,10 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77765
79375
|
id: "media.seek",
|
|
77766
79376
|
method: "seek",
|
|
77767
79377
|
label: t("Seek", "Vai al punto"),
|
|
77768
|
-
phrase: t("Move {device} to {
|
|
79378
|
+
phrase: t("Move {device} to {position}", "Porta {device} al punto {position}"),
|
|
77769
79379
|
icon: "fast-forward",
|
|
77770
79380
|
openArgs: [{
|
|
77771
|
-
key: "
|
|
79381
|
+
key: "position",
|
|
77772
79382
|
label: t("Position", "Posizione"),
|
|
77773
79383
|
offer: {
|
|
77774
79384
|
kind: "number",
|
|
@@ -78817,7 +80427,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78817
80427
|
state: [
|
|
78818
80428
|
{
|
|
78819
80429
|
kind: "numeric",
|
|
78820
|
-
field: "
|
|
80430
|
+
field: "co2",
|
|
78821
80431
|
quantity: t("the CO₂", "la CO₂"),
|
|
78822
80432
|
label: t("CO₂", "CO₂"),
|
|
78823
80433
|
unit: "ppm",
|
|
@@ -78825,7 +80435,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78825
80435
|
},
|
|
78826
80436
|
{
|
|
78827
80437
|
kind: "numeric",
|
|
78828
|
-
field: "
|
|
80438
|
+
field: "voc",
|
|
78829
80439
|
quantity: t("the VOC level", "il livello di COV"),
|
|
78830
80440
|
label: t("VOC", "COV"),
|
|
78831
80441
|
unit: "ppb",
|
|
@@ -78861,7 +80471,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78861
80471
|
noun: t("Light level", "Luminosità ambiente"),
|
|
78862
80472
|
state: [{
|
|
78863
80473
|
kind: "numeric",
|
|
78864
|
-
field: "
|
|
80474
|
+
field: "illuminance",
|
|
78865
80475
|
quantity: t("the light level", "la luminosità"),
|
|
78866
80476
|
label: t("Illuminance", "Illuminamento"),
|
|
78867
80477
|
unit: "lx",
|
|
@@ -79064,7 +80674,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79064
80674
|
noun: t("Humidity", "Umidità"),
|
|
79065
80675
|
state: [{
|
|
79066
80676
|
kind: "numeric",
|
|
79067
|
-
field: "
|
|
80677
|
+
field: "humidity",
|
|
79068
80678
|
quantity: t("the humidity", "l’umidità"),
|
|
79069
80679
|
label: t("Humidity", "Umidità"),
|
|
79070
80680
|
unit: "%",
|
|
@@ -79112,7 +80722,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79112
80722
|
state: [
|
|
79113
80723
|
{
|
|
79114
80724
|
kind: "numeric",
|
|
79115
|
-
field: "
|
|
80725
|
+
field: "power",
|
|
79116
80726
|
quantity: t("the power draw", "il consumo"),
|
|
79117
80727
|
label: t("Power", "Potenza"),
|
|
79118
80728
|
unit: "W",
|
|
@@ -79120,7 +80730,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79120
80730
|
},
|
|
79121
80731
|
{
|
|
79122
80732
|
kind: "numeric",
|
|
79123
|
-
field: "
|
|
80733
|
+
field: "energy",
|
|
79124
80734
|
quantity: t("the energy used", "l’energia consumata"),
|
|
79125
80735
|
label: t("Energy", "Energia"),
|
|
79126
80736
|
unit: "kWh",
|
|
@@ -79128,7 +80738,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79128
80738
|
},
|
|
79129
80739
|
{
|
|
79130
80740
|
kind: "numeric",
|
|
79131
|
-
field: "
|
|
80741
|
+
field: "voltage",
|
|
79132
80742
|
quantity: t("the voltage", "la tensione"),
|
|
79133
80743
|
label: t("Voltage", "Tensione"),
|
|
79134
80744
|
unit: "V",
|
|
@@ -79136,7 +80746,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79136
80746
|
},
|
|
79137
80747
|
{
|
|
79138
80748
|
kind: "numeric",
|
|
79139
|
-
field: "
|
|
80749
|
+
field: "current",
|
|
79140
80750
|
quantity: t("the current", "la corrente"),
|
|
79141
80751
|
label: t("Current", "Corrente"),
|
|
79142
80752
|
unit: "A",
|
|
@@ -79153,13 +80763,6 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79153
80763
|
label: t("Where", "Posizione"),
|
|
79154
80764
|
phrase: t("When {device} is at {value}", "Quando {device} è in {value}"),
|
|
79155
80765
|
icon: "map-pin"
|
|
79156
|
-
}, {
|
|
79157
|
-
kind: "numeric",
|
|
79158
|
-
field: "batteryPercent",
|
|
79159
|
-
quantity: t("the phone battery", "la batteria del telefono"),
|
|
79160
|
-
label: t("Battery", "Batteria"),
|
|
79161
|
-
unit: "%",
|
|
79162
|
-
icon: "battery"
|
|
79163
80766
|
}]
|
|
79164
80767
|
},
|
|
79165
80768
|
"pressure-sensor": {
|
|
@@ -79167,7 +80770,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79167
80770
|
noun: t("Pressure", "Pressione"),
|
|
79168
80771
|
state: [{
|
|
79169
80772
|
kind: "numeric",
|
|
79170
|
-
field: "
|
|
80773
|
+
field: "pressure",
|
|
79171
80774
|
quantity: t("the pressure", "la pressione"),
|
|
79172
80775
|
label: t("Pressure", "Pressione"),
|
|
79173
80776
|
unit: "hPa",
|
|
@@ -79203,7 +80806,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79203
80806
|
noun: t("Temperature", "Temperatura"),
|
|
79204
80807
|
state: [{
|
|
79205
80808
|
kind: "numeric",
|
|
79206
|
-
field: "
|
|
80809
|
+
field: "temperature",
|
|
79207
80810
|
quantity: t("the temperature", "la temperatura"),
|
|
79208
80811
|
label: t("Temperature", "Temperatura"),
|
|
79209
80812
|
unit: "°C",
|
|
@@ -79274,7 +80877,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79274
80877
|
state: [
|
|
79275
80878
|
{
|
|
79276
80879
|
kind: "numeric",
|
|
79277
|
-
field: "
|
|
80880
|
+
field: "level",
|
|
79278
80881
|
quantity: t("the battery level", "il livello della batteria"),
|
|
79279
80882
|
label: t("Battery", "Batteria"),
|
|
79280
80883
|
unit: "%",
|
|
@@ -79316,7 +80919,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79316
80919
|
icon: "battery-charging"
|
|
79317
80920
|
}
|
|
79318
80921
|
],
|
|
79319
|
-
events: { onStatusChanged: { notOperatorFacing: "the
|
|
80922
|
+
events: { onStatusChanged: { notOperatorFacing: "the level / sleeping / charging state triggers each read one field of this change" } },
|
|
79320
80923
|
extraEvents: [{
|
|
79321
80924
|
category: EventCategory.DeviceAwake,
|
|
79322
80925
|
label: t("Woke up", "Risvegliato"),
|
|
@@ -79334,7 +80937,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79334
80937
|
noun: t("Network link", "Collegamento di rete"),
|
|
79335
80938
|
state: [{
|
|
79336
80939
|
kind: "numeric",
|
|
79337
|
-
field: "
|
|
80940
|
+
field: "signal",
|
|
79338
80941
|
quantity: t("the signal strength", "l’intensità del segnale"),
|
|
79339
80942
|
label: t("Signal", "Segnale"),
|
|
79340
80943
|
unit: "%",
|
|
@@ -79427,6 +81030,8 @@ var ML = "model and training machinery — no device action";
|
|
|
79427
81030
|
var INTERNAL = "internal plumbing between addons — never operator-facing";
|
|
79428
81031
|
/** Every system-scoped cap, with why it is not a device's vocabulary. */
|
|
79429
81032
|
var SYSTEM_CAP_VOCABULARY = {
|
|
81033
|
+
"action-source": system(INTERNAL),
|
|
81034
|
+
actions: system("declared actions — run from the Actions page and from the cameras that link them"),
|
|
79430
81035
|
"addon-pages": system(UI_PLUMBING),
|
|
79431
81036
|
"addon-pages-source": system(UI_PLUMBING),
|
|
79432
81037
|
"addon-routes": system(UI_PLUMBING),
|
|
@@ -79457,6 +81062,7 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
79457
81062
|
"device-manager": system("the device registry itself — rename, move and remove are administration"),
|
|
79458
81063
|
"device-provider": system(INTERNAL),
|
|
79459
81064
|
"device-removal-hook": system(INTERNAL),
|
|
81065
|
+
"node-removal-hook": system(INTERNAL),
|
|
79460
81066
|
"device-state": system("the runtime-state mirror every trigger already reads through"),
|
|
79461
81067
|
"display-palette": system("the cluster display palette — one colour table for every client, not a device action"),
|
|
79462
81068
|
"embedding-encoder": system(ML),
|
|
@@ -79496,6 +81102,7 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
79496
81102
|
"recording-archive": system(STORAGE),
|
|
79497
81103
|
"recording-export": system("recording exports — requested from the timeline, not an automation step"),
|
|
79498
81104
|
records: system(INTERNAL),
|
|
81105
|
+
remote: system("the per-device remote setup — authored in the Customize remote editor, sent through the remote UI"),
|
|
79499
81106
|
"server-management": system(CLUSTER),
|
|
79500
81107
|
"settings-store": system(INTERNAL),
|
|
79501
81108
|
"smtp-provider": system(INTERNAL),
|
|
@@ -79508,6 +81115,7 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
79508
81115
|
"storage-provider": system(STORAGE),
|
|
79509
81116
|
"stream-broker": system(PIPELINE),
|
|
79510
81117
|
system: system(CLUSTER),
|
|
81118
|
+
template: system("operator-authored templates — edited in their own editor, never actuated"),
|
|
79511
81119
|
"terminal-session": system(CLUSTER),
|
|
79512
81120
|
toast: system(UI_PLUMBING),
|
|
79513
81121
|
training: system(ML),
|
|
@@ -79567,7 +81175,7 @@ function projectAction(cap, action) {
|
|
|
79567
81175
|
};
|
|
79568
81176
|
}
|
|
79569
81177
|
Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
|
|
79570
|
-
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer;
|
|
81178
|
+
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer;
|
|
79571
81179
|
DeviceFeature.BatteryOperated;
|
|
79572
81180
|
/**
|
|
79573
81181
|
* How a washer, dryer or dishwasher leaves CamStack.
|
|
@@ -79648,6 +81256,31 @@ Object.freeze({
|
|
|
79648
81256
|
form: "single",
|
|
79649
81257
|
optional: false
|
|
79650
81258
|
}],
|
|
81259
|
+
"actions.get": [{
|
|
81260
|
+
name: "deviceId",
|
|
81261
|
+
form: "single",
|
|
81262
|
+
optional: true
|
|
81263
|
+
}],
|
|
81264
|
+
"actions.getLinks": [{
|
|
81265
|
+
name: "deviceId",
|
|
81266
|
+
form: "single",
|
|
81267
|
+
optional: false
|
|
81268
|
+
}],
|
|
81269
|
+
"actions.listForCamera": [{
|
|
81270
|
+
name: "deviceId",
|
|
81271
|
+
form: "single",
|
|
81272
|
+
optional: false
|
|
81273
|
+
}],
|
|
81274
|
+
"actions.run": [{
|
|
81275
|
+
name: "deviceId",
|
|
81276
|
+
form: "single",
|
|
81277
|
+
optional: true
|
|
81278
|
+
}],
|
|
81279
|
+
"actions.setLinks": [{
|
|
81280
|
+
name: "deviceId",
|
|
81281
|
+
form: "single",
|
|
81282
|
+
optional: false
|
|
81283
|
+
}],
|
|
79651
81284
|
"addonSettings.getDeviceSettings": [{
|
|
79652
81285
|
name: "deviceId",
|
|
79653
81286
|
form: "single",
|
|
@@ -80699,6 +82332,16 @@ Object.freeze({
|
|
|
80699
82332
|
form: "single",
|
|
80700
82333
|
optional: false
|
|
80701
82334
|
}],
|
|
82335
|
+
"irTransmitter.getInfo": [{
|
|
82336
|
+
name: "deviceId",
|
|
82337
|
+
form: "single",
|
|
82338
|
+
optional: false
|
|
82339
|
+
}],
|
|
82340
|
+
"irTransmitter.send": [{
|
|
82341
|
+
name: "deviceId",
|
|
82342
|
+
form: "single",
|
|
82343
|
+
optional: false
|
|
82344
|
+
}],
|
|
80702
82345
|
"keychain.deleteDeviceScope": [{
|
|
80703
82346
|
name: "deviceId",
|
|
80704
82347
|
form: "single",
|
|
@@ -81108,6 +82751,36 @@ Object.freeze({
|
|
|
81108
82751
|
form: "single",
|
|
81109
82752
|
optional: false
|
|
81110
82753
|
}],
|
|
82754
|
+
"petFountain.getStatus": [{
|
|
82755
|
+
name: "deviceId",
|
|
82756
|
+
form: "single",
|
|
82757
|
+
optional: false
|
|
82758
|
+
}],
|
|
82759
|
+
"petFountain.resetDailyConsumption": [{
|
|
82760
|
+
name: "deviceId",
|
|
82761
|
+
form: "single",
|
|
82762
|
+
optional: false
|
|
82763
|
+
}],
|
|
82764
|
+
"petFountain.setPump": [{
|
|
82765
|
+
name: "deviceId",
|
|
82766
|
+
form: "single",
|
|
82767
|
+
optional: false
|
|
82768
|
+
}],
|
|
82769
|
+
"petFountain.setPumpInterval": [{
|
|
82770
|
+
name: "deviceId",
|
|
82771
|
+
form: "single",
|
|
82772
|
+
optional: false
|
|
82773
|
+
}],
|
|
82774
|
+
"petFountain.setPumpOffMinutes": [{
|
|
82775
|
+
name: "deviceId",
|
|
82776
|
+
form: "single",
|
|
82777
|
+
optional: false
|
|
82778
|
+
}],
|
|
82779
|
+
"petFountain.setPumpOnMinutes": [{
|
|
82780
|
+
name: "deviceId",
|
|
82781
|
+
form: "single",
|
|
82782
|
+
optional: false
|
|
82783
|
+
}],
|
|
81111
82784
|
"pipelineAnalytics.addRetrainFrameFromRecording": [{
|
|
81112
82785
|
name: "deviceId",
|
|
81113
82786
|
form: "single",
|
|
@@ -81924,6 +83597,31 @@ Object.freeze({
|
|
|
81924
83597
|
form: "single",
|
|
81925
83598
|
optional: true
|
|
81926
83599
|
}],
|
|
83600
|
+
"remote.getConfig": [{
|
|
83601
|
+
name: "deviceId",
|
|
83602
|
+
form: "single",
|
|
83603
|
+
optional: false
|
|
83604
|
+
}],
|
|
83605
|
+
"remote.listCommands": [{
|
|
83606
|
+
name: "deviceId",
|
|
83607
|
+
form: "single",
|
|
83608
|
+
optional: false
|
|
83609
|
+
}],
|
|
83610
|
+
"remote.sendCommand": [{
|
|
83611
|
+
name: "deviceId",
|
|
83612
|
+
form: "single",
|
|
83613
|
+
optional: false
|
|
83614
|
+
}],
|
|
83615
|
+
"remote.sendMediaCommand": [{
|
|
83616
|
+
name: "deviceId",
|
|
83617
|
+
form: "single",
|
|
83618
|
+
optional: false
|
|
83619
|
+
}],
|
|
83620
|
+
"remote.setConfig": [{
|
|
83621
|
+
name: "deviceId",
|
|
83622
|
+
form: "single",
|
|
83623
|
+
optional: false
|
|
83624
|
+
}],
|
|
81927
83625
|
"runningState.getStatus": [{
|
|
81928
83626
|
name: "deviceId",
|
|
81929
83627
|
form: "single",
|
|
@@ -83729,8 +85427,17 @@ DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
|
83729
85427
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
83730
85428
|
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
83731
85429
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
85430
|
+
String.raw`(?<=^|["'(\s>,\[{])`;
|
|
83732
85431
|
var MB = 1024 * 1024;
|
|
83733
85432
|
1024 * MB, 3072 * MB;
|
|
85433
|
+
object({
|
|
85434
|
+
manufacturer: string().optional(),
|
|
85435
|
+
supportedModels: array(string()).optional(),
|
|
85436
|
+
supportedController: string().optional(),
|
|
85437
|
+
commandsEncoding: string(),
|
|
85438
|
+
delay: number().nonnegative().optional(),
|
|
85439
|
+
commands: record(string(), unknown())
|
|
85440
|
+
});
|
|
83734
85441
|
//#endregion
|
|
83735
85442
|
//#region src/custom-actions.ts
|
|
83736
85443
|
/**
|
|
@@ -83879,7 +85586,7 @@ var TRAIT_CATALOG = [
|
|
|
83879
85586
|
attributes: () => ({}),
|
|
83880
85587
|
projectState: (rawStatus) => {
|
|
83881
85588
|
const parsed = BrightnessStatusSchema.safeParse(rawStatus);
|
|
83882
|
-
return parsed.success ? { brightness: Math.round(parsed.data.
|
|
85589
|
+
return parsed.success ? { brightness: Math.round(parsed.data.level) } : null;
|
|
83883
85590
|
},
|
|
83884
85591
|
commands: ["action.devices.commands.BrightnessAbsolute"],
|
|
83885
85592
|
resolveCommand: ({ deviceId, command, params }) => {
|