@camstack/types 1.2.586 → 1.2.588
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/CHANGELOG.md +33 -0
- package/dist/addon.d.ts +2 -0
- package/dist/addon.js +21 -5
- package/dist/addon.mjs +18 -6
- package/dist/capabilities/camera-grid-layout.cap.d.ts +3 -5
- package/dist/capabilities/cap-method-absent.d.ts +19 -0
- package/dist/capabilities/device-manager.cap.d.ts +464 -0
- package/dist/capabilities/hero-layout.cap.d.ts +2 -2
- package/dist/capabilities/index.d.ts +9 -5
- package/dist/capabilities/network-link.cap.d.ts +10 -0
- package/dist/capabilities/power-source.cap.d.ts +20 -0
- package/dist/capabilities/recording-export.cap.d.ts +1 -0
- package/dist/capabilities/siren-duration.d.ts +45 -7
- package/dist/capabilities/siren.cap.d.ts +45 -2
- package/dist/capabilities/switch-settable.d.ts +15 -0
- package/dist/capabilities/switch.cap.d.ts +71 -0
- package/dist/capabilities/terminal-session.cap.d.ts +3 -60
- package/dist/capabilities/videoclips.cap.d.ts +3 -0
- package/dist/capabilities/workload.cap.d.ts +655 -0
- package/dist/client.js +59 -5
- package/dist/client.mjs +59 -5
- package/dist/{composed-stable-id-RvQIEpqg.mjs → composed-stable-id-BBL71oUQ.mjs} +20 -0
- package/dist/{composed-stable-id-C3NfRTj8.js → composed-stable-id-CVbyajE5.js} +20 -0
- package/dist/composition/engine-hosted-blocks.d.ts +131 -0
- package/dist/composition/helpers/index.d.ts +1 -1
- package/dist/composition/helpers/spec.d.ts +56 -2
- package/dist/composition/index.d.ts +1 -0
- package/dist/device/base-device.d.ts +29 -0
- package/dist/device/cap-vocabulary/declaration.d.ts +12 -1
- package/dist/device/cap-vocabulary/index.d.ts +4 -4
- package/dist/device/cap-vocabulary/resolve.d.ts +47 -1
- package/dist/device/cap-vocabulary/types.d.ts +26 -1
- package/dist/device/declare-identifiers.d.ts +58 -0
- package/dist/device/device-control-resolution.d.ts +1 -1
- package/dist/device/device-icon.d.ts +7 -0
- package/dist/device/device-identifiers.d.ts +190 -0
- package/dist/device/device-identity-candidates.d.ts +124 -0
- package/dist/device/device-management.d.ts +10 -0
- package/dist/device/device-type.d.ts +22 -2
- package/dist/device/hero/build-hero-model.d.ts +15 -0
- package/dist/device/hero/hero-fragment.d.ts +11 -0
- package/dist/device/hero/hero-layout.d.ts +1 -0
- package/dist/device/hero/hero-look.d.ts +12 -0
- package/dist/device/hero/hero-model.d.ts +4 -4
- package/dist/device/hero/hero-scene.d.ts +7 -0
- package/dist/device/index.d.ts +7 -1
- package/dist/enums/event-category.d.ts +8 -0
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-d9kiqCqC.js → event-category-CE_VCE2G.js} +8 -0
- package/dist/{event-category-Dhcd0TRH.mjs → event-category-Hwx_JSCU.mjs} +8 -0
- package/dist/generated/addon-api.d.ts +99 -14
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/cap-status-types.d.ts +3 -1
- package/dist/generated/cap-vocabulary.d.ts +1 -1
- package/dist/generated/capability-router-map.d.ts +5 -2
- package/dist/generated/collection-array-methods.d.ts +1 -1
- package/dist/generated/customize-catalog.d.ts +1 -1
- package/dist/generated/device-local-state.d.ts +3 -0
- package/dist/generated/device-proxy.d.ts +4 -1
- package/dist/generated/device-scoped-caps.d.ts +1 -1
- package/dist/generated/history-catalog.d.ts +2 -2
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/generated/runtime-state-durability.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +2 -2
- package/dist/{implemented-methods-C7ScGvEz.js → implemented-methods-ChtdIofW.js} +128 -1
- package/dist/{implemented-methods-C5FMXLGP.mjs → implemented-methods-u7ddjc-_.mjs} +57 -2
- package/dist/index.d.ts +9 -3
- package/dist/index.js +2069 -429
- package/dist/index.mjs +2008 -428
- package/dist/node.js +2 -2
- package/dist/node.mjs +2 -2
- package/dist/{sleep-DwRtgB2i.js → sleep-CsZJsb8n.js} +692 -35
- package/dist/{sleep-Ch7Q7UtE.mjs → sleep-D6Pih0Qt.mjs} +669 -36
- package/package.json +1 -1
|
@@ -33,6 +33,8 @@ export declare const NetworkLinkStatusSchema: z.ZodObject<{
|
|
|
33
33
|
signal: z.ZodNullable<z.ZodNumber>;
|
|
34
34
|
rssi: z.ZodOptional<z.ZodNumber>;
|
|
35
35
|
ssid: z.ZodOptional<z.ZodString>;
|
|
36
|
+
speedKbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
37
|
+
linkUp: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
36
38
|
lastUpdated: z.ZodNumber;
|
|
37
39
|
}, z.core.$strip>;
|
|
38
40
|
export type NetworkLinkStatus = z.infer<typeof NetworkLinkStatusSchema>;
|
|
@@ -75,6 +77,8 @@ export declare const networkLinkCapability: {
|
|
|
75
77
|
signal: z.ZodNullable<z.ZodNumber>;
|
|
76
78
|
rssi: z.ZodOptional<z.ZodNumber>;
|
|
77
79
|
ssid: z.ZodOptional<z.ZodString>;
|
|
80
|
+
speedKbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
81
|
+
linkUp: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
78
82
|
lastUpdated: z.ZodNumber;
|
|
79
83
|
}, z.core.$strip>;
|
|
80
84
|
}, z.core.$strip>;
|
|
@@ -92,6 +96,8 @@ export declare const networkLinkCapability: {
|
|
|
92
96
|
signal: z.ZodNullable<z.ZodNumber>;
|
|
93
97
|
rssi: z.ZodOptional<z.ZodNumber>;
|
|
94
98
|
ssid: z.ZodOptional<z.ZodString>;
|
|
99
|
+
speedKbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
100
|
+
linkUp: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
95
101
|
lastUpdated: z.ZodNumber;
|
|
96
102
|
}, z.core.$strip>;
|
|
97
103
|
readonly kind: 'push';
|
|
@@ -100,6 +106,8 @@ export declare const networkLinkCapability: {
|
|
|
100
106
|
signal: number | null;
|
|
101
107
|
rssi?: number | undefined;
|
|
102
108
|
ssid?: string | undefined;
|
|
109
|
+
speedKbps?: number | null | undefined;
|
|
110
|
+
linkUp?: boolean | null | undefined;
|
|
103
111
|
lastUpdated: number;
|
|
104
112
|
};
|
|
105
113
|
};
|
|
@@ -118,6 +126,8 @@ export declare const networkLinkCapability: {
|
|
|
118
126
|
signal: z.ZodNullable<z.ZodNumber>;
|
|
119
127
|
rssi: z.ZodOptional<z.ZodNumber>;
|
|
120
128
|
ssid: z.ZodOptional<z.ZodString>;
|
|
129
|
+
speedKbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
130
|
+
linkUp: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
121
131
|
lastUpdated: z.ZodNumber;
|
|
122
132
|
}, z.core.$strip>;
|
|
123
133
|
/**
|
|
@@ -20,6 +20,9 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
20
20
|
* `core-blocks` system provider, so they are `systemMethod`s and carry a
|
|
21
21
|
* top-level `deviceId`.
|
|
22
22
|
*
|
|
23
|
+
* Power on / off are withdrawn — and refused as `not-settable` — when the linked
|
|
24
|
+
* switch ANSWERED it only reports (D1058); the forced restart stays.
|
|
25
|
+
*
|
|
23
26
|
* Every action answers a typed result and never throws for an expected
|
|
24
27
|
* refusal, so a caller tells "the switch is offline" from "a restart is
|
|
25
28
|
* already running" without parsing text.
|
|
@@ -30,11 +33,13 @@ export declare const POWER_SOURCE_OFF_SECONDS_MAX = 120;
|
|
|
30
33
|
export declare const POWER_SOURCE_OFF_SECONDS_DEFAULT = 10;
|
|
31
34
|
export declare const PowerSourceRefusalReasonSchema: z.ZodEnum<{
|
|
32
35
|
"no-power-source": "no-power-source";
|
|
36
|
+
"not-settable": "not-settable";
|
|
33
37
|
"restart-in-progress": "restart-in-progress";
|
|
34
38
|
"switch-call-failed": "switch-call-failed";
|
|
35
39
|
"switch-is-actuator": "switch-is-actuator";
|
|
36
40
|
"switch-missing": "switch-missing";
|
|
37
41
|
"switch-offline": "switch-offline";
|
|
42
|
+
"switch-options-unreadable": "switch-options-unreadable";
|
|
38
43
|
"switch-unknown": "switch-unknown";
|
|
39
44
|
}>;
|
|
40
45
|
export type PowerSourceRefusalReason = z.infer<typeof PowerSourceRefusalReasonSchema>;
|
|
@@ -44,11 +49,13 @@ export declare const PowerSourceActionResultSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
44
49
|
accepted: z.ZodLiteral<false>;
|
|
45
50
|
reason: z.ZodEnum<{
|
|
46
51
|
"no-power-source": "no-power-source";
|
|
52
|
+
"not-settable": "not-settable";
|
|
47
53
|
"restart-in-progress": "restart-in-progress";
|
|
48
54
|
"switch-call-failed": "switch-call-failed";
|
|
49
55
|
"switch-is-actuator": "switch-is-actuator";
|
|
50
56
|
"switch-missing": "switch-missing";
|
|
51
57
|
"switch-offline": "switch-offline";
|
|
58
|
+
"switch-options-unreadable": "switch-options-unreadable";
|
|
52
59
|
"switch-unknown": "switch-unknown";
|
|
53
60
|
}>;
|
|
54
61
|
message: z.ZodString;
|
|
@@ -60,6 +67,7 @@ export declare const PowerSourceInfoSchema: z.ZodObject<{
|
|
|
60
67
|
switchName: z.ZodNullable<z.ZodString>;
|
|
61
68
|
switchOn: z.ZodNullable<z.ZodBoolean>;
|
|
62
69
|
switchOnline: z.ZodNullable<z.ZodBoolean>;
|
|
70
|
+
switchSettable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
63
71
|
restartInProgress: z.ZodBoolean;
|
|
64
72
|
offSeconds: z.ZodNumber;
|
|
65
73
|
}, z.core.$strip>;
|
|
@@ -71,6 +79,11 @@ export declare const PowerSourceStateSchema: z.ZodObject<{
|
|
|
71
79
|
lastFetchedAt: z.ZodNumber;
|
|
72
80
|
}, z.core.$strip>;
|
|
73
81
|
export type PowerSourceState = z.infer<typeof PowerSourceStateSchema>;
|
|
82
|
+
/** The read that decides whether power on / off are offered (`offeredWhen`, D1058). */
|
|
83
|
+
export declare const POWER_SOURCE_SETTABLE_GATE: {
|
|
84
|
+
readonly method: 'getStatus';
|
|
85
|
+
readonly field: 'switchSettable';
|
|
86
|
+
};
|
|
74
87
|
export declare const powerSourceCapability: {
|
|
75
88
|
readonly name: 'power-source';
|
|
76
89
|
readonly scope: 'device';
|
|
@@ -85,6 +98,7 @@ export declare const powerSourceCapability: {
|
|
|
85
98
|
switchName: z.ZodNullable<z.ZodString>;
|
|
86
99
|
switchOn: z.ZodNullable<z.ZodBoolean>;
|
|
87
100
|
switchOnline: z.ZodNullable<z.ZodBoolean>;
|
|
101
|
+
switchSettable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
88
102
|
restartInProgress: z.ZodBoolean;
|
|
89
103
|
offSeconds: z.ZodNumber;
|
|
90
104
|
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind> & {
|
|
@@ -98,11 +112,13 @@ export declare const powerSourceCapability: {
|
|
|
98
112
|
accepted: z.ZodLiteral<false>;
|
|
99
113
|
reason: z.ZodEnum<{
|
|
100
114
|
"no-power-source": "no-power-source";
|
|
115
|
+
"not-settable": "not-settable";
|
|
101
116
|
"restart-in-progress": "restart-in-progress";
|
|
102
117
|
"switch-call-failed": "switch-call-failed";
|
|
103
118
|
"switch-is-actuator": "switch-is-actuator";
|
|
104
119
|
"switch-missing": "switch-missing";
|
|
105
120
|
"switch-offline": "switch-offline";
|
|
121
|
+
"switch-options-unreadable": "switch-options-unreadable";
|
|
106
122
|
"switch-unknown": "switch-unknown";
|
|
107
123
|
}>;
|
|
108
124
|
message: z.ZodString;
|
|
@@ -117,11 +133,13 @@ export declare const powerSourceCapability: {
|
|
|
117
133
|
accepted: z.ZodLiteral<false>;
|
|
118
134
|
reason: z.ZodEnum<{
|
|
119
135
|
"no-power-source": "no-power-source";
|
|
136
|
+
"not-settable": "not-settable";
|
|
120
137
|
"restart-in-progress": "restart-in-progress";
|
|
121
138
|
"switch-call-failed": "switch-call-failed";
|
|
122
139
|
"switch-is-actuator": "switch-is-actuator";
|
|
123
140
|
"switch-missing": "switch-missing";
|
|
124
141
|
"switch-offline": "switch-offline";
|
|
142
|
+
"switch-options-unreadable": "switch-options-unreadable";
|
|
125
143
|
"switch-unknown": "switch-unknown";
|
|
126
144
|
}>;
|
|
127
145
|
message: z.ZodString;
|
|
@@ -136,11 +154,13 @@ export declare const powerSourceCapability: {
|
|
|
136
154
|
accepted: z.ZodLiteral<false>;
|
|
137
155
|
reason: z.ZodEnum<{
|
|
138
156
|
"no-power-source": "no-power-source";
|
|
157
|
+
"not-settable": "not-settable";
|
|
139
158
|
"restart-in-progress": "restart-in-progress";
|
|
140
159
|
"switch-call-failed": "switch-call-failed";
|
|
141
160
|
"switch-is-actuator": "switch-is-actuator";
|
|
142
161
|
"switch-missing": "switch-missing";
|
|
143
162
|
"switch-offline": "switch-offline";
|
|
163
|
+
"switch-options-unreadable": "switch-options-unreadable";
|
|
144
164
|
"switch-unknown": "switch-unknown";
|
|
145
165
|
}>;
|
|
146
166
|
message: z.ZodString;
|
|
@@ -327,6 +327,7 @@ export declare const ClipExportFailureSchema: z.ZodEnum<{
|
|
|
327
327
|
"too-large-to-transfer": "too-large-to-transfer";
|
|
328
328
|
"unsupported-option": "unsupported-option";
|
|
329
329
|
"wake-expired": "wake-expired";
|
|
330
|
+
"wake-timeout": "wake-timeout";
|
|
330
331
|
}>;
|
|
331
332
|
export type ClipExportFailure = z.infer<typeof ClipExportFailureSchema>;
|
|
332
333
|
/** `<token>: <prose>` — the ONE composition of a clip export's failure string. */
|
|
@@ -1,15 +1,53 @@
|
|
|
1
|
-
import type
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { type SirenOptions, type SirenStatus } from './siren.cap.js';
|
|
2
|
+
/** An activation asked in plays (#589): the count, and whether its end is an estimate. */
|
|
3
|
+
export interface SirenPlaysActivation {
|
|
4
|
+
readonly plays: number | null;
|
|
5
|
+
readonly estimated: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** What a trigger asked for: seconds, plays, or neither (the camera default). */
|
|
8
|
+
export interface SirenTriggerRequest {
|
|
9
|
+
readonly durationSeconds?: number;
|
|
10
|
+
readonly plays?: number;
|
|
11
|
+
}
|
|
12
|
+
/** How a provider carries out a trigger, decided before it touches the camera. */
|
|
13
|
+
export type SirenTriggerPlan = {
|
|
14
|
+
readonly asked: 'seconds';
|
|
15
|
+
readonly seconds: number;
|
|
16
|
+
/** The camera counts plays and the factor is not its own: the end is an estimate. */
|
|
17
|
+
readonly estimated: boolean;
|
|
18
|
+
} | {
|
|
19
|
+
readonly asked: 'plays';
|
|
20
|
+
readonly plays: number;
|
|
21
|
+
/** `plays × secondsPerPlay`; `null` when the camera gives no factor. */
|
|
22
|
+
readonly seconds: number | null;
|
|
23
|
+
readonly estimated: boolean;
|
|
24
|
+
} | {
|
|
25
|
+
readonly asked: 'refused';
|
|
26
|
+
readonly reason: string;
|
|
27
|
+
};
|
|
6
28
|
/** The state of a siren that is not sounding. Keeps the last activation's facts. */
|
|
7
29
|
export declare function sirenIdleStatus(previous: SirenStatus | undefined): SirenStatus;
|
|
8
|
-
/**
|
|
9
|
-
|
|
30
|
+
/**
|
|
31
|
+
* The state right after a timed trigger: sounding until `now + seconds`. A
|
|
32
|
+
* trigger asked in plays passes its count, and whether that end is an estimate.
|
|
33
|
+
*/
|
|
34
|
+
export declare function sirenTriggeredStatus(nowMs: number, seconds: number, activation?: SirenPlaysActivation): SirenStatus;
|
|
10
35
|
/**
|
|
11
36
|
* The duration a trigger will really use: the request (or the camera default)
|
|
12
37
|
* snapped to what the camera allows — the nearest listed value, or clamped and
|
|
13
38
|
* stepped inside the range. Never longer or shorter than the camera can play.
|
|
14
39
|
*/
|
|
15
40
|
export declare function resolveSirenSeconds(options: SirenOptions, requested: number | undefined): number;
|
|
41
|
+
/**
|
|
42
|
+
* The play count a trigger will really use, snapped like the seconds; `null`
|
|
43
|
+
* when the camera declares no plays (it counts seconds).
|
|
44
|
+
*/
|
|
45
|
+
export declare function resolveSirenPlays(options: SirenOptions, requested: number | undefined): number | null;
|
|
46
|
+
/** The counts a rule may pick: the list, or the range spelled out; empty without plays. */
|
|
47
|
+
export declare function sirenPlayChoices(options: SirenOptions): number[];
|
|
48
|
+
/**
|
|
49
|
+
* Decides a trigger: a count on a siren that declares no plays is refused; a
|
|
50
|
+
* count is snapped and timed through `secondsPerPlay`; seconds keep the old
|
|
51
|
+
* snapping. Never both — the input schema refuses that before it gets here.
|
|
52
|
+
*/
|
|
53
|
+
export declare function planSirenTrigger(options: SirenOptions, request: SirenTriggerRequest): SirenTriggerPlan;
|
|
@@ -43,6 +43,13 @@ export declare const SirenOptionsSchema: z.ZodObject<{
|
|
|
43
43
|
step: z.ZodNumber;
|
|
44
44
|
}, z.core.$strip>>;
|
|
45
45
|
defaultSeconds: z.ZodNumber;
|
|
46
|
+
allowedPlays: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
47
|
+
rangePlays: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
48
|
+
min: z.ZodNumber;
|
|
49
|
+
max: z.ZodNumber;
|
|
50
|
+
step: z.ZodNumber;
|
|
51
|
+
}, z.core.$strip>>>;
|
|
52
|
+
defaultPlays: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
46
53
|
unit: z.ZodEnum<{
|
|
47
54
|
plays: "plays";
|
|
48
55
|
seconds: "seconds";
|
|
@@ -59,13 +66,24 @@ export declare const SirenStatusSchema: z.ZodObject<{
|
|
|
59
66
|
active: z.ZodBoolean;
|
|
60
67
|
activeUntil: z.ZodNullable<z.ZodNumber>;
|
|
61
68
|
durationSeconds: z.ZodNullable<z.ZodNumber>;
|
|
69
|
+
plays: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
70
|
+
activeUntilEstimated: z.ZodDefault<z.ZodBoolean>;
|
|
62
71
|
lastTriggeredAt: z.ZodNumber;
|
|
63
72
|
}, z.core.$strip>;
|
|
64
73
|
export type SirenStatus = z.infer<typeof SirenStatusSchema>;
|
|
74
|
+
/** A trigger asks seconds OR plays (#589); neither means the camera default. */
|
|
75
|
+
export declare const SirenTriggerInputSchema: z.ZodObject<{
|
|
76
|
+
deviceId: z.ZodNumber;
|
|
77
|
+
durationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
plays: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
export type SirenTriggerInput = z.infer<typeof SirenTriggerInputSchema>;
|
|
65
81
|
export declare const SirenRuntimeStateSchema: z.ZodObject<{
|
|
66
82
|
active: z.ZodBoolean;
|
|
67
83
|
activeUntil: z.ZodNullable<z.ZodNumber>;
|
|
68
84
|
durationSeconds: z.ZodNullable<z.ZodNumber>;
|
|
85
|
+
plays: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
86
|
+
activeUntilEstimated: z.ZodDefault<z.ZodBoolean>;
|
|
69
87
|
lastTriggeredAt: z.ZodNumber;
|
|
70
88
|
lastFetchedAt: z.ZodNumber;
|
|
71
89
|
}, z.core.$strip>;
|
|
@@ -88,6 +106,13 @@ export declare const sirenCapability: {
|
|
|
88
106
|
step: z.ZodNumber;
|
|
89
107
|
}, z.core.$strip>>;
|
|
90
108
|
defaultSeconds: z.ZodNumber;
|
|
109
|
+
allowedPlays: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
110
|
+
rangePlays: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
111
|
+
min: z.ZodNumber;
|
|
112
|
+
max: z.ZodNumber;
|
|
113
|
+
step: z.ZodNumber;
|
|
114
|
+
}, z.core.$strip>>>;
|
|
115
|
+
defaultPlays: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
91
116
|
unit: z.ZodEnum<{
|
|
92
117
|
plays: "plays";
|
|
93
118
|
seconds: "seconds";
|
|
@@ -100,16 +125,28 @@ export declare const sirenCapability: {
|
|
|
100
125
|
fetchedAt: z.ZodNumber;
|
|
101
126
|
}, z.core.$strip>, "query">;
|
|
102
127
|
/**
|
|
103
|
-
*
|
|
104
|
-
*
|
|
128
|
+
* The play counts a rule may pick: what `getOptions` declares as a list, or
|
|
129
|
+
* its range spelled out. Empty for a siren that counts seconds.
|
|
130
|
+
*/
|
|
131
|
+
readonly getPlayChoices: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
132
|
+
deviceId: z.ZodNumber;
|
|
133
|
+
}, z.core.$strip>, z.ZodArray<z.ZodNumber>, "query">;
|
|
134
|
+
/**
|
|
135
|
+
* Sound the siren for `durationSeconds` OR `plays` — never both. With
|
|
136
|
+
* neither the camera default applies. A count on a siren that declares no
|
|
137
|
+
* plays is refused. Answers the state at the moment of the trigger
|
|
138
|
+
* (`activeUntil` included).
|
|
105
139
|
*/
|
|
106
140
|
readonly trigger: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
107
141
|
deviceId: z.ZodNumber;
|
|
108
142
|
durationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
143
|
+
plays: z.ZodOptional<z.ZodNumber>;
|
|
109
144
|
}, z.core.$strip>, z.ZodObject<{
|
|
110
145
|
active: z.ZodBoolean;
|
|
111
146
|
activeUntil: z.ZodNullable<z.ZodNumber>;
|
|
112
147
|
durationSeconds: z.ZodNullable<z.ZodNumber>;
|
|
148
|
+
plays: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
149
|
+
activeUntilEstimated: z.ZodDefault<z.ZodBoolean>;
|
|
113
150
|
lastTriggeredAt: z.ZodNumber;
|
|
114
151
|
}, z.core.$strip>, "mutation">;
|
|
115
152
|
/** Silence the siren now. */
|
|
@@ -119,6 +156,8 @@ export declare const sirenCapability: {
|
|
|
119
156
|
active: z.ZodBoolean;
|
|
120
157
|
activeUntil: z.ZodNullable<z.ZodNumber>;
|
|
121
158
|
durationSeconds: z.ZodNullable<z.ZodNumber>;
|
|
159
|
+
plays: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
160
|
+
activeUntilEstimated: z.ZodDefault<z.ZodBoolean>;
|
|
122
161
|
lastTriggeredAt: z.ZodNumber;
|
|
123
162
|
}, z.core.$strip>, "mutation">;
|
|
124
163
|
};
|
|
@@ -137,6 +176,8 @@ export declare const sirenCapability: {
|
|
|
137
176
|
active: z.ZodBoolean;
|
|
138
177
|
activeUntil: z.ZodNullable<z.ZodNumber>;
|
|
139
178
|
durationSeconds: z.ZodNullable<z.ZodNumber>;
|
|
179
|
+
plays: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
180
|
+
activeUntilEstimated: z.ZodDefault<z.ZodBoolean>;
|
|
140
181
|
lastTriggeredAt: z.ZodNumber;
|
|
141
182
|
}, z.core.$strip>;
|
|
142
183
|
readonly kind: 'command-driven';
|
|
@@ -145,6 +186,8 @@ export declare const sirenCapability: {
|
|
|
145
186
|
active: z.ZodBoolean;
|
|
146
187
|
activeUntil: z.ZodNullable<z.ZodNumber>;
|
|
147
188
|
durationSeconds: z.ZodNullable<z.ZodNumber>;
|
|
189
|
+
plays: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
190
|
+
activeUntilEstimated: z.ZodDefault<z.ZodBoolean>;
|
|
148
191
|
lastTriggeredAt: z.ZodNumber;
|
|
149
192
|
lastFetchedAt: z.ZodNumber;
|
|
150
193
|
}, z.core.$strip>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a switch can be set (D1058), schema-free so the addon runner can import it from
|
|
3
|
+
* `@camstack/types/addon` without loading the capability schema graph (D28).
|
|
4
|
+
*/
|
|
5
|
+
/** The read that decides whether a switch is offered on/off (`offeredWhen` of its actions). */
|
|
6
|
+
export declare const SWITCH_SETTABLE_GATE: {
|
|
7
|
+
readonly method: 'getOptions';
|
|
8
|
+
readonly field: 'supportsSetState';
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* The predicate the on/off surfaces apply to a raw answer: true only when `answer` — what the switch's
|
|
12
|
+
* `getOptions` returned — says `supportsSetState: false`. `undefined` (no provider method, a
|
|
13
|
+
* failed or pending read) and any other shape are false: unknown keeps on/off (D315).
|
|
14
|
+
*/
|
|
15
|
+
export declare function switchRefusesSetState(answer: unknown): boolean;
|
|
@@ -13,6 +13,29 @@ export declare const SwitchStatusSchema: z.ZodObject<{
|
|
|
13
13
|
lastChangedAt: z.ZodNumber;
|
|
14
14
|
}, z.core.$strip>;
|
|
15
15
|
export type SwitchStatus = z.infer<typeof SwitchStatusSchema>;
|
|
16
|
+
/**
|
|
17
|
+
* What a switch can do, from its provider (`getOptions`). A provider that writes no
|
|
18
|
+
* `getOptions` is a plain on/off switch: the defaults are the old contract.
|
|
19
|
+
*
|
|
20
|
+
* - `supportsSetState: false` — the switch reports its state but cannot be set (a PoE port seen only
|
|
21
|
+
* through an API key). Its provider refuses `setState`; these surfaces withdraw on/off once the
|
|
22
|
+
* device ANSWERED this (`switchRefusesSetState`): the device hero, the automation action picker
|
|
23
|
+
* (`offeredWhen` on `switch.on` / `switch.off` / `switch.toggle`), the default `toggle`, the
|
|
24
|
+
* HomeKit, Alexa and Google exporters, and `power-source` on a device the switch powers
|
|
25
|
+
* (`getStatus().switchSettable`, `offeredWhen` on `powerSource.on` / `.off`, `not-settable`). A
|
|
26
|
+
* read that failed or is pending changes nothing (D315).
|
|
27
|
+
* - `supportsPowerCycle: true` — the device behind the switch can cut and restore its own output in
|
|
28
|
+
* one native call (a PoE port's power cycle). It has no control of its own: a linked
|
|
29
|
+
* `power-source.forceRestart` uses it instead of off / wait / on.
|
|
30
|
+
*/
|
|
31
|
+
export declare const SwitchOptionsSchema: z.ZodObject<{
|
|
32
|
+
supportsSetState: z.ZodDefault<z.ZodBoolean>;
|
|
33
|
+
supportsPowerCycle: z.ZodDefault<z.ZodBoolean>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type SwitchOptions = z.infer<typeof SwitchOptionsSchema>;
|
|
36
|
+
/** The options of a provider that did not answer `getOptions`: a plain on/off switch. */
|
|
37
|
+
export declare const SWITCH_DEFAULT_OPTIONS: SwitchOptions;
|
|
38
|
+
export { SWITCH_SETTABLE_GATE, switchRefusesSetState } from './switch-settable.js';
|
|
16
39
|
export declare const switchCapability: {
|
|
17
40
|
readonly name: 'switch';
|
|
18
41
|
readonly scope: 'device';
|
|
@@ -24,6 +47,19 @@ export declare const switchCapability: {
|
|
|
24
47
|
deviceId: z.ZodNumber;
|
|
25
48
|
on: z.ZodBoolean;
|
|
26
49
|
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
50
|
+
readonly getOptions: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
51
|
+
deviceId: z.ZodNumber;
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
+
supportsSetState: z.ZodDefault<z.ZodBoolean>;
|
|
54
|
+
supportsPowerCycle: z.ZodDefault<z.ZodBoolean>;
|
|
55
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind> & {
|
|
56
|
+
readonly providerOptional: true;
|
|
57
|
+
};
|
|
58
|
+
readonly powerCycle: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
59
|
+
deviceId: z.ZodNumber;
|
|
60
|
+
}, z.core.$strip>, z.ZodVoid, "mutation"> & {
|
|
61
|
+
readonly providerOptional: true;
|
|
62
|
+
};
|
|
27
63
|
readonly toggle: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
28
64
|
deviceId: z.ZodNumber;
|
|
29
65
|
}, z.core.$strip>, z.ZodVoid, "mutation"> & {
|
|
@@ -56,6 +92,19 @@ export declare const switchCapability: {
|
|
|
56
92
|
on: z.ZodNullable<z.ZodBoolean>;
|
|
57
93
|
lastChangedAt: z.ZodNumber;
|
|
58
94
|
}, z.core.$strip>;
|
|
95
|
+
readonly composedMethods: {
|
|
96
|
+
readonly getOptions: {
|
|
97
|
+
readonly kind: 'answer';
|
|
98
|
+
readonly value: {
|
|
99
|
+
supportsSetState: boolean;
|
|
100
|
+
supportsPowerCycle: boolean;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
readonly powerCycle: {
|
|
104
|
+
readonly kind: 'refuse';
|
|
105
|
+
readonly reason: 'a composed switch has no native power cycle';
|
|
106
|
+
};
|
|
107
|
+
};
|
|
59
108
|
/**
|
|
60
109
|
* Runtime-state durability: **restored** — device state an operator reads as authoritative; 55 devices, transition-driven.
|
|
61
110
|
*
|
|
@@ -292,6 +341,28 @@ export declare const switchCapability: {
|
|
|
292
341
|
};
|
|
293
342
|
};
|
|
294
343
|
};
|
|
344
|
+
readonly "poe-port": {
|
|
345
|
+
readonly actions: {
|
|
346
|
+
readonly 'switch.on': {
|
|
347
|
+
readonly label: import("../index.js").VocabL10n;
|
|
348
|
+
readonly phrase: import("../index.js").VocabL10n;
|
|
349
|
+
readonly icon: 'plug-zap';
|
|
350
|
+
};
|
|
351
|
+
readonly 'switch.off': {
|
|
352
|
+
readonly label: import("../index.js").VocabL10n;
|
|
353
|
+
readonly phrase: import("../index.js").VocabL10n;
|
|
354
|
+
readonly icon: 'unplug';
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
readonly state: {
|
|
358
|
+
readonly on: {
|
|
359
|
+
readonly label: import("../index.js").VocabL10n;
|
|
360
|
+
readonly whenTrue: import("../index.js").VocabL10n;
|
|
361
|
+
readonly whenFalse: import("../index.js").VocabL10n;
|
|
362
|
+
readonly icon: 'plug-zap';
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
};
|
|
295
366
|
};
|
|
296
367
|
};
|
|
297
368
|
};
|
|
@@ -34,33 +34,6 @@ declare const TerminalProfileInfoSchema: z.ZodObject<{
|
|
|
34
34
|
environment: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
35
35
|
settingsSchema: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
36
36
|
}, z.core.$strip>;
|
|
37
|
-
/**
|
|
38
|
-
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
39
|
-
* an instance declares a camera.
|
|
40
|
-
*/
|
|
41
|
-
declare const TerminalInstanceInfoSchema: z.ZodObject<{
|
|
42
|
-
instanceId: z.ZodString;
|
|
43
|
-
cameraStableId: z.ZodString;
|
|
44
|
-
nodeId: z.ZodString;
|
|
45
|
-
nodeInCluster: z.ZodBoolean;
|
|
46
|
-
profileId: z.ZodString;
|
|
47
|
-
profileLabel: z.ZodString;
|
|
48
|
-
name: z.ZodString;
|
|
49
|
-
enabled: z.ZodBoolean;
|
|
50
|
-
executable: z.ZodString;
|
|
51
|
-
args: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
52
|
-
cwd: z.ZodString;
|
|
53
|
-
environment: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
54
|
-
profileSettings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
55
|
-
}, z.core.$strip>;
|
|
56
|
-
declare const TerminalLegacyCameraSchema: z.ZodObject<{
|
|
57
|
-
stableId: z.ZodString;
|
|
58
|
-
nodeId: z.ZodString;
|
|
59
|
-
profileId: z.ZodString;
|
|
60
|
-
profileLabel: z.ZodString;
|
|
61
|
-
name: z.ZodString;
|
|
62
|
-
adoptable: z.ZodBoolean;
|
|
63
|
-
}, z.core.$strip>;
|
|
64
37
|
declare const TerminalOutputEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
65
38
|
seq: z.ZodNumber;
|
|
66
39
|
kind: z.ZodLiteral<"data">;
|
|
@@ -103,8 +76,8 @@ declare const TerminalOutputBatchSchema: z.ZodObject<{
|
|
|
103
76
|
* terminal-session — singleton system capability for interactive TTY sessions.
|
|
104
77
|
*
|
|
105
78
|
* Owns both live PTY lifecycle and durable Terminal instance management.
|
|
106
|
-
* Profiles are allowlisted templates;
|
|
107
|
-
*
|
|
79
|
+
* Profiles are allowlisted templates; a Terminal camera is a core block naming
|
|
80
|
+
* one Terminal (planning#580).
|
|
108
81
|
*/
|
|
109
82
|
export declare const terminalSessionCapability: {
|
|
110
83
|
readonly name: 'terminal-session';
|
|
@@ -122,34 +95,6 @@ export declare const terminalSessionCapability: {
|
|
|
122
95
|
environment: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
123
96
|
settingsSchema: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
124
97
|
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
125
|
-
/** Existing automatic cameras are shown for explicit migration only. */
|
|
126
|
-
readonly listLegacyCameras: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
127
|
-
stableId: z.ZodString;
|
|
128
|
-
nodeId: z.ZodString;
|
|
129
|
-
profileId: z.ZodString;
|
|
130
|
-
profileLabel: z.ZodString;
|
|
131
|
-
name: z.ZodString;
|
|
132
|
-
adoptable: z.ZodBoolean;
|
|
133
|
-
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
134
|
-
/** Explicitly adopt one legacy monitor camera, retaining its stable id. */
|
|
135
|
-
readonly adoptLegacyMonitor: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
136
|
-
stableId: z.ZodString;
|
|
137
|
-
name: z.ZodOptional<z.ZodString>;
|
|
138
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
139
|
-
instanceId: z.ZodString;
|
|
140
|
-
cameraStableId: z.ZodString;
|
|
141
|
-
nodeId: z.ZodString;
|
|
142
|
-
nodeInCluster: z.ZodBoolean;
|
|
143
|
-
profileId: z.ZodString;
|
|
144
|
-
profileLabel: z.ZodString;
|
|
145
|
-
name: z.ZodString;
|
|
146
|
-
enabled: z.ZodBoolean;
|
|
147
|
-
executable: z.ZodString;
|
|
148
|
-
args: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
149
|
-
cwd: z.ZodString;
|
|
150
|
-
environment: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
151
|
-
profileSettings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
152
|
-
}, z.core.$strip>, "mutation">;
|
|
153
98
|
/** Live sessions currently hosted by the provider. */
|
|
154
99
|
readonly listSessions: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
155
100
|
sessionId: z.ZodString;
|
|
@@ -242,10 +187,8 @@ export declare const terminalSessionCapability: {
|
|
|
242
187
|
export type ITerminalSessionProvider = InferProvider<typeof terminalSessionCapability>;
|
|
243
188
|
export type TerminalSessionInfo = z.infer<typeof TerminalSessionInfoSchema>;
|
|
244
189
|
export type TerminalProfileInfo = z.infer<typeof TerminalProfileInfoSchema>;
|
|
245
|
-
export type TerminalInstanceInfo = z.infer<typeof TerminalInstanceInfoSchema>;
|
|
246
|
-
export type TerminalLegacyCamera = z.infer<typeof TerminalLegacyCameraSchema>;
|
|
247
190
|
export type TerminalOutputEvent = z.infer<typeof TerminalOutputEventSchema>;
|
|
248
191
|
export type TerminalOutputBatch = z.infer<typeof TerminalOutputBatchSchema>;
|
|
249
192
|
export type ServerShellStatus = z.infer<typeof ServerShellStatusSchema>;
|
|
250
193
|
export type ServerShellRefusal = z.infer<typeof ServerShellRefusalSchema>;
|
|
251
|
-
export { ServerShellRefusalSchema, ServerShellStatusSchema,
|
|
194
|
+
export { ServerShellRefusalSchema, ServerShellStatusSchema, TerminalOutputBatchSchema, TerminalOutputEventSchema, TerminalProfileInfoSchema, TerminalSessionInfoSchema, };
|
|
@@ -861,6 +861,9 @@ export declare const videoclipsCapability: {
|
|
|
861
861
|
opus: "opus";
|
|
862
862
|
pcmu: "pcmu";
|
|
863
863
|
}>>;
|
|
864
|
+
wake: z.ZodOptional<z.ZodEnum<{
|
|
865
|
+
authorised: "authorised";
|
|
866
|
+
}>>;
|
|
864
867
|
}, z.core.$strip>, z.ZodObject<{
|
|
865
868
|
url: z.ZodString;
|
|
866
869
|
expiresAtMs: z.ZodNumber;
|