Skip to content

Releases: dkmnx/kairo

v1.7.1

06 Feb 06:34

Choose a tag to compare

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

31 Jan 13:42

Choose a tag to compare

Added

  • API key validation: Strengthened validation with provider-specific formats
    • Anthropic keys: Must start with sk-ant-api0 followed 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
  • 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

28 Jan 04:38

Choose a tag to compare

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

20 Jan 08:13

Choose a tag to compare

Added

  • Config file extension: Changed config filename from config to config.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

20 Jan 01:19

Choose a tag to compare

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

18 Jan 09:35

Choose a tag to compare

Added

  • Performance metrics: New kairo metrics command for monitoring CLI operations
    • Track execution time, memory usage, and operation counts
    • Export metrics in JSON or CSV format for analysis
    • internal/performance package with comprehensive metrics collection
    • Detailed guide in docs/guides/performance-metrics.md
  • Retry and panic recovery: New internal/recovery package 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-all command
    • 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 config and kairo setup commands
    • Improved error messages with recovery hints
  • Secure token passing: Wrapper script for secure API key delivery
    • Replaces insecure pipe-based token passing
    • internal/wrapper package 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 reset prompts before removing provider configuration
    • kairo rotate prompts before regenerating encryption keys
    • Can be bypassed with --yes flag for automation
  • Dependency vulnerability scanning: New GitHub Actions workflow
    • Automated security scanning on every pull request
    • Uses govulncheck with SARIF output for GitHub integration
    • Replaced deprecated deny-licenses with allow-licenses policy

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/errors into internal/errors
    • Single source of truth for typed errors and error context
  • PowerShell completion: Simplified deployment process
    • New scripts/kairo-completion.ps1 standalone completion script
    • Can be sourced directly or installed via kairo completion --save
    • Improved Windows developer experience
  • 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 | sh and irm | iex patterns
    • 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 of sk-an***mnop

Fixed

  • Thread safety: Fixed race conditions in signal handling
    • Used sync.Once to ensure single signal handler registration
    • Confirmation flag handling made thread-safe with RWMutex
    • All global state access now uses mutex-protected accessors
  • Config directory: Improved Windows support and thread safety
    • Added mutex-protected configDir with proper RWMutex
    • Removed unused configDirOnce variable
    • Better handling of Windows paths with forward/backward slashes
  • Provider name regex: Fixed to allow underscores and hyphens
    • Previous regex only allowed alphanumeric characters
    • Custom providers can now use my-provider or my_provider style 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.go with 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.ps1 for validation
    • Covers quotes, backticks, Unicode, and other special characters
  • Expanded coverage: Significant test coverage improvements
    • cmd/switch_test.go: 1000+ lines of comprehensive tests
    • cmd/metrics_test.go: 200+ lines for metrics command
    • cmd/update_test.go: 350+ lines for update functionality
    • internal/audit: 350+ lines of audit logging tests
    • internal/recovery: 800+ lines of recovery utility tests
    • internal/wrapper: 400+ lines of wrapper script tests

Documentation

  • Best practices guide: New docs/best-practices.md with 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

13 Jan 02:14

Choose a tag to compare

Fixed

  • Windows installer: Fixed path escape character issue in default install directory
    • Changed "$env:USERPROFILE\.local\bin" to Join-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
  • Update command: Removed unused imports (path/filepath, strings) from cmd/update.go
  • Build: Added Windows-specific Taskfile configuration using PowerShell script
    • Created scripts/build.ps1 for proper git version detection on Windows
    • Fixed task build to display correct version on Windows

v1.4.2

13 Jan 01:18

Choose a tag to compare

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

v1.4.1

11 Jan 12:13

Choose a tag to compare

Fixed

  • Install script: Fixed version variable reference causing empty version in download URL
    • Changed $version to $VERSION in log statement to display version correctly
    • Prevents 404 errors when installing specific versions
  • Update command: Added User-Agent header to GitHub API requests
    • Improves API request identification and reliability

v1.4.0

08 Jan 01:04

Choose a tag to compare

Added

  • Self-update command: New kairo update command to check for and install the latest version
    • Fetches latest release from GitHub API with configurable URL via KAIRO_UPDATE_URL environment 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

Test

  • Update command coverage: Added 2 unit tests for update functionality
    • OS detection and install script URL selection