Commit Graph

4 Commits

Author SHA1 Message Date
liuhao1024
fb0fc7e140 fix(agent): forward the new_text alias in the memory inline executor
The memory_tool schema advertises new_text as an alias for content, and
memory_tool resolves it when content is None. But the table-driven inline
executor's arg_specs (agent/inline_tool_executors.py) did not list new_text,
so _call_tool's allowlist silently dropped it: a replace call using the
documented alias reached memory_tool with both fields None and failed with
"content is required for 'replace' action." — even though the caller
supplied the value. Forward new_text alongside content/old_text so the
documented alias fires and content still wins when both are set, matching
what the batch path (op.get("content") or op.get("new_text")) already
accepts.
2026-09-07 06:05:13 -07:00
Teknium
8fb678ce5d refactor(agent/image+safety): route vision probes/inline executors on data tables, dedupe path guards (-25% LOC)
- image_routing: capability probes -> _VISION_PROBES ordered table; magic-byte
  sniffing -> _MAGIC signature table; bool tokens -> dict; shared code-span /
  file-existence helpers for extract_image_refs. Fixture-corpus diff base vs
  new identical.
- inline_tool_executors: 11 hand-written executor bodies -> _tool/_callback_tool
  arg-spec factories (kwargs mapping unchanged; corpus of calls identical).
- file_safety: unify _is_under/_under_any, _resolve_target/_resolve_each,
  _mirror_info; deny-list tables compacted; drop retired
  get_cross_profile_warning stub (+ its tests). Every rule preserved (corpus).
- image_gen_provider: drop _images_cache_dir (test-only wrapper), compact.
- estop/delegation_context/kanban_stop/image_gen_registry: defensive-layer
  collapse and docstring compaction.

Tool schema dump byte-identical to base.
2026-09-02 18:58:42 -07:00
Teknium
3d0e9af47a refactor(tool_executor): inline memory_manager_executor into resolve_invoke_tool_executor
Single-caller factory replaced by the equivalent closure; comment compaction only
otherwise.
2026-09-02 16:51:42 -07:00
Teknium
4dcbbc84ab refactor(agent): table-driven inline tool executors shared by both tool paths; dedupe tool_executor
- agent/inline_tool_executors.py: INLINE_TOOL_EXECUTORS dispatch table (13 agent-level
  tools) replaces two drifted if/elif chains (invoke_tool + execute_tool_calls_sequential);
  resolve_invoke_tool_executor preserves the concurrent path's historical precedence.
- tool_hook_ids / emit_terminal_post_tool_call: single owners for hook identity kwargs
  and the terminal post_tool_call emit (was 8 + 3 hand-copied sites).
- tool_executor: shared quiet-spinner start/stop, tool-search unwrap + alias mapping,
  tool-result finalization tail and completion-callback fan-out between the concurrent
  and sequential executors; quiet/default registry branches merged.
2939 -> 2327 LOC.
2026-09-02 13:29:31 -07:00