@camstack/types 1.2.387 → 1.2.389
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +24 -14
- package/dist/addon.mjs +24 -14
- package/dist/capabilities/alarm-panel.cap.d.ts +10 -2
- package/dist/capabilities/capability-definition.d.ts +21 -3
- package/dist/capabilities/connectivity.cap.d.ts +10 -2
- package/dist/capabilities/device-history.cap.d.ts +195 -3
- package/dist/capabilities/dishwasher.cap.d.ts +17 -0
- package/dist/capabilities/enum-sensor.cap.d.ts +12 -2
- package/dist/capabilities/index.d.ts +4 -3
- package/dist/capabilities/lock-control.cap.d.ts +9 -2
- package/dist/capabilities/log-destination.cap.d.ts +148 -19
- package/dist/capabilities/media-player.cap.d.ts +15 -2
- package/dist/capabilities/notification-rules.cap.d.ts +213 -13
- package/dist/capabilities/platform-probe.cap.d.ts +38 -0
- package/dist/capabilities/stream-params.cap.d.ts +24 -2
- package/dist/client.js +75 -6
- package/dist/client.mjs +75 -6
- package/dist/device/base-device.d.ts +34 -1
- package/dist/device/index.d.ts +2 -2
- package/dist/generated/addon-api.d.ts +89 -12
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/collection-array-methods.d.ts +2 -2
- package/dist/generated/history-catalog.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.js +655 -63
- package/dist/index.mjs +637 -64
- package/dist/inference/coral-units.d.ts +31 -0
- package/dist/inference/runtime-capabilities.d.ts +1 -1
- package/dist/interfaces/addon.d.ts +3 -4
- package/dist/interfaces/logging.d.ts +16 -1
- package/dist/interfaces/platform.d.ts +51 -13
- package/dist/notification/media-image.d.ts +67 -0
- package/dist/{sleep-yKL5gfrH.mjs → sleep-BSuCCFjf.mjs} +3 -1
- package/dist/{sleep-6sOPE0EV.js → sleep-DKtoyk6X.js} +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coral Edge TPU units — the ONE place a probed {@link CoralInfo} becomes
|
|
3
|
+
* addressable units, and a unit's device-key suffix becomes the device string
|
|
4
|
+
* the libedgetpu delegate is opened with. Pure: no I/O.
|
|
5
|
+
*
|
|
6
|
+
* Key suffix (what `edgetpu:<suffix>` carries, and what the pool's `device`
|
|
7
|
+
* holds until the delegate opens): `usb`, `usb:1`, …, `pci`, `pci:1`, …
|
|
8
|
+
* The first unit of a bus keeps the bare bus name, so a node's first USB Coral
|
|
9
|
+
* keeps the `edgetpu:usb` key every stored setting already uses.
|
|
10
|
+
*
|
|
11
|
+
* Delegate device string (libedgetpu's `device` option): ALWAYS an explicit
|
|
12
|
+
* ordinal, `usb:0` / `usb:1` / `pci:0` / `pci:1`. A bare or omitted device
|
|
13
|
+
* means "the first Edge TPU of any bus" to libedgetpu, which on a node with
|
|
14
|
+
* both buses would let two pools open the same unit.
|
|
15
|
+
*/
|
|
16
|
+
import type { CoralBus, CoralInfo } from '../interfaces/platform.js';
|
|
17
|
+
/** One usable Coral unit: its bus, its ordinal on that bus, its key suffix. */
|
|
18
|
+
export interface CoralUnitAddress {
|
|
19
|
+
readonly bus: CoralBus;
|
|
20
|
+
readonly index: number;
|
|
21
|
+
/** The device-key suffix: `usb`, `usb:1`, `pci`, `pci:1`, … */
|
|
22
|
+
readonly device: string;
|
|
23
|
+
}
|
|
24
|
+
/** Every usable Coral unit on a node, USB first then PCIe, in ordinal order. */
|
|
25
|
+
export declare function coralUsableUnits(coral: CoralInfo | null | undefined): readonly CoralUnitAddress[];
|
|
26
|
+
/**
|
|
27
|
+
* Map an edgetpu key suffix (`usb`, `usb:1`, `pci`, `pci:1`) to the explicit
|
|
28
|
+
* libedgetpu device string (`usb:0`, `usb:1`, `pci:0`, `pci:1`). Throws on any
|
|
29
|
+
* other string — a pool must never open "whichever Edge TPU comes first".
|
|
30
|
+
*/
|
|
31
|
+
export declare function edgetpuDelegateDevice(device: string): string;
|
|
@@ -54,7 +54,7 @@ interface ScoreRuntimesResult {
|
|
|
54
54
|
* - coreml: score 95, darwin+arm64
|
|
55
55
|
* - cuda: score 85, nvidia gpu
|
|
56
56
|
* - openvino: score 90 if intel-npu present, else 80 if intel gpu
|
|
57
|
-
* - edgetpu: score 70,
|
|
57
|
+
* - edgetpu: score 70, a usable Coral unit (USB or PCIe)
|
|
58
58
|
* - cpu: score 50 (universal floor, always included)
|
|
59
59
|
*
|
|
60
60
|
* All hardware-matched entries are `available: true`.
|
|
@@ -3,6 +3,7 @@ import type { CapabilityDefinition, InferProvider } from '../capabilities/capabi
|
|
|
3
3
|
import type { CustomActionCaller, CustomActionsSpec } from '../capabilities/custom-actions.js';
|
|
4
4
|
import type { PipelineSlot } from '../types/pipeline.js';
|
|
5
5
|
import type { AddonDataPlane } from './addon-data-plane.js';
|
|
6
|
+
import type { CoralInfo } from './platform.js';
|
|
6
7
|
import type { AddonPeerBytes } from './addon-peer-bytes.js';
|
|
7
8
|
import type { SecretsAccess } from '../keychain/secrets-access.js';
|
|
8
9
|
import type { RecordsAccess } from '../records/records-access.js';
|
|
@@ -383,10 +384,8 @@ export interface KernelInferenceHardware {
|
|
|
383
384
|
readonly npu: {
|
|
384
385
|
readonly type: string;
|
|
385
386
|
} | null;
|
|
386
|
-
/** Coral USB
|
|
387
|
-
readonly coral?:
|
|
388
|
-
readonly type: string;
|
|
389
|
-
} | null;
|
|
387
|
+
/** Coral Edge TPU hardware (USB and/or PCIe), when found — whole, units included. */
|
|
388
|
+
readonly coral?: CoralInfo | null;
|
|
390
389
|
}
|
|
391
390
|
export interface IKernelInferenceEngine {
|
|
392
391
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LogReadCapabilities, LogReadQuery, LogReadResult } from '../capabilities/log-destination.cap.js';
|
|
1
2
|
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
2
3
|
/**
|
|
3
4
|
* Severity ordering. Declared once here because it had already been re-declared
|
|
@@ -75,6 +76,13 @@ export interface LogTags {
|
|
|
75
76
|
readonly [key: string]: string | number | undefined;
|
|
76
77
|
}
|
|
77
78
|
export interface LogEntry {
|
|
79
|
+
/**
|
|
80
|
+
* `<bootId>.<seq>`, minted by the LogManager that FIRST accepted the line
|
|
81
|
+
* on this process (D898). Identical in the in-memory tail, the live
|
|
82
|
+
* subscription and the rotated file, so a page read from disk and a line
|
|
83
|
+
* pushed live dedupe exactly. Absent only on an entry built by hand.
|
|
84
|
+
*/
|
|
85
|
+
id?: string;
|
|
78
86
|
timestamp: Date;
|
|
79
87
|
level: LogLevel;
|
|
80
88
|
/** Single free-form label (e.g. 'EventPersistence', 'rtsp', 'AddonRegistry').
|
|
@@ -98,7 +106,14 @@ export interface ILogDestination {
|
|
|
98
106
|
initialize(): Promise<void>;
|
|
99
107
|
shutdown(): Promise<void>;
|
|
100
108
|
write(entry: LogEntry): void;
|
|
101
|
-
|
|
109
|
+
/** Absent ⇒ this destination only ships lines (D898). */
|
|
110
|
+
describeRead?(): Promise<LogReadCapabilities>;
|
|
111
|
+
read?(query: LogReadQuery): Promise<LogReadResult>;
|
|
112
|
+
cancelRead?(input: {
|
|
113
|
+
readonly requestId: string;
|
|
114
|
+
}): Promise<{
|
|
115
|
+
readonly cancelled: boolean;
|
|
116
|
+
}>;
|
|
102
117
|
}
|
|
103
118
|
/**
|
|
104
119
|
* Inline, per-call extras passed to every `IScopedLogger` method.
|
|
@@ -10,9 +10,10 @@ export interface HardwareInfo {
|
|
|
10
10
|
readonly gpu: GpuInfo | null;
|
|
11
11
|
readonly npu: NpuInfo | null;
|
|
12
12
|
/**
|
|
13
|
-
* Coral USB
|
|
14
|
-
* construction sites and older cross-node probe reports stay
|
|
15
|
-
* null ⇒ no Coral
|
|
13
|
+
* Coral Edge TPU hardware (USB and/or PCIe), when found. Optional so existing
|
|
14
|
+
* HardwareInfo construction sites and older cross-node probe reports stay
|
|
15
|
+
* valid; absent / null ⇒ no Coral. Non-null with no usable unit (driver
|
|
16
|
+
* missing, device not accessible) ⇒ the `edgetpu` runtime is withheld too.
|
|
16
17
|
*/
|
|
17
18
|
readonly coral?: CoralInfo | null;
|
|
18
19
|
}
|
|
@@ -31,24 +32,61 @@ export interface NpuInfo {
|
|
|
31
32
|
*/
|
|
32
33
|
readonly generation?: 'xdna1' | 'xdna2';
|
|
33
34
|
}
|
|
35
|
+
/** The bus a Coral Edge TPU sits on — libedgetpu's own device-family names. */
|
|
36
|
+
export type CoralBus = 'usb' | 'pci';
|
|
37
|
+
/** Usable Coral units on one bus: enumerated, and their device node opens. */
|
|
38
|
+
export interface CoralBusUnits {
|
|
39
|
+
readonly bus: CoralBus;
|
|
40
|
+
readonly count: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Why a Coral that IS physically present cannot run (D393/D315: present but
|
|
44
|
+
* unusable is never reported as absent).
|
|
45
|
+
* - `driver-missing`: the PCI function (`1ac1:089a`) is enumerated but no
|
|
46
|
+
* `/sys/class/apex/apex_N` exists — the gasket/apex kernel driver is not
|
|
47
|
+
* loaded on the host.
|
|
48
|
+
* - `device-not-accessible`: the driver is loaded but `/dev/apex_N` is absent
|
|
49
|
+
* from this process's view (not passed into the container) or cannot be
|
|
50
|
+
* opened read/write (permissions).
|
|
51
|
+
*/
|
|
52
|
+
export type CoralUnavailableReason = 'driver-missing' | 'device-not-accessible';
|
|
53
|
+
/** Present-but-unusable Coral units on one bus, with the typed reason. */
|
|
54
|
+
export interface CoralUnavailableUnits {
|
|
55
|
+
readonly bus: CoralBus;
|
|
56
|
+
readonly count: number;
|
|
57
|
+
readonly reason: CoralUnavailableReason;
|
|
58
|
+
}
|
|
34
59
|
/**
|
|
35
|
-
* Coral
|
|
36
|
-
* coexists with the host GPU/NPU (e.g. the Unraid hub carries
|
|
37
|
-
* and a Coral). Tracked separately from {@link NpuInfo} so
|
|
38
|
-
* the `edgetpu` inference runtime without colliding with the
|
|
60
|
+
* Coral Edge TPU (Google Coral), USB and/or PCIe/M.2. A discrete inference
|
|
61
|
+
* accelerator that coexists with the host GPU/NPU (e.g. the Unraid hub carries
|
|
62
|
+
* both an Intel NPU and a USB Coral). Tracked separately from {@link NpuInfo} so
|
|
63
|
+
* its presence gates the `edgetpu` inference runtime without colliding with the
|
|
64
|
+
* Intel-NPU signal.
|
|
65
|
+
*
|
|
66
|
+
* Non-null ⇒ Coral hardware was FOUND — usable or not. Only `units` (read
|
|
67
|
+
* through `coralUsableUnits`) gates the runtime and the device keys; a unit in
|
|
68
|
+
* `unavailable` is reported, never enumerated.
|
|
39
69
|
*/
|
|
40
70
|
export interface CoralInfo {
|
|
41
71
|
readonly type: 'coral-edgetpu';
|
|
42
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* @deprecated Legacy single-bus report (older nodes). Read only through
|
|
74
|
+
* `coralUsableUnits`, which falls back to it when `units` is absent.
|
|
75
|
+
*/
|
|
43
76
|
readonly bus?: string;
|
|
44
77
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* one device descriptor per unit (`edgetpu:usb`, `edgetpu:usb:1`, …). Omitted /
|
|
48
|
-
* undefined ⇒ treat as a single Coral (the probe couldn't count them, e.g. a
|
|
49
|
-
* container with a limited `/sys` USB view — the delegate-presence fallback).
|
|
78
|
+
* @deprecated Legacy USB unit count (older nodes); undefined ⇒ one Coral.
|
|
79
|
+
* Read only through `coralUsableUnits`.
|
|
50
80
|
*/
|
|
51
81
|
readonly count?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Usable units per bus. Each unit is its own concurrent pool — the enumerator
|
|
84
|
+
* emits one device descriptor per unit (`edgetpu:usb`, `edgetpu:usb:1`,
|
|
85
|
+
* `edgetpu:pci`, `edgetpu:pci:1`, …). Absent ⇒ a legacy report (see `bus`).
|
|
86
|
+
*/
|
|
87
|
+
readonly units?: readonly CoralBusUnits[];
|
|
88
|
+
/** Units that are present but cannot run, each with its typed reason. */
|
|
89
|
+
readonly unavailable?: readonly CoralUnavailableUnits[];
|
|
52
90
|
}
|
|
53
91
|
/** A probed backend with availability and score */
|
|
54
92
|
export interface PlatformScore {
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* media-image — the ONE media choice of a notification rule (D897).
|
|
3
|
+
*
|
|
4
|
+
* A rule used to state its picture as three fields — `attach` (which stored
|
|
5
|
+
* kind to look for), `frame` (cropped / full / boxed) and `zoneCrop` — and the
|
|
6
|
+
* ladders those fed picked a STORED kind, so one rule shipped a subject crop on
|
|
7
|
+
* one event and a boxed scene on the next depending on what had landed. The
|
|
8
|
+
* picture is now rendered at send time from a clean frame, and the rule says
|
|
9
|
+
* only what it wants to SEE: `image` (`scene-boxes` | `crop` | `clean` |
|
|
10
|
+
* `none`) plus `showTriggerZone`.
|
|
11
|
+
*
|
|
12
|
+
* This module is the only reader of the legacy triple. The rule store applies
|
|
13
|
+
* {@link normalizeNcMediaPolicy} on load (a READ projection, like the retired
|
|
14
|
+
* delivery fields of D692) and on every write, so a stored rule converges on
|
|
15
|
+
* `image` the first time it is saved, and an editor that still sends the
|
|
16
|
+
* triple (the viewer, until it follows) is folded on the way in.
|
|
17
|
+
*/
|
|
18
|
+
import type { NcConditions, NcMediaImage, NcMediaPolicy } from '../capabilities/notification-rules.cap.js';
|
|
19
|
+
import { type NcRuleKind, type NcRuleSectionSubject } from './rule-kinds.js';
|
|
20
|
+
/** Every mode, in the order an editor offers them. */
|
|
21
|
+
export declare const NC_MEDIA_IMAGE_MODES: readonly NcMediaImage[];
|
|
22
|
+
/**
|
|
23
|
+
* The modes a rule of this kind can honour. A kind that carries no media gets
|
|
24
|
+
* none (its row ships text, or — an alarm — its SOURCE rule's picture); a kind
|
|
25
|
+
* whose subject has no region of the frame (a sound) is never offered `crop`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function imageModesForKind(kind: NcRuleKind): readonly NcMediaImage[];
|
|
28
|
+
/**
|
|
29
|
+
* The zone ids that FIRE a rule: its `zones` condition, or an occupancy rule's
|
|
30
|
+
* own scoped zone. Empty when the trigger is not a zone — and then
|
|
31
|
+
* `showTriggerZone` has nothing to draw and is refused on save.
|
|
32
|
+
*/
|
|
33
|
+
export declare function ruleTriggerZoneIds(conditions: NcConditions): readonly string[];
|
|
34
|
+
/**
|
|
35
|
+
* What the legacy triple MEANT, as a mode. `zoneCrop` forced the clean
|
|
36
|
+
* keyFrame ladder and dropped `frame`, so it is `clean` whatever else was set;
|
|
37
|
+
* `frame` decided over `attach` when present; `keyFrame` was the clean scene;
|
|
38
|
+
* every other still (`best`, `best-matching`, the default) was the subject.
|
|
39
|
+
*/
|
|
40
|
+
export declare function legacyImageMode(media: NcMediaPolicy): NcMediaImage;
|
|
41
|
+
/**
|
|
42
|
+
* The mode a rule's picture is rendered in. `image` when stored; else what the
|
|
43
|
+
* legacy triple meant — and, for a SENSOR rule written before D897, `clean`
|
|
44
|
+
* whatever it stored (even `attach: 'none'`), because its stored triple was
|
|
45
|
+
* ignored and one plain snapshot always shipped (operator ruling, 2026-10-01):
|
|
46
|
+
* the migration keeps what the rule actually DID. Clamped to what the kind can
|
|
47
|
+
* honour.
|
|
48
|
+
*/
|
|
49
|
+
export declare function resolveNcMediaImage(media: NcMediaPolicy, kind: NcRuleKind): NcMediaImage;
|
|
50
|
+
/** The rule fields the normalisation reads. */
|
|
51
|
+
export interface NcMediaRuleSubject extends NcRuleSectionSubject {
|
|
52
|
+
readonly conditions: NcConditions;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The stored shape of a media policy: `image` set, the legacy triple gone.
|
|
56
|
+
* `showTriggerZone` survives only where it can be drawn — a zone trigger and a
|
|
57
|
+
* mode other than `crop`/`none`; a legacy `zoneCrop` on a zone rule becomes it.
|
|
58
|
+
* Every other field (gif, clip, rolls, speed, profile, linked cameras) is
|
|
59
|
+
* carried through untouched. Pure; never throws.
|
|
60
|
+
*/
|
|
61
|
+
export declare function normalizeNcMediaPolicy(media: NcMediaPolicy, rule: NcMediaRuleSubject): NcMediaPolicy;
|
|
62
|
+
/**
|
|
63
|
+
* Why a media policy cannot be SAVED on this rule, or null. Server-side and
|
|
64
|
+
* editor alike: `showTriggerZone` on a rule whose trigger is not a zone, and a
|
|
65
|
+
* mode the rule's kind cannot honour.
|
|
66
|
+
*/
|
|
67
|
+
export declare function ncMediaPolicyError(media: NcMediaPolicy, rule: NcMediaRuleSubject): string | null;
|
|
@@ -5402,7 +5402,9 @@ var HISTORY_UNIT_LABELS = {
|
|
|
5402
5402
|
ms: "ms",
|
|
5403
5403
|
s: "s",
|
|
5404
5404
|
days: "days",
|
|
5405
|
-
bytes: "bytes"
|
|
5405
|
+
bytes: "bytes",
|
|
5406
|
+
kbps: "kbps",
|
|
5407
|
+
fps: "fps"
|
|
5406
5408
|
};
|
|
5407
5409
|
/** Capture floor (ms) applied to `gauge` / `counter` series when a field states none. */
|
|
5408
5410
|
var HISTORY_DEFAULT_MIN_INTERVAL_MS = 1e4;
|
|
@@ -5402,7 +5402,9 @@ var HISTORY_UNIT_LABELS = {
|
|
|
5402
5402
|
ms: "ms",
|
|
5403
5403
|
s: "s",
|
|
5404
5404
|
days: "days",
|
|
5405
|
-
bytes: "bytes"
|
|
5405
|
+
bytes: "bytes",
|
|
5406
|
+
kbps: "kbps",
|
|
5407
|
+
fps: "fps"
|
|
5406
5408
|
};
|
|
5407
5409
|
/** Capture floor (ms) applied to `gauge` / `counter` series when a field states none. */
|
|
5408
5410
|
var HISTORY_DEFAULT_MIN_INTERVAL_MS = 1e4;
|