ppio-sandbox 2.0.4-a2 → 2.1.0-a2

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.
@@ -1,95 +1,6 @@
1
- import { S as Sandbox$1, D as SandboxOpts$1, u as CommandResult } from './index-CBdou_ua.mjs';
2
- export { ag as ALL_TRAFFIC, A as ApiClient, b as AuthenticationError, B as BuildError, aY as BuildInfo, aZ as BuildOptions, a_ as BuildStatusReason, aj as CommandConnectOpts, t as CommandExitError, x as CommandHandle, ai as CommandRequestOpts, ak as CommandStartOpts, al as Commands, C as ConnectionConfig, a as ConnectionOpts, a$ as CopyItem, E as EntryInfo, F as FileNotFoundError, l as FileType, i as FileUploadError, m as Filesystem, r as FilesystemEvent, q as FilesystemEventType, o as FilesystemReadOpts, n as FilesystemWriteOpts, b0 as GetBuildStatusOptions, an as Git, at as GitAddOpts, G as GitAuthError, aA as GitBranches, ap as GitCloneOpts, as as GitCommitOpts, ay as GitConfigOpts, az as GitConfigScope, ax as GitDangerouslyAuthenticateOpts, au as GitDeleteBranchOpts, aB as GitFileStatus, aq as GitInitOpts, aw as GitPullOpts, av as GitPushOpts, ar as GitRemoteAddOpts, ao as GitRequestOpts, aC as GitStatus, d as GitUpstreamError, I as InvalidArgumentError, aP as LogEntry, aR as LogEntryEnd, aS as LogEntryLevel, aQ as LogEntryStart, L as Logger, af as McpServer, b1 as McpServerName, N as NotEnoughSpaceError, e as NotFoundError, ah as ProcessInfo, am as Pty, P as PtyOutput, R as RateLimitError, aJ as ReadyCmd, H as SandboxApiOpts, K as SandboxBetaCreateOpts, O as SandboxCloneOpts, Q as SandboxCloneResult, X as SandboxCommitOpts, Y as SandboxCommitResult, J as SandboxConnectOpts, f as SandboxError, ac as SandboxEventItem, ad as SandboxEventsOpts, ae as SandboxEventsResult, y as SandboxInfo, a4 as SandboxInfoLifecycle, a3 as SandboxLifecycle, $ as SandboxListOpts, z as SandboxMetrics, M as SandboxMetricsOpts, a1 as SandboxNetworkOpts, a2 as SandboxNetworkUpdateOpts, g as SandboxNotFoundError, a0 as SandboxPaginator, a8 as SandboxQuota, a9 as SandboxQuotaLimit, ab as SandboxQuotaOpts, aa as SandboxQuotaUsage, Z as SandboxResetOpts, _ as SandboxState, aG as Secret, aH as SecretBinding, j as SecretError, aI as SecretWriteParams, a5 as SnapshotInfo, a6 as SnapshotListOpts, a7 as SnapshotPaginator, w as Stderr, v as Stdout, aX as Template, aU as TemplateApi, aW as TemplateBase, b3 as TemplateBuildStatus, b4 as TemplateBuildStatusResponse, b2 as TemplateBuilder, b5 as TemplateClass, b6 as TemplateDeleteOpts, T as TemplateError, b7 as TemplateInfo, b9 as TemplateListOptions, b8 as TemplateListOpts, ba as TemplateListResponse, aV as TemplatePaginator, bb as TemplateTag, bc as TemplateTagInfo, bd as TemplateType, h as TimeoutError, U as Username, aD as Volume, aF as VolumeAndToken, V as VolumeError, aE as VolumeInfo, s as WatchHandle, W as WriteInfo, c as components, aT as defaultBuildLogger, k as getSignature, p as paths, aN as waitForFile, aK as waitForPort, aM as waitForProcess, aO as waitForTimeout, aL as waitForURL } from './index-CBdou_ua.mjs';
1
+ export { ah as ALL_TRAFFIC, A as ApiClient, b as AuthenticationError, B as BuildError, b4 as BuildInfo, b5 as BuildOptions, b6 as BuildStatusReason, ak as CommandConnectOpts, t as CommandExitError, y as CommandHandle, aj as CommandRequestOpts, u as CommandResult, al as CommandStartOpts, am as Commands, C as ConnectionConfig, a as ConnectionOpts, b7 as CopyItem, E as EntryInfo, F as FileNotFoundError, l as FileType, i as FileUploadError, m as Filesystem, r as FilesystemEvent, q as FilesystemEventType, o as FilesystemReadOpts, n as FilesystemWriteOpts, b8 as GetBuildStatusOptions, ao as Git, au as GitAddOpts, G as GitAuthError, aB as GitBranches, aq as GitCloneOpts, at as GitCommitOpts, az as GitConfigOpts, aA as GitConfigScope, ay as GitDangerouslyAuthenticateOpts, av as GitDeleteBranchOpts, aC as GitFileStatus, ar as GitInitOpts, ax as GitPullOpts, aw as GitPushOpts, as as GitRemoteAddOpts, ap as GitRequestOpts, aD as GitStatus, d as GitUpstreamError, aV as ImageConfig, I as InvalidArgumentError, aQ as LogEntry, aS as LogEntryEnd, aT as LogEntryLevel, aR as LogEntryStart, L as Logger, ag as McpServer, b9 as McpServerName, N as NotEnoughSpaceError, e as NotFoundError, P as PPIO, ai as ProcessInfo, an as Pty, x as PtyOutput, R as RateLimitError, aK as ReadyCmd, aW as RegistryCredentials, bM as Sandbox, J as SandboxApiOpts, M as SandboxBetaCreateOpts, Q as SandboxCloneOpts, X as SandboxCloneResult, Y as SandboxCommitOpts, Z as SandboxCommitResult, K as SandboxConnectOpts, f as SandboxError, ad as SandboxEventItem, ae as SandboxEventsOpts, af as SandboxEventsResult, z as SandboxInfo, a5 as SandboxInfoLifecycle, a4 as SandboxLifecycle, a0 as SandboxListOpts, D as SandboxMetrics, O as SandboxMetricsOpts, a2 as SandboxNetworkOpts, a3 as SandboxNetworkUpdateOpts, g as SandboxNotFoundError, H as SandboxOpts, a1 as SandboxPaginator, a9 as SandboxQuota, aa as SandboxQuotaLimit, ac as SandboxQuotaOpts, ab as SandboxQuotaUsage, _ as SandboxResetOpts, $ as SandboxState, aH as Secret, aI as SecretBinding, j as SecretError, aJ as SecretWriteParams, a6 as SnapshotInfo, a7 as SnapshotListOpts, a8 as SnapshotPaginator, w as Stderr, v as Stdout, b3 as Template, b0 as TemplateApi, b2 as TemplateBase, bb as TemplateBuildStatus, bc as TemplateBuildStatusResponse, ba as TemplateBuilder, bd as TemplateClass, be as TemplateDeleteOpts, T as TemplateError, bf as TemplateInfo, bh as TemplateListOptions, bg as TemplateListOpts, bi as TemplateListResponse, b1 as TemplatePaginator, bj as TemplateTag, bk as TemplateTagInfo, bl as TemplateType, h as TimeoutError, U as Username, aE as Volume, aG as VolumeAndToken, V as VolumeError, aF as VolumeInfo, s as WatchHandle, W as WriteInfo, aX as clearImageConfigCache, c as components, aU as defaultBuildLogger, aY as effectiveStartCmd, aZ as fetchImageConfig, k as getSignature, a_ as parseImageRef, p as paths, a$ as unsupportedBase, aO as waitForFile, aL as waitForPort, aN as waitForProcess, aP as waitForTimeout, aM as waitForURL } from './index-CRwaZUdl.mjs';
3
2
  import 'openapi-fetch';
