@scalebrowser/sdk 0.5.0 → 0.6.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/dist/index.cjs CHANGED
@@ -1600,6 +1600,21 @@ var ScalebrowserClient = class extends ClientCore {
1600
1600
  throw err;
1601
1601
  }
1602
1602
  }
1603
+ // ── Remote access (the machine's own switch) ────────────────────────────────
1604
+ /**
1605
+ * Is remote access on for this machine?
1606
+ *
1607
+ * The switch is deliberately local: a chat service reaches this browser only
1608
+ * once somebody at the machine has turned it on. On a headless install there
1609
+ * is no UI to click, which is why it is here as well.
1610
+ */
1611
+ async getRemoteAccess(signal) {
1612
+ return this.request("GET", "/v1/remote", void 0, { signal });
1613
+ }
1614
+ /** Turn remote access on or off for this machine. */
1615
+ async setRemoteAccess(enabled, signal) {
1616
+ return this.request("PUT", "/v1/remote", { enabled }, { signal });
1617
+ }
1603
1618
  // ── Events (SSE) ───────────────────────────────────────────────────────────
1604
1619
  /** Subscribe to lifecycle events. Returns an unsubscribe function. */
1605
1620
  subscribeEvents(handlers) {
@@ -1674,7 +1689,7 @@ var PROXY_KINDS = ["http", "socks5", "gateway"];
1674
1689
  var ROTATIONS = ["sticky", "rotating"];
1675
1690
 
1676
1691
  // src/index.ts
1677
- var VERSION = "0.5.0";
1692
+ var VERSION = "0.6.0";
1678
1693
 
1679
1694
  exports.ApiError = ApiError;
1680
1695
  exports.CdpError = CdpError;
package/dist/index.d.cts CHANGED
@@ -1332,6 +1332,18 @@ interface ReadyStatus {
1332
1332
  * launch-time question the preflight answers properly. */
1333
1333
  engines_dir: string;
1334
1334
  }
1335
+ /** What `GET /v1/remote` answers: the machine's own remote-access switch. */
1336
+ interface RemoteStatus {
1337
+ /** Is remote access on? */
1338
+ enabled: boolean;
1339
+ /** Did a person decide this, or is the configured default still standing? */
1340
+ explicit: boolean;
1341
+ /** The relay the tunnel goes to. */
1342
+ relay_url: string;
1343
+ /** Without a control-plane session there is no ticket and so no tunnel,
1344
+ * whatever the switch says. */
1345
+ ready: boolean;
1346
+ }
1335
1347
 
1336
1348
  interface ScalebrowserClientOptions {
1337
1349
  /** Daemon base URL. Default `http://127.0.0.1:8787`. */
@@ -2527,6 +2539,16 @@ declare class ScalebrowserClient extends ClientCore {
2527
2539
  importSession(profileId: string, body: SessionImportBody): Promise<unknown>;
2528
2540
  sendInput(profileId: string, body: TrustedInputBody): Promise<unknown>;
2529
2541
  getMetrics(signal?: AbortSignal): Promise<Metrics>;
2542
+ /**
2543
+ * Is remote access on for this machine?
2544
+ *
2545
+ * The switch is deliberately local: a chat service reaches this browser only
2546
+ * once somebody at the machine has turned it on. On a headless install there
2547
+ * is no UI to click, which is why it is here as well.
2548
+ */
2549
+ getRemoteAccess(signal?: AbortSignal): Promise<RemoteStatus>;
2550
+ /** Turn remote access on or off for this machine. */
2551
+ setRemoteAccess(enabled: boolean, signal?: AbortSignal): Promise<RemoteStatus>;
2530
2552
  /** Subscribe to lifecycle events. Returns an unsubscribe function. */
2531
2553
  subscribeEvents(handlers: StreamHandlers): () => void;
2532
2554
  /** `for await (const event of client.events())` over lifecycle events. */
@@ -2639,6 +2661,6 @@ declare function errorMessage(err: unknown): string;
2639
2661
  * ```
2640
2662
  */
2641
2663
 
2642
- declare const VERSION = "0.5.0";
2664
+ declare const VERSION = "0.6.0";
2643
2665
 
2644
- 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 CdpConnectOptions, CdpError, type CdpEvent, CdpSession, type Chapter, type ClickOptions, type CodecsStatus, type CreateGroupBody, type CreateInboxBody, type CreatePresetBody, type CreateTasksBody, type CreateTasksResult, DEFAULT_CAPACITY, type DeleteInterruptionRuleParams, type EffectiveInterruptionLock, ErrorCode, type ErrorCodeValue, type EvaluateOptions, type ExitClaim, type ExitScope, type ExitStatus, type ExportPresetName, type ExtraOutput, type FetchLike, GEO_MODES, type GeoMode, type GoalSource, type Group, HOST_MODES, type HealthStatus, type HostMode, 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, ROTATIONS, RUNTIME_STATES, type ReadyStatus, type Recording, type RecordingKind, type RecordingState, 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 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 };
2666
+ 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 CdpConnectOptions, CdpError, type CdpEvent, CdpSession, type Chapter, type ClickOptions, type CodecsStatus, type CreateGroupBody, type CreateInboxBody, type CreatePresetBody, type CreateTasksBody, type CreateTasksResult, DEFAULT_CAPACITY, type DeleteInterruptionRuleParams, type EffectiveInterruptionLock, ErrorCode, type ErrorCodeValue, type EvaluateOptions, type ExitClaim, type ExitScope, type ExitStatus, type ExportPresetName, type ExtraOutput, type FetchLike, GEO_MODES, type GeoMode, type GoalSource, type Group, HOST_MODES, type HealthStatus, type HostMode, 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, 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 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
@@ -1332,6 +1332,18 @@ interface ReadyStatus {
1332
1332
  * launch-time question the preflight answers properly. */
1333
1333
  engines_dir: string;
1334
1334
  }
1335
+ /** What `GET /v1/remote` answers: the machine's own remote-access switch. */
1336
+ interface RemoteStatus {
1337
+ /** Is remote access on? */
1338
+ enabled: boolean;
1339
+ /** Did a person decide this, or is the configured default still standing? */
1340
+ explicit: boolean;
1341
+ /** The relay the tunnel goes to. */
1342
+ relay_url: string;
1343
+ /** Without a control-plane session there is no ticket and so no tunnel,
1344
+ * whatever the switch says. */
1345
+ ready: boolean;
1346
+ }
1335
1347
 
1336
1348
  interface ScalebrowserClientOptions {
1337
1349
  /** Daemon base URL. Default `http://127.0.0.1:8787`. */
@@ -2527,6 +2539,16 @@ declare class ScalebrowserClient extends ClientCore {
2527
2539
  importSession(profileId: string, body: SessionImportBody): Promise<unknown>;
2528
2540
  sendInput(profileId: string, body: TrustedInputBody): Promise<unknown>;
2529
2541
  getMetrics(signal?: AbortSignal): Promise<Metrics>;
2542
+ /**
2543
+ * Is remote access on for this machine?
2544
+ *
2545
+ * The switch is deliberately local: a chat service reaches this browser only
2546
+ * once somebody at the machine has turned it on. On a headless install there
2547
+ * is no UI to click, which is why it is here as well.
2548
+ */
2549
+ getRemoteAccess(signal?: AbortSignal): Promise<RemoteStatus>;
2550
+ /** Turn remote access on or off for this machine. */
2551
+ setRemoteAccess(enabled: boolean, signal?: AbortSignal): Promise<RemoteStatus>;
2530
2552
  /** Subscribe to lifecycle events. Returns an unsubscribe function. */
2531
2553
  subscribeEvents(handlers: StreamHandlers): () => void;
2532
2554
  /** `for await (const event of client.events())` over lifecycle events. */
@@ -2639,6 +2661,6 @@ declare function errorMessage(err: unknown): string;
2639
2661
  * ```
2640
2662
  */
2641
2663
 
2642
- declare const VERSION = "0.5.0";
2664
+ declare const VERSION = "0.6.0";
2643
2665
 
2644
- 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 CdpConnectOptions, CdpError, type CdpEvent, CdpSession, type Chapter, type ClickOptions, type CodecsStatus, type CreateGroupBody, type CreateInboxBody, type CreatePresetBody, type CreateTasksBody, type CreateTasksResult, DEFAULT_CAPACITY, type DeleteInterruptionRuleParams, type EffectiveInterruptionLock, ErrorCode, type ErrorCodeValue, type EvaluateOptions, type ExitClaim, type ExitScope, type ExitStatus, type ExportPresetName, type ExtraOutput, type FetchLike, GEO_MODES, type GeoMode, type GoalSource, type Group, HOST_MODES, type HealthStatus, type HostMode, 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, ROTATIONS, RUNTIME_STATES, type ReadyStatus, type Recording, type RecordingKind, type RecordingState, 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 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 };
2666
+ 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 CdpConnectOptions, CdpError, type CdpEvent, CdpSession, type Chapter, type ClickOptions, type CodecsStatus, type CreateGroupBody, type CreateInboxBody, type CreatePresetBody, type CreateTasksBody, type CreateTasksResult, DEFAULT_CAPACITY, type DeleteInterruptionRuleParams, type EffectiveInterruptionLock, ErrorCode, type ErrorCodeValue, type EvaluateOptions, type ExitClaim, type ExitScope, type ExitStatus, type ExportPresetName, type ExtraOutput, type FetchLike, GEO_MODES, type GeoMode, type GoalSource, type Group, HOST_MODES, type HealthStatus, type HostMode, 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, 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 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
@@ -1594,6 +1594,21 @@ var ScalebrowserClient = class extends ClientCore {
1594
1594
  throw err;
1595
1595
  }
1596
1596
  }
1597
+ // ── Remote access (the machine's own switch) ────────────────────────────────
1598
+ /**
1599
+ * Is remote access on for this machine?
1600
+ *
1601
+ * The switch is deliberately local: a chat service reaches this browser only
1602
+ * once somebody at the machine has turned it on. On a headless install there
1603
+ * is no UI to click, which is why it is here as well.
1604
+ */
1605
+ async getRemoteAccess(signal) {
1606
+ return this.request("GET", "/v1/remote", void 0, { signal });
1607
+ }
1608
+ /** Turn remote access on or off for this machine. */
1609
+ async setRemoteAccess(enabled, signal) {
1610
+ return this.request("PUT", "/v1/remote", { enabled }, { signal });
1611
+ }
1597
1612
  // ── Events (SSE) ───────────────────────────────────────────────────────────
1598
1613
  /** Subscribe to lifecycle events. Returns an unsubscribe function. */
1599
1614
  subscribeEvents(handlers) {
@@ -1668,6 +1683,6 @@ var PROXY_KINDS = ["http", "socks5", "gateway"];
1668
1683
  var ROTATIONS = ["sticky", "rotating"];
1669
1684
 
1670
1685
  // src/index.ts
1671
- var VERSION = "0.5.0";
1686
+ var VERSION = "0.6.0";
1672
1687
 
1673
1688
  export { ApiError, CdpError, CdpSession, DEFAULT_CAPACITY, ErrorCode, GEO_MODES, HOST_MODES, NetworkError, PROXY_KINDS, ROTATIONS, RUNTIME_STATES, ScalebrowserClient, ScalebrowserError, VERSION, deriveMetricsFromProfiles, errorMessage, eventStream, openCdpSession, parseSseFrame, subscribeEvents };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalebrowser/sdk",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Official Node/TypeScript SDK for the Scalebrowser daemon — typed REST client + direct-CDP driver plane (nodriver-style, not Playwright).",
5
5
  "type": "module",
6
6
  "license": "MIT",