autosnippet 3.4.0 → 3.4.2

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.
Files changed (49) hide show
  1. package/README.md +43 -18
  2. package/dashboard/dist/assets/{index-8b1Gf3Bb.js → index-BX6r2fiy.js} +40 -40
  3. package/dashboard/dist/assets/index-BvZcGN02.css +1 -0
  4. package/dashboard/dist/index.html +2 -2
  5. package/dist/lib/core/AstAnalyzer.js +0 -1
  6. package/dist/lib/core/ast/lang-dart.js +118 -8
  7. package/dist/lib/core/ast/lang-go.js +0 -1
  8. package/dist/lib/core/ast/lang-java.js +25 -11
  9. package/dist/lib/core/ast/lang-javascript.js +103 -17
  10. package/dist/lib/core/ast/lang-objc.d.ts +1 -1
  11. package/dist/lib/core/ast/lang-objc.js +80 -4
  12. package/dist/lib/core/ast/lang-python.js +0 -1
  13. package/dist/lib/core/ast/lang-rust.js +0 -1
  14. package/dist/lib/core/ast/lang-swift.d.ts +1 -1
  15. package/dist/lib/core/ast/lang-swift.js +184 -7
  16. package/dist/lib/core/ast/lang-typescript.js +0 -1
  17. package/dist/lib/external/ai/AiFactory.d.ts +14 -0
  18. package/dist/lib/external/ai/AiFactory.js +33 -1
  19. package/dist/lib/external/ai/providers/GoogleGeminiProvider.js +7 -3
  20. package/dist/lib/external/ai/providers/OpenAiProvider.js +1 -1
  21. package/dist/lib/external/mcp/handlers/bootstrap/MissionBriefingBuilder.d.ts +33 -1
  22. package/dist/lib/external/mcp/handlers/bootstrap/MissionBriefingBuilder.js +392 -19
  23. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.d.ts +1 -0
  24. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.js +2 -1
  25. package/dist/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.d.ts +2 -0
  26. package/dist/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.js +4 -0
  27. package/dist/lib/external/mcp/handlers/guard.js +11 -6
  28. package/dist/lib/http/routes/ai.js +18 -1
  29. package/dist/lib/infrastructure/vector/IndexingPipeline.js +6 -1
  30. package/dist/lib/injection/modules/AiModule.js +22 -1
  31. package/dist/lib/service/bootstrap/BootstrapTaskManager.d.ts +7 -0
  32. package/dist/lib/service/bootstrap/BootstrapTaskManager.js +17 -0
  33. package/dist/lib/service/guard/ComplianceReporter.js +5 -1
  34. package/dist/lib/service/guard/GuardCheckEngine.d.ts +12 -1
  35. package/dist/lib/service/guard/GuardCheckEngine.js +36 -4
  36. package/dist/lib/service/guard/GuardCodeChecks.js +27 -9
  37. package/dist/lib/service/guard/SourceFileCollector.d.ts +3 -2
  38. package/dist/lib/service/guard/SourceFileCollector.js +3 -3
  39. package/dist/lib/service/search/SearchEngine.js +165 -61
  40. package/dist/lib/service/task/PrimeSearchPipeline.js +17 -2
  41. package/dist/lib/service/vector/VectorService.js +10 -1
  42. package/dist/lib/shared/LanguageService.d.ts +12 -0
  43. package/dist/lib/shared/LanguageService.js +85 -0
  44. package/dist/lib/shared/schemas/http-requests.d.ts +4 -0
  45. package/dist/lib/shared/schemas/http-requests.js +4 -0
  46. package/dist/lib/types/project-snapshot.d.ts +1 -0
  47. package/package.json +1 -1
  48. package/resources/grammars/tree-sitter-dart.wasm +0 -0
  49. 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) · [Docs](#docs)
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
 
@@ -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 Reference](docs/technical-reference.en.md)
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
- ## Docs
244
-
245
- | Document | Content |
246
- |----------|---------|
247
- | **[Technical Book](https://docs.gaoxuefeng.com/part1/ch01-introduction)** | **Deep dive into every module — architecture decisions, data flows, and implementation details** |
248
- | [Technical Reference](docs/technical-reference.en.md) | Six subsystem implementation details, engineering metrics, defense chain |
249
- | [Dashboard](docs/dashboard.en.md) | Dashboard views and tech stack |
250
- | [CLI Reference](docs/cli-reference.en.md) | Full usage for all 20 commands |
251
- | [MCP Tools Reference](docs/mcp-tools.en.md) | 16 MCP tools with parameters and usage |
252
- | [Architecture](docs/architecture.en.md) | Overall architecture and module design |
253
- | [Configuration](docs/configuration.en.md) | LLM and advanced configuration options |
254
- | [Guard Guide](docs/guard.en.md) | Guard rules and customization |
255
- | [IDE Integration](docs/ide-integration.en.md) | Detailed IDE setup guides |
256
- | [Lark Integration](docs/lark-integration.en.md) | Lark Bot setup and usage |
257
- | [Agent Architecture](docs/agent-architecture.en.md) | Agent Runtime and MCP protocol |
258
- | [Development](docs/development.en.md) | Contributing and dev environment setup |
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