@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
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aspectlylabs/mikka",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.232",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@aspectlylabs/mikka",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.232",
|
|
10
10
|
"license": "AGPL-3.0-only",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@agentclientprotocol/sdk": "1.9.0",
|
|
13
13
|
"@anthropic-ai/claude-agent-sdk": "0.3.305",
|
|
14
|
-
"@anthropic-ai/sandbox-runtime": "0.0.80",
|
|
15
14
|
"ai": "7.0.142",
|
|
16
15
|
"execa": "10.1.1",
|
|
17
16
|
"pino": "10.4.0",
|
|
@@ -225,33 +224,6 @@
|
|
|
225
224
|
"win32"
|
|
226
225
|
]
|
|
227
226
|
},
|
|
228
|
-
"node_modules/@anthropic-ai/sandbox-runtime": {
|
|
229
|
-
"version": "0.0.80",
|
|
230
|
-
"resolved": "https://registry.npmjs.org/@anthropic-ai/sandbox-runtime/-/sandbox-runtime-0.0.80.tgz",
|
|
231
|
-
"integrity": "sha512-WG4P8faU/JDH90I8NLUBPmg7e72zhanlW3AVCD0OF06JCtId9IDFewFgv4YRvHLcnn//h1r6a1AMosBsMLpxnA==",
|
|
232
|
-
"license": "Apache-2.0",
|
|
233
|
-
"dependencies": {
|
|
234
|
-
"@pondwader/socks5-server": "^1.0.10",
|
|
235
|
-
"commander": "^12.1.0",
|
|
236
|
-
"node-forge": "^1.4.0",
|
|
237
|
-
"zod": "^3.25.0"
|
|
238
|
-
},
|
|
239
|
-
"bin": {
|
|
240
|
-
"srt": "dist/cli.js"
|
|
241
|
-
},
|
|
242
|
-
"engines": {
|
|
243
|
-
"node": ">=22.12.0"
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
"node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod": {
|
|
247
|
-
"version": "3.25.76",
|
|
248
|
-
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
|
|
249
|
-
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
|
|
250
|
-
"license": "MIT",
|
|
251
|
-
"funding": {
|
|
252
|
-
"url": "https://github.com/sponsors/colinhacks"
|
|
253
|
-
}
|
|
254
|
-
},
|
|
255
227
|
"node_modules/@anthropic-ai/sdk": {
|
|
256
228
|
"version": "1.3.0",
|
|
257
229
|
"resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-1.3.0.tgz",
|
|
@@ -370,12 +342,6 @@
|
|
|
370
342
|
"integrity": "sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg==",
|
|
371
343
|
"license": "MIT"
|
|
372
344
|
},
|
|
373
|
-
"node_modules/@pondwader/socks5-server": {
|
|
374
|
-
"version": "1.0.10",
|
|
375
|
-
"resolved": "https://registry.npmjs.org/@pondwader/socks5-server/-/socks5-server-1.0.10.tgz",
|
|
376
|
-
"integrity": "sha512-bQY06wzzR8D2+vVCUoBsr5QS2U6UgPUQRmErNwtsuI6vLcyRKkafjkr3KxbtGFf9aBBIV2mcvlsKD1UYaIV+sg==",
|
|
377
|
-
"license": "MIT"
|
|
378
|
-
},
|
|
379
345
|
"node_modules/@sec-ant/readable-stream": {
|
|
380
346
|
"version": "0.4.1",
|
|
381
347
|
"resolved": "https://registry.npmjs.org/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz",
|
|
@@ -592,15 +558,6 @@
|
|
|
592
558
|
"url": "https://github.com/sponsors/ljharb"
|
|
593
559
|
}
|
|
594
560
|
},
|
|
595
|
-
"node_modules/commander": {
|
|
596
|
-
"version": "12.1.0",
|
|
597
|
-
"resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz",
|
|
598
|
-
"integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==",
|
|
599
|
-
"license": "MIT",
|
|
600
|
-
"engines": {
|
|
601
|
-
"node": ">=18"
|
|
602
|
-
}
|
|
603
|
-
},
|
|
604
561
|
"node_modules/content-disposition": {
|
|
605
562
|
"version": "2.0.1",
|
|
606
563
|
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-2.0.1.tgz",
|
|
@@ -1394,15 +1351,6 @@
|
|
|
1394
1351
|
"url": "https://opencollective.com/express"
|
|
1395
1352
|
}
|
|
1396
1353
|
},
|
|
1397
|
-
"node_modules/node-forge": {
|
|
1398
|
-
"version": "1.4.2",
|
|
1399
|
-
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.2.tgz",
|
|
1400
|
-
"integrity": "sha512-rRtAR5XLJ8gCKd9du4qrKAsgCG1ObGP4gLeNJMa4vYSeq4bmBMOJk5IHkrviBV0q7uoAJlVd8HEQYQSVUb4FGQ==",
|
|
1401
|
-
"license": "(BSD-3-Clause OR GPL-2.0)",
|
|
1402
|
-
"engines": {
|
|
1403
|
-
"node": ">= 6.13.0"
|
|
1404
|
-
}
|
|
1405
|
-
},
|
|
1406
1354
|
"node_modules/npm-run-path": {
|
|
1407
1355
|
"version": "6.0.0",
|
|
1408
1356
|
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz",
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aspectlylabs/mikka",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.232",
|
|
4
4
|
"description": "Local Mikka daemon: runs agents through the user's own CLIs",
|
|
5
|
-
"gitHead": "
|
|
5
|
+
"gitHead": "0d277e06e505130445631d9ecfa06d0a78f8e0d4",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"private": false,
|
|
8
8
|
"license": "AGPL-3.0-only",
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@agentclientprotocol/sdk": "1.9.0",
|
|
38
38
|
"@anthropic-ai/claude-agent-sdk": "0.3.305",
|
|
39
|
-
"@anthropic-ai/sandbox-runtime": "0.0.80",
|
|
40
39
|
"ai": "7.0.142",
|
|
41
40
|
"execa": "10.1.1",
|
|
42
41
|
"pino": "10.4.0",
|
package/paths.js
CHANGED
|
@@ -6,7 +6,7 @@ import { join } from "node:path";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@mikka/daemon",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.232",
|
|
10
10
|
description: "Local Mikka daemon: runs agents through the user's own CLIs",
|
|
11
11
|
type: "module",
|
|
12
12
|
private: true,
|
|
@@ -30,7 +30,7 @@ var package_default = {
|
|
|
30
30
|
daemon: "tsx bin/mikka.ts daemon",
|
|
31
31
|
dev: "tsx watch bin/mikka.ts daemon --dev --server memory",
|
|
32
32
|
typecheck: "tsgo --noEmit -p tsconfig.json",
|
|
33
|
-
test: "vitest run && pnpm test:mailbox-cli && pnpm test:repository-identity && pnpm test:github-credentials
|
|
33
|
+
test: "vitest run && pnpm test:mailbox-cli && pnpm test:repository-identity && pnpm test:github-credentials",
|
|
34
34
|
"test:mailbox-cli": "node --import tsx --test --test-timeout=60000 test/run-mailbox.node-test.ts",
|
|
35
35
|
"codex:types": 'codex app-server generate-ts --out "${TMPDIR:-/tmp}/mikka-codex-types" && echo "Generated; compare v2/ with src/adapters/codex-protocol.ts"',
|
|
36
36
|
"test:real": "MIKKA_REAL_AGENTS=${MIKKA_REAL_AGENTS:-claude_code,codex,cursor} vitest run test/real-agents.test.ts",
|
|
@@ -38,14 +38,11 @@ var package_default = {
|
|
|
38
38
|
build: "node scripts/build.mjs",
|
|
39
39
|
"test:package": "node --test test/package.test.mjs",
|
|
40
40
|
"test:repository-identity": "node --experimental-strip-types --test test/repository-identity-pure.node-test.ts",
|
|
41
|
-
"test:github-credentials": "node --test test/github-credentials.node-test.mjs"
|
|
42
|
-
"test:run-container": "node --import tsx --test --test-timeout=900000 test/run-container.docker-test.ts",
|
|
43
|
-
"test:local-git-origin-sandbox": "node --import tsx --test --test-timeout=60000 test/local-git-origin.sandbox-test.ts"
|
|
41
|
+
"test:github-credentials": "node --test test/github-credentials.node-test.mjs"
|
|
44
42
|
},
|
|
45
43
|
dependencies: {
|
|
46
44
|
"@agentclientprotocol/sdk": "1.9.0",
|
|
47
45
|
"@anthropic-ai/claude-agent-sdk": "^0.3.305",
|
|
48
|
-
"@anthropic-ai/sandbox-runtime": "0.0.80",
|
|
49
46
|
"@mikka/protocol": "workspace:*",
|
|
50
47
|
ai: "7.0.142",
|
|
51
48
|
execa: "10.1.1",
|
|
@@ -67,7 +64,7 @@ var package_default = {
|
|
|
67
64
|
engines: {
|
|
68
65
|
node: ">=24"
|
|
69
66
|
},
|
|
70
|
-
gitHead: "
|
|
67
|
+
gitHead: "0d277e06e505130445631d9ecfa06d0a78f8e0d4"
|
|
71
68
|
};
|
|
72
69
|
|
|
73
70
|
// src/paths.ts
|
package/sandbox.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// src/agents/sandbox.ts
|
|
2
|
-
import { randomBytes } from "node:crypto";
|
|
3
|
-
import { SandboxManager } from "@anthropic-ai/sandbox-runtime";
|
|
4
|
-
import { execa } from "execa";
|
|
5
2
|
function shellQuote(arg) {
|
|
6
3
|
if (/^[A-Za-z0-9_@%+=:,./-]+$/.test(arg)) return arg;
|
|
7
4
|
return `'${arg.replaceAll("'", `'"'"'`)}'`;
|
|
@@ -9,117 +6,6 @@ function shellQuote(arg) {
|
|
|
9
6
|
function shellJoin(argv) {
|
|
10
7
|
return argv.map(shellQuote).join(" ");
|
|
11
8
|
}
|
|
12
|
-
var SandboxRuntime = class _SandboxRuntime {
|
|
13
|
-
constructor(onAsk, options = {}) {
|
|
14
|
-
this.onAsk = onAsk;
|
|
15
|
-
this.options = options;
|
|
16
|
-
}
|
|
17
|
-
onAsk;
|
|
18
|
-
options;
|
|
19
|
-
kind = "sandbox-runtime";
|
|
20
|
-
static owner = null;
|
|
21
|
-
ready = null;
|
|
22
|
-
resetting = null;
|
|
23
|
-
/** The platform is supported and its tools (Linux: bwrap, socat, rg) exist. */
|
|
24
|
-
static supported() {
|
|
25
|
-
return SandboxManager.isSupportedPlatform() && SandboxManager.checkDependencies().errors.length === 0;
|
|
26
|
-
}
|
|
27
|
-
/** Check that the runtime can actually start isolation on this host. */
|
|
28
|
-
async probe() {
|
|
29
|
-
const wrapped = await this.wrap(["/bin/sh", "-c", ":"], {
|
|
30
|
-
allowWrite: [],
|
|
31
|
-
allowDomains: []
|
|
32
|
-
});
|
|
33
|
-
try {
|
|
34
|
-
const result = await execa("/bin/sh", ["-c", wrapped.command], {
|
|
35
|
-
reject: false,
|
|
36
|
-
timeout: 1e4
|
|
37
|
-
});
|
|
38
|
-
if (result.failed) {
|
|
39
|
-
throw new Error(
|
|
40
|
-
`sandbox probe failed: ${result.timedOut ? "timed out" : result.stderr.trim() || `exit ${result.exitCode}`}`
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
} finally {
|
|
44
|
-
wrapped.release();
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
init() {
|
|
48
|
-
if (this.resetting) return Promise.reject(new Error("sandbox runtime is stopping"));
|
|
49
|
-
if (this.ready) return this.ready;
|
|
50
|
-
if (_SandboxRuntime.owner && _SandboxRuntime.owner !== this) {
|
|
51
|
-
return Promise.reject(new Error("sandbox runtime is already in use by another instance"));
|
|
52
|
-
}
|
|
53
|
-
_SandboxRuntime.owner = this;
|
|
54
|
-
this.ready = SandboxManager.initialize(
|
|
55
|
-
{
|
|
56
|
-
// Everything is per run (`registerCommandNetworkLists`).
|
|
57
|
-
network: {
|
|
58
|
-
allowedDomains: [],
|
|
59
|
-
deniedDomains: [],
|
|
60
|
-
...this.options.allowAllUnixSockets ? { allowAllUnixSockets: true } : {}
|
|
61
|
-
},
|
|
62
|
-
filesystem: { denyRead: [], allowWrite: [], denyWrite: [] },
|
|
63
|
-
// Rust and Go CLIs (codex) verify TLS through trustd; without it
|
|
64
|
-
// every HTTPS request from them fails inside the sandbox.
|
|
65
|
-
enableWeakerNetworkIsolation: true
|
|
66
|
-
},
|
|
67
|
-
async ({ host, port }) => await this.onAsk?.({ host, port }) === true
|
|
68
|
-
).catch(async (error) => {
|
|
69
|
-
await SandboxManager.reset().catch(() => void 0);
|
|
70
|
-
_SandboxRuntime.owner = null;
|
|
71
|
-
this.ready = null;
|
|
72
|
-
throw error;
|
|
73
|
-
});
|
|
74
|
-
return this.ready;
|
|
75
|
-
}
|
|
76
|
-
async wrap(argv, policy) {
|
|
77
|
-
await this.init();
|
|
78
|
-
const commandId = randomBytes(16).toString("base64url");
|
|
79
|
-
const command = await SandboxManager.wrapWithSandbox(
|
|
80
|
-
shellJoin(argv),
|
|
81
|
-
"/bin/sh",
|
|
82
|
-
{
|
|
83
|
-
filesystem: {
|
|
84
|
-
denyRead: policy.denyRead ?? [],
|
|
85
|
-
allowWrite: policy.allowWrite,
|
|
86
|
-
denyWrite: policy.denyWrite ?? []
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
void 0,
|
|
90
|
-
{ commandId }
|
|
91
|
-
);
|
|
92
|
-
SandboxManager.registerCommandNetworkLists(commandId, {
|
|
93
|
-
allowedDomains: policy.allowDomains
|
|
94
|
-
});
|
|
95
|
-
let released = false;
|
|
96
|
-
return {
|
|
97
|
-
command,
|
|
98
|
-
annotate: (stderr) => SandboxManager.annotateStderrWithSandboxFailures(commandId, stderr),
|
|
99
|
-
release() {
|
|
100
|
-
if (released) return;
|
|
101
|
-
released = true;
|
|
102
|
-
SandboxManager.unregisterCommandNetworkLists(commandId);
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
/** Stops the proxy; the next `wrap` starts it again. */
|
|
107
|
-
reset() {
|
|
108
|
-
if (this.resetting) return this.resetting;
|
|
109
|
-
if (_SandboxRuntime.owner !== this) return Promise.resolve();
|
|
110
|
-
this.resetting = (async () => {
|
|
111
|
-
try {
|
|
112
|
-
await this.ready?.catch(() => void 0);
|
|
113
|
-
if (_SandboxRuntime.owner === this) await SandboxManager.reset();
|
|
114
|
-
} finally {
|
|
115
|
-
if (_SandboxRuntime.owner === this) _SandboxRuntime.owner = null;
|
|
116
|
-
this.ready = null;
|
|
117
|
-
this.resetting = null;
|
|
118
|
-
}
|
|
119
|
-
})();
|
|
120
|
-
return this.resetting;
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
9
|
var NoSandbox = class {
|
|
124
10
|
kind = "none";
|
|
125
11
|
async wrap(argv) {
|
|
@@ -133,7 +19,6 @@ var NoSandbox = class {
|
|
|
133
19
|
};
|
|
134
20
|
export {
|
|
135
21
|
NoSandbox,
|
|
136
|
-
SandboxRuntime,
|
|
137
22
|
shellJoin,
|
|
138
23
|
shellQuote
|
|
139
24
|
};
|
package/sbom.cdx.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
|
|
3
3
|
"bomFormat": "CycloneDX",
|
|
4
4
|
"specVersion": "1.5",
|
|
5
|
-
"serialNumber": "urn:uuid:
|
|
5
|
+
"serialNumber": "urn:uuid:cd913f9e-a562-4d85-9df4-c46e4f496351",
|
|
6
6
|
"version": 1,
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-11-
|
|
8
|
+
"timestamp": "2026-11-02T01:11:54.685Z",
|
|
9
9
|
"lifecycles": [
|
|
10
10
|
{
|
|
11
11
|
"phase": "pre-build"
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"component": {
|
|
22
|
-
"bom-ref": "@aspectlylabs/mikka@0.0.
|
|
22
|
+
"bom-ref": "@aspectlylabs/mikka@0.0.232",
|
|
23
23
|
"type": "library",
|
|
24
|
-
"name": ".retained-build-
|
|
25
|
-
"version": "0.0.
|
|
24
|
+
"name": ".retained-build-Ulm9gB",
|
|
25
|
+
"version": "0.0.232",
|
|
26
26
|
"scope": "required",
|
|
27
27
|
"description": "Local Mikka daemon: runs agents through the user's own CLIs",
|
|
28
|
-
"purl": "pkg:npm/%40aspectlylabs/mikka@0.0.
|
|
28
|
+
"purl": "pkg:npm/%40aspectlylabs/mikka@0.0.232",
|
|
29
29
|
"properties": [],
|
|
30
30
|
"externalReferences": [
|
|
31
31
|
{
|
|
@@ -344,62 +344,6 @@
|
|
|
344
344
|
}
|
|
345
345
|
]
|
|
346
346
|
},
|
|
347
|
-
{
|
|
348
|
-
"bom-ref": "@anthropic-ai/sandbox-runtime@0.0.80",
|
|
349
|
-
"type": "library",
|
|
350
|
-
"name": "@anthropic-ai/sandbox-runtime",
|
|
351
|
-
"version": "0.0.80",
|
|
352
|
-
"scope": "required",
|
|
353
|
-
"purl": "pkg:npm/%40anthropic-ai/sandbox-runtime@0.0.80",
|
|
354
|
-
"properties": [],
|
|
355
|
-
"externalReferences": [
|
|
356
|
-
{
|
|
357
|
-
"type": "distribution",
|
|
358
|
-
"url": "https://registry.npmjs.org/@anthropic-ai/sandbox-runtime/-/sandbox-runtime-0.0.80.tgz"
|
|
359
|
-
}
|
|
360
|
-
],
|
|
361
|
-
"hashes": [
|
|
362
|
-
{
|
|
363
|
-
"alg": "SHA-512",
|
|
364
|
-
"content": "586e0ff1f694fc90c7f7423c34b5013e683b7bbdb385a9e55b7015083d0e174e890ad21df480c57b0160bf8611bc72dc9e7fff875afa6b500ca2c06c30ba719c"
|
|
365
|
-
}
|
|
366
|
-
],
|
|
367
|
-
"licenses": [
|
|
368
|
-
{
|
|
369
|
-
"license": {
|
|
370
|
-
"id": "Apache-2.0"
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
]
|
|
374
|
-
},
|
|
375
|
-
{
|
|
376
|
-
"bom-ref": "zod@3.25.76",
|
|
377
|
-
"type": "library",
|
|
378
|
-
"name": "zod",
|
|
379
|
-
"version": "3.25.76",
|
|
380
|
-
"scope": "required",
|
|
381
|
-
"purl": "pkg:npm/zod@3.25.76",
|
|
382
|
-
"properties": [],
|
|
383
|
-
"externalReferences": [
|
|
384
|
-
{
|
|
385
|
-
"type": "distribution",
|
|
386
|
-
"url": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz"
|
|
387
|
-
}
|
|
388
|
-
],
|
|
389
|
-
"hashes": [
|
|
390
|
-
{
|
|
391
|
-
"alg": "SHA-512",
|
|
392
|
-
"content": "83352dfeab7cd675ec14628815c0b76277c4031e4d92e9c27e70e5bee0524854b4d9b717bb82e679ad001485306cb5b158fc7777da7c4b94286ae8ca70d43171"
|
|
393
|
-
}
|
|
394
|
-
],
|
|
395
|
-
"licenses": [
|
|
396
|
-
{
|
|
397
|
-
"license": {
|
|
398
|
-
"id": "MIT"
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
]
|
|
402
|
-
},
|
|
403
347
|
{
|
|
404
348
|
"bom-ref": "@anthropic-ai/sdk@1.3.0",
|
|
405
349
|
"type": "library",
|
|
@@ -624,34 +568,6 @@
|
|
|
624
568
|
}
|
|
625
569
|
]
|
|
626
570
|
},
|
|
627
|
-
{
|
|
628
|
-
"bom-ref": "@pondwader/socks5-server@1.0.10",
|
|
629
|
-
"type": "library",
|
|
630
|
-
"name": "@pondwader/socks5-server",
|
|
631
|
-
"version": "1.0.10",
|
|
632
|
-
"scope": "required",
|
|
633
|
-
"purl": "pkg:npm/%40pondwader/socks5-server@1.0.10",
|
|
634
|
-
"properties": [],
|
|
635
|
-
"externalReferences": [
|
|
636
|
-
{
|
|
637
|
-
"type": "distribution",
|
|
638
|
-
"url": "https://registry.npmjs.org/@pondwader/socks5-server/-/socks5-server-1.0.10.tgz"
|
|
639
|
-
}
|
|
640
|
-
],
|
|
641
|
-
"hashes": [
|
|
642
|
-
{
|
|
643
|
-
"alg": "SHA-512",
|
|
644
|
-
"content": "6d0634eb0cf347c0f6faf54252806caf9412d94e9480f51046612b370b6cb88eaf2dcc912a469f8e4af72b16ed1857fd68104857699cbe5b0a0f551868857eb2"
|
|
645
|
-
}
|
|
646
|
-
],
|
|
647
|
-
"licenses": [
|
|
648
|
-
{
|
|
649
|
-
"license": {
|
|
650
|
-
"id": "MIT"
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
]
|
|
654
|
-
},
|
|
655
571
|
{
|
|
656
572
|
"bom-ref": "@sec-ant/readable-stream@0.4.1",
|
|
657
573
|
"type": "library",
|
|
@@ -1156,34 +1072,6 @@
|
|
|
1156
1072
|
}
|
|
1157
1073
|
]
|
|
1158
1074
|
},
|
|
1159
|
-
{
|
|
1160
|
-
"bom-ref": "commander@12.1.0",
|
|
1161
|
-
"type": "library",
|
|
1162
|
-
"name": "commander",
|
|
1163
|
-
"version": "12.1.0",
|
|
1164
|
-
"scope": "required",
|
|
1165
|
-
"purl": "pkg:npm/commander@12.1.0",
|
|
1166
|
-
"properties": [],
|
|
1167
|
-
"externalReferences": [
|
|
1168
|
-
{
|
|
1169
|
-
"type": "distribution",
|
|
1170
|
-
"url": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz"
|
|
1171
|
-
}
|
|
1172
|
-
],
|
|
1173
|
-
"hashes": [
|
|
1174
|
-
{
|
|
1175
|
-
"alg": "SHA-512",
|
|
1176
|
-
"content": "570f2a1caddb64cf72fcfd74bb75626fca3f0dd92f0363ad3ed66f0fcef540a8f2ef85a3d5648a1482cc3d13d27544b1e5114ad5aae527312d0383e41609dbb8"
|
|
1177
|
-
}
|
|
1178
|
-
],
|
|
1179
|
-
"licenses": [
|
|
1180
|
-
{
|
|
1181
|
-
"license": {
|
|
1182
|
-
"id": "MIT"
|
|
1183
|
-
}
|
|
1184
|
-
}
|
|
1185
|
-
]
|
|
1186
|
-
},
|
|
1187
1075
|
{
|
|
1188
1076
|
"bom-ref": "content-disposition@2.0.1",
|
|
1189
1077
|
"type": "library",
|
|
@@ -2862,32 +2750,6 @@
|
|
|
2862
2750
|
}
|
|
2863
2751
|
]
|
|
2864
2752
|
},
|
|
2865
|
-
{
|
|
2866
|
-
"bom-ref": "node-forge@1.4.2",
|
|
2867
|
-
"type": "library",
|
|
2868
|
-
"name": "node-forge",
|
|
2869
|
-
"version": "1.4.2",
|
|
2870
|
-
"scope": "required",
|
|
2871
|
-
"purl": "pkg:npm/node-forge@1.4.2",
|
|
2872
|
-
"properties": [],
|
|
2873
|
-
"externalReferences": [
|
|
2874
|
-
{
|
|
2875
|
-
"type": "distribution",
|
|
2876
|
-
"url": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.2.tgz"
|
|
2877
|
-
}
|
|
2878
|
-
],
|
|
2879
|
-
"hashes": [
|
|
2880
|
-
{
|
|
2881
|
-
"alg": "SHA-512",
|
|
2882
|
-
"content": "ad1b404795cb27c80229df5dbb8aab280b20086d4e6c63f880b78d24c6b8bd849eab86e604c38993920792bbe2055d2aeeea0026555df0711061049551be0519"
|
|
2883
|
-
}
|
|
2884
|
-
],
|
|
2885
|
-
"licenses": [
|
|
2886
|
-
{
|
|
2887
|
-
"expression": "(BSD-3-Clause OR GPL-2.0)"
|
|
2888
|
-
}
|
|
2889
|
-
]
|
|
2890
|
-
},
|
|
2891
2753
|
{
|
|
2892
2754
|
"bom-ref": "npm-run-path@6.0.0",
|
|
2893
2755
|
"type": "library",
|
|
@@ -4627,11 +4489,10 @@
|
|
|
4627
4489
|
],
|
|
4628
4490
|
"dependencies": [
|
|
4629
4491
|
{
|
|
4630
|
-
"ref": "@aspectlylabs/mikka@0.0.
|
|
4492
|
+
"ref": "@aspectlylabs/mikka@0.0.232",
|
|
4631
4493
|
"dependsOn": [
|
|
4632
4494
|
"@agentclientprotocol/sdk@1.9.0",
|
|
4633
4495
|
"@anthropic-ai/claude-agent-sdk@0.3.305",
|
|
4634
|
-
"@anthropic-ai/sandbox-runtime@0.0.80",
|
|
4635
4496
|
"ai@7.0.142",
|
|
4636
4497
|
"execa@10.1.1",
|
|
4637
4498
|
"pino@10.4.0",
|
|
@@ -4722,19 +4583,6 @@
|
|
|
4722
4583
|
"ref": "@anthropic-ai/claude-agent-sdk-win32-x64@0.3.305",
|
|
4723
4584
|
"dependsOn": []
|
|
4724
4585
|
},
|
|
4725
|
-
{
|
|
4726
|
-
"ref": "@anthropic-ai/sandbox-runtime@0.0.80",
|
|
4727
|
-
"dependsOn": [
|
|
4728
|
-
"@pondwader/socks5-server@1.0.10",
|
|
4729
|
-
"commander@12.1.0",
|
|
4730
|
-
"node-forge@1.4.2",
|
|
4731
|
-
"zod@3.25.76"
|
|
4732
|
-
]
|
|
4733
|
-
},
|
|
4734
|
-
{
|
|
4735
|
-
"ref": "zod@3.25.76",
|
|
4736
|
-
"dependsOn": []
|
|
4737
|
-
},
|
|
4738
4586
|
{
|
|
4739
4587
|
"ref": "@anthropic-ai/sdk@1.3.0",
|
|
4740
4588
|
"dependsOn": [
|
|
@@ -4794,10 +4642,6 @@
|
|
|
4794
4642
|
"ref": "@pinojs/redact@0.4.0",
|
|
4795
4643
|
"dependsOn": []
|
|
4796
4644
|
},
|
|
4797
|
-
{
|
|
4798
|
-
"ref": "@pondwader/socks5-server@1.0.10",
|
|
4799
|
-
"dependsOn": []
|
|
4800
|
-
},
|
|
4801
4645
|
{
|
|
4802
4646
|
"ref": "@sec-ant/readable-stream@0.4.1",
|
|
4803
4647
|
"dependsOn": []
|
|
@@ -4903,10 +4747,6 @@
|
|
|
4903
4747
|
"get-intrinsic@1.3.0"
|
|
4904
4748
|
]
|
|
4905
4749
|
},
|
|
4906
|
-
{
|
|
4907
|
-
"ref": "commander@12.1.0",
|
|
4908
|
-
"dependsOn": []
|
|
4909
|
-
},
|
|
4910
4750
|
{
|
|
4911
4751
|
"ref": "content-disposition@2.0.1",
|
|
4912
4752
|
"dependsOn": []
|
|
@@ -5253,10 +5093,6 @@
|
|
|
5253
5093
|
"content-type@2.1.0"
|
|
5254
5094
|
]
|
|
5255
5095
|
},
|
|
5256
|
-
{
|
|
5257
|
-
"ref": "node-forge@1.4.2",
|
|
5258
|
-
"dependsOn": []
|
|
5259
|
-
},
|
|
5260
5096
|
{
|
|
5261
5097
|
"ref": "npm-run-path@6.0.0",
|
|
5262
5098
|
"dependsOn": [
|
package/agents/native-egress.mjs
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// Only the host-supplied configuration enables this relay. The container has
|
|
2
|
-
// no network interface; it forwards bytes to its single mounted egress socket.
|
|
3
|
-
import { createServer, request } from 'node:http'
|
|
4
|
-
|
|
5
|
-
export async function startNativeEgress(socketPath = '/run/mikka-egress.sock') {
|
|
6
|
-
const sockets = new Set()
|
|
7
|
-
const track = socket => {
|
|
8
|
-
sockets.add(socket)
|
|
9
|
-
socket.on('error', () => {})
|
|
10
|
-
socket.once('close', () => sockets.delete(socket))
|
|
11
|
-
return socket
|
|
12
|
-
}
|
|
13
|
-
const server = createServer({ maxHeaderSize: 16384 }, (incoming, response) => {
|
|
14
|
-
const outgoing = request({ socketPath, path: incoming.url, method: incoming.method, headers: incoming.headers, agent: false }, upstream => {
|
|
15
|
-
response.writeHead(upstream.statusCode ?? 502, upstream.headers)
|
|
16
|
-
upstream.pipe(response)
|
|
17
|
-
})
|
|
18
|
-
outgoing.on('socket', track)
|
|
19
|
-
outgoing.on('error', () => { if (!response.headersSent) response.writeHead(502); response.end() })
|
|
20
|
-
incoming.once('aborted', () => outgoing.destroy())
|
|
21
|
-
response.once('close', () => outgoing.destroy())
|
|
22
|
-
incoming.pipe(outgoing)
|
|
23
|
-
})
|
|
24
|
-
server.on('connection', track)
|
|
25
|
-
server.on('connect', (incoming, client, head) => {
|
|
26
|
-
const outgoing = request({ socketPath, method: 'CONNECT', path: incoming.url, headers: { host: incoming.url }, agent: false })
|
|
27
|
-
outgoing.on('socket', track)
|
|
28
|
-
outgoing.on('connect', (response, upstream, upstreamHead) => {
|
|
29
|
-
if (response.statusCode !== 200) { client.end('HTTP/1.1 403 Forbidden\r\nContent-Length: 0\r\n\r\n'); upstream.destroy(); return }
|
|
30
|
-
client.write('HTTP/1.1 200 Connection Established\r\n\r\n')
|
|
31
|
-
if (upstreamHead.length) client.write(upstreamHead)
|
|
32
|
-
if (head.length) upstream.write(head)
|
|
33
|
-
upstream.pipe(client);client.pipe(upstream)
|
|
34
|
-
client.once('close', () => upstream.destroy())
|
|
35
|
-
upstream.once('close', () => client.destroy())
|
|
36
|
-
})
|
|
37
|
-
outgoing.on('error', () => client.destroy())
|
|
38
|
-
client.once('close', () => outgoing.destroy())
|
|
39
|
-
outgoing.end()
|
|
40
|
-
})
|
|
41
|
-
server.on('upgrade', (_request, socket) => socket.destroy())
|
|
42
|
-
server.on('clientError', (_error, socket) => socket.destroy())
|
|
43
|
-
await new Promise((resolve, reject) => { server.once('error', reject);server.listen(0, '127.0.0.1', resolve) })
|
|
44
|
-
return {
|
|
45
|
-
url: `http://127.0.0.1:${server.address().port}`,
|
|
46
|
-
async close() {
|
|
47
|
-
for (const socket of sockets) socket.destroy()
|
|
48
|
-
await new Promise(resolve => server.close(resolve))
|
|
49
|
-
},
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// First process in a run container (run-container.ts): the container has no
|
|
2
|
-
// network interface, so this relays the CLI's proxy traffic to the run's one
|
|
3
|
-
// mounted egress socket, where the daemon applies the run's network approval.
|
|
4
|
-
// Then it runs the CLI and exits with it.
|
|
5
|
-
import { spawn } from 'node:child_process'
|
|
6
|
-
import { existsSync } from 'node:fs'
|
|
7
|
-
import { startNativeEgress } from './native-egress.mjs'
|
|
8
|
-
|
|
9
|
-
const [command, ...args] = process.argv.slice(2)
|
|
10
|
-
if (!command) process.exit(2)
|
|
11
|
-
const env = { ...process.env }
|
|
12
|
-
if (existsSync('/run/mikka-egress.sock')) {
|
|
13
|
-
const egress = await startNativeEgress()
|
|
14
|
-
Object.assign(env, {
|
|
15
|
-
HTTP_PROXY: egress.url, HTTPS_PROXY: egress.url, http_proxy: egress.url, https_proxy: egress.url,
|
|
16
|
-
NO_PROXY: 'localhost,127.0.0.1,::1', no_proxy: 'localhost,127.0.0.1,::1', NODE_USE_ENV_PROXY: '1',
|
|
17
|
-
})
|
|
18
|
-
}
|
|
19
|
-
const child = spawn(command, args, { stdio: 'inherit', env })
|
|
20
|
-
for (const signal of ['SIGTERM', 'SIGINT', 'SIGHUP']) process.on(signal, () => child.kill(signal))
|
|
21
|
-
child.on('error', () => process.exit(127))
|
|
22
|
-
child.on('exit', (code, signal) => process.exit(code ?? (signal ? 128 : 1)))
|
package/harness/Dockerfile
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# The runner image: a clean Linux with the daemon's pinned Claude Code and
|
|
2
|
-
# Codex (harness/pins.json), the same harnesses a device installs for itself.
|
|
3
|
-
# A device with Docker runs each harness in a disposable container of it;
|
|
4
|
-
# the E2B template installs from the same pins and installer.
|
|
5
|
-
#
|
|
6
|
-
# Context: packages/daemon (or the npm package root). Multi-arch: the installer picks the build for the
|
|
7
|
-
# image's own arch, e.g.
|
|
8
|
-
# docker buildx build --platform linux/amd64,linux/arm64 -f harness/Dockerfile .
|
|
9
|
-
# The base is the multi-arch node 24 index also pinned as HOSTED_NATIVE_IMAGE.
|
|
10
|
-
FROM node@sha256:6449e19d8184d84062525b6a7524def03146c2cb04a7f08b076680d0e8e4240a
|
|
11
|
-
COPY harness/pins.json harness/install.mjs harness/cli.mjs /opt/mikka/installer/
|
|
12
|
-
# An optional `--secret id=ca,src=<bundle>` trusts a proxy's CA while downloading.
|
|
13
|
-
RUN --mount=type=secret,id=ca,required=false \
|
|
14
|
-
if [ -f /run/secrets/ca ]; then export NODE_EXTRA_CA_CERTS=/run/secrets/ca; fi \
|
|
15
|
-
&& node /opt/mikka/installer/cli.mjs /opt/mikka/harness > /tmp/harnesses \
|
|
16
|
-
&& while read -r binary; do ln -sf "$binary" "/usr/local/bin/$(basename "$binary")"; done < /tmp/harnesses \
|
|
17
|
-
&& rm -rf /opt/mikka/installer /tmp/harnesses \
|
|
18
|
-
&& chmod -R go+rX,go-w /opt/mikka/harness \
|
|
19
|
-
&& claude --version && codex --version
|