@camstack/types 1.2.123 → 1.2.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +6 -3
- package/dist/addon.mjs +6 -3
- package/dist/capabilities/pipeline-analytics.cap.d.ts +46 -0
- package/dist/capabilities/recording.cap.d.ts +20 -0
- package/dist/capabilities/storage-migration.cap.d.ts +130 -0
- package/dist/capabilities/storage.cap.d.ts +19 -0
- package/dist/capabilities/vector-store.cap.d.ts +113 -6
- package/dist/generated/addon-api.d.ts +56 -0
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +2 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +656 -24
- package/dist/index.mjs +637 -25
- package/dist/interfaces/addon.d.ts +67 -0
- package/dist/interfaces/config-ui-secrets.d.ts +48 -0
- package/dist/interfaces/config-ui.d.ts +17 -0
- package/dist/interfaces/relocate.d.ts +370 -6
- package/dist/interfaces/storage-location-declaration.d.ts +40 -0
- package/dist/{sleep-DUxF5DdC.js → sleep-CWWLTM6W.js} +2 -0
- package/dist/{sleep-C9C8EoK8.mjs → sleep-bm0x6zZF.mjs} +2 -0
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_event_category = require("./event-category-BaEgqJNv.js");
|
|
3
|
-
const require_sleep = require("./sleep-
|
|
3
|
+
const require_sleep = require("./sleep-CWWLTM6W.js");
|
|
4
4
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
5
5
|
//#region src/generated/cap-input-defaults.ts
|
|
6
6
|
/**
|
|
@@ -16,7 +16,7 @@ const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
|
16
16
|
* Plain data, zero Zod: a forked runner must not import the schema barrel
|
|
17
17
|
* (~144MB RSS per runner — D28).
|
|
18
18
|
*
|
|
19
|
-
* Coverage: 24 caps,
|
|
19
|
+
* Coverage: 24 caps, 54 methods with defaults.
|
|
20
20
|
*/
|
|
21
21
|
var CAP_INPUT_DEFAULTS = Object.freeze({
|
|
22
22
|
"addons": { "getLogs": { "limit": 100 } },
|
|
@@ -236,7 +236,10 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
|
|
|
236
236
|
"createApiKey": { "isAdmin": false },
|
|
237
237
|
"createUser": { "isAdmin": false }
|
|
238
238
|
},
|
|
239
|
-
"vector-store": {
|
|
239
|
+
"vector-store": {
|
|
240
|
+
"declareIndex": { "metric": "cosine" },
|
|
241
|
+
"scan": { "cursor": 0 }
|
|
242
|
+
},
|
|
240
243
|
"zones": {
|
|
241
244
|
"addZone": { "zone": { "__nested__": {
|
|
242
245
|
"kind": "polygon",
|
package/dist/addon.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as EventCategory } from "./event-category-BZL-fdNj.mjs";
|
|
2
|
-
import { B as ReadinessRegistry, E as adminUiCapability, L as nodePin, R as readNodePin, St as emitReadiness, T as DeviceType, V as ReadinessTimeoutError, W as scopeKey, _t as DisposerChain, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, j as expandCapMethods, m as createDeviceProxy, p as isDeviceScopedCap, s as asString, t as sleep, u as parseJsonUnknown, vt as BaseAddon, x as viewerUiCapability, yt as normalizeAddonInitResult } from "./sleep-
|
|
2
|
+
import { B as ReadinessRegistry, E as adminUiCapability, L as nodePin, R as readNodePin, St as emitReadiness, T as DeviceType, V as ReadinessTimeoutError, W as scopeKey, _t as DisposerChain, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, j as expandCapMethods, m as createDeviceProxy, p as isDeviceScopedCap, s as asString, t as sleep, u as parseJsonUnknown, vt as BaseAddon, x as viewerUiCapability, yt as normalizeAddonInitResult } from "./sleep-bm0x6zZF.mjs";
|
|
3
3
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
4
4
|
//#region src/generated/cap-input-defaults.ts
|
|
5
5
|
/**
|
|
@@ -15,7 +15,7 @@ import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
|
15
15
|
* Plain data, zero Zod: a forked runner must not import the schema barrel
|
|
16
16
|
* (~144MB RSS per runner — D28).
|
|
17
17
|
*
|
|
18
|
-
* Coverage: 24 caps,
|
|
18
|
+
* Coverage: 24 caps, 54 methods with defaults.
|
|
19
19
|
*/
|
|
20
20
|
var CAP_INPUT_DEFAULTS = Object.freeze({
|
|
21
21
|
"addons": { "getLogs": { "limit": 100 } },
|
|
@@ -235,7 +235,10 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
|
|
|
235
235
|
"createApiKey": { "isAdmin": false },
|
|
236
236
|
"createUser": { "isAdmin": false }
|
|
237
237
|
},
|
|
238
|
-
"vector-store": {
|
|
238
|
+
"vector-store": {
|
|
239
|
+
"declareIndex": { "metric": "cosine" },
|
|
240
|
+
"scan": { "cursor": 0 }
|
|
241
|
+
},
|
|
239
242
|
"zones": {
|
|
240
243
|
"addZone": { "zone": { "__nested__": {
|
|
241
244
|
"kind": "polygon",
|
|
@@ -2394,6 +2394,11 @@ export declare const pipelineAnalyticsCapability: {
|
|
|
2394
2394
|
readonly startStorageMigrationMove: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
2395
2395
|
toLocationId: z.ZodString;
|
|
2396
2396
|
throttleMbps: z.ZodOptional<z.ZodNumber>;
|
|
2397
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
2398
|
+
move: "move";
|
|
2399
|
+
seal: "seal";
|
|
2400
|
+
gallery: "gallery";
|
|
2401
|
+
}>>;
|
|
2397
2402
|
leaseId: z.ZodString;
|
|
2398
2403
|
}, z.core.$strip>, z.ZodObject<{
|
|
2399
2404
|
jobId: z.ZodString;
|
|
@@ -2436,9 +2441,50 @@ export declare const pipelineAnalyticsCapability: {
|
|
|
2436
2441
|
readonly relocateMedia: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
2437
2442
|
toLocationId: z.ZodString;
|
|
2438
2443
|
throttleMbps: z.ZodOptional<z.ZodNumber>;
|
|
2444
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
2445
|
+
move: "move";
|
|
2446
|
+
seal: "seal";
|
|
2447
|
+
gallery: "gallery";
|
|
2448
|
+
}>>;
|
|
2439
2449
|
}, z.core.$strip>, z.ZodObject<{
|
|
2440
2450
|
jobId: z.ZodString;
|
|
2441
2451
|
}, z.core.$strip>, "mutation">;
|
|
2452
|
+
/**
|
|
2453
|
+
* How many media / retrain rows still carry NO `locationId`.
|
|
2454
|
+
*
|
|
2455
|
+
* A NULL row means "wherever `eventMedia` points NOW", so the instant a
|
|
2456
|
+
* repoint moves that pointer every such row reads from the new disk while
|
|
2457
|
+
* its bytes are on the old one — the archive goes dark until a drain
|
|
2458
|
+
* happens to stamp it. This count is what the migration planner's
|
|
2459
|
+
* non-blocking gate reads; `relocateMedia({ mode: 'seal' })` is what drives
|
|
2460
|
+
* it to zero.
|
|
2461
|
+
*/
|
|
2462
|
+
readonly countUnstampedEventMedia: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
2463
|
+
media: z.ZodNumber;
|
|
2464
|
+
retrainFrames: z.ZodNumber;
|
|
2465
|
+
total: z.ZodNumber;
|
|
2466
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
2467
|
+
/**
|
|
2468
|
+
* How many rows a pass would STILL act on against `toLocationId`.
|
|
2469
|
+
*
|
|
2470
|
+
* One derivation, two consumers: it is the media lane's denominator (the
|
|
2471
|
+
* **M** the footage lane gets from the ledger census — D295) and it is the
|
|
2472
|
+
* residue behind "drain remaining". Deriving them separately is how "N of M"
|
|
2473
|
+
* ends up comparing two different populations.
|
|
2474
|
+
*
|
|
2475
|
+
* `null` means the count could not be taken; it is never zero-filled,
|
|
2476
|
+
* because a zero here reads as "nothing left to move".
|
|
2477
|
+
*/
|
|
2478
|
+
readonly countRelocatableMedia: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
2479
|
+
toLocationId: z.ZodString;
|
|
2480
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
2481
|
+
move: "move";
|
|
2482
|
+
seal: "seal";
|
|
2483
|
+
gallery: "gallery";
|
|
2484
|
+
}>>;
|
|
2485
|
+
}, z.core.$strip>, z.ZodNullable<z.ZodObject<{
|
|
2486
|
+
rows: z.ZodNumber;
|
|
2487
|
+
}, z.core.$strip>>, "query">;
|
|
2442
2488
|
/** Every relocate job this addon knows about, newest first (in RAM: the
|
|
2443
2489
|
* move is resumable, so a lost list costs nothing but the display). */
|
|
2444
2490
|
readonly listRelocateMediaJobs: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
@@ -718,6 +718,26 @@ export declare const recordingCapability: {
|
|
|
718
718
|
finishedAt: z.ZodNullable<z.ZodNumber>;
|
|
719
719
|
error: z.ZodNullable<z.ZodString>;
|
|
720
720
|
}, z.core.$strip>>>, "query">;
|
|
721
|
+
/**
|
|
722
|
+
* What a location STILL holds, asked of the durable hour ledger.
|
|
723
|
+
*
|
|
724
|
+
* The number behind "drain remaining": segments and bytes that would still
|
|
725
|
+
* have to move off `fromLocationId`. It is a ledger aggregate — the archive
|
|
726
|
+
* — because the resident index is not the archive (D295), and a drain sized
|
|
727
|
+
* off the index is exactly what reported `done` over 80.3 GB on 2026-08-29.
|
|
728
|
+
* `null` means the archive could not be asked (no ledger on this node, or
|
|
729
|
+
* the aggregate failed) and is never conflated with an empty source.
|
|
730
|
+
*/
|
|
731
|
+
readonly getRelocateResidue: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
732
|
+
fromLocationId: z.ZodString;
|
|
733
|
+
footageClass: z.ZodOptional<z.ZodEnum<{
|
|
734
|
+
recordings: "recordings";
|
|
735
|
+
recordingsLow: "recordingsLow";
|
|
736
|
+
}>>;
|
|
737
|
+
}, z.core.$strip>, z.ZodNullable<z.ZodObject<{
|
|
738
|
+
segments: z.ZodNumber;
|
|
739
|
+
bytes: z.ZodNumber;
|
|
740
|
+
}, z.core.$strip>>, "query">;
|
|
721
741
|
/** Cancel a running or queued relocate job. A queued job never runs. */
|
|
722
742
|
readonly cancelRelocateJob: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
723
743
|
jobId: z.ZodString;
|
|
@@ -15,31 +15,68 @@ export declare const storageMigrationCapability: {
|
|
|
15
15
|
recordings: z.ZodOptional<z.ZodString>;
|
|
16
16
|
recordingsLow: z.ZodOptional<z.ZodString>;
|
|
17
17
|
eventMedia: z.ZodOptional<z.ZodString>;
|
|
18
|
+
backups: z.ZodOptional<z.ZodString>;
|
|
19
|
+
galleryMedia: z.ZodOptional<z.ZodString>;
|
|
18
20
|
}, z.core.$strip>;
|
|
19
21
|
throttleMbps: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
blocking: "blocking";
|
|
24
|
+
nonBlocking: "nonBlocking";
|
|
25
|
+
}>>;
|
|
20
26
|
}, z.core.$strip>, z.ZodObject<{
|
|
21
27
|
destinations: z.ZodObject<{
|
|
22
28
|
recordings: z.ZodOptional<z.ZodString>;
|
|
23
29
|
recordingsLow: z.ZodOptional<z.ZodString>;
|
|
24
30
|
eventMedia: z.ZodOptional<z.ZodString>;
|
|
31
|
+
backups: z.ZodOptional<z.ZodString>;
|
|
32
|
+
galleryMedia: z.ZodOptional<z.ZodString>;
|
|
25
33
|
}, z.core.$strip>;
|
|
34
|
+
mode: z.ZodEnum<{
|
|
35
|
+
blocking: "blocking";
|
|
36
|
+
nonBlocking: "nonBlocking";
|
|
37
|
+
}>;
|
|
26
38
|
moves: z.ZodArray<z.ZodObject<{
|
|
27
39
|
storageClass: z.ZodEnum<{
|
|
28
40
|
recordings: "recordings";
|
|
29
41
|
recordingsLow: "recordingsLow";
|
|
30
42
|
eventMedia: "eventMedia";
|
|
43
|
+
backups: "backups";
|
|
44
|
+
galleryMedia: "galleryMedia";
|
|
31
45
|
}>;
|
|
32
46
|
fromLocationId: z.ZodString;
|
|
33
47
|
toLocationId: z.ZodString;
|
|
34
48
|
}, z.core.$strip>>;
|
|
49
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
50
|
+
code: z.ZodEnum<{
|
|
51
|
+
sharesDeviceWithSource: "sharesDeviceWithSource";
|
|
52
|
+
deviceIdentityUnknown: "deviceIdentityUnknown";
|
|
53
|
+
unstampedEventMediaRows: "unstampedEventMediaRows";
|
|
54
|
+
blockingOnly: "blockingOnly";
|
|
55
|
+
noMover: "noMover";
|
|
56
|
+
}>;
|
|
57
|
+
storageClass: z.ZodEnum<{
|
|
58
|
+
recordings: "recordings";
|
|
59
|
+
recordingsLow: "recordingsLow";
|
|
60
|
+
eventMedia: "eventMedia";
|
|
61
|
+
backups: "backups";
|
|
62
|
+
galleryMedia: "galleryMedia";
|
|
63
|
+
}>;
|
|
64
|
+
message: z.ZodString;
|
|
65
|
+
}, z.core.$strip>>;
|
|
35
66
|
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
36
67
|
readonly start: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
37
68
|
destinations: z.ZodObject<{
|
|
38
69
|
recordings: z.ZodOptional<z.ZodString>;
|
|
39
70
|
recordingsLow: z.ZodOptional<z.ZodString>;
|
|
40
71
|
eventMedia: z.ZodOptional<z.ZodString>;
|
|
72
|
+
backups: z.ZodOptional<z.ZodString>;
|
|
73
|
+
galleryMedia: z.ZodOptional<z.ZodString>;
|
|
41
74
|
}, z.core.$strip>;
|
|
42
75
|
throttleMbps: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
77
|
+
blocking: "blocking";
|
|
78
|
+
nonBlocking: "nonBlocking";
|
|
79
|
+
}>>;
|
|
43
80
|
}, z.core.$strip>, z.ZodObject<{
|
|
44
81
|
jobId: z.ZodString;
|
|
45
82
|
}, z.core.$strip>, "mutation">;
|
|
@@ -54,15 +91,23 @@ export declare const storageMigrationCapability: {
|
|
|
54
91
|
done: "done";
|
|
55
92
|
cancelled: "cancelled";
|
|
56
93
|
planning: "planning";
|
|
94
|
+
sealing: "sealing";
|
|
57
95
|
pausing: "pausing";
|
|
96
|
+
draining: "draining";
|
|
58
97
|
repointing: "repointing";
|
|
59
98
|
refreshing: "refreshing";
|
|
60
99
|
resuming: "resuming";
|
|
61
100
|
}>;
|
|
101
|
+
mode: z.ZodEnum<{
|
|
102
|
+
blocking: "blocking";
|
|
103
|
+
nonBlocking: "nonBlocking";
|
|
104
|
+
}>;
|
|
62
105
|
destinations: z.ZodObject<{
|
|
63
106
|
recordings: z.ZodOptional<z.ZodString>;
|
|
64
107
|
recordingsLow: z.ZodOptional<z.ZodString>;
|
|
65
108
|
eventMedia: z.ZodOptional<z.ZodString>;
|
|
109
|
+
backups: z.ZodOptional<z.ZodString>;
|
|
110
|
+
galleryMedia: z.ZodOptional<z.ZodString>;
|
|
66
111
|
}, z.core.$strip>;
|
|
67
112
|
throttleMbps: z.ZodNumber;
|
|
68
113
|
moves: z.ZodArray<z.ZodObject<{
|
|
@@ -70,6 +115,8 @@ export declare const storageMigrationCapability: {
|
|
|
70
115
|
recordings: "recordings";
|
|
71
116
|
recordingsLow: "recordingsLow";
|
|
72
117
|
eventMedia: "eventMedia";
|
|
118
|
+
backups: "backups";
|
|
119
|
+
galleryMedia: "galleryMedia";
|
|
73
120
|
}>;
|
|
74
121
|
fromLocationId: z.ZodString;
|
|
75
122
|
toLocationId: z.ZodString;
|
|
@@ -82,6 +129,13 @@ export declare const storageMigrationCapability: {
|
|
|
82
129
|
cancelled: "cancelled";
|
|
83
130
|
}>>;
|
|
84
131
|
error: z.ZodNullable<z.ZodString>;
|
|
132
|
+
progress: z.ZodNullable<z.ZodObject<{
|
|
133
|
+
filesMoved: z.ZodNumber;
|
|
134
|
+
filesTotal: z.ZodNullable<z.ZodNumber>;
|
|
135
|
+
bytesMoved: z.ZodNumber;
|
|
136
|
+
startedAt: z.ZodNumber;
|
|
137
|
+
observedAt: z.ZodNumber;
|
|
138
|
+
}, z.core.$strip>>;
|
|
85
139
|
}, z.core.$strip>>;
|
|
86
140
|
pauseLeaseId: z.ZodNullable<z.ZodString>;
|
|
87
141
|
pausedParticipants: z.ZodArray<z.ZodEnum<{
|
|
@@ -101,6 +155,82 @@ export declare const storageMigrationCapability: {
|
|
|
101
155
|
}, z.core.$strip>, z.ZodObject<{
|
|
102
156
|
cancelled: z.ZodBoolean;
|
|
103
157
|
}, z.core.$strip>, "mutation">;
|
|
158
|
+
/**
|
|
159
|
+
* Every mover running RIGHT NOW, in both lanes, with its counters.
|
|
160
|
+
*
|
|
161
|
+
* `status` covers a migration's own moves — the coordinator folds their
|
|
162
|
+
* progress onto the durable job record it is already polling. This covers
|
|
163
|
+
* the other case, and it is not hypothetical: a drain armed straight against
|
|
164
|
+
* `recording.relocateFootage` (the only path that existed before
|
|
165
|
+
* {@link drain}) has no job to fold into and would otherwise be invisible.
|
|
166
|
+
*/
|
|
167
|
+
readonly movers: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
168
|
+
lane: z.ZodEnum<{
|
|
169
|
+
media: "media";
|
|
170
|
+
footage: "footage";
|
|
171
|
+
}>;
|
|
172
|
+
job: z.ZodObject<{
|
|
173
|
+
jobId: z.ZodString;
|
|
174
|
+
state: z.ZodEnum<{
|
|
175
|
+
failed: "failed";
|
|
176
|
+
running: "running";
|
|
177
|
+
queued: "queued";
|
|
178
|
+
done: "done";
|
|
179
|
+
cancelled: "cancelled";
|
|
180
|
+
}>;
|
|
181
|
+
fromLocationId: z.ZodString;
|
|
182
|
+
toLocationId: z.ZodString;
|
|
183
|
+
deviceId: z.ZodNullable<z.ZodNumber>;
|
|
184
|
+
entities: z.ZodArray<z.ZodString>;
|
|
185
|
+
filesMoved: z.ZodNumber;
|
|
186
|
+
bytesMoved: z.ZodNumber;
|
|
187
|
+
filesTotal: z.ZodNullable<z.ZodNumber>;
|
|
188
|
+
startedAt: z.ZodNumber;
|
|
189
|
+
finishedAt: z.ZodNullable<z.ZodNumber>;
|
|
190
|
+
error: z.ZodNullable<z.ZodString>;
|
|
191
|
+
}, z.core.$strip>;
|
|
192
|
+
migrationJobId: z.ZodNullable<z.ZodString>;
|
|
193
|
+
observedAt: z.ZodNumber;
|
|
194
|
+
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
195
|
+
/**
|
|
196
|
+
* What each class's SOURCE still holds, from the archive — never from the
|
|
197
|
+
* resident index (D295). Only classes with something left (or something
|
|
198
|
+
* unknown) are listed, so an empty list means there is nothing to drain and
|
|
199
|
+
* the UI has no honest button to offer.
|
|
200
|
+
*/
|
|
201
|
+
readonly residue: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
202
|
+
storageClass: z.ZodEnum<{
|
|
203
|
+
recordings: "recordings";
|
|
204
|
+
recordingsLow: "recordingsLow";
|
|
205
|
+
eventMedia: "eventMedia";
|
|
206
|
+
backups: "backups";
|
|
207
|
+
galleryMedia: "galleryMedia";
|
|
208
|
+
}>;
|
|
209
|
+
fromLocationId: z.ZodString;
|
|
210
|
+
toLocationId: z.ZodString;
|
|
211
|
+
items: z.ZodNullable<z.ZodNumber>;
|
|
212
|
+
bytes: z.ZodNullable<z.ZodNumber>;
|
|
213
|
+
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
214
|
+
/**
|
|
215
|
+
* Run the drain half alone, on a class whose default has ALREADY moved.
|
|
216
|
+
*
|
|
217
|
+
* It never repoints anything, which is what lets `start` keep refusing a
|
|
218
|
+
* destination that is already the default: the two verbs cannot be confused
|
|
219
|
+
* for one another, and no operator can re-repoint a migrated class through
|
|
220
|
+
* this door.
|
|
221
|
+
*/
|
|
222
|
+
readonly drain: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
223
|
+
classes: z.ZodArray<z.ZodEnum<{
|
|
224
|
+
recordings: "recordings";
|
|
225
|
+
recordingsLow: "recordingsLow";
|
|
226
|
+
eventMedia: "eventMedia";
|
|
227
|
+
backups: "backups";
|
|
228
|
+
galleryMedia: "galleryMedia";
|
|
229
|
+
}>>;
|
|
230
|
+
throttleMbps: z.ZodOptional<z.ZodNumber>;
|
|
231
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
232
|
+
jobId: z.ZodString;
|
|
233
|
+
}, z.core.$strip>, "mutation">;
|
|
104
234
|
};
|
|
105
235
|
};
|
|
106
236
|
export type IStorageMigrationProvider = InferProvider<typeof storageMigrationCapability>;
|
|
@@ -131,6 +131,10 @@ export declare const storageCapability: {
|
|
|
131
131
|
single: "single";
|
|
132
132
|
multi: "multi";
|
|
133
133
|
}>;
|
|
134
|
+
access: z.ZodOptional<z.ZodEnum<{
|
|
135
|
+
"local-path": "local-path";
|
|
136
|
+
"cap-mediated": "cap-mediated";
|
|
137
|
+
}>>;
|
|
134
138
|
defaultsTo: z.ZodOptional<z.ZodString>;
|
|
135
139
|
defaultRoot: z.ZodOptional<z.ZodEnum<{
|
|
136
140
|
data: "data";
|
|
@@ -169,8 +173,23 @@ export declare const storageCapability: {
|
|
|
169
173
|
createdAt: z.ZodNumber;
|
|
170
174
|
updatedAt: z.ZodNumber;
|
|
171
175
|
}, z.core.$strip>, "mutation">;
|
|
176
|
+
/**
|
|
177
|
+
* Remove a location record. REFUSES a location that still holds data —
|
|
178
|
+
* deleting a drained location whose durable rows still name it is how this
|
|
179
|
+
* hub acquired 2 131 ghost `recordings:high` segments, and playback does
|
|
180
|
+
* not stat, so the operator sees a silent black window rather than an
|
|
181
|
+
* error.
|
|
182
|
+
*
|
|
183
|
+
* `force` exists because the occupancy check is BEST-EFFORT and refuses on
|
|
184
|
+
* "unknown" as well as on "occupied" (a read that fails must not authorise
|
|
185
|
+
* a destruction — D49). A location on a removed disk, on another node, or
|
|
186
|
+
* behind a remote provider answers "unknown" forever, and a refusal an
|
|
187
|
+
* operator cannot override is its own failure mode. `force: true` is
|
|
188
|
+
* logged, loudly, with what the check saw.
|
|
189
|
+
*/
|
|
172
190
|
readonly deleteLocation: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
173
191
|
id: z.ZodString;
|
|
192
|
+
force: z.ZodOptional<z.ZodBoolean>;
|
|
174
193
|
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
175
194
|
readonly testLocation: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
176
195
|
id: z.ZodString;
|
|
@@ -5,12 +5,38 @@ import { type InferProvider } from './capability-definition.js';
|
|
|
5
5
|
*
|
|
6
6
|
* ## Why this is a capability and not a helper
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
8
|
+
* This capability was introduced with the claim that SIX stores in
|
|
9
|
+
* `addon-post-analysis` held vectors in a `JSON` settings-store column — object
|
|
10
|
+
* CLIP, face, plate, vehicle, identity, and the event store's derivatives. That
|
|
11
|
+
* claim was never true, and leaving it here made five stores look like pending
|
|
12
|
+
* work when three of them have no vector at all. Counted column by column on
|
|
13
|
+
* 2026-08-30, exactly THREE ever held one:
|
|
14
|
+
*
|
|
15
|
+
* - `object-clip` — 512-dim CLIP image embedding, migrated 2026-08-06.
|
|
16
|
+
* - `faces.embedding` — 512-dim ArcFace face embedding, migrated 2026-08-30.
|
|
17
|
+
* - `identity-samples.embedding` — the same ArcFace vector for an ENROLLED
|
|
18
|
+
* face, migrated 2026-08-30 into its OWN index (see below).
|
|
19
|
+
*
|
|
20
|
+
* `plates` and `vehicle-samples` store a plate STRING and a score; `vehicles`
|
|
21
|
+
* and `identities` store a name; the event store stores no derivative vector.
|
|
22
|
+
* They are not migration candidates and never were.
|
|
23
|
+
*
|
|
24
|
+
* Measured on the live hub the JSON encoding cost ~11.7 KB per row (512 floats
|
|
25
|
+
* as TEXT, `JSON.parse`d on every search) and made semantic search load 5,000
|
|
26
|
+
* rows before ranking anything.
|
|
27
|
+
*
|
|
28
|
+
* ## One index per COMPARISON, never per encoder
|
|
29
|
+
*
|
|
30
|
+
* `faces` and `identity-samples` hold the same 512 ArcFace dims from the same
|
|
31
|
+
* model, and they still get two indexes. An index is a set of things that are
|
|
32
|
+
* ranked against each other and that live and die together, and these two are
|
|
33
|
+
* neither: a `faces` row is TRACK-OWNED and cascades away with its track under
|
|
34
|
+
* a per-camera capacity cap, an `identity-samples` row is retention-EXEMPT
|
|
35
|
+
* forever and is the gallery every recognition ranks against. One index would
|
|
36
|
+
* mean every gallery load and every reconcile carried a filter whose failure
|
|
37
|
+
* mode is either ranking a candidate against itself or reclaiming an enrolled
|
|
38
|
+
* person's only sample. The dimension they share is not a reason to share an
|
|
39
|
+
* index; the question they answer is, and it differs.
|
|
14
40
|
*
|
|
15
41
|
* The fix is not a faster loop, it is a different backend — and the backend
|
|
16
42
|
* should be replaceable without touching six callers. So: a singleton
|
|
@@ -114,6 +140,7 @@ export declare const VectorQueryResultSchema: z.ZodObject<{
|
|
|
114
140
|
}, z.core.$strip>>;
|
|
115
141
|
scanned: z.ZodNumber;
|
|
116
142
|
truncated: z.ZodBoolean;
|
|
143
|
+
effectiveTopK: z.ZodNumber;
|
|
117
144
|
}, z.core.$strip>;
|
|
118
145
|
export declare const VectorDeleteInputSchema: z.ZodObject<{
|
|
119
146
|
index: z.ZodString;
|
|
@@ -149,6 +176,62 @@ export declare const VectorGetResultSchema: z.ZodObject<{
|
|
|
149
176
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
150
177
|
}, z.core.$strip>>;
|
|
151
178
|
}, z.core.$strip>;
|
|
179
|
+
/**
|
|
180
|
+
* Ids to read back WITH their vectors.
|
|
181
|
+
*
|
|
182
|
+
* The sibling of {@link VectorGetResultSchema}, and deliberately a separate
|
|
183
|
+
* method rather than a flag on it: `getByIds` promises no vectors and its one
|
|
184
|
+
* caller depends on that promise. This one promises the opposite.
|
|
185
|
+
*
|
|
186
|
+
* It exists because a store cannot put its vectors here otherwise. An ArcFace
|
|
187
|
+
* gallery is ranked IN PROCESS, per detection, against every enrolled sample —
|
|
188
|
+
* a per-face cross-process KNN would be a network round trip inside the
|
|
189
|
+
* recognition loop. So the gallery is loaded once and held in RAM, and loading
|
|
190
|
+
* it requires the index to hand the floats back. Without this method the only
|
|
191
|
+
* way to keep a readable vector is a JSON column, which is the thing this
|
|
192
|
+
* capability exists to delete.
|
|
193
|
+
*
|
|
194
|
+
* BOUNDED BY THE CALLER: ids are named, never "everything". Enumerating an
|
|
195
|
+
* index is {@link VectorScanInputSchema}'s job, and it returns no vectors.
|
|
196
|
+
*/
|
|
197
|
+
export declare const VectorFetchInputSchema: z.ZodObject<{
|
|
198
|
+
index: z.ZodString;
|
|
199
|
+
ids: z.ZodArray<z.ZodString>;
|
|
200
|
+
}, z.core.$strip>;
|
|
201
|
+
export declare const VectorFetchResultSchema: z.ZodObject<{
|
|
202
|
+
items: z.ZodArray<z.ZodObject<{
|
|
203
|
+
id: z.ZodString;
|
|
204
|
+
vector: z.ZodString;
|
|
205
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
206
|
+
}, z.core.$strip>>;
|
|
207
|
+
}, z.core.$strip>;
|
|
208
|
+
/**
|
|
209
|
+
* ENUMERATE an index: one page of rows in a stable order, no ranking.
|
|
210
|
+
*
|
|
211
|
+
* A reconcile does not want the nearest rows, it wants ALL of them, and asking
|
|
212
|
+
* a KNN for "all" is the wrong question twice over. It hits the backend's `k`
|
|
213
|
+
* ceiling — 4,096 on sqlite-vec against a 22,128-row index — and it needs a
|
|
214
|
+
* probe vector it does not have, so the audit passed a ZERO vector whose cosine
|
|
215
|
+
* distance to every row is degenerate. `examined: 4096` then read as "we
|
|
216
|
+
* looked" for as long as anyone cared to read it.
|
|
217
|
+
*
|
|
218
|
+
* This is the primitive that question actually needs: a bounded page, ordered
|
|
219
|
+
* by the backend's own row order, costing no distance computation at all.
|
|
220
|
+
* Vectors are NOT returned — an enumeration that shipped 2 KB per row would be
|
|
221
|
+
* the full-table read this capability was built to stop.
|
|
222
|
+
*/
|
|
223
|
+
export declare const VectorScanInputSchema: z.ZodObject<{
|
|
224
|
+
index: z.ZodString;
|
|
225
|
+
cursor: z.ZodDefault<z.ZodNumber>;
|
|
226
|
+
limit: z.ZodNumber;
|
|
227
|
+
}, z.core.$strip>;
|
|
228
|
+
export declare const VectorScanResultSchema: z.ZodObject<{
|
|
229
|
+
items: z.ZodArray<z.ZodObject<{
|
|
230
|
+
id: z.ZodString;
|
|
231
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
232
|
+
}, z.core.$strip>>;
|
|
233
|
+
nextCursor: z.ZodNullable<z.ZodNumber>;
|
|
234
|
+
}, z.core.$strip>;
|
|
152
235
|
export declare const VectorStatsInputSchema: z.ZodObject<{
|
|
153
236
|
index: z.ZodString;
|
|
154
237
|
}, z.core.$strip>;
|
|
@@ -216,6 +299,7 @@ export declare const vectorStoreCapability: {
|
|
|
216
299
|
}, z.core.$strip>>;
|
|
217
300
|
scanned: z.ZodNumber;
|
|
218
301
|
truncated: z.ZodBoolean;
|
|
302
|
+
effectiveTopK: z.ZodNumber;
|
|
219
303
|
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
220
304
|
/** Metadata by id, no vectors — see {@link VectorGetResultSchema}. */
|
|
221
305
|
readonly getByIds: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
@@ -227,6 +311,29 @@ export declare const vectorStoreCapability: {
|
|
|
227
311
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
228
312
|
}, z.core.$strip>>;
|
|
229
313
|
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
314
|
+
/** Metadata AND vectors, by named id — see {@link VectorFetchInputSchema}. */
|
|
315
|
+
readonly fetchByIds: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
316
|
+
index: z.ZodString;
|
|
317
|
+
ids: z.ZodArray<z.ZodString>;
|
|
318
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
319
|
+
items: z.ZodArray<z.ZodObject<{
|
|
320
|
+
id: z.ZodString;
|
|
321
|
+
vector: z.ZodString;
|
|
322
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
323
|
+
}, z.core.$strip>>;
|
|
324
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
325
|
+
/** One page of the whole index, unranked — see {@link VectorScanInputSchema}. */
|
|
326
|
+
readonly scan: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
327
|
+
index: z.ZodString;
|
|
328
|
+
cursor: z.ZodDefault<z.ZodNumber>;
|
|
329
|
+
limit: z.ZodNumber;
|
|
330
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
331
|
+
items: z.ZodArray<z.ZodObject<{
|
|
332
|
+
id: z.ZodString;
|
|
333
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
334
|
+
}, z.core.$strip>>;
|
|
335
|
+
nextCursor: z.ZodNullable<z.ZodNumber>;
|
|
336
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
230
337
|
readonly deleteByIds: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
231
338
|
index: z.ZodString;
|
|
232
339
|
ids: z.ZodArray<z.ZodString>;
|
|
@@ -5121,6 +5121,20 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
5121
5121
|
output: z.infer<typeof pipelineAnalyticsCapability.methods.relocateMedia.output>;
|
|
5122
5122
|
meta: object;
|
|
5123
5123
|
}>;
|
|
5124
|
+
countUnstampedEventMedia: TRPCQueryProcedure<{
|
|
5125
|
+
input: {
|
|
5126
|
+
[x: string]: unknown;
|
|
5127
|
+
} & z.input<typeof pipelineAnalyticsCapability.methods.countUnstampedEventMedia.input>;
|
|
5128
|
+
output: z.infer<typeof pipelineAnalyticsCapability.methods.countUnstampedEventMedia.output>;
|
|
5129
|
+
meta: object;
|
|
5130
|
+
}>;
|
|
5131
|
+
countRelocatableMedia: TRPCQueryProcedure<{
|
|
5132
|
+
input: {
|
|
5133
|
+
[x: string]: unknown;
|
|
5134
|
+
} & z.input<typeof pipelineAnalyticsCapability.methods.countRelocatableMedia.input>;
|
|
5135
|
+
output: z.infer<typeof pipelineAnalyticsCapability.methods.countRelocatableMedia.output>;
|
|
5136
|
+
meta: object;
|
|
5137
|
+
}>;
|
|
5124
5138
|
listRelocateMediaJobs: TRPCQueryProcedure<{
|
|
5125
5139
|
input: {
|
|
5126
5140
|
[x: string]: unknown;
|
|
@@ -6571,6 +6585,13 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
6571
6585
|
output: z.infer<typeof recordingCapability.methods.listRelocateJobs.output>;
|
|
6572
6586
|
meta: object;
|
|
6573
6587
|
}>;
|
|
6588
|
+
getRelocateResidue: TRPCQueryProcedure<{
|
|
6589
|
+
input: {
|
|
6590
|
+
[x: string]: unknown;
|
|
6591
|
+
} & z.input<typeof recordingCapability.methods.getRelocateResidue.input>;
|
|
6592
|
+
output: z.infer<typeof recordingCapability.methods.getRelocateResidue.output>;
|
|
6593
|
+
meta: object;
|
|
6594
|
+
}>;
|
|
6574
6595
|
cancelRelocateJob: TRPCMutationProcedure<{
|
|
6575
6596
|
input: {
|
|
6576
6597
|
[x: string]: unknown;
|
|
@@ -7245,6 +7266,27 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
7245
7266
|
output: z.infer<typeof storageMigrationCapability.methods.cancel.output>;
|
|
7246
7267
|
meta: object;
|
|
7247
7268
|
}>;
|
|
7269
|
+
movers: TRPCQueryProcedure<{
|
|
7270
|
+
input: {
|
|
7271
|
+
[x: string]: unknown;
|
|
7272
|
+
} & z.input<typeof storageMigrationCapability.methods.movers.input>;
|
|
7273
|
+
output: z.infer<typeof storageMigrationCapability.methods.movers.output>;
|
|
7274
|
+
meta: object;
|
|
7275
|
+
}>;
|
|
7276
|
+
residue: TRPCQueryProcedure<{
|
|
7277
|
+
input: {
|
|
7278
|
+
[x: string]: unknown;
|
|
7279
|
+
} & z.input<typeof storageMigrationCapability.methods.residue.input>;
|
|
7280
|
+
output: z.infer<typeof storageMigrationCapability.methods.residue.output>;
|
|
7281
|
+
meta: object;
|
|
7282
|
+
}>;
|
|
7283
|
+
drain: TRPCMutationProcedure<{
|
|
7284
|
+
input: {
|
|
7285
|
+
[x: string]: unknown;
|
|
7286
|
+
} & z.input<typeof storageMigrationCapability.methods.drain.input>;
|
|
7287
|
+
output: z.infer<typeof storageMigrationCapability.methods.drain.output>;
|
|
7288
|
+
meta: object;
|
|
7289
|
+
}>;
|
|
7248
7290
|
}>>;
|
|
7249
7291
|
storageProvider: TRPCBuiltRouter<{
|
|
7250
7292
|
ctx: TrpcContext;
|
|
@@ -8396,6 +8438,20 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
8396
8438
|
output: z.infer<typeof vectorStoreCapability.methods.getByIds.output>;
|
|
8397
8439
|
meta: object;
|
|
8398
8440
|
}>;
|
|
8441
|
+
fetchByIds: TRPCQueryProcedure<{
|
|
8442
|
+
input: {
|
|
8443
|
+
[x: string]: unknown;
|
|
8444
|
+
} & z.input<typeof vectorStoreCapability.methods.fetchByIds.input>;
|
|
8445
|
+
output: z.infer<typeof vectorStoreCapability.methods.fetchByIds.output>;
|
|
8446
|
+
meta: object;
|
|
8447
|
+
}>;
|
|
8448
|
+
scan: TRPCQueryProcedure<{
|
|
8449
|
+
input: {
|
|
8450
|
+
[x: string]: unknown;
|
|
8451
|
+
} & z.input<typeof vectorStoreCapability.methods.scan.input>;
|
|
8452
|
+
output: z.infer<typeof vectorStoreCapability.methods.scan.output>;
|
|
8453
|
+
meta: object;
|
|
8454
|
+
}>;
|
|
8399
8455
|
deleteByIds: TRPCMutationProcedure<{
|
|
8400
8456
|
input: {
|
|
8401
8457
|
[x: string]: unknown;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* Plain data, zero Zod: a forked runner must not import the schema barrel
|
|
12
12
|
* (~144MB RSS per runner — D28).
|
|
13
13
|
*
|
|
14
|
-
* Coverage: 24 caps,
|
|
14
|
+
* Coverage: 24 caps, 54 methods with defaults.
|
|
15
15
|
*/
|
|
16
16
|
export declare const CAP_INPUT_DEFAULTS: Readonly<Record<string, Readonly<Record<string, Readonly<Record<string, unknown>>>>>>;
|
|
17
17
|
/**
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* scope+access check inside `protectedProcedure` (see
|
|
7
7
|
* `server/backend/src/api/trpc/trpc.middleware.ts`).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
9
|
+
* Coverage: 986 method paths across 126 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|