3
+ import 'node:fs';
4
4
  import '@connectrpc/connect';
5
5
  import '@bufbuild/protobuf/codegenv2';
6
6
  import '@bufbuild/protobuf';
7
- import 'node:fs';
8
-
9
- interface CursorPosition {
10
- x: number;
11
- y: number;
12
- }
13
- interface ScreenSize {
14
- width: number;
15
- height: number;
16
- }
17
- interface SandboxOpts extends SandboxOpts$1 {
18
- resolution?: [number, number];
19
- dpi?: number;
20
- display?: string;
21
- }
22
- declare class Sandbox extends Sandbox$1 {
23
- protected static readonly defaultTemplate: string;
24
- private lastXfce4Pid;
25
- display: string;
26
- stream: VNCServer;
27
- constructor(opts: Omit<SandboxOpts, 'timeoutMs' | 'metadata'> & {
28
- sandboxId: string;
29
- envdVersion?: string;
30
- });
31
- static create<S extends typeof Sandbox>(this: S, opts?: SandboxOpts): Promise<InstanceType<S>>;
32
- static create<S extends typeof Sandbox>(this: S, template: string, opts?: SandboxOpts): Promise<InstanceType<S>>;
33
- waitAndVerify(cmd: string, onResult: (result: CommandResult) => boolean, timeout?: number, interval?: number): Promise<boolean>;
34
- private startXfce4;
35
- screenshot(): Promise<Uint8Array>;
36
- screenshot(format: 'bytes'): Promise<Uint8Array>;
37
- screenshot(format: 'blob'): Promise<Blob>;
38
- screenshot(format: 'stream'): Promise<ReadableStream<Uint8Array>>;
39
- leftClick(x?: number, y?: number): Promise<void>;
40
- doubleClick(x?: number, y?: number): Promise<void>;
41
- rightClick(x?: number, y?: number): Promise<void>;
42
- middleClick(x?: number, y?: number): Promise<void>;
43
- scroll(direction?: 'up' | 'down', amount?: number): Promise<void>;
44
- moveMouse(x: number, y: number): Promise<void>;
45
- mousePress(button?: 'left' | 'right' | 'middle'): Promise<void>;
46
- mouseRelease(button?: 'left' | 'right' | 'middle'): Promise<void>;
47
- getCursorPosition(): Promise<CursorPosition>;
48
- getScreenSize(): Promise<ScreenSize>;
49
- private breakIntoChunks;
50
- private quoteString;
51
- write(text: string, options?: {
52
- chunkSize: number;
53
- delayInMs: number;
54
- }): Promise<void>;
55
- press(key: string | string[]): Promise<void>;
56
- drag([x1, y1]: [number, number], [x2, y2]: [number, number]): Promise<void>;
57
- wait(ms: number): Promise<void>;
58
- open(fileOrUrl: string): Promise<void>;
59
- getCurrentWindowId(): Promise<string>;
60
- getApplicationWindows(application: string): Promise<string[]>;
61
- getWindowTitle(windowId: string): Promise<string>;
62
- launch(application: string, uri?: string): Promise<void>;
63
- }
64
- interface VNCServerOptions {
65
- vncPort?: number;
66
- port?: number;
67
- requireAuth?: boolean;
68
- windowId?: string;
69
- }
70
- interface UrlOptions {
71
- autoConnect?: boolean;
72
- viewOnly?: boolean;
73
- resize?: 'off' | 'scale' | 'remote';
74
- authKey?: string;
75
- }
76
- declare class VNCServer {
77
- private vncPort;
78
- private port;
79
- private novncAuthEnabled;
80
- private url;
81
- private novncHandle;
82
- private password;
83
- private readonly novncCommand;
84
- private readonly desktop;
85
- constructor(desktop: Sandbox);
86
- getAuthKey(): string;
87
- private getVNCCommand;
88
- private waitForPort;
89
- private checkVNCRunning;
90
- getUrl({ autoConnect, viewOnly, resize, authKey, }?: UrlOptions): string;
91
- start(opts?: VNCServerOptions): Promise<void>;
92
- stop(): Promise<void>;
93
- }
94
-
95
- export { CommandResult, Sandbox, SandboxOpts$1 as SandboxOpts };
package/dist/desktop.d.ts CHANGED
@@ -1,95 +1,6 @@
1
- import { S as Sandbox$1, D as SandboxOpts$1, u as CommandResult } from './index-CBdou_ua.js';
2
- export { ag as ALL_TRAFFIC, A as ApiClient, b as AuthenticationError, B as BuildError, aY as BuildInfo, aZ as BuildOptions, a_ as BuildStatusReason, aj as CommandConnectOpts, t as CommandExitError, x as CommandHandle, ai as CommandRequestOpts, ak as CommandStartOpts, al as Commands, C as ConnectionConfig, a as ConnectionOpts, a$ as CopyItem, E as EntryInfo, F as FileNotFoundError, l as FileType, i as FileUploadError, m as Filesystem, r as FilesystemEvent, q as FilesystemEventType, o as FilesystemReadOpts, n as FilesystemWriteOpts, b0 as GetBuildStatusOptions, an as Git, at as GitAddOpts, G as GitAuthError, aA as GitBranches, ap as GitCloneOpts, as as GitCommitOpts, ay as GitConfigOpts, az as GitConfigScope, ax as GitDangerouslyAuthenticateOpts, au as GitDeleteBranchOpts, aB as GitFileStatus, aq as GitInitOpts, aw as GitPullOpts, av as GitPushOpts, ar as GitRemoteAddOpts, ao as GitRequestOpts, aC as GitStatus, d as GitUpstreamError, I as InvalidArgumentError, aP as LogEntry, aR as LogEntryEnd, aS as LogEntryLevel, aQ as LogEntryStart, L as Logger, af as McpServer, b1 as McpServerName, N as NotEnoughSpaceError, e as NotFoundError, ah as ProcessInfo, am as Pty, P as PtyOutput, R as RateLimitError, aJ as ReadyCmd, H as SandboxApiOpts, K as SandboxBetaCreateOpts, O as SandboxCloneOpts, Q as SandboxCloneResult, X as SandboxCommitOpts, Y as SandboxCommitResult, J as SandboxConnectOpts, f as SandboxError, ac as SandboxEventItem, ad as SandboxEventsOpts, ae as SandboxEventsResult, y as SandboxInfo, a4 as SandboxInfoLifecycle, a3 as SandboxLifecycle, $ as SandboxListOpts, z as SandboxMetrics, M as SandboxMetricsOpts, a1 as SandboxNetworkOpts, a2 as SandboxNetworkUpdateOpts, g as SandboxNotFoundError, a0 as SandboxPaginator, a8 as SandboxQuota, a9 as SandboxQuotaLimit, ab as SandboxQuotaOpts, aa as SandboxQuotaUsage, Z as SandboxResetOpts, _ as SandboxState, aG as Secret, aH as SecretBinding, j as SecretError, aI as SecretWriteParams, a5 as SnapshotInfo, a6 as SnapshotListOpts, a7 as SnapshotPaginator, w as Stderr, v as Stdout, aX as Template, aU as TemplateApi, aW as TemplateBase, b3 as TemplateBuildStatus, b4 as TemplateBuildStatusResponse, b2 as TemplateBuilder, b5 as TemplateClass, b6 as TemplateDeleteOpts, T as TemplateError, b7 as TemplateInfo, b9 as TemplateListOptions, b8 as TemplateListOpts, ba as TemplateListResponse, aV as TemplatePaginator, bb as TemplateTag, bc as TemplateTagInfo, bd as TemplateType, h as TimeoutError, U as Username, aD as Volume, aF as VolumeAndToken, V as VolumeError, aE as VolumeInfo, s as WatchHandle, W as WriteInfo, c as components, aT as defaultBuildLogger, k as getSignature, p as paths, aN as waitForFile, aK as waitForPort, aM as waitForProcess, aO as waitForTimeout, aL as waitForURL } from './index-CBdou_ua.js';
1
+ export { ah as ALL_TRAFFIC, A as ApiClient, b as AuthenticationError, B as BuildError, b4 as BuildInfo, b5 as BuildOptions, b6 as BuildStatusReason, ak as CommandConnectOpts, t as CommandExitError, y as CommandHandle, aj as CommandRequestOpts, u as CommandResult, al as CommandStartOpts, am as Commands, C as ConnectionConfig, a as ConnectionOpts, b7 as CopyItem, E as EntryInfo, F as FileNotFoundError, l as FileType, i as FileUploadError, m as Filesystem, r as FilesystemEvent, q as FilesystemEventType, o as FilesystemReadOpts, n as FilesystemWriteOpts, b8 as GetBuildStatusOptions, ao as Git, au as GitAddOpts, G as GitAuthError, aB as GitBranches, aq as GitCloneOpts, at as GitCommitOpts, az as GitConfigOpts, aA as GitConfigScope, ay as GitDangerouslyAuthenticateOpts, av as GitDeleteBranchOpts, aC as GitFileStatus, ar as GitInitOpts, ax as GitPullOpts, aw as GitPushOpts, as as GitRemoteAddOpts, ap as GitRequestOpts, aD as GitStatus, d as GitUpstreamError, aV as ImageConfig, I as InvalidArgumentError, aQ as LogEntry, aS as LogEntryEnd, aT as LogEntryLevel, aR as LogEntryStart, L as Logger, ag as McpServer, b9 as McpServerName, N as NotEnoughSpaceError, e as NotFoundError, P as PPIO, ai as ProcessInfo, an as Pty, x as PtyOutput, R as RateLimitError, aK as ReadyCmd, aW as RegistryCredentials, bM as Sandbox, J as SandboxApiOpts, M as SandboxBetaCreateOpts, Q as SandboxCloneOpts, X as SandboxCloneResult, Y as SandboxCommitOpts, Z as SandboxCommitResult, K as SandboxConnectOpts, f as SandboxError, ad as SandboxEventItem, ae as SandboxEventsOpts, af as SandboxEventsResult, z as SandboxInfo, a5 as SandboxInfoLifecycle, a4 as SandboxLifecycle, a0 as SandboxListOpts, D as SandboxMetrics, O as SandboxMetricsOpts, a2 as SandboxNetworkOpts, a3 as SandboxNetworkUpdateOpts, g as SandboxNotFoundError, H as SandboxOpts, a1 as SandboxPaginator, a9 as SandboxQuota, aa as SandboxQuotaLimit, ac as SandboxQuotaOpts, ab as SandboxQuotaUsage, _ as SandboxResetOpts, $ as SandboxState, aH as Secret, aI as SecretBinding, j as SecretError, aJ as SecretWriteParams, a6 as SnapshotInfo, a7 as SnapshotListOpts, a8 as SnapshotPaginator, w as Stderr, v as Stdout, b3 as Template, b0 as TemplateApi, b2 as TemplateBase, bb as TemplateBuildStatus, bc as TemplateBuildStatusResponse, ba as TemplateBuilder, bd as TemplateClass, be as TemplateDeleteOpts, T as TemplateError, bf as TemplateInfo, bh as TemplateListOptions, bg as TemplateListOpts, bi as TemplateListResponse, b1 as TemplatePaginator, bj as TemplateTag, bk as TemplateTagInfo, bl as TemplateType, h as TimeoutError, U as Username, aE as Volume, aG as VolumeAndToken, V as VolumeError, aF as VolumeInfo, s as WatchHandle, W as WriteInfo, aX as clearImageConfigCache, c as components, aU as defaultBuildLogger, aY as effectiveStartCmd, aZ as fetchImageConfig, k as getSignature, a_ as parseImageRef, p as paths, a$ as unsupportedBase, aO as waitForFile, aL as waitForPort, aN as waitForProcess, aP as waitForTimeout, aM as waitForURL } from './index-CRwaZUdl.js';
3
2
  import 'openapi-fetch';
