黄姜恒 c1083cbfc6 fix(cursor): MCP tool call resume, H2 flow control, and token usage
- Rewrite tool call mechanism from interrupt-resume to inline-wait mode:
  processH2SessionFrames no longer exits on mcpArgs; instead blocks on
  toolResultCh while continuing to handle KV/heartbeat messages, then
  sends MCP result and continues processing text in the same goroutine.
  Fixes the issue where server stopped generating text after resume.

- Add switchable output channel (outMu/currentOut) so first HTTP response
  closes after tool_calls+[DONE], and resumed text goes to a new channel
  returned by resumeWithToolResults. Reset streamParam on switch so
  Translator produces fresh message_start/content_block_start events.

- Implement send-side H2 flow control: track server's initial window size
  and WINDOW_UPDATE increments; Write() blocks when window exhausted.
  Fixes RST_STREAM FLOW_CONTROL_ERROR on large requests (178KB+).

- Decode new InteractionUpdate fields: TurnEndedUpdate (field 14) as
  stream termination signal, HeartbeatUpdate (field 13) silently ignored,
  TokenDeltaUpdate (field 8) for token usage tracking.

- Include token usage in final stop chunk (prompt_tokens estimated from
  payload size, completion_tokens from accumulated TokenDeltaUpdate deltas)
  so Claude CLI status bar shows non-zero token counts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 17:03:14 +08:00
2026-03-16 00:36:19 +08:00
2025-09-25 10:32:48 +08:00
2026-03-25 10:14:14 +08:00
2026-03-10 22:20:40 +04:00
2026-03-25 10:14:14 +08:00
2025-10-15 11:47:35 +08:00
2026-03-05 20:14:08 +08:00
2026-03-16 00:36:19 +08:00
2025-09-25 10:32:48 +08:00
2026-02-19 04:42:35 +08:00
2026-03-24 00:43:26 +08:00
2026-03-23 15:23:18 +09:00
2026-03-25 10:14:14 +08:00

CLIProxyAPI Plus

English | Chinese

This is the Plus version of CLIProxyAPI, adding support for third-party providers on top of the mainline project.

All third-party provider support is maintained by community contributors; CLIProxyAPI does not provide technical support. Please contact the corresponding community maintainer if you need assistance.

The Plus release stays in lockstep with the mainline features.

Contributing

This project only accepts pull requests that relate to third-party provider support. Any pull requests unrelated to third-party provider support will be rejected.

If you need to submit any non-third-party provider changes, please open them against the mainline repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Description
No description provided
Readme MIT 292 MiB
Languages
Go 99.7%
Shell 0.3%