@ekairos/sandbox 1.22.35-beta.development.0 → 1.22.35
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/action-steps.d.ts +156 -0
- package/dist/action-steps.d.ts.map +1 -0
- package/dist/action-steps.js +153 -0
- package/dist/action-steps.js.map +1 -0
- package/dist/actions.d.ts +263 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +208 -0
- package/dist/actions.js.map +1 -0
- package/dist/contract.d.ts +86 -0
- package/dist/contract.d.ts.map +1 -0
- package/dist/contract.js +83 -0
- package/dist/contract.js.map +1 -0
- package/dist/domain.d.ts +2 -0
- package/dist/domain.d.ts.map +1 -0
- package/dist/domain.js +2 -0
- package/dist/domain.js.map +1 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/providers/daytona.d.ts +14 -0
- package/dist/providers/daytona.d.ts.map +1 -0
- package/dist/providers/daytona.js +153 -0
- package/dist/providers/daytona.js.map +1 -0
- package/dist/providers/provider.d.ts +3 -0
- package/dist/providers/provider.d.ts.map +1 -0
- package/dist/providers/provider.js +18 -0
- package/dist/providers/provider.js.map +1 -0
- package/dist/providers/sprites.d.ts +39 -0
- package/dist/providers/sprites.d.ts.map +1 -0
- package/dist/providers/sprites.js +234 -0
- package/dist/providers/sprites.js.map +1 -0
- package/dist/providers/types.d.ts +15 -0
- package/dist/providers/types.d.ts.map +1 -0
- package/dist/providers/types.js +9 -0
- package/dist/providers/types.js.map +1 -0
- package/dist/providers/vercel.d.ts +26 -0
- package/dist/providers/vercel.d.ts.map +1 -0
- package/dist/providers/vercel.js +182 -0
- package/dist/providers/vercel.js.map +1 -0
- package/dist/public.d.ts +56 -0
- package/dist/public.d.ts.map +1 -0
- package/dist/public.js +37 -0
- package/dist/public.js.map +1 -0
- package/dist/sandbox.d.ts +76 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +154 -0
- package/dist/sandbox.js.map +1 -0
- package/dist/schema.d.ts +18 -172
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +10 -270
- package/dist/schema.js.map +1 -1
- package/dist/service.d.ts +10 -44
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +41 -566
- package/dist/service.js.map +1 -1
- package/package.json +37 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../src/public.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mCAAmC,EAAE,MAAM,eAAe,CAAA;AAGnE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;gEA8B9B,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;gEAAsB,CAAA"}
|
package/dist/public.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { i } from "@instantdb/core";
|
|
2
|
+
import { domain } from "@ekairos/domain";
|
|
3
|
+
export { SANDBOX_EXECUTE_COMMAND_ACTION_NAME } from "./contract.js";
|
|
4
|
+
// Browser-safe public sandbox schema. The full runtime domain imports and extends this.
|
|
5
|
+
export const sandboxSchemaDomain = domain("sandbox").withSchema({
|
|
6
|
+
entities: {
|
|
7
|
+
sandbox_sandboxes: i.entity({
|
|
8
|
+
sandboxUrl: i.string().optional(),
|
|
9
|
+
status: i.string().indexed(),
|
|
10
|
+
timeout: i.number().optional(),
|
|
11
|
+
runtime: i.string().optional(),
|
|
12
|
+
vcpus: i.number().optional(),
|
|
13
|
+
ports: i.json().optional(),
|
|
14
|
+
purpose: i.string().optional().indexed(),
|
|
15
|
+
createdAt: i.number().indexed(),
|
|
16
|
+
updatedAt: i.number().optional().indexed(),
|
|
17
|
+
shutdownAt: i.number().optional().indexed(),
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
links: {
|
|
21
|
+
sandbox_user: {
|
|
22
|
+
forward: {
|
|
23
|
+
on: "sandbox_sandboxes",
|
|
24
|
+
has: "one",
|
|
25
|
+
label: "user",
|
|
26
|
+
},
|
|
27
|
+
reverse: {
|
|
28
|
+
on: "$users",
|
|
29
|
+
has: "many",
|
|
30
|
+
label: "sandboxes",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
rooms: {},
|
|
35
|
+
});
|
|
36
|
+
export const sandboxDomain = sandboxSchemaDomain;
|
|
37
|
+
//# sourceMappingURL=public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../src/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,iBAAiB,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAExC,OAAO,EAAE,mCAAmC,EAAE,MAAM,eAAe,CAAA;AAEnE,wFAAwF;AACxF,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC;IAC9D,QAAQ,EAAE;QACR,iBAAiB,EAAE,CAAC,CAAC,MAAM,CAAC;YAC1B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YACjC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;YAC5B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC9B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC9B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC5B,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;YAC1B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE;YACxC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;YAC/B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE;YAC1C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE;SAC5C,CAAC;KACH;IACD,KAAK,EAAE;QACL,YAAY,EAAE;YACZ,OAAO,EAAE;gBACP,EAAE,EAAE,mBAAmB;gBACvB,GAAG,EAAE,KAAK;gBACV,KAAK,EAAE,MAAM;aACd;YACD,OAAO,EAAE;gBACP,EAAE,EAAE,QAAQ;gBACZ,GAAG,EAAE,MAAM;gBACX,KAAK,EAAE,WAAW;aACnB;SACF;KACF;IACD,KAAK,EAAE,EAAE;CACV,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { WORKFLOW_DESERIALIZE, WORKFLOW_SERIALIZE } from "@workflow/serde";
|
|
2
|
+
import type { EkairosRuntime } from "@ekairos/domain/runtime";
|
|
3
|
+
import { type ContextAction } from "@ekairos/events";
|
|
4
|
+
import { SANDBOX_EXECUTE_COMMAND_ACTION_NAME, sandboxExecuteCommandInputSchema, sandboxExecuteCommandOutputSchema, type SandboxExecuteCommandInput, type SandboxExecuteCommandOutput } from "./contract.js";
|
|
5
|
+
import type { SandboxConfig, SandboxProvider } from "./types.js";
|
|
6
|
+
type AnyDomainRuntime = EkairosRuntime<Record<string, unknown>, any, any>;
|
|
7
|
+
type SandboxRuntimeHandle<Runtime extends AnyDomainRuntime> = Runtime & {
|
|
8
|
+
meta?: () => {
|
|
9
|
+
domain?: unknown;
|
|
10
|
+
};
|
|
11
|
+
use(domain: unknown): Promise<any>;
|
|
12
|
+
};
|
|
13
|
+
export type SandboxActions = {
|
|
14
|
+
[SANDBOX_EXECUTE_COMMAND_ACTION_NAME]: ContextAction<typeof sandboxExecuteCommandInputSchema, typeof sandboxExecuteCommandOutputSchema>;
|
|
15
|
+
};
|
|
16
|
+
export type SerializedSandboxState = {
|
|
17
|
+
version: 1;
|
|
18
|
+
sandboxId: string;
|
|
19
|
+
provider?: SandboxProvider;
|
|
20
|
+
externalSandboxId?: string;
|
|
21
|
+
runtime?: string;
|
|
22
|
+
ports?: number[];
|
|
23
|
+
purpose?: string;
|
|
24
|
+
};
|
|
25
|
+
export type SerializedSandbox = {
|
|
26
|
+
runtime: SandboxRuntimeHandle<any>;
|
|
27
|
+
state: SerializedSandboxState;
|
|
28
|
+
};
|
|
29
|
+
export declare class Sandbox<Runtime extends AnyDomainRuntime = AnyDomainRuntime> {
|
|
30
|
+
static readonly executeCommandActionName: "executeCommand";
|
|
31
|
+
static readonly executeCommandInputSchema: import("zod").ZodObject<{
|
|
32
|
+
command: import("zod").ZodString;
|
|
33
|
+
args: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
34
|
+
cwd: import("zod").ZodOptional<import("zod").ZodString>;
|
|
35
|
+
env: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
36
|
+
kind: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
37
|
+
command: "command";
|
|
38
|
+
service: "service";
|
|
39
|
+
"codex-app-server": "codex-app-server";
|
|
40
|
+
"dev-server": "dev-server";
|
|
41
|
+
"test-runner": "test-runner";
|
|
42
|
+
watcher: "watcher";
|
|
43
|
+
}>>;
|
|
44
|
+
mode: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
45
|
+
foreground: "foreground";
|
|
46
|
+
background: "background";
|
|
47
|
+
}>>;
|
|
48
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
49
|
+
}, import("zod/v4/core").$strict>;
|
|
50
|
+
static readonly executeCommandOutputSchema: import("zod").ZodObject<{
|
|
51
|
+
sandboxId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
52
|
+
processId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
53
|
+
streamId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
54
|
+
streamClientId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
55
|
+
success: import("zod").ZodBoolean;
|
|
56
|
+
exitCode: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
57
|
+
output: import("zod").ZodOptional<import("zod").ZodString>;
|
|
58
|
+
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
59
|
+
command: import("zod").ZodOptional<import("zod").ZodString>;
|
|
60
|
+
status: import("zod").ZodOptional<import("zod").ZodString>;
|
|
61
|
+
durationMs: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
62
|
+
}, import("zod/v4/core").$strip>;
|
|
63
|
+
private readonly runtime;
|
|
64
|
+
private readonly stateValue;
|
|
65
|
+
private constructor();
|
|
66
|
+
static create<Runtime extends AnyDomainRuntime>(runtime: SandboxRuntimeHandle<Runtime>, config: SandboxConfig): Promise<Sandbox<Runtime>>;
|
|
67
|
+
static from<Runtime extends AnyDomainRuntime>(runtime: SandboxRuntimeHandle<Runtime>, state: SerializedSandboxState): Sandbox<Runtime>;
|
|
68
|
+
static [WORKFLOW_SERIALIZE](instance: Sandbox<any>): SerializedSandbox;
|
|
69
|
+
static [WORKFLOW_DESERIALIZE](data: SerializedSandbox): Sandbox;
|
|
70
|
+
get sandboxId(): string;
|
|
71
|
+
get state(): SerializedSandboxState;
|
|
72
|
+
executeCommand(input: SandboxExecuteCommandInput): Promise<SandboxExecuteCommandOutput>;
|
|
73
|
+
actions(): SandboxActions;
|
|
74
|
+
}
|
|
75
|
+
export {};
|
|
76
|
+
//# sourceMappingURL=sandbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC1E,OAAO,KAAK,EAAE,cAA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IACtE,MAAM,CAAC,QAAQ,CAAC,wBAAwB,mBAAsC;IAC9E,MAAM,CAAC,QAAQ,CAAC,yBAAyB;;;;;;;;;;;;;;;;;;sCAAmC;IAC5E,MAAM,CAAC,QAAQ,CAAC,0BAA0B;;;;;;;;;;;;qCAAoC;IAE9E,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA+B;IACvD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAwB;IAEnD,OAAO;WAQM,MAAM,CAAC,OAAO,SAAS,gBAAgB,EAClD,OAAO,EAAE,oBAAoB,CAAC,OAAO,CAAC,EACtC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAU5B,MAAM,CAAC,IAAI,CAAC,OAAO,SAAS,gBAAgB,EAC1C,OAAO,EAAE,oBAAoB,CAAC,OAAO,CAAC,EACtC,KAAK,EAAE,sBAAsB,GAC5B,OAAO,CAAC,OAAO,CAAC;IAInB,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,iBAAiB;IAOtE,MAAM,CAAC,CAAC,oBAAoB,CAAC,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO;IAI/D,IAAI,SAAS,WAEZ;IAED,IAAI,KAAK,IAAI,sBAAsB,CAElC;IAEK,cAAc,CAAC,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAgD7F,OAAO,IAAI,cAAc;CAU1B"}
|
package/dist/sandbox.js
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { WORKFLOW_DESERIALIZE, WORKFLOW_SERIALIZE } from "@workflow/serde";
|
|
2
|
+
import { defineAction } from "@ekairos/events";
|
|
3
|
+
import { SANDBOX_EXECUTE_COMMAND_ACTION_NAME, sandboxExecuteCommandInputSchema, sandboxExecuteCommandOutputSchema, } from "./contract.js";
|
|
4
|
+
function cleanRecord(value) {
|
|
5
|
+
return Object.fromEntries(Object.entries(value).filter(([, entry]) => entry !== undefined));
|
|
6
|
+
}
|
|
7
|
+
function asString(value) {
|
|
8
|
+
if (typeof value === "string")
|
|
9
|
+
return value;
|
|
10
|
+
if (value === null || value === undefined)
|
|
11
|
+
return "";
|
|
12
|
+
return String(value);
|
|
13
|
+
}
|
|
14
|
+
function asNumber(value) {
|
|
15
|
+
const number = typeof value === "number" ? value : Number(value);
|
|
16
|
+
return Number.isFinite(number) ? number : undefined;
|
|
17
|
+
}
|
|
18
|
+
function asPorts(value) {
|
|
19
|
+
if (!Array.isArray(value))
|
|
20
|
+
return undefined;
|
|
21
|
+
const ports = value
|
|
22
|
+
.map((entry) => Number(entry))
|
|
23
|
+
.filter((entry) => Number.isInteger(entry) && entry > 0);
|
|
24
|
+
return ports.length > 0 ? ports : undefined;
|
|
25
|
+
}
|
|
26
|
+
async function readSandboxState(db, sandboxId) {
|
|
27
|
+
const result = await db.query({
|
|
28
|
+
sandbox_sandboxes: { $: { where: { id: sandboxId }, limit: 1 } },
|
|
29
|
+
});
|
|
30
|
+
const row = result?.sandbox_sandboxes?.[0] ?? {};
|
|
31
|
+
return cleanRecord({
|
|
32
|
+
version: 1,
|
|
33
|
+
sandboxId,
|
|
34
|
+
provider: asString(row.provider),
|
|
35
|
+
externalSandboxId: asString(row.externalSandboxId) || undefined,
|
|
36
|
+
runtime: asString(row.runtime) || undefined,
|
|
37
|
+
ports: asPorts(row.ports),
|
|
38
|
+
purpose: asString(row.purpose) || undefined,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
async function resolveSandboxDomain(runtime) {
|
|
42
|
+
const rootDomain = runtime.meta?.().domain;
|
|
43
|
+
if (!rootDomain) {
|
|
44
|
+
throw new Error("sandbox_domain_required");
|
|
45
|
+
}
|
|
46
|
+
const scoped = await runtime.use(rootDomain);
|
|
47
|
+
if (!scoped.actions) {
|
|
48
|
+
throw new Error("sandbox_actions_required");
|
|
49
|
+
}
|
|
50
|
+
return scoped;
|
|
51
|
+
}
|
|
52
|
+
function normalizeState(state) {
|
|
53
|
+
const sandboxId = asString(state.sandboxId).trim();
|
|
54
|
+
if (!sandboxId) {
|
|
55
|
+
throw new Error("Sandbox requires a sandboxId.");
|
|
56
|
+
}
|
|
57
|
+
return cleanRecord({
|
|
58
|
+
version: 1,
|
|
59
|
+
sandboxId,
|
|
60
|
+
provider: state.provider,
|
|
61
|
+
externalSandboxId: asString(state.externalSandboxId).trim() || undefined,
|
|
62
|
+
runtime: asString(state.runtime).trim() || undefined,
|
|
63
|
+
ports: asPorts(state.ports),
|
|
64
|
+
purpose: asString(state.purpose).trim() || undefined,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
export class Sandbox {
|
|
68
|
+
constructor(runtime, state) {
|
|
69
|
+
this.runtime = runtime;
|
|
70
|
+
this.stateValue = normalizeState(state);
|
|
71
|
+
}
|
|
72
|
+
static async create(runtime, config) {
|
|
73
|
+
const scoped = await resolveSandboxDomain(runtime);
|
|
74
|
+
const created = await scoped.actions.createSandbox(config);
|
|
75
|
+
if (!created.ok) {
|
|
76
|
+
throw new Error(created.error);
|
|
77
|
+
}
|
|
78
|
+
const state = await readSandboxState(scoped.db, created.data.sandboxId);
|
|
79
|
+
return new Sandbox(runtime, state);
|
|
80
|
+
}
|
|
81
|
+
static from(runtime, state) {
|
|
82
|
+
return new Sandbox(runtime, state);
|
|
83
|
+
}
|
|
84
|
+
static [WORKFLOW_SERIALIZE](instance) {
|
|
85
|
+
return {
|
|
86
|
+
runtime: instance.runtime,
|
|
87
|
+
state: instance.stateValue,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
static [WORKFLOW_DESERIALIZE](data) {
|
|
91
|
+
return new Sandbox(data.runtime, data.state);
|
|
92
|
+
}
|
|
93
|
+
get sandboxId() {
|
|
94
|
+
return this.stateValue.sandboxId;
|
|
95
|
+
}
|
|
96
|
+
get state() {
|
|
97
|
+
return { ...this.stateValue };
|
|
98
|
+
}
|
|
99
|
+
async executeCommand(input) {
|
|
100
|
+
const parsed = sandboxExecuteCommandInputSchema.parse(input);
|
|
101
|
+
const domain = await resolveSandboxDomain(this.runtime);
|
|
102
|
+
const run = await domain.actions.runCommandProcess({
|
|
103
|
+
sandboxId: this.stateValue.sandboxId,
|
|
104
|
+
command: parsed.command,
|
|
105
|
+
args: parsed.args ?? [],
|
|
106
|
+
cwd: parsed.cwd,
|
|
107
|
+
env: parsed.env,
|
|
108
|
+
kind: parsed.kind ?? "command",
|
|
109
|
+
mode: parsed.mode ?? "foreground",
|
|
110
|
+
metadata: {
|
|
111
|
+
source: "sandbox.action",
|
|
112
|
+
...(parsed.metadata ?? {}),
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
if (!run.ok) {
|
|
116
|
+
return sandboxExecuteCommandOutputSchema.parse({
|
|
117
|
+
sandboxId: this.stateValue.sandboxId,
|
|
118
|
+
success: false,
|
|
119
|
+
error: run.error,
|
|
120
|
+
command: parsed.args && parsed.args.length > 0
|
|
121
|
+
? [parsed.command, ...parsed.args].join(" ")
|
|
122
|
+
: parsed.command,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
const result = (run.data.result ?? {});
|
|
126
|
+
const exitCode = asNumber(result.exitCode);
|
|
127
|
+
return sandboxExecuteCommandOutputSchema.parse(cleanRecord({
|
|
128
|
+
sandboxId: this.stateValue.sandboxId,
|
|
129
|
+
processId: run.data.processId,
|
|
130
|
+
streamId: run.data.streamId,
|
|
131
|
+
streamClientId: run.data.streamClientId,
|
|
132
|
+
success: Boolean(result.success ?? (exitCode === undefined || exitCode === 0)),
|
|
133
|
+
exitCode,
|
|
134
|
+
output: asString(result.output) || undefined,
|
|
135
|
+
error: asString(result.error) || undefined,
|
|
136
|
+
command: asString(result.command) || undefined,
|
|
137
|
+
status: exitCode === undefined ? undefined : exitCode === 0 ? "exited" : "failed",
|
|
138
|
+
}));
|
|
139
|
+
}
|
|
140
|
+
actions() {
|
|
141
|
+
return {
|
|
142
|
+
[SANDBOX_EXECUTE_COMMAND_ACTION_NAME]: defineAction({
|
|
143
|
+
description: "Run a shell command in this sandbox.",
|
|
144
|
+
input: sandboxExecuteCommandInputSchema,
|
|
145
|
+
output: sandboxExecuteCommandOutputSchema,
|
|
146
|
+
execute: async ({ input }) => this.executeCommand(input),
|
|
147
|
+
}),
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
Sandbox.executeCommandActionName = SANDBOX_EXECUTE_COMMAND_ACTION_NAME;
|
|
152
|
+
Sandbox.executeCommandInputSchema = sandboxExecuteCommandInputSchema;
|
|
153
|
+
Sandbox.executeCommandOutputSchema = sandboxExecuteCommandOutputSchema;
|
|
154
|
+
//# sourceMappingURL=sandbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAE1E,OAAO,EAAE,YAAY,EAAsB,MAAM,iBAAiB,CAAA;AAElE,OAAO,EACL,mCAAmC,EACnC,gCAAgC,EAChC,iCAAiC,GAGlC,MAAM,eAAe,CAAA;AAgCtB,SAAS,WAAW,CAAoC,KAAQ;IAC9D,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAC5D,CAAA;AACR,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAC3C,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,EAAE,CAAA;IACpD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAA;AACtB,CAAC;AAED,SAAS,QAAQ,CAAC,KAA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,mCAAmC,CAAA;AAC9D,iCAAyB,GAAG,gCAAgC,CAAA;AAC5D,kCAA0B,GAAG,iCAAiC,CAAA"}
|
package/dist/schema.d.ts
CHANGED
|
@@ -1,173 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
args?: string[];
|
|
20
|
-
};
|
|
21
|
-
type SandboxFileInput = {
|
|
22
|
-
path: string;
|
|
23
|
-
contentBase64: string;
|
|
24
|
-
};
|
|
25
|
-
type SandboxRunCommandProcessInput = SandboxRunCommandInput & {
|
|
26
|
-
cwd?: string;
|
|
27
|
-
env?: Record<string, unknown>;
|
|
28
|
-
kind?: "command" | "service" | "codex-app-server" | "dev-server" | "test-runner" | "watcher";
|
|
29
|
-
mode?: "foreground" | "background";
|
|
30
|
-
metadata?: Record<string, unknown>;
|
|
31
|
-
};
|
|
32
|
-
type SandboxObservedProcessStartInput = {
|
|
33
|
-
sandboxId: string;
|
|
34
|
-
command: string;
|
|
35
|
-
args?: string[];
|
|
36
|
-
cwd?: string;
|
|
37
|
-
env?: Record<string, unknown>;
|
|
38
|
-
kind?: "command" | "service" | "codex-app-server" | "dev-server" | "test-runner" | "watcher";
|
|
39
|
-
mode?: "foreground" | "background";
|
|
40
|
-
externalProcessId?: string;
|
|
41
|
-
metadata?: Record<string, unknown>;
|
|
42
|
-
};
|
|
43
|
-
type SandboxObservedProcessAppendInput = {
|
|
44
|
-
processId: string;
|
|
45
|
-
type: "stdout" | "stderr" | "status" | "exit" | "error" | "heartbeat" | "metadata";
|
|
46
|
-
data?: Record<string, unknown>;
|
|
47
|
-
};
|
|
48
|
-
type SandboxObservedProcessFinishInput = {
|
|
49
|
-
processId: string;
|
|
50
|
-
status?: "exited" | "failed" | "killed" | "lost";
|
|
51
|
-
exitCode?: number;
|
|
52
|
-
errorText?: string;
|
|
53
|
-
metadata?: Record<string, unknown>;
|
|
54
|
-
};
|
|
55
|
-
type SandboxProcessStreamChunk = {
|
|
56
|
-
type: "stdout" | "stderr" | "status" | "exit" | "error" | "heartbeat" | "metadata";
|
|
57
|
-
data?: Record<string, unknown>;
|
|
58
|
-
};
|
|
59
|
-
type SandboxProcessRunResult = {
|
|
60
|
-
processId: string;
|
|
61
|
-
streamId: string;
|
|
62
|
-
streamClientId: string;
|
|
63
|
-
result?: CommandResult;
|
|
64
|
-
};
|
|
65
|
-
type SandboxAuthInstallInput = {
|
|
66
|
-
sandboxId: string;
|
|
67
|
-
codexHome?: string;
|
|
68
|
-
authJsonPath?: string;
|
|
69
|
-
credentialsJsonPath?: string;
|
|
70
|
-
configTomlPath?: string;
|
|
71
|
-
};
|
|
72
|
-
type SandboxCreateEkairosAppInput = {
|
|
73
|
-
sandboxId: string;
|
|
74
|
-
appDir: string;
|
|
75
|
-
packageManager?: string;
|
|
76
|
-
instantTokenEnvName?: string;
|
|
77
|
-
};
|
|
78
|
-
export declare function createSandboxExecute({ runtime, input, }: {
|
|
79
|
-
runtime: SandboxRuntime;
|
|
80
|
-
input: SandboxConfig;
|
|
81
|
-
}): Promise<ServiceResult<{
|
|
82
|
-
sandboxId: string;
|
|
83
|
-
}>>;
|
|
84
|
-
export declare function stopSandboxExecute({ runtime, input, }: {
|
|
85
|
-
runtime: SandboxRuntime;
|
|
86
|
-
input: {
|
|
87
|
-
sandboxId: string;
|
|
88
|
-
};
|
|
89
|
-
}): Promise<ServiceResult<void>>;
|
|
90
|
-
export declare function runCommandExecute({ runtime, input, }: {
|
|
91
|
-
runtime: SandboxRuntime;
|
|
92
|
-
input: SandboxRunCommandInput;
|
|
93
|
-
}): Promise<ServiceResult<CommandResult>>;
|
|
94
|
-
export declare function runCommandProcessExecute({ runtime, input, }: {
|
|
95
|
-
runtime: SandboxRuntime;
|
|
96
|
-
input: SandboxRunCommandProcessInput;
|
|
97
|
-
}): Promise<ServiceResult<SandboxProcessRunResult>>;
|
|
98
|
-
export declare function readProcessStreamExecute({ runtime, input, }: {
|
|
99
|
-
runtime: SandboxRuntime;
|
|
100
|
-
input: {
|
|
101
|
-
processId: string;
|
|
102
|
-
};
|
|
103
|
-
}): Promise<ServiceResult<{
|
|
104
|
-
chunks: SandboxProcessStreamChunk[];
|
|
105
|
-
byteOffset: number;
|
|
106
|
-
}>>;
|
|
107
|
-
export declare function startObservedProcessExecute({ runtime, input, }: {
|
|
108
|
-
runtime: SandboxRuntime;
|
|
109
|
-
input: SandboxObservedProcessStartInput;
|
|
110
|
-
}): Promise<ServiceResult<SandboxProcessRunResult>>;
|
|
111
|
-
export declare function appendObservedProcessChunkExecute({ runtime, input, }: {
|
|
112
|
-
runtime: SandboxRuntime;
|
|
113
|
-
input: SandboxObservedProcessAppendInput;
|
|
114
|
-
}): Promise<ServiceResult<void>>;
|
|
115
|
-
export declare function finishObservedProcessExecute({ runtime, input, }: {
|
|
116
|
-
runtime: SandboxRuntime;
|
|
117
|
-
input: SandboxObservedProcessFinishInput;
|
|
118
|
-
}): Promise<ServiceResult<void>>;
|
|
119
|
-
export declare function writeFilesExecute({ runtime, input, }: {
|
|
120
|
-
runtime: SandboxRuntime;
|
|
121
|
-
input: {
|
|
122
|
-
sandboxId: string;
|
|
123
|
-
files: SandboxFileInput[];
|
|
124
|
-
};
|
|
125
|
-
}): Promise<ServiceResult<void>>;
|
|
126
|
-
export declare function readFileExecute({ runtime, input, }: {
|
|
127
|
-
runtime: SandboxRuntime;
|
|
128
|
-
input: {
|
|
129
|
-
sandboxId: string;
|
|
130
|
-
path: string;
|
|
131
|
-
};
|
|
132
|
-
}): Promise<ServiceResult<{
|
|
133
|
-
contentBase64: string;
|
|
134
|
-
}>>;
|
|
135
|
-
export declare function installCodexAuthExecute({ runtime, input, }: {
|
|
136
|
-
runtime: SandboxRuntime;
|
|
137
|
-
input: SandboxAuthInstallInput;
|
|
138
|
-
}): Promise<ServiceResult<{
|
|
139
|
-
authJson: boolean;
|
|
140
|
-
credentialsJson: boolean;
|
|
141
|
-
configToml: boolean;
|
|
142
|
-
}>>;
|
|
143
|
-
export declare function getSandboxExecute({ runtime, input, }: {
|
|
144
|
-
runtime: SandboxRuntime;
|
|
145
|
-
input: {
|
|
146
|
-
sandboxId: string;
|
|
147
|
-
};
|
|
148
|
-
}): Promise<ServiceResult<Record<string, unknown>>>;
|
|
149
|
-
export declare function createCheckpointExecute({ runtime, input, }: {
|
|
150
|
-
runtime: SandboxRuntime;
|
|
151
|
-
input: {
|
|
152
|
-
sandboxId: string;
|
|
153
|
-
comment?: string;
|
|
154
|
-
};
|
|
155
|
-
}): Promise<ServiceResult<{
|
|
156
|
-
checkpointId: string;
|
|
157
|
-
}>>;
|
|
158
|
-
export declare function getPortUrlExecute({ runtime, input, }: {
|
|
159
|
-
runtime: SandboxRuntime;
|
|
160
|
-
input: {
|
|
161
|
-
sandboxId: string;
|
|
162
|
-
port: number;
|
|
163
|
-
};
|
|
164
|
-
}): Promise<ServiceResult<{
|
|
165
|
-
url: string;
|
|
166
|
-
}>>;
|
|
167
|
-
export declare function createEkairosAppExecute({ runtime, input, }: {
|
|
168
|
-
runtime: SandboxRuntime;
|
|
169
|
-
input: SandboxCreateEkairosAppInput;
|
|
170
|
-
}): Promise<ServiceResult<SandboxProcessRunResult>>;
|
|
171
|
-
export declare const sandboxDomain: DomainSchemaResult;
|
|
172
|
-
export {};
|
|
1
|
+
export declare const sandboxSchemaDomain: import("@ekairos/domain").DomainSchemaResult<{
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
[x: number]: any;
|
|
4
|
+
[x: symbol]: any;
|
|
5
|
+
}, {
|
|
6
|
+
[x: string]: any;
|
|
7
|
+
[x: number]: any;
|
|
8
|
+
[x: symbol]: any;
|
|
9
|
+
}, import("@instantdb/core").RoomsDef, {}, "sandbox", string>;
|
|
10
|
+
export declare const sandboxDomain: import("@ekairos/domain").DomainSchemaResult<{
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
[x: number]: any;
|
|
13
|
+
[x: symbol]: any;
|
|
14
|
+
}, {
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
[x: number]: any;
|
|
17
|
+
[x: symbol]: any;
|
|
18
|
+
}, import("@instantdb/core").RoomsDef, {}, "sandbox", string>;
|
|
173
19
|
//# sourceMappingURL=schema.d.ts.map
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB;;;;;;;;6DA6D5B,CAAA;AAEJ,eAAO,MAAM,aAAa;;;;;;;;6DAAsB,CAAA"}
|