@camstack/addon-provider-hikvision 1.2.147 → 1.2.149
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/addon.js +1780 -132
- package/dist/addon.mjs +1780 -132
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -5411,7 +5411,7 @@ var ZodIssueCode = {
|
|
|
5411
5411
|
var ZodFirstPartyTypeKind;
|
|
5412
5412
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5413
5413
|
//#endregion
|
|
5414
|
-
//#region ../types/dist/sleep-
|
|
5414
|
+
//#region ../types/dist/sleep-r3RWkGVx.mjs
|
|
5415
5415
|
/**
|
|
5416
5416
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5417
5417
|
* window to float samples (D455).
|
|
@@ -5528,7 +5528,7 @@ function isKeychainStoredField(field) {
|
|
|
5528
5528
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5529
5529
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5530
5530
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5531
|
-
function isRecord$
|
|
5531
|
+
function isRecord$2(value) {
|
|
5532
5532
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5533
5533
|
}
|
|
5534
5534
|
function makeSecretMarker(ref) {
|
|
@@ -5539,12 +5539,12 @@ function makeSecretMarker(ref) {
|
|
|
5539
5539
|
}
|
|
5540
5540
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5541
5541
|
function isSecretMarker(value) {
|
|
5542
|
-
if (!isRecord$
|
|
5542
|
+
if (!isRecord$2(value)) return false;
|
|
5543
5543
|
const ref = value["$secret"];
|
|
5544
5544
|
return typeof ref === "string" && ref.length > 0;
|
|
5545
5545
|
}
|
|
5546
5546
|
function isSecretClear(value) {
|
|
5547
|
-
return isRecord$
|
|
5547
|
+
return isRecord$2(value) && value["$secretClear"] === true;
|
|
5548
5548
|
}
|
|
5549
5549
|
/**
|
|
5550
5550
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6060,6 +6060,13 @@ function globalSecretScope() {
|
|
|
6060
6060
|
function encodeSegment(value) {
|
|
6061
6061
|
return encodeURIComponent(value);
|
|
6062
6062
|
}
|
|
6063
|
+
function decodeSegment(value) {
|
|
6064
|
+
try {
|
|
6065
|
+
return decodeURIComponent(value);
|
|
6066
|
+
} catch {
|
|
6067
|
+
return null;
|
|
6068
|
+
}
|
|
6069
|
+
}
|
|
6063
6070
|
/**
|
|
6064
6071
|
* The field path of a value inside an array item, addressed by the item's id:
|
|
6065
6072
|
* `arrayItemFieldPath('providers', 'authentik', 'clientSecret')` →
|
|
@@ -6068,6 +6075,75 @@ function encodeSegment(value) {
|
|
|
6068
6075
|
function arrayItemFieldPath(arrayKey, itemId, fieldKey) {
|
|
6069
6076
|
return `${arrayKey}[${encodeSegment(itemId)}].${fieldKey}`;
|
|
6070
6077
|
}
|
|
6078
|
+
function parseScope(segments) {
|
|
6079
|
+
switch (segments[0]) {
|
|
6080
|
+
case "global": return {
|
|
6081
|
+
scope: GLOBAL_SCOPE,
|
|
6082
|
+
used: 1
|
|
6083
|
+
};
|
|
6084
|
+
case "node": {
|
|
6085
|
+
const nodeId = segments[1] !== void 0 ? decodeSegment(segments[1]) : null;
|
|
6086
|
+
return nodeId === null || nodeId.length === 0 ? null : {
|
|
6087
|
+
scope: {
|
|
6088
|
+
kind: "node",
|
|
6089
|
+
nodeId
|
|
6090
|
+
},
|
|
6091
|
+
used: 2
|
|
6092
|
+
};
|
|
6093
|
+
}
|
|
6094
|
+
case "device": {
|
|
6095
|
+
const raw = segments[1];
|
|
6096
|
+
if (raw === void 0 || !/^\d+$/.test(raw)) return null;
|
|
6097
|
+
return {
|
|
6098
|
+
scope: {
|
|
6099
|
+
kind: "device",
|
|
6100
|
+
deviceId: Number(raw)
|
|
6101
|
+
},
|
|
6102
|
+
used: 2
|
|
6103
|
+
};
|
|
6104
|
+
}
|
|
6105
|
+
case "integration": {
|
|
6106
|
+
const id = segments[1] !== void 0 ? decodeSegment(segments[1]) : null;
|
|
6107
|
+
return id === null || id.length === 0 ? null : {
|
|
6108
|
+
scope: {
|
|
6109
|
+
kind: "integration",
|
|
6110
|
+
integrationId: id
|
|
6111
|
+
},
|
|
6112
|
+
used: 2
|
|
6113
|
+
};
|
|
6114
|
+
}
|
|
6115
|
+
case "row": {
|
|
6116
|
+
const collection = segments[1] !== void 0 ? decodeSegment(segments[1]) : null;
|
|
6117
|
+
const rowId = segments[2] !== void 0 ? decodeSegment(segments[2]) : null;
|
|
6118
|
+
if (collection === null || rowId === null || collection.length === 0 || rowId.length === 0) return null;
|
|
6119
|
+
return {
|
|
6120
|
+
scope: {
|
|
6121
|
+
kind: "row",
|
|
6122
|
+
collection,
|
|
6123
|
+
rowId
|
|
6124
|
+
},
|
|
6125
|
+
used: 3
|
|
6126
|
+
};
|
|
6127
|
+
}
|
|
6128
|
+
default: return null;
|
|
6129
|
+
}
|
|
6130
|
+
}
|
|
6131
|
+
/** Take a ref apart; `null` when it is not a well-formed ref. */
|
|
6132
|
+
function parseSecretRef(ref) {
|
|
6133
|
+
if (!ref.startsWith("secret://")) return null;
|
|
6134
|
+
const segments = ref.slice(9).split("/");
|
|
6135
|
+
const owner = segments[0] !== void 0 ? decodeSegment(segments[0]) : null;
|
|
6136
|
+
if (owner === null || owner.length === 0) return null;
|
|
6137
|
+
const parsed = parseScope(segments.slice(1));
|
|
6138
|
+
if (parsed === null) return null;
|
|
6139
|
+
const fieldPath = segments.slice(1 + parsed.used).join("/");
|
|
6140
|
+
if (fieldPath.length === 0) return null;
|
|
6141
|
+
return {
|
|
6142
|
+
owner,
|
|
6143
|
+
scope: parsed.scope,
|
|
6144
|
+
fieldPath
|
|
6145
|
+
};
|
|
6146
|
+
}
|
|
6071
6147
|
/** A write to a secret path could not be stored in the keychain, so it was refused. */
|
|
6072
6148
|
var KeychainWriteRefusedError = class extends Error {
|
|
6073
6149
|
fieldPath;
|
|
@@ -6078,7 +6154,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6078
6154
|
}
|
|
6079
6155
|
};
|
|
6080
6156
|
var KEEP = { kind: "keep" };
|
|
6081
|
-
function isRecord(value) {
|
|
6157
|
+
function isRecord$1(value) {
|
|
6082
6158
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6083
6159
|
}
|
|
6084
6160
|
function defaultMintId() {
|
|
@@ -6091,7 +6167,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6091
6167
|
return out;
|
|
6092
6168
|
}
|
|
6093
6169
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6094
|
-
else if (isRecord(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6170
|
+
else if (isRecord$1(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6095
6171
|
return out;
|
|
6096
6172
|
}
|
|
6097
6173
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6146,7 +6222,7 @@ function rowId(row, idKey) {
|
|
|
6146
6222
|
return null;
|
|
6147
6223
|
}
|
|
6148
6224
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6149
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord) : [];
|
|
6225
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$1) : [];
|
|
6150
6226
|
if (!Array.isArray(incoming)) {
|
|
6151
6227
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6152
6228
|
return {
|
|
@@ -6162,7 +6238,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6162
6238
|
const kept = /* @__PURE__ */ new Set();
|
|
6163
6239
|
const rows = [];
|
|
6164
6240
|
for (const row of incoming) {
|
|
6165
|
-
if (!isRecord(row)) {
|
|
6241
|
+
if (!isRecord$1(row)) {
|
|
6166
6242
|
rows.push(row);
|
|
6167
6243
|
continue;
|
|
6168
6244
|
}
|
|
@@ -6187,7 +6263,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6187
6263
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6188
6264
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6189
6265
|
case "object": {
|
|
6190
|
-
if (!isRecord(incoming)) {
|
|
6266
|
+
if (!isRecord$1(incoming)) {
|
|
6191
6267
|
if (incoming === void 0) return KEEP;
|
|
6192
6268
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6193
6269
|
return {
|
|
@@ -6195,7 +6271,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6195
6271
|
value: incoming
|
|
6196
6272
|
};
|
|
6197
6273
|
}
|
|
6198
|
-
const storedObj = isRecord(stored) ? stored : {};
|
|
6274
|
+
const storedObj = isRecord$1(stored) ? stored : {};
|
|
6199
6275
|
return {
|
|
6200
6276
|
kind: "value",
|
|
6201
6277
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6254,12 +6330,19 @@ async function transformSecretWrite(input) {
|
|
|
6254
6330
|
}
|
|
6255
6331
|
};
|
|
6256
6332
|
}
|
|
6333
|
+
/** Is `ref` one of `owner`'s refs? */
|
|
6334
|
+
function isSecretRefOwnedBy(ref, owner) {
|
|
6335
|
+
return parseSecretRef(ref)?.owner === owner;
|
|
6336
|
+
}
|
|
6257
6337
|
/**
|
|
6258
6338
|
* Replace every marker in `value` with its keychain value. Returns the SAME
|
|
6259
6339
|
* reference when there is no marker (no allocation, no keychain call).
|
|
6260
6340
|
*/
|
|
6261
|
-
async function resolveSecretMarkers(value, secrets) {
|
|
6262
|
-
const
|
|
6341
|
+
async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
6342
|
+
const keepMarker = options.unresolved === "keep-marker";
|
|
6343
|
+
const owner = options.ownedBy;
|
|
6344
|
+
const inScope = (ref) => owner === void 0 || isSecretRefOwnedBy(ref, owner);
|
|
6345
|
+
const refs = collectSecretMarkerRefs(value).filter(inScope);
|
|
6263
6346
|
if (refs.length === 0) return {
|
|
6264
6347
|
value,
|
|
6265
6348
|
unresolved: []
|
|
@@ -6283,10 +6366,18 @@ async function resolveSecretMarkers(value, secrets) {
|
|
|
6283
6366
|
}
|
|
6284
6367
|
const substitute = (v) => {
|
|
6285
6368
|
if (isSecretMarker(v)) {
|
|
6369
|
+
if (!inScope(v.$secret)) return {
|
|
6370
|
+
keep: true,
|
|
6371
|
+
value: v
|
|
6372
|
+
};
|
|
6286
6373
|
const answer = answers[v.$secret];
|
|
6287
|
-
|
|
6374
|
+
if (answer?.kind === "value") return {
|
|
6288
6375
|
keep: true,
|
|
6289
6376
|
value: answer.value
|
|
6377
|
+
};
|
|
6378
|
+
return keepMarker ? {
|
|
6379
|
+
keep: true,
|
|
6380
|
+
value: v
|
|
6290
6381
|
} : {
|
|
6291
6382
|
keep: false,
|
|
6292
6383
|
value: void 0
|
|
@@ -6303,7 +6394,7 @@ async function resolveSecretMarkers(value, secrets) {
|
|
|
6303
6394
|
value: items
|
|
6304
6395
|
};
|
|
6305
6396
|
}
|
|
6306
|
-
if (isRecord(v)) {
|
|
6397
|
+
if (isRecord$1(v)) {
|
|
6307
6398
|
const out = {};
|
|
6308
6399
|
for (const [k, child] of Object.entries(v)) {
|
|
6309
6400
|
const s = substitute(child);
|
|
@@ -6324,14 +6415,152 @@ async function resolveSecretMarkers(value, secrets) {
|
|
|
6324
6415
|
unresolved
|
|
6325
6416
|
};
|
|
6326
6417
|
}
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6418
|
+
/** An addon tried to replace a stored secret it could not read. Nothing was written. */
|
|
6419
|
+
var SecretOverwriteRefusedError = class extends Error {
|
|
6420
|
+
ref;
|
|
6421
|
+
reason;
|
|
6422
|
+
constructor(ref, reason) {
|
|
6423
|
+
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.`);
|
|
6424
|
+
this.ref = ref;
|
|
6425
|
+
this.reason = reason;
|
|
6426
|
+
this.name = "SecretOverwriteRefusedError";
|
|
6427
|
+
}
|
|
6428
|
+
};
|
|
6429
|
+
function isRecord(value) {
|
|
6430
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6431
|
+
}
|
|
6432
|
+
function resolvedValue(pass, marker) {
|
|
6433
|
+
const answer = pass.answers[marker.$secret];
|
|
6434
|
+
return answer?.kind === "value" ? answer.value : null;
|
|
6435
|
+
}
|
|
6436
|
+
async function atMarker(pass, incoming, stored) {
|
|
6437
|
+
if (incoming === null) return stored;
|
|
6438
|
+
if (typeof incoming !== "string") return incoming;
|
|
6439
|
+
if (incoming === resolvedValue(pass, stored)) return stored;
|
|
6440
|
+
const intent = classifySecretWrite(incoming);
|
|
6441
|
+
if (intent.kind !== "set") return stored;
|
|
6442
|
+
const ref = stored.$secret;
|
|
6443
|
+
if (!isSecretRefOwnedBy(ref, pass.secrets.owner)) return incoming;
|
|
6444
|
+
const answer = pass.answers[ref];
|
|
6445
|
+
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);
|
|
6446
|
+
try {
|
|
6447
|
+
await pass.secrets.put(ref, intent.value);
|
|
6448
|
+
} catch (err) {
|
|
6449
|
+
throw new KeychainWriteRefusedError(ref, err);
|
|
6450
|
+
}
|
|
6451
|
+
pass.changedRefs.push(ref);
|
|
6452
|
+
return stored;
|
|
6453
|
+
}
|
|
6454
|
+
function inArray(pass, incoming, stored) {
|
|
6455
|
+
return incoming.map((item, index) => {
|
|
6456
|
+
const twin = stored[index];
|
|
6457
|
+
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6458
|
+
if (isRecord(item) && isRecord(twin)) return inArrayRow(pass, item, twin);
|
|
6459
|
+
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6460
|
+
return item;
|
|
6461
|
+
});
|
|
6462
|
+
}
|
|
6463
|
+
function inArrayRow(pass, incoming, stored) {
|
|
6464
|
+
const out = { ...incoming };
|
|
6465
|
+
for (const [key, value] of Object.entries(incoming)) {
|
|
6466
|
+
const twin = stored[key];
|
|
6467
|
+
if (isSecretMarker(twin)) {
|
|
6468
|
+
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6469
|
+
} else if (isRecord(value) && isRecord(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6470
|
+
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6471
|
+
}
|
|
6472
|
+
return out;
|
|
6473
|
+
}
|
|
6474
|
+
async function walk(pass, incoming, stored) {
|
|
6475
|
+
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6476
|
+
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6477
|
+
if (!isRecord(incoming) || !isRecord(stored)) return incoming;
|
|
6478
|
+
const out = { ...incoming };
|
|
6479
|
+
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6480
|
+
return out;
|
|
6481
|
+
}
|
|
6482
|
+
/** Restore markers a write-back carries as values. See the file doc. */
|
|
6483
|
+
async function restoreUnchangedSecrets(input) {
|
|
6484
|
+
const refs = [];
|
|
6485
|
+
for (const key of Object.keys(input.patch)) collectSecretMarkerRefs(input.stored[key], refs);
|
|
6486
|
+
const owned = refs.filter((ref) => isSecretRefOwnedBy(ref, input.secrets.owner));
|
|
6487
|
+
if (owned.length === 0) return {
|
|
6488
|
+
patch: input.patch,
|
|
6489
|
+
changedRefs: []
|
|
6490
|
+
};
|
|
6491
|
+
const pass = {
|
|
6492
|
+
secrets: input.secrets,
|
|
6493
|
+
answers: await input.secrets.resolve([...new Set(owned)]),
|
|
6494
|
+
operatorWrite: input.operatorWrite,
|
|
6495
|
+
changedRefs: []
|
|
6496
|
+
};
|
|
6497
|
+
const out = {};
|
|
6498
|
+
for (const [key, value] of Object.entries(input.patch)) out[key] = await walk(pass, value, input.stored[key]);
|
|
6499
|
+
return {
|
|
6500
|
+
patch: out,
|
|
6501
|
+
changedRefs: pass.changedRefs
|
|
6502
|
+
};
|
|
6503
|
+
}
|
|
6504
|
+
/** Structural equality over JSON-shaped values (key order does not matter). */
|
|
6505
|
+
function isJsonEqual(a, b) {
|
|
6506
|
+
if (Object.is(a, b)) return true;
|
|
6507
|
+
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6508
|
+
if (isRecord(a) && isRecord(b)) {
|
|
6509
|
+
const keys = Object.keys(a);
|
|
6510
|
+
if (keys.length !== Object.keys(b).length) return false;
|
|
6511
|
+
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
6332
6512
|
}
|
|
6333
6513
|
return false;
|
|
6334
6514
|
}
|
|
6515
|
+
/** The patch without the keys whose value already equals the stored one. */
|
|
6516
|
+
function dropUnchangedKeys(patch, stored) {
|
|
6517
|
+
const out = {};
|
|
6518
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
6519
|
+
if (Object.prototype.hasOwnProperty.call(stored, key) && isJsonEqual(value, stored[key])) continue;
|
|
6520
|
+
out[key] = value;
|
|
6521
|
+
}
|
|
6522
|
+
return out;
|
|
6523
|
+
}
|
|
6524
|
+
/** The top-level keys of a blob that hold at least one of `owner`'s markers. */
|
|
6525
|
+
function markerKeysOf(blob, owner) {
|
|
6526
|
+
const keys = /* @__PURE__ */ new Set();
|
|
6527
|
+
for (const [key, value] of Object.entries(blob)) if (collectSecretMarkerRefs(value).some((ref) => isSecretRefOwnedBy(ref, owner))) keys.add(key);
|
|
6528
|
+
return keys;
|
|
6529
|
+
}
|
|
6530
|
+
function nodeFromStored(value, owner) {
|
|
6531
|
+
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6532
|
+
if (!isRecord(value)) return null;
|
|
6533
|
+
const children = /* @__PURE__ */ new Map();
|
|
6534
|
+
for (const [key, child] of Object.entries(value)) {
|
|
6535
|
+
const node = nodeFromStored(child, owner);
|
|
6536
|
+
if (node !== null) children.set(key, node);
|
|
6537
|
+
}
|
|
6538
|
+
return children.size > 0 ? {
|
|
6539
|
+
kind: "object",
|
|
6540
|
+
children
|
|
6541
|
+
} : null;
|
|
6542
|
+
}
|
|
6543
|
+
/**
|
|
6544
|
+
* The declared secret tree, widened by every place the STORED blob holds a
|
|
6545
|
+
* marker under one of `keys` — so a marker the schema no longer declares (or
|
|
6546
|
+
* never declared: Wyze before b4906cec6) still gets the save path's
|
|
6547
|
+
* KEEP / SET / CLEAR semantics instead of being overwritten by whatever the
|
|
6548
|
+
* addon writes. Markers inside arrays are not added: a row has no id field to
|
|
6549
|
+
* match by unless the schema declares one. Only `owner`'s markers count: a
|
|
6550
|
+
* builtin that keeps another addon's marker (device-manager) never takes it
|
|
6551
|
+
* over.
|
|
6552
|
+
*/
|
|
6553
|
+
function widenTreeWithStoredMarkers(declared, stored, keys, owner) {
|
|
6554
|
+
const added = /* @__PURE__ */ new Map();
|
|
6555
|
+
for (const key of keys) {
|
|
6556
|
+
const at = key.indexOf("@");
|
|
6557
|
+
const base = at > 0 ? key.slice(0, at) : key;
|
|
6558
|
+
if (declared.has(base) || added.has(base)) continue;
|
|
6559
|
+
const node = nodeFromStored(stored[key], owner);
|
|
6560
|
+
if (node !== null) added.set(base, node);
|
|
6561
|
+
}
|
|
6562
|
+
return added.size === 0 ? declared : new Map([...declared, ...added]);
|
|
6563
|
+
}
|
|
6335
6564
|
/** The blob as stored now; a failed read REFUSES the write instead of guessing. */
|
|
6336
6565
|
async function readStoredAddonBlob(raw) {
|
|
6337
6566
|
const threeWay = raw.readAddonStoreResult;
|
|
@@ -6340,7 +6569,41 @@ async function readStoredAddonBlob(raw) {
|
|
|
6340
6569
|
if (result.kind === "failed") throw new Error(`settings write refused: the stored blob could not be read (${result.error})`);
|
|
6341
6570
|
return result.kind === "missing" ? {} : result.value;
|
|
6342
6571
|
}
|
|
6343
|
-
function
|
|
6572
|
+
function touchesTree(tree, patch) {
|
|
6573
|
+
if (tree.size === 0) return false;
|
|
6574
|
+
for (const key of Object.keys(patch)) {
|
|
6575
|
+
const at = key.indexOf("@");
|
|
6576
|
+
if (tree.has(at > 0 ? key.slice(0, at) : key)) return true;
|
|
6577
|
+
}
|
|
6578
|
+
return false;
|
|
6579
|
+
}
|
|
6580
|
+
/**
|
|
6581
|
+
* Which top-level keys of each store held markers when last seen. `undefined`
|
|
6582
|
+
* for a store not seen yet: its first write reads it, to be safe.
|
|
6583
|
+
*/
|
|
6584
|
+
var MarkerKeyIndex = class {
|
|
6585
|
+
owner;
|
|
6586
|
+
byStore = /* @__PURE__ */ new Map();
|
|
6587
|
+
constructor(owner) {
|
|
6588
|
+
this.owner = owner;
|
|
6589
|
+
}
|
|
6590
|
+
seen(store, blob) {
|
|
6591
|
+
this.byStore.set(store, markerKeysOf(blob, this.owner));
|
|
6592
|
+
}
|
|
6593
|
+
wrote(store, patch) {
|
|
6594
|
+
const keys = this.byStore.get(store);
|
|
6595
|
+
if (keys === void 0) return;
|
|
6596
|
+
const now = markerKeysOf(patch, this.owner);
|
|
6597
|
+
for (const key of Object.keys(patch)) if (now.has(key)) keys.add(key);
|
|
6598
|
+
else keys.delete(key);
|
|
6599
|
+
}
|
|
6600
|
+
mayHoldMarkers(store, patch) {
|
|
6601
|
+
const keys = this.byStore.get(store);
|
|
6602
|
+
if (keys === void 0) return true;
|
|
6603
|
+
return Object.keys(patch).some((key) => keys.has(key));
|
|
6604
|
+
}
|
|
6605
|
+
};
|
|
6606
|
+
function createHandle(raw, opts) {
|
|
6344
6607
|
const chains = /* @__PURE__ */ new Map();
|
|
6345
6608
|
const serialize = (key, fn) => {
|
|
6346
6609
|
const next = (chains.get(key) ?? Promise.resolve()).then(fn, fn);
|
|
@@ -6351,46 +6614,130 @@ function createSecretAwareSettings(raw, opts) {
|
|
|
6351
6614
|
});
|
|
6352
6615
|
return next;
|
|
6353
6616
|
};
|
|
6354
|
-
const
|
|
6355
|
-
|
|
6356
|
-
|
|
6617
|
+
const index = new MarkerKeyIndex(opts.secrets.owner);
|
|
6618
|
+
const resolveRead = async (store, blob) => {
|
|
6619
|
+
index.seen(store, blob);
|
|
6620
|
+
const { value, unresolved } = await resolveSecretMarkers(blob, opts.secrets, {
|
|
6621
|
+
unresolved: "keep-marker",
|
|
6622
|
+
ownedBy: opts.secrets.owner
|
|
6623
|
+
});
|
|
6624
|
+
if (unresolved.length > 0) opts.onUnresolved?.(unresolved);
|
|
6625
|
+
return value;
|
|
6626
|
+
};
|
|
6627
|
+
const write = async (store, declared, scope, patch, readStored, rawWrite) => {
|
|
6628
|
+
if (!touchesTree(declared, patch) && !index.mayHoldMarkers(store, patch)) {
|
|
6629
|
+
await rawWrite(patch);
|
|
6630
|
+
index.wrote(store, patch);
|
|
6631
|
+
return { changed: true };
|
|
6632
|
+
}
|
|
6633
|
+
return serialize(store, async () => {
|
|
6357
6634
|
const stored = await readStored();
|
|
6635
|
+
index.seen(store, stored);
|
|
6636
|
+
const operatorWrite = opts.isOperatorWrite?.() === true;
|
|
6637
|
+
const restored = await restoreUnchangedSecrets({
|
|
6638
|
+
patch,
|
|
6639
|
+
stored,
|
|
6640
|
+
secrets: opts.secrets,
|
|
6641
|
+
operatorWrite
|
|
6642
|
+
});
|
|
6358
6643
|
const result = await transformSecretWrite({
|
|
6359
|
-
tree,
|
|
6644
|
+
tree: widenTreeWithStoredMarkers(declared, stored, Object.keys(restored.patch), opts.secrets.owner),
|
|
6360
6645
|
secrets: opts.secrets,
|
|
6361
|
-
patch,
|
|
6646
|
+
patch: restored.patch,
|
|
6362
6647
|
stored,
|
|
6363
6648
|
...scope !== void 0 ? { scope } : {},
|
|
6364
|
-
operatorWrite
|
|
6649
|
+
operatorWrite
|
|
6365
6650
|
});
|
|
6366
|
-
|
|
6651
|
+
const effective = dropUnchangedKeys(result.patch, stored);
|
|
6652
|
+
const wroteBlob = Object.keys(effective).length > 0;
|
|
6653
|
+
if (wroteBlob) {
|
|
6654
|
+
await rawWrite(effective);
|
|
6655
|
+
index.wrote(store, effective);
|
|
6656
|
+
}
|
|
6367
6657
|
const { orphaned } = await result.afterWrite();
|
|
6368
6658
|
if (orphaned.length > 0) opts.onOrphaned(orphaned);
|
|
6659
|
+
return { changed: wroteBlob || restored.changedRefs.length > 0 };
|
|
6369
6660
|
});
|
|
6370
6661
|
};
|
|
6371
|
-
const
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6662
|
+
const writeAddon = (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p));
|
|
6663
|
+
const readAddonStoreResult = raw.readAddonStoreResult;
|
|
6664
|
+
const readAddonStoreKeyResult = raw.readAddonStoreKeyResult;
|
|
6665
|
+
const readDeviceStoreBatch = raw.readDeviceStoreBatch;
|
|
6666
|
+
const overrides = {
|
|
6667
|
+
readAddonStore: async () => resolveRead("addon", await raw.readAddonStore()),
|
|
6668
|
+
...readAddonStoreResult !== void 0 ? { readAddonStoreResult: async () => {
|
|
6669
|
+
const result = await readAddonStoreResult.call(raw);
|
|
6670
|
+
return result.kind === "value" ? {
|
|
6671
|
+
kind: "value",
|
|
6672
|
+
value: await resolveRead("addon", result.value)
|
|
6673
|
+
} : result;
|
|
6674
|
+
} } : {},
|
|
6675
|
+
...readAddonStoreKeyResult !== void 0 ? { readAddonStoreKeyResult: async (key) => {
|
|
6676
|
+
const result = await readAddonStoreKeyResult.call(raw, key);
|
|
6677
|
+
if (result.kind !== "present") return result;
|
|
6678
|
+
const { value, unresolved } = await resolveSecretMarkers({ [key]: result.value }, opts.secrets, {
|
|
6679
|
+
unresolved: "keep-marker",
|
|
6680
|
+
ownedBy: opts.secrets.owner
|
|
6681
|
+
});
|
|
6682
|
+
if (unresolved.length > 0) opts.onUnresolved?.(unresolved);
|
|
6683
|
+
return {
|
|
6684
|
+
kind: "present",
|
|
6685
|
+
value: value[key]
|
|
6686
|
+
};
|
|
6687
|
+
} } : {},
|
|
6688
|
+
readDeviceStore: async (deviceId) => resolveRead(`device:${deviceId}`, await raw.readDeviceStore(deviceId)),
|
|
6689
|
+
...readDeviceStoreBatch !== void 0 ? { readDeviceStoreBatch: async (deviceIds) => {
|
|
6690
|
+
const rows = await readDeviceStoreBatch.call(raw, deviceIds);
|
|
6691
|
+
const out = /* @__PURE__ */ new Map();
|
|
6692
|
+
for (const [deviceId, blob] of rows) out.set(deviceId, await resolveRead(`device:${deviceId}`, blob));
|
|
6693
|
+
return out;
|
|
6694
|
+
} } : {},
|
|
6695
|
+
writeAddonStore: async (patch) => {
|
|
6696
|
+
await writeAddon(patch);
|
|
6697
|
+
},
|
|
6698
|
+
writeDeviceStore: async (deviceId, patch) => {
|
|
6699
|
+
await write(`device:${deviceId}`, opts.deviceTree(), {
|
|
6700
|
+
kind: "device",
|
|
6701
|
+
deviceId
|
|
6702
|
+
}, patch, () => raw.readDeviceStore(deviceId), (p) => raw.writeDeviceStore(deviceId, p));
|
|
6703
|
+
}
|
|
6704
|
+
};
|
|
6705
|
+
return {
|
|
6706
|
+
settings: new Proxy(raw, { get(target, prop, receiver) {
|
|
6707
|
+
if (typeof prop === "string" && Object.prototype.hasOwnProperty.call(overrides, prop)) return Reflect.get(overrides, prop);
|
|
6708
|
+
const value = Reflect.get(target, prop, receiver);
|
|
6709
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
6710
|
+
} }),
|
|
6711
|
+
raw: {
|
|
6712
|
+
readAddonStore: async () => {
|
|
6713
|
+
const blob = await raw.readAddonStore();
|
|
6714
|
+
index.seen("addon", blob);
|
|
6715
|
+
return blob;
|
|
6716
|
+
},
|
|
6717
|
+
readDeviceStore: async (deviceId) => {
|
|
6718
|
+
const blob = await raw.readDeviceStore(deviceId);
|
|
6719
|
+
index.seen(`device:${deviceId}`, blob);
|
|
6720
|
+
return blob;
|
|
6721
|
+
}
|
|
6722
|
+
},
|
|
6723
|
+
writeAddonStore: writeAddon
|
|
6377
6724
|
};
|
|
6378
|
-
return new Proxy(raw, { get(target, prop, receiver) {
|
|
6379
|
-
if (prop === "writeAddonStore") return wrapped.writeAddonStore;
|
|
6380
|
-
if (prop === "writeDeviceStore") return wrapped.writeDeviceStore;
|
|
6381
|
-
const value = Reflect.get(target, prop, receiver);
|
|
6382
|
-
return typeof value === "function" ? value.bind(target) : value;
|
|
6383
|
-
} });
|
|
6384
6725
|
}
|
|
6385
|
-
/** The context the addon sees
|
|
6386
|
-
function
|
|
6726
|
+
/** The context the addon sees, plus the private raw view and write outcome. */
|
|
6727
|
+
function createSecretAwareContext(context, opts) {
|
|
6387
6728
|
const raw = context.settings;
|
|
6388
|
-
if (raw === void 0) return
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6729
|
+
if (raw === void 0) return {
|
|
6730
|
+
context,
|
|
6731
|
+
handle: null
|
|
6732
|
+
};
|
|
6733
|
+
const handle = createHandle(raw, opts);
|
|
6734
|
+
return {
|
|
6735
|
+
context: new Proxy(context, { get(target, prop, receiver) {
|
|
6736
|
+
if (prop === "settings") return handle.settings;
|
|
6737
|
+
return Reflect.get(target, prop, receiver);
|
|
6738
|
+
} }),
|
|
6739
|
+
handle
|
|
6740
|
+
};
|
|
6394
6741
|
}
|
|
6395
6742
|
var LEAF = { kind: "leaf" };
|
|
6396
6743
|
var DEFAULT_ITEM_ID_KEY = "id";
|
|
@@ -6565,6 +6912,14 @@ var BaseAddon = class {
|
|
|
6565
6912
|
_secretChangeUnsub = null;
|
|
6566
6913
|
/** >0 while an OPERATOR's settings write is being applied. */
|
|
6567
6914
|
_operatorWriteDepth = 0;
|
|
6915
|
+
/**
|
|
6916
|
+
* The keychain-aware settings handle (D798). Its `raw` view is the ONLY way
|
|
6917
|
+
* to the marker-bearing blobs and stays private to this class: the form
|
|
6918
|
+
* hydrate and config resolution need markers, addon code never does.
|
|
6919
|
+
*/
|
|
6920
|
+
_secretSettings = null;
|
|
6921
|
+
/** Refs an addon-facing read could not resolve — each is logged once per process. */
|
|
6922
|
+
_loggedUnresolvedReads = /* @__PURE__ */ new Set();
|
|
6568
6923
|
constructor(defaults) {
|
|
6569
6924
|
this.defaults = defaults;
|
|
6570
6925
|
this._config = { ...defaults };
|
|
@@ -6601,13 +6956,21 @@ var BaseAddon = class {
|
|
|
6601
6956
|
}
|
|
6602
6957
|
async initialize(context) {
|
|
6603
6958
|
const secrets = context.secrets;
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6959
|
+
if (secrets !== void 0) {
|
|
6960
|
+
const { context: wrapped, handle } = createSecretAwareContext(context, {
|
|
6961
|
+
secrets,
|
|
6962
|
+
addonTree: () => this.addonSecretTree(),
|
|
6963
|
+
deviceTree: () => this.deviceSecretTree(),
|
|
6964
|
+
onOrphaned: (refs) => context.logger.warn("keychain refs dropped by a settings write could not be deleted", { meta: { refs: [...refs] } }),
|
|
6965
|
+
isOperatorWrite: () => this._operatorWriteDepth > 0,
|
|
6966
|
+
onUnresolved: (unresolved) => this.logUnresolvedRead(unresolved)
|
|
6967
|
+
});
|
|
6968
|
+
this._ctx = wrapped;
|
|
6969
|
+
this._secretSettings = handle;
|
|
6970
|
+
} else {
|
|
6971
|
+
this._ctx = context;
|
|
6972
|
+
this._secretSettings = null;
|
|
6973
|
+
}
|
|
6611
6974
|
await this.resolveConfig();
|
|
6612
6975
|
if (secrets !== void 0) this._secretChangeUnsub = secrets.onChange((ref) => {
|
|
6613
6976
|
if (this._configSecretRefs.has(ref)) this.scheduleSecretReresolve(SECRET_CHANGE_DEBOUNCE_MS);
|
|
@@ -6724,11 +7087,8 @@ var BaseAddon = class {
|
|
|
6724
7087
|
async getGlobalSettings(overlay, cap, nodeId) {
|
|
6725
7088
|
const schema = this.globalSettingsSchema(cap);
|
|
6726
7089
|
if (!schema) return { sections: [] };
|
|
6727
|
-
const projected = await this.
|
|
6728
|
-
return hydrateSchema(schema, overlay ? {
|
|
6729
|
-
...projected,
|
|
6730
|
-
...overlay
|
|
6731
|
-
} : projected, { inlineSecretsAsViews: true });
|
|
7090
|
+
const projected = await this.readRawProjectedStore(nodeId, cap);
|
|
7091
|
+
return hydrateSchema(schema, overlay ? await this.overlayKeepingMarkers(projected, overlay) : projected, { inlineSecretsAsViews: true });
|
|
6732
7092
|
}
|
|
6733
7093
|
/**
|
|
6734
7094
|
* The integration-level view of this addon's settings: exactly the sections
|
|
@@ -6773,7 +7133,7 @@ var BaseAddon = class {
|
|
|
6773
7133
|
});
|
|
6774
7134
|
}
|
|
6775
7135
|
if (sections.length === 0) return null;
|
|
6776
|
-
const projected = await this.
|
|
7136
|
+
const projected = await this.readRawProjectedStore(nodeId);
|
|
6777
7137
|
return hydrateSchema({
|
|
6778
7138
|
...schema,
|
|
6779
7139
|
sections
|
|
@@ -6790,12 +7150,50 @@ var BaseAddon = class {
|
|
|
6790
7150
|
* the store for custom option logic (option narrowing, value snapping) to
|
|
6791
7151
|
* read it per-node — never `ctx.settings.readAddonStore()` directly.
|
|
6792
7152
|
* `nodeId` omitted ⇒ the local node (node-blind injection from ctx).
|
|
7153
|
+
*
|
|
7154
|
+
* Keychain values come back RESOLVED (D798): a secret reads as its value,
|
|
7155
|
+
* never as a `{ $secret }` marker. One the keychain cannot serve right now
|
|
7156
|
+
* stays a marker — "stored, unavailable" (`isSecretMarker()` is true, and it
|
|
7157
|
+
* is listed in {@link unresolvedSecrets}) — never `''` and never absent, so
|
|
7158
|
+
* it cannot be mistaken for "nothing stored, mint a new one". Writing the
|
|
7159
|
+
* resolved blob back is a no-op for every unchanged secret.
|
|
6793
7160
|
*/
|
|
6794
7161
|
async resolveGlobalStore(nodeId, cap) {
|
|
6795
7162
|
const raw = await this._ctx?.settings?.readAddonStore() ?? {};
|
|
7163
|
+
return this.projectForNode(raw, nodeId, cap);
|
|
7164
|
+
}
|
|
7165
|
+
projectForNode(store, nodeId, cap) {
|
|
6796
7166
|
const keys = this.perNodeKeys(cap);
|
|
6797
7167
|
const node = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6798
|
-
return keys.size > 0 ? projectStore(
|
|
7168
|
+
return keys.size > 0 ? projectStore(store, keys, node) : store;
|
|
7169
|
+
}
|
|
7170
|
+
/** The PROJECTED store with its markers — the form hydrate only (D798). */
|
|
7171
|
+
async readRawProjectedStore(nodeId, cap) {
|
|
7172
|
+
const raw = await this.rawSettings()?.readAddonStore() ?? {};
|
|
7173
|
+
return this.projectForNode(raw, nodeId, cap);
|
|
7174
|
+
}
|
|
7175
|
+
/**
|
|
7176
|
+
* `{ ...stored, ...overlay }`, except that an overlay member equal to the
|
|
7177
|
+
* RESOLVED stored one keeps the stored (marker-bearing) member — so a form
|
|
7178
|
+
* hydrated from a resolved overlay still shows a secret as "set", never as
|
|
7179
|
+
* its value.
|
|
7180
|
+
*/
|
|
7181
|
+
async overlayKeepingMarkers(stored, overlay) {
|
|
7182
|
+
const secrets = this._ctx?.secrets;
|
|
7183
|
+
const merged = {
|
|
7184
|
+
...stored,
|
|
7185
|
+
...overlay
|
|
7186
|
+
};
|
|
7187
|
+
if (secrets === void 0 || collectSecretMarkerRefs(stored).length === 0) return merged;
|
|
7188
|
+
const { value: resolved } = await resolveSecretMarkers(stored, secrets, {
|
|
7189
|
+
unresolved: "keep-marker",
|
|
7190
|
+
ownedBy: secrets.owner
|
|
7191
|
+
});
|
|
7192
|
+
for (const key of Object.keys(overlay)) {
|
|
7193
|
+
if (collectSecretMarkerRefs(stored[key]).length === 0) continue;
|
|
7194
|
+
if (isJsonEqual(overlay[key], resolved[key])) merged[key] = stored[key];
|
|
7195
|
+
}
|
|
7196
|
+
return merged;
|
|
6799
7197
|
}
|
|
6800
7198
|
/**
|
|
6801
7199
|
* Whether ONE global key of this addon's store was written, read three-way
|
|
@@ -6860,8 +7258,12 @@ var BaseAddon = class {
|
|
|
6860
7258
|
async clearSecrets(keys, nodeId) {
|
|
6861
7259
|
const tree = this.addonSecretTree();
|
|
6862
7260
|
const keychain = this._ctx?.secrets !== void 0;
|
|
7261
|
+
const stored = keychain ? await this.readAddonStoreWithRetry() : {};
|
|
6863
7262
|
const patch = {};
|
|
6864
|
-
for (const key of keys)
|
|
7263
|
+
for (const key of keys) {
|
|
7264
|
+
const keychainStored = tree.has(key) || collectSecretMarkerRefs(stored[key]).length > 0;
|
|
7265
|
+
patch[key] = keychain && keychainStored ? SECRET_CLEAR : "";
|
|
7266
|
+
}
|
|
6865
7267
|
await this.applyGlobalPatch(patch, nodeId);
|
|
6866
7268
|
}
|
|
6867
7269
|
async applyGlobalPatch(barePatch, nodeId) {
|
|
@@ -6869,7 +7271,11 @@ var BaseAddon = class {
|
|
|
6869
7271
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6870
7272
|
const target = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6871
7273
|
const scoped = keys.size > 0 ? scopePatch(barePatch, keys, target) : barePatch;
|
|
6872
|
-
|
|
7274
|
+
const handle = this._secretSettings;
|
|
7275
|
+
if (handle !== null) {
|
|
7276
|
+
const { changed } = await handle.writeAddonStore(scoped);
|
|
7277
|
+
if (!changed) return;
|
|
7278
|
+
} else await this._ctx?.settings?.writeAddonStore(scoped);
|
|
6873
7279
|
if (target !== localNode) return;
|
|
6874
7280
|
await this.resolveConfig();
|
|
6875
7281
|
await this.onConfigChanged();
|
|
@@ -6922,7 +7328,7 @@ var BaseAddon = class {
|
|
|
6922
7328
|
async getDeviceSettings(deviceId) {
|
|
6923
7329
|
const schema = this.deviceSettingsSchema();
|
|
6924
7330
|
if (!schema) return { sections: [] };
|
|
6925
|
-
return hydrateSchema(schema, await this.
|
|
7331
|
+
return hydrateSchema(schema, await this.rawSettings()?.readDeviceStore(deviceId) ?? {}, { inlineSecretsAsViews: true });
|
|
6926
7332
|
}
|
|
6927
7333
|
async updateDeviceSettings(deviceId, patch) {
|
|
6928
7334
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
@@ -7094,7 +7500,7 @@ var BaseAddon = class {
|
|
|
7094
7500
|
key,
|
|
7095
7501
|
schema,
|
|
7096
7502
|
fallback,
|
|
7097
|
-
read: async () => this.resolveStoredSecrets(await this.
|
|
7503
|
+
read: async () => this.resolveStoredSecrets(await this.rawSettings()?.readDeviceStore(deviceId) ?? {}, false),
|
|
7098
7504
|
write: async (patch) => {
|
|
7099
7505
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
7100
7506
|
},
|
|
@@ -7156,6 +7562,23 @@ var BaseAddon = class {
|
|
|
7156
7562
|
}
|
|
7157
7563
|
return value;
|
|
7158
7564
|
}
|
|
7565
|
+
/**
|
|
7566
|
+
* The marker-bearing settings reads (D798) — private on purpose. Without a
|
|
7567
|
+
* keychain the context's own view is already raw.
|
|
7568
|
+
*/
|
|
7569
|
+
rawSettings() {
|
|
7570
|
+
return this._secretSettings?.raw ?? this._ctx?.settings;
|
|
7571
|
+
}
|
|
7572
|
+
/** An addon-facing read met markers it could not resolve: say so once per ref. */
|
|
7573
|
+
logUnresolvedRead(unresolved) {
|
|
7574
|
+
const fresh = unresolved.filter((u) => !this._loggedUnresolvedReads.has(u.ref));
|
|
7575
|
+
if (fresh.length === 0) return;
|
|
7576
|
+
for (const u of fresh) this._loggedUnresolvedReads.add(u.ref);
|
|
7577
|
+
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) => ({
|
|
7578
|
+
ref: u.ref,
|
|
7579
|
+
reason: u.reason
|
|
7580
|
+
})) } });
|
|
7581
|
+
}
|
|
7159
7582
|
/** Re-resolve the config (a keychain-only change, or a retry) and apply it. */
|
|
7160
7583
|
scheduleSecretReresolve(delayMs) {
|
|
7161
7584
|
const timerOf = delayMs === SECRET_CHANGE_DEBOUNCE_MS ? "_secretChangeTimer" : "_secretRetryTimer";
|
|
@@ -7182,7 +7605,7 @@ var BaseAddon = class {
|
|
|
7182
7605
|
* `{}` (defaults) — the addon's first successful patch will rehydrate.
|
|
7183
7606
|
*/
|
|
7184
7607
|
async readAddonStoreWithRetry() {
|
|
7185
|
-
const settings = this.
|
|
7608
|
+
const settings = this.rawSettings();
|
|
7186
7609
|
if (!settings) return {};
|
|
7187
7610
|
const delaysMs = [
|
|
7188
7611
|
150,
|
|
@@ -9507,6 +9930,278 @@ var CameraSwitchGroupSchema = object({
|
|
|
9507
9930
|
fetchedAt: number()
|
|
9508
9931
|
});
|
|
9509
9932
|
/**
|
|
9933
|
+
* The trainer contract — what the hub hands the cloud trainer and what it
|
|
9934
|
+
* gets back (cloud training, D805+).
|
|
9935
|
+
*
|
|
9936
|
+
* The trainer (`hf/camstack-trainer`, published as the Hugging Face repo
|
|
9937
|
+
* `camstack/camstack-trainer`) is a separate AGPL program the hub never
|
|
9938
|
+
* imports: `job.json` goes in, files come out, and progress is `CAMSTACK_EVENT`
|
|
9939
|
+
* lines on stdout. These schemas are the hub's half of that boundary; the
|
|
9940
|
+
* trainer's pydantic models (and the JSON Schemas generated from them under
|
|
9941
|
+
* `hf/camstack-trainer/schemas/`) are the other half. A change here is a
|
|
9942
|
+
* change there, in the same piece of work.
|
|
9943
|
+
*
|
|
9944
|
+
* No `.default()` anywhere: defaults do not run on the addon cap path, so the
|
|
9945
|
+
* orchestrator fills every field of a job spec explicitly.
|
|
9946
|
+
*/
|
|
9947
|
+
var TRAINING_JOB_SCHEMA = "camstack.training/v1";
|
|
9948
|
+
var TRAINING_RESULT_SCHEMA = "camstack.training-result/v1";
|
|
9949
|
+
/** What the trainer can export. Edge TPU is a later, separate image. */
|
|
9950
|
+
var TrainingExportSchema = _enum([
|
|
9951
|
+
"onnx",
|
|
9952
|
+
"openvino-fp16",
|
|
9953
|
+
"openvino-int8",
|
|
9954
|
+
"coreml-fp16"
|
|
9955
|
+
]);
|
|
9956
|
+
var FloorsSchema = record(string(), number().min(0).max(1));
|
|
9957
|
+
object({
|
|
9958
|
+
schema: literal(TRAINING_JOB_SCHEMA),
|
|
9959
|
+
jobKey: string().uuid(),
|
|
9960
|
+
target: object({
|
|
9961
|
+
kind: literal("detector"),
|
|
9962
|
+
step: literal("object-detection")
|
|
9963
|
+
}),
|
|
9964
|
+
base: object({
|
|
9965
|
+
modelId: string().min(1),
|
|
9966
|
+
/** Ultralytics weights id, e.g. `yolov9m.pt`. */
|
|
9967
|
+
weights: string().min(1),
|
|
9968
|
+
imgsz: number().int().positive()
|
|
9969
|
+
}),
|
|
9970
|
+
baseline: object({
|
|
9971
|
+
modelId: string().min(1),
|
|
9972
|
+
/** The baseline ONNX the holdout comparison runs; public mirror URL. */
|
|
9973
|
+
onnxUrl: string().url(),
|
|
9974
|
+
imgsz: number().int().positive(),
|
|
9975
|
+
floors: FloorsSchema
|
|
9976
|
+
}),
|
|
9977
|
+
dataset: object({
|
|
9978
|
+
versionId: string().min(1),
|
|
9979
|
+
annotationHash: string(),
|
|
9980
|
+
/** sha256 of the uploaded archive; the trainer refuses a mismatch (exit 65). */
|
|
9981
|
+
sha256: string().regex(/^[0-9a-f]{64}$/)
|
|
9982
|
+
}),
|
|
9983
|
+
split: object({
|
|
9984
|
+
holdoutCameras: array(number().int()),
|
|
9985
|
+
/** When no camera is held out: the last N days of every camera. */
|
|
9986
|
+
holdoutLastDays: number().int().nonnegative(),
|
|
9987
|
+
valFraction: number().min(0).max(.5),
|
|
9988
|
+
seed: number().int()
|
|
9989
|
+
}),
|
|
9990
|
+
hyper: object({
|
|
9991
|
+
epochs: number().int().positive(),
|
|
9992
|
+
batch: number().int().positive(),
|
|
9993
|
+
lr0: number().positive(),
|
|
9994
|
+
/** Layers frozen from the start of the backbone; 0 = none. */
|
|
9995
|
+
freeze: number().int().nonnegative(),
|
|
9996
|
+
patience: number().int().nonnegative(),
|
|
9997
|
+
seed: number().int()
|
|
9998
|
+
}),
|
|
9999
|
+
replay: object({
|
|
10000
|
+
source: literal("coco2017"),
|
|
10001
|
+
count: number().int().nonnegative()
|
|
10002
|
+
}),
|
|
10003
|
+
exports: array(TrainingExportSchema).min(1),
|
|
10004
|
+
calibration: object({ maxFrames: number().int().positive() }),
|
|
10005
|
+
floors: object({
|
|
10006
|
+
minSupport: number().int().positive(),
|
|
10007
|
+
clamp: number().min(0).max(1)
|
|
10008
|
+
}),
|
|
10009
|
+
int8Gate: object({ maxMap50Drop: number().min(0).max(1) }),
|
|
10010
|
+
catalog: object({
|
|
10011
|
+
id: string().regex(/^[a-z0-9][a-z0-9-]{2,80}$/),
|
|
10012
|
+
name: string().min(1).max(160)
|
|
10013
|
+
})
|
|
10014
|
+
});
|
|
10015
|
+
/** One regular file of the bundle. An mlpackage contributes one row per member. */
|
|
10016
|
+
var TrainingResultFileSchema = object({
|
|
10017
|
+
path: string().min(1),
|
|
10018
|
+
bytes: number().int().nonnegative(),
|
|
10019
|
+
sha256: string().regex(/^[0-9a-f]{64}$/),
|
|
10020
|
+
format: _enum([
|
|
10021
|
+
"onnx",
|
|
10022
|
+
"openvino",
|
|
10023
|
+
"coreml",
|
|
10024
|
+
"pt"
|
|
10025
|
+
]),
|
|
10026
|
+
variant: _enum(["base", "int8"])
|
|
10027
|
+
});
|
|
10028
|
+
var DraftFormatSchema = object({
|
|
10029
|
+
/** RELATIVE path inside the bundle; the hub rewrites it to `camstack-local://`. */
|
|
10030
|
+
url: string().min(1),
|
|
10031
|
+
sizeMB: number().nonnegative(),
|
|
10032
|
+
isDirectory: boolean().optional(),
|
|
10033
|
+
files: array(string()).optional(),
|
|
10034
|
+
runtimes: array(literal("python")).optional(),
|
|
10035
|
+
revision: string().min(1)
|
|
10036
|
+
});
|
|
10037
|
+
/** The trainer's half of a catalog entry; the hub completes it (labels, licence, group). */
|
|
10038
|
+
var TrainingCatalogDraftSchema = object({
|
|
10039
|
+
id: string().min(1),
|
|
10040
|
+
name: string().min(1),
|
|
10041
|
+
description: string(),
|
|
10042
|
+
labels: array(unknown()),
|
|
10043
|
+
inputSize: object({
|
|
10044
|
+
width: number().int().positive(),
|
|
10045
|
+
height: number().int().positive()
|
|
10046
|
+
}),
|
|
10047
|
+
preprocessMode: literal("letterbox"),
|
|
10048
|
+
defaultClassFloors: FloorsSchema,
|
|
10049
|
+
formats: object({
|
|
10050
|
+
onnx: DraftFormatSchema.optional(),
|
|
10051
|
+
openvino: DraftFormatSchema.optional(),
|
|
10052
|
+
coreml: DraftFormatSchema.optional()
|
|
10053
|
+
})
|
|
10054
|
+
});
|
|
10055
|
+
/** One class of one model's holdout report (the eval harness's summary). */
|
|
10056
|
+
var TrainingEvalClassSchema = object({
|
|
10057
|
+
positives: number().int(),
|
|
10058
|
+
floor: number().nullable(),
|
|
10059
|
+
tp: number().int(),
|
|
10060
|
+
fp: number().int(),
|
|
10061
|
+
fn: number().int(),
|
|
10062
|
+
precision: number().nullable(),
|
|
10063
|
+
recall: number().nullable(),
|
|
10064
|
+
ap50: number().nullable(),
|
|
10065
|
+
recallByCamera: record(string(), number().nullable()).optional(),
|
|
10066
|
+
recallByLight: record(string(), number().nullable()).optional(),
|
|
10067
|
+
fpByCamera: record(string(), number()).optional(),
|
|
10068
|
+
smallFound: number().int().optional(),
|
|
10069
|
+
smallTotal: number().int().optional()
|
|
10070
|
+
}).passthrough();
|
|
10071
|
+
var TrainingEvalReportSchema = object({
|
|
10072
|
+
frames: number().int(),
|
|
10073
|
+
classes: record(string(), TrainingEvalClassSchema)
|
|
10074
|
+
}).passthrough();
|
|
10075
|
+
/**
|
|
10076
|
+
* A succeeded result carries every block; a failed one carries the error and
|
|
10077
|
+
* whatever was known by then — the other blocks are ABSENT, not null. The
|
|
10078
|
+
* orchestrator checks the blocks it needs before it trusts a success.
|
|
10079
|
+
*/
|
|
10080
|
+
var TrainingResultSchema = object({
|
|
10081
|
+
schema: literal(TRAINING_RESULT_SCHEMA),
|
|
10082
|
+
jobKey: string(),
|
|
10083
|
+
status: _enum(["succeeded", "failed"]),
|
|
10084
|
+
error: object({
|
|
10085
|
+
stage: string(),
|
|
10086
|
+
code: string(),
|
|
10087
|
+
message: string()
|
|
10088
|
+
}).nullable(),
|
|
10089
|
+
trainer: object({
|
|
10090
|
+
version: string(),
|
|
10091
|
+
revision: string()
|
|
10092
|
+
}),
|
|
10093
|
+
toolchain: record(string(), string().nullable()),
|
|
10094
|
+
dataset: object({
|
|
10095
|
+
versionId: string(),
|
|
10096
|
+
annotationHash: string(),
|
|
10097
|
+
sha256: string(),
|
|
10098
|
+
frames: object({
|
|
10099
|
+
train: number().int(),
|
|
10100
|
+
val: number().int(),
|
|
10101
|
+
holdout: number().int()
|
|
10102
|
+
}),
|
|
10103
|
+
holdoutCameras: array(number().int()),
|
|
10104
|
+
replayImages: number().int()
|
|
10105
|
+
}).optional(),
|
|
10106
|
+
training: object({
|
|
10107
|
+
epochsRun: number().int(),
|
|
10108
|
+
bestEpoch: number().int(),
|
|
10109
|
+
bestMap50: number(),
|
|
10110
|
+
bestMap50_95: number(),
|
|
10111
|
+
seconds: number()
|
|
10112
|
+
}).optional(),
|
|
10113
|
+
evaluation: object({
|
|
10114
|
+
holdoutFrames: number().int(),
|
|
10115
|
+
baseline: TrainingEvalReportSchema.nullable(),
|
|
10116
|
+
candidate: TrainingEvalReportSchema.nullable(),
|
|
10117
|
+
candidateInt8: TrainingEvalReportSchema.nullable(),
|
|
10118
|
+
recallDeltaByCamera: record(string(), record(string(), number())).nullable(),
|
|
10119
|
+
map50: record(string(), number().nullable())
|
|
10120
|
+
}).optional(),
|
|
10121
|
+
floors: object({
|
|
10122
|
+
baseline: FloorsSchema,
|
|
10123
|
+
candidate: FloorsSchema,
|
|
10124
|
+
candidateInt8: FloorsSchema.nullable(),
|
|
10125
|
+
notes: array(string())
|
|
10126
|
+
}).optional(),
|
|
10127
|
+
int8: object({
|
|
10128
|
+
kept: boolean(),
|
|
10129
|
+
map50Fp16: number().nullable(),
|
|
10130
|
+
map50Int8: number().nullable(),
|
|
10131
|
+
reason: string().nullable()
|
|
10132
|
+
}).optional(),
|
|
10133
|
+
exportsDropped: array(object({
|
|
10134
|
+
export: string(),
|
|
10135
|
+
reason: string()
|
|
10136
|
+
})).optional(),
|
|
10137
|
+
files: array(TrainingResultFileSchema).optional(),
|
|
10138
|
+
bundle: object({
|
|
10139
|
+
path: literal("bundle.tar"),
|
|
10140
|
+
bytes: number().int().nonnegative(),
|
|
10141
|
+
sha256: string().regex(/^[0-9a-f]{64}$/)
|
|
10142
|
+
}).nullable().optional(),
|
|
10143
|
+
catalogDraft: object({
|
|
10144
|
+
base: TrainingCatalogDraftSchema,
|
|
10145
|
+
int8: TrainingCatalogDraftSchema.nullable()
|
|
10146
|
+
}).nullable().optional(),
|
|
10147
|
+
licence: string()
|
|
10148
|
+
});
|
|
10149
|
+
var TrainingStageSchema = _enum([
|
|
10150
|
+
"prepare",
|
|
10151
|
+
"replay",
|
|
10152
|
+
"train",
|
|
10153
|
+
"eval",
|
|
10154
|
+
"export",
|
|
10155
|
+
"package"
|
|
10156
|
+
]);
|
|
10157
|
+
var EventBase = {
|
|
10158
|
+
v: literal(1),
|
|
10159
|
+
ts: number()
|
|
10160
|
+
};
|
|
10161
|
+
discriminatedUnion("type", [
|
|
10162
|
+
object({
|
|
10163
|
+
...EventBase,
|
|
10164
|
+
type: literal("stage"),
|
|
10165
|
+
stage: TrainingStageSchema
|
|
10166
|
+
}),
|
|
10167
|
+
object({
|
|
10168
|
+
...EventBase,
|
|
10169
|
+
type: literal("epoch"),
|
|
10170
|
+
epoch: number().int(),
|
|
10171
|
+
epochs: number().int(),
|
|
10172
|
+
boxLoss: number().nullable().optional(),
|
|
10173
|
+
map50: number().nullable().optional(),
|
|
10174
|
+
map50_95: number().nullable().optional(),
|
|
10175
|
+
etaSec: number().nullable().optional()
|
|
10176
|
+
}),
|
|
10177
|
+
object({
|
|
10178
|
+
...EventBase,
|
|
10179
|
+
type: literal("metric"),
|
|
10180
|
+
name: string(),
|
|
10181
|
+
value: number()
|
|
10182
|
+
}),
|
|
10183
|
+
object({
|
|
10184
|
+
...EventBase,
|
|
10185
|
+
type: literal("artifact"),
|
|
10186
|
+
path: string(),
|
|
10187
|
+
bytes: number(),
|
|
10188
|
+
sha256: string()
|
|
10189
|
+
}),
|
|
10190
|
+
object({
|
|
10191
|
+
...EventBase,
|
|
10192
|
+
type: literal("done"),
|
|
10193
|
+
status: _enum(["succeeded", "failed"]),
|
|
10194
|
+
resultSha256: string().nullable().optional()
|
|
10195
|
+
}),
|
|
10196
|
+
object({
|
|
10197
|
+
...EventBase,
|
|
10198
|
+
type: literal("error"),
|
|
10199
|
+
stage: string(),
|
|
10200
|
+
code: string(),
|
|
10201
|
+
message: string()
|
|
10202
|
+
})
|
|
10203
|
+
]);
|
|
10204
|
+
/**
|
|
9510
10205
|
* What the gate decided about a birth, from the CALLER's point of view.
|
|
9511
10206
|
*
|
|
9512
10207
|
* Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
|
|
@@ -12115,7 +12810,9 @@ var AddonHttpRouteSchema = object({
|
|
|
12115
12810
|
"authenticated",
|
|
12116
12811
|
"admin"
|
|
12117
12812
|
]).optional(),
|
|
12118
|
-
description: string().optional()
|
|
12813
|
+
description: string().optional(),
|
|
12814
|
+
/** The hub limits this route per client address before the handler runs. */
|
|
12815
|
+
rateLimit: _enum(["auth"]).optional()
|
|
12119
12816
|
});
|
|
12120
12817
|
/**
|
|
12121
12818
|
* Cross-process route invocation envelope. The hub captures the
|
|
@@ -12820,6 +13517,37 @@ var BackupDestinationInfoSchema = object({
|
|
|
12820
13517
|
lastError: string().optional()
|
|
12821
13518
|
});
|
|
12822
13519
|
/**
|
|
13520
|
+
* How an archive is encrypted (operator decision 2026-10-09): to a backup
|
|
13521
|
+
* PUBLIC key the hub holds, so only the operator's secret key opens it.
|
|
13522
|
+
* Absent on a plain `.tar.gz` — every archive made before encryption, or
|
|
13523
|
+
* with it off — which restores without a key.
|
|
13524
|
+
*/
|
|
13525
|
+
var BackupArchiveEncryptionSchema = object({
|
|
13526
|
+
/** `x25519-hkdf-aes256gcm-stream-v1`. */
|
|
13527
|
+
scheme: string(),
|
|
13528
|
+
/** 16 hex — the backup key whose secret restores this archive. */
|
|
13529
|
+
keyId: string()
|
|
13530
|
+
});
|
|
13531
|
+
/**
|
|
13532
|
+
* The backup encryption setting. The hub keeps PUBLIC keys only: the active
|
|
13533
|
+
* one new archives are encrypted to, and the retired ones older archives
|
|
13534
|
+
* still need. The secret key is shown once, at `setupEncryption`.
|
|
13535
|
+
*/
|
|
13536
|
+
var BackupEncryptionStatusSchema = object({
|
|
13537
|
+
enabled: boolean(),
|
|
13538
|
+
active: object({
|
|
13539
|
+
keyId: string(),
|
|
13540
|
+
publicKey: string(),
|
|
13541
|
+
createdAt: number()
|
|
13542
|
+
}).nullable(),
|
|
13543
|
+
/** Every key ever set up, newest first. */
|
|
13544
|
+
keys: array(object({
|
|
13545
|
+
keyId: string(),
|
|
13546
|
+
createdAt: number(),
|
|
13547
|
+
retiredAt: number().nullable()
|
|
13548
|
+
})).readonly()
|
|
13549
|
+
});
|
|
13550
|
+
/**
|
|
12823
13551
|
* Per-archive entry returned by `backup.listArchives({ destinationId })`.
|
|
12824
13552
|
* Same shape the destination drill-in renders. Sourced from the per-
|
|
12825
13553
|
* location `manifests.json` (no per-archive tarball read required).
|
|
@@ -12831,7 +13559,9 @@ var BackupArchiveEntrySchema = object({
|
|
|
12831
13559
|
sizeBytes: number(),
|
|
12832
13560
|
label: string().optional(),
|
|
12833
13561
|
/** Top-level locations included in the archive (db, addons, tls, …). */
|
|
12834
|
-
locations: array(string()).readonly()
|
|
13562
|
+
locations: array(string()).readonly(),
|
|
13563
|
+
/** Present when the archive is encrypted; restore then needs that key. */
|
|
13564
|
+
encryption: BackupArchiveEncryptionSchema.optional()
|
|
12835
13565
|
});
|
|
12836
13566
|
var BackupEntrySchema = object({
|
|
12837
13567
|
id: string(),
|
|
@@ -12840,7 +13570,8 @@ var BackupEntrySchema = object({
|
|
|
12840
13570
|
label: string().optional(),
|
|
12841
13571
|
createdAt: number(),
|
|
12842
13572
|
sizeBytes: number(),
|
|
12843
|
-
locations: array(string()).optional()
|
|
13573
|
+
locations: array(string()).optional(),
|
|
13574
|
+
encryption: BackupArchiveEncryptionSchema.optional()
|
|
12844
13575
|
});
|
|
12845
13576
|
var ArchiveEntrySchema = object({
|
|
12846
13577
|
path: string(),
|
|
@@ -13029,10 +13760,40 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
|
|
|
13029
13760
|
* this list and skips entries whose path doesn't start with
|
|
13030
13761
|
* any of them.
|
|
13031
13762
|
*/
|
|
13032
|
-
locations: array(string()).optional()
|
|
13763
|
+
locations: array(string()).optional(),
|
|
13764
|
+
/**
|
|
13765
|
+
* The backup SECRET key, for an encrypted archive (ignored for a plain
|
|
13766
|
+
* one). The archive is decrypted into the hub's private staging
|
|
13767
|
+
* before the restart; the key is not stored. A wrong or missing key
|
|
13768
|
+
* is refused before the archive is downloaded.
|
|
13769
|
+
*/
|
|
13770
|
+
backupSecretKey: string().optional()
|
|
13033
13771
|
}), _void(), {
|
|
13034
13772
|
kind: "mutation",
|
|
13035
13773
|
auth: "admin"
|
|
13774
|
+
}), method(_void(), BackupEncryptionStatusSchema, { auth: "admin" }), method(object({}), object({
|
|
13775
|
+
keyId: string(),
|
|
13776
|
+
secretKey: string(),
|
|
13777
|
+
publicKey: string(),
|
|
13778
|
+
createdAt: number(),
|
|
13779
|
+
replacedKeyId: string().nullable()
|
|
13780
|
+
}), {
|
|
13781
|
+
kind: "mutation",
|
|
13782
|
+
auth: "admin"
|
|
13783
|
+
}), method(object({}), object({ disabledKeyId: string().nullable() }), {
|
|
13784
|
+
kind: "mutation",
|
|
13785
|
+
auth: "admin"
|
|
13786
|
+
}), method(object({ backupSecretKey: string() }), object({
|
|
13787
|
+
valid: boolean(),
|
|
13788
|
+
keyId: string().nullable(),
|
|
13789
|
+
/** The hub knows this key (active or retired). */
|
|
13790
|
+
known: boolean(),
|
|
13791
|
+
/** It is the key new archives are encrypted to. */
|
|
13792
|
+
active: boolean(),
|
|
13793
|
+
error: string().optional()
|
|
13794
|
+
}), {
|
|
13795
|
+
kind: "mutation",
|
|
13796
|
+
auth: "admin"
|
|
13036
13797
|
}), method(object({
|
|
13037
13798
|
destinationId: string(),
|
|
13038
13799
|
backupId: string()
|
|
@@ -14758,7 +15519,60 @@ var CustomModelDescriptorSchema = object({
|
|
|
14758
15519
|
stepId: string(),
|
|
14759
15520
|
entry: ModelCatalogEntrySchema
|
|
14760
15521
|
});
|
|
14761
|
-
|
|
15522
|
+
/** One regular file of an imported bundle, as the producer measured it. */
|
|
15523
|
+
var ModelBundleFileSchema = object({
|
|
15524
|
+
/** Relative path inside the bundle tar; an mlpackage member is `<x>.mlpackage/<member>`. */
|
|
15525
|
+
path: string().min(1),
|
|
15526
|
+
bytes: number().int().nonnegative(),
|
|
15527
|
+
sha256: string().regex(/^[0-9a-f]{64}$/)
|
|
15528
|
+
});
|
|
15529
|
+
var ImportModelBundleInputSchema = object({
|
|
15530
|
+
/** The registry provider that keeps the model (Model Studio). */
|
|
15531
|
+
addonId: string(),
|
|
15532
|
+
stepId: string().min(1),
|
|
15533
|
+
/**
|
|
15534
|
+
* The catalog rows to register, complete, every format URL already
|
|
15535
|
+
* `camstack-local://<modelId>/<file>` naming a file of the bundle. One
|
|
15536
|
+
* bundle may carry several rows (a base and its INT8 variant).
|
|
15537
|
+
*/
|
|
15538
|
+
entries: array(ModelCatalogEntrySchema).min(1).max(4),
|
|
15539
|
+
/** The bundle tar, offered by the producer over `ctx.peerBytes` (same host). */
|
|
15540
|
+
bundle: object({
|
|
15541
|
+
ticket: PeerBytesTicketSchema,
|
|
15542
|
+
bytes: number().int().positive(),
|
|
15543
|
+
sha256: string().regex(/^[0-9a-f]{64}$/)
|
|
15544
|
+
}),
|
|
15545
|
+
/** Every file the tar must hold; anything missing, extra or different is refused. */
|
|
15546
|
+
files: array(ModelBundleFileSchema).min(1).max(64),
|
|
15547
|
+
/** Convert missing engine formats and push the model to every agent afterwards. */
|
|
15548
|
+
distribute: boolean()
|
|
15549
|
+
});
|
|
15550
|
+
var ImportModelBundleResultSchema = discriminatedUnion("kind", [object({
|
|
15551
|
+
kind: literal("imported"),
|
|
15552
|
+
modelIds: array(string()).readonly(),
|
|
15553
|
+
distributed: array(object({
|
|
15554
|
+
modelId: string(),
|
|
15555
|
+
nodeId: string(),
|
|
15556
|
+
format: _enum(MODEL_FORMATS),
|
|
15557
|
+
ok: boolean(),
|
|
15558
|
+
error: string().optional()
|
|
15559
|
+
})).readonly()
|
|
15560
|
+
}), object({
|
|
15561
|
+
kind: literal("refused"),
|
|
15562
|
+
reason: _enum([
|
|
15563
|
+
"transfer-failed",
|
|
15564
|
+
"checksum-mismatch",
|
|
15565
|
+
"bundle-mismatch",
|
|
15566
|
+
"invalid-entry",
|
|
15567
|
+
"id-taken"
|
|
15568
|
+
]),
|
|
15569
|
+
detail: string()
|
|
15570
|
+
})]);
|
|
15571
|
+
method(_void(), array(CustomModelDescriptorSchema).readonly(), { auth: "admin" }), method(ImportModelBundleInputSchema, ImportModelBundleResultSchema, {
|
|
15572
|
+
kind: "mutation",
|
|
15573
|
+
auth: "admin",
|
|
15574
|
+
timeoutMs: 30 * 6e4
|
|
15575
|
+
});
|
|
14762
15576
|
/**
|
|
14763
15577
|
* Query filter for settings-store collections.
|
|
14764
15578
|
*/
|
|
@@ -15237,6 +16051,35 @@ var KeychainKeySourceSchema = object({
|
|
|
15237
16051
|
*/
|
|
15238
16052
|
sharesBackupWithDatabase: boolean()
|
|
15239
16053
|
});
|
|
16054
|
+
/**
|
|
16055
|
+
* One keychain reset, as the Secrets page reports it until the operator
|
|
16056
|
+
* acknowledges it. Never a value: refs, counts and table names only.
|
|
16057
|
+
*/
|
|
16058
|
+
var KeychainResetRecordSchema = object({
|
|
16059
|
+
id: string(),
|
|
16060
|
+
at: number(),
|
|
16061
|
+
/** `user:<id>` or {@link KEYCHAIN_RESET_TRIGGER_ACTOR}. */
|
|
16062
|
+
actor: string(),
|
|
16063
|
+
/** Why the keychain was locked when it was reset; `null` when it was not locked. */
|
|
16064
|
+
lockedReason: string().nullable(),
|
|
16065
|
+
/** Values moved into the archive table (ciphertext under the lost key). */
|
|
16066
|
+
archived: number().int(),
|
|
16067
|
+
/** `keychain:secrets-orphaned-<ts>`, or `null` when nothing was stored. */
|
|
16068
|
+
archivedCollection: string().nullable(),
|
|
16069
|
+
/**
|
|
16070
|
+
* `keychain:keys-orphaned-<ts>`: the wrapped data keys of the archive, kept
|
|
16071
|
+
* so the archive can still be opened if the lost master key turns up.
|
|
16072
|
+
*/
|
|
16073
|
+
archivedKeysCollection: string().nullable(),
|
|
16074
|
+
/**
|
|
16075
|
+
* `system-settings` keys whose marker the reset cleared — the cluster
|
|
16076
|
+
* secret's: a marker left pointing at an archived value would refuse every
|
|
16077
|
+
* agent forever (D797).
|
|
16078
|
+
*/
|
|
16079
|
+
clearedSettingsKeys: array(string()).readonly(),
|
|
16080
|
+
/** When an operator dismissed the notice on the Secrets page; `null` until then. */
|
|
16081
|
+
acknowledgedAt: number().nullable()
|
|
16082
|
+
});
|
|
15240
16083
|
var KeychainStatusSchema = object({
|
|
15241
16084
|
keychain: KeychainStateSchema,
|
|
15242
16085
|
/** The source of the master key in use; `null` while locked. */
|
|
@@ -15254,7 +16097,9 @@ var KeychainStatusSchema = object({
|
|
|
15254
16097
|
/** Wrapped copies of the data key under a previous master key, kept until purged. */
|
|
15255
16098
|
retiredWraps: number().int(),
|
|
15256
16099
|
recoveryKeyDownloadedAt: number().nullable(),
|
|
15257
|
-
secretCount: number().int()
|
|
16100
|
+
secretCount: number().int(),
|
|
16101
|
+
/** The most recent reset, acknowledged or not; `null` when the keychain was never reset. */
|
|
16102
|
+
lastReset: KeychainResetRecordSchema.nullable()
|
|
15258
16103
|
});
|
|
15259
16104
|
/**
|
|
15260
16105
|
* Whether a stored value is still pointed at by its owner's settings.
|
|
@@ -15276,17 +16121,26 @@ var KeychainAuditActionSchema = _enum([
|
|
|
15276
16121
|
"download-recovery-key",
|
|
15277
16122
|
"delete-orphans",
|
|
15278
16123
|
"reset",
|
|
16124
|
+
"acknowledge-reset",
|
|
15279
16125
|
"initialize"
|
|
15280
16126
|
]);
|
|
15281
16127
|
var KeychainAuditEntrySchema = object({
|
|
15282
16128
|
id: string(),
|
|
15283
16129
|
at: number(),
|
|
15284
16130
|
action: KeychainAuditActionSchema,
|
|
15285
|
-
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
16131
|
+
/** `addon:<id>` | `user:<id>` | `system` | `trigger-file`. */
|
|
15286
16132
|
actor: string(),
|
|
15287
16133
|
ref: string().nullable(),
|
|
15288
16134
|
detail: string().nullable()
|
|
15289
16135
|
});
|
|
16136
|
+
var KEYCHAIN_RESET_CONFIRMATION = "RESET KEYCHAIN";
|
|
16137
|
+
/**
|
|
16138
|
+
* Secrets the HUB itself holds (owner `system`) that no settings form shows:
|
|
16139
|
+
* `jwt-signing-key` — the session signing key (D797). It is always "in use",
|
|
16140
|
+
* never an orphan; it is generated on a fresh hub and replaced only through
|
|
16141
|
+
* {@link keychainAdminCapability.methods.setSystemSecret}.
|
|
16142
|
+
*/
|
|
16143
|
+
var SystemHeldSecretNameSchema = _enum(["jwt-signing-key"]);
|
|
15290
16144
|
method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}), array(KeychainAdminSecretSchema).readonly(), { auth: "admin" }), method(object({ limit: number().int().min(1).max(500).optional() }), array(KeychainAuditEntrySchema).readonly(), { auth: "admin" }), method(object({ ref: string().min(1) }), object({
|
|
15291
16145
|
value: string(),
|
|
15292
16146
|
version: number().int()
|
|
@@ -15294,6 +16148,16 @@ method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}),
|
|
|
15294
16148
|
kind: "mutation",
|
|
15295
16149
|
auth: "admin",
|
|
15296
16150
|
caller: "required"
|
|
16151
|
+
}), method(object({
|
|
16152
|
+
name: SystemHeldSecretNameSchema,
|
|
16153
|
+
value: string().min(16)
|
|
16154
|
+
}), object({
|
|
16155
|
+
ref: string(),
|
|
16156
|
+
version: number().int()
|
|
16157
|
+
}), {
|
|
16158
|
+
kind: "mutation",
|
|
16159
|
+
auth: "admin",
|
|
16160
|
+
caller: "required"
|
|
15297
16161
|
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
15298
16162
|
deleted: array(string()).readonly(),
|
|
15299
16163
|
kept: array(object({
|
|
@@ -15323,13 +16187,20 @@ method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}),
|
|
|
15323
16187
|
kind: "mutation",
|
|
15324
16188
|
auth: "admin",
|
|
15325
16189
|
caller: "required"
|
|
15326
|
-
}), method(object({ confirm: literal(
|
|
16190
|
+
}), method(object({ confirm: literal(KEYCHAIN_RESET_CONFIRMATION) }), object({
|
|
15327
16191
|
archivedCollection: string().nullable(),
|
|
15328
16192
|
archived: number().int()
|
|
15329
16193
|
}), {
|
|
15330
16194
|
kind: "mutation",
|
|
15331
16195
|
auth: "admin",
|
|
15332
16196
|
caller: "required"
|
|
16197
|
+
}), method(object({}), object({
|
|
16198
|
+
reset: KeychainResetRecordSchema.nullable(),
|
|
16199
|
+
pendingReentry: array(KeychainSecretMetaSchema).readonly()
|
|
16200
|
+
}), { auth: "admin" }), method(object({}), object({ acknowledged: boolean() }), {
|
|
16201
|
+
kind: "mutation",
|
|
16202
|
+
auth: "admin",
|
|
16203
|
+
caller: "required"
|
|
15333
16204
|
});
|
|
15334
16205
|
method(_void(), object({
|
|
15335
16206
|
id: string(),
|
|
@@ -18295,7 +19166,7 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
18295
19166
|
* `login-method` — collection cap through which auth addons contribute
|
|
18296
19167
|
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
18297
19168
|
* generic mechanism that supersedes the dead `auth.listProviders` reader:
|
|
18298
|
-
* every auth addon (OIDC,
|
|
19169
|
+
* every auth addon (OIDC, WebAuthn/passkey) registers a
|
|
18299
19170
|
* `login-method` provider and the PUBLIC `auth.listLoginMethods`
|
|
18300
19171
|
* procedure aggregates them for the unauthenticated login page.
|
|
18301
19172
|
*
|
|
@@ -18303,8 +19174,7 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
18303
19174
|
*
|
|
18304
19175
|
* - `redirect` — a declarative button. The login page renders a generic
|
|
18305
19176
|
* button that navigates to `startUrl` (an addon-owned HTTP route).
|
|
18306
|
-
* Covers OIDC (`/addon/auth-oidc/<id>/start`)
|
|
18307
|
-
* ZERO shell-side JS. A future SSO addon plugs in the same way — the
|
|
19177
|
+
* Covers OIDC (`/addon/auth-oidc/<id>/start`) with ZERO shell-side JS. A future SSO addon plugs in the same way — the
|
|
18308
19178
|
* login page needs NO change.
|
|
18309
19179
|
*
|
|
18310
19180
|
* - `widget` — a Module-Federation widget the login page mounts (via
|
|
@@ -18323,8 +19193,8 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
18323
19193
|
* decision.
|
|
18324
19194
|
*
|
|
18325
19195
|
* Every contribution carries a `stage`:
|
|
18326
|
-
* - `primary` — shown on the first credentials screen (OIDC
|
|
18327
|
-
*
|
|
19196
|
+
* - `primary` — shown on the first credentials screen (OIDC
|
|
19197
|
+
* buttons; a usernameless passkey).
|
|
18328
19198
|
* - `second-factor` — shown AFTER the password leg, gated on the
|
|
18329
19199
|
* returned `factors` (passkey-as-2FA today).
|
|
18330
19200
|
*
|
|
@@ -18351,7 +19221,7 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
18351
19221
|
* The provider names an external identity a signed-in user can link to
|
|
18352
19222
|
* their own account (D782): `auth.listLinkableProviders` /
|
|
18353
19223
|
* `beginExternalLink` offer exactly the redirect methods that set this,
|
|
18354
|
-
* whatever their id. Absent / false — a login button only
|
|
19224
|
+
* whatever their id. Absent / false — a login button only.
|
|
18355
19225
|
*/
|
|
18356
19226
|
linkable: boolean().optional()
|
|
18357
19227
|
}),
|
|
@@ -22206,8 +23076,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
22206
23076
|
* `super_admin` — collapsed onto the single boolean because every
|
|
22207
23077
|
* non-admin caller is governed by the same scope-check rules; the
|
|
22208
23078
|
* distinction was only ever used to route role-specific procedures
|
|
22209
|
-
* which we no longer have.
|
|
22210
|
-
* `createServiceToken`; CLI / webhook integrations are `cst_*` tokens
|
|
23079
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
22211
23080
|
* with `isAdmin: false` + an explicit scope list.
|
|
22212
23081
|
*/
|
|
22213
23082
|
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
@@ -23882,6 +24751,9 @@ var RetrainExportFilterSchema = object({
|
|
|
23882
24751
|
frameIds: array(string()).max(2e4).optional(),
|
|
23883
24752
|
/** Only frames in at least one of these named collections. */
|
|
23884
24753
|
collectionIds: array(string()).max(200).optional(),
|
|
24754
|
+
/** Exactly the frames of this dataset version (and its completeOnly). An
|
|
24755
|
+
* unknown id selects nothing. */
|
|
24756
|
+
datasetVersionId: string().optional(),
|
|
23885
24757
|
batchId: string().optional(),
|
|
23886
24758
|
/** Only frames the operator marked complete (all subjects boxed). */
|
|
23887
24759
|
completeOnly: boolean().optional()
|
|
@@ -24049,6 +24921,67 @@ var RetrainLlmAssistResultSchema = discriminatedUnion("kind", [object({
|
|
|
24049
24921
|
]),
|
|
24050
24922
|
detail: string().optional()
|
|
24051
24923
|
})]);
|
|
24924
|
+
/** What a dataset version is cut from. Every field narrows. */
|
|
24925
|
+
var RetrainDatasetSelectionSchema = object({
|
|
24926
|
+
deviceIds: array(number()).readonly().optional(),
|
|
24927
|
+
collectionIds: array(string()).max(200).readonly().optional(),
|
|
24928
|
+
frameIds: array(string()).max(2e4).readonly().optional()
|
|
24929
|
+
});
|
|
24930
|
+
/** The counts a dataset is judged by. */
|
|
24931
|
+
var RetrainDatasetStatsSchema = object({
|
|
24932
|
+
frames: number().int(),
|
|
24933
|
+
completeFrames: number().int(),
|
|
24934
|
+
/** `completeFrames / frames`, 0..1. */
|
|
24935
|
+
completeness: number(),
|
|
24936
|
+
/** Boxes to learn (model errors excluded). */
|
|
24937
|
+
subjects: number().int(),
|
|
24938
|
+
modelErrors: number().int(),
|
|
24939
|
+
/** Complete frames with no subject. */
|
|
24940
|
+
hardNegatives: number().int(),
|
|
24941
|
+
/** Subjects per class × camera × day/night. */
|
|
24942
|
+
cells: array(object({
|
|
24943
|
+
macroClass: string(),
|
|
24944
|
+
deviceId: number(),
|
|
24945
|
+
lighting: _enum([
|
|
24946
|
+
"day",
|
|
24947
|
+
"night",
|
|
24948
|
+
"unknown"
|
|
24949
|
+
]),
|
|
24950
|
+
subjects: number().int(),
|
|
24951
|
+
frames: number().int()
|
|
24952
|
+
})).readonly(),
|
|
24953
|
+
cameras: array(object({
|
|
24954
|
+
deviceId: number(),
|
|
24955
|
+
frames: number().int(),
|
|
24956
|
+
completeFrames: number().int()
|
|
24957
|
+
})).readonly()
|
|
24958
|
+
});
|
|
24959
|
+
/** An immutable dataset version, without its frame list. */
|
|
24960
|
+
var RetrainDatasetVersionSchema = object({
|
|
24961
|
+
id: string(),
|
|
24962
|
+
name: string(),
|
|
24963
|
+
createdAt: number(),
|
|
24964
|
+
selection: RetrainDatasetSelectionSchema,
|
|
24965
|
+
layout: RetrainExportLayoutSchema,
|
|
24966
|
+
completeOnly: boolean(),
|
|
24967
|
+
frameCount: number().int(),
|
|
24968
|
+
/** sha256 of what the frames taught when the version was frozen. */
|
|
24969
|
+
annotationHash: string(),
|
|
24970
|
+
/** The export manifest schema the version was cut under. */
|
|
24971
|
+
manifestSchema: string(),
|
|
24972
|
+
stats: RetrainDatasetStatsSchema
|
|
24973
|
+
});
|
|
24974
|
+
var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
|
|
24975
|
+
kind: literal("created"),
|
|
24976
|
+
version: RetrainDatasetVersionSchema
|
|
24977
|
+
}), object({
|
|
24978
|
+
kind: literal("refused"),
|
|
24979
|
+
reason: _enum([
|
|
24980
|
+
"empty-name",
|
|
24981
|
+
"duplicate-name",
|
|
24982
|
+
"no-frames"
|
|
24983
|
+
])
|
|
24984
|
+
})]);
|
|
24052
24985
|
/** The outcome of a lifecycle move owned by the retrain page. */
|
|
24053
24986
|
var RetrainTransitionResultSchema = object({
|
|
24054
24987
|
trackId: string(),
|
|
@@ -24838,6 +25771,47 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
24838
25771
|
kind: "mutation",
|
|
24839
25772
|
auth: "admin",
|
|
24840
25773
|
timeoutMs: 60 * 6e4
|
|
25774
|
+
}), method(object({
|
|
25775
|
+
filter: RetrainExportFilterSchema,
|
|
25776
|
+
layout: RetrainExportLayoutSchema
|
|
25777
|
+
}), object({
|
|
25778
|
+
ticket: PeerBytesTicketSchema,
|
|
25779
|
+
frames: number().int(),
|
|
25780
|
+
annotations: number().int()
|
|
25781
|
+
}), {
|
|
25782
|
+
kind: "mutation",
|
|
25783
|
+
auth: "admin",
|
|
25784
|
+
timeoutMs: 12e4
|
|
25785
|
+
}), method(object({
|
|
25786
|
+
selection: RetrainDatasetSelectionSchema,
|
|
25787
|
+
completeOnly: boolean().optional()
|
|
25788
|
+
}), RetrainDatasetStatsSchema, {
|
|
25789
|
+
kind: "query",
|
|
25790
|
+
auth: "admin"
|
|
25791
|
+
}), method(object({
|
|
25792
|
+
name: string().max(120),
|
|
25793
|
+
selection: RetrainDatasetSelectionSchema,
|
|
25794
|
+
layout: RetrainExportLayoutSchema,
|
|
25795
|
+
completeOnly: boolean()
|
|
25796
|
+
}), CreateRetrainDatasetVersionResultSchema, {
|
|
25797
|
+
kind: "mutation",
|
|
25798
|
+
auth: "admin",
|
|
25799
|
+
timeoutMs: 12e4
|
|
25800
|
+
}), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
|
|
25801
|
+
kind: "query",
|
|
25802
|
+
auth: "admin"
|
|
25803
|
+
}), method(object({ id: string() }), object({ deleted: boolean() }), {
|
|
25804
|
+
kind: "mutation",
|
|
25805
|
+
auth: "admin"
|
|
25806
|
+
}), method(object({ id: string() }), object({
|
|
25807
|
+
found: boolean(),
|
|
25808
|
+
annotationHash: string(),
|
|
25809
|
+
matches: boolean(),
|
|
25810
|
+
missingFrames: number().int()
|
|
25811
|
+
}), {
|
|
25812
|
+
kind: "query",
|
|
25813
|
+
auth: "admin",
|
|
25814
|
+
timeoutMs: 12e4
|
|
24841
25815
|
}), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
|
|
24842
25816
|
kind: "query",
|
|
24843
25817
|
auth: "admin"
|
|
@@ -28416,8 +29390,8 @@ version: string().optional() }), ServerUpdateActionResultSchema, {
|
|
|
28416
29390
|
* `smtp-provider` — pluggable email delivery surface.
|
|
28417
29391
|
*
|
|
28418
29392
|
* Collection cap: a deployment may install multiple SMTP relays (e.g.
|
|
28419
|
-
* one for transactional / one for notifications). Consumers (
|
|
28420
|
-
*
|
|
29393
|
+
* one for transactional / one for notifications). Consumers (notifier
|
|
29394
|
+
* addons, …) walk the collection and pick the first
|
|
28421
29395
|
* ready provider OR target a specific addonId.
|
|
28422
29396
|
*
|
|
28423
29397
|
* The shape stays small on purpose — `sendEmail` is enough for the
|
|
@@ -28700,7 +29674,7 @@ targets: array(object({
|
|
|
28700
29674
|
};
|
|
28701
29675
|
/**
|
|
28702
29676
|
* `sso-bridge` — internal hub-only cap that lets SSO-style auth
|
|
28703
|
-
* providers (OIDC, SAML,
|
|
29677
|
+
* providers (OIDC, SAML, …) mint an HMAC-signed token
|
|
28704
29678
|
* carrying the post-callback claims before redirecting back to
|
|
28705
29679
|
* `/api/auth/sso/finish`.
|
|
28706
29680
|
*
|
|
@@ -28763,7 +29737,14 @@ var SsoBridgeClaimsSchema = object({
|
|
|
28763
29737
|
* Verified `iss` of the id_token behind an OIDC login bridge (D782). A
|
|
28764
29738
|
* subject is unique only per issuer, so a link is bound to it.
|
|
28765
29739
|
*/
|
|
28766
|
-
issuer: string().optional()
|
|
29740
|
+
issuer: string().optional(),
|
|
29741
|
+
/**
|
|
29742
|
+
* SHA-256 (hex) of the `camstack_sso_state` cookie the IdP `/start` set in
|
|
29743
|
+
* the browser that began this sign-in. `/api/auth/sso/finish` requires the
|
|
29744
|
+
* request to present the matching cookie — a login bridge is useless in
|
|
29745
|
+
* any other browser.
|
|
29746
|
+
*/
|
|
29747
|
+
browserBinding: string().optional()
|
|
28767
29748
|
});
|
|
28768
29749
|
method(object({
|
|
28769
29750
|
claims: SsoBridgeClaimsSchema,
|
|
@@ -36617,7 +37598,13 @@ var TopologyNodeSchema = object({
|
|
|
36617
37598
|
})).readonly(),
|
|
36618
37599
|
processes: array(TopologyProcessSchema).readonly(),
|
|
36619
37600
|
categories: array(TopologyCategorySchema).readonly(),
|
|
36620
|
-
rootPackage: TopologyRootPackageSchema.nullable()
|
|
37601
|
+
rootPackage: TopologyRootPackageSchema.nullable(),
|
|
37602
|
+
/**
|
|
37603
|
+
* How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
|
|
37604
|
+
* completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
|
|
37605
|
+
* for offline rows and when the hub cannot tell.
|
|
37606
|
+
*/
|
|
37607
|
+
meshTransport: _enum(["tls", "clear"]).optional()
|
|
36621
37608
|
});
|
|
36622
37609
|
var CapUsageEdgeSchema = object({
|
|
36623
37610
|
callerAddonId: string(),
|
|
@@ -42001,16 +42988,6 @@ var ApiKeySummarySchema = object({
|
|
|
42001
42988
|
createdAt: number(),
|
|
42002
42989
|
lastUsedAt: number().optional()
|
|
42003
42990
|
});
|
|
42004
|
-
var CreateApiKeyInputSchema = object({
|
|
42005
|
-
label: string(),
|
|
42006
|
-
isAdmin: boolean().default(false),
|
|
42007
|
-
allowedProviders: union([array(string()), literal("*")]).optional(),
|
|
42008
|
-
allowedDevices: record(string(), union([array(string()), literal("*")])).optional()
|
|
42009
|
-
});
|
|
42010
|
-
var CreateApiKeyResultSchema = object({
|
|
42011
|
-
token: string(),
|
|
42012
|
-
record: ApiKeySummarySchema
|
|
42013
|
-
});
|
|
42014
42991
|
var ScopedTokenSummarySchema = object({
|
|
42015
42992
|
id: string(),
|
|
42016
42993
|
userId: string(),
|
|
@@ -42109,17 +43086,10 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
42109
43086
|
}), UserSummarySchema.extend({ passwordHash: string() }).nullable(), {
|
|
42110
43087
|
kind: "mutation",
|
|
42111
43088
|
access: "view"
|
|
42112
|
-
}), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(
|
|
42113
|
-
kind: "mutation",
|
|
42114
|
-
auth: "admin",
|
|
42115
|
-
access: "create"
|
|
42116
|
-
}), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
43089
|
+
}), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
42117
43090
|
kind: "mutation",
|
|
42118
43091
|
auth: "admin",
|
|
42119
43092
|
access: "delete"
|
|
42120
|
-
}), method(object({ token: string() }), ApiKeySummarySchema.nullable(), {
|
|
42121
|
-
kind: "mutation",
|
|
42122
|
-
access: "view"
|
|
42123
43093
|
}), method(CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, {
|
|
42124
43094
|
kind: "mutation",
|
|
42125
43095
|
auth: "admin",
|
|
@@ -42193,15 +43163,7 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
42193
43163
|
}).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
|
|
42194
43164
|
userId: string(),
|
|
42195
43165
|
issuer: string()
|
|
42196
|
-
}).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
|
|
42197
|
-
userId: string(),
|
|
42198
|
-
issuer: string().min(1),
|
|
42199
|
-
label: string().optional()
|
|
42200
|
-
}), object({ success: literal(true) }), {
|
|
42201
|
-
kind: "mutation",
|
|
42202
|
-
auth: "admin",
|
|
42203
|
-
access: "create"
|
|
42204
|
-
}), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
43166
|
+
}).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
42205
43167
|
kind: "mutation",
|
|
42206
43168
|
auth: "admin",
|
|
42207
43169
|
access: "delete"
|
|
@@ -42906,6 +43868,451 @@ var zoneRulesCapability = {
|
|
|
42906
43868
|
*/
|
|
42907
43869
|
durability: "restored"
|
|
42908
43870
|
};
|
|
43871
|
+
/**
|
|
43872
|
+
* `training-provider` — ONE cloud that can run the CamStack trainer.
|
|
43873
|
+
*
|
|
43874
|
+
* A thin, mockable translation layer: it knows how to run a container with a
|
|
43875
|
+
* GPU, move a dataset in, read the job's stdout and hand artefacts back. It
|
|
43876
|
+
* knows nothing about datasets, splits, floors, cost policy or Model Studio —
|
|
43877
|
+
* those are the `training` orchestrator's (D805). Every rule written there
|
|
43878
|
+
* once is what makes a second provider (RunPod, a local NVIDIA node) a new
|
|
43879
|
+
* manifest entry and nothing else.
|
|
43880
|
+
*
|
|
43881
|
+
* Collection, routed by the `addonId` in every single-row input (the `llm` /
|
|
43882
|
+
* `notification-output` posture); `describe` concat-fans across providers.
|
|
43883
|
+
* Every method is `admin`: these spend money.
|
|
43884
|
+
*
|
|
43885
|
+
* Every cloud object a provider creates is tagged with the orchestrator's
|
|
43886
|
+
* `jobKey`, so a retried submit finds the job it already started instead of
|
|
43887
|
+
* starting a second GPU, and `listJobs` can find orphans.
|
|
43888
|
+
*
|
|
43889
|
+
* Bytes never ride a cap field: the dataset arrives as a `ctx.peerBytes`
|
|
43890
|
+
* ticket the producer (pipeline-analytics) minted, and artefacts leave as a
|
|
43891
|
+
* ticket the provider mints (D613).
|
|
43892
|
+
*/
|
|
43893
|
+
var TrainingGpuOptionSchema = object({
|
|
43894
|
+
id: string(),
|
|
43895
|
+
label: string(),
|
|
43896
|
+
/** List price, USD per GPU-hour, before any region multiplier. */
|
|
43897
|
+
usdPerHour: number().nonnegative(),
|
|
43898
|
+
vramGb: number().nonnegative()
|
|
43899
|
+
});
|
|
43900
|
+
var TrainingRegionOptionSchema = object({
|
|
43901
|
+
/** `''` = any region (the provider's choice). */
|
|
43902
|
+
id: string(),
|
|
43903
|
+
label: string(),
|
|
43904
|
+
priceMultiplier: number().positive()
|
|
43905
|
+
});
|
|
43906
|
+
/**
|
|
43907
|
+
* The provider's per-account settings, as the orchestrator reads them. They
|
|
43908
|
+
* live in the PROVIDER addon's settings (operator decision 2026-10-08: they
|
|
43909
|
+
* depend on the user's account), never hard-coded in the orchestrator.
|
|
43910
|
+
*/
|
|
43911
|
+
var TrainingProviderDefaultsSchema = object({
|
|
43912
|
+
gpuType: string(),
|
|
43913
|
+
region: string(),
|
|
43914
|
+
costCapUsd: number().nonnegative(),
|
|
43915
|
+
maxRuntimeSec: number().int().positive(),
|
|
43916
|
+
/** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
|
|
43917
|
+
failedDatasetGraceHours: number().nonnegative()
|
|
43918
|
+
});
|
|
43919
|
+
var TrainingProviderDescriptorSchema = object({
|
|
43920
|
+
addonId: string(),
|
|
43921
|
+
/** `modal`, `runpod`, `fake`, … */
|
|
43922
|
+
kind: string(),
|
|
43923
|
+
label: string(),
|
|
43924
|
+
gpuTypes: array(TrainingGpuOptionSchema).readonly(),
|
|
43925
|
+
regions: array(TrainingRegionOptionSchema).readonly(),
|
|
43926
|
+
maxDatasetBytes: number().int().positive(),
|
|
43927
|
+
maxRuntimeSec: number().int().positive(),
|
|
43928
|
+
freeTierNote: string().optional(),
|
|
43929
|
+
/** Where the data goes, in one sentence the confirm dialog repeats. */
|
|
43930
|
+
dataResidencyNote: string(),
|
|
43931
|
+
/** Credentials are present — never the values. */
|
|
43932
|
+
configured: boolean(),
|
|
43933
|
+
defaults: TrainingProviderDefaultsSchema
|
|
43934
|
+
});
|
|
43935
|
+
var TrainingCredentialCheckSchema = object({
|
|
43936
|
+
ok: boolean(),
|
|
43937
|
+
/** Workspace / account name, when the provider says. */
|
|
43938
|
+
account: string().optional(),
|
|
43939
|
+
reason: _enum([
|
|
43940
|
+
"missing",
|
|
43941
|
+
"invalid",
|
|
43942
|
+
"forbidden",
|
|
43943
|
+
"network",
|
|
43944
|
+
"quota"
|
|
43945
|
+
]).optional(),
|
|
43946
|
+
detail: string().optional()
|
|
43947
|
+
});
|
|
43948
|
+
var ProviderJobStateSchema = _enum([
|
|
43949
|
+
"pending",
|
|
43950
|
+
"starting",
|
|
43951
|
+
"running",
|
|
43952
|
+
"succeeded",
|
|
43953
|
+
"failed",
|
|
43954
|
+
"cancelled",
|
|
43955
|
+
"lost"
|
|
43956
|
+
]);
|
|
43957
|
+
var ProviderJobStatusSchema = object({
|
|
43958
|
+
jobKey: string(),
|
|
43959
|
+
providerJobId: string().optional(),
|
|
43960
|
+
state: ProviderJobStateSchema,
|
|
43961
|
+
startedAt: number().optional(),
|
|
43962
|
+
endedAt: number().optional(),
|
|
43963
|
+
exitCode: number().int().optional(),
|
|
43964
|
+
failureReason: string().optional(),
|
|
43965
|
+
gpuType: string(),
|
|
43966
|
+
region: string().optional(),
|
|
43967
|
+
billedSeconds: number().nonnegative(),
|
|
43968
|
+
costUsd: number().nonnegative(),
|
|
43969
|
+
/** True when `costUsd` is runtime × list price, not a billing answer. */
|
|
43970
|
+
costIsEstimate: boolean(),
|
|
43971
|
+
lastFetchedAt: number()
|
|
43972
|
+
});
|
|
43973
|
+
/**
|
|
43974
|
+
* The trainer the job runs, by SOURCE revision: the provider turns it into an
|
|
43975
|
+
* image its own way (Modal builds the published Dockerfile at that revision;
|
|
43976
|
+
* a registry-pull provider maps it to a tag). Recorded on the job and echoed
|
|
43977
|
+
* in `result.json`.
|
|
43978
|
+
*/
|
|
43979
|
+
var TrainerSourceRefSchema = object({
|
|
43980
|
+
/** Hugging Face repo id, e.g. `camstack/camstack-trainer`. */
|
|
43981
|
+
repo: string().min(1),
|
|
43982
|
+
/** A commit sha (never a branch) — the job must be reproducible. */
|
|
43983
|
+
revision: string().regex(/^[0-9a-f]{7,64}$/)
|
|
43984
|
+
});
|
|
43985
|
+
var JobRef = {
|
|
43986
|
+
addonId: string(),
|
|
43987
|
+
jobKey: string().uuid()
|
|
43988
|
+
};
|
|
43989
|
+
var TrainingLogLineSchema = object({
|
|
43990
|
+
ts: number(),
|
|
43991
|
+
text: string()
|
|
43992
|
+
});
|
|
43993
|
+
method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
|
|
43994
|
+
kind: "mutation",
|
|
43995
|
+
auth: "admin",
|
|
43996
|
+
timeoutMs: 3e4
|
|
43997
|
+
}), method(object({
|
|
43998
|
+
addonId: string(),
|
|
43999
|
+
gpuType: string(),
|
|
44000
|
+
region: string(),
|
|
44001
|
+
datasetBytes: number().int().nonnegative(),
|
|
44002
|
+
gpuSecondsLow: number().nonnegative(),
|
|
44003
|
+
gpuSecondsHigh: number().nonnegative()
|
|
44004
|
+
}), object({
|
|
44005
|
+
usdLow: number().nonnegative(),
|
|
44006
|
+
usdHigh: number().nonnegative(),
|
|
44007
|
+
notes: array(string()).readonly()
|
|
44008
|
+
}), { auth: "admin" }), method(object({
|
|
44009
|
+
...JobRef,
|
|
44010
|
+
ticket: PeerBytesTicketSchema
|
|
44011
|
+
}), object({
|
|
44012
|
+
bytes: number().int().nonnegative(),
|
|
44013
|
+
sha256: string()
|
|
44014
|
+
}), {
|
|
44015
|
+
kind: "mutation",
|
|
44016
|
+
auth: "admin",
|
|
44017
|
+
timeoutMs: 120 * 6e4
|
|
44018
|
+
}), method(object({
|
|
44019
|
+
...JobRef,
|
|
44020
|
+
trainer: TrainerSourceRefSchema,
|
|
44021
|
+
jobSpecJson: string().min(2).max(64e3),
|
|
44022
|
+
gpuType: string(),
|
|
44023
|
+
region: string(),
|
|
44024
|
+
maxRuntimeSec: number().int().positive()
|
|
44025
|
+
}), ProviderJobStatusSchema, {
|
|
44026
|
+
kind: "mutation",
|
|
44027
|
+
auth: "admin",
|
|
44028
|
+
timeoutMs: 30 * 6e4
|
|
44029
|
+
}), method(object(JobRef), ProviderJobStatusSchema, {
|
|
44030
|
+
auth: "admin",
|
|
44031
|
+
timeoutMs: 6e4
|
|
44032
|
+
}), method(object({
|
|
44033
|
+
...JobRef,
|
|
44034
|
+
cursor: string().optional(),
|
|
44035
|
+
max: number().int().min(1).max(500)
|
|
44036
|
+
}), object({
|
|
44037
|
+
lines: array(TrainingLogLineSchema).readonly(),
|
|
44038
|
+
cursor: string()
|
|
44039
|
+
}), {
|
|
44040
|
+
auth: "admin",
|
|
44041
|
+
timeoutMs: 6e4
|
|
44042
|
+
}), method(object(JobRef), object({ ok: literal(true) }), {
|
|
44043
|
+
kind: "mutation",
|
|
44044
|
+
auth: "admin",
|
|
44045
|
+
timeoutMs: 6e4
|
|
44046
|
+
}), method(object(JobRef), object({
|
|
44047
|
+
found: boolean(),
|
|
44048
|
+
text: string().optional()
|
|
44049
|
+
}), {
|
|
44050
|
+
kind: "mutation",
|
|
44051
|
+
auth: "admin",
|
|
44052
|
+
timeoutMs: 5 * 6e4
|
|
44053
|
+
}), method(object({
|
|
44054
|
+
...JobRef,
|
|
44055
|
+
path: _enum(["bundle.tar"])
|
|
44056
|
+
}), object({ ticket: PeerBytesTicketSchema }), {
|
|
44057
|
+
kind: "mutation",
|
|
44058
|
+
auth: "admin",
|
|
44059
|
+
timeoutMs: 5 * 6e4
|
|
44060
|
+
}), method(object(JobRef), object({ deleted: array(string()).readonly() }), {
|
|
44061
|
+
kind: "mutation",
|
|
44062
|
+
auth: "admin",
|
|
44063
|
+
timeoutMs: 5 * 6e4
|
|
44064
|
+
}), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
|
|
44065
|
+
auth: "admin",
|
|
44066
|
+
timeoutMs: 2 * 6e4
|
|
44067
|
+
});
|
|
44068
|
+
/**
|
|
44069
|
+
* `training` — the cloud-training orchestrator (D805). Hub-only singleton,
|
|
44070
|
+
* provided by `addon-training`.
|
|
44071
|
+
*
|
|
44072
|
+
* It owns what every provider must agree on, written once:
|
|
44073
|
+
*
|
|
44074
|
+
* - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
|
|
44075
|
+
* live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
|
|
44076
|
+
* the export plan) and reaches this store through the five row methods
|
|
44077
|
+
* below, so the Retrain page and the export did not change.
|
|
44078
|
+
* - **Jobs.** A persisted state machine, a reconcile loop against the
|
|
44079
|
+
* provider, a cost guard, a daily orphan sweep and the retention rules.
|
|
44080
|
+
* - **The return flow.** Verified artefacts → Model Studio
|
|
44081
|
+
* (`custom-model-registry.importModelBundle`) → canary on cameras →
|
|
44082
|
+
* rollback. Nothing is ever registered automatically.
|
|
44083
|
+
*
|
|
44084
|
+
* Every method is `admin`.
|
|
44085
|
+
*/
|
|
44086
|
+
/** A version WITH its frame list — what the export and a job read. */
|
|
44087
|
+
var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
|
|
44088
|
+
/** A base model a detector job can fine-tune, and the baseline it is judged against. */
|
|
44089
|
+
var TrainingBaseModelSchema = object({
|
|
44090
|
+
modelId: string(),
|
|
44091
|
+
label: string(),
|
|
44092
|
+
weights: string(),
|
|
44093
|
+
imgsz: number().int(),
|
|
44094
|
+
baselineOnnxUrl: string(),
|
|
44095
|
+
baselineFloors: record(string(), number()),
|
|
44096
|
+
/** The base the fleet runs most — the UI's default. */
|
|
44097
|
+
recommended: boolean()
|
|
44098
|
+
});
|
|
44099
|
+
var TrainingPresetSchema = _enum([
|
|
44100
|
+
"quick",
|
|
44101
|
+
"standard",
|
|
44102
|
+
"thorough"
|
|
44103
|
+
]);
|
|
44104
|
+
var TrainingJobRequestSchema = object({
|
|
44105
|
+
datasetVersionId: string().min(1),
|
|
44106
|
+
/** The `training-provider` addon that runs it. */
|
|
44107
|
+
addonId: string().min(1),
|
|
44108
|
+
gpuType: string().min(1),
|
|
44109
|
+
region: string(),
|
|
44110
|
+
baseModelId: string().min(1),
|
|
44111
|
+
preset: TrainingPresetSchema,
|
|
44112
|
+
/** Freeze the backbone's first N layers; `null` = the preset's choice. */
|
|
44113
|
+
freeze: number().int().nonnegative().nullable(),
|
|
44114
|
+
/** Cameras held out whole for evaluation; `null` = the orchestrator's default. */
|
|
44115
|
+
holdoutCameras: array(number().int()).nullable()
|
|
44116
|
+
});
|
|
44117
|
+
var TrainingSplitPlanSchema = object({
|
|
44118
|
+
holdoutCameras: array(number().int()).readonly(),
|
|
44119
|
+
/** Used when no camera is held out: the last N days of every camera. */
|
|
44120
|
+
holdoutLastDays: number().int().nonnegative(),
|
|
44121
|
+
/** Holdout subjects per class (camera holdout only; `null` = known only after the split). */
|
|
44122
|
+
holdoutSupport: record(string(), number().int()).nullable(),
|
|
44123
|
+
trainSubjects: number().int()
|
|
44124
|
+
});
|
|
44125
|
+
var TrainingRefusalReasonSchema = _enum([
|
|
44126
|
+
"unknown-dataset",
|
|
44127
|
+
"unknown-provider",
|
|
44128
|
+
"provider-not-configured",
|
|
44129
|
+
"unknown-base-model",
|
|
44130
|
+
"unknown-gpu",
|
|
44131
|
+
"dataset-too-large",
|
|
44132
|
+
"no-training-subjects",
|
|
44133
|
+
"job-already-running"
|
|
44134
|
+
]);
|
|
44135
|
+
var TrainingJobPlanSchema = object({
|
|
44136
|
+
refusal: object({
|
|
44137
|
+
reason: TrainingRefusalReasonSchema,
|
|
44138
|
+
detail: string()
|
|
44139
|
+
}).nullable(),
|
|
44140
|
+
warnings: array(string()).readonly(),
|
|
44141
|
+
split: TrainingSplitPlanSchema.nullable(),
|
|
44142
|
+
estimate: object({
|
|
44143
|
+
datasetBytes: number().int(),
|
|
44144
|
+
uploadMinutesAt20Mbps: number(),
|
|
44145
|
+
gpuSecondsLow: number(),
|
|
44146
|
+
gpuSecondsHigh: number(),
|
|
44147
|
+
usdLow: number(),
|
|
44148
|
+
usdHigh: number(),
|
|
44149
|
+
notes: array(string()).readonly()
|
|
44150
|
+
}).nullable(),
|
|
44151
|
+
/** Pre-filled from the provider's settings; the operator may lower or raise them. */
|
|
44152
|
+
defaults: object({
|
|
44153
|
+
maxCostUsd: number(),
|
|
44154
|
+
maxRuntimeSec: number().int()
|
|
44155
|
+
}).nullable(),
|
|
44156
|
+
/** The sentence the confirm dialog repeats: where the frames go and when they are deleted. */
|
|
44157
|
+
dataNotice: string()
|
|
44158
|
+
});
|
|
44159
|
+
/**
|
|
44160
|
+
* Orchestrator-owned states, persisted. `uploading` covers exporting the
|
|
44161
|
+
* archive (it is streamed, never staged). Terminal: `failed`, `cancelled`,
|
|
44162
|
+
* `lost`, `expired`, `discarded`. `registered` and `canary` are where a
|
|
44163
|
+
* result lives after the operator acted on it.
|
|
44164
|
+
*/
|
|
44165
|
+
var TrainingJobStateSchema = _enum([
|
|
44166
|
+
"uploading",
|
|
44167
|
+
"submitted",
|
|
44168
|
+
"starting",
|
|
44169
|
+
"running",
|
|
44170
|
+
"collecting",
|
|
44171
|
+
"ready",
|
|
44172
|
+
"registered",
|
|
44173
|
+
"canary",
|
|
44174
|
+
"failed",
|
|
44175
|
+
"cancelling",
|
|
44176
|
+
"cancelled",
|
|
44177
|
+
"lost",
|
|
44178
|
+
"expired",
|
|
44179
|
+
"discarded"
|
|
44180
|
+
]);
|
|
44181
|
+
var TrainingFailureReasonSchema = _enum([
|
|
44182
|
+
"cost-cap",
|
|
44183
|
+
"runtime-cap",
|
|
44184
|
+
"upload-failed",
|
|
44185
|
+
"submit-failed",
|
|
44186
|
+
"trainer-failed",
|
|
44187
|
+
"result-invalid",
|
|
44188
|
+
"checksum-mismatch",
|
|
44189
|
+
"fetch-failed",
|
|
44190
|
+
"provider-error",
|
|
44191
|
+
"hub-restart-during-upload"
|
|
44192
|
+
]);
|
|
44193
|
+
var TrainingProgressPointSchema = object({
|
|
44194
|
+
epoch: number().int(),
|
|
44195
|
+
map50: number().nullable(),
|
|
44196
|
+
map50_95: number().nullable()
|
|
44197
|
+
});
|
|
44198
|
+
var TrainingCanarySchema = object({
|
|
44199
|
+
deviceIds: array(number().int()).readonly(),
|
|
44200
|
+
since: number(),
|
|
44201
|
+
/** Every override the canary replaced, exactly, so rollback restores it. */
|
|
44202
|
+
previous: array(object({
|
|
44203
|
+
deviceId: number().int(),
|
|
44204
|
+
nodeId: string(),
|
|
44205
|
+
deviceKey: string(),
|
|
44206
|
+
patch: object({
|
|
44207
|
+
modelId: string().optional(),
|
|
44208
|
+
settings: record(string(), unknown()).readonly().optional()
|
|
44209
|
+
}).nullable()
|
|
44210
|
+
})).readonly()
|
|
44211
|
+
});
|
|
44212
|
+
var TrainingJobSchema = object({
|
|
44213
|
+
id: string(),
|
|
44214
|
+
idempotencyKey: string(),
|
|
44215
|
+
name: string(),
|
|
44216
|
+
createdAt: number(),
|
|
44217
|
+
updatedAt: number(),
|
|
44218
|
+
state: TrainingJobStateSchema,
|
|
44219
|
+
stage: TrainingStageSchema.nullable(),
|
|
44220
|
+
failure: object({
|
|
44221
|
+
reason: TrainingFailureReasonSchema,
|
|
44222
|
+
stage: string().nullable(),
|
|
44223
|
+
detail: string()
|
|
44224
|
+
}).nullable(),
|
|
44225
|
+
request: TrainingJobRequestSchema,
|
|
44226
|
+
maxCostUsd: number().nonnegative(),
|
|
44227
|
+
maxRuntimeSec: number().int().positive(),
|
|
44228
|
+
trainer: TrainerSourceRefSchema,
|
|
44229
|
+
datasetLayout: RetrainExportLayoutSchema,
|
|
44230
|
+
dataset: object({
|
|
44231
|
+
bytes: number().int(),
|
|
44232
|
+
sha256: string(),
|
|
44233
|
+
uploadedAt: number()
|
|
44234
|
+
}).nullable(),
|
|
44235
|
+
split: TrainingSplitPlanSchema,
|
|
44236
|
+
provider: object({
|
|
44237
|
+
state: ProviderJobStateSchema.nullable(),
|
|
44238
|
+
providerJobId: string().nullable(),
|
|
44239
|
+
startedAt: number().nullable(),
|
|
44240
|
+
endedAt: number().nullable(),
|
|
44241
|
+
billedSeconds: number(),
|
|
44242
|
+
costUsd: number(),
|
|
44243
|
+
costIsEstimate: boolean(),
|
|
44244
|
+
lastPolledAt: number().nullable()
|
|
44245
|
+
}),
|
|
44246
|
+
progress: object({
|
|
44247
|
+
epoch: number().int().nullable(),
|
|
44248
|
+
epochs: number().int().nullable(),
|
|
44249
|
+
etaSec: number().nullable(),
|
|
44250
|
+
series: array(TrainingProgressPointSchema).readonly()
|
|
44251
|
+
}),
|
|
44252
|
+
/** The last lines of the job's output (≤ 200), newest last. Never frame paths. */
|
|
44253
|
+
logTail: array(string()).readonly(),
|
|
44254
|
+
logCursor: string().nullable(),
|
|
44255
|
+
artifacts: object({
|
|
44256
|
+
bundleBytes: number().int(),
|
|
44257
|
+
bundleSha256: string(),
|
|
44258
|
+
fetchedAt: number(),
|
|
44259
|
+
/** When the staged artefacts are deleted from the hub. */
|
|
44260
|
+
expiresAt: number()
|
|
44261
|
+
}).nullable(),
|
|
44262
|
+
/** When the provider-side copy of the frames was deleted; null while it exists. */
|
|
44263
|
+
cloudDatasetDeletedAt: number().nullable(),
|
|
44264
|
+
/** A failed job's dataset is kept until then (the provider's grace), then deleted. */
|
|
44265
|
+
cloudCleanupDueAt: number().nullable(),
|
|
44266
|
+
/** Model ids registered from this job (base, and int8 when kept). */
|
|
44267
|
+
registeredModelIds: array(string()).readonly(),
|
|
44268
|
+
canary: TrainingCanarySchema.nullable()
|
|
44269
|
+
});
|
|
44270
|
+
var IdInput = object({ id: string().min(1) });
|
|
44271
|
+
method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
|
|
44272
|
+
kind: "mutation",
|
|
44273
|
+
auth: "admin"
|
|
44274
|
+
}), method(IdInput, TrainingDatasetVersionRowSchema.nullable(), { auth: "admin" }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), object({ id: string().nullable() }), { auth: "admin" }), method(IdInput, object({ removed: boolean() }), {
|
|
44275
|
+
kind: "mutation",
|
|
44276
|
+
auth: "admin"
|
|
44277
|
+
}), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
|
|
44278
|
+
auth: "admin",
|
|
44279
|
+
timeoutMs: 6e4
|
|
44280
|
+
}), method(TrainingJobRequestSchema.extend({
|
|
44281
|
+
name: string().min(1).max(120),
|
|
44282
|
+
maxCostUsd: number().positive(),
|
|
44283
|
+
maxRuntimeSec: number().int().positive(),
|
|
44284
|
+
idempotencyKey: string().min(8).max(80)
|
|
44285
|
+
}), discriminatedUnion("kind", [object({
|
|
44286
|
+
kind: literal("started"),
|
|
44287
|
+
job: TrainingJobSchema
|
|
44288
|
+
}), object({
|
|
44289
|
+
kind: literal("refused"),
|
|
44290
|
+
reason: TrainingRefusalReasonSchema,
|
|
44291
|
+
detail: string()
|
|
44292
|
+
})]), {
|
|
44293
|
+
kind: "mutation",
|
|
44294
|
+
auth: "admin",
|
|
44295
|
+
timeoutMs: 12e4
|
|
44296
|
+
}), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
|
|
44297
|
+
kind: "mutation",
|
|
44298
|
+
auth: "admin",
|
|
44299
|
+
timeoutMs: 12e4
|
|
44300
|
+
}), method(IdInput, TrainingResultSchema.nullable(), { auth: "admin" }), method(IdInput.extend({ canaryDeviceIds: array(number().int()).readonly() }), TrainingJobSchema, {
|
|
44301
|
+
kind: "mutation",
|
|
44302
|
+
auth: "admin",
|
|
44303
|
+
timeoutMs: 30 * 6e4
|
|
44304
|
+
}), method(IdInput.extend({ deviceIds: array(number().int()).min(1).readonly() }), TrainingJobSchema, {
|
|
44305
|
+
kind: "mutation",
|
|
44306
|
+
auth: "admin",
|
|
44307
|
+
timeoutMs: 12e4
|
|
44308
|
+
}), method(IdInput, TrainingJobSchema, {
|
|
44309
|
+
kind: "mutation",
|
|
44310
|
+
auth: "admin",
|
|
44311
|
+
timeoutMs: 12e4
|
|
44312
|
+
}), method(IdInput, TrainingJobSchema, {
|
|
44313
|
+
kind: "mutation",
|
|
44314
|
+
auth: "admin"
|
|
44315
|
+
});
|
|
42909
44316
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
42910
44317
|
Object.freeze({
|
|
42911
44318
|
person: .5,
|
|
@@ -45069,6 +46476,12 @@ Object.freeze({
|
|
|
45069
46476
|
addonId: null,
|
|
45070
46477
|
access: "create"
|
|
45071
46478
|
},
|
|
46479
|
+
"backup.checkBackupKey": {
|
|
46480
|
+
capName: "backup",
|
|
46481
|
+
capScope: "system",
|
|
46482
|
+
addonId: null,
|
|
46483
|
+
access: "create"
|
|
46484
|
+
},
|
|
45072
46485
|
"backup.delete": {
|
|
45073
46486
|
capName: "backup",
|
|
45074
46487
|
capScope: "system",
|
|
@@ -45081,6 +46494,18 @@ Object.freeze({
|
|
|
45081
46494
|
addonId: null,
|
|
45082
46495
|
access: "delete"
|
|
45083
46496
|
},
|
|
46497
|
+
"backup.disableEncryption": {
|
|
46498
|
+
capName: "backup",
|
|
46499
|
+
capScope: "system",
|
|
46500
|
+
addonId: null,
|
|
46501
|
+
access: "create"
|
|
46502
|
+
},
|
|
46503
|
+
"backup.getEncryption": {
|
|
46504
|
+
capName: "backup",
|
|
46505
|
+
capScope: "system",
|
|
46506
|
+
addonId: null,
|
|
46507
|
+
access: "view"
|
|
46508
|
+
},
|
|
45084
46509
|
"backup.getEntries": {
|
|
45085
46510
|
capName: "backup",
|
|
45086
46511
|
capScope: "system",
|
|
@@ -45135,6 +46560,12 @@ Object.freeze({
|
|
|
45135
46560
|
addonId: null,
|
|
45136
46561
|
access: "create"
|
|
45137
46562
|
},
|
|
46563
|
+
"backup.setupEncryption": {
|
|
46564
|
+
capName: "backup",
|
|
46565
|
+
capScope: "system",
|
|
46566
|
+
addonId: null,
|
|
46567
|
+
access: "create"
|
|
46568
|
+
},
|
|
45138
46569
|
"backup.trigger": {
|
|
45139
46570
|
capName: "backup",
|
|
45140
46571
|
capScope: "system",
|
|
@@ -45687,6 +47118,12 @@ Object.freeze({
|
|
|
45687
47118
|
addonId: null,
|
|
45688
47119
|
access: "create"
|
|
45689
47120
|
},
|
|
47121
|
+
"customModelRegistry.importModelBundle": {
|
|
47122
|
+
capName: "custom-model-registry",
|
|
47123
|
+
capScope: "system",
|
|
47124
|
+
addonId: null,
|
|
47125
|
+
access: "create"
|
|
47126
|
+
},
|
|
45690
47127
|
"customModelRegistry.listModels": {
|
|
45691
47128
|
capName: "custom-model-registry",
|
|
45692
47129
|
capScope: "system",
|
|
@@ -47127,6 +48564,12 @@ Object.freeze({
|
|
|
47127
48564
|
addonId: null,
|
|
47128
48565
|
access: "view"
|
|
47129
48566
|
},
|
|
48567
|
+
"keychainAdmin.acknowledgeReset": {
|
|
48568
|
+
capName: "keychain-admin",
|
|
48569
|
+
capScope: "system",
|
|
48570
|
+
addonId: null,
|
|
48571
|
+
access: "create"
|
|
48572
|
+
},
|
|
47130
48573
|
"keychainAdmin.deleteOrphans": {
|
|
47131
48574
|
capName: "keychain-admin",
|
|
47132
48575
|
capScope: "system",
|
|
@@ -47163,6 +48606,12 @@ Object.freeze({
|
|
|
47163
48606
|
addonId: null,
|
|
47164
48607
|
access: "delete"
|
|
47165
48608
|
},
|
|
48609
|
+
"keychainAdmin.resetReport": {
|
|
48610
|
+
capName: "keychain-admin",
|
|
48611
|
+
capScope: "system",
|
|
48612
|
+
addonId: null,
|
|
48613
|
+
access: "delete"
|
|
48614
|
+
},
|
|
47166
48615
|
"keychainAdmin.reveal": {
|
|
47167
48616
|
capName: "keychain-admin",
|
|
47168
48617
|
capScope: "system",
|
|
@@ -47175,6 +48624,12 @@ Object.freeze({
|
|
|
47175
48624
|
addonId: null,
|
|
47176
48625
|
access: "create"
|
|
47177
48626
|
},
|
|
48627
|
+
"keychainAdmin.setSystemSecret": {
|
|
48628
|
+
capName: "keychain-admin",
|
|
48629
|
+
capScope: "system",
|
|
48630
|
+
addonId: null,
|
|
48631
|
+
access: "create"
|
|
48632
|
+
},
|
|
47178
48633
|
"keychainAdmin.status": {
|
|
47179
48634
|
capName: "keychain-admin",
|
|
47180
48635
|
capScope: "system",
|
|
@@ -48621,6 +50076,12 @@ Object.freeze({
|
|
|
48621
50076
|
addonId: null,
|
|
48622
50077
|
access: "create"
|
|
48623
50078
|
},
|
|
50079
|
+
"pipelineAnalytics.createRetrainDatasetVersion": {
|
|
50080
|
+
capName: "pipeline-analytics",
|
|
50081
|
+
capScope: "device",
|
|
50082
|
+
addonId: null,
|
|
50083
|
+
access: "create"
|
|
50084
|
+
},
|
|
48624
50085
|
"pipelineAnalytics.deleteDeviceEvents": {
|
|
48625
50086
|
capName: "pipeline-analytics",
|
|
48626
50087
|
capScope: "device",
|
|
@@ -48633,6 +50094,12 @@ Object.freeze({
|
|
|
48633
50094
|
addonId: null,
|
|
48634
50095
|
access: "delete"
|
|
48635
50096
|
},
|
|
50097
|
+
"pipelineAnalytics.deleteRetrainDatasetVersion": {
|
|
50098
|
+
capName: "pipeline-analytics",
|
|
50099
|
+
capScope: "device",
|
|
50100
|
+
addonId: null,
|
|
50101
|
+
access: "delete"
|
|
50102
|
+
},
|
|
48636
50103
|
"pipelineAnalytics.deleteTracks": {
|
|
48637
50104
|
capName: "pipeline-analytics",
|
|
48638
50105
|
capScope: "device",
|
|
@@ -48855,6 +50322,12 @@ Object.freeze({
|
|
|
48855
50322
|
addonId: null,
|
|
48856
50323
|
access: "view"
|
|
48857
50324
|
},
|
|
50325
|
+
"pipelineAnalytics.listRetrainDatasetVersions": {
|
|
50326
|
+
capName: "pipeline-analytics",
|
|
50327
|
+
capScope: "device",
|
|
50328
|
+
addonId: null,
|
|
50329
|
+
access: "view"
|
|
50330
|
+
},
|
|
48858
50331
|
"pipelineAnalytics.listRetrainFrames": {
|
|
48859
50332
|
capName: "pipeline-analytics",
|
|
48860
50333
|
capScope: "device",
|
|
@@ -48885,6 +50358,12 @@ Object.freeze({
|
|
|
48885
50358
|
addonId: null,
|
|
48886
50359
|
access: "view"
|
|
48887
50360
|
},
|
|
50361
|
+
"pipelineAnalytics.offerRetrainArchive": {
|
|
50362
|
+
capName: "pipeline-analytics",
|
|
50363
|
+
capScope: "device",
|
|
50364
|
+
addonId: null,
|
|
50365
|
+
access: "create"
|
|
50366
|
+
},
|
|
48888
50367
|
"pipelineAnalytics.ownersWithMedia": {
|
|
48889
50368
|
capName: "pipeline-analytics",
|
|
48890
50369
|
capScope: "device",
|
|
@@ -48897,6 +50376,12 @@ Object.freeze({
|
|
|
48897
50376
|
addonId: null,
|
|
48898
50377
|
access: "create"
|
|
48899
50378
|
},
|
|
50379
|
+
"pipelineAnalytics.previewRetrainDataset": {
|
|
50380
|
+
capName: "pipeline-analytics",
|
|
50381
|
+
capScope: "device",
|
|
50382
|
+
addonId: null,
|
|
50383
|
+
access: "view"
|
|
50384
|
+
},
|
|
48900
50385
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
48901
50386
|
capName: "pipeline-analytics",
|
|
48902
50387
|
capScope: "device",
|
|
@@ -49035,6 +50520,12 @@ Object.freeze({
|
|
|
49035
50520
|
addonId: null,
|
|
49036
50521
|
access: "create"
|
|
49037
50522
|
},
|
|
50523
|
+
"pipelineAnalytics.verifyRetrainDatasetVersion": {
|
|
50524
|
+
capName: "pipeline-analytics",
|
|
50525
|
+
capScope: "device",
|
|
50526
|
+
addonId: null,
|
|
50527
|
+
access: "view"
|
|
50528
|
+
},
|
|
49038
50529
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
49039
50530
|
capName: "pipeline-analytics",
|
|
49040
50531
|
capScope: "device",
|
|
@@ -51411,6 +52902,174 @@ Object.freeze({
|
|
|
51411
52902
|
addonId: null,
|
|
51412
52903
|
access: "view"
|
|
51413
52904
|
},
|
|
52905
|
+
"training.canaryResult": {
|
|
52906
|
+
capName: "training",
|
|
52907
|
+
capScope: "system",
|
|
52908
|
+
addonId: null,
|
|
52909
|
+
access: "create"
|
|
52910
|
+
},
|
|
52911
|
+
"training.cancelJob": {
|
|
52912
|
+
capName: "training",
|
|
52913
|
+
capScope: "system",
|
|
52914
|
+
addonId: null,
|
|
52915
|
+
access: "create"
|
|
52916
|
+
},
|
|
52917
|
+
"training.discardResult": {
|
|
52918
|
+
capName: "training",
|
|
52919
|
+
capScope: "system",
|
|
52920
|
+
addonId: null,
|
|
52921
|
+
access: "create"
|
|
52922
|
+
},
|
|
52923
|
+
"training.findDatasetVersionIdByName": {
|
|
52924
|
+
capName: "training",
|
|
52925
|
+
capScope: "system",
|
|
52926
|
+
addonId: null,
|
|
52927
|
+
access: "view"
|
|
52928
|
+
},
|
|
52929
|
+
"training.getDatasetVersion": {
|
|
52930
|
+
capName: "training",
|
|
52931
|
+
capScope: "system",
|
|
52932
|
+
addonId: null,
|
|
52933
|
+
access: "view"
|
|
52934
|
+
},
|
|
52935
|
+
"training.getJob": {
|
|
52936
|
+
capName: "training",
|
|
52937
|
+
capScope: "system",
|
|
52938
|
+
addonId: null,
|
|
52939
|
+
access: "view"
|
|
52940
|
+
},
|
|
52941
|
+
"training.getJobResult": {
|
|
52942
|
+
capName: "training",
|
|
52943
|
+
capScope: "system",
|
|
52944
|
+
addonId: null,
|
|
52945
|
+
access: "view"
|
|
52946
|
+
},
|
|
52947
|
+
"training.listBaseModels": {
|
|
52948
|
+
capName: "training",
|
|
52949
|
+
capScope: "system",
|
|
52950
|
+
addonId: null,
|
|
52951
|
+
access: "view"
|
|
52952
|
+
},
|
|
52953
|
+
"training.listDatasetVersions": {
|
|
52954
|
+
capName: "training",
|
|
52955
|
+
capScope: "system",
|
|
52956
|
+
addonId: null,
|
|
52957
|
+
access: "view"
|
|
52958
|
+
},
|
|
52959
|
+
"training.listJobs": {
|
|
52960
|
+
capName: "training",
|
|
52961
|
+
capScope: "system",
|
|
52962
|
+
addonId: null,
|
|
52963
|
+
access: "view"
|
|
52964
|
+
},
|
|
52965
|
+
"training.planJob": {
|
|
52966
|
+
capName: "training",
|
|
52967
|
+
capScope: "system",
|
|
52968
|
+
addonId: null,
|
|
52969
|
+
access: "view"
|
|
52970
|
+
},
|
|
52971
|
+
"training.putDatasetVersion": {
|
|
52972
|
+
capName: "training",
|
|
52973
|
+
capScope: "system",
|
|
52974
|
+
addonId: null,
|
|
52975
|
+
access: "create"
|
|
52976
|
+
},
|
|
52977
|
+
"training.registerResult": {
|
|
52978
|
+
capName: "training",
|
|
52979
|
+
capScope: "system",
|
|
52980
|
+
addonId: null,
|
|
52981
|
+
access: "create"
|
|
52982
|
+
},
|
|
52983
|
+
"training.removeDatasetVersion": {
|
|
52984
|
+
capName: "training",
|
|
52985
|
+
capScope: "system",
|
|
52986
|
+
addonId: null,
|
|
52987
|
+
access: "delete"
|
|
52988
|
+
},
|
|
52989
|
+
"training.rollbackCanary": {
|
|
52990
|
+
capName: "training",
|
|
52991
|
+
capScope: "system",
|
|
52992
|
+
addonId: null,
|
|
52993
|
+
access: "create"
|
|
52994
|
+
},
|
|
52995
|
+
"training.startJob": {
|
|
52996
|
+
capName: "training",
|
|
52997
|
+
capScope: "system",
|
|
52998
|
+
addonId: null,
|
|
52999
|
+
access: "create"
|
|
53000
|
+
},
|
|
53001
|
+
"trainingProvider.cancelJob": {
|
|
53002
|
+
capName: "training-provider",
|
|
53003
|
+
capScope: "system",
|
|
53004
|
+
addonId: null,
|
|
53005
|
+
access: "create"
|
|
53006
|
+
},
|
|
53007
|
+
"trainingProvider.cleanupJob": {
|
|
53008
|
+
capName: "training-provider",
|
|
53009
|
+
capScope: "system",
|
|
53010
|
+
addonId: null,
|
|
53011
|
+
access: "create"
|
|
53012
|
+
},
|
|
53013
|
+
"trainingProvider.describe": {
|
|
53014
|
+
capName: "training-provider",
|
|
53015
|
+
capScope: "system",
|
|
53016
|
+
addonId: null,
|
|
53017
|
+
access: "view"
|
|
53018
|
+
},
|
|
53019
|
+
"trainingProvider.estimateJob": {
|
|
53020
|
+
capName: "training-provider",
|
|
53021
|
+
capScope: "system",
|
|
53022
|
+
addonId: null,
|
|
53023
|
+
access: "view"
|
|
53024
|
+
},
|
|
53025
|
+
"trainingProvider.getJob": {
|
|
53026
|
+
capName: "training-provider",
|
|
53027
|
+
capScope: "system",
|
|
53028
|
+
addonId: null,
|
|
53029
|
+
access: "view"
|
|
53030
|
+
},
|
|
53031
|
+
"trainingProvider.listJobEvents": {
|
|
53032
|
+
capName: "training-provider",
|
|
53033
|
+
capScope: "system",
|
|
53034
|
+
addonId: null,
|
|
53035
|
+
access: "view"
|
|
53036
|
+
},
|
|
53037
|
+
"trainingProvider.listJobs": {
|
|
53038
|
+
capName: "training-provider",
|
|
53039
|
+
capScope: "system",
|
|
53040
|
+
addonId: null,
|
|
53041
|
+
access: "view"
|
|
53042
|
+
},
|
|
53043
|
+
"trainingProvider.offerArtifact": {
|
|
53044
|
+
capName: "training-provider",
|
|
53045
|
+
capScope: "system",
|
|
53046
|
+
addonId: null,
|
|
53047
|
+
access: "create"
|
|
53048
|
+
},
|
|
53049
|
+
"trainingProvider.readResult": {
|
|
53050
|
+
capName: "training-provider",
|
|
53051
|
+
capScope: "system",
|
|
53052
|
+
addonId: null,
|
|
53053
|
+
access: "create"
|
|
53054
|
+
},
|
|
53055
|
+
"trainingProvider.submitJob": {
|
|
53056
|
+
capName: "training-provider",
|
|
53057
|
+
capScope: "system",
|
|
53058
|
+
addonId: null,
|
|
53059
|
+
access: "create"
|
|
53060
|
+
},
|
|
53061
|
+
"trainingProvider.uploadDataset": {
|
|
53062
|
+
capName: "training-provider",
|
|
53063
|
+
capScope: "system",
|
|
53064
|
+
addonId: null,
|
|
53065
|
+
access: "create"
|
|
53066
|
+
},
|
|
53067
|
+
"trainingProvider.validateCredentials": {
|
|
53068
|
+
capName: "training-provider",
|
|
53069
|
+
capScope: "system",
|
|
53070
|
+
addonId: null,
|
|
53071
|
+
access: "create"
|
|
53072
|
+
},
|
|
51414
53073
|
"turnProvider.getTurnServers": {
|
|
51415
53074
|
capName: "turn-provider",
|
|
51416
53075
|
capScope: "system",
|
|
@@ -51435,12 +53094,6 @@ Object.freeze({
|
|
|
51435
53094
|
addonId: null,
|
|
51436
53095
|
access: "create"
|
|
51437
53096
|
},
|
|
51438
|
-
"userManagement.createApiKey": {
|
|
51439
|
-
capName: "user-management",
|
|
51440
|
-
capScope: "system",
|
|
51441
|
-
addonId: null,
|
|
51442
|
-
access: "create"
|
|
51443
|
-
},
|
|
51444
53097
|
"userManagement.createScopedToken": {
|
|
51445
53098
|
capName: "user-management",
|
|
51446
53099
|
capScope: "system",
|
|
@@ -51477,12 +53130,6 @@ Object.freeze({
|
|
|
51477
53130
|
addonId: null,
|
|
51478
53131
|
access: "view"
|
|
51479
53132
|
},
|
|
51480
|
-
"userManagement.linkExternalIdentity": {
|
|
51481
|
-
capName: "user-management",
|
|
51482
|
-
capScope: "system",
|
|
51483
|
-
addonId: null,
|
|
51484
|
-
access: "create"
|
|
51485
|
-
},
|
|
51486
53133
|
"userManagement.listApiKeys": {
|
|
51487
53134
|
capName: "user-management",
|
|
51488
53135
|
capScope: "system",
|
|
@@ -51585,12 +53232,6 @@ Object.freeze({
|
|
|
51585
53232
|
addonId: null,
|
|
51586
53233
|
access: "create"
|
|
51587
53234
|
},
|
|
51588
|
-
"userManagement.validateApiKey": {
|
|
51589
|
-
capName: "user-management",
|
|
51590
|
-
capScope: "system",
|
|
51591
|
-
addonId: null,
|
|
51592
|
-
access: "view"
|
|
51593
|
-
},
|
|
51594
53235
|
"userManagement.validateCredentials": {
|
|
51595
53236
|
capName: "user-management",
|
|
51596
53237
|
capScope: "system",
|
|
@@ -55922,6 +57563,11 @@ Object.freeze({
|
|
|
55922
57563
|
form: "single",
|
|
55923
57564
|
optional: false
|
|
55924
57565
|
}],
|
|
57566
|
+
"training.canaryResult": [{
|
|
57567
|
+
name: "deviceIds",
|
|
57568
|
+
form: "array",
|
|
57569
|
+
optional: false
|
|
57570
|
+
}],
|
|
55925
57571
|
"update.getStatus": [{
|
|
55926
57572
|
name: "deviceId",
|
|
55927
57573
|
form: "single",
|
|
@@ -56650,6 +58296,8 @@ var STATE_SUMMARY_VARS = [
|
|
|
56650
58296
|
[...RULE_TEXT],
|
|
56651
58297
|
[...RULE_TEXT],
|
|
56652
58298
|
[...RULE_TEXT],
|
|
58299
|
+
[...RULE_TEXT],
|
|
58300
|
+
[...RULE_TEXT],
|
|
56653
58301
|
([...RULE_TEXT], [...UPDATES]),
|
|
56654
58302
|
([...RULE_TEXT], [...PACKAGE_UPDATES]),
|
|
56655
58303
|
([...RULE_TEXT], [...PACKAGE_UPDATES]),
|