@camstack/addon-auth 1.2.148 → 1.2.150
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/{dist-roKTj364.mjs → dist-BkvErNbe.mjs} +1656 -62
- package/dist/{dist-C2ZA1nlf.js → dist-Cfzg2F5r.js} +1685 -61
- package/dist/oidc/auth-oidc.addon.js +135 -13
- package/dist/oidc/auth-oidc.addon.mjs +135 -13
- package/dist/webauthn/_stub.js +37 -23
- package/dist/webauthn/{_virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-DDuFEkrD.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-BwTb_2Js.mjs} +3 -3
- package/dist/webauthn/_virtual_mf___mfe_internal__addon_auth_webauthn_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DCLE6WWy.mjs +26 -0
- package/dist/webauthn/auth-webauthn.addon.js +160 -53
- package/dist/webauthn/auth-webauthn.addon.mjs +160 -53
- package/dist/webauthn/{hostInit-BnyCwNxS.mjs → hostInit-kER2VIgl.mjs} +3 -3
- package/dist/webauthn/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/webauthn/_virtual_mf___mfe_internal__addon_auth_webauthn_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Jb_VAQPj.mjs +0 -26
|
@@ -32,7 +32,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
32
32
|
}) : target, mod));
|
|
33
33
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
34
|
require("node:crypto");
|
|
35
|
-
//#region ../types/dist/event-category-
|
|
35
|
+
//#region ../types/dist/event-category-BvOFi6PY.mjs
|
|
36
36
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
37
37
|
EventCategory["SystemBoot"] = "system.boot";
|
|
38
38
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -96,6 +96,24 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
96
96
|
* consumes this category and maps it to the `addon-crash-loop` kind.
|
|
97
97
|
*/
|
|
98
98
|
EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
|
|
99
|
+
/**
|
|
100
|
+
* A runner whose addon refused to start with a typed reason (D877) - parked
|
|
101
|
+
* in `refused`, never counted by the crash breaker, retried on operator
|
|
102
|
+
* action. One event per refusal.
|
|
103
|
+
*/
|
|
104
|
+
EventCategory["AddonRunnerRefused"] = "addon.runner-refused";
|
|
105
|
+
/**
|
|
106
|
+
* A runner settled on a state (D877): `running` (READY), `crashed`, `failed` or
|
|
107
|
+
* `refused`. In-process telemetry for the boot check (re-evaluate while any
|
|
108
|
+
* runner is still pending) and the alert centre (close a recovered runner).
|
|
109
|
+
*/
|
|
110
|
+
EventCategory["ProcessStateChanged"] = "process.state-changed";
|
|
111
|
+
/**
|
|
112
|
+
* The node's one-shot runner boot check (D877): planned runners against the
|
|
113
|
+
* process service, `degraded` when any is failed, refused or missing. The
|
|
114
|
+
* alert centre turns it into one alert and a direct critical push.
|
|
115
|
+
*/
|
|
116
|
+
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
99
117
|
EventCategory["AddonError"] = "addon.error";
|
|
100
118
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
101
119
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -4138,6 +4156,12 @@ var numberProcessor = (schema, ctx, _json, _params) => {
|
|
|
4138
4156
|
var booleanProcessor = (_schema, _ctx, json, _params) => {
|
|
4139
4157
|
json.type = "boolean";
|
|
4140
4158
|
};
|
|
4159
|
+
var bigintProcessor = (_schema, ctx, _json, _params) => {
|
|
4160
|
+
if (ctx.unrepresentable === "throw") throw new Error("BigInt cannot be represented in JSON Schema");
|
|
4161
|
+
};
|
|
4162
|
+
var symbolProcessor = (_schema, ctx, _json, _params) => {
|
|
4163
|
+
if (ctx.unrepresentable === "throw") throw new Error("Symbols cannot be represented in JSON Schema");
|
|
4164
|
+
};
|
|
4141
4165
|
var nullProcessor = (_schema, ctx, json, _params) => {
|
|
4142
4166
|
if (ctx.target === "openapi-3.0") {
|
|
4143
4167
|
json.type = "string";
|
|
@@ -4145,12 +4169,17 @@ var nullProcessor = (_schema, ctx, json, _params) => {
|
|
|
4145
4169
|
json.enum = [null];
|
|
4146
4170
|
} else json.type = "null";
|
|
4147
4171
|
};
|
|
4172
|
+
var undefinedProcessor = (_schema, ctx, _json, _params) => {
|
|
4173
|
+
if (ctx.unrepresentable === "throw") throw new Error("Undefined cannot be represented in JSON Schema");
|
|
4174
|
+
};
|
|
4148
4175
|
var voidProcessor = (_schema, ctx, _json, _params) => {
|
|
4149
4176
|
if (ctx.unrepresentable === "throw") throw new Error("Void cannot be represented in JSON Schema");
|
|
4150
4177
|
};
|
|
4151
4178
|
var neverProcessor = (_schema, _ctx, json, _params) => {
|
|
4152
4179
|
json.not = {};
|
|
4153
4180
|
};
|
|
4181
|
+
var anyProcessor = (_schema, _ctx, _json, _params) => {};
|
|
4182
|
+
var unknownProcessor = (_schema, _ctx, _json, _params) => {};
|
|
4154
4183
|
var dateProcessor = (_schema, ctx, _json, _params) => {
|
|
4155
4184
|
if (ctx.unrepresentable === "throw") throw new Error("Date cannot be represented in JSON Schema");
|
|
4156
4185
|
};
|
|
@@ -4182,12 +4211,53 @@ var literalProcessor = (schema, ctx, json, _params) => {
|
|
|
4182
4211
|
json.enum = vals;
|
|
4183
4212
|
}
|
|
4184
4213
|
};
|
|
4214
|
+
var nanProcessor = (_schema, ctx, _json, _params) => {
|
|
4215
|
+
if (ctx.unrepresentable === "throw") throw new Error("NaN cannot be represented in JSON Schema");
|
|
4216
|
+
};
|
|
4217
|
+
var templateLiteralProcessor = (schema, _ctx, json, _params) => {
|
|
4218
|
+
const _json = json;
|
|
4219
|
+
const pattern = schema._zod.pattern;
|
|
4220
|
+
if (!pattern) throw new Error("Pattern not found in template literal");
|
|
4221
|
+
_json.type = "string";
|
|
4222
|
+
_json.pattern = pattern.source;
|
|
4223
|
+
};
|
|
4224
|
+
var fileProcessor = (schema, _ctx, json, _params) => {
|
|
4225
|
+
const _json = json;
|
|
4226
|
+
const file = {
|
|
4227
|
+
type: "string",
|
|
4228
|
+
format: "binary",
|
|
4229
|
+
contentEncoding: "binary"
|
|
4230
|
+
};
|
|
4231
|
+
const { minimum, maximum, mime } = schema._zod.bag;
|
|
4232
|
+
if (minimum !== void 0) file.minLength = minimum;
|
|
4233
|
+
if (maximum !== void 0) file.maxLength = maximum;
|
|
4234
|
+
if (mime) if (mime.length === 1) {
|
|
4235
|
+
file.contentMediaType = mime[0];
|
|
4236
|
+
Object.assign(_json, file);
|
|
4237
|
+
} else {
|
|
4238
|
+
Object.assign(_json, file);
|
|
4239
|
+
_json.anyOf = mime.map((m) => ({ contentMediaType: m }));
|
|
4240
|
+
}
|
|
4241
|
+
else Object.assign(_json, file);
|
|
4242
|
+
};
|
|
4243
|
+
var successProcessor = (_schema, _ctx, json, _params) => {
|
|
4244
|
+
json.type = "boolean";
|
|
4245
|
+
};
|
|
4185
4246
|
var customProcessor = (_schema, ctx, _json, _params) => {
|
|
4186
4247
|
if (ctx.unrepresentable === "throw") throw new Error("Custom types cannot be represented in JSON Schema");
|
|
4187
4248
|
};
|
|
4249
|
+
var functionProcessor = (_schema, ctx, _json, _params) => {
|
|
4250
|
+
if (ctx.unrepresentable === "throw") throw new Error("Function types cannot be represented in JSON Schema");
|
|
4251
|
+
};
|
|
4188
4252
|
var transformProcessor = (_schema, ctx, _json, _params) => {
|
|
4189
4253
|
if (ctx.unrepresentable === "throw") throw new Error("Transforms cannot be represented in JSON Schema");
|
|
4190
4254
|
};
|
|
4255
|
+
var mapProcessor = (_schema, ctx, _json, _params) => {
|
|
4256
|
+
if (ctx.unrepresentable === "throw") throw new Error("Map cannot be represented in JSON Schema");
|
|
4257
|
+
};
|
|
4258
|
+
var setProcessor = (_schema, ctx, _json, _params) => {
|
|
4259
|
+
if (ctx.unrepresentable === "throw") throw new Error("Set cannot be represented in JSON Schema");
|
|
4260
|
+
};
|
|
4191
4261
|
var arrayProcessor = (schema, ctx, _json, params) => {
|
|
4192
4262
|
const json = _json;
|
|
4193
4263
|
const def = schema._zod.def;
|
|
@@ -4392,6 +4462,12 @@ var readonlyProcessor = (schema, ctx, json, params) => {
|
|
|
4392
4462
|
seen.ref = def.innerType;
|
|
4393
4463
|
json.readOnly = true;
|
|
4394
4464
|
};
|
|
4465
|
+
var promiseProcessor = (schema, ctx, _json, params) => {
|
|
4466
|
+
const def = schema._zod.def;
|
|
4467
|
+
process(def.innerType, ctx, params);
|
|
4468
|
+
const seen = ctx.seen.get(schema);
|
|
4469
|
+
seen.ref = def.innerType;
|
|
4470
|
+
};
|
|
4395
4471
|
var optionalProcessor = (schema, ctx, _json, params) => {
|
|
4396
4472
|
const def = schema._zod.def;
|
|
4397
4473
|
process(def.innerType, ctx, params);
|
|
@@ -4404,6 +4480,81 @@ var lazyProcessor = (schema, ctx, _json, params) => {
|
|
|
4404
4480
|
const seen = ctx.seen.get(schema);
|
|
4405
4481
|
seen.ref = innerType;
|
|
4406
4482
|
};
|
|
4483
|
+
var allProcessors = {
|
|
4484
|
+
string: stringProcessor,
|
|
4485
|
+
number: numberProcessor,
|
|
4486
|
+
boolean: booleanProcessor,
|
|
4487
|
+
bigint: bigintProcessor,
|
|
4488
|
+
symbol: symbolProcessor,
|
|
4489
|
+
null: nullProcessor,
|
|
4490
|
+
undefined: undefinedProcessor,
|
|
4491
|
+
void: voidProcessor,
|
|
4492
|
+
never: neverProcessor,
|
|
4493
|
+
any: anyProcessor,
|
|
4494
|
+
unknown: unknownProcessor,
|
|
4495
|
+
date: dateProcessor,
|
|
4496
|
+
enum: enumProcessor,
|
|
4497
|
+
literal: literalProcessor,
|
|
4498
|
+
nan: nanProcessor,
|
|
4499
|
+
template_literal: templateLiteralProcessor,
|
|
4500
|
+
file: fileProcessor,
|
|
4501
|
+
success: successProcessor,
|
|
4502
|
+
custom: customProcessor,
|
|
4503
|
+
function: functionProcessor,
|
|
4504
|
+
transform: transformProcessor,
|
|
4505
|
+
map: mapProcessor,
|
|
4506
|
+
set: setProcessor,
|
|
4507
|
+
array: arrayProcessor,
|
|
4508
|
+
object: objectProcessor,
|
|
4509
|
+
union: unionProcessor,
|
|
4510
|
+
intersection: intersectionProcessor,
|
|
4511
|
+
tuple: tupleProcessor,
|
|
4512
|
+
record: recordProcessor,
|
|
4513
|
+
nullable: nullableProcessor,
|
|
4514
|
+
nonoptional: nonoptionalProcessor,
|
|
4515
|
+
default: defaultProcessor,
|
|
4516
|
+
prefault: prefaultProcessor,
|
|
4517
|
+
catch: catchProcessor,
|
|
4518
|
+
pipe: pipeProcessor,
|
|
4519
|
+
readonly: readonlyProcessor,
|
|
4520
|
+
promise: promiseProcessor,
|
|
4521
|
+
optional: optionalProcessor,
|
|
4522
|
+
lazy: lazyProcessor
|
|
4523
|
+
};
|
|
4524
|
+
function toJSONSchema(input, params) {
|
|
4525
|
+
if ("_idmap" in input) {
|
|
4526
|
+
const registry = input;
|
|
4527
|
+
const ctx = initializeContext({
|
|
4528
|
+
...params,
|
|
4529
|
+
processors: allProcessors
|
|
4530
|
+
});
|
|
4531
|
+
const defs = {};
|
|
4532
|
+
for (const entry of registry._idmap.entries()) {
|
|
4533
|
+
const [_, schema] = entry;
|
|
4534
|
+
process(schema, ctx);
|
|
4535
|
+
}
|
|
4536
|
+
const schemas = {};
|
|
4537
|
+
ctx.external = {
|
|
4538
|
+
registry,
|
|
4539
|
+
uri: params?.uri,
|
|
4540
|
+
defs
|
|
4541
|
+
};
|
|
4542
|
+
for (const entry of registry._idmap.entries()) {
|
|
4543
|
+
const [key, schema] = entry;
|
|
4544
|
+
extractDefs(ctx, schema);
|
|
4545
|
+
schemas[key] = finalize(ctx, schema);
|
|
4546
|
+
}
|
|
4547
|
+
if (Object.keys(defs).length > 0) schemas.__shared = { [ctx.target === "draft-2020-12" ? "$defs" : "definitions"]: defs };
|
|
4548
|
+
return { schemas };
|
|
4549
|
+
}
|
|
4550
|
+
const ctx = initializeContext({
|
|
4551
|
+
...params,
|
|
4552
|
+
processors: allProcessors
|
|
4553
|
+
});
|
|
4554
|
+
process(input, ctx);
|
|
4555
|
+
extractDefs(ctx, input);
|
|
4556
|
+
return finalize(ctx, input);
|
|
4557
|
+
}
|
|
4407
4558
|
//#endregion
|
|
4408
4559
|
//#region ../../node_modules/zod/v4/classic/iso.js
|
|
4409
4560
|
var ZodISODateTime = /*@__PURE__*/ $constructor("ZodISODateTime", (inst, def) => {
|
|
@@ -5420,7 +5571,7 @@ var ZodIssueCode = {
|
|
|
5420
5571
|
var ZodFirstPartyTypeKind;
|
|
5421
5572
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5422
5573
|
//#endregion
|
|
5423
|
-
//#region ../types/dist/sleep-
|
|
5574
|
+
//#region ../types/dist/sleep-BegKjwUu.mjs
|
|
5424
5575
|
/**
|
|
5425
5576
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5426
5577
|
* window to float samples (D455).
|
|
@@ -5537,7 +5688,7 @@ function isKeychainStoredField(field) {
|
|
|
5537
5688
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5538
5689
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5539
5690
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5540
|
-
function isRecord$
|
|
5691
|
+
function isRecord$5(value) {
|
|
5541
5692
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5542
5693
|
}
|
|
5543
5694
|
function makeSecretMarker(ref) {
|
|
@@ -5548,12 +5699,12 @@ function makeSecretMarker(ref) {
|
|
|
5548
5699
|
}
|
|
5549
5700
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5550
5701
|
function isSecretMarker(value) {
|
|
5551
|
-
if (!isRecord$
|
|
5702
|
+
if (!isRecord$5(value)) return false;
|
|
5552
5703
|
const ref = value["$secret"];
|
|
5553
5704
|
return typeof ref === "string" && ref.length > 0;
|
|
5554
5705
|
}
|
|
5555
5706
|
function isSecretClear(value) {
|
|
5556
|
-
return isRecord$
|
|
5707
|
+
return isRecord$5(value) && value["$secretClear"] === true;
|
|
5557
5708
|
}
|
|
5558
5709
|
/**
|
|
5559
5710
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6163,7 +6314,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6163
6314
|
}
|
|
6164
6315
|
};
|
|
6165
6316
|
var KEEP = { kind: "keep" };
|
|
6166
|
-
function isRecord$
|
|
6317
|
+
function isRecord$4(value) {
|
|
6167
6318
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6168
6319
|
}
|
|
6169
6320
|
function defaultMintId() {
|
|
@@ -6176,7 +6327,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6176
6327
|
return out;
|
|
6177
6328
|
}
|
|
6178
6329
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6179
|
-
else if (isRecord$
|
|
6330
|
+
else if (isRecord$4(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6180
6331
|
return out;
|
|
6181
6332
|
}
|
|
6182
6333
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6231,7 +6382,7 @@ function rowId(row, idKey) {
|
|
|
6231
6382
|
return null;
|
|
6232
6383
|
}
|
|
6233
6384
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6234
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6385
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$4) : [];
|
|
6235
6386
|
if (!Array.isArray(incoming)) {
|
|
6236
6387
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6237
6388
|
return {
|
|
@@ -6247,7 +6398,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6247
6398
|
const kept = /* @__PURE__ */ new Set();
|
|
6248
6399
|
const rows = [];
|
|
6249
6400
|
for (const row of incoming) {
|
|
6250
|
-
if (!isRecord$
|
|
6401
|
+
if (!isRecord$4(row)) {
|
|
6251
6402
|
rows.push(row);
|
|
6252
6403
|
continue;
|
|
6253
6404
|
}
|
|
@@ -6272,7 +6423,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6272
6423
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6273
6424
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6274
6425
|
case "object": {
|
|
6275
|
-
if (!isRecord$
|
|
6426
|
+
if (!isRecord$4(incoming)) {
|
|
6276
6427
|
if (incoming === void 0) return KEEP;
|
|
6277
6428
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6278
6429
|
return {
|
|
@@ -6280,7 +6431,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6280
6431
|
value: incoming
|
|
6281
6432
|
};
|
|
6282
6433
|
}
|
|
6283
|
-
const storedObj = isRecord$
|
|
6434
|
+
const storedObj = isRecord$4(stored) ? stored : {};
|
|
6284
6435
|
return {
|
|
6285
6436
|
kind: "value",
|
|
6286
6437
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6403,7 +6554,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6403
6554
|
value: items
|
|
6404
6555
|
};
|
|
6405
6556
|
}
|
|
6406
|
-
if (isRecord$
|
|
6557
|
+
if (isRecord$4(v)) {
|
|
6407
6558
|
const out = {};
|
|
6408
6559
|
for (const [k, child] of Object.entries(v)) {
|
|
6409
6560
|
const s = substitute(child);
|
|
@@ -6435,7 +6586,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
6435
6586
|
this.name = "SecretOverwriteRefusedError";
|
|
6436
6587
|
}
|
|
6437
6588
|
};
|
|
6438
|
-
function isRecord(value) {
|
|
6589
|
+
function isRecord$3(value) {
|
|
6439
6590
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6440
6591
|
}
|
|
6441
6592
|
function resolvedValue(pass, marker) {
|
|
@@ -6464,7 +6615,7 @@ function inArray(pass, incoming, stored) {
|
|
|
6464
6615
|
return incoming.map((item, index) => {
|
|
6465
6616
|
const twin = stored[index];
|
|
6466
6617
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6467
|
-
if (isRecord(item) && isRecord(twin)) return inArrayRow(pass, item, twin);
|
|
6618
|
+
if (isRecord$3(item) && isRecord$3(twin)) return inArrayRow(pass, item, twin);
|
|
6468
6619
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6469
6620
|
return item;
|
|
6470
6621
|
});
|
|
@@ -6475,7 +6626,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6475
6626
|
const twin = stored[key];
|
|
6476
6627
|
if (isSecretMarker(twin)) {
|
|
6477
6628
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6478
|
-
} else if (isRecord(value) && isRecord(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6629
|
+
} else if (isRecord$3(value) && isRecord$3(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6479
6630
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6480
6631
|
}
|
|
6481
6632
|
return out;
|
|
@@ -6483,7 +6634,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6483
6634
|
async function walk(pass, incoming, stored) {
|
|
6484
6635
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6485
6636
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6486
|
-
if (!isRecord(incoming) || !isRecord(stored)) return incoming;
|
|
6637
|
+
if (!isRecord$3(incoming) || !isRecord$3(stored)) return incoming;
|
|
6487
6638
|
const out = { ...incoming };
|
|
6488
6639
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6489
6640
|
return out;
|
|
@@ -6514,7 +6665,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
6514
6665
|
function isJsonEqual(a, b) {
|
|
6515
6666
|
if (Object.is(a, b)) return true;
|
|
6516
6667
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6517
|
-
if (isRecord(a) && isRecord(b)) {
|
|
6668
|
+
if (isRecord$3(a) && isRecord$3(b)) {
|
|
6518
6669
|
const keys = Object.keys(a);
|
|
6519
6670
|
if (keys.length !== Object.keys(b).length) return false;
|
|
6520
6671
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -6538,7 +6689,7 @@ function markerKeysOf(blob, owner) {
|
|
|
6538
6689
|
}
|
|
6539
6690
|
function nodeFromStored(value, owner) {
|
|
6540
6691
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6541
|
-
if (!isRecord(value)) return null;
|
|
6692
|
+
if (!isRecord$3(value)) return null;
|
|
6542
6693
|
const children = /* @__PURE__ */ new Map();
|
|
6543
6694
|
for (const [key, child] of Object.entries(value)) {
|
|
6544
6695
|
const node = nodeFromStored(child, owner);
|
|
@@ -6671,7 +6822,6 @@ function createHandle(raw, opts) {
|
|
|
6671
6822
|
const writeAddon = (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p));
|
|
6672
6823
|
const readAddonStoreResult = raw.readAddonStoreResult;
|
|
6673
6824
|
const readAddonStoreKeyResult = raw.readAddonStoreKeyResult;
|
|
6674
|
-
const readDeviceStoreBatch = raw.readDeviceStoreBatch;
|
|
6675
6825
|
const overrides = {
|
|
6676
6826
|
readAddonStore: async () => resolveRead("addon", await raw.readAddonStore()),
|
|
6677
6827
|
...readAddonStoreResult !== void 0 ? { readAddonStoreResult: async () => {
|
|
@@ -6695,12 +6845,12 @@ function createHandle(raw, opts) {
|
|
|
6695
6845
|
};
|
|
6696
6846
|
} } : {},
|
|
6697
6847
|
readDeviceStore: async (deviceId) => resolveRead(`device:${deviceId}`, await raw.readDeviceStore(deviceId)),
|
|
6698
|
-
|
|
6699
|
-
const rows = await readDeviceStoreBatch
|
|
6848
|
+
readDeviceStoreBatch: async (deviceIds) => {
|
|
6849
|
+
const rows = await raw.readDeviceStoreBatch(deviceIds);
|
|
6700
6850
|
const out = /* @__PURE__ */ new Map();
|
|
6701
6851
|
for (const [deviceId, blob] of rows) out.set(deviceId, await resolveRead(`device:${deviceId}`, blob));
|
|
6702
6852
|
return out;
|
|
6703
|
-
}
|
|
6853
|
+
},
|
|
6704
6854
|
writeAddonStore: async (patch) => {
|
|
6705
6855
|
await writeAddon(patch);
|
|
6706
6856
|
},
|
|
@@ -7327,7 +7477,7 @@ var BaseAddon = class {
|
|
|
7327
7477
|
if (!ctx) return;
|
|
7328
7478
|
const addonId = ctx.id;
|
|
7329
7479
|
setImmediate(() => {
|
|
7330
|
-
ctx.api.addons
|
|
7480
|
+
ctx.api.addons.restartAddon.mutate({ addonId }).then(() => {
|
|
7331
7481
|
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
7332
7482
|
}).catch((err) => {
|
|
7333
7483
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
@@ -7527,7 +7677,7 @@ var BaseAddon = class {
|
|
|
7527
7677
|
return this._addonSecretTree;
|
|
7528
7678
|
}
|
|
7529
7679
|
deviceSecretTree() {
|
|
7530
|
-
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7680
|
+
this._deviceSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.deviceSettingsSchema()), this.secretStatePaths);
|
|
7531
7681
|
return this._deviceSecretTree;
|
|
7532
7682
|
}
|
|
7533
7683
|
/**
|
|
@@ -7603,42 +7753,135 @@ var BaseAddon = class {
|
|
|
7603
7753
|
this[timerOf] = timer;
|
|
7604
7754
|
}
|
|
7605
7755
|
/**
|
|
7606
|
-
* Wrap `ctx.settings.readAddonStore()` with a
|
|
7607
|
-
*
|
|
7608
|
-
* swap, or any race where the SqliteSettingsBackend is between shutdown and
|
|
7609
|
-
* re-initialize) doesn't propagate up into `initialize()` and leave the
|
|
7756
|
+
* Wrap `ctx.settings.readAddonStore()` with a retry budget so a transient
|
|
7757
|
+
* settings-store outage doesn't propagate up into `initialize()` and leave the
|
|
7610
7758
|
* addon permanently broken.
|
|
7611
7759
|
*
|
|
7612
|
-
*
|
|
7613
|
-
*
|
|
7614
|
-
* `
|
|
7760
|
+
* Two kinds of outage, two budgets:
|
|
7761
|
+
* - the store's own restart fingerprints (`SqliteSettingsBackend not
|
|
7762
|
+
* initialized`, `provider not available`): a short budget, then the addon
|
|
7763
|
+
* falls back to `{}` (defaults) - its first successful patch rehydrates;
|
|
7764
|
+
* - a TRANSPORT failure (the hub is restarting while this runner boots:
|
|
7765
|
+
* `discovery deadline exceeded`, `parent could not route`, a refused or
|
|
7766
|
+
* timed-out connection). Since D870 a runner's settings read THROWS instead
|
|
7767
|
+
* of answering `{}`, so without a budget a hub restart ends in a respawn
|
|
7768
|
+
* loop. A long, bounded budget; only after it the error propagates - the
|
|
7769
|
+
* addon never runs on defaults for a store it could not ask.
|
|
7770
|
+
* Anything else propagates immediately so real bugs surface.
|
|
7615
7771
|
*/
|
|
7616
7772
|
async readAddonStoreWithRetry() {
|
|
7617
7773
|
const settings = this.rawSettings();
|
|
7618
7774
|
if (!settings) return {};
|
|
7619
|
-
const delaysMs = [
|
|
7620
|
-
150,
|
|
7621
|
-
350,
|
|
7622
|
-
600,
|
|
7623
|
-
900
|
|
7624
|
-
];
|
|
7625
7775
|
let lastErr;
|
|
7626
|
-
for (let attempt = 0
|
|
7776
|
+
for (let attempt = 0;; attempt++) try {
|
|
7627
7777
|
const stored = await settings.readAddonStore() ?? {};
|
|
7628
7778
|
this.settingsStoreReady = true;
|
|
7629
7779
|
return stored;
|
|
7630
7780
|
} catch (err) {
|
|
7631
7781
|
lastErr = err;
|
|
7632
|
-
const
|
|
7633
|
-
if (
|
|
7634
|
-
|
|
7635
|
-
|
|
7782
|
+
const kind = classifyStoreError(err);
|
|
7783
|
+
if (kind === "permanent") throw err;
|
|
7784
|
+
const delay = (kind === "transport" ? TRANSPORT_RETRY_DELAYS_MS : RESTART_RETRY_DELAYS_MS)[attempt];
|
|
7785
|
+
if (delay === void 0) {
|
|
7786
|
+
if (kind === "transport") throw err;
|
|
7787
|
+
break;
|
|
7788
|
+
}
|
|
7789
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
7636
7790
|
}
|
|
7637
7791
|
this.settingsStoreReady = false;
|
|
7638
7792
|
this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
|
|
7639
7793
|
return {};
|
|
7640
7794
|
}
|
|
7641
7795
|
};
|
|
7796
|
+
/** The settings store's own restart fingerprints. */
|
|
7797
|
+
var RESTART_RETRY_DELAYS_MS = [
|
|
7798
|
+
150,
|
|
7799
|
+
350,
|
|
7800
|
+
600,
|
|
7801
|
+
900
|
|
7802
|
+
];
|
|
7803
|
+
/** A hub restarting under a booting runner: ~100 s in total. */
|
|
7804
|
+
var TRANSPORT_RETRY_DELAYS_MS = [
|
|
7805
|
+
150,
|
|
7806
|
+
350,
|
|
7807
|
+
600,
|
|
7808
|
+
900,
|
|
7809
|
+
2e3,
|
|
7810
|
+
5e3,
|
|
7811
|
+
1e4,
|
|
7812
|
+
2e4,
|
|
7813
|
+
3e4,
|
|
7814
|
+
3e4
|
|
7815
|
+
];
|
|
7816
|
+
var RESTART_FINGERPRINTS = ["SqliteSettingsBackend not initialized", "provider not available"];
|
|
7817
|
+
/** Node / socket error codes of a connection that did not happen or broke. */
|
|
7818
|
+
var TRANSPORT_CODES = new Set([
|
|
7819
|
+
"ECONNREFUSED",
|
|
7820
|
+
"ECONNRESET",
|
|
7821
|
+
"ETIMEDOUT",
|
|
7822
|
+
"EPIPE",
|
|
7823
|
+
"EHOSTUNREACH",
|
|
7824
|
+
"ENETUNREACH"
|
|
7825
|
+
]);
|
|
7826
|
+
/** tRPC error codes that mean "the other side is not answering now", not "your call is wrong". */
|
|
7827
|
+
var UNAVAILABLE_TRPC_CODES = new Set([
|
|
7828
|
+
"TIMEOUT",
|
|
7829
|
+
"SERVICE_UNAVAILABLE",
|
|
7830
|
+
"BAD_GATEWAY",
|
|
7831
|
+
"GATEWAY_TIMEOUT"
|
|
7832
|
+
]);
|
|
7833
|
+
/** The exact phrases OUR transport raises when it cannot reach the hub. */
|
|
7834
|
+
var TRANSPORT_PHRASES = [
|
|
7835
|
+
"discovery deadline exceeded",
|
|
7836
|
+
"parent could not route child unowned cap call",
|
|
7837
|
+
"UDS request timed out after",
|
|
7838
|
+
"channel closed"
|
|
7839
|
+
];
|
|
7840
|
+
/** Moleculer error `type`s of a call that could not be served right now. */
|
|
7841
|
+
var MOLECULER_TRANSIENT_TYPES = new Set([
|
|
7842
|
+
"REQUEST_TIMEOUT",
|
|
7843
|
+
"SERVICE_NOT_FOUND",
|
|
7844
|
+
"SERVICE_NOT_AVAILABLE",
|
|
7845
|
+
"REQUEST_REJECTED",
|
|
7846
|
+
"BROKER_DISCONNECTED"
|
|
7847
|
+
]);
|
|
7848
|
+
function stringProp(value, key) {
|
|
7849
|
+
if (typeof value !== "object" || value === null) return void 0;
|
|
7850
|
+
const found = Reflect.get(value, key);
|
|
7851
|
+
return typeof found === "string" ? found : void 0;
|
|
7852
|
+
}
|
|
7853
|
+
/** The code an error carries: its own, its cause's, or a tRPC `data.code`. */
|
|
7854
|
+
function errorCode(err) {
|
|
7855
|
+
const out = {};
|
|
7856
|
+
const cause = typeof err === "object" && err !== null ? Reflect.get(err, "cause") : void 0;
|
|
7857
|
+
const data = typeof err === "object" && err !== null ? Reflect.get(err, "data") : void 0;
|
|
7858
|
+
const node = stringProp(err, "code") ?? stringProp(cause, "code");
|
|
7859
|
+
if (node !== void 0) out.node = node;
|
|
7860
|
+
const trpc = stringProp(data, "code");
|
|
7861
|
+
if (trpc !== void 0) out.trpc = trpc;
|
|
7862
|
+
return out;
|
|
7863
|
+
}
|
|
7864
|
+
/**
|
|
7865
|
+
* Is a settings read failure worth retrying, and with which budget? Only
|
|
7866
|
+
* EXPLICIT signals count: a socket error code, a tRPC "unavailable" code, or
|
|
7867
|
+
* one of the exact phrases our own transport raises. A message that merely
|
|
7868
|
+
* contains "timed out" or "unreachable" is not evidence of anything, and
|
|
7869
|
+
* `settings store not wired` is a wiring bug that retrying cannot fix.
|
|
7870
|
+
*/
|
|
7871
|
+
function classifyStoreError(err) {
|
|
7872
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
7873
|
+
if (RESTART_FINGERPRINTS.some((f) => message.includes(f))) return "restart";
|
|
7874
|
+
const code = errorCode(err);
|
|
7875
|
+
if (code.node !== void 0 && TRANSPORT_CODES.has(code.node)) return "transport";
|
|
7876
|
+
if (code.trpc !== void 0 && UNAVAILABLE_TRPC_CODES.has(code.trpc)) return "transport";
|
|
7877
|
+
if (typeof err === "object" && err !== null) {
|
|
7878
|
+
if (Reflect.get(err, "retryable") === true) return "transport";
|
|
7879
|
+
const type = stringProp(err, "type");
|
|
7880
|
+
if (type !== void 0 && MOLECULER_TRANSIENT_TYPES.has(type)) return "transport";
|
|
7881
|
+
}
|
|
7882
|
+
if (TRANSPORT_PHRASES.some((f) => message.includes(f))) return "transport";
|
|
7883
|
+
return "permanent";
|
|
7884
|
+
}
|
|
7642
7885
|
/**
|
|
7643
7886
|
* Collect the keys of every field marked `perNode: true`, recursing into
|
|
7644
7887
|
* layout containers (`group` fields and `sub-tabs` tabs) the same way
|
|
@@ -7728,6 +7971,341 @@ var PeerBytesTicketSchema = object({
|
|
|
7728
7971
|
*/
|
|
7729
7972
|
declaredBytes: number().int().nonnegative().nullable()
|
|
7730
7973
|
});
|
|
7974
|
+
/** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
|
|
7975
|
+
/** The files a kind may live in. `history` is device-history's (D850), never records. */
|
|
7976
|
+
var RECORD_DATABASES = ["settings", "events"];
|
|
7977
|
+
/** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
|
|
7978
|
+
var RECORD_CLASSES = [
|
|
7979
|
+
"config",
|
|
7980
|
+
"ledger",
|
|
7981
|
+
"audit",
|
|
7982
|
+
"mirror",
|
|
7983
|
+
"ephemeral"
|
|
7984
|
+
];
|
|
7985
|
+
var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
|
|
7986
|
+
var RECORD_MAX_DATA_BYTES = 1024 * 1024;
|
|
7987
|
+
var RECORD_BATCH_MAX = 1e3;
|
|
7988
|
+
var RECORD_QUERY_MAX = 1e3;
|
|
7989
|
+
/** A kind in the `settings` file may not bound itself above this (D447: high volume is `events`). */
|
|
7990
|
+
var RECORD_SETTINGS_MAX_ROWS = 5e4;
|
|
7991
|
+
var PREFIX = "records/";
|
|
7992
|
+
/** The base of every records failure. `detail` is the human part of the message. */
|
|
7993
|
+
var RecordsError = class extends Error {
|
|
7994
|
+
code;
|
|
7995
|
+
detail;
|
|
7996
|
+
constructor(code, detail) {
|
|
7997
|
+
super(`${PREFIX}${code}: ${detail}`);
|
|
7998
|
+
this.name = "RecordsError";
|
|
7999
|
+
this.code = code;
|
|
8000
|
+
this.detail = detail;
|
|
8001
|
+
}
|
|
8002
|
+
};
|
|
8003
|
+
/** The keychain could not store or serve a value: explicit, never an empty string. */
|
|
8004
|
+
var RecordSecretUnavailableError = class extends RecordsError {
|
|
8005
|
+
constructor(detail) {
|
|
8006
|
+
super("secret-unavailable", detail);
|
|
8007
|
+
this.name = "RecordSecretUnavailableError";
|
|
8008
|
+
}
|
|
8009
|
+
};
|
|
8010
|
+
var InvalidRecordError = class extends RecordsError {
|
|
8011
|
+
constructor(detail) {
|
|
8012
|
+
super("invalid-record", detail);
|
|
8013
|
+
this.name = "InvalidRecordError";
|
|
8014
|
+
}
|
|
8015
|
+
};
|
|
8016
|
+
/** A kind declaration the engine refuses (non-additive change, bad shape, wrong file). */
|
|
8017
|
+
var DeclarationRefusedError = class extends RecordsError {
|
|
8018
|
+
constructor(detail) {
|
|
8019
|
+
super("declaration-refused", detail);
|
|
8020
|
+
this.name = "DeclarationRefusedError";
|
|
8021
|
+
}
|
|
8022
|
+
};
|
|
8023
|
+
function defOf(schema) {
|
|
8024
|
+
const zodBag = Reflect.get(schema, "_zod");
|
|
8025
|
+
if (typeof zodBag !== "object" || zodBag === null) return {};
|
|
8026
|
+
const def = Reflect.get(zodBag, "def");
|
|
8027
|
+
if (typeof def !== "object" || def === null) return {};
|
|
8028
|
+
return def;
|
|
8029
|
+
}
|
|
8030
|
+
function declaredHere(schema) {
|
|
8031
|
+
return globalRegistry.get(schema)?.secret === true;
|
|
8032
|
+
}
|
|
8033
|
+
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
8034
|
+
var WRAPPERS = new Set([
|
|
8035
|
+
"optional",
|
|
8036
|
+
"nullable",
|
|
8037
|
+
"default",
|
|
8038
|
+
"prefault",
|
|
8039
|
+
"catch",
|
|
8040
|
+
"readonly",
|
|
8041
|
+
"nonoptional"
|
|
8042
|
+
]);
|
|
8043
|
+
/**
|
|
8044
|
+
* The schema layers that make up ONE field: the schema itself and every
|
|
8045
|
+
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
8046
|
+
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
8047
|
+
* `.transform` on `in`).
|
|
8048
|
+
*/
|
|
8049
|
+
function layersOf(schema) {
|
|
8050
|
+
const out = [];
|
|
8051
|
+
const queue = [schema];
|
|
8052
|
+
while (queue.length > 0) {
|
|
8053
|
+
const s = queue.shift();
|
|
8054
|
+
if (!s || out.includes(s)) continue;
|
|
8055
|
+
out.push(s);
|
|
8056
|
+
const def = defOf(s);
|
|
8057
|
+
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
8058
|
+
if (def.type === "pipe") {
|
|
8059
|
+
if (def.in) queue.push(def.in);
|
|
8060
|
+
if (def.out) queue.push(def.out);
|
|
8061
|
+
}
|
|
8062
|
+
}
|
|
8063
|
+
return out;
|
|
8064
|
+
}
|
|
8065
|
+
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
8066
|
+
function isZodSecret(schema) {
|
|
8067
|
+
return layersOf(schema).some(declaredHere);
|
|
8068
|
+
}
|
|
8069
|
+
/**
|
|
8070
|
+
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
8071
|
+
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
8072
|
+
* object or array is reported as one path and not descended into — everything
|
|
8073
|
+
* under it is secret.
|
|
8074
|
+
*/
|
|
8075
|
+
function collectZodSecretPaths(schema, prefix = "") {
|
|
8076
|
+
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
8077
|
+
const paths = [];
|
|
8078
|
+
for (const layer of layersOf(schema)) {
|
|
8079
|
+
const def = defOf(layer);
|
|
8080
|
+
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
8081
|
+
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
8082
|
+
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
8083
|
+
else if (def.type === "intersection") {
|
|
8084
|
+
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
8085
|
+
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
8086
|
+
}
|
|
8087
|
+
}
|
|
8088
|
+
return [...new Set(paths)];
|
|
8089
|
+
}
|
|
8090
|
+
/**
|
|
8091
|
+
* Secret fields of a record, addressed the way a Zod schema declares them
|
|
8092
|
+
* (`collectZodSecretPaths`): dotted keys, `[]` for "each element of this array"
|
|
8093
|
+
* (`auth.accessToken`, `headers[].value`).
|
|
8094
|
+
*
|
|
8095
|
+
* Array elements are matched by a DECLARED id key (`secretArrayKeys`:
|
|
8096
|
+
* `{ headers: 'name' }`), never by index, so reordering a list keeps every
|
|
8097
|
+
* keychain ref (the same rule as `arrayItemFieldPath`). The concrete path of a
|
|
8098
|
+
* leaf names its element: `headers[X-Api].value`.
|
|
8099
|
+
*
|
|
8100
|
+
* Pure and browser-safe. Nothing here mutates: every transform returns a new value.
|
|
8101
|
+
*/
|
|
8102
|
+
/** The array prefixes (declared form, e.g. `headers` or `a.headers`) of a path. */
|
|
8103
|
+
function parseSecretPath(path) {
|
|
8104
|
+
if (path.length === 0) throw new InvalidRecordError("an empty secret path");
|
|
8105
|
+
return path.split(".").map((raw) => {
|
|
8106
|
+
const each = raw.endsWith("[]");
|
|
8107
|
+
const key = each ? raw.slice(0, -2) : raw;
|
|
8108
|
+
if (key.length === 0) throw new InvalidRecordError(`secret path "${path}" has an empty segment`);
|
|
8109
|
+
return {
|
|
8110
|
+
key,
|
|
8111
|
+
each
|
|
8112
|
+
};
|
|
8113
|
+
});
|
|
8114
|
+
}
|
|
8115
|
+
/** The declared array prefixes of `path` that need an id key (`headers`, `a.rows`). */
|
|
8116
|
+
function secretArrayPrefixes(path) {
|
|
8117
|
+
const segments = parseSecretPath(path);
|
|
8118
|
+
const prefixes = [];
|
|
8119
|
+
const walked = [];
|
|
8120
|
+
for (const segment of segments) {
|
|
8121
|
+
walked.push(segment.key);
|
|
8122
|
+
if (segment.each) prefixes.push(walked.join("."));
|
|
8123
|
+
}
|
|
8124
|
+
return prefixes;
|
|
8125
|
+
}
|
|
8126
|
+
/**
|
|
8127
|
+
* Record kinds (D881): the declaration an addon makes of one kind of fact, the
|
|
8128
|
+
* Zod row schema that describes it, and the helper that turns the two into the
|
|
8129
|
+
* JSON the engine stores.
|
|
8130
|
+
*
|
|
8131
|
+
* A kind is declared ONCE, next to the code that owns it, and the engine's
|
|
8132
|
+
* reconciler creates its indexes - nothing creates DDL at runtime from a write.
|
|
8133
|
+
* Everything the generic machinery needs (secret fields, the entry descriptor)
|
|
8134
|
+
* is DERIVED from the Zod schema: `.meta({ secret: true })` marks a credential,
|
|
8135
|
+
* never a field name (D879).
|
|
8136
|
+
*/
|
|
8137
|
+
/** A JSON field path: `trackId`, `auth.accessToken`. Charset-restricted: it is rendered into DDL. */
|
|
8138
|
+
var RecordFieldPathSchema = string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,63}(\.[A-Za-z_][A-Za-z0-9_]{0,63}){0,3}$/);
|
|
8139
|
+
var RecordIndexSchema = object({
|
|
8140
|
+
name: string().regex(/^[a-z][a-z0-9_]{0,31}$/),
|
|
8141
|
+
fields: array(RecordFieldPathSchema).min(1).max(4),
|
|
8142
|
+
unique: boolean().optional()
|
|
8143
|
+
}).strict();
|
|
8144
|
+
var RecordRetentionSchema = union([
|
|
8145
|
+
object({
|
|
8146
|
+
ttlMs: number().int().positive(),
|
|
8147
|
+
from: _enum(["at", "write"])
|
|
8148
|
+
}).strict(),
|
|
8149
|
+
object({
|
|
8150
|
+
maxRows: number().int().positive().optional(),
|
|
8151
|
+
maxRowsPerDevice: number().int().positive().optional()
|
|
8152
|
+
}).strict().refine((r) => r.maxRows !== void 0 || r.maxRowsPerDevice !== void 0, { message: "name maxRows, maxRowsPerDevice or both" }),
|
|
8153
|
+
object({
|
|
8154
|
+
owner: string().min(1),
|
|
8155
|
+
reason: string().min(1)
|
|
8156
|
+
}).strict(),
|
|
8157
|
+
object({ none: string().min(1) }).strict()
|
|
8158
|
+
]);
|
|
8159
|
+
/** The descriptor a generic entries UI reads (D881 "generic entries"). */
|
|
8160
|
+
var EntryDescriptorSchema = object({
|
|
8161
|
+
title: string().min(1),
|
|
8162
|
+
/** The record body field shown as the entry's name. */
|
|
8163
|
+
nameField: string().min(1),
|
|
8164
|
+
/** JSON Schema of the entry body; `secret: true` marks a password field. */
|
|
8165
|
+
fields: record(string(), unknown())
|
|
8166
|
+
}).strict();
|
|
8167
|
+
/** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
|
|
8168
|
+
var RecordKindDeclarationSchema = object({
|
|
8169
|
+
database: _enum(RECORD_DATABASES).default("settings"),
|
|
8170
|
+
class: _enum(RECORD_CLASSES),
|
|
8171
|
+
writeTrigger: string().min(1),
|
|
8172
|
+
device: _enum([
|
|
8173
|
+
"required",
|
|
8174
|
+
"optional",
|
|
8175
|
+
"none"
|
|
8176
|
+
]).default("none"),
|
|
8177
|
+
at: _enum(["required", "none"]).default("none"),
|
|
8178
|
+
indexes: array(RecordIndexSchema).max(8).default([]),
|
|
8179
|
+
retention: RecordRetentionSchema,
|
|
8180
|
+
deviceRemoval: _enum(["delete", "none"]).default("none"),
|
|
8181
|
+
maxDataBytes: number().int().positive().max(RECORD_MAX_DATA_BYTES).default(RECORD_DEFAULT_MAX_DATA_BYTES),
|
|
8182
|
+
/** Derived from the Zod schema; never written by hand. */
|
|
8183
|
+
secretPaths: array(string().min(1)).default([]),
|
|
8184
|
+
/** The id key of each array that carries a secret (`{ headers: 'name' }`). */
|
|
8185
|
+
secretArrayKeys: record(string(), string()).default({}),
|
|
8186
|
+
/** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
|
|
8187
|
+
adoptsFrom: string().min(1).optional(),
|
|
8188
|
+
/** Kinds that must agree through `transact` sit in one file under one family name. */
|
|
8189
|
+
transactFamily: string().min(1).optional(),
|
|
8190
|
+
entry: EntryDescriptorSchema.optional()
|
|
8191
|
+
}).strict();
|
|
8192
|
+
/** The kind names: lower-case, dash separated, short enough for an index name. */
|
|
8193
|
+
var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
8194
|
+
/** Cross-field rules a declaration must satisfy. Throws {@link DeclarationRefusedError}. */
|
|
8195
|
+
function assertValidDeclaration(name, decl) {
|
|
8196
|
+
const refuse = (why) => {
|
|
8197
|
+
throw new DeclarationRefusedError(`kind "${name}": ${why}`);
|
|
8198
|
+
};
|
|
8199
|
+
if (!RecordKindNameSchema.safeParse(name).success) refuse("the name must be lower-case-dashed");
|
|
8200
|
+
const seen = /* @__PURE__ */ new Set();
|
|
8201
|
+
for (const index of decl.indexes) {
|
|
8202
|
+
if (seen.has(index.name)) refuse(`index name "${index.name}" is declared twice`);
|
|
8203
|
+
seen.add(index.name);
|
|
8204
|
+
}
|
|
8205
|
+
const { retention } = decl;
|
|
8206
|
+
const hasSecrets = decl.secretPaths.length > 0;
|
|
8207
|
+
if ("ttlMs" in retention) {
|
|
8208
|
+
if (retention.from === "at" && decl.at !== "required") refuse("a ttl from \"at\" needs at: \"required\"");
|
|
8209
|
+
if (hasSecrets) refuse("a kind with secret fields cannot use engine TTL (its keychain values would be orphaned)");
|
|
8210
|
+
}
|
|
8211
|
+
if ("maxRows" in retention || "maxRowsPerDevice" in retention) {
|
|
8212
|
+
if (retention.maxRowsPerDevice !== void 0 && decl.device !== "required") refuse("maxRowsPerDevice needs device: \"required\"");
|
|
8213
|
+
if (decl.at !== "required") refuse("a row bound trims the oldest \"at\": it needs at: \"required\"");
|
|
8214
|
+
if (hasSecrets) refuse("a kind with secret fields cannot use an engine row bound");
|
|
8215
|
+
const bound = Math.max(retention.maxRows ?? 0, retention.maxRowsPerDevice ?? 0);
|
|
8216
|
+
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)`);
|
|
8217
|
+
}
|
|
8218
|
+
if (decl.deviceRemoval === "delete" && decl.device === "none") refuse("deviceRemoval: \"delete\" needs a device: \"required\" or \"optional\"");
|
|
8219
|
+
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`);
|
|
8220
|
+
}
|
|
8221
|
+
function bodyFieldsOf(schema) {
|
|
8222
|
+
return { ...toJSONSchema(schema, {
|
|
8223
|
+
unrepresentable: "any",
|
|
8224
|
+
io: "input"
|
|
8225
|
+
}) };
|
|
8226
|
+
}
|
|
8227
|
+
function isRecordLike(value) {
|
|
8228
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
8229
|
+
}
|
|
8230
|
+
/** Does every branch of the body schema carry `field`? (A discriminated union has several.) */
|
|
8231
|
+
function hasNameField(json, field) {
|
|
8232
|
+
const branches = json["oneOf"] ?? json["anyOf"];
|
|
8233
|
+
if (Array.isArray(branches)) return branches.length > 0 && branches.every((b) => isRecordLike(b) && hasNameField(b, field));
|
|
8234
|
+
const properties = json["properties"];
|
|
8235
|
+
return isRecordLike(properties) && Object.prototype.hasOwnProperty.call(properties, field);
|
|
8236
|
+
}
|
|
8237
|
+
/**
|
|
8238
|
+
* Declare the kinds of a package. The keys are the kind names. The result is
|
|
8239
|
+
* what `ctx.records.declare` sends to the engine and what `ctx.records.kind`
|
|
8240
|
+
* types its handle from.
|
|
8241
|
+
*/
|
|
8242
|
+
function defineRecordKinds(specs) {
|
|
8243
|
+
const out = {};
|
|
8244
|
+
for (const [name, spec] of Object.entries(specs)) {
|
|
8245
|
+
const secretPaths = collectZodSecretPaths(spec.schema);
|
|
8246
|
+
const nameField = spec.entry?.nameField ?? "name";
|
|
8247
|
+
const fields = bodyFieldsOf(spec.schema);
|
|
8248
|
+
if (spec.entry !== void 0 && !hasNameField(fields, nameField)) throw new DeclarationRefusedError(`kind "${name}": an entry kind's schema needs a "${nameField}" field`);
|
|
8249
|
+
const parsed = RecordKindDeclarationSchema.parse({
|
|
8250
|
+
database: spec.database,
|
|
8251
|
+
class: spec.class,
|
|
8252
|
+
writeTrigger: spec.writeTrigger,
|
|
8253
|
+
device: spec.device,
|
|
8254
|
+
at: spec.at,
|
|
8255
|
+
indexes: spec.indexes === void 0 ? void 0 : [...spec.indexes],
|
|
8256
|
+
retention: spec.retention,
|
|
8257
|
+
deviceRemoval: spec.deviceRemoval,
|
|
8258
|
+
maxDataBytes: spec.maxDataBytes,
|
|
8259
|
+
secretPaths: [...secretPaths],
|
|
8260
|
+
secretArrayKeys: spec.secretArrayKeys === void 0 ? void 0 : { ...spec.secretArrayKeys },
|
|
8261
|
+
adoptsFrom: spec.adoptsFrom,
|
|
8262
|
+
transactFamily: spec.transactFamily,
|
|
8263
|
+
entry: spec.entry === void 0 ? void 0 : {
|
|
8264
|
+
title: spec.entry.title,
|
|
8265
|
+
nameField,
|
|
8266
|
+
fields
|
|
8267
|
+
}
|
|
8268
|
+
});
|
|
8269
|
+
assertValidDeclaration(name, parsed);
|
|
8270
|
+
out[name] = {
|
|
8271
|
+
name,
|
|
8272
|
+
schema: spec.schema,
|
|
8273
|
+
declaration: parsed
|
|
8274
|
+
};
|
|
8275
|
+
}
|
|
8276
|
+
return out;
|
|
8277
|
+
}
|
|
8278
|
+
/**
|
|
8279
|
+
* Declare one entry kind. An entry is configuration: never trimmed by the
|
|
8280
|
+
* engine, never aged, belonging to no device.
|
|
8281
|
+
*/
|
|
8282
|
+
function defineEntryKind(name, spec) {
|
|
8283
|
+
const defined = defineRecordKinds({ [name]: {
|
|
8284
|
+
schema: spec.schema,
|
|
8285
|
+
class: "config",
|
|
8286
|
+
writeTrigger: spec.writeTrigger ?? "an operator adds or edits an entry in the entries UI",
|
|
8287
|
+
retention: { none: "an entry goes only when the operator deletes it" },
|
|
8288
|
+
...spec.database === void 0 ? {} : { database: spec.database },
|
|
8289
|
+
...spec.indexes === void 0 ? {} : { indexes: spec.indexes },
|
|
8290
|
+
...spec.secretArrayKeys === void 0 ? {} : { secretArrayKeys: spec.secretArrayKeys },
|
|
8291
|
+
...spec.adoptsFrom === void 0 ? {} : { adoptsFrom: spec.adoptsFrom },
|
|
8292
|
+
entry: {
|
|
8293
|
+
title: spec.title,
|
|
8294
|
+
...spec.nameField === void 0 ? {} : { nameField: spec.nameField }
|
|
8295
|
+
}
|
|
8296
|
+
} })[name];
|
|
8297
|
+
if (defined === void 0) throw new DeclarationRefusedError(`entry kind "${name}" was not built`);
|
|
8298
|
+
return defined;
|
|
8299
|
+
}
|
|
8300
|
+
/**
|
|
8301
|
+
* Legacy source for entry adoption (B3): a list stored under addon-settings
|
|
8302
|
+
* `<addonId>.<key>` until records-adopt copies rows into the entry kind.
|
|
8303
|
+
*/
|
|
8304
|
+
var SETTINGS_ARRAY_ADOPTS_PREFIX = "@settings-array/";
|
|
8305
|
+
/** The `adoptsFrom` value for an addon-settings array field. */
|
|
8306
|
+
function settingsArrayAdoptsFrom(addonId, settingsKey) {
|
|
8307
|
+
return `${SETTINGS_ARRAY_ADOPTS_PREFIX}${addonId}/${settingsKey}`;
|
|
8308
|
+
}
|
|
7731
8309
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
7732
8310
|
var CamProfileSchema = _enum([
|
|
7733
8311
|
"high",
|
|
@@ -8193,7 +8771,7 @@ object({
|
|
|
8193
8771
|
params: record(string(), union([string(), number()])).optional()
|
|
8194
8772
|
});
|
|
8195
8773
|
//#endregion
|
|
8196
|
-
//#region ../types/dist/err-msg-
|
|
8774
|
+
//#region ../types/dist/err-msg-BXKzRBwg.mjs
|
|
8197
8775
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
8198
8776
|
DeviceType["Camera"] = "camera";
|
|
8199
8777
|
DeviceType["Hub"] = "hub";
|
|
@@ -8285,6 +8863,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
8285
8863
|
* native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
|
|
8286
8864
|
* integrations sharing the same food/desiccant/hopper surface. */
|
|
8287
8865
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
8866
|
+
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
8867
|
+
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
8868
|
+
* Sources: native Bosch Home Connect, reusable by similar integrations. */
|
|
8869
|
+
DeviceType["Dishwasher"] = "dishwasher";
|
|
8288
8870
|
return DeviceType;
|
|
8289
8871
|
}({});
|
|
8290
8872
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -8462,6 +9044,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
8462
9044
|
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
8463
9045
|
* real Switch device for UI rendering / export adapters. */
|
|
8464
9046
|
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
9047
|
+
/** A smart plug: a `switch` whose source says it is an outlet (HA
|
|
9048
|
+
* `device_class: outlet`). The Alexa export shows it as a SMARTPLUG. */
|
|
9049
|
+
DeviceRole["Outlet"] = "outlet";
|
|
8465
9050
|
/** Generic motion / occupancy / moving event source. Distinct from
|
|
8466
9051
|
* the camera accessory PirSensor role: that one is a camera child;
|
|
8467
9052
|
* this is a standalone HA / 3rd-party motion sensor. */
|
|
@@ -8539,7 +9124,7 @@ function errMsg(err) {
|
|
|
8539
9124
|
return String(err);
|
|
8540
9125
|
}
|
|
8541
9126
|
//#endregion
|
|
8542
|
-
//#region ../types/dist/composition-
|
|
9127
|
+
//#region ../types/dist/composition-CB6PMT9p.mjs
|
|
8543
9128
|
/**
|
|
8544
9129
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
8545
9130
|
*
|
|
@@ -11860,11 +12445,10 @@ var ClipModelMetaSchema = object({
|
|
|
11860
12445
|
/**
|
|
11861
12446
|
* The `vector-store` index this model's vectors live in. ONE feature space
|
|
11862
12447
|
* per index: two models share an index only when their vectors are ranked
|
|
11863
|
-
* against each other, which for CLIP means never across families.
|
|
11864
|
-
*
|
|
11865
|
-
* `modelId`); any other model gets its own.
|
|
12448
|
+
* against each other, which for CLIP means never across families. Every
|
|
12449
|
+
* model gets its own.
|
|
11866
12450
|
*/
|
|
11867
|
-
vectorIndex: string().regex(/^object-clip
|
|
12451
|
+
vectorIndex: string().regex(/^object-clip-[a-z0-9][a-z0-9-]*$/),
|
|
11868
12452
|
/**
|
|
11869
12453
|
* The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
|
|
11870
12454
|
* must be unique per tokenizer: every model's siblings land in ONE flat
|
|
@@ -13289,8 +13873,13 @@ var AlertSeveritySchema = _enum([
|
|
|
13289
13873
|
"info",
|
|
13290
13874
|
"success",
|
|
13291
13875
|
"warning",
|
|
13292
|
-
"error"
|
|
13876
|
+
"error",
|
|
13877
|
+
"critical"
|
|
13293
13878
|
]);
|
|
13879
|
+
var AlertActionSchema = object({
|
|
13880
|
+
label: string(),
|
|
13881
|
+
href: string().optional()
|
|
13882
|
+
});
|
|
13294
13883
|
var AlertStatusSchema = _enum([
|
|
13295
13884
|
"active",
|
|
13296
13885
|
"in-progress",
|
|
@@ -13308,6 +13897,7 @@ var AlertSchema = object({
|
|
|
13308
13897
|
severity: AlertSeveritySchema,
|
|
13309
13898
|
title: string(),
|
|
13310
13899
|
message: string(),
|
|
13900
|
+
action: AlertActionSchema.optional(),
|
|
13311
13901
|
status: AlertStatusSchema,
|
|
13312
13902
|
progress: number().optional(),
|
|
13313
13903
|
read: boolean(),
|
|
@@ -15750,6 +16340,41 @@ var ComposableCapabilitiesSchema = object({ caps: array(object({
|
|
|
15750
16340
|
keyField: string()
|
|
15751
16341
|
}).optional()
|
|
15752
16342
|
})) });
|
|
16343
|
+
/**
|
|
16344
|
+
* The report of a one-shot "move this owner's plaintext secrets into the
|
|
16345
|
+
* keychain" run (D878). COUNTS only - never a value, never a ref.
|
|
16346
|
+
*
|
|
16347
|
+
* The owner runs it on its own rows, through its own write path; an operator
|
|
16348
|
+
* script (`scripts/hub/migrate-raw-secrets.ts`) calls the owner's cap method.
|
|
16349
|
+
* Dry run (`apply: false`) reports what WOULD move and changes nothing.
|
|
16350
|
+
*/
|
|
16351
|
+
var RawSecretMigrationInputSchema = object({
|
|
16352
|
+
/** `false` (the default of the script) = report only. */
|
|
16353
|
+
apply: boolean() });
|
|
16354
|
+
var RawSecretMigrationReportSchema = object({
|
|
16355
|
+
apply: boolean(),
|
|
16356
|
+
/** Rows that can carry a secret (a profile, an enrolment). */
|
|
16357
|
+
rows: number().int(),
|
|
16358
|
+
/** Rows whose secret was plaintext when the run started. */
|
|
16359
|
+
raw: number().int(),
|
|
16360
|
+
/** Rows that already held a keychain marker when the run started. */
|
|
16361
|
+
markers: number().int(),
|
|
16362
|
+
/** Plaintext rows moved by THIS run (always 0 on a dry run). */
|
|
16363
|
+
migrated: number().int(),
|
|
16364
|
+
/** Plaintext rows left in place because the move or its read-back failed. */
|
|
16365
|
+
failed: number().int(),
|
|
16366
|
+
/** After the run: rows still holding plaintext. */
|
|
16367
|
+
remainingRaw: number().int(),
|
|
16368
|
+
/** After the run: markers the keychain could not resolve right now. */
|
|
16369
|
+
unresolvedMarkers: number().int(),
|
|
16370
|
+
/**
|
|
16371
|
+
* A second, redundant copy of the secrets' rows that the run found (and, on
|
|
16372
|
+
* `apply`, deleted after verifying the first). Owners with a single copy omit it.
|
|
16373
|
+
*/
|
|
16374
|
+
redundantCopies: number().int().optional(),
|
|
16375
|
+
/** True when nothing is raw and every marker resolves. */
|
|
16376
|
+
verified: boolean()
|
|
16377
|
+
});
|
|
15753
16378
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
15754
16379
|
* agent is the reason placement is not fixed to the hub. */
|
|
15755
16380
|
var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
|
|
@@ -15976,6 +16601,9 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
15976
16601
|
}), SettingsUpdateResultSchema, {
|
|
15977
16602
|
kind: "mutation",
|
|
15978
16603
|
auth: "admin"
|
|
16604
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
16605
|
+
kind: "mutation",
|
|
16606
|
+
auth: "admin"
|
|
15979
16607
|
}), method(object({}), object({ libs: array(object({
|
|
15980
16608
|
filePath: string(),
|
|
15981
16609
|
content: string()
|
|
@@ -16239,6 +16867,347 @@ id: union([string(), number()]) }), {
|
|
|
16239
16867
|
auth: "admin"
|
|
16240
16868
|
});
|
|
16241
16869
|
/**
|
|
16870
|
+
* records - an addon's own facts and documents (D881): ledgers, audit rows,
|
|
16871
|
+
* config documents, mirrors. The third storage API next to `ctx.settings`
|
|
16872
|
+
* (operator intent, D870) and device-history (numbers over time, D850).
|
|
16873
|
+
*
|
|
16874
|
+
* Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
|
|
16875
|
+
* crossed a process and stated by a hub in-process caller (`ctx.records` does
|
|
16876
|
+
* that with the addon id closed over). It is deliberately NOT in any input
|
|
16877
|
+
* schema, so a session can never supply it, and a call with no stamp is refused
|
|
16878
|
+
* `records/no-caller`. A kind is readable and writable only by its owner; other
|
|
16879
|
+
* addons go through the owner's capability.
|
|
16880
|
+
*
|
|
16881
|
+
* Every read is three-way: a row, `null`, or the call THROWS. A failed read is
|
|
16882
|
+
* never `[]`. Secret fields are never on the wire: a read shows the
|
|
16883
|
+
* redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
|
|
16884
|
+
* resolves itself, and a write may carry only a keychain marker bound to the
|
|
16885
|
+
* row's own ref.
|
|
16886
|
+
*
|
|
16887
|
+
* Internal: addons reach it through `ctx.records`, never directly.
|
|
16888
|
+
*/
|
|
16889
|
+
var RecordIdSchema = string().min(1).max(256);
|
|
16890
|
+
/** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
|
|
16891
|
+
var RecordBodySchema = record(string(), unknown());
|
|
16892
|
+
var RecordInputSchema = object({
|
|
16893
|
+
id: RecordIdSchema,
|
|
16894
|
+
/** The device this row belongs to (D865 removal, per-device reads). */
|
|
16895
|
+
deviceId: number().int().optional(),
|
|
16896
|
+
/** The domain clock, ms: observed / created / opened. */
|
|
16897
|
+
at: number().int().optional(),
|
|
16898
|
+
/** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
|
|
16899
|
+
expiresAt: number().int().optional(),
|
|
16900
|
+
data: RecordBodySchema
|
|
16901
|
+
});
|
|
16902
|
+
var RecordViewSchema = object({
|
|
16903
|
+
id: string(),
|
|
16904
|
+
deviceId: number().int().nullable(),
|
|
16905
|
+
at: number().nullable(),
|
|
16906
|
+
expiresAt: number().nullable(),
|
|
16907
|
+
rev: number().int(),
|
|
16908
|
+
updatedAt: number(),
|
|
16909
|
+
data: RecordBodySchema
|
|
16910
|
+
});
|
|
16911
|
+
/** Declared index fields only. Anything else does not compile, by design. */
|
|
16912
|
+
var RecordWhereSchema = record(RecordFieldPathSchema, union([
|
|
16913
|
+
string(),
|
|
16914
|
+
number(),
|
|
16915
|
+
boolean(),
|
|
16916
|
+
object({ in: array(union([
|
|
16917
|
+
string(),
|
|
16918
|
+
number(),
|
|
16919
|
+
boolean()
|
|
16920
|
+
])).min(1).max(RECORD_BATCH_MAX) }),
|
|
16921
|
+
object({
|
|
16922
|
+
gt: union([string(), number()]).optional(),
|
|
16923
|
+
gte: union([string(), number()]).optional(),
|
|
16924
|
+
lt: union([string(), number()]).optional(),
|
|
16925
|
+
lte: union([string(), number()]).optional()
|
|
16926
|
+
}).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
|
|
16927
|
+
]));
|
|
16928
|
+
var KindShape = { kind: RecordKindNameSchema };
|
|
16929
|
+
var TimeWindowShape = {
|
|
16930
|
+
deviceId: number().int().optional(),
|
|
16931
|
+
atFrom: number().optional(),
|
|
16932
|
+
atTo: number().optional()
|
|
16933
|
+
};
|
|
16934
|
+
var RecordQueryInputSchema = object({
|
|
16935
|
+
...KindShape,
|
|
16936
|
+
...TimeWindowShape,
|
|
16937
|
+
where: RecordWhereSchema.optional(),
|
|
16938
|
+
/** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
|
|
16939
|
+
order: _enum(["at", "id"]).optional(),
|
|
16940
|
+
desc: boolean().optional(),
|
|
16941
|
+
limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
|
|
16942
|
+
/** Opaque keyset cursor from a previous answer. There is no offset. */
|
|
16943
|
+
cursor: string().min(1).optional()
|
|
16944
|
+
});
|
|
16945
|
+
var RecordQueryResultSchema = object({
|
|
16946
|
+
records: array(RecordViewSchema),
|
|
16947
|
+
nextCursor: string().nullable()
|
|
16948
|
+
});
|
|
16949
|
+
var RecordKindStateSchema = _enum([
|
|
16950
|
+
"created",
|
|
16951
|
+
"unchanged",
|
|
16952
|
+
"updated"
|
|
16953
|
+
]);
|
|
16954
|
+
var DeclareKindResultSchema = object({
|
|
16955
|
+
kindId: number().int(),
|
|
16956
|
+
state: RecordKindStateSchema,
|
|
16957
|
+
createdIndexes: array(string()),
|
|
16958
|
+
/** The boot guard: the kind is empty while its legacy table still holds rows. */
|
|
16959
|
+
adoptionPending: object({
|
|
16960
|
+
legacyTable: string(),
|
|
16961
|
+
legacyRows: number().int()
|
|
16962
|
+
}).nullable()
|
|
16963
|
+
});
|
|
16964
|
+
/** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
|
|
16965
|
+
var SecretRefsList = array(string());
|
|
16966
|
+
var RecordSecretRefsSchema = record(string(), record(string(), string()));
|
|
16967
|
+
method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
|
|
16968
|
+
kind: "mutation",
|
|
16969
|
+
auth: "admin"
|
|
16970
|
+
}), method(object({
|
|
16971
|
+
...KindShape,
|
|
16972
|
+
id: RecordIdSchema
|
|
16973
|
+
}), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
|
|
16974
|
+
...KindShape,
|
|
16975
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16976
|
+
}), array(RecordViewSchema), { auth: "admin" }), method(object({
|
|
16977
|
+
...KindShape,
|
|
16978
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16979
|
+
}), RecordSecretRefsSchema, { auth: "admin" }), method(object({
|
|
16980
|
+
...KindShape,
|
|
16981
|
+
record: RecordInputSchema,
|
|
16982
|
+
/** Compare-and-set. `0` means "the row must not exist". */
|
|
16983
|
+
ifRev: number().int().min(0).optional()
|
|
16984
|
+
}), object({
|
|
16985
|
+
rev: number().int(),
|
|
16986
|
+
releasedRefs: SecretRefsList
|
|
16987
|
+
}), {
|
|
16988
|
+
kind: "mutation",
|
|
16989
|
+
auth: "admin"
|
|
16990
|
+
}), method(object({
|
|
16991
|
+
...KindShape,
|
|
16992
|
+
records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16993
|
+
}), object({
|
|
16994
|
+
count: number().int(),
|
|
16995
|
+
releasedRefs: SecretRefsList
|
|
16996
|
+
}), {
|
|
16997
|
+
kind: "mutation",
|
|
16998
|
+
auth: "admin"
|
|
16999
|
+
}), method(object({
|
|
17000
|
+
...KindShape,
|
|
17001
|
+
id: RecordIdSchema,
|
|
17002
|
+
data: RecordBodySchema,
|
|
17003
|
+
at: number().int().nullable().optional(),
|
|
17004
|
+
expiresAt: number().int().nullable().optional(),
|
|
17005
|
+
ifRev: number().int().min(1).optional()
|
|
17006
|
+
}), object({
|
|
17007
|
+
rev: number().int(),
|
|
17008
|
+
releasedRefs: SecretRefsList
|
|
17009
|
+
}), {
|
|
17010
|
+
kind: "mutation",
|
|
17011
|
+
auth: "admin"
|
|
17012
|
+
}), method(object({
|
|
17013
|
+
...KindShape,
|
|
17014
|
+
id: RecordIdSchema
|
|
17015
|
+
}), object({
|
|
17016
|
+
deleted: boolean(),
|
|
17017
|
+
secretRefs: SecretRefsList
|
|
17018
|
+
}), {
|
|
17019
|
+
kind: "mutation",
|
|
17020
|
+
auth: "admin"
|
|
17021
|
+
}), method(object({
|
|
17022
|
+
...KindShape,
|
|
17023
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
17024
|
+
}), object({
|
|
17025
|
+
deleted: number().int(),
|
|
17026
|
+
secretRefs: SecretRefsList
|
|
17027
|
+
}), {
|
|
17028
|
+
kind: "mutation",
|
|
17029
|
+
auth: "admin"
|
|
17030
|
+
}), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
17031
|
+
...KindShape,
|
|
17032
|
+
...TimeWindowShape,
|
|
17033
|
+
where: RecordWhereSchema.optional()
|
|
17034
|
+
}), object({ count: number().int() }), { auth: "admin" }), method(object({
|
|
17035
|
+
...KindShape,
|
|
17036
|
+
deviceId: number().int().optional(),
|
|
17037
|
+
from: number(),
|
|
17038
|
+
to: number(),
|
|
17039
|
+
bucketMs: number().int().positive()
|
|
17040
|
+
}), object({ buckets: array(object({
|
|
17041
|
+
bucketStart: number(),
|
|
17042
|
+
count: number().int()
|
|
17043
|
+
})) }), { auth: "admin" }), method(object({
|
|
17044
|
+
...KindShape,
|
|
17045
|
+
op: _enum([
|
|
17046
|
+
"sum",
|
|
17047
|
+
"min",
|
|
17048
|
+
"max",
|
|
17049
|
+
"count"
|
|
17050
|
+
]),
|
|
17051
|
+
field: RecordFieldPathSchema.optional(),
|
|
17052
|
+
groupBy: RecordFieldPathSchema.optional(),
|
|
17053
|
+
where: RecordWhereSchema.optional()
|
|
17054
|
+
}), object({ rows: array(object({
|
|
17055
|
+
group: union([
|
|
17056
|
+
string(),
|
|
17057
|
+
number(),
|
|
17058
|
+
_null()
|
|
17059
|
+
]),
|
|
17060
|
+
value: number().nullable()
|
|
17061
|
+
})) }), { auth: "admin" }), method(object({
|
|
17062
|
+
...KindShape,
|
|
17063
|
+
deviceId: number().int().optional(),
|
|
17064
|
+
atBefore: number().optional(),
|
|
17065
|
+
where: RecordWhereSchema.optional()
|
|
17066
|
+
}), object({
|
|
17067
|
+
deleted: number().int(),
|
|
17068
|
+
secretRefs: SecretRefsList
|
|
17069
|
+
}), {
|
|
17070
|
+
kind: "mutation",
|
|
17071
|
+
auth: "admin"
|
|
17072
|
+
}), method(object({
|
|
17073
|
+
deviceId: number().int(),
|
|
17074
|
+
kinds: array(RecordKindNameSchema).optional()
|
|
17075
|
+
}), object({
|
|
17076
|
+
deleted: record(string(), number().int()),
|
|
17077
|
+
secretRefs: SecretRefsList
|
|
17078
|
+
}), {
|
|
17079
|
+
kind: "mutation",
|
|
17080
|
+
auth: "admin"
|
|
17081
|
+
}), method(object(KindShape), object({ id: number().int() }), {
|
|
17082
|
+
kind: "mutation",
|
|
17083
|
+
auth: "admin"
|
|
17084
|
+
});
|
|
17085
|
+
/** One table of the settings database. */
|
|
17086
|
+
var StorageTableSchema = object({
|
|
17087
|
+
/** The table's full name, e.g. `recorder:addon-settings` or `addon-device-settings`. */
|
|
17088
|
+
name: string(),
|
|
17089
|
+
/** The owner prefix of a scoped name (`recorder` for `recorder:addon-settings`), else null. */
|
|
17090
|
+
owner: string().nullable(),
|
|
17091
|
+
rows: number().int().nonnegative(),
|
|
17092
|
+
/** Bytes the table's pages occupy (`dbstat`); null when the engine cannot measure. */
|
|
17093
|
+
bytes: number().int().nonnegative().nullable(),
|
|
17094
|
+
/** Declared by an addon since this engine process started (a running addon claims it). */
|
|
17095
|
+
declaredThisBoot: boolean()
|
|
17096
|
+
});
|
|
17097
|
+
/** One declared record kind (D881) as System -> Data shows it. */
|
|
17098
|
+
var StorageKindSchema = object({
|
|
17099
|
+
owner: string(),
|
|
17100
|
+
kind: string(),
|
|
17101
|
+
database: _enum(["settings", "events"]),
|
|
17102
|
+
class: string(),
|
|
17103
|
+
state: _enum([
|
|
17104
|
+
"declared",
|
|
17105
|
+
"orphaned",
|
|
17106
|
+
"dropped"
|
|
17107
|
+
]),
|
|
17108
|
+
/** `null` when the caller asked for no counts (`counts: false`). */
|
|
17109
|
+
rows: number().int().nonnegative().nullable(),
|
|
17110
|
+
/** Rows x the average size of a sample; null for an empty kind. */
|
|
17111
|
+
bytesEstimate: number().int().nonnegative().nullable(),
|
|
17112
|
+
writeTrigger: string(),
|
|
17113
|
+
retention: RecordRetentionSchema,
|
|
17114
|
+
/** `true` when the kind is an entry kind (the generic entries UI lists it). */
|
|
17115
|
+
entry: boolean(),
|
|
17116
|
+
/** The whole declaration, secret paths and entry descriptor included (the entries service builds its handle from it). */
|
|
17117
|
+
declaration: RecordKindDeclarationSchema
|
|
17118
|
+
});
|
|
17119
|
+
method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: array(StorageTableSchema) }), { auth: "admin" }), method(object({
|
|
17120
|
+
collection: string().min(1),
|
|
17121
|
+
expectRows: number().int().nonnegative()
|
|
17122
|
+
}), object({
|
|
17123
|
+
dropped: literal(true),
|
|
17124
|
+
rows: number().int().nonnegative()
|
|
17125
|
+
}), {
|
|
17126
|
+
kind: "mutation",
|
|
17127
|
+
auth: "admin"
|
|
17128
|
+
}), method(object({
|
|
17129
|
+
owner: string().min(1).optional(),
|
|
17130
|
+
/** `false` skips the per-kind row count (a catalog read only). Default true. */
|
|
17131
|
+
counts: boolean().optional()
|
|
17132
|
+
}), object({ kinds: array(StorageKindSchema) }), { auth: "admin" }), method(RecordQueryInputSchema.extend({
|
|
17133
|
+
owner: string().min(1),
|
|
17134
|
+
kind: RecordKindNameSchema
|
|
17135
|
+
}), RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
17136
|
+
owner: string().min(1),
|
|
17137
|
+
kind: RecordKindNameSchema,
|
|
17138
|
+
records: array(RecordInputSchema).max(RECORD_BATCH_MAX),
|
|
17139
|
+
/** The LAST batch: the copy is complete, the boot guard stops asking. */
|
|
17140
|
+
complete: boolean().optional()
|
|
17141
|
+
}).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), object({ adopted: number().int() }), {
|
|
17142
|
+
kind: "mutation",
|
|
17143
|
+
auth: "admin"
|
|
17144
|
+
}), method(object({
|
|
17145
|
+
collection: string().min(1),
|
|
17146
|
+
cursor: string().optional(),
|
|
17147
|
+
limit: number().int().min(1).max(1e3).optional()
|
|
17148
|
+
}), object({
|
|
17149
|
+
rows: array(object({
|
|
17150
|
+
id: string(),
|
|
17151
|
+
data: record(string(), unknown())
|
|
17152
|
+
})),
|
|
17153
|
+
nextCursor: string().nullable()
|
|
17154
|
+
}), { auth: "admin" }), method(object({ collection: string().min(1) }), object({ adopted: boolean() }), { auth: "admin" });
|
|
17155
|
+
/**
|
|
17156
|
+
* record-entries - the ONE admin surface for every list of user-created entries
|
|
17157
|
+
* (D881): notification targets, brokers, LLM profiles, anything an addon
|
|
17158
|
+
* declares as an ENTRY kind (`entry: { title }` in `defineRecordKinds`).
|
|
17159
|
+
*
|
|
17160
|
+
* The UI is generic. `listEntryKinds` hands it, per kind, the JSON Schema of
|
|
17161
|
+
* the entry body with `secret: true` on every credential field, so a password
|
|
17162
|
+
* field is derived from the schema and never from a name. `putEntry` takes the
|
|
17163
|
+
* redaction token for an untouched secret (the stored value is kept), a string
|
|
17164
|
+
* for a new one, and the clear instruction to remove one. A read never carries
|
|
17165
|
+
* a secret value, and a locked keychain refuses the write with
|
|
17166
|
+
* `records/secret-unavailable` instead of storing plaintext.
|
|
17167
|
+
*
|
|
17168
|
+
* Hub-only, served in-process (it acts for each entry's owner on the keychain).
|
|
17169
|
+
*/
|
|
17170
|
+
var EntryKindInfoSchema = object({
|
|
17171
|
+
owner: string(),
|
|
17172
|
+
kind: RecordKindNameSchema,
|
|
17173
|
+
title: string(),
|
|
17174
|
+
nameField: string(),
|
|
17175
|
+
/** JSON Schema of the body; `secret: true` marks a password field. */
|
|
17176
|
+
fields: record(string(), unknown()),
|
|
17177
|
+
secretPaths: array(string()),
|
|
17178
|
+
rows: number().int().nonnegative()
|
|
17179
|
+
});
|
|
17180
|
+
var EntryViewSchema = object({
|
|
17181
|
+
id: RecordIdSchema,
|
|
17182
|
+
name: string(),
|
|
17183
|
+
rev: number().int(),
|
|
17184
|
+
updatedAt: number(),
|
|
17185
|
+
/** Secret fields hold the redaction token. */
|
|
17186
|
+
data: RecordBodySchema
|
|
17187
|
+
});
|
|
17188
|
+
var EntryAddress = {
|
|
17189
|
+
owner: string().min(1),
|
|
17190
|
+
kind: RecordKindNameSchema
|
|
17191
|
+
};
|
|
17192
|
+
method(object({}), object({ kinds: array(EntryKindInfoSchema) }), { auth: "admin" }), method(object({ ...EntryAddress }), object({ entries: array(EntryViewSchema) }), { auth: "admin" }), method(object({
|
|
17193
|
+
...EntryAddress,
|
|
17194
|
+
id: RecordIdSchema.optional(),
|
|
17195
|
+
data: RecordBodySchema,
|
|
17196
|
+
ifRev: number().int().min(1).optional()
|
|
17197
|
+
}), object({
|
|
17198
|
+
id: string(),
|
|
17199
|
+
rev: number().int()
|
|
17200
|
+
}), {
|
|
17201
|
+
kind: "mutation",
|
|
17202
|
+
auth: "admin"
|
|
17203
|
+
}), method(object({
|
|
17204
|
+
...EntryAddress,
|
|
17205
|
+
id: RecordIdSchema
|
|
17206
|
+
}), object({ deleted: boolean() }), {
|
|
17207
|
+
kind: "mutation",
|
|
17208
|
+
auth: "admin"
|
|
17209
|
+
});
|
|
17210
|
+
/**
|
|
16242
17211
|
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
16243
17212
|
*
|
|
16244
17213
|
* Settings blobs never hold a secret: they hold a marker
|
|
@@ -16779,6 +17748,16 @@ method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}),
|
|
|
16779
17748
|
kind: "mutation",
|
|
16780
17749
|
auth: "admin",
|
|
16781
17750
|
caller: "required"
|
|
17751
|
+
}), method(object({
|
|
17752
|
+
ref: string().min(1),
|
|
17753
|
+
value: string().min(1)
|
|
17754
|
+
}), object({
|
|
17755
|
+
ref: string(),
|
|
17756
|
+
version: number().int()
|
|
17757
|
+
}), {
|
|
17758
|
+
kind: "mutation",
|
|
17759
|
+
auth: "admin",
|
|
17760
|
+
caller: "required"
|
|
16782
17761
|
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
16783
17762
|
deleted: array(string()).readonly(),
|
|
16784
17763
|
kept: array(object({
|
|
@@ -17076,7 +18055,11 @@ DeviceType.Hub, DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number().int
|
|
|
17076
18055
|
});
|
|
17077
18056
|
/**
|
|
17078
18057
|
* `device-adoption` — generic discovery + adoption surface,
|
|
17079
|
-
* system-scoped
|
|
18058
|
+
* system-scoped collection (one provider per integration addon), routed
|
|
18059
|
+
* by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
|
|
18060
|
+
* pin model as `connection-test`. The admin UI keeps using
|
|
18061
|
+
* `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
|
|
18062
|
+
* successor to `ha-discovery`:
|
|
17080
18063
|
* keyed by `integrationId` (the addon resolves integrationId → broker
|
|
17081
18064
|
* internally) rather than a connection-specific `brokerId`, and it
|
|
17082
18065
|
* REUSES the shared `DiscoveredChildDevice` candidate type from
|
|
@@ -39266,6 +40249,9 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
|
39266
40249
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
39267
40250
|
kind: "mutation",
|
|
39268
40251
|
auth: "admin"
|
|
40252
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
40253
|
+
kind: "mutation",
|
|
40254
|
+
auth: "admin"
|
|
39269
40255
|
}), method(ProfileRefInputSchema, _void(), {
|
|
39270
40256
|
kind: "mutation",
|
|
39271
40257
|
auth: "admin"
|
|
@@ -49713,6 +50699,41 @@ var ServerRollbackInfoSchema = object({
|
|
|
49713
50699
|
atMs: number(),
|
|
49714
50700
|
reason: string()
|
|
49715
50701
|
});
|
|
50702
|
+
/**
|
|
50703
|
+
* The runner boot check (D877): the runners this node PLANNED (hub: one per
|
|
50704
|
+
* `resolveRunnerId` over its forked addons; agent: the runners its process
|
|
50705
|
+
* service holds, because only the hub plans) against the states the process
|
|
50706
|
+
* service reports. Kept in memory, recomputed by the same one-shot check after
|
|
50707
|
+
* every boot, served on `getServerPackageStatus`.
|
|
50708
|
+
*
|
|
50709
|
+
* `failed` is the D6 breaker's terminal state, `refused` a deterministic Init
|
|
50710
|
+
* refusal (an addon that said "I will not start, and here is why"), `missing` a
|
|
50711
|
+
* planned runner the process service has no entry for.
|
|
50712
|
+
*/
|
|
50713
|
+
var RunnerRefusalSchema = object({
|
|
50714
|
+
runnerId: string(),
|
|
50715
|
+
addonIds: array(string()),
|
|
50716
|
+
reason: string()
|
|
50717
|
+
});
|
|
50718
|
+
var RunnerBootCheckSchema = object({
|
|
50719
|
+
checkedAtMs: number(),
|
|
50720
|
+
/** Runners planned for this node. */
|
|
50721
|
+
expected: number(),
|
|
50722
|
+
/** Planned runners whose process is `running`. */
|
|
50723
|
+
running: number(),
|
|
50724
|
+
failed: array(string()),
|
|
50725
|
+
refused: array(RunnerRefusalSchema),
|
|
50726
|
+
missing: array(string()),
|
|
50727
|
+
/**
|
|
50728
|
+
* Runners still on their way: `starting`, or `crashed` waiting on a backoff
|
|
50729
|
+
* respawn. The check is FINAL only when this is empty; until then nothing is
|
|
50730
|
+
* pushed and the verdict is re-evaluated on the next runner state change.
|
|
50731
|
+
* Optional for version skew (absent = settled).
|
|
50732
|
+
*/
|
|
50733
|
+
pending: array(string()).optional(),
|
|
50734
|
+
/** True when the plan is the hub's (`missing` is then meaningful); false on an agent. */
|
|
50735
|
+
planKnown: boolean()
|
|
50736
|
+
});
|
|
49716
50737
|
var ServerPackageStatusSchema = object({
|
|
49717
50738
|
/** Root package name (`@camstack/server` on the hub). */
|
|
49718
50739
|
packageName: string(),
|
|
@@ -49775,7 +50796,14 @@ var ServerPackageStatusSchema = object({
|
|
|
49775
50796
|
* for version skew: an older provider's payload simply omits it, and an
|
|
49776
50797
|
* absent wrapper is unknown — never `native`.
|
|
49777
50798
|
*/
|
|
49778
|
-
wrapper: WrapperIdentitySchema.optional()
|
|
50799
|
+
wrapper: WrapperIdentitySchema.optional(),
|
|
50800
|
+
/**
|
|
50801
|
+
* What this node PLANNED to run against what its process service reports
|
|
50802
|
+
* (D877). Absent until the one-shot boot check has run (~60 s after boot) and
|
|
50803
|
+
* on a provider that predates it. Absent is "not checked yet", never "all
|
|
50804
|
+
* well": a consumer that needs the answer treats it as pending.
|
|
50805
|
+
*/
|
|
50806
|
+
runners: RunnerBootCheckSchema.optional()
|
|
49779
50807
|
});
|
|
49780
50808
|
var ServerUpdateCheckResultSchema = object({
|
|
49781
50809
|
packageName: string(),
|
|
@@ -49826,6 +50854,13 @@ var ServerUpdateOutcomeSchema = _enum([
|
|
|
49826
50854
|
"refused",
|
|
49827
50855
|
"failed"
|
|
49828
50856
|
]);
|
|
50857
|
+
/** One addon the pre-flight found the target version would refuse (D877). */
|
|
50858
|
+
var UpdateBlockerSchema = object({
|
|
50859
|
+
addonId: string(),
|
|
50860
|
+
reason: string(),
|
|
50861
|
+
/** What the operator does about it. */
|
|
50862
|
+
remedy: string()
|
|
50863
|
+
});
|
|
49829
50864
|
var ServerUpdateActionResultSchema = object({
|
|
49830
50865
|
accepted: boolean(),
|
|
49831
50866
|
targetVersion: string().nullable(),
|
|
@@ -49843,14 +50878,27 @@ var ServerUpdateActionResultSchema = object({
|
|
|
49843
50878
|
* The failure itself, verbatim enough to act on (the npm output for a
|
|
49844
50879
|
* staging install). Non-null only for `failed`.
|
|
49845
50880
|
*/
|
|
49846
|
-
error: string().nullable().optional()
|
|
50881
|
+
error: string().nullable().optional(),
|
|
50882
|
+
/**
|
|
50883
|
+
* The addons the target version would refuse to start on this node's live
|
|
50884
|
+
* store (D877), present when the pre-flight refused the update
|
|
50885
|
+
* (`reason: 'addon-would-refuse'`). Optional for version skew.
|
|
50886
|
+
*/
|
|
50887
|
+
blockers: array(UpdateBlockerSchema).optional()
|
|
49847
50888
|
});
|
|
49848
50889
|
method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
|
|
49849
50890
|
kind: "mutation",
|
|
49850
50891
|
auth: "admin"
|
|
49851
|
-
}), method(object({
|
|
49852
|
-
/** Explicit target version; omitted = latest from the registry. */
|
|
49853
|
-
version: string().optional()
|
|
50892
|
+
}), method(object({
|
|
50893
|
+
/** Explicit target version; omitted = latest from the registry. */
|
|
50894
|
+
version: string().optional(),
|
|
50895
|
+
/**
|
|
50896
|
+
* Apply even though the pre-flight (D877) found addons the target would
|
|
50897
|
+
* refuse to start. Off by default: those addons stay down until the
|
|
50898
|
+
* remedy is run, which is the incident this gate exists to prevent.
|
|
50899
|
+
*/
|
|
50900
|
+
acknowledgeRefusals: boolean().optional()
|
|
50901
|
+
}), ServerUpdateActionResultSchema, {
|
|
49854
50902
|
kind: "mutation",
|
|
49855
50903
|
auth: "admin",
|
|
49856
50904
|
timeoutMs: 16 * 6e4
|
|
@@ -52298,7 +53346,9 @@ var ManifestShapeSchema = object({
|
|
|
52298
53346
|
var AddonProcessSchema = object({
|
|
52299
53347
|
pid: number().optional(),
|
|
52300
53348
|
mode: string(),
|
|
52301
|
-
state: string()
|
|
53349
|
+
state: string(),
|
|
53350
|
+
/** Why the runner is `refused` (an addon's own words), when it is (D877). */
|
|
53351
|
+
reason: string().optional()
|
|
52302
53352
|
});
|
|
52303
53353
|
/**
|
|
52304
53354
|
* Per-addon health snapshot from the kernel's AddonHealthMonitor.
|
|
@@ -52876,7 +53926,7 @@ var BatteryStatusSchema = object({
|
|
|
52876
53926
|
*/
|
|
52877
53927
|
binary: boolean().optional()
|
|
52878
53928
|
});
|
|
52879
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, method(object({
|
|
53929
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, method(object({
|
|
52880
53930
|
deviceId: number(),
|
|
52881
53931
|
/** Bound on the wait. Sensible range 3000–10000ms. */
|
|
52882
53932
|
timeoutMs: number().int().min(500).max(3e4).default(8e3)
|
|
@@ -53301,6 +54351,12 @@ object({
|
|
|
53301
54351
|
/** Horizontal louver swing on/off. Null when the device has no
|
|
53302
54352
|
* horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
|
|
53303
54353
|
swingHorizontal: boolean().nullable(),
|
|
54354
|
+
/** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
54355
|
+
minTemp: number().nullable().optional(),
|
|
54356
|
+
/** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
54357
|
+
maxTemp: number().nullable().optional(),
|
|
54358
|
+
/** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
|
|
54359
|
+
tempStep: number().positive().nullable().optional(),
|
|
53304
54360
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
53305
54361
|
lastFetchedAt: number()
|
|
53306
54362
|
});
|
|
@@ -53746,6 +54802,130 @@ object({
|
|
|
53746
54802
|
deviceId: number(),
|
|
53747
54803
|
status: DeviceStatusSchema
|
|
53748
54804
|
});
|
|
54805
|
+
/**
|
|
54806
|
+
* Smart-dishwasher cap — program lifecycle, door / remote-start gates,
|
|
54807
|
+
* consumable levels (salt, rinse aid) and common program options.
|
|
54808
|
+
*
|
|
54809
|
+
* Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
|
|
54810
|
+
* by any integration that exposes the same program / option surface.
|
|
54811
|
+
*
|
|
54812
|
+
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
54813
|
+
* provider refreshes the slice on an interval and eagerly after commands.
|
|
54814
|
+
*/
|
|
54815
|
+
var DishwasherStateSchema = _enum([
|
|
54816
|
+
"idle",
|
|
54817
|
+
"running",
|
|
54818
|
+
"paused",
|
|
54819
|
+
"finished",
|
|
54820
|
+
"error",
|
|
54821
|
+
"unavailable"
|
|
54822
|
+
]);
|
|
54823
|
+
var DishwasherConsumableLevelSchema = _enum([
|
|
54824
|
+
"ok",
|
|
54825
|
+
"low",
|
|
54826
|
+
"empty"
|
|
54827
|
+
]);
|
|
54828
|
+
object({
|
|
54829
|
+
state: DishwasherStateSchema,
|
|
54830
|
+
/** Active program id/name, or null when none selected / unknown. */
|
|
54831
|
+
program: string().nullable(),
|
|
54832
|
+
/** Program tokens the hardware accepts — drives the UI selector. */
|
|
54833
|
+
availablePrograms: array(string()),
|
|
54834
|
+
/** Minutes remaining on the active cycle, or null when not running. */
|
|
54835
|
+
remainingMinutes: number().int().nonnegative().nullable(),
|
|
54836
|
+
/** Cycle completion 0..100, or null when not applicable. */
|
|
54837
|
+
progressPercent: number().min(0).max(100).nullable(),
|
|
54838
|
+
/** True when the door is reported open. */
|
|
54839
|
+
doorOpen: boolean(),
|
|
54840
|
+
/** True when remote start is allowed (door closed, power on, etc.). */
|
|
54841
|
+
remoteStartAllowed: boolean(),
|
|
54842
|
+
/** Main power / switched-on state. */
|
|
54843
|
+
powerOn: boolean(),
|
|
54844
|
+
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54845
|
+
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54846
|
+
halfLoad: boolean(),
|
|
54847
|
+
hygienePlus: boolean(),
|
|
54848
|
+
/** Extra dry option when the appliance exposes it. */
|
|
54849
|
+
extraDry: boolean(),
|
|
54850
|
+
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
54851
|
+
intensiveZone: boolean(),
|
|
54852
|
+
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
54853
|
+
varioSpeedPlus: boolean(),
|
|
54854
|
+
/** Child lock (controls disabled on the appliance). */
|
|
54855
|
+
childLock: boolean(),
|
|
54856
|
+
errorCode: number().nullable(),
|
|
54857
|
+
errorLabel: string().nullable(),
|
|
54858
|
+
lastFetchedAt: number()
|
|
54859
|
+
});
|
|
54860
|
+
DeviceType.Dishwasher, method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
54861
|
+
kind: "mutation",
|
|
54862
|
+
auth: "protected"
|
|
54863
|
+
}), method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
54864
|
+
kind: "mutation",
|
|
54865
|
+
auth: "protected"
|
|
54866
|
+
}), method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
54867
|
+
kind: "mutation",
|
|
54868
|
+
auth: "protected"
|
|
54869
|
+
}), method(object({
|
|
54870
|
+
deviceId: number().int().nonnegative(),
|
|
54871
|
+
program: string().min(1)
|
|
54872
|
+
}), _void(), {
|
|
54873
|
+
kind: "mutation",
|
|
54874
|
+
auth: "protected"
|
|
54875
|
+
}), method(object({
|
|
54876
|
+
deviceId: number().int().nonnegative(),
|
|
54877
|
+
on: boolean()
|
|
54878
|
+
}), _void(), {
|
|
54879
|
+
kind: "mutation",
|
|
54880
|
+
auth: "protected"
|
|
54881
|
+
}), method(object({
|
|
54882
|
+
deviceId: number().int().nonnegative(),
|
|
54883
|
+
on: boolean()
|
|
54884
|
+
}), _void(), {
|
|
54885
|
+
kind: "mutation",
|
|
54886
|
+
auth: "protected"
|
|
54887
|
+
}), method(object({
|
|
54888
|
+
deviceId: number().int().nonnegative(),
|
|
54889
|
+
on: boolean()
|
|
54890
|
+
}), _void(), {
|
|
54891
|
+
kind: "mutation",
|
|
54892
|
+
auth: "protected"
|
|
54893
|
+
}), method(object({
|
|
54894
|
+
deviceId: number().int().nonnegative(),
|
|
54895
|
+
on: boolean()
|
|
54896
|
+
}), _void(), {
|
|
54897
|
+
kind: "mutation",
|
|
54898
|
+
auth: "protected"
|
|
54899
|
+
}), method(object({
|
|
54900
|
+
deviceId: number().int().nonnegative(),
|
|
54901
|
+
on: boolean()
|
|
54902
|
+
}), _void(), {
|
|
54903
|
+
kind: "mutation",
|
|
54904
|
+
auth: "protected"
|
|
54905
|
+
}), method(object({
|
|
54906
|
+
deviceId: number().int().nonnegative(),
|
|
54907
|
+
on: boolean()
|
|
54908
|
+
}), _void(), {
|
|
54909
|
+
kind: "mutation",
|
|
54910
|
+
auth: "protected"
|
|
54911
|
+
}), method(object({
|
|
54912
|
+
deviceId: number().int().nonnegative(),
|
|
54913
|
+
on: boolean()
|
|
54914
|
+
}), _void(), {
|
|
54915
|
+
kind: "mutation",
|
|
54916
|
+
auth: "protected"
|
|
54917
|
+
}), method(object({
|
|
54918
|
+
deviceId: number().int().nonnegative(),
|
|
54919
|
+
key: string().min(1),
|
|
54920
|
+
value: union([
|
|
54921
|
+
boolean(),
|
|
54922
|
+
string(),
|
|
54923
|
+
number()
|
|
54924
|
+
])
|
|
54925
|
+
}), _void(), {
|
|
54926
|
+
kind: "mutation",
|
|
54927
|
+
auth: "protected"
|
|
54928
|
+
});
|
|
53749
54929
|
object({
|
|
53750
54930
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
53751
54931
|
lastPressedAt: number().nullable(),
|
|
@@ -54311,6 +55491,13 @@ object({
|
|
|
54311
55491
|
lastChangedAt: number()
|
|
54312
55492
|
});
|
|
54313
55493
|
DeviceType.Sensor;
|
|
55494
|
+
object({
|
|
55495
|
+
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
55496
|
+
position: number().min(0).max(100).nullable(),
|
|
55497
|
+
/** Ms epoch when the slice was last updated (push or poll). */
|
|
55498
|
+
lastFetchedAt: number()
|
|
55499
|
+
});
|
|
55500
|
+
DeviceType.Thermostat;
|
|
54314
55501
|
object({
|
|
54315
55502
|
/** Whether the humidifier is currently on. */
|
|
54316
55503
|
on: boolean(),
|
|
@@ -55121,7 +56308,19 @@ var TlsStatusSchema = object({
|
|
|
55121
56308
|
sans: array(string()),
|
|
55122
56309
|
caCertPem: string().nullable(),
|
|
55123
56310
|
reissueError: string().nullable(),
|
|
55124
|
-
restartRequired: boolean()
|
|
56311
|
+
restartRequired: boolean(),
|
|
56312
|
+
/** An uploaded certificate is served but no CA is kept for it and it is not publicly signed (D873). */
|
|
56313
|
+
caMissing: boolean(),
|
|
56314
|
+
/** Does the hub's own generated CA carry a critical name constraint? `null` while it has none. */
|
|
56315
|
+
localCaConstrained: boolean().nullable(),
|
|
56316
|
+
/** ISO time the generated CA was replaced by a constrained one; devices must re-download it. */
|
|
56317
|
+
caReplacedAt: string().nullable(),
|
|
56318
|
+
/** The uploaded certificate kept on disk, selectable again after "Revert to generated". */
|
|
56319
|
+
storedUpload: object({
|
|
56320
|
+
leafFingerprintSha256: string(),
|
|
56321
|
+
validTo: string(),
|
|
56322
|
+
hasCa: boolean()
|
|
56323
|
+
}).nullable()
|
|
55125
56324
|
});
|
|
55126
56325
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
55127
56326
|
/**
|
|
@@ -55177,6 +56376,9 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
55177
56376
|
}), method(_void(), object({ pem: string() })), method(_void(), TlsStatusSchema, {
|
|
55178
56377
|
kind: "mutation",
|
|
55179
56378
|
auth: "admin"
|
|
56379
|
+
}), method(_void(), TlsStatusSchema, {
|
|
56380
|
+
kind: "mutation",
|
|
56381
|
+
auth: "admin"
|
|
55180
56382
|
});
|
|
55181
56383
|
object({
|
|
55182
56384
|
/** Lifecycle state of the lock. `jammed` means the motor reported
|
|
@@ -60306,7 +61508,11 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
60306
61508
|
kind: "mutation",
|
|
60307
61509
|
auth: "admin",
|
|
60308
61510
|
access: "delete"
|
|
60309
|
-
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(
|
|
61511
|
+
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
61512
|
+
kind: "mutation",
|
|
61513
|
+
auth: "admin",
|
|
61514
|
+
access: "create"
|
|
61515
|
+
}), method(object({
|
|
60310
61516
|
userId: string(),
|
|
60311
61517
|
code: string()
|
|
60312
61518
|
}), object({ valid: boolean() }), {
|
|
@@ -61358,7 +62564,7 @@ var AccessoryKind = {
|
|
|
61358
62564
|
PrivacyMask: DeviceRole.PrivacyMask
|
|
61359
62565
|
};
|
|
61360
62566
|
AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
|
|
61361
|
-
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;
|
|
62567
|
+
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;
|
|
61362
62568
|
new Set(Object.values(DeviceType));
|
|
61363
62569
|
Object.freeze({
|
|
61364
62570
|
"accessories.getStatus": {
|
|
@@ -62507,6 +63713,12 @@ Object.freeze({
|
|
|
62507
63713
|
addonId: null,
|
|
62508
63714
|
access: "view"
|
|
62509
63715
|
},
|
|
63716
|
+
"coreBlocks.migrateRawSecrets": {
|
|
63717
|
+
capName: "core-blocks",
|
|
63718
|
+
capScope: "system",
|
|
63719
|
+
addonId: null,
|
|
63720
|
+
access: "create"
|
|
63721
|
+
},
|
|
62510
63722
|
"coreBlocks.restart": {
|
|
62511
63723
|
capName: "core-blocks",
|
|
62512
63724
|
capScope: "system",
|
|
@@ -63773,6 +64985,84 @@ Object.freeze({
|
|
|
63773
64985
|
addonId: null,
|
|
63774
64986
|
access: "view"
|
|
63775
64987
|
},
|
|
64988
|
+
"dishwasher.getStatus": {
|
|
64989
|
+
capName: "dishwasher",
|
|
64990
|
+
capScope: "device",
|
|
64991
|
+
addonId: null,
|
|
64992
|
+
access: "view"
|
|
64993
|
+
},
|
|
64994
|
+
"dishwasher.pause": {
|
|
64995
|
+
capName: "dishwasher",
|
|
64996
|
+
capScope: "device",
|
|
64997
|
+
addonId: null,
|
|
64998
|
+
access: "create"
|
|
64999
|
+
},
|
|
65000
|
+
"dishwasher.setChildLock": {
|
|
65001
|
+
capName: "dishwasher",
|
|
65002
|
+
capScope: "device",
|
|
65003
|
+
addonId: null,
|
|
65004
|
+
access: "create"
|
|
65005
|
+
},
|
|
65006
|
+
"dishwasher.setExtraDry": {
|
|
65007
|
+
capName: "dishwasher",
|
|
65008
|
+
capScope: "device",
|
|
65009
|
+
addonId: null,
|
|
65010
|
+
access: "create"
|
|
65011
|
+
},
|
|
65012
|
+
"dishwasher.setHalfLoad": {
|
|
65013
|
+
capName: "dishwasher",
|
|
65014
|
+
capScope: "device",
|
|
65015
|
+
addonId: null,
|
|
65016
|
+
access: "create"
|
|
65017
|
+
},
|
|
65018
|
+
"dishwasher.setHygienePlus": {
|
|
65019
|
+
capName: "dishwasher",
|
|
65020
|
+
capScope: "device",
|
|
65021
|
+
addonId: null,
|
|
65022
|
+
access: "create"
|
|
65023
|
+
},
|
|
65024
|
+
"dishwasher.setIntensiveZone": {
|
|
65025
|
+
capName: "dishwasher",
|
|
65026
|
+
capScope: "device",
|
|
65027
|
+
addonId: null,
|
|
65028
|
+
access: "create"
|
|
65029
|
+
},
|
|
65030
|
+
"dishwasher.setOption": {
|
|
65031
|
+
capName: "dishwasher",
|
|
65032
|
+
capScope: "device",
|
|
65033
|
+
addonId: null,
|
|
65034
|
+
access: "create"
|
|
65035
|
+
},
|
|
65036
|
+
"dishwasher.setPower": {
|
|
65037
|
+
capName: "dishwasher",
|
|
65038
|
+
capScope: "device",
|
|
65039
|
+
addonId: null,
|
|
65040
|
+
access: "create"
|
|
65041
|
+
},
|
|
65042
|
+
"dishwasher.setProgram": {
|
|
65043
|
+
capName: "dishwasher",
|
|
65044
|
+
capScope: "device",
|
|
65045
|
+
addonId: null,
|
|
65046
|
+
access: "create"
|
|
65047
|
+
},
|
|
65048
|
+
"dishwasher.setVarioSpeedPlus": {
|
|
65049
|
+
capName: "dishwasher",
|
|
65050
|
+
capScope: "device",
|
|
65051
|
+
addonId: null,
|
|
65052
|
+
access: "create"
|
|
65053
|
+
},
|
|
65054
|
+
"dishwasher.start": {
|
|
65055
|
+
capName: "dishwasher",
|
|
65056
|
+
capScope: "device",
|
|
65057
|
+
addonId: null,
|
|
65058
|
+
access: "create"
|
|
65059
|
+
},
|
|
65060
|
+
"dishwasher.stop": {
|
|
65061
|
+
capName: "dishwasher",
|
|
65062
|
+
capScope: "device",
|
|
65063
|
+
addonId: null,
|
|
65064
|
+
access: "create"
|
|
65065
|
+
},
|
|
63776
65066
|
"doorbell.getStatus": {
|
|
63777
65067
|
capName: "doorbell",
|
|
63778
65068
|
capScope: "device",
|
|
@@ -63983,6 +65273,12 @@ Object.freeze({
|
|
|
63983
65273
|
addonId: null,
|
|
63984
65274
|
access: "view"
|
|
63985
65275
|
},
|
|
65276
|
+
"heatingValve.getStatus": {
|
|
65277
|
+
capName: "heating-valve",
|
|
65278
|
+
capScope: "device",
|
|
65279
|
+
addonId: null,
|
|
65280
|
+
access: "view"
|
|
65281
|
+
},
|
|
63986
65282
|
"humidifier.getStatus": {
|
|
63987
65283
|
capName: "humidifier",
|
|
63988
65284
|
capScope: "device",
|
|
@@ -64193,6 +65489,12 @@ Object.freeze({
|
|
|
64193
65489
|
addonId: null,
|
|
64194
65490
|
access: "create"
|
|
64195
65491
|
},
|
|
65492
|
+
"keychainAdmin.importSecret": {
|
|
65493
|
+
capName: "keychain-admin",
|
|
65494
|
+
capScope: "system",
|
|
65495
|
+
addonId: null,
|
|
65496
|
+
access: "create"
|
|
65497
|
+
},
|
|
64196
65498
|
"keychainAdmin.listAudit": {
|
|
64197
65499
|
capName: "keychain-admin",
|
|
64198
65500
|
capScope: "system",
|
|
@@ -64361,6 +65663,12 @@ Object.freeze({
|
|
|
64361
65663
|
addonId: null,
|
|
64362
65664
|
access: "view"
|
|
64363
65665
|
},
|
|
65666
|
+
"llm.migrateRawSecrets": {
|
|
65667
|
+
capName: "llm",
|
|
65668
|
+
capScope: "system",
|
|
65669
|
+
addonId: null,
|
|
65670
|
+
access: "create"
|
|
65671
|
+
},
|
|
64364
65672
|
"llm.resolveModelRef": {
|
|
64365
65673
|
capName: "llm",
|
|
64366
65674
|
capScope: "system",
|
|
@@ -64589,6 +65897,12 @@ Object.freeze({
|
|
|
64589
65897
|
addonId: null,
|
|
64590
65898
|
access: "create"
|
|
64591
65899
|
},
|
|
65900
|
+
"localNetwork.useStoredUploadedCertificate": {
|
|
65901
|
+
capName: "local-network",
|
|
65902
|
+
capScope: "system",
|
|
65903
|
+
addonId: null,
|
|
65904
|
+
access: "create"
|
|
65905
|
+
},
|
|
64592
65906
|
"lockControl.getStatus": {
|
|
64593
65907
|
capName: "lock-control",
|
|
64594
65908
|
capScope: "device",
|
|
@@ -67241,6 +68555,30 @@ Object.freeze({
|
|
|
67241
68555
|
addonId: null,
|
|
67242
68556
|
access: "create"
|
|
67243
68557
|
},
|
|
68558
|
+
"recordEntries.deleteEntry": {
|
|
68559
|
+
capName: "record-entries",
|
|
68560
|
+
capScope: "system",
|
|
68561
|
+
addonId: null,
|
|
68562
|
+
access: "delete"
|
|
68563
|
+
},
|
|
68564
|
+
"recordEntries.listEntries": {
|
|
68565
|
+
capName: "record-entries",
|
|
68566
|
+
capScope: "system",
|
|
68567
|
+
addonId: null,
|
|
68568
|
+
access: "view"
|
|
68569
|
+
},
|
|
68570
|
+
"recordEntries.listEntryKinds": {
|
|
68571
|
+
capName: "record-entries",
|
|
68572
|
+
capScope: "system",
|
|
68573
|
+
addonId: null,
|
|
68574
|
+
access: "view"
|
|
68575
|
+
},
|
|
68576
|
+
"recordEntries.putEntry": {
|
|
68577
|
+
capName: "record-entries",
|
|
68578
|
+
capScope: "system",
|
|
68579
|
+
addonId: null,
|
|
68580
|
+
access: "create"
|
|
68581
|
+
},
|
|
67244
68582
|
"recording.getAvailability": {
|
|
67245
68583
|
capName: "recording",
|
|
67246
68584
|
capScope: "device",
|
|
@@ -67541,6 +68879,102 @@ Object.freeze({
|
|
|
67541
68879
|
addonId: null,
|
|
67542
68880
|
access: "view"
|
|
67543
68881
|
},
|
|
68882
|
+
"records.aggregate": {
|
|
68883
|
+
capName: "records",
|
|
68884
|
+
capScope: "system",
|
|
68885
|
+
addonId: null,
|
|
68886
|
+
access: "view"
|
|
68887
|
+
},
|
|
68888
|
+
"records.allocateId": {
|
|
68889
|
+
capName: "records",
|
|
68890
|
+
capScope: "system",
|
|
68891
|
+
addonId: null,
|
|
68892
|
+
access: "create"
|
|
68893
|
+
},
|
|
68894
|
+
"records.count": {
|
|
68895
|
+
capName: "records",
|
|
68896
|
+
capScope: "system",
|
|
68897
|
+
addonId: null,
|
|
68898
|
+
access: "view"
|
|
68899
|
+
},
|
|
68900
|
+
"records.declareKinds": {
|
|
68901
|
+
capName: "records",
|
|
68902
|
+
capScope: "system",
|
|
68903
|
+
addonId: null,
|
|
68904
|
+
access: "create"
|
|
68905
|
+
},
|
|
68906
|
+
"records.delete": {
|
|
68907
|
+
capName: "records",
|
|
68908
|
+
capScope: "system",
|
|
68909
|
+
addonId: null,
|
|
68910
|
+
access: "delete"
|
|
68911
|
+
},
|
|
68912
|
+
"records.deleteDevice": {
|
|
68913
|
+
capName: "records",
|
|
68914
|
+
capScope: "system",
|
|
68915
|
+
addonId: null,
|
|
68916
|
+
access: "delete"
|
|
68917
|
+
},
|
|
68918
|
+
"records.deleteMany": {
|
|
68919
|
+
capName: "records",
|
|
68920
|
+
capScope: "system",
|
|
68921
|
+
addonId: null,
|
|
68922
|
+
access: "delete"
|
|
68923
|
+
},
|
|
68924
|
+
"records.deleteWhere": {
|
|
68925
|
+
capName: "records",
|
|
68926
|
+
capScope: "system",
|
|
68927
|
+
addonId: null,
|
|
68928
|
+
access: "delete"
|
|
68929
|
+
},
|
|
68930
|
+
"records.get": {
|
|
68931
|
+
capName: "records",
|
|
68932
|
+
capScope: "system",
|
|
68933
|
+
addonId: null,
|
|
68934
|
+
access: "view"
|
|
68935
|
+
},
|
|
68936
|
+
"records.getMany": {
|
|
68937
|
+
capName: "records",
|
|
68938
|
+
capScope: "system",
|
|
68939
|
+
addonId: null,
|
|
68940
|
+
access: "view"
|
|
68941
|
+
},
|
|
68942
|
+
"records.histogram": {
|
|
68943
|
+
capName: "records",
|
|
68944
|
+
capScope: "system",
|
|
68945
|
+
addonId: null,
|
|
68946
|
+
access: "view"
|
|
68947
|
+
},
|
|
68948
|
+
"records.patch": {
|
|
68949
|
+
capName: "records",
|
|
68950
|
+
capScope: "system",
|
|
68951
|
+
addonId: null,
|
|
68952
|
+
access: "create"
|
|
68953
|
+
},
|
|
68954
|
+
"records.put": {
|
|
68955
|
+
capName: "records",
|
|
68956
|
+
capScope: "system",
|
|
68957
|
+
addonId: null,
|
|
68958
|
+
access: "create"
|
|
68959
|
+
},
|
|
68960
|
+
"records.putMany": {
|
|
68961
|
+
capName: "records",
|
|
68962
|
+
capScope: "system",
|
|
68963
|
+
addonId: null,
|
|
68964
|
+
access: "create"
|
|
68965
|
+
},
|
|
68966
|
+
"records.query": {
|
|
68967
|
+
capName: "records",
|
|
68968
|
+
capScope: "system",
|
|
68969
|
+
addonId: null,
|
|
68970
|
+
access: "view"
|
|
68971
|
+
},
|
|
68972
|
+
"records.secretRefs": {
|
|
68973
|
+
capName: "records",
|
|
68974
|
+
capScope: "system",
|
|
68975
|
+
addonId: null,
|
|
68976
|
+
access: "view"
|
|
68977
|
+
},
|
|
67544
68978
|
"sceneMonitor.captureReference": {
|
|
67545
68979
|
capName: "scene-monitor",
|
|
67546
68980
|
capScope: "device",
|
|
@@ -67973,6 +69407,48 @@ Object.freeze({
|
|
|
67973
69407
|
addonId: null,
|
|
67974
69408
|
access: "create"
|
|
67975
69409
|
},
|
|
69410
|
+
"storageAdmin.adoptRecords": {
|
|
69411
|
+
capName: "storage-admin",
|
|
69412
|
+
capScope: "system",
|
|
69413
|
+
addonId: null,
|
|
69414
|
+
access: "create"
|
|
69415
|
+
},
|
|
69416
|
+
"storageAdmin.dropCollection": {
|
|
69417
|
+
capName: "storage-admin",
|
|
69418
|
+
capScope: "system",
|
|
69419
|
+
addonId: null,
|
|
69420
|
+
access: "delete"
|
|
69421
|
+
},
|
|
69422
|
+
"storageAdmin.isAdoptedLegacyTable": {
|
|
69423
|
+
capName: "storage-admin",
|
|
69424
|
+
capScope: "system",
|
|
69425
|
+
addonId: null,
|
|
69426
|
+
access: "view"
|
|
69427
|
+
},
|
|
69428
|
+
"storageAdmin.listKinds": {
|
|
69429
|
+
capName: "storage-admin",
|
|
69430
|
+
capScope: "system",
|
|
69431
|
+
addonId: null,
|
|
69432
|
+
access: "view"
|
|
69433
|
+
},
|
|
69434
|
+
"storageAdmin.listTables": {
|
|
69435
|
+
capName: "storage-admin",
|
|
69436
|
+
capScope: "system",
|
|
69437
|
+
addonId: null,
|
|
69438
|
+
access: "view"
|
|
69439
|
+
},
|
|
69440
|
+
"storageAdmin.readLegacyCollection": {
|
|
69441
|
+
capName: "storage-admin",
|
|
69442
|
+
capScope: "system",
|
|
69443
|
+
addonId: null,
|
|
69444
|
+
access: "view"
|
|
69445
|
+
},
|
|
69446
|
+
"storageAdmin.readRecords": {
|
|
69447
|
+
capName: "storage-admin",
|
|
69448
|
+
capScope: "system",
|
|
69449
|
+
addonId: null,
|
|
69450
|
+
access: "view"
|
|
69451
|
+
},
|
|
67976
69452
|
"storageEvictable.evict": {
|
|
67977
69453
|
capName: "storage-evictable",
|
|
67978
69454
|
capScope: "system",
|
|
@@ -68885,6 +70361,12 @@ Object.freeze({
|
|
|
68885
70361
|
addonId: null,
|
|
68886
70362
|
access: "view"
|
|
68887
70363
|
},
|
|
70364
|
+
"userManagement.migrateRawSecrets": {
|
|
70365
|
+
capName: "user-management",
|
|
70366
|
+
capScope: "system",
|
|
70367
|
+
addonId: null,
|
|
70368
|
+
access: "create"
|
|
70369
|
+
},
|
|
68888
70370
|
"userManagement.oauthExchangeCode": {
|
|
68889
70371
|
capName: "user-management",
|
|
68890
70372
|
capScope: "system",
|
|
@@ -69384,7 +70866,7 @@ Object.freeze({
|
|
|
69384
70866
|
access: "create"
|
|
69385
70867
|
}
|
|
69386
70868
|
});
|
|
69387
|
-
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;
|
|
70869
|
+
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;
|
|
69388
70870
|
DeviceFeature.BatteryOperated;
|
|
69389
70871
|
Object.freeze({
|
|
69390
70872
|
"accessories.getStatus": [{
|
|
@@ -70208,6 +71690,71 @@ Object.freeze({
|
|
|
70208
71690
|
form: "single",
|
|
70209
71691
|
optional: false
|
|
70210
71692
|
}],
|
|
71693
|
+
"dishwasher.getStatus": [{
|
|
71694
|
+
name: "deviceId",
|
|
71695
|
+
form: "single",
|
|
71696
|
+
optional: false
|
|
71697
|
+
}],
|
|
71698
|
+
"dishwasher.pause": [{
|
|
71699
|
+
name: "deviceId",
|
|
71700
|
+
form: "single",
|
|
71701
|
+
optional: false
|
|
71702
|
+
}],
|
|
71703
|
+
"dishwasher.setChildLock": [{
|
|
71704
|
+
name: "deviceId",
|
|
71705
|
+
form: "single",
|
|
71706
|
+
optional: false
|
|
71707
|
+
}],
|
|
71708
|
+
"dishwasher.setExtraDry": [{
|
|
71709
|
+
name: "deviceId",
|
|
71710
|
+
form: "single",
|
|
71711
|
+
optional: false
|
|
71712
|
+
}],
|
|
71713
|
+
"dishwasher.setHalfLoad": [{
|
|
71714
|
+
name: "deviceId",
|
|
71715
|
+
form: "single",
|
|
71716
|
+
optional: false
|
|
71717
|
+
}],
|
|
71718
|
+
"dishwasher.setHygienePlus": [{
|
|
71719
|
+
name: "deviceId",
|
|
71720
|
+
form: "single",
|
|
71721
|
+
optional: false
|
|
71722
|
+
}],
|
|
71723
|
+
"dishwasher.setIntensiveZone": [{
|
|
71724
|
+
name: "deviceId",
|
|
71725
|
+
form: "single",
|
|
71726
|
+
optional: false
|
|
71727
|
+
}],
|
|
71728
|
+
"dishwasher.setOption": [{
|
|
71729
|
+
name: "deviceId",
|
|
71730
|
+
form: "single",
|
|
71731
|
+
optional: false
|
|
71732
|
+
}],
|
|
71733
|
+
"dishwasher.setPower": [{
|
|
71734
|
+
name: "deviceId",
|
|
71735
|
+
form: "single",
|
|
71736
|
+
optional: false
|
|
71737
|
+
}],
|
|
71738
|
+
"dishwasher.setProgram": [{
|
|
71739
|
+
name: "deviceId",
|
|
71740
|
+
form: "single",
|
|
71741
|
+
optional: false
|
|
71742
|
+
}],
|
|
71743
|
+
"dishwasher.setVarioSpeedPlus": [{
|
|
71744
|
+
name: "deviceId",
|
|
71745
|
+
form: "single",
|
|
71746
|
+
optional: false
|
|
71747
|
+
}],
|
|
71748
|
+
"dishwasher.start": [{
|
|
71749
|
+
name: "deviceId",
|
|
71750
|
+
form: "single",
|
|
71751
|
+
optional: false
|
|
71752
|
+
}],
|
|
71753
|
+
"dishwasher.stop": [{
|
|
71754
|
+
name: "deviceId",
|
|
71755
|
+
form: "single",
|
|
71756
|
+
optional: false
|
|
71757
|
+
}],
|
|
70211
71758
|
"doorbell.getStatus": [{
|
|
70212
71759
|
name: "deviceId",
|
|
70213
71760
|
form: "single",
|
|
@@ -70277,6 +71824,11 @@ Object.freeze({
|
|
|
70277
71824
|
form: "single",
|
|
70278
71825
|
optional: false
|
|
70279
71826
|
}],
|
|
71827
|
+
"heatingValve.getStatus": [{
|
|
71828
|
+
name: "deviceId",
|
|
71829
|
+
form: "single",
|
|
71830
|
+
optional: false
|
|
71831
|
+
}],
|
|
70280
71832
|
"humidifier.getStatus": [{
|
|
70281
71833
|
name: "deviceId",
|
|
70282
71834
|
form: "single",
|
|
@@ -71561,6 +73113,37 @@ Object.freeze({
|
|
|
71561
73113
|
form: "single",
|
|
71562
73114
|
optional: false
|
|
71563
73115
|
}],
|
|
73116
|
+
"records.count": [{
|
|
73117
|
+
name: "deviceId",
|
|
73118
|
+
form: "single",
|
|
73119
|
+
optional: true
|
|
73120
|
+
}],
|
|
73121
|
+
"records.deleteDevice": [{
|
|
73122
|
+
name: "deviceId",
|
|
73123
|
+
form: "single",
|
|
73124
|
+
optional: false
|
|
73125
|
+
}],
|
|
73126
|
+
"records.deleteWhere": [{
|
|
73127
|
+
name: "deviceId",
|
|
73128
|
+
form: "single",
|
|
73129
|
+
optional: true
|
|
73130
|
+
}],
|
|
73131
|
+
"records.histogram": [{
|
|
73132
|
+
name: "deviceId",
|
|
73133
|
+
form: "single",
|
|
73134
|
+
optional: true
|
|
73135
|
+
}],
|
|
73136
|
+
"records.putMany": [{
|
|
73137
|
+
name: "records",
|
|
73138
|
+
form: "object-array",
|
|
73139
|
+
optional: false,
|
|
73140
|
+
itemField: "deviceId"
|
|
73141
|
+
}],
|
|
73142
|
+
"records.query": [{
|
|
73143
|
+
name: "deviceId",
|
|
73144
|
+
form: "single",
|
|
73145
|
+
optional: true
|
|
73146
|
+
}],
|
|
71564
73147
|
"sceneMonitor.captureReference": [{
|
|
71565
73148
|
name: "deviceId",
|
|
71566
73149
|
form: "single",
|
|
@@ -71677,6 +73260,17 @@ Object.freeze({
|
|
|
71677
73260
|
form: "single",
|
|
71678
73261
|
optional: false
|
|
71679
73262
|
}],
|
|
73263
|
+
"storageAdmin.adoptRecords": [{
|
|
73264
|
+
name: "records",
|
|
73265
|
+
form: "object-array",
|
|
73266
|
+
optional: false,
|
|
73267
|
+
itemField: "deviceId"
|
|
73268
|
+
}],
|
|
73269
|
+
"storageAdmin.readRecords": [{
|
|
73270
|
+
name: "deviceId",
|
|
73271
|
+
form: "single",
|
|
73272
|
+
optional: true
|
|
73273
|
+
}],
|
|
71680
73274
|
"streamBroker.acquireEgressTranscode": [{
|
|
71681
73275
|
name: "deviceId",
|
|
71682
73276
|
form: "single",
|
|
@@ -73145,6 +74739,12 @@ Object.defineProperty(exports, "BaseAddon", {
|
|
|
73145
74739
|
return BaseAddon;
|
|
73146
74740
|
}
|
|
73147
74741
|
});
|
|
74742
|
+
Object.defineProperty(exports, "RecordSecretUnavailableError", {
|
|
74743
|
+
enumerable: true,
|
|
74744
|
+
get: function() {
|
|
74745
|
+
return RecordSecretUnavailableError;
|
|
74746
|
+
}
|
|
74747
|
+
});
|
|
73148
74748
|
Object.defineProperty(exports, "SECRET_CLEAR", {
|
|
73149
74749
|
enumerable: true,
|
|
73150
74750
|
get: function() {
|
|
@@ -73187,6 +74787,12 @@ Object.defineProperty(exports, "__toESM", {
|
|
|
73187
74787
|
return __toESM;
|
|
73188
74788
|
}
|
|
73189
74789
|
});
|
|
74790
|
+
Object.defineProperty(exports, "_enum", {
|
|
74791
|
+
enumerable: true,
|
|
74792
|
+
get: function() {
|
|
74793
|
+
return _enum;
|
|
74794
|
+
}
|
|
74795
|
+
});
|
|
73190
74796
|
Object.defineProperty(exports, "addonRoutesCapability", {
|
|
73191
74797
|
enumerable: true,
|
|
73192
74798
|
get: function() {
|
|
@@ -73247,6 +74853,18 @@ Object.defineProperty(exports, "claimedRequestOrigins", {
|
|
|
73247
74853
|
return claimedRequestOrigins;
|
|
73248
74854
|
}
|
|
73249
74855
|
});
|
|
74856
|
+
Object.defineProperty(exports, "defineEntryKind", {
|
|
74857
|
+
enumerable: true,
|
|
74858
|
+
get: function() {
|
|
74859
|
+
return defineEntryKind;
|
|
74860
|
+
}
|
|
74861
|
+
});
|
|
74862
|
+
Object.defineProperty(exports, "defineRecordKinds", {
|
|
74863
|
+
enumerable: true,
|
|
74864
|
+
get: function() {
|
|
74865
|
+
return defineRecordKinds;
|
|
74866
|
+
}
|
|
74867
|
+
});
|
|
73250
74868
|
Object.defineProperty(exports, "errMsg", {
|
|
73251
74869
|
enumerable: true,
|
|
73252
74870
|
get: function() {
|
|
@@ -73331,6 +74949,12 @@ Object.defineProperty(exports, "resolveIconKey", {
|
|
|
73331
74949
|
return resolveIconKey;
|
|
73332
74950
|
}
|
|
73333
74951
|
});
|
|
74952
|
+
Object.defineProperty(exports, "settingsArrayAdoptsFrom", {
|
|
74953
|
+
enumerable: true,
|
|
74954
|
+
get: function() {
|
|
74955
|
+
return settingsArrayAdoptsFrom;
|
|
74956
|
+
}
|
|
74957
|
+
});
|
|
73334
74958
|
Object.defineProperty(exports, "string", {
|
|
73335
74959
|
enumerable: true,
|
|
73336
74960
|
get: function() {
|