Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix cuabot publish 2 (#1002)

ddupontd70822f1b71a
diff --git a/libs/cuabot/.npmignore b/libs/cuabot/.npmignore
new file mode 100644
index 0000000000..20ab2a42f0
--- /dev/null
+++ b/libs/cuabot/.npmignore
@@ -0,0 +1,16 @@
+# Source files (use compiled dist/ instead)
+src/
+tsconfig.json
+
+# Development files
+*.log
+.env
+.env.local
+
+# Test files
+__tests__/
+*.test.ts
+*.test.js
+
+# Docker (published separately)
+Dockerfile
diff --git a/libs/cuabot/bin/cuabot.js b/libs/cuabot/bin/cuabot.js
index 995f7d8522..06b83eef01 100755
--- a/libs/cuabot/bin/cuabot.js
+++ b/libs/cuabot/bin/cuabot.js
@@ -1,18 +1,9 @@
#!/usr/bin/env node
-import { spawn } from "child_process";
import { fileURLToPath } from "url";
import { dirname, join } from "path";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
-const args = ["--no-warnings", join(__dirname, "..", "src", "cuabot.tsx"), ...process.argv.slice(2)];
-
-const child = spawn("npx", ["tsx", ...args], {
- stdio: "inherit",
- shell: process.platform === "win32"
-});
-
-child.on("exit", (code) => {
- process.exit(code ?? 0);
-});
+// Import and run the compiled cuabot module
+import(join(__dirname, "..", "dist", "cuabot.js"));
diff --git a/libs/cuabot/package.json b/libs/cuabot/package.json
index 0f4c19c267..c7e122c529 100644
--- a/libs/cuabot/package.json
+++ b/libs/cuabot/package.json
@@ -3,6 +3,11 @@
"version": "1.0.2",
"packageManager": "[email protected]",
"description": "Sandboxed, co-op computer-use agents",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/trycua/cua",
+ "directory": "libs/cuabot"
+ },
"license": "MIT",
"type": "module",
"bin": {