@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../types/dist/event-category-
|
|
1
|
+
//#region ../types/dist/event-category-BvOFi6PY.mjs
|
|
2
2
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
3
3
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4
4
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -62,6 +62,24 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
62
62
|
* consumes this category and maps it to the `addon-crash-loop` kind.
|
|
63
63
|
*/
|
|
64
64
|
EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
|
|
65
|
+
/**
|
|
66
|
+
* A runner whose addon refused to start with a typed reason (D877) - parked
|
|
67
|
+
* in `refused`, never counted by the crash breaker, retried on operator
|
|
68
|
+
* action. One event per refusal.
|
|
69
|
+
*/
|
|
70
|
+
EventCategory["AddonRunnerRefused"] = "addon.runner-refused";
|
|
71
|
+
/**
|
|
72
|
+
* A runner settled on a state (D877): `running` (READY), `crashed`, `failed` or
|
|
73
|
+
* `refused`. In-process telemetry for the boot check (re-evaluate while any
|
|
74
|
+
* runner is still pending) and the alert centre (close a recovered runner).
|
|
75
|
+
*/
|
|
76
|
+
EventCategory["ProcessStateChanged"] = "process.state-changed";
|
|
77
|
+
/**
|
|
78
|
+
* The node's one-shot runner boot check (D877): planned runners against the
|
|
79
|
+
* process service, `degraded` when any is failed, refused or missing. The
|
|
80
|
+
* alert centre turns it into one alert and a direct critical push.
|
|
81
|
+
*/
|
|
82
|
+
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
65
83
|
EventCategory["AddonError"] = "addon.error";
|
|
66
84
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
67
85
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -4104,6 +4122,12 @@ var numberProcessor = (schema, ctx, _json, _params) => {
|
|
|
4104
4122
|
var booleanProcessor = (_schema, _ctx, json, _params) => {
|
|
4105
4123
|
json.type = "boolean";
|
|
4106
4124
|
};
|
|
4125
|
+
var bigintProcessor = (_schema, ctx, _json, _params) => {
|
|
4126
|
+
if (ctx.unrepresentable === "throw") throw new Error("BigInt cannot be represented in JSON Schema");
|
|
4127
|
+
};
|
|
4128
|
+
var symbolProcessor = (_schema, ctx, _json, _params) => {
|
|
4129
|
+
if (ctx.unrepresentable === "throw") throw new Error("Symbols cannot be represented in JSON Schema");
|
|
4130
|
+
};
|
|
4107
4131
|
var nullProcessor = (_schema, ctx, json, _params) => {
|
|
4108
4132
|
if (ctx.target === "openapi-3.0") {
|
|
4109
4133
|
json.type = "string";
|
|
@@ -4111,12 +4135,17 @@ var nullProcessor = (_schema, ctx, json, _params) => {
|
|
|
4111
4135
|
json.enum = [null];
|
|
4112
4136
|
} else json.type = "null";
|
|
4113
4137
|
};
|
|
4138
|
+
var undefinedProcessor = (_schema, ctx, _json, _params) => {
|
|
4139
|
+
if (ctx.unrepresentable === "throw") throw new Error("Undefined cannot be represented in JSON Schema");
|
|
4140
|
+
};
|
|
4114
4141
|
var voidProcessor = (_schema, ctx, _json, _params) => {
|
|
4115
4142
|
if (ctx.unrepresentable === "throw") throw new Error("Void cannot be represented in JSON Schema");
|
|
4116
4143
|
};
|
|
4117
4144
|
var neverProcessor = (_schema, _ctx, json, _params) => {
|
|
4118
4145
|
json.not = {};
|
|
4119
4146
|
};
|
|
4147
|
+
var anyProcessor = (_schema, _ctx, _json, _params) => {};
|
|
4148
|
+
var unknownProcessor = (_schema, _ctx, _json, _params) => {};
|
|
4120
4149
|
var dateProcessor = (_schema, ctx, _json, _params) => {
|
|
4121
4150
|
if (ctx.unrepresentable === "throw") throw new Error("Date cannot be represented in JSON Schema");
|
|
4122
4151
|
};
|
|
@@ -4148,12 +4177,53 @@ var literalProcessor = (schema, ctx, json, _params) => {
|
|
|
4148
4177
|
json.enum = vals;
|
|
4149
4178
|
}
|
|
4150
4179
|
};
|
|
4180
|
+
var nanProcessor = (_schema, ctx, _json, _params) => {
|
|
4181
|
+
if (ctx.unrepresentable === "throw") throw new Error("NaN cannot be represented in JSON Schema");
|
|
4182
|
+
};
|
|
4183
|
+
var templateLiteralProcessor = (schema, _ctx, json, _params) => {
|
|
4184
|
+
const _json = json;
|
|
4185
|
+
const pattern = schema._zod.pattern;
|
|
4186
|
+
if (!pattern) throw new Error("Pattern not found in template literal");
|
|
4187
|
+
_json.type = "string";
|
|
4188
|
+
_json.pattern = pattern.source;
|
|
4189
|
+
};
|
|
4190
|
+
var fileProcessor = (schema, _ctx, json, _params) => {
|
|
4191
|
+
const _json = json;
|
|
4192
|
+
const file = {
|
|
4193
|
+
type: "string",
|
|
4194
|
+
format: "binary",
|
|
4195
|
+
contentEncoding: "binary"
|
|
4196
|
+
};
|
|
4197
|
+
const { minimum, maximum, mime } = schema._zod.bag;
|
|
4198
|
+
if (minimum !== void 0) file.minLength = minimum;
|
|
4199
|
+
if (maximum !== void 0) file.maxLength = maximum;
|
|
4200
|
+
if (mime) if (mime.length === 1) {
|
|
4201
|
+
file.contentMediaType = mime[0];
|
|
4202
|
+
Object.assign(_json, file);
|
|
4203
|
+
} else {
|
|
4204
|
+
Object.assign(_json, file);
|
|
4205
|
+
_json.anyOf = mime.map((m) => ({ contentMediaType: m }));
|
|
4206
|
+
}
|
|
4207
|
+
else Object.assign(_json, file);
|
|
4208
|
+
};
|
|
4209
|
+
var successProcessor = (_schema, _ctx, json, _params) => {
|
|
4210
|
+
json.type = "boolean";
|
|
4211
|
+
};
|
|
4151
4212
|
var customProcessor = (_schema, ctx, _json, _params) => {
|
|
4152
4213
|
if (ctx.unrepresentable === "throw") throw new Error("Custom types cannot be represented in JSON Schema");
|
|
4153
4214
|
};
|
|
4215
|
+
var functionProcessor = (_schema, ctx, _json, _params) => {
|
|
4216
|
+
if (ctx.unrepresentable === "throw") throw new Error("Function types cannot be represented in JSON Schema");
|
|
4217
|
+
};
|
|
4154
4218
|
var transformProcessor = (_schema, ctx, _json, _params) => {
|
|
4155
4219
|
if (ctx.unrepresentable === "throw") throw new Error("Transforms cannot be represented in JSON Schema");
|
|
4156
4220
|
};
|
|
4221
|
+
var mapProcessor = (_schema, ctx, _json, _params) => {
|
|
4222
|
+
if (ctx.unrepresentable === "throw") throw new Error("Map cannot be represented in JSON Schema");
|
|
4223
|
+
};
|
|
4224
|
+
var setProcessor = (_schema, ctx, _json, _params) => {
|
|
4225
|
+
if (ctx.unrepresentable === "throw") throw new Error("Set cannot be represented in JSON Schema");
|
|
4226
|
+
};
|
|
4157
4227
|
var arrayProcessor = (schema, ctx, _json, params) => {
|
|
4158
4228
|
const json = _json;
|
|
4159
4229
|
const def = schema._zod.def;
|
|
@@ -4358,6 +4428,12 @@ var readonlyProcessor = (schema, ctx, json, params) => {
|
|
|
4358
4428
|
seen.ref = def.innerType;
|
|
4359
4429
|
json.readOnly = true;
|
|
4360
4430
|
};
|
|
4431
|
+
var promiseProcessor = (schema, ctx, _json, params) => {
|
|
4432
|
+
const def = schema._zod.def;
|
|
4433
|
+
process(def.innerType, ctx, params);
|
|
4434
|
+
const seen = ctx.seen.get(schema);
|
|
4435
|
+
seen.ref = def.innerType;
|
|
4436
|
+
};
|
|
4361
4437
|
var optionalProcessor = (schema, ctx, _json, params) => {
|
|
4362
4438
|
const def = schema._zod.def;
|
|
4363
4439
|
process(def.innerType, ctx, params);
|
|
@@ -4370,6 +4446,81 @@ var lazyProcessor = (schema, ctx, _json, params) => {
|
|
|
4370
4446
|
const seen = ctx.seen.get(schema);
|
|
4371
4447
|
seen.ref = innerType;
|
|
4372
4448
|
};
|
|
4449
|
+
var allProcessors = {
|
|
4450
|
+
string: stringProcessor,
|
|
4451
|
+
number: numberProcessor,
|
|
4452
|
+
boolean: booleanProcessor,
|
|
4453
|
+
bigint: bigintProcessor,
|
|
4454
|
+
symbol: symbolProcessor,
|
|
4455
|
+
null: nullProcessor,
|
|
4456
|
+
undefined: undefinedProcessor,
|
|
4457
|
+
void: voidProcessor,
|
|
4458
|
+
never: neverProcessor,
|
|
4459
|
+
any: anyProcessor,
|
|
4460
|
+
unknown: unknownProcessor,
|
|
4461
|
+
date: dateProcessor,
|
|
4462
|
+
enum: enumProcessor,
|
|
4463
|
+
literal: literalProcessor,
|
|
4464
|
+
nan: nanProcessor,
|
|
4465
|
+
template_literal: templateLiteralProcessor,
|
|
4466
|
+
file: fileProcessor,
|
|
4467
|
+
success: successProcessor,
|
|
4468
|
+
custom: customProcessor,
|
|
4469
|
+
function: functionProcessor,
|
|
4470
|
+
transform: transformProcessor,
|
|
4471
|
+
map: mapProcessor,
|
|
4472
|
+
set: setProcessor,
|
|
4473
|
+
array: arrayProcessor,
|
|
4474
|
+
object: objectProcessor,
|
|
4475
|
+
union: unionProcessor,
|
|
4476
|
+
intersection: intersectionProcessor,
|
|
4477
|
+
tuple: tupleProcessor,
|
|
4478
|
+
record: recordProcessor,
|
|
4479
|
+
nullable: nullableProcessor,
|
|
4480
|
+
nonoptional: nonoptionalProcessor,
|
|
4481
|
+
default: defaultProcessor,
|
|
4482
|
+
prefault: prefaultProcessor,
|
|
4483
|
+
catch: catchProcessor,
|
|
4484
|
+
pipe: pipeProcessor,
|
|
4485
|
+
readonly: readonlyProcessor,
|
|
4486
|
+
promise: promiseProcessor,
|
|
4487
|
+
optional: optionalProcessor,
|
|
4488
|
+
lazy: lazyProcessor
|
|
4489
|
+
};
|
|
4490
|
+
function toJSONSchema(input, params) {
|
|
4491
|
+
if ("_idmap" in input) {
|
|
4492
|
+
const registry = input;
|
|
4493
|
+
const ctx = initializeContext({
|
|
4494
|
+
...params,
|
|
4495
|
+
processors: allProcessors
|
|
4496
|
+
});
|
|
4497
|
+
const defs = {};
|
|
4498
|
+
for (const entry of registry._idmap.entries()) {
|
|
4499
|
+
const [_, schema] = entry;
|
|
4500
|
+
process(schema, ctx);
|
|
4501
|
+
}
|
|
4502
|
+
const schemas = {};
|
|
4503
|
+
ctx.external = {
|
|
4504
|
+
registry,
|
|
4505
|
+
uri: params?.uri,
|
|
4506
|
+
defs
|
|
4507
|
+
};
|
|
4508
|
+
for (const entry of registry._idmap.entries()) {
|
|
4509
|
+
const [key, schema] = entry;
|
|
4510
|
+
extractDefs(ctx, schema);
|
|
4511
|
+
schemas[key] = finalize(ctx, schema);
|
|
4512
|
+
}
|
|
4513
|
+
if (Object.keys(defs).length > 0) schemas.__shared = { [ctx.target === "draft-2020-12" ? "$defs" : "definitions"]: defs };
|
|
4514
|
+
return { schemas };
|
|
4515
|
+
}
|
|
4516
|
+
const ctx = initializeContext({
|
|
4517
|
+
...params,
|
|
4518
|
+
processors: allProcessors
|
|
4519
|
+
});
|
|
4520
|
+
process(input, ctx);
|
|
4521
|
+
extractDefs(ctx, input);
|
|
4522
|
+
return finalize(ctx, input);
|
|
4523
|
+
}
|
|
4373
4524
|
//#endregion
|
|
4374
4525
|
//#region ../../node_modules/zod/v4/classic/iso.js
|
|
4375
4526
|
var ZodISODateTime = /*@__PURE__*/ $constructor("ZodISODateTime", (inst, def) => {
|
|
@@ -5386,7 +5537,7 @@ var ZodIssueCode = {
|
|
|
5386
5537
|
var ZodFirstPartyTypeKind;
|
|
5387
5538
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5388
5539
|
//#endregion
|
|
5389
|
-
//#region ../types/dist/sleep-
|
|
5540
|
+
//#region ../types/dist/sleep-BegKjwUu.mjs
|
|
5390
5541
|
/**
|
|
5391
5542
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5392
5543
|
* window to float samples (D455).
|
|
@@ -5503,7 +5654,7 @@ function isKeychainStoredField(field) {
|
|
|
5503
5654
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5504
5655
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5505
5656
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5506
|
-
function isRecord$
|
|
5657
|
+
function isRecord$5(value) {
|
|
5507
5658
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5508
5659
|
}
|
|
5509
5660
|
function makeSecretMarker(ref) {
|
|
@@ -5514,12 +5665,12 @@ function makeSecretMarker(ref) {
|
|
|
5514
5665
|
}
|
|
5515
5666
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5516
5667
|
function isSecretMarker(value) {
|
|
5517
|
-
if (!isRecord$
|
|
5668
|
+
if (!isRecord$5(value)) return false;
|
|
5518
5669
|
const ref = value["$secret"];
|
|
5519
5670
|
return typeof ref === "string" && ref.length > 0;
|
|
5520
5671
|
}
|
|
5521
5672
|
function isSecretClear(value) {
|
|
5522
|
-
return isRecord$
|
|
5673
|
+
return isRecord$5(value) && value["$secretClear"] === true;
|
|
5523
5674
|
}
|
|
5524
5675
|
/**
|
|
5525
5676
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6129,7 +6280,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6129
6280
|
}
|
|
6130
6281
|
};
|
|
6131
6282
|
var KEEP = { kind: "keep" };
|
|
6132
|
-
function isRecord$
|
|
6283
|
+
function isRecord$4(value) {
|
|
6133
6284
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6134
6285
|
}
|
|
6135
6286
|
function defaultMintId() {
|
|
@@ -6142,7 +6293,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6142
6293
|
return out;
|
|
6143
6294
|
}
|
|
6144
6295
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6145
|
-
else if (isRecord$
|
|
6296
|
+
else if (isRecord$4(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6146
6297
|
return out;
|
|
6147
6298
|
}
|
|
6148
6299
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6197,7 +6348,7 @@ function rowId(row, idKey) {
|
|
|
6197
6348
|
return null;
|
|
6198
6349
|
}
|
|
6199
6350
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6200
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6351
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$4) : [];
|
|
6201
6352
|
if (!Array.isArray(incoming)) {
|
|
6202
6353
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6203
6354
|
return {
|
|
@@ -6213,7 +6364,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6213
6364
|
const kept = /* @__PURE__ */ new Set();
|
|
6214
6365
|
const rows = [];
|
|
6215
6366
|
for (const row of incoming) {
|
|
6216
|
-
if (!isRecord$
|
|
6367
|
+
if (!isRecord$4(row)) {
|
|
6217
6368
|
rows.push(row);
|
|
6218
6369
|
continue;
|
|
6219
6370
|
}
|
|
@@ -6238,7 +6389,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6238
6389
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6239
6390
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6240
6391
|
case "object": {
|
|
6241
|
-
if (!isRecord$
|
|
6392
|
+
if (!isRecord$4(incoming)) {
|
|
6242
6393
|
if (incoming === void 0) return KEEP;
|
|
6243
6394
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6244
6395
|
return {
|
|
@@ -6246,7 +6397,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6246
6397
|
value: incoming
|
|
6247
6398
|
};
|
|
6248
6399
|
}
|
|
6249
|
-
const storedObj = isRecord$
|
|
6400
|
+
const storedObj = isRecord$4(stored) ? stored : {};
|
|
6250
6401
|
return {
|
|
6251
6402
|
kind: "value",
|
|
6252
6403
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6369,7 +6520,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6369
6520
|
value: items
|
|
6370
6521
|
};
|
|
6371
6522
|
}
|
|
6372
|
-
if (isRecord$
|
|
6523
|
+
if (isRecord$4(v)) {
|
|
6373
6524
|
const out = {};
|
|
6374
6525
|
for (const [k, child] of Object.entries(v)) {
|
|
6375
6526
|
const s = substitute(child);
|
|
@@ -6401,7 +6552,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
6401
6552
|
this.name = "SecretOverwriteRefusedError";
|
|
6402
6553
|
}
|
|
6403
6554
|
};
|
|
6404
|
-
function isRecord(value) {
|
|
6555
|
+
function isRecord$3(value) {
|
|
6405
6556
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6406
6557
|
}
|
|
6407
6558
|
function resolvedValue(pass, marker) {
|
|
@@ -6430,7 +6581,7 @@ function inArray(pass, incoming, stored) {
|
|
|
6430
6581
|
return incoming.map((item, index) => {
|
|
6431
6582
|
const twin = stored[index];
|
|
6432
6583
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6433
|
-
if (isRecord(item) && isRecord(twin)) return inArrayRow(pass, item, twin);
|
|
6584
|
+
if (isRecord$3(item) && isRecord$3(twin)) return inArrayRow(pass, item, twin);
|
|
6434
6585
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6435
6586
|
return item;
|
|
6436
6587
|
});
|
|
@@ -6441,7 +6592,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6441
6592
|
const twin = stored[key];
|
|
6442
6593
|
if (isSecretMarker(twin)) {
|
|
6443
6594
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6444
|
-
} else if (isRecord(value) && isRecord(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6595
|
+
} else if (isRecord$3(value) && isRecord$3(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6445
6596
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6446
6597
|
}
|
|
6447
6598
|
return out;
|
|
@@ -6449,7 +6600,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6449
6600
|
async function walk(pass, incoming, stored) {
|
|
6450
6601
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6451
6602
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6452
|
-
if (!isRecord(incoming) || !isRecord(stored)) return incoming;
|
|
6603
|
+
if (!isRecord$3(incoming) || !isRecord$3(stored)) return incoming;
|
|
6453
6604
|
const out = { ...incoming };
|
|
6454
6605
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6455
6606
|
return out;
|
|
@@ -6480,7 +6631,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
6480
6631
|
function isJsonEqual(a, b) {
|
|
6481
6632
|
if (Object.is(a, b)) return true;
|
|
6482
6633
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6483
|
-
if (isRecord(a) && isRecord(b)) {
|
|
6634
|
+
if (isRecord$3(a) && isRecord$3(b)) {
|
|
6484
6635
|
const keys = Object.keys(a);
|
|
6485
6636
|
if (keys.length !== Object.keys(b).length) return false;
|
|
6486
6637
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -6504,7 +6655,7 @@ function markerKeysOf(blob, owner) {
|
|
|
6504
6655
|
}
|
|
6505
6656
|
function nodeFromStored(value, owner) {
|
|
6506
6657
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6507
|
-
if (!isRecord(value)) return null;
|
|
6658
|
+
if (!isRecord$3(value)) return null;
|
|
6508
6659
|
const children = /* @__PURE__ */ new Map();
|
|
6509
6660
|
for (const [key, child] of Object.entries(value)) {
|
|
6510
6661
|
const node = nodeFromStored(child, owner);
|
|
@@ -6637,7 +6788,6 @@ function createHandle(raw, opts) {
|
|
|
6637
6788
|
const writeAddon = (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p));
|
|
6638
6789
|
const readAddonStoreResult = raw.readAddonStoreResult;
|
|
6639
6790
|
const readAddonStoreKeyResult = raw.readAddonStoreKeyResult;
|
|
6640
|
-
const readDeviceStoreBatch = raw.readDeviceStoreBatch;
|
|
6641
6791
|
const overrides = {
|
|
6642
6792
|
readAddonStore: async () => resolveRead("addon", await raw.readAddonStore()),
|
|
6643
6793
|
...readAddonStoreResult !== void 0 ? { readAddonStoreResult: async () => {
|
|
@@ -6661,12 +6811,12 @@ function createHandle(raw, opts) {
|
|
|
6661
6811
|
};
|
|
6662
6812
|
} } : {},
|
|
6663
6813
|
readDeviceStore: async (deviceId) => resolveRead(`device:${deviceId}`, await raw.readDeviceStore(deviceId)),
|
|
6664
|
-
|
|
6665
|
-
const rows = await readDeviceStoreBatch
|
|
6814
|
+
readDeviceStoreBatch: async (deviceIds) => {
|
|
6815
|
+
const rows = await raw.readDeviceStoreBatch(deviceIds);
|
|
6666
6816
|
const out = /* @__PURE__ */ new Map();
|
|
6667
6817
|
for (const [deviceId, blob] of rows) out.set(deviceId, await resolveRead(`device:${deviceId}`, blob));
|
|
6668
6818
|
return out;
|
|
6669
|
-
}
|
|
6819
|
+
},
|
|
6670
6820
|
writeAddonStore: async (patch) => {
|
|
6671
6821
|
await writeAddon(patch);
|
|
6672
6822
|
},
|
|
@@ -7293,7 +7443,7 @@ var BaseAddon = class {
|
|
|
7293
7443
|
if (!ctx) return;
|
|
7294
7444
|
const addonId = ctx.id;
|
|
7295
7445
|
setImmediate(() => {
|
|
7296
|
-
ctx.api.addons
|
|
7446
|
+
ctx.api.addons.restartAddon.mutate({ addonId }).then(() => {
|
|
7297
7447
|
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
7298
7448
|
}).catch((err) => {
|
|
7299
7449
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
@@ -7493,7 +7643,7 @@ var BaseAddon = class {
|
|
|
7493
7643
|
return this._addonSecretTree;
|
|
7494
7644
|
}
|
|
7495
7645
|
deviceSecretTree() {
|
|
7496
|
-
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7646
|
+
this._deviceSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.deviceSettingsSchema()), this.secretStatePaths);
|
|
7497
7647
|
return this._deviceSecretTree;
|
|
7498
7648
|
}
|
|
7499
7649
|
/**
|
|
@@ -7569,42 +7719,135 @@ var BaseAddon = class {
|
|
|
7569
7719
|
this[timerOf] = timer;
|
|
7570
7720
|
}
|
|
7571
7721
|
/**
|
|
7572
|
-
* Wrap `ctx.settings.readAddonStore()` with a
|
|
7573
|
-
*
|
|
7574
|
-
* swap, or any race where the SqliteSettingsBackend is between shutdown and
|
|
7575
|
-
* re-initialize) doesn't propagate up into `initialize()` and leave the
|
|
7722
|
+
* Wrap `ctx.settings.readAddonStore()` with a retry budget so a transient
|
|
7723
|
+
* settings-store outage doesn't propagate up into `initialize()` and leave the
|
|
7576
7724
|
* addon permanently broken.
|
|
7577
7725
|
*
|
|
7578
|
-
*
|
|
7579
|
-
*
|
|
7580
|
-
* `
|
|
7726
|
+
* Two kinds of outage, two budgets:
|
|
7727
|
+
* - the store's own restart fingerprints (`SqliteSettingsBackend not
|
|
7728
|
+
* initialized`, `provider not available`): a short budget, then the addon
|
|
7729
|
+
* falls back to `{}` (defaults) - its first successful patch rehydrates;
|
|
7730
|
+
* - a TRANSPORT failure (the hub is restarting while this runner boots:
|
|
7731
|
+
* `discovery deadline exceeded`, `parent could not route`, a refused or
|
|
7732
|
+
* timed-out connection). Since D870 a runner's settings read THROWS instead
|
|
7733
|
+
* of answering `{}`, so without a budget a hub restart ends in a respawn
|
|
7734
|
+
* loop. A long, bounded budget; only after it the error propagates - the
|
|
7735
|
+
* addon never runs on defaults for a store it could not ask.
|
|
7736
|
+
* Anything else propagates immediately so real bugs surface.
|
|
7581
7737
|
*/
|
|
7582
7738
|
async readAddonStoreWithRetry() {
|
|
7583
7739
|
const settings = this.rawSettings();
|
|
7584
7740
|
if (!settings) return {};
|
|
7585
|
-
const delaysMs = [
|
|
7586
|
-
150,
|
|
7587
|
-
350,
|
|
7588
|
-
600,
|
|
7589
|
-
900
|
|
7590
|
-
];
|
|
7591
7741
|
let lastErr;
|
|
7592
|
-
for (let attempt = 0
|
|
7742
|
+
for (let attempt = 0;; attempt++) try {
|
|
7593
7743
|
const stored = await settings.readAddonStore() ?? {};
|
|
7594
7744
|
this.settingsStoreReady = true;
|
|
7595
7745
|
return stored;
|
|
7596
7746
|
} catch (err) {
|
|
7597
7747
|
lastErr = err;
|
|
7598
|
-
const
|
|
7599
|
-
if (
|
|
7600
|
-
|
|
7601
|
-
|
|
7748
|
+
const kind = classifyStoreError(err);
|
|
7749
|
+
if (kind === "permanent") throw err;
|
|
7750
|
+
const delay = (kind === "transport" ? TRANSPORT_RETRY_DELAYS_MS : RESTART_RETRY_DELAYS_MS)[attempt];
|
|
7751
|
+
if (delay === void 0) {
|
|
7752
|
+
if (kind === "transport") throw err;
|
|
7753
|
+
break;
|
|
7754
|
+
}
|
|
7755
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
7602
7756
|
}
|
|
7603
7757
|
this.settingsStoreReady = false;
|
|
7604
7758
|
this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
|
|
7605
7759
|
return {};
|
|
7606
7760
|
}
|
|
7607
7761
|
};
|
|
7762
|
+
/** The settings store's own restart fingerprints. */
|
|
7763
|
+
var RESTART_RETRY_DELAYS_MS = [
|
|
7764
|
+
150,
|
|
7765
|
+
350,
|
|
7766
|
+
600,
|
|
7767
|
+
900
|
|
7768
|
+
];
|
|
7769
|
+
/** A hub restarting under a booting runner: ~100 s in total. */
|
|
7770
|
+
var TRANSPORT_RETRY_DELAYS_MS = [
|
|
7771
|
+
150,
|
|
7772
|
+
350,
|
|
7773
|
+
600,
|
|
7774
|
+
900,
|
|
7775
|
+
2e3,
|
|
7776
|
+
5e3,
|
|
7777
|
+
1e4,
|
|
7778
|
+
2e4,
|
|
7779
|
+
3e4,
|
|
7780
|
+
3e4
|
|
7781
|
+
];
|
|
7782
|
+
var RESTART_FINGERPRINTS = ["SqliteSettingsBackend not initialized", "provider not available"];
|
|
7783
|
+
/** Node / socket error codes of a connection that did not happen or broke. */
|
|
7784
|
+
var TRANSPORT_CODES = new Set([
|
|
7785
|
+
"ECONNREFUSED",
|
|
7786
|
+
"ECONNRESET",
|
|
7787
|
+
"ETIMEDOUT",
|
|
7788
|
+
"EPIPE",
|
|
7789
|
+
"EHOSTUNREACH",
|
|
7790
|
+
"ENETUNREACH"
|
|
7791
|
+
]);
|
|
7792
|
+
/** tRPC error codes that mean "the other side is not answering now", not "your call is wrong". */
|
|
7793
|
+
var UNAVAILABLE_TRPC_CODES = new Set([
|
|
7794
|
+
"TIMEOUT",
|
|
7795
|
+
"SERVICE_UNAVAILABLE",
|
|
7796
|
+
"BAD_GATEWAY",
|
|
7797
|
+
"GATEWAY_TIMEOUT"
|
|
7798
|
+
]);
|
|
7799
|
+
/** The exact phrases OUR transport raises when it cannot reach the hub. */
|
|
7800
|
+
var TRANSPORT_PHRASES = [
|
|
7801
|
+
"discovery deadline exceeded",
|
|
7802
|
+
"parent could not route child unowned cap call",
|
|
7803
|
+
"UDS request timed out after",
|
|
7804
|
+
"channel closed"
|
|
7805
|
+
];
|
|
7806
|
+
/** Moleculer error `type`s of a call that could not be served right now. */
|
|
7807
|
+
var MOLECULER_TRANSIENT_TYPES = new Set([
|
|
7808
|
+
"REQUEST_TIMEOUT",
|
|
7809
|
+
"SERVICE_NOT_FOUND",
|
|
7810
|
+
"SERVICE_NOT_AVAILABLE",
|
|
7811
|
+
"REQUEST_REJECTED",
|
|
7812
|
+
"BROKER_DISCONNECTED"
|
|
7813
|
+
]);
|
|
7814
|
+
function stringProp(value, key) {
|
|
7815
|
+
if (typeof value !== "object" || value === null) return void 0;
|
|
7816
|
+
const found = Reflect.get(value, key);
|
|
7817
|
+
return typeof found === "string" ? found : void 0;
|
|
7818
|
+
}
|
|
7819
|
+
/** The code an error carries: its own, its cause's, or a tRPC `data.code`. */
|
|
7820
|
+
function errorCode(err) {
|
|
7821
|
+
const out = {};
|
|
7822
|
+
const cause = typeof err === "object" && err !== null ? Reflect.get(err, "cause") : void 0;
|
|
7823
|
+
const data = typeof err === "object" && err !== null ? Reflect.get(err, "data") : void 0;
|
|
7824
|
+
const node = stringProp(err, "code") ?? stringProp(cause, "code");
|
|
7825
|
+
if (node !== void 0) out.node = node;
|
|
7826
|
+
const trpc = stringProp(data, "code");
|
|
7827
|
+
if (trpc !== void 0) out.trpc = trpc;
|
|
7828
|
+
return out;
|
|
7829
|
+
}
|
|
7830
|
+
/**
|
|
7831
|
+
* Is a settings read failure worth retrying, and with which budget? Only
|
|
7832
|
+
* EXPLICIT signals count: a socket error code, a tRPC "unavailable" code, or
|
|
7833
|
+
* one of the exact phrases our own transport raises. A message that merely
|
|
7834
|
+
* contains "timed out" or "unreachable" is not evidence of anything, and
|
|
7835
|
+
* `settings store not wired` is a wiring bug that retrying cannot fix.
|
|
7836
|
+
*/
|
|
7837
|
+
function classifyStoreError(err) {
|
|
7838
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
7839
|
+
if (RESTART_FINGERPRINTS.some((f) => message.includes(f))) return "restart";
|
|
7840
|
+
const code = errorCode(err);
|
|
7841
|
+
if (code.node !== void 0 && TRANSPORT_CODES.has(code.node)) return "transport";
|
|
7842
|
+
if (code.trpc !== void 0 && UNAVAILABLE_TRPC_CODES.has(code.trpc)) return "transport";
|
|
7843
|
+
if (typeof err === "object" && err !== null) {
|
|
7844
|
+
if (Reflect.get(err, "retryable") === true) return "transport";
|
|
7845
|
+
const type = stringProp(err, "type");
|
|
7846
|
+
if (type !== void 0 && MOLECULER_TRANSIENT_TYPES.has(type)) return "transport";
|
|
7847
|
+
}
|
|
7848
|
+
if (TRANSPORT_PHRASES.some((f) => message.includes(f))) return "transport";
|
|
7849
|
+
return "permanent";
|
|
7850
|
+
}
|
|
7608
7851
|
/**
|
|
7609
7852
|
* Collect the keys of every field marked `perNode: true`, recursing into
|
|
7610
7853
|
* layout containers (`group` fields and `sub-tabs` tabs) the same way
|
|
@@ -7694,6 +7937,341 @@ var PeerBytesTicketSchema = object({
|
|
|
7694
7937
|
*/
|
|
7695
7938
|
declaredBytes: number().int().nonnegative().nullable()
|
|
7696
7939
|
});
|
|
7940
|
+
/** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
|
|
7941
|
+
/** The files a kind may live in. `history` is device-history's (D850), never records. */
|
|
7942
|
+
var RECORD_DATABASES = ["settings", "events"];
|
|
7943
|
+
/** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
|
|
7944
|
+
var RECORD_CLASSES = [
|
|
7945
|
+
"config",
|
|
7946
|
+
"ledger",
|
|
7947
|
+
"audit",
|
|
7948
|
+
"mirror",
|
|
7949
|
+
"ephemeral"
|
|
7950
|
+
];
|
|
7951
|
+
var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
|
|
7952
|
+
var RECORD_MAX_DATA_BYTES = 1024 * 1024;
|
|
7953
|
+
var RECORD_BATCH_MAX = 1e3;
|
|
7954
|
+
var RECORD_QUERY_MAX = 1e3;
|
|
7955
|
+
/** A kind in the `settings` file may not bound itself above this (D447: high volume is `events`). */
|
|
7956
|
+
var RECORD_SETTINGS_MAX_ROWS = 5e4;
|
|
7957
|
+
var PREFIX = "records/";
|
|
7958
|
+
/** The base of every records failure. `detail` is the human part of the message. */
|
|
7959
|
+
var RecordsError = class extends Error {
|
|
7960
|
+
code;
|
|
7961
|
+
detail;
|
|
7962
|
+
constructor(code, detail) {
|
|
7963
|
+
super(`${PREFIX}${code}: ${detail}`);
|
|
7964
|
+
this.name = "RecordsError";
|
|
7965
|
+
this.code = code;
|
|
7966
|
+
this.detail = detail;
|
|
7967
|
+
}
|
|
7968
|
+
};
|
|
7969
|
+
/** The keychain could not store or serve a value: explicit, never an empty string. */
|
|
7970
|
+
var RecordSecretUnavailableError = class extends RecordsError {
|
|
7971
|
+
constructor(detail) {
|
|
7972
|
+
super("secret-unavailable", detail);
|
|
7973
|
+
this.name = "RecordSecretUnavailableError";
|
|
7974
|
+
}
|
|
7975
|
+
};
|
|
7976
|
+
var InvalidRecordError = class extends RecordsError {
|
|
7977
|
+
constructor(detail) {
|
|
7978
|
+
super("invalid-record", detail);
|
|
7979
|
+
this.name = "InvalidRecordError";
|
|
7980
|
+
}
|
|
7981
|
+
};
|
|
7982
|
+
/** A kind declaration the engine refuses (non-additive change, bad shape, wrong file). */
|
|
7983
|
+
var DeclarationRefusedError = class extends RecordsError {
|
|
7984
|
+
constructor(detail) {
|
|
7985
|
+
super("declaration-refused", detail);
|
|
7986
|
+
this.name = "DeclarationRefusedError";
|
|
7987
|
+
}
|
|
7988
|
+
};
|
|
7989
|
+
function defOf(schema) {
|
|
7990
|
+
const zodBag = Reflect.get(schema, "_zod");
|
|
7991
|
+
if (typeof zodBag !== "object" || zodBag === null) return {};
|
|
7992
|
+
const def = Reflect.get(zodBag, "def");
|
|
7993
|
+
if (typeof def !== "object" || def === null) return {};
|
|
7994
|
+
return def;
|
|
7995
|
+
}
|
|
7996
|
+
function declaredHere(schema) {
|
|
7997
|
+
return globalRegistry.get(schema)?.secret === true;
|
|
7998
|
+
}
|
|
7999
|
+
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
8000
|
+
var WRAPPERS = new Set([
|
|
8001
|
+
"optional",
|
|
8002
|
+
"nullable",
|
|
8003
|
+
"default",
|
|
8004
|
+
"prefault",
|
|
8005
|
+
"catch",
|
|
8006
|
+
"readonly",
|
|
8007
|
+
"nonoptional"
|
|
8008
|
+
]);
|
|
8009
|
+
/**
|
|
8010
|
+
* The schema layers that make up ONE field: the schema itself and every
|
|
8011
|
+
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
8012
|
+
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
8013
|
+
* `.transform` on `in`).
|
|
8014
|
+
*/
|
|
8015
|
+
function layersOf(schema) {
|
|
8016
|
+
const out = [];
|
|
8017
|
+
const queue = [schema];
|
|
8018
|
+
while (queue.length > 0) {
|
|
8019
|
+
const s = queue.shift();
|
|
8020
|
+
if (!s || out.includes(s)) continue;
|
|
8021
|
+
out.push(s);
|
|
8022
|
+
const def = defOf(s);
|
|
8023
|
+
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
8024
|
+
if (def.type === "pipe") {
|
|
8025
|
+
if (def.in) queue.push(def.in);
|
|
8026
|
+
if (def.out) queue.push(def.out);
|
|
8027
|
+
}
|
|
8028
|
+
}
|
|
8029
|
+
return out;
|
|
8030
|
+
}
|
|
8031
|
+
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
8032
|
+
function isZodSecret(schema) {
|
|
8033
|
+
return layersOf(schema).some(declaredHere);
|
|
8034
|
+
}
|
|
8035
|
+
/**
|
|
8036
|
+
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
8037
|
+
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
8038
|
+
* object or array is reported as one path and not descended into — everything
|
|
8039
|
+
* under it is secret.
|
|
8040
|
+
*/
|
|
8041
|
+
function collectZodSecretPaths(schema, prefix = "") {
|
|
8042
|
+
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
8043
|
+
const paths = [];
|
|
8044
|
+
for (const layer of layersOf(schema)) {
|
|
8045
|
+
const def = defOf(layer);
|
|
8046
|
+
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
8047
|
+
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
8048
|
+
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
8049
|
+
else if (def.type === "intersection") {
|
|
8050
|
+
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
8051
|
+
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
8052
|
+
}
|
|
8053
|
+
}
|
|
8054
|
+
return [...new Set(paths)];
|
|
8055
|
+
}
|
|
8056
|
+
/**
|
|
8057
|
+
* Secret fields of a record, addressed the way a Zod schema declares them
|
|
8058
|
+
* (`collectZodSecretPaths`): dotted keys, `[]` for "each element of this array"
|
|
8059
|
+
* (`auth.accessToken`, `headers[].value`).
|
|
8060
|
+
*
|
|
8061
|
+
* Array elements are matched by a DECLARED id key (`secretArrayKeys`:
|
|
8062
|
+
* `{ headers: 'name' }`), never by index, so reordering a list keeps every
|
|
8063
|
+
* keychain ref (the same rule as `arrayItemFieldPath`). The concrete path of a
|
|
8064
|
+
* leaf names its element: `headers[X-Api].value`.
|
|
8065
|
+
*
|
|
8066
|
+
* Pure and browser-safe. Nothing here mutates: every transform returns a new value.
|
|
8067
|
+
*/
|
|
8068
|
+
/** The array prefixes (declared form, e.g. `headers` or `a.headers`) of a path. */
|
|
8069
|
+
function parseSecretPath(path) {
|
|
8070
|
+
if (path.length === 0) throw new InvalidRecordError("an empty secret path");
|
|
8071
|
+
return path.split(".").map((raw) => {
|
|
8072
|
+
const each = raw.endsWith("[]");
|
|
8073
|
+
const key = each ? raw.slice(0, -2) : raw;
|
|
8074
|
+
if (key.length === 0) throw new InvalidRecordError(`secret path "${path}" has an empty segment`);
|
|
8075
|
+
return {
|
|
8076
|
+
key,
|
|
8077
|
+
each
|
|
8078
|
+
};
|
|
8079
|
+
});
|
|
8080
|
+
}
|
|
8081
|
+
/** The declared array prefixes of `path` that need an id key (`headers`, `a.rows`). */
|
|
8082
|
+
function secretArrayPrefixes(path) {
|
|
8083
|
+
const segments = parseSecretPath(path);
|
|
8084
|
+
const prefixes = [];
|
|
8085
|
+
const walked = [];
|
|
8086
|
+
for (const segment of segments) {
|
|
8087
|
+
walked.push(segment.key);
|
|
8088
|
+
if (segment.each) prefixes.push(walked.join("."));
|
|
8089
|
+
}
|
|
8090
|
+
return prefixes;
|
|
8091
|
+
}
|
|
8092
|
+
/**
|
|
8093
|
+
* Record kinds (D881): the declaration an addon makes of one kind of fact, the
|
|
8094
|
+
* Zod row schema that describes it, and the helper that turns the two into the
|
|
8095
|
+
* JSON the engine stores.
|
|
8096
|
+
*
|
|
8097
|
+
* A kind is declared ONCE, next to the code that owns it, and the engine's
|
|
8098
|
+
* reconciler creates its indexes - nothing creates DDL at runtime from a write.
|
|
8099
|
+
* Everything the generic machinery needs (secret fields, the entry descriptor)
|
|
8100
|
+
* is DERIVED from the Zod schema: `.meta({ secret: true })` marks a credential,
|
|
8101
|
+
* never a field name (D879).
|
|
8102
|
+
*/
|
|
8103
|
+
/** A JSON field path: `trackId`, `auth.accessToken`. Charset-restricted: it is rendered into DDL. */
|
|
8104
|
+
var RecordFieldPathSchema = string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,63}(\.[A-Za-z_][A-Za-z0-9_]{0,63}){0,3}$/);
|
|
8105
|
+
var RecordIndexSchema = object({
|
|
8106
|
+
name: string().regex(/^[a-z][a-z0-9_]{0,31}$/),
|
|
8107
|
+
fields: array(RecordFieldPathSchema).min(1).max(4),
|
|
8108
|
+
unique: boolean().optional()
|
|
8109
|
+
}).strict();
|
|
8110
|
+
var RecordRetentionSchema = union([
|
|
8111
|
+
object({
|
|
8112
|
+
ttlMs: number().int().positive(),
|
|
8113
|
+
from: _enum(["at", "write"])
|
|
8114
|
+
}).strict(),
|
|
8115
|
+
object({
|
|
8116
|
+
maxRows: number().int().positive().optional(),
|
|
8117
|
+
maxRowsPerDevice: number().int().positive().optional()
|
|
8118
|
+
}).strict().refine((r) => r.maxRows !== void 0 || r.maxRowsPerDevice !== void 0, { message: "name maxRows, maxRowsPerDevice or both" }),
|
|
8119
|
+
object({
|
|
8120
|
+
owner: string().min(1),
|
|
8121
|
+
reason: string().min(1)
|
|
8122
|
+
}).strict(),
|
|
8123
|
+
object({ none: string().min(1) }).strict()
|
|
8124
|
+
]);
|
|
8125
|
+
/** The descriptor a generic entries UI reads (D881 "generic entries"). */
|
|
8126
|
+
var EntryDescriptorSchema = object({
|
|
8127
|
+
title: string().min(1),
|
|
8128
|
+
/** The record body field shown as the entry's name. */
|
|
8129
|
+
nameField: string().min(1),
|
|
8130
|
+
/** JSON Schema of the entry body; `secret: true` marks a password field. */
|
|
8131
|
+
fields: record(string(), unknown())
|
|
8132
|
+
}).strict();
|
|
8133
|
+
/** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
|
|
8134
|
+
var RecordKindDeclarationSchema = object({
|
|
8135
|
+
database: _enum(RECORD_DATABASES).default("settings"),
|
|
8136
|
+
class: _enum(RECORD_CLASSES),
|
|
8137
|
+
writeTrigger: string().min(1),
|
|
8138
|
+
device: _enum([
|
|
8139
|
+
"required",
|
|
8140
|
+
"optional",
|
|
8141
|
+
"none"
|
|
8142
|
+
]).default("none"),
|
|
8143
|
+
at: _enum(["required", "none"]).default("none"),
|
|
8144
|
+
indexes: array(RecordIndexSchema).max(8).default([]),
|
|
8145
|
+
retention: RecordRetentionSchema,
|
|
8146
|
+
deviceRemoval: _enum(["delete", "none"]).default("none"),
|
|
8147
|
+
maxDataBytes: number().int().positive().max(RECORD_MAX_DATA_BYTES).default(RECORD_DEFAULT_MAX_DATA_BYTES),
|
|
8148
|
+
/** Derived from the Zod schema; never written by hand. */
|
|
8149
|
+
secretPaths: array(string().min(1)).default([]),
|
|
8150
|
+
/** The id key of each array that carries a secret (`{ headers: 'name' }`). */
|
|
8151
|
+
secretArrayKeys: record(string(), string()).default({}),
|
|
8152
|
+
/** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
|
|
8153
|
+
adoptsFrom: string().min(1).optional(),
|
|
8154
|
+
/** Kinds that must agree through `transact` sit in one file under one family name. */
|
|
8155
|
+
transactFamily: string().min(1).optional(),
|
|
8156
|
+
entry: EntryDescriptorSchema.optional()
|
|
8157
|
+
}).strict();
|
|
8158
|
+
/** The kind names: lower-case, dash separated, short enough for an index name. */
|
|
8159
|
+
var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
8160
|
+
/** Cross-field rules a declaration must satisfy. Throws {@link DeclarationRefusedError}. */
|
|
8161
|
+
function assertValidDeclaration(name, decl) {
|
|
8162
|
+
const refuse = (why) => {
|
|
8163
|
+
throw new DeclarationRefusedError(`kind "${name}": ${why}`);
|
|
8164
|
+
};
|
|
8165
|
+
if (!RecordKindNameSchema.safeParse(name).success) refuse("the name must be lower-case-dashed");
|
|
8166
|
+
const seen = /* @__PURE__ */ new Set();
|
|
8167
|
+
for (const index of decl.indexes) {
|
|
8168
|
+
if (seen.has(index.name)) refuse(`index name "${index.name}" is declared twice`);
|
|
8169
|
+
seen.add(index.name);
|
|
8170
|
+
}
|
|
8171
|
+
const { retention } = decl;
|
|
8172
|
+
const hasSecrets = decl.secretPaths.length > 0;
|
|
8173
|
+
if ("ttlMs" in retention) {
|
|
8174
|
+
if (retention.from === "at" && decl.at !== "required") refuse("a ttl from \"at\" needs at: \"required\"");
|
|
8175
|
+
if (hasSecrets) refuse("a kind with secret fields cannot use engine TTL (its keychain values would be orphaned)");
|
|
8176
|
+
}
|
|
8177
|
+
if ("maxRows" in retention || "maxRowsPerDevice" in retention) {
|
|
8178
|
+
if (retention.maxRowsPerDevice !== void 0 && decl.device !== "required") refuse("maxRowsPerDevice needs device: \"required\"");
|
|
8179
|
+
if (decl.at !== "required") refuse("a row bound trims the oldest \"at\": it needs at: \"required\"");
|
|
8180
|
+
if (hasSecrets) refuse("a kind with secret fields cannot use an engine row bound");
|
|
8181
|
+
const bound = Math.max(retention.maxRows ?? 0, retention.maxRowsPerDevice ?? 0);
|
|
8182
|
+
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)`);
|
|
8183
|
+
}
|
|
8184
|
+
if (decl.deviceRemoval === "delete" && decl.device === "none") refuse("deviceRemoval: \"delete\" needs a device: \"required\" or \"optional\"");
|
|
8185
|
+
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`);
|
|
8186
|
+
}
|
|
8187
|
+
function bodyFieldsOf(schema) {
|
|
8188
|
+
return { ...toJSONSchema(schema, {
|
|
8189
|
+
unrepresentable: "any",
|
|
8190
|
+
io: "input"
|
|
8191
|
+
}) };
|
|
8192
|
+
}
|
|
8193
|
+
function isRecordLike(value) {
|
|
8194
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
8195
|
+
}
|
|
8196
|
+
/** Does every branch of the body schema carry `field`? (A discriminated union has several.) */
|
|
8197
|
+
function hasNameField(json, field) {
|
|
8198
|
+
const branches = json["oneOf"] ?? json["anyOf"];
|
|
8199
|
+
if (Array.isArray(branches)) return branches.length > 0 && branches.every((b) => isRecordLike(b) && hasNameField(b, field));
|
|
8200
|
+
const properties = json["properties"];
|
|
8201
|
+
return isRecordLike(properties) && Object.prototype.hasOwnProperty.call(properties, field);
|
|
8202
|
+
}
|
|
8203
|
+
/**
|
|
8204
|
+
* Declare the kinds of a package. The keys are the kind names. The result is
|
|
8205
|
+
* what `ctx.records.declare` sends to the engine and what `ctx.records.kind`
|
|
8206
|
+
* types its handle from.
|
|
8207
|
+
*/
|
|
8208
|
+
function defineRecordKinds(specs) {
|
|
8209
|
+
const out = {};
|
|
8210
|
+
for (const [name, spec] of Object.entries(specs)) {
|
|
8211
|
+
const secretPaths = collectZodSecretPaths(spec.schema);
|
|
8212
|
+
const nameField = spec.entry?.nameField ?? "name";
|
|
8213
|
+
const fields = bodyFieldsOf(spec.schema);
|
|
8214
|
+
if (spec.entry !== void 0 && !hasNameField(fields, nameField)) throw new DeclarationRefusedError(`kind "${name}": an entry kind's schema needs a "${nameField}" field`);
|
|
8215
|
+
const parsed = RecordKindDeclarationSchema.parse({
|
|
8216
|
+
database: spec.database,
|
|
8217
|
+
class: spec.class,
|
|
8218
|
+
writeTrigger: spec.writeTrigger,
|
|
8219
|
+
device: spec.device,
|
|
8220
|
+
at: spec.at,
|
|
8221
|
+
indexes: spec.indexes === void 0 ? void 0 : [...spec.indexes],
|
|
8222
|
+
retention: spec.retention,
|
|
8223
|
+
deviceRemoval: spec.deviceRemoval,
|
|
8224
|
+
maxDataBytes: spec.maxDataBytes,
|
|
8225
|
+
secretPaths: [...secretPaths],
|
|
8226
|
+
secretArrayKeys: spec.secretArrayKeys === void 0 ? void 0 : { ...spec.secretArrayKeys },
|
|
8227
|
+
adoptsFrom: spec.adoptsFrom,
|
|
8228
|
+
transactFamily: spec.transactFamily,
|
|
8229
|
+
entry: spec.entry === void 0 ? void 0 : {
|
|
8230
|
+
title: spec.entry.title,
|
|
8231
|
+
nameField,
|
|
8232
|
+
fields
|
|
8233
|
+
}
|
|
8234
|
+
});
|
|
8235
|
+
assertValidDeclaration(name, parsed);
|
|
8236
|
+
out[name] = {
|
|
8237
|
+
name,
|
|
8238
|
+
schema: spec.schema,
|
|
8239
|
+
declaration: parsed
|
|
8240
|
+
};
|
|
8241
|
+
}
|
|
8242
|
+
return out;
|
|
8243
|
+
}
|
|
8244
|
+
/**
|
|
8245
|
+
* Declare one entry kind. An entry is configuration: never trimmed by the
|
|
8246
|
+
* engine, never aged, belonging to no device.
|
|
8247
|
+
*/
|
|
8248
|
+
function defineEntryKind(name, spec) {
|
|
8249
|
+
const defined = defineRecordKinds({ [name]: {
|
|
8250
|
+
schema: spec.schema,
|
|
8251
|
+
class: "config",
|
|
8252
|
+
writeTrigger: spec.writeTrigger ?? "an operator adds or edits an entry in the entries UI",
|
|
8253
|
+
retention: { none: "an entry goes only when the operator deletes it" },
|
|
8254
|
+
...spec.database === void 0 ? {} : { database: spec.database },
|
|
8255
|
+
...spec.indexes === void 0 ? {} : { indexes: spec.indexes },
|
|
8256
|
+
...spec.secretArrayKeys === void 0 ? {} : { secretArrayKeys: spec.secretArrayKeys },
|
|
8257
|
+
...spec.adoptsFrom === void 0 ? {} : { adoptsFrom: spec.adoptsFrom },
|
|
8258
|
+
entry: {
|
|
8259
|
+
title: spec.title,
|
|
8260
|
+
...spec.nameField === void 0 ? {} : { nameField: spec.nameField }
|
|
8261
|
+
}
|
|
8262
|
+
} })[name];
|
|
8263
|
+
if (defined === void 0) throw new DeclarationRefusedError(`entry kind "${name}" was not built`);
|
|
8264
|
+
return defined;
|
|
8265
|
+
}
|
|
8266
|
+
/**
|
|
8267
|
+
* Legacy source for entry adoption (B3): a list stored under addon-settings
|
|
8268
|
+
* `<addonId>.<key>` until records-adopt copies rows into the entry kind.
|
|
8269
|
+
*/
|
|
8270
|
+
var SETTINGS_ARRAY_ADOPTS_PREFIX = "@settings-array/";
|
|
8271
|
+
/** The `adoptsFrom` value for an addon-settings array field. */
|
|
8272
|
+
function settingsArrayAdoptsFrom(addonId, settingsKey) {
|
|
8273
|
+
return `${SETTINGS_ARRAY_ADOPTS_PREFIX}${addonId}/${settingsKey}`;
|
|
8274
|
+
}
|
|
7697
8275
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
7698
8276
|
var CamProfileSchema = _enum([
|
|
7699
8277
|
"high",
|
|
@@ -8159,7 +8737,7 @@ object({
|
|
|
8159
8737
|
params: record(string(), union([string(), number()])).optional()
|
|
8160
8738
|
});
|
|
8161
8739
|
//#endregion
|
|
8162
|
-
//#region ../types/dist/err-msg-
|
|
8740
|
+
//#region ../types/dist/err-msg-BXKzRBwg.mjs
|
|
8163
8741
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
8164
8742
|
DeviceType["Camera"] = "camera";
|
|
8165
8743
|
DeviceType["Hub"] = "hub";
|
|
@@ -8251,6 +8829,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
8251
8829
|
* native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
|
|
8252
8830
|
* integrations sharing the same food/desiccant/hopper surface. */
|
|
8253
8831
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
8832
|
+
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
8833
|
+
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
8834
|
+
* Sources: native Bosch Home Connect, reusable by similar integrations. */
|
|
8835
|
+
DeviceType["Dishwasher"] = "dishwasher";
|
|
8254
8836
|
return DeviceType;
|
|
8255
8837
|
}({});
|
|
8256
8838
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -8428,6 +9010,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
8428
9010
|
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
8429
9011
|
* real Switch device for UI rendering / export adapters. */
|
|
8430
9012
|
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
9013
|
+
/** A smart plug: a `switch` whose source says it is an outlet (HA
|
|
9014
|
+
* `device_class: outlet`). The Alexa export shows it as a SMARTPLUG. */
|
|
9015
|
+
DeviceRole["Outlet"] = "outlet";
|
|
8431
9016
|
/** Generic motion / occupancy / moving event source. Distinct from
|
|
8432
9017
|
* the camera accessory PirSensor role: that one is a camera child;
|
|
8433
9018
|
* this is a standalone HA / 3rd-party motion sensor. */
|
|
@@ -8505,7 +9090,7 @@ function errMsg(err) {
|
|
|
8505
9090
|
return String(err);
|
|
8506
9091
|
}
|
|
8507
9092
|
//#endregion
|
|
8508
|
-
//#region ../types/dist/composition-
|
|
9093
|
+
//#region ../types/dist/composition-CB6PMT9p.mjs
|
|
8509
9094
|
/**
|
|
8510
9095
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
8511
9096
|
*
|
|
@@ -11826,11 +12411,10 @@ var ClipModelMetaSchema = object({
|
|
|
11826
12411
|
/**
|
|
11827
12412
|
* The `vector-store` index this model's vectors live in. ONE feature space
|
|
11828
12413
|
* per index: two models share an index only when their vectors are ranked
|
|
11829
|
-
* against each other, which for CLIP means never across families.
|
|
11830
|
-
*
|
|
11831
|
-
* `modelId`); any other model gets its own.
|
|
12414
|
+
* against each other, which for CLIP means never across families. Every
|
|
12415
|
+
* model gets its own.
|
|
11832
12416
|
*/
|
|
11833
|
-
vectorIndex: string().regex(/^object-clip
|
|
12417
|
+
vectorIndex: string().regex(/^object-clip-[a-z0-9][a-z0-9-]*$/),
|
|
11834
12418
|
/**
|
|
11835
12419
|
* The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
|
|
11836
12420
|
* must be unique per tokenizer: every model's siblings land in ONE flat
|
|
@@ -13255,8 +13839,13 @@ var AlertSeveritySchema = _enum([
|
|
|
13255
13839
|
"info",
|
|
13256
13840
|
"success",
|
|
13257
13841
|
"warning",
|
|
13258
|
-
"error"
|
|
13842
|
+
"error",
|
|
13843
|
+
"critical"
|
|
13259
13844
|
]);
|
|
13845
|
+
var AlertActionSchema = object({
|
|
13846
|
+
label: string(),
|
|
13847
|
+
href: string().optional()
|
|
13848
|
+
});
|
|
13260
13849
|
var AlertStatusSchema = _enum([
|
|
13261
13850
|
"active",
|
|
13262
13851
|
"in-progress",
|
|
@@ -13274,6 +13863,7 @@ var AlertSchema = object({
|
|
|
13274
13863
|
severity: AlertSeveritySchema,
|
|
13275
13864
|
title: string(),
|
|
13276
13865
|
message: string(),
|
|
13866
|
+
action: AlertActionSchema.optional(),
|
|
13277
13867
|
status: AlertStatusSchema,
|
|
13278
13868
|
progress: number().optional(),
|
|
13279
13869
|
read: boolean(),
|
|
@@ -15716,6 +16306,41 @@ var ComposableCapabilitiesSchema = object({ caps: array(object({
|
|
|
15716
16306
|
keyField: string()
|
|
15717
16307
|
}).optional()
|
|
15718
16308
|
})) });
|
|
16309
|
+
/**
|
|
16310
|
+
* The report of a one-shot "move this owner's plaintext secrets into the
|
|
16311
|
+
* keychain" run (D878). COUNTS only - never a value, never a ref.
|
|
16312
|
+
*
|
|
16313
|
+
* The owner runs it on its own rows, through its own write path; an operator
|
|
16314
|
+
* script (`scripts/hub/migrate-raw-secrets.ts`) calls the owner's cap method.
|
|
16315
|
+
* Dry run (`apply: false`) reports what WOULD move and changes nothing.
|
|
16316
|
+
*/
|
|
16317
|
+
var RawSecretMigrationInputSchema = object({
|
|
16318
|
+
/** `false` (the default of the script) = report only. */
|
|
16319
|
+
apply: boolean() });
|
|
16320
|
+
var RawSecretMigrationReportSchema = object({
|
|
16321
|
+
apply: boolean(),
|
|
16322
|
+
/** Rows that can carry a secret (a profile, an enrolment). */
|
|
16323
|
+
rows: number().int(),
|
|
16324
|
+
/** Rows whose secret was plaintext when the run started. */
|
|
16325
|
+
raw: number().int(),
|
|
16326
|
+
/** Rows that already held a keychain marker when the run started. */
|
|
16327
|
+
markers: number().int(),
|
|
16328
|
+
/** Plaintext rows moved by THIS run (always 0 on a dry run). */
|
|
16329
|
+
migrated: number().int(),
|
|
16330
|
+
/** Plaintext rows left in place because the move or its read-back failed. */
|
|
16331
|
+
failed: number().int(),
|
|
16332
|
+
/** After the run: rows still holding plaintext. */
|
|
16333
|
+
remainingRaw: number().int(),
|
|
16334
|
+
/** After the run: markers the keychain could not resolve right now. */
|
|
16335
|
+
unresolvedMarkers: number().int(),
|
|
16336
|
+
/**
|
|
16337
|
+
* A second, redundant copy of the secrets' rows that the run found (and, on
|
|
16338
|
+
* `apply`, deleted after verifying the first). Owners with a single copy omit it.
|
|
16339
|
+
*/
|
|
16340
|
+
redundantCopies: number().int().optional(),
|
|
16341
|
+
/** True when nothing is raw and every marker resolves. */
|
|
16342
|
+
verified: boolean()
|
|
16343
|
+
});
|
|
15719
16344
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
15720
16345
|
* agent is the reason placement is not fixed to the hub. */
|
|
15721
16346
|
var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
|
|
@@ -15942,6 +16567,9 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
15942
16567
|
}), SettingsUpdateResultSchema, {
|
|
15943
16568
|
kind: "mutation",
|
|
15944
16569
|
auth: "admin"
|
|
16570
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
16571
|
+
kind: "mutation",
|
|
16572
|
+
auth: "admin"
|
|
15945
16573
|
}), method(object({}), object({ libs: array(object({
|
|
15946
16574
|
filePath: string(),
|
|
15947
16575
|
content: string()
|
|
@@ -16205,6 +16833,347 @@ id: union([string(), number()]) }), {
|
|
|
16205
16833
|
auth: "admin"
|
|
16206
16834
|
});
|
|
16207
16835
|
/**
|
|
16836
|
+
* records - an addon's own facts and documents (D881): ledgers, audit rows,
|
|
16837
|
+
* config documents, mirrors. The third storage API next to `ctx.settings`
|
|
16838
|
+
* (operator intent, D870) and device-history (numbers over time, D850).
|
|
16839
|
+
*
|
|
16840
|
+
* Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
|
|
16841
|
+
* crossed a process and stated by a hub in-process caller (`ctx.records` does
|
|
16842
|
+
* that with the addon id closed over). It is deliberately NOT in any input
|
|
16843
|
+
* schema, so a session can never supply it, and a call with no stamp is refused
|
|
16844
|
+
* `records/no-caller`. A kind is readable and writable only by its owner; other
|
|
16845
|
+
* addons go through the owner's capability.
|
|
16846
|
+
*
|
|
16847
|
+
* Every read is three-way: a row, `null`, or the call THROWS. A failed read is
|
|
16848
|
+
* never `[]`. Secret fields are never on the wire: a read shows the
|
|
16849
|
+
* redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
|
|
16850
|
+
* resolves itself, and a write may carry only a keychain marker bound to the
|
|
16851
|
+
* row's own ref.
|
|
16852
|
+
*
|
|
16853
|
+
* Internal: addons reach it through `ctx.records`, never directly.
|
|
16854
|
+
*/
|
|
16855
|
+
var RecordIdSchema = string().min(1).max(256);
|
|
16856
|
+
/** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
|
|
16857
|
+
var RecordBodySchema = record(string(), unknown());
|
|
16858
|
+
var RecordInputSchema = object({
|
|
16859
|
+
id: RecordIdSchema,
|
|
16860
|
+
/** The device this row belongs to (D865 removal, per-device reads). */
|
|
16861
|
+
deviceId: number().int().optional(),
|
|
16862
|
+
/** The domain clock, ms: observed / created / opened. */
|
|
16863
|
+
at: number().int().optional(),
|
|
16864
|
+
/** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
|
|
16865
|
+
expiresAt: number().int().optional(),
|
|
16866
|
+
data: RecordBodySchema
|
|
16867
|
+
});
|
|
16868
|
+
var RecordViewSchema = object({
|
|
16869
|
+
id: string(),
|
|
16870
|
+
deviceId: number().int().nullable(),
|
|
16871
|
+
at: number().nullable(),
|
|
16872
|
+
expiresAt: number().nullable(),
|
|
16873
|
+
rev: number().int(),
|
|
16874
|
+
updatedAt: number(),
|
|
16875
|
+
data: RecordBodySchema
|
|
16876
|
+
});
|
|
16877
|
+
/** Declared index fields only. Anything else does not compile, by design. */
|
|
16878
|
+
var RecordWhereSchema = record(RecordFieldPathSchema, union([
|
|
16879
|
+
string(),
|
|
16880
|
+
number(),
|
|
16881
|
+
boolean(),
|
|
16882
|
+
object({ in: array(union([
|
|
16883
|
+
string(),
|
|
16884
|
+
number(),
|
|
16885
|
+
boolean()
|
|
16886
|
+
])).min(1).max(RECORD_BATCH_MAX) }),
|
|
16887
|
+
object({
|
|
16888
|
+
gt: union([string(), number()]).optional(),
|
|
16889
|
+
gte: union([string(), number()]).optional(),
|
|
16890
|
+
lt: union([string(), number()]).optional(),
|
|
16891
|
+
lte: union([string(), number()]).optional()
|
|
16892
|
+
}).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
|
|
16893
|
+
]));
|
|
16894
|
+
var KindShape = { kind: RecordKindNameSchema };
|
|
16895
|
+
var TimeWindowShape = {
|
|
16896
|
+
deviceId: number().int().optional(),
|
|
16897
|
+
atFrom: number().optional(),
|
|
16898
|
+
atTo: number().optional()
|
|
16899
|
+
};
|
|
16900
|
+
var RecordQueryInputSchema = object({
|
|
16901
|
+
...KindShape,
|
|
16902
|
+
...TimeWindowShape,
|
|
16903
|
+
where: RecordWhereSchema.optional(),
|
|
16904
|
+
/** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
|
|
16905
|
+
order: _enum(["at", "id"]).optional(),
|
|
16906
|
+
desc: boolean().optional(),
|
|
16907
|
+
limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
|
|
16908
|
+
/** Opaque keyset cursor from a previous answer. There is no offset. */
|
|
16909
|
+
cursor: string().min(1).optional()
|
|
16910
|
+
});
|
|
16911
|
+
var RecordQueryResultSchema = object({
|
|
16912
|
+
records: array(RecordViewSchema),
|
|
16913
|
+
nextCursor: string().nullable()
|
|
16914
|
+
});
|
|
16915
|
+
var RecordKindStateSchema = _enum([
|
|
16916
|
+
"created",
|
|
16917
|
+
"unchanged",
|
|
16918
|
+
"updated"
|
|
16919
|
+
]);
|
|
16920
|
+
var DeclareKindResultSchema = object({
|
|
16921
|
+
kindId: number().int(),
|
|
16922
|
+
state: RecordKindStateSchema,
|
|
16923
|
+
createdIndexes: array(string()),
|
|
16924
|
+
/** The boot guard: the kind is empty while its legacy table still holds rows. */
|
|
16925
|
+
adoptionPending: object({
|
|
16926
|
+
legacyTable: string(),
|
|
16927
|
+
legacyRows: number().int()
|
|
16928
|
+
}).nullable()
|
|
16929
|
+
});
|
|
16930
|
+
/** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
|
|
16931
|
+
var SecretRefsList = array(string());
|
|
16932
|
+
var RecordSecretRefsSchema = record(string(), record(string(), string()));
|
|
16933
|
+
method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
|
|
16934
|
+
kind: "mutation",
|
|
16935
|
+
auth: "admin"
|
|
16936
|
+
}), method(object({
|
|
16937
|
+
...KindShape,
|
|
16938
|
+
id: RecordIdSchema
|
|
16939
|
+
}), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
|
|
16940
|
+
...KindShape,
|
|
16941
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16942
|
+
}), array(RecordViewSchema), { auth: "admin" }), method(object({
|
|
16943
|
+
...KindShape,
|
|
16944
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16945
|
+
}), RecordSecretRefsSchema, { auth: "admin" }), method(object({
|
|
16946
|
+
...KindShape,
|
|
16947
|
+
record: RecordInputSchema,
|
|
16948
|
+
/** Compare-and-set. `0` means "the row must not exist". */
|
|
16949
|
+
ifRev: number().int().min(0).optional()
|
|
16950
|
+
}), object({
|
|
16951
|
+
rev: number().int(),
|
|
16952
|
+
releasedRefs: SecretRefsList
|
|
16953
|
+
}), {
|
|
16954
|
+
kind: "mutation",
|
|
16955
|
+
auth: "admin"
|
|
16956
|
+
}), method(object({
|
|
16957
|
+
...KindShape,
|
|
16958
|
+
records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16959
|
+
}), object({
|
|
16960
|
+
count: number().int(),
|
|
16961
|
+
releasedRefs: SecretRefsList
|
|
16962
|
+
}), {
|
|
16963
|
+
kind: "mutation",
|
|
16964
|
+
auth: "admin"
|
|
16965
|
+
}), method(object({
|
|
16966
|
+
...KindShape,
|
|
16967
|
+
id: RecordIdSchema,
|
|
16968
|
+
data: RecordBodySchema,
|
|
16969
|
+
at: number().int().nullable().optional(),
|
|
16970
|
+
expiresAt: number().int().nullable().optional(),
|
|
16971
|
+
ifRev: number().int().min(1).optional()
|
|
16972
|
+
}), object({
|
|
16973
|
+
rev: number().int(),
|
|
16974
|
+
releasedRefs: SecretRefsList
|
|
16975
|
+
}), {
|
|
16976
|
+
kind: "mutation",
|
|
16977
|
+
auth: "admin"
|
|
16978
|
+
}), method(object({
|
|
16979
|
+
...KindShape,
|
|
16980
|
+
id: RecordIdSchema
|
|
16981
|
+
}), object({
|
|
16982
|
+
deleted: boolean(),
|
|
16983
|
+
secretRefs: SecretRefsList
|
|
16984
|
+
}), {
|
|
16985
|
+
kind: "mutation",
|
|
16986
|
+
auth: "admin"
|
|
16987
|
+
}), method(object({
|
|
16988
|
+
...KindShape,
|
|
16989
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16990
|
+
}), object({
|
|
16991
|
+
deleted: number().int(),
|
|
16992
|
+
secretRefs: SecretRefsList
|
|
16993
|
+
}), {
|
|
16994
|
+
kind: "mutation",
|
|
16995
|
+
auth: "admin"
|
|
16996
|
+
}), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
16997
|
+
...KindShape,
|
|
16998
|
+
...TimeWindowShape,
|
|
16999
|
+
where: RecordWhereSchema.optional()
|
|
17000
|
+
}), object({ count: number().int() }), { auth: "admin" }), method(object({
|
|
17001
|
+
...KindShape,
|
|
17002
|
+
deviceId: number().int().optional(),
|
|
17003
|
+
from: number(),
|
|
17004
|
+
to: number(),
|
|
17005
|
+
bucketMs: number().int().positive()
|
|
17006
|
+
}), object({ buckets: array(object({
|
|
17007
|
+
bucketStart: number(),
|
|
17008
|
+
count: number().int()
|
|
17009
|
+
})) }), { auth: "admin" }), method(object({
|
|
17010
|
+
...KindShape,
|
|
17011
|
+
op: _enum([
|
|
17012
|
+
"sum",
|
|
17013
|
+
"min",
|
|
17014
|
+
"max",
|
|
17015
|
+
"count"
|
|
17016
|
+
]),
|
|
17017
|
+
field: RecordFieldPathSchema.optional(),
|
|
17018
|
+
groupBy: RecordFieldPathSchema.optional(),
|
|
17019
|
+
where: RecordWhereSchema.optional()
|
|
17020
|
+
}), object({ rows: array(object({
|
|
17021
|
+
group: union([
|
|
17022
|
+
string(),
|
|
17023
|
+
number(),
|
|
17024
|
+
_null()
|
|
17025
|
+
]),
|
|
17026
|
+
value: number().nullable()
|
|
17027
|
+
})) }), { auth: "admin" }), method(object({
|
|
17028
|
+
...KindShape,
|
|
17029
|
+
deviceId: number().int().optional(),
|
|
17030
|
+
atBefore: number().optional(),
|
|
17031
|
+
where: RecordWhereSchema.optional()
|
|
17032
|
+
}), object({
|
|
17033
|
+
deleted: number().int(),
|
|
17034
|
+
secretRefs: SecretRefsList
|
|
17035
|
+
}), {
|
|
17036
|
+
kind: "mutation",
|
|
17037
|
+
auth: "admin"
|
|
17038
|
+
}), method(object({
|
|
17039
|
+
deviceId: number().int(),
|
|
17040
|
+
kinds: array(RecordKindNameSchema).optional()
|
|
17041
|
+
}), object({
|
|
17042
|
+
deleted: record(string(), number().int()),
|
|
17043
|
+
secretRefs: SecretRefsList
|
|
17044
|
+
}), {
|
|
17045
|
+
kind: "mutation",
|
|
17046
|
+
auth: "admin"
|
|
17047
|
+
}), method(object(KindShape), object({ id: number().int() }), {
|
|
17048
|
+
kind: "mutation",
|
|
17049
|
+
auth: "admin"
|
|
17050
|
+
});
|
|
17051
|
+
/** One table of the settings database. */
|
|
17052
|
+
var StorageTableSchema = object({
|
|
17053
|
+
/** The table's full name, e.g. `recorder:addon-settings` or `addon-device-settings`. */
|
|
17054
|
+
name: string(),
|
|
17055
|
+
/** The owner prefix of a scoped name (`recorder` for `recorder:addon-settings`), else null. */
|
|
17056
|
+
owner: string().nullable(),
|
|
17057
|
+
rows: number().int().nonnegative(),
|
|
17058
|
+
/** Bytes the table's pages occupy (`dbstat`); null when the engine cannot measure. */
|
|
17059
|
+
bytes: number().int().nonnegative().nullable(),
|
|
17060
|
+
/** Declared by an addon since this engine process started (a running addon claims it). */
|
|
17061
|
+
declaredThisBoot: boolean()
|
|
17062
|
+
});
|
|
17063
|
+
/** One declared record kind (D881) as System -> Data shows it. */
|
|
17064
|
+
var StorageKindSchema = object({
|
|
17065
|
+
owner: string(),
|
|
17066
|
+
kind: string(),
|
|
17067
|
+
database: _enum(["settings", "events"]),
|
|
17068
|
+
class: string(),
|
|
17069
|
+
state: _enum([
|
|
17070
|
+
"declared",
|
|
17071
|
+
"orphaned",
|
|
17072
|
+
"dropped"
|
|
17073
|
+
]),
|
|
17074
|
+
/** `null` when the caller asked for no counts (`counts: false`). */
|
|
17075
|
+
rows: number().int().nonnegative().nullable(),
|
|
17076
|
+
/** Rows x the average size of a sample; null for an empty kind. */
|
|
17077
|
+
bytesEstimate: number().int().nonnegative().nullable(),
|
|
17078
|
+
writeTrigger: string(),
|
|
17079
|
+
retention: RecordRetentionSchema,
|
|
17080
|
+
/** `true` when the kind is an entry kind (the generic entries UI lists it). */
|
|
17081
|
+
entry: boolean(),
|
|
17082
|
+
/** The whole declaration, secret paths and entry descriptor included (the entries service builds its handle from it). */
|
|
17083
|
+
declaration: RecordKindDeclarationSchema
|
|
17084
|
+
});
|
|
17085
|
+
method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: array(StorageTableSchema) }), { auth: "admin" }), method(object({
|
|
17086
|
+
collection: string().min(1),
|
|
17087
|
+
expectRows: number().int().nonnegative()
|
|
17088
|
+
}), object({
|
|
17089
|
+
dropped: literal(true),
|
|
17090
|
+
rows: number().int().nonnegative()
|
|
17091
|
+
}), {
|
|
17092
|
+
kind: "mutation",
|
|
17093
|
+
auth: "admin"
|
|
17094
|
+
}), method(object({
|
|
17095
|
+
owner: string().min(1).optional(),
|
|
17096
|
+
/** `false` skips the per-kind row count (a catalog read only). Default true. */
|
|
17097
|
+
counts: boolean().optional()
|
|
17098
|
+
}), object({ kinds: array(StorageKindSchema) }), { auth: "admin" }), method(RecordQueryInputSchema.extend({
|
|
17099
|
+
owner: string().min(1),
|
|
17100
|
+
kind: RecordKindNameSchema
|
|
17101
|
+
}), RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
17102
|
+
owner: string().min(1),
|
|
17103
|
+
kind: RecordKindNameSchema,
|
|
17104
|
+
records: array(RecordInputSchema).max(RECORD_BATCH_MAX),
|
|
17105
|
+
/** The LAST batch: the copy is complete, the boot guard stops asking. */
|
|
17106
|
+
complete: boolean().optional()
|
|
17107
|
+
}).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), object({ adopted: number().int() }), {
|
|
17108
|
+
kind: "mutation",
|
|
17109
|
+
auth: "admin"
|
|
17110
|
+
}), method(object({
|
|
17111
|
+
collection: string().min(1),
|
|
17112
|
+
cursor: string().optional(),
|
|
17113
|
+
limit: number().int().min(1).max(1e3).optional()
|
|
17114
|
+
}), object({
|
|
17115
|
+
rows: array(object({
|
|
17116
|
+
id: string(),
|
|
17117
|
+
data: record(string(), unknown())
|
|
17118
|
+
})),
|
|
17119
|
+
nextCursor: string().nullable()
|
|
17120
|
+
}), { auth: "admin" }), method(object({ collection: string().min(1) }), object({ adopted: boolean() }), { auth: "admin" });
|
|
17121
|
+
/**
|
|
17122
|
+
* record-entries - the ONE admin surface for every list of user-created entries
|
|
17123
|
+
* (D881): notification targets, brokers, LLM profiles, anything an addon
|
|
17124
|
+
* declares as an ENTRY kind (`entry: { title }` in `defineRecordKinds`).
|
|
17125
|
+
*
|
|
17126
|
+
* The UI is generic. `listEntryKinds` hands it, per kind, the JSON Schema of
|
|
17127
|
+
* the entry body with `secret: true` on every credential field, so a password
|
|
17128
|
+
* field is derived from the schema and never from a name. `putEntry` takes the
|
|
17129
|
+
* redaction token for an untouched secret (the stored value is kept), a string
|
|
17130
|
+
* for a new one, and the clear instruction to remove one. A read never carries
|
|
17131
|
+
* a secret value, and a locked keychain refuses the write with
|
|
17132
|
+
* `records/secret-unavailable` instead of storing plaintext.
|
|
17133
|
+
*
|
|
17134
|
+
* Hub-only, served in-process (it acts for each entry's owner on the keychain).
|
|
17135
|
+
*/
|
|
17136
|
+
var EntryKindInfoSchema = object({
|
|
17137
|
+
owner: string(),
|
|
17138
|
+
kind: RecordKindNameSchema,
|
|
17139
|
+
title: string(),
|
|
17140
|
+
nameField: string(),
|
|
17141
|
+
/** JSON Schema of the body; `secret: true` marks a password field. */
|
|
17142
|
+
fields: record(string(), unknown()),
|
|
17143
|
+
secretPaths: array(string()),
|
|
17144
|
+
rows: number().int().nonnegative()
|
|
17145
|
+
});
|
|
17146
|
+
var EntryViewSchema = object({
|
|
17147
|
+
id: RecordIdSchema,
|
|
17148
|
+
name: string(),
|
|
17149
|
+
rev: number().int(),
|
|
17150
|
+
updatedAt: number(),
|
|
17151
|
+
/** Secret fields hold the redaction token. */
|
|
17152
|
+
data: RecordBodySchema
|
|
17153
|
+
});
|
|
17154
|
+
var EntryAddress = {
|
|
17155
|
+
owner: string().min(1),
|
|
17156
|
+
kind: RecordKindNameSchema
|
|
17157
|
+
};
|
|
17158
|
+
method(object({}), object({ kinds: array(EntryKindInfoSchema) }), { auth: "admin" }), method(object({ ...EntryAddress }), object({ entries: array(EntryViewSchema) }), { auth: "admin" }), method(object({
|
|
17159
|
+
...EntryAddress,
|
|
17160
|
+
id: RecordIdSchema.optional(),
|
|
17161
|
+
data: RecordBodySchema,
|
|
17162
|
+
ifRev: number().int().min(1).optional()
|
|
17163
|
+
}), object({
|
|
17164
|
+
id: string(),
|
|
17165
|
+
rev: number().int()
|
|
17166
|
+
}), {
|
|
17167
|
+
kind: "mutation",
|
|
17168
|
+
auth: "admin"
|
|
17169
|
+
}), method(object({
|
|
17170
|
+
...EntryAddress,
|
|
17171
|
+
id: RecordIdSchema
|
|
17172
|
+
}), object({ deleted: boolean() }), {
|
|
17173
|
+
kind: "mutation",
|
|
17174
|
+
auth: "admin"
|
|
17175
|
+
});
|
|
17176
|
+
/**
|
|
16208
17177
|
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
16209
17178
|
*
|
|
16210
17179
|
* Settings blobs never hold a secret: they hold a marker
|
|
@@ -16745,6 +17714,16 @@ method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}),
|
|
|
16745
17714
|
kind: "mutation",
|
|
16746
17715
|
auth: "admin",
|
|
16747
17716
|
caller: "required"
|
|
17717
|
+
}), method(object({
|
|
17718
|
+
ref: string().min(1),
|
|
17719
|
+
value: string().min(1)
|
|
17720
|
+
}), object({
|
|
17721
|
+
ref: string(),
|
|
17722
|
+
version: number().int()
|
|
17723
|
+
}), {
|
|
17724
|
+
kind: "mutation",
|
|
17725
|
+
auth: "admin",
|
|
17726
|
+
caller: "required"
|
|
16748
17727
|
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
16749
17728
|
deleted: array(string()).readonly(),
|
|
16750
17729
|
kept: array(object({
|
|
@@ -17042,7 +18021,11 @@ DeviceType.Hub, DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number().int
|
|
|
17042
18021
|
});
|
|
17043
18022
|
/**
|
|
17044
18023
|
* `device-adoption` — generic discovery + adoption surface,
|
|
17045
|
-
* system-scoped
|
|
18024
|
+
* system-scoped collection (one provider per integration addon), routed
|
|
18025
|
+
* by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
|
|
18026
|
+
* pin model as `connection-test`. The admin UI keeps using
|
|
18027
|
+
* `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
|
|
18028
|
+
* successor to `ha-discovery`:
|
|
17046
18029
|
* keyed by `integrationId` (the addon resolves integrationId → broker
|
|
17047
18030
|
* internally) rather than a connection-specific `brokerId`, and it
|
|
17048
18031
|
* REUSES the shared `DiscoveredChildDevice` candidate type from
|
|
@@ -39232,6 +40215,9 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
|
39232
40215
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
39233
40216
|
kind: "mutation",
|
|
39234
40217
|
auth: "admin"
|
|
40218
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
40219
|
+
kind: "mutation",
|
|
40220
|
+
auth: "admin"
|
|
39235
40221
|
}), method(ProfileRefInputSchema, _void(), {
|
|
39236
40222
|
kind: "mutation",
|
|
39237
40223
|
auth: "admin"
|
|
@@ -49679,6 +50665,41 @@ var ServerRollbackInfoSchema = object({
|
|
|
49679
50665
|
atMs: number(),
|
|
49680
50666
|
reason: string()
|
|
49681
50667
|
});
|
|
50668
|
+
/**
|
|
50669
|
+
* The runner boot check (D877): the runners this node PLANNED (hub: one per
|
|
50670
|
+
* `resolveRunnerId` over its forked addons; agent: the runners its process
|
|
50671
|
+
* service holds, because only the hub plans) against the states the process
|
|
50672
|
+
* service reports. Kept in memory, recomputed by the same one-shot check after
|
|
50673
|
+
* every boot, served on `getServerPackageStatus`.
|
|
50674
|
+
*
|
|
50675
|
+
* `failed` is the D6 breaker's terminal state, `refused` a deterministic Init
|
|
50676
|
+
* refusal (an addon that said "I will not start, and here is why"), `missing` a
|
|
50677
|
+
* planned runner the process service has no entry for.
|
|
50678
|
+
*/
|
|
50679
|
+
var RunnerRefusalSchema = object({
|
|
50680
|
+
runnerId: string(),
|
|
50681
|
+
addonIds: array(string()),
|
|
50682
|
+
reason: string()
|
|
50683
|
+
});
|
|
50684
|
+
var RunnerBootCheckSchema = object({
|
|
50685
|
+
checkedAtMs: number(),
|
|
50686
|
+
/** Runners planned for this node. */
|
|
50687
|
+
expected: number(),
|
|
50688
|
+
/** Planned runners whose process is `running`. */
|
|
50689
|
+
running: number(),
|
|
50690
|
+
failed: array(string()),
|
|
50691
|
+
refused: array(RunnerRefusalSchema),
|
|
50692
|
+
missing: array(string()),
|
|
50693
|
+
/**
|
|
50694
|
+
* Runners still on their way: `starting`, or `crashed` waiting on a backoff
|
|
50695
|
+
* respawn. The check is FINAL only when this is empty; until then nothing is
|
|
50696
|
+
* pushed and the verdict is re-evaluated on the next runner state change.
|
|
50697
|
+
* Optional for version skew (absent = settled).
|
|
50698
|
+
*/
|
|
50699
|
+
pending: array(string()).optional(),
|
|
50700
|
+
/** True when the plan is the hub's (`missing` is then meaningful); false on an agent. */
|
|
50701
|
+
planKnown: boolean()
|
|
50702
|
+
});
|
|
49682
50703
|
var ServerPackageStatusSchema = object({
|
|
49683
50704
|
/** Root package name (`@camstack/server` on the hub). */
|
|
49684
50705
|
packageName: string(),
|
|
@@ -49741,7 +50762,14 @@ var ServerPackageStatusSchema = object({
|
|
|
49741
50762
|
* for version skew: an older provider's payload simply omits it, and an
|
|
49742
50763
|
* absent wrapper is unknown — never `native`.
|
|
49743
50764
|
*/
|
|
49744
|
-
wrapper: WrapperIdentitySchema.optional()
|
|
50765
|
+
wrapper: WrapperIdentitySchema.optional(),
|
|
50766
|
+
/**
|
|
50767
|
+
* What this node PLANNED to run against what its process service reports
|
|
50768
|
+
* (D877). Absent until the one-shot boot check has run (~60 s after boot) and
|
|
50769
|
+
* on a provider that predates it. Absent is "not checked yet", never "all
|
|
50770
|
+
* well": a consumer that needs the answer treats it as pending.
|
|
50771
|
+
*/
|
|
50772
|
+
runners: RunnerBootCheckSchema.optional()
|
|
49745
50773
|
});
|
|
49746
50774
|
var ServerUpdateCheckResultSchema = object({
|
|
49747
50775
|
packageName: string(),
|
|
@@ -49792,6 +50820,13 @@ var ServerUpdateOutcomeSchema = _enum([
|
|
|
49792
50820
|
"refused",
|
|
49793
50821
|
"failed"
|
|
49794
50822
|
]);
|
|
50823
|
+
/** One addon the pre-flight found the target version would refuse (D877). */
|
|
50824
|
+
var UpdateBlockerSchema = object({
|
|
50825
|
+
addonId: string(),
|
|
50826
|
+
reason: string(),
|
|
50827
|
+
/** What the operator does about it. */
|
|
50828
|
+
remedy: string()
|
|
50829
|
+
});
|
|
49795
50830
|
var ServerUpdateActionResultSchema = object({
|
|
49796
50831
|
accepted: boolean(),
|
|
49797
50832
|
targetVersion: string().nullable(),
|
|
@@ -49809,14 +50844,27 @@ var ServerUpdateActionResultSchema = object({
|
|
|
49809
50844
|
* The failure itself, verbatim enough to act on (the npm output for a
|
|
49810
50845
|
* staging install). Non-null only for `failed`.
|
|
49811
50846
|
*/
|
|
49812
|
-
error: string().nullable().optional()
|
|
50847
|
+
error: string().nullable().optional(),
|
|
50848
|
+
/**
|
|
50849
|
+
* The addons the target version would refuse to start on this node's live
|
|
50850
|
+
* store (D877), present when the pre-flight refused the update
|
|
50851
|
+
* (`reason: 'addon-would-refuse'`). Optional for version skew.
|
|
50852
|
+
*/
|
|
50853
|
+
blockers: array(UpdateBlockerSchema).optional()
|
|
49813
50854
|
});
|
|
49814
50855
|
method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
|
|
49815
50856
|
kind: "mutation",
|
|
49816
50857
|
auth: "admin"
|
|
49817
|
-
}), method(object({
|
|
49818
|
-
/** Explicit target version; omitted = latest from the registry. */
|
|
49819
|
-
version: string().optional()
|
|
50858
|
+
}), method(object({
|
|
50859
|
+
/** Explicit target version; omitted = latest from the registry. */
|
|
50860
|
+
version: string().optional(),
|
|
50861
|
+
/**
|
|
50862
|
+
* Apply even though the pre-flight (D877) found addons the target would
|
|
50863
|
+
* refuse to start. Off by default: those addons stay down until the
|
|
50864
|
+
* remedy is run, which is the incident this gate exists to prevent.
|
|
50865
|
+
*/
|
|
50866
|
+
acknowledgeRefusals: boolean().optional()
|
|
50867
|
+
}), ServerUpdateActionResultSchema, {
|
|
49820
50868
|
kind: "mutation",
|
|
49821
50869
|
auth: "admin",
|
|
49822
50870
|
timeoutMs: 16 * 6e4
|
|
@@ -52264,7 +53312,9 @@ var ManifestShapeSchema = object({
|
|
|
52264
53312
|
var AddonProcessSchema = object({
|
|
52265
53313
|
pid: number().optional(),
|
|
52266
53314
|
mode: string(),
|
|
52267
|
-
state: string()
|
|
53315
|
+
state: string(),
|
|
53316
|
+
/** Why the runner is `refused` (an addon's own words), when it is (D877). */
|
|
53317
|
+
reason: string().optional()
|
|
52268
53318
|
});
|
|
52269
53319
|
/**
|
|
52270
53320
|
* Per-addon health snapshot from the kernel's AddonHealthMonitor.
|
|
@@ -52842,7 +53892,7 @@ var BatteryStatusSchema = object({
|
|
|
52842
53892
|
*/
|
|
52843
53893
|
binary: boolean().optional()
|
|
52844
53894
|
});
|
|
52845
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, method(object({
|
|
53895
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, method(object({
|
|
52846
53896
|
deviceId: number(),
|
|
52847
53897
|
/** Bound on the wait. Sensible range 3000–10000ms. */
|
|
52848
53898
|
timeoutMs: number().int().min(500).max(3e4).default(8e3)
|
|
@@ -53267,6 +54317,12 @@ object({
|
|
|
53267
54317
|
/** Horizontal louver swing on/off. Null when the device has no
|
|
53268
54318
|
* horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
|
|
53269
54319
|
swingHorizontal: boolean().nullable(),
|
|
54320
|
+
/** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
54321
|
+
minTemp: number().nullable().optional(),
|
|
54322
|
+
/** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
54323
|
+
maxTemp: number().nullable().optional(),
|
|
54324
|
+
/** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
|
|
54325
|
+
tempStep: number().positive().nullable().optional(),
|
|
53270
54326
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
53271
54327
|
lastFetchedAt: number()
|
|
53272
54328
|
});
|
|
@@ -53712,6 +54768,130 @@ object({
|
|
|
53712
54768
|
deviceId: number(),
|
|
53713
54769
|
status: DeviceStatusSchema
|
|
53714
54770
|
});
|
|
54771
|
+
/**
|
|
54772
|
+
* Smart-dishwasher cap — program lifecycle, door / remote-start gates,
|
|
54773
|
+
* consumable levels (salt, rinse aid) and common program options.
|
|
54774
|
+
*
|
|
54775
|
+
* Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
|
|
54776
|
+
* by any integration that exposes the same program / option surface.
|
|
54777
|
+
*
|
|
54778
|
+
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
54779
|
+
* provider refreshes the slice on an interval and eagerly after commands.
|
|
54780
|
+
*/
|
|
54781
|
+
var DishwasherStateSchema = _enum([
|
|
54782
|
+
"idle",
|
|
54783
|
+
"running",
|
|
54784
|
+
"paused",
|
|
54785
|
+
"finished",
|
|
54786
|
+
"error",
|
|
54787
|
+
"unavailable"
|
|
54788
|
+
]);
|
|
54789
|
+
var DishwasherConsumableLevelSchema = _enum([
|
|
54790
|
+
"ok",
|
|
54791
|
+
"low",
|
|
54792
|
+
"empty"
|
|
54793
|
+
]);
|
|
54794
|
+
object({
|
|
54795
|
+
state: DishwasherStateSchema,
|
|
54796
|
+
/** Active program id/name, or null when none selected / unknown. */
|
|
54797
|
+
program: string().nullable(),
|
|
54798
|
+
/** Program tokens the hardware accepts — drives the UI selector. */
|
|
54799
|
+
availablePrograms: array(string()),
|
|
54800
|
+
/** Minutes remaining on the active cycle, or null when not running. */
|
|
54801
|
+
remainingMinutes: number().int().nonnegative().nullable(),
|
|
54802
|
+
/** Cycle completion 0..100, or null when not applicable. */
|
|
54803
|
+
progressPercent: number().min(0).max(100).nullable(),
|
|
54804
|
+
/** True when the door is reported open. */
|
|
54805
|
+
doorOpen: boolean(),
|
|
54806
|
+
/** True when remote start is allowed (door closed, power on, etc.). */
|
|
54807
|
+
remoteStartAllowed: boolean(),
|
|
54808
|
+
/** Main power / switched-on state. */
|
|
54809
|
+
powerOn: boolean(),
|
|
54810
|
+
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54811
|
+
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54812
|
+
halfLoad: boolean(),
|
|
54813
|
+
hygienePlus: boolean(),
|
|
54814
|
+
/** Extra dry option when the appliance exposes it. */
|
|
54815
|
+
extraDry: boolean(),
|
|
54816
|
+
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
54817
|
+
intensiveZone: boolean(),
|
|
54818
|
+
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
54819
|
+
varioSpeedPlus: boolean(),
|
|
54820
|
+
/** Child lock (controls disabled on the appliance). */
|
|
54821
|
+
childLock: boolean(),
|
|
54822
|
+
errorCode: number().nullable(),
|
|
54823
|
+
errorLabel: string().nullable(),
|
|
54824
|
+
lastFetchedAt: number()
|
|
54825
|
+
});
|
|
54826
|
+
DeviceType.Dishwasher, method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
54827
|
+
kind: "mutation",
|
|
54828
|
+
auth: "protected"
|
|
54829
|
+
}), method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
54830
|
+
kind: "mutation",
|
|
54831
|
+
auth: "protected"
|
|
54832
|
+
}), method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
54833
|
+
kind: "mutation",
|
|
54834
|
+
auth: "protected"
|
|
54835
|
+
}), method(object({
|
|
54836
|
+
deviceId: number().int().nonnegative(),
|
|
54837
|
+
program: string().min(1)
|
|
54838
|
+
}), _void(), {
|
|
54839
|
+
kind: "mutation",
|
|
54840
|
+
auth: "protected"
|
|
54841
|
+
}), method(object({
|
|
54842
|
+
deviceId: number().int().nonnegative(),
|
|
54843
|
+
on: boolean()
|
|
54844
|
+
}), _void(), {
|
|
54845
|
+
kind: "mutation",
|
|
54846
|
+
auth: "protected"
|
|
54847
|
+
}), method(object({
|
|
54848
|
+
deviceId: number().int().nonnegative(),
|
|
54849
|
+
on: boolean()
|
|
54850
|
+
}), _void(), {
|
|
54851
|
+
kind: "mutation",
|
|
54852
|
+
auth: "protected"
|
|
54853
|
+
}), method(object({
|
|
54854
|
+
deviceId: number().int().nonnegative(),
|
|
54855
|
+
on: boolean()
|
|
54856
|
+
}), _void(), {
|
|
54857
|
+
kind: "mutation",
|
|
54858
|
+
auth: "protected"
|
|
54859
|
+
}), method(object({
|
|
54860
|
+
deviceId: number().int().nonnegative(),
|
|
54861
|
+
on: boolean()
|
|
54862
|
+
}), _void(), {
|
|
54863
|
+
kind: "mutation",
|
|
54864
|
+
auth: "protected"
|
|
54865
|
+
}), method(object({
|
|
54866
|
+
deviceId: number().int().nonnegative(),
|
|
54867
|
+
on: boolean()
|
|
54868
|
+
}), _void(), {
|
|
54869
|
+
kind: "mutation",
|
|
54870
|
+
auth: "protected"
|
|
54871
|
+
}), method(object({
|
|
54872
|
+
deviceId: number().int().nonnegative(),
|
|
54873
|
+
on: boolean()
|
|
54874
|
+
}), _void(), {
|
|
54875
|
+
kind: "mutation",
|
|
54876
|
+
auth: "protected"
|
|
54877
|
+
}), method(object({
|
|
54878
|
+
deviceId: number().int().nonnegative(),
|
|
54879
|
+
on: boolean()
|
|
54880
|
+
}), _void(), {
|
|
54881
|
+
kind: "mutation",
|
|
54882
|
+
auth: "protected"
|
|
54883
|
+
}), method(object({
|
|
54884
|
+
deviceId: number().int().nonnegative(),
|
|
54885
|
+
key: string().min(1),
|
|
54886
|
+
value: union([
|
|
54887
|
+
boolean(),
|
|
54888
|
+
string(),
|
|
54889
|
+
number()
|
|
54890
|
+
])
|
|
54891
|
+
}), _void(), {
|
|
54892
|
+
kind: "mutation",
|
|
54893
|
+
auth: "protected"
|
|
54894
|
+
});
|
|
53715
54895
|
object({
|
|
53716
54896
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
53717
54897
|
lastPressedAt: number().nullable(),
|
|
@@ -54277,6 +55457,13 @@ object({
|
|
|
54277
55457
|
lastChangedAt: number()
|
|
54278
55458
|
});
|
|
54279
55459
|
DeviceType.Sensor;
|
|
55460
|
+
object({
|
|
55461
|
+
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
55462
|
+
position: number().min(0).max(100).nullable(),
|
|
55463
|
+
/** Ms epoch when the slice was last updated (push or poll). */
|
|
55464
|
+
lastFetchedAt: number()
|
|
55465
|
+
});
|
|
55466
|
+
DeviceType.Thermostat;
|
|
54280
55467
|
object({
|
|
54281
55468
|
/** Whether the humidifier is currently on. */
|
|
54282
55469
|
on: boolean(),
|
|
@@ -55087,7 +56274,19 @@ var TlsStatusSchema = object({
|
|
|
55087
56274
|
sans: array(string()),
|
|
55088
56275
|
caCertPem: string().nullable(),
|
|
55089
56276
|
reissueError: string().nullable(),
|
|
55090
|
-
restartRequired: boolean()
|
|
56277
|
+
restartRequired: boolean(),
|
|
56278
|
+
/** An uploaded certificate is served but no CA is kept for it and it is not publicly signed (D873). */
|
|
56279
|
+
caMissing: boolean(),
|
|
56280
|
+
/** Does the hub's own generated CA carry a critical name constraint? `null` while it has none. */
|
|
56281
|
+
localCaConstrained: boolean().nullable(),
|
|
56282
|
+
/** ISO time the generated CA was replaced by a constrained one; devices must re-download it. */
|
|
56283
|
+
caReplacedAt: string().nullable(),
|
|
56284
|
+
/** The uploaded certificate kept on disk, selectable again after "Revert to generated". */
|
|
56285
|
+
storedUpload: object({
|
|
56286
|
+
leafFingerprintSha256: string(),
|
|
56287
|
+
validTo: string(),
|
|
56288
|
+
hasCa: boolean()
|
|
56289
|
+
}).nullable()
|
|
55091
56290
|
});
|
|
55092
56291
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
55093
56292
|
/**
|
|
@@ -55143,6 +56342,9 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
55143
56342
|
}), method(_void(), object({ pem: string() })), method(_void(), TlsStatusSchema, {
|
|
55144
56343
|
kind: "mutation",
|
|
55145
56344
|
auth: "admin"
|
|
56345
|
+
}), method(_void(), TlsStatusSchema, {
|
|
56346
|
+
kind: "mutation",
|
|
56347
|
+
auth: "admin"
|
|
55146
56348
|
});
|
|
55147
56349
|
object({
|
|
55148
56350
|
/** Lifecycle state of the lock. `jammed` means the motor reported
|
|
@@ -60272,7 +61474,11 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
60272
61474
|
kind: "mutation",
|
|
60273
61475
|
auth: "admin",
|
|
60274
61476
|
access: "delete"
|
|
60275
|
-
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(
|
|
61477
|
+
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
61478
|
+
kind: "mutation",
|
|
61479
|
+
auth: "admin",
|
|
61480
|
+
access: "create"
|
|
61481
|
+
}), method(object({
|
|
60276
61482
|
userId: string(),
|
|
60277
61483
|
code: string()
|
|
60278
61484
|
}), object({ valid: boolean() }), {
|
|
@@ -61324,7 +62530,7 @@ var AccessoryKind = {
|
|
|
61324
62530
|
PrivacyMask: DeviceRole.PrivacyMask
|
|
61325
62531
|
};
|
|
61326
62532
|
AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
|
|
61327
|
-
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;
|
|
62533
|
+
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;
|
|
61328
62534
|
new Set(Object.values(DeviceType));
|
|
61329
62535
|
Object.freeze({
|
|
61330
62536
|
"accessories.getStatus": {
|
|
@@ -62473,6 +63679,12 @@ Object.freeze({
|
|
|
62473
63679
|
addonId: null,
|
|
62474
63680
|
access: "view"
|
|
62475
63681
|
},
|
|
63682
|
+
"coreBlocks.migrateRawSecrets": {
|
|
63683
|
+
capName: "core-blocks",
|
|
63684
|
+
capScope: "system",
|
|
63685
|
+
addonId: null,
|
|
63686
|
+
access: "create"
|
|
63687
|
+
},
|
|
62476
63688
|
"coreBlocks.restart": {
|
|
62477
63689
|
capName: "core-blocks",
|
|
62478
63690
|
capScope: "system",
|
|
@@ -63739,6 +64951,84 @@ Object.freeze({
|
|
|
63739
64951
|
addonId: null,
|
|
63740
64952
|
access: "view"
|
|
63741
64953
|
},
|
|
64954
|
+
"dishwasher.getStatus": {
|
|
64955
|
+
capName: "dishwasher",
|
|
64956
|
+
capScope: "device",
|
|
64957
|
+
addonId: null,
|
|
64958
|
+
access: "view"
|
|
64959
|
+
},
|
|
64960
|
+
"dishwasher.pause": {
|
|
64961
|
+
capName: "dishwasher",
|
|
64962
|
+
capScope: "device",
|
|
64963
|
+
addonId: null,
|
|
64964
|
+
access: "create"
|
|
64965
|
+
},
|
|
64966
|
+
"dishwasher.setChildLock": {
|
|
64967
|
+
capName: "dishwasher",
|
|
64968
|
+
capScope: "device",
|
|
64969
|
+
addonId: null,
|
|
64970
|
+
access: "create"
|
|
64971
|
+
},
|
|
64972
|
+
"dishwasher.setExtraDry": {
|
|
64973
|
+
capName: "dishwasher",
|
|
64974
|
+
capScope: "device",
|
|
64975
|
+
addonId: null,
|
|
64976
|
+
access: "create"
|
|
64977
|
+
},
|
|
64978
|
+
"dishwasher.setHalfLoad": {
|
|
64979
|
+
capName: "dishwasher",
|
|
64980
|
+
capScope: "device",
|
|
64981
|
+
addonId: null,
|
|
64982
|
+
access: "create"
|
|
64983
|
+
},
|
|
64984
|
+
"dishwasher.setHygienePlus": {
|
|
64985
|
+
capName: "dishwasher",
|
|
64986
|
+
capScope: "device",
|
|
64987
|
+
addonId: null,
|
|
64988
|
+
access: "create"
|
|
64989
|
+
},
|
|
64990
|
+
"dishwasher.setIntensiveZone": {
|
|
64991
|
+
capName: "dishwasher",
|
|
64992
|
+
capScope: "device",
|
|
64993
|
+
addonId: null,
|
|
64994
|
+
access: "create"
|
|
64995
|
+
},
|
|
64996
|
+
"dishwasher.setOption": {
|
|
64997
|
+
capName: "dishwasher",
|
|
64998
|
+
capScope: "device",
|
|
64999
|
+
addonId: null,
|
|
65000
|
+
access: "create"
|
|
65001
|
+
},
|
|
65002
|
+
"dishwasher.setPower": {
|
|
65003
|
+
capName: "dishwasher",
|
|
65004
|
+
capScope: "device",
|
|
65005
|
+
addonId: null,
|
|
65006
|
+
access: "create"
|
|
65007
|
+
},
|
|
65008
|
+
"dishwasher.setProgram": {
|
|
65009
|
+
capName: "dishwasher",
|
|
65010
|
+
capScope: "device",
|
|
65011
|
+
addonId: null,
|
|
65012
|
+
access: "create"
|
|
65013
|
+
},
|
|
65014
|
+
"dishwasher.setVarioSpeedPlus": {
|
|
65015
|
+
capName: "dishwasher",
|
|
65016
|
+
capScope: "device",
|
|
65017
|
+
addonId: null,
|
|
65018
|
+
access: "create"
|
|
65019
|
+
},
|
|
65020
|
+
"dishwasher.start": {
|
|
65021
|
+
capName: "dishwasher",
|
|
65022
|
+
capScope: "device",
|
|
65023
|
+
addonId: null,
|
|
65024
|
+
access: "create"
|
|
65025
|
+
},
|
|
65026
|
+
"dishwasher.stop": {
|
|
65027
|
+
capName: "dishwasher",
|
|
65028
|
+
capScope: "device",
|
|
65029
|
+
addonId: null,
|
|
65030
|
+
access: "create"
|
|
65031
|
+
},
|
|
63742
65032
|
"doorbell.getStatus": {
|
|
63743
65033
|
capName: "doorbell",
|
|
63744
65034
|
capScope: "device",
|
|
@@ -63949,6 +65239,12 @@ Object.freeze({
|
|
|
63949
65239
|
addonId: null,
|
|
63950
65240
|
access: "view"
|
|
63951
65241
|
},
|
|
65242
|
+
"heatingValve.getStatus": {
|
|
65243
|
+
capName: "heating-valve",
|
|
65244
|
+
capScope: "device",
|
|
65245
|
+
addonId: null,
|
|
65246
|
+
access: "view"
|
|
65247
|
+
},
|
|
63952
65248
|
"humidifier.getStatus": {
|
|
63953
65249
|
capName: "humidifier",
|
|
63954
65250
|
capScope: "device",
|
|
@@ -64159,6 +65455,12 @@ Object.freeze({
|
|
|
64159
65455
|
addonId: null,
|
|
64160
65456
|
access: "create"
|
|
64161
65457
|
},
|
|
65458
|
+
"keychainAdmin.importSecret": {
|
|
65459
|
+
capName: "keychain-admin",
|
|
65460
|
+
capScope: "system",
|
|
65461
|
+
addonId: null,
|
|
65462
|
+
access: "create"
|
|
65463
|
+
},
|
|
64162
65464
|
"keychainAdmin.listAudit": {
|
|
64163
65465
|
capName: "keychain-admin",
|
|
64164
65466
|
capScope: "system",
|
|
@@ -64327,6 +65629,12 @@ Object.freeze({
|
|
|
64327
65629
|
addonId: null,
|
|
64328
65630
|
access: "view"
|
|
64329
65631
|
},
|
|
65632
|
+
"llm.migrateRawSecrets": {
|
|
65633
|
+
capName: "llm",
|
|
65634
|
+
capScope: "system",
|
|
65635
|
+
addonId: null,
|
|
65636
|
+
access: "create"
|
|
65637
|
+
},
|
|
64330
65638
|
"llm.resolveModelRef": {
|
|
64331
65639
|
capName: "llm",
|
|
64332
65640
|
capScope: "system",
|
|
@@ -64555,6 +65863,12 @@ Object.freeze({
|
|
|
64555
65863
|
addonId: null,
|
|
64556
65864
|
access: "create"
|
|
64557
65865
|
},
|
|
65866
|
+
"localNetwork.useStoredUploadedCertificate": {
|
|
65867
|
+
capName: "local-network",
|
|
65868
|
+
capScope: "system",
|
|
65869
|
+
addonId: null,
|
|
65870
|
+
access: "create"
|
|
65871
|
+
},
|
|
64558
65872
|
"lockControl.getStatus": {
|
|
64559
65873
|
capName: "lock-control",
|
|
64560
65874
|
capScope: "device",
|
|
@@ -67207,6 +68521,30 @@ Object.freeze({
|
|
|
67207
68521
|
addonId: null,
|
|
67208
68522
|
access: "create"
|
|
67209
68523
|
},
|
|
68524
|
+
"recordEntries.deleteEntry": {
|
|
68525
|
+
capName: "record-entries",
|
|
68526
|
+
capScope: "system",
|
|
68527
|
+
addonId: null,
|
|
68528
|
+
access: "delete"
|
|
68529
|
+
},
|
|
68530
|
+
"recordEntries.listEntries": {
|
|
68531
|
+
capName: "record-entries",
|
|
68532
|
+
capScope: "system",
|
|
68533
|
+
addonId: null,
|
|
68534
|
+
access: "view"
|
|
68535
|
+
},
|
|
68536
|
+
"recordEntries.listEntryKinds": {
|
|
68537
|
+
capName: "record-entries",
|
|
68538
|
+
capScope: "system",
|
|
68539
|
+
addonId: null,
|
|
68540
|
+
access: "view"
|
|
68541
|
+
},
|
|
68542
|
+
"recordEntries.putEntry": {
|
|
68543
|
+
capName: "record-entries",
|
|
68544
|
+
capScope: "system",
|
|
68545
|
+
addonId: null,
|
|
68546
|
+
access: "create"
|
|
68547
|
+
},
|
|
67210
68548
|
"recording.getAvailability": {
|
|
67211
68549
|
capName: "recording",
|
|
67212
68550
|
capScope: "device",
|
|
@@ -67507,6 +68845,102 @@ Object.freeze({
|
|
|
67507
68845
|
addonId: null,
|
|
67508
68846
|
access: "view"
|
|
67509
68847
|
},
|
|
68848
|
+
"records.aggregate": {
|
|
68849
|
+
capName: "records",
|
|
68850
|
+
capScope: "system",
|
|
68851
|
+
addonId: null,
|
|
68852
|
+
access: "view"
|
|
68853
|
+
},
|
|
68854
|
+
"records.allocateId": {
|
|
68855
|
+
capName: "records",
|
|
68856
|
+
capScope: "system",
|
|
68857
|
+
addonId: null,
|
|
68858
|
+
access: "create"
|
|
68859
|
+
},
|
|
68860
|
+
"records.count": {
|
|
68861
|
+
capName: "records",
|
|
68862
|
+
capScope: "system",
|
|
68863
|
+
addonId: null,
|
|
68864
|
+
access: "view"
|
|
68865
|
+
},
|
|
68866
|
+
"records.declareKinds": {
|
|
68867
|
+
capName: "records",
|
|
68868
|
+
capScope: "system",
|
|
68869
|
+
addonId: null,
|
|
68870
|
+
access: "create"
|
|
68871
|
+
},
|
|
68872
|
+
"records.delete": {
|
|
68873
|
+
capName: "records",
|
|
68874
|
+
capScope: "system",
|
|
68875
|
+
addonId: null,
|
|
68876
|
+
access: "delete"
|
|
68877
|
+
},
|
|
68878
|
+
"records.deleteDevice": {
|
|
68879
|
+
capName: "records",
|
|
68880
|
+
capScope: "system",
|
|
68881
|
+
addonId: null,
|
|
68882
|
+
access: "delete"
|
|
68883
|
+
},
|
|
68884
|
+
"records.deleteMany": {
|
|
68885
|
+
capName: "records",
|
|
68886
|
+
capScope: "system",
|
|
68887
|
+
addonId: null,
|
|
68888
|
+
access: "delete"
|
|
68889
|
+
},
|
|
68890
|
+
"records.deleteWhere": {
|
|
68891
|
+
capName: "records",
|
|
68892
|
+
capScope: "system",
|
|
68893
|
+
addonId: null,
|
|
68894
|
+
access: "delete"
|
|
68895
|
+
},
|
|
68896
|
+
"records.get": {
|
|
68897
|
+
capName: "records",
|
|
68898
|
+
capScope: "system",
|
|
68899
|
+
addonId: null,
|
|
68900
|
+
access: "view"
|
|
68901
|
+
},
|
|
68902
|
+
"records.getMany": {
|
|
68903
|
+
capName: "records",
|
|
68904
|
+
capScope: "system",
|
|
68905
|
+
addonId: null,
|
|
68906
|
+
access: "view"
|
|
68907
|
+
},
|
|
68908
|
+
"records.histogram": {
|
|
68909
|
+
capName: "records",
|
|
68910
|
+
capScope: "system",
|
|
68911
|
+
addonId: null,
|
|
68912
|
+
access: "view"
|
|
68913
|
+
},
|
|
68914
|
+
"records.patch": {
|
|
68915
|
+
capName: "records",
|
|
68916
|
+
capScope: "system",
|
|
68917
|
+
addonId: null,
|
|
68918
|
+
access: "create"
|
|
68919
|
+
},
|
|
68920
|
+
"records.put": {
|
|
68921
|
+
capName: "records",
|
|
68922
|
+
capScope: "system",
|
|
68923
|
+
addonId: null,
|
|
68924
|
+
access: "create"
|
|
68925
|
+
},
|
|
68926
|
+
"records.putMany": {
|
|
68927
|
+
capName: "records",
|
|
68928
|
+
capScope: "system",
|
|
68929
|
+
addonId: null,
|
|
68930
|
+
access: "create"
|
|
68931
|
+
},
|
|
68932
|
+
"records.query": {
|
|
68933
|
+
capName: "records",
|
|
68934
|
+
capScope: "system",
|
|
68935
|
+
addonId: null,
|
|
68936
|
+
access: "view"
|
|
68937
|
+
},
|
|
68938
|
+
"records.secretRefs": {
|
|
68939
|
+
capName: "records",
|
|
68940
|
+
capScope: "system",
|
|
68941
|
+
addonId: null,
|
|
68942
|
+
access: "view"
|
|
68943
|
+
},
|
|
67510
68944
|
"sceneMonitor.captureReference": {
|
|
67511
68945
|
capName: "scene-monitor",
|
|
67512
68946
|
capScope: "device",
|
|
@@ -67939,6 +69373,48 @@ Object.freeze({
|
|
|
67939
69373
|
addonId: null,
|
|
67940
69374
|
access: "create"
|
|
67941
69375
|
},
|
|
69376
|
+
"storageAdmin.adoptRecords": {
|
|
69377
|
+
capName: "storage-admin",
|
|
69378
|
+
capScope: "system",
|
|
69379
|
+
addonId: null,
|
|
69380
|
+
access: "create"
|
|
69381
|
+
},
|
|
69382
|
+
"storageAdmin.dropCollection": {
|
|
69383
|
+
capName: "storage-admin",
|
|
69384
|
+
capScope: "system",
|
|
69385
|
+
addonId: null,
|
|
69386
|
+
access: "delete"
|
|
69387
|
+
},
|
|
69388
|
+
"storageAdmin.isAdoptedLegacyTable": {
|
|
69389
|
+
capName: "storage-admin",
|
|
69390
|
+
capScope: "system",
|
|
69391
|
+
addonId: null,
|
|
69392
|
+
access: "view"
|
|
69393
|
+
},
|
|
69394
|
+
"storageAdmin.listKinds": {
|
|
69395
|
+
capName: "storage-admin",
|
|
69396
|
+
capScope: "system",
|
|
69397
|
+
addonId: null,
|
|
69398
|
+
access: "view"
|
|
69399
|
+
},
|
|
69400
|
+
"storageAdmin.listTables": {
|
|
69401
|
+
capName: "storage-admin",
|
|
69402
|
+
capScope: "system",
|
|
69403
|
+
addonId: null,
|
|
69404
|
+
access: "view"
|
|
69405
|
+
},
|
|
69406
|
+
"storageAdmin.readLegacyCollection": {
|
|
69407
|
+
capName: "storage-admin",
|
|
69408
|
+
capScope: "system",
|
|
69409
|
+
addonId: null,
|
|
69410
|
+
access: "view"
|
|
69411
|
+
},
|
|
69412
|
+
"storageAdmin.readRecords": {
|
|
69413
|
+
capName: "storage-admin",
|
|
69414
|
+
capScope: "system",
|
|
69415
|
+
addonId: null,
|
|
69416
|
+
access: "view"
|
|
69417
|
+
},
|
|
67942
69418
|
"storageEvictable.evict": {
|
|
67943
69419
|
capName: "storage-evictable",
|
|
67944
69420
|
capScope: "system",
|
|
@@ -68851,6 +70327,12 @@ Object.freeze({
|
|
|
68851
70327
|
addonId: null,
|
|
68852
70328
|
access: "view"
|
|
68853
70329
|
},
|
|
70330
|
+
"userManagement.migrateRawSecrets": {
|
|
70331
|
+
capName: "user-management",
|
|
70332
|
+
capScope: "system",
|
|
70333
|
+
addonId: null,
|
|
70334
|
+
access: "create"
|
|
70335
|
+
},
|
|
68854
70336
|
"userManagement.oauthExchangeCode": {
|
|
68855
70337
|
capName: "user-management",
|
|
68856
70338
|
capScope: "system",
|
|
@@ -69350,7 +70832,7 @@ Object.freeze({
|
|
|
69350
70832
|
access: "create"
|
|
69351
70833
|
}
|
|
69352
70834
|
});
|
|
69353
|
-
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;
|
|
70835
|
+
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;
|
|
69354
70836
|
DeviceFeature.BatteryOperated;
|
|
69355
70837
|
Object.freeze({
|
|
69356
70838
|
"accessories.getStatus": [{
|
|
@@ -70174,6 +71656,71 @@ Object.freeze({
|
|
|
70174
71656
|
form: "single",
|
|
70175
71657
|
optional: false
|
|
70176
71658
|
}],
|
|
71659
|
+
"dishwasher.getStatus": [{
|
|
71660
|
+
name: "deviceId",
|
|
71661
|
+
form: "single",
|
|
71662
|
+
optional: false
|
|
71663
|
+
}],
|
|
71664
|
+
"dishwasher.pause": [{
|
|
71665
|
+
name: "deviceId",
|
|
71666
|
+
form: "single",
|
|
71667
|
+
optional: false
|
|
71668
|
+
}],
|
|
71669
|
+
"dishwasher.setChildLock": [{
|
|
71670
|
+
name: "deviceId",
|
|
71671
|
+
form: "single",
|
|
71672
|
+
optional: false
|
|
71673
|
+
}],
|
|
71674
|
+
"dishwasher.setExtraDry": [{
|
|
71675
|
+
name: "deviceId",
|
|
71676
|
+
form: "single",
|
|
71677
|
+
optional: false
|
|
71678
|
+
}],
|
|
71679
|
+
"dishwasher.setHalfLoad": [{
|
|
71680
|
+
name: "deviceId",
|
|
71681
|
+
form: "single",
|
|
71682
|
+
optional: false
|
|
71683
|
+
}],
|
|
71684
|
+
"dishwasher.setHygienePlus": [{
|
|
71685
|
+
name: "deviceId",
|
|
71686
|
+
form: "single",
|
|
71687
|
+
optional: false
|
|
71688
|
+
}],
|
|
71689
|
+
"dishwasher.setIntensiveZone": [{
|
|
71690
|
+
name: "deviceId",
|
|
71691
|
+
form: "single",
|
|
71692
|
+
optional: false
|
|
71693
|
+
}],
|
|
71694
|
+
"dishwasher.setOption": [{
|
|
71695
|
+
name: "deviceId",
|
|
71696
|
+
form: "single",
|
|
71697
|
+
optional: false
|
|
71698
|
+
}],
|
|
71699
|
+
"dishwasher.setPower": [{
|
|
71700
|
+
name: "deviceId",
|
|
71701
|
+
form: "single",
|
|
71702
|
+
optional: false
|
|
71703
|
+
}],
|
|
71704
|
+
"dishwasher.setProgram": [{
|
|
71705
|
+
name: "deviceId",
|
|
71706
|
+
form: "single",
|
|
71707
|
+
optional: false
|
|
71708
|
+
}],
|
|
71709
|
+
"dishwasher.setVarioSpeedPlus": [{
|
|
71710
|
+
name: "deviceId",
|
|
71711
|
+
form: "single",
|
|
71712
|
+
optional: false
|
|
71713
|
+
}],
|
|
71714
|
+
"dishwasher.start": [{
|
|
71715
|
+
name: "deviceId",
|
|
71716
|
+
form: "single",
|
|
71717
|
+
optional: false
|
|
71718
|
+
}],
|
|
71719
|
+
"dishwasher.stop": [{
|
|
71720
|
+
name: "deviceId",
|
|
71721
|
+
form: "single",
|
|
71722
|
+
optional: false
|
|
71723
|
+
}],
|
|
70177
71724
|
"doorbell.getStatus": [{
|
|
70178
71725
|
name: "deviceId",
|
|
70179
71726
|
form: "single",
|
|
@@ -70243,6 +71790,11 @@ Object.freeze({
|
|
|
70243
71790
|
form: "single",
|
|
70244
71791
|
optional: false
|
|
70245
71792
|
}],
|
|
71793
|
+
"heatingValve.getStatus": [{
|
|
71794
|
+
name: "deviceId",
|
|
71795
|
+
form: "single",
|
|
71796
|
+
optional: false
|
|
71797
|
+
}],
|
|
70246
71798
|
"humidifier.getStatus": [{
|
|
70247
71799
|
name: "deviceId",
|
|
70248
71800
|
form: "single",
|
|
@@ -71527,6 +73079,37 @@ Object.freeze({
|
|
|
71527
73079
|
form: "single",
|
|
71528
73080
|
optional: false
|
|
71529
73081
|
}],
|
|
73082
|
+
"records.count": [{
|
|
73083
|
+
name: "deviceId",
|
|
73084
|
+
form: "single",
|
|
73085
|
+
optional: true
|
|
73086
|
+
}],
|
|
73087
|
+
"records.deleteDevice": [{
|
|
73088
|
+
name: "deviceId",
|
|
73089
|
+
form: "single",
|
|
73090
|
+
optional: false
|
|
73091
|
+
}],
|
|
73092
|
+
"records.deleteWhere": [{
|
|
73093
|
+
name: "deviceId",
|
|
73094
|
+
form: "single",
|
|
73095
|
+
optional: true
|
|
73096
|
+
}],
|
|
73097
|
+
"records.histogram": [{
|
|
73098
|
+
name: "deviceId",
|
|
73099
|
+
form: "single",
|
|
73100
|
+
optional: true
|
|
73101
|
+
}],
|
|
73102
|
+
"records.putMany": [{
|
|
73103
|
+
name: "records",
|
|
73104
|
+
form: "object-array",
|
|
73105
|
+
optional: false,
|
|
73106
|
+
itemField: "deviceId"
|
|
73107
|
+
}],
|
|
73108
|
+
"records.query": [{
|
|
73109
|
+
name: "deviceId",
|
|
73110
|
+
form: "single",
|
|
73111
|
+
optional: true
|
|
73112
|
+
}],
|
|
71530
73113
|
"sceneMonitor.captureReference": [{
|
|
71531
73114
|
name: "deviceId",
|
|
71532
73115
|
form: "single",
|
|
@@ -71643,6 +73226,17 @@ Object.freeze({
|
|
|
71643
73226
|
form: "single",
|
|
71644
73227
|
optional: false
|
|
71645
73228
|
}],
|
|
73229
|
+
"storageAdmin.adoptRecords": [{
|
|
73230
|
+
name: "records",
|
|
73231
|
+
form: "object-array",
|
|
73232
|
+
optional: false,
|
|
73233
|
+
itemField: "deviceId"
|
|
73234
|
+
}],
|
|
73235
|
+
"storageAdmin.readRecords": [{
|
|
73236
|
+
name: "deviceId",
|
|
73237
|
+
form: "single",
|
|
73238
|
+
optional: true
|
|
73239
|
+
}],
|
|
71646
73240
|
"streamBroker.acquireEgressTranscode": [{
|
|
71647
73241
|
name: "deviceId",
|
|
71648
73242
|
form: "single",
|
|
@@ -73093,4 +74687,4 @@ DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
|
73093
74687
|
var MB = 1024 * 1024;
|
|
73094
74688
|
1024 * MB, 3072 * MB;
|
|
73095
74689
|
//#endregion
|
|
73096
|
-
export {
|
|
74690
|
+
export { settingsArrayAdoptsFrom as A, SECRET_CLEAR as C, globalSecretScope as D, defineRecordKinds as E, number as F, object as I, string as L, _enum as M, array as N, isSecretClear as O, boolean as P, RecordSecretUnavailableError as S, defineEntryKind as T, requestMountPrefix as _, addonWidgetsSourceCapability as a, errMsg as b, authProviderCapability as c, loginMethodCapability as d, normalizeOrigin as f, pickRequestOrigin as g, parseAppPageLang as h, addonRoutesCapability as i, toSecretFieldView as j, isSecretMarker as k, buildAddonRouteProvider as l, parseAppFlowRequest as m, APP_REFUSED_PATH as n, advertisedHubOrigins as o, oidcConnectionsCapability as p, SSO_STATE_COOKIE as r, appFlowLocation as s, APP_FLOW_DEFAULT_REDIRECT as t, claimedRequestOrigins as u, resolveIconKey as v, arrayItemFieldPath as w, BaseAddon as x, userPasskeysCapability as y };
|