@eyepop.ai/eyepop 2.1.0 → 3.0.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.
@@ -8826,6 +8826,12 @@ function readableStreamFromString(s) {
8826
8826
  }
8827
8827
 
8828
8828
  // worker/worker_types.ts
8829
+ var PredictionVersion = /* @__PURE__ */ ((PredictionVersion3) => {
8830
+ PredictionVersion3[PredictionVersion3["V1"] = 1] = "V1";
8831
+ PredictionVersion3[PredictionVersion3["V2"] = 2] = "V2";
8832
+ return PredictionVersion3;
8833
+ })(PredictionVersion || {});
8834
+ var DEFAULT_PREDICTION_VERSION = 2 /* V2 */;
8829
8835
  var VideoMode = /* @__PURE__ */ ((VideoMode2) => {
8830
8836
  VideoMode2["STREAM"] = "stream";
8831
8837
  VideoMode2["BUFFER"] = "buffer";
@@ -8835,6 +8841,7 @@ var PopComponentType = /* @__PURE__ */ ((PopComponentType2) => {
8835
8841
  PopComponentType2["FORWARD"] = "forward";
8836
8842
  PopComponentType2["INFERENCE"] = "inference";
8837
8843
  PopComponentType2["TRACING"] = "tracing";
8844
+ PopComponentType2["TRACKING"] = "tracking";
8838
8845
  PopComponentType2["CONTOUR_FINDER"] = "contour_finder";
8839
8846
  PopComponentType2["COMPONENT_FINDER"] = "component_finder";
8840
8847
  return PopComponentType2;
@@ -9212,13 +9219,14 @@ var WebrtcWhip = class extends WebrtcBase {
9212
9219
 
9213
9220
  // worker/jobs.ts
9214
9221
  var AbstractJob = class {
9215
- constructor(params, getSession, client, requestLogger) {
9222
+ constructor(params, getSession, client, requestLogger, version = DEFAULT_PREDICTION_VERSION) {
9216
9223
  this._responseStream = null;
9217
9224
  this._controller = new AbortController();
9218
9225
  this._getSession = getSession;
9219
9226
  this._params = params ?? null;
9220
9227
  this._client = client;
9221
9228
  this._requestLogger = requestLogger;
9229
+ this._version = version;
9222
9230
  }
9223
9231
  [Symbol.asyncIterator]() {
9224
9232
  if (!this._responseStream) {
@@ -9323,7 +9331,8 @@ var UploadJob = class extends AbstractJob {
9323
9331
  }
9324
9332
  let request;
9325
9333
  const videoModeQuery = this._videoMode ? `&videoMode=${this._videoMode}` : "";
9326
- const postUrl = `${session.baseUrl.replace(/\/+$/, "")}/pipelines/${session.pipelineId}/source?mode=queue&processing=async&sourceId=${event.source_id}${videoModeQuery}`;
9334
+ const versionQuery = this._version ? `&version=${this._version}` : "";
9335
+ const postUrl = `${session.baseUrl.replace(/\/+$/, "")}/pipelines/${session.pipelineId}/source?mode=queue&processing=async&sourceId=${event.source_id}${videoModeQuery}${versionQuery}`;
9327
9336
  if (this._params) {
9328
9337
  const params = JSON.stringify(this._params);
9329
9338
  const paramBlob = new Blob([params], { type: "application/json" });
@@ -9395,7 +9404,8 @@ var UploadJob = class extends AbstractJob {
9395
9404
  });
9396
9405
  } else {
9397
9406
  const videoModeQuery = this._videoMode ? `&videoMode=${this._videoMode}` : "";
9398
- const postUrl = `${session.baseUrl.replace(/\/+$/, "")}/pipelines/${session.pipelineId}/source?mode=queue&processing=sync${videoModeQuery}`;
9407
+ const versionQuery = this._version ? `&version=${this._version}` : "";
9408
+ const postUrl = `${session.baseUrl.replace(/\/+$/, "")}/pipelines/${session.pipelineId}/source?mode=queue&processing=sync${videoModeQuery}${versionQuery}`;
9399
9409
  if (this._params) {
9400
9410
  const params = JSON.stringify(this._params);
9401
9411
  const paramBlob = new Blob([params], { type: "application/json" });
@@ -9454,7 +9464,8 @@ var LoadFromJob = class extends AbstractJob {
9454
9464
  const body = {
9455
9465
  sourceType: "URL",
9456
9466
  url: this._location,
9457
- params: this._params
9467
+ params: this._params,
9468
+ version: this._version
9458
9469
  };
9459
9470
  const headers = {
9460
9471
  ...session.authenticationHeaders(),
@@ -9488,7 +9499,8 @@ var LoadFromAssetUuidJob = class extends AbstractJob {
9488
9499
  const body = {
9489
9500
  sourceType: "ASSET_UUID",
9490
9501
  assetUuid: this._assetUuid,
9491
- params: this._params
9502
+ params: this._params,
9503
+ version: this._version
9492
9504
  };
9493
9505
  const headers = {
9494
9506
  ...session.authenticationHeaders(),
@@ -9522,7 +9534,8 @@ var LoadLiveIngressJob = class extends AbstractJob {
9522
9534
  const body = {
9523
9535
  sourceType: "LIVE_INGRESS",
9524
9536
  liveIngressId: this._ingressId,
9525
- params: this._params
9537
+ params: this._params,
9538
+ version: this._version
9526
9539
  };
9527
9540
  const headers = {
9528
9541
  ...session.authenticationHeaders(),
@@ -9570,7 +9583,8 @@ var LoadMediaStreamJob = class extends AbstractJob {
9570
9583
  const body = {
9571
9584
  sourceType: "WHIP",
9572
9585
  whipIngressId: whip.ingressId(),
9573
- params: this._params
9586
+ params: this._params,
9587
+ version: this._version
9574
9588
  };
9575
9589
  const headers = {
9576
9590
  ...session.authenticationHeaders(),
@@ -11487,6 +11501,7 @@ export {
11487
11501
  AutoAnnotateTask,
11488
11502
  ChangeType,
11489
11503
  ContourType,
11504
+ DEFAULT_PREDICTION_VERSION,
11490
11505
  DataEndpoint,
11491
11506
  Endpoint,
11492
11507
  EndpointState,
@@ -11507,6 +11522,7 @@ export {
11507
11522
  ModelTrainingStage,
11508
11523
  ModelType,
11509
11524
  PopComponentType,
11525
+ PredictionVersion,
11510
11526
  Semaphore,
11511
11527
  Stream,
11512
11528
  TranscodeMode,