@aspectlylabs/mikka 0.0.155 → 0.0.157
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 +277 -261
- package/client.js +2 -2
- package/http-link.js +41 -4
- package/login.js +6 -2
- package/main.js +19 -10
- package/mikka-release-manifest.json +18 -18
- package/mikka.js +277 -261
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
- package/paths.js +2 -2
- package/sbom.cdx.json +7 -7
package/client.js
CHANGED
|
@@ -3741,7 +3741,7 @@ import { join } from "node:path";
|
|
|
3741
3741
|
// package.json
|
|
3742
3742
|
var package_default = {
|
|
3743
3743
|
name: "@mikka/daemon",
|
|
3744
|
-
version: "0.0.
|
|
3744
|
+
version: "0.0.157",
|
|
3745
3745
|
description: "Local Mikka daemon: runs agents through the user's own CLIs",
|
|
3746
3746
|
type: "module",
|
|
3747
3747
|
private: true,
|
|
@@ -3801,7 +3801,7 @@ var package_default = {
|
|
|
3801
3801
|
engines: {
|
|
3802
3802
|
node: ">=24"
|
|
3803
3803
|
},
|
|
3804
|
-
gitHead: "
|
|
3804
|
+
gitHead: "6b1b0ad1cf20baee870da2c08c5d57c49a02daba"
|
|
3805
3805
|
};
|
|
3806
3806
|
|
|
3807
3807
|
// src/paths.ts
|
package/http-link.js
CHANGED
|
@@ -2410,11 +2410,42 @@ function classifyWrite(worktree, target) {
|
|
|
2410
2410
|
return ok2 ? "write_in_worktree" : "write_outside_repo";
|
|
2411
2411
|
}
|
|
2412
2412
|
|
|
2413
|
+
// src/agents/run-sandbox-launcher.ts
|
|
2414
|
+
import { isIP } from "node:net";
|
|
2415
|
+
import { NetworkConfigSchema } from "@anthropic-ai/sandbox-runtime";
|
|
2416
|
+
var NETWORK_DECISION_MS = 5 * 6e4;
|
|
2417
|
+
function canonicalHost(host) {
|
|
2418
|
+
if (!host || /[\s\x00-\x1f\x7f%\\/@?#*]/u.test(host)) return;
|
|
2419
|
+
const bare = host.startsWith("[") && host.endsWith("]") ? host.slice(1, -1) : host;
|
|
2420
|
+
if (isIP(bare) === 6) return new URL(`http://[${bare}]`).hostname.slice(1, -1);
|
|
2421
|
+
if (bare.includes(":")) return;
|
|
2422
|
+
try {
|
|
2423
|
+
return new URL(`http://${bare}`).hostname.toLowerCase();
|
|
2424
|
+
} catch {
|
|
2425
|
+
return void 0;
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
function matchesRunSandboxDomain(request, domains) {
|
|
2429
|
+
const host = canonicalHost(request.host);
|
|
2430
|
+
if (!host || !Number.isInteger(request.port) || request.port < 1 || request.port > 65535) return false;
|
|
2431
|
+
return domains.some((entry) => {
|
|
2432
|
+
if (entry === "*") return true;
|
|
2433
|
+
const parts = /^(\[[^\]]+\]|[^:]+?)(?::([1-9][0-9]{0,4}))?$/u.exec(entry);
|
|
2434
|
+
if (!parts || parts[2] !== void 0 && (Number(parts[2]) > 65535 || Number(parts[2]) !== request.port)) return false;
|
|
2435
|
+
const wildcard = parts[1].startsWith("*.");
|
|
2436
|
+
const pattern = canonicalHost(wildcard ? parts[1].slice(2) : parts[1]);
|
|
2437
|
+
if (!pattern) return false;
|
|
2438
|
+
if (!wildcard) return host === pattern;
|
|
2439
|
+
return !isIP(host) && pattern.includes(".") && host.endsWith(`.${pattern}`);
|
|
2440
|
+
});
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2413
2443
|
// src/agents/tool-approval-policy.ts
|
|
2414
|
-
function toolApprovalDecision(request, policy, worktree, apps = []) {
|
|
2444
|
+
function toolApprovalDecision(request, policy, worktree, apps = [], runHosts = []) {
|
|
2415
2445
|
if (request.method === "sandbox/network" && policy) {
|
|
2416
2446
|
const value = request.input;
|
|
2417
2447
|
if (!value || typeof value.host !== "string" || /[*/:]/.test(value.host) || !networkDomainSchema.safeParse(value.host).success || !Number.isInteger(value.port) || Number(value.port) < 1 || Number(value.port) > 65535) return "deny";
|
|
2448
|
+
if (policy.permissions.network === "ask" && matchesRunSandboxDomain({ host: value.host, port: Number(value.port) }, [...policy.networkAllow, ...runHosts])) return "allow";
|
|
2418
2449
|
return policy.permissions.network;
|
|
2419
2450
|
}
|
|
2420
2451
|
if (request.method.startsWith("cli/") && policy && worktree) {
|
|
@@ -4144,7 +4175,7 @@ var InvalidIdError = class extends DaemonError {
|
|
|
4144
4175
|
// package.json
|
|
4145
4176
|
var package_default = {
|
|
4146
4177
|
name: "@mikka/daemon",
|
|
4147
|
-
version: "0.0.
|
|
4178
|
+
version: "0.0.157",
|
|
4148
4179
|
description: "Local Mikka daemon: runs agents through the user's own CLIs",
|
|
4149
4180
|
type: "module",
|
|
4150
4181
|
private: true,
|
|
@@ -4204,7 +4235,7 @@ var package_default = {
|
|
|
4204
4235
|
engines: {
|
|
4205
4236
|
node: ">=24"
|
|
4206
4237
|
},
|
|
4207
|
-
gitHead: "
|
|
4238
|
+
gitHead: "6b1b0ad1cf20baee870da2c08c5d57c49a02daba"
|
|
4208
4239
|
};
|
|
4209
4240
|
|
|
4210
4241
|
// src/paths.ts
|
|
@@ -4429,7 +4460,13 @@ var HttpServerLink = class {
|
|
|
4429
4460
|
const response = z26.object({ decision: z26.enum(["pending", "allow", "deny"]) });
|
|
4430
4461
|
const liveness = new AbortController();
|
|
4431
4462
|
const gate = new ToolApprovalGate(assignment.runId, {
|
|
4432
|
-
permission: (request) => toolApprovalDecision(
|
|
4463
|
+
permission: (request) => toolApprovalDecision(
|
|
4464
|
+
request,
|
|
4465
|
+
assignment.policy,
|
|
4466
|
+
worktree,
|
|
4467
|
+
runApps(assignment.mcp)?.apps.map((app) => app.name),
|
|
4468
|
+
assignment.github ? [new URL(assignment.github.endpoint).host] : []
|
|
4469
|
+
),
|
|
4433
4470
|
// Keep the callback pending at the tool boundary. The adapter's current
|
|
4434
4471
|
// session and checkpoint remain intact; handback resolves this same call.
|
|
4435
4472
|
isLive: async () => {
|
package/login.js
CHANGED
|
@@ -3748,7 +3748,7 @@ var ServerUnreachableError = class extends DaemonError {
|
|
|
3748
3748
|
// package.json
|
|
3749
3749
|
var package_default = {
|
|
3750
3750
|
name: "@mikka/daemon",
|
|
3751
|
-
version: "0.0.
|
|
3751
|
+
version: "0.0.157",
|
|
3752
3752
|
description: "Local Mikka daemon: runs agents through the user's own CLIs",
|
|
3753
3753
|
type: "module",
|
|
3754
3754
|
private: true,
|
|
@@ -3808,7 +3808,7 @@ var package_default = {
|
|
|
3808
3808
|
engines: {
|
|
3809
3809
|
node: ">=24"
|
|
3810
3810
|
},
|
|
3811
|
-
gitHead: "
|
|
3811
|
+
gitHead: "6b1b0ad1cf20baee870da2c08c5d57c49a02daba"
|
|
3812
3812
|
};
|
|
3813
3813
|
|
|
3814
3814
|
// src/paths.ts
|
|
@@ -3817,6 +3817,10 @@ var DAEMON_VERSION = package_default.version;
|
|
|
3817
3817
|
// src/server-link-http.ts
|
|
3818
3818
|
import { z as z26 } from "zod";
|
|
3819
3819
|
|
|
3820
|
+
// src/agents/run-sandbox-launcher.ts
|
|
3821
|
+
import { NetworkConfigSchema } from "@anthropic-ai/sandbox-runtime";
|
|
3822
|
+
var NETWORK_DECISION_MS = 5 * 6e4;
|
|
3823
|
+
|
|
3820
3824
|
// ../protocol/src/capture.ts
|
|
3821
3825
|
import { z as z23 } from "zod";
|
|
3822
3826
|
var CAPTURE_CONTENT_TYPES = [
|
package/main.js
CHANGED
|
@@ -3785,7 +3785,7 @@ import { join as join5 } from "node:path";
|
|
|
3785
3785
|
// package.json
|
|
3786
3786
|
var package_default = {
|
|
3787
3787
|
name: "@mikka/daemon",
|
|
3788
|
-
version: "0.0.
|
|
3788
|
+
version: "0.0.157",
|
|
3789
3789
|
description: "Local Mikka daemon: runs agents through the user's own CLIs",
|
|
3790
3790
|
type: "module",
|
|
3791
3791
|
private: true,
|
|
@@ -3845,7 +3845,7 @@ var package_default = {
|
|
|
3845
3845
|
engines: {
|
|
3846
3846
|
node: ">=24"
|
|
3847
3847
|
},
|
|
3848
|
-
gitHead: "
|
|
3848
|
+
gitHead: "6b1b0ad1cf20baee870da2c08c5d57c49a02daba"
|
|
3849
3849
|
};
|
|
3850
3850
|
|
|
3851
3851
|
// src/paths.ts
|
|
@@ -3985,7 +3985,7 @@ function classifySegment(segment, depth) {
|
|
|
3985
3985
|
if (entry && verb && entry[1].includes(verb)) return "install_dependency";
|
|
3986
3986
|
return null;
|
|
3987
3987
|
}
|
|
3988
|
-
function claudePermissionRules(policy) {
|
|
3988
|
+
function claudePermissionRules(policy, agentDelivers = false) {
|
|
3989
3989
|
const install2 = INSTALL_COMMANDS.flatMap(
|
|
3990
3990
|
([tool2, verbs]) => verbs.map((verb) => `Bash(${tool2} ${verb}:*)`)
|
|
3991
3991
|
);
|
|
@@ -3995,7 +3995,7 @@ function claudePermissionRules(policy) {
|
|
|
3995
3995
|
ask: decision === "ask" ? install2 : [],
|
|
3996
3996
|
deny: [
|
|
3997
3997
|
...!rawCliShellAvailable(policy) ? ["Bash", "PowerShell", "Monitor"] : [],
|
|
3998
|
-
"Bash(git push:*)",
|
|
3998
|
+
...agentDelivers && !policy.readOnly ? [] : ["Bash(git push:*)"],
|
|
3999
3999
|
...policy.readOnly ? READ_ONLY_TOOLS : [],
|
|
4000
4000
|
...decision === "deny" ? install2 : []
|
|
4001
4001
|
]
|
|
@@ -6015,6 +6015,14 @@ var RunContext = class {
|
|
|
6015
6015
|
tempEnv() {
|
|
6016
6016
|
return { TMPDIR: this.tmpDir, TMPPREFIX: join8(this.tmpDir, "zsh"), ...withGitConfig(this.githubEnv, RUN_GIT_CONFIG), ...this.options.policyHash ? { MIKKA_POLICY_HASH: this.options.policyHash } : {} };
|
|
6017
6017
|
}
|
|
6018
|
+
/**
|
|
6019
|
+
* The agent delivers this run itself: it commits, pushes to the issue
|
|
6020
|
+
* branch and opens the pull request with run-scoped GitHub credentials. The
|
|
6021
|
+
* server sends GitHub delivery only for a run whose push is allowed.
|
|
6022
|
+
*/
|
|
6023
|
+
get agentDelivers() {
|
|
6024
|
+
return Object.keys(this.githubEnv).length > 0;
|
|
6025
|
+
}
|
|
6018
6026
|
/** A hand-in from an earlier session would end this one at once. */
|
|
6019
6027
|
clearHandoff() {
|
|
6020
6028
|
rmSync7(this.handoffFile, { force: true });
|
|
@@ -7072,10 +7080,10 @@ function claudeSandboxSettings(policy) {
|
|
|
7072
7080
|
}
|
|
7073
7081
|
};
|
|
7074
7082
|
}
|
|
7075
|
-
function claudeSettings(policy, workspace) {
|
|
7083
|
+
function claudeSettings(policy, workspace, agentDelivers = false) {
|
|
7076
7084
|
return {
|
|
7077
7085
|
sandbox: claudeSandboxSettings(policy),
|
|
7078
|
-
permissions: claudePermissionRules(runPolicy(workspace))
|
|
7086
|
+
permissions: claudePermissionRules(runPolicy(workspace), agentDelivers)
|
|
7079
7087
|
};
|
|
7080
7088
|
}
|
|
7081
7089
|
function claudeChunks(message) {
|
|
@@ -7415,7 +7423,7 @@ var ClaudeAdapter = class {
|
|
|
7415
7423
|
},
|
|
7416
7424
|
settingSources: [],
|
|
7417
7425
|
settings: {
|
|
7418
|
-
...claudeSettings(ctx.policy(), options.policy),
|
|
7426
|
+
...claudeSettings(ctx.policy(), options.policy, ctx.agentDelivers),
|
|
7419
7427
|
// The official runtime launcher encloses the entire CLI. Nesting
|
|
7420
7428
|
// the CLI's Bash-only sandbox is unsupported on macOS.
|
|
7421
7429
|
...outerLocal ? { sandbox: { enabled: false, allowUnsandboxedCommands: true, autoAllowBashIfSandboxed: false } } : {},
|
|
@@ -8270,7 +8278,7 @@ var CodexAdapter = class {
|
|
|
8270
8278
|
import { Readable, Writable } from "node:stream";
|
|
8271
8279
|
import * as acp from "@agentclientprotocol/sdk";
|
|
8272
8280
|
import { join as join13 } from "node:path";
|
|
8273
|
-
function acpPermissionResponse(params, policy) {
|
|
8281
|
+
function acpPermissionResponse(params, policy, agentDelivers = false) {
|
|
8274
8282
|
const pick = (kinds) => {
|
|
8275
8283
|
for (const kind of kinds) {
|
|
8276
8284
|
const option = params.options.find((o) => o.kind === kind);
|
|
@@ -8282,7 +8290,7 @@ function acpPermissionResponse(params, policy) {
|
|
|
8282
8290
|
const raw = params.toolCall.rawInput;
|
|
8283
8291
|
const command = Array.isArray(raw?.command) ? raw.command.join(" ") : typeof raw?.command === "string" ? raw.command : params.toolCall.title ?? "";
|
|
8284
8292
|
const action = classifyCommand(command);
|
|
8285
|
-
const refused = action === "git_push" || action !== null && decide(action, { policy: runPolicy(policy) }) !== "allow";
|
|
8293
|
+
const refused = action === "git_push" && !agentDelivers || action !== null && decide(action, { policy: runPolicy(policy) }) !== "allow";
|
|
8286
8294
|
if (refused)
|
|
8287
8295
|
return { response: pick(["reject_once", "reject_always"]), refused };
|
|
8288
8296
|
const allowed = pick(["allow_always", "allow_once"]);
|
|
@@ -8465,7 +8473,8 @@ var CursorAdapter = class {
|
|
|
8465
8473
|
async requestPermission(params) {
|
|
8466
8474
|
const { response, refused } = acpPermissionResponse(
|
|
8467
8475
|
params,
|
|
8468
|
-
options.policy
|
|
8476
|
+
options.policy,
|
|
8477
|
+
ctx.agentDelivers
|
|
8469
8478
|
);
|
|
8470
8479
|
if (refused)
|
|
8471
8480
|
log.info(
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"sourceSha": "
|
|
3
|
+
"sourceSha": "6b1b0ad1cf20baee870da2c08c5d57c49a02daba",
|
|
4
4
|
"repository": "alexj11324/Mikka",
|
|
5
|
-
"buildRunId": "
|
|
5
|
+
"buildRunId": "41301888300",
|
|
6
6
|
"buildKind": "github-actions-main",
|
|
7
7
|
"sourceLockSha256": "c99f1e4f641d8e004cfe807653478e10f91e53fcf47102add5f4c154cdc1cb57",
|
|
8
|
-
"createdAt": "2026-11-01T11:
|
|
8
|
+
"createdAt": "2026-11-01T11:38:56.518Z",
|
|
9
9
|
"sbom": "sbom.cdx.json",
|
|
10
10
|
"files": [
|
|
11
11
|
{
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"path": "cli.js",
|
|
43
|
-
"size":
|
|
44
|
-
"sha256": "
|
|
43
|
+
"size": 650215,
|
|
44
|
+
"sha256": "e16b73443a1f6d71bce65e568853cb1dbf2461a030082f05cd5665269c6b6317"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"path": "client.js",
|
|
48
48
|
"size": 141206,
|
|
49
|
-
"sha256": "
|
|
49
|
+
"sha256": "f0a3a3e922932cd9dfe903ffa2304b33da5cb1ddc94d8132e90d6f64a1764579"
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"path": "computer/driver.mjs",
|
|
@@ -175,8 +175,8 @@
|
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
177
|
"path": "http-link.js",
|
|
178
|
-
"size":
|
|
179
|
-
"sha256": "
|
|
178
|
+
"size": 184199,
|
|
179
|
+
"sha256": "2b7b6ca45649f0a429c783818760b77ef58b329b918099d3081b0c4290be88f3"
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
182
|
"path": "log.js",
|
|
@@ -185,13 +185,13 @@
|
|
|
185
185
|
},
|
|
186
186
|
{
|
|
187
187
|
"path": "login.js",
|
|
188
|
-
"size":
|
|
189
|
-
"sha256": "
|
|
188
|
+
"size": 146084,
|
|
189
|
+
"sha256": "b3482d29728c169a63ac1d10542b3a20a594d9edcc86319f5b0b4715a0006159"
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
192
|
"path": "main.js",
|
|
193
|
-
"size":
|
|
194
|
-
"sha256": "
|
|
193
|
+
"size": 595432,
|
|
194
|
+
"sha256": "d2a09ef9c0ef8075fc3cfa5760a39df9f4b6e0b2426c96f916f3cc3b0bc9acd0"
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
197
|
"path": "mikka-mcp.mjs",
|
|
@@ -200,23 +200,23 @@
|
|
|
200
200
|
},
|
|
201
201
|
{
|
|
202
202
|
"path": "mikka.js",
|
|
203
|
-
"size":
|
|
204
|
-
"sha256": "
|
|
203
|
+
"size": 650231,
|
|
204
|
+
"sha256": "01e7a639bc865321647ed3aa466df5566fe486eb2e8613055cfe6727fe483f52"
|
|
205
205
|
},
|
|
206
206
|
{
|
|
207
207
|
"path": "npm-shrinkwrap.json",
|
|
208
208
|
"size": 78117,
|
|
209
|
-
"sha256": "
|
|
209
|
+
"sha256": "352f22a8aea1291c81702563522c8d317aefdd20443121c158adccba613014d5"
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
212
|
"path": "package.json",
|
|
213
213
|
"size": 1247,
|
|
214
|
-
"sha256": "
|
|
214
|
+
"sha256": "65bd4996790c46e8936e5ff0897a7541f2013a99017511e1288deda0ec01f141"
|
|
215
215
|
},
|
|
216
216
|
{
|
|
217
217
|
"path": "paths.js",
|
|
218
218
|
"size": 4138,
|
|
219
|
-
"sha256": "
|
|
219
|
+
"sha256": "2a6c023bf79fe57bb53ad1c09884d4b174262c7f2fdef0c91898cecd90736291"
|
|
220
220
|
},
|
|
221
221
|
{
|
|
222
222
|
"path": "sandbox.js",
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
{
|
|
227
227
|
"path": "sbom.cdx.json",
|
|
228
228
|
"size": 144314,
|
|
229
|
-
"sha256": "
|
|
229
|
+
"sha256": "dcd3651fcf42cdf961c171abc21433639a5eda76f3c5bfee378cc2b4c110242a"
|
|
230
230
|
}
|
|
231
231
|
]
|
|
232
232
|
}
|