zen-gitsync 2.17.46 → 2.17.49

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.
Files changed (70) hide show
  1. package/README.md +16 -2
  2. package/package.json +2 -1
  3. package/src/cli/ai/agent.js +1342 -1342
  4. package/src/cli/ai/context.js +431 -253
  5. package/src/cli/ai/context.test.js +376 -258
  6. package/src/cli/ai/mcp.js +323 -27
  7. package/src/cli/ai/mcp.test.js +202 -2
  8. package/src/cli/ai/runtime.test.js +7 -4
  9. package/src/cli/ai/turn.js +166 -166
  10. package/src/config.js +906 -871
  11. package/src/ui/public/assets/{AgentEngineSelector-D6rlSfMD.js → AgentEngineSelector-Bm_wrfGT.js} +1 -1
  12. package/src/ui/public/assets/AgentView-BwqOHAs3.js +1 -0
  13. package/src/ui/public/assets/{AgentView-h2YnbB7J.css → AgentView-uHf-KMCH.css} +1 -1
  14. package/src/ui/public/assets/{AppVersionBadge-BnPsn1X5.js → AppVersionBadge-DyhIkbbF.js} +2 -2
  15. package/src/ui/public/assets/{BranchSelector-D30GJwUl.js → BranchSelector-CDQZlH-y.js} +1 -1
  16. package/src/ui/public/assets/{CommitForm-Dvg-RUZI.js → CommitForm-DpIXE8z1.js} +1 -1
  17. package/src/ui/public/assets/{CommonDialog-BzLau2RJ.js → CommonDialog-NqZURH2F.js} +1 -1
  18. package/src/ui/public/assets/EditorView-0T5LR5Hz.css +1 -0
  19. package/src/ui/public/assets/EditorView-BC6V8V5_.js +1 -0
  20. package/src/ui/public/assets/{FlowExecutionViewer-VL-rUElj.js → FlowExecutionViewer-DxDKzmaP.js} +1 -1
  21. package/src/ui/public/assets/{FlowOrchestrationWorkspace-BPNlHRVu.js → FlowOrchestrationWorkspace-BHASB5iW.js} +1 -1
  22. package/src/ui/public/assets/{LogList-COwGjQl6.js → LogList-CdtFyrLd.js} +1 -1
  23. package/src/ui/public/assets/{MindmapView-BVuqPD_H.js → MindmapView-2tt7W7A3.js} +1 -1
  24. package/src/ui/public/assets/{MonitorView-hqe-4xd0.js → MonitorView--IW5ll8A.js} +1 -1
  25. package/src/ui/public/assets/{ProjectStartupButton-RBc-DJBR.js → ProjectStartupButton-CWKSZVGw.js} +1 -1
  26. package/src/ui/public/assets/RecentDirectoriesChat-DINPN4ju.js +1 -0
  27. package/src/ui/public/assets/RecentDirectoriesChat-THkqWEtO.css +1 -0
  28. package/src/ui/public/assets/{RemoteManagerDialog-D6Rbjchl.js → RemoteManagerDialog-BVwpcCAu.js} +1 -1
  29. package/src/ui/public/assets/{RemoteRepoCard-l0NpXgvB.js → RemoteRepoCard-Dy3AF_XZ.js} +1 -1
  30. package/src/ui/public/assets/{SourceMapView-CeVystt0.js → SourceMapView-BnHeu5wE.js} +1 -1
  31. package/src/ui/public/assets/{SvgIcon-B-xDJQA1.js → SvgIcon-DcVasCdo.js} +1 -1
  32. package/src/ui/public/assets/{UserInputNode-DJglU68l.js → UserInputNode-B313MadX.js} +1 -1
  33. package/src/ui/public/assets/WorkbenchView-0cY9WHPM.js +20 -0
  34. package/src/ui/public/assets/WorkbenchView-rscs76HF.css +1 -0
  35. package/src/ui/public/assets/_plugin-vue_export-helper-Bsx6Zj3t.js +19 -0
  36. package/src/ui/public/assets/agentConversations-BnG4a1oH.js +8 -0
  37. package/src/ui/public/assets/{configStore-CMlW8sMa.js → configStore-DQSKV2_Y.js} +1 -1
  38. package/src/ui/public/assets/{dagre-DyI0XLXY.js → dagre-BmYeUlEa.js} +3 -3
  39. package/src/ui/public/assets/{element-plus-DrCk0pcV.js → element-plus-DTtm3XCd.js} +1 -1
  40. package/src/ui/public/assets/{flow-mindmap-Cx5RNYN9.js → flow-mindmap-JxOspgwx.js} +1 -1
  41. package/src/ui/public/assets/{index-BQxIFopZ.js → index-BApctCNq.js} +9 -9
  42. package/src/ui/public/assets/{index-u9LyUFkr.css → index-BgN6Z2X9.css} +1 -1
  43. package/src/ui/public/assets/{monaco-Dfcwm1aX.js → monaco-D3R9OM26.js} +1 -1
  44. package/src/ui/public/assets/{office-docx-C0unxEAm.js → office-docx-CO7mIaWO.js} +1 -1
  45. package/src/ui/public/assets/{office-excel-DPdyr_DJ.js → office-excel-gA4KEkK4.js} +1 -1
  46. package/src/ui/public/assets/{office-pptx-eojGAs9D.js → office-pptx-CQK4l_1Q.js} +1 -1
  47. package/src/ui/public/assets/{vendor-yntih_em.js → vendor-O17eRefg.js} +222 -222
  48. package/src/ui/public/assets/vendor-U3ZXMgeO.css +1 -0
  49. package/src/ui/public/assets/{vue-flow-De8mr_Fv.js → vue-flow-BG6ZF1It.js} +1 -1
  50. package/src/ui/public/index.html +13 -13
  51. package/src/ui/server/routes/config.js +1321 -1314
  52. package/src/ui/server/routes/workbench/agentChat.js +594 -571
  53. package/src/ui/server/routes/workbench/agentChatShared.test.js +302 -233
  54. package/src/ui/server/routes/workbench/agentMarketplace.js +65 -30
  55. package/src/ui/server/routes/workbench/agentMarketplace.test.js +28 -4
  56. package/src/ui/server/routes/workbench/agentRoutes.js +631 -631
  57. package/src/ui/server/routes/workbench/liveJobs.js +4 -0
  58. package/src/ui/server/routes/workbench/liveJobs.test.js +11 -0
  59. package/src/ui/server/routes/workbench/taskRunner.js +44 -7
  60. package/src/ui/server/routes/workbench/taskRunner.thinking.test.js +115 -0
  61. package/src/ui/public/assets/AgentView-BFRGoIVb.js +0 -1
  62. package/src/ui/public/assets/EditorView-8Rb4n-Wh.css +0 -1
  63. package/src/ui/public/assets/EditorView-D4ZQutRw.js +0 -1
  64. package/src/ui/public/assets/RecentDirectoriesChat-BxbpKrXc.css +0 -1
  65. package/src/ui/public/assets/RecentDirectoriesChat-DFljcYFH.js +0 -1
  66. package/src/ui/public/assets/WorkbenchView-BSQ87CDi.css +0 -1
  67. package/src/ui/public/assets/WorkbenchView-BpH5kNht.js +0 -20
  68. package/src/ui/public/assets/_plugin-vue_export-helper-Dz1ARW9a.js +0 -19
  69. package/src/ui/public/assets/agentConversations-B8nY45V4.js +0 -7
  70. package/src/ui/public/assets/vendor-CP-WuGZG.css +0 -1
