@goondocks/myco 0.4.0 → 0.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CONTRIBUTING.md +4 -5
- package/README.md +1 -1
- package/dist/{chunk-P7RNAYU7.js → chunk-67R6EMYD.js} +61 -9
- package/dist/chunk-67R6EMYD.js.map +1 -0
- package/dist/{chunk-G6ZMTQMJ.js → chunk-6UJWI4IW.js} +3 -1
- package/dist/{chunk-G6ZMTQMJ.js.map → chunk-6UJWI4IW.js.map} +1 -1
- package/dist/{chunk-S7EIHYE7.js → chunk-FPEDTLQ6.js} +3 -3
- package/dist/{chunk-S7EIHYE7.js.map → chunk-FPEDTLQ6.js.map} +1 -1
- package/dist/{chunk-XHWIIU5D.js → chunk-GFBG73P4.js} +2 -2
- package/dist/{chunk-TZDDXRHG.js → chunk-I7PNZEBO.js} +2 -2
- package/dist/{chunk-IVS5MYBL.js → chunk-IYFKPSRP.js} +2 -2
- package/dist/{chunk-NUA7UTIY.js → chunk-MIU3DKLN.js} +2 -2
- package/dist/{chunk-VYV5IFD6.js → chunk-T7OC6GH5.js} +2 -2
- package/dist/chunk-TBRZAJ7W.js +135 -0
- package/dist/chunk-TBRZAJ7W.js.map +1 -0
- package/dist/{chunk-4FCFRJIQ.js → chunk-UKWO26VI.js} +2 -2
- package/dist/{chunk-YZO22BBI.js → chunk-V2OWD2VV.js} +4 -4
- package/dist/{chunk-RDXTQ436.js → chunk-WBT5DWGC.js} +2 -2
- package/dist/{cli-ZN6VBA7V.js → cli-PMOFCZQL.js} +15 -15
- package/dist/{config-4GGMWGAF.js → config-5FGLQGCW.js} +3 -3
- package/dist/{detect-providers-5FU3BN5Q.js → detect-providers-IRL2TTLK.js} +2 -2
- package/dist/{init-7UXGDOFS.js → init-NUF5UBUJ.js} +6 -6
- package/dist/{main-6UPAIDGS.js → main-2XEBVUR6.js} +19 -10
- package/dist/{main-6UPAIDGS.js.map → main-2XEBVUR6.js.map} +1 -1
- package/dist/{rebuild-QDSYYCS7.js → rebuild-E6YFIRYZ.js} +6 -6
- package/dist/{reprocess-ZNUQCIS3.js → reprocess-7G7KQWCN.js} +9 -9
- package/dist/{restart-5UY2KV54.js → restart-ABW4ZK3P.js} +3 -3
- package/dist/{search-2VEN3XIG.js → search-MPD7SFK6.js} +5 -5
- package/dist/{server-OR5B4B7K.js → server-NZLZRITH.js} +9 -9
- package/dist/{session-start-TUITIUMB.js → session-start-YB4A4PZB.js} +4 -4
- package/dist/{setup-digest-ETCZAUIU.js → setup-digest-K732MGOJ.js} +5 -5
- package/dist/{setup-llm-DWEJE3JE.js → setup-llm-XCCH5LYD.js} +5 -5
- package/dist/src/cli.js +1 -1
- package/dist/src/daemon/main.js +1 -1
- package/dist/src/hooks/session-start.js +1 -1
- package/dist/src/hooks/stop.js +2 -2
- package/dist/src/mcp/server.js +1 -1
- package/dist/{stats-IVIXIKTS.js → stats-6G7SN5YZ.js} +3 -3
- package/dist/{verify-4H6CEE5T.js → verify-JFHQH55Z.js} +5 -5
- package/package.json +1 -1
- package/skills/myco/SKILL.md +5 -1
- package/skills/myco/references/cli-usage.md +322 -0
- package/skills/myco/references/vault-status.md +224 -0
- package/skills/setup/SKILL.md +146 -0
- package/skills/setup/references/model-recommendations.md +77 -0
- package/commands/init.md +0 -122
- package/commands/setup-llm.md +0 -114
- package/commands/status.md +0 -130
- package/dist/chunk-P7RNAYU7.js.map +0 -1
- package/dist/chunk-QQ36XEJP.js +0 -38
- package/dist/chunk-QQ36XEJP.js.map +0 -1
- /package/dist/{chunk-XHWIIU5D.js.map → chunk-GFBG73P4.js.map} +0 -0
- /package/dist/{chunk-TZDDXRHG.js.map → chunk-I7PNZEBO.js.map} +0 -0
- /package/dist/{chunk-IVS5MYBL.js.map → chunk-IYFKPSRP.js.map} +0 -0
- /package/dist/{chunk-NUA7UTIY.js.map → chunk-MIU3DKLN.js.map} +0 -0
- /package/dist/{chunk-VYV5IFD6.js.map → chunk-T7OC6GH5.js.map} +0 -0
- /package/dist/{chunk-4FCFRJIQ.js.map → chunk-UKWO26VI.js.map} +0 -0
- /package/dist/{chunk-YZO22BBI.js.map → chunk-V2OWD2VV.js.map} +0 -0
- /package/dist/{chunk-RDXTQ436.js.map → chunk-WBT5DWGC.js.map} +0 -0
- /package/dist/{cli-ZN6VBA7V.js.map → cli-PMOFCZQL.js.map} +0 -0
- /package/dist/{config-4GGMWGAF.js.map → config-5FGLQGCW.js.map} +0 -0
- /package/dist/{detect-providers-5FU3BN5Q.js.map → detect-providers-IRL2TTLK.js.map} +0 -0
- /package/dist/{init-7UXGDOFS.js.map → init-NUF5UBUJ.js.map} +0 -0
- /package/dist/{rebuild-QDSYYCS7.js.map → rebuild-E6YFIRYZ.js.map} +0 -0
- /package/dist/{reprocess-ZNUQCIS3.js.map → reprocess-7G7KQWCN.js.map} +0 -0
- /package/dist/{restart-5UY2KV54.js.map → restart-ABW4ZK3P.js.map} +0 -0
- /package/dist/{search-2VEN3XIG.js.map → search-MPD7SFK6.js.map} +0 -0
- /package/dist/{server-OR5B4B7K.js.map → server-NZLZRITH.js.map} +0 -0
- /package/dist/{session-start-TUITIUMB.js.map → session-start-YB4A4PZB.js.map} +0 -0
- /package/dist/{setup-digest-ETCZAUIU.js.map → setup-digest-K732MGOJ.js.map} +0 -0
- /package/dist/{setup-llm-DWEJE3JE.js.map → setup-llm-XCCH5LYD.js.map} +0 -0
- /package/dist/{stats-IVIXIKTS.js.map → stats-6G7SN5YZ.js.map} +0 -0
- /package/dist/{verify-4H6CEE5T.js.map → verify-JFHQH55Z.js.map} +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Model Recommendations
|
|
2
|
+
|
|
3
|
+
Hardware-based guidance for choosing intelligence and embedding models during Myco setup.
|
|
4
|
+
|
|
5
|
+
## Intelligence Model (LLM)
|
|
6
|
+
|
|
7
|
+
One model handles all intelligence tasks — hooks, extraction, summaries, and digest. Size for digestion, the most demanding task (largest context window). The same model runs at 8192 context for hooks and at the digest context window below for synthesis.
|
|
8
|
+
|
|
9
|
+
| RAM | Recommended Model | Digest Context Window |
|
|
10
|
+
|-----|-------------------|-----------------------|
|
|
11
|
+
| **64GB+** | `qwen3.5:35b` (MoE, recommended) | 65536 |
|
|
12
|
+
| **32–64GB** | `qwen3.5:27b` | 32768 |
|
|
13
|
+
| **16–32GB** | `qwen3.5:latest` (~10B) | 16384 |
|
|
14
|
+
| **8–16GB** | `qwen3.5:4b` | 8192 |
|
|
15
|
+
|
|
16
|
+
### Why Qwen 3.5?
|
|
17
|
+
|
|
18
|
+
Qwen 3.5 models offer strong instruction-following and synthesis quality on local hardware. The MoE variant (`35b`) runs efficiently on 64GB+ systems because only a subset of parameters activate per token. Any instruction-tuned model that handles JSON output works — prefer what the user already has loaded, but recommend Qwen 3.5 for new setups.
|
|
19
|
+
|
|
20
|
+
### Pulling Models
|
|
21
|
+
|
|
22
|
+
**Ollama:**
|
|
23
|
+
```bash
|
|
24
|
+
ollama pull qwen3.5 # pulls latest tag (~10B)
|
|
25
|
+
ollama pull qwen3.5:4b # 4B variant
|
|
26
|
+
ollama pull qwen3.5:27b # 27B variant
|
|
27
|
+
ollama pull qwen3.5:35b # 35B MoE variant
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**LM Studio:** Search for `qwen3.5` in the model browser. Download the variant matching the RAM tier above.
|
|
31
|
+
|
|
32
|
+
## Embedding Model
|
|
33
|
+
|
|
34
|
+
Embedding models are separate from the intelligence model. Anthropic does not support embeddings — only Ollama and LM Studio provide embedding models.
|
|
35
|
+
|
|
36
|
+
Recommended embedding models:
|
|
37
|
+
- `bge-m3` — strong multilingual embeddings, good default
|
|
38
|
+
- `nomic-embed-text` — lightweight alternative
|
|
39
|
+
|
|
40
|
+
**Ollama:**
|
|
41
|
+
```bash
|
|
42
|
+
ollama pull bge-m3
|
|
43
|
+
ollama pull nomic-embed-text
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**LM Studio:** Filter the model list for names containing `text-embedding`. If none are available, search for and download an embedding model through the model browser.
|
|
47
|
+
|
|
48
|
+
## Inject Tier
|
|
49
|
+
|
|
50
|
+
Controls how much pre-computed context the agent receives at session start. Agents can always request a different tier on-demand via the `myco_context` MCP tool.
|
|
51
|
+
|
|
52
|
+
| RAM | Available Tiers | Default |
|
|
53
|
+
|-----|-----------------|---------|
|
|
54
|
+
| **64GB+** | 1500, 3000, 5000, 10000 | 3000 |
|
|
55
|
+
| **32–64GB** | 1500, 3000, 5000 | 3000 |
|
|
56
|
+
| **16–32GB** | 1500, 3000 | 1500 |
|
|
57
|
+
| **8–16GB** | 1500 | 1500 |
|
|
58
|
+
|
|
59
|
+
### Tier Descriptions
|
|
60
|
+
|
|
61
|
+
- **1500** — executive briefing (fastest, lightest)
|
|
62
|
+
- **3000** — team standup (recommended for most setups)
|
|
63
|
+
- **5000** — deep onboarding
|
|
64
|
+
- **10000** — institutional knowledge (richest, most context)
|
|
65
|
+
|
|
66
|
+
## Advanced: Separate Digestion Model
|
|
67
|
+
|
|
68
|
+
The guided setup configures one intelligence model for all tasks. Power users who want a separate, larger model specifically for digest can configure it via CLI:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js setup-digest \
|
|
72
|
+
--provider lm-studio \
|
|
73
|
+
--model "qwen/qwen3.5-35b-a3b" \
|
|
74
|
+
--context-window 65536
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
This is not exposed in the guided setup to avoid resource exhaustion from running two large models simultaneously.
|
package/commands/init.md
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
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
|
-
Guide the user through setup using the composable CLI commands. **Do NOT create files manually — the CLI handles all vault creation, config writing, and env configuration.**
|
|
9
|
-
|
|
10
|
-
**Ask each question one at a time using AskUserQuestion with selectable options.** Wait for the user's answer before proceeding to the next question. Do NOT combine multiple questions into one message.
|
|
11
|
-
|
|
12
|
-
The streamlined setup asks just four questions: vault location, provider, model, and embedding model. One model handles everything — hooks, extraction, summaries, and digest — sized for the most demanding task (digestion). Advanced configuration is available via CLI commands after init.
|
|
13
|
-
|
|
14
|
-
## Step 1: Detect available providers and system capabilities
|
|
15
|
-
|
|
16
|
-
Run the provider detection command and detect system RAM:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js detect-providers
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Detect RAM:
|
|
23
|
-
- **macOS**: `sysctl -n hw.memsize` (bytes → GB)
|
|
24
|
-
- **Linux**: parse `/proc/meminfo` for `MemTotal`
|
|
25
|
-
|
|
26
|
-
Parse the JSON output. This tells you which providers are running and what models are available.
|
|
27
|
-
|
|
28
|
-
## Step 2: Choose vault location
|
|
29
|
-
|
|
30
|
-
**Question:** "Where would you like to store the Myco vault?"
|
|
31
|
-
|
|
32
|
-
**Options:**
|
|
33
|
-
- "In the project (.myco/)" — vault lives with the code, can be committed to git for team sharing
|
|
34
|
-
- "Centralized (~/.myco/vaults/<project-name>/)" — vault stays outside the repo, good for public repos or personal use
|
|
35
|
-
- "Custom path" — specify your own location
|
|
36
|
-
|
|
37
|
-
## Step 3: Choose provider and model
|
|
38
|
-
|
|
39
|
-
**Question:** "Which LLM provider and model?"
|
|
40
|
-
|
|
41
|
-
List only providers where `available` is `true`. Recommend a model sized for digest based on detected RAM:
|
|
42
|
-
|
|
43
|
-
| RAM | Recommended Model | Digest Context |
|
|
44
|
-
|-----|-------------------|----------------|
|
|
45
|
-
| **64GB+** | `qwen3.5:35b` (MoE, recommended) | 65536 |
|
|
46
|
-
| **32–64GB** | `qwen3.5:27b` | 32768 |
|
|
47
|
-
| **16–32GB** | `qwen3.5:latest` (~10B) | 16384 |
|
|
48
|
-
| **8–16GB** | `qwen3.5:4b` | 8192 |
|
|
49
|
-
|
|
50
|
-
The same model handles hooks (at 8K context), extraction, summaries, and digest (at the larger context from the table). No separate model configuration needed.
|
|
51
|
-
|
|
52
|
-
If the model isn't installed, offer to pull it:
|
|
53
|
-
- **Ollama**: `ollama pull qwen3.5`
|
|
54
|
-
- **LM Studio**: search for `qwen3.5` in the model browser
|
|
55
|
-
|
|
56
|
-
## Step 4: Choose embedding model
|
|
57
|
-
|
|
58
|
-
**Question:** "Which embedding model?"
|
|
59
|
-
|
|
60
|
-
**Options:** List only providers that support embeddings (Anthropic does not):
|
|
61
|
-
- **Ollama** — list available embedding models. If none are available, offer to pull one (e.g., `bge-m3` or `nomic-embed-text`).
|
|
62
|
-
- **LM Studio** — filter the model list for names containing `text-embedding`. If none are available, guide the user to search for and download an embedding model through LM Studio's model browser.
|
|
63
|
-
|
|
64
|
-
If no embedding models are available on the chosen provider, help the user get one before proceeding.
|
|
65
|
-
|
|
66
|
-
## Step 5: Choose digest inject tier
|
|
67
|
-
|
|
68
|
-
**Question:** "How much context should the agent receive at session start?"
|
|
69
|
-
|
|
70
|
-
Based on RAM, present the recommended tiers:
|
|
71
|
-
|
|
72
|
-
| RAM | Options | Default |
|
|
73
|
-
|-----|---------|---------|
|
|
74
|
-
| **64GB+** | 1500, 3000, 5000, 10000 | 3000 |
|
|
75
|
-
| **32–64GB** | 1500, 3000, 5000 | 3000 |
|
|
76
|
-
| **16–32GB** | 1500, 3000 | 1500 |
|
|
77
|
-
| **8–16GB** | 1500 | 1500 |
|
|
78
|
-
|
|
79
|
-
**Options:**
|
|
80
|
-
- "1500 — executive briefing (fastest, lightest)"
|
|
81
|
-
- "3000 — team standup (recommended)"
|
|
82
|
-
- "5000 — deep onboarding"
|
|
83
|
-
- "10000 — institutional knowledge (richest)"
|
|
84
|
-
|
|
85
|
-
This controls what gets auto-injected at the start of every session. Agents can always request a different tier on-demand via the `myco_context` tool.
|
|
86
|
-
|
|
87
|
-
## Step 6: Run init and configure
|
|
88
|
-
|
|
89
|
-
Create the vault and apply settings:
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
# Create vault structure and base config
|
|
93
|
-
node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js init \
|
|
94
|
-
--vault <chosen-path> \
|
|
95
|
-
--llm-provider <provider> \
|
|
96
|
-
--llm-model <model> \
|
|
97
|
-
--embedding-provider <embedding-provider> \
|
|
98
|
-
--embedding-model <embedding-model>
|
|
99
|
-
|
|
100
|
-
# Set digest context window and inject tier based on user choices
|
|
101
|
-
node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js setup-digest \
|
|
102
|
-
--context-window <from-ram-table> \
|
|
103
|
-
--inject-tier <chosen-tier>
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Step 7: Verify connectivity
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js verify
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
If verification fails, help the user troubleshoot.
|
|
113
|
-
|
|
114
|
-
## Step 8: Display summary
|
|
115
|
-
|
|
116
|
-
| Setting | Value |
|
|
117
|
-
|---------|-------|
|
|
118
|
-
| Vault path | `<resolved path>` |
|
|
119
|
-
| Provider | `<provider>` / `<model>` |
|
|
120
|
-
| Embedding | `<embedding-provider>` / `<embedding-model>` |
|
|
121
|
-
| Digest | enabled (context: `<context-window>`) |
|
|
122
|
-
| RAM detected | `<X>` GB |
|
package/commands/setup-llm.md
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
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
|
-
The streamlined setup asks just three questions: provider, model, and embedding model. One model handles everything — hooks, extraction, summaries, and digest — at different context windows per request. Advanced configuration is available via the CLI for power users.
|
|
11
|
-
|
|
12
|
-
## Prerequisites
|
|
13
|
-
|
|
14
|
-
Read the existing `myco.yaml` from the vault directory to show current settings before making changes.
|
|
15
|
-
|
|
16
|
-
## Step 1: Detect available providers and system capabilities
|
|
17
|
-
|
|
18
|
-
Check which providers are reachable:
|
|
19
|
-
|
|
20
|
-
- **Ollama** — fetch `http://localhost:11434/api/tags`, list model names
|
|
21
|
-
- **LM Studio** — fetch `http://localhost:1234/v1/models`, list model names
|
|
22
|
-
- **Anthropic** — check if `ANTHROPIC_API_KEY` is set in the environment
|
|
23
|
-
|
|
24
|
-
Detect system RAM for recommendations:
|
|
25
|
-
- **macOS**: `sysctl -n hw.memsize` (bytes → GB)
|
|
26
|
-
- **Linux**: parse `/proc/meminfo` for `MemTotal`
|
|
27
|
-
|
|
28
|
-
Report which providers are available and the detected RAM.
|
|
29
|
-
|
|
30
|
-
## Step 2: Choose provider and model
|
|
31
|
-
|
|
32
|
-
Ask the user to select from available providers. After picking a provider, recommend a model sized for digest (the most demanding task). The same model handles hooks and extraction at smaller context windows automatically.
|
|
33
|
-
|
|
34
|
-
Recommended models by hardware tier — Qwen 3.5 is preferred for its strong instruction-following and synthesis quality:
|
|
35
|
-
|
|
36
|
-
| RAM | Model | Context for Digest |
|
|
37
|
-
|-----|-------|--------------------|
|
|
38
|
-
| **64GB+** | `qwen3.5:35b` (MoE, recommended) | 65536 |
|
|
39
|
-
| **32–64GB** | `qwen3.5:27b` | 32768 |
|
|
40
|
-
| **16–32GB** | `qwen3.5:latest` (~10B) | 16384 |
|
|
41
|
-
| **8–16GB** | `qwen3.5:4b` | 8192 |
|
|
42
|
-
|
|
43
|
-
Any instruction-tuned model that handles JSON output works. Prefer what the user already has loaded, but recommend Qwen 3.5 if they're starting fresh.
|
|
44
|
-
|
|
45
|
-
If the chosen model isn't installed, offer to pull it:
|
|
46
|
-
- **Ollama**: `ollama pull qwen3.5` (pulls latest tag automatically)
|
|
47
|
-
- **LM Studio**: search for `qwen3.5` in the model browser
|
|
48
|
-
|
|
49
|
-
## Step 3: Choose embedding model
|
|
50
|
-
|
|
51
|
-
Ask the user to select an embedding model — **Anthropic is not an option** (it doesn't support embeddings):
|
|
52
|
-
|
|
53
|
-
- **Ollama** — list available embedding models. If none are available, offer to pull one (e.g., `bge-m3` or `nomic-embed-text`).
|
|
54
|
-
- **LM Studio** — filter the model list for names containing `text-embedding`. If none are available, guide the user to search for and download an embedding model through LM Studio's model browser.
|
|
55
|
-
|
|
56
|
-
If no embedding models are available on the chosen provider, help the user get one before proceeding.
|
|
57
|
-
|
|
58
|
-
**Important:** If the user changes the embedding model, warn them:
|
|
59
|
-
> "Changing the embedding model will require a full rebuild of the vector index. Run `node dist/src/cli.js rebuild` after this change."
|
|
60
|
-
|
|
61
|
-
## Step 4: Apply settings
|
|
62
|
-
|
|
63
|
-
Use the CLI commands to write settings deterministically. The context window for the main LLM stays at 8192 (hooks don't need more). The digest context window is set based on the RAM tier recommendation.
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
# Set provider and model
|
|
67
|
-
node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js setup-llm \
|
|
68
|
-
--llm-provider <provider> \
|
|
69
|
-
--llm-model <model> \
|
|
70
|
-
--embedding-provider <embedding-provider> \
|
|
71
|
-
--embedding-model <embedding-model>
|
|
72
|
-
|
|
73
|
-
# Set digest context window based on RAM tier (model inherits from main LLM)
|
|
74
|
-
node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js setup-digest \
|
|
75
|
-
--context-window <from-ram-table>
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Only pass flags the user explicitly changed — Zod defaults handle the rest.
|
|
79
|
-
|
|
80
|
-
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`.
|
|
81
|
-
|
|
82
|
-
## Step 5: Verify and restart
|
|
83
|
-
|
|
84
|
-
1. Test the LLM provider with a simple prompt
|
|
85
|
-
2. Test the embedding provider with a test embedding
|
|
86
|
-
3. Restart the daemon to pick up the new config: `node dist/src/cli.js restart`
|
|
87
|
-
4. Report success or issues found
|
|
88
|
-
|
|
89
|
-
## Advanced Configuration
|
|
90
|
-
|
|
91
|
-
For power users who want fine-grained control, all settings are available via CLI:
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
# Separate digest model (e.g., larger model on LM Studio)
|
|
95
|
-
node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js setup-digest \
|
|
96
|
-
--provider lm-studio \
|
|
97
|
-
--model "qwen/qwen3.5-35b-a3b" \
|
|
98
|
-
--context-window 65536 \
|
|
99
|
-
--gpu-kv-cache false
|
|
100
|
-
|
|
101
|
-
# Custom tiers and injection
|
|
102
|
-
node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js setup-digest \
|
|
103
|
-
--tiers 1500,3000,5000,10000 \
|
|
104
|
-
--inject-tier 3000
|
|
105
|
-
|
|
106
|
-
# Capture token budgets
|
|
107
|
-
node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js setup-digest \
|
|
108
|
-
--extraction-tokens 2048 \
|
|
109
|
-
--summary-tokens 1024
|
|
110
|
-
|
|
111
|
-
# View current settings
|
|
112
|
-
node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js setup-llm --show
|
|
113
|
-
node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js setup-digest --show
|
|
114
|
-
```
|
package/commands/status.md
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: myco-status
|
|
3
|
-
description: Show Myco vault health, stats, and any pending issues
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Myco Status
|
|
7
|
-
|
|
8
|
-
Check and report the health of the Myco vault and daemon. Use the CLI (`node dist/src/cli.js stats`) for data, and supplement with direct checks where needed.
|
|
9
|
-
|
|
10
|
-
## Step 1: Resolve vault location
|
|
11
|
-
|
|
12
|
-
Find the vault directory:
|
|
13
|
-
- Check `MYCO_VAULT_DIR` in the environment
|
|
14
|
-
- Check `.claude/settings.user.json` (or `.claude/settings.json`) under the `env` key for `MYCO_VAULT_DIR`
|
|
15
|
-
- Fall back to `~/.myco/vaults/<project-name>/`
|
|
16
|
-
|
|
17
|
-
If no vault is found, report: "No Myco vault configured. Run `/myco-init` to set up."
|
|
18
|
-
|
|
19
|
-
## Step 2: Config health
|
|
20
|
-
|
|
21
|
-
Read `myco.yaml` from the vault:
|
|
22
|
-
- Report config version (should be `2`)
|
|
23
|
-
- Report LLM provider and model
|
|
24
|
-
- Report embedding provider and model
|
|
25
|
-
- Flag any issues (v1 config, missing fields)
|
|
26
|
-
|
|
27
|
-
## Step 3: Daemon status
|
|
28
|
-
|
|
29
|
-
Check `daemon.json` in the vault for PID and port:
|
|
30
|
-
- Is the daemon process running? (check if PID is alive)
|
|
31
|
-
- Is it healthy? (HTTP health check on the reported port)
|
|
32
|
-
- Report PID, port, uptime, active sessions
|
|
33
|
-
- If not running: "Daemon not running. It will start automatically on next session."
|
|
34
|
-
|
|
35
|
-
## Step 4: Vault stats
|
|
36
|
-
|
|
37
|
-
Query the FTS index for counts:
|
|
38
|
-
|
|
39
|
-
| Metric | How to check |
|
|
40
|
-
|--------|-------------|
|
|
41
|
-
| Sessions | `index.query({ type: 'session' }).length` |
|
|
42
|
-
| Spores | `index.query({ type: 'spore' }).length` |
|
|
43
|
-
| Plans | `index.query({ type: 'plan' }).length` |
|
|
44
|
-
| Artifacts | `index.query({ type: 'artifact' }).length` |
|
|
45
|
-
| Embeddings | Vector index count |
|
|
46
|
-
|
|
47
|
-
Also report spore breakdown by observation type (decision, gotcha, trade_off, etc.).
|
|
48
|
-
|
|
49
|
-
## Step 5: Digest status
|
|
50
|
-
|
|
51
|
-
Check the digest system state:
|
|
52
|
-
|
|
53
|
-
- **Enabled/disabled**: read `digest.enabled` from `myco.yaml`
|
|
54
|
-
- **Extracts**: list which tier files exist in `vault/digest/` (extract-1500.md, etc.) with file sizes and generated timestamps
|
|
55
|
-
- **Last cycle**: read last line of `vault/digest/trace.jsonl` — report cycle ID, timestamp, tiers generated, substrate count, duration
|
|
56
|
-
- **Metabolism**: report configured tiers, inject tier, and context window
|
|
57
|
-
- **Digest model**: if `digest.intelligence.model` is set, show it; otherwise note "inherits from main LLM"
|
|
58
|
-
|
|
59
|
-
## Step 6: Intelligence backend health
|
|
60
|
-
|
|
61
|
-
Test connectivity to the configured providers:
|
|
62
|
-
|
|
63
|
-
- **LLM provider**: call `isAvailable()` — report reachable or not
|
|
64
|
-
- **Embedding provider**: call `isAvailable()` — report reachable or not
|
|
65
|
-
- If either is unreachable, suggest running `/myco-setup-llm`
|
|
66
|
-
|
|
67
|
-
## Step 7: Pending issues
|
|
68
|
-
|
|
69
|
-
Check for problems:
|
|
70
|
-
|
|
71
|
-
- **Stale buffers**: any `.jsonl` files in `buffer/` older than 24h? These indicate events that were never processed (LLM was unavailable)
|
|
72
|
-
- **Missing index**: does `index.db` exist? If not, suggest `node dist/src/cli.js rebuild`
|
|
73
|
-
- **Missing vectors**: does `vectors.db` exist? If not, embeddings are disabled
|
|
74
|
-
- **Lineage**: does `lineage.json` exist? Report link count if so
|
|
75
|
-
|
|
76
|
-
## Step 8: Recent activity
|
|
77
|
-
|
|
78
|
-
Show the 3 most recent sessions with:
|
|
79
|
-
- Session ID (short form)
|
|
80
|
-
- Title
|
|
81
|
-
- Started/ended timestamps
|
|
82
|
-
- Number of spores extracted
|
|
83
|
-
- Parent session (if lineage detected)
|
|
84
|
-
|
|
85
|
-
## Output format
|
|
86
|
-
|
|
87
|
-
Present as a structured report:
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
=== Myco Vault ===
|
|
91
|
-
Path: ~/.myco/vaults/myco/
|
|
92
|
-
Config: v2 (valid)
|
|
93
|
-
|
|
94
|
-
--- Intelligence ---
|
|
95
|
-
LLM: ollama / gpt-oss (reachable)
|
|
96
|
-
Embedding: ollama / bge-m3 (reachable)
|
|
97
|
-
|
|
98
|
-
--- Daemon ---
|
|
99
|
-
PID: 12345 (running)
|
|
100
|
-
Port: 60942
|
|
101
|
-
Sessions: 1 active
|
|
102
|
-
|
|
103
|
-
--- Vault ---
|
|
104
|
-
Sessions: 12
|
|
105
|
-
Spores: 183 (67 decision, 34 gotcha, 32 trade_off, 20 discovery, 19 bug_fix, 1 cross-cutting)
|
|
106
|
-
Plans: 0
|
|
107
|
-
Artifacts: 8
|
|
108
|
-
Vectors: 224
|
|
109
|
-
|
|
110
|
-
--- Digest ---
|
|
111
|
-
Enabled: yes
|
|
112
|
-
Tiers: [1500, 3000, 5000, 10000]
|
|
113
|
-
Inject: 3000 (auto-inject at session start)
|
|
114
|
-
Model: gpt-oss (inherited from main LLM)
|
|
115
|
-
Last cycle: dc-a1b2c3 (2 min ago, 4 tiers, 12 notes, 45s)
|
|
116
|
-
Extracts: 1500 (1.1KB), 3000 (4.5KB), 5000 (6.9KB), 10000 (9.6KB)
|
|
117
|
-
|
|
118
|
-
--- Lineage ---
|
|
119
|
-
Links: 5 (3 clear, 1 inferred, 1 semantic_similarity)
|
|
120
|
-
|
|
121
|
-
--- Recent Sessions ---
|
|
122
|
-
1. [abc123] "Auth redesign session" (2h 15m, 5 spores)
|
|
123
|
-
2. [def456] "Bug fix for CORS" (45m, 2 spores, parent: abc123)
|
|
124
|
-
3. [ghi789] "Config cleanup" (20m, 1 spore)
|
|
125
|
-
|
|
126
|
-
--- Issues ---
|
|
127
|
-
None found.
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
Adapt the format to what's actually available. If sections have no data, show them with "None" rather than omitting them.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/intelligence/ollama.ts","../src/intelligence/lm-studio.ts"],"sourcesContent":["import type { LlmProvider, EmbeddingProvider, LlmResponse, EmbeddingResponse, LlmRequestOptions } from './llm.js';\nimport { estimateTokens, LLM_REQUEST_TIMEOUT_MS, EMBEDDING_REQUEST_TIMEOUT_MS, DAEMON_CLIENT_TIMEOUT_MS } from '../constants.js';\n\ninterface OllamaConfig {\n model?: string;\n base_url?: string;\n context_window?: number;\n max_tokens?: number;\n // Legacy fields (ignored, kept for backward compat during migration)\n embedding_model?: string;\n summary_model?: string;\n}\n\n// Ollama API endpoints\nconst ENDPOINT_GENERATE = '/api/generate';\nconst ENDPOINT_EMBED = '/api/embed';\nconst ENDPOINT_TAGS = '/api/tags';\n\nexport class OllamaBackend implements LlmProvider, EmbeddingProvider {\n static readonly DEFAULT_BASE_URL = 'http://localhost:11434';\n readonly name = 'ollama';\n private baseUrl: string;\n private model: string;\n private contextWindow: number;\n private defaultMaxTokens: number;\n\n constructor(config?: OllamaConfig) {\n this.baseUrl = config?.base_url ?? OllamaBackend.DEFAULT_BASE_URL;\n this.model = config?.model ?? config?.summary_model ?? 'llama3.2';\n this.contextWindow = config?.context_window ?? 8192;\n this.defaultMaxTokens = config?.max_tokens ?? 1024;\n }\n\n async summarize(prompt: string, opts?: LlmRequestOptions): Promise<LlmResponse> {\n const maxTokens = opts?.maxTokens ?? this.defaultMaxTokens;\n const contextLength = opts?.contextLength ?? this.contextWindow;\n const promptTokens = estimateTokens(prompt);\n const numCtx = Math.max(promptTokens + maxTokens, contextLength);\n\n const body: Record<string, unknown> = {\n model: this.model,\n prompt,\n stream: false,\n options: {\n num_ctx: numCtx,\n num_predict: maxTokens,\n },\n };\n\n // System prompt — sent as a separate field instead of concatenated into prompt\n if (opts?.systemPrompt) {\n body.system = opts.systemPrompt;\n }\n\n // Thinking control — false suppresses chain-of-thought for reasoning models\n if (opts?.reasoning) {\n body.think = opts.reasoning === 'off' ? false : opts.reasoning;\n }\n\n // Keep model loaded between requests (useful for digest cycles)\n if (opts?.keepAlive) {\n body.keep_alive = opts.keepAlive;\n }\n\n const response = await fetch(`${this.baseUrl}${ENDPOINT_GENERATE}`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body),\n signal: AbortSignal.timeout(opts?.timeoutMs ?? LLM_REQUEST_TIMEOUT_MS),\n });\n\n if (!response.ok) {\n const errorBody = await response.text().catch(() => '');\n throw new Error(`Ollama summarize failed: ${response.status} ${errorBody.slice(0, 500)}`);\n }\n\n const data = await response.json() as { response: string; model: string };\n return { text: data.response, model: data.model };\n }\n\n async embed(text: string): Promise<EmbeddingResponse> {\n const response = await fetch(`${this.baseUrl}${ENDPOINT_EMBED}`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n model: this.model,\n input: text,\n }),\n signal: AbortSignal.timeout(EMBEDDING_REQUEST_TIMEOUT_MS),\n });\n\n if (!response.ok) {\n throw new Error(`Ollama embed failed: ${response.status} ${response.statusText}`);\n }\n\n const data = await response.json() as { embeddings: number[][]; model: string };\n const embedding = data.embeddings[0];\n return { embedding, model: data.model, dimensions: embedding.length };\n }\n\n async isAvailable(): Promise<boolean> {\n try {\n const response = await fetch(`${this.baseUrl}${ENDPOINT_TAGS}`, {\n signal: AbortSignal.timeout(DAEMON_CLIENT_TIMEOUT_MS),\n });\n return response.ok;\n } catch {\n return false;\n }\n }\n\n /** List available models on this Ollama instance. */\n async listModels(timeoutMs?: number): Promise<string[]> {\n try {\n const response = await fetch(`${this.baseUrl}${ENDPOINT_TAGS}`, {\n signal: AbortSignal.timeout(timeoutMs ?? DAEMON_CLIENT_TIMEOUT_MS),\n });\n const data = await response.json() as { models: Array<{ name: string }> };\n return data.models.map((m) => m.name);\n } catch {\n return [];\n }\n }\n}\n","import type { LlmProvider, EmbeddingProvider, LlmResponse, EmbeddingResponse, LlmRequestOptions } from './llm.js';\nimport { LLM_REQUEST_TIMEOUT_MS, EMBEDDING_REQUEST_TIMEOUT_MS, DAEMON_CLIENT_TIMEOUT_MS } from '../constants.js';\n\ninterface LmStudioConfig {\n model?: string;\n base_url?: string;\n context_window?: number;\n max_tokens?: number;\n // Legacy fields\n embedding_model?: string;\n summary_model?: string;\n}\n\n// LM Studio API endpoints\nconst ENDPOINT_CHAT = '/api/v1/chat';\nconst ENDPOINT_MODELS_LOAD = '/api/v1/models/load';\nconst ENDPOINT_MODELS_UNLOAD = '/api/v1/models/unload';\nconst ENDPOINT_MODELS_LIST = '/v1/models';\nconst ENDPOINT_EMBEDDINGS = '/v1/embeddings';\n\nexport class LmStudioBackend implements LlmProvider, EmbeddingProvider {\n static readonly DEFAULT_BASE_URL = 'http://localhost:1234';\n readonly name = 'lm-studio';\n private baseUrl: string;\n private model: string;\n private loadedInstanceId: string | null = null;\n private contextWindow: number | undefined;\n private defaultMaxTokens: number;\n\n constructor(config?: LmStudioConfig) {\n this.baseUrl = config?.base_url ?? LmStudioBackend.DEFAULT_BASE_URL;\n this.model = config?.model ?? config?.summary_model ?? 'llama3.2';\n this.contextWindow = config?.context_window;\n this.defaultMaxTokens = config?.max_tokens ?? 1024;\n }\n\n /**\n * Generate text using LM Studio's native REST API (/api/v1/chat).\n * Supports per-request context_length, reasoning control, and system_prompt.\n */\n async summarize(prompt: string, opts?: LlmRequestOptions): Promise<LlmResponse> {\n const maxTokens = opts?.maxTokens ?? this.defaultMaxTokens;\n\n const body: Record<string, unknown> = {\n model: this.loadedInstanceId ?? this.model,\n input: prompt,\n max_output_tokens: maxTokens,\n store: false,\n };\n\n // Only set context_length if we haven't pre-loaded the model\n // (pre-loaded models already have the correct context via ensureLoaded)\n if (!this.loadedInstanceId) {\n const contextLength = opts?.contextLength ?? this.contextWindow;\n if (contextLength) {\n body.context_length = contextLength;\n }\n }\n\n // System prompt — sent separately from user content\n if (opts?.systemPrompt) {\n body.system_prompt = opts.systemPrompt;\n }\n\n // Reasoning control — 'off' suppresses chain-of-thought for reasoning models\n if (opts?.reasoning) {\n body.reasoning = opts.reasoning;\n }\n\n const response = await fetch(`${this.baseUrl}${ENDPOINT_CHAT}`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body),\n signal: AbortSignal.timeout(opts?.timeoutMs ?? LLM_REQUEST_TIMEOUT_MS),\n });\n\n if (!response.ok) {\n const errorBody = await response.text().catch(() => '');\n throw new Error(`LM Studio summarize failed: ${response.status} ${errorBody.slice(0, 500)}`);\n }\n\n const data = await response.json() as {\n model_instance_id: string;\n output: Array<{ type: string; content: string }>;\n };\n const messageOutput = data.output.find((o) => o.type === 'message');\n const text = messageOutput?.content ?? '';\n return { text, model: data.model_instance_id };\n }\n\n /**\n * Generate embeddings using LM Studio's OpenAI-compatible endpoint.\n * (The native API doesn't have an embedding endpoint — OpenAI-compat is fine here.)\n */\n async embed(text: string): Promise<EmbeddingResponse> {\n const response = await fetch(`${this.baseUrl}${ENDPOINT_EMBEDDINGS}`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n model: this.model,\n input: text,\n }),\n signal: AbortSignal.timeout(EMBEDDING_REQUEST_TIMEOUT_MS),\n });\n\n if (!response.ok) {\n throw new Error(`LM Studio embed failed: ${response.status}`);\n }\n\n const data = await response.json() as {\n data: Array<{ embedding: number[] }>;\n model: string;\n };\n const embedding = data.data[0].embedding;\n return { embedding, model: data.model, dimensions: embedding.length };\n }\n\n /**\n * Load the model with specific settings for digest operations.\n * Creates a dedicated instance and captures the instance_id so subsequent\n * chat requests target it directly (avoiding auto-load side effects).\n * Does not unload other instances — hooks and other providers may be\n * using the same model with different settings.\n */\n async ensureLoaded(contextLength?: number, gpuKvCache?: boolean): Promise<void> {\n\n const ctx = contextLength ?? this.contextWindow;\n const body: Record<string, unknown> = {\n model: this.model,\n flash_attention: true,\n offload_kv_cache_to_gpu: gpuKvCache ?? false,\n };\n if (ctx) {\n body.context_length = ctx;\n }\n\n const response = await fetch(`${this.baseUrl}${ENDPOINT_MODELS_LOAD}`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body),\n signal: AbortSignal.timeout(LLM_REQUEST_TIMEOUT_MS),\n });\n\n if (!response.ok) {\n const errorBody = await response.text().catch(() => '');\n throw new Error(`LM Studio model load failed: ${response.status} ${errorBody.slice(0, 200)}`);\n }\n\n // Capture the instance ID so chat requests target this specific loaded instance\n const loadResult = await response.json() as { instance_id?: string };\n if (loadResult.instance_id) {\n this.loadedInstanceId = loadResult.instance_id;\n }\n }\n\n async isAvailable(): Promise<boolean> {\n try {\n const response = await fetch(`${this.baseUrl}${ENDPOINT_MODELS_LIST}`, {\n signal: AbortSignal.timeout(DAEMON_CLIENT_TIMEOUT_MS),\n });\n return response.ok;\n } catch {\n return false;\n }\n }\n\n /** List available models on this LM Studio instance. */\n async listModels(timeoutMs?: number): Promise<string[]> {\n try {\n const response = await fetch(`${this.baseUrl}${ENDPOINT_MODELS_LIST}`, {\n signal: AbortSignal.timeout(timeoutMs ?? DAEMON_CLIENT_TIMEOUT_MS),\n });\n const data = await response.json() as { data: Array<{ id: string }> };\n return data.data.map((m) => m.id);\n } catch {\n return [];\n }\n }\n}\n"],"mappings":";;;;;;;;;AAcA,IAAM,oBAAoB;AAC1B,IAAM,iBAAiB;AACvB,IAAM,gBAAgB;AAEf,IAAM,gBAAN,MAAM,eAAwD;AAAA,EACnE,OAAgB,mBAAmB;AAAA,EAC1B,OAAO;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAER,YAAY,QAAuB;AACjC,SAAK,UAAU,QAAQ,YAAY,eAAc;AACjD,SAAK,QAAQ,QAAQ,SAAS,QAAQ,iBAAiB;AACvD,SAAK,gBAAgB,QAAQ,kBAAkB;AAC/C,SAAK,mBAAmB,QAAQ,cAAc;AAAA,EAChD;AAAA,EAEA,MAAM,UAAU,QAAgB,MAAgD;AAC9E,UAAM,YAAY,MAAM,aAAa,KAAK;AAC1C,UAAM,gBAAgB,MAAM,iBAAiB,KAAK;AAClD,UAAM,eAAe,eAAe,MAAM;AAC1C,UAAM,SAAS,KAAK,IAAI,eAAe,WAAW,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QAAI;AACF,YAAM,WAAW,MAAM,MAAM,GAAG,KAAK,OAAO,GAAG,oBAAoB,IAAI;AAAA,QACrE,QAAQ,YAAY,QAAQ,wBAAwB;AAAA,MACtD,CAAC;AACD,aAAO,SAAS;AAAA,IAClB,QAAQ;AACN,aAAO;AAAA,IACT;AAAA,EACF;AAAA;AAAA,EAGA,MAAM,WAAW,WAAuC;AACtD,QAAI;AACF,YAAM,WAAW,MAAM,MAAM,GAAG,KAAK,OAAO,GAAG,oBAAoB,IAAI;AAAA,QACrE,QAAQ,YAAY,QAAQ,aAAa,wBAAwB;AAAA,MACnE,CAAC;AACD,YAAM,OAAO,MAAM,SAAS,KAAK;AACjC,aAAO,KAAK,KAAK,IAAI,CAAC,MAAM,EAAE,EAAE;AAAA,IAClC,QAAQ;AACN,aAAO,CAAC;AAAA,IACV;AAAA,EACF;AACF;","names":[]}
|
package/dist/chunk-QQ36XEJP.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
MycoConfigSchema,
|
|
4
|
-
require_dist
|
|
5
|
-
} from "./chunk-G6ZMTQMJ.js";
|
|
6
|
-
import {
|
|
7
|
-
__toESM
|
|
8
|
-
} from "./chunk-PZUWP5VK.js";
|
|
9
|
-
|
|
10
|
-
// src/config/loader.ts
|
|
11
|
-
var import_yaml = __toESM(require_dist(), 1);
|
|
12
|
-
import fs from "fs";
|
|
13
|
-
import path from "path";
|
|
14
|
-
var CONFIG_FILENAME = "myco.yaml";
|
|
15
|
-
function loadConfig(vaultDir) {
|
|
16
|
-
const configPath = path.join(vaultDir, CONFIG_FILENAME);
|
|
17
|
-
if (!fs.existsSync(configPath)) {
|
|
18
|
-
throw new Error(`myco.yaml not found in ${vaultDir}`);
|
|
19
|
-
}
|
|
20
|
-
const raw = fs.readFileSync(configPath, "utf-8");
|
|
21
|
-
const parsed = import_yaml.default.parse(raw);
|
|
22
|
-
if (parsed.version === 1 || parsed.intelligence?.backend) {
|
|
23
|
-
throw new Error(
|
|
24
|
-
"Myco config uses v1 format. Run /myco:setup-llm to reconfigure for v2."
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
const intel = parsed.intelligence;
|
|
28
|
-
const llm = intel?.llm;
|
|
29
|
-
if (llm?.provider === "haiku") {
|
|
30
|
-
llm.provider = "anthropic";
|
|
31
|
-
}
|
|
32
|
-
return MycoConfigSchema.parse(parsed);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export {
|
|
36
|
-
loadConfig
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=chunk-QQ36XEJP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/config/loader.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport YAML from 'yaml';\nimport { MycoConfigSchema, type MycoConfig } from './schema.js';\n\nconst CONFIG_FILENAME = 'myco.yaml';\n\nexport function loadConfig(vaultDir: string): MycoConfig {\n const configPath = path.join(vaultDir, CONFIG_FILENAME);\n\n if (!fs.existsSync(configPath)) {\n throw new Error(`myco.yaml not found in ${vaultDir}`);\n }\n\n const raw = fs.readFileSync(configPath, 'utf-8');\n const parsed = YAML.parse(raw) as Record<string, unknown>;\n\n // Detect v1 config and guide migration\n if (parsed.version === 1 || (parsed.intelligence as Record<string, unknown>)?.backend) {\n throw new Error(\n 'Myco config uses v1 format. Run /myco:setup-llm to reconfigure for v2.',\n );\n }\n\n // Auto-map legacy 'haiku' provider name to 'anthropic'\n const intel = parsed.intelligence as Record<string, unknown> | undefined;\n const llm = intel?.llm as Record<string, unknown> | undefined;\n if (llm?.provider === 'haiku') {\n llm.provider = 'anthropic';\n }\n\n return MycoConfigSchema.parse(parsed);\n}\n\nexport function saveConfig(vaultDir: string, config: MycoConfig): void {\n // Validate before writing — OAK lesson: validate on write, not just read\n const validated = MycoConfigSchema.parse(config);\n\n const configPath = path.join(vaultDir, CONFIG_FILENAME);\n fs.mkdirSync(vaultDir, { recursive: true });\n fs.writeFileSync(configPath, YAML.stringify(validated), 'utf-8');\n}\n"],"mappings":";;;;;;;;;;AAEA,kBAAiB;AAFjB,OAAO,QAAQ;AACf,OAAO,UAAU;AAIjB,IAAM,kBAAkB;AAEjB,SAAS,WAAW,UAA8B;AACvD,QAAM,aAAa,KAAK,KAAK,UAAU,eAAe;AAEtD,MAAI,CAAC,GAAG,WAAW,UAAU,GAAG;AAC9B,UAAM,IAAI,MAAM,0BAA0B,QAAQ,EAAE;AAAA,EACtD;AAEA,QAAM,MAAM,GAAG,aAAa,YAAY,OAAO;AAC/C,QAAM,SAAS,YAAAA,QAAK,MAAM,GAAG;AAG7B,MAAI,OAAO,YAAY,KAAM,OAAO,cAA0C,SAAS;AACrF,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAGA,QAAM,QAAQ,OAAO;AACrB,QAAM,MAAM,OAAO;AACnB,MAAI,KAAK,aAAa,SAAS;AAC7B,QAAI,WAAW;AAAA,EACjB;AAEA,SAAO,iBAAiB,MAAM,MAAM;AACtC;","names":["YAML"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|