autosnippet 2.19.8 → 3.0.1
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 +26 -18
- package/dashboard/dist/assets/{index-BwISScUw.js → index-_Sk_Dmg3.js} +41 -41
- package/dashboard/dist/index.html +1 -1
- package/lib/external/mcp/McpServer.js +54 -65
- package/lib/external/mcp/handlers/bootstrap.js +7 -7
- package/lib/external/mcp/handlers/consolidated.js +290 -0
- package/lib/external/mcp/handlers/guard.js +5 -5
- package/lib/external/mcp/handlers/knowledge.js +23 -8
- package/lib/external/mcp/handlers/skill.js +4 -4
- package/lib/external/mcp/handlers/structure.js +16 -16
- package/lib/external/mcp/handlers/system.js +37 -40
- package/lib/external/mcp/tools.js +250 -646
- package/lib/service/chat/ChatAgent.js +142 -21
- package/lib/service/cursor/RulesGenerator.js +2 -2
- package/lib/service/skills/SkillAdvisor.js +1 -1
- package/package.json +1 -1
- package/scripts/install-cursor-skill.js +10 -10
- package/skills/autosnippet-analysis/SKILL.md +23 -18
- package/skills/autosnippet-candidates/SKILL.md +38 -39
- package/skills/autosnippet-coldstart/SKILL.md +11 -14
- package/skills/autosnippet-concepts/SKILL.md +26 -31
- package/skills/autosnippet-create/SKILL.md +4 -6
- package/skills/autosnippet-guard/SKILL.md +14 -17
- package/skills/autosnippet-intent/SKILL.md +10 -11
- package/skills/autosnippet-lifecycle/SKILL.md +13 -18
- package/skills/autosnippet-recipes/SKILL.md +29 -62
- package/skills/autosnippet-structure/SKILL.md +19 -19
- package/templates/copilot-instructions.md +42 -41
- package/templates/recipes-setup/README.md +4 -7
package/README.md
CHANGED
|
@@ -115,7 +115,7 @@ Bootstrap 引擎自动完成:SPM Target 发现 → 文件收集 → AST 结构
|
|
|
115
115
|
你:「分析 UIComponents Target 的自定义控件实现」
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
Cursor 调用 `
|
|
118
|
+
Cursor 调用 `structure({ operation: "targets" })` → `structure({ operation: "files" })` → 逐文件 AI 分析 → `submit_knowledge_batch`,将发现的代码模式作为 Candidate 提交到知识库。你可以逐个 Target 推进,每个 Target 的扫描结果会独立进入审核队列。
|
|
119
119
|
|
|
120
120
|
**④ 审核发布——人工把关质量**
|
|
121
121
|
|
|
@@ -135,7 +135,7 @@ Recipe 发布后,Cursor 立即可以通过三种通道获取知识:
|
|
|
135
135
|
|
|
136
136
|
| 通道 | 机制 | 时效 |
|
|
137
137
|
|------|------|------|
|
|
138
|
-
| **MCP 工具检索** | Cursor 通过 `autosnippet_search` 等
|
|
138
|
+
| **MCP 工具检索** | Cursor 通过 `autosnippet_search` 等 16 个工具实时查询知识库 | 实时 |
|
|
139
139
|
| **Cursor Rules** | `asd upgrade` 将 Recipe 导出为 `.cursor/rules/autosnippet-*.mdc` 文件 | 手动触发 |
|
|
140
140
|
| **Agent Skills** | 13 个 Skill 文档引导 Cursor 在正确场景自动调用知识库 | 常驻 |
|
|
141
141
|
|
|
@@ -192,9 +192,9 @@ Guard 规则也在同步工作——如果生成的代码违反了知识库中
|
|
|
192
192
|
|
|
193
193
|
AutoSnippet 为 Cursor 提供完整的 MCP + Skills 集成:
|
|
194
194
|
|
|
195
|
-
- **
|
|
195
|
+
- **16 个 MCP 工具**(12 agent + 4 admin):search / knowledge / structure / graph / guard / bootstrap / skill 等参数化统合入口,覆盖搜索、审查、候选管理、冷启动等场景
|
|
196
196
|
- **13 个 Agent Skills**:`autosnippet-candidates`、`autosnippet-guard`、`autosnippet-coldstart`、`autosnippet-intent` 等,引导 AI 正确使用工具
|
|
197
|
-
- **写操作 Gateway
|
|
197
|
+
- **写操作 Gateway 保护**:写操作经过权限 / 宪法 / 审计三重检查
|
|
198
198
|
|
|
199
199
|
```bash
|
|
200
200
|
asd install:cursor-skill --mcp # 安装 Skills + MCP 配置
|
|
@@ -252,21 +252,29 @@ asd install:vscode-copilot # 配置 MCP 和 Copilot 指令
|
|
|
252
252
|
|
|
253
253
|
## MCP 工具一览
|
|
254
254
|
|
|
255
|
-
|
|
255
|
+
16 个 MCP 工具按功能分组(省略了 **autosnippet_** 前缀):
|
|
256
256
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
|
260
|
-
|
|
261
|
-
|
|
|
262
|
-
|
|
|
263
|
-
|
|
|
264
|
-
|
|
|
265
|
-
| **项目结构** | `
|
|
266
|
-
|
|
|
267
|
-
|
|
|
268
|
-
|
|
|
269
|
-
|
|
|
257
|
+
**Agent 层(12 个)**——默认对外暴露:
|
|
258
|
+
|
|
259
|
+
| 分类 | 工具 | 说明 |
|
|
260
|
+
|------|------|------|
|
|
261
|
+
| **系统** | `health` | 服务健康检查 |
|
|
262
|
+
| **系统** | `capabilities` | 服务能力清单(Agent 自发现) |
|
|
263
|
+
| **搜索** | `search` | 统合入口,`mode` 参数路由 auto / keyword / semantic / context 四种模式 |
|
|
264
|
+
| **知识浏览** | `knowledge` | `operation` 参数路由 list / get / insights / confirm_usage |
|
|
265
|
+
| **项目结构** | `structure` | `operation` 参数路由 targets / files / metadata |
|
|
266
|
+
| **知识图谱** | `graph` | `operation` 参数路由 query / impact / path / stats |
|
|
267
|
+
| **Guard** | `guard` | `code` 参数审查单文件代码,`files` 参数批量审查文件 |
|
|
268
|
+
| **知识提交** | `submit_knowledge` / `submit_knowledge_batch` / `save_document` | 提交候选 / 批量提交 / 保存开发文档 |
|
|
269
|
+
| **Skill 管理** | `skill` | `operation` 参数路由 list / load / create / update / delete / suggest |
|
|
270
|
+
| **冷启动** | `bootstrap` | `operation` 参数路由 knowledge / refine / scan |
|
|
271
|
+
|
|
272
|
+
**Admin 层(4 个)**——需设置 `ASD_MCP_TIER=admin`:
|
|
273
|
+
|
|
274
|
+
| 分类 | 工具 | 说明 |
|
|
275
|
+
|------|------|------|
|
|
276
|
+
| **候选管理** | `enrich_candidates` / `validate_candidate` / `check_duplicate` | AI 润色 / 校验 / 查重 |
|
|
277
|
+
| **知识管理** | `knowledge_lifecycle` | 批量生命周期操作 |
|
|
270
278
|
|
|
271
279
|
## 配置
|
|
272
280
|
|