@eyepop.ai/eyepop 3.20.0 → 3.21.0

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/README.md CHANGED
@@ -302,6 +302,6 @@ Rendering helpers are provided by [@eyepop.ai/eyepop-render-2d](https://www.npmj
302
302
 
303
303
  `EyePop.dataEndpoint()` provides preview support for dataset management and model optimization workflows. This API is experimental and subject to change.
304
304
 
305
- ## Composable Pops Preview
305
+ ## Composable Pops
306
306
 
307
- See [Composable Pops](composable-pops.md) for a preview of client-side Pop composition.
307
+ See [Composable Pops](composable-pops.md) for client-side Pop composition.
@@ -1,4 +1,5 @@
1
1
  import { Logger } from 'pino';
2
+ import { OpenAPIV3_1 } from 'openapi-types';
2
3
 
3
4
  interface Session {
4
5
  readonly eyepopUrl: string;
@@ -69,7 +70,7 @@ interface Prediction extends StreamTime {
69
70
  meshs?: Array<PredictedMesh>;
70
71
  keyPoints?: Array<PredictedKeyPoints>;
71
72
  embeddings?: Array<PredictedEmbedding>;
72
- details?: Array<Map<string, any>>;
73
+ details?: Array<Record<string, any>>;
73
74
  motions?: Array<PredictedMotion>;
74
75
  depth?: Depth;
75
76
  }
@@ -125,9 +126,9 @@ interface Mask {
125
126
  * "unknown" included - so an absent member means a worker that predates the
126
127
  * field rather than a map that declined to say:
127
128
  *
128
- * - "canonical_metric" - metres = value * focal_px / 300, with focal_px scaled
129
+ * - "canonical_metric" - meters = value * focal_px / 300, with focal_px scaled
129
130
  * to the map's own resolution
130
- * - "metric" - the value is already metres
131
+ * - "metric" - the value is already meters
131
132
  * - "relative" - scale- AND shift-invariant, so ordering is meaningful but
132
133
  * distance is not. Not back-projectable: recovering a cloud from it yields a
133
134
  * distorted scene rather than a scaled one
@@ -163,12 +164,12 @@ interface PredictedObject extends PredictedClass {
163
164
  texts?: Array<PredictedText>;
164
165
  meshs?: Array<PredictedMesh>;
165
166
  keyPoints?: Array<PredictedKeyPoints>;
166
- details?: Array<Map<string, any>>;
167
+ details?: Array<Record<string, any>>;
167
168
  }
168
169
  /**
169
170
  * A point in source pixels, optionally placed in 3D.
170
171
  *
171
- * `worldX`/`worldY`/`worldZ` are metres, present only when the pipeline was
172
+ * `worldX`/`worldY`/`worldZ` are meters, present only when the pipeline was
172
173
  * asked for world coordinates - a Pop with `depthMap` and a component with
173
174
  * `toWorld` - and only in prediction v2. A point the worker could not place -
174
175
  * sky, outside the depth map, no usable map - carries none of the three rather
@@ -292,17 +293,17 @@ declare enum AutoAnnotateStatus {
292
293
  }
293
294
  interface DatasetAutoAnnotateCreate {
294
295
  auto_annotate: string;
295
- auto_annotate_params?: Map<string, any>;
296
+ auto_annotate_params?: Record<string, any>;
296
297
  source_model_uuid?: string;
297
298
  status?: AutoAnnotateStatus;
298
299
  status_message?: string;
299
300
  source?: string;
300
- metrics?: Map<string, any>;
301
+ metrics?: Record<string, any>;
301
302
  }
302
303
  interface DatasetAutoAnnotateUpdate {
303
304
  status?: AutoAnnotateStatus;
304
305
  status_message?: string;
305
- metrics?: Map<string, any>;
306
+ metrics?: Record<string, any>;
306
307
  }
307
308
  interface DatasetAutoAnnotate {
308
309
  created_at?: Date;
@@ -312,11 +313,11 @@ interface DatasetAutoAnnotate {
312
313
  source_ability_uuid?: string;
313
314
  source_model_uuid?: string;
314
315
  auto_annotate?: string;
315
- auto_annotate_params?: Map<string, any>;
316
+ auto_annotate_params?: Record<string, any>;
316
317
  status?: AutoAnnotateStatus;
317
318
  status_message?: string;
318
319
  source?: string;
319
- metrics?: Map<string, any>;
320
+ metrics?: Record<string, any>;
320
321
  }
321
322
  interface AssetImport {
322
323
  url: string;
@@ -484,7 +485,7 @@ interface Model {
484
485
  description?: string;
485
486
  external_id?: string;
486
487
  pretrained_model_uuid?: string;
487
- extra_params?: Map<string, any>;
488
+ extra_params?: Record<string, any>;
488
489
  task?: ModelTask;
489
490
  classes?: string[];
490
491
  type: ModelType;
@@ -503,7 +504,7 @@ interface ModelCreate {
503
504
  description: string;
504
505
  external_id?: string;
505
506
  pretrained_model_uuid?: string;
506
- extra_params?: Map<string, any>;
507
+ extra_params?: Record<string, any>;
507
508
  task?: ModelTask;
508
509
  classes?: string[];
509
510
  }
@@ -639,6 +640,12 @@ interface InferRuntimeConfig {
639
640
  context_length?: number;
640
641
  roi?: Area;
641
642
  }
643
+ /**
644
+ * Schema to constrain a VLM's output. Where one is set, the ability is
645
+ * guaranteed to return a structured object matching this Open API schema, and
646
+ * the parsed object arrives on each prediction's `details` attribute.
647
+ */
648
+ type ResponseSchema = OpenAPIV3_1.SchemaObject;
642
649
  interface TransformInto {
643
650
  classes?: string[];
644
651
  }
@@ -648,6 +655,7 @@ interface InferRequest {
648
655
  config: InferRuntimeConfig;
649
656
  refresh?: boolean;
650
657
  transform_into?: TransformInto;
658
+ response_schema?: ResponseSchema;
651
659
  }
652
660
  interface EvaluateFilter {
653
661
  partitions?: string[];
@@ -683,7 +691,7 @@ interface EvaluateResponse {
683
691
  status: EvaluationStatus;
684
692
  status_message?: string;
685
693
  source: string;
686
- metrics?: Map<string, any>;
694
+ metrics?: Record<string, any>;
687
695
  run_info: EvaluateRunInfo;
688
696
  }
689
697
  interface InferRunInfo {
@@ -699,6 +707,7 @@ interface AutoPromptConfig {
699
707
  num_samples: number;
700
708
  task_description?: string;
701
709
  infer: InferRequest;
710
+ response_schema?: ResponseSchema;
702
711
  evaluate: EvaluateConfig;
703
712
  }
704
713
  declare enum TaskType {
@@ -734,6 +743,7 @@ interface VlmAbilityCreate {
734
743
  worker_release: string;
735
744
  text_prompt: string;
736
745
  transform_into: TransformInto;
746
+ response_schema?: ResponseSchema;
737
747
  config: InferRuntimeConfig;
738
748
  is_public: boolean;
739
749
  video_chunk_length_ns?: number;
@@ -745,6 +755,7 @@ interface VlmAbilityUpdate {
745
755
  worker_release?: string;
746
756
  text_prompt?: string;
747
757
  transform_into?: TransformInto;
758
+ response_schema?: ResponseSchema;
748
759
  config?: InferRuntimeConfig;
749
760
  is_public?: boolean;
750
761
  video_chunk_length_ns?: number;
@@ -763,6 +774,7 @@ interface VlmAbility {
763
774
  worker_release?: string;
764
775
  text_prompt?: string;
765
776
  transform_into?: TransformInto;
777
+ response_schema?: ResponseSchema;
766
778
  config?: InferRuntimeConfig;
767
779
  video_chunk_length_ns?: number;
768
780
  video_chunk_overlap?: number;
@@ -851,7 +863,7 @@ interface Quaternion {
851
863
  y: number;
852
864
  z: number;
853
865
  }
854
- /** A translation in metres. */
866
+ /** A translation in meters. */
855
867
  interface Vector3d {
856
868
  x: number;
857
869
  y: number;
@@ -915,6 +927,11 @@ interface WorkerSession extends Session {
915
927
  * Configure transient sessions with `WorkerOptions.pop`.
916
928
  */
917
929
  readonly popId: string;
930
+ /**
931
+ * The account the compute session runs and is billed under. A worker endpoint
932
+ * created from this session names it when it creates a compute session.
933
+ */
934
+ readonly accountId?: string | undefined;
918
935
  readonly baseUrl: string | undefined;
919
936
  /**
920
937
  * Transient sessions may not have a pipeline until the first source is processed.
@@ -957,7 +974,6 @@ interface ResultStream extends AsyncIterable<Prediction> {
957
974
  declare enum PopComponentType {
958
975
  FORWARD = "forward",
959
976
  INFERENCE = "inference",
960
- TRACING = "tracing",
961
977
  TRACKING = "tracking",
962
978
  CONTOUR_FINDER = "contour_finder",
963
979
  COMPONENT_FINDER = "component_finder"
@@ -1169,6 +1185,16 @@ interface ProcessParams {
1169
1185
  * however wrong the guess was.
1170
1186
  */
1171
1187
  camera?: Camera | undefined;
1188
+ /**
1189
+ * Build RTSP SETUP URLs the pre-RFC-2326 way, by appending the SDP control
1190
+ * attribute to the stream URL. Applies to an `rtsp:` source only.
1191
+ *
1192
+ * Leave unset unless a camera will not open without it. The compliant
1193
+ * construction is what a camera advertising an absolute control URL needs -
1194
+ * Axis does - and forcing the old one gives such a camera a URL with the
1195
+ * address in it twice, which it answers 404.
1196
+ */
1197
+ rtspForceNonCompliantUrl?: boolean | undefined;
1172
1198
  }
1173
1199
  interface ProcessRequest extends ProcessParams {
1174
1200
  source: Source;
@@ -1373,6 +1399,12 @@ interface WorkerOptions extends Options {
1373
1399
  popId?: string | TransientPopId | undefined;
1374
1400
  sessionUuid?: string | undefined;
1375
1401
  sessionName?: string | undefined;
1402
+ /**
1403
+ * The account the compute session runs and is billed under, sent to compute-api as
1404
+ * `account_uuid`. Required when the credential does not name one account.
1405
+ * Defaults to process.env['EYEPOP_ACCOUNT_UUID'], then the deprecated process.env['EYEPOP_ACCOUNT_ID'].
1406
+ */
1407
+ accountId?: string | undefined;
1376
1408
  pipelineImage?: string | undefined;
1377
1409
  pipelineVersion?: string | undefined;
1378
1410
  pop?: Pop | undefined;
@@ -1388,6 +1420,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1388
1420
  private _popName;
1389
1421
  private _sessionAccessToken;
1390
1422
  private _sessionAccessTokenValidUntil;
1423
+ private _accountId;
1391
1424
  private _pipeline;
1392
1425
  private _pipelineCreatePromise;
1393
1426
  constructor(options: WorkerOptions);
@@ -1460,7 +1493,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1460
1493
 
1461
1494
  interface DataOptions extends Options {
1462
1495
  /**
1463
- * Defaults to process.env['EYEPOP_ACCOUNT_ID'].
1496
+ * Defaults to process.env['EYEPOP_ACCOUNT_UUID'], then the deprecated process.env['EYEPOP_ACCOUNT_ID'].
1464
1497
  */
1465
1498
  accountId?: string | undefined;
1466
1499
  disableWs?: boolean | undefined;
@@ -1658,7 +1691,7 @@ interface CloudBox {
1658
1691
  * A decoded point cloud, per object or per scene.
1659
1692
  *
1660
1693
  * Create with decodePointCloud(), cloudOfObject(), cloudOfDepth() or
1661
- * cloudsOfPrediction(). Coordinates are metres, in the frame the source's
1694
+ * cloudsOfPrediction(). Coordinates are meters, in the frame the source's
1662
1695
  * camera extrinsics define (Z up, ground at Z = 0) or the OpenCV camera frame
1663
1696
  * when it supplied none.
1664
1697
  *
@@ -1698,7 +1731,7 @@ declare class PointCloud {
1698
1731
  */
1699
1732
  get placedPoints(): Vector3[];
1700
1733
  /**
1701
- * Per axis (min, max) in metres over the placed points, or undefined if none were.
1734
+ * Per axis (min, max) in meters over the placed points, or undefined if none were.
1702
1735
  *
1703
1736
  * The counterpart to DepthMap's finiteMin/finiteMax, which are one axis
1704
1737
  * because a depth map has one value per pixel.
@@ -1794,6 +1827,25 @@ declare function randomMultipartBoundary(): string;
1794
1827
  */
1795
1828
  declare function encodeMultipartFormData(parts: MultipartPart[], boundary: string): ReadableStream<Uint8Array>;
1796
1829
 
1830
+ /**
1831
+ * A compute-api request that failed. `status` is the HTTP status and `code` the
1832
+ * compute-api error code (for example `VAL_001` when no account can be derived
1833
+ * for a new session), when the response carried one. The message stays the
1834
+ * readable one callers already see.
1835
+ */
1836
+ declare class ComputeApiError extends Error {
1837
+ readonly status: number;
1838
+ readonly code: string | undefined;
1839
+ constructor(message: string, status: number, code?: string);
1840
+ }
1841
+ /** A compute session picked by uuid runs under another account than the one configured. */
1842
+ declare class ComputeAccountMismatchError extends Error {
1843
+ readonly sessionUuid: string;
1844
+ readonly sessionAccountId: string | undefined;
1845
+ readonly accountId: string;
1846
+ constructor(sessionUuid: string, sessionAccountId: string | undefined, accountId: string);
1847
+ }
1848
+
1797
1849
  type UploadBody = ReadableStream<Uint8Array> | Blob | BufferSource;
1798
1850
  declare class AbstractJob implements ResultStream {
1799
1851
  protected _getSession: () => Promise<WorkerSession>;
@@ -1919,8 +1971,8 @@ declare namespace EyePop {
1919
1971
  * @deprecated use workerEndpoint() instead
1920
1972
  */
1921
1973
  const endpoint: typeof workerEndpoint;
1922
- function workerEndpoint(opts?: WorkerOptions): WorkerEndpoint;
1974
+ function workerEndpoint(options?: WorkerOptions): WorkerEndpoint;
1923
1975
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
1924
1976
  }
1925
1977
 
1926
- export { type AbilityAliasEntry, AbstractJob, type AccessTokenAuth, type AliasResolution, type Annotation, AnnotationInclusionMode, AnnotationType, type ApiKeyAuth, type Area, AreaType, ArtifactType, type Asset, type AssetImport, AssetInclusionMode, AssetStatus, AssetUrlType, type AssetUuidSource, type Auth0Options, type Authentication, type AutoAnnotate, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateStatus, AutoAnnotateTask, type AutoPromptConfig, type AutoTask, type BaseArea, type BaseComponent, type BaseTask, type Box, type Camera, type CameraDistortion, type CameraExtrinsics, type CameraIntrinsics, type ChangeEvent, ChangeType, type ClassificationTask, type CloudBounds, type CloudBox, type ComponentFinderComponent, type ComponentParams, type Contour, type ContourArea, type ContourFinderComponent, ContourType, type CreateWorkflow, type CreateWorkflowConfig, DEFAULT_PREDICTION_VERSION, DataApiType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetAutoAnnotate, type DatasetAutoAnnotateCreate, type DatasetAutoAnnotateUpdate, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, type Depth, DepthMap, type DepthSemantic, type DownloadResponse, Endpoint, EndpointState, type EvaluateConfig, type EvaluateFilter, type EvaluateRequest, type EvaluateResponse, type EvaluateRunInfo, EvaluationStatus, ExportedBy, EyePop, EyePopDataWebSocketError, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferRequest, type InferRunInfo, type InferRuntimeConfig, type InferenceComponent, InferenceType, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, LoadFromAssetUuidJob, LoadFromGroupJob, LoadFromJob, LoadMediaStreamJob, type LocalAuth, type Mask, type MediaStreamSource, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, type MotionDetectConfig, MotionModel, type MultipartContent, type MultipartPart, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type PlatformSupport, type Point2d, type Point3d, PointCloud, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopDepthMap, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedEmbedding, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedMotion, type PredictedObject, type PredictedText, type Prediction, PredictionVersion, type ProcessParams, type ProcessRequest, QUATERNION_TOLERANCE, type QcAiHubExportParams, type Quaternion, type RectangleArea, type ResultStream, type Roi, Semaphore, type Session, type SessionAuth, type Source, type SourceDefaults, Stream, type StreamEvent, type StreamSource, type StreamTime, TaskMode, TaskType, type TimeSpan, type TrackingComponent, TranscodeMode, type TransformInto, TransientPopId, UploadGroupJob, UploadJob, type UploadSource, type UrlSource, UserReview, type Vector3, type Vector3d, VideoMode, type VlmAbility, type VlmAbilityCreate, type VlmAbilityGroup, type VlmAbilityGroupCreate, type VlmAbilityGroupUpdate, VlmAbilityStatus, type VlmAbilityUpdate, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, accessTokenCredential, apiKeyCredential, cloudOfDepth, cloudOfObject, cloudsOfPrediction, decodeDepthMap, decodePointCloud, EyePop as default, encodeMultipartFormData, getBaseUrl, randomMultipartBoundary, readableStreamFromString, resolveAuth, validateCamera, validatePop };
1978
+ export { type AbilityAliasEntry, AbstractJob, type AccessTokenAuth, type AliasResolution, type Annotation, AnnotationInclusionMode, AnnotationType, type ApiKeyAuth, type Area, AreaType, ArtifactType, type Asset, type AssetImport, AssetInclusionMode, AssetStatus, AssetUrlType, type AssetUuidSource, type Auth0Options, type Authentication, type AutoAnnotate, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateStatus, AutoAnnotateTask, type AutoPromptConfig, type AutoTask, type BaseArea, type BaseComponent, type BaseTask, type Box, type Camera, type CameraDistortion, type CameraExtrinsics, type CameraIntrinsics, type ChangeEvent, ChangeType, type ClassificationTask, type CloudBounds, type CloudBox, type ComponentFinderComponent, type ComponentParams, ComputeAccountMismatchError, ComputeApiError, type Contour, type ContourArea, type ContourFinderComponent, ContourType, type CreateWorkflow, type CreateWorkflowConfig, DEFAULT_PREDICTION_VERSION, DataApiType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetAutoAnnotate, type DatasetAutoAnnotateCreate, type DatasetAutoAnnotateUpdate, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, type Depth, DepthMap, type DepthSemantic, type DownloadResponse, Endpoint, EndpointState, type EvaluateConfig, type EvaluateFilter, type EvaluateRequest, type EvaluateResponse, type EvaluateRunInfo, EvaluationStatus, ExportedBy, EyePop, EyePopDataWebSocketError, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferRequest, type InferRunInfo, type InferRuntimeConfig, type InferenceComponent, InferenceType, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, LoadFromAssetUuidJob, LoadFromGroupJob, LoadFromJob, LoadMediaStreamJob, type LocalAuth, type Mask, type MediaStreamSource, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, type MotionDetectConfig, MotionModel, type MultipartContent, type MultipartPart, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type PlatformSupport, type Point2d, type Point3d, PointCloud, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopDepthMap, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedEmbedding, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedMotion, type PredictedObject, type PredictedText, type Prediction, PredictionVersion, type ProcessParams, type ProcessRequest, QUATERNION_TOLERANCE, type QcAiHubExportParams, type Quaternion, type RectangleArea, type ResponseSchema, type ResultStream, type Roi, Semaphore, type Session, type SessionAuth, type Source, type SourceDefaults, Stream, type StreamEvent, type StreamSource, type StreamTime, TaskMode, TaskType, type TimeSpan, type TrackingComponent, TranscodeMode, type TransformInto, TransientPopId, UploadGroupJob, UploadJob, type UploadSource, type UrlSource, UserReview, type Vector3, type Vector3d, VideoMode, type VlmAbility, type VlmAbilityCreate, type VlmAbilityGroup, type VlmAbilityGroupCreate, type VlmAbilityGroupUpdate, VlmAbilityStatus, type VlmAbilityUpdate, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, accessTokenCredential, apiKeyCredential, cloudOfDepth, cloudOfObject, cloudsOfPrediction, decodeDepthMap, decodePointCloud, EyePop as default, encodeMultipartFormData, getBaseUrl, randomMultipartBoundary, readableStreamFromString, resolveAuth, validateCamera, validatePop };
@@ -1,4 +1,5 @@
1
1
  import { Logger } from 'pino';
2
+ import { OpenAPIV3_1 } from 'openapi-types';
2
3
 
3
4
  interface Session {
4
5
  readonly eyepopUrl: string;
@@ -69,7 +70,7 @@ interface Prediction extends StreamTime {
69
70
  meshs?: Array<PredictedMesh>;
70
71
  keyPoints?: Array<PredictedKeyPoints>;
71
72
  embeddings?: Array<PredictedEmbedding>;
72
- details?: Array<Map<string, any>>;
73
+ details?: Array<Record<string, any>>;
73
74
  motions?: Array<PredictedMotion>;
74
75
  depth?: Depth;
75
76
  }
@@ -125,9 +126,9 @@ interface Mask {
125
126
  * "unknown" included - so an absent member means a worker that predates the
126
127
  * field rather than a map that declined to say:
127
128
  *
128
- * - "canonical_metric" - metres = value * focal_px / 300, with focal_px scaled
129
+ * - "canonical_metric" - meters = value * focal_px / 300, with focal_px scaled
129
130
  * to the map's own resolution
130
- * - "metric" - the value is already metres
131
+ * - "metric" - the value is already meters
131
132
  * - "relative" - scale- AND shift-invariant, so ordering is meaningful but
132
133
  * distance is not. Not back-projectable: recovering a cloud from it yields a
133
134
  * distorted scene rather than a scaled one
@@ -163,12 +164,12 @@ interface PredictedObject extends PredictedClass {
163
164
  texts?: Array<PredictedText>;
164
165
  meshs?: Array<PredictedMesh>;
165
166
  keyPoints?: Array<PredictedKeyPoints>;
166
- details?: Array<Map<string, any>>;
167
+ details?: Array<Record<string, any>>;
167
168
  }
168
169
  /**
169
170
  * A point in source pixels, optionally placed in 3D.
170
171
  *
171
- * `worldX`/`worldY`/`worldZ` are metres, present only when the pipeline was
172
+ * `worldX`/`worldY`/`worldZ` are meters, present only when the pipeline was
172
173
  * asked for world coordinates - a Pop with `depthMap` and a component with
173
174
  * `toWorld` - and only in prediction v2. A point the worker could not place -
174
175
  * sky, outside the depth map, no usable map - carries none of the three rather
@@ -292,17 +293,17 @@ declare enum AutoAnnotateStatus {
292
293
  }
293
294
  interface DatasetAutoAnnotateCreate {
294
295
  auto_annotate: string;
295
- auto_annotate_params?: Map<string, any>;
296
+ auto_annotate_params?: Record<string, any>;
296
297
  source_model_uuid?: string;
297
298
  status?: AutoAnnotateStatus;
298
299
  status_message?: string;
299
300
  source?: string;
300
- metrics?: Map<string, any>;
301
+ metrics?: Record<string, any>;
301
302
  }
302
303
  interface DatasetAutoAnnotateUpdate {
303
304
  status?: AutoAnnotateStatus;
304
305
  status_message?: string;
305
- metrics?: Map<string, any>;
306
+ metrics?: Record<string, any>;
306
307
  }
307
308
  interface DatasetAutoAnnotate {
308
309
  created_at?: Date;
@@ -312,11 +313,11 @@ interface DatasetAutoAnnotate {
312
313
  source_ability_uuid?: string;
313
314
  source_model_uuid?: string;
314
315
  auto_annotate?: string;
315
- auto_annotate_params?: Map<string, any>;
316
+ auto_annotate_params?: Record<string, any>;
316
317
  status?: AutoAnnotateStatus;
317
318
  status_message?: string;
318
319
  source?: string;
319
- metrics?: Map<string, any>;
320
+ metrics?: Record<string, any>;
320
321
  }
321
322
  interface AssetImport {
322
323
  url: string;
@@ -484,7 +485,7 @@ interface Model {
484
485
  description?: string;
485
486
  external_id?: string;
486
487
  pretrained_model_uuid?: string;
487
- extra_params?: Map<string, any>;
488
+ extra_params?: Record<string, any>;
488
489
  task?: ModelTask;
489
490
  classes?: string[];
490
491
  type: ModelType;
@@ -503,7 +504,7 @@ interface ModelCreate {
503
504
  description: string;
504
505
  external_id?: string;
505
506
  pretrained_model_uuid?: string;
506
- extra_params?: Map<string, any>;
507
+ extra_params?: Record<string, any>;
507
508
  task?: ModelTask;
508
509
  classes?: string[];
509
510
  }
@@ -639,6 +640,12 @@ interface InferRuntimeConfig {
639
640
  context_length?: number;
640
641
  roi?: Area;
641
642
  }
643
+ /**
644
+ * Schema to constrain a VLM's output. Where one is set, the ability is
645
+ * guaranteed to return a structured object matching this Open API schema, and
646
+ * the parsed object arrives on each prediction's `details` attribute.
647
+ */
648
+ type ResponseSchema = OpenAPIV3_1.SchemaObject;
642
649
  interface TransformInto {
643
650
  classes?: string[];
644
651
  }
@@ -648,6 +655,7 @@ interface InferRequest {
648
655
  config: InferRuntimeConfig;
649
656
  refresh?: boolean;
650
657
  transform_into?: TransformInto;
658
+ response_schema?: ResponseSchema;
651
659
  }
652
660
  interface EvaluateFilter {
653
661
  partitions?: string[];
@@ -683,7 +691,7 @@ interface EvaluateResponse {
683
691
  status: EvaluationStatus;
684
692
  status_message?: string;
685
693
  source: string;
686
- metrics?: Map<string, any>;
694
+ metrics?: Record<string, any>;
687
695
  run_info: EvaluateRunInfo;
688
696
  }
689
697
  interface InferRunInfo {
@@ -699,6 +707,7 @@ interface AutoPromptConfig {
699
707
  num_samples: number;
700
708
  task_description?: string;
701
709
  infer: InferRequest;
710
+ response_schema?: ResponseSchema;
702
711
  evaluate: EvaluateConfig;
703
712
  }
704
713
  declare enum TaskType {
@@ -734,6 +743,7 @@ interface VlmAbilityCreate {
734
743
  worker_release: string;
735
744
  text_prompt: string;
736
745
  transform_into: TransformInto;
746
+ response_schema?: ResponseSchema;
737
747
  config: InferRuntimeConfig;
738
748
  is_public: boolean;
739
749
  video_chunk_length_ns?: number;
@@ -745,6 +755,7 @@ interface VlmAbilityUpdate {
745
755
  worker_release?: string;
746
756
  text_prompt?: string;
747
757
  transform_into?: TransformInto;
758
+ response_schema?: ResponseSchema;
748
759
  config?: InferRuntimeConfig;
749
760
  is_public?: boolean;
750
761
  video_chunk_length_ns?: number;
@@ -763,6 +774,7 @@ interface VlmAbility {
763
774
  worker_release?: string;
764
775
  text_prompt?: string;
765
776
  transform_into?: TransformInto;
777
+ response_schema?: ResponseSchema;
766
778
  config?: InferRuntimeConfig;
767
779
  video_chunk_length_ns?: number;
768
780
  video_chunk_overlap?: number;
@@ -851,7 +863,7 @@ interface Quaternion {
851
863
  y: number;
852
864
  z: number;
853
865
  }
854
- /** A translation in metres. */
866
+ /** A translation in meters. */
855
867
  interface Vector3d {
856
868
  x: number;
857
869
  y: number;
@@ -915,6 +927,11 @@ interface WorkerSession extends Session {
915
927
  * Configure transient sessions with `WorkerOptions.pop`.
916
928
  */
917
929
  readonly popId: string;
930
+ /**
931
+ * The account the compute session runs and is billed under. A worker endpoint
932
+ * created from this session names it when it creates a compute session.
933
+ */
934
+ readonly accountId?: string | undefined;
918
935
  readonly baseUrl: string | undefined;
919
936
  /**
920
937
  * Transient sessions may not have a pipeline until the first source is processed.
@@ -957,7 +974,6 @@ interface ResultStream extends AsyncIterable<Prediction> {
957
974
  declare enum PopComponentType {
958
975
  FORWARD = "forward",
959
976
  INFERENCE = "inference",
960
- TRACING = "tracing",
961
977
  TRACKING = "tracking",
962
978
  CONTOUR_FINDER = "contour_finder",
963
979
  COMPONENT_FINDER = "component_finder"
@@ -1169,6 +1185,16 @@ interface ProcessParams {
1169
1185
  * however wrong the guess was.
1170
1186
  */
1171
1187
  camera?: Camera | undefined;
1188
+ /**
1189
+ * Build RTSP SETUP URLs the pre-RFC-2326 way, by appending the SDP control
1190
+ * attribute to the stream URL. Applies to an `rtsp:` source only.
1191
+ *
1192
+ * Leave unset unless a camera will not open without it. The compliant
1193
+ * construction is what a camera advertising an absolute control URL needs -
1194
+ * Axis does - and forcing the old one gives such a camera a URL with the
1195
+ * address in it twice, which it answers 404.
1196
+ */
1197
+ rtspForceNonCompliantUrl?: boolean | undefined;
1172
1198
  }
1173
1199
  interface ProcessRequest extends ProcessParams {
1174
1200
  source: Source;
@@ -1373,6 +1399,12 @@ interface WorkerOptions extends Options {
1373
1399
  popId?: string | TransientPopId | undefined;
1374
1400
  sessionUuid?: string | undefined;
1375
1401
  sessionName?: string | undefined;
1402
+ /**
1403
+ * The account the compute session runs and is billed under, sent to compute-api as
1404
+ * `account_uuid`. Required when the credential does not name one account.
1405
+ * Defaults to process.env['EYEPOP_ACCOUNT_UUID'], then the deprecated process.env['EYEPOP_ACCOUNT_ID'].
1406
+ */
1407
+ accountId?: string | undefined;
1376
1408
  pipelineImage?: string | undefined;
1377
1409
  pipelineVersion?: string | undefined;
1378
1410
  pop?: Pop | undefined;
@@ -1388,6 +1420,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1388
1420
  private _popName;
1389
1421
  private _sessionAccessToken;
1390
1422
  private _sessionAccessTokenValidUntil;
1423
+ private _accountId;
1391
1424
  private _pipeline;
1392
1425
  private _pipelineCreatePromise;
1393
1426
  constructor(options: WorkerOptions);
@@ -1460,7 +1493,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1460
1493
 
1461
1494
  interface DataOptions extends Options {
1462
1495
  /**
1463
- * Defaults to process.env['EYEPOP_ACCOUNT_ID'].
1496
+ * Defaults to process.env['EYEPOP_ACCOUNT_UUID'], then the deprecated process.env['EYEPOP_ACCOUNT_ID'].
1464
1497
  */
1465
1498
  accountId?: string | undefined;
1466
1499
  disableWs?: boolean | undefined;
@@ -1658,7 +1691,7 @@ interface CloudBox {
1658
1691
  * A decoded point cloud, per object or per scene.
1659
1692
  *
1660
1693
  * Create with decodePointCloud(), cloudOfObject(), cloudOfDepth() or
1661
- * cloudsOfPrediction(). Coordinates are metres, in the frame the source's
1694
+ * cloudsOfPrediction(). Coordinates are meters, in the frame the source's
1662
1695
  * camera extrinsics define (Z up, ground at Z = 0) or the OpenCV camera frame
1663
1696
  * when it supplied none.
1664
1697
  *
@@ -1698,7 +1731,7 @@ declare class PointCloud {
1698
1731
  */
1699
1732
  get placedPoints(): Vector3[];
1700
1733
  /**
1701
- * Per axis (min, max) in metres over the placed points, or undefined if none were.
1734
+ * Per axis (min, max) in meters over the placed points, or undefined if none were.
1702
1735
  *
1703
1736
  * The counterpart to DepthMap's finiteMin/finiteMax, which are one axis
1704
1737
  * because a depth map has one value per pixel.
@@ -1794,6 +1827,25 @@ declare function randomMultipartBoundary(): string;
1794
1827
  */
1795
1828
  declare function encodeMultipartFormData(parts: MultipartPart[], boundary: string): ReadableStream<Uint8Array>;
1796
1829
 
1830
+ /**
1831
+ * A compute-api request that failed. `status` is the HTTP status and `code` the
1832
+ * compute-api error code (for example `VAL_001` when no account can be derived
1833
+ * for a new session), when the response carried one. The message stays the
1834
+ * readable one callers already see.
1835
+ */
1836
+ declare class ComputeApiError extends Error {
1837
+ readonly status: number;
1838
+ readonly code: string | undefined;
1839
+ constructor(message: string, status: number, code?: string);
1840
+ }
1841
+ /** A compute session picked by uuid runs under another account than the one configured. */
1842
+ declare class ComputeAccountMismatchError extends Error {
1843
+ readonly sessionUuid: string;
1844
+ readonly sessionAccountId: string | undefined;
1845
+ readonly accountId: string;
1846
+ constructor(sessionUuid: string, sessionAccountId: string | undefined, accountId: string);
1847
+ }
1848
+
1797
1849
  type UploadBody = ReadableStream<Uint8Array> | Blob | BufferSource;
1798
1850
  declare class AbstractJob implements ResultStream {
1799
1851
  protected _getSession: () => Promise<WorkerSession>;
@@ -1919,8 +1971,8 @@ declare namespace EyePop {
1919
1971
  * @deprecated use workerEndpoint() instead
1920
1972
  */
1921
1973
  const endpoint: typeof workerEndpoint;
1922
- function workerEndpoint(opts?: WorkerOptions): WorkerEndpoint;
1974
+ function workerEndpoint(options?: WorkerOptions): WorkerEndpoint;
1923
1975
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
1924
1976
  }
1925
1977
 
1926
- export { type AbilityAliasEntry, AbstractJob, type AccessTokenAuth, type AliasResolution, type Annotation, AnnotationInclusionMode, AnnotationType, type ApiKeyAuth, type Area, AreaType, ArtifactType, type Asset, type AssetImport, AssetInclusionMode, AssetStatus, AssetUrlType, type AssetUuidSource, type Auth0Options, type Authentication, type AutoAnnotate, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateStatus, AutoAnnotateTask, type AutoPromptConfig, type AutoTask, type BaseArea, type BaseComponent, type BaseTask, type Box, type Camera, type CameraDistortion, type CameraExtrinsics, type CameraIntrinsics, type ChangeEvent, ChangeType, type ClassificationTask, type CloudBounds, type CloudBox, type ComponentFinderComponent, type ComponentParams, type Contour, type ContourArea, type ContourFinderComponent, ContourType, type CreateWorkflow, type CreateWorkflowConfig, DEFAULT_PREDICTION_VERSION, DataApiType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetAutoAnnotate, type DatasetAutoAnnotateCreate, type DatasetAutoAnnotateUpdate, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, type Depth, DepthMap, type DepthSemantic, type DownloadResponse, Endpoint, EndpointState, type EvaluateConfig, type EvaluateFilter, type EvaluateRequest, type EvaluateResponse, type EvaluateRunInfo, EvaluationStatus, ExportedBy, EyePop, EyePopDataWebSocketError, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferRequest, type InferRunInfo, type InferRuntimeConfig, type InferenceComponent, InferenceType, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, LoadFromAssetUuidJob, LoadFromGroupJob, LoadFromJob, LoadMediaStreamJob, type LocalAuth, type Mask, type MediaStreamSource, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, type MotionDetectConfig, MotionModel, type MultipartContent, type MultipartPart, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type PlatformSupport, type Point2d, type Point3d, PointCloud, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopDepthMap, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedEmbedding, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedMotion, type PredictedObject, type PredictedText, type Prediction, PredictionVersion, type ProcessParams, type ProcessRequest, QUATERNION_TOLERANCE, type QcAiHubExportParams, type Quaternion, type RectangleArea, type ResultStream, type Roi, Semaphore, type Session, type SessionAuth, type Source, type SourceDefaults, Stream, type StreamEvent, type StreamSource, type StreamTime, TaskMode, TaskType, type TimeSpan, type TrackingComponent, TranscodeMode, type TransformInto, TransientPopId, UploadGroupJob, UploadJob, type UploadSource, type UrlSource, UserReview, type Vector3, type Vector3d, VideoMode, type VlmAbility, type VlmAbilityCreate, type VlmAbilityGroup, type VlmAbilityGroupCreate, type VlmAbilityGroupUpdate, VlmAbilityStatus, type VlmAbilityUpdate, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, accessTokenCredential, apiKeyCredential, cloudOfDepth, cloudOfObject, cloudsOfPrediction, decodeDepthMap, decodePointCloud, EyePop as default, encodeMultipartFormData, getBaseUrl, randomMultipartBoundary, readableStreamFromString, resolveAuth, validateCamera, validatePop };
1978
+ export { type AbilityAliasEntry, AbstractJob, type AccessTokenAuth, type AliasResolution, type Annotation, AnnotationInclusionMode, AnnotationType, type ApiKeyAuth, type Area, AreaType, ArtifactType, type Asset, type AssetImport, AssetInclusionMode, AssetStatus, AssetUrlType, type AssetUuidSource, type Auth0Options, type Authentication, type AutoAnnotate, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateStatus, AutoAnnotateTask, type AutoPromptConfig, type AutoTask, type BaseArea, type BaseComponent, type BaseTask, type Box, type Camera, type CameraDistortion, type CameraExtrinsics, type CameraIntrinsics, type ChangeEvent, ChangeType, type ClassificationTask, type CloudBounds, type CloudBox, type ComponentFinderComponent, type ComponentParams, ComputeAccountMismatchError, ComputeApiError, type Contour, type ContourArea, type ContourFinderComponent, ContourType, type CreateWorkflow, type CreateWorkflowConfig, DEFAULT_PREDICTION_VERSION, DataApiType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetAutoAnnotate, type DatasetAutoAnnotateCreate, type DatasetAutoAnnotateUpdate, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, type Depth, DepthMap, type DepthSemantic, type DownloadResponse, Endpoint, EndpointState, type EvaluateConfig, type EvaluateFilter, type EvaluateRequest, type EvaluateResponse, type EvaluateRunInfo, EvaluationStatus, ExportedBy, EyePop, EyePopDataWebSocketError, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferRequest, type InferRunInfo, type InferRuntimeConfig, type InferenceComponent, InferenceType, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, LoadFromAssetUuidJob, LoadFromGroupJob, LoadFromJob, LoadMediaStreamJob, type LocalAuth, type Mask, type MediaStreamSource, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, type MotionDetectConfig, MotionModel, type MultipartContent, type MultipartPart, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type PlatformSupport, type Point2d, type Point3d, PointCloud, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopDepthMap, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedEmbedding, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedMotion, type PredictedObject, type PredictedText, type Prediction, PredictionVersion, type ProcessParams, type ProcessRequest, QUATERNION_TOLERANCE, type QcAiHubExportParams, type Quaternion, type RectangleArea, type ResponseSchema, type ResultStream, type Roi, Semaphore, type Session, type SessionAuth, type Source, type SourceDefaults, Stream, type StreamEvent, type StreamSource, type StreamTime, TaskMode, TaskType, type TimeSpan, type TrackingComponent, TranscodeMode, type TransformInto, TransientPopId, UploadGroupJob, UploadJob, type UploadSource, type UrlSource, UserReview, type Vector3, type Vector3d, VideoMode, type VlmAbility, type VlmAbilityCreate, type VlmAbilityGroup, type VlmAbilityGroupCreate, type VlmAbilityGroupUpdate, VlmAbilityStatus, type VlmAbilityUpdate, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, accessTokenCredential, apiKeyCredential, cloudOfDepth, cloudOfObject, cloudsOfPrediction, decodeDepthMap, decodePointCloud, EyePop as default, encodeMultipartFormData, getBaseUrl, randomMultipartBoundary, readableStreamFromString, resolveAuth, validateCamera, validatePop };