@eyepop.ai/eyepop 3.14.6 → 3.15.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
@@ -1,168 +1,75 @@
1
1
  # EyePop.ai Node SDK
2
2
 
3
- The EyePop.ai Node SDK provides convenient access to the EyePop.ai's inference API from applications written in the
4
- TypeScript or JavaScript language.
3
+ The EyePop.ai Node SDK provides JavaScript and TypeScript access to EyePop worker sessions for image and video inference.
5
4
 
6
5
  ## Installation
7
6
 
8
7
  ### Node
9
- EyePop Sdk is tested with the LTS versions `node v20.11.0` and `npm v10.2.4`. Getting started with:
10
- ```shell
11
- npm install --save @eyepop.ai/eyepop
12
- ```
13
- See the [Node example folder](https://github.com/eyepop-ai/eyepop-sdk-node/blob/main/examples/node) for code examples.
14
8
 
15
- ### Browser
16
- EyePop Sdk supports all model browsers and can be used with Javascript w/o any additional dependencies:
17
- ```html
18
- <script src="https://cdn.jsdelivr.net/npm/@eyepop.ai/eyepop/dist/eyepop.min.js"></script>
19
- ```
20
- See the [Web example folder](https://github.com/eyepop-ai/eyepop-sdk-node/tree/main/examples/web/static) for code examples.
9
+ The SDK is tested with Node 20 LTS and newer.
21
10
 
22
- ### React Native
23
11
  ```shell
24
12
  npm install --save @eyepop.ai/eyepop
25
13
  ```
26
14
 
27
- See the [ReactNative example folder](https://github.com/eyepop-ai/eyepop-sdk-node/tree/main/examples/react_native/upload-example) for code
28
- examples and tips for to debug your configuration.
29
-
30
-
31
- ## Configuration
32
-
33
- The EyePop SDK needs to be configured with the **Pop Id** and your **Authentication Credentials**. Credentials can
34
- be provided as:
35
-
36
- 1. **Api Key**, server side only because this key must be kept secret
37
- 2. **Session generated from Api Key**, server side generated session transported to client over trusted channel
38
- 3. **Current Browser Session**, for developer running client code in the same browser session loghed into their EyePop Dashboard.
39
-
40
- ### Configuration via Environment (Server Side)
41
-
42
- While you can provide a api_key keyword argument, we recommend using dotenv to add EYEPOP_API_KEY="My API Key"
43
- to your .env file so that your API Key is not stored in source control. By default, the SDK will read the following environment variables:
44
-
45
- - `EYEPOP_API_KEY`: Your Api Key. You can create Api Keys in the profile section of your EyePop dashboard.
46
- - `EYEPOP_URL`: (Optional) URL of the EyePop API service, if you want to use any other endpoint than production `http://api.eyepop.ai`
15
+ See the [Node examples](https://github.com/eyepop-ai/eyepop-sdk-node/blob/main/examples/node) for runnable scripts.
47
16
 
48
- ### Authentication with Api Key
49
-
50
- Configuration and authorization with explicit defaults:
51
-
52
- ```typescript
53
- import { EyePop } from '@eyepop.ai/eyepop'
54
- ;async () => {
55
- const endpoint = EyePop.workerEndpoint({
56
- // This is the default and can be omitted
57
- auth: { apiKey: process.env['EYEPOP_API_KEY'] },
58
- })
59
- await endpoint.connect()
60
- // do work ....
61
- await endpoint.disconnect()
62
- }
63
- ```
17
+ ### Browser
64
18
 
65
- Equivalent, but shorter:
19
+ Browser applications can use the bundled SDK directly:
66
20
 
67
- ```typescript
68
- import { EyePop } from '@eyepop.ai/eyepop'
69
- ;async () => {
70
- const endpoint = await EyePop.workerEndpoint().connect()
71
- // do work ....
72
- await endpoint.disconnect()
73
- }
21
+ ```html
22
+ <script src="https://cdn.jsdelivr.net/npm/@eyepop.ai/eyepop/dist/eyepop.min.js"></script>
74
23
  ```
75
24
 
76
- ### Authentication with session generated from Api Key
25
+ API keys must not be used in browser code. Browser apps should connect with sessions created by your trusted backend.
77
26
 
78
- #### Server Side
27
+ ### React Native
79
28
 
80
- ```javascript
81
- import { EyePop } from '@eyepop.ai/eyepop'
29
+ React Native applications should use the React Native package:
82
30
 
83
- const getSession = async function (req, res) {
84
- const endpoint = await EyePop.workerEndpoint().connect()
85
- res.setHeader('Content-Type', 'application/json')
86
- res.writeHead(200)
87
- res.end(JSON.stringify(await endpoint.session()))
88
- }
89
- const server = http.createServer(getSession)
90
- server.listen(8080, '127.0.0.1')
31
+ ```shell
32
+ npm install --save @eyepop.ai/react-native-eyepop
91
33
  ```
92
34
 
93
- #### Client Side
35
+ See the [React Native example](https://github.com/eyepop-ai/eyepop-sdk-node/tree/main/examples/react_native/upload-example).
94
36
 
95
- ```javascript
96
- import { EyePop } from '@eyepop.ai/eyepop'
97
- ;(async () => {
98
- const session = await (await fetch('http://127.0.0.1:8080')).json()
99
- const endpoint = await EyePop.workerEndpoint({ auth: { session: session } }).connect()
100
- // do work ....
101
- await endpoint.disconnect()
102
- })()
103
- ```
37
+ ## Authentication
104
38
 
105
- ### Authentication with Current Browser Session
39
+ The SDK supports these authentication patterns:
106
40
 
107
- ```html
108
- <!doctype html>
109
- <html lang="en">
110
- <head>
111
- <meta charset="UTF-8" />
112
- <script src="https://cdn.jsdelivr.net/npm/@eyepop.ai/eyepop/dist/eyepop.min.js"></script>
113
- </head>
114
- <body>
115
- <script>
116
- document.addEventListener('DOMContentLoaded', async event => {
117
- let endpoint = await EyePop.workerEndpoint({ auth: { oAuth2: true } }).connect()
118
- await endpoint.changePop({ components: [{
119
- type: PopComponentType.INFERENCE,
120
- model: 'eyepop.person:latest',
121
- categoryName: 'person'
122
- }]})
123
- // do work ....
124
- await endpoint.disconnect()
125
- })
126
- </script>
127
- </body>
128
- </html>
129
- ```
41
+ - API key authentication for trusted server-side code.
42
+ - Persistent worker session selection for provisioned deployments.
43
+ - Browser OAuth for dashboard users building local demos.
130
44
 
131
- To use an alternative environment, e.g. STAGING vs PRODUCTION, pass in the adjusted Auth0 configuration:
45
+ ### Server-Side API Key
132
46
 
133
- ```javascript
134
- // ...
135
- let endpoint = await EyePop.workerEndpoint({
136
- auth: {
137
- oAuth2: {
138
- audience: 'https://dev-app.eyepop.ai',
139
- domain: 'dev-eyepop.us.auth0.com',
140
- clientId: 'jktx3YO2UnbkNPvr05PQWf26t1kNTJyg',
141
- }
142
- }
143
- }).connect()
144
- // ...
145
- ```
47
+ Set `EYEPOP_API_KEY` in your server environment. API keys are secrets and must not be exposed in browser bundles, mobile app bundles, or public repositories.
146
48
 
147
- ## Usage Examples
49
+ ```shell
50
+ export EYEPOP_API_KEY=<your_api_key>
51
+ ```
148
52
 
149
- ### Uploading and processing one single image
53
+ For provisioned persistent worker sessions, also set `EYEPOP_SESSION_UUID`.
150
54
 
151
55
  ```typescript
152
56
  import { EyePop } from '@eyepop.ai/eyepop'
153
57
 
154
- const example_image_path = 'examples/example.jpg'
155
-
156
58
  ;(async () => {
157
59
  const endpoint = await EyePop.workerEndpoint().connect()
158
60
  try {
159
- await endpoint.changePop({ components: [{
160
- type: PopComponentType.INFERENCE,
161
- model: 'eyepop.person:latest',
162
- categoryName: 'person'
163
- }]})
164
- let results = await endpoint.process({ source: { path: example_image_path } })
165
- for await (let result of results) {
61
+ await endpoint.changePop({
62
+ components: [
63
+ {
64
+ type: 'inference',
65
+ model: 'eyepop.person:latest',
66
+ categoryName: 'person',
67
+ },
68
+ ],
69
+ })
70
+
71
+ const results = await endpoint.process({ source: { path: 'examples/example.jpg' } })
72
+ for await (const result of results) {
166
73
  console.log(result)
167
74
  }
168
75
  } finally {
@@ -171,57 +78,35 @@ const example_image_path = 'examples/example.jpg'
171
78
  })()
172
79
  ```
173
80
 
174
- 1. `EyePop.workerEndpoint()` returns a local endpoint object, that will authenticate with the Api Key found in
175
- EYEPOP_API_KEY.
176
- 2. Call `endpoint.connect()` before any job is submitted and `endpoint.disconnect()` to release all resources.
177
- 3. Call `endpoint.changePop(...)` to define the Pop and its components to be executed by the endpoint, in this example
178
- to use the ability `eyepop.person` to find all instances of persons in images and videos.
179
- 4.`endpoint.process({ source: {path:'examples/example.jpg'} })` initiates the upload to the local file to the worker service.
180
- The image will be queued and processed immediately when the worker becomes available.
181
- The result of endpoint.upload() implements `AsyncIterable<Prediction>` which can be iterated with 'for await' as
182
- shown in the example above. Predictions will become available when the submitted file becomes processed by the worker
183
- and results are efficiently streamed back to the calling client. If the uploaded file is a video
184
- e.g. 'video/mp4' or image container format e.g. 'image/gif', the client will receive one prediction per image frame
185
- until the entire file has been processed.
186
-
187
- 5. Alternatively to `path` process() also accepts a readable stream with a mandatory mime-type:
81
+ You can also pass the key explicitly from server-side configuration:
188
82
 
189
83
  ```typescript
190
- // ...
191
- let stream = fs.createReadStream(example_image_path)
192
- endpoint.upload({ source: { stream: readableStream, mimeType: 'image/jpeg' } })
193
- // ...
84
+ const endpoint = await EyePop.workerEndpoint({
85
+ auth: { apiKey: process.env.EYEPOP_API_KEY },
86
+ }).connect()
194
87
  ```
195
88
 
196
- Note: since v0.21.0 `EyePop.workerEndpoint()` was introduced and replaces `EyePop.endpoint()` which is now deprecated.
197
- Support for `EyePop.endpoint()` will be removed in v1.0.0.
198
-
199
- ### Visualizing Results
200
-
201
- Visualization components are provided as separate modules. Please refer to the module's documentation for usage examples.
89
+ ### Persistent Sessions
202
90
 
203
- - [EyePop Render 2d](https://www.npmjs.com/package/@eyepop.ai/eyepop-render-2d)
91
+ If EyePop has provisioned a persistent worker session for your deployment, set `EYEPOP_SESSION_UUID` in the trusted server environment or pass `sessionUuid` explicitly.
204
92
 
205
- ### Asynchronous uploading and processing of images
206
-
207
- The above _synchronous_ way, process() then iterate all results, is great for individual images or reasonable
208
- sized batches. For larger batch sizes, or continuous stream of images, don't `await` the results but instead
209
- use `then()` on the returned promise.
93
+ ```shell
94
+ export EYEPOP_API_KEY=<your_api_key>
95
+ export EYEPOP_SESSION_UUID=<your_session_uuid>
96
+ ```
210
97
 
211
98
  ```typescript
212
99
  import { EyePop } from '@eyepop.ai/eyepop'
213
100
 
214
- const example_image_path = 'examples/example.jpg'
215
-
216
101
  ;(async () => {
217
- const endpoint = await EyePop.workerEndpoint().connect()
102
+ const endpoint = await EyePop.workerEndpoint({
103
+ sessionUuid: process.env.EYEPOP_SESSION_UUID,
104
+ }).connect()
105
+
218
106
  try {
219
- for (let i = 0; i < 100; i++) {
220
- endpoint.process({ source: { path: example_image_path } }).then(async results => {
221
- for await (let result of results) {
222
- console.log(`result for #${i}`, result)
223
- }
224
- })
107
+ const results = await endpoint.process({ source: { path: 'sample.mp4' } })
108
+ for await (const result of results) {
109
+ console.log(result)
225
110
  }
226
111
  } finally {
227
112
  await endpoint.disconnect()
@@ -229,102 +114,114 @@ const example_image_path = 'examples/example.jpg'
229
114
  })()
230
115
  ```
231
116
 
232
- This will result in a most efficient processing, i.e. uploads will be processed in parallel (up to five HTTP
233
- connections per endpoint) and results will be processed by your code as soon as they are available.
234
-
235
- ### Loading images from URLs
117
+ 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.
236
118
 
237
- Alternatively to uploading files, you can also submit a publicly accessible URL for processing. Supported protocols are:
119
+ ### Browser and Mobile Clients
238
120
 
239
- - HTTP(s) URLs with response Content-Type image/_ or video/_
240
- - RTSP (live-streaming)
241
- - RTMP (live-streaming)
121
+ 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.
242
122
 
243
- ```typescript
244
- import { EyePop } from '@eyepop.ai/eyepop'
123
+ ### Browser OAuth for Local Dashboard Demos
245
124
 
246
- const example_image_url = 'https://farm2.staticflickr.com/1080/1301049949_532835a8b5_z.jpg'
125
+ Dashboard users can run local browser demos with the current browser session:
247
126
 
248
- ;(async () => {
249
- const endpoint = await EyePop.workerEndpoint().connect()
250
- try {
251
- let results = await endpoint.process({ source: { url: example_image_url } })
252
- for await (let result of results) {
253
- console.log(result)
127
+ ```html
128
+ <script>
129
+ document.addEventListener('DOMContentLoaded', async () => {
130
+ const endpoint = await EyePop.workerEndpoint({ auth: { oAuth2: true } }).connect()
131
+ try {
132
+ await endpoint.changePop({
133
+ components: [
134
+ {
135
+ type: 'inference',
136
+ model: 'eyepop.person:latest',
137
+ categoryName: 'person',
138
+ },
139
+ ],
140
+ })
141
+ } finally {
142
+ await endpoint.disconnect()
254
143
  }
255
- } finally {
256
- await endpoint.disconnect()
257
- }
258
- })()
144
+ })
145
+ </script>
259
146
  ```
260
147
 
261
- ### Processing Videos
148
+ ## Processing Media
262
149
 
263
- You can process videos via upload or public URLs. This example shows how to process all video frames of a file
264
- retrieved from a public URL.
150
+ ### Local Files
265
151
 
266
152
  ```typescript
267
- import { EyePop } from '@eyepop.ai/eyepop'
153
+ const results = await endpoint.process({ source: { path: 'examples/example.jpg' } })
154
+ for await (const result of results) {
155
+ console.log(result)
156
+ }
157
+ ```
268
158
 
269
- const example_video_url = 'https://demo-eyepop-videos.s3.amazonaws.com/test1_vlog.mp4'
159
+ `process()` returns an `AsyncIterable` of predictions. Images normally produce one prediction. Videos and animated image containers produce one prediction per frame.
270
160
 
271
- ;(async () => {
272
- const endpoint = await EyePop.workerEndpoint().connect()
273
- try {
274
- let results = await endpoint.process({ source: { url: example_video_url } })
275
- for await (let result of results) {
276
- console.log(result)
277
- }
278
- } finally {
279
- await endpoint.disconnect()
280
- }
281
- })()
161
+ ### Readable Streams
162
+
163
+ Streams require an explicit MIME type:
164
+
165
+ ```typescript
166
+ import fs from 'node:fs'
167
+
168
+ const stream = fs.createReadStream('examples/example.jpg')
169
+ const results = await endpoint.process({
170
+ source: { stream, mimeType: 'image/jpeg' },
171
+ })
282
172
  ```
283
173
 
284
- ### Canceling Jobs
174
+ ### Public URLs
285
175
 
286
- Any job that has been queued or is in-progress can be cancelled. E.g. stop the video processing after
287
- predictions have been processed for 10 seconds duration of the video.
176
+ Public HTTP(S), RTSP, and RTMP URLs can be processed without uploading the file from your application.
288
177
 
289
178
  ```typescript
290
- import { EyePop } from '@eyepop.ai/eyepop'
179
+ const results = await endpoint.process({
180
+ source: { url: 'https://demo-eyepop-videos.s3.amazonaws.com/test1_vlog.mp4' },
181
+ })
182
+ ```
291
183
 
292
- const example_video_url = 'https://demo-eyepop-videos.s3.amazonaws.com/test1_vlog.mp4'
184
+ ### Canceling Jobs
293
185
 
294
- ;(async () => {
295
- const endpoint = EyePop.workerEndpoint().connect()
296
- try {
297
- let results = await endpoint.process({ source: { url: example_video_url } })
298
- for await (let result of results) {
299
- console.log(result)
300
- if (result['seconds'] >= 10.0) {
301
- results.cancel()
302
- }
303
- }
304
- } finally {
305
- await endpoint.disconnect()
186
+ Queued and in-progress jobs can be cancelled from the result iterator:
187
+
188
+ ```typescript
189
+ const results = await endpoint.process({
190
+ source: { url: 'https://demo-eyepop-videos.s3.amazonaws.com/test1_vlog.mp4' },
191
+ })
192
+
193
+ for await (const result of results) {
194
+ console.log(result)
195
+ if ((result.seconds ?? 0) >= 10) {
196
+ results.cancel()
306
197
  }
307
- })()
198
+ }
308
199
  ```
309
200
 
310
- ## Other Usage Options
201
+ ## Endpoint Options
311
202
 
312
- #### Auto start workers
203
+ By default, `EyePop.workerEndpoint().connect()` starts a worker when needed and cancels queued jobs on that worker when it connects.
313
204
 
314
- By default, `EyePop.workerEndpoint().connect()` will start a worker if none is running yet. To disable this behavior
315
- create an endpoint with `EyePop.endpoint({autoStart: false})`.
205
+ Disable worker startup:
206
+
207
+ ```typescript
208
+ const endpoint = await EyePop.workerEndpoint({ autoStart: false }).connect()
209
+ ```
210
+
211
+ Keep pending jobs:
212
+
213
+ ```typescript
214
+ const endpoint = await EyePop.workerEndpoint({ stopJobs: false }).connect()
215
+ ```
316
216
 
317
- #### Stop pending jobs
217
+ ## Visualization
318
218
 
319
- By default, `EyePop.workerEndpoint().connect()` will cancel all currently running or queued jobs on the worker.
320
- It is assumed that the caller _takes full control_ of that worker. To disable this behavior create an endpoint with
321
- `EyePop.endpoint({stopJobs: false})`.
219
+ Rendering helpers are provided by [@eyepop.ai/eyepop-render-2d](https://www.npmjs.com/package/@eyepop.ai/eyepop-render-2d).
322
220
 
323
- ## Data endpoint (PREVIEW)
221
+ ## Data Endpoint Preview
324
222
 
325
- To support managing your own datasets and control model optimization v0.21.0 introduces `EyePop.dataEndpoint()`,
326
- an experimental pre-release which is subject to change. An officially supported version will be released with v2.0.0
223
+ `EyePop.dataEndpoint()` provides preview support for dataset management and model optimization workflows. This API is experimental and subject to change.
327
224
 
328
- ## Composable Pops (PREVIEW)
225
+ ## Composable Pops Preview
329
226
 
330
- See [Composable Pops](composable-pops.md) for a preview of client side composability of pops, introduced in v1.0.0.
227
+ See [Composable Pops](composable-pops.md) for a preview of client-side Pop composition.
@@ -619,9 +619,14 @@ interface AutoPromptConfig {
619
619
  declare enum TaskType {
620
620
  classification = "classification"
621
621
  }
622
+ declare enum TaskMode {
623
+ image = "image",
624
+ video = "video"
625
+ }
622
626
  interface BaseTask {
623
627
  type: TaskType;
624
628
  task_description?: string;
629
+ task_mode?: TaskMode;
625
630
  }
626
631
  interface ClassificationTask extends BaseTask {
627
632
  classes: string[];
@@ -936,11 +941,6 @@ interface PlatformSupport {
936
941
  }
937
942
  interface Options {
938
943
  auth?: Authentication | undefined;
939
- /**
940
- * Override the default base URL for the API, e.g., "https://api.eyepop.ai/"
941
- *
942
- * Defaults to process.env['EYEPOP_URL'].
943
- */
944
944
  eyepopUrl?: string | undefined;
945
945
  jobQueueLength?: number;
946
946
  logger?: Logger | undefined;
@@ -1058,9 +1058,10 @@ declare enum TransientPopId {
1058
1058
  }
1059
1059
  interface WorkerOptions extends Options {
1060
1060
  /**
1061
- * TODO: deprecated, defaults to process.env['EYEPOP_POP_ID'].
1061
+ * TODO: deprecated, support for pop id will be removed in 3.16
1062
1062
  */
1063
1063
  popId?: string | TransientPopId | undefined;
1064
+ sessionUuid?: string | undefined;
1064
1065
  autoStart?: boolean;
1065
1066
  stopJobs?: boolean;
1066
1067
  isLocalMode?: boolean;
@@ -1125,7 +1126,9 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1125
1126
  private static SESSION_DEAD;
1126
1127
  private static WAIT_FOR_IS_READY;
1127
1128
  private static CHECK_FOR_IS_READY_INTERVAL;
1128
- private startComputeSession;
1129
+ private getComputeSession;
1130
+ private getOnDemandComputeSession;
1131
+ private getPermanentComputeSession;
1129
1132
  private startTransientPipeline;
1130
1133
  }
1131
1134
 
@@ -1400,4 +1403,4 @@ declare namespace EyePop {
1400
1403
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
1401
1404
  }
1402
1405
 
1403
- 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 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, 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 };
1406
+ 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 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 };
@@ -619,9 +619,14 @@ interface AutoPromptConfig {
619
619
  declare enum TaskType {
620
620
  classification = "classification"
621
621
  }
622
+ declare enum TaskMode {
623
+ image = "image",
624
+ video = "video"
625
+ }
622
626
  interface BaseTask {
623
627
  type: TaskType;
624
628
  task_description?: string;
629
+ task_mode?: TaskMode;
625
630
  }
626
631
  interface ClassificationTask extends BaseTask {
627
632
  classes: string[];
@@ -936,11 +941,6 @@ interface PlatformSupport {
936
941
  }
937
942
  interface Options {
938
943
  auth?: Authentication | undefined;
939
- /**
940
- * Override the default base URL for the API, e.g., "https://api.eyepop.ai/"
941
- *
942
- * Defaults to process.env['EYEPOP_URL'].
943
- */
944
944
  eyepopUrl?: string | undefined;
945
945
  jobQueueLength?: number;
946
946
  logger?: Logger | undefined;
@@ -1058,9 +1058,10 @@ declare enum TransientPopId {
1058
1058
  }
1059
1059
  interface WorkerOptions extends Options {
1060
1060
  /**
1061
- * TODO: deprecated, defaults to process.env['EYEPOP_POP_ID'].
1061
+ * TODO: deprecated, support for pop id will be removed in 3.16
1062
1062
  */
1063
1063
  popId?: string | TransientPopId | undefined;
1064
+ sessionUuid?: string | undefined;
1064
1065
  autoStart?: boolean;
1065
1066
  stopJobs?: boolean;
1066
1067
  isLocalMode?: boolean;
@@ -1125,7 +1126,9 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
1125
1126
  private static SESSION_DEAD;
1126
1127
  private static WAIT_FOR_IS_READY;
1127
1128
  private static CHECK_FOR_IS_READY_INTERVAL;
1128
- private startComputeSession;
1129
+ private getComputeSession;
1130
+ private getOnDemandComputeSession;
1131
+ private getPermanentComputeSession;
1129
1132
  private startTransientPipeline;
1130
1133
  }
1131
1134
 
@@ -1400,4 +1403,4 @@ declare namespace EyePop {
1400
1403
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
1401
1404
  }
1402
1405
 
1403
- 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 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, 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 };
1406
+ 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 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 };