@yuandc/aica 0.1.0 → 0.1.1
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/worker-cli.js +4 -2
- package/package.json +1 -1
package/dist/worker-cli.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from "commander";
|
|
3
|
+
import path from "node:path";
|
|
3
4
|
import { createStartCommand } from "./commands/start.js";
|
|
4
5
|
import { createWorkerAuthCommand } from "./commands/worker-auth.js";
|
|
5
6
|
import { createWorkerProjectCommand } from "./commands/worker-project.js";
|
|
@@ -10,7 +11,7 @@ export async function runWorkerCli(argv = process.argv) {
|
|
|
10
11
|
program
|
|
11
12
|
.name("aica")
|
|
12
13
|
.description("AICA remote Agent worker")
|
|
13
|
-
.version("0.1.
|
|
14
|
+
.version("0.1.1")
|
|
14
15
|
.enablePositionalOptions();
|
|
15
16
|
program.addCommand(createStartCommand());
|
|
16
17
|
program.addCommand(createWorkerAuthCommand());
|
|
@@ -18,7 +19,8 @@ export async function runWorkerCli(argv = process.argv) {
|
|
|
18
19
|
await program.parseAsync(argv);
|
|
19
20
|
}
|
|
20
21
|
const entry = process.argv[1] || "";
|
|
21
|
-
|
|
22
|
+
const entryName = path.basename(entry).replace(/\.(?:js|ts|cjs|mjs)$/i, "");
|
|
23
|
+
if (entryName === "worker-cli" || entryName === "aica" || entryName === "aca") {
|
|
22
24
|
void runWorkerCli().catch((error) => {
|
|
23
25
|
const message = error instanceof Error ? error.message : String(error);
|
|
24
26
|
console.error(message);
|