@eyepop.ai/eyepop 3.20.1 → 3.22.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.
@@ -126,9 +126,9 @@ interface Mask {
126
126
  * "unknown" included - so an absent member means a worker that predates the
127
127
  * field rather than a map that declined to say:
128
128
  *
129
- * - "canonical_metric" - metres = value * focal_px / 300, with focal_px scaled
129
+ * - "canonical_metric" - meters = value * focal_px / 300, with focal_px scaled
130
130
  * to the map's own resolution
131
- * - "metric" - the value is already metres
131
+ * - "metric" - the value is already meters
132
132
  * - "relative" - scale- AND shift-invariant, so ordering is meaningful but
133
133
  * distance is not. Not back-projectable: recovering a cloud from it yields a
134
134
  * distorted scene rather than a scaled one
@@ -169,7 +169,7 @@ interface PredictedObject extends PredictedClass {
169
169
  /**
170
170
  * A point in source pixels, optionally placed in 3D.
171
171
  *
172
- * `worldX`/`worldY`/`worldZ` are metres, present only when the pipeline was
172
+ * `worldX`/`worldY`/`worldZ` are meters, present only when the pipeline was
173
173
  * asked for world coordinates - a Pop with `depthMap` and a component with
174
174
  * `toWorld` - and only in prediction v2. A point the worker could not place -
175
175
  * sky, outside the depth map, no usable map - carries none of the three rather
@@ -863,7 +863,7 @@ interface Quaternion {
863
863
  y: number;
864
864
  z: number;
865
865
  }
866
- /** A translation in metres. */
866
+ /** A translation in meters. */
867
867
  interface Vector3d {
868
868
  x: number;
869
869
  y: number;
@@ -927,6 +927,11 @@ interface WorkerSession extends Session {
927
927
  * Configure transient sessions with `WorkerOptions.pop`.
928
928
  */
929
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;
930
935
  readonly baseUrl: string | undefined;
931
936
  /**
932
937
  * Transient sessions may not have a pipeline until the first source is processed.
@@ -1037,6 +1042,7 @@ interface InferenceComponent extends BaseComponent {
1037
1042
  confidenceThreshold?: number;
1038
1043
  topK?: number;
1039
1044
  topKClasses?: number;
1045
+ classes?: string[];
1040
1046
  targetFps?: string;
1041
1047
  videoChunkLengthSeconds?: number;
1042
1048
  videoChunkOverlap?: number;
@@ -1180,6 +1186,16 @@ interface ProcessParams {
1180
1186
  * however wrong the guess was.
1181
1187
  */
1182
1188
  camera?: Camera | undefined;
1189
+ /**
1190
+ * Build RTSP SETUP URLs the pre-RFC-2326 way, by appending the SDP control
1191
+ * attribute to the stream URL. Applies to an `rtsp:` source only.
1192
+ *
1193
+ * Leave unset unless a camera will not open without it. The compliant
1194
+ * construction is what a camera advertising an absolute control URL needs -
1195
+ * Axis does - and forcing the old one gives such a camera a URL with the
1196
+ * address in it twice, which it answers 404.
1197
+ */
1198
+ rtspForceNonCompliantUrl?: boolean | undefined;
1183
1199
  }
1184
1200
  interface ProcessRequest extends ProcessParams {
1185
1201
  source: Source;
@@ -1384,6 +1400,12 @@ interface WorkerOptions extends Options {
1384
1400
  popId?: string | TransientPopId | undefined;
1385
1401
  sessionUuid?: string | undefined;
1386
1402
  sessionName?: string | undefined;
1403
+ /**
1404
+ * The account the compute session runs and is billed under, sent to compute-api as
1405
+ * `account_uuid`. Required when the credential does not name one account.
1406
+ * Defaults to process.env['EYEPOP_ACCOUNT_UUID'], then the deprecated process.env['EYEPOP_ACCOUNT_ID'].
1407
+ */
1408
+ accountId?: string | undefined;
1387
1409
  pipelineImage?: string | undefined;
1388
1410
  pipelineVersion?: string | undefined;
1389
1411
  pop?: Pop | undefined;
@@ -1399,6 +1421,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1399
1421
  private _popName;
1400
1422
  private _sessionAccessToken;
1401
1423
  private _sessionAccessTokenValidUntil;
1424
+ private _accountId;
1402
1425
  private _pipeline;
1403
1426
  private _pipelineCreatePromise;
1404
1427
  constructor(options: WorkerOptions);
@@ -1471,7 +1494,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1471
1494
 
1472
1495
  interface DataOptions extends Options {
1473
1496
  /**
1474
- * Defaults to process.env['EYEPOP_ACCOUNT_ID'].
1497
+ * Defaults to process.env['EYEPOP_ACCOUNT_UUID'], then the deprecated process.env['EYEPOP_ACCOUNT_ID'].
1475
1498
  */
1476
1499
  accountId?: string | undefined;
1477
1500
  disableWs?: boolean | undefined;
@@ -1669,7 +1692,7 @@ interface CloudBox {
1669
1692
  * A decoded point cloud, per object or per scene.
1670
1693
  *
1671
1694
  * Create with decodePointCloud(), cloudOfObject(), cloudOfDepth() or
1672
- * cloudsOfPrediction(). Coordinates are metres, in the frame the source's
1695
+ * cloudsOfPrediction(). Coordinates are meters, in the frame the source's
1673
1696
  * camera extrinsics define (Z up, ground at Z = 0) or the OpenCV camera frame
1674
1697
  * when it supplied none.
1675
1698
  *
@@ -1709,7 +1732,7 @@ declare class PointCloud {
1709
1732
  */
1710
1733
  get placedPoints(): Vector3[];
1711
1734
  /**
1712
- * Per axis (min, max) in metres over the placed points, or undefined if none were.
1735
+ * Per axis (min, max) in meters over the placed points, or undefined if none were.
1713
1736
  *
1714
1737
  * The counterpart to DepthMap's finiteMin/finiteMax, which are one axis
1715
1738
  * because a depth map has one value per pixel.
@@ -1805,6 +1828,25 @@ declare function randomMultipartBoundary(): string;
1805
1828
  */
1806
1829
  declare function encodeMultipartFormData(parts: MultipartPart[], boundary: string): ReadableStream<Uint8Array>;
1807
1830
 
1831
+ /**
1832
+ * A compute-api request that failed. `status` is the HTTP status and `code` the
1833
+ * compute-api error code (for example `VAL_001` when no account can be derived
1834
+ * for a new session), when the response carried one. The message stays the
1835
+ * readable one callers already see.
1836
+ */
1837
+ declare class ComputeApiError extends Error {
1838
+ readonly status: number;
1839
+ readonly code: string | undefined;
1840
+ constructor(message: string, status: number, code?: string);
1841
+ }
1842
+ /** A compute session picked by uuid runs under another account than the one configured. */
1843
+ declare class ComputeAccountMismatchError extends Error {
1844
+ readonly sessionUuid: string;
1845
+ readonly sessionAccountId: string | undefined;
1846
+ readonly accountId: string;
1847
+ constructor(sessionUuid: string, sessionAccountId: string | undefined, accountId: string);
1848
+ }
1849
+
1808
1850
  type UploadBody = ReadableStream<Uint8Array> | Blob | BufferSource;
1809
1851
  declare class AbstractJob implements ResultStream {
1810
1852
  protected _getSession: () => Promise<WorkerSession>;
@@ -1930,8 +1972,8 @@ declare namespace EyePop {
1930
1972
  * @deprecated use workerEndpoint() instead
1931
1973
  */
1932
1974
  const endpoint: typeof workerEndpoint;
1933
- function workerEndpoint(opts?: WorkerOptions): WorkerEndpoint;
1975
+ function workerEndpoint(options?: WorkerOptions): WorkerEndpoint;
1934
1976
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
1935
1977
  }
1936
1978
 
1937
- 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 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 };
1979
+ 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 };
@@ -126,9 +126,9 @@ interface Mask {
126
126
  * "unknown" included - so an absent member means a worker that predates the
127
127
  * field rather than a map that declined to say:
128
128
  *
129
- * - "canonical_metric" - metres = value * focal_px / 300, with focal_px scaled
129
+ * - "canonical_metric" - meters = value * focal_px / 300, with focal_px scaled
130
130
  * to the map's own resolution
131
- * - "metric" - the value is already metres
131
+ * - "metric" - the value is already meters
132
132
  * - "relative" - scale- AND shift-invariant, so ordering is meaningful but
133
133
  * distance is not. Not back-projectable: recovering a cloud from it yields a
134
134
  * distorted scene rather than a scaled one
@@ -169,7 +169,7 @@ interface PredictedObject extends PredictedClass {
169
169
  /**
170
170
  * A point in source pixels, optionally placed in 3D.
171
171
  *
172
- * `worldX`/`worldY`/`worldZ` are metres, present only when the pipeline was
172
+ * `worldX`/`worldY`/`worldZ` are meters, present only when the pipeline was
173
173
  * asked for world coordinates - a Pop with `depthMap` and a component with
174
174
  * `toWorld` - and only in prediction v2. A point the worker could not place -
175
175
  * sky, outside the depth map, no usable map - carries none of the three rather
@@ -863,7 +863,7 @@ interface Quaternion {
863
863
  y: number;
864
864
  z: number;
865
865
  }
866
- /** A translation in metres. */
866
+ /** A translation in meters. */
867
867
  interface Vector3d {
868
868
  x: number;
869
869
  y: number;
@@ -927,6 +927,11 @@ interface WorkerSession extends Session {
927
927
  * Configure transient sessions with `WorkerOptions.pop`.
928
928
  */
929
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;
930
935
  readonly baseUrl: string | undefined;
931
936
  /**
932
937
  * Transient sessions may not have a pipeline until the first source is processed.
@@ -1037,6 +1042,7 @@ interface InferenceComponent extends BaseComponent {
1037
1042
  confidenceThreshold?: number;
1038
1043
  topK?: number;
1039
1044
  topKClasses?: number;
1045
+ classes?: string[];
1040
1046
  targetFps?: string;
1041
1047
  videoChunkLengthSeconds?: number;
1042
1048
  videoChunkOverlap?: number;
@@ -1180,6 +1186,16 @@ interface ProcessParams {
1180
1186
  * however wrong the guess was.
1181
1187
  */
1182
1188
  camera?: Camera | undefined;
1189
+ /**
1190
+ * Build RTSP SETUP URLs the pre-RFC-2326 way, by appending the SDP control
1191
+ * attribute to the stream URL. Applies to an `rtsp:` source only.
1192
+ *
1193
+ * Leave unset unless a camera will not open without it. The compliant
1194
+ * construction is what a camera advertising an absolute control URL needs -
1195
+ * Axis does - and forcing the old one gives such a camera a URL with the
1196
+ * address in it twice, which it answers 404.
1197
+ */
1198
+ rtspForceNonCompliantUrl?: boolean | undefined;
1183
1199
  }
1184
1200
  interface ProcessRequest extends ProcessParams {
1185
1201
  source: Source;
@@ -1384,6 +1400,12 @@ interface WorkerOptions extends Options {
1384
1400
  popId?: string | TransientPopId | undefined;
1385
1401
  sessionUuid?: string | undefined;
1386
1402
  sessionName?: string | undefined;
1403
+ /**
1404
+ * The account the compute session runs and is billed under, sent to compute-api as
1405
+ * `account_uuid`. Required when the credential does not name one account.
1406
+ * Defaults to process.env['EYEPOP_ACCOUNT_UUID'], then the deprecated process.env['EYEPOP_ACCOUNT_ID'].
1407
+ */
1408
+ accountId?: string | undefined;
1387
1409
  pipelineImage?: string | undefined;
1388
1410
  pipelineVersion?: string | undefined;
1389
1411
  pop?: Pop | undefined;
@@ -1399,6 +1421,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1399
1421
  private _popName;
1400
1422
  private _sessionAccessToken;
1401
1423
  private _sessionAccessTokenValidUntil;
1424
+ private _accountId;
1402
1425
  private _pipeline;
1403
1426
  private _pipelineCreatePromise;
1404
1427
  constructor(options: WorkerOptions);
@@ -1471,7 +1494,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1471
1494
 
1472
1495
  interface DataOptions extends Options {
1473
1496
  /**
1474
- * Defaults to process.env['EYEPOP_ACCOUNT_ID'].
1497
+ * Defaults to process.env['EYEPOP_ACCOUNT_UUID'], then the deprecated process.env['EYEPOP_ACCOUNT_ID'].
1475
1498
  */
1476
1499
  accountId?: string | undefined;
1477
1500
  disableWs?: boolean | undefined;
@@ -1669,7 +1692,7 @@ interface CloudBox {
1669
1692
  * A decoded point cloud, per object or per scene.
1670
1693
  *
1671
1694
  * Create with decodePointCloud(), cloudOfObject(), cloudOfDepth() or
1672
- * cloudsOfPrediction(). Coordinates are metres, in the frame the source's
1695
+ * cloudsOfPrediction(). Coordinates are meters, in the frame the source's
1673
1696
  * camera extrinsics define (Z up, ground at Z = 0) or the OpenCV camera frame
1674
1697
  * when it supplied none.
1675
1698
  *
@@ -1709,7 +1732,7 @@ declare class PointCloud {
1709
1732
  */
1710
1733
  get placedPoints(): Vector3[];
1711
1734
  /**
1712
- * Per axis (min, max) in metres over the placed points, or undefined if none were.
1735
+ * Per axis (min, max) in meters over the placed points, or undefined if none were.
1713
1736
  *
1714
1737
  * The counterpart to DepthMap's finiteMin/finiteMax, which are one axis
1715
1738
  * because a depth map has one value per pixel.
@@ -1805,6 +1828,25 @@ declare function randomMultipartBoundary(): string;
1805
1828
  */
1806
1829
  declare function encodeMultipartFormData(parts: MultipartPart[], boundary: string): ReadableStream<Uint8Array>;
1807
1830
 
1831
+ /**
1832
+ * A compute-api request that failed. `status` is the HTTP status and `code` the
1833
+ * compute-api error code (for example `VAL_001` when no account can be derived
1834
+ * for a new session), when the response carried one. The message stays the
1835
+ * readable one callers already see.
1836
+ */
1837
+ declare class ComputeApiError extends Error {
1838
+ readonly status: number;
1839
+ readonly code: string | undefined;
1840
+ constructor(message: string, status: number, code?: string);
1841
+ }
1842
+ /** A compute session picked by uuid runs under another account than the one configured. */
1843
+ declare class ComputeAccountMismatchError extends Error {
1844
+ readonly sessionUuid: string;
1845
+ readonly sessionAccountId: string | undefined;
1846
+ readonly accountId: string;
1847
+ constructor(sessionUuid: string, sessionAccountId: string | undefined, accountId: string);
1848
+ }
1849
+
1808
1850
  type UploadBody = ReadableStream<Uint8Array> | Blob | BufferSource;
1809
1851
  declare class AbstractJob implements ResultStream {
1810
1852
  protected _getSession: () => Promise<WorkerSession>;
@@ -1930,8 +1972,8 @@ declare namespace EyePop {
1930
1972
  * @deprecated use workerEndpoint() instead
1931
1973
  */
1932
1974
  const endpoint: typeof workerEndpoint;
1933
- function workerEndpoint(opts?: WorkerOptions): WorkerEndpoint;
1975
+ function workerEndpoint(options?: WorkerOptions): WorkerEndpoint;
1934
1976
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
1935
1977
  }
1936
1978
 
1937
- 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 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 };
1979
+ 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 };
@@ -8667,6 +8667,8 @@ __export(index_exports, {
8667
8667
  AutoAnnotateStatus: () => AutoAnnotateStatus,
8668
8668
  AutoAnnotateTask: () => AutoAnnotateTask,
8669
8669
  ChangeType: () => ChangeType,
8670
+ ComputeAccountMismatchError: () => ComputeAccountMismatchError,
8671
+ ComputeApiError: () => ComputeApiError,
8670
8672
  ContourType: () => ContourType,
8671
8673
  DEFAULT_PREDICTION_VERSION: () => DEFAULT_PREDICTION_VERSION,
8672
8674
  DataApiType: () => DataApiType,
@@ -8778,6 +8780,9 @@ function pipelineIdFromSession(session) {
8778
8780
  }
8779
8781
  function sessionCreateBody(options) {
8780
8782
  const body = {};
8783
+ if (options.accountId) {
8784
+ body.account_uuid = options.accountId;
8785
+ }
8781
8786
  if (options.sessionName) {
8782
8787
  body.session_name = options.sessionName;
8783
8788
  }
@@ -8827,6 +8832,42 @@ function pipelineErrorMessage(session) {
8827
8832
  }
8828
8833
  return null;
8829
8834
  }
8835
+ var ComputeApiError = class extends Error {
8836
+ constructor(message, status, code) {
8837
+ super(message);
8838
+ this.name = "ComputeApiError";
8839
+ this.status = status;
8840
+ this.code = code;
8841
+ }
8842
+ };
8843
+ var ComputeAccountMismatchError = class extends Error {
8844
+ constructor(sessionUuid, sessionAccountId, accountId) {
8845
+ super(`Compute session ${sessionUuid} runs under account ${sessionAccountId || "(none)"}, not the configured account ${accountId}`);
8846
+ this.name = "ComputeAccountMismatchError";
8847
+ this.sessionUuid = sessionUuid;
8848
+ this.sessionAccountId = sessionAccountId;
8849
+ this.accountId = accountId;
8850
+ }
8851
+ };
8852
+ async function computeApiError(response, action) {
8853
+ const code = await responseErrorCode(response);
8854
+ const message = await responseErrorMessage(response);
8855
+ return new ComputeApiError(`Unexpected status ${response.status} ${action}: ${message}`, response.status, code);
8856
+ }
8857
+ async function responseErrorCode(response) {
8858
+ try {
8859
+ const parsed = normalizedJsonValue(await response.clone().json());
8860
+ if (!parsed || typeof parsed != "object") {
8861
+ return void 0;
8862
+ }
8863
+ const record = parsed;
8864
+ const nested = normalizedJsonValue(record["error"]);
8865
+ const code = nested && typeof nested == "object" ? nested["code"] : record["code"];
8866
+ return typeof code == "string" && code.length > 0 ? code : void 0;
8867
+ } catch (_) {
8868
+ return void 0;
8869
+ }
8870
+ }
8830
8871
  async function responseErrorMessage(response) {
8831
8872
  const contentType = response.headers.get("content-type") || "";
8832
8873
  if (contentType.includes("application/json")) {
@@ -8930,8 +8971,7 @@ var ComputeSessionClient = class {
8930
8971
  if (response.status == 404) {
8931
8972
  sessions = [];
8932
8973
  } else if (response.status != 200) {
8933
- const message = await responseErrorMessage(response);
8934
- throw new Error(`Unexpected status ${response.status} fetching compute sessions: ${message}`);
8974
+ throw await computeApiError(response, "fetching compute sessions");
8935
8975
  } else {
8936
8976
  const response_content = await responseJson(response);
8937
8977
  sessions = response_content;
@@ -8939,7 +8979,7 @@ var ComputeSessionClient = class {
8939
8979
  if (sessions.length > 0) {
8940
8980
  this.options.logger?.debug(`User has ${sessions.length} sessions, inspecting for usable session`);
8941
8981
  for (let s of sessions) {
8942
- if (!SESSION_DEAD.has(s.session_status) && !s.persistent && (!this.options.sessionName || s.session_name === this.options.sessionName)) {
8982
+ if (!SESSION_DEAD.has(s.session_status) && !s.persistent && (!this.options.sessionName || s.session_name === this.options.sessionName) && (!this.options.accountId || s.account_uuid === this.options.accountId)) {
8943
8983
  session = s;
8944
8984
  this.options.logger?.debug(`Use active session ${s.session_uuid} with pipeline ${pipelineIdFromSession(s)}`);
8945
8985
  break;
@@ -8964,8 +9004,7 @@ var ComputeSessionClient = class {
8964
9004
  const query = "wait=true";
8965
9005
  const response = await this.options.httpClient.fetch(`${sessionsUrl}?${query}`, request);
8966
9006
  if (response.status != 200) {
8967
- const message = await responseErrorMessage(response);
8968
- throw new Error(`Unexpected status ${response.status} creating a compute session: ${message}`);
9007
+ throw await computeApiError(response, "creating a compute session");
8969
9008
  } else {
8970
9009
  sessions = await responseJson(response);
8971
9010
  }
@@ -8990,14 +9029,16 @@ var ComputeSessionClient = class {
8990
9029
  headers
8991
9030
  });
8992
9031
  if (response.status == 404) {
8993
- throw new Error(`Unexpected status ${response.status} compute sessions ${sessionUuid} not found`);
9032
+ throw new ComputeApiError(`Unexpected status ${response.status} compute sessions ${sessionUuid} not found`, response.status);
8994
9033
  } else if (response.status != 200) {
8995
- const message = await responseErrorMessage(response);
8996
- throw new Error(`Unexpected status ${response.status} fetching compute sessions: ${message}`);
9034
+ throw await computeApiError(response, "fetching compute sessions");
8997
9035
  } else {
8998
9036
  const response_content = await responseJson(response);
8999
9037
  session = response_content;
9000
9038
  }
9039
+ if (this.options.accountId && session.account_uuid !== this.options.accountId) {
9040
+ throw new ComputeAccountMismatchError(sessionUuid, session.account_uuid, this.options.accountId);
9041
+ }
9001
9042
  return session;
9002
9043
  }
9003
9044
  async sessionAuthorizationHeader(session) {
@@ -10094,7 +10135,10 @@ var LoadFromJob = class extends AbstractJob {
10094
10135
  roi: this._params.roi,
10095
10136
  fps: this._params.fps,
10096
10137
  camera: this._params.camera,
10097
- version: this._version
10138
+ version: this._version,
10139
+ // undefined is dropped by JSON.stringify, so an unset option leaves
10140
+ // the worker's own default to decide rather than pinning it here.
10141
+ rtspForceNonCompliantUrl: this._params.rtspForceNonCompliantUrl
10098
10142
  };
10099
10143
  if (this._params.motionDetect) {
10100
10144
  Object.assign(body, this._params.motionDetect);
@@ -10848,6 +10892,7 @@ var _WorkerEndpoint = class _WorkerEndpoint extends Endpoint {
10848
10892
  this._popName = null;
10849
10893
  this._sessionAccessToken = null;
10850
10894
  this._sessionAccessTokenValidUntil = null;
10895
+ this._accountId = void 0;
10851
10896
  this._pipeline = null;
10852
10897
  this._pipelineCreatePromise = null;
10853
10898
  }
@@ -10897,6 +10942,7 @@ var _WorkerEndpoint = class _WorkerEndpoint extends Endpoint {
10897
10942
  accessToken: session.accessToken,
10898
10943
  validUntil: session.validUntil,
10899
10944
  popId: this.options().popId,
10945
+ accountId: this._accountId ?? this.options().accountId,
10900
10946
  baseUrl: this._baseUrl,
10901
10947
  pipelineId: this._pipelineId || void 0,
10902
10948
  authenticationHeaders: () => this._authenticationHeaders(session)
@@ -11452,6 +11498,7 @@ var _WorkerEndpoint = class _WorkerEndpoint extends Endpoint {
11452
11498
  authorizationHeader: () => this.computeAuthorizationHeader(),
11453
11499
  sessionUuid: this.options().sessionUuid,
11454
11500
  sessionName: this.options().sessionName,
11501
+ accountId: this.options().accountId,
11455
11502
  pipelineImage: this.options().pipelineImage,
11456
11503
  pipelineVersion: this.options().pipelineVersion,
11457
11504
  pop: this.options().pop,
@@ -11466,6 +11513,7 @@ var _WorkerEndpoint = class _WorkerEndpoint extends Endpoint {
11466
11513
  this._sessionAccessToken = resolved.accessToken;
11467
11514
  this._sessionAccessTokenValidUntil = resolved.accessTokenValidUntil;
11468
11515
  this._baseUrl = resolved.session.session_endpoint;
11516
+ this._accountId = resolved.session.account_uuid || void 0;
11469
11517
  this._pipeline = null;
11470
11518
  this._pipelineId = resolved.pipelineId;
11471
11519
  if (this.options().pop) {
@@ -13089,7 +13137,7 @@ var PointCloud = class {
13089
13137
  return placed;
13090
13138
  }
13091
13139
  /**
13092
- * Per axis (min, max) in metres over the placed points, or undefined if none were.
13140
+ * Per axis (min, max) in meters over the placed points, or undefined if none were.
13093
13141
  *
13094
13142
  * The counterpart to DepthMap's finiteMin/finiteMax, which are one axis
13095
13143
  * because a depth map has one value per pixel.
@@ -13268,6 +13316,19 @@ var readEnv = (env) => {
13268
13316
  }
13269
13317
  return void 0;
13270
13318
  };
13319
+ var warnedAccountIdEnv = false;
13320
+ var readAccountUuidEnv = () => {
13321
+ const accountUuid = readEnv("EYEPOP_ACCOUNT_UUID");
13322
+ if (accountUuid !== void 0) {
13323
+ return accountUuid;
13324
+ }
13325
+ const accountId = readEnv("EYEPOP_ACCOUNT_ID");
13326
+ if (accountId !== void 0 && !warnedAccountIdEnv) {
13327
+ warnedAccountIdEnv = true;
13328
+ console.warn("EYEPOP_ACCOUNT_ID is deprecated, use EYEPOP_ACCOUNT_UUID instead");
13329
+ }
13330
+ return accountId;
13331
+ };
13271
13332
  var stringToBooleanSafe = (str) => {
13272
13333
  if (typeof str == "undefined") {
13273
13334
  return false;
@@ -13282,7 +13343,8 @@ var EyePop;
13282
13343
  apiKey: envApiKey
13283
13344
  } : void 0;
13284
13345
  EyePop2.endpoint = workerEndpoint;
13285
- function workerEndpoint(opts = {}) {
13346
+ function workerEndpoint(options = {}) {
13347
+ const opts = { ...options };
13286
13348
  if (opts.pop !== void 0) {
13287
13349
  validatePop(opts.pop);
13288
13350
  }
@@ -13306,6 +13368,9 @@ var EyePop;
13306
13368
  if (opts.sessionName === void 0) {
13307
13369
  opts.sessionName = readEnv("EYEPOP_SESSION_NAME");
13308
13370
  }
13371
+ if (opts.accountId === void 0) {
13372
+ opts.accountId = readAccountUuidEnv();
13373
+ }
13309
13374
  if (opts.pipelineImage === void 0) {
13310
13375
  opts.pipelineImage = readEnv("EYEPOP_PIPELINE_IMAGE");
13311
13376
  }
@@ -13328,6 +13393,9 @@ var EyePop;
13328
13393
  if (auth.session.popId) {
13329
13394
  opts.popId = auth.session.popId;
13330
13395
  }
13396
+ if (auth.session.accountId) {
13397
+ opts.accountId = auth.session.accountId;
13398
+ }
13331
13399
  }
13332
13400
  }
13333
13401
  }
@@ -13341,7 +13409,7 @@ var EyePop;
13341
13409
  throw new Error("apiKey/accessToken/session/oAuth2 option or EYEPOP_API_KEY environment variable is required");
13342
13410
  }
13343
13411
  if (opts.accountId === void 0) {
13344
- opts.accountId = readEnv("EYEPOP_ACCOUNT_ID");
13412
+ opts.accountId = readAccountUuidEnv();
13345
13413
  }
13346
13414
  if (auth.session !== void 0) {
13347
13415
  if (auth.session !== void 0) {
@@ -13412,6 +13480,8 @@ var index_default = EyePop;
13412
13480
  AutoAnnotateStatus,
13413
13481
  AutoAnnotateTask,
13414
13482
  ChangeType,
13483
+ ComputeAccountMismatchError,
13484
+ ComputeApiError,
13415
13485
  ContourType,
13416
13486
  DEFAULT_PREDICTION_VERSION,
13417
13487
  DataApiType,