@camstack/types 1.2.140 → 1.2.142
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/backup.cap.d.ts +149 -7
- package/dist/capabilities/battery.cap.d.ts +4 -4
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/pipeline-analytics.cap.d.ts +2 -0
- package/dist/capabilities/stream-broker.cap.d.ts +31 -0
- package/dist/device/container-primary-child.d.ts +31 -2
- package/dist/generated/addon-api.d.ts +21 -0
- package/dist/generated/device-proxy.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.js +215 -6
- package/dist/index.mjs +212 -7
- package/dist/interfaces/event-bus.d.ts +7 -1
- package/dist/{sleep-BwGJ_wL_.js → sleep-BDmIj1HV.js} +1 -0
- package/dist/{sleep-C1mz-ocE.mjs → sleep-Cwo3fRlv.mjs} +1 -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-BDmIj1HV.js");
|
|
4
4
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
5
5
|
//#region src/generated/cap-input-defaults.ts
|
|
6
6
|
/**
|
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-Cwo3fRlv.mjs";
|
|
3
3
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
4
4
|
//#region src/generated/cap-input-defaults.ts
|
|
5
5
|
/**
|
|
@@ -111,6 +111,82 @@ declare const LocationStatSchema: z.ZodObject<{
|
|
|
111
111
|
fileCount: z.ZodNumber;
|
|
112
112
|
present: z.ZodBoolean;
|
|
113
113
|
}, z.core.$strip>;
|
|
114
|
+
/** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
|
|
115
|
+
declare const BackupRunStateSchema: z.ZodEnum<{
|
|
116
|
+
failed: "failed";
|
|
117
|
+
running: "running";
|
|
118
|
+
queued: "queued";
|
|
119
|
+
cancelled: "cancelled";
|
|
120
|
+
succeeded: "succeeded";
|
|
121
|
+
}>;
|
|
122
|
+
/**
|
|
123
|
+
* Where a running backup currently is. `queued` before it starts,
|
|
124
|
+
* `building` while the tar.gz is being staged, `uploading` during the
|
|
125
|
+
* per-destination fan-out, `done` once terminal.
|
|
126
|
+
*/
|
|
127
|
+
declare const BackupRunPhaseSchema: z.ZodEnum<{
|
|
128
|
+
queued: "queued";
|
|
129
|
+
done: "done";
|
|
130
|
+
building: "building";
|
|
131
|
+
uploading: "uploading";
|
|
132
|
+
}>;
|
|
133
|
+
/**
|
|
134
|
+
* Observable state of one backup run — readable WHILE it runs via
|
|
135
|
+
* `backup.listRuns`. This is what makes the execution queue and
|
|
136
|
+
* `backup.cancel` usable: the 2026-09-04 incident (two concurrent
|
|
137
|
+
* multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
|
|
138
|
+
* diagnosable with `du` because nothing reported that runs existed or
|
|
139
|
+
* how large the staged archive had grown.
|
|
140
|
+
*/
|
|
141
|
+
declare const BackupRunSchema: z.ZodObject<{
|
|
142
|
+
id: z.ZodString;
|
|
143
|
+
state: z.ZodEnum<{
|
|
144
|
+
failed: "failed";
|
|
145
|
+
running: "running";
|
|
146
|
+
queued: "queued";
|
|
147
|
+
cancelled: "cancelled";
|
|
148
|
+
succeeded: "succeeded";
|
|
149
|
+
}>;
|
|
150
|
+
phase: z.ZodEnum<{
|
|
151
|
+
queued: "queued";
|
|
152
|
+
done: "done";
|
|
153
|
+
building: "building";
|
|
154
|
+
uploading: "uploading";
|
|
155
|
+
}>;
|
|
156
|
+
destinationIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
157
|
+
label: z.ZodOptional<z.ZodString>;
|
|
158
|
+
requestedAt: z.ZodNumber;
|
|
159
|
+
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
160
|
+
finishedAt: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
stagedBytes: z.ZodNumber;
|
|
162
|
+
archiveSizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
uploadedBytes: z.ZodNumber;
|
|
164
|
+
completedDestinationIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
165
|
+
failedDestinationIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
166
|
+
error: z.ZodOptional<z.ZodString>;
|
|
167
|
+
queuePosition: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
/**
|
|
170
|
+
* Result of `backup.trigger`. The call still resolves when the run
|
|
171
|
+
* terminates (compat with schedule-driven runs and the admin UI), but
|
|
172
|
+
* it now names the run and says whether it had to WAIT: a trigger that
|
|
173
|
+
* arrives while another run is in flight is enqueued (or joined onto
|
|
174
|
+
* an identical already-queued run), never started concurrently.
|
|
175
|
+
*/
|
|
176
|
+
declare const BackupTriggerResultSchema: z.ZodObject<{
|
|
177
|
+
runId: z.ZodString;
|
|
178
|
+
queued: z.ZodBoolean;
|
|
179
|
+
joined: z.ZodBoolean;
|
|
180
|
+
cancelled: z.ZodBoolean;
|
|
181
|
+
entries: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
182
|
+
id: z.ZodString;
|
|
183
|
+
destinationId: z.ZodOptional<z.ZodString>;
|
|
184
|
+
label: z.ZodOptional<z.ZodString>;
|
|
185
|
+
createdAt: z.ZodNumber;
|
|
186
|
+
sizeBytes: z.ZodNumber;
|
|
187
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
188
|
+
}, z.core.$strip>>>;
|
|
189
|
+
}, z.core.$strip>;
|
|
114
190
|
/**
|
|
115
191
|
* A backup schedule — the N:M "entry" that binds one cron cadence to a
|
|
116
192
|
* SET of destination locations. Supersedes the per-location cron on
|
|
@@ -176,20 +252,82 @@ export declare const backupCapability: {
|
|
|
176
252
|
* Trigger a backup. Without `destinations` the orchestrator fans
|
|
177
253
|
* out to every destination flagged as enabled in the routing
|
|
178
254
|
* config; with it, only the listed addons receive the archive.
|
|
255
|
+
*
|
|
256
|
+
* At most ONE backup run executes at a time — the source tree and
|
|
257
|
+
* the staging disk are shared by every run, so a second trigger
|
|
258
|
+
* while one is in flight is enqueued (or joined onto an identical
|
|
259
|
+
* queued run) and the result says so. See D342.
|
|
179
260
|
*/
|
|
180
261
|
readonly trigger: import("./capability-definition.js").CapabilityMethodSchema<z.ZodOptional<z.ZodObject<{
|
|
181
262
|
destinations: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
182
263
|
locations: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
183
264
|
label: z.ZodOptional<z.ZodString>;
|
|
184
265
|
retentionCount: z.ZodOptional<z.ZodNumber>;
|
|
185
|
-
}, z.core.$strip>>, z.
|
|
266
|
+
}, z.core.$strip>>, z.ZodObject<{
|
|
267
|
+
runId: z.ZodString;
|
|
268
|
+
queued: z.ZodBoolean;
|
|
269
|
+
joined: z.ZodBoolean;
|
|
270
|
+
cancelled: z.ZodBoolean;
|
|
271
|
+
entries: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
272
|
+
id: z.ZodString;
|
|
273
|
+
destinationId: z.ZodOptional<z.ZodString>;
|
|
274
|
+
label: z.ZodOptional<z.ZodString>;
|
|
275
|
+
createdAt: z.ZodNumber;
|
|
276
|
+
sizeBytes: z.ZodNumber;
|
|
277
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
278
|
+
}, z.core.$strip>>>;
|
|
279
|
+
}, z.core.$strip>, "mutation">;
|
|
280
|
+
/**
|
|
281
|
+
* Every run the orchestrator knows about, in EXECUTION order: the
|
|
282
|
+
* running run first, then queued runs in the exact order they will
|
|
283
|
+
* execute (each with `queuePosition`, 1 = next), then the bounded
|
|
284
|
+
* finished history newest-first. Only one run executes at a time
|
|
285
|
+
* (D342) — the queued section IS the line. Each run carries live
|
|
286
|
+
* phase + byte counters so a runaway build is visible in seconds,
|
|
287
|
+
* not via `du`.
|
|
288
|
+
*/
|
|
289
|
+
readonly listRuns: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
186
290
|
id: z.ZodString;
|
|
187
|
-
|
|
291
|
+
state: z.ZodEnum<{
|
|
292
|
+
failed: "failed";
|
|
293
|
+
running: "running";
|
|
294
|
+
queued: "queued";
|
|
295
|
+
cancelled: "cancelled";
|
|
296
|
+
succeeded: "succeeded";
|
|
297
|
+
}>;
|
|
298
|
+
phase: z.ZodEnum<{
|
|
299
|
+
queued: "queued";
|
|
300
|
+
done: "done";
|
|
301
|
+
building: "building";
|
|
302
|
+
uploading: "uploading";
|
|
303
|
+
}>;
|
|
304
|
+
destinationIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
188
305
|
label: z.ZodOptional<z.ZodString>;
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
306
|
+
requestedAt: z.ZodNumber;
|
|
307
|
+
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
308
|
+
finishedAt: z.ZodOptional<z.ZodNumber>;
|
|
309
|
+
stagedBytes: z.ZodNumber;
|
|
310
|
+
archiveSizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
311
|
+
uploadedBytes: z.ZodNumber;
|
|
312
|
+
completedDestinationIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
313
|
+
failedDestinationIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
314
|
+
error: z.ZodOptional<z.ZodString>;
|
|
315
|
+
queuePosition: z.ZodOptional<z.ZodNumber>;
|
|
316
|
+
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
317
|
+
/**
|
|
318
|
+
* Stop a backup run. Mirrors `storage-migration.cancel` semantics:
|
|
319
|
+
* id in, `{ cancelled }` out — `false` when the run is unknown or
|
|
320
|
+
* already terminal. A QUEUED run is removed before it ever starts;
|
|
321
|
+
* the RUNNING run has its tar/upload stream actually aborted, the
|
|
322
|
+
* half-written staging archive is deleted, and the in-flight
|
|
323
|
+
* destination upload is aborted server-side (partial discarded).
|
|
324
|
+
* Destinations that already completed keep their archive.
|
|
325
|
+
*/
|
|
326
|
+
readonly cancel: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
327
|
+
runId: z.ZodString;
|
|
328
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
329
|
+
cancelled: z.ZodBoolean;
|
|
330
|
+
}, z.core.$strip>, "mutation">;
|
|
193
331
|
/** Union of every destination's archives, each tagged with `destinationId`. */
|
|
194
332
|
readonly list: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
195
333
|
id: z.ZodString;
|
|
@@ -337,4 +475,8 @@ export declare const backupCapability: {
|
|
|
337
475
|
};
|
|
338
476
|
};
|
|
339
477
|
export type IBackupProvider = InferProvider<typeof backupCapability>;
|
|
340
|
-
export { ArchiveEntrySchema, ArchiveManifestSchema, BackupArchiveEntrySchema, BackupDestinationInfoSchema, BackupEntrySchema, BackupScheduleSchema, BackupSubDestinationInfoSchema, LocationStatSchema, };
|
|
478
|
+
export { ArchiveEntrySchema, ArchiveManifestSchema, BackupArchiveEntrySchema, BackupDestinationInfoSchema, BackupEntrySchema, BackupRunPhaseSchema, BackupRunSchema, BackupRunStateSchema, BackupScheduleSchema, BackupSubDestinationInfoSchema, BackupTriggerResultSchema, LocationStatSchema, };
|
|
479
|
+
export type BackupRunState = z.infer<typeof BackupRunStateSchema>;
|
|
480
|
+
export type BackupRunPhase = z.infer<typeof BackupRunPhaseSchema>;
|
|
481
|
+
export type BackupRun = z.infer<typeof BackupRunSchema>;
|
|
482
|
+
export type BackupTriggerResult = z.infer<typeof BackupTriggerResultSchema>;
|
|
@@ -9,7 +9,7 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
9
9
|
* threshold.
|
|
10
10
|
*/
|
|
11
11
|
export declare const BatteryStatusSchema: z.ZodObject<{
|
|
12
|
-
percentage: z.ZodNumber
|
|
12
|
+
percentage: z.ZodNullable<z.ZodNumber>;
|
|
13
13
|
charging: z.ZodEnum<{
|
|
14
14
|
none: "none";
|
|
15
15
|
dc: "dc";
|
|
@@ -63,7 +63,7 @@ export declare const batteryCapability: {
|
|
|
63
63
|
readonly data: z.ZodObject<{
|
|
64
64
|
deviceId: z.ZodNumber;
|
|
65
65
|
status: z.ZodObject<{
|
|
66
|
-
percentage: z.ZodNumber
|
|
66
|
+
percentage: z.ZodNullable<z.ZodNumber>;
|
|
67
67
|
charging: z.ZodEnum<{
|
|
68
68
|
none: "none";
|
|
69
69
|
dc: "dc";
|
|
@@ -79,7 +79,7 @@ export declare const batteryCapability: {
|
|
|
79
79
|
};
|
|
80
80
|
readonly status: {
|
|
81
81
|
readonly schema: z.ZodObject<{
|
|
82
|
-
percentage: z.ZodNumber
|
|
82
|
+
percentage: z.ZodNullable<z.ZodNumber>;
|
|
83
83
|
charging: z.ZodEnum<{
|
|
84
84
|
none: "none";
|
|
85
85
|
dc: "dc";
|
|
@@ -108,7 +108,7 @@ export declare const batteryCapability: {
|
|
|
108
108
|
* the underlying driver.
|
|
109
109
|
*/
|
|
110
110
|
readonly runtimeState: z.ZodObject<{
|
|
111
|
-
percentage: z.ZodNumber
|
|
111
|
+
percentage: z.ZodNullable<z.ZodNumber>;
|
|
112
112
|
charging: z.ZodEnum<{
|
|
113
113
|
none: "none";
|
|
114
114
|
dc: "dc";
|
|
@@ -31,7 +31,7 @@ export type { AudioAnalyzerGlobalConfig, AudioBackendChoice, IAudioAnalyzerProvi
|
|
|
31
31
|
export { AUDIO_BACKEND_CHOICES, AudioAnalysisResultSchema, AudioAnalysisSettingsSchema, AudioClassificationResultSchema, audioAnalyzerCapability, DEFAULT_AUDIO_ANALYZER_CONFIG, } from './audio-analyzer.cap.js';
|
|
32
32
|
export { AudioCodecInfoSchema, AudioDecodeSessionConfigSchema, AudioEncodedChunkSchema, AudioEncodeSessionConfigSchema, AudioPcmChunkSchema, audioCodecCapability, type IAudioCodecCapProvider, PcmSampleFormatSchema, } from './audio-codec.cap.js';
|
|
33
33
|
export { AuthResultSchema, authProviderCapability } from './auth-provider.cap.js';
|
|
34
|
-
export { ArchiveEntrySchema, ArchiveManifestSchema, BackupDestinationInfoSchema, BackupEntrySchema, backupCapability, type IBackupProvider, LocationStatSchema, } from './backup.cap.js';
|
|
34
|
+
export { ArchiveEntrySchema, ArchiveManifestSchema, BackupDestinationInfoSchema, BackupEntrySchema, type BackupRun, type BackupRunPhase, BackupRunPhaseSchema, BackupRunSchema, type BackupRunState, BackupRunStateSchema, type BackupTriggerResult, BackupTriggerResultSchema, backupCapability, type IBackupProvider, LocationStatSchema, } from './backup.cap.js';
|
|
35
35
|
export { BrokerAddInputSchema, BrokerGetStateInputSchema, type BrokerInfo as UnifiedBrokerInfo, BrokerInfoSchema as UnifiedBrokerInfoSchema, type BrokerProviderInfo, BrokerProviderInfoSchema, BrokerPublishInputSchema, BrokerRegistryStatusSchema, type BrokerStatus as UnifiedBrokerStatus, BrokerStatusEnum, BrokerSubscribeInputSchema, BrokerSubscribeResultSchema, BrokerTestConnectionResultSchema, BrokerUnsubscribeInputSchema, brokerCapability, type IBrokerProvider, } from './broker.cap.js';
|
|
36
36
|
export { cameraPipelineConfigCapability, type ICameraPipelineConfigProvider, } from './camera-pipeline-config.cap.js';
|
|
37
37
|
export { cameraStreamsCapability, type ICameraStreamsProvider, type PickedCamStream, PickedCamStreamSchema, PickStreamPreferencesSchema, PickStreamRequirementsSchema, type StreamCodec, StreamCodecSchema, } from './camera-streams.cap.js';
|
|
@@ -1106,6 +1106,7 @@ declare const RecentTracksQueryInput: z.ZodObject<{
|
|
|
1106
1106
|
slim: "slim";
|
|
1107
1107
|
}>>;
|
|
1108
1108
|
includeStationary: z.ZodOptional<z.ZodBoolean>;
|
|
1109
|
+
classes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1109
1110
|
}, z.core.$strip>;
|
|
1110
1111
|
export type RecentTracksQuery = z.infer<typeof RecentTracksQueryInput>;
|
|
1111
1112
|
declare const RecentTracksPageSchema: z.ZodObject<{
|
|
@@ -1907,6 +1908,7 @@ export declare const pipelineAnalyticsCapability: {
|
|
|
1907
1908
|
slim: "slim";
|
|
1908
1909
|
}>>;
|
|
1909
1910
|
includeStationary: z.ZodOptional<z.ZodBoolean>;
|
|
1911
|
+
classes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1910
1912
|
}, z.core.$strip>, z.ZodObject<{
|
|
1911
1913
|
tracks: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
1912
1914
|
retrainStatus: z.ZodOptional<z.ZodEnum<{
|
|
@@ -643,6 +643,37 @@ export declare const streamBrokerCapability: {
|
|
|
643
643
|
}, z.core.$strip>, z.ZodObject<{
|
|
644
644
|
success: z.ZodLiteral<true>;
|
|
645
645
|
}, z.core.$strip>, "mutation">;
|
|
646
|
+
/**
|
|
647
|
+
* The HARDWARE behind a device number was replaced
|
|
648
|
+
* (`deviceManager.migrateDevice`). Forget every piece of broker state that
|
|
649
|
+
* described the old box, so the next catalog pull derives everything from
|
|
650
|
+
* the camera that is actually there:
|
|
651
|
+
*
|
|
652
|
+
* - every `derived:*` stream definition — a derived is authored against a
|
|
653
|
+
* specific profile layout, and against the wrong hardware its feeder
|
|
654
|
+
* respawns forever (observed at attempt 2732 on the live hub,
|
|
655
|
+
* 2026-09-01);
|
|
656
|
+
* - the profile-slot assignment entry, PURGED (not unassigned — unassign
|
|
657
|
+
* marks the slot manual, which would pin the stale choice instead of
|
|
658
|
+
* letting `computeInitialAssignment` re-derive it);
|
|
659
|
+
* - the probe snapshots (`<deviceId>/…` — probed codec/resolution of the
|
|
660
|
+
* old hardware);
|
|
661
|
+
* - the persisted RTSP token rows for the device's brokers (keyed
|
|
662
|
+
* `<deviceId>/<camStreamId>`; the stream ids change with the hardware,
|
|
663
|
+
* so the rows are dead URLs).
|
|
664
|
+
*
|
|
665
|
+
* An RPC, deliberately — an event is telemetry and may be dropped (D8),
|
|
666
|
+
* and a dropped forget leaves a feeder respawning against a stream that
|
|
667
|
+
* does not exist.
|
|
668
|
+
*/
|
|
669
|
+
readonly forgetDeviceHardware: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
670
|
+
deviceId: z.ZodNumber;
|
|
671
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
672
|
+
derivedStreamsDeleted: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
673
|
+
assignmentsPurged: z.ZodBoolean;
|
|
674
|
+
probeSnapshotsDropped: z.ZodNumber;
|
|
675
|
+
rtspTokenRowsDeleted: z.ZodNumber;
|
|
676
|
+
}, z.core.$strip>, "mutation">;
|
|
646
677
|
/**
|
|
647
678
|
* Render a short GIF or MP4 from the broker's PRE-BUFFER around an instant.
|
|
648
679
|
*
|
|
@@ -14,6 +14,15 @@
|
|
|
14
14
|
* Each carried the same list and a comment asking the others to stay in sync.
|
|
15
15
|
* This is that list, in the one package all of them already depend on.
|
|
16
16
|
*
|
|
17
|
+
* `ui-library` and the server's linked-devices expansion IMPORT it. Two
|
|
18
|
+
* consumers cannot, and keep a checked copy instead: the viewer resolves
|
|
19
|
+
* `@camstack/types` from its own `node_modules` (an installed release, where a
|
|
20
|
+
* newly added export simply is not there), and the Home Assistant provider
|
|
21
|
+
* expresses the same precedence over the `DeviceType` enum because it answers
|
|
22
|
+
* a different question from the same ordering. `scripts/check-container-
|
|
23
|
+
* priority-in-sync.ts` fails the build when either drifts — the comment that
|
|
24
|
+
* used to ask for this could not.
|
|
25
|
+
*
|
|
17
26
|
* The rule has two halves and the ORDER matters: an operator's explicit pick
|
|
18
27
|
* wins outright, and only in its absence does type priority decide. The pick is
|
|
19
28
|
* keyed on the child's re-sync-stable `entityId`, not its numeric id, so it
|
|
@@ -34,8 +43,28 @@ export declare const CONTAINER_CHILD_PRIORITY: readonly string[];
|
|
|
34
43
|
/** The slice of a child this resolution needs. */
|
|
35
44
|
export interface ContainerChildRef {
|
|
36
45
|
readonly id: number;
|
|
37
|
-
/**
|
|
38
|
-
|
|
46
|
+
/**
|
|
47
|
+
* The CANONICAL key an operator's pick is matched on.
|
|
48
|
+
*
|
|
49
|
+
* `stableId` and not `sourceInfo.id`, because `sourceInfo` is rebuilt from
|
|
50
|
+
* the device's config blob and the projection that linked-devices must use
|
|
51
|
+
* (`slim`) does not read it — measured on the live hub, 677 of 925 container
|
|
52
|
+
* children have a `sourceInfo.id` that differs from their `stableId`, so a
|
|
53
|
+
* resolver keyed on it would have missed the operator's pick for three
|
|
54
|
+
* children in four and fallen back to priority WHILE LOOKING LIKE IT WORKED.
|
|
55
|
+
*
|
|
56
|
+
* `stableId` costs nothing to have: it is a NOT NULL column, and
|
|
57
|
+
* `(addonId, stableId)` is the very index the row store re-identifies a
|
|
58
|
+
* device by across a re-sync — which is exactly the durability the pick
|
|
59
|
+
* needs.
|
|
60
|
+
*/
|
|
61
|
+
readonly stableId: string;
|
|
62
|
+
/**
|
|
63
|
+
* The integration's own entity id, when the caller has it. Accepted ONLY so
|
|
64
|
+
* a pick stored under the previous key still resolves; new picks are written
|
|
65
|
+
* as `stableId`. Absent is normal.
|
|
66
|
+
*/
|
|
67
|
+
readonly entityId?: string;
|
|
39
68
|
readonly type: string;
|
|
40
69
|
}
|
|
41
70
|
/**
|
|
@@ -870,6 +870,20 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
870
870
|
output: z.infer<typeof backupCapability.methods.trigger.output>;
|
|
871
871
|
meta: object;
|
|
872
872
|
}>;
|
|
873
|
+
listRuns: TRPCQueryProcedure<{
|
|
874
|
+
input: {
|
|
875
|
+
nodeId?: string | undefined;
|
|
876
|
+
} | undefined;
|
|
877
|
+
output: z.infer<typeof backupCapability.methods.listRuns.output>;
|
|
878
|
+
meta: object;
|
|
879
|
+
}>;
|
|
880
|
+
cancel: TRPCMutationProcedure<{
|
|
881
|
+
input: {
|
|
882
|
+
[x: string]: unknown;
|
|
883
|
+
} & z.input<typeof backupCapability.methods.cancel.input>;
|
|
884
|
+
output: z.infer<typeof backupCapability.methods.cancel.output>;
|
|
885
|
+
meta: object;
|
|
886
|
+
}>;
|
|
873
887
|
list: TRPCQueryProcedure<{
|
|
874
888
|
input: {
|
|
875
889
|
nodeId?: string | undefined;
|
|
@@ -7568,6 +7582,13 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
7568
7582
|
output: z.infer<typeof streamBrokerCapability.methods.unassignProfile.output>;
|
|
7569
7583
|
meta: object;
|
|
7570
7584
|
}>;
|
|
7585
|
+
forgetDeviceHardware: TRPCMutationProcedure<{
|
|
7586
|
+
input: {
|
|
7587
|
+
[x: string]: unknown;
|
|
7588
|
+
} & z.input<typeof streamBrokerCapability.methods.forgetDeviceHardware.input>;
|
|
7589
|
+
output: z.infer<typeof streamBrokerCapability.methods.forgetDeviceHardware.output>;
|
|
7590
|
+
meta: object;
|
|
7591
|
+
}>;
|
|
7571
7592
|
renderPreBufferClip: TRPCMutationProcedure<{
|
|
7572
7593
|
input: {
|
|
7573
7594
|
[x: string]: unknown;
|
|
@@ -282,7 +282,7 @@ export interface DeviceProxy {
|
|
|
282
282
|
readonly plateGallery: Pick<InferDeviceProxyCap<typeof plateGalleryCapability>, 'listPlates' | 'getPlateByTrack'>;
|
|
283
283
|
readonly recording: Pick<InferDeviceProxyCap<typeof recordingCapability>, 'getAvailability' | 'getDaysWithRecordings' | 'getPlaybackManifest' | 'getDeviceConfig' | 'locateSegment' | 'readSegmentBytes' | 'readGopBytes' | 'readWindowBytes' | 'setDeviceConfig' | 'rescanStorage' | 'pruneFootage' | 'deleteFootprint' | 'renderGif' | 'renderClip' | 'getStatus' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
|
|
284
284
|
readonly recordingExport: Pick<InferDeviceProxyCap<typeof recordingExportCapability>, 'listExports'>;
|
|
285
|
-
readonly streamBroker: Pick<InferDeviceProxyCap<typeof streamBrokerCapability>, 'publishCameraStream' | 'retractCameraStream' | 'assignProfile' | 'unassignProfile' | 'renderPreBufferClip' | 'produceEventMedia' | 'restartProfile' | 'getDeviceAudioMute' | 'setDeviceAudioMute' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
|
|
285
|
+
readonly streamBroker: Pick<InferDeviceProxyCap<typeof streamBrokerCapability>, 'publishCameraStream' | 'retractCameraStream' | 'assignProfile' | 'unassignProfile' | 'forgetDeviceHardware' | 'renderPreBufferClip' | 'produceEventMedia' | 'restartProfile' | 'getDeviceAudioMute' | 'setDeviceAudioMute' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
|
|
286
286
|
}
|
|
287
287
|
/**
|
|
288
288
|
* Build a DeviceProxy that pre-binds deviceId + nodeId on every method call
|
|
@@ -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: 1005 method paths across 126 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* system-scope cap that takes a deviceId was previously never device-filtered
|
|
7
7
|
* — see the generator header).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
10
|
-
*
|
|
9
|
+
* Coverage: 355 methods carry a device reference, of which
|
|
10
|
+
* 134 are on SYSTEM-scope caps.
|
|
11
11
|
*
|
|
12
12
|
* Top-level fields, number arrays, and one-level arrays of objects carrying
|
|
13
13
|
* a numeric device field (targets[].deviceId) are all mapped; the matcher
|
|
@@ -61,7 +61,7 @@ export interface SystemProxy {
|
|
|
61
61
|
readonly alerts: Pick<InferProvider<typeof alertsCapability>, 'emit' | 'update' | 'list' | 'getUnreadCount' | 'markRead' | 'markAllRead' | 'dismiss'>;
|
|
62
62
|
readonly audioAnalyzer: Pick<InferProvider<typeof audioAnalyzerCapability>, 'analyseChunk' | 'classify' | 'isReady' | 'dispose' | 'reprobeAudioEngine'>;
|
|
63
63
|
readonly audioCodec: Pick<InferProvider<typeof audioCodecCapability>, 'listSupportedCodecs' | 'canHandle' | 'createDecodeSession' | 'createEncodeSession' | 'closeSession' | 'pushEncodedFrame' | 'pullPcm' | 'pushPcm' | 'pullEncoded' | 'flushEncode' | 'listActiveSessions'>;
|
|
64
|
-
readonly backup: Pick<InferProvider<typeof backupCapability>, 'listDestinations' | 'trigger' | 'list' | 'listLocations' | 'getEntries' | 'restore' | 'delete' | 'listArchives' | 'upsertDestinationPolicy' | 'previewSchedule' | 'listSchedules' | 'upsertSchedule' | 'deleteSchedule'>;
|
|
64
|
+
readonly backup: Pick<InferProvider<typeof backupCapability>, 'listDestinations' | 'trigger' | 'listRuns' | 'cancel' | 'list' | 'listLocations' | 'getEntries' | 'restore' | 'delete' | 'listArchives' | 'upsertDestinationPolicy' | 'previewSchedule' | 'listSchedules' | 'upsertSchedule' | 'deleteSchedule'>;
|
|
65
65
|
readonly broker: Pick<InferProvider<typeof brokerCapability>, 'list' | 'get' | 'listProviders' | 'add' | 'remove' | 'testConnection' | 'getSettings' | 'setSettings' | 'getBrokerConfig' | 'getSettingsSchema' | 'testSettings' | 'publish' | 'subscribe' | 'unsubscribe' | 'getState' | 'getStatus'>;
|
|
66
66
|
readonly connectionTest: Pick<InferProvider<typeof connectionTestCapability>, 'testSettings' | 'describeTest'>;
|
|
67
67
|
readonly coreBlocks: Pick<InferProvider<typeof coreBlocksCapability>, 'list' | 'get' | 'create' | 'update' | 'delete' | 'setEnabled' | 'restart' | 'compile' | 'getTypeDefs'>;
|