@camstack/addon-osd-manager 0.1.193 → 0.1.195
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/{MotionZonesSettings-DA6kMhDo.mjs → MotionZonesSettings-DUltQQw1.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-yu64qorr.mjs → PrivacyMaskSettings-xC6YrNM-.mjs} +4 -4
- package/dist/{SceneMonitorEditor-BDPE-kLF.mjs → SceneMonitorEditor-DKN2cL7k.mjs} +3 -3
- package/dist/_stub.js +15 -15
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-CoX8JVLh.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-Dc37FMGl.mjs} +4 -4
- package/dist/{_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.js-B_4MkXHU.mjs → _virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.js-BdjiJb9r.mjs} +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CGoq0DWk.mjs +26 -0
- package/dist/addon-osd-manager.css +1 -1
- package/dist/{hostInit-DhwSWrE7.mjs → hostInit-ZAC0xO0l.mjs} +3 -3
- package/dist/index.js +1766 -148
- package/dist/index.mjs +1766 -148
- package/dist/{player-overlays-yo3byY33.mjs → player-overlays-TxRsHixk.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-DManlL_B.mjs → responsive-t3UayeQT.mjs} +1 -1
- package/dist/{scene-monitor-copy-D3DDVyfO.mjs → scene-monitor-copy-gMmaT-FC.mjs} +1 -1
- package/dist/{square-Cez2ojTo.mjs → square-B_CvlH_T.mjs} +1 -1
- package/dist/{trash-2-Dfdmc9go.mjs → trash-2-BfeGf6tH.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-CEE9ag27.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-BDKNKFu-.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Bn-J0B4D.mjs +0 -26
package/dist/index.js
CHANGED
|
@@ -5380,7 +5380,7 @@ var ZodIssueCode = {
|
|
|
5380
5380
|
var ZodFirstPartyTypeKind;
|
|
5381
5381
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5382
5382
|
//#endregion
|
|
5383
|
-
//#region ../types/dist/sleep-
|
|
5383
|
+
//#region ../types/dist/sleep-r3RWkGVx.mjs
|
|
5384
5384
|
/**
|
|
5385
5385
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5386
5386
|
* window to float samples (D455).
|
|
@@ -5497,7 +5497,7 @@ function isKeychainStoredField(field) {
|
|
|
5497
5497
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5498
5498
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5499
5499
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5500
|
-
function isRecord$
|
|
5500
|
+
function isRecord$2(value) {
|
|
5501
5501
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5502
5502
|
}
|
|
5503
5503
|
function makeSecretMarker(ref) {
|
|
@@ -5508,12 +5508,12 @@ function makeSecretMarker(ref) {
|
|
|
5508
5508
|
}
|
|
5509
5509
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5510
5510
|
function isSecretMarker(value) {
|
|
5511
|
-
if (!isRecord$
|
|
5511
|
+
if (!isRecord$2(value)) return false;
|
|
5512
5512
|
const ref = value["$secret"];
|
|
5513
5513
|
return typeof ref === "string" && ref.length > 0;
|
|
5514
5514
|
}
|
|
5515
5515
|
function isSecretClear(value) {
|
|
5516
|
-
return isRecord$
|
|
5516
|
+
return isRecord$2(value) && value["$secretClear"] === true;
|
|
5517
5517
|
}
|
|
5518
5518
|
/**
|
|
5519
5519
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6029,6 +6029,13 @@ function globalSecretScope() {
|
|
|
6029
6029
|
function encodeSegment(value) {
|
|
6030
6030
|
return encodeURIComponent(value);
|
|
6031
6031
|
}
|
|
6032
|
+
function decodeSegment(value) {
|
|
6033
|
+
try {
|
|
6034
|
+
return decodeURIComponent(value);
|
|
6035
|
+
} catch {
|
|
6036
|
+
return null;
|
|
6037
|
+
}
|
|
6038
|
+
}
|
|
6032
6039
|
/**
|
|
6033
6040
|
* The field path of a value inside an array item, addressed by the item's id:
|
|
6034
6041
|
* `arrayItemFieldPath('providers', 'authentik', 'clientSecret')` →
|
|
@@ -6037,6 +6044,75 @@ function encodeSegment(value) {
|
|
|
6037
6044
|
function arrayItemFieldPath(arrayKey, itemId, fieldKey) {
|
|
6038
6045
|
return `${arrayKey}[${encodeSegment(itemId)}].${fieldKey}`;
|
|
6039
6046
|
}
|
|
6047
|
+
function parseScope(segments) {
|
|
6048
|
+
switch (segments[0]) {
|
|
6049
|
+
case "global": return {
|
|
6050
|
+
scope: GLOBAL_SCOPE,
|
|
6051
|
+
used: 1
|
|
6052
|
+
};
|
|
6053
|
+
case "node": {
|
|
6054
|
+
const nodeId = segments[1] !== void 0 ? decodeSegment(segments[1]) : null;
|
|
6055
|
+
return nodeId === null || nodeId.length === 0 ? null : {
|
|
6056
|
+
scope: {
|
|
6057
|
+
kind: "node",
|
|
6058
|
+
nodeId
|
|
6059
|
+
},
|
|
6060
|
+
used: 2
|
|
6061
|
+
};
|
|
6062
|
+
}
|
|
6063
|
+
case "device": {
|
|
6064
|
+
const raw = segments[1];
|
|
6065
|
+
if (raw === void 0 || !/^\d+$/.test(raw)) return null;
|
|
6066
|
+
return {
|
|
6067
|
+
scope: {
|
|
6068
|
+
kind: "device",
|
|
6069
|
+
deviceId: Number(raw)
|
|
6070
|
+
},
|
|
6071
|
+
used: 2
|
|
6072
|
+
};
|
|
6073
|
+
}
|
|
6074
|
+
case "integration": {
|
|
6075
|
+
const id = segments[1] !== void 0 ? decodeSegment(segments[1]) : null;
|
|
6076
|
+
return id === null || id.length === 0 ? null : {
|
|
6077
|
+
scope: {
|
|
6078
|
+
kind: "integration",
|
|
6079
|
+
integrationId: id
|
|
6080
|
+
},
|
|
6081
|
+
used: 2
|
|
6082
|
+
};
|
|
6083
|
+
}
|
|
6084
|
+
case "row": {
|
|
6085
|
+
const collection = segments[1] !== void 0 ? decodeSegment(segments[1]) : null;
|
|
6086
|
+
const rowId = segments[2] !== void 0 ? decodeSegment(segments[2]) : null;
|
|
6087
|
+
if (collection === null || rowId === null || collection.length === 0 || rowId.length === 0) return null;
|
|
6088
|
+
return {
|
|
6089
|
+
scope: {
|
|
6090
|
+
kind: "row",
|
|
6091
|
+
collection,
|
|
6092
|
+
rowId
|
|
6093
|
+
},
|
|
6094
|
+
used: 3
|
|
6095
|
+
};
|
|
6096
|
+
}
|
|
6097
|
+
default: return null;
|
|
6098
|
+
}
|
|
6099
|
+
}
|
|
6100
|
+
/** Take a ref apart; `null` when it is not a well-formed ref. */
|
|
6101
|
+
function parseSecretRef(ref) {
|
|
6102
|
+
if (!ref.startsWith("secret://")) return null;
|
|
6103
|
+
const segments = ref.slice(9).split("/");
|
|
6104
|
+
const owner = segments[0] !== void 0 ? decodeSegment(segments[0]) : null;
|
|
6105
|
+
if (owner === null || owner.length === 0) return null;
|
|
6106
|
+
const parsed = parseScope(segments.slice(1));
|
|
6107
|
+
if (parsed === null) return null;
|
|
6108
|
+
const fieldPath = segments.slice(1 + parsed.used).join("/");
|
|
6109
|
+
if (fieldPath.length === 0) return null;
|
|
6110
|
+
return {
|
|
6111
|
+
owner,
|
|
6112
|
+
scope: parsed.scope,
|
|
6113
|
+
fieldPath
|
|
6114
|
+
};
|
|
6115
|
+
}
|
|
6040
6116
|
/** A write to a secret path could not be stored in the keychain, so it was refused. */
|
|
6041
6117
|
var KeychainWriteRefusedError = class extends Error {
|
|
6042
6118
|
fieldPath;
|
|
@@ -6047,7 +6123,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6047
6123
|
}
|
|
6048
6124
|
};
|
|
6049
6125
|
var KEEP = { kind: "keep" };
|
|
6050
|
-
function isRecord(value) {
|
|
6126
|
+
function isRecord$1(value) {
|
|
6051
6127
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6052
6128
|
}
|
|
6053
6129
|
function defaultMintId() {
|
|
@@ -6060,7 +6136,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6060
6136
|
return out;
|
|
6061
6137
|
}
|
|
6062
6138
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6063
|
-
else if (isRecord(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6139
|
+
else if (isRecord$1(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6064
6140
|
return out;
|
|
6065
6141
|
}
|
|
6066
6142
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6115,7 +6191,7 @@ function rowId(row, idKey) {
|
|
|
6115
6191
|
return null;
|
|
6116
6192
|
}
|
|
6117
6193
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6118
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord) : [];
|
|
6194
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$1) : [];
|
|
6119
6195
|
if (!Array.isArray(incoming)) {
|
|
6120
6196
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6121
6197
|
return {
|
|
@@ -6131,7 +6207,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6131
6207
|
const kept = /* @__PURE__ */ new Set();
|
|
6132
6208
|
const rows = [];
|
|
6133
6209
|
for (const row of incoming) {
|
|
6134
|
-
if (!isRecord(row)) {
|
|
6210
|
+
if (!isRecord$1(row)) {
|
|
6135
6211
|
rows.push(row);
|
|
6136
6212
|
continue;
|
|
6137
6213
|
}
|
|
@@ -6156,7 +6232,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6156
6232
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6157
6233
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6158
6234
|
case "object": {
|
|
6159
|
-
if (!isRecord(incoming)) {
|
|
6235
|
+
if (!isRecord$1(incoming)) {
|
|
6160
6236
|
if (incoming === void 0) return KEEP;
|
|
6161
6237
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6162
6238
|
return {
|
|
@@ -6164,7 +6240,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6164
6240
|
value: incoming
|
|
6165
6241
|
};
|
|
6166
6242
|
}
|
|
6167
|
-
const storedObj = isRecord(stored) ? stored : {};
|
|
6243
|
+
const storedObj = isRecord$1(stored) ? stored : {};
|
|
6168
6244
|
return {
|
|
6169
6245
|
kind: "value",
|
|
6170
6246
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6223,12 +6299,19 @@ async function transformSecretWrite(input) {
|
|
|
6223
6299
|
}
|
|
6224
6300
|
};
|
|
6225
6301
|
}
|
|
6302
|
+
/** Is `ref` one of `owner`'s refs? */
|
|
6303
|
+
function isSecretRefOwnedBy(ref, owner) {
|
|
6304
|
+
return parseSecretRef(ref)?.owner === owner;
|
|
6305
|
+
}
|
|
6226
6306
|
/**
|
|
6227
6307
|
* Replace every marker in `value` with its keychain value. Returns the SAME
|
|
6228
6308
|
* reference when there is no marker (no allocation, no keychain call).
|
|
6229
6309
|
*/
|
|
6230
|
-
async function resolveSecretMarkers(value, secrets) {
|
|
6231
|
-
const
|
|
6310
|
+
async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
6311
|
+
const keepMarker = options.unresolved === "keep-marker";
|
|
6312
|
+
const owner = options.ownedBy;
|
|
6313
|
+
const inScope = (ref) => owner === void 0 || isSecretRefOwnedBy(ref, owner);
|
|
6314
|
+
const refs = collectSecretMarkerRefs(value).filter(inScope);
|
|
6232
6315
|
if (refs.length === 0) return {
|
|
6233
6316
|
value,
|
|
6234
6317
|
unresolved: []
|
|
@@ -6252,10 +6335,18 @@ async function resolveSecretMarkers(value, secrets) {
|
|
|
6252
6335
|
}
|
|
6253
6336
|
const substitute = (v) => {
|
|
6254
6337
|
if (isSecretMarker(v)) {
|
|
6338
|
+
if (!inScope(v.$secret)) return {
|
|
6339
|
+
keep: true,
|
|
6340
|
+
value: v
|
|
6341
|
+
};
|
|
6255
6342
|
const answer = answers[v.$secret];
|
|
6256
|
-
|
|
6343
|
+
if (answer?.kind === "value") return {
|
|
6257
6344
|
keep: true,
|
|
6258
6345
|
value: answer.value
|
|
6346
|
+
};
|
|
6347
|
+
return keepMarker ? {
|
|
6348
|
+
keep: true,
|
|
6349
|
+
value: v
|
|
6259
6350
|
} : {
|
|
6260
6351
|
keep: false,
|
|
6261
6352
|
value: void 0
|
|
@@ -6272,7 +6363,7 @@ async function resolveSecretMarkers(value, secrets) {
|
|
|
6272
6363
|
value: items
|
|
6273
6364
|
};
|
|
6274
6365
|
}
|
|
6275
|
-
if (isRecord(v)) {
|
|
6366
|
+
if (isRecord$1(v)) {
|
|
6276
6367
|
const out = {};
|
|
6277
6368
|
for (const [k, child] of Object.entries(v)) {
|
|
6278
6369
|
const s = substitute(child);
|
|
@@ -6293,14 +6384,152 @@ async function resolveSecretMarkers(value, secrets) {
|
|
|
6293
6384
|
unresolved
|
|
6294
6385
|
};
|
|
6295
6386
|
}
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6387
|
+
/** An addon tried to replace a stored secret it could not read. Nothing was written. */
|
|
6388
|
+
var SecretOverwriteRefusedError = class extends Error {
|
|
6389
|
+
ref;
|
|
6390
|
+
reason;
|
|
6391
|
+
constructor(ref, reason) {
|
|
6392
|
+
super(`secret ${ref} was not replaced: its stored value cannot be read right now (${reason}), and an addon may not overwrite a secret it cannot see. Nothing was written.`);
|
|
6393
|
+
this.ref = ref;
|
|
6394
|
+
this.reason = reason;
|
|
6395
|
+
this.name = "SecretOverwriteRefusedError";
|
|
6396
|
+
}
|
|
6397
|
+
};
|
|
6398
|
+
function isRecord(value) {
|
|
6399
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6400
|
+
}
|
|
6401
|
+
function resolvedValue(pass, marker) {
|
|
6402
|
+
const answer = pass.answers[marker.$secret];
|
|
6403
|
+
return answer?.kind === "value" ? answer.value : null;
|
|
6404
|
+
}
|
|
6405
|
+
async function atMarker(pass, incoming, stored) {
|
|
6406
|
+
if (incoming === null) return stored;
|
|
6407
|
+
if (typeof incoming !== "string") return incoming;
|
|
6408
|
+
if (incoming === resolvedValue(pass, stored)) return stored;
|
|
6409
|
+
const intent = classifySecretWrite(incoming);
|
|
6410
|
+
if (intent.kind !== "set") return stored;
|
|
6411
|
+
const ref = stored.$secret;
|
|
6412
|
+
if (!isSecretRefOwnedBy(ref, pass.secrets.owner)) return incoming;
|
|
6413
|
+
const answer = pass.answers[ref];
|
|
6414
|
+
if ((answer === void 0 || answer.kind === "unavailable" || answer.kind === "forbidden") && !pass.operatorWrite) throw new SecretOverwriteRefusedError(ref, answer === void 0 ? "not-initialized" : answer.kind === "unavailable" ? answer.reason : answer.kind);
|
|
6415
|
+
try {
|
|
6416
|
+
await pass.secrets.put(ref, intent.value);
|
|
6417
|
+
} catch (err) {
|
|
6418
|
+
throw new KeychainWriteRefusedError(ref, err);
|
|
6419
|
+
}
|
|
6420
|
+
pass.changedRefs.push(ref);
|
|
6421
|
+
return stored;
|
|
6422
|
+
}
|
|
6423
|
+
function inArray(pass, incoming, stored) {
|
|
6424
|
+
return incoming.map((item, index) => {
|
|
6425
|
+
const twin = stored[index];
|
|
6426
|
+
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6427
|
+
if (isRecord(item) && isRecord(twin)) return inArrayRow(pass, item, twin);
|
|
6428
|
+
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6429
|
+
return item;
|
|
6430
|
+
});
|
|
6431
|
+
}
|
|
6432
|
+
function inArrayRow(pass, incoming, stored) {
|
|
6433
|
+
const out = { ...incoming };
|
|
6434
|
+
for (const [key, value] of Object.entries(incoming)) {
|
|
6435
|
+
const twin = stored[key];
|
|
6436
|
+
if (isSecretMarker(twin)) {
|
|
6437
|
+
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6438
|
+
} else if (isRecord(value) && isRecord(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6439
|
+
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6440
|
+
}
|
|
6441
|
+
return out;
|
|
6442
|
+
}
|
|
6443
|
+
async function walk$1(pass, incoming, stored) {
|
|
6444
|
+
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6445
|
+
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6446
|
+
if (!isRecord(incoming) || !isRecord(stored)) return incoming;
|
|
6447
|
+
const out = { ...incoming };
|
|
6448
|
+
for (const [key, value] of Object.entries(incoming)) out[key] = await walk$1(pass, value, stored[key]);
|
|
6449
|
+
return out;
|
|
6450
|
+
}
|
|
6451
|
+
/** Restore markers a write-back carries as values. See the file doc. */
|
|
6452
|
+
async function restoreUnchangedSecrets(input) {
|
|
6453
|
+
const refs = [];
|
|
6454
|
+
for (const key of Object.keys(input.patch)) collectSecretMarkerRefs(input.stored[key], refs);
|
|
6455
|
+
const owned = refs.filter((ref) => isSecretRefOwnedBy(ref, input.secrets.owner));
|
|
6456
|
+
if (owned.length === 0) return {
|
|
6457
|
+
patch: input.patch,
|
|
6458
|
+
changedRefs: []
|
|
6459
|
+
};
|
|
6460
|
+
const pass = {
|
|
6461
|
+
secrets: input.secrets,
|
|
6462
|
+
answers: await input.secrets.resolve([...new Set(owned)]),
|
|
6463
|
+
operatorWrite: input.operatorWrite,
|
|
6464
|
+
changedRefs: []
|
|
6465
|
+
};
|
|
6466
|
+
const out = {};
|
|
6467
|
+
for (const [key, value] of Object.entries(input.patch)) out[key] = await walk$1(pass, value, input.stored[key]);
|
|
6468
|
+
return {
|
|
6469
|
+
patch: out,
|
|
6470
|
+
changedRefs: pass.changedRefs
|
|
6471
|
+
};
|
|
6472
|
+
}
|
|
6473
|
+
/** Structural equality over JSON-shaped values (key order does not matter). */
|
|
6474
|
+
function isJsonEqual(a, b) {
|
|
6475
|
+
if (Object.is(a, b)) return true;
|
|
6476
|
+
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6477
|
+
if (isRecord(a) && isRecord(b)) {
|
|
6478
|
+
const keys = Object.keys(a);
|
|
6479
|
+
if (keys.length !== Object.keys(b).length) return false;
|
|
6480
|
+
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
6301
6481
|
}
|
|
6302
6482
|
return false;
|
|
6303
6483
|
}
|
|
6484
|
+
/** The patch without the keys whose value already equals the stored one. */
|
|
6485
|
+
function dropUnchangedKeys(patch, stored) {
|
|
6486
|
+
const out = {};
|
|
6487
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
6488
|
+
if (Object.prototype.hasOwnProperty.call(stored, key) && isJsonEqual(value, stored[key])) continue;
|
|
6489
|
+
out[key] = value;
|
|
6490
|
+
}
|
|
6491
|
+
return out;
|
|
6492
|
+
}
|
|
6493
|
+
/** The top-level keys of a blob that hold at least one of `owner`'s markers. */
|
|
6494
|
+
function markerKeysOf(blob, owner) {
|
|
6495
|
+
const keys = /* @__PURE__ */ new Set();
|
|
6496
|
+
for (const [key, value] of Object.entries(blob)) if (collectSecretMarkerRefs(value).some((ref) => isSecretRefOwnedBy(ref, owner))) keys.add(key);
|
|
6497
|
+
return keys;
|
|
6498
|
+
}
|
|
6499
|
+
function nodeFromStored(value, owner) {
|
|
6500
|
+
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6501
|
+
if (!isRecord(value)) return null;
|
|
6502
|
+
const children = /* @__PURE__ */ new Map();
|
|
6503
|
+
for (const [key, child] of Object.entries(value)) {
|
|
6504
|
+
const node = nodeFromStored(child, owner);
|
|
6505
|
+
if (node !== null) children.set(key, node);
|
|
6506
|
+
}
|
|
6507
|
+
return children.size > 0 ? {
|
|
6508
|
+
kind: "object",
|
|
6509
|
+
children
|
|
6510
|
+
} : null;
|
|
6511
|
+
}
|
|
6512
|
+
/**
|
|
6513
|
+
* The declared secret tree, widened by every place the STORED blob holds a
|
|
6514
|
+
* marker under one of `keys` — so a marker the schema no longer declares (or
|
|
6515
|
+
* never declared: Wyze before b4906cec6) still gets the save path's
|
|
6516
|
+
* KEEP / SET / CLEAR semantics instead of being overwritten by whatever the
|
|
6517
|
+
* addon writes. Markers inside arrays are not added: a row has no id field to
|
|
6518
|
+
* match by unless the schema declares one. Only `owner`'s markers count: a
|
|
6519
|
+
* builtin that keeps another addon's marker (device-manager) never takes it
|
|
6520
|
+
* over.
|
|
6521
|
+
*/
|
|
6522
|
+
function widenTreeWithStoredMarkers(declared, stored, keys, owner) {
|
|
6523
|
+
const added = /* @__PURE__ */ new Map();
|
|
6524
|
+
for (const key of keys) {
|
|
6525
|
+
const at = key.indexOf("@");
|
|
6526
|
+
const base = at > 0 ? key.slice(0, at) : key;
|
|
6527
|
+
if (declared.has(base) || added.has(base)) continue;
|
|
6528
|
+
const node = nodeFromStored(stored[key], owner);
|
|
6529
|
+
if (node !== null) added.set(base, node);
|
|
6530
|
+
}
|
|
6531
|
+
return added.size === 0 ? declared : new Map([...declared, ...added]);
|
|
6532
|
+
}
|
|
6304
6533
|
/** The blob as stored now; a failed read REFUSES the write instead of guessing. */
|
|
6305
6534
|
async function readStoredAddonBlob(raw) {
|
|
6306
6535
|
const threeWay = raw.readAddonStoreResult;
|
|
@@ -6309,7 +6538,41 @@ async function readStoredAddonBlob(raw) {
|
|
|
6309
6538
|
if (result.kind === "failed") throw new Error(`settings write refused: the stored blob could not be read (${result.error})`);
|
|
6310
6539
|
return result.kind === "missing" ? {} : result.value;
|
|
6311
6540
|
}
|
|
6312
|
-
function
|
|
6541
|
+
function touchesTree(tree, patch) {
|
|
6542
|
+
if (tree.size === 0) return false;
|
|
6543
|
+
for (const key of Object.keys(patch)) {
|
|
6544
|
+
const at = key.indexOf("@");
|
|
6545
|
+
if (tree.has(at > 0 ? key.slice(0, at) : key)) return true;
|
|
6546
|
+
}
|
|
6547
|
+
return false;
|
|
6548
|
+
}
|
|
6549
|
+
/**
|
|
6550
|
+
* Which top-level keys of each store held markers when last seen. `undefined`
|
|
6551
|
+
* for a store not seen yet: its first write reads it, to be safe.
|
|
6552
|
+
*/
|
|
6553
|
+
var MarkerKeyIndex = class {
|
|
6554
|
+
owner;
|
|
6555
|
+
byStore = /* @__PURE__ */ new Map();
|
|
6556
|
+
constructor(owner) {
|
|
6557
|
+
this.owner = owner;
|
|
6558
|
+
}
|
|
6559
|
+
seen(store, blob) {
|
|
6560
|
+
this.byStore.set(store, markerKeysOf(blob, this.owner));
|
|
6561
|
+
}
|
|
6562
|
+
wrote(store, patch) {
|
|
6563
|
+
const keys = this.byStore.get(store);
|
|
6564
|
+
if (keys === void 0) return;
|
|
6565
|
+
const now = markerKeysOf(patch, this.owner);
|
|
6566
|
+
for (const key of Object.keys(patch)) if (now.has(key)) keys.add(key);
|
|
6567
|
+
else keys.delete(key);
|
|
6568
|
+
}
|
|
6569
|
+
mayHoldMarkers(store, patch) {
|
|
6570
|
+
const keys = this.byStore.get(store);
|
|
6571
|
+
if (keys === void 0) return true;
|
|
6572
|
+
return Object.keys(patch).some((key) => keys.has(key));
|
|
6573
|
+
}
|
|
6574
|
+
};
|
|
6575
|
+
function createHandle(raw, opts) {
|
|
6313
6576
|
const chains = /* @__PURE__ */ new Map();
|
|
6314
6577
|
const serialize = (key, fn) => {
|
|
6315
6578
|
const next = (chains.get(key) ?? Promise.resolve()).then(fn, fn);
|
|
@@ -6320,46 +6583,130 @@ function createSecretAwareSettings(raw, opts) {
|
|
|
6320
6583
|
});
|
|
6321
6584
|
return next;
|
|
6322
6585
|
};
|
|
6323
|
-
const
|
|
6324
|
-
|
|
6325
|
-
|
|
6586
|
+
const index = new MarkerKeyIndex(opts.secrets.owner);
|
|
6587
|
+
const resolveRead = async (store, blob) => {
|
|
6588
|
+
index.seen(store, blob);
|
|
6589
|
+
const { value, unresolved } = await resolveSecretMarkers(blob, opts.secrets, {
|
|
6590
|
+
unresolved: "keep-marker",
|
|
6591
|
+
ownedBy: opts.secrets.owner
|
|
6592
|
+
});
|
|
6593
|
+
if (unresolved.length > 0) opts.onUnresolved?.(unresolved);
|
|
6594
|
+
return value;
|
|
6595
|
+
};
|
|
6596
|
+
const write = async (store, declared, scope, patch, readStored, rawWrite) => {
|
|
6597
|
+
if (!touchesTree(declared, patch) && !index.mayHoldMarkers(store, patch)) {
|
|
6598
|
+
await rawWrite(patch);
|
|
6599
|
+
index.wrote(store, patch);
|
|
6600
|
+
return { changed: true };
|
|
6601
|
+
}
|
|
6602
|
+
return serialize(store, async () => {
|
|
6326
6603
|
const stored = await readStored();
|
|
6604
|
+
index.seen(store, stored);
|
|
6605
|
+
const operatorWrite = opts.isOperatorWrite?.() === true;
|
|
6606
|
+
const restored = await restoreUnchangedSecrets({
|
|
6607
|
+
patch,
|
|
6608
|
+
stored,
|
|
6609
|
+
secrets: opts.secrets,
|
|
6610
|
+
operatorWrite
|
|
6611
|
+
});
|
|
6327
6612
|
const result = await transformSecretWrite({
|
|
6328
|
-
tree,
|
|
6613
|
+
tree: widenTreeWithStoredMarkers(declared, stored, Object.keys(restored.patch), opts.secrets.owner),
|
|
6329
6614
|
secrets: opts.secrets,
|
|
6330
|
-
patch,
|
|
6615
|
+
patch: restored.patch,
|
|
6331
6616
|
stored,
|
|
6332
6617
|
...scope !== void 0 ? { scope } : {},
|
|
6333
|
-
operatorWrite
|
|
6618
|
+
operatorWrite
|
|
6334
6619
|
});
|
|
6335
|
-
|
|
6620
|
+
const effective = dropUnchangedKeys(result.patch, stored);
|
|
6621
|
+
const wroteBlob = Object.keys(effective).length > 0;
|
|
6622
|
+
if (wroteBlob) {
|
|
6623
|
+
await rawWrite(effective);
|
|
6624
|
+
index.wrote(store, effective);
|
|
6625
|
+
}
|
|
6336
6626
|
const { orphaned } = await result.afterWrite();
|
|
6337
6627
|
if (orphaned.length > 0) opts.onOrphaned(orphaned);
|
|
6628
|
+
return { changed: wroteBlob || restored.changedRefs.length > 0 };
|
|
6338
6629
|
});
|
|
6339
6630
|
};
|
|
6340
|
-
const
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6631
|
+
const writeAddon = (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p));
|
|
6632
|
+
const readAddonStoreResult = raw.readAddonStoreResult;
|
|
6633
|
+
const readAddonStoreKeyResult = raw.readAddonStoreKeyResult;
|
|
6634
|
+
const readDeviceStoreBatch = raw.readDeviceStoreBatch;
|
|
6635
|
+
const overrides = {
|
|
6636
|
+
readAddonStore: async () => resolveRead("addon", await raw.readAddonStore()),
|
|
6637
|
+
...readAddonStoreResult !== void 0 ? { readAddonStoreResult: async () => {
|
|
6638
|
+
const result = await readAddonStoreResult.call(raw);
|
|
6639
|
+
return result.kind === "value" ? {
|
|
6640
|
+
kind: "value",
|
|
6641
|
+
value: await resolveRead("addon", result.value)
|
|
6642
|
+
} : result;
|
|
6643
|
+
} } : {},
|
|
6644
|
+
...readAddonStoreKeyResult !== void 0 ? { readAddonStoreKeyResult: async (key) => {
|
|
6645
|
+
const result = await readAddonStoreKeyResult.call(raw, key);
|
|
6646
|
+
if (result.kind !== "present") return result;
|
|
6647
|
+
const { value, unresolved } = await resolveSecretMarkers({ [key]: result.value }, opts.secrets, {
|
|
6648
|
+
unresolved: "keep-marker",
|
|
6649
|
+
ownedBy: opts.secrets.owner
|
|
6650
|
+
});
|
|
6651
|
+
if (unresolved.length > 0) opts.onUnresolved?.(unresolved);
|
|
6652
|
+
return {
|
|
6653
|
+
kind: "present",
|
|
6654
|
+
value: value[key]
|
|
6655
|
+
};
|
|
6656
|
+
} } : {},
|
|
6657
|
+
readDeviceStore: async (deviceId) => resolveRead(`device:${deviceId}`, await raw.readDeviceStore(deviceId)),
|
|
6658
|
+
...readDeviceStoreBatch !== void 0 ? { readDeviceStoreBatch: async (deviceIds) => {
|
|
6659
|
+
const rows = await readDeviceStoreBatch.call(raw, deviceIds);
|
|
6660
|
+
const out = /* @__PURE__ */ new Map();
|
|
6661
|
+
for (const [deviceId, blob] of rows) out.set(deviceId, await resolveRead(`device:${deviceId}`, blob));
|
|
6662
|
+
return out;
|
|
6663
|
+
} } : {},
|
|
6664
|
+
writeAddonStore: async (patch) => {
|
|
6665
|
+
await writeAddon(patch);
|
|
6666
|
+
},
|
|
6667
|
+
writeDeviceStore: async (deviceId, patch) => {
|
|
6668
|
+
await write(`device:${deviceId}`, opts.deviceTree(), {
|
|
6669
|
+
kind: "device",
|
|
6670
|
+
deviceId
|
|
6671
|
+
}, patch, () => raw.readDeviceStore(deviceId), (p) => raw.writeDeviceStore(deviceId, p));
|
|
6672
|
+
}
|
|
6673
|
+
};
|
|
6674
|
+
return {
|
|
6675
|
+
settings: new Proxy(raw, { get(target, prop, receiver) {
|
|
6676
|
+
if (typeof prop === "string" && Object.prototype.hasOwnProperty.call(overrides, prop)) return Reflect.get(overrides, prop);
|
|
6677
|
+
const value = Reflect.get(target, prop, receiver);
|
|
6678
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
6679
|
+
} }),
|
|
6680
|
+
raw: {
|
|
6681
|
+
readAddonStore: async () => {
|
|
6682
|
+
const blob = await raw.readAddonStore();
|
|
6683
|
+
index.seen("addon", blob);
|
|
6684
|
+
return blob;
|
|
6685
|
+
},
|
|
6686
|
+
readDeviceStore: async (deviceId) => {
|
|
6687
|
+
const blob = await raw.readDeviceStore(deviceId);
|
|
6688
|
+
index.seen(`device:${deviceId}`, blob);
|
|
6689
|
+
return blob;
|
|
6690
|
+
}
|
|
6691
|
+
},
|
|
6692
|
+
writeAddonStore: writeAddon
|
|
6346
6693
|
};
|
|
6347
|
-
return new Proxy(raw, { get(target, prop, receiver) {
|
|
6348
|
-
if (prop === "writeAddonStore") return wrapped.writeAddonStore;
|
|
6349
|
-
if (prop === "writeDeviceStore") return wrapped.writeDeviceStore;
|
|
6350
|
-
const value = Reflect.get(target, prop, receiver);
|
|
6351
|
-
return typeof value === "function" ? value.bind(target) : value;
|
|
6352
|
-
} });
|
|
6353
6694
|
}
|
|
6354
|
-
/** The context the addon sees
|
|
6355
|
-
function
|
|
6695
|
+
/** The context the addon sees, plus the private raw view and write outcome. */
|
|
6696
|
+
function createSecretAwareContext(context, opts) {
|
|
6356
6697
|
const raw = context.settings;
|
|
6357
|
-
if (raw === void 0) return
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6698
|
+
if (raw === void 0) return {
|
|
6699
|
+
context,
|
|
6700
|
+
handle: null
|
|
6701
|
+
};
|
|
6702
|
+
const handle = createHandle(raw, opts);
|
|
6703
|
+
return {
|
|
6704
|
+
context: new Proxy(context, { get(target, prop, receiver) {
|
|
6705
|
+
if (prop === "settings") return handle.settings;
|
|
6706
|
+
return Reflect.get(target, prop, receiver);
|
|
6707
|
+
} }),
|
|
6708
|
+
handle
|
|
6709
|
+
};
|
|
6363
6710
|
}
|
|
6364
6711
|
var LEAF = { kind: "leaf" };
|
|
6365
6712
|
var DEFAULT_ITEM_ID_KEY = "id";
|
|
@@ -6534,6 +6881,14 @@ var BaseAddon = class {
|
|
|
6534
6881
|
_secretChangeUnsub = null;
|
|
6535
6882
|
/** >0 while an OPERATOR's settings write is being applied. */
|
|
6536
6883
|
_operatorWriteDepth = 0;
|
|
6884
|
+
/**
|
|
6885
|
+
* The keychain-aware settings handle (D798). Its `raw` view is the ONLY way
|
|
6886
|
+
* to the marker-bearing blobs and stays private to this class: the form
|
|
6887
|
+
* hydrate and config resolution need markers, addon code never does.
|
|
6888
|
+
*/
|
|
6889
|
+
_secretSettings = null;
|
|
6890
|
+
/** Refs an addon-facing read could not resolve — each is logged once per process. */
|
|
6891
|
+
_loggedUnresolvedReads = /* @__PURE__ */ new Set();
|
|
6537
6892
|
constructor(defaults) {
|
|
6538
6893
|
this.defaults = defaults;
|
|
6539
6894
|
this._config = { ...defaults };
|
|
@@ -6570,13 +6925,21 @@ var BaseAddon = class {
|
|
|
6570
6925
|
}
|
|
6571
6926
|
async initialize(context) {
|
|
6572
6927
|
const secrets = context.secrets;
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6928
|
+
if (secrets !== void 0) {
|
|
6929
|
+
const { context: wrapped, handle } = createSecretAwareContext(context, {
|
|
6930
|
+
secrets,
|
|
6931
|
+
addonTree: () => this.addonSecretTree(),
|
|
6932
|
+
deviceTree: () => this.deviceSecretTree(),
|
|
6933
|
+
onOrphaned: (refs) => context.logger.warn("keychain refs dropped by a settings write could not be deleted", { meta: { refs: [...refs] } }),
|
|
6934
|
+
isOperatorWrite: () => this._operatorWriteDepth > 0,
|
|
6935
|
+
onUnresolved: (unresolved) => this.logUnresolvedRead(unresolved)
|
|
6936
|
+
});
|
|
6937
|
+
this._ctx = wrapped;
|
|
6938
|
+
this._secretSettings = handle;
|
|
6939
|
+
} else {
|
|
6940
|
+
this._ctx = context;
|
|
6941
|
+
this._secretSettings = null;
|
|
6942
|
+
}
|
|
6580
6943
|
await this.resolveConfig();
|
|
6581
6944
|
if (secrets !== void 0) this._secretChangeUnsub = secrets.onChange((ref) => {
|
|
6582
6945
|
if (this._configSecretRefs.has(ref)) this.scheduleSecretReresolve(SECRET_CHANGE_DEBOUNCE_MS);
|
|
@@ -6693,11 +7056,8 @@ var BaseAddon = class {
|
|
|
6693
7056
|
async getGlobalSettings(overlay, cap, nodeId) {
|
|
6694
7057
|
const schema = this.globalSettingsSchema(cap);
|
|
6695
7058
|
if (!schema) return { sections: [] };
|
|
6696
|
-
const projected = await this.
|
|
6697
|
-
return hydrateSchema(schema, overlay ? {
|
|
6698
|
-
...projected,
|
|
6699
|
-
...overlay
|
|
6700
|
-
} : projected, { inlineSecretsAsViews: true });
|
|
7059
|
+
const projected = await this.readRawProjectedStore(nodeId, cap);
|
|
7060
|
+
return hydrateSchema(schema, overlay ? await this.overlayKeepingMarkers(projected, overlay) : projected, { inlineSecretsAsViews: true });
|
|
6701
7061
|
}
|
|
6702
7062
|
/**
|
|
6703
7063
|
* The integration-level view of this addon's settings: exactly the sections
|
|
@@ -6742,7 +7102,7 @@ var BaseAddon = class {
|
|
|
6742
7102
|
});
|
|
6743
7103
|
}
|
|
6744
7104
|
if (sections.length === 0) return null;
|
|
6745
|
-
const projected = await this.
|
|
7105
|
+
const projected = await this.readRawProjectedStore(nodeId);
|
|
6746
7106
|
return hydrateSchema({
|
|
6747
7107
|
...schema,
|
|
6748
7108
|
sections
|
|
@@ -6759,12 +7119,50 @@ var BaseAddon = class {
|
|
|
6759
7119
|
* the store for custom option logic (option narrowing, value snapping) to
|
|
6760
7120
|
* read it per-node — never `ctx.settings.readAddonStore()` directly.
|
|
6761
7121
|
* `nodeId` omitted ⇒ the local node (node-blind injection from ctx).
|
|
7122
|
+
*
|
|
7123
|
+
* Keychain values come back RESOLVED (D798): a secret reads as its value,
|
|
7124
|
+
* never as a `{ $secret }` marker. One the keychain cannot serve right now
|
|
7125
|
+
* stays a marker — "stored, unavailable" (`isSecretMarker()` is true, and it
|
|
7126
|
+
* is listed in {@link unresolvedSecrets}) — never `''` and never absent, so
|
|
7127
|
+
* it cannot be mistaken for "nothing stored, mint a new one". Writing the
|
|
7128
|
+
* resolved blob back is a no-op for every unchanged secret.
|
|
6762
7129
|
*/
|
|
6763
7130
|
async resolveGlobalStore(nodeId, cap) {
|
|
6764
7131
|
const raw = await this._ctx?.settings?.readAddonStore() ?? {};
|
|
7132
|
+
return this.projectForNode(raw, nodeId, cap);
|
|
7133
|
+
}
|
|
7134
|
+
projectForNode(store, nodeId, cap) {
|
|
6765
7135
|
const keys = this.perNodeKeys(cap);
|
|
6766
7136
|
const node = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6767
|
-
return keys.size > 0 ? projectStore(
|
|
7137
|
+
return keys.size > 0 ? projectStore(store, keys, node) : store;
|
|
7138
|
+
}
|
|
7139
|
+
/** The PROJECTED store with its markers — the form hydrate only (D798). */
|
|
7140
|
+
async readRawProjectedStore(nodeId, cap) {
|
|
7141
|
+
const raw = await this.rawSettings()?.readAddonStore() ?? {};
|
|
7142
|
+
return this.projectForNode(raw, nodeId, cap);
|
|
7143
|
+
}
|
|
7144
|
+
/**
|
|
7145
|
+
* `{ ...stored, ...overlay }`, except that an overlay member equal to the
|
|
7146
|
+
* RESOLVED stored one keeps the stored (marker-bearing) member — so a form
|
|
7147
|
+
* hydrated from a resolved overlay still shows a secret as "set", never as
|
|
7148
|
+
* its value.
|
|
7149
|
+
*/
|
|
7150
|
+
async overlayKeepingMarkers(stored, overlay) {
|
|
7151
|
+
const secrets = this._ctx?.secrets;
|
|
7152
|
+
const merged = {
|
|
7153
|
+
...stored,
|
|
7154
|
+
...overlay
|
|
7155
|
+
};
|
|
7156
|
+
if (secrets === void 0 || collectSecretMarkerRefs(stored).length === 0) return merged;
|
|
7157
|
+
const { value: resolved } = await resolveSecretMarkers(stored, secrets, {
|
|
7158
|
+
unresolved: "keep-marker",
|
|
7159
|
+
ownedBy: secrets.owner
|
|
7160
|
+
});
|
|
7161
|
+
for (const key of Object.keys(overlay)) {
|
|
7162
|
+
if (collectSecretMarkerRefs(stored[key]).length === 0) continue;
|
|
7163
|
+
if (isJsonEqual(overlay[key], resolved[key])) merged[key] = stored[key];
|
|
7164
|
+
}
|
|
7165
|
+
return merged;
|
|
6768
7166
|
}
|
|
6769
7167
|
/**
|
|
6770
7168
|
* Whether ONE global key of this addon's store was written, read three-way
|
|
@@ -6829,8 +7227,12 @@ var BaseAddon = class {
|
|
|
6829
7227
|
async clearSecrets(keys, nodeId) {
|
|
6830
7228
|
const tree = this.addonSecretTree();
|
|
6831
7229
|
const keychain = this._ctx?.secrets !== void 0;
|
|
7230
|
+
const stored = keychain ? await this.readAddonStoreWithRetry() : {};
|
|
6832
7231
|
const patch = {};
|
|
6833
|
-
for (const key of keys)
|
|
7232
|
+
for (const key of keys) {
|
|
7233
|
+
const keychainStored = tree.has(key) || collectSecretMarkerRefs(stored[key]).length > 0;
|
|
7234
|
+
patch[key] = keychain && keychainStored ? SECRET_CLEAR : "";
|
|
7235
|
+
}
|
|
6834
7236
|
await this.applyGlobalPatch(patch, nodeId);
|
|
6835
7237
|
}
|
|
6836
7238
|
async applyGlobalPatch(barePatch, nodeId) {
|
|
@@ -6838,7 +7240,11 @@ var BaseAddon = class {
|
|
|
6838
7240
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6839
7241
|
const target = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6840
7242
|
const scoped = keys.size > 0 ? scopePatch(barePatch, keys, target) : barePatch;
|
|
6841
|
-
|
|
7243
|
+
const handle = this._secretSettings;
|
|
7244
|
+
if (handle !== null) {
|
|
7245
|
+
const { changed } = await handle.writeAddonStore(scoped);
|
|
7246
|
+
if (!changed) return;
|
|
7247
|
+
} else await this._ctx?.settings?.writeAddonStore(scoped);
|
|
6842
7248
|
if (target !== localNode) return;
|
|
6843
7249
|
await this.resolveConfig();
|
|
6844
7250
|
await this.onConfigChanged();
|
|
@@ -6891,7 +7297,7 @@ var BaseAddon = class {
|
|
|
6891
7297
|
async getDeviceSettings(deviceId) {
|
|
6892
7298
|
const schema = this.deviceSettingsSchema();
|
|
6893
7299
|
if (!schema) return { sections: [] };
|
|
6894
|
-
return hydrateSchema(schema, await this.
|
|
7300
|
+
return hydrateSchema(schema, await this.rawSettings()?.readDeviceStore(deviceId) ?? {}, { inlineSecretsAsViews: true });
|
|
6895
7301
|
}
|
|
6896
7302
|
async updateDeviceSettings(deviceId, patch) {
|
|
6897
7303
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
@@ -7063,7 +7469,7 @@ var BaseAddon = class {
|
|
|
7063
7469
|
key,
|
|
7064
7470
|
schema,
|
|
7065
7471
|
fallback,
|
|
7066
|
-
read: async () => this.resolveStoredSecrets(await this.
|
|
7472
|
+
read: async () => this.resolveStoredSecrets(await this.rawSettings()?.readDeviceStore(deviceId) ?? {}, false),
|
|
7067
7473
|
write: async (patch) => {
|
|
7068
7474
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
7069
7475
|
},
|
|
@@ -7125,6 +7531,23 @@ var BaseAddon = class {
|
|
|
7125
7531
|
}
|
|
7126
7532
|
return value;
|
|
7127
7533
|
}
|
|
7534
|
+
/**
|
|
7535
|
+
* The marker-bearing settings reads (D798) — private on purpose. Without a
|
|
7536
|
+
* keychain the context's own view is already raw.
|
|
7537
|
+
*/
|
|
7538
|
+
rawSettings() {
|
|
7539
|
+
return this._secretSettings?.raw ?? this._ctx?.settings;
|
|
7540
|
+
}
|
|
7541
|
+
/** An addon-facing read met markers it could not resolve: say so once per ref. */
|
|
7542
|
+
logUnresolvedRead(unresolved) {
|
|
7543
|
+
const fresh = unresolved.filter((u) => !this._loggedUnresolvedReads.has(u.ref));
|
|
7544
|
+
if (fresh.length === 0) return;
|
|
7545
|
+
for (const u of fresh) this._loggedUnresolvedReads.add(u.ref);
|
|
7546
|
+
this._ctx?.logger?.warn?.("settings read: a stored secret is unavailable — it reads as its marker, not as a value", { meta: { secrets: fresh.map((u) => ({
|
|
7547
|
+
ref: u.ref,
|
|
7548
|
+
reason: u.reason
|
|
7549
|
+
})) } });
|
|
7550
|
+
}
|
|
7128
7551
|
/** Re-resolve the config (a keychain-only change, or a retry) and apply it. */
|
|
7129
7552
|
scheduleSecretReresolve(delayMs) {
|
|
7130
7553
|
const timerOf = delayMs === SECRET_CHANGE_DEBOUNCE_MS ? "_secretChangeTimer" : "_secretRetryTimer";
|
|
@@ -7151,7 +7574,7 @@ var BaseAddon = class {
|
|
|
7151
7574
|
* `{}` (defaults) — the addon's first successful patch will rehydrate.
|
|
7152
7575
|
*/
|
|
7153
7576
|
async readAddonStoreWithRetry() {
|
|
7154
|
-
const settings = this.
|
|
7577
|
+
const settings = this.rawSettings();
|
|
7155
7578
|
if (!settings) return {};
|
|
7156
7579
|
const delaysMs = [
|
|
7157
7580
|
150,
|
|
@@ -9489,6 +9912,278 @@ var CameraSwitchGroupSchema = object({
|
|
|
9489
9912
|
fetchedAt: number()
|
|
9490
9913
|
});
|
|
9491
9914
|
/**
|
|
9915
|
+
* The trainer contract — what the hub hands the cloud trainer and what it
|
|
9916
|
+
* gets back (cloud training, D805+).
|
|
9917
|
+
*
|
|
9918
|
+
* The trainer (`hf/camstack-trainer`, published as the Hugging Face repo
|
|
9919
|
+
* `camstack/camstack-trainer`) is a separate AGPL program the hub never
|
|
9920
|
+
* imports: `job.json` goes in, files come out, and progress is `CAMSTACK_EVENT`
|
|
9921
|
+
* lines on stdout. These schemas are the hub's half of that boundary; the
|
|
9922
|
+
* trainer's pydantic models (and the JSON Schemas generated from them under
|
|
9923
|
+
* `hf/camstack-trainer/schemas/`) are the other half. A change here is a
|
|
9924
|
+
* change there, in the same piece of work.
|
|
9925
|
+
*
|
|
9926
|
+
* No `.default()` anywhere: defaults do not run on the addon cap path, so the
|
|
9927
|
+
* orchestrator fills every field of a job spec explicitly.
|
|
9928
|
+
*/
|
|
9929
|
+
var TRAINING_JOB_SCHEMA = "camstack.training/v1";
|
|
9930
|
+
var TRAINING_RESULT_SCHEMA = "camstack.training-result/v1";
|
|
9931
|
+
/** What the trainer can export. Edge TPU is a later, separate image. */
|
|
9932
|
+
var TrainingExportSchema = _enum([
|
|
9933
|
+
"onnx",
|
|
9934
|
+
"openvino-fp16",
|
|
9935
|
+
"openvino-int8",
|
|
9936
|
+
"coreml-fp16"
|
|
9937
|
+
]);
|
|
9938
|
+
var FloorsSchema = record(string(), number().min(0).max(1));
|
|
9939
|
+
object({
|
|
9940
|
+
schema: literal(TRAINING_JOB_SCHEMA),
|
|
9941
|
+
jobKey: string().uuid(),
|
|
9942
|
+
target: object({
|
|
9943
|
+
kind: literal("detector"),
|
|
9944
|
+
step: literal("object-detection")
|
|
9945
|
+
}),
|
|
9946
|
+
base: object({
|
|
9947
|
+
modelId: string().min(1),
|
|
9948
|
+
/** Ultralytics weights id, e.g. `yolov9m.pt`. */
|
|
9949
|
+
weights: string().min(1),
|
|
9950
|
+
imgsz: number().int().positive()
|
|
9951
|
+
}),
|
|
9952
|
+
baseline: object({
|
|
9953
|
+
modelId: string().min(1),
|
|
9954
|
+
/** The baseline ONNX the holdout comparison runs; public mirror URL. */
|
|
9955
|
+
onnxUrl: string().url(),
|
|
9956
|
+
imgsz: number().int().positive(),
|
|
9957
|
+
floors: FloorsSchema
|
|
9958
|
+
}),
|
|
9959
|
+
dataset: object({
|
|
9960
|
+
versionId: string().min(1),
|
|
9961
|
+
annotationHash: string(),
|
|
9962
|
+
/** sha256 of the uploaded archive; the trainer refuses a mismatch (exit 65). */
|
|
9963
|
+
sha256: string().regex(/^[0-9a-f]{64}$/)
|
|
9964
|
+
}),
|
|
9965
|
+
split: object({
|
|
9966
|
+
holdoutCameras: array(number().int()),
|
|
9967
|
+
/** When no camera is held out: the last N days of every camera. */
|
|
9968
|
+
holdoutLastDays: number().int().nonnegative(),
|
|
9969
|
+
valFraction: number().min(0).max(.5),
|
|
9970
|
+
seed: number().int()
|
|
9971
|
+
}),
|
|
9972
|
+
hyper: object({
|
|
9973
|
+
epochs: number().int().positive(),
|
|
9974
|
+
batch: number().int().positive(),
|
|
9975
|
+
lr0: number().positive(),
|
|
9976
|
+
/** Layers frozen from the start of the backbone; 0 = none. */
|
|
9977
|
+
freeze: number().int().nonnegative(),
|
|
9978
|
+
patience: number().int().nonnegative(),
|
|
9979
|
+
seed: number().int()
|
|
9980
|
+
}),
|
|
9981
|
+
replay: object({
|
|
9982
|
+
source: literal("coco2017"),
|
|
9983
|
+
count: number().int().nonnegative()
|
|
9984
|
+
}),
|
|
9985
|
+
exports: array(TrainingExportSchema).min(1),
|
|
9986
|
+
calibration: object({ maxFrames: number().int().positive() }),
|
|
9987
|
+
floors: object({
|
|
9988
|
+
minSupport: number().int().positive(),
|
|
9989
|
+
clamp: number().min(0).max(1)
|
|
9990
|
+
}),
|
|
9991
|
+
int8Gate: object({ maxMap50Drop: number().min(0).max(1) }),
|
|
9992
|
+
catalog: object({
|
|
9993
|
+
id: string().regex(/^[a-z0-9][a-z0-9-]{2,80}$/),
|
|
9994
|
+
name: string().min(1).max(160)
|
|
9995
|
+
})
|
|
9996
|
+
});
|
|
9997
|
+
/** One regular file of the bundle. An mlpackage contributes one row per member. */
|
|
9998
|
+
var TrainingResultFileSchema = object({
|
|
9999
|
+
path: string().min(1),
|
|
10000
|
+
bytes: number().int().nonnegative(),
|
|
10001
|
+
sha256: string().regex(/^[0-9a-f]{64}$/),
|
|
10002
|
+
format: _enum([
|
|
10003
|
+
"onnx",
|
|
10004
|
+
"openvino",
|
|
10005
|
+
"coreml",
|
|
10006
|
+
"pt"
|
|
10007
|
+
]),
|
|
10008
|
+
variant: _enum(["base", "int8"])
|
|
10009
|
+
});
|
|
10010
|
+
var DraftFormatSchema = object({
|
|
10011
|
+
/** RELATIVE path inside the bundle; the hub rewrites it to `camstack-local://`. */
|
|
10012
|
+
url: string().min(1),
|
|
10013
|
+
sizeMB: number().nonnegative(),
|
|
10014
|
+
isDirectory: boolean().optional(),
|
|
10015
|
+
files: array(string()).optional(),
|
|
10016
|
+
runtimes: array(literal("python")).optional(),
|
|
10017
|
+
revision: string().min(1)
|
|
10018
|
+
});
|
|
10019
|
+
/** The trainer's half of a catalog entry; the hub completes it (labels, licence, group). */
|
|
10020
|
+
var TrainingCatalogDraftSchema = object({
|
|
10021
|
+
id: string().min(1),
|
|
10022
|
+
name: string().min(1),
|
|
10023
|
+
description: string(),
|
|
10024
|
+
labels: array(unknown()),
|
|
10025
|
+
inputSize: object({
|
|
10026
|
+
width: number().int().positive(),
|
|
10027
|
+
height: number().int().positive()
|
|
10028
|
+
}),
|
|
10029
|
+
preprocessMode: literal("letterbox"),
|
|
10030
|
+
defaultClassFloors: FloorsSchema,
|
|
10031
|
+
formats: object({
|
|
10032
|
+
onnx: DraftFormatSchema.optional(),
|
|
10033
|
+
openvino: DraftFormatSchema.optional(),
|
|
10034
|
+
coreml: DraftFormatSchema.optional()
|
|
10035
|
+
})
|
|
10036
|
+
});
|
|
10037
|
+
/** One class of one model's holdout report (the eval harness's summary). */
|
|
10038
|
+
var TrainingEvalClassSchema = object({
|
|
10039
|
+
positives: number().int(),
|
|
10040
|
+
floor: number().nullable(),
|
|
10041
|
+
tp: number().int(),
|
|
10042
|
+
fp: number().int(),
|
|
10043
|
+
fn: number().int(),
|
|
10044
|
+
precision: number().nullable(),
|
|
10045
|
+
recall: number().nullable(),
|
|
10046
|
+
ap50: number().nullable(),
|
|
10047
|
+
recallByCamera: record(string(), number().nullable()).optional(),
|
|
10048
|
+
recallByLight: record(string(), number().nullable()).optional(),
|
|
10049
|
+
fpByCamera: record(string(), number()).optional(),
|
|
10050
|
+
smallFound: number().int().optional(),
|
|
10051
|
+
smallTotal: number().int().optional()
|
|
10052
|
+
}).passthrough();
|
|
10053
|
+
var TrainingEvalReportSchema = object({
|
|
10054
|
+
frames: number().int(),
|
|
10055
|
+
classes: record(string(), TrainingEvalClassSchema)
|
|
10056
|
+
}).passthrough();
|
|
10057
|
+
/**
|
|
10058
|
+
* A succeeded result carries every block; a failed one carries the error and
|
|
10059
|
+
* whatever was known by then — the other blocks are ABSENT, not null. The
|
|
10060
|
+
* orchestrator checks the blocks it needs before it trusts a success.
|
|
10061
|
+
*/
|
|
10062
|
+
var TrainingResultSchema = object({
|
|
10063
|
+
schema: literal(TRAINING_RESULT_SCHEMA),
|
|
10064
|
+
jobKey: string(),
|
|
10065
|
+
status: _enum(["succeeded", "failed"]),
|
|
10066
|
+
error: object({
|
|
10067
|
+
stage: string(),
|
|
10068
|
+
code: string(),
|
|
10069
|
+
message: string()
|
|
10070
|
+
}).nullable(),
|
|
10071
|
+
trainer: object({
|
|
10072
|
+
version: string(),
|
|
10073
|
+
revision: string()
|
|
10074
|
+
}),
|
|
10075
|
+
toolchain: record(string(), string().nullable()),
|
|
10076
|
+
dataset: object({
|
|
10077
|
+
versionId: string(),
|
|
10078
|
+
annotationHash: string(),
|
|
10079
|
+
sha256: string(),
|
|
10080
|
+
frames: object({
|
|
10081
|
+
train: number().int(),
|
|
10082
|
+
val: number().int(),
|
|
10083
|
+
holdout: number().int()
|
|
10084
|
+
}),
|
|
10085
|
+
holdoutCameras: array(number().int()),
|
|
10086
|
+
replayImages: number().int()
|
|
10087
|
+
}).optional(),
|
|
10088
|
+
training: object({
|
|
10089
|
+
epochsRun: number().int(),
|
|
10090
|
+
bestEpoch: number().int(),
|
|
10091
|
+
bestMap50: number(),
|
|
10092
|
+
bestMap50_95: number(),
|
|
10093
|
+
seconds: number()
|
|
10094
|
+
}).optional(),
|
|
10095
|
+
evaluation: object({
|
|
10096
|
+
holdoutFrames: number().int(),
|
|
10097
|
+
baseline: TrainingEvalReportSchema.nullable(),
|
|
10098
|
+
candidate: TrainingEvalReportSchema.nullable(),
|
|
10099
|
+
candidateInt8: TrainingEvalReportSchema.nullable(),
|
|
10100
|
+
recallDeltaByCamera: record(string(), record(string(), number())).nullable(),
|
|
10101
|
+
map50: record(string(), number().nullable())
|
|
10102
|
+
}).optional(),
|
|
10103
|
+
floors: object({
|
|
10104
|
+
baseline: FloorsSchema,
|
|
10105
|
+
candidate: FloorsSchema,
|
|
10106
|
+
candidateInt8: FloorsSchema.nullable(),
|
|
10107
|
+
notes: array(string())
|
|
10108
|
+
}).optional(),
|
|
10109
|
+
int8: object({
|
|
10110
|
+
kept: boolean(),
|
|
10111
|
+
map50Fp16: number().nullable(),
|
|
10112
|
+
map50Int8: number().nullable(),
|
|
10113
|
+
reason: string().nullable()
|
|
10114
|
+
}).optional(),
|
|
10115
|
+
exportsDropped: array(object({
|
|
10116
|
+
export: string(),
|
|
10117
|
+
reason: string()
|
|
10118
|
+
})).optional(),
|
|
10119
|
+
files: array(TrainingResultFileSchema).optional(),
|
|
10120
|
+
bundle: object({
|
|
10121
|
+
path: literal("bundle.tar"),
|
|
10122
|
+
bytes: number().int().nonnegative(),
|
|
10123
|
+
sha256: string().regex(/^[0-9a-f]{64}$/)
|
|
10124
|
+
}).nullable().optional(),
|
|
10125
|
+
catalogDraft: object({
|
|
10126
|
+
base: TrainingCatalogDraftSchema,
|
|
10127
|
+
int8: TrainingCatalogDraftSchema.nullable()
|
|
10128
|
+
}).nullable().optional(),
|
|
10129
|
+
licence: string()
|
|
10130
|
+
});
|
|
10131
|
+
var TrainingStageSchema = _enum([
|
|
10132
|
+
"prepare",
|
|
10133
|
+
"replay",
|
|
10134
|
+
"train",
|
|
10135
|
+
"eval",
|
|
10136
|
+
"export",
|
|
10137
|
+
"package"
|
|
10138
|
+
]);
|
|
10139
|
+
var EventBase = {
|
|
10140
|
+
v: literal(1),
|
|
10141
|
+
ts: number()
|
|
10142
|
+
};
|
|
10143
|
+
discriminatedUnion("type", [
|
|
10144
|
+
object({
|
|
10145
|
+
...EventBase,
|
|
10146
|
+
type: literal("stage"),
|
|
10147
|
+
stage: TrainingStageSchema
|
|
10148
|
+
}),
|
|
10149
|
+
object({
|
|
10150
|
+
...EventBase,
|
|
10151
|
+
type: literal("epoch"),
|
|
10152
|
+
epoch: number().int(),
|
|
10153
|
+
epochs: number().int(),
|
|
10154
|
+
boxLoss: number().nullable().optional(),
|
|
10155
|
+
map50: number().nullable().optional(),
|
|
10156
|
+
map50_95: number().nullable().optional(),
|
|
10157
|
+
etaSec: number().nullable().optional()
|
|
10158
|
+
}),
|
|
10159
|
+
object({
|
|
10160
|
+
...EventBase,
|
|
10161
|
+
type: literal("metric"),
|
|
10162
|
+
name: string(),
|
|
10163
|
+
value: number()
|
|
10164
|
+
}),
|
|
10165
|
+
object({
|
|
10166
|
+
...EventBase,
|
|
10167
|
+
type: literal("artifact"),
|
|
10168
|
+
path: string(),
|
|
10169
|
+
bytes: number(),
|
|
10170
|
+
sha256: string()
|
|
10171
|
+
}),
|
|
10172
|
+
object({
|
|
10173
|
+
...EventBase,
|
|
10174
|
+
type: literal("done"),
|
|
10175
|
+
status: _enum(["succeeded", "failed"]),
|
|
10176
|
+
resultSha256: string().nullable().optional()
|
|
10177
|
+
}),
|
|
10178
|
+
object({
|
|
10179
|
+
...EventBase,
|
|
10180
|
+
type: literal("error"),
|
|
10181
|
+
stage: string(),
|
|
10182
|
+
code: string(),
|
|
10183
|
+
message: string()
|
|
10184
|
+
})
|
|
10185
|
+
]);
|
|
10186
|
+
/**
|
|
9492
10187
|
* What the gate decided about a birth, from the CALLER's point of view.
|
|
9493
10188
|
*
|
|
9494
10189
|
* Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
|
|
@@ -11838,7 +12533,9 @@ var AddonHttpRouteSchema = object({
|
|
|
11838
12533
|
"authenticated",
|
|
11839
12534
|
"admin"
|
|
11840
12535
|
]).optional(),
|
|
11841
|
-
description: string().optional()
|
|
12536
|
+
description: string().optional(),
|
|
12537
|
+
/** The hub limits this route per client address before the handler runs. */
|
|
12538
|
+
rateLimit: _enum(["auth"]).optional()
|
|
11842
12539
|
});
|
|
11843
12540
|
/**
|
|
11844
12541
|
* Cross-process route invocation envelope. The hub captures the
|
|
@@ -12788,6 +13485,37 @@ var BackupDestinationInfoSchema = object({
|
|
|
12788
13485
|
lastError: string().optional()
|
|
12789
13486
|
});
|
|
12790
13487
|
/**
|
|
13488
|
+
* How an archive is encrypted (operator decision 2026-10-09): to a backup
|
|
13489
|
+
* PUBLIC key the hub holds, so only the operator's secret key opens it.
|
|
13490
|
+
* Absent on a plain `.tar.gz` — every archive made before encryption, or
|
|
13491
|
+
* with it off — which restores without a key.
|
|
13492
|
+
*/
|
|
13493
|
+
var BackupArchiveEncryptionSchema = object({
|
|
13494
|
+
/** `x25519-hkdf-aes256gcm-stream-v1`. */
|
|
13495
|
+
scheme: string(),
|
|
13496
|
+
/** 16 hex — the backup key whose secret restores this archive. */
|
|
13497
|
+
keyId: string()
|
|
13498
|
+
});
|
|
13499
|
+
/**
|
|
13500
|
+
* The backup encryption setting. The hub keeps PUBLIC keys only: the active
|
|
13501
|
+
* one new archives are encrypted to, and the retired ones older archives
|
|
13502
|
+
* still need. The secret key is shown once, at `setupEncryption`.
|
|
13503
|
+
*/
|
|
13504
|
+
var BackupEncryptionStatusSchema = object({
|
|
13505
|
+
enabled: boolean(),
|
|
13506
|
+
active: object({
|
|
13507
|
+
keyId: string(),
|
|
13508
|
+
publicKey: string(),
|
|
13509
|
+
createdAt: number()
|
|
13510
|
+
}).nullable(),
|
|
13511
|
+
/** Every key ever set up, newest first. */
|
|
13512
|
+
keys: array(object({
|
|
13513
|
+
keyId: string(),
|
|
13514
|
+
createdAt: number(),
|
|
13515
|
+
retiredAt: number().nullable()
|
|
13516
|
+
})).readonly()
|
|
13517
|
+
});
|
|
13518
|
+
/**
|
|
12791
13519
|
* Per-archive entry returned by `backup.listArchives({ destinationId })`.
|
|
12792
13520
|
* Same shape the destination drill-in renders. Sourced from the per-
|
|
12793
13521
|
* location `manifests.json` (no per-archive tarball read required).
|
|
@@ -12799,7 +13527,9 @@ var BackupArchiveEntrySchema = object({
|
|
|
12799
13527
|
sizeBytes: number(),
|
|
12800
13528
|
label: string().optional(),
|
|
12801
13529
|
/** Top-level locations included in the archive (db, addons, tls, …). */
|
|
12802
|
-
locations: array(string()).readonly()
|
|
13530
|
+
locations: array(string()).readonly(),
|
|
13531
|
+
/** Present when the archive is encrypted; restore then needs that key. */
|
|
13532
|
+
encryption: BackupArchiveEncryptionSchema.optional()
|
|
12803
13533
|
});
|
|
12804
13534
|
var BackupEntrySchema = object({
|
|
12805
13535
|
id: string(),
|
|
@@ -12808,7 +13538,8 @@ var BackupEntrySchema = object({
|
|
|
12808
13538
|
label: string().optional(),
|
|
12809
13539
|
createdAt: number(),
|
|
12810
13540
|
sizeBytes: number(),
|
|
12811
|
-
locations: array(string()).optional()
|
|
13541
|
+
locations: array(string()).optional(),
|
|
13542
|
+
encryption: BackupArchiveEncryptionSchema.optional()
|
|
12812
13543
|
});
|
|
12813
13544
|
var ArchiveEntrySchema = object({
|
|
12814
13545
|
path: string(),
|
|
@@ -13063,11 +13794,58 @@ var backupCapability = {
|
|
|
13063
13794
|
* this list and skips entries whose path doesn't start with
|
|
13064
13795
|
* any of them.
|
|
13065
13796
|
*/
|
|
13066
|
-
locations: array(string()).optional()
|
|
13797
|
+
locations: array(string()).optional(),
|
|
13798
|
+
/**
|
|
13799
|
+
* The backup SECRET key, for an encrypted archive (ignored for a plain
|
|
13800
|
+
* one). The archive is decrypted into the hub's private staging
|
|
13801
|
+
* before the restart; the key is not stored. A wrong or missing key
|
|
13802
|
+
* is refused before the archive is downloaded.
|
|
13803
|
+
*/
|
|
13804
|
+
backupSecretKey: string().optional()
|
|
13067
13805
|
}), _void(), {
|
|
13068
13806
|
kind: "mutation",
|
|
13069
13807
|
auth: "admin"
|
|
13070
13808
|
}),
|
|
13809
|
+
/** The encryption setting — public keys only. */
|
|
13810
|
+
getEncryption: method(_void(), BackupEncryptionStatusSchema, { auth: "admin" }),
|
|
13811
|
+
/**
|
|
13812
|
+
* Turn encryption on, or replace the key: generates a new key pair, keeps
|
|
13813
|
+
* the PUBLIC key, and returns the SECRET key — once. It is never stored
|
|
13814
|
+
* on the hub and cannot be shown again; archives made from now on need
|
|
13815
|
+
* it to be restored. A previous key is retired: archives made with it
|
|
13816
|
+
* still need IT.
|
|
13817
|
+
*/
|
|
13818
|
+
setupEncryption: method(object({}), object({
|
|
13819
|
+
keyId: string(),
|
|
13820
|
+
secretKey: string(),
|
|
13821
|
+
publicKey: string(),
|
|
13822
|
+
createdAt: number(),
|
|
13823
|
+
replacedKeyId: string().nullable()
|
|
13824
|
+
}), {
|
|
13825
|
+
kind: "mutation",
|
|
13826
|
+
auth: "admin"
|
|
13827
|
+
}),
|
|
13828
|
+
/** New archives are plain again. Existing encrypted archives keep needing their key. */
|
|
13829
|
+
disableEncryption: method(object({}), object({ disabledKeyId: string().nullable() }), {
|
|
13830
|
+
kind: "mutation",
|
|
13831
|
+
auth: "admin"
|
|
13832
|
+
}),
|
|
13833
|
+
/**
|
|
13834
|
+
* Does this secret key parse, and which backup key is it? A mutation so
|
|
13835
|
+
* the key never travels in a URL. Nothing is stored.
|
|
13836
|
+
*/
|
|
13837
|
+
checkBackupKey: method(object({ backupSecretKey: string() }), object({
|
|
13838
|
+
valid: boolean(),
|
|
13839
|
+
keyId: string().nullable(),
|
|
13840
|
+
/** The hub knows this key (active or retired). */
|
|
13841
|
+
known: boolean(),
|
|
13842
|
+
/** It is the key new archives are encrypted to. */
|
|
13843
|
+
active: boolean(),
|
|
13844
|
+
error: string().optional()
|
|
13845
|
+
}), {
|
|
13846
|
+
kind: "mutation",
|
|
13847
|
+
auth: "admin"
|
|
13848
|
+
}),
|
|
13071
13849
|
delete: method(object({
|
|
13072
13850
|
destinationId: string(),
|
|
13073
13851
|
backupId: string()
|
|
@@ -15252,22 +16030,87 @@ var CustomModelDescriptorSchema = object({
|
|
|
15252
16030
|
stepId: string(),
|
|
15253
16031
|
entry: ModelCatalogEntrySchema
|
|
15254
16032
|
});
|
|
16033
|
+
/** One regular file of an imported bundle, as the producer measured it. */
|
|
16034
|
+
var ModelBundleFileSchema = object({
|
|
16035
|
+
/** Relative path inside the bundle tar; an mlpackage member is `<x>.mlpackage/<member>`. */
|
|
16036
|
+
path: string().min(1),
|
|
16037
|
+
bytes: number().int().nonnegative(),
|
|
16038
|
+
sha256: string().regex(/^[0-9a-f]{64}$/)
|
|
16039
|
+
});
|
|
16040
|
+
var ImportModelBundleInputSchema = object({
|
|
16041
|
+
/** The registry provider that keeps the model (Model Studio). */
|
|
16042
|
+
addonId: string(),
|
|
16043
|
+
stepId: string().min(1),
|
|
16044
|
+
/**
|
|
16045
|
+
* The catalog rows to register, complete, every format URL already
|
|
16046
|
+
* `camstack-local://<modelId>/<file>` naming a file of the bundle. One
|
|
16047
|
+
* bundle may carry several rows (a base and its INT8 variant).
|
|
16048
|
+
*/
|
|
16049
|
+
entries: array(ModelCatalogEntrySchema).min(1).max(4),
|
|
16050
|
+
/** The bundle tar, offered by the producer over `ctx.peerBytes` (same host). */
|
|
16051
|
+
bundle: object({
|
|
16052
|
+
ticket: PeerBytesTicketSchema,
|
|
16053
|
+
bytes: number().int().positive(),
|
|
16054
|
+
sha256: string().regex(/^[0-9a-f]{64}$/)
|
|
16055
|
+
}),
|
|
16056
|
+
/** Every file the tar must hold; anything missing, extra or different is refused. */
|
|
16057
|
+
files: array(ModelBundleFileSchema).min(1).max(64),
|
|
16058
|
+
/** Convert missing engine formats and push the model to every agent afterwards. */
|
|
16059
|
+
distribute: boolean()
|
|
16060
|
+
});
|
|
16061
|
+
var ImportModelBundleResultSchema = discriminatedUnion("kind", [object({
|
|
16062
|
+
kind: literal("imported"),
|
|
16063
|
+
modelIds: array(string()).readonly(),
|
|
16064
|
+
distributed: array(object({
|
|
16065
|
+
modelId: string(),
|
|
16066
|
+
nodeId: string(),
|
|
16067
|
+
format: _enum(MODEL_FORMATS),
|
|
16068
|
+
ok: boolean(),
|
|
16069
|
+
error: string().optional()
|
|
16070
|
+
})).readonly()
|
|
16071
|
+
}), object({
|
|
16072
|
+
kind: literal("refused"),
|
|
16073
|
+
reason: _enum([
|
|
16074
|
+
"transfer-failed",
|
|
16075
|
+
"checksum-mismatch",
|
|
16076
|
+
"bundle-mismatch",
|
|
16077
|
+
"invalid-entry",
|
|
16078
|
+
"id-taken"
|
|
16079
|
+
]),
|
|
16080
|
+
detail: string()
|
|
16081
|
+
})]);
|
|
15255
16082
|
var customModelRegistryCapability = {
|
|
15256
16083
|
name: "custom-model-registry",
|
|
15257
16084
|
scope: "system",
|
|
15258
16085
|
mode: "collection",
|
|
15259
16086
|
internal: true,
|
|
15260
|
-
methods: {
|
|
15261
|
-
|
|
15262
|
-
|
|
15263
|
-
|
|
15264
|
-
|
|
15265
|
-
|
|
15266
|
-
|
|
15267
|
-
|
|
15268
|
-
|
|
15269
|
-
|
|
15270
|
-
listModels: method(_void(), array(CustomModelDescriptorSchema).readonly(), { auth: "admin" })
|
|
16087
|
+
methods: {
|
|
16088
|
+
/**
|
|
16089
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
16090
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
16091
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
16092
|
+
* consumer, the detection-pipeline's model resolution
|
|
16093
|
+
* (`addon-pipeline/src/detection-pipeline/provider.ts`), calls
|
|
16094
|
+
* `ctx.api.customModelRegistry.listModels.query()` — UDS/Moleculer,
|
|
16095
|
+
* never tRPC — so `auth: 'admin'` costs it nothing.
|
|
16096
|
+
*/
|
|
16097
|
+
listModels: method(_void(), array(CustomModelDescriptorSchema).readonly(), { auth: "admin" }),
|
|
16098
|
+
/**
|
|
16099
|
+
* Register a model whose files arrive as ONE bundle tar (D806): the tar
|
|
16100
|
+
* is taken over `ctx.peerBytes`, checked against `bundle.sha256` and
|
|
16101
|
+
* every row of `files`, unpacked into the hub's flat modelsDir (directory
|
|
16102
|
+
* formats included), each format's `.revision` record written, the rows
|
|
16103
|
+
* upserted under the operator's name, the hub marked available and —
|
|
16104
|
+
* when asked — engine formats converted and the model distributed. A
|
|
16105
|
+
* model id already registered by another source is refused, never
|
|
16106
|
+
* overwritten.
|
|
16107
|
+
*/
|
|
16108
|
+
importModelBundle: method(ImportModelBundleInputSchema, ImportModelBundleResultSchema, {
|
|
16109
|
+
kind: "mutation",
|
|
16110
|
+
auth: "admin",
|
|
16111
|
+
timeoutMs: 30 * 6e4
|
|
16112
|
+
})
|
|
16113
|
+
}
|
|
15271
16114
|
};
|
|
15272
16115
|
/**
|
|
15273
16116
|
* Query filter for settings-store collections.
|
|
@@ -16058,6 +16901,35 @@ var KeychainKeySourceSchema = object({
|
|
|
16058
16901
|
*/
|
|
16059
16902
|
sharesBackupWithDatabase: boolean()
|
|
16060
16903
|
});
|
|
16904
|
+
/**
|
|
16905
|
+
* One keychain reset, as the Secrets page reports it until the operator
|
|
16906
|
+
* acknowledges it. Never a value: refs, counts and table names only.
|
|
16907
|
+
*/
|
|
16908
|
+
var KeychainResetRecordSchema = object({
|
|
16909
|
+
id: string(),
|
|
16910
|
+
at: number(),
|
|
16911
|
+
/** `user:<id>` or {@link KEYCHAIN_RESET_TRIGGER_ACTOR}. */
|
|
16912
|
+
actor: string(),
|
|
16913
|
+
/** Why the keychain was locked when it was reset; `null` when it was not locked. */
|
|
16914
|
+
lockedReason: string().nullable(),
|
|
16915
|
+
/** Values moved into the archive table (ciphertext under the lost key). */
|
|
16916
|
+
archived: number().int(),
|
|
16917
|
+
/** `keychain:secrets-orphaned-<ts>`, or `null` when nothing was stored. */
|
|
16918
|
+
archivedCollection: string().nullable(),
|
|
16919
|
+
/**
|
|
16920
|
+
* `keychain:keys-orphaned-<ts>`: the wrapped data keys of the archive, kept
|
|
16921
|
+
* so the archive can still be opened if the lost master key turns up.
|
|
16922
|
+
*/
|
|
16923
|
+
archivedKeysCollection: string().nullable(),
|
|
16924
|
+
/**
|
|
16925
|
+
* `system-settings` keys whose marker the reset cleared — the cluster
|
|
16926
|
+
* secret's: a marker left pointing at an archived value would refuse every
|
|
16927
|
+
* agent forever (D797).
|
|
16928
|
+
*/
|
|
16929
|
+
clearedSettingsKeys: array(string()).readonly(),
|
|
16930
|
+
/** When an operator dismissed the notice on the Secrets page; `null` until then. */
|
|
16931
|
+
acknowledgedAt: number().nullable()
|
|
16932
|
+
});
|
|
16061
16933
|
var KeychainStatusSchema = object({
|
|
16062
16934
|
keychain: KeychainStateSchema,
|
|
16063
16935
|
/** The source of the master key in use; `null` while locked. */
|
|
@@ -16075,7 +16947,9 @@ var KeychainStatusSchema = object({
|
|
|
16075
16947
|
/** Wrapped copies of the data key under a previous master key, kept until purged. */
|
|
16076
16948
|
retiredWraps: number().int(),
|
|
16077
16949
|
recoveryKeyDownloadedAt: number().nullable(),
|
|
16078
|
-
secretCount: number().int()
|
|
16950
|
+
secretCount: number().int(),
|
|
16951
|
+
/** The most recent reset, acknowledged or not; `null` when the keychain was never reset. */
|
|
16952
|
+
lastReset: KeychainResetRecordSchema.nullable()
|
|
16079
16953
|
});
|
|
16080
16954
|
/**
|
|
16081
16955
|
* Whether a stored value is still pointed at by its owner's settings.
|
|
@@ -16097,13 +16971,14 @@ var KeychainAuditActionSchema = _enum([
|
|
|
16097
16971
|
"download-recovery-key",
|
|
16098
16972
|
"delete-orphans",
|
|
16099
16973
|
"reset",
|
|
16974
|
+
"acknowledge-reset",
|
|
16100
16975
|
"initialize"
|
|
16101
16976
|
]);
|
|
16102
16977
|
var KeychainAuditEntrySchema = object({
|
|
16103
16978
|
id: string(),
|
|
16104
16979
|
at: number(),
|
|
16105
16980
|
action: KeychainAuditActionSchema,
|
|
16106
|
-
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
16981
|
+
/** `addon:<id>` | `user:<id>` | `system` | `trigger-file`. */
|
|
16107
16982
|
actor: string(),
|
|
16108
16983
|
ref: string().nullable(),
|
|
16109
16984
|
detail: string().nullable()
|
|
@@ -16213,6 +17088,21 @@ var keychainAdminCapability = {
|
|
|
16213
17088
|
kind: "mutation",
|
|
16214
17089
|
auth: "admin",
|
|
16215
17090
|
caller: "required"
|
|
17091
|
+
}),
|
|
17092
|
+
/**
|
|
17093
|
+
* What the last reset left to re-enter: the archived refs (owner, scope,
|
|
17094
|
+
* field — never a value) that hold no value again yet. Process-held refs
|
|
17095
|
+
* the hub regenerates itself (the session signing key) are not listed.
|
|
17096
|
+
*/
|
|
17097
|
+
resetReport: method(object({}), object({
|
|
17098
|
+
reset: KeychainResetRecordSchema.nullable(),
|
|
17099
|
+
pendingReentry: array(KeychainSecretMetaSchema).readonly()
|
|
17100
|
+
}), { auth: "admin" }),
|
|
17101
|
+
/** Dismiss the "keychain was reset" notice. Audited. */
|
|
17102
|
+
acknowledgeReset: method(object({}), object({ acknowledged: boolean() }), {
|
|
17103
|
+
kind: "mutation",
|
|
17104
|
+
auth: "admin",
|
|
17105
|
+
caller: "required"
|
|
16216
17106
|
})
|
|
16217
17107
|
}
|
|
16218
17108
|
};
|
|
@@ -20128,7 +21018,7 @@ var logDestinationCapability = {
|
|
|
20128
21018
|
* `login-method` — collection cap through which auth addons contribute
|
|
20129
21019
|
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
20130
21020
|
* generic mechanism that supersedes the dead `auth.listProviders` reader:
|
|
20131
|
-
* every auth addon (OIDC,
|
|
21021
|
+
* every auth addon (OIDC, WebAuthn/passkey) registers a
|
|
20132
21022
|
* `login-method` provider and the PUBLIC `auth.listLoginMethods`
|
|
20133
21023
|
* procedure aggregates them for the unauthenticated login page.
|
|
20134
21024
|
*
|
|
@@ -20136,8 +21026,7 @@ var logDestinationCapability = {
|
|
|
20136
21026
|
*
|
|
20137
21027
|
* - `redirect` — a declarative button. The login page renders a generic
|
|
20138
21028
|
* button that navigates to `startUrl` (an addon-owned HTTP route).
|
|
20139
|
-
* Covers OIDC (`/addon/auth-oidc/<id>/start`)
|
|
20140
|
-
* ZERO shell-side JS. A future SSO addon plugs in the same way — the
|
|
21029
|
+
* Covers OIDC (`/addon/auth-oidc/<id>/start`) with ZERO shell-side JS. A future SSO addon plugs in the same way — the
|
|
20141
21030
|
* login page needs NO change.
|
|
20142
21031
|
*
|
|
20143
21032
|
* - `widget` — a Module-Federation widget the login page mounts (via
|
|
@@ -20156,8 +21045,8 @@ var logDestinationCapability = {
|
|
|
20156
21045
|
* decision.
|
|
20157
21046
|
*
|
|
20158
21047
|
* Every contribution carries a `stage`:
|
|
20159
|
-
* - `primary` — shown on the first credentials screen (OIDC
|
|
20160
|
-
*
|
|
21048
|
+
* - `primary` — shown on the first credentials screen (OIDC
|
|
21049
|
+
* buttons; a usernameless passkey).
|
|
20161
21050
|
* - `second-factor` — shown AFTER the password leg, gated on the
|
|
20162
21051
|
* returned `factors` (passkey-as-2FA today).
|
|
20163
21052
|
*
|
|
@@ -20184,7 +21073,7 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
20184
21073
|
* The provider names an external identity a signed-in user can link to
|
|
20185
21074
|
* their own account (D782): `auth.listLinkableProviders` /
|
|
20186
21075
|
* `beginExternalLink` offer exactly the redirect methods that set this,
|
|
20187
|
-
* whatever their id. Absent / false — a login button only
|
|
21076
|
+
* whatever their id. Absent / false — a login button only.
|
|
20188
21077
|
*/
|
|
20189
21078
|
linkable: boolean().optional()
|
|
20190
21079
|
}),
|
|
@@ -24945,8 +25834,7 @@ var notificationRulesCapability = {
|
|
|
24945
25834
|
* `super_admin` — collapsed onto the single boolean because every
|
|
24946
25835
|
* non-admin caller is governed by the same scope-check rules; the
|
|
24947
25836
|
* distinction was only ever used to route role-specific procedures
|
|
24948
|
-
* which we no longer have.
|
|
24949
|
-
* `createServiceToken`; CLI / webhook integrations are `cst_*` tokens
|
|
25837
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
24950
25838
|
* with `isAdmin: false` + an explicit scope list.
|
|
24951
25839
|
*/
|
|
24952
25840
|
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
@@ -28218,6 +29106,26 @@ var pipelineAnalyticsCapability = {
|
|
|
28218
29106
|
auth: "admin",
|
|
28219
29107
|
timeoutMs: 60 * 6e4
|
|
28220
29108
|
}),
|
|
29109
|
+
/**
|
|
29110
|
+
* OFFER the annotated archive instead of pushing it (D805): the same tar
|
|
29111
|
+
* `writeRetrainArchive` streams, behind a one-shot `ctx.peerBytes` ticket
|
|
29112
|
+
* the caller dials at once (same host). For a consumer that cannot expose
|
|
29113
|
+
* an upload URL — a training provider streaming straight into its cloud.
|
|
29114
|
+
* The answer is the plan; the bytes and their sha256 are the consumer's
|
|
29115
|
+
* to measure as they arrive.
|
|
29116
|
+
*/
|
|
29117
|
+
offerRetrainArchive: method(object({
|
|
29118
|
+
filter: RetrainExportFilterSchema,
|
|
29119
|
+
layout: RetrainExportLayoutSchema
|
|
29120
|
+
}), object({
|
|
29121
|
+
ticket: PeerBytesTicketSchema,
|
|
29122
|
+
frames: number().int(),
|
|
29123
|
+
annotations: number().int()
|
|
29124
|
+
}), {
|
|
29125
|
+
kind: "mutation",
|
|
29126
|
+
auth: "admin",
|
|
29127
|
+
timeoutMs: 12e4
|
|
29128
|
+
}),
|
|
28221
29129
|
/** The counts a selection would freeze — class × camera × day/night,
|
|
28222
29130
|
* completeness — without freezing anything. Index reads only. */
|
|
28223
29131
|
previewRetrainDataset: method(object({
|
|
@@ -32859,8 +33767,8 @@ version: string().optional() }), ServerUpdateActionResultSchema, {
|
|
|
32859
33767
|
* `smtp-provider` — pluggable email delivery surface.
|
|
32860
33768
|
*
|
|
32861
33769
|
* Collection cap: a deployment may install multiple SMTP relays (e.g.
|
|
32862
|
-
* one for transactional / one for notifications). Consumers (
|
|
32863
|
-
*
|
|
33770
|
+
* one for transactional / one for notifications). Consumers (notifier
|
|
33771
|
+
* addons, …) walk the collection and pick the first
|
|
32864
33772
|
* ready provider OR target a specific addonId.
|
|
32865
33773
|
*
|
|
32866
33774
|
* The shape stays small on purpose — `sendEmail` is enough for the
|
|
@@ -33156,7 +34064,7 @@ targets: array(object({
|
|
|
33156
34064
|
};
|
|
33157
34065
|
/**
|
|
33158
34066
|
* `sso-bridge` — internal hub-only cap that lets SSO-style auth
|
|
33159
|
-
* providers (OIDC, SAML,
|
|
34067
|
+
* providers (OIDC, SAML, …) mint an HMAC-signed token
|
|
33160
34068
|
* carrying the post-callback claims before redirecting back to
|
|
33161
34069
|
* `/api/auth/sso/finish`.
|
|
33162
34070
|
*
|
|
@@ -33219,7 +34127,14 @@ var SsoBridgeClaimsSchema = object({
|
|
|
33219
34127
|
* Verified `iss` of the id_token behind an OIDC login bridge (D782). A
|
|
33220
34128
|
* subject is unique only per issuer, so a link is bound to it.
|
|
33221
34129
|
*/
|
|
33222
|
-
issuer: string().optional()
|
|
34130
|
+
issuer: string().optional(),
|
|
34131
|
+
/**
|
|
34132
|
+
* SHA-256 (hex) of the `camstack_sso_state` cookie the IdP `/start` set in
|
|
34133
|
+
* the browser that began this sign-in. `/api/auth/sso/finish` requires the
|
|
34134
|
+
* request to present the matching cookie — a login bridge is useless in
|
|
34135
|
+
* any other browser.
|
|
34136
|
+
*/
|
|
34137
|
+
browserBinding: string().optional()
|
|
33223
34138
|
});
|
|
33224
34139
|
var ssoBridgeCapability = {
|
|
33225
34140
|
name: "sso-bridge",
|
|
@@ -33237,7 +34152,7 @@ var ssoBridgeCapability = {
|
|
|
33237
34152
|
* `/api/auth/sso/finish` to become admin — a full privilege escalation
|
|
33238
34153
|
* through the exact surface this cap exists to close (see the module
|
|
33239
34154
|
* docblock). Every real caller (`oauth-grants.ts`, `main.ts`
|
|
33240
|
-
* registration, the OIDC
|
|
34155
|
+
* registration, the OIDC addon) reaches this through
|
|
33241
34156
|
* `ctx.api` / the in-process registry — never through tRPC — so
|
|
33242
34157
|
* `auth: 'admin'` costs those callers nothing.
|
|
33243
34158
|
*/
|
|
@@ -41958,7 +42873,13 @@ var TopologyNodeSchema = object({
|
|
|
41958
42873
|
})).readonly(),
|
|
41959
42874
|
processes: array(TopologyProcessSchema).readonly(),
|
|
41960
42875
|
categories: array(TopologyCategorySchema).readonly(),
|
|
41961
|
-
rootPackage: TopologyRootPackageSchema.nullable()
|
|
42876
|
+
rootPackage: TopologyRootPackageSchema.nullable(),
|
|
42877
|
+
/**
|
|
42878
|
+
* How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
|
|
42879
|
+
* completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
|
|
42880
|
+
* for offline rows and when the hub cannot tell.
|
|
42881
|
+
*/
|
|
42882
|
+
meshTransport: _enum(["tls", "clear"]).optional()
|
|
41962
42883
|
});
|
|
41963
42884
|
var CapUsageEdgeSchema = object({
|
|
41964
42885
|
callerAddonId: string(),
|
|
@@ -47514,16 +48435,6 @@ var ApiKeySummarySchema = object({
|
|
|
47514
48435
|
createdAt: number(),
|
|
47515
48436
|
lastUsedAt: number().optional()
|
|
47516
48437
|
});
|
|
47517
|
-
var CreateApiKeyInputSchema = object({
|
|
47518
|
-
label: string(),
|
|
47519
|
-
isAdmin: boolean().default(false),
|
|
47520
|
-
allowedProviders: union([array(string()), literal("*")]).optional(),
|
|
47521
|
-
allowedDevices: record(string(), union([array(string()), literal("*")])).optional()
|
|
47522
|
-
});
|
|
47523
|
-
var CreateApiKeyResultSchema = object({
|
|
47524
|
-
token: string(),
|
|
47525
|
-
record: ApiKeySummarySchema
|
|
47526
|
-
});
|
|
47527
48438
|
var ScopedTokenSummarySchema = object({
|
|
47528
48439
|
id: string(),
|
|
47529
48440
|
userId: string(),
|
|
@@ -47635,20 +48546,11 @@ var userManagementCapability = {
|
|
|
47635
48546
|
access: "view"
|
|
47636
48547
|
}),
|
|
47637
48548
|
listApiKeys: method(_void(), array(ApiKeySummarySchema), { auth: "admin" }),
|
|
47638
|
-
createApiKey: method(CreateApiKeyInputSchema, CreateApiKeyResultSchema, {
|
|
47639
|
-
kind: "mutation",
|
|
47640
|
-
auth: "admin",
|
|
47641
|
-
access: "create"
|
|
47642
|
-
}),
|
|
47643
48549
|
revokeApiKey: method(object({ id: string() }), object({ success: literal(true) }), {
|
|
47644
48550
|
kind: "mutation",
|
|
47645
48551
|
auth: "admin",
|
|
47646
48552
|
access: "delete"
|
|
47647
48553
|
}),
|
|
47648
|
-
validateApiKey: method(object({ token: string() }), ApiKeySummarySchema.nullable(), {
|
|
47649
|
-
kind: "mutation",
|
|
47650
|
-
access: "view"
|
|
47651
|
-
}),
|
|
47652
48554
|
createScopedToken: method(CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, {
|
|
47653
48555
|
kind: "mutation",
|
|
47654
48556
|
auth: "admin",
|
|
@@ -47738,20 +48640,6 @@ var userManagementCapability = {
|
|
|
47738
48640
|
userId: string(),
|
|
47739
48641
|
issuer: string()
|
|
47740
48642
|
}).nullable(), { auth: "admin" }),
|
|
47741
|
-
/**
|
|
47742
|
-
* Link `(provider, subject)` to `userId`. Idempotent for the same user;
|
|
47743
|
-
* REFUSES (throws) an identity already linked to another user, and a
|
|
47744
|
-
* user that does not exist.
|
|
47745
|
-
*/
|
|
47746
|
-
linkExternalIdentity: method(ExternalIdentityKeySchema.extend({
|
|
47747
|
-
userId: string(),
|
|
47748
|
-
issuer: string().min(1),
|
|
47749
|
-
label: string().optional()
|
|
47750
|
-
}), object({ success: literal(true) }), {
|
|
47751
|
-
kind: "mutation",
|
|
47752
|
-
auth: "admin",
|
|
47753
|
-
access: "create"
|
|
47754
|
-
}),
|
|
47755
48643
|
/** Remove one link of `userId`. `success: false` when it was not linked to that user. */
|
|
47756
48644
|
unlinkExternalIdentity: method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
47757
48645
|
kind: "mutation",
|
|
@@ -48463,6 +49351,531 @@ var zoneRulesCapability = {
|
|
|
48463
49351
|
durability: "restored"
|
|
48464
49352
|
};
|
|
48465
49353
|
/**
|
|
49354
|
+
* `training-provider` — ONE cloud that can run the CamStack trainer.
|
|
49355
|
+
*
|
|
49356
|
+
* A thin, mockable translation layer: it knows how to run a container with a
|
|
49357
|
+
* GPU, move a dataset in, read the job's stdout and hand artefacts back. It
|
|
49358
|
+
* knows nothing about datasets, splits, floors, cost policy or Model Studio —
|
|
49359
|
+
* those are the `training` orchestrator's (D805). Every rule written there
|
|
49360
|
+
* once is what makes a second provider (RunPod, a local NVIDIA node) a new
|
|
49361
|
+
* manifest entry and nothing else.
|
|
49362
|
+
*
|
|
49363
|
+
* Collection, routed by the `addonId` in every single-row input (the `llm` /
|
|
49364
|
+
* `notification-output` posture); `describe` concat-fans across providers.
|
|
49365
|
+
* Every method is `admin`: these spend money.
|
|
49366
|
+
*
|
|
49367
|
+
* Every cloud object a provider creates is tagged with the orchestrator's
|
|
49368
|
+
* `jobKey`, so a retried submit finds the job it already started instead of
|
|
49369
|
+
* starting a second GPU, and `listJobs` can find orphans.
|
|
49370
|
+
*
|
|
49371
|
+
* Bytes never ride a cap field: the dataset arrives as a `ctx.peerBytes`
|
|
49372
|
+
* ticket the producer (pipeline-analytics) minted, and artefacts leave as a
|
|
49373
|
+
* ticket the provider mints (D613).
|
|
49374
|
+
*/
|
|
49375
|
+
var TrainingGpuOptionSchema = object({
|
|
49376
|
+
id: string(),
|
|
49377
|
+
label: string(),
|
|
49378
|
+
/** List price, USD per GPU-hour, before any region multiplier. */
|
|
49379
|
+
usdPerHour: number().nonnegative(),
|
|
49380
|
+
vramGb: number().nonnegative()
|
|
49381
|
+
});
|
|
49382
|
+
var TrainingRegionOptionSchema = object({
|
|
49383
|
+
/** `''` = any region (the provider's choice). */
|
|
49384
|
+
id: string(),
|
|
49385
|
+
label: string(),
|
|
49386
|
+
priceMultiplier: number().positive()
|
|
49387
|
+
});
|
|
49388
|
+
/**
|
|
49389
|
+
* The provider's per-account settings, as the orchestrator reads them. They
|
|
49390
|
+
* live in the PROVIDER addon's settings (operator decision 2026-10-08: they
|
|
49391
|
+
* depend on the user's account), never hard-coded in the orchestrator.
|
|
49392
|
+
*/
|
|
49393
|
+
var TrainingProviderDefaultsSchema = object({
|
|
49394
|
+
gpuType: string(),
|
|
49395
|
+
region: string(),
|
|
49396
|
+
costCapUsd: number().nonnegative(),
|
|
49397
|
+
maxRuntimeSec: number().int().positive(),
|
|
49398
|
+
/** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
|
|
49399
|
+
failedDatasetGraceHours: number().nonnegative()
|
|
49400
|
+
});
|
|
49401
|
+
var TrainingProviderDescriptorSchema = object({
|
|
49402
|
+
addonId: string(),
|
|
49403
|
+
/** `modal`, `runpod`, `fake`, … */
|
|
49404
|
+
kind: string(),
|
|
49405
|
+
label: string(),
|
|
49406
|
+
gpuTypes: array(TrainingGpuOptionSchema).readonly(),
|
|
49407
|
+
regions: array(TrainingRegionOptionSchema).readonly(),
|
|
49408
|
+
maxDatasetBytes: number().int().positive(),
|
|
49409
|
+
maxRuntimeSec: number().int().positive(),
|
|
49410
|
+
freeTierNote: string().optional(),
|
|
49411
|
+
/** Where the data goes, in one sentence the confirm dialog repeats. */
|
|
49412
|
+
dataResidencyNote: string(),
|
|
49413
|
+
/** Credentials are present — never the values. */
|
|
49414
|
+
configured: boolean(),
|
|
49415
|
+
defaults: TrainingProviderDefaultsSchema
|
|
49416
|
+
});
|
|
49417
|
+
var TrainingCredentialCheckSchema = object({
|
|
49418
|
+
ok: boolean(),
|
|
49419
|
+
/** Workspace / account name, when the provider says. */
|
|
49420
|
+
account: string().optional(),
|
|
49421
|
+
reason: _enum([
|
|
49422
|
+
"missing",
|
|
49423
|
+
"invalid",
|
|
49424
|
+
"forbidden",
|
|
49425
|
+
"network",
|
|
49426
|
+
"quota"
|
|
49427
|
+
]).optional(),
|
|
49428
|
+
detail: string().optional()
|
|
49429
|
+
});
|
|
49430
|
+
var ProviderJobStateSchema = _enum([
|
|
49431
|
+
"pending",
|
|
49432
|
+
"starting",
|
|
49433
|
+
"running",
|
|
49434
|
+
"succeeded",
|
|
49435
|
+
"failed",
|
|
49436
|
+
"cancelled",
|
|
49437
|
+
"lost"
|
|
49438
|
+
]);
|
|
49439
|
+
var ProviderJobStatusSchema = object({
|
|
49440
|
+
jobKey: string(),
|
|
49441
|
+
providerJobId: string().optional(),
|
|
49442
|
+
state: ProviderJobStateSchema,
|
|
49443
|
+
startedAt: number().optional(),
|
|
49444
|
+
endedAt: number().optional(),
|
|
49445
|
+
exitCode: number().int().optional(),
|
|
49446
|
+
failureReason: string().optional(),
|
|
49447
|
+
gpuType: string(),
|
|
49448
|
+
region: string().optional(),
|
|
49449
|
+
billedSeconds: number().nonnegative(),
|
|
49450
|
+
costUsd: number().nonnegative(),
|
|
49451
|
+
/** True when `costUsd` is runtime × list price, not a billing answer. */
|
|
49452
|
+
costIsEstimate: boolean(),
|
|
49453
|
+
lastFetchedAt: number()
|
|
49454
|
+
});
|
|
49455
|
+
/**
|
|
49456
|
+
* The trainer the job runs, by SOURCE revision: the provider turns it into an
|
|
49457
|
+
* image its own way (Modal builds the published Dockerfile at that revision;
|
|
49458
|
+
* a registry-pull provider maps it to a tag). Recorded on the job and echoed
|
|
49459
|
+
* in `result.json`.
|
|
49460
|
+
*/
|
|
49461
|
+
var TrainerSourceRefSchema = object({
|
|
49462
|
+
/** Hugging Face repo id, e.g. `camstack/camstack-trainer`. */
|
|
49463
|
+
repo: string().min(1),
|
|
49464
|
+
/** A commit sha (never a branch) — the job must be reproducible. */
|
|
49465
|
+
revision: string().regex(/^[0-9a-f]{7,64}$/)
|
|
49466
|
+
});
|
|
49467
|
+
var JobRef = {
|
|
49468
|
+
addonId: string(),
|
|
49469
|
+
jobKey: string().uuid()
|
|
49470
|
+
};
|
|
49471
|
+
var TrainingLogLineSchema = object({
|
|
49472
|
+
ts: number(),
|
|
49473
|
+
text: string()
|
|
49474
|
+
});
|
|
49475
|
+
var trainingProviderCapability = {
|
|
49476
|
+
name: "training-provider",
|
|
49477
|
+
scope: "system",
|
|
49478
|
+
mode: "collection",
|
|
49479
|
+
internal: true,
|
|
49480
|
+
methods: {
|
|
49481
|
+
/** Every provider's offer and settings. Concat-fans across providers. */
|
|
49482
|
+
describe: method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }),
|
|
49483
|
+
/** Call the provider with the stored credentials. Never returns them. */
|
|
49484
|
+
validateCredentials: method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
|
|
49485
|
+
kind: "mutation",
|
|
49486
|
+
auth: "admin",
|
|
49487
|
+
timeoutMs: 3e4
|
|
49488
|
+
}),
|
|
49489
|
+
/** USD range for a run of `gpuSeconds` on `gpuType` in `region`. */
|
|
49490
|
+
estimateJob: method(object({
|
|
49491
|
+
addonId: string(),
|
|
49492
|
+
gpuType: string(),
|
|
49493
|
+
region: string(),
|
|
49494
|
+
datasetBytes: number().int().nonnegative(),
|
|
49495
|
+
gpuSecondsLow: number().nonnegative(),
|
|
49496
|
+
gpuSecondsHigh: number().nonnegative()
|
|
49497
|
+
}), object({
|
|
49498
|
+
usdLow: number().nonnegative(),
|
|
49499
|
+
usdHigh: number().nonnegative(),
|
|
49500
|
+
notes: array(string()).readonly()
|
|
49501
|
+
}), { auth: "admin" }),
|
|
49502
|
+
/**
|
|
49503
|
+
* Take the dataset archive behind `ticket` (minted by pipeline-analytics,
|
|
49504
|
+
* same host) and land it as the job's dataset in the cloud, streamed —
|
|
49505
|
+
* nothing is staged on the hub's disk. Idempotent per `jobKey`: a second
|
|
49506
|
+
* call replaces a partial upload. Answers what actually landed.
|
|
49507
|
+
*/
|
|
49508
|
+
uploadDataset: method(object({
|
|
49509
|
+
...JobRef,
|
|
49510
|
+
ticket: PeerBytesTicketSchema
|
|
49511
|
+
}), object({
|
|
49512
|
+
bytes: number().int().nonnegative(),
|
|
49513
|
+
sha256: string()
|
|
49514
|
+
}), {
|
|
49515
|
+
kind: "mutation",
|
|
49516
|
+
auth: "admin",
|
|
49517
|
+
timeoutMs: 120 * 6e4
|
|
49518
|
+
}),
|
|
49519
|
+
/**
|
|
49520
|
+
* Start the trainer on a GPU. Looks the job up by `jobKey` first, so a
|
|
49521
|
+
* retried submit never starts a second GPU. `jobSpecJson` is written next
|
|
49522
|
+
* to the dataset as `job.json`; `maxRuntimeSec` is enforced by the
|
|
49523
|
+
* provider (a hard timeout), not by the hub.
|
|
49524
|
+
*/
|
|
49525
|
+
submitJob: method(object({
|
|
49526
|
+
...JobRef,
|
|
49527
|
+
trainer: TrainerSourceRefSchema,
|
|
49528
|
+
jobSpecJson: string().min(2).max(64e3),
|
|
49529
|
+
gpuType: string(),
|
|
49530
|
+
region: string(),
|
|
49531
|
+
maxRuntimeSec: number().int().positive()
|
|
49532
|
+
}), ProviderJobStatusSchema, {
|
|
49533
|
+
kind: "mutation",
|
|
49534
|
+
auth: "admin",
|
|
49535
|
+
timeoutMs: 30 * 6e4
|
|
49536
|
+
}),
|
|
49537
|
+
getJob: method(object(JobRef), ProviderJobStatusSchema, {
|
|
49538
|
+
auth: "admin",
|
|
49539
|
+
timeoutMs: 6e4
|
|
49540
|
+
}),
|
|
49541
|
+
/** Stdout/stderr since `cursor` (opaque), oldest first, at most `max` lines. */
|
|
49542
|
+
listJobEvents: method(object({
|
|
49543
|
+
...JobRef,
|
|
49544
|
+
cursor: string().optional(),
|
|
49545
|
+
max: number().int().min(1).max(500)
|
|
49546
|
+
}), object({
|
|
49547
|
+
lines: array(TrainingLogLineSchema).readonly(),
|
|
49548
|
+
cursor: string()
|
|
49549
|
+
}), {
|
|
49550
|
+
auth: "admin",
|
|
49551
|
+
timeoutMs: 6e4
|
|
49552
|
+
}),
|
|
49553
|
+
/** Stop the job. Idempotent: an unknown or finished job is a no-op. */
|
|
49554
|
+
cancelJob: method(object(JobRef), object({ ok: literal(true) }), {
|
|
49555
|
+
kind: "mutation",
|
|
49556
|
+
auth: "admin",
|
|
49557
|
+
timeoutMs: 6e4
|
|
49558
|
+
}),
|
|
49559
|
+
/** The job's `result.json`, as text (small, JSON). `found: false` before it exists. */
|
|
49560
|
+
readResult: method(object(JobRef), object({
|
|
49561
|
+
found: boolean(),
|
|
49562
|
+
text: string().optional()
|
|
49563
|
+
}), {
|
|
49564
|
+
kind: "mutation",
|
|
49565
|
+
auth: "admin",
|
|
49566
|
+
timeoutMs: 5 * 6e4
|
|
49567
|
+
}),
|
|
49568
|
+
/**
|
|
49569
|
+
* Offer one output file of the job (`bundle.tar`) to the caller as a
|
|
49570
|
+
* one-shot `ctx.peerBytes` ticket, streamed from the cloud — the provider
|
|
49571
|
+
* stages nothing on disk. The caller dials it at once.
|
|
49572
|
+
*/
|
|
49573
|
+
offerArtifact: method(object({
|
|
49574
|
+
...JobRef,
|
|
49575
|
+
path: _enum(["bundle.tar"])
|
|
49576
|
+
}), object({ ticket: PeerBytesTicketSchema }), {
|
|
49577
|
+
kind: "mutation",
|
|
49578
|
+
auth: "admin",
|
|
49579
|
+
timeoutMs: 5 * 6e4
|
|
49580
|
+
}),
|
|
49581
|
+
/** Delete every cloud object tagged with `jobKey` (the dataset first). Idempotent. */
|
|
49582
|
+
cleanupJob: method(object(JobRef), object({ deleted: array(string()).readonly() }), {
|
|
49583
|
+
kind: "mutation",
|
|
49584
|
+
auth: "admin",
|
|
49585
|
+
timeoutMs: 5 * 6e4
|
|
49586
|
+
}),
|
|
49587
|
+
/** Every job the provider can still see — the orphan sweep diffs it against our records. */
|
|
49588
|
+
listJobs: method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
|
|
49589
|
+
auth: "admin",
|
|
49590
|
+
timeoutMs: 2 * 6e4
|
|
49591
|
+
})
|
|
49592
|
+
}
|
|
49593
|
+
};
|
|
49594
|
+
/**
|
|
49595
|
+
* `training` — the cloud-training orchestrator (D805). Hub-only singleton,
|
|
49596
|
+
* provided by `addon-training`.
|
|
49597
|
+
*
|
|
49598
|
+
* It owns what every provider must agree on, written once:
|
|
49599
|
+
*
|
|
49600
|
+
* - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
|
|
49601
|
+
* live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
|
|
49602
|
+
* the export plan) and reaches this store through the five row methods
|
|
49603
|
+
* below, so the Retrain page and the export did not change.
|
|
49604
|
+
* - **Jobs.** A persisted state machine, a reconcile loop against the
|
|
49605
|
+
* provider, a cost guard, a daily orphan sweep and the retention rules.
|
|
49606
|
+
* - **The return flow.** Verified artefacts → Model Studio
|
|
49607
|
+
* (`custom-model-registry.importModelBundle`) → canary on cameras →
|
|
49608
|
+
* rollback. Nothing is ever registered automatically.
|
|
49609
|
+
*
|
|
49610
|
+
* Every method is `admin`.
|
|
49611
|
+
*/
|
|
49612
|
+
/** A version WITH its frame list — what the export and a job read. */
|
|
49613
|
+
var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
|
|
49614
|
+
/** A base model a detector job can fine-tune, and the baseline it is judged against. */
|
|
49615
|
+
var TrainingBaseModelSchema = object({
|
|
49616
|
+
modelId: string(),
|
|
49617
|
+
label: string(),
|
|
49618
|
+
weights: string(),
|
|
49619
|
+
imgsz: number().int(),
|
|
49620
|
+
baselineOnnxUrl: string(),
|
|
49621
|
+
baselineFloors: record(string(), number()),
|
|
49622
|
+
/** The base the fleet runs most — the UI's default. */
|
|
49623
|
+
recommended: boolean()
|
|
49624
|
+
});
|
|
49625
|
+
var TrainingPresetSchema = _enum([
|
|
49626
|
+
"quick",
|
|
49627
|
+
"standard",
|
|
49628
|
+
"thorough"
|
|
49629
|
+
]);
|
|
49630
|
+
var TrainingJobRequestSchema = object({
|
|
49631
|
+
datasetVersionId: string().min(1),
|
|
49632
|
+
/** The `training-provider` addon that runs it. */
|
|
49633
|
+
addonId: string().min(1),
|
|
49634
|
+
gpuType: string().min(1),
|
|
49635
|
+
region: string(),
|
|
49636
|
+
baseModelId: string().min(1),
|
|
49637
|
+
preset: TrainingPresetSchema,
|
|
49638
|
+
/** Freeze the backbone's first N layers; `null` = the preset's choice. */
|
|
49639
|
+
freeze: number().int().nonnegative().nullable(),
|
|
49640
|
+
/** Cameras held out whole for evaluation; `null` = the orchestrator's default. */
|
|
49641
|
+
holdoutCameras: array(number().int()).nullable()
|
|
49642
|
+
});
|
|
49643
|
+
var TrainingSplitPlanSchema = object({
|
|
49644
|
+
holdoutCameras: array(number().int()).readonly(),
|
|
49645
|
+
/** Used when no camera is held out: the last N days of every camera. */
|
|
49646
|
+
holdoutLastDays: number().int().nonnegative(),
|
|
49647
|
+
/** Holdout subjects per class (camera holdout only; `null` = known only after the split). */
|
|
49648
|
+
holdoutSupport: record(string(), number().int()).nullable(),
|
|
49649
|
+
trainSubjects: number().int()
|
|
49650
|
+
});
|
|
49651
|
+
var TrainingRefusalReasonSchema = _enum([
|
|
49652
|
+
"unknown-dataset",
|
|
49653
|
+
"unknown-provider",
|
|
49654
|
+
"provider-not-configured",
|
|
49655
|
+
"unknown-base-model",
|
|
49656
|
+
"unknown-gpu",
|
|
49657
|
+
"dataset-too-large",
|
|
49658
|
+
"no-training-subjects",
|
|
49659
|
+
"job-already-running"
|
|
49660
|
+
]);
|
|
49661
|
+
var TrainingJobPlanSchema = object({
|
|
49662
|
+
refusal: object({
|
|
49663
|
+
reason: TrainingRefusalReasonSchema,
|
|
49664
|
+
detail: string()
|
|
49665
|
+
}).nullable(),
|
|
49666
|
+
warnings: array(string()).readonly(),
|
|
49667
|
+
split: TrainingSplitPlanSchema.nullable(),
|
|
49668
|
+
estimate: object({
|
|
49669
|
+
datasetBytes: number().int(),
|
|
49670
|
+
uploadMinutesAt20Mbps: number(),
|
|
49671
|
+
gpuSecondsLow: number(),
|
|
49672
|
+
gpuSecondsHigh: number(),
|
|
49673
|
+
usdLow: number(),
|
|
49674
|
+
usdHigh: number(),
|
|
49675
|
+
notes: array(string()).readonly()
|
|
49676
|
+
}).nullable(),
|
|
49677
|
+
/** Pre-filled from the provider's settings; the operator may lower or raise them. */
|
|
49678
|
+
defaults: object({
|
|
49679
|
+
maxCostUsd: number(),
|
|
49680
|
+
maxRuntimeSec: number().int()
|
|
49681
|
+
}).nullable(),
|
|
49682
|
+
/** The sentence the confirm dialog repeats: where the frames go and when they are deleted. */
|
|
49683
|
+
dataNotice: string()
|
|
49684
|
+
});
|
|
49685
|
+
/**
|
|
49686
|
+
* Orchestrator-owned states, persisted. `uploading` covers exporting the
|
|
49687
|
+
* archive (it is streamed, never staged). Terminal: `failed`, `cancelled`,
|
|
49688
|
+
* `lost`, `expired`, `discarded`. `registered` and `canary` are where a
|
|
49689
|
+
* result lives after the operator acted on it.
|
|
49690
|
+
*/
|
|
49691
|
+
var TrainingJobStateSchema = _enum([
|
|
49692
|
+
"uploading",
|
|
49693
|
+
"submitted",
|
|
49694
|
+
"starting",
|
|
49695
|
+
"running",
|
|
49696
|
+
"collecting",
|
|
49697
|
+
"ready",
|
|
49698
|
+
"registered",
|
|
49699
|
+
"canary",
|
|
49700
|
+
"failed",
|
|
49701
|
+
"cancelling",
|
|
49702
|
+
"cancelled",
|
|
49703
|
+
"lost",
|
|
49704
|
+
"expired",
|
|
49705
|
+
"discarded"
|
|
49706
|
+
]);
|
|
49707
|
+
var TrainingFailureReasonSchema = _enum([
|
|
49708
|
+
"cost-cap",
|
|
49709
|
+
"runtime-cap",
|
|
49710
|
+
"upload-failed",
|
|
49711
|
+
"submit-failed",
|
|
49712
|
+
"trainer-failed",
|
|
49713
|
+
"result-invalid",
|
|
49714
|
+
"checksum-mismatch",
|
|
49715
|
+
"fetch-failed",
|
|
49716
|
+
"provider-error",
|
|
49717
|
+
"hub-restart-during-upload"
|
|
49718
|
+
]);
|
|
49719
|
+
var TrainingProgressPointSchema = object({
|
|
49720
|
+
epoch: number().int(),
|
|
49721
|
+
map50: number().nullable(),
|
|
49722
|
+
map50_95: number().nullable()
|
|
49723
|
+
});
|
|
49724
|
+
var TrainingCanarySchema = object({
|
|
49725
|
+
deviceIds: array(number().int()).readonly(),
|
|
49726
|
+
since: number(),
|
|
49727
|
+
/** Every override the canary replaced, exactly, so rollback restores it. */
|
|
49728
|
+
previous: array(object({
|
|
49729
|
+
deviceId: number().int(),
|
|
49730
|
+
nodeId: string(),
|
|
49731
|
+
deviceKey: string(),
|
|
49732
|
+
patch: object({
|
|
49733
|
+
modelId: string().optional(),
|
|
49734
|
+
settings: record(string(), unknown()).readonly().optional()
|
|
49735
|
+
}).nullable()
|
|
49736
|
+
})).readonly()
|
|
49737
|
+
});
|
|
49738
|
+
var TrainingJobSchema = object({
|
|
49739
|
+
id: string(),
|
|
49740
|
+
idempotencyKey: string(),
|
|
49741
|
+
name: string(),
|
|
49742
|
+
createdAt: number(),
|
|
49743
|
+
updatedAt: number(),
|
|
49744
|
+
state: TrainingJobStateSchema,
|
|
49745
|
+
stage: TrainingStageSchema.nullable(),
|
|
49746
|
+
failure: object({
|
|
49747
|
+
reason: TrainingFailureReasonSchema,
|
|
49748
|
+
stage: string().nullable(),
|
|
49749
|
+
detail: string()
|
|
49750
|
+
}).nullable(),
|
|
49751
|
+
request: TrainingJobRequestSchema,
|
|
49752
|
+
maxCostUsd: number().nonnegative(),
|
|
49753
|
+
maxRuntimeSec: number().int().positive(),
|
|
49754
|
+
trainer: TrainerSourceRefSchema,
|
|
49755
|
+
datasetLayout: RetrainExportLayoutSchema,
|
|
49756
|
+
dataset: object({
|
|
49757
|
+
bytes: number().int(),
|
|
49758
|
+
sha256: string(),
|
|
49759
|
+
uploadedAt: number()
|
|
49760
|
+
}).nullable(),
|
|
49761
|
+
split: TrainingSplitPlanSchema,
|
|
49762
|
+
provider: object({
|
|
49763
|
+
state: ProviderJobStateSchema.nullable(),
|
|
49764
|
+
providerJobId: string().nullable(),
|
|
49765
|
+
startedAt: number().nullable(),
|
|
49766
|
+
endedAt: number().nullable(),
|
|
49767
|
+
billedSeconds: number(),
|
|
49768
|
+
costUsd: number(),
|
|
49769
|
+
costIsEstimate: boolean(),
|
|
49770
|
+
lastPolledAt: number().nullable()
|
|
49771
|
+
}),
|
|
49772
|
+
progress: object({
|
|
49773
|
+
epoch: number().int().nullable(),
|
|
49774
|
+
epochs: number().int().nullable(),
|
|
49775
|
+
etaSec: number().nullable(),
|
|
49776
|
+
series: array(TrainingProgressPointSchema).readonly()
|
|
49777
|
+
}),
|
|
49778
|
+
/** The last lines of the job's output (≤ 200), newest last. Never frame paths. */
|
|
49779
|
+
logTail: array(string()).readonly(),
|
|
49780
|
+
logCursor: string().nullable(),
|
|
49781
|
+
artifacts: object({
|
|
49782
|
+
bundleBytes: number().int(),
|
|
49783
|
+
bundleSha256: string(),
|
|
49784
|
+
fetchedAt: number(),
|
|
49785
|
+
/** When the staged artefacts are deleted from the hub. */
|
|
49786
|
+
expiresAt: number()
|
|
49787
|
+
}).nullable(),
|
|
49788
|
+
/** When the provider-side copy of the frames was deleted; null while it exists. */
|
|
49789
|
+
cloudDatasetDeletedAt: number().nullable(),
|
|
49790
|
+
/** A failed job's dataset is kept until then (the provider's grace), then deleted. */
|
|
49791
|
+
cloudCleanupDueAt: number().nullable(),
|
|
49792
|
+
/** Model ids registered from this job (base, and int8 when kept). */
|
|
49793
|
+
registeredModelIds: array(string()).readonly(),
|
|
49794
|
+
canary: TrainingCanarySchema.nullable()
|
|
49795
|
+
});
|
|
49796
|
+
var IdInput = object({ id: string().min(1) });
|
|
49797
|
+
var trainingCapability = {
|
|
49798
|
+
name: "training",
|
|
49799
|
+
scope: "system",
|
|
49800
|
+
mode: "singleton",
|
|
49801
|
+
mount: { kind: "hub-only" },
|
|
49802
|
+
methods: {
|
|
49803
|
+
/** Store a version once. `stored: false` = that id already exists (immutable). */
|
|
49804
|
+
putDatasetVersion: method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
|
|
49805
|
+
kind: "mutation",
|
|
49806
|
+
auth: "admin"
|
|
49807
|
+
}),
|
|
49808
|
+
getDatasetVersion: method(IdInput, TrainingDatasetVersionRowSchema.nullable(), { auth: "admin" }),
|
|
49809
|
+
/** Every version without its frame list, newest first. */
|
|
49810
|
+
listDatasetVersions: method(object({}), array(RetrainDatasetVersionSchema).readonly(), { auth: "admin" }),
|
|
49811
|
+
findDatasetVersionIdByName: method(object({ name: string() }), object({ id: string().nullable() }), { auth: "admin" }),
|
|
49812
|
+
removeDatasetVersion: method(IdInput, object({ removed: boolean() }), {
|
|
49813
|
+
kind: "mutation",
|
|
49814
|
+
auth: "admin"
|
|
49815
|
+
}),
|
|
49816
|
+
listBaseModels: method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }),
|
|
49817
|
+
/** Split, estimate, defaults and any named refusal — nothing is started. */
|
|
49818
|
+
planJob: method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
|
|
49819
|
+
auth: "admin",
|
|
49820
|
+
timeoutMs: 6e4
|
|
49821
|
+
}),
|
|
49822
|
+
/**
|
|
49823
|
+
* Start a job. The same `idempotencyKey` returns the job it already
|
|
49824
|
+
* started. Answers at once (`uploading`); the upload and the submit run in
|
|
49825
|
+
* the background and the job record says how far they got.
|
|
49826
|
+
*/
|
|
49827
|
+
startJob: method(TrainingJobRequestSchema.extend({
|
|
49828
|
+
name: string().min(1).max(120),
|
|
49829
|
+
maxCostUsd: number().positive(),
|
|
49830
|
+
maxRuntimeSec: number().int().positive(),
|
|
49831
|
+
idempotencyKey: string().min(8).max(80)
|
|
49832
|
+
}), discriminatedUnion("kind", [object({
|
|
49833
|
+
kind: literal("started"),
|
|
49834
|
+
job: TrainingJobSchema
|
|
49835
|
+
}), object({
|
|
49836
|
+
kind: literal("refused"),
|
|
49837
|
+
reason: TrainingRefusalReasonSchema,
|
|
49838
|
+
detail: string()
|
|
49839
|
+
})]), {
|
|
49840
|
+
kind: "mutation",
|
|
49841
|
+
auth: "admin",
|
|
49842
|
+
timeoutMs: 12e4
|
|
49843
|
+
}),
|
|
49844
|
+
listJobs: method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }),
|
|
49845
|
+
getJob: method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }),
|
|
49846
|
+
cancelJob: method(IdInput, TrainingJobSchema, {
|
|
49847
|
+
kind: "mutation",
|
|
49848
|
+
auth: "admin",
|
|
49849
|
+
timeoutMs: 12e4
|
|
49850
|
+
}),
|
|
49851
|
+
/** The verified `result.json` of a job in `ready` or later; null before. */
|
|
49852
|
+
getJobResult: method(IdInput, TrainingResultSchema.nullable(), { auth: "admin" }),
|
|
49853
|
+
/** Hand the verified bundle to Model Studio; optionally canary right after. */
|
|
49854
|
+
registerResult: method(IdInput.extend({ canaryDeviceIds: array(number().int()).readonly() }), TrainingJobSchema, {
|
|
49855
|
+
kind: "mutation",
|
|
49856
|
+
auth: "admin",
|
|
49857
|
+
timeoutMs: 30 * 6e4
|
|
49858
|
+
}),
|
|
49859
|
+
/** Pin the registered model on these cameras, remembering what it replaced. */
|
|
49860
|
+
canaryResult: method(IdInput.extend({ deviceIds: array(number().int()).min(1).readonly() }), TrainingJobSchema, {
|
|
49861
|
+
kind: "mutation",
|
|
49862
|
+
auth: "admin",
|
|
49863
|
+
timeoutMs: 12e4
|
|
49864
|
+
}),
|
|
49865
|
+
/** Put every canary camera back exactly as it was. */
|
|
49866
|
+
rollbackCanary: method(IdInput, TrainingJobSchema, {
|
|
49867
|
+
kind: "mutation",
|
|
49868
|
+
auth: "admin",
|
|
49869
|
+
timeoutMs: 12e4
|
|
49870
|
+
}),
|
|
49871
|
+
/** Delete the staged artefacts of an unregistered result. */
|
|
49872
|
+
discardResult: method(IdInput, TrainingJobSchema, {
|
|
49873
|
+
kind: "mutation",
|
|
49874
|
+
auth: "admin"
|
|
49875
|
+
})
|
|
49876
|
+
}
|
|
49877
|
+
};
|
|
49878
|
+
/**
|
|
48466
49879
|
* Frozen unit → spec table. `•` in the doc marks each dimension's canonical
|
|
48467
49880
|
* unit (`factor: 1, offset: 0`). °F derives from `°C = (°F − 32) × 5/9` ⇒
|
|
48468
49881
|
* `factor = 5/9`, `offset = -160/9` (kept as exact expressions, not rounded
|
|
@@ -49401,6 +50814,12 @@ Object.freeze({
|
|
|
49401
50814
|
addonId: null,
|
|
49402
50815
|
access: "create"
|
|
49403
50816
|
},
|
|
50817
|
+
"backup.checkBackupKey": {
|
|
50818
|
+
capName: "backup",
|
|
50819
|
+
capScope: "system",
|
|
50820
|
+
addonId: null,
|
|
50821
|
+
access: "create"
|
|
50822
|
+
},
|
|
49404
50823
|
"backup.delete": {
|
|
49405
50824
|
capName: "backup",
|
|
49406
50825
|
capScope: "system",
|
|
@@ -49413,6 +50832,18 @@ Object.freeze({
|
|
|
49413
50832
|
addonId: null,
|
|
49414
50833
|
access: "delete"
|
|
49415
50834
|
},
|
|
50835
|
+
"backup.disableEncryption": {
|
|
50836
|
+
capName: "backup",
|
|
50837
|
+
capScope: "system",
|
|
50838
|
+
addonId: null,
|
|
50839
|
+
access: "create"
|
|
50840
|
+
},
|
|
50841
|
+
"backup.getEncryption": {
|
|
50842
|
+
capName: "backup",
|
|
50843
|
+
capScope: "system",
|
|
50844
|
+
addonId: null,
|
|
50845
|
+
access: "view"
|
|
50846
|
+
},
|
|
49416
50847
|
"backup.getEntries": {
|
|
49417
50848
|
capName: "backup",
|
|
49418
50849
|
capScope: "system",
|
|
@@ -49467,6 +50898,12 @@ Object.freeze({
|
|
|
49467
50898
|
addonId: null,
|
|
49468
50899
|
access: "create"
|
|
49469
50900
|
},
|
|
50901
|
+
"backup.setupEncryption": {
|
|
50902
|
+
capName: "backup",
|
|
50903
|
+
capScope: "system",
|
|
50904
|
+
addonId: null,
|
|
50905
|
+
access: "create"
|
|
50906
|
+
},
|
|
49470
50907
|
"backup.trigger": {
|
|
49471
50908
|
capName: "backup",
|
|
49472
50909
|
capScope: "system",
|
|
@@ -50019,6 +51456,12 @@ Object.freeze({
|
|
|
50019
51456
|
addonId: null,
|
|
50020
51457
|
access: "create"
|
|
50021
51458
|
},
|
|
51459
|
+
"customModelRegistry.importModelBundle": {
|
|
51460
|
+
capName: "custom-model-registry",
|
|
51461
|
+
capScope: "system",
|
|
51462
|
+
addonId: null,
|
|
51463
|
+
access: "create"
|
|
51464
|
+
},
|
|
50022
51465
|
"customModelRegistry.listModels": {
|
|
50023
51466
|
capName: "custom-model-registry",
|
|
50024
51467
|
capScope: "system",
|
|
@@ -51459,6 +52902,12 @@ Object.freeze({
|
|
|
51459
52902
|
addonId: null,
|
|
51460
52903
|
access: "view"
|
|
51461
52904
|
},
|
|
52905
|
+
"keychainAdmin.acknowledgeReset": {
|
|
52906
|
+
capName: "keychain-admin",
|
|
52907
|
+
capScope: "system",
|
|
52908
|
+
addonId: null,
|
|
52909
|
+
access: "create"
|
|
52910
|
+
},
|
|
51462
52911
|
"keychainAdmin.deleteOrphans": {
|
|
51463
52912
|
capName: "keychain-admin",
|
|
51464
52913
|
capScope: "system",
|
|
@@ -51495,6 +52944,12 @@ Object.freeze({
|
|
|
51495
52944
|
addonId: null,
|
|
51496
52945
|
access: "delete"
|
|
51497
52946
|
},
|
|
52947
|
+
"keychainAdmin.resetReport": {
|
|
52948
|
+
capName: "keychain-admin",
|
|
52949
|
+
capScope: "system",
|
|
52950
|
+
addonId: null,
|
|
52951
|
+
access: "delete"
|
|
52952
|
+
},
|
|
51498
52953
|
"keychainAdmin.reveal": {
|
|
51499
52954
|
capName: "keychain-admin",
|
|
51500
52955
|
capScope: "system",
|
|
@@ -53241,6 +54696,12 @@ Object.freeze({
|
|
|
53241
54696
|
addonId: null,
|
|
53242
54697
|
access: "view"
|
|
53243
54698
|
},
|
|
54699
|
+
"pipelineAnalytics.offerRetrainArchive": {
|
|
54700
|
+
capName: "pipeline-analytics",
|
|
54701
|
+
capScope: "device",
|
|
54702
|
+
addonId: null,
|
|
54703
|
+
access: "create"
|
|
54704
|
+
},
|
|
53244
54705
|
"pipelineAnalytics.ownersWithMedia": {
|
|
53245
54706
|
capName: "pipeline-analytics",
|
|
53246
54707
|
capScope: "device",
|
|
@@ -55779,6 +57240,174 @@ Object.freeze({
|
|
|
55779
57240
|
addonId: null,
|
|
55780
57241
|
access: "view"
|
|
55781
57242
|
},
|
|
57243
|
+
"training.canaryResult": {
|
|
57244
|
+
capName: "training",
|
|
57245
|
+
capScope: "system",
|
|
57246
|
+
addonId: null,
|
|
57247
|
+
access: "create"
|
|
57248
|
+
},
|
|
57249
|
+
"training.cancelJob": {
|
|
57250
|
+
capName: "training",
|
|
57251
|
+
capScope: "system",
|
|
57252
|
+
addonId: null,
|
|
57253
|
+
access: "create"
|
|
57254
|
+
},
|
|
57255
|
+
"training.discardResult": {
|
|
57256
|
+
capName: "training",
|
|
57257
|
+
capScope: "system",
|
|
57258
|
+
addonId: null,
|
|
57259
|
+
access: "create"
|
|
57260
|
+
},
|
|
57261
|
+
"training.findDatasetVersionIdByName": {
|
|
57262
|
+
capName: "training",
|
|
57263
|
+
capScope: "system",
|
|
57264
|
+
addonId: null,
|
|
57265
|
+
access: "view"
|
|
57266
|
+
},
|
|
57267
|
+
"training.getDatasetVersion": {
|
|
57268
|
+
capName: "training",
|
|
57269
|
+
capScope: "system",
|
|
57270
|
+
addonId: null,
|
|
57271
|
+
access: "view"
|
|
57272
|
+
},
|
|
57273
|
+
"training.getJob": {
|
|
57274
|
+
capName: "training",
|
|
57275
|
+
capScope: "system",
|
|
57276
|
+
addonId: null,
|
|
57277
|
+
access: "view"
|
|
57278
|
+
},
|
|
57279
|
+
"training.getJobResult": {
|
|
57280
|
+
capName: "training",
|
|
57281
|
+
capScope: "system",
|
|
57282
|
+
addonId: null,
|
|
57283
|
+
access: "view"
|
|
57284
|
+
},
|
|
57285
|
+
"training.listBaseModels": {
|
|
57286
|
+
capName: "training",
|
|
57287
|
+
capScope: "system",
|
|
57288
|
+
addonId: null,
|
|
57289
|
+
access: "view"
|
|
57290
|
+
},
|
|
57291
|
+
"training.listDatasetVersions": {
|
|
57292
|
+
capName: "training",
|
|
57293
|
+
capScope: "system",
|
|
57294
|
+
addonId: null,
|
|
57295
|
+
access: "view"
|
|
57296
|
+
},
|
|
57297
|
+
"training.listJobs": {
|
|
57298
|
+
capName: "training",
|
|
57299
|
+
capScope: "system",
|
|
57300
|
+
addonId: null,
|
|
57301
|
+
access: "view"
|
|
57302
|
+
},
|
|
57303
|
+
"training.planJob": {
|
|
57304
|
+
capName: "training",
|
|
57305
|
+
capScope: "system",
|
|
57306
|
+
addonId: null,
|
|
57307
|
+
access: "view"
|
|
57308
|
+
},
|
|
57309
|
+
"training.putDatasetVersion": {
|
|
57310
|
+
capName: "training",
|
|
57311
|
+
capScope: "system",
|
|
57312
|
+
addonId: null,
|
|
57313
|
+
access: "create"
|
|
57314
|
+
},
|
|
57315
|
+
"training.registerResult": {
|
|
57316
|
+
capName: "training",
|
|
57317
|
+
capScope: "system",
|
|
57318
|
+
addonId: null,
|
|
57319
|
+
access: "create"
|
|
57320
|
+
},
|
|
57321
|
+
"training.removeDatasetVersion": {
|
|
57322
|
+
capName: "training",
|
|
57323
|
+
capScope: "system",
|
|
57324
|
+
addonId: null,
|
|
57325
|
+
access: "delete"
|
|
57326
|
+
},
|
|
57327
|
+
"training.rollbackCanary": {
|
|
57328
|
+
capName: "training",
|
|
57329
|
+
capScope: "system",
|
|
57330
|
+
addonId: null,
|
|
57331
|
+
access: "create"
|
|
57332
|
+
},
|
|
57333
|
+
"training.startJob": {
|
|
57334
|
+
capName: "training",
|
|
57335
|
+
capScope: "system",
|
|
57336
|
+
addonId: null,
|
|
57337
|
+
access: "create"
|
|
57338
|
+
},
|
|
57339
|
+
"trainingProvider.cancelJob": {
|
|
57340
|
+
capName: "training-provider",
|
|
57341
|
+
capScope: "system",
|
|
57342
|
+
addonId: null,
|
|
57343
|
+
access: "create"
|
|
57344
|
+
},
|
|
57345
|
+
"trainingProvider.cleanupJob": {
|
|
57346
|
+
capName: "training-provider",
|
|
57347
|
+
capScope: "system",
|
|
57348
|
+
addonId: null,
|
|
57349
|
+
access: "create"
|
|
57350
|
+
},
|
|
57351
|
+
"trainingProvider.describe": {
|
|
57352
|
+
capName: "training-provider",
|
|
57353
|
+
capScope: "system",
|
|
57354
|
+
addonId: null,
|
|
57355
|
+
access: "view"
|
|
57356
|
+
},
|
|
57357
|
+
"trainingProvider.estimateJob": {
|
|
57358
|
+
capName: "training-provider",
|
|
57359
|
+
capScope: "system",
|
|
57360
|
+
addonId: null,
|
|
57361
|
+
access: "view"
|
|
57362
|
+
},
|
|
57363
|
+
"trainingProvider.getJob": {
|
|
57364
|
+
capName: "training-provider",
|
|
57365
|
+
capScope: "system",
|
|
57366
|
+
addonId: null,
|
|
57367
|
+
access: "view"
|
|
57368
|
+
},
|
|
57369
|
+
"trainingProvider.listJobEvents": {
|
|
57370
|
+
capName: "training-provider",
|
|
57371
|
+
capScope: "system",
|
|
57372
|
+
addonId: null,
|
|
57373
|
+
access: "view"
|
|
57374
|
+
},
|
|
57375
|
+
"trainingProvider.listJobs": {
|
|
57376
|
+
capName: "training-provider",
|
|
57377
|
+
capScope: "system",
|
|
57378
|
+
addonId: null,
|
|
57379
|
+
access: "view"
|
|
57380
|
+
},
|
|
57381
|
+
"trainingProvider.offerArtifact": {
|
|
57382
|
+
capName: "training-provider",
|
|
57383
|
+
capScope: "system",
|
|
57384
|
+
addonId: null,
|
|
57385
|
+
access: "create"
|
|
57386
|
+
},
|
|
57387
|
+
"trainingProvider.readResult": {
|
|
57388
|
+
capName: "training-provider",
|
|
57389
|
+
capScope: "system",
|
|
57390
|
+
addonId: null,
|
|
57391
|
+
access: "create"
|
|
57392
|
+
},
|
|
57393
|
+
"trainingProvider.submitJob": {
|
|
57394
|
+
capName: "training-provider",
|
|
57395
|
+
capScope: "system",
|
|
57396
|
+
addonId: null,
|
|
57397
|
+
access: "create"
|
|
57398
|
+
},
|
|
57399
|
+
"trainingProvider.uploadDataset": {
|
|
57400
|
+
capName: "training-provider",
|
|
57401
|
+
capScope: "system",
|
|
57402
|
+
addonId: null,
|
|
57403
|
+
access: "create"
|
|
57404
|
+
},
|
|
57405
|
+
"trainingProvider.validateCredentials": {
|
|
57406
|
+
capName: "training-provider",
|
|
57407
|
+
capScope: "system",
|
|
57408
|
+
addonId: null,
|
|
57409
|
+
access: "create"
|
|
57410
|
+
},
|
|
55782
57411
|
"turnProvider.getTurnServers": {
|
|
55783
57412
|
capName: "turn-provider",
|
|
55784
57413
|
capScope: "system",
|
|
@@ -55803,12 +57432,6 @@ Object.freeze({
|
|
|
55803
57432
|
addonId: null,
|
|
55804
57433
|
access: "create"
|
|
55805
57434
|
},
|
|
55806
|
-
"userManagement.createApiKey": {
|
|
55807
|
-
capName: "user-management",
|
|
55808
|
-
capScope: "system",
|
|
55809
|
-
addonId: null,
|
|
55810
|
-
access: "create"
|
|
55811
|
-
},
|
|
55812
57435
|
"userManagement.createScopedToken": {
|
|
55813
57436
|
capName: "user-management",
|
|
55814
57437
|
capScope: "system",
|
|
@@ -55845,12 +57468,6 @@ Object.freeze({
|
|
|
55845
57468
|
addonId: null,
|
|
55846
57469
|
access: "view"
|
|
55847
57470
|
},
|
|
55848
|
-
"userManagement.linkExternalIdentity": {
|
|
55849
|
-
capName: "user-management",
|
|
55850
|
-
capScope: "system",
|
|
55851
|
-
addonId: null,
|
|
55852
|
-
access: "create"
|
|
55853
|
-
},
|
|
55854
57471
|
"userManagement.listApiKeys": {
|
|
55855
57472
|
capName: "user-management",
|
|
55856
57473
|
capScope: "system",
|
|
@@ -55953,12 +57570,6 @@ Object.freeze({
|
|
|
55953
57570
|
addonId: null,
|
|
55954
57571
|
access: "create"
|
|
55955
57572
|
},
|
|
55956
|
-
"userManagement.validateApiKey": {
|
|
55957
|
-
capName: "user-management",
|
|
55958
|
-
capScope: "system",
|
|
55959
|
-
addonId: null,
|
|
55960
|
-
access: "view"
|
|
55961
|
-
},
|
|
55962
57573
|
"userManagement.validateCredentials": {
|
|
55963
57574
|
capName: "user-management",
|
|
55964
57575
|
capScope: "system",
|
|
@@ -57872,6 +59483,8 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
57872
59483
|
temperatureSensorCapability,
|
|
57873
59484
|
terminalSessionCapability,
|
|
57874
59485
|
toastCapability,
|
|
59486
|
+
trainingCapability,
|
|
59487
|
+
trainingProviderCapability,
|
|
57875
59488
|
turnProviderCapability,
|
|
57876
59489
|
updateCapability,
|
|
57877
59490
|
userManagementCapability,
|
|
@@ -60250,6 +61863,11 @@ Object.freeze({
|
|
|
60250
61863
|
form: "single",
|
|
60251
61864
|
optional: false
|
|
60252
61865
|
}],
|
|
61866
|
+
"training.canaryResult": [{
|
|
61867
|
+
name: "deviceIds",
|
|
61868
|
+
form: "array",
|
|
61869
|
+
optional: false
|
|
61870
|
+
}],
|
|
60253
61871
|
"update.getStatus": [{
|
|
60254
61872
|
name: "deviceId",
|
|
60255
61873
|
form: "single",
|