Cache-first GitCode MCP server and CLI for AI agents and developers: durable SQLite sync for issues, PRs, comments and wiki; offline search, local RAG, resumable jobs, deterministic exports, and idempotent audited writes.
Add embedded admin UI foundation Closes #92 ## Summary - embed a Svelte 5 / SvelteKit static operator console in the Go binary - add admin open and admin status against the existing coordinator, with lazy loopback listener startup - protect the browser boundary with one-time launch tokens, HttpOnly SameSite sessions, Host/Origin/Fetch Metadata/CSRF validation, no CORS, and a hash-based CSP - expose authenticated readiness/version state and deterministic hashed assets with SPA fallback - implement the selected operator-console visual direction with a visible Light / Dark / System selector; System is the default - add frontend build/type/unit/Playwright CI and documented source-install/runtime workflows ## Verification - ./scripts/check-admin-ui-assets.sh - npm run check - npm run test - npm run test:e2e - live Playwright E2E against the embedded loopback daemon: 2/2 passed - go test ./... - git diff --check The live browser QA also caught and fixed an initial CSP/bootstrap incompatibility without adding unsafe-inline. The one local go install ./... run was explicit dogfood for this foundation, not a routine PR gate.
该项目自包含且公开安全。源仓库、跟踪器和 Wiki 均为外部输入;示例使用占位符和已清洗的固定数据。完整安全契约见 安全清洗规则。
功能说明
将 GitCode 仓库绑定到本地缓存标识和别名。
将 Issue、PR、评论、Wiki 页面、标签和里程碑同步到 SQLite。
默认使用混合词法/语义检索搜索缓存来源,同时保留确定性全文检索模式。
基于按模型区分的嵌入,在缓存块上运行可选的本地 RAG 语义/混合检索。
直接从精确的本地 Git 修订版本搜索带版本控制的仓库文档,并持久化元数据和向量,而非文档副本。
维护多个已注册缓存,提供由守护进程托管的近期刷新、历史回填,以及感知内容生成的 RAG 修复。
为链接、片段、反向链接和导出解析稳定的本地 id 和远程别名。
面向智能体工作流,基于缓存数据运行 MCP 服务器。
仅通过包含幂等键和审计证据的显式命令执行实时写入。
通过可选的反馈入口,将智能体或人工内部试用中的摩擦转化为结构化、已脱敏、去重的反馈 Issue。
通过同一缓存优先服务层,支持 Issue、Wiki、评论和 PR 工作流。
通过官方 v5 API 检查仓库推送镜像,并在缓存、CLI 或 MCP 输出前移除目标凭据。
快速开始
go test ./...
go run ./cmd/gitcode-mcp --help
go run ./cmd/gitcode-mcp repo add --repo YOUR_OWNER/YOUR_REPO --owner YOUR_OWNER --name YOUR_REPO --scopes issues,wiki
go run ./cmd/gitcode-mcp sync --repo YOUR_OWNER/YOUR_REPO --issues --wiki --pulls --pr-comments
go run ./cmd/gitcode-mcp search --repo YOUR_OWNER/YOUR_REPO "cache-first"
go run ./cmd/gitcode-mcp maintenance plan --repo YOUR_OWNER/YOUR_REPO
go run ./cmd/gitcode-mcp maintenance enable --repo YOUR_OWNER/YOUR_REPO --yes --idempotency-key setup-1
Cache-first GitCode MCP server and CLI for AI agents and developers: durable SQLite sync for issues, PRs, comments and wiki; offline search, local RAG, resumable jobs, deterministic exports, and idempotent audited writes.