Skip to content

refactor: rename agentpool to wolfharness - #358

Merged
Million-mo merged 24 commits into
mainfrom
refactor/rename-to-wolfharness
Aug 7, 2026
Merged

refactor: rename agentpool to wolfharness#358
Million-mo merged 24 commits into
mainfrom
refactor/rename-to-wolfharness

Conversation

@Million-mo

Copy link
Copy Markdown
Collaborator

Summary

Mechanical rename of the project from AgentPool (agentpool) to WolfHarness (wolfharness).

Closes #357

Changes

  • Renamed all src/agentpool* package directories to src/wolfharness* and updated every Python import statement.
  • Renamed agentpool.specwolfharness.spec and updated PyInstaller metadata.
  • Renamed src/wolfharness_config/agentpool_tools.pywolfharness_tools.py (filename was missed by the bulk script, matching the earlier agentwolf PR fix).
  • Replaced agentpool with wolfharness in pyproject.toml, README.md, AGENTS.md, .github/workflows, Dockerfile, alembic.ini, shell scripts, JavaScript snippets, and all YAML examples.
  • Updated CLI entry point from agentpool to wolfharness (PyPI package, scripts, and Docker).
  • Added scripts/rename_to_wolfharness.py mechanical-rename script (replaces the removed rename_to_agentwolf.py).
  • Added OpenSpec change rename-agentpool-to-wolfharness (proposal, design, tasks, and wolfharness-rename capability delta spec).

Verification

  • uv sync --all-extras resolves and builds wolfharness==2.9.5.
  • uv run ruff check src/ tests/ passes.
  • uv run ruff format src/ tests/ --check passes.
  • uv run pytest -m unit: 4875 passed, 19 failed (same pre-existing failures as origin/main — model-request-gated and ACP/MCP integration tests).

Notes / follow-ups

  • Public class names (AgentPool, AgentPoolError, AgentpoolToolConfig, etc.) are intentionally kept unchanged — only the package/namespace/CLI/import surface is renamed, matching the earlier agentwolf PR convention.
  • Pre-commit tombi-format hook is unavailable locally (missing tombi binary) — pre-existing.
  • Pre-commit ty reports unresolved-attribute errors that also exist on origin/main; the project is not yet passing ty — pre-existing.
  • This PR intentionally does not perform the GitHub repository rename itself; that is a repository-settings operation to be done after this PR lands.
  • The uv.lock entries for agentpool are a separate third-party PyPI dependency (pulled by mknodes), not the project's own package; left intact.

…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.
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/.
@Million-mo
Million-mo merged commit e126b2d into main Aug 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename repository and package from AgentPool to WolfHarness

2 participants