@aspectlylabs/mikka 0.0.230 → 0.0.232
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/agents/native-container.mjs +7 -23
- package/cli.js +717 -2127
- package/client.js +4 -7
- package/computer/proxy.mjs +1 -17
- package/harness/cli.mjs +1 -1
- package/harness/install.mjs +2 -2
- package/http-link.js +692 -994
- package/login.js +51 -56
- package/main.js +364 -1583
- package/mikka-release-manifest.json +34 -54
- package/mikka.js +717 -2127
- package/npm-shrinkwrap.json +2 -54
- package/package.json +2 -3
- package/paths.js +4 -7
- package/sandbox.js +0 -115
- package/sbom.cdx.json +7 -171
- package/agents/native-egress.mjs +0 -51
- package/agents/run-container-entry.mjs +0 -22
- package/harness/Dockerfile +0 -19
- package/run-sandbox-worker.mjs +0 -360
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
// Private hosted-run bootstrap. The first stdin frame is host configuration;
|
|
2
2
|
// later bytes are the existing CLI protocol. No vault/provider token is accepted.
|
|
3
3
|
//
|
|
4
|
-
// It runs
|
|
5
|
-
//
|
|
6
|
-
// it starts. The host names the CLI, the run's broker
|
|
7
|
-
// its node.
|
|
4
|
+
// It runs directly on the task's own E2B machine (one task, one machine; no
|
|
5
|
+
// Docker: decision 2026-11-01-1312; no sandbox: decision 2026-11-01-2335),
|
|
6
|
+
// with the CLI it starts. The host names the CLI, the run's broker socket and
|
|
7
|
+
// its node. The model is reached only through that broker.
|
|
8
8
|
import { spawn } from "node:child_process";
|
|
9
9
|
import { dirname } from "node:path";
|
|
10
10
|
import { createServer, request as httpRequest } from "node:http";
|
|
11
11
|
import { mkdirSync } from "node:fs";
|
|
12
|
-
import { startNativeEgress } from "./native-egress.mjs";
|
|
13
12
|
|
|
14
13
|
const PLACEHOLDER = "mikka-native-broker-placeholder";
|
|
15
14
|
const fail = () => {
|
|
@@ -54,9 +53,7 @@ async function start(config, remainder) {
|
|
|
54
53
|
typeof config.env !== "object" ||
|
|
55
54
|
!hostPath(config.cli) ||
|
|
56
55
|
!hostPath(config.node) ||
|
|
57
|
-
!hostPath(config.brokerSocket)
|
|
58
|
-
(config.egressSocket !== undefined && !hostPath(config.egressSocket)) ||
|
|
59
|
-
(config.publicEgress === true) !== (config.egressSocket !== undefined)
|
|
56
|
+
!hostPath(config.brokerSocket)
|
|
60
57
|
)
|
|
61
58
|
fail();
|
|
62
59
|
for (const [key, value] of Object.entries(config.env)) {
|
|
@@ -73,17 +70,6 @@ async function start(config, remainder) {
|
|
|
73
70
|
if (config.githubBin !== undefined && (typeof config.githubBin !== 'string' || !config.githubBin.startsWith('/') || !config.githubBin.endsWith('/github/bin') || config.githubBin.includes(':') || config.githubBin.includes('\n'))) fail();
|
|
74
71
|
config.env.PATH = `${config.githubBin ? config.githubBin + ':' : ''}${dirname(config.node)}:/usr/local/bin:/usr/bin:/bin`;
|
|
75
72
|
mkdirSync(config.env.HOME, { recursive: true, mode: 0o700 });
|
|
76
|
-
// Model credentials stay on the original task broker. Public downloads use
|
|
77
|
-
// a separate live, public-IP-only host proxy, never that credential endpoint.
|
|
78
|
-
const egress = config.publicEgress === true ? await startNativeEgress(config.egressSocket) : null;
|
|
79
|
-
if (egress) {
|
|
80
|
-
Object.assign(config.env, {
|
|
81
|
-
HTTP_PROXY: egress.url, HTTPS_PROXY: egress.url,
|
|
82
|
-
http_proxy: egress.url, https_proxy: egress.url,
|
|
83
|
-
NO_PROXY: 'localhost,127.0.0.1,::1', no_proxy: 'localhost,127.0.0.1,::1',
|
|
84
|
-
NODE_USE_ENV_PROXY: '1',
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
73
|
// The model transport remains bound to the mounted task broker socket.
|
|
88
74
|
const proxy = createServer((request, response) => {
|
|
89
75
|
if (request.method !== "POST") {
|
|
@@ -117,8 +103,7 @@ async function start(config, remainder) {
|
|
|
117
103
|
if (config.kind === "claude_code") {
|
|
118
104
|
config.env.ANTHROPIC_BASE_URL = base;
|
|
119
105
|
config.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR = "3";
|
|
120
|
-
//
|
|
121
|
-
// a nested sandbox cannot start inside it (no nested user namespaces).
|
|
106
|
+
// Runs use no sandbox (decision 2026-11-01-2335): Claude Code's own stays off.
|
|
122
107
|
const settingsIndex = args.findIndex(
|
|
123
108
|
(value) => value === "--settings" || value.startsWith("--settings="),
|
|
124
109
|
);
|
|
@@ -166,7 +151,6 @@ async function start(config, remainder) {
|
|
|
166
151
|
'PATH', 'GH_HOST', 'GH_REPO', 'GIT_AUTHOR_NAME', 'GIT_AUTHOR_EMAIL', 'GIT_COMMITTER_NAME', 'GIT_COMMITTER_EMAIL',
|
|
167
152
|
...Object.keys(config.env).filter(key => /^GIT_CONFIG_(?:COUNT|KEY_[0-9]+|VALUE_[0-9]+)$/.test(key)),
|
|
168
153
|
"HOME",
|
|
169
|
-
...(egress ? ["HTTP_PROXY", "HTTPS_PROXY", "http_proxy", "https_proxy", "NO_PROXY", "no_proxy", "NODE_USE_ENV_PROXY"] : []),
|
|
170
154
|
])
|
|
171
155
|
if (config.env[key] !== undefined) args.push(
|
|
172
156
|
"-c",
|
|
@@ -207,6 +191,6 @@ async function start(config, remainder) {
|
|
|
207
191
|
child.on("exit", (code) => {
|
|
208
192
|
clearTimeout(timer);
|
|
209
193
|
proxy.closeAllConnections();
|
|
210
|
-
|
|
194
|
+
proxy.close(() => process.exit(code ?? 1));
|
|
211
195
|
});
|
|
212
196
|
}
|