orchestrai 0.1.5 → 0.1.7
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/README.md +31 -0
- package/bin/orchestrai.js +24 -6
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -36,6 +36,37 @@ xattr -d com.apple.quarantine "$(which orchestrai)"
|
|
|
36
36
|
|
|
37
37
|
(or the equivalent path npm installed it under) before running it again.
|
|
38
38
|
|
|
39
|
+
### WSL on Windows: "optional dependency isn't installed"
|
|
40
|
+
|
|
41
|
+
If you install `orchestrai` inside a WSL distro and see
|
|
42
|
+
`The "orchestrai-linux-x64" optional dependency isn't installed` even
|
|
43
|
+
though a fresh install just succeeded, the likely cause isn't a broken
|
|
44
|
+
install — it's a **stale Windows npm install shadowing the WSL one**.
|
|
45
|
+
WSL exposes Windows executables on `$PATH` by default, and if you ever ran
|
|
46
|
+
`npm install -g orchestrai` from Windows (or through WSL before installing
|
|
47
|
+
a native Linux Node via `nvm`), that install can keep resolving even after
|
|
48
|
+
you set up a proper native one, especially if your shell has cached the
|
|
49
|
+
old command location.
|
|
50
|
+
|
|
51
|
+
Fix:
|
|
52
|
+
```bash
|
|
53
|
+
which orchestrai # if this prints a /mnt/c/... path, that's the problem
|
|
54
|
+
```
|
|
55
|
+
```bash
|
|
56
|
+
# remove the Windows-side shims directly (adjust the path to your username)
|
|
57
|
+
rm "/mnt/c/Users/<you>/AppData/Roaming/npm/orchestrai" \
|
|
58
|
+
"/mnt/c/Users/<you>/AppData/Roaming/npm/orchestrai.cmd" \
|
|
59
|
+
"/mnt/c/Users/<you>/AppData/Roaming/npm/orchestrai.ps1"
|
|
60
|
+
hash -r # zsh: clear the cached command path
|
|
61
|
+
which orchestrai # should now show a path under ~/.nvm/... or similar
|
|
62
|
+
```
|
|
63
|
+
If you don't already have a native Node installed inside the distro
|
|
64
|
+
(`node -v` fails, or `which node` shows a `/mnt/c/...` path), install one
|
|
65
|
+
first — e.g. via [nvm](https://github.com/nvm-sh/nvm) — before reinstalling
|
|
66
|
+
`orchestrai`. A Node/npm running through the Windows bridge will correctly
|
|
67
|
+
pick the *Windows* platform package, not Linux, no matter how many times
|
|
68
|
+
you reinstall.
|
|
69
|
+
|
|
39
70
|
## Usage
|
|
40
71
|
|
|
41
72
|
```
|
package/bin/orchestrai.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
const path = require("path")
|
|
26
26
|
const { spawnSync } = require("child_process")
|
|
27
|
-
const { chmodSync } = require("fs")
|
|
27
|
+
const { chmodSync, existsSync } = require("fs")
|
|
28
28
|
|
|
29
29
|
// One fixed platform package per supported platform+arch — mirrors
|
|
30
30
|
// npm-package/*/package.json's own "os"/"cpu" restrictions exactly.
|
|
@@ -47,12 +47,19 @@ function resolveBinaryPath() {
|
|
|
47
47
|
`See https://github.com/Muhamad-Yussuf/devops-mcp-server#readme for building from source instead.`,
|
|
48
48
|
)
|
|
49
49
|
}
|
|
50
|
+
// Resolve the platform package's own package.json first, then join the
|
|
51
|
+
// known relative bin path onto its directory — rather than
|
|
52
|
+
// require.resolve()-ing the binary's deep sub-path directly. Found live
|
|
53
|
+
// (a real WSL/global-install report, binary confirmed present on disk
|
|
54
|
+
// in exactly the expected location, yet the deep-path resolve() still
|
|
55
|
+
// failed) that the direct approach is fragile in at least one real
|
|
56
|
+
// global-install layout, for a reason not fully pinned down. Resolving
|
|
57
|
+
// package.json is the same pattern esbuild's own installer uses for
|
|
58
|
+
// this exact reason — it only depends on Node finding the package
|
|
59
|
+
// directory at all, not on any deep multi-segment specifier resolution.
|
|
60
|
+
let pkgDir
|
|
50
61
|
try {
|
|
51
|
-
|
|
52
|
-
// would — correct whether this dispatcher is itself inside
|
|
53
|
-
// node_modules/orchestrai/bin/ (the real installed case) or run
|
|
54
|
-
// directly from a workspace/monorepo layout during local testing.
|
|
55
|
-
return require.resolve(path.join(entry.pkg, "bin", entry.bin))
|
|
62
|
+
pkgDir = path.dirname(require.resolve(path.join(entry.pkg, "package.json")))
|
|
56
63
|
} catch {
|
|
57
64
|
throw new Error(
|
|
58
65
|
`The "${entry.pkg}" optional dependency isn't installed. ` +
|
|
@@ -61,6 +68,17 @@ function resolveBinaryPath() {
|
|
|
61
68
|
`Try reinstalling without those flags.`,
|
|
62
69
|
)
|
|
63
70
|
}
|
|
71
|
+
|
|
72
|
+
const binPath = path.join(pkgDir, "bin", entry.bin)
|
|
73
|
+
if (!existsSync(binPath)) {
|
|
74
|
+
throw new Error(
|
|
75
|
+
`The "${entry.pkg}" optional dependency is installed at ${pkgDir}, ` +
|
|
76
|
+
`but its expected binary is missing at ${binPath}. The install may ` +
|
|
77
|
+
`be corrupted — try "npm uninstall -g orchestrai && npm cache clean ` +
|
|
78
|
+
`--force && npm i -g orchestrai" to reinstall cleanly.`,
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
return binPath
|
|
64
82
|
}
|
|
65
83
|
|
|
66
84
|
function main() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orchestrai",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "OrchestrAI — run the standalone orchestrai binary via bunx/npx with nothing pre-installed. The right platform binary is installed automatically as an optional dependency; no network download at runtime.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"README.md"
|
|
12
12
|
],
|
|
13
13
|
"optionalDependencies": {
|
|
14
|
-
"orchestrai-windows-x64": "0.1.
|
|
15
|
-
"orchestrai-linux-x64": "0.1.
|
|
16
|
-
"orchestrai-darwin-arm64": "0.1.
|
|
14
|
+
"orchestrai-windows-x64": "0.1.7",
|
|
15
|
+
"orchestrai-linux-x64": "0.1.7",
|
|
16
|
+
"orchestrai-darwin-arm64": "0.1.7"
|
|
17
17
|
},
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">=18"
|