PR #6298 now fixes each step's model selection before prompt assembly and
agent/pre-step and passes it as modelSelection. This branch is rebuilt on
that master and keeps only conditional tool admission. The earlier agent/model
event, agent.step, step-boundary handling, prompt-assembly and
runtime-context reordering, and their snapshots are superseded, so this
merge records the earlier commits as ancestors and keeps the rebuilt tree.
Keyless session, SDK, ACP, and Web snapshots, the subagent-inheritance
expected output, and the Python dynamic-tools snapshot no longer list
exit_plan_mode outside plan mode, and the collapse-timing goldens count one
fewer added tool. In plan-review, the approved exit now removes the tool on
the next step: its header records a change that starts a series and a
tool-removal developer message, which the expanded Web timeline shows.
cordis-inspect-jsdoc records the new tools service signatures. The pwsh
tool-turn pins are edited by hand because pwsh is unavailable for a local
refresh; their only change is the removed schema.
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.
Links whose target this clean removes, or whose target loops or passes through a file, are residue. A node_modules directory resolving outside the repository is not scanned.
Record the sentence-case rule for English UI copy and plugin titles, sync remaining README label references, and keep the session-inspector Chinese dictionary unchanged.
Refs #6790
Co-authored-by: Magolor <[email protected]>
* feat(analytics): track navigation entry clicks, preset switches, and new-session sends
Rebuilds the click events of #6600 on the region-owned More menus in
release/dsh-0.2.1. Exposure events, creator_mode_enter, and the
ui-workspace onOpened observer are not included.
- sidebar_menu_click gains position plus the new_session and more entries:
New Session (sidebar button, brand, titlebar), Plugins and Automation
rows, the left sidebar More button, and entries opened from its menu.
- more_menu_item_click records Browse other plugins and Create your plugin
per region.
- agent_preset_switch reports applied or unbound staged picks; the seat
controller now returns an explicit apply outcome.
- code_work_view_toggle reports a successful change of the setting.
- send_button_click adds is_new_session and the Session's preset category.
Co-authored-by: imccyu <[email protected]>
* test(analytics): cover navigation, preset switch, toggle, and send analytics
Co-authored-by: imccyu <[email protected]>
* docs(analytics): document click events and regenerate catalogs
Co-authored-by: imccyu <[email protected]>
* test(ui): reuse the developer tools row accessor without a new unknown cast
Co-authored-by: imccyu <[email protected]>
* fix(analytics): classify preset switches by preset id only
agent_preset_switch now maps the preset id the same way send_button_click does: cordis is creator, ptc, minimal and standard keep their ids, and any other id is other; a published preset name no longer changes the category.
Co-authored-by: imccyu <[email protected]>
---------
Co-authored-by: dingyifan <[email protected]>
Co-authored-by: imccyu <[email protected]>
Closing the control pipe after the result rejected outstanding birpc
calls; an unawaited binding promise then crashed the child and its trace
reached the result logs. Once the result is returned or the pipe closes,
binding calls now never settle, including those the closure rejects.
Move the identical in-memory child used by the per-call and persistent
host specs into tests/fake-child.ts, and move readProgramResult next to
the ProgramResult type it validates in protocol.ts.
Keep the stream side owned here: line bounds, the leading-brace check,
the write-queue limit and closure. On the birpc side, drop the strict
envelope validation, falsy-rejection normalization and fatal UTF-8
decoding. Calls to methods an endpoint does not own are answered with
birpc's error and unknown messages are ignored; the resolver still runs
only own methods and none after the endpoint closes.