camstack 1.2.83 → 1.2.85
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.
|
@@ -14522,7 +14522,7 @@ function date4(params) {
|
|
|
14522
14522
|
// ../../node_modules/zod/v4/classic/external.js
|
|
14523
14523
|
config(en_default());
|
|
14524
14524
|
|
|
14525
|
-
// ../types/dist/sleep-
|
|
14525
|
+
// ../types/dist/sleep-B195W080.mjs
|
|
14526
14526
|
var WELL_KNOWN_TABS = [
|
|
14527
14527
|
{
|
|
14528
14528
|
id: "overview",
|
|
@@ -17875,6 +17875,68 @@ var LocationStatSchema = external_exports.object({
|
|
|
17875
17875
|
fileCount: external_exports.number(),
|
|
17876
17876
|
present: external_exports.boolean()
|
|
17877
17877
|
});
|
|
17878
|
+
var BackupRunStateSchema = external_exports.enum([
|
|
17879
|
+
"queued",
|
|
17880
|
+
"running",
|
|
17881
|
+
"succeeded",
|
|
17882
|
+
"failed",
|
|
17883
|
+
"cancelled"
|
|
17884
|
+
]);
|
|
17885
|
+
var BackupRunPhaseSchema = external_exports.enum([
|
|
17886
|
+
"queued",
|
|
17887
|
+
"building",
|
|
17888
|
+
"uploading",
|
|
17889
|
+
"done"
|
|
17890
|
+
]);
|
|
17891
|
+
var BackupRunSchema = external_exports.object({
|
|
17892
|
+
/** Stable run id — the handle `backup.cancel` takes. */
|
|
17893
|
+
id: external_exports.string(),
|
|
17894
|
+
state: BackupRunStateSchema,
|
|
17895
|
+
phase: BackupRunPhaseSchema,
|
|
17896
|
+
/**
|
|
17897
|
+
* Resolved destination location ids. Empty while queued (targets are
|
|
17898
|
+
* resolved when the run starts, against the then-current policies).
|
|
17899
|
+
*/
|
|
17900
|
+
destinationIds: external_exports.array(external_exports.string()).readonly(),
|
|
17901
|
+
label: external_exports.string().optional(),
|
|
17902
|
+
/** ms-epoch when the run was submitted (trigger call / schedule fire). */
|
|
17903
|
+
requestedAt: external_exports.number(),
|
|
17904
|
+
/** ms-epoch when the run left the queue and started building. */
|
|
17905
|
+
startedAt: external_exports.number().optional(),
|
|
17906
|
+
/** ms-epoch when the run reached a terminal state. */
|
|
17907
|
+
finishedAt: external_exports.number().optional(),
|
|
17908
|
+
/** Compressed bytes of the staging archive written so far. */
|
|
17909
|
+
stagedBytes: external_exports.number(),
|
|
17910
|
+
/** Final staged archive size, once the build phase completes. */
|
|
17911
|
+
archiveSizeBytes: external_exports.number().optional(),
|
|
17912
|
+
/** Bytes pushed to the destination currently uploading. */
|
|
17913
|
+
uploadedBytes: external_exports.number(),
|
|
17914
|
+
/** Destinations where the archive fully landed (uploaded + indexed). */
|
|
17915
|
+
completedDestinationIds: external_exports.array(external_exports.string()).readonly(),
|
|
17916
|
+
/** Destinations that failed during the fan-out. */
|
|
17917
|
+
failedDestinationIds: external_exports.array(external_exports.string()).readonly(),
|
|
17918
|
+
/** Failure message when `state === 'failed'`. */
|
|
17919
|
+
error: external_exports.string().optional(),
|
|
17920
|
+
/**
|
|
17921
|
+
* 1-based place in the execution queue — 1 = runs next. Present only
|
|
17922
|
+
* while `state === 'queued'`. Stamped by the orchestrator from the
|
|
17923
|
+
* queue's OWN pending order, never derived from timestamps, so the
|
|
17924
|
+
* UI cannot show an order the executor will not honour.
|
|
17925
|
+
*/
|
|
17926
|
+
queuePosition: external_exports.number().int().min(1).optional()
|
|
17927
|
+
});
|
|
17928
|
+
var BackupTriggerResultSchema = external_exports.object({
|
|
17929
|
+
/** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
|
|
17930
|
+
runId: external_exports.string(),
|
|
17931
|
+
/** True when the run waited behind an in-flight run instead of starting immediately. */
|
|
17932
|
+
queued: external_exports.boolean(),
|
|
17933
|
+
/** True when this trigger was coalesced onto an identical already-queued run. */
|
|
17934
|
+
joined: external_exports.boolean(),
|
|
17935
|
+
/** True when the run was cancelled before completing every destination. */
|
|
17936
|
+
cancelled: external_exports.boolean(),
|
|
17937
|
+
/** One entry per destination the archive landed at (partial on cancel). */
|
|
17938
|
+
entries: external_exports.array(BackupEntrySchema).readonly()
|
|
17939
|
+
});
|
|
17878
17940
|
var BackupScheduleSchema = external_exports.object({
|
|
17879
17941
|
/** Stable id. Generated by the orchestrator on first upsert if absent. */
|
|
17880
17942
|
id: external_exports.string(),
|
|
@@ -17911,6 +17973,11 @@ var backupCapability = {
|
|
|
17911
17973
|
* Trigger a backup. Without `destinations` the orchestrator fans
|
|
17912
17974
|
* out to every destination flagged as enabled in the routing
|
|
17913
17975
|
* config; with it, only the listed addons receive the archive.
|
|
17976
|
+
*
|
|
17977
|
+
* At most ONE backup run executes at a time — the source tree and
|
|
17978
|
+
* the staging disk are shared by every run, so a second trigger
|
|
17979
|
+
* while one is in flight is enqueued (or joined onto an identical
|
|
17980
|
+
* queued run) and the result says so. See D342.
|
|
17914
17981
|
*/
|
|
17915
17982
|
trigger: method(external_exports.object({
|
|
17916
17983
|
/** Subset of registered `backup-destination` addon ids to write to. */
|
|
@@ -17924,7 +17991,30 @@ var backupCapability = {
|
|
|
17924
17991
|
* retention (manual runs).
|
|
17925
17992
|
*/
|
|
17926
17993
|
retentionCount: external_exports.number().int().min(1).max(1e3).optional()
|
|
17927
|
-
}).optional(),
|
|
17994
|
+
}).optional(), BackupTriggerResultSchema, {
|
|
17995
|
+
kind: "mutation",
|
|
17996
|
+
auth: "admin"
|
|
17997
|
+
}),
|
|
17998
|
+
/**
|
|
17999
|
+
* Every run the orchestrator knows about, in EXECUTION order: the
|
|
18000
|
+
* running run first, then queued runs in the exact order they will
|
|
18001
|
+
* execute (each with `queuePosition`, 1 = next), then the bounded
|
|
18002
|
+
* finished history newest-first. Only one run executes at a time
|
|
18003
|
+
* (D342) — the queued section IS the line. Each run carries live
|
|
18004
|
+
* phase + byte counters so a runaway build is visible in seconds,
|
|
18005
|
+
* not via `du`.
|
|
18006
|
+
*/
|
|
18007
|
+
listRuns: method(external_exports.void(), external_exports.array(BackupRunSchema).readonly(), { auth: "admin" }),
|
|
18008
|
+
/**
|
|
18009
|
+
* Stop a backup run. Mirrors `storage-migration.cancel` semantics:
|
|
18010
|
+
* id in, `{ cancelled }` out — `false` when the run is unknown or
|
|
18011
|
+
* already terminal. A QUEUED run is removed before it ever starts;
|
|
18012
|
+
* the RUNNING run has its tar/upload stream actually aborted, the
|
|
18013
|
+
* half-written staging archive is deleted, and the in-flight
|
|
18014
|
+
* destination upload is aborted server-side (partial discarded).
|
|
18015
|
+
* Destinations that already completed keep their archive.
|
|
18016
|
+
*/
|
|
18017
|
+
cancel: method(external_exports.object({ runId: external_exports.string() }), external_exports.object({ cancelled: external_exports.boolean() }), {
|
|
17928
18018
|
kind: "mutation",
|
|
17929
18019
|
auth: "admin"
|
|
17930
18020
|
}),
|
|
@@ -18664,6 +18754,38 @@ var streamBrokerCapability = {
|
|
|
18664
18754
|
auth: "admin"
|
|
18665
18755
|
}),
|
|
18666
18756
|
/**
|
|
18757
|
+
* The HARDWARE behind a device number was replaced
|
|
18758
|
+
* (`deviceManager.migrateDevice`). Forget every piece of broker state that
|
|
18759
|
+
* described the old box, so the next catalog pull derives everything from
|
|
18760
|
+
* the camera that is actually there:
|
|
18761
|
+
*
|
|
18762
|
+
* - every `derived:*` stream definition — a derived is authored against a
|
|
18763
|
+
* specific profile layout, and against the wrong hardware its feeder
|
|
18764
|
+
* respawns forever (observed at attempt 2732 on the live hub,
|
|
18765
|
+
* 2026-09-01);
|
|
18766
|
+
* - the profile-slot assignment entry, PURGED (not unassigned — unassign
|
|
18767
|
+
* marks the slot manual, which would pin the stale choice instead of
|
|
18768
|
+
* letting `computeInitialAssignment` re-derive it);
|
|
18769
|
+
* - the probe snapshots (`<deviceId>/…` — probed codec/resolution of the
|
|
18770
|
+
* old hardware);
|
|
18771
|
+
* - the persisted RTSP token rows for the device's brokers (keyed
|
|
18772
|
+
* `<deviceId>/<camStreamId>`; the stream ids change with the hardware,
|
|
18773
|
+
* so the rows are dead URLs).
|
|
18774
|
+
*
|
|
18775
|
+
* An RPC, deliberately — an event is telemetry and may be dropped (D8),
|
|
18776
|
+
* and a dropped forget leaves a feeder respawning against a stream that
|
|
18777
|
+
* does not exist.
|
|
18778
|
+
*/
|
|
18779
|
+
forgetDeviceHardware: method(external_exports.object({ deviceId: external_exports.number().int().nonnegative() }), external_exports.object({
|
|
18780
|
+
derivedStreamsDeleted: external_exports.array(external_exports.string()).readonly(),
|
|
18781
|
+
assignmentsPurged: external_exports.boolean(),
|
|
18782
|
+
probeSnapshotsDropped: external_exports.number().int().nonnegative(),
|
|
18783
|
+
rtspTokenRowsDeleted: external_exports.number().int().nonnegative()
|
|
18784
|
+
}), {
|
|
18785
|
+
kind: "mutation",
|
|
18786
|
+
auth: "admin"
|
|
18787
|
+
}),
|
|
18788
|
+
/**
|
|
18667
18789
|
* Render a short GIF or MP4 from the broker's PRE-BUFFER around an instant.
|
|
18668
18790
|
*
|
|
18669
18791
|
* The pre-buffer is the only source that already holds the seconds BEFORE
|
|
@@ -20279,6 +20401,35 @@ var deviceProviderCapability = {
|
|
|
20279
20401
|
name: external_exports.string(),
|
|
20280
20402
|
type: external_exports.string()
|
|
20281
20403
|
}))),
|
|
20404
|
+
/**
|
|
20405
|
+
* Tear down and reconstruct ONE device in place from its persisted rows —
|
|
20406
|
+
* touching no other device this provider owns.
|
|
20407
|
+
*
|
|
20408
|
+
* The primitive `deviceManager.migrateDevice` uses to flush the two
|
|
20409
|
+
* migrated numbers: after `swapIds` the runner's live instance still
|
|
20410
|
+
* carries the PRE-swap numeric id (baked into the object, its native-cap
|
|
20411
|
+
* registrations and its log tags), and a live object cannot be renumbered.
|
|
20412
|
+
* Before this method the only flush was restarting the whole owning addon
|
|
20413
|
+
* — which took every camera the provider owns down with it (28 devices
|
|
20414
|
+
* for one migrated camera, measured 2026-09-04, and the morning of the
|
|
20415
|
+
* same day ~27 devices' native caps did not come back on their own).
|
|
20416
|
+
*
|
|
20417
|
+
* Keyed by `stableId`, deliberately: the numeric id is exactly the thing
|
|
20418
|
+
* that changes. The reply carries the id the device answers on NOW.
|
|
20419
|
+
* Implemented once in `BaseDeviceProvider` — decommission the live
|
|
20420
|
+
* instance (if any), then re-create from the persisted row: the same
|
|
20421
|
+
* teardown/rehydrate pair every graceful shutdown + boot already uses.
|
|
20422
|
+
* An RPC, never an event: a dropped event would leave the runner writing
|
|
20423
|
+
* against the wrong camera (D8).
|
|
20424
|
+
*
|
|
20425
|
+
* Construction can dial hardware, and the migrated source is
|
|
20426
|
+
* characteristically dead — the timeout covers a full activate window
|
|
20427
|
+
* rather than the 60 s default.
|
|
20428
|
+
*/
|
|
20429
|
+
reloadDevice: method(external_exports.object({ stableId: external_exports.string() }), external_exports.object({ deviceId: external_exports.number() }), {
|
|
20430
|
+
kind: "mutation",
|
|
20431
|
+
timeoutMs: 3 * 6e4
|
|
20432
|
+
}),
|
|
20282
20433
|
supportsDiscovery: method(external_exports.object({}), external_exports.boolean()),
|
|
20283
20434
|
/**
|
|
20284
20435
|
* Run a network scan. `params` carries optional provider-specific scan
|
|
@@ -20599,13 +20750,21 @@ var deviceManagerCapability = {
|
|
|
20599
20750
|
* `sourceStillLive` names what stayed live; empty is the only value that
|
|
20600
20751
|
* means the old hardware is quiet. The migration proceeds either way —
|
|
20601
20752
|
* refusing would refuse the case this exists for.
|
|
20753
|
+
*
|
|
20754
|
+
* **Safe to retry.** A duplicate call while a migration involving either
|
|
20755
|
+
* device is in flight is REFUSED, never queued; a repeat of a swap that
|
|
20756
|
+
* already completed (matched against the `addonId`/`stableId` fingerprint
|
|
20757
|
+
* the swap left on the rows, within 15 min) is a no-op returning the
|
|
20758
|
+
* original report. A blind re-run can no longer silently undo the
|
|
20759
|
+
* migration it retried.
|
|
20602
20760
|
*/
|
|
20603
20761
|
migrateDevice: method(external_exports.object({
|
|
20604
20762
|
sourceId: external_exports.number(),
|
|
20605
20763
|
targetId: external_exports.number()
|
|
20606
20764
|
}), MigrateDeviceResultSchema, {
|
|
20607
20765
|
kind: "mutation",
|
|
20608
|
-
auth: "admin"
|
|
20766
|
+
auth: "admin",
|
|
20767
|
+
timeoutMs: 12 * 6e4
|
|
20609
20768
|
}),
|
|
20610
20769
|
/** Register a device in the DB + in-memory registry. Called by DeviceManagerApi.register(). */
|
|
20611
20770
|
registerDevice: method(DeviceRegisterPayloadSchema, external_exports.void(), { kind: "mutation" }),
|
|
@@ -39768,6 +39927,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
39768
39927
|
addonId: null,
|
|
39769
39928
|
access: "create"
|
|
39770
39929
|
},
|
|
39930
|
+
"backup.cancel": {
|
|
39931
|
+
capName: "backup",
|
|
39932
|
+
capScope: "system",
|
|
39933
|
+
addonId: null,
|
|
39934
|
+
access: "create"
|
|
39935
|
+
},
|
|
39771
39936
|
"backup.delete": {
|
|
39772
39937
|
capName: "backup",
|
|
39773
39938
|
capScope: "system",
|
|
@@ -39810,6 +39975,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
39810
39975
|
addonId: null,
|
|
39811
39976
|
access: "view"
|
|
39812
39977
|
},
|
|
39978
|
+
"backup.listRuns": {
|
|
39979
|
+
capName: "backup",
|
|
39980
|
+
capScope: "system",
|
|
39981
|
+
addonId: null,
|
|
39982
|
+
access: "view"
|
|
39983
|
+
},
|
|
39813
39984
|
"backup.listSchedules": {
|
|
39814
39985
|
capName: "backup",
|
|
39815
39986
|
capScope: "system",
|
|
@@ -41010,6 +41181,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
41010
41181
|
addonId: null,
|
|
41011
41182
|
access: "view"
|
|
41012
41183
|
},
|
|
41184
|
+
"deviceProvider.reloadDevice": {
|
|
41185
|
+
capName: "device-provider",
|
|
41186
|
+
capScope: "system",
|
|
41187
|
+
addonId: null,
|
|
41188
|
+
access: "create"
|
|
41189
|
+
},
|
|
41013
41190
|
"deviceProvider.start": {
|
|
41014
41191
|
capName: "device-provider",
|
|
41015
41192
|
capScope: "system",
|
|
@@ -44376,6 +44553,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
44376
44553
|
addonId: null,
|
|
44377
44554
|
access: "create"
|
|
44378
44555
|
},
|
|
44556
|
+
"streamBroker.forgetDeviceHardware": {
|
|
44557
|
+
capName: "stream-broker",
|
|
44558
|
+
capScope: "system",
|
|
44559
|
+
addonId: null,
|
|
44560
|
+
access: "delete"
|
|
44561
|
+
},
|
|
44379
44562
|
"streamBroker.getAllRtspEntries": {
|
|
44380
44563
|
capName: "stream-broker",
|
|
44381
44564
|
capScope: "system",
|
|
@@ -46834,6 +47017,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
46834
47017
|
form: "single",
|
|
46835
47018
|
optional: false
|
|
46836
47019
|
}],
|
|
47020
|
+
"streamBroker.forgetDeviceHardware": [{
|
|
47021
|
+
name: "deviceId",
|
|
47022
|
+
form: "single",
|
|
47023
|
+
optional: false
|
|
47024
|
+
}],
|
|
46837
47025
|
"streamBroker.getDeviceAudioMute": [{
|
|
46838
47026
|
name: "deviceId",
|
|
46839
47027
|
form: "single",
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runDiscover
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Y3OL5WYZ.js";
|
|
5
5
|
import "./chunk-LMMQX4CK.js";
|
|
6
6
|
|
|
7
7
|
// src/cli.ts
|
|
@@ -38,7 +38,7 @@ async function runServe(args) {
|
|
|
38
38
|
...typeof values.data === "string" ? { data: values.data } : {}
|
|
39
39
|
};
|
|
40
40
|
Object.assign(process.env, buildServeEnv(opts));
|
|
41
|
-
await import("./launcher-
|
|
41
|
+
await import("./launcher-6T2UFXIG.js");
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
// src/commands/agent.ts
|
|
@@ -83,7 +83,7 @@ async function runAgent(args) {
|
|
|
83
83
|
...typeof values.port === "string" ? { port: values.port } : {}
|
|
84
84
|
};
|
|
85
85
|
Object.assign(process.env, buildAgentEnv(opts));
|
|
86
|
-
await import("./launcher-
|
|
86
|
+
await import("./launcher-6T2UFXIG.js");
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
// src/commands/setup.ts
|
|
@@ -1130,7 +1130,7 @@ function isUnknown(_value) {
|
|
|
1130
1130
|
return true;
|
|
1131
1131
|
}
|
|
1132
1132
|
async function resolveServerInteractive(presetNamespace) {
|
|
1133
|
-
const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-
|
|
1133
|
+
const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-PPTEAP5N.js");
|
|
1134
1134
|
if (presetNamespace) {
|
|
1135
1135
|
const spinner4 = clack.spinner();
|
|
1136
1136
|
spinner4.start(`Discovering hub on LAN (namespace "${presetNamespace}")`);
|