Commit Graph
1181 Commits
Author SHA1 Message Date
Finessse 35018f2e43 feat(logging): add ring buffer for in-memory log capture
Implement thread-safe circular buffer that captures log entries
for display in TUI and web dashboard. Integrates as a logrus hook.
2025-12-31 01:58:09 +07:00
Finessse 6982a4cc31 feat(tui): add responsive layout and fix sidebar overflow
COMPLETED:
- Added ViewWithSize(width, height) pattern to all submodels
  - login.go: responsive provider rows with adaptive widths
  - switch.go: responsive agent rows without card borders
  - mappings.go: responsive table columns with calculateColumnWidths()
  - usage.go: responsive stat cards (2x2 grid layout)
  - logs.go: responsive log entries with message truncation

- Fixed main View() layout calculation in tui.go
  - Properly accounts for border (2) + padding (2) = 4 chars per panel
  - sidebarWidth now represents content width (20/14 for normal/narrow)
  - contentWidth = m.width - sidebarWidth - 9 (accounts for both panels)

- Added new screen files:
  - integrations.go: setup/integration screen
  - logs.go: real-time log viewer with filtering
  - mappings.go: model alias mappings table
  - usage.go: usage statistics with charts

PENDING TEST:
- Verify sidebar displays correctly alongside content (was overflowing)
- Test all screens at various terminal widths (60, 80, 100+ cols)

