@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
|
@@ -3626,6 +3626,42 @@ function isDeviceScopedCap(capName) {
|
|
|
3626
3626
|
return DEVICE_SCOPED_CAPS.has(capName);
|
|
3627
3627
|
}
|
|
3628
3628
|
//#endregion
|
|
3629
|
+
//#region src/util/boot-recovery-backoff.ts
|
|
3630
|
+
/**
|
|
3631
|
+
* The ONE retry schedule for work that can fail simply because the node was
|
|
3632
|
+
* still booting.
|
|
3633
|
+
*
|
|
3634
|
+
* The measured failure (docs/design/boot-to-usable-camera.md, item E): a hub
|
|
3635
|
+
* boot that serialised its addon graph starved every driver dial on it. Fifteen
|
|
3636
|
+
* Hikvision devices logged `Initial probe did not complete — scheduling retry
|
|
3637
|
+
* chain {firstRetryMs=300000}` and then sat unprobed for five minutes, long
|
|
3638
|
+
* after the condition that caused the failure had gone. The Tailscale addon's
|
|
3639
|
+
* auto-rejoin carried a byte-identical schedule, armed from `initialize()`, for
|
|
3640
|
+
* the same reason.
|
|
3641
|
+
*
|
|
3642
|
+
* The shape that fixes it: **two cheap attempts first, then the long tail.**
|
|
3643
|
+
*
|
|
3644
|
+
* - 15 s / 60 s — the boot window. Anything that failed because the node was
|
|
3645
|
+
* busy is recovered here, before an operator can open the UI and see a
|
|
3646
|
+
* camera that is wrong about itself.
|
|
3647
|
+
* - 5 m → 90 m — the genuinely-offline case. A battery cam that is asleep, a
|
|
3648
|
+
* VLAN that is down, a peer that has not come back. Unchanged in intent from
|
|
3649
|
+
* the schedule this replaces (~3 h 30 m of coverage): here ~3 h 21 m, then
|
|
3650
|
+
* the chain ends and manual re-arm (reprobe / restart) is the only path.
|
|
3651
|
+
*
|
|
3652
|
+
* Bounded on purpose — see D6. A chain that never gives up is a busy loop with
|
|
3653
|
+
* extra steps.
|
|
3654
|
+
*/
|
|
3655
|
+
var BOOT_RECOVERY_BACKOFF_MS = [
|
|
3656
|
+
15e3,
|
|
3657
|
+
6e4,
|
|
3658
|
+
5 * 6e4,
|
|
3659
|
+
15 * 6e4,
|
|
3660
|
+
30 * 6e4,
|
|
3661
|
+
60 * 6e4,
|
|
3662
|
+
90 * 6e4
|
|
3663
|
+
];
|
|
3664
|
+
//#endregion
|
|
3629
3665
|
//#region src/utils/json-safe.ts
|
|
3630
3666
|
/**
|
|
3631
3667
|
* Type-safe JSON parsing helpers.
|
|
@@ -3739,4 +3775,4 @@ function sleepCancellable(ms, signal) {
|
|
|
3739
3775
|
});
|
|
3740
3776
|
}
|
|
3741
3777
|
//#endregion
|
|
3742
|
-
export {
|
|
3778
|
+
export { EncodedPacketSchema as $, expandCapMethods as A, ReadinessTimeoutError as B, DeviceRole as C, WELL_KNOWN_TABS as Ct, DEVICE_SETTINGS_CONTRIBUTION_METHODS as D, hydrateSchema as Dt, DEFAULT_RUNTIME_STATE_DURABILITY as E, collectHydratedFieldValues as Et, CAP_NODE_PIN_CONTEXT_KEY as F, BrokerStatusSchema as G, readinessKey as H, nodePin as I, CamStreamKindSchema as J, CAM_PROFILE_ORDER as K, readNodePin as L, method as M, resolveCapMount as N, DEVICE_STATUS_METHOD as O, resolveHydratedFieldValue as Ot, systemMethod as P, DecodedFrameSchema as Q, toNodeId as R, DeviceFeature as S, isEvent as St, adminUiCapability as T, collectHydratedFieldEntries as Tt, scopeKey as U, emitDownForOwnedCaps as V, BrokerStatsSchema as W, CameraStreamSchema as X, CamStreamResolutionSchema as Y, DecodedAudioChunkSchema as Z, createSliceHandle as _, BaseAddon as _t, asJsonObject as a, StreamSourceEntrySchema$1 as at, viewerUiCapability as b, createEvent as bt, parseJsonArray as c, SubscribeAudioChunksResultSchema as ct, BOOT_RECOVERY_BACKOFF_MS as d, makeProfileBrokerId as dt, FrameHandleFormatSchema as et, DEVICE_SCOPED_CAPS as f, makeSourceBrokerId as ft, createMirrorSource as g, DisposerChain as gt, createLazyTrpcSource as h, DATAPLANE_SECRET_HEADER as ht, asJsonArray as i, ProfileSlotStatusSchema as it, isDeviceConfigCap as j, event as k, parseJsonObject as l, SubscribeFramesInputSchema as lt, createDeviceProxy as m, selectAssignedProfileSlots as mt, sleepCancellable as n, ProfileRtspEntrySchema as nt, asNumber as o, StreamSourceSchema as ot, isDeviceScopedCap as p, parseProfileBrokerId as pt, CamProfileSchema as q, asBoolean as r, ProfileSlotSchema as rt, asString as s, SubscribeAudioChunksInputSchema as st, sleep as t, FrameHandleSchema as tt, parseJsonUnknown as u, SubscribeFramesResultSchema as ut, RawStateResultSchema as v, normalizeAddonInitResult as vt, DeviceType as w, WELL_KNOWN_TAB_MAP as wt, ChargingStatus as x, emitReadiness as xt, deviceOpsCapability as y, createDurableState as yt, ReadinessRegistry as z };
|
|
@@ -3626,6 +3626,42 @@ function isDeviceScopedCap(capName) {
|
|
|
3626
3626
|
return DEVICE_SCOPED_CAPS.has(capName);
|
|
3627
3627
|
}
|
|
3628
3628
|
//#endregion
|
|
3629
|
+
//#region src/util/boot-recovery-backoff.ts
|
|
3630
|
+
/**
|
|
3631
|
+
* The ONE retry schedule for work that can fail simply because the node was
|
|
3632
|
+
* still booting.
|
|
3633
|
+
*
|
|
3634
|
+
* The measured failure (docs/design/boot-to-usable-camera.md, item E): a hub
|
|
3635
|
+
* boot that serialised its addon graph starved every driver dial on it. Fifteen
|
|
3636
|
+
* Hikvision devices logged `Initial probe did not complete — scheduling retry
|
|
3637
|
+
* chain {firstRetryMs=300000}` and then sat unprobed for five minutes, long
|
|
3638
|
+
* after the condition that caused the failure had gone. The Tailscale addon's
|
|
3639
|
+
* auto-rejoin carried a byte-identical schedule, armed from `initialize()`, for
|
|
3640
|
+
* the same reason.
|
|
3641
|
+
*
|
|
3642
|
+
* The shape that fixes it: **two cheap attempts first, then the long tail.**
|
|
3643
|
+
*
|
|
3644
|
+
* - 15 s / 60 s — the boot window. Anything that failed because the node was
|
|
3645
|
+
* busy is recovered here, before an operator can open the UI and see a
|
|
3646
|
+
* camera that is wrong about itself.
|
|
3647
|
+
* - 5 m → 90 m — the genuinely-offline case. A battery cam that is asleep, a
|
|
3648
|
+
* VLAN that is down, a peer that has not come back. Unchanged in intent from
|
|
3649
|
+
* the schedule this replaces (~3 h 30 m of coverage): here ~3 h 21 m, then
|
|
3650
|
+
* the chain ends and manual re-arm (reprobe / restart) is the only path.
|
|
3651
|
+
*
|
|
3652
|
+
* Bounded on purpose — see D6. A chain that never gives up is a busy loop with
|
|
3653
|
+
* extra steps.
|
|
3654
|
+
*/
|
|
3655
|
+
var BOOT_RECOVERY_BACKOFF_MS = [
|
|
3656
|
+
15e3,
|
|
3657
|
+
6e4,
|
|
3658
|
+
5 * 6e4,
|
|
3659
|
+
15 * 6e4,
|
|
3660
|
+
30 * 6e4,
|
|
3661
|
+
60 * 6e4,
|
|
3662
|
+
90 * 6e4
|
|
3663
|
+
];
|
|
3664
|
+
//#endregion
|
|
3629
3665
|
//#region src/utils/json-safe.ts
|
|
3630
3666
|
/**
|
|
3631
3667
|
* Type-safe JSON parsing helpers.
|
|
@@ -3739,6 +3775,12 @@ function sleepCancellable(ms, signal) {
|
|
|
3739
3775
|
});
|
|
3740
3776
|
}
|
|
3741
3777
|
//#endregion
|
|
3778
|
+
Object.defineProperty(exports, "BOOT_RECOVERY_BACKOFF_MS", {
|
|
3779
|
+
enumerable: true,
|
|
3780
|
+
get: function() {
|
|
3781
|
+
return BOOT_RECOVERY_BACKOFF_MS;
|
|
3782
|
+
}
|
|
3783
|
+
});
|
|
3742
3784
|
Object.defineProperty(exports, "BaseAddon", {
|
|
3743
3785
|
enumerable: true,
|
|
3744
3786
|
get: function() {
|
package/dist/types/models.d.ts
CHANGED
|
@@ -121,8 +121,8 @@ export declare const ModelVariantGroupSchema: z.ZodObject<{
|
|
|
121
121
|
int8: "int8";
|
|
122
122
|
}>>;
|
|
123
123
|
optimization: z.ZodOptional<z.ZodEnum<{
|
|
124
|
-
standard: "standard";
|
|
125
124
|
fast: "fast";
|
|
125
|
+
standard: "standard";
|
|
126
126
|
}>>;
|
|
127
127
|
resolution: z.ZodOptional<z.ZodNumber>;
|
|
128
128
|
}, z.core.$strip>;
|
|
@@ -210,9 +210,9 @@ export declare const ModelCatalogEntrySchema: z.ZodObject<{
|
|
|
210
210
|
nhwc: "nhwc";
|
|
211
211
|
}>>;
|
|
212
212
|
inputNormalization: z.ZodOptional<z.ZodEnum<{
|
|
213
|
+
none: "none";
|
|
213
214
|
"zero-one": "zero-one";
|
|
214
215
|
imagenet: "imagenet";
|
|
215
|
-
none: "none";
|
|
216
216
|
}>>;
|
|
217
217
|
outputProbabilities: z.ZodOptional<z.ZodBoolean>;
|
|
218
218
|
preprocessMode: z.ZodOptional<z.ZodEnum<{
|
|
@@ -240,8 +240,8 @@ export declare const ModelCatalogEntrySchema: z.ZodObject<{
|
|
|
240
240
|
int8: "int8";
|
|
241
241
|
}>>;
|
|
242
242
|
optimization: z.ZodOptional<z.ZodEnum<{
|
|
243
|
-
standard: "standard";
|
|
244
243
|
fast: "fast";
|
|
244
|
+
standard: "standard";
|
|
245
245
|
}>>;
|
|
246
246
|
resolution: z.ZodOptional<z.ZodNumber>;
|
|
247
247
|
}, z.core.$strip>>;
|
|
@@ -310,19 +310,19 @@ export declare const ModelConvertMetadataSchema: z.ZodObject<{
|
|
|
310
310
|
nhwc: "nhwc";
|
|
311
311
|
}>>;
|
|
312
312
|
inputNormalization: z.ZodOptional<z.ZodEnum<{
|
|
313
|
+
none: "none";
|
|
313
314
|
"zero-one": "zero-one";
|
|
314
315
|
imagenet: "imagenet";
|
|
315
|
-
none: "none";
|
|
316
316
|
}>>;
|
|
317
317
|
preprocessMode: z.ZodOptional<z.ZodEnum<{
|
|
318
318
|
letterbox: "letterbox";
|
|
319
319
|
resize: "resize";
|
|
320
320
|
}>>;
|
|
321
321
|
outputFormat: z.ZodEnum<{
|
|
322
|
+
classification: "classification";
|
|
322
323
|
yolo: "yolo";
|
|
323
324
|
ssd: "ssd";
|
|
324
325
|
embedding: "embedding";
|
|
325
|
-
classification: "classification";
|
|
326
326
|
ocr: "ocr";
|
|
327
327
|
segmentation: "segmentation";
|
|
328
328
|
}>;
|
|
@@ -431,9 +431,9 @@ export declare const ConvertResultSchema: z.ZodObject<{
|
|
|
431
431
|
nhwc: "nhwc";
|
|
432
432
|
}>>;
|
|
433
433
|
inputNormalization: z.ZodOptional<z.ZodEnum<{
|
|
434
|
+
none: "none";
|
|
434
435
|
"zero-one": "zero-one";
|
|
435
436
|
imagenet: "imagenet";
|
|
436
|
-
none: "none";
|
|
437
437
|
}>>;
|
|
438
438
|
outputProbabilities: z.ZodOptional<z.ZodBoolean>;
|
|
439
439
|
preprocessMode: z.ZodOptional<z.ZodEnum<{
|
|
@@ -461,8 +461,8 @@ export declare const ConvertResultSchema: z.ZodObject<{
|
|
|
461
461
|
int8: "int8";
|
|
462
462
|
}>>;
|
|
463
463
|
optimization: z.ZodOptional<z.ZodEnum<{
|
|
464
|
-
standard: "standard";
|
|
465
464
|
fast: "fast";
|
|
465
|
+
standard: "standard";
|
|
466
466
|
}>>;
|
|
467
467
|
resolution: z.ZodOptional<z.ZodNumber>;
|
|
468
468
|
}, z.core.$strip>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONE retry schedule for work that can fail simply because the node was
|
|
3
|
+
* still booting.
|
|
4
|
+
*
|
|
5
|
+
* The measured failure (docs/design/boot-to-usable-camera.md, item E): a hub
|
|
6
|
+
* boot that serialised its addon graph starved every driver dial on it. Fifteen
|
|
7
|
+
* Hikvision devices logged `Initial probe did not complete — scheduling retry
|
|
8
|
+
* chain {firstRetryMs=300000}` and then sat unprobed for five minutes, long
|
|
9
|
+
* after the condition that caused the failure had gone. The Tailscale addon's
|
|
10
|
+
* auto-rejoin carried a byte-identical schedule, armed from `initialize()`, for
|
|
11
|
+
* the same reason.
|
|
12
|
+
*
|
|
13
|
+
* The shape that fixes it: **two cheap attempts first, then the long tail.**
|
|
14
|
+
*
|
|
15
|
+
* - 15 s / 60 s — the boot window. Anything that failed because the node was
|
|
16
|
+
* busy is recovered here, before an operator can open the UI and see a
|
|
17
|
+
* camera that is wrong about itself.
|
|
18
|
+
* - 5 m → 90 m — the genuinely-offline case. A battery cam that is asleep, a
|
|
19
|
+
* VLAN that is down, a peer that has not come back. Unchanged in intent from
|
|
20
|
+
* the schedule this replaces (~3 h 30 m of coverage): here ~3 h 21 m, then
|
|
21
|
+
* the chain ends and manual re-arm (reprobe / restart) is the only path.
|
|
22
|
+
*
|
|
23
|
+
* Bounded on purpose — see D6. A chain that never gives up is a busy loop with
|
|
24
|
+
* extra steps.
|
|
25
|
+
*/
|
|
26
|
+
export declare const BOOT_RECOVERY_BACKOFF_MS: readonly number[];
|