create-metaclaw 3.3.0 → 3.3.2

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.
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env node
2
+ import { fileURLToPath } from "url";
3
+ import { dirname, join } from "path";
4
+
5
+ const __dirname = dirname(fileURLToPath(import.meta.url));
6
+ const entry = join(__dirname, "..", "installer", "index.ts");
7
+
8
+ // Use tsx's programmatic API — works regardless of where .bin lands
9
+ import("tsx/esm/api").then(({ register }) => {
10
+ register();
11
+ import(new URL(`file://${entry.replace(/\\/g, "/")}`).href);
12
+ }).catch(() => {
13
+ // Fallback: spawn tsx as a child process
14
+ import("child_process").then(({ execFileSync }) => {
15
+ import("fs").then(({ existsSync }) => {
16
+ const root = join(__dirname, "..");
17
+ const places = [
18
+ join(root, "node_modules", ".bin", "tsx.cmd"),
19
+ join(root, "node_modules", ".bin", "tsx"),
20
+ join(root, "..", ".bin", "tsx.cmd"),
21
+ join(root, "..", ".bin", "tsx"),
22
+ ];
23
+ const tsx = places.find(p => existsSync(p)) || "tsx";
24
+ try {
25
+ execFileSync(tsx, [entry], { stdio: "inherit", cwd: root, shell: tsx.endsWith(".cmd") });
26
+ } catch (e) {
27
+ console.error("Failed to start MetaClaw. Make sure tsx is installed: npm install -g tsx");
28
+ process.exit(1);
29
+ }
30
+ });
31
+ });
32
+ });
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "create-metaclaw",
3
- "version": "3.3.0",
3
+ "version": "3.3.2",
4
4
  "description": "MetaClaw — Autonomous AI Agent Platform by Yonder Zenith LLC",
5
5
  "type": "module",
6
6
  "bin": {
7
- "create-metaclaw": "installer/index.ts"
7
+ "create-metaclaw": "bin/create-metaclaw.mjs"
8
8
  },
9
9
  "scripts": {
10
10
  "start": "tsx installer/index.ts",