kimi-code/packages/protocol
Haozhe 0303b82c3e
fix: align v1 protocol handshake and tool_result media passthrough (#1630)
* fix(protocol): make server_hello heartbeat_ms optional

kap-server dropped the server-initiated WS heartbeat and no longer emits
heartbeat_ms in server_hello, but the published v1 schema still required
it, so spec-compliant clients rejected the handshake before subscribing.

- mark heartbeat_ms optional in serverHelloPayloadSchema (advisory only)
- add a ws-control test for a server_hello without heartbeat_ms
- align kimi-web WireServerHello and the server-e2e handshake assertion

* fix(agent-core-v2): pass media parts through tool_result projection

- keep raw kosong content-part array for tool results carrying
  image/video/audio parts instead of flattening to text
- restore ReadMediaFile media rendering after session reload/resume

* chore: add changeset for optional server_hello heartbeat_ms

* docs(agent-core-v2): move tool_result media rationale to module header

Per the agent-core-v2 comment conventions, comments live solely in the
top-of-file block — move the media-passthrough rationale out of the
buildProtocolContent JSDoc into the module header.
2026-07-13 23:13:48 +08:00
..
src fix: align v1 protocol handshake and tool_result media passthrough (#1630) 2026-07-13 23:13:48 +08:00
CHANGELOG.md ci: release packages (#1268) 2026-07-02 11:12:20 +08:00
package.json chore: drop #/ import array fallbacks and custom resolution plugins (#1594) 2026-07-13 16:37:35 +08:00
tsconfig.json feat(protocol): extract shared protocol package from agent-core (#612) 2026-06-10 14:03:38 +08:00
tsdown.config.ts feat(protocol): extract shared protocol package from agent-core (#612) 2026-06-10 14:03:38 +08:00
vitest.config.ts chore: use raw query imports for prompt sources (#682) 2026-06-12 11:47:44 +08:00