Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
279 commits
Select commit Hold shift + click to select a range
0645409
refactor(pricing): remove embedded pricing fallback mechanism
CaddyGlow Aug 26, 2025
a31dd3f
refactor(pricing): add explicit exception types for pricing service
CaddyGlow Aug 26, 2025
3364e20
feat(claude_api): add system prompt injection modes and cache control…
CaddyGlow Aug 26, 2025
c1801bc
chore: remove unused permission service initialization and clean up f…
CaddyGlow Aug 26, 2025
7338c72
fix(pricing): pass request context to processor for usage extraction
CaddyGlow Aug 26, 2025
ed8f227
Looking at the changes, this is a cleanup commit that removes unused …
CaddyGlow Aug 28, 2025
91058b3
docs: add comprehensive hooks integration refactoring plan
CaddyGlow Aug 28, 2025
8ec0759
feat: implement hooks integration for request tracing
CaddyGlow Aug 28, 2025
a8fc397
feat: refactor hooks to emit on actual stream completion and use
CaddyGlow Aug 29, 2025
b080b79
feat(pricing): add warning logs for missing pricing data
CaddyGlow Aug 26, 2025
32eb5e1
style: remove trailing whitespace and unused import
CaddyGlow Aug 26, 2025
87fb216
refactor(pricing): remove embedded pricing fallback mechanism
CaddyGlow Aug 26, 2025
0ca7c90
refactor(pricing): add explicit exception types for pricing service
CaddyGlow Aug 26, 2025
d22d3d1
feat(claude_api): add system prompt injection modes and cache control…
CaddyGlow Aug 26, 2025
3594aa3
chore: remove unused permission service initialization and clean up f…
CaddyGlow Aug 26, 2025
dd5d5f0
fix(pricing): pass request context to processor for usage extraction
CaddyGlow Aug 26, 2025
ed60b99
refactor: remove deprecated modules and unused code
CaddyGlow Aug 28, 2025
931ab40
refactor: remove ProxyService and migrate to explicit dependency inje…
CaddyGlow Aug 29, 2025
6d16c6d
Merge branch 'refactor/plugin' into feature/hooks-integration-work
CaddyGlow Aug 29, 2025
ba6abdc
Merge branch 'refactor/plugin' into feature/hooks-integration-work
CaddyGlow Aug 29, 2025
7e4b1ab
refactor: remove logger parameter from plugin adapters in favor of mo…
CaddyGlow Aug 29, 2025
dcc92f4
refactor: complete removal of ProxyService and cleanup imports
CaddyGlow Aug 29, 2025
9176c01
refactor: rename initialize_proxy_service_startup to initialize_servi…
CaddyGlow Aug 29, 2025
1f015e8
refactor: migrate metrics from core to plugin system
CaddyGlow Aug 29, 2025
38be50f
refactor: migrate request logging from core to plugin system
CaddyGlow Aug 29, 2025
82770cd
refactor: remove observability modules migrated to plugin system
CaddyGlow Aug 29, 2025
dc34393
refactor: consolidate request context into core module and migrate pu…
CaddyGlow Aug 29, 2025
16fec61
refactor: migrate observability from core to plugin system
CaddyGlow Aug 30, 2025
cfcab04
refactor: complete migration of observability components to plugin sy…
CaddyGlow Aug 30, 2025
a148270
feat: implement hook priority and ordering system
CaddyGlow Aug 30, 2025
047ae66
fix: adjust hook priorities for proper observation layer ordering
CaddyGlow Aug 30, 2025
3ffe3f5
fix: pass hook_manager to streaming handler for event emission
CaddyGlow Aug 30, 2025
312d83b
feat: unify streaming metrics logging in access log plugin
CaddyGlow Aug 30, 2025
4b8c76d
style: remove blank lines from code formatting
CaddyGlow Aug 30, 2025
597b231
fix: claude_api plugin loading and streaming metrics extraction
CaddyGlow Aug 30, 2025
aff566f
refactor: move provider-specific auth models to plugin packages
CaddyGlow Aug 31, 2025
c0c5f07
I'll analyze these changes and generate a concise conventional commit…
CaddyGlow Aug 31, 2025
355dd8b
refactor: consolidate OAuth models and managers into dedicated plugin…
CaddyGlow Aug 31, 2025
8c51b4a
feat(oauth): add request tracing and improve plugin architecture
CaddyGlow Aug 31, 2025
6818a0d
feat(hooks): implement generic HTTP request interception via Hookable…
CaddyGlow Aug 31, 2025
12afc42
feat(oauth): implement lazy loading for OAuth providers and add dedic…
CaddyGlow Aug 31, 2025
b13888e
feat(tracing): add command-wide correlation IDs and unified trace fil…
CaddyGlow Aug 31, 2025
a8d29d7
```
CaddyGlow Aug 31, 2025
ce73655
```
CaddyGlow Sep 1, 2025
194b6a2
refactor: remove legacy shared HTTP client and fix asyncio.TimeoutErr…
CaddyGlow Sep 1, 2025
29365fb
test: add integration tests for metrics plugin endpoint availability
CaddyGlow Sep 1, 2025
a13d4c2
refactor: replace shared HTTP client references with container-manage…
CaddyGlow Sep 1, 2025
8293c62
refactor: clean up imports and remove unused routing comment
CaddyGlow Sep 1, 2025
34ffed0
refactor: migrate storage, analytics and dashboard to plugin system
CaddyGlow Sep 1, 2025
59ce23c
refactor: integrate analytics plugin with access logging and storage …
CaddyGlow Sep 1, 2025
6a80162
```
CaddyGlow Sep 1, 2025
12907cf
feat: add cursor-based pagination to analytics and integrate claude_s…
CaddyGlow Sep 1, 2025
1012164
refactor: remove global OAuth registry in favor of app-scoped instance
CaddyGlow Sep 1, 2025
2c5dc0c
```
CaddyGlow Sep 1, 2025
2d512af
refactor: improve code quality and error handling across codebase
CaddyGlow Sep 1, 2025
cd2568c
refactor: add cleanup planning documents and improve plugin tag naming
CaddyGlow Sep 1, 2025
37bf6a5
refactor: remove dead code and prune unused dependencies
CaddyGlow Sep 1, 2025
749a7ea
refactor: complete phase 4 cleanup with dead code removal and central…
CaddyGlow Sep 1, 2025
f484169
refactor: remove core compatibility stubs and finalize plugin isolation
CaddyGlow Sep 1, 2025
6776412
feat: improve OAuth redirect URI handling and add structured logging …
CaddyGlow Sep 1, 2025
7dac481
refactor: consolidate auth models and remove legacy compatibility stubs
CaddyGlow Sep 1, 2025
13bd955
refactor: complete observability phase with hooks always enabled and …
CaddyGlow Sep 1, 2025
5dce694
ci: optimize test performance and add durations tracking
CaddyGlow Sep 1, 2025
77b1626
refactor: remove CLI OAuth and legacy core health checks
CaddyGlow Sep 2, 2025
39afd78
refactor: remove legacy CLI OAuth and consolidate plugin endpoints
CaddyGlow Sep 2, 2025
9322635
refactor: remove unused dependencies and update documentation
CaddyGlow Sep 2, 2025
e64ae43
feat: enforce import boundaries with pre-commit hook and improve type…
CaddyGlow Sep 2, 2025
7782821
refactor: enhance DuckDB storage with optimization settings and impro…
CaddyGlow Sep 2, 2025
2e4b505
test: add metrics plugin integration and unit tests
CaddyGlow Sep 2, 2025
9a01d79
feat: configure metrics plugin as workspace dependency and update plu…
CaddyGlow Sep 2, 2025
2976c82
feat: enable local plugin discovery and add OAuth plugin packages
CaddyGlow Sep 2, 2025
b8b8836
refactor: reorganize plugin system to core namespace
CaddyGlow Sep 2, 2025
265dad0
feat: improve plugin dependency resolution with graceful error handling
CaddyGlow Sep 2, 2025
f568c3c
refactor: move plugin endpoints from /api/plugins to /plugins prefix
CaddyGlow Sep 2, 2025
e8494dc
refactor: implement dependency injection container system to replace …
CaddyGlow Sep 2, 2025
1f1bfce
refactor: implement container-first DI and eliminate singleton anti-p…
CaddyGlow Sep 2, 2025
72cbe80
refactor: implement filtered CLI plugin loading to prevent DI conflicts
CaddyGlow Sep 2, 2025
bbe69f4
refactor: apply code formatting and style improvements
CaddyGlow Sep 2, 2025
7715011
5-hour limit reached ∙ resets 1am
CaddyGlow Sep 2, 2025
607a968
refactor: fix typing and improve type annotations across codebase
CaddyGlow Sep 3, 2025
973f7f5
refactor: standardize code formatting and improve type annotations
CaddyGlow Sep 3, 2025
fd9b1c9
refactor: remove plugins namespace init and reorder workspace depende…
CaddyGlow Sep 3, 2025
ebf9b6e
refactor: remove ccproxy package init and clean up unused files
CaddyGlow Sep 3, 2025
1afe93e
refactor: move version module and update import paths
CaddyGlow Sep 3, 2025
3399c4a
refactor: move plugins folder struct aways from flat
CaddyGlow Sep 3, 2025
d4256da
refactor: standardize plugin naming and fix TypedDict imports
CaddyGlow Sep 3, 2025
c0ee6a7
refactor: move metrics plugin tests to workspace root structure
CaddyGlow Sep 3, 2025
6b7740c
feat: implement Anthropic Messages adapter with function calling support
CaddyGlow Sep 3, 2025
e1dbaf8
refactor: rename AnthropicMessagesAdapter to CompositeAnthropicAdapter
CaddyGlow Sep 3, 2025
6334e07
refactor: clean up code formatting and improve logging
CaddyGlow Sep 4, 2025
6b9db53
refactor: enhance HTTP request/response logging with better body pars…
CaddyGlow Sep 4, 2025
deedd43
refactor: clean up imports and formatting across codebase
CaddyGlow Sep 4, 2025
25ebcb8
refactor: add response format adapter support to buffered streaming r…
CaddyGlow Sep 4, 2025
f74c404
fix: remove content-length headers to prevent middleware conflicts in…
CaddyGlow Sep 4, 2025
797259d
refactor: pass hook manager to HTTP clients and pool manager for requ…
CaddyGlow Sep 4, 2025
a95166f
refactor: implement HTTP client pool manager refactoring
CaddyGlow Sep 4, 2025
eb135d1
refactor: implement centralized format adapter registry system
CaddyGlow Sep 4, 2025
d2af882
feat: add format adapter reuse support and Response API endpoints
CaddyGlow Sep 4, 2025
945fd66
fix: resolve mypy type checking errors across ccproxy and plugins
CaddyGlow Sep 5, 2025
676dbb8
refactor: consolidate route handlers to reduce code duplication
CaddyGlow Sep 5, 2025
fd8f3be
Based on the git status and recent commit history, I can see this is …
CaddyGlow Sep 5, 2025
4c38ff8
feat: add request context integration to HTTP hooks
CaddyGlow Sep 5, 2025
247df81
refactor: improve adapter dependency injection for format services
CaddyGlow Sep 5, 2025
4d9533a
refactor: replace TypedDict with class-based PluginContext for type s…
CaddyGlow Sep 5, 2025
3c1ad5a
feat: add format adapter manifest system with feature flags
CaddyGlow Sep 5, 2025
5fb43c8
`feat: implement declarative format adapter manifests with feature fl…
CaddyGlow Sep 5, 2025
d8ab874
feat: enable manifest format adapters with enhanced Codex response pr…
CaddyGlow Sep 5, 2025
5ff3bcd
feat: add client request/response hook events with enhanced raw HTTP …
CaddyGlow Sep 5, 2025
23077a9
feat: consolidate HTTP tracing with core HTTPTracerHook and simplifie…
CaddyGlow Sep 5, 2025
385a760
feat: consolidate HTTP tracing with core HTTPTracerHook and simplifie…
CaddyGlow Sep 5, 2025
81bf4f9
refactor(plugins): replace get_settings() with context-based settings…
CaddyGlow Sep 5, 2025
3577d4d
feat(hooks): implement background hook execution with request/respons…
CaddyGlow Sep 5, 2025
028e2a9
style: format code with consistent spacing and imports
CaddyGlow Sep 6, 2025
fa6c32f
feat(headers): integrate HeaderBag for order-preserving case-insensit…
CaddyGlow Sep 6, 2025
6afdb98
feat(plugins): optimize settings access and enhance codex transformer…
CaddyGlow Sep 6, 2025
8ed7135
fix(codex): resolve proxy configuration and auth header conflicts
CaddyGlow Sep 6, 2025
52c3e6d
refactor: remove test check dependency and cleanup plugin system code
CaddyGlow Sep 7, 2025
14aa768
refactor: simplify test fixtures and add performance test markers
CaddyGlow Sep 7, 2025
75e502e
test: simplify test suite by removing outdated test files and streaml…
CaddyGlow Sep 7, 2025
d9674e3
refactor: streamline testing architecture and documentation
CaddyGlow Sep 7, 2025
8e40ab5
refactor: remove outdated test files and response models for function…
CaddyGlow Sep 7, 2025
f8a11b9
refactor: clean up test code formatting and remove unused imports
CaddyGlow Sep 7, 2025
e5e4030
feat: add plugin test integration and improve type safety across serv…
CaddyGlow Sep 7, 2025
1fae3a4
refactor: reorganize plugin tests into plugin-specific directories an…
CaddyGlow Sep 7, 2025
e38e9b0
refactor: consolidate structlog imports to ccproxy.core.logging and e…
CaddyGlow Sep 7, 2025
7b34fa6
refactor: optimize test infrastructure for performance and remove dep…
CaddyGlow Sep 7, 2025
8e1a22a
refactor: reorganize codex plugin tests and optimize test configuration
CaddyGlow Sep 7, 2025
2a0a802
refactor: centralize plugin tests and streamline build system
CaddyGlow Sep 7, 2025
d8bbc95
refactor: disable HTML coverage and add analytics test marker
CaddyGlow Sep 7, 2025
36c29be
refactor: improve test quality and remove deprecated imports
CaddyGlow Sep 7, 2025
aa01c26
refactor: improve async test stability and fix shutdown sentinel
CaddyGlow Sep 7, 2025
72b2d8f
refactor: remove feature flags and enable manifest format adapters by…
CaddyGlow Sep 7, 2025
8b4d966
Execution error
CaddyGlow Sep 7, 2025
2f2c849
refactor: remove deprecated models and improve code quality
CaddyGlow Sep 7, 2025
77d07f8
refactor: move detection models to respective plugins
CaddyGlow Sep 7, 2025
de37577
refactor: move plugin-specific models to respective plugin modules
CaddyGlow Sep 7, 2025
1febab5
refactor: consolidate HTTP modules into ccproxy/http package
CaddyGlow Sep 7, 2025
742f25f
refactor: replace UUID with short 8-char hex IDs for debugging
CaddyGlow Sep 8, 2025
da6688b
refactor: fix import paths and add TYPE_CHECKING guards
CaddyGlow Sep 8, 2025
98c88d7
refactor: standardize streaming module imports to use package-level e…
CaddyGlow Sep 8, 2025
72d0091
refactor: remove deprecated ConnectionPoolManager in favor of HTTPPoo…
CaddyGlow Sep 8, 2025
3056437
fix: resolve circular import by adding TYPE_CHECKING guards and renam…
CaddyGlow Sep 8, 2025
78591bf
refactor: implement lazy loading facade for core plugins module
CaddyGlow Sep 8, 2025
20f7a84
refactor: convert lazy facade to direct imports in core plugins module
CaddyGlow Sep 8, 2025
310388d
refactor: fix imports to use explicit module paths for type safety
CaddyGlow Sep 8, 2025
69901ec
fix: update import paths for HTTPPoolManager move to http package
CaddyGlow Sep 8, 2025
c585d1d
refactor: consolidate config modules into core, runtime, and utils
CaddyGlow Sep 8, 2025
aa956ef
refactor: remove format_detector dependency and standardize auth data…
CaddyGlow Sep 8, 2025
b6ce0ba
refactor: move hooks package to core/plugins/hooks and update documen…
CaddyGlow Sep 8, 2025
f881043
refactor: move docker package to plugin system and update imports
CaddyGlow Sep 8, 2025
f8bb714
refactor: add plugin CLI extension system with command discovery
CaddyGlow Sep 8, 2025
41bf045
refactor: migrate Docker functionality to plugin system
CaddyGlow Sep 8, 2025
00c1771
refactor: simplify cache_control limiting algorithm to use last-block…
CaddyGlow Sep 8, 2025
7f2207e
feat: add comprehensive Docker plugin with protocol-based design
CaddyGlow Sep 8, 2025
09d971a
feat: simplify code comments and method names across codebase
CaddyGlow Sep 8, 2025
fd085e1
refactor: implement smart cache control limiting with injected system…
CaddyGlow Sep 8, 2025
32363d0
feat: add comprehensive GitHub Copilot plugin with OAuth and format a…
CaddyGlow Sep 9, 2025
84b038a
feat: refactor plugin path structure from plugins/ to ccproxy/plugins/
CaddyGlow Sep 9, 2025
4df3dbc
feat: remove deprecated Docker plugin CLI helpers and enhance import …
CaddyGlow Sep 9, 2025
5bbad00
feat: implement comprehensive CLI OAuth flow system
CaddyGlow Sep 9, 2025
ab48bfd
refactor: improve OAuth flow standards compliance and error handling
CaddyGlow Sep 9, 2025
f108573
feat: enhance OAuth CLI flows with provider-specific manual redirect …
CaddyGlow Sep 9, 2025
97eeec3
refactor: migrate Copilot adapter to BaseHTTPAdapter pattern
CaddyGlow Sep 9, 2025
bc5e2a3
refactor: remove deprecated Docker CLI helpers and clean up Copilot m…
CaddyGlow Sep 9, 2025
b68086b
wip
CaddyGlow Sep 9, 2025
765ea96
refactor: consolidate header filtering and request handling across pl…
CaddyGlow Sep 9, 2025
c93da49
chore: update devenv dependencies and disable dotenv hint
CaddyGlow Sep 9, 2025
69e782a
refactor: remove deprecated ProxyRequestContext and related code
CaddyGlow Sep 9, 2025
b8f4e6b
wip
CaddyGlow Sep 10, 2025
0bd53aa
refactor: remove HeaderBag dependencies and migrate to utility functions
CaddyGlow Sep 10, 2025
f7891e7
wip
CaddyGlow Sep 10, 2025
dc0c326
fix: improve type annotations and SecretStr handling for security
CaddyGlow Sep 10, 2025
5b5bce2
refactor: consolidate HTTP adapter initialization and cleanup format …
CaddyGlow Sep 10, 2025
0c14ade
feat: add bidirectional format adapters and reverse format chain proc…
CaddyGlow Sep 10, 2025
e212486
feat: implement comprehensive bidirectional streaming format conversi…
CaddyGlow Sep 11, 2025
423e15e
feat: implement complete AnthropicToOpenAIAdapter with bidirectional …
CaddyGlow Sep 11, 2025
0b49752
feat: implement async error handling in format adapters with bidirect…
CaddyGlow Sep 11, 2025
5fb0391
feat: add response header filtering and request body validation to HT…
CaddyGlow Sep 11, 2025
26f6d70
feat: add typed route responses and request validation to Copilot plugin
CaddyGlow Sep 11, 2025
40a35d7
feat: implement GitHub API forwarding and enhance Copilot endpoints w…
CaddyGlow Sep 11, 2025
f21c4fa
refactor: simplify Copilot plugin routes and remove unused methods
CaddyGlow Sep 11, 2025
fd2fa24
refactor: standardize service registry APIs and improve plugin router…
CaddyGlow Sep 11, 2025
0a22bcc
feat: add streaming format chain support and enhance adapter APIs
CaddyGlow Sep 11, 2025
3ad3c24
refactor: centralize streaming detection and format conversion in Bas…
CaddyGlow Sep 11, 2025
2f0cdb4
refactor: reorganize models into adapter-specific packages with centr…
CaddyGlow Sep 12, 2025
573e339
refactor: remove HTTP plugin handler and SSE parsing modules
CaddyGlow Sep 12, 2025
d428d4a
API Error: 500 {"error":{"type":"internal_server_error","message":"An…
CaddyGlow Sep 12, 2025
71d2af7
feat: improve streaming lifecycle events and keep-alive handling
CaddyGlow Sep 12, 2025
93c38d4
refactor: update logging level and fix format adapter naming consistency
CaddyGlow Sep 12, 2025
ead988f
feat: enhance format adapter system with bidirectional anthropic/open…
CaddyGlow Sep 13, 2025
808ad92
fix: correct streaming format adapter direction and use dedicated res…
CaddyGlow Sep 13, 2025
f47d2b4
feat: improve format adapter system with new response_api to openai a…
CaddyGlow Sep 13, 2025
cc33021
feat: add LLM format adapters with bidirectional OpenAI/Anthropic con…
CaddyGlow Sep 13, 2025
90a7ab2
feat: add comprehensive format adapters with thinking XML and streami…
CaddyGlow Sep 13, 2025
f6fd053
feat: add comprehensive adapter implementations with streaming and st…
CaddyGlow Sep 14, 2025
50fe90c
feat: enhance adapter implementations with tool support, streaming, a…
CaddyGlow Sep 14, 2025
5cc9478
feat: add strongly-typed adapter interface and enhance type safety
CaddyGlow Sep 14, 2025
24e6f59
test: add comprehensive adapter edge cases and consolidate existing t…
CaddyGlow Sep 14, 2025
d021a06
feat: implement comprehensive streaming and tool support across adapters
CaddyGlow Sep 14, 2025
75720c3
refactor: replace dict-based conversion with typed model implementati…
CaddyGlow Sep 14, 2025
eddee3f
refactor: replace dict stream processing with typed model conversions…
CaddyGlow Sep 14, 2025
5ff1694
refactor: add strongly-typed interface to base adapter and implement …
CaddyGlow Sep 14, 2025
d267172
refactor: improve import organization and update test assertions for …
CaddyGlow Sep 14, 2025
a3ff1f0
refactor: wrap stream conversion method in async generator factory
CaddyGlow Sep 14, 2025
5d4e3ea
refactor: remove legacy dict-based adapter methods and streamline typ…
CaddyGlow Sep 14, 2025
dcaf8c9
refactor: rename strongly-typed adapter interface methods to remove '…
CaddyGlow Sep 14, 2025
1848c82
feat: implement error conversion between OpenAI and Anthropic formats
CaddyGlow Sep 14, 2025
8430cf6
style: format code with consistent double quotes and line breaks
CaddyGlow Sep 14, 2025
fe343e1
feat: add typed adapter shim and command replay plugin
CaddyGlow Sep 15, 2025
a777e0f
refactor: add typed adapter shim system with automatic compatibility …
CaddyGlow Sep 15, 2025
d50946c
```
CaddyGlow Sep 15, 2025
c498c3c
fix: normalize timestamps and response payloads in adapter maze
CaddyGlow Sep 16, 2025
d28d3e6
refactor: replace bidirectional adapter with unidirectional Response …
CaddyGlow Sep 16, 2025
cf36b3b
refactor: reorganize adapter modules into type-based namespace packages
CaddyGlow Sep 16, 2025
da3da9c
refactor: extract adapter helper functions into centralized modules
CaddyGlow Sep 16, 2025
41f7373
refactor: inline adapter usage conversion functions and fix streaming…
CaddyGlow Sep 16, 2025
e5eb9ef
refactor: inline usage converters into adapter helpers and clean up s…
CaddyGlow Sep 16, 2025
2a943f4
refactor: consolidate adapters and move error handling to modules
CaddyGlow Sep 16, 2025
6d790c4
refactor: remove obsolete adapter modules and fix import errors
CaddyGlow Sep 16, 2025
8708e05
refactor: standardize imports and remove redundant model imports acro…
CaddyGlow Sep 16, 2025
e11ed87
refactor: rename function and variable names from 'response' to 'resp…
CaddyGlow Sep 16, 2025
a96e3a6
refactor: add formatter registry service and auto-register format hel…
CaddyGlow Sep 16, 2025
0afe8c2
refactor: consolidate OpenAI response models and add FormatterRegistr…
CaddyGlow Sep 17, 2025
d4aa027
style: format code with ruff and fix import organization
CaddyGlow Sep 17, 2025
17e5334
refactor: update imports to use consolidated llm models and fix model…
CaddyGlow Sep 17, 2025
3eb9e57
refactor: replace OpenAIAdapter with FormatterRegistryAdapter in mock…
CaddyGlow Sep 17, 2025
b7b3503
refactor: update imports to use consolidated llm models and formatters
CaddyGlow Sep 17, 2025
8935789
refactor: remove legacy adapters package and consolidate formatting u…
CaddyGlow Sep 17, 2025
d1178c4
refactor: simplify streaming adapter interface and fix type issues
CaddyGlow Sep 17, 2025
004a392
refactor: consolidate llm adapters into formatters module and update …
CaddyGlow Sep 17, 2025
49c3a7a
refactor: update imports to use new formatters module in test files
CaddyGlow Sep 17, 2025
4573d77
wip
CaddyGlow Sep 17, 2025
42b76a9
refactor: clean up format adapter imports and fix comment alignment
CaddyGlow Sep 17, 2025
88e6377
refactor: replace string format identifiers with canonical constants
CaddyGlow Sep 17, 2025
58ee72a
refactor: update format adapters and routes to handle dict-typed stre…
CaddyGlow Sep 17, 2025
7a4225c
refactor: improve streaming format adapters and add Copilot route for…
CaddyGlow Sep 17, 2025
c78bea4
refactor: extract shared format utilities and improve code formatting
CaddyGlow Sep 17, 2025
96044ff
refactor: replace FormatterRegistryAdapter with SimpleFormatAdapter f…
CaddyGlow Sep 17, 2025
8899d03
refactor: simplify format adapter registration and improve core adapt…
CaddyGlow Sep 18, 2025
15a4a1b
refactor: apply pre-commit formatting and linting fixes
CaddyGlow Sep 18, 2025
fefa13f
refactor: implement format chain composition system with core convert…
CaddyGlow Sep 18, 2025
691b768
refactor: clean up adapters and validation - consolidate format chain…
CaddyGlow Sep 18, 2025
26eb6b2
refactor: simplify response headers and remove redundant header manag…
CaddyGlow Sep 18, 2025
dacfbb5
refactor: remove legacy components and normalize response headers
CaddyGlow Sep 18, 2025
767bc84
refactor: standardize route decorators with format chain constants
CaddyGlow Sep 18, 2025
05cb9e8
refactor: remove deprecated formatter registry implementation
CaddyGlow Sep 18, 2025
3202f43
refactor: consolidate imports and improve type annotations
CaddyGlow Sep 18, 2025
79eab0c
refactor: consolidate imports and improve type annotations
CaddyGlow Sep 18, 2025
b882b42
config: reorganize routes and simplify CLI options
CaddyGlow Sep 18, 2025
77e7902
refactor: consolidate logging configuration and reduce startup noise
CaddyGlow Sep 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
74 changes: 74 additions & 0 deletions .ccproxy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Enable local plugin discovery so in-tree plugins are loaded from ./plugins
plugins_disable_local_discovery = false
# disabled_plugins = ["docker"]

