@camstack/types 1.1.33 → 1.1.34
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/capabilities/custom-model-registry.cap.d.ts +2 -0
- package/dist/capabilities/model-convert.cap.d.ts +1 -0
- package/dist/capabilities/model-distributor.cap.d.ts +2 -0
- package/dist/capabilities/pipeline-executor.cap.d.ts +26 -0
- package/dist/device/index.d.ts +2 -0
- package/dist/device/reachability-poll.d.ts +90 -0
- package/dist/generated/addon-api.d.ts +18 -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 +2 -0
- package/dist/index.js +157 -7
- package/dist/index.mjs +154 -8
- package/dist/types/model-variant-groups.d.ts +10 -0
- package/dist/types/models.d.ts +3 -0
- package/package.json +1 -1
|
@@ -122,6 +122,7 @@ export declare const CustomModelDescriptorSchema: z.ZodObject<{
|
|
|
122
122
|
standard: "standard";
|
|
123
123
|
fast: "fast";
|
|
124
124
|
}>>;
|
|
125
|
+
resolution: z.ZodOptional<z.ZodNumber>;
|
|
125
126
|
}, z.core.$strip>>;
|
|
126
127
|
}, z.core.$strip>;
|
|
127
128
|
}, z.core.$strip>;
|
|
@@ -237,6 +238,7 @@ export declare const customModelRegistryCapability: {
|
|
|
237
238
|
standard: "standard";
|
|
238
239
|
fast: "fast";
|
|
239
240
|
}>>;
|
|
241
|
+
resolution: z.ZodOptional<z.ZodNumber>;
|
|
240
242
|
}, z.core.$strip>>;
|
|
241
243
|
}, z.core.$strip>;
|
|
242
244
|
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
@@ -123,6 +123,7 @@ export declare const ModelDistributeInputSchema: z.ZodObject<{
|
|
|
123
123
|
standard: "standard";
|
|
124
124
|
fast: "fast";
|
|
125
125
|
}>>;
|
|
126
|
+
resolution: z.ZodOptional<z.ZodNumber>;
|
|
126
127
|
}, z.core.$strip>>;
|
|
127
128
|
}, z.core.$strip>;
|
|
128
129
|
}, z.core.$strip>;
|
|
@@ -251,6 +252,7 @@ export declare const modelDistributorCapability: {
|
|
|
251
252
|
standard: "standard";
|
|
252
253
|
fast: "fast";
|
|
253
254
|
}>>;
|
|
255
|
+
resolution: z.ZodOptional<z.ZodNumber>;
|
|
254
256
|
}, z.core.$strip>>;
|
|
255
257
|
}, z.core.$strip>;
|
|
256
258
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -108,6 +108,7 @@ declare const PipelineModelOptionSchema: z.ZodObject<{
|
|
|
108
108
|
standard: "standard";
|
|
109
109
|
fast: "fast";
|
|
110
110
|
}>>;
|
|
111
|
+
resolution: z.ZodOptional<z.ZodNumber>;
|
|
111
112
|
}, z.core.$strip>>;
|
|
112
113
|
legacy: z.ZodOptional<z.ZodBoolean>;
|
|
113
114
|
}, z.core.$strip>;
|
|
@@ -148,6 +149,7 @@ declare const PipelineAddonSchemaSchema: z.ZodObject<{
|
|
|
148
149
|
standard: "standard";
|
|
149
150
|
fast: "fast";
|
|
150
151
|
}>>;
|
|
152
|
+
resolution: z.ZodOptional<z.ZodNumber>;
|
|
151
153
|
}, z.core.$strip>>;
|
|
152
154
|
legacy: z.ZodOptional<z.ZodBoolean>;
|
|
153
155
|
}, z.core.$strip>>>;
|
|
@@ -212,6 +214,7 @@ declare const PipelineSlotSchemaSchema: z.ZodObject<{
|
|
|
212
214
|
standard: "standard";
|
|
213
215
|
fast: "fast";
|
|
214
216
|
}>>;
|
|
217
|
+
resolution: z.ZodOptional<z.ZodNumber>;
|
|
215
218
|
}, z.core.$strip>>;
|
|
216
219
|
legacy: z.ZodOptional<z.ZodBoolean>;
|
|
217
220
|
}, z.core.$strip>>>;
|
|
@@ -316,6 +319,7 @@ declare const PipelineSchemaSchema: z.ZodObject<{
|
|
|
316
319
|
standard: "standard";
|
|
317
320
|
fast: "fast";
|
|
318
321
|
}>>;
|
|
322
|
+
resolution: z.ZodOptional<z.ZodNumber>;
|
|
319
323
|
}, z.core.$strip>>;
|
|
320
324
|
legacy: z.ZodOptional<z.ZodBoolean>;
|
|
321
325
|
}, z.core.$strip>>>;
|
|
@@ -534,6 +538,27 @@ export declare const pipelineExecutorCapability: {
|
|
|
534
538
|
}, z.core.$strip>, z.ZodObject<{
|
|
535
539
|
success: z.ZodLiteral<true>;
|
|
536
540
|
}, z.core.$strip>, "mutation">;
|
|
541
|
+
/**
|
|
542
|
+
* Reset ONE node's detection-pipeline to its factory defaults, forcing
|
|
543
|
+
* regeneration of the (now hardware-aware) default object-detection
|
|
544
|
+
* model. `nodeId` is the ROUTING key — the generated cap-router strips
|
|
545
|
+
* it (default `nodeIdMode: 'routing'`, same as `getSelectedEngine` /
|
|
546
|
+
* `getDefaultSteps`) and dispatches to that node, so the provider method
|
|
547
|
+
* runs ON the target node and receives no `nodeId`.
|
|
548
|
+
*
|
|
549
|
+
* Clears the node's persisted global pipeline seed (`pipelineSteps`) +
|
|
550
|
+
* legacy engine blob (`pipelineEngine`) and every device's per-camera
|
|
551
|
+
* step overrides, then re-seeds the hardware-aware default tree. Returns
|
|
552
|
+
* the regenerated object-detection model id (null when the default tree
|
|
553
|
+
* has no detector for this node's engine format) so the caller can
|
|
554
|
+
* verify the reset without a second round-trip.
|
|
555
|
+
*/
|
|
556
|
+
readonly resetToDefault: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
557
|
+
nodeId: z.ZodString;
|
|
558
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
559
|
+
success: z.ZodLiteral<true>;
|
|
560
|
+
regeneratedModelId: z.ZodNullable<z.ZodString>;
|
|
561
|
+
}, z.core.$strip>, "mutation">;
|
|
537
562
|
readonly getSchema: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
|
|
538
563
|
availableEngines: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
539
564
|
engine: z.ZodObject<{
|
|
@@ -627,6 +652,7 @@ export declare const pipelineExecutorCapability: {
|
|
|
627
652
|
standard: "standard";
|
|
628
653
|
fast: "fast";
|
|
629
654
|
}>>;
|
|
655
|
+
resolution: z.ZodOptional<z.ZodNumber>;
|
|
630
656
|
}, z.core.$strip>>;
|
|
631
657
|
legacy: z.ZodOptional<z.ZodBoolean>;
|
|
632
658
|
}, z.core.$strip>>>;
|
package/dist/device/index.d.ts
CHANGED
|
@@ -21,3 +21,5 @@ export { getByPath, setByPath } from './path-util.js';
|
|
|
21
21
|
export { applyTransform } from './device-link-transform.js';
|
|
22
22
|
export { enumerateItemArrayFields, enumerateSchemaFields } from './schema-fields.js';
|
|
23
23
|
export type { WireableField } from './schema-fields.js';
|
|
24
|
+
export { startReachabilityPoll, REACHABILITY_POLL_INTERVAL_MS, REACHABILITY_FAILURES_TO_OFFLINE, REACHABILITY_PROBE_TIMEOUT_MS, } from './reachability-poll.js';
|
|
25
|
+
export type { ReachabilityPollOptions, ReachabilityPollHandle, ReachabilityPollLogger, } from './reachability-poll.js';
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared control-plane reachability poller for camera devices.
|
|
3
|
+
*
|
|
4
|
+
* `device.online` must reflect CONTROL-PLANE REACHABILITY — "can we talk to
|
|
5
|
+
* the camera's management API right now" — NOT whether video happens to be
|
|
6
|
+
* flowing through the stream broker. A camera that dials on-demand (no
|
|
7
|
+
* consumer attached) is fully reachable yet has no active stream; driving
|
|
8
|
+
* `online` from stream health falsely marks it OFFLINE.
|
|
9
|
+
*
|
|
10
|
+
* Every camera provider owns a cheap control-plane round-trip (Hikvision
|
|
11
|
+
* ISAPI `getDeviceInfo`, Amcrest Dahua CGI `getDeviceInfo`, ONVIF
|
|
12
|
+
* `getDeviceInformation`, RTSP `OPTIONS`/TCP-connect). Each provider passes
|
|
13
|
+
* that round-trip as a `probe: () => Promise<boolean>` and this helper runs
|
|
14
|
+
* the loop, applies hysteresis, and drives the device's `online` setter.
|
|
15
|
+
*
|
|
16
|
+
* Hysteresis rules (avoid flapping on a single dropped packet):
|
|
17
|
+
* - mark ONLINE immediately on the first successful probe;
|
|
18
|
+
* - mark OFFLINE only after {@link REACHABILITY_FAILURES_TO_OFFLINE}
|
|
19
|
+
* CONSECUTIVE failures.
|
|
20
|
+
*
|
|
21
|
+
* Robustness rules:
|
|
22
|
+
* - each probe is bounded by {@link REACHABILITY_PROBE_TIMEOUT_MS} so a hung
|
|
23
|
+
* control channel can't wedge the loop;
|
|
24
|
+
* - a single in-flight probe at a time — a slow probe never stacks up;
|
|
25
|
+
* - the loop never throws (a rejected/thrown probe counts as a failure);
|
|
26
|
+
* - `isEnabled()` gates each tick so a soft-disabled device isn't polled.
|
|
27
|
+
*/
|
|
28
|
+
/** Poll cadence — probe every camera's control plane on this interval. */
|
|
29
|
+
export declare const REACHABILITY_POLL_INTERVAL_MS = 30000;
|
|
30
|
+
/**
|
|
31
|
+
* Consecutive failures required before flipping `online` to `false`.
|
|
32
|
+
* ONLINE is asserted on the first success; OFFLINE waits for N misses so a
|
|
33
|
+
* single transient timeout doesn't flap the flag.
|
|
34
|
+
*/
|
|
35
|
+
export declare const REACHABILITY_FAILURES_TO_OFFLINE = 3;
|
|
36
|
+
/** Per-probe timeout — an unreachable/hung control channel resolves as a miss. */
|
|
37
|
+
export declare const REACHABILITY_PROBE_TIMEOUT_MS = 10000;
|
|
38
|
+
/**
|
|
39
|
+
* Minimal logger surface the poller uses. Declared with METHOD syntax
|
|
40
|
+
* (not a property arrow) so the parameter check is bivariant — a scoped
|
|
41
|
+
* logger whose `debug` takes a structured `LogExtras` second argument
|
|
42
|
+
* satisfies this without the caller having to import the logger types.
|
|
43
|
+
*/
|
|
44
|
+
export interface ReachabilityPollLogger {
|
|
45
|
+
debug(message: string, meta?: unknown): void;
|
|
46
|
+
}
|
|
47
|
+
export interface ReachabilityPollOptions {
|
|
48
|
+
/**
|
|
49
|
+
* Control-plane round-trip. Resolve `true` when the camera is reachable,
|
|
50
|
+
* `false` (or throw/reject) when it is not. Never assume it resolves —
|
|
51
|
+
* the poller bounds it with a timeout regardless.
|
|
52
|
+
*/
|
|
53
|
+
readonly probe: () => Promise<boolean>;
|
|
54
|
+
/**
|
|
55
|
+
* Drives the device's online flag — typically `(v) => { device.online = v }`
|
|
56
|
+
* or `device.markOnline`. Called only on an actual transition decision
|
|
57
|
+
* (idempotent setters are fine; `markOnline` already no-ops on no-change).
|
|
58
|
+
*/
|
|
59
|
+
readonly setOnline: (online: boolean) => void;
|
|
60
|
+
/**
|
|
61
|
+
* Gate for each tick. Return `false` to skip the probe entirely (e.g. a
|
|
62
|
+
* soft-disabled device, or a sleeping battery camera). Default: always on.
|
|
63
|
+
* A skipped tick does NOT count as a failure and leaves `online` untouched.
|
|
64
|
+
*/
|
|
65
|
+
readonly isEnabled?: () => boolean;
|
|
66
|
+
/** Override the 30s cadence (tests). */
|
|
67
|
+
readonly intervalMs?: number;
|
|
68
|
+
/** Override the 3-miss offline threshold (tests). */
|
|
69
|
+
readonly failuresToOffline?: number;
|
|
70
|
+
/** Override the 10s per-probe timeout (tests). */
|
|
71
|
+
readonly probeTimeoutMs?: number;
|
|
72
|
+
/** Optional scoped logger for probe-failure diagnostics. */
|
|
73
|
+
readonly logger?: ReachabilityPollLogger;
|
|
74
|
+
/**
|
|
75
|
+
* Run the first probe immediately instead of waiting one interval.
|
|
76
|
+
* Default `true` — a freshly-activated camera should reflect reachability
|
|
77
|
+
* without a 30s blind window.
|
|
78
|
+
*/
|
|
79
|
+
readonly runImmediately?: boolean;
|
|
80
|
+
}
|
|
81
|
+
export interface ReachabilityPollHandle {
|
|
82
|
+
/** Stop the loop and release the timer. Idempotent. */
|
|
83
|
+
readonly stop: () => void;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Start the reachability poll loop. Returns a handle whose `stop()` clears the
|
|
87
|
+
* timer and prevents any further ticks. Start on device activation, stop on
|
|
88
|
+
* device teardown (`removeDevice`) so no timer leaks.
|
|
89
|
+
*/
|
|
90
|
+
export declare function startReachabilityPoll(options: ReachabilityPollOptions): ReachabilityPollHandle;
|
|
@@ -3231,6 +3231,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
3231
3231
|
tier: string;
|
|
3232
3232
|
precision?: "fp32" | "int8" | undefined;
|
|
3233
3233
|
optimization?: "standard" | "fast" | undefined;
|
|
3234
|
+
resolution?: number | undefined;
|
|
3234
3235
|
} | undefined;
|
|
3235
3236
|
};
|
|
3236
3237
|
}[];
|
|
@@ -7256,6 +7257,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
7256
7257
|
tier: string;
|
|
7257
7258
|
precision?: "fp32" | "int8" | undefined;
|
|
7258
7259
|
optimization?: "standard" | "fast" | undefined;
|
|
7260
|
+
resolution?: number | undefined;
|
|
7259
7261
|
} | undefined;
|
|
7260
7262
|
};
|
|
7261
7263
|
artifacts: readonly {
|
|
@@ -7353,6 +7355,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
7353
7355
|
tier: string;
|
|
7354
7356
|
precision?: "fp32" | "int8" | undefined;
|
|
7355
7357
|
optimization?: "standard" | "fast" | undefined;
|
|
7358
|
+
resolution?: number | undefined;
|
|
7356
7359
|
} | undefined;
|
|
7357
7360
|
};
|
|
7358
7361
|
};
|
|
@@ -9007,6 +9010,11 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
9007
9010
|
};
|
|
9008
9011
|
meta: object;
|
|
9009
9012
|
}>;
|
|
9013
|
+
resetToDefault: import("@trpc/server").TRPCMutationProcedure<{
|
|
9014
|
+
input: any;
|
|
9015
|
+
output: any;
|
|
9016
|
+
meta: object;
|
|
9017
|
+
}>;
|
|
9010
9018
|
getSchema: import("@trpc/server").TRPCQueryProcedure<{
|
|
9011
9019
|
input: {
|
|
9012
9020
|
nodeId?: string | undefined;
|
|
@@ -9056,6 +9064,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
9056
9064
|
tier: string;
|
|
9057
9065
|
precision?: "fp32" | "int8" | undefined;
|
|
9058
9066
|
optimization?: "standard" | "fast" | undefined;
|
|
9067
|
+
resolution?: number | undefined;
|
|
9059
9068
|
} | undefined;
|
|
9060
9069
|
legacy?: boolean | undefined;
|
|
9061
9070
|
}[];
|
|
@@ -17798,6 +17807,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
17798
17807
|
tier: string;
|
|
17799
17808
|
precision?: "fp32" | "int8" | undefined;
|
|
17800
17809
|
optimization?: "standard" | "fast" | undefined;
|
|
17810
|
+
resolution?: number | undefined;
|
|
17801
17811
|
} | undefined;
|
|
17802
17812
|
};
|
|
17803
17813
|
}[];
|
|
@@ -21823,6 +21833,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
21823
21833
|
tier: string;
|
|
21824
21834
|
precision?: "fp32" | "int8" | undefined;
|
|
21825
21835
|
optimization?: "standard" | "fast" | undefined;
|
|
21836
|
+
resolution?: number | undefined;
|
|
21826
21837
|
} | undefined;
|
|
21827
21838
|
};
|
|
21828
21839
|
artifacts: readonly {
|
|
@@ -21920,6 +21931,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
21920
21931
|
tier: string;
|
|
21921
21932
|
precision?: "fp32" | "int8" | undefined;
|
|
21922
21933
|
optimization?: "standard" | "fast" | undefined;
|
|
21934
|
+
resolution?: number | undefined;
|
|
21923
21935
|
} | undefined;
|
|
21924
21936
|
};
|
|
21925
21937
|
};
|
|
@@ -23574,6 +23586,11 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
23574
23586
|
};
|
|
23575
23587
|
meta: object;
|
|
23576
23588
|
}>;
|
|
23589
|
+
resetToDefault: import("@trpc/server").TRPCMutationProcedure<{
|
|
23590
|
+
input: any;
|
|
23591
|
+
output: any;
|
|
23592
|
+
meta: object;
|
|
23593
|
+
}>;
|
|
23577
23594
|
getSchema: import("@trpc/server").TRPCQueryProcedure<{
|
|
23578
23595
|
input: {
|
|
23579
23596
|
nodeId?: string | undefined;
|
|
@@ -23623,6 +23640,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
23623
23640
|
tier: string;
|
|
23624
23641
|
precision?: "fp32" | "int8" | undefined;
|
|
23625
23642
|
optimization?: "standard" | "fast" | undefined;
|
|
23643
|
+
resolution?: number | undefined;
|
|
23626
23644
|
} | undefined;
|
|
23627
23645
|
legacy?: boolean | undefined;
|
|
23628
23646
|
}[];
|
|
@@ -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: 726 method paths across 109 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|
|
@@ -71,7 +71,7 @@ export interface SystemProxy {
|
|
|
71
71
|
readonly networkQuality: Pick<InferProvider<typeof networkQualityCapability>, 'getAllStats'>;
|
|
72
72
|
readonly nodes: Pick<InferProvider<typeof nodesCapability>, 'topology' | 'deployAddon' | 'undeployAddon' | 'restartAddon' | 'restartProcess' | 'restartNode' | 'shutdownNode' | 'renameNode' | 'clusterAddonStatus' | 'getCapUsageGraph' | 'getNodeAddons' | 'setProcessLogLevel' | 'executeQuery'>;
|
|
73
73
|
readonly notificationOutput: Pick<InferProvider<typeof notificationOutputCapability>, 'listTargetKinds' | 'listTargets' | 'discoverTargets' | 'send' | 'testTarget' | 'upsertTarget' | 'deleteTarget' | 'setTargetEnabled'>;
|
|
74
|
-
readonly pipelineExecutor: Pick<InferProvider<typeof pipelineExecutorCapability>, 'getAvailableEngines' | 'getSelectedEngine' | 'getDefaultSteps' | 'reprobeEngine' | 'getEngineProvisioning' | 'getVideoPipelineSteps' | 'setVideoPipelineSteps' | 'getSchema' | 'getGlobalSteps' | 'getGlobalPipelineConfig' | 'getOrchestratorConfigSchema' | 'validatePipeline' | 'listTemplates' | 'saveTemplate' | 'updateTemplate' | 'deleteTemplate' | 'getCapabilities' | 'getAddonModels' | 'downloadModel' | 'deleteModel' | 'detect' | 'cacheFrameInPool' | 'inferCached' | 'uncacheFrame' | 'getEffectiveTuning' | 'listLoadedEngines' | 'spinEngine' | 'killEngine' | 'listReferenceImages' | 'getReferenceImage' | 'getReferenceAudioFiles' | 'getReferenceAudio' | 'getAudioCapabilities' | 'runAudioTest' | 'getDetectionConfigSchema'>;
|
|
74
|
+
readonly pipelineExecutor: Pick<InferProvider<typeof pipelineExecutorCapability>, 'getAvailableEngines' | 'getSelectedEngine' | 'getDefaultSteps' | 'reprobeEngine' | 'getEngineProvisioning' | 'getVideoPipelineSteps' | 'setVideoPipelineSteps' | 'resetToDefault' | 'getSchema' | 'getGlobalSteps' | 'getGlobalPipelineConfig' | 'getOrchestratorConfigSchema' | 'validatePipeline' | 'listTemplates' | 'saveTemplate' | 'updateTemplate' | 'deleteTemplate' | 'getCapabilities' | 'getAddonModels' | 'downloadModel' | 'deleteModel' | 'detect' | 'cacheFrameInPool' | 'inferCached' | 'uncacheFrame' | 'getEffectiveTuning' | 'listLoadedEngines' | 'spinEngine' | 'killEngine' | 'listReferenceImages' | 'getReferenceImage' | 'getReferenceAudioFiles' | 'getReferenceAudio' | 'getAudioCapabilities' | 'runAudioTest' | 'getDetectionConfigSchema'>;
|
|
75
75
|
readonly pipelineOrchestrator: Pick<InferProvider<typeof pipelineOrchestratorCapability>, 'rebalance' | 'getPipelineAssignments' | 'getAgentLoad' | 'getGlobalMetrics' | 'getCapabilityBindings' | 'setCapabilityBinding' | 'getIngestOwner' | 'getDecoderAssignments' | 'getAudioNodeLoad' | 'getAgentSettings' | 'listAgentSettings' | 'setAgentAddonDefaults' | 'removeAgentSettings' | 'setAgentMaxCameras' | 'setAgentDetectWeight' | 'setAgentCapabilities' | 'setAgentReachableHost' | 'getCameraStatuses' | 'listTemplates' | 'saveTemplate' | 'updateTemplate' | 'deleteTemplate'>;
|
|
76
76
|
readonly pipelineRunner: Pick<InferProvider<typeof pipelineRunnerCapability>, 'attachCamera' | 'reportMotion' | 'getLocalLoad' | 'getLocalMetrics' | 'getAllCameraMetrics' | 'getLocalCameras'>;
|
|
77
77
|
readonly plateGallery: Pick<InferProvider<typeof plateGalleryCapability>, 'getPlateMedia' | 'searchPlates' | 'suggestPlateClusters' | 'correctPlateText' | 'deletePlate'>;
|
package/dist/index.d.ts
CHANGED
|
@@ -132,6 +132,8 @@ export { DeviceRuntimeState } from './device/device-runtime-state.js';
|
|
|
132
132
|
export type { IDeviceRuntimeState } from './device/device-runtime-state.js';
|
|
133
133
|
export { createRuntimeStateBridge } from './device/runtime-state-helpers.js';
|
|
134
134
|
export type { RuntimeStateBridge } from './device/runtime-state-helpers.js';
|
|
135
|
+
export { startReachabilityPoll, REACHABILITY_POLL_INTERVAL_MS, REACHABILITY_FAILURES_TO_OFFLINE, REACHABILITY_PROBE_TIMEOUT_MS, } from './device/reachability-poll.js';
|
|
136
|
+
export type { ReachabilityPollOptions, ReachabilityPollHandle, ReachabilityPollLogger, } from './device/reachability-poll.js';
|
|
135
137
|
export { prepareNotification, type PreparedAction, type PreparedAttachment, type PreparedNotification, type ResolvedLevel, } from './notification/degrade-engine.js';
|
|
136
138
|
export { htmlToText, markdownToHtmlLite, markdownToText, type NotificationFormat as NotificationBodyFormat, resolveFormat, textToHtml, transcodeBody, } from './notification/format-transcode.js';
|
|
137
139
|
export { BaseDevice } from './device/base-device.js';
|
package/dist/index.js
CHANGED
|
@@ -132,10 +132,18 @@ var ModelVariantGroupSchema = zod.z.object({
|
|
|
132
132
|
precision: zod.z.enum(["fp32", "int8"]).optional(),
|
|
133
133
|
/**
|
|
134
134
|
* Speed-optimization axis. Omit ⇒ the standard build. `fast` marks a
|
|
135
|
-
* latency-optimized export (e.g. ReLU-activation
|
|
136
|
-
*
|
|
135
|
+
* latency-optimized export (e.g. ReLU-activation variant) — the slot the
|
|
136
|
+
* future performance variants plug into.
|
|
137
137
|
*/
|
|
138
|
-
optimization: zod.z.enum(["standard", "fast"]).optional()
|
|
138
|
+
optimization: zod.z.enum(["standard", "fast"]).optional(),
|
|
139
|
+
/**
|
|
140
|
+
* Input-resolution axis (square input side, px). Omit ⇒ the family's native
|
|
141
|
+
* resolution (640 for yolo26). Reduced-input builds (320 / 256) are a big,
|
|
142
|
+
* cheap latency lever — especially on Apple ANE and the Intel N100 — at a
|
|
143
|
+
* small-object accuracy cost. Mirrors the model's `inputSize` but lifted onto
|
|
144
|
+
* the group so the selector can offer it as a variant axis.
|
|
145
|
+
*/
|
|
146
|
+
resolution: zod.z.number().int().positive().optional()
|
|
139
147
|
});
|
|
140
148
|
var ModelCatalogEntrySchema = zod.z.object({
|
|
141
149
|
id: zod.z.string(),
|
|
@@ -310,15 +318,17 @@ function buildModelVariantGroups(models) {
|
|
|
310
318
|
modelId: e.id,
|
|
311
319
|
precision,
|
|
312
320
|
optimization,
|
|
321
|
+
resolution: e.group?.resolution,
|
|
313
322
|
label: variantLabel(precision, optimization),
|
|
314
323
|
formats: entryFormats(e),
|
|
315
324
|
sizeMB: smallestSizeMB(e)
|
|
316
325
|
};
|
|
317
326
|
}).toSorted((a, b) => {
|
|
327
|
+
if (a.resolution !== b.resolution) return (b.resolution ?? Infinity) - (a.resolution ?? Infinity);
|
|
318
328
|
if (a.optimization !== b.optimization) return a.optimization === "fast" ? 1 : -1;
|
|
319
329
|
return PRECISION_ORDER.indexOf(a.precision) - PRECISION_ORDER.indexOf(b.precision);
|
|
320
330
|
});
|
|
321
|
-
const base = options.find((o) => o.precision === "fp32" && o.optimization === "standard") ?? options[0];
|
|
331
|
+
const base = options.find((o) => o.precision === "fp32" && o.optimization === "standard" && o.resolution === void 0) ?? options[0];
|
|
322
332
|
if (base === void 0) continue;
|
|
323
333
|
const baseEntry = entries.find((e) => e.id === base.modelId);
|
|
324
334
|
tierList.push({
|
|
@@ -358,6 +368,7 @@ function resolveVariantModelId(models, selection) {
|
|
|
358
368
|
if (m.group.family !== selection.family || m.group.tier !== selection.tier) continue;
|
|
359
369
|
if ((m.group.precision ?? "fp32") !== precision) continue;
|
|
360
370
|
if ((m.group.optimization ?? "standard") !== optimization) continue;
|
|
371
|
+
if (m.group.resolution !== selection.resolution) continue;
|
|
361
372
|
return m.id;
|
|
362
373
|
}
|
|
363
374
|
return null;
|
|
@@ -370,7 +381,8 @@ function describeModelVariant(models, modelId) {
|
|
|
370
381
|
family: entry.group.family,
|
|
371
382
|
tier: entry.group.tier,
|
|
372
383
|
precision: entry.group.precision ?? "fp32",
|
|
373
|
-
optimization: entry.group.optimization ?? "standard"
|
|
384
|
+
optimization: entry.group.optimization ?? "standard",
|
|
385
|
+
resolution: entry.group.resolution
|
|
374
386
|
};
|
|
375
387
|
}
|
|
376
388
|
//#endregion
|
|
@@ -1796,7 +1808,7 @@ async function runInferenceStep(fn, timeoutMs) {
|
|
|
1796
1808
|
const t0 = performance.now();
|
|
1797
1809
|
try {
|
|
1798
1810
|
return {
|
|
1799
|
-
output: timeoutMs !== void 0 ? await withTimeout(fn(), timeoutMs) : await fn(),
|
|
1811
|
+
output: timeoutMs !== void 0 ? await withTimeout$1(fn(), timeoutMs) : await fn(),
|
|
1800
1812
|
durationMs: roundMs(performance.now() - t0),
|
|
1801
1813
|
ok: true
|
|
1802
1814
|
};
|
|
@@ -1814,7 +1826,7 @@ function roundMs(ms) {
|
|
|
1814
1826
|
return Math.round(ms * 100) / 100;
|
|
1815
1827
|
}
|
|
1816
1828
|
/** Reject a promise if it exceeds the given timeout */
|
|
1817
|
-
function withTimeout(promise, ms) {
|
|
1829
|
+
function withTimeout$1(promise, ms) {
|
|
1818
1830
|
return new Promise((resolve, reject) => {
|
|
1819
1831
|
const timer = setTimeout(() => reject(/* @__PURE__ */ new Error(`Inference timeout after ${ms}ms`)), ms);
|
|
1820
1832
|
promise.then((v) => {
|
|
@@ -3776,6 +3788,111 @@ function createRuntimeStateBridge(params) {
|
|
|
3776
3788
|
};
|
|
3777
3789
|
}
|
|
3778
3790
|
//#endregion
|
|
3791
|
+
//#region src/device/reachability-poll.ts
|
|
3792
|
+
/**
|
|
3793
|
+
* Shared control-plane reachability poller for camera devices.
|
|
3794
|
+
*
|
|
3795
|
+
* `device.online` must reflect CONTROL-PLANE REACHABILITY — "can we talk to
|
|
3796
|
+
* the camera's management API right now" — NOT whether video happens to be
|
|
3797
|
+
* flowing through the stream broker. A camera that dials on-demand (no
|
|
3798
|
+
* consumer attached) is fully reachable yet has no active stream; driving
|
|
3799
|
+
* `online` from stream health falsely marks it OFFLINE.
|
|
3800
|
+
*
|
|
3801
|
+
* Every camera provider owns a cheap control-plane round-trip (Hikvision
|
|
3802
|
+
* ISAPI `getDeviceInfo`, Amcrest Dahua CGI `getDeviceInfo`, ONVIF
|
|
3803
|
+
* `getDeviceInformation`, RTSP `OPTIONS`/TCP-connect). Each provider passes
|
|
3804
|
+
* that round-trip as a `probe: () => Promise<boolean>` and this helper runs
|
|
3805
|
+
* the loop, applies hysteresis, and drives the device's `online` setter.
|
|
3806
|
+
*
|
|
3807
|
+
* Hysteresis rules (avoid flapping on a single dropped packet):
|
|
3808
|
+
* - mark ONLINE immediately on the first successful probe;
|
|
3809
|
+
* - mark OFFLINE only after {@link REACHABILITY_FAILURES_TO_OFFLINE}
|
|
3810
|
+
* CONSECUTIVE failures.
|
|
3811
|
+
*
|
|
3812
|
+
* Robustness rules:
|
|
3813
|
+
* - each probe is bounded by {@link REACHABILITY_PROBE_TIMEOUT_MS} so a hung
|
|
3814
|
+
* control channel can't wedge the loop;
|
|
3815
|
+
* - a single in-flight probe at a time — a slow probe never stacks up;
|
|
3816
|
+
* - the loop never throws (a rejected/thrown probe counts as a failure);
|
|
3817
|
+
* - `isEnabled()` gates each tick so a soft-disabled device isn't polled.
|
|
3818
|
+
*/
|
|
3819
|
+
/** Poll cadence — probe every camera's control plane on this interval. */
|
|
3820
|
+
var REACHABILITY_POLL_INTERVAL_MS = 3e4;
|
|
3821
|
+
/**
|
|
3822
|
+
* Consecutive failures required before flipping `online` to `false`.
|
|
3823
|
+
* ONLINE is asserted on the first success; OFFLINE waits for N misses so a
|
|
3824
|
+
* single transient timeout doesn't flap the flag.
|
|
3825
|
+
*/
|
|
3826
|
+
var REACHABILITY_FAILURES_TO_OFFLINE = 3;
|
|
3827
|
+
/** Per-probe timeout — an unreachable/hung control channel resolves as a miss. */
|
|
3828
|
+
var REACHABILITY_PROBE_TIMEOUT_MS = 1e4;
|
|
3829
|
+
/** Reject after `ms`; always clears its own timer. */
|
|
3830
|
+
async function withTimeout(promise, ms, label) {
|
|
3831
|
+
let timer;
|
|
3832
|
+
const timeout = new Promise((_resolve, reject) => {
|
|
3833
|
+
timer = setTimeout(() => reject(/* @__PURE__ */ new Error(`${label} timed out after ${String(ms)}ms`)), ms);
|
|
3834
|
+
});
|
|
3835
|
+
try {
|
|
3836
|
+
return await Promise.race([promise, timeout]);
|
|
3837
|
+
} finally {
|
|
3838
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
3839
|
+
}
|
|
3840
|
+
}
|
|
3841
|
+
/**
|
|
3842
|
+
* Start the reachability poll loop. Returns a handle whose `stop()` clears the
|
|
3843
|
+
* timer and prevents any further ticks. Start on device activation, stop on
|
|
3844
|
+
* device teardown (`removeDevice`) so no timer leaks.
|
|
3845
|
+
*/
|
|
3846
|
+
function startReachabilityPoll(options) {
|
|
3847
|
+
const intervalMs = options.intervalMs ?? 3e4;
|
|
3848
|
+
const failuresToOffline = options.failuresToOffline ?? 3;
|
|
3849
|
+
const probeTimeoutMs = options.probeTimeoutMs ?? 1e4;
|
|
3850
|
+
const runImmediately = options.runImmediately ?? true;
|
|
3851
|
+
let stopped = false;
|
|
3852
|
+
let running = false;
|
|
3853
|
+
let consecutiveFailures = 0;
|
|
3854
|
+
let timer;
|
|
3855
|
+
const tick = async () => {
|
|
3856
|
+
if (stopped) return;
|
|
3857
|
+
if (running) return;
|
|
3858
|
+
if (options.isEnabled && !options.isEnabled()) return;
|
|
3859
|
+
running = true;
|
|
3860
|
+
try {
|
|
3861
|
+
const reachable = await withTimeout(Promise.resolve().then(options.probe), probeTimeoutMs, "reachability probe");
|
|
3862
|
+
if (stopped) return;
|
|
3863
|
+
if (reachable) {
|
|
3864
|
+
consecutiveFailures = 0;
|
|
3865
|
+
options.setOnline(true);
|
|
3866
|
+
} else registerFailure("probe resolved unreachable");
|
|
3867
|
+
} catch (error) {
|
|
3868
|
+
if (stopped) return;
|
|
3869
|
+
registerFailure(error instanceof Error ? error.message : "probe threw");
|
|
3870
|
+
} finally {
|
|
3871
|
+
running = false;
|
|
3872
|
+
}
|
|
3873
|
+
};
|
|
3874
|
+
const registerFailure = (reason) => {
|
|
3875
|
+
consecutiveFailures += 1;
|
|
3876
|
+
options.logger?.debug("reachability probe failed", {
|
|
3877
|
+
reason,
|
|
3878
|
+
consecutiveFailures,
|
|
3879
|
+
failuresToOffline
|
|
3880
|
+
});
|
|
3881
|
+
if (consecutiveFailures >= failuresToOffline) options.setOnline(false);
|
|
3882
|
+
};
|
|
3883
|
+
timer = setInterval(() => {
|
|
3884
|
+
tick();
|
|
3885
|
+
}, intervalMs);
|
|
3886
|
+
if (typeof timer === "object" && timer !== null && "unref" in timer) timer.unref();
|
|
3887
|
+
if (runImmediately) tick();
|
|
3888
|
+
return { stop: () => {
|
|
3889
|
+
if (stopped) return;
|
|
3890
|
+
stopped = true;
|
|
3891
|
+
if (timer !== void 0) clearInterval(timer);
|
|
3892
|
+
timer = void 0;
|
|
3893
|
+
} };
|
|
3894
|
+
}
|
|
3895
|
+
//#endregion
|
|
3779
3896
|
//#region src/notification/format-transcode.ts
|
|
3780
3897
|
/** Strip a small, safe subset of Markdown down to plain text. */
|
|
3781
3898
|
function markdownToText(md) {
|
|
@@ -7657,6 +7774,28 @@ var pipelineExecutorCapability = {
|
|
|
7657
7774
|
kind: "mutation",
|
|
7658
7775
|
auth: "admin"
|
|
7659
7776
|
}),
|
|
7777
|
+
/**
|
|
7778
|
+
* Reset ONE node's detection-pipeline to its factory defaults, forcing
|
|
7779
|
+
* regeneration of the (now hardware-aware) default object-detection
|
|
7780
|
+
* model. `nodeId` is the ROUTING key — the generated cap-router strips
|
|
7781
|
+
* it (default `nodeIdMode: 'routing'`, same as `getSelectedEngine` /
|
|
7782
|
+
* `getDefaultSteps`) and dispatches to that node, so the provider method
|
|
7783
|
+
* runs ON the target node and receives no `nodeId`.
|
|
7784
|
+
*
|
|
7785
|
+
* Clears the node's persisted global pipeline seed (`pipelineSteps`) +
|
|
7786
|
+
* legacy engine blob (`pipelineEngine`) and every device's per-camera
|
|
7787
|
+
* step overrides, then re-seeds the hardware-aware default tree. Returns
|
|
7788
|
+
* the regenerated object-detection model id (null when the default tree
|
|
7789
|
+
* has no detector for this node's engine format) so the caller can
|
|
7790
|
+
* verify the reset without a second round-trip.
|
|
7791
|
+
*/
|
|
7792
|
+
resetToDefault: require_sleep.method(zod.z.object({ nodeId: zod.z.string() }), zod.z.object({
|
|
7793
|
+
success: zod.z.literal(true),
|
|
7794
|
+
regeneratedModelId: zod.z.string().nullable()
|
|
7795
|
+
}), {
|
|
7796
|
+
kind: "mutation",
|
|
7797
|
+
auth: "admin"
|
|
7798
|
+
}),
|
|
7660
7799
|
getSchema: require_sleep.method(zod.z.void(), PipelineSchemaSchema),
|
|
7661
7800
|
getGlobalSteps: require_sleep.method(zod.z.void(), zod.z.array(PipelineDefaultStepSchema).readonly().nullable()),
|
|
7662
7801
|
getGlobalPipelineConfig: require_sleep.method(zod.z.void(), PipelineConfigBridge),
|
|
@@ -12426,6 +12565,7 @@ function createSystemProxy(api) {
|
|
|
12426
12565
|
getEngineProvisioning: (input) => dispatch("pipelineExecutor", "getEngineProvisioning", "query", input),
|
|
12427
12566
|
getVideoPipelineSteps: (input) => dispatch("pipelineExecutor", "getVideoPipelineSteps", "query", input),
|
|
12428
12567
|
setVideoPipelineSteps: (input) => dispatch("pipelineExecutor", "setVideoPipelineSteps", "mutation", input),
|
|
12568
|
+
resetToDefault: (input) => dispatch("pipelineExecutor", "resetToDefault", "mutation", input),
|
|
12429
12569
|
getSchema: (input) => dispatch("pipelineExecutor", "getSchema", "query", input),
|
|
12430
12570
|
getGlobalSteps: (input) => dispatch("pipelineExecutor", "getGlobalSteps", "query", input),
|
|
12431
12571
|
getGlobalPipelineConfig: (input) => dispatch("pipelineExecutor", "getGlobalPipelineConfig", "query", input),
|
|
@@ -26122,6 +26262,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
26122
26262
|
addonId: null,
|
|
26123
26263
|
access: "create"
|
|
26124
26264
|
},
|
|
26265
|
+
"pipelineExecutor.resetToDefault": {
|
|
26266
|
+
capName: "pipeline-executor",
|
|
26267
|
+
capScope: "system",
|
|
26268
|
+
addonId: null,
|
|
26269
|
+
access: "delete"
|
|
26270
|
+
},
|
|
26125
26271
|
"pipelineExecutor.runAudioTest": {
|
|
26126
26272
|
capName: "pipeline-executor",
|
|
26127
26273
|
capScope: "system",
|
|
@@ -28874,6 +29020,9 @@ exports.PtzPositionSchema = PtzPositionSchema;
|
|
|
28874
29020
|
exports.PtzPresetSchema = PtzPresetSchema;
|
|
28875
29021
|
exports.PtzStatusSchema = PtzStatusSchema;
|
|
28876
29022
|
exports.QueryFilterSchema = QueryFilterSchema;
|
|
29023
|
+
exports.REACHABILITY_FAILURES_TO_OFFLINE = REACHABILITY_FAILURES_TO_OFFLINE;
|
|
29024
|
+
exports.REACHABILITY_POLL_INTERVAL_MS = REACHABILITY_POLL_INTERVAL_MS;
|
|
29025
|
+
exports.REACHABILITY_PROBE_TIMEOUT_MS = REACHABILITY_PROBE_TIMEOUT_MS;
|
|
28877
29026
|
exports.RECOGNITION_TYPES = RECOGNITION_TYPES;
|
|
28878
29027
|
exports.RESERVED_BINDING_NAMES = RESERVED_BINDING_NAMES;
|
|
28879
29028
|
exports.RUNTIME_DEFAULTS = RUNTIME_DEFAULTS;
|
|
@@ -29254,6 +29403,7 @@ exports.smokeCapability = smokeCapability;
|
|
|
29254
29403
|
exports.smtpProviderCapability = smtpProviderCapability;
|
|
29255
29404
|
exports.snapshotCapability = snapshotCapability;
|
|
29256
29405
|
exports.ssoBridgeCapability = ssoBridgeCapability;
|
|
29406
|
+
exports.startReachabilityPoll = startReachabilityPoll;
|
|
29257
29407
|
exports.storageCapability = storageCapability;
|
|
29258
29408
|
exports.storageEvictableCapability = storageEvictableCapability;
|
|
29259
29409
|
exports.storageProviderCapability = storageProviderCapability;
|
package/dist/index.mjs
CHANGED
|
@@ -131,10 +131,18 @@ var ModelVariantGroupSchema = z.object({
|
|
|
131
131
|
precision: z.enum(["fp32", "int8"]).optional(),
|
|
132
132
|
/**
|
|
133
133
|
* Speed-optimization axis. Omit ⇒ the standard build. `fast` marks a
|
|
134
|
-
* latency-optimized export (e.g. ReLU-activation
|
|
135
|
-
*
|
|
134
|
+
* latency-optimized export (e.g. ReLU-activation variant) — the slot the
|
|
135
|
+
* future performance variants plug into.
|
|
136
136
|
*/
|
|
137
|
-
optimization: z.enum(["standard", "fast"]).optional()
|
|
137
|
+
optimization: z.enum(["standard", "fast"]).optional(),
|
|
138
|
+
/**
|
|
139
|
+
* Input-resolution axis (square input side, px). Omit ⇒ the family's native
|
|
140
|
+
* resolution (640 for yolo26). Reduced-input builds (320 / 256) are a big,
|
|
141
|
+
* cheap latency lever — especially on Apple ANE and the Intel N100 — at a
|
|
142
|
+
* small-object accuracy cost. Mirrors the model's `inputSize` but lifted onto
|
|
143
|
+
* the group so the selector can offer it as a variant axis.
|
|
144
|
+
*/
|
|
145
|
+
resolution: z.number().int().positive().optional()
|
|
138
146
|
});
|
|
139
147
|
var ModelCatalogEntrySchema = z.object({
|
|
140
148
|
id: z.string(),
|
|
@@ -309,15 +317,17 @@ function buildModelVariantGroups(models) {
|
|
|
309
317
|
modelId: e.id,
|
|
310
318
|
precision,
|
|
311
319
|
optimization,
|
|
320
|
+
resolution: e.group?.resolution,
|
|
312
321
|
label: variantLabel(precision, optimization),
|
|
313
322
|
formats: entryFormats(e),
|
|
314
323
|
sizeMB: smallestSizeMB(e)
|
|
315
324
|
};
|
|
316
325
|
}).toSorted((a, b) => {
|
|
326
|
+
if (a.resolution !== b.resolution) return (b.resolution ?? Infinity) - (a.resolution ?? Infinity);
|
|
317
327
|
if (a.optimization !== b.optimization) return a.optimization === "fast" ? 1 : -1;
|
|
318
328
|
return PRECISION_ORDER.indexOf(a.precision) - PRECISION_ORDER.indexOf(b.precision);
|
|
319
329
|
});
|
|
320
|
-
const base = options.find((o) => o.precision === "fp32" && o.optimization === "standard") ?? options[0];
|
|
330
|
+
const base = options.find((o) => o.precision === "fp32" && o.optimization === "standard" && o.resolution === void 0) ?? options[0];
|
|
321
331
|
if (base === void 0) continue;
|
|
322
332
|
const baseEntry = entries.find((e) => e.id === base.modelId);
|
|
323
333
|
tierList.push({
|
|
@@ -357,6 +367,7 @@ function resolveVariantModelId(models, selection) {
|
|
|
357
367
|
if (m.group.family !== selection.family || m.group.tier !== selection.tier) continue;
|
|
358
368
|
if ((m.group.precision ?? "fp32") !== precision) continue;
|
|
359
369
|
if ((m.group.optimization ?? "standard") !== optimization) continue;
|
|
370
|
+
if (m.group.resolution !== selection.resolution) continue;
|
|
360
371
|
return m.id;
|
|
361
372
|
}
|
|
362
373
|
return null;
|
|
@@ -369,7 +380,8 @@ function describeModelVariant(models, modelId) {
|
|
|
369
380
|
family: entry.group.family,
|
|
370
381
|
tier: entry.group.tier,
|
|
371
382
|
precision: entry.group.precision ?? "fp32",
|
|
372
|
-
optimization: entry.group.optimization ?? "standard"
|
|
383
|
+
optimization: entry.group.optimization ?? "standard",
|
|
384
|
+
resolution: entry.group.resolution
|
|
373
385
|
};
|
|
374
386
|
}
|
|
375
387
|
//#endregion
|
|
@@ -1795,7 +1807,7 @@ async function runInferenceStep(fn, timeoutMs) {
|
|
|
1795
1807
|
const t0 = performance.now();
|
|
1796
1808
|
try {
|
|
1797
1809
|
return {
|
|
1798
|
-
output: timeoutMs !== void 0 ? await withTimeout(fn(), timeoutMs) : await fn(),
|
|
1810
|
+
output: timeoutMs !== void 0 ? await withTimeout$1(fn(), timeoutMs) : await fn(),
|
|
1799
1811
|
durationMs: roundMs(performance.now() - t0),
|
|
1800
1812
|
ok: true
|
|
1801
1813
|
};
|
|
@@ -1813,7 +1825,7 @@ function roundMs(ms) {
|
|
|
1813
1825
|
return Math.round(ms * 100) / 100;
|
|
1814
1826
|
}
|
|
1815
1827
|
/** Reject a promise if it exceeds the given timeout */
|
|
1816
|
-
function withTimeout(promise, ms) {
|
|
1828
|
+
function withTimeout$1(promise, ms) {
|
|
1817
1829
|
return new Promise((resolve, reject) => {
|
|
1818
1830
|
const timer = setTimeout(() => reject(/* @__PURE__ */ new Error(`Inference timeout after ${ms}ms`)), ms);
|
|
1819
1831
|
promise.then((v) => {
|
|
@@ -3775,6 +3787,111 @@ function createRuntimeStateBridge(params) {
|
|
|
3775
3787
|
};
|
|
3776
3788
|
}
|
|
3777
3789
|
//#endregion
|
|
3790
|
+
//#region src/device/reachability-poll.ts
|
|
3791
|
+
/**
|
|
3792
|
+
* Shared control-plane reachability poller for camera devices.
|
|
3793
|
+
*
|
|
3794
|
+
* `device.online` must reflect CONTROL-PLANE REACHABILITY — "can we talk to
|
|
3795
|
+
* the camera's management API right now" — NOT whether video happens to be
|
|
3796
|
+
* flowing through the stream broker. A camera that dials on-demand (no
|
|
3797
|
+
* consumer attached) is fully reachable yet has no active stream; driving
|
|
3798
|
+
* `online` from stream health falsely marks it OFFLINE.
|
|
3799
|
+
*
|
|
3800
|
+
* Every camera provider owns a cheap control-plane round-trip (Hikvision
|
|
3801
|
+
* ISAPI `getDeviceInfo`, Amcrest Dahua CGI `getDeviceInfo`, ONVIF
|
|
3802
|
+
* `getDeviceInformation`, RTSP `OPTIONS`/TCP-connect). Each provider passes
|
|
3803
|
+
* that round-trip as a `probe: () => Promise<boolean>` and this helper runs
|
|
3804
|
+
* the loop, applies hysteresis, and drives the device's `online` setter.
|
|
3805
|
+
*
|
|
3806
|
+
* Hysteresis rules (avoid flapping on a single dropped packet):
|
|
3807
|
+
* - mark ONLINE immediately on the first successful probe;
|
|
3808
|
+
* - mark OFFLINE only after {@link REACHABILITY_FAILURES_TO_OFFLINE}
|
|
3809
|
+
* CONSECUTIVE failures.
|
|
3810
|
+
*
|
|
3811
|
+
* Robustness rules:
|
|
3812
|
+
* - each probe is bounded by {@link REACHABILITY_PROBE_TIMEOUT_MS} so a hung
|
|
3813
|
+
* control channel can't wedge the loop;
|
|
3814
|
+
* - a single in-flight probe at a time — a slow probe never stacks up;
|
|
3815
|
+
* - the loop never throws (a rejected/thrown probe counts as a failure);
|
|
3816
|
+
* - `isEnabled()` gates each tick so a soft-disabled device isn't polled.
|
|
3817
|
+
*/
|
|
3818
|
+
/** Poll cadence — probe every camera's control plane on this interval. */
|
|
3819
|
+
var REACHABILITY_POLL_INTERVAL_MS = 3e4;
|
|
3820
|
+
/**
|
|
3821
|
+
* Consecutive failures required before flipping `online` to `false`.
|
|
3822
|
+
* ONLINE is asserted on the first success; OFFLINE waits for N misses so a
|
|
3823
|
+
* single transient timeout doesn't flap the flag.
|
|
3824
|
+
*/
|
|
3825
|
+
var REACHABILITY_FAILURES_TO_OFFLINE = 3;
|
|
3826
|
+
/** Per-probe timeout — an unreachable/hung control channel resolves as a miss. */
|
|
3827
|
+
var REACHABILITY_PROBE_TIMEOUT_MS = 1e4;
|
|
3828
|
+
/** Reject after `ms`; always clears its own timer. */
|
|
3829
|
+
async function withTimeout(promise, ms, label) {
|
|
3830
|
+
let timer;
|
|
3831
|
+
const timeout = new Promise((_resolve, reject) => {
|
|
3832
|
+
timer = setTimeout(() => reject(/* @__PURE__ */ new Error(`${label} timed out after ${String(ms)}ms`)), ms);
|
|
3833
|
+
});
|
|
3834
|
+
try {
|
|
3835
|
+
return await Promise.race([promise, timeout]);
|
|
3836
|
+
} finally {
|
|
3837
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
3838
|
+
}
|
|
3839
|
+
}
|
|
3840
|
+
/**
|
|
3841
|
+
* Start the reachability poll loop. Returns a handle whose `stop()` clears the
|
|
3842
|
+
* timer and prevents any further ticks. Start on device activation, stop on
|
|
3843
|
+
* device teardown (`removeDevice`) so no timer leaks.
|
|
3844
|
+
*/
|
|
3845
|
+
function startReachabilityPoll(options) {
|
|
3846
|
+
const intervalMs = options.intervalMs ?? 3e4;
|
|
3847
|
+
const failuresToOffline = options.failuresToOffline ?? 3;
|
|
3848
|
+
const probeTimeoutMs = options.probeTimeoutMs ?? 1e4;
|
|
3849
|
+
const runImmediately = options.runImmediately ?? true;
|
|
3850
|
+
let stopped = false;
|
|
3851
|
+
let running = false;
|
|
3852
|
+
let consecutiveFailures = 0;
|
|
3853
|
+
let timer;
|
|
3854
|
+
const tick = async () => {
|
|
3855
|
+
if (stopped) return;
|
|
3856
|
+
if (running) return;
|
|
3857
|
+
if (options.isEnabled && !options.isEnabled()) return;
|
|
3858
|
+
running = true;
|
|
3859
|
+
try {
|
|
3860
|
+
const reachable = await withTimeout(Promise.resolve().then(options.probe), probeTimeoutMs, "reachability probe");
|
|
3861
|
+
if (stopped) return;
|
|
3862
|
+
if (reachable) {
|
|
3863
|
+
consecutiveFailures = 0;
|
|
3864
|
+
options.setOnline(true);
|
|
3865
|
+
} else registerFailure("probe resolved unreachable");
|
|
3866
|
+
} catch (error) {
|
|
3867
|
+
if (stopped) return;
|
|
3868
|
+
registerFailure(error instanceof Error ? error.message : "probe threw");
|
|
3869
|
+
} finally {
|
|
3870
|
+
running = false;
|
|
3871
|
+
}
|
|
3872
|
+
};
|
|
3873
|
+
const registerFailure = (reason) => {
|
|
3874
|
+
consecutiveFailures += 1;
|
|
3875
|
+
options.logger?.debug("reachability probe failed", {
|
|
3876
|
+
reason,
|
|
3877
|
+
consecutiveFailures,
|
|
3878
|
+
failuresToOffline
|
|
3879
|
+
});
|
|
3880
|
+
if (consecutiveFailures >= failuresToOffline) options.setOnline(false);
|
|
3881
|
+
};
|
|
3882
|
+
timer = setInterval(() => {
|
|
3883
|
+
tick();
|
|
3884
|
+
}, intervalMs);
|
|
3885
|
+
if (typeof timer === "object" && timer !== null && "unref" in timer) timer.unref();
|
|
3886
|
+
if (runImmediately) tick();
|
|
3887
|
+
return { stop: () => {
|
|
3888
|
+
if (stopped) return;
|
|
3889
|
+
stopped = true;
|
|
3890
|
+
if (timer !== void 0) clearInterval(timer);
|
|
3891
|
+
timer = void 0;
|
|
3892
|
+
} };
|
|
3893
|
+
}
|
|
3894
|
+
//#endregion
|
|
3778
3895
|
//#region src/notification/format-transcode.ts
|
|
3779
3896
|
/** Strip a small, safe subset of Markdown down to plain text. */
|
|
3780
3897
|
function markdownToText(md) {
|
|
@@ -7656,6 +7773,28 @@ var pipelineExecutorCapability = {
|
|
|
7656
7773
|
kind: "mutation",
|
|
7657
7774
|
auth: "admin"
|
|
7658
7775
|
}),
|
|
7776
|
+
/**
|
|
7777
|
+
* Reset ONE node's detection-pipeline to its factory defaults, forcing
|
|
7778
|
+
* regeneration of the (now hardware-aware) default object-detection
|
|
7779
|
+
* model. `nodeId` is the ROUTING key — the generated cap-router strips
|
|
7780
|
+
* it (default `nodeIdMode: 'routing'`, same as `getSelectedEngine` /
|
|
7781
|
+
* `getDefaultSteps`) and dispatches to that node, so the provider method
|
|
7782
|
+
* runs ON the target node and receives no `nodeId`.
|
|
7783
|
+
*
|
|
7784
|
+
* Clears the node's persisted global pipeline seed (`pipelineSteps`) +
|
|
7785
|
+
* legacy engine blob (`pipelineEngine`) and every device's per-camera
|
|
7786
|
+
* step overrides, then re-seeds the hardware-aware default tree. Returns
|
|
7787
|
+
* the regenerated object-detection model id (null when the default tree
|
|
7788
|
+
* has no detector for this node's engine format) so the caller can
|
|
7789
|
+
* verify the reset without a second round-trip.
|
|
7790
|
+
*/
|
|
7791
|
+
resetToDefault: method(z.object({ nodeId: z.string() }), z.object({
|
|
7792
|
+
success: z.literal(true),
|
|
7793
|
+
regeneratedModelId: z.string().nullable()
|
|
7794
|
+
}), {
|
|
7795
|
+
kind: "mutation",
|
|
7796
|
+
auth: "admin"
|
|
7797
|
+
}),
|
|
7659
7798
|
getSchema: method(z.void(), PipelineSchemaSchema),
|
|
7660
7799
|
getGlobalSteps: method(z.void(), z.array(PipelineDefaultStepSchema).readonly().nullable()),
|
|
7661
7800
|
getGlobalPipelineConfig: method(z.void(), PipelineConfigBridge),
|
|
@@ -12425,6 +12564,7 @@ function createSystemProxy(api) {
|
|
|
12425
12564
|
getEngineProvisioning: (input) => dispatch("pipelineExecutor", "getEngineProvisioning", "query", input),
|
|
12426
12565
|
getVideoPipelineSteps: (input) => dispatch("pipelineExecutor", "getVideoPipelineSteps", "query", input),
|
|
12427
12566
|
setVideoPipelineSteps: (input) => dispatch("pipelineExecutor", "setVideoPipelineSteps", "mutation", input),
|
|
12567
|
+
resetToDefault: (input) => dispatch("pipelineExecutor", "resetToDefault", "mutation", input),
|
|
12428
12568
|
getSchema: (input) => dispatch("pipelineExecutor", "getSchema", "query", input),
|
|
12429
12569
|
getGlobalSteps: (input) => dispatch("pipelineExecutor", "getGlobalSteps", "query", input),
|
|
12430
12570
|
getGlobalPipelineConfig: (input) => dispatch("pipelineExecutor", "getGlobalPipelineConfig", "query", input),
|
|
@@ -26121,6 +26261,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
26121
26261
|
addonId: null,
|
|
26122
26262
|
access: "create"
|
|
26123
26263
|
},
|
|
26264
|
+
"pipelineExecutor.resetToDefault": {
|
|
26265
|
+
capName: "pipeline-executor",
|
|
26266
|
+
capScope: "system",
|
|
26267
|
+
addonId: null,
|
|
26268
|
+
access: "delete"
|
|
26269
|
+
},
|
|
26124
26270
|
"pipelineExecutor.runAudioTest": {
|
|
26125
26271
|
capName: "pipeline-executor",
|
|
26126
26272
|
capScope: "system",
|
|
@@ -28488,4 +28634,4 @@ function scoreRuntimes(hw) {
|
|
|
28488
28634
|
};
|
|
28489
28635
|
}
|
|
28490
28636
|
//#endregion
|
|
28491
|
-
export { ACCESSORY_LABEL, ALL_CAPABILITY_DEFINITIONS, APPLE_SA_TO_MACRO, AUDIO_BACKEND_CHOICES, AUDIO_MACRO_LABELS, AccessoriesStatusSchema, AccessoryKind, AddBrokerInputSchema, AddonAutoUpdateSchema, AddonListItemSchema, AddonPageDeclarationSchema, AddonPageInfoSchema, AdoptInputSchema as AdoptionAdoptInputSchema, AdoptResultSchema as AdoptionAdoptResultSchema, AdoptionFilterSchema, GetCandidateInputSchema as AdoptionGetCandidateInputSchema, ListCandidatesInputSchema as AdoptionListCandidatesInputSchema, ListCandidatesOutputSchema as AdoptionListCandidatesOutputSchema, ReleaseInputSchema as AdoptionReleaseInputSchema, AdoptionStatusSchema, AgentLoadSummarySchema, AirQualitySensorStatusSchema, AlarmArmModeSchema, AlarmPanelStatusSchema, AlarmStateSchema, AlertSchema, AlertSeveritySchema, AlertSourceSchema, AlertStatusSchema, AmbientLightSensorStatusSchema, ApiKeyRecordSchema, ApiKeySummarySchema, ArchiveEntrySchema, ArchiveManifestSchema, AttachmentMediaTypeSchema, AttachmentSchema, AudioAnalysisResultSchema, AudioAnalysisSettingsSchema, AudioChunkInputSchema, AudioClassSummarySchema, AudioClassificationLabelSchema, AudioClassificationResultSchema, AudioCodecInfoSchema, AudioDecodeSessionConfigSchema, AudioEncodeSchema, AudioEncodeSessionConfigSchema, AudioEncodedChunkSchema, AudioEventSchema, AudioLevelSchema, AudioMetricsHistoryPointSchema, AudioMetricsHistorySchema, AudioMetricsSnapshotSchema, AudioPcmChunkSchema, AuthResultSchema, AutoUpdateSettingsSchema, AutomationControlStatusSchema, AvailableIntegrationTypeSchema, BACKEND_TO_FORMAT, BATTERY_DEVICE_PROFILE, BacklightModeSchema, BackupDestinationInfoSchema, BackupEntrySchema, BaseAddon, BaseDevice, BaseDeviceProvider, BatteryStatusSchema, BinaryStatusSchema, BoundingBoxSchema, BrightnessStatusSchema, AddInputSchema as BrokerAddInputSchema, BrokerAudioClientSchema, BrokerClientsSchema, BrokerConnectionDetailsSchema, BrokerConsumerAttributionSchema, BrokerConsumerKindSchema, BrokerDecodedClientSchema, BrokerEncodedClientSchema, GetStateInputSchema as BrokerGetStateInputSchema, BrokerInfoSchema, BrokerProviderInfoSchema, PublishInputSchema as BrokerPublishInputSchema, RegistryStatusSchema as BrokerRegistryStatusSchema, BrokerRtspClientSchema, BrokerStatsSchema, BrokerStatusEnum, BrokerStatusSchema, SubscribeInputSchema as BrokerSubscribeInputSchema, SubscribeResultSchema as BrokerSubscribeResultSchema, TestConnectionResultSchema as BrokerTestConnectionResultSchema, UnsubscribeInputSchema as BrokerUnsubscribeInputSchema, CAM_PROFILE_ORDER, CAPABILITY_NAMES, CAPABILITY_ROUTER_KEYS, CAP_NAMES_WITH_STATUS, CAP_NODE_PIN_CONTEXT_KEY, CAP_PROVIDER_KIND_MAP, COCO_80_LABELS, COCO_TO_MACRO, CamProfileSchema, CamStreamDescriptorSchema, CamStreamKindSchema, CamStreamResolutionSchema, CameraAssignmentStatusSchema, CameraAudioStatusSchema, CameraBrokerProfileSchema, CameraBrokerStatusSchema, CameraCredentialsSchema, CameraCredentialsStatusSchema, CameraDecoderShmSchema, CameraDecoderStatusSchema, CameraDetectionPhaseSchema, CameraDetectionProvisioningSchema, CameraDetectionProvisioningStateSchema, CameraDetectionStatusSchema, CameraMetricsSchema, CameraMetricsWithDeviceIdSchema, CameraMotionStatusSchema, CameraRecordingModeSchema, CameraRecordingStatusSchema, CameraSourceStatusSchema, CameraSourceStreamSchema, CameraStatusSchema, CameraStreamSchema, CandidateQueryFilterSchema, CapScopeSchema, CapabilityBindingsSchema, CarbonMonoxideStatusSchema, ChargingStatus, ClientNetworkStatsSchema, ClimateControlStatusSchema, ClipPlaybackSchema, ClipSchema, ClusterAddonNodeDeploymentSchema, ClusterAddonStatusEntrySchema, CollectionColumnSchema, CollectionIndexSchema, ColorStatusSchema, ConfigEntrySchema, ConfigSectionWithValuesSchema, ConfigTabDeclarationSchema, ConnectivityStatusSchema, ConsumableItemSchema, ConsumablesStatusSchema, ContactStatusSchema, ControlKindSchema, ControlStatusSchema, ConvertArtifactSchema, ConvertResultSchema, ConvertTargetSchema, CoverStateSchema, CoverStatusSchema, CreateApiKeyInputSchema, CreateApiKeyResultSchema, CreateIntegrationInputSchema, CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, CreateUserInputSchema, CustomActionInputSchema, CustomModelDescriptorSchema, DATAPLANE_SECRET_HEADER, DEFAULT_ADDON_PLACEMENT, DEFAULT_AUDIO_ANALYZER_CONFIG, DEFAULT_DECODER_HWACCEL_CONFIG, DEFAULT_FEATURES, DEFAULT_RETENTION, DEVICE_CAP_NAMES, DEVICE_PROFILES, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DEVICE_TYPE_INFO, DayNightModeSchema, DayNightOptionsSchema, DayNightSettingsPatchSchema, DayNightStatusSchema, DecodedAudioChunkSchema, DecodedFrameSchema, DecoderAssignmentSchema, DecoderSessionConfigSchema, DecoderStatsSchema, DeleteIntegrationResultSchema, DetectionSourceSchema, DetectorOutputSchema, DeviceCodeSeveritySchema, DeviceConfig, DeviceDiscoveryStatusSchema, ExposeInputSchema as DeviceExportExposeInputSchema, DeviceExportStatusSchema, UnexposeInputSchema as DeviceExportUnexposeInputSchema, DeviceFeature, DeviceInfoSchema, DeviceNetworkStatsSchema, DeviceRole, DeviceRuntimeState, DeviceStatusSchema, DeviceType, DiscoveredChildDeviceSchema, DiscoveredChildStatusSchema, DiscoveredDeviceSchema, DiscoveredTargetSchema, DisposerChain, DoorbellPressEventSchema, DoorbellStatusSchema, EVENT_PAD_MS, EXPRESSION_BUILTINS, EXPRESSION_BUILTIN_NAMES, EXPRESSION_COMPILE_CACHE_CAPACITY, EXPRESSION_IDENTIFIER_RE, EXPRESSION_INJECTED_NOW, ElementConfigStore, EmbeddingInfoSchema, EmbeddingResultSchema, EncodeProfileSchema, EncodedPacketSchema, EnrichedWidgetMetadataSchema, EnumSensorDateTimeFormatSchema, EnumSensorStatusSchema, EventCategory, EventEmitterStatusSchema, EventFireSchema, EventItemSchema, EventKindSchema, EventSourceType, ExportSetupFieldSchema, ExportSetupSchema, ExposedDeviceSchema, ExposureModeSchema, ExpressionEvalError, ExpressionParseError, FanControlStatusSchema, FanDirectionSchema, FeatureManifestSchema, FeatureProbeStatusSchema, FloodStatusSchema, FrameHandleFormatSchema, FrameHandleSchema, FrameInputSchema, GasStatusSchema, GetStreamWithCodecInputSchema, GlobalMetricsSchema, HF_BASE_URL, HF_REPO, HWACCEL_OPTIONS, HealthStatusSchema, HistoryPointSchema, HistoryResolutionEnum, HumidifierStatusSchema, HumiditySensorStatusSchema, HvacModeSchema, ImageRotateSchema, ImageSettingsOptionsSchema, ImageSettingsPatchSchema, ImageSettingsStatusSchema, ImageStatusSchema, IngestOwnerSchema, InstalledPackageSchema, IntegrationLiteSchema, IntegrationWithStateSchema, IntercomAbilitySchema, IntercomStatusSchema, KNOWN_CAP_NAMES, LabelDefinitionSchema, LawnMowerActivitySchema, LawnMowerControlStatusSchema, LocateSegmentResultSchema, LocationStatSchema, LockControlStatusSchema, LockStateSchema, LogEntrySchema, LogLevelSchema, LogStreamEntrySchema, MACRO_LABELS, MAX_EXPRESSION_AST_NODES, MAX_EXPRESSION_BINDINGS, MAX_EXPRESSION_CALL_ARGS, MAX_EXPRESSION_EVAL_STEPS, MAX_EXPRESSION_SOURCE_LENGTH, METHOD_ACCESS_MAP, MODEL_FORMATS, MaskGridDimsSchema, MaskGridShapeSchema, MaskLineShapeSchema, MaskPointSchema, MaskPolygonShapeSchema, MaskPolygonVerticesSchema, MaskRectShapeSchema, MaskShapeKindSchema, MaskShapeSchema, MediaFileSchema, MediaPlayerRepeatSchema, MediaPlayerStateSchema, MediaPlayerStatusSchema, MeshPeerSchema, MeshStatusSchema, MethodAccessSchema, ModelCatalogEntrySchema, ModelConvertInputSchema, ModelConvertMetadataSchema, ModelDistributeInputSchema, ModelDistributeResultSchema, ModelExtraFileSchema, ModelFormatEntrySchema, ModelFormatsSchema, ModelSubstitutionSchema, ModelVariantGroupSchema, MotionAnalysisResultSchema, MotionEventSchema, MotionOnMotionChangedDataSchema, MotionRegionSchema, MotionSourceEnum, MotionSourcesSchema, MotionStatusSchema, MotionTriggerRuntimeStateSchema, MotionTriggerStatusSchema, MotionZoneOptionsSchema, MotionZonePatchSchema, MotionZoneRegionSchema, MotionZoneStatusSchema, StatusSchema as MqttBrokerStatusSchema, NativeDetectionSchema, NativeObjectClassEnum, NativeObjectDetectionRuntimeStateSchema, NativeObjectDetectionStatusSchema, NetworkAccessStatusSchema, NetworkAddressSchema, NetworkEndpointSchema, NotificationActionSchema, NotificationFormatSchema, NotificationHistoryEntrySchema, NotificationRuleSchema, NotificationSchema, NotifierStatusSchema, NumericSensorStatusSchema, OauthIntegrationDescriptorSchema, ObjectEventSchema, OrchestratorMetricsSchema, OsdOverlayKindEnum, OsdOverlayPatchSchema, OsdOverlaySchema, OsdPositionEnum, OsdStatusSchema, PET_FEEDER_MANUAL_FEED_MAX, PET_FEEDER_MANUAL_FEED_MIN, PIPELINE_FLOW_CAPABILITY_NAMES, PIPELINE_OWNER_CAPABILITY_NAMES, PROVIDER_KIND_CAP_NAMES, PYTHON_SCRIPT, PackageUpdateSchema, PackageVersionInfoSchema, PasskeySummarySchema, PcmSampleFormatSchema, PerScopeBreakdownSchema, PetFeederStatusSchema, PickStreamPreferencesSchema, PickStreamRequirementsSchema, PickedCamStreamSchema, PipelineAssignmentSchema, PipelineDefaultStepSchema, PipelineEngineChoiceSchema, PipelineRunResultBridge, PipelineStepInputSchema, PipelineValidationIssueSchema, PipelineValidationResultSchema, PlaceholderReasonSchema, PolygonPointSchema, PowerMeterStatusSchema, PresenceStatusSchema, PressureSensorStatusSchema, PrivacyMaskOptionsSchema, PrivacyMaskPatchSchema, PrivacyMaskRegionSchema, PrivacyMaskShapeSchema, PrivacyMaskStatusSchema, ProfileRtspEntrySchema, ProfileSlotSchema, ProfileSlotStatusSchema, ProviderStatusSchema, PtzAutotrackRuntimeStateSchema, PtzAutotrackSettingsSchema, PtzAutotrackStatusSchema, PtzAutotrackTargetOptionSchema, PtzMoveCommandSchema, PtzPositionSchema, PtzPresetSchema, PtzStatusSchema, QueryFilterSchema, RECOGNITION_TYPES, RESERVED_BINDING_NAMES, RUNTIME_DEFAULTS, RUNTIME_TO_FORMAT, RawStateResultSchema, ReadSegmentBytesResultSchema, ReadinessRegistry, ReadinessTimeoutError, RecordingAvailabilitySchema, RecordingBandModeSchema, RecordingBandSchema, RecordingBandTriggersSchema, RecordingConfigSchema, RecordingDaysSchema, RecordingDeviceUsageSchema, RecordingLocationUsageSchema, RecordingManifestSchema, RecordingModeSchema, RecordingRangeSchema, RecordingRetentionSchema, RecordingRuleSchema, RecordingScheduleSchema, RecordingStatusSchema, RecordingStorageModeSchema, RecordingStorageUsageSchema, RecordingTriggersSchema, RecordingWeekdaySchema, RenderedAsSchema, ReportMotionInputSchema, RingBuffer, RtpSourceSchema, RtspRestreamEntrySchema, RunnerCameraConfigSchema, RunnerCameraDeviceUIFields, RunnerFrameSourceSchema, RunnerLocalLoadSchema, RunnerLocalMetricsSchema, SCOPE_PRESETS, SOURCE_INFO_METADATA_KEY, STREAM_PROFILE_META, STREAM_QUALITY_LABELS, SUB_DETECTION_TYPES, SYSTEM_CAP_NAMES, ScopedTokenSchema, ScopedTokenSummarySchema, ScoredObjectEventSchema, ScriptRunnerStatusSchema, SearchResultSchema, SendEmailInputSchema, SendEmailResultSchema, SendResultSchema, SettingsPatchSchema, SettingsRecordSchema, SettingsSchemaWithValuesSchema, SettingsUpdateResultSchema, ShmRingStatsSchema, SmokeStatusSchema, SmtpStatusSchema, SnapshotImageSchema, SourceInfoSchema, SpatialDetectionSchema, SsoBridgeClaimsSchema, StartEmbeddedInputSchema, AbortUploadInputSchema as StorageAbortUploadInputSchema, BeginDownloadInputSchema as StorageBeginDownloadInputSchema, BeginDownloadResultSchema as StorageBeginDownloadResultSchema, BeginUploadInputSchema as StorageBeginUploadInputSchema, BeginUploadResultSchema as StorageBeginUploadResultSchema, EndDownloadInputSchema as StorageEndDownloadInputSchema, FinalizeUploadInputSchema as StorageFinalizeUploadInputSchema, StorageLocationDeclarationSchema, StorageLocationRefSchema, StorageLocationSchema, StorageLocationTypeSchema, ProviderInfoSchema as StorageProviderInfoSchema, ReadChunkInputSchema as StorageReadChunkInputSchema, TestLocationResultSchema as StorageTestLocationResultSchema, WriteChunkInputSchema as StorageWriteChunkInputSchema, StreamCodecSchema, StreamFormatSchema, StreamNetworkStatsSchema, StreamParamsOptionsSchema, StreamParamsStatusSchema, StreamProfileConfigSchema, StreamProfileOptionsSchema, StreamProfilePatchSchema, StreamProfileSchema, StreamSourceEntrySchema, StreamSourceSchema, SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, SubscribeFramesInputSchema, SubscribeFramesResultSchema, SwitchStatusSchema, SystemMetricsSchema, SystemMirror, TIMEZONES, TamperStatusSchema, TankStatusSchema, TargetKindCapsSchema, TargetKindLevelSchema, TargetKindSchema, TargetSchema, TemperatureSensorStatusSchema, TestConnectionResultSchema$1 as TestConnectionResultSchema, TestResultSchema, ToastSchema, TokenScopeSchema, TopologyNodeSchema, TopologyProcessSchema, TopologyServiceSchema, TrackSchema, TrackStateSchema, TrackedDetectionSchema, TurnServerSchema, UNIT_TABLE, BrokerInfoSchema$1 as UnifiedBrokerInfoSchema, UnitConversionError, UpdateIntegrationInputSchema, UpdateStatusSchema, UpdateUserInputSchema, UserRecordSchema, UserSummarySchema, VacuumControlStatusSchema, VacuumStateSchema, ValveStateSchema, ValveStatusSchema, VibrationStatusSchema, VideoEncodeSchema, WELL_KNOWN_TABS, WELL_KNOWN_TAB_MAP, WaterHeaterStatusSchema, WeatherStatusSchema, WebrtcStreamChoiceSchema, WebrtcStreamTargetSchema, WhiteBalanceModeSchema, WidgetHostEnum, WidgetMetadataSchema, WidgetRemoteSchema, WidgetSizeEnum, YAMNET_TO_MACRO, ZoneKindEnum, ZoneRuleModeEnum, ZoneRuleSchema, ZoneRuleStageEnum, ZoneRulesArraySchema, ZoneSchema, ZoneScopeBreakdownSchema, accessoriesCapability, accessoryStableId, addonPagesCapability, addonPagesSourceCapability, addonRoutesCapability, addonSettingsCapability, addonWidgetsCapability, addonWidgetsSourceCapability, addonsCapability, adminUiCapability, advancedNotifierCapability, airQualitySensorCapability, alarmPanelCapability, alertsCapability, ambientLightSensorCapability, applyTransform, asBoolean, asJsonArray, asJsonObject, asNumber, asString, audioAnalysisCapability, audioAnalyzerCapability, audioCodecCapability, audioMetricsCapability, authProviderCapability, autoAssignProfiles, automationControlCapability, backupCapability, batteryCapability, bestLocationMatch, binaryCapability, bindAddonActions, brightnessCapability, brokerCapability, buildAddonRouteProvider, buildModelVariantGroups, buildStreamParamsConfigSchema, buttonCapability, cameraCredentialsCapability, cameraPipelineConfigCapability, cameraStreamsCapability, canConvertUnit, carbonMonoxideCapability, cellsToRects, classifyStream, classifyStreams, climateControlCapability, colorCapability, compileExpression, compileExpressionSafe, connectivityCapability, consumablesCapability, contactCapability, controlCapability, convertUnit, cosineSimilarity, coverCapability, createDeviceProxy, createDurableState, createEvent, createExpressionScope, createLazyTrpcSource, createMirrorSource, createRuntimeStateBridge, createSliceHandle, createSystemProxy, customAction, customModelRegistryCapability, dayNightCapability, decoderCapability, defaultDeviceFor, defineCustomActions, describeModelVariant, detectionPipelineCapability, deviceAdoptionCapability, deviceCustomAction, deviceDiscoveryCapability, deviceExportCapability, deviceManagerCapability, deviceMatchesProfile, deviceOpsCapability, deviceProviderCapability, deviceStateCapability, deviceStatusCapability, doorbellCapability, embeddingEncoderCapability, emitDownForOwnedCaps, emitReadiness, encodeProfileFromStreamShape, enumSensorCapability, enumerateItemArrayFields, enumerateSchemaFields, errMsg, evaluateAst, evaluateLinkExpression, evaluateZoneRules, event, eventEmitterCapability, eventsCapability, expandCapMethods, extractSourceInfoFromMetadata, faceGalleryCapability, fanControlCapability, featureProbeCapability, filesystemBrowseCapability, findTimezone, floodCapability, formatForBackend, formatForRuntime, frameworkSwapConfirmSchema, frameworkSwapPackageSchema, gasCapability, getAudioMacroClassIds, getByPath, getCapsByProviderKind, hfModelUrl, htmlToText, humidifierCapability, humiditySensorCapability, hydrateSchema, imageCapability, imageSettingsCapability, integrationsCapability, intercomCapability, isAgentOnlyPlacement, isArrayOutputSchema, isDeployableToAgent, isDeviceConfigCap, isEvent, isObjectInput, isVoidInput, jobKindSchema, kebabToCamel, lawnMowerControlCapability, lifecycleJobSchema, lifecycleJobScopeSchema, lifecycleJobStateSchema, lifecycleTaskSchema, localNetworkCapability, locationSimilarity, lockControlCapability, logDestinationCapability, looseSchema, makeProfileBrokerId, makeSourceBrokerId, mapAudioLabelToMacro, markdownToHtmlLite, markdownToText, maskUrlCredentials, mediaPlayerCapability, mergeSourceInfo, meshNetworkCapability, method, metricsProviderCapability, migrateConfigToBands, modelConvertCapability, modelDistributorCapability, modelFormatForRuntime, motionCapability, motionDetectionCapability, motionTriggerCapability, motionZonesCapability, mqttBrokerCapability, nativeObjectDetectionCapability, networkAccessCapability, networkQualityCapability, nodePin, nodesCapability, normalizeAddonInitResult, normalizeUnit, notificationOutputCapability, notifierCapability, numericSensorCapability, oauthIntegrationCapability, osdCapability, parseCameraStreamConfig, parseExpression, parseJsonArray, parseJsonObject, parseJsonUnknown, parseProfileBrokerId, parseStreamParamsFormPatch, pendingFrameworkSwapSchema, petFeederCapability, pickPreferredRtspEntry, pipelineAnalyticsCapability, pipelineExecutorCapability, pipelineOrchestratorCapability, pipelineRunnerCapability, plateGalleryCapability, platformProbeCapability, powerMeterCapability, prepareNotification, presenceCapability, pressureSensorCapability, privacyMaskCapability, procedureAuthKey, ptzAutotrackCapability, ptzCapability, pythonScriptForBackend, readNodePin, readinessKey, rebootCapability, recordingCapability, rectsToCells, requiresPython, resolveAddonExecution, resolveAddonGroup, resolveAddonPlacement, resolveAddonRuntime, resolveCapMount, resolveDetectionRuntime, resolveDeviceProfile, resolveFormat, resolveModelFormat, resolveRunnerId, resolveVariantModelId, runInferenceStep, runtimeDevices, scopeKey, scoreRuntimes, scriptRunnerCapability, selectAssignedProfileSlots, setByPath, settingsStoreCapability, sleep, sleepCancellable, smokeCapability, smtpProviderCapability, snapshotCapability, ssoBridgeCapability, storageCapability, storageEvictableCapability, storageProviderCapability, streamBrokerCapability, streamCatalogCapability, streamParamsCapability, streamPixels, streamQualityLabel, supportedRuntimes, switchCapability, synthesizeSourceInfo, systemCapability, tamperCapability, taskLogEntrySchema, taskPhaseSchema, taskTargetSchema, temperatureSensorCapability, textToHtml, toDeviceSummary, toExpressionValue, toStreamSourceEntry, toastCapability, tokenize, transcodeBody, tryConvertUnit, turnProviderCapability, unitDimension, unitsForDimension, updateCapability, userManagementCapability, userPasskeysCapability, vacuumControlCapability, validateExpressionSource, valveCapability, vibrationCapability, videoclipsCapability, waterHeaterCapability, weatherCapability, webrtcClientHintsSchema, webrtcSessionCapability, wiringAddonHealthSchema, wiringHealthSnapshotSchema, wiringNodeHealthSchema, wiringProbeKindSchema, wiringProbeResultSchema, zodEntriesToConfigUI, zoneAnalyticsCapability, zoneRulesCapability, zonesCapability };
|
|
28637
|
+
export { ACCESSORY_LABEL, ALL_CAPABILITY_DEFINITIONS, APPLE_SA_TO_MACRO, AUDIO_BACKEND_CHOICES, AUDIO_MACRO_LABELS, AccessoriesStatusSchema, AccessoryKind, AddBrokerInputSchema, AddonAutoUpdateSchema, AddonListItemSchema, AddonPageDeclarationSchema, AddonPageInfoSchema, AdoptInputSchema as AdoptionAdoptInputSchema, AdoptResultSchema as AdoptionAdoptResultSchema, AdoptionFilterSchema, GetCandidateInputSchema as AdoptionGetCandidateInputSchema, ListCandidatesInputSchema as AdoptionListCandidatesInputSchema, ListCandidatesOutputSchema as AdoptionListCandidatesOutputSchema, ReleaseInputSchema as AdoptionReleaseInputSchema, AdoptionStatusSchema, AgentLoadSummarySchema, AirQualitySensorStatusSchema, AlarmArmModeSchema, AlarmPanelStatusSchema, AlarmStateSchema, AlertSchema, AlertSeveritySchema, AlertSourceSchema, AlertStatusSchema, AmbientLightSensorStatusSchema, ApiKeyRecordSchema, ApiKeySummarySchema, ArchiveEntrySchema, ArchiveManifestSchema, AttachmentMediaTypeSchema, AttachmentSchema, AudioAnalysisResultSchema, AudioAnalysisSettingsSchema, AudioChunkInputSchema, AudioClassSummarySchema, AudioClassificationLabelSchema, AudioClassificationResultSchema, AudioCodecInfoSchema, AudioDecodeSessionConfigSchema, AudioEncodeSchema, AudioEncodeSessionConfigSchema, AudioEncodedChunkSchema, AudioEventSchema, AudioLevelSchema, AudioMetricsHistoryPointSchema, AudioMetricsHistorySchema, AudioMetricsSnapshotSchema, AudioPcmChunkSchema, AuthResultSchema, AutoUpdateSettingsSchema, AutomationControlStatusSchema, AvailableIntegrationTypeSchema, BACKEND_TO_FORMAT, BATTERY_DEVICE_PROFILE, BacklightModeSchema, BackupDestinationInfoSchema, BackupEntrySchema, BaseAddon, BaseDevice, BaseDeviceProvider, BatteryStatusSchema, BinaryStatusSchema, BoundingBoxSchema, BrightnessStatusSchema, AddInputSchema as BrokerAddInputSchema, BrokerAudioClientSchema, BrokerClientsSchema, BrokerConnectionDetailsSchema, BrokerConsumerAttributionSchema, BrokerConsumerKindSchema, BrokerDecodedClientSchema, BrokerEncodedClientSchema, GetStateInputSchema as BrokerGetStateInputSchema, BrokerInfoSchema, BrokerProviderInfoSchema, PublishInputSchema as BrokerPublishInputSchema, RegistryStatusSchema as BrokerRegistryStatusSchema, BrokerRtspClientSchema, BrokerStatsSchema, BrokerStatusEnum, BrokerStatusSchema, SubscribeInputSchema as BrokerSubscribeInputSchema, SubscribeResultSchema as BrokerSubscribeResultSchema, TestConnectionResultSchema as BrokerTestConnectionResultSchema, UnsubscribeInputSchema as BrokerUnsubscribeInputSchema, CAM_PROFILE_ORDER, CAPABILITY_NAMES, CAPABILITY_ROUTER_KEYS, CAP_NAMES_WITH_STATUS, CAP_NODE_PIN_CONTEXT_KEY, CAP_PROVIDER_KIND_MAP, COCO_80_LABELS, COCO_TO_MACRO, CamProfileSchema, CamStreamDescriptorSchema, CamStreamKindSchema, CamStreamResolutionSchema, CameraAssignmentStatusSchema, CameraAudioStatusSchema, CameraBrokerProfileSchema, CameraBrokerStatusSchema, CameraCredentialsSchema, CameraCredentialsStatusSchema, CameraDecoderShmSchema, CameraDecoderStatusSchema, CameraDetectionPhaseSchema, CameraDetectionProvisioningSchema, CameraDetectionProvisioningStateSchema, CameraDetectionStatusSchema, CameraMetricsSchema, CameraMetricsWithDeviceIdSchema, CameraMotionStatusSchema, CameraRecordingModeSchema, CameraRecordingStatusSchema, CameraSourceStatusSchema, CameraSourceStreamSchema, CameraStatusSchema, CameraStreamSchema, CandidateQueryFilterSchema, CapScopeSchema, CapabilityBindingsSchema, CarbonMonoxideStatusSchema, ChargingStatus, ClientNetworkStatsSchema, ClimateControlStatusSchema, ClipPlaybackSchema, ClipSchema, ClusterAddonNodeDeploymentSchema, ClusterAddonStatusEntrySchema, CollectionColumnSchema, CollectionIndexSchema, ColorStatusSchema, ConfigEntrySchema, ConfigSectionWithValuesSchema, ConfigTabDeclarationSchema, ConnectivityStatusSchema, ConsumableItemSchema, ConsumablesStatusSchema, ContactStatusSchema, ControlKindSchema, ControlStatusSchema, ConvertArtifactSchema, ConvertResultSchema, ConvertTargetSchema, CoverStateSchema, CoverStatusSchema, CreateApiKeyInputSchema, CreateApiKeyResultSchema, CreateIntegrationInputSchema, CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, CreateUserInputSchema, CustomActionInputSchema, CustomModelDescriptorSchema, DATAPLANE_SECRET_HEADER, DEFAULT_ADDON_PLACEMENT, DEFAULT_AUDIO_ANALYZER_CONFIG, DEFAULT_DECODER_HWACCEL_CONFIG, DEFAULT_FEATURES, DEFAULT_RETENTION, DEVICE_CAP_NAMES, DEVICE_PROFILES, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DEVICE_TYPE_INFO, DayNightModeSchema, DayNightOptionsSchema, DayNightSettingsPatchSchema, DayNightStatusSchema, DecodedAudioChunkSchema, DecodedFrameSchema, DecoderAssignmentSchema, DecoderSessionConfigSchema, DecoderStatsSchema, DeleteIntegrationResultSchema, DetectionSourceSchema, DetectorOutputSchema, DeviceCodeSeveritySchema, DeviceConfig, DeviceDiscoveryStatusSchema, ExposeInputSchema as DeviceExportExposeInputSchema, DeviceExportStatusSchema, UnexposeInputSchema as DeviceExportUnexposeInputSchema, DeviceFeature, DeviceInfoSchema, DeviceNetworkStatsSchema, DeviceRole, DeviceRuntimeState, DeviceStatusSchema, DeviceType, DiscoveredChildDeviceSchema, DiscoveredChildStatusSchema, DiscoveredDeviceSchema, DiscoveredTargetSchema, DisposerChain, DoorbellPressEventSchema, DoorbellStatusSchema, EVENT_PAD_MS, EXPRESSION_BUILTINS, EXPRESSION_BUILTIN_NAMES, EXPRESSION_COMPILE_CACHE_CAPACITY, EXPRESSION_IDENTIFIER_RE, EXPRESSION_INJECTED_NOW, ElementConfigStore, EmbeddingInfoSchema, EmbeddingResultSchema, EncodeProfileSchema, EncodedPacketSchema, EnrichedWidgetMetadataSchema, EnumSensorDateTimeFormatSchema, EnumSensorStatusSchema, EventCategory, EventEmitterStatusSchema, EventFireSchema, EventItemSchema, EventKindSchema, EventSourceType, ExportSetupFieldSchema, ExportSetupSchema, ExposedDeviceSchema, ExposureModeSchema, ExpressionEvalError, ExpressionParseError, FanControlStatusSchema, FanDirectionSchema, FeatureManifestSchema, FeatureProbeStatusSchema, FloodStatusSchema, FrameHandleFormatSchema, FrameHandleSchema, FrameInputSchema, GasStatusSchema, GetStreamWithCodecInputSchema, GlobalMetricsSchema, HF_BASE_URL, HF_REPO, HWACCEL_OPTIONS, HealthStatusSchema, HistoryPointSchema, HistoryResolutionEnum, HumidifierStatusSchema, HumiditySensorStatusSchema, HvacModeSchema, ImageRotateSchema, ImageSettingsOptionsSchema, ImageSettingsPatchSchema, ImageSettingsStatusSchema, ImageStatusSchema, IngestOwnerSchema, InstalledPackageSchema, IntegrationLiteSchema, IntegrationWithStateSchema, IntercomAbilitySchema, IntercomStatusSchema, KNOWN_CAP_NAMES, LabelDefinitionSchema, LawnMowerActivitySchema, LawnMowerControlStatusSchema, LocateSegmentResultSchema, LocationStatSchema, LockControlStatusSchema, LockStateSchema, LogEntrySchema, LogLevelSchema, LogStreamEntrySchema, MACRO_LABELS, MAX_EXPRESSION_AST_NODES, MAX_EXPRESSION_BINDINGS, MAX_EXPRESSION_CALL_ARGS, MAX_EXPRESSION_EVAL_STEPS, MAX_EXPRESSION_SOURCE_LENGTH, METHOD_ACCESS_MAP, MODEL_FORMATS, MaskGridDimsSchema, MaskGridShapeSchema, MaskLineShapeSchema, MaskPointSchema, MaskPolygonShapeSchema, MaskPolygonVerticesSchema, MaskRectShapeSchema, MaskShapeKindSchema, MaskShapeSchema, MediaFileSchema, MediaPlayerRepeatSchema, MediaPlayerStateSchema, MediaPlayerStatusSchema, MeshPeerSchema, MeshStatusSchema, MethodAccessSchema, ModelCatalogEntrySchema, ModelConvertInputSchema, ModelConvertMetadataSchema, ModelDistributeInputSchema, ModelDistributeResultSchema, ModelExtraFileSchema, ModelFormatEntrySchema, ModelFormatsSchema, ModelSubstitutionSchema, ModelVariantGroupSchema, MotionAnalysisResultSchema, MotionEventSchema, MotionOnMotionChangedDataSchema, MotionRegionSchema, MotionSourceEnum, MotionSourcesSchema, MotionStatusSchema, MotionTriggerRuntimeStateSchema, MotionTriggerStatusSchema, MotionZoneOptionsSchema, MotionZonePatchSchema, MotionZoneRegionSchema, MotionZoneStatusSchema, StatusSchema as MqttBrokerStatusSchema, NativeDetectionSchema, NativeObjectClassEnum, NativeObjectDetectionRuntimeStateSchema, NativeObjectDetectionStatusSchema, NetworkAccessStatusSchema, NetworkAddressSchema, NetworkEndpointSchema, NotificationActionSchema, NotificationFormatSchema, NotificationHistoryEntrySchema, NotificationRuleSchema, NotificationSchema, NotifierStatusSchema, NumericSensorStatusSchema, OauthIntegrationDescriptorSchema, ObjectEventSchema, OrchestratorMetricsSchema, OsdOverlayKindEnum, OsdOverlayPatchSchema, OsdOverlaySchema, OsdPositionEnum, OsdStatusSchema, PET_FEEDER_MANUAL_FEED_MAX, PET_FEEDER_MANUAL_FEED_MIN, PIPELINE_FLOW_CAPABILITY_NAMES, PIPELINE_OWNER_CAPABILITY_NAMES, PROVIDER_KIND_CAP_NAMES, PYTHON_SCRIPT, PackageUpdateSchema, PackageVersionInfoSchema, PasskeySummarySchema, PcmSampleFormatSchema, PerScopeBreakdownSchema, PetFeederStatusSchema, PickStreamPreferencesSchema, PickStreamRequirementsSchema, PickedCamStreamSchema, PipelineAssignmentSchema, PipelineDefaultStepSchema, PipelineEngineChoiceSchema, PipelineRunResultBridge, PipelineStepInputSchema, PipelineValidationIssueSchema, PipelineValidationResultSchema, PlaceholderReasonSchema, PolygonPointSchema, PowerMeterStatusSchema, PresenceStatusSchema, PressureSensorStatusSchema, PrivacyMaskOptionsSchema, PrivacyMaskPatchSchema, PrivacyMaskRegionSchema, PrivacyMaskShapeSchema, PrivacyMaskStatusSchema, ProfileRtspEntrySchema, ProfileSlotSchema, ProfileSlotStatusSchema, ProviderStatusSchema, PtzAutotrackRuntimeStateSchema, PtzAutotrackSettingsSchema, PtzAutotrackStatusSchema, PtzAutotrackTargetOptionSchema, PtzMoveCommandSchema, PtzPositionSchema, PtzPresetSchema, PtzStatusSchema, QueryFilterSchema, REACHABILITY_FAILURES_TO_OFFLINE, REACHABILITY_POLL_INTERVAL_MS, REACHABILITY_PROBE_TIMEOUT_MS, RECOGNITION_TYPES, RESERVED_BINDING_NAMES, RUNTIME_DEFAULTS, RUNTIME_TO_FORMAT, RawStateResultSchema, ReadSegmentBytesResultSchema, ReadinessRegistry, ReadinessTimeoutError, RecordingAvailabilitySchema, RecordingBandModeSchema, RecordingBandSchema, RecordingBandTriggersSchema, RecordingConfigSchema, RecordingDaysSchema, RecordingDeviceUsageSchema, RecordingLocationUsageSchema, RecordingManifestSchema, RecordingModeSchema, RecordingRangeSchema, RecordingRetentionSchema, RecordingRuleSchema, RecordingScheduleSchema, RecordingStatusSchema, RecordingStorageModeSchema, RecordingStorageUsageSchema, RecordingTriggersSchema, RecordingWeekdaySchema, RenderedAsSchema, ReportMotionInputSchema, RingBuffer, RtpSourceSchema, RtspRestreamEntrySchema, RunnerCameraConfigSchema, RunnerCameraDeviceUIFields, RunnerFrameSourceSchema, RunnerLocalLoadSchema, RunnerLocalMetricsSchema, SCOPE_PRESETS, SOURCE_INFO_METADATA_KEY, STREAM_PROFILE_META, STREAM_QUALITY_LABELS, SUB_DETECTION_TYPES, SYSTEM_CAP_NAMES, ScopedTokenSchema, ScopedTokenSummarySchema, ScoredObjectEventSchema, ScriptRunnerStatusSchema, SearchResultSchema, SendEmailInputSchema, SendEmailResultSchema, SendResultSchema, SettingsPatchSchema, SettingsRecordSchema, SettingsSchemaWithValuesSchema, SettingsUpdateResultSchema, ShmRingStatsSchema, SmokeStatusSchema, SmtpStatusSchema, SnapshotImageSchema, SourceInfoSchema, SpatialDetectionSchema, SsoBridgeClaimsSchema, StartEmbeddedInputSchema, AbortUploadInputSchema as StorageAbortUploadInputSchema, BeginDownloadInputSchema as StorageBeginDownloadInputSchema, BeginDownloadResultSchema as StorageBeginDownloadResultSchema, BeginUploadInputSchema as StorageBeginUploadInputSchema, BeginUploadResultSchema as StorageBeginUploadResultSchema, EndDownloadInputSchema as StorageEndDownloadInputSchema, FinalizeUploadInputSchema as StorageFinalizeUploadInputSchema, StorageLocationDeclarationSchema, StorageLocationRefSchema, StorageLocationSchema, StorageLocationTypeSchema, ProviderInfoSchema as StorageProviderInfoSchema, ReadChunkInputSchema as StorageReadChunkInputSchema, TestLocationResultSchema as StorageTestLocationResultSchema, WriteChunkInputSchema as StorageWriteChunkInputSchema, StreamCodecSchema, StreamFormatSchema, StreamNetworkStatsSchema, StreamParamsOptionsSchema, StreamParamsStatusSchema, StreamProfileConfigSchema, StreamProfileOptionsSchema, StreamProfilePatchSchema, StreamProfileSchema, StreamSourceEntrySchema, StreamSourceSchema, SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, SubscribeFramesInputSchema, SubscribeFramesResultSchema, SwitchStatusSchema, SystemMetricsSchema, SystemMirror, TIMEZONES, TamperStatusSchema, TankStatusSchema, TargetKindCapsSchema, TargetKindLevelSchema, TargetKindSchema, TargetSchema, TemperatureSensorStatusSchema, TestConnectionResultSchema$1 as TestConnectionResultSchema, TestResultSchema, ToastSchema, TokenScopeSchema, TopologyNodeSchema, TopologyProcessSchema, TopologyServiceSchema, TrackSchema, TrackStateSchema, TrackedDetectionSchema, TurnServerSchema, UNIT_TABLE, BrokerInfoSchema$1 as UnifiedBrokerInfoSchema, UnitConversionError, UpdateIntegrationInputSchema, UpdateStatusSchema, UpdateUserInputSchema, UserRecordSchema, UserSummarySchema, VacuumControlStatusSchema, VacuumStateSchema, ValveStateSchema, ValveStatusSchema, VibrationStatusSchema, VideoEncodeSchema, WELL_KNOWN_TABS, WELL_KNOWN_TAB_MAP, WaterHeaterStatusSchema, WeatherStatusSchema, WebrtcStreamChoiceSchema, WebrtcStreamTargetSchema, WhiteBalanceModeSchema, WidgetHostEnum, WidgetMetadataSchema, WidgetRemoteSchema, WidgetSizeEnum, YAMNET_TO_MACRO, ZoneKindEnum, ZoneRuleModeEnum, ZoneRuleSchema, ZoneRuleStageEnum, ZoneRulesArraySchema, ZoneSchema, ZoneScopeBreakdownSchema, accessoriesCapability, accessoryStableId, addonPagesCapability, addonPagesSourceCapability, addonRoutesCapability, addonSettingsCapability, addonWidgetsCapability, addonWidgetsSourceCapability, addonsCapability, adminUiCapability, advancedNotifierCapability, airQualitySensorCapability, alarmPanelCapability, alertsCapability, ambientLightSensorCapability, applyTransform, asBoolean, asJsonArray, asJsonObject, asNumber, asString, audioAnalysisCapability, audioAnalyzerCapability, audioCodecCapability, audioMetricsCapability, authProviderCapability, autoAssignProfiles, automationControlCapability, backupCapability, batteryCapability, bestLocationMatch, binaryCapability, bindAddonActions, brightnessCapability, brokerCapability, buildAddonRouteProvider, buildModelVariantGroups, buildStreamParamsConfigSchema, buttonCapability, cameraCredentialsCapability, cameraPipelineConfigCapability, cameraStreamsCapability, canConvertUnit, carbonMonoxideCapability, cellsToRects, classifyStream, classifyStreams, climateControlCapability, colorCapability, compileExpression, compileExpressionSafe, connectivityCapability, consumablesCapability, contactCapability, controlCapability, convertUnit, cosineSimilarity, coverCapability, createDeviceProxy, createDurableState, createEvent, createExpressionScope, createLazyTrpcSource, createMirrorSource, createRuntimeStateBridge, createSliceHandle, createSystemProxy, customAction, customModelRegistryCapability, dayNightCapability, decoderCapability, defaultDeviceFor, defineCustomActions, describeModelVariant, detectionPipelineCapability, deviceAdoptionCapability, deviceCustomAction, deviceDiscoveryCapability, deviceExportCapability, deviceManagerCapability, deviceMatchesProfile, deviceOpsCapability, deviceProviderCapability, deviceStateCapability, deviceStatusCapability, doorbellCapability, embeddingEncoderCapability, emitDownForOwnedCaps, emitReadiness, encodeProfileFromStreamShape, enumSensorCapability, enumerateItemArrayFields, enumerateSchemaFields, errMsg, evaluateAst, evaluateLinkExpression, evaluateZoneRules, event, eventEmitterCapability, eventsCapability, expandCapMethods, extractSourceInfoFromMetadata, faceGalleryCapability, fanControlCapability, featureProbeCapability, filesystemBrowseCapability, findTimezone, floodCapability, formatForBackend, formatForRuntime, frameworkSwapConfirmSchema, frameworkSwapPackageSchema, gasCapability, getAudioMacroClassIds, getByPath, getCapsByProviderKind, hfModelUrl, htmlToText, humidifierCapability, humiditySensorCapability, hydrateSchema, imageCapability, imageSettingsCapability, integrationsCapability, intercomCapability, isAgentOnlyPlacement, isArrayOutputSchema, isDeployableToAgent, isDeviceConfigCap, isEvent, isObjectInput, isVoidInput, jobKindSchema, kebabToCamel, lawnMowerControlCapability, lifecycleJobSchema, lifecycleJobScopeSchema, lifecycleJobStateSchema, lifecycleTaskSchema, localNetworkCapability, locationSimilarity, lockControlCapability, logDestinationCapability, looseSchema, makeProfileBrokerId, makeSourceBrokerId, mapAudioLabelToMacro, markdownToHtmlLite, markdownToText, maskUrlCredentials, mediaPlayerCapability, mergeSourceInfo, meshNetworkCapability, method, metricsProviderCapability, migrateConfigToBands, modelConvertCapability, modelDistributorCapability, modelFormatForRuntime, motionCapability, motionDetectionCapability, motionTriggerCapability, motionZonesCapability, mqttBrokerCapability, nativeObjectDetectionCapability, networkAccessCapability, networkQualityCapability, nodePin, nodesCapability, normalizeAddonInitResult, normalizeUnit, notificationOutputCapability, notifierCapability, numericSensorCapability, oauthIntegrationCapability, osdCapability, parseCameraStreamConfig, parseExpression, parseJsonArray, parseJsonObject, parseJsonUnknown, parseProfileBrokerId, parseStreamParamsFormPatch, pendingFrameworkSwapSchema, petFeederCapability, pickPreferredRtspEntry, pipelineAnalyticsCapability, pipelineExecutorCapability, pipelineOrchestratorCapability, pipelineRunnerCapability, plateGalleryCapability, platformProbeCapability, powerMeterCapability, prepareNotification, presenceCapability, pressureSensorCapability, privacyMaskCapability, procedureAuthKey, ptzAutotrackCapability, ptzCapability, pythonScriptForBackend, readNodePin, readinessKey, rebootCapability, recordingCapability, rectsToCells, requiresPython, resolveAddonExecution, resolveAddonGroup, resolveAddonPlacement, resolveAddonRuntime, resolveCapMount, resolveDetectionRuntime, resolveDeviceProfile, resolveFormat, resolveModelFormat, resolveRunnerId, resolveVariantModelId, runInferenceStep, runtimeDevices, scopeKey, scoreRuntimes, scriptRunnerCapability, selectAssignedProfileSlots, setByPath, settingsStoreCapability, sleep, sleepCancellable, smokeCapability, smtpProviderCapability, snapshotCapability, ssoBridgeCapability, startReachabilityPoll, storageCapability, storageEvictableCapability, storageProviderCapability, streamBrokerCapability, streamCatalogCapability, streamParamsCapability, streamPixels, streamQualityLabel, supportedRuntimes, switchCapability, synthesizeSourceInfo, systemCapability, tamperCapability, taskLogEntrySchema, taskPhaseSchema, taskTargetSchema, temperatureSensorCapability, textToHtml, toDeviceSummary, toExpressionValue, toStreamSourceEntry, toastCapability, tokenize, transcodeBody, tryConvertUnit, turnProviderCapability, unitDimension, unitsForDimension, updateCapability, userManagementCapability, userPasskeysCapability, vacuumControlCapability, validateExpressionSource, valveCapability, vibrationCapability, videoclipsCapability, waterHeaterCapability, weatherCapability, webrtcClientHintsSchema, webrtcSessionCapability, wiringAddonHealthSchema, wiringHealthSnapshotSchema, wiringNodeHealthSchema, wiringProbeKindSchema, wiringProbeResultSchema, zodEntriesToConfigUI, zoneAnalyticsCapability, zoneRulesCapability, zonesCapability };
|
|
@@ -33,6 +33,7 @@ export interface ModelVariantSource {
|
|
|
33
33
|
readonly tier: string;
|
|
34
34
|
readonly precision?: VariantPrecision;
|
|
35
35
|
readonly optimization?: VariantOptimization;
|
|
36
|
+
readonly resolution?: number;
|
|
36
37
|
};
|
|
37
38
|
readonly formats: Readonly<Record<string, {
|
|
38
39
|
readonly sizeMB: number;
|
|
@@ -43,6 +44,12 @@ export interface ModelVariantOption {
|
|
|
43
44
|
readonly modelId: string;
|
|
44
45
|
readonly precision: VariantPrecision;
|
|
45
46
|
readonly optimization: VariantOptimization;
|
|
47
|
+
/**
|
|
48
|
+
* Input resolution (square side, px). `undefined` ⇒ the family's native
|
|
49
|
+
* resolution (640 for yolo26). Reduced values (320 / 256) are the reduced-
|
|
50
|
+
* input latency variants.
|
|
51
|
+
*/
|
|
52
|
+
readonly resolution?: number;
|
|
46
53
|
/** Short chip label: `Standard` | `Int8` | `Fast` | `Fast · Int8`. */
|
|
47
54
|
readonly label: string;
|
|
48
55
|
/** Formats this variant ships (drives per-node availability). */
|
|
@@ -80,6 +87,8 @@ export declare function resolveVariantModelId(models: readonly ModelVariantSourc
|
|
|
80
87
|
readonly tier: string;
|
|
81
88
|
readonly precision?: VariantPrecision;
|
|
82
89
|
readonly optimization?: VariantOptimization;
|
|
90
|
+
/** `undefined` ⇒ the native-resolution build. */
|
|
91
|
+
readonly resolution?: number;
|
|
83
92
|
}): string | null;
|
|
84
93
|
/** Inverse: describe a flat model id as a grouped selection, or `null`. */
|
|
85
94
|
export declare function describeModelVariant(models: readonly ModelVariantSource[], modelId: string): {
|
|
@@ -87,4 +96,5 @@ export declare function describeModelVariant(models: readonly ModelVariantSource
|
|
|
87
96
|
readonly tier: string;
|
|
88
97
|
readonly precision: VariantPrecision;
|
|
89
98
|
readonly optimization: VariantOptimization;
|
|
99
|
+
readonly resolution?: number;
|
|
90
100
|
} | null;
|
package/dist/types/models.d.ts
CHANGED
|
@@ -113,6 +113,7 @@ export declare const ModelVariantGroupSchema: z.ZodObject<{
|
|
|
113
113
|
standard: "standard";
|
|
114
114
|
fast: "fast";
|
|
115
115
|
}>>;
|
|
116
|
+
resolution: z.ZodOptional<z.ZodNumber>;
|
|
116
117
|
}, z.core.$strip>;
|
|
117
118
|
export type ModelVariantGroup = z.infer<typeof ModelVariantGroupSchema>;
|
|
118
119
|
export declare const ModelCatalogEntrySchema: z.ZodObject<{
|
|
@@ -218,6 +219,7 @@ export declare const ModelCatalogEntrySchema: z.ZodObject<{
|
|
|
218
219
|
standard: "standard";
|
|
219
220
|
fast: "fast";
|
|
220
221
|
}>>;
|
|
222
|
+
resolution: z.ZodOptional<z.ZodNumber>;
|
|
221
223
|
}, z.core.$strip>>;
|
|
222
224
|
}, z.core.$strip>;
|
|
223
225
|
export type ModelCatalogEntry = z.infer<typeof ModelCatalogEntrySchema>;
|
|
@@ -424,6 +426,7 @@ export declare const ConvertResultSchema: z.ZodObject<{
|
|
|
424
426
|
standard: "standard";
|
|
425
427
|
fast: "fast";
|
|
426
428
|
}>>;
|
|
429
|
+
resolution: z.ZodOptional<z.ZodNumber>;
|
|
427
430
|
}, z.core.$strip>>;
|
|
428
431
|
}, z.core.$strip>;
|
|
429
432
|
artifacts: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|