Files
deepseek-harness/packages/test-support
Yichen Jiang 9d0c97b9d2 feat(tools): admit conditional tools per step
ctx.tools.register(definition, { when }) adds a synchronous or asynchronous
condition. AgentLoop resolves conditions once per proposed step with the
agent, the model selection that step preparation captured, and the turn
signal, before prompt assembly and agent/pre-step. The resulting
ResolvedToolSet governs tool declarations, Native dispatch, PTC bindings,
and nested calls for that step and its retries, and the turn disposes it
when the proposal is rejected or fails, when no step opens, and after the
step. A false condition removes the tool everywhere; a thrown condition
ends the turn with TOOL_ACTIVATION_FAILED. Calls whose registration was
replaced or removed during the step return UNKNOWN_TOOL.

system-prompt/assemble now transforms PromptPresentation without a tool
array, so tool declarations stay provider-owned. exit_plan_mode is declared
only for steps whose selected plan state is active, the same state that
renders plan guidance; it still rejects a call before the selection is
logged.

Model selection stays as master defines it; this change adds no model
selection event or Agent field.
2026-10-21 15:02:29 +08:00
..
2026-10-17 15:10:31 +08:00
2026-10-17 15:10:31 +08:00
2026-10-17 15:10:31 +08:00

description, kind
description kind
The test-support group map: keyless test harnesses, LLM mock and replay servers, and Loader smoke helpers for developers writing and running repository tests. package-group

packages/test-support

English | 中文

Summary

The test-support group gives repository tests deterministic, keyless ways to exercise the real product. It includes Loader application harnesses, session-log snapshot adapters, a replay LLM plugin, and a scriptable OpenAI-compatible fault server. Each package is support-tier infrastructure; a package moves out of this group when it gains a product contract and product consumers.

Table of Contents


Packages

Package Role
session-snapshot Provides session-log snapshot support and protocol adapters for profile-driven tests
agent-loop-testkit Provides the shared prerequisite services for tests that exercise the concrete AgentLoop
client-runtime Provides the jsdom slot test bench for browser feature specs
remote-mock Provides the endpoint-named Typert Remote mock and the Connection carrier face whole-client specs install
loader-smoke Boots Loader-composed applications and drives fixture turns for smoke tests
llm-mock-server Provides a scriptable OpenAI-compatible fault server for recovery tests
llm-replay Replays recorded model streams for keyless tests and demos

  • Testing policy — the keyless snapshot tier these harnesses serve and when it is required.
  • Package groups — how support groups relate to the product groups.

Dev Note

Working context for maintainers — click to expand

None.