@camstack/types 1.2.74 → 1.2.76
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.d.ts +19 -18
- package/dist/addon.js +59 -56
- package/dist/addon.mjs +59 -57
- package/dist/capabilities/alerts.cap.d.ts +5 -5
- package/dist/capabilities/battery.cap.d.ts +4 -4
- package/dist/capabilities/custom-model-registry.cap.d.ts +4 -4
- package/dist/capabilities/decoder.cap.d.ts +2 -2
- package/dist/capabilities/face-gallery.cap.d.ts +1 -1
- package/dist/capabilities/index.d.ts +3 -3
- package/dist/capabilities/lawn-mower-control.cap.d.ts +4 -4
- package/dist/capabilities/llm-runtime.cap.d.ts +121 -3
- package/dist/capabilities/llm.cap.d.ts +189 -4
- package/dist/capabilities/metrics-provider.cap.d.ts +2 -2
- package/dist/capabilities/model-convert.cap.d.ts +6 -6
- package/dist/capabilities/model-distributor.cap.d.ts +4 -4
- package/dist/capabilities/notification-output.cap.d.ts +9 -9
- package/dist/capabilities/notification-rules.cap.d.ts +11 -11
- package/dist/capabilities/osd-manager.cap.d.ts +6 -6
- package/dist/capabilities/pipeline-analytics.cap.d.ts +39 -39
- package/dist/capabilities/pipeline-executor.cap.d.ts +7 -7
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +6 -6
- package/dist/capabilities/pipeline-runner.cap.d.ts +2 -0
- package/dist/capabilities/platform-probe.cap.d.ts +2 -2
- package/dist/capabilities/recording.cap.d.ts +3 -3
- package/dist/capabilities/scene-monitor.cap.d.ts +68 -0
- package/dist/capabilities/stream-broker.cap.d.ts +6 -6
- package/dist/device/base-device-provider.d.ts +9 -0
- package/dist/encode-profile.d.ts +2 -2
- package/dist/generated/addon-api.d.ts +7 -0
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +241 -9
- package/dist/index.mjs +236 -10
- package/dist/interfaces/recording-config.d.ts +2 -2
- package/dist/interfaces/stream-broker.d.ts +9 -1
- package/dist/{sleep-CQayd2Su.mjs → sleep-BfRjZ3C3.mjs} +37 -1
- package/dist/{sleep-B-mRsuDp.js → sleep-DslGLq5_.js} +42 -0
- package/dist/types/models.d.ts +7 -7
- package/dist/util/boot-recovery-backoff.d.ts +26 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_event_category = require("./event-category-D3gG7oil.js");
|
|
3
|
-
const require_sleep = require("./sleep-
|
|
3
|
+
const require_sleep = require("./sleep-DslGLq5_.js");
|
|
4
4
|
const require_canonical_hash = require("./canonical-hash-DNV8S5ET.js");
|
|
5
5
|
const require_enums = require("./enums.js");
|
|
6
6
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
@@ -9517,6 +9517,18 @@ var LlmGenerateBaseInputSchema = zod.z.object({
|
|
|
9517
9517
|
* Resource ceiling = llama-server flags + idleStopMinutes ONLY (no RSS
|
|
9518
9518
|
* watchdog — operator decision #3).
|
|
9519
9519
|
*/
|
|
9520
|
+
/**
|
|
9521
|
+
* A companion artifact that MUST land beside the main GGUF: the `mmproj`
|
|
9522
|
+
* projector of a vision model, or shards 2..N of a split GGUF. Carried on the
|
|
9523
|
+
* REF rather than looked up at install time, so what the operator approved in
|
|
9524
|
+
* the preview is exactly what the node downloads.
|
|
9525
|
+
*/
|
|
9526
|
+
var ManagedModelExtraFileSchema = zod.z.object({
|
|
9527
|
+
url: zod.z.string(),
|
|
9528
|
+
filename: zod.z.string(),
|
|
9529
|
+
sizeBytes: zod.z.number(),
|
|
9530
|
+
sha256: zod.z.string().optional()
|
|
9531
|
+
});
|
|
9520
9532
|
var ManagedModelRefSchema = zod.z.discriminatedUnion("kind", [
|
|
9521
9533
|
zod.z.object({
|
|
9522
9534
|
kind: zod.z.literal("catalog"),
|
|
@@ -9525,7 +9537,11 @@ var ManagedModelRefSchema = zod.z.discriminatedUnion("kind", [
|
|
|
9525
9537
|
zod.z.object({
|
|
9526
9538
|
kind: zod.z.literal("url"),
|
|
9527
9539
|
url: zod.z.string(),
|
|
9528
|
-
sha256: zod.z.string().optional()
|
|
9540
|
+
sha256: zod.z.string().optional(),
|
|
9541
|
+
/** Picker/status label; the file basename when absent. */
|
|
9542
|
+
label: zod.z.string().optional(),
|
|
9543
|
+
sizeBytes: zod.z.number().optional(),
|
|
9544
|
+
extraFiles: zod.z.array(ManagedModelExtraFileSchema).optional()
|
|
9529
9545
|
}),
|
|
9530
9546
|
zod.z.object({
|
|
9531
9547
|
kind: zod.z.literal("path"),
|
|
@@ -9586,11 +9602,39 @@ var ManagedRuntimeConfigSchema = zod.z.object({
|
|
|
9586
9602
|
"q4_1",
|
|
9587
9603
|
"q4_0"
|
|
9588
9604
|
]).optional(),
|
|
9605
|
+
/**
|
|
9606
|
+
* Escape hatch for llama-server flags this schema does NOT model — `--jinja`
|
|
9607
|
+
* (which most vision chat templates need and some language-only models
|
|
9608
|
+
* dislike), `--cont-batching`, `--rope-scaling`, …
|
|
9609
|
+
*
|
|
9610
|
+
* It is NOT a second place to set the flags above. A token that collides
|
|
9611
|
+
* with a typed field is REJECTED at start, naming the field that owns it
|
|
9612
|
+
* (`assertNoOwnedFlags`), because two knobs writing the same argv is exactly
|
|
9613
|
+
* the "two switches that disagree" failure this repo has already shipped
|
|
9614
|
+
* twice (D62).
|
|
9615
|
+
*/
|
|
9616
|
+
extraArgs: zod.z.array(zod.z.string()).default([]),
|
|
9589
9617
|
/** Else lazy: first generate boots it. */
|
|
9590
9618
|
autoStart: zod.z.boolean().default(false),
|
|
9591
9619
|
/** 0 = never; frees RAM after quiet periods. */
|
|
9592
9620
|
idleStopMinutes: zod.z.number().int().default(30)
|
|
9593
9621
|
});
|
|
9622
|
+
/**
|
|
9623
|
+
* Where a multi-GB install currently is. A single 0..1 fraction cannot answer
|
|
9624
|
+
* "is it stuck?" for an install that is three files (shards + mmproj) followed
|
|
9625
|
+
* by a sha256 pass over 22 GB — during which the fraction sat at 1.0 and the
|
|
9626
|
+
* node looked hung. Phase + file + bytes is the smallest shape that does.
|
|
9627
|
+
*/
|
|
9628
|
+
var LlmDownloadProgressSchema = zod.z.object({
|
|
9629
|
+
phase: zod.z.enum(["downloading", "verifying"]),
|
|
9630
|
+
/** The artifact currently moving, e.g. `mmproj-F16.gguf`. */
|
|
9631
|
+
file: zod.z.string(),
|
|
9632
|
+
fileIndex: zod.z.number().int(),
|
|
9633
|
+
fileCount: zod.z.number().int(),
|
|
9634
|
+
/** Across the WHOLE install, not the current file. */
|
|
9635
|
+
downloadedBytes: zod.z.number(),
|
|
9636
|
+
totalBytes: zod.z.number().optional()
|
|
9637
|
+
});
|
|
9594
9638
|
var LlmRuntimeStatusSchema = zod.z.object({
|
|
9595
9639
|
/** Status is ALWAYS node-qualified. */
|
|
9596
9640
|
nodeId: zod.z.string(),
|
|
@@ -9607,6 +9651,8 @@ var LlmRuntimeStatusSchema = zod.z.object({
|
|
|
9607
9651
|
modelPath: zod.z.string().optional(),
|
|
9608
9652
|
modelId: zod.z.string().optional(),
|
|
9609
9653
|
downloadProgress: zod.z.number().min(0).max(1).optional(),
|
|
9654
|
+
/** Detail behind `downloadProgress`; present for the same lifetime. */
|
|
9655
|
+
download: LlmDownloadProgressSchema.optional(),
|
|
9610
9656
|
lastError: zod.z.string().optional(),
|
|
9611
9657
|
crashesInWindow: zod.z.number(),
|
|
9612
9658
|
/** Child RSS (sampled best-effort). */
|
|
@@ -9617,7 +9663,14 @@ var LlmNodeModelSchema = zod.z.object({
|
|
|
9617
9663
|
file: zod.z.string(),
|
|
9618
9664
|
sizeBytes: zod.z.number(),
|
|
9619
9665
|
catalogId: zod.z.string().optional(),
|
|
9620
|
-
installedAt: zod.z.number().optional()
|
|
9666
|
+
installedAt: zod.z.number().optional(),
|
|
9667
|
+
/**
|
|
9668
|
+
* Absolute path on the node. Present so a file that is on disk but matches
|
|
9669
|
+
* no catalog entry — a custom Hugging Face install, or a GGUF the operator
|
|
9670
|
+
* copied in by hand — is still SELECTABLE, as a `{kind:'path'}` ref. Without
|
|
9671
|
+
* it the picker could list such a file and do nothing with it.
|
|
9672
|
+
*/
|
|
9673
|
+
path: zod.z.string().optional()
|
|
9621
9674
|
});
|
|
9622
9675
|
var LlmRuntimeDiskUsageSchema = zod.z.object({
|
|
9623
9676
|
nodeId: zod.z.string(),
|
|
@@ -9713,9 +9766,12 @@ var LlmProfileSchema = zod.z.object({
|
|
|
9713
9766
|
systemPrompt: zod.z.string().optional(),
|
|
9714
9767
|
/** Total generation bound — the only one a unary call has. */
|
|
9715
9768
|
timeoutMs: zod.z.number().int().positive().default(6e4),
|
|
9716
|
-
/**
|
|
9769
|
+
/** The TCP handshake only — "is the port even open". NOT the wait for
|
|
9770
|
+
* response headers: on the LM Studio / llama-server wire those are written
|
|
9771
|
+
* once the model has finished loading, so they belong to the bound below. */
|
|
9717
9772
|
connectTimeoutMs: zod.z.number().int().positive().default(1e4),
|
|
9718
|
-
/** Accepted, but no output yet —
|
|
9773
|
+
/** Accepted, but no output yet — response headers included, because a cold
|
|
9774
|
+
* GPU load is exactly what happens before them. */
|
|
9719
9775
|
firstTokenTimeoutMs: zod.z.number().int().positive().default(12e4),
|
|
9720
9776
|
/** Output started then stopped. */
|
|
9721
9777
|
idleTimeoutMs: zod.z.number().int().positive().default(6e4),
|
|
@@ -9778,6 +9834,36 @@ var ManagedModelCatalogEntrySchema = zod.z.object({
|
|
|
9778
9834
|
/** Vision models: companion projector file. */
|
|
9779
9835
|
mmprojUrl: zod.z.string().optional()
|
|
9780
9836
|
});
|
|
9837
|
+
/**
|
|
9838
|
+
* The outcome of turning one operator-typed Hugging Face reference into a
|
|
9839
|
+
* download plan. A RESULT, never a throw: "this repo has 24 quantizations and
|
|
9840
|
+
* I will not pick for you" is a normal answer the UI has to render, not an
|
|
9841
|
+
* exception.
|
|
9842
|
+
*
|
|
9843
|
+
* `candidates` is the whole reason the refusal is usable — every string in it
|
|
9844
|
+
* is a tag that resolves when pasted back as `<org>/<repo>:<TAG>`.
|
|
9845
|
+
*/
|
|
9846
|
+
var HfModelResolutionSchema = zod.z.discriminatedUnion("ok", [zod.z.object({
|
|
9847
|
+
ok: zod.z.literal(true),
|
|
9848
|
+
/** Ready to hand to `installModel` unchanged. */
|
|
9849
|
+
model: ManagedModelRefSchema,
|
|
9850
|
+
label: zod.z.string(),
|
|
9851
|
+
repo: zod.z.string(),
|
|
9852
|
+
quantization: zod.z.string(),
|
|
9853
|
+
purpose: zod.z.enum(["text", "vision"]),
|
|
9854
|
+
totalBytes: zod.z.number(),
|
|
9855
|
+
/** mmproj + shards, for the preview: an operator approving 23 GB should
|
|
9856
|
+
* see that 0.9 GB of it is a projector they did not name. */
|
|
9857
|
+
extraFilenames: zod.z.array(zod.z.string())
|
|
9858
|
+
}), zod.z.object({
|
|
9859
|
+
ok: zod.z.literal(false),
|
|
9860
|
+
code: zod.z.string(),
|
|
9861
|
+
message: zod.z.string(),
|
|
9862
|
+
candidates: zod.z.array(zod.z.string()).optional(),
|
|
9863
|
+
/** Set when the refusal was only the ceiling: re-calling with
|
|
9864
|
+
* `maxBytes: requiredBytes` is the operator's explicit override. */
|
|
9865
|
+
requiredBytes: zod.z.number().optional()
|
|
9866
|
+
})]);
|
|
9781
9867
|
var LlmRuntimeNodeSchema = zod.z.object({
|
|
9782
9868
|
nodeId: zod.z.string(),
|
|
9783
9869
|
reachable: zod.z.boolean(),
|
|
@@ -9845,6 +9931,25 @@ var llmCapability = {
|
|
|
9845
9931
|
listModelCatalog: require_sleep.method(zod.z.object({}), zod.z.array(ManagedModelCatalogEntrySchema)),
|
|
9846
9932
|
listRuntimeNodes: require_sleep.method(zod.z.object({}), zod.z.array(LlmRuntimeNodeSchema)),
|
|
9847
9933
|
listNodeModels: require_sleep.method(zod.z.object({ nodeId: zod.z.string() }), zod.z.array(LlmNodeModelSchema)),
|
|
9934
|
+
/**
|
|
9935
|
+
* One typed Hugging Face reference → a pinned, verified `ManagedModelRef`.
|
|
9936
|
+
*
|
|
9937
|
+
* Runs on the HUB, not on the target node: resolution needs egress to
|
|
9938
|
+
* huggingface.co, and an agent that cannot reach it still installs fine
|
|
9939
|
+
* through the model-distributor relay. Nothing is downloaded here — this is
|
|
9940
|
+
* a tree read plus a HEAD, so the operator sees the size, the quantization
|
|
9941
|
+
* and the mmproj BEFORE approving a multi-GB pull.
|
|
9942
|
+
*/
|
|
9943
|
+
resolveModelRef: require_sleep.method(zod.z.object({
|
|
9944
|
+
/** `https://huggingface.co/<org>/<repo>/resolve/main/<f>.gguf`,
|
|
9945
|
+
* `<org>/<repo>/<f>.gguf`, `<org>/<repo>` or `<org>/<repo>:<QUANT>`. */
|
|
9946
|
+
ref: zod.z.string(),
|
|
9947
|
+
/** Explicit ceiling override, in bytes. Absent = the built-in ceiling. */
|
|
9948
|
+
maxBytes: zod.z.number().positive().optional()
|
|
9949
|
+
}), HfModelResolutionSchema, {
|
|
9950
|
+
kind: "mutation",
|
|
9951
|
+
auth: "admin"
|
|
9952
|
+
}),
|
|
9848
9953
|
installModel: require_sleep.method(zod.z.object({
|
|
9849
9954
|
nodeId: zod.z.string(),
|
|
9850
9955
|
model: ManagedModelRefSchema
|
|
@@ -16843,6 +16948,17 @@ var maxSessionHoldMsField = {
|
|
|
16843
16948
|
default: 12e4,
|
|
16844
16949
|
step: 5e3
|
|
16845
16950
|
};
|
|
16951
|
+
/**
|
|
16952
|
+
* Quiet period that closes an `audioMode: 'on-motion'` audio window. Floor of
|
|
16953
|
+
* 5s so a rearm can never degenerate into per-event stream churn; default 90s
|
|
16954
|
+
* comfortably outlives the gap between two PIR wakes on a battery camera.
|
|
16955
|
+
*/
|
|
16956
|
+
var audioMotionWindowMsField = {
|
|
16957
|
+
min: 5e3,
|
|
16958
|
+
max: 6e5,
|
|
16959
|
+
default: 9e4,
|
|
16960
|
+
step: 5e3
|
|
16961
|
+
};
|
|
16846
16962
|
var motionFpsField = {
|
|
16847
16963
|
min: 1,
|
|
16848
16964
|
max: 30,
|
|
@@ -17019,6 +17135,27 @@ var RunnerCameraConfigSchema = zod.z.object({
|
|
|
17019
17135
|
* resolved `CameraDetectionConfig`.
|
|
17020
17136
|
*/
|
|
17021
17137
|
maxSessionHoldMs: zod.z.number().min(maxSessionHoldMsField.min).max(maxSessionHoldMsField.max).optional(),
|
|
17138
|
+
/**
|
|
17139
|
+
* Orchestrator-side quiet period (ms) that closes an `audioMode:
|
|
17140
|
+
* 'on-motion'` audio window, measured from the LAST motion event.
|
|
17141
|
+
*
|
|
17142
|
+
* This exists because the falling edge cannot be relied on. Camera-native
|
|
17143
|
+
* providers emit motion as a RISING EDGE ONLY (Reolink's Baichuan push and
|
|
17144
|
+
* its email-push SMTP path both emit `detected: true` and never the
|
|
17145
|
+
* counterpart); only the frame-diff analyzer emits falls. So on an
|
|
17146
|
+
* onboard-only camera a window that closed only on `detected: false` never
|
|
17147
|
+
* closed at all, and `on-motion` silently behaved as `always-on` — on a
|
|
17148
|
+
* battery camera, the one failure mode the mode exists to prevent.
|
|
17149
|
+
*
|
|
17150
|
+
* Every motion event rearms this timer WITHOUT restarting the stream, so a
|
|
17151
|
+
* burst of re-fires costs nothing. A falling edge, when one does arrive,
|
|
17152
|
+
* still closes earlier via `motionCooldownMs` — whichever comes first wins.
|
|
17153
|
+
*
|
|
17154
|
+
* Not consumed by the runner: carried here so it shares the per-camera
|
|
17155
|
+
* device-settings surface with `motionCooldownMs`, exactly like
|
|
17156
|
+
* `maxSessionHoldMs`.
|
|
17157
|
+
*/
|
|
17158
|
+
audioMotionWindowMs: zod.z.number().min(audioMotionWindowMsField.min).max(audioMotionWindowMsField.max).optional(),
|
|
17022
17159
|
motionFps: zod.z.number().min(motionFpsField.min).max(motionFpsField.max).default(motionFpsField.default),
|
|
17023
17160
|
detectionFps: zod.z.number().min(detectionFpsField.min).max(detectionFpsField.max).default(detectionFpsField.default),
|
|
17024
17161
|
motionStreamId: zod.z.string(),
|
|
@@ -17203,6 +17340,25 @@ var RunnerCameraDeviceUIFields = [
|
|
|
17203
17340
|
nullable: true,
|
|
17204
17341
|
nullLabel: "Default"
|
|
17205
17342
|
},
|
|
17343
|
+
{
|
|
17344
|
+
key: "audioMotionWindowMs",
|
|
17345
|
+
type: "slider",
|
|
17346
|
+
label: "Audio window after motion",
|
|
17347
|
+
description: "How long audio keeps being analysed after the last motion event. Each new motion event extends the window without restarting the audio stream.",
|
|
17348
|
+
min: audioMotionWindowMsField.min,
|
|
17349
|
+
max: audioMotionWindowMsField.max,
|
|
17350
|
+
step: audioMotionWindowMsField.step,
|
|
17351
|
+
default: audioMotionWindowMsField.default,
|
|
17352
|
+
showValue: true,
|
|
17353
|
+
unit: "s",
|
|
17354
|
+
displayScale: 1e3,
|
|
17355
|
+
nullable: true,
|
|
17356
|
+
nullLabel: "Default",
|
|
17357
|
+
showWhen: {
|
|
17358
|
+
field: "audioMode",
|
|
17359
|
+
equals: "on-motion"
|
|
17360
|
+
}
|
|
17361
|
+
},
|
|
17206
17362
|
{
|
|
17207
17363
|
key: "onboardMotionDrivesAnalyzer",
|
|
17208
17364
|
type: "boolean",
|
|
@@ -27625,6 +27781,33 @@ var SCENE_CONDITIONS = [
|
|
|
27625
27781
|
"dawn",
|
|
27626
27782
|
"dusk"
|
|
27627
27783
|
];
|
|
27784
|
+
/**
|
|
27785
|
+
* What a scene does when the CURRENT light has no reference of its own.
|
|
27786
|
+
*
|
|
27787
|
+
* The lighting variants are not equally likely to exist. Almost every operator
|
|
27788
|
+
* captures daylight and then never stands outside at 22:00 to capture IR, and a
|
|
27789
|
+
* scene that is only ever going to be asked about a daytime question ("is the
|
|
27790
|
+
* bin still on the kerb at 08:00") does not need a night reference at all. The
|
|
27791
|
+
* night half must therefore be OPTIONAL, and optional means the scene keeps
|
|
27792
|
+
* working without it rather than degrading into a permanent complaint.
|
|
27793
|
+
*
|
|
27794
|
+
* - `skip` (default) — the check in that light is not made. Not a verdict, not
|
|
27795
|
+
* an alarm, not even an `unknown`: the live state simply stays whatever the
|
|
27796
|
+
* last covered light left it at, the latch is untouched, and the hysteresis
|
|
27797
|
+
* run is neither spent nor cleared. The scene resumes by itself at first
|
|
27798
|
+
* light. This is the only behaviour under which "I never captured IR" is a
|
|
27799
|
+
* configuration choice instead of a nightly fault.
|
|
27800
|
+
* - `judge-anyway` — score against the OTHER conditions' references. Available
|
|
27801
|
+
* for cameras whose IR frame is close enough to daylight (a floodlit
|
|
27802
|
+
* driveway, an always-white-light doorbell), and wrong for everything else:
|
|
27803
|
+
* cross-condition cosines are not comparable, so a day reference against a
|
|
27804
|
+
* true IR frame collapses and the scene reports a theft at 21:40.
|
|
27805
|
+
*
|
|
27806
|
+
* Never applies when the scene has NO comparable reference at all — that is
|
|
27807
|
+
* "not armed yet", it is reported as `no-reference-for-condition`, and silence
|
|
27808
|
+
* there would hide a scene the operator never finished setting up.
|
|
27809
|
+
*/
|
|
27810
|
+
var SceneUncoveredPolicySchema = zod.z.enum(["skip", "judge-anyway"]);
|
|
27628
27811
|
/** Reserved, engine-owned state id standing for "the region no longer looks
|
|
27629
27812
|
* like ANY captured reference". Never authored by an operator, never stored in
|
|
27630
27813
|
* `states[]` — it is the synthetic candidate that makes divergence a
|
|
@@ -27693,6 +27876,9 @@ var SCENE_DEFAULT_QUIET_SECONDS = 60;
|
|
|
27693
27876
|
var SCENE_DEFAULT_OBSERVATION_SPACING_SEC = 120;
|
|
27694
27877
|
var SCENE_DEFAULT_CHECK_INTERVAL_SEC = 60;
|
|
27695
27878
|
var SCENE_DEFAULT_ANCHOR_THRESHOLD = .85;
|
|
27879
|
+
/** Night is OPTIONAL. A scene with only a daylight reference sits the IR hours
|
|
27880
|
+
* out in silence rather than reporting a fault every night. */
|
|
27881
|
+
var SCENE_DEFAULT_UNCOVERED_POLICY = "skip";
|
|
27696
27882
|
var SCENE_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
27697
27883
|
var SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX = 448;
|
|
27698
27884
|
/** `resetScene({ recapture })` absent means TRUE — the operator decision. Read
|
|
@@ -27764,6 +27950,21 @@ var SceneMonitorSchema = zod.z.object({
|
|
|
27764
27950
|
* automation can react to the bin coming back without the operator's own
|
|
27765
27951
|
* alarm silently clearing itself. */
|
|
27766
27952
|
autoRestore: zod.z.boolean().default(false),
|
|
27953
|
+
/** What to do when the current light has no reference of its own. See
|
|
27954
|
+
* {@link SceneUncoveredPolicySchema} — the default makes night OPTIONAL. */
|
|
27955
|
+
onUncoveredCondition: SceneUncoveredPolicySchema.default(SCENE_DEFAULT_UNCOVERED_POLICY),
|
|
27956
|
+
/**
|
|
27957
|
+
* The light whose checks are currently being SAT OUT under
|
|
27958
|
+
* `onUncoveredCondition: 'skip'` — `null` when the scene is checking normally.
|
|
27959
|
+
*
|
|
27960
|
+
* Engine-reported and advisory only: it moves no verdict, no latch and no
|
|
27961
|
+
* hysteresis. It exists so the card can say *"night (IR) — checks paused,
|
|
27962
|
+
* nothing captured in this light"* in the same calm voice as the coverage
|
|
27963
|
+
* line, because the alternative is a scene that silently stops answering
|
|
27964
|
+
* after sunset with nothing anywhere saying why. A skipped check must never
|
|
27965
|
+
* read as a broken one.
|
|
27966
|
+
*/
|
|
27967
|
+
suspendedCondition: SceneConditionSchema.nullable().default(null),
|
|
27767
27968
|
/** Named cause when `verdict === 'unknown'`. */
|
|
27768
27969
|
unavailable: SceneUnavailableSchema.nullable(),
|
|
27769
27970
|
/** Conditions that have at least one comparable reference — the coverage line
|
|
@@ -27817,6 +28018,7 @@ var sceneMonitorCapability = {
|
|
|
27817
28018
|
minObservationSpacingSec: zod.z.number().int().min(0).max(3600).optional(),
|
|
27818
28019
|
anchorThreshold: zod.z.number().min(0).max(1).optional(),
|
|
27819
28020
|
autoRestore: zod.z.boolean().optional(),
|
|
28021
|
+
onUncoveredCondition: SceneUncoveredPolicySchema.optional(),
|
|
27820
28022
|
/** `null` clears the vision-model adjudicator. */
|
|
27821
28023
|
confirm: SceneConfirmSchema.nullable().optional()
|
|
27822
28024
|
})
|
|
@@ -31027,6 +31229,15 @@ var BaseDeviceProvider = class extends require_sleep.BaseAddon {
|
|
|
31027
31229
|
labels: ["probe not implemented"]
|
|
31028
31230
|
};
|
|
31029
31231
|
}
|
|
31232
|
+
/**
|
|
31233
|
+
* Top-level devices restored at once in {@link onRestoreDevices}.
|
|
31234
|
+
*
|
|
31235
|
+
* Four covers the fleets this ships to without turning a boot into a burst a
|
|
31236
|
+
* camera NVR answers with a refusal. A provider whose upstream is a single
|
|
31237
|
+
* session with a serial command channel (a Baichuan hub, an NVR that
|
|
31238
|
+
* serialises ISAPI) should lower it; nothing needs to raise it.
|
|
31239
|
+
*/
|
|
31240
|
+
restoreConcurrency = 4;
|
|
31030
31241
|
async restoreDevices(savedDevices) {
|
|
31031
31242
|
await this.onRestoreDevices(savedDevices);
|
|
31032
31243
|
if (savedDevices.length > 0) this.ctx.logger.info(`Restored ${savedDevices.length} ${this.providerName} device(s)`);
|
|
@@ -31058,15 +31269,15 @@ var BaseDeviceProvider = class extends require_sleep.BaseAddon {
|
|
|
31058
31269
|
*/
|
|
31059
31270
|
async onRestoreDevices(savedDevices) {
|
|
31060
31271
|
const restored = /* @__PURE__ */ new Set();
|
|
31061
|
-
|
|
31062
|
-
|
|
31272
|
+
const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
|
|
31273
|
+
const restoreOne = async (saved) => {
|
|
31063
31274
|
const Class = this.deviceClasses[saved.type];
|
|
31064
31275
|
if (!Class) {
|
|
31065
31276
|
this.ctx.logger.warn("No device class registered for restored type — skipping", {
|
|
31066
31277
|
tags: { stableId: saved.stableId },
|
|
31067
31278
|
meta: { type: saved.type }
|
|
31068
31279
|
});
|
|
31069
|
-
|
|
31280
|
+
return;
|
|
31070
31281
|
}
|
|
31071
31282
|
try {
|
|
31072
31283
|
await this.ctx.kernel.devices.create(saved.stableId, Class, {});
|
|
@@ -31080,7 +31291,15 @@ var BaseDeviceProvider = class extends require_sleep.BaseAddon {
|
|
|
31080
31291
|
}
|
|
31081
31292
|
});
|
|
31082
31293
|
}
|
|
31083
|
-
}
|
|
31294
|
+
};
|
|
31295
|
+
let nextTopLevel = 0;
|
|
31296
|
+
await Promise.all(Array.from({ length: Math.min(Math.max(1, this.restoreConcurrency), topLevel.length) }, async () => {
|
|
31297
|
+
for (;;) {
|
|
31298
|
+
const saved = topLevel[nextTopLevel++];
|
|
31299
|
+
if (saved === void 0) return;
|
|
31300
|
+
await restoreOne(saved);
|
|
31301
|
+
}
|
|
31302
|
+
}));
|
|
31084
31303
|
const childRows = savedDevices.filter((s) => s.parentDeviceId !== null);
|
|
31085
31304
|
for (const saved of childRows) {
|
|
31086
31305
|
const Class = this.deviceClasses[saved.type];
|
|
@@ -35760,6 +35979,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
35760
35979
|
addonId: null,
|
|
35761
35980
|
access: "view"
|
|
35762
35981
|
},
|
|
35982
|
+
"llm.resolveModelRef": {
|
|
35983
|
+
capName: "llm",
|
|
35984
|
+
capScope: "system",
|
|
35985
|
+
addonId: null,
|
|
35986
|
+
access: "create"
|
|
35987
|
+
},
|
|
35763
35988
|
"llm.setDefault": {
|
|
35764
35989
|
capName: "llm",
|
|
35765
35990
|
capScope: "system",
|
|
@@ -42003,6 +42228,7 @@ function createSystemProxy(api) {
|
|
|
42003
42228
|
listModelCatalog: (input) => dispatch("llm", "listModelCatalog", "query", input),
|
|
42004
42229
|
listRuntimeNodes: (input) => dispatch("llm", "listRuntimeNodes", "query", input),
|
|
42005
42230
|
listNodeModels: (input) => dispatch("llm", "listNodeModels", "query", input),
|
|
42231
|
+
resolveModelRef: (input) => dispatch("llm", "resolveModelRef", "mutation", input),
|
|
42006
42232
|
installModel: (input) => dispatch("llm", "installModel", "mutation", input),
|
|
42007
42233
|
deleteModel: (input) => dispatch("llm", "deleteModel", "mutation", input),
|
|
42008
42234
|
getRuntimeStatus: (input) => dispatch("llm", "getRuntimeStatus", "query", input),
|
|
@@ -45369,6 +45595,7 @@ exports.AvailableIntegrationTypeSchema = AvailableIntegrationTypeSchema;
|
|
|
45369
45595
|
exports.BACKEND_TO_FORMAT = BACKEND_TO_FORMAT;
|
|
45370
45596
|
exports.BASE_LIVE_EGRESS_PROFILE = BASE_LIVE_EGRESS_PROFILE;
|
|
45371
45597
|
exports.BATTERY_DEVICE_PROFILE = BATTERY_DEVICE_PROFILE;
|
|
45598
|
+
exports.BOOT_RECOVERY_BACKOFF_MS = require_sleep.BOOT_RECOVERY_BACKOFF_MS;
|
|
45372
45599
|
exports.BacklightModeSchema = BacklightModeSchema;
|
|
45373
45600
|
exports.BackupDestinationInfoSchema = BackupDestinationInfoSchema;
|
|
45374
45601
|
exports.BackupEntrySchema = BackupEntrySchema;
|
|
@@ -45630,6 +45857,7 @@ exports.HF_BASE_URL = HF_BASE_URL;
|
|
|
45630
45857
|
exports.HF_REPO = HF_REPO;
|
|
45631
45858
|
exports.HWACCEL_OPTIONS = HWACCEL_OPTIONS;
|
|
45632
45859
|
exports.HealthStatusSchema = HealthStatusSchema;
|
|
45860
|
+
exports.HfModelResolutionSchema = HfModelResolutionSchema;
|
|
45633
45861
|
exports.HistoryPointSchema = HistoryPointSchema;
|
|
45634
45862
|
exports.HistoryResolutionEnum = HistoryResolutionEnum;
|
|
45635
45863
|
exports.HumidifierStatusSchema = HumidifierStatusSchema;
|
|
@@ -45660,6 +45888,7 @@ exports.LinkedDeviceSchema = LinkedDeviceSchema;
|
|
|
45660
45888
|
exports.LinkedDevicesModeSchema = LinkedDevicesModeSchema;
|
|
45661
45889
|
exports.LlmDefaultSchema = LlmDefaultSchema;
|
|
45662
45890
|
exports.LlmDefaultSelectorSchema = LlmDefaultSelectorSchema;
|
|
45891
|
+
exports.LlmDownloadProgressSchema = LlmDownloadProgressSchema;
|
|
45663
45892
|
exports.LlmErrorCodeSchema = LlmErrorCodeSchema;
|
|
45664
45893
|
exports.LlmGenerateBaseInputSchema = LlmGenerateBaseInputSchema;
|
|
45665
45894
|
exports.LlmGenerateErrSchema = LlmGenerateErrSchema;
|
|
@@ -45700,6 +45929,7 @@ exports.METHOD_DEVICE_SELECTORS = METHOD_DEVICE_SELECTORS;
|
|
|
45700
45929
|
exports.MODEL_FORMATS = MODEL_FORMATS;
|
|
45701
45930
|
exports.MOTION_TRIGGER_FEATURE = MOTION_TRIGGER_FEATURE;
|
|
45702
45931
|
exports.ManagedModelCatalogEntrySchema = ManagedModelCatalogEntrySchema;
|
|
45932
|
+
exports.ManagedModelExtraFileSchema = ManagedModelExtraFileSchema;
|
|
45703
45933
|
exports.ManagedModelRefSchema = ManagedModelRefSchema;
|
|
45704
45934
|
exports.ManagedRuntimeConfigSchema = ManagedRuntimeConfigSchema;
|
|
45705
45935
|
exports.MaskGridDimsSchema = MaskGridDimsSchema;
|
|
@@ -45992,6 +46222,7 @@ exports.SCENE_DEFAULT_ANCHOR_THRESHOLD = SCENE_DEFAULT_ANCHOR_THRESHOLD;
|
|
|
45992
46222
|
exports.SCENE_DEFAULT_CHECK_INTERVAL_SEC = SCENE_DEFAULT_CHECK_INTERVAL_SEC;
|
|
45993
46223
|
exports.SCENE_DEFAULT_OBSERVATION_SPACING_SEC = SCENE_DEFAULT_OBSERVATION_SPACING_SEC;
|
|
45994
46224
|
exports.SCENE_DEFAULT_QUIET_SECONDS = SCENE_DEFAULT_QUIET_SECONDS;
|
|
46225
|
+
exports.SCENE_DEFAULT_UNCOVERED_POLICY = SCENE_DEFAULT_UNCOVERED_POLICY;
|
|
45995
46226
|
exports.SCENE_DIVERGED = SCENE_DIVERGED;
|
|
45996
46227
|
exports.SCENE_RESET_RECAPTURES = SCENE_RESET_RECAPTURES;
|
|
45997
46228
|
exports.SCOPE_PRESETS = SCOPE_PRESETS;
|
|
@@ -46014,6 +46245,7 @@ exports.SceneMonitorStateSchema = SceneMonitorStateSchema;
|
|
|
46014
46245
|
exports.SceneMonitorStatusSchema = SceneMonitorStatusSchema;
|
|
46015
46246
|
exports.SceneReferenceSchema = SceneReferenceSchema;
|
|
46016
46247
|
exports.SceneUnavailableSchema = SceneUnavailableSchema;
|
|
46248
|
+
exports.SceneUncoveredPolicySchema = SceneUncoveredPolicySchema;
|
|
46017
46249
|
exports.SceneVerdictSchema = SceneVerdictSchema;
|
|
46018
46250
|
exports.ScopedTokenSchema = ScopedTokenSchema;
|
|
46019
46251
|
exports.ScopedTokenSummarySchema = ScopedTokenSummarySchema;
|