karajan-code 1.6.0 → 1.6.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/package.json
CHANGED
|
@@ -4,22 +4,20 @@ import { resolveBin } from "./resolve-bin.js";
|
|
|
4
4
|
|
|
5
5
|
export class AiderAgent extends BaseAgent {
|
|
6
6
|
async runTask(task) {
|
|
7
|
-
const timeout = this.config.session.max_iteration_minutes * 60 * 1000;
|
|
8
7
|
const role = task.role || "coder";
|
|
9
8
|
const args = ["--yes", "--message", task.prompt];
|
|
10
9
|
const model = this.getRoleModel(role);
|
|
11
10
|
if (model) args.push("--model", model);
|
|
12
|
-
const res = await runCommand(resolveBin("aider"), args, {
|
|
11
|
+
const res = await runCommand(resolveBin("aider"), args, { onOutput: task.onOutput });
|
|
13
12
|
return { ok: res.exitCode === 0, output: res.stdout, error: res.stderr, exitCode: res.exitCode };
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
async reviewTask(task) {
|
|
17
|
-
const timeout = this.config.session.max_iteration_minutes * 60 * 1000;
|
|
18
16
|
const role = task.role || "reviewer";
|
|
19
17
|
const args = ["--yes", "--message", task.prompt];
|
|
20
18
|
const model = this.getRoleModel(role);
|
|
21
19
|
if (model) args.push("--model", model);
|
|
22
|
-
const res = await runCommand(resolveBin("aider"), args, {
|
|
20
|
+
const res = await runCommand(resolveBin("aider"), args, { onOutput: task.onOutput });
|
|
23
21
|
return { ok: res.exitCode === 0, output: res.stdout, error: res.stderr, exitCode: res.exitCode };
|
|
24
22
|
}
|
|
25
23
|
}
|
|
@@ -4,21 +4,19 @@ import { resolveBin } from "./resolve-bin.js";
|
|
|
4
4
|
|
|
5
5
|
export class ClaudeAgent extends BaseAgent {
|
|
6
6
|
async runTask(task) {
|
|
7
|
-
const timeout = this.config.session.max_iteration_minutes * 60 * 1000;
|
|
8
7
|
const role = task.role || "coder";
|
|
9
8
|
const args = ["-p", task.prompt];
|
|
10
9
|
const model = this.getRoleModel(role);
|
|
11
10
|
if (model) args.push("--model", model);
|
|
12
|
-
const res = await runCommand(resolveBin("claude"), args, {
|
|
11
|
+
const res = await runCommand(resolveBin("claude"), args, { onOutput: task.onOutput });
|
|
13
12
|
return { ok: res.exitCode === 0, output: res.stdout, error: res.stderr, exitCode: res.exitCode };
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
async reviewTask(task) {
|
|
17
|
-
const timeout = this.config.session.max_iteration_minutes * 60 * 1000;
|
|
18
16
|
const args = ["-p", task.prompt, "--output-format", "json"];
|
|
19
17
|
const model = this.getRoleModel(task.role || "reviewer");
|
|
20
18
|
if (model) args.push("--model", model);
|
|
21
|
-
const res = await runCommand(resolveBin("claude"), args, {
|
|
19
|
+
const res = await runCommand(resolveBin("claude"), args, { onOutput: task.onOutput });
|
|
22
20
|
return { ok: res.exitCode === 0, output: res.stdout, error: res.stderr, exitCode: res.exitCode };
|
|
23
21
|
}
|
|
24
22
|
}
|
|
@@ -4,24 +4,22 @@ import { resolveBin } from "./resolve-bin.js";
|
|
|
4
4
|
|
|
5
5
|
export class CodexAgent extends BaseAgent {
|
|
6
6
|
async runTask(task) {
|
|
7
|
-
const timeout = this.config.session.max_iteration_minutes * 60 * 1000;
|
|
8
7
|
const role = task.role || "coder";
|
|
9
8
|
const args = ["exec"];
|
|
10
9
|
const model = this.getRoleModel(role);
|
|
11
10
|
if (model) args.push("--model", model);
|
|
12
11
|
if (this.isAutoApproveEnabled(role)) args.push("--full-auto");
|
|
13
12
|
args.push(task.prompt);
|
|
14
|
-
const res = await runCommand(resolveBin("codex"), args, {
|
|
13
|
+
const res = await runCommand(resolveBin("codex"), args, { onOutput: task.onOutput });
|
|
15
14
|
return { ok: res.exitCode === 0, output: res.stdout, error: res.stderr, exitCode: res.exitCode };
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
async reviewTask(task) {
|
|
19
|
-
const timeout = this.config.session.max_iteration_minutes * 60 * 1000;
|
|
20
18
|
const args = ["exec"];
|
|
21
19
|
const model = this.getRoleModel(task.role || "reviewer");
|
|
22
20
|
if (model) args.push("--model", model);
|
|
23
21
|
args.push(task.prompt);
|
|
24
|
-
const res = await runCommand(resolveBin("codex"), args, {
|
|
22
|
+
const res = await runCommand(resolveBin("codex"), args, { onOutput: task.onOutput });
|
|
25
23
|
return { ok: res.exitCode === 0, output: res.stdout, error: res.stderr, exitCode: res.exitCode };
|
|
26
24
|
}
|
|
27
25
|
}
|
|
@@ -4,22 +4,20 @@ import { resolveBin } from "./resolve-bin.js";
|
|
|
4
4
|
|
|
5
5
|
export class GeminiAgent extends BaseAgent {
|
|
6
6
|
async runTask(task) {
|
|
7
|
-
const timeout = this.config.session.max_iteration_minutes * 60 * 1000;
|
|
8
7
|
const role = task.role || "coder";
|
|
9
8
|
const args = ["-p", task.prompt];
|
|
10
9
|
const model = this.getRoleModel(role);
|
|
11
10
|
if (model) args.push("--model", model);
|
|
12
|
-
const res = await runCommand(resolveBin("gemini"), args, {
|
|
11
|
+
const res = await runCommand(resolveBin("gemini"), args, { onOutput: task.onOutput });
|
|
13
12
|
return { ok: res.exitCode === 0, output: res.stdout, error: res.stderr, exitCode: res.exitCode };
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
async reviewTask(task) {
|
|
17
|
-
const timeout = this.config.session.max_iteration_minutes * 60 * 1000;
|
|
18
16
|
const role = task.role || "reviewer";
|
|
19
17
|
const args = ["-p", task.prompt, "--output-format", "json"];
|
|
20
18
|
const model = this.getRoleModel(role);
|
|
21
19
|
if (model) args.push("--model", model);
|
|
22
|
-
const res = await runCommand(resolveBin("gemini"), args, {
|
|
20
|
+
const res = await runCommand(resolveBin("gemini"), args, { onOutput: task.onOutput });
|
|
23
21
|
return { ok: res.exitCode === 0, output: res.stdout, error: res.stderr, exitCode: res.exitCode };
|
|
24
22
|
}
|
|
25
23
|
}
|
package/src/cli.js
CHANGED
|
@@ -24,7 +24,7 @@ async function withConfig(commandName, flags, fn) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
const program = new Command();
|
|
27
|
-
program.name("kj").description("Karajan Code CLI").version("1.6.
|
|
27
|
+
program.name("kj").description("Karajan Code CLI").version("1.6.1");
|
|
28
28
|
|
|
29
29
|
program
|
|
30
30
|
.command("init")
|