Commit Graph
5 Commits
Author SHA1 Message Date
Yichen Jiang 4f36177740 feat(agent): publish step decisions as agent.step and add agent/step-boundary
Each proposed step now dispatches the serial agent/step-boundary event
after claiming input, then agent/model, and publishes the chosen model
selection as the optional agent.step until the step ends or its proposal
is rejected, fails, or is cancelled. agent/pre-step listeners, tool
conditions, prompt sections, and the provider and model variables read
agent.step, so the pre-step payload, AssembleContext, and
ToolActivationContext carry no model selection field.

Plan mode commits pending selections at the step boundary, before model
choice, and still narrates the switch in the first admitted step. The
system prompt assembles once after step/start, including runtime context,
and system-prompt/prepare is removed. The runtime-context snapshot is
admitted after the step's accepted messages, so a changed runtime context
alone no longer opens a step.
2026-10-13 17:04:55 +08:00
Yichen Jiang 043539da05 feat(agent): choose provider, model, and effort through agent/model
Rename agent/route to agent/model and make its result a complete
ModelSelection, so each step fixes its provider, model, and reasoning
effort before prompt preparation, agent/pre-step, tool conditions, and
every request attempt. agent/request may change only sampling controls;
returning another provider, model, or reasoning effort fails the step.

installModelSelection installs one agent/model listener and
ModelSelectionRef drops assembled. The pre-step payload, AssembleContext,
and ToolActivationContext carry modelSelection. Webhook initial
selection and the CLI mock effort switch move to agent/model.
2026-10-13 10:58:57 +08:00
Yichen Jiang 06d1caf82f feat(agent): choose the step route through agent/route
- Add the agent/route waterfall, dispatched once per proposed step before
  system-prompt/prepare and agent/pre-step; model selection captures its
  choice there, and a later selection applies from the next step.
- Pass the chosen StepRoute to prompt preparation and assembly, the
  agent/pre-step payload, and tool conditions; remove Agent.currentRoute().
- Run agent/request and prepareCall() for each attempt after step/start and
  prompt assembly; agent/request may change only call controls, and another
  provider or model fails the step.
- Resolve conditional tools and assemble the prompt once per step; retries
  reuse the route, tool set, and rendered assembly.
- Update documentation, Agent Notes, generated catalogs, tests, and the
  cordis-inspect-jsdoc snapshot.
2026-10-12 23:59:29 +08:00
Yichen Jiang 9c3a6a34d4 feat(tools): resolve conditional tool admission per request 2026-10-12 10:30:08 +08:00
Tianyi Cui e221615112 test(sdk): cover native dynamic tool lifecycle 2026-09-23 22:40:39 +08:00