@oya-ai/browser 1.0.119 → 1.0.121

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/dist/index.d.cts CHANGED
@@ -273,6 +273,69 @@ type LlmProvider = 'openai' | 'anthropic'
273
273
  /** Gemini Enterprise, ex-Vertex AI. Express mode by default; set `openai_base_url` to a
274
274
  * project-scoped `.../endpoints/openapi` endpoint to use an enterprise project. */
275
275
  | 'vertex';
276
+ /**
277
+ * Which runtime this key's `'oya-cloud'` browsers run on. `'docker'` and `'k8s'`
278
+ * run on the deployment's own daemon or cluster, exactly as its operator set them up;
279
+ * `'daytona'` and `'ecs'` run on your own account once you set that runtime's
280
+ * credentials below, and on the deployment's otherwise.
281
+ */
282
+ type SandboxRuntime = 'daytona' | 'docker' | 'k8s' | 'ecs';
283
+ /**
284
+ * How Oya signs in to your AWS account to run `'ecs'` browsers.
285
+ *
286
+ * - `iam`: an access key (optionally temporary, with its session token).
287
+ * - `role`: Oya assumes `roleArn` from its own AWS identity. Put Oya's AWS
288
+ * account and `config.get().ecs.externalId` in the role's trust policy; the
289
+ * ExternalId is Oya's, one per API key, and cannot be set.
290
+ * - `sso`: an IAM Identity Center access token (from `aws sso login`'s cache or
291
+ * the SSO OIDC device flow) for `accountId` and `roleName`. It expires; starts
292
+ * then fail with `sso_token_expired` until you set a fresh one.
293
+ */
294
+ type EcsAuth = {
295
+ /** An IAM access key. */
296
+ type: 'iam';
297
+ /** The access key id. */
298
+ accessKeyId: string;
299
+ /** Its secret. Read back masked. */
300
+ secretAccessKey: string;
301
+ /** For temporary credentials. Read back masked. */
302
+ sessionToken?: string;
303
+ } | {
304
+ /** A role Oya assumes. */
305
+ type: 'role';
306
+ /** e.g. arn:aws:iam::123456789012:role/oya-browsers */
307
+ roleArn: string;
308
+ } | {
309
+ /** IAM Identity Center. */
310
+ type: 'sso';
311
+ /** The SSO access token. Read back masked. */
312
+ accessToken: string;
313
+ /** The 12-digit account to sign in to. */
314
+ accountId: string;
315
+ /** The permission set's role name in that account. */
316
+ roleName: string;
317
+ /** The SSO portal's region, when it differs from `region`. */
318
+ ssoRegion?: string;
319
+ };
320
+ /** Where `'ecs'` browsers run: one Fargate task each, of a task definition that runs the Oya browser image. */
321
+ interface EcsConfig {
322
+ /** The ECS cluster. */
323
+ cluster: string;
324
+ /** The task definition: family, family:revision or ARN. */
325
+ taskDefinition: string;
326
+ /** Subnet ids for the tasks, e.g. ['subnet-0abc']. */
327
+ subnets: string[];
328
+ /** Security group ids for the tasks. */
329
+ securityGroups?: string[];
330
+ /** Give each task a public IP; needed in a public subnet without a NAT gateway. */
331
+ assignPublicIp?: boolean;
332
+ /** The container in the task definition that runs the browser; defaults to 'browser'. */
333
+ container?: string;
334
+ /** The AWS region, e.g. 'us-east-1'. */
335
+ region: string;
336
+ /** How Oya signs in to your account. */
337
+ auth: EcsAuth;
338
+ }
276
339
  /** Empty disables solving. */
277
340
  type CaptchaSolver = 'capsolver' | '2captcha' | '';
278
341
  /**
@@ -303,6 +366,16 @@ interface ConfigUpdate {
303
366
  browseruse_api_key?: string | null;
304
367
  /** The DevTools WebSocket URL of your own Chrome, for the 'cdp' provider. */
305
368
  cdp_ws_url?: string | null;
