agmesh 0.6.2 → 0.6.4
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/{cli-wrapper.cjs → bin/agmesh.mjs} +15 -5
- package/package.json +9 -14
- package/bin/agmesh.exe +0 -3
- package/install.cjs +0 -77
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { spawnSync } from "node:child_process";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
4
|
+
import { arch, constants } from "node:os";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
|
|
7
|
+
const require = createRequire(import.meta.url);
|
|
5
8
|
|
|
6
9
|
const PLATFORMS = {
|
|
7
10
|
"darwin-arm64": {
|
|
@@ -46,11 +49,18 @@ function main() {
|
|
|
46
49
|
console.error(`[agmesh] Unsupported platform: ${platformKey}`);
|
|
47
50
|
process.exit(1);
|
|
48
51
|
}
|
|
49
|
-
|
|
52
|
+
let pkgDir;
|
|
53
|
+
try {
|
|
54
|
+
pkgDir = path.dirname(require.resolve(info.pkg + "/package.json"));
|
|
55
|
+
} catch {
|
|
56
|
+
console.error(`[agmesh] Native package not installed: ${info.pkg}`);
|
|
57
|
+
console.error("Reinstall without --omit=optional so npm can install the platform optional dependency.");
|
|
58
|
+
process.exit(1);
|
|
59
|
+
}
|
|
50
60
|
const binaryPath = path.join(pkgDir, info.bin);
|
|
51
61
|
const result = spawnSync(binaryPath, process.argv.slice(2), {
|
|
52
62
|
stdio: "inherit",
|
|
53
|
-
env: { ...process.env, AGENT_TEAM_PUBLIC_BUILD: "1" },
|
|
63
|
+
env: { ...process.env, AGENT_TEAM_PUBLIC_BUILD: "1", AGENT_TEAM_BUNDLED_GOALFORGE: "1" },
|
|
54
64
|
});
|
|
55
65
|
if (result.error) {
|
|
56
66
|
console.error(result.error.message);
|
package/package.json
CHANGED
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agmesh",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"description": "Public feedback build wrapper for agent-team.",
|
|
5
5
|
"bin": {
|
|
6
|
-
"agmesh": "bin/agmesh.
|
|
7
|
-
},
|
|
8
|
-
"scripts": {
|
|
9
|
-
"postinstall": "node install.cjs"
|
|
6
|
+
"agmesh": "bin/agmesh.mjs"
|
|
10
7
|
},
|
|
11
8
|
"license": "SEE LICENSE IN README.md",
|
|
12
9
|
"files": [
|
|
13
|
-
"bin/agmesh.
|
|
14
|
-
"install.cjs",
|
|
15
|
-
"cli-wrapper.cjs",
|
|
10
|
+
"bin/agmesh.mjs",
|
|
16
11
|
"README.md"
|
|
17
12
|
],
|
|
18
13
|
"optionalDependencies": {
|
|
19
|
-
"@agmesh/darwin-arm64": "0.6.
|
|
20
|
-
"@agmesh/darwin-x64": "0.6.
|
|
21
|
-
"@agmesh/linux-x64": "0.6.
|
|
22
|
-
"@agmesh/linux-arm64": "0.6.
|
|
23
|
-
"@agmesh/linux-x64-musl": "0.6.
|
|
24
|
-
"@agmesh/win32-x64": "0.6.
|
|
14
|
+
"@agmesh/darwin-arm64": "0.6.4",
|
|
15
|
+
"@agmesh/darwin-x64": "0.6.4",
|
|
16
|
+
"@agmesh/linux-x64": "0.6.4",
|
|
17
|
+
"@agmesh/linux-arm64": "0.6.4",
|
|
18
|
+
"@agmesh/linux-x64-musl": "0.6.4",
|
|
19
|
+
"@agmesh/win32-x64": "0.6.4"
|
|
25
20
|
},
|
|
26
21
|
"publishConfig": {
|
|
27
22
|
"access": "public"
|
package/bin/agmesh.exe
DELETED
package/install.cjs
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const { copyFileSync, linkSync, unlinkSync, chmodSync, existsSync } = require("fs");
|
|
3
|
-
const { arch } = require("os");
|
|
4
|
-
const path = require("path");
|
|
5
|
-
|
|
6
|
-
const COMMAND_NAME = "agmesh";
|
|
7
|
-
const PLATFORMS = {
|
|
8
|
-
"darwin-arm64": {
|
|
9
|
-
"pkg": "@agmesh/darwin-arm64",
|
|
10
|
-
"bin": "agmesh"
|
|
11
|
-
},
|
|
12
|
-
"darwin-x64": {
|
|
13
|
-
"pkg": "@agmesh/darwin-x64",
|
|
14
|
-
"bin": "agmesh"
|
|
15
|
-
},
|
|
16
|
-
"linux-x64": {
|
|
17
|
-
"pkg": "@agmesh/linux-x64",
|
|
18
|
-
"bin": "agmesh"
|
|
19
|
-
},
|
|
20
|
-
"linux-arm64": {
|
|
21
|
-
"pkg": "@agmesh/linux-arm64",
|
|
22
|
-
"bin": "agmesh"
|
|
23
|
-
},
|
|
24
|
-
"linux-x64-musl": {
|
|
25
|
-
"pkg": "@agmesh/linux-x64-musl",
|
|
26
|
-
"bin": "agmesh"
|
|
27
|
-
},
|
|
28
|
-
"win32-x64": {
|
|
29
|
-
"pkg": "@agmesh/win32-x64",
|
|
30
|
-
"bin": "agmesh.exe"
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
function detectPlatformKey() {
|
|
35
|
-
const platform = process.platform;
|
|
36
|
-
const cpu = arch();
|
|
37
|
-
if (platform === "linux" && process.report?.getReport?.().header?.glibcVersionRuntime === undefined) {
|
|
38
|
-
return `linux-${cpu}-musl`;
|
|
39
|
-
}
|
|
40
|
-
return `${platform}-${cpu}`;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function placeBinary(src, dest) {
|
|
44
|
-
try {
|
|
45
|
-
if (existsSync(dest)) unlinkSync(dest);
|
|
46
|
-
linkSync(src, dest);
|
|
47
|
-
} catch {
|
|
48
|
-
copyFileSync(src, dest);
|
|
49
|
-
}
|
|
50
|
-
if (process.platform !== "win32") chmodSync(dest, 0o755);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function main() {
|
|
54
|
-
const platformKey = detectPlatformKey();
|
|
55
|
-
const info = PLATFORMS[platformKey];
|
|
56
|
-
if (!info) {
|
|
57
|
-
console.error(`[agmesh] Unsupported platform: ${platformKey}`);
|
|
58
|
-
process.exitCode = 1;
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
let pkgDir;
|
|
62
|
-
try {
|
|
63
|
-
pkgDir = path.dirname(require.resolve(info.pkg + "/package.json"));
|
|
64
|
-
} catch {
|
|
65
|
-
console.error(`[agmesh] Native package not installed: ${info.pkg}`);
|
|
66
|
-
console.error("Reinstall without --omit=optional / --ignore-scripts.");
|
|
67
|
-
process.exitCode = 1;
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
const src = path.join(pkgDir, info.bin);
|
|
71
|
-
const dest = path.join(__dirname, "bin", COMMAND_NAME + ".exe");
|
|
72
|
-
// The native binary should be compiled from a public entrypoint that sets
|
|
73
|
-
// AGENT_TEAM_PUBLIC_BUILD=1 before loading setup.ts.
|
|
74
|
-
placeBinary(src, dest);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
main();
|