@scalebrowser/sdk 0.9.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,13 +3,38 @@
3
3
  The Node/TypeScript SDK for the Scalebrowser daemon.
4
4
 
5
5
  This file starts at 0.5.0, the oldest release still on npm when it was written
6
- (2026-09-09). What came before is in the repository's history. It was never
7
- published as release notes, and reconstructing it here would look like a record
8
- that had been kept all along.
6
+ (2026-09-09). What came before was never published as release notes, and
7
+ reconstructing it here would look like a record that had been kept all along.
9
8
 
10
9
  The daemon and the SDK version independently. An SDK release names the daemon
11
10
  version it was tested against wherever that matters.
12
11
 
12
+ ## 1.0.0 (2026-09-27)
13
+
14
+ The library works as in 0.9.0. What changes is the promise: from this release
15
+ on, a breaking change to the client or its types arrives only as a new major
16
+ version, with the reason written in this file.
17
+
18
+ - The source is public at https://github.com/blackdiamond-labs/scalebrowser-node.
19
+ npm builds every release from a tagged commit there and publishes it with a
20
+ provenance attestation, so anyone can check which commit and which workflow
21
+ run produced the package.
22
+ - The documentation comments you see in your editor no longer carry internal
23
+ planning references, and the video preset types are documented in English.
24
+
25
+ ## 0.9.0 (2026-09-20)
26
+
27
+ - `checkProxy` answers the exit's operator (`asn`), its timezone (`timezone`)
28
+ and the kind of network it sits on (`exit_class`: `datacenter`,
29
+ `residential`, `mobile` or `unknown`).
30
+ - `is_mobile` is derived from `exit_class` and has three states: `true`,
31
+ `false`, and `null` for "could not be classified". Before, it was `false` on
32
+ every answer, genuinely mobile exits included.
33
+ - A proxy row carries `last_timezone`, the zone a profile on
34
+ `geo_mode: "follow_exit"` adopts at its next start.
35
+ - The exit-address view names the IPv6 `/64` in use as `current_v6` when the
36
+ daemon measures IPv6; `current` holds the IPv4 address with its `v4:` prefix.
37
+
13
38
  ## 0.8.1 (2026-09-16)
14
39
 
15
40
  The published `package.json` no longer lists a `smoke` script. It pointed at a
