@camstack/types 1.2.302 → 1.2.304
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 +1 -2
- package/dist/addon.mjs +1 -2
- package/dist/automation/recipe.d.ts +2 -2
- package/dist/capabilities/core-blocks.cap.d.ts +17 -17
- package/dist/capabilities/custom-model-registry.cap.d.ts +2 -2
- package/dist/capabilities/device-admin-link-url.d.ts +2 -2
- package/dist/capabilities/device-admin-link.cap.d.ts +1 -1
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/local-network.cap.d.ts +1 -1
- package/dist/capabilities/model-convert.cap.d.ts +1 -1
- package/dist/capabilities/model-distributor.cap.d.ts +10 -4
- package/dist/capabilities/notification-rules.cap.d.ts +230 -0
- package/dist/capabilities/osd-manager.cap.d.ts +5 -18
- package/dist/capabilities/osd.cap.d.ts +4 -0
- package/dist/capabilities/pipeline-executor.cap.d.ts +5 -5
- package/dist/capabilities/stream-broker.cap.d.ts +4 -4
- package/dist/device/device-do-actions.d.ts +57 -0
- package/dist/encode-profile.d.ts +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +520 -76
- package/dist/index.mjs +510 -77
- package/dist/notification/alarm-membership.d.ts +9 -0
- package/dist/notification/alarm-profiles.d.ts +5 -4
- package/dist/notification/alarm-settings.d.ts +9 -3
- package/dist/types/model-variant-groups.d.ts +2 -2
- package/dist/types/models.d.ts +7 -6
- package/dist/types/pipeline-step.d.ts +1 -1
- package/package.json +1 -1
|
@@ -42,6 +42,8 @@ export interface NcAlarmMembershipSubject {
|
|
|
42
42
|
*/
|
|
43
43
|
readonly sequenceActionsOf?: (sequenceId: string) => readonly NcRuleAction[] | undefined;
|
|
44
44
|
}
|
|
45
|
+
/** True when the rule's deviceState gate names any `armed_*` word. */
|
|
46
|
+
export declare function ruleGatedOnArmedState(rule: NcAlarmMembershipSubject): boolean;
|
|
45
47
|
/**
|
|
46
48
|
* A rule belongs to the alarm when its `deviceState` gate names ANY device's
|
|
47
49
|
* `armed_*` word, or an on-match binding pulls the alarm panel's trigger
|
|
@@ -49,6 +51,13 @@ export interface NcAlarmMembershipSubject {
|
|
|
49
51
|
* escalation.
|
|
50
52
|
*/
|
|
51
53
|
export declare function ruleBelongsToAlarm(rule: NcAlarmMembershipSubject): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* A rule gated on `armed_*` auto-triggers the CamStack `alarm-panel` on match
|
|
56
|
+
* — no `onTrigger` sequence required. Sirens are never part of this path.
|
|
57
|
+
* An explicit `alarm-panel.trigger` binding without an armed gate stays
|
|
58
|
+
* explicit actuation only ({@link ruleBelongsToAlarm}).
|
|
59
|
+
*/
|
|
60
|
+
export declare function ruleAutoTriggersAlarm(rule: NcAlarmMembershipSubject): boolean;
|
|
52
61
|
/** Copy the editors show when {@link sensorTransitionNeverFires} is true. */
|
|
53
62
|
export declare const NC_SENSOR_TRANSITION_NEVER_FIRES_WARNING = "This rule belongs to the alarm, and an alarm rule fires only when an opening OPENS. Set to \u201Conly when it clears\u201D, it can never fire.";
|
|
54
63
|
/**
|
|
@@ -14,11 +14,12 @@ import type { NcAlarmSettings } from '../capabilities/notification-rules.cap.js'
|
|
|
14
14
|
/** Stable id of the always-present Default profile (migrated from flat settings). */
|
|
15
15
|
export declare const NC_ALARM_DEFAULT_PROFILE_ID = "default";
|
|
16
16
|
export declare const NC_ALARM_DEFAULT_PROFILE_NAME = "Default";
|
|
17
|
-
/** Stock delays —
|
|
17
|
+
/** Stock delays — re-arm 10 s after trigger (inherited by every mode). */
|
|
18
18
|
export declare const NC_ALARM_SYSTEM_DEFAULT_DELAYS: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
exitDelaySec: number;
|
|
20
|
+
entryDelaySec: number;
|
|
21
|
+
triggeredDurationSec: number;
|
|
22
|
+
postTriggeredAction: "rearmAfter";
|
|
22
23
|
};
|
|
23
24
|
/** Empty memberships + stock delays + no announce targets. */
|
|
24
25
|
export declare function ncAlarmSystemDefaultSettings(): NcAlarmSettings;
|
|
@@ -5,15 +5,21 @@
|
|
|
5
5
|
* The engine and both clients call these; nobody re-implements them. No I/O, no clock.
|
|
6
6
|
*/
|
|
7
7
|
import type { AlarmArmMode } from '../capabilities/alarm-panel.cap.js';
|
|
8
|
-
import { type NcAlarmBlocking, type NcAlarmBlockingEdit, type NcAlarmModeDelays, type NcAlarmModeDelaysEdit, type NcAlarmModeDeviceList, type NcAlarmNonBlocking, type NcAlarmNonBlockingEdit, type NcAlarmSecureOnArmEdit, type NcAlarmSecureOnArmOff, type NcAlarmSettings, type NcAlarmSettingsPatch } from '../capabilities/notification-rules.cap.js';
|
|
8
|
+
import { type NcAlarmBlocking, type NcAlarmBlockingEdit, type NcAlarmModeDelays, type NcAlarmModeDelaysEdit, type NcAlarmModeDeviceList, type NcAlarmNonBlocking, type NcAlarmNonBlockingEdit, type NcAlarmPostTriggeredAction, type NcAlarmSecureOnArmEdit, type NcAlarmSecureOnArmOff, type NcAlarmSettings, type NcAlarmSettingsPatch } from '../capabilities/notification-rules.cap.js';
|
|
9
9
|
export type NcAlarmDelayField = 'exitDelaySec' | 'entryDelaySec' | 'triggeredDurationSec';
|
|
10
10
|
export declare const NC_ALARM_DELAY_FIELDS: readonly NcAlarmDelayField[];
|
|
11
11
|
export type NcAlarmDelaySource = 'mode' | 'default';
|
|
12
|
+
/**
|
|
13
|
+
* Derive the post-triggered action from a stored blob that may predate the field:
|
|
14
|
+
* a positive duration meant re-arm; zero/absent meant stay triggered.
|
|
15
|
+
*/
|
|
16
|
+
export declare function derivePostTriggeredAction(action: NcAlarmPostTriggeredAction | undefined, triggeredDurationSec: number): NcAlarmPostTriggeredAction;
|
|
12
17
|
export interface NcAlarmResolvedDelays {
|
|
13
18
|
readonly exitDelaySec: number;
|
|
14
19
|
readonly entryDelaySec: number;
|
|
15
20
|
readonly triggeredDurationSec: number;
|
|
16
|
-
readonly
|
|
21
|
+
readonly postTriggeredAction: NcAlarmPostTriggeredAction;
|
|
22
|
+
readonly source: Readonly<Record<NcAlarmDelayField | 'postTriggeredAction', NcAlarmDelaySource>>;
|
|
17
23
|
}
|
|
18
24
|
/**
|
|
19
25
|
* A settings answer as it travels on the wire. Clients do not parse answers, so a hub older
|
|
@@ -27,7 +33,7 @@ export type NcAlarmSettingsAnswer = Omit<NcAlarmSettings, 'modeDelays' | 'nonBlo
|
|
|
27
33
|
readonly blocking?: readonly NcAlarmBlocking[];
|
|
28
34
|
readonly secureOnArmOff?: readonly NcAlarmSecureOnArmOff[];
|
|
29
35
|
};
|
|
30
|
-
export type NcAlarmDelaySettings = Pick<NcAlarmSettingsAnswer, NcAlarmDelayField | 'modeDelays'>;
|
|
36
|
+
export type NcAlarmDelaySettings = Pick<NcAlarmSettingsAnswer, NcAlarmDelayField | 'modeDelays' | 'postTriggeredAction'>;
|
|
31
37
|
/** What `mode` actually runs on: its own overrides, the global value for every other field. */
|
|
32
38
|
export declare function resolveModeDelays(settings: NcAlarmDelaySettings, mode: AlarmArmMode): NcAlarmResolvedDelays;
|
|
33
39
|
/**
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { ModelFormat } from './models.js';
|
|
17
17
|
export type VariantPrecision = 'fp32' | 'int8';
|
|
18
|
-
export type VariantOptimization = 'standard' | '
|
|
18
|
+
export type VariantOptimization = 'standard' | 'test';
|
|
19
19
|
/**
|
|
20
20
|
* Minimal structural shape the grouped selector needs. Both the full
|
|
21
21
|
* `ModelCatalogEntry` (config UI) and the reduced `PipelineModelOption`
|
|
@@ -74,7 +74,7 @@ export interface ModelVariantFamily {
|
|
|
74
74
|
/**
|
|
75
75
|
* Fold a flat catalog into the `family → tier → variant` tree. Deterministic
|
|
76
76
|
* ordering: tiers by the canonical size ladder (unknown tiers appended
|
|
77
|
-
* alphabetically), variants standard-before-int8 and
|
|
77
|
+
* alphabetically), variants standard-before-int8 and test last.
|
|
78
78
|
*/
|
|
79
79
|
export declare function buildModelVariantGroups(models: readonly ModelVariantSource[]): readonly ModelVariantFamily[];
|
|
80
80
|
/**
|
package/dist/types/models.d.ts
CHANGED
|
@@ -115,7 +115,7 @@ export declare const ModelVariantGroupSchema: z.ZodObject<{
|
|
|
115
115
|
}>>;
|
|
116
116
|
optimization: z.ZodOptional<z.ZodEnum<{
|
|
117
117
|
standard: "standard";
|
|
118
|
-
|
|
118
|
+
test: "test";
|
|
119
119
|
}>>;
|
|
120
120
|
resolution: z.ZodOptional<z.ZodNumber>;
|
|
121
121
|
}, z.core.$strip>;
|
|
@@ -155,9 +155,10 @@ export type ModelHosting = (typeof MODEL_HOSTING)[number];
|
|
|
155
155
|
* are per upstream. A persisted custom-model row written when this field was a
|
|
156
156
|
* string still parses — the string is lifted into `{ weights }`.
|
|
157
157
|
*
|
|
158
|
-
* Every licence surface (the
|
|
159
|
-
*
|
|
160
|
-
*
|
|
158
|
+
* Every machine licence surface (`THIRD_PARTY_MODELS.md`, the Hugging Face
|
|
159
|
+
* model table) is GENERATED from these records by
|
|
160
|
+
* `scripts/gen-model-licenses.ts` (D661). Operator-facing docs live in
|
|
161
|
+
* `camstack/docs` → `/docs/detection/models`.
|
|
161
162
|
*/
|
|
162
163
|
export declare const ModelLicenseSchema: z.ZodPreprocess<z.ZodObject<{
|
|
163
164
|
weights: z.ZodString;
|
|
@@ -313,7 +314,7 @@ export declare const ModelCatalogEntrySchema: z.ZodObject<{
|
|
|
313
314
|
}>>;
|
|
314
315
|
optimization: z.ZodOptional<z.ZodEnum<{
|
|
315
316
|
standard: "standard";
|
|
316
|
-
|
|
317
|
+
test: "test";
|
|
317
318
|
}>>;
|
|
318
319
|
resolution: z.ZodOptional<z.ZodNumber>;
|
|
319
320
|
}, z.core.$strip>>;
|
|
@@ -585,7 +586,7 @@ export declare const ConvertResultSchema: z.ZodObject<{
|
|
|
585
586
|
}>>;
|
|
586
587
|
optimization: z.ZodOptional<z.ZodEnum<{
|
|
587
588
|
standard: "standard";
|
|
588
|
-
|
|
589
|
+
test: "test";
|
|
589
590
|
}>>;
|
|
590
591
|
resolution: z.ZodOptional<z.ZodNumber>;
|
|
591
592
|
}, z.core.$strip>>;
|
|
@@ -18,7 +18,7 @@ export interface IPipelineStep {
|
|
|
18
18
|
*/
|
|
19
19
|
getConfigSchema(model?: ModelCatalogEntry): readonly ConfigField[];
|
|
20
20
|
}
|
|
21
|
-
export type PostprocessorType = 'yolo' | 'ssd' | 'rfdetr' | 'yolonas' | 'yolo-seg' | 'scrfd' | 'yunet' | 'arcface' | 'clip' | 'softmax' | 'ctc' | 'plate-slots' | 'saliency' | 'yamnet';
|
|
21
|
+
export type PostprocessorType = 'yolo' | 'ssd' | 'rfdetr' | 'yolonas' | 'yolo-seg' | 'scrfd' | 'yunet' | 'yolo-split-dfl' | 'arcface' | 'clip' | 'softmax' | 'ctc' | 'plate-slots' | 'saliency' | 'yamnet';
|
|
22
22
|
export interface StepDefinition {
|
|
23
23
|
/** Unique step identifier (e.g., 'object-detection', 'face-detection') */
|
|
24
24
|
readonly id: string;
|