agmesh 0.6.3 → 0.7.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 +47 -1
- package/{cli-wrapper.cjs → bin/agmesh.mjs} +15 -5
- package/package.json +10 -15
- package/bin/agmesh.exe +0 -3
- package/install.cjs +0 -77
package/README.md
CHANGED
|
@@ -1,3 +1,49 @@
|
|
|
1
1
|
# agmesh
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Agent 协同、模型路由与 CI 审查框架。
|
|
4
|
+
|
|
5
|
+
`agmesh` 是公开 npm 二进制分发包,提供 `agmesh` 命令。它会把 agent-team workflow、Task Contract、子代理协作规则、模型候选链、CI PR/MR 审查和 Goal Forge 设计质证带到本地项目里。
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g agmesh
|
|
11
|
+
agmesh deploy .
|
|
12
|
+
agmesh status
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
临时试用可以直接用 npx:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx agmesh deploy .
|
|
19
|
+
npx agmesh status
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 常用命令
|
|
23
|
+
|
|
24
|
+
- `agmesh deploy .`:在当前 git 项目启用 agmesh workflow 和协作规则。
|
|
25
|
+
- `agmesh status`:查看当前安装、项目配置和 Goal Forge runtime。
|
|
26
|
+
- `agmesh automation status .`:查看 coordination DB 任务队列和 mailbox 状态。
|
|
27
|
+
- `agmesh automation doctor .`:诊断自动化配置、CI 可见性和队列漂移。
|
|
28
|
+
- `agmesh goal-forge status .`:确认内置 Goal Forge runtime。
|
|
29
|
+
- `agmesh goal-forge init . "<goal>"`:为架构、API、数据模型或高风险方案创建设计质证 run。
|
|
30
|
+
|
|
31
|
+
## 分发形态
|
|
32
|
+
|
|
33
|
+
主包只包含一个 JS launcher。真正的编译二进制由当前平台对应的 optional dependency 提供,因此 `npm install --ignore-scripts` 也可以使用,不依赖 postinstall 复制文件。
|
|
34
|
+
|
|
35
|
+
- `@agmesh/darwin-arm64`
|
|
36
|
+
- `@agmesh/darwin-x64`
|
|
37
|
+
- `@agmesh/linux-x64`
|
|
38
|
+
- `@agmesh/linux-arm64`
|
|
39
|
+
- `@agmesh/linux-x64-musl`
|
|
40
|
+
- `@agmesh/win32-x64`
|
|
41
|
+
|
|
42
|
+
## 隐私与安全边界
|
|
43
|
+
|
|
44
|
+
- 不会在安装阶段执行任务或发送遥测。
|
|
45
|
+
- 运行命令时不会采集源码、prompt、diff、环境变量、secret、token、remote URL 或原始 stdout/stderr。
|
|
46
|
+
- 匿名诊断遥测可通过 `agmesh telemetry status` 查看,通过 `agmesh telemetry revoke` 关闭。
|
|
47
|
+
- 发布、签名和维护者操作不在 npm 包内执行。
|
|
48
|
+
|
|
49
|
+
源码开发版命令是 `agent-team`;普通用户优先使用这里的 `agmesh` npm 二进制。
|
|
@@ -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.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"description": "Agent collaboration, model routing, and CI review CLI.",
|
|
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.
|
|
20
|
-
"@agmesh/darwin-x64": "0.
|
|
21
|
-
"@agmesh/linux-x64": "0.
|
|
22
|
-
"@agmesh/linux-arm64": "0.
|
|
23
|
-
"@agmesh/linux-x64-musl": "0.
|
|
24
|
-
"@agmesh/win32-x64": "0.
|
|
14
|
+
"@agmesh/darwin-arm64": "0.7.0",
|
|
15
|
+
"@agmesh/darwin-x64": "0.7.0",
|
|
16
|
+
"@agmesh/linux-x64": "0.7.0",
|
|
17
|
+
"@agmesh/linux-arm64": "0.7.0",
|
|
18
|
+
"@agmesh/linux-x64-musl": "0.7.0",
|
|
19
|
+
"@agmesh/win32-x64": "0.7.0"
|
|
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();
|