mtech-ai-local-runner 0.1.6 → 0.1.7

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/README.md CHANGED
@@ -10,6 +10,10 @@ The package stores safe runner configuration locally and keeps OAuth refresh cre
10
10
 
11
11
  Public npm installation requires no npm account or publishing OTP. Setup requires Gateway OAuth login, and local Claude Code must already be authenticated (`claude auth status`).
12
12
 
13
+ ## 0.1.7
14
+
15
+ - Accept one fenced final JSON report after an explanatory preamble while preserving status, evidence, length and pending-work validation. Reject ambiguous multiple code blocks.
16
+
13
17
  ## 0.1.6
14
18
 
15
19
  - Require a final JSON report with actual findings, nonempty evidence and no pending work before reporting completion. Incomplete or missing reports fail without a successful investigation artifact.
@@ -35,6 +39,6 @@ The relay binds only to loopback. Local capabilities are stored in private mode-
35
39
  Existing employees can upgrade their installed daemon with:
36
40
 
37
41
  ```bash
38
- npx mtech-ai-local-runner@0.1.6 setup
39
- npx mtech-ai-local-runner@0.1.6 doctor
42
+ npx mtech-ai-local-runner@0.1.7 setup
43
+ npx mtech-ai-local-runner@0.1.7 doctor
40
44
  ```
@@ -32,7 +32,19 @@ export function completionEvent(result, costUsd) {
32
32
  report = JSON.parse(result);
33
33
  }
34
34
  catch {
35
- return failed;
35
+ // Claude may wrap the final report in one Markdown fence after a short
36
+ // explanation. Accept framing only; retain every completion/evidence check.
37
+ if ((result.match(/```/g) ?? []).length !== 2)
38
+ return failed;
39
+ const framed = result.trim().match(/^(?:[\s\S]*?\n)?```(?:json)?[ \t]*\r?\n([\s\S]*?)\r?\n```$/);
40
+ if (!framed)
41
+ return failed;
42
+ try {
43
+ report = JSON.parse(framed[1]);
44
+ }
45
+ catch {
46
+ return failed;
47
+ }
36
48
  }
37
49
  if (!report || typeof report !== "object" || Array.isArray(report))
38
50
  return failed;
package/dist/src/cli.js CHANGED
@@ -182,7 +182,7 @@ export async function main(argv, env, io = {}) {
182
182
  const authenticated = await runFile(binary, ["auth", "status"], { encoding: "utf8" }).then(() => true).catch(() => false);
183
183
  const registered = await gateway.registerLocalRunner({
184
184
  deviceFingerprint: createHash("sha256").update(`${process.getuid?.() ?? 0}|${runnerDisplayName()}|${config.gatewayMcpUrl}`).digest("hex"),
185
- displayName: runnerDisplayName(), packageVersion: "0.1.6",
185
+ displayName: runnerDisplayName(), packageVersion: "0.1.7",
186
186
  capabilities: [{ adapter: "claude_code_cli", version: "1", capabilities: ["repository_read", "repository_edit", "shell_test", "git_diff"], authenticated }],
187
187
  });
188
188
  await localStore.save({ schemaVersion: 1, gatewayMcpUrl: config.gatewayMcpUrl, runnerId: registered.runner.id, workspaceRoot: config.workspaceRoot, concurrency: 1 });
@@ -72,7 +72,7 @@ export async function buildDaemon(input) {
72
72
  const poller = new JobPoller({
73
73
  heartbeat: () => gateway.heartbeatLocalRunner({
74
74
  deviceFingerprint: createHash("sha256").update(`${process.getuid?.() ?? 0}|${runnerDisplayName()}|${input.gatewayMcpUrl}`).digest("hex"),
75
- displayName: runnerDisplayName(), packageVersion: "0.1.6",
75
+ displayName: runnerDisplayName(), packageVersion: "0.1.7",
76
76
  capabilities: probes.map((probe) => ({ adapter: probe.id, version: probe.version,
77
77
  capabilities: probe.capabilities, authenticated: probe.available && probe.authenticated })),
78
78
  }).then(() => undefined),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mtech-ai-local-runner",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "bin": {