--dry-run was crashing with ModuleNotFoundError because:
1. adapters/llm/anthropic.py imported 'anthropic' at module level
2. TeamRunner.__init__ always built the LLM adapter regardless of dry_run flag
Fixes:
- Move 'import anthropic' inside AnthropicAdapter.__init__ (lazy import)
so the module loads cleanly without the SDK installed
- In TeamRunner.__init__, wrap _build_llm in a try/except when dry_run=True
so missing adapter deps are logged as warnings, not fatal errors
dry-run now works with no third-party packages installed.
Remove redundant models.provider from team.yaml. Each adapter knows its
own provider key — AnthropicAdapter always looks up 'anthropic' in the
capability_map. This avoids a footgun where adapters.llm and models.provider
could disagree.
Future adapters (OpenAIAdapter, OllamaAdapter) will hardcode their own key
the same way.
- Add default_temperature: 0 to config/team.yaml models block
- Read self._default_temperature from models cfg in __init__
- Use self._default_temperature as fallback in complete() instead of hardcoded 0
- Update class docstring to document both default_max_tokens and default_temperature
- Update complete() context param docs to reference team.yaml keys
OpenClawRuntimeAdapter:
- spawn() shells out to `openclaw session spawn --task <t> --mode run`
- get_result() polls `openclaw session get <id>` until terminal status or timeout
- kill() calls `openclaw session kill <id>`, silently succeeds if finished
- Parses JSON or raw-text session IDs; raises NotImplementedError with
helpful message when openclaw CLI is absent from PATH
ClaudeCodeRuntimeAdapter:
- spawn() launches `claude --permission-mode bypassPermissions --print <task>`
in a temp dir (or context["workdir"]), returns a UUID job_id
- Tracks all Popen instances in a thread-safe dict
- get_result() calls communicate(timeout=...), raises TimeoutError on timeout
- kill() terminates the Popen; silently ignores already-finished processes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sends notifications via `openclaw system event --text <msg> --mode now`.
- Always logs locally (info/warning/error) regardless of CLI availability
- Gracefully handles FileNotFoundError (openclaw not on PATH) and
TimeoutExpired; notifications are best-effort and never crash the pipeline
- OPENCLAW_SIGNAL_NUMBER env var stored for future direct-signal support
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Uses PyGithub to interact with the GitHub REST API.
- Reads GITHUB_TOKEN from env; parses owner/repo from SSH or HTTPS URL
- create_branch() creates a branch off the configured base branch
- commit() accepts dict[str, str] {path: content} or list[str] of
local paths; uses Contents API (create_file / update_file)
- create_pr() and get_pr_status() delegate to PyGithub pull-request API
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements AnthropicAdapter using the anthropic SDK.
- Reads ANTHROPIC_API_KEY from env; raises ValueError if missing
- resolve_model() looks up capability_map in team.yaml config,
falls back to "capable" tier then hard-coded claude-sonnet-4-6
- complete() supports system_prompt, max_tokens (default 4096),
and temperature (default 0) via the context dict
- Adds PyGithub to requirements.txt (needed by GitHubAdapter)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>