Commit Graph
165 Commits
Author SHA1 Message Date
Gemini Nexus Bot ccc5d36a0d chore: update publisher to evandrodevbr and consolidate icon references
- Change author from Draculabo to evandrodevbr in package.json
- Update GitHub publisher config in forge.config.ts (owner/repo/iconUrl)
- Add favicon link in index.html pointing to src/assets/icon.png
- Ensure all app icon references use images/icon.* consistently
2026-04-22 06:01:11 -03:00
Gemini Nexus Bot bfdb58fc81 i18n(pt-BR): add Portuguese translation for install notice dialog 2026-04-22 05:55:34 -03:00
Gemini Nexus Bot b32dd24765 build: add automated WiX extraction script for Windows builds
- Create scripts/build-windows.js that extracts wix314-binaries.zip to tools/wix314/
- Adds extracted dir to PATH so electron-wix-msi can find candle.exe/light.exe
- Adds npm script 'make:win' for one-command Windows installer build
2026-04-22 05:44:41 -03:00
Gemini Nexus Bot 2c81d129f9 fix(streaming): resolve Gemini v1internal SSE wrapped format and OpenCode compatibility
- Fix processStreamResponse to unwrap json.response ?? json for Gemini v1internal wrapped SSE chunks
- Add initial role:assistant delta chunk for Vercel AI SDK / OpenCode compatibility
- Add trafficLogger console transport for real-time debugging
- Add upstream request/response logging throughout proxy paths
- Update proxy-controller.integration and proxy-retry-mock tests for new signatures
- Add comprehensive proxy-stream-debug unit tests (8 cases including wrapped format regression)
- Add OpenCode integration documentation
2026-04-22 05:26:57 -03:00
Gemini Nexus Bot f4b713c3f4 Merge branch 'vk/53e9-pesquise-os-melh' into main 2026-04-22 03:26:52 -03:00
Gemini Nexus Bot 5b130aca66 fix(stream): restore processStreamResponse to original working behavior
The initial role chunk (role:'assistant', content:'') added in a3eabc2
was causing the OpenCode TUI to receive an empty first delta and
discard all subsequent content, showing only the completion time with
no text output.

Restored to the exact streaming behavior from e524a340 that worked:
- Remove the pre-emptive initial chunk entirely
- Move hasEmittedChunk=true back inside pushChunk (original position)
- Use reasoning_content delta field for thought parts instead of
  wrapping in <think> tags (which corrupts plain text responses)
- Remove streamOptions/include_usage/lastUsageMetadata tracking
  (not present in the working version)
- Remove isThinking state machine (was adding </think> noise to output)

Kept from the spec compliance work (a3eabc2):
- toolCallIndex counter for correct finish_reason:'tool_calls' mapping
- Comment explaining why we override Gemini's STOP finish reason
2026-04-22 03:26:51 -03:00
Gemini Nexus Bot 4653fa2b41 Merge branch 'vk/53e9-pesquise-os-melh' into main 2026-04-22 03:17:50 -03:00
Gemini Nexus Bot a3eabc2aaa fix(api): full OpenAI-spec compliance for OpenCode integration
Route fixes:
- Add POST /v1/messages/chat/completions alias so OpenCode clients
  misconfigured with baseURL ending in /v1/messages no longer get 404

Session affinity:
- Extract x-session-affinity HTTP header (sent by OpenCode) and use it
  as the session key for token stickiness, falling back to body-level
  session_id fields if the header is absent

Tool calling (streaming):
- finish_reason is now 'tool_calls' when function calls were emitted in
  the stream (Gemini always sends STOP, so we check toolCallIndex > 0)
- createSyntheticOpenAIStream (stream fallback path) now emits all
  tool_call deltas before the finish chunk instead of silently dropping
  them when content is null

Tool calling (non-streaming):
- content is now always null when tool_calls are present, satisfying
  strict clients that reject non-null content alongside tool_calls
- system_fingerprint field added to OpenAIChatResponse interface and
  response builder for OpenAI spec compliance

Usage accounting:
- thoughtsTokenCount is now included in completion_tokens and
  total_tokens for the streaming usage chunk, fixing undercount for
  thinking/reasoning model runs
