+82
-0
@@ -36,2 +36,3 @@ export type FreestyleOptions = | ||
| idleTimeoutSeconds?: number | null; | ||
| activityThresholdBytes?: number | null; | ||
| persistence?: | | ||
@@ -113,2 +114,4 @@ { type: "persistent" } | | ||
| class Vm { | ||
| readonly pty: VmPty; | ||
| start(options?: { | ||
@@ -170,2 +173,81 @@ idleTimeoutSeconds?: number | ||
| export type PtyServerMsg = | ||
| | { type: "sessionInfo"; sessionId: string } | ||
| | { type: "exited"; exitCode: number }; | ||
| export interface PtySessionInfo { | ||
| sessionId: string; | ||
| running: boolean; | ||
| exitCode?: number | null; | ||
| exitedAtMs?: number | null; | ||
| cols: number; | ||
| rows: number; | ||
| exec?: string | null; | ||
| createdAtMs: number; | ||
| attachedCount: number; | ||
| user?: string | null; | ||
| suspended?: boolean; | ||
| } | ||
| export interface ListPtySessionsResponse { | ||
| sessions: PtySessionInfo[]; | ||
| } | ||
| export interface ClosePtySessionResponse { | ||
| sessionId: string; | ||
| exitCode?: number | null; | ||
| } | ||
| export interface PtyOpenOptions { | ||
| cols?: number; | ||
| rows?: number; | ||
| exec?: string; | ||
| sessionId?: string; | ||
| } | ||
| export interface PtyAttachOptions { | ||
| cols?: number; | ||
| rows?: number; | ||
| } | ||
| export interface PtyReconnectOptions { | ||
| enabled?: boolean; | ||
| maxAttempts?: number; | ||
| baseDelayMs?: number; | ||
| maxDelayMs?: number; | ||
| } | ||
| export interface PtySessionEvents { | ||
| onData?: (data: Uint8Array) => void; | ||
| onExit?: (exitCode: number) => void; | ||
| onClose?: (info: { wasClean: boolean; code: number; reason: string }) => void; | ||
| onError?: (err: unknown) => void; | ||
| onReconnecting?: (attempt: number, maxAttempts: number) => void; | ||
| onReconnect?: () => void; | ||
| } | ||
| export class PtySession { | ||
| readonly sessionId: string; | ||
| write(data: Uint8Array | string): void; | ||
| resize(options: { cols: number; rows: number }): void; | ||
| signal(sig: "SIGINT" | "SIGKILL"): void; | ||
| detach(): void; | ||
| readonly readyState: number; | ||
| } | ||
| export class VmPty { | ||
| open(options?: PtyOpenOptions & PtySessionEvents & { | ||
| reconnect?: PtyReconnectOptions | boolean; | ||
| }): Promise<PtySession>; | ||
| attach(options: PtyAttachOptions & PtySessionEvents & { | ||
| sessionId: string; | ||
| reconnect?: PtyReconnectOptions | boolean; | ||
| }): Promise<PtySession>; | ||
| list(): Promise<ListPtySessionsResponse>; | ||
| close(options: { sessionId: string }): Promise<ClosePtySessionResponse>; | ||
| } | ||
| class DomainsNamespace { | ||
@@ -172,0 +254,0 @@ verifications: { |
+82
-0
@@ -36,2 +36,3 @@ export type FreestyleOptions = | ||
| idleTimeoutSeconds?: number | null; | ||
| activityThresholdBytes?: number | null; | ||
| persistence?: | | ||
@@ -113,2 +114,4 @@ { type: "persistent" } | | ||
| class Vm { | ||
| readonly pty: VmPty; | ||
| start(options?: { | ||
@@ -170,2 +173,81 @@ idleTimeoutSeconds?: number | ||
| export type PtyServerMsg = | ||
| | { type: "sessionInfo"; sessionId: string } | ||
| | { type: "exited"; exitCode: number }; | ||
| export interface PtySessionInfo { | ||
| sessionId: string; | ||
| running: boolean; | ||
| exitCode?: number | null; | ||
| exitedAtMs?: number | null; | ||
| cols: number; | ||
| rows: number; | ||
| exec?: string | null; | ||
| createdAtMs: number; | ||
| attachedCount: number; | ||
| user?: string | null; | ||
| suspended?: boolean; | ||
| } | ||
| export interface ListPtySessionsResponse { | ||
| sessions: PtySessionInfo[]; | ||
| } | ||
| export interface ClosePtySessionResponse { | ||
| sessionId: string; | ||
| exitCode?: number | null; | ||
| } | ||
| export interface PtyOpenOptions { | ||
| cols?: number; | ||
| rows?: number; | ||
| exec?: string; | ||
| sessionId?: string; | ||
| } | ||
| export interface PtyAttachOptions { | ||
| cols?: number; | ||
| rows?: number; | ||
| } | ||
| export interface PtyReconnectOptions { | ||
| enabled?: boolean; | ||
| maxAttempts?: number; | ||
| baseDelayMs?: number; | ||
| maxDelayMs?: number; | ||
| } | ||
| export interface PtySessionEvents { | ||
| onData?: (data: Uint8Array) => void; | ||
| onExit?: (exitCode: number) => void; | ||
| onClose?: (info: { wasClean: boolean; code: number; reason: string }) => void; | ||
| onError?: (err: unknown) => void; | ||
| onReconnecting?: (attempt: number, maxAttempts: number) => void; | ||
| onReconnect?: () => void; | ||
| } | ||
| export class PtySession { | ||
| readonly sessionId: string; | ||
| write(data: Uint8Array | string): void; | ||
| resize(options: { cols: number; rows: number }): void; | ||
| signal(sig: "SIGINT" | "SIGKILL"): void; | ||
| detach(): void; | ||
| readonly readyState: number; | ||
| } | ||
| export class VmPty { | ||
| open(options?: PtyOpenOptions & PtySessionEvents & { | ||
| reconnect?: PtyReconnectOptions | boolean; | ||
| }): Promise<PtySession>; | ||
| attach(options: PtyAttachOptions & PtySessionEvents & { | ||
| sessionId: string; | ||
| reconnect?: PtyReconnectOptions | boolean; | ||
| }): Promise<PtySession>; | ||
| list(): Promise<ListPtySessionsResponse>; | ||
| close(options: { sessionId: string }): Promise<ClosePtySessionResponse>; | ||
| } | ||
| class DomainsNamespace { | ||
@@ -172,0 +254,0 @@ verifications: { |
+82
-0
@@ -36,2 +36,3 @@ export type FreestyleOptions = | ||
| idleTimeoutSeconds?: number | null; | ||
| activityThresholdBytes?: number | null; | ||
| persistence?: | | ||
@@ -113,2 +114,4 @@ { type: "persistent" } | | ||
| class Vm { | ||
| readonly pty: VmPty; | ||
| start(options?: { | ||
@@ -170,2 +173,81 @@ idleTimeoutSeconds?: number | ||
| export type PtyServerMsg = | ||
| | { type: "sessionInfo"; sessionId: string } | ||
| | { type: "exited"; exitCode: number }; | ||
| export interface PtySessionInfo { | ||
| sessionId: string; | ||
| running: boolean; | ||
| exitCode?: number | null; | ||
| exitedAtMs?: number | null; | ||
| cols: number; | ||
| rows: number; | ||
| exec?: string | null; | ||
| createdAtMs: number; | ||
| attachedCount: number; | ||
| user?: string | null; | ||
| suspended?: boolean; | ||
| } | ||
| export interface ListPtySessionsResponse { | ||
| sessions: PtySessionInfo[]; | ||
| } | ||
| export interface ClosePtySessionResponse { | ||
| sessionId: string; | ||
| exitCode?: number | null; | ||
| } | ||
| export interface PtyOpenOptions { | ||
| cols?: number; | ||
| rows?: number; | ||
| exec?: string; | ||
| sessionId?: string; | ||
| } | ||
| export interface PtyAttachOptions { | ||
| cols?: number; | ||
| rows?: number; | ||
| } | ||
| export interface PtyReconnectOptions { | ||
| enabled?: boolean; | ||
| maxAttempts?: number; | ||
| baseDelayMs?: number; | ||
| maxDelayMs?: number; | ||
| } | ||
| export interface PtySessionEvents { | ||
| onData?: (data: Uint8Array) => void; | ||
| onExit?: (exitCode: number) => void; | ||
| onClose?: (info: { wasClean: boolean; code: number; reason: string }) => void; | ||
| onError?: (err: unknown) => void; | ||
| onReconnecting?: (attempt: number, maxAttempts: number) => void; | ||
| onReconnect?: () => void; | ||
| } | ||
| export class PtySession { | ||
| readonly sessionId: string; | ||
| write(data: Uint8Array | string): void; | ||
| resize(options: { cols: number; rows: number }): void; | ||
| signal(sig: "SIGINT" | "SIGKILL"): void; | ||
| detach(): void; | ||
| readonly readyState: number; | ||
| } | ||
| export class VmPty { | ||
| open(options?: PtyOpenOptions & PtySessionEvents & { | ||
| reconnect?: PtyReconnectOptions | boolean; | ||
| }): Promise<PtySession>; | ||
| attach(options: PtyAttachOptions & PtySessionEvents & { | ||
| sessionId: string; | ||
| reconnect?: PtyReconnectOptions | boolean; | ||
| }): Promise<PtySession>; | ||
| list(): Promise<ListPtySessionsResponse>; | ||
| close(options: { sessionId: string }): Promise<ClosePtySessionResponse>; | ||
| } | ||
| class DomainsNamespace { | ||
@@ -172,0 +254,0 @@ verifications: { |
+1
-1
| { | ||
| "name": "freestyle", | ||
| "version": "0.1.62", | ||
| "version": "0.1.63", | ||
| "type": "module", | ||
@@ -5,0 +5,0 @@ "exports": { |
3104613
0.2%44430
0.15%