autosnippet 3.2.4 → 3.2.7

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 (67) hide show
  1. package/README.md +18 -5
  2. package/bin/cli.js +164 -145
  3. package/config/constitution.yaml +2 -0
  4. package/dashboard/dist/assets/{index-DNOHYBhy.css → index-BaGY7kJI.css} +1 -1
  5. package/dashboard/dist/assets/{index-6itPuGFl.js → index-DfHY_3ln.js} +25 -25
  6. package/dashboard/dist/index.html +2 -2
  7. package/lib/cli/CliLogger.js +78 -0
  8. package/lib/cli/SetupService.js +9 -718
  9. package/lib/cli/UpgradeService.js +23 -398
  10. package/lib/cli/deploy/FileDeployer.js +562 -0
  11. package/lib/cli/deploy/FileManifest.js +272 -0
  12. package/lib/external/mcp/McpServer.js +22 -26
  13. package/lib/external/mcp/autoApproveInjector.js +1 -0
  14. package/lib/external/mcp/handlers/bootstrap/BootstrapSession.js +5 -5
  15. package/lib/external/mcp/handlers/bootstrap/pipeline/EpisodicMemory.js +25 -3
  16. package/lib/external/mcp/handlers/bootstrap/pipeline/IncrementalBootstrap.js +6 -6
  17. package/lib/external/mcp/handlers/bootstrap/pipeline/ToolResultCache.js +4 -0
  18. package/lib/external/mcp/handlers/bootstrap/pipeline/dimension-configs.js +5 -5
  19. package/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.js +89 -44
  20. package/lib/external/mcp/handlers/consolidated.js +8 -9
  21. package/lib/external/mcp/handlers/dimension-complete-external.js +4 -4
  22. package/lib/external/mcp/handlers/guard.js +283 -5
  23. package/lib/external/mcp/handlers/task.js +361 -15
  24. package/lib/external/mcp/tools.js +32 -81
  25. package/lib/http/HttpServer.js +4 -0
  26. package/lib/http/routes/remote.js +1138 -0
  27. package/lib/http/routes/task.js +56 -0
  28. package/lib/infrastructure/database/migrations/003_add_remote_commands.js +27 -0
  29. package/lib/service/chat/AnalystAgent.js +12 -12
  30. package/lib/service/chat/ChatAgent.js +227 -545
  31. package/lib/service/chat/ChatAgentPrompts.js +9 -11
  32. package/lib/service/chat/ContextWindow.js +2 -296
  33. package/lib/service/chat/EpisodicConsolidator.js +15 -15
  34. package/lib/service/chat/ExplorationTracker.js +1262 -0
  35. package/lib/service/chat/HandoffProtocol.js +8 -9
  36. package/lib/service/chat/Memory.js +4 -0
  37. package/lib/service/chat/ProducerAgent.js +9 -6
  38. package/lib/service/chat/ProjectSemanticMemory.js +4 -0
  39. package/lib/service/chat/ReasoningTrace.js +182 -0
  40. package/lib/service/chat/WorkingMemory.js +4 -0
  41. package/lib/service/chat/memory/ActiveContext.js +910 -0
  42. package/lib/service/chat/memory/MemoryCoordinator.js +662 -0
  43. package/lib/service/chat/memory/PersistentMemory.js +450 -0
  44. package/lib/service/chat/memory/SessionStore.js +896 -0
  45. package/lib/service/chat/memory/index.js +13 -0
  46. package/lib/service/chat/tools/ast-graph.js +17 -16
  47. package/lib/service/cursor/AgentInstructionsGenerator.js +76 -47
  48. package/lib/service/cursor/FileProtection.js +4 -1
  49. package/lib/service/guard/GuardCheckEngine.js +10 -3
  50. package/lib/service/task/TaskGraphService.js +3 -3
  51. package/lib/shared/LanguageService.js +2 -1
  52. package/package.json +12 -1
  53. package/skills/autosnippet-intent/SKILL.md +1 -3
  54. package/skills/autosnippet-recipes/SKILL.md +1 -3
  55. package/templates/claude-code/commands/prime.md +19 -0
  56. package/templates/claude-code/hooks/autosnippet-session.sh +63 -0
  57. package/templates/claude-code/settings.json +21 -0
  58. package/templates/copilot-instructions.md +64 -177
  59. package/templates/cursor-hooks/commands/prime.md +12 -0
  60. package/templates/cursor-hooks/hooks/session-start.sh +10 -0
  61. package/templates/cursor-hooks/hooks.json +11 -0
  62. package/templates/cursor-rules/autosnippet-conventions.mdc +52 -3
  63. package/templates/cursor-rules/autosnippet-workflow.mdc +51 -27
  64. package/lib/external/mcp/handlers/decide.js +0 -109
  65. package/lib/external/mcp/handlers/ready.js +0 -42
  66. package/lib/service/chat/ReasoningLayer.js +0 -888
  67. package/templates/claude-hooks.yaml +0 -19
