@eyepop.ai/eyepop 3.15.1 → 3.17.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
@@ -50,24 +50,24 @@ Set `EYEPOP_API_KEY` in your server environment. API keys are secrets and must n
50
50
  export EYEPOP_API_KEY=<your_api_key>
51
51
  ```
52
52
 
53
- For provisioned persistent worker sessions, also set `EYEPOP_SESSION_UUID`.
53
+ Create transient sessions with a pop when the worker endpoint is constructed. This lets EyePop schedule the right compute before media is processed.
54
54
 
55
55
  ```typescript
56
56
  import { EyePop } from '@eyepop.ai/eyepop'
57
57
 
58
58
  ;(async () => {
59
- const endpoint = await EyePop.workerEndpoint().connect()
60
- try {
61
- await endpoint.changePop({
59
+ const endpoint = await EyePop.workerEndpoint({
60
+ pop: {
62
61
  components: [
63
62
  {
64
63
  type: 'inference',
65
- model: 'eyepop.person:latest',
64
+ ability: 'eyepop.person:latest',
66
65
  categoryName: 'person',
67
66
  },
68
67
  ],
69
- })
70
-
68
+ },
69
+ }).connect()
70
+ try {
71
71
  const results = await endpoint.process({ source: { path: 'examples/example.jpg' } })
72
72
  for await (const result of results) {
73
73
  console.log(result)
@@ -78,6 +78,29 @@ import { EyePop } from '@eyepop.ai/eyepop'
78
78
  })()
79
79
  ```
80
80
 
81
+ For transient sessions, pass `pop` when creating the endpoint whenever possible. Use `endpoint.changePop(pop)` only when an already connected transient worker needs to switch Pops.
82
+
83
+ When `sessionUuid` is not provided, the SDK creates compute sessions with `POST /v1/sessions?wait=true`.
84
+
85
+ ModelLess CPU pops use the same constructor-pop path:
86
+
87
+ ```typescript
88
+ const endpoint = await EyePop.workerEndpoint({
89
+ pop: {
90
+ components: [
91
+ {
92
+ type: 'inference',
93
+ ability: 'eyepop.localize-objects:latest',
94
+ categoryName: 'objects',
95
+ params: {
96
+ prompts: [{ prompt: 'person' }],
97
+ },
98
+ },
99
+ ],
100
+ },
101
+ }).connect()
102
+ ```
103
+
81
104
  You can also pass the key explicitly from server-side configuration:
82
105
 
83
106
  ```typescript
@@ -116,6 +139,31 @@ import { EyePop } from '@eyepop.ai/eyepop'
116
139
 
117
140
  Persistent sessions are normally preconfigured. In that case, process media directly and do not call `changePop()` unless your deployment is meant to accept runtime Pop changes.
118
141
 
142
+ Persistent deployments are created through compute-api or EyePop tooling. For example, a trusted server can create a persistent deployment with an inline pop and then pass the returned `session_uuid` to the SDK:
143
+
144
+ ```shell
145
+ curl -sS -X POST "https://compute.eyepop.ai/v1/deployments?wait=true" \
146
+ -H "Authorization: Bearer $EYEPOP_API_KEY" \
147
+ -H "Content-Type: application/json" \
148
+ -d '{
149
+ "display_name": "node-modeless-deployment",
150
+ "pop": {
151
+ "components": [
152
+ {
153
+ "type": "inference",
154
+ "ability": "eyepop.localize-objects:latest",
155
+ "categoryName": "objects",
156
+ "params": {
157
+ "prompts": [{ "prompt": "person" }]
158
+ }
159
+ }
160
+ ]
161
+ }
162
+ }'
163
+ ```
164
+
165
+ The response includes `session_uuid`, `session_status`, `status_url`, and worker access metadata. Poll `status_url` until the deployment reaches `pipeline_ok`, then connect with `sessionUuid`.
166
+
119
167
  ### Browser and Mobile Clients
120
168
 
121
169
  Do not put `EYEPOP_API_KEY` in browser or mobile application code. Create EyePop sessions from a trusted backend, then pass only the session JSON to the client.
@@ -133,7 +181,7 @@ Dashboard users can run local browser demos with the current browser session:
133
181
  components: [
134
182
  {
135
183
  type: 'inference',
136
- model: 'eyepop.person:latest',
184
+ ability: 'eyepop.person:latest',
137
185
  categoryName: 'person',
138
186
  },
139
187
  ],
@@ -181,6 +229,33 @@ const results = await endpoint.process({
181
229
  })
182
230
  ```
183
231
 
232
+ ### Image Groups (multiple images, one result)
233
+
234
+ Send several images as a **single** source that the pop processes **together** as one inference unit — for example a multi-image VLM prompt. The group yields **one** prediction for the whole set, unlike batching below, where each image is an independent inference.
235
+
236
+ ```typescript
237
+ // Local files
238
+ const results = await endpoint.uploadGroup(['a.jpg', 'b.jpg', 'c.jpg'])
239
+ for await (const result of results) {
240
+ console.log(result)
241
+ }
242
+
243
+ // In-memory streams (optional parallel MIME types)
244
+ import fs from 'node:fs'
245
+ import { Readable } from 'node:stream'
246
+ const stream1 = Readable.toWeb(fs.createReadStream('a.jpg'))
247
+ const stream2 = Readable.toWeb(fs.createReadStream('b.jpg'))
248
+ const results = await endpoint.uploadStreamGroup([stream1, stream2], ['image/jpeg', 'image/jpeg'])
249
+
250
+ // Remote URLs (the server fetches each)
251
+ const results = await endpoint.loadFromGroup([
252
+ 'https://example.com/a.jpg',
253
+ 'https://example.com/b.jpg',
254
+ ])
255
+ ```
256
+
257
+ Image order is preserved end-to-end. A group may contain **up to 16 images** (enforced server-side). The pop's ability must be multi-image-capable; a single-image ability handed a group returns an error.
258
+
184
259
  ### Canceling Jobs
185
260
 
186
261
  Queued and in-progress jobs can be cancelled from the result iterator:
@@ -200,18 +275,18 @@ for await (const result of results) {
200
275
 
201
276
  ## Endpoint Options
202
277
 
203
- By default, `EyePop.workerEndpoint().connect()` starts a worker when needed and cancels queued jobs on that worker when it connects.
278
+ By default, `EyePop.workerEndpoint({ pop }).connect()` starts a transient worker when needed and cancels queued jobs on that worker when it connects.
204
279
 
205
280
  Disable worker startup:
206
281
 
207
282
  ```typescript
208
- const endpoint = await EyePop.workerEndpoint({ autoStart: false }).connect()
283
+ const endpoint = await EyePop.workerEndpoint({ pop, autoStart: false }).connect()
209
284
  ```
210
285
 
211
286
  Keep pending jobs:
212
287
 
213
288
  ```typescript
214
- const endpoint = await EyePop.workerEndpoint({ stopJobs: false }).connect()
289
+ const endpoint = await EyePop.workerEndpoint({ pop, stopJobs: false }).connect()
215
290
  ```
216
291
 
217
292
  ## Visualization
@@ -735,8 +735,15 @@ declare enum PredictionVersion {
735
735
  }
736
736
  declare const DEFAULT_PREDICTION_VERSION: PredictionVersion;
737
737
  interface WorkerSession extends Session {
738
+ /**
739
+ * @deprecated Pop ids are only retained for backwards compatibility.
740
+ * Configure transient sessions with `WorkerOptions.pop`.
741
+ */
738
742
  readonly popId: string;
739
743
  readonly baseUrl: string | undefined;
744
+ /**
745
+ * Transient sessions may not have a pipeline until the first source is processed.
746
+ */
740
747
  readonly pipelineId: string | undefined;
741
748
  authenticationHeaders(): any;
742
749
  }
@@ -1068,37 +1075,38 @@ declare class Endpoint<T extends Endpoint<T>> {
1068
1075
  private currentAccessToken;
1069
1076
  }
1070
1077
 
1078
+ /**
1079
+ * @deprecated Configure transient sessions with `WorkerOptions.pop`.
1080
+ * Support for pop id will be removed in 3.16.
1081
+ */
1071
1082
  declare enum TransientPopId {
1072
1083
  Transient = "transient"
1073
1084
  }
1074
1085
  interface WorkerOptions extends Options {
1075
1086
  /**
1076
- * TODO: deprecated, support for pop id will be removed in 3.16
1087
+ * @deprecated Pass `pop` for transient sessions or `sessionUuid` for persistent sessions.
1088
+ * Support for pop id will be removed in 3.16.
1077
1089
  */
1078
1090
  popId?: string | TransientPopId | undefined;
1079
1091
  sessionUuid?: string | undefined;
1092
+ sessionName?: string | undefined;
1093
+ pipelineImage?: string | undefined;
1094
+ pipelineVersion?: string | undefined;
1095
+ pop?: Pop | undefined;
1096
+ sessionReadyTimeoutSeconds?: number | undefined;
1080
1097
  autoStart?: boolean;
1081
1098
  stopJobs?: boolean;
1082
1099
  isLocalMode?: boolean;
1083
1100
  }
1084
1101
 
1085
- declare enum SessionStatus {
1086
- UNKNOWN = "unknown",
1087
- PENDING = "pending",
1088
- RUNNING = "running",
1089
- STOPPED = "stopped",
1090
- FAILED = "failed",
1091
- ERROR = "error",
1092
- PIPELINE_CREATING = "pipeline_creating",
1093
- PIPELINE_OK = "pipeline_ok",
1094
- PIPELINE_CHECKING = "pipeline_checking",
1095
- PIPELINE_ERROR = "pipeline_error"
1096
- }
1097
1102
  declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1098
1103
  private _baseUrl;
1099
1104
  private _pipelineId;
1100
1105
  private _popName;
1106
+ private _sessionAccessToken;
1107
+ private _sessionAccessTokenValidUntil;
1101
1108
  private _pipeline;
1109
+ private _pipelineCreatePromise;
1102
1110
  constructor(options: WorkerOptions);
1103
1111
  private options;
1104
1112
  disconnect(wait?: boolean): Promise<void>;
@@ -1108,6 +1116,10 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1108
1116
  pop(): Pop | null;
1109
1117
  changePop(pop: Pop): Promise<void>;
1110
1118
  private _authenticationHeaders;
1119
+ /**
1120
+ * @deprecated Pop ids are only retained for backwards compatibility.
1121
+ * Configure transient sessions with `WorkerOptions.pop`.
1122
+ */
1111
1123
  popId(): string | null;
1112
1124
  /**
1113
1125
  * V1 call to process media as a source with optional component params
@@ -1128,6 +1140,9 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1128
1140
  process({ source, componentParams, motionDetect, roi }: ProcessRequest): Promise<ResultStream>;
1129
1141
  private processV1;
1130
1142
  private processV2;
1143
+ uploadGroup(paths: string[], params?: ProcessParams): Promise<ResultStream>;
1144
+ uploadStreamGroup(streams: Array<ReadableStream<Uint8Array> | Blob | BufferSource>, mimeTypes?: string[], params?: ProcessParams): Promise<ResultStream>;
1145
+ loadFromGroup(urls: string[], params?: ProcessParams): Promise<ResultStream>;
1131
1146
  private uploadFile;
1132
1147
  private uploadStream;
1133
1148
  private uploadPath;
@@ -1138,13 +1153,16 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1138
1153
  private jobStatus;
1139
1154
  protected reconnect(): Promise<WorkerEndpoint>;
1140
1155
  private startWebApiSessionWithPopId;
1141
- private static SESSION_DEAD;
1142
1156
  private static WAIT_FOR_IS_READY;
1143
- private static CHECK_FOR_IS_READY_INTERVAL;
1157
+ private sessionReadyTimeoutMs;
1144
1158
  private getComputeSession;
1145
- private getOnDemandComputeSession;
1146
- private getPermanentComputeSession;
1147
1159
  private startTransientPipeline;
1160
+ private ensureTransientPipelineStarted;
1161
+ private changeTransientPop;
1162
+ private deleteTransientPipeline;
1163
+ protected authorizationHeader(): Promise<string>;
1164
+ private computeAuthorizationHeader;
1165
+ private setTransientPipelinePop;
1148
1166
  }
1149
1167
 
1150
1168
  interface DataOptions extends Options {
@@ -1307,6 +1325,18 @@ declare class EyepopLineDecoder {
1307
1325
  flush(): string[];
1308
1326
  }
1309
1327
  declare function readableStreamFromString(s: string): ReadableStream<Uint8Array>;
1328
+ type MultipartContent = ReadableStream<Uint8Array> | Blob | BufferSource | string;
1329
+ interface MultipartPart {
1330
+ name: string;
1331
+ contentType?: string | null;
1332
+ content: MultipartContent;
1333
+ }
1334
+ declare function randomMultipartBoundary(): string;
1335
+ /**
1336
+ * Streams a multipart/form-data body part by part, piping each part's bytes through as they
1337
+ * become available instead of buffering any part's full content in memory first.
1338
+ */
1339
+ declare function encodeMultipartFormData(parts: MultipartPart[], boundary: string): ReadableStream<Uint8Array>;
1310
1340
 
1311
1341
  declare class AbstractJob implements ResultStream {
1312
1342
  protected _getSession: () => Promise<WorkerSession>;
@@ -1341,6 +1371,22 @@ declare class LoadFromJob extends AbstractJob {
1341
1371
  get [Symbol.toStringTag](): string;
1342
1372
  protected startJob(): Promise<Response>;
1343
1373
  }
1374
+ interface UploadSource {
1375
+ readonly stream: ReadableStream<Uint8Array> | Blob | BufferSource;
1376
+ readonly mimeType: string | null;
1377
+ }
1378
+ declare class UploadGroupJob extends AbstractJob {
1379
+ private readonly _sources;
1380
+ get [Symbol.toStringTag](): string;
1381
+ constructor(sources: UploadSource[], params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
1382
+ protected startJob(): Promise<Response>;
1383
+ }
1384
+ declare class LoadFromGroupJob extends AbstractJob {
1385
+ private readonly _urls;
1386
+ get [Symbol.toStringTag](): string;
1387
+ constructor(urls: string[], params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
1388
+ protected startJob(): Promise<Response>;
1389
+ }
1344
1390
  declare class LoadFromAssetUuidJob extends AbstractJob {
1345
1391
  private readonly _assetUuid;
1346
1392
  constructor(assetUuid: string, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
@@ -1418,4 +1464,4 @@ declare namespace EyePop {
1418
1464
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
1419
1465
  }
1420
1466
 
1421
- export { type AbilityAliasEntry, AbstractJob, 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 ChangeEvent, ChangeType, type ClassificationTask, 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 DownloadResponse, Endpoint, EndpointState, type EvaluateConfig, type EvaluateFilter, type EvaluateRequest, type EvaluateResponse, type EvaluateRunInfo, EvaluationStatus, ExportedBy, EyePop, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferRequest, type InferRunInfo, type InferRuntimeConfig, type InferenceComponent, InferenceType, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, LoadFromAssetUuidJob, 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 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 PredictedEmbedding, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedMotion, type PredictedObject, type PredictedText, type Prediction, PredictionVersion, type ProcessParams, type ProcessRequest, type QcAiHubExportParams, type RectangleArea, type ResultStream, type Roi, Semaphore, type Session, type SessionAuth, SessionStatus, type Source, Stream, type StreamEvent, type StreamSource, type StreamTime, TaskMode, TaskType, type TimeSpan, type TrackingComponent, TranscodeMode, type TransformInto, TransientPopId, UploadJob, type UrlSource, UserReview, 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, EyePop as default, getBaseUrl, readableStreamFromString };
1467
+ export { type AbilityAliasEntry, AbstractJob, 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 ChangeEvent, ChangeType, type ClassificationTask, 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 DownloadResponse, Endpoint, EndpointState, type EvaluateConfig, type EvaluateFilter, type EvaluateRequest, type EvaluateResponse, type EvaluateRunInfo, EvaluationStatus, ExportedBy, EyePop, 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, type Pop, type PopComponent, PopComponentType, type PopCrop, 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, type QcAiHubExportParams, type RectangleArea, type ResultStream, type Roi, Semaphore, type Session, type SessionAuth, type Source, Stream, type StreamEvent, type StreamSource, type StreamTime, TaskMode, TaskType, type TimeSpan, type TrackingComponent, TranscodeMode, type TransformInto, TransientPopId, UploadGroupJob, UploadJob, type UploadSource, type UrlSource, UserReview, 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, EyePop as default, encodeMultipartFormData, getBaseUrl, randomMultipartBoundary, readableStreamFromString };
@@ -735,8 +735,15 @@ declare enum PredictionVersion {
735
735
  }
736
736
  declare const DEFAULT_PREDICTION_VERSION: PredictionVersion;
737
737
  interface WorkerSession extends Session {
738
+ /**
739
+ * @deprecated Pop ids are only retained for backwards compatibility.
740
+ * Configure transient sessions with `WorkerOptions.pop`.
741
+ */
738
742
  readonly popId: string;
739
743
  readonly baseUrl: string | undefined;
744
+ /**
745
+ * Transient sessions may not have a pipeline until the first source is processed.
746
+ */
740
747
  readonly pipelineId: string | undefined;
741
748
  authenticationHeaders(): any;
742
749
  }
@@ -1068,37 +1075,38 @@ declare class Endpoint<T extends Endpoint<T>> {
1068
1075
  private currentAccessToken;
1069
1076
  }
1070
1077
 
1078
+ /**
1079
+ * @deprecated Configure transient sessions with `WorkerOptions.pop`.
1080
+ * Support for pop id will be removed in 3.16.
1081
+ */
1071
1082
  declare enum TransientPopId {
1072
1083
  Transient = "transient"
1073
1084
  }
1074
1085
  interface WorkerOptions extends Options {
1075
1086
  /**
1076
- * TODO: deprecated, support for pop id will be removed in 3.16
1087
+ * @deprecated Pass `pop` for transient sessions or `sessionUuid` for persistent sessions.
1088
+ * Support for pop id will be removed in 3.16.
1077
1089
  */
1078
1090
  popId?: string | TransientPopId | undefined;
1079
1091
  sessionUuid?: string | undefined;
1092
+ sessionName?: string | undefined;
1093
+ pipelineImage?: string | undefined;
1094
+ pipelineVersion?: string | undefined;
1095
+ pop?: Pop | undefined;
1096
+ sessionReadyTimeoutSeconds?: number | undefined;
1080
1097
  autoStart?: boolean;
1081
1098
  stopJobs?: boolean;
1082
1099
  isLocalMode?: boolean;
1083
1100
  }
1084
1101
 
1085
- declare enum SessionStatus {
1086
- UNKNOWN = "unknown",
1087
- PENDING = "pending",
1088
- RUNNING = "running",
1089
- STOPPED = "stopped",
1090
- FAILED = "failed",
1091
- ERROR = "error",
1092
- PIPELINE_CREATING = "pipeline_creating",
1093
- PIPELINE_OK = "pipeline_ok",
1094
- PIPELINE_CHECKING = "pipeline_checking",
1095
- PIPELINE_ERROR = "pipeline_error"
1096
- }
1097
1102
  declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1098
1103
  private _baseUrl;
1099
1104
  private _pipelineId;
1100
1105
  private _popName;
1106
+ private _sessionAccessToken;
1107
+ private _sessionAccessTokenValidUntil;
1101
1108
  private _pipeline;
1109
+ private _pipelineCreatePromise;
1102
1110
  constructor(options: WorkerOptions);
1103
1111
  private options;
1104
1112
  disconnect(wait?: boolean): Promise<void>;
@@ -1108,6 +1116,10 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1108
1116
  pop(): Pop | null;
1109
1117
  changePop(pop: Pop): Promise<void>;
1110
1118
  private _authenticationHeaders;
1119
+ /**
1120
+ * @deprecated Pop ids are only retained for backwards compatibility.
1121
+ * Configure transient sessions with `WorkerOptions.pop`.
1122
+ */
1111
1123
  popId(): string | null;
1112
1124
  /**
1113
1125
  * V1 call to process media as a source with optional component params
@@ -1128,6 +1140,9 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1128
1140
  process({ source, componentParams, motionDetect, roi }: ProcessRequest): Promise<ResultStream>;
1129
1141
  private processV1;
1130
1142
  private processV2;
1143
+ uploadGroup(paths: string[], params?: ProcessParams): Promise<ResultStream>;
1144
+ uploadStreamGroup(streams: Array<ReadableStream<Uint8Array> | Blob | BufferSource>, mimeTypes?: string[], params?: ProcessParams): Promise<ResultStream>;
1145
+ loadFromGroup(urls: string[], params?: ProcessParams): Promise<ResultStream>;
1131
1146
  private uploadFile;
1132
1147
  private uploadStream;
1133
1148
  private uploadPath;
@@ -1138,13 +1153,16 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1138
1153
  private jobStatus;
1139
1154
  protected reconnect(): Promise<WorkerEndpoint>;
1140
1155
  private startWebApiSessionWithPopId;
1141
- private static SESSION_DEAD;
1142
1156
  private static WAIT_FOR_IS_READY;
1143
- private static CHECK_FOR_IS_READY_INTERVAL;
1157
+ private sessionReadyTimeoutMs;
1144
1158
  private getComputeSession;
1145
- private getOnDemandComputeSession;
1146
- private getPermanentComputeSession;
1147
1159
  private startTransientPipeline;
1160
+ private ensureTransientPipelineStarted;
1161
+ private changeTransientPop;
1162
+ private deleteTransientPipeline;
1163
+ protected authorizationHeader(): Promise<string>;
1164
+ private computeAuthorizationHeader;
1165
+ private setTransientPipelinePop;
1148
1166
  }
1149
1167
 
1150
1168
  interface DataOptions extends Options {
@@ -1307,6 +1325,18 @@ declare class EyepopLineDecoder {
1307
1325
  flush(): string[];
1308
1326
  }
1309
1327
  declare function readableStreamFromString(s: string): ReadableStream<Uint8Array>;
1328
+ type MultipartContent = ReadableStream<Uint8Array> | Blob | BufferSource | string;
1329
+ interface MultipartPart {
1330
+ name: string;
1331
+ contentType?: string | null;
1332
+ content: MultipartContent;
1333
+ }
1334
+ declare function randomMultipartBoundary(): string;
1335
+ /**
1336
+ * Streams a multipart/form-data body part by part, piping each part's bytes through as they
1337
+ * become available instead of buffering any part's full content in memory first.
1338
+ */
1339
+ declare function encodeMultipartFormData(parts: MultipartPart[], boundary: string): ReadableStream<Uint8Array>;
1310
1340
 
1311
1341
  declare class AbstractJob implements ResultStream {
1312
1342
  protected _getSession: () => Promise<WorkerSession>;
@@ -1341,6 +1371,22 @@ declare class LoadFromJob extends AbstractJob {
1341
1371
  get [Symbol.toStringTag](): string;
1342
1372
  protected startJob(): Promise<Response>;
1343
1373
  }
1374
+ interface UploadSource {
1375
+ readonly stream: ReadableStream<Uint8Array> | Blob | BufferSource;
1376
+ readonly mimeType: string | null;
1377
+ }
1378
+ declare class UploadGroupJob extends AbstractJob {
1379
+ private readonly _sources;
1380
+ get [Symbol.toStringTag](): string;
1381
+ constructor(sources: UploadSource[], params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
1382
+ protected startJob(): Promise<Response>;
1383
+ }
1384
+ declare class LoadFromGroupJob extends AbstractJob {
1385
+ private readonly _urls;
1386
+ get [Symbol.toStringTag](): string;
1387
+ constructor(urls: string[], params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
1388
+ protected startJob(): Promise<Response>;
1389
+ }
1344
1390
  declare class LoadFromAssetUuidJob extends AbstractJob {
1345
1391
  private readonly _assetUuid;
1346
1392
  constructor(assetUuid: string, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
@@ -1418,4 +1464,4 @@ declare namespace EyePop {
1418
1464
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
1419
1465
  }
1420
1466
 
1421
- export { type AbilityAliasEntry, AbstractJob, 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 ChangeEvent, ChangeType, type ClassificationTask, 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 DownloadResponse, Endpoint, EndpointState, type EvaluateConfig, type EvaluateFilter, type EvaluateRequest, type EvaluateResponse, type EvaluateRunInfo, EvaluationStatus, ExportedBy, EyePop, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferRequest, type InferRunInfo, type InferRuntimeConfig, type InferenceComponent, InferenceType, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, LoadFromAssetUuidJob, 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 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 PredictedEmbedding, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedMotion, type PredictedObject, type PredictedText, type Prediction, PredictionVersion, type ProcessParams, type ProcessRequest, type QcAiHubExportParams, type RectangleArea, type ResultStream, type Roi, Semaphore, type Session, type SessionAuth, SessionStatus, type Source, Stream, type StreamEvent, type StreamSource, type StreamTime, TaskMode, TaskType, type TimeSpan, type TrackingComponent, TranscodeMode, type TransformInto, TransientPopId, UploadJob, type UrlSource, UserReview, 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, EyePop as default, getBaseUrl, readableStreamFromString };
1467
+ export { type AbilityAliasEntry, AbstractJob, 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 ChangeEvent, ChangeType, type ClassificationTask, 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 DownloadResponse, Endpoint, EndpointState, type EvaluateConfig, type EvaluateFilter, type EvaluateRequest, type EvaluateResponse, type EvaluateRunInfo, EvaluationStatus, ExportedBy, EyePop, 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, type Pop, type PopComponent, PopComponentType, type PopCrop, 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, type QcAiHubExportParams, type RectangleArea, type ResultStream, type Roi, Semaphore, type Session, type SessionAuth, type Source, Stream, type StreamEvent, type StreamSource, type StreamTime, TaskMode, TaskType, type TimeSpan, type TrackingComponent, TranscodeMode, type TransformInto, TransientPopId, UploadGroupJob, UploadJob, type UploadSource, type UrlSource, UserReview, 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, EyePop as default, encodeMultipartFormData, getBaseUrl, randomMultipartBoundary, readableStreamFromString };