refactor: rename agentpool to wolfharness - #358
Merged
Conversation
…utes OpenCode attach clients call GET /experimental/capabilities and GET /experimental/workspace/status on startup. Both routes were missing, causing 404 (capabilities) and 500 (workspace/status, where the missing route was masked by an OpenTelemetry FastAPI middleware crash on Starlette 1.4 _IncludedRouter). Add: - OpenCodeCapabilities model serializing backgroundSubagents=false - WorkspaceEventConnectionStatus model for the empty status array - Routes returning the OpenCode-compatible shapes Verified: attach endpoint sequence is now all-200, ruff/mypy clean, 1012 opencode server tests pass.
FastAPI >= 0.136 wraps sub-routers added via include_router in
_IncludedRouter nodes that carry no .path attribute. OTel's
_get_route_details reads route.path in its Match.PARTIAL branch without
guarding, so a partial match (e.g. POST against a GET route like
/session/{id}/message) raises AttributeError mid-request and surfaces as
a 500, masking the real endpoint result.
Add otel_fastapi_patch module reproducing OTel's helper with a guarded
PARTIAL branch (falls back to scope['path']), and apply it before
logfire.instrument_fastapi in the OpenCode server. Verified: unpatched
wrong-method POST crashes to 500, patched returns 405/200 correctly.
Replace the runtime monkeypatch (otel_fastapi_patch) with the upstream
OpenTelemetry fix: bump opentelemetry-instrumentation-fastapi to >=0.64b0,
which flattens FastAPI >=0.136 _IncludedRouter wrappers so partial-match
requests (e.g. POST against a GET route like /session/{id}/message) no
longer crash with AttributeError in _get_route_details.
mistralai pins opentelemetry-semantic-conventions <0.61, but OTel 0.64b0
requires ==0.64b0 (metadata-only; mistralai only imports stable
attr constants). Override mistralai's metadata via
[[tool.uv.dependency-metadata]] so the resolver is satisfiable.
Verified: ruff/mypy clean, 1012 opencode server tests pass, partial-match
500 -> 405 with both worktree (0.64b0) and wolfharness-test (0.65b0).
Revert the upstream version-bump approach (c1fb0c5). Upgrading opentelemetry-instrumentation-fastapi to >=0.64b0 requires opentelemetry-semantic-conventions ==0.64b0, which conflicts with the pinned mistralai (opentelemetry-semantic-conventions<0.61). Working around it via [[tool.uv.dependency-metadata]] override does not propagate to downstream projects, so every consumer (e.g. xeno-agent) would need the same override. Restore the local OTel _get_route_details patch (inside OpenCode server only) and document the full decision rationale in the module docstring so the upstream upgrade can be revisited when mistralai relaxes its pin. Verified: partial-match 500 -> 405 with patch, ruff/mypy clean, 1016 opencode server tests pass.
- Resolve tool_display_capability docstring conflicts (keep emit_rich layers) - Rebase viking imports to wolfharness namespace - Migrate new main files (test_tool_display_rich, viking/conftest, test_unit_skill_injection) to wolfharness package prefix - Remove duplicate ingest imports in viking/__init__.py
Post-merge audit found two tracked directories that the original rename (5b3d78e) omitted from its 10-source-package directory list: - tests/agentpool_server/ → tests/wolfharness_server/ (15 test files, contents already imported wolfharness*; namespacing now consistent) - agentpool-session-pool/ → wolfharness-session-pool/ (3 ops runbook docs) Closes the residual-reference gap in OpenSpec task 3.8. pytest collects the renamed server tests identically (87 passed); ruff/mypy unaffected.
…butor sections - Add logo (wolf head + hexagon network) to assets/logo.png - Restructure with Why WolfHarness? / Architecture / Key Features - Add Supported Models table with provider list - Add Roadmap with status tracking - Add Contributors, Citation, and License sections - Add fork acknowledgment to upstream phil65/agentpool - Link to deep docs (tutorials, how-to, explanation, reference) - Remove trailing test artifacts
…dge URLs - Replace mermaid flowchart with assets/structure.png - Fix CI/Docs badge URLs to point to actual workflow files - Remove PyPI badges (not yet published under wolfharness) - Replace PyPI license badge with github/license badge
Remove 7 debug/test scripts cluttering root, prototypes/ (prototype code not merged into formal codebase), and overrides/ (empty except dummy).
- Move config/tools/ → schema/tools/ (tool schemas are docs, not config) - Move wolfharness-session-pool/docs/ops/ → docs/ops/ (ops docs belong in docs/) - Remove benchmarks/ (moved to tests/benchmarks/ as a separate migration) - Remove distribution/zed/ (Zed extension, not core to project) - Remove .copier-answers.yml (upstream template metadata, stale after fork)
Move config/tools/ YAML schemas into the capability that loads them: src/wolfharness/capabilities/background_task/schemas/
- Add changelog/ directory with penguin-harness-inspired structure - Add changelog/README.md with full conventions - Add changelog/unreleased/ for work-in-progress entries - Document release workflow in AGENTS.md
- Add 10 shim packages (src/agentpool*) that re-export from wolfharness* - Each shim emits DeprecationWarning guiding users to update imports - Add agentpool CLI alias in pyproject.toml (agentpool = wolfharness_cli) - Verified: import agentpool, import agentpool_cli, and agentpool --help all work with deprecation warnings
…ath finder Previous shims only re-exported top-level names (from wolfharness import *). Submodule imports like 'from agentpool.agents.context import AgentContext' failed with ModuleNotFoundError because Python 3.13 removed the legacy find_module/load_module protocol. Now uses find_spec (PEP 451) to intercept agentpool.X.Y imports and redirect to wolfharness.X.Y transparently.
Leoyzen
approved these changes
Aug 7, 2026
Downstream projects that still use 'agentpool' as dependency name can point their [tool.uv.sources] agentpool to compat/ instead of the root. The compat package has name='agentpool', depends on wolfharness, and re-exports all shim modules (agentpool, agentpool_config, etc.) via symlinks to src/.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mechanical rename of the project from AgentPool (
agentpool) to WolfHarness (wolfharness).Closes #357
Changes
src/agentpool*package directories tosrc/wolfharness*and updated every Python import statement.agentpool.spec→wolfharness.specand updated PyInstaller metadata.src/wolfharness_config/agentpool_tools.py→wolfharness_tools.py(filename was missed by the bulk script, matching the earlier agentwolf PR fix).agentpoolwithwolfharnessinpyproject.toml,README.md,AGENTS.md,.github/workflows,Dockerfile,alembic.ini, shell scripts, JavaScript snippets, and all YAML examples.agentpooltowolfharness(PyPI package, scripts, and Docker).scripts/rename_to_wolfharness.pymechanical-rename script (replaces the removedrename_to_agentwolf.py).rename-agentpool-to-wolfharness(proposal, design, tasks, andwolfharness-renamecapability delta spec).Verification
uv sync --all-extrasresolves and buildswolfharness==2.9.5.uv run ruff check src/ tests/passes.uv run ruff format src/ tests/ --checkpasses.uv run pytest -m unit: 4875 passed, 19 failed (same pre-existing failures asorigin/main— model-request-gated and ACP/MCP integration tests).Notes / follow-ups
AgentPool,AgentPoolError,AgentpoolToolConfig, etc.) are intentionally kept unchanged — only the package/namespace/CLI/import surface is renamed, matching the earlier agentwolf PR convention.tombi-formathook is unavailable locally (missingtombibinary) — pre-existing.tyreports unresolved-attribute errors that also exist onorigin/main; the project is not yet passingty— pre-existing.uv.lockentries foragentpoolare a separate third-party PyPI dependency (pulled bymknodes), not the project's own package; left intact.