package/README.md CHANGED
@@ -45,7 +45,7 @@ That's it. After you approve some candidates, they become **Recipes** — struct
45
45
 
46
46
  ```
47
47
  ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐
48
- │ ① Setup │──→ │ ② Cold │──→ │ ③ Target │──→ │ ④ Revie │──→ │ ⑤ IDE │
48
+ │ ① Setup │──→ │ ② Cold │──→ │ ③ Target │──→ │ ④ Review │──→ │ ⑤ IDE │
49
49
  │ asd setup │ │ Start │ │ Scan │ │ Dashboard │ │ Delivery │
50
50
  └────────────┘ └────────────┘ └────────────┘ └────────────┘ └─────┬──────┘
51
51
 
@@ -101,12 +101,10 @@ If no AI is available at all, a rule-based fallback still extracts basic knowled
101
101
 
102
102
  TaskGraph stores team decisions and task status in `.autosnippet/autosnippet.db` — AI assistants don't start from scratch every conversation.
103
103
 
104
- - **`autosnippet_ready`** — Loads active decisions and pending tasks into context. Called at session start.
105
- - **`autosnippet_decide`** — Saves a team agreement (e.g. "use camelCase for API fields") that persists across sessions.
106
- - **`autosnippet_task`** — Task CRUD: create, claim, close, fail, defer, progress, decompose.
104
+ - **`autosnippet_task`** — Unified task & decision management: `prime` loads active decisions + tasks at session start; `record_decision` / `revise_decision` / `unpin_decision` persist team agreements; `create` / `claim` / `close` / `fail` / `defer` / `progress` / `decompose` for task CRUD.
107
105
  - **Auto-inject** — Every subsequent tool call carries active decisions automatically.
108
106
 
109
- Access via CLI `asd task`, MCP tools (`autosnippet_ready` / `autosnippet_decide` / `autosnippet_task`), or `#asd` in VS Code Agent Mode.
107
+ Access via CLI `asd task`, MCP tool `autosnippet_task`, or `#asd` in VS Code Agent Mode.
110
108
 
111
109
  ## IDE Support
112
110
 
@@ -117,6 +115,7 @@ Access via CLI `asd task`, MCP tools (`autosnippet_ready` / `autosnippet_decide`
117
115
  | **Claude Code** | MCP + CLAUDE.md | `CLAUDE.md` + MCP tools; supports hooks |
118
116
  | **Trae / Qoder** | MCP | Auto-generated by `asd setup` |
119
117
  | **Xcode** | File watcher | `asd watch` + file directives + snippet sync |
118
+ | **Lark (Feishu)** | Bot + WebSocket | Send commands from phone → IDE executes via Copilot Agent Mode |
120
119
 
121
120
  All configs generated by `asd setup`. Run `asd upgrade` to refresh after updates.
122
121
 
@@ -169,6 +168,20 @@ your-project/
169
168
 
170
169
  Recipes are Markdown files. SQLite is a read cache. If the DB breaks, `asd sync` rebuilds it.
171
170
 
171
+ ## Remote Programming via Lark
172
+
173
+ Code from your phone. Send messages in Lark (Feishu) → they get injected into VS Code Copilot Agent Mode → results sent back to Lark. Task notifications with IDE screenshots are pushed back automatically.
174
+
175
+ ```
176
+ Phone (Lark) → Feishu Cloud (WSS) → Local API Server → VS Code → Copilot Agent Mode
177
+ ↑ |
178
+ └─────────────────────── Result notification + Screenshot ────────────────┘
179
+ ```
180
+
181
+ System commands: `/help` `/status` `/queue` `/cancel` `/clear` `/ping` `/screen`
182
+
183
+ See [Lark Integration Guide](docs/lark-integration.en.md) for setup instructions.
184
+
172
185
  ## Configuration
173
186
 
174
187
  Put a `.env` in your project root, or use Dashboard → LLM Config: