@aspectlylabs/mikka 0.0.244 → 0.0.246

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 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.244",
4522
+ version: "0.0.246",
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: "44e919f1b65c17908814097f016f0c2b38fab0c3"
4581
+ gitHead: "045ada80a6b7994d97e7c42918490feee63508ac"
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 || endpoint.username || endpoint.password || endpoint.search || endpoint.hash || endpoint.protocol !== "https:" && !(endpoint.protocol === "http:" && ["127.0.0.1", "localhost", "[::1]"].includes(endpoint.hostname)) || !/^mkw_[A-Za-z0-9_-]{43}$/.test(assigned.token)) throw unavailable();
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") || endpoint.username || endpoint.password || endpoint.search || endpoint.hash || endpoint.protocol !== "https:" && !(endpoint.protocol === "http:" && ["127.0.0.1", "localhost", "[::1]"].includes(endpoint.hostname))) throw new Error("Invalid run GitHub endpoint");
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) || base.username || base.password || base.search || base.hash || base.protocol !== "https:" && !(base.protocol === "http:" && ["127.0.0.1", "localhost", "[::1]"].includes(base.hostname)) || !/^mkw_[A-Za-z0-9_-]{43}$/.test(mcp.token)) return void 0;
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.244",
3766
+ version: "0.0.246",
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: "44e919f1b65c17908814097f016f0c2b38fab0c3"
3825
+ gitHead: "045ada80a6b7994d97e7c42918490feee63508ac"
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.244",
4014
+ version: "0.0.246",
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: "44e919f1b65c17908814097f016f0c2b38fab0c3"
4073
+ gitHead: "045ada80a6b7994d97e7c42918490feee63508ac"
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 || endpoint.username || endpoint.password || endpoint.search || endpoint.hash || endpoint.protocol !== "https:" && !(endpoint.protocol === "http:" && ["127.0.0.1", "localhost", "[::1]"].includes(endpoint.hostname)) || !/^mkw_[A-Za-z0-9_-]{43}$/.test(assigned.token)) throw unavailable();
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.244",
3773
+ version: "0.0.246",
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: "44e919f1b65c17908814097f016f0c2b38fab0c3"
3832
+ gitHead: "045ada80a6b7994d97e7c42918490feee63508ac"
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") || endpoint.username || endpoint.password || endpoint.search || endpoint.hash || endpoint.protocol !== "https:" && !(endpoint.protocol === "http:" && ["127.0.0.1", "localhost", "[::1]"].includes(endpoint.hostname))) throw new Error("Invalid run GitHub endpoint");
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) || base.username || base.password || base.search || base.hash || base.protocol !== "https:" && !(base.protocol === "http:" && ["127.0.0.1", "localhost", "[::1]"].includes(base.hostname)) || !/^mkw_[A-Za-z0-9_-]{43}$/.test(mcp.token)) return void 0;
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.244",
3891
+ version: "0.0.246",
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: "44e919f1b65c17908814097f016f0c2b38fab0c3"
3950
+ gitHead: "045ada80a6b7994d97e7c42918490feee63508ac"
3943
3951
  };
3944
3952
 
3945
3953
  // src/paths.ts
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "version": 1,
3
- "sourceSha": "44e919f1b65c17908814097f016f0c2b38fab0c3",
3
+ "sourceSha": "045ada80a6b7994d97e7c42918490feee63508ac",
4
4
  "repository": "alexj11324/Mikka",
5
- "buildRunId": "41379782775",
5
+ "buildRunId": "41380285789",
6
6
  "buildKind": "github-actions-main",
7
7
  "sourceLockSha256": "d5866677d0c52d856be14efba47832070bc7f2fb92ef64b3bb253a4836587d30",
8
- "createdAt": "2026-11-02T03:08:30.465Z",
8
+ "createdAt": "2026-11-02T03:15:52.337Z",
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": 589936,
39
- "sha256": "a9cf773b1b90e17c7f4044854eae793253c778e28a5b5b69a2d821ad89ae18c0"
38
+ "size": 589846,
39
+ "sha256": "0467b88baff2c4b0bd503f0eb3f74c0422af2967919e9a0b2aaec6d9ace10752"
40
40
  },
41
41
  {
42
42
  "path": "client.js",
43
- "size": 142533,
44
- "sha256": "3ac35c0b3889af4b63e00efa93ab599b35132366672bdb352a37e6f8f9e39b45"
43
+ "size": 142669,
44
+ "sha256": "9e194143e23d7d14d36a2084724e4b231f1955d070e5d620bce8d07c7c355c2f"
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": 174863,
169
- "sha256": "386d36300b01d4b5b721bbb22c49d1a818bcafea65efe8e557653c1e84915489"
168
+ "size": 175107,
169
+ "sha256": "eb8fa986a6e5a22a941b044a3c6ee46a6d6000c0add2a95f27bcad9821186a3b"
170
170
  },
171
171
  {
172
172
  "path": "log.js",
@@ -175,13 +175,13 @@
175
175
  },
176
176
  {
177
177
  "path": "login.js",
178
- "size": 147268,
179
- "sha256": "4104d15f8741dcfd34125b52da23c7d6dbfa5bb61a8b110ac6b8625775eb8ecc"
178
+ "size": 147404,
179
+ "sha256": "9af401586c2534649f4bbd7a66e372485bef37dd841a92a4805cf6d387950e94"
180
180
  },
