mirror of
https://github.com/usestrix/strix.git
synced 2026-08-24 11:52:38 +02:00
refactor: nuke `strix_tool` shim + dead package re-exports
``@strix_tool`` was passing through every kwarg to ``@function_tool``
with the same defaults — zero Strix-specific value-add. The docstring
also still claimed terminal/browser/python tools opted into
``timeout_behavior="raise_exception"``, but those tools were all
deleted in the recent migrations.
- Replace 30 ``@strix_tool(...)`` callsites with ``@function_tool(...)``.
- Inline ``dump_tool_result(x)`` as ``json.dumps(x, ensure_ascii=False,
default=str)`` at all 64 callsites — no helper.
- Delete ``strix/tools/_decorator.py``.
Drive-by: gut dead package re-exports.
- ``strix/{agents,orchestration,tools}/__init__.py`` re-exported
symbols nobody imports via the package — every consumer uses deep
paths (``from strix.agents.factory import build_strix_agent``).
- The 8 ``strix/tools/<sub>/__init__.py`` re-exports only fed the
splat ``from .agents_graph import *`` etc. in the parent package
init, which is also gone now.
- Reduced to docstrings (or empty) so ``import strix.tools`` doesn't
drag every tool's transitive deps in eagerly.
Drive-by: drop dead helpers in ``runtime.session_manager``
(``cached_scan_ids``, ``_reset_cache_for_tests``) — zero callers since
``tests/`` was nuked in ``a6d578c``.
Verified all tool timeouts preserved (think=10, list_requests=120,
finish_scan=60, web_search=330) and ruff/mypy at baseline.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
6990fd4ef1
commit
b3f7cfd040
@@ -1,19 +1,12 @@
|
||||
"""Strix agent package.
|
||||
"""Strix agent assembly.
|
||||
|
||||
Public surface:
|
||||
- :func:`strix.agents.factory.build_strix_agent` — assemble a root or
|
||||
child ``SandboxAgent``.
|
||||
- :func:`strix.agents.factory.make_child_factory` — closure factory
|
||||
passed via context to the multi-agent ``create_agent`` graph tool.
|
||||
- :func:`strix.agents.prompt.render_system_prompt` — render the Jinja
|
||||
system prompt.
|
||||
|
||||
- :func:`build_strix_agent` — assemble a root or child ``agents.Agent``.
|
||||
- :func:`make_child_factory` — closure factory passed via context to
|
||||
the multi-agent ``create_agent`` graph tool.
|
||||
- :func:`render_system_prompt` — render the Jinja system prompt.
|
||||
Import deeply so ``import strix.agents`` doesn't pull every submodule's
|
||||
deps in eagerly.
|
||||
"""
|
||||
|
||||
from .factory import build_strix_agent, make_child_factory
|
||||
from .prompt import render_system_prompt
|
||||
|
||||
|
||||
__all__ = [
|
||||
"build_strix_agent",
|
||||
"make_child_factory",
|
||||
"render_system_prompt",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user