package/README.md CHANGED
@@ -444,7 +444,7 @@ A dedicated view (robot icon in the activity bar) for chatting with the built-in
444
444
  | Task plan | Multi-step work gets a visible plan: the agent calls the built-in `update_plan` tool to split the task into 3-8 verifiable steps before touching anything, then updates each step's status as it goes. Steps render as a checklist with completed / in-progress / pending states and a `2/5` progress header — in the terminal as a `✓ / ▶ / ○` list, in the Web panel as a card that **stays visible even when the tool group is collapsed** (collapsing hides other tool calls, never the current plan) |
445
445
  | Recent-projects awareness | Ask "which of my projects need a pull?" and the agent calls its built-in `list_projects` tool instead of scanning the disk: it returns exactly the list behind the GUI's **Recent projects** panel (recent directories plus any directory a task was created in, with branch / ahead / behind / uncommitted counts and task progress), so the agent's answer and the UI agree. Ahead/behind reads local refs, so the agent can pass `refresh=true` to run a `git fetch` pass first when the question is about pulling |
446
446
  | Session persistence | All conversations are saved to `~/.zen-gitsync/agent-sessions/` as JSON files; the CLI agent (`g ai`) writes to the same directory so Web and CLI sessions are unified |
447
- | Skill / MCP plaza | The **Skill plaza** and **MCP plaza** tabs list skills and MCP servers from several sources, each with its description, weekly downloads / usage count and install state. Install one into the **current project** (`<project>/.zen-gitsync/ai/skills/<id>/SKILL.md` and `<project>/.zen-gitsync/ai/mcp.json`) or into the **`g ai` agent** (`~/.zen-gitsync/ai/`, applying to every project) — zen-gitsync's own directories, not another tool's. Entries already installed can be opened in the system file manager or uninstalled from the same row, and ones that still need environment variables are flagged. The installed list shows both the skill's own `name` and the on-disk id, since a repository often ships a skill whose `SKILL.md` calls itself something else. From a terminal, `g ai` lists what is installed with `/skills` (`/mcp` is an alias) |
447
+ | Skill / MCP plaza | The **Skill plaza** and **MCP plaza** tabs list skills and MCP servers from several sources, each with its description, weekly downloads / usage count and install state. Install one into the **current project** (`<project>/.zen-gitsync/ai/skills/<id>/SKILL.md` and `<project>/.zen-gitsync/ai/mcp.json`) or into the **`g ai` agent** (`~/.zen-gitsync/ai/`, applying to every project) — zen-gitsync's own directories, not another tool's. Entries already installed can be opened in the system file manager or uninstalled from the same row, and ones that still need environment variables are flagged. The installed list shows both the skill's own `name` and the on-disk id, since a repository often ships a skill whose `SKILL.md` calls itself something else. From a terminal, `g ai` lists what is installed with `/skills` (`/mcp` is an alias). Entries land in one of two shapes: an npm package (`command: npx …`, i.e. stdio) or a remote endpoint (`type: http` + `url` + optional `headers`, which the agent's Streamable HTTP client talks to directly — no `mcp-remote` bridge in between) |
448
448
  | SSH-first cloning | When you ask it to clone a repo (or add a remote) it uses the SSH form — `git@github.com:owner/repo.git` / `git@gitee.com:owner/repo.git` — converting an `https://` URL first, so the clone never stalls on a Git Credential Manager username/password prompt; it falls back to https only when SSH genuinely fails (`Permission denied (publickey)` / host-key verification) and says which one it used. The same preference is injected into every workbench task, whose executor is an external CLI with a system prompt this app does not own |
