@camstack/types 1.2.75 → 1.2.76

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.
Files changed (40) hide show
  1. package/dist/addon.d.ts +19 -18
  2. package/dist/addon.js +59 -56
  3. package/dist/addon.mjs +59 -57
  4. package/dist/capabilities/alerts.cap.d.ts +5 -5
  5. package/dist/capabilities/battery.cap.d.ts +4 -4
  6. package/dist/capabilities/custom-model-registry.cap.d.ts +4 -4
  7. package/dist/capabilities/decoder.cap.d.ts +2 -2
  8. package/dist/capabilities/face-gallery.cap.d.ts +1 -1
  9. package/dist/capabilities/index.d.ts +2 -2
  10. package/dist/capabilities/lawn-mower-control.cap.d.ts +4 -4
  11. package/dist/capabilities/llm-runtime.cap.d.ts +121 -3
  12. package/dist/capabilities/llm.cap.d.ts +189 -4
  13. package/dist/capabilities/metrics-provider.cap.d.ts +2 -2
  14. package/dist/capabilities/model-convert.cap.d.ts +6 -6
  15. package/dist/capabilities/model-distributor.cap.d.ts +4 -4
  16. package/dist/capabilities/notification-output.cap.d.ts +9 -9
  17. package/dist/capabilities/notification-rules.cap.d.ts +11 -11
  18. package/dist/capabilities/osd-manager.cap.d.ts +6 -6
  19. package/dist/capabilities/pipeline-analytics.cap.d.ts +39 -39
  20. package/dist/capabilities/pipeline-executor.cap.d.ts +7 -7
  21. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +6 -6
  22. package/dist/capabilities/pipeline-runner.cap.d.ts +2 -0
  23. package/dist/capabilities/platform-probe.cap.d.ts +2 -2
  24. package/dist/capabilities/recording.cap.d.ts +3 -3
  25. package/dist/capabilities/stream-broker.cap.d.ts +6 -6
  26. package/dist/device/base-device-provider.d.ts +9 -0
  27. package/dist/encode-profile.d.ts +2 -2
  28. package/dist/generated/addon-api.d.ts +7 -0
  29. package/dist/generated/method-access-map.d.ts +1 -1
  30. package/dist/generated/system-proxy.d.ts +1 -1
  31. package/dist/index.d.ts +1 -0
  32. package/dist/index.js +188 -7
  33. package/dist/index.mjs +185 -8
  34. package/dist/interfaces/recording-config.d.ts +2 -2
  35. package/dist/interfaces/stream-broker.d.ts +9 -1
  36. package/dist/{sleep-CQayd2Su.mjs → sleep-BfRjZ3C3.mjs} +37 -1
  37. package/dist/{sleep-B-mRsuDp.js → sleep-DslGLq5_.js} +42 -0
  38. package/dist/types/models.d.ts +7 -7
  39. package/dist/util/boot-recovery-backoff.d.ts +26 -0
  40. package/package.json +1 -1
@@ -140,8 +140,8 @@ declare const PipelineModelOptionSchema: z.ZodObject<{
140
140
  int8: "int8";
141
141
  }>>;
142
142
  optimization: z.ZodOptional<z.ZodEnum<{
143
- standard: "standard";
144
143
  fast: "fast";
144
+ standard: "standard";
145
145
  }>>;
146
146
  resolution: z.ZodOptional<z.ZodNumber>;
147
147
  }, z.core.$strip>>;
@@ -181,8 +181,8 @@ declare const PipelineAddonSchemaSchema: z.ZodObject<{
181
181
  int8: "int8";
182
182
  }>>;
183
183
  optimization: z.ZodOptional<z.ZodEnum<{
184
- standard: "standard";
185
184
  fast: "fast";
185
+ standard: "standard";
186
186
  }>>;
187
187
  resolution: z.ZodOptional<z.ZodNumber>;
188
188
  }, z.core.$strip>>;
