feat(agents): support gitlab repo import, gitops sync and agent market plugin distribution - #97
Merged
Merged
Conversation
…t plugin distribution - 支持从 GitLab 仓库导入 Agent 插件与智能 URL 解析 - 支持全量批量同步与单个 Agent 即时代码同步 - 新增 5 分钟定时自动同步任务并支持 autoSyncInterval 配置 - 优化 git 浅克隆同步逻辑,使用 fetch --depth 1 origin branch 与 reset --hard FETCH_HEAD 平滑兼容跨分支切换 - 提供 create-plugin.sh 跨端插件脚手架与 install.sh 客户端分发脚本 - 同步更新 Agent 市场帮助文档与环境配置
# Conflicts: # app/service/agents.js # app/web/pages/agents/types.ts # docs/docsify/imgs/agent-detail.png # docs/docsify/imgs/agent-list.png # test/agent-market-service.test.js
- 在 normalizeGitSource 中自动补齐 HTTP/HTTPS 仓库地址的 .git 后缀,避免 GitLab 301 重定向丢失认证头 - 彻底清空 runGitCommand 中的 GIT_ASKPASS 与 SSH_ASKPASS,并注入 core.askPass= 和 credential.helper=,防止在终端唤起外部 Electron askpass 脚本卡死 - 在 resolveGitlabToken 中清理 require 缓存,支持 env.json 配置热更新 - 在 formatGitCloneError 中补充对 Access denied 与鉴权失败的错误特征捕获 - 同步更新测试用例断言
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 类型
改动内容概述
1. Agent 市场全面升级为 GitOps 驱动模式
agent_files表存储,直接基于 Git commit hash(git rev-parse HEAD)进行版本追踪与内容哈希比对。git archive打包生成标准插件 ZIP 归档,供离线下载与终端一键安装。2. 代码同步与自动保鲜机制
app/schedule/syncGitAgents.js定时任务,默认每 5 分钟自动轮询所有已配置仓库,检测到新 commit 自动同步入库。git fetch --depth 1 origin <branch>+git reset --hard FETCH_HEAD,平滑兼容跨分支切换,全程保持 depth 1 且免去异常删目录重新 clone 的问题。index.lock冲突,支持gitlabToken认证白名单以及错误日志敏感信息自动脱敏。3. 双端插件脚手架与客户端分发
app/public/create-plugin.sh,可一键生成面向 Claude Code 与 Codex 的双端规范插件骨架工程。app/public/install.sh,支持集中式~/.agents/agent-market本地 Marketplace 维护、宿主 CLI 自动探测(含桌面应用)、setup.sh环境预检及入口 Skill 调用引导。4. 界面与文档完善
docs/docsify/zh-cn/guide/agent-market.md与docs/docsify/zh-cn/configuration/envConfig.md。测试验证
npm run lint检查通过(0 error)。npm run check-types检查通过。node --test test/*.test.js全部 177 个测试通过。