KNOWN ISSUE BEING FIXED:
- Sidebar was showing only "[8] Setup" at top due to width overflow
- Content panel was too wide, causing horizontal wrap
2025-12-30 08:45:56 +07:00
Finessse bd7575ca2b chore: apply upstream fixes from CLIProxyAPI v6.6.68
Cherry-picked fixes:
- fix(antigravity): inject required placeholder when properties exist without required
- fix(translators): correct key path for system_instruction.parts in Claude request logic
2025-12-30 02:26:57 +07:00
Finessse 3f737dc3c7 fix: cross-platform SysProcAttr for non-Windows builds 2025-12-30 01:57:41 +07:00
Finessse 7d90fda663 feat(tui): add status dashboard screen 2025-12-30 01:28:34 +07:00
Finessse 93a0643466 feat(tui): add provider login screen 2025-12-30 01:28:29 +07:00
Finessse dd113e5077 feat(tui): add agent switch screen 2025-12-30 01:28:25 +07:00
Finessse e20343eeec feat(tui): add server control screen 2025-12-30 01:28:20 +07:00
Finessse 738cd4d365 feat(tui): add main TUI app and utilities 2025-12-30 01:28:05 +07:00
Finessse 244782281c feat(tui): add styles and key bindings 2025-12-30 01:28:01 +07:00
Finessse ea371ccfc6 refactor: remove desktop GUI, keep CLI + tray architecture
- Delete cmd/proxypilotui/main_windows.go (desktop GUI)
- Keep cmd/proxypilotui/assets/ (web dashboard)
- Update cliproxytray to remove embedded asset server
- Update proxypilot_dashboard.go for standalone dashboard
- Update README and docs for CLI + tray architecture
- Update proxypilotpack build scripts
2025-12-30 00:25:15 +07:00
Finessse 710a2dc3bc chore(api): update dashboard route configuration 2025-12-29 21:21:42 +07:00
Finessse 3e8d6e3c92 feat(api): register management routes for new features
Register routes for:
- /request-history/* endpoints (persistent history)
- /thinking-budget endpoint (extended thinking config)

Initialize RequestHistoryManager with auto-save.
2025-12-29 21:20:07 +07:00
Finessse 1a85ba0e17 feat(cmd): add agent configuration switch command
Add DoSwitch() and DoSwitchStatusAll() for switching agent configs
between proxy mode (routed through ProxyPilot) and native mode (direct
API access). Supports claude, gemini, codex, opencode, droid, cursor,
kilo, and roocode agents with backup/restore functionality.
2025-12-29 21:19:12 +07:00
Finessse 891a52c5de feat(api): add thinking budget management endpoint
Add GET/PUT /thinking-budget endpoint for configuring extended
thinking token budgets. Supports preset levels (Low 2048, Medium 8192,
High 32768) and custom values with enable/disable toggle.
2025-12-29 21:18:58 +07:00
Finessse f7ae19d960 feat(api): add request history API endpoints
Add management endpoints for request history:
- GET /request-history - list entries with pagination
- GET /request-history/stats - aggregate statistics
- DELETE /request-history - clear all entries
- POST /request-history/export - export to JSON
- POST /request-history/import - import from JSON
- POST /request-history/save - force save to disk

Integrate RequestHistoryManager with request logging middleware.
2025-12-29 21:18:45 +07:00
Finessse ad355f75a7 feat(api): add persistent request history storage
Add RequestHistoryManager with file-based persistence at
~/.cli-proxy-api/request-history.json. Features:
- Max 500 entries with automatic pruning
- Auto-save every 30 seconds
- Thread-safe with mutex protection
- In-memory ring buffer for performance
2025-12-29 21:18:31 +07:00
Finessse 48c4cbcdf7 feat(agents): add shell config interface for CLI setup
Add GetShellConfig() to AgentHandler interface returning ShellConfigInfo
with environment variables and shell profile snippets. Implement for all
agents: Claude Code, Codex, Gemini CLI, Cursor, OpenCode, Factory Droid,
and Amazon Q CLI.
2025-12-29 21:17:58 +07:00
Finessse e6ea4295ab feat(config): add thinking budget configuration types
Add ThinkingBudgetConfig struct with preset levels (Low 2048, Medium 8192,
High 32768, Custom) for controlling extended thinking token budgets.
Supports enabled toggle and custom token count.
2025-12-29 21:17:44 +07:00
Finessse 9777997886 feat(integrations): enhance Gemini integration
- Add Gemini CLI agent configuration support
- Improve settings file detection
2025-12-29 19:00:48 +07:00
Finessse d02a63311c feat(integrations): enhance Claude integration
- Add support for Claude Code agent configuration
- Improve config file detection and parsing
2025-12-29 19:00:45 +07:00
Finessse 5ab8b5adf3 refactor(integrations): enhance agents integration
Major overhaul of agent integration system:
- Add support for additional agent types
- Improve configuration detection and management
- Better error handling and validation
2025-12-29 19:00:40 +07:00
Finessse 1e48d75aa8 feat(api): register new management routes
Wire up auth files and agents v2 management endpoints
2025-12-29 19:00:30 +07:00
Finessse 233eb30219 feat(api): add agents v2 management endpoints
Add comprehensive management API for agent configuration
2025-12-29 19:00:28 +07:00
Finessse e372d2220b feat(api): add auth files management endpoints
Add management endpoints for listing and managing auth token files
2025-12-29 19:00:27 +07:00
Finessse 21101c7a03 feat(cmd): update run command with new login flags
- Add --minimax-login and --zhipu-login flags
- Add --amazonq-import and --kiro-import flags
- Integrate new auth providers into startup flow
2025-12-29 18:59:37 +07:00
Finessse 5099678f17 feat(cmd): enhance agent setup workflow
- Add comprehensive agent configuration wizard
- Support for multiple agent types (Claude Code, Codex, Cursor, etc.)
- Auto-detect existing configurations
- Improved user prompts and validation
2025-12-29 18:59:25 +07:00
Finessse b1653fc6d0 feat(cmd): enhance agent detection
- Improve agent detection logic for multiple CLI tools
- Add support for detecting Amazon Q CLI, OpenCode
- Better path resolution and state management
2025-12-29 18:59:16 +07:00
Finessse d3aa7ece4e refactor(cmd): update Kiro login flow
- Reorganize login methods (Google OAuth, AWS Builder ID)
- Add Kiro token import from IDE config
- Improve error handling and user feedback
2025-12-29 18:59:02 +07:00
Finessse f2c51915f0 feat(cmd): add Zhipu AI API key login
Add --zhipu-login CLI flag to prompt for and save Zhipu AI API key
2025-12-29 18:58:38 +07:00
Finessse ecbe4424cb feat(cmd): add MiniMax API key login
Add --minimax-login CLI flag to prompt for and save MiniMax API key
2025-12-29 18:58:28 +07:00
Finessse cae634a64f feat(agents): add agent detection framework
- Add manager.go for centralized agent management
- Add state.go for agent state persistence
- Add detection for Claude Code, Codex, Cursor, OpenCode
- Add detection for Gemini CLI, Amazon Q CLI
- Add factory_droid.go for FactoryDroid integration
2025-12-29 18:57:56 +07:00
Finessse 42063d9f2a feat(auth): add Amazon Q CLI token import
- Add internal/auth/amazonq/token.go for token file parsing
- Add sdk/auth/amazonq.go for SDK-level Amazon Q auth
- Support importing tokens from Amazon Q CLI (~/.aws/q/)
2025-12-29 18:57:45 +07:00
Finessse 7fdbb17d47 fix(embedded): improve embedded server initialization
Minor improvements to embedded server startup.
2025-12-28 20:52:42 +07:00
Finessse a20c4cefdc feat(executor): add Zhipu AI executor
Add OpenAI-compatible executor for Zhipu AI (GLM models).

- Base URL: https://open.bigmodel.cn/api/paas/v4/
- Auth: Bearer token (API key)
- Supports streaming and non-streaming requests
- Token usage tracking
2025-12-28 20:51:10 +07:00
Finessse 833a560ae1 feat(executor): add MiniMax executor
Add OpenAI-compatible executor for MiniMax API.

- Base URL: https://api.minimax.io/v1
- Auth: Bearer token (API key)
- Supports streaming and non-streaming requests
- Token usage tracking
2025-12-28 20:50:45 +07:00
Finessse 9c19023a39 feat(registry): replace iFlow models with MiniMax/Zhipu
- Remove GetIFlowModels() function
- Add GetMiniMaxModels() with M2, M2.1, M2.1-Lightning
- Add GetZhipuModels() with GLM-4.5, 4.6, 4.7, 4-Long, 4.6V
2025-12-28 20:49:44 +07:00
Finessse 70f292a8c8 refactor(api): fix generic import after iFlow removal
- Remove iFlow import and case handler
- Add importResult type definition (was in deleted iflow_import.go)
2025-12-28 20:49:33 +07:00
Finessse 75a9908a3b refactor(api): remove iFlow from oauth sessions
Remove iFlow case from provider normalization switch.
2025-12-28 20:49:24 +07:00
Finessse f780519ee6 refactor(api): remove iFlow handlers from auth_files
- Remove iFlow auth import
- Remove RequestIFlowToken handler
- Remove RequestIFlowCookieToken handler
2025-12-28 20:49:15 +07:00
Finessse 8822013a74 refactor(api): remove iFlow routes from server
Remove iFlow OAuth callback and management API routes.
2025-12-28 20:48:54 +07:00
Finessse bc30977567 refactor(cmd): update auth manager for new providers
- Remove iFlow authenticator
- Add MiniMax authenticator
- Add Zhipu authenticator
2025-12-28 20:48:44 +07:00
Finessse 0b448f7aa7 refactor(api): remove iFlow import handlers
Remove iFlow bulk import handler and tests.

Deleted files:
- internal/api/handlers/management/iflow_import.go
- internal/api/handlers/management/iflow_import_test.go
2025-12-28 20:48:02 +07:00
Finessse ffc608b7fe refactor(executor): remove iFlow executor
Remove the iFlow request executor implementation.

Deleted: internal/runtime/executor/iflow_executor.go
2025-12-28 20:47:36 +07:00
Finessse 9e1cd7a61d refactor(cmd): remove iFlow CLI commands
Remove iFlow login and cookie authentication CLI commands.

Deleted files:
- internal/cmd/iflow_cookie.go
- internal/cmd/iflow_login.go
2025-12-28 20:47:24 +07:00
Finessse 277e66c542 refactor(auth): remove iFlow auth package
Remove the iFlow OAuth and cookie-based authentication implementation.
This provider is being replaced with simpler API key-based providers.

Deleted files:
- internal/auth/iflow/cookie_helpers.go
- internal/auth/iflow/iflow_auth.go
- internal/auth/iflow/iflow_token.go
- internal/auth/iflow/oauth_server.go
2025-12-28 20:47:12 +07:00
Finessse 352095c54c test(runtime): add unit tests for model registry, executors, and pricing
Covers model registration, quota tracking, concurrent access,
Claude/Gemini executor request prep, and pricing calculations.
2025-12-28 10:46:38 +07:00
Finessse 009fbb2a37 test(memory): add unit tests for file store, pruning, and semantic search
Covers event serialization, file operations, token-based pruning,
recency preservation, and semantic similarity scoring.
2025-12-28 10:46:21 +07:00
Finessse 7d11a35a16 test(config): add unit tests for config loading and validation
Covers YAML parsing, port validation, key sanitization, header
normalization, global model mapping lookup, and legacy migration.
2025-12-28 10:46:03 +07:00
Finessse 9cdce5e8d8 test(auth): add unit tests for Claude PKCE/token and Codex JWT parsing
Covers PKCE verifier/challenge generation, token expiry detection,
refresh timing, and JWT claim extraction for Claude and Codex auth.
2025-12-28 10:45:45 +07:00