agmesh 0.0.1 → 0.1.0
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 +1 -16
- package/bin/agmesh.exe +3 -0
- package/cli-wrapper.cjs +65 -0
- package/install.cjs +77 -0
- package/package.json +18 -5
- package/bin/agmesh-stub.cjs +0 -5
package/README.md
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
1
|
# agmesh
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## 0.0.1
|
|
6
|
-
|
|
7
|
-
Name reservation release. Running `agmesh` prints a notice and exits non-zero.
|
|
8
|
-
|
|
9
|
-
The 0.1.0 release ships native binaries per platform via `optionalDependencies`:
|
|
10
|
-
|
|
11
|
-
- `agmesh-darwin-arm64`
|
|
12
|
-
- `agmesh-darwin-x64`
|
|
13
|
-
- `agmesh-linux-x64`
|
|
14
|
-
- `agmesh-linux-arm64`
|
|
15
|
-
- `agmesh-linux-x64-musl`
|
|
16
|
-
- `agmesh-win32-x64`
|
|
17
|
-
|
|
18
|
-
Install matches the host platform automatically.
|
|
3
|
+
Public feedback binary wrapper for `agmesh`.
|
package/bin/agmesh.exe
ADDED
package/cli-wrapper.cjs
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { spawnSync } = require("child_process");
|
|
3
|
+
const { arch, constants } = require("os");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
|
|
6
|
+
const PLATFORMS = {
|
|
7
|
+
"darwin-arm64": {
|
|
8
|
+
"pkg": "@agmesh/darwin-arm64",
|
|
9
|
+
"bin": "agmesh"
|
|
10
|
+
},
|
|
11
|
+
"darwin-x64": {
|
|
12
|
+
"pkg": "@agmesh/darwin-x64",
|
|
13
|
+
"bin": "agmesh"
|
|
14
|
+
},
|
|
15
|
+
"linux-x64": {
|
|
16
|
+
"pkg": "@agmesh/linux-x64",
|
|
17
|
+
"bin": "agmesh"
|
|
18
|
+
},
|
|
19
|
+
"linux-arm64": {
|
|
20
|
+
"pkg": "@agmesh/linux-arm64",
|
|
21
|
+
"bin": "agmesh"
|
|
22
|
+
},
|
|
23
|
+
"linux-x64-musl": {
|
|
24
|
+
"pkg": "@agmesh/linux-x64-musl",
|
|
25
|
+
"bin": "agmesh"
|
|
26
|
+
},
|
|
27
|
+
"win32-x64": {
|
|
28
|
+
"pkg": "@agmesh/win32-x64",
|
|
29
|
+
"bin": "agmesh.exe"
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
function detectPlatformKey() {
|
|
34
|
+
const platform = process.platform;
|
|
35
|
+
const cpu = arch();
|
|
36
|
+
if (platform === "linux" && process.report?.getReport?.().header?.glibcVersionRuntime === undefined) {
|
|
37
|
+
return `linux-${cpu}-musl`;
|
|
38
|
+
}
|
|
39
|
+
return `${platform}-${cpu}`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function main() {
|
|
43
|
+
const platformKey = detectPlatformKey();
|
|
44
|
+
const info = PLATFORMS[platformKey];
|
|
45
|
+
if (!info) {
|
|
46
|
+
console.error(`[agmesh] Unsupported platform: ${platformKey}`);
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
const pkgDir = path.dirname(require.resolve(info.pkg + "/package.json"));
|
|
50
|
+
const binaryPath = path.join(pkgDir, info.bin);
|
|
51
|
+
const result = spawnSync(binaryPath, process.argv.slice(2), {
|
|
52
|
+
stdio: "inherit",
|
|
53
|
+
env: { ...process.env, AGENT_TEAM_PUBLIC_BUILD: "1" },
|
|
54
|
+
});
|
|
55
|
+
if (result.error) {
|
|
56
|
+
console.error(result.error.message);
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
if (result.signal) {
|
|
60
|
+
process.exit(128 + (constants.signals[result.signal] ?? 0));
|
|
61
|
+
}
|
|
62
|
+
process.exit(result.status ?? 1);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
main();
|
package/install.cjs
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
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();
|
package/package.json
CHANGED
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agmesh",
|
|
3
|
-
"version": "0.0
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Public feedback build wrapper for agent-team.",
|
|
5
5
|
"bin": {
|
|
6
|
-
"agmesh": "bin/agmesh
|
|
6
|
+
"agmesh": "bin/agmesh.exe"
|
|
7
7
|
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"postinstall": "node install.cjs"
|
|
10
|
+
},
|
|
11
|
+
"license": "SEE LICENSE IN README.md",
|
|
8
12
|
"files": [
|
|
9
|
-
"bin/agmesh
|
|
13
|
+
"bin/agmesh.exe",
|
|
14
|
+
"install.cjs",
|
|
15
|
+
"cli-wrapper.cjs",
|
|
10
16
|
"README.md"
|
|
11
17
|
],
|
|
12
|
-
"
|
|
18
|
+
"optionalDependencies": {
|
|
19
|
+
"@agmesh/darwin-arm64": "0.1.0",
|
|
20
|
+
"@agmesh/darwin-x64": "0.1.0",
|
|
21
|
+
"@agmesh/linux-x64": "0.1.0",
|
|
22
|
+
"@agmesh/linux-arm64": "0.1.0",
|
|
23
|
+
"@agmesh/linux-x64-musl": "0.1.0",
|
|
24
|
+
"@agmesh/win32-x64": "0.1.0"
|
|
25
|
+
},
|
|
13
26
|
"publishConfig": {
|
|
14
27
|
"access": "public"
|
|
15
28
|
}
|
package/bin/agmesh-stub.cjs
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
console.error("agmesh 0.0.1 is a name-reservation release.");
|
|
3
|
-
console.error("Native platform binaries ship in 0.1.0 via optionalDependencies.");
|
|
4
|
-
console.error("See https://www.npmjs.com/package/agmesh for the 0.1.0 release when available.");
|
|
5
|
-
process.exit(1);
|