agent-rev 0.4.2 → 0.4.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.
@@ -716,12 +716,10 @@ function cmdHelp(fi) {
716
716
  { key: '/setup explorer', value: 'Reconfigure explorer only' },
717
717
  { key: '/config-multi', value: 'Reconfigure all agents at once' },
718
718
  { key: '/status', value: 'Show current configuration and tasks' },
719
- { key: '/explorer <task>', value: 'Run explorer agent on a task/question' },
720
719
  { key: '/run <task>', value: 'Full cycle: orchestrator → implementor → reviewer' },
721
720
  { key: '/run orch <task>', value: 'Run only orchestrator' },
722
721
  { key: '/run impl <id>', value: 'Run only implementor' },
723
722
  { key: '/run rev <id>', value: 'Run only reviewer' },
724
- { key: '/run explorer <task>', value: 'Run only explorer' },
725
723
  { key: '/models', value: 'List models for all installed CLIs' },
726
724
  { key: '/models <cli>', value: 'List models for a specific CLI' },
727
725
  { key: '/login', value: 'Login (Qwen OAuth or CLI auth)' },
@@ -1037,12 +1035,6 @@ export async function runRepl(resumeSession) {
1037
1035
  const progress = await readJson(path.join(taskDir, 'progress.json'));
1038
1036
  await engine.runReviewer(taskId, plan, progress);
1039
1037
  }
1040
- else if (args[0] === 'explorer' || args[0] === 'exp') {
1041
- const task = args.slice(1).join(' ') || undefined;
1042
- const engine = new AgentEngine(config, dir, gCoordinatorCmd, rl, fi, handleCmd);
1043
- const result = await engine.runExplorer(task);
1044
- fi.println(result);
1045
- }
1046
1038
  else {
1047
1039
  const task = args.join(' ');
1048
1040
  const engine = new AgentEngine(config, dir, gCoordinatorCmd, rl, fi, handleCmd);
@@ -1050,20 +1042,6 @@ export async function runRepl(resumeSession) {
1050
1042
  }
1051
1043
  break;
1052
1044
  }
1053
- case 'explorer': {
1054
- const task = args.join(' ') || undefined;
1055
- try {
1056
- const dir = process.cwd();
1057
- const config = await loadProjectConfig(dir);
1058
- const engine = new AgentEngine(config, dir, gCoordinatorCmd, rl, fi, handleCmd);
1059
- const result = await engine.runExplorer(task);
1060
- fi.println(result);
1061
- }
1062
- catch (err) {
1063
- fi.println(chalk.red(` Explorer error: ${err.message}`));
1064
- }
1065
- break;
1066
- }
1067
1045
  case 'models':
1068
1046
  case 'model':
1069
1047
  await withRl((rl) => cmdModels(args[0], fi, rl));
@@ -1225,12 +1203,6 @@ export async function runRole(role, arg, model) {
1225
1203
  await engine.runReviewer(arg, plan, progress);
1226
1204
  break;
1227
1205
  }
1228
- case 'explorer':
1229
- case 'exp': {
1230
- const result = await engine.runExplorer(arg || undefined);
1231
- console.log(result);
1232
- break;
1233
- }
1234
1206
  case 'coordinator':
1235
1207
  case 'coord': {
1236
1208
  console.log(chalk.yellow(' Coordinator mode requires interactive REPL.'));
@@ -1238,7 +1210,7 @@ export async function runRole(role, arg, model) {
1238
1210
  process.exit(1);
1239
1211
  }
1240
1212
  default:
1241
- console.log(chalk.red(` Unknown role: ${role}. Use: orchestrator, implementor, reviewer, explorer`));
1213
+ console.log(chalk.red(` Unknown role: ${role}. Use: orchestrator, implementor, reviewer`));
1242
1214
  process.exit(1);
1243
1215
  }
1244
1216
  }