181
181
  {
182
182
  "path": "main.js",
183
- "size": 542406,
184
- "sha256": "2cb7b6a6a70ca39748e655ca2c7a42dc19e5e9fe7567ff0b97987046a8e1a3e1"
183
+ "size": 542495,
184
+ "sha256": "60a6d49ab5188db108d275277733f8e1073b13142c7bcfbb567e018961668bef"
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": 589952,
194
- "sha256": "622d33a171ff526f0ae09135aea5b749feeeec219cdd7bdf4f95a75eb1e2511f"
193
+ "size": 589862,
194
+ "sha256": "fef3a1b223b87d07721deb0bfd56a49662ae5fd2221e63d1bf642592cad9d44f"
195
195
  },
196
196
  {
197
197
  "path": "npm-shrinkwrap.json",
198
198
  "size": 76020,
199
- "sha256": "4858daf3faa9fbc66755c219eda93bbb88cce9ea31b5bf77c9825865db1f1bf4"
199
+ "sha256": "839c69822874cfc2a56bff0c553c7bedf55f2c0a8f15d9024ec4348b6fbc9e7f"
200
200
  },
201
201
  {
202
202
  "path": "package.json",
203
203
  "size": 1200,
204
- "sha256": "747277cc03ed87df983d2144c6acb816f3d8194b7fa5503be5e1a89dd93ebb12"
204
+ "sha256": "8511abd80d6d3dc9871d0a1830dfeb5ab694864b4360d22ff97b4a1b48fce30f"
205
205
  },
206
206
  {
207
207
  "path": "paths.js",
208
- "size": 3981,
209
- "sha256": "650773f4f50a2112a3a61a5bf09442cc3f3cabaa8e573e10a5f7c008d2386670"
208
+ "size": 4117,
209
+ "sha256": "f4c4557c1f6ff784834f35310910e7b5128433e4069226444d665d4d808b61d8"
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": "ddf77254471456153c926ee566601860556f096be2bc123095e365df5aa032d6"
219
+ "sha256": "f80384ef7701c523e01d27a4eb13aa759749ab182c3012028860ed961bddd8a9"
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.244",
4523
+ version: "0.0.246",
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: "44e919f1b65c17908814097f016f0c2b38fab0c3"
4582
+ gitHead: "045ada80a6b7994d97e7c42918490feee63508ac"
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 || endpoint.username || endpoint.password || endpoint.search || endpoint.hash || endpoint.protocol !== "https:" && !(endpoint.protocol === "http:" && ["127.0.0.1", "localhost", "[::1]"].includes(endpoint.hostname)) || !/^mkw_[A-Za-z0-9_-]{43}$/.test(assigned.token)) throw unavailable();
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") || endpoint.username || endpoint.password || endpoint.search || endpoint.hash || endpoint.protocol !== "https:" && !(endpoint.protocol === "http:" && ["127.0.0.1", "localhost", "[::1]"].includes(endpoint.hostname))) throw new Error("Invalid run GitHub endpoint");
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) || base.username || base.password || base.search || base.hash || base.protocol !== "https:" && !(base.protocol === "http:" && ["127.0.0.1", "localhost", "[::1]"].includes(base.hostname)) || !/^mkw_[A-Za-z0-9_-]{43}$/.test(mcp.token)) return void 0;
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 {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@aspectlylabs/mikka",
3
- "version": "0.0.244",
3
+ "version": "0.0.246",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@aspectlylabs/mikka",
9
- "version": "0.0.244",
9
+ "version": "0.0.246",
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.244",
3
+ "version": "0.0.246",
4
4
  "description": "Local Mikka daemon: runs agents through the user's own CLIs",
5
- "gitHead": "44e919f1b65c17908814097f016f0c2b38fab0c3",
5
+ "gitHead": "045ada80a6b7994d97e7c42918490feee63508ac",
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.244",
9
+ version: "0.0.246",
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: "44e919f1b65c17908814097f016f0c2b38fab0c3"
68
+ gitHead: "045ada80a6b7994d97e7c42918490feee63508ac"
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:c3a83f56-2277-4009-a526-1bce77a78199",
5
+ "serialNumber": "urn:uuid:45498dce-023b-4a98-bcd4-a3fd8bc82827",
6
6
  "version": 1,
7
7
  "metadata": {
8
- "timestamp": "2026-11-02T03:08:29.907Z",
8
+ "timestamp": "2026-11-02T03:15:51.448Z",
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.244",
22
+ "bom-ref": "@aspectlylabs/mikka@0.0.246",
23
23
  "type": "library",
24
- "name": ".retained-build-8u2cjL",
25
- "version": "0.0.244",
24
+ "name": ".retained-build-mrZGF7",
25
+ "version": "0.0.246",
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.244",
28
+ "purl": "pkg:npm/%40aspectlylabs/mikka@0.0.246",
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.244",
4492
+ "ref": "@aspectlylabs/mikka@0.0.246",
4493
4493
  "dependsOn": [
4494
4494
  "@agentclientprotocol/sdk@1.9.0",
4495
4495
  "@anthropic-ai/claude-agent-sdk@0.3.305",