@camstack/types 1.2.321 → 1.2.323
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 +3 -14
- package/dist/addon.mjs +3 -14
- package/dist/capabilities/decoder.cap.d.ts +0 -211
- package/dist/capabilities/index.d.ts +8 -8
- package/dist/capabilities/llm-runtime.cap.d.ts +3 -3
- package/dist/capabilities/llm.cap.d.ts +4 -4
- package/dist/capabilities/local-network.cap.d.ts +11 -11
- package/dist/capabilities/metrics-provider.cap.d.ts +2 -2
- package/dist/capabilities/pipeline-executor.cap.d.ts +1 -112
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +18 -303
- package/dist/capabilities/pipeline-runner.cap.d.ts +0 -2
- package/dist/capabilities/schemas/streaming-shared.d.ts +9 -79
- package/dist/capabilities/stream-broker.cap.d.ts +0 -85
- package/dist/capabilities/webrtc-session.cap.d.ts +0 -2
- package/dist/client.js +3 -89
- package/dist/client.mjs +3 -89
- package/dist/enums/event-category.d.ts +0 -9
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-BGmz_oxW.mjs → event-category-B_0XEcLF.mjs} +0 -9
- package/dist/{event-category-DmS_tLsU.js → event-category-CtBAl88K.js} +0 -9
- package/dist/ffmpeg/hwaccel.d.ts +1 -1
- package/dist/generated/addon-api.d.ts +0 -161
- package/dist/generated/cap-input-defaults.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 +4 -4
- package/dist/index.d.ts +2 -3
- package/dist/index.js +33 -425
- package/dist/index.mjs +34 -416
- package/dist/interfaces/api-responses.d.ts +0 -19
- package/dist/interfaces/capability.d.ts +1 -2
- package/dist/interfaces/event-bus.d.ts +0 -13
- package/dist/interfaces/pipeline-executor-capability.d.ts +1 -15
- package/dist/interfaces/pipeline-runner-capability.d.ts +0 -1
- package/dist/interfaces/stream-broker.d.ts +2 -67
- package/dist/{sleep-DAJ9Er57.mjs → sleep-BNeXenvr.mjs} +11 -86
- package/dist/{sleep-AalHiRYL.js → sleep-DPar9AHl.js} +10 -115
- package/dist/types/camera-pipeline.d.ts +3 -20
- package/dist/types/detection.d.ts +1 -1
- package/dist/types/pipeline-schema.d.ts +1 -8
- package/package.json +1 -1
- package/dist/interfaces/decoder.d.ts +0 -89
|
@@ -111,25 +111,6 @@ export interface IntegrationTypeInfo {
|
|
|
111
111
|
}>;
|
|
112
112
|
readonly canAdd: boolean;
|
|
113
113
|
}
|
|
114
|
-
/** Return shape of `streaming.listBrokers` procedure */
|
|
115
|
-
export interface BrokerSummary {
|
|
116
|
-
readonly brokerId: string;
|
|
117
|
-
readonly status: string;
|
|
118
|
-
readonly inputFps: number;
|
|
119
|
-
readonly decodeFps: number;
|
|
120
|
-
readonly subscribers: number;
|
|
121
|
-
readonly uptimeMs: number;
|
|
122
|
-
readonly bitrateKbps: number;
|
|
123
|
-
readonly idrIntervalMs: number;
|
|
124
|
-
readonly codec?: string;
|
|
125
|
-
readonly totalBytes: number;
|
|
126
|
-
readonly packetCount: number;
|
|
127
|
-
readonly rtspClients: number;
|
|
128
|
-
readonly pipeClients: number;
|
|
129
|
-
readonly preBufferSec: number;
|
|
130
|
-
readonly preBufferMs: number;
|
|
131
|
-
readonly preBufferPackets: number;
|
|
132
|
-
}
|
|
133
114
|
/** Return shape of `auth.login` procedure */
|
|
134
115
|
export interface LoginResponse {
|
|
135
116
|
readonly token: string;
|
|
@@ -7,7 +7,6 @@ import type { CollectionCapabilityName, SingletonCapabilityName } from '../gener
|
|
|
7
7
|
import type { StepDefinition } from '../types/pipeline-step.js';
|
|
8
8
|
import type { IAddonPageProvider } from './addon.js';
|
|
9
9
|
import type { IAddonRouteProvider } from './addon-routes.js';
|
|
10
|
-
import type { IDecoderProvider } from './decoder.js';
|
|
11
10
|
import type { ILogDestination } from './logging.js';
|
|
12
11
|
import type { IPipelineExecutorProvider } from './pipeline-executor-capability.js';
|
|
13
12
|
import type { IPipelineOrchestratorProvider } from './pipeline-orchestrator-capability.js';
|
|
@@ -147,7 +146,7 @@ export interface CapabilityProviderMap {
|
|
|
147
146
|
'pipeline-runner': IPipelineRunnerProvider;
|
|
148
147
|
'motion-detection': InferProvider<typeof import('../capabilities/motion-detection.cap.js').motionDetectionCapability>;
|
|
149
148
|
'embedding-encoder': InferProvider<typeof import('../capabilities/embedding-encoder.cap.js').embeddingEncoderCapability>;
|
|
150
|
-
decoder:
|
|
149
|
+
decoder: InferProvider<typeof import('../capabilities/decoder.cap.js').decoderCapability>;
|
|
151
150
|
'audio-analyzer': InferProvider<typeof import('../capabilities/audio-analyzer.cap.js').audioAnalyzerCapability>;
|
|
152
151
|
'audio-analysis': InferProvider<typeof import('../capabilities/audio-analysis.cap.js').audioAnalysisCapability>;
|
|
153
152
|
'audio-codec': InferProvider<typeof import('../capabilities/audio-codec.cap.js').audioCodecCapability>;
|
|
@@ -1378,19 +1378,6 @@ export interface EventCatalog {
|
|
|
1378
1378
|
*/
|
|
1379
1379
|
readonly containerMemory: ContainerMemorySnapshot | null;
|
|
1380
1380
|
};
|
|
1381
|
-
/**
|
|
1382
|
-
* Per-agent hwaccel override changed (set / cleared / re-probed). Payload
|
|
1383
|
-
* carries the new effective preference so UI consumers can toast or
|
|
1384
|
-
* refresh their pipeline view without re-fetching. Decoders still pull
|
|
1385
|
-
* from `pipeline-orchestrator.getAgentSettings` on session creation;
|
|
1386
|
-
* this event is additive observability.
|
|
1387
|
-
*/
|
|
1388
|
-
'pipeline.agent-hwaccel-changed': {
|
|
1389
|
-
readonly agentNodeId: string;
|
|
1390
|
-
readonly userChoice: 'auto' | 'none' | string | null;
|
|
1391
|
-
readonly probedBest: string;
|
|
1392
|
-
readonly reason: 'user-set' | 'user-cleared' | 'reprobed' | 'seeded';
|
|
1393
|
-
};
|
|
1394
1381
|
/** Capability binding changed for a node — kernels update their preferred-provider registry. */
|
|
1395
1382
|
'capability.binding-changed': CapabilityBindingChangedPayload;
|
|
1396
1383
|
'model.download.progress': {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PipelineEngineChoice, PipelineConfig } from '../types/pipeline.js';
|
|
2
2
|
import type { PipelineExecutionPlane } from '../types/pipeline-step.js';
|
|
3
|
-
import type { PipelineSchema, PipelineDefaultStep
|
|
3
|
+
import type { PipelineSchema, PipelineDefaultStep } from '../types/pipeline-schema.js';
|
|
4
4
|
import type { ModelFormat } from '../types/models.js';
|
|
5
5
|
import type { FrameInput } from '../types/io.js';
|
|
6
6
|
import type { FrameRef } from '../types/frame-view.js';
|
|
@@ -239,20 +239,6 @@ export interface IPipelineExecutorProvider {
|
|
|
239
239
|
error?: string;
|
|
240
240
|
frame?: import('../types/detection.js').AudioResult;
|
|
241
241
|
}>;
|
|
242
|
-
listTemplates(): Promise<PipelineTemplate[]>;
|
|
243
|
-
saveTemplate(input: {
|
|
244
|
-
name: string;
|
|
245
|
-
steps: readonly PipelineTemplateStep[];
|
|
246
|
-
engine: PipelineEngineChoice;
|
|
247
|
-
}): Promise<PipelineTemplate>;
|
|
248
|
-
updateTemplate(input: {
|
|
249
|
-
id: string;
|
|
250
|
-
name?: string;
|
|
251
|
-
steps?: readonly PipelineTemplateStep[];
|
|
252
|
-
}): Promise<PipelineTemplate>;
|
|
253
|
-
deleteTemplate(input: {
|
|
254
|
-
id: string;
|
|
255
|
-
}): Promise<void>;
|
|
256
242
|
/** Get the detection pipeline addon's config schema (for detection-config UI). */
|
|
257
243
|
getDetectionConfigSchema(): Promise<ConfigUISchema | null>;
|
|
258
244
|
/** Get the addon resolver for runtime pipeline execution */
|
|
@@ -153,7 +153,6 @@ export interface RunnerDeviceLoad {
|
|
|
153
153
|
readonly deviceKey: string;
|
|
154
154
|
readonly backend: string;
|
|
155
155
|
readonly attachedCameras: number;
|
|
156
|
-
readonly queueDepthTotal: number;
|
|
157
156
|
}
|
|
158
157
|
/**
|
|
159
158
|
* Runtime load summary returned by `getLocalLoad`. The orchestrator's L2
|
|
@@ -1,40 +1,9 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import type { AudioStreamPick, BrokerStatsSchema, BrokerStatusSchema, SubscribeAudioChunksResult
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import type { AudioStreamPick, BrokerStatsSchema, BrokerStatusSchema, SubscribeAudioChunksResult } from '../capabilities/schemas/streaming-shared.js';
|
|
3
3
|
import type { BrokerConsumerAttribution } from '../capabilities/stream-broker.cap.js';
|
|
4
4
|
import type { FrameRef } from '../types/frame-view.js';
|
|
5
5
|
import type { FrameFormat } from '../types/io.js';
|
|
6
|
-
import type { FrameHandle } from './frame-handle.js';
|
|
7
6
|
import type { AudioChunkFormat } from '../audio/audio-chunk-format.js';
|
|
8
|
-
export declare const DecoderStatsSchema: z.ZodObject<{
|
|
9
|
-
inputFps: z.ZodNumber;
|
|
10
|
-
outputFps: z.ZodNumber;
|
|
11
|
-
avgDecodeTimeMs: z.ZodNumber;
|
|
12
|
-
droppedFrames: z.ZodNumber;
|
|
13
|
-
lagMs: z.ZodOptional<z.ZodNumber>;
|
|
14
|
-
effectiveFps: z.ZodOptional<z.ZodNumber>;
|
|
15
|
-
adaptiveFps: z.ZodOptional<z.ZodNumber>;
|
|
16
|
-
}, z.core.$strip>;
|
|
17
|
-
export declare const DecoderSessionConfigSchema: z.ZodObject<{
|
|
18
|
-
codec: z.ZodString;
|
|
19
|
-
maxFps: z.ZodDefault<z.ZodNumber>;
|
|
20
|
-
outputFormat: z.ZodDefault<z.ZodEnum<{
|
|
21
|
-
jpeg: "jpeg";
|
|
22
|
-
rgb: "rgb";
|
|
23
|
-
bgr: "bgr";
|
|
24
|
-
yuv420: "yuv420";
|
|
25
|
-
gray: "gray";
|
|
26
|
-
}>>;
|
|
27
|
-
scale: z.ZodDefault<z.ZodNumber>;
|
|
28
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
29
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
30
|
-
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
31
|
-
tag: z.ZodOptional<z.ZodString>;
|
|
32
|
-
frameSink: z.ZodDefault<z.ZodEnum<{
|
|
33
|
-
callback: "callback";
|
|
34
|
-
shm: "shm";
|
|
35
|
-
}>>;
|
|
36
|
-
debug: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
-
}, z.core.$strip>;
|
|
38
7
|
export type Unsubscribe = () => void;
|
|
39
8
|
/**
|
|
40
9
|
* Discriminator for `StreamSource.type`. Values that the broker
|
|
@@ -339,20 +308,6 @@ export interface IStreamBroker {
|
|
|
339
308
|
pullAudioChunks(subscriptionId: string, maxCount: number): readonly DecodedAudioChunk[];
|
|
340
309
|
/** Release an audio-chunk subscription. Returns `true` when it existed. */
|
|
341
310
|
unsubscribeAudioChunks(subscriptionId: string): boolean;
|
|
342
|
-
/**
|
|
343
|
-
* Open a shared-memory frame-handle subscription (Phase 5 / D9) — the
|
|
344
|
-
* handle-based decoded-frame surface. The broker spins up a
|
|
345
|
-
* `frameSink: 'shm'` decoder session producing the requested `format` and
|
|
346
|
-
* returns a `subscriptionId` the consumer polls via `pullFrameHandles`.
|
|
347
|
-
* Reachable over tRPC (the `stream-broker.subscribeFrames` cap method), so a
|
|
348
|
-
* consumer in a separate process can subscribe — pixels travel through the
|
|
349
|
-
* shm ring, never the RPC wire.
|
|
350
|
-
*/
|
|
351
|
-
subscribeFrameHandles(input: Omit<SubscribeFramesInput, 'brokerId'>): Promise<SubscribeFramesResult>;
|
|
352
|
-
/** Drain up to `maxCount` `FrameHandle`s for a frame-handle subscription. */
|
|
353
|
-
pullFrameHandles(subscriptionId: string, maxCount: number): readonly FrameHandle[];
|
|
354
|
-
/** Release a frame-handle subscription. Returns `true` when it existed. */
|
|
355
|
-
unsubscribeFrameHandles(subscriptionId: string): Promise<boolean>;
|
|
356
311
|
getStats(): BrokerStats;
|
|
357
312
|
getLocalStreamUrl(): string;
|
|
358
313
|
/**
|
|
@@ -382,26 +337,6 @@ export interface RtspRestreamEntry {
|
|
|
382
337
|
readonly mutedUrl: string;
|
|
383
338
|
readonly enabled: boolean;
|
|
384
339
|
}
|
|
385
|
-
/** Flat cap-shaped broker record returned by `listBrokers()`. */
|
|
386
|
-
export interface BrokerListEntry {
|
|
387
|
-
readonly brokerId: string;
|
|
388
|
-
readonly status: string;
|
|
389
|
-
readonly inputFps: number;
|
|
390
|
-
readonly decodeFps: number;
|
|
391
|
-
readonly encodedSubscribers: number;
|
|
392
|
-
readonly decodedSubscribers: number;
|
|
393
|
-
readonly uptimeMs: number;
|
|
394
|
-
readonly bitrateKbps: number;
|
|
395
|
-
readonly idrIntervalMs: number;
|
|
396
|
-
readonly codec?: string;
|
|
397
|
-
readonly totalBytes: number;
|
|
398
|
-
readonly packetCount: number;
|
|
399
|
-
readonly rtspClients: number;
|
|
400
|
-
readonly pipeClients: number;
|
|
401
|
-
readonly preBufferSec: number;
|
|
402
|
-
readonly preBufferMs: number;
|
|
403
|
-
readonly preBufferPackets: number;
|
|
404
|
-
}
|
|
405
340
|
/**
|
|
406
341
|
* Phase the runner's per-camera state machine occupies. `'idle'` is the
|
|
407
342
|
* `detectionMode === 'disabled'` resting state — runner registered the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as EventCategory } from "./event-category-
|
|
1
|
+
import { t as EventCategory } from "./event-category-B_0XEcLF.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/audio/audio-chunk-format.ts
|
|
4
4
|
/**
|
|
@@ -1676,32 +1676,12 @@ var StreamSourceSchema = z.object({
|
|
|
1676
1676
|
audioCodec: z.string().optional(),
|
|
1677
1677
|
metadata: z.record(z.string(), z.unknown()).readonly().optional()
|
|
1678
1678
|
});
|
|
1679
|
-
var EncodedPacketSchema = z.object({
|
|
1680
|
-
type: z.enum(["video", "audio"]),
|
|
1681
|
-
data: z.instanceof(Uint8Array),
|
|
1682
|
-
pts: z.number(),
|
|
1683
|
-
dts: z.number(),
|
|
1684
|
-
keyframe: z.boolean(),
|
|
1685
|
-
codec: z.string()
|
|
1686
|
-
});
|
|
1687
|
-
var DecodedFrameSchema = z.object({
|
|
1688
|
-
data: z.instanceof(Uint8Array),
|
|
1689
|
-
width: z.number(),
|
|
1690
|
-
height: z.number(),
|
|
1691
|
-
format: z.enum([
|
|
1692
|
-
"jpeg",
|
|
1693
|
-
"rgb",
|
|
1694
|
-
"bgr",
|
|
1695
|
-
"yuv420",
|
|
1696
|
-
"gray"
|
|
1697
|
-
]),
|
|
1698
|
-
timestamp: z.number()
|
|
1699
|
-
});
|
|
1700
1679
|
/**
|
|
1701
1680
|
* Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
|
|
1702
1681
|
* frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
|
|
1703
|
-
* interface in `interfaces/frame-handle.ts` field-for-field so a
|
|
1704
|
-
*
|
|
1682
|
+
* interface in `interfaces/frame-handle.ts` field-for-field so a cap method
|
|
1683
|
+
* (the runner's native-crop and pipeline-executor inputs) can carry handles
|
|
1684
|
+
* over tRPC / Moleculer.
|
|
1705
1685
|
*
|
|
1706
1686
|
* The `satisfies` assertion below pins this schema to the interface: if a
|
|
1707
1687
|
* field is added to / removed from `FrameHandle` without a matching schema
|
|
@@ -1727,50 +1707,6 @@ var FrameHandleSchema = z.object({
|
|
|
1727
1707
|
slotCount: z.number().int().positive()
|
|
1728
1708
|
});
|
|
1729
1709
|
/**
|
|
1730
|
-
* Pixel format a frame-handle subscriber can request from the broker
|
|
1731
|
-
* (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
|
|
1732
|
-
* `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
|
|
1733
|
-
* `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
|
|
1734
|
-
* payload, and no decoded-frame consumer requests it over the shm plane.
|
|
1735
|
-
*/
|
|
1736
|
-
var FrameHandleFormatSchema = z.enum([
|
|
1737
|
-
"rgb",
|
|
1738
|
-
"bgr",
|
|
1739
|
-
"yuv420",
|
|
1740
|
-
"gray"
|
|
1741
|
-
]);
|
|
1742
|
-
/**
|
|
1743
|
-
* Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
|
|
1744
|
-
* broker for a `FrameHandle` stream of one `format`; the broker maintains one
|
|
1745
|
-
* shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
|
|
1746
|
-
* subscriber (motion) and an `rgb` subscriber (detection) each read the format
|
|
1747
|
-
* they asked for with no broker-side conversion.
|
|
1748
|
-
*/
|
|
1749
|
-
var SubscribeFramesInputSchema = z.object({
|
|
1750
|
-
brokerId: z.string(),
|
|
1751
|
-
format: FrameHandleFormatSchema,
|
|
1752
|
-
/**
|
|
1753
|
-
* Optional reader-side cadence hint in frames per second. The broker does
|
|
1754
|
-
* NOT throttle — latest-wins ring reads drop frames implicitly for a slow
|
|
1755
|
-
* consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
|
|
1756
|
-
* the consumer can pace its own `pullFrameHandles` polling.
|
|
1757
|
-
*/
|
|
1758
|
-
maxFps: z.number().positive().optional(),
|
|
1759
|
-
/** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
|
|
1760
|
-
tag: z.string().optional()
|
|
1761
|
-
});
|
|
1762
|
-
/**
|
|
1763
|
-
* Result of `stream-broker.subscribeFrames`. The consumer then polls
|
|
1764
|
-
* `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
|
|
1765
|
-
* `FrameHandle` to a `FrameRingReader`.
|
|
1766
|
-
*/
|
|
1767
|
-
var SubscribeFramesResultSchema = z.object({
|
|
1768
|
-
/** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
|
|
1769
|
-
subscriptionId: z.string(),
|
|
1770
|
-
/** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
|
|
1771
|
-
maxFps: z.number().nonnegative()
|
|
1772
|
-
});
|
|
1773
|
-
/**
|
|
1774
1710
|
* Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
|
|
1775
1711
|
* `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
|
|
1776
1712
|
* sample bytes plus the track parameters a consumer needs to interpret them.
|
|
@@ -1778,8 +1714,8 @@ var SubscribeFramesResultSchema = z.object({
|
|
|
1778
1714
|
* Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
|
|
1779
1715
|
* Float32 PCM), so unlike video frames they ship their bytes INLINE over
|
|
1780
1716
|
* tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
|
|
1781
|
-
* (the wire-serialisable supertype of `Buffer`)
|
|
1782
|
-
*
|
|
1717
|
+
* (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
|
|
1718
|
+
* it.
|
|
1783
1719
|
*/
|
|
1784
1720
|
var AudioChunkFormatSchema = z.enum(AUDIO_CHUNK_FORMATS);
|
|
1785
1721
|
var DecodedAudioChunkSchema = z.object({
|
|
@@ -1797,11 +1733,10 @@ var DecodedAudioChunkSchema = z.object({
|
|
|
1797
1733
|
format: AudioChunkFormatSchema.optional()
|
|
1798
1734
|
});
|
|
1799
1735
|
/**
|
|
1800
|
-
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9).
|
|
1801
|
-
*
|
|
1802
|
-
*
|
|
1803
|
-
*
|
|
1804
|
-
* `pullAudioChunks`.
|
|
1736
|
+
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). Audio ships
|
|
1737
|
+
* its bytes inline: a consumer asks the broker for the decoded audio-chunk
|
|
1738
|
+
* stream of one broker; the broker keeps a per-subscription bounded FIFO queue
|
|
1739
|
+
* the consumer drains via `pullAudioChunks`.
|
|
1805
1740
|
*/
|
|
1806
1741
|
var SubscribeAudioChunksInputSchema = z.object({
|
|
1807
1742
|
brokerId: z.string(),
|
|
@@ -1833,9 +1768,7 @@ var BrokerStatusSchema = z.enum([
|
|
|
1833
1768
|
var BrokerStatsSchema = z.object({
|
|
1834
1769
|
status: BrokerStatusSchema,
|
|
1835
1770
|
inputFps: z.number(),
|
|
1836
|
-
decodeFps: z.number(),
|
|
1837
1771
|
encodedSubscribers: z.number(),
|
|
1838
|
-
decodedSubscribers: z.number(),
|
|
1839
1772
|
uptimeMs: z.number(),
|
|
1840
1773
|
bitrateKbps: z.number(),
|
|
1841
1774
|
idrIntervalMs: z.number(),
|
|
@@ -1848,14 +1781,6 @@ var BrokerStatsSchema = z.object({
|
|
|
1848
1781
|
preBufferMs: z.number(),
|
|
1849
1782
|
preBufferPackets: z.number(),
|
|
1850
1783
|
/**
|
|
1851
|
-
* Moleculer node id of the decoder provider currently servicing this
|
|
1852
|
-
* stream's decoded subscribers. `null` until the deferred decoder is
|
|
1853
|
-
* created (no decoded clients yet, or codec not detected). Surfaces the
|
|
1854
|
-
* runtime decoder placement so the UI can show "Decoder: <agent>" without
|
|
1855
|
-
* a separate cap call per broker.
|
|
1856
|
-
*/
|
|
1857
|
-
decoderNodeId: z.string().nullable(),
|
|
1858
|
-
/**
|
|
1859
1784
|
* Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
|
|
1860
1785
|
* when the stream has no audio track or the broker is in cold start.
|
|
1861
1786
|
* `supported = false` means the codec was detected but the local
|
|
@@ -4258,4 +4183,4 @@ function sleepCancellable(ms, signal) {
|
|
|
4258
4183
|
});
|
|
4259
4184
|
}
|
|
4260
4185
|
//#endregion
|
|
4261
|
-
export { CamProfileSchema as $, DEVICE_STATUS_METHOD as A,
|
|
4186
|
+
export { CamProfileSchema as $, DEVICE_STATUS_METHOD as A, isEvent as At, nodePin as B, isAudioChunkFormat as Bt, customAction as C, DisposerChain as Ct, adminUiCapability as D, createDurableState as Dt, deviceCustomAction as E, normalizeNodeId as Et, method as F, hydrateSchema as Ft, emitDownForOwnedCaps as G, toNodeId as H, optionalMethod as I, resolveHydratedFieldValue as It, AudioChunkFormatSchema as J, readinessKey as K, resolveCapMount as L, AUDIO_CHUNK_FORMATS as Lt, event as M, WELL_KNOWN_TAB_MAP as Mt, expandCapMethods as N, collectHydratedFieldEntries as Nt, DEFAULT_RUNTIME_STATE_DURABILITY as O, createEvent as Ot, isDeviceConfigCap as P, collectHydratedFieldValues as Pt, CAM_PROFILE_ORDER as Q, systemMethod as R, audioChunkBytesPerSample as Rt, DEVICE_CHILDREN_BATCH_MAX as S, SHARE_VIEW_KINDS as St, describeCustomActions as T, normalizeAddonInitResult as Tt, ReadinessRegistry as U, readNodePin as V, ReadinessTimeoutError as W, BrokerStatsSchema as X, AudioStreamPickSchema as Y, BrokerStatusSchema as Z, createMirrorSource as _, PEER_BYTES_MAX_OUTSTANDING as _t, asJsonObject as a, ProfileRtspEntrySchema as at, deviceOpsCapability as b, PeerBytesTicketSchema as bt, parseJsonArray as c, StreamSourceEntrySchema$1 as ct, BOOT_RECOVERY_BACKOFF_MS as d, SubscribeAudioChunksResultSchema as dt, CamStreamKindSchema as et, DEVICE_SCOPED_CAPS as f, makeProfileBrokerId as ft, createLazyTrpcSource as g, PEER_BYTES_CHUNK_BYTES as gt, createEventBusSliceSource as h, selectAssignedProfileSlots as ht, asJsonArray as i, FrameHandleSchema as it, PROVIDER_PIN_FIELD as j, WELL_KNOWN_TABS as jt, DEVICE_SETTINGS_CONTRIBUTION_METHODS as k, emitReadiness as kt, parseJsonObject as l, StreamSourceSchema as lt, createDeviceProxy as m, parseProfileBrokerId as mt, sleepCancellable as n, CameraStreamSchema as nt, asNumber as o, ProfileSlotSchema as ot, isDeviceScopedCap as p, makeSourceBrokerId as pt, scopeKey as q, asBoolean as r, DecodedAudioChunkSchema as rt, asString as s, ProfileSlotStatusSchema as st, sleep as t, CamStreamResolutionSchema as tt, parseJsonUnknown as u, SubscribeAudioChunksInputSchema as ut, createSliceHandle as v, PEER_BYTES_STALL_MS as vt, defineCustomActions as w, BaseAddon as wt, viewerUiCapability as x, DATAPLANE_SECRET_HEADER as xt, RawStateResultSchema as y, PEER_BYTES_TICKET_TTL_MS as yt, CAP_NODE_PIN_CONTEXT_KEY as z, expandAudioChunkToF32le as zt };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_event_category = require("./event-category-
|
|
1
|
+
const require_event_category = require("./event-category-CtBAl88K.js");
|
|
2
2
|
let zod = require("zod");
|
|
3
3
|
//#region src/audio/audio-chunk-format.ts
|
|
4
4
|
/**
|
|
@@ -1676,32 +1676,12 @@ var StreamSourceSchema = zod.z.object({
|
|
|
1676
1676
|
audioCodec: zod.z.string().optional(),
|
|
1677
1677
|
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).readonly().optional()
|
|
1678
1678
|
});
|
|
1679
|
-
var EncodedPacketSchema = zod.z.object({
|
|
1680
|
-
type: zod.z.enum(["video", "audio"]),
|
|
1681
|
-
data: zod.z.instanceof(Uint8Array),
|
|
1682
|
-
pts: zod.z.number(),
|
|
1683
|
-
dts: zod.z.number(),
|
|
1684
|
-
keyframe: zod.z.boolean(),
|
|
1685
|
-
codec: zod.z.string()
|
|
1686
|
-
});
|
|
1687
|
-
var DecodedFrameSchema = zod.z.object({
|
|
1688
|
-
data: zod.z.instanceof(Uint8Array),
|
|
1689
|
-
width: zod.z.number(),
|
|
1690
|
-
height: zod.z.number(),
|
|
1691
|
-
format: zod.z.enum([
|
|
1692
|
-
"jpeg",
|
|
1693
|
-
"rgb",
|
|
1694
|
-
"bgr",
|
|
1695
|
-
"yuv420",
|
|
1696
|
-
"gray"
|
|
1697
|
-
]),
|
|
1698
|
-
timestamp: zod.z.number()
|
|
1699
|
-
});
|
|
1700
1679
|
/**
|
|
1701
1680
|
* Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
|
|
1702
1681
|
* frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
|
|
1703
|
-
* interface in `interfaces/frame-handle.ts` field-for-field so a
|
|
1704
|
-
*
|
|
1682
|
+
* interface in `interfaces/frame-handle.ts` field-for-field so a cap method
|
|
1683
|
+
* (the runner's native-crop and pipeline-executor inputs) can carry handles
|
|
1684
|
+
* over tRPC / Moleculer.
|
|
1705
1685
|
*
|
|
1706
1686
|
* The `satisfies` assertion below pins this schema to the interface: if a
|
|
1707
1687
|
* field is added to / removed from `FrameHandle` without a matching schema
|
|
@@ -1727,50 +1707,6 @@ var FrameHandleSchema = zod.z.object({
|
|
|
1727
1707
|
slotCount: zod.z.number().int().positive()
|
|
1728
1708
|
});
|
|
1729
1709
|
/**
|
|
1730
|
-
* Pixel format a frame-handle subscriber can request from the broker
|
|
1731
|
-
* (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
|
|
1732
|
-
* `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
|
|
1733
|
-
* `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
|
|
1734
|
-
* payload, and no decoded-frame consumer requests it over the shm plane.
|
|
1735
|
-
*/
|
|
1736
|
-
var FrameHandleFormatSchema = zod.z.enum([
|
|
1737
|
-
"rgb",
|
|
1738
|
-
"bgr",
|
|
1739
|
-
"yuv420",
|
|
1740
|
-
"gray"
|
|
1741
|
-
]);
|
|
1742
|
-
/**
|
|
1743
|
-
* Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
|
|
1744
|
-
* broker for a `FrameHandle` stream of one `format`; the broker maintains one
|
|
1745
|
-
* shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
|
|
1746
|
-
* subscriber (motion) and an `rgb` subscriber (detection) each read the format
|
|
1747
|
-
* they asked for with no broker-side conversion.
|
|
1748
|
-
*/
|
|
1749
|
-
var SubscribeFramesInputSchema = zod.z.object({
|
|
1750
|
-
brokerId: zod.z.string(),
|
|
1751
|
-
format: FrameHandleFormatSchema,
|
|
1752
|
-
/**
|
|
1753
|
-
* Optional reader-side cadence hint in frames per second. The broker does
|
|
1754
|
-
* NOT throttle — latest-wins ring reads drop frames implicitly for a slow
|
|
1755
|
-
* consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
|
|
1756
|
-
* the consumer can pace its own `pullFrameHandles` polling.
|
|
1757
|
-
*/
|
|
1758
|
-
maxFps: zod.z.number().positive().optional(),
|
|
1759
|
-
/** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
|
|
1760
|
-
tag: zod.z.string().optional()
|
|
1761
|
-
});
|
|
1762
|
-
/**
|
|
1763
|
-
* Result of `stream-broker.subscribeFrames`. The consumer then polls
|
|
1764
|
-
* `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
|
|
1765
|
-
* `FrameHandle` to a `FrameRingReader`.
|
|
1766
|
-
*/
|
|
1767
|
-
var SubscribeFramesResultSchema = zod.z.object({
|
|
1768
|
-
/** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
|
|
1769
|
-
subscriptionId: zod.z.string(),
|
|
1770
|
-
/** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
|
|
1771
|
-
maxFps: zod.z.number().nonnegative()
|
|
1772
|
-
});
|
|
1773
|
-
/**
|
|
1774
1710
|
* Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
|
|
1775
1711
|
* `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
|
|
1776
1712
|
* sample bytes plus the track parameters a consumer needs to interpret them.
|
|
@@ -1778,8 +1714,8 @@ var SubscribeFramesResultSchema = zod.z.object({
|
|
|
1778
1714
|
* Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
|
|
1779
1715
|
* Float32 PCM), so unlike video frames they ship their bytes INLINE over
|
|
1780
1716
|
* tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
|
|
1781
|
-
* (the wire-serialisable supertype of `Buffer`)
|
|
1782
|
-
*
|
|
1717
|
+
* (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
|
|
1718
|
+
* it.
|
|
1783
1719
|
*/
|
|
1784
1720
|
var AudioChunkFormatSchema = zod.z.enum(AUDIO_CHUNK_FORMATS);
|
|
1785
1721
|
var DecodedAudioChunkSchema = zod.z.object({
|
|
@@ -1797,11 +1733,10 @@ var DecodedAudioChunkSchema = zod.z.object({
|
|
|
1797
1733
|
format: AudioChunkFormatSchema.optional()
|
|
1798
1734
|
});
|
|
1799
1735
|
/**
|
|
1800
|
-
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9).
|
|
1801
|
-
*
|
|
1802
|
-
*
|
|
1803
|
-
*
|
|
1804
|
-
* `pullAudioChunks`.
|
|
1736
|
+
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). Audio ships
|
|
1737
|
+
* its bytes inline: a consumer asks the broker for the decoded audio-chunk
|
|
1738
|
+
* stream of one broker; the broker keeps a per-subscription bounded FIFO queue
|
|
1739
|
+
* the consumer drains via `pullAudioChunks`.
|
|
1805
1740
|
*/
|
|
1806
1741
|
var SubscribeAudioChunksInputSchema = zod.z.object({
|
|
1807
1742
|
brokerId: zod.z.string(),
|
|
@@ -1833,9 +1768,7 @@ var BrokerStatusSchema = zod.z.enum([
|
|
|
1833
1768
|
var BrokerStatsSchema = zod.z.object({
|
|
1834
1769
|
status: BrokerStatusSchema,
|
|
1835
1770
|
inputFps: zod.z.number(),
|
|
1836
|
-
decodeFps: zod.z.number(),
|
|
1837
1771
|
encodedSubscribers: zod.z.number(),
|
|
1838
|
-
decodedSubscribers: zod.z.number(),
|
|
1839
1772
|
uptimeMs: zod.z.number(),
|
|
1840
1773
|
bitrateKbps: zod.z.number(),
|
|
1841
1774
|
idrIntervalMs: zod.z.number(),
|
|
@@ -1848,14 +1781,6 @@ var BrokerStatsSchema = zod.z.object({
|
|
|
1848
1781
|
preBufferMs: zod.z.number(),
|
|
1849
1782
|
preBufferPackets: zod.z.number(),
|
|
1850
1783
|
/**
|
|
1851
|
-
* Moleculer node id of the decoder provider currently servicing this
|
|
1852
|
-
* stream's decoded subscribers. `null` until the deferred decoder is
|
|
1853
|
-
* created (no decoded clients yet, or codec not detected). Surfaces the
|
|
1854
|
-
* runtime decoder placement so the UI can show "Decoder: <agent>" without
|
|
1855
|
-
* a separate cap call per broker.
|
|
1856
|
-
*/
|
|
1857
|
-
decoderNodeId: zod.z.string().nullable(),
|
|
1858
|
-
/**
|
|
1859
1784
|
* Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
|
|
1860
1785
|
* when the stream has no audio track or the broker is in cold start.
|
|
1861
1786
|
* `supported = false` means the codec was detected but the local
|
|
@@ -4378,30 +4303,12 @@ Object.defineProperty(exports, "DecodedAudioChunkSchema", {
|
|
|
4378
4303
|
return DecodedAudioChunkSchema;
|
|
4379
4304
|
}
|
|
4380
4305
|
});
|
|
4381
|
-
Object.defineProperty(exports, "DecodedFrameSchema", {
|
|
4382
|
-
enumerable: true,
|
|
4383
|
-
get: function() {
|
|
4384
|
-
return DecodedFrameSchema;
|
|
4385
|
-
}
|
|
4386
|
-
});
|
|
4387
4306
|
Object.defineProperty(exports, "DisposerChain", {
|
|
4388
4307
|
enumerable: true,
|
|
4389
4308
|
get: function() {
|
|
4390
4309
|
return DisposerChain;
|
|
4391
4310
|
}
|
|
4392
4311
|
});
|
|
4393
|
-
Object.defineProperty(exports, "EncodedPacketSchema", {
|
|
4394
|
-
enumerable: true,
|
|
4395
|
-
get: function() {
|
|
4396
|
-
return EncodedPacketSchema;
|
|
4397
|
-
}
|
|
4398
|
-
});
|
|
4399
|
-
Object.defineProperty(exports, "FrameHandleFormatSchema", {
|
|
4400
|
-
enumerable: true,
|
|
4401
|
-
get: function() {
|
|
4402
|
-
return FrameHandleFormatSchema;
|
|
4403
|
-
}
|
|
4404
|
-
});
|
|
4405
4312
|
Object.defineProperty(exports, "FrameHandleSchema", {
|
|
4406
4313
|
enumerable: true,
|
|
4407
4314
|
get: function() {
|
|
@@ -4510,18 +4417,6 @@ Object.defineProperty(exports, "SubscribeAudioChunksResultSchema", {
|
|
|
4510
4417
|
return SubscribeAudioChunksResultSchema;
|
|
4511
4418
|
}
|
|
4512
4419
|
});
|
|
4513
|
-
Object.defineProperty(exports, "SubscribeFramesInputSchema", {
|
|
4514
|
-
enumerable: true,
|
|
4515
|
-
get: function() {
|
|
4516
|
-
return SubscribeFramesInputSchema;
|
|
4517
|
-
}
|
|
4518
|
-
});
|
|
4519
|
-
Object.defineProperty(exports, "SubscribeFramesResultSchema", {
|
|
4520
|
-
enumerable: true,
|
|
4521
|
-
get: function() {
|
|
4522
|
-
return SubscribeFramesResultSchema;
|
|
4523
|
-
}
|
|
4524
|
-
});
|
|
4525
4420
|
Object.defineProperty(exports, "WELL_KNOWN_TABS", {
|
|
4526
4421
|
enumerable: true,
|
|
4527
4422
|
get: function() {
|
|
@@ -24,16 +24,15 @@ import type { PipelineEngineChoice } from './pipeline.js';
|
|
|
24
24
|
*/
|
|
25
25
|
export interface CameraPipelineConfig {
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* field: the attach payload (`RunnerCameraConfig`) no longer carries an
|
|
27
|
+
* Engine HINT ONLY — a vestigial explicit engine override older stored
|
|
28
|
+
* configs may still carry. It is NEVER a live-dispatch field: the attach payload (`RunnerCameraConfig`) no longer carries an
|
|
30
29
|
* engine, so this value cannot reach a node. Engine is node-local — the
|
|
31
30
|
* executing runner resolves its own format default at dispatch time.
|
|
32
31
|
*/
|
|
33
32
|
readonly engine?: PipelineEngineChoice;
|
|
34
33
|
readonly steps: readonly PipelineStepInputOutput[];
|
|
35
34
|
readonly audio?: {
|
|
36
|
-
/**
|
|
35
|
+
/** Engine hint only — see `engine` above. Not dispatched. */
|
|
37
36
|
readonly engine?: PipelineEngineChoice;
|
|
38
37
|
/**
|
|
39
38
|
* Present ONLY when the operator explicitly chose an audio model;
|
|
@@ -53,19 +52,3 @@ export interface CameraPipelineConfig {
|
|
|
53
52
|
readonly settings?: Readonly<Record<string, unknown>>;
|
|
54
53
|
} | null;
|
|
55
54
|
}
|
|
56
|
-
/**
|
|
57
|
-
* Named preset applied to one or more cameras. The camera stores a
|
|
58
|
-
* copy of the template's config at apply time — no live reference.
|
|
59
|
-
* Templates let operators curate reusable pipelines without re-authoring
|
|
60
|
-
* step trees per-camera.
|
|
61
|
-
*/
|
|
62
|
-
export interface PipelineTemplate {
|
|
63
|
-
readonly id: string;
|
|
64
|
-
readonly name: string;
|
|
65
|
-
readonly description?: string;
|
|
66
|
-
readonly config: CameraPipelineConfig;
|
|
67
|
-
/** ISO 8601 — creation timestamp. */
|
|
68
|
-
readonly createdAt: string;
|
|
69
|
-
/** ISO 8601 — last modification timestamp. */
|
|
70
|
-
readonly updatedAt: string;
|
|
71
|
-
}
|
|
@@ -224,7 +224,7 @@ export interface FrameDebug {
|
|
|
224
224
|
readonly stepTimings?: readonly FrameStepTiming[];
|
|
225
225
|
/** Engine descriptor — e.g. `'python/coreml'`. */
|
|
226
226
|
readonly engine?: string;
|
|
227
|
-
/** Pipeline
|
|
227
|
+
/** Pipeline id in use (for comparing across runs). */
|
|
228
228
|
readonly pipelineId?: string;
|
|
229
229
|
/** JPEG → dimensions probe + buffer alloc (benchmark / reference-image paths only). */
|
|
230
230
|
readonly decodeMs?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
|
-
import type { PipelineSchemaSchema, PipelineAddonSchemaSchema, PipelineSlotSchemaSchema, PipelineModelOptionSchema, AvailableEngineSchema
|
|
2
|
+
import type { PipelineSchemaSchema, PipelineAddonSchemaSchema, PipelineSlotSchemaSchema, PipelineModelOptionSchema, AvailableEngineSchema } from '../capabilities/pipeline-executor.cap.js';
|
|
3
3
|
import type { PipelineDefaultStepOutput } from '../capabilities/pipeline-executor.cap.js';
|
|
4
4
|
export type PipelineAddonSchema = z.infer<typeof PipelineAddonSchemaSchema>;
|
|
5
5
|
export type PipelineModelOption = z.infer<typeof PipelineModelOptionSchema>;
|
|
@@ -11,10 +11,3 @@ export type PipelineSchema = z.infer<typeof PipelineSchemaSchema>;
|
|
|
11
11
|
* Runtime/backend are NOT per-step — they come from PipelineConfig.engine.
|
|
12
12
|
*/
|
|
13
13
|
export type PipelineDefaultStep = PipelineDefaultStepOutput;
|
|
14
|
-
export type PipelineTemplateStep = z.infer<typeof PipelineTemplateStepSchema>;
|
|
15
|
-
export type PipelineTemplate = z.infer<typeof PipelineTemplateSchema>;
|
|
16
|
-
export interface TemplateValidationResult {
|
|
17
|
-
readonly valid: boolean;
|
|
18
|
-
readonly steps: readonly PipelineTemplateStep[];
|
|
19
|
-
readonly warnings: readonly string[];
|
|
20
|
-
}
|