@agentguardx/helper 0.3.92 → 0.3.95

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 CHANGED
@@ -18,7 +18,7 @@ npx 即用不会创建全局 `agentguard` 命令;后续使用 `npx @agentguard
18
18
 
19
19
  企业对话正文留存不要求员工告知或确认,向导不展示告知步骤、不提交已读;正常对话不会因告知流程被阻断。留存开启仍须独立双审,正文访问按当前角色与服务端审批结果执行,平台管理员可审核本人申请;正式环境默认关闭。
20
20
 
21
- 支持入口为 OpenCode、OpenClaw、Cursor 远程 MCP、Claude Desktop MCP 桥接及 Cherry Studio 手动说明;厂商原生实测范围以企业兼容记录为准。Codex 暂缓,Gemini 和 Claude Code 不接入。B15 为 OpenCode 同时注册本机安全 stdio MCP,并写入关闭自带本机工具的配置;仅经 ag_* 入口的调用由服务端逐次授权、执行上报和输出检查。其他厂商未验证关闭原生工具时,其自带本机终端、文件操作不受该 MCP 管控。客户端可被员工修改的边界不等同操作系统强制隔离。
21
+ 支持入口为 OpenCode、WorkBuddy(自定义模型写入 `~/.workbuddy/models.json`、远程 MCP 写入 `mcp.json`,直接打开 WorkBuddy 并选“AgentGuard / …”模型即可;只有选用该模型的对话和 agentguard 连接器的调用经过 AgentGuard,WorkBuddy 自带模型、连接器与本机工具不经过)、OpenClaw、Cursor 远程 MCP 及 Cherry Studio 手动说明(Claude Desktop 向导不再提供,2026-10-23 用户决定);厂商原生实测范围以企业兼容记录为准。Codex 暂缓,Gemini、Claude Code、Claude Desktop 不接入。B15 为 OpenCode 同时注册本机安全 stdio MCP,并写入关闭自带本机工具的配置;仅经 ag_* 入口的调用由服务端逐次授权、执行上报和输出检查。其他厂商未验证关闭原生工具时,其自带本机终端、文件操作不受该 MCP 管控。客户端可被员工修改的边界不等同操作系统强制隔离。
22
22
 
23
23
  启动器每次执行 Go 核心前,使用内置固定公钥验证 originless npm 清单的 RSA-3072/SHA-256 签名,再检查平台二进制与 macOS 钥匙串 helper 的大小和 SHA-256。验证失败拒绝执行,不下载替换公钥。
24
24
 
@@ -34,6 +34,7 @@ Claude Desktop 的 stdio 桥接保存当前 Node 程序与主包启动器的绝
34
34
  agentguard connect opencode # 原生模式(默认):把 OpenCode 默认模型设为 AgentGuard,之后直接运行 opencode 即可
35
35
  agentguard connect opencode --launch-only # 旧方式:不改默认模型、不落地令牌,只能经 launch 启动
36
36
  agentguard launch opencode # 仍可用,令牌只交给本次子进程
37
+ agentguard connect workbuddy # WorkBuddy:把授权模型写入 models.json、远程 MCP 写入 mcp.json(令牌字面写入,0600;disconnect/logout 精确移除)
37
38
  agentguard disconnect opencode # 恢复原默认模型,删除写入的令牌
38
39
  agentguard mcp serve
39
40
  agentguard pause
@@ -17,5 +17,8 @@ async function main() {
17
17
  }
18
18
  main().catch(error => {
19
19
  const code = /^[a-z0-9_]+$/.test(error.message) ? error.message : 'helper_operation_failed';
20
- process.stderr.write(`接入助手未完成:${code}\n`); process.exitCode = 1;
20
+ process.stderr.write(`接入助手未完成:${code}\n`);
21
+ // 平台包缺失或版本不一致,最常见的原因是国内镜像只同步了主包;npx 还会缓存这次不完整的安装。
22
+ if (code === 'npm_platform_package_missing' || code === 'npm_package_version_mismatch') process.stderr.write('本机平台包缺失或版本不一致,通常是 npm 镜像尚未同步完新版本。可改用官方仓库:npx --registry https://registry.npmjs.org/ @agentguardx/helper ;若仍报错,清理 npx 缓存(npm cache clean --force,或删除 ~/.npm/_npx 下含 @agentguardx 的目录)后重试。\n');
23
+ process.exitCode = 1;
21
24
  });
package/lib/wizard.cjs CHANGED
@@ -99,9 +99,11 @@ function supportedTools() {
99
99
  const apps = (mac, win) => process.platform === 'darwin' ? ['/Applications', path.join(home, 'Applications')].some(dir => fs.existsSync(path.join(dir, mac))) : windows && !!process.env.LOCALAPPDATA && fs.existsSync(path.join(process.env.LOCALAPPDATA, win));
100
100
  return [
101
101
  { label: 'OpenCode(模型与远程 MCP)', value: 'opencode', present: command('opencode'), install: 'npm i -g opencode-ai' },
102
+ // WorkBuddy:自定义模型写入 ~/.workbuddy/models.json、远程 MCP 写入 mcp.json(WORKBUDDY_CONFIG_DIR 可改目录)。
103
+ // 以应用包或该配置目录存在为准;Windows 安装目录按 Electron 默认位置查找,未经 Windows 实机核对。
104
+ { label: 'WorkBuddy(模型与远程 MCP)', value: 'workbuddy', present: apps('WorkBuddy.app', 'Programs/WorkBuddy/WorkBuddy.exe') || fs.existsSync(process.env.WORKBUDDY_CONFIG_DIR || path.join(home, '.workbuddy')), install: '从 WorkBuddy 官网下载安装并启动一次' },
102
105
  { label: 'OpenClaw(模型)', value: 'openclaw', present: command('openclaw'), install: '按 OpenClaw 官方说明安装' },
103
106
  { label: 'Cursor(远程 MCP)', value: 'cursor', present: command('cursor') || apps('Cursor.app', 'Programs/Cursor/Cursor.exe'), install: '从 cursor.com 下载安装' },
104
- { label: 'Claude Desktop(MCP 桥接)', value: 'claude-desktop', present: command('claude-desktop') || apps('Claude.app', 'AnthropicClaude/Claude.exe'), install: '从 claude.ai/download 下载安装' },
105
107
  { label: 'Cherry Studio(手动填写说明)', value: 'cherry-studio', present: apps('Cherry Studio.app', 'Programs/Cherry Studio/Cherry Studio.exe'), install: '从 cherry-ai.com 下载安装' },
106
108
  ];
107
109
  }
@@ -206,6 +208,7 @@ async function init(runtime, args) {
206
208
  else {
207
209
  const selected = await choose(ask, '选择要接入的已检测工具', tools, true);
208
210
  for (const tool of selected) { code = await run(runtime, [...prefix, 'connect', tool], ''); if (code) { process.exitCode = code; return; } }
211
+ if (selected.includes('workbuddy')) process.stdout.write('WorkBuddy 已写入 AgentGuard 模型与远程 MCP:请在 WorkBuddy 的模型选择里选“AgentGuard / …”,首次使用 AgentGuard 连接器时按提示点“信任”。只有选用 AgentGuard 模型的对话和该连接器的调用经过 AgentGuard,WorkBuddy 自带模型、连接器与本机工具不经过 AgentGuard,除非企业在 WorkBuddy 侧关闭。\n');
209
212
  if (selected.includes('opencode')) process.stdout.write('OpenCode 已设为默认走 AgentGuard(原默认模型已记录,断开时恢复):直接运行 opencode 即可,也可用 launch 启动。接入包含本机安全 MCP 配置,使用 ag_* 工具;实际连接与授权结果以诊断和服务端记录为准。\n');
210
213
  }
211
214
  process.stdout.write('运行实际诊断:\n'); code = await run(runtime, [...prefix, 'doctor'], ''); process.exitCode = code;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentguardx/helper",
3
- "version": "0.3.92",
3
+ "version": "0.3.95",
4
4
  "description": "AgentGuard \u5458\u5de5\u63a5\u5165\u52a9\u624b",
5
5
  "license": "UNLICENSED",
6
6
  "engines": {
@@ -19,12 +19,12 @@
19
19
  "preuninstall": "node lib/preuninstall.cjs"
20
20
  },
21
21
  "optionalDependencies": {
22
- "@agentguardx/helper-darwin-x64": "0.3.92",
23
- "@agentguardx/helper-darwin-arm64": "0.3.92",
24
- "@agentguardx/helper-linux-x64": "0.3.92",
25
- "@agentguardx/helper-linux-arm64": "0.3.92",
26
- "@agentguardx/helper-win32-x64": "0.3.92",
27
- "@agentguardx/helper-win32-arm64": "0.3.92"
22
+ "@agentguardx/helper-darwin-x64": "0.3.95",
23
+ "@agentguardx/helper-darwin-arm64": "0.3.95",
24
+ "@agentguardx/helper-linux-x64": "0.3.95",
25
+ "@agentguardx/helper-linux-arm64": "0.3.95",
26
+ "@agentguardx/helper-win32-x64": "0.3.95",
27
+ "@agentguardx/helper-win32-arm64": "0.3.95"
28
28
  },
29
29
  "publishConfig": {
30
30
  "access": "public"