449
449
  | Per-turn tool limit | A single message may trigger up to N tool calls in a row (default **200**, range 1–2000). Configurable in **Settings → AI models → Agent Runtime**; hitting the limit ends the turn and asks you to send another message. The same setting drives the CLI agent |
450
450
  | Preset questions | Quick-start buttons on the welcome screen for common tasks (view project structure, analyze code quality, write tests, check git status, start the project) |
@@ -541,6 +541,14 @@ where they came from. Installation itself happens in the GUI's **Skill / MCP pla
541
541
  view): pick the current project or the `g ai` agent as the target, and the entry becomes usable
542
542
  from that side.
543
543
 
544
+ `g ai` speaks both MCP transports: an entry with a `command` runs over **stdio** (a child
545
+ process), one with only a `url` over **Streamable HTTP** (`"type": "http"`, plus `headers` for
546
+ things like `Authorization`; `Mcp-Session-Id` is echoed back and the session is closed with
547
+ `DELETE` on exit). HTTPS endpoints are verified against Node's bundled root CAs rather than the
548
+ OS store, so a server that ships only its leaf certificate fails with
549
+ `UNABLE_TO_VERIFY_LEAF_SIGNATURE` while browsers are perfectly happy — start the agent with
550
+ `NODE_EXTRA_CA_CERTS=<ca file>`, or on Node ≥ 22.15 with `NODE_OPTIONS=--use-system-ca`.
551
+
544
552
  In-session commands: `/help`, `/model`, `/addmodel`, `/cd <path>`, `/image [path]`, `/think`, `/tools`, `/stats`, `/new`, `/resume`, `/skills` (`/mcp` is an alias), `/clear`, `/exit` (or `/quit`).
