@eyepop.ai/eyepop 2.1.0 → 3.1.1

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(),
@@ -10660,6 +10674,7 @@ var ModelType = /* @__PURE__ */ ((ModelType2) => {
10660
10674
  var ModelTask = /* @__PURE__ */ ((ModelTask2) => {
10661
10675
  ModelTask2["object_detection"] = "object_detection";
10662
10676
  ModelTask2["image_classification"] = "image_classification";
10677
+ ModelTask2["keypoint_detection"] = "keypoint_detection";
10663
10678
  return ModelTask2;
10664
10679
  })(ModelTask || {});
10665
10680
  var ModelStatus = /* @__PURE__ */ ((ModelStatus2) => {
@@ -10710,6 +10725,12 @@ var ChangeType = /* @__PURE__ */ ((ChangeType2) => {
10710
10725
  ChangeType2["model_status_modified"] = "model_status_modified";
10711
10726
  ChangeType2["model_progress"] = "model_progress";
10712
10727
  ChangeType2["events_lost"] = "events_lost";
10728
+ ChangeType2["workflow_started"] = "workflow_started";
10729
+ ChangeType2["workflow_succeeded"] = "workflow_succeeded";
10730
+ ChangeType2["workflow_failed"] = "workflow_failed";
10731
+ ChangeType2["workflow_task_started"] = "workflow_task_started";
10732
+ ChangeType2["workflow_task_succeeded"] = "workflow_task_succeeded";
10733
+ ChangeType2["workflow_task_failed"] = "workflow_task_failed";
10713
10734
  return ChangeType2;
10714
10735
  })(ChangeType || {});
10715
10736
  var WorkflowPhase = /* @__PURE__ */ ((WorkflowPhase3) => {
@@ -11254,13 +11275,22 @@ var DataEndpoint = class extends Endpoint {
11254
11275
  }
11255
11276
  async dispatchChangeEvent(change_event) {
11256
11277
  switch (change_event.change_type) {
11278
+ // account event types
11257
11279
  case "dataset_added" /* dataset_added */:
11258
11280
  case "dataset_modified" /* dataset_modified */:
11259
11281
  case "dataset_removed" /* dataset_removed */:
11260
11282
  case "dataset_version_modified" /* dataset_version_modified */:
11283
+ case "workflow_started" /* workflow_started */:
11284
+ case "workflow_succeeded" /* workflow_succeeded */:
11285
+ case "workflow_failed" /* workflow_failed */:
11286
+ case "workflow_task_started" /* workflow_task_started */:
11287
+ case "workflow_task_succeeded" /* workflow_task_succeeded */:
11288
+ case "workflow_task_failed" /* workflow_task_failed */:
11289
+ this._logger.debug("dispatchChangeEvent account_event_handlers=%s", this._account_event_handlers);
11261
11290
  for (let handler of this._account_event_handlers) {
11262
11291
  await handler(change_event);
11263
11292
  }
11293
+ // dataset event types
11264
11294
  case "asset_added" /* asset_added */:
11265
11295
  case "asset_removed" /* asset_removed */:
11266
11296
  case "asset_status_modified" /* asset_status_modified */:
@@ -11389,7 +11419,7 @@ var EyePop;
11389
11419
  if (opts.isLocalMode === void 0) {
11390
11420
  opts.isLocalMode = stringToBooleanSafe(readEnv("EYEPOP_LOCAL_MODE"));
11391
11421
  }
11392
- _fill_default_options(opts, opts.isLocalMode ? "http://127.0.0.1:8080/standalone" : void 0);
11422
+ _fill_default_options(opts, opts.isLocalMode ? "http://127.0.0.1:8080" : void 0);
11393
11423
  if (opts.auth === void 0) {
11394
11424
  if (opts.isLocalMode) {
11395
11425
  opts.auth = { isLocal: true };
@@ -11487,6 +11517,7 @@ export {
11487
11517
  AutoAnnotateTask,
11488
11518
  ChangeType,
11489
11519
  ContourType,
11520
+ DEFAULT_PREDICTION_VERSION,
11490
11521
  DataEndpoint,
11491
11522
  Endpoint,
11492
11523
  EndpointState,
@@ -11507,6 +11538,7 @@ export {
11507
11538
  ModelTrainingStage,
11508
11539
  ModelType,
11509
11540
  PopComponentType,
11541
+ PredictionVersion,
11510
11542
  Semaphore,
11511
11543
  Stream,
11512
11544
  TranscodeMode,