Releases: PhilippPolterauer/opencode-quotas
Releases · PhilippPolterauer/opencode-quotas
v0.0.4-beta
Fixed
- Wrap injected quota footers in a fenced Markdown
textblock and switch the default title away from underscore italics so OpenCode Desktop preserves alignment and renders the footer cleanly.
Documentation
- Document the new Markdown footer rendering behavior in
README.mdandDESIGN.md.
v0.0.3
Changed
- Replace platform-specific build scripts with a cross-platform
scripts/build.tsrunner used bybun run build
Fixed
- Fix macOS (Darwin) path handling to use XDG-style paths (
~/.local/share/opencode/,~/.config/opencode/) instead of~/Library/Application Support/opencode/, matching OpenCode's actual file locations (fixes #4) - ETTL Prediction: Fix overly pessimistic time-to-limit predictions for long-term quotas (Weekly/Monthly) by ignoring short-term usage spikes in the prediction engine.
- Robustness: Ensure
QuotaServicehandles missing authentication files gracefully (verified by new robustness tests), preventing crashes for users with minimal setups.
v0.0.2
Added
historyResetThresholdoption (0-100) to allow fine-tuning quota reset detection inHistoryService- End-to-end injection test that runs the OpenCode CLI when
OPENCODE_QUOTAS_E2E=1is set - Integration tests for default configuration behavior to prevent documentation drift
- Schema validation tests using AJV for configuration validation
- Tests for overlapping aggregation patterns
- Global
predictionWindowMinutesconfig option for prediction engine - Error handling for malformed history files
Changed
- Inline footer injection: Switch from idle-based PATCH injection to inline injection via
experimental.text.complete, modifyingoutput.textdirectly for immediate, reliable footer display - Relax token splitting in
QuotaServiceto better handle common ID characters like hyphens and underscores - Align
showUnaggregateddefault tofalseacross implementation, interface documentation, and JSON schema - Switch
validateConfigto synchronous validation for predictable initialization - Deep clone
aggregatedGroupsdefaults to prevent shared array references between default and user configurations - Filter out internal/test Antigravity quotas (e.g. "chat 12345", "rev123") by default to reduce noise
- Extract
SHORT_WINDOW_FALLBACK_RATIOconstant in prediction engine for better code clarity - Comprehensive test suite expanded from 46 to 175 tests with 383 assertions
- Updated default
progressBar.colortofalse(was incorrectly documented astrue)
Fixed
- Include
schemas/directory in npm package, required for configuration validation - Resolve issue where build artifacts were sometimes nested in
dist/srcdue to stray files in the project root - Updated build script to automatically clear
dist/before each build to ensure no stale files remain - Skip footer injection for reasoning/subagent steps and incomplete messages, keeping quota footers limited to final responses only
- Only inject footer when message is complete (
finish === "stop"orfinishReason === "stop") to prevent duplicate injections during streaming - Fix footer injection patch payload to include required discriminator fields (
type: "text") - Ensure ANSI colorization strictly respects
config.colorand is disabled by default - Use build configuration (
tsconfig.build.json) that emits todist/ - Add missing
predictionShortWindowMinutesdefault toDEFAULT_CONFIG - Fix overlapping aggregation patterns with token-aware matching and regex/glob support
- Fix unused imports in
src/logger.ts - Fix
tests/test-ag.tsoutdated API signature - Add missing
patternsandproviderIdfields to aggregatedGroups schema - Fix schema mismatch between 'groups' vs 'aggregatedGroups'
- Fix
showUnaggregateddefault causing empty quota display - Improved type safety in plugin initialization by replacing
anywithunknownfor error handling - Updated all unit test mocks to support the new
IHistoryServiceinterface
Documentation
- Update DESIGN.md architecture diagram to match implementation
- Update AGENTS.md with complete project structure
- Clarified experimental GitHub Copilot provider status in documentation
- Document
predictionShortWindowMinutesin README config reference - Correct README to reflect
filterByCurrentModeldefault isfalse
Removed
- Removed unused QuotaTool and stale docs
- Removed unused
recentChecksfield inPluginState