@camstack/addon-pipeline 1.2.374 → 1.2.375
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/audio-analyzer/index.js +3 -3
- package/dist/audio-analyzer/index.mjs +3 -3
- package/dist/{custom-model-catalog-1LDuDw8S.mjs → custom-model-catalog-DF5qs8u4.mjs} +2 -2
- package/dist/{custom-model-catalog-W0DHDhfo.js → custom-model-catalog-gbLoUFki.js} +2 -2
- package/dist/detection-pipeline/index.js +4 -4
- package/dist/detection-pipeline/index.mjs +4 -4
- package/dist/{dist-CBEUVjTS.js → dist-C0Mg8e3I.js} +753 -27
- package/dist/{dist-CmdLCb_F.mjs → dist-QyeZXkAO.mjs} +753 -27
- package/dist/{model-catalogs-D5YksA5A.js → model-catalogs-BTuX-P0k.js} +1 -1
- package/dist/{model-catalogs-BnCdB2A3.mjs → model-catalogs-CIE4Dz4x.mjs} +1 -1
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-DMgi6pND.js → node-CifGKjsd.js} +1 -1
- package/dist/{node-C3r8kiOo.mjs → node-ndjp9DQO.mjs} +1 -1
- package/dist/pipeline-runner/index.js +3 -3
- package/dist/pipeline-runner/index.mjs +3 -3
- package/dist/{process-memory-GFR7fxpJ.js → process-memory-BMfSP5-i.js} +1 -1
- package/dist/{process-memory-X0ws1SGJ.mjs → process-memory-CaMI-Ry2.mjs} +1 -1
- package/dist/recorder/index.js +16 -2
- package/dist/recorder/index.mjs +16 -2
- package/dist/{segment-demux-js-IKEO1XBz.mjs → segment-demux-js-CLXBgUTo.mjs} +1 -1
- package/dist/{segment-demux-js-CSQVhbFI.js → segment-demux-js-LhwVw18z.js} +1 -1
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DPFTlVoW.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-B4MD_B4k.mjs} +2 -2
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BvMrdOCD.mjs +26 -0
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-JVFs9LgI.mjs +26 -0
- package/dist/stream-broker/demux-worker-child.js +1 -1
- package/dist/stream-broker/demux-worker-child.mjs +1 -1
- package/dist/stream-broker/{hostInit-BOp1_Hhk.mjs → hostInit-DBDp5YHD.mjs} +2 -2
- package/dist/stream-broker/index.js +549 -26
- package/dist/stream-broker/index.mjs +549 -26
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-B7wsxLrK.mjs +0 -26
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BohOb2Cl.mjs +0 -26
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
|
-
//#region ../types/dist/event-category-
|
|
2
|
+
//#region ../types/dist/event-category-BvOFi6PY.mjs
|
|
3
3
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4
4
|
EventCategory["SystemBoot"] = "system.boot";
|
|
5
5
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -63,6 +63,24 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
63
63
|
* consumes this category and maps it to the `addon-crash-loop` kind.
|
|
64
64
|
*/
|
|
65
65
|
EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
|
|
66
|
+
/**
|
|
67
|
+
* A runner whose addon refused to start with a typed reason (D877) - parked
|
|
68
|
+
* in `refused`, never counted by the crash breaker, retried on operator
|
|
69
|
+
* action. One event per refusal.
|
|
70
|
+
*/
|
|
71
|
+
EventCategory["AddonRunnerRefused"] = "addon.runner-refused";
|
|
72
|
+
/**
|
|
73
|
+
* A runner settled on a state (D877): `running` (READY), `crashed`, `failed` or
|
|
74
|
+
* `refused`. In-process telemetry for the boot check (re-evaluate while any
|
|
75
|
+
* runner is still pending) and the alert centre (close a recovered runner).
|
|
76
|
+
*/
|
|
77
|
+
EventCategory["ProcessStateChanged"] = "process.state-changed";
|
|
78
|
+
/**
|
|
79
|
+
* The node's one-shot runner boot check (D877): planned runners against the
|
|
80
|
+
* process service, `degraded` when any is failed, refused or missing. The
|
|
81
|
+
* alert centre turns it into one alert and a direct critical push.
|
|
82
|
+
*/
|
|
83
|
+
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
66
84
|
EventCategory["AddonError"] = "addon.error";
|
|
67
85
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
68
86
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5387,7 +5405,7 @@ var ZodIssueCode = {
|
|
|
5387
5405
|
var ZodFirstPartyTypeKind;
|
|
5388
5406
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5389
5407
|
//#endregion
|
|
5390
|
-
//#region ../types/dist/sleep-
|
|
5408
|
+
//#region ../types/dist/sleep-WsrozGDL.mjs
|
|
5391
5409
|
/**
|
|
5392
5410
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5393
5411
|
* window to float samples (D455).
|
|
@@ -5536,7 +5554,7 @@ function isKeychainStoredField(field) {
|
|
|
5536
5554
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5537
5555
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5538
5556
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5539
|
-
function isRecord$
|
|
5557
|
+
function isRecord$4(value) {
|
|
5540
5558
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5541
5559
|
}
|
|
5542
5560
|
function makeSecretMarker(ref) {
|
|
@@ -5547,12 +5565,12 @@ function makeSecretMarker(ref) {
|
|
|
5547
5565
|
}
|
|
5548
5566
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5549
5567
|
function isSecretMarker(value) {
|
|
5550
|
-
if (!isRecord$
|
|
5568
|
+
if (!isRecord$4(value)) return false;
|
|
5551
5569
|
const ref = value["$secret"];
|
|
5552
5570
|
return typeof ref === "string" && ref.length > 0;
|
|
5553
5571
|
}
|
|
5554
5572
|
function isSecretClear(value) {
|
|
5555
|
-
return isRecord$
|
|
5573
|
+
return isRecord$4(value) && value["$secretClear"] === true;
|
|
5556
5574
|
}
|
|
5557
5575
|
/**
|
|
5558
5576
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6178,7 +6196,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6178
6196
|
}
|
|
6179
6197
|
};
|
|
6180
6198
|
var KEEP = { kind: "keep" };
|
|
6181
|
-
function isRecord$
|
|
6199
|
+
function isRecord$3(value) {
|
|
6182
6200
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6183
6201
|
}
|
|
6184
6202
|
function defaultMintId() {
|
|
@@ -6191,7 +6209,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6191
6209
|
return out;
|
|
6192
6210
|
}
|
|
6193
6211
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6194
|
-
else if (isRecord$
|
|
6212
|
+
else if (isRecord$3(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6195
6213
|
return out;
|
|
6196
6214
|
}
|
|
6197
6215
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6246,7 +6264,7 @@ function rowId(row, idKey) {
|
|
|
6246
6264
|
return null;
|
|
6247
6265
|
}
|
|
6248
6266
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6249
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6267
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$3) : [];
|
|
6250
6268
|
if (!Array.isArray(incoming)) {
|
|
6251
6269
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6252
6270
|
return {
|
|
@@ -6262,7 +6280,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6262
6280
|
const kept = /* @__PURE__ */ new Set();
|
|
6263
6281
|
const rows = [];
|
|
6264
6282
|
for (const row of incoming) {
|
|
6265
|
-
if (!isRecord$
|
|
6283
|
+
if (!isRecord$3(row)) {
|
|
6266
6284
|
rows.push(row);
|
|
6267
6285
|
continue;
|
|
6268
6286
|
}
|
|
@@ -6287,7 +6305,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6287
6305
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6288
6306
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6289
6307
|
case "object": {
|
|
6290
|
-
if (!isRecord$
|
|
6308
|
+
if (!isRecord$3(incoming)) {
|
|
6291
6309
|
if (incoming === void 0) return KEEP;
|
|
6292
6310
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6293
6311
|
return {
|
|
@@ -6295,7 +6313,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6295
6313
|
value: incoming
|
|
6296
6314
|
};
|
|
6297
6315
|
}
|
|
6298
|
-
const storedObj = isRecord$
|
|
6316
|
+
const storedObj = isRecord$3(stored) ? stored : {};
|
|
6299
6317
|
return {
|
|
6300
6318
|
kind: "value",
|
|
6301
6319
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6418,7 +6436,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6418
6436
|
value: items
|
|
6419
6437
|
};
|
|
6420
6438
|
}
|
|
6421
|
-
if (isRecord$
|
|
6439
|
+
if (isRecord$3(v)) {
|
|
6422
6440
|
const out = {};
|
|
6423
6441
|
for (const [k, child] of Object.entries(v)) {
|
|
6424
6442
|
const s = substitute(child);
|
|
@@ -6450,7 +6468,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
6450
6468
|
this.name = "SecretOverwriteRefusedError";
|
|
6451
6469
|
}
|
|
6452
6470
|
};
|
|
6453
|
-
function isRecord(value) {
|
|
6471
|
+
function isRecord$2$1(value) {
|
|
6454
6472
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6455
6473
|
}
|
|
6456
6474
|
function resolvedValue(pass, marker) {
|
|
@@ -6479,7 +6497,7 @@ function inArray(pass, incoming, stored) {
|
|
|
6479
6497
|
return incoming.map((item, index) => {
|
|
6480
6498
|
const twin = stored[index];
|
|
6481
6499
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6482
|
-
if (isRecord(item) && isRecord(twin)) return inArrayRow(pass, item, twin);
|
|
6500
|
+
if (isRecord$2$1(item) && isRecord$2$1(twin)) return inArrayRow(pass, item, twin);
|
|
6483
6501
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6484
6502
|
return item;
|
|
6485
6503
|
});
|
|
@@ -6490,7 +6508,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6490
6508
|
const twin = stored[key];
|
|
6491
6509
|
if (isSecretMarker(twin)) {
|
|
6492
6510
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6493
|
-
} else if (isRecord(value) && isRecord(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6511
|
+
} else if (isRecord$2$1(value) && isRecord$2$1(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6494
6512
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6495
6513
|
}
|
|
6496
6514
|
return out;
|
|
@@ -6498,7 +6516,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6498
6516
|
async function walk(pass, incoming, stored) {
|
|
6499
6517
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6500
6518
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6501
|
-
if (!isRecord(incoming) || !isRecord(stored)) return incoming;
|
|
6519
|
+
if (!isRecord$2$1(incoming) || !isRecord$2$1(stored)) return incoming;
|
|
6502
6520
|
const out = { ...incoming };
|
|
6503
6521
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6504
6522
|
return out;
|
|
@@ -6529,7 +6547,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
6529
6547
|
function isJsonEqual(a, b) {
|
|
6530
6548
|
if (Object.is(a, b)) return true;
|
|
6531
6549
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6532
|
-
if (isRecord(a) && isRecord(b)) {
|
|
6550
|
+
if (isRecord$2$1(a) && isRecord$2$1(b)) {
|
|
6533
6551
|
const keys = Object.keys(a);
|
|
6534
6552
|
if (keys.length !== Object.keys(b).length) return false;
|
|
6535
6553
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -6553,7 +6571,7 @@ function markerKeysOf(blob, owner) {
|
|
|
6553
6571
|
}
|
|
6554
6572
|
function nodeFromStored(value, owner) {
|
|
6555
6573
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6556
|
-
if (!isRecord(value)) return null;
|
|
6574
|
+
if (!isRecord$2$1(value)) return null;
|
|
6557
6575
|
const children = /* @__PURE__ */ new Map();
|
|
6558
6576
|
for (const [key, child] of Object.entries(value)) {
|
|
6559
6577
|
const node = nodeFromStored(child, owner);
|
|
@@ -7835,6 +7853,89 @@ var PeerBytesTicketSchema = object({
|
|
|
7835
7853
|
*/
|
|
7836
7854
|
declaredBytes: number().int().nonnegative().nullable()
|
|
7837
7855
|
});
|
|
7856
|
+
/** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
|
|
7857
|
+
/** The files a kind may live in. `history` is device-history's (D850), never records. */
|
|
7858
|
+
var RECORD_DATABASES = ["settings", "events"];
|
|
7859
|
+
/** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
|
|
7860
|
+
var RECORD_CLASSES = [
|
|
7861
|
+
"config",
|
|
7862
|
+
"ledger",
|
|
7863
|
+
"audit",
|
|
7864
|
+
"mirror",
|
|
7865
|
+
"ephemeral"
|
|
7866
|
+
];
|
|
7867
|
+
var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
|
|
7868
|
+
var RECORD_MAX_DATA_BYTES = 1024 * 1024;
|
|
7869
|
+
var RECORD_BATCH_MAX = 1e3;
|
|
7870
|
+
var RECORD_QUERY_MAX = 1e3;
|
|
7871
|
+
/**
|
|
7872
|
+
* Record kinds (D881): the declaration an addon makes of one kind of fact, the
|
|
7873
|
+
* Zod row schema that describes it, and the helper that turns the two into the
|
|
7874
|
+
* JSON the engine stores.
|
|
7875
|
+
*
|
|
7876
|
+
* A kind is declared ONCE, next to the code that owns it, and the engine's
|
|
7877
|
+
* reconciler creates its indexes - nothing creates DDL at runtime from a write.
|
|
7878
|
+
* Everything the generic machinery needs (secret fields, the entry descriptor)
|
|
7879
|
+
* is DERIVED from the Zod schema: `.meta({ secret: true })` marks a credential,
|
|
7880
|
+
* never a field name (D879).
|
|
7881
|
+
*/
|
|
7882
|
+
/** A JSON field path: `trackId`, `auth.accessToken`. Charset-restricted: it is rendered into DDL. */
|
|
7883
|
+
var RecordFieldPathSchema = string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,63}(\.[A-Za-z_][A-Za-z0-9_]{0,63}){0,3}$/);
|
|
7884
|
+
var RecordIndexSchema = object({
|
|
7885
|
+
name: string().regex(/^[a-z][a-z0-9_]{0,31}$/),
|
|
7886
|
+
fields: array(RecordFieldPathSchema).min(1).max(4),
|
|
7887
|
+
unique: boolean().optional()
|
|
7888
|
+
}).strict();
|
|
7889
|
+
var RecordRetentionSchema = union([
|
|
7890
|
+
object({
|
|
7891
|
+
ttlMs: number().int().positive(),
|
|
7892
|
+
from: _enum(["at", "write"])
|
|
7893
|
+
}).strict(),
|
|
7894
|
+
object({
|
|
7895
|
+
maxRows: number().int().positive().optional(),
|
|
7896
|
+
maxRowsPerDevice: number().int().positive().optional()
|
|
7897
|
+
}).strict().refine((r) => r.maxRows !== void 0 || r.maxRowsPerDevice !== void 0, { message: "name maxRows, maxRowsPerDevice or both" }),
|
|
7898
|
+
object({
|
|
7899
|
+
owner: string().min(1),
|
|
7900
|
+
reason: string().min(1)
|
|
7901
|
+
}).strict(),
|
|
7902
|
+
object({ none: string().min(1) }).strict()
|
|
7903
|
+
]);
|
|
7904
|
+
/** The descriptor a generic entries UI reads (D881 "generic entries"). */
|
|
7905
|
+
var EntryDescriptorSchema = object({
|
|
7906
|
+
title: string().min(1),
|
|
7907
|
+
/** The record body field shown as the entry's name. */
|
|
7908
|
+
nameField: string().min(1),
|
|
7909
|
+
/** JSON Schema of the entry body; `secret: true` marks a password field. */
|
|
7910
|
+
fields: record(string(), unknown())
|
|
7911
|
+
}).strict();
|
|
7912
|
+
/** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
|
|
7913
|
+
var RecordKindDeclarationSchema = object({
|
|
7914
|
+
database: _enum(RECORD_DATABASES).default("settings"),
|
|
7915
|
+
class: _enum(RECORD_CLASSES),
|
|
7916
|
+
writeTrigger: string().min(1),
|
|
7917
|
+
device: _enum([
|
|
7918
|
+
"required",
|
|
7919
|
+
"optional",
|
|
7920
|
+
"none"
|
|
7921
|
+
]).default("none"),
|
|
7922
|
+
at: _enum(["required", "none"]).default("none"),
|
|
7923
|
+
indexes: array(RecordIndexSchema).max(8).default([]),
|
|
7924
|
+
retention: RecordRetentionSchema,
|
|
7925
|
+
deviceRemoval: _enum(["delete", "none"]).default("none"),
|
|
7926
|
+
maxDataBytes: number().int().positive().max(RECORD_MAX_DATA_BYTES).default(RECORD_DEFAULT_MAX_DATA_BYTES),
|
|
7927
|
+
/** Derived from the Zod schema; never written by hand. */
|
|
7928
|
+
secretPaths: array(string().min(1)).default([]),
|
|
7929
|
+
/** The id key of each array that carries a secret (`{ headers: 'name' }`). */
|
|
7930
|
+
secretArrayKeys: record(string(), string()).default({}),
|
|
7931
|
+
/** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
|
|
7932
|
+
adoptsFrom: string().min(1).optional(),
|
|
7933
|
+
/** Kinds that must agree through `transact` sit in one file under one family name. */
|
|
7934
|
+
transactFamily: string().min(1).optional(),
|
|
7935
|
+
entry: EntryDescriptorSchema.optional()
|
|
7936
|
+
}).strict();
|
|
7937
|
+
/** The kind names: lower-case, dash separated, short enough for an index name. */
|
|
7938
|
+
var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
7838
7939
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
7839
7940
|
var CamProfileSchema = _enum([
|
|
7840
7941
|
"high",
|
|
@@ -8601,7 +8702,7 @@ function sleep(ms) {
|
|
|
8601
8702
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
8602
8703
|
}
|
|
8603
8704
|
//#endregion
|
|
8604
|
-
//#region ../types/dist/err-msg
|
|
8705
|
+
//#region ../types/dist/err-msg--2RrYiLO.mjs
|
|
8605
8706
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
8606
8707
|
DeviceType["Camera"] = "camera";
|
|
8607
8708
|
DeviceType["Hub"] = "hub";
|
|
@@ -8870,6 +8971,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
8870
8971
|
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
8871
8972
|
* real Switch device for UI rendering / export adapters. */
|
|
8872
8973
|
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
8974
|
+
/** A smart plug: a `switch` whose source says it is an outlet (HA
|
|
8975
|
+
* `device_class: outlet`). The Alexa export shows it as a SMARTPLUG. */
|
|
8976
|
+
DeviceRole["Outlet"] = "outlet";
|
|
8873
8977
|
/** Generic motion / occupancy / moving event source. Distinct from
|
|
8874
8978
|
* the camera accessory PirSensor role: that one is a camera child;
|
|
8875
8979
|
* this is a standalone HA / 3rd-party motion sensor. */
|
|
@@ -8947,7 +9051,7 @@ function errMsg(err) {
|
|
|
8947
9051
|
return String(err);
|
|
8948
9052
|
}
|
|
8949
9053
|
//#endregion
|
|
8950
|
-
//#region ../types/dist/composition-
|
|
9054
|
+
//#region ../types/dist/composition-DOwQB_Ua.mjs
|
|
8951
9055
|
var AUDIO_ENCODER_BY_CODEC = {
|
|
8952
9056
|
opus: "libopus",
|
|
8953
9057
|
aac: "aac",
|
|
@@ -18410,6 +18514,41 @@ var ComposableCapabilitiesSchema = object({ caps: array(object({
|
|
|
18410
18514
|
keyField: string()
|
|
18411
18515
|
}).optional()
|
|
18412
18516
|
})) });
|
|
18517
|
+
/**
|
|
18518
|
+
* The report of a one-shot "move this owner's plaintext secrets into the
|
|
18519
|
+
* keychain" run (D878). COUNTS only - never a value, never a ref.
|
|
18520
|
+
*
|
|
18521
|
+
* The owner runs it on its own rows, through its own write path; an operator
|
|
18522
|
+
* script (`scripts/hub/migrate-raw-secrets.ts`) calls the owner's cap method.
|
|
18523
|
+
* Dry run (`apply: false`) reports what WOULD move and changes nothing.
|
|
18524
|
+
*/
|
|
18525
|
+
var RawSecretMigrationInputSchema = object({
|
|
18526
|
+
/** `false` (the default of the script) = report only. */
|
|
18527
|
+
apply: boolean() });
|
|
18528
|
+
var RawSecretMigrationReportSchema = object({
|
|
18529
|
+
apply: boolean(),
|
|
18530
|
+
/** Rows that can carry a secret (a profile, an enrolment). */
|
|
18531
|
+
rows: number().int(),
|
|
18532
|
+
/** Rows whose secret was plaintext when the run started. */
|
|
18533
|
+
raw: number().int(),
|
|
18534
|
+
/** Rows that already held a keychain marker when the run started. */
|
|
18535
|
+
markers: number().int(),
|
|
18536
|
+
/** Plaintext rows moved by THIS run (always 0 on a dry run). */
|
|
18537
|
+
migrated: number().int(),
|
|
18538
|
+
/** Plaintext rows left in place because the move or its read-back failed. */
|
|
18539
|
+
failed: number().int(),
|
|
18540
|
+
/** After the run: rows still holding plaintext. */
|
|
18541
|
+
remainingRaw: number().int(),
|
|
18542
|
+
/** After the run: markers the keychain could not resolve right now. */
|
|
18543
|
+
unresolvedMarkers: number().int(),
|
|
18544
|
+
/**
|
|
18545
|
+
* A second, redundant copy of the secrets' rows that the run found (and, on
|
|
18546
|
+
* `apply`, deleted after verifying the first). Owners with a single copy omit it.
|
|
18547
|
+
*/
|
|
18548
|
+
redundantCopies: number().int().optional(),
|
|
18549
|
+
/** True when nothing is raw and every marker resolves. */
|
|
18550
|
+
verified: boolean()
|
|
18551
|
+
});
|
|
18413
18552
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
18414
18553
|
* agent is the reason placement is not fixed to the hub. */
|
|
18415
18554
|
var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
|
|
@@ -18636,6 +18775,9 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
18636
18775
|
}), SettingsUpdateResultSchema, {
|
|
18637
18776
|
kind: "mutation",
|
|
18638
18777
|
auth: "admin"
|
|
18778
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
18779
|
+
kind: "mutation",
|
|
18780
|
+
auth: "admin"
|
|
18639
18781
|
}), method(object({}), object({ libs: array(object({
|
|
18640
18782
|
filePath: string(),
|
|
18641
18783
|
content: string()
|
|
@@ -18898,6 +19040,222 @@ id: union([string(), number()]) }), {
|
|
|
18898
19040
|
kind: "mutation",
|
|
18899
19041
|
auth: "admin"
|
|
18900
19042
|
});
|
|
19043
|
+
/**
|
|
19044
|
+
* records - an addon's own facts and documents (D881): ledgers, audit rows,
|
|
19045
|
+
* config documents, mirrors. The third storage API next to `ctx.settings`
|
|
19046
|
+
* (operator intent, D870) and device-history (numbers over time, D850).
|
|
19047
|
+
*
|
|
19048
|
+
* Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
|
|
19049
|
+
* crossed a process and stated by a hub in-process caller (`ctx.records` does
|
|
19050
|
+
* that with the addon id closed over). It is deliberately NOT in any input
|
|
19051
|
+
* schema, so a session can never supply it, and a call with no stamp is refused
|
|
19052
|
+
* `records/no-caller`. A kind is readable and writable only by its owner; other
|
|
19053
|
+
* addons go through the owner's capability.
|
|
19054
|
+
*
|
|
19055
|
+
* Every read is three-way: a row, `null`, or the call THROWS. A failed read is
|
|
19056
|
+
* never `[]`. Secret fields are never on the wire: a read shows the
|
|
19057
|
+
* redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
|
|
19058
|
+
* resolves itself, and a write may carry only a keychain marker bound to the
|
|
19059
|
+
* row's own ref.
|
|
19060
|
+
*
|
|
19061
|
+
* Internal: addons reach it through `ctx.records`, never directly.
|
|
19062
|
+
*/
|
|
19063
|
+
var RecordIdSchema = string().min(1).max(256);
|
|
19064
|
+
/** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
|
|
19065
|
+
var RecordBodySchema = record(string(), unknown());
|
|
19066
|
+
var RecordInputSchema = object({
|
|
19067
|
+
id: RecordIdSchema,
|
|
19068
|
+
/** The device this row belongs to (D865 removal, per-device reads). */
|
|
19069
|
+
deviceId: number().int().optional(),
|
|
19070
|
+
/** The domain clock, ms: observed / created / opened. */
|
|
19071
|
+
at: number().int().optional(),
|
|
19072
|
+
/** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
|
|
19073
|
+
expiresAt: number().int().optional(),
|
|
19074
|
+
data: RecordBodySchema
|
|
19075
|
+
});
|
|
19076
|
+
var RecordViewSchema = object({
|
|
19077
|
+
id: string(),
|
|
19078
|
+
deviceId: number().int().nullable(),
|
|
19079
|
+
at: number().nullable(),
|
|
19080
|
+
expiresAt: number().nullable(),
|
|
19081
|
+
rev: number().int(),
|
|
19082
|
+
updatedAt: number(),
|
|
19083
|
+
data: RecordBodySchema
|
|
19084
|
+
});
|
|
19085
|
+
/** Declared index fields only. Anything else does not compile, by design. */
|
|
19086
|
+
var RecordWhereSchema = record(RecordFieldPathSchema, union([
|
|
19087
|
+
string(),
|
|
19088
|
+
number(),
|
|
19089
|
+
boolean(),
|
|
19090
|
+
object({ in: array(union([
|
|
19091
|
+
string(),
|
|
19092
|
+
number(),
|
|
19093
|
+
boolean()
|
|
19094
|
+
])).min(1).max(RECORD_BATCH_MAX) }),
|
|
19095
|
+
object({
|
|
19096
|
+
gt: union([string(), number()]).optional(),
|
|
19097
|
+
gte: union([string(), number()]).optional(),
|
|
19098
|
+
lt: union([string(), number()]).optional(),
|
|
19099
|
+
lte: union([string(), number()]).optional()
|
|
19100
|
+
}).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
|
|
19101
|
+
]));
|
|
19102
|
+
var KindShape = { kind: RecordKindNameSchema };
|
|
19103
|
+
var TimeWindowShape = {
|
|
19104
|
+
deviceId: number().int().optional(),
|
|
19105
|
+
atFrom: number().optional(),
|
|
19106
|
+
atTo: number().optional()
|
|
19107
|
+
};
|
|
19108
|
+
var RecordQueryInputSchema = object({
|
|
19109
|
+
...KindShape,
|
|
19110
|
+
...TimeWindowShape,
|
|
19111
|
+
where: RecordWhereSchema.optional(),
|
|
19112
|
+
/** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
|
|
19113
|
+
order: _enum(["at", "id"]).optional(),
|
|
19114
|
+
desc: boolean().optional(),
|
|
19115
|
+
limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
|
|
19116
|
+
/** Opaque keyset cursor from a previous answer. There is no offset. */
|
|
19117
|
+
cursor: string().min(1).optional()
|
|
19118
|
+
});
|
|
19119
|
+
var RecordQueryResultSchema = object({
|
|
19120
|
+
records: array(RecordViewSchema),
|
|
19121
|
+
nextCursor: string().nullable()
|
|
19122
|
+
});
|
|
19123
|
+
var RecordKindStateSchema = _enum([
|
|
19124
|
+
"created",
|
|
19125
|
+
"unchanged",
|
|
19126
|
+
"updated"
|
|
19127
|
+
]);
|
|
19128
|
+
var DeclareKindResultSchema = object({
|
|
19129
|
+
kindId: number().int(),
|
|
19130
|
+
state: RecordKindStateSchema,
|
|
19131
|
+
createdIndexes: array(string()),
|
|
19132
|
+
/** The boot guard: the kind is empty while its legacy table still holds rows. */
|
|
19133
|
+
adoptionPending: object({
|
|
19134
|
+
legacyTable: string(),
|
|
19135
|
+
legacyRows: number().int()
|
|
19136
|
+
}).nullable()
|
|
19137
|
+
});
|
|
19138
|
+
/** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
|
|
19139
|
+
var SecretRefsList = array(string());
|
|
19140
|
+
var RecordSecretRefsSchema = record(string(), record(string(), string()));
|
|
19141
|
+
method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
|
|
19142
|
+
kind: "mutation",
|
|
19143
|
+
auth: "admin"
|
|
19144
|
+
}), method(object({
|
|
19145
|
+
...KindShape,
|
|
19146
|
+
id: RecordIdSchema
|
|
19147
|
+
}), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
|
|
19148
|
+
...KindShape,
|
|
19149
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
19150
|
+
}), array(RecordViewSchema), { auth: "admin" }), method(object({
|
|
19151
|
+
...KindShape,
|
|
19152
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
19153
|
+
}), RecordSecretRefsSchema, { auth: "admin" }), method(object({
|
|
19154
|
+
...KindShape,
|
|
19155
|
+
record: RecordInputSchema,
|
|
19156
|
+
/** Compare-and-set. `0` means "the row must not exist". */
|
|
19157
|
+
ifRev: number().int().min(0).optional()
|
|
19158
|
+
}), object({
|
|
19159
|
+
rev: number().int(),
|
|
19160
|
+
releasedRefs: SecretRefsList
|
|
19161
|
+
}), {
|
|
19162
|
+
kind: "mutation",
|
|
19163
|
+
auth: "admin"
|
|
19164
|
+
}), method(object({
|
|
19165
|
+
...KindShape,
|
|
19166
|
+
records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
|
|
19167
|
+
}), object({
|
|
19168
|
+
count: number().int(),
|
|
19169
|
+
releasedRefs: SecretRefsList
|
|
19170
|
+
}), {
|
|
19171
|
+
kind: "mutation",
|
|
19172
|
+
auth: "admin"
|
|
19173
|
+
}), method(object({
|
|
19174
|
+
...KindShape,
|
|
19175
|
+
id: RecordIdSchema,
|
|
19176
|
+
data: RecordBodySchema,
|
|
19177
|
+
at: number().int().nullable().optional(),
|
|
19178
|
+
expiresAt: number().int().nullable().optional(),
|
|
19179
|
+
ifRev: number().int().min(1).optional()
|
|
19180
|
+
}), object({
|
|
19181
|
+
rev: number().int(),
|
|
19182
|
+
releasedRefs: SecretRefsList
|
|
19183
|
+
}), {
|
|
19184
|
+
kind: "mutation",
|
|
19185
|
+
auth: "admin"
|
|
19186
|
+
}), method(object({
|
|
19187
|
+
...KindShape,
|
|
19188
|
+
id: RecordIdSchema
|
|
19189
|
+
}), object({
|
|
19190
|
+
deleted: boolean(),
|
|
19191
|
+
secretRefs: SecretRefsList
|
|
19192
|
+
}), {
|
|
19193
|
+
kind: "mutation",
|
|
19194
|
+
auth: "admin"
|
|
19195
|
+
}), method(object({
|
|
19196
|
+
...KindShape,
|
|
19197
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
19198
|
+
}), object({
|
|
19199
|
+
deleted: number().int(),
|
|
19200
|
+
secretRefs: SecretRefsList
|
|
19201
|
+
}), {
|
|
19202
|
+
kind: "mutation",
|
|
19203
|
+
auth: "admin"
|
|
19204
|
+
}), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
19205
|
+
...KindShape,
|
|
19206
|
+
...TimeWindowShape,
|
|
19207
|
+
where: RecordWhereSchema.optional()
|
|
19208
|
+
}), object({ count: number().int() }), { auth: "admin" }), method(object({
|
|
19209
|
+
...KindShape,
|
|
19210
|
+
deviceId: number().int().optional(),
|
|
19211
|
+
from: number(),
|
|
19212
|
+
to: number(),
|
|
19213
|
+
bucketMs: number().int().positive()
|
|
19214
|
+
}), object({ buckets: array(object({
|
|
19215
|
+
bucketStart: number(),
|
|
19216
|
+
count: number().int()
|
|
19217
|
+
})) }), { auth: "admin" }), method(object({
|
|
19218
|
+
...KindShape,
|
|
19219
|
+
op: _enum([
|
|
19220
|
+
"sum",
|
|
19221
|
+
"min",
|
|
19222
|
+
"max",
|
|
19223
|
+
"count"
|
|
19224
|
+
]),
|
|
19225
|
+
field: RecordFieldPathSchema.optional(),
|
|
19226
|
+
groupBy: RecordFieldPathSchema.optional(),
|
|
19227
|
+
where: RecordWhereSchema.optional()
|
|
19228
|
+
}), object({ rows: array(object({
|
|
19229
|
+
group: union([
|
|
19230
|
+
string(),
|
|
19231
|
+
number(),
|
|
19232
|
+
_null()
|
|
19233
|
+
]),
|
|
19234
|
+
value: number().nullable()
|
|
19235
|
+
})) }), { auth: "admin" }), method(object({
|
|
19236
|
+
...KindShape,
|
|
19237
|
+
deviceId: number().int().optional(),
|
|
19238
|
+
atBefore: number().optional(),
|
|
19239
|
+
where: RecordWhereSchema.optional()
|
|
19240
|
+
}), object({
|
|
19241
|
+
deleted: number().int(),
|
|
19242
|
+
secretRefs: SecretRefsList
|
|
19243
|
+
}), {
|
|
19244
|
+
kind: "mutation",
|
|
19245
|
+
auth: "admin"
|
|
19246
|
+
}), method(object({
|
|
19247
|
+
deviceId: number().int(),
|
|
19248
|
+
kinds: array(RecordKindNameSchema).optional()
|
|
19249
|
+
}), object({
|
|
19250
|
+
deleted: record(string(), number().int()),
|
|
19251
|
+
secretRefs: SecretRefsList
|
|
19252
|
+
}), {
|
|
19253
|
+
kind: "mutation",
|
|
19254
|
+
auth: "admin"
|
|
19255
|
+
}), method(object(KindShape), object({ id: number().int() }), {
|
|
19256
|
+
kind: "mutation",
|
|
19257
|
+
auth: "admin"
|
|
19258
|
+
});
|
|
18901
19259
|
/** One table of the settings database. */
|
|
18902
19260
|
var StorageTableSchema = object({
|
|
18903
19261
|
/** The table's full name, e.g. `recorder:addon-settings` or `addon-device-settings`. */
|
|
@@ -18910,6 +19268,28 @@ var StorageTableSchema = object({
|
|
|
18910
19268
|
/** Declared by an addon since this engine process started (a running addon claims it). */
|
|
18911
19269
|
declaredThisBoot: boolean()
|
|
18912
19270
|
});
|
|
19271
|
+
/** One declared record kind (D881) as System -> Data shows it. */
|
|
19272
|
+
var StorageKindSchema = object({
|
|
19273
|
+
owner: string(),
|
|
19274
|
+
kind: string(),
|
|
19275
|
+
database: _enum(["settings", "events"]),
|
|
19276
|
+
class: string(),
|
|
19277
|
+
state: _enum([
|
|
19278
|
+
"declared",
|
|
19279
|
+
"orphaned",
|
|
19280
|
+
"dropped"
|
|
19281
|
+
]),
|
|
19282
|
+
/** `null` when the caller asked for no counts (`counts: false`). */
|
|
19283
|
+
rows: number().int().nonnegative().nullable(),
|
|
19284
|
+
/** Rows x the average size of a sample; null for an empty kind. */
|
|
19285
|
+
bytesEstimate: number().int().nonnegative().nullable(),
|
|
19286
|
+
writeTrigger: string(),
|
|
19287
|
+
retention: RecordRetentionSchema,
|
|
19288
|
+
/** `true` when the kind is an entry kind (the generic entries UI lists it). */
|
|
19289
|
+
entry: boolean(),
|
|
19290
|
+
/** The whole declaration, secret paths and entry descriptor included (the entries service builds its handle from it). */
|
|
19291
|
+
declaration: RecordKindDeclarationSchema
|
|
19292
|
+
});
|
|
18913
19293
|
method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: array(StorageTableSchema) }), { auth: "admin" }), method(object({
|
|
18914
19294
|
collection: string().min(1),
|
|
18915
19295
|
expectRows: number().int().nonnegative()
|
|
@@ -18919,6 +19299,77 @@ method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: arr
|
|
|
18919
19299
|
}), {
|
|
18920
19300
|
kind: "mutation",
|
|
18921
19301
|
auth: "admin"
|
|
19302
|
+
}), method(object({
|
|
19303
|
+
owner: string().min(1).optional(),
|
|
19304
|
+
/** `false` skips the per-kind row count (a catalog read only). Default true. */
|
|
19305
|
+
counts: boolean().optional()
|
|
19306
|
+
}), object({ kinds: array(StorageKindSchema) }), { auth: "admin" }), method(RecordQueryInputSchema.extend({
|
|
19307
|
+
owner: string().min(1),
|
|
19308
|
+
kind: RecordKindNameSchema
|
|
19309
|
+
}), RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
19310
|
+
owner: string().min(1),
|
|
19311
|
+
kind: RecordKindNameSchema,
|
|
19312
|
+
records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX),
|
|
19313
|
+
/** The LAST batch: the copy is complete, the boot guard stops asking. */
|
|
19314
|
+
complete: boolean().optional()
|
|
19315
|
+
}), object({ adopted: number().int() }), {
|
|
19316
|
+
kind: "mutation",
|
|
19317
|
+
auth: "admin"
|
|
19318
|
+
});
|
|
19319
|
+
/**
|
|
19320
|
+
* record-entries - the ONE admin surface for every list of user-created entries
|
|
19321
|
+
* (D881): notification targets, brokers, LLM profiles, anything an addon
|
|
19322
|
+
* declares as an ENTRY kind (`entry: { title }` in `defineRecordKinds`).
|
|
19323
|
+
*
|
|
19324
|
+
* The UI is generic. `listEntryKinds` hands it, per kind, the JSON Schema of
|
|
19325
|
+
* the entry body with `secret: true` on every credential field, so a password
|
|
19326
|
+
* field is derived from the schema and never from a name. `putEntry` takes the
|
|
19327
|
+
* redaction token for an untouched secret (the stored value is kept), a string
|
|
19328
|
+
* for a new one, and the clear instruction to remove one. A read never carries
|
|
19329
|
+
* a secret value, and a locked keychain refuses the write with
|
|
19330
|
+
* `records/secret-unavailable` instead of storing plaintext.
|
|
19331
|
+
*
|
|
19332
|
+
* Hub-only, served in-process (it acts for each entry's owner on the keychain).
|
|
19333
|
+
*/
|
|
19334
|
+
var EntryKindInfoSchema = object({
|
|
19335
|
+
owner: string(),
|
|
19336
|
+
kind: RecordKindNameSchema,
|
|
19337
|
+
title: string(),
|
|
19338
|
+
nameField: string(),
|
|
19339
|
+
/** JSON Schema of the body; `secret: true` marks a password field. */
|
|
19340
|
+
fields: record(string(), unknown()),
|
|
19341
|
+
secretPaths: array(string()),
|
|
19342
|
+
rows: number().int().nonnegative()
|
|
19343
|
+
});
|
|
19344
|
+
var EntryViewSchema = object({
|
|
19345
|
+
id: RecordIdSchema,
|
|
19346
|
+
name: string(),
|
|
19347
|
+
rev: number().int(),
|
|
19348
|
+
updatedAt: number(),
|
|
19349
|
+
/** Secret fields hold the redaction token. */
|
|
19350
|
+
data: RecordBodySchema
|
|
19351
|
+
});
|
|
19352
|
+
var EntryAddress = {
|
|
19353
|
+
owner: string().min(1),
|
|
19354
|
+
kind: RecordKindNameSchema
|
|
19355
|
+
};
|
|
19356
|
+
method(object({}), object({ kinds: array(EntryKindInfoSchema) }), { auth: "admin" }), method(object({ ...EntryAddress }), object({ entries: array(EntryViewSchema) }), { auth: "admin" }), method(object({
|
|
19357
|
+
...EntryAddress,
|
|
19358
|
+
id: RecordIdSchema.optional(),
|
|
19359
|
+
data: RecordBodySchema,
|
|
19360
|
+
ifRev: number().int().min(1).optional()
|
|
19361
|
+
}), object({
|
|
19362
|
+
id: string(),
|
|
19363
|
+
rev: number().int()
|
|
19364
|
+
}), {
|
|
19365
|
+
kind: "mutation",
|
|
19366
|
+
auth: "admin"
|
|
19367
|
+
}), method(object({
|
|
19368
|
+
...EntryAddress,
|
|
19369
|
+
id: RecordIdSchema
|
|
19370
|
+
}), object({ deleted: boolean() }), {
|
|
19371
|
+
kind: "mutation",
|
|
19372
|
+
auth: "admin"
|
|
18922
19373
|
});
|
|
18923
19374
|
/**
|
|
18924
19375
|
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
@@ -42007,6 +42458,9 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
|
42007
42458
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
42008
42459
|
kind: "mutation",
|
|
42009
42460
|
auth: "admin"
|
|
42461
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
42462
|
+
kind: "mutation",
|
|
42463
|
+
auth: "admin"
|
|
42010
42464
|
}), method(ProfileRefInputSchema, _void(), {
|
|
42011
42465
|
kind: "mutation",
|
|
42012
42466
|
auth: "admin"
|
|
@@ -53263,6 +53717,41 @@ var ServerRollbackInfoSchema = object({
|
|
|
53263
53717
|
atMs: number(),
|
|
53264
53718
|
reason: string()
|
|
53265
53719
|
});
|
|
53720
|
+
/**
|
|
53721
|
+
* The runner boot check (D877): the runners this node PLANNED (hub: one per
|
|
53722
|
+
* `resolveRunnerId` over its forked addons; agent: the runners its process
|
|
53723
|
+
* service holds, because only the hub plans) against the states the process
|
|
53724
|
+
* service reports. Kept in memory, recomputed by the same one-shot check after
|
|
53725
|
+
* every boot, served on `getServerPackageStatus`.
|
|
53726
|
+
*
|
|
53727
|
+
* `failed` is the D6 breaker's terminal state, `refused` a deterministic Init
|
|
53728
|
+
* refusal (an addon that said "I will not start, and here is why"), `missing` a
|
|
53729
|
+
* planned runner the process service has no entry for.
|
|
53730
|
+
*/
|
|
53731
|
+
var RunnerRefusalSchema = object({
|
|
53732
|
+
runnerId: string(),
|
|
53733
|
+
addonIds: array(string()),
|
|
53734
|
+
reason: string()
|
|
53735
|
+
});
|
|
53736
|
+
var RunnerBootCheckSchema = object({
|
|
53737
|
+
checkedAtMs: number(),
|
|
53738
|
+
/** Runners planned for this node. */
|
|
53739
|
+
expected: number(),
|
|
53740
|
+
/** Planned runners whose process is `running`. */
|
|
53741
|
+
running: number(),
|
|
53742
|
+
failed: array(string()),
|
|
53743
|
+
refused: array(RunnerRefusalSchema),
|
|
53744
|
+
missing: array(string()),
|
|
53745
|
+
/**
|
|
53746
|
+
* Runners still on their way: `starting`, or `crashed` waiting on a backoff
|
|
53747
|
+
* respawn. The check is FINAL only when this is empty; until then nothing is
|
|
53748
|
+
* pushed and the verdict is re-evaluated on the next runner state change.
|
|
53749
|
+
* Optional for version skew (absent = settled).
|
|
53750
|
+
*/
|
|
53751
|
+
pending: array(string()).optional(),
|
|
53752
|
+
/** True when the plan is the hub's (`missing` is then meaningful); false on an agent. */
|
|
53753
|
+
planKnown: boolean()
|
|
53754
|
+
});
|
|
53266
53755
|
var ServerPackageStatusSchema = object({
|
|
53267
53756
|
/** Root package name (`@camstack/server` on the hub). */
|
|
53268
53757
|
packageName: string(),
|
|
@@ -53325,7 +53814,14 @@ var ServerPackageStatusSchema = object({
|
|
|
53325
53814
|
* for version skew: an older provider's payload simply omits it, and an
|
|
53326
53815
|
* absent wrapper is unknown — never `native`.
|
|
53327
53816
|
*/
|
|
53328
|
-
wrapper: WrapperIdentitySchema.optional()
|
|
53817
|
+
wrapper: WrapperIdentitySchema.optional(),
|
|
53818
|
+
/**
|
|
53819
|
+
* What this node PLANNED to run against what its process service reports
|
|
53820
|
+
* (D877). Absent until the one-shot boot check has run (~60 s after boot) and
|
|
53821
|
+
* on a provider that predates it. Absent is "not checked yet", never "all
|
|
53822
|
+
* well": a consumer that needs the answer treats it as pending.
|
|
53823
|
+
*/
|
|
53824
|
+
runners: RunnerBootCheckSchema.optional()
|
|
53329
53825
|
});
|
|
53330
53826
|
var ServerUpdateCheckResultSchema = object({
|
|
53331
53827
|
packageName: string(),
|
|
@@ -53376,6 +53872,13 @@ var ServerUpdateOutcomeSchema = _enum([
|
|
|
53376
53872
|
"refused",
|
|
53377
53873
|
"failed"
|
|
53378
53874
|
]);
|
|
53875
|
+
/** One addon the pre-flight found the target version would refuse (D877). */
|
|
53876
|
+
var UpdateBlockerSchema = object({
|
|
53877
|
+
addonId: string(),
|
|
53878
|
+
reason: string(),
|
|
53879
|
+
/** What the operator does about it. */
|
|
53880
|
+
remedy: string()
|
|
53881
|
+
});
|
|
53379
53882
|
var ServerUpdateActionResultSchema = object({
|
|
53380
53883
|
accepted: boolean(),
|
|
53381
53884
|
targetVersion: string().nullable(),
|
|
@@ -53393,14 +53896,27 @@ var ServerUpdateActionResultSchema = object({
|
|
|
53393
53896
|
* The failure itself, verbatim enough to act on (the npm output for a
|
|
53394
53897
|
* staging install). Non-null only for `failed`.
|
|
53395
53898
|
*/
|
|
53396
|
-
error: string().nullable().optional()
|
|
53899
|
+
error: string().nullable().optional(),
|
|
53900
|
+
/**
|
|
53901
|
+
* The addons the target version would refuse to start on this node's live
|
|
53902
|
+
* store (D877), present when the pre-flight refused the update
|
|
53903
|
+
* (`reason: 'addon-would-refuse'`). Optional for version skew.
|
|
53904
|
+
*/
|
|
53905
|
+
blockers: array(UpdateBlockerSchema).optional()
|
|
53397
53906
|
});
|
|
53398
53907
|
method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
|
|
53399
53908
|
kind: "mutation",
|
|
53400
53909
|
auth: "admin"
|
|
53401
|
-
}), method(object({
|
|
53402
|
-
/** Explicit target version; omitted = latest from the registry. */
|
|
53403
|
-
version: string().optional()
|
|
53910
|
+
}), method(object({
|
|
53911
|
+
/** Explicit target version; omitted = latest from the registry. */
|
|
53912
|
+
version: string().optional(),
|
|
53913
|
+
/**
|
|
53914
|
+
* Apply even though the pre-flight (D877) found addons the target would
|
|
53915
|
+
* refuse to start. Off by default: those addons stay down until the
|
|
53916
|
+
* remedy is run, which is the incident this gate exists to prevent.
|
|
53917
|
+
*/
|
|
53918
|
+
acknowledgeRefusals: boolean().optional()
|
|
53919
|
+
}), ServerUpdateActionResultSchema, {
|
|
53404
53920
|
kind: "mutation",
|
|
53405
53921
|
auth: "admin",
|
|
53406
53922
|
timeoutMs: 16 * 6e4
|
|
@@ -56227,7 +56743,9 @@ var ManifestShapeSchema = object({
|
|
|
56227
56743
|
var AddonProcessSchema = object({
|
|
56228
56744
|
pid: number().optional(),
|
|
56229
56745
|
mode: string(),
|
|
56230
|
-
state: string()
|
|
56746
|
+
state: string(),
|
|
56747
|
+
/** Why the runner is `refused` (an addon's own words), when it is (D877). */
|
|
56748
|
+
reason: string().optional()
|
|
56231
56749
|
});
|
|
56232
56750
|
/**
|
|
56233
56751
|
* Per-addon health snapshot from the kernel's AddonHealthMonitor.
|
|
@@ -57319,6 +57837,12 @@ object({
|
|
|
57319
57837
|
/** Horizontal louver swing on/off. Null when the device has no
|
|
57320
57838
|
* horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
|
|
57321
57839
|
swingHorizontal: boolean().nullable(),
|
|
57840
|
+
/** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
57841
|
+
minTemp: number().nullable().optional(),
|
|
57842
|
+
/** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
57843
|
+
maxTemp: number().nullable().optional(),
|
|
57844
|
+
/** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
|
|
57845
|
+
tempStep: number().positive().nullable().optional(),
|
|
57322
57846
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
57323
57847
|
lastFetchedAt: number()
|
|
57324
57848
|
});
|
|
@@ -64863,7 +65387,11 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
64863
65387
|
kind: "mutation",
|
|
64864
65388
|
auth: "admin",
|
|
64865
65389
|
access: "delete"
|
|
64866
|
-
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(
|
|
65390
|
+
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
65391
|
+
kind: "mutation",
|
|
65392
|
+
auth: "admin",
|
|
65393
|
+
access: "create"
|
|
65394
|
+
}), method(object({
|
|
64867
65395
|
userId: string(),
|
|
64868
65396
|
code: string()
|
|
64869
65397
|
}), object({ valid: boolean() }), {
|
|
@@ -67082,6 +67610,12 @@ Object.freeze({
|
|
|
67082
67610
|
addonId: null,
|
|
67083
67611
|
access: "view"
|
|
67084
67612
|
},
|
|
67613
|
+
"coreBlocks.migrateRawSecrets": {
|
|
67614
|
+
capName: "core-blocks",
|
|
67615
|
+
capScope: "system",
|
|
67616
|
+
addonId: null,
|
|
67617
|
+
access: "create"
|
|
67618
|
+
},
|
|
67085
67619
|
"coreBlocks.restart": {
|
|
67086
67620
|
capName: "core-blocks",
|
|
67087
67621
|
capScope: "system",
|
|
@@ -68942,6 +69476,12 @@ Object.freeze({
|
|
|
68942
69476
|
addonId: null,
|
|
68943
69477
|
access: "view"
|
|
68944
69478
|
},
|
|
69479
|
+
"llm.migrateRawSecrets": {
|
|
69480
|
+
capName: "llm",
|
|
69481
|
+
capScope: "system",
|
|
69482
|
+
addonId: null,
|
|
69483
|
+
access: "create"
|
|
69484
|
+
},
|
|
68945
69485
|
"llm.resolveModelRef": {
|
|
68946
69486
|
capName: "llm",
|
|
68947
69487
|
capScope: "system",
|
|
@@ -71828,6 +72368,30 @@ Object.freeze({
|
|
|
71828
72368
|
addonId: null,
|
|
71829
72369
|
access: "create"
|
|
71830
72370
|
},
|
|
72371
|
+
"recordEntries.deleteEntry": {
|
|
72372
|
+
capName: "record-entries",
|
|
72373
|
+
capScope: "system",
|
|
72374
|
+
addonId: null,
|
|
72375
|
+
access: "delete"
|
|
72376
|
+
},
|
|
72377
|
+
"recordEntries.listEntries": {
|
|
72378
|
+
capName: "record-entries",
|
|
72379
|
+
capScope: "system",
|
|
72380
|
+
addonId: null,
|
|
72381
|
+
access: "view"
|
|
72382
|
+
},
|
|
72383
|
+
"recordEntries.listEntryKinds": {
|
|
72384
|
+
capName: "record-entries",
|
|
72385
|
+
capScope: "system",
|
|
72386
|
+
addonId: null,
|
|
72387
|
+
access: "view"
|
|
72388
|
+
},
|
|
72389
|
+
"recordEntries.putEntry": {
|
|
72390
|
+
capName: "record-entries",
|
|
72391
|
+
capScope: "system",
|
|
72392
|
+
addonId: null,
|
|
72393
|
+
access: "create"
|
|
72394
|
+
},
|
|
71831
72395
|
"recording.getAvailability": {
|
|
71832
72396
|
capName: "recording",
|
|
71833
72397
|
capScope: "device",
|
|
@@ -72128,6 +72692,102 @@ Object.freeze({
|
|
|
72128
72692
|
addonId: null,
|
|
72129
72693
|
access: "view"
|
|
72130
72694
|
},
|
|
72695
|
+
"records.aggregate": {
|
|
72696
|
+
capName: "records",
|
|
72697
|
+
capScope: "system",
|
|
72698
|
+
addonId: null,
|
|
72699
|
+
access: "view"
|
|
72700
|
+
},
|
|
72701
|
+
"records.allocateId": {
|
|
72702
|
+
capName: "records",
|
|
72703
|
+
capScope: "system",
|
|
72704
|
+
addonId: null,
|
|
72705
|
+
access: "create"
|
|
72706
|
+
},
|
|
72707
|
+
"records.count": {
|
|
72708
|
+
capName: "records",
|
|
72709
|
+
capScope: "system",
|
|
72710
|
+
addonId: null,
|
|
72711
|
+
access: "view"
|
|
72712
|
+
},
|
|
72713
|
+
"records.declareKinds": {
|
|
72714
|
+
capName: "records",
|
|
72715
|
+
capScope: "system",
|
|
72716
|
+
addonId: null,
|
|
72717
|
+
access: "create"
|
|
72718
|
+
},
|
|
72719
|
+
"records.delete": {
|
|
72720
|
+
capName: "records",
|
|
72721
|
+
capScope: "system",
|
|
72722
|
+
addonId: null,
|
|
72723
|
+
access: "delete"
|
|
72724
|
+
},
|
|
72725
|
+
"records.deleteDevice": {
|
|
72726
|
+
capName: "records",
|
|
72727
|
+
capScope: "system",
|
|
72728
|
+
addonId: null,
|
|
72729
|
+
access: "delete"
|
|
72730
|
+
},
|
|
72731
|
+
"records.deleteMany": {
|
|
72732
|
+
capName: "records",
|
|
72733
|
+
capScope: "system",
|
|
72734
|
+
addonId: null,
|
|
72735
|
+
access: "delete"
|
|
72736
|
+
},
|
|
72737
|
+
"records.deleteWhere": {
|
|
72738
|
+
capName: "records",
|
|
72739
|
+
capScope: "system",
|
|
72740
|
+
addonId: null,
|
|
72741
|
+
access: "delete"
|
|
72742
|
+
},
|
|
72743
|
+
"records.get": {
|
|
72744
|
+
capName: "records",
|
|
72745
|
+
capScope: "system",
|
|
72746
|
+
addonId: null,
|
|
72747
|
+
access: "view"
|
|
72748
|
+
},
|
|
72749
|
+
"records.getMany": {
|
|
72750
|
+
capName: "records",
|
|
72751
|
+
capScope: "system",
|
|
72752
|
+
addonId: null,
|
|
72753
|
+
access: "view"
|
|
72754
|
+
},
|
|
72755
|
+
"records.histogram": {
|
|
72756
|
+
capName: "records",
|
|
72757
|
+
capScope: "system",
|
|
72758
|
+
addonId: null,
|
|
72759
|
+
access: "view"
|
|
72760
|
+
},
|
|
72761
|
+
"records.patch": {
|
|
72762
|
+
capName: "records",
|
|
72763
|
+
capScope: "system",
|
|
72764
|
+
addonId: null,
|
|
72765
|
+
access: "create"
|
|
72766
|
+
},
|
|
72767
|
+
"records.put": {
|
|
72768
|
+
capName: "records",
|
|
72769
|
+
capScope: "system",
|
|
72770
|
+
addonId: null,
|
|
72771
|
+
access: "create"
|
|
72772
|
+
},
|
|
72773
|
+
"records.putMany": {
|
|
72774
|
+
capName: "records",
|
|
72775
|
+
capScope: "system",
|
|
72776
|
+
addonId: null,
|
|
72777
|
+
access: "create"
|
|
72778
|
+
},
|
|
72779
|
+
"records.query": {
|
|
72780
|
+
capName: "records",
|
|
72781
|
+
capScope: "system",
|
|
72782
|
+
addonId: null,
|
|
72783
|
+
access: "view"
|
|
72784
|
+
},
|
|
72785
|
+
"records.secretRefs": {
|
|
72786
|
+
capName: "records",
|
|
72787
|
+
capScope: "system",
|
|
72788
|
+
addonId: null,
|
|
72789
|
+
access: "view"
|
|
72790
|
+
},
|
|
72131
72791
|
"sceneMonitor.captureReference": {
|
|
72132
72792
|
capName: "scene-monitor",
|
|
72133
72793
|
capScope: "device",
|
|
@@ -72560,18 +73220,36 @@ Object.freeze({
|
|
|
72560
73220
|
addonId: null,
|
|
72561
73221
|
access: "create"
|
|
72562
73222
|
},
|
|
73223
|
+
"storageAdmin.adoptRecords": {
|
|
73224
|
+
capName: "storage-admin",
|
|
73225
|
+
capScope: "system",
|
|
73226
|
+
addonId: null,
|
|
73227
|
+
access: "create"
|
|
73228
|
+
},
|
|
72563
73229
|
"storageAdmin.dropCollection": {
|
|
72564
73230
|
capName: "storage-admin",
|
|
72565
73231
|
capScope: "system",
|
|
72566
73232
|
addonId: null,
|
|
72567
73233
|
access: "delete"
|
|
72568
73234
|
},
|
|
73235
|
+
"storageAdmin.listKinds": {
|
|
73236
|
+
capName: "storage-admin",
|
|
73237
|
+
capScope: "system",
|
|
73238
|
+
addonId: null,
|
|
73239
|
+
access: "view"
|
|
73240
|
+
},
|
|
72569
73241
|
"storageAdmin.listTables": {
|
|
72570
73242
|
capName: "storage-admin",
|
|
72571
73243
|
capScope: "system",
|
|
72572
73244
|
addonId: null,
|
|
72573
73245
|
access: "view"
|
|
72574
73246
|
},
|
|
73247
|
+
"storageAdmin.readRecords": {
|
|
73248
|
+
capName: "storage-admin",
|
|
73249
|
+
capScope: "system",
|
|
73250
|
+
addonId: null,
|
|
73251
|
+
access: "view"
|
|
73252
|
+
},
|
|
72575
73253
|
"storageEvictable.evict": {
|
|
72576
73254
|
capName: "storage-evictable",
|
|
72577
73255
|
capScope: "system",
|
|
@@ -73484,6 +74162,12 @@ Object.freeze({
|
|
|
73484
74162
|
addonId: null,
|
|
73485
74163
|
access: "view"
|
|
73486
74164
|
},
|
|
74165
|
+
"userManagement.migrateRawSecrets": {
|
|
74166
|
+
capName: "user-management",
|
|
74167
|
+
capScope: "system",
|
|
74168
|
+
addonId: null,
|
|
74169
|
+
access: "create"
|
|
74170
|
+
},
|
|
73487
74171
|
"userManagement.oauthExchangeCode": {
|
|
73488
74172
|
capName: "user-management",
|
|
73489
74173
|
capScope: "system",
|
|
@@ -76160,6 +76844,37 @@ Object.freeze({
|
|
|
76160
76844
|
form: "single",
|
|
76161
76845
|
optional: false
|
|
76162
76846
|
}],
|
|
76847
|
+
"records.count": [{
|
|
76848
|
+
name: "deviceId",
|
|
76849
|
+
form: "single",
|
|
76850
|
+
optional: true
|
|
76851
|
+
}],
|
|
76852
|
+
"records.deleteDevice": [{
|
|
76853
|
+
name: "deviceId",
|
|
76854
|
+
form: "single",
|
|
76855
|
+
optional: false
|
|
76856
|
+
}],
|
|
76857
|
+
"records.deleteWhere": [{
|
|
76858
|
+
name: "deviceId",
|
|
76859
|
+
form: "single",
|
|
76860
|
+
optional: true
|
|
76861
|
+
}],
|
|
76862
|
+
"records.histogram": [{
|
|
76863
|
+
name: "deviceId",
|
|
76864
|
+
form: "single",
|
|
76865
|
+
optional: true
|
|
76866
|
+
}],
|
|
76867
|
+
"records.putMany": [{
|
|
76868
|
+
name: "records",
|
|
76869
|
+
form: "object-array",
|
|
76870
|
+
optional: false,
|
|
76871
|
+
itemField: "deviceId"
|
|
76872
|
+
}],
|
|
76873
|
+
"records.query": [{
|
|
76874
|
+
name: "deviceId",
|
|
76875
|
+
form: "single",
|
|
76876
|
+
optional: true
|
|
76877
|
+
}],
|
|
76163
76878
|
"sceneMonitor.captureReference": [{
|
|
76164
76879
|
name: "deviceId",
|
|
76165
76880
|
form: "single",
|
|
@@ -76276,6 +76991,17 @@ Object.freeze({
|
|
|
76276
76991
|
form: "single",
|
|
76277
76992
|
optional: false
|
|
76278
76993
|
}],
|
|
76994
|
+
"storageAdmin.adoptRecords": [{
|
|
76995
|
+
name: "records",
|
|
76996
|
+
form: "object-array",
|
|
76997
|
+
optional: false,
|
|
76998
|
+
itemField: "deviceId"
|
|
76999
|
+
}],
|
|
77000
|
+
"storageAdmin.readRecords": [{
|
|
77001
|
+
name: "deviceId",
|
|
77002
|
+
form: "single",
|
|
77003
|
+
optional: true
|
|
77004
|
+
}],
|
|
76279
77005
|
"streamBroker.acquireEgressTranscode": [{
|
|
76280
77006
|
name: "deviceId",
|
|
76281
77007
|
form: "single",
|