kimi-code/packages/node-sdk/test
Haozhe f412e105b3
feat(acp-server): bridge questions via elicitation and support host slash commands (#2583)
* fix(acp): preserve cancels that arrive before the turn id is known

A session/cancel landing between prompt submission and the launch
round-trip found driver.turnId undefined and was dropped entirely; the
turn then ran to completion and the prompt resolved end_turn despite
the client's cancel.

The engine's cancel payload makes turnId optional (an empty call
cancels the active turn — the same contract kap-server's cancel route
relies on), so cancel() now issues an unaddressed cancel in that window
and flags the driver; the launch handler re-issues a precisely
addressed cancel once the id lands, and a no-launch outcome settles
cancelled instead of end_turn.

* fix(agent-core-v2): shut session MCP overlays down on service teardown

The ephemeral per-session MCP overlay was only shut down by the
session handle's dispose wrapper, but the DI container disposes session
scopes directly on workspace/app teardown, bypassing the wrapper — so
overlays of sessions still live at shutdown leaked their MCP
connections and stdio child processes.

Track live overlays in the lifecycle service: the handle wrapper
deletes-then-shuts-down (atomic, so close and service disposal can
never double-shutdown), and the service's own dispose shuts down
whatever is still tracked.

* feat(acp-server): bridge questions via elicitation and support host slash commands

- route AskUserQuestion through `elicitation/create` for form-capable
  clients (native multi-question + multi-select), falling back to the
  `request_permission` bridge on RPC failure
- add a `slashCommands` resolver option so hosts can merge their own
  command palette and skill aliases into `available_commands_update`;
  `/help` now lists the merged palette
- bridge `appendText`/`writeBytes` through client text capabilities
  (read-modify-write append, UTF-8-checked byte writes) with local
  filesystem fallbacks
- defer `available_commands_update` until after the lifecycle response
  settles so clients like Zed do not drop the notification
- propagate plan-toggle errors from `setMode` instead of silently
  reporting the new mode; make server `close()` idempotent

* style(acp-server): satisfy oxlint eqeqeq and await-thenable rules

* test(node-sdk): assert v1-v2 tokenCount parity for imports after eager counting
2026-08-04 10:44:56 +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(cli): fall back to built-in models.dev catalog when fetch fails (#2416) 2026-07-31 19:54:09 +08:00
config.test.ts feat(acp): add experimental agent-core-v2 ACP server (kimi acp-v2) (#2571) 2026-08-04 10:20:24 +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 refactor(agent-core-v2): move host runtime args onto IBootstrapService (#2460) 2026-07-31 16:47:34 +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(agent-core-v2): introduce the Workspace domain and the agent-profile registry extension point (#2366) 2026-07-31 00:38:11 +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 feat(agent-core-v2): add tokenCounting service with strategy config and measured anchors (#2563) 2026-08-04 09:44:21 +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 feat: unify the host identity across OAuth, telemetry, and kap-server (#2382) 2026-07-30 13:45:41 +08:00
v1-v2-parity.test.ts feat(acp-server): bridge questions via elicitation and support host slash commands (#2583) 2026-08-04 10:44:56 +08:00