agent-rev 0.2.7 → 0.2.9
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 +1 -1
- package/dist/commands/setup.js +1 -1
- package/dist/index.js +14 -0
- package/package.json +1 -1
package/dist/commands/repl.js
CHANGED
|
@@ -225,7 +225,7 @@ function detectModels(cliName) {
|
|
|
225
225
|
case 'agent-explorer': {
|
|
226
226
|
for (const dir of [`.${cliName}`, '.agent-mp']) {
|
|
227
227
|
try {
|
|
228
|
-
const cfg = JSON.parse(fsSync.readFileSync(path.join(os.homedir(), dir, '
|
|
228
|
+
const cfg = JSON.parse(fsSync.readFileSync(path.join(os.homedir(), dir, 'config.json'), 'utf-8'));
|
|
229
229
|
if (cfg.availableModels?.length)
|
|
230
230
|
return cfg.availableModels;
|
|
231
231
|
if (cfg.coordinatorModel)
|
package/dist/commands/setup.js
CHANGED
|
@@ -65,7 +65,7 @@ function detectModels(cliName) {
|
|
|
65
65
|
case 'agent-explorer': {
|
|
66
66
|
for (const dir of [`.${cliName}`, '.agent-mp']) {
|
|
67
67
|
try {
|
|
68
|
-
const cfg = JSON.parse(fsSync.readFileSync(path.join(os.homedir(), dir, '
|
|
68
|
+
const cfg = JSON.parse(fsSync.readFileSync(path.join(os.homedir(), dir, 'config.json'), 'utf-8'));
|
|
69
69
|
if (cfg.availableModels?.length)
|
|
70
70
|
return cfg.availableModels;
|
|
71
71
|
if (cfg.coordinatorModel)
|
package/dist/index.js
CHANGED
|
@@ -85,6 +85,20 @@ const ROLE_BINS = {
|
|
|
85
85
|
const nativeRole = ROLE_BINS[PKG_NAME];
|
|
86
86
|
if (nativeRole) {
|
|
87
87
|
const args = process.argv.slice(2);
|
|
88
|
+
// --version / -V
|
|
89
|
+
if (args.includes('--version') || args.includes('-V')) {
|
|
90
|
+
console.log(readVersion());
|
|
91
|
+
process.exit(0);
|
|
92
|
+
}
|
|
93
|
+
// --help / -h
|
|
94
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
95
|
+
console.log(chalk.bold.cyan(`\n ${PKG_NAME} v${readVersion()} — ${nativeRole} agent\n`));
|
|
96
|
+
console.log(chalk.dim(` Usage: ${PKG_NAME} [--model <model>] "<task>"`));
|
|
97
|
+
console.log(chalk.dim(` Login: ${PKG_NAME} --login`));
|
|
98
|
+
console.log(chalk.dim(` Status: ${PKG_NAME} --status`));
|
|
99
|
+
console.log(chalk.dim(` Version: ${PKG_NAME} --version\n`));
|
|
100
|
+
process.exit(0);
|
|
101
|
+
}
|
|
88
102
|
// --login: OAuth login for this role's account
|
|
89
103
|
if (args.includes('--login') || args.includes('login')) {
|
|
90
104
|
const { qwenLogin, fetchQwenModels } = await import('./utils/qwen-auth.js');
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"agent-rev","version":"0.2.
|
|
1
|
+
{"name":"agent-rev","version":"0.2.9","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"}}
|