kimi-code/packages
7Sageer b850c5f8f5
fix(node-sdk): wire applyPersistedSecondaryModel to agent-core-v2 (#2345)
* test(node-sdk): drop v1-only subagentNames from the resume parity projection

Custom agent files made v1's resumed agent config carry the bound
profile's delegatable subagent roster; v2's resumed agent state has no
equivalent field, so the resume parity cases fail on main. Project the
engine-owned field away instead of pinning it as a resume-data gap.

* fix(node-sdk): wire applyPersistedSecondaryModel to agent-core-v2

On the v2 engine route the /secondary_model command persisted the recipe
but failed to apply it to the current session: the SDK method fell
through to the base class's not_implemented getRpc().

v1 pushes a reloaded config snapshot into the session because its spawn
binding, tool descriptions, and cached startup warning all read that
snapshot. agent-core-v2 resolves the secondary model live against
IConfigService at spawn time and rebuilds the tool description per read,
so the setConfig write already takes effect session-wide. The override
keeps the rest of v1's contract: config reload, the same loud
validations (session lookup, persist-first recipe check, pointed-model
resolution wrapped at [secondary_model].model), and a warning-cache
refresh via a new recheckSecondaryModelWarning on the session warning
service. getSessionWarnings also surfaces the v2 secondary-model warning
next to the AGENTS.md one, matching v1's aggregate.

* fix(agent-core-v2): surface the subagent's bound model on status events

The v2 model slice rides only the bind-time agent.status.updated, which
precedes subagent.spawned and is dropped by clients that key child events
off the spawn, so subagent cards never learned the model — and a
single-step run emits no usage/context slice until it ends, so the model
only appeared at completion. Re-affirm the binding right after the spawn
announcement via a new IAgentProfileService.republishStatus, and fold a
consistent usage/context/model snapshot into every status event at both
v1 edges (kap-server's broadcaster and the in-process SDK session
wiring, resolving the secondary-model derived id to a readable display
name.
EOF
)

* Delete .changeset/subagent-card-model.md

Signed-off-by: 7Sageer <sag77r@hotmail.com>

* style(agent-core-v2): remove inline implementation comments

---------

Signed-off-by: 7Sageer <sag77r@hotmail.com>
2026-07-29 15:40:42 +08:00
..
acp-adapter ci: release packages (#1989) 2026-07-22 17:24:39 +08:00
agent-core feat(agent-core): custom agent files and secondary model on the v1 engine (#2232) 2026-07-29 12:06:26 +08:00
agent-core-v2 fix(node-sdk): wire applyPersistedSecondaryModel to agent-core-v2 (#2345) 2026-07-29 15:40:42 +08:00
kaos chore: drop #/ import array fallbacks and custom resolution plugins (#1594) 2026-07-13 16:37:35 +08:00
kap-server fix(node-sdk): wire applyPersistedSecondaryModel to agent-core-v2 (#2345) 2026-07-29 15:40:42 +08:00
klient feat: add global default MCP server timeout configs (#2065) 2026-07-23 12:41:08 +08:00
kosong fix(kosong): fail fast on quota-exhausted 429 instead of retrying (#1857) 2026-07-28 14:35:12 +08:00
migration-legacy ci: release packages (#1767) 2026-07-16 18:54:29 +08:00
minidb feat(kap-server): add global message search with literal and live-session modes (#2321) 2026-07-28 21:47:50 +08:00
node-sdk fix(node-sdk): wire applyPersistedSecondaryModel to agent-core-v2 (#2345) 2026-07-29 15:40:42 +08:00
oauth feat(oauth): return structured managed usage rows (#2300) 2026-07-28 15:03:25 +08:00
pi-tui ci: release packages (#1989) 2026-07-22 17:24:39 +08:00
protocol feat(server): remove the 50 MiB upload size cap and stream uploads to disk (#2312) 2026-07-28 17:01:45 +08:00
telemetry fix: close two silent-exit vectors around unhandled rejections (#1758) 2026-07-16 02:14:14 +08:00
transcript feat(kap-server): global session work status, transcript subscribe_v2, and plan endpoint (#2094) 2026-07-23 18:48:25 +08:00
tree-sitter-bash feat(tree-sitter-bash): add a pure-TypeScript bash parser and an agent-core-v2 bashParser service (#2016) 2026-07-28 14:29:08 +08:00