kimi-code/packages/agent-core/test
zy 74c321e4c6
fix(mcp): drop protocol-reserved _meta keys from model-visible output (#2600)
* fix(mcp): drop protocol-reserved _meta keys from model-visible output

Follow-up to #2596. The MCP spec reserves _meta key prefixes whose labels
include "modelcontextprotocol" or "mcp" for protocol use; those entries
carry host/protocol plumbing rather than model-facing data, so filter them
out before serializing the <mcp-structured-result> block. Unprefixed and
vendor-prefixed keys still pass through — their semantics belong to the
server. Also moves the v2 implementation commentary into the module header
per the agent-core-v2 comment convention.

* fix(mcp): reserve _meta prefixes only when a label follows mcp/modelcontextprotocol

Per the spec's key-name rules a prefix is reserved when a
modelcontextprotocol or mcp label is followed by at least one more label;
a trailing reserved word (com.example.mcp/) is a legitimate vendor
namespace and now passes through.

---------

Co-authored-by: zouying <zouying@moonshot.cn>
2026-08-04 20:03:10 +08:00
..
agent fix(agent-core): replay v2 profile.bind records so resumed sessions keep their tools (#2567) 2026-08-03 20:59:46 +08:00
base/common feat(web): introduce Kimi web app and daemon gateway (#625) 2026-06-17 20:53:46 +08:00
config feat(agent-core): custom agent files and secondary model on the v1 engine (#2232) 2026-07-29 12:06:26 +08:00
di feat(web): introduce Kimi web app and daemon gateway (#625) 2026-06-17 20:53:46 +08:00
errors fix(kosong): fail fast on quota-exhausted 429 instead of retrying (#1857) 2026-07-28 14:35:12 +08:00
fixtures refactor(kaos): move Environment into kaos, slim package API (#147) 2026-05-28 16:50:10 +08:00
flags fix: allow obsolete experimental config entries (#584) 2026-06-09 17:00:48 +08:00
harness fix: remove the blocking wait from the TaskOutput tool (#2379) 2026-07-30 01:26:56 +08:00
hooks test: cut slow suite runtimes and isolate experimental flag from host env (#1595) 2026-07-13 17:45:22 +08:00
logging fix: preserve the crash error in diagnostic logs on unexpected exit (#1757) 2026-07-16 01:26:27 +08:00
loop fix(kosong): fail fast on quota-exhausted 429 instead of retrying (#1857) 2026-07-28 14:35:12 +08:00
mcp fix(mcp): drop protocol-reserved _meta keys from model-visible output (#2600) 2026-08-04 20:03:10 +08:00
plugin feat: support plugin-contributed custom agents (#2365) 2026-07-29 21:59:48 +08:00
profile feat: support plugin-contributed custom agents (#2365) 2026-07-29 21:59:48 +08:00
rpc fix(agent-core): scope [image] config limits to the owning core (#1521) 2026-07-09 20:55:52 +08:00
services feat: unify the host identity across OAuth, telemetry, and kap-server (#2382) 2026-07-30 13:45:41 +08:00
session feat(agent-core): custom agent files and secondary model on the v1 engine (#2232) 2026-07-29 12:06:26 +08:00
skill feat: add check-kimi-code-docs builtin skill (#1727) 2026-07-15 11:42:47 +08:00
tools fix(agent-core): strip the no-op subagent model parameter while the secondary-model experiment is off (#2449) 2026-07-31 13:09:56 +08:00
utils feat(agent-core): progressive tool disclosure via select_tools (#1369) 2026-07-06 15:51:08 +08:00
prompt-placeholders.test.ts feat(agent-core): rework compaction to keep only user prompts and summary (#1214) 2026-07-01 01:17:30 +08:00
setup.ts fix(agent-core): strip the no-op subagent model parameter while the secondary-model experiment is off (#2449) 2026-07-31 13:09:56 +08:00