agent-rev 0.2.6 → 0.2.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/dist/index.js +18 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,17 +3,33 @@ import { Command } from 'commander';
|
|
|
3
3
|
import * as path from 'path';
|
|
4
4
|
import * as os from 'os';
|
|
5
5
|
import * as fs from 'fs/promises';
|
|
6
|
+
import * as fsSync from 'fs';
|
|
6
7
|
import * as readline from 'readline';
|
|
7
8
|
import chalk from 'chalk';
|
|
8
9
|
import { AGENT_HOME, PKG_NAME } from './utils/config.js';
|
|
9
10
|
import { runRepl, runRole } from './commands/repl.js';
|
|
10
11
|
import { setupCommand } from './commands/setup.js';
|
|
11
12
|
import { getLastSessionForDir, listSessions, loadSession } from './utils/sessions.js';
|
|
13
|
+
// Read version from package.json at runtime
|
|
14
|
+
function readVersion() {
|
|
15
|
+
const __filename = new URL(import.meta.url).pathname;
|
|
16
|
+
const __dirname = path.dirname(__filename);
|
|
17
|
+
for (const p of [
|
|
18
|
+
path.join(__dirname, '..', 'package.json'),
|
|
19
|
+
path.join(__dirname, '..', '..', 'package.json'),
|
|
20
|
+
]) {
|
|
21
|
+
try {
|
|
22
|
+
return JSON.parse(fsSync.readFileSync(p, 'utf-8')).version || '0.0.0';
|
|
23
|
+
}
|
|
24
|
+
catch { }
|
|
25
|
+
}
|
|
26
|
+
return '0.0.0';
|
|
27
|
+
}
|
|
12
28
|
const program = new Command();
|
|
13
29
|
program
|
|
14
|
-
.name(
|
|
30
|
+
.name(PKG_NAME)
|
|
15
31
|
.description('Deterministic multi-agent CLI orchestrator')
|
|
16
|
-
.version(
|
|
32
|
+
.version(readVersion())
|
|
17
33
|
.argument('[task...]', 'Task description or arguments')
|
|
18
34
|
.option('--continue', 'Resume the last session in the current directory')
|
|
19
35
|
.option('--resume [id]', 'Resume any saved session by ID (omit ID to pick from list)')
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"agent-rev","version":"0.2.
|
|
1
|
+
{"name":"agent-rev","version":"0.2.7","description":"agent-rev agent","type":"module","main":"./dist/index.js","files":["dist/"],"bin":{"agent-rev":"dist/index.js"},"scripts":{"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","dev":"tsx src/index.ts","prepublishOnly":"npm run build"},"keywords":["ai","agent","cli"],"license":"MIT","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"},"devDependencies":{"@types/node":"^22.13.0","@types/open":"^6.1.0","tsx":"^4.19.3","typescript":"^5.7.3"},"engines":{"node":">=18.0.0"}}
|