Skip to content

Commit 6e7fbf4

Browse files
committed
add cargo release config and docs
1 parent 7eac94e commit 6e7fbf4

5 files changed

Lines changed: 586 additions & 0 deletions

File tree

.cargo-release-cheatsheet.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Release Cheat Sheet
2+
3+
## Before Release
4+
```bash
5+
git status # All changes committed?
6+
cargo test # Tests pass?
7+
cargo fmt # Code formatted?
8+
```
9+
10+
## Dry Run (Always Do This First!)
11+
```bash
12+
cargo release --dry-run # Preview what will happen
13+
```
14+
15+
## Execute Release
16+
```bash
17+
# Patch release (0.1.17 → 0.1.18)
18+
cargo release patch
19+
20+
# Minor release (0.1.17 → 0.2.0)
21+
cargo release minor
22+
23+
# Major release (0.1.17 → 1.0.0)
24+
cargo release major
25+
26+
# Or just run (auto-detects)
27+
cargo release
28+
```
29+
30+
## What Happens Automatically
31+
1. ✅ Bumps version in `Cargo.toml`
32+
2. ✅ Runs tests: `cargo test`
33+
3. ✅ Checks formatting: `cargo fmt --check`
34+
4. ✅ Updates `CHANGELOG.md`
35+
5. ✅ Runs: `cargo publish -p sofos`
36+
6. ✅ Creates commit: `Release vX.Y.Z`
37+
7. ✅ Creates tag: `vX.Y.Z`
38+
8. ✅ Pushes to remote
39+
40+
## Skip Publishing
41+
```bash
42+
cargo release --no-publish # Don't publish to crates.io
43+
cargo release --no-push # Don't push to Git
44+
```
45+
46+
## After Release
47+
Check on GitHub:
48+
- New release in "Releases" tab
49+
- New tag in "Tags" tab
50+
- New commit on main branch
51+
52+
Check on crates.io:
53+
- https://crates.io/crates/sofos
54+
55+
## Troubleshooting
56+
57+
| Issue | Fix |
58+
|-------|-----|
59+
| "Uncommitted changes" | `git add . && git commit -m "msg"` |
60+
| "No commits since last release" | Make some commits first |
61+
| "crates.io already has this version" | Bump the version |
62+
| "Failed to push" | Check push access and branch |
63+
| "Failed to publish" | Run `cargo login` |
64+
65+
## Advanced Options
66+
67+
```bash
68+
cargo release --help # Full help
69+
cargo release --dry-run # Preview without changes
70+
cargo release --allow-dirty # Skip git status check
71+
cargo release --sign-commit # GPG sign commits
72+
cargo release --sign-tag # GPG sign tags
73+
```
74+
75+
## Config Files
76+
77+
- **release.toml** - Release automation configuration
78+
- **RELEASE.md** - Full documentation
79+
- **CHANGELOG.md** - Release notes (auto-updated)
80+
81+
---
82+
83+
**Quick tip:** Always run `cargo release --dry-run` first to preview!

