@conduit-harness/conduit-runner-claude-cli 0.0.2-rc1 → 0.1.0-preview.1
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 +38 -0
- package/dist/index.d.ts +12 -1
- package/dist/index.js +136 -11
- package/dist/index.js.map +1 -1
- package/package.json +6 -3
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @conduit-harness/conduit-runner-claude-cli
|
|
2
|
+
|
|
3
|
+
Conduit runner plugin that invokes [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview) (`claude` CLI) as a subprocess inside each issue's git worktree.
|
|
4
|
+
|
|
5
|
+
> **Note:** The `@conduit-harness` packages are not yet published. See [CONTRIBUTING.md](https://github.com/conduit-harness/conduit/blob/main/CONTRIBUTING.md) to run from source.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
The `claude` binary must be installed and on `PATH`. See the [Claude Code installation guide](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview) for setup instructions.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g @conduit-harness/conduit-runner-claude-cli
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Requires [`@conduit-harness/conduit`](https://www.npmjs.com/package/@conduit-harness/conduit) (>= 0.0.1) as a peer dependency.
|
|
18
|
+
|
|
19
|
+
## Workflow snippet
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
agent:
|
|
23
|
+
kind: claude-cli
|
|
24
|
+
max_concurrent_agents: 1
|
|
25
|
+
claude-cli:
|
|
26
|
+
model: claude-sonnet-4-6
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Requirements
|
|
30
|
+
|
|
31
|
+
Node.js >= 24.0.0
|
|
32
|
+
|
|
33
|
+
## Documentation
|
|
34
|
+
|
|
35
|
+
Full configuration reference: **https://conduit.tomhofman.dev/packages/runners/claude-cli/**
|
|
36
|
+
|
|
37
|
+
- [Configuration](https://conduit.tomhofman.dev/guides/configuration/)
|
|
38
|
+
- [Non-intrusive use](https://conduit.tomhofman.dev/reference/non-intrusive-use/)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import type { AgentResult, AgentRunner, RunAttempt, ServiceConfig } from "@conduit-harness/conduit";
|
|
1
|
+
import type { AgentResult, AgentRunner, AgentUsage, RunAttempt, ServiceConfig } from "@conduit-harness/conduit";
|
|
2
|
+
export declare function parseClaudeJsonOutput(raw: string): {
|
|
3
|
+
summary?: string;
|
|
4
|
+
usage?: AgentUsage;
|
|
5
|
+
fullLog: string;
|
|
6
|
+
} | null;
|
|
2
7
|
export default class ClaudeCliRunner implements AgentRunner {
|
|
3
8
|
private readonly command;
|
|
4
9
|
private readonly turnTimeoutMs;
|
|
5
10
|
private readonly stallTimeoutMs;
|
|
11
|
+
private readonly ollamaBackendUrl;
|
|
12
|
+
private readonly ollamaModel;
|
|
6
13
|
constructor(config: ServiceConfig);
|
|
14
|
+
preflightAuth(): Promise<void>;
|
|
15
|
+
private preflight;
|
|
16
|
+
private runViaOllama;
|
|
7
17
|
run(attempt: RunAttempt, prompt: string): Promise<AgentResult>;
|
|
18
|
+
private buildCommand;
|
|
8
19
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,25 +1,133 @@
|
|
|
1
|
-
import { spawn } from "node:child_process";
|
|
1
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
2
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
3
|
+
import { writeFile, unlink } from "node:fs/promises";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import os from "node:os";
|
|
6
|
+
import path from "node:path";
|
|
2
7
|
function str(v, fallback) { return typeof v === "string" && v.length > 0 ? v : fallback; }
|
|
3
8
|
function num(v, fallback) { const n = typeof v === "string" ? Number.parseInt(v, 10) : typeof v === "number" ? v : NaN; return Number.isFinite(n) ? n : fallback; }
|
|
9
|
+
function nativeShell() { return process.platform === "win32" ? ["powershell", "-Command"] : ["bash", "-lc"]; }
|
|
10
|
+
const PROMPT_FILENAME = ".conduit-claude-prompt.md";
|
|
11
|
+
export function parseClaudeJsonOutput(raw) {
|
|
12
|
+
try {
|
|
13
|
+
const parsed = JSON.parse(raw);
|
|
14
|
+
if (typeof parsed !== "object" || parsed === null)
|
|
15
|
+
return null;
|
|
16
|
+
const p = parsed;
|
|
17
|
+
const result = { fullLog: raw };
|
|
18
|
+
if (typeof p.result === "string")
|
|
19
|
+
result.summary = p.result;
|
|
20
|
+
const rawUsage = p.usage;
|
|
21
|
+
if (rawUsage !== null && typeof rawUsage === "object") {
|
|
22
|
+
const u = rawUsage;
|
|
23
|
+
result.usage = {
|
|
24
|
+
inputTokens: num(u.input_tokens, 0),
|
|
25
|
+
outputTokens: num(u.output_tokens, 0),
|
|
26
|
+
cacheCreationInputTokens: num(u.cache_creation_input_tokens, 0),
|
|
27
|
+
cacheReadInputTokens: num(u.cache_read_input_tokens, 0),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
4
36
|
export default class ClaudeCliRunner {
|
|
5
37
|
command;
|
|
6
38
|
turnTimeoutMs;
|
|
7
39
|
stallTimeoutMs;
|
|
40
|
+
ollamaBackendUrl;
|
|
41
|
+
ollamaModel;
|
|
8
42
|
constructor(config) {
|
|
9
43
|
const raw = config.agent.raw;
|
|
10
|
-
this.command = str(raw.command, "claude --dangerously-skip-permissions -p -");
|
|
44
|
+
this.command = str(raw.command, "claude --dangerously-skip-permissions --output-format json -p -");
|
|
11
45
|
this.turnTimeoutMs = num(raw.turn_timeout_ms, 3600000);
|
|
12
46
|
this.stallTimeoutMs = num(raw.stall_timeout_ms, 300000);
|
|
47
|
+
this.ollamaBackendUrl = str(raw.ollama_backend_url, "");
|
|
48
|
+
this.ollamaModel = str(raw.ollama_model, "");
|
|
49
|
+
this.preflight();
|
|
50
|
+
}
|
|
51
|
+
async preflightAuth() {
|
|
52
|
+
const credentialsPath = path.join(os.homedir(), ".claude", "credentials.json");
|
|
53
|
+
if (!existsSync(credentialsPath)) {
|
|
54
|
+
throw new Error(`claude-cli runner: authentication required.\n\nRun the following to authenticate:\n claude /login\n`);
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
const content = readFileSync(credentialsPath, "utf8");
|
|
58
|
+
const creds = JSON.parse(content);
|
|
59
|
+
if (!creds || typeof creds !== "object" || Object.keys(creds).length === 0)
|
|
60
|
+
throw new Error("credentials file is empty");
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
throw new Error(`claude-cli runner: authentication required.\n\nRun the following to authenticate:\n claude /login\n`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
preflight() {
|
|
67
|
+
const bin = this.command.trim().split(/\s+/)[0];
|
|
68
|
+
if (!bin)
|
|
69
|
+
return;
|
|
70
|
+
const result = spawnSync(bin, ["--version"], { stdio: "ignore", shell: process.platform === "win32" });
|
|
71
|
+
const notFound = process.platform === "win32"
|
|
72
|
+
? (result.status ?? 1) !== 0
|
|
73
|
+
: result.error !== undefined && result.error.code === "ENOENT";
|
|
74
|
+
if (notFound) {
|
|
75
|
+
throw new Error(`claude-cli runner: '${bin}' was not found on PATH.\n\n` +
|
|
76
|
+
`Install Claude Code:\n` +
|
|
77
|
+
` npm install -g @anthropic-ai/claude-code\n` +
|
|
78
|
+
`\nSee https://docs.claude.com/en/docs/agents-and-tools/claude-code/overview for setup.`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
async runViaOllama(prompt) {
|
|
82
|
+
if (!this.ollamaBackendUrl || !this.ollamaModel) {
|
|
83
|
+
return { status: "failed", output: "", error: "ollama_backend_url or ollama_model not configured" };
|
|
84
|
+
}
|
|
85
|
+
try {
|
|
86
|
+
const controller = new AbortController();
|
|
87
|
+
const timeoutId = setTimeout(() => controller.abort(), this.turnTimeoutMs);
|
|
88
|
+
const response = await fetch(`${this.ollamaBackendUrl}/api/generate`, {
|
|
89
|
+
method: "POST",
|
|
90
|
+
headers: { "Content-Type": "application/json" },
|
|
91
|
+
body: JSON.stringify({ model: this.ollamaModel, prompt, stream: false }),
|
|
92
|
+
signal: controller.signal,
|
|
93
|
+
});
|
|
94
|
+
clearTimeout(timeoutId);
|
|
95
|
+
if (!response.ok) {
|
|
96
|
+
return { status: "failed", output: "", error: `ollama_http_${response.status}` };
|
|
97
|
+
}
|
|
98
|
+
const data = await response.json();
|
|
99
|
+
return { status: "succeeded", output: data.response };
|
|
100
|
+
}
|
|
101
|
+
catch (err) {
|
|
102
|
+
if (err instanceof Error && err.name === "AbortError") {
|
|
103
|
+
return { status: "timed_out", output: "", error: "claude_turn_timeout" };
|
|
104
|
+
}
|
|
105
|
+
return { status: "failed", output: "", error: `ollama_error: ${err instanceof Error ? err.message : String(err)}` };
|
|
106
|
+
}
|
|
13
107
|
}
|
|
14
108
|
async run(attempt, prompt) {
|
|
15
|
-
|
|
16
|
-
|
|
109
|
+
if (this.ollamaBackendUrl) {
|
|
110
|
+
return this.runViaOllama(prompt);
|
|
111
|
+
}
|
|
112
|
+
// Write the prompt to a file in the workspace and let the shell pipe it
|
|
113
|
+
// into claude's stdin via a shell redirect. Direct Node->child stdin piping
|
|
114
|
+
// does not work reliably on Windows: powershell -Command does not forward
|
|
115
|
+
// its own stdin to the native binary the way bash -lc does, so claude -p -
|
|
116
|
+
// sits at zero-output forever and the stall timer kills it. Reading the
|
|
117
|
+
// file inside the shell sidesteps that. The aider runner uses the same
|
|
118
|
+
// pattern via --message-file.
|
|
119
|
+
const promptFile = join(attempt.workspacePath, PROMPT_FILENAME);
|
|
120
|
+
await writeFile(promptFile, prompt, "utf8");
|
|
121
|
+
const fullCommand = this.buildCommand();
|
|
122
|
+
const result = await new Promise((resolve) => {
|
|
123
|
+
const [shell, flag] = nativeShell();
|
|
124
|
+
const child = spawn(shell, [flag, fullCommand], { cwd: attempt.workspacePath, env: process.env, stdio: ["ignore", "pipe", "pipe"] });
|
|
17
125
|
let output = "";
|
|
18
126
|
let settled = false;
|
|
19
127
|
let stallTimer;
|
|
20
|
-
const finish = (
|
|
128
|
+
const finish = (r) => { if (settled)
|
|
21
129
|
return; settled = true; clearTimeout(turnTimer); if (stallTimer)
|
|
22
|
-
clearTimeout(stallTimer); resolve(
|
|
130
|
+
clearTimeout(stallTimer); resolve(r); };
|
|
23
131
|
const bumpStall = () => { if (this.stallTimeoutMs <= 0)
|
|
24
132
|
return; if (stallTimer)
|
|
25
133
|
clearTimeout(stallTimer); stallTimer = setTimeout(() => { child.kill("SIGTERM"); finish({ status: "timed_out", output, error: "claude_stall_timeout" }); }, this.stallTimeoutMs); };
|
|
@@ -28,16 +136,33 @@ export default class ClaudeCliRunner {
|
|
|
28
136
|
child.stderr.on("data", d => { output += d.toString(); bumpStall(); });
|
|
29
137
|
child.on("error", err => finish({ status: "failed", output, error: err.message }));
|
|
30
138
|
child.on("close", code => {
|
|
31
|
-
const
|
|
139
|
+
const r = { status: code === 0 ? "succeeded" : "failed", output };
|
|
32
140
|
if (code !== null)
|
|
33
|
-
|
|
141
|
+
r.exitCode = code;
|
|
34
142
|
if (code !== 0)
|
|
35
|
-
|
|
36
|
-
|
|
143
|
+
r.error = `claude_exit_${code}`;
|
|
144
|
+
if (code === 0) {
|
|
145
|
+
const parsed = parseClaudeJsonOutput(output);
|
|
146
|
+
if (parsed !== null) {
|
|
147
|
+
if (parsed.summary !== undefined)
|
|
148
|
+
r.summary = parsed.summary;
|
|
149
|
+
if (parsed.usage !== undefined)
|
|
150
|
+
r.usage = parsed.usage;
|
|
151
|
+
r.fullLog = parsed.fullLog;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
finish(r);
|
|
37
155
|
});
|
|
38
|
-
child.stdin.end(prompt);
|
|
39
156
|
bumpStall();
|
|
40
157
|
});
|
|
158
|
+
await unlink(promptFile).catch(() => { });
|
|
159
|
+
return result;
|
|
160
|
+
}
|
|
161
|
+
buildCommand() {
|
|
162
|
+
const reader = process.platform === "win32"
|
|
163
|
+
? `Get-Content -Raw '${PROMPT_FILENAME}'`
|
|
164
|
+
: `cat '${PROMPT_FILENAME}'`;
|
|
165
|
+
return `${reader} | ${this.command}`;
|
|
41
166
|
}
|
|
42
167
|
}
|
|
43
168
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,SAAS,GAAG,CAAC,CAAU,EAAE,QAAgB,IAAY,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;AACnH,SAAS,GAAG,CAAC,CAAU,EAAE,QAAgB,IAAY,MAAM,CAAC,GAAG,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAA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AC,OAAO,EAAE,CAAC;IACvC,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conduit-harness/conduit-runner-claude-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.1.0-preview.1",
|
|
4
4
|
"description": "Conduit agent runner plugin for Claude Code CLI",
|
|
5
|
+
"license": "MIT",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"exports": {
|
|
7
8
|
".": { "import": "./dist/index.js", "types": "./dist/index.d.ts" }
|
|
@@ -9,15 +10,17 @@
|
|
|
9
10
|
"files": ["dist"],
|
|
10
11
|
"scripts": {
|
|
11
12
|
"build": "tsc -p tsconfig.json",
|
|
13
|
+
"test": "vitest run",
|
|
12
14
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
13
15
|
},
|
|
14
16
|
"publishConfig": { "access": "public" },
|
|
15
17
|
"repository": { "type": "git", "url": "git+https://github.com/conduit-harness/conduit.git" },
|
|
16
18
|
"engines": { "node": ">=24.0.0" },
|
|
17
|
-
"peerDependencies": { "@conduit-harness/conduit": ">=0.0.
|
|
19
|
+
"peerDependencies": { "@conduit-harness/conduit": ">=0.0.1" },
|
|
18
20
|
"devDependencies": {
|
|
19
21
|
"@conduit-harness/conduit": "workspace:*",
|
|
20
22
|
"@types/node": "latest",
|
|
21
|
-
"typescript": "latest"
|
|
23
|
+
"typescript": "latest",
|
|
24
|
+
"vitest": "latest"
|
|
22
25
|
}
|
|
23
26
|
}
|