|
| 1 | +# Migration Guide: v0.3.3 → v0.4.0 |
| 2 | + |
| 3 | +**⚠️ IMPORTANT: This is a major release with breaking changes. Please read this guide carefully before upgrading.** |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +Version 0.4.0 introduces significant architectural improvements including a new model catalog system, task graph features, and team collaboration capabilities. These changes require updates to your configuration files. |
| 8 | + |
| 9 | +## Breaking Changes |
| 10 | + |
| 11 | +### 1. Configuration File Format Changes |
| 12 | + |
| 13 | +The `provider` field has been renamed to `protocol` throughout the codebase. |
| 14 | + |
| 15 | +**Old format (v0.3.3):** |
| 16 | +```json |
| 17 | +{ |
| 18 | + "models": [ |
| 19 | + { |
| 20 | + "provider": "anthropic", |
| 21 | + "model": "claude-3-5-sonnet-20241022", |
| 22 | + "api_key": "sk-ant-...", |
| 23 | + "max_tokens": 4096 |
| 24 | + } |
| 25 | + ] |
| 26 | +} |
| 27 | +``` |
| 28 | + |
| 29 | +**New format (v0.4.0):** |
| 30 | +```json |
| 31 | +{ |
| 32 | + "models": [ |
| 33 | + { |
| 34 | + "protocol": "anthropic", |
| 35 | + "model": "claude-sonnet-4-5-20250929", |
| 36 | + "api_key": "sk-ant-...", |
| 37 | + "max_tokens": 4096 |
| 38 | + } |
| 39 | + ] |
| 40 | +} |
| 41 | +``` |
| 42 | + |
| 43 | +### 2. Provider Type Renaming |
| 44 | + |
| 45 | +The following provider types have been consolidated into protocol types: |
| 46 | + |
| 47 | +| Old Provider (v0.3.3) | New Protocol (v0.4.0) | |
| 48 | +|----------------------|----------------------| |
| 49 | +| `openai` | `openai_compatible` | |
| 50 | +| `openai-compatible` | `openai_compatible` | |
| 51 | +| `mistral` | `openai_compatible` | |
| 52 | +| `deepseek` | `openai_compatible` | |
| 53 | +| `kimi` | `openai_compatible` | |
| 54 | +| `qwen` | `openai_compatible` | |
| 55 | +| `glm` | `openai_compatible` | |
| 56 | +| `google` | `gemini` | |
| 57 | + |
| 58 | +### 3. Model Profile Structure |
| 59 | + |
| 60 | +Model profiles now support additional optional fields that auto-populate from the built-in model catalog: |
| 61 | + |
| 62 | +```json |
| 63 | +{ |
| 64 | + "protocol": "anthropic", |
| 65 | + "model": "claude-sonnet-4-5-20250929", |
| 66 | + "api_key": "sk-ant-...", |
| 67 | + "max_tokens": 4096, |
| 68 | + "temperature": 1.0, |
| 69 | + "context_window": 200000, |
| 70 | + "max_input_tokens": 200000, |
| 71 | + "max_output_tokens": 8192, |
| 72 | + "mode": "chat", |
| 73 | + "supports_reasoning": false, |
| 74 | + "supports_vision": true, |
| 75 | + "price": { |
| 76 | + "input": 3.0, |
| 77 | + "output": 15.0 |
| 78 | + }, |
| 79 | + "currency": "USD" |
| 80 | +} |
| 81 | +``` |
| 82 | + |
| 83 | +**Note:** All new fields are optional. If omitted, they will be auto-populated from the model catalog when available. |
| 84 | + |
| 85 | +## Migration Steps |
| 86 | + |
| 87 | +### Step 1: Backup Your Configuration |
| 88 | + |
| 89 | +Before upgrading, backup your configuration files: |
| 90 | + |
| 91 | +```bash |
| 92 | +# Backup user configuration |
| 93 | +cp ~/.ripperdoc/config.json ~/.ripperdoc/config.json.backup |
| 94 | + |
| 95 | +# Backup any project-specific configurations |
| 96 | +find . -name "config.json" -path "*/.ripperdoc/*" -exec cp {} {}.backup \; |
| 97 | +``` |
| 98 | + |
| 99 | +### Step 2: Upgrade Ripperdoc |
| 100 | + |
| 101 | +```bash |
| 102 | +pip install --upgrade ripperdoc |
| 103 | +``` |
| 104 | + |
| 105 | +Or if using uv: |
| 106 | + |
| 107 | +```bash |
| 108 | +uv pip install --upgrade ripperdoc |
| 109 | +``` |
| 110 | + |
| 111 | +### Step 3: Update Configuration Files |
| 112 | + |
| 113 | +Update your `config.json` files: |
| 114 | + |
| 115 | +1. **Replace `provider` with `protocol`** |
| 116 | +2. **Update provider type names** using the table above |
| 117 | +3. **Optionally add new model profile fields** (recommended for better cost tracking) |
| 118 | + |
| 119 | +Example migration script: |
| 120 | + |
| 121 | +```bash |
| 122 | +# Backup and update config |
| 123 | +python3 << 'EOF' |
| 124 | +import json |
| 125 | +import os |
| 126 | +from pathlib import Path |
| 127 | +
|
| 128 | +# Provider to protocol mapping |
| 129 | +provider_to_protocol = { |
| 130 | + "openai": "openai_compatible", |
| 131 | + "openai-compatible": "openai_compatible", |
| 132 | + "mistral": "openai_compatible", |
| 133 | + "deepseek": "openai_compatible", |
| 134 | + "kimi": "openai_compatible", |
| 135 | + "qwen": "openai_compatible", |
| 136 | + "glm": "openai_compatible", |
| 137 | + "google": "gemini", |
| 138 | +} |
| 139 | +
|
| 140 | +config_path = Path.home() / ".ripperdoc" / "config.json" |
| 141 | +backup_path = config_path.with_suffix('.json.backup') |
| 142 | +
|
| 143 | +# Read configuration |
| 144 | +with open(config_path, 'r') as f: |
| 145 | + config = json.load(f) |
| 146 | +
|
| 147 | +# Update models |
| 148 | +if 'models' in config: |
| 149 | + for model in config['models']: |
| 150 | + if 'provider' in model: |
| 151 | + old_provider = model['provider'] |
| 152 | + # Map to new protocol name |
| 153 | + new_protocol = provider_to_protocol.get(old_provider, old_provider) |
| 154 | + model['protocol'] = new_protocol |
| 155 | + del model['provider'] |
| 156 | + print(f"Updated: {old_provider} -> {new_protocol}") |
| 157 | +
|
| 158 | +# Write updated configuration |
| 159 | +with open(config_path, 'w') as f: |
| 160 | + json.dump(config, f, indent=2) |
| 161 | +
|
| 162 | +print("Configuration updated successfully!") |
| 163 | +EOF |
| 164 | +``` |
| 165 | + |
| 166 | +### Step 4: Verify Configuration |
| 167 | + |
| 168 | +Start Ripperdoc and verify your configuration: |
| 169 | + |
| 170 | +```bash |
| 171 | +ripperdoc |
| 172 | +``` |
| 173 | + |
| 174 | +Check that your models are correctly configured: |
| 175 | + |
| 176 | +```bash |
| 177 | +ripperdoc /models |
| 178 | +``` |
| 179 | + |
| 180 | +## New Features to Explore |
| 181 | + |
| 182 | +After migration, explore these new features: |
| 183 | + |
| 184 | +1. **Task Graph**: Use `TaskCreate`, `TaskList`, `TaskUpdate` for task management |
| 185 | +2. **Team Collaboration**: Use `TeamCreate`, `SendMessage` for multi-agent coordination |
| 186 | +3. **Output Styles**: Try `/output-style` to customize response formatting |
| 187 | +4. **Output Language**: Use `/output-language` to control AI response language |
| 188 | +5. **Custom Commands**: Use `/commands` to manage file-based custom commands |
| 189 | +6. **Working Directories**: Use `/add-dir` to add multiple working directories |
| 190 | + |
| 191 | +## Rollback Instructions |
| 192 | + |
| 193 | +If you encounter issues and need to rollback: |
| 194 | + |
| 195 | +```bash |
| 196 | +# Restore previous version |
| 197 | +pip install ripperdoc==0.3.3 |
| 198 | + |
| 199 | +# Restore configuration |
| 200 | +mv ~/.ripperdoc/config.json.backup ~/.ripperdoc/config.json |
| 201 | +``` |
| 202 | + |
| 203 | +## Getting Help |
| 204 | + |
| 205 | +If you need assistance with migration: |
| 206 | + |
| 207 | +1. Check the [GitHub Issues](https://github.com/quantmew/Ripperdoc/issues) for known migration issues |
| 208 | +2. Review the [main documentation](README.md) for configuration details |
| 209 | +3. Run `/doctor` command to diagnose configuration issues |
| 210 | + |
| 211 | +## Summary of Changes |
| 212 | + |
| 213 | +- ✅ New model catalog with 200+ models |
| 214 | +- ✅ Task graph and team collaboration system |
| 215 | +- ✅ Output style and language customization |
| 216 | +- ✅ Enhanced hooks with async support |
| 217 | +- ✅ Improved session management with sidecar index |
| 218 | +- ✅ Better type annotations and code organization |
| 219 | +- ⚠️ **Breaking:** `provider` → `protocol` rename |
| 220 | +- ⚠️ **Breaking:** Configuration file format changes |
0 commit comments