@camstack/addon-provider-unraid 0.2.124 → 0.2.126
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 +2068 -145
- package/dist/addon.mjs +2068 -145
- package/package.json +1 -1
package/dist/addon.mjs
CHANGED
|
@@ -5376,7 +5376,7 @@ var ZodIssueCode = {
|
|
|
5376
5376
|
var ZodFirstPartyTypeKind;
|
|
5377
5377
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5378
5378
|
//#endregion
|
|
5379
|
-
//#region ../types/dist/sleep-
|
|
5379
|
+
//#region ../types/dist/sleep-DwAQ9sqX.mjs
|
|
5380
5380
|
/**
|
|
5381
5381
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5382
5382
|
* window to float samples (D455).
|
|
@@ -5493,7 +5493,7 @@ function isKeychainStoredField(field) {
|
|
|
5493
5493
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5494
5494
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5495
5495
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5496
|
-
function isRecord$
|
|
5496
|
+
function isRecord$2(value) {
|
|
5497
5497
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5498
5498
|
}
|
|
5499
5499
|
function makeSecretMarker(ref) {
|
|
@@ -5504,12 +5504,12 @@ function makeSecretMarker(ref) {
|
|
|
5504
5504
|
}
|
|
5505
5505
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5506
5506
|
function isSecretMarker(value) {
|
|
5507
|
-
if (!isRecord$
|
|
5507
|
+
if (!isRecord$2(value)) return false;
|
|
5508
5508
|
const ref = value["$secret"];
|
|
5509
5509
|
return typeof ref === "string" && ref.length > 0;
|
|
5510
5510
|
}
|
|
5511
5511
|
function isSecretClear(value) {
|
|
5512
|
-
return isRecord$
|
|
5512
|
+
return isRecord$2(value) && value["$secretClear"] === true;
|
|
5513
5513
|
}
|
|
5514
5514
|
/**
|
|
5515
5515
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6025,6 +6025,13 @@ function globalSecretScope() {
|
|
|
6025
6025
|
function encodeSegment(value) {
|
|
6026
6026
|
return encodeURIComponent(value);
|
|
6027
6027
|
}
|
|
6028
|
+
function decodeSegment(value) {
|
|
6029
|
+
try {
|
|
6030
|
+
return decodeURIComponent(value);
|
|
6031
|
+
} catch {
|
|
6032
|
+
return null;
|
|
6033
|
+
}
|
|
6034
|
+
}
|
|
6028
6035
|
/**
|
|
6029
6036
|
* The field path of a value inside an array item, addressed by the item's id:
|
|
6030
6037
|
* `arrayItemFieldPath('providers', 'authentik', 'clientSecret')` →
|
|
@@ -6033,6 +6040,75 @@ function encodeSegment(value) {
|
|
|
6033
6040
|
function arrayItemFieldPath(arrayKey, itemId, fieldKey) {
|
|
6034
6041
|
return `${arrayKey}[${encodeSegment(itemId)}].${fieldKey}`;
|
|
6035
6042
|
}
|
|
6043
|
+
function parseScope(segments) {
|
|
6044
|
+
switch (segments[0]) {
|
|
6045
|
+
case "global": return {
|
|
6046
|
+
scope: GLOBAL_SCOPE,
|
|
6047
|
+
used: 1
|
|
6048
|
+
};
|
|
6049
|
+
case "node": {
|
|
6050
|
+
const nodeId = segments[1] !== void 0 ? decodeSegment(segments[1]) : null;
|
|
6051
|
+
return nodeId === null || nodeId.length === 0 ? null : {
|
|
6052
|
+
scope: {
|
|
6053
|
+
kind: "node",
|
|
6054
|
+
nodeId
|
|
6055
|
+
},
|
|
6056
|
+
used: 2
|
|
6057
|
+
};
|
|
6058
|
+
}
|
|
6059
|
+
case "device": {
|
|
6060
|
+
const raw = segments[1];
|
|
6061
|
+
if (raw === void 0 || !/^\d+$/.test(raw)) return null;
|
|
6062
|
+
return {
|
|
6063
|
+
scope: {
|
|
6064
|
+
kind: "device",
|
|
6065
|
+
deviceId: Number(raw)
|
|
6066
|
+
},
|
|
6067
|
+
used: 2
|
|
6068
|
+
};
|
|
6069
|
+
}
|
|
6070
|
+
case "integration": {
|
|
6071
|
+
const id = segments[1] !== void 0 ? decodeSegment(segments[1]) : null;
|
|
6072
|
+
return id === null || id.length === 0 ? null : {
|
|
6073
|
+
scope: {
|
|
6074
|
+
kind: "integration",
|
|
6075
|
+
integrationId: id
|
|
6076
|
+
},
|
|
6077
|
+
used: 2
|
|
6078
|
+
};
|
|
6079
|
+
}
|
|
6080
|
+
case "row": {
|
|
6081
|
+
const collection = segments[1] !== void 0 ? decodeSegment(segments[1]) : null;
|
|
6082
|
+
const rowId = segments[2] !== void 0 ? decodeSegment(segments[2]) : null;
|
|
6083
|
+
if (collection === null || rowId === null || collection.length === 0 || rowId.length === 0) return null;
|
|
6084
|
+
return {
|
|
6085
|
+
scope: {
|
|
6086
|
+
kind: "row",
|
|
6087
|
+
collection,
|
|
6088
|
+
rowId
|
|
6089
|
+
},
|
|
6090
|
+
used: 3
|
|
6091
|
+
};
|
|
6092
|
+
}
|
|
6093
|
+
default: return null;
|
|
6094
|
+
}
|
|
6095
|
+
}
|
|
6096
|
+
/** Take a ref apart; `null` when it is not a well-formed ref. */
|
|
6097
|
+
function parseSecretRef(ref) {
|
|
6098
|
+
if (!ref.startsWith("secret://")) return null;
|
|
6099
|
+
const segments = ref.slice(9).split("/");
|
|
6100
|
+
const owner = segments[0] !== void 0 ? decodeSegment(segments[0]) : null;
|
|
6101
|
+
if (owner === null || owner.length === 0) return null;
|
|
6102
|
+
const parsed = parseScope(segments.slice(1));
|
|
6103
|
+
if (parsed === null) return null;
|
|
6104
|
+
const fieldPath = segments.slice(1 + parsed.used).join("/");
|
|
6105
|
+
if (fieldPath.length === 0) return null;
|
|
6106
|
+
return {
|
|
6107
|
+
owner,
|
|
6108
|
+
scope: parsed.scope,
|
|
6109
|
+
fieldPath
|
|
6110
|
+
};
|
|
6111
|
+
}
|
|
6036
6112
|
/** A write to a secret path could not be stored in the keychain, so it was refused. */
|
|
6037
6113
|
var KeychainWriteRefusedError = class extends Error {
|
|
6038
6114
|
fieldPath;
|
|
@@ -6043,7 +6119,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6043
6119
|
}
|
|
6044
6120
|
};
|
|
6045
6121
|
var KEEP = { kind: "keep" };
|
|
6046
|
-
function isRecord(value) {
|
|
6122
|
+
function isRecord$1(value) {
|
|
6047
6123
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6048
6124
|
}
|
|
6049
6125
|
function defaultMintId() {
|
|
@@ -6056,7 +6132,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6056
6132
|
return out;
|
|
6057
6133
|
}
|
|
6058
6134
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6059
|
-
else if (isRecord(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6135
|
+
else if (isRecord$1(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6060
6136
|
return out;
|
|
6061
6137
|
}
|
|
6062
6138
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6111,7 +6187,7 @@ function rowId(row, idKey) {
|
|
|
6111
6187
|
return null;
|
|
6112
6188
|
}
|
|
6113
6189
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6114
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord) : [];
|
|
6190
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$1) : [];
|
|
6115
6191
|
if (!Array.isArray(incoming)) {
|
|
6116
6192
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6117
6193
|
return {
|
|
@@ -6127,7 +6203,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6127
6203
|
const kept = /* @__PURE__ */ new Set();
|
|
6128
6204
|
const rows = [];
|
|
6129
6205
|
for (const row of incoming) {
|
|
6130
|
-
if (!isRecord(row)) {
|
|
6206
|
+
if (!isRecord$1(row)) {
|
|
6131
6207
|
rows.push(row);
|
|
6132
6208
|
continue;
|
|
6133
6209
|
}
|
|
@@ -6152,7 +6228,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6152
6228
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6153
6229
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6154
6230
|
case "object": {
|
|
6155
|
-
if (!isRecord(incoming)) {
|
|
6231
|
+
if (!isRecord$1(incoming)) {
|
|
6156
6232
|
if (incoming === void 0) return KEEP;
|
|
6157
6233
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6158
6234
|
return {
|
|
@@ -6160,7 +6236,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6160
6236
|
value: incoming
|
|
6161
6237
|
};
|
|
6162
6238
|
}
|
|
6163
|
-
const storedObj = isRecord(stored) ? stored : {};
|
|
6239
|
+
const storedObj = isRecord$1(stored) ? stored : {};
|
|
6164
6240
|
return {
|
|
6165
6241
|
kind: "value",
|
|
6166
6242
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6219,12 +6295,19 @@ async function transformSecretWrite(input) {
|
|
|
6219
6295
|
}
|
|
6220
6296
|
};
|
|
6221
6297
|
}
|
|
6298
|
+
/** Is `ref` one of `owner`'s refs? */
|
|
6299
|
+
function isSecretRefOwnedBy(ref, owner) {
|
|
6300
|
+
return parseSecretRef(ref)?.owner === owner;
|
|
6301
|
+
}
|
|
6222
6302
|
/**
|
|
6223
6303
|
* Replace every marker in `value` with its keychain value. Returns the SAME
|
|
6224
6304
|
* reference when there is no marker (no allocation, no keychain call).
|
|
6225
6305
|
*/
|
|
6226
|
-
async function resolveSecretMarkers(value, secrets) {
|
|
6227
|
-
const
|
|
6306
|
+
async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
6307
|
+
const keepMarker = options.unresolved === "keep-marker";
|
|
6308
|
+
const owner = options.ownedBy;
|
|
6309
|
+
const inScope = (ref) => owner === void 0 || isSecretRefOwnedBy(ref, owner);
|
|
6310
|
+
const refs = collectSecretMarkerRefs(value).filter(inScope);
|
|
6228
6311
|
if (refs.length === 0) return {
|
|
6229
6312
|
value,
|
|
6230
6313
|
unresolved: []
|
|
@@ -6248,10 +6331,18 @@ async function resolveSecretMarkers(value, secrets) {
|
|
|
6248
6331
|
}
|
|
6249
6332
|
const substitute = (v) => {
|
|
6250
6333
|
if (isSecretMarker(v)) {
|
|
6334
|
+
if (!inScope(v.$secret)) return {
|
|
6335
|
+
keep: true,
|
|
6336
|
+
value: v
|
|
6337
|
+
};
|
|
6251
6338
|
const answer = answers[v.$secret];
|
|
6252
|
-
|
|
6339
|
+
if (answer?.kind === "value") return {
|
|
6253
6340
|
keep: true,
|
|
6254
6341
|
value: answer.value
|
|
6342
|
+
};
|
|
6343
|
+
return keepMarker ? {
|
|
6344
|
+
keep: true,
|
|
6345
|
+
value: v
|
|
6255
6346
|
} : {
|
|
6256
6347
|
keep: false,
|
|
6257
6348
|
value: void 0
|
|
@@ -6268,7 +6359,7 @@ async function resolveSecretMarkers(value, secrets) {
|
|
|
6268
6359
|
value: items
|
|
6269
6360
|
};
|
|
6270
6361
|
}
|
|
6271
|
-
if (isRecord(v)) {
|
|
6362
|
+
if (isRecord$1(v)) {
|
|
6272
6363
|
const out = {};
|
|
6273
6364
|
for (const [k, child] of Object.entries(v)) {
|
|
6274
6365
|
const s = substitute(child);
|
|
@@ -6289,14 +6380,152 @@ async function resolveSecretMarkers(value, secrets) {
|
|
|
6289
6380
|
unresolved
|
|
6290
6381
|
};
|
|
6291
6382
|
}
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6383
|
+
/** An addon tried to replace a stored secret it could not read. Nothing was written. */
|
|
6384
|
+
var SecretOverwriteRefusedError = class extends Error {
|
|
6385
|
+
ref;
|
|
6386
|
+
reason;
|
|
6387
|
+
constructor(ref, reason) {
|
|
6388
|
+
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.`);
|
|
6389
|
+
this.ref = ref;
|
|
6390
|
+
this.reason = reason;
|
|
6391
|
+
this.name = "SecretOverwriteRefusedError";
|
|
6392
|
+
}
|
|
6393
|
+
};
|
|
6394
|
+
function isRecord(value) {
|
|
6395
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6396
|
+
}
|
|
6397
|
+
function resolvedValue(pass, marker) {
|
|
6398
|
+
const answer = pass.answers[marker.$secret];
|
|
6399
|
+
return answer?.kind === "value" ? answer.value : null;
|
|
6400
|
+
}
|
|
6401
|
+
async function atMarker(pass, incoming, stored) {
|
|
6402
|
+
if (incoming === null) return stored;
|
|
6403
|
+
if (typeof incoming !== "string") return incoming;
|
|
6404
|
+
if (incoming === resolvedValue(pass, stored)) return stored;
|
|
6405
|
+
const intent = classifySecretWrite(incoming);
|
|
6406
|
+
if (intent.kind !== "set") return stored;
|
|
6407
|
+
const ref = stored.$secret;
|
|
6408
|
+
if (!isSecretRefOwnedBy(ref, pass.secrets.owner)) return incoming;
|
|
6409
|
+
const answer = pass.answers[ref];
|
|
6410
|
+
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);
|
|
6411
|
+
try {
|
|
6412
|
+
await pass.secrets.put(ref, intent.value);
|
|
6413
|
+
} catch (err) {
|
|
6414
|
+
throw new KeychainWriteRefusedError(ref, err);
|
|
6415
|
+
}
|
|
6416
|
+
pass.changedRefs.push(ref);
|
|
6417
|
+
return stored;
|
|
6418
|
+
}
|
|
6419
|
+
function inArray(pass, incoming, stored) {
|
|
6420
|
+
return incoming.map((item, index) => {
|
|
6421
|
+
const twin = stored[index];
|
|
6422
|
+
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6423
|
+
if (isRecord(item) && isRecord(twin)) return inArrayRow(pass, item, twin);
|
|
6424
|
+
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6425
|
+
return item;
|
|
6426
|
+
});
|
|
6427
|
+
}
|
|
6428
|
+
function inArrayRow(pass, incoming, stored) {
|
|
6429
|
+
const out = { ...incoming };
|
|
6430
|
+
for (const [key, value] of Object.entries(incoming)) {
|
|
6431
|
+
const twin = stored[key];
|
|
6432
|
+
if (isSecretMarker(twin)) {
|
|
6433
|
+
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6434
|
+
} else if (isRecord(value) && isRecord(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6435
|
+
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6436
|
+
}
|
|
6437
|
+
return out;
|
|
6438
|
+
}
|
|
6439
|
+
async function walk(pass, incoming, stored) {
|
|
6440
|
+
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6441
|
+
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6442
|
+
if (!isRecord(incoming) || !isRecord(stored)) return incoming;
|
|
6443
|
+
const out = { ...incoming };
|
|
6444
|
+
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6445
|
+
return out;
|
|
6446
|
+
}
|
|
6447
|
+
/** Restore markers a write-back carries as values. See the file doc. */
|
|
6448
|
+
async function restoreUnchangedSecrets(input) {
|
|
6449
|
+
const refs = [];
|
|
6450
|
+
for (const key of Object.keys(input.patch)) collectSecretMarkerRefs(input.stored[key], refs);
|
|
6451
|
+
const owned = refs.filter((ref) => isSecretRefOwnedBy(ref, input.secrets.owner));
|
|
6452
|
+
if (owned.length === 0) return {
|
|
6453
|
+
patch: input.patch,
|
|
6454
|
+
changedRefs: []
|
|
6455
|
+
};
|
|
6456
|
+
const pass = {
|
|
6457
|
+
secrets: input.secrets,
|
|
6458
|
+
answers: await input.secrets.resolve([...new Set(owned)]),
|
|
6459
|
+
operatorWrite: input.operatorWrite,
|
|
6460
|
+
changedRefs: []
|
|
6461
|
+
};
|
|
6462
|
+
const out = {};
|
|
6463
|
+
for (const [key, value] of Object.entries(input.patch)) out[key] = await walk(pass, value, input.stored[key]);
|
|
6464
|
+
return {
|
|
6465
|
+
patch: out,
|
|
6466
|
+
changedRefs: pass.changedRefs
|
|
6467
|
+
};
|
|
6468
|
+
}
|
|
6469
|
+
/** Structural equality over JSON-shaped values (key order does not matter). */
|
|
6470
|
+
function isJsonEqual(a, b) {
|
|
6471
|
+
if (Object.is(a, b)) return true;
|
|
6472
|
+
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6473
|
+
if (isRecord(a) && isRecord(b)) {
|
|
6474
|
+
const keys = Object.keys(a);
|
|
6475
|
+
if (keys.length !== Object.keys(b).length) return false;
|
|
6476
|
+
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
6297
6477
|
}
|
|
6298
6478
|
return false;
|
|
6299
6479
|
}
|
|
6480
|
+
/** The patch without the keys whose value already equals the stored one. */
|
|
6481
|
+
function dropUnchangedKeys(patch, stored) {
|
|
6482
|
+
const out = {};
|
|
6483
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
6484
|
+
if (Object.prototype.hasOwnProperty.call(stored, key) && isJsonEqual(value, stored[key])) continue;
|
|
6485
|
+
out[key] = value;
|
|
6486
|
+
}
|
|
6487
|
+
return out;
|
|
6488
|
+
}
|
|
6489
|
+
/** The top-level keys of a blob that hold at least one of `owner`'s markers. */
|
|
6490
|
+
function markerKeysOf(blob, owner) {
|
|
6491
|
+
const keys = /* @__PURE__ */ new Set();
|
|
6492
|
+
for (const [key, value] of Object.entries(blob)) if (collectSecretMarkerRefs(value).some((ref) => isSecretRefOwnedBy(ref, owner))) keys.add(key);
|
|
6493
|
+
return keys;
|
|
6494
|
+
}
|
|
6495
|
+
function nodeFromStored(value, owner) {
|
|
6496
|
+
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6497
|
+
if (!isRecord(value)) return null;
|
|
6498
|
+
const children = /* @__PURE__ */ new Map();
|
|
6499
|
+
for (const [key, child] of Object.entries(value)) {
|
|
6500
|
+
const node = nodeFromStored(child, owner);
|
|
6501
|
+
if (node !== null) children.set(key, node);
|
|
6502
|
+
}
|
|
6503
|
+
return children.size > 0 ? {
|
|
6504
|
+
kind: "object",
|
|
6505
|
+
children
|
|
6506
|
+
} : null;
|
|
6507
|
+
}
|
|
6508
|
+
/**
|
|
6509
|
+
* The declared secret tree, widened by every place the STORED blob holds a
|
|
6510
|
+
* marker under one of `keys` — so a marker the schema no longer declares (or
|
|
6511
|
+
* never declared: Wyze before b4906cec6) still gets the save path's
|
|
6512
|
+
* KEEP / SET / CLEAR semantics instead of being overwritten by whatever the
|
|
6513
|
+
* addon writes. Markers inside arrays are not added: a row has no id field to
|
|
6514
|
+
* match by unless the schema declares one. Only `owner`'s markers count: a
|
|
6515
|
+
* builtin that keeps another addon's marker (device-manager) never takes it
|
|
6516
|
+
* over.
|
|
6517
|
+
*/
|
|
6518
|
+
function widenTreeWithStoredMarkers(declared, stored, keys, owner) {
|
|
6519
|
+
const added = /* @__PURE__ */ new Map();
|
|
6520
|
+
for (const key of keys) {
|
|
6521
|
+
const at = key.indexOf("@");
|
|
6522
|
+
const base = at > 0 ? key.slice(0, at) : key;
|
|
6523
|
+
if (declared.has(base) || added.has(base)) continue;
|
|
6524
|
+
const node = nodeFromStored(stored[key], owner);
|
|
6525
|
+
if (node !== null) added.set(base, node);
|
|
6526
|
+
}
|
|
6527
|
+
return added.size === 0 ? declared : new Map([...declared, ...added]);
|
|
6528
|
+
}
|
|
6300
6529
|
/** The blob as stored now; a failed read REFUSES the write instead of guessing. */
|
|
6301
6530
|
async function readStoredAddonBlob(raw) {
|
|
6302
6531
|
const threeWay = raw.readAddonStoreResult;
|
|
@@ -6305,7 +6534,41 @@ async function readStoredAddonBlob(raw) {
|
|
|
6305
6534
|
if (result.kind === "failed") throw new Error(`settings write refused: the stored blob could not be read (${result.error})`);
|
|
6306
6535
|
return result.kind === "missing" ? {} : result.value;
|
|
6307
6536
|
}
|
|
6308
|
-
function
|
|
6537
|
+
function touchesTree(tree, patch) {
|
|
6538
|
+
if (tree.size === 0) return false;
|
|
6539
|
+
for (const key of Object.keys(patch)) {
|
|
6540
|
+
const at = key.indexOf("@");
|
|
6541
|
+
if (tree.has(at > 0 ? key.slice(0, at) : key)) return true;
|
|
6542
|
+
}
|
|
6543
|
+
return false;
|
|
6544
|
+
}
|
|
6545
|
+
/**
|
|
6546
|
+
* Which top-level keys of each store held markers when last seen. `undefined`
|
|
6547
|
+
* for a store not seen yet: its first write reads it, to be safe.
|
|
6548
|
+
*/
|
|
6549
|
+
var MarkerKeyIndex = class {
|
|
6550
|
+
owner;
|
|
6551
|
+
byStore = /* @__PURE__ */ new Map();
|
|
6552
|
+
constructor(owner) {
|
|
6553
|
+
this.owner = owner;
|
|
6554
|
+
}
|
|
6555
|
+
seen(store, blob) {
|
|
6556
|
+
this.byStore.set(store, markerKeysOf(blob, this.owner));
|
|
6557
|
+
}
|
|
6558
|
+
wrote(store, patch) {
|
|
6559
|
+
const keys = this.byStore.get(store);
|
|
6560
|
+
if (keys === void 0) return;
|
|
6561
|
+
const now = markerKeysOf(patch, this.owner);
|
|
6562
|
+
for (const key of Object.keys(patch)) if (now.has(key)) keys.add(key);
|
|
6563
|
+
else keys.delete(key);
|
|
6564
|
+
}
|
|
6565
|
+
mayHoldMarkers(store, patch) {
|
|
6566
|
+
const keys = this.byStore.get(store);
|
|
6567
|
+
if (keys === void 0) return true;
|
|
6568
|
+
return Object.keys(patch).some((key) => keys.has(key));
|
|
6569
|
+
}
|
|
6570
|
+
};
|
|
6571
|
+
function createHandle(raw, opts) {
|
|
6309
6572
|
const chains = /* @__PURE__ */ new Map();
|
|
6310
6573
|
const serialize = (key, fn) => {
|
|
6311
6574
|
const next = (chains.get(key) ?? Promise.resolve()).then(fn, fn);
|
|
@@ -6316,46 +6579,130 @@ function createSecretAwareSettings(raw, opts) {
|
|
|
6316
6579
|
});
|
|
6317
6580
|
return next;
|
|
6318
6581
|
};
|
|
6319
|
-
const
|
|
6320
|
-
|
|
6321
|
-
|
|
6582
|
+
const index = new MarkerKeyIndex(opts.secrets.owner);
|
|
6583
|
+
const resolveRead = async (store, blob) => {
|
|
6584
|
+
index.seen(store, blob);
|
|
6585
|
+
const { value, unresolved } = await resolveSecretMarkers(blob, opts.secrets, {
|
|
6586
|
+
unresolved: "keep-marker",
|
|
6587
|
+
ownedBy: opts.secrets.owner
|
|
6588
|
+
});
|
|
6589
|
+
if (unresolved.length > 0) opts.onUnresolved?.(unresolved);
|
|
6590
|
+
return value;
|
|
6591
|
+
};
|
|
6592
|
+
const write = async (store, declared, scope, patch, readStored, rawWrite) => {
|
|
6593
|
+
if (!touchesTree(declared, patch) && !index.mayHoldMarkers(store, patch)) {
|
|
6594
|
+
await rawWrite(patch);
|
|
6595
|
+
index.wrote(store, patch);
|
|
6596
|
+
return { changed: true };
|
|
6597
|
+
}
|
|
6598
|
+
return serialize(store, async () => {
|
|
6322
6599
|
const stored = await readStored();
|
|
6600
|
+
index.seen(store, stored);
|
|
6601
|
+
const operatorWrite = opts.isOperatorWrite?.() === true;
|
|
6602
|
+
const restored = await restoreUnchangedSecrets({
|
|
6603
|
+
patch,
|
|
6604
|
+
stored,
|
|
6605
|
+
secrets: opts.secrets,
|
|
6606
|
+
operatorWrite
|
|
6607
|
+
});
|
|
6323
6608
|
const result = await transformSecretWrite({
|
|
6324
|
-
tree,
|
|
6609
|
+
tree: widenTreeWithStoredMarkers(declared, stored, Object.keys(restored.patch), opts.secrets.owner),
|
|
6325
6610
|
secrets: opts.secrets,
|
|
6326
|
-
patch,
|
|
6611
|
+
patch: restored.patch,
|
|
6327
6612
|
stored,
|
|
6328
6613
|
...scope !== void 0 ? { scope } : {},
|
|
6329
|
-
operatorWrite
|
|
6614
|
+
operatorWrite
|
|
6330
6615
|
});
|
|
6331
|
-
|
|
6616
|
+
const effective = dropUnchangedKeys(result.patch, stored);
|
|
6617
|
+
const wroteBlob = Object.keys(effective).length > 0;
|
|
6618
|
+
if (wroteBlob) {
|
|
6619
|
+
await rawWrite(effective);
|
|
6620
|
+
index.wrote(store, effective);
|
|
6621
|
+
}
|
|
6332
6622
|
const { orphaned } = await result.afterWrite();
|
|
6333
6623
|
if (orphaned.length > 0) opts.onOrphaned(orphaned);
|
|
6624
|
+
return { changed: wroteBlob || restored.changedRefs.length > 0 };
|
|
6334
6625
|
});
|
|
6335
6626
|
};
|
|
6336
|
-
const
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6627
|
+
const writeAddon = (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p));
|
|
6628
|
+
const readAddonStoreResult = raw.readAddonStoreResult;
|
|
6629
|
+
const readAddonStoreKeyResult = raw.readAddonStoreKeyResult;
|
|
6630
|
+
const readDeviceStoreBatch = raw.readDeviceStoreBatch;
|
|
6631
|
+
const overrides = {
|
|
6632
|
+
readAddonStore: async () => resolveRead("addon", await raw.readAddonStore()),
|
|
6633
|
+
...readAddonStoreResult !== void 0 ? { readAddonStoreResult: async () => {
|
|
6634
|
+
const result = await readAddonStoreResult.call(raw);
|
|
6635
|
+
return result.kind === "value" ? {
|
|
6636
|
+
kind: "value",
|
|
6637
|
+
value: await resolveRead("addon", result.value)
|
|
6638
|
+
} : result;
|
|
6639
|
+
} } : {},
|
|
6640
|
+
...readAddonStoreKeyResult !== void 0 ? { readAddonStoreKeyResult: async (key) => {
|
|
6641
|
+
const result = await readAddonStoreKeyResult.call(raw, key);
|
|
6642
|
+
if (result.kind !== "present") return result;
|
|
6643
|
+
const { value, unresolved } = await resolveSecretMarkers({ [key]: result.value }, opts.secrets, {
|
|
6644
|
+
unresolved: "keep-marker",
|
|
6645
|
+
ownedBy: opts.secrets.owner
|
|
6646
|
+
});
|
|
6647
|
+
if (unresolved.length > 0) opts.onUnresolved?.(unresolved);
|
|
6648
|
+
return {
|
|
6649
|
+
kind: "present",
|
|
6650
|
+
value: value[key]
|
|
6651
|
+
};
|
|
6652
|
+
} } : {},
|
|
6653
|
+
readDeviceStore: async (deviceId) => resolveRead(`device:${deviceId}`, await raw.readDeviceStore(deviceId)),
|
|
6654
|
+
...readDeviceStoreBatch !== void 0 ? { readDeviceStoreBatch: async (deviceIds) => {
|
|
6655
|
+
const rows = await readDeviceStoreBatch.call(raw, deviceIds);
|
|
6656
|
+
const out = /* @__PURE__ */ new Map();
|
|
6657
|
+
for (const [deviceId, blob] of rows) out.set(deviceId, await resolveRead(`device:${deviceId}`, blob));
|
|
6658
|
+
return out;
|
|
6659
|
+
} } : {},
|
|
6660
|
+
writeAddonStore: async (patch) => {
|
|
6661
|
+
await writeAddon(patch);
|
|
6662
|
+
},
|
|
6663
|
+
writeDeviceStore: async (deviceId, patch) => {
|
|
6664
|
+
await write(`device:${deviceId}`, opts.deviceTree(), {
|
|
6665
|
+
kind: "device",
|
|
6666
|
+
deviceId
|
|
6667
|
+
}, patch, () => raw.readDeviceStore(deviceId), (p) => raw.writeDeviceStore(deviceId, p));
|
|
6668
|
+
}
|
|
6669
|
+
};
|
|
6670
|
+
return {
|
|
6671
|
+
settings: new Proxy(raw, { get(target, prop, receiver) {
|
|
6672
|
+
if (typeof prop === "string" && Object.prototype.hasOwnProperty.call(overrides, prop)) return Reflect.get(overrides, prop);
|
|
6673
|
+
const value = Reflect.get(target, prop, receiver);
|
|
6674
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
6675
|
+
} }),
|
|
6676
|
+
raw: {
|
|
6677
|
+
readAddonStore: async () => {
|
|
6678
|
+
const blob = await raw.readAddonStore();
|
|
6679
|
+
index.seen("addon", blob);
|
|
6680
|
+
return blob;
|
|
6681
|
+
},
|
|
6682
|
+
readDeviceStore: async (deviceId) => {
|
|
6683
|
+
const blob = await raw.readDeviceStore(deviceId);
|
|
6684
|
+
index.seen(`device:${deviceId}`, blob);
|
|
6685
|
+
return blob;
|
|
6686
|
+
}
|
|
6687
|
+
},
|
|
6688
|
+
writeAddonStore: writeAddon
|
|
6342
6689
|
};
|
|
6343
|
-
return new Proxy(raw, { get(target, prop, receiver) {
|
|
6344
|
-
if (prop === "writeAddonStore") return wrapped.writeAddonStore;
|
|
6345
|
-
if (prop === "writeDeviceStore") return wrapped.writeDeviceStore;
|
|
6346
|
-
const value = Reflect.get(target, prop, receiver);
|
|
6347
|
-
return typeof value === "function" ? value.bind(target) : value;
|
|
6348
|
-
} });
|
|
6349
6690
|
}
|
|
6350
|
-
/** The context the addon sees
|
|
6351
|
-
function
|
|
6691
|
+
/** The context the addon sees, plus the private raw view and write outcome. */
|
|
6692
|
+
function createSecretAwareContext(context, opts) {
|
|
6352
6693
|
const raw = context.settings;
|
|
6353
|
-
if (raw === void 0) return
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6694
|
+
if (raw === void 0) return {
|
|
6695
|
+
context,
|
|
6696
|
+
handle: null
|
|
6697
|
+
};
|
|
6698
|
+
const handle = createHandle(raw, opts);
|
|
6699
|
+
return {
|
|
6700
|
+
context: new Proxy(context, { get(target, prop, receiver) {
|
|
6701
|
+
if (prop === "settings") return handle.settings;
|
|
6702
|
+
return Reflect.get(target, prop, receiver);
|
|
6703
|
+
} }),
|
|
6704
|
+
handle
|
|
6705
|
+
};
|
|
6359
6706
|
}
|
|
6360
6707
|
var LEAF = { kind: "leaf" };
|
|
6361
6708
|
var DEFAULT_ITEM_ID_KEY = "id";
|
|
@@ -6530,6 +6877,14 @@ var BaseAddon = class {
|
|
|
6530
6877
|
_secretChangeUnsub = null;
|
|
6531
6878
|
/** >0 while an OPERATOR's settings write is being applied. */
|
|
6532
6879
|
_operatorWriteDepth = 0;
|
|
6880
|
+
/**
|
|
6881
|
+
* The keychain-aware settings handle (D798). Its `raw` view is the ONLY way
|
|
6882
|
+
* to the marker-bearing blobs and stays private to this class: the form
|
|
6883
|
+
* hydrate and config resolution need markers, addon code never does.
|
|
6884
|
+
*/
|
|
6885
|
+
_secretSettings = null;
|
|
6886
|
+
/** Refs an addon-facing read could not resolve — each is logged once per process. */
|
|
6887
|
+
_loggedUnresolvedReads = /* @__PURE__ */ new Set();
|
|
6533
6888
|
constructor(defaults) {
|
|
6534
6889
|
this.defaults = defaults;
|
|
6535
6890
|
this._config = { ...defaults };
|
|
@@ -6566,13 +6921,21 @@ var BaseAddon = class {
|
|
|
6566
6921
|
}
|
|
6567
6922
|
async initialize(context) {
|
|
6568
6923
|
const secrets = context.secrets;
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6924
|
+
if (secrets !== void 0) {
|
|
6925
|
+
const { context: wrapped, handle } = createSecretAwareContext(context, {
|
|
6926
|
+
secrets,
|
|
6927
|
+
addonTree: () => this.addonSecretTree(),
|
|
6928
|
+
deviceTree: () => this.deviceSecretTree(),
|
|
6929
|
+
onOrphaned: (refs) => context.logger.warn("keychain refs dropped by a settings write could not be deleted", { meta: { refs: [...refs] } }),
|
|
6930
|
+
isOperatorWrite: () => this._operatorWriteDepth > 0,
|
|
6931
|
+
onUnresolved: (unresolved) => this.logUnresolvedRead(unresolved)
|
|
6932
|
+
});
|
|
6933
|
+
this._ctx = wrapped;
|
|
6934
|
+
this._secretSettings = handle;
|
|
6935
|
+
} else {
|
|
6936
|
+
this._ctx = context;
|
|
6937
|
+
this._secretSettings = null;
|
|
6938
|
+
}
|
|
6576
6939
|
await this.resolveConfig();
|
|
6577
6940
|
if (secrets !== void 0) this._secretChangeUnsub = secrets.onChange((ref) => {
|
|
6578
6941
|
if (this._configSecretRefs.has(ref)) this.scheduleSecretReresolve(SECRET_CHANGE_DEBOUNCE_MS);
|
|
@@ -6689,11 +7052,8 @@ var BaseAddon = class {
|
|
|
6689
7052
|
async getGlobalSettings(overlay, cap, nodeId) {
|
|
6690
7053
|
const schema = this.globalSettingsSchema(cap);
|
|
6691
7054
|
if (!schema) return { sections: [] };
|
|
6692
|
-
const projected = await this.
|
|
6693
|
-
return hydrateSchema(schema, overlay ? {
|
|
6694
|
-
...projected,
|
|
6695
|
-
...overlay
|
|
6696
|
-
} : projected, { inlineSecretsAsViews: true });
|
|
7055
|
+
const projected = await this.readRawProjectedStore(nodeId, cap);
|
|
7056
|
+
return hydrateSchema(schema, overlay ? await this.overlayKeepingMarkers(projected, overlay) : projected, { inlineSecretsAsViews: true });
|
|
6697
7057
|
}
|
|
6698
7058
|
/**
|
|
6699
7059
|
* The integration-level view of this addon's settings: exactly the sections
|
|
@@ -6738,7 +7098,7 @@ var BaseAddon = class {
|
|
|
6738
7098
|
});
|
|
6739
7099
|
}
|
|
6740
7100
|
if (sections.length === 0) return null;
|
|
6741
|
-
const projected = await this.
|
|
7101
|
+
const projected = await this.readRawProjectedStore(nodeId);
|
|
6742
7102
|
return hydrateSchema({
|
|
6743
7103
|
...schema,
|
|
6744
7104
|
sections
|
|
@@ -6755,12 +7115,50 @@ var BaseAddon = class {
|
|
|
6755
7115
|
* the store for custom option logic (option narrowing, value snapping) to
|
|
6756
7116
|
* read it per-node — never `ctx.settings.readAddonStore()` directly.
|
|
6757
7117
|
* `nodeId` omitted ⇒ the local node (node-blind injection from ctx).
|
|
7118
|
+
*
|
|
7119
|
+
* Keychain values come back RESOLVED (D798): a secret reads as its value,
|
|
7120
|
+
* never as a `{ $secret }` marker. One the keychain cannot serve right now
|
|
7121
|
+
* stays a marker — "stored, unavailable" (`isSecretMarker()` is true, and it
|
|
7122
|
+
* is listed in {@link unresolvedSecrets}) — never `''` and never absent, so
|
|
7123
|
+
* it cannot be mistaken for "nothing stored, mint a new one". Writing the
|
|
7124
|
+
* resolved blob back is a no-op for every unchanged secret.
|
|
6758
7125
|
*/
|
|
6759
7126
|
async resolveGlobalStore(nodeId, cap) {
|
|
6760
7127
|
const raw = await this._ctx?.settings?.readAddonStore() ?? {};
|
|
7128
|
+
return this.projectForNode(raw, nodeId, cap);
|
|
7129
|
+
}
|
|
7130
|
+
projectForNode(store, nodeId, cap) {
|
|
6761
7131
|
const keys = this.perNodeKeys(cap);
|
|
6762
7132
|
const node = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6763
|
-
return keys.size > 0 ? projectStore(
|
|
7133
|
+
return keys.size > 0 ? projectStore(store, keys, node) : store;
|
|
7134
|
+
}
|
|
7135
|
+
/** The PROJECTED store with its markers — the form hydrate only (D798). */
|
|
7136
|
+
async readRawProjectedStore(nodeId, cap) {
|
|
7137
|
+
const raw = await this.rawSettings()?.readAddonStore() ?? {};
|
|
7138
|
+
return this.projectForNode(raw, nodeId, cap);
|
|
7139
|
+
}
|
|
7140
|
+
/**
|
|
7141
|
+
* `{ ...stored, ...overlay }`, except that an overlay member equal to the
|
|
7142
|
+
* RESOLVED stored one keeps the stored (marker-bearing) member — so a form
|
|
7143
|
+
* hydrated from a resolved overlay still shows a secret as "set", never as
|
|
7144
|
+
* its value.
|
|
7145
|
+
*/
|
|
7146
|
+
async overlayKeepingMarkers(stored, overlay) {
|
|
7147
|
+
const secrets = this._ctx?.secrets;
|
|
7148
|
+
const merged = {
|
|
7149
|
+
...stored,
|
|
7150
|
+
...overlay
|
|
7151
|
+
};
|
|
7152
|
+
if (secrets === void 0 || collectSecretMarkerRefs(stored).length === 0) return merged;
|
|
7153
|
+
const { value: resolved } = await resolveSecretMarkers(stored, secrets, {
|
|
7154
|
+
unresolved: "keep-marker",
|
|
7155
|
+
ownedBy: secrets.owner
|
|
7156
|
+
});
|
|
7157
|
+
for (const key of Object.keys(overlay)) {
|
|
7158
|
+
if (collectSecretMarkerRefs(stored[key]).length === 0) continue;
|
|
7159
|
+
if (isJsonEqual(overlay[key], resolved[key])) merged[key] = stored[key];
|
|
7160
|
+
}
|
|
7161
|
+
return merged;
|
|
6764
7162
|
}
|
|
6765
7163
|
/**
|
|
6766
7164
|
* Whether ONE global key of this addon's store was written, read three-way
|
|
@@ -6825,8 +7223,12 @@ var BaseAddon = class {
|
|
|
6825
7223
|
async clearSecrets(keys, nodeId) {
|
|
6826
7224
|
const tree = this.addonSecretTree();
|
|
6827
7225
|
const keychain = this._ctx?.secrets !== void 0;
|
|
7226
|
+
const stored = keychain ? await this.readAddonStoreWithRetry() : {};
|
|
6828
7227
|
const patch = {};
|
|
6829
|
-
for (const key of keys)
|
|
7228
|
+
for (const key of keys) {
|
|
7229
|
+
const keychainStored = tree.has(key) || collectSecretMarkerRefs(stored[key]).length > 0;
|
|
7230
|
+
patch[key] = keychain && keychainStored ? SECRET_CLEAR : "";
|
|
7231
|
+
}
|
|
6830
7232
|
await this.applyGlobalPatch(patch, nodeId);
|
|
6831
7233
|
}
|
|
6832
7234
|
async applyGlobalPatch(barePatch, nodeId) {
|
|
@@ -6834,7 +7236,11 @@ var BaseAddon = class {
|
|
|
6834
7236
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6835
7237
|
const target = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6836
7238
|
const scoped = keys.size > 0 ? scopePatch(barePatch, keys, target) : barePatch;
|
|
6837
|
-
|
|
7239
|
+
const handle = this._secretSettings;
|
|
7240
|
+
if (handle !== null) {
|
|
7241
|
+
const { changed } = await handle.writeAddonStore(scoped);
|
|
7242
|
+
if (!changed) return;
|
|
7243
|
+
} else await this._ctx?.settings?.writeAddonStore(scoped);
|
|
6838
7244
|
if (target !== localNode) return;
|
|
6839
7245
|
await this.resolveConfig();
|
|
6840
7246
|
await this.onConfigChanged();
|
|
@@ -6887,7 +7293,7 @@ var BaseAddon = class {
|
|
|
6887
7293
|
async getDeviceSettings(deviceId) {
|
|
6888
7294
|
const schema = this.deviceSettingsSchema();
|
|
6889
7295
|
if (!schema) return { sections: [] };
|
|
6890
|
-
return hydrateSchema(schema, await this.
|
|
7296
|
+
return hydrateSchema(schema, await this.rawSettings()?.readDeviceStore(deviceId) ?? {}, { inlineSecretsAsViews: true });
|
|
6891
7297
|
}
|
|
6892
7298
|
async updateDeviceSettings(deviceId, patch) {
|
|
6893
7299
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
@@ -7059,7 +7465,7 @@ var BaseAddon = class {
|
|
|
7059
7465
|
key,
|
|
7060
7466
|
schema,
|
|
7061
7467
|
fallback,
|
|
7062
|
-
read: async () => this.resolveStoredSecrets(await this.
|
|
7468
|
+
read: async () => this.resolveStoredSecrets(await this.rawSettings()?.readDeviceStore(deviceId) ?? {}, false),
|
|
7063
7469
|
write: async (patch) => {
|
|
7064
7470
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
7065
7471
|
},
|
|
@@ -7121,6 +7527,23 @@ var BaseAddon = class {
|
|
|
7121
7527
|
}
|
|
7122
7528
|
return value;
|
|
7123
7529
|
}
|
|
7530
|
+
/**
|
|
7531
|
+
* The marker-bearing settings reads (D798) — private on purpose. Without a
|
|
7532
|
+
* keychain the context's own view is already raw.
|
|
7533
|
+
*/
|
|
7534
|
+
rawSettings() {
|
|
7535
|
+
return this._secretSettings?.raw ?? this._ctx?.settings;
|
|
7536
|
+
}
|
|
7537
|
+
/** An addon-facing read met markers it could not resolve: say so once per ref. */
|
|
7538
|
+
logUnresolvedRead(unresolved) {
|
|
7539
|
+
const fresh = unresolved.filter((u) => !this._loggedUnresolvedReads.has(u.ref));
|
|
7540
|
+
if (fresh.length === 0) return;
|
|
7541
|
+
for (const u of fresh) this._loggedUnresolvedReads.add(u.ref);
|
|
7542
|
+
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) => ({
|
|
7543
|
+
ref: u.ref,
|
|
7544
|
+
reason: u.reason
|
|
7545
|
+
})) } });
|
|
7546
|
+
}
|
|
7124
7547
|
/** Re-resolve the config (a keychain-only change, or a retry) and apply it. */
|
|
7125
7548
|
scheduleSecretReresolve(delayMs) {
|
|
7126
7549
|
const timerOf = delayMs === SECRET_CHANGE_DEBOUNCE_MS ? "_secretChangeTimer" : "_secretRetryTimer";
|
|
@@ -7147,7 +7570,7 @@ var BaseAddon = class {
|
|
|
7147
7570
|
* `{}` (defaults) — the addon's first successful patch will rehydrate.
|
|
7148
7571
|
*/
|
|
7149
7572
|
async readAddonStoreWithRetry() {
|
|
7150
|
-
const settings = this.
|
|
7573
|
+
const settings = this.rawSettings();
|
|
7151
7574
|
if (!settings) return {};
|
|
7152
7575
|
const delaysMs = [
|
|
7153
7576
|
150,
|
|
@@ -8959,6 +9382,16 @@ var CompositionSchema = object({
|
|
|
8959
9382
|
seen.add(feature.cap);
|
|
8960
9383
|
});
|
|
8961
9384
|
});
|
|
9385
|
+
var NodeColorIdSchema = _enum([
|
|
9386
|
+
"node-a",
|
|
9387
|
+
"node-b",
|
|
9388
|
+
"node-c",
|
|
9389
|
+
"node-d",
|
|
9390
|
+
"node-e",
|
|
9391
|
+
"node-f",
|
|
9392
|
+
"node-g",
|
|
9393
|
+
"node-h"
|
|
9394
|
+
]);
|
|
8962
9395
|
new Set([
|
|
8963
9396
|
"track",
|
|
8964
9397
|
"face",
|
|
@@ -9450,6 +9883,278 @@ var CameraSwitchGroupSchema = object({
|
|
|
9450
9883
|
fetchedAt: number()
|
|
9451
9884
|
});
|
|
9452
9885
|
/**
|
|
9886
|
+
* The trainer contract — what the hub hands the cloud trainer and what it
|
|
9887
|
+
* gets back (cloud training, D805+).
|
|
9888
|
+
*
|
|
9889
|
+
* The trainer (`hf/camstack-trainer`, published as the Hugging Face repo
|
|
9890
|
+
* `camstack/camstack-trainer`) is a separate AGPL program the hub never
|
|
9891
|
+
* imports: `job.json` goes in, files come out, and progress is `CAMSTACK_EVENT`
|
|
9892
|
+
* lines on stdout. These schemas are the hub's half of that boundary; the
|
|
9893
|
+
* trainer's pydantic models (and the JSON Schemas generated from them under
|
|
9894
|
+
* `hf/camstack-trainer/schemas/`) are the other half. A change here is a
|
|
9895
|
+
* change there, in the same piece of work.
|
|
9896
|
+
*
|
|
9897
|
+
* No `.default()` anywhere: defaults do not run on the addon cap path, so the
|
|
9898
|
+
* orchestrator fills every field of a job spec explicitly.
|
|
9899
|
+
*/
|
|
9900
|
+
var TRAINING_JOB_SCHEMA = "camstack.training/v1";
|
|
9901
|
+
var TRAINING_RESULT_SCHEMA = "camstack.training-result/v1";
|
|
9902
|
+
/** What the trainer can export. Edge TPU is a later, separate image. */
|
|
9903
|
+
var TrainingExportSchema = _enum([
|
|
9904
|
+
"onnx",
|
|
9905
|
+
"openvino-fp16",
|
|
9906
|
+
"openvino-int8",
|
|
9907
|
+
"coreml-fp16"
|
|
9908
|
+
]);
|
|
9909
|
+
var FloorsSchema = record(string(), number().min(0).max(1));
|
|
9910
|
+
object({
|
|
9911
|
+
schema: literal(TRAINING_JOB_SCHEMA),
|
|
9912
|
+
jobKey: string().uuid(),
|
|
9913
|
+
target: object({
|
|
9914
|
+
kind: literal("detector"),
|
|
9915
|
+
step: literal("object-detection")
|
|
9916
|
+
}),
|
|
9917
|
+
base: object({
|
|
9918
|
+
modelId: string().min(1),
|
|
9919
|
+
/** Ultralytics weights id, e.g. `yolov9m.pt`. */
|
|
9920
|
+
weights: string().min(1),
|
|
9921
|
+
imgsz: number().int().positive()
|
|
9922
|
+
}),
|
|
9923
|
+
baseline: object({
|
|
9924
|
+
modelId: string().min(1),
|
|
9925
|
+
/** The baseline ONNX the holdout comparison runs; public mirror URL. */
|
|
9926
|
+
onnxUrl: string().url(),
|
|
9927
|
+
imgsz: number().int().positive(),
|
|
9928
|
+
floors: FloorsSchema
|
|
9929
|
+
}),
|
|
9930
|
+
dataset: object({
|
|
9931
|
+
versionId: string().min(1),
|
|
9932
|
+
annotationHash: string(),
|
|
9933
|
+
/** sha256 of the uploaded archive; the trainer refuses a mismatch (exit 65). */
|
|
9934
|
+
sha256: string().regex(/^[0-9a-f]{64}$/)
|
|
9935
|
+
}),
|
|
9936
|
+
split: object({
|
|
9937
|
+
holdoutCameras: array(number().int()),
|
|
9938
|
+
/** When no camera is held out: the last N days of every camera. */
|
|
9939
|
+
holdoutLastDays: number().int().nonnegative(),
|
|
9940
|
+
valFraction: number().min(0).max(.5),
|
|
9941
|
+
seed: number().int()
|
|
9942
|
+
}),
|
|
9943
|
+
hyper: object({
|
|
9944
|
+
epochs: number().int().positive(),
|
|
9945
|
+
batch: number().int().positive(),
|
|
9946
|
+
lr0: number().positive(),
|
|
9947
|
+
/** Layers frozen from the start of the backbone; 0 = none. */
|
|
9948
|
+
freeze: number().int().nonnegative(),
|
|
9949
|
+
patience: number().int().nonnegative(),
|
|
9950
|
+
seed: number().int()
|
|
9951
|
+
}),
|
|
9952
|
+
replay: object({
|
|
9953
|
+
source: literal("coco2017"),
|
|
9954
|
+
count: number().int().nonnegative()
|
|
9955
|
+
}),
|
|
9956
|
+
exports: array(TrainingExportSchema).min(1),
|
|
9957
|
+
calibration: object({ maxFrames: number().int().positive() }),
|
|
9958
|
+
floors: object({
|
|
9959
|
+
minSupport: number().int().positive(),
|
|
9960
|
+
clamp: number().min(0).max(1)
|
|
9961
|
+
}),
|
|
9962
|
+
int8Gate: object({ maxMap50Drop: number().min(0).max(1) }),
|
|
9963
|
+
catalog: object({
|
|
9964
|
+
id: string().regex(/^[a-z0-9][a-z0-9-]{2,80}$/),
|
|
9965
|
+
name: string().min(1).max(160)
|
|
9966
|
+
})
|
|
9967
|
+
});
|
|
9968
|
+
/** One regular file of the bundle. An mlpackage contributes one row per member. */
|
|
9969
|
+
var TrainingResultFileSchema = object({
|
|
9970
|
+
path: string().min(1),
|
|
9971
|
+
bytes: number().int().nonnegative(),
|
|
9972
|
+
sha256: string().regex(/^[0-9a-f]{64}$/),
|
|
9973
|
+
format: _enum([
|
|
9974
|
+
"onnx",
|
|
9975
|
+
"openvino",
|
|
9976
|
+
"coreml",
|
|
9977
|
+
"pt"
|
|
9978
|
+
]),
|
|
9979
|
+
variant: _enum(["base", "int8"])
|
|
9980
|
+
});
|
|
9981
|
+
var DraftFormatSchema = object({
|
|
9982
|
+
/** RELATIVE path inside the bundle; the hub rewrites it to `camstack-local://`. */
|
|
9983
|
+
url: string().min(1),
|
|
9984
|
+
sizeMB: number().nonnegative(),
|
|
9985
|
+
isDirectory: boolean().optional(),
|
|
9986
|
+
files: array(string()).optional(),
|
|
9987
|
+
runtimes: array(literal("python")).optional(),
|
|
9988
|
+
revision: string().min(1)
|
|
9989
|
+
});
|
|
9990
|
+
/** The trainer's half of a catalog entry; the hub completes it (labels, licence, group). */
|
|
9991
|
+
var TrainingCatalogDraftSchema = object({
|
|
9992
|
+
id: string().min(1),
|
|
9993
|
+
name: string().min(1),
|
|
9994
|
+
description: string(),
|
|
9995
|
+
labels: array(unknown()),
|
|
9996
|
+
inputSize: object({
|
|
9997
|
+
width: number().int().positive(),
|
|
9998
|
+
height: number().int().positive()
|
|
9999
|
+
}),
|
|
10000
|
+
preprocessMode: literal("letterbox"),
|
|
10001
|
+
defaultClassFloors: FloorsSchema,
|
|
10002
|
+
formats: object({
|
|
10003
|
+
onnx: DraftFormatSchema.optional(),
|
|
10004
|
+
openvino: DraftFormatSchema.optional(),
|
|
10005
|
+
coreml: DraftFormatSchema.optional()
|
|
10006
|
+
})
|
|
10007
|
+
});
|
|
10008
|
+
/** One class of one model's holdout report (the eval harness's summary). */
|
|
10009
|
+
var TrainingEvalClassSchema = object({
|
|
10010
|
+
positives: number().int(),
|
|
10011
|
+
floor: number().nullable(),
|
|
10012
|
+
tp: number().int(),
|
|
10013
|
+
fp: number().int(),
|
|
10014
|
+
fn: number().int(),
|
|
10015
|
+
precision: number().nullable(),
|
|
10016
|
+
recall: number().nullable(),
|
|
10017
|
+
ap50: number().nullable(),
|
|
10018
|
+
recallByCamera: record(string(), number().nullable()).optional(),
|
|
10019
|
+
recallByLight: record(string(), number().nullable()).optional(),
|
|
10020
|
+
fpByCamera: record(string(), number()).optional(),
|
|
10021
|
+
smallFound: number().int().optional(),
|
|
10022
|
+
smallTotal: number().int().optional()
|
|
10023
|
+
}).passthrough();
|
|
10024
|
+
var TrainingEvalReportSchema = object({
|
|
10025
|
+
frames: number().int(),
|
|
10026
|
+
classes: record(string(), TrainingEvalClassSchema)
|
|
10027
|
+
}).passthrough();
|
|
10028
|
+
/**
|
|
10029
|
+
* A succeeded result carries every block; a failed one carries the error and
|
|
10030
|
+
* whatever was known by then — the other blocks are ABSENT, not null. The
|
|
10031
|
+
* orchestrator checks the blocks it needs before it trusts a success.
|
|
10032
|
+
*/
|
|
10033
|
+
var TrainingResultSchema = object({
|
|
10034
|
+
schema: literal(TRAINING_RESULT_SCHEMA),
|
|
10035
|
+
jobKey: string(),
|
|
10036
|
+
status: _enum(["succeeded", "failed"]),
|
|
10037
|
+
error: object({
|
|
10038
|
+
stage: string(),
|
|
10039
|
+
code: string(),
|
|
10040
|
+
message: string()
|
|
10041
|
+
}).nullable(),
|
|
10042
|
+
trainer: object({
|
|
10043
|
+
version: string(),
|
|
10044
|
+
revision: string()
|
|
10045
|
+
}),
|
|
10046
|
+
toolchain: record(string(), string().nullable()),
|
|
10047
|
+
dataset: object({
|
|
10048
|
+
versionId: string(),
|
|
10049
|
+
annotationHash: string(),
|
|
10050
|
+
sha256: string(),
|
|
10051
|
+
frames: object({
|
|
10052
|
+
train: number().int(),
|
|
10053
|
+
val: number().int(),
|
|
10054
|
+
holdout: number().int()
|
|
10055
|
+
}),
|
|
10056
|
+
holdoutCameras: array(number().int()),
|
|
10057
|
+
replayImages: number().int()
|
|
10058
|
+
}).optional(),
|
|
10059
|
+
training: object({
|
|
10060
|
+
epochsRun: number().int(),
|
|
10061
|
+
bestEpoch: number().int(),
|
|
10062
|
+
bestMap50: number(),
|
|
10063
|
+
bestMap50_95: number(),
|
|
10064
|
+
seconds: number()
|
|
10065
|
+
}).optional(),
|
|
10066
|
+
evaluation: object({
|
|
10067
|
+
holdoutFrames: number().int(),
|
|
10068
|
+
baseline: TrainingEvalReportSchema.nullable(),
|
|
10069
|
+
candidate: TrainingEvalReportSchema.nullable(),
|
|
10070
|
+
candidateInt8: TrainingEvalReportSchema.nullable(),
|
|
10071
|
+
recallDeltaByCamera: record(string(), record(string(), number())).nullable(),
|
|
10072
|
+
map50: record(string(), number().nullable())
|
|
10073
|
+
}).optional(),
|
|
10074
|
+
floors: object({
|
|
10075
|
+
baseline: FloorsSchema,
|
|
10076
|
+
candidate: FloorsSchema,
|
|
10077
|
+
candidateInt8: FloorsSchema.nullable(),
|
|
10078
|
+
notes: array(string())
|
|
10079
|
+
}).optional(),
|
|
10080
|
+
int8: object({
|
|
10081
|
+
kept: boolean(),
|
|
10082
|
+
map50Fp16: number().nullable(),
|
|
10083
|
+
map50Int8: number().nullable(),
|
|
10084
|
+
reason: string().nullable()
|
|
10085
|
+
}).optional(),
|
|
10086
|
+
exportsDropped: array(object({
|
|
10087
|
+
export: string(),
|
|
10088
|
+
reason: string()
|
|
10089
|
+
})).optional(),
|
|
10090
|
+
files: array(TrainingResultFileSchema).optional(),
|
|
10091
|
+
bundle: object({
|
|
10092
|
+
path: literal("bundle.tar"),
|
|
10093
|
+
bytes: number().int().nonnegative(),
|
|
10094
|
+
sha256: string().regex(/^[0-9a-f]{64}$/)
|
|
10095
|
+
}).nullable().optional(),
|
|
10096
|
+
catalogDraft: object({
|
|
10097
|
+
base: TrainingCatalogDraftSchema,
|
|
10098
|
+
int8: TrainingCatalogDraftSchema.nullable()
|
|
10099
|
+
}).nullable().optional(),
|
|
10100
|
+
licence: string()
|
|
10101
|
+
});
|
|
10102
|
+
var TrainingStageSchema = _enum([
|
|
10103
|
+
"prepare",
|
|
10104
|
+
"replay",
|
|
10105
|
+
"train",
|
|
10106
|
+
"eval",
|
|
10107
|
+
"export",
|
|
10108
|
+
"package"
|
|
10109
|
+
]);
|
|
10110
|
+
var EventBase = {
|
|
10111
|
+
v: literal(1),
|
|
10112
|
+
ts: number()
|
|
10113
|
+
};
|
|
10114
|
+
discriminatedUnion("type", [
|
|
10115
|
+
object({
|
|
10116
|
+
...EventBase,
|
|
10117
|
+
type: literal("stage"),
|
|
10118
|
+
stage: TrainingStageSchema
|
|
10119
|
+
}),
|
|
10120
|
+
object({
|
|
10121
|
+
...EventBase,
|
|
10122
|
+
type: literal("epoch"),
|
|
10123
|
+
epoch: number().int(),
|
|
10124
|
+
epochs: number().int(),
|
|
10125
|
+
boxLoss: number().nullable().optional(),
|
|
10126
|
+
map50: number().nullable().optional(),
|
|
10127
|
+
map50_95: number().nullable().optional(),
|
|
10128
|
+
etaSec: number().nullable().optional()
|
|
10129
|
+
}),
|
|
10130
|
+
object({
|
|
10131
|
+
...EventBase,
|
|
10132
|
+
type: literal("metric"),
|
|
10133
|
+
name: string(),
|
|
10134
|
+
value: number()
|
|
10135
|
+
}),
|
|
10136
|
+
object({
|
|
10137
|
+
...EventBase,
|
|
10138
|
+
type: literal("artifact"),
|
|
10139
|
+
path: string(),
|
|
10140
|
+
bytes: number(),
|
|
10141
|
+
sha256: string()
|
|
10142
|
+
}),
|
|
10143
|
+
object({
|
|
10144
|
+
...EventBase,
|
|
10145
|
+
type: literal("done"),
|
|
10146
|
+
status: _enum(["succeeded", "failed"]),
|
|
10147
|
+
resultSha256: string().nullable().optional()
|
|
10148
|
+
}),
|
|
10149
|
+
object({
|
|
10150
|
+
...EventBase,
|
|
10151
|
+
type: literal("error"),
|
|
10152
|
+
stage: string(),
|
|
10153
|
+
code: string(),
|
|
10154
|
+
message: string()
|
|
10155
|
+
})
|
|
10156
|
+
]);
|
|
10157
|
+
/**
|
|
9453
10158
|
* What the gate decided about a birth, from the CALLER's point of view.
|
|
9454
10159
|
*
|
|
9455
10160
|
* Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
|
|
@@ -11777,7 +12482,9 @@ var AddonHttpRouteSchema = object({
|
|
|
11777
12482
|
"authenticated",
|
|
11778
12483
|
"admin"
|
|
11779
12484
|
]).optional(),
|
|
11780
|
-
description: string().optional()
|
|
12485
|
+
description: string().optional(),
|
|
12486
|
+
/** The hub limits this route per client address before the handler runs. */
|
|
12487
|
+
rateLimit: _enum(["auth"]).optional()
|
|
11781
12488
|
});
|
|
11782
12489
|
/**
|
|
11783
12490
|
* Cross-process route invocation envelope. The hub captures the
|
|
@@ -12482,6 +13189,37 @@ var BackupDestinationInfoSchema = object({
|
|
|
12482
13189
|
lastError: string().optional()
|
|
12483
13190
|
});
|
|
12484
13191
|
/**
|
|
13192
|
+
* How an archive is encrypted (operator decision 2026-10-09): to a backup
|
|
13193
|
+
* PUBLIC key the hub holds, so only the operator's secret key opens it.
|
|
13194
|
+
* Absent on a plain `.tar.gz` — every archive made before encryption, or
|
|
13195
|
+
* with it off — which restores without a key.
|
|
13196
|
+
*/
|
|
13197
|
+
var BackupArchiveEncryptionSchema = object({
|
|
13198
|
+
/** `x25519-hkdf-aes256gcm-stream-v1`. */
|
|
13199
|
+
scheme: string(),
|
|
13200
|
+
/** 16 hex — the backup key whose secret restores this archive. */
|
|
13201
|
+
keyId: string()
|
|
13202
|
+
});
|
|
13203
|
+
/**
|
|
13204
|
+
* The backup encryption setting. The hub keeps PUBLIC keys only: the active
|
|
13205
|
+
* one new archives are encrypted to, and the retired ones older archives
|
|
13206
|
+
* still need. The secret key is shown once, at `setupEncryption`.
|
|
13207
|
+
*/
|
|
13208
|
+
var BackupEncryptionStatusSchema = object({
|
|
13209
|
+
enabled: boolean(),
|
|
13210
|
+
active: object({
|
|
13211
|
+
keyId: string(),
|
|
13212
|
+
publicKey: string(),
|
|
13213
|
+
createdAt: number()
|
|
13214
|
+
}).nullable(),
|
|
13215
|
+
/** Every key ever set up, newest first. */
|
|
13216
|
+
keys: array(object({
|
|
13217
|
+
keyId: string(),
|
|
13218
|
+
createdAt: number(),
|
|
13219
|
+
retiredAt: number().nullable()
|
|
13220
|
+
})).readonly()
|
|
13221
|
+
});
|
|
13222
|
+
/**
|
|
12485
13223
|
* Per-archive entry returned by `backup.listArchives({ destinationId })`.
|
|
12486
13224
|
* Same shape the destination drill-in renders. Sourced from the per-
|
|
12487
13225
|
* location `manifests.json` (no per-archive tarball read required).
|
|
@@ -12493,7 +13231,9 @@ var BackupArchiveEntrySchema = object({
|
|
|
12493
13231
|
sizeBytes: number(),
|
|
12494
13232
|
label: string().optional(),
|
|
12495
13233
|
/** Top-level locations included in the archive (db, addons, tls, …). */
|
|
12496
|
-
locations: array(string()).readonly()
|
|
13234
|
+
locations: array(string()).readonly(),
|
|
13235
|
+
/** Present when the archive is encrypted; restore then needs that key. */
|
|
13236
|
+
encryption: BackupArchiveEncryptionSchema.optional()
|
|
12497
13237
|
});
|
|
12498
13238
|
var BackupEntrySchema = object({
|
|
12499
13239
|
id: string(),
|
|
@@ -12502,7 +13242,8 @@ var BackupEntrySchema = object({
|
|
|
12502
13242
|
label: string().optional(),
|
|
12503
13243
|
createdAt: number(),
|
|
12504
13244
|
sizeBytes: number(),
|
|
12505
|
-
locations: array(string()).optional()
|
|
13245
|
+
locations: array(string()).optional(),
|
|
13246
|
+
encryption: BackupArchiveEncryptionSchema.optional()
|
|
12506
13247
|
});
|
|
12507
13248
|
var ArchiveEntrySchema = object({
|
|
12508
13249
|
path: string(),
|
|
@@ -12691,10 +13432,40 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
|
|
|
12691
13432
|
* this list and skips entries whose path doesn't start with
|
|
12692
13433
|
* any of them.
|
|
12693
13434
|
*/
|
|
12694
|
-
locations: array(string()).optional()
|
|
13435
|
+
locations: array(string()).optional(),
|
|
13436
|
+
/**
|
|
13437
|
+
* The backup SECRET key, for an encrypted archive (ignored for a plain
|
|
13438
|
+
* one). The archive is decrypted into the hub's private staging
|
|
13439
|
+
* before the restart; the key is not stored. A wrong or missing key
|
|
13440
|
+
* is refused before the archive is downloaded.
|
|
13441
|
+
*/
|
|
13442
|
+
backupSecretKey: string().optional()
|
|
12695
13443
|
}), _void(), {
|
|
12696
13444
|
kind: "mutation",
|
|
12697
13445
|
auth: "admin"
|
|
13446
|
+
}), method(_void(), BackupEncryptionStatusSchema, { auth: "admin" }), method(object({}), object({
|
|
13447
|
+
keyId: string(),
|
|
13448
|
+
secretKey: string(),
|
|
13449
|
+
publicKey: string(),
|
|
13450
|
+
createdAt: number(),
|
|
13451
|
+
replacedKeyId: string().nullable()
|
|
13452
|
+
}), {
|
|
13453
|
+
kind: "mutation",
|
|
13454
|
+
auth: "admin"
|
|
13455
|
+
}), method(object({}), object({ disabledKeyId: string().nullable() }), {
|
|
13456
|
+
kind: "mutation",
|
|
13457
|
+
auth: "admin"
|
|
13458
|
+
}), method(object({ backupSecretKey: string() }), object({
|
|
13459
|
+
valid: boolean(),
|
|
13460
|
+
keyId: string().nullable(),
|
|
13461
|
+
/** The hub knows this key (active or retired). */
|
|
13462
|
+
known: boolean(),
|
|
13463
|
+
/** It is the key new archives are encrypted to. */
|
|
13464
|
+
active: boolean(),
|
|
13465
|
+
error: string().optional()
|
|
13466
|
+
}), {
|
|
13467
|
+
kind: "mutation",
|
|
13468
|
+
auth: "admin"
|
|
12698
13469
|
}), method(object({
|
|
12699
13470
|
destinationId: string(),
|
|
12700
13471
|
backupId: string()
|
|
@@ -14420,7 +15191,60 @@ var CustomModelDescriptorSchema = object({
|
|
|
14420
15191
|
stepId: string(),
|
|
14421
15192
|
entry: ModelCatalogEntrySchema
|
|
14422
15193
|
});
|
|
14423
|
-
|
|
15194
|
+
/** One regular file of an imported bundle, as the producer measured it. */
|
|
15195
|
+
var ModelBundleFileSchema = object({
|
|
15196
|
+
/** Relative path inside the bundle tar; an mlpackage member is `<x>.mlpackage/<member>`. */
|
|
15197
|
+
path: string().min(1),
|
|
15198
|
+
bytes: number().int().nonnegative(),
|
|
15199
|
+
sha256: string().regex(/^[0-9a-f]{64}$/)
|
|
15200
|
+
});
|
|
15201
|
+
var ImportModelBundleInputSchema = object({
|
|
15202
|
+
/** The registry provider that keeps the model (Model Studio). */
|
|
15203
|
+
addonId: string(),
|
|
15204
|
+
stepId: string().min(1),
|
|
15205
|
+
/**
|
|
15206
|
+
* The catalog rows to register, complete, every format URL already
|
|
15207
|
+
* `camstack-local://<modelId>/<file>` naming a file of the bundle. One
|
|
15208
|
+
* bundle may carry several rows (a base and its INT8 variant).
|
|
15209
|
+
*/
|
|
15210
|
+
entries: array(ModelCatalogEntrySchema).min(1).max(4),
|
|
15211
|
+
/** The bundle tar, offered by the producer over `ctx.peerBytes` (same host). */
|
|
15212
|
+
bundle: object({
|
|
15213
|
+
ticket: PeerBytesTicketSchema,
|
|
15214
|
+
bytes: number().int().positive(),
|
|
15215
|
+
sha256: string().regex(/^[0-9a-f]{64}$/)
|
|
15216
|
+
}),
|
|
15217
|
+
/** Every file the tar must hold; anything missing, extra or different is refused. */
|
|
15218
|
+
files: array(ModelBundleFileSchema).min(1).max(64),
|
|
15219
|
+
/** Convert missing engine formats and push the model to every agent afterwards. */
|
|
15220
|
+
distribute: boolean()
|
|
15221
|
+
});
|
|
15222
|
+
var ImportModelBundleResultSchema = discriminatedUnion("kind", [object({
|
|
15223
|
+
kind: literal("imported"),
|
|
15224
|
+
modelIds: array(string()).readonly(),
|
|
15225
|
+
distributed: array(object({
|
|
15226
|
+
modelId: string(),
|
|
15227
|
+
nodeId: string(),
|
|
15228
|
+
format: _enum(MODEL_FORMATS),
|
|
15229
|
+
ok: boolean(),
|
|
15230
|
+
error: string().optional()
|
|
15231
|
+
})).readonly()
|
|
15232
|
+
}), object({
|
|
15233
|
+
kind: literal("refused"),
|
|
15234
|
+
reason: _enum([
|
|
15235
|
+
"transfer-failed",
|
|
15236
|
+
"checksum-mismatch",
|
|
15237
|
+
"bundle-mismatch",
|
|
15238
|
+
"invalid-entry",
|
|
15239
|
+
"id-taken"
|
|
15240
|
+
]),
|
|
15241
|
+
detail: string()
|
|
15242
|
+
})]);
|
|
15243
|
+
method(_void(), array(CustomModelDescriptorSchema).readonly(), { auth: "admin" }), method(ImportModelBundleInputSchema, ImportModelBundleResultSchema, {
|
|
15244
|
+
kind: "mutation",
|
|
15245
|
+
auth: "admin",
|
|
15246
|
+
timeoutMs: 30 * 6e4
|
|
15247
|
+
});
|
|
14424
15248
|
/**
|
|
14425
15249
|
* Query filter for settings-store collections.
|
|
14426
15250
|
*/
|
|
@@ -14899,6 +15723,35 @@ var KeychainKeySourceSchema = object({
|
|
|
14899
15723
|
*/
|
|
14900
15724
|
sharesBackupWithDatabase: boolean()
|
|
14901
15725
|
});
|
|
15726
|
+
/**
|
|
15727
|
+
* One keychain reset, as the Secrets page reports it until the operator
|
|
15728
|
+
* acknowledges it. Never a value: refs, counts and table names only.
|
|
15729
|
+
*/
|
|
15730
|
+
var KeychainResetRecordSchema = object({
|
|
15731
|
+
id: string(),
|
|
15732
|
+
at: number(),
|
|
15733
|
+
/** `user:<id>` or {@link KEYCHAIN_RESET_TRIGGER_ACTOR}. */
|
|
15734
|
+
actor: string(),
|
|
15735
|
+
/** Why the keychain was locked when it was reset; `null` when it was not locked. */
|
|
15736
|
+
lockedReason: string().nullable(),
|
|
15737
|
+
/** Values moved into the archive table (ciphertext under the lost key). */
|
|
15738
|
+
archived: number().int(),
|
|
15739
|
+
/** `keychain:secrets-orphaned-<ts>`, or `null` when nothing was stored. */
|
|
15740
|
+
archivedCollection: string().nullable(),
|
|
15741
|
+
/**
|
|
15742
|
+
* `keychain:keys-orphaned-<ts>`: the wrapped data keys of the archive, kept
|
|
15743
|
+
* so the archive can still be opened if the lost master key turns up.
|
|
15744
|
+
*/
|
|
15745
|
+
archivedKeysCollection: string().nullable(),
|
|
15746
|
+
/**
|
|
15747
|
+
* `system-settings` keys whose marker the reset cleared — the cluster
|
|
15748
|
+
* secret's: a marker left pointing at an archived value would refuse every
|
|
15749
|
+
* agent forever (D797).
|
|
15750
|
+
*/
|
|
15751
|
+
clearedSettingsKeys: array(string()).readonly(),
|
|
15752
|
+
/** When an operator dismissed the notice on the Secrets page; `null` until then. */
|
|
15753
|
+
acknowledgedAt: number().nullable()
|
|
15754
|
+
});
|
|
14902
15755
|
var KeychainStatusSchema = object({
|
|
14903
15756
|
keychain: KeychainStateSchema,
|
|
14904
15757
|
/** The source of the master key in use; `null` while locked. */
|
|
@@ -14916,7 +15769,9 @@ var KeychainStatusSchema = object({
|
|
|
14916
15769
|
/** Wrapped copies of the data key under a previous master key, kept until purged. */
|
|
14917
15770
|
retiredWraps: number().int(),
|
|
14918
15771
|
recoveryKeyDownloadedAt: number().nullable(),
|
|
14919
|
-
secretCount: number().int()
|
|
15772
|
+
secretCount: number().int(),
|
|
15773
|
+
/** The most recent reset, acknowledged or not; `null` when the keychain was never reset. */
|
|
15774
|
+
lastReset: KeychainResetRecordSchema.nullable()
|
|
14920
15775
|
});
|
|
14921
15776
|
/**
|
|
14922
15777
|
* Whether a stored value is still pointed at by its owner's settings.
|
|
@@ -14938,17 +15793,26 @@ var KeychainAuditActionSchema = _enum([
|
|
|
14938
15793
|
"download-recovery-key",
|
|
14939
15794
|
"delete-orphans",
|
|
14940
15795
|
"reset",
|
|
15796
|
+
"acknowledge-reset",
|
|
14941
15797
|
"initialize"
|
|
14942
15798
|
]);
|
|
14943
15799
|
var KeychainAuditEntrySchema = object({
|
|
14944
15800
|
id: string(),
|
|
14945
15801
|
at: number(),
|
|
14946
15802
|
action: KeychainAuditActionSchema,
|
|
14947
|
-
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
15803
|
+
/** `addon:<id>` | `user:<id>` | `system` | `trigger-file`. */
|
|
14948
15804
|
actor: string(),
|
|
14949
15805
|
ref: string().nullable(),
|
|
14950
15806
|
detail: string().nullable()
|
|
14951
15807
|
});
|
|
15808
|
+
var KEYCHAIN_RESET_CONFIRMATION = "RESET KEYCHAIN";
|
|
15809
|
+
/**
|
|
15810
|
+
* Secrets the HUB itself holds (owner `system`) that no settings form shows:
|
|
15811
|
+
* `jwt-signing-key` — the session signing key (D797). It is always "in use",
|
|
15812
|
+
* never an orphan; it is generated on a fresh hub and replaced only through
|
|
15813
|
+
* {@link keychainAdminCapability.methods.setSystemSecret}.
|
|
15814
|
+
*/
|
|
15815
|
+
var SystemHeldSecretNameSchema = _enum(["jwt-signing-key"]);
|
|
14952
15816
|
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({
|
|
14953
15817
|
value: string(),
|
|
14954
15818
|
version: number().int()
|
|
@@ -14956,6 +15820,16 @@ method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}),
|
|
|
14956
15820
|
kind: "mutation",
|
|
14957
15821
|
auth: "admin",
|
|
14958
15822
|
caller: "required"
|
|
15823
|
+
}), method(object({
|
|
15824
|
+
name: SystemHeldSecretNameSchema,
|
|
15825
|
+
value: string().min(16)
|
|
15826
|
+
}), object({
|
|
15827
|
+
ref: string(),
|
|
15828
|
+
version: number().int()
|
|
15829
|
+
}), {
|
|
15830
|
+
kind: "mutation",
|
|
15831
|
+
auth: "admin",
|
|
15832
|
+
caller: "required"
|
|
14959
15833
|
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
14960
15834
|
deleted: array(string()).readonly(),
|
|
14961
15835
|
kept: array(object({
|
|
@@ -14985,13 +15859,20 @@ method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}),
|
|
|
14985
15859
|
kind: "mutation",
|
|
14986
15860
|
auth: "admin",
|
|
14987
15861
|
caller: "required"
|
|
14988
|
-
}), method(object({ confirm: literal(
|
|
15862
|
+
}), method(object({ confirm: literal(KEYCHAIN_RESET_CONFIRMATION) }), object({
|
|
14989
15863
|
archivedCollection: string().nullable(),
|
|
14990
15864
|
archived: number().int()
|
|
14991
15865
|
}), {
|
|
14992
15866
|
kind: "mutation",
|
|
14993
15867
|
auth: "admin",
|
|
14994
15868
|
caller: "required"
|
|
15869
|
+
}), method(object({}), object({
|
|
15870
|
+
reset: KeychainResetRecordSchema.nullable(),
|
|
15871
|
+
pendingReentry: array(KeychainSecretMetaSchema).readonly()
|
|
15872
|
+
}), { auth: "admin" }), method(object({}), object({ acknowledged: boolean() }), {
|
|
15873
|
+
kind: "mutation",
|
|
15874
|
+
auth: "admin",
|
|
15875
|
+
caller: "required"
|
|
14995
15876
|
});
|
|
14996
15877
|
method(_void(), object({
|
|
14997
15878
|
id: string(),
|
|
@@ -17653,14 +18534,14 @@ var LlmProfileSchema = object({
|
|
|
17653
18534
|
/** ConfigUISchema tree passed through untyped on the wire (the
|
|
17654
18535
|
* notification-output `ConfigSchemaPassthrough` precedent at
|
|
17655
18536
|
* notification-output.cap.ts:151); the exported TS type re-tightens it. */
|
|
17656
|
-
var ConfigSchemaPassthrough$
|
|
18537
|
+
var ConfigSchemaPassthrough$3 = unknown();
|
|
17657
18538
|
var LlmProfileKindDescriptorSchema = object({
|
|
17658
18539
|
kind: LlmProfileKindSchema,
|
|
17659
18540
|
label: string(),
|
|
17660
18541
|
icon: string(),
|
|
17661
18542
|
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
17662
18543
|
addonId: string(),
|
|
17663
|
-
configSchema: ConfigSchemaPassthrough$
|
|
18544
|
+
configSchema: ConfigSchemaPassthrough$3
|
|
17664
18545
|
});
|
|
17665
18546
|
var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
|
|
17666
18547
|
var LlmDefaultSchema = object({
|
|
@@ -17938,7 +18819,7 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
17938
18819
|
* `login-method` — collection cap through which auth addons contribute
|
|
17939
18820
|
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
17940
18821
|
* generic mechanism that supersedes the dead `auth.listProviders` reader:
|
|
17941
|
-
* every auth addon (OIDC,
|
|
18822
|
+
* every auth addon (OIDC, WebAuthn/passkey) registers a
|
|
17942
18823
|
* `login-method` provider and the PUBLIC `auth.listLoginMethods`
|
|
17943
18824
|
* procedure aggregates them for the unauthenticated login page.
|
|
17944
18825
|
*
|
|
@@ -17946,8 +18827,7 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
17946
18827
|
*
|
|
17947
18828
|
* - `redirect` — a declarative button. The login page renders a generic
|
|
17948
18829
|
* button that navigates to `startUrl` (an addon-owned HTTP route).
|
|
17949
|
-
* Covers OIDC (`/addon/auth-oidc/<id>/start`)
|
|
17950
|
-
* ZERO shell-side JS. A future SSO addon plugs in the same way — the
|
|
18830
|
+
* Covers OIDC (`/addon/auth-oidc/<id>/start`) with ZERO shell-side JS. A future SSO addon plugs in the same way — the
|
|
17951
18831
|
* login page needs NO change.
|
|
17952
18832
|
*
|
|
17953
18833
|
* - `widget` — a Module-Federation widget the login page mounts (via
|
|
@@ -17966,8 +18846,8 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
17966
18846
|
* decision.
|
|
17967
18847
|
*
|
|
17968
18848
|
* Every contribution carries a `stage`:
|
|
17969
|
-
* - `primary` — shown on the first credentials screen (OIDC
|
|
17970
|
-
*
|
|
18849
|
+
* - `primary` — shown on the first credentials screen (OIDC
|
|
18850
|
+
* buttons; a usernameless passkey).
|
|
17971
18851
|
* - `second-factor` — shown AFTER the password leg, gated on the
|
|
17972
18852
|
* returned `factors` (passkey-as-2FA today).
|
|
17973
18853
|
*
|
|
@@ -17994,7 +18874,7 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
17994
18874
|
* The provider names an external identity a signed-in user can link to
|
|
17995
18875
|
* their own account (D782): `auth.listLinkableProviders` /
|
|
17996
18876
|
* `beginExternalLink` offer exactly the redirect methods that set this,
|
|
17997
|
-
* whatever their id. Absent / false — a login button only
|
|
18877
|
+
* whatever their id. Absent / false — a login button only.
|
|
17998
18878
|
*/
|
|
17999
18879
|
linkable: boolean().optional()
|
|
18000
18880
|
}),
|
|
@@ -18782,7 +19662,7 @@ var TargetKindCapsSchema = object({
|
|
|
18782
19662
|
* the union is large and not meant for runtime validation here; the exported
|
|
18783
19663
|
* `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
|
|
18784
19664
|
*/
|
|
18785
|
-
var ConfigSchemaPassthrough = unknown();
|
|
19665
|
+
var ConfigSchemaPassthrough$2 = unknown();
|
|
18786
19666
|
var TargetKindSchema = object({
|
|
18787
19667
|
kind: string(),
|
|
18788
19668
|
label: string(),
|
|
@@ -18819,7 +19699,7 @@ var TargetKindSchema = object({
|
|
|
18819
19699
|
* its raster path, which is the safe default for an unknown image.
|
|
18820
19700
|
*/
|
|
18821
19701
|
iconMediaType: string().optional(),
|
|
18822
|
-
configSchema: ConfigSchemaPassthrough,
|
|
19702
|
+
configSchema: ConfigSchemaPassthrough$2,
|
|
18823
19703
|
/**
|
|
18824
19704
|
* The config keys that decide WHERE this kind's secrets are sent (server,
|
|
18825
19705
|
* base URL, instance, chat, recipient). A save that changes any of them
|
|
@@ -21849,8 +22729,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
21849
22729
|
* `super_admin` — collapsed onto the single boolean because every
|
|
21850
22730
|
* non-admin caller is governed by the same scope-check rules; the
|
|
21851
22731
|
* distinction was only ever used to route role-specific procedures
|
|
21852
|
-
* which we no longer have.
|
|
21853
|
-
* `createServiceToken`; CLI / webhook integrations are `cst_*` tokens
|
|
22732
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
21854
22733
|
* with `isAdmin: false` + an explicit scope list.
|
|
21855
22734
|
*/
|
|
21856
22735
|
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
@@ -22157,6 +23036,61 @@ var OauthIntegrationDescriptorSchema = object({
|
|
|
22157
23036
|
});
|
|
22158
23037
|
method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
|
|
22159
23038
|
/**
|
|
23039
|
+
* `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
|
|
23040
|
+
*
|
|
23041
|
+
* One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
|
|
23042
|
+
* ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
|
|
23043
|
+
* Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
|
|
23044
|
+
* immutable after create.
|
|
23045
|
+
*/
|
|
23046
|
+
var ConfigSchemaPassthrough$1 = unknown();
|
|
23047
|
+
var OidcConnectionSchema = object({
|
|
23048
|
+
id: string().min(1),
|
|
23049
|
+
displayName: string(),
|
|
23050
|
+
icon: string(),
|
|
23051
|
+
issuerUrl: string(),
|
|
23052
|
+
clientId: string(),
|
|
23053
|
+
/** Client id + secret present — never the secret value. */
|
|
23054
|
+
configured: boolean(),
|
|
23055
|
+
/**
|
|
23056
|
+
* Values for the connection form schema. `clientSecret` is a keychain
|
|
23057
|
+
* {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
|
|
23058
|
+
*/
|
|
23059
|
+
formValues: record(string(), unknown()).optional()
|
|
23060
|
+
});
|
|
23061
|
+
/**
|
|
23062
|
+
* Patch one connection. Omitted or empty `clientSecret` keeps the stored
|
|
23063
|
+
* secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
|
|
23064
|
+
*/
|
|
23065
|
+
var OidcConnectionUpdateInputSchema = object({
|
|
23066
|
+
id: string().min(1),
|
|
23067
|
+
displayName: string().min(1),
|
|
23068
|
+
icon: string().optional(),
|
|
23069
|
+
issuerUrl: string().optional(),
|
|
23070
|
+
clientId: string().optional(),
|
|
23071
|
+
clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
|
|
23072
|
+
redirectUri: string().optional(),
|
|
23073
|
+
scopes: string().optional(),
|
|
23074
|
+
usernameClaim: _enum([
|
|
23075
|
+
"preferred_username",
|
|
23076
|
+
"email",
|
|
23077
|
+
"sub"
|
|
23078
|
+
]).optional()
|
|
23079
|
+
});
|
|
23080
|
+
method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
|
|
23081
|
+
id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
|
|
23082
|
+
displayName: string().min(1)
|
|
23083
|
+
}), object({ id: string() }), {
|
|
23084
|
+
kind: "mutation",
|
|
23085
|
+
auth: "admin"
|
|
23086
|
+
}), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
|
|
23087
|
+
kind: "mutation",
|
|
23088
|
+
auth: "admin"
|
|
23089
|
+
}), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
|
|
23090
|
+
kind: "mutation",
|
|
23091
|
+
auth: "admin"
|
|
23092
|
+
});
|
|
23093
|
+
/**
|
|
22160
23094
|
* What started a camera's onboard motion (D672). `camera` is the camera's own
|
|
22161
23095
|
* firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
|
|
22162
23096
|
* wire means the camera: only the camera-sensors bridge ever says `sensor`.
|
|
@@ -23513,21 +24447,69 @@ var RetrainFrameListSchema = object({
|
|
|
23513
24447
|
/** What the page pre-selects — the native key frame when one survives. */
|
|
23514
24448
|
autoPickMediaId: number().int().optional()
|
|
23515
24449
|
});
|
|
24450
|
+
/** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
|
|
24451
|
+
var RetrainFrameWorkStateSchema = _enum([
|
|
24452
|
+
"unannotated",
|
|
24453
|
+
"annotated",
|
|
24454
|
+
"complete"
|
|
24455
|
+
]);
|
|
24456
|
+
/**
|
|
24457
|
+
* Filters for paginated corpus list, KPI, and matching export (design §4.4).
|
|
24458
|
+
* Every narrowing field is ANDed; omitted fields impose no constraint.
|
|
24459
|
+
*/
|
|
24460
|
+
var RetrainCorpusFilterSchema = object({
|
|
24461
|
+
workState: RetrainFrameWorkStateSchema.optional(),
|
|
24462
|
+
deviceIds: array(number()).max(500).optional(),
|
|
24463
|
+
/** When set, only frames in this named collection. */
|
|
24464
|
+
collectionId: string().optional(),
|
|
24465
|
+
/** Frames that carry at least one saved annotation in one of these classes. */
|
|
24466
|
+
classes: array(RetrainMacroClassSchema).optional(),
|
|
24467
|
+
page: number().int().positive().default(1),
|
|
24468
|
+
pageSize: number().int().positive().max(100).default(50)
|
|
24469
|
+
});
|
|
24470
|
+
var RetrainCorpusPageSchema = object({
|
|
24471
|
+
frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
|
|
24472
|
+
total: number().int().nonnegative(),
|
|
24473
|
+
page: number().int().positive(),
|
|
24474
|
+
pageSize: number().int().positive()
|
|
24475
|
+
});
|
|
24476
|
+
var RetrainCorpusKpiCameraRowSchema = object({
|
|
24477
|
+
deviceId: number(),
|
|
24478
|
+
unannotated: number().int().nonnegative(),
|
|
24479
|
+
annotated: number().int().nonnegative(),
|
|
24480
|
+
complete: number().int().nonnegative(),
|
|
24481
|
+
/** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
|
|
24482
|
+
* `null` when the corpus is empty (no ratio). */
|
|
24483
|
+
pctOfCorpus: number().min(0).max(1).nullable()
|
|
24484
|
+
});
|
|
24485
|
+
var RetrainCorpusKpiSchema = object({
|
|
24486
|
+
total: number().int().nonnegative(),
|
|
24487
|
+
unannotated: number().int().nonnegative(),
|
|
24488
|
+
annotated: number().int().nonnegative(),
|
|
24489
|
+
complete: number().int().nonnegative(),
|
|
24490
|
+
cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
|
|
24491
|
+
});
|
|
23516
24492
|
/**
|
|
23517
24493
|
* Which frames an annotated export carries. Every field narrows; an empty
|
|
23518
|
-
* filter is every annotated copy.
|
|
23519
|
-
*
|
|
23520
|
-
*
|
|
23521
|
-
*
|
|
24494
|
+
* filter is every annotated copy. `frameIds` is the primitive a job or
|
|
24495
|
+
* download uses; `batchId` re-selects what an earlier export carried
|
|
24496
|
+
* (`exportedInBatch`). Frozen dataset versions were removed — live selection
|
|
24497
|
+
* resolves to `frameIds` at plan/start.
|
|
23522
24498
|
*/
|
|
23523
24499
|
var RetrainExportFilterSchema = object({
|
|
23524
24500
|
deviceIds: array(number()).optional(),
|
|
23525
24501
|
frameIds: array(string()).max(2e4).optional(),
|
|
23526
24502
|
/** Only frames in at least one of these named collections. */
|
|
23527
24503
|
collectionIds: array(string()).max(200).optional(),
|
|
24504
|
+
/** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
|
|
24505
|
+
collectionId: string().optional(),
|
|
23528
24506
|
batchId: string().optional(),
|
|
23529
24507
|
/** Only frames the operator marked complete (all subjects boxed). */
|
|
23530
|
-
completeOnly: boolean().optional()
|
|
24508
|
+
completeOnly: boolean().optional(),
|
|
24509
|
+
/** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
|
|
24510
|
+
workState: RetrainFrameWorkStateSchema.optional(),
|
|
24511
|
+
/** Frames with at least one saved annotation in one of these classes. */
|
|
24512
|
+
classes: array(RetrainMacroClassSchema).optional()
|
|
23531
24513
|
});
|
|
23532
24514
|
/**
|
|
23533
24515
|
* `frames`: the full frame copies, boxes in `annotations.json`.
|
|
@@ -23692,6 +24674,77 @@ var RetrainLlmAssistResultSchema = discriminatedUnion("kind", [object({
|
|
|
23692
24674
|
]),
|
|
23693
24675
|
detail: string().optional()
|
|
23694
24676
|
})]);
|
|
24677
|
+
/** What a dataset version is cut from. Every field narrows. */
|
|
24678
|
+
var RetrainDatasetSelectionSchema = object({
|
|
24679
|
+
deviceIds: array(number()).readonly().optional(),
|
|
24680
|
+
collectionIds: array(string()).max(200).readonly().optional(),
|
|
24681
|
+
frameIds: array(string()).max(2e4).readonly().optional()
|
|
24682
|
+
});
|
|
24683
|
+
/** The counts a dataset is judged by. */
|
|
24684
|
+
var RetrainDatasetStatsSchema = object({
|
|
24685
|
+
frames: number().int(),
|
|
24686
|
+
completeFrames: number().int(),
|
|
24687
|
+
/** `completeFrames / frames`, 0..1. */
|
|
24688
|
+
completeness: number(),
|
|
24689
|
+
/** Boxes to learn (model errors excluded). */
|
|
24690
|
+
subjects: number().int(),
|
|
24691
|
+
modelErrors: number().int(),
|
|
24692
|
+
/** Complete frames with no subject. */
|
|
24693
|
+
hardNegatives: number().int(),
|
|
24694
|
+
/** Subjects per class × camera × day/night. */
|
|
24695
|
+
cells: array(object({
|
|
24696
|
+
macroClass: string(),
|
|
24697
|
+
deviceId: number(),
|
|
24698
|
+
lighting: _enum([
|
|
24699
|
+
"day",
|
|
24700
|
+
"night",
|
|
24701
|
+
"unknown"
|
|
24702
|
+
]),
|
|
24703
|
+
subjects: number().int(),
|
|
24704
|
+
frames: number().int()
|
|
24705
|
+
})).readonly(),
|
|
24706
|
+
cameras: array(object({
|
|
24707
|
+
deviceId: number(),
|
|
24708
|
+
frames: number().int(),
|
|
24709
|
+
completeFrames: number().int()
|
|
24710
|
+
})).readonly()
|
|
24711
|
+
});
|
|
24712
|
+
object({
|
|
24713
|
+
id: string(),
|
|
24714
|
+
name: string(),
|
|
24715
|
+
createdAt: number(),
|
|
24716
|
+
selection: RetrainDatasetSelectionSchema,
|
|
24717
|
+
layout: RetrainExportLayoutSchema,
|
|
24718
|
+
completeOnly: boolean(),
|
|
24719
|
+
frameCount: number().int(),
|
|
24720
|
+
annotationHash: string(),
|
|
24721
|
+
manifestSchema: string(),
|
|
24722
|
+
stats: RetrainDatasetStatsSchema
|
|
24723
|
+
});
|
|
24724
|
+
/**
|
|
24725
|
+
* Live training corpus criteria — same shape as `TrainingCorpusSelection` on
|
|
24726
|
+
* the training cap. Resolved here so plan/start and the annotated export share
|
|
24727
|
+
* one definition of "the frames" (`buildRetrainExportPlan`).
|
|
24728
|
+
*/
|
|
24729
|
+
var RetrainTrainingCorpusSelectionSchema = object({
|
|
24730
|
+
collectionIds: array(string()).min(1),
|
|
24731
|
+
workState: _enum([
|
|
24732
|
+
"complete",
|
|
24733
|
+
"annotated_or_complete",
|
|
24734
|
+
"any_annotated"
|
|
24735
|
+
]).default("complete")
|
|
24736
|
+
});
|
|
24737
|
+
var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
|
|
24738
|
+
kind: literal("resolved"),
|
|
24739
|
+
frameIds: array(string()).max(2e4).readonly(),
|
|
24740
|
+
stats: RetrainDatasetStatsSchema,
|
|
24741
|
+
annotationHash: string(),
|
|
24742
|
+
layout: RetrainExportLayoutSchema
|
|
24743
|
+
}), object({
|
|
24744
|
+
kind: literal("refused"),
|
|
24745
|
+
reason: _enum(["unknown-collection", "no-frames"]),
|
|
24746
|
+
detail: string()
|
|
24747
|
+
})]);
|
|
23695
24748
|
/** The outcome of a lifecycle move owned by the retrain page. */
|
|
23696
24749
|
var RetrainTransitionResultSchema = object({
|
|
23697
24750
|
trackId: string(),
|
|
@@ -24397,6 +25450,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
24397
25450
|
}), array(RetrainTrackSchema).readonly(), {
|
|
24398
25451
|
kind: "query",
|
|
24399
25452
|
auth: "admin"
|
|
25453
|
+
}), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
|
|
25454
|
+
kind: "query",
|
|
25455
|
+
auth: "admin"
|
|
25456
|
+
}), method(object({}), RetrainCorpusKpiSchema, {
|
|
25457
|
+
kind: "query",
|
|
25458
|
+
auth: "admin"
|
|
24400
25459
|
}), method(object({ trackId: string() }), RetrainFrameListSchema, {
|
|
24401
25460
|
kind: "query",
|
|
24402
25461
|
auth: "admin"
|
|
@@ -24481,6 +25540,17 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
24481
25540
|
kind: "mutation",
|
|
24482
25541
|
auth: "admin",
|
|
24483
25542
|
timeoutMs: 60 * 6e4
|
|
25543
|
+
}), method(object({
|
|
25544
|
+
filter: RetrainExportFilterSchema,
|
|
25545
|
+
layout: RetrainExportLayoutSchema
|
|
25546
|
+
}), object({
|
|
25547
|
+
ticket: PeerBytesTicketSchema,
|
|
25548
|
+
frames: number().int(),
|
|
25549
|
+
annotations: number().int()
|
|
25550
|
+
}), {
|
|
25551
|
+
kind: "mutation",
|
|
25552
|
+
auth: "admin",
|
|
25553
|
+
timeoutMs: 12e4
|
|
24484
25554
|
}), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
|
|
24485
25555
|
kind: "query",
|
|
24486
25556
|
auth: "admin"
|
|
@@ -24507,6 +25577,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
24507
25577
|
}), method(object({}), array(RetrainCollectionSchema).readonly(), {
|
|
24508
25578
|
kind: "query",
|
|
24509
25579
|
auth: "admin"
|
|
25580
|
+
}), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
|
|
25581
|
+
kind: "query",
|
|
25582
|
+
auth: "admin",
|
|
25583
|
+
timeoutMs: 6e4
|
|
24510
25584
|
}), method(object({
|
|
24511
25585
|
id: string(),
|
|
24512
25586
|
name: string().max(120)
|
|
@@ -25123,11 +26197,14 @@ var HardwareClassIdSchema = _enum([
|
|
|
25123
26197
|
"intel-n-series",
|
|
25124
26198
|
"apple-m-base",
|
|
25125
26199
|
"apple-m-pro",
|
|
26200
|
+
"amd-phoenix",
|
|
25126
26201
|
"unknown"
|
|
25127
26202
|
]);
|
|
25128
26203
|
var AcceleratorKindSchema = _enum([
|
|
25129
26204
|
"intel-npu",
|
|
25130
26205
|
"intel-igpu",
|
|
26206
|
+
"amd-igpu",
|
|
26207
|
+
"amd-npu",
|
|
25131
26208
|
"x86-cpu",
|
|
25132
26209
|
"arm-cpu",
|
|
25133
26210
|
"apple-ane",
|
|
@@ -27057,6 +28134,8 @@ var AgentPipelineSettingsSchema = object({
|
|
|
27057
28134
|
* address is wrong (multi-homed host, NAT, custom interface).
|
|
27058
28135
|
*/
|
|
27059
28136
|
reachableHost: string().optional(),
|
|
28137
|
+
/** Hub-persisted UI colour (`--color-node-*` theme tokens). */
|
|
28138
|
+
color: NodeColorIdSchema.optional(),
|
|
27060
28139
|
/**
|
|
27061
28140
|
* Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
|
|
27062
28141
|
* weight, steps}. Absent / all-disabled ⇒ the node's single default
|
|
@@ -27606,8 +28685,9 @@ method(object({
|
|
|
27606
28685
|
auth: "admin"
|
|
27607
28686
|
}), method(object({
|
|
27608
28687
|
agentNodeId: string(),
|
|
27609
|
-
reachableHost: string().nullable()
|
|
27610
|
-
|
|
28688
|
+
reachableHost: string().nullable().optional(),
|
|
28689
|
+
color: NodeColorIdSchema.nullable().optional()
|
|
28690
|
+
}).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
|
|
27611
28691
|
kind: "mutation",
|
|
27612
28692
|
auth: "admin"
|
|
27613
28693
|
}), method(object({
|
|
@@ -28059,8 +29139,8 @@ version: string().optional() }), ServerUpdateActionResultSchema, {
|
|
|
28059
29139
|
* `smtp-provider` — pluggable email delivery surface.
|
|
28060
29140
|
*
|
|
28061
29141
|
* Collection cap: a deployment may install multiple SMTP relays (e.g.
|
|
28062
|
-
* one for transactional / one for notifications). Consumers (
|
|
28063
|
-
*
|
|
29142
|
+
* one for transactional / one for notifications). Consumers (notifier
|
|
29143
|
+
* addons, …) walk the collection and pick the first
|
|
28064
29144
|
* ready provider OR target a specific addonId.
|
|
28065
29145
|
*
|
|
28066
29146
|
* The shape stays small on purpose — `sendEmail` is enough for the
|
|
@@ -28239,7 +29319,7 @@ targets: array(object({
|
|
|
28239
29319
|
})));
|
|
28240
29320
|
/**
|
|
28241
29321
|
* `sso-bridge` — internal hub-only cap that lets SSO-style auth
|
|
28242
|
-
* providers (OIDC, SAML,
|
|
29322
|
+
* providers (OIDC, SAML, …) mint an HMAC-signed token
|
|
28243
29323
|
* carrying the post-callback claims before redirecting back to
|
|
28244
29324
|
* `/api/auth/sso/finish`.
|
|
28245
29325
|
*
|
|
@@ -28302,7 +29382,14 @@ var SsoBridgeClaimsSchema = object({
|
|
|
28302
29382
|
* Verified `iss` of the id_token behind an OIDC login bridge (D782). A
|
|
28303
29383
|
* subject is unique only per issuer, so a link is bound to it.
|
|
28304
29384
|
*/
|
|
28305
|
-
issuer: string().optional()
|
|
29385
|
+
issuer: string().optional(),
|
|
29386
|
+
/**
|
|
29387
|
+
* SHA-256 (hex) of the `camstack_sso_state` cookie the IdP `/start` set in
|
|
29388
|
+
* the browser that began this sign-in. `/api/auth/sso/finish` requires the
|
|
29389
|
+
* request to present the matching cookie — a login bridge is useless in
|
|
29390
|
+
* any other browser.
|
|
29391
|
+
*/
|
|
29392
|
+
browserBinding: string().optional()
|
|
28306
29393
|
});
|
|
28307
29394
|
method(object({
|
|
28308
29395
|
claims: SsoBridgeClaimsSchema,
|
|
@@ -30676,7 +31763,7 @@ var CustomActionInputSchema = object({
|
|
|
30676
31763
|
action: string().min(1),
|
|
30677
31764
|
input: unknown()
|
|
30678
31765
|
});
|
|
30679
|
-
method(
|
|
31766
|
+
method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
|
|
30680
31767
|
addonId: string(),
|
|
30681
31768
|
limit: number().min(1).max(500).default(100),
|
|
30682
31769
|
level: LogLevelSchema$2.optional()
|
|
@@ -35755,7 +36842,13 @@ var TopologyNodeSchema = object({
|
|
|
35755
36842
|
})).readonly(),
|
|
35756
36843
|
processes: array(TopologyProcessSchema).readonly(),
|
|
35757
36844
|
categories: array(TopologyCategorySchema).readonly(),
|
|
35758
|
-
rootPackage: TopologyRootPackageSchema.nullable()
|
|
36845
|
+
rootPackage: TopologyRootPackageSchema.nullable(),
|
|
36846
|
+
/**
|
|
36847
|
+
* How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
|
|
36848
|
+
* completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
|
|
36849
|
+
* for offline rows and when the hub cannot tell.
|
|
36850
|
+
*/
|
|
36851
|
+
meshTransport: _enum(["tls", "clear"]).optional()
|
|
35759
36852
|
});
|
|
35760
36853
|
var CapUsageEdgeSchema = object({
|
|
35761
36854
|
callerAddonId: string(),
|
|
@@ -36168,6 +37261,7 @@ var OsdNamedTemplateSchema = object({
|
|
|
36168
37261
|
});
|
|
36169
37262
|
/** Where a slot's value comes from. */
|
|
36170
37263
|
var OsdSourceSchema = discriminatedUnion("kind", [
|
|
37264
|
+
object({ kind: literal("none") }),
|
|
36171
37265
|
object({
|
|
36172
37266
|
kind: literal("static"),
|
|
36173
37267
|
text: string().max(64)
|
|
@@ -36294,6 +37388,13 @@ method(object({ deviceId: number().int() }), object({
|
|
|
36294
37388
|
}), object({ success: literal(true) }), {
|
|
36295
37389
|
kind: "mutation",
|
|
36296
37390
|
auth: "admin"
|
|
37391
|
+
}), method(object({
|
|
37392
|
+
deviceId: number().int(),
|
|
37393
|
+
slotId: string().min(1),
|
|
37394
|
+
enabled: boolean()
|
|
37395
|
+
}), object({ success: literal(true) }), {
|
|
37396
|
+
kind: "mutation",
|
|
37397
|
+
auth: "admin"
|
|
36297
37398
|
}), method(object({
|
|
36298
37399
|
sourceDeviceId: number().int(),
|
|
36299
37400
|
targetDeviceId: number().int()
|
|
@@ -36725,7 +37826,15 @@ var GpuInfoSchema = object({
|
|
|
36725
37826
|
name: string(),
|
|
36726
37827
|
memoryMB: number().optional()
|
|
36727
37828
|
});
|
|
36728
|
-
var NpuInfoSchema = object({
|
|
37829
|
+
var NpuInfoSchema = object({
|
|
37830
|
+
type: _enum([
|
|
37831
|
+
"apple-ane",
|
|
37832
|
+
"intel-npu",
|
|
37833
|
+
"amd-xdna"
|
|
37834
|
+
]),
|
|
37835
|
+
name: string().optional(),
|
|
37836
|
+
generation: _enum(["xdna1", "xdna2"]).optional()
|
|
37837
|
+
});
|
|
36729
37838
|
var CoralInfoSchema = object({
|
|
36730
37839
|
type: literal("coral-edgetpu"),
|
|
36731
37840
|
bus: string().optional()
|
|
@@ -40578,16 +41687,6 @@ var ApiKeySummarySchema = object({
|
|
|
40578
41687
|
createdAt: number(),
|
|
40579
41688
|
lastUsedAt: number().optional()
|
|
40580
41689
|
});
|
|
40581
|
-
var CreateApiKeyInputSchema = object({
|
|
40582
|
-
label: string(),
|
|
40583
|
-
isAdmin: boolean().default(false),
|
|
40584
|
-
allowedProviders: union([array(string()), literal("*")]).optional(),
|
|
40585
|
-
allowedDevices: record(string(), union([array(string()), literal("*")])).optional()
|
|
40586
|
-
});
|
|
40587
|
-
var CreateApiKeyResultSchema = object({
|
|
40588
|
-
token: string(),
|
|
40589
|
-
record: ApiKeySummarySchema
|
|
40590
|
-
});
|
|
40591
41690
|
var ScopedTokenSummarySchema = object({
|
|
40592
41691
|
id: string(),
|
|
40593
41692
|
userId: string(),
|
|
@@ -40686,17 +41785,10 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
40686
41785
|
}), UserSummarySchema.extend({ passwordHash: string() }).nullable(), {
|
|
40687
41786
|
kind: "mutation",
|
|
40688
41787
|
access: "view"
|
|
40689
|
-
}), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(
|
|
40690
|
-
kind: "mutation",
|
|
40691
|
-
auth: "admin",
|
|
40692
|
-
access: "create"
|
|
40693
|
-
}), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
41788
|
+
}), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
40694
41789
|
kind: "mutation",
|
|
40695
41790
|
auth: "admin",
|
|
40696
41791
|
access: "delete"
|
|
40697
|
-
}), method(object({ token: string() }), ApiKeySummarySchema.nullable(), {
|
|
40698
|
-
kind: "mutation",
|
|
40699
|
-
access: "view"
|
|
40700
41792
|
}), method(CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, {
|
|
40701
41793
|
kind: "mutation",
|
|
40702
41794
|
auth: "admin",
|
|
@@ -40770,15 +41862,7 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
40770
41862
|
}).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
|
|
40771
41863
|
userId: string(),
|
|
40772
41864
|
issuer: string()
|
|
40773
|
-
}).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
|
|
40774
|
-
userId: string(),
|
|
40775
|
-
issuer: string().min(1),
|
|
40776
|
-
label: string().optional()
|
|
40777
|
-
}), object({ success: literal(true) }), {
|
|
40778
|
-
kind: "mutation",
|
|
40779
|
-
auth: "admin",
|
|
40780
|
-
access: "create"
|
|
40781
|
-
}), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
41865
|
+
}).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
40782
41866
|
kind: "mutation",
|
|
40783
41867
|
auth: "admin",
|
|
40784
41868
|
access: "delete"
|
|
@@ -41483,6 +42567,563 @@ var zoneRulesCapability = {
|
|
|
41483
42567
|
*/
|
|
41484
42568
|
durability: "restored"
|
|
41485
42569
|
};
|
|
42570
|
+
/**
|
|
42571
|
+
* `training-provider` — ONE cloud that can run the CamStack trainer.
|
|
42572
|
+
*
|
|
42573
|
+
* A thin, mockable translation layer: it knows how to run a container with a
|
|
42574
|
+
* GPU, move a dataset in, read the job's stdout and hand artefacts back. It
|
|
42575
|
+
* knows nothing about datasets, splits, floors, cost policy or Model Studio —
|
|
42576
|
+
* those are the `training` orchestrator's (D805). Every rule written there
|
|
42577
|
+
* once is what makes a second provider (RunPod, a local NVIDIA node) a new
|
|
42578
|
+
* manifest entry and nothing else.
|
|
42579
|
+
*
|
|
42580
|
+
* Collection of provider **types** (addons). Each addon owns zero or more
|
|
42581
|
+
* **entries** (credentials + defaults). Concat-fans: `describe`,
|
|
42582
|
+
* `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
|
|
42583
|
+
* `entryId`; callers also pass the owning `addonId` as the collection
|
|
42584
|
+
* selector (broker posture). Every method is `admin`: these spend money.
|
|
42585
|
+
*
|
|
42586
|
+
* Every cloud object a provider creates is tagged with the orchestrator's
|
|
42587
|
+
* `jobKey`, so a retried submit finds the job it already started instead of
|
|
42588
|
+
* starting a second GPU, and `listJobs` can find orphans.
|
|
42589
|
+
*
|
|
42590
|
+
* Bytes never ride a cap field: the dataset arrives as a `ctx.peerBytes`
|
|
42591
|
+
* ticket the producer (pipeline-analytics) minted, and artefacts leave as a
|
|
42592
|
+
* ticket the provider mints (D613).
|
|
42593
|
+
*/
|
|
42594
|
+
var TrainingGpuOptionSchema = object({
|
|
42595
|
+
id: string(),
|
|
42596
|
+
label: string(),
|
|
42597
|
+
/** List price, USD per GPU-hour, before any region multiplier. */
|
|
42598
|
+
usdPerHour: number().nonnegative(),
|
|
42599
|
+
vramGb: number().nonnegative()
|
|
42600
|
+
});
|
|
42601
|
+
var TrainingRegionOptionSchema = object({
|
|
42602
|
+
/** `''` = any region (the provider's choice). */
|
|
42603
|
+
id: string(),
|
|
42604
|
+
label: string(),
|
|
42605
|
+
priceMultiplier: number().positive()
|
|
42606
|
+
});
|
|
42607
|
+
/**
|
|
42608
|
+
* The provider's per-entry settings, as the orchestrator reads them. They
|
|
42609
|
+
* live on the PROVIDER addon's entry (operator decision 2026-10-08: they
|
|
42610
|
+
* depend on the user's account), never hard-coded in the orchestrator.
|
|
42611
|
+
*/
|
|
42612
|
+
var TrainingProviderDefaultsSchema = object({
|
|
42613
|
+
gpuType: string(),
|
|
42614
|
+
region: string(),
|
|
42615
|
+
costCapUsd: number().nonnegative(),
|
|
42616
|
+
maxRuntimeSec: number().int().positive(),
|
|
42617
|
+
/** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
|
|
42618
|
+
failedDatasetGraceHours: number().nonnegative()
|
|
42619
|
+
});
|
|
42620
|
+
/**
|
|
42621
|
+
* Entry form schema for a provider type — same seam as notification
|
|
42622
|
+
* `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
|
|
42623
|
+
* {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
|
|
42624
|
+
*/
|
|
42625
|
+
var ConfigSchemaPassthrough = unknown();
|
|
42626
|
+
/** One creatable provider type, for the Add-entry dialog. */
|
|
42627
|
+
var TrainingProviderTypeSchema = object({
|
|
42628
|
+
typeId: string(),
|
|
42629
|
+
label: string(),
|
|
42630
|
+
/** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
|
|
42631
|
+
iconAsset: string(),
|
|
42632
|
+
/** Owning `training-provider` addon — collection selector for createEntry. */
|
|
42633
|
+
addonId: string(),
|
|
42634
|
+
/**
|
|
42635
|
+
* Fields for one entry of this type (credentials + defaults). Absent on a
|
|
42636
|
+
* type that only needs a name. Password fields are keychain-backed on the
|
|
42637
|
+
* provider addon (`secretStatePaths`), not D634 plaintext.
|
|
42638
|
+
*/
|
|
42639
|
+
configSchema: ConfigSchemaPassthrough.optional()
|
|
42640
|
+
});
|
|
42641
|
+
/** One configured account / workspace under a provider type. */
|
|
42642
|
+
var TrainingProviderEntrySchema = object({
|
|
42643
|
+
entryId: string(),
|
|
42644
|
+
typeId: string(),
|
|
42645
|
+
name: string(),
|
|
42646
|
+
addonId: string(),
|
|
42647
|
+
/** Credentials are present — never the values. */
|
|
42648
|
+
configured: boolean()
|
|
42649
|
+
});
|
|
42650
|
+
var TrainingProviderDescriptorSchema = object({
|
|
42651
|
+
addonId: string(),
|
|
42652
|
+
entryId: string(),
|
|
42653
|
+
typeId: string(),
|
|
42654
|
+
/** Operator-chosen entry name. */
|
|
42655
|
+
name: string(),
|
|
42656
|
+
iconAsset: string(),
|
|
42657
|
+
/** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
|
|
42658
|
+
kind: string(),
|
|
42659
|
+
label: string(),
|
|
42660
|
+
gpuTypes: array(TrainingGpuOptionSchema).readonly(),
|
|
42661
|
+
regions: array(TrainingRegionOptionSchema).readonly(),
|
|
42662
|
+
maxDatasetBytes: number().int().positive(),
|
|
42663
|
+
maxRuntimeSec: number().int().positive(),
|
|
42664
|
+
freeTierNote: string().optional(),
|
|
42665
|
+
/** Where the data goes, in one sentence the confirm dialog repeats. */
|
|
42666
|
+
dataResidencyNote: string(),
|
|
42667
|
+
/** Credentials are present — never the values. */
|
|
42668
|
+
configured: boolean(),
|
|
42669
|
+
defaults: TrainingProviderDefaultsSchema,
|
|
42670
|
+
/**
|
|
42671
|
+
* Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
|
|
42672
|
+
* fields are keychain {@link SecretFieldView} or `null` / `''` (create),
|
|
42673
|
+
* never plaintext. Same hydrate contract as settings forms (D789).
|
|
42674
|
+
*/
|
|
42675
|
+
formValues: record(string(), unknown()).optional()
|
|
42676
|
+
});
|
|
42677
|
+
/**
|
|
42678
|
+
* Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
|
|
42679
|
+
* An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
|
|
42680
|
+
* `{ $secretClear: true }` clears it.
|
|
42681
|
+
*/
|
|
42682
|
+
var TrainingProviderUpdateEntryInputSchema = object({
|
|
42683
|
+
entryId: string().min(1),
|
|
42684
|
+
name: string().min(1),
|
|
42685
|
+
tokenId: string().optional(),
|
|
42686
|
+
tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
|
|
42687
|
+
environment: string().optional(),
|
|
42688
|
+
gpuType: string().optional(),
|
|
42689
|
+
region: string().optional(),
|
|
42690
|
+
costCapUsd: number().nonnegative().optional(),
|
|
42691
|
+
maxRuntimeSec: number().int().positive().optional(),
|
|
42692
|
+
failedDatasetGraceHours: number().nonnegative().optional()
|
|
42693
|
+
});
|
|
42694
|
+
var TrainingCredentialCheckSchema = object({
|
|
42695
|
+
ok: boolean(),
|
|
42696
|
+
/** Workspace / account name, when the provider says. */
|
|
42697
|
+
account: string().optional(),
|
|
42698
|
+
reason: _enum([
|
|
42699
|
+
"missing",
|
|
42700
|
+
"invalid",
|
|
42701
|
+
"forbidden",
|
|
42702
|
+
"network",
|
|
42703
|
+
"quota"
|
|
42704
|
+
]).optional(),
|
|
42705
|
+
detail: string().optional()
|
|
42706
|
+
});
|
|
42707
|
+
var ProviderJobStateSchema = _enum([
|
|
42708
|
+
"pending",
|
|
42709
|
+
"starting",
|
|
42710
|
+
"running",
|
|
42711
|
+
"succeeded",
|
|
42712
|
+
"failed",
|
|
42713
|
+
"cancelled",
|
|
42714
|
+
"lost"
|
|
42715
|
+
]);
|
|
42716
|
+
var ProviderJobStatusSchema = object({
|
|
42717
|
+
jobKey: string(),
|
|
42718
|
+
providerJobId: string().optional(),
|
|
42719
|
+
state: ProviderJobStateSchema,
|
|
42720
|
+
startedAt: number().optional(),
|
|
42721
|
+
endedAt: number().optional(),
|
|
42722
|
+
exitCode: number().int().optional(),
|
|
42723
|
+
failureReason: string().optional(),
|
|
42724
|
+
gpuType: string(),
|
|
42725
|
+
region: string().optional(),
|
|
42726
|
+
billedSeconds: number().nonnegative(),
|
|
42727
|
+
costUsd: number().nonnegative(),
|
|
42728
|
+
/** True when `costUsd` is runtime × list price, not a billing answer. */
|
|
42729
|
+
costIsEstimate: boolean(),
|
|
42730
|
+
lastFetchedAt: number()
|
|
42731
|
+
});
|
|
42732
|
+
/**
|
|
42733
|
+
* The trainer the job runs, by SOURCE revision: the provider turns it into an
|
|
42734
|
+
* image its own way (Modal builds the published Dockerfile at that revision;
|
|
42735
|
+
* a registry-pull provider maps it to a tag). Recorded on the job and echoed
|
|
42736
|
+
* in `result.json`.
|
|
42737
|
+
*/
|
|
42738
|
+
var TrainerSourceRefSchema = object({
|
|
42739
|
+
/** Hugging Face repo id, e.g. `camstack/camstack-trainer`. */
|
|
42740
|
+
repo: string().min(1),
|
|
42741
|
+
/** A commit sha (never a branch) — the job must be reproducible. */
|
|
42742
|
+
revision: string().regex(/^[0-9a-f]{7,64}$/)
|
|
42743
|
+
});
|
|
42744
|
+
/** Cloud job identity — route with the owning addon's `addonId` selector. */
|
|
42745
|
+
var JobRef = {
|
|
42746
|
+
entryId: string().min(1),
|
|
42747
|
+
jobKey: string().uuid()
|
|
42748
|
+
};
|
|
42749
|
+
var TrainingLogLineSchema = object({
|
|
42750
|
+
ts: number(),
|
|
42751
|
+
text: string()
|
|
42752
|
+
});
|
|
42753
|
+
method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
|
|
42754
|
+
typeId: string().min(1),
|
|
42755
|
+
name: string().min(1)
|
|
42756
|
+
}), object({ entryId: string() }), {
|
|
42757
|
+
kind: "mutation",
|
|
42758
|
+
auth: "admin"
|
|
42759
|
+
}), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
|
|
42760
|
+
kind: "mutation",
|
|
42761
|
+
auth: "admin"
|
|
42762
|
+
}), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
|
|
42763
|
+
kind: "mutation",
|
|
42764
|
+
auth: "admin"
|
|
42765
|
+
}), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
|
|
42766
|
+
kind: "mutation",
|
|
42767
|
+
auth: "admin",
|
|
42768
|
+
timeoutMs: 3e4
|
|
42769
|
+
}), method(object({
|
|
42770
|
+
entryId: string().min(1),
|
|
42771
|
+
gpuType: string(),
|
|
42772
|
+
region: string(),
|
|
42773
|
+
datasetBytes: number().int().nonnegative(),
|
|
42774
|
+
gpuSecondsLow: number().nonnegative(),
|
|
42775
|
+
gpuSecondsHigh: number().nonnegative()
|
|
42776
|
+
}), object({
|
|
42777
|
+
usdLow: number().nonnegative(),
|
|
42778
|
+
usdHigh: number().nonnegative(),
|
|
42779
|
+
notes: array(string()).readonly()
|
|
42780
|
+
}), { auth: "admin" }), method(object({
|
|
42781
|
+
...JobRef,
|
|
42782
|
+
ticket: PeerBytesTicketSchema
|
|
42783
|
+
}), object({
|
|
42784
|
+
bytes: number().int().nonnegative(),
|
|
42785
|
+
sha256: string()
|
|
42786
|
+
}), {
|
|
42787
|
+
kind: "mutation",
|
|
42788
|
+
auth: "admin",
|
|
42789
|
+
timeoutMs: 120 * 6e4
|
|
42790
|
+
}), method(object({
|
|
42791
|
+
...JobRef,
|
|
42792
|
+
trainer: TrainerSourceRefSchema,
|
|
42793
|
+
jobSpecJson: string().min(2).max(64e3),
|
|
42794
|
+
gpuType: string(),
|
|
42795
|
+
region: string(),
|
|
42796
|
+
maxRuntimeSec: number().int().positive()
|
|
42797
|
+
}), ProviderJobStatusSchema, {
|
|
42798
|
+
kind: "mutation",
|
|
42799
|
+
auth: "admin",
|
|
42800
|
+
timeoutMs: 30 * 6e4
|
|
42801
|
+
}), method(object(JobRef), ProviderJobStatusSchema, {
|
|
42802
|
+
auth: "admin",
|
|
42803
|
+
timeoutMs: 6e4
|
|
42804
|
+
}), method(object({
|
|
42805
|
+
...JobRef,
|
|
42806
|
+
cursor: string().optional(),
|
|
42807
|
+
max: number().int().min(1).max(500)
|
|
42808
|
+
}), object({
|
|
42809
|
+
lines: array(TrainingLogLineSchema).readonly(),
|
|
42810
|
+
cursor: string()
|
|
42811
|
+
}), {
|
|
42812
|
+
auth: "admin",
|
|
42813
|
+
timeoutMs: 6e4
|
|
42814
|
+
}), method(object(JobRef), object({ ok: literal(true) }), {
|
|
42815
|
+
kind: "mutation",
|
|
42816
|
+
auth: "admin",
|
|
42817
|
+
timeoutMs: 6e4
|
|
42818
|
+
}), method(object(JobRef), object({
|
|
42819
|
+
found: boolean(),
|
|
42820
|
+
text: string().optional()
|
|
42821
|
+
}), {
|
|
42822
|
+
kind: "mutation",
|
|
42823
|
+
auth: "admin",
|
|
42824
|
+
timeoutMs: 5 * 6e4
|
|
42825
|
+
}), method(object({
|
|
42826
|
+
...JobRef,
|
|
42827
|
+
path: _enum(["bundle.tar"])
|
|
42828
|
+
}), object({ ticket: PeerBytesTicketSchema }), {
|
|
42829
|
+
kind: "mutation",
|
|
42830
|
+
auth: "admin",
|
|
42831
|
+
timeoutMs: 5 * 6e4
|
|
42832
|
+
}), method(object(JobRef), object({ deleted: array(string()).readonly() }), {
|
|
42833
|
+
kind: "mutation",
|
|
42834
|
+
auth: "admin",
|
|
42835
|
+
timeoutMs: 5 * 6e4
|
|
42836
|
+
}), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
|
|
42837
|
+
auth: "admin",
|
|
42838
|
+
timeoutMs: 2 * 6e4
|
|
42839
|
+
});
|
|
42840
|
+
/**
|
|
42841
|
+
* `training` — the cloud-training orchestrator (D805). Hub-only singleton,
|
|
42842
|
+
* provided by `addon-training`.
|
|
42843
|
+
*
|
|
42844
|
+
* It owns what every provider must agree on, written once:
|
|
42845
|
+
*
|
|
42846
|
+
* - **Jobs.** A persisted state machine, a reconcile loop against the
|
|
42847
|
+
* provider, a cost guard, a daily orphan sweep and the retention rules.
|
|
42848
|
+
* - **The return flow.** Verified artefacts → Model Studio
|
|
42849
|
+
* (`custom-model-registry.importModelBundle`) → canary on cameras →
|
|
42850
|
+
* rollback. Nothing is ever registered automatically.
|
|
42851
|
+
*
|
|
42852
|
+
* Plan/start takes a live {@link TrainingCorpusSelection} (collections +
|
|
42853
|
+
* work-state rule); frame ids are resolved via pipeline-analytics at that
|
|
42854
|
+
* moment and snapshotted on the job. No frozen dataset version.
|
|
42855
|
+
*
|
|
42856
|
+
* Every method is `admin`.
|
|
42857
|
+
*/
|
|
42858
|
+
/**
|
|
42859
|
+
* Live corpus criteria for plan/start (design §5.2). Default is complete-only.
|
|
42860
|
+
* Frame ids are resolved at plan/start — never a frozen version id.
|
|
42861
|
+
*/
|
|
42862
|
+
var TrainingCorpusSelectionSchema = object({
|
|
42863
|
+
collectionIds: array(string()).min(1),
|
|
42864
|
+
/** Default complete-only for v1 */
|
|
42865
|
+
workState: _enum([
|
|
42866
|
+
"complete",
|
|
42867
|
+
"annotated_or_complete",
|
|
42868
|
+
"any_annotated"
|
|
42869
|
+
]).default("complete")
|
|
42870
|
+
});
|
|
42871
|
+
/** A base model a detector job can fine-tune, and the baseline it is judged against. */
|
|
42872
|
+
var TrainingBaseModelSchema = object({
|
|
42873
|
+
modelId: string(),
|
|
42874
|
+
label: string(),
|
|
42875
|
+
weights: string(),
|
|
42876
|
+
imgsz: number().int(),
|
|
42877
|
+
baselineOnnxUrl: string(),
|
|
42878
|
+
baselineFloors: record(string(), number()),
|
|
42879
|
+
/** The base the fleet runs most — the UI's default. */
|
|
42880
|
+
recommended: boolean()
|
|
42881
|
+
});
|
|
42882
|
+
var TrainingPresetSchema = _enum([
|
|
42883
|
+
"quick",
|
|
42884
|
+
"standard",
|
|
42885
|
+
"thorough"
|
|
42886
|
+
]);
|
|
42887
|
+
var TrainingJobRequestSchema = object({
|
|
42888
|
+
/** Live collection + work-state criteria; resolved at plan/start. */
|
|
42889
|
+
selection: TrainingCorpusSelectionSchema,
|
|
42890
|
+
/**
|
|
42891
|
+
* The provider **entry** that runs it (credentials + defaults).
|
|
42892
|
+
* Resolve to an owning addon via `training-provider.describe` / `listEntries`.
|
|
42893
|
+
*/
|
|
42894
|
+
entryId: string().min(1),
|
|
42895
|
+
gpuType: string().min(1),
|
|
42896
|
+
region: string(),
|
|
42897
|
+
baseModelId: string().min(1),
|
|
42898
|
+
preset: TrainingPresetSchema,
|
|
42899
|
+
/** Freeze the backbone's first N layers; `null` = the preset's choice. */
|
|
42900
|
+
freeze: number().int().nonnegative().nullable(),
|
|
42901
|
+
/** Cameras held out whole for evaluation; `null` = the orchestrator's default. */
|
|
42902
|
+
holdoutCameras: array(number().int()).nullable()
|
|
42903
|
+
});
|
|
42904
|
+
var TrainingSplitPlanSchema = object({
|
|
42905
|
+
holdoutCameras: array(number().int()).readonly(),
|
|
42906
|
+
/** Used when no camera is held out: the last N days of every camera. */
|
|
42907
|
+
holdoutLastDays: number().int().nonnegative(),
|
|
42908
|
+
/** Holdout subjects per class (camera holdout only; `null` = known only after the split). */
|
|
42909
|
+
holdoutSupport: record(string(), number().int()).nullable(),
|
|
42910
|
+
trainSubjects: number().int()
|
|
42911
|
+
});
|
|
42912
|
+
var TrainingRefusalReasonSchema = _enum([
|
|
42913
|
+
"unknown-dataset",
|
|
42914
|
+
"unknown-provider",
|
|
42915
|
+
"provider-not-configured",
|
|
42916
|
+
"unknown-base-model",
|
|
42917
|
+
"unknown-gpu",
|
|
42918
|
+
"dataset-too-large",
|
|
42919
|
+
"no-training-subjects",
|
|
42920
|
+
"job-already-running"
|
|
42921
|
+
]);
|
|
42922
|
+
var TrainingJobPlanSchema = object({
|
|
42923
|
+
refusal: object({
|
|
42924
|
+
reason: TrainingRefusalReasonSchema,
|
|
42925
|
+
detail: string()
|
|
42926
|
+
}).nullable(),
|
|
42927
|
+
warnings: array(string()).readonly(),
|
|
42928
|
+
split: TrainingSplitPlanSchema.nullable(),
|
|
42929
|
+
estimate: object({
|
|
42930
|
+
datasetBytes: number().int(),
|
|
42931
|
+
uploadMinutesAt20Mbps: number(),
|
|
42932
|
+
gpuSecondsLow: number(),
|
|
42933
|
+
gpuSecondsHigh: number(),
|
|
42934
|
+
usdLow: number(),
|
|
42935
|
+
usdHigh: number(),
|
|
42936
|
+
notes: array(string()).readonly()
|
|
42937
|
+
}).nullable(),
|
|
42938
|
+
/** Pre-filled from the provider's settings; the operator may lower or raise them. */
|
|
42939
|
+
defaults: object({
|
|
42940
|
+
maxCostUsd: number(),
|
|
42941
|
+
maxRuntimeSec: number().int()
|
|
42942
|
+
}).nullable(),
|
|
42943
|
+
/** The sentence the confirm dialog repeats: where the frames go and when they are deleted. */
|
|
42944
|
+
dataNotice: string()
|
|
42945
|
+
});
|
|
42946
|
+
/**
|
|
42947
|
+
* Orchestrator-owned states, persisted. `uploading` covers exporting the
|
|
42948
|
+
* archive (it is streamed, never staged). Terminal: `failed`, `cancelled`,
|
|
42949
|
+
* `lost`, `expired`, `discarded`. `registered` and `canary` are where a
|
|
42950
|
+
* result lives after the operator acted on it.
|
|
42951
|
+
*/
|
|
42952
|
+
var TrainingJobStateSchema = _enum([
|
|
42953
|
+
"queued",
|
|
42954
|
+
"uploading",
|
|
42955
|
+
"submitted",
|
|
42956
|
+
"starting",
|
|
42957
|
+
"running",
|
|
42958
|
+
"collecting",
|
|
42959
|
+
"ready",
|
|
42960
|
+
"registered",
|
|
42961
|
+
"canary",
|
|
42962
|
+
"failed",
|
|
42963
|
+
"cancelling",
|
|
42964
|
+
"cancelled",
|
|
42965
|
+
"lost",
|
|
42966
|
+
"expired",
|
|
42967
|
+
"discarded"
|
|
42968
|
+
]);
|
|
42969
|
+
var TrainingFailureReasonSchema = _enum([
|
|
42970
|
+
"cost-cap",
|
|
42971
|
+
"runtime-cap",
|
|
42972
|
+
"upload-failed",
|
|
42973
|
+
"submit-failed",
|
|
42974
|
+
"trainer-failed",
|
|
42975
|
+
"result-invalid",
|
|
42976
|
+
"checksum-mismatch",
|
|
42977
|
+
"fetch-failed",
|
|
42978
|
+
"provider-error",
|
|
42979
|
+
"hub-restart-during-upload"
|
|
42980
|
+
]);
|
|
42981
|
+
var TrainingProgressPointSchema = object({
|
|
42982
|
+
epoch: number().int(),
|
|
42983
|
+
map50: number().nullable(),
|
|
42984
|
+
map50_95: number().nullable()
|
|
42985
|
+
});
|
|
42986
|
+
var TrainingCanarySchema = object({
|
|
42987
|
+
deviceIds: array(number().int()).readonly(),
|
|
42988
|
+
since: number(),
|
|
42989
|
+
/** Every override the canary replaced, exactly, so rollback restores it. */
|
|
42990
|
+
previous: array(object({
|
|
42991
|
+
deviceId: number().int(),
|
|
42992
|
+
nodeId: string(),
|
|
42993
|
+
deviceKey: string(),
|
|
42994
|
+
patch: object({
|
|
42995
|
+
modelId: string().optional(),
|
|
42996
|
+
settings: record(string(), unknown()).readonly().optional()
|
|
42997
|
+
}).nullable()
|
|
42998
|
+
})).readonly()
|
|
42999
|
+
});
|
|
43000
|
+
var TrainingJobSchema = object({
|
|
43001
|
+
id: string(),
|
|
43002
|
+
idempotencyKey: string(),
|
|
43003
|
+
name: string(),
|
|
43004
|
+
createdAt: number(),
|
|
43005
|
+
updatedAt: number(),
|
|
43006
|
+
state: TrainingJobStateSchema,
|
|
43007
|
+
/**
|
|
43008
|
+
* Shared by every job enqueued together via `startJobBatch`.
|
|
43009
|
+
* `null` for a lone `startJob`. The engine advances queued siblings by this id.
|
|
43010
|
+
*/
|
|
43011
|
+
batchId: string().nullable().default(null),
|
|
43012
|
+
stage: TrainingStageSchema.nullable(),
|
|
43013
|
+
failure: object({
|
|
43014
|
+
reason: TrainingFailureReasonSchema,
|
|
43015
|
+
stage: string().nullable(),
|
|
43016
|
+
detail: string()
|
|
43017
|
+
}).nullable(),
|
|
43018
|
+
request: TrainingJobRequestSchema,
|
|
43019
|
+
maxCostUsd: number().nonnegative(),
|
|
43020
|
+
maxRuntimeSec: number().int().positive(),
|
|
43021
|
+
trainer: TrainerSourceRefSchema,
|
|
43022
|
+
datasetLayout: RetrainExportLayoutSchema,
|
|
43023
|
+
/** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
|
|
43024
|
+
frameCount: number().int().nonnegative(),
|
|
43025
|
+
/** Resolved frame ids at start — the archive ships exactly these. */
|
|
43026
|
+
frameIds: array(string()).max(2e4).readonly(),
|
|
43027
|
+
/** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
|
|
43028
|
+
annotationHash: string(),
|
|
43029
|
+
dataset: object({
|
|
43030
|
+
bytes: number().int(),
|
|
43031
|
+
sha256: string(),
|
|
43032
|
+
uploadedAt: number()
|
|
43033
|
+
}).nullable(),
|
|
43034
|
+
split: TrainingSplitPlanSchema,
|
|
43035
|
+
provider: object({
|
|
43036
|
+
state: ProviderJobStateSchema.nullable(),
|
|
43037
|
+
providerJobId: string().nullable(),
|
|
43038
|
+
startedAt: number().nullable(),
|
|
43039
|
+
endedAt: number().nullable(),
|
|
43040
|
+
billedSeconds: number(),
|
|
43041
|
+
costUsd: number(),
|
|
43042
|
+
costIsEstimate: boolean(),
|
|
43043
|
+
lastPolledAt: number().nullable()
|
|
43044
|
+
}),
|
|
43045
|
+
progress: object({
|
|
43046
|
+
epoch: number().int().nullable(),
|
|
43047
|
+
epochs: number().int().nullable(),
|
|
43048
|
+
etaSec: number().nullable(),
|
|
43049
|
+
series: array(TrainingProgressPointSchema).readonly()
|
|
43050
|
+
}),
|
|
43051
|
+
/** The last lines of the job's output (≤ 200), newest last. Never frame paths. */
|
|
43052
|
+
logTail: array(string()).readonly(),
|
|
43053
|
+
logCursor: string().nullable(),
|
|
43054
|
+
artifacts: object({
|
|
43055
|
+
bundleBytes: number().int(),
|
|
43056
|
+
bundleSha256: string(),
|
|
43057
|
+
fetchedAt: number(),
|
|
43058
|
+
/** When the staged artefacts are deleted from the hub. */
|
|
43059
|
+
expiresAt: number()
|
|
43060
|
+
}).nullable(),
|
|
43061
|
+
/** When the provider-side copy of the frames was deleted; null while it exists. */
|
|
43062
|
+
cloudDatasetDeletedAt: number().nullable(),
|
|
43063
|
+
/** A failed job's dataset is kept until then (the provider's grace), then deleted. */
|
|
43064
|
+
cloudCleanupDueAt: number().nullable(),
|
|
43065
|
+
/** Model ids registered from this job (base, and int8 when kept). */
|
|
43066
|
+
registeredModelIds: array(string()).readonly(),
|
|
43067
|
+
canary: TrainingCanarySchema.nullable()
|
|
43068
|
+
});
|
|
43069
|
+
var IdInput = object({ id: string().min(1) });
|
|
43070
|
+
method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
|
|
43071
|
+
auth: "admin",
|
|
43072
|
+
timeoutMs: 6e4
|
|
43073
|
+
}), method(TrainingJobRequestSchema.extend({
|
|
43074
|
+
name: string().min(1).max(120),
|
|
43075
|
+
maxCostUsd: number().positive(),
|
|
43076
|
+
maxRuntimeSec: number().int().positive(),
|
|
43077
|
+
idempotencyKey: string().min(8).max(80)
|
|
43078
|
+
}), discriminatedUnion("kind", [object({
|
|
43079
|
+
kind: literal("started"),
|
|
43080
|
+
job: TrainingJobSchema
|
|
43081
|
+
}), object({
|
|
43082
|
+
kind: literal("refused"),
|
|
43083
|
+
reason: TrainingRefusalReasonSchema,
|
|
43084
|
+
detail: string()
|
|
43085
|
+
})]), {
|
|
43086
|
+
kind: "mutation",
|
|
43087
|
+
auth: "admin",
|
|
43088
|
+
timeoutMs: 12e4
|
|
43089
|
+
}), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
|
|
43090
|
+
baseModelIds: array(string().min(1)).min(1),
|
|
43091
|
+
name: string().min(1).max(120),
|
|
43092
|
+
maxCostUsd: number().positive(),
|
|
43093
|
+
maxRuntimeSec: number().int().positive(),
|
|
43094
|
+
idempotencyKey: string().min(8).max(80)
|
|
43095
|
+
}), discriminatedUnion("kind", [object({
|
|
43096
|
+
kind: literal("started"),
|
|
43097
|
+
batchId: string(),
|
|
43098
|
+
jobs: array(TrainingJobSchema).min(1).readonly()
|
|
43099
|
+
}), object({
|
|
43100
|
+
kind: literal("refused"),
|
|
43101
|
+
reason: TrainingRefusalReasonSchema,
|
|
43102
|
+
detail: string()
|
|
43103
|
+
})]), {
|
|
43104
|
+
kind: "mutation",
|
|
43105
|
+
auth: "admin",
|
|
43106
|
+
timeoutMs: 12e4
|
|
43107
|
+
}), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
|
|
43108
|
+
kind: "mutation",
|
|
43109
|
+
auth: "admin",
|
|
43110
|
+
timeoutMs: 12e4
|
|
43111
|
+
}), method(IdInput, TrainingResultSchema.nullable(), { auth: "admin" }), method(IdInput.extend({ canaryDeviceIds: array(number().int()).readonly() }), TrainingJobSchema, {
|
|
43112
|
+
kind: "mutation",
|
|
43113
|
+
auth: "admin",
|
|
43114
|
+
timeoutMs: 30 * 6e4
|
|
43115
|
+
}), method(IdInput.extend({ deviceIds: array(number().int()).min(1).readonly() }), TrainingJobSchema, {
|
|
43116
|
+
kind: "mutation",
|
|
43117
|
+
auth: "admin",
|
|
43118
|
+
timeoutMs: 12e4
|
|
43119
|
+
}), method(IdInput, TrainingJobSchema, {
|
|
43120
|
+
kind: "mutation",
|
|
43121
|
+
auth: "admin",
|
|
43122
|
+
timeoutMs: 12e4
|
|
43123
|
+
}), method(IdInput, TrainingJobSchema, {
|
|
43124
|
+
kind: "mutation",
|
|
43125
|
+
auth: "admin"
|
|
43126
|
+
});
|
|
41486
43127
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
41487
43128
|
Object.freeze({
|
|
41488
43129
|
person: .5,
|
|
@@ -43631,6 +45272,12 @@ Object.freeze({
|
|
|
43631
45272
|
addonId: null,
|
|
43632
45273
|
access: "create"
|
|
43633
45274
|
},
|
|
45275
|
+
"backup.checkBackupKey": {
|
|
45276
|
+
capName: "backup",
|
|
45277
|
+
capScope: "system",
|
|
45278
|
+
addonId: null,
|
|
45279
|
+
access: "create"
|
|
45280
|
+
},
|
|
43634
45281
|
"backup.delete": {
|
|
43635
45282
|
capName: "backup",
|
|
43636
45283
|
capScope: "system",
|
|
@@ -43643,6 +45290,18 @@ Object.freeze({
|
|
|
43643
45290
|
addonId: null,
|
|
43644
45291
|
access: "delete"
|
|
43645
45292
|
},
|
|
45293
|
+
"backup.disableEncryption": {
|
|
45294
|
+
capName: "backup",
|
|
45295
|
+
capScope: "system",
|
|
45296
|
+
addonId: null,
|
|
45297
|
+
access: "create"
|
|
45298
|
+
},
|
|
45299
|
+
"backup.getEncryption": {
|
|
45300
|
+
capName: "backup",
|
|
45301
|
+
capScope: "system",
|
|
45302
|
+
addonId: null,
|
|
45303
|
+
access: "view"
|
|
45304
|
+
},
|
|
43646
45305
|
"backup.getEntries": {
|
|
43647
45306
|
capName: "backup",
|
|
43648
45307
|
capScope: "system",
|
|
@@ -43697,6 +45356,12 @@ Object.freeze({
|
|
|
43697
45356
|
addonId: null,
|
|
43698
45357
|
access: "create"
|
|
43699
45358
|
},
|
|
45359
|
+
"backup.setupEncryption": {
|
|
45360
|
+
capName: "backup",
|
|
45361
|
+
capScope: "system",
|
|
45362
|
+
addonId: null,
|
|
45363
|
+
access: "create"
|
|
45364
|
+
},
|
|
43700
45365
|
"backup.trigger": {
|
|
43701
45366
|
capName: "backup",
|
|
43702
45367
|
capScope: "system",
|
|
@@ -44249,6 +45914,12 @@ Object.freeze({
|
|
|
44249
45914
|
addonId: null,
|
|
44250
45915
|
access: "create"
|
|
44251
45916
|
},
|
|
45917
|
+
"customModelRegistry.importModelBundle": {
|
|
45918
|
+
capName: "custom-model-registry",
|
|
45919
|
+
capScope: "system",
|
|
45920
|
+
addonId: null,
|
|
45921
|
+
access: "create"
|
|
45922
|
+
},
|
|
44252
45923
|
"customModelRegistry.listModels": {
|
|
44253
45924
|
capName: "custom-model-registry",
|
|
44254
45925
|
capScope: "system",
|
|
@@ -45689,6 +47360,12 @@ Object.freeze({
|
|
|
45689
47360
|
addonId: null,
|
|
45690
47361
|
access: "view"
|
|
45691
47362
|
},
|
|
47363
|
+
"keychainAdmin.acknowledgeReset": {
|
|
47364
|
+
capName: "keychain-admin",
|
|
47365
|
+
capScope: "system",
|
|
47366
|
+
addonId: null,
|
|
47367
|
+
access: "create"
|
|
47368
|
+
},
|
|
45692
47369
|
"keychainAdmin.deleteOrphans": {
|
|
45693
47370
|
capName: "keychain-admin",
|
|
45694
47371
|
capScope: "system",
|
|
@@ -45725,6 +47402,12 @@ Object.freeze({
|
|
|
45725
47402
|
addonId: null,
|
|
45726
47403
|
access: "delete"
|
|
45727
47404
|
},
|
|
47405
|
+
"keychainAdmin.resetReport": {
|
|
47406
|
+
capName: "keychain-admin",
|
|
47407
|
+
capScope: "system",
|
|
47408
|
+
addonId: null,
|
|
47409
|
+
access: "delete"
|
|
47410
|
+
},
|
|
45728
47411
|
"keychainAdmin.reveal": {
|
|
45729
47412
|
capName: "keychain-admin",
|
|
45730
47413
|
capScope: "system",
|
|
@@ -45737,6 +47420,12 @@ Object.freeze({
|
|
|
45737
47420
|
addonId: null,
|
|
45738
47421
|
access: "create"
|
|
45739
47422
|
},
|
|
47423
|
+
"keychainAdmin.setSystemSecret": {
|
|
47424
|
+
capName: "keychain-admin",
|
|
47425
|
+
capScope: "system",
|
|
47426
|
+
addonId: null,
|
|
47427
|
+
access: "create"
|
|
47428
|
+
},
|
|
45740
47429
|
"keychainAdmin.status": {
|
|
45741
47430
|
capName: "keychain-admin",
|
|
45742
47431
|
capScope: "system",
|
|
@@ -46973,6 +48662,36 @@ Object.freeze({
|
|
|
46973
48662
|
addonId: null,
|
|
46974
48663
|
access: "view"
|
|
46975
48664
|
},
|
|
48665
|
+
"oidcConnections.connectionFormSchema": {
|
|
48666
|
+
capName: "oidc-connections",
|
|
48667
|
+
capScope: "system",
|
|
48668
|
+
addonId: null,
|
|
48669
|
+
access: "view"
|
|
48670
|
+
},
|
|
48671
|
+
"oidcConnections.createConnection": {
|
|
48672
|
+
capName: "oidc-connections",
|
|
48673
|
+
capScope: "system",
|
|
48674
|
+
addonId: null,
|
|
48675
|
+
access: "create"
|
|
48676
|
+
},
|
|
48677
|
+
"oidcConnections.deleteConnection": {
|
|
48678
|
+
capName: "oidc-connections",
|
|
48679
|
+
capScope: "system",
|
|
48680
|
+
addonId: null,
|
|
48681
|
+
access: "delete"
|
|
48682
|
+
},
|
|
48683
|
+
"oidcConnections.listConnections": {
|
|
48684
|
+
capName: "oidc-connections",
|
|
48685
|
+
capScope: "system",
|
|
48686
|
+
addonId: null,
|
|
48687
|
+
access: "view"
|
|
48688
|
+
},
|
|
48689
|
+
"oidcConnections.updateConnection": {
|
|
48690
|
+
capName: "oidc-connections",
|
|
48691
|
+
capScope: "system",
|
|
48692
|
+
addonId: null,
|
|
48693
|
+
access: "create"
|
|
48694
|
+
},
|
|
46976
48695
|
"osd.getStatus": {
|
|
46977
48696
|
capName: "osd",
|
|
46978
48697
|
capScope: "device",
|
|
@@ -47045,6 +48764,12 @@ Object.freeze({
|
|
|
47045
48764
|
addonId: null,
|
|
47046
48765
|
access: "create"
|
|
47047
48766
|
},
|
|
48767
|
+
"osdManager.setSlotCameraEnabled": {
|
|
48768
|
+
capName: "osd-manager",
|
|
48769
|
+
capScope: "system",
|
|
48770
|
+
addonId: null,
|
|
48771
|
+
access: "create"
|
|
48772
|
+
},
|
|
47048
48773
|
"osdManager.upsertTemplate": {
|
|
47049
48774
|
capName: "osd-manager",
|
|
47050
48775
|
capScope: "system",
|
|
@@ -47297,6 +49022,12 @@ Object.freeze({
|
|
|
47297
49022
|
addonId: null,
|
|
47298
49023
|
access: "view"
|
|
47299
49024
|
},
|
|
49025
|
+
"pipelineAnalytics.getRetrainCorpusKpi": {
|
|
49026
|
+
capName: "pipeline-analytics",
|
|
49027
|
+
capScope: "device",
|
|
49028
|
+
addonId: null,
|
|
49029
|
+
access: "view"
|
|
49030
|
+
},
|
|
47300
49031
|
"pipelineAnalytics.getRetrainExportUrl": {
|
|
47301
49032
|
capName: "pipeline-analytics",
|
|
47302
49033
|
capScope: "device",
|
|
@@ -47417,6 +49148,12 @@ Object.freeze({
|
|
|
47417
49148
|
addonId: null,
|
|
47418
49149
|
access: "view"
|
|
47419
49150
|
},
|
|
49151
|
+
"pipelineAnalytics.listRetrainCorpusPage": {
|
|
49152
|
+
capName: "pipeline-analytics",
|
|
49153
|
+
capScope: "device",
|
|
49154
|
+
addonId: null,
|
|
49155
|
+
access: "view"
|
|
49156
|
+
},
|
|
47420
49157
|
"pipelineAnalytics.listRetrainFrames": {
|
|
47421
49158
|
capName: "pipeline-analytics",
|
|
47422
49159
|
capScope: "device",
|
|
@@ -47447,6 +49184,12 @@ Object.freeze({
|
|
|
47447
49184
|
addonId: null,
|
|
47448
49185
|
access: "view"
|
|
47449
49186
|
},
|
|
49187
|
+
"pipelineAnalytics.offerRetrainArchive": {
|
|
49188
|
+
capName: "pipeline-analytics",
|
|
49189
|
+
capScope: "device",
|
|
49190
|
+
addonId: null,
|
|
49191
|
+
access: "create"
|
|
49192
|
+
},
|
|
47450
49193
|
"pipelineAnalytics.ownersWithMedia": {
|
|
47451
49194
|
capName: "pipeline-analytics",
|
|
47452
49195
|
capScope: "device",
|
|
@@ -47537,6 +49280,12 @@ Object.freeze({
|
|
|
47537
49280
|
addonId: null,
|
|
47538
49281
|
access: "create"
|
|
47539
49282
|
},
|
|
49283
|
+
"pipelineAnalytics.resolveRetrainTrainingCorpus": {
|
|
49284
|
+
capName: "pipeline-analytics",
|
|
49285
|
+
capScope: "device",
|
|
49286
|
+
addonId: null,
|
|
49287
|
+
access: "view"
|
|
49288
|
+
},
|
|
47540
49289
|
"pipelineAnalytics.restageRetrainTrack": {
|
|
47541
49290
|
capName: "pipeline-analytics",
|
|
47542
49291
|
capScope: "device",
|
|
@@ -49973,6 +51722,180 @@ Object.freeze({
|
|
|
49973
51722
|
addonId: null,
|
|
49974
51723
|
access: "view"
|
|
49975
51724
|
},
|
|
51725
|
+
"training.canaryResult": {
|
|
51726
|
+
capName: "training",
|
|
51727
|
+
capScope: "system",
|
|
51728
|
+
addonId: null,
|
|
51729
|
+
access: "create"
|
|
51730
|
+
},
|
|
51731
|
+
"training.cancelJob": {
|
|
51732
|
+
capName: "training",
|
|
51733
|
+
capScope: "system",
|
|
51734
|
+
addonId: null,
|
|
51735
|
+
access: "create"
|
|
51736
|
+
},
|
|
51737
|
+
"training.discardResult": {
|
|
51738
|
+
capName: "training",
|
|
51739
|
+
capScope: "system",
|
|
51740
|
+
addonId: null,
|
|
51741
|
+
access: "create"
|
|
51742
|
+
},
|
|
51743
|
+
"training.getJob": {
|
|
51744
|
+
capName: "training",
|
|
51745
|
+
capScope: "system",
|
|
51746
|
+
addonId: null,
|
|
51747
|
+
access: "view"
|
|
51748
|
+
},
|
|
51749
|
+
"training.getJobResult": {
|
|
51750
|
+
capName: "training",
|
|
51751
|
+
capScope: "system",
|
|
51752
|
+
addonId: null,
|
|
51753
|
+
access: "view"
|
|
51754
|
+
},
|
|
51755
|
+
"training.listBaseModels": {
|
|
51756
|
+
capName: "training",
|
|
51757
|
+
capScope: "system",
|
|
51758
|
+
addonId: null,
|
|
51759
|
+
access: "view"
|
|
51760
|
+
},
|
|
51761
|
+
"training.listJobs": {
|
|
51762
|
+
capName: "training",
|
|
51763
|
+
capScope: "system",
|
|
51764
|
+
addonId: null,
|
|
51765
|
+
access: "view"
|
|
51766
|
+
},
|
|
51767
|
+
"training.planJob": {
|
|
51768
|
+
capName: "training",
|
|
51769
|
+
capScope: "system",
|
|
51770
|
+
addonId: null,
|
|
51771
|
+
access: "view"
|
|
51772
|
+
},
|
|
51773
|
+
"training.registerResult": {
|
|
51774
|
+
capName: "training",
|
|
51775
|
+
capScope: "system",
|
|
51776
|
+
addonId: null,
|
|
51777
|
+
access: "create"
|
|
51778
|
+
},
|
|
51779
|
+
"training.rollbackCanary": {
|
|
51780
|
+
capName: "training",
|
|
51781
|
+
capScope: "system",
|
|
51782
|
+
addonId: null,
|
|
51783
|
+
access: "create"
|
|
51784
|
+
},
|
|
51785
|
+
"training.startJob": {
|
|
51786
|
+
capName: "training",
|
|
51787
|
+
capScope: "system",
|
|
51788
|
+
addonId: null,
|
|
51789
|
+
access: "create"
|
|
51790
|
+
},
|
|
51791
|
+
"training.startJobBatch": {
|
|
51792
|
+
capName: "training",
|
|
51793
|
+
capScope: "system",
|
|
51794
|
+
addonId: null,
|
|
51795
|
+
access: "create"
|
|
51796
|
+
},
|
|
51797
|
+
"trainingProvider.cancelJob": {
|
|
51798
|
+
capName: "training-provider",
|
|
51799
|
+
capScope: "system",
|
|
51800
|
+
addonId: null,
|
|
51801
|
+
access: "create"
|
|
51802
|
+
},
|
|
51803
|
+
"trainingProvider.cleanupJob": {
|
|
51804
|
+
capName: "training-provider",
|
|
51805
|
+
capScope: "system",
|
|
51806
|
+
addonId: null,
|
|
51807
|
+
access: "create"
|
|
51808
|
+
},
|
|
51809
|
+
"trainingProvider.createEntry": {
|
|
51810
|
+
capName: "training-provider",
|
|
51811
|
+
capScope: "system",
|
|
51812
|
+
addonId: null,
|
|
51813
|
+
access: "create"
|
|
51814
|
+
},
|
|
51815
|
+
"trainingProvider.deleteEntry": {
|
|
51816
|
+
capName: "training-provider",
|
|
51817
|
+
capScope: "system",
|
|
51818
|
+
addonId: null,
|
|
51819
|
+
access: "delete"
|
|
51820
|
+
},
|
|
51821
|
+
"trainingProvider.describe": {
|
|
51822
|
+
capName: "training-provider",
|
|
51823
|
+
capScope: "system",
|
|
51824
|
+
addonId: null,
|
|
51825
|
+
access: "view"
|
|
51826
|
+
},
|
|
51827
|
+
"trainingProvider.describeTypes": {
|
|
51828
|
+
capName: "training-provider",
|
|
51829
|
+
capScope: "system",
|
|
51830
|
+
addonId: null,
|
|
51831
|
+
access: "view"
|
|
51832
|
+
},
|
|
51833
|
+
"trainingProvider.estimateJob": {
|
|
51834
|
+
capName: "training-provider",
|
|
51835
|
+
capScope: "system",
|
|
51836
|
+
addonId: null,
|
|
51837
|
+
access: "view"
|
|
51838
|
+
},
|
|
51839
|
+
"trainingProvider.getJob": {
|
|
51840
|
+
capName: "training-provider",
|
|
51841
|
+
capScope: "system",
|
|
51842
|
+
addonId: null,
|
|
51843
|
+
access: "view"
|
|
51844
|
+
},
|
|
51845
|
+
"trainingProvider.listEntries": {
|
|
51846
|
+
capName: "training-provider",
|
|
51847
|
+
capScope: "system",
|
|
51848
|
+
addonId: null,
|
|
51849
|
+
access: "view"
|
|
51850
|
+
},
|
|
51851
|
+
"trainingProvider.listJobEvents": {
|
|
51852
|
+
capName: "training-provider",
|
|
51853
|
+
capScope: "system",
|
|
51854
|
+
addonId: null,
|
|
51855
|
+
access: "view"
|
|
51856
|
+
},
|
|
51857
|
+
"trainingProvider.listJobs": {
|
|
51858
|
+
capName: "training-provider",
|
|
51859
|
+
capScope: "system",
|
|
51860
|
+
addonId: null,
|
|
51861
|
+
access: "view"
|
|
51862
|
+
},
|
|
51863
|
+
"trainingProvider.offerArtifact": {
|
|
51864
|
+
capName: "training-provider",
|
|
51865
|
+
capScope: "system",
|
|
51866
|
+
addonId: null,
|
|
51867
|
+
access: "create"
|
|
51868
|
+
},
|
|
51869
|
+
"trainingProvider.readResult": {
|
|
51870
|
+
capName: "training-provider",
|
|
51871
|
+
capScope: "system",
|
|
51872
|
+
addonId: null,
|
|
51873
|
+
access: "create"
|
|
51874
|
+
},
|
|
51875
|
+
"trainingProvider.submitJob": {
|
|
51876
|
+
capName: "training-provider",
|
|
51877
|
+
capScope: "system",
|
|
51878
|
+
addonId: null,
|
|
51879
|
+
access: "create"
|
|
51880
|
+
},
|
|
51881
|
+
"trainingProvider.updateEntry": {
|
|
51882
|
+
capName: "training-provider",
|
|
51883
|
+
capScope: "system",
|
|
51884
|
+
addonId: null,
|
|
51885
|
+
access: "create"
|
|
51886
|
+
},
|
|
51887
|
+
"trainingProvider.uploadDataset": {
|
|
51888
|
+
capName: "training-provider",
|
|
51889
|
+
capScope: "system",
|
|
51890
|
+
addonId: null,
|
|
51891
|
+
access: "create"
|
|
51892
|
+
},
|
|
51893
|
+
"trainingProvider.validateCredentials": {
|
|
51894
|
+
capName: "training-provider",
|
|
51895
|
+
capScope: "system",
|
|
51896
|
+
addonId: null,
|
|
51897
|
+
access: "create"
|
|
51898
|
+
},
|
|
49976
51899
|
"turnProvider.getTurnServers": {
|
|
49977
51900
|
capName: "turn-provider",
|
|
49978
51901
|
capScope: "system",
|
|
@@ -49997,12 +51920,6 @@ Object.freeze({
|
|
|
49997
51920
|
addonId: null,
|
|
49998
51921
|
access: "create"
|
|
49999
51922
|
},
|
|
50000
|
-
"userManagement.createApiKey": {
|
|
50001
|
-
capName: "user-management",
|
|
50002
|
-
capScope: "system",
|
|
50003
|
-
addonId: null,
|
|
50004
|
-
access: "create"
|
|
50005
|
-
},
|
|
50006
51923
|
"userManagement.createScopedToken": {
|
|
50007
51924
|
capName: "user-management",
|
|
50008
51925
|
capScope: "system",
|
|
@@ -50039,12 +51956,6 @@ Object.freeze({
|
|
|
50039
51956
|
addonId: null,
|
|
50040
51957
|
access: "view"
|
|
50041
51958
|
},
|
|
50042
|
-
"userManagement.linkExternalIdentity": {
|
|
50043
|
-
capName: "user-management",
|
|
50044
|
-
capScope: "system",
|
|
50045
|
-
addonId: null,
|
|
50046
|
-
access: "create"
|
|
50047
|
-
},
|
|
50048
51959
|
"userManagement.listApiKeys": {
|
|
50049
51960
|
capName: "user-management",
|
|
50050
51961
|
capScope: "system",
|
|
@@ -50147,12 +52058,6 @@ Object.freeze({
|
|
|
50147
52058
|
addonId: null,
|
|
50148
52059
|
access: "create"
|
|
50149
52060
|
},
|
|
50150
|
-
"userManagement.validateApiKey": {
|
|
50151
|
-
capName: "user-management",
|
|
50152
|
-
capScope: "system",
|
|
50153
|
-
addonId: null,
|
|
50154
|
-
access: "view"
|
|
50155
|
-
},
|
|
50156
52061
|
"userManagement.validateCredentials": {
|
|
50157
52062
|
capName: "user-management",
|
|
50158
52063
|
capScope: "system",
|
|
@@ -53185,6 +55090,11 @@ Object.freeze({
|
|
|
53185
55090
|
form: "single",
|
|
53186
55091
|
optional: false
|
|
53187
55092
|
}],
|
|
55093
|
+
"osdManager.setSlotCameraEnabled": [{
|
|
55094
|
+
name: "deviceId",
|
|
55095
|
+
form: "single",
|
|
55096
|
+
optional: false
|
|
55097
|
+
}],
|
|
53188
55098
|
"petFeeder.callPet": [{
|
|
53189
55099
|
name: "deviceId",
|
|
53190
55100
|
form: "single",
|
|
@@ -53405,6 +55315,11 @@ Object.freeze({
|
|
|
53405
55315
|
form: "array",
|
|
53406
55316
|
optional: false
|
|
53407
55317
|
}],
|
|
55318
|
+
"pipelineAnalytics.listRetrainCorpusPage": [{
|
|
55319
|
+
name: "deviceIds",
|
|
55320
|
+
form: "array",
|
|
55321
|
+
optional: true
|
|
55322
|
+
}],
|
|
53408
55323
|
"pipelineAnalytics.listRetrainStaging": [{
|
|
53409
55324
|
name: "deviceIds",
|
|
53410
55325
|
form: "array",
|
|
@@ -54266,6 +56181,11 @@ Object.freeze({
|
|
|
54266
56181
|
form: "single",
|
|
54267
56182
|
optional: false
|
|
54268
56183
|
}],
|
|
56184
|
+
"training.canaryResult": [{
|
|
56185
|
+
name: "deviceIds",
|
|
56186
|
+
form: "array",
|
|
56187
|
+
optional: false
|
|
56188
|
+
}],
|
|
54269
56189
|
"update.getStatus": [{
|
|
54270
56190
|
name: "deviceId",
|
|
54271
56191
|
form: "single",
|
|
@@ -54509,6 +56429,7 @@ Object.freeze({
|
|
|
54509
56429
|
});
|
|
54510
56430
|
Object.freeze({
|
|
54511
56431
|
"broker": "broker",
|
|
56432
|
+
"calendar-source": "calendar",
|
|
54512
56433
|
"device-export": "device-export",
|
|
54513
56434
|
"llm": "ai",
|
|
54514
56435
|
"mesh-network": "mesh",
|
|
@@ -54994,6 +56915,8 @@ var STATE_SUMMARY_VARS = [
|
|
|
54994
56915
|
[...RULE_TEXT],
|
|
54995
56916
|
[...RULE_TEXT],
|
|
54996
56917
|
[...RULE_TEXT],
|
|
56918
|
+
[...RULE_TEXT],
|
|
56919
|
+
[...RULE_TEXT],
|
|
54997
56920
|
([...RULE_TEXT], [...UPDATES]),
|
|
54998
56921
|
([...RULE_TEXT], [...PACKAGE_UPDATES]),
|
|
54999
56922
|
([...RULE_TEXT], [...PACKAGE_UPDATES]),
|