@camstack/addon-post-analysis 1.2.374 → 1.2.602
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/dist/{clip-model-registry-BRzN2GzR.js → clip-model-registry-D0-VNIW5.js} +732 -34
- package/dist/{clip-model-registry-BIJ0ZD7t.mjs → clip-model-registry-lQ7QWjLf.mjs} +703 -35
- package/dist/embedding-encoder/index.js +1 -1
- package/dist/embedding-encoder/index.mjs +1 -1
- package/dist/pipeline-analytics/_stub.js +2 -2
- package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-BYu-s1rf.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-BPA0T5-F.mjs} +3 -3
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-1AlitJg2.mjs +26 -0
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Cfj8Mv5X.mjs +26 -0
- package/dist/pipeline-analytics/{hostInit-DEl2xA0o.mjs → hostInit-DIjMiIYW.mjs} +3 -3
- package/dist/pipeline-analytics/index.js +79959 -79565
- package/dist/pipeline-analytics/index.mjs +79814 -79420
- package/dist/pipeline-analytics/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Ds_wGoAi.mjs +0 -26
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BjCURGur.mjs +0 -26
|
@@ -4168,6 +4168,12 @@ var numberProcessor = (schema, ctx, _json, _params) => {
|
|
|
4168
4168
|
var booleanProcessor = (_schema, _ctx, json, _params) => {
|
|
4169
4169
|
json.type = "boolean";
|
|
4170
4170
|
};
|
|
4171
|
+
var bigintProcessor = (_schema, ctx, _json, _params) => {
|
|
4172
|
+
if (ctx.unrepresentable === "throw") throw new Error("BigInt cannot be represented in JSON Schema");
|
|
4173
|
+
};
|
|
4174
|
+
var symbolProcessor = (_schema, ctx, _json, _params) => {
|
|
4175
|
+
if (ctx.unrepresentable === "throw") throw new Error("Symbols cannot be represented in JSON Schema");
|
|
4176
|
+
};
|
|
4171
4177
|
var nullProcessor = (_schema, ctx, json, _params) => {
|
|
4172
4178
|
if (ctx.target === "openapi-3.0") {
|
|
4173
4179
|
json.type = "string";
|
|
@@ -4175,12 +4181,17 @@ var nullProcessor = (_schema, ctx, json, _params) => {
|
|
|
4175
4181
|
json.enum = [null];
|
|
4176
4182
|
} else json.type = "null";
|
|
4177
4183
|
};
|
|
4184
|
+
var undefinedProcessor = (_schema, ctx, _json, _params) => {
|
|
4185
|
+
if (ctx.unrepresentable === "throw") throw new Error("Undefined cannot be represented in JSON Schema");
|
|
4186
|
+
};
|
|
4178
4187
|
var voidProcessor = (_schema, ctx, _json, _params) => {
|
|
4179
4188
|
if (ctx.unrepresentable === "throw") throw new Error("Void cannot be represented in JSON Schema");
|
|
4180
4189
|
};
|
|
4181
4190
|
var neverProcessor = (_schema, _ctx, json, _params) => {
|
|
4182
4191
|
json.not = {};
|
|
4183
4192
|
};
|
|
4193
|
+
var anyProcessor = (_schema, _ctx, _json, _params) => {};
|
|
4194
|
+
var unknownProcessor = (_schema, _ctx, _json, _params) => {};
|
|
4184
4195
|
var dateProcessor = (_schema, ctx, _json, _params) => {
|
|
4185
4196
|
if (ctx.unrepresentable === "throw") throw new Error("Date cannot be represented in JSON Schema");
|
|
4186
4197
|
};
|
|
@@ -4212,6 +4223,9 @@ var literalProcessor = (schema, ctx, json, _params) => {
|
|
|
4212
4223
|
json.enum = vals;
|
|
4213
4224
|
}
|
|
4214
4225
|
};
|
|
4226
|
+
var nanProcessor = (_schema, ctx, _json, _params) => {
|
|
4227
|
+
if (ctx.unrepresentable === "throw") throw new Error("NaN cannot be represented in JSON Schema");
|
|
4228
|
+
};
|
|
4215
4229
|
var templateLiteralProcessor = (schema, _ctx, json, _params) => {
|
|
4216
4230
|
const _json = json;
|
|
4217
4231
|
const pattern = schema._zod.pattern;
|
|
@@ -4219,12 +4233,43 @@ var templateLiteralProcessor = (schema, _ctx, json, _params) => {
|
|
|
4219
4233
|
_json.type = "string";
|
|
4220
4234
|
_json.pattern = pattern.source;
|
|
4221
4235
|
};
|
|
4236
|
+
var fileProcessor = (schema, _ctx, json, _params) => {
|
|
4237
|
+
const _json = json;
|
|
4238
|
+
const file = {
|
|
4239
|
+
type: "string",
|
|
4240
|
+
format: "binary",
|
|
4241
|
+
contentEncoding: "binary"
|
|
4242
|
+
};
|
|
4243
|
+
const { minimum, maximum, mime } = schema._zod.bag;
|
|
4244
|
+
if (minimum !== void 0) file.minLength = minimum;
|
|
4245
|
+
if (maximum !== void 0) file.maxLength = maximum;
|
|
4246
|
+
if (mime) if (mime.length === 1) {
|
|
4247
|
+
file.contentMediaType = mime[0];
|
|
4248
|
+
Object.assign(_json, file);
|
|
4249
|
+
} else {
|
|
4250
|
+
Object.assign(_json, file);
|
|
4251
|
+
_json.anyOf = mime.map((m) => ({ contentMediaType: m }));
|
|
4252
|
+
}
|
|
4253
|
+
else Object.assign(_json, file);
|
|
4254
|
+
};
|
|
4255
|
+
var successProcessor = (_schema, _ctx, json, _params) => {
|
|
4256
|
+
json.type = "boolean";
|
|
4257
|
+
};
|
|
4222
4258
|
var customProcessor = (_schema, ctx, _json, _params) => {
|
|
4223
4259
|
if (ctx.unrepresentable === "throw") throw new Error("Custom types cannot be represented in JSON Schema");
|
|
4224
4260
|
};
|
|
4261
|
+
var functionProcessor = (_schema, ctx, _json, _params) => {
|
|
4262
|
+
if (ctx.unrepresentable === "throw") throw new Error("Function types cannot be represented in JSON Schema");
|
|
4263
|
+
};
|
|
4225
4264
|
var transformProcessor = (_schema, ctx, _json, _params) => {
|
|
4226
4265
|
if (ctx.unrepresentable === "throw") throw new Error("Transforms cannot be represented in JSON Schema");
|
|
4227
4266
|
};
|
|
4267
|
+
var mapProcessor = (_schema, ctx, _json, _params) => {
|
|
4268
|
+
if (ctx.unrepresentable === "throw") throw new Error("Map cannot be represented in JSON Schema");
|
|
4269
|
+
};
|
|
4270
|
+
var setProcessor = (_schema, ctx, _json, _params) => {
|
|
4271
|
+
if (ctx.unrepresentable === "throw") throw new Error("Set cannot be represented in JSON Schema");
|
|
4272
|
+
};
|
|
4228
4273
|
var arrayProcessor = (schema, ctx, _json, params) => {
|
|
4229
4274
|
const json = _json;
|
|
4230
4275
|
const def = schema._zod.def;
|
|
@@ -4429,6 +4474,12 @@ var readonlyProcessor = (schema, ctx, json, params) => {
|
|
|
4429
4474
|
seen.ref = def.innerType;
|
|
4430
4475
|
json.readOnly = true;
|
|
4431
4476
|
};
|
|
4477
|
+
var promiseProcessor = (schema, ctx, _json, params) => {
|
|
4478
|
+
const def = schema._zod.def;
|
|
4479
|
+
process(def.innerType, ctx, params);
|
|
4480
|
+
const seen = ctx.seen.get(schema);
|
|
4481
|
+
seen.ref = def.innerType;
|
|
4482
|
+
};
|
|
4432
4483
|
var optionalProcessor = (schema, ctx, _json, params) => {
|
|
4433
4484
|
const def = schema._zod.def;
|
|
4434
4485
|
process(def.innerType, ctx, params);
|
|
@@ -4441,6 +4492,81 @@ var lazyProcessor = (schema, ctx, _json, params) => {
|
|
|
4441
4492
|
const seen = ctx.seen.get(schema);
|
|
4442
4493
|
seen.ref = innerType;
|
|
4443
4494
|
};
|
|
4495
|
+
var allProcessors = {
|
|
4496
|
+
string: stringProcessor,
|
|
4497
|
+
number: numberProcessor,
|
|
4498
|
+
boolean: booleanProcessor,
|
|
4499
|
+
bigint: bigintProcessor,
|
|
4500
|
+
symbol: symbolProcessor,
|
|
4501
|
+
null: nullProcessor,
|
|
4502
|
+
undefined: undefinedProcessor,
|
|
4503
|
+
void: voidProcessor,
|
|
4504
|
+
never: neverProcessor,
|
|
4505
|
+
any: anyProcessor,
|
|
4506
|
+
unknown: unknownProcessor,
|
|
4507
|
+
date: dateProcessor,
|
|
4508
|
+
enum: enumProcessor,
|
|
4509
|
+
literal: literalProcessor,
|
|
4510
|
+
nan: nanProcessor,
|
|
4511
|
+
template_literal: templateLiteralProcessor,
|
|
4512
|
+
file: fileProcessor,
|
|
4513
|
+
success: successProcessor,
|
|
4514
|
+
custom: customProcessor,
|
|
4515
|
+
function: functionProcessor,
|
|
4516
|
+
transform: transformProcessor,
|
|
4517
|
+
map: mapProcessor,
|
|
4518
|
+
set: setProcessor,
|
|
4519
|
+
array: arrayProcessor,
|
|
4520
|
+
object: objectProcessor,
|
|
4521
|
+
union: unionProcessor,
|
|
4522
|
+
intersection: intersectionProcessor,
|
|
4523
|
+
tuple: tupleProcessor,
|
|
4524
|
+
record: recordProcessor,
|
|
4525
|
+
nullable: nullableProcessor,
|
|
4526
|
+
nonoptional: nonoptionalProcessor,
|
|
4527
|
+
default: defaultProcessor,
|
|
4528
|
+
prefault: prefaultProcessor,
|
|
4529
|
+
catch: catchProcessor,
|
|
4530
|
+
pipe: pipeProcessor,
|
|
4531
|
+
readonly: readonlyProcessor,
|
|
4532
|
+
promise: promiseProcessor,
|
|
4533
|
+
optional: optionalProcessor,
|
|
4534
|
+
lazy: lazyProcessor
|
|
4535
|
+
};
|
|
4536
|
+
function toJSONSchema(input, params) {
|
|
4537
|
+
if ("_idmap" in input) {
|
|
4538
|
+
const registry = input;
|
|
4539
|
+
const ctx = initializeContext({
|
|
4540
|
+
...params,
|
|
4541
|
+
processors: allProcessors
|
|
4542
|
+
});
|
|
4543
|
+
const defs = {};
|
|
4544
|
+
for (const entry of registry._idmap.entries()) {
|
|
4545
|
+
const [_, schema] = entry;
|
|
4546
|
+
process(schema, ctx);
|
|
4547
|
+
}
|
|
4548
|
+
const schemas = {};
|
|
4549
|
+
ctx.external = {
|
|
4550
|
+
registry,
|
|
4551
|
+
uri: params?.uri,
|
|
4552
|
+
defs
|
|
4553
|
+
};
|
|
4554
|
+
for (const entry of registry._idmap.entries()) {
|
|
4555
|
+
const [key, schema] = entry;
|
|
4556
|
+
extractDefs(ctx, schema);
|
|
4557
|
+
schemas[key] = finalize(ctx, schema);
|
|
4558
|
+
}
|
|
4559
|
+
if (Object.keys(defs).length > 0) schemas.__shared = { [ctx.target === "draft-2020-12" ? "$defs" : "definitions"]: defs };
|
|
4560
|
+
return { schemas };
|
|
4561
|
+
}
|
|
4562
|
+
const ctx = initializeContext({
|
|
4563
|
+
...params,
|
|
4564
|
+
processors: allProcessors
|
|
4565
|
+
});
|
|
4566
|
+
process(input, ctx);
|
|
4567
|
+
extractDefs(ctx, input);
|
|
4568
|
+
return finalize(ctx, input);
|
|
4569
|
+
}
|
|
4444
4570
|
//#endregion
|
|
4445
4571
|
//#region ../../node_modules/zod/v4/classic/iso.js
|
|
4446
4572
|
var ZodISODateTime = /*@__PURE__*/ $constructor("ZodISODateTime", (inst, def) => {
|
|
@@ -5477,7 +5603,7 @@ var ZodIssueCode = {
|
|
|
5477
5603
|
var ZodFirstPartyTypeKind;
|
|
5478
5604
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5479
5605
|
//#endregion
|
|
5480
|
-
//#region ../types/dist/sleep-
|
|
5606
|
+
//#region ../types/dist/sleep-BOjuyoPC.mjs
|
|
5481
5607
|
/**
|
|
5482
5608
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5483
5609
|
* window to float samples (D455).
|
|
@@ -5594,7 +5720,7 @@ function isKeychainStoredField(field) {
|
|
|
5594
5720
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5595
5721
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5596
5722
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5597
|
-
function isRecord$
|
|
5723
|
+
function isRecord$5(value) {
|
|
5598
5724
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5599
5725
|
}
|
|
5600
5726
|
function makeSecretMarker(ref) {
|
|
@@ -5605,12 +5731,12 @@ function makeSecretMarker(ref) {
|
|
|
5605
5731
|
}
|
|
5606
5732
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5607
5733
|
function isSecretMarker(value) {
|
|
5608
|
-
if (!isRecord$
|
|
5734
|
+
if (!isRecord$5(value)) return false;
|
|
5609
5735
|
const ref = value["$secret"];
|
|
5610
5736
|
return typeof ref === "string" && ref.length > 0;
|
|
5611
5737
|
}
|
|
5612
5738
|
function isSecretClear(value) {
|
|
5613
|
-
return isRecord$
|
|
5739
|
+
return isRecord$5(value) && value["$secretClear"] === true;
|
|
5614
5740
|
}
|
|
5615
5741
|
/**
|
|
5616
5742
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6220,7 +6346,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6220
6346
|
}
|
|
6221
6347
|
};
|
|
6222
6348
|
var KEEP = { kind: "keep" };
|
|
6223
|
-
function isRecord$
|
|
6349
|
+
function isRecord$4(value) {
|
|
6224
6350
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6225
6351
|
}
|
|
6226
6352
|
function defaultMintId() {
|
|
@@ -6233,7 +6359,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6233
6359
|
return out;
|
|
6234
6360
|
}
|
|
6235
6361
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6236
|
-
else if (isRecord$
|
|
6362
|
+
else if (isRecord$4(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6237
6363
|
return out;
|
|
6238
6364
|
}
|
|
6239
6365
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6288,7 +6414,7 @@ function rowId(row, idKey) {
|
|
|
6288
6414
|
return null;
|
|
6289
6415
|
}
|
|
6290
6416
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6291
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6417
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$4) : [];
|
|
6292
6418
|
if (!Array.isArray(incoming)) {
|
|
6293
6419
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6294
6420
|
return {
|
|
@@ -6304,7 +6430,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6304
6430
|
const kept = /* @__PURE__ */ new Set();
|
|
6305
6431
|
const rows = [];
|
|
6306
6432
|
for (const row of incoming) {
|
|
6307
|
-
if (!isRecord$
|
|
6433
|
+
if (!isRecord$4(row)) {
|
|
6308
6434
|
rows.push(row);
|
|
6309
6435
|
continue;
|
|
6310
6436
|
}
|
|
@@ -6329,7 +6455,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6329
6455
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6330
6456
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6331
6457
|
case "object": {
|
|
6332
|
-
if (!isRecord$
|
|
6458
|
+
if (!isRecord$4(incoming)) {
|
|
6333
6459
|
if (incoming === void 0) return KEEP;
|
|
6334
6460
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6335
6461
|
return {
|
|
@@ -6337,7 +6463,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6337
6463
|
value: incoming
|
|
6338
6464
|
};
|
|
6339
6465
|
}
|
|
6340
|
-
const storedObj = isRecord$
|
|
6466
|
+
const storedObj = isRecord$4(stored) ? stored : {};
|
|
6341
6467
|
return {
|
|
6342
6468
|
kind: "value",
|
|
6343
6469
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6460,7 +6586,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6460
6586
|
value: items
|
|
6461
6587
|
};
|
|
6462
6588
|
}
|
|
6463
|
-
if (isRecord$
|
|
6589
|
+
if (isRecord$4(v)) {
|
|
6464
6590
|
const out = {};
|
|
6465
6591
|
for (const [k, child] of Object.entries(v)) {
|
|
6466
6592
|
const s = substitute(child);
|
|
@@ -6492,7 +6618,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
6492
6618
|
this.name = "SecretOverwriteRefusedError";
|
|
6493
6619
|
}
|
|
6494
6620
|
};
|
|
6495
|
-
function isRecord$
|
|
6621
|
+
function isRecord$3(value) {
|
|
6496
6622
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6497
6623
|
}
|
|
6498
6624
|
function resolvedValue(pass, marker) {
|
|
@@ -6521,7 +6647,7 @@ function inArray(pass, incoming, stored) {
|
|
|
6521
6647
|
return incoming.map((item, index) => {
|
|
6522
6648
|
const twin = stored[index];
|
|
6523
6649
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6524
|
-
if (isRecord$
|
|
6650
|
+
if (isRecord$3(item) && isRecord$3(twin)) return inArrayRow(pass, item, twin);
|
|
6525
6651
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6526
6652
|
return item;
|
|
6527
6653
|
});
|
|
@@ -6532,7 +6658,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6532
6658
|
const twin = stored[key];
|
|
6533
6659
|
if (isSecretMarker(twin)) {
|
|
6534
6660
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6535
|
-
} else if (isRecord$
|
|
6661
|
+
} else if (isRecord$3(value) && isRecord$3(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6536
6662
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6537
6663
|
}
|
|
6538
6664
|
return out;
|
|
@@ -6540,7 +6666,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6540
6666
|
async function walk(pass, incoming, stored) {
|
|
6541
6667
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6542
6668
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6543
|
-
if (!isRecord$
|
|
6669
|
+
if (!isRecord$3(incoming) || !isRecord$3(stored)) return incoming;
|
|
6544
6670
|
const out = { ...incoming };
|
|
6545
6671
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6546
6672
|
return out;
|
|
@@ -6571,7 +6697,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
6571
6697
|
function isJsonEqual(a, b) {
|
|
6572
6698
|
if (Object.is(a, b)) return true;
|
|
6573
6699
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6574
|
-
if (isRecord$
|
|
6700
|
+
if (isRecord$3(a) && isRecord$3(b)) {
|
|
6575
6701
|
const keys = Object.keys(a);
|
|
6576
6702
|
if (keys.length !== Object.keys(b).length) return false;
|
|
6577
6703
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -6595,7 +6721,7 @@ function markerKeysOf(blob, owner) {
|
|
|
6595
6721
|
}
|
|
6596
6722
|
function nodeFromStored(value, owner) {
|
|
6597
6723
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6598
|
-
if (!isRecord$
|
|
6724
|
+
if (!isRecord$3(value)) return null;
|
|
6599
6725
|
const children = /* @__PURE__ */ new Map();
|
|
6600
6726
|
for (const [key, child] of Object.entries(value)) {
|
|
6601
6727
|
const node = nodeFromStored(child, owner);
|
|
@@ -7383,7 +7509,7 @@ var BaseAddon = class {
|
|
|
7383
7509
|
if (!ctx) return;
|
|
7384
7510
|
const addonId = ctx.id;
|
|
7385
7511
|
setImmediate(() => {
|
|
7386
|
-
ctx.api.addons
|
|
7512
|
+
ctx.api.addons.restartAddon.mutate({ addonId }).then(() => {
|
|
7387
7513
|
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
7388
7514
|
}).catch((err) => {
|
|
7389
7515
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
@@ -7892,8 +8018,39 @@ var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
|
|
|
7892
8018
|
var RECORD_MAX_DATA_BYTES = 1024 * 1024;
|
|
7893
8019
|
var RECORD_BATCH_MAX = 1e3;
|
|
7894
8020
|
var RECORD_QUERY_MAX = 1e3;
|
|
8021
|
+
/** A kind in the `settings` file may not bound itself above this (D447: high volume is `events`). */
|
|
8022
|
+
var RECORD_SETTINGS_MAX_ROWS = 5e4;
|
|
8023
|
+
var PREFIX = "records/";
|
|
8024
|
+
/** The base of every records failure. `detail` is the human part of the message. */
|
|
8025
|
+
var RecordsError = class extends Error {
|
|
8026
|
+
code;
|
|
8027
|
+
detail;
|
|
8028
|
+
constructor(code, detail) {
|
|
8029
|
+
super(`${PREFIX}${code}: ${detail}`);
|
|
8030
|
+
this.name = "RecordsError";
|
|
8031
|
+
this.code = code;
|
|
8032
|
+
this.detail = detail;
|
|
8033
|
+
}
|
|
8034
|
+
};
|
|
8035
|
+
var InvalidRecordError = class extends RecordsError {
|
|
8036
|
+
constructor(detail) {
|
|
8037
|
+
super("invalid-record", detail);
|
|
8038
|
+
this.name = "InvalidRecordError";
|
|
8039
|
+
}
|
|
8040
|
+
};
|
|
8041
|
+
/** A kind declaration the engine refuses (non-additive change, bad shape, wrong file). */
|
|
8042
|
+
var DeclarationRefusedError = class extends RecordsError {
|
|
8043
|
+
constructor(detail) {
|
|
8044
|
+
super("declaration-refused", detail);
|
|
8045
|
+
this.name = "DeclarationRefusedError";
|
|
8046
|
+
}
|
|
8047
|
+
};
|
|
7895
8048
|
function defOf(schema) {
|
|
7896
|
-
|
|
8049
|
+
const zodBag = Reflect.get(schema, "_zod");
|
|
8050
|
+
if (typeof zodBag !== "object" || zodBag === null) return {};
|
|
8051
|
+
const def = Reflect.get(zodBag, "def");
|
|
8052
|
+
if (typeof def !== "object" || def === null) return {};
|
|
8053
|
+
return def;
|
|
7897
8054
|
}
|
|
7898
8055
|
function declaredHere(schema) {
|
|
7899
8056
|
return globalRegistry.get(schema)?.secret === true;
|
|
@@ -7956,6 +8113,42 @@ function collectZodSecretPaths(schema, prefix = "") {
|
|
|
7956
8113
|
return [...new Set(paths)];
|
|
7957
8114
|
}
|
|
7958
8115
|
/**
|
|
8116
|
+
* Secret fields of a record, addressed the way a Zod schema declares them
|
|
8117
|
+
* (`collectZodSecretPaths`): dotted keys, `[]` for "each element of this array"
|
|
8118
|
+
* (`auth.accessToken`, `headers[].value`).
|
|
8119
|
+
*
|
|
8120
|
+
* Array elements are matched by a DECLARED id key (`secretArrayKeys`:
|
|
8121
|
+
* `{ headers: 'name' }`), never by index, so reordering a list keeps every
|
|
8122
|
+
* keychain ref (the same rule as `arrayItemFieldPath`). The concrete path of a
|
|
8123
|
+
* leaf names its element: `headers[X-Api].value`.
|
|
8124
|
+
*
|
|
8125
|
+
* Pure and browser-safe. Nothing here mutates: every transform returns a new value.
|
|
8126
|
+
*/
|
|
8127
|
+
/** The array prefixes (declared form, e.g. `headers` or `a.headers`) of a path. */
|
|
8128
|
+
function parseSecretPath(path) {
|
|
8129
|
+
if (path.length === 0) throw new InvalidRecordError("an empty secret path");
|
|
8130
|
+
return path.split(".").map((raw) => {
|
|
8131
|
+
const each = raw.endsWith("[]");
|
|
8132
|
+
const key = each ? raw.slice(0, -2) : raw;
|
|
8133
|
+
if (key.length === 0) throw new InvalidRecordError(`secret path "${path}" has an empty segment`);
|
|
8134
|
+
return {
|
|
8135
|
+
key,
|
|
8136
|
+
each
|
|
8137
|
+
};
|
|
8138
|
+
});
|
|
8139
|
+
}
|
|
8140
|
+
/** The declared array prefixes of `path` that need an id key (`headers`, `a.rows`). */
|
|
8141
|
+
function secretArrayPrefixes(path) {
|
|
8142
|
+
const segments = parseSecretPath(path);
|
|
8143
|
+
const prefixes = [];
|
|
8144
|
+
const walked = [];
|
|
8145
|
+
for (const segment of segments) {
|
|
8146
|
+
walked.push(segment.key);
|
|
8147
|
+
if (segment.each) prefixes.push(walked.join("."));
|
|
8148
|
+
}
|
|
8149
|
+
return prefixes;
|
|
8150
|
+
}
|
|
8151
|
+
/**
|
|
7959
8152
|
* Record kinds (D881): the declaration an addon makes of one kind of fact, the
|
|
7960
8153
|
* Zod row schema that describes it, and the helper that turns the two into the
|
|
7961
8154
|
* JSON the engine stores.
|
|
@@ -8023,6 +8216,90 @@ var RecordKindDeclarationSchema = object({
|
|
|
8023
8216
|
}).strict();
|
|
8024
8217
|
/** The kind names: lower-case, dash separated, short enough for an index name. */
|
|
8025
8218
|
var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
8219
|
+
/** Cross-field rules a declaration must satisfy. Throws {@link DeclarationRefusedError}. */
|
|
8220
|
+
function assertValidDeclaration(name, decl) {
|
|
8221
|
+
const refuse = (why) => {
|
|
8222
|
+
throw new DeclarationRefusedError(`kind "${name}": ${why}`);
|
|
8223
|
+
};
|
|
8224
|
+
if (!RecordKindNameSchema.safeParse(name).success) refuse("the name must be lower-case-dashed");
|
|
8225
|
+
const seen = /* @__PURE__ */ new Set();
|
|
8226
|
+
for (const index of decl.indexes) {
|
|
8227
|
+
if (seen.has(index.name)) refuse(`index name "${index.name}" is declared twice`);
|
|
8228
|
+
seen.add(index.name);
|
|
8229
|
+
}
|
|
8230
|
+
const { retention } = decl;
|
|
8231
|
+
const hasSecrets = decl.secretPaths.length > 0;
|
|
8232
|
+
if ("ttlMs" in retention) {
|
|
8233
|
+
if (retention.from === "at" && decl.at !== "required") refuse("a ttl from \"at\" needs at: \"required\"");
|
|
8234
|
+
if (hasSecrets) refuse("a kind with secret fields cannot use engine TTL (its keychain values would be orphaned)");
|
|
8235
|
+
}
|
|
8236
|
+
if ("maxRows" in retention || "maxRowsPerDevice" in retention) {
|
|
8237
|
+
if (retention.maxRowsPerDevice !== void 0 && decl.device !== "required") refuse("maxRowsPerDevice needs device: \"required\"");
|
|
8238
|
+
if (decl.at !== "required") refuse("a row bound trims the oldest \"at\": it needs at: \"required\"");
|
|
8239
|
+
if (hasSecrets) refuse("a kind with secret fields cannot use an engine row bound");
|
|
8240
|
+
const bound = Math.max(retention.maxRows ?? 0, retention.maxRowsPerDevice ?? 0);
|
|
8241
|
+
if (decl.database === "settings" && bound > 5e4) refuse(`a row bound above ${RECORD_SETTINGS_MAX_ROWS} belongs in database: "events" (a big delete on the settings thread stalls every configuration read)`);
|
|
8242
|
+
}
|
|
8243
|
+
if (decl.deviceRemoval === "delete" && decl.device === "none") refuse("deviceRemoval: \"delete\" needs a device: \"required\" or \"optional\"");
|
|
8244
|
+
for (const path of decl.secretPaths) for (const prefix of secretArrayPrefixes(path)) if (decl.secretArrayKeys[prefix] === void 0) refuse(`secret path "${path}" crosses the array "${prefix}": declare its id key in secretArrayKeys`);
|
|
8245
|
+
}
|
|
8246
|
+
function bodyFieldsOf(schema) {
|
|
8247
|
+
return { ...toJSONSchema(schema, {
|
|
8248
|
+
unrepresentable: "any",
|
|
8249
|
+
io: "input"
|
|
8250
|
+
}) };
|
|
8251
|
+
}
|
|
8252
|
+
function isRecordLike(value) {
|
|
8253
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
8254
|
+
}
|
|
8255
|
+
/** Does every branch of the body schema carry `field`? (A discriminated union has several.) */
|
|
8256
|
+
function hasNameField(json, field) {
|
|
8257
|
+
const branches = json["oneOf"] ?? json["anyOf"];
|
|
8258
|
+
if (Array.isArray(branches)) return branches.length > 0 && branches.every((b) => isRecordLike(b) && hasNameField(b, field));
|
|
8259
|
+
const properties = json["properties"];
|
|
8260
|
+
return isRecordLike(properties) && Object.prototype.hasOwnProperty.call(properties, field);
|
|
8261
|
+
}
|
|
8262
|
+
/**
|
|
8263
|
+
* Declare the kinds of a package. The keys are the kind names. The result is
|
|
8264
|
+
* what `ctx.records.declare` sends to the engine and what `ctx.records.kind`
|
|
8265
|
+
* types its handle from.
|
|
8266
|
+
*/
|
|
8267
|
+
function defineRecordKinds(specs) {
|
|
8268
|
+
const out = {};
|
|
8269
|
+
for (const [name, spec] of Object.entries(specs)) {
|
|
8270
|
+
const secretPaths = collectZodSecretPaths(spec.schema);
|
|
8271
|
+
const nameField = spec.entry?.nameField ?? "name";
|
|
8272
|
+
const fields = bodyFieldsOf(spec.schema);
|
|
8273
|
+
if (spec.entry !== void 0 && !hasNameField(fields, nameField)) throw new DeclarationRefusedError(`kind "${name}": an entry kind's schema needs a "${nameField}" field`);
|
|
8274
|
+
const parsed = RecordKindDeclarationSchema.parse({
|
|
8275
|
+
database: spec.database,
|
|
8276
|
+
class: spec.class,
|
|
8277
|
+
writeTrigger: spec.writeTrigger,
|
|
8278
|
+
device: spec.device,
|
|
8279
|
+
at: spec.at,
|
|
8280
|
+
indexes: spec.indexes === void 0 ? void 0 : [...spec.indexes],
|
|
8281
|
+
retention: spec.retention,
|
|
8282
|
+
deviceRemoval: spec.deviceRemoval,
|
|
8283
|
+
maxDataBytes: spec.maxDataBytes,
|
|
8284
|
+
secretPaths: [...secretPaths],
|
|
8285
|
+
secretArrayKeys: spec.secretArrayKeys === void 0 ? void 0 : { ...spec.secretArrayKeys },
|
|
8286
|
+
adoptsFrom: spec.adoptsFrom,
|
|
8287
|
+
transactFamily: spec.transactFamily,
|
|
8288
|
+
entry: spec.entry === void 0 ? void 0 : {
|
|
8289
|
+
title: spec.entry.title,
|
|
8290
|
+
nameField,
|
|
8291
|
+
fields
|
|
8292
|
+
}
|
|
8293
|
+
});
|
|
8294
|
+
assertValidDeclaration(name, parsed);
|
|
8295
|
+
out[name] = {
|
|
8296
|
+
name,
|
|
8297
|
+
schema: spec.schema,
|
|
8298
|
+
declaration: parsed
|
|
8299
|
+
};
|
|
8300
|
+
}
|
|
8301
|
+
return out;
|
|
8302
|
+
}
|
|
8026
8303
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
8027
8304
|
var CamProfileSchema = _enum([
|
|
8028
8305
|
"high",
|
|
@@ -8575,7 +8852,7 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
8575
8852
|
* can answer "may a rule actuate this?" without importing the schema barrel
|
|
8576
8853
|
* (~144MB RSS per runner, D28).
|
|
8577
8854
|
*
|
|
8578
|
-
* Coverage:
|
|
8855
|
+
* Coverage: 90 device-scoped capabilities.
|
|
8579
8856
|
*/
|
|
8580
8857
|
var DEVICE_SCOPED_CAPS = new Set([
|
|
8581
8858
|
"accessories",
|
|
@@ -8608,6 +8885,7 @@ var DEVICE_SCOPED_CAPS = new Set([
|
|
|
8608
8885
|
"device-extension",
|
|
8609
8886
|
"device-ops",
|
|
8610
8887
|
"device-status",
|
|
8888
|
+
"dishwasher",
|
|
8611
8889
|
"doorbell",
|
|
8612
8890
|
"enum-sensor",
|
|
8613
8891
|
"event-emitter",
|
|
@@ -8615,6 +8893,7 @@ var DEVICE_SCOPED_CAPS = new Set([
|
|
|
8615
8893
|
"feature-probe",
|
|
8616
8894
|
"flood",
|
|
8617
8895
|
"gas",
|
|
8896
|
+
"heating-valve",
|
|
8618
8897
|
"humidifier",
|
|
8619
8898
|
"humidity-sensor",
|
|
8620
8899
|
"image",
|
|
@@ -8711,7 +8990,7 @@ function sleep(ms) {
|
|
|
8711
8990
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
8712
8991
|
}
|
|
8713
8992
|
//#endregion
|
|
8714
|
-
//#region ../types/dist/err-msg
|
|
8993
|
+
//#region ../types/dist/err-msg-BXKzRBwg.mjs
|
|
8715
8994
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
8716
8995
|
DeviceType["Camera"] = "camera";
|
|
8717
8996
|
DeviceType["Hub"] = "hub";
|
|
@@ -8803,6 +9082,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
8803
9082
|
* native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
|
|
8804
9083
|
* integrations sharing the same food/desiccant/hopper surface. */
|
|
8805
9084
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
9085
|
+
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
9086
|
+
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
9087
|
+
* Sources: native Bosch Home Connect, reusable by similar integrations. */
|
|
9088
|
+
DeviceType["Dishwasher"] = "dishwasher";
|
|
8806
9089
|
return DeviceType;
|
|
8807
9090
|
}({});
|
|
8808
9091
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -9060,7 +9343,7 @@ function errMsg(err) {
|
|
|
9060
9343
|
return String(err);
|
|
9061
9344
|
}
|
|
9062
9345
|
//#endregion
|
|
9063
|
-
//#region ../types/dist/composition-
|
|
9346
|
+
//#region ../types/dist/composition-CB6PMT9p.mjs
|
|
9064
9347
|
/**
|
|
9065
9348
|
* Deterministic SHA-256 hash of an arbitrary serialisable value. The
|
|
9066
9349
|
* canonical form sorts object keys alphabetically at every depth so two
|
|
@@ -14350,8 +14633,13 @@ var AlertSeveritySchema = _enum([
|
|
|
14350
14633
|
"info",
|
|
14351
14634
|
"success",
|
|
14352
14635
|
"warning",
|
|
14353
|
-
"error"
|
|
14636
|
+
"error",
|
|
14637
|
+
"critical"
|
|
14354
14638
|
]);
|
|
14639
|
+
var AlertActionSchema = object({
|
|
14640
|
+
label: string(),
|
|
14641
|
+
href: string().optional()
|
|
14642
|
+
});
|
|
14355
14643
|
var AlertStatusSchema = _enum([
|
|
14356
14644
|
"active",
|
|
14357
14645
|
"in-progress",
|
|
@@ -14369,6 +14657,7 @@ var AlertSchema = object({
|
|
|
14369
14657
|
severity: AlertSeveritySchema,
|
|
14370
14658
|
title: string(),
|
|
14371
14659
|
message: string(),
|
|
14660
|
+
action: AlertActionSchema.optional(),
|
|
14372
14661
|
status: AlertStatusSchema,
|
|
14373
14662
|
progress: number().optional(),
|
|
14374
14663
|
read: boolean(),
|
|
@@ -17710,13 +17999,23 @@ method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: arr
|
|
|
17710
17999
|
}), RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
17711
18000
|
owner: string().min(1),
|
|
17712
18001
|
kind: RecordKindNameSchema,
|
|
17713
|
-
records: array(RecordInputSchema).
|
|
18002
|
+
records: array(RecordInputSchema).max(RECORD_BATCH_MAX),
|
|
17714
18003
|
/** The LAST batch: the copy is complete, the boot guard stops asking. */
|
|
17715
18004
|
complete: boolean().optional()
|
|
17716
|
-
}), object({ adopted: number().int() }), {
|
|
18005
|
+
}).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), object({ adopted: number().int() }), {
|
|
17717
18006
|
kind: "mutation",
|
|
17718
18007
|
auth: "admin"
|
|
17719
|
-
})
|
|
18008
|
+
}), method(object({
|
|
18009
|
+
collection: string().min(1),
|
|
18010
|
+
cursor: string().optional(),
|
|
18011
|
+
limit: number().int().min(1).max(1e3).optional()
|
|
18012
|
+
}), object({
|
|
18013
|
+
rows: array(object({
|
|
18014
|
+
id: string(),
|
|
18015
|
+
data: record(string(), unknown())
|
|
18016
|
+
})),
|
|
18017
|
+
nextCursor: string().nullable()
|
|
18018
|
+
}), { auth: "admin" }), method(object({ collection: string().min(1) }), object({ adopted: boolean() }), { auth: "admin" });
|
|
17720
18019
|
/**
|
|
17721
18020
|
* record-entries - the ONE admin surface for every list of user-created entries
|
|
17722
18021
|
* (D881): notification targets, brokers, LLM profiles, anything an addon
|
|
@@ -44111,6 +44410,7 @@ var NcThrottleSchema = object({
|
|
|
44111
44410
|
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
44112
44411
|
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
44113
44412
|
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
44413
|
+
var NC_CONFIRM_DEFAULT_MAX_IMAGE_PX = 448;
|
|
44114
44414
|
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
44115
44415
|
var NcConfirmExpectSchema = object({
|
|
44116
44416
|
op: _enum([
|
|
@@ -56883,7 +57183,8 @@ var batteryCapability = {
|
|
|
56883
57183
|
DeviceType.Button,
|
|
56884
57184
|
DeviceType.Switch,
|
|
56885
57185
|
DeviceType.PetFeeder,
|
|
56886
|
-
DeviceType.Container
|
|
57186
|
+
DeviceType.Container,
|
|
57187
|
+
DeviceType.Thermostat
|
|
56887
57188
|
],
|
|
56888
57189
|
methods: {
|
|
56889
57190
|
/**
|
|
@@ -58405,6 +58706,125 @@ onStatusChanged: { data: object({
|
|
|
58405
58706
|
* whether persisting is worth a SQLite commit. */
|
|
58406
58707
|
volatileStateFields: ["lastChangedAt"]
|
|
58407
58708
|
};
|
|
58709
|
+
/**
|
|
58710
|
+
* Smart-dishwasher cap — program lifecycle, door / remote-start gates,
|
|
58711
|
+
* consumable levels (salt, rinse aid) and common program options.
|
|
58712
|
+
*
|
|
58713
|
+
* Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
|
|
58714
|
+
* by any integration that exposes the same program / option surface.
|
|
58715
|
+
*
|
|
58716
|
+
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
58717
|
+
* provider refreshes the slice on an interval and eagerly after commands.
|
|
58718
|
+
*/
|
|
58719
|
+
var DishwasherStateSchema = _enum([
|
|
58720
|
+
"idle",
|
|
58721
|
+
"running",
|
|
58722
|
+
"paused",
|
|
58723
|
+
"finished",
|
|
58724
|
+
"error",
|
|
58725
|
+
"unavailable"
|
|
58726
|
+
]);
|
|
58727
|
+
var DishwasherConsumableLevelSchema = _enum([
|
|
58728
|
+
"ok",
|
|
58729
|
+
"low",
|
|
58730
|
+
"empty"
|
|
58731
|
+
]);
|
|
58732
|
+
var DishwasherStatusSchema = object({
|
|
58733
|
+
state: DishwasherStateSchema,
|
|
58734
|
+
/** Active program id/name, or null when none selected / unknown. */
|
|
58735
|
+
program: string().nullable(),
|
|
58736
|
+
/** Program tokens the hardware accepts — drives the UI selector. */
|
|
58737
|
+
availablePrograms: array(string()),
|
|
58738
|
+
/** Minutes remaining on the active cycle, or null when not running. */
|
|
58739
|
+
remainingMinutes: number().int().nonnegative().nullable(),
|
|
58740
|
+
/** Cycle completion 0..100, or null when not applicable. */
|
|
58741
|
+
progressPercent: number().min(0).max(100).nullable(),
|
|
58742
|
+
/** True when the door is reported open. */
|
|
58743
|
+
doorOpen: boolean(),
|
|
58744
|
+
/** True when remote start is allowed (door closed, power on, etc.). */
|
|
58745
|
+
remoteStartAllowed: boolean(),
|
|
58746
|
+
/** Main power / switched-on state. */
|
|
58747
|
+
powerOn: boolean(),
|
|
58748
|
+
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
58749
|
+
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
58750
|
+
halfLoad: boolean(),
|
|
58751
|
+
hygienePlus: boolean(),
|
|
58752
|
+
errorCode: number().nullable(),
|
|
58753
|
+
errorLabel: string().nullable(),
|
|
58754
|
+
lastFetchedAt: number()
|
|
58755
|
+
});
|
|
58756
|
+
var dishwasherCapability = {
|
|
58757
|
+
name: "dishwasher",
|
|
58758
|
+
scope: "device",
|
|
58759
|
+
deviceNative: true,
|
|
58760
|
+
mode: "singleton",
|
|
58761
|
+
deviceTypes: [DeviceType.Dishwasher],
|
|
58762
|
+
methods: {
|
|
58763
|
+
start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
58764
|
+
kind: "mutation",
|
|
58765
|
+
auth: "protected"
|
|
58766
|
+
}),
|
|
58767
|
+
pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
58768
|
+
kind: "mutation",
|
|
58769
|
+
auth: "protected"
|
|
58770
|
+
}),
|
|
58771
|
+
stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
58772
|
+
kind: "mutation",
|
|
58773
|
+
auth: "protected"
|
|
58774
|
+
}),
|
|
58775
|
+
setProgram: method(object({
|
|
58776
|
+
deviceId: number().int().nonnegative(),
|
|
58777
|
+
program: string().min(1)
|
|
58778
|
+
}), _void(), {
|
|
58779
|
+
kind: "mutation",
|
|
58780
|
+
auth: "protected"
|
|
58781
|
+
}),
|
|
58782
|
+
setPower: method(object({
|
|
58783
|
+
deviceId: number().int().nonnegative(),
|
|
58784
|
+
on: boolean()
|
|
58785
|
+
}), _void(), {
|
|
58786
|
+
kind: "mutation",
|
|
58787
|
+
auth: "protected"
|
|
58788
|
+
}),
|
|
58789
|
+
setHalfLoad: method(object({
|
|
58790
|
+
deviceId: number().int().nonnegative(),
|
|
58791
|
+
on: boolean()
|
|
58792
|
+
}), _void(), {
|
|
58793
|
+
kind: "mutation",
|
|
58794
|
+
auth: "protected"
|
|
58795
|
+
}),
|
|
58796
|
+
setHygienePlus: method(object({
|
|
58797
|
+
deviceId: number().int().nonnegative(),
|
|
58798
|
+
on: boolean()
|
|
58799
|
+
}), _void(), {
|
|
58800
|
+
kind: "mutation",
|
|
58801
|
+
auth: "protected"
|
|
58802
|
+
}),
|
|
58803
|
+
setOption: method(object({
|
|
58804
|
+
deviceId: number().int().nonnegative(),
|
|
58805
|
+
key: string().min(1),
|
|
58806
|
+
value: union([
|
|
58807
|
+
boolean(),
|
|
58808
|
+
string(),
|
|
58809
|
+
number()
|
|
58810
|
+
])
|
|
58811
|
+
}), _void(), {
|
|
58812
|
+
kind: "mutation",
|
|
58813
|
+
auth: "protected"
|
|
58814
|
+
})
|
|
58815
|
+
},
|
|
58816
|
+
status: {
|
|
58817
|
+
schema: DishwasherStatusSchema,
|
|
58818
|
+
kind: "poll"
|
|
58819
|
+
},
|
|
58820
|
+
runtimeState: DishwasherStatusSchema,
|
|
58821
|
+
durability: "session",
|
|
58822
|
+
history: { fields: { progressPercent: {
|
|
58823
|
+
kind: "gauge",
|
|
58824
|
+
unit: "%",
|
|
58825
|
+
deadband: 2
|
|
58826
|
+
} } }
|
|
58827
|
+
};
|
|
58408
58828
|
var DoorbellStatusSchema = object({
|
|
58409
58829
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
58410
58830
|
lastPressedAt: number().nullable(),
|
|
@@ -59246,6 +59666,32 @@ var gasCapability = {
|
|
|
59246
59666
|
* whether persisting is worth a SQLite commit. */
|
|
59247
59667
|
volatileStateFields: ["lastChangedAt"]
|
|
59248
59668
|
};
|
|
59669
|
+
var HeatingValveStatusSchema = object({
|
|
59670
|
+
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
59671
|
+
position: number().min(0).max(100).nullable(),
|
|
59672
|
+
/** Ms epoch when the slice was last updated (push or poll). */
|
|
59673
|
+
lastFetchedAt: number()
|
|
59674
|
+
});
|
|
59675
|
+
var heatingValveCapability = {
|
|
59676
|
+
name: "heating-valve",
|
|
59677
|
+
scope: "device",
|
|
59678
|
+
deviceNative: true,
|
|
59679
|
+
mode: "singleton",
|
|
59680
|
+
deviceTypes: [DeviceType.Thermostat],
|
|
59681
|
+
methods: {},
|
|
59682
|
+
status: {
|
|
59683
|
+
schema: HeatingValveStatusSchema,
|
|
59684
|
+
kind: "push"
|
|
59685
|
+
},
|
|
59686
|
+
runtimeState: HeatingValveStatusSchema,
|
|
59687
|
+
durability: "session",
|
|
59688
|
+
history: { fields: { position: {
|
|
59689
|
+
kind: "gauge",
|
|
59690
|
+
unit: "%",
|
|
59691
|
+
deadband: 1
|
|
59692
|
+
} } },
|
|
59693
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
59694
|
+
};
|
|
59249
59695
|
/**
|
|
59250
59696
|
* Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
|
|
59251
59697
|
* an on/off actuator with an optional target-humidity setpoint and an
|
|
@@ -68849,6 +69295,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
68849
69295
|
dayNight: dayNightCapability,
|
|
68850
69296
|
deviceDiscovery: deviceDiscoveryCapability,
|
|
68851
69297
|
deviceStatus: deviceStatusCapability,
|
|
69298
|
+
dishwasher: dishwasherCapability,
|
|
68852
69299
|
doorbell: doorbellCapability,
|
|
68853
69300
|
enumSensor: enumSensorCapability,
|
|
68854
69301
|
eventEmitter: eventEmitterCapability,
|
|
@@ -68856,6 +69303,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
68856
69303
|
featureProbe: featureProbeCapability,
|
|
68857
69304
|
flood: floodCapability,
|
|
68858
69305
|
gas: gasCapability,
|
|
69306
|
+
heatingValve: heatingValveCapability,
|
|
68859
69307
|
humidifier: humidifierCapability,
|
|
68860
69308
|
humiditySensor: humiditySensorCapability,
|
|
68861
69309
|
image: imageCapability,
|
|
@@ -68941,13 +69389,14 @@ var BaseDevice = class {
|
|
|
68941
69389
|
get state() {
|
|
68942
69390
|
if (!this._stateProxyCache) {
|
|
68943
69391
|
const cache = {};
|
|
68944
|
-
const handler = { get: (
|
|
69392
|
+
const handler = { get: (target, key) => {
|
|
68945
69393
|
const k = key;
|
|
68946
|
-
|
|
69394
|
+
const existing = Reflect.get(target, k);
|
|
69395
|
+
if (existing !== void 0) return existing;
|
|
68947
69396
|
const cap = DEVICE_LOCAL_STATE_CAPS[k];
|
|
68948
69397
|
if (!cap) return void 0;
|
|
68949
69398
|
const proxy = this.sliceProxy(cap);
|
|
68950
|
-
|
|
69399
|
+
Reflect.set(target, k, proxy);
|
|
68951
69400
|
return proxy;
|
|
68952
69401
|
} };
|
|
68953
69402
|
this._stateProxyCache = new Proxy(cache, handler);
|
|
@@ -69146,7 +69595,7 @@ var BaseDevice = class {
|
|
|
69146
69595
|
async updateSourceInfo(patch) {
|
|
69147
69596
|
const next = mergeSourceInfo(this.sourceInfo, patch);
|
|
69148
69597
|
this._sourceInfoCache = Object.freeze({ ...next });
|
|
69149
|
-
const action = this.ctx.api
|
|
69598
|
+
const action = this.ctx.api.deviceManager?.setMetadata;
|
|
69150
69599
|
if (action) try {
|
|
69151
69600
|
await action.mutate({
|
|
69152
69601
|
deviceId: this.id,
|
|
@@ -69181,7 +69630,7 @@ var BaseDevice = class {
|
|
|
69181
69630
|
* device boot on a meta refresh.
|
|
69182
69631
|
*/
|
|
69183
69632
|
async refreshFeatures() {
|
|
69184
|
-
const action = this.ctx.api
|
|
69633
|
+
const action = this.ctx.api.deviceManager?.registerDevice;
|
|
69185
69634
|
if (!action) return;
|
|
69186
69635
|
try {
|
|
69187
69636
|
await action.mutate({
|
|
@@ -69629,7 +70078,7 @@ var DeclaredDevices = class {
|
|
|
69629
70078
|
return removed;
|
|
69630
70079
|
}
|
|
69631
70080
|
};
|
|
69632
|
-
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;
|
|
70081
|
+
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;
|
|
69633
70082
|
new Set(Object.values(DeviceType));
|
|
69634
70083
|
Object.freeze({
|
|
69635
70084
|
"accessories.getStatus": {
|
|
@@ -72050,6 +72499,60 @@ Object.freeze({
|
|
|
72050
72499
|
addonId: null,
|
|
72051
72500
|
access: "view"
|
|
72052
72501
|
},
|
|
72502
|
+
"dishwasher.getStatus": {
|
|
72503
|
+
capName: "dishwasher",
|
|
72504
|
+
capScope: "device",
|
|
72505
|
+
addonId: null,
|
|
72506
|
+
access: "view"
|
|
72507
|
+
},
|
|
72508
|
+
"dishwasher.pause": {
|
|
72509
|
+
capName: "dishwasher",
|
|
72510
|
+
capScope: "device",
|
|
72511
|
+
addonId: null,
|
|
72512
|
+
access: "create"
|
|
72513
|
+
},
|
|
72514
|
+
"dishwasher.setHalfLoad": {
|
|
72515
|
+
capName: "dishwasher",
|
|
72516
|
+
capScope: "device",
|
|
72517
|
+
addonId: null,
|
|
72518
|
+
access: "create"
|
|
72519
|
+
},
|
|
72520
|
+
"dishwasher.setHygienePlus": {
|
|
72521
|
+
capName: "dishwasher",
|
|
72522
|
+
capScope: "device",
|
|
72523
|
+
addonId: null,
|
|
72524
|
+
access: "create"
|
|
72525
|
+
},
|
|
72526
|
+
"dishwasher.setOption": {
|
|
72527
|
+
capName: "dishwasher",
|
|
72528
|
+
capScope: "device",
|
|
72529
|
+
addonId: null,
|
|
72530
|
+
access: "create"
|
|
72531
|
+
},
|
|
72532
|
+
"dishwasher.setPower": {
|
|
72533
|
+
capName: "dishwasher",
|
|
72534
|
+
capScope: "device",
|
|
72535
|
+
addonId: null,
|
|
72536
|
+
access: "create"
|
|
72537
|
+
},
|
|
72538
|
+
"dishwasher.setProgram": {
|
|
72539
|
+
capName: "dishwasher",
|
|
72540
|
+
capScope: "device",
|
|
72541
|
+
addonId: null,
|
|
72542
|
+
access: "create"
|
|
72543
|
+
},
|
|
72544
|
+
"dishwasher.start": {
|
|
72545
|
+
capName: "dishwasher",
|
|
72546
|
+
capScope: "device",
|
|
72547
|
+
addonId: null,
|
|
72548
|
+
access: "create"
|
|
72549
|
+
},
|
|
72550
|
+
"dishwasher.stop": {
|
|
72551
|
+
capName: "dishwasher",
|
|
72552
|
+
capScope: "device",
|
|
72553
|
+
addonId: null,
|
|
72554
|
+
access: "create"
|
|
72555
|
+
},
|
|
72053
72556
|
"doorbell.getStatus": {
|
|
72054
72557
|
capName: "doorbell",
|
|
72055
72558
|
capScope: "device",
|
|
@@ -72260,6 +72763,12 @@ Object.freeze({
|
|
|
72260
72763
|
addonId: null,
|
|
72261
72764
|
access: "view"
|
|
72262
72765
|
},
|
|
72766
|
+
"heatingValve.getStatus": {
|
|
72767
|
+
capName: "heating-valve",
|
|
72768
|
+
capScope: "device",
|
|
72769
|
+
addonId: null,
|
|
72770
|
+
access: "view"
|
|
72771
|
+
},
|
|
72263
72772
|
"humidifier.getStatus": {
|
|
72264
72773
|
capName: "humidifier",
|
|
72265
72774
|
capScope: "device",
|
|
@@ -76400,6 +76909,12 @@ Object.freeze({
|
|
|
76400
76909
|
addonId: null,
|
|
76401
76910
|
access: "delete"
|
|
76402
76911
|
},
|
|
76912
|
+
"storageAdmin.isAdoptedLegacyTable": {
|
|
76913
|
+
capName: "storage-admin",
|
|
76914
|
+
capScope: "system",
|
|
76915
|
+
addonId: null,
|
|
76916
|
+
access: "view"
|
|
76917
|
+
},
|
|
76403
76918
|
"storageAdmin.listKinds": {
|
|
76404
76919
|
capName: "storage-admin",
|
|
76405
76920
|
capScope: "system",
|
|
@@ -76412,6 +76927,12 @@ Object.freeze({
|
|
|
76412
76927
|
addonId: null,
|
|
76413
76928
|
access: "view"
|
|
76414
76929
|
},
|
|
76930
|
+
"storageAdmin.readLegacyCollection": {
|
|
76931
|
+
capName: "storage-admin",
|
|
76932
|
+
capScope: "system",
|
|
76933
|
+
addonId: null,
|
|
76934
|
+
access: "view"
|
|
76935
|
+
},
|
|
76415
76936
|
"storageAdmin.readRecords": {
|
|
76416
76937
|
capName: "storage-admin",
|
|
76417
76938
|
capScope: "system",
|
|
@@ -77835,7 +78356,7 @@ Object.freeze({
|
|
|
77835
78356
|
access: "create"
|
|
77836
78357
|
}
|
|
77837
78358
|
});
|
|
77838
|
-
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;
|
|
78359
|
+
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;
|
|
77839
78360
|
DeviceFeature.BatteryOperated;
|
|
77840
78361
|
Object.freeze({
|
|
77841
78362
|
"accessories.getStatus": [{
|
|
@@ -78659,6 +79180,51 @@ Object.freeze({
|
|
|
78659
79180
|
form: "single",
|
|
78660
79181
|
optional: false
|
|
78661
79182
|
}],
|
|
79183
|
+
"dishwasher.getStatus": [{
|
|
79184
|
+
name: "deviceId",
|
|
79185
|
+
form: "single",
|
|
79186
|
+
optional: false
|
|
79187
|
+
}],
|
|
79188
|
+
"dishwasher.pause": [{
|
|
79189
|
+
name: "deviceId",
|
|
79190
|
+
form: "single",
|
|
79191
|
+
optional: false
|
|
79192
|
+
}],
|
|
79193
|
+
"dishwasher.setHalfLoad": [{
|
|
79194
|
+
name: "deviceId",
|
|
79195
|
+
form: "single",
|
|
79196
|
+
optional: false
|
|
79197
|
+
}],
|
|
79198
|
+
"dishwasher.setHygienePlus": [{
|
|
79199
|
+
name: "deviceId",
|
|
79200
|
+
form: "single",
|
|
79201
|
+
optional: false
|
|
79202
|
+
}],
|
|
79203
|
+
"dishwasher.setOption": [{
|
|
79204
|
+
name: "deviceId",
|
|
79205
|
+
form: "single",
|
|
79206
|
+
optional: false
|
|
79207
|
+
}],
|
|
79208
|
+
"dishwasher.setPower": [{
|
|
79209
|
+
name: "deviceId",
|
|
79210
|
+
form: "single",
|
|
79211
|
+
optional: false
|
|
79212
|
+
}],
|
|
79213
|
+
"dishwasher.setProgram": [{
|
|
79214
|
+
name: "deviceId",
|
|
79215
|
+
form: "single",
|
|
79216
|
+
optional: false
|
|
79217
|
+
}],
|
|
79218
|
+
"dishwasher.start": [{
|
|
79219
|
+
name: "deviceId",
|
|
79220
|
+
form: "single",
|
|
79221
|
+
optional: false
|
|
79222
|
+
}],
|
|
79223
|
+
"dishwasher.stop": [{
|
|
79224
|
+
name: "deviceId",
|
|
79225
|
+
form: "single",
|
|
79226
|
+
optional: false
|
|
79227
|
+
}],
|
|
78662
79228
|
"doorbell.getStatus": [{
|
|
78663
79229
|
name: "deviceId",
|
|
78664
79230
|
form: "single",
|
|
@@ -78728,6 +79294,11 @@ Object.freeze({
|
|
|
78728
79294
|
form: "single",
|
|
78729
79295
|
optional: false
|
|
78730
79296
|
}],
|
|
79297
|
+
"heatingValve.getStatus": [{
|
|
79298
|
+
name: "deviceId",
|
|
79299
|
+
form: "single",
|
|
79300
|
+
optional: false
|
|
79301
|
+
}],
|
|
78731
79302
|
"humidifier.getStatus": [{
|
|
78732
79303
|
name: "deviceId",
|
|
78733
79304
|
form: "single",
|
|
@@ -80551,6 +81122,103 @@ Object.freeze({
|
|
|
80551
81122
|
"network-access": "ingress",
|
|
80552
81123
|
"smtp-provider": "email"
|
|
80553
81124
|
});
|
|
81125
|
+
/** Width of a bucket the history store accepts. */
|
|
81126
|
+
var HISTORY_BUCKET_MS = 5 * 6e4;
|
|
81127
|
+
function bucketStartOf(at) {
|
|
81128
|
+
return Math.floor(at / HISTORY_BUCKET_MS) * HISTORY_BUCKET_MS;
|
|
81129
|
+
}
|
|
81130
|
+
function subjectId(subject) {
|
|
81131
|
+
return subject.kind === "device" ? `d:${subject.deviceId}` : `n:${subject.nodeId}`;
|
|
81132
|
+
}
|
|
81133
|
+
function seriesIdentity(key, subject, scope) {
|
|
81134
|
+
return `${key}\u0000${subjectId(subject)}\u0000${scope}`;
|
|
81135
|
+
}
|
|
81136
|
+
function toClosed(b) {
|
|
81137
|
+
return {
|
|
81138
|
+
key: b.key,
|
|
81139
|
+
subject: b.subject,
|
|
81140
|
+
scope: b.scope,
|
|
81141
|
+
bucketStart: b.bucketStart,
|
|
81142
|
+
samples: b.samples,
|
|
81143
|
+
sum: b.sum,
|
|
81144
|
+
min: b.min,
|
|
81145
|
+
max: b.max,
|
|
81146
|
+
last: b.last,
|
|
81147
|
+
lastTs: b.lastTs
|
|
81148
|
+
};
|
|
81149
|
+
}
|
|
81150
|
+
var BucketAccumulator = class {
|
|
81151
|
+
open = /* @__PURE__ */ new Map();
|
|
81152
|
+
requeued = /* @__PURE__ */ new Map();
|
|
81153
|
+
/** Add one observation. A non-finite value or timestamp is ignored (never counted as 0). */
|
|
81154
|
+
note(key, subject, scope, value, at) {
|
|
81155
|
+
if (!Number.isFinite(value) || !Number.isFinite(at)) return;
|
|
81156
|
+
const bucketStart = bucketStartOf(at);
|
|
81157
|
+
const id = `${seriesIdentity(key, subject, scope)}\u0000${bucketStart}`;
|
|
81158
|
+
const existing = this.open.get(id);
|
|
81159
|
+
if (existing === void 0) {
|
|
81160
|
+
this.open.set(id, {
|
|
81161
|
+
key,
|
|
81162
|
+
subject,
|
|
81163
|
+
scope,
|
|
81164
|
+
bucketStart,
|
|
81165
|
+
samples: 1,
|
|
81166
|
+
sum: value,
|
|
81167
|
+
min: value,
|
|
81168
|
+
max: value,
|
|
81169
|
+
last: value,
|
|
81170
|
+
lastTs: at
|
|
81171
|
+
});
|
|
81172
|
+
return;
|
|
81173
|
+
}
|
|
81174
|
+
existing.samples += 1;
|
|
81175
|
+
existing.sum += value;
|
|
81176
|
+
if (value < existing.min) existing.min = value;
|
|
81177
|
+
if (value > existing.max) existing.max = value;
|
|
81178
|
+
if (at >= existing.lastTs) {
|
|
81179
|
+
existing.last = value;
|
|
81180
|
+
existing.lastTs = at;
|
|
81181
|
+
}
|
|
81182
|
+
}
|
|
81183
|
+
/**
|
|
81184
|
+
* Buckets whose window ended at or before `now`, oldest first, requeued ones
|
|
81185
|
+
* included. They leave the accumulator: delivery is the caller's.
|
|
81186
|
+
*/
|
|
81187
|
+
takeClosed(now) {
|
|
81188
|
+
const out = [];
|
|
81189
|
+
for (const [id, bucket] of this.open) if (bucket.bucketStart + 3e5 <= now) {
|
|
81190
|
+
out.push(toClosed(bucket));
|
|
81191
|
+
this.open.delete(id);
|
|
81192
|
+
}
|
|
81193
|
+
for (const list of this.requeued.values()) out.push(...list);
|
|
81194
|
+
this.requeued.clear();
|
|
81195
|
+
return out.toSorted((a, b) => a.bucketStart - b.bucketStart);
|
|
81196
|
+
}
|
|
81197
|
+
/**
|
|
81198
|
+
* Put undelivered buckets back for the next `takeClosed`. Keeps the newest
|
|
81199
|
+
* {@link MAX_REQUEUED_BUCKETS_PER_SERIES} per series and returns the buckets
|
|
81200
|
+
* it dropped (empty when none).
|
|
81201
|
+
*/
|
|
81202
|
+
requeue(buckets) {
|
|
81203
|
+
const dropped = [];
|
|
81204
|
+
for (const bucket of buckets) {
|
|
81205
|
+
const id = seriesIdentity(bucket.key, bucket.subject, bucket.scope);
|
|
81206
|
+
const list = [...this.requeued.get(id) ?? [], bucket].toSorted((a, b) => a.bucketStart - b.bucketStart);
|
|
81207
|
+
while (list.length > 12) {
|
|
81208
|
+
const oldest = list.shift();
|
|
81209
|
+
if (oldest !== void 0) dropped.push(oldest);
|
|
81210
|
+
}
|
|
81211
|
+
this.requeued.set(id, list);
|
|
81212
|
+
}
|
|
81213
|
+
return dropped;
|
|
81214
|
+
}
|
|
81215
|
+
/** Buckets currently held (open plus requeued) — for a gauge in the producer's own status. */
|
|
81216
|
+
pendingBucketCount() {
|
|
81217
|
+
let n = this.open.size;
|
|
81218
|
+
for (const list of this.requeued.values()) n += list.length;
|
|
81219
|
+
return n;
|
|
81220
|
+
}
|
|
81221
|
+
};
|
|
80554
81222
|
DeviceType.Camera;
|
|
80555
81223
|
var G711_SCALE_CORRECTION_DB = {
|
|
80556
81224
|
PCMU: 20 * Math.log10(4),
|
|
@@ -84642,4 +85310,4 @@ function buildClipModelRegistry(entries) {
|
|
|
84642
85310
|
/** The built-in catalog's registry. */
|
|
84643
85311
|
var BUILTIN_CLIP_MODELS = buildClipModelRegistry(CLIP_IMAGE_MODELS);
|
|
84644
85312
|
//#endregion
|
|
84645
|
-
export {
|
|
85313
|
+
export { MediaFileKindEnum as $, record as $i, deleteAlarmProfile as $n, resolvePoolMemoryPolicy as $r, NcTemplateVarDescriptorSchema as $t, DeclaredDevices as A, errMsg as Ai, TrackSideSchema as An, isRootSuppliableStepId as Ar, NcAlarmSensorsInputSchema as At, FULL_IMAGE_BBOX as B, nodePin as Bi, armRemovalReconcile as Bn, occupancyScope as Br, NcRuleSchema as Bt, ClearTrackRelationResultSchema as C, viewerLinkBaseOf as Ci, TRACK_RELATIONS_DEFAULT_LIMIT as Cn, isDetectionMacroClass as Cr, NC_SNOOZE_MAX_MINUTES as Ct, DEFAULT_TIMELAPSE_PREVIEW_TEXT as D, evaluateSensorEdge as Di, TrackPuritySchema as Dn, isLabelSupplyStepId as Dr, NC_TEMPLATE_VARS as Dt, DEFAULT_EVENT_COLOR as E, canonicalHash as Ei, TimelapseRuleSchema as En, isKnownTemplateVar as Er, NC_TAXONOMY as Et, EVENT_DENSITY_BATCH_MAX as F, customAction as Fi, alarmPanelCapability as Fn, kebabToCamel as Fr, NcLegacyRuleActionSequenceSchema as Ft, ListTrackRelationsResultSchema as G, array as Gi, buildViewerLink as Gn, readDeviceStateFrom as Gr, NcSnoozeInputSchema as Gt, LABEL_SUPPLY_MACRO as H, sleep as Hi, audioMetricsCapability as Hn, pickFaceRescoreIntervalMinutes as Hr, NcRuleUpdateInputSchema as Ht, EVENT_KIND_BY_CAP as I, defineCustomActions as Ii, applyBlockingEdit as In, linkedStepOf as Ir, NcRuleActionSchema as It, MAX_BIRTH_DECISION_RECORDS as J, literal as Ji, cloneAlarmSettings as Jn, renameAlarmProfile as Jr, NcStateSummarySectionIdSchema as Jt, LockStateSchema as K, boolean as Ki, calendarEventLocalSpan as Kn, readMotionTriggeredBy as Kr, NcSnoozeSchema as Kt, EVENT_OWNER_TYPES as L, defineRecordKinds as Li, applyModeDelaysEdits as Ln, mayWriteToLocation as Lr, NcRuleActionsSchema as Lt, EMBEDDING_MODEL_FAILED as M, CamProfileSchema as Mi, activateAlarmProfile as Mn, isSystemDelivery as Mr, NcAlarmSettingsPatchSchema as Mt, EMBEDDING_REQUIREMENTS_FAILED as N, RECORD_MAX_DATA_BYTES as Ni, addonWidgetsSourceCapability as Nn, isSystemEventSummaryRule as Nr, NcConditionDescriptorSchema as Nt, DETECTION_MACRO_CLASSES as O, isSourceCap as Oi, TrackRelationKindSchema as On, isMediaOwnerType as Or, NcAlarmConfigSchema as Ot, EMBEDDING_REQUIREMENTS_UNAVAILABLE as P, createEvent as Pi, alarmDeviceSecureOnArm as Pn, isVectorIndexDimConflict as Pr, NcConditionsSchema as Pt, MOTION_CLOSE_AFTER_MS as Q, partialRecord as Qi, createAlarmProfile as Qn, resolveModeNotifyPolicy as Qr, NcTemplatePreviewSchema as Qt, EXPORT_DENSE_MAX_RANGES as R, hydrateSchema as Ri, applyNonBlockingEdit as Rn, memoizePinnedFfmpeg as Rr, NcRuleInputSchema as Rt, ClearTrackRelationInputSchema as S, vectorDimFromBase64 as Si, TIMELAPSE_DENSE_FLOOR_SEC as Sn, isDefaultAlarmProfileId as Sr, NC_SENSOR_TRANSITION_KINDS as St, DEFAULT_DETAIL_CROP_CONVENTION as T, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as Ti, TimelapseRulePatchSchema as Tn, isEventOwnerType as Tr, NC_TANK_SYSTEM_EVENT_KINDS as Tt, LabelAttributionSchema as U, ZodObject as Ui, audioModeOf as Un, pipelineAnalyticsCapability as Ur, NcScheduleSchema as Ut, FailureCounters as V, normalizeNodeId as Vi, assertTimelapseCadences as Vn, parseProcStatus as Vr, NcRuleTargetSchema as Vt, ListTrackRelationsInputSchema as W, _enum as Wi, buildEventKindDescriptor as Wn, plateGalleryCapability as Wr, NcSharedSequenceSchema as Wt, MAX_TRACK_PURITIES as X, number as Xi, coreBlockIdFromAddonId as Xn, resolveLocationMode as Xr, NcTaxonomySchema as Xt, MAX_BIRTH_LATENCY_PROXY_MS as Y, looseObject as Yi, consumableLowPercentOf as Yn, resolveClipSearchMinScore as Yr, NcSystemEventKindSchema as Yt, MAX_TRACK_RELATIONS as Z, object as Zi, cosineSimilarity as Zn, resolveModeDelays as Zr, NcTemplatePreviewInputSchema as Zt, BIRTH_DECISION_DEFAULT_LIMIT as _, systemEventFilterApplies as _i, SCENE_RESET_RECAPTURES as _n, gifDeriveSpeed as _r, NC_CONSUMABLE_SYSTEM_EVENT_KINDS as _t, CLIP_EMBEDDING_STEP_ID as a, unknown as aa, ruleGroupingApplies as ai, RebuildObjectEmbeddingsRefusalSchema as an, deviceRemovalHookCapability as ar, NC_ALARM_NOTIFY_FIELDS as at, BucketAccumulator as b, templateCarriesSummary as bi, SetTrackPurityResultSchema as bn, isAppLinkBase as br, NC_GROUPING_MAX_SEC as bt, readClusterModelPinStrict as c, secureActuationFor as ci, RetrainStatusSchema as cn, embeddingRefusalOf as cr, NC_AUDIO_CONFIRM_HITS_DEFAULT as ct, APPEARANCE_BLOCKS as d, storageOccupancyCapability as di, SCENE_DEFAULT_ANCHOR_THRESHOLD as dn, encodeVectorBase64 as dr, NC_CLIP_PRE_ROLL_DEFAULT_SEC as dt, strictObject as ea, retrainRevisionConflictMessage as ei, OPS_LOG_DEFAULT_LIMIT as en, deriveDetailCropRect as er, MotionTriggeredBySchema as et, APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT as f, subKindsOf as fi, SCENE_DEFAULT_CHECK_INTERVAL_SEC as fn, ensureAlarmProfiles as fr, NC_CLIP_RETENTION_MAX_SEC as ft, ArchivedDebugNoteSchema as g, systemEventFamilyProblems as gi, SCENE_DIVERGED as gn, failureContributionCapability as gr, NC_CONSUMABLE_LOW_PERCENT_DEFAULT as gt, AlarmArmModeSchema as h, systemEventDeliveryProblems as hi, SCENE_DEFAULT_UNCOVERED_POLICY as hn, faceGalleryCapability as hr, NC_CONFIRM_DEFAULT_TIMEOUT_MS as ht, CLIP_TEXT_MODELS as i, union as ia, ruleDeviceCompatCapQueries as ii, RECORDING_SOURCE_CAMSTACK_ADDON as in, describeSystemEventFamilyProblem as ir, NC_ALARM_DELAY_MAX_SEC as it, DetectionSourceSchema as j, BaseAddon as ji, TrackSourceSchema as jn, isScheduleActive as jr, NcAlarmSensorsSchema as jt, DETECTION_PIPELINE_CAP_NAME as k, DeviceType as ki, TrackRelationSchema as kn, isRetiredClearKey as kr, NcAlarmPostTriggeredActionSchema as kt, resolveClusterModelPin as l, sensorRaisedOf as li, SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX as ln, embeddingRequirementsFailedError as lr, NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT as lt, AUDIO_MACRO_LABELS as m, syncActiveAlarmProfileSettings as mi, SCENE_DEFAULT_QUIET_SECONDS as mn, evictionPolicyOfLocation as mr, NC_CONFIRM_DEFAULT_MAX_IMAGE_PX as mt, DEFAULT_CLIP_MODEL as n, templateLiteral as na, ruleAutoTriggersAlarm as ni, PoolMemoryWatchdog as nn, deriveRecordingMode as nr, NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC as nt, CLUSTER_MODEL_OWNER_ADDON_ID as o, EventCategory as oa, ruleKindOf as oi, RetrainDismissedSchema as on, embeddingEncoderCapability as or, NC_ALARM_SYSTEM_EVENT_KINDS as ot, ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT as p, summarizeReview as pi, SCENE_DEFAULT_OBSERVATION_SPACING_SEC as pn, eventKindLabel as pr, NC_CONDITION_CATALOG as pt, MAX_ARCHIVED_DEBUG_NOTES as q, discriminatedUnion as qi, classifyRetrainReview as qn, readTimelapseGeneratedAt as qr, NcSnoozeSuppressedSchema as qt, CLIP_IMAGE_MODELS as r, tuple as ra, ruleBelongsToAlarm as ri, RECORDING_EXPORT_MAX_READ_BYTES as rn, describeSystemEventDeliveryProblem as rr, NC_ALARM_DELAY_FIELDS as rt, FACE_EMBEDDING_STEP_ID as s, sceneMonitorCapability as si, RetrainOriginSchema as sn, embeddingModelFailedError as sr, NC_ALARM_TRIGGERED_MAX_SEC as st, BUILTIN_CLIP_MODELS as t, string as ta, rootSupplyServes as ti, OpsLogEntrySchema as tn, derivePostTriggeredAction as tr, NC_ALARM_DEFAULT_PROFILE_ID as tt, APPEARANCE_BIN_COUNT as u, servedTemplateVars as ui, SCENE_CONFIRM_DEFAULT_TIMEOUT_MS as un, embeddingRequirementsUnavailableError as ur, NC_CLIP_POST_ROLL_DEFAULT_SEC as ut, BaseDevice as v, systemEventSummaryScheduleOf as vi, SceneMonitorSchema as vn, gifFromMp4Args as vr, NC_DEFAULT_SNOOZE_MINUTES as vt, CoverStateSchema as w, zoneAnalyticsCapability as wi, TimelapseRuleInputSchema as wn, isEventKindLabelKey as wr, NC_SYSTEM_EVENT_KIND_GROUP_SPECS as wt, COCO_TO_MACRO as x, templateVarsFor as xi, SetTrackRelationInputSchema as xn, isAudioClassName as xr, NC_GROUPING_MIN_SEC as xt, BirthDecisionRecordSchema as y, systemEventSummarySplitOf as yi, SetTrackPurityInputSchema as yn, isAlarmControllableCap as yr, NC_GROUPING_DEFAULT_SEC as yt, FIRST_LEVEL_MACRO_CLASSES as z, isDeviceScopedCap as zi, applySecureOnArmEdit as zn, notificationRulesCapability as zr, NcRulePatchSchema as zt };
|