@camstack/addon-pipeline-orchestrator 1.2.652 → 1.2.653
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 +6 -0
- package/dist/_stub.js +2 -2
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-q2t8c5ET.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-BdEFq3l-.mjs} +2 -2
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-6yRekrOB.mjs +26 -0
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DkCl47Ia.mjs +26 -0
- package/dist/{hostInit-Baq4gDP-.mjs → hostInit-Cn4SKLEL.mjs} +2 -2
- package/dist/index.js +646 -236
- package/dist/index.mjs +646 -236
- package/dist/remoteEntry.js +1 -1
- package/package.json +2 -2
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BvJHURwq.mjs +0 -26
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DV6boE4B.mjs +0 -26
package/dist/index.mjs
CHANGED
|
@@ -788,7 +788,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
788
788
|
return EventCategory;
|
|
789
789
|
}({});
|
|
790
790
|
//#endregion
|
|
791
|
-
//#region ../types/dist/device-type-
|
|
791
|
+
//#region ../types/dist/device-type-CfHw_quR.mjs
|
|
792
792
|
/**
|
|
793
793
|
import { errMsg } from '@camstack/types'
|
|
794
794
|
* Extract a human-readable message from an unknown error value.
|
|
@@ -977,6 +977,9 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
977
977
|
DeviceFeature["CoverPositionable"] = "cover-positionable";
|
|
978
978
|
/** Cover exposes slat-tilt control. Gates the tilt slider UI. */
|
|
979
979
|
DeviceFeature["CoverTilt"] = "cover-tilt";
|
|
980
|
+
/** Cover has a real stop: `stop` halts the travel in place. Gates the stop
|
|
981
|
+
* control in exporters; a provider whose `stop` is a no-op never declares it. */
|
|
982
|
+
DeviceFeature["CoverStoppable"] = "cover-stoppable";
|
|
980
983
|
/** Valve exposes intermediate position control (0..100). Gates the
|
|
981
984
|
* position slider / drag surface UI. */
|
|
982
985
|
DeviceFeature["ValvePositionable"] = "valve-positionable";
|
|
@@ -5975,7 +5978,7 @@ var ZodIssueCode = {
|
|
|
5975
5978
|
var ZodFirstPartyTypeKind;
|
|
5976
5979
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5977
5980
|
//#endregion
|
|
5978
|
-
//#region ../types/dist/sleep-
|
|
5981
|
+
//#region ../types/dist/sleep-hmSP-eJt.mjs
|
|
5979
5982
|
/**
|
|
5980
5983
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5981
5984
|
* window to float samples (D455).
|
|
@@ -6092,7 +6095,7 @@ function isKeychainStoredField(field) {
|
|
|
6092
6095
|
var SECRET_CLEAR = { $secretClear: true };
|
|
6093
6096
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
6094
6097
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
6095
|
-
function isRecord$
|
|
6098
|
+
function isRecord$7(value) {
|
|
6096
6099
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6097
6100
|
}
|
|
6098
6101
|
function makeSecretMarker(ref) {
|
|
@@ -6103,12 +6106,12 @@ function makeSecretMarker(ref) {
|
|
|
6103
6106
|
}
|
|
6104
6107
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
6105
6108
|
function isSecretMarker(value) {
|
|
6106
|
-
if (!isRecord$
|
|
6109
|
+
if (!isRecord$7(value)) return false;
|
|
6107
6110
|
const ref = value["$secret"];
|
|
6108
6111
|
return typeof ref === "string" && ref.length > 0;
|
|
6109
6112
|
}
|
|
6110
6113
|
function isSecretClear(value) {
|
|
6111
|
-
return isRecord$
|
|
6114
|
+
return isRecord$7(value) && value["$secretClear"] === true;
|
|
6112
6115
|
}
|
|
6113
6116
|
/**
|
|
6114
6117
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6830,7 +6833,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6830
6833
|
}
|
|
6831
6834
|
};
|
|
6832
6835
|
var KEEP = { kind: "keep" };
|
|
6833
|
-
function isRecord$
|
|
6836
|
+
function isRecord$6(value) {
|
|
6834
6837
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6835
6838
|
}
|
|
6836
6839
|
function defaultMintId() {
|
|
@@ -6843,7 +6846,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6843
6846
|
return out;
|
|
6844
6847
|
}
|
|
6845
6848
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6846
|
-
else if (isRecord$
|
|
6849
|
+
else if (isRecord$6(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6847
6850
|
return out;
|
|
6848
6851
|
}
|
|
6849
6852
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6898,7 +6901,7 @@ function rowId(row, idKey) {
|
|
|
6898
6901
|
return null;
|
|
6899
6902
|
}
|
|
6900
6903
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6901
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6904
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$6) : [];
|
|
6902
6905
|
if (!Array.isArray(incoming)) {
|
|
6903
6906
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6904
6907
|
return {
|
|
@@ -6914,7 +6917,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6914
6917
|
const kept = /* @__PURE__ */ new Set();
|
|
6915
6918
|
const rows = [];
|
|
6916
6919
|
for (const row of incoming) {
|
|
6917
|
-
if (!isRecord$
|
|
6920
|
+
if (!isRecord$6(row)) {
|
|
6918
6921
|
rows.push(row);
|
|
6919
6922
|
continue;
|
|
6920
6923
|
}
|
|
@@ -6939,7 +6942,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6939
6942
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6940
6943
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6941
6944
|
case "object": {
|
|
6942
|
-
if (!isRecord$
|
|
6945
|
+
if (!isRecord$6(incoming)) {
|
|
6943
6946
|
if (incoming === void 0) return KEEP;
|
|
6944
6947
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6945
6948
|
return {
|
|
@@ -6947,7 +6950,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6947
6950
|
value: incoming
|
|
6948
6951
|
};
|
|
6949
6952
|
}
|
|
6950
|
-
const storedObj = isRecord$
|
|
6953
|
+
const storedObj = isRecord$6(stored) ? stored : {};
|
|
6951
6954
|
return {
|
|
6952
6955
|
kind: "value",
|
|
6953
6956
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -7070,7 +7073,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
7070
7073
|
value: items
|
|
7071
7074
|
};
|
|
7072
7075
|
}
|
|
7073
|
-
if (isRecord$
|
|
7076
|
+
if (isRecord$6(v)) {
|
|
7074
7077
|
const out = {};
|
|
7075
7078
|
for (const [k, child] of Object.entries(v)) {
|
|
7076
7079
|
const s = substitute(child);
|
|
@@ -7102,7 +7105,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
7102
7105
|
this.name = "SecretOverwriteRefusedError";
|
|
7103
7106
|
}
|
|
7104
7107
|
};
|
|
7105
|
-
function isRecord$
|
|
7108
|
+
function isRecord$5(value) {
|
|
7106
7109
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7107
7110
|
}
|
|
7108
7111
|
function resolvedValue(pass, marker) {
|
|
@@ -7131,7 +7134,7 @@ function inArray(pass, incoming, stored) {
|
|
|
7131
7134
|
return incoming.map((item, index) => {
|
|
7132
7135
|
const twin = stored[index];
|
|
7133
7136
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
7134
|
-
if (isRecord$
|
|
7137
|
+
if (isRecord$5(item) && isRecord$5(twin)) return inArrayRow(pass, item, twin);
|
|
7135
7138
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
7136
7139
|
return item;
|
|
7137
7140
|
});
|
|
@@ -7142,7 +7145,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
7142
7145
|
const twin = stored[key];
|
|
7143
7146
|
if (isSecretMarker(twin)) {
|
|
7144
7147
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
7145
|
-
} else if (isRecord$
|
|
7148
|
+
} else if (isRecord$5(value) && isRecord$5(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
7146
7149
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
7147
7150
|
}
|
|
7148
7151
|
return out;
|
|
@@ -7150,7 +7153,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
7150
7153
|
async function walk(pass, incoming, stored) {
|
|
7151
7154
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
7152
7155
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
7153
|
-
if (!isRecord$
|
|
7156
|
+
if (!isRecord$5(incoming) || !isRecord$5(stored)) return incoming;
|
|
7154
7157
|
const out = { ...incoming };
|
|
7155
7158
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
7156
7159
|
return out;
|
|
@@ -7181,7 +7184,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
7181
7184
|
function isJsonEqual(a, b) {
|
|
7182
7185
|
if (Object.is(a, b)) return true;
|
|
7183
7186
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
7184
|
-
if (isRecord$
|
|
7187
|
+
if (isRecord$5(a) && isRecord$5(b)) {
|
|
7185
7188
|
const keys = Object.keys(a);
|
|
7186
7189
|
if (keys.length !== Object.keys(b).length) return false;
|
|
7187
7190
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -7205,7 +7208,7 @@ function markerKeysOf(blob, owner) {
|
|
|
7205
7208
|
}
|
|
7206
7209
|
function nodeFromStored(value, owner) {
|
|
7207
7210
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
7208
|
-
if (!isRecord$
|
|
7211
|
+
if (!isRecord$5(value)) return null;
|
|
7209
7212
|
const children = /* @__PURE__ */ new Map();
|
|
7210
7213
|
for (const [key, child] of Object.entries(value)) {
|
|
7211
7214
|
const node = nodeFromStored(child, owner);
|
|
@@ -7824,6 +7827,44 @@ var BaseAddon = class {
|
|
|
7824
7827
|
return null;
|
|
7825
7828
|
}
|
|
7826
7829
|
/**
|
|
7830
|
+
* D986 scoped settings: the form shape of the CLUSTER-wide settings one capability this addon
|
|
7831
|
+
* provides owns, or `null` when it has none. `cap` is a capability name the addon's manifest
|
|
7832
|
+
* declares. Stored as `addon-settings` rows `<addonId>.<field>`. The keys of this schema, of
|
|
7833
|
+
* {@link nodeSettingsSchema} and of {@link deviceDefaultsSchema} are disjoint, and a key never
|
|
7834
|
+
* contains `@` (guard `check-scoped-settings-declared`). SHAPE only: values are read by scope.
|
|
7835
|
+
*/
|
|
7836
|
+
async clusterSettingsSchema(_cap) {
|
|
7837
|
+
return null;
|
|
7838
|
+
}
|
|
7839
|
+
/**
|
|
7840
|
+
* D986: the form shape of the settings one capability owns PER NODE, or `null`. Stored as
|
|
7841
|
+
* `addon-settings` rows `<addonId>.<field>@<nodeId>` carrying `nodeId` in the row data, so a
|
|
7842
|
+
* forgotten node's rows go in one central delete.
|
|
7843
|
+
*/
|
|
7844
|
+
async nodeSettingsSchema(_cap) {
|
|
7845
|
+
return null;
|
|
7846
|
+
}
|
|
7847
|
+
/**
|
|
7848
|
+
* D986: the form shape of the FLEET DEFAULTS of the per-device settings one capability owns,
|
|
7849
|
+
* or `null`. Stored as `addon-settings` rows `<addonId>.<field>`; a device resolves its value
|
|
7850
|
+
* as device row, then this default, then the schema default (`resolveDeviceSettings`).
|
|
7851
|
+
*/
|
|
7852
|
+
async deviceDefaultsSchema(_cap) {
|
|
7853
|
+
return null;
|
|
7854
|
+
}
|
|
7855
|
+
/**
|
|
7856
|
+
* The host's read of the scoped declarations: the schema one capability declares for `scope`,
|
|
7857
|
+
* or `null`. Beside {@link getIntegrationFormSchema}, the same shape: the hook is protected, the
|
|
7858
|
+
* host asks this method.
|
|
7859
|
+
*/
|
|
7860
|
+
async getScopedSettingsSchema(scope, cap) {
|
|
7861
|
+
switch (scope) {
|
|
7862
|
+
case "cluster": return this.clusterSettingsSchema(cap);
|
|
7863
|
+
case "node": return this.nodeSettingsSchema(cap);
|
|
7864
|
+
case "device-defaults": return this.deviceDefaultsSchema(cap);
|
|
7865
|
+
}
|
|
7866
|
+
}
|
|
7867
|
+
/**
|
|
7827
7868
|
* What the create wizard and the integration edit page render for one instance: the addon's
|
|
7828
7869
|
* per-instance schema when it declares one, else its global schema (what they always showed).
|
|
7829
7870
|
*/
|
|
@@ -8617,47 +8658,6 @@ function normalizeAddonInitResult(result) {
|
|
|
8617
8658
|
if (Array.isArray(result)) return { providers: result };
|
|
8618
8659
|
return result;
|
|
8619
8660
|
}
|
|
8620
|
-
/**
|
|
8621
|
-
* The share-view scope kinds a share-link token can carry. The hub mints
|
|
8622
|
-
* and validates them (`ShareViewGrantSchema` builds its
|
|
8623
|
-
* enum from this list); a data plane names the kinds it ACCEPTS in `share`.
|
|
8624
|
-
*/
|
|
8625
|
-
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
8626
|
-
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
8627
|
-
var PeerBytesTicketSchema = object({
|
|
8628
|
-
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
8629
|
-
url: string().min(1),
|
|
8630
|
-
/**
|
|
8631
|
-
* The HOST node this URL means something on — the hub or a named agent,
|
|
8632
|
-
* never a runner. {@link AddonPeerBytes.open} compares it to its own and
|
|
8633
|
-
* refuses `cross-node` by name when they differ, without dialling.
|
|
8634
|
-
*/
|
|
8635
|
-
hostNodeId: string().min(1),
|
|
8636
|
-
expiresAtMs: number().int().nonnegative(),
|
|
8637
|
-
/**
|
|
8638
|
-
* What the producer DECLARED the body to be, when it knows — `null` when it
|
|
8639
|
-
* does not. Never `0` for unknown (D393): a consumer sizing a bound off this
|
|
8640
|
-
* must be able to tell "the producer did not say" from "the body is empty".
|
|
8641
|
-
*/
|
|
8642
|
-
declaredBytes: number().int().nonnegative().nullable()
|
|
8643
|
-
});
|
|
8644
|
-
/** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
|
|
8645
|
-
/** The files a kind may live in. `history` is device-history's (D850), never records. */
|
|
8646
|
-
var RECORD_DATABASES = ["settings", "events"];
|
|
8647
|
-
/** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
|
|
8648
|
-
var RECORD_CLASSES = [
|
|
8649
|
-
"config",
|
|
8650
|
-
"ledger",
|
|
8651
|
-
"audit",
|
|
8652
|
-
"mirror",
|
|
8653
|
-
"ephemeral"
|
|
8654
|
-
];
|
|
8655
|
-
var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
|
|
8656
|
-
var RECORD_MAX_DATA_BYTES = 1024 * 1024;
|
|
8657
|
-
var RECORD_BATCH_MAX = 1e3;
|
|
8658
|
-
var RECORD_QUERY_MAX = 1e3;
|
|
8659
|
-
/** A kind in the `settings` file may not bound itself above this (D447: high volume is `events`). */
|
|
8660
|
-
var RECORD_SETTINGS_MAX_ROWS = 5e4;
|
|
8661
8661
|
var PREFIX = "records/";
|
|
8662
8662
|
/** The base of every records failure. `detail` is the human part of the message. */
|
|
8663
8663
|
var RecordsError = class extends Error {
|
|
@@ -8683,6 +8683,83 @@ var DeclarationRefusedError = class extends RecordsError {
|
|
|
8683
8683
|
this.name = "DeclarationRefusedError";
|
|
8684
8684
|
}
|
|
8685
8685
|
};
|
|
8686
|
+
/** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
|
|
8687
|
+
/** The files a kind may live in. `history` is device-history's (D850), never records. */
|
|
8688
|
+
var RECORD_DATABASES = ["settings", "events"];
|
|
8689
|
+
/** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
|
|
8690
|
+
var RECORD_CLASSES = [
|
|
8691
|
+
"config",
|
|
8692
|
+
"ledger",
|
|
8693
|
+
"audit",
|
|
8694
|
+
"mirror",
|
|
8695
|
+
"ephemeral"
|
|
8696
|
+
];
|
|
8697
|
+
var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
|
|
8698
|
+
var RECORD_MAX_DATA_BYTES = 1024 * 1024;
|
|
8699
|
+
var RECORD_BATCH_MAX = 1e3;
|
|
8700
|
+
var RECORD_QUERY_MAX = 1e3;
|
|
8701
|
+
/** A kind in the `settings` file may not bound itself above this (D447: high volume is `events`). */
|
|
8702
|
+
var RECORD_SETTINGS_MAX_ROWS = 5e4;
|
|
8703
|
+
/**
|
|
8704
|
+
* Secret fields of a record, addressed the way a Zod schema declares them
|
|
8705
|
+
* (`collectZodSecretPaths`): dotted keys, `[]` for "each element of this array"
|
|
8706
|
+
* (`auth.accessToken`, `headers[].value`).
|
|
8707
|
+
*
|
|
8708
|
+
* Array elements are matched by a DECLARED id key (`secretArrayKeys`:
|
|
8709
|
+
* `{ headers: 'name' }`), never by index, so reordering a list keeps every
|
|
8710
|
+
* keychain ref (the same rule as `arrayItemFieldPath`). The concrete path of a
|
|
8711
|
+
* leaf names its element: `headers[X-Api].value`.
|
|
8712
|
+
*
|
|
8713
|
+
* Pure and browser-safe. Nothing here mutates: every transform returns a new value.
|
|
8714
|
+
*/
|
|
8715
|
+
/** The array prefixes (declared form, e.g. `headers` or `a.headers`) of a path. */
|
|
8716
|
+
function parseSecretPath(path) {
|
|
8717
|
+
if (path.length === 0) throw new InvalidRecordError("an empty secret path");
|
|
8718
|
+
return path.split(".").map((raw) => {
|
|
8719
|
+
const each = raw.endsWith("[]");
|
|
8720
|
+
const key = each ? raw.slice(0, -2) : raw;
|
|
8721
|
+
if (key.length === 0) throw new InvalidRecordError(`secret path "${path}" has an empty segment`);
|
|
8722
|
+
return {
|
|
8723
|
+
key,
|
|
8724
|
+
each
|
|
8725
|
+
};
|
|
8726
|
+
});
|
|
8727
|
+
}
|
|
8728
|
+
/** The declared array prefixes of `path` that need an id key (`headers`, `a.rows`). */
|
|
8729
|
+
function secretArrayPrefixes(path) {
|
|
8730
|
+
const segments = parseSecretPath(path);
|
|
8731
|
+
const prefixes = [];
|
|
8732
|
+
const walked = [];
|
|
8733
|
+
for (const segment of segments) {
|
|
8734
|
+
walked.push(segment.key);
|
|
8735
|
+
if (segment.each) prefixes.push(walked.join("."));
|
|
8736
|
+
}
|
|
8737
|
+
return prefixes;
|
|
8738
|
+
}
|
|
8739
|
+
/**
|
|
8740
|
+
* The share-view scope kinds a share-link token can carry. The hub mints
|
|
8741
|
+
* and validates them (`ShareViewGrantSchema` builds its
|
|
8742
|
+
* enum from this list); a data plane names the kinds it ACCEPTS in `share`.
|
|
8743
|
+
*/
|
|
8744
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
8745
|
+
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
8746
|
+
var PeerBytesTicketSchema = object({
|
|
8747
|
+
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
8748
|
+
url: string().min(1),
|
|
8749
|
+
/**
|
|
8750
|
+
* The HOST node this URL means something on — the hub or a named agent,
|
|
8751
|
+
* never a runner. {@link AddonPeerBytes.open} compares it to its own and
|
|
8752
|
+
* refuses `cross-node` by name when they differ, without dialling.
|
|
8753
|
+
*/
|
|
8754
|
+
hostNodeId: string().min(1),
|
|
8755
|
+
expiresAtMs: number().int().nonnegative(),
|
|
8756
|
+
/**
|
|
8757
|
+
* What the producer DECLARED the body to be, when it knows — `null` when it
|
|
8758
|
+
* does not. Never `0` for unknown (D393): a consumer sizing a bound off this
|
|
8759
|
+
* must be able to tell "the producer did not say" from "the body is empty".
|
|
8760
|
+
*/
|
|
8761
|
+
declaredBytes: number().int().nonnegative().nullable()
|
|
8762
|
+
});
|
|
8686
8763
|
function defOf(schema) {
|
|
8687
8764
|
const zodBag = Reflect.get(schema, "_zod");
|
|
8688
8765
|
if (typeof zodBag !== "object" || zodBag === null) return {};
|
|
@@ -8751,42 +8828,6 @@ function collectZodSecretPaths(schema, prefix = "") {
|
|
|
8751
8828
|
return [...new Set(paths)];
|
|
8752
8829
|
}
|
|
8753
8830
|
/**
|
|
8754
|
-
* Secret fields of a record, addressed the way a Zod schema declares them
|
|
8755
|
-
* (`collectZodSecretPaths`): dotted keys, `[]` for "each element of this array"
|
|
8756
|
-
* (`auth.accessToken`, `headers[].value`).
|
|
8757
|
-
*
|
|
8758
|
-
* Array elements are matched by a DECLARED id key (`secretArrayKeys`:
|
|
8759
|
-
* `{ headers: 'name' }`), never by index, so reordering a list keeps every
|
|
8760
|
-
* keychain ref (the same rule as `arrayItemFieldPath`). The concrete path of a
|
|
8761
|
-
* leaf names its element: `headers[X-Api].value`.
|
|
8762
|
-
*
|
|
8763
|
-
* Pure and browser-safe. Nothing here mutates: every transform returns a new value.
|
|
8764
|
-
*/
|
|
8765
|
-
/** The array prefixes (declared form, e.g. `headers` or `a.headers`) of a path. */
|
|
8766
|
-
function parseSecretPath(path) {
|
|
8767
|
-
if (path.length === 0) throw new InvalidRecordError("an empty secret path");
|
|
8768
|
-
return path.split(".").map((raw) => {
|
|
8769
|
-
const each = raw.endsWith("[]");
|
|
8770
|
-
const key = each ? raw.slice(0, -2) : raw;
|
|
8771
|
-
if (key.length === 0) throw new InvalidRecordError(`secret path "${path}" has an empty segment`);
|
|
8772
|
-
return {
|
|
8773
|
-
key,
|
|
8774
|
-
each
|
|
8775
|
-
};
|
|
8776
|
-
});
|
|
8777
|
-
}
|
|
8778
|
-
/** The declared array prefixes of `path` that need an id key (`headers`, `a.rows`). */
|
|
8779
|
-
function secretArrayPrefixes(path) {
|
|
8780
|
-
const segments = parseSecretPath(path);
|
|
8781
|
-
const prefixes = [];
|
|
8782
|
-
const walked = [];
|
|
8783
|
-
for (const segment of segments) {
|
|
8784
|
-
walked.push(segment.key);
|
|
8785
|
-
if (segment.each) prefixes.push(walked.join("."));
|
|
8786
|
-
}
|
|
8787
|
-
return prefixes;
|
|
8788
|
-
}
|
|
8789
|
-
/**
|
|
8790
8831
|
* Record kinds (D881): the declaration an addon makes of one kind of fact, the
|
|
8791
8832
|
* Zod row schema that describes it, and the helper that turns the two into the
|
|
8792
8833
|
* JSON the engine stores.
|
|
@@ -10143,6 +10184,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
10143
10184
|
"backup",
|
|
10144
10185
|
"battery",
|
|
10145
10186
|
"binary",
|
|
10187
|
+
"board-key-source",
|
|
10146
10188
|
"brightness",
|
|
10147
10189
|
"broker",
|
|
10148
10190
|
"button",
|
|
@@ -10206,6 +10248,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
10206
10248
|
"humidity-sensor",
|
|
10207
10249
|
"image",
|
|
10208
10250
|
"image-settings",
|
|
10251
|
+
"integration-instances",
|
|
10209
10252
|
"integrations",
|
|
10210
10253
|
"intercom",
|
|
10211
10254
|
"ir-transmitter",
|
|
@@ -10263,6 +10306,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
10263
10306
|
"privacy-mask",
|
|
10264
10307
|
"ptz",
|
|
10265
10308
|
"ptz-autotrack",
|
|
10309
|
+
"pump-cycle",
|
|
10266
10310
|
"reboot",
|
|
10267
10311
|
"record-entries",
|
|
10268
10312
|
"recording",
|
|
@@ -11555,18 +11599,6 @@ Object.freeze({
|
|
|
11555
11599
|
"path": "pumpRunning",
|
|
11556
11600
|
"valueType": "boolean"
|
|
11557
11601
|
},
|
|
11558
|
-
{
|
|
11559
|
-
"path": "pumpIntervalEnabled",
|
|
11560
|
-
"valueType": "boolean"
|
|
11561
|
-
},
|
|
11562
|
-
{
|
|
11563
|
-
"path": "pumpOnTime",
|
|
11564
|
-
"valueType": "number"
|
|
11565
|
-
},
|
|
11566
|
-
{
|
|
11567
|
-
"path": "pumpOffTime",
|
|
11568
|
-
"valueType": "number"
|
|
11569
|
-
},
|
|
11570
11602
|
{
|
|
11571
11603
|
"path": "lastDrink",
|
|
11572
11604
|
"valueType": "number"
|
|
@@ -11690,6 +11722,20 @@ Object.freeze({
|
|
|
11690
11722
|
"valueType": "number"
|
|
11691
11723
|
}
|
|
11692
11724
|
],
|
|
11725
|
+
"pump-cycle": [
|
|
11726
|
+
{
|
|
11727
|
+
"path": "enabled",
|
|
11728
|
+
"valueType": "boolean"
|
|
11729
|
+
},
|
|
11730
|
+
{
|
|
11731
|
+
"path": "onTime",
|
|
11732
|
+
"valueType": "number"
|
|
11733
|
+
},
|
|
11734
|
+
{
|
|
11735
|
+
"path": "offTime",
|
|
11736
|
+
"valueType": "number"
|
|
11737
|
+
}
|
|
11738
|
+
],
|
|
11693
11739
|
"recording-archive": [
|
|
11694
11740
|
{
|
|
11695
11741
|
"path": "deviceId",
|
|
@@ -12163,7 +12209,7 @@ function sleep(ms) {
|
|
|
12163
12209
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
12164
12210
|
}
|
|
12165
12211
|
//#endregion
|
|
12166
|
-
//#region ../types/dist/composition-
|
|
12212
|
+
//#region ../types/dist/composition-Dh3RfMx5.mjs
|
|
12167
12213
|
/**
|
|
12168
12214
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
12169
12215
|
*
|
|
@@ -13545,6 +13591,73 @@ function assignNodeColorId(nodeId) {
|
|
|
13545
13591
|
if (id !== void 0) return id;
|
|
13546
13592
|
return "node-a";
|
|
13547
13593
|
}
|
|
13594
|
+
//#endregion
|
|
13595
|
+
//#region ../types/dist/index.mjs
|
|
13596
|
+
var SMTP_INBOUND_DEFAULT_PORT = 2525;
|
|
13597
|
+
var SMTP_INBOUND_DEFAULT_DOMAIN = "camstack.local";
|
|
13598
|
+
var SMTP_INBOUND_DEFAULT_MAX_MESSAGE_BYTES = 25 * 1024 * 1024;
|
|
13599
|
+
/** The text excerpt a message carries on the bus. */
|
|
13600
|
+
var SMTP_INBOUND_TEXT_MAX_CHARS = 4096;
|
|
13601
|
+
var PortSchema = number().int().min(1).max(65535);
|
|
13602
|
+
/** A recipient local-part: what stands before the `@`. */
|
|
13603
|
+
var SmtpRecipientSchema = string().min(1).max(64).regex(/^[A-Za-z0-9._+-]+$/);
|
|
13604
|
+
object({
|
|
13605
|
+
port: PortSchema.default(SMTP_INBOUND_DEFAULT_PORT),
|
|
13606
|
+
bindHost: string().min(1).default("0.0.0.0"),
|
|
13607
|
+
domain: string().min(1).default(SMTP_INBOUND_DEFAULT_DOMAIN),
|
|
13608
|
+
requireAuth: boolean().default(true),
|
|
13609
|
+
username: string().default(""),
|
|
13610
|
+
password: string().default("").meta({ secret: true }),
|
|
13611
|
+
starttls: boolean().default(false),
|
|
13612
|
+
maxMessageBytes: number().int().positive().default(SMTP_INBOUND_DEFAULT_MAX_MESSAGE_BYTES)
|
|
13613
|
+
});
|
|
13614
|
+
object({
|
|
13615
|
+
host: string().min(1).nullable(),
|
|
13616
|
+
hostReason: string().nullable(),
|
|
13617
|
+
port: PortSchema,
|
|
13618
|
+
domain: string().min(1),
|
|
13619
|
+
requireAuth: boolean(),
|
|
13620
|
+
username: string(),
|
|
13621
|
+
password: string(),
|
|
13622
|
+
starttls: boolean()
|
|
13623
|
+
});
|
|
13624
|
+
object({
|
|
13625
|
+
recipients: array(SmtpRecipientSchema).min(1),
|
|
13626
|
+
/**
|
|
13627
|
+
* Who is subscribing. A second `subscribe` with the same id REPLACES that subscriber's
|
|
13628
|
+
* recipients (the way a consumer that restarted, or lost a device, declares its set again);
|
|
13629
|
+
* a recipient held by another subscriber is refused with `smtp-inbound/recipient-claimed`.
|
|
13630
|
+
* Absent, the subscriber is anonymous and unique.
|
|
13631
|
+
*/
|
|
13632
|
+
subscriberId: string().min(1).max(64).optional()
|
|
13633
|
+
});
|
|
13634
|
+
var SmtpInboundAttachmentSchema = object({
|
|
13635
|
+
filename: string(),
|
|
13636
|
+
contentType: string(),
|
|
13637
|
+
bytes: number().int().nonnegative()
|
|
13638
|
+
});
|
|
13639
|
+
/** The payload of one `broker.message` (the key is the recipient local-part). */
|
|
13640
|
+
var SmtpInboundMessageSchema = object({
|
|
13641
|
+
/** Monotonic per mailbox; a gap tells a consumer it missed an event. */
|
|
13642
|
+
seq: number().int().positive(),
|
|
13643
|
+
messageId: string(),
|
|
13644
|
+
receivedAt: number().int().nonnegative(),
|
|
13645
|
+
from: string(),
|
|
13646
|
+
to: string(),
|
|
13647
|
+
subject: string(),
|
|
13648
|
+
text: string().max(SMTP_INBOUND_TEXT_MAX_CHARS),
|
|
13649
|
+
attachments: array(SmtpInboundAttachmentSchema)
|
|
13650
|
+
});
|
|
13651
|
+
object({
|
|
13652
|
+
/** The newest seq issued so far (0 before any mail). */
|
|
13653
|
+
lastSeq: number().int().nonnegative(),
|
|
13654
|
+
/** The oldest seq still retained; messages below it are gone. */
|
|
13655
|
+
oldestSeq: number().int().nonnegative(),
|
|
13656
|
+
messages: array(object({
|
|
13657
|
+
key: string(),
|
|
13658
|
+
message: SmtpInboundMessageSchema
|
|
13659
|
+
}))
|
|
13660
|
+
});
|
|
13548
13661
|
new Set([
|
|
13549
13662
|
"track",
|
|
13550
13663
|
"face",
|
|
@@ -20129,24 +20242,52 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
20129
20242
|
args: { on: false }
|
|
20130
20243
|
},
|
|
20131
20244
|
{
|
|
20132
|
-
id: "petFountain.
|
|
20133
|
-
method: "
|
|
20245
|
+
id: "petFountain.resetDailyConsumption",
|
|
20246
|
+
method: "resetDailyConsumption",
|
|
20247
|
+
label: t("Clear daily consumption", "Azzera il consumo giornaliero"),
|
|
20248
|
+
phrase: t("Clear the daily water consumption of {device}", "Azzera il consumo giornaliero di acqua di {device}"),
|
|
20249
|
+
icon: "rotate-ccw"
|
|
20250
|
+
}
|
|
20251
|
+
],
|
|
20252
|
+
state: [{
|
|
20253
|
+
kind: "boolean",
|
|
20254
|
+
field: "empty",
|
|
20255
|
+
label: t("Tank empty", "Serbatoio vuoto"),
|
|
20256
|
+
whenTrue: t("When the tank of {device} is empty", "Quando il serbatoio di {device} è vuoto"),
|
|
20257
|
+
whenFalse: t("When the tank of {device} is refilled", "Quando il serbatoio di {device} viene riempito"),
|
|
20258
|
+
icon: "droplet"
|
|
20259
|
+
}, {
|
|
20260
|
+
kind: "numeric",
|
|
20261
|
+
field: "waterLevel",
|
|
20262
|
+
quantity: t("the water level", "il livello dell’acqua"),
|
|
20263
|
+
label: t("Water level", "Livello dell’acqua"),
|
|
20264
|
+
unit: "%",
|
|
20265
|
+
icon: "droplets"
|
|
20266
|
+
}]
|
|
20267
|
+
},
|
|
20268
|
+
"pump-cycle": {
|
|
20269
|
+
scope: "device",
|
|
20270
|
+
noun: t("Pump cycle", "Ciclo della pompa"),
|
|
20271
|
+
actions: [
|
|
20272
|
+
{
|
|
20273
|
+
id: "pumpCycle.on",
|
|
20274
|
+
method: "setEnabled",
|
|
20134
20275
|
label: t("Pump cycle on", "Ciclo pompa attivo"),
|
|
20135
20276
|
phrase: t("Run the pump of {device} on its on/off cycle", "Fai lavorare la pompa di {device} a ciclo acceso/spento"),
|
|
20136
20277
|
icon: "timer",
|
|
20137
20278
|
args: { on: true }
|
|
20138
20279
|
},
|
|
20139
20280
|
{
|
|
20140
|
-
id: "
|
|
20141
|
-
method: "
|
|
20281
|
+
id: "pumpCycle.off",
|
|
20282
|
+
method: "setEnabled",
|
|
20142
20283
|
label: t("Pump cycle off", "Ciclo pompa spento"),
|
|
20143
20284
|
phrase: t("Run the pump of {device} continuously", "Fai lavorare la pompa di {device} in continuo"),
|
|
20144
20285
|
icon: "timer-off",
|
|
20145
20286
|
args: { on: false }
|
|
20146
20287
|
},
|
|
20147
20288
|
{
|
|
20148
|
-
id: "
|
|
20149
|
-
method: "
|
|
20289
|
+
id: "pumpCycle.onMinutes",
|
|
20290
|
+
method: "setOnMinutes",
|
|
20150
20291
|
label: t("Set pump run time", "Imposta il tempo di lavoro della pompa"),
|
|
20151
20292
|
phrase: t("Set the pump of {device} to run {minutes} minutes per cycle", "Imposta la pompa di {device} a lavorare {minutes} minuti per ciclo"),
|
|
20152
20293
|
icon: "timer",
|
|
@@ -20162,8 +20303,8 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
20162
20303
|
}]
|
|
20163
20304
|
},
|
|
20164
20305
|
{
|
|
20165
|
-
id: "
|
|
20166
|
-
method: "
|
|
20306
|
+
id: "pumpCycle.offMinutes",
|
|
20307
|
+
method: "setOffMinutes",
|
|
20167
20308
|
label: t("Set pump rest time", "Imposta il tempo di riposo della pompa"),
|
|
20168
20309
|
phrase: t("Set the pump of {device} to rest {minutes} minutes per cycle", "Imposta la pompa di {device} a riposare {minutes} minuti per ciclo"),
|
|
20169
20310
|
icon: "timer-off",
|
|
@@ -20177,29 +20318,15 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
20177
20318
|
unit: "min"
|
|
20178
20319
|
}
|
|
20179
20320
|
}]
|
|
20180
|
-
},
|
|
20181
|
-
{
|
|
20182
|
-
id: "petFountain.resetDailyConsumption",
|
|
20183
|
-
method: "resetDailyConsumption",
|
|
20184
|
-
label: t("Clear daily consumption", "Azzera il consumo giornaliero"),
|
|
20185
|
-
phrase: t("Clear the daily water consumption of {device}", "Azzera il consumo giornaliero di acqua di {device}"),
|
|
20186
|
-
icon: "rotate-ccw"
|
|
20187
20321
|
}
|
|
20188
20322
|
],
|
|
20189
20323
|
state: [{
|
|
20190
20324
|
kind: "boolean",
|
|
20191
|
-
field: "
|
|
20192
|
-
label: t("
|
|
20193
|
-
whenTrue: t("When
|
|
20194
|
-
whenFalse: t("When
|
|
20195
|
-
icon: "
|
|
20196
|
-
}, {
|
|
20197
|
-
kind: "numeric",
|
|
20198
|
-
field: "waterLevel",
|
|
20199
|
-
quantity: t("the water level", "il livello dell’acqua"),
|
|
20200
|
-
label: t("Water level", "Livello dell’acqua"),
|
|
20201
|
-
unit: "%",
|
|
20202
|
-
icon: "droplets"
|
|
20325
|
+
field: "enabled",
|
|
20326
|
+
label: t("Pump cycle", "Ciclo pompa"),
|
|
20327
|
+
whenTrue: t("When {device} starts running its pump on a cycle", "Quando {device} inizia a far lavorare la pompa a ciclo"),
|
|
20328
|
+
whenFalse: t("When {device} runs its pump continuously", "Quando {device} fa lavorare la pompa in continuo"),
|
|
20329
|
+
icon: "timer"
|
|
20203
20330
|
}]
|
|
20204
20331
|
},
|
|
20205
20332
|
"media-player": {
|
|
@@ -22092,6 +22219,7 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
22092
22219
|
"audio-analyzer": system(PIPELINE),
|
|
22093
22220
|
"audio-codec": system(INTERNAL),
|
|
22094
22221
|
"auth-provider": system(IDENTITY),
|
|
22222
|
+
"board-key-source": system(INTERNAL),
|
|
22095
22223
|
backup: system("system backups — run and restored from the Backups page"),
|
|
22096
22224
|
broker: system("message-broker connections — configured, not actuated"),
|
|
22097
22225
|
"calendar-source": system(INTERNAL),
|
|
@@ -22126,6 +22254,7 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
22126
22254
|
"load-contribution": system(INTERNAL),
|
|
22127
22255
|
"local-network": system(NETWORK),
|
|
22128
22256
|
"log-channels": system(INTERNAL),
|
|
22257
|
+
"integration-instances": system(INTERNAL),
|
|
22129
22258
|
"log-destination": system(INTERNAL),
|
|
22130
22259
|
"login-method": system(IDENTITY),
|
|
22131
22260
|
"mesh-network": system(NETWORK),
|
|
@@ -44272,7 +44401,7 @@ var TargetKindCapsSchema = object({
|
|
|
44272
44401
|
* the union is large and not meant for runtime validation here; the exported
|
|
44273
44402
|
* `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
|
|
44274
44403
|
*/
|
|
44275
|
-
var ConfigSchemaPassthrough$
|
|
44404
|
+
var ConfigSchemaPassthrough$4 = unknown();
|
|
44276
44405
|
var TargetKindSchema = object({
|
|
44277
44406
|
kind: string(),
|
|
44278
44407
|
label: string(),
|
|
@@ -44309,7 +44438,7 @@ var TargetKindSchema = object({
|
|
|
44309
44438
|
* its raster path, which is the safe default for an unknown image.
|
|
44310
44439
|
*/
|
|
44311
44440
|
iconMediaType: string().optional(),
|
|
44312
|
-
configSchema: ConfigSchemaPassthrough$
|
|
44441
|
+
configSchema: ConfigSchemaPassthrough$4,
|
|
44313
44442
|
/**
|
|
44314
44443
|
* The config keys that decide WHERE this kind's secrets are sent (server,
|
|
44315
44444
|
* base URL, instance, chat, recipient). A save that changes any of them
|
|
@@ -46553,6 +46682,49 @@ object({
|
|
|
46553
46682
|
lastChangedAt: number()
|
|
46554
46683
|
});
|
|
46555
46684
|
DeviceType.Sensor;
|
|
46685
|
+
/**
|
|
46686
|
+
* Why a board key could not be read. Typed so a caller reports the cause and
|
|
46687
|
+
* never treats "could not read" as "has no key" (D49).
|
|
46688
|
+
*/
|
|
46689
|
+
var BoardKeyFailureReasonSchema = _enum([
|
|
46690
|
+
"unknown-source",
|
|
46691
|
+
"not-admin",
|
|
46692
|
+
"no-builder",
|
|
46693
|
+
"no-ingress-url",
|
|
46694
|
+
"unreachable",
|
|
46695
|
+
"unknown-board",
|
|
46696
|
+
"no-encryption-key",
|
|
46697
|
+
"unreadable-config"
|
|
46698
|
+
]);
|
|
46699
|
+
var BoardKeySourceSchema = object({
|
|
46700
|
+
sourceId: string(),
|
|
46701
|
+
name: string()
|
|
46702
|
+
});
|
|
46703
|
+
var BoardKeyBoardSchema = object({
|
|
46704
|
+
/** The builder's file name, e.g. `kitchen.yaml`: the handle `getBoardKey` takes. */
|
|
46705
|
+
configuration: string(),
|
|
46706
|
+
/** The node name the builder gives the board. */
|
|
46707
|
+
name: string(),
|
|
46708
|
+
/** The address the builder knows the board by, when it has one. */
|
|
46709
|
+
address: string().nullable()
|
|
46710
|
+
});
|
|
46711
|
+
var BoardKeyFailureSchema = object({
|
|
46712
|
+
ok: literal(false),
|
|
46713
|
+
reason: BoardKeyFailureReasonSchema,
|
|
46714
|
+
detail: string().optional()
|
|
46715
|
+
});
|
|
46716
|
+
var ListBoardsResultSchema = discriminatedUnion("ok", [object({
|
|
46717
|
+
ok: literal(true),
|
|
46718
|
+
boards: array(BoardKeyBoardSchema).readonly()
|
|
46719
|
+
}), BoardKeyFailureSchema]);
|
|
46720
|
+
var GetBoardKeyResultSchema = discriminatedUnion("ok", [object({
|
|
46721
|
+
ok: literal(true),
|
|
46722
|
+
key: string()
|
|
46723
|
+
}), BoardKeyFailureSchema]);
|
|
46724
|
+
method(_void(), array(BoardKeySourceSchema).readonly(), { auth: "admin" }), method(object({ sourceId: string().min(1) }), ListBoardsResultSchema, { auth: "admin" }), method(object({
|
|
46725
|
+
sourceId: string().min(1),
|
|
46726
|
+
configuration: string().min(1)
|
|
46727
|
+
}), GetBoardKeyResultSchema, { auth: "admin" });
|
|
46556
46728
|
object({
|
|
46557
46729
|
/** Current level as 0..100 inclusive. Firmware-reported. */
|
|
46558
46730
|
level: number().min(0).max(100).meta(readingMeta("percentage")),
|
|
@@ -52253,7 +52425,7 @@ object({
|
|
|
52253
52425
|
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
52254
52426
|
lastFetchedAt: number()
|
|
52255
52427
|
});
|
|
52256
|
-
var DeviceIdSchema$
|
|
52428
|
+
var DeviceIdSchema$2 = number().int().nonnegative();
|
|
52257
52429
|
/** A value a program option or setting can take. */
|
|
52258
52430
|
var DishwasherValueSchema = union([
|
|
52259
52431
|
boolean(),
|
|
@@ -52317,77 +52489,77 @@ var DishwasherOptionsSchema = object({
|
|
|
52317
52489
|
options: array(DishwasherOptionDescriptorSchema)
|
|
52318
52490
|
});
|
|
52319
52491
|
DeviceType.Dishwasher, method(object({
|
|
52320
|
-
deviceId: DeviceIdSchema$
|
|
52492
|
+
deviceId: DeviceIdSchema$2,
|
|
52321
52493
|
program: string().min(1).optional(),
|
|
52322
52494
|
options: record(string(), DishwasherValueSchema).optional()
|
|
52323
52495
|
}), _void(), {
|
|
52324
52496
|
kind: "mutation",
|
|
52325
52497
|
auth: "protected"
|
|
52326
|
-
}), method(object({ deviceId: DeviceIdSchema$
|
|
52498
|
+
}), method(object({ deviceId: DeviceIdSchema$2 }), _void(), {
|
|
52327
52499
|
kind: "mutation",
|
|
52328
52500
|
auth: "protected"
|
|
52329
|
-
}), method(object({ deviceId: DeviceIdSchema$
|
|
52501
|
+
}), method(object({ deviceId: DeviceIdSchema$2 }), _void(), {
|
|
52330
52502
|
kind: "mutation",
|
|
52331
52503
|
auth: "protected"
|
|
52332
|
-
}), method(object({ deviceId: DeviceIdSchema$
|
|
52504
|
+
}), method(object({ deviceId: DeviceIdSchema$2 }), _void(), {
|
|
52333
52505
|
kind: "mutation",
|
|
52334
52506
|
auth: "protected"
|
|
52335
52507
|
}), method(object({
|
|
52336
|
-
deviceId: DeviceIdSchema$
|
|
52508
|
+
deviceId: DeviceIdSchema$2,
|
|
52337
52509
|
program: string().min(1)
|
|
52338
52510
|
}), _void(), {
|
|
52339
52511
|
kind: "mutation",
|
|
52340
52512
|
auth: "protected"
|
|
52341
52513
|
}), method(object({
|
|
52342
|
-
deviceId: DeviceIdSchema$
|
|
52514
|
+
deviceId: DeviceIdSchema$2,
|
|
52343
52515
|
on: boolean()
|
|
52344
52516
|
}), _void(), {
|
|
52345
52517
|
kind: "mutation",
|
|
52346
52518
|
auth: "protected"
|
|
52347
52519
|
}), method(object({
|
|
52348
|
-
deviceId: DeviceIdSchema$
|
|
52520
|
+
deviceId: DeviceIdSchema$2,
|
|
52349
52521
|
on: boolean()
|
|
52350
52522
|
}), _void(), {
|
|
52351
52523
|
kind: "mutation",
|
|
52352
52524
|
auth: "protected"
|
|
52353
52525
|
}), method(object({
|
|
52354
|
-
deviceId: DeviceIdSchema$
|
|
52526
|
+
deviceId: DeviceIdSchema$2,
|
|
52355
52527
|
on: boolean()
|
|
52356
52528
|
}), _void(), {
|
|
52357
52529
|
kind: "mutation",
|
|
52358
52530
|
auth: "protected"
|
|
52359
52531
|
}), method(object({
|
|
52360
|
-
deviceId: DeviceIdSchema$
|
|
52532
|
+
deviceId: DeviceIdSchema$2,
|
|
52361
52533
|
on: boolean()
|
|
52362
52534
|
}), _void(), {
|
|
52363
52535
|
kind: "mutation",
|
|
52364
52536
|
auth: "protected"
|
|
52365
52537
|
}), method(object({
|
|
52366
|
-
deviceId: DeviceIdSchema$
|
|
52538
|
+
deviceId: DeviceIdSchema$2,
|
|
52367
52539
|
on: boolean()
|
|
52368
52540
|
}), _void(), {
|
|
52369
52541
|
kind: "mutation",
|
|
52370
52542
|
auth: "protected"
|
|
52371
52543
|
}), method(object({
|
|
52372
|
-
deviceId: DeviceIdSchema$
|
|
52544
|
+
deviceId: DeviceIdSchema$2,
|
|
52373
52545
|
on: boolean()
|
|
52374
52546
|
}), _void(), {
|
|
52375
52547
|
kind: "mutation",
|
|
52376
52548
|
auth: "protected"
|
|
52377
52549
|
}), method(object({
|
|
52378
|
-
deviceId: DeviceIdSchema$
|
|
52550
|
+
deviceId: DeviceIdSchema$2,
|
|
52379
52551
|
on: boolean()
|
|
52380
52552
|
}), _void(), {
|
|
52381
52553
|
kind: "mutation",
|
|
52382
52554
|
auth: "protected"
|
|
52383
52555
|
}), method(object({
|
|
52384
|
-
deviceId: DeviceIdSchema$
|
|
52556
|
+
deviceId: DeviceIdSchema$2,
|
|
52385
52557
|
key: string().min(1),
|
|
52386
52558
|
value: DishwasherValueSchema
|
|
52387
52559
|
}), _void(), {
|
|
52388
52560
|
kind: "mutation",
|
|
52389
52561
|
auth: "protected"
|
|
52390
|
-
}), method(object({ deviceId: DeviceIdSchema$
|
|
52562
|
+
}), method(object({ deviceId: DeviceIdSchema$2 }), DishwasherOptionsSchema, { auth: "protected" });
|
|
52391
52563
|
/**
|
|
52392
52564
|
* Palette entry ids (D939). Audio is the one gradient; `audio-*` leaves are
|
|
52393
52565
|
* not entries. `heatmapScrub` is a mark, not an event kind.
|
|
@@ -54363,6 +54535,89 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
|
|
|
54363
54535
|
auth: "admin"
|
|
54364
54536
|
});
|
|
54365
54537
|
/**
|
|
54538
|
+
* `integration-instances` - the connection of an addon that holds ONE or SEVERAL
|
|
54539
|
+
* (an account, a relay, a destination) as typed records (D985, D986). The addon's
|
|
54540
|
+
* own function page reads and writes them (Logging for Loki); the Integrations
|
|
54541
|
+
* page lists only the integrations that bring devices (D996).
|
|
54542
|
+
*
|
|
54543
|
+
* A collection of providers: each addon that holds connections registers one and a
|
|
54544
|
+
* caller reaches a provider with the pinned `addonId`.
|
|
54545
|
+
*
|
|
54546
|
+
* Identity: the instance id is immutable and opaque to the caller. A record the
|
|
54547
|
+
* Loki migration made keeps the `integrations` registry id it was created under
|
|
54548
|
+
* (`int_NNNN`); a single instance made by its function page takes the addon id.
|
|
54549
|
+
* `name` is the editable label.
|
|
54550
|
+
*
|
|
54551
|
+
* Secrets: every field the instance kind marks `.meta({ secret: true })` reaches
|
|
54552
|
+
* the form as a `SecretFieldView`, never text (D789). A patch value omitted, `''`
|
|
54553
|
+
* or the redaction token KEEPS the stored secret; `{ $secretClear: true }`
|
|
54554
|
+
* clears it.
|
|
54555
|
+
*/
|
|
54556
|
+
var ConfigSchemaPassthrough$3 = custom();
|
|
54557
|
+
var IntegrationInstanceIdSchema = string().min(1);
|
|
54558
|
+
var IntegrationInstanceDescriptionSchema = object({
|
|
54559
|
+
/** `single`: at most one instance can exist (Loki). `multiple`: an account each. */
|
|
54560
|
+
instanceMode: _enum(["single", "multiple"]),
|
|
54561
|
+
/** What the instance is, for the UI (`destination`, `relay`, `account`). */
|
|
54562
|
+
kind: string(),
|
|
54563
|
+
/** True when `testInstance` really probes the remote. */
|
|
54564
|
+
canTest: boolean()
|
|
54565
|
+
});
|
|
54566
|
+
var IntegrationInstanceStatusSchema = object({
|
|
54567
|
+
state: _enum([
|
|
54568
|
+
"ok",
|
|
54569
|
+
"off",
|
|
54570
|
+
"error",
|
|
54571
|
+
"unknown"
|
|
54572
|
+
]),
|
|
54573
|
+
detail: string().optional()
|
|
54574
|
+
});
|
|
54575
|
+
var IntegrationInstanceSchema = object({
|
|
54576
|
+
id: IntegrationInstanceIdSchema,
|
|
54577
|
+
name: string(),
|
|
54578
|
+
/** The addon's own rule (an URL is present, a client id is present...). */
|
|
54579
|
+
configured: boolean(),
|
|
54580
|
+
/**
|
|
54581
|
+
* The instance's own on/off switch (D996): always present, derived from the record body
|
|
54582
|
+
* (`enabled !== false`, so a row written before the field existed is on).
|
|
54583
|
+
*/
|
|
54584
|
+
enabled: boolean(),
|
|
54585
|
+
/** Values for the instance form; a secret is a `SecretFieldView`, never text. */
|
|
54586
|
+
formValues: record(string(), unknown()),
|
|
54587
|
+
status: IntegrationInstanceStatusSchema.optional()
|
|
54588
|
+
});
|
|
54589
|
+
var IntegrationInstancePatchSchema = object({
|
|
54590
|
+
id: IntegrationInstanceIdSchema,
|
|
54591
|
+
name: string().min(1).optional(),
|
|
54592
|
+
/** Omitted / '' / redaction token keeps a secret; `{ $secretClear: true }` clears it. */
|
|
54593
|
+
values: record(string(), unknown())
|
|
54594
|
+
});
|
|
54595
|
+
method(_void(), IntegrationInstanceDescriptionSchema, { auth: "admin" }), method(object({ id: IntegrationInstanceIdSchema.nullable() }), ConfigSchemaPassthrough$3, { auth: "admin" }), method(_void(), array(IntegrationInstanceSchema).readonly(), { auth: "admin" }), method(object({ id: IntegrationInstanceIdSchema }), IntegrationInstanceSchema.nullable(), { auth: "admin" }), method(object({
|
|
54596
|
+
id: IntegrationInstanceIdSchema,
|
|
54597
|
+
name: string().min(1)
|
|
54598
|
+
}), object({ id: string() }), {
|
|
54599
|
+
kind: "mutation",
|
|
54600
|
+
auth: "admin"
|
|
54601
|
+
}), method(IntegrationInstancePatchSchema, object({ ok: literal(true) }), {
|
|
54602
|
+
kind: "mutation",
|
|
54603
|
+
auth: "admin"
|
|
54604
|
+
}), method(object({
|
|
54605
|
+
id: IntegrationInstanceIdSchema,
|
|
54606
|
+
enabled: boolean()
|
|
54607
|
+
}), object({ ok: literal(true) }), {
|
|
54608
|
+
kind: "mutation",
|
|
54609
|
+
auth: "admin"
|
|
54610
|
+
}), method(object({ id: IntegrationInstanceIdSchema }), object({ ok: literal(true) }), {
|
|
54611
|
+
kind: "mutation",
|
|
54612
|
+
auth: "admin"
|
|
54613
|
+
}), optionalMethod(object({
|
|
54614
|
+
id: IntegrationInstanceIdSchema.nullable(),
|
|
54615
|
+
values: record(string(), unknown())
|
|
54616
|
+
}), TestConnectionResultSchema$1, {
|
|
54617
|
+
kind: "mutation",
|
|
54618
|
+
auth: "admin"
|
|
54619
|
+
});
|
|
54620
|
+
/**
|
|
54366
54621
|
* Two-way audio / talk-back cap. Clients open a WebRTC audio-only
|
|
54367
54622
|
* session (server-initiated offer pattern, identical to the main
|
|
54368
54623
|
* video WebRTC flow) and the browser captures the mic; the server
|
|
@@ -64873,7 +65128,14 @@ var NcMediaPolicySchema = object({
|
|
|
64873
65128
|
*/
|
|
64874
65129
|
profile: CamProfileSchema.optional(),
|
|
64875
65130
|
/** See {@link NcLinkedCameraModeSchema}. */
|
|
64876
|
-
linkedCameras: NcLinkedCameraModeSchema.optional()
|
|
65131
|
+
linkedCameras: NcLinkedCameraModeSchema.optional(),
|
|
65132
|
+
/**
|
|
65133
|
+
* Sensor rules only: may this rule wake a SLEEPING battery camera to take
|
|
65134
|
+
* the linked still it attaches (D998)? Absent means yes, an explicit `false`
|
|
65135
|
+
* opts out. Deliberately not a Zod default: a rule that never chose keeps
|
|
65136
|
+
* following the hub's. One bounded wake per event; nothing is attached later.
|
|
65137
|
+
*/
|
|
65138
|
+
wakeSleepingCamera: boolean().optional()
|
|
64877
65139
|
});
|
|
64878
65140
|
/**
|
|
64879
65141
|
* Cooldown GRANULARITY over the subject's class — how much a fired
|
|
@@ -65265,6 +65527,21 @@ var NcTemplateVarKindSchema = _enum([
|
|
|
65265
65527
|
"sound",
|
|
65266
65528
|
"system"
|
|
65267
65529
|
]);
|
|
65530
|
+
/**
|
|
65531
|
+
* The default title/body a rule of one SITUATION is delivered with when the
|
|
65532
|
+
* operator wrote no template — served so an editor can pre-fill it (and the
|
|
65533
|
+
* operator can rebuild it from placeholders) instead of starting from a blank
|
|
65534
|
+
* box that, once saved, silently replaces it. `id` names the situation inside
|
|
65535
|
+
* a rule `kind`: `appliance-cycle` is a `sensor` rule whose device is an
|
|
65536
|
+
* appliance finishing a cycle. Texts are raw templates (`{{var}}` intact), in
|
|
65537
|
+
* the hub's current language and with its overrides applied.
|
|
65538
|
+
*/
|
|
65539
|
+
var NcTemplateDefaultSchema = object({
|
|
65540
|
+
id: _enum(["appliance-cycle"]),
|
|
65541
|
+
kind: NcRuleKindSchema,
|
|
65542
|
+
title: string(),
|
|
65543
|
+
body: string()
|
|
65544
|
+
});
|
|
65268
65545
|
/** Which producer renders a template: an ordinary rule, a timelapse, a digest. */
|
|
65269
65546
|
var NcTemplateFamilySchema = _enum([
|
|
65270
65547
|
"rule",
|
|
@@ -66120,7 +66397,11 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
66120
66397
|
}), method(object({}), object({
|
|
66121
66398
|
catalog: array(NcConditionDescriptorSchema),
|
|
66122
66399
|
taxonomy: NcTaxonomySchema.optional()
|
|
66123
|
-
})), method(object({}), object({
|
|
66400
|
+
})), method(object({}), object({
|
|
66401
|
+
vars: array(NcTemplateVarDescriptorSchema),
|
|
66402
|
+
/** Per-situation default texts; absent on a hub that predates them. */
|
|
66403
|
+
defaults: array(NcTemplateDefaultSchema)
|
|
66404
|
+
})), method(NcTemplatePreviewInputSchema, NcTemplatePreviewSchema, {
|
|
66124
66405
|
kind: "mutation",
|
|
66125
66406
|
access: "view"
|
|
66126
66407
|
}), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" }), method(object({}), NcRuleLastRunsSchema, { auth: "admin" }), method(object({ artifactId: string().min(1) }), object({ url: string().nullable() }), { auth: "admin" }), method(object({}), object({ snoozes: array(NcSnoozeSchema) }), { caller: "required" }), method(object({ snooze: NcSnoozeInputSchema }), object({ snooze: NcSnoozeSchema }), {
|
|
@@ -66868,52 +67149,27 @@ object({
|
|
|
66868
67149
|
empty: boolean().nullable(),
|
|
66869
67150
|
/** True while the pump is running. Null while unknown. */
|
|
66870
67151
|
pumpRunning: boolean().nullable(),
|
|
66871
|
-
/** True when the pump works on an on/off duty cycle rather than continuously. */
|
|
66872
|
-
pumpIntervalEnabled: boolean().nullable(),
|
|
66873
|
-
/** How long the pump runs per cycle, in seconds. */
|
|
66874
|
-
pumpOnTime: number().min(0).nullable().meta(readingMeta("duration")),
|
|
66875
|
-
/** How long the pump rests per cycle, in seconds. */
|
|
66876
|
-
pumpOffTime: number().min(0).nullable().meta(readingMeta("duration")),
|
|
66877
67152
|
/** Water drunk in the last drink, in litres. */
|
|
66878
67153
|
lastDrink: number().min(0).nullable().meta(readingMeta("volume")),
|
|
66879
67154
|
/** Water drunk in the current hour, in litres. */
|
|
66880
67155
|
currentHourDrink: number().min(0).nullable().meta(readingMeta("volume")),
|
|
66881
67156
|
/** Water drunk over the last 24 hours (rolling), in litres. */
|
|
66882
67157
|
last24hDrink: number().min(0).nullable().meta(readingMeta("volume")),
|
|
66883
|
-
/** Water drunk since local midnight, in litres. */
|
|
67158
|
+
/** Water drunk since local midnight, in litres. Null when the fountain has no such sensor. */
|
|
66884
67159
|
todayDrink: number().min(0).nullable().meta(readingMeta("volume")),
|
|
66885
67160
|
/** Decoded fault message. Null means healthy; a non-null string is an active fault. */
|
|
66886
67161
|
error: string().nullable(),
|
|
66887
67162
|
/** Ms epoch when the slice was last refreshed. */
|
|
66888
67163
|
lastFetchedAt: number()
|
|
66889
67164
|
});
|
|
66890
|
-
var DeviceIdSchema = number().int().nonnegative();
|
|
66891
|
-
var MinutesSchema = number().int().min(0);
|
|
67165
|
+
var DeviceIdSchema$1 = number().int().nonnegative();
|
|
66892
67166
|
DeviceType.PetFountain, method(object({
|
|
66893
|
-
deviceId: DeviceIdSchema,
|
|
66894
|
-
on: boolean()
|
|
66895
|
-
}), _void(), {
|
|
66896
|
-
kind: "mutation",
|
|
66897
|
-
auth: "protected"
|
|
66898
|
-
}), method(object({
|
|
66899
|
-
deviceId: DeviceIdSchema,
|
|
67167
|
+
deviceId: DeviceIdSchema$1,
|
|
66900
67168
|
on: boolean()
|
|
66901
67169
|
}), _void(), {
|
|
66902
67170
|
kind: "mutation",
|
|
66903
67171
|
auth: "protected"
|
|
66904
|
-
}), method(object({
|
|
66905
|
-
deviceId: DeviceIdSchema,
|
|
66906
|
-
minutes: MinutesSchema
|
|
66907
|
-
}), _void(), {
|
|
66908
|
-
kind: "mutation",
|
|
66909
|
-
auth: "protected"
|
|
66910
|
-
}), method(object({
|
|
66911
|
-
deviceId: DeviceIdSchema,
|
|
66912
|
-
minutes: MinutesSchema
|
|
66913
|
-
}), _void(), {
|
|
66914
|
-
kind: "mutation",
|
|
66915
|
-
auth: "protected"
|
|
66916
|
-
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
67172
|
+
}), method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
|
|
66917
67173
|
kind: "mutation",
|
|
66918
67174
|
auth: "protected"
|
|
66919
67175
|
});
|
|
@@ -70068,6 +70324,37 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
|
|
|
70068
70324
|
deviceId: number(),
|
|
70069
70325
|
status: PtzAutotrackStatusSchema
|
|
70070
70326
|
});
|
|
70327
|
+
object({
|
|
70328
|
+
/** True when the pump works on the on/off cycle, false when it runs continuously. Null while unknown. */
|
|
70329
|
+
enabled: boolean().nullable(),
|
|
70330
|
+
/** How long the pump runs per cycle, in seconds. Null while unknown. */
|
|
70331
|
+
onTime: number().min(0).nullable().meta(readingMeta("duration")),
|
|
70332
|
+
/** How long the pump rests per cycle, in seconds. Null while unknown. */
|
|
70333
|
+
offTime: number().min(0).nullable().meta(readingMeta("duration")),
|
|
70334
|
+
/** Ms epoch when the slice was last refreshed. */
|
|
70335
|
+
lastFetchedAt: number()
|
|
70336
|
+
});
|
|
70337
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
70338
|
+
var MinutesSchema = number().int().min(0);
|
|
70339
|
+
DeviceType.PetFountain, method(object({
|
|
70340
|
+
deviceId: DeviceIdSchema,
|
|
70341
|
+
on: boolean()
|
|
70342
|
+
}), _void(), {
|
|
70343
|
+
kind: "mutation",
|
|
70344
|
+
auth: "protected"
|
|
70345
|
+
}), method(object({
|
|
70346
|
+
deviceId: DeviceIdSchema,
|
|
70347
|
+
minutes: MinutesSchema
|
|
70348
|
+
}), _void(), {
|
|
70349
|
+
kind: "mutation",
|
|
70350
|
+
auth: "protected"
|
|
70351
|
+
}), method(object({
|
|
70352
|
+
deviceId: DeviceIdSchema,
|
|
70353
|
+
minutes: MinutesSchema
|
|
70354
|
+
}), _void(), {
|
|
70355
|
+
kind: "mutation",
|
|
70356
|
+
auth: "protected"
|
|
70357
|
+
});
|
|
70071
70358
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, DeviceType.Gateway, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
70072
70359
|
kind: "mutation",
|
|
70073
70360
|
auth: "admin"
|
|
@@ -73770,7 +74057,16 @@ DeviceType.Sensor;
|
|
|
73770
74057
|
* future fields without breaking the existing call sites.
|
|
73771
74058
|
*/
|
|
73772
74059
|
var EmailAddressSchema = email();
|
|
74060
|
+
/**
|
|
74061
|
+
* Which relay of a multi-relay provider answers (D996). Absent = the provider's first / default
|
|
74062
|
+
* relay, so a caller written before relays existed keeps working unchanged. A provider with one
|
|
74063
|
+
* fixed relay ignores it. This is the integration instance id (`int_NNNN`), NOT the addon id: the
|
|
74064
|
+
* collection pin `addonId` still picks the provider, `instanceId` picks the relay inside it.
|
|
74065
|
+
*/
|
|
74066
|
+
var InstanceIdSchema = string().min(1).optional();
|
|
74067
|
+
var RelayPinSchema = object({ instanceId: InstanceIdSchema });
|
|
73773
74068
|
var SendEmailInputSchema = object({
|
|
74069
|
+
instanceId: InstanceIdSchema,
|
|
73774
74070
|
to: union([EmailAddressSchema, array(EmailAddressSchema).min(1)]),
|
|
73775
74071
|
cc: array(EmailAddressSchema).optional(),
|
|
73776
74072
|
bcc: array(EmailAddressSchema).optional(),
|
|
@@ -73806,11 +74102,11 @@ method(SendEmailInputSchema, SendEmailResultSchema, {
|
|
|
73806
74102
|
kind: "mutation",
|
|
73807
74103
|
auth: "admin",
|
|
73808
74104
|
access: "create"
|
|
73809
|
-
}), method(
|
|
74105
|
+
}), method(RelayPinSchema, SmtpStatusSchema, {
|
|
73810
74106
|
kind: "mutation",
|
|
73811
74107
|
auth: "admin",
|
|
73812
74108
|
access: "view"
|
|
73813
|
-
}), method(
|
|
74109
|
+
}), method(RelayPinSchema, SmtpStatusSchema, { auth: "admin" });
|
|
73814
74110
|
/**
|
|
73815
74111
|
* A single device snapshot returned as base64 JPEG/PNG.
|
|
73816
74112
|
*
|
|
@@ -73842,10 +74138,12 @@ DeviceType.Camera, method(object({
|
|
|
73842
74138
|
* even when the cache is well within the device's
|
|
73843
74139
|
* `snapshotMaxAgeS` window.
|
|
73844
74140
|
*
|
|
73845
|
-
* **`force` is
|
|
74141
|
+
* **`force` is a demand with a named principal, not a freshness
|
|
74142
|
+
* preference** — an operator button, the scheduled refresh (D847), or a
|
|
74143
|
+
* notification rule that left the camera's wake allowed (D998). On a
|
|
73846
74144
|
* battery camera it is the one thing that walks past the wrapper's
|
|
73847
|
-
* sleep gate and wakes the camera, so a
|
|
73848
|
-
*
|
|
74145
|
+
* sleep gate and wakes the camera, so a poller, a thumbnail or a
|
|
74146
|
+
* prestream must NEVER set it. Every such caller
|
|
73849
74147
|
* gets the cached frame, which on a sleeping battery camera is the
|
|
73850
74148
|
* correct answer: stale but honest beats woken.
|
|
73851
74149
|
*/
|
|
@@ -77863,7 +78161,7 @@ discriminatedUnion("kind", [object({
|
|
|
77863
78161
|
kind: literal("pronto"),
|
|
77864
78162
|
code: string()
|
|
77865
78163
|
})]);
|
|
77866
|
-
DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
|
|
78164
|
+
DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverStoppable, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
|
|
77867
78165
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
77868
78166
|
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
77869
78167
|
DeviceRole.BinarySensor, DeviceRole.MotionSensor;
|
|
@@ -78844,6 +79142,27 @@ Object.freeze({
|
|
|
78844
79142
|
access: "view",
|
|
78845
79143
|
role: "viewer"
|
|
78846
79144
|
},
|
|
79145
|
+
"boardKeySource.getBoardKey": {
|
|
79146
|
+
capName: "board-key-source",
|
|
79147
|
+
capScope: "system",
|
|
79148
|
+
addonId: null,
|
|
79149
|
+
access: "view",
|
|
79150
|
+
role: "admin"
|
|
79151
|
+
},
|
|
79152
|
+
"boardKeySource.listBoards": {
|
|
79153
|
+
capName: "board-key-source",
|
|
79154
|
+
capScope: "system",
|
|
79155
|
+
addonId: null,
|
|
79156
|
+
access: "view",
|
|
79157
|
+
role: "admin"
|
|
79158
|
+
},
|
|
79159
|
+
"boardKeySource.listSources": {
|
|
79160
|
+
capName: "board-key-source",
|
|
79161
|
+
capScope: "system",
|
|
79162
|
+
addonId: null,
|
|
79163
|
+
access: "view",
|
|
79164
|
+
role: "admin"
|
|
79165
|
+
},
|
|
78847
79166
|
"brightness.getStatus": {
|
|
78848
79167
|
capName: "brightness",
|
|
78849
79168
|
capScope: "device",
|
|
@@ -81483,6 +81802,69 @@ Object.freeze({
|
|
|
81483
81802
|
access: "create",
|
|
81484
81803
|
role: "admin"
|
|
81485
81804
|
},
|
|
81805
|
+
"integrationInstances.createInstance": {
|
|
81806
|
+
capName: "integration-instances",
|
|
81807
|
+
capScope: "system",
|
|
81808
|
+
addonId: null,
|
|
81809
|
+
access: "create",
|
|
81810
|
+
role: "admin"
|
|
81811
|
+
},
|
|
81812
|
+
"integrationInstances.deleteInstance": {
|
|
81813
|
+
capName: "integration-instances",
|
|
81814
|
+
capScope: "system",
|
|
81815
|
+
addonId: null,
|
|
81816
|
+
access: "delete",
|
|
81817
|
+
role: "admin"
|
|
81818
|
+
},
|
|
81819
|
+
"integrationInstances.describe": {
|
|
81820
|
+
capName: "integration-instances",
|
|
81821
|
+
capScope: "system",
|
|
81822
|
+
addonId: null,
|
|
81823
|
+
access: "view",
|
|
81824
|
+
role: "admin"
|
|
81825
|
+
},
|
|
81826
|
+
"integrationInstances.getInstance": {
|
|
81827
|
+
capName: "integration-instances",
|
|
81828
|
+
capScope: "system",
|
|
81829
|
+
addonId: null,
|
|
81830
|
+
access: "view",
|
|
81831
|
+
role: "admin"
|
|
81832
|
+
},
|
|
81833
|
+
"integrationInstances.instanceFormSchema": {
|
|
81834
|
+
capName: "integration-instances",
|
|
81835
|
+
capScope: "system",
|
|
81836
|
+
addonId: null,
|
|
81837
|
+
access: "view",
|
|
81838
|
+
role: "admin"
|
|
81839
|
+
},
|
|
81840
|
+
"integrationInstances.listInstances": {
|
|
81841
|
+
capName: "integration-instances",
|
|
81842
|
+
capScope: "system",
|
|
81843
|
+
addonId: null,
|
|
81844
|
+
access: "view",
|
|
81845
|
+
role: "admin"
|
|
81846
|
+
},
|
|
81847
|
+
"integrationInstances.setInstanceEnabled": {
|
|
81848
|
+
capName: "integration-instances",
|
|
81849
|
+
capScope: "system",
|
|
81850
|
+
addonId: null,
|
|
81851
|
+
access: "create",
|
|
81852
|
+
role: "admin"
|
|
81853
|
+
},
|
|
81854
|
+
"integrationInstances.testInstance": {
|
|
81855
|
+
capName: "integration-instances",
|
|
81856
|
+
capScope: "system",
|
|
81857
|
+
addonId: null,
|
|
81858
|
+
access: "create",
|
|
81859
|
+
role: "admin"
|
|
81860
|
+
},
|
|
81861
|
+
"integrationInstances.updateInstance": {
|
|
81862
|
+
capName: "integration-instances",
|
|
81863
|
+
capScope: "system",
|
|
81864
|
+
addonId: null,
|
|
81865
|
+
access: "create",
|
|
81866
|
+
role: "admin"
|
|
81867
|
+
},
|
|
81486
81868
|
"integrations.create": {
|
|
81487
81869
|
capName: "integrations",
|
|
81488
81870
|
capScope: "system",
|
|
@@ -83604,27 +83986,6 @@ Object.freeze({
|
|
|
83604
83986
|
access: "create",
|
|
83605
83987
|
role: "viewer"
|
|
83606
83988
|
},
|
|
83607
|
-
"petFountain.setPumpInterval": {
|
|
83608
|
-
capName: "pet-fountain",
|
|
83609
|
-
capScope: "device",
|
|
83610
|
-
addonId: null,
|
|
83611
|
-
access: "create",
|
|
83612
|
-
role: "viewer"
|
|
83613
|
-
},
|
|
83614
|
-
"petFountain.setPumpOffMinutes": {
|
|
83615
|
-
capName: "pet-fountain",
|
|
83616
|
-
capScope: "device",
|
|
83617
|
-
addonId: null,
|
|
83618
|
-
access: "create",
|
|
83619
|
-
role: "viewer"
|
|
83620
|
-
},
|
|
83621
|
-
"petFountain.setPumpOnMinutes": {
|
|
83622
|
-
capName: "pet-fountain",
|
|
83623
|
-
capScope: "device",
|
|
83624
|
-
addonId: null,
|
|
83625
|
-
access: "create",
|
|
83626
|
-
role: "viewer"
|
|
83627
|
-
},
|
|
83628
83989
|
"pipelineAnalytics.addRetrainFrameFromRecording": {
|
|
83629
83990
|
capName: "pipeline-analytics",
|
|
83630
83991
|
capScope: "device",
|
|
@@ -85403,6 +85764,34 @@ Object.freeze({
|
|
|
85403
85764
|
access: "create",
|
|
85404
85765
|
role: "admin"
|
|
85405
85766
|
},
|
|
85767
|
+
"pumpCycle.getStatus": {
|
|
85768
|
+
capName: "pump-cycle",
|
|
85769
|
+
capScope: "device",
|
|
85770
|
+
addonId: null,
|
|
85771
|
+
access: "view",
|
|
85772
|
+
role: "viewer"
|
|
85773
|
+
},
|
|
85774
|
+
"pumpCycle.setEnabled": {
|
|
85775
|
+
capName: "pump-cycle",
|
|
85776
|
+
capScope: "device",
|
|
85777
|
+
addonId: null,
|
|
85778
|
+
access: "create",
|
|
85779
|
+
role: "viewer"
|
|
85780
|
+
},
|
|
85781
|
+
"pumpCycle.setOffMinutes": {
|
|
85782
|
+
capName: "pump-cycle",
|
|
85783
|
+
capScope: "device",
|
|
85784
|
+
addonId: null,
|
|
85785
|
+
access: "create",
|
|
85786
|
+
role: "viewer"
|
|
85787
|
+
},
|
|
85788
|
+
"pumpCycle.setOnMinutes": {
|
|
85789
|
+
capName: "pump-cycle",
|
|
85790
|
+
capScope: "device",
|
|
85791
|
+
addonId: null,
|
|
85792
|
+
access: "create",
|
|
85793
|
+
role: "viewer"
|
|
85794
|
+
},
|
|
85406
85795
|
"reboot.reboot": {
|
|
85407
85796
|
capName: "reboot",
|
|
85408
85797
|
capScope: "device",
|
|
@@ -89975,21 +90364,6 @@ Object.freeze({
|
|
|
89975
90364
|
form: "single",
|
|
89976
90365
|
optional: false
|
|
89977
90366
|
}],
|
|
89978
|
-
"petFountain.setPumpInterval": [{
|
|
89979
|
-
name: "deviceId",
|
|
89980
|
-
form: "single",
|
|
89981
|
-
optional: false
|
|
89982
|
-
}],
|
|
89983
|
-
"petFountain.setPumpOffMinutes": [{
|
|
89984
|
-
name: "deviceId",
|
|
89985
|
-
form: "single",
|
|
89986
|
-
optional: false
|
|
89987
|
-
}],
|
|
89988
|
-
"petFountain.setPumpOnMinutes": [{
|
|
89989
|
-
name: "deviceId",
|
|
89990
|
-
form: "single",
|
|
89991
|
-
optional: false
|
|
89992
|
-
}],
|
|
89993
90367
|
"pipelineAnalytics.addRetrainFrameFromRecording": [{
|
|
89994
90368
|
name: "deviceId",
|
|
89995
90369
|
form: "single",
|
|
@@ -90625,6 +90999,26 @@ Object.freeze({
|
|
|
90625
90999
|
form: "single",
|
|
90626
91000
|
optional: false
|
|
90627
91001
|
}],
|
|
91002
|
+
"pumpCycle.getStatus": [{
|
|
91003
|
+
name: "deviceId",
|
|
91004
|
+
form: "single",
|
|
91005
|
+
optional: false
|
|
91006
|
+
}],
|
|
91007
|
+
"pumpCycle.setEnabled": [{
|
|
91008
|
+
name: "deviceId",
|
|
91009
|
+
form: "single",
|
|
91010
|
+
optional: false
|
|
91011
|
+
}],
|
|
91012
|
+
"pumpCycle.setOffMinutes": [{
|
|
91013
|
+
name: "deviceId",
|
|
91014
|
+
form: "single",
|
|
91015
|
+
optional: false
|
|
91016
|
+
}],
|
|
91017
|
+
"pumpCycle.setOnMinutes": [{
|
|
91018
|
+
name: "deviceId",
|
|
91019
|
+
form: "single",
|
|
91020
|
+
optional: false
|
|
91021
|
+
}],
|
|
90628
91022
|
"reboot.reboot": [{
|
|
90629
91023
|
name: "deviceId",
|
|
90630
91024
|
form: "single",
|
|
@@ -108506,12 +108900,21 @@ var EARLY_LOOK_REASON = "occupancy-sustain-look";
|
|
|
108506
108900
|
/** Past the sustain's end: the burst's frames must reach the watcher AFTER
|
|
108507
108901
|
* the window, and a dial takes a moment. */
|
|
108508
108902
|
var EARLY_LOOK_MARGIN_MS = 2e3;
|
|
108509
|
-
|
|
108510
|
-
|
|
108511
|
-
|
|
108903
|
+
function burstVerdict(burst) {
|
|
108904
|
+
if (burst.found) return "found";
|
|
108905
|
+
return burst.results > 0 ? "empty" : "no-verdict";
|
|
108906
|
+
}
|
|
108907
|
+
/** A found burst resets the streak; two consecutive empty ones disarm; a
|
|
108908
|
+
* burst without a verdict changes nothing. */
|
|
108909
|
+
function foldBurstOutcome(streak, verdict) {
|
|
108910
|
+
if (verdict === "found") return {
|
|
108512
108911
|
emptyStreak: 0,
|
|
108513
108912
|
armed: true
|
|
108514
108913
|
};
|
|
108914
|
+
if (verdict === "no-verdict") return {
|
|
108915
|
+
emptyStreak: streak.emptyStreak,
|
|
108916
|
+
armed: true
|
|
108917
|
+
};
|
|
108515
108918
|
const emptyStreak = streak.emptyStreak + 1;
|
|
108516
108919
|
return {
|
|
108517
108920
|
emptyStreak,
|
|
@@ -108586,10 +108989,12 @@ var OccupancyRecheckController = class {
|
|
|
108586
108989
|
}
|
|
108587
108990
|
/** Every inference result the orchestrator sees; a burst result with
|
|
108588
108991
|
* detections is what makes a burst "found". */
|
|
108589
|
-
noteInferenceResult(deviceId, occasion, detectionCount) {
|
|
108992
|
+
noteInferenceResult(deviceId, occasion, detectionCount, shed = false) {
|
|
108590
108993
|
const state = this.devices.get(deviceId);
|
|
108591
108994
|
if (state === void 0 || state.burst === null) return;
|
|
108592
|
-
if (occasion
|
|
108995
|
+
if (occasion !== "burst" || shed) return;
|
|
108996
|
+
state.burst.results += 1;
|
|
108997
|
+
if (detectionCount > 0) state.burst.found = true;
|
|
108593
108998
|
}
|
|
108594
108999
|
/**
|
|
108595
109000
|
* An occupancy flip is pending on this camera and can commit `afterMs` from
|
|
@@ -108799,7 +109204,8 @@ var OccupancyRecheckController = class {
|
|
|
108799
109204
|
const burst = {
|
|
108800
109205
|
nodeId,
|
|
108801
109206
|
superseded: false,
|
|
108802
|
-
found: false
|
|
109207
|
+
found: false,
|
|
109208
|
+
results: 0
|
|
108803
109209
|
};
|
|
108804
109210
|
state.burst = burst;
|
|
108805
109211
|
try {
|
|
@@ -108879,10 +109285,12 @@ var OccupancyRecheckController = class {
|
|
|
108879
109285
|
}
|
|
108880
109286
|
async settle(deviceId, state, burst) {
|
|
108881
109287
|
await this.release(deviceId, state, burst);
|
|
108882
|
-
const
|
|
109288
|
+
const verdict = burstVerdict(burst);
|
|
109289
|
+
const fold = foldBurstOutcome({ emptyStreak: state.emptyStreak }, verdict);
|
|
108883
109290
|
state.emptyStreak = fold.emptyStreak;
|
|
108884
109291
|
state.armed = fold.armed;
|
|
108885
|
-
|
|
109292
|
+
const message = verdict === "no-verdict" ? "occupancy recheck: burst complete — no verdict, streak unchanged" : "occupancy recheck: burst complete";
|
|
109293
|
+
this.deps.logger.info(message, {
|
|
108886
109294
|
tags: {
|
|
108887
109295
|
deviceId,
|
|
108888
109296
|
nodeId: burst.nodeId
|
|
@@ -108891,6 +109299,8 @@ var OccupancyRecheckController = class {
|
|
|
108891
109299
|
deviceId,
|
|
108892
109300
|
nodeId: burst.nodeId,
|
|
108893
109301
|
found: burst.found,
|
|
109302
|
+
verdict,
|
|
109303
|
+
results: burst.results,
|
|
108894
109304
|
emptyStreak: fold.emptyStreak,
|
|
108895
109305
|
armed: fold.armed,
|
|
108896
109306
|
superseded: burst.superseded
|
|
@@ -109540,8 +109950,8 @@ var SessionDispatchController = class {
|
|
|
109540
109950
|
* Every inference result the orchestrator sees, for the recheck's
|
|
109541
109951
|
* found/empty verdict: a `'burst'` result with detections is a found burst.
|
|
109542
109952
|
*/
|
|
109543
|
-
noteInferenceResult(deviceId, occasion, detectionCount) {
|
|
109544
|
-
this.recheck?.noteInferenceResult(deviceId, occasion, detectionCount);
|
|
109953
|
+
noteInferenceResult(deviceId, occasion, detectionCount, shed = false) {
|
|
109954
|
+
this.recheck?.noteInferenceResult(deviceId, occasion, detectionCount, shed);
|
|
109545
109955
|
}
|
|
109546
109956
|
/**
|
|
109547
109957
|
* Placement changed — this controller just attached or detached something, so
|
|
@@ -111905,7 +112315,7 @@ async function buildOrchestratorControllers(deps) {
|
|
|
111905
112315
|
handleSettingsChanged: (deviceId) => deps.handleSettingsChanged(deviceId),
|
|
111906
112316
|
handlePipelineCameraUpdated: (deviceId, config) => deps.handlePipelineCameraUpdated(deviceId, config),
|
|
111907
112317
|
handleInferenceResult: (payload) => {
|
|
111908
|
-
session.noteInferenceResult(payload.deviceId, payload.occasion, payload.frame.detections?.length ?? 0);
|
|
112318
|
+
session.noteInferenceResult(payload.deviceId, payload.occasion, payload.frame.detections?.length ?? 0, payload.frame.shed === true);
|
|
111909
112319
|
return deps.handleInferenceResult(payload);
|
|
111910
112320
|
},
|
|
111911
112321
|
noteMetrics: (deviceId, nodeId, metrics) => {
|