@goondocks/myco 0.1.0
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/.claude-plugin/marketplace.json +22 -0
- package/.claude-plugin/plugin.json +18 -0
- package/CONTRIBUTING.md +143 -0
- package/LICENSE +21 -0
- package/README.md +74 -0
- package/commands/init.md +231 -0
- package/commands/setup-llm.md +89 -0
- package/commands/status.md +112 -0
- package/dist/src/agents/adapter.d.ts +76 -0
- package/dist/src/agents/adapter.d.ts.map +1 -0
- package/dist/src/agents/adapter.js +124 -0
- package/dist/src/agents/adapter.js.map +1 -0
- package/dist/src/agents/claude-code.d.ts +3 -0
- package/dist/src/agents/claude-code.d.ts.map +1 -0
- package/dist/src/agents/claude-code.js +22 -0
- package/dist/src/agents/claude-code.js.map +1 -0
- package/dist/src/agents/cursor.d.ts +3 -0
- package/dist/src/agents/cursor.d.ts.map +1 -0
- package/dist/src/agents/cursor.js +154 -0
- package/dist/src/agents/cursor.js.map +1 -0
- package/dist/src/agents/index.d.ts +6 -0
- package/dist/src/agents/index.d.ts.map +1 -0
- package/dist/src/agents/index.js +5 -0
- package/dist/src/agents/index.js.map +1 -0
- package/dist/src/agents/registry.d.ts +34 -0
- package/dist/src/agents/registry.d.ts.map +1 -0
- package/dist/src/agents/registry.js +95 -0
- package/dist/src/agents/registry.js.map +1 -0
- package/dist/src/artifacts/candidates.d.ts +20 -0
- package/dist/src/artifacts/candidates.d.ts.map +1 -0
- package/dist/src/artifacts/candidates.js +84 -0
- package/dist/src/artifacts/candidates.js.map +1 -0
- package/dist/src/artifacts/slugify.d.ts +2 -0
- package/dist/src/artifacts/slugify.d.ts.map +1 -0
- package/dist/src/artifacts/slugify.js +22 -0
- package/dist/src/artifacts/slugify.js.map +1 -0
- package/dist/src/capture/artifact-watcher.d.ts +19 -0
- package/dist/src/capture/artifact-watcher.d.ts.map +1 -0
- package/dist/src/capture/artifact-watcher.js +37 -0
- package/dist/src/capture/artifact-watcher.js.map +1 -0
- package/dist/src/capture/buffer.d.ts +20 -0
- package/dist/src/capture/buffer.d.ts.map +1 -0
- package/dist/src/capture/buffer.js +55 -0
- package/dist/src/capture/buffer.js.map +1 -0
- package/dist/src/capture/plan-detector.d.ts +15 -0
- package/dist/src/capture/plan-detector.d.ts.map +1 -0
- package/dist/src/capture/plan-detector.js +34 -0
- package/dist/src/capture/plan-detector.js.map +1 -0
- package/dist/src/capture/processor.d.ts +2 -0
- package/dist/src/capture/processor.d.ts.map +1 -0
- package/dist/src/capture/processor.js +3 -0
- package/dist/src/capture/processor.js.map +1 -0
- package/dist/src/capture/prompts/classify.md +28 -0
- package/dist/src/capture/prompts/debugging.md +91 -0
- package/dist/src/capture/prompts/exploration.md +88 -0
- package/dist/src/capture/prompts/extraction.md +93 -0
- package/dist/src/capture/prompts/implementation.md +90 -0
- package/dist/src/capture/prompts/prompts/classify.md +28 -0
- package/dist/src/capture/prompts/prompts/debugging.md +91 -0
- package/dist/src/capture/prompts/prompts/exploration.md +88 -0
- package/dist/src/capture/prompts/prompts/extraction.md +93 -0
- package/dist/src/capture/prompts/prompts/implementation.md +90 -0
- package/dist/src/capture/prompts/prompts/schema.yaml +97 -0
- package/dist/src/capture/prompts/prompts/session-summary.md +65 -0
- package/dist/src/capture/prompts/prompts/session-title.md +46 -0
- package/dist/src/capture/prompts/schema.yaml +97 -0
- package/dist/src/capture/prompts/session-summary.md +65 -0
- package/dist/src/capture/prompts/session-title.md +46 -0
- package/dist/src/capture/prompts.d.ts +77 -0
- package/dist/src/capture/prompts.d.ts.map +1 -0
- package/dist/src/capture/prompts.js +255 -0
- package/dist/src/capture/prompts.js.map +1 -0
- package/dist/src/capture/transcript-miner.d.ts +31 -0
- package/dist/src/capture/transcript-miner.d.ts.map +1 -0
- package/dist/src/capture/transcript-miner.js +61 -0
- package/dist/src/capture/transcript-miner.js.map +1 -0
- package/dist/src/cli.d.ts +3 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/cli.js +584 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/config/loader.d.ts +4 -0
- package/dist/src/config/loader.d.ts.map +1 -0
- package/dist/src/config/loader.js +32 -0
- package/dist/src/config/loader.js.map +1 -0
- package/dist/src/config/schema.d.ts +83 -0
- package/dist/src/config/schema.d.ts.map +1 -0
- package/dist/src/config/schema.js +55 -0
- package/dist/src/config/schema.js.map +1 -0
- package/dist/src/constants.d.ts +73 -0
- package/dist/src/constants.d.ts.map +1 -0
- package/dist/src/constants.js +86 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/context/injector.d.ts +18 -0
- package/dist/src/context/injector.d.ts.map +1 -0
- package/dist/src/context/injector.js +71 -0
- package/dist/src/context/injector.js.map +1 -0
- package/dist/src/context/relevance.d.ts +13 -0
- package/dist/src/context/relevance.d.ts.map +1 -0
- package/dist/src/context/relevance.js +44 -0
- package/dist/src/context/relevance.js.map +1 -0
- package/dist/src/daemon/batch.d.ts +22 -0
- package/dist/src/daemon/batch.d.ts.map +1 -0
- package/dist/src/daemon/batch.js +38 -0
- package/dist/src/daemon/batch.js.map +1 -0
- package/dist/src/daemon/lifecycle.d.ts +27 -0
- package/dist/src/daemon/lifecycle.d.ts.map +1 -0
- package/dist/src/daemon/lifecycle.js +50 -0
- package/dist/src/daemon/lifecycle.js.map +1 -0
- package/dist/src/daemon/lineage.d.ts +42 -0
- package/dist/src/daemon/lineage.d.ts.map +1 -0
- package/dist/src/daemon/lineage.js +116 -0
- package/dist/src/daemon/lineage.js.map +1 -0
- package/dist/src/daemon/logger.d.ts +33 -0
- package/dist/src/daemon/logger.d.ts.map +1 -0
- package/dist/src/daemon/logger.js +88 -0
- package/dist/src/daemon/logger.js.map +1 -0
- package/dist/src/daemon/main.d.ts +2 -0
- package/dist/src/daemon/main.d.ts.map +1 -0
- package/dist/src/daemon/main.js +738 -0
- package/dist/src/daemon/main.js.map +1 -0
- package/dist/src/daemon/processor.d.ts +44 -0
- package/dist/src/daemon/processor.d.ts.map +1 -0
- package/dist/src/daemon/processor.js +142 -0
- package/dist/src/daemon/processor.js.map +1 -0
- package/dist/src/daemon/server.d.ts +24 -0
- package/dist/src/daemon/server.d.ts.map +1 -0
- package/dist/src/daemon/server.js +117 -0
- package/dist/src/daemon/server.js.map +1 -0
- package/dist/src/daemon/watcher.d.ts +29 -0
- package/dist/src/daemon/watcher.d.ts.map +1 -0
- package/dist/src/daemon/watcher.js +67 -0
- package/dist/src/daemon/watcher.js.map +1 -0
- package/dist/src/hooks/client.d.ts +20 -0
- package/dist/src/hooks/client.d.ts.map +1 -0
- package/dist/src/hooks/client.js +111 -0
- package/dist/src/hooks/client.js.map +1 -0
- package/dist/src/hooks/post-tool-use.d.ts +2 -0
- package/dist/src/hooks/post-tool-use.d.ts.map +1 -0
- package/dist/src/hooks/post-tool-use.js +40 -0
- package/dist/src/hooks/post-tool-use.js.map +1 -0
- package/dist/src/hooks/read-stdin.d.ts +2 -0
- package/dist/src/hooks/read-stdin.d.ts.map +1 -0
- package/dist/src/hooks/read-stdin.js +10 -0
- package/dist/src/hooks/read-stdin.js.map +1 -0
- package/dist/src/hooks/session-end.d.ts +2 -0
- package/dist/src/hooks/session-end.d.ts.map +1 -0
- package/dist/src/hooks/session-end.js +23 -0
- package/dist/src/hooks/session-end.js.map +1 -0
- package/dist/src/hooks/session-start.d.ts +2 -0
- package/dist/src/hooks/session-start.d.ts.map +1 -0
- package/dist/src/hooks/session-start.js +49 -0
- package/dist/src/hooks/session-start.js.map +1 -0
- package/dist/src/hooks/stop.d.ts +2 -0
- package/dist/src/hooks/stop.d.ts.map +1 -0
- package/dist/src/hooks/stop.js +34 -0
- package/dist/src/hooks/stop.js.map +1 -0
- package/dist/src/hooks/user-prompt-submit.d.ts +2 -0
- package/dist/src/hooks/user-prompt-submit.d.ts.map +1 -0
- package/dist/src/hooks/user-prompt-submit.js +46 -0
- package/dist/src/hooks/user-prompt-submit.js.map +1 -0
- package/dist/src/index/fts.d.ts +16 -0
- package/dist/src/index/fts.d.ts.map +1 -0
- package/dist/src/index/fts.js +53 -0
- package/dist/src/index/fts.js.map +1 -0
- package/dist/src/index/rebuild.d.ts +4 -0
- package/dist/src/index/rebuild.d.ts.map +1 -0
- package/dist/src/index/rebuild.js +40 -0
- package/dist/src/index/rebuild.js.map +1 -0
- package/dist/src/index/sqlite.d.ts +33 -0
- package/dist/src/index/sqlite.d.ts.map +1 -0
- package/dist/src/index/sqlite.js +99 -0
- package/dist/src/index/sqlite.js.map +1 -0
- package/dist/src/index/vectors.d.ts +24 -0
- package/dist/src/index/vectors.d.ts.map +1 -0
- package/dist/src/index/vectors.js +97 -0
- package/dist/src/index/vectors.js.map +1 -0
- package/dist/src/intelligence/anthropic.d.ts +17 -0
- package/dist/src/intelligence/anthropic.d.ts.map +1 -0
- package/dist/src/intelligence/anthropic.js +36 -0
- package/dist/src/intelligence/anthropic.js.map +1 -0
- package/dist/src/intelligence/embeddings.d.ts +3 -0
- package/dist/src/intelligence/embeddings.d.ts.map +1 -0
- package/dist/src/intelligence/embeddings.js +15 -0
- package/dist/src/intelligence/embeddings.js.map +1 -0
- package/dist/src/intelligence/haiku.d.ts +17 -0
- package/dist/src/intelligence/haiku.d.ts.map +1 -0
- package/dist/src/intelligence/haiku.js +35 -0
- package/dist/src/intelligence/haiku.js.map +1 -0
- package/dist/src/intelligence/llm.d.ts +33 -0
- package/dist/src/intelligence/llm.d.ts.map +1 -0
- package/dist/src/intelligence/llm.js +26 -0
- package/dist/src/intelligence/llm.js.map +1 -0
- package/dist/src/intelligence/lm-studio.d.ts +20 -0
- package/dist/src/intelligence/lm-studio.d.ts.map +1 -0
- package/dist/src/intelligence/lm-studio.js +59 -0
- package/dist/src/intelligence/lm-studio.js.map +1 -0
- package/dist/src/intelligence/ollama.d.ts +22 -0
- package/dist/src/intelligence/ollama.d.ts.map +1 -0
- package/dist/src/intelligence/ollama.js +64 -0
- package/dist/src/intelligence/ollama.js.map +1 -0
- package/dist/src/intelligence/response.d.ts +29 -0
- package/dist/src/intelligence/response.d.ts.map +1 -0
- package/dist/src/intelligence/response.js +71 -0
- package/dist/src/intelligence/response.js.map +1 -0
- package/dist/src/intelligence/service.d.ts +18 -0
- package/dist/src/intelligence/service.d.ts.map +1 -0
- package/dist/src/intelligence/service.js +66 -0
- package/dist/src/intelligence/service.js.map +1 -0
- package/dist/src/logs/format.d.ts +6 -0
- package/dist/src/logs/format.d.ts.map +1 -0
- package/dist/src/logs/format.js +46 -0
- package/dist/src/logs/format.js.map +1 -0
- package/dist/src/logs/reader.d.ts +28 -0
- package/dist/src/logs/reader.d.ts.map +1 -0
- package/dist/src/logs/reader.js +106 -0
- package/dist/src/logs/reader.js.map +1 -0
- package/dist/src/mcp/server.d.ts +16 -0
- package/dist/src/mcp/server.d.ts.map +1 -0
- package/dist/src/mcp/server.js +305 -0
- package/dist/src/mcp/server.js.map +1 -0
- package/dist/src/mcp/tools/consolidate.d.ts +15 -0
- package/dist/src/mcp/tools/consolidate.d.ts.map +1 -0
- package/dist/src/mcp/tools/consolidate.js +49 -0
- package/dist/src/mcp/tools/consolidate.js.map +1 -0
- package/dist/src/mcp/tools/graph.d.ts +30 -0
- package/dist/src/mcp/tools/graph.d.ts.map +1 -0
- package/dist/src/mcp/tools/graph.js +106 -0
- package/dist/src/mcp/tools/graph.js.map +1 -0
- package/dist/src/mcp/tools/logs.d.ts +3 -0
- package/dist/src/mcp/tools/logs.d.ts.map +1 -0
- package/dist/src/mcp/tools/logs.js +7 -0
- package/dist/src/mcp/tools/logs.js.map +1 -0
- package/dist/src/mcp/tools/plans.d.ts +23 -0
- package/dist/src/mcp/tools/plans.d.ts.map +1 -0
- package/dist/src/mcp/tools/plans.js +63 -0
- package/dist/src/mcp/tools/plans.js.map +1 -0
- package/dist/src/mcp/tools/recall.d.ts +30 -0
- package/dist/src/mcp/tools/recall.d.ts.map +1 -0
- package/dist/src/mcp/tools/recall.js +34 -0
- package/dist/src/mcp/tools/recall.js.map +1 -0
- package/dist/src/mcp/tools/remember.d.ts +15 -0
- package/dist/src/mcp/tools/remember.d.ts.map +1 -0
- package/dist/src/mcp/tools/remember.js +18 -0
- package/dist/src/mcp/tools/remember.js.map +1 -0
- package/dist/src/mcp/tools/search.d.ts +19 -0
- package/dist/src/mcp/tools/search.d.ts.map +1 -0
- package/dist/src/mcp/tools/search.js +59 -0
- package/dist/src/mcp/tools/search.js.map +1 -0
- package/dist/src/mcp/tools/sessions.d.ts +21 -0
- package/dist/src/mcp/tools/sessions.d.ts.map +1 -0
- package/dist/src/mcp/tools/sessions.js +36 -0
- package/dist/src/mcp/tools/sessions.js.map +1 -0
- package/dist/src/mcp/tools/supersede.d.ts +14 -0
- package/dist/src/mcp/tools/supersede.d.ts.map +1 -0
- package/dist/src/mcp/tools/supersede.js +30 -0
- package/dist/src/mcp/tools/supersede.js.map +1 -0
- package/dist/src/mcp/tools/team.d.ts +16 -0
- package/dist/src/mcp/tools/team.d.ts.map +1 -0
- package/dist/src/mcp/tools/team.js +32 -0
- package/dist/src/mcp/tools/team.js.map +1 -0
- package/dist/src/obsidian/formatter.d.ts +80 -0
- package/dist/src/obsidian/formatter.d.ts.map +1 -0
- package/dist/src/obsidian/formatter.js +227 -0
- package/dist/src/obsidian/formatter.js.map +1 -0
- package/dist/src/prompts/classification.md +42 -0
- package/dist/src/prompts/extraction.md +45 -0
- package/dist/src/prompts/index.d.ts +13 -0
- package/dist/src/prompts/index.d.ts.map +1 -0
- package/dist/src/prompts/index.js +75 -0
- package/dist/src/prompts/index.js.map +1 -0
- package/dist/src/prompts/session-similarity.md +24 -0
- package/dist/src/prompts/summary.md +9 -0
- package/dist/src/prompts/title.md +8 -0
- package/dist/src/vault/frontmatter.d.ts +6 -0
- package/dist/src/vault/frontmatter.d.ts.map +1 -0
- package/dist/src/vault/frontmatter.js +10 -0
- package/dist/src/vault/frontmatter.js.map +1 -0
- package/dist/src/vault/observations.d.ts +10 -0
- package/dist/src/vault/observations.d.ts.map +1 -0
- package/dist/src/vault/observations.js +33 -0
- package/dist/src/vault/observations.js.map +1 -0
- package/dist/src/vault/reader.d.ts +10 -0
- package/dist/src/vault/reader.d.ts.map +1 -0
- package/dist/src/vault/reader.js +48 -0
- package/dist/src/vault/reader.js.map +1 -0
- package/dist/src/vault/resolve.d.ts +18 -0
- package/dist/src/vault/resolve.d.ts.map +1 -0
- package/dist/src/vault/resolve.js +51 -0
- package/dist/src/vault/resolve.js.map +1 -0
- package/dist/src/vault/session-id.d.ts +16 -0
- package/dist/src/vault/session-id.d.ts.map +1 -0
- package/dist/src/vault/session-id.js +29 -0
- package/dist/src/vault/session-id.js.map +1 -0
- package/dist/src/vault/types.d.ts +88 -0
- package/dist/src/vault/types.d.ts.map +1 -0
- package/dist/src/vault/types.js +94 -0
- package/dist/src/vault/types.js.map +1 -0
- package/dist/src/vault/writer.d.ts +66 -0
- package/dist/src/vault/writer.d.ts.map +1 -0
- package/dist/src/vault/writer.js +217 -0
- package/dist/src/vault/writer.js.map +1 -0
- package/hooks/hooks.json +60 -0
- package/package.json +52 -0
- package/skills/myco/SKILL.md +206 -0
- package/skills/myco/references/wisdom.md +61 -0
- package/skills/rules/SKILL.md +185 -0
- package/skills/rules/references/rules-bad-example.md +106 -0
- package/skills/rules/references/rules-good-example.md +90 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "myco-plugins",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "goondocks-co"
|
|
5
|
+
},
|
|
6
|
+
"metadata": {
|
|
7
|
+
"description": "Myco — collective agent intelligence plugins"
|
|
8
|
+
},
|
|
9
|
+
"plugins": [
|
|
10
|
+
{
|
|
11
|
+
"name": "myco",
|
|
12
|
+
"source": {
|
|
13
|
+
"source": "npm",
|
|
14
|
+
"package": "@goondocks/myco"
|
|
15
|
+
},
|
|
16
|
+
"description": "Collective agent intelligence — captures session knowledge and serves it back via MCP",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"keywords": ["intelligence", "memory", "mcp", "sessions", "team", "knowledge"],
|
|
19
|
+
"category": "productivity"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "myco",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Collective agent intelligence — captures session knowledge and serves it back to your team via MCP",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "goondocks-co",
|
|
7
|
+
"url": "https://github.com/goondocks-co"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"keywords": ["intelligence", "memory", "mcp", "sessions", "team", "knowledge"],
|
|
11
|
+
"mcpServers": {
|
|
12
|
+
"myco": {
|
|
13
|
+
"command": "node",
|
|
14
|
+
"args": ["${CLAUDE_PLUGIN_ROOT}/dist/src/mcp/server.js"],
|
|
15
|
+
"env": {}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Contributing to Myco
|
|
2
|
+
|
|
3
|
+
Myco is a plugin for collective agent intelligence, supporting Claude Code and Cursor. This guide covers development setup and project conventions. For architecture details, see [Lifecycle docs](docs/lifecycle.md).
|
|
4
|
+
|
|
5
|
+
## Installing Myco (End Users)
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
claude plugin marketplace add goondocks-co/myco
|
|
9
|
+
claude plugin install myco@myco-plugins
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Then in any project:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
/myco-init
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
This sets up the vault, configures your LLM backend, and starts capturing session knowledge.
|
|
19
|
+
|
|
20
|
+
### Requirements
|
|
21
|
+
|
|
22
|
+
- Node.js 22+
|
|
23
|
+
- Claude Code or Cursor
|
|
24
|
+
- An LLM backend: [Ollama](https://ollama.com) (recommended) or an Anthropic API key
|
|
25
|
+
|
|
26
|
+
For Ollama, pull the recommended models:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
ollama pull gpt-oss
|
|
30
|
+
ollama pull nomic-embed-text
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Development Setup
|
|
34
|
+
|
|
35
|
+
### 1. Clone and install
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
git clone https://github.com/goondocks-co/myco.git
|
|
39
|
+
cd myco
|
|
40
|
+
npm install
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 2. Run locally
|
|
44
|
+
|
|
45
|
+
For **active development** (per-session, no install needed):
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
claude --plugin-dir /path/to/myco
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
For **persistent local dev** (survives across sessions):
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
claude plugin marketplace add /path/to/myco/.claude-plugin
|
|
55
|
+
claude plugin install myco
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 3. Initialize the vault
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
/myco-init
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
For dogfooding, the vault lives at `~/.myco/vaults/myco/` (configured via `MYCO_VAULT_DIR` in `.claude/settings.json`).
|
|
65
|
+
|
|
66
|
+
### 4. Verify
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
/myco-status
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Development Workflow
|
|
73
|
+
|
|
74
|
+
### Build and test
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
make build # lint + test + tsc + copy templates
|
|
78
|
+
make check # lint + test only (pre-commit gate)
|
|
79
|
+
make watch # tsc watch mode
|
|
80
|
+
make clean # remove dist/
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### After code changes
|
|
84
|
+
|
|
85
|
+
Hooks pick up new code on the next invocation. The daemon must be restarted separately:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
make build && node dist/src/cli.js restart
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Project Structure
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
myco/
|
|
95
|
+
├── .claude-plugin/ # Claude Code + VS Code plugin manifest + marketplace
|
|
96
|
+
├── .cursor-plugin/ # Cursor plugin manifest + marketplace
|
|
97
|
+
├── hooks/ # Hook registration shell scripts
|
|
98
|
+
├── commands/ # Slash commands (/myco-init, /myco-status, /myco-setup-llm)
|
|
99
|
+
├── skills/ # Agent skills
|
|
100
|
+
├── src/
|
|
101
|
+
│ ├── agents/ # Agent adapters (Claude Code, Cursor) — transcript parsing + image capture
|
|
102
|
+
│ ├── capture/ # Event buffering + buffer-based turn fallback
|
|
103
|
+
│ ├── config/ # Config schema and loader
|
|
104
|
+
│ ├── context/ # Context injection for UserPromptSubmit hook
|
|
105
|
+
│ ├── daemon/ # Long-lived HTTP daemon: session lifecycle, batch processing, plan watching
|
|
106
|
+
│ ├── hooks/ # Hook entry points (thin — delegate to daemon)
|
|
107
|
+
│ ├── index/ # SQLite FTS5 + sqlite-vec vector search
|
|
108
|
+
│ ├── intelligence/ # LLM backends (Ollama, LM Studio, Anthropic)
|
|
109
|
+
│ ├── mcp/ # MCP server + tool handlers
|
|
110
|
+
│ ├── prompts/ # LLM prompt templates
|
|
111
|
+
│ └── vault/ # Reader, writer, Zod schemas for vault notes
|
|
112
|
+
├── tests/ # Mirrors src/ structure
|
|
113
|
+
├── docs/ # Lifecycle, quickstart, doc site
|
|
114
|
+
└── Makefile # Dev shortcuts
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Architecture
|
|
118
|
+
|
|
119
|
+
See [docs/lifecycle.md](docs/lifecycle.md) for the full lifecycle with diagrams. Key points:
|
|
120
|
+
|
|
121
|
+
- **Hooks are thin** — they delegate to the daemon via HTTP. No business logic in hooks.
|
|
122
|
+
- **The daemon is the authority** — all event processing, session note writing, and observation extraction happen there.
|
|
123
|
+
- **Transcripts are the source of truth** — session conversation turns are read from the agent's native transcript file (Claude Code `.jsonl`, Cursor `.txt`/`.jsonl`), not from Myco's event buffer. The buffer is the fallback when no transcript is available.
|
|
124
|
+
- **Session notes are rebuilt** — on each stop event, the full conversation is re-parsed from the transcript and the session note is regenerated. Data preservation is guaranteed by the transcript being append-only.
|
|
125
|
+
|
|
126
|
+
## Distribution
|
|
127
|
+
|
|
128
|
+
Published as `@goondocks/myco` on [npmjs.org](https://www.npmjs.com/package/@goondocks/myco).
|
|
129
|
+
|
|
130
|
+
1. Push to `main` — CI runs lint + tests
|
|
131
|
+
2. Tag a release (`v0.x.y`) — triggers the publish workflow
|
|
132
|
+
3. `npm publish` builds and pushes to npmjs.org
|
|
133
|
+
4. Users get the new version via `claude plugin update myco`
|
|
134
|
+
|
|
135
|
+
## Conventions
|
|
136
|
+
|
|
137
|
+
- TypeScript strict mode, ES modules
|
|
138
|
+
- Plain `tsc` for build (native deps like `better-sqlite3` can't be bundled)
|
|
139
|
+
- `make check` must pass before committing
|
|
140
|
+
- Prompt templates are markdown with `{{placeholder}}` syntax
|
|
141
|
+
- Config is YAML (`myco.yaml`), vault notes are markdown with YAML frontmatter
|
|
142
|
+
- No magic literals — extract named constants
|
|
143
|
+
- Idempotent operations by default
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Goondocks Consulting
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/hero-wide.svg" alt="Myco" width="100%">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<strong>The connected intelligence layer for agents and AI-assisted teams</strong>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://github.com/goondocks-co/myco/actions/workflows/ci.yml"><img src="https://github.com/goondocks-co/myco/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
11
|
+
<a href="https://github.com/goondocks-co/myco/actions/workflows/publish.yml"><img src="https://github.com/goondocks-co/myco/actions/workflows/publish.yml/badge.svg" alt="Release"></a>
|
|
12
|
+
<a href="https://github.com/goondocks-co/myco/releases/latest"><img src="https://img.shields.io/github/v/release/goondocks-co/myco?label=version&color=22c55e" alt="Version"></a>
|
|
13
|
+
<a href="https://github.com/goondocks-co/myco/blob/main/LICENSE"><img src="https://img.shields.io/github/license/goondocks-co/myco?color=22c55e" alt="License"></a>
|
|
14
|
+
<img src="https://img.shields.io/badge/node-%3E%3D22-22c55e" alt="Node 22+">
|
|
15
|
+
<img src="https://img.shields.io/badge/agents-Claude%20%7C%20Cursor%20%7C%20VS%20Code-22c55e" alt="Claude | Cursor | VS Code">
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Add the Myco marketplace and install
|
|
20
|
+
claude plugin marketplace add goondocks-co/myco
|
|
21
|
+
claude plugin install myco@myco-plugins
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Then initialize in your project:
|
|
25
|
+
```
|
|
26
|
+
> /myco-init
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The agent sets up your vault, configures intelligence, and starts capturing. Works with Claude Code and Cursor out of the box.
|
|
30
|
+
|
|
31
|
+
## What is Myco?
|
|
32
|
+
|
|
33
|
+
Myco captures everything your AI agents do — sessions, decisions, plans, discoveries — and connects them into a searchable intelligence graph stored as an [Obsidian](https://obsidian.md) vault. Named after [mycorrhizal networks](https://en.wikipedia.org/wiki/Mycorrhizal_network), the underground fungal systems that connect trees in a forest, Myco is the invisible network linking your agents and team members, sharing intelligence beneath the surface.
|
|
34
|
+
|
|
35
|
+
**For agents** — MCP tools let any agent runtime search, recall, and build on your team's accumulated knowledge.
|
|
36
|
+
```
|
|
37
|
+
myco_search("how did we handle auth?") → semantically matched sessions, decisions, and linked context
|
|
38
|
+
myco_recall("migration plan") → full decision history with session lineage
|
|
39
|
+
myco_remember(observation) → persist a discovery for the team
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**For humans** — open the vault in Obsidian and browse the intelligence graph visually. Sessions link to plans, plans link to decisions, decisions link to memories. It's all Markdown with backlinks — your team's connected knowledge, navigable and searchable.
|
|
43
|
+
|
|
44
|
+
**For teams** — the vault is a Git-friendly directory of Markdown files. Share it through your existing Git workflow.
|
|
45
|
+
|
|
46
|
+
## How it works
|
|
47
|
+
|
|
48
|
+
### Capture
|
|
49
|
+
|
|
50
|
+
A background daemon reads your agent's conversation transcript after each turn — the full dialogue including prompts, AI responses, tool calls, and screenshots. Observations (decisions, gotchas, discoveries) are extracted automatically via a local LLM and written as linked vault notes.
|
|
51
|
+
|
|
52
|
+
### Index
|
|
53
|
+
|
|
54
|
+
Every note is indexed for both keyword search (SQLite FTS5) and semantic search (vector embeddings via Ollama or LM Studio). The index is fully rebuildable from the Markdown source of truth.
|
|
55
|
+
|
|
56
|
+
### Serve
|
|
57
|
+
|
|
58
|
+
An MCP server exposes the vault to any agent runtime. Relevant memories are injected into every prompt automatically — no manual lookup needed. Agents build on your team's accumulated knowledge without being told to.
|
|
59
|
+
|
|
60
|
+
### Connect
|
|
61
|
+
|
|
62
|
+
Sessions link to plans. Plans link to decisions. Decisions link to memories. Obsidian backlinks and metadata create a navigable graph of your team's institutional knowledge. Open the vault in [Obsidian](https://obsidian.md) to browse it visually, or let agents traverse it via MCP tools.
|
|
63
|
+
|
|
64
|
+
### Multi-agent
|
|
65
|
+
|
|
66
|
+
Myco reads conversation transcripts from Claude Code, Cursor, and any agent that writes JSONL transcripts. Screenshots shared during sessions are extracted and embedded as Obsidian image attachments. A plugin adapter registry makes adding new agents straightforward.
|
|
67
|
+
|
|
68
|
+
## Contributing
|
|
69
|
+
|
|
70
|
+
Contributions welcome. See the [Contributing Guide](CONTRIBUTING.md) for development setup, and the [Lifecycle docs](docs/lifecycle.md) for architecture details. Please open an issue to discuss before submitting a PR.
|
|
71
|
+
|
|
72
|
+
## License
|
|
73
|
+
|
|
74
|
+
MIT
|
package/commands/init.md
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: myco-init
|
|
3
|
+
description: Initialize Myco in the current project — sets up vault, config, and intelligence backend
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Initialize Myco
|
|
7
|
+
|
|
8
|
+
Set up Myco for this project. Guide the user through:
|
|
9
|
+
|
|
10
|
+
## Step 0: Detect vault location
|
|
11
|
+
|
|
12
|
+
The vault defaults to `.myco/` in the project root — the team's intelligence lives with the code and is committed to git.
|
|
13
|
+
|
|
14
|
+
Check whether `MYCO_VAULT_DIR` is set as an override:
|
|
15
|
+
|
|
16
|
+
- Check the process environment for `MYCO_VAULT_DIR`
|
|
17
|
+
- Also check `.claude/settings.json` under the `env` key for `MYCO_VAULT_DIR`
|
|
18
|
+
- If found and non-empty, use that path instead — **do not ask the user where to put the vault**
|
|
19
|
+
- If not found, use `.myco/` in the project root (the default)
|
|
20
|
+
|
|
21
|
+
The `MYCO_VAULT_DIR` override is for public repos or cases where the vault should be kept separate from the codebase. For most private projects, the default is correct.
|
|
22
|
+
|
|
23
|
+
Record the **vault path source** for use in the setup summary:
|
|
24
|
+
- `"from MYCO_VAULT_DIR env"` — if the env var override was set
|
|
25
|
+
- `"default (.myco/)"` — project-local vault (recommended for private repos)
|
|
26
|
+
|
|
27
|
+
## Step 1: Create vault directory
|
|
28
|
+
|
|
29
|
+
Create the vault directory (at the resolved path from Step 0) with subdirectories:
|
|
30
|
+
`sessions`, `plans`, `memories`, `artifacts`, `team`, `buffer`, `logs`
|
|
31
|
+
|
|
32
|
+
Also create a `_dashboard.md` file in the vault root with the following Dataview-powered content:
|
|
33
|
+
|
|
34
|
+
```markdown
|
|
35
|
+
# Myco Vault
|
|
36
|
+
|
|
37
|
+
## Active Plans
|
|
38
|
+
\`\`\`dataview
|
|
39
|
+
TABLE status, tags FROM #type/plan
|
|
40
|
+
WHERE status = "active" OR status = "in_progress"
|
|
41
|
+
SORT created DESC
|
|
42
|
+
\`\`\`
|
|
43
|
+
|
|
44
|
+
## Recent Sessions
|
|
45
|
+
\`\`\`dataview
|
|
46
|
+
TABLE user, started, tools_used FROM #type/session
|
|
47
|
+
SORT started DESC LIMIT 10
|
|
48
|
+
\`\`\`
|
|
49
|
+
|
|
50
|
+
## Recent Memories
|
|
51
|
+
\`\`\`dataview
|
|
52
|
+
TABLE observation_type AS "Type", created FROM #type/memory
|
|
53
|
+
SORT created DESC LIMIT 15
|
|
54
|
+
\`\`\`
|
|
55
|
+
|
|
56
|
+
## Memories by Type
|
|
57
|
+
\`\`\`dataview
|
|
58
|
+
TABLE WITHOUT ID observation_type AS "Type", length(rows) AS "Count"
|
|
59
|
+
FROM #type/memory GROUP BY observation_type
|
|
60
|
+
SORT length(rows) DESC
|
|
61
|
+
\`\`\`
|
|
62
|
+
|
|
63
|
+
## Gotchas
|
|
64
|
+
\`\`\`dataview
|
|
65
|
+
LIST FROM #memory/gotcha SORT created DESC LIMIT 10
|
|
66
|
+
\`\`\`
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
This dashboard requires the Dataview community plugin in Obsidian. Without it, the code blocks are visible but still readable as plain markdown.
|
|
70
|
+
|
|
71
|
+
## Step 2: Choose intelligence backend
|
|
72
|
+
|
|
73
|
+
Configure LLM and embedding providers independently:
|
|
74
|
+
|
|
75
|
+
### LLM provider
|
|
76
|
+
|
|
77
|
+
Ask the user to choose an LLM provider:
|
|
78
|
+
|
|
79
|
+
- **Ollama** — detect at `http://localhost:11434/api/tags`, list available models
|
|
80
|
+
- **LM Studio** — detect at `http://localhost:1234/v1/models`, list available models
|
|
81
|
+
- **Anthropic** — uses existing `ANTHROPIC_API_KEY`, verify it's set
|
|
82
|
+
|
|
83
|
+
Recommended summarization models by hardware tier:
|
|
84
|
+
|
|
85
|
+
| Tier | Models | RAM | Notes |
|
|
86
|
+
|------|--------|-----|-------|
|
|
87
|
+
| **High** (best quality) | `gpt-oss` (~20B), `gemma3:27b`, `qwen3.5:14b` | 16GB+ | Best observation extraction and structured JSON output |
|
|
88
|
+
| **Mid** (good balance) | `qwen3.5:8b`, `gemma3:12b` | 8GB+ | Good quality, reasonable speed |
|
|
89
|
+
| **Light** (resource constrained) | `gemma3:4b`, `qwen3.5:4b` | 4GB+ | Faster, may miss nuanced observations |
|
|
90
|
+
|
|
91
|
+
If the user already has a model loaded, prefer using what they have — any instruction-tuned model that handles JSON output well will work. The model only needs to produce structured JSON (observation extraction) and short text (summaries, titles).
|
|
92
|
+
|
|
93
|
+
For the selected provider, list available models and let the user choose. Also set:
|
|
94
|
+
- `context_window` (default 8192) — only for local providers, not Anthropic
|
|
95
|
+
- `max_tokens` (default 1024)
|
|
96
|
+
|
|
97
|
+
If the recommended model isn't available, offer to pull it:
|
|
98
|
+
- **Ollama**: `ollama pull gpt-oss` (pulls latest tag automatically)
|
|
99
|
+
- **LM Studio**: `lms get openai/gpt-oss-20b` (uses `owner/model` format)
|
|
100
|
+
|
|
101
|
+
Ask the user before pulling — models can be large (hundreds of MB to several GB).
|
|
102
|
+
|
|
103
|
+
### Embedding provider
|
|
104
|
+
|
|
105
|
+
Ask the user to choose an embedding provider. **Anthropic is not an option here** — it doesn't support embeddings.
|
|
106
|
+
|
|
107
|
+
- **Ollama** — detect at `http://localhost:11434/api/tags`, list available models, recommend `bge-m3` or `nomic-embed-text`. Ollama is the recommended provider for embeddings.
|
|
108
|
+
- **LM Studio** — possible but not recommended for embeddings. LM Studio is better suited for LLM/summarization work.
|
|
109
|
+
|
|
110
|
+
For the selected provider, list available models and let the user choose.
|
|
111
|
+
|
|
112
|
+
If the recommended embedding model isn't installed, offer to pull it — embedding models are typically small (~300-700MB):
|
|
113
|
+
- **Ollama**: `ollama pull bge-m3`
|
|
114
|
+
|
|
115
|
+
## Step 3: Team / solo setup
|
|
116
|
+
|
|
117
|
+
Ask whether this is a team or solo project:
|
|
118
|
+
|
|
119
|
+
- **Solo** — vault stays local, not tracked by git
|
|
120
|
+
- **Team** — set up git tracking for the vault directory, ask for username
|
|
121
|
+
|
|
122
|
+
If `MYCO_VAULT_DIR` is set in the environment, also offer:
|
|
123
|
+
- **Use MYCO_VAULT_DIR from env** — treat the env-specified vault as a shared/external vault managed outside this repo; skip git tracking
|
|
124
|
+
|
|
125
|
+
## Step 4: Write `myco.yaml`
|
|
126
|
+
|
|
127
|
+
Write a `version: 2` config file with chosen settings. **All configurable values must be explicit** — no hidden schema defaults. Example output:
|
|
128
|
+
|
|
129
|
+
```yaml
|
|
130
|
+
version: 2
|
|
131
|
+
|
|
132
|
+
intelligence:
|
|
133
|
+
llm:
|
|
134
|
+
provider: ollama
|
|
135
|
+
model: gpt-oss
|
|
136
|
+
base_url: http://localhost:11434
|
|
137
|
+
context_window: 8192
|
|
138
|
+
max_tokens: 1024
|
|
139
|
+
embedding:
|
|
140
|
+
provider: ollama
|
|
141
|
+
model: bge-m3
|
|
142
|
+
base_url: http://localhost:11434
|
|
143
|
+
|
|
144
|
+
daemon:
|
|
145
|
+
log_level: info
|
|
146
|
+
grace_period: 30
|
|
147
|
+
max_log_size: 5242880
|
|
148
|
+
|
|
149
|
+
capture:
|
|
150
|
+
transcript_paths: []
|
|
151
|
+
artifact_watch:
|
|
152
|
+
- .claude/plans/
|
|
153
|
+
- .cursor/plans/
|
|
154
|
+
artifact_extensions:
|
|
155
|
+
- .md
|
|
156
|
+
buffer_max_events: 500
|
|
157
|
+
|
|
158
|
+
context:
|
|
159
|
+
max_tokens: 1200
|
|
160
|
+
layers:
|
|
161
|
+
plans: 200
|
|
162
|
+
sessions: 500
|
|
163
|
+
memories: 300
|
|
164
|
+
team: 200
|
|
165
|
+
|
|
166
|
+
team:
|
|
167
|
+
enabled: false
|
|
168
|
+
user: ""
|
|
169
|
+
sync: git
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Substitute the user's chosen providers, models, and base URLs. Set `team.enabled`, `team.user`, and `team.sync` based on Step 3.
|
|
173
|
+
|
|
174
|
+
## Step 5: Write vault `.gitignore`
|
|
175
|
+
|
|
176
|
+
Create a `.gitignore` inside the `.myco/` vault directory to exclude runtime artifacts while committing the knowledge:
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
# Runtime — rebuilt on daemon startup
|
|
180
|
+
index.db
|
|
181
|
+
index.db-wal
|
|
182
|
+
index.db-shm
|
|
183
|
+
vectors.db
|
|
184
|
+
|
|
185
|
+
# Daemon state — per-machine, ephemeral
|
|
186
|
+
daemon.json
|
|
187
|
+
buffer/
|
|
188
|
+
logs/
|
|
189
|
+
|
|
190
|
+
# Obsidian — per-user workspace config
|
|
191
|
+
.obsidian/
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Everything else is committed: `myco.yaml`, `sessions/`, `memories/`, `plans/`, `artifacts/`, `team/`, `lineage.json`, `_dashboard.md`. This is the project's institutional memory — it travels with the code.
|
|
195
|
+
|
|
196
|
+
## Step 6: Vault discovery and MCP
|
|
197
|
+
|
|
198
|
+
The default `.myco/` vault location requires no configuration — the vault resolver finds it automatically in the project root.
|
|
199
|
+
|
|
200
|
+
### If the user chose an external vault (MYCO_VAULT_DIR override)
|
|
201
|
+
|
|
202
|
+
Set `MYCO_VAULT_DIR` in the agent's settings so hooks and the MCP server can find the vault:
|
|
203
|
+
|
|
204
|
+
**Claude Code** — write to `.claude/settings.json`:
|
|
205
|
+
```json
|
|
206
|
+
{ "env": { "MYCO_VAULT_DIR": "<external vault path>" } }
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**Cursor / VS Code** — instruct the user to set `MYCO_VAULT_DIR` in their shell profile (`~/.zshrc`, `~/.bashrc`), or set it in the MCP server's env block if configuring manually.
|
|
210
|
+
|
|
211
|
+
### MCP server registration
|
|
212
|
+
|
|
213
|
+
All three agents (Claude Code, Cursor, VS Code Copilot) auto-discover the MCP server from the plugin manifest when installed via the marketplace. No manual `.mcp.json` editing is needed.
|
|
214
|
+
|
|
215
|
+
## Step 7: Setup summary
|
|
216
|
+
|
|
217
|
+
After setup, display a summary:
|
|
218
|
+
|
|
219
|
+
| Setting | Value |
|
|
220
|
+
|---------|-------|
|
|
221
|
+
| Vault path | `<resolved path>` (`<vault path source>`) |
|
|
222
|
+
| LLM provider | `<provider>` / `<model>` |
|
|
223
|
+
| Embedding provider | `<provider>` / `<model>` |
|
|
224
|
+
| Context window | `<context_window>` |
|
|
225
|
+
| Team mode | `<enabled/disabled>` |
|
|
226
|
+
|
|
227
|
+
Then confirm everything is working:
|
|
228
|
+
1. Verify the LLM provider is reachable (call `isAvailable()`)
|
|
229
|
+
2. Verify the embedding provider is reachable (call `isAvailable()`)
|
|
230
|
+
3. Run a test embedding to confirm dimensions
|
|
231
|
+
4. Report success or issues found
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: myco-setup-llm
|
|
3
|
+
description: Configure or change the intelligence backend (Ollama, LM Studio, or Anthropic)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# LLM Backend Setup
|
|
7
|
+
|
|
8
|
+
Guide the user through configuring their intelligence backend. This command can be run at any time to change providers or models.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
Read the existing `myco.yaml` from the vault directory to show current settings before making changes.
|
|
13
|
+
|
|
14
|
+
## Step 1: Detect available providers
|
|
15
|
+
|
|
16
|
+
Check which providers are reachable:
|
|
17
|
+
|
|
18
|
+
- **Ollama** — fetch `http://localhost:11434/api/tags`, list model names
|
|
19
|
+
- **LM Studio** — fetch `http://localhost:1234/v1/models`, list model names
|
|
20
|
+
- **Anthropic** — check if `ANTHROPIC_API_KEY` is set in the environment
|
|
21
|
+
|
|
22
|
+
Report which are available and which are not.
|
|
23
|
+
|
|
24
|
+
## Step 2: Choose LLM provider
|
|
25
|
+
|
|
26
|
+
Ask the user to select from available providers:
|
|
27
|
+
|
|
28
|
+
- **Ollama** — list available models
|
|
29
|
+
- **LM Studio** — list available models
|
|
30
|
+
- **Anthropic** — verify API key works, default model `claude-haiku-4-5-20251001`
|
|
31
|
+
|
|
32
|
+
Recommended summarization models by hardware tier:
|
|
33
|
+
|
|
34
|
+
| Tier | Models | RAM |
|
|
35
|
+
|------|--------|-----|
|
|
36
|
+
| **High** | `gpt-oss` (~20B), `gemma3:27b`, `qwen3.5:14b` | 16GB+ |
|
|
37
|
+
| **Mid** | `qwen3.5:8b`, `gemma3:12b` | 8GB+ |
|
|
38
|
+
| **Light** | `gemma3:4b`, `qwen3.5:4b` | 4GB+ |
|
|
39
|
+
|
|
40
|
+
Any instruction-tuned model that handles JSON output works. Prefer what the user already has loaded.
|
|
41
|
+
|
|
42
|
+
For local providers (Ollama, LM Studio), also configure:
|
|
43
|
+
- `context_window` — ask or accept default of 8192
|
|
44
|
+
- `max_tokens` — ask or accept default of 1024
|
|
45
|
+
|
|
46
|
+
If the chosen model isn't installed, offer to pull it:
|
|
47
|
+
- **Ollama**: `ollama pull gpt-oss` (pulls latest tag automatically)
|
|
48
|
+
- **LM Studio**: `lms get openai/gpt-oss-20b` (uses `owner/model` format)
|
|
49
|
+
|
|
50
|
+
These settings do not apply to Anthropic (API-managed).
|
|
51
|
+
|
|
52
|
+
## Step 3: Choose embedding provider
|
|
53
|
+
|
|
54
|
+
Ask the user to select from available providers — **Anthropic is not an option** (it doesn't support embeddings):
|
|
55
|
+
|
|
56
|
+
- **Ollama** (recommended for embeddings) — list available models, recommend **`bge-m3`** or `nomic-embed-text`
|
|
57
|
+
- **LM Studio** — possible but not recommended for embeddings; better suited for LLM work
|
|
58
|
+
|
|
59
|
+
If the embedding model isn't installed: `ollama pull bge-m3`
|
|
60
|
+
|
|
61
|
+
**Important:** If the user changes the embedding model, the vector index must be rebuilt. Warn them:
|
|
62
|
+
> "Changing the embedding model will require a full rebuild of the vector index. Run `node dist/src/cli.js rebuild` after this change."
|
|
63
|
+
|
|
64
|
+
## Step 4: Update `myco.yaml`
|
|
65
|
+
|
|
66
|
+
Write both `intelligence.llm` and `intelligence.embedding` sections with all values explicit:
|
|
67
|
+
|
|
68
|
+
```yaml
|
|
69
|
+
intelligence:
|
|
70
|
+
llm:
|
|
71
|
+
provider: ollama
|
|
72
|
+
model: gpt-oss
|
|
73
|
+
base_url: http://localhost:11434
|
|
74
|
+
context_window: 8192
|
|
75
|
+
max_tokens: 1024
|
|
76
|
+
embedding:
|
|
77
|
+
provider: ollama
|
|
78
|
+
model: bge-m3
|
|
79
|
+
base_url: http://localhost:11434
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
If migrating from a v1 config (has `backend: local/cloud` structure), bump `version` to `2` and rewrite the entire intelligence section. The loader auto-maps `provider: haiku` to `anthropic`.
|
|
83
|
+
|
|
84
|
+
## Step 5: Verify and restart
|
|
85
|
+
|
|
86
|
+
1. Test the LLM provider with a simple prompt
|
|
87
|
+
2. Test the embedding provider with a test embedding
|
|
88
|
+
3. Restart the daemon to pick up the new config: `node dist/src/cli.js restart`
|
|
89
|
+
4. Report success or issues found
|