@eyepop.ai/eyepop 1.17.2 → 1.17.4

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.
@@ -133,7 +133,10 @@ interface LiveSource {
133
133
  interface UrlSource {
134
134
  readonly url: string;
135
135
  }
136
- type Source = FileSource | StreamSource | PathSource | LiveSource | UrlSource;
136
+ interface AssetUuidSource {
137
+ readonly assetUuid: string;
138
+ }
139
+ type Source = FileSource | StreamSource | PathSource | LiveSource | UrlSource | AssetUuidSource;
137
140
  interface ResultStream extends AsyncIterable<Prediction> {
138
141
  cancel(): void;
139
142
  }
@@ -219,6 +222,7 @@ interface InferenceComponent extends BaseComponent {
219
222
  ability?: string;
220
223
  categoryName?: string;
221
224
  confidenceThreshold?: number;
225
+ topK?: number;
222
226
  targetFps?: string;
223
227
  params?: {
224
228
  [index: string]: any;
@@ -482,6 +486,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
482
486
  private uploadStream;
483
487
  private uploadPath;
484
488
  private loadFrom;
489
+ private loadFromAssetUuid;
485
490
  private loadLiveIngress;
486
491
  private jobDone;
487
492
  private jobStatus;
@@ -919,6 +924,12 @@ declare class LoadFromJob extends AbstractJob {
919
924
  get [Symbol.toStringTag](): string;
920
925
  protected startJob(): Promise<Response>;
921
926
  }
927
+ declare class LoadFromAssetUuidJob extends AbstractJob {
928
+ private readonly _assetUuid;
929
+ constructor(assetUuid: string, params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
930
+ get [Symbol.toStringTag](): string;
931
+ protected startJob(): Promise<Response>;
932
+ }
922
933
  declare class LoadLiveIngressJob extends AbstractJob {
923
934
  private readonly _ingressId;
924
935
  constructor(ingressId: string, params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
@@ -989,4 +1000,4 @@ declare namespace EyePop {
989
1000
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
990
1001
  }
991
1002
 
992
- export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateTask, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type ComponentParams, type Contour, type ContourFinderComponent, ContourType, type CreateWorkflow, type CreateWorkflowConfig, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, ExportedBy, EyePop, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferenceComponent, InferenceType, type IngressEvent, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type LocalAuth, type Mask, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type PlatformSupport, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedObject, type PredictedText, type Prediction, type QcAiHubExportParams, type ResultStream, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourcesEntry, Stream, type StreamEvent, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, VideoMode, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, EyePop as default, readableStreamFromString };
1003
+ export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, type AssetUuidSource, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateTask, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type ComponentParams, type Contour, type ContourFinderComponent, ContourType, type CreateWorkflow, type CreateWorkflowConfig, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, ExportedBy, EyePop, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferenceComponent, InferenceType, type IngressEvent, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, type LiveMedia, type LiveSource, LoadFromAssetUuidJob, LoadFromJob, LoadLiveIngressJob, type LocalAuth, type Mask, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type PlatformSupport, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedObject, type PredictedText, type Prediction, type QcAiHubExportParams, type ResultStream, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourcesEntry, Stream, type StreamEvent, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, VideoMode, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, EyePop as default, readableStreamFromString };
@@ -133,7 +133,10 @@ interface LiveSource {
133
133
  interface UrlSource {
134
134
  readonly url: string;
135
135
  }
136
- type Source = FileSource | StreamSource | PathSource | LiveSource | UrlSource;
136
+ interface AssetUuidSource {
137
+ readonly assetUuid: string;
138
+ }
139
+ type Source = FileSource | StreamSource | PathSource | LiveSource | UrlSource | AssetUuidSource;
137
140
  interface ResultStream extends AsyncIterable<Prediction> {
138
141
  cancel(): void;
139
142
  }
@@ -219,6 +222,7 @@ interface InferenceComponent extends BaseComponent {
219
222
  ability?: string;
220
223
  categoryName?: string;
221
224
  confidenceThreshold?: number;
225
+ topK?: number;
222
226
  targetFps?: string;
223
227
  params?: {
224
228
  [index: string]: any;
@@ -482,6 +486,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
482
486
  private uploadStream;
483
487
  private uploadPath;
484
488
  private loadFrom;
489
+ private loadFromAssetUuid;
485
490
  private loadLiveIngress;
486
491
  private jobDone;
487
492
  private jobStatus;
@@ -919,6 +924,12 @@ declare class LoadFromJob extends AbstractJob {
919
924
  get [Symbol.toStringTag](): string;
920
925
  protected startJob(): Promise<Response>;
921
926
  }
927
+ declare class LoadFromAssetUuidJob extends AbstractJob {
928
+ private readonly _assetUuid;
929
+ constructor(assetUuid: string, params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
930
+ get [Symbol.toStringTag](): string;
931
+ protected startJob(): Promise<Response>;
932
+ }
922
933
  declare class LoadLiveIngressJob extends AbstractJob {
923
934
  private readonly _ingressId;
924
935
  constructor(ingressId: string, params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
@@ -989,4 +1000,4 @@ declare namespace EyePop {
989
1000
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
990
1001
  }
991
1002
 
992
- export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateTask, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type ComponentParams, type Contour, type ContourFinderComponent, ContourType, type CreateWorkflow, type CreateWorkflowConfig, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, ExportedBy, EyePop, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferenceComponent, InferenceType, type IngressEvent, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type LocalAuth, type Mask, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type PlatformSupport, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedObject, type PredictedText, type Prediction, type QcAiHubExportParams, type ResultStream, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourcesEntry, Stream, type StreamEvent, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, VideoMode, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, EyePop as default, readableStreamFromString };
1003
+ export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, type AssetUuidSource, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateTask, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type ComponentParams, type Contour, type ContourFinderComponent, ContourType, type CreateWorkflow, type CreateWorkflowConfig, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, ExportedBy, EyePop, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferenceComponent, InferenceType, type IngressEvent, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, type LiveMedia, type LiveSource, LoadFromAssetUuidJob, LoadFromJob, LoadLiveIngressJob, type LocalAuth, type Mask, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type PlatformSupport, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedObject, type PredictedText, type Prediction, type QcAiHubExportParams, type ResultStream, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourcesEntry, Stream, type StreamEvent, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, VideoMode, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, EyePop as default, readableStreamFromString };
@@ -8671,6 +8671,7 @@ __export(index_exports, {
8671
8671
  EyepopLineDecoder: () => EyepopLineDecoder,
8672
8672
  ForwardOperatorType: () => ForwardOperatorType,
8673
8673
  InferenceType: () => InferenceType,
8674
+ LoadFromAssetUuidJob: () => LoadFromAssetUuidJob,
8674
8675
  LoadFromJob: () => LoadFromJob,
8675
8676
  LoadLiveIngressJob: () => LoadLiveIngressJob,
8676
8677
  ModelExportStatus: () => ModelExportStatus,
@@ -9214,6 +9215,40 @@ var LoadFromJob = class extends AbstractJob {
9214
9215
  });
9215
9216
  }
9216
9217
  };
9218
+ var LoadFromAssetUuidJob = class extends AbstractJob {
9219
+ constructor(assetUuid, params, getSession, client, requestLogger) {
9220
+ super(params, getSession, client, requestLogger);
9221
+ this._assetUuid = assetUuid;
9222
+ }
9223
+ get [Symbol.toStringTag]() {
9224
+ return "loadFromAssetUuidJob";
9225
+ }
9226
+ async startJob() {
9227
+ const session = await this._getSession();
9228
+ if (!session.baseUrl) {
9229
+ return Promise.reject("session.baseUrl must not ne null");
9230
+ }
9231
+ const body = {
9232
+ sourceType: "ASSET_UUID",
9233
+ assetUuid: this._assetUuid,
9234
+ params: this._params
9235
+ };
9236
+ const headers = {
9237
+ ...session.authenticationHeaders(),
9238
+ Accept: "application/jsonl",
9239
+ "Content-Type": "application/json"
9240
+ };
9241
+ const patchUrl = `${session.baseUrl.replace(/\/+$/, "")}/pipelines/${session.pipelineId}/source?mode=queue&processing=sync`;
9242
+ return await this._client.fetch(patchUrl, {
9243
+ headers,
9244
+ method: "PATCH",
9245
+ body: JSON.stringify(body),
9246
+ signal: this._controller.signal,
9247
+ // @ts-ignore
9248
+ eyepop: { responseStreaming: true }
9249
+ });
9250
+ }
9251
+ };
9217
9252
  var LoadLiveIngressJob = class extends AbstractJob {
9218
9253
  constructor(ingressId, params, getSession, client, requestLogger) {
9219
9254
  super(params, getSession, client, requestLogger);
@@ -10421,6 +10456,8 @@ var WorkerEndpoint = class extends Endpoint {
10421
10456
  return this.loadFrom(source, params);
10422
10457
  } else if (source.ingressId !== void 0) {
10423
10458
  return this.loadLiveIngress(source, params);
10459
+ } else if (source.assetUuid !== void 0) {
10460
+ return this.loadFromAssetUuid(source, params);
10424
10461
  } else {
10425
10462
  return Promise.reject("unknown source type");
10426
10463
  }
@@ -10592,6 +10629,35 @@ var WorkerEndpoint = class extends Endpoint {
10592
10629
  throw e;
10593
10630
  }
10594
10631
  }
10632
+ async loadFromAssetUuid(source, params) {
10633
+ if (!this._baseUrl || !this._pipelineId || !this._client || !this._limit) {
10634
+ throw new Error("endpoint not connected, use connect()");
10635
+ }
10636
+ await this._limit.acquire();
10637
+ try {
10638
+ this.updateState();
10639
+ const job = new LoadFromAssetUuidJob(
10640
+ source.assetUuid,
10641
+ params,
10642
+ async () => {
10643
+ return this.session();
10644
+ },
10645
+ this._client,
10646
+ this._requestLogger
10647
+ );
10648
+ return job.start(
10649
+ () => {
10650
+ this.jobDone(job);
10651
+ },
10652
+ (statusCode) => {
10653
+ this.jobStatus(job, statusCode);
10654
+ }
10655
+ );
10656
+ } catch (e) {
10657
+ this._limit.release();
10658
+ throw e;
10659
+ }
10660
+ }
10595
10661
  async loadLiveIngress(source, params) {
10596
10662
  if (!this._baseUrl || !this._pipelineId || !this._client || !this._limit) {
10597
10663
  throw new Error("endpoint not connected, use connect()");
@@ -11791,6 +11857,7 @@ var index_default = EyePop;
11791
11857
  EyepopLineDecoder,
11792
11858
  ForwardOperatorType,
11793
11859
  InferenceType,
11860
+ LoadFromAssetUuidJob,
11794
11861
  LoadFromJob,
11795
11862
  LoadLiveIngressJob,
11796
11863
  ModelExportStatus,