3
+ import 'node:fs';
4
4
  import '@connectrpc/connect';
5
5
  import '@bufbuild/protobuf/codegenv2';
6
6
  import '@bufbuild/protobuf';
7
- import 'node:fs';
8
-
9
- interface CursorPosition {
10
- x: number;
11
- y: number;
12
- }
13
- interface ScreenSize {
14
- width: number;
15
- height: number;
16
- }
17
- interface SandboxOpts extends SandboxOpts$1 {
18
- resolution?: [number, number];
19
- dpi?: number;
20
- display?: string;
21
- }
22
- declare class Sandbox extends Sandbox$1 {
23
- protected static readonly defaultTemplate: string;
24
- private lastXfce4Pid;
25
- display: string;
26
- stream: VNCServer;
27
- constructor(opts: Omit<SandboxOpts, 'timeoutMs' | 'metadata'> & {
28
- sandboxId: string;
29
- envdVersion?: string;
30
- });
31
- static create<S extends typeof Sandbox>(this: S, opts?: SandboxOpts): Promise<InstanceType<S>>;
32
- static create<S extends typeof Sandbox>(this: S, template: string, opts?: SandboxOpts): Promise<InstanceType<S>>;
33
- waitAndVerify(cmd: string, onResult: (result: CommandResult) => boolean, timeout?: number, interval?: number): Promise<boolean>;
34
- private startXfce4;
35
- screenshot(): Promise<Uint8Array>;
36
- screenshot(format: 'bytes'): Promise<Uint8Array>;
37
- screenshot(format: 'blob'): Promise<Blob>;
38
- screenshot(format: 'stream'): Promise<ReadableStream<Uint8Array>>;
39
- leftClick(x?: number, y?: number): Promise<void>;
40
- doubleClick(x?: number, y?: number): Promise<void>;
41
- rightClick(x?: number, y?: number): Promise<void>;
42
- middleClick(x?: number, y?: number): Promise<void>;
43
- scroll(direction?: 'up' | 'down', amount?: number): Promise<void>;
44
- moveMouse(x: number, y: number): Promise<void>;
45
- mousePress(button?: 'left' | 'right' | 'middle'): Promise<void>;
46
- mouseRelease(button?: 'left' | 'right' | 'middle'): Promise<void>;
47
- getCursorPosition(): Promise<CursorPosition>;
48
- getScreenSize(): Promise<ScreenSize>;
49
- private breakIntoChunks;
50
- private quoteString;
51
- write(text: string, options?: {
52
- chunkSize: number;
53
- delayInMs: number;
54
- }): Promise<void>;
55
- press(key: string | string[]): Promise<void>;
56
- drag([x1, y1]: [number, number], [x2, y2]: [number, number]): Promise<void>;
57
- wait(ms: number): Promise<void>;
58
- open(fileOrUrl: string): Promise<void>;
59
- getCurrentWindowId(): Promise<string>;
60
- getApplicationWindows(application: string): Promise<string[]>;
61
- getWindowTitle(windowId: string): Promise<string>;
62
- launch(application: string, uri?: string): Promise<void>;
63
- }
64
- interface VNCServerOptions {
65
- vncPort?: number;
66
- port?: number;
67
- requireAuth?: boolean;
68
- windowId?: string;
69
- }
70
- interface UrlOptions {
71
- autoConnect?: boolean;
72
- viewOnly?: boolean;
73
- resize?: 'off' | 'scale' | 'remote';
74
- authKey?: string;
75
- }
76
- declare class VNCServer {
77
- private vncPort;
78
- private port;
79
- private novncAuthEnabled;
80
- private url;
81
- private novncHandle;
82
- private password;
83
- private readonly novncCommand;
84
- private readonly desktop;
85
- constructor(desktop: Sandbox);
86
- getAuthKey(): string;
87
- private getVNCCommand;
88
- private waitForPort;
89
- private checkVNCRunning;
90
- getUrl({ autoConnect, viewOnly, resize, authKey, }?: UrlOptions): string;
91
- start(opts?: VNCServerOptions): Promise<void>;
92
- stop(): Promise<void>;
93
- }
94
-
95
- export { CommandResult, Sandbox, SandboxOpts$1 as SandboxOpts };