kimi-code/packages/node-sdk/test
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
..
auth-facade.test.ts feat(oauth): return structured managed usage rows (#2300) 2026-07-28 15:03:25 +08:00
catalog.test.ts fix: consume the model metadata declared by the models.dev catalog (#2015) 2026-07-22 01:23:31 +08:00
config.test.ts feat(agent-core): custom agent files and secondary model on the v1 engine (#2232) 2026-07-29 12:06:26 +08:00
create-session-transport.test.ts feat(agent-core): custom agent files and secondary model on the v1 engine (#2232) 2026-07-29 12:06:26 +08:00
export-session.test.ts fix: use timestamped default filename for session debug exports (#1788) 2026-07-16 19:32:06 +08:00
kimi-code-model-provider.test.ts fix: classify OAuth token refresh errors by cause (#838) 2026-06-17 18:34:42 +08:00
kimi-harness.test.ts fix(agent-core): scope [image] config limits to the owning core (#1521) 2026-07-09 20:55:52 +08:00
list-sessions.test.ts feat(vscode): migrate extension to Node SDK (#1769) 2026-07-16 17:27:21 +08:00
local-logging.test.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
mcp-config.test.ts feat(vscode): migrate extension to Node SDK (#1769) 2026-07-16 17:27:21 +08:00
rename-session.test.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
runtime-provider-identity.test.ts feat(managed-kimi-code): route anthropic protocol via beta api (#1186) 2026-06-29 14:24:01 +08:00
runtime-provider-oauth.test.ts refactor(agent-core): make Agent constructable and consolidate provider-manager (#161) 2026-05-28 20:33:10 +08:00
sdk-rpc-client-v2.test.ts feat(node-sdk): migrate the SDK method surface to agent-core-v2 (#2262) 2026-07-28 20:29:45 +08:00
session-approval-handler.test.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
session-background-tasks.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
session-cancel.test.ts feat(protocol): extract shared protocol package from agent-core (#612) 2026-06-10 14:03:38 +08:00
session-context.test.ts feat(vscode): migrate extension to Node SDK (#1769) 2026-07-16 17:27:21 +08:00
session-event-types.test.ts feat(transcript): add unified transcript layer, drop the /api/v2 RPC surface (#1888) 2026-07-20 15:33:05 +08:00
session-event-wiring.test.ts fix(node-sdk): wire applyPersistedSecondaryModel to agent-core-v2 (#2345) 2026-07-29 15:40:42 +08:00
session-goal.test.ts feat(vscode): migrate extension to Node SDK (#1769) 2026-07-16 17:27:21 +08:00
session-plan-compact-usage-resume.test.ts ci: run unit tests on windows (#1037) 2026-06-26 11:56:41 +08:00
session-prompt-events.test.ts feat(vscode): migrate extension to Node SDK (#1769) 2026-07-16 17:27:21 +08:00
session-prompt-input.test.ts fix: scope interactive agent requests (#648) 2026-06-11 15:37:09 +08:00
session-question-handler.test.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
session-runtime-helpers.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
session-set-model.test.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
session-set-permission.test.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
session-set-thinking.test.ts refactor!: overhaul thinking config and effort resolution (#1132) 2026-06-30 22:34:13 +08:00
session-skills.test.ts feat(vscode): migrate extension to Node SDK (#1769) 2026-07-16 17:27:21 +08:00
session-steer.test.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
telemetry.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
test-identity.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
v1-v2-parity.test.ts fix(node-sdk): wire applyPersistedSecondaryModel to agent-core-v2 (#2345) 2026-07-29 15:40:42 +08:00