3300 Commits

Author SHA1 Message Date
diegosouzapw
b804f481d2 fix(security): replace Math.random with crypto.randomUUID in generateTaskId/ActivityId and fix URL hostname check in test v3.8.1 2026-05-21 01:53:36 -03:00
diegosouzapw
c1a242c533 chore(release): v3.8.1 — feature flags settings page, bracketed combo names, security hardening, multi-driver SQLite 2026-05-21 01:27:34 -03:00
Cong Vu Chi
fb3340ebf4 fix(dashboard): allow bracketed combo names (#2458)
Integrated into release/v3.8.1
2026-05-21 01:21:35 -03:00
diegosouzapw
8ce81a067c fix(security): pin GCM authTagLength and harden Mermaid SVG rendering
Close two defense-in-depth gaps surfaced by the v3.8.1 release vulnerability scan:

- Field-level credential encryption (src/lib/db/encryption.ts) and the CLI
  decrypt path (bin/cli/encryption.mjs) now pass authTagLength: 16 to every
  createDecipheriv call. Authentication was already enforced via setAuthTag +
  final(), but pinning the tag length rejects truncated GCM tags up front,
  closing the tag-truncation forgery vector (Semgrep gcm-no-tag-length).
- MermaidDiagram switches securityLevel from "loose" to "strict" (Mermaid's
  default), so the rendered SVG is sanitized by Mermaid's bundled DOMPurify
  before the innerHTML assignment.

Adds a regression test asserting decrypt() fails closed on a truncated auth tag.
2026-05-21 01:02:06 -03:00
diegosouzapw
0a1c3f8fe6 chore: update CHANGELOG.md with PR 2457 2026-05-20 23:48:46 -03:00
Diego Rodrigues de Sa e Souza
0461a802d1 feat: Feature Flags Settings Page (Card Grid + DB overrides) (#2457)
Integrated into release/v3.8.1
2026-05-20 23:47:20 -03:00
diegosouzapw
0cef7be2ab feat(settings): Feature flags backend and UI plan 2026-05-20 21:39:04 -03:00
diegosouzapw
9848dfeafa docs: update CHANGELOG.md with PRs 2452 and 2453 2026-05-20 21:24:34 -03:00
Mr. Meowgi
bf5d12e3db fix(deepseek-web): rewrite auth to userToken Bearer + WASM PoW solver (#2452)
Integrated into release/v3.8.1
2026-05-20 21:23:50 -03:00
backryun
62fce921b5 chore: update node dependencies and runtime support (#2453)
Integrated into release/v3.8.1
2026-05-20 21:23:47 -03:00
diegosouzapw
115f59a6c2 chore(release): v3.8.1 — changelog, version sync, contributor credits, i18n llm.txt sync 2026-05-20 20:11:03 -03:00
diegosouzapw
a24d8acb82 chore(release): sync electron/open-sse versions to 3.8.1 and update CHANGELOG 2026-05-20 19:51:47 -03:00
diegosouzapw
4538cbb2bf fix(i18n): harden diff key extraction tag sanitization
Repeat markup stripping until the input stabilizes so malformed or
nested tags do not survive a single replacement pass.

This prevents incomplete sanitization from leaving tag fragments in
removed text and improves i18n key candidate extraction from diffs.
2026-05-20 19:39:34 -03:00
diegosouzapw
bbc94abf33 Merge branch 'release/v3.8.1' into claude-fastmode-ui 2026-05-20 19:24:50 -03:00
diegosouzapw
e68f339851 Merge branch 'release/v3.8.1' into codex-fastmode-toggle 2026-05-20 19:18:21 -03:00
Mr. Meowgi
3b3d82ce13 refactor(docs): enhance frontmatter handling in DocPage (#2448)
Replace compile-time-only 'as string' casts with runtime String() conversions
and instanceof Date check. gray-matter parses unquoted YAML dates as Date
objects, causing 'Objects are not valid as a React child' crashes on docs pages.

Co-authored-by: Mr. Meowgi <ovehbe@users.noreply.github.com>
2026-05-20 19:15:01 -03:00
diegosouzapw
140b4fed21 fix(db): use createRequire for better-sqlite3 and node:sqlite in ESM context 2026-05-20 19:14:46 -03:00
diegosouzapw
469177c11e fix(db): hoist driverFactory import outside map callback in listDbBackups 2026-05-20 19:14:46 -03:00
diegosouzapw
9037a9c69b test(db): add adapter tests for betterSqliteAdapter, sqljsAdapter, driverFactory 2026-05-20 19:14:46 -03:00
diegosouzapw
8fb4ca77f8 feat(db): call ensureDbInitialized at startup for sql.js pre-init 2026-05-20 19:14:46 -03:00
diegosouzapw
a6acef6a5f feat(db): move better-sqlite3 to optionalDependencies 2026-05-20 19:14:46 -03:00
diegosouzapw
560739044d fix(db): convert remaining static better-sqlite3 imports to dynamic 2026-05-20 19:14:46 -03:00
diegosouzapw
81a3c99dbe fix(db): migrate type annotations from better-sqlite3 to SqliteAdapter
Replace all Database.Database and import("better-sqlite3").Database
references in migrationRunner.ts, stats.ts, jsonMigration.ts, and
compliance/index.ts with SqliteAdapter from db/adapters/types.ts.
Also removes the now-unnecessary @ts-expect-error comment on
db.immediate() in migrationRunner.ts.
2026-05-20 19:14:46 -03:00
diegosouzapw
3dfed285d8 fix(db): remove static better-sqlite3 import from backup.ts 2026-05-20 19:14:46 -03:00
diegosouzapw
71452e0405 feat(db): migrate core.ts to SqliteAdapter multi-driver factory 2026-05-20 19:14:45 -03:00
Anton Knoery
f396d17d3b feat(settings): Codex Fast Tier — tier dropdown + per-model gate
Follow-up to PR #2440 review. Today the toggle is a single boolean that
injects service_tier=priority globally for every Codex request. Two small
extensions that came up:

- Tier dropdown (default / priority / flex). Default = no override; flex
  routes the request through OpenAI's lower-priority queue and is cheap
  enough that some users want to opt in globally for batch/eval work.
- Per-model gate. The toggle's intent is "Fast tier for the models that
  actually support it" — gpt-5.5 and gpt-5.4 per OpenAI's models_cache.json
  (service_tiers: priority). Other Codex slugs were silently receiving the
  service_tier header and getting a tier-related error from OpenAI. The
  checkbox list lets users curate the supported set without code changes
  when a future Codex release adds Fast eligibility to more slugs.

Schema (settingsSchemas.ts):

  codexServiceTier: z.object({
    enabled: z.boolean().optional(),
    tier: z.enum(["default", "priority", "flex"]).optional(),
    supportedModels: z.array(z.string()).optional(),
  }).optional()

Back-compat: rows with just `{ enabled: true }` from PR #2440 still work —
resolveCodexGlobalFastServiceTier() defaults `tier` to "priority" and
`supportedModels` to ["gpt-5.5", "gpt-5.4"] when those fields are absent.
The legacy boolean shape and the older `codexFastServiceTier: true` flag
are also still honored.

Middleware (open-sse/handlers/chatCore.ts):
- applyCodexGlobalFastServiceTier now takes an optional { model, body }.
- Gate: skip injection when the request's target model does not match the
  supportedModels prefix list (case-insensitive). Calls without a model
  argument keep the original behavior, so any other call sites stay safe.
- For tier=flex, the helper writes body.service_tier directly because
  requestDefaults goes through normalizeCodexServiceTier which only
  canonicalizes priority/fast. Per-connection requestDefaults.serviceTier
  still wins over the global override.

UI (CodexFastTierTab.tsx):
- Top-level boolean toggle stays unchanged.
- When enabled: tier <Select> and a collapsible "Applied to models" list
  with checkboxes. Initial selection matches the Fast-eligible catalog;
  users can add slugs by storing them in supportedModels.

i18n: en/fr/es/de hand-translated. The other 38 locales get the standard
__MISSING__: sentinel so scripts/i18n/sync-ui-keys.mjs can fill them in a
subsequent translator pass — same pattern PR #2440 used.

Default behavior is unchanged: existing connections keep their
requestDefaults.serviceTier precedence, the toggle still defaults off,
and old enabled=true rows continue to inject service_tier=priority for
gpt-5.5 / gpt-5.4.

Happy to revise if you'd prefer a different shape.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 21:38:14 +00:00
NomenAK
0790da40af feat(settings): surface Claude Fast Mode toggle in Settings > AI
Adds an opt-in toggle for Anthropic Fast Mode (speed:"fast") on the
Settings > AI page, mirroring the existing CodexFastTierTab pattern. The
behavior pairs with a CLIProxyAPI build that opts SDK-shaped traffic into
the Fast Mode entrypoint; OmniRoute signals the intent via a single
outbound header. Builds of CPA that do not recognize the header forward
it harmlessly.

- New helper: src/lib/providers/claudeFastMode.ts exposes
  isClaudeFastModeEnabled / getClaudeFastModeSupportedModels /
  shouldRequestClaudeFastMode plus the CPA_FORCE_FAST_MODE_HEADER
  constant ("X-CPA-Force-Fast-Mode").
- New Card component: ClaudeFastModeTab.tsx — same Card+Toggle shape
  as CodexFastTierTab.tsx, with a collapsible per-model checkbox group
  (defaults to claude-opus-4-7 and claude-opus-4-6, matching the binary
  KT() gate observed in claude-code v2.1.145).
- Schema: claudeFastMode { enabled?, supportedModels? } added to
  updateSettingsSchema and to the getSettings() defaults.
- Middleware: buildUpstreamHeadersForExecute in chatCore.ts now sets
  X-CPA-Force-Fast-Mode: 1 when provider === "claude" and the model
  matches the configured supportedModels list.
- i18n: 6 new keys added with hand translations for en/fr/es/de and
  __MISSING__: sentinels for the remaining 38 locales so a subsequent
  scripts/i18n/sync-ui-keys.mjs pass can fill them in.

Default behavior is unchanged: the toggle defaults off, so accounts
that have not opted in keep their existing claude request flow. Even
when enabled, Anthropic enforces subscription tier and Fast Mode credit
balance server-side — the toggle may still surface out_of_credits or a
similar 429 from upstream.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 21:25:16 +00:00
Diego Rodrigues de Sa e Souza
52903fea74 fix(translator): fix Kiro 400 on follow-up turns carrying tool_result (#2447)
fix(translator): fix Kiro 400 on follow-up turns carrying tool_result
2026-05-20 18:06:43 -03:00
diegosouzapw
12ab83a45d fix(translator): fix 3 Kiro tool_result defects causing 400 on follow-up turns
- map is_error to status "error"/"success" instead of hardcoding "success"
- add serializeToolResultContent() to handle image/JSON content blocks;
  avoids sending text:\"\" which Kiro rejects as improperly formed
- use deterministic uuidv5 for toolUseId when tool_call has no id, preventing
  id mismatch between assistant toolUse and subsequent tool_result

Closes #2446
2026-05-20 18:02:08 -03:00
diegosouzapw
48c9b4a986 feat(db): add driverFactory with better-sqlite3 → node:sqlite → sql.js cascade 2026-05-20 17:47:21 -03:00
diegosouzapw
e8751299d3 feat(db): add sqljsAdapter (WASM fallback for any environment) 2026-05-20 17:44:10 -03:00
diegosouzapw
e989d9cfa0 feat(db): add nodeSqliteAdapter (node:sqlite built-in fallback) 2026-05-20 17:41:28 -03:00
diegosouzapw
c51c2db8f8 feat(db): add betterSqliteAdapter wrapper 2026-05-20 17:38:55 -03:00
diegosouzapw
0bb0c9dfda feat(db): add SqliteAdapter interface for multi-driver support 2026-05-20 17:35:46 -03:00
diegosouzapw
dbef3ff752 fix(translator): treat developer role as system in Claude translation (#2407)
openAIToClaude now extracts developer-role messages into systemParts
(alongside system role) and filters them from nonSystemMessages, so
identity context injected via the Responses API developer role reaches
the Claude system field instead of silently becoming an assistant turn.
2026-05-20 17:01:11 -03:00
Raxxoor
18e27038e2 feat: align Antigravity 2.0.1 support (#2443)
Integrated into release/v3.8.1
2026-05-20 16:35:30 -03:00
Anton
ed34d16dc9 feat(settings): surface Codex Fast Tier toggle in Settings > AI (#2440)
Integrated into release/v3.8.1
2026-05-20 16:35:25 -03:00
Gi99lin
a0d2dee0c5 fix(jules): Jules API parity and cloud-agent provider registration (#2438)
Integrated into release/v3.8.1
2026-05-20 16:35:20 -03:00
Anton
8670950da3 chore(i18n): refresh fr/es/de locales + add missing settings.update key (#2437)
Integrated into release/v3.8.1
2026-05-20 16:35:16 -03:00
The DT
688bc580b5 feat: Enhance extractBearer to support x-api-key for anthropic api style auth (#2436)
Integrated into release/v3.8.1
2026-05-20 16:35:11 -03:00
Anton
d42161566d feat(memory): wire createMemory to upsertSemanticMemoryPoint (Qdrant) (#2439)
Integrated into release/v3.8.1
2026-05-20 16:35:05 -03:00
diegosouzapw
9273685b27 docs(changelog): add v3.8.1 entry for PR #2433 — antigravity client profile fix by @Gi99lin 2026-05-20 14:15:52 -03:00
Gi99lin
f16fb03cb8 fix(antigravity): IDE vs SDK client profile fingerprint parity (#2433)
Integrated into release/v3.8.1 — applied review suggestion (deduplicate removeHeaderCaseInsensitive)
2026-05-20 12:20:48 -03:00
diegosouzapw
8f0f5f560d chore: bump version to 3.8.1 2026-05-20 12:09:52 -03:00
diegosouzapw
0efaf1cca7 fix(security): post-review hardening batch — command injection, CSP, auth gaps, error sanitization, resilience
- plugin.mjs: replace execSync string-template with spawnSync arg-array (command injection)
- electron/main.js: gate unsafe-eval on !app.isPackaged instead of URL substring; merge duplicate connect-src
- budget/bulk, resilience/reset: add requireManagementAuth guard
- gemini-web, claude-web, copilot-web executors: route catch-block messages through sanitizeErrorMessage
- oauth route, agents/tasks routes: route catch-block errors through sanitizeErrorMessage
- codex.ts: return null (not error-object) from refreshCredentials on failure
- tokenRefresh.ts: safe unknown-error access in catch block
- combo.ts: reset exhaustedProviders per set-retry iteration so providers get a second chance
- circuitBreaker.ts: persist and restore lastFailureKind via options JSON column
2026-05-20 11:11:13 -03:00
diegosouzapw
a8cfe243e1 Merge branch 'release/v3.8.0' 2026-05-20 10:00:36 -03:00
diegosouzapw
a3ae2c422d fix(docker): restore cliproxyapi sidecar profile
The cliproxyapi sidecar (service + named volume + DOCKER_GUIDE.md docs)
was accidentally dropped in 3ff3e3dd1, a commit whose message only
mentioned a ChatPlayground guard. Restore the pre-removal version of
docker-compose.yml and docs/guides/DOCKER_GUIDE.md from 49fe356b9 —
re-adds the `cliproxyapi` profile on port 8317 and the cliproxyapi-data
volume while preserving the docs YAML frontmatter.
2026-05-20 09:47:53 -03:00
Diego Rodrigues de Sa e Souza
87175d6c16 Merge pull request #2432 from diegosouzapw/release/v3.8.0
Sync release/v3.8.0 into main — includes features batch (#2431), AgentRouter docs (#2429), Gemini 3.5 Flash (#2423)
2026-05-20 09:32:43 -03:00
Diego Rodrigues de Sa e Souza
527ab764dd Merge pull request #2431 from diegosouzapw/feat/features-batch-v3.8.0
Integrated into release/v3.8.0 — features batch with regression-safe resets

New features:
- feat(combo): provider-level exhaustion tracking (#1731)
- feat(combo): context window filtering (#1808)  
- fix(combo): cost blending in auto-combo scoring (#1812)
- feat(providers): t3.chat web provider (#1909)
- feat(cli): providers rotate command (#1881)
- feat(kiro): multi-account OAuth isolation (#2328)
- feat(errors): sanitized upstream error details (#1718)
- feat(installer): Termux detection (#1764)
- feat(zed): Docker integration + manual import (#2306)
- test(e2e): system failover test suite

68 regressive files were reset to release/v3.8.0 state to prevent regressions.
2026-05-20 09:28:57 -03:00
diegosouzapw
460e4e733f chore: merge release/v3.8.0 into feat/features-batch — resolve all conflicts with release version 2026-05-20 09:27:10 -03:00