545
553
 
546
554
  Reasoning, tool calls and answers have separate visual sections. Reasoning returned by the model is shown in full by default;
@@ -1165,7 +1173,7 @@ Activity Bar 中的机器人图标视图,可直接在浏览器中与内置 AI
1165
1173
  | 任务计划 | 多步任务有一份看得见的计划:智能体在动手之前先调内置的 `update_plan` 工具,把任务拆成 3-8 个可核对的步骤,随后逐步更新状态。步骤以清单渲染,区分完成 / 进行中 / 待办三态,标题右侧带 `2/5` 进度 —— 终端里是 `✓ / ▶ / ○` 列表,Web 面板里是一张卡片,且**工具组折叠时仍然常驻**(折叠只藏别的工具调用,绝不藏当前计划) |
1166
1174
  | 最近项目感知 | 问「我哪些项目需要 pull」时,智能体调用内置的 `list_projects` 工具,而不是自己去扫盘:返回的就是 GUI「最近项目」面板那份清单(最近目录 + 建过任务的目录,带分支 / 领先 / 落后 / 未提交数与任务进度),回答与界面对得上。领先/落后读的是本地引用,因此问到"要不要拉"时它可以带 `refresh=true` 先联网 fetch 一轮再答 |
1167
1175
  | 会话持久化 | 所有对话保存为 JSON 文件到 `~/.zen-gitsync/agent-sessions/`;CLI 智能体(`g ai`)写入同一目录,Web 端与 CLI 端会话统一管理 |
1168
- | Skill / MCP 广场 | **Skill 广场** 与 **MCP 广场** 两个 tab 列出多个来源的 Skill 与 MCP 服务,每项带说明、周下载 / 使用次数与安装状态。可安装到**当前项目**(`<项目>/.zen-gitsync/ai/skills/<id>/SKILL.md` 与 `<项目>/.zen-gitsync/ai/mcp.json`)或 **`g ai` 智能体**(`~/.zen-gitsync/ai/`,对所有项目生效)—— 两处都是 zen-gitsync 自己的目录,不借别家工具的。已安装的可在同一行「打开文件夹」定位到落盘位置,或直接卸载,还缺环境变量的会标出「还缺环境变量」。已安装清单同时显示 skill 自报的 `name` 和实际落盘的目录 id —— 仓库名和 `SKILL.md` 里自称的名字经常不是一个。终端侧 `g ai` 用 `/skills`(`/mcp` 为别名)查看已装清单 |
1176
+ | Skill / MCP 广场 | **Skill 广场** 与 **MCP 广场** 两个 tab 列出多个来源的 Skill 与 MCP 服务,每项带说明、周下载 / 使用次数与安装状态。可安装到**当前项目**(`<项目>/.zen-gitsync/ai/skills/<id>/SKILL.md` 与 `<项目>/.zen-gitsync/ai/mcp.json`)或 **`g ai` 智能体**(`~/.zen-gitsync/ai/`,对所有项目生效)—— 两处都是 zen-gitsync 自己的目录,不借别家工具的。已安装的可在同一行「打开文件夹」定位到落盘位置,或直接卸载,还缺环境变量的会标出「还缺环境变量」。已安装清单同时显示 skill 自报的 `name` 和实际落盘的目录 id —— 仓库名和 `SKILL.md` 里自称的名字经常不是一个。终端侧 `g ai` 用 `/skills`(`/mcp` 为别名)查看已装清单。装下来的条目就两类形状:npm 包(落成 `command: npx …`,走 stdio)与远程端点(落成 `type: http` + `url` + 可选 `headers`,由 g ai 的 Streamable HTTP 客户端直连,中间不再经 `mcp-remote` 桥接) |
1169
1177
  | 克隆优先 SSH | 让它克隆仓库(或加远端)时走 SSH 形式 —— `git@github.com:owner/repo.git` / `git@gitee.com:owner/repo.git`;拿到 `https://` 地址先换算,克隆不会停在 Git Credential Manager 的账号密码弹窗上。只有 SSH 真的不可用(`Permission denied (publickey)` / 主机密钥校验失败)才退回 https,并说明这次走的是哪条。同一条偏好也会注入到每个工作台任务的 prompt —— 那里执行器是外部 CLI,系统提示词不归本应用管,环境上下文块是唯一的注入口 |