CHANGELOG.md

Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
# Changelog
2+
3+
All notable changes to Sofos are documented in this file.
4+
5+
## [Unreleased]
6+
7+
## [0.1.17] - 2026-01-08
8+
9+
### Changed
10+
- Renamed `mcpServers` to `mcp-servers` in config
11+
- Reduced `max_context_tokens` for cost optimization
12+
13+
### Fixed
14+
- Image detection failing when messages contain apostrophes/contractions
15+
16+
## [0.1.16] - 2026-01-04
17+
18+
### Added
19+
- MCP (Model Context Protocol) server integration for extending tool capabilities
20+
- Cost optimizations: caching, token-efficient tools, and output truncation
21+
22+
### Changed
23+
- Updated `reqwest` crate
24+
- Display all loaded MCP servers on app startup
25+
- Updated `is_blocked` error messages
26+
27+
### Fixed
28+
- MCP image handling: use separate image blocks instead of embedded base64
29+
- Web search tool result block filtering for Anthropic
30+
31+
## [0.1.15] - 2025-12-31
32+
33+
### Added
34+
- Cyrillic character support in history
35+
36+
### Changed
37+
- Reorganized files and logic into cleaner structure
38+
39+
## [0.1.14] - 2025-12-24
40+
41+
### Added
42+
- Markdown formatting and code syntax highlighting
43+
44+
## [0.1.13] - 2025-12-23
45+
46+
### Added
47+
- Cursor shape changes depending on edit mode
48+
- Improved ripgrep detection and empty file type handling
49+
50+
### Changed
51+
- Handle image paths with spaces
52+
- Removed blinking cursor after command execution
53+
- Updated readline library and prompt symbols
54+
- Included image tool in safe mode
55+
56+
### Fixed
57+
- Abort API calls on ESC for immediate REPL interruption
58+
- Auto-continue OpenAI reasoning-only responses
59+
60+
## [0.1.12] - 2025-12-22
61+
62+
### Added
63+
- Local and web image vision support
64+
- Context token limiting
65+
- Actionable hints to all error messages
66+
- Enhanced confirmation dialogs with icons, colors, and safe defaults
67+
- Security level distinction for error messages
68+
69+
### Changed
70+
- Standardized message formatting with two-line hint structure
71+
- Improved RawModeGuard usage for panic safety
72+
- Network resilience improvements and crash point elimination
73+
- Added thread join timeout to prevent UI hangs
74+
- Retry jitter and Unix signal detection
75+
76+
### Fixed
77+
- Session-scoped permissions
78+
79+
## [0.1.11] - 2025-12-21
80+
81+
### Added
82+
- Global config support in `~/.sofos/config.toml`
83+
- Read permission system with glob patterns and tilde expansion
84+
- Homebrew install option
85+
86+
### Changed
87+
- Block tilde paths in bash to enforce workspace sandboxing
88+
- Type safety improvements and centralized config
89+
- Updated project structure documentation
90+
91+
### Security
92+
- Allowed `2>&1` for stderr/stdout combining in bash
93+
94+
## [0.1.10] - 2025-12-21
95+
96+
### Added
97+
- Network resilience and crash point elimination
98+
99+
## [0.1.9] - 2025-12-22
100+
101+
### Added
102+
- Prompt caching for Claude API
103+
- Caching to read_file_tool
104+
- System prompt support for OpenAI
105+
106+
### Changed
107+
- Refactored prompt caching system
108+
109+
## [0.1.8] - 2025-12-18
110+
111+
### Added
112+
- 3-tier permission system for bash execution (Allow/Deny/Ask)
113+
- Config migration from JSON to TOML
114+
- Refactored type safety and centralized config
115+
116+
## [0.1.7] - 2025-12-18
117+
118+
### Changed
119+
- Migrated config from JSON to TOML format
120+
121+
## [0.1.6] - 2025-12-18
122+
123+
### Security
124+
- Implemented 3-tier permission system for bashexec: Allow, Deny, Ask
125+
126+
## [0.1.5] - 2025-12-15
127+
128+
### Added
129+
- Prompt caching for Claude
130+
- System prompt handling for OpenAI
131+
132+
## [0.1.4] - 2025-12-14
133+
134+
### Added
135+
- Installation from crates.io
136+
- Documentation links
137+
- Crates.io version badge
138+
- Links and resources section to README
139+
140+
## [0.1.3] - 2025-12-14
141+
142+
### Changed
143+
- Keywords and metadata updates
144+
145+
### Added
146+
- Support for multiple installation methods (Homebrew, crates.io)
147+
148+
## [0.1.2] - 2025-12-10
149+
150+
### Added
151+
- OpenAI API support
152+
- OpenAI web search tool
153+
- Support for all GPT-5 models with Responses API
154+
- OpenAI reasoning model handling
155+
- Safe mode for restricted capabilities
156+
- Tab-based command selection (replaced rustyline with reedline)
157+
158+
### Changed
159+
- Enabled Morph integration for OpenAI models
160+
- Model pricing fixes
161+
162+
### Fixed
163+
- Conversation workflow improvements
164+
165+
## [0.1.1] - 2025-12-09
166+
167+
### Added
168+
- Morph Fast Apply integration
169+
- Ripgrep code search integration
170+
- Bash executor with safety checks
171+
- File operations: delete, move, copy
172+
- Programmatic confirmation for destructive operations
173+
- Thinking animation
174+
- Visual diff display
175+
- Session save/restore functionality
176+
- Claude web-search tool integration
177+
- Syntax highlighting
178+
- Team and personal instructions support
179+
- Git operations restrictions (read-only)
180+
- Reject reasons for restricted bash commands
181+
- Bash output size limiting (50MB)
182+
- Conversation history limiting
183+
- File size checks (10MB limit)
184+
- Extended thinking capability
185+
- Iterative tool execution loop (max 200 iterations)
186+
- Retry logic with session preservation for network failures
187+
- Token usage and estimated cost display
188+
- ESC key to interrupt API calls
189+
- Separate REPL logic refactoring
190+
191+
### Changed
192+
- Replaced recursion with iterative loop for tool execution
193+
- Updated dependency versions
194+
- Improved README documentation
195+
- Updated default Claude model
196+
197+
### Fixed
198+
- Symlink escape prevention
199+
- File size limit enforcement
200+
- Conversation workflow
201+
- Warning fixes
202+
203+
## [0.1.0] - 2025-12-04
204+
205+
### Added
206+
- Initial release
207+
- Claude AI integration for coding assistance
208+
- Interactive REPL with session persistence
209+
- File system operations (read, write, list, delete, move, copy)
210+
- Sandboxed bash command execution
211+
- Code search via ripgrep
212+
- Tool calling with iterative execution
213+
- Conversation history management
214+
- Custom instructions support (.sofosrc)
215+
- API request building and response handling
216+
- Error handling with user-friendly messages
217+
218+
---
219+
220+
**Versioning:** This project follows [Semantic Versioning](https://semver.org/).

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Tested on macOS but should work on Linux and Windows as well.
2626
- [Security](#security)
2727
- [Configuration](#configuration)
2828
- [Development](#development)
29+
- [Release](#release)
2930
- [Troubleshooting](#troubleshooting)
3031
- [Morph Integration](#morph-integration)
3132
- [License](#license)
@@ -333,6 +334,33 @@ src/
333334
334335
See `.sofosrc` for detailed conventions.
335336
337+
## Release
338+
339+
This project uses **cargo-release** for automated versioning and publishing.
340+
341+
**Quick commands:**
342+
343+
```bash
344+
# Preview the release (dry run)
345+
cargo release --dry-run
346+
347+
# Execute the release (full workflow)
348+
cargo release
349+
350+
# Release specific version
351+
cargo release [major|minor|patch]
352+
```
353+
354+
The release workflow automatically:
355+
1. Bumps version in `Cargo.toml`
356+
2. Runs tests and formatting checks
357+
3. Updates `CHANGELOG.md`
358+
4. Creates release commit and Git tag (`v0.1.18`)
359+
5. Pushes to remote repository
360+
6. Publishes to crates.io
361+
362+
**For detailed instructions** (including setup, troubleshooting, and advanced options), see [RELEASE.md](RELEASE.md).
363+
336364
## Troubleshooting
337365
338366
- **API errors:** Check connection and API key

0 commit comments

Comments
 (0)