@aspectlylabs/mikka 0.0.245 → 0.0.247
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/cli.js +15 -7
- package/client.js +5 -4
- package/http-link.js +13 -5
- package/login.js +5 -4
- package/main.js +14 -6
- package/mikka-release-manifest.json +20 -20
- package/mikka.js +15 -7
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
- package/paths.js +5 -4
- package/sbom.cdx.json +7 -7
package/cli.js
CHANGED
|
@@ -4519,7 +4519,7 @@ import { join as join4 } from "node:path";
|
|
|
4519
4519
|
// package.json
|
|
4520
4520
|
var package_default = {
|
|
4521
4521
|
name: "@mikka/daemon",
|
|
4522
|
-
version: "0.0.
|
|
4522
|
+
version: "0.0.247",
|
|
4523
4523
|
description: "Local Mikka daemon: runs agents through the user's own CLIs",
|
|
4524
4524
|
type: "module",
|
|
4525
4525
|
private: true,
|
|
@@ -4543,7 +4543,7 @@ var package_default = {
|
|
|
4543
4543
|
daemon: "tsx bin/mikka.ts daemon",
|
|
4544
4544
|
dev: "tsx watch bin/mikka.ts daemon --dev --server memory",
|
|
4545
4545
|
typecheck: "tsgo --noEmit -p tsconfig.json",
|
|
4546
|
-
test: "vitest run && pnpm test:mailbox-cli && pnpm test:repository-identity && pnpm test:github-credentials",
|
|
4546
|
+
test: "vitest run && pnpm test:mailbox-cli && pnpm test:repository-identity && pnpm test:github-credentials && pnpm test:trusted-endpoint",
|
|
4547
4547
|
"test:mailbox-cli": "node --import tsx --test --test-timeout=60000 test/run-mailbox.node-test.ts",
|
|
4548
4548
|
"codex:types": 'codex app-server generate-ts --out "${TMPDIR:-/tmp}/mikka-codex-types" && echo "Generated; compare v2/ with src/adapters/codex-protocol.ts"',
|
|
4549
4549
|
"test:real": "MIKKA_REAL_AGENTS=${MIKKA_REAL_AGENTS:-claude_code,codex,cursor} vitest run test/real-agents.test.ts",
|
|
@@ -4551,7 +4551,8 @@ var package_default = {
|
|
|
4551
4551
|
build: "node scripts/build.mjs",
|
|
4552
4552
|
"test:package": "node --test test/package.test.mjs",
|
|
4553
4553
|
"test:repository-identity": "node --experimental-strip-types --test test/repository-identity-pure.node-test.ts",
|
|
4554
|
-
"test:github-credentials": "node --test test/github-credentials.node-test.mjs"
|
|
4554
|
+
"test:github-credentials": "node --test test/github-credentials.node-test.mjs",
|
|
4555
|
+
"test:trusted-endpoint": "node --experimental-strip-types --test test/trusted-endpoint.node-test.ts"
|
|
4555
4556
|
},
|
|
4556
4557
|
dependencies: {
|
|
4557
4558
|
"@agentclientprotocol/sdk": "1.9.0",
|
|
@@ -4577,7 +4578,7 @@ var package_default = {
|
|
|
4577
4578
|
engines: {
|
|
4578
4579
|
node: ">=24"
|
|
4579
4580
|
},
|
|
4580
|
-
gitHead: "
|
|
4581
|
+
gitHead: "ee42fe84a0e7965e2ea1025875ffbb9a706e8c4b"
|
|
4581
4582
|
};
|
|
4582
4583
|
|
|
4583
4584
|
// src/paths.ts
|
|
@@ -4832,6 +4833,13 @@ function personalMessagePacket(source, body) {
|
|
|
4832
4833
|
return encode({ version: 1, kind: "personal_agent_message", authority: "coordination_data_only", source: validateSource(source), untrustedData: { body } });
|
|
4833
4834
|
}
|
|
4834
4835
|
|
|
4836
|
+
// src/trusted-endpoint.ts
|
|
4837
|
+
function trustedServerEndpoint(url) {
|
|
4838
|
+
if (url.username || url.password || url.search || url.hash) return false;
|
|
4839
|
+
if (url.protocol === "https:") return true;
|
|
4840
|
+
return url.protocol === "http:" && ["127.0.0.1", "localhost", "[::1]"].includes(url.hostname);
|
|
4841
|
+
}
|
|
4842
|
+
|
|
4835
4843
|
// src/run-mailbox.ts
|
|
4836
4844
|
function mailboxNoticeText(runId, ids) {
|
|
4837
4845
|
const messageIds = z25.array(z25.uuid()).min(1).max(50).parse(ids);
|
|
@@ -4901,7 +4909,7 @@ async function createRunMailbox(host) {
|
|
|
4901
4909
|
} catch {
|
|
4902
4910
|
throw unavailable();
|
|
4903
4911
|
}
|
|
4904
|
-
if (endpoint.href !== host.endpoint.href ||
|
|
4912
|
+
if (endpoint.href !== host.endpoint.href || !trustedServerEndpoint(endpoint) || !/^mkw_[A-Za-z0-9_-]{43}$/.test(assigned.token)) throw unavailable();
|
|
4905
4913
|
let nextId = 0, session = null, version = "2025-03-26", closed = false, inFlight = 0;
|
|
4906
4914
|
const pending = /* @__PURE__ */ new Set();
|
|
4907
4915
|
const active = () => {
|
|
@@ -6529,7 +6537,7 @@ function githubReceiptEnvironment(host = process.env) {
|
|
|
6529
6537
|
}
|
|
6530
6538
|
function prepareGitHubEnvironment(runDir, github, path, runtime) {
|
|
6531
6539
|
const endpoint = new URL(github.endpoint);
|
|
6532
|
-
if (!endpoint.pathname.endsWith("/api/runs/github-token") ||
|
|
6540
|
+
if (!endpoint.pathname.endsWith("/api/runs/github-token") || !trustedServerEndpoint(endpoint)) throw new Error("Invalid run GitHub endpoint");
|
|
6533
6541
|
const gh = runtime?.ghBinary ?? path.split(delimiter).map((dir2) => join8(dir2, "gh")).find((file) => existsSync3(file));
|
|
6534
6542
|
const node = runtime?.nodeBinary ?? process.execPath;
|
|
6535
6543
|
if (!gh) throw new Error("Install GitHub CLI (gh) before running GitHub tasks");
|
|
@@ -6648,7 +6656,7 @@ function runApps(mcp) {
|
|
|
6648
6656
|
} catch {
|
|
6649
6657
|
return void 0;
|
|
6650
6658
|
}
|
|
6651
|
-
if (!/\/api\/mcp\/?$/.test(base.pathname) ||
|
|
6659
|
+
if (!/\/api\/mcp\/?$/.test(base.pathname) || !trustedServerEndpoint(base) || !/^mkw_[A-Za-z0-9_-]{43}$/.test(mcp.token)) return void 0;
|
|
6652
6660
|
const names = [...new Set(mcp.apps)].filter((name) => TOOLKIT.test(name) && !name.startsWith("mikka"));
|
|
6653
6661
|
if (!names.length) return void 0;
|
|
6654
6662
|
return {
|
package/client.js
CHANGED
|
@@ -3763,7 +3763,7 @@ import { join } from "node:path";
|
|
|
3763
3763
|
// package.json
|
|
3764
3764
|
var package_default = {
|
|
3765
3765
|
name: "@mikka/daemon",
|
|
3766
|
-
version: "0.0.
|
|
3766
|
+
version: "0.0.247",
|
|
3767
3767
|
description: "Local Mikka daemon: runs agents through the user's own CLIs",
|
|
3768
3768
|
type: "module",
|
|
3769
3769
|
private: true,
|
|
@@ -3787,7 +3787,7 @@ var package_default = {
|
|
|
3787
3787
|
daemon: "tsx bin/mikka.ts daemon",
|
|
3788
3788
|
dev: "tsx watch bin/mikka.ts daemon --dev --server memory",
|
|
3789
3789
|
typecheck: "tsgo --noEmit -p tsconfig.json",
|
|
3790
|
-
test: "vitest run && pnpm test:mailbox-cli && pnpm test:repository-identity && pnpm test:github-credentials",
|
|
3790
|
+
test: "vitest run && pnpm test:mailbox-cli && pnpm test:repository-identity && pnpm test:github-credentials && pnpm test:trusted-endpoint",
|
|
3791
3791
|
"test:mailbox-cli": "node --import tsx --test --test-timeout=60000 test/run-mailbox.node-test.ts",
|
|
3792
3792
|
"codex:types": 'codex app-server generate-ts --out "${TMPDIR:-/tmp}/mikka-codex-types" && echo "Generated; compare v2/ with src/adapters/codex-protocol.ts"',
|
|
3793
3793
|
"test:real": "MIKKA_REAL_AGENTS=${MIKKA_REAL_AGENTS:-claude_code,codex,cursor} vitest run test/real-agents.test.ts",
|
|
@@ -3795,7 +3795,8 @@ var package_default = {
|
|
|
3795
3795
|
build: "node scripts/build.mjs",
|
|
3796
3796
|
"test:package": "node --test test/package.test.mjs",
|
|
3797
3797
|
"test:repository-identity": "node --experimental-strip-types --test test/repository-identity-pure.node-test.ts",
|
|
3798
|
-
"test:github-credentials": "node --test test/github-credentials.node-test.mjs"
|
|
3798
|
+
"test:github-credentials": "node --test test/github-credentials.node-test.mjs",
|
|
3799
|
+
"test:trusted-endpoint": "node --experimental-strip-types --test test/trusted-endpoint.node-test.ts"
|
|
3799
3800
|
},
|
|
3800
3801
|
dependencies: {
|
|
3801
3802
|
"@agentclientprotocol/sdk": "1.9.0",
|
|
@@ -3821,7 +3822,7 @@ var package_default = {
|
|
|
3821
3822
|
engines: {
|
|
3822
3823
|
node: ">=24"
|
|
3823
3824
|
},
|
|
3824
|
-
gitHead: "
|
|
3825
|
+
gitHead: "ee42fe84a0e7965e2ea1025875ffbb9a706e8c4b"
|
|
3825
3826
|
};
|
|
3826
3827
|
|
|
3827
3828
|
// src/paths.ts
|
package/http-link.js
CHANGED
|
@@ -4011,7 +4011,7 @@ var InvalidIdError = class extends DaemonError {
|
|
|
4011
4011
|
// package.json
|
|
4012
4012
|
var package_default = {
|
|
4013
4013
|
name: "@mikka/daemon",
|
|
4014
|
-
version: "0.0.
|
|
4014
|
+
version: "0.0.247",
|
|
4015
4015
|
description: "Local Mikka daemon: runs agents through the user's own CLIs",
|
|
4016
4016
|
type: "module",
|
|
4017
4017
|
private: true,
|
|
@@ -4035,7 +4035,7 @@ var package_default = {
|
|
|
4035
4035
|
daemon: "tsx bin/mikka.ts daemon",
|
|
4036
4036
|
dev: "tsx watch bin/mikka.ts daemon --dev --server memory",
|
|
4037
4037
|
typecheck: "tsgo --noEmit -p tsconfig.json",
|
|
4038
|
-
test: "vitest run && pnpm test:mailbox-cli && pnpm test:repository-identity && pnpm test:github-credentials",
|
|
4038
|
+
test: "vitest run && pnpm test:mailbox-cli && pnpm test:repository-identity && pnpm test:github-credentials && pnpm test:trusted-endpoint",
|
|
4039
4039
|
"test:mailbox-cli": "node --import tsx --test --test-timeout=60000 test/run-mailbox.node-test.ts",
|
|
4040
4040
|
"codex:types": 'codex app-server generate-ts --out "${TMPDIR:-/tmp}/mikka-codex-types" && echo "Generated; compare v2/ with src/adapters/codex-protocol.ts"',
|
|
4041
4041
|
"test:real": "MIKKA_REAL_AGENTS=${MIKKA_REAL_AGENTS:-claude_code,codex,cursor} vitest run test/real-agents.test.ts",
|
|
@@ -4043,7 +4043,8 @@ var package_default = {
|
|
|
4043
4043
|
build: "node scripts/build.mjs",
|
|
4044
4044
|
"test:package": "node --test test/package.test.mjs",
|
|
4045
4045
|
"test:repository-identity": "node --experimental-strip-types --test test/repository-identity-pure.node-test.ts",
|
|
4046
|
-
"test:github-credentials": "node --test test/github-credentials.node-test.mjs"
|
|
4046
|
+
"test:github-credentials": "node --test test/github-credentials.node-test.mjs",
|
|
4047
|
+
"test:trusted-endpoint": "node --experimental-strip-types --test test/trusted-endpoint.node-test.ts"
|
|
4047
4048
|
},
|
|
4048
4049
|
dependencies: {
|
|
4049
4050
|
"@agentclientprotocol/sdk": "1.9.0",
|
|
@@ -4069,7 +4070,7 @@ var package_default = {
|
|
|
4069
4070
|
engines: {
|
|
4070
4071
|
node: ">=24"
|
|
4071
4072
|
},
|
|
4072
|
-
gitHead: "
|
|
4073
|
+
gitHead: "ee42fe84a0e7965e2ea1025875ffbb9a706e8c4b"
|
|
4073
4074
|
};
|
|
4074
4075
|
|
|
4075
4076
|
// src/paths.ts
|
|
@@ -4090,6 +4091,13 @@ var mailboxInputs = {
|
|
|
4090
4091
|
mailbox_sent: z24.object({}).strict()
|
|
4091
4092
|
};
|
|
4092
4093
|
|
|
4094
|
+
// src/trusted-endpoint.ts
|
|
4095
|
+
function trustedServerEndpoint(url) {
|
|
4096
|
+
if (url.username || url.password || url.search || url.hash) return false;
|
|
4097
|
+
if (url.protocol === "https:") return true;
|
|
4098
|
+
return url.protocol === "http:" && ["127.0.0.1", "localhost", "[::1]"].includes(url.hostname);
|
|
4099
|
+
}
|
|
4100
|
+
|
|
4093
4101
|
// src/run-mailbox.ts
|
|
4094
4102
|
var requestSchema = z25.union([
|
|
4095
4103
|
z25.object({ operation: z25.literal("list") }).strict(),
|
|
@@ -4130,7 +4138,7 @@ async function createRunMailbox(host) {
|
|
|
4130
4138
|
} catch {
|
|
4131
4139
|
throw unavailable();
|
|
4132
4140
|
}
|
|
4133
|
-
if (endpoint.href !== host.endpoint.href ||
|
|
4141
|
+
if (endpoint.href !== host.endpoint.href || !trustedServerEndpoint(endpoint) || !/^mkw_[A-Za-z0-9_-]{43}$/.test(assigned.token)) throw unavailable();
|
|
4134
4142
|
let nextId = 0, session = null, version = "2025-03-26", closed = false, inFlight = 0;
|
|
4135
4143
|
const pending = /* @__PURE__ */ new Set();
|
|
4136
4144
|
const active = () => {
|
package/login.js
CHANGED
|
@@ -3770,7 +3770,7 @@ var ServerUnreachableError = class extends DaemonError {
|
|
|
3770
3770
|
// package.json
|
|
3771
3771
|
var package_default = {
|
|
3772
3772
|
name: "@mikka/daemon",
|
|
3773
|
-
version: "0.0.
|
|
3773
|
+
version: "0.0.247",
|
|
3774
3774
|
description: "Local Mikka daemon: runs agents through the user's own CLIs",
|
|
3775
3775
|
type: "module",
|
|
3776
3776
|
private: true,
|
|
@@ -3794,7 +3794,7 @@ var package_default = {
|
|
|
3794
3794
|
daemon: "tsx bin/mikka.ts daemon",
|
|
3795
3795
|
dev: "tsx watch bin/mikka.ts daemon --dev --server memory",
|
|
3796
3796
|
typecheck: "tsgo --noEmit -p tsconfig.json",
|
|
3797
|
-
test: "vitest run && pnpm test:mailbox-cli && pnpm test:repository-identity && pnpm test:github-credentials",
|
|
3797
|
+
test: "vitest run && pnpm test:mailbox-cli && pnpm test:repository-identity && pnpm test:github-credentials && pnpm test:trusted-endpoint",
|
|
3798
3798
|
"test:mailbox-cli": "node --import tsx --test --test-timeout=60000 test/run-mailbox.node-test.ts",
|
|
3799
3799
|
"codex:types": 'codex app-server generate-ts --out "${TMPDIR:-/tmp}/mikka-codex-types" && echo "Generated; compare v2/ with src/adapters/codex-protocol.ts"',
|
|
3800
3800
|
"test:real": "MIKKA_REAL_AGENTS=${MIKKA_REAL_AGENTS:-claude_code,codex,cursor} vitest run test/real-agents.test.ts",
|
|
@@ -3802,7 +3802,8 @@ var package_default = {
|
|
|
3802
3802
|
build: "node scripts/build.mjs",
|
|
3803
3803
|
"test:package": "node --test test/package.test.mjs",
|
|
3804
3804
|
"test:repository-identity": "node --experimental-strip-types --test test/repository-identity-pure.node-test.ts",
|
|
3805
|
-
"test:github-credentials": "node --test test/github-credentials.node-test.mjs"
|
|
3805
|
+
"test:github-credentials": "node --test test/github-credentials.node-test.mjs",
|
|
3806
|
+
"test:trusted-endpoint": "node --experimental-strip-types --test test/trusted-endpoint.node-test.ts"
|
|
3806
3807
|
},
|
|
3807
3808
|
dependencies: {
|
|
3808
3809
|
"@agentclientprotocol/sdk": "1.9.0",
|
|
@@ -3828,7 +3829,7 @@ var package_default = {
|
|
|
3828
3829
|
engines: {
|
|
3829
3830
|
node: ">=24"
|
|
3830
3831
|
},
|
|
3831
|
-
gitHead: "
|
|
3832
|
+
gitHead: "ee42fe84a0e7965e2ea1025875ffbb9a706e8c4b"
|
|
3832
3833
|
};
|
|
3833
3834
|
|
|
3834
3835
|
// src/paths.ts
|
package/main.js
CHANGED
|
@@ -3327,6 +3327,13 @@ function localGitConfig(env = process.env) {
|
|
|
3327
3327
|
return origin ? [[`url.${pathToFileURL(origin).href}.insteadOf`, repository], ["protocol.file.allow", "always"]] : [];
|
|
3328
3328
|
}
|
|
3329
3329
|
|
|
3330
|
+
// src/trusted-endpoint.ts
|
|
3331
|
+
function trustedServerEndpoint(url) {
|
|
3332
|
+
if (url.username || url.password || url.search || url.hash) return false;
|
|
3333
|
+
if (url.protocol === "https:") return true;
|
|
3334
|
+
return url.protocol === "http:" && ["127.0.0.1", "localhost", "[::1]"].includes(url.hostname);
|
|
3335
|
+
}
|
|
3336
|
+
|
|
3330
3337
|
// src/agents/github-runtime.ts
|
|
3331
3338
|
var GITHUB_CREDENTIAL_SCRIPT = resolve4(import.meta.dirname, "github-credentials.mjs");
|
|
3332
3339
|
var helper = GITHUB_CREDENTIAL_SCRIPT;
|
|
@@ -3352,7 +3359,7 @@ function githubReceiptEnvironment(host = process.env) {
|
|
|
3352
3359
|
}
|
|
3353
3360
|
function prepareGitHubEnvironment(runDir, github, path, runtime) {
|
|
3354
3361
|
const endpoint = new URL(github.endpoint);
|
|
3355
|
-
if (!endpoint.pathname.endsWith("/api/runs/github-token") ||
|
|
3362
|
+
if (!endpoint.pathname.endsWith("/api/runs/github-token") || !trustedServerEndpoint(endpoint)) throw new Error("Invalid run GitHub endpoint");
|
|
3356
3363
|
const gh = runtime?.ghBinary ?? path.split(delimiter).map((dir2) => join4(dir2, "gh")).find((file) => existsSync2(file));
|
|
3357
3364
|
const node = runtime?.nodeBinary ?? process.execPath;
|
|
3358
3365
|
if (!gh) throw new Error("Install GitHub CLI (gh) before running GitHub tasks");
|
|
@@ -3471,7 +3478,7 @@ function runApps(mcp) {
|
|
|
3471
3478
|
} catch {
|
|
3472
3479
|
return void 0;
|
|
3473
3480
|
}
|
|
3474
|
-
if (!/\/api\/mcp\/?$/.test(base.pathname) ||
|
|
3481
|
+
if (!/\/api\/mcp\/?$/.test(base.pathname) || !trustedServerEndpoint(base) || !/^mkw_[A-Za-z0-9_-]{43}$/.test(mcp.token)) return void 0;
|
|
3475
3482
|
const names = [...new Set(mcp.apps)].filter((name) => TOOLKIT.test(name) && !name.startsWith("mikka"));
|
|
3476
3483
|
if (!names.length) return void 0;
|
|
3477
3484
|
return {
|
|
@@ -3881,7 +3888,7 @@ import { join as join5 } from "node:path";
|
|
|
3881
3888
|
// package.json
|
|
3882
3889
|
var package_default = {
|
|
3883
3890
|
name: "@mikka/daemon",
|
|
3884
|
-
version: "0.0.
|
|
3891
|
+
version: "0.0.247",
|
|
3885
3892
|
description: "Local Mikka daemon: runs agents through the user's own CLIs",
|
|
3886
3893
|
type: "module",
|
|
3887
3894
|
private: true,
|
|
@@ -3905,7 +3912,7 @@ var package_default = {
|
|
|
3905
3912
|
daemon: "tsx bin/mikka.ts daemon",
|
|
3906
3913
|
dev: "tsx watch bin/mikka.ts daemon --dev --server memory",
|
|
3907
3914
|
typecheck: "tsgo --noEmit -p tsconfig.json",
|
|
3908
|
-
test: "vitest run && pnpm test:mailbox-cli && pnpm test:repository-identity && pnpm test:github-credentials",
|
|
3915
|
+
test: "vitest run && pnpm test:mailbox-cli && pnpm test:repository-identity && pnpm test:github-credentials && pnpm test:trusted-endpoint",
|
|
3909
3916
|
"test:mailbox-cli": "node --import tsx --test --test-timeout=60000 test/run-mailbox.node-test.ts",
|
|
3910
3917
|
"codex:types": 'codex app-server generate-ts --out "${TMPDIR:-/tmp}/mikka-codex-types" && echo "Generated; compare v2/ with src/adapters/codex-protocol.ts"',
|
|
3911
3918
|
"test:real": "MIKKA_REAL_AGENTS=${MIKKA_REAL_AGENTS:-claude_code,codex,cursor} vitest run test/real-agents.test.ts",
|
|
@@ -3913,7 +3920,8 @@ var package_default = {
|
|
|
3913
3920
|
build: "node scripts/build.mjs",
|
|
3914
3921
|
"test:package": "node --test test/package.test.mjs",
|
|
3915
3922
|
"test:repository-identity": "node --experimental-strip-types --test test/repository-identity-pure.node-test.ts",
|
|
3916
|
-
"test:github-credentials": "node --test test/github-credentials.node-test.mjs"
|
|
3923
|
+
"test:github-credentials": "node --test test/github-credentials.node-test.mjs",
|
|
3924
|
+
"test:trusted-endpoint": "node --experimental-strip-types --test test/trusted-endpoint.node-test.ts"
|
|
3917
3925
|
},
|
|
3918
3926
|
dependencies: {
|
|
3919
3927
|
"@agentclientprotocol/sdk": "1.9.0",
|
|
@@ -3939,7 +3947,7 @@ var package_default = {
|
|
|
3939
3947
|
engines: {
|
|
3940
3948
|
node: ">=24"
|
|
3941
3949
|
},
|
|
3942
|
-
gitHead: "
|
|
3950
|
+
gitHead: "ee42fe84a0e7965e2ea1025875ffbb9a706e8c4b"
|
|
3943
3951
|
};
|
|
3944
3952
|
|
|
3945
3953
|
// src/paths.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"sourceSha": "
|
|
3
|
+
"sourceSha": "ee42fe84a0e7965e2ea1025875ffbb9a706e8c4b",
|
|
4
4
|
"repository": "alexj11324/Mikka",
|
|
5
|
-
"buildRunId": "
|
|
5
|
+
"buildRunId": "41380593625",
|
|
6
6
|
"buildKind": "github-actions-main",
|
|
7
7
|
"sourceLockSha256": "d5866677d0c52d856be14efba47832070bc7f2fb92ef64b3bb253a4836587d30",
|
|
8
|
-
"createdAt": "2026-11-02T03:
|
|
8
|
+
"createdAt": "2026-11-02T03:21:08.941Z",
|
|
9
9
|
"sbom": "sbom.cdx.json",
|
|
10
10
|
"files": [
|
|
11
11
|
{
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"path": "cli.js",
|
|
38
|
-
"size":
|
|
39
|
-
"sha256": "
|
|
38
|
+
"size": 589846,
|
|
39
|
+
"sha256": "66557aa94feae4a2762b543bcc08ac2f673011b5406497c207b4095c3dcd6645"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"path": "client.js",
|
|
43
|
-
"size":
|
|
44
|
-
"sha256": "
|
|
43
|
+
"size": 142669,
|
|
44
|
+
"sha256": "b7e0cd398efb0c24f738769f89f772ebf454e1066092c095a9eb7ee78803c47b"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"path": "computer/driver.mjs",
|
|
@@ -165,8 +165,8 @@
|
|
|
165
165
|
},
|
|
166
166
|
{
|
|
167
167
|
"path": "http-link.js",
|
|
168
|
-
"size":
|
|
169
|
-
"sha256": "
|
|
168
|
+
"size": 175107,
|
|
169
|
+
"sha256": "eee963ef6b730d4dd8cb6460b703e4d22884858c75800e7eefba094bed6e5ecd"
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
172
|
"path": "log.js",
|
|
@@ -175,13 +175,13 @@
|
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
177
|
"path": "login.js",
|
|
178
|
-
"size":
|
|
179
|
-
"sha256": "
|
|
178
|
+
"size": 147404,
|
|
179
|
+
"sha256": "e854cdb263d88e1e13e849ac1012369df26e6817fe648df155104c5c5c9a4bf7"
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
182
|
"path": "main.js",
|
|
183
|
-
"size":
|
|
184
|
-
"sha256": "
|
|
183
|
+
"size": 542495,
|
|
184
|
+
"sha256": "4715fbf8870f8fb677bfd5af8ce6bf6f7f23e2914ffdb3b36ad22d4a99ff5c53"
|
|
185
185
|
},
|
|
186
186
|
{
|
|
187
187
|
"path": "mikka-mcp.mjs",
|
|
@@ -190,23 +190,23 @@
|
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
192
|
"path": "mikka.js",
|
|
193
|
-
"size":
|
|
194
|
-
"sha256": "
|
|
193
|
+
"size": 589862,
|
|
194
|
+
"sha256": "2b7f9c93782b2358cca5e4107630ea1ae21ed0f069d4717a5bd3cf800fa09471"
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
197
|
"path": "npm-shrinkwrap.json",
|
|
198
198
|
"size": 76020,
|
|
199
|
-
"sha256": "
|
|
199
|
+
"sha256": "596e35231925c4acbf526831b4143f8b19349c37be0831fbcb50ee7a12491e37"
|
|
200
200
|
},
|
|
201
201
|
{
|
|
202
202
|
"path": "package.json",
|
|
203
203
|
"size": 1200,
|
|
204
|
-
"sha256": "
|
|
204
|
+
"sha256": "d78c1511c8bea6a98b40c136cf1b8e5aaf599c4fcab3de4b9c12e638350d39e9"
|
|
205
205
|
},
|
|
206
206
|
{
|
|
207
207
|
"path": "paths.js",
|
|
208
|
-
"size":
|
|
209
|
-
"sha256": "
|
|
208
|
+
"size": 4117,
|
|
209
|
+
"sha256": "4e6539753ae13ec89bee93f7ed2df92434a2e739a70d8d8d4d63f9565a5c566e"
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
212
|
"path": "sandbox.js",
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
{
|
|
217
217
|
"path": "sbom.cdx.json",
|
|
218
218
|
"size": 139999,
|
|
219
|
-
"sha256": "
|
|
219
|
+
"sha256": "fa91256db3239f7ffe5e8ea17fefdd17f02e4784118d413ebe63a50a4f5572e4"
|
|
220
220
|
}
|
|
221
221
|
]
|
|
222
222
|
}
|
package/mikka.js
CHANGED
|
@@ -4520,7 +4520,7 @@ import { join as join4 } from "node:path";
|
|
|
4520
4520
|
// package.json
|
|
4521
4521
|
var package_default = {
|
|
4522
4522
|
name: "@mikka/daemon",
|
|
4523
|
-
version: "0.0.
|
|
4523
|
+
version: "0.0.247",
|
|
4524
4524
|
description: "Local Mikka daemon: runs agents through the user's own CLIs",
|
|
4525
4525
|
type: "module",
|
|
4526
4526
|
private: true,
|
|
@@ -4544,7 +4544,7 @@ var package_default = {
|
|
|
4544
4544
|
daemon: "tsx bin/mikka.ts daemon",
|
|
4545
4545
|
dev: "tsx watch bin/mikka.ts daemon --dev --server memory",
|
|
4546
4546
|
typecheck: "tsgo --noEmit -p tsconfig.json",
|
|
4547
|
-
test: "vitest run && pnpm test:mailbox-cli && pnpm test:repository-identity && pnpm test:github-credentials",
|
|
4547
|
+
test: "vitest run && pnpm test:mailbox-cli && pnpm test:repository-identity && pnpm test:github-credentials && pnpm test:trusted-endpoint",
|
|
4548
4548
|
"test:mailbox-cli": "node --import tsx --test --test-timeout=60000 test/run-mailbox.node-test.ts",
|
|
4549
4549
|
"codex:types": 'codex app-server generate-ts --out "${TMPDIR:-/tmp}/mikka-codex-types" && echo "Generated; compare v2/ with src/adapters/codex-protocol.ts"',
|
|
4550
4550
|
"test:real": "MIKKA_REAL_AGENTS=${MIKKA_REAL_AGENTS:-claude_code,codex,cursor} vitest run test/real-agents.test.ts",
|
|
@@ -4552,7 +4552,8 @@ var package_default = {
|
|
|
4552
4552
|
build: "node scripts/build.mjs",
|
|
4553
4553
|
"test:package": "node --test test/package.test.mjs",
|
|
4554
4554
|
"test:repository-identity": "node --experimental-strip-types --test test/repository-identity-pure.node-test.ts",
|
|
4555
|
-
"test:github-credentials": "node --test test/github-credentials.node-test.mjs"
|
|
4555
|
+
"test:github-credentials": "node --test test/github-credentials.node-test.mjs",
|
|
4556
|
+
"test:trusted-endpoint": "node --experimental-strip-types --test test/trusted-endpoint.node-test.ts"
|
|
4556
4557
|
},
|
|
4557
4558
|
dependencies: {
|
|
4558
4559
|
"@agentclientprotocol/sdk": "1.9.0",
|
|
@@ -4578,7 +4579,7 @@ var package_default = {
|
|
|
4578
4579
|
engines: {
|
|
4579
4580
|
node: ">=24"
|
|
4580
4581
|
},
|
|
4581
|
-
gitHead: "
|
|
4582
|
+
gitHead: "ee42fe84a0e7965e2ea1025875ffbb9a706e8c4b"
|
|
4582
4583
|
};
|
|
4583
4584
|
|
|
4584
4585
|
// src/paths.ts
|
|
@@ -4833,6 +4834,13 @@ function personalMessagePacket(source, body) {
|
|
|
4833
4834
|
return encode({ version: 1, kind: "personal_agent_message", authority: "coordination_data_only", source: validateSource(source), untrustedData: { body } });
|
|
4834
4835
|
}
|
|
4835
4836
|
|
|
4837
|
+
// src/trusted-endpoint.ts
|
|
4838
|
+
function trustedServerEndpoint(url) {
|
|
4839
|
+
if (url.username || url.password || url.search || url.hash) return false;
|
|
4840
|
+
if (url.protocol === "https:") return true;
|
|
4841
|
+
return url.protocol === "http:" && ["127.0.0.1", "localhost", "[::1]"].includes(url.hostname);
|
|
4842
|
+
}
|
|
4843
|
+
|
|
4836
4844
|
// src/run-mailbox.ts
|
|
4837
4845
|
function mailboxNoticeText(runId, ids) {
|
|
4838
4846
|
const messageIds = z25.array(z25.uuid()).min(1).max(50).parse(ids);
|
|
@@ -4902,7 +4910,7 @@ async function createRunMailbox(host) {
|
|
|
4902
4910
|
} catch {
|
|
4903
4911
|
throw unavailable();
|
|
4904
4912
|
}
|
|
4905
|
-
if (endpoint.href !== host.endpoint.href ||
|
|
4913
|
+
if (endpoint.href !== host.endpoint.href || !trustedServerEndpoint(endpoint) || !/^mkw_[A-Za-z0-9_-]{43}$/.test(assigned.token)) throw unavailable();
|
|
4906
4914
|
let nextId = 0, session = null, version = "2025-03-26", closed = false, inFlight = 0;
|
|
4907
4915
|
const pending = /* @__PURE__ */ new Set();
|
|
4908
4916
|
const active = () => {
|
|
@@ -6530,7 +6538,7 @@ function githubReceiptEnvironment(host = process.env) {
|
|
|
6530
6538
|
}
|
|
6531
6539
|
function prepareGitHubEnvironment(runDir, github, path, runtime) {
|
|
6532
6540
|
const endpoint = new URL(github.endpoint);
|
|
6533
|
-
if (!endpoint.pathname.endsWith("/api/runs/github-token") ||
|
|
6541
|
+
if (!endpoint.pathname.endsWith("/api/runs/github-token") || !trustedServerEndpoint(endpoint)) throw new Error("Invalid run GitHub endpoint");
|
|
6534
6542
|
const gh = runtime?.ghBinary ?? path.split(delimiter).map((dir2) => join8(dir2, "gh")).find((file) => existsSync3(file));
|
|
6535
6543
|
const node = runtime?.nodeBinary ?? process.execPath;
|
|
6536
6544
|
if (!gh) throw new Error("Install GitHub CLI (gh) before running GitHub tasks");
|
|
@@ -6649,7 +6657,7 @@ function runApps(mcp) {
|
|
|
6649
6657
|
} catch {
|
|
6650
6658
|
return void 0;
|
|
6651
6659
|
}
|
|
6652
|
-
if (!/\/api\/mcp\/?$/.test(base.pathname) ||
|
|
6660
|
+
if (!/\/api\/mcp\/?$/.test(base.pathname) || !trustedServerEndpoint(base) || !/^mkw_[A-Za-z0-9_-]{43}$/.test(mcp.token)) return void 0;
|
|
6653
6661
|
const names = [...new Set(mcp.apps)].filter((name) => TOOLKIT.test(name) && !name.startsWith("mikka"));
|
|
6654
6662
|
if (!names.length) return void 0;
|
|
6655
6663
|
return {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aspectlylabs/mikka",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.247",
|
|
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.247",
|
|
10
10
|
"license": "AGPL-3.0-only",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@agentclientprotocol/sdk": "1.9.0",
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aspectlylabs/mikka",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.247",
|
|
4
4
|
"description": "Local Mikka daemon: runs agents through the user's own CLIs",
|
|
5
|
-
"gitHead": "
|
|
5
|
+
"gitHead": "ee42fe84a0e7965e2ea1025875ffbb9a706e8c4b",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"private": false,
|
|
8
8
|
"license": "AGPL-3.0-only",
|
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.247",
|
|
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 && pnpm test:trusted-endpoint",
|
|
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,7 +38,8 @@ 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"
|
|
41
|
+
"test:github-credentials": "node --test test/github-credentials.node-test.mjs",
|
|
42
|
+
"test:trusted-endpoint": "node --experimental-strip-types --test test/trusted-endpoint.node-test.ts"
|
|
42
43
|
},
|
|
43
44
|
dependencies: {
|
|
44
45
|
"@agentclientprotocol/sdk": "1.9.0",
|
|
@@ -64,7 +65,7 @@ var package_default = {
|
|
|
64
65
|
engines: {
|
|
65
66
|
node: ">=24"
|
|
66
67
|
},
|
|
67
|
-
gitHead: "
|
|
68
|
+
gitHead: "ee42fe84a0e7965e2ea1025875ffbb9a706e8c4b"
|
|
68
69
|
};
|
|
69
70
|
|
|
70
71
|
// src/paths.ts
|
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:75e31b62-94af-47bd-b9ca-90c367ddd97c",
|
|
6
6
|
"version": 1,
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-11-02T03:
|
|
8
|
+
"timestamp": "2026-11-02T03:21:08.101Z",
|
|
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.247",
|
|
23
23
|
"type": "library",
|
|
24
|
-
"name": ".retained-build-
|
|
25
|
-
"version": "0.0.
|
|
24
|
+
"name": ".retained-build-lf5Tdr",
|
|
25
|
+
"version": "0.0.247",
|
|
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.247",
|
|
29
29
|
"properties": [],
|
|
30
30
|
"externalReferences": [
|
|
31
31
|
{
|
|
@@ -4489,7 +4489,7 @@
|
|
|
4489
4489
|
],
|
|
4490
4490
|
"dependencies": [
|
|
4491
4491
|
{
|
|
4492
|
-
"ref": "@aspectlylabs/mikka@0.0.
|
|
4492
|
+
"ref": "@aspectlylabs/mikka@0.0.247",
|
|
4493
4493
|
"dependsOn": [
|
|
4494
4494
|
"@agentclientprotocol/sdk@1.9.0",
|
|
4495
4495
|
"@anthropic-ai/claude-agent-sdk@0.3.305",
|