agent-rev 0.2.3 → 0.2.4
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/dist/commands/repl.js +18 -18
- package/dist/commands/setup.js +15 -7
- package/package.json +4 -10
package/dist/commands/repl.js
CHANGED
|
@@ -938,6 +938,24 @@ export async function runRepl(resumeSession) {
|
|
|
938
938
|
roles: welcomeRoles,
|
|
939
939
|
}) + '\n');
|
|
940
940
|
process.stdout.write(renderHelpHint() + '\n\n');
|
|
941
|
+
// Print coordinator header BEFORE fi.setup() so no blank lines appear between them
|
|
942
|
+
try {
|
|
943
|
+
const dir = process.cwd();
|
|
944
|
+
const config = await loadProjectConfig(dir);
|
|
945
|
+
if (config.roles?.orchestrator?.cli) {
|
|
946
|
+
process.stdout.write('\n');
|
|
947
|
+
process.stdout.write(chalk.bold.cyan('═'.repeat(46)) + '\n');
|
|
948
|
+
process.stdout.write(chalk.bold.cyan(` COORDINADOR — ${config.project}`) + '\n');
|
|
949
|
+
process.stdout.write(chalk.bold.cyan('═'.repeat(46)) + '\n');
|
|
950
|
+
process.stdout.write(chalk.blue(` → Rol: COORDINADOR (solo orquesta, nunca ejecuta)`) + '\n');
|
|
951
|
+
process.stdout.write(chalk.dim(' ' + '─'.repeat(42)) + '\n');
|
|
952
|
+
process.stdout.write(chalk.bold(` ── FASE 0 — Clarificacion ──`) + '\n');
|
|
953
|
+
process.stdout.write(chalk.dim(` → El coordinador va a conversar con vos para entender la tarea.`) + '\n');
|
|
954
|
+
process.stdout.write(chalk.dim(` → Cuando el coordinador tenga claro el objetivo, te va a pedir confirmación para lanzar el plan.`) + '\n');
|
|
955
|
+
process.stdout.write(chalk.dim(' ' + '─'.repeat(42)) + '\n');
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
catch { }
|
|
941
959
|
// Fixed-bottom input — owns the last 3 terminal rows permanently
|
|
942
960
|
const fi = new FixedInput();
|
|
943
961
|
fi.setup();
|
|
@@ -970,24 +988,6 @@ export async function runRepl(resumeSession) {
|
|
|
970
988
|
resume();
|
|
971
989
|
}
|
|
972
990
|
};
|
|
973
|
-
// Show coordinator header before the REPL loop (once, at startup)
|
|
974
|
-
try {
|
|
975
|
-
const dir = process.cwd();
|
|
976
|
-
const config = await loadProjectConfig(dir);
|
|
977
|
-
if (config.roles?.orchestrator?.cli) {
|
|
978
|
-
fi.println('');
|
|
979
|
-
fi.println(chalk.bold.cyan('═'.repeat(46)));
|
|
980
|
-
fi.println(chalk.bold.cyan(` COORDINADOR — ${config.project}`));
|
|
981
|
-
fi.println(chalk.bold.cyan('═'.repeat(46)));
|
|
982
|
-
fi.println(chalk.blue(` → Rol: COORDINADOR (solo orquesta, nunca ejecuta)`));
|
|
983
|
-
fi.println(chalk.dim(' ' + '─'.repeat(42)));
|
|
984
|
-
fi.println(chalk.bold(` ── FASE 0 — Clarificacion ──`));
|
|
985
|
-
fi.println(chalk.dim(` → El coordinador va a conversar con vos para entender la tarea.`));
|
|
986
|
-
fi.println(chalk.dim(` → Cuando el coordinador tenga claro el objetivo, te va a pedir confirmación para lanzar el plan.`));
|
|
987
|
-
fi.println(chalk.dim(' ' + '─'.repeat(42)));
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
catch { }
|
|
991
991
|
// Command handler — used by the main loop AND by the engine during mid-conversation
|
|
992
992
|
const handleCmd = async (trimmed) => {
|
|
993
993
|
const parts = trimmed.slice(1).split(/\s+/);
|
package/dist/commands/setup.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as readline from 'readline';
|
|
2
2
|
import * as path from 'path';
|
|
3
|
+
import * as os from 'os';
|
|
3
4
|
import * as fs from 'fs/promises';
|
|
5
|
+
import * as fsSync from 'fs';
|
|
4
6
|
import chalk from 'chalk';
|
|
5
7
|
import { execSync } from 'child_process';
|
|
6
8
|
import { CLI_REGISTRY } from '../types.js';
|
|
@@ -61,19 +63,25 @@ function detectModels(cliName) {
|
|
|
61
63
|
case 'agent-impl':
|
|
62
64
|
case 'agent-rev':
|
|
63
65
|
case 'agent-explorer': {
|
|
66
|
+
// Try to read the saved coordinator model from the agent's own config
|
|
64
67
|
try {
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
const agentHome = path.join(os.homedir(), `.${cliName}`);
|
|
69
|
+
const cfgRaw = fsSync.readFileSync(path.join(agentHome, 'cli-config.json'), 'utf-8');
|
|
70
|
+
const cfg = JSON.parse(cfgRaw);
|
|
71
|
+
if (cfg.coordinatorModel)
|
|
72
|
+
return [cfg.coordinatorModel];
|
|
69
73
|
}
|
|
70
74
|
catch { }
|
|
75
|
+
// Try to read from shared agent-mp config as fallback
|
|
71
76
|
try {
|
|
72
|
-
const
|
|
73
|
-
|
|
77
|
+
const agentHome = path.join(os.homedir(), '.agent-mp');
|
|
78
|
+
const cfgRaw = fsSync.readFileSync(path.join(agentHome, 'cli-config.json'), 'utf-8');
|
|
79
|
+
const cfg = JSON.parse(cfgRaw);
|
|
80
|
+
if (cfg.coordinatorModel)
|
|
81
|
+
return [cfg.coordinatorModel];
|
|
74
82
|
}
|
|
75
83
|
catch { }
|
|
76
|
-
return ['
|
|
84
|
+
return ['(configure with /model after login)'];
|
|
77
85
|
}
|
|
78
86
|
default:
|
|
79
87
|
return ['default'];
|
package/package.json
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-rev",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Reviewer agent — validates and reviews code written by the implementor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
|
-
"files": [
|
|
8
|
-
|
|
9
|
-
],
|
|
10
|
-
"bin": {
|
|
11
|
-
"agent-rev": "dist/index.js"
|
|
12
|
-
},
|
|
7
|
+
"files": ["dist/"],
|
|
8
|
+
"bin": { "agent-rev": "dist/index.js" },
|
|
13
9
|
"scripts": {
|
|
14
10
|
"build": "tsc && echo '#!/usr/bin/env node' | cat - dist/index.js > dist/index.tmp && mv dist/index.tmp dist/index.js && chmod +x dist/index.js",
|
|
15
11
|
"dev": "tsx src/index.ts",
|
|
@@ -31,7 +27,5 @@
|
|
|
31
27
|
"tsx": "^4.19.3",
|
|
32
28
|
"typescript": "^5.7.3"
|
|
33
29
|
},
|
|
34
|
-
"engines": {
|
|
35
|
-
"node": ">=18.0.0"
|
|
36
|
-
}
|
|
30
|
+
"engines": { "node": ">=18.0.0" }
|
|
37
31
|
}
|