@katyella/legio 0.1.2 → 0.1.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/CHANGELOG.md +8 -1
- package/bin/legio.mjs +13 -2
- package/package.json +2 -2
- package/src/index.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.3] - 2026-02-27
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Global install (`npm install -g`) failed when run from a project without tsx — shim now resolves tsx from legio's own node_modules
|
|
14
|
+
- Publish workflow uses Node 24 + OIDC trusted publishing (no NPM_TOKEN needed)
|
|
15
|
+
|
|
10
16
|
## [0.1.2] - 2026-02-27
|
|
11
17
|
|
|
12
18
|
### Added
|
|
@@ -140,7 +146,8 @@ Initial public release on npm as [`@katyella/legio`](https://www.npmjs.com/packa
|
|
|
140
146
|
- E2E lifecycle tests via Playwright
|
|
141
147
|
- Vitest test runner with forks pool for CI compatibility
|
|
142
148
|
|
|
143
|
-
[Unreleased]: https://github.com/katyella/legio/compare/v0.1.
|
|
149
|
+
[Unreleased]: https://github.com/katyella/legio/compare/v0.1.3...HEAD
|
|
150
|
+
[0.1.3]: https://github.com/katyella/legio/compare/v0.1.2...v0.1.3
|
|
144
151
|
[0.1.2]: https://github.com/katyella/legio/compare/v0.1.1...v0.1.2
|
|
145
152
|
[0.1.1]: https://github.com/katyella/legio/compare/v0.1.0...v0.1.1
|
|
146
153
|
[0.1.0]: https://github.com/katyella/legio/releases/tag/v0.1.0
|
package/bin/legio.mjs
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { spawnSync } from "node:child_process";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
3
4
|
import { fileURLToPath } from "node:url";
|
|
4
5
|
|
|
5
6
|
// Bootstrap shim: re-exec Node with --import tsx so TypeScript files load
|
|
6
7
|
// natively. tsx >= 4.21 dropped support for module.register() on Node >= 23,
|
|
7
8
|
// requiring --import instead.
|
|
8
9
|
//
|
|
10
|
+
// Resolve tsx from legio's own node_modules (not the user's cwd) so that
|
|
11
|
+
// `npm install -g` works regardless of what project the user is in.
|
|
12
|
+
//
|
|
9
13
|
// Guard logic (two-layer):
|
|
10
14
|
// 1. __LEGIO_TSX_LOADED env var: standard guard for the non-node_modules case.
|
|
11
15
|
// Prevents infinite re-exec when the script is invoked directly from PATH.
|
|
@@ -18,17 +22,24 @@ import { fileURLToPath } from "node:url";
|
|
|
18
22
|
const scriptPath = fileURLToPath(import.meta.url);
|
|
19
23
|
const inNodeModules = scriptPath.includes("/node_modules/");
|
|
20
24
|
|
|
25
|
+
// Resolve tsx to its absolute path within legio's own dependency tree.
|
|
26
|
+
// This ensures --import finds tsx even when cwd is a different project.
|
|
27
|
+
const require = createRequire(import.meta.url);
|
|
28
|
+
const tsxPath = require.resolve("tsx");
|
|
29
|
+
|
|
21
30
|
// True when this process was started with `node --import tsx ...`
|
|
22
31
|
const tsxImportActive =
|
|
23
32
|
process.execArgv.some((arg, i, arr) => arg === "--import" && arr[i + 1] === "tsx") ||
|
|
24
|
-
process.execArgv.some((arg) => arg === "--import=tsx")
|
|
33
|
+
process.execArgv.some((arg) => arg === "--import=tsx") ||
|
|
34
|
+
process.execArgv.some((arg, i, arr) => arg === "--import" && arr[i + 1] === tsxPath) ||
|
|
35
|
+
process.execArgv.some((arg) => arg === `--import=${tsxPath}`);
|
|
25
36
|
|
|
26
37
|
if (process.env.__LEGIO_TSX_LOADED && (!inNodeModules || tsxImportActive)) {
|
|
27
38
|
await import("../src/index.ts");
|
|
28
39
|
} else {
|
|
29
40
|
const result = spawnSync(
|
|
30
41
|
process.execPath,
|
|
31
|
-
["--import",
|
|
42
|
+
["--import", tsxPath, scriptPath, ...process.argv.slice(2)],
|
|
32
43
|
{
|
|
33
44
|
stdio: "inherit",
|
|
34
45
|
env: { ...process.env, __LEGIO_TSX_LOADED: "1" },
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@katyella/legio",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Multi-agent orchestration for Claude Code — spawn worker agents in git worktrees via tmux, coordinate through SQLite mail, merge with tiered conflict resolution",
|
|
5
|
-
"author": "
|
|
5
|
+
"author": "Matthew Wojtowicz",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"repository": {
|
package/src/index.ts
CHANGED
|
@@ -45,7 +45,7 @@ import { worktreeCommand } from "./commands/worktree.ts";
|
|
|
45
45
|
import { LegioError, WorktreeError } from "./errors.ts";
|
|
46
46
|
import { setQuiet } from "./logging/color.ts";
|
|
47
47
|
|
|
48
|
-
const VERSION = "0.1.
|
|
48
|
+
const VERSION = "0.1.3";
|
|
49
49
|
|
|
50
50
|
const HELP = `legio v${VERSION} — Multi-agent orchestration for Claude Code
|
|
51
51
|
|