@@ -247,8 +247,8 @@ declare const PipelineSlotSchemaSchema: z.ZodObject<{
247
247
  int8: "int8";
248
248
  }>>;
249
249
  optimization: z.ZodOptional<z.ZodEnum<{
250
- standard: "standard";
251
250
  fast: "fast";
251
+ standard: "standard";
252
252
  }>>;
253
253
  resolution: z.ZodOptional<z.ZodNumber>;
254
254
  }, z.core.$strip>>;
@@ -355,8 +355,8 @@ declare const PipelineSchemaSchema: z.ZodObject<{
355
355
  int8: "int8";
356
356
  }>>;
357
357
  optimization: z.ZodOptional<z.ZodEnum<{
358
- standard: "standard";
359
358
  fast: "fast";
359
+ standard: "standard";
360
360
  }>>;
361
361
  resolution: z.ZodOptional<z.ZodNumber>;
362
362
  }, z.core.$strip>>;
@@ -383,9 +383,9 @@ declare const EngineProvisioningSchema: z.ZodObject<{
383
383
  state: z.ZodEnum<{
384
384
  failed: "failed";
385
385
  idle: "idle";
386
- ready: "ready";
387
386
  installing: "installing";
388
387
  verifying: "verifying";
388
+ ready: "ready";
389
389
  }>;
390
390
  progress: z.ZodOptional<z.ZodNumber>;
391
391
  error: z.ZodOptional<z.ZodString>;
@@ -532,9 +532,9 @@ export declare const pipelineExecutorCapability: {
532
532
  state: z.ZodEnum<{
533
533
  failed: "failed";
534
534
  idle: "idle";
535
- ready: "ready";
536
535
  installing: "installing";
537
536
  verifying: "verifying";
537
+ ready: "ready";
538
538
  }>;
539
539
  progress: z.ZodOptional<z.ZodNumber>;
540
540
  error: z.ZodOptional<z.ZodString>;
@@ -666,8 +666,8 @@ export declare const pipelineExecutorCapability: {
666
666
  int8: "int8";
667
667
  }>>;
668
668
  optimization: z.ZodOptional<z.ZodEnum<{
669
- standard: "standard";
670
669
  fast: "fast";
670
+ standard: "standard";
671
671
  }>>;
672
672
  resolution: z.ZodOptional<z.ZodNumber>;
673
673
  }, z.core.$strip>>;
@@ -267,18 +267,18 @@ declare const CameraMotionStatusSchema: z.ZodObject<{
267
267
  declare const CameraDetectionProvisioningStateSchema: z.ZodEnum<{
268
268
  failed: "failed";
269
269
  idle: "idle";
270
- ready: "ready";
271
270
  installing: "installing";
272
271
  verifying: "verifying";
272
+ ready: "ready";
273
273
  }>;
274
274
  /** Detection provisioning sub-block. */
275
275
  declare const CameraDetectionProvisioningSchema: z.ZodObject<{
276
276
  state: z.ZodEnum<{
277
277
  failed: "failed";
278
278
  idle: "idle";
279
- ready: "ready";
280
279
  installing: "installing";
281
280
  verifying: "verifying";
281
+ ready: "ready";
282
282
  }>;
283
283
  error: z.ZodOptional<z.ZodString>;
284
284
  }, z.core.$strip>;
@@ -308,9 +308,9 @@ declare const CameraDetectionStatusSchema: z.ZodObject<{
308
308
  state: z.ZodEnum<{
309
309
  failed: "failed";
310
310
  idle: "idle";
311
- ready: "ready";
312
311
  installing: "installing";
313
312
  verifying: "verifying";
313
+ ready: "ready";
314
314
  }>;
315
315
  error: z.ZodOptional<z.ZodString>;
316
316
  }, z.core.$strip>;
@@ -467,9 +467,9 @@ declare const CameraStatusSchema: z.ZodObject<{
467
467
  state: z.ZodEnum<{
468
468
  failed: "failed";
469
469
  idle: "idle";
470
- ready: "ready";
471
470
  installing: "installing";
472
471
  verifying: "verifying";
472
+ ready: "ready";
473
473
  }>;
474
474
  error: z.ZodOptional<z.ZodString>;
475
475
  }, z.core.$strip>;
@@ -1381,9 +1381,9 @@ export declare const pipelineOrchestratorCapability: {
1381
1381
  state: z.ZodEnum<{
1382
1382
  failed: "failed";
1383
1383
  idle: "idle";
1384
- ready: "ready";
1385
1384
  installing: "installing";
1386
1385
  verifying: "verifying";
1386
+ ready: "ready";
1387
1387
  }>;
1388
1388
  error: z.ZodOptional<z.ZodString>;
1389
1389
  }, z.core.$strip>;
@@ -1516,9 +1516,9 @@ export declare const pipelineOrchestratorCapability: {
1516
1516
  state: z.ZodEnum<{
1517
1517
  failed: "failed";
1518
1518
  idle: "idle";
1519
- ready: "ready";
1520
1519
  installing: "installing";
1521
1520
  verifying: "verifying";
1521
+ ready: "ready";
1522
1522
  }>;
1523
1523
  error: z.ZodOptional<z.ZodString>;
1524
1524
  }, z.core.$strip>;
@@ -208,6 +208,7 @@ declare const RunnerCameraConfigSchema: z.ZodObject<{
208
208
  }>>;
209
209
  motionCooldownMs: z.ZodDefault<z.ZodNumber>;
210
210
  maxSessionHoldMs: z.ZodOptional<z.ZodNumber>;
211
+ audioMotionWindowMs: z.ZodOptional<z.ZodNumber>;
211
212
  motionFps: z.ZodDefault<z.ZodNumber>;
212
213
  detectionFps: z.ZodDefault<z.ZodNumber>;
213
214
  motionStreamId: z.ZodString;
@@ -340,6 +341,7 @@ export declare const pipelineRunnerCapability: {
340
341
  }>>;
341
342
  motionCooldownMs: z.ZodDefault<z.ZodNumber>;
342
343
  maxSessionHoldMs: z.ZodOptional<z.ZodNumber>;
344
+ audioMotionWindowMs: z.ZodOptional<z.ZodNumber>;
343
345
  motionFps: z.ZodDefault<z.ZodNumber>;
344
346
  detectionFps: z.ZodDefault<z.ZodNumber>;
345
347
  motionStreamId: z.ZodString;
@@ -274,13 +274,13 @@ export declare const platformProbeCapability: {
274
274
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
275
275
  readonly resolveHwAccel: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
276
276
  prefer: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
277
- coreml: "coreml";
278
- openvino: "openvino";
279
277
  none: "none";
280
278
  videotoolbox: "videotoolbox";
281
279
  vaapi: "vaapi";
282
280
  qsv: "qsv";
283
281
  cuda: "cuda";
282
+ coreml: "coreml";
283
+ openvino: "openvino";
284
284
  tensorrt: "tensorrt";
285
285
  nvdec: "nvdec";
286
286
  d3d11va: "d3d11va";
@@ -306,10 +306,10 @@ export declare const recordingCapability: {
306
306
  maxSizeGb: z.ZodOptional<z.ZodNumber>;
307
307
  }, z.core.$strip>>;
308
308
  scrubThumbnails: z.ZodOptional<z.ZodEnum<{
309
- standard: "standard";
310
309
  high: "high";
311
310
  low: "low";
312
311
  max: "max";
312
+ standard: "standard";
313
313
  minimal: "minimal";
314
314
  }>>;
315
315
  }, z.core.$strict>, "query">;
@@ -387,10 +387,10 @@ export declare const recordingCapability: {
387
387
  maxSizeGb: z.ZodOptional<z.ZodNumber>;
388
388
  }, z.core.$strip>>;
389
389
  scrubThumbnails: z.ZodOptional<z.ZodEnum<{
390
- standard: "standard";
391
390
  high: "high";
392
391
  low: "low";
393
392
  max: "max";
393
+ standard: "standard";
394
394
  minimal: "minimal";
395
395
  }>>;
396
396
  }, z.core.$strict>;
@@ -427,10 +427,10 @@ export declare const recordingCapability: {
427
427
  maxSizeGb: z.ZodOptional<z.ZodNumber>;
428
428
  }, z.core.$strip>>;
429
429
  scrubThumbnails: z.ZodOptional<z.ZodEnum<{
430
- standard: "standard";
431
430
  high: "high";
432
431
  low: "low";
433
432
  max: "max";
433
+ standard: "standard";
434
434
  minimal: "minimal";
435
435
  }>>;
436
436
  }, z.core.$strict>, "mutation">;
