@camstack/types 1.1.32 → 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/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/addons.cap.d.ts +1 -1
- package/dist/capabilities/alerts.cap.d.ts +5 -5
- package/dist/capabilities/camera-streams.cap.d.ts +5 -5
- package/dist/capabilities/cap-router-predicates.d.ts +32 -0
- package/dist/capabilities/capability-definition.d.ts +18 -13
- package/dist/capabilities/consumables.cap.d.ts +1 -1
- package/dist/capabilities/custom-model-registry.cap.d.ts +38 -0
- package/dist/capabilities/index.d.ts +8 -15
- package/dist/capabilities/integrations.cap.d.ts +1 -1
- package/dist/capabilities/model-convert.cap.d.ts +22 -3
- package/dist/capabilities/model-distributor.cap.d.ts +38 -0
- package/dist/capabilities/network-quality.cap.d.ts +1 -1
- package/dist/capabilities/nodes.cap.d.ts +1 -1
- package/dist/capabilities/pipeline-executor.cap.d.ts +161 -8
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +87 -44
- package/dist/capabilities/pipeline-runner.cap.d.ts +10 -69
- package/dist/capabilities/snapshot.cap.d.ts +3 -3
- package/dist/capabilities/stream-broker.cap.d.ts +9 -1
- package/dist/capabilities/system.cap.d.ts +1 -1
- package/dist/capabilities/toast.cap.d.ts +1 -1
- package/dist/capabilities/webrtc-session.cap.d.ts +15 -1
- package/dist/device/index.d.ts +2 -0
- package/dist/device/reachability-poll.d.ts +90 -0
- package/dist/encode-profile.d.ts +2 -2
- package/dist/enums/event-category.d.ts +12 -0
- package/dist/generated/addon-api.d.ts +771 -643
- package/dist/generated/capability-router-map.d.ts +4 -16
- package/dist/generated/device-proxy.d.ts +0 -2
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +568 -350
- package/dist/index.mjs +551 -344
- package/dist/interfaces/capability.d.ts +0 -7
- package/dist/interfaces/event-bus.d.ts +9 -0
- package/dist/interfaces/pipeline-executor-capability.d.ts +14 -1
- package/dist/interfaces/pipeline-runner-capability.d.ts +11 -11
- package/dist/interfaces/recording-config.d.ts +2 -2
- package/dist/{sleep-CZDdRBua.mjs → sleep-Cc14_yxc.mjs} +12 -4
- package/dist/{sleep-Dirr8nGw.js → sleep-DmP-uxoe.js} +12 -4
- package/dist/types/agent-pipeline-settings.d.ts +18 -6
- package/dist/types/camera-pipeline.d.ts +17 -3
- package/dist/types/model-variant-groups.d.ts +100 -0
- package/dist/types/models.d.ts +63 -3
- package/package.json +1 -1
- package/dist/capabilities/restreamer.cap.d.ts +0 -54
- package/dist/capabilities/snapshot-provider.cap.d.ts +0 -43
- package/dist/capabilities/streaming-engine.cap.d.ts +0 -61
- package/dist/capabilities/webrtc.cap.d.ts +0 -75
- package/dist/interfaces/restreamer.d.ts +0 -23
- package/dist/interfaces/streaming.d.ts +0 -28
- package/dist/interfaces/webrtc-provider.d.ts +0 -34
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { type InferProvider } from './capability-definition.js';
|
|
3
|
-
declare const StreamFormatSchema: z.ZodEnum<{
|
|
4
|
-
rtsp: "rtsp";
|
|
5
|
-
webrtc: "webrtc";
|
|
6
|
-
hls: "hls";
|
|
7
|
-
mjpeg: "mjpeg";
|
|
8
|
-
}>;
|
|
9
|
-
declare const StreamInfoSchema: z.ZodObject<{
|
|
10
|
-
streamId: z.ZodString;
|
|
11
|
-
format: z.ZodEnum<{
|
|
12
|
-
rtsp: "rtsp";
|
|
13
|
-
webrtc: "webrtc";
|
|
14
|
-
hls: "hls";
|
|
15
|
-
mjpeg: "mjpeg";
|
|
16
|
-
}>;
|
|
17
|
-
url: z.ZodNullable<z.ZodString>;
|
|
18
|
-
active: z.ZodBoolean;
|
|
19
|
-
}, z.core.$strip>;
|
|
20
|
-
export declare const streamingEngineCapability: {
|
|
21
|
-
readonly name: "streaming-engine";
|
|
22
|
-
readonly scope: "system";
|
|
23
|
-
readonly mode: "singleton";
|
|
24
|
-
readonly internal: true;
|
|
25
|
-
readonly methods: {
|
|
26
|
-
readonly registerStream: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
27
|
-
streamId: z.ZodString;
|
|
28
|
-
sourceUrl: z.ZodString;
|
|
29
|
-
codec: z.ZodOptional<z.ZodString>;
|
|
30
|
-
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
31
|
-
readonly unregisterStream: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
32
|
-
streamId: z.ZodString;
|
|
33
|
-
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
34
|
-
readonly getStreamUrl: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
35
|
-
streamId: z.ZodString;
|
|
36
|
-
format: z.ZodEnum<{
|
|
37
|
-
rtsp: "rtsp";
|
|
38
|
-
webrtc: "webrtc";
|
|
39
|
-
hls: "hls";
|
|
40
|
-
mjpeg: "mjpeg";
|
|
41
|
-
}>;
|
|
42
|
-
}, z.core.$strip>, z.ZodNullable<z.ZodString>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
43
|
-
readonly listStreams: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodArray<z.ZodObject<{
|
|
44
|
-
streamId: z.ZodString;
|
|
45
|
-
format: z.ZodEnum<{
|
|
46
|
-
rtsp: "rtsp";
|
|
47
|
-
webrtc: "webrtc";
|
|
48
|
-
hls: "hls";
|
|
49
|
-
mjpeg: "mjpeg";
|
|
50
|
-
}>;
|
|
51
|
-
url: z.ZodNullable<z.ZodString>;
|
|
52
|
-
active: z.ZodBoolean;
|
|
53
|
-
}, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
54
|
-
};
|
|
55
|
-
/** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
|
|
56
|
-
readonly mount: {
|
|
57
|
-
readonly kind: "skip";
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
export type IStreamingEngineProvider = InferProvider<typeof streamingEngineCapability>;
|
|
61
|
-
export { StreamFormatSchema, StreamInfoSchema };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { type InferProvider } from './capability-definition.js';
|
|
3
|
-
/**
|
|
4
|
-
* Optional client-side hints sent at session creation to help the
|
|
5
|
-
* provider pick the best native source. All fields are optional —
|
|
6
|
-
* a viewer that knows nothing still gets a sane default.
|
|
7
|
-
*/
|
|
8
|
-
export declare const webrtcClientHintsSchema: z.ZodObject<{
|
|
9
|
-
viewportWidth: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
10
|
-
viewportHeight: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
11
|
-
devicePixelRatio: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
12
|
-
downlinkMbps: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
13
|
-
prefersTier: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
export type WebrtcClientHints = z.infer<typeof webrtcClientHintsSchema>;
|
|
16
|
-
export declare const webrtcCapability: {
|
|
17
|
-
readonly name: "webrtc";
|
|
18
|
-
readonly scope: "system";
|
|
19
|
-
readonly mode: "collection";
|
|
20
|
-
readonly internal: true;
|
|
21
|
-
readonly methods: {
|
|
22
|
-
readonly handleOffer: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
23
|
-
streamId: z.ZodString;
|
|
24
|
-
sdpOffer: z.ZodString;
|
|
25
|
-
}, z.core.$strip>, z.ZodString, "mutation">;
|
|
26
|
-
readonly supportsStream: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
27
|
-
streamId: z.ZodString;
|
|
28
|
-
}, z.core.$strip>, z.ZodBoolean, import("./capability-definition.js").CapabilityMethodKind>;
|
|
29
|
-
readonly registerStream: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
30
|
-
streamId: z.ZodString;
|
|
31
|
-
codec: z.ZodString;
|
|
32
|
-
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
33
|
-
readonly unregisterStream: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
34
|
-
streamId: z.ZodString;
|
|
35
|
-
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
36
|
-
/**
|
|
37
|
-
* Two-step server-offer signaling. `hints` is optional — providers
|
|
38
|
-
* that don't care about adaptive source selection ignore it.
|
|
39
|
-
*/
|
|
40
|
-
readonly createSession: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
41
|
-
streamId: z.ZodString;
|
|
42
|
-
hints: z.ZodOptional<z.ZodObject<{
|
|
43
|
-
viewportWidth: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
44
|
-
viewportHeight: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
45
|
-
devicePixelRatio: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
46
|
-
downlinkMbps: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
47
|
-
prefersTier: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
48
|
-
}, z.core.$strip>>;
|
|
49
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
50
|
-
sessionId: z.ZodString;
|
|
51
|
-
sdpOffer: z.ZodString;
|
|
52
|
-
}, z.core.$strip>, "mutation">;
|
|
53
|
-
readonly handleAnswer: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
54
|
-
sessionId: z.ZodString;
|
|
55
|
-
sdpAnswer: z.ZodString;
|
|
56
|
-
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
57
|
-
readonly closeSession: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
58
|
-
sessionId: z.ZodString;
|
|
59
|
-
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
60
|
-
/**
|
|
61
|
-
* Whether this provider supports adaptive bitrate for the given stream.
|
|
62
|
-
* Currently always false — adaptive selection is one-shot at session
|
|
63
|
-
* start, not in-session encoder switching. Phase 5 plans to layer
|
|
64
|
-
* encoder-driven adaptation on top.
|
|
65
|
-
*/
|
|
66
|
-
readonly hasAdaptiveBitrate: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
67
|
-
streamId: z.ZodString;
|
|
68
|
-
}, z.core.$strip>, z.ZodBoolean, import("./capability-definition.js").CapabilityMethodKind>;
|
|
69
|
-
};
|
|
70
|
-
/** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
|
|
71
|
-
readonly mount: {
|
|
72
|
-
readonly kind: "skip";
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
export type IWebrtcProvider = InferProvider<typeof webrtcCapability>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { EncodedPacket } from './stream-broker.js';
|
|
2
|
-
export interface RegisteredStream {
|
|
3
|
-
readonly streamId: string;
|
|
4
|
-
readonly label: string;
|
|
5
|
-
readonly codec: string;
|
|
6
|
-
readonly type: 'video' | 'audio';
|
|
7
|
-
readonly sourceUrl?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface RestreamerExposedResource {
|
|
10
|
-
readonly type: string;
|
|
11
|
-
readonly format: string;
|
|
12
|
-
readonly value: string;
|
|
13
|
-
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
14
|
-
}
|
|
15
|
-
export interface IRestreamer {
|
|
16
|
-
readonly id: string;
|
|
17
|
-
readonly name: string;
|
|
18
|
-
registerDevice(deviceId: number, streams: readonly RegisteredStream[]): Promise<void>;
|
|
19
|
-
pushPacket(streamId: string, packet: EncodedPacket): void;
|
|
20
|
-
unregisterDevice(deviceId: number): Promise<void>;
|
|
21
|
-
getExposedResources(deviceId: number): readonly RestreamerExposedResource[];
|
|
22
|
-
proxyWhepOffer?(streamId: string, sdpOffer: string): Promise<string>;
|
|
23
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export type StreamFormat = 'webrtc' | 'hls' | 'mjpeg' | 'rtsp';
|
|
2
|
-
export interface StreamingSource {
|
|
3
|
-
readonly url: string;
|
|
4
|
-
readonly protocol: 'rtsp' | 'http' | 'rtmp';
|
|
5
|
-
readonly deviceId: string;
|
|
6
|
-
readonly providerId: string;
|
|
7
|
-
readonly label?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface StreamInfo {
|
|
10
|
-
readonly streamId: string;
|
|
11
|
-
readonly source: StreamingSource;
|
|
12
|
-
readonly formats: StreamFormat[];
|
|
13
|
-
}
|
|
14
|
-
export interface StreamStatus {
|
|
15
|
-
readonly active: boolean;
|
|
16
|
-
readonly viewers: number;
|
|
17
|
-
readonly startedAt?: number;
|
|
18
|
-
}
|
|
19
|
-
export interface IStreamingEngine {
|
|
20
|
-
initialize(config: Record<string, unknown>): Promise<void>;
|
|
21
|
-
shutdown(): Promise<void>;
|
|
22
|
-
registerStream(streamId: string, source: StreamingSource): Promise<void>;
|
|
23
|
-
unregisterStream(streamId: string): Promise<void>;
|
|
24
|
-
getStreamUrl(streamId: string, format: StreamFormat): string | null;
|
|
25
|
-
proxyWhepOffer(streamId: string, sdpOffer: string): Promise<string>;
|
|
26
|
-
listStreams(): StreamInfo[];
|
|
27
|
-
getStreamStatus(streamId: string): StreamStatus | null;
|
|
28
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { EncodedPacket } from './stream-broker.js';
|
|
2
|
-
import type { WebrtcClientHints } from '../capabilities/webrtc.cap.js';
|
|
3
|
-
export interface IWebRtcProvider {
|
|
4
|
-
readonly id: string;
|
|
5
|
-
readonly name: string;
|
|
6
|
-
handleOffer(streamId: string, sdpOffer: string): Promise<string>;
|
|
7
|
-
supportsStream(streamId: string): boolean;
|
|
8
|
-
registerStream(streamId: string, codec: string): Promise<void>;
|
|
9
|
-
pushPacket(streamId: string, packet: EncodedPacket): void;
|
|
10
|
-
unregisterStream(streamId: string): Promise<void>;
|
|
11
|
-
/**
|
|
12
|
-
* Server-offer signaling: create a session and return the server SDP
|
|
13
|
-
* offer. Single-object signature matches `InferProvider<>` so the
|
|
14
|
-
* generated cap-router can dispatch directly. `hints` is optional
|
|
15
|
-
* client metadata (viewport, downlink) the provider can use to pick
|
|
16
|
-
* the best native source.
|
|
17
|
-
*/
|
|
18
|
-
createSession?(input: {
|
|
19
|
-
streamId: string;
|
|
20
|
-
hints?: WebrtcClientHints;
|
|
21
|
-
}): Promise<{
|
|
22
|
-
sessionId: string;
|
|
23
|
-
sdpOffer: string;
|
|
24
|
-
}>;
|
|
25
|
-
/** Server-offer signaling: accept the client SDP answer for a session. */
|
|
26
|
-
handleAnswer?(input: {
|
|
27
|
-
sessionId: string;
|
|
28
|
-
sdpAnswer: string;
|
|
29
|
-
}): Promise<void>;
|
|
30
|
-
/** Explicitly close a WebRTC session (called on client disconnect). */
|
|
31
|
-
closeSession?(input: {
|
|
32
|
-
sessionId: string;
|
|
33
|
-
}): Promise<void>;
|
|
34
|
-
}
|