@camstack/addon-provider-wyze 0.2.134 → 0.2.136
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 +1985 -210
- package/dist/addon.mjs +1985 -210
- package/package.json +1 -1
package/dist/addon.mjs
CHANGED
|
@@ -5388,7 +5388,7 @@ var ZodIssueCode = {
|
|
|
5388
5388
|
var ZodFirstPartyTypeKind;
|
|
5389
5389
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5390
5390
|
//#endregion
|
|
5391
|
-
//#region ../types/dist/sleep-
|
|
5391
|
+
//#region ../types/dist/sleep-DwAQ9sqX.mjs
|
|
5392
5392
|
/**
|
|
5393
5393
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5394
5394
|
* window to float samples (D455).
|
|
@@ -5505,7 +5505,7 @@ function isKeychainStoredField(field) {
|
|
|
5505
5505
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5506
5506
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5507
5507
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5508
|
-
function isRecord$
|
|
5508
|
+
function isRecord$2(value) {
|
|
5509
5509
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5510
5510
|
}
|
|
5511
5511
|
function makeSecretMarker(ref) {
|
|
@@ -5516,12 +5516,12 @@ function makeSecretMarker(ref) {
|
|
|
5516
5516
|
}
|
|
5517
5517
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5518
5518
|
function isSecretMarker(value) {
|
|
5519
|
-
if (!isRecord$
|
|
5519
|
+
if (!isRecord$2(value)) return false;
|
|
5520
5520
|
const ref = value["$secret"];
|
|
5521
5521
|
return typeof ref === "string" && ref.length > 0;
|
|
5522
5522
|
}
|
|
5523
5523
|
function isSecretClear(value) {
|
|
5524
|
-
return isRecord$
|
|
5524
|
+
return isRecord$2(value) && value["$secretClear"] === true;
|
|
5525
5525
|
}
|
|
5526
5526
|
/**
|
|
5527
5527
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6037,6 +6037,13 @@ function globalSecretScope() {
|
|
|
6037
6037
|
function encodeSegment(value) {
|
|
6038
6038
|
return encodeURIComponent(value);
|
|
6039
6039
|
}
|
|
6040
|
+
function decodeSegment(value) {
|
|
6041
|
+
try {
|
|
6042
|
+
return decodeURIComponent(value);
|
|
6043
|
+
} catch {
|
|
6044
|
+
return null;
|
|
6045
|
+
}
|
|
6046
|
+
}
|
|
6040
6047
|
/**
|
|
6041
6048
|
* The field path of a value inside an array item, addressed by the item's id:
|
|
6042
6049
|
* `arrayItemFieldPath('providers', 'authentik', 'clientSecret')` →
|
|
@@ -6045,6 +6052,75 @@ function encodeSegment(value) {
|
|
|
6045
6052
|
function arrayItemFieldPath(arrayKey, itemId, fieldKey) {
|
|
6046
6053
|
return `${arrayKey}[${encodeSegment(itemId)}].${fieldKey}`;
|
|
6047
6054
|
}
|
|
6055
|
+
function parseScope(segments) {
|
|
6056
|
+
switch (segments[0]) {
|
|
6057
|
+
case "global": return {
|
|
6058
|
+
scope: GLOBAL_SCOPE,
|
|
6059
|
+
used: 1
|
|
6060
|
+
};
|
|
6061
|
+
case "node": {
|
|
6062
|
+
const nodeId = segments[1] !== void 0 ? decodeSegment(segments[1]) : null;
|
|
6063
|
+
return nodeId === null || nodeId.length === 0 ? null : {
|
|
6064
|
+
scope: {
|
|
6065
|
+
kind: "node",
|
|
6066
|
+
nodeId
|
|
6067
|
+
},
|
|
6068
|
+
used: 2
|
|
6069
|
+
};
|
|
6070
|
+
}
|
|
6071
|
+
case "device": {
|
|
6072
|
+
const raw = segments[1];
|
|
6073
|
+
if (raw === void 0 || !/^\d+$/.test(raw)) return null;
|
|
6074
|
+
return {
|
|
6075
|
+
scope: {
|
|
6076
|
+
kind: "device",
|
|
6077
|
+
deviceId: Number(raw)
|
|
6078
|
+
},
|
|
6079
|
+
used: 2
|
|
6080
|
+
};
|
|
6081
|
+
}
|
|
6082
|
+
case "integration": {
|
|
6083
|
+
const id = segments[1] !== void 0 ? decodeSegment(segments[1]) : null;
|
|
6084
|
+
return id === null || id.length === 0 ? null : {
|
|
6085
|
+
scope: {
|
|
6086
|
+
kind: "integration",
|
|
6087
|
+
integrationId: id
|
|
6088
|
+
},
|
|
6089
|
+
used: 2
|
|
6090
|
+
};
|
|
6091
|
+
}
|
|
6092
|
+
case "row": {
|
|
6093
|
+
const collection = segments[1] !== void 0 ? decodeSegment(segments[1]) : null;
|
|
6094
|
+
const rowId = segments[2] !== void 0 ? decodeSegment(segments[2]) : null;
|
|
6095
|
+
if (collection === null || rowId === null || collection.length === 0 || rowId.length === 0) return null;
|
|
6096
|
+
return {
|
|
6097
|
+
scope: {
|
|
6098
|
+
kind: "row",
|
|
6099
|
+
collection,
|
|
6100
|
+
rowId
|
|
6101
|
+
},
|
|
6102
|
+
used: 3
|
|
6103
|
+
};
|
|
6104
|
+
}
|
|
6105
|
+
default: return null;
|
|
6106
|
+
}
|
|
6107
|
+
}
|
|
6108
|
+
/** Take a ref apart; `null` when it is not a well-formed ref. */
|
|
6109
|
+
function parseSecretRef(ref) {
|
|
6110
|
+
if (!ref.startsWith("secret://")) return null;
|
|
6111
|
+
const segments = ref.slice(9).split("/");
|
|
6112
|
+
const owner = segments[0] !== void 0 ? decodeSegment(segments[0]) : null;
|
|
6113
|
+
if (owner === null || owner.length === 0) return null;
|
|
6114
|
+
const parsed = parseScope(segments.slice(1));
|
|
6115
|
+
if (parsed === null) return null;
|
|
6116
|
+
const fieldPath = segments.slice(1 + parsed.used).join("/");
|
|
6117
|
+
if (fieldPath.length === 0) return null;
|
|
6118
|
+
return {
|
|
6119
|
+
owner,
|
|
6120
|
+
scope: parsed.scope,
|
|
6121
|
+
fieldPath
|
|
6122
|
+
};
|
|
6123
|
+
}
|
|
6048
6124
|
/** A write to a secret path could not be stored in the keychain, so it was refused. */
|
|
6049
6125
|
var KeychainWriteRefusedError = class extends Error {
|
|
6050
6126
|
fieldPath;
|
|
@@ -6055,7 +6131,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6055
6131
|
}
|
|
6056
6132
|
};
|
|
6057
6133
|
var KEEP = { kind: "keep" };
|
|
6058
|
-
function isRecord(value) {
|
|
6134
|
+
function isRecord$1(value) {
|
|
6059
6135
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6060
6136
|
}
|
|
6061
6137
|
function defaultMintId() {
|
|
@@ -6068,7 +6144,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6068
6144
|
return out;
|
|
6069
6145
|
}
|
|
6070
6146
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6071
|
-
else if (isRecord(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6147
|
+
else if (isRecord$1(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6072
6148
|
return out;
|
|
6073
6149
|
}
|
|
6074
6150
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6123,7 +6199,7 @@ function rowId(row, idKey) {
|
|
|
6123
6199
|
return null;
|
|
6124
6200
|
}
|
|
6125
6201
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6126
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord) : [];
|
|
6202
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$1) : [];
|
|
6127
6203
|
if (!Array.isArray(incoming)) {
|
|
6128
6204
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6129
6205
|
return {
|
|
@@ -6139,7 +6215,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6139
6215
|
const kept = /* @__PURE__ */ new Set();
|
|
6140
6216
|
const rows = [];
|
|
6141
6217
|
for (const row of incoming) {
|
|
6142
|
-
if (!isRecord(row)) {
|
|
6218
|
+
if (!isRecord$1(row)) {
|
|
6143
6219
|
rows.push(row);
|
|
6144
6220
|
continue;
|
|
6145
6221
|
}
|
|
@@ -6164,7 +6240,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6164
6240
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6165
6241
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6166
6242
|
case "object": {
|
|
6167
|
-
if (!isRecord(incoming)) {
|
|
6243
|
+
if (!isRecord$1(incoming)) {
|
|
6168
6244
|
if (incoming === void 0) return KEEP;
|
|
6169
6245
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6170
6246
|
return {
|
|
@@ -6172,7 +6248,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6172
6248
|
value: incoming
|
|
6173
6249
|
};
|
|
6174
6250
|
}
|
|
6175
|
-
const storedObj = isRecord(stored) ? stored : {};
|
|
6251
|
+
const storedObj = isRecord$1(stored) ? stored : {};
|
|
6176
6252
|
return {
|
|
6177
6253
|
kind: "value",
|
|
6178
6254
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6231,12 +6307,19 @@ async function transformSecretWrite(input) {
|
|
|
6231
6307
|
}
|
|
6232
6308
|
};
|
|
6233
6309
|
}
|
|
6310
|
+
/** Is `ref` one of `owner`'s refs? */
|
|
6311
|
+
function isSecretRefOwnedBy(ref, owner) {
|
|
6312
|
+
return parseSecretRef(ref)?.owner === owner;
|
|
6313
|
+
}
|
|
6234
6314
|
/**
|
|
6235
6315
|
* Replace every marker in `value` with its keychain value. Returns the SAME
|
|
6236
6316
|
* reference when there is no marker (no allocation, no keychain call).
|
|
6237
6317
|
*/
|
|
6238
|
-
async function resolveSecretMarkers(value, secrets) {
|
|
6239
|
-
const
|
|
6318
|
+
async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
6319
|
+
const keepMarker = options.unresolved === "keep-marker";
|
|
6320
|
+
const owner = options.ownedBy;
|
|
6321
|
+
const inScope = (ref) => owner === void 0 || isSecretRefOwnedBy(ref, owner);
|
|
6322
|
+
const refs = collectSecretMarkerRefs(value).filter(inScope);
|
|
6240
6323
|
if (refs.length === 0) return {
|
|
6241
6324
|
value,
|
|
6242
6325
|
unresolved: []
|
|
@@ -6260,10 +6343,18 @@ async function resolveSecretMarkers(value, secrets) {
|
|
|
6260
6343
|
}
|
|
6261
6344
|
const substitute = (v) => {
|
|
6262
6345
|
if (isSecretMarker(v)) {
|
|
6346
|
+
if (!inScope(v.$secret)) return {
|
|
6347
|
+
keep: true,
|
|
6348
|
+
value: v
|
|
6349
|
+
};
|
|
6263
6350
|
const answer = answers[v.$secret];
|
|
6264
|
-
|
|
6351
|
+
if (answer?.kind === "value") return {
|
|
6265
6352
|
keep: true,
|
|
6266
6353
|
value: answer.value
|
|
6354
|
+
};
|
|
6355
|
+
return keepMarker ? {
|
|
6356
|
+
keep: true,
|
|
6357
|
+
value: v
|
|
6267
6358
|
} : {
|
|
6268
6359
|
keep: false,
|
|
6269
6360
|
value: void 0
|
|
@@ -6280,7 +6371,7 @@ async function resolveSecretMarkers(value, secrets) {
|
|
|
6280
6371
|
value: items
|
|
6281
6372
|
};
|
|
6282
6373
|
}
|
|
6283
|
-
if (isRecord(v)) {
|
|
6374
|
+
if (isRecord$1(v)) {
|
|
6284
6375
|
const out = {};
|
|
6285
6376
|
for (const [k, child] of Object.entries(v)) {
|
|
6286
6377
|
const s = substitute(child);
|
|
@@ -6301,14 +6392,152 @@ async function resolveSecretMarkers(value, secrets) {
|
|
|
6301
6392
|
unresolved
|
|
6302
6393
|
};
|
|
6303
6394
|
}
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6395
|
+
/** An addon tried to replace a stored secret it could not read. Nothing was written. */
|
|
6396
|
+
var SecretOverwriteRefusedError = class extends Error {
|
|
6397
|
+
ref;
|
|
6398
|
+
reason;
|
|
6399
|
+
constructor(ref, reason) {
|
|
6400
|
+
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.`);
|
|
6401
|
+
this.ref = ref;
|
|
6402
|
+
this.reason = reason;
|
|
6403
|
+
this.name = "SecretOverwriteRefusedError";
|
|
6404
|
+
}
|
|
6405
|
+
};
|
|
6406
|
+
function isRecord(value) {
|
|
6407
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6408
|
+
}
|
|
6409
|
+
function resolvedValue(pass, marker) {
|
|
6410
|
+
const answer = pass.answers[marker.$secret];
|
|
6411
|
+
return answer?.kind === "value" ? answer.value : null;
|
|
6412
|
+
}
|
|
6413
|
+
async function atMarker(pass, incoming, stored) {
|
|
6414
|
+
if (incoming === null) return stored;
|
|
6415
|
+
if (typeof incoming !== "string") return incoming;
|
|
6416
|
+
if (incoming === resolvedValue(pass, stored)) return stored;
|
|
6417
|
+
const intent = classifySecretWrite(incoming);
|
|
6418
|
+
if (intent.kind !== "set") return stored;
|
|
6419
|
+
const ref = stored.$secret;
|
|
6420
|
+
if (!isSecretRefOwnedBy(ref, pass.secrets.owner)) return incoming;
|
|
6421
|
+
const answer = pass.answers[ref];
|
|
6422
|
+
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);
|
|
6423
|
+
try {
|
|
6424
|
+
await pass.secrets.put(ref, intent.value);
|
|
6425
|
+
} catch (err) {
|
|
6426
|
+
throw new KeychainWriteRefusedError(ref, err);
|
|
6427
|
+
}
|
|
6428
|
+
pass.changedRefs.push(ref);
|
|
6429
|
+
return stored;
|
|
6430
|
+
}
|
|
6431
|
+
function inArray(pass, incoming, stored) {
|
|
6432
|
+
return incoming.map((item, index) => {
|
|
6433
|
+
const twin = stored[index];
|
|
6434
|
+
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6435
|
+
if (isRecord(item) && isRecord(twin)) return inArrayRow(pass, item, twin);
|
|
6436
|
+
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6437
|
+
return item;
|
|
6438
|
+
});
|
|
6439
|
+
}
|
|
6440
|
+
function inArrayRow(pass, incoming, stored) {
|
|
6441
|
+
const out = { ...incoming };
|
|
6442
|
+
for (const [key, value] of Object.entries(incoming)) {
|
|
6443
|
+
const twin = stored[key];
|
|
6444
|
+
if (isSecretMarker(twin)) {
|
|
6445
|
+
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6446
|
+
} else if (isRecord(value) && isRecord(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6447
|
+
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6448
|
+
}
|
|
6449
|
+
return out;
|
|
6450
|
+
}
|
|
6451
|
+
async function walk(pass, incoming, stored) {
|
|
6452
|
+
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6453
|
+
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6454
|
+
if (!isRecord(incoming) || !isRecord(stored)) return incoming;
|
|
6455
|
+
const out = { ...incoming };
|
|
6456
|
+
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6457
|
+
return out;
|
|
6458
|
+
}
|
|
6459
|
+
/** Restore markers a write-back carries as values. See the file doc. */
|
|
6460
|
+
async function restoreUnchangedSecrets(input) {
|
|
6461
|
+
const refs = [];
|
|
6462
|
+
for (const key of Object.keys(input.patch)) collectSecretMarkerRefs(input.stored[key], refs);
|
|
6463
|
+
const owned = refs.filter((ref) => isSecretRefOwnedBy(ref, input.secrets.owner));
|
|
6464
|
+
if (owned.length === 0) return {
|
|
6465
|
+
patch: input.patch,
|
|
6466
|
+
changedRefs: []
|
|
6467
|
+
};
|
|
6468
|
+
const pass = {
|
|
6469
|
+
secrets: input.secrets,
|
|
6470
|
+
answers: await input.secrets.resolve([...new Set(owned)]),
|
|
6471
|
+
operatorWrite: input.operatorWrite,
|
|
6472
|
+
changedRefs: []
|
|
6473
|
+
};
|
|
6474
|
+
const out = {};
|
|
6475
|
+
for (const [key, value] of Object.entries(input.patch)) out[key] = await walk(pass, value, input.stored[key]);
|
|
6476
|
+
return {
|
|
6477
|
+
patch: out,
|
|
6478
|
+
changedRefs: pass.changedRefs
|
|
6479
|
+
};
|
|
6480
|
+
}
|
|
6481
|
+
/** Structural equality over JSON-shaped values (key order does not matter). */
|
|
6482
|
+
function isJsonEqual(a, b) {
|
|
6483
|
+
if (Object.is(a, b)) return true;
|
|
6484
|
+
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6485
|
+
if (isRecord(a) && isRecord(b)) {
|
|
6486
|
+
const keys = Object.keys(a);
|
|
6487
|
+
if (keys.length !== Object.keys(b).length) return false;
|
|
6488
|
+
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
6309
6489
|
}
|
|
6310
6490
|
return false;
|
|
6311
6491
|
}
|
|
6492
|
+
/** The patch without the keys whose value already equals the stored one. */
|
|
6493
|
+
function dropUnchangedKeys(patch, stored) {
|
|
6494
|
+
const out = {};
|
|
6495
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
6496
|
+
if (Object.prototype.hasOwnProperty.call(stored, key) && isJsonEqual(value, stored[key])) continue;
|
|
6497
|
+
out[key] = value;
|
|
6498
|
+
}
|
|
6499
|
+
return out;
|
|
6500
|
+
}
|
|
6501
|
+
/** The top-level keys of a blob that hold at least one of `owner`'s markers. */
|
|
6502
|
+
function markerKeysOf(blob, owner) {
|
|
6503
|
+
const keys = /* @__PURE__ */ new Set();
|
|
6504
|
+
for (const [key, value] of Object.entries(blob)) if (collectSecretMarkerRefs(value).some((ref) => isSecretRefOwnedBy(ref, owner))) keys.add(key);
|
|
6505
|
+
return keys;
|
|
6506
|
+
}
|
|
6507
|
+
function nodeFromStored(value, owner) {
|
|
6508
|
+
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6509
|
+
if (!isRecord(value)) return null;
|
|
6510
|
+
const children = /* @__PURE__ */ new Map();
|
|
6511
|
+
for (const [key, child] of Object.entries(value)) {
|
|
6512
|
+
const node = nodeFromStored(child, owner);
|
|
6513
|
+
if (node !== null) children.set(key, node);
|
|
6514
|
+
}
|
|
6515
|
+
return children.size > 0 ? {
|
|
6516
|
+
kind: "object",
|
|
6517
|
+
children
|
|
6518
|
+
} : null;
|
|
6519
|
+
}
|
|
6520
|
+
/**
|
|
6521
|
+
* The declared secret tree, widened by every place the STORED blob holds a
|
|
6522
|
+
* marker under one of `keys` — so a marker the schema no longer declares (or
|
|
6523
|
+
* never declared: Wyze before b4906cec6) still gets the save path's
|
|
6524
|
+
* KEEP / SET / CLEAR semantics instead of being overwritten by whatever the
|
|
6525
|
+
* addon writes. Markers inside arrays are not added: a row has no id field to
|
|
6526
|
+
* match by unless the schema declares one. Only `owner`'s markers count: a
|
|
6527
|
+
* builtin that keeps another addon's marker (device-manager) never takes it
|
|
6528
|
+
* over.
|
|
6529
|
+
*/
|
|
6530
|
+
function widenTreeWithStoredMarkers(declared, stored, keys, owner) {
|
|
6531
|
+
const added = /* @__PURE__ */ new Map();
|
|
6532
|
+
for (const key of keys) {
|
|
6533
|
+
const at = key.indexOf("@");
|
|
6534
|
+
const base = at > 0 ? key.slice(0, at) : key;
|
|
6535
|
+
if (declared.has(base) || added.has(base)) continue;
|
|
6536
|
+
const node = nodeFromStored(stored[key], owner);
|
|
6537
|
+
if (node !== null) added.set(base, node);
|
|
6538
|
+
}
|
|
6539
|
+
return added.size === 0 ? declared : new Map([...declared, ...added]);
|
|
6540
|
+
}
|
|
6312
6541
|
/** The blob as stored now; a failed read REFUSES the write instead of guessing. */
|
|
6313
6542
|
async function readStoredAddonBlob(raw) {
|
|
6314
6543
|
const threeWay = raw.readAddonStoreResult;
|
|
@@ -6317,7 +6546,41 @@ async function readStoredAddonBlob(raw) {
|
|
|
6317
6546
|
if (result.kind === "failed") throw new Error(`settings write refused: the stored blob could not be read (${result.error})`);
|
|
6318
6547
|
return result.kind === "missing" ? {} : result.value;
|
|
6319
6548
|
}
|
|
6320
|
-
function
|
|
6549
|
+
function touchesTree(tree, patch) {
|
|
6550
|
+
if (tree.size === 0) return false;
|
|
6551
|
+
for (const key of Object.keys(patch)) {
|
|
6552
|
+
const at = key.indexOf("@");
|
|
6553
|
+
if (tree.has(at > 0 ? key.slice(0, at) : key)) return true;
|
|
6554
|
+
}
|
|
6555
|
+
return false;
|
|
6556
|
+
}
|
|
6557
|
+
/**
|
|
6558
|
+
* Which top-level keys of each store held markers when last seen. `undefined`
|
|
6559
|
+
* for a store not seen yet: its first write reads it, to be safe.
|
|
6560
|
+
*/
|
|
6561
|
+
var MarkerKeyIndex = class {
|
|
6562
|
+
owner;
|
|
6563
|
+
byStore = /* @__PURE__ */ new Map();
|
|
6564
|
+
constructor(owner) {
|
|
6565
|
+
this.owner = owner;
|
|
6566
|
+
}
|
|
6567
|
+
seen(store, blob) {
|
|
6568
|
+
this.byStore.set(store, markerKeysOf(blob, this.owner));
|
|
6569
|
+
}
|
|
6570
|
+
wrote(store, patch) {
|
|
6571
|
+
const keys = this.byStore.get(store);
|
|
6572
|
+
if (keys === void 0) return;
|
|
6573
|
+
const now = markerKeysOf(patch, this.owner);
|
|
6574
|
+
for (const key of Object.keys(patch)) if (now.has(key)) keys.add(key);
|
|
6575
|
+
else keys.delete(key);
|
|
6576
|
+
}
|
|
6577
|
+
mayHoldMarkers(store, patch) {
|
|
6578
|
+
const keys = this.byStore.get(store);
|
|
6579
|
+
if (keys === void 0) return true;
|
|
6580
|
+
return Object.keys(patch).some((key) => keys.has(key));
|
|
6581
|
+
}
|
|
6582
|
+
};
|
|
6583
|
+
function createHandle(raw, opts) {
|
|
6321
6584
|
const chains = /* @__PURE__ */ new Map();
|
|
6322
6585
|
const serialize = (key, fn) => {
|
|
6323
6586
|
const next = (chains.get(key) ?? Promise.resolve()).then(fn, fn);
|
|
@@ -6328,46 +6591,130 @@ function createSecretAwareSettings(raw, opts) {
|
|
|
6328
6591
|
});
|
|
6329
6592
|
return next;
|
|
6330
6593
|
};
|
|
6331
|
-
const
|
|
6332
|
-
|
|
6333
|
-
|
|
6594
|
+
const index = new MarkerKeyIndex(opts.secrets.owner);
|
|
6595
|
+
const resolveRead = async (store, blob) => {
|
|
6596
|
+
index.seen(store, blob);
|
|
6597
|
+
const { value, unresolved } = await resolveSecretMarkers(blob, opts.secrets, {
|
|
6598
|
+
unresolved: "keep-marker",
|
|
6599
|
+
ownedBy: opts.secrets.owner
|
|
6600
|
+
});
|
|
6601
|
+
if (unresolved.length > 0) opts.onUnresolved?.(unresolved);
|
|
6602
|
+
return value;
|
|
6603
|
+
};
|
|
6604
|
+
const write = async (store, declared, scope, patch, readStored, rawWrite) => {
|
|
6605
|
+
if (!touchesTree(declared, patch) && !index.mayHoldMarkers(store, patch)) {
|
|
6606
|
+
await rawWrite(patch);
|
|
6607
|
+
index.wrote(store, patch);
|
|
6608
|
+
return { changed: true };
|
|
6609
|
+
}
|
|
6610
|
+
return serialize(store, async () => {
|
|
6334
6611
|
const stored = await readStored();
|
|
6612
|
+
index.seen(store, stored);
|
|
6613
|
+
const operatorWrite = opts.isOperatorWrite?.() === true;
|
|
6614
|
+
const restored = await restoreUnchangedSecrets({
|
|
6615
|
+
patch,
|
|
6616
|
+
stored,
|
|
6617
|
+
secrets: opts.secrets,
|
|
6618
|
+
operatorWrite
|
|
6619
|
+
});
|
|
6335
6620
|
const result = await transformSecretWrite({
|
|
6336
|
-
tree,
|
|
6621
|
+
tree: widenTreeWithStoredMarkers(declared, stored, Object.keys(restored.patch), opts.secrets.owner),
|
|
6337
6622
|
secrets: opts.secrets,
|
|
6338
|
-
patch,
|
|
6623
|
+
patch: restored.patch,
|
|
6339
6624
|
stored,
|
|
6340
6625
|
...scope !== void 0 ? { scope } : {},
|
|
6341
|
-
operatorWrite
|
|
6626
|
+
operatorWrite
|
|
6342
6627
|
});
|
|
6343
|
-
|
|
6628
|
+
const effective = dropUnchangedKeys(result.patch, stored);
|
|
6629
|
+
const wroteBlob = Object.keys(effective).length > 0;
|
|
6630
|
+
if (wroteBlob) {
|
|
6631
|
+
await rawWrite(effective);
|
|
6632
|
+
index.wrote(store, effective);
|
|
6633
|
+
}
|
|
6344
6634
|
const { orphaned } = await result.afterWrite();
|
|
6345
6635
|
if (orphaned.length > 0) opts.onOrphaned(orphaned);
|
|
6636
|
+
return { changed: wroteBlob || restored.changedRefs.length > 0 };
|
|
6346
6637
|
});
|
|
6347
6638
|
};
|
|
6348
|
-
const
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6639
|
+
const writeAddon = (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p));
|
|
6640
|
+
const readAddonStoreResult = raw.readAddonStoreResult;
|
|
6641
|
+
const readAddonStoreKeyResult = raw.readAddonStoreKeyResult;
|
|
6642
|
+
const readDeviceStoreBatch = raw.readDeviceStoreBatch;
|
|
6643
|
+
const overrides = {
|
|
6644
|
+
readAddonStore: async () => resolveRead("addon", await raw.readAddonStore()),
|
|
6645
|
+
...readAddonStoreResult !== void 0 ? { readAddonStoreResult: async () => {
|
|
6646
|
+
const result = await readAddonStoreResult.call(raw);
|
|
6647
|
+
return result.kind === "value" ? {
|
|
6648
|
+
kind: "value",
|
|
6649
|
+
value: await resolveRead("addon", result.value)
|
|
6650
|
+
} : result;
|
|
6651
|
+
} } : {},
|
|
6652
|
+
...readAddonStoreKeyResult !== void 0 ? { readAddonStoreKeyResult: async (key) => {
|
|
6653
|
+
const result = await readAddonStoreKeyResult.call(raw, key);
|
|
6654
|
+
if (result.kind !== "present") return result;
|
|
6655
|
+
const { value, unresolved } = await resolveSecretMarkers({ [key]: result.value }, opts.secrets, {
|
|
6656
|
+
unresolved: "keep-marker",
|
|
6657
|
+
ownedBy: opts.secrets.owner
|
|
6658
|
+
});
|
|
6659
|
+
if (unresolved.length > 0) opts.onUnresolved?.(unresolved);
|
|
6660
|
+
return {
|
|
6661
|
+
kind: "present",
|
|
6662
|
+
value: value[key]
|
|
6663
|
+
};
|
|
6664
|
+
} } : {},
|
|
6665
|
+
readDeviceStore: async (deviceId) => resolveRead(`device:${deviceId}`, await raw.readDeviceStore(deviceId)),
|
|
6666
|
+
...readDeviceStoreBatch !== void 0 ? { readDeviceStoreBatch: async (deviceIds) => {
|
|
6667
|
+
const rows = await readDeviceStoreBatch.call(raw, deviceIds);
|
|
6668
|
+
const out = /* @__PURE__ */ new Map();
|
|
6669
|
+
for (const [deviceId, blob] of rows) out.set(deviceId, await resolveRead(`device:${deviceId}`, blob));
|
|
6670
|
+
return out;
|
|
6671
|
+
} } : {},
|
|
6672
|
+
writeAddonStore: async (patch) => {
|
|
6673
|
+
await writeAddon(patch);
|
|
6674
|
+
},
|
|
6675
|
+
writeDeviceStore: async (deviceId, patch) => {
|
|
6676
|
+
await write(`device:${deviceId}`, opts.deviceTree(), {
|
|
6677
|
+
kind: "device",
|
|
6678
|
+
deviceId
|
|
6679
|
+
}, patch, () => raw.readDeviceStore(deviceId), (p) => raw.writeDeviceStore(deviceId, p));
|
|
6680
|
+
}
|
|
6681
|
+
};
|
|
6682
|
+
return {
|
|
6683
|
+
settings: new Proxy(raw, { get(target, prop, receiver) {
|
|
6684
|
+
if (typeof prop === "string" && Object.prototype.hasOwnProperty.call(overrides, prop)) return Reflect.get(overrides, prop);
|
|
6685
|
+
const value = Reflect.get(target, prop, receiver);
|
|
6686
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
6687
|
+
} }),
|
|
6688
|
+
raw: {
|
|
6689
|
+
readAddonStore: async () => {
|
|
6690
|
+
const blob = await raw.readAddonStore();
|
|
6691
|
+
index.seen("addon", blob);
|
|
6692
|
+
return blob;
|
|
6693
|
+
},
|
|
6694
|
+
readDeviceStore: async (deviceId) => {
|
|
6695
|
+
const blob = await raw.readDeviceStore(deviceId);
|
|
6696
|
+
index.seen(`device:${deviceId}`, blob);
|
|
6697
|
+
return blob;
|
|
6698
|
+
}
|
|
6699
|
+
},
|
|
6700
|
+
writeAddonStore: writeAddon
|
|
6354
6701
|
};
|
|
6355
|
-
return new Proxy(raw, { get(target, prop, receiver) {
|
|
6356
|
-
if (prop === "writeAddonStore") return wrapped.writeAddonStore;
|
|
6357
|
-
if (prop === "writeDeviceStore") return wrapped.writeDeviceStore;
|
|
6358
|
-
const value = Reflect.get(target, prop, receiver);
|
|
6359
|
-
return typeof value === "function" ? value.bind(target) : value;
|
|
6360
|
-
} });
|
|
6361
6702
|
}
|
|
6362
|
-
/** The context the addon sees
|
|
6363
|
-
function
|
|
6703
|
+
/** The context the addon sees, plus the private raw view and write outcome. */
|
|
6704
|
+
function createSecretAwareContext(context, opts) {
|
|
6364
6705
|
const raw = context.settings;
|
|
6365
|
-
if (raw === void 0) return
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6706
|
+
if (raw === void 0) return {
|
|
6707
|
+
context,
|
|
6708
|
+
handle: null
|
|
6709
|
+
};
|
|
6710
|
+
const handle = createHandle(raw, opts);
|
|
6711
|
+
return {
|
|
6712
|
+
context: new Proxy(context, { get(target, prop, receiver) {
|
|
6713
|
+
if (prop === "settings") return handle.settings;
|
|
6714
|
+
return Reflect.get(target, prop, receiver);
|
|
6715
|
+
} }),
|
|
6716
|
+
handle
|
|
6717
|
+
};
|
|
6371
6718
|
}
|
|
6372
6719
|
var LEAF = { kind: "leaf" };
|
|
6373
6720
|
var DEFAULT_ITEM_ID_KEY = "id";
|
|
@@ -6542,6 +6889,14 @@ var BaseAddon = class {
|
|
|
6542
6889
|
_secretChangeUnsub = null;
|
|
6543
6890
|
/** >0 while an OPERATOR's settings write is being applied. */
|
|
6544
6891
|
_operatorWriteDepth = 0;
|
|
6892
|
+
/**
|
|
6893
|
+
* The keychain-aware settings handle (D798). Its `raw` view is the ONLY way
|
|
6894
|
+
* to the marker-bearing blobs and stays private to this class: the form
|
|
6895
|
+
* hydrate and config resolution need markers, addon code never does.
|
|
6896
|
+
*/
|
|
6897
|
+
_secretSettings = null;
|
|
6898
|
+
/** Refs an addon-facing read could not resolve — each is logged once per process. */
|
|
6899
|
+
_loggedUnresolvedReads = /* @__PURE__ */ new Set();
|
|
6545
6900
|
constructor(defaults) {
|
|
6546
6901
|
this.defaults = defaults;
|
|
6547
6902
|
this._config = { ...defaults };
|
|
@@ -6578,13 +6933,21 @@ var BaseAddon = class {
|
|
|
6578
6933
|
}
|
|
6579
6934
|
async initialize(context) {
|
|
6580
6935
|
const secrets = context.secrets;
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
|
|
6936
|
+
if (secrets !== void 0) {
|
|
6937
|
+
const { context: wrapped, handle } = createSecretAwareContext(context, {
|
|
6938
|
+
secrets,
|
|
6939
|
+
addonTree: () => this.addonSecretTree(),
|
|
6940
|
+
deviceTree: () => this.deviceSecretTree(),
|
|
6941
|
+
onOrphaned: (refs) => context.logger.warn("keychain refs dropped by a settings write could not be deleted", { meta: { refs: [...refs] } }),
|
|
6942
|
+
isOperatorWrite: () => this._operatorWriteDepth > 0,
|
|
6943
|
+
onUnresolved: (unresolved) => this.logUnresolvedRead(unresolved)
|
|
6944
|
+
});
|
|
6945
|
+
this._ctx = wrapped;
|
|
6946
|
+
this._secretSettings = handle;
|
|
6947
|
+
} else {
|
|
6948
|
+
this._ctx = context;
|
|
6949
|
+
this._secretSettings = null;
|
|
6950
|
+
}
|
|
6588
6951
|
await this.resolveConfig();
|
|
6589
6952
|
if (secrets !== void 0) this._secretChangeUnsub = secrets.onChange((ref) => {
|
|
6590
6953
|
if (this._configSecretRefs.has(ref)) this.scheduleSecretReresolve(SECRET_CHANGE_DEBOUNCE_MS);
|
|
@@ -6701,11 +7064,8 @@ var BaseAddon = class {
|
|
|
6701
7064
|
async getGlobalSettings(overlay, cap, nodeId) {
|
|
6702
7065
|
const schema = this.globalSettingsSchema(cap);
|
|
6703
7066
|
if (!schema) return { sections: [] };
|
|
6704
|
-
const projected = await this.
|
|
6705
|
-
return hydrateSchema(schema, overlay ? {
|
|
6706
|
-
...projected,
|
|
6707
|
-
...overlay
|
|
6708
|
-
} : projected, { inlineSecretsAsViews: true });
|
|
7067
|
+
const projected = await this.readRawProjectedStore(nodeId, cap);
|
|
7068
|
+
return hydrateSchema(schema, overlay ? await this.overlayKeepingMarkers(projected, overlay) : projected, { inlineSecretsAsViews: true });
|
|
6709
7069
|
}
|
|
6710
7070
|
/**
|
|
6711
7071
|
* The integration-level view of this addon's settings: exactly the sections
|
|
@@ -6750,7 +7110,7 @@ var BaseAddon = class {
|
|
|
6750
7110
|
});
|
|
6751
7111
|
}
|
|
6752
7112
|
if (sections.length === 0) return null;
|
|
6753
|
-
const projected = await this.
|
|
7113
|
+
const projected = await this.readRawProjectedStore(nodeId);
|
|
6754
7114
|
return hydrateSchema({
|
|
6755
7115
|
...schema,
|
|
6756
7116
|
sections
|
|
@@ -6767,12 +7127,50 @@ var BaseAddon = class {
|
|
|
6767
7127
|
* the store for custom option logic (option narrowing, value snapping) to
|
|
6768
7128
|
* read it per-node — never `ctx.settings.readAddonStore()` directly.
|
|
6769
7129
|
* `nodeId` omitted ⇒ the local node (node-blind injection from ctx).
|
|
7130
|
+
*
|
|
7131
|
+
* Keychain values come back RESOLVED (D798): a secret reads as its value,
|
|
7132
|
+
* never as a `{ $secret }` marker. One the keychain cannot serve right now
|
|
7133
|
+
* stays a marker — "stored, unavailable" (`isSecretMarker()` is true, and it
|
|
7134
|
+
* is listed in {@link unresolvedSecrets}) — never `''` and never absent, so
|
|
7135
|
+
* it cannot be mistaken for "nothing stored, mint a new one". Writing the
|
|
7136
|
+
* resolved blob back is a no-op for every unchanged secret.
|
|
6770
7137
|
*/
|
|
6771
7138
|
async resolveGlobalStore(nodeId, cap) {
|
|
6772
7139
|
const raw = await this._ctx?.settings?.readAddonStore() ?? {};
|
|
7140
|
+
return this.projectForNode(raw, nodeId, cap);
|
|
7141
|
+
}
|
|
7142
|
+
projectForNode(store, nodeId, cap) {
|
|
6773
7143
|
const keys = this.perNodeKeys(cap);
|
|
6774
7144
|
const node = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6775
|
-
return keys.size > 0 ? projectStore(
|
|
7145
|
+
return keys.size > 0 ? projectStore(store, keys, node) : store;
|
|
7146
|
+
}
|
|
7147
|
+
/** The PROJECTED store with its markers — the form hydrate only (D798). */
|
|
7148
|
+
async readRawProjectedStore(nodeId, cap) {
|
|
7149
|
+
const raw = await this.rawSettings()?.readAddonStore() ?? {};
|
|
7150
|
+
return this.projectForNode(raw, nodeId, cap);
|
|
7151
|
+
}
|
|
7152
|
+
/**
|
|
7153
|
+
* `{ ...stored, ...overlay }`, except that an overlay member equal to the
|
|
7154
|
+
* RESOLVED stored one keeps the stored (marker-bearing) member — so a form
|
|
7155
|
+
* hydrated from a resolved overlay still shows a secret as "set", never as
|
|
7156
|
+
* its value.
|
|
7157
|
+
*/
|
|
7158
|
+
async overlayKeepingMarkers(stored, overlay) {
|
|
7159
|
+
const secrets = this._ctx?.secrets;
|
|
7160
|
+
const merged = {
|
|
7161
|
+
...stored,
|
|
7162
|
+
...overlay
|
|
7163
|
+
};
|
|
7164
|
+
if (secrets === void 0 || collectSecretMarkerRefs(stored).length === 0) return merged;
|
|
7165
|
+
const { value: resolved } = await resolveSecretMarkers(stored, secrets, {
|
|
7166
|
+
unresolved: "keep-marker",
|
|
7167
|
+
ownedBy: secrets.owner
|
|
7168
|
+
});
|
|
7169
|
+
for (const key of Object.keys(overlay)) {
|
|
7170
|
+
if (collectSecretMarkerRefs(stored[key]).length === 0) continue;
|
|
7171
|
+
if (isJsonEqual(overlay[key], resolved[key])) merged[key] = stored[key];
|
|
7172
|
+
}
|
|
7173
|
+
return merged;
|
|
6776
7174
|
}
|
|
6777
7175
|
/**
|
|
6778
7176
|
* Whether ONE global key of this addon's store was written, read three-way
|
|
@@ -6837,8 +7235,12 @@ var BaseAddon = class {
|
|
|
6837
7235
|
async clearSecrets(keys, nodeId) {
|
|
6838
7236
|
const tree = this.addonSecretTree();
|
|
6839
7237
|
const keychain = this._ctx?.secrets !== void 0;
|
|
7238
|
+
const stored = keychain ? await this.readAddonStoreWithRetry() : {};
|
|
6840
7239
|
const patch = {};
|
|
6841
|
-
for (const key of keys)
|
|
7240
|
+
for (const key of keys) {
|
|
7241
|
+
const keychainStored = tree.has(key) || collectSecretMarkerRefs(stored[key]).length > 0;
|
|
7242
|
+
patch[key] = keychain && keychainStored ? SECRET_CLEAR : "";
|
|
7243
|
+
}
|
|
6842
7244
|
await this.applyGlobalPatch(patch, nodeId);
|
|
6843
7245
|
}
|
|
6844
7246
|
async applyGlobalPatch(barePatch, nodeId) {
|
|
@@ -6846,7 +7248,11 @@ var BaseAddon = class {
|
|
|
6846
7248
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6847
7249
|
const target = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6848
7250
|
const scoped = keys.size > 0 ? scopePatch(barePatch, keys, target) : barePatch;
|
|
6849
|
-
|
|
7251
|
+
const handle = this._secretSettings;
|
|
7252
|
+
if (handle !== null) {
|
|
7253
|
+
const { changed } = await handle.writeAddonStore(scoped);
|
|
7254
|
+
if (!changed) return;
|
|
7255
|
+
} else await this._ctx?.settings?.writeAddonStore(scoped);
|
|
6850
7256
|
if (target !== localNode) return;
|
|
6851
7257
|
await this.resolveConfig();
|
|
6852
7258
|
await this.onConfigChanged();
|
|
@@ -6899,7 +7305,7 @@ var BaseAddon = class {
|
|
|
6899
7305
|
async getDeviceSettings(deviceId) {
|
|
6900
7306
|
const schema = this.deviceSettingsSchema();
|
|
6901
7307
|
if (!schema) return { sections: [] };
|
|
6902
|
-
return hydrateSchema(schema, await this.
|
|
7308
|
+
return hydrateSchema(schema, await this.rawSettings()?.readDeviceStore(deviceId) ?? {}, { inlineSecretsAsViews: true });
|
|
6903
7309
|
}
|
|
6904
7310
|
async updateDeviceSettings(deviceId, patch) {
|
|
6905
7311
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
@@ -7071,7 +7477,7 @@ var BaseAddon = class {
|
|
|
7071
7477
|
key,
|
|
7072
7478
|
schema,
|
|
7073
7479
|
fallback,
|
|
7074
|
-
read: async () => this.resolveStoredSecrets(await this.
|
|
7480
|
+
read: async () => this.resolveStoredSecrets(await this.rawSettings()?.readDeviceStore(deviceId) ?? {}, false),
|
|
7075
7481
|
write: async (patch) => {
|
|
7076
7482
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
7077
7483
|
},
|
|
@@ -7133,6 +7539,23 @@ var BaseAddon = class {
|
|
|
7133
7539
|
}
|
|
7134
7540
|
return value;
|
|
7135
7541
|
}
|
|
7542
|
+
/**
|
|
7543
|
+
* The marker-bearing settings reads (D798) — private on purpose. Without a
|
|
7544
|
+
* keychain the context's own view is already raw.
|
|
7545
|
+
*/
|
|
7546
|
+
rawSettings() {
|
|
7547
|
+
return this._secretSettings?.raw ?? this._ctx?.settings;
|
|
7548
|
+
}
|
|
7549
|
+
/** An addon-facing read met markers it could not resolve: say so once per ref. */
|
|
7550
|
+
logUnresolvedRead(unresolved) {
|
|
7551
|
+
const fresh = unresolved.filter((u) => !this._loggedUnresolvedReads.has(u.ref));
|
|
7552
|
+
if (fresh.length === 0) return;
|
|
7553
|
+
for (const u of fresh) this._loggedUnresolvedReads.add(u.ref);
|
|
7554
|
+
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) => ({
|
|
7555
|
+
ref: u.ref,
|
|
7556
|
+
reason: u.reason
|
|
7557
|
+
})) } });
|
|
7558
|
+
}
|
|
7136
7559
|
/** Re-resolve the config (a keychain-only change, or a retry) and apply it. */
|
|
7137
7560
|
scheduleSecretReresolve(delayMs) {
|
|
7138
7561
|
const timerOf = delayMs === SECRET_CHANGE_DEBOUNCE_MS ? "_secretChangeTimer" : "_secretRetryTimer";
|
|
@@ -7159,7 +7582,7 @@ var BaseAddon = class {
|
|
|
7159
7582
|
* `{}` (defaults) — the addon's first successful patch will rehydrate.
|
|
7160
7583
|
*/
|
|
7161
7584
|
async readAddonStoreWithRetry() {
|
|
7162
|
-
const settings = this.
|
|
7585
|
+
const settings = this.rawSettings();
|
|
7163
7586
|
if (!settings) return {};
|
|
7164
7587
|
const delaysMs = [
|
|
7165
7588
|
150,
|
|
@@ -8971,6 +9394,16 @@ var CompositionSchema = object({
|
|
|
8971
9394
|
seen.add(feature.cap);
|
|
8972
9395
|
});
|
|
8973
9396
|
});
|
|
9397
|
+
var NodeColorIdSchema = _enum([
|
|
9398
|
+
"node-a",
|
|
9399
|
+
"node-b",
|
|
9400
|
+
"node-c",
|
|
9401
|
+
"node-d",
|
|
9402
|
+
"node-e",
|
|
9403
|
+
"node-f",
|
|
9404
|
+
"node-g",
|
|
9405
|
+
"node-h"
|
|
9406
|
+
]);
|
|
8974
9407
|
new Set([
|
|
8975
9408
|
"track",
|
|
8976
9409
|
"face",
|
|
@@ -9482,6 +9915,278 @@ var CameraSwitchGroupSchema = object({
|
|
|
9482
9915
|
fetchedAt: number()
|
|
9483
9916
|
});
|
|
9484
9917
|
/**
|
|
9918
|
+
* The trainer contract — what the hub hands the cloud trainer and what it
|
|
9919
|
+
* gets back (cloud training, D805+).
|
|
9920
|
+
*
|
|
9921
|
+
* The trainer (`hf/camstack-trainer`, published as the Hugging Face repo
|
|
9922
|
+
* `camstack/camstack-trainer`) is a separate AGPL program the hub never
|
|
9923
|
+
* imports: `job.json` goes in, files come out, and progress is `CAMSTACK_EVENT`
|
|
9924
|
+
* lines on stdout. These schemas are the hub's half of that boundary; the
|
|
9925
|
+
* trainer's pydantic models (and the JSON Schemas generated from them under
|
|
9926
|
+
* `hf/camstack-trainer/schemas/`) are the other half. A change here is a
|
|
9927
|
+
* change there, in the same piece of work.
|
|
9928
|
+
*
|
|
9929
|
+
* No `.default()` anywhere: defaults do not run on the addon cap path, so the
|
|
9930
|
+
* orchestrator fills every field of a job spec explicitly.
|
|
9931
|
+
*/
|
|
9932
|
+
var TRAINING_JOB_SCHEMA = "camstack.training/v1";
|
|
9933
|
+
var TRAINING_RESULT_SCHEMA = "camstack.training-result/v1";
|
|
9934
|
+
/** What the trainer can export. Edge TPU is a later, separate image. */
|
|
9935
|
+
var TrainingExportSchema = _enum([
|
|
9936
|
+
"onnx",
|
|
9937
|
+
"openvino-fp16",
|
|
9938
|
+
"openvino-int8",
|
|
9939
|
+
"coreml-fp16"
|
|
9940
|
+
]);
|
|
9941
|
+
var FloorsSchema = record(string(), number().min(0).max(1));
|
|
9942
|
+
object({
|
|
9943
|
+
schema: literal(TRAINING_JOB_SCHEMA),
|
|
9944
|
+
jobKey: string().uuid(),
|
|
9945
|
+
target: object({
|
|
9946
|
+
kind: literal("detector"),
|
|
9947
|
+
step: literal("object-detection")
|
|
9948
|
+
}),
|
|
9949
|
+
base: object({
|
|
9950
|
+
modelId: string().min(1),
|
|
9951
|
+
/** Ultralytics weights id, e.g. `yolov9m.pt`. */
|
|
9952
|
+
weights: string().min(1),
|
|
9953
|
+
imgsz: number().int().positive()
|
|
9954
|
+
}),
|
|
9955
|
+
baseline: object({
|
|
9956
|
+
modelId: string().min(1),
|
|
9957
|
+
/** The baseline ONNX the holdout comparison runs; public mirror URL. */
|
|
9958
|
+
onnxUrl: string().url(),
|
|
9959
|
+
imgsz: number().int().positive(),
|
|
9960
|
+
floors: FloorsSchema
|
|
9961
|
+
}),
|
|
9962
|
+
dataset: object({
|
|
9963
|
+
versionId: string().min(1),
|
|
9964
|
+
annotationHash: string(),
|
|
9965
|
+
/** sha256 of the uploaded archive; the trainer refuses a mismatch (exit 65). */
|
|
9966
|
+
sha256: string().regex(/^[0-9a-f]{64}$/)
|
|
9967
|
+
}),
|
|
9968
|
+
split: object({
|
|
9969
|
+
holdoutCameras: array(number().int()),
|
|
9970
|
+
/** When no camera is held out: the last N days of every camera. */
|
|
9971
|
+
holdoutLastDays: number().int().nonnegative(),
|
|
9972
|
+
valFraction: number().min(0).max(.5),
|
|
9973
|
+
seed: number().int()
|
|
9974
|
+
}),
|
|
9975
|
+
hyper: object({
|
|
9976
|
+
epochs: number().int().positive(),
|
|
9977
|
+
batch: number().int().positive(),
|
|
9978
|
+
lr0: number().positive(),
|
|
9979
|
+
/** Layers frozen from the start of the backbone; 0 = none. */
|
|
9980
|
+
freeze: number().int().nonnegative(),
|
|
9981
|
+
patience: number().int().nonnegative(),
|
|
9982
|
+
seed: number().int()
|
|
9983
|
+
}),
|
|
9984
|
+
replay: object({
|
|
9985
|
+
source: literal("coco2017"),
|
|
9986
|
+
count: number().int().nonnegative()
|
|
9987
|
+
}),
|
|
9988
|
+
exports: array(TrainingExportSchema).min(1),
|
|
9989
|
+
calibration: object({ maxFrames: number().int().positive() }),
|
|
9990
|
+
floors: object({
|
|
9991
|
+
minSupport: number().int().positive(),
|
|
9992
|
+
clamp: number().min(0).max(1)
|
|
9993
|
+
}),
|
|
9994
|
+
int8Gate: object({ maxMap50Drop: number().min(0).max(1) }),
|
|
9995
|
+
catalog: object({
|
|
9996
|
+
id: string().regex(/^[a-z0-9][a-z0-9-]{2,80}$/),
|
|
9997
|
+
name: string().min(1).max(160)
|
|
9998
|
+
})
|
|
9999
|
+
});
|
|
10000
|
+
/** One regular file of the bundle. An mlpackage contributes one row per member. */
|
|
10001
|
+
var TrainingResultFileSchema = object({
|
|
10002
|
+
path: string().min(1),
|
|
10003
|
+
bytes: number().int().nonnegative(),
|
|
10004
|
+
sha256: string().regex(/^[0-9a-f]{64}$/),
|
|
10005
|
+
format: _enum([
|
|
10006
|
+
"onnx",
|
|
10007
|
+
"openvino",
|
|
10008
|
+
"coreml",
|
|
10009
|
+
"pt"
|
|
10010
|
+
]),
|
|
10011
|
+
variant: _enum(["base", "int8"])
|
|
10012
|
+
});
|
|
10013
|
+
var DraftFormatSchema = object({
|
|
10014
|
+
/** RELATIVE path inside the bundle; the hub rewrites it to `camstack-local://`. */
|
|
10015
|
+
url: string().min(1),
|
|
10016
|
+
sizeMB: number().nonnegative(),
|
|
10017
|
+
isDirectory: boolean().optional(),
|
|
10018
|
+
files: array(string()).optional(),
|
|
10019
|
+
runtimes: array(literal("python")).optional(),
|
|
10020
|
+
revision: string().min(1)
|
|
10021
|
+
});
|
|
10022
|
+
/** The trainer's half of a catalog entry; the hub completes it (labels, licence, group). */
|
|
10023
|
+
var TrainingCatalogDraftSchema = object({
|
|
10024
|
+
id: string().min(1),
|
|
10025
|
+
name: string().min(1),
|
|
10026
|
+
description: string(),
|
|
10027
|
+
labels: array(unknown()),
|
|
10028
|
+
inputSize: object({
|
|
10029
|
+
width: number().int().positive(),
|
|
10030
|
+
height: number().int().positive()
|
|
10031
|
+
}),
|
|
10032
|
+
preprocessMode: literal("letterbox"),
|
|
10033
|
+
defaultClassFloors: FloorsSchema,
|
|
10034
|
+
formats: object({
|
|
10035
|
+
onnx: DraftFormatSchema.optional(),
|
|
10036
|
+
openvino: DraftFormatSchema.optional(),
|
|
10037
|
+
coreml: DraftFormatSchema.optional()
|
|
10038
|
+
})
|
|
10039
|
+
});
|
|
10040
|
+
/** One class of one model's holdout report (the eval harness's summary). */
|
|
10041
|
+
var TrainingEvalClassSchema = object({
|
|
10042
|
+
positives: number().int(),
|
|
10043
|
+
floor: number().nullable(),
|
|
10044
|
+
tp: number().int(),
|
|
10045
|
+
fp: number().int(),
|
|
10046
|
+
fn: number().int(),
|
|
10047
|
+
precision: number().nullable(),
|
|
10048
|
+
recall: number().nullable(),
|
|
10049
|
+
ap50: number().nullable(),
|
|
10050
|
+
recallByCamera: record(string(), number().nullable()).optional(),
|
|
10051
|
+
recallByLight: record(string(), number().nullable()).optional(),
|
|
10052
|
+
fpByCamera: record(string(), number()).optional(),
|
|
10053
|
+
smallFound: number().int().optional(),
|
|
10054
|
+
smallTotal: number().int().optional()
|
|
10055
|
+
}).passthrough();
|
|
10056
|
+
var TrainingEvalReportSchema = object({
|
|
10057
|
+
frames: number().int(),
|
|
10058
|
+
classes: record(string(), TrainingEvalClassSchema)
|
|
10059
|
+
}).passthrough();
|
|
10060
|
+
/**
|
|
10061
|
+
* A succeeded result carries every block; a failed one carries the error and
|
|
10062
|
+
* whatever was known by then — the other blocks are ABSENT, not null. The
|
|
10063
|
+
* orchestrator checks the blocks it needs before it trusts a success.
|
|
10064
|
+
*/
|
|
10065
|
+
var TrainingResultSchema = object({
|
|
10066
|
+
schema: literal(TRAINING_RESULT_SCHEMA),
|
|
10067
|
+
jobKey: string(),
|
|
10068
|
+
status: _enum(["succeeded", "failed"]),
|
|
10069
|
+
error: object({
|
|
10070
|
+
stage: string(),
|
|
10071
|
+
code: string(),
|
|
10072
|
+
message: string()
|
|
10073
|
+
}).nullable(),
|
|
10074
|
+
trainer: object({
|
|
10075
|
+
version: string(),
|
|
10076
|
+
revision: string()
|
|
10077
|
+
}),
|
|
10078
|
+
toolchain: record(string(), string().nullable()),
|
|
10079
|
+
dataset: object({
|
|
10080
|
+
versionId: string(),
|
|
10081
|
+
annotationHash: string(),
|
|
10082
|
+
sha256: string(),
|
|
10083
|
+
frames: object({
|
|
10084
|
+
train: number().int(),
|
|
10085
|
+
val: number().int(),
|
|
10086
|
+
holdout: number().int()
|
|
10087
|
+
}),
|
|
10088
|
+
holdoutCameras: array(number().int()),
|
|
10089
|
+
replayImages: number().int()
|
|
10090
|
+
}).optional(),
|
|
10091
|
+
training: object({
|
|
10092
|
+
epochsRun: number().int(),
|
|
10093
|
+
bestEpoch: number().int(),
|
|
10094
|
+
bestMap50: number(),
|
|
10095
|
+
bestMap50_95: number(),
|
|
10096
|
+
seconds: number()
|
|
10097
|
+
}).optional(),
|
|
10098
|
+
evaluation: object({
|
|
10099
|
+
holdoutFrames: number().int(),
|
|
10100
|
+
baseline: TrainingEvalReportSchema.nullable(),
|
|
10101
|
+
candidate: TrainingEvalReportSchema.nullable(),
|
|
10102
|
+
candidateInt8: TrainingEvalReportSchema.nullable(),
|
|
10103
|
+
recallDeltaByCamera: record(string(), record(string(), number())).nullable(),
|
|
10104
|
+
map50: record(string(), number().nullable())
|
|
10105
|
+
}).optional(),
|
|
10106
|
+
floors: object({
|
|
10107
|
+
baseline: FloorsSchema,
|
|
10108
|
+
candidate: FloorsSchema,
|
|
10109
|
+
candidateInt8: FloorsSchema.nullable(),
|
|
10110
|
+
notes: array(string())
|
|
10111
|
+
}).optional(),
|
|
10112
|
+
int8: object({
|
|
10113
|
+
kept: boolean(),
|
|
10114
|
+
map50Fp16: number().nullable(),
|
|
10115
|
+
map50Int8: number().nullable(),
|
|
10116
|
+
reason: string().nullable()
|
|
10117
|
+
}).optional(),
|
|
10118
|
+
exportsDropped: array(object({
|
|
10119
|
+
export: string(),
|
|
10120
|
+
reason: string()
|
|
10121
|
+
})).optional(),
|
|
10122
|
+
files: array(TrainingResultFileSchema).optional(),
|
|
10123
|
+
bundle: object({
|
|
10124
|
+
path: literal("bundle.tar"),
|
|
10125
|
+
bytes: number().int().nonnegative(),
|
|
10126
|
+
sha256: string().regex(/^[0-9a-f]{64}$/)
|
|
10127
|
+
}).nullable().optional(),
|
|
10128
|
+
catalogDraft: object({
|
|
10129
|
+
base: TrainingCatalogDraftSchema,
|
|
10130
|
+
int8: TrainingCatalogDraftSchema.nullable()
|
|
10131
|
+
}).nullable().optional(),
|
|
10132
|
+
licence: string()
|
|
10133
|
+
});
|
|
10134
|
+
var TrainingStageSchema = _enum([
|
|
10135
|
+
"prepare",
|
|
10136
|
+
"replay",
|
|
10137
|
+
"train",
|
|
10138
|
+
"eval",
|
|
10139
|
+
"export",
|
|
10140
|
+
"package"
|
|
10141
|
+
]);
|
|
10142
|
+
var EventBase = {
|
|
10143
|
+
v: literal(1),
|
|
10144
|
+
ts: number()
|
|
10145
|
+
};
|
|
10146
|
+
discriminatedUnion("type", [
|
|
10147
|
+
object({
|
|
10148
|
+
...EventBase,
|
|
10149
|
+
type: literal("stage"),
|
|
10150
|
+
stage: TrainingStageSchema
|
|
10151
|
+
}),
|
|
10152
|
+
object({
|
|
10153
|
+
...EventBase,
|
|
10154
|
+
type: literal("epoch"),
|
|
10155
|
+
epoch: number().int(),
|
|
10156
|
+
epochs: number().int(),
|
|
10157
|
+
boxLoss: number().nullable().optional(),
|
|
10158
|
+
map50: number().nullable().optional(),
|
|
10159
|
+
map50_95: number().nullable().optional(),
|
|
10160
|
+
etaSec: number().nullable().optional()
|
|
10161
|
+
}),
|
|
10162
|
+
object({
|
|
10163
|
+
...EventBase,
|
|
10164
|
+
type: literal("metric"),
|
|
10165
|
+
name: string(),
|
|
10166
|
+
value: number()
|
|
10167
|
+
}),
|
|
10168
|
+
object({
|
|
10169
|
+
...EventBase,
|
|
10170
|
+
type: literal("artifact"),
|
|
10171
|
+
path: string(),
|
|
10172
|
+
bytes: number(),
|
|
10173
|
+
sha256: string()
|
|
10174
|
+
}),
|
|
10175
|
+
object({
|
|
10176
|
+
...EventBase,
|
|
10177
|
+
type: literal("done"),
|
|
10178
|
+
status: _enum(["succeeded", "failed"]),
|
|
10179
|
+
resultSha256: string().nullable().optional()
|
|
10180
|
+
}),
|
|
10181
|
+
object({
|
|
10182
|
+
...EventBase,
|
|
10183
|
+
type: literal("error"),
|
|
10184
|
+
stage: string(),
|
|
10185
|
+
code: string(),
|
|
10186
|
+
message: string()
|
|
10187
|
+
})
|
|
10188
|
+
]);
|
|
10189
|
+
/**
|
|
9485
10190
|
* What the gate decided about a birth, from the CALLER's point of view.
|
|
9486
10191
|
*
|
|
9487
10192
|
* Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
|
|
@@ -11809,7 +12514,9 @@ var AddonHttpRouteSchema = object({
|
|
|
11809
12514
|
"authenticated",
|
|
11810
12515
|
"admin"
|
|
11811
12516
|
]).optional(),
|
|
11812
|
-
description: string().optional()
|
|
12517
|
+
description: string().optional(),
|
|
12518
|
+
/** The hub limits this route per client address before the handler runs. */
|
|
12519
|
+
rateLimit: _enum(["auth"]).optional()
|
|
11813
12520
|
});
|
|
11814
12521
|
/**
|
|
11815
12522
|
* Cross-process route invocation envelope. The hub captures the
|
|
@@ -12514,6 +13221,37 @@ var BackupDestinationInfoSchema = object({
|
|
|
12514
13221
|
lastError: string().optional()
|
|
12515
13222
|
});
|
|
12516
13223
|
/**
|
|
13224
|
+
* How an archive is encrypted (operator decision 2026-10-09): to a backup
|
|
13225
|
+
* PUBLIC key the hub holds, so only the operator's secret key opens it.
|
|
13226
|
+
* Absent on a plain `.tar.gz` — every archive made before encryption, or
|
|
13227
|
+
* with it off — which restores without a key.
|
|
13228
|
+
*/
|
|
13229
|
+
var BackupArchiveEncryptionSchema = object({
|
|
13230
|
+
/** `x25519-hkdf-aes256gcm-stream-v1`. */
|
|
13231
|
+
scheme: string(),
|
|
13232
|
+
/** 16 hex — the backup key whose secret restores this archive. */
|
|
13233
|
+
keyId: string()
|
|
13234
|
+
});
|
|
13235
|
+
/**
|
|
13236
|
+
* The backup encryption setting. The hub keeps PUBLIC keys only: the active
|
|
13237
|
+
* one new archives are encrypted to, and the retired ones older archives
|
|
13238
|
+
* still need. The secret key is shown once, at `setupEncryption`.
|
|
13239
|
+
*/
|
|
13240
|
+
var BackupEncryptionStatusSchema = object({
|
|
13241
|
+
enabled: boolean(),
|
|
13242
|
+
active: object({
|
|
13243
|
+
keyId: string(),
|
|
13244
|
+
publicKey: string(),
|
|
13245
|
+
createdAt: number()
|
|
13246
|
+
}).nullable(),
|
|
13247
|
+
/** Every key ever set up, newest first. */
|
|
13248
|
+
keys: array(object({
|
|
13249
|
+
keyId: string(),
|
|
13250
|
+
createdAt: number(),
|
|
13251
|
+
retiredAt: number().nullable()
|
|
13252
|
+
})).readonly()
|
|
13253
|
+
});
|
|
13254
|
+
/**
|
|
12517
13255
|
* Per-archive entry returned by `backup.listArchives({ destinationId })`.
|
|
12518
13256
|
* Same shape the destination drill-in renders. Sourced from the per-
|
|
12519
13257
|
* location `manifests.json` (no per-archive tarball read required).
|
|
@@ -12525,7 +13263,9 @@ var BackupArchiveEntrySchema = object({
|
|
|
12525
13263
|
sizeBytes: number(),
|
|
12526
13264
|
label: string().optional(),
|
|
12527
13265
|
/** Top-level locations included in the archive (db, addons, tls, …). */
|
|
12528
|
-
locations: array(string()).readonly()
|
|
13266
|
+
locations: array(string()).readonly(),
|
|
13267
|
+
/** Present when the archive is encrypted; restore then needs that key. */
|
|
13268
|
+
encryption: BackupArchiveEncryptionSchema.optional()
|
|
12529
13269
|
});
|
|
12530
13270
|
var BackupEntrySchema = object({
|
|
12531
13271
|
id: string(),
|
|
@@ -12534,7 +13274,8 @@ var BackupEntrySchema = object({
|
|
|
12534
13274
|
label: string().optional(),
|
|
12535
13275
|
createdAt: number(),
|
|
12536
13276
|
sizeBytes: number(),
|
|
12537
|
-
locations: array(string()).optional()
|
|
13277
|
+
locations: array(string()).optional(),
|
|
13278
|
+
encryption: BackupArchiveEncryptionSchema.optional()
|
|
12538
13279
|
});
|
|
12539
13280
|
var ArchiveEntrySchema = object({
|
|
12540
13281
|
path: string(),
|
|
@@ -12723,10 +13464,40 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
|
|
|
12723
13464
|
* this list and skips entries whose path doesn't start with
|
|
12724
13465
|
* any of them.
|
|
12725
13466
|
*/
|
|
12726
|
-
locations: array(string()).optional()
|
|
13467
|
+
locations: array(string()).optional(),
|
|
13468
|
+
/**
|
|
13469
|
+
* The backup SECRET key, for an encrypted archive (ignored for a plain
|
|
13470
|
+
* one). The archive is decrypted into the hub's private staging
|
|
13471
|
+
* before the restart; the key is not stored. A wrong or missing key
|
|
13472
|
+
* is refused before the archive is downloaded.
|
|
13473
|
+
*/
|
|
13474
|
+
backupSecretKey: string().optional()
|
|
12727
13475
|
}), _void(), {
|
|
12728
13476
|
kind: "mutation",
|
|
12729
13477
|
auth: "admin"
|
|
13478
|
+
}), method(_void(), BackupEncryptionStatusSchema, { auth: "admin" }), method(object({}), object({
|
|
13479
|
+
keyId: string(),
|
|
13480
|
+
secretKey: string(),
|
|
13481
|
+
publicKey: string(),
|
|
13482
|
+
createdAt: number(),
|
|
13483
|
+
replacedKeyId: string().nullable()
|
|
13484
|
+
}), {
|
|
13485
|
+
kind: "mutation",
|
|
13486
|
+
auth: "admin"
|
|
13487
|
+
}), method(object({}), object({ disabledKeyId: string().nullable() }), {
|
|
13488
|
+
kind: "mutation",
|
|
13489
|
+
auth: "admin"
|
|
13490
|
+
}), method(object({ backupSecretKey: string() }), object({
|
|
13491
|
+
valid: boolean(),
|
|
13492
|
+
keyId: string().nullable(),
|
|
13493
|
+
/** The hub knows this key (active or retired). */
|
|
13494
|
+
known: boolean(),
|
|
13495
|
+
/** It is the key new archives are encrypted to. */
|
|
13496
|
+
active: boolean(),
|
|
13497
|
+
error: string().optional()
|
|
13498
|
+
}), {
|
|
13499
|
+
kind: "mutation",
|
|
13500
|
+
auth: "admin"
|
|
12730
13501
|
}), method(object({
|
|
12731
13502
|
destinationId: string(),
|
|
12732
13503
|
backupId: string()
|
|
@@ -14452,7 +15223,60 @@ var CustomModelDescriptorSchema = object({
|
|
|
14452
15223
|
stepId: string(),
|
|
14453
15224
|
entry: ModelCatalogEntrySchema
|
|
14454
15225
|
});
|
|
14455
|
-
|
|
15226
|
+
/** One regular file of an imported bundle, as the producer measured it. */
|
|
15227
|
+
var ModelBundleFileSchema = object({
|
|
15228
|
+
/** Relative path inside the bundle tar; an mlpackage member is `<x>.mlpackage/<member>`. */
|
|
15229
|
+
path: string().min(1),
|
|
15230
|
+
bytes: number().int().nonnegative(),
|
|
15231
|
+
sha256: string().regex(/^[0-9a-f]{64}$/)
|
|
15232
|
+
});
|
|
15233
|
+
var ImportModelBundleInputSchema = object({
|
|
15234
|
+
/** The registry provider that keeps the model (Model Studio). */
|
|
15235
|
+
addonId: string(),
|
|
15236
|
+
stepId: string().min(1),
|
|
15237
|
+
/**
|
|
15238
|
+
* The catalog rows to register, complete, every format URL already
|
|
15239
|
+
* `camstack-local://<modelId>/<file>` naming a file of the bundle. One
|
|
15240
|
+
* bundle may carry several rows (a base and its INT8 variant).
|
|
15241
|
+
*/
|
|
15242
|
+
entries: array(ModelCatalogEntrySchema).min(1).max(4),
|
|
15243
|
+
/** The bundle tar, offered by the producer over `ctx.peerBytes` (same host). */
|
|
15244
|
+
bundle: object({
|
|
15245
|
+
ticket: PeerBytesTicketSchema,
|
|
15246
|
+
bytes: number().int().positive(),
|
|
15247
|
+
sha256: string().regex(/^[0-9a-f]{64}$/)
|
|
15248
|
+
}),
|
|
15249
|
+
/** Every file the tar must hold; anything missing, extra or different is refused. */
|
|
15250
|
+
files: array(ModelBundleFileSchema).min(1).max(64),
|
|
15251
|
+
/** Convert missing engine formats and push the model to every agent afterwards. */
|
|
15252
|
+
distribute: boolean()
|
|
15253
|
+
});
|
|
15254
|
+
var ImportModelBundleResultSchema = discriminatedUnion("kind", [object({
|
|
15255
|
+
kind: literal("imported"),
|
|
15256
|
+
modelIds: array(string()).readonly(),
|
|
15257
|
+
distributed: array(object({
|
|
15258
|
+
modelId: string(),
|
|
15259
|
+
nodeId: string(),
|
|
15260
|
+
format: _enum(MODEL_FORMATS),
|
|
15261
|
+
ok: boolean(),
|
|
15262
|
+
error: string().optional()
|
|
15263
|
+
})).readonly()
|
|
15264
|
+
}), object({
|
|
15265
|
+
kind: literal("refused"),
|
|
15266
|
+
reason: _enum([
|
|
15267
|
+
"transfer-failed",
|
|
15268
|
+
"checksum-mismatch",
|
|
15269
|
+
"bundle-mismatch",
|
|
15270
|
+
"invalid-entry",
|
|
15271
|
+
"id-taken"
|
|
15272
|
+
]),
|
|
15273
|
+
detail: string()
|
|
15274
|
+
})]);
|
|
15275
|
+
method(_void(), array(CustomModelDescriptorSchema).readonly(), { auth: "admin" }), method(ImportModelBundleInputSchema, ImportModelBundleResultSchema, {
|
|
15276
|
+
kind: "mutation",
|
|
15277
|
+
auth: "admin",
|
|
15278
|
+
timeoutMs: 30 * 6e4
|
|
15279
|
+
});
|
|
14456
15280
|
/**
|
|
14457
15281
|
* Query filter for settings-store collections.
|
|
14458
15282
|
*/
|
|
@@ -14931,6 +15755,35 @@ var KeychainKeySourceSchema = object({
|
|
|
14931
15755
|
*/
|
|
14932
15756
|
sharesBackupWithDatabase: boolean()
|
|
14933
15757
|
});
|
|
15758
|
+
/**
|
|
15759
|
+
* One keychain reset, as the Secrets page reports it until the operator
|
|
15760
|
+
* acknowledges it. Never a value: refs, counts and table names only.
|
|
15761
|
+
*/
|
|
15762
|
+
var KeychainResetRecordSchema = object({
|
|
15763
|
+
id: string(),
|
|
15764
|
+
at: number(),
|
|
15765
|
+
/** `user:<id>` or {@link KEYCHAIN_RESET_TRIGGER_ACTOR}. */
|
|
15766
|
+
actor: string(),
|
|
15767
|
+
/** Why the keychain was locked when it was reset; `null` when it was not locked. */
|
|
15768
|
+
lockedReason: string().nullable(),
|
|
15769
|
+
/** Values moved into the archive table (ciphertext under the lost key). */
|
|
15770
|
+
archived: number().int(),
|
|
15771
|
+
/** `keychain:secrets-orphaned-<ts>`, or `null` when nothing was stored. */
|
|
15772
|
+
archivedCollection: string().nullable(),
|
|
15773
|
+
/**
|
|
15774
|
+
* `keychain:keys-orphaned-<ts>`: the wrapped data keys of the archive, kept
|
|
15775
|
+
* so the archive can still be opened if the lost master key turns up.
|
|
15776
|
+
*/
|
|
15777
|
+
archivedKeysCollection: string().nullable(),
|
|
15778
|
+
/**
|
|
15779
|
+
* `system-settings` keys whose marker the reset cleared — the cluster
|
|
15780
|
+
* secret's: a marker left pointing at an archived value would refuse every
|
|
15781
|
+
* agent forever (D797).
|
|
15782
|
+
*/
|
|
15783
|
+
clearedSettingsKeys: array(string()).readonly(),
|
|
15784
|
+
/** When an operator dismissed the notice on the Secrets page; `null` until then. */
|
|
15785
|
+
acknowledgedAt: number().nullable()
|
|
15786
|
+
});
|
|
14934
15787
|
var KeychainStatusSchema = object({
|
|
14935
15788
|
keychain: KeychainStateSchema,
|
|
14936
15789
|
/** The source of the master key in use; `null` while locked. */
|
|
@@ -14948,7 +15801,9 @@ var KeychainStatusSchema = object({
|
|
|
14948
15801
|
/** Wrapped copies of the data key under a previous master key, kept until purged. */
|
|
14949
15802
|
retiredWraps: number().int(),
|
|
14950
15803
|
recoveryKeyDownloadedAt: number().nullable(),
|
|
14951
|
-
secretCount: number().int()
|
|
15804
|
+
secretCount: number().int(),
|
|
15805
|
+
/** The most recent reset, acknowledged or not; `null` when the keychain was never reset. */
|
|
15806
|
+
lastReset: KeychainResetRecordSchema.nullable()
|
|
14952
15807
|
});
|
|
14953
15808
|
/**
|
|
14954
15809
|
* Whether a stored value is still pointed at by its owner's settings.
|
|
@@ -14970,13 +15825,14 @@ var KeychainAuditActionSchema = _enum([
|
|
|
14970
15825
|
"download-recovery-key",
|
|
14971
15826
|
"delete-orphans",
|
|
14972
15827
|
"reset",
|
|
15828
|
+
"acknowledge-reset",
|
|
14973
15829
|
"initialize"
|
|
14974
15830
|
]);
|
|
14975
15831
|
var KeychainAuditEntrySchema = object({
|
|
14976
15832
|
id: string(),
|
|
14977
15833
|
at: number(),
|
|
14978
15834
|
action: KeychainAuditActionSchema,
|
|
14979
|
-
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
15835
|
+
/** `addon:<id>` | `user:<id>` | `system` | `trigger-file`. */
|
|
14980
15836
|
actor: string(),
|
|
14981
15837
|
ref: string().nullable(),
|
|
14982
15838
|
detail: string().nullable()
|
|
@@ -15042,6 +15898,13 @@ method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}),
|
|
|
15042
15898
|
kind: "mutation",
|
|
15043
15899
|
auth: "admin",
|
|
15044
15900
|
caller: "required"
|
|
15901
|
+
}), method(object({}), object({
|
|
15902
|
+
reset: KeychainResetRecordSchema.nullable(),
|
|
15903
|
+
pendingReentry: array(KeychainSecretMetaSchema).readonly()
|
|
15904
|
+
}), { auth: "admin" }), method(object({}), object({ acknowledged: boolean() }), {
|
|
15905
|
+
kind: "mutation",
|
|
15906
|
+
auth: "admin",
|
|
15907
|
+
caller: "required"
|
|
15045
15908
|
});
|
|
15046
15909
|
method(_void(), object({
|
|
15047
15910
|
id: string(),
|
|
@@ -17607,14 +18470,14 @@ var LlmProfileSchema = object({
|
|
|
17607
18470
|
/** ConfigUISchema tree passed through untyped on the wire (the
|
|
17608
18471
|
* notification-output `ConfigSchemaPassthrough` precedent at
|
|
17609
18472
|
* notification-output.cap.ts:151); the exported TS type re-tightens it. */
|
|
17610
|
-
var ConfigSchemaPassthrough$
|
|
18473
|
+
var ConfigSchemaPassthrough$3 = unknown();
|
|
17611
18474
|
var LlmProfileKindDescriptorSchema = object({
|
|
17612
18475
|
kind: LlmProfileKindSchema,
|
|
17613
18476
|
label: string(),
|
|
17614
18477
|
icon: string(),
|
|
17615
18478
|
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
17616
18479
|
addonId: string(),
|
|
17617
|
-
configSchema: ConfigSchemaPassthrough$
|
|
18480
|
+
configSchema: ConfigSchemaPassthrough$3
|
|
17618
18481
|
});
|
|
17619
18482
|
var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
|
|
17620
18483
|
var LlmDefaultSchema = object({
|
|
@@ -17892,7 +18755,7 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
17892
18755
|
* `login-method` — collection cap through which auth addons contribute
|
|
17893
18756
|
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
17894
18757
|
* generic mechanism that supersedes the dead `auth.listProviders` reader:
|
|
17895
|
-
* every auth addon (OIDC,
|
|
18758
|
+
* every auth addon (OIDC, WebAuthn/passkey) registers a
|
|
17896
18759
|
* `login-method` provider and the PUBLIC `auth.listLoginMethods`
|
|
17897
18760
|
* procedure aggregates them for the unauthenticated login page.
|
|
17898
18761
|
*
|
|
@@ -17900,8 +18763,7 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
17900
18763
|
*
|
|
17901
18764
|
* - `redirect` — a declarative button. The login page renders a generic
|
|
17902
18765
|
* button that navigates to `startUrl` (an addon-owned HTTP route).
|
|
17903
|
-
* Covers OIDC (`/addon/auth-oidc/<id>/start`)
|
|
17904
|
-
* ZERO shell-side JS. A future SSO addon plugs in the same way — the
|
|
18766
|
+
* Covers OIDC (`/addon/auth-oidc/<id>/start`) with ZERO shell-side JS. A future SSO addon plugs in the same way — the
|
|
17905
18767
|
* login page needs NO change.
|
|
17906
18768
|
*
|
|
17907
18769
|
* - `widget` — a Module-Federation widget the login page mounts (via
|
|
@@ -17920,8 +18782,8 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
17920
18782
|
* decision.
|
|
17921
18783
|
*
|
|
17922
18784
|
* Every contribution carries a `stage`:
|
|
17923
|
-
* - `primary` — shown on the first credentials screen (OIDC
|
|
17924
|
-
*
|
|
18785
|
+
* - `primary` — shown on the first credentials screen (OIDC
|
|
18786
|
+
* buttons; a usernameless passkey).
|
|
17925
18787
|
* - `second-factor` — shown AFTER the password leg, gated on the
|
|
17926
18788
|
* returned `factors` (passkey-as-2FA today).
|
|
17927
18789
|
*
|
|
@@ -17948,7 +18810,7 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
17948
18810
|
* The provider names an external identity a signed-in user can link to
|
|
17949
18811
|
* their own account (D782): `auth.listLinkableProviders` /
|
|
17950
18812
|
* `beginExternalLink` offer exactly the redirect methods that set this,
|
|
17951
|
-
* whatever their id. Absent / false — a login button only
|
|
18813
|
+
* whatever their id. Absent / false — a login button only.
|
|
17952
18814
|
*/
|
|
17953
18815
|
linkable: boolean().optional()
|
|
17954
18816
|
}),
|
|
@@ -18736,7 +19598,7 @@ var TargetKindCapsSchema = object({
|
|
|
18736
19598
|
* the union is large and not meant for runtime validation here; the exported
|
|
18737
19599
|
* `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
|
|
18738
19600
|
*/
|
|
18739
|
-
var ConfigSchemaPassthrough = unknown();
|
|
19601
|
+
var ConfigSchemaPassthrough$2 = unknown();
|
|
18740
19602
|
var TargetKindSchema = object({
|
|
18741
19603
|
kind: string(),
|
|
18742
19604
|
label: string(),
|
|
@@ -18773,7 +19635,7 @@ var TargetKindSchema = object({
|
|
|
18773
19635
|
* its raster path, which is the safe default for an unknown image.
|
|
18774
19636
|
*/
|
|
18775
19637
|
iconMediaType: string().optional(),
|
|
18776
|
-
configSchema: ConfigSchemaPassthrough,
|
|
19638
|
+
configSchema: ConfigSchemaPassthrough$2,
|
|
18777
19639
|
/**
|
|
18778
19640
|
* The config keys that decide WHERE this kind's secrets are sent (server,
|
|
18779
19641
|
* base URL, instance, chat, recipient). A save that changes any of them
|
|
@@ -21803,8 +22665,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
21803
22665
|
* `super_admin` — collapsed onto the single boolean because every
|
|
21804
22666
|
* non-admin caller is governed by the same scope-check rules; the
|
|
21805
22667
|
* distinction was only ever used to route role-specific procedures
|
|
21806
|
-
* which we no longer have.
|
|
21807
|
-
* `createServiceToken`; CLI / webhook integrations are `cst_*` tokens
|
|
22668
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
21808
22669
|
* with `isAdmin: false` + an explicit scope list.
|
|
21809
22670
|
*/
|
|
21810
22671
|
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
@@ -22111,6 +22972,61 @@ var OauthIntegrationDescriptorSchema = object({
|
|
|
22111
22972
|
});
|
|
22112
22973
|
method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
|
|
22113
22974
|
/**
|
|
22975
|
+
* `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
|
|
22976
|
+
*
|
|
22977
|
+
* One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
|
|
22978
|
+
* ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
|
|
22979
|
+
* Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
|
|
22980
|
+
* immutable after create.
|
|
22981
|
+
*/
|
|
22982
|
+
var ConfigSchemaPassthrough$1 = unknown();
|
|
22983
|
+
var OidcConnectionSchema = object({
|
|
22984
|
+
id: string().min(1),
|
|
22985
|
+
displayName: string(),
|
|
22986
|
+
icon: string(),
|
|
22987
|
+
issuerUrl: string(),
|
|
22988
|
+
clientId: string(),
|
|
22989
|
+
/** Client id + secret present — never the secret value. */
|
|
22990
|
+
configured: boolean(),
|
|
22991
|
+
/**
|
|
22992
|
+
* Values for the connection form schema. `clientSecret` is a keychain
|
|
22993
|
+
* {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
|
|
22994
|
+
*/
|
|
22995
|
+
formValues: record(string(), unknown()).optional()
|
|
22996
|
+
});
|
|
22997
|
+
/**
|
|
22998
|
+
* Patch one connection. Omitted or empty `clientSecret` keeps the stored
|
|
22999
|
+
* secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
|
|
23000
|
+
*/
|
|
23001
|
+
var OidcConnectionUpdateInputSchema = object({
|
|
23002
|
+
id: string().min(1),
|
|
23003
|
+
displayName: string().min(1),
|
|
23004
|
+
icon: string().optional(),
|
|
23005
|
+
issuerUrl: string().optional(),
|
|
23006
|
+
clientId: string().optional(),
|
|
23007
|
+
clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
|
|
23008
|
+
redirectUri: string().optional(),
|
|
23009
|
+
scopes: string().optional(),
|
|
23010
|
+
usernameClaim: _enum([
|
|
23011
|
+
"preferred_username",
|
|
23012
|
+
"email",
|
|
23013
|
+
"sub"
|
|
23014
|
+
]).optional()
|
|
23015
|
+
});
|
|
23016
|
+
method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
|
|
23017
|
+
id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
|
|
23018
|
+
displayName: string().min(1)
|
|
23019
|
+
}), object({ id: string() }), {
|
|
23020
|
+
kind: "mutation",
|
|
23021
|
+
auth: "admin"
|
|
23022
|
+
}), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
|
|
23023
|
+
kind: "mutation",
|
|
23024
|
+
auth: "admin"
|
|
23025
|
+
}), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
|
|
23026
|
+
kind: "mutation",
|
|
23027
|
+
auth: "admin"
|
|
23028
|
+
});
|
|
23029
|
+
/**
|
|
22114
23030
|
* What started a camera's onboard motion (D672). `camera` is the camera's own
|
|
22115
23031
|
* firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
|
|
22116
23032
|
* wire means the camera: only the camera-sensors bridge ever says `sensor`.
|
|
@@ -23467,24 +24383,69 @@ var RetrainFrameListSchema = object({
|
|
|
23467
24383
|
/** What the page pre-selects — the native key frame when one survives. */
|
|
23468
24384
|
autoPickMediaId: number().int().optional()
|
|
23469
24385
|
});
|
|
24386
|
+
/** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
|
|
24387
|
+
var RetrainFrameWorkStateSchema = _enum([
|
|
24388
|
+
"unannotated",
|
|
24389
|
+
"annotated",
|
|
24390
|
+
"complete"
|
|
24391
|
+
]);
|
|
24392
|
+
/**
|
|
24393
|
+
* Filters for paginated corpus list, KPI, and matching export (design §4.4).
|
|
24394
|
+
* Every narrowing field is ANDed; omitted fields impose no constraint.
|
|
24395
|
+
*/
|
|
24396
|
+
var RetrainCorpusFilterSchema = object({
|
|
24397
|
+
workState: RetrainFrameWorkStateSchema.optional(),
|
|
24398
|
+
deviceIds: array(number()).max(500).optional(),
|
|
24399
|
+
/** When set, only frames in this named collection. */
|
|
24400
|
+
collectionId: string().optional(),
|
|
24401
|
+
/** Frames that carry at least one saved annotation in one of these classes. */
|
|
24402
|
+
classes: array(RetrainMacroClassSchema).optional(),
|
|
24403
|
+
page: number().int().positive().default(1),
|
|
24404
|
+
pageSize: number().int().positive().max(100).default(50)
|
|
24405
|
+
});
|
|
24406
|
+
var RetrainCorpusPageSchema = object({
|
|
24407
|
+
frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
|
|
24408
|
+
total: number().int().nonnegative(),
|
|
24409
|
+
page: number().int().positive(),
|
|
24410
|
+
pageSize: number().int().positive()
|
|
24411
|
+
});
|
|
24412
|
+
var RetrainCorpusKpiCameraRowSchema = object({
|
|
24413
|
+
deviceId: number(),
|
|
24414
|
+
unannotated: number().int().nonnegative(),
|
|
24415
|
+
annotated: number().int().nonnegative(),
|
|
24416
|
+
complete: number().int().nonnegative(),
|
|
24417
|
+
/** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
|
|
24418
|
+
* `null` when the corpus is empty (no ratio). */
|
|
24419
|
+
pctOfCorpus: number().min(0).max(1).nullable()
|
|
24420
|
+
});
|
|
24421
|
+
var RetrainCorpusKpiSchema = object({
|
|
24422
|
+
total: number().int().nonnegative(),
|
|
24423
|
+
unannotated: number().int().nonnegative(),
|
|
24424
|
+
annotated: number().int().nonnegative(),
|
|
24425
|
+
complete: number().int().nonnegative(),
|
|
24426
|
+
cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
|
|
24427
|
+
});
|
|
23470
24428
|
/**
|
|
23471
24429
|
* Which frames an annotated export carries. Every field narrows; an empty
|
|
23472
|
-
* filter is every annotated copy.
|
|
23473
|
-
*
|
|
23474
|
-
*
|
|
23475
|
-
*
|
|
24430
|
+
* filter is every annotated copy. `frameIds` is the primitive a job or
|
|
24431
|
+
* download uses; `batchId` re-selects what an earlier export carried
|
|
24432
|
+
* (`exportedInBatch`). Frozen dataset versions were removed — live selection
|
|
24433
|
+
* resolves to `frameIds` at plan/start.
|
|
23476
24434
|
*/
|
|
23477
24435
|
var RetrainExportFilterSchema = object({
|
|
23478
24436
|
deviceIds: array(number()).optional(),
|
|
23479
24437
|
frameIds: array(string()).max(2e4).optional(),
|
|
23480
24438
|
/** Only frames in at least one of these named collections. */
|
|
23481
24439
|
collectionIds: array(string()).max(200).optional(),
|
|
23482
|
-
/**
|
|
23483
|
-
|
|
23484
|
-
datasetVersionId: string().optional(),
|
|
24440
|
+
/** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
|
|
24441
|
+
collectionId: string().optional(),
|
|
23485
24442
|
batchId: string().optional(),
|
|
23486
24443
|
/** Only frames the operator marked complete (all subjects boxed). */
|
|
23487
|
-
completeOnly: boolean().optional()
|
|
24444
|
+
completeOnly: boolean().optional(),
|
|
24445
|
+
/** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
|
|
24446
|
+
workState: RetrainFrameWorkStateSchema.optional(),
|
|
24447
|
+
/** Frames with at least one saved annotation in one of these classes. */
|
|
24448
|
+
classes: array(RetrainMacroClassSchema).optional()
|
|
23488
24449
|
});
|
|
23489
24450
|
/**
|
|
23490
24451
|
* `frames`: the full frame copies, boxes in `annotations.json`.
|
|
@@ -23684,8 +24645,7 @@ var RetrainDatasetStatsSchema = object({
|
|
|
23684
24645
|
completeFrames: number().int()
|
|
23685
24646
|
})).readonly()
|
|
23686
24647
|
});
|
|
23687
|
-
|
|
23688
|
-
var RetrainDatasetVersionSchema = object({
|
|
24648
|
+
object({
|
|
23689
24649
|
id: string(),
|
|
23690
24650
|
name: string(),
|
|
23691
24651
|
createdAt: number(),
|
|
@@ -23693,22 +24653,33 @@ var RetrainDatasetVersionSchema = object({
|
|
|
23693
24653
|
layout: RetrainExportLayoutSchema,
|
|
23694
24654
|
completeOnly: boolean(),
|
|
23695
24655
|
frameCount: number().int(),
|
|
23696
|
-
/** sha256 of what the frames taught when the version was frozen. */
|
|
23697
24656
|
annotationHash: string(),
|
|
23698
|
-
/** The export manifest schema the version was cut under. */
|
|
23699
24657
|
manifestSchema: string(),
|
|
23700
24658
|
stats: RetrainDatasetStatsSchema
|
|
23701
24659
|
});
|
|
23702
|
-
|
|
23703
|
-
|
|
23704
|
-
|
|
24660
|
+
/**
|
|
24661
|
+
* Live training corpus criteria — same shape as `TrainingCorpusSelection` on
|
|
24662
|
+
* the training cap. Resolved here so plan/start and the annotated export share
|
|
24663
|
+
* one definition of "the frames" (`buildRetrainExportPlan`).
|
|
24664
|
+
*/
|
|
24665
|
+
var RetrainTrainingCorpusSelectionSchema = object({
|
|
24666
|
+
collectionIds: array(string()).min(1),
|
|
24667
|
+
workState: _enum([
|
|
24668
|
+
"complete",
|
|
24669
|
+
"annotated_or_complete",
|
|
24670
|
+
"any_annotated"
|
|
24671
|
+
]).default("complete")
|
|
24672
|
+
});
|
|
24673
|
+
var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
|
|
24674
|
+
kind: literal("resolved"),
|
|
24675
|
+
frameIds: array(string()).max(2e4).readonly(),
|
|
24676
|
+
stats: RetrainDatasetStatsSchema,
|
|
24677
|
+
annotationHash: string(),
|
|
24678
|
+
layout: RetrainExportLayoutSchema
|
|
23705
24679
|
}), object({
|
|
23706
24680
|
kind: literal("refused"),
|
|
23707
|
-
reason: _enum([
|
|
23708
|
-
|
|
23709
|
-
"duplicate-name",
|
|
23710
|
-
"no-frames"
|
|
23711
|
-
])
|
|
24681
|
+
reason: _enum(["unknown-collection", "no-frames"]),
|
|
24682
|
+
detail: string()
|
|
23712
24683
|
})]);
|
|
23713
24684
|
/** The outcome of a lifecycle move owned by the retrain page. */
|
|
23714
24685
|
var RetrainTransitionResultSchema = object({
|
|
@@ -24415,6 +25386,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
24415
25386
|
}), array(RetrainTrackSchema).readonly(), {
|
|
24416
25387
|
kind: "query",
|
|
24417
25388
|
auth: "admin"
|
|
25389
|
+
}), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
|
|
25390
|
+
kind: "query",
|
|
25391
|
+
auth: "admin"
|
|
25392
|
+
}), method(object({}), RetrainCorpusKpiSchema, {
|
|
25393
|
+
kind: "query",
|
|
25394
|
+
auth: "admin"
|
|
24418
25395
|
}), method(object({ trackId: string() }), RetrainFrameListSchema, {
|
|
24419
25396
|
kind: "query",
|
|
24420
25397
|
auth: "admin"
|
|
@@ -24500,33 +25477,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
24500
25477
|
auth: "admin",
|
|
24501
25478
|
timeoutMs: 60 * 6e4
|
|
24502
25479
|
}), method(object({
|
|
24503
|
-
|
|
24504
|
-
|
|
24505
|
-
}),
|
|
24506
|
-
|
|
24507
|
-
|
|
24508
|
-
|
|
24509
|
-
name: string().max(120),
|
|
24510
|
-
selection: RetrainDatasetSelectionSchema,
|
|
24511
|
-
layout: RetrainExportLayoutSchema,
|
|
24512
|
-
completeOnly: boolean()
|
|
24513
|
-
}), CreateRetrainDatasetVersionResultSchema, {
|
|
24514
|
-
kind: "mutation",
|
|
24515
|
-
auth: "admin",
|
|
24516
|
-
timeoutMs: 12e4
|
|
24517
|
-
}), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
|
|
24518
|
-
kind: "query",
|
|
24519
|
-
auth: "admin"
|
|
24520
|
-
}), method(object({ id: string() }), object({ deleted: boolean() }), {
|
|
24521
|
-
kind: "mutation",
|
|
24522
|
-
auth: "admin"
|
|
24523
|
-
}), method(object({ id: string() }), object({
|
|
24524
|
-
found: boolean(),
|
|
24525
|
-
annotationHash: string(),
|
|
24526
|
-
matches: boolean(),
|
|
24527
|
-
missingFrames: number().int()
|
|
25480
|
+
filter: RetrainExportFilterSchema,
|
|
25481
|
+
layout: RetrainExportLayoutSchema
|
|
25482
|
+
}), object({
|
|
25483
|
+
ticket: PeerBytesTicketSchema,
|
|
25484
|
+
frames: number().int(),
|
|
25485
|
+
annotations: number().int()
|
|
24528
25486
|
}), {
|
|
24529
|
-
kind: "
|
|
25487
|
+
kind: "mutation",
|
|
24530
25488
|
auth: "admin",
|
|
24531
25489
|
timeoutMs: 12e4
|
|
24532
25490
|
}), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
|
|
@@ -24555,6 +25513,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
24555
25513
|
}), method(object({}), array(RetrainCollectionSchema).readonly(), {
|
|
24556
25514
|
kind: "query",
|
|
24557
25515
|
auth: "admin"
|
|
25516
|
+
}), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
|
|
25517
|
+
kind: "query",
|
|
25518
|
+
auth: "admin",
|
|
25519
|
+
timeoutMs: 6e4
|
|
24558
25520
|
}), method(object({
|
|
24559
25521
|
id: string(),
|
|
24560
25522
|
name: string().max(120)
|
|
@@ -25171,11 +26133,14 @@ var HardwareClassIdSchema = _enum([
|
|
|
25171
26133
|
"intel-n-series",
|
|
25172
26134
|
"apple-m-base",
|
|
25173
26135
|
"apple-m-pro",
|
|
26136
|
+
"amd-phoenix",
|
|
25174
26137
|
"unknown"
|
|
25175
26138
|
]);
|
|
25176
26139
|
var AcceleratorKindSchema = _enum([
|
|
25177
26140
|
"intel-npu",
|
|
25178
26141
|
"intel-igpu",
|
|
26142
|
+
"amd-igpu",
|
|
26143
|
+
"amd-npu",
|
|
25179
26144
|
"x86-cpu",
|
|
25180
26145
|
"arm-cpu",
|
|
25181
26146
|
"apple-ane",
|
|
@@ -27105,6 +28070,8 @@ var AgentPipelineSettingsSchema = object({
|
|
|
27105
28070
|
* address is wrong (multi-homed host, NAT, custom interface).
|
|
27106
28071
|
*/
|
|
27107
28072
|
reachableHost: string().optional(),
|
|
28073
|
+
/** Hub-persisted UI colour (`--color-node-*` theme tokens). */
|
|
28074
|
+
color: NodeColorIdSchema.optional(),
|
|
27108
28075
|
/**
|
|
27109
28076
|
* Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
|
|
27110
28077
|
* weight, steps}. Absent / all-disabled ⇒ the node's single default
|
|
@@ -27654,8 +28621,9 @@ method(object({
|
|
|
27654
28621
|
auth: "admin"
|
|
27655
28622
|
}), method(object({
|
|
27656
28623
|
agentNodeId: string(),
|
|
27657
|
-
reachableHost: string().nullable()
|
|
27658
|
-
|
|
28624
|
+
reachableHost: string().nullable().optional(),
|
|
28625
|
+
color: NodeColorIdSchema.nullable().optional()
|
|
28626
|
+
}).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
|
|
27659
28627
|
kind: "mutation",
|
|
27660
28628
|
auth: "admin"
|
|
27661
28629
|
}), method(object({
|
|
@@ -28107,8 +29075,8 @@ version: string().optional() }), ServerUpdateActionResultSchema, {
|
|
|
28107
29075
|
* `smtp-provider` — pluggable email delivery surface.
|
|
28108
29076
|
*
|
|
28109
29077
|
* Collection cap: a deployment may install multiple SMTP relays (e.g.
|
|
28110
|
-
* one for transactional / one for notifications). Consumers (
|
|
28111
|
-
*
|
|
29078
|
+
* one for transactional / one for notifications). Consumers (notifier
|
|
29079
|
+
* addons, …) walk the collection and pick the first
|
|
28112
29080
|
* ready provider OR target a specific addonId.
|
|
28113
29081
|
*
|
|
28114
29082
|
* The shape stays small on purpose — `sendEmail` is enough for the
|
|
@@ -28391,7 +29359,7 @@ targets: array(object({
|
|
|
28391
29359
|
};
|
|
28392
29360
|
/**
|
|
28393
29361
|
* `sso-bridge` — internal hub-only cap that lets SSO-style auth
|
|
28394
|
-
* providers (OIDC, SAML,
|
|
29362
|
+
* providers (OIDC, SAML, …) mint an HMAC-signed token
|
|
28395
29363
|
* carrying the post-callback claims before redirecting back to
|
|
28396
29364
|
* `/api/auth/sso/finish`.
|
|
28397
29365
|
*
|
|
@@ -28454,7 +29422,14 @@ var SsoBridgeClaimsSchema = object({
|
|
|
28454
29422
|
* Verified `iss` of the id_token behind an OIDC login bridge (D782). A
|
|
28455
29423
|
* subject is unique only per issuer, so a link is bound to it.
|
|
28456
29424
|
*/
|
|
28457
|
-
issuer: string().optional()
|
|
29425
|
+
issuer: string().optional(),
|
|
29426
|
+
/**
|
|
29427
|
+
* SHA-256 (hex) of the `camstack_sso_state` cookie the IdP `/start` set in
|
|
29428
|
+
* the browser that began this sign-in. `/api/auth/sso/finish` requires the
|
|
29429
|
+
* request to present the matching cookie — a login bridge is useless in
|
|
29430
|
+
* any other browser.
|
|
29431
|
+
*/
|
|
29432
|
+
browserBinding: string().optional()
|
|
28458
29433
|
});
|
|
28459
29434
|
method(object({
|
|
28460
29435
|
claims: SsoBridgeClaimsSchema,
|
|
@@ -30828,7 +31803,7 @@ var CustomActionInputSchema = object({
|
|
|
30828
31803
|
action: string().min(1),
|
|
30829
31804
|
input: unknown()
|
|
30830
31805
|
});
|
|
30831
|
-
method(
|
|
31806
|
+
method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
|
|
30832
31807
|
addonId: string(),
|
|
30833
31808
|
limit: number().min(1).max(500).default(100),
|
|
30834
31809
|
level: LogLevelSchema$2.optional()
|
|
@@ -35898,7 +36873,13 @@ var TopologyNodeSchema = object({
|
|
|
35898
36873
|
})).readonly(),
|
|
35899
36874
|
processes: array(TopologyProcessSchema).readonly(),
|
|
35900
36875
|
categories: array(TopologyCategorySchema).readonly(),
|
|
35901
|
-
rootPackage: TopologyRootPackageSchema.nullable()
|
|
36876
|
+
rootPackage: TopologyRootPackageSchema.nullable(),
|
|
36877
|
+
/**
|
|
36878
|
+
* How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
|
|
36879
|
+
* completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
|
|
36880
|
+
* for offline rows and when the hub cannot tell.
|
|
36881
|
+
*/
|
|
36882
|
+
meshTransport: _enum(["tls", "clear"]).optional()
|
|
35902
36883
|
});
|
|
35903
36884
|
var CapUsageEdgeSchema = object({
|
|
35904
36885
|
callerAddonId: string(),
|
|
@@ -36311,6 +37292,7 @@ var OsdNamedTemplateSchema = object({
|
|
|
36311
37292
|
});
|
|
36312
37293
|
/** Where a slot's value comes from. */
|
|
36313
37294
|
var OsdSourceSchema = discriminatedUnion("kind", [
|
|
37295
|
+
object({ kind: literal("none") }),
|
|
36314
37296
|
object({
|
|
36315
37297
|
kind: literal("static"),
|
|
36316
37298
|
text: string().max(64)
|
|
@@ -36437,6 +37419,13 @@ method(object({ deviceId: number().int() }), object({
|
|
|
36437
37419
|
}), object({ success: literal(true) }), {
|
|
36438
37420
|
kind: "mutation",
|
|
36439
37421
|
auth: "admin"
|
|
37422
|
+
}), method(object({
|
|
37423
|
+
deviceId: number().int(),
|
|
37424
|
+
slotId: string().min(1),
|
|
37425
|
+
enabled: boolean()
|
|
37426
|
+
}), object({ success: literal(true) }), {
|
|
37427
|
+
kind: "mutation",
|
|
37428
|
+
auth: "admin"
|
|
36440
37429
|
}), method(object({
|
|
36441
37430
|
sourceDeviceId: number().int(),
|
|
36442
37431
|
targetDeviceId: number().int()
|
|
@@ -36868,7 +37857,15 @@ var GpuInfoSchema = object({
|
|
|
36868
37857
|
name: string(),
|
|
36869
37858
|
memoryMB: number().optional()
|
|
36870
37859
|
});
|
|
36871
|
-
var NpuInfoSchema = object({
|
|
37860
|
+
var NpuInfoSchema = object({
|
|
37861
|
+
type: _enum([
|
|
37862
|
+
"apple-ane",
|
|
37863
|
+
"intel-npu",
|
|
37864
|
+
"amd-xdna"
|
|
37865
|
+
]),
|
|
37866
|
+
name: string().optional(),
|
|
37867
|
+
generation: _enum(["xdna1", "xdna2"]).optional()
|
|
37868
|
+
});
|
|
36872
37869
|
var CoralInfoSchema = object({
|
|
36873
37870
|
type: literal("coral-edgetpu"),
|
|
36874
37871
|
bus: string().optional()
|
|
@@ -40721,16 +41718,6 @@ var ApiKeySummarySchema = object({
|
|
|
40721
41718
|
createdAt: number(),
|
|
40722
41719
|
lastUsedAt: number().optional()
|
|
40723
41720
|
});
|
|
40724
|
-
var CreateApiKeyInputSchema = object({
|
|
40725
|
-
label: string(),
|
|
40726
|
-
isAdmin: boolean().default(false),
|
|
40727
|
-
allowedProviders: union([array(string()), literal("*")]).optional(),
|
|
40728
|
-
allowedDevices: record(string(), union([array(string()), literal("*")])).optional()
|
|
40729
|
-
});
|
|
40730
|
-
var CreateApiKeyResultSchema = object({
|
|
40731
|
-
token: string(),
|
|
40732
|
-
record: ApiKeySummarySchema
|
|
40733
|
-
});
|
|
40734
41721
|
var ScopedTokenSummarySchema = object({
|
|
40735
41722
|
id: string(),
|
|
40736
41723
|
userId: string(),
|
|
@@ -40829,17 +41816,10 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
40829
41816
|
}), UserSummarySchema.extend({ passwordHash: string() }).nullable(), {
|
|
40830
41817
|
kind: "mutation",
|
|
40831
41818
|
access: "view"
|
|
40832
|
-
}), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(
|
|
40833
|
-
kind: "mutation",
|
|
40834
|
-
auth: "admin",
|
|
40835
|
-
access: "create"
|
|
40836
|
-
}), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
41819
|
+
}), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
40837
41820
|
kind: "mutation",
|
|
40838
41821
|
auth: "admin",
|
|
40839
41822
|
access: "delete"
|
|
40840
|
-
}), method(object({ token: string() }), ApiKeySummarySchema.nullable(), {
|
|
40841
|
-
kind: "mutation",
|
|
40842
|
-
access: "view"
|
|
40843
41823
|
}), method(CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, {
|
|
40844
41824
|
kind: "mutation",
|
|
40845
41825
|
auth: "admin",
|
|
@@ -40913,15 +41893,7 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
40913
41893
|
}).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
|
|
40914
41894
|
userId: string(),
|
|
40915
41895
|
issuer: string()
|
|
40916
|
-
}).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
|
|
40917
|
-
userId: string(),
|
|
40918
|
-
issuer: string().min(1),
|
|
40919
|
-
label: string().optional()
|
|
40920
|
-
}), object({ success: literal(true) }), {
|
|
40921
|
-
kind: "mutation",
|
|
40922
|
-
auth: "admin",
|
|
40923
|
-
access: "create"
|
|
40924
|
-
}), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
41896
|
+
}).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
40925
41897
|
kind: "mutation",
|
|
40926
41898
|
auth: "admin",
|
|
40927
41899
|
access: "delete"
|
|
@@ -41626,6 +42598,563 @@ var zoneRulesCapability = {
|
|
|
41626
42598
|
*/
|
|
41627
42599
|
durability: "restored"
|
|
41628
42600
|
};
|
|
42601
|
+
/**
|
|
42602
|
+
* `training-provider` — ONE cloud that can run the CamStack trainer.
|
|
42603
|
+
*
|
|
42604
|
+
* A thin, mockable translation layer: it knows how to run a container with a
|
|
42605
|
+
* GPU, move a dataset in, read the job's stdout and hand artefacts back. It
|
|
42606
|
+
* knows nothing about datasets, splits, floors, cost policy or Model Studio —
|
|
42607
|
+
* those are the `training` orchestrator's (D805). Every rule written there
|
|
42608
|
+
* once is what makes a second provider (RunPod, a local NVIDIA node) a new
|
|
42609
|
+
* manifest entry and nothing else.
|
|
42610
|
+
*
|
|
42611
|
+
* Collection of provider **types** (addons). Each addon owns zero or more
|
|
42612
|
+
* **entries** (credentials + defaults). Concat-fans: `describe`,
|
|
42613
|
+
* `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
|
|
42614
|
+
* `entryId`; callers also pass the owning `addonId` as the collection
|
|
42615
|
+
* selector (broker posture). Every method is `admin`: these spend money.
|
|
42616
|
+
*
|
|
42617
|
+
* Every cloud object a provider creates is tagged with the orchestrator's
|
|
42618
|
+
* `jobKey`, so a retried submit finds the job it already started instead of
|
|
42619
|
+
* starting a second GPU, and `listJobs` can find orphans.
|
|
42620
|
+
*
|
|
42621
|
+
* Bytes never ride a cap field: the dataset arrives as a `ctx.peerBytes`
|
|
42622
|
+
* ticket the producer (pipeline-analytics) minted, and artefacts leave as a
|
|
42623
|
+
* ticket the provider mints (D613).
|
|
42624
|
+
*/
|
|
42625
|
+
var TrainingGpuOptionSchema = object({
|
|
42626
|
+
id: string(),
|
|
42627
|
+
label: string(),
|
|
42628
|
+
/** List price, USD per GPU-hour, before any region multiplier. */
|
|
42629
|
+
usdPerHour: number().nonnegative(),
|
|
42630
|
+
vramGb: number().nonnegative()
|
|
42631
|
+
});
|
|
42632
|
+
var TrainingRegionOptionSchema = object({
|
|
42633
|
+
/** `''` = any region (the provider's choice). */
|
|
42634
|
+
id: string(),
|
|
42635
|
+
label: string(),
|
|
42636
|
+
priceMultiplier: number().positive()
|
|
42637
|
+
});
|
|
42638
|
+
/**
|
|
42639
|
+
* The provider's per-entry settings, as the orchestrator reads them. They
|
|
42640
|
+
* live on the PROVIDER addon's entry (operator decision 2026-10-08: they
|
|
42641
|
+
* depend on the user's account), never hard-coded in the orchestrator.
|
|
42642
|
+
*/
|
|
42643
|
+
var TrainingProviderDefaultsSchema = object({
|
|
42644
|
+
gpuType: string(),
|
|
42645
|
+
region: string(),
|
|
42646
|
+
costCapUsd: number().nonnegative(),
|
|
42647
|
+
maxRuntimeSec: number().int().positive(),
|
|
42648
|
+
/** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
|
|
42649
|
+
failedDatasetGraceHours: number().nonnegative()
|
|
42650
|
+
});
|
|
42651
|
+
/**
|
|
42652
|
+
* Entry form schema for a provider type — same seam as notification
|
|
42653
|
+
* `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
|
|
42654
|
+
* {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
|
|
42655
|
+
*/
|
|
42656
|
+
var ConfigSchemaPassthrough = unknown();
|
|
42657
|
+
/** One creatable provider type, for the Add-entry dialog. */
|
|
42658
|
+
var TrainingProviderTypeSchema = object({
|
|
42659
|
+
typeId: string(),
|
|
42660
|
+
label: string(),
|
|
42661
|
+
/** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
|
|
42662
|
+
iconAsset: string(),
|
|
42663
|
+
/** Owning `training-provider` addon — collection selector for createEntry. */
|
|
42664
|
+
addonId: string(),
|
|
42665
|
+
/**
|
|
42666
|
+
* Fields for one entry of this type (credentials + defaults). Absent on a
|
|
42667
|
+
* type that only needs a name. Password fields are keychain-backed on the
|
|
42668
|
+
* provider addon (`secretStatePaths`), not D634 plaintext.
|
|
42669
|
+
*/
|
|
42670
|
+
configSchema: ConfigSchemaPassthrough.optional()
|
|
42671
|
+
});
|
|
42672
|
+
/** One configured account / workspace under a provider type. */
|
|
42673
|
+
var TrainingProviderEntrySchema = object({
|
|
42674
|
+
entryId: string(),
|
|
42675
|
+
typeId: string(),
|
|
42676
|
+
name: string(),
|
|
42677
|
+
addonId: string(),
|
|
42678
|
+
/** Credentials are present — never the values. */
|
|
42679
|
+
configured: boolean()
|
|
42680
|
+
});
|
|
42681
|
+
var TrainingProviderDescriptorSchema = object({
|
|
42682
|
+
addonId: string(),
|
|
42683
|
+
entryId: string(),
|
|
42684
|
+
typeId: string(),
|
|
42685
|
+
/** Operator-chosen entry name. */
|
|
42686
|
+
name: string(),
|
|
42687
|
+
iconAsset: string(),
|
|
42688
|
+
/** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
|
|
42689
|
+
kind: string(),
|
|
42690
|
+
label: string(),
|
|
42691
|
+
gpuTypes: array(TrainingGpuOptionSchema).readonly(),
|
|
42692
|
+
regions: array(TrainingRegionOptionSchema).readonly(),
|
|
42693
|
+
maxDatasetBytes: number().int().positive(),
|
|
42694
|
+
maxRuntimeSec: number().int().positive(),
|
|
42695
|
+
freeTierNote: string().optional(),
|
|
42696
|
+
/** Where the data goes, in one sentence the confirm dialog repeats. */
|
|
42697
|
+
dataResidencyNote: string(),
|
|
42698
|
+
/** Credentials are present — never the values. */
|
|
42699
|
+
configured: boolean(),
|
|
42700
|
+
defaults: TrainingProviderDefaultsSchema,
|
|
42701
|
+
/**
|
|
42702
|
+
* Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
|
|
42703
|
+
* fields are keychain {@link SecretFieldView} or `null` / `''` (create),
|
|
42704
|
+
* never plaintext. Same hydrate contract as settings forms (D789).
|
|
42705
|
+
*/
|
|
42706
|
+
formValues: record(string(), unknown()).optional()
|
|
42707
|
+
});
|
|
42708
|
+
/**
|
|
42709
|
+
* Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
|
|
42710
|
+
* An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
|
|
42711
|
+
* `{ $secretClear: true }` clears it.
|
|
42712
|
+
*/
|
|
42713
|
+
var TrainingProviderUpdateEntryInputSchema = object({
|
|
42714
|
+
entryId: string().min(1),
|
|
42715
|
+
name: string().min(1),
|
|
42716
|
+
tokenId: string().optional(),
|
|
42717
|
+
tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
|
|
42718
|
+
environment: string().optional(),
|
|
42719
|
+
gpuType: string().optional(),
|
|
42720
|
+
region: string().optional(),
|
|
42721
|
+
costCapUsd: number().nonnegative().optional(),
|
|
42722
|
+
maxRuntimeSec: number().int().positive().optional(),
|
|
42723
|
+
failedDatasetGraceHours: number().nonnegative().optional()
|
|
42724
|
+
});
|
|
42725
|
+
var TrainingCredentialCheckSchema = object({
|
|
42726
|
+
ok: boolean(),
|
|
42727
|
+
/** Workspace / account name, when the provider says. */
|
|
42728
|
+
account: string().optional(),
|
|
42729
|
+
reason: _enum([
|
|
42730
|
+
"missing",
|
|
42731
|
+
"invalid",
|
|
42732
|
+
"forbidden",
|
|
42733
|
+
"network",
|
|
42734
|
+
"quota"
|
|
42735
|
+
]).optional(),
|
|
42736
|
+
detail: string().optional()
|
|
42737
|
+
});
|
|
42738
|
+
var ProviderJobStateSchema = _enum([
|
|
42739
|
+
"pending",
|
|
42740
|
+
"starting",
|
|
42741
|
+
"running",
|
|
42742
|
+
"succeeded",
|
|
42743
|
+
"failed",
|
|
42744
|
+
"cancelled",
|
|
42745
|
+
"lost"
|
|
42746
|
+
]);
|
|
42747
|
+
var ProviderJobStatusSchema = object({
|
|
42748
|
+
jobKey: string(),
|
|
42749
|
+
providerJobId: string().optional(),
|
|
42750
|
+
state: ProviderJobStateSchema,
|
|
42751
|
+
startedAt: number().optional(),
|
|
42752
|
+
endedAt: number().optional(),
|
|
42753
|
+
exitCode: number().int().optional(),
|
|
42754
|
+
failureReason: string().optional(),
|
|
42755
|
+
gpuType: string(),
|
|
42756
|
+
region: string().optional(),
|
|
42757
|
+
billedSeconds: number().nonnegative(),
|
|
42758
|
+
costUsd: number().nonnegative(),
|
|
42759
|
+
/** True when `costUsd` is runtime × list price, not a billing answer. */
|
|
42760
|
+
costIsEstimate: boolean(),
|
|
42761
|
+
lastFetchedAt: number()
|
|
42762
|
+
});
|
|
42763
|
+
/**
|
|
42764
|
+
* The trainer the job runs, by SOURCE revision: the provider turns it into an
|
|
42765
|
+
* image its own way (Modal builds the published Dockerfile at that revision;
|
|
42766
|
+
* a registry-pull provider maps it to a tag). Recorded on the job and echoed
|
|
42767
|
+
* in `result.json`.
|
|
42768
|
+
*/
|
|
42769
|
+
var TrainerSourceRefSchema = object({
|
|
42770
|
+
/** Hugging Face repo id, e.g. `camstack/camstack-trainer`. */
|
|
42771
|
+
repo: string().min(1),
|
|
42772
|
+
/** A commit sha (never a branch) — the job must be reproducible. */
|
|
42773
|
+
revision: string().regex(/^[0-9a-f]{7,64}$/)
|
|
42774
|
+
});
|
|
42775
|
+
/** Cloud job identity — route with the owning addon's `addonId` selector. */
|
|
42776
|
+
var JobRef = {
|
|
42777
|
+
entryId: string().min(1),
|
|
42778
|
+
jobKey: string().uuid()
|
|
42779
|
+
};
|
|
42780
|
+
var TrainingLogLineSchema = object({
|
|
42781
|
+
ts: number(),
|
|
42782
|
+
text: string()
|
|
42783
|
+
});
|
|
42784
|
+
method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
|
|
42785
|
+
typeId: string().min(1),
|
|
42786
|
+
name: string().min(1)
|
|
42787
|
+
}), object({ entryId: string() }), {
|
|
42788
|
+
kind: "mutation",
|
|
42789
|
+
auth: "admin"
|
|
42790
|
+
}), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
|
|
42791
|
+
kind: "mutation",
|
|
42792
|
+
auth: "admin"
|
|
42793
|
+
}), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
|
|
42794
|
+
kind: "mutation",
|
|
42795
|
+
auth: "admin"
|
|
42796
|
+
}), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
|
|
42797
|
+
kind: "mutation",
|
|
42798
|
+
auth: "admin",
|
|
42799
|
+
timeoutMs: 3e4
|
|
42800
|
+
}), method(object({
|
|
42801
|
+
entryId: string().min(1),
|
|
42802
|
+
gpuType: string(),
|
|
42803
|
+
region: string(),
|
|
42804
|
+
datasetBytes: number().int().nonnegative(),
|
|
42805
|
+
gpuSecondsLow: number().nonnegative(),
|
|
42806
|
+
gpuSecondsHigh: number().nonnegative()
|
|
42807
|
+
}), object({
|
|
42808
|
+
usdLow: number().nonnegative(),
|
|
42809
|
+
usdHigh: number().nonnegative(),
|
|
42810
|
+
notes: array(string()).readonly()
|
|
42811
|
+
}), { auth: "admin" }), method(object({
|
|
42812
|
+
...JobRef,
|
|
42813
|
+
ticket: PeerBytesTicketSchema
|
|
42814
|
+
}), object({
|
|
42815
|
+
bytes: number().int().nonnegative(),
|
|
42816
|
+
sha256: string()
|
|
42817
|
+
}), {
|
|
42818
|
+
kind: "mutation",
|
|
42819
|
+
auth: "admin",
|
|
42820
|
+
timeoutMs: 120 * 6e4
|
|
42821
|
+
}), method(object({
|
|
42822
|
+
...JobRef,
|
|
42823
|
+
trainer: TrainerSourceRefSchema,
|
|
42824
|
+
jobSpecJson: string().min(2).max(64e3),
|
|
42825
|
+
gpuType: string(),
|
|
42826
|
+
region: string(),
|
|
42827
|
+
maxRuntimeSec: number().int().positive()
|
|
42828
|
+
}), ProviderJobStatusSchema, {
|
|
42829
|
+
kind: "mutation",
|
|
42830
|
+
auth: "admin",
|
|
42831
|
+
timeoutMs: 30 * 6e4
|
|
42832
|
+
}), method(object(JobRef), ProviderJobStatusSchema, {
|
|
42833
|
+
auth: "admin",
|
|
42834
|
+
timeoutMs: 6e4
|
|
42835
|
+
}), method(object({
|
|
42836
|
+
...JobRef,
|
|
42837
|
+
cursor: string().optional(),
|
|
42838
|
+
max: number().int().min(1).max(500)
|
|
42839
|
+
}), object({
|
|
42840
|
+
lines: array(TrainingLogLineSchema).readonly(),
|
|
42841
|
+
cursor: string()
|
|
42842
|
+
}), {
|
|
42843
|
+
auth: "admin",
|
|
42844
|
+
timeoutMs: 6e4
|
|
42845
|
+
}), method(object(JobRef), object({ ok: literal(true) }), {
|
|
42846
|
+
kind: "mutation",
|
|
42847
|
+
auth: "admin",
|
|
42848
|
+
timeoutMs: 6e4
|
|
42849
|
+
}), method(object(JobRef), object({
|
|
42850
|
+
found: boolean(),
|
|
42851
|
+
text: string().optional()
|
|
42852
|
+
}), {
|
|
42853
|
+
kind: "mutation",
|
|
42854
|
+
auth: "admin",
|
|
42855
|
+
timeoutMs: 5 * 6e4
|
|
42856
|
+
}), method(object({
|
|
42857
|
+
...JobRef,
|
|
42858
|
+
path: _enum(["bundle.tar"])
|
|
42859
|
+
}), object({ ticket: PeerBytesTicketSchema }), {
|
|
42860
|
+
kind: "mutation",
|
|
42861
|
+
auth: "admin",
|
|
42862
|
+
timeoutMs: 5 * 6e4
|
|
42863
|
+
}), method(object(JobRef), object({ deleted: array(string()).readonly() }), {
|
|
42864
|
+
kind: "mutation",
|
|
42865
|
+
auth: "admin",
|
|
42866
|
+
timeoutMs: 5 * 6e4
|
|
42867
|
+
}), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
|
|
42868
|
+
auth: "admin",
|
|
42869
|
+
timeoutMs: 2 * 6e4
|
|
42870
|
+
});
|
|
42871
|
+
/**
|
|
42872
|
+
* `training` — the cloud-training orchestrator (D805). Hub-only singleton,
|
|
42873
|
+
* provided by `addon-training`.
|
|
42874
|
+
*
|
|
42875
|
+
* It owns what every provider must agree on, written once:
|
|
42876
|
+
*
|
|
42877
|
+
* - **Jobs.** A persisted state machine, a reconcile loop against the
|
|
42878
|
+
* provider, a cost guard, a daily orphan sweep and the retention rules.
|
|
42879
|
+
* - **The return flow.** Verified artefacts → Model Studio
|
|
42880
|
+
* (`custom-model-registry.importModelBundle`) → canary on cameras →
|
|
42881
|
+
* rollback. Nothing is ever registered automatically.
|
|
42882
|
+
*
|
|
42883
|
+
* Plan/start takes a live {@link TrainingCorpusSelection} (collections +
|
|
42884
|
+
* work-state rule); frame ids are resolved via pipeline-analytics at that
|
|
42885
|
+
* moment and snapshotted on the job. No frozen dataset version.
|
|
42886
|
+
*
|
|
42887
|
+
* Every method is `admin`.
|
|
42888
|
+
*/
|
|
42889
|
+
/**
|
|
42890
|
+
* Live corpus criteria for plan/start (design §5.2). Default is complete-only.
|
|
42891
|
+
* Frame ids are resolved at plan/start — never a frozen version id.
|
|
42892
|
+
*/
|
|
42893
|
+
var TrainingCorpusSelectionSchema = object({
|
|
42894
|
+
collectionIds: array(string()).min(1),
|
|
42895
|
+
/** Default complete-only for v1 */
|
|
42896
|
+
workState: _enum([
|
|
42897
|
+
"complete",
|
|
42898
|
+
"annotated_or_complete",
|
|
42899
|
+
"any_annotated"
|
|
42900
|
+
]).default("complete")
|
|
42901
|
+
});
|
|
42902
|
+
/** A base model a detector job can fine-tune, and the baseline it is judged against. */
|
|
42903
|
+
var TrainingBaseModelSchema = object({
|
|
42904
|
+
modelId: string(),
|
|
42905
|
+
label: string(),
|
|
42906
|
+
weights: string(),
|
|
42907
|
+
imgsz: number().int(),
|
|
42908
|
+
baselineOnnxUrl: string(),
|
|
42909
|
+
baselineFloors: record(string(), number()),
|
|
42910
|
+
/** The base the fleet runs most — the UI's default. */
|
|
42911
|
+
recommended: boolean()
|
|
42912
|
+
});
|
|
42913
|
+
var TrainingPresetSchema = _enum([
|
|
42914
|
+
"quick",
|
|
42915
|
+
"standard",
|
|
42916
|
+
"thorough"
|
|
42917
|
+
]);
|
|
42918
|
+
var TrainingJobRequestSchema = object({
|
|
42919
|
+
/** Live collection + work-state criteria; resolved at plan/start. */
|
|
42920
|
+
selection: TrainingCorpusSelectionSchema,
|
|
42921
|
+
/**
|
|
42922
|
+
* The provider **entry** that runs it (credentials + defaults).
|
|
42923
|
+
* Resolve to an owning addon via `training-provider.describe` / `listEntries`.
|
|
42924
|
+
*/
|
|
42925
|
+
entryId: string().min(1),
|
|
42926
|
+
gpuType: string().min(1),
|
|
42927
|
+
region: string(),
|
|
42928
|
+
baseModelId: string().min(1),
|
|
42929
|
+
preset: TrainingPresetSchema,
|
|
42930
|
+
/** Freeze the backbone's first N layers; `null` = the preset's choice. */
|
|
42931
|
+
freeze: number().int().nonnegative().nullable(),
|
|
42932
|
+
/** Cameras held out whole for evaluation; `null` = the orchestrator's default. */
|
|
42933
|
+
holdoutCameras: array(number().int()).nullable()
|
|
42934
|
+
});
|
|
42935
|
+
var TrainingSplitPlanSchema = object({
|
|
42936
|
+
holdoutCameras: array(number().int()).readonly(),
|
|
42937
|
+
/** Used when no camera is held out: the last N days of every camera. */
|
|
42938
|
+
holdoutLastDays: number().int().nonnegative(),
|
|
42939
|
+
/** Holdout subjects per class (camera holdout only; `null` = known only after the split). */
|
|
42940
|
+
holdoutSupport: record(string(), number().int()).nullable(),
|
|
42941
|
+
trainSubjects: number().int()
|
|
42942
|
+
});
|
|
42943
|
+
var TrainingRefusalReasonSchema = _enum([
|
|
42944
|
+
"unknown-dataset",
|
|
42945
|
+
"unknown-provider",
|
|
42946
|
+
"provider-not-configured",
|
|
42947
|
+
"unknown-base-model",
|
|
42948
|
+
"unknown-gpu",
|
|
42949
|
+
"dataset-too-large",
|
|
42950
|
+
"no-training-subjects",
|
|
42951
|
+
"job-already-running"
|
|
42952
|
+
]);
|
|
42953
|
+
var TrainingJobPlanSchema = object({
|
|
42954
|
+
refusal: object({
|
|
42955
|
+
reason: TrainingRefusalReasonSchema,
|
|
42956
|
+
detail: string()
|
|
42957
|
+
}).nullable(),
|
|
42958
|
+
warnings: array(string()).readonly(),
|
|
42959
|
+
split: TrainingSplitPlanSchema.nullable(),
|
|
42960
|
+
estimate: object({
|
|
42961
|
+
datasetBytes: number().int(),
|
|
42962
|
+
uploadMinutesAt20Mbps: number(),
|
|
42963
|
+
gpuSecondsLow: number(),
|
|
42964
|
+
gpuSecondsHigh: number(),
|
|
42965
|
+
usdLow: number(),
|
|
42966
|
+
usdHigh: number(),
|
|
42967
|
+
notes: array(string()).readonly()
|
|
42968
|
+
}).nullable(),
|
|
42969
|
+
/** Pre-filled from the provider's settings; the operator may lower or raise them. */
|
|
42970
|
+
defaults: object({
|
|
42971
|
+
maxCostUsd: number(),
|
|
42972
|
+
maxRuntimeSec: number().int()
|
|
42973
|
+
}).nullable(),
|
|
42974
|
+
/** The sentence the confirm dialog repeats: where the frames go and when they are deleted. */
|
|
42975
|
+
dataNotice: string()
|
|
42976
|
+
});
|
|
42977
|
+
/**
|
|
42978
|
+
* Orchestrator-owned states, persisted. `uploading` covers exporting the
|
|
42979
|
+
* archive (it is streamed, never staged). Terminal: `failed`, `cancelled`,
|
|
42980
|
+
* `lost`, `expired`, `discarded`. `registered` and `canary` are where a
|
|
42981
|
+
* result lives after the operator acted on it.
|
|
42982
|
+
*/
|
|
42983
|
+
var TrainingJobStateSchema = _enum([
|
|
42984
|
+
"queued",
|
|
42985
|
+
"uploading",
|
|
42986
|
+
"submitted",
|
|
42987
|
+
"starting",
|
|
42988
|
+
"running",
|
|
42989
|
+
"collecting",
|
|
42990
|
+
"ready",
|
|
42991
|
+
"registered",
|
|
42992
|
+
"canary",
|
|
42993
|
+
"failed",
|
|
42994
|
+
"cancelling",
|
|
42995
|
+
"cancelled",
|
|
42996
|
+
"lost",
|
|
42997
|
+
"expired",
|
|
42998
|
+
"discarded"
|
|
42999
|
+
]);
|
|
43000
|
+
var TrainingFailureReasonSchema = _enum([
|
|
43001
|
+
"cost-cap",
|
|
43002
|
+
"runtime-cap",
|
|
43003
|
+
"upload-failed",
|
|
43004
|
+
"submit-failed",
|
|
43005
|
+
"trainer-failed",
|
|
43006
|
+
"result-invalid",
|
|
43007
|
+
"checksum-mismatch",
|
|
43008
|
+
"fetch-failed",
|
|
43009
|
+
"provider-error",
|
|
43010
|
+
"hub-restart-during-upload"
|
|
43011
|
+
]);
|
|
43012
|
+
var TrainingProgressPointSchema = object({
|
|
43013
|
+
epoch: number().int(),
|
|
43014
|
+
map50: number().nullable(),
|
|
43015
|
+
map50_95: number().nullable()
|
|
43016
|
+
});
|
|
43017
|
+
var TrainingCanarySchema = object({
|
|
43018
|
+
deviceIds: array(number().int()).readonly(),
|
|
43019
|
+
since: number(),
|
|
43020
|
+
/** Every override the canary replaced, exactly, so rollback restores it. */
|
|
43021
|
+
previous: array(object({
|
|
43022
|
+
deviceId: number().int(),
|
|
43023
|
+
nodeId: string(),
|
|
43024
|
+
deviceKey: string(),
|
|
43025
|
+
patch: object({
|
|
43026
|
+
modelId: string().optional(),
|
|
43027
|
+
settings: record(string(), unknown()).readonly().optional()
|
|
43028
|
+
}).nullable()
|
|
43029
|
+
})).readonly()
|
|
43030
|
+
});
|
|
43031
|
+
var TrainingJobSchema = object({
|
|
43032
|
+
id: string(),
|
|
43033
|
+
idempotencyKey: string(),
|
|
43034
|
+
name: string(),
|
|
43035
|
+
createdAt: number(),
|
|
43036
|
+
updatedAt: number(),
|
|
43037
|
+
state: TrainingJobStateSchema,
|
|
43038
|
+
/**
|
|
43039
|
+
* Shared by every job enqueued together via `startJobBatch`.
|
|
43040
|
+
* `null` for a lone `startJob`. The engine advances queued siblings by this id.
|
|
43041
|
+
*/
|
|
43042
|
+
batchId: string().nullable().default(null),
|
|
43043
|
+
stage: TrainingStageSchema.nullable(),
|
|
43044
|
+
failure: object({
|
|
43045
|
+
reason: TrainingFailureReasonSchema,
|
|
43046
|
+
stage: string().nullable(),
|
|
43047
|
+
detail: string()
|
|
43048
|
+
}).nullable(),
|
|
43049
|
+
request: TrainingJobRequestSchema,
|
|
43050
|
+
maxCostUsd: number().nonnegative(),
|
|
43051
|
+
maxRuntimeSec: number().int().positive(),
|
|
43052
|
+
trainer: TrainerSourceRefSchema,
|
|
43053
|
+
datasetLayout: RetrainExportLayoutSchema,
|
|
43054
|
+
/** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
|
|
43055
|
+
frameCount: number().int().nonnegative(),
|
|
43056
|
+
/** Resolved frame ids at start — the archive ships exactly these. */
|
|
43057
|
+
frameIds: array(string()).max(2e4).readonly(),
|
|
43058
|
+
/** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
|
|
43059
|
+
annotationHash: string(),
|
|
43060
|
+
dataset: object({
|
|
43061
|
+
bytes: number().int(),
|
|
43062
|
+
sha256: string(),
|
|
43063
|
+
uploadedAt: number()
|
|
43064
|
+
}).nullable(),
|
|
43065
|
+
split: TrainingSplitPlanSchema,
|
|
43066
|
+
provider: object({
|
|
43067
|
+
state: ProviderJobStateSchema.nullable(),
|
|
43068
|
+
providerJobId: string().nullable(),
|
|
43069
|
+
startedAt: number().nullable(),
|
|
43070
|
+
endedAt: number().nullable(),
|
|
43071
|
+
billedSeconds: number(),
|
|
43072
|
+
costUsd: number(),
|
|
43073
|
+
costIsEstimate: boolean(),
|
|
43074
|
+
lastPolledAt: number().nullable()
|
|
43075
|
+
}),
|
|
43076
|
+
progress: object({
|
|
43077
|
+
epoch: number().int().nullable(),
|
|
43078
|
+
epochs: number().int().nullable(),
|
|
43079
|
+
etaSec: number().nullable(),
|
|
43080
|
+
series: array(TrainingProgressPointSchema).readonly()
|
|
43081
|
+
}),
|
|
43082
|
+
/** The last lines of the job's output (≤ 200), newest last. Never frame paths. */
|
|
43083
|
+
logTail: array(string()).readonly(),
|
|
43084
|
+
logCursor: string().nullable(),
|
|
43085
|
+
artifacts: object({
|
|
43086
|
+
bundleBytes: number().int(),
|
|
43087
|
+
bundleSha256: string(),
|
|
43088
|
+
fetchedAt: number(),
|
|
43089
|
+
/** When the staged artefacts are deleted from the hub. */
|
|
43090
|
+
expiresAt: number()
|
|
43091
|
+
}).nullable(),
|
|
43092
|
+
/** When the provider-side copy of the frames was deleted; null while it exists. */
|
|
43093
|
+
cloudDatasetDeletedAt: number().nullable(),
|
|
43094
|
+
/** A failed job's dataset is kept until then (the provider's grace), then deleted. */
|
|
43095
|
+
cloudCleanupDueAt: number().nullable(),
|
|
43096
|
+
/** Model ids registered from this job (base, and int8 when kept). */
|
|
43097
|
+
registeredModelIds: array(string()).readonly(),
|
|
43098
|
+
canary: TrainingCanarySchema.nullable()
|
|
43099
|
+
});
|
|
43100
|
+
var IdInput = object({ id: string().min(1) });
|
|
43101
|
+
method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
|
|
43102
|
+
auth: "admin",
|
|
43103
|
+
timeoutMs: 6e4
|
|
43104
|
+
}), method(TrainingJobRequestSchema.extend({
|
|
43105
|
+
name: string().min(1).max(120),
|
|
43106
|
+
maxCostUsd: number().positive(),
|
|
43107
|
+
maxRuntimeSec: number().int().positive(),
|
|
43108
|
+
idempotencyKey: string().min(8).max(80)
|
|
43109
|
+
}), discriminatedUnion("kind", [object({
|
|
43110
|
+
kind: literal("started"),
|
|
43111
|
+
job: TrainingJobSchema
|
|
43112
|
+
}), object({
|
|
43113
|
+
kind: literal("refused"),
|
|
43114
|
+
reason: TrainingRefusalReasonSchema,
|
|
43115
|
+
detail: string()
|
|
43116
|
+
})]), {
|
|
43117
|
+
kind: "mutation",
|
|
43118
|
+
auth: "admin",
|
|
43119
|
+
timeoutMs: 12e4
|
|
43120
|
+
}), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
|
|
43121
|
+
baseModelIds: array(string().min(1)).min(1),
|
|
43122
|
+
name: string().min(1).max(120),
|
|
43123
|
+
maxCostUsd: number().positive(),
|
|
43124
|
+
maxRuntimeSec: number().int().positive(),
|
|
43125
|
+
idempotencyKey: string().min(8).max(80)
|
|
43126
|
+
}), discriminatedUnion("kind", [object({
|
|
43127
|
+
kind: literal("started"),
|
|
43128
|
+
batchId: string(),
|
|
43129
|
+
jobs: array(TrainingJobSchema).min(1).readonly()
|
|
43130
|
+
}), object({
|
|
43131
|
+
kind: literal("refused"),
|
|
43132
|
+
reason: TrainingRefusalReasonSchema,
|
|
43133
|
+
detail: string()
|
|
43134
|
+
})]), {
|
|
43135
|
+
kind: "mutation",
|
|
43136
|
+
auth: "admin",
|
|
43137
|
+
timeoutMs: 12e4
|
|
43138
|
+
}), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
|
|
43139
|
+
kind: "mutation",
|
|
43140
|
+
auth: "admin",
|
|
43141
|
+
timeoutMs: 12e4
|
|
43142
|
+
}), method(IdInput, TrainingResultSchema.nullable(), { auth: "admin" }), method(IdInput.extend({ canaryDeviceIds: array(number().int()).readonly() }), TrainingJobSchema, {
|
|
43143
|
+
kind: "mutation",
|
|
43144
|
+
auth: "admin",
|
|
43145
|
+
timeoutMs: 30 * 6e4
|
|
43146
|
+
}), method(IdInput.extend({ deviceIds: array(number().int()).min(1).readonly() }), TrainingJobSchema, {
|
|
43147
|
+
kind: "mutation",
|
|
43148
|
+
auth: "admin",
|
|
43149
|
+
timeoutMs: 12e4
|
|
43150
|
+
}), method(IdInput, TrainingJobSchema, {
|
|
43151
|
+
kind: "mutation",
|
|
43152
|
+
auth: "admin",
|
|
43153
|
+
timeoutMs: 12e4
|
|
43154
|
+
}), method(IdInput, TrainingJobSchema, {
|
|
43155
|
+
kind: "mutation",
|
|
43156
|
+
auth: "admin"
|
|
43157
|
+
});
|
|
41629
43158
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
41630
43159
|
Object.freeze({
|
|
41631
43160
|
person: .5,
|
|
@@ -43774,6 +45303,12 @@ Object.freeze({
|
|
|
43774
45303
|
addonId: null,
|
|
43775
45304
|
access: "create"
|
|
43776
45305
|
},
|
|
45306
|
+
"backup.checkBackupKey": {
|
|
45307
|
+
capName: "backup",
|
|
45308
|
+
capScope: "system",
|
|
45309
|
+
addonId: null,
|
|
45310
|
+
access: "create"
|
|
45311
|
+
},
|
|
43777
45312
|
"backup.delete": {
|
|
43778
45313
|
capName: "backup",
|
|
43779
45314
|
capScope: "system",
|
|
@@ -43786,6 +45321,18 @@ Object.freeze({
|
|
|
43786
45321
|
addonId: null,
|
|
43787
45322
|
access: "delete"
|
|
43788
45323
|
},
|
|
45324
|
+
"backup.disableEncryption": {
|
|
45325
|
+
capName: "backup",
|
|
45326
|
+
capScope: "system",
|
|
45327
|
+
addonId: null,
|
|
45328
|
+
access: "create"
|
|
45329
|
+
},
|
|
45330
|
+
"backup.getEncryption": {
|
|
45331
|
+
capName: "backup",
|
|
45332
|
+
capScope: "system",
|
|
45333
|
+
addonId: null,
|
|
45334
|
+
access: "view"
|
|
45335
|
+
},
|
|
43789
45336
|
"backup.getEntries": {
|
|
43790
45337
|
capName: "backup",
|
|
43791
45338
|
capScope: "system",
|
|
@@ -43840,6 +45387,12 @@ Object.freeze({
|
|
|
43840
45387
|
addonId: null,
|
|
43841
45388
|
access: "create"
|
|
43842
45389
|
},
|
|
45390
|
+
"backup.setupEncryption": {
|
|
45391
|
+
capName: "backup",
|
|
45392
|
+
capScope: "system",
|
|
45393
|
+
addonId: null,
|
|
45394
|
+
access: "create"
|
|
45395
|
+
},
|
|
43843
45396
|
"backup.trigger": {
|
|
43844
45397
|
capName: "backup",
|
|
43845
45398
|
capScope: "system",
|
|
@@ -44392,6 +45945,12 @@ Object.freeze({
|
|
|
44392
45945
|
addonId: null,
|
|
44393
45946
|
access: "create"
|
|
44394
45947
|
},
|
|
45948
|
+
"customModelRegistry.importModelBundle": {
|
|
45949
|
+
capName: "custom-model-registry",
|
|
45950
|
+
capScope: "system",
|
|
45951
|
+
addonId: null,
|
|
45952
|
+
access: "create"
|
|
45953
|
+
},
|
|
44395
45954
|
"customModelRegistry.listModels": {
|
|
44396
45955
|
capName: "custom-model-registry",
|
|
44397
45956
|
capScope: "system",
|
|
@@ -45832,6 +47391,12 @@ Object.freeze({
|
|
|
45832
47391
|
addonId: null,
|
|
45833
47392
|
access: "view"
|
|
45834
47393
|
},
|
|
47394
|
+
"keychainAdmin.acknowledgeReset": {
|
|
47395
|
+
capName: "keychain-admin",
|
|
47396
|
+
capScope: "system",
|
|
47397
|
+
addonId: null,
|
|
47398
|
+
access: "create"
|
|
47399
|
+
},
|
|
45835
47400
|
"keychainAdmin.deleteOrphans": {
|
|
45836
47401
|
capName: "keychain-admin",
|
|
45837
47402
|
capScope: "system",
|
|
@@ -45868,6 +47433,12 @@ Object.freeze({
|
|
|
45868
47433
|
addonId: null,
|
|
45869
47434
|
access: "delete"
|
|
45870
47435
|
},
|
|
47436
|
+
"keychainAdmin.resetReport": {
|
|
47437
|
+
capName: "keychain-admin",
|
|
47438
|
+
capScope: "system",
|
|
47439
|
+
addonId: null,
|
|
47440
|
+
access: "delete"
|
|
47441
|
+
},
|
|
45871
47442
|
"keychainAdmin.reveal": {
|
|
45872
47443
|
capName: "keychain-admin",
|
|
45873
47444
|
capScope: "system",
|
|
@@ -47122,6 +48693,36 @@ Object.freeze({
|
|
|
47122
48693
|
addonId: null,
|
|
47123
48694
|
access: "view"
|
|
47124
48695
|
},
|
|
48696
|
+
"oidcConnections.connectionFormSchema": {
|
|
48697
|
+
capName: "oidc-connections",
|
|
48698
|
+
capScope: "system",
|
|
48699
|
+
addonId: null,
|
|
48700
|
+
access: "view"
|
|
48701
|
+
},
|
|
48702
|
+
"oidcConnections.createConnection": {
|
|
48703
|
+
capName: "oidc-connections",
|
|
48704
|
+
capScope: "system",
|
|
48705
|
+
addonId: null,
|
|
48706
|
+
access: "create"
|
|
48707
|
+
},
|
|
48708
|
+
"oidcConnections.deleteConnection": {
|
|
48709
|
+
capName: "oidc-connections",
|
|
48710
|
+
capScope: "system",
|
|
48711
|
+
addonId: null,
|
|
48712
|
+
access: "delete"
|
|
48713
|
+
},
|
|
48714
|
+
"oidcConnections.listConnections": {
|
|
48715
|
+
capName: "oidc-connections",
|
|
48716
|
+
capScope: "system",
|
|
48717
|
+
addonId: null,
|
|
48718
|
+
access: "view"
|
|
48719
|
+
},
|
|
48720
|
+
"oidcConnections.updateConnection": {
|
|
48721
|
+
capName: "oidc-connections",
|
|
48722
|
+
capScope: "system",
|
|
48723
|
+
addonId: null,
|
|
48724
|
+
access: "create"
|
|
48725
|
+
},
|
|
47125
48726
|
"osd.getStatus": {
|
|
47126
48727
|
capName: "osd",
|
|
47127
48728
|
capScope: "device",
|
|
@@ -47194,6 +48795,12 @@ Object.freeze({
|
|
|
47194
48795
|
addonId: null,
|
|
47195
48796
|
access: "create"
|
|
47196
48797
|
},
|
|
48798
|
+
"osdManager.setSlotCameraEnabled": {
|
|
48799
|
+
capName: "osd-manager",
|
|
48800
|
+
capScope: "system",
|
|
48801
|
+
addonId: null,
|
|
48802
|
+
access: "create"
|
|
48803
|
+
},
|
|
47197
48804
|
"osdManager.upsertTemplate": {
|
|
47198
48805
|
capName: "osd-manager",
|
|
47199
48806
|
capScope: "system",
|
|
@@ -47332,12 +48939,6 @@ Object.freeze({
|
|
|
47332
48939
|
addonId: null,
|
|
47333
48940
|
access: "create"
|
|
47334
48941
|
},
|
|
47335
|
-
"pipelineAnalytics.createRetrainDatasetVersion": {
|
|
47336
|
-
capName: "pipeline-analytics",
|
|
47337
|
-
capScope: "device",
|
|
47338
|
-
addonId: null,
|
|
47339
|
-
access: "create"
|
|
47340
|
-
},
|
|
47341
48942
|
"pipelineAnalytics.deleteDeviceEvents": {
|
|
47342
48943
|
capName: "pipeline-analytics",
|
|
47343
48944
|
capScope: "device",
|
|
@@ -47350,12 +48951,6 @@ Object.freeze({
|
|
|
47350
48951
|
addonId: null,
|
|
47351
48952
|
access: "delete"
|
|
47352
48953
|
},
|
|
47353
|
-
"pipelineAnalytics.deleteRetrainDatasetVersion": {
|
|
47354
|
-
capName: "pipeline-analytics",
|
|
47355
|
-
capScope: "device",
|
|
47356
|
-
addonId: null,
|
|
47357
|
-
access: "delete"
|
|
47358
|
-
},
|
|
47359
48954
|
"pipelineAnalytics.deleteTracks": {
|
|
47360
48955
|
capName: "pipeline-analytics",
|
|
47361
48956
|
capScope: "device",
|
|
@@ -47458,6 +49053,12 @@ Object.freeze({
|
|
|
47458
49053
|
addonId: null,
|
|
47459
49054
|
access: "view"
|
|
47460
49055
|
},
|
|
49056
|
+
"pipelineAnalytics.getRetrainCorpusKpi": {
|
|
49057
|
+
capName: "pipeline-analytics",
|
|
49058
|
+
capScope: "device",
|
|
49059
|
+
addonId: null,
|
|
49060
|
+
access: "view"
|
|
49061
|
+
},
|
|
47461
49062
|
"pipelineAnalytics.getRetrainExportUrl": {
|
|
47462
49063
|
capName: "pipeline-analytics",
|
|
47463
49064
|
capScope: "device",
|
|
@@ -47578,7 +49179,7 @@ Object.freeze({
|
|
|
47578
49179
|
addonId: null,
|
|
47579
49180
|
access: "view"
|
|
47580
49181
|
},
|
|
47581
|
-
"pipelineAnalytics.
|
|
49182
|
+
"pipelineAnalytics.listRetrainCorpusPage": {
|
|
47582
49183
|
capName: "pipeline-analytics",
|
|
47583
49184
|
capScope: "device",
|
|
47584
49185
|
addonId: null,
|
|
@@ -47614,23 +49215,23 @@ Object.freeze({
|
|
|
47614
49215
|
addonId: null,
|
|
47615
49216
|
access: "view"
|
|
47616
49217
|
},
|
|
47617
|
-
"pipelineAnalytics.
|
|
49218
|
+
"pipelineAnalytics.offerRetrainArchive": {
|
|
47618
49219
|
capName: "pipeline-analytics",
|
|
47619
49220
|
capScope: "device",
|
|
47620
49221
|
addonId: null,
|
|
47621
|
-
access: "
|
|
49222
|
+
access: "create"
|
|
47622
49223
|
},
|
|
47623
|
-
"pipelineAnalytics.
|
|
49224
|
+
"pipelineAnalytics.ownersWithMedia": {
|
|
47624
49225
|
capName: "pipeline-analytics",
|
|
47625
49226
|
capScope: "device",
|
|
47626
49227
|
addonId: null,
|
|
47627
|
-
access: "
|
|
49228
|
+
access: "view"
|
|
47628
49229
|
},
|
|
47629
|
-
"pipelineAnalytics.
|
|
49230
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
47630
49231
|
capName: "pipeline-analytics",
|
|
47631
49232
|
capScope: "device",
|
|
47632
49233
|
addonId: null,
|
|
47633
|
-
access: "
|
|
49234
|
+
access: "create"
|
|
47634
49235
|
},
|
|
47635
49236
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
47636
49237
|
capName: "pipeline-analytics",
|
|
@@ -47710,6 +49311,12 @@ Object.freeze({
|
|
|
47710
49311
|
addonId: null,
|
|
47711
49312
|
access: "create"
|
|
47712
49313
|
},
|
|
49314
|
+
"pipelineAnalytics.resolveRetrainTrainingCorpus": {
|
|
49315
|
+
capName: "pipeline-analytics",
|
|
49316
|
+
capScope: "device",
|
|
49317
|
+
addonId: null,
|
|
49318
|
+
access: "view"
|
|
49319
|
+
},
|
|
47713
49320
|
"pipelineAnalytics.restageRetrainTrack": {
|
|
47714
49321
|
capName: "pipeline-analytics",
|
|
47715
49322
|
capScope: "device",
|
|
@@ -47770,12 +49377,6 @@ Object.freeze({
|
|
|
47770
49377
|
addonId: null,
|
|
47771
49378
|
access: "create"
|
|
47772
49379
|
},
|
|
47773
|
-
"pipelineAnalytics.verifyRetrainDatasetVersion": {
|
|
47774
|
-
capName: "pipeline-analytics",
|
|
47775
|
-
capScope: "device",
|
|
47776
|
-
addonId: null,
|
|
47777
|
-
access: "view"
|
|
47778
|
-
},
|
|
47779
49380
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
47780
49381
|
capName: "pipeline-analytics",
|
|
47781
49382
|
capScope: "device",
|
|
@@ -50152,6 +51753,180 @@ Object.freeze({
|
|
|
50152
51753
|
addonId: null,
|
|
50153
51754
|
access: "view"
|
|
50154
51755
|
},
|
|
51756
|
+
"training.canaryResult": {
|
|
51757
|
+
capName: "training",
|
|
51758
|
+
capScope: "system",
|
|
51759
|
+
addonId: null,
|
|
51760
|
+
access: "create"
|
|
51761
|
+
},
|
|
51762
|
+
"training.cancelJob": {
|
|
51763
|
+
capName: "training",
|
|
51764
|
+
capScope: "system",
|
|
51765
|
+
addonId: null,
|
|
51766
|
+
access: "create"
|
|
51767
|
+
},
|
|
51768
|
+
"training.discardResult": {
|
|
51769
|
+
capName: "training",
|
|
51770
|
+
capScope: "system",
|
|
51771
|
+
addonId: null,
|
|
51772
|
+
access: "create"
|
|
51773
|
+
},
|
|
51774
|
+
"training.getJob": {
|
|
51775
|
+
capName: "training",
|
|
51776
|
+
capScope: "system",
|
|
51777
|
+
addonId: null,
|
|
51778
|
+
access: "view"
|
|
51779
|
+
},
|
|
51780
|
+
"training.getJobResult": {
|
|
51781
|
+
capName: "training",
|
|
51782
|
+
capScope: "system",
|
|
51783
|
+
addonId: null,
|
|
51784
|
+
access: "view"
|
|
51785
|
+
},
|
|
51786
|
+
"training.listBaseModels": {
|
|
51787
|
+
capName: "training",
|
|
51788
|
+
capScope: "system",
|
|
51789
|
+
addonId: null,
|
|
51790
|
+
access: "view"
|
|
51791
|
+
},
|
|
51792
|
+
"training.listJobs": {
|
|
51793
|
+
capName: "training",
|
|
51794
|
+
capScope: "system",
|
|
51795
|
+
addonId: null,
|
|
51796
|
+
access: "view"
|
|
51797
|
+
},
|
|
51798
|
+
"training.planJob": {
|
|
51799
|
+
capName: "training",
|
|
51800
|
+
capScope: "system",
|
|
51801
|
+
addonId: null,
|
|
51802
|
+
access: "view"
|
|
51803
|
+
},
|
|
51804
|
+
"training.registerResult": {
|
|
51805
|
+
capName: "training",
|
|
51806
|
+
capScope: "system",
|
|
51807
|
+
addonId: null,
|
|
51808
|
+
access: "create"
|
|
51809
|
+
},
|
|
51810
|
+
"training.rollbackCanary": {
|
|
51811
|
+
capName: "training",
|
|
51812
|
+
capScope: "system",
|
|
51813
|
+
addonId: null,
|
|
51814
|
+
access: "create"
|
|
51815
|
+
},
|
|
51816
|
+
"training.startJob": {
|
|
51817
|
+
capName: "training",
|
|
51818
|
+
capScope: "system",
|
|
51819
|
+
addonId: null,
|
|
51820
|
+
access: "create"
|
|
51821
|
+
},
|
|
51822
|
+
"training.startJobBatch": {
|
|
51823
|
+
capName: "training",
|
|
51824
|
+
capScope: "system",
|
|
51825
|
+
addonId: null,
|
|
51826
|
+
access: "create"
|
|
51827
|
+
},
|
|
51828
|
+
"trainingProvider.cancelJob": {
|
|
51829
|
+
capName: "training-provider",
|
|
51830
|
+
capScope: "system",
|
|
51831
|
+
addonId: null,
|
|
51832
|
+
access: "create"
|
|
51833
|
+
},
|
|
51834
|
+
"trainingProvider.cleanupJob": {
|
|
51835
|
+
capName: "training-provider",
|
|
51836
|
+
capScope: "system",
|
|
51837
|
+
addonId: null,
|
|
51838
|
+
access: "create"
|
|
51839
|
+
},
|
|
51840
|
+
"trainingProvider.createEntry": {
|
|
51841
|
+
capName: "training-provider",
|
|
51842
|
+
capScope: "system",
|
|
51843
|
+
addonId: null,
|
|
51844
|
+
access: "create"
|
|
51845
|
+
},
|
|
51846
|
+
"trainingProvider.deleteEntry": {
|
|
51847
|
+
capName: "training-provider",
|
|
51848
|
+
capScope: "system",
|
|
51849
|
+
addonId: null,
|
|
51850
|
+
access: "delete"
|
|
51851
|
+
},
|
|
51852
|
+
"trainingProvider.describe": {
|
|
51853
|
+
capName: "training-provider",
|
|
51854
|
+
capScope: "system",
|
|
51855
|
+
addonId: null,
|
|
51856
|
+
access: "view"
|
|
51857
|
+
},
|
|
51858
|
+
"trainingProvider.describeTypes": {
|
|
51859
|
+
capName: "training-provider",
|
|
51860
|
+
capScope: "system",
|
|
51861
|
+
addonId: null,
|
|
51862
|
+
access: "view"
|
|
51863
|
+
},
|
|
51864
|
+
"trainingProvider.estimateJob": {
|
|
51865
|
+
capName: "training-provider",
|
|
51866
|
+
capScope: "system",
|
|
51867
|
+
addonId: null,
|
|
51868
|
+
access: "view"
|
|
51869
|
+
},
|
|
51870
|
+
"trainingProvider.getJob": {
|
|
51871
|
+
capName: "training-provider",
|
|
51872
|
+
capScope: "system",
|
|
51873
|
+
addonId: null,
|
|
51874
|
+
access: "view"
|
|
51875
|
+
},
|
|
51876
|
+
"trainingProvider.listEntries": {
|
|
51877
|
+
capName: "training-provider",
|
|
51878
|
+
capScope: "system",
|
|
51879
|
+
addonId: null,
|
|
51880
|
+
access: "view"
|
|
51881
|
+
},
|
|
51882
|
+
"trainingProvider.listJobEvents": {
|
|
51883
|
+
capName: "training-provider",
|
|
51884
|
+
capScope: "system",
|
|
51885
|
+
addonId: null,
|
|
51886
|
+
access: "view"
|
|
51887
|
+
},
|
|
51888
|
+
"trainingProvider.listJobs": {
|
|
51889
|
+
capName: "training-provider",
|
|
51890
|
+
capScope: "system",
|
|
51891
|
+
addonId: null,
|
|
51892
|
+
access: "view"
|
|
51893
|
+
},
|
|
51894
|
+
"trainingProvider.offerArtifact": {
|
|
51895
|
+
capName: "training-provider",
|
|
51896
|
+
capScope: "system",
|
|
51897
|
+
addonId: null,
|
|
51898
|
+
access: "create"
|
|
51899
|
+
},
|
|
51900
|
+
"trainingProvider.readResult": {
|
|
51901
|
+
capName: "training-provider",
|
|
51902
|
+
capScope: "system",
|
|
51903
|
+
addonId: null,
|
|
51904
|
+
access: "create"
|
|
51905
|
+
},
|
|
51906
|
+
"trainingProvider.submitJob": {
|
|
51907
|
+
capName: "training-provider",
|
|
51908
|
+
capScope: "system",
|
|
51909
|
+
addonId: null,
|
|
51910
|
+
access: "create"
|
|
51911
|
+
},
|
|
51912
|
+
"trainingProvider.updateEntry": {
|
|
51913
|
+
capName: "training-provider",
|
|
51914
|
+
capScope: "system",
|
|
51915
|
+
addonId: null,
|
|
51916
|
+
access: "create"
|
|
51917
|
+
},
|
|
51918
|
+
"trainingProvider.uploadDataset": {
|
|
51919
|
+
capName: "training-provider",
|
|
51920
|
+
capScope: "system",
|
|
51921
|
+
addonId: null,
|
|
51922
|
+
access: "create"
|
|
51923
|
+
},
|
|
51924
|
+
"trainingProvider.validateCredentials": {
|
|
51925
|
+
capName: "training-provider",
|
|
51926
|
+
capScope: "system",
|
|
51927
|
+
addonId: null,
|
|
51928
|
+
access: "create"
|
|
51929
|
+
},
|
|
50155
51930
|
"turnProvider.getTurnServers": {
|
|
50156
51931
|
capName: "turn-provider",
|
|
50157
51932
|
capScope: "system",
|
|
@@ -50176,12 +51951,6 @@ Object.freeze({
|
|
|
50176
51951
|
addonId: null,
|
|
50177
51952
|
access: "create"
|
|
50178
51953
|
},
|
|
50179
|
-
"userManagement.createApiKey": {
|
|
50180
|
-
capName: "user-management",
|
|
50181
|
-
capScope: "system",
|
|
50182
|
-
addonId: null,
|
|
50183
|
-
access: "create"
|
|
50184
|
-
},
|
|
50185
51954
|
"userManagement.createScopedToken": {
|
|
50186
51955
|
capName: "user-management",
|
|
50187
51956
|
capScope: "system",
|
|
@@ -50218,12 +51987,6 @@ Object.freeze({
|
|
|
50218
51987
|
addonId: null,
|
|
50219
51988
|
access: "view"
|
|
50220
51989
|
},
|
|
50221
|
-
"userManagement.linkExternalIdentity": {
|
|
50222
|
-
capName: "user-management",
|
|
50223
|
-
capScope: "system",
|
|
50224
|
-
addonId: null,
|
|
50225
|
-
access: "create"
|
|
50226
|
-
},
|
|
50227
51990
|
"userManagement.listApiKeys": {
|
|
50228
51991
|
capName: "user-management",
|
|
50229
51992
|
capScope: "system",
|
|
@@ -50326,12 +52089,6 @@ Object.freeze({
|
|
|
50326
52089
|
addonId: null,
|
|
50327
52090
|
access: "create"
|
|
50328
52091
|
},
|
|
50329
|
-
"userManagement.validateApiKey": {
|
|
50330
|
-
capName: "user-management",
|
|
50331
|
-
capScope: "system",
|
|
50332
|
-
addonId: null,
|
|
50333
|
-
access: "view"
|
|
50334
|
-
},
|
|
50335
52092
|
"userManagement.validateCredentials": {
|
|
50336
52093
|
capName: "user-management",
|
|
50337
52094
|
capScope: "system",
|
|
@@ -53364,6 +55121,11 @@ Object.freeze({
|
|
|
53364
55121
|
form: "single",
|
|
53365
55122
|
optional: false
|
|
53366
55123
|
}],
|
|
55124
|
+
"osdManager.setSlotCameraEnabled": [{
|
|
55125
|
+
name: "deviceId",
|
|
55126
|
+
form: "single",
|
|
55127
|
+
optional: false
|
|
55128
|
+
}],
|
|
53367
55129
|
"petFeeder.callPet": [{
|
|
53368
55130
|
name: "deviceId",
|
|
53369
55131
|
form: "single",
|
|
@@ -53584,6 +55346,11 @@ Object.freeze({
|
|
|
53584
55346
|
form: "array",
|
|
53585
55347
|
optional: false
|
|
53586
55348
|
}],
|
|
55349
|
+
"pipelineAnalytics.listRetrainCorpusPage": [{
|
|
55350
|
+
name: "deviceIds",
|
|
55351
|
+
form: "array",
|
|
55352
|
+
optional: true
|
|
55353
|
+
}],
|
|
53587
55354
|
"pipelineAnalytics.listRetrainStaging": [{
|
|
53588
55355
|
name: "deviceIds",
|
|
53589
55356
|
form: "array",
|
|
@@ -54445,6 +56212,11 @@ Object.freeze({
|
|
|
54445
56212
|
form: "single",
|
|
54446
56213
|
optional: false
|
|
54447
56214
|
}],
|
|
56215
|
+
"training.canaryResult": [{
|
|
56216
|
+
name: "deviceIds",
|
|
56217
|
+
form: "array",
|
|
56218
|
+
optional: false
|
|
56219
|
+
}],
|
|
54448
56220
|
"update.getStatus": [{
|
|
54449
56221
|
name: "deviceId",
|
|
54450
56222
|
form: "single",
|
|
@@ -54688,6 +56460,7 @@ Object.freeze({
|
|
|
54688
56460
|
});
|
|
54689
56461
|
Object.freeze({
|
|
54690
56462
|
"broker": "broker",
|
|
56463
|
+
"calendar-source": "calendar",
|
|
54691
56464
|
"device-export": "device-export",
|
|
54692
56465
|
"llm": "ai",
|
|
54693
56466
|
"mesh-network": "mesh",
|
|
@@ -55173,6 +56946,8 @@ var STATE_SUMMARY_VARS = [
|
|
|
55173
56946
|
[...RULE_TEXT],
|
|
55174
56947
|
[...RULE_TEXT],
|
|
55175
56948
|
[...RULE_TEXT],
|
|
56949
|
+
[...RULE_TEXT],
|
|
56950
|
+
[...RULE_TEXT],
|
|
55176
56951
|
([...RULE_TEXT], [...UPDATES]),
|
|
55177
56952
|
([...RULE_TEXT], [...PACKAGE_UPDATES]),
|
|
55178
56953
|
([...RULE_TEXT], [...PACKAGE_UPDATES]),
|