Releases: dkmnx/kairo
Releases · dkmnx/kairo
v1.7.1
Fixed
- Windows file locking: Close audit logger to prevent file lock on Windows when running update command
- Update command: Use platform-specific temp file extensions (.tmp on Windows, .tmp.XXXXXX on Unix) to avoid extension issues
- Wrapper script execution: Fixed wrapper script execution on Windows by using correct directory and extension handling
- CI/CD: Removed invalid deny-licenses configuration in dependency review workflow
- CI/CD: Fixed coverage report step in CI pipeline
Changed
- Go version: Updated to 1.25.7 to fix crypto/tls vulnerability (CVE-2024-45338)
- Pre-commit hooks: Added Windows-compatible PowerShell pre-commit script for developers on Windows
Documentation
- AGENTS.md: Updated with comprehensive AI agent context for better Claude Code integration
v1.7.0
Added
- API key validation: Strengthened validation with provider-specific formats
- Anthropic keys: Must start with
sk-ant-api0followed by 76+ characters - Z.AI keys: Must start with
sk-zaic-followed by 32+ characters - MiniMax keys: Must start with
eyJ(JWT format) or custom validation - DeepSeek keys: Must start with
sk-followed by 52+ characters - Kimi keys: Must start with
sk-followed by 52+ characters - Clear error messages indicating expected format for each provider
- Anthropic keys: Must start with
- Decryption error handling: Fail early on decryption failures with actionable errors
- Clear guidance when identity file is missing or wrong
- Better error messages for malformed recipient files
- Integration tests for decryption failure scenarios
Fixed
- Go version: Updated to 1.25.6 to fix crypto/tls vulnerability (CVE-2024-45338)
- Dependencies: Updated golang.org/x/crypto to v0.45.0 for security fixes
- CI/CD: Fixed coverage report step and updated dependency review for PATENTS
- Update command: Simplified to use platform-appropriate install scripts
Refactored
- Audit logging: Made audit logging errors visible to callers instead of silent failures
- Private IP validation: Extracted CIDR blocks to package-level constants for maintainability
- State management: Removed unnecessary dual state in reset and rotate commands
- Platform detection: Consolidated in cmd/rotate with pkg/env for consistency
- Validation helpers: Removed redundant nil check in validateCustomProviderName
Test
- Integration tests: Added decryption failure scenario tests
- Audit helpers: Added comprehensive test coverage
- Crypto package: Added disk full error handling tests
- Switch command: Increased test coverage with new run tests
- Race detection: Fixed race conditions in integration tests
Documentation
- Package-level docs: Added documentation to cmd, crypto, and wrapper packages
- Function docs: Added documentation to utility helper and security-critical private functions
- Documentation standardization: Standardized function documentation format
v1.6.1
Fixed
- Reset command: Remove age.key file when resetting all providers to ensure clean state
Changed
- Documentation: Updated changelog with version link for v1.6.0
- Contributing guide: Added pre-commit to Before Submitting section
- Markdownlint: Migrated configuration to markdownlint-cli2 format
- AGENTS.md: Created concise version for AI assistant context
- README: Fixed install command URLs in documentation table
v1.6.0
Added
- Config file extension: Changed config filename from
configtoconfig.yaml- Better format recognition and editor support with YAML extension
- Automatic migration from old format on first run
- Original file backed up as
config.backup(never deleted) - Migration includes YAML validation before conversion
- Permission preservation during migration
- Atomic operation with rollback on failure
- Comprehensive test coverage (7 new migration tests)
- Audit logging: Added
LogMigration()method for future migration event tracking
Fixed
- Windows installer: Fixed hashtable access for checksum hash validation
- Windows self-update: Implemented binary swap-after-exit pattern for reliable updates
v1.5.1
Changed
- Model reference: Updated anthropic model reference to glm-4.7-flash
- Synchronized model name across tests, documentation, and provider registry
- Ensures consistency with current API defaults
v1.5.0
Added
- Performance metrics: New
kairo metricscommand for monitoring CLI operations- Track execution time, memory usage, and operation counts
- Export metrics in JSON or CSV format for analysis
internal/performancepackage with comprehensive metrics collection- Detailed guide in
docs/guides/performance-metrics.md
- Retry and panic recovery: New
internal/recoverypackage for resilient error handling- Retry utility with configurable attempts, exponential backoff, and jitter
- Panic recovery with optional stack trace logging
- Context-aware timeouts with automatic cancellation
- Comprehensive test coverage (800+ lines)
- Cross-provider validation: New
kairo config --validate-allcommand- Validates all configured providers in a single run
- Returns structured validation report with per-provider status
- Useful for pre-flight checks before critical operations
- Error recovery and rollback: Automatic transaction rollback on config failures
- Atomic config updates that preserve previous state on error
- Rollback mechanism for
kairo configandkairo setupcommands - Improved error messages with recovery hints
- Secure token passing: Wrapper script for secure API key delivery
- Replaces insecure pipe-based token passing
internal/wrapperpackage with platform-specific script generation- Tokens written to temp file with 0600 permissions, auto-cleaned
- Comprehensive security documentation in
docs/architecture/wrapper-scripts.md
- Confirmation prompts: Destructive operations now require user confirmation
kairo resetprompts before removing provider configurationkairo rotateprompts before regenerating encryption keys- Can be bypassed with
--yesflag for automation
- Dependency vulnerability scanning: New GitHub Actions workflow
- Automated security scanning on every pull request
- Uses
govulncheckwith SARIF output for GitHub integration - Replaced deprecated
deny-licenseswithallow-licensespolicy
Changed
- Provider name validation: Enhanced with length limits and reserved words
- Maximum length: 32 characters
- Reserved words:
default,all,config,reset,rotate,setup,switch,test,status,list,version,update,audit,completion,metrics - Prevents conflicts with built-in commands
- YAML strict mode: Config parser now rejects unknown fields
- Prevents typos from being silently ignored
- Explicit error messages for unrecognized configuration keys
- Error handling consolidation: Merged duplicate errors packages
- Consolidated
internal/config/errors,internal/crypto/errorsintointernal/errors - Single source of truth for typed errors and error context
- Consolidated
- PowerShell completion: Simplified deployment process
- New
scripts/kairo-completion.ps1standalone completion script - Can be sourced directly or installed via
kairo completion --save - Improved Windows developer experience
- New
- Windows special character handling: Replaced batch scripts with PowerShell
- Better support for spaces, Unicode, and special characters in paths
- Consistent behavior across all platforms
Security
- Secure token passing: Replaced insecure
curl | shandirm | iexpatterns- Update command now downloads to temp file with checksum verification
- Windows installer uses temp file instead of direct execution
- Wrapper script securely passes tokens via file descriptors
- Audit log sanitization: API keys now completely masked in audit logs
- Previous implementation showed partial keys; now fully redacted
- Format:
sk-***instead ofsk-an***mnop
Fixed
- Thread safety: Fixed race conditions in signal handling
- Used
sync.Onceto ensure single signal handler registration - Confirmation flag handling made thread-safe with RWMutex
- All global state access now uses mutex-protected accessors
- Used
- Config directory: Improved Windows support and thread safety
- Added mutex-protected
configDirwith proper RWMutex - Removed unused
configDirOncevariable - Better handling of Windows paths with forward/backward slashes
- Added mutex-protected
- Provider name regex: Fixed to allow underscores and hyphens
- Previous regex only allowed alphanumeric characters
- Custom providers can now use
my-providerormy_providerstyle names
- Audit logging: Added file
Sync()for write durability- Prevents data loss on crashes or power failures
- Ensures audit entries are flushed to disk
- Secrets parsing: Skip entries with empty keys
- Prevents crashes on malformed environment variable entries
- Graceful handling of edge cases in ParseSecrets
- UI prompt functions: Now return errors for proper error handling
Prompt(),PromptWithDefault(),Confirm()return error- Allows callers to handle user cancellation (Ctrl+C)
- Improved test signal handling safety
- Remove hardcoded /tmp paths: Tests now use temp directories
- Cross-platform compatibility (Windows uses different temp location)
- Better isolation between test runs
Test
- Integration tests: Added
cmd/integration_test.gowith end-to-end scenarios- Tests complete workflows (setup, config, switch, reset)
- Validates cross-provider functionality
- PowerShell escaping: Added edge case tests for special characters
scripts/test-powershell-escaping.ps1for validation- Covers quotes, backticks, Unicode, and other special characters
- Expanded coverage: Significant test coverage improvements
cmd/switch_test.go: 1000+ lines of comprehensive testscmd/metrics_test.go: 200+ lines for metrics commandcmd/update_test.go: 350+ lines for update functionalityinternal/audit: 350+ lines of audit logging testsinternal/recovery: 800+ lines of recovery utility testsinternal/wrapper: 400+ lines of wrapper script tests
Documentation
- Best practices guide: New
docs/best-practices.mdwith 600+ lines- Security guidelines for API key management
- Multi-provider configuration examples
- Performance optimization tips
- Error handling patterns
- Wrapper script architecture: New
docs/architecture/wrapper-scripts.md- Security design rationale
- Platform-specific implementation details
- Threat model and mitigation strategies
- Advanced configuration: Expanded
docs/guides/advanced-configuration.md- Multi-provider setup examples
- Custom provider configuration
- Environment variable integration
- Performance metrics guide: New
docs/guides/performance-metrics.md- Metrics collection overview
- Export and analysis workflows
- Integration with monitoring tools
- Updated documentation:
- README with new features and examples
- Architecture documentation with wrapper script details
- AGENTS.md with updated provider name regex
- Contributing guide with new test patterns
Build
- Taskfile: Added Windows support for all build tasks
- Cross-platform build, test, and lint commands
- PowerShell scripts for Windows-specific operations
- CI/CD improvements:
- Enhanced vulnerability scanning workflow
- Better caching strategies for faster builds
- Improved error reporting in CI logs
v1.4.3
Fixed
- Windows installer: Fixed path escape character issue in default install directory
- Changed
"$env:USERPROFILE\.local\bin"toJoin-Path $env:USERPROFILE ".local\bin" - Backslash before "local" was being interpreted as escape character, causing malformed paths
- Path now correctly resolves to
C:\Users\username\.local\bin
- Changed
- Update command: Removed unused imports (
path/filepath,strings) from cmd/update.go - Build: Added Windows-specific Taskfile configuration using PowerShell script
- Created
scripts/build.ps1for proper git version detection on Windows - Fixed
task buildto display correct version on Windows
- Created
v1.4.2
Fixed
- Windows installer: Added Get-FileHash compatibility for PowerShell 2.0+
- The Get-FileHash cmdlet is only available in PowerShell 4.0+
- Added Get-FileHashCompat function that falls back to .NET System.Security.Cryptography.SHA256 for older PowerShell versions
- Installer now works on Windows 7 and earlier versions with PowerShell 2.0/3.0
- Windows installer: Fixed checksum regex to match GoReleaser format
- Changed pattern from
^([a-f0-9]+)\s+\*($($BinaryName)_windows_)to^([a-f0-9]+)\s+($($BinaryName)_windows_\S+) - GoReleaser generates checksums with two spaces instead of asterisk prefix
- Checksum verification now works correctly for Windows binaries
- Changed pattern from
v1.4.1
Fixed
- Install script: Fixed version variable reference causing empty version in download URL
- Changed
$versionto$VERSIONin log statement to display version correctly - Prevents 404 errors when installing specific versions
- Changed
- Update command: Added User-Agent header to GitHub API requests
- Improves API request identification and reliability
v1.4.0
Added
- Self-update command: New
kairo updatecommand to check for and install the latest version- Fetches latest release from GitHub API with configurable URL via
KAIRO_UPDATE_URLenvironment variable - Cross-platform support: PowerShell installer for Windows, curl|sh for Unix
- Version comparison using semver library with proper pre-release handling (alpha, beta, rc)
- Timeout protection (10s) for API requests with context cancellation
- Comprehensive error handling for network failures, timeouts, and invalid responses
- Fetches latest release from GitHub API with configurable URL via
Test
- Update command coverage: Added 2 unit tests for update functionality
- OS detection and install script URL selection