2026-04-22 03:17:46 -03:00
Gemini Nexus Bot 099671a4e5 Merge branch 'vk/53e9-pesquise-os-melh' into main 2026-04-22 02:34:27 -03:00
Gemini Nexus Bot 0f9d08018b fix: resolve startup issues with account activation, credit fetch and poll noise
- GoogleAPIService: try loadCodeAssist first for AI credits since
  fetchCredits returns 404 for many accounts; keep fetchCredits as
  fallback, removing the spurious warn on every poll cycle
- CloudAccountRepo: auto-activate the most-recently-used account when
  no account has is_active=1; downgrade noisy [DEBUG] log from info
  to debug level
- StatusBar: increase process-status refetch interval from 10s to 30s
  to reduce redundant IPC calls and log noise
2026-04-22 02:33:51 -03:00
Gemini Nexus Bot 83489d5084 Merge branch 'vk/5b60-veja-o-que-ja-te' into main
Add comprehensive API request/response logging with structured winston logs
2026-04-22 00:21:44 -03:00
Gemini Nexus Bot 0454aecf70 changes 2026-04-22 00:09:29 -03:00
Gemini Nexus Bot 27da62afc9 feat(logging): add comprehensive API request/response logging with structured winston logs
- Add dedicated API logger (api-logger.ts) with winston daily rotation
- Create Fastify plugin (api-logging.plugin.ts) to intercept all API requests/responses
- Log request start, body, response, errors, and summary with precise timestamps
- Auto-mask sensitive data using existing sanitizeObject utility
- Register API logging plugin in NestJS bootstrap (server/main.ts)
- Add npm run dev script with cross-env for automatic DEBUG on Windows
- Install cross-env as devDependency for cross-platform env vars
2026-04-22 00:07:30 -03:00
Gemini Nexus Bot faabf7ba7a docs: rename AntigravityManager to GeminiNexus in cli readme 2026-04-22 00:01:26 -03:00
Gemini Nexus Bot 433dccbaa9 feat: complete rebranding to Gemini Nexus with improved UI, proxies and documentation 2026-04-22 00:00:56 -03:00
semantic-release-bot e524a340cb chore(release): 0.11.1
## [0.11.1](https://github.com/Draculabo/AntigravityManager/compare/v0.11.0...v0.11.1) (2026-04-18)

### 🐛 Bug Fixes