package/README.md CHANGED
@@ -15,7 +15,10 @@ npm install @scalebrowser/sdk
15
15
  ```
16
16
 
17
17
  Ships dual ESM + CJS with full type declarations, and needs Node ≥ 18. The SDK
18
- is MIT-licensed; the daemon it talks to is a separate, licensed product.
18
+ is MIT-licensed, and its source is public at
19
+ [blackdiamond-labs/scalebrowser-node](https://github.com/blackdiamond-labs/scalebrowser-node):
20
+ npm builds every release there and publishes it with a provenance attestation.
21
+ The daemon it talks to is a separate, licensed product.
19
22
 
20
23
  ## Quickstart
21
24
 
package/dist/index.cjs CHANGED
@@ -17,22 +17,22 @@ var ErrorCode = {
17
17
  /** Retired: the removed Methode-D (VM) tier produced this. Reserved (never reused)
18
18
  * to match the server's append-only code contract; never returned now. */
19
19
  VmProvisionFailed: 4007,
20
- /** The subscription's abo-wide concurrent-browser allowance is used up (DEC-012).
20
+ /** The subscription's abo-wide concurrent-browser allowance is used up.
21
21
  * Distinct from Capacity (4003 = this machine is full, wait): the caller's move
22
22
  * is to stop a running browser anywhere or upgrade the plan. */
23
23
  ConcurrencyLimit: 4008,
24
24
  Unauthorized: 4010,
25
- /** No account is connected to this machine, so nothing may run (DEC-014).
25
+ /** No account is connected to this machine, so nothing may run.
26
26
  * Distinct from Unauthorized (4010 = the daemon's own bearer token is wrong, so
27
27
  * re-read the token): 4011 means the machine needs to be signed in, and no token
28
28
  * a client holds can substitute for that. Connect it in the desktop app. */
29
29
  NotSignedIn: 4011,
30
- /** This ONE profile is open on another machine of the same account (DEC-015).
30
+ /** This ONE profile is open on another machine of the same account.
31
31
  * Distinct from ConcurrencyLimit (4008 = the plan is full, buy more or free any
32
32
  * browser): the caller's move here costs nothing. Close it on that machine, or
33
33
  * take it over from the app running there. */
34
34
  ProfileInUse: 4012,
35
- /** The exit address this start drew belongs to another profile (DEC-017).
35
+ /** The exit address this start drew belongs to another profile.
36
36
  * Distinct from ProxyGeo (4002 = wrong country or wrong kind of exit, so change
37
37
  * the proxy): here the proxy is fine and the address is simply spoken for. Wait
38
38
  * for a term to run out, let the daemon draw again, or turn exclusivity off for
@@ -1217,7 +1217,7 @@ var CdpSession = class _CdpSession {
1217
1217
  });
1218
1218
  return executionContextId;
1219
1219
  }
1220
- // ── Humanized trusted input (routes through the daemon, G8) ────────────────
1220
+ // ── Humanized trusted input (routes through the daemon) ────────────────────
1221
1221
  humanizeMove(x, y, opts = {}) {
1222
1222
  return this.#input({ action: "move", x, y, width: opts.width });
1223
1223
  }
@@ -1595,7 +1595,7 @@ var ScalebrowserClient = class extends ClientCore {
1595
1595
  signal
1596
1596
  });
1597
1597
  }
1598
- // ── Exit-address exclusivity (DEC-017) ──────────────────────────────────────
1598
+ // ── Exit-address exclusivity ────────────────────────────────────────────────
1599
1599
  /** Which exit addresses this profile owns, and how far the rule reaches.
1600
1600
  *
1601
1601
  * `scope` is `'machine'` while this computer has no account key. That is the
@@ -1607,14 +1607,14 @@ var ScalebrowserClient = class extends ClientCore {
1607
1607
  signal
1608
1608
  });
1609
1609
  }
1610
- // ── Session bundles (AC-ST-002/003) ─────────────────────────────────────────
1610
+ // ── Session bundles ─────────────────────────────────────────────────────────
1611
1611
  exportSession(profileId, body) {
1612
1612
  return this.request("POST", `/v1/profiles/${enc(profileId)}/session/export`, body);
1613
1613
  }
1614
1614
  importSession(profileId, body) {
1615
1615
  return this.request("POST", `/v1/profiles/${enc(profileId)}/session/import`, body);
1616
1616
  }
1617
- // ── Trusted input (G8, AC-API-003) ─────────────────────────────────────────
1617
+ // ── Trusted input ──────────────────────────────────────────────────────────
1618
1618
  sendInput(profileId, body) {
1619
1619
  return this.request("POST", `/v1/profiles/${enc(profileId)}/input`, body);
1620
1620
  }
@@ -1738,7 +1738,7 @@ var PROXY_KINDS = ["http", "socks5", "gateway"];
1738
1738
  var ROTATIONS = ["sticky", "rotating"];
1739
1739
 
1740
1740
  // src/index.ts
1741
- var VERSION = "0.9.0";
1741
+ var VERSION = "1.0.0";
1742
1742
 
1743
1743
  exports.ApiError = ApiError;
1744
1744
  exports.CdpError = CdpError;
package/dist/index.d.cts CHANGED
@@ -423,19 +423,19 @@ interface ShareStatus extends ShareLinkLocal {
423
423
  * UNION of the Rust route shapes, never one serde struct (create/delete answer
424
424
  * the bare `Profile`, list/get the flattened `ProfileView`).
425
425
  */
426
- /** `RuntimeState` (AC-PR-004). */
426
+ /** `RuntimeState`. */
427
427
  type RuntimeState = 'stopped' | 'starting' | 'running' | 'crashed';
428
428
  declare const RUNTIME_STATES: readonly RuntimeState[];
429
- /** `GeoMode` (AC-PX-002). Default `follow_exit`. */
429
+ /** `GeoMode`. Default `follow_exit`. */
430
430
  type GeoMode = 'strict_expected' | 'follow_exit' | 'off';
431
431
  declare const GEO_MODES: readonly GeoMode[];
432
- /** `ProxyKind` (AC-PX-001). */
432
+ /** `ProxyKind`. */
433
433
  type ProxyKind = 'http' | 'socks5' | 'gateway';
434
434
  declare const PROXY_KINDS: readonly ProxyKind[];
435
- /** `Rotation` (AC-PX-002). */
435
+ /** `Rotation`. */
436
436
  type Rotation = 'sticky' | 'rotating';
437
437
  declare const ROTATIONS: readonly Rotation[];
438
- /** `SessionKind` (AC-ST-002). */
438
+ /** `SessionKind`. */
439
439
  type SessionKind = 'cookies' | 'local_storage' | 'indexed_db' | 'service_worker';
440
440
  type OsFamily = 'windows' | 'macos' | 'linux';
441
441
  /** How protected a profile is right now, decided by the daemon WITHOUT starting a
@@ -467,7 +467,7 @@ interface Profile {
467
467
  expected_country: string | null;
468
468
  /**
469
469
  * Whether this profile claims its exit address for itself, so no other profile of
470
- * the account starts on it (DEC-017). On for a new profile. Turn it off for a
470
+ * the account starts on it. On for a new profile. Turn it off for a
471
471
  * provider that hands out ONE address on purpose, a residential line you pay for
472
472
  * or a whitelisted office address, where the rule would refuse every start after
473
473
  * the first.
@@ -534,7 +534,7 @@ interface Preset {
534
534
  config: PresetConfig;
535
535
  created_at: number;
536
536
  }
537
- /** Was hinter der Seite liegt: ein Verlauf, eine Farbe, ein Bild, oder nichts. */
537
+ /** What lies behind the page: a gradient, a colour, an image, or nothing. */
538
538
  type VideoBackground = {
539
539
  kind: 'gradient';
540
540
  colors: string[];
@@ -547,7 +547,7 @@ type VideoBackground = {
547
547
  } | {
548
548
  kind: 'none';
549
549
  };
550
- /** Intro und Outro. `hold_result` haelt das letzte Bild statt einer Karte. */
550
+ /** Intro and outro. `hold_result` holds the last frame instead of a card. */
551
551
  type VideoCard = {
552
552
  style: 'title_card';
553
553
  seconds: number;
@@ -555,7 +555,7 @@ type VideoCard = {
555
555
  style: 'hold_result';
556
556
  seconds: number;
557
557
  };
558
- /** Wohin das fertige Video geht. */
558
+ /** Where the finished video goes. */
559
559
  type VideoDestination = {
560
560
  kind: 'local';
561
561
  } | {
@@ -564,7 +564,7 @@ type VideoDestination = {
564
564
  download: boolean;
565
565
  passcode: boolean;
566
566
  };
567
- /** Eine Zusatz-Ausgabe mit eigenen Massen. Objekte, nie blosse Strings. */
567
+ /** An additional output with its own dimensions. Objects, never bare strings. */
568
568
  interface ExtraOutput {
569
569
  preset: ExportPresetName;
570
570
  width?: number | null;
@@ -573,16 +573,16 @@ interface ExtraOutput {
573
573
  colors?: number | null;
574
574
  max_bytes?: number | null;
575
575
  }
576
- /** Hintergrundmusik, per Medien-Id, mit dem Pegel. */
576
+ /** Background music, by media id, with its level. */
577
577
  interface MusicBed {
578
578
  media_id: string;
579
579
  gain_db: number;
580
580
  }
581
581
  /**
582
- * Das Rezept eines Videos: alles ueber die FORM, nichts ueber den Inhalt.
582
+ * The recipe of a video: everything about the FORM, nothing about the content.
583
583
  *
584
- * Schritte, Laenge, Titel und Sprechtext kommen aus dem Auftrag, nie von hier
585
- * (AC-CTL-001); das einzige freie Textfeld ist `ai_label.text`.
584
+ * Steps, length, title and narration come from the request, never from here;
585
+ * the only free text field is `ai_label.text`.
586
586
  */
587
587
  interface VideoPresetConfig {
588
588
  output: {
@@ -602,7 +602,7 @@ interface VideoPresetConfig {
602
602
  scale: number;
603
603
  style: 'arrow_dark' | 'arrow_light' | 'dot' | 'touch';
604
604
  click: 'ripple' | 'ring' | 'none';
605
- /** `null` haelt den Zeiger fuer immer sichtbar. */
605
+ /** `null` keeps the pointer visible forever. */
606
606
  hide_after_ms: number | null;
607
607
  loop: boolean;
608
608
  };
@@ -614,7 +614,7 @@ interface VideoPresetConfig {
614
614
  zoom_scope: 'canvas' | 'card';
615
615
  };
616
616
  audio: {
617
- /** `"<anbieter>:<stimme>"` oder `null` fuer ein stummes Video. */
617
+ /** `"<provider>:<voice>"`, or `null` for a silent video. */
618
618
  voice: string | null;
619
619
  language: string;
620
620
  subtitles: 'burned' | 'file' | 'off';
@@ -866,7 +866,7 @@ interface SessionImportBody {
866
866
  bundle: string;
867
867
  }
868
868
  /**
869
- * Trusted-input payload (`POST /v1/profiles/:id/input`, G8, AC-API-003). Only
869
+ * Trusted-input payload (`POST /v1/profiles/:id/input`). Only
870
870
  * `action` and `humanize` are fixed by the API contract; the per-action
871
871
  * coordinate fields below are the SDK's assumption about the daemon's input
872
872
  * layer.
@@ -1218,7 +1218,7 @@ type LifecycleEvent = {
1218
1218
  * notices this connection fell behind. `dropped` counts what it skipped.
1219
1219
  */
1220
1220
  /**
1221
- * The exit-address guard's verdict for one running profile (DEC-017).
1221
+ * The exit-address guard's verdict for one running profile.
1222
1222
  *
1223
1223
  * The whole state, like every other live row here: a display rebuilt from
1224
1224
  * parts is what makes it confidently wrong, and the one frame that matters
@@ -1257,7 +1257,7 @@ type StreamedEvent = LifecycleEvent & {
1257
1257
  };
1258
1258
 
1259
1259
  /**
1260
- * Live lifecycle event stream (`GET /v1/events`, AC-API-003).
1260
+ * Live lifecycle event stream (`GET /v1/events`).
1261
1261
  *
1262
1262
  * Read as `text/event-stream` over `fetch` (so the Bearer header is attached, which
1263
1263
  * the browser `EventSource` cannot do that) and reconnect with backoff. A
@@ -1417,7 +1417,7 @@ interface Account {
1417
1417
  * machine connected to an account"; `signed_in` does. */
1418
1418
  licensed: boolean;
1419
1419
  /** Whether an account is connected to this machine. One without an account
1420
- * starts no browser (DEC-014). */
1420
+ * starts no browser. */
1421
1421
  signed_in: boolean;
1422
1422
  plan?: string;
1423
1423
  status?: string;
@@ -1482,7 +1482,7 @@ interface ExitRuleStatus {
1482
1482
  interface ScalebrowserClientOptions {
1483
1483
  /** Daemon base URL. Default `http://127.0.0.1:8787`. */
