autosnippet 3.3.9 → 3.4.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 +44 -19
- package/config/default.json +1 -1
- package/dashboard/dist/assets/{index-DEU4tJtP.js → index-BX6r2fiy.js} +40 -40
- package/dashboard/dist/assets/index-BvZcGN02.css +1 -0
- package/dashboard/dist/index.html +2 -2
- package/dist/lib/agent/AgentRuntime.js +13 -1
- package/dist/lib/agent/AgentRuntimeTypes.d.ts +2 -0
- package/dist/lib/agent/PipelineStrategy.js +32 -2
- package/dist/lib/agent/context/ContextWindow.d.ts +2 -1
- package/dist/lib/agent/context/ContextWindow.js +18 -4
- package/dist/lib/agent/context/ExplorationTracker.js +6 -1
- package/dist/lib/agent/context/exploration/ExplorationStrategies.js +2 -1
- package/dist/lib/agent/core/LoopContext.d.ts +3 -0
- package/dist/lib/agent/core/LoopContext.js +3 -0
- package/dist/lib/agent/domain/EpisodicConsolidator.d.ts +5 -0
- package/dist/lib/agent/domain/EpisodicConsolidator.js +60 -5
- package/dist/lib/agent/domain/insight-analyst.d.ts +16 -0
- package/dist/lib/agent/domain/insight-analyst.js +38 -0
- package/dist/lib/agent/domain/insight-gate.js +12 -0
- package/dist/lib/agent/memory/MemoryConsolidator.js +17 -0
- package/dist/lib/core/AstAnalyzer.js +0 -1
- package/dist/lib/core/ast/lang-dart.js +0 -1
- package/dist/lib/core/ast/lang-go.js +0 -1
- package/dist/lib/core/ast/lang-java.js +0 -1
- package/dist/lib/core/ast/lang-javascript.js +0 -1
- package/dist/lib/core/ast/lang-objc.js +0 -1
- package/dist/lib/core/ast/lang-python.js +0 -1
- package/dist/lib/core/ast/lang-rust.js +0 -1
- package/dist/lib/core/ast/lang-swift.js +0 -1
- package/dist/lib/core/ast/lang-typescript.js +0 -1
- package/dist/lib/domain/dimension/DimensionRegistry.d.ts +6 -4
- package/dist/lib/domain/dimension/DimensionRegistry.js +19 -23
- package/dist/lib/external/ai/AiFactory.d.ts +14 -0
- package/dist/lib/external/ai/AiFactory.js +33 -1
- package/dist/lib/external/ai/AiProvider.d.ts +2 -0
- package/dist/lib/external/ai/AiProvider.js +4 -0
- package/dist/lib/external/ai/providers/ClaudeProvider.d.ts +1 -1
- package/dist/lib/external/ai/providers/ClaudeProvider.js +6 -2
- package/dist/lib/external/ai/providers/GoogleGeminiProvider.d.ts +1 -1
- package/dist/lib/external/ai/providers/GoogleGeminiProvider.js +13 -5
- package/dist/lib/external/ai/providers/OpenAiProvider.d.ts +1 -1
- package/dist/lib/external/ai/providers/OpenAiProvider.js +8 -4
- package/dist/lib/external/mcp/handlers/bootstrap/MissionBriefingBuilder.js +10 -2
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.d.ts +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.js +39 -5
- package/dist/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.d.ts +2 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.js +4 -0
- package/dist/lib/external/mcp/handlers/guard.js +11 -6
- package/dist/lib/http/routes/ai.js +20 -3
- package/dist/lib/infrastructure/vector/IndexingPipeline.js +6 -1
- package/dist/lib/injection/modules/AiModule.js +22 -1
- package/dist/lib/service/bootstrap/BootstrapTaskManager.d.ts +7 -0
- package/dist/lib/service/bootstrap/BootstrapTaskManager.js +17 -0
- package/dist/lib/service/guard/ComplianceReporter.js +5 -1
- package/dist/lib/service/guard/GuardCheckEngine.d.ts +12 -1
- package/dist/lib/service/guard/GuardCheckEngine.js +36 -4
- package/dist/lib/service/guard/GuardCodeChecks.js +27 -9
- package/dist/lib/service/guard/SourceFileCollector.d.ts +3 -2
- package/dist/lib/service/guard/SourceFileCollector.js +3 -3
- package/dist/lib/service/search/SearchEngine.js +165 -61
- package/dist/lib/service/task/PrimeSearchPipeline.js +17 -2
- package/dist/lib/service/vector/VectorService.js +10 -1
- package/dist/lib/shared/LanguageService.d.ts +12 -0
- package/dist/lib/shared/LanguageService.js +85 -0
- package/dist/lib/shared/schemas/http-requests.d.ts +4 -0
- package/dist/lib/shared/schemas/http-requests.js +4 -0
- package/package.json +1 -1
- package/dashboard/dist/assets/index-DHJ1Dj7u.css +0 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Extract patterns from your codebase into a knowledge base that AI coding assista
|
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
- [Why](#why) · [Getting Started](#getting-started) · [Using in IDE](#using-in-ide) · [Evolution Architecture](#evolution-architecture) · [Engineering Capabilities](#engineering-capabilities) · [IDE Support](#ide-support) · [
|
|
17
|
+
- [Why](#why) · [Getting Started](#getting-started) · [Using in IDE](#using-in-ide) · [Evolution Architecture](#evolution-architecture) · [Engineering Capabilities](#engineering-capabilities) · [IDE Support](#ide-support) · [Deep Dive](#deep-dive)
|
|
18
18
|
|
|
19
19
|
## Why
|
|
20
20
|
|
|
@@ -48,7 +48,7 @@ asd ui # Start background service (MCP Server + Dashboard) — IDE and MC
|
|
|
48
48
|
|
|
49
49
|
> **First time:** Manually enable the `autosnippet` service in your IDE's MCP settings.
|
|
50
50
|
|
|
51
|
-
> **Tip:** Stronger models work better. We recommend Claude Opus 4 / Sonnet 4, GPT-5, or Gemini 3 Pro in Cursor / Copilot for more accurate patterns and fewer false positives.
|
|
51
|
+
> **Tip:** Stronger models work better. We recommend Claude Opus 4.6 / Sonnet 4.6, GPT-5.4, or Gemini 3.1 Pro in Cursor / Copilot for more accurate patterns and fewer false positives.
|
|
52
52
|
|
|
53
53
|
### Cold Start: Build Your Knowledge Base
|
|
54
54
|
|
|
@@ -145,7 +145,7 @@ Creativity at capability boundaries. Three progressive modes — Reuse (0ms) →
|
|
|
145
145
|
4. **Signal-Driven > Time-Driven** — Trigger on signal saturation, not scheduled scans
|
|
146
146
|
5. **Defense in Depth** — Constitution → Gateway → Permission → SafetyPolicy → PathGuard → ConfidenceRouter
|
|
147
147
|
|
|
148
|
-
> Organ implementation details, engineering metrics, and defense chain breakdown in [Technical
|
|
148
|
+
> Organ implementation details, engineering metrics, and defense chain breakdown in [Technical Book](https://docs.gaoxuefeng.com/visual-tour)
|
|
149
149
|
|
|
150
150
|
---
|
|
151
151
|
|
|
@@ -240,22 +240,22 @@ All configuration auto-generated by `asd setup`. Run `asd upgrade` after updates
|
|
|
240
240
|
|
|
241
241
|
---
|
|
242
242
|
|
|
243
|
-
##
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
|
248
|
-
|
|
249
|
-
| [
|
|
250
|
-
| [
|
|
251
|
-
| [
|
|
252
|
-
| [
|
|
253
|
-
| [
|
|
254
|
-
| [
|
|
255
|
-
| [
|
|
256
|
-
| [
|
|
257
|
-
| [
|
|
258
|
-
| [
|
|
243
|
+
## Deep Dive
|
|
244
|
+
|
|
245
|
+
> **[Visual Tour — Understand the entire system in 5 minutes](https://docs.gaoxuefeng.com/visual-tour)** · 25 hand-drawn architecture diagrams from workflow to Agent loop
|
|
246
|
+
|
|
247
|
+
| Chapter | Content |
|
|
248
|
+
|---------|--------|
|
|
249
|
+
| [Introduction](https://docs.gaoxuefeng.com/part1/ch01-introduction) | Problem definition, solution overview, quick start |
|
|
250
|
+
| [SOUL Principles](https://docs.gaoxuefeng.com/part1/ch02-soul) | 3 hard constraints + 5 design philosophies |
|
|
251
|
+
| [Architecture](https://docs.gaoxuefeng.com/part2/ch03-architecture) | 7-layer DDD with module topology |
|
|
252
|
+
| [Security Pipeline](https://docs.gaoxuefeng.com/part2/ch04-security) | Six-layer defense in depth |
|
|
253
|
+
| [Code Understanding](https://docs.gaoxuefeng.com/part2/ch05-ast) | 10-language Tree-sitter AST analysis |
|
|
254
|
+
| [Knowledge Domain](https://docs.gaoxuefeng.com/part3/ch06-knowledge-entry) | Unified entity, lifecycle, quality scoring |
|
|
255
|
+
| [Core Services](https://docs.gaoxuefeng.com/part4/ch09-bootstrap) | Bootstrap, Guard, Search, Metabolism |
|
|
256
|
+
| [Agent Intelligence](https://docs.gaoxuefeng.com/part5/ch13-agent-runtime) | ReAct loop, orthogonal composition, 61+ tools |
|
|
257
|
+
| [Platform & Delivery](https://docs.gaoxuefeng.com/part6/ch16-infrastructure) | Data infrastructure, MCP, four-interface access |
|
|
258
|
+
| [BiliDili Cold Start](https://docs.gaoxuefeng.com/part7/ch19-bilidili-coldstart) | Real data: 8.4M tokens, 101 candidates |
|
|
259
259
|
|
|
260
260
|
---
|
|
261
261
|
|
|
@@ -265,6 +265,31 @@ All configuration auto-generated by `asd setup`. Run `asd upgrade` after updates
|
|
|
265
265
|
- macOS recommended (Xcode features require it; other features are cross-platform)
|
|
266
266
|
- better-sqlite3 (bundled)
|
|
267
267
|
|
|
268
|
+
### Recommended: Local Embedding for Semantic Search
|
|
269
|
+
|
|
270
|
+
AutoSnippet has a built-in hybrid search engine (keyword + vector semantic). Install a local embedding model to unlock semantic search — concept-level matching that finds relevant recipes even when exact keywords don't match.
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
# Install Ollama (https://ollama.com)
|
|
274
|
+
brew install ollama && ollama serve
|
|
275
|
+
|
|
276
|
+
# Pull the recommended model (~639MB, supports Chinese + English + code)
|
|
277
|
+
ollama pull qwen3-embedding:0.6b
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Then add to your project's `.env`:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
ASD_EMBED_PROVIDER=ollama
|
|
284
|
+
ASD_EMBED_MODEL=qwen3-embedding:0.6b
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Or configure it in Dashboard (`asd ui`) → Settings → Embedding Model.
|
|
288
|
+
|
|
289
|
+
After configuring, run `asd embed` to build the vector index. Semantic search adds ~200–400ms per query (local inference, no API calls, no data leaves your machine).
|
|
290
|
+
|
|
291
|
+
> **Without a local model**, search still works — it uses field-weighted keyword matching, which is fast and accurate for exact terms. Semantic search is a bonus layer for concept-level queries like *"how to avoid data races"* or *"cookie persistence"*.
|
|
292
|
+
|
|
268
293
|
## Contributing
|
|
269
294
|
|
|
270
295
|
1. Run `npm test` before submitting
|