* add unit label to AI credit display ([6577f1c](https://github.com/Draculabo/AntigravityManager/commit/6577f1c51fd155004b81f6171eb5feffa2448128))
* remaining localization gaps ([#156](https://github.com/Draculabo/AntigravityManager/issues/156)) ([7093c98](https://github.com/Draculabo/AntigravityManager/commit/7093c982ba790380cda7d1e8a53891970df6b3cf))
* remove AI credit refresh time scraping ([3e1e10b](https://github.com/Draculabo/AntigravityManager/commit/3e1e10b2a580ebf5a64b9a8982bd812a6a1f2924))

### 📝 Documentation

* **repo:** update project docs ([440a934](https://github.com/Draculabo/AntigravityManager/commit/440a9342800f244287c758b1a77a05fac9096df7))

### ♻️ Code Refactoring

* **ipc:** migrate renderer IPC client to official oRPC client ([d0c282d](https://github.com/Draculabo/AntigravityManager/commit/d0c282dffff24bb74a81cfa523f2f72f949bf8f9))
* standardize runtime guard patterns with lodash-es ([#154](https://github.com/Draculabo/AntigravityManager/issues/154)) ([bc35b96](https://github.com/Draculabo/AntigravityManager/commit/bc35b96b5d2d873cf0f187a57de695aedc32108f))
v0.11.1
2026-04-18 17:26:35 +00:00
Draculabo 6577f1c51f fix: add unit label to AI credit display 2026-04-19 01:24:11 +08:00
Draculabo 3e1e10b2a5 fix: remove AI credit refresh time scraping 2026-04-19 01:10:51 +08:00
Lê Trung HiếuandLê Trung Hiếu 7093c982ba fix: remaining localization gaps (#156)
Co-authored-by: Lê Trung Hiếu <[email protected]>
2026-04-14 12:59:57 +08:00
Draculabo 440a934280 docs(repo): update project docs 2026-04-12 15:20:41 +08:00
Draculabo 87887dc4b9 chore(repo): remove tracked local database 2026-04-12 15:20:35 +08:00
Draculabo 00ff50055f chore(security): bump runtime/server dependencies 2026-04-12 15:20:30 +08:00
Draculabo d0c282dfff refactor(ipc): migrate renderer IPC client to official oRPC client 2026-04-12 15:20:22 +08:00
vin bc35b96b5d refactor: standardize runtime guard patterns with lodash-es (#154)
* refactor(ui): replace runtime type guards with lodash-es predicates

* refactor(runtime): migrate typeof checks to lodash-es in core modules

* refactor(ipc): standardize runtime guards with lodash-es

* test(refactor): align runtime guard checks with lodash-es

* docs(agents): add lodash-es runtime guard skill summary
2026-04-12 11:41:56 +08:00
semantic-release-bot 0223e8d807 chore(release): 0.11.0
## [0.11.0](https://github.com/Draculabo/AntigravityManager/compare/v0.10.0...v0.11.0) (2026-04-11)

### ✨ Features

* account management overhaul + 7 issue resolutions ([#147](https://github.com/Draculabo/AntigravityManager/issues/147)) ([ed0dd81](https://github.com/Draculabo/AntigravityManager/commit/ed0dd811a8958928a2702839db07444e89f9fdb2)), closes [#79](https://github.com/Draculabo/AntigravityManager/issues/79) [#126](https://github.com/Draculabo/AntigravityManager/issues/126) [#99](https://github.com/Draculabo/AntigravityManager/issues/99) [#145](https://github.com/Draculabo/AntigravityManager/issues/145) [#134](https://github.com/Draculabo/AntigravityManager/issues/134) [#53](https://github.com/Draculabo/AntigravityManager/issues/53) [#117](https://github.com/Draculabo/AntigravityManager/issues/117)
* **antigravity:** add model specs and update mapping logic ([0a60c0e](https://github.com/Draculabo/AntigravityManager/commit/0a60c0eafa698202722be9c283cb52831e2e0179))
* **cloud-oauth:** support selectable google oauth clients ([bcdf2a6](https://github.com/Draculabo/AntigravityManager/commit/bcdf2a6c24fc992d32b4ae883f2a34c8e64969e3))
* **cloud-status:** classify blocked accounts and surface validation state ([388fbcb](https://github.com/Draculabo/AntigravityManager/commit/388fbcb2a9522285eb0bb4a541b48cd3e1049470))
* **cloud-sync:** persist project and status metadata for synced accounts ([385036d](https://github.com/Draculabo/AntigravityManager/commit/385036d577495caeebf95301542811b08c9f333e))
* **protobuf:** add unified state helpers for oauth payloads ([f970ccb](https://github.com/Draculabo/AntigravityManager/commit/f970ccb2ed1f3a3e9de09221895f0b650c1115b9))
* **proxy:** add upstream error and rate-limit tracking support ([20fffff](https://github.com/Draculabo/AntigravityManager/commit/20fffff29c47d1147e9b429884d9e8b613e7da6f))
* **proxy:** improve parity, rate limiting, and token scheduling ([5401e40](https://github.com/Draculabo/AntigravityManager/commit/5401e40943824d54bc95971229a83934e55ad88f))
* **proxy:** improve quota fallback and proxy parity handling ([4fa0a3c](https://github.com/Draculabo/AntigravityManager/commit/4fa0a3c63dd4b973d0d07feb7351831ad827176d))
* **ui:** update cloud account and provider visibility experience ([c95f494](https://github.com/Draculabo/AntigravityManager/commit/c95f494569b49ff1fae871970764c9f0a3fbda59))

### 🐛 Bug Fixes

* **cloud:** add missing oauth action bindings and validation status helper ([87c17a1](https://github.com/Draculabo/AntigravityManager/commit/87c17a1ed0856572f0f8c46ede923b563b726108))
* **cloud:** fetch AI credits on startup with endpoint fallback and preserve cached credits ([61716bb](https://github.com/Draculabo/AntigravityManager/commit/61716bb51259c0a5899b8659aa864c5772b75cbb))
* **linux:** dynamic executable path detection ([#121](https://github.com/Draculabo/AntigravityManager/issues/121)) ([30e38dc](https://github.com/Draculabo/AntigravityManager/commit/30e38dcb8b9329b68601c9df896fd815ccadc1ec))
* **linux:** harden account-switch relaunch against GPU process crashes ([2c1755e](https://github.com/Draculabo/AntigravityManager/commit/2c1755e578ac91962e813a141ec7d3df6fa61a74))

### 📝 Documentation

* **proxyman:** add setup and debugging guides and link them from readmes ([3100db9](https://github.com/Draculabo/AntigravityManager/commit/3100db93ed92f9f8ef19aceae49a699768e20ca9))

### ✅ Tests

* **proxy:**  refine signature test text ([50a325b](https://github.com/Draculabo/AntigravityManager/commit/50a325be113ef59dd9d0144b84d64f9eb40ea67a))
v0.11.0
2026-04-11 11:10:10 +00:00
Draculabo 1fd0fde700 chore(release): remove [skip ci] from semantic-release git commit message 2026-04-11 18:32:34 +08:00
Draculabo 2c1755e578 fix(linux): harden account-switch relaunch against GPU process crashes 2026-04-11 18:03:30 +08:00
Draculabo 3100db93ed docs(proxyman): add setup and debugging guides and link them from readmes 2026-04-11 17:31:13 +08:00
Draculabo e9c4f72883 chore(debug): add proxyman proxy debugging tools 2026-04-11 16:49:56 +08:00
Draculabo 87c17a1ed0 fix(cloud): add missing oauth action bindings and validation status helper 2026-04-11 16:49:10 +08:00
Draculabo 4fa0a3c63d feat(proxy): improve quota fallback and proxy parity handling 2026-04-11 16:47:57 +08:00
Draculabo 388fbcb2a9 feat(cloud-status): classify blocked accounts and surface validation state 2026-04-11 16:46:36 +08:00
Draculabo bcdf2a6c24 feat(cloud-oauth): support selectable google oauth clients 2026-04-11 16:45:39 +08:00
Draculabo 385036d577 feat(cloud-sync): persist project and status metadata for synced accounts 2026-04-11 16:44:30 +08:00
Draculabo f970ccb2ed feat(protobuf): add unified state helpers for oauth payloads 2026-04-11 16:43:43 +08:00
vinandYoussef fce38ec6f0 Continue PR #142: security + Nix docs follow-up (#148)
* feat: add Nix Flake release and update documentation for Nix integration

- Added flake.nix with native library patching for Linux
- Included SHA256 hashes for v0.10.0 DEB releases (x86_64 and arm64)
- Updated README.md with instructions for nix run, NixOS, Home Manager, and devShells
- Generated flake.lock for reproducibility

* refactor: improve Nix Flake patterns for better consumer control

- Extracted derivation logic into a reusable `mkPackage` function
- Exposed `overlays.default` to allow consumers to use their own nixpkgs instance
- Updated `pkgs.system` to `pkgs.stdenv.hostPlatform.system` to follow modern Nix patterns
- Ensured default `packages` definition correctly handles unfree configuration for testing with `nix build` or `nix run`

* docs: update README with advanced Nix integration patterns

- Added Option 1 (Direct Integration) and Option 2 (Overlay) documentation
- Explained how to use the overlay for full nixpkgs control
- Fixed Markdown styling and lint issues in the Nix integration section

* docs: simplify Nix documentation to favor Overlay integration

- Removed "Option 1" (direct integration) as per user feedback
- Promoted the Overlay method as the standard way to consume the package
- Updated devShell examples to rely on the overlayed package set for consistency

* fix(security): prevent master key overwriting on decryption failure and improve account loading resilience

- Modify readSafeStorageKey and generatePrimaryMasterKey to stop if decryption fails for an existing file, preventing permanent data loss when keyring is temporarily locked.
- Update CloudAccountRepo.getAccounts and getAccount to gracefully skip corrupted account records instead of throwing errors.
- Added detailed logging for security failures to aid in diagnostics.

* docs(readme): sync Nix/NixOS integration docs in README.zh-CN

---------

Co-authored-by: Youssef <[email protected]>
2026-04-06 21:34:32 +08:00
Draculabo 61716bb512 fix(cloud): fetch AI credits on startup with endpoint fallback and preserve cached credits 2026-04-06 20:41:42 +08:00
vd ed0dd811a8 feat: account management overhaul + 7 issue resolutions (#147)
- Add smart JSON export/import with schema validation and deduplication
- Add per-account proxy configurations (Issue #79)
- Add advanced account sorting engine (Issues #126 & #99)
- Add compact horizontal layout, AI credits, inline model visibility (Issues #145 & #134)
- Add desktop push notifications for low quota (Issue #53)
- Fix Arch Linux AUR process detection bug (Issue #117)
- Default theme set to Dark Mode (it's better)
- UI Polishing: Improved sort dropdown and symmetrical dialog layouts
- Dev Mode: Resolved port conflicts and single-instance locks
- Updated README and README.zh-CN with new features
2026-04-06 20:32:42 +08:00
Draculabo 50a325be11 test(proxy): refine signature test text 2026-03-06 21:56:52 +08:00
Draculabo 20fffff29c feat(proxy): add upstream error and rate-limit tracking support 2026-03-06 21:56:30 +08:00
Draculabo c95f494569 feat(ui): update cloud account and provider visibility experience 2026-03-06 21:52:11 +08:00
Draculabo 5401e40943 feat(proxy): improve parity, rate limiting, and token scheduling 2026-03-06 21:50:18 +08:00
Draculabo 0a60c0eafa feat(antigravity): add model specs and update mapping logic 2026-03-06 21:48:24 +08:00
30e38dcb8b fix(linux): dynamic executable path detection (#121)
* fix(linux): dynamic executable path detection

The hardcoded path '/usr/share/antigravity/antigravity' was causing
profile switching to fail on Linux when the app was installed in
standard locations like /usr/bin or /opt.

Implemented multi-path probing and /usr/local/bin:/usr/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl lookup to correctly find
the binary for relaunch after profile swap.

* fix: return empty string when no executable found

Address codereview feedback: both windows and linux branches now
return '' when no binary is found at any known location, consistent
with the default case. Callers handle empty string as 'binary not
found' and will surface a clear error.

* chore: update package-lock.json to reflect changes in dependency configurations

---------

Co-authored-by: Muhammad Usama <[email protected]>
Co-authored-by: Draculabo <[email protected]>
2026-02-21 20:11:31 +08:00
semantic-release-bot cad8657148 chore(release): 0.10.0 [skip ci]
## [0.10.0](https://github.com/Draculabo/AntigravityManager/compare/v0.9.2...v0.10.0) (2026-02-19)

### ✨ Features

* Add powerful CLI for account management ([#115](https://github.com/Draculabo/AntigravityManager/issues/115)) ([b949764](https://github.com/Draculabo/AntigravityManager/commit/b9497648c6a7f50dd9b05a7f3d54ac95fa373349))
* Implement provider groupings with account calculator and compre… ([#113](https://github.com/Draculabo/AntigravityManager/issues/113)) ([1e59a1c](https://github.com/Draculabo/AntigravityManager/commit/1e59a1c901d5feedb1089015060fc8c31b614d4d))

### 🐛 Bug Fixes

* refactor layout containers for proxy and settings pages to ensure full height and unified scrolling ([#102](https://github.com/Draculabo/AntigravityManager/issues/102)) ([caaaaf5](https://github.com/Draculabo/AntigravityManager/commit/caaaaf571864aeb2bd68dc271972fd197c999bd1))
* **statusbar:** reduce process polling from 2s to 10s to prevent heap corruption crash ([#110](https://github.com/Draculabo/AntigravityManager/issues/110)) ([118fad5](https://github.com/Draculabo/AntigravityManager/commit/118fad567eeaac4e173b97d3eeb84e1f3edd4556))
v0.10.0
2026-02-19 14:03:23 +00:00
AngeloooooandDraculabo 8ed4593f73 Refactor Gemini model display: filter old versions, group low/high pкo, and improve naming (#114)
* Refactor Gemini model display: filter old versions, group low/high pro, and improve naming

* Fix potential negative minutes and refine Gemini 3 Pro grouping logic based on PR feedback

* The account change process has been sped up

* Address PR review: enhance error message and parameterize polling interval in process handler

* Address PR review: fix potential race condition in database backup logic

* fix: prevent renderer white screen and harden sentry gating

* feat:  localize model labels

* chore: enable hoisted node-linker

* chore: ignore .agent/.claude/.codex in prettier

---------

Co-authored-by: Draculabo <[email protected]>
2026-02-19 19:37:30 +08:00
Angelooooo b9497648c6 feat: Add powerful CLI for account management (#115)
* feat: Add powerful CLI for account management

- 18 commands for quota monitoring, switching, validation
- Interactive mode with keyboard navigation
- Smart auto-switch based on quotas
- Alias support for quick access
- Token auto-refresh and diagnostics
- Full documentation in cli/README.md"

* fix: Address code review issues - Add SQLite transactions for atomicity\n- Add input validation for import_accounts\n- Add per-account error handling in bulk operations\n- Add graceful error handling in interactive mode\n- Add validation for varint encoding (negative values)\n- Improve user feedback on partial failures
2026-02-19 19:19:25 +08:00
ArtemisAIandDraculabo 1e59a1c901 feat: Implement provider groupings with account calculator and compre… (#113)
* feat: Implement provider groupings with account calculator and comprehensive fixes

- Add provider detection utilities (detectProvider, PROVIDER_REGISTRY) for Claude/Gemini/Others categorization
- Implement grouping logic (groupModelsByProvider, calculateProviderStats, calculateAccountStats) with health status calculation
- Create useProviderGrouping hook for collapsible state management and persistence
- Add ProviderGroup component with health indicators, progress bars, and model visibility integration
- Enhance CloudAccountList with account-level calculator showing overall percentage and earliest reset time
- Implement grid layout selector (auto/2-col/3-col/list) with config persistence and tooltips
- Add global quota aggregate bar across all accounts in top statistics
- Fix model visibility settings regression by accessing account.quota.models instead of account.quota
- Show 'Rate Limited' instead of '0%' for exhausted quotas with consistent getQuotaLabel function
- Add comprehensive i18n translations for layout selector and rate limited labels (en, zh-CN, ru)
- Disable batch operations when provider groupings are enabled to prevent conflicts
- Include unit tests for provider detection logic and grouping functionality

Addresses critical issues: model list regression, rate limited display, layout control, global quota visibility, and consistent quota labeling across all components.

* fix: resolve ESLint no-ex-assign violations in proxy service

- Fix exception parameter reassignment in catch blocks
- Rename catch parameters to avoid no-ex-assign rule violations
- Maintain same error handling logic while complying with linting rules

* fix: add missing Models tab to settings page

- Add Models tab between General and Proxy tabs
- Import and integrate ModelVisibilitySettings component
- Fix critical regression where model visibility settings were inaccessible

* fix: add missing React hook imports in settings route

* test: remove obsolete tests for removed controller APIs

---------

Co-authored-by: Draculabo <[email protected]>
2026-02-18 16:38:15 +08:00
ArtemisAI 118fad567e fix(statusbar): reduce process polling from 2s to 10s to prevent heap corruption crash (#110)
## Problem
Application crashes with exit code 0xC0000374 (heap corruption) at ~7 minute mark due to excessive process monitoring subprocess spawning.

## Root Cause
StatusBar component continuously polls process status every 2 seconds (2000ms refetchInterval), triggering:
- ~210 subprocess invocations over 7 minutes
- Each invocation spawns find-process subprocess
- Accumulated process handles lead to heap corruption
- OS terminates renderer with 0xC0000374 exit code

## Solution
Reduce UI polling interval from 2 seconds to 10 seconds:
- Reduces subprocess spawning by 5x (210  42 calls over 7 minutes)
- 10-second UI update delay is imperceptible to users
- Purely cosmetic feature doesn't require real-time responsiveness
- Expected result: App survives 30+ minutes instead of 7 minutes

## Testing
- Can be tested by running app continuously for 30+ minutes
- Monitor for absence of 0xC0000374 exit codes
- Verify StatusBar still updates (with 10s delay instead of 2s)

## Impact
- Risk: LOW (configuration-only change)
- User impact: Minimal (UI status indicator updates slightly slower)
- System impact: CRITICAL - Prevents crash loop
2026-02-14 22:14:28 +08:00
vin 41a3a10ab6 chore(deps): move @tailwindcss/vite to devDependencie (#106) 2026-02-12 21:12:14 +08:00