@camstack/types 1.2.358 → 1.2.359
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 +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/data-store-provider.cap.d.ts +36 -0
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/pipeline-analytics.cap.d.ts +1576 -0
- package/dist/capabilities/settings-store.cap.d.ts +92 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +207 -0
- package/dist/client.mjs +199 -1
- package/dist/generated/addon-api.d.ts +21 -0
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +422 -3
- package/dist/index.mjs +409 -4
- package/dist/retrain-review.d.ts +121 -0
- package/dist/{sleep-B_3F_YwS.mjs → sleep-BBF1iXUi.mjs} +1 -0
- package/dist/{sleep-CEqsJkV5.js → sleep-BBXNq778.js} +1 -0
- package/package.json +1 -1
|
@@ -99,7 +99,7 @@ export interface SystemProxy {
|
|
|
99
99
|
readonly recordingArchive: Pick<InferProvider<typeof recordingArchiveCapability>, 'getAvailabilityBatch' | 'getDaysWithRecordingsBatch' | 'getStorageUsage' | 'listOpsLog' | 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'refreshStorageLocationsForMigration' | 'startStorageMigrationMove' | 'getStorageMigrationMoveStatus' | 'cancelStorageMigrationMove' | 'relocateFootage' | 'listRelocateJobs' | 'getRelocateResidue' | 'reconcileLedgerAgainstDisk' | 'cancelRelocateJob' | 'planStorageRebalance' | 'startStorageRebalance' | 'getPlacement' | 'setDevicePlacement'>;
|
|
100
100
|
readonly recordingExport: Pick<InferProvider<typeof recordingExportCapability>, 'createExport' | 'getExport' | 'cancelExport' | 'deleteExport' | 'getDownloadUrl' | 'readExportBytes'>;
|
|
101
101
|
readonly serverManagement: Pick<InferProvider<typeof serverManagementCapability>, 'getServerPackageStatus' | 'checkServerUpdate' | 'applyServerUpdate' | 'rollbackServerUpdate' | 'restartServer'>;
|
|
102
|
-
readonly settingsStore: Pick<InferProvider<typeof settingsStoreCapability>, 'get' | 'set' | 'query' | 'upsert' | 'insert' | 'insertMany' | 'update' | 'delete' | 'deleteWhere' | 'updateWhere' | 'count' | 'aggregate' | 'histogram' | 'isEmpty' | 'declareCollection'>;
|
|
102
|
+
readonly settingsStore: Pick<InferProvider<typeof settingsStoreCapability>, 'get' | 'set' | 'query' | 'upsert' | 'insert' | 'insertMany' | 'transact' | 'update' | 'delete' | 'deleteWhere' | 'updateWhere' | 'count' | 'aggregate' | 'histogram' | 'isEmpty' | 'declareCollection'>;
|
|
103
103
|
readonly storage: Pick<InferProvider<typeof storageCapability>, 'resolve' | 'write' | 'read' | 'exists' | 'list' | 'delete' | 'getAvailableSpace' | 'beginUpload' | 'writeChunk' | 'finalizeUpload' | 'abortUpload' | 'beginDownload' | 'readChunk' | 'endDownload' | 'listLocations' | 'listLocationDeclarations' | 'upsertLocation' | 'deleteLocation' | 'listDrainProgress' | 'testLocation' | 'listProviders' | 'testConfig'>;
|
|
104
104
|
readonly storageMigration: Pick<InferProvider<typeof storageMigrationCapability>, 'plan' | 'start' | 'status' | 'cancel' | 'movers' | 'residue' | 'drain' | 'cleanupStart' | 'cleanupStatus' | 'cleanupCancel' | 'history'>;
|
|
105
105
|
readonly streamBroker: Pick<InferProvider<typeof streamBrokerCapability>, 'fetchEventMedia' | 'listAllCameraStreams' | 'listAllProfileSlots' | 'getBrokerStats' | 'probeStream' | 'listClients' | 'getLiveViewerCounts' | 'killClient' | 'getStreamUrl' | 'getStreamWithCodec' | 'releaseStreamWithCodec' | 'acquireEgressTranscode' | 'releaseEgressTranscode' | 'subscribeAudioChunks' | 'pullAudioChunks' | 'unsubscribeAudioChunks' | 'setPreBufferDuration' | 'getPreBufferInfo' | 'getRtspPort' | 'getAllRtspEntries' | 'getRtspEntry' | 'regenerateRtspToken' | 'setRtspEnabled' | 'isRtspEnabled'>;
|
package/dist/index.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export { collectHydratedFieldEntries, collectHydratedFieldValues, hydrateSchema,
|
|
|
51
51
|
export { collectKeychainStoredKeys, collectSecretConfigKeys, isKeychainStoredField, isSecretConfigField, REDACTED_SECRET, schemaDeclaresAnyField, } from './interfaces/config-ui-secrets.js';
|
|
52
52
|
export * from './keychain/index.js';
|
|
53
53
|
export * from './training/index.js';
|
|
54
|
+
export * from './retrain-review.js';
|
|
54
55
|
export { mergeSecretStatePaths, parseSecretStatePath, type SecretNode, type SecretTree, secretTreeFromPaths, secretTreeFromSchema, } from './addon/secret-paths.js';
|
|
55
56
|
export { collectSecretMarkerRefs, KeychainWriteRefusedError, type ResolvedSecrets, resolveSecretMarkers, type SecretWriteInput, type SecretWriteResult, transformSecretWrite, type UnresolvedReason, type UnresolvedSecret, } from './addon/secret-settings-view.js';
|
|
56
57
|
export type * from './interfaces/context.js';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-BBXNq778.js");
|
|
3
3
|
const require_event_category = require("./event-category-T43rdQWR.js");
|
|
4
4
|
const require_composition = require("./composition-DCYnv4I6.js");
|
|
5
5
|
const require_node_color = require("./node-color.js");
|
|
@@ -1925,6 +1925,202 @@ function parseTrainingEventLine(line) {
|
|
|
1925
1925
|
return parsed.success ? parsed.data : null;
|
|
1926
1926
|
}
|
|
1927
1927
|
//#endregion
|
|
1928
|
+
//#region src/retrain-review.ts
|
|
1929
|
+
/** Every status, in the order a summary lists them. */
|
|
1930
|
+
var RETRAIN_REVIEW_STATUSES = [
|
|
1931
|
+
"unchanged",
|
|
1932
|
+
"adjusted",
|
|
1933
|
+
"reclassified",
|
|
1934
|
+
"added",
|
|
1935
|
+
"removed",
|
|
1936
|
+
"model-error"
|
|
1937
|
+
];
|
|
1938
|
+
/**
|
|
1939
|
+
* Two boxes overlapping at least this much are the same subject when a legacy
|
|
1940
|
+
* row (no origin) is matched against a proposal. Deliberately loose: a legacy
|
|
1941
|
+
* row is judged on evidence that is no longer exact.
|
|
1942
|
+
*/
|
|
1943
|
+
var RETRAIN_REVIEW_MATCH_IOU = .5;
|
|
1944
|
+
/**
|
|
1945
|
+
* A kept box overlapping its origin at least this much is `unchanged`; below it
|
|
1946
|
+
* the rectangle was moved or resized on purpose (`adjusted`). Not 1.0: the
|
|
1947
|
+
* canvas rounds, and a box dragged by one pixel and dragged back is not an edit.
|
|
1948
|
+
*/
|
|
1949
|
+
var RETRAIN_REVIEW_ADJUSTED_IOU = .95;
|
|
1950
|
+
/** Two boxes this close on every edge are the same rectangle (an exact match). */
|
|
1951
|
+
var EXACT_EDGE_EPSILON = 1e-6;
|
|
1952
|
+
/** Intersection over union of two normalised rectangles. */
|
|
1953
|
+
function retrainBoxIou(a, b) {
|
|
1954
|
+
const inter = Math.max(0, Math.min(a.x + a.w, b.x + b.w) - Math.max(a.x, b.x)) * Math.max(0, Math.min(a.y + a.h, b.y + b.h) - Math.max(a.y, b.y));
|
|
1955
|
+
const union = a.w * a.h + b.w * b.h - inter;
|
|
1956
|
+
return union > 0 ? inter / union : 0;
|
|
1957
|
+
}
|
|
1958
|
+
function sameRect(a, b) {
|
|
1959
|
+
return Math.abs(a.x - b.x) <= EXACT_EDGE_EPSILON && Math.abs(a.y - b.y) <= EXACT_EDGE_EPSILON && Math.abs(a.w - b.w) <= EXACT_EDGE_EPSILON && Math.abs(a.h - b.h) <= EXACT_EDGE_EPSILON;
|
|
1960
|
+
}
|
|
1961
|
+
function labelOf(value) {
|
|
1962
|
+
return value?.trim() ?? "";
|
|
1963
|
+
}
|
|
1964
|
+
/** Kept box versus its baseline: class/label first, then geometry. */
|
|
1965
|
+
function compareKept(saved, baseline, adjustedIou) {
|
|
1966
|
+
const iou = retrainBoxIou(saved.bbox, baseline.bbox);
|
|
1967
|
+
if (saved.macroClass !== baseline.macroClass || labelOf(saved.label) !== labelOf(baseline.label)) return {
|
|
1968
|
+
status: "reclassified",
|
|
1969
|
+
iou
|
|
1970
|
+
};
|
|
1971
|
+
return {
|
|
1972
|
+
status: iou < adjustedIou ? "adjusted" : "unchanged",
|
|
1973
|
+
iou
|
|
1974
|
+
};
|
|
1975
|
+
}
|
|
1976
|
+
/**
|
|
1977
|
+
* Pair legacy rows with proposals: exact rectangles first, then by descending
|
|
1978
|
+
* overlap, one proposal per row. Greedy on a sorted list so the result does not
|
|
1979
|
+
* depend on the order the rows were listed in.
|
|
1980
|
+
*/
|
|
1981
|
+
function pairLegacy(saved, legacyIndexes, origins, matchIou) {
|
|
1982
|
+
const candidates = [];
|
|
1983
|
+
for (const savedIndex of legacyIndexes) {
|
|
1984
|
+
const box = saved[savedIndex];
|
|
1985
|
+
if (box === void 0) continue;
|
|
1986
|
+
origins.forEach((origin, originIndex) => {
|
|
1987
|
+
const exact = sameRect(box.bbox, origin.bbox);
|
|
1988
|
+
const iou = exact ? 1 : retrainBoxIou(box.bbox, origin.bbox);
|
|
1989
|
+
if (exact || iou >= matchIou) candidates.push({
|
|
1990
|
+
savedIndex,
|
|
1991
|
+
originIndex,
|
|
1992
|
+
iou,
|
|
1993
|
+
exact
|
|
1994
|
+
});
|
|
1995
|
+
});
|
|
1996
|
+
}
|
|
1997
|
+
candidates.sort((a, b) => Number(b.exact) - Number(a.exact) || b.iou - a.iou);
|
|
1998
|
+
const pairs = /* @__PURE__ */ new Map();
|
|
1999
|
+
const takenOrigins = /* @__PURE__ */ new Set();
|
|
2000
|
+
for (const c of candidates) {
|
|
2001
|
+
if (pairs.has(c.savedIndex) || takenOrigins.has(c.originIndex)) continue;
|
|
2002
|
+
pairs.set(c.savedIndex, c.originIndex);
|
|
2003
|
+
takenOrigins.add(c.originIndex);
|
|
2004
|
+
}
|
|
2005
|
+
return pairs;
|
|
2006
|
+
}
|
|
2007
|
+
/**
|
|
2008
|
+
* Classify what the operator did on ONE frame.
|
|
2009
|
+
*
|
|
2010
|
+
* @param saved the frame's saved boxes.
|
|
2011
|
+
* @param origins the proposals known now (the pipeline's boxes, re-derived) —
|
|
2012
|
+
* consulted ONLY for rows that carry no origin snapshot.
|
|
2013
|
+
* @param dismissed the proposals the operator deleted, with their snapshots.
|
|
2014
|
+
*/
|
|
2015
|
+
function classifyRetrainReview(saved, origins, dismissed, opts = {}) {
|
|
2016
|
+
const matchIou = opts.matchIou ?? .5;
|
|
2017
|
+
const adjustedIou = opts.adjustedIou ?? .95;
|
|
2018
|
+
const claimedRefs = /* @__PURE__ */ new Set();
|
|
2019
|
+
const boxes = [];
|
|
2020
|
+
const legacyIndexes = [];
|
|
2021
|
+
saved.forEach((box, index) => {
|
|
2022
|
+
if (box.origin === null) legacyIndexes.push(index);
|
|
2023
|
+
else claimedRefs.add(box.origin.ref);
|
|
2024
|
+
});
|
|
2025
|
+
for (const entry of dismissed) claimedRefs.add(entry.ref);
|
|
2026
|
+
const legacyPairs = pairLegacy(saved, legacyIndexes, origins, matchIou);
|
|
2027
|
+
for (const originIndex of legacyPairs.values()) {
|
|
2028
|
+
const origin = origins[originIndex];
|
|
2029
|
+
if (origin !== void 0) claimedRefs.add(origin.ref);
|
|
2030
|
+
}
|
|
2031
|
+
saved.forEach((box, index) => {
|
|
2032
|
+
const exactBaseline = box.origin;
|
|
2033
|
+
const pairedOrigin = exactBaseline === null ? origins[legacyPairs.get(index) ?? -1] : void 0;
|
|
2034
|
+
const baseline = exactBaseline ?? pairedOrigin ?? null;
|
|
2035
|
+
const approximate = exactBaseline === null;
|
|
2036
|
+
if (box.kind === "model_error") {
|
|
2037
|
+
boxes.push({
|
|
2038
|
+
ref: box.id,
|
|
2039
|
+
savedId: box.id,
|
|
2040
|
+
status: "model-error",
|
|
2041
|
+
approximate: false,
|
|
2042
|
+
...baseline !== null ? {
|
|
2043
|
+
origin: baseline,
|
|
2044
|
+
iou: retrainBoxIou(box.bbox, baseline.bbox)
|
|
2045
|
+
} : {}
|
|
2046
|
+
});
|
|
2047
|
+
return;
|
|
2048
|
+
}
|
|
2049
|
+
if (baseline === null || baseline.source === "operator") {
|
|
2050
|
+
boxes.push({
|
|
2051
|
+
ref: box.id,
|
|
2052
|
+
savedId: box.id,
|
|
2053
|
+
status: "added",
|
|
2054
|
+
approximate: approximate && baseline === null,
|
|
2055
|
+
...baseline !== null ? { origin: baseline } : {}
|
|
2056
|
+
});
|
|
2057
|
+
return;
|
|
2058
|
+
}
|
|
2059
|
+
const verdict = compareKept(box, baseline, adjustedIou);
|
|
2060
|
+
boxes.push({
|
|
2061
|
+
ref: box.id,
|
|
2062
|
+
savedId: box.id,
|
|
2063
|
+
status: verdict.status,
|
|
2064
|
+
approximate,
|
|
2065
|
+
origin: baseline,
|
|
2066
|
+
iou: verdict.iou
|
|
2067
|
+
});
|
|
2068
|
+
});
|
|
2069
|
+
for (const entry of dismissed) boxes.push({
|
|
2070
|
+
ref: entry.ref,
|
|
2071
|
+
status: "removed",
|
|
2072
|
+
approximate: false,
|
|
2073
|
+
origin: entry.snapshot
|
|
2074
|
+
});
|
|
2075
|
+
if (opts.inferRemoved === true) for (const origin of origins) {
|
|
2076
|
+
if (claimedRefs.has(origin.ref)) continue;
|
|
2077
|
+
boxes.push({
|
|
2078
|
+
ref: origin.ref,
|
|
2079
|
+
status: "removed",
|
|
2080
|
+
approximate: true,
|
|
2081
|
+
origin
|
|
2082
|
+
});
|
|
2083
|
+
}
|
|
2084
|
+
return {
|
|
2085
|
+
boxes,
|
|
2086
|
+
approximate: boxes.some((b) => b.approximate)
|
|
2087
|
+
};
|
|
2088
|
+
}
|
|
2089
|
+
/** Counts per status, plus the totals a list row shows. */
|
|
2090
|
+
function summarizeReview(review) {
|
|
2091
|
+
const counts = {
|
|
2092
|
+
unchanged: 0,
|
|
2093
|
+
adjusted: 0,
|
|
2094
|
+
reclassified: 0,
|
|
2095
|
+
added: 0,
|
|
2096
|
+
removed: 0,
|
|
2097
|
+
"model-error": 0
|
|
2098
|
+
};
|
|
2099
|
+
for (const box of review.boxes) counts[box.status] += 1;
|
|
2100
|
+
return {
|
|
2101
|
+
counts,
|
|
2102
|
+
total: review.boxes.length,
|
|
2103
|
+
changed: review.boxes.length - counts.unchanged,
|
|
2104
|
+
approximate: review.approximate
|
|
2105
|
+
};
|
|
2106
|
+
}
|
|
2107
|
+
/** The prefix of the error a stale `expectedRevision` save is refused with. */
|
|
2108
|
+
var RETRAIN_REVISION_CONFLICT = "retrain-revision-conflict";
|
|
2109
|
+
/** The message a refused save carries — `parseRetrainRevisionConflict` reads it back. */
|
|
2110
|
+
function retrainRevisionConflictMessage(frameId, conflict) {
|
|
2111
|
+
return `${RETRAIN_REVISION_CONFLICT}: frame ${frameId} moved on — it is at revision ${String(conflict.currentRevision)}, the save expected ${String(conflict.expectedRevision)} (current=${String(conflict.currentRevision)} expected=${String(conflict.expectedRevision)})`;
|
|
2112
|
+
}
|
|
2113
|
+
/** The conflict an error message names, or `null` when it is some other error. */
|
|
2114
|
+
function parseRetrainRevisionConflict(message) {
|
|
2115
|
+
if (!message.includes("retrain-revision-conflict")) return null;
|
|
2116
|
+
const match = /current=(\d+) expected=(\d+)/.exec(message);
|
|
2117
|
+
if (match?.[1] === void 0 || match[2] === void 0) return null;
|
|
2118
|
+
return {
|
|
2119
|
+
currentRevision: Number(match[1]),
|
|
2120
|
+
expectedRevision: Number(match[2])
|
|
2121
|
+
};
|
|
2122
|
+
}
|
|
2123
|
+
//#endregion
|
|
1928
2124
|
//#region src/interfaces/birth-decision-ledger.ts
|
|
1929
2125
|
/**
|
|
1930
2126
|
* Birth-decision ledger — one durable row per track-birth VERDICT (D409).
|
|
@@ -12459,6 +12655,38 @@ var BulkRecordSchema = zod.z.object({
|
|
|
12459
12655
|
data: zod.z.record(zod.z.string(), zod.z.unknown())
|
|
12460
12656
|
});
|
|
12461
12657
|
/**
|
|
12658
|
+
* One write inside a {@link settingsStoreCapability.methods.transact} call.
|
|
12659
|
+
* Only the three that a "replace this set, bump that revision" write needs.
|
|
12660
|
+
*/
|
|
12661
|
+
var TransactOpSchema = zod.z.discriminatedUnion("op", [
|
|
12662
|
+
zod.z.object({
|
|
12663
|
+
op: zod.z.literal("deleteWhere"),
|
|
12664
|
+
collection: zod.z.string(),
|
|
12665
|
+
filter: MutationFilterSchema
|
|
12666
|
+
}),
|
|
12667
|
+
zod.z.object({
|
|
12668
|
+
op: zod.z.literal("insertMany"),
|
|
12669
|
+
collection: zod.z.string(),
|
|
12670
|
+
records: zod.z.array(BulkRecordSchema).readonly()
|
|
12671
|
+
}),
|
|
12672
|
+
zod.z.object({
|
|
12673
|
+
op: zod.z.literal("update"),
|
|
12674
|
+
collection: zod.z.string(),
|
|
12675
|
+
id: zod.z.string(),
|
|
12676
|
+
data: zod.z.record(zod.z.string(), zod.z.unknown())
|
|
12677
|
+
})
|
|
12678
|
+
]);
|
|
12679
|
+
/**
|
|
12680
|
+
* The precondition of a transaction: the row `key` of `collection` must hold
|
|
12681
|
+
* `equals` in `column`, read INSIDE the transaction.
|
|
12682
|
+
*/
|
|
12683
|
+
var TransactGuardSchema = zod.z.object({
|
|
12684
|
+
collection: zod.z.string(),
|
|
12685
|
+
key: zod.z.string(),
|
|
12686
|
+
column: zod.z.string(),
|
|
12687
|
+
equals: zod.z.unknown()
|
|
12688
|
+
});
|
|
12689
|
+
/**
|
|
12462
12690
|
* Column declaration for a structured (SQL-backed) collection.
|
|
12463
12691
|
*
|
|
12464
12692
|
* Logical types — the backend translates each to the matching SQLite
|
|
@@ -12683,6 +12911,36 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), {
|
|
|
12683
12911
|
kind: "mutation",
|
|
12684
12912
|
auth: "admin"
|
|
12685
12913
|
}),
|
|
12914
|
+
/**
|
|
12915
|
+
* Several writes, ONE transaction, behind an optional precondition.
|
|
12916
|
+
*
|
|
12917
|
+
* The multi-collection twin of {@link insertMany}: a write that has to move
|
|
12918
|
+
* a set of rows in one collection AND a revision in another cannot be
|
|
12919
|
+
* expressed as separate calls without a window in which a reader (or a
|
|
12920
|
+
* crash) sees half of it. The retrain annotation save replaces a frame's
|
|
12921
|
+
* rows, its dismissed set and its revision this way.
|
|
12922
|
+
*
|
|
12923
|
+
* `guard`, when given, is read inside the transaction: if the row is
|
|
12924
|
+
* missing or its column differs from `equals`, NOTHING is written and the
|
|
12925
|
+
* answer is `{ applied: false, current }` with what was found — the
|
|
12926
|
+
* compare-and-set a revisioned write needs, with no second reader able to
|
|
12927
|
+
* slip between the check and the writes.
|
|
12928
|
+
*
|
|
12929
|
+
* **All or nothing**, like {@link insertMany}: a throw in any op rolls the
|
|
12930
|
+
* whole call back. Ops run in the order given (delete before insert to
|
|
12931
|
+
* replace a set). `namespace` applies to every collection named.
|
|
12932
|
+
*/
|
|
12933
|
+
transact: require_sleep.method(zod.z.object({
|
|
12934
|
+
namespace: zod.z.string().optional(),
|
|
12935
|
+
guard: TransactGuardSchema.optional(),
|
|
12936
|
+
ops: zod.z.array(TransactOpSchema).readonly()
|
|
12937
|
+
}), zod.z.object({
|
|
12938
|
+
applied: zod.z.boolean(),
|
|
12939
|
+
current: zod.z.unknown().optional()
|
|
12940
|
+
}), {
|
|
12941
|
+
kind: "mutation",
|
|
12942
|
+
auth: "admin"
|
|
12943
|
+
}),
|
|
12686
12944
|
/** Update an existing record by ID. */
|
|
12687
12945
|
update: require_sleep.method(zod.z.object({
|
|
12688
12946
|
namespace: zod.z.string().optional(),
|
|
@@ -12969,6 +13227,18 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), {
|
|
|
12969
13227
|
kind: "mutation",
|
|
12970
13228
|
auth: "admin"
|
|
12971
13229
|
}),
|
|
13230
|
+
/** Several writes in ONE transaction behind an optional guard; see the door. */
|
|
13231
|
+
transact: require_sleep.method(zod.z.object({
|
|
13232
|
+
namespace: zod.z.string().optional(),
|
|
13233
|
+
guard: TransactGuardSchema.optional(),
|
|
13234
|
+
ops: zod.z.array(TransactOpSchema).readonly()
|
|
13235
|
+
}), zod.z.object({
|
|
13236
|
+
applied: zod.z.boolean(),
|
|
13237
|
+
current: zod.z.unknown().optional()
|
|
13238
|
+
}), {
|
|
13239
|
+
kind: "mutation",
|
|
13240
|
+
auth: "admin"
|
|
13241
|
+
}),
|
|
12972
13242
|
/** Update an existing record by ID. */
|
|
12973
13243
|
update: require_sleep.method(zod.z.object({
|
|
12974
13244
|
namespace: zod.z.string().optional(),
|
|
@@ -25664,6 +25934,56 @@ var RetrainBboxSchema = zod.z.object({
|
|
|
25664
25934
|
h: zod.z.number()
|
|
25665
25935
|
});
|
|
25666
25936
|
/**
|
|
25937
|
+
* What a box LOOKED LIKE when it was offered, snapshotted at the moment the
|
|
25938
|
+
* operator accepted it. The saved row keeps only the final rectangle; this is
|
|
25939
|
+
* the other half of the pair, and the pair is what says whether the operator
|
|
25940
|
+
* accepted, nudged, relabelled or replaced a proposal (`retrain-review.ts`).
|
|
25941
|
+
*
|
|
25942
|
+
* `ref` names the proposal inside its frame: `pipeline:<trackId>` for a box the
|
|
25943
|
+
* live pipeline drew, `assist:<n>` for the n-th box of a detector or LLM run,
|
|
25944
|
+
* and anything unique for an operator-drawn box (`operator:<n>`). Re-derived
|
|
25945
|
+
* pipeline boxes carry the same ref every time, which is what lets a dismissal
|
|
25946
|
+
* stay dismissed.
|
|
25947
|
+
*/
|
|
25948
|
+
var RetrainOriginSchema = zod.z.object({
|
|
25949
|
+
source: RetrainAnnotationSourceSchema,
|
|
25950
|
+
ref: zod.z.string().min(1),
|
|
25951
|
+
bbox: RetrainBboxSchema,
|
|
25952
|
+
macroClass: RetrainMacroClassSchema,
|
|
25953
|
+
label: zod.z.string().optional(),
|
|
25954
|
+
score: zod.z.number().optional(),
|
|
25955
|
+
modelId: zod.z.string().optional()
|
|
25956
|
+
});
|
|
25957
|
+
/**
|
|
25958
|
+
* A proposal the operator deleted. Durable on the frame, so a deleted pipeline
|
|
25959
|
+
* box does not come back as a draft every time the frame is reopened, and so
|
|
25960
|
+
* the deletion itself is a recorded fact rather than an absence.
|
|
25961
|
+
*/
|
|
25962
|
+
var RetrainDismissedSchema = zod.z.object({
|
|
25963
|
+
ref: zod.z.string().min(1),
|
|
25964
|
+
snapshot: RetrainOriginSchema
|
|
25965
|
+
});
|
|
25966
|
+
/** What the operator did with a proposal (see `retrain-review.ts`). */
|
|
25967
|
+
var RetrainReviewStatusSchema = zod.z.enum(RETRAIN_REVIEW_STATUSES);
|
|
25968
|
+
var RetrainBoxReviewSchema = zod.z.object({
|
|
25969
|
+
ref: zod.z.string(),
|
|
25970
|
+
savedId: zod.z.string().optional(),
|
|
25971
|
+
status: RetrainReviewStatusSchema,
|
|
25972
|
+
/** The baseline was re-derived, not snapshotted (a pre-origin row). */
|
|
25973
|
+
approximate: zod.z.boolean(),
|
|
25974
|
+
origin: RetrainOriginSchema.optional(),
|
|
25975
|
+
iou: zod.z.number().optional()
|
|
25976
|
+
});
|
|
25977
|
+
var RetrainFrameReviewSchema = zod.z.object({
|
|
25978
|
+
boxes: zod.z.array(RetrainBoxReviewSchema).readonly(),
|
|
25979
|
+
summary: zod.z.object({
|
|
25980
|
+
counts: zod.z.record(RetrainReviewStatusSchema, zod.z.number().int()),
|
|
25981
|
+
total: zod.z.number().int(),
|
|
25982
|
+
changed: zod.z.number().int(),
|
|
25983
|
+
approximate: zod.z.boolean()
|
|
25984
|
+
})
|
|
25985
|
+
});
|
|
25986
|
+
/**
|
|
25667
25987
|
* One annotated subject.
|
|
25668
25988
|
*
|
|
25669
25989
|
* `bbox` is normalised against the full frame, ALWAYS. The per-model shapes
|
|
@@ -25687,6 +26007,9 @@ var RetrainAnnotationSchema = zod.z.object({
|
|
|
25687
26007
|
/** Which model proposed this box — or, on a `model_error`, drew the phantom. */
|
|
25688
26008
|
assistModelId: zod.z.string().optional(),
|
|
25689
26009
|
assistScore: zod.z.number().optional(),
|
|
26010
|
+
/** The proposal this box started from, snapshotted at accept time. `null` on
|
|
26011
|
+
* a row saved before origins existed; absent on a draft nobody snapshotted. */
|
|
26012
|
+
origin: RetrainOriginSchema.nullable().optional(),
|
|
25690
26013
|
exportedInBatch: zod.z.string().optional(),
|
|
25691
26014
|
createdAt: zod.z.number()
|
|
25692
26015
|
});
|
|
@@ -25779,7 +26102,19 @@ var RetrainFrameSchema = zod.z.object({
|
|
|
25779
26102
|
* empty when nothing the track store holds can be placed on it. */
|
|
25780
26103
|
pipelineBoxes: zod.z.array(RetrainPipelineBoxSchema).readonly().optional(),
|
|
25781
26104
|
/** The named collections this frame belongs to. Present on list answers. */
|
|
25782
|
-
collectionIds: zod.z.array(zod.z.string()).readonly().optional()
|
|
26105
|
+
collectionIds: zod.z.array(zod.z.string()).readonly().optional(),
|
|
26106
|
+
/** Bumped by every annotation save. A save that names a stale
|
|
26107
|
+
* `expectedRevision` is refused, so two surfaces cannot overwrite each other. */
|
|
26108
|
+
revision: zod.z.number().int().optional(),
|
|
26109
|
+
/** Proposals the operator deleted — never re-seeded as drafts. */
|
|
26110
|
+
dismissed: zod.z.array(RetrainDismissedSchema).readonly().optional(),
|
|
26111
|
+
/** What the operator did with the proposals, computed by the server. */
|
|
26112
|
+
review: RetrainFrameReviewSchema.optional(),
|
|
26113
|
+
/** The frame's pixels over the admin data plane (full size). Fetch with the
|
|
26114
|
+
* admin bearer token; relative to the hub root. */
|
|
26115
|
+
imageUrl: zod.z.string().optional(),
|
|
26116
|
+
/** The same, as a ~480 px thumbnail for grids. */
|
|
26117
|
+
thumbnailUrl: zod.z.string().optional()
|
|
25783
26118
|
});
|
|
25784
26119
|
/** Why a copy-on-select could not be honoured — named, never a silent skip. */
|
|
25785
26120
|
var RetrainCopyRefusalSchema = zod.z.enum([
|
|
@@ -27375,6 +27710,11 @@ var pipelineAnalyticsCapability = {
|
|
|
27375
27710
|
/**
|
|
27376
27711
|
* The pixels of ONE copied frame, base64.
|
|
27377
27712
|
*
|
|
27713
|
+
* @deprecated Use `RetrainFrame.imageUrl` / `thumbnailUrl` (the admin
|
|
27714
|
+
* `retrain-frame` data plane, D613). A base64 envelope holds the frame
|
|
27715
|
+
* whole in the producer AND the caller, and a grid of tiles paid that for
|
|
27716
|
+
* every tile. Kept for one release for callers that cannot fetch a URL.
|
|
27717
|
+
*
|
|
27378
27718
|
* Through the cap rather than a data plane because it is genuinely one
|
|
27379
27719
|
* frame at a time, on demand, at human speed — the shape D9/D18 permit
|
|
27380
27720
|
* (what they forbid is frames crossing a boundary at frame RATE). The
|
|
@@ -27437,18 +27777,59 @@ var pipelineAnalyticsCapability = {
|
|
|
27437
27777
|
* Refuses a macro class typed into `label` or `subLabel` — the tiers are
|
|
27438
27778
|
* separate and the guard is at the WRITE, because a mixed taxonomy cannot
|
|
27439
27779
|
* be un-mixed by reading it.
|
|
27780
|
+
*
|
|
27781
|
+
* ATOMIC and REVISIONED: the replaced rows, the frame's `dismissed` set and
|
|
27782
|
+
* its `revision` move in one transaction, guarded by the revision the
|
|
27783
|
+
* caller saw. A stale `expectedRevision` writes nothing and throws
|
|
27784
|
+
* `retrain-revision-conflict` (parse it with `parseRetrainRevisionConflict`);
|
|
27785
|
+
* the UI and an MCP agent no longer overwrite each other silently.
|
|
27440
27786
|
*/
|
|
27441
27787
|
saveRetrainAnnotations: require_sleep.method(zod.z.object({
|
|
27442
27788
|
deviceId: zod.z.number(),
|
|
27443
27789
|
/** The frame's track, when it has one — checked against the frame. */
|
|
27444
27790
|
trackId: zod.z.string().optional(),
|
|
27445
27791
|
frameId: zod.z.string(),
|
|
27446
|
-
annotations: zod.z.array(RetrainAnnotationDraftSchema)
|
|
27792
|
+
annotations: zod.z.array(RetrainAnnotationDraftSchema),
|
|
27793
|
+
/** The frame's `revision` the caller saw. A different current revision
|
|
27794
|
+
* refuses the save with a `retrain-revision-conflict` error
|
|
27795
|
+
* (`parseRetrainRevisionConflict`). Absent ⇒ last write wins. */
|
|
27796
|
+
expectedRevision: zod.z.number().int().optional(),
|
|
27797
|
+
/** The proposals the operator deleted. Absent ⇒ keep the frame's
|
|
27798
|
+
* current set; present ⇒ replace it (an empty array un-dismisses). */
|
|
27799
|
+
dismissed: zod.z.array(RetrainDismissedSchema).optional()
|
|
27447
27800
|
}), zod.z.array(RetrainAnnotationSchema).readonly(), {
|
|
27448
27801
|
kind: "mutation",
|
|
27449
27802
|
auth: "admin"
|
|
27450
27803
|
}),
|
|
27451
27804
|
/**
|
|
27805
|
+
* Give annotations saved BEFORE origins existed the origin a caller
|
|
27806
|
+
* reconstructed for them (the MCP `track_review_backfill_origin` tool
|
|
27807
|
+
* matches each row to the pipeline box it equals).
|
|
27808
|
+
*
|
|
27809
|
+
* Writes `origin` and nothing else: ids, creation time and the export stamp
|
|
27810
|
+
* are untouched (a re-save through `saveRetrainAnnotations` would reset all
|
|
27811
|
+
* three). A row that already has an origin is SKIPPED — a snapshot taken at
|
|
27812
|
+
* accept time is evidence, a reconstruction is a guess. Atomic and
|
|
27813
|
+
* revision-guarded like the save; bumps the frame's `revision`.
|
|
27814
|
+
*/
|
|
27815
|
+
backfillRetrainOrigins: require_sleep.method(zod.z.object({
|
|
27816
|
+
deviceId: zod.z.number(),
|
|
27817
|
+
trackId: zod.z.string().optional(),
|
|
27818
|
+
frameId: zod.z.string(),
|
|
27819
|
+
expectedRevision: zod.z.number().int().optional(),
|
|
27820
|
+
origins: zod.z.array(zod.z.object({
|
|
27821
|
+
annotationId: zod.z.string(),
|
|
27822
|
+
origin: RetrainOriginSchema
|
|
27823
|
+
})).min(1).max(500)
|
|
27824
|
+
}), zod.z.object({
|
|
27825
|
+
updated: zod.z.number().int(),
|
|
27826
|
+
skipped: zod.z.number().int(),
|
|
27827
|
+
revision: zod.z.number().int()
|
|
27828
|
+
}), {
|
|
27829
|
+
kind: "mutation",
|
|
27830
|
+
auth: "admin"
|
|
27831
|
+
}),
|
|
27832
|
+
/**
|
|
27452
27833
|
* Finish with a track: `staging → trained`. **The only writer of that
|
|
27453
27834
|
* state** — D81 shipped the column with it deliberately unreachable.
|
|
27454
27835
|
*
|
|
@@ -55633,6 +56014,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
55633
56014
|
addonId: null,
|
|
55634
56015
|
access: "create"
|
|
55635
56016
|
},
|
|
56017
|
+
"dataStoreProvider.transact": {
|
|
56018
|
+
capName: "data-store-provider",
|
|
56019
|
+
capScope: "system",
|
|
56020
|
+
addonId: null,
|
|
56021
|
+
access: "create"
|
|
56022
|
+
},
|
|
55636
56023
|
"dataStoreProvider.update": {
|
|
55637
56024
|
capName: "data-store-provider",
|
|
55638
56025
|
capScope: "system",
|
|
@@ -58477,6 +58864,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
58477
58864
|
addonId: null,
|
|
58478
58865
|
access: "create"
|
|
58479
58866
|
},
|
|
58867
|
+
"pipelineAnalytics.backfillRetrainOrigins": {
|
|
58868
|
+
capName: "pipeline-analytics",
|
|
58869
|
+
capScope: "device",
|
|
58870
|
+
addonId: null,
|
|
58871
|
+
access: "create"
|
|
58872
|
+
},
|
|
58480
58873
|
"pipelineAnalytics.cancelRelocateMedia": {
|
|
58481
58874
|
capName: "pipeline-analytics",
|
|
58482
58875
|
capScope: "device",
|
|
@@ -60469,6 +60862,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
60469
60862
|
addonId: null,
|
|
60470
60863
|
access: "create"
|
|
60471
60864
|
},
|
|
60865
|
+
"settingsStore.transact": {
|
|
60866
|
+
capName: "settings-store",
|
|
60867
|
+
capScope: "system",
|
|
60868
|
+
addonId: null,
|
|
60869
|
+
access: "create"
|
|
60870
|
+
},
|
|
60472
60871
|
"settingsStore.update": {
|
|
60473
60872
|
capName: "settings-store",
|
|
60474
60873
|
capScope: "system",
|
|
@@ -68205,6 +68604,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
68205
68604
|
form: "single",
|
|
68206
68605
|
optional: false
|
|
68207
68606
|
}],
|
|
68607
|
+
"pipelineAnalytics.backfillRetrainOrigins": [{
|
|
68608
|
+
name: "deviceId",
|
|
68609
|
+
form: "single",
|
|
68610
|
+
optional: false
|
|
68611
|
+
}],
|
|
68208
68612
|
"pipelineAnalytics.clearTrackRelation": [{
|
|
68209
68613
|
name: "deviceId",
|
|
68210
68614
|
form: "single",
|
|
@@ -70715,6 +71119,7 @@ function createSystemProxy(api) {
|
|
|
70715
71119
|
upsert: (input) => dispatch("settingsStore", "upsert", "mutation", input),
|
|
70716
71120
|
insert: (input) => dispatch("settingsStore", "insert", "mutation", input),
|
|
70717
71121
|
insertMany: (input) => dispatch("settingsStore", "insertMany", "mutation", input),
|
|
71122
|
+
transact: (input) => dispatch("settingsStore", "transact", "mutation", input),
|
|
70718
71123
|
update: (input) => dispatch("settingsStore", "update", "mutation", input),
|
|
70719
71124
|
delete: (input) => dispatch("settingsStore", "delete", "mutation", input),
|
|
70720
71125
|
deleteWhere: (input) => dispatch("settingsStore", "deleteWhere", "mutation", input),
|
|
@@ -80574,6 +80979,10 @@ exports.REMOVED_MODEL_IDS = REMOVED_MODEL_IDS;
|
|
|
80574
80979
|
exports.RESERVED_BINDING_NAMES = require_composition.RESERVED_BINDING_NAMES;
|
|
80575
80980
|
exports.RESERVED_COLLECTION_SOURCES = RESERVED_COLLECTION_SOURCES;
|
|
80576
80981
|
exports.RESTORED_CAP_NAMES = RESTORED_CAP_NAMES;
|
|
80982
|
+
exports.RETRAIN_REVIEW_ADJUSTED_IOU = RETRAIN_REVIEW_ADJUSTED_IOU;
|
|
80983
|
+
exports.RETRAIN_REVIEW_MATCH_IOU = RETRAIN_REVIEW_MATCH_IOU;
|
|
80984
|
+
exports.RETRAIN_REVIEW_STATUSES = RETRAIN_REVIEW_STATUSES;
|
|
80985
|
+
exports.RETRAIN_REVISION_CONFLICT = RETRAIN_REVISION_CONFLICT;
|
|
80577
80986
|
exports.REVALIDATE_AFTER_MS = require_sleep.REVALIDATE_AFTER_MS;
|
|
80578
80987
|
exports.ROOM_EXAMPLE_MOTION_SOURCES = ROOM_EXAMPLE_MOTION_SOURCES;
|
|
80579
80988
|
exports.ROOM_EXAMPLE_TEMPERATURE_SOURCES = ROOM_EXAMPLE_TEMPERATURE_SOURCES;
|
|
@@ -80661,6 +81070,7 @@ exports.RetrainArchiveTargetSchema = RetrainArchiveTargetSchema;
|
|
|
80661
81070
|
exports.RetrainAssistProfileSchema = RetrainAssistProfileSchema;
|
|
80662
81071
|
exports.RetrainAssistResultSchema = RetrainAssistResultSchema;
|
|
80663
81072
|
exports.RetrainAssistSubjectSchema = RetrainAssistSubjectSchema;
|
|
81073
|
+
exports.RetrainBoxReviewSchema = RetrainBoxReviewSchema;
|
|
80664
81074
|
exports.RetrainCollectionCreateResultSchema = RetrainCollectionCreateResultSchema;
|
|
80665
81075
|
exports.RetrainCollectionRenameResultSchema = RetrainCollectionRenameResultSchema;
|
|
80666
81076
|
exports.RetrainCollectionSchema = RetrainCollectionSchema;
|
|
@@ -80673,11 +81083,13 @@ exports.RetrainCorpusPageSchema = RetrainCorpusPageSchema;
|
|
|
80673
81083
|
exports.RetrainDatasetSelectionSchema = RetrainDatasetSelectionSchema;
|
|
80674
81084
|
exports.RetrainDatasetStatsSchema = RetrainDatasetStatsSchema;
|
|
80675
81085
|
exports.RetrainDatasetVersionSchema = RetrainDatasetVersionSchema;
|
|
81086
|
+
exports.RetrainDismissedSchema = RetrainDismissedSchema;
|
|
80676
81087
|
exports.RetrainExportFilterSchema = RetrainExportFilterSchema;
|
|
80677
81088
|
exports.RetrainExportLayoutSchema = RetrainExportLayoutSchema;
|
|
80678
81089
|
exports.RetrainFrameCandidateSchema = RetrainFrameCandidateSchema;
|
|
80679
81090
|
exports.RetrainFrameListSchema = RetrainFrameListSchema;
|
|
80680
81091
|
exports.RetrainFrameOriginSchema = RetrainFrameOriginSchema;
|
|
81092
|
+
exports.RetrainFrameReviewSchema = RetrainFrameReviewSchema;
|
|
80681
81093
|
exports.RetrainFrameSchema = RetrainFrameSchema;
|
|
80682
81094
|
exports.RetrainFrameSelectionSchema = RetrainFrameSelectionSchema;
|
|
80683
81095
|
exports.RetrainFrameWorkStateSchema = RetrainFrameWorkStateSchema;
|
|
@@ -80685,7 +81097,9 @@ exports.RetrainLlmAssistResultSchema = RetrainLlmAssistResultSchema;
|
|
|
80685
81097
|
exports.RetrainLlmProposalSchema = RetrainLlmProposalSchema;
|
|
80686
81098
|
exports.RetrainLlmReviewSchema = RetrainLlmReviewSchema;
|
|
80687
81099
|
exports.RetrainMacroClassSchema = RetrainMacroClassSchema;
|
|
81100
|
+
exports.RetrainOriginSchema = RetrainOriginSchema;
|
|
80688
81101
|
exports.RetrainPipelineBoxSchema = RetrainPipelineBoxSchema;
|
|
81102
|
+
exports.RetrainReviewStatusSchema = RetrainReviewStatusSchema;
|
|
80689
81103
|
exports.RetrainStatusSchema = RetrainStatusSchema;
|
|
80690
81104
|
exports.RetrainTrackSchema = RetrainTrackSchema;
|
|
80691
81105
|
exports.RetrainTrainingCorpusResolveResultSchema = RetrainTrainingCorpusResolveResultSchema;
|
|
@@ -81126,6 +81540,7 @@ exports.checkRoleAddress = checkRoleAddress;
|
|
|
81126
81540
|
exports.classifyBearerPrincipal = classifyBearerPrincipal;
|
|
81127
81541
|
exports.classifyCamerasForBenchmark = classifyCamerasForBenchmark;
|
|
81128
81542
|
exports.classifyInferenceHardware = classifyInferenceHardware;
|
|
81543
|
+
exports.classifyRetrainReview = classifyRetrainReview;
|
|
81129
81544
|
exports.classifySecretWrite = require_sleep.classifySecretWrite;
|
|
81130
81545
|
exports.classifyStream = classifyStream;
|
|
81131
81546
|
exports.classifyStreams = classifyStreams;
|
|
@@ -81544,6 +81959,7 @@ exports.parseMediaOwnerKey = parseMediaOwnerKey;
|
|
|
81544
81959
|
exports.parseOccupancyScope = parseOccupancyScope;
|
|
81545
81960
|
exports.parseProcStatus = parseProcStatus;
|
|
81546
81961
|
exports.parseProfileBrokerId = require_sleep.parseProfileBrokerId;
|
|
81962
|
+
exports.parseRetrainRevisionConflict = parseRetrainRevisionConflict;
|
|
81547
81963
|
exports.parseRuleSection = parseRuleSection;
|
|
81548
81964
|
exports.parseSecretRef = require_sleep.parseSecretRef;
|
|
81549
81965
|
exports.parseSecretStatePath = require_sleep.parseSecretStatePath;
|
|
@@ -81660,6 +82076,8 @@ exports.resolveVariantModelId = resolveVariantModelId;
|
|
|
81660
82076
|
exports.resolveViewableDeviceIds = resolveViewableDeviceIds;
|
|
81661
82077
|
exports.resultCellKey = resultCellKey;
|
|
81662
82078
|
exports.resultStandings = resultStandings;
|
|
82079
|
+
exports.retrainBoxIou = retrainBoxIou;
|
|
82080
|
+
exports.retrainRevisionConflictMessage = retrainRevisionConflictMessage;
|
|
81663
82081
|
exports.roleSpec = roleSpec;
|
|
81664
82082
|
exports.roomCompositionExample = roomCompositionExample;
|
|
81665
82083
|
exports.rootSuppliesOf = rootSuppliesOf;
|
|
@@ -81741,6 +82159,7 @@ exports.strippedOfLegacyReadOnly = strippedOfLegacyReadOnly;
|
|
|
81741
82159
|
exports.subKindsOf = subKindsOf;
|
|
81742
82160
|
exports.summarisePrivacyAudio = summarisePrivacyAudio;
|
|
81743
82161
|
exports.summarizeEffectiveScope = summarizeEffectiveScope;
|
|
82162
|
+
exports.summarizeReview = summarizeReview;
|
|
81744
82163
|
exports.supplyFor = supplyFor;
|
|
81745
82164
|
exports.supportedRuntimes = supportedRuntimes;
|
|
81746
82165
|
exports.switchCapability = switchCapability;
|