Commit Graph
12 Commits
Author SHA1 Message Date
walkerandClaude Opus 4.6 74f028168d fix(browser): 加固 browser_click 激活语义并修复相关验证阻塞
- 将 browser_click 调整为 mousedown/mouseup 后走 native click
- 在取消激活和中途 detached 场景下避免强制触发 native activation
- 补齐 browser_click 的回归测试与取消激活场景覆盖
- 修复 cliproxy 本地代理、Droid 环境隔离、图像分析 hook 与 proxy 集成测试的验证阻塞

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 11:19:16 +08:00
Tam Nhu Tran 4baed01d49 fix: complete codex tool sanitization coverage 2026-03-07 10:35:41 +07:00
Tam Nhu Tran 8cfd86f1d1 fix: strip unsupported gemini and codex tool fields 2026-03-07 09:54:02 +07:00
Tam Nhu Tran 7e471e663c fix(cliproxy): normalize iflow aliases for explicit routing 2026-03-03 23:34:38 +07:00
Tam Nhu Tran f63e2cd5a3 fix(cliproxy): denylist deprecated agy 4.5 models 2026-03-03 03:10:53 +07:00
Tam Nhu Tran 0b57e41b3a fix(cliproxy): harden agy model canonicalization and migration paths 2026-03-02 21:43:33 +07:00
Tam Nhu Tran 8a2b55449b fix(agy): normalize sonnet 4.6 model ids and migrate legacy thinking alias 2026-03-02 21:10:49 +07:00
Tam Nhu Tran 6429781e8f fix(cliproxy): normalize provider-aware Claude model IDs 2026-02-21 02:14:09 +07:00
Tam Nhu Tran 539afea737 style: format source and test files 2026-02-17 17:03:11 +07:00
kaitranntt 152f5432ae refactor(cliproxy): deduplicate message_delta/message_stop in synthetic SSE response
Track hasReceivedMessageDelta and hasReceivedMessageStop in both
streaming paths (pipe-through and SSE-processing). Conditionally
omit these events from buildSyntheticErrorResponse() when upstream
already sent them, preventing protocol violations.

Closes #491
2026-02-07 04:24:54 -05:00
Kai (Tam Nhu) TranandGitHub 545c8b9515 fix(cliproxy): guard against empty upstream SSE responses in agy profile (#489)
* fix(cliproxy): guard against empty upstream SSE responses in agy profile

When CLIProxyAPIPlus drops unsigned thinking blocks during sub-agent
execution, the response stream can contain no content_block_start or
message_delta events. This causes Claude Code CLI to crash with
"No assistant message found".

Add empty response detection in the tool sanitization proxy's streaming
handler. Both the pipe-through and SSE-processing paths now track
whether meaningful content was received. If upstream sent data but no
content blocks on a 200 OK, a synthetic minimal valid SSE response is
injected to prevent the client crash and surface a clear error message.

Closes #350

* fix(cliproxy): improve empty response detection and add tests

Address code review findings:
- Remove message_delta from content detection (lifecycle event, not
  content); only content_block_start indicates actual content
- Add try-catch in end handlers to handle client disconnects gracefully
- Add 3 integration tests: empty stream injection, normal stream
  passthrough, 4xx/5xx non-injection

* fix(cliproxy): avoid duplicate message_start in synthetic response

Track whether upstream already sent a message_start event. When
injecting the synthetic error response, omit message_start if upstream
already sent one, preventing duplicate events in the SSE stream.

Addresses PR review feedback from ccs-reviewer[bot].

* test(cliproxy): add SSE processing path and real failure mode tests

Address code review observations:
- Add test exercising SSE processing path (sanitized tool names) for
  empty response detection, ensuring both code paths are covered
- Add test mirroring real failure mode where upstream sends only
  message_start then ends abruptly (no message_delta/message_stop)
- Document duplicate message_start assumption with inline comment
2026-02-07 04:09:30 -05:00
kaitranntt bf190024f6 test(cliproxy): add integration tests for ToolSanitizationProxy
- Test proxy lifecycle (start/stop)
- Test request sanitization (duplicates, truncation, passthrough)
- Test response restoration (buffered and SSE streaming)
- Test error handling (invalid JSON, upstream errors)
- Test multiple tools with mapping tracking
- Mock upstream server for isolated testing
2026-01-29 16:23:56 -05:00