6 Commits

Author SHA1 Message Date
zenfun 855483c8c2 style: fix ruff I001/F401 violations in changed files 2026-03-13 01:18:39 +08:00
zenfun 048c511b18 fix: align browser property with base class and remove dead env writes
- shipyard_neo: browser property now returns None when not initialized
  instead of raising RuntimeError, matching ComputerBooter base contract
- computer_tool_provider: remove dead os.environ writes for shipyard
  (SHIPYARD_ENDPOINT / SHIPYARD_ACCESS_TOKEN are never read anywhere)
  and remove unused os import
2026-03-13 01:14:23 +08:00
zenfun e85eef05b8 fix: stabilize tool injection for LLM prefix cache hits
Two changes to make the tool schema sent to the LLM deterministic:
1. ToolSet.normalize() — sort tools by name before serialization.
   Called at the end of build_main_agent() after all injection passes.
   Eliminates ordering drift from plugin load order, MCP reconnection,
   and persona tool list differences.
2. Always inject full sandbox tool set — ComputerToolProvider now
   returns get_default_sandbox_tools() unconditionally, regardless of
   sandbox boot state. Browser tools are always in the schema even if
   the sandbox profile lacks browser capability. The executor rejects
   calls to unavailable browser tools with a descriptive error instead
   of silently omitting them from the schema.
   This eliminates the pre-boot/post-boot tool set jump that caused
   prefix cache misses on the second request of a conversation.
2026-03-12 02:43:19 +08:00
zenfun f16edd4fff refactor: delegate tool injection to booter self-description API
- Add get_default_tools/get_tools/get_system_prompt_parts to ComputerBooter base
- Each booter subclass (ShipyardNeo, Shipyard, Boxlite) declares its own tools
- ComputerToolProvider now delegates to booter API via computer_client helpers
- Add unified query API: get_sandbox_tools, get_default_sandbox_tools, etc.
- Extract Neo prompts to dedicated computer/prompts.py module
- Add booter type constants (booters/constants.py)
- Fix subagent tool path to pass sandbox_cfg and session_id
- Fix Sourcery issues: shell injection in send_message, typo in prompts,
  internal tools bypass inactivated_llm_tools check
2026-03-12 02:43:19 +08:00
advent259141 ff4412a627 refactor: Centralize and decouple computer-use tool injection logic into a new ComputerToolProvider and associated tool modules. 2026-03-10 22:00:23 +08:00
advent259141 bf430e659a feat: Introduce cron job management and refactor tool provisioning with dedicated providers for computer-use runtimes. 2026-03-10 21:05:09 +08:00