ax-agents 0.0.1-alpha.2 → 0.0.1-alpha.3
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/ax.js +11 -2
- package/package.json +1 -1
package/ax.js
CHANGED
|
@@ -20,6 +20,11 @@ import { fileURLToPath } from "node:url";
|
|
|
20
20
|
import path from "node:path";
|
|
21
21
|
import os from "node:os";
|
|
22
22
|
|
|
23
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
24
|
+
const __dirname = path.dirname(__filename);
|
|
25
|
+
const packageJson = JSON.parse(readFileSync(path.join(__dirname, "package.json"), "utf-8"));
|
|
26
|
+
const VERSION = packageJson.version;
|
|
27
|
+
|
|
23
28
|
/**
|
|
24
29
|
* @typedef {'claude' | 'codex'} ToolName
|
|
25
30
|
*/
|
|
@@ -3447,7 +3452,7 @@ function printHelp(agent, cliName) {
|
|
|
3447
3452
|
const backendName = agent.name === "codex" ? "OpenAI Codex" : "Claude";
|
|
3448
3453
|
const hasReview = !!agent.reviewOptions;
|
|
3449
3454
|
|
|
3450
|
-
console.log(`${name}
|
|
3455
|
+
console.log(`${name} v${VERSION} - agentic assistant CLI (${backendName})
|
|
3451
3456
|
|
|
3452
3457
|
Commands:
|
|
3453
3458
|
agents List all running agents with state and log paths
|
|
@@ -3516,6 +3521,11 @@ async function main() {
|
|
|
3516
3521
|
const args = process.argv.slice(2);
|
|
3517
3522
|
const cliName = path.basename(process.argv[1], ".js");
|
|
3518
3523
|
|
|
3524
|
+
if (args.includes("--version") || args.includes("-V")) {
|
|
3525
|
+
console.log(VERSION);
|
|
3526
|
+
process.exit(0);
|
|
3527
|
+
}
|
|
3528
|
+
|
|
3519
3529
|
// Parse flags
|
|
3520
3530
|
const wait = args.includes("--wait");
|
|
3521
3531
|
const noWait = args.includes("--no-wait");
|
|
@@ -3650,7 +3660,6 @@ async function main() {
|
|
|
3650
3660
|
|
|
3651
3661
|
// Run main() only when executed directly (not when imported for testing)
|
|
3652
3662
|
// Use realpathSync to handle symlinks (e.g., axclaude, axcodex bin entries)
|
|
3653
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
3654
3663
|
const isDirectRun = process.argv[1] && (() => {
|
|
3655
3664
|
try {
|
|
3656
3665
|
return realpathSync(process.argv[1]) === __filename;
|