369
+ /** Which runtime `'oya-cloud'` browsers run on; unset uses the deployment's. */
370
+ sandbox_runtime?: SandboxRuntime | null;
371
+ /** Your Daytona API key, so `'daytona'` runs on your own Daytona account. */
372
+ daytona_api_key?: string | null;
373
+ /** The Daytona snapshot of the Oya browser image, in your account. */
374
+ daytona_snapshot?: string | null;
375
+ /** The Daytona region, e.g. 'us' or 'eu'. */
376
+ daytona_target?: string | null;
377
+ /** Where this key's `'ecs'` browsers run and how Oya signs in to your AWS account. */
378
+ ecs?: EcsConfig | null;
306
379
  /** Which CAPTCHA solving service to call. */
307
380
  captcha_solver?: CaptchaSolver | null;
308
381
  /** The solving service's API key. */
@@ -311,7 +384,14 @@ interface ConfigUpdate {
311
384
  onboarded?: string | null;
312
385
  }
313
386
  /** What `config.get()` returns. Secrets read back masked, never in full. */
314
- interface Config extends Omit<ConfigUpdate, 'llm_provider' | 'browser_provider' | 'captcha_solver'> {
387
+ interface Config extends Omit<ConfigUpdate, 'llm_provider' | 'browser_provider' | 'captcha_solver' | 'sandbox_runtime' | 'ecs'> {
388
+ /** The configured sandbox runtime, or empty for the deployment's. */
389
+ sandbox_runtime?: SandboxRuntime | '';
390
+ /** The ECS setting with its credentials masked, and the ExternalId to trust for `auth.type: 'role'`. */
391
+ ecs: Partial<EcsConfig> & {
392
+ /** Put this in your role's trust policy as sts:ExternalId. Shown even before ECS is set. */
393
+ externalId: string;
394
+ };
315
395
  /** The configured LLM vendor, or empty for the deployment default. */
316
396
  llm_provider?: LlmProvider | '';
317
397
  /** The configured browser provider, or empty for the deployment default. */
@@ -1433,4 +1513,4 @@ declare class Oya {
1433
1513
  private waitUntilConnected;
1434
1514
  }
1435
1515
 
1436
- export { type Activity, type Analysis, type AnalyzeOptions, type AttentionRequest, type Block, Browser, type BrowserDetail, type BrowserInfo, type CaptchaResult, type CaptchaSolver, type Config, type ConfigUpdate, type ControlCredential, type ControlEvent, type ControlOverview, type ControlRole, type ControlSession, type Cookie, type CookieFormat, type Element, type FileValue, type Fingerprint, type Health, type HumanInputAction, type LlmProvider, MAX_FILE_BYTES, type MfaConfig, type MfaResult, Oya, OyaError, type OyaOptions, type PageFormat, type PersonaInfo, type PersonaPrefs, type PlayResult, type Playbook, type PlaybookSummary, type ProjectSettings, type Provider, type ProxyCreate, type ProxyInfo, type RecoverOptions, Run, type RunData, type RunInfo, type RunResult, type SiteCredentials, type StartOptions, type StartResult, type StopResult, type SubmitOptions, Oya as default, file };
1516
+ export { type Activity, type Analysis, type AnalyzeOptions, type AttentionRequest, type Block, Browser, type BrowserDetail, type BrowserInfo, type CaptchaResult, type CaptchaSolver, type Config, type ConfigUpdate, type ControlCredential, type ControlEvent, type ControlOverview, type ControlRole, type ControlSession, type Cookie, type CookieFormat, type EcsAuth, type EcsConfig, type Element, type FileValue, type Fingerprint, type Health, type HumanInputAction, type LlmProvider, MAX_FILE_BYTES, type MfaConfig, type MfaResult, Oya, OyaError, type OyaOptions, type PageFormat, type PersonaInfo, type PersonaPrefs, type PlayResult, type Playbook, type PlaybookSummary, type ProjectSettings, type Provider, type ProxyCreate, type ProxyInfo, type RecoverOptions, Run, type RunData, type RunInfo, type RunResult, type SandboxRuntime, type SiteCredentials, type StartOptions, type StartResult, type StopResult, type SubmitOptions, Oya as default, file };
package/dist/index.d.ts CHANGED
@@ -273,6 +273,69 @@ type LlmProvider = 'openai' | 'anthropic'
273
273
  /** Gemini Enterprise, ex-Vertex AI. Express mode by default; set `openai_base_url` to a
274
274
  * project-scoped `.../endpoints/openapi` endpoint to use an enterprise project. */
275
275
  | 'vertex';
276
+ /**
277
+ * Which runtime this key's `'oya-cloud'` browsers run on. `'docker'` and `'k8s'`
278
+ * run on the deployment's own daemon or cluster, exactly as its operator set them up;
279
+ * `'daytona'` and `'ecs'` run on your own account once you set that runtime's
280
+ * credentials below, and on the deployment's otherwise.
281
+ */
282
+ type SandboxRuntime = 'daytona' | 'docker' | 'k8s' | 'ecs';
283
+ /**
284
+ * How Oya signs in to your AWS account to run `'ecs'` browsers.
285
+ *
286
+ * - `iam`: an access key (optionally temporary, with its session token).
287
+ * - `role`: Oya assumes `roleArn` from its own AWS identity. Put Oya's AWS
288
+ * account and `config.get().ecs.externalId` in the role's trust policy; the
289
+ * ExternalId is Oya's, one per API key, and cannot be set.
290
+ * - `sso`: an IAM Identity Center access token (from `aws sso login`'s cache or
291
+ * the SSO OIDC device flow) for `accountId` and `roleName`. It expires; starts
292
+ * then fail with `sso_token_expired` until you set a fresh one.
293
+ */
294
+ type EcsAuth = {
295
+ /** An IAM access key. */
296
+ type: 'iam';
297
+ /** The access key id. */
298
+ accessKeyId: string;
299
+ /** Its secret. Read back masked. */
300
+ secretAccessKey: string;
301
+ /** For temporary credentials. Read back masked. */
302
+ sessionToken?: string;
303
+ } | {
304
+ /** A role Oya assumes. */
305
+ type: 'role';
306
+ /** e.g. arn:aws:iam::123456789012:role/oya-browsers */
307
+ roleArn: string;
308
+ } | {
309
+ /** IAM Identity Center. */
310
+ type: 'sso';
311
+ /** The SSO access token. Read back masked. */
312
+ accessToken: string;
313
+ /** The 12-digit account to sign in to. */
314
+ accountId: string;
315
+ /** The permission set's role name in that account. */
316
+ roleName: string;
317
+ /** The SSO portal's region, when it differs from `region`. */
318
+ ssoRegion?: string;
319
+ };
320
+ /** Where `'ecs'` browsers run: one Fargate task each, of a task definition that runs the Oya browser image. */
321
+ interface EcsConfig {
322
+ /** The ECS cluster. */
323
+ cluster: string;
324
+ /** The task definition: family, family:revision or ARN. */
325
+ taskDefinition: string;
326
+ /** Subnet ids for the tasks, e.g. ['subnet-0abc']. */
327
+ subnets: string[];
328
+ /** Security group ids for the tasks. */
329
+ securityGroups?: string[];
330
+ /** Give each task a public IP; needed in a public subnet without a NAT gateway. */
331
+ assignPublicIp?: boolean;
332
+ /** The container in the task definition that runs the browser; defaults to 'browser'. */
333
+ container?: string;
334
+ /** The AWS region, e.g. 'us-east-1'. */
335
+ region: string;
336
+ /** How Oya signs in to your account. */
337
+ auth: EcsAuth;
338
+ }
276
339
  /** Empty disables solving. */
277
340
  type CaptchaSolver = 'capsolver' | '2captcha' | '';
278
341
  /**
@@ -303,6 +366,16 @@ interface ConfigUpdate {
303
366
  browseruse_api_key?: string | null;
304
367
  /** The DevTools WebSocket URL of your own Chrome, for the 'cdp' provider. */
305
368
  cdp_ws_url?: string | null;
369
+ /** Which runtime `'oya-cloud'` browsers run on; unset uses the deployment's. */
370
+ sandbox_runtime?: SandboxRuntime | null;
371
+ /** Your Daytona API key, so `'daytona'` runs on your own Daytona account. */
372
+ daytona_api_key?: string | null;
373
+ /** The Daytona snapshot of the Oya browser image, in your account. */
374
+ daytona_snapshot?: string | null;
375
+ /** The Daytona region, e.g. 'us' or 'eu'. */
376
+ daytona_target?: string | null;
377
+ /** Where this key's `'ecs'` browsers run and how Oya signs in to your AWS account. */
378
+ ecs?: EcsConfig | null;
306
379
  /** Which CAPTCHA solving service to call. */
307
380
  captcha_solver?: CaptchaSolver | null;
308
381
  /** The solving service's API key. */
@@ -311,7 +384,14 @@ interface ConfigUpdate {
311
384
  onboarded?: string | null;
312
385
  }
313
386
  /** What `config.get()` returns. Secrets read back masked, never in full. */
314
- interface Config extends Omit<ConfigUpdate, 'llm_provider' | 'browser_provider' | 'captcha_solver'> {
387
+ interface Config extends Omit<ConfigUpdate, 'llm_provider' | 'browser_provider' | 'captcha_solver' | 'sandbox_runtime' | 'ecs'> {
388
+ /** The configured sandbox runtime, or empty for the deployment's. */
389
+ sandbox_runtime?: SandboxRuntime | '';
390
+ /** The ECS setting with its credentials masked, and the ExternalId to trust for `auth.type: 'role'`. */
391
+ ecs: Partial<EcsConfig> & {
392
+ /** Put this in your role's trust policy as sts:ExternalId. Shown even before ECS is set. */
393
+ externalId: string;
394
+ };
315
395
  /** The configured LLM vendor, or empty for the deployment default. */
316
396
  llm_provider?: LlmProvider | '';
317
397
  /** The configured browser provider, or empty for the deployment default. */
@@ -1433,4 +1513,4 @@ declare class Oya {
1433
1513
  private waitUntilConnected;
1434
1514
  }
1435
1515
 
1436
- export { type Activity, type Analysis, type AnalyzeOptions, type AttentionRequest, type Block, Browser, type BrowserDetail, type BrowserInfo, type CaptchaResult, type CaptchaSolver, type Config, type ConfigUpdate, type ControlCredential, type ControlEvent, type ControlOverview, type ControlRole, type ControlSession, type Cookie, type CookieFormat, type Element, type FileValue, type Fingerprint, type Health, type HumanInputAction, type LlmProvider, MAX_FILE_BYTES, type MfaConfig, type MfaResult, Oya, OyaError, type OyaOptions, type PageFormat, type PersonaInfo, type PersonaPrefs, type PlayResult, type Playbook, type PlaybookSummary, type ProjectSettings, type Provider, type ProxyCreate, type ProxyInfo, type RecoverOptions, Run, type RunData, type RunInfo, type RunResult, type SiteCredentials, type StartOptions, type StartResult, type StopResult, type SubmitOptions, Oya as default, file };
1516
+ export { type Activity, type Analysis, type AnalyzeOptions, type AttentionRequest, type Block, Browser, type BrowserDetail, type BrowserInfo, type CaptchaResult, type CaptchaSolver, type Config, type ConfigUpdate, type ControlCredential, type ControlEvent, type ControlOverview, type ControlRole, type ControlSession, type Cookie, type CookieFormat, type EcsAuth, type EcsConfig, type Element, type FileValue, type Fingerprint, type Health, type HumanInputAction, type LlmProvider, MAX_FILE_BYTES, type MfaConfig, type MfaResult, Oya, OyaError, type OyaOptions, type PageFormat, type PersonaInfo, type PersonaPrefs, type PlayResult, type Playbook, type PlaybookSummary, type ProjectSettings, type Provider, type ProxyCreate, type ProxyInfo, type RecoverOptions, Run, type RunData, type RunInfo, type RunResult, type SandboxRuntime, type SiteCredentials, type StartOptions, type StartResult, type StopResult, type SubmitOptions, Oya as default, file };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oya-ai/browser",
3
- "version": "1.0.119",
3
+ "version": "1.0.121",
4
4
  "description": "Rotate thousands of browsers behind one API, personas, proxies, stealth, CAPTCHA and MFA.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://oyabrowser.com",