@munitoai/cli 0.0.0-stage → 0.1.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/README.md +81 -2
- package/dist/api/client.d.ts +57 -0
- package/dist/api/types.d.ts +78 -0
- package/dist/api/urls.d.ts +11 -0
- package/dist/chunk-WSY6HMNS.js +856 -0
- package/dist/chunk-WSY6HMNS.js.map +1 -0
- package/dist/cli.js +1182 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/agents.d.ts +117 -0
- package/dist/core/ci.d.ts +78 -0
- package/dist/core/keys.d.ts +23 -0
- package/dist/core/providers.d.ts +60 -0
- package/dist/core/ssh.d.ts +10 -0
- package/dist/core/workspace.d.ts +17 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/package.json +61 -4
|
@@ -0,0 +1,856 @@
|
|
|
1
|
+
// src/api/urls.ts
|
|
2
|
+
function trimTrailingSlash(value) {
|
|
3
|
+
let end = value.length;
|
|
4
|
+
while (end > 0 && value.charCodeAt(end - 1) === 47) end -= 1;
|
|
5
|
+
return value.slice(0, end);
|
|
6
|
+
}
|
|
7
|
+
function trimLeadingSlash(value) {
|
|
8
|
+
let start = 0;
|
|
9
|
+
if (value.charCodeAt(start) === 46 && value.charCodeAt(start + 1) === 47) start += 2;
|
|
10
|
+
else if (value.charCodeAt(start) === 47) start += 1;
|
|
11
|
+
return value.slice(start);
|
|
12
|
+
}
|
|
13
|
+
function joinPath(base, path) {
|
|
14
|
+
return `${trimTrailingSlash(base)}/${trimLeadingSlash(path)}`;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// src/api/client.ts
|
|
18
|
+
var DEFAULT_BASE_URL = "https://api.munito.ai";
|
|
19
|
+
var REGIONS = {
|
|
20
|
+
global: "https://api.munito.ai",
|
|
21
|
+
eu: "https://api.eu.munito.ai",
|
|
22
|
+
us: "https://api.us.munito.ai"
|
|
23
|
+
};
|
|
24
|
+
var ApiError = class extends Error {
|
|
25
|
+
status;
|
|
26
|
+
code;
|
|
27
|
+
requestId;
|
|
28
|
+
constructor(status, code, message, requestId) {
|
|
29
|
+
super(message);
|
|
30
|
+
this.name = "ApiError";
|
|
31
|
+
this.status = status;
|
|
32
|
+
this.code = code;
|
|
33
|
+
this.requestId = requestId;
|
|
34
|
+
}
|
|
35
|
+
/** Whether another attempt of the same request can succeed. */
|
|
36
|
+
get retryable() {
|
|
37
|
+
return this.status === 429 || this.status >= 500;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
var SANDBOXES = "/sandboxes/v1";
|
|
41
|
+
var Client = class {
|
|
42
|
+
baseUrl;
|
|
43
|
+
apiKey;
|
|
44
|
+
attempts;
|
|
45
|
+
doFetch;
|
|
46
|
+
constructor(options) {
|
|
47
|
+
this.apiKey = options.apiKey;
|
|
48
|
+
this.baseUrl = trimTrailingSlash(options.baseUrl ?? DEFAULT_BASE_URL);
|
|
49
|
+
this.attempts = Math.max(1, options.attempts ?? 3);
|
|
50
|
+
this.doFetch = options.fetch ?? globalThis.fetch;
|
|
51
|
+
}
|
|
52
|
+
/** What this deployment has refused, so one process does not ask again. Per client: two clients can face two
|
|
53
|
+
* deployments. */
|
|
54
|
+
lacks = { wiring: false, template: false };
|
|
55
|
+
/** The caller's own key. The wiring of a harness has to put it in the guest's environment. */
|
|
56
|
+
get token() {
|
|
57
|
+
return this.apiKey;
|
|
58
|
+
}
|
|
59
|
+
headers() {
|
|
60
|
+
return { authorization: `Bearer ${this.apiKey}`, "content-type": "application/json" };
|
|
61
|
+
}
|
|
62
|
+
async raw(method, path, body, signal) {
|
|
63
|
+
let last;
|
|
64
|
+
for (let attempt = 1; attempt <= this.attempts; attempt++) {
|
|
65
|
+
const response = await this.doFetch(`${this.baseUrl}${path}`, {
|
|
66
|
+
method,
|
|
67
|
+
headers: this.headers(),
|
|
68
|
+
body: body === void 0 ? void 0 : JSON.stringify(body),
|
|
69
|
+
signal
|
|
70
|
+
});
|
|
71
|
+
if (response.ok) return response;
|
|
72
|
+
last = await toError(response);
|
|
73
|
+
if (!last.retryable || attempt === this.attempts) throw last;
|
|
74
|
+
await sleep(250 * 2 ** (attempt - 1));
|
|
75
|
+
}
|
|
76
|
+
throw last ?? new ApiError(0, "unknown", "The request failed.");
|
|
77
|
+
}
|
|
78
|
+
async request(method, path, body, signal) {
|
|
79
|
+
const response = await this.raw(method, path, body, signal);
|
|
80
|
+
const text = await response.text();
|
|
81
|
+
return text ? JSON.parse(text) : {};
|
|
82
|
+
}
|
|
83
|
+
// Sandboxes.
|
|
84
|
+
createSandbox(spec, signal) {
|
|
85
|
+
return this.request("POST", `${SANDBOXES}/sandboxes`, spec, signal);
|
|
86
|
+
}
|
|
87
|
+
getSandbox(id) {
|
|
88
|
+
return this.request("GET", `${SANDBOXES}/sandboxes/${id}`);
|
|
89
|
+
}
|
|
90
|
+
async listSandboxes() {
|
|
91
|
+
const page = await this.request("GET", `${SANDBOXES}/sandboxes`);
|
|
92
|
+
return Array.isArray(page) ? page : page.data ?? [];
|
|
93
|
+
}
|
|
94
|
+
deleteSandbox(id) {
|
|
95
|
+
return this.request("DELETE", `${SANDBOXES}/sandboxes/${id}`);
|
|
96
|
+
}
|
|
97
|
+
pauseSandbox(id) {
|
|
98
|
+
return this.request("POST", `${SANDBOXES}/sandboxes/${id}/pause`);
|
|
99
|
+
}
|
|
100
|
+
resumeSandbox(id) {
|
|
101
|
+
return this.request("POST", `${SANDBOXES}/sandboxes/${id}/resume`);
|
|
102
|
+
}
|
|
103
|
+
forkSandbox(id, count = 1) {
|
|
104
|
+
return this.request("POST", `${SANDBOXES}/sandboxes/${id}/fork`, { count });
|
|
105
|
+
}
|
|
106
|
+
// Commands.
|
|
107
|
+
exec(id, spec, signal) {
|
|
108
|
+
return this.request("POST", `${SANDBOXES}/sandboxes/${id}/exec`, spec, signal);
|
|
109
|
+
}
|
|
110
|
+
/** The same command, as the events arrive. The last event is always `exit`. */
|
|
111
|
+
async *execStream(id, spec, signal) {
|
|
112
|
+
const response = await this.raw("POST", `${SANDBOXES}/sandboxes/${id}/exec`, { ...spec, stream: true }, signal);
|
|
113
|
+
if (!response.body) throw new ApiError(0, "no_body", "The API sent no stream.");
|
|
114
|
+
for await (const line of ndjson(response.body)) yield line;
|
|
115
|
+
}
|
|
116
|
+
// Files.
|
|
117
|
+
async readFile(id, path) {
|
|
118
|
+
const query = new URLSearchParams({ path });
|
|
119
|
+
const response = await this.raw("GET", `${SANDBOXES}/sandboxes/${id}/files/content?${query}`);
|
|
120
|
+
return response.text();
|
|
121
|
+
}
|
|
122
|
+
async writeFile(id, path, content) {
|
|
123
|
+
const query = new URLSearchParams({ path });
|
|
124
|
+
const response = await this.doFetch(`${this.baseUrl}${SANDBOXES}/sandboxes/${id}/files/content?${query}`, {
|
|
125
|
+
method: "PUT",
|
|
126
|
+
headers: { authorization: `Bearer ${this.apiKey}`, "content-type": "application/octet-stream" },
|
|
127
|
+
body: content
|
|
128
|
+
});
|
|
129
|
+
if (!response.ok) throw await toError(response);
|
|
130
|
+
}
|
|
131
|
+
// Ports and SSH.
|
|
132
|
+
signPortUrl(id, port, expiresIn = 3600) {
|
|
133
|
+
return this.request("POST", `${SANDBOXES}/sandboxes/${id}/ports/${port}/url`, { expires_in: expiresIn });
|
|
134
|
+
}
|
|
135
|
+
setPort(id, port, isPublic) {
|
|
136
|
+
return this.request("PUT", `${SANDBOXES}/sandboxes/${id}/ports/${port}`, { public: isPublic });
|
|
137
|
+
}
|
|
138
|
+
createSshAccess(id) {
|
|
139
|
+
return this.request("POST", `${SANDBOXES}/sandboxes/${id}/ssh/access`, {});
|
|
140
|
+
}
|
|
141
|
+
getSsh(id) {
|
|
142
|
+
return this.request("GET", `${SANDBOXES}/sandboxes/${id}/ssh`);
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
async function toError(response) {
|
|
146
|
+
const requestId = response.headers.get("munito-request-id") ?? void 0;
|
|
147
|
+
const text = await response.text().catch(() => "");
|
|
148
|
+
try {
|
|
149
|
+
const body = JSON.parse(text);
|
|
150
|
+
const message = body.detail ?? body.message ?? body.title ?? response.statusText;
|
|
151
|
+
return new ApiError(response.status, body.code ?? String(response.status), message, requestId);
|
|
152
|
+
} catch {
|
|
153
|
+
return new ApiError(response.status, String(response.status), text || response.statusText, requestId);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
async function* ndjson(body) {
|
|
157
|
+
const decoder = new TextDecoder();
|
|
158
|
+
let buffer = "";
|
|
159
|
+
for await (const chunk of body) {
|
|
160
|
+
buffer += decoder.decode(chunk, { stream: true });
|
|
161
|
+
let index = buffer.indexOf("\n");
|
|
162
|
+
while (index >= 0) {
|
|
163
|
+
const line = buffer.slice(0, index).trim();
|
|
164
|
+
buffer = buffer.slice(index + 1);
|
|
165
|
+
if (line) yield JSON.parse(line);
|
|
166
|
+
index = buffer.indexOf("\n");
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
const rest = buffer.trim();
|
|
170
|
+
if (rest) yield JSON.parse(rest);
|
|
171
|
+
}
|
|
172
|
+
var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
173
|
+
|
|
174
|
+
// src/core/keys.ts
|
|
175
|
+
import { chmod, mkdir, readFile, rm, writeFile } from "fs/promises";
|
|
176
|
+
import { homedir } from "os";
|
|
177
|
+
import { dirname, join } from "path";
|
|
178
|
+
var ENV_KEY = "MUNITO_API_KEY";
|
|
179
|
+
var ENV_HOST = "MUNITO_HOST";
|
|
180
|
+
function configDir() {
|
|
181
|
+
const base = process.env.XDG_CONFIG_HOME ?? join(homedir(), ".config");
|
|
182
|
+
return join(base, "munito");
|
|
183
|
+
}
|
|
184
|
+
function authPath() {
|
|
185
|
+
return join(configDir(), "auth.json");
|
|
186
|
+
}
|
|
187
|
+
function resolveHost(value) {
|
|
188
|
+
if (!value) return REGIONS.global;
|
|
189
|
+
if (value in REGIONS) return REGIONS[value];
|
|
190
|
+
if (value.startsWith("http://") || value.startsWith("https://")) return trimTrailingSlash(value);
|
|
191
|
+
throw new Error(`Unknown region ${value}. Use global, eu, us, or a URL.`);
|
|
192
|
+
}
|
|
193
|
+
async function load(hostOverride) {
|
|
194
|
+
const host = resolveHost(hostOverride ?? process.env[ENV_HOST]);
|
|
195
|
+
const fromEnv = process.env[ENV_KEY]?.trim();
|
|
196
|
+
if (fromEnv) return { apiKey: fromEnv, host, source: "environment" };
|
|
197
|
+
try {
|
|
198
|
+
const saved = JSON.parse(await readFile(authPath(), "utf8"));
|
|
199
|
+
if (!saved.apiKey) return null;
|
|
200
|
+
return { apiKey: saved.apiKey, host: hostOverride ? host : resolveHost(saved.host), source: "file" };
|
|
201
|
+
} catch {
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
async function save(apiKey, host) {
|
|
206
|
+
const path = authPath();
|
|
207
|
+
await mkdir(dirname(path), { recursive: true, mode: 448 });
|
|
208
|
+
await writeFile(path, `${JSON.stringify({ apiKey, host }, null, 2)}
|
|
209
|
+
`, { mode: 384 });
|
|
210
|
+
await chmod(path, 384);
|
|
211
|
+
return path;
|
|
212
|
+
}
|
|
213
|
+
async function clear() {
|
|
214
|
+
await rm(authPath(), { force: true });
|
|
215
|
+
}
|
|
216
|
+
function mask(apiKey) {
|
|
217
|
+
if (apiKey.length <= 12) return "*".repeat(apiKey.length);
|
|
218
|
+
return `${apiKey.slice(0, 8)}\u2026${apiKey.slice(-4)}`;
|
|
219
|
+
}
|
|
220
|
+
var MissingKeyError = class extends Error {
|
|
221
|
+
constructor() {
|
|
222
|
+
super(`No API key. Run \`munito login\`, or set ${ENV_KEY}.`);
|
|
223
|
+
this.name = "MissingKeyError";
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
async function require2(hostOverride) {
|
|
227
|
+
const found = await load(hostOverride);
|
|
228
|
+
if (!found) throw new MissingKeyError();
|
|
229
|
+
return found;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// src/core/providers.ts
|
|
233
|
+
var AGENTS = ["claude", "codex", "opencode", "dsh", "hermes", "pi", "openclaw", "prime"];
|
|
234
|
+
var PROVIDERS = ["munito", "anthropic", "openai"];
|
|
235
|
+
var BAKED = ["claude", "codex", "opencode", "dsh"];
|
|
236
|
+
var PACKAGES = {
|
|
237
|
+
claude: "@anthropic-ai/claude-code",
|
|
238
|
+
codex: "@openai/codex",
|
|
239
|
+
opencode: "opencode-ai",
|
|
240
|
+
dsh: "@deepseek-ai/dsh",
|
|
241
|
+
pi: "@earendil-works/pi-coding-agent",
|
|
242
|
+
openclaw: "openclaw"
|
|
243
|
+
};
|
|
244
|
+
var PLUGINS = {
|
|
245
|
+
hermes: "hermes plugins install munitoai/hermes-provider",
|
|
246
|
+
pi: "pi install npm:@munitoai/pi-provider",
|
|
247
|
+
openclaw: "openclaw plugins install --force --accept-capabilities npm:@munitoai/openclaw-provider"
|
|
248
|
+
};
|
|
249
|
+
var DEFAULT_MODEL = "zai-org/glm-5.3-flash";
|
|
250
|
+
var DEFAULT_SMALL_MODEL = "qwen/qwen3.8-27b";
|
|
251
|
+
var CLAUDE_MODEL = "zai-org/glm-5.3-flash[1m]";
|
|
252
|
+
var GUEST_HOME = "/root";
|
|
253
|
+
function claudeGates(workdir, home = GUEST_HOME) {
|
|
254
|
+
return {
|
|
255
|
+
path: `${home}/.claude.json`,
|
|
256
|
+
content: `${JSON.stringify(
|
|
257
|
+
{
|
|
258
|
+
hasCompletedOnboarding: true,
|
|
259
|
+
bypassPermissionsModeAccepted: true,
|
|
260
|
+
projects: { [workdir]: { hasTrustDialogAccepted: true, allowedTools: [] } }
|
|
261
|
+
},
|
|
262
|
+
null,
|
|
263
|
+
2
|
|
264
|
+
)}
|
|
265
|
+
`
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
var MANAGED_ENV = [
|
|
269
|
+
"ANTHROPIC_BASE_URL",
|
|
270
|
+
"ANTHROPIC_AUTH_TOKEN",
|
|
271
|
+
"ANTHROPIC_API_KEY",
|
|
272
|
+
"ANTHROPIC_MODEL",
|
|
273
|
+
"ANTHROPIC_DEFAULT_OPUS_MODEL",
|
|
274
|
+
"ANTHROPIC_DEFAULT_SONNET_MODEL",
|
|
275
|
+
"ANTHROPIC_DEFAULT_HAIKU_MODEL",
|
|
276
|
+
"CLAUDE_CODE_AUTO_MODE_SERVER",
|
|
277
|
+
"MUNITO_API_KEY",
|
|
278
|
+
"OPENAI_API_KEY",
|
|
279
|
+
"CODEX_API_KEY"
|
|
280
|
+
];
|
|
281
|
+
var WiringError = class extends Error {
|
|
282
|
+
};
|
|
283
|
+
function wire(agent, provider, auth, target, workdir = "/workspace", home = GUEST_HOME) {
|
|
284
|
+
if (auth === "subscription") return subscription(agent, workdir, home);
|
|
285
|
+
switch (provider) {
|
|
286
|
+
case "munito":
|
|
287
|
+
return munito(agent, target, workdir, home);
|
|
288
|
+
case "anthropic":
|
|
289
|
+
return vendor(agent, "anthropic", target, workdir, home);
|
|
290
|
+
case "openai":
|
|
291
|
+
return vendor(agent, "openai", target, workdir, home);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
function subscription(agent, workdir, home) {
|
|
295
|
+
if (agent === "claude") return { env: {}, unset: [...MANAGED_ENV], files: [claudeGates(workdir, home)] };
|
|
296
|
+
if (agent === "codex" || agent === "opencode") return { env: {}, unset: [...MANAGED_ENV], files: [] };
|
|
297
|
+
throw new WiringError(`${agent} has no subscription sign-in that Munito AI knows. Use --provider munito.`);
|
|
298
|
+
}
|
|
299
|
+
function munito(agent, target, workdir, home) {
|
|
300
|
+
const openai = `${target.host}/inference/v1`;
|
|
301
|
+
switch (agent) {
|
|
302
|
+
case "claude":
|
|
303
|
+
return {
|
|
304
|
+
// The Anthropic surface takes no /v1: Claude Code appends it.
|
|
305
|
+
env: {
|
|
306
|
+
ANTHROPIC_BASE_URL: `${target.host}/inference`,
|
|
307
|
+
ANTHROPIC_AUTH_TOKEN: target.token,
|
|
308
|
+
ANTHROPIC_MODEL: target.model,
|
|
309
|
+
ANTHROPIC_DEFAULT_OPUS_MODEL: target.model,
|
|
310
|
+
ANTHROPIC_DEFAULT_SONNET_MODEL: target.model,
|
|
311
|
+
ANTHROPIC_DEFAULT_HAIKU_MODEL: target.smallModel,
|
|
312
|
+
CLAUDE_CODE_AUTO_MODE_SERVER: "0"
|
|
313
|
+
},
|
|
314
|
+
unset: ["ANTHROPIC_API_KEY"],
|
|
315
|
+
files: [claudeGates(workdir, home)]
|
|
316
|
+
};
|
|
317
|
+
case "codex":
|
|
318
|
+
return {
|
|
319
|
+
env: { MUNITO_API_KEY: target.token },
|
|
320
|
+
unset: ["OPENAI_API_KEY", "CODEX_API_KEY"],
|
|
321
|
+
files: [{ path: `${home}/.codex/config.toml`, content: codexToml(openai, target.model) }]
|
|
322
|
+
};
|
|
323
|
+
case "opencode":
|
|
324
|
+
return {
|
|
325
|
+
env: { MUNITO_API_KEY: target.token },
|
|
326
|
+
unset: ["OPENAI_API_KEY"],
|
|
327
|
+
files: [{ path: `${home}/.config/opencode/opencode.json`, content: opencodeJson(openai, target.model) }]
|
|
328
|
+
};
|
|
329
|
+
case "dsh":
|
|
330
|
+
return {
|
|
331
|
+
env: { MUNITO_API_KEY: target.token },
|
|
332
|
+
unset: [],
|
|
333
|
+
files: [{ path: `${home}/.dsh/profiles/headless/cordis.patch.yml`, content: dshYaml(openai, target.model) }]
|
|
334
|
+
};
|
|
335
|
+
case "prime":
|
|
336
|
+
return {
|
|
337
|
+
env: { MUNITO_API_KEY: target.token },
|
|
338
|
+
unset: [],
|
|
339
|
+
files: [{ path: `${home}/.prime/agent/models.json`, content: primeJson(openai, target.model) }]
|
|
340
|
+
};
|
|
341
|
+
case "pi":
|
|
342
|
+
case "openclaw":
|
|
343
|
+
case "hermes":
|
|
344
|
+
return { env: { MUNITO_API_KEY: target.token }, unset: [], files: [] };
|
|
345
|
+
default:
|
|
346
|
+
throw new WiringError(
|
|
347
|
+
`Munito AI has no wiring for ${agent}. See https://docs.munito.ai/reference/agents/${agent}.`
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
function vendor(agent, provider, target, workdir, home) {
|
|
352
|
+
if (provider === "anthropic") {
|
|
353
|
+
if (agent !== "claude") throw new WiringError(`${agent} does not take the Anthropic API. Use --provider munito.`);
|
|
354
|
+
return {
|
|
355
|
+
env: { ANTHROPIC_API_KEY: target.token },
|
|
356
|
+
unset: MANAGED_ENV.filter((name) => name !== "ANTHROPIC_API_KEY"),
|
|
357
|
+
files: [claudeGates(workdir, home)]
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
if (agent !== "codex" && agent !== "opencode") {
|
|
361
|
+
throw new WiringError(`${agent} does not take the OpenAI API. Use --provider munito.`);
|
|
362
|
+
}
|
|
363
|
+
return {
|
|
364
|
+
env: { OPENAI_API_KEY: target.token },
|
|
365
|
+
unset: MANAGED_ENV.filter((name) => name !== "OPENAI_API_KEY"),
|
|
366
|
+
files: []
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
function codexToml(baseUrl, model) {
|
|
370
|
+
return [
|
|
371
|
+
`model = "${model}"`,
|
|
372
|
+
`model_provider = "munito"`,
|
|
373
|
+
``,
|
|
374
|
+
`[model_providers.munito]`,
|
|
375
|
+
`name = "Munito"`,
|
|
376
|
+
`base_url = "${baseUrl}"`,
|
|
377
|
+
`env_key = "MUNITO_API_KEY"`,
|
|
378
|
+
`wire_api = "responses"`,
|
|
379
|
+
``
|
|
380
|
+
].join("\n");
|
|
381
|
+
}
|
|
382
|
+
function opencodeJson(baseUrl, model) {
|
|
383
|
+
return `${JSON.stringify(
|
|
384
|
+
{
|
|
385
|
+
$schema: "https://opencode.ai/config.json",
|
|
386
|
+
model: `munito/${model}`,
|
|
387
|
+
provider: {
|
|
388
|
+
munito: {
|
|
389
|
+
npm: "@ai-sdk/openai-compatible",
|
|
390
|
+
name: "Munito",
|
|
391
|
+
options: { baseURL: baseUrl, apiKey: "{env:MUNITO_API_KEY}" },
|
|
392
|
+
models: { [model]: { name: model } }
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
null,
|
|
397
|
+
2
|
|
398
|
+
)}
|
|
399
|
+
`;
|
|
400
|
+
}
|
|
401
|
+
function primeJson(baseUrl, model) {
|
|
402
|
+
const body = {
|
|
403
|
+
providers: {
|
|
404
|
+
munito: {
|
|
405
|
+
name: "Munito AI",
|
|
406
|
+
baseUrl,
|
|
407
|
+
api: "openai-completions",
|
|
408
|
+
apiKey: "MUNITO_API_KEY",
|
|
409
|
+
models: [
|
|
410
|
+
{
|
|
411
|
+
id: model,
|
|
412
|
+
name: model,
|
|
413
|
+
reasoning: true,
|
|
414
|
+
contextWindow: 1048576,
|
|
415
|
+
maxTokens: 131072,
|
|
416
|
+
compat: { sendSessionAffinityHeaders: true }
|
|
417
|
+
}
|
|
418
|
+
]
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
};
|
|
422
|
+
return `${JSON.stringify(body, null, 2)}
|
|
423
|
+
`;
|
|
424
|
+
}
|
|
425
|
+
function dshYaml(baseUrl, model) {
|
|
426
|
+
return [
|
|
427
|
+
`- id: llm-pi-ai`,
|
|
428
|
+
` config:`,
|
|
429
|
+
` providers:`,
|
|
430
|
+
` munito:`,
|
|
431
|
+
` displayName: Munito AI`,
|
|
432
|
+
` apiKeyEnv: MUNITO_API_KEY`,
|
|
433
|
+
` api: openai-completions`,
|
|
434
|
+
` baseURL: ${baseUrl}`,
|
|
435
|
+
` models:`,
|
|
436
|
+
` - id: ${model}`,
|
|
437
|
+
` name: ${model}`,
|
|
438
|
+
` contextWindow: 1048576`,
|
|
439
|
+
` maxTokens: 131072`,
|
|
440
|
+
` reasoningEfforts:`,
|
|
441
|
+
` low: low`,
|
|
442
|
+
` high: high`,
|
|
443
|
+
` max: max`,
|
|
444
|
+
`- id: agent-default-model`,
|
|
445
|
+
` config:`,
|
|
446
|
+
` provider: munito`,
|
|
447
|
+
` model: ${model}`,
|
|
448
|
+
``
|
|
449
|
+
].join("\n");
|
|
450
|
+
}
|
|
451
|
+
function headlessArgv(agent, prompt, options = {}) {
|
|
452
|
+
switch (agent) {
|
|
453
|
+
case "claude": {
|
|
454
|
+
const argv = [
|
|
455
|
+
"claude",
|
|
456
|
+
"-p",
|
|
457
|
+
prompt,
|
|
458
|
+
"--allowedTools",
|
|
459
|
+
"Bash",
|
|
460
|
+
"Edit",
|
|
461
|
+
"Write",
|
|
462
|
+
"Read",
|
|
463
|
+
"--output-format",
|
|
464
|
+
"json"
|
|
465
|
+
];
|
|
466
|
+
if (options.maxTurns) argv.push("--max-turns", String(options.maxTurns));
|
|
467
|
+
if (options.resume) argv.push("--resume", options.resume);
|
|
468
|
+
return argv;
|
|
469
|
+
}
|
|
470
|
+
case "codex":
|
|
471
|
+
return ["codex", "exec", prompt];
|
|
472
|
+
case "opencode":
|
|
473
|
+
return ["opencode", "run", prompt];
|
|
474
|
+
case "dsh":
|
|
475
|
+
return ["dsh", "headless", prompt];
|
|
476
|
+
case "pi":
|
|
477
|
+
return ["pi", "--print", "--model", `munito/${options.model ?? DEFAULT_MODEL}`, prompt];
|
|
478
|
+
case "openclaw":
|
|
479
|
+
throw new WiringError("OpenClaw has no headless coding turn. Use `munito ssh <id>` and run `openclaw`.");
|
|
480
|
+
default:
|
|
481
|
+
throw new WiringError(`${agent} is not installed in the sandbox. ${PLUGINS[agent] ?? ""}`.trim());
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
function shellArgv(agent) {
|
|
485
|
+
if (agent === "dsh") return ["dsh"];
|
|
486
|
+
if (agent === "opencode") return ["opencode"];
|
|
487
|
+
if (!PACKAGES[agent]) throw new WiringError(`${agent} is not installed in the sandbox.`);
|
|
488
|
+
return [agent];
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
// src/core/agents.ts
|
|
492
|
+
var AGENT_TEMPLATE = "agent";
|
|
493
|
+
var AGENT_TEMPLATE_FALLBACK = "ubuntu";
|
|
494
|
+
var WORKDIR = "/workspace";
|
|
495
|
+
var MAX_COMMAND_S = 1800;
|
|
496
|
+
async function runAgent(client, options) {
|
|
497
|
+
const emit = options.onEvent ?? (() => {
|
|
498
|
+
});
|
|
499
|
+
const provider = options.provider ?? "munito";
|
|
500
|
+
const auth = options.auth ?? "token";
|
|
501
|
+
const workdir = options.workdir ?? WORKDIR;
|
|
502
|
+
const agent = options.agent;
|
|
503
|
+
const started = Date.now();
|
|
504
|
+
const sandbox = await createAgentSandbox(client, {
|
|
505
|
+
...options,
|
|
506
|
+
agent,
|
|
507
|
+
provider,
|
|
508
|
+
auth,
|
|
509
|
+
workdir,
|
|
510
|
+
internet: true,
|
|
511
|
+
metadata: { "munito.cli": "agent", "munito.agent": agent, ...options.metadata },
|
|
512
|
+
onEvent: emit
|
|
513
|
+
});
|
|
514
|
+
let kept = false;
|
|
515
|
+
try {
|
|
516
|
+
const wantPatch = Boolean(options.files?.length) && options.patch !== false;
|
|
517
|
+
if (options.files?.length) {
|
|
518
|
+
let bytes = 0;
|
|
519
|
+
for (const file of options.files) {
|
|
520
|
+
await client.writeFile(sandbox.id, joinPath(workdir, file.path), file.content);
|
|
521
|
+
bytes += Buffer.byteLength(file.content);
|
|
522
|
+
}
|
|
523
|
+
emit({ type: "files.uploaded", count: options.files.length, bytes });
|
|
524
|
+
if (wantPatch) await client.exec(sandbox.id, { command: baseCommit(workdir), timeout: 60 });
|
|
525
|
+
}
|
|
526
|
+
await ensureHarness(client, sandbox.id, agent, emit);
|
|
527
|
+
const argv = headlessArgv(agent, options.prompt, { maxTurns: options.maxTurns, model: options.model });
|
|
528
|
+
emit({ type: "agent.started", argv });
|
|
529
|
+
const ranAt = Date.now();
|
|
530
|
+
let stdout = "";
|
|
531
|
+
let stderr = "";
|
|
532
|
+
let exitCode = -1;
|
|
533
|
+
const stream = client.execStream(
|
|
534
|
+
sandbox.id,
|
|
535
|
+
{
|
|
536
|
+
command: argv,
|
|
537
|
+
cwd: workdir,
|
|
538
|
+
timeout: Math.min(options.timeout ?? MAX_COMMAND_S, MAX_COMMAND_S)
|
|
539
|
+
},
|
|
540
|
+
options.signal
|
|
541
|
+
);
|
|
542
|
+
for await (const event of stream) {
|
|
543
|
+
if (event.type === "stdout") {
|
|
544
|
+
stdout += event.data;
|
|
545
|
+
emit({ type: "output", stream: "stdout", data: event.data });
|
|
546
|
+
} else if (event.type === "stderr") {
|
|
547
|
+
stderr += event.data;
|
|
548
|
+
emit({ type: "output", stream: "stderr", data: event.data });
|
|
549
|
+
} else {
|
|
550
|
+
exitCode = event.exit_code;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
const durationMs = Date.now() - ranAt;
|
|
554
|
+
emit({ type: "agent.finished", exitCode, ms: durationMs });
|
|
555
|
+
let patch = "";
|
|
556
|
+
if (wantPatch) {
|
|
557
|
+
const diff = await client.exec(sandbox.id, { command: diffCommand(workdir), timeout: 120 });
|
|
558
|
+
patch = diff.exit_code === 0 ? diff.stdout : "";
|
|
559
|
+
if (patch.trim()) emit({ type: "patch.ready", bytes: Buffer.byteLength(patch) });
|
|
560
|
+
}
|
|
561
|
+
const answer = unwrap(agent, stdout);
|
|
562
|
+
kept = Boolean(options.keep);
|
|
563
|
+
return {
|
|
564
|
+
sandboxId: sandbox.id,
|
|
565
|
+
exitCode,
|
|
566
|
+
result: answer.result,
|
|
567
|
+
sessionId: answer.sessionId,
|
|
568
|
+
stdout,
|
|
569
|
+
stderr,
|
|
570
|
+
patch,
|
|
571
|
+
durationMs: Date.now() - started,
|
|
572
|
+
kept
|
|
573
|
+
};
|
|
574
|
+
} finally {
|
|
575
|
+
if (options.keep) {
|
|
576
|
+
emit({ type: "sandbox.kept", sandboxId: sandbox.id });
|
|
577
|
+
} else {
|
|
578
|
+
await client.deleteSandbox(sandbox.id).catch(() => {
|
|
579
|
+
});
|
|
580
|
+
emit({ type: "sandbox.deleted", sandboxId: sandbox.id });
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
async function createAgentSandbox(client, options) {
|
|
585
|
+
const emit = options.onEvent ?? (() => {
|
|
586
|
+
});
|
|
587
|
+
const { agent } = options;
|
|
588
|
+
const provider = options.provider ?? "munito";
|
|
589
|
+
const auth = options.auth ?? "token";
|
|
590
|
+
const workdir = options.workdir ?? WORKDIR;
|
|
591
|
+
const wiring = wire(
|
|
592
|
+
agent,
|
|
593
|
+
provider,
|
|
594
|
+
auth,
|
|
595
|
+
{
|
|
596
|
+
host: client.baseUrl,
|
|
597
|
+
token: tokenFor(client, provider, auth),
|
|
598
|
+
model: options.model ?? (agent === "claude" ? CLAUDE_MODEL : DEFAULT_MODEL),
|
|
599
|
+
smallModel: options.smallModel ?? DEFAULT_SMALL_MODEL
|
|
600
|
+
},
|
|
601
|
+
workdir
|
|
602
|
+
);
|
|
603
|
+
emit({ type: "sandbox.creating" });
|
|
604
|
+
const createdAt = Date.now();
|
|
605
|
+
const spec = {
|
|
606
|
+
template: options.template ?? AGENT_TEMPLATE,
|
|
607
|
+
size: options.size ?? "default",
|
|
608
|
+
internet: options.internet ?? true,
|
|
609
|
+
persistent: options.persistent,
|
|
610
|
+
timeout: options.timeout ?? 3600,
|
|
611
|
+
metadata: options.metadata ?? { "munito.cli": "agent", "munito.agent": agent }
|
|
612
|
+
};
|
|
613
|
+
const sandbox = await createWithWiring(client, spec, {
|
|
614
|
+
agent,
|
|
615
|
+
provider,
|
|
616
|
+
auth,
|
|
617
|
+
model: options.model,
|
|
618
|
+
token: provider === "munito" && auth === "token" ? client.token : "",
|
|
619
|
+
fallbackEnv: wiring.env,
|
|
620
|
+
signal: options.signal
|
|
621
|
+
});
|
|
622
|
+
emit({ type: "sandbox.created", sandboxId: sandbox.id, ms: Date.now() - createdAt });
|
|
623
|
+
try {
|
|
624
|
+
for (const file of wiring.files) await client.writeFile(sandbox.id, file.path, file.content);
|
|
625
|
+
if (wiring.files.length) emit({ type: "wiring.written", files: wiring.files.length });
|
|
626
|
+
} catch (error) {
|
|
627
|
+
await client.deleteSandbox(sandbox.id).catch(() => {
|
|
628
|
+
});
|
|
629
|
+
throw error;
|
|
630
|
+
}
|
|
631
|
+
return sandbox;
|
|
632
|
+
}
|
|
633
|
+
var UNKNOWN_FIELD = /extra inputs are not permitted/i;
|
|
634
|
+
var UNKNOWN_TEMPLATE = /unknown template/i;
|
|
635
|
+
async function createWithWiring(client, spec, options) {
|
|
636
|
+
const env = options.token ? { MUNITO_API_KEY: options.token } : {};
|
|
637
|
+
for (; ; ) {
|
|
638
|
+
const body = { ...spec };
|
|
639
|
+
if (client.lacks.template && body.template === AGENT_TEMPLATE) body.template = AGENT_TEMPLATE_FALLBACK;
|
|
640
|
+
if (client.lacks.wiring) {
|
|
641
|
+
body.env = options.fallbackEnv;
|
|
642
|
+
} else {
|
|
643
|
+
Object.assign(body, {
|
|
644
|
+
agent: options.agent,
|
|
645
|
+
provider: options.provider,
|
|
646
|
+
auth: options.auth,
|
|
647
|
+
model: options.model,
|
|
648
|
+
env
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
try {
|
|
652
|
+
return await client.createSandbox(body, options.signal);
|
|
653
|
+
} catch (error) {
|
|
654
|
+
const refusal = error instanceof ApiError && (error.status === 422 || error.status === 400) ? error.message : "";
|
|
655
|
+
if (!client.lacks.wiring && UNKNOWN_FIELD.test(refusal)) {
|
|
656
|
+
client.lacks.wiring = true;
|
|
657
|
+
continue;
|
|
658
|
+
}
|
|
659
|
+
if (!client.lacks.template && UNKNOWN_TEMPLATE.test(refusal) && body.template === AGENT_TEMPLATE) {
|
|
660
|
+
client.lacks.template = true;
|
|
661
|
+
continue;
|
|
662
|
+
}
|
|
663
|
+
throw error;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
async function ensureHarness(client, sandboxId, agent, emit) {
|
|
668
|
+
const binary = shellArgv(agent)[0];
|
|
669
|
+
const present = await client.exec(sandboxId, { command: `command -v ${binary}`, timeout: 30 });
|
|
670
|
+
if (present.exit_code === 0) return;
|
|
671
|
+
const pkg = PACKAGES[agent];
|
|
672
|
+
if (!pkg) throw new Error(`${agent} is not installed in this sandbox, and Munito AI does not install it.`);
|
|
673
|
+
emit({ type: "harness.installing", agent, package: pkg });
|
|
674
|
+
const startedAt = Date.now();
|
|
675
|
+
const install = await client.exec(sandboxId, {
|
|
676
|
+
command: `npm install -g --no-audit --no-fund ${pkg}`,
|
|
677
|
+
timeout: 600
|
|
678
|
+
});
|
|
679
|
+
if (install.exit_code !== 0) {
|
|
680
|
+
throw new Error(`Could not install ${pkg}: ${(install.stderr || install.stdout).trim().split("\n").at(-1)}`);
|
|
681
|
+
}
|
|
682
|
+
emit({ type: "harness.installed", agent, ms: Date.now() - startedAt });
|
|
683
|
+
}
|
|
684
|
+
function unwrap(agent, stdout) {
|
|
685
|
+
if (agent !== "claude") return { result: stdout.trim() };
|
|
686
|
+
const line = stdout.trim().split("\n").at(-1) ?? "";
|
|
687
|
+
try {
|
|
688
|
+
const body = JSON.parse(line);
|
|
689
|
+
if (typeof body.result === "string") return { result: body.result, sessionId: body.session_id };
|
|
690
|
+
} catch {
|
|
691
|
+
}
|
|
692
|
+
return { result: stdout.trim() };
|
|
693
|
+
}
|
|
694
|
+
function tokenFor(client, provider, auth) {
|
|
695
|
+
if (auth === "subscription") return "";
|
|
696
|
+
if (provider === "munito") return client.token;
|
|
697
|
+
const name = provider === "anthropic" ? "ANTHROPIC_API_KEY" : "OPENAI_API_KEY";
|
|
698
|
+
const value = process.env[name]?.trim();
|
|
699
|
+
if (!value) throw new Error(`--provider ${provider} needs ${name} in your environment.`);
|
|
700
|
+
return value;
|
|
701
|
+
}
|
|
702
|
+
function baseCommit(workdir) {
|
|
703
|
+
return [
|
|
704
|
+
`cd ${workdir}`,
|
|
705
|
+
"git init -q 2>/dev/null || true",
|
|
706
|
+
"git config user.email agent@munito.ai",
|
|
707
|
+
"git config user.name 'Munito agent'",
|
|
708
|
+
"git add -A",
|
|
709
|
+
"git commit -qm base --allow-empty"
|
|
710
|
+
].join(" && ");
|
|
711
|
+
}
|
|
712
|
+
var NOISE = [
|
|
713
|
+
"__pycache__",
|
|
714
|
+
"node_modules",
|
|
715
|
+
".venv",
|
|
716
|
+
".pytest_cache",
|
|
717
|
+
".ruff_cache",
|
|
718
|
+
".mypy_cache",
|
|
719
|
+
"dist",
|
|
720
|
+
"build",
|
|
721
|
+
".next",
|
|
722
|
+
"target"
|
|
723
|
+
];
|
|
724
|
+
function diffCommand(workdir) {
|
|
725
|
+
const exclude = NOISE.map((name) => `':(exclude)**/${name}/**' ':(exclude)${name}/**'`).join(" ");
|
|
726
|
+
return `cd ${workdir} && git add -A && git diff --cached --binary HEAD -- . ${exclude}`;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
// src/core/ci.ts
|
|
730
|
+
var ROLE = "munito.ci";
|
|
731
|
+
var NAME_KEY = "munito.ci.name";
|
|
732
|
+
var DEFAULT_BASE_SIZE = "large";
|
|
733
|
+
var DEFAULT_DISK_GIB = 40;
|
|
734
|
+
var CiError = class extends Error {
|
|
735
|
+
};
|
|
736
|
+
async function findBase(client, name) {
|
|
737
|
+
const boxes = await client.listSandboxes();
|
|
738
|
+
const matches = boxes.filter(
|
|
739
|
+
(box) => box.metadata?.[NAME_KEY] === name && box.metadata?.["munito.cli"] === ROLE && (box.status === "paused" || box.status === "running")
|
|
740
|
+
);
|
|
741
|
+
matches.sort((a, b) => (b.created_at ?? 0) - (a.created_at ?? 0));
|
|
742
|
+
return matches[0] ?? null;
|
|
743
|
+
}
|
|
744
|
+
async function warm(client, options) {
|
|
745
|
+
const emit = options.onEvent ?? (() => {
|
|
746
|
+
});
|
|
747
|
+
const previous = await findBase(client, options.name);
|
|
748
|
+
if (previous) await client.deleteSandbox(previous.id).catch(() => {
|
|
749
|
+
});
|
|
750
|
+
emit({ type: "base.creating", name: options.name });
|
|
751
|
+
const createdAt = Date.now();
|
|
752
|
+
const base = await client.createSandbox({
|
|
753
|
+
template: options.template ?? "ubuntu",
|
|
754
|
+
size: options.size ?? DEFAULT_BASE_SIZE,
|
|
755
|
+
disk_gib: options.diskGib ?? DEFAULT_DISK_GIB,
|
|
756
|
+
internet: true,
|
|
757
|
+
persistent: true,
|
|
758
|
+
timeout: options.timeout ?? 3600,
|
|
759
|
+
metadata: { "munito.cli": ROLE, [NAME_KEY]: options.name }
|
|
760
|
+
});
|
|
761
|
+
emit({ type: "base.created", sandboxId: base.id, ms: Date.now() - createdAt });
|
|
762
|
+
emit({ type: "base.setup", command: options.setup });
|
|
763
|
+
const setup = await client.exec(base.id, { command: options.setup, cwd: "/workspace", timeout: 1800 });
|
|
764
|
+
if (setup.exit_code !== 0) {
|
|
765
|
+
await client.deleteSandbox(base.id).catch(() => {
|
|
766
|
+
});
|
|
767
|
+
throw new CiError(`The setup command failed with exit ${setup.exit_code}. The base was not kept.`);
|
|
768
|
+
}
|
|
769
|
+
const pausedAt = Date.now();
|
|
770
|
+
await client.pauseSandbox(base.id);
|
|
771
|
+
emit({ type: "base.paused", sandboxId: base.id, ms: Date.now() - pausedAt });
|
|
772
|
+
return { sandboxId: base.id, setup, paused: true };
|
|
773
|
+
}
|
|
774
|
+
async function job(client, options) {
|
|
775
|
+
const emit = options.onEvent ?? (() => {
|
|
776
|
+
});
|
|
777
|
+
const base = await findBase(client, options.name);
|
|
778
|
+
if (!base) throw new CiError(`No warm base named ${options.name}. Build one with \`munito ci warm\`.`);
|
|
779
|
+
emit({ type: "base.found", sandboxId: base.id, status: base.status });
|
|
780
|
+
const forkedAt = Date.now();
|
|
781
|
+
const answer = await client.forkSandbox(base.id, 1);
|
|
782
|
+
const forks = Array.isArray(answer) ? answer : answer.data ?? [];
|
|
783
|
+
const fork = forks[0];
|
|
784
|
+
if (!fork) throw new CiError("The fork returned no sandbox.");
|
|
785
|
+
emit({ type: "fork.created", sandboxId: fork.id, ms: Date.now() - forkedAt });
|
|
786
|
+
const ranAt = Date.now();
|
|
787
|
+
let exitCode = -1;
|
|
788
|
+
try {
|
|
789
|
+
for await (const event of client.execStream(fork.id, {
|
|
790
|
+
command: options.command,
|
|
791
|
+
cwd: options.cwd ?? "/workspace",
|
|
792
|
+
env: options.env,
|
|
793
|
+
timeout: options.timeout ?? 1800
|
|
794
|
+
})) {
|
|
795
|
+
if (event.type === "exit") exitCode = event.exit_code;
|
|
796
|
+
else options.onOutput?.(event.data, event.type);
|
|
797
|
+
}
|
|
798
|
+
emit({ type: "job.finished", exitCode, ms: Date.now() - ranAt });
|
|
799
|
+
return exitCode;
|
|
800
|
+
} finally {
|
|
801
|
+
if (!options.keep) {
|
|
802
|
+
await client.deleteSandbox(fork.id).catch(() => {
|
|
803
|
+
});
|
|
804
|
+
emit({ type: "fork.deleted", sandboxId: fork.id });
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
async function drop(client, name, onEvent) {
|
|
809
|
+
const base = await findBase(client, name);
|
|
810
|
+
if (!base) return false;
|
|
811
|
+
await client.deleteSandbox(base.id);
|
|
812
|
+
onEvent?.({ type: "base.deleted", sandboxId: base.id });
|
|
813
|
+
return true;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
export {
|
|
817
|
+
DEFAULT_BASE_URL,
|
|
818
|
+
REGIONS,
|
|
819
|
+
ApiError,
|
|
820
|
+
Client,
|
|
821
|
+
ENV_KEY,
|
|
822
|
+
authPath,
|
|
823
|
+
resolveHost,
|
|
824
|
+
save,
|
|
825
|
+
clear,
|
|
826
|
+
mask,
|
|
827
|
+
MissingKeyError,
|
|
828
|
+
require2 as require,
|
|
829
|
+
AGENTS,
|
|
830
|
+
PROVIDERS,
|
|
831
|
+
BAKED,
|
|
832
|
+
PACKAGES,
|
|
833
|
+
PLUGINS,
|
|
834
|
+
DEFAULT_MODEL,
|
|
835
|
+
DEFAULT_SMALL_MODEL,
|
|
836
|
+
CLAUDE_MODEL,
|
|
837
|
+
GUEST_HOME,
|
|
838
|
+
claudeGates,
|
|
839
|
+
MANAGED_ENV,
|
|
840
|
+
WiringError,
|
|
841
|
+
wire,
|
|
842
|
+
headlessArgv,
|
|
843
|
+
shellArgv,
|
|
844
|
+
AGENT_TEMPLATE,
|
|
845
|
+
WORKDIR,
|
|
846
|
+
runAgent,
|
|
847
|
+
createAgentSandbox,
|
|
848
|
+
unwrap,
|
|
849
|
+
DEFAULT_BASE_SIZE,
|
|
850
|
+
DEFAULT_DISK_GIB,
|
|
851
|
+
findBase,
|
|
852
|
+
warm,
|
|
853
|
+
job,
|
|
854
|
+
drop
|
|
855
|
+
};
|
|
856
|
+
//# sourceMappingURL=chunk-WSY6HMNS.js.map
|