@@ -407,11 +407,11 @@ export declare const EgressEncodeSchema: z.ZodObject<{
407
407
  gopFrames: z.ZodOptional<z.ZodNumber>;
408
408
  bf: z.ZodOptional<z.ZodNumber>;
409
409
  preset: z.ZodOptional<z.ZodEnum<{
410
- fast: "fast";
411
410
  ultrafast: "ultrafast";
412
411
  superfast: "superfast";
413
412
  veryfast: "veryfast";
414
413
  faster: "faster";
414
+ fast: "fast";
415
415
  medium: "medium";
416
416
  }>>;
417
417
  tune: z.ZodOptional<z.ZodEnum<{
@@ -478,11 +478,11 @@ export declare const EgressTranscodeRequestSchema: z.ZodObject<{
478
478
  gopFrames: z.ZodOptional<z.ZodNumber>;
479
479
  bf: z.ZodOptional<z.ZodNumber>;
480
480
  preset: z.ZodOptional<z.ZodEnum<{
481
- fast: "fast";
482
481
  ultrafast: "ultrafast";
483
482
  superfast: "superfast";
484
483
  veryfast: "veryfast";
485
484
  faster: "faster";
485
+ fast: "fast";
486
486
  medium: "medium";
487
487
  }>>;
488
488
  tune: z.ZodOptional<z.ZodEnum<{
@@ -507,8 +507,8 @@ export declare const EgressTranscodeRequestSchema: z.ZodObject<{
507
507
  nv12: "nv12";
508
508
  }>>;
509
509
  decodeHwAccel: z.ZodOptional<z.ZodEnum<{
510
- none: "none";
511
510
  auto: "auto";
511
+ none: "none";
512
512
  videotoolbox: "videotoolbox";
513
513
  vaapi: "vaapi";
514
514
  qsv: "qsv";
@@ -585,11 +585,11 @@ export declare const streamBrokerCapability: {
585
585
  gopFrames: z.ZodOptional<z.ZodNumber>;
586
586
  bf: z.ZodOptional<z.ZodNumber>;
587
587
  preset: z.ZodOptional<z.ZodEnum<{
588
- fast: "fast";
589
588
  ultrafast: "ultrafast";
590
589
  superfast: "superfast";
591
590
  veryfast: "veryfast";
592
591
  faster: "faster";
592
+ fast: "fast";
593
593
  medium: "medium";
594
594
  }>>;
595
595
  tune: z.ZodOptional<z.ZodEnum<{
@@ -1100,11 +1100,11 @@ export declare const streamBrokerCapability: {
1100
1100
  gopFrames: z.ZodOptional<z.ZodNumber>;
1101
1101
  bf: z.ZodOptional<z.ZodNumber>;
1102
1102
  preset: z.ZodOptional<z.ZodEnum<{
1103
- fast: "fast";
1104
1103
  ultrafast: "ultrafast";
1105
1104
  superfast: "superfast";
1106
1105
  veryfast: "veryfast";
1107
1106
  faster: "faster";
1107
+ fast: "fast";
1108
1108
  medium: "medium";
1109
1109
  }>>;
1110
1110
  tune: z.ZodOptional<z.ZodEnum<{
@@ -1129,8 +1129,8 @@ export declare const streamBrokerCapability: {
1129
1129
  nv12: "nv12";
1130
1130
  }>>;
1131
1131
  decodeHwAccel: z.ZodOptional<z.ZodEnum<{
1132
- none: "none";
1133
1132
  auto: "auto";
1133
+ none: "none";
1134
1134
  videotoolbox: "videotoolbox";
1135
1135
  vaapi: "vaapi";
1136
1136
  qsv: "qsv";
@@ -146,6 +146,15 @@ export declare abstract class BaseDeviceProvider<TConfig extends object = Record
146
146
  value: unknown;
147
147
  formValues?: Record<string, unknown>;
148
148
  }): Promise<FieldProbeResult>;
149
+ /**
150
+ * Top-level devices restored at once in {@link onRestoreDevices}.
151
+ *
152
+ * Four covers the fleets this ships to without turning a boot into a burst a
153
+ * camera NVR answers with a refusal. A provider whose upstream is a single
154
+ * session with a serial command channel (a Baichuan hub, an NVR that
155
+ * serialises ISAPI) should lower it; nothing needs to raise it.
156
+ */
157
+ protected readonly restoreConcurrency: number;
149
158
  restoreDevices(savedDevices: readonly SavedDevice[]): Promise<void>;
150
159
  /**
151
160
  * Concrete device classes this provider can spawn, keyed by
@@ -30,11 +30,11 @@ export declare const VideoEncodeSchema: z.ZodObject<{
30
30
  gopFrames: z.ZodOptional<z.ZodNumber>;
31
31
  bf: z.ZodOptional<z.ZodNumber>;
32
32
  preset: z.ZodOptional<z.ZodEnum<{
33
- fast: "fast";
34
33
  ultrafast: "ultrafast";
35
34
  superfast: "superfast";
36
35
  veryfast: "veryfast";
37
36
  faster: "faster";
37
+ fast: "fast";
38
38
  medium: "medium";
39
39
  }>>;
40
40
  tune: z.ZodOptional<z.ZodEnum<{
@@ -77,11 +77,11 @@ export declare const EncodeProfileSchema: z.ZodObject<{
77
77
  gopFrames: z.ZodOptional<z.ZodNumber>;
78
78
  bf: z.ZodOptional<z.ZodNumber>;
79
79
  preset: z.ZodOptional<z.ZodEnum<{
80
- fast: "fast";
81
80
  ultrafast: "ultrafast";
82
81
  superfast: "superfast";
83
82
  veryfast: "veryfast";
84
83
  faster: "faster";
84
+ fast: "fast";
85
85
  medium: "medium";
86
86
  }>>;
87
87
  tune: z.ZodOptional<z.ZodEnum<{
@@ -3445,6 +3445,13 @@ export type AppRouter = TrpcCoreRouter<{
3445
3445
  output: z.infer<typeof llmCapability.methods.listNodeModels.output>;
3446
3446
  meta: object;
3447
3447
  }>;
3448
+ resolveModelRef: TRPCMutationProcedure<{
3449
+ input: {
3450
+ [x: string]: unknown;
3451
+ } & z.input<typeof llmCapability.methods.resolveModelRef.input>;
3452
+ output: z.infer<typeof llmCapability.methods.resolveModelRef.output>;
3453
+ meta: object;
3454
+ }>;
3448
3455
  installModel: TRPCMutationProcedure<{
3449
3456
  input: {
3450
3457
  [x: string]: unknown;
@@ -6,7 +6,7 @@
6
6
  * scope+access check inside `protectedProcedure` (see
7
7
  * `server/backend/src/api/trpc/trpc.middleware.ts`).
8
8
  *
9
- * Coverage: 938 method paths across 123 capabilities.
9
+ * Coverage: 939 method paths across 123 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
@@ -73,7 +73,7 @@ export interface SystemProxy {
73
73
  readonly deviceState: Pick<InferProvider<typeof deviceStateCapability>, 'getAllSnapshots'>;
74
74
  readonly faceGallery: Pick<InferProvider<typeof faceGalleryCapability>, 'listIdentities' | 'createIdentity' | 'renameIdentity' | 'deleteIdentity' | 'listIdentitySamples' | 'removeSample' | 'getFaceMedia' | 'assignFace' | 'unassignFace' | 'deleteFace' | 'assignFaces' | 'unassignFaces' | 'suggestFaceClusters'>;
75
75
  readonly integrations: Pick<InferProvider<typeof integrationsCapability>, 'list' | 'get' | 'getByAddonId' | 'create' | 'update' | 'delete' | 'getSettings' | 'setSettings' | 'getAvailableTypes' | 'testConnection'>;
76
- readonly llm: Pick<InferProvider<typeof llmCapability>, 'generate' | 'generateVision' | 'cancel' | 'listProfileKinds' | 'listProfiles' | 'upsertProfile' | 'deleteProfile' | 'testProfile' | 'listModels' | 'getDefaults' | 'setDefault' | 'getUsage' | 'listModelCatalog' | 'listRuntimeNodes' | 'listNodeModels' | 'installModel' | 'deleteModel' | 'getRuntimeStatus' | 'startRuntime' | 'stopRuntime'>;
76
+ readonly llm: Pick<InferProvider<typeof llmCapability>, 'generate' | 'generateVision' | 'cancel' | 'listProfileKinds' | 'listProfiles' | 'upsertProfile' | 'deleteProfile' | 'testProfile' | 'listModels' | 'getDefaults' | 'setDefault' | 'getUsage' | 'listModelCatalog' | 'listRuntimeNodes' | 'listNodeModels' | 'resolveModelRef' | 'installModel' | 'deleteModel' | 'getRuntimeStatus' | 'startRuntime' | 'stopRuntime'>;
77
77
  readonly localNetwork: Pick<InferProvider<typeof localNetworkCapability>, 'list' | 'getPreferred' | 'getConnectionEndpoints' | 'getNotificationEndpoint' | 'setNotificationEndpoint' | 'getAllowedAddresses' | 'setAllowedAddresses' | 'resetAllowlistToBestMatch'>;
78
78
  readonly meshNetwork: Pick<InferProvider<typeof meshNetworkCapability>, 'getStatus' | 'join' | 'startLogin' | 'leave' | 'logout' | 'listPeers' | 'testConnection'>;
79
79
  readonly metricsProvider: Pick<InferProvider<typeof metricsProviderCapability>, 'collectSnapshot' | 'getCached' | 'getCurrent' | 'getDiskSpace' | 'getGpuInfo' | 'getCpuTemperature' | 'getProcessStats' | 'listAddonInstances' | 'getAddonStats' | 'listNodeProcesses' | 'killProcess' | 'dumpHeapSnapshot'>;
package/dist/index.d.ts CHANGED
@@ -203,6 +203,7 @@ export { type DeviceMetaLike, type DeviceReachSummary, deviceSelectorMatches, ty
203
203
  export type { CameraDetectionCapabilities, CameraMotionConfig, CameraNativeDetectionConfig, } from './types/camera-detection.js';
204
204
  export { DEVICE_TYPE_INFO, type DeviceTypeInfo } from './types/device-type.js';
205
205
  export * from './units/index.js';
206
+ export { BOOT_RECOVERY_BACKOFF_MS } from './util/boot-recovery-backoff.js';
206
207
  export { bestLocationMatch, locationSimilarity } from './util/location-match.js';
207
208
  export { bareAddonId, isSameAddonId } from './utils/addon-id.js';
208
209
  export { cosineSimilarity } from './utils/cosine-similarity.js';