tf_code/PROGRESS.md
2026-03-25 09:35:02 +11:00

74 lines
2.4 KiB
Markdown

# tfcode Progress Summary
## Goal
Build and deploy **tfcode** - ToothFairyAI's official AI coding agent, a fork of opencode.
## Completed Tasks
1. ✅ Implemented ToothFairyAI branding (logo, colors, strings)
2. ✅ Created ToothFairyAI provider with dynamic model fetching
3. ✅ Synced tools/agents/skills from ToothFairyAI workspace
4. ✅ Filtered models to only `deploymentType: "serverless"`
5. ✅ Implemented the `/predictions` endpoint for ToothFairyAI provider
6. ✅ Added `tfcode setup` command to persist credentials
7. ✅ Fixed npm installation flow (v1.0.4)
- Binary now included in main npm package
- Postinstall script checks if binary exists before downloading
- ESM-compatible module resolution for npm fallback
- Wrapper script fixed to look for binary in correct location
8. ✅ Fixed ToothFairyAI model support (v1.0.5)
- Disabled `thinking` parameters for TF models (API doesn't support yet)
- Disabled auto-update (managed via npm instead)
- Updated `upgrade` command to point to npm
- Tested with `mystica` model - working!
## Current Status
**Working**: npm installation and ToothFairyAI models are fully functional.
```bash
npm install -g @toothfairyai/tfcode@latest
```
## Version History
- **1.0.5**: Fixed ToothFairyAI model support, disabled auto-update
- **1.0.4**: Fixed npm installation flow, binary included in main package
- **1.0.3**: Initial npm publication (broken installation)
## Key Fixes
### v1.0.5 Changes
1. **Provider transform**: Added early return for `@toothfairyai/sdk` to prevent sending `thinking` parameters
2. **Auto-update**: Hardcoded `OPENCODE_DISABLE_AUTOUPDATE = true`
3. **Upgrade command**: Now shows npm instructions instead of attempting self-update
### v1.0.4 Changes
1. **Postinstall script**: Fixed ESM module resolution, early return if binary exists
2. **Publish script**: Copy current platform binary to main package
3. **Wrapper script**: Fixed binary path lookup
## Testing
```bash
# Install
npm install -g @toothfairyai/tfcode@latest
# Set credentials
export TF_WORKSPACE_ID="your-workspace-id"
export TF_API_KEY="your-api-key"
export TF_REGION="dev" # or au, eu, us
# Test
tfcode run "say hello" --model toothfairyai/mystica
```
## Next Steps
1. Build all platform binaries (12 targets)
2. Test on different platforms (currently only darwin-arm64)
3. Document available models (mystica, mystica_15, etc.)