1484
1484
  baseUrl?: string;
1485
- /** Bearer token (AC-API-002). */
1485
+ /** Bearer token. */
1486
1486
  token?: string | null;
1487
1487
  /** Injectable `fetch` (for testing / custom agents). Default `globalThis.fetch`. */
1488
1488
  fetch?: FetchLike;
@@ -1638,7 +1638,7 @@ interface CreateProfileBody {
1638
1638
  */
1639
1639
  type UpdateProfileBody = Omit<Partial<CreateProfileBody>, "seed" | "persona_country"> & {
1640
1640
  /**
1641
- * Turn the exit-address rule off for this profile (DEC-017). Deliberately not
1641
+ * Turn the exit-address rule off for this profile. Deliberately not
1642
1642
  * part of `CreateProfileBody`: a new profile always claims its address, and
1643
1643
  * switching that off is a later, deliberate act for a setup that needs it.
1644
1644
  */
@@ -1652,7 +1652,7 @@ interface StartProfileResult {
1652
1652
  cdp_ws: string;
1653
1653
  /** DevTools TCP port, parsed from `cdp_ws` (`null` if the URL has none). */
1654
1654
  debug_port: number | null;
1655
- /** Effective headless state of this launch (AC-OR-005). */
1655
+ /** Effective headless state of this launch. */
1656
1656
  headless: boolean;
1657
1657
  pid: number | null;
1658
1658
  started_at: number;
@@ -1704,7 +1704,7 @@ type UpdateProxyBody = Partial<CreateProxyBody>;
1704
1704
  * Result of `POST /v1/proxies/:id/check` (health + geo).
1705
1705
  *
1706
1706
  * CONTRACT ASSUMPTION: the daemon returns the freshly-checked exit identity plus
1707
- * the JA4↔JA4T coherence verdict (AC-FP-011). Fields beyond the persisted `Proxy`
1707
+ * the JA4↔JA4T coherence verdict. Fields beyond the persisted `Proxy`
1708
1708
  * columns (`ja4`, `ja4t`, `ja4t_mismatch`, `warnings`) are optional; if the
1709
1709
  * daemon only echoes the updated `Proxy`, the JA4 verdict is simply absent.
1710
1710
  */
@@ -2425,7 +2425,7 @@ declare class VideosApi extends ClientCore {
2425
2425
  }
2426
2426
 
2427
2427
  /**
2428
- * Direct-CDP driver (DEC-006, AC-FP-005): a minimal, nodriver-style Chrome
2428
+ * Direct-CDP driver: a minimal, nodriver-style Chrome
2429
2429
  * DevTools Protocol client over a raw websocket. This is the recommended SDK
2430
2430
  * driver plane: it is NOT the Playwright/Puppeteer control plane (which is a
2431
2431
  * detection vector independent of patch quality). We never call `Runtime.enable`
@@ -2565,7 +2565,7 @@ interface CdpConnectOptions {
2565
2565
  declare function openCdpSession(url: string, options?: CdpConnectOptions): Promise<CdpSession>;
2566
2566
 
2567
2567
  /**
2568
- * Dashboard/SDK metrics (AC-UI-002, M3). The daemon serves `GET /v1/metrics`
2568
+ * Dashboard/SDK metrics. The daemon serves `GET /v1/metrics`
2569
2569
  * from a background sampler; each null-able figure is disambiguated by
2570
2570
  * {@link Metrics.availability} (`measured` vs `unsupported` vs `unavailable`).
2571
2571
  * Against an old daemon without the endpoint (404) the client falls back to
@@ -2827,22 +2827,22 @@ declare const ErrorCode: {
2827
2827
  /** Retired: the removed Methode-D (VM) tier produced this. Reserved (never reused)
2828
2828
  * to match the server's append-only code contract; never returned now. */
2829
2829
  readonly VmProvisionFailed: 4007;
2830
- /** The subscription's abo-wide concurrent-browser allowance is used up (DEC-012).
2830
+ /** The subscription's abo-wide concurrent-browser allowance is used up.
2831
2831
  * Distinct from Capacity (4003 = this machine is full, wait): the caller's move
2832
2832
  * is to stop a running browser anywhere or upgrade the plan. */
2833
2833
  readonly ConcurrencyLimit: 4008;
2834
2834
  readonly Unauthorized: 4010;
2835
- /** No account is connected to this machine, so nothing may run (DEC-014).
2835
+ /** No account is connected to this machine, so nothing may run.
2836
2836
  * Distinct from Unauthorized (4010 = the daemon's own bearer token is wrong, so
2837
2837
  * re-read the token): 4011 means the machine needs to be signed in, and no token
2838
2838
  * a client holds can substitute for that. Connect it in the desktop app. */
2839
2839
  readonly NotSignedIn: 4011;
2840
- /** This ONE profile is open on another machine of the same account (DEC-015).
2840
+ /** This ONE profile is open on another machine of the same account.
2841
2841
  * Distinct from ConcurrencyLimit (4008 = the plan is full, buy more or free any
2842
2842
  * browser): the caller's move here costs nothing. Close it on that machine, or
2843
2843
  * take it over from the app running there. */
2844
2844
  readonly ProfileInUse: 4012;
2845
- /** The exit address this start drew belongs to another profile (DEC-017).
2845
+ /** The exit address this start drew belongs to another profile.
2846
2846
  * Distinct from ProxyGeo (4002 = wrong country or wrong kind of exit, so change
2847
2847
  * the proxy): here the proxy is fine and the address is simply spoken for. Wait
2848
2848
  * for a term to run out, let the daemon draw again, or turn exclusivity off for
@@ -2891,7 +2891,7 @@ declare function errorMessage(err: unknown): string;
2891
2891
  /**
2892
2892
  * `@scalebrowser/sdk`: the official Node/TypeScript SDK for the Scalebrowser
2893
2893
  * daemon. A typed REST client plus a direct-CDP driver plane (nodriver-style,
2894
- * NOT Playwright, DEC-006).
2894
+ * NOT Playwright).
2895
2895
  *
2896
2896
  * ```ts
2897
2897
  * import { ScalebrowserClient } from '@scalebrowser/sdk';
@@ -2905,6 +2905,6 @@ declare function errorMessage(err: unknown): string;
2905
2905
  * ```
2906
2906
  */
2907
2907
 
2908
- declare const VERSION = "0.9.0";
2908
+ declare const VERSION = "1.0.0";
2909
2909
 
2910
2910
  export { type Account, type ActivitySnapshot, type AgentRun, ApiError, type ApiErrorBody, type ArtifactBytes, type ArtifactPutResult, type AttachOptions, type AudioStatus, type AuditDetectorReport, type AuditReport, type AuditStatus, type AuditVerdict, type BindInboxBody, type BlockedExport, type CdpConnectOptions, CdpError, type CdpEvent, CdpSession, type Chapter, type ClickOptions, type CodecsStatus, type Connection, type CreateGroupBody, type CreateInboxBody, type CreatePresetBody, type CreateTasksBody, type CreateTasksResult, DEFAULT_CAPACITY, type DeleteInterruptionRuleParams, type EffectiveInterruptionLock, ErrorCode, type ErrorCodeValue, type EvaluateOptions, type ExitClaim, type ExitRuleStatus, type ExitScope, type ExitStatus, type ExportPresetName, type ExtraOutput, type FetchLike, GEO_MODES, type GeoMode, type GoalSource, type Group, type HealthStatus, type Inbox, type InboxBinding, type InboxBindings, type InboxChannel, type InputClient, type InterruptionChoice, type InterruptionLock, type InterruptionLockRow, type InterruptionLockView, type InterruptionRuleRow, type LaunchHandle, type ListRunsParams, type ListStepsParams, type ListTasksParams, type ListVideosParams, type MediaAsset, type MediaKind, type MusicBed, type NarrationLine, type NavigateOptions, NetworkError, type OsFamily, type OutcomeSource, PROXY_KINDS, type PasskeyRow, type PatchTaskBody, type PersonaConstraintOptions, type Preset, type PresetConfig, type PresetConstraints, type PreviewHidden, type PreviewMoment, type Profile, type ProfileActivity, type ProfileMemory, type ProfileTask, type ProtectionLevel, type ProtectionStatus, type Proxy, type ProxyKind, type ProxyRow, type ProxyUsage, ROTATIONS, RUNTIME_STATES, type ReadyStatus, type Recording, type RecordingKind, type RecordingState, type RemoteStatus, type RenderProgress, type RenderRequestBody, type RenderStage, type RevealCookiesBody, type RevealCookiesResult, type RevealedCookie, type Rotation, type RunActor, type RunOutcome, type RunStep, type RuntimeState, ScalebrowserClient, type ScalebrowserClientOptions, ScalebrowserError, type ScrollOptions, type SecretBindingMode, type SecretDeleteResult, type SecretKind, type SecretListResult, type SecretOrigin, type SecretPatchBody, type SecretRow, type SecretRunBody, type SecretRunMention, type SecretRunResult, type SecretScrubResult, type SecretState, type SessionExportBody, type SessionExportResult, type SessionImportBody, type SessionKind, type SetInterruptionLockBody, type SetInterruptionRuleBody, type ShareLinkLocal, type ShareStatus, type ShotFocus, type ShotIntent, type StepKind, type StepTarget, type StreamHandlers, type StreamParams, type StreamStatus, type TaskState, type TimestampState, type TranscriptWord, type TrustedInputBody, type TtsProviderView, type TtsVerifyResult, type UpdateGroupBody, type UpdateInboxBody, type UpdatePresetBody, VERSION, type Video, type VideoAccessGrant, type VideoAssetName, type VideoAssets, type VideoBackground, type VideoCard, type VideoDestination, type VideoFlags, type VideoPreset, type VideoPresetClip, type VideoPresetClipBody, type VideoPresetClipProgress, type VideoPresetClipStarted, type VideoPresetConfig, type VideoPresetPreview, type VideoPresetPreviewBody, type VideoState, type VideosPage, type VideosStorage, type WriteMemoryBody, deriveMetricsFromProfiles, errorMessage, eventStream, openCdpSession, parseSseFrame, subscribeEvents };
package/dist/index.d.ts CHANGED
@@ -423,19 +423,19 @@ interface ShareStatus extends ShareLinkLocal {
423
423
  * UNION of the Rust route shapes, never one serde struct (create/delete answer
424
424
  * the bare `Profile`, list/get the flattened `ProfileView`).
425
425
  */
426
- /** `RuntimeState` (AC-PR-004). */
426
+ /** `RuntimeState`. */
427
427
  type RuntimeState = 'stopped' | 'starting' | 'running' | 'crashed';
428
428
  declare const RUNTIME_STATES: readonly RuntimeState[];
429
- /** `GeoMode` (AC-PX-002). Default `follow_exit`. */
429
+ /** `GeoMode`. Default `follow_exit`. */
430
430
  type GeoMode = 'strict_expected' | 'follow_exit' | 'off';
431
431
  declare const GEO_MODES: readonly GeoMode[];
432
- /** `ProxyKind` (AC-PX-001). */
432
+ /** `ProxyKind`. */
433
433
  type ProxyKind = 'http' | 'socks5' | 'gateway';
434
434
  declare const PROXY_KINDS: readonly ProxyKind[];
435
- /** `Rotation` (AC-PX-002). */
435
+ /** `Rotation`. */
436
436
  type Rotation = 'sticky' | 'rotating';
437
437
  declare const ROTATIONS: readonly Rotation[];
438
- /** `SessionKind` (AC-ST-002). */
438
+ /** `SessionKind`. */
439
439
  type SessionKind = 'cookies' | 'local_storage' | 'indexed_db' | 'service_worker';
440
440
  type OsFamily = 'windows' | 'macos' | 'linux';
441
441
  /** How protected a profile is right now, decided by the daemon WITHOUT starting a
@@ -467,7 +467,7 @@ interface Profile {
467
467
  expected_country: string | null;
468
468
  /**
469
469
  * Whether this profile claims its exit address for itself, so no other profile of
470
- * the account starts on it (DEC-017). On for a new profile. Turn it off for a
470
+ * the account starts on it. On for a new profile. Turn it off for a
471
471
  * provider that hands out ONE address on purpose, a residential line you pay for
472
472
  * or a whitelisted office address, where the rule would refuse every start after
473
473
  * the first.
@@ -534,7 +534,7 @@ interface Preset {
534
534
  config: PresetConfig;
535
535
  created_at: number;
536
536
  }
537
- /** Was hinter der Seite liegt: ein Verlauf, eine Farbe, ein Bild, oder nichts. */
537
+ /** What lies behind the page: a gradient, a colour, an image, or nothing. */
538
538
  type VideoBackground = {
539
539
  kind: 'gradient';
540
540
  colors: string[];
@@ -547,7 +547,7 @@ type VideoBackground = {
547
547
  } | {
548
548
  kind: 'none';
549
549
  };
550
- /** Intro und Outro. `hold_result` haelt das letzte Bild statt einer Karte. */
550
+ /** Intro and outro. `hold_result` holds the last frame instead of a card. */
551
551
  type VideoCard = {
552
552
  style: 'title_card';
553
553
  seconds: number;
@@ -555,7 +555,7 @@ type VideoCard = {
555
555
  style: 'hold_result';
556
556
  seconds: number;
557
557
  };
558
- /** Wohin das fertige Video geht. */
558
+ /** Where the finished video goes. */
559
559
  type VideoDestination = {
560
560
  kind: 'local';
561
561
  } | {
@@ -564,7 +564,7 @@ type VideoDestination = {
564
564
  download: boolean;
565
565
  passcode: boolean;
566
566
  };
567
- /** Eine Zusatz-Ausgabe mit eigenen Massen. Objekte, nie blosse Strings. */
567
+ /** An additional output with its own dimensions. Objects, never bare strings. */
568
568
  interface ExtraOutput {
569
569
  preset: ExportPresetName;
570
570
  width?: number | null;
@@ -573,16 +573,16 @@ interface ExtraOutput {
573
573
  colors?: number | null;
574
574
  max_bytes?: number | null;
575
575
  }
576
- /** Hintergrundmusik, per Medien-Id, mit dem Pegel. */
576
+ /** Background music, by media id, with its level. */
577
577
  interface MusicBed {
578
578
  media_id: string;
579
579
  gain_db: number;
580
580
  }
581
581
  /**
582
- * Das Rezept eines Videos: alles ueber die FORM, nichts ueber den Inhalt.
582
+ * The recipe of a video: everything about the FORM, nothing about the content.
583
583
  *
584
- * Schritte, Laenge, Titel und Sprechtext kommen aus dem Auftrag, nie von hier
585
- * (AC-CTL-001); das einzige freie Textfeld ist `ai_label.text`.
584
+ * Steps, length, title and narration come from the request, never from here;
585
+ * the only free text field is `ai_label.text`.
586
586
  */
587
587
  interface VideoPresetConfig {
588
588
  output: {
@@ -602,7 +602,7 @@ interface VideoPresetConfig {
602
602
  scale: number;
603
603
  style: 'arrow_dark' | 'arrow_light' | 'dot' | 'touch';
604
604
  click: 'ripple' | 'ring' | 'none';
605
- /** `null` haelt den Zeiger fuer immer sichtbar. */
605
+ /** `null` keeps the pointer visible forever. */
606
606
  hide_after_ms: number | null;
607
607
  loop: boolean;
608
608
  };
@@ -614,7 +614,7 @@ interface VideoPresetConfig {
614
614
  zoom_scope: 'canvas' | 'card';
615
615
  };
616
616
  audio: {
617
- /** `"<anbieter>:<stimme>"` oder `null` fuer ein stummes Video. */
617
+ /** `"<provider>:<voice>"`, or `null` for a silent video. */
618
618
  voice: string | null;
619
619
  language: string;
620
620
  subtitles: 'burned' | 'file' | 'off';
@@ -866,7 +866,7 @@ interface SessionImportBody {
866
866
  bundle: string;
867
867
  }
868
868
  /**
869
- * Trusted-input payload (`POST /v1/profiles/:id/input`, G8, AC-API-003). Only
869
+ * Trusted-input payload (`POST /v1/profiles/:id/input`). Only
870
870
  * `action` and `humanize` are fixed by the API contract; the per-action
871
871
  * coordinate fields below are the SDK's assumption about the daemon's input
872
872
  * layer.
@@ -1218,7 +1218,7 @@ type LifecycleEvent = {
1218
1218
  * notices this connection fell behind. `dropped` counts what it skipped.
1219
1219
  */
1220
1220
  /**
1221
- * The exit-address guard's verdict for one running profile (DEC-017).
1221
+ * The exit-address guard's verdict for one running profile.
1222
1222
  *
1223
1223
  * The whole state, like every other live row here: a display rebuilt from
1224
1224
  * parts is what makes it confidently wrong, and the one frame that matters
@@ -1257,7 +1257,7 @@ type StreamedEvent = LifecycleEvent & {
1257
1257
  };
1258
1258
 
1259
1259
  /**
1260
- * Live lifecycle event stream (`GET /v1/events`, AC-API-003).
1260
+ * Live lifecycle event stream (`GET /v1/events`).
1261
1261
  *
1262
1262
  * Read as `text/event-stream` over `fetch` (so the Bearer header is attached, which
1263
1263
  * the browser `EventSource` cannot do that) and reconnect with backoff. A
@@ -1417,7 +1417,7 @@ interface Account {
1417
1417
  * machine connected to an account"; `signed_in` does. */
1418
1418
  licensed: boolean;
1419
1419
  /** Whether an account is connected to this machine. One without an account
1420
- * starts no browser (DEC-014). */
1420
+ * starts no browser. */
1421
1421
  signed_in: boolean;
1422
1422
  plan?: string;
1423
1423
  status?: string;
@@ -1482,7 +1482,7 @@ interface ExitRuleStatus {
1482
1482
  interface ScalebrowserClientOptions {
1483
1483
  /** Daemon base URL. Default `http://127.0.0.1:8787`. */
1484
1484
  baseUrl?: string;
1485
- /** Bearer token (AC-API-002). */
1485
+ /** Bearer token. */
1486
1486
  token?: string | null;
1487
1487
  /** Injectable `fetch` (for testing / custom agents). Default `globalThis.fetch`. */
1488
1488
  fetch?: FetchLike;
@@ -1638,7 +1638,7 @@ interface CreateProfileBody {
1638
1638
  */
1639
1639
  type UpdateProfileBody = Omit<Partial<CreateProfileBody>, "seed" | "persona_country"> & {
1640
1640
  /**
1641
- * Turn the exit-address rule off for this profile (DEC-017). Deliberately not
1641
+ * Turn the exit-address rule off for this profile. Deliberately not
1642
1642
  * part of `CreateProfileBody`: a new profile always claims its address, and
1643
1643
  * switching that off is a later, deliberate act for a setup that needs it.
1644
1644
  */
@@ -1652,7 +1652,7 @@ interface StartProfileResult {
1652
1652
  cdp_ws: string;
1653
1653
  /** DevTools TCP port, parsed from `cdp_ws` (`null` if the URL has none). */
1654
1654
  debug_port: number | null;
1655
- /** Effective headless state of this launch (AC-OR-005). */
1655
+ /** Effective headless state of this launch. */
1656
1656
  headless: boolean;
1657
1657
  pid: number | null;
1658
1658
  started_at: number;
@@ -1704,7 +1704,7 @@ type UpdateProxyBody = Partial<CreateProxyBody>;
1704
1704
  * Result of `POST /v1/proxies/:id/check` (health + geo).
1705
1705
  *
1706
1706
  * CONTRACT ASSUMPTION: the daemon returns the freshly-checked exit identity plus
1707
- * the JA4↔JA4T coherence verdict (AC-FP-011). Fields beyond the persisted `Proxy`
1707
+ * the JA4↔JA4T coherence verdict. Fields beyond the persisted `Proxy`
1708
1708
  * columns (`ja4`, `ja4t`, `ja4t_mismatch`, `warnings`) are optional; if the
1709
1709
  * daemon only echoes the updated `Proxy`, the JA4 verdict is simply absent.
1710
1710
  */
@@ -2425,7 +2425,7 @@ declare class VideosApi extends ClientCore {
2425
2425
  }
2426
2426
 
2427
2427
  /**
2428
- * Direct-CDP driver (DEC-006, AC-FP-005): a minimal, nodriver-style Chrome
2428
+ * Direct-CDP driver: a minimal, nodriver-style Chrome
2429
2429
  * DevTools Protocol client over a raw websocket. This is the recommended SDK
2430
2430
  * driver plane: it is NOT the Playwright/Puppeteer control plane (which is a
2431
2431
  * detection vector independent of patch quality). We never call `Runtime.enable`
@@ -2565,7 +2565,7 @@ interface CdpConnectOptions {
2565
2565
  declare function openCdpSession(url: string, options?: CdpConnectOptions): Promise<CdpSession>;
2566
2566
 
2567
2567
  /**
2568
- * Dashboard/SDK metrics (AC-UI-002, M3). The daemon serves `GET /v1/metrics`
2568
+ * Dashboard/SDK metrics. The daemon serves `GET /v1/metrics`
2569
2569
  * from a background sampler; each null-able figure is disambiguated by
2570
2570
  * {@link Metrics.availability} (`measured` vs `unsupported` vs `unavailable`).
2571
2571
  * Against an old daemon without the endpoint (404) the client falls back to
@@ -2827,22 +2827,22 @@ declare const ErrorCode: {
2827
2827
  /** Retired: the removed Methode-D (VM) tier produced this. Reserved (never reused)
2828
2828
  * to match the server's append-only code contract; never returned now. */
2829
2829
  readonly VmProvisionFailed: 4007;
2830
- /** The subscription's abo-wide concurrent-browser allowance is used up (DEC-012).
2830
+ /** The subscription's abo-wide concurrent-browser allowance is used up.
2831
2831
  * Distinct from Capacity (4003 = this machine is full, wait): the caller's move
2832
2832
  * is to stop a running browser anywhere or upgrade the plan. */
2833
2833
  readonly ConcurrencyLimit: 4008;
2834
2834
  readonly Unauthorized: 4010;
2835
- /** No account is connected to this machine, so nothing may run (DEC-014).
2835
+ /** No account is connected to this machine, so nothing may run.
2836
2836
  * Distinct from Unauthorized (4010 = the daemon's own bearer token is wrong, so
2837
2837
  * re-read the token): 4011 means the machine needs to be signed in, and no token
2838
2838
  * a client holds can substitute for that. Connect it in the desktop app. */
2839
2839
  readonly NotSignedIn: 4011;
2840
- /** This ONE profile is open on another machine of the same account (DEC-015).
2840
+ /** This ONE profile is open on another machine of the same account.
2841
2841
  * Distinct from ConcurrencyLimit (4008 = the plan is full, buy more or free any
2842
2842
  * browser): the caller's move here costs nothing. Close it on that machine, or
2843
2843
  * take it over from the app running there. */
2844
2844
  readonly ProfileInUse: 4012;
2845
- /** The exit address this start drew belongs to another profile (DEC-017).
2845
+ /** The exit address this start drew belongs to another profile.
2846
2846
  * Distinct from ProxyGeo (4002 = wrong country or wrong kind of exit, so change
2847
2847
  * the proxy): here the proxy is fine and the address is simply spoken for. Wait
2848
2848
  * for a term to run out, let the daemon draw again, or turn exclusivity off for
@@ -2891,7 +2891,7 @@ declare function errorMessage(err: unknown): string;
2891
2891
  /**
2892
2892
  * `@scalebrowser/sdk`: the official Node/TypeScript SDK for the Scalebrowser
2893
2893
  * daemon. A typed REST client plus a direct-CDP driver plane (nodriver-style,
2894
- * NOT Playwright, DEC-006).
2894
+ * NOT Playwright).
2895
2895
  *
2896
2896
  * ```ts
2897
2897
  * import { ScalebrowserClient } from '@scalebrowser/sdk';
@@ -2905,6 +2905,6 @@ declare function errorMessage(err: unknown): string;
2905
2905
  * ```
2906
2906
  */
2907
2907
 
2908
- declare const VERSION = "0.9.0";
2908
+ declare const VERSION = "1.0.0";
2909
2909
 
2910
2910
  export { type Account, type ActivitySnapshot, type AgentRun, ApiError, type ApiErrorBody, type ArtifactBytes, type ArtifactPutResult, type AttachOptions, type AudioStatus, type AuditDetectorReport, type AuditReport, type AuditStatus, type AuditVerdict, type BindInboxBody, type BlockedExport, type CdpConnectOptions, CdpError, type CdpEvent, CdpSession, type Chapter, type ClickOptions, type CodecsStatus, type Connection, type CreateGroupBody, type CreateInboxBody, type CreatePresetBody, type CreateTasksBody, type CreateTasksResult, DEFAULT_CAPACITY, type DeleteInterruptionRuleParams, type EffectiveInterruptionLock, ErrorCode, type ErrorCodeValue, type EvaluateOptions, type ExitClaim, type ExitRuleStatus, type ExitScope, type ExitStatus, type ExportPresetName, type ExtraOutput, type FetchLike, GEO_MODES, type GeoMode, type GoalSource, type Group, type HealthStatus, type Inbox, type InboxBinding, type InboxBindings, type InboxChannel, type InputClient, type InterruptionChoice, type InterruptionLock, type InterruptionLockRow, type InterruptionLockView, type InterruptionRuleRow, type LaunchHandle, type ListRunsParams, type ListStepsParams, type ListTasksParams, type ListVideosParams, type MediaAsset, type MediaKind, type MusicBed, type NarrationLine, type NavigateOptions, NetworkError, type OsFamily, type OutcomeSource, PROXY_KINDS, type PasskeyRow, type PatchTaskBody, type PersonaConstraintOptions, type Preset, type PresetConfig, type PresetConstraints, type PreviewHidden, type PreviewMoment, type Profile, type ProfileActivity, type ProfileMemory, type ProfileTask, type ProtectionLevel, type ProtectionStatus, type Proxy, type ProxyKind, type ProxyRow, type ProxyUsage, ROTATIONS, RUNTIME_STATES, type ReadyStatus, type Recording, type RecordingKind, type RecordingState, type RemoteStatus, type RenderProgress, type RenderRequestBody, type RenderStage, type RevealCookiesBody, type RevealCookiesResult, type RevealedCookie, type Rotation, type RunActor, type RunOutcome, type RunStep, type RuntimeState, ScalebrowserClient, type ScalebrowserClientOptions, ScalebrowserError, type ScrollOptions, type SecretBindingMode, type SecretDeleteResult, type SecretKind, type SecretListResult, type SecretOrigin, type SecretPatchBody, type SecretRow, type SecretRunBody, type SecretRunMention, type SecretRunResult, type SecretScrubResult, type SecretState, type SessionExportBody, type SessionExportResult, type SessionImportBody, type SessionKind, type SetInterruptionLockBody, type SetInterruptionRuleBody, type ShareLinkLocal, type ShareStatus, type ShotFocus, type ShotIntent, type StepKind, type StepTarget, type StreamHandlers, type StreamParams, type StreamStatus, type TaskState, type TimestampState, type TranscriptWord, type TrustedInputBody, type TtsProviderView, type TtsVerifyResult, type UpdateGroupBody, type UpdateInboxBody, type UpdatePresetBody, VERSION, type Video, type VideoAccessGrant, type VideoAssetName, type VideoAssets, type VideoBackground, type VideoCard, type VideoDestination, type VideoFlags, type VideoPreset, type VideoPresetClip, type VideoPresetClipBody, type VideoPresetClipProgress, type VideoPresetClipStarted, type VideoPresetConfig, type VideoPresetPreview, type VideoPresetPreviewBody, type VideoState, type VideosPage, type VideosStorage, type WriteMemoryBody, deriveMetricsFromProfiles, errorMessage, eventStream, openCdpSession, parseSseFrame, subscribeEvents };
package/dist/index.js CHANGED
@@ -11,22 +11,22 @@ var ErrorCode = {
11
11
  /** Retired: the removed Methode-D (VM) tier produced this. Reserved (never reused)
12
12
  * to match the server's append-only code contract; never returned now. */
13
13
  VmProvisionFailed: 4007,
14
- /** The subscription's abo-wide concurrent-browser allowance is used up (DEC-012).
14
+ /** The subscription's abo-wide concurrent-browser allowance is used up.
15
15
  * Distinct from Capacity (4003 = this machine is full, wait): the caller's move
16
16
  * is to stop a running browser anywhere or upgrade the plan. */
17
17
  ConcurrencyLimit: 4008,
18
18
  Unauthorized: 4010,
19
- /** No account is connected to this machine, so nothing may run (DEC-014).
19
+ /** No account is connected to this machine, so nothing may run.
20
20
  * Distinct from Unauthorized (4010 = the daemon's own bearer token is wrong, so
21
21
  * re-read the token): 4011 means the machine needs to be signed in, and no token
22
22
  * a client holds can substitute for that. Connect it in the desktop app. */
23
23
  NotSignedIn: 4011,
24
- /** This ONE profile is open on another machine of the same account (DEC-015).
24
+ /** This ONE profile is open on another machine of the same account.
25
25
  * Distinct from ConcurrencyLimit (4008 = the plan is full, buy more or free any
26
26
  * browser): the caller's move here costs nothing. Close it on that machine, or
27
27
  * take it over from the app running there. */
28
28
  ProfileInUse: 4012,
29
- /** The exit address this start drew belongs to another profile (DEC-017).
29
+ /** The exit address this start drew belongs to another profile.
30
30
  * Distinct from ProxyGeo (4002 = wrong country or wrong kind of exit, so change
31
31
  * the proxy): here the proxy is fine and the address is simply spoken for. Wait
32
32
  * for a term to run out, let the daemon draw again, or turn exclusivity off for
@@ -1211,7 +1211,7 @@ var CdpSession = class _CdpSession {
1211
1211
  });
1212
1212
  return executionContextId;
1213
1213
  }
1214
- // ── Humanized trusted input (routes through the daemon, G8) ────────────────
1214
+ // ── Humanized trusted input (routes through the daemon) ────────────────────
1215
1215
  humanizeMove(x, y, opts = {}) {
1216
1216
  return this.#input({ action: "move", x, y, width: opts.width });
1217
1217
  }
@@ -1589,7 +1589,7 @@ var ScalebrowserClient = class extends ClientCore {
1589
1589
  signal
1590
1590
  });
1591
1591
  }
1592
- // ── Exit-address exclusivity (DEC-017) ──────────────────────────────────────
1592
+ // ── Exit-address exclusivity ────────────────────────────────────────────────
1593
1593
  /** Which exit addresses this profile owns, and how far the rule reaches.
1594
1594
  *
1595
1595
  * `scope` is `'machine'` while this computer has no account key. That is the
@@ -1601,14 +1601,14 @@ var ScalebrowserClient = class extends ClientCore {
1601
1601
  signal
1602
1602
  });
1603
1603
  }
1604
- // ── Session bundles (AC-ST-002/003) ─────────────────────────────────────────
1604
+ // ── Session bundles ─────────────────────────────────────────────────────────
1605
1605
  exportSession(profileId, body) {
1606
1606
  return this.request("POST", `/v1/profiles/${enc(profileId)}/session/export`, body);
1607
1607
  }
1608
1608
  importSession(profileId, body) {
1609
1609
  return this.request("POST", `/v1/profiles/${enc(profileId)}/session/import`, body);
1610
1610
  }
1611
- // ── Trusted input (G8, AC-API-003) ─────────────────────────────────────────
1611
+ // ── Trusted input ──────────────────────────────────────────────────────────
1612
1612
  sendInput(profileId, body) {
1613
1613
  return this.request("POST", `/v1/profiles/${enc(profileId)}/input`, body);
1614
1614
  }
@@ -1732,6 +1732,6 @@ var PROXY_KINDS = ["http", "socks5", "gateway"];
1732
1732
  var ROTATIONS = ["sticky", "rotating"];
1733
1733
 
1734
1734
  // src/index.ts
1735
- var VERSION = "0.9.0";
1735
+ var VERSION = "1.0.0";
1736
1736
 
1737
1737
  export { ApiError, CdpError, CdpSession, DEFAULT_CAPACITY, ErrorCode, GEO_MODES, NetworkError, PROXY_KINDS, ROTATIONS, RUNTIME_STATES, ScalebrowserClient, ScalebrowserError, VERSION, deriveMetricsFromProfiles, errorMessage, eventStream, openCdpSession, parseSseFrame, subscribeEvents };
package/package.json CHANGED
@@ -1,14 +1,13 @@
1
1
  {
2
2
  "name": "@scalebrowser/sdk",
3
- "version": "0.9.0",
3
+ "version": "1.0.0",
4
4
  "description": "Official Node/TypeScript SDK for the Scalebrowser daemon: typed REST client plus a direct-CDP driver plane (nodriver-style, not Playwright).",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "homepage": "https://scalebrowser.net",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "git+https://github.com/blackdiamond-labs/scalebrowser.git",
11
- "directory": "sdks/node"
10
+ "url": "git+https://github.com/blackdiamond-labs/scalebrowser-node.git"
12
11
  },
13
12
  "bugs": {
14
13
  "email": "support@scalebrowser.net"