@secure-exec/core 0.0.0-main.bccb3a2
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/README.md +7 -0
- package/commands/[ +0 -0
- package/commands/_stubs +0 -0
- package/commands/arch +0 -0
- package/commands/awk +0 -0
- package/commands/b2sum +0 -0
- package/commands/base32 +0 -0
- package/commands/base64 +0 -0
- package/commands/basename +0 -0
- package/commands/basenc +0 -0
- package/commands/bash +0 -0
- package/commands/cat +0 -0
- package/commands/chcon +0 -0
- package/commands/chgrp +0 -0
- package/commands/chmod +0 -0
- package/commands/chown +0 -0
- package/commands/chroot +0 -0
- package/commands/cksum +0 -0
- package/commands/codex +0 -0
- package/commands/codex-exec +0 -0
- package/commands/column +0 -0
- package/commands/comm +0 -0
- package/commands/cp +0 -0
- package/commands/curl +0 -0
- package/commands/cut +0 -0
- package/commands/date +0 -0
- package/commands/dd +0 -0
- package/commands/df +0 -0
- package/commands/diff +0 -0
- package/commands/dir +0 -0
- package/commands/dircolors +0 -0
- package/commands/dirname +0 -0
- package/commands/du +0 -0
- package/commands/echo +0 -0
- package/commands/egrep +0 -0
- package/commands/env +0 -0
- package/commands/expand +0 -0
- package/commands/expr +0 -0
- package/commands/factor +0 -0
- package/commands/false +0 -0
- package/commands/fd +0 -0
- package/commands/fgrep +0 -0
- package/commands/file +0 -0
- package/commands/find +0 -0
- package/commands/fmt +0 -0
- package/commands/fold +0 -0
- package/commands/git +0 -0
- package/commands/grep +0 -0
- package/commands/groups +0 -0
- package/commands/gunzip +0 -0
- package/commands/gzip +0 -0
- package/commands/head +0 -0
- package/commands/hostid +0 -0
- package/commands/hostname +0 -0
- package/commands/http-test +0 -0
- package/commands/id +0 -0
- package/commands/install +0 -0
- package/commands/join +0 -0
- package/commands/jq +0 -0
- package/commands/kill +0 -0
- package/commands/link +0 -0
- package/commands/ln +0 -0
- package/commands/logname +0 -0
- package/commands/ls +0 -0
- package/commands/md5sum +0 -0
- package/commands/mkdir +0 -0
- package/commands/mkfifo +0 -0
- package/commands/mknod +0 -0
- package/commands/mktemp +0 -0
- package/commands/more +0 -0
- package/commands/mv +0 -0
- package/commands/nice +0 -0
- package/commands/nl +0 -0
- package/commands/nohup +0 -0
- package/commands/nproc +0 -0
- package/commands/numfmt +0 -0
- package/commands/od +0 -0
- package/commands/paste +0 -0
- package/commands/pathchk +0 -0
- package/commands/pinky +0 -0
- package/commands/printenv +0 -0
- package/commands/printf +0 -0
- package/commands/ptx +0 -0
- package/commands/pwd +0 -0
- package/commands/readlink +0 -0
- package/commands/realpath +0 -0
- package/commands/rev +0 -0
- package/commands/rg +0 -0
- package/commands/rm +0 -0
- package/commands/rmdir +0 -0
- package/commands/runcon +0 -0
- package/commands/sed +0 -0
- package/commands/seq +0 -0
- package/commands/sh +0 -0
- package/commands/sha1sum +0 -0
- package/commands/sha224sum +0 -0
- package/commands/sha256sum +0 -0
- package/commands/sha384sum +0 -0
- package/commands/sha512sum +0 -0
- package/commands/shred +0 -0
- package/commands/shuf +0 -0
- package/commands/sleep +0 -0
- package/commands/sort +0 -0
- package/commands/spawn-test-host +0 -0
- package/commands/split +0 -0
- package/commands/stat +0 -0
- package/commands/stdbuf +0 -0
- package/commands/strings +0 -0
- package/commands/stty +0 -0
- package/commands/sum +0 -0
- package/commands/sync +0 -0
- package/commands/tac +0 -0
- package/commands/tail +0 -0
- package/commands/tar +0 -0
- package/commands/tee +0 -0
- package/commands/test +0 -0
- package/commands/timeout +0 -0
- package/commands/touch +0 -0
- package/commands/tr +0 -0
- package/commands/tree +0 -0
- package/commands/true +0 -0
- package/commands/truncate +0 -0
- package/commands/tsort +0 -0
- package/commands/tty +0 -0
- package/commands/uname +0 -0
- package/commands/unexpand +0 -0
- package/commands/uniq +0 -0
- package/commands/unlink +0 -0
- package/commands/uptime +0 -0
- package/commands/users +0 -0
- package/commands/vdir +0 -0
- package/commands/wc +0 -0
- package/commands/which +0 -0
- package/commands/who +0 -0
- package/commands/whoami +0 -0
- package/commands/xargs +0 -0
- package/commands/xu +0 -0
- package/commands/yes +0 -0
- package/commands/yq +0 -0
- package/commands/zcat +0 -0
- package/dist/binary.d.ts +4 -0
- package/dist/binary.js +25 -0
- package/dist/bytes.d.ts +2 -0
- package/dist/bytes.js +6 -0
- package/dist/callbacks.d.ts +41 -0
- package/dist/callbacks.js +94 -0
- package/dist/cargo.d.ts +2 -0
- package/dist/cargo.js +142 -0
- package/dist/correlation.d.ts +10 -0
- package/dist/correlation.js +49 -0
- package/dist/descriptors.d.ts +34 -0
- package/dist/descriptors.js +37 -0
- package/dist/event-buffer.d.ts +90 -0
- package/dist/event-buffer.js +313 -0
- package/dist/ext.d.ts +7 -0
- package/dist/ext.js +13 -0
- package/dist/filesystem.d.ts +41 -0
- package/dist/filesystem.js +70 -0
- package/dist/frame-payload-codec.d.ts +8 -0
- package/dist/frame-payload-codec.js +14 -0
- package/dist/frame-rpc.d.ts +38 -0
- package/dist/frame-rpc.js +73 -0
- package/dist/frame-stream.d.ts +27 -0
- package/dist/frame-stream.js +99 -0
- package/dist/framing.d.ts +7 -0
- package/dist/framing.js +22 -0
- package/dist/generated/AcpLimitsConfig.d.ts +4 -0
- package/dist/generated/AcpLimitsConfig.js +2 -0
- package/dist/generated/CreateVmConfig.d.ts +19 -0
- package/dist/generated/CreateVmConfig.js +1 -0
- package/dist/generated/FsPermissionRule.d.ts +6 -0
- package/dist/generated/FsPermissionRule.js +1 -0
- package/dist/generated/FsPermissionRuleSet.d.ts +6 -0
- package/dist/generated/FsPermissionRuleSet.js +1 -0
- package/dist/generated/FsPermissionScope.d.ts +3 -0
- package/dist/generated/FsPermissionScope.js +1 -0
- package/dist/generated/HttpLimitsConfig.d.ts +3 -0
- package/dist/generated/HttpLimitsConfig.js +2 -0
- package/dist/generated/JsModuleResolution.d.ts +1 -0
- package/dist/generated/JsModuleResolution.js +2 -0
- package/dist/generated/JsRuntimeConfig.d.ts +26 -0
- package/dist/generated/JsRuntimeConfig.js +1 -0
- package/dist/generated/JsRuntimeLimitsConfig.d.ts +8 -0
- package/dist/generated/JsRuntimeLimitsConfig.js +2 -0
- package/dist/generated/JsRuntimePlatform.d.ts +1 -0
- package/dist/generated/JsRuntimePlatform.js +2 -0
- package/dist/generated/MountPluginDescriptor.d.ts +4 -0
- package/dist/generated/MountPluginDescriptor.js +2 -0
- package/dist/generated/NativeRootFilesystemConfig.d.ts +5 -0
- package/dist/generated/NativeRootFilesystemConfig.js +1 -0
- package/dist/generated/PatternPermissionRule.d.ts +6 -0
- package/dist/generated/PatternPermissionRule.js +1 -0
- package/dist/generated/PatternPermissionRuleSet.d.ts +6 -0
- package/dist/generated/PatternPermissionRuleSet.js +1 -0
- package/dist/generated/PatternPermissionScope.d.ts +3 -0
- package/dist/generated/PatternPermissionScope.js +1 -0
- package/dist/generated/PermissionMode.d.ts +1 -0
- package/dist/generated/PermissionMode.js +2 -0
- package/dist/generated/PermissionsPolicy.d.ts +10 -0
- package/dist/generated/PermissionsPolicy.js +1 -0
- package/dist/generated/PluginLimitsConfig.d.ts +4 -0
- package/dist/generated/PluginLimitsConfig.js +2 -0
- package/dist/generated/PythonLimitsConfig.d.ts +6 -0
- package/dist/generated/PythonLimitsConfig.js +2 -0
- package/dist/generated/ResourceLimitsConfig.d.ts +22 -0
- package/dist/generated/ResourceLimitsConfig.js +2 -0
- package/dist/generated/RootFilesystemConfig.d.ts +9 -0
- package/dist/generated/RootFilesystemConfig.js +1 -0
- package/dist/generated/RootFilesystemEntry.d.ts +13 -0
- package/dist/generated/RootFilesystemEntry.js +1 -0
- package/dist/generated/RootFilesystemEntryEncoding.d.ts +1 -0
- package/dist/generated/RootFilesystemEntryEncoding.js +2 -0
- package/dist/generated/RootFilesystemEntryKind.d.ts +1 -0
- package/dist/generated/RootFilesystemEntryKind.js +2 -0
- package/dist/generated/RootFilesystemLowerDescriptor.d.ts +7 -0
- package/dist/generated/RootFilesystemLowerDescriptor.js +1 -0
- package/dist/generated/RootFilesystemMode.d.ts +1 -0
- package/dist/generated/RootFilesystemMode.js +2 -0
- package/dist/generated/ToolLimitsConfig.d.ts +10 -0
- package/dist/generated/ToolLimitsConfig.js +2 -0
- package/dist/generated/VmDnsConfig.d.ts +6 -0
- package/dist/generated/VmDnsConfig.js +2 -0
- package/dist/generated/VmLimitsConfig.d.ts +18 -0
- package/dist/generated/VmLimitsConfig.js +1 -0
- package/dist/generated/VmListenPolicyConfig.d.ts +5 -0
- package/dist/generated/VmListenPolicyConfig.js +2 -0
- package/dist/generated/WasmLimitsConfig.d.ts +5 -0
- package/dist/generated/WasmLimitsConfig.js +2 -0
- package/dist/generated-protocol.d.ts +1037 -0
- package/dist/generated-protocol.js +2887 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +25 -0
- package/dist/json.d.ts +2 -0
- package/dist/json.js +20 -0
- package/dist/kernel-proxy.d.ts +151 -0
- package/dist/kernel-proxy.js +1737 -0
- package/dist/native-client.d.ts +41 -0
- package/dist/native-client.js +124 -0
- package/dist/node-runtime.d.ts +516 -0
- package/dist/node-runtime.js +794 -0
- package/dist/numbers.d.ts +1 -0
- package/dist/numbers.js +8 -0
- package/dist/ownership.d.ts +18 -0
- package/dist/ownership.js +77 -0
- package/dist/permissions.d.ts +29 -0
- package/dist/permissions.js +68 -0
- package/dist/process.d.ts +35 -0
- package/dist/process.js +125 -0
- package/dist/protocol-client.d.ts +46 -0
- package/dist/protocol-client.js +180 -0
- package/dist/protocol-frames.d.ts +68 -0
- package/dist/protocol-frames.js +139 -0
- package/dist/protocol-maps.d.ts +28 -0
- package/dist/protocol-maps.js +217 -0
- package/dist/protocol-schema.d.ts +10 -0
- package/dist/protocol-schema.js +11 -0
- package/dist/request-payloads.d.ts +137 -0
- package/dist/request-payloads.js +210 -0
- package/dist/response-payloads.d.ts +107 -0
- package/dist/response-payloads.js +161 -0
- package/dist/sidecar-client.d.ts +242 -0
- package/dist/sidecar-client.js +797 -0
- package/dist/state.d.ts +40 -0
- package/dist/state.js +44 -0
- package/dist/test-runtime.d.ts +534 -0
- package/dist/test-runtime.js +2146 -0
- package/dist/vm-config.d.ts +31 -0
- package/dist/vm-config.js +1 -0
- package/fixtures/alpine-defaults.json +520 -0
- package/fixtures/base-filesystem.json +528 -0
- package/package.json +197 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { type LiveSidecarRequestPayload, type LiveSidecarResponsePayload } from "./callbacks.js";
|
|
2
|
+
import type { MountConfigJsonObject } from "./descriptors.js";
|
|
3
|
+
import { type LiveSidecarEventSelector } from "./event-buffer.js";
|
|
4
|
+
import { type LiveRootFilesystemEntry } from "./filesystem.js";
|
|
5
|
+
import type { CreateVmConfig } from "./generated/CreateVmConfig.js";
|
|
6
|
+
import { type LiveFsPermissionRule, type LivePatternPermissionRule, type LivePermissionMode, type LivePermissionScope, type LiveRulePermissions } from "./permissions.js";
|
|
7
|
+
import type { LiveGuestRuntimeKind, LiveWasmPermissionTier } from "./protocol-maps.js";
|
|
8
|
+
import { type LiveEventFrame, type LiveSidecarRequestHandler, type LiveSidecarRequestFrame, type LiveSidecarResponseFrame, type ProtocolFramePayloadCodec } from "./protocol-frames.js";
|
|
9
|
+
import { type LiveGuestFilesystemStat } from "./state.js";
|
|
10
|
+
export { SidecarProcessError, SidecarProcessExited, } from "./process.js";
|
|
11
|
+
export { SidecarEventBufferOverflow } from "./event-buffer.js";
|
|
12
|
+
export declare const NATIVE_SIDECAR_FRAME_TIMEOUT_MS = 120000;
|
|
13
|
+
type GuestRuntimeKind = Extract<LiveGuestRuntimeKind, "java_script" | "web_assembly">;
|
|
14
|
+
type WasmPermissionTier = LiveWasmPermissionTier;
|
|
15
|
+
export interface RootFilesystemEntry extends LiveRootFilesystemEntry {
|
|
16
|
+
}
|
|
17
|
+
export interface RootFilesystemLowerDescriptor {
|
|
18
|
+
kind: "snapshot" | "bundled_base_filesystem";
|
|
19
|
+
entries?: RootFilesystemEntry[];
|
|
20
|
+
}
|
|
21
|
+
export interface GuestFilesystemStat extends LiveGuestFilesystemStat {
|
|
22
|
+
}
|
|
23
|
+
export interface SidecarSocketStateEntry {
|
|
24
|
+
processId: string;
|
|
25
|
+
host?: string;
|
|
26
|
+
port?: number;
|
|
27
|
+
path?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface SidecarSignalHandlerRegistration {
|
|
30
|
+
action: "default" | "ignore" | "user";
|
|
31
|
+
mask: number[];
|
|
32
|
+
flags: number;
|
|
33
|
+
}
|
|
34
|
+
export interface SidecarSignalState {
|
|
35
|
+
processId: string;
|
|
36
|
+
handlers: Map<number, SidecarSignalHandlerRegistration>;
|
|
37
|
+
}
|
|
38
|
+
export interface SidecarProcessSnapshotEntry {
|
|
39
|
+
processId: string;
|
|
40
|
+
pid: number;
|
|
41
|
+
ppid: number;
|
|
42
|
+
pgid: number;
|
|
43
|
+
sid: number;
|
|
44
|
+
driver: string;
|
|
45
|
+
command: string;
|
|
46
|
+
args: string[];
|
|
47
|
+
cwd: string;
|
|
48
|
+
status: "running" | "exited" | "stopped";
|
|
49
|
+
exitCode: number | null;
|
|
50
|
+
}
|
|
51
|
+
export interface SidecarZombieTimerCount {
|
|
52
|
+
count: number;
|
|
53
|
+
}
|
|
54
|
+
export interface SidecarRegisteredHostCallbackExample {
|
|
55
|
+
description: string;
|
|
56
|
+
input: unknown;
|
|
57
|
+
}
|
|
58
|
+
export interface SidecarRegisteredHostCallbackDefinition {
|
|
59
|
+
description: string;
|
|
60
|
+
inputSchema: unknown;
|
|
61
|
+
timeoutMs?: number;
|
|
62
|
+
examples?: SidecarRegisteredHostCallbackExample[];
|
|
63
|
+
}
|
|
64
|
+
export interface ExtEnvelope {
|
|
65
|
+
namespace: string;
|
|
66
|
+
payload: Uint8Array;
|
|
67
|
+
}
|
|
68
|
+
export type SidecarRequestPayload = LiveSidecarRequestPayload;
|
|
69
|
+
export type SidecarResponsePayload = LiveSidecarResponsePayload;
|
|
70
|
+
type EventFrame = LiveEventFrame;
|
|
71
|
+
export type SidecarEventSelector = LiveSidecarEventSelector;
|
|
72
|
+
export type SidecarRequestFrame = LiveSidecarRequestFrame;
|
|
73
|
+
export type SidecarResponseFrame = LiveSidecarResponseFrame;
|
|
74
|
+
type NativeTransportPayloadCodec = ProtocolFramePayloadCodec;
|
|
75
|
+
export type SidecarRequestHandler = LiveSidecarRequestHandler;
|
|
76
|
+
export interface SidecarSpawnOptions {
|
|
77
|
+
cwd?: string;
|
|
78
|
+
command?: string;
|
|
79
|
+
args?: string[];
|
|
80
|
+
frameTimeoutMs?: number;
|
|
81
|
+
eventBufferCapacity?: number;
|
|
82
|
+
payloadCodec?: NativeTransportPayloadCodec;
|
|
83
|
+
}
|
|
84
|
+
export interface AuthenticatedSession {
|
|
85
|
+
connectionId: string;
|
|
86
|
+
sessionId: string;
|
|
87
|
+
}
|
|
88
|
+
export interface CreatedVm {
|
|
89
|
+
vmId: string;
|
|
90
|
+
}
|
|
91
|
+
export interface SidecarSessionState {
|
|
92
|
+
sessionId: string;
|
|
93
|
+
agentType: string;
|
|
94
|
+
processId: string;
|
|
95
|
+
pid?: number;
|
|
96
|
+
closed: boolean;
|
|
97
|
+
modes?: unknown;
|
|
98
|
+
configOptions: unknown[];
|
|
99
|
+
agentCapabilities?: unknown;
|
|
100
|
+
agentInfo?: unknown;
|
|
101
|
+
}
|
|
102
|
+
export interface SidecarMountPluginDescriptor {
|
|
103
|
+
id: string;
|
|
104
|
+
config?: MountConfigJsonObject;
|
|
105
|
+
}
|
|
106
|
+
export interface SidecarMountDescriptor {
|
|
107
|
+
guestPath: string;
|
|
108
|
+
readOnly: boolean;
|
|
109
|
+
plugin: SidecarMountPluginDescriptor;
|
|
110
|
+
}
|
|
111
|
+
export interface SidecarSoftwareDescriptor {
|
|
112
|
+
packageName: string;
|
|
113
|
+
root: string;
|
|
114
|
+
}
|
|
115
|
+
export type SidecarPermissionMode = LivePermissionMode;
|
|
116
|
+
export interface SidecarFsPermissionRule extends LiveFsPermissionRule {
|
|
117
|
+
}
|
|
118
|
+
export interface SidecarPatternPermissionRule extends LivePatternPermissionRule {
|
|
119
|
+
}
|
|
120
|
+
export interface SidecarRulePermissions<TRule> extends LiveRulePermissions<TRule> {
|
|
121
|
+
}
|
|
122
|
+
export type SidecarPermissionScope<TRule> = LivePermissionScope<TRule>;
|
|
123
|
+
export interface SidecarPermissionsPolicy {
|
|
124
|
+
fs?: SidecarPermissionScope<SidecarFsPermissionRule>;
|
|
125
|
+
network?: SidecarPermissionScope<SidecarPatternPermissionRule>;
|
|
126
|
+
childProcess?: SidecarPermissionScope<SidecarPatternPermissionRule>;
|
|
127
|
+
process?: SidecarPermissionScope<SidecarPatternPermissionRule>;
|
|
128
|
+
env?: SidecarPermissionScope<SidecarPatternPermissionRule>;
|
|
129
|
+
tool?: SidecarPermissionScope<SidecarPatternPermissionRule>;
|
|
130
|
+
}
|
|
131
|
+
export interface SidecarProjectedModuleDescriptor {
|
|
132
|
+
packageName: string;
|
|
133
|
+
entrypoint: string;
|
|
134
|
+
}
|
|
135
|
+
export declare class Sidecar {
|
|
136
|
+
private readonly protocolClient;
|
|
137
|
+
private constructor();
|
|
138
|
+
static spawn(options?: SidecarSpawnOptions): Sidecar;
|
|
139
|
+
setSidecarRequestHandler(handler: SidecarRequestHandler | null): void;
|
|
140
|
+
onEvent(handler: (event: EventFrame) => void): () => void;
|
|
141
|
+
authenticateAndOpenSession(sessionMetadata?: Record<string, string>): Promise<AuthenticatedSession>;
|
|
142
|
+
createVm(session: AuthenticatedSession, options: {
|
|
143
|
+
runtime: GuestRuntimeKind;
|
|
144
|
+
config: CreateVmConfig;
|
|
145
|
+
}): Promise<CreatedVm>;
|
|
146
|
+
extensionRequest(session: AuthenticatedSession, vm: CreatedVm, envelope: ExtEnvelope): Promise<ExtEnvelope>;
|
|
147
|
+
configureVm(session: AuthenticatedSession, vm: CreatedVm, options: {
|
|
148
|
+
mounts?: SidecarMountDescriptor[];
|
|
149
|
+
software?: SidecarSoftwareDescriptor[];
|
|
150
|
+
permissions?: SidecarPermissionsPolicy;
|
|
151
|
+
moduleAccessCwd?: string;
|
|
152
|
+
instructions?: string[];
|
|
153
|
+
projectedModules?: SidecarProjectedModuleDescriptor[];
|
|
154
|
+
commandPermissions?: Record<string, WasmPermissionTier>;
|
|
155
|
+
loopbackExemptPorts?: number[];
|
|
156
|
+
}): Promise<void>;
|
|
157
|
+
registerHostCallbacks(session: AuthenticatedSession, vm: CreatedVm, registration: {
|
|
158
|
+
name: string;
|
|
159
|
+
description: string;
|
|
160
|
+
commandAliases?: string[];
|
|
161
|
+
registryCommandAliases?: string[];
|
|
162
|
+
callbacks: Record<string, SidecarRegisteredHostCallbackDefinition>;
|
|
163
|
+
}): Promise<{
|
|
164
|
+
registration: string;
|
|
165
|
+
commandCount: number;
|
|
166
|
+
}>;
|
|
167
|
+
createLayer(session: AuthenticatedSession, vm: CreatedVm): Promise<string>;
|
|
168
|
+
sealLayer(session: AuthenticatedSession, vm: CreatedVm, layerId: string): Promise<string>;
|
|
169
|
+
importSnapshot(session: AuthenticatedSession, vm: CreatedVm, entries: RootFilesystemEntry[]): Promise<string>;
|
|
170
|
+
exportSnapshot(session: AuthenticatedSession, vm: CreatedVm, layerId: string): Promise<RootFilesystemEntry[]>;
|
|
171
|
+
createOverlay(session: AuthenticatedSession, vm: CreatedVm, options: {
|
|
172
|
+
mode?: "ephemeral" | "read_only";
|
|
173
|
+
upperLayerId?: string;
|
|
174
|
+
lowerLayerIds: string[];
|
|
175
|
+
}): Promise<string>;
|
|
176
|
+
bootstrapRootFilesystem(session: AuthenticatedSession, vm: CreatedVm, entries: RootFilesystemEntry[]): Promise<void>;
|
|
177
|
+
snapshotRootFilesystem(session: AuthenticatedSession, vm: CreatedVm): Promise<RootFilesystemEntry[]>;
|
|
178
|
+
readFile(session: AuthenticatedSession, vm: CreatedVm, path: string): Promise<Uint8Array>;
|
|
179
|
+
pread(session: AuthenticatedSession, vm: CreatedVm, path: string, offset: number, length: number): Promise<Uint8Array>;
|
|
180
|
+
writeFile(session: AuthenticatedSession, vm: CreatedVm, path: string, content: string | Uint8Array): Promise<void>;
|
|
181
|
+
mkdir(session: AuthenticatedSession, vm: CreatedVm, path: string, options?: {
|
|
182
|
+
recursive?: boolean;
|
|
183
|
+
}): Promise<void>;
|
|
184
|
+
readdir(session: AuthenticatedSession, vm: CreatedVm, path: string): Promise<string[]>;
|
|
185
|
+
exists(session: AuthenticatedSession, vm: CreatedVm, path: string): Promise<boolean>;
|
|
186
|
+
stat(session: AuthenticatedSession, vm: CreatedVm, path: string, options?: {
|
|
187
|
+
dereference?: boolean;
|
|
188
|
+
}): Promise<GuestFilesystemStat>;
|
|
189
|
+
lstat(session: AuthenticatedSession, vm: CreatedVm, path: string): Promise<GuestFilesystemStat>;
|
|
190
|
+
rename(session: AuthenticatedSession, vm: CreatedVm, fromPath: string, toPath: string): Promise<void>;
|
|
191
|
+
realpath(session: AuthenticatedSession, vm: CreatedVm, path: string): Promise<string>;
|
|
192
|
+
removeFile(session: AuthenticatedSession, vm: CreatedVm, path: string): Promise<void>;
|
|
193
|
+
removeDir(session: AuthenticatedSession, vm: CreatedVm, path: string): Promise<void>;
|
|
194
|
+
symlink(session: AuthenticatedSession, vm: CreatedVm, target: string, linkPath: string): Promise<void>;
|
|
195
|
+
readLink(session: AuthenticatedSession, vm: CreatedVm, path: string): Promise<string>;
|
|
196
|
+
link(session: AuthenticatedSession, vm: CreatedVm, fromPath: string, toPath: string): Promise<void>;
|
|
197
|
+
chmod(session: AuthenticatedSession, vm: CreatedVm, path: string, mode: number): Promise<void>;
|
|
198
|
+
chown(session: AuthenticatedSession, vm: CreatedVm, path: string, uid: number, gid: number): Promise<void>;
|
|
199
|
+
utimes(session: AuthenticatedSession, vm: CreatedVm, path: string, atimeMs: number, mtimeMs: number): Promise<void>;
|
|
200
|
+
truncate(session: AuthenticatedSession, vm: CreatedVm, path: string, length: number): Promise<void>;
|
|
201
|
+
disposeVm(session: AuthenticatedSession, vm: CreatedVm): Promise<void>;
|
|
202
|
+
execute(session: AuthenticatedSession, vm: CreatedVm, options: {
|
|
203
|
+
processId: string;
|
|
204
|
+
command?: string;
|
|
205
|
+
runtime?: GuestRuntimeKind;
|
|
206
|
+
entrypoint?: string;
|
|
207
|
+
args?: string[];
|
|
208
|
+
env?: Record<string, string>;
|
|
209
|
+
cwd?: string;
|
|
210
|
+
wasmPermissionTier?: WasmPermissionTier;
|
|
211
|
+
}): Promise<{
|
|
212
|
+
pid: number | null;
|
|
213
|
+
}>;
|
|
214
|
+
writeStdin(session: AuthenticatedSession, vm: CreatedVm, processId: string, chunk: string | Uint8Array): Promise<void>;
|
|
215
|
+
closeStdin(session: AuthenticatedSession, vm: CreatedVm, processId: string): Promise<void>;
|
|
216
|
+
killProcess(session: AuthenticatedSession, vm: CreatedVm, processId: string, signal?: string): Promise<void>;
|
|
217
|
+
findListener(session: AuthenticatedSession, vm: CreatedVm, request: {
|
|
218
|
+
host?: string;
|
|
219
|
+
port?: number;
|
|
220
|
+
path?: string;
|
|
221
|
+
}): Promise<SidecarSocketStateEntry | null>;
|
|
222
|
+
getProcessSnapshot(session: AuthenticatedSession, vm: CreatedVm): Promise<SidecarProcessSnapshotEntry[]>;
|
|
223
|
+
findBoundUdp(session: AuthenticatedSession, vm: CreatedVm, request: {
|
|
224
|
+
host?: string;
|
|
225
|
+
port?: number;
|
|
226
|
+
}): Promise<SidecarSocketStateEntry | null>;
|
|
227
|
+
vmFetch(session: AuthenticatedSession, vm: CreatedVm, request: {
|
|
228
|
+
port: number;
|
|
229
|
+
method: string;
|
|
230
|
+
path: string;
|
|
231
|
+
headersJson: string;
|
|
232
|
+
body?: string;
|
|
233
|
+
}): Promise<string>;
|
|
234
|
+
getSignalState(session: AuthenticatedSession, vm: CreatedVm, processId: string): Promise<SidecarSignalState>;
|
|
235
|
+
getZombieTimerCount(session: AuthenticatedSession, vm: CreatedVm): Promise<SidecarZombieTimerCount>;
|
|
236
|
+
waitForEvent(matcher: SidecarEventSelector | ((event: EventFrame) => boolean), timeoutMs?: number, options?: {
|
|
237
|
+
signal?: AbortSignal;
|
|
238
|
+
}): Promise<EventFrame>;
|
|
239
|
+
dispose(): Promise<void>;
|
|
240
|
+
private sendRequest;
|
|
241
|
+
private guestFilesystemCall;
|
|
242
|
+
}
|