1170
1178
  | 单轮工具调用上限 | 一条消息内智能体最多连续调用多少次工具(默认 **200**,可调范围 1–2000)。在 **设置 → AI 模型配置 → 智能体运行时** 中修改;达到上限本轮会被强制结束并提示再发一条消息继续。CLI 智能体共用同一项设置 |
1171
1179
  | 预设问题 | 开场界面提供快捷按钮(查看项目结构、分析代码质量、写测试、Git 状态检查、帮我启动项目)|
@@ -1252,6 +1260,12 @@ $ g ai --model=2 # 使用第 2 个已配置的模型(序号或
1252
1260
  `/skills`(`/mcp` 为别名)列出智能体当前已安装的 Skill 与 MCP 服务及来源。安装本身在 GUI 的
1253
1261
  **Skill / MCP 广场**(智能体视图)里完成:选择安装到当前项目或 `g ai` 智能体,装好后对应一侧即可使用。
1254
1262
 
1263
+ `g ai` 两种 MCP 传输都支持:有 `command` 的走 **stdio**(起子进程),只有 `url` 的走
1264
+ **Streamable HTTP**(配置写 `"type": "http"`,鉴权放 `headers`,例如 `Authorization`;
1265
+ 响应里的 `Mcp-Session-Id` 会回传,退出时 `DELETE` 结束会话)。HTTPS 端点按 **Node 内置根证书**
1266
+ 校验、不读系统证书库 —— 站点只发叶证书时会报 `UNABLE_TO_VERIFY_LEAF_SIGNATURE`(浏览器却一切正常),
1267
+ 启动前设 `NODE_EXTRA_CA_CERTS=<CA 文件>`,或 Node ≥ 22.15 时用 `NODE_OPTIONS=--use-system-ca` 即可。
1268
+
1255
1269
  会话内命令:`/help`、`/model`、`/addmodel`、`/cd <路径>`、`/image [路径]`、`/think`、`/tools`、`/stats`、`/new`、`/resume`、`/skills`(`/mcp` 为别名)、`/clear`、`/exit`(或 `/quit`)。
1256
1270
 
1257
1271
  思考、工具调用和回答分区展示。默认完整显示模型返回的思考,`/think full` 恢复完整显示,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zen-gitsync",
3
- "version": "2.17.46",
3
+ "version": "2.17.49",
4
4
  "description": "Auto commit, scheduled sync, and visual GUI for Git. Run `g` in any repo for one-key commit & push, AI commit messages, scheduled background sync, and a drag-and-drop workflow builder.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -77,6 +77,7 @@
77
77
  "verify:wb-responsive": "node scripts/verify-wb-responsive.cjs",
78
78
  "verify:wb-editor-persist": "node scripts/verify-workbench-editor-persist.cjs",
79
79
  "verify:wb-open-scroll-bottom": "node scripts/verify-workbench-open-scroll-bottom.cjs",
80
+ "verify:chat-rail": "node scripts/verify-chat-message-rail.cjs",
80
81
  "verify:editor-preview-scroll": "node scripts/verify-editor-preview-scroll.cjs",
81
82
  "verify:editor-sidebar-width": "node scripts/verify-editor-sidebar-width.cjs",
82
83
  "verify:editor-disk-sync": "node scripts/verify-editor-disk-sync.cjs",