@timo972/cc-router 0.12.1-rc.1 → 0.12.2-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +27 -1
  2. package/Dockerfile +1 -0
  3. package/README.md +99 -643
  4. package/dist/cli/cmd-accounts.js +116 -65
  5. package/dist/cli/cmd-setup.js +100 -30
  6. package/dist/cli/cmd-status.js +14 -2
  7. package/dist/cli/cmd-telemetry.js +43 -32
  8. package/dist/cli/index.js +15 -1
  9. package/dist/config/directory.js +14 -0
  10. package/dist/config/telemetry.js +192 -41
  11. package/dist/providers/anthropic/usage-refresher.js +35 -1
  12. package/dist/providers/model-discovery.js +17 -11
  13. package/dist/providers/openai/device-oauth.js +88 -31
  14. package/dist/providers/openai/token-refresher.js +12 -2
  15. package/dist/providers/openai/usage-fetch.js +19 -2
  16. package/dist/proxy/anthropic-messages-route.js +144 -5
  17. package/dist/proxy/anthropic-proxy.js +10 -0
  18. package/dist/proxy/anthropic-response-capture.js +6 -19
  19. package/dist/proxy/openai-ingress.js +98 -1
  20. package/dist/proxy/server.js +35 -22
  21. package/dist/proxy/token-refresher.js +12 -2
  22. package/dist/proxy/usage-capture.js +41 -4
  23. package/dist/telemetry/contracts.js +129 -0
  24. package/dist/telemetry/facade.js +654 -0
  25. package/dist/telemetry/otel-exporters.js +289 -0
  26. package/dist/telemetry/posthog-client.js +398 -0
  27. package/dist/telemetry/privacy.js +567 -0
  28. package/dist/telemetry/runtime.js +306 -0
  29. package/dist/telemetry/setup-diagnostics.js +239 -0
  30. package/dist/utils/token-extractor.js +79 -11
  31. package/dist/utils/token-validator.js +25 -9
  32. package/docs/README.md +34 -0
  33. package/docs/telemetry.md +167 -0
  34. package/package.json +12 -2
  35. package/dist/utils/telemetry.js +0 -88
package/CHANGELOG.md CHANGED
@@ -10,11 +10,32 @@ This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
10
10
 
11
11
  ### Added
12
12
 
13
+ - Privacy-bounded OpenTelemetry and PostHog EU telemetry: 10%-sampled proxy
14
+ traces, closed-schema setup and runtime diagnostics, lifecycle events, and
15
+ sanitized exceptions with diagnostic IDs. Every outbound record is rebuilt
16
+ from an allowlist immediately before export; prompts, bodies, headers,
17
+ URLs, account identifiers, tokens, and raw error messages are never sent.
18
+ Fresh installations default on; `cc-router telemetry off`, `DO_NOT_TRACK=1`,
19
+ and `CC_ROUTER_TELEMETRY=0` disable every signal, and a running daemon stops
20
+ exporting as soon as it observes an explicit opt-out. See
21
+ [docs/telemetry.md](docs/telemetry.md) for the complete inventory.
22
+
23
+ ### Changed
24
+
25
+ - Aptabase telemetry has been removed. An existing persisted opt-out remains
26
+ off after upgrade; no PostHog Person profiles are created and GeoIP
27
+ enrichment is disabled.
28
+
29
+ ---
30
+
31
+ ## [0.12.1] — 2026-09-14
32
+
33
+ ### Added
34
+
13
35
  - Dashboard `Ctrl+R` confirms redemption of one banked usage-limit reset for
14
36
  the focused ChatGPT account, with duplicate-submission protection and stable
15
37
  retry IDs for uncertain outcomes. No custom Meta key mapping is needed.
16
38
  Account usage is refreshed after redemption.
17
-
18
39
  - Dashboard `[R]` reloads account usage and due tokens without restarting the
19
40
  router or dropping active requests and sticky sessions. It also refreshes
20
41
  Grok snapshots, CLI routing state, and an already-loaded model list, with
@@ -28,6 +49,10 @@ This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
28
49
 
29
50
  ### Changed
30
51
 
52
+ - Streamlined the README and split detailed setup and reference material into
53
+ dedicated guides, including the full dashboard UI and keybindings, first-class
54
+ Codex CLI setup, and Grok/xAI account monitoring (overview-only, not proxied).
55
+ Updated the dashboard screenshot with anonymized account names.
31
56
  - The configured proxy request timeout now bounds Codex response headers and
32
57
  upstream stream inactivity on both `/v1/responses` and OpenAI-routed
33
58
  `/v1/messages`, including failover attempts. Progressing streams can outlive
@@ -714,6 +739,7 @@ cache-aware session routing and a round of security hardening.
714
739
  - `http-proxy-middleware` 3.0.5 → 3.0.7 for GHSA-gcq2-9pq2-cxqm (high). The
715
740
  affected APIs are not used here.
716
741
 
742
+ [0.12.1]: https://github.com/Timo972/cc-router/releases/tag/v0.12.1
717
743
  [0.12.0]: https://github.com/Timo972/cc-router/releases/tag/v0.12.0
718
744
  [0.11.0]: https://github.com/Timo972/cc-router/releases/tag/v0.11.0
719
745
  [0.9.0]: https://github.com/Timo972/cc-router/releases/tag/v0.9.0
package/Dockerfile CHANGED
@@ -8,6 +8,7 @@ COPY package*.json ./
8
8
  RUN npm ci
9
9
 
10
10
  COPY tsconfig.json ./
11
+ COPY scripts/ ./scripts/
11
12
  COPY src/ ./src/
12
13
  RUN npm run build
13
14