# Logging configuration
[logging]
level = "INFO"
format = "auto"
file = "/tmp/ccproxy/ccproxy.log"
verbose_api = false
enable_plugin_logging = true
plugin_log_base_dir = "/tmp/ccproxy"

# Per-plugin logging overrides
[logging.plugin_overrides]
request_tracer = true
access_log = true
pricing = true
permissions = true

# Request Tracer plugin configuration
[plugins.request_tracer]
enabled = true
log_dir = "/tmp/ccproxy/tracer"
json_logs_enabled = true
verbose_api = true
log_client_request = true
log_client_response = true

# Access Log plugin configuration
[plugins.access_log]
enabled = true
client_enabled = true
client_format = "combined" # Options: combined, common, structured
client_log_file = "/tmp/ccproxy/combined_access.log"
provider_enabled = false
provider_format = "structured"
provider_log_file = "/tmp/ccproxy/provider_access.log"
exclude_paths = ["/health", "/metrics", "/logs"]
buffer_size = 100
flush_interval = 1.0

[plugins.claude_api]
enabled = true

[plugins.codex]
enabled = true

[plugins.claude_sdk]
enabled = true
# default_session_id = "default-session" # Commented out - should be None for normal operations

[plugins.claude_sdk.sdk_session_pool]
enabled = true
session_ttl = 3600
max_sessions = 1000

[plugins.permissions]
enabled = false

# DuckDB storage and analytics plugins
[plugins.duckdb_storage]
enabled = false
database_path = "/tmp/ccproxy/metrics.duckdb"
register_app_state_alias = true

[plugins.analytics]
enabled = true

[plugins.docker]
enabled = false

[plugins.command_replay]
enabled = true
14 changes: 11 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ ANTHROPIC_API_KEY=your_anthropic_api_key_here
# Optional: Server Configuration
HOST=0.0.0.0
PORT=8000
LOG_LEVEL=INFO

# Optional: Logging Configuration (centralized)
LOGGING__LEVEL=INFO
LOGGING__FORMAT=auto
LOGGING__FILE=/tmp/ccproxy/ccproxy.log
LOGGING__VERBOSE_API=false
LOGGING__ENABLE_PLUGIN_LOGGING=true
LOGGING__PLUGIN_LOG_BASE_DIR=/tmp/ccproxy

# Optional: Security Configuration
CLAUDE_USER=claude
Expand All @@ -27,5 +34,6 @@ RATE_LIMIT_WINDOW=60
# Optional: Request Timeout
REQUEST_TIMEOUT=300

# Optional: CORS Origins (comma-separated)
CORS_ORIGINS=*
# Optional: CORS Origins (comma-separated, avoid using '*' for security)
# Examples: http://localhost:3000,https://app.example.com
CORS_ORIGINS=http://localhost:3000,http://localhost:8080,http://127.0.0.1:3000,http://127.0.0.1:8080
92 changes: 68 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,87 @@ name: CI

on:
push:
branches: [main, develop]
branches: [ main, dev ]
pull_request:
branches: [main, develop]
branches: [ main, dev ]

jobs:
test:
boundaries:
name: Import Boundaries
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v2
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install uv
- name: Setup uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
cache-dependency-path: |
uv.lock

- name: Install dependencies
run: make dev-install
run: uv sync --all-extras --dev

- name: Run boundary checks
run: make check-boundaries

- name: Run CI pipeline
run: make ci
lint:
name: Lint (ruff)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-path: |
uv.lock
- name: Install deps
run: uv sync --all-extras --dev
- name: Ruff check
run: uv run ruff check .

- name: Build documentation
run: make docs-build
typecheck:
name: Typecheck (mypy)
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-path: |
uv.lock
- name: Install deps
run: uv sync --all-extras --dev
- name: mypy
run: uv run mypy .

- name: Upload coverage reports
uses: codecov/codecov-action@v4
tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
python-version: '3.11'
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-path: |
uv.lock
- name: Install deps
run: uv sync --all-extras --dev
- name: Run unit tests (no network)
run: uv run pytest tests/unit -m "not real_api" --durations=10 -q
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,4 @@ ccproxy/static/dashboard/

*.wal
*.duckdb
.lazy.lua
19 changes: 15 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
repos:
# Import boundary check: prevent core -> plugins.* imports
- repo: local
hooks:
- id: check-import-boundaries
name: check import boundaries (core must not import plugins)
entry: python3 scripts/check_import_boundaries.py
language: system
pass_filenames: false
files: ^ccproxy/
# Ruff linting and formatting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.8
Expand All @@ -24,6 +33,8 @@ repos:
# Type stubs
# - types-toml
# - types-PyYAML
- types-aiofiles>=24.0.0
- types-PyYAML>=6.0.12.12
# Core dependencies
- pydantic>=2.8.0
- pydantic-settings>=2.4.0
Expand All @@ -35,6 +46,8 @@ repos:
- typer>=0.16.0
- uvicorn>=0.34.0
- check-jsonschema>=0.33.2
- aiohttp>=3.12.0
- aiofiles>=24.1.0
# Test dependencies
- pytest>=7.0.0
- pytest-asyncio>=0.23.0
Expand All @@ -49,18 +62,16 @@ repos:
- claude-code-sdk>=0.0.14
- keyring>=24.0.0
- aiosqlite>=0.21.0
- types-PyYAML>=6.0.12.12
- sqlmodel>=0.0.24
- duckdb-engine>=0.17.0
- tomli>=2.0.0
- fastapi-mcp>=0.1.0
- sse-starlette>=1.0.0
- textual>=3.7.1
- aiofiles>=24.1.0
- types-aiofiles>=24.0.0
- pyjwt>=2.10.0
- sortedcontainers>=2.4.0
args: [--config-file=pyproject.toml]
exclude: ^(docs/|examples/)
exclude: ^(docs/|examples/|scripts/)

# Biome for TypeScript/JavaScript (dashboard)
# - repo: local
Expand Down
36 changes: 34 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -601,15 +601,15 @@ This is the initial public release of the CCProxy API.

- **Unified `ccproxy` CLI**: A single, user-friendly command-line interface for managing the proxy.
- **TOML Configuration**: Configure the server using a `config.toml` file with JSON Schema validation.
- **Keyring Integration**: Securely stores and manages OAuth credentials in the system's native keyring.
<!-- Keyring integration was planned but has been removed; credentials are stored via project-managed files. -->
- **`generate-token` Command**: A CLI command to manually generate and manage API tokens.
- **Systemd Integration**: Includes a setup script and service template for running the proxy as a systemd service in production environments.
- **Docker Support**: A `Dockerfile` and `docker-compose.yml` for running the proxy in an isolated containerized environment.

#### Security

- **Local-First Design**: All processing and authentication happens locally; no conversation data is stored or transmitted to third parties.
- **Credential Security**: OAuth tokens are stored securely in the system keyring, not in plaintext files.
<!-- Credential storage now uses project-managed files; system keyring is not used. -->
- **Header Stripping**: Automatically removes client-side `Authorization` headers to prevent accidental key leakage.

#### Developer Experience
Expand All @@ -619,3 +619,35 @@ This is the initial public release of the CCProxy API.
- **Modern Tooling**: Uses `uv` for package management and `devenv` for a reproducible development environment.
- **Extensive Test Suite**: Includes unit, integration, and benchmark tests to ensure reliability.
- **Rich Logging**: Structured and colorized logging for improved readability during development and debugging.
## [Unreleased]

### Removed

- Dead code: removed `ccproxy/utils/models_provider.py` (unreferenced; model listing is provided by plugins).
- Pruned root runtime dependencies no longer used directly by core:
- `aiosqlite` (unused in repo)
- `h2` (no direct imports; `httpx[http2]` brings HTTP/2 support transitively)

### Notes

- Plugin-owned dependencies remain in root for now (plugins are bundled): `duckdb`, `duckdb-engine`, `sqlmodel`, `prometheus-client`, `textual`. These may move to plugin-specific distributions or optional extras in a future split.
## [0.2.0] - 2025-09-02

### Changed

- Core health endpoints simplified and plugin-agnostic; provider/OAuth/SDK checks moved to plugin health under `/plugins/{name}/health`.
- Plugins CLI now uses centralized `load_plugin_system()`; discovery logic consolidated.
- Documentation updated to reflect plugin-first architecture and loader flow.

### Removed

- Legacy plugin management endpoints: `POST /plugins/{name}/reload`, `POST /plugins/discover`, `DELETE /plugins/{name}` (v2 loads at startup; restart to apply changes).
- Scheduler references to Pushgateway in core; metrics plugin fully owns push task registration.
- Core middleware reliance on `app.state.duckdb_storage` alias; storage wiring is plugin-owned.

### Added

- Configuration validation that fails fast when deprecated keys are present, with guidance to the corresponding `plugins.*` keys.
- Migration guide: `docs/migration/0.2-plugin-first.md`.

This release completes the plugin-first migration and removes transitional shims.
Loading