agentboot 0.3.0 → 0.3.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.
Files changed (2) hide show
  1. package/bin/agentboot.js +9 -1
  2. package/package.json +1 -1
package/bin/agentboot.js CHANGED
@@ -3,14 +3,22 @@
3
3
  import { spawnSync } from "node:child_process";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { dirname, join } from "node:path";
6
+ import { createRequire } from "node:module";
6
7
 
7
8
  const __filename = fileURLToPath(import.meta.url);
8
9
  const __dirname = dirname(__filename);
9
10
  const cli = join(__dirname, "..", "scripts", "cli.ts");
10
11
 
12
+ // Resolve tsx from this package's own node_modules, not the user's cwd.
13
+ // When installed globally (npm -g, brew), Node resolves bare specifiers
14
+ // from cwd which fails. Using createRequire anchors resolution to this file.
15
+ const require = createRequire(import.meta.url);
16
+ const tsxPkgDir = dirname(require.resolve("tsx/package.json"));
17
+ const tsxEntry = join(tsxPkgDir, "dist", "esm", "index.mjs");
18
+
11
19
  const result = spawnSync(
12
20
  process.execPath,
13
- ["--import", "tsx", cli, ...process.argv.slice(2)],
21
+ ["--import", `file://${tsxEntry}`, cli, ...process.argv.slice(2)],
14
22
  { stdio: "inherit", env: { ...process.env } }
15
23
  );
16
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentboot",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Convention over configuration for agentic development teams. The Spring Boot of Claude Code governance.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Mike Saavedra <mike@agentboot.dev>",