@@ -10,6 +10,7 @@ export declare class FixedInput {
10
10
  private _activityLines;
11
11
  private get rows();
12
12
  get cols(): number;
13
+ private get _reservedRows();
13
14
  private get scrollBottom();
14
15
  private _contentRows;
15
16
  setup(): void;
package/dist/ui/input.js CHANGED
@@ -5,13 +5,15 @@ const B = (s) => chalk.rgb(30, 110, 185)(s); // blue — prompt arrow
5
5
  const PREFIX = T('│') + B(' > ');
6
6
  const PREFIX_CONT = T('│') + B(' '); // continuation lines
7
7
  const PREFIX_COLS = 4; // visual width of "│ > " and "│ "
8
- // Maximum content rows the box can grow to (Shift+Enter / word-wrap).
9
- // RESERVED_ROWS covers the activity box (7 rows) and the input box (max 6 rows + 1 status).
10
- // Activity box: 1 top border + 5 content lines + 1 bottom border = 7 rows.
11
- // Input box: 1 status row + up to 4 content + 2 borders = 7 rows.
8
+ // Maximum content rows the input box can grow to (Shift+Enter / word-wrap).
12
9
  const MAX_CONTENT_ROWS = 4;
13
10
  const ACTIVITY_LINES = 5;
14
- const RESERVED_ROWS = MAX_CONTENT_ROWS + 3; // 7
11
+ // Reserved rows at the bottom:
12
+ // Idle: 7 = 1 status row + up to 4 content + 2 borders
13
+ // Active: 10 = 7 (activity box) + 3 (input box: 1 content + 2 borders)
14
+ // The scroll region is updated whenever activity mode toggles.
15
+ const IDLE_RESERVED = MAX_CONTENT_ROWS + 3; // 7
16
+ const ACTIVE_RESERVED = ACTIVITY_LINES + 2 + 3; // 10 = activity(7) + input(3)
15
17
  // ─── FixedInput ──────────────────────────────────────────────────────────────
16
18
  export class FixedInput {
17
19
  buf = '';
@@ -26,8 +28,12 @@ export class FixedInput {
26
28
  _activityLines = [];
27
29
  get rows() { return process.stdout.rows || 24; }
28
30
  get cols() { return process.stdout.columns || 80; }
29
- get scrollBottom() { return this.rows - RESERVED_ROWS; }
31
+ get _reservedRows() { return this._activityHeader !== null ? ACTIVE_RESERVED : IDLE_RESERVED; }
32
+ get scrollBottom() { return this.rows - this._reservedRows; }
30
33
  _contentRows() {
34
+ // During activity mode only 1 content row fits below the activity box
35
+ if (this._activityHeader !== null)
36
+ return 1;
31
37
  const w = this.cols - PREFIX_COLS - 2;
32
38
  if (w <= 0)
33
39
  return 1;
@@ -88,6 +94,7 @@ export class FixedInput {
88
94
  startActivity(header) {
89
95
  this._activityHeader = header;
90
96
  this._activityLines = [];
97
+ this._setScrollRegion();
91
98
  this._drawBox();
92
99
  }
93
100
  /** Update the header line (spinner frame + elapsed time) without clearing lines. */
@@ -118,6 +125,7 @@ export class FixedInput {
118
125
  stopActivity() {
119
126
  this._activityHeader = null;
120
127
  this._activityLines = [];
128
+ this._setScrollRegion();
121
129
  this._drawBox();
122
130
  }
123
131
  // ── Input ──────────────────────────────────────────────────────────────────
@@ -255,8 +263,6 @@ export class FixedInput {
255
263
  this._clearReserved();
256
264
  if (this._activityHeader !== null) {
257
265
  this._drawActivityBox();
258
- // Cursor stays hidden while agent is working (no input expected)
259
- return;
260
266
  }
261
267
  this._drawInputBox();
262
268
  process.stdout.write('\x1b[?25h');
package/package.json CHANGED
@@ -1,14 +1,44 @@
1
1
  {
2
2
  "name": "agent-rev",
3
- "version": "0.4.2",
4
- "description": "agent-rev agent",
3
+ "version": "0.4.4",
4
+ "description": "Deterministic multi-agent CLI orchestrator \u2014 plan, code, review",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
- "files": ["dist/"],
8
- "bin": { "agent-rev": "dist/index.js" },
9
- "scripts": {},
10
- "keywords": ["ai","agent","cli"],
7
+ "files": [
8
+ "dist/"
9
+ ],
10
+ "bin": {
11
+ "agent-rev": "dist/index.js"
12
+ },
13
+ "scripts": {
14
+ "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
+ "dev": "tsx src/index.ts",
16
+ "prepublishOnly": "npm run build"
17
+ },
18
+ "keywords": [
19
+ "ai",
20
+ "agent",
21
+ "orchestrator",
22
+ "multi-agent",
23
+ "cli",
24
+ "coding"
25
+ ],
11
26
  "license": "MIT",
12
- "dependencies": {"@anthropic-ai/sdk":"^0.39.0","@google/generative-ai":"^0.24.0","chalk":"^5.4.1","commander":"^13.1.0","open":"^11.0.0","openai":"^4.91.0"},
13
- "engines": { "node": ">=18.0.0" }
14
- }
27
+ "dependencies": {
28
+ "@anthropic-ai/sdk": "^0.39.0",
29
+ "@google/generative-ai": "^0.24.0",
30
+ "chalk": "^5.4.1",
31
+ "commander": "^13.1.0",
32
+ "open": "^11.0.0",
33
+ "openai": "^4.91.0"
34
+ },
35
+ "devDependencies": {
36
+ "@types/node": "^22.13.0",
37
+ "@types/open": "^6.1.0",
38
+ "tsx": "^4.19.3",
39
+ "typescript": "^5.7.3"
40
+ },
41
+ "engines": {
42
+ "node": ">=18.0.0"
43
+ }
44
+ }