0xray 4.0.8 → 4.0.9
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/.xray/features.json +1 -1
- package/README.md +2 -1
- package/dist/CHANGELOG.md +8 -0
- package/dist/README.md +2 -1
- package/dist/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
- package/package.json +1 -1
- package/scripts/foundry/README.md +2 -0
- package/scripts/node/install-bridges.cjs +29 -7
- package/scripts/node/postinstall.cjs +4 -1
- package/scripts/node/setup.cjs +4 -1
- package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
- package/xray/features.json +1 -1
package/.xray/features.json
CHANGED
package/README.md
CHANGED
|
@@ -50,6 +50,7 @@ Docs: [guides/autonomy-command](docs-site/docs/guides/autonomy-command.md) · Sk
|
|
|
50
50
|
|
|
51
51
|
| Version | Highlights |
|
|
52
52
|
|---------|------------|
|
|
53
|
+
| **4.0.9** | Mill target: postinstall does not mill npm global prefix or `_npx` as a consumer. Isolated HOME skips machine `~/.grok`. |
|
|
53
54
|
| **4.0.0** | Exo + temperament. Constitution always on; ceremony by host. Repertoire organ on (vendored 0.2). Station card survives compact/host-swap. **On npm.** [vision](docs-site/docs/architecture/v4-vision.md) · [now](docs-site/docs/architecture/v4-now.md) |
|
|
54
55
|
| **3.4.1** | Unified `install-bridges.cjs` on postinstall — OpenCode, Grok, Hermes, OpenClaw in one pass. All 7 MCPs servers via `npx -y 0xray mcp <cmd>` (no `dist/` paths). Canonical `release.mjs` pipeline. |
|
|
55
56
|
| **3.3.1** | Orchestrator confidence gate wired into execution planning. |
|
|
@@ -60,7 +61,7 @@ Docs: [guides/autonomy-command](docs-site/docs/guides/autonomy-command.md) · Sk
|
|
|
60
61
|
|
|
61
62
|
### Consolidations
|
|
62
63
|
|
|
63
|
-
- **One consumer install path** — `postinstall.cjs` → `installAllBridges()` replaces scattered per-platform setup.
|
|
64
|
+
- **One consumer install path** — `postinstall.cjs` → `installAllBridges()` replaces scattered per-platform setup. **4.0.9:** does not mill npm global prefix or `_npx`.
|
|
64
65
|
- **7-server MCP surface** — `.mcp.json` SSOT; Grok plugin and all bridges share `XRAY_MCP_SERVERS`.
|
|
65
66
|
- **Dev vs consumer AGENTS** — `AGENTS.md` (framework) vs `AGENTS-consumer.md` (copied to consumer projects on install).
|
|
66
67
|
- **Release pipeline** — `npm run release:patch|minor|major` → reconcile → gate → artifacts → tag → publish.
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -34,6 +34,14 @@ The format is based on [Conventional Commits](https://www.conventionalcommits.or
|
|
|
34
34
|
|
|
35
35
|
---
|
|
36
36
|
|
|
37
|
+
## [4.0.9] - 2026-09-11
|
|
38
|
+
|
|
39
|
+
Postinstall does **not** mill npm global prefix or npx cache as a consumer. `resolveConsumerTargetDir` treats `_npx` and a prefix without `package.json` as an install prefix: mill `INIT_CWD` if it is a real project, else mill the 0xray package (dogfood skip). Isolated HOME still skips machine `~/.grok`. Mill plant stays `mill` + `inspect`. Not 45/42 costume. Nested mill stays **0.1.9**. Not 5.0.0.
|
|
40
|
+
|
|
41
|
+
- fix(foundry): do not mill npm global prefix or npx cache as a consumer (b08b19612)
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
37
45
|
## [4.0.8] - 2026-09-11
|
|
38
46
|
|
|
39
47
|
### 🔄 Changes
|
package/dist/README.md
CHANGED
|
@@ -50,6 +50,7 @@ Docs: [guides/autonomy-command](docs-site/docs/guides/autonomy-command.md) · Sk
|
|
|
50
50
|
|
|
51
51
|
| Version | Highlights |
|
|
52
52
|
|---------|------------|
|
|
53
|
+
| **4.0.9** | Mill target: postinstall does not mill npm global prefix or `_npx` as a consumer. Isolated HOME skips machine `~/.grok`. |
|
|
53
54
|
| **4.0.0** | Exo + temperament. Constitution always on; ceremony by host. Repertoire organ on (vendored 0.2). Station card survives compact/host-swap. **On npm.** [vision](docs-site/docs/architecture/v4-vision.md) · [now](docs-site/docs/architecture/v4-now.md) |
|
|
54
55
|
| **3.4.1** | Unified `install-bridges.cjs` on postinstall — OpenCode, Grok, Hermes, OpenClaw in one pass. All 7 MCPs servers via `npx -y 0xray mcp <cmd>` (no `dist/` paths). Canonical `release.mjs` pipeline. |
|
|
55
56
|
| **3.3.1** | Orchestrator confidence gate wired into execution planning. |
|
|
@@ -60,7 +61,7 @@ Docs: [guides/autonomy-command](docs-site/docs/guides/autonomy-command.md) · Sk
|
|
|
60
61
|
|
|
61
62
|
### Consolidations
|
|
62
63
|
|
|
63
|
-
- **One consumer install path** — `postinstall.cjs` → `installAllBridges()` replaces scattered per-platform setup.
|
|
64
|
+
- **One consumer install path** — `postinstall.cjs` → `installAllBridges()` replaces scattered per-platform setup. **4.0.9:** does not mill npm global prefix or `_npx`.
|
|
64
65
|
- **7-server MCP surface** — `.mcp.json` SSOT; Grok plugin and all bridges share `XRAY_MCP_SERVERS`.
|
|
65
66
|
- **Dev vs consumer AGENTS** — `AGENTS.md` (framework) vs `AGENTS-consumer.md` (copied to consumer projects on install).
|
|
66
67
|
- **Release pipeline** — `npm run release:patch|minor|major` → reconcile → gate → artifacts → tag → publish.
|
package/package.json
CHANGED
|
@@ -55,6 +55,8 @@ After mill plant is fastened, overlay their plant (defaults; remap in `foundry.j
|
|
|
55
55
|
|
|
56
56
|
**Default mill plant:** `mill` + `inspect` (inspect AI work). Fastens a suit, not an empty one. Not 45/42 costume. `foundry.json` `"costume": true` copies that dump. Factory Repertoire still enable-when-resolves. PPE stays worn.
|
|
57
57
|
|
|
58
|
+
**4.0.9 mill target (0xray postinstall, not this mill package):** `install-bridges.cjs` does not mill npm global prefix or npx `_npx` as a consumer. Isolated HOME skips machine `~/.grok`. Nested mill stays **0.1.9**.
|
|
59
|
+
|
|
58
60
|
## Publish this mill
|
|
59
61
|
|
|
60
62
|
From **this directory**, not the 0xray repo root:
|
|
@@ -27,23 +27,44 @@ const SKIP_DIRS = new Set(["node_modules", "logs"]);
|
|
|
27
27
|
const MERGE_FILES = new Set(["enforcer-config.json"]);
|
|
28
28
|
const KEEP_IF_EXISTS = new Set([".yml", ".yaml", ".md"]);
|
|
29
29
|
|
|
30
|
+
function isInstallPrefixTarget(dir) {
|
|
31
|
+
const n = path.resolve(dir);
|
|
32
|
+
const norm = n.replace(/\\/g, "/");
|
|
33
|
+
if (norm.includes("/_npx/") || norm.endsWith("/_npx")) return true;
|
|
34
|
+
if (!fs.existsSync(path.join(n, "package.json"))) return true;
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
30
38
|
function resolveConsumerTargetDir(packageRoot, fallbackDir) {
|
|
31
39
|
const resolved = path.resolve(packageRoot);
|
|
40
|
+
const fallback = path.resolve(
|
|
41
|
+
fallbackDir || process.env.INIT_CWD || process.env.PWD || process.cwd(),
|
|
42
|
+
);
|
|
32
43
|
const inNodeModules =
|
|
33
44
|
resolved.includes(`${path.sep}node_modules${path.sep}`) ||
|
|
34
45
|
resolved.endsWith(`${path.sep}node_modules`);
|
|
35
46
|
|
|
47
|
+
let candidate;
|
|
36
48
|
if (!inNodeModules) {
|
|
37
|
-
|
|
49
|
+
candidate = fallback;
|
|
50
|
+
} else {
|
|
51
|
+
let current = resolved;
|
|
52
|
+
while (path.basename(current) !== "node_modules") {
|
|
53
|
+
const parent = path.dirname(current);
|
|
54
|
+
if (parent === current) {
|
|
55
|
+
candidate = fallback;
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
current = parent;
|
|
59
|
+
}
|
|
60
|
+
if (!candidate) candidate = path.dirname(current);
|
|
38
61
|
}
|
|
39
62
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (parent === current) return fallbackDir || process.cwd();
|
|
44
|
-
current = parent;
|
|
63
|
+
if (isInstallPrefixTarget(candidate)) {
|
|
64
|
+
if (!isInstallPrefixTarget(fallback)) return fallback;
|
|
65
|
+
return resolved;
|
|
45
66
|
}
|
|
46
|
-
return
|
|
67
|
+
return candidate;
|
|
47
68
|
}
|
|
48
69
|
|
|
49
70
|
function isConsumerInstall(packageRoot, targetDir) {
|
|
@@ -744,6 +765,7 @@ function installAllBridges(opts) {
|
|
|
744
765
|
module.exports = {
|
|
745
766
|
installAllBridges,
|
|
746
767
|
resolveConsumerTargetDir,
|
|
768
|
+
isInstallPrefixTarget,
|
|
747
769
|
syncBuiltinSkills,
|
|
748
770
|
isConsumerInstall,
|
|
749
771
|
deployXrayConfig,
|
|
@@ -120,7 +120,10 @@ module.exports = {
|
|
|
120
120
|
|
|
121
121
|
if (require.main === module) {
|
|
122
122
|
const packageRoot = path.join(__dirname, "..", "..");
|
|
123
|
-
const targetDir = resolveConsumerTargetDir(
|
|
123
|
+
const targetDir = resolveConsumerTargetDir(
|
|
124
|
+
packageRoot,
|
|
125
|
+
process.env.INIT_CWD || process.env.PWD || process.cwd(),
|
|
126
|
+
);
|
|
124
127
|
try {
|
|
125
128
|
runPostinstall(packageRoot, targetDir);
|
|
126
129
|
} catch {
|
package/scripts/node/setup.cjs
CHANGED
|
@@ -11,7 +11,10 @@ const {
|
|
|
11
11
|
isConsumerInstall,
|
|
12
12
|
deployXrayConfig,
|
|
13
13
|
} = require("./install-bridges.cjs");
|
|
14
|
-
let targetDir = resolveConsumerTargetDir(
|
|
14
|
+
let targetDir = resolveConsumerTargetDir(
|
|
15
|
+
packageRoot,
|
|
16
|
+
process.env.INIT_CWD || process.env.PWD || process.cwd(),
|
|
17
|
+
);
|
|
15
18
|
|
|
16
19
|
const resolvedPackage = path.resolve(packageRoot);
|
|
17
20
|
const resolvedTarget = path.resolve(targetDir);
|