diff --git a/assets/ai-pair/icon.png b/assets/ai-pair/icon.png new file mode 100644 index 00000000..379a4c62 Binary files /dev/null and b/assets/ai-pair/icon.png differ diff --git a/assets/icon-sources.json b/assets/icon-sources.json index e0827369..63cfa1a5 100644 --- a/assets/icon-sources.json +++ b/assets/icon-sources.json @@ -2582,5 +2582,13 @@ "source": "original artwork for the rfauto plugin, generated by devtests/make_rfauto_icon.py from a geometric description of an |S11| resonance dip on a VNA graticule (no third-party material); released with the plugin under GPL-3.0-only", "mimeType": "image/png", "sha256": "a8095016915887061ae5191c98a5396f8b9d09fd422868f6c4ffed7436351485" + }, + { + "name": "ai-pair", + "icon": "ai-pair/icon.png", + "source": "original design; vector source at ui-plugins/ai-pair/icon.svg", + "matchedBy": "original-design", + "mimeType": "image/png", + "sha256": "dc62e7f44052dd35fda86845aee73cef390882c8392f9a9c3a92e83884d35cb2" } ] diff --git a/external_plugins/ai-pair/.zcode-plugin/plugin.json b/external_plugins/ai-pair/.zcode-plugin/plugin.json new file mode 100644 index 00000000..839d9bee --- /dev/null +++ b/external_plugins/ai-pair/.zcode-plugin/plugin.json @@ -0,0 +1,42 @@ +{ + "name": "ai-pair", + "version": "0.4.8", + "description": "AI Pair 评审:主对话改完代码后,一键送两个异构模型(复用 ZCode 模型管理里的渠道)并行评审,侧栏面板查看报告。", + "skills": "skills", + "author": { + "name": "JustinChia" + }, + "license": "MIT", + "mcpServers": { + "ai-pair": { + "type": "stdio", + "command": "node", + "args": [ + "${ZCODE_PLUGIN_ROOT}/dist/server.mjs" + ], + "env": { + "ZCODE_PLUGIN_DATA": "${ZCODE_PLUGIN_DATA}", + "ZCODE_PROJECT_DIR": "${ZCODE_PROJECT_DIR}" + } + } + }, + "ui": { + "surfaces": [ + { + "id": "reviews", + "title": { + "zh-CN": "AI Pair 评审", + "en-US": "AI Pair Review" + }, + "icon": "activity", + "server": "ai-pair", + "resourceUri": "ui://ai-pair/panel.html", + "availability": "session" + } + ] + }, + "description_i18n": { + "en": "Send completed work to two heterogeneous reviewers (reusing ZCode model channels) for parallel review; read reports in the side pane.", + "zh-CN": "AI Pair 评审:主对话改完代码后,一键送两个异构模型(复用 ZCode 模型管理里的渠道)并行评审,侧栏面板查看报告。" + } +} diff --git a/external_plugins/ai-pair/LICENSE b/external_plugins/ai-pair/LICENSE new file mode 100644 index 00000000..100c3c4e --- /dev/null +++ b/external_plugins/ai-pair/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2026 JustinChia +Copyright (c) 2026 Axton Liu (original ai-pair skill, https://github.com/axtonliu/ai-pair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/external_plugins/ai-pair/README.md b/external_plugins/ai-pair/README.md new file mode 100644 index 00000000..5bcff99e --- /dev/null +++ b/external_plugins/ai-pair/README.md @@ -0,0 +1,49 @@ +# ai-pair + +AI Pair 评审:主对话完成代码/内容创作后,把成果送 **两个异构模型** 并行评审,在会话侧栏面板查看分级报告。模型渠道完全复用 ZCode「管理模型」里已配置的渠道,插件里**不需要单独填 API Key**。 + +## 用法(对话里) + +- "改完了,送 ai-pair 评审" / "让两个模型评一下刚才的改动" +- Agent 会调用 `request_review` 工具(传 diff 或文件列表),评审后台运行,侧栏「AI Pair 评审」面板自动刷新 +- `get_review` 取完整报告;`list_reviews` 列历史;`list_models` 列渠道与实测连通性 + +## 配置(推荐:面板级联选择) + +侧栏「AI Pair 评审」面板 → **⚙ 设置**:两个评审位各自 **渠道下拉 → 模型下拉 → 保存**, +渠道与模型来自 ZCode「管理模型」的已有配置,密钥自动复用、无需手填,保存立即生效。 + +也可在对话里让 AI 跑 `configure_reviewers` 工具(如"评审模型 1 用 Kimi 的 k3.1-pro")。 + +### 评审员角色定义 + +两个评审槽位是**固定分工**(借鉴原版 ai-pair 的具名评审员模式),角色由插件注入每次评审的提示词,不随所选渠道变化: + +| 评审位 | 角色 | 代码评审重点(focus=dev) | 内容评审重点(focus=content) | +| --- | --- | --- | --- | +| 评审模型 1 | **正确性把关** | bug、安全漏洞、并发问题、性能、边界条件、错误处理 | 逻辑严密性、事实准确性、无依据的论断、内部矛盾、缺少引用 | +| 评审模型 2 | **设计与可维护性** | 架构与模块边界、设计模式、可读性与可维护性、命名、未来隐患 | 可读性、结构与行文节奏、语气与风格一致性、受众契合度、标题与开头 | + +评审模型 2 建议选**不同厂商**的渠道——两个模型加两个视角,异构评审的价值才在; +结论冲突时插件不做仲裁,并列呈现交由用户裁决。 + +支持的渠道协议:OpenAI chat/completions 与 Anthropic messages(自动识别)。 +需要新渠道时直接在 ZCode「管理模型」里添加,插件面板重开即能看到。 + +> 隐私说明:提交评审的 diff 与文件全文会发送到**你自己配置的模型渠道**(由所选渠道的厂商处理), +> 评审记录仅保存在本机插件数据目录;API Key 只在插件服务端内存中使用,不落盘、不下发面板。 + +## OpenCode Go 渠道注意 + +- Go 网关要求 `x-opencode-session` 会话头与自定义 User-Agent —— 插件对 `opencode.ai` 域名自动处理 +- OpenCode 隐私设置默认屏蔽部分模型(如 DeepSeek 系),需在 OpenCode Settings › Privacy 开启 + +评审数据存放在插件持久目录(按工作区隔离)。 + +## 作者与致谢 + +- 作者:**JustinChia** +- 本插件改编自 [axtonliu/ai-pair](https://github.com/axtonliu/ai-pair)(MIT License, Copyright (c) 2026 Axton Liu), + 衷心感谢原作者 Axton Liu 提出的「一个创作、两个审查」异构评审思路与原版 Claude Code Skill 的提示词设计。 +- 本插件在其思路基础上重写为 ZCode UI 插件:评审由插件服务端直连模型渠道执行、 + 侧栏面板查看报告、评审模型复用 ZCode「管理模型」的渠道配置。协议同为 MIT。 diff --git a/external_plugins/ai-pair/README_CN.md b/external_plugins/ai-pair/README_CN.md new file mode 100644 index 00000000..5bcff99e --- /dev/null +++ b/external_plugins/ai-pair/README_CN.md @@ -0,0 +1,49 @@ +# ai-pair + +AI Pair 评审:主对话完成代码/内容创作后,把成果送 **两个异构模型** 并行评审,在会话侧栏面板查看分级报告。模型渠道完全复用 ZCode「管理模型」里已配置的渠道,插件里**不需要单独填 API Key**。 + +## 用法(对话里) + +- "改完了,送 ai-pair 评审" / "让两个模型评一下刚才的改动" +- Agent 会调用 `request_review` 工具(传 diff 或文件列表),评审后台运行,侧栏「AI Pair 评审」面板自动刷新 +- `get_review` 取完整报告;`list_reviews` 列历史;`list_models` 列渠道与实测连通性 + +## 配置(推荐:面板级联选择) + +侧栏「AI Pair 评审」面板 → **⚙ 设置**:两个评审位各自 **渠道下拉 → 模型下拉 → 保存**, +渠道与模型来自 ZCode「管理模型」的已有配置,密钥自动复用、无需手填,保存立即生效。 + +也可在对话里让 AI 跑 `configure_reviewers` 工具(如"评审模型 1 用 Kimi 的 k3.1-pro")。 + +### 评审员角色定义 + +两个评审槽位是**固定分工**(借鉴原版 ai-pair 的具名评审员模式),角色由插件注入每次评审的提示词,不随所选渠道变化: + +| 评审位 | 角色 | 代码评审重点(focus=dev) | 内容评审重点(focus=content) | +| --- | --- | --- | --- | +| 评审模型 1 | **正确性把关** | bug、安全漏洞、并发问题、性能、边界条件、错误处理 | 逻辑严密性、事实准确性、无依据的论断、内部矛盾、缺少引用 | +| 评审模型 2 | **设计与可维护性** | 架构与模块边界、设计模式、可读性与可维护性、命名、未来隐患 | 可读性、结构与行文节奏、语气与风格一致性、受众契合度、标题与开头 | + +评审模型 2 建议选**不同厂商**的渠道——两个模型加两个视角,异构评审的价值才在; +结论冲突时插件不做仲裁,并列呈现交由用户裁决。 + +支持的渠道协议:OpenAI chat/completions 与 Anthropic messages(自动识别)。 +需要新渠道时直接在 ZCode「管理模型」里添加,插件面板重开即能看到。 + +> 隐私说明:提交评审的 diff 与文件全文会发送到**你自己配置的模型渠道**(由所选渠道的厂商处理), +> 评审记录仅保存在本机插件数据目录;API Key 只在插件服务端内存中使用,不落盘、不下发面板。 + +## OpenCode Go 渠道注意 + +- Go 网关要求 `x-opencode-session` 会话头与自定义 User-Agent —— 插件对 `opencode.ai` 域名自动处理 +- OpenCode 隐私设置默认屏蔽部分模型(如 DeepSeek 系),需在 OpenCode Settings › Privacy 开启 + +评审数据存放在插件持久目录(按工作区隔离)。 + +## 作者与致谢 + +- 作者:**JustinChia** +- 本插件改编自 [axtonliu/ai-pair](https://github.com/axtonliu/ai-pair)(MIT License, Copyright (c) 2026 Axton Liu), + 衷心感谢原作者 Axton Liu 提出的「一个创作、两个审查」异构评审思路与原版 Claude Code Skill 的提示词设计。 +- 本插件在其思路基础上重写为 ZCode UI 插件:评审由插件服务端直连模型渠道执行、 + 侧栏面板查看报告、评审模型复用 ZCode「管理模型」的渠道配置。协议同为 MIT。 diff --git a/external_plugins/ai-pair/skills/ai-pair/SKILL.md b/external_plugins/ai-pair/skills/ai-pair/SKILL.md new file mode 100644 index 00000000..aeb040e5 --- /dev/null +++ b/external_plugins/ai-pair/skills/ai-pair/SKILL.md @@ -0,0 +1,74 @@ +--- +name: ai-pair +description: | + AI Pair 评审工作流。主对话完成代码修改或内容创作后,把成果送给两个异构模型 + (评审模型 1 / 评审模型 2,复用 ZCode 模型管理里的渠道)并行评审, + 报告在「AI Pair 评审」侧栏面板展示。 + + Trigger: ai-pair, 送评审, 双模型评审, request_review, 打开评审面板 +metadata: + version: 0.4.8 + note: 本 skill 由 ai-pair UI 插件自带;评审由插件 MCP server 执行,不消耗对话上下文 +--- + +# AI Pair 评审工作流 + +你(主对话 agent)负责把待评审材料提交给 ai-pair 插件,并如实转达评审结果。评审本身 +由插件的 MCP server 调用用户在 ZCode 里配置的两个模型渠道完成——你**不需要也不能** +自己扮演评审员。 + +## 工具清单 + +- `request_review`:提交评审(见下) +- `get_review {id}`:取回完整报告 +- `list_reviews`:列历史评审 +- `delete_review {id}` 或 `{all:true}`:删除单条/清空评审记录(用户说"删掉这条评审/清空评审记录"时调用;进行中的任务不可删) +- `open_panel`:打开「AI Pair 评审」侧栏面板。用户说"打开评审面板""打开 AI Pair"时立即调用 +- `list_models`:列出 ZCode 全部渠道与模型,并实测两个评审位的连通性 +- `configure_reviewers {reviewer1:{channel,model}, reviewer2:{channel,model}, cross}`: + 级联选择评审位的渠道+模型,立即生效。用户说"评审模型 1 用 Kimi 的 k3.1-pro"这类话时调用。 + channel 填渠道名或 ID;某槽位不传表示清除该位选择。**绝不未经用户确认就自动选渠道。** + +## 何时使用 + +- 用户说"送 ai-pair 评审"、"让两个模型看看"、"双模型评审一下" +- 用户要求质量把关:重构、安全相关改动、发布前检查、重要文章定稿前 + +## 流程 + +1. **提交评审**:调用 `request_review` 工具: + - `title`:一句话说明改了什么 + - `focus`:代码改动用 `dev`,文章/文案用 `content` + - `diff`:本次改动的 diff(优先;可用 git diff 生成) + - `files`:或提供工作区内相对路径列表(服务端读取全文) + - `notes`:给评审员的背景与关注点(可选但建议提供) + - `cross`:交叉质证轮开关。用户说"要交叉质证/互相复核"时传 true,"不用质证"传 false; + 不传则按面板设置里的默认值。开启后渠道 token 约翻倍,需先告知用户 + - 默认立即返回任务 id,评审后台运行(通常 1-3 分钟;启用质证约 3-6 分钟) +2. **等待与取回**: + - 用户可打开侧栏「AI Pair 评审」面板实时查看 + - 完成后调用 `get_review(id)` 取回完整报告,向用户总结: + 两份报告的共识问题、各自独有的发现、冲突之处(如实并列,交用户裁决); + 若有交叉质证轮,优先转述 [WRONG]/[MISS] 项——那是最可能有价值的发现 + - 评审未完成时不要轮询刷屏;告知用户面板会自动刷新,或稍后再取 +3. **后续**:用户决定是否按 CRITICAL → WARNING → SUGGESTION 的顺序修改; + 修改后可再次提交评审形成新的一轮 + +## 配置与排障 + +- `list_models`:列出 ZCode 全部渠道与模型,并实测两个槽位的连通性。 + 为评审位选渠道/模型前先跑它,把渠道名/模型 ID 照抄给用户。 +- 某个槽位评审失败时如实告知原因(常见:未选渠道、模型 ID 不在渠道里、渠道鉴权失败), + 不要自己补写"评审意见"。 + +## 规则 + +- 两位评审员是固定分工(角色由插件注入提示词,不随渠道变化): + 评审模型 1 · **正确性把关**(代码偏 bug/安全/边界,内容偏事实与逻辑), + 评审模型 2 · **设计与可维护性**(代码偏架构/可读性,内容偏结构/风格/受众); + 结论冲突时不要替用户做决定,并列呈现 +- CRITICAL 项建议优先处理,但处理与否由用户决定 + +--- + +> 改编自 [axtonliu/ai-pair](https://github.com/axtonliu/ai-pair)(MIT, © 2026 Axton Liu),感谢原作者的异构评审思路与提示词设计。 diff --git a/marketplace.json b/marketplace.json index c1a9a6ee..3ee118a9 100644 --- a/marketplace.json +++ b/marketplace.json @@ -10,7 +10,10 @@ "url": "https://z.ai" }, "unlistedPlugins": [ - { "name": "openpencil", "source": "./external_plugins/openpencil" } + { + "name": "openpencil", + "source": "./external_plugins/openpencil" + } ], "plugins": [ { @@ -827,7 +830,9 @@ }, { "name": "excalidraw", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "Excalidraw", "displayName_i18n": { "en": "Excalidraw", @@ -850,7 +855,9 @@ "name": "photocraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/photocraft/icon.png", "source": "./external_plugins/photocraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "PhotoCraft", "displayName_i18n": { "en": "PhotoCraft", @@ -877,7 +884,9 @@ "name": "vectorcraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/vectorcraft/icon.png", "source": "./external_plugins/vectorcraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "VectorCraft", "displayName_i18n": { "en": "VectorCraft", @@ -904,7 +913,9 @@ "name": "pdfcraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/pdfcraft/icon.png", "source": "./external_plugins/pdfcraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "PdfCraft", "displayName_i18n": { "en": "PdfCraft", @@ -931,7 +942,9 @@ "name": "designcraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/designcraft/icon.png", "source": "./external_plugins/designcraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "DesignCraft", "displayName_i18n": { "en": "DesignCraft", @@ -958,7 +971,9 @@ "name": "wordcraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/wordcraft/icon.png", "source": "./external_plugins/wordcraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "WordCraft", "displayName_i18n": { "en": "WordCraft", @@ -985,7 +1000,9 @@ "name": "gridcraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/gridcraft/icon.png", "source": "./external_plugins/gridcraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "GridCraft", "displayName_i18n": { "en": "GridCraft", @@ -1012,7 +1029,9 @@ "name": "deckcraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/deckcraft/icon.png", "source": "./external_plugins/deckcraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "DeckCraft", "displayName_i18n": { "en": "DeckCraft", @@ -1039,7 +1058,9 @@ "name": "cadcraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/cadcraft/icon.png", "source": "./external_plugins/cadcraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "CADCraft", "displayName_i18n": { "en": "CADCraft", @@ -1066,7 +1087,9 @@ "name": "soundcraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/soundcraft/icon.png", "source": "./external_plugins/soundcraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "SoundCraft", "displayName_i18n": { "en": "SoundCraft", @@ -1149,7 +1172,9 @@ }, "category": "developer-tools", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/kicad/icon.png", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "KiCad", "displayName_i18n": { "en": "KiCad", @@ -1531,6 +1556,33 @@ "repository": "https://github.com/geer1895/rfauto", "license": "GPL-3.0-only", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/rfauto/icon.png" + }, + { + "name": "ai-pair", + "displayName": "AI Pair", + "displayName_i18n": { + "en": "AI Pair", + "zh-CN": "AI Pair 评审" + }, + "version": "0.4.8", + "source": "./external_plugins/ai-pair", + "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/ai-pair/icon.png", + "description": "AI Pair 评审:主对话改完代码后,一键送两个异构模型(复用 ZCode 模型管理里的渠道)并行评审,侧栏面板查看报告。", + "description_i18n": { + "en": "Send completed work to two heterogeneous reviewers (reusing ZCode model channels) for parallel review; read reports in the side pane.", + "zh-CN": "AI Pair 评审:主对话改完代码后,一键送两个异构模型(复用 ZCode 模型管理里的渠道)并行评审,侧栏面板查看报告。" + }, + "category": "developer-tools", + "keywords": [ + "code-review", + "dual-model", + "cross-review", + "quality", + "mcp" + ], + "author": { + "name": "JustinChia" + } } ] -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 14b35f76..90a07001 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -37,11 +37,24 @@ importers: version: 6.0.2 vitest: specifier: 4.1.4 - version: 4.1.4(@opentelemetry/api@1.9.1)(@types/node@25.5.0)(msw@2.13.3(@types/node@25.5.0)(typescript@6.0.2))(vite@8.3.1(@types/node@25.5.0)(esbuild@0.25.12)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.9.0)) + version: 4.1.4(@opentelemetry/api@1.9.1)(@types/node@25.5.0)(jsdom@31.0.1)(msw@2.13.3(@types/node@25.5.0)(typescript@6.0.2))(vite@8.3.1(@types/node@25.5.0)(esbuild@0.25.12)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.9.0)) zod: specifier: 4.6.5 version: 4.6.5 + ui-plugins/ai-pair: + dependencies: + dompurify: + specifier: ^3.4.18 + version: 3.4.18 + marked: + specifier: ^18.2.1 + version: 18.2.1 + devDependencies: + jsdom: + specifier: ^31.0.1 + version: 31.0.1 + ui-plugins/cadcraft: {} ui-plugins/craft-runtime: {} @@ -745,6 +758,15 @@ packages: resolution: {integrity: sha512-nULYsQxkWHnbmHvcs+efMkJ4/9TtvNyFeLyHdeGxW0zHs6P+jYVqcRff9A6Vq9w9JXeDRnRh2VKvTtS19GW2qA==} engines: {node: '>=10'} + '@exodus/bytes@1.16.0': + resolution: {integrity: sha512-IcpW84uEn3N7ETtNZMlxKhfl6Pec8rUNGOTBtWbK1FKhJxIFAptZyVrvVRVBimAJxJCgc3PxepxkdWWG4DVzfA==} + engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} + peerDependencies: + '@noble/hashes': ^1.8.0 || ^2.0.0 + peerDependenciesMeta: + '@noble/hashes': + optional: true + '@floating-ui/core@1.7.5': resolution: {integrity: sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ==} @@ -2030,6 +2052,12 @@ packages: resolution: {integrity: sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==} engines: {node: '>= 0.6.0'} + bcp-47-match@2.0.3: + resolution: {integrity: sha512-JtTezzbAibu8G0R9op9zb3vcWZd9JF6M0xOYGPn0fNCd7wOpRB1mU2mH9T8gaBGbAAyIIVgB2G7xG0GP98zMAQ==} + + bcp-47@2.1.2: + resolution: {integrity: sha512-wsv86UuNFuPnVieKLyECTT+CP1WSAHeoIg5P3xu2kA9Z+7fVPoKt7dxzSeEhtJel0AI+NW3fIW3KtTKQKUCngg==} + binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} @@ -2369,6 +2397,10 @@ packages: dagre-d3-es@7.0.14: resolution: {integrity: sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg==} + data-urls@8.0.0: + resolution: {integrity: sha512-JQUCCK+/CAGbGGx618PlFZMXH81Jtj7t73CHv9dd/zVWvxgGT2zLFRjnKb+Ng46GIwcy+f7f88qd4duqllK+WQ==} + engines: {node: ^22.14.0 || >=24.0.0} + dayjs@1.11.20: resolution: {integrity: sha512-YbwwqR/uYpeoP4pu043q+LTDLFBLApUP6VxRihdfNTqu4ubqMlGDLd6ErXhEgsyvY0K6nCs7nggYumAN+9uEuQ==} @@ -2381,6 +2413,9 @@ packages: supports-color: optional: true + decimal.js@10.6.0: + resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} + defu@6.1.7: resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==} @@ -2408,6 +2443,9 @@ packages: dompurify@3.3.3: resolution: {integrity: sha512-Oj6pzI2+RqBfFG+qOaOLbFXLQ90ARpcGG6UePL82bJLtdsa6CYJD7nmiU8MW9nQNOtCHV3lZ/Bzq1X0QYbBZCA==} + dompurify@3.4.18: + resolution: {integrity: sha512-ofe3wI/uNm68HInABYFJYqQxRw1EaKAjNdrFVKqjUY+UZurvNd2L/HuQe097s/4RivWiZyP6tT7aoT8atjfhwg==} + dunder-proto@1.0.1: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} @@ -2426,6 +2464,10 @@ packages: resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==} engines: {node: '>=0.12'} + entities@9.0.0: + resolution: {integrity: sha512-oJFNDJg3kTPwAD1cNn2+WmUq4wFoo09npc3Ydf1D7ED4smRiWrsKnaLxykrTWgyGEcusc87P5dxlAleol9kpkg==} + engines: {node: '>=20.19.0'} + es-define-property@1.0.1: resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} engines: {node: '>= 0.4'} @@ -2618,6 +2660,10 @@ packages: resolution: {integrity: sha512-p1JfQMKaceuCbpJKAPKVqyqviZdS0eUxH9v82oWo1kb9xjQ5wA6iP3FNVAPDFlz5/p7d45lO+BpSk1tuSZMF4Q==} engines: {node: '>=16.9.0'} + html-encoding-sniffer@7.0.0: + resolution: {integrity: sha512-UikN5yr7xsCDAq87Or5or0PAlD3HJJOKVzM05az588WnpDJ4Ux7a2A53Qi6gofGg2/EtvF/H4hCi/TXfCW4Y6w==} + engines: {node: ^22.13.0 || >=24.0.0} + html2canvas@1.4.1: resolution: {integrity: sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==} engines: {node: '>=8.0.0'} @@ -2675,10 +2721,19 @@ packages: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} + is-alphabetical@2.0.1: + resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} + + is-alphanumerical@2.0.1: + resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==} + is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} + is-decimal@2.0.1: + resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} + is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -2698,6 +2753,9 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + is-potential-custom-element-name@1.0.1: + resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} + is-promise@4.0.0: resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} @@ -2738,6 +2796,15 @@ packages: js-base64@3.9.4: resolution: {integrity: sha512-PtOMXpEGuP0RRiRXsjzHzl44dMHxSu2CPvAhinupR1tBa88me+1DPqsobl7eupn5UukjLkln1ZnAOAOXOrYG0Q==} + jsdom@31.0.1: + resolution: {integrity: sha512-CbhJL8ZQg3eKswxSZth4QO9tW0jPIhmR0vtSXQSbKSfWbwIT6hoRc17wdHIVTQ43KI0mdV5iTJr3281IDgVZ5g==} + engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0} + peerDependencies: + '@napi-rs/canvas': ^1.0.13 + peerDependenciesMeta: + '@napi-rs/canvas': + optional: true + json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} @@ -2867,6 +2934,10 @@ packages: lodash.throttle@4.1.1: resolution: {integrity: sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==} + lru-cache@11.5.3: + resolution: {integrity: sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==} + engines: {node: 20 || >=22} + magic-string@0.30.21: resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} @@ -2880,6 +2951,11 @@ packages: engines: {node: '>= 20'} hasBin: true + marked@18.2.1: + resolution: {integrity: sha512-ii4bxCTCqqwpT86XZWgJNs+ZnAIZksmLGYMViWA7PDIXYIeNo1x6cDdX3JOip9NM/cI6p8z57FxliACboTruMA==} + engines: {node: '>= 20'} + hasBin: true + math-intrinsics@1.1.0: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} @@ -3028,6 +3104,12 @@ packages: pako@2.2.0: resolution: {integrity: sha512-zJq6RP/5q+TO2OpFV3FHzlPnFjmkb7Nc99a5SNjJE+uu/PkpChs+NIZSSzbBoD+6kjiISXjfYdwj1ZRQ81dz/w==} + parse5-parser-stream@8.1.1: + resolution: {integrity: sha512-hMcVbbUJcQmP8rURWUdYrT1flRiBiBVjq/RYGguJpDUgIXSqdYKlE0CxthmdMWoSlBAuL5bUBa73g0pttSy7Hw==} + + parse5@8.1.1: + resolution: {integrity: sha512-EcR/6WDcU7b2N3vQSxKALCk9lXGtUMQxXio008OEMBE0kavu/7JLfBEeFPzi43nMqVDSbEn3QCK+BMCc9zO//w==} + parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} @@ -3127,6 +3209,10 @@ packages: prsc@4.0.0: resolution: {integrity: sha512-OmXQ2v76RlXNx/gqv7+oB6jyKnudJ/rsMfAIVexhbDFxXAJPoWKMxJkZU2ohlu4miCiSQCG+horf2DV4/kNc1Q==} + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + pwacompat@2.0.17: resolution: {integrity: sha512-6Du7IZdIy7cHiv7AhtDy4X2QRM8IAD5DII69mt5qWibC2d15ZU8DmBG1WdZKekG11cChSu4zkSUGPF9sweOl6w==} @@ -3255,6 +3341,10 @@ packages: engines: {node: '>=12.0.0'} hasBin: true + saxes@6.0.0: + resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} + engines: {node: '>=v12.22.7'} + scheduler@0.27.0: resolution: {integrity: sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==} @@ -3426,6 +3516,14 @@ packages: resolution: {integrity: sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==} engines: {node: '>=16'} + tough-cookie@6.1.0: + resolution: {integrity: sha512-FTxc8u8Kl2tz0Lat1u8ksvcy8bwHRyEMawwTWybo51JqaC6O7SvfuhAKg+Ld6VqyIe2QRJBzY9HA7y2WyFRT2w==} + engines: {node: '>=16'} + + tr46@7.0.0: + resolution: {integrity: sha512-BcDSDW+SIGWVOns1Zm6Yg91q9AEj7eaID0QDY9oIqJD1A8dscNwMcl9Sms2DeuWCNov1X0/oXanHGYQBSLwZsg==} + engines: {node: ^22.14.0 || >=24.0.0} + ts-dedent@2.2.0: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} engines: {node: '>=6.10'} @@ -3473,6 +3571,10 @@ packages: resolution: {integrity: sha512-/y4/bH9YNU5hi9NIrpOuvGXFcxrj3CMrV+/AYpowAYTpHn8gX/XPFjNy766FPoYY0miQhdW977JFWKGNhBdwyQ==} engines: {node: '>=22.19.0'} + undici@8.12.4: + resolution: {integrity: sha512-8Mx+uNKKER2bA4AdtedkqRbwUCIJFr2nJckXRe5yrDqzePqwLP7VNcctN8/XdmDSbF7mS+jJKIszlL+vbam1VA==} + engines: {node: '>=22.19.0'} + unifont@0.7.5: resolution: {integrity: sha512-ULe/Cs+ZIsq+dcFofNkhqielCrUJnb5mr+Yc4EBM2VlL+6OZR6+cjtI2mT1bJvRBrVncqHAbLURxmPLcCXzWMg==} @@ -3651,9 +3753,25 @@ packages: w3c-keyname@2.2.8: resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==} + w3c-xmlserializer@6.0.0: + resolution: {integrity: sha512-4Nsy8K5Tr6SPDH9jhKJOHf7ChDrc1zufZTVSF7x72hwuEXBqxqk9G6cK+K2NRUtB3iELRJqjXb4JPDMBjMTl2Q==} + engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0} + + webidl-conversions@8.0.1: + resolution: {integrity: sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==} + engines: {node: '>=20'} + webworkify@1.5.0: resolution: {integrity: sha512-AMcUeyXAhbACL8S2hqqdqOLqvJ8ylmIbNwUIqQujRSouf4+eUFaXbG6F1Rbu+srlJMmxQWsiU7mOJi0nMBfM1g==} + whatwg-mimetype@5.0.0: + resolution: {integrity: sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw==} + engines: {node: '>=20'} + + whatwg-url@17.3.0: + resolution: {integrity: sha512-KwOAJrpf+GTgBvcBQJcP38sMF0DsQKdwtG+TxM2pW44P6E5k0hDbWrDmyuJDIF0Uef0aQq0ZoJs+5oI+k8ddhg==} + engines: {node: ^22.14.0 || >=24.0.0} + which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -3690,6 +3808,13 @@ packages: utf-8-validate: optional: true + xml-name-validator@5.0.0: + resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} + engines: {node: '>=18'} + + xmlchars@2.2.0: + resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + xspattern@3.1.0: resolution: {integrity: sha512-rxtOX8ORJizRqswIdZ72G3thKrHd0Q+TvyUCMByc5VdjDz1nkuZKfPXM3xGdrGi0fwEy+DDJN7DqtAZ06Re4bA==} @@ -4105,6 +4230,8 @@ snapshots: '@excalidraw/random-username@1.1.0': {} + '@exodus/bytes@1.16.0': {} + '@floating-ui/core@1.7.5': dependencies: '@floating-ui/utils': 0.2.11 @@ -5297,6 +5424,14 @@ snapshots: base64-arraybuffer@1.0.2: optional: true + bcp-47-match@2.0.3: {} + + bcp-47@2.1.2: + dependencies: + is-alphabetical: 2.0.1 + is-alphanumerical: 2.0.1 + is-decimal: 2.0.1 + binary-extensions@2.3.0: {} bind-event-listener@3.0.0: {} @@ -5682,12 +5817,21 @@ snapshots: d3: 7.9.0 lodash-es: 4.18.1 + data-urls@8.0.0: + dependencies: + whatwg-mimetype: 5.0.0 + whatwg-url: 17.3.0 + transitivePeerDependencies: + - '@noble/hashes' + dayjs@1.11.20: {} debug@4.4.3: dependencies: ms: 2.1.3 + decimal.js@10.6.0: {} + defu@6.1.7: {} delaunator@5.1.0: @@ -5708,6 +5852,10 @@ snapshots: optionalDependencies: '@types/trusted-types': 2.0.7 + dompurify@3.4.18: + optionalDependencies: + '@types/trusted-types': 2.0.7 + dunder-proto@1.0.1: dependencies: call-bind-apply-helpers: 1.0.2 @@ -5723,6 +5871,8 @@ snapshots: entities@7.0.1: {} + entities@9.0.0: {} + es-define-property@1.0.1: {} es-errors@1.3.0: {} @@ -5968,6 +6118,12 @@ snapshots: hono@4.12.12: {} + html-encoding-sniffer@7.0.0: + dependencies: + '@exodus/bytes': 1.16.0 + transitivePeerDependencies: + - '@noble/hashes' + html2canvas@1.4.1: dependencies: css-line-break: 2.1.0 @@ -6019,10 +6175,19 @@ snapshots: ipaddr.js@1.9.1: {} + is-alphabetical@2.0.1: {} + + is-alphanumerical@2.0.1: + dependencies: + is-alphabetical: 2.0.1 + is-decimal: 2.0.1 + is-binary-path@2.1.0: dependencies: binary-extensions: 2.3.0 + is-decimal@2.0.1: {} + is-extglob@2.1.1: {} is-fullwidth-code-point@3.0.0: @@ -6037,6 +6202,8 @@ snapshots: is-number@7.0.0: {} + is-potential-custom-element-name@1.0.1: {} + is-promise@4.0.0: {} isarray@1.0.0: {} @@ -6062,6 +6229,29 @@ snapshots: js-base64@3.9.4: {} + jsdom@31.0.1: + dependencies: + '@exodus/bytes': 1.16.0 + bcp-47: 2.1.2 + bcp-47-match: 2.0.3 + data-urls: 8.0.0 + decimal.js: 10.6.0 + html-encoding-sniffer: 7.0.0 + is-potential-custom-element-name: 1.0.1 + lru-cache: 11.5.3 + parse5: 8.1.1 + parse5-parser-stream: 8.1.1 + saxes: 6.0.0 + tough-cookie: 6.1.0 + undici: 8.12.4 + w3c-xmlserializer: 6.0.0 + webidl-conversions: 8.0.1 + whatwg-mimetype: 5.0.0 + whatwg-url: 17.3.0 + xml-name-validator: 5.0.0 + transitivePeerDependencies: + - '@noble/hashes' + json-schema-traverse@1.0.0: {} json-schema-typed@8.0.2: {} @@ -6074,7 +6264,7 @@ snapshots: optionalDependencies: canvg: 3.0.11 core-js: 3.50.0 - dompurify: 3.3.3 + dompurify: 3.4.18 html2canvas: 1.4.1 jszip@3.10.1: @@ -6178,6 +6368,8 @@ snapshots: lodash.throttle@4.1.1: {} + lru-cache@11.5.3: {} + magic-string@0.30.21: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 @@ -6186,6 +6378,8 @@ snapshots: marked@18.0.14: {} + marked@18.2.1: {} + math-intrinsics@1.1.0: {} mdn-data@2.27.1: {} @@ -6208,7 +6402,7 @@ snapshots: d3-sankey: 0.12.3 dagre-d3-es: 7.0.14 dayjs: 1.11.20 - dompurify: 3.3.3 + dompurify: 3.4.18 katex: 0.16.45 khroma: 2.1.0 lodash-es: 4.18.1 @@ -6372,6 +6566,14 @@ snapshots: pako@2.2.0: {} + parse5-parser-stream@8.1.1: + dependencies: + parse5: 8.1.1 + + parse5@8.1.1: + dependencies: + entities: 9.0.0 + parseurl@1.3.3: {} path-data-parser@0.1.0: {} @@ -6464,6 +6666,8 @@ snapshots: prsc@4.0.0: {} + punycode@2.3.1: {} + pwacompat@2.0.17: {} qs@6.15.1: @@ -6630,6 +6834,10 @@ snapshots: immutable: 4.3.9 source-map-js: 1.2.1 + saxes@6.0.0: + dependencies: + xmlchars: 2.2.0 + scheduler@0.27.0: {} send@1.2.1: @@ -6797,13 +7005,11 @@ snapshots: tinyrainbow@3.1.1: {} - tldts-core@7.0.28: - optional: true + tldts-core@7.0.28: {} tldts@7.0.28: dependencies: tldts-core: 7.0.28 - optional: true to-regex-range@5.0.1: dependencies: @@ -6816,6 +7022,14 @@ snapshots: tldts: 7.0.28 optional: true + tough-cookie@6.1.0: + dependencies: + tldts: 7.0.28 + + tr46@7.0.0: + dependencies: + punycode: 2.3.1 + ts-dedent@2.2.0: {} ts-interface-checker@0.1.13: {} @@ -6861,6 +7075,8 @@ snapshots: undici@8.10.2: {} + undici@8.12.4: {} + unifont@0.7.5: dependencies: css-tree: 3.2.1 @@ -6917,7 +7133,7 @@ snapshots: tsx: 4.21.0 yaml: 2.9.0 - vitest@4.1.4(@opentelemetry/api@1.9.1)(@types/node@25.5.0)(msw@2.13.3(@types/node@25.5.0)(typescript@6.0.2))(vite@8.3.1(@types/node@25.5.0)(esbuild@0.25.12)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.9.0)): + vitest@4.1.4(@opentelemetry/api@1.9.1)(@types/node@25.5.0)(jsdom@31.0.1)(msw@2.13.3(@types/node@25.5.0)(typescript@6.0.2))(vite@8.3.1(@types/node@25.5.0)(esbuild@0.25.12)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.9.0)): dependencies: '@vitest/expect': 4.1.4 '@vitest/mocker': 4.1.4(msw@2.13.3(@types/node@25.5.0)(typescript@6.0.2))(vite@8.3.1(@types/node@25.5.0)(esbuild@0.25.12)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.9.0)) @@ -6942,6 +7158,7 @@ snapshots: optionalDependencies: '@opentelemetry/api': 1.9.1 '@types/node': 25.5.0 + jsdom: 31.0.1 transitivePeerDependencies: - msw @@ -6980,8 +7197,24 @@ snapshots: w3c-keyname@2.2.8: {} + w3c-xmlserializer@6.0.0: + dependencies: + xml-name-validator: 5.0.0 + + webidl-conversions@8.0.1: {} + webworkify@1.5.0: {} + whatwg-mimetype@5.0.0: {} + + whatwg-url@17.3.0: + dependencies: + '@exodus/bytes': 1.16.0 + tr46: 7.0.0 + webidl-conversions: 8.0.1 + transitivePeerDependencies: + - '@noble/hashes' + which@2.0.2: dependencies: isexe: 2.0.0 @@ -7011,6 +7244,10 @@ snapshots: ws@8.20.0: {} + xml-name-validator@5.0.0: {} + + xmlchars@2.2.0: {} + xspattern@3.1.0: dependencies: whynot: 5.0.0 diff --git a/ui-plugins/ai-pair/.zcode-plugin/plugin.json b/ui-plugins/ai-pair/.zcode-plugin/plugin.json new file mode 100644 index 00000000..839d9bee --- /dev/null +++ b/ui-plugins/ai-pair/.zcode-plugin/plugin.json @@ -0,0 +1,42 @@ +{ + "name": "ai-pair", + "version": "0.4.8", + "description": "AI Pair 评审:主对话改完代码后,一键送两个异构模型(复用 ZCode 模型管理里的渠道)并行评审,侧栏面板查看报告。", + "skills": "skills", + "author": { + "name": "JustinChia" + }, + "license": "MIT", + "mcpServers": { + "ai-pair": { + "type": "stdio", + "command": "node", + "args": [ + "${ZCODE_PLUGIN_ROOT}/dist/server.mjs" + ], + "env": { + "ZCODE_PLUGIN_DATA": "${ZCODE_PLUGIN_DATA}", + "ZCODE_PROJECT_DIR": "${ZCODE_PROJECT_DIR}" + } + } + }, + "ui": { + "surfaces": [ + { + "id": "reviews", + "title": { + "zh-CN": "AI Pair 评审", + "en-US": "AI Pair Review" + }, + "icon": "activity", + "server": "ai-pair", + "resourceUri": "ui://ai-pair/panel.html", + "availability": "session" + } + ] + }, + "description_i18n": { + "en": "Send completed work to two heterogeneous reviewers (reusing ZCode model channels) for parallel review; read reports in the side pane.", + "zh-CN": "AI Pair 评审:主对话改完代码后,一键送两个异构模型(复用 ZCode 模型管理里的渠道)并行评审,侧栏面板查看报告。" + } +} diff --git a/ui-plugins/ai-pair/LICENSE b/ui-plugins/ai-pair/LICENSE new file mode 100644 index 00000000..100c3c4e --- /dev/null +++ b/ui-plugins/ai-pair/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2026 JustinChia +Copyright (c) 2026 Axton Liu (original ai-pair skill, https://github.com/axtonliu/ai-pair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/ui-plugins/ai-pair/README.md b/ui-plugins/ai-pair/README.md new file mode 100644 index 00000000..5bcff99e --- /dev/null +++ b/ui-plugins/ai-pair/README.md @@ -0,0 +1,49 @@ +# ai-pair + +AI Pair 评审:主对话完成代码/内容创作后,把成果送 **两个异构模型** 并行评审,在会话侧栏面板查看分级报告。模型渠道完全复用 ZCode「管理模型」里已配置的渠道,插件里**不需要单独填 API Key**。 + +## 用法(对话里) + +- "改完了,送 ai-pair 评审" / "让两个模型评一下刚才的改动" +- Agent 会调用 `request_review` 工具(传 diff 或文件列表),评审后台运行,侧栏「AI Pair 评审」面板自动刷新 +- `get_review` 取完整报告;`list_reviews` 列历史;`list_models` 列渠道与实测连通性 + +## 配置(推荐:面板级联选择) + +侧栏「AI Pair 评审」面板 → **⚙ 设置**:两个评审位各自 **渠道下拉 → 模型下拉 → 保存**, +渠道与模型来自 ZCode「管理模型」的已有配置,密钥自动复用、无需手填,保存立即生效。 + +也可在对话里让 AI 跑 `configure_reviewers` 工具(如"评审模型 1 用 Kimi 的 k3.1-pro")。 + +### 评审员角色定义 + +两个评审槽位是**固定分工**(借鉴原版 ai-pair 的具名评审员模式),角色由插件注入每次评审的提示词,不随所选渠道变化: + +| 评审位 | 角色 | 代码评审重点(focus=dev) | 内容评审重点(focus=content) | +| --- | --- | --- | --- | +| 评审模型 1 | **正确性把关** | bug、安全漏洞、并发问题、性能、边界条件、错误处理 | 逻辑严密性、事实准确性、无依据的论断、内部矛盾、缺少引用 | +| 评审模型 2 | **设计与可维护性** | 架构与模块边界、设计模式、可读性与可维护性、命名、未来隐患 | 可读性、结构与行文节奏、语气与风格一致性、受众契合度、标题与开头 | + +评审模型 2 建议选**不同厂商**的渠道——两个模型加两个视角,异构评审的价值才在; +结论冲突时插件不做仲裁,并列呈现交由用户裁决。 + +支持的渠道协议:OpenAI chat/completions 与 Anthropic messages(自动识别)。 +需要新渠道时直接在 ZCode「管理模型」里添加,插件面板重开即能看到。 + +> 隐私说明:提交评审的 diff 与文件全文会发送到**你自己配置的模型渠道**(由所选渠道的厂商处理), +> 评审记录仅保存在本机插件数据目录;API Key 只在插件服务端内存中使用,不落盘、不下发面板。 + +## OpenCode Go 渠道注意 + +- Go 网关要求 `x-opencode-session` 会话头与自定义 User-Agent —— 插件对 `opencode.ai` 域名自动处理 +- OpenCode 隐私设置默认屏蔽部分模型(如 DeepSeek 系),需在 OpenCode Settings › Privacy 开启 + +评审数据存放在插件持久目录(按工作区隔离)。 + +## 作者与致谢 + +- 作者:**JustinChia** +- 本插件改编自 [axtonliu/ai-pair](https://github.com/axtonliu/ai-pair)(MIT License, Copyright (c) 2026 Axton Liu), + 衷心感谢原作者 Axton Liu 提出的「一个创作、两个审查」异构评审思路与原版 Claude Code Skill 的提示词设计。 +- 本插件在其思路基础上重写为 ZCode UI 插件:评审由插件服务端直连模型渠道执行、 + 侧栏面板查看报告、评审模型复用 ZCode「管理模型」的渠道配置。协议同为 MIT。 diff --git a/ui-plugins/ai-pair/icon.svg b/ui-plugins/ai-pair/icon.svg new file mode 100644 index 00000000..e2dbfd88 --- /dev/null +++ b/ui-plugins/ai-pair/icon.svg @@ -0,0 +1,29 @@ + diff --git a/ui-plugins/ai-pair/package.json b/ui-plugins/ai-pair/package.json new file mode 100644 index 00000000..a2c9e020 --- /dev/null +++ b/ui-plugins/ai-pair/package.json @@ -0,0 +1,21 @@ +{ + "name": "@zcode/plugin-ai-pair", + "version": "0.4.8", + "private": true, + "license": "MIT", + "type": "module", + "scripts": { + "build": "node scripts/build.mjs", + "test": "vitest run" + }, + "engines": { + "node": ">=24.0.0" + }, + "dependencies": { + "dompurify": "^3.4.18", + "marked": "^18.2.1" + }, + "devDependencies": { + "jsdom": "^31.0.1" + } +} diff --git a/ui-plugins/ai-pair/scripts/build.mjs b/ui-plugins/ai-pair/scripts/build.mjs new file mode 100644 index 00000000..5f43d527 --- /dev/null +++ b/ui-plugins/ai-pair/scripts/build.mjs @@ -0,0 +1,56 @@ +/** + * ai-pair build — assemble dist/ from src/ + ui/: + * 1. bundle ui/panel.mjs (imports @modelcontextprotocol/ext-apps) with esbuild + * and inline it into dist/ui/panel.html (placeholder __AI_PAIR_BUNDLE__); + * 2. copy src/server.mjs → dist/server.mjs and stamp dist/build-info.json; + * 3. sync manifest/skills/README/dist into the install dir + * (ZCODE_PLUGIN_INSTALL_DIR; the root build passes it, standalone builds may not). + * Server/runtime stay zero-dependency; esbuild is a build-time tool resolved + * from the repo root node_modules (same approach as the showcase plugin). + */ +import { build } from "esbuild"; +import { cp, mkdir, readFile, rm, writeFile } from "node:fs/promises"; +import { dirname, join, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + +const root = resolve(dirname(fileURLToPath(import.meta.url)), ".."); +const manifest = JSON.parse(await readFile(join(root, ".zcode-plugin/plugin.json"), "utf8")); +const installDir = process.env.ZCODE_PLUGIN_INSTALL_DIR; + +const client = await build({ + entryPoints: [resolve(root, "ui/panel.mjs")], + bundle: true, + platform: "browser", + format: "iife", + target: "chrome120", + write: false, + legalComments: "inline", +}); + +await rm(join(root, "dist"), { recursive: true, force: true }); +await mkdir(join(root, "dist/ui"), { recursive: true }); +await cp(join(root, "src/server.mjs"), join(root, "dist/server.mjs")); + +const page = await readFile(join(root, "ui/panel.html"), "utf8"); +await writeFile( + join(root, "dist/ui/panel.html"), + page.replace("__AI_PAIR_BUNDLE__", () => + client.outputFiles[0].text.replaceAll("