devstuff 2.17.0__tar.gz → 2.19.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {devstuff-2.17.0 → devstuff-2.19.0}/AGENTS.md +1 -1
- {devstuff-2.17.0 → devstuff-2.19.0}/CHANGELOG.md +12 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/CLAUDE.md +10 -1
- devstuff-2.17.0/README.md → devstuff-2.19.0/PKG-INFO +45 -0
- devstuff-2.17.0/PKG-INFO → devstuff-2.19.0/README.md +18 -27
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/ROADMAP.md +2 -2
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/README.md +1 -1
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/mcp/development-plan.md +4 -2
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/mcp/specifications.md +53 -7
- {devstuff-2.17.0 → devstuff-2.19.0}/pyproject.toml +2 -1
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/mcp_cmd.py +38 -1
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/links.yaml +48 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/mcp/core.py +3 -2
- devstuff-2.19.0/src/dev_setup/mcp/printconfig.py +146 -0
- devstuff-2.19.0/tests/integration/test_mcp_claude.py +167 -0
- devstuff-2.19.0/tests/integration/test_mcp_conformance.py +312 -0
- devstuff-2.19.0/tests/mcp_process_support.py +76 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_mcp_core.py +2 -1
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_mcp_http_cmd.py +2 -61
- devstuff-2.19.0/tests/test_mcp_printconfig.py +299 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/uv.lock +397 -1
- {devstuff-2.17.0 → devstuff-2.19.0}/.claude/skills/run-stuff/SKILL.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/.claude/skills/run-stuff/smoke.sh +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/.github/codex/review.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/.github/workflows/agent.yml +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/.github/workflows/bump.yml +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/.github/workflows/ci.yml +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/.github/workflows/publish.yml +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/.github/workflows/test-installs.yml +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/.gitignore +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/dev/Dockerfile +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/dev/Dockerfile.ci +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/dev/Makefile +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/dev/docker-compose.yml +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/devstuff +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/github-agent.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/agent/development-plan.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/agent/specifications.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/agent/stack-decisions.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/ansible-config/development-plan.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/ansible-config/specifications.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/ansible-config/stack-decisions.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/bat-config/development-plan.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/bat-config/specifications.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/bat-config/stack-decisions.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/commitizen-config/development-plan.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/commitizen-config/specifications.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/commitizen-config/stack-decisions.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/docker-config/development-plan.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/docker-config/specifications.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/docker-config/stack-decisions.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/lazygit-config/development-plan.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/lazygit-config/specifications.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/lazygit-config/stack-decisions.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/mcp/stack-decisions.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/outdated/development-plan.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/outdated/specifications.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/outdated/stack-decisions.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/plan-and-progress/specifications.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/precommit-config/development-plan.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/precommit-config/specifications.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/precommit-config/stack-decisions.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/profile/development-plan.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/profile/specifications.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/profile/stack-decisions.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/profile-apply/development-plan.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/profile-apply/specifications.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/profile-apply/stack-decisions.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/starship-config/development-plan.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/starship-config/specifications.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/starship-config/stack-decisions.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/uv-backbone/development-plan.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/uv-backbone/specifications.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/uv-backbone/stack-decisions.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/verbose-mode/development-plan.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/verbose-mode/specifications.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/docs/specs/verbose-mode/stack-decisions.md +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/install.sh +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/__init__.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/__main__.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/agent/__init__.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/agent/approval.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/agent/bridges.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/agent/catalog.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/agent/completion.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/agent/config.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/agent/loop.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/agent/ollama.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/agent/preflight.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/agent/primitives.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/agent/registry.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/agent/sandbox.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/agent/session.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/agent/transcript.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/agent/wizard.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/agent_tools.schema.json +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/agent_tools.yaml +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/apply_exec.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/apply_plan.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/base.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/bundles/ai-agents.yaml +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/bundles/ai-local.yaml +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/bundles/devops.yaml +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/bundles/essentials.yaml +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/bundles/languages.yaml +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/bundles/python.yaml +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/bundles.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/catalog.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/cli.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/__init__.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/_plan.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/add_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/agent_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/catalog_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/configure_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/delete_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/docs_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/doctor_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/functions_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/help_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/install_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/links_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/list_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/outdated_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/profile_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/remove_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/run_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/skills_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/commands/update_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/__init__.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/ansible/__init__.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/ansible/detect.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/ansible/model.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/ansible/render.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/ansible/validate.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/ansible/wizard.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/bat/__init__.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/bat/detect.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/bat/model.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/bat/preview.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/bat/render.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/bat/wizard.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/commitizen/__init__.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/commitizen/detect.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/commitizen/model.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/commitizen/render.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/commitizen/validate.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/commitizen/wizard.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/docker/__init__.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/docker/detect.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/docker/model.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/docker/render.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/docker/validate.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/docker/wizard.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/lazygit/__init__.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/lazygit/detect.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/lazygit/model.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/lazygit/render.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/lazygit/validate.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/lazygit/wizard.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/precommit/__init__.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/precommit/detect.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/precommit/model.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/precommit/render.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/precommit/validate.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/precommit/wizard.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/reptyr/__init__.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/reptyr/wizard.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/starship/__init__.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/starship/fonts.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/starship/icons.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/starship/model.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/starship/preview.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/starship/render.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/configure/starship/wizard.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/doctor.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/function_runner.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/functions.schema.json +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/functions.yaml +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/functions_catalog.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/functions_registry.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/generic.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/links.schema.json +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/links_catalog.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/links_registry.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/mcp/__init__.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/mcp/http.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/mcp/openapi.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/mcp/process.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/mcp/stdio.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/mcp/token.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/profile.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/registry.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/snapshot.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/tools.yaml +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/ui.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/updates.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/src/dev_setup/verbose.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/__init__.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/integration/__init__.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/integration/conftest.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/integration/test_agent_smoke.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/integration/test_agent_tui.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/integration/test_commitizen_config.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/integration/test_profile_apply.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/integration/test_tools.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/mcp_http_support.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_agent.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_agent_bridges.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_agent_completion.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_agent_loop.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_agent_sandbox.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_agent_tools.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_agent_wizard.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_apply_exec.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_apply_plan.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_apply_run.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_bundles.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_catalog.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_configure_ansible.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_configure_bat.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_configure_commitizen.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_configure_docker.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_configure_lazygit.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_configure_precommit.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_configure_reptyr.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_configure_starship.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_doctor.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_functions.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_generic.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_installed_version.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_lifecycle_cmds.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_links.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_mcp_classify.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_mcp_http.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_mcp_openapi.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_mcp_process.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_mcp_stdio.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_mcp_token.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_outdated_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_pin_support.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_plan_and_select.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_profile.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_profile_apply_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_profile_diff.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_profile_diff_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_profile_snapshot_cmd.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_registry.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_snapshot.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_ui.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_update_checker_parity.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_update_notes.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_updates.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_uv_probes.py +0 -0
- {devstuff-2.17.0 → devstuff-2.19.0}/tests/test_verbose.py +0 -0
|
@@ -62,7 +62,7 @@ When you open or update a PR, say in its body what was **run** and what was **no
|
|
|
62
62
|
exists but has not had its first real run, or that needs a sudo or Docker the author's machine
|
|
63
63
|
didn't have, is stated as exactly that: not as passing.
|
|
64
64
|
|
|
65
|
-
## Open PRs (snapshot, 2026-10-
|
|
65
|
+
## Open PRs (snapshot, 2026-10-12)
|
|
66
66
|
|
|
67
67
|
Refresh with the `gh pr list` command above when this looks stale.
|
|
68
68
|
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## v2.19.0 (2026-10-12)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- **links**: add eight developer links
|
|
6
|
+
|
|
7
|
+
## v2.18.0 (2026-10-12)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- **mcp**: M-4 — --print-config, and the SDK and Claude Code conformance suites
|
|
12
|
+
|
|
1
13
|
## v2.17.0 (2026-10-12)
|
|
2
14
|
|
|
3
15
|
### Features
|
|
@@ -694,7 +694,8 @@ the `mutating` label or the key — and a test fails when a bridge is added to `
|
|
|
694
694
|
from `tools/list` *and* refused by `tools/call` — a list-only check passes when dispatch is wide open.
|
|
695
695
|
- **A request's `id` is echoed with its type, and a notification is the *absence* of the key**, never a falsy
|
|
696
696
|
value: Claude Code sends an integer `0` for `initialize`. Unknown methods are `-32601`, not `{}` — the real
|
|
697
|
-
client opens with `server/discover` and falls back to `initialize
|
|
697
|
+
client opens with `server/discover` and falls back to `initialize`. Measured: both the SDK and Claude Code
|
|
698
|
+
fall back on `{}` too, so no real-client test can catch that regression; the raw-frame tests are what pin it.
|
|
698
699
|
- **The protocol channel is moved at the descriptor level** (`stdio.isolate_stdio`): private non-inheritable
|
|
699
700
|
`dup`s, then fd 1 → stderr and fd 0 → `/dev/null`. Anything that prints, however it does it, lands on stderr.
|
|
700
701
|
The test leaks through five routes and has a control showing the same leaks corrupt an un-isolated stream.
|
|
@@ -715,6 +716,14 @@ the `mutating` label or the key — and a test fails when a bridge is added to `
|
|
|
715
716
|
- **Shutdown must not wait for idle keep-alive connections** (`McpHTTPServer.server_close` wakes them) — only for
|
|
716
717
|
running calls. `ThreadingMixIn.server_close` joins every request thread, so one forgotten connection made
|
|
717
718
|
SIGTERM hang forever until a test caught it.
|
|
719
|
+
- **Real-client tests prove "connects", not "correct on the wire".** `tests/integration/test_mcp_claude.py` (real
|
|
720
|
+
`claude mcp list`, skipped without `claude`) and `test_mcp_conformance.py` (the SDK, skipped without `mcp`) cannot
|
|
721
|
+
fail on a wrong or missing answer to `server/discover` — measured, both clients fall back anyway — so the raw-frame
|
|
722
|
+
tests are what pin `-32601` and id echo. The suite uses `mcp.Client`, which sends `server/discover`; the lower-level
|
|
723
|
+
`ClientSession` does not, and a suite built on it never reaches the fallback.
|
|
724
|
+
- **`--print-config` is pure and never contains the token** (`mcp/printconfig.py`). The launcher is the console
|
|
725
|
+
script's absolute path or `<interpreter> -m dev_setup`, never a bare name; HTTP snippets read the token with
|
|
726
|
+
`$(cat <file>)` at paste time. A test pastes each printed command through `bash -c` into a fresh `HOME`.
|
|
718
727
|
- **Reads are never blocked by an install; they are kept honest.** `generic._once` memos live as long as the
|
|
719
728
|
process, so `Dispatcher` clears them when a burst of reads starts and after every mutation (in `finally`), and
|
|
720
729
|
re-runs a read a mutation straddled. The advisory note is a *separate* content item so JSON stays parseable.
|
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: devstuff
|
|
3
|
+
Version: 2.19.0
|
|
4
|
+
Summary: Development environment setup CLI for Linux
|
|
5
|
+
Project-URL: Repository, https://github.com/thesawdawg/dev-setup-py
|
|
6
|
+
Author-email: Sawyer <sawyerksu@gmail.com>
|
|
7
|
+
License: MIT
|
|
8
|
+
Keywords: cli,developer,devtools,linux,setup
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Topic :: System :: Installation/Setup
|
|
20
|
+
Classifier: Topic :: Utilities
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Requires-Dist: click>=8.1
|
|
23
|
+
Requires-Dist: pyyaml>=6.0
|
|
24
|
+
Requires-Dist: questionary>=2.0
|
|
25
|
+
Requires-Dist: rich>=13.0
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
1
28
|
# devstuff
|
|
2
29
|
|
|
3
30
|
A Python-based CLI for managing your Linux development environment. Install, remove, and track developer tools from a single command — with an interactive picker, a guided wizard for adding custom packages, and a consistent Rich terminal UI.
|
|
@@ -1185,6 +1212,24 @@ run**, so a client's configuration survives a restart. `devstuff` prints the fil
|
|
|
1185
1212
|
| `--allow-origin ORIGIN` | Accept requests from this browser origin. Default none: a request carrying an `Origin` is refused, so a web page cannot drive the server |
|
|
1186
1213
|
| `--token-file PATH` | Keep the token elsewhere |
|
|
1187
1214
|
|
|
1215
|
+
### Configuring a client
|
|
1216
|
+
|
|
1217
|
+
`--print-config TARGET` prints a snippet for the other flags you give, then exits — it starts nothing, creates no
|
|
1218
|
+
token file and **never contains the token** (the HTTP command reads it from the file when you run it). Commands use
|
|
1219
|
+
the absolute path of the `devstuff` that is running, since a GUI application usually does not inherit your shell's
|
|
1220
|
+
`PATH`.
|
|
1221
|
+
|
|
1222
|
+
```bash
|
|
1223
|
+
devstuff mcp --allow-install --print-config claude-code # claude mcp add devstuff -- /…/devstuff mcp --allow-install
|
|
1224
|
+
devstuff mcp --print-config claude-desktop # the mcpServers JSON for claude_desktop_config.json
|
|
1225
|
+
devstuff mcp --http --print-config claude-code # the --transport http … --header "…$(cat <token file>)" form
|
|
1226
|
+
devstuff mcp --http --port 9000 --print-config openapi # base URL, /openapi.json URL and the header to send
|
|
1227
|
+
```
|
|
1228
|
+
|
|
1229
|
+
The snippet alone is on stdout (notes go to stderr), so `… --print-config claude-desktop > snippet.json` is clean.
|
|
1230
|
+
`claude-desktop` has no HTTP form, `openapi` needs `--http`, and `--port 0` cannot be printed. Claude Code's
|
|
1231
|
+
`claude mcp list` is the quickest check that a configuration works. Claude Desktop is untested here.
|
|
1232
|
+
|
|
1188
1233
|
A non-loopback `--host` is allowed and **warned about**: there is no TLS, so the token crosses the network in the
|
|
1189
1234
|
clear, and anyone holding it can use every enabled tool. To reach a loopback server from another machine, tunnel
|
|
1190
1235
|
instead, with the *same* local port (the `Host` header must carry the bound port):
|
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.5
|
|
2
|
-
Name: devstuff
|
|
3
|
-
Version: 2.17.0
|
|
4
|
-
Summary: Development environment setup CLI for Linux
|
|
5
|
-
Project-URL: Repository, https://github.com/thesawdawg/dev-setup-py
|
|
6
|
-
Author-email: Sawyer <sawyerksu@gmail.com>
|
|
7
|
-
License: MIT
|
|
8
|
-
Keywords: cli,developer,devtools,linux,setup
|
|
9
|
-
Classifier: Development Status :: 4 - Beta
|
|
10
|
-
Classifier: Environment :: Console
|
|
11
|
-
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
-
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
-
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
-
Classifier: Topic :: System :: Installation/Setup
|
|
20
|
-
Classifier: Topic :: Utilities
|
|
21
|
-
Requires-Python: >=3.11
|
|
22
|
-
Requires-Dist: click>=8.1
|
|
23
|
-
Requires-Dist: pyyaml>=6.0
|
|
24
|
-
Requires-Dist: questionary>=2.0
|
|
25
|
-
Requires-Dist: rich>=13.0
|
|
26
|
-
Description-Content-Type: text/markdown
|
|
27
|
-
|
|
28
1
|
# devstuff
|
|
29
2
|
|
|
30
3
|
A Python-based CLI for managing your Linux development environment. Install, remove, and track developer tools from a single command — with an interactive picker, a guided wizard for adding custom packages, and a consistent Rich terminal UI.
|
|
@@ -1212,6 +1185,24 @@ run**, so a client's configuration survives a restart. `devstuff` prints the fil
|
|
|
1212
1185
|
| `--allow-origin ORIGIN` | Accept requests from this browser origin. Default none: a request carrying an `Origin` is refused, so a web page cannot drive the server |
|
|
1213
1186
|
| `--token-file PATH` | Keep the token elsewhere |
|
|
1214
1187
|
|
|
1188
|
+
### Configuring a client
|
|
1189
|
+
|
|
1190
|
+
`--print-config TARGET` prints a snippet for the other flags you give, then exits — it starts nothing, creates no
|
|
1191
|
+
token file and **never contains the token** (the HTTP command reads it from the file when you run it). Commands use
|
|
1192
|
+
the absolute path of the `devstuff` that is running, since a GUI application usually does not inherit your shell's
|
|
1193
|
+
`PATH`.
|
|
1194
|
+
|
|
1195
|
+
```bash
|
|
1196
|
+
devstuff mcp --allow-install --print-config claude-code # claude mcp add devstuff -- /…/devstuff mcp --allow-install
|
|
1197
|
+
devstuff mcp --print-config claude-desktop # the mcpServers JSON for claude_desktop_config.json
|
|
1198
|
+
devstuff mcp --http --print-config claude-code # the --transport http … --header "…$(cat <token file>)" form
|
|
1199
|
+
devstuff mcp --http --port 9000 --print-config openapi # base URL, /openapi.json URL and the header to send
|
|
1200
|
+
```
|
|
1201
|
+
|
|
1202
|
+
The snippet alone is on stdout (notes go to stderr), so `… --print-config claude-desktop > snippet.json` is clean.
|
|
1203
|
+
`claude-desktop` has no HTTP form, `openapi` needs `--http`, and `--port 0` cannot be printed. Claude Code's
|
|
1204
|
+
`claude mcp list` is the quickest check that a configuration works. Claude Desktop is untested here.
|
|
1205
|
+
|
|
1215
1206
|
A non-loopback `--host` is allowed and **warned about**: there is no TLS, so the token crosses the network in the
|
|
1216
1207
|
clear, and anyone holding it can use every enabled tool. To reach a loopback server from another machine, tunnel
|
|
1217
1208
|
instead, with the *same* local port (the `Host` header must carry the bound port):
|
|
@@ -22,7 +22,7 @@ M5 is independent polish that can be slotted in anywhere.
|
|
|
22
22
|
| M3 | `devstuff profile apply` + bundled bundles | Medium–high | M2 | `profile-apply/` |
|
|
23
23
|
| M4 | Agent tools for `doctor` / `outdated` | Low | M1 | `agent/` (amend) |
|
|
24
24
|
| M5 | Shell completion | Low | — | `completion/` |
|
|
25
|
-
| M6 | `devstuff mcp`: MCP (stdio + HTTP) and OpenAPI tool server | Medium | M1; builds `outdated` / `profile_diff` agent tools (overlaps M4) | `mcp/` (
|
|
25
|
+
| M6 | `devstuff mcp`: MCP (stdio + HTTP) and OpenAPI tool server | Medium | M1; builds `outdated` / `profile_diff` agent tools (overlaps M4) | `mcp/` (built) |
|
|
26
26
|
| — | git / tmux configurator | Medium | — | `git-config/` (unscheduled) |
|
|
27
27
|
| — | `devstuff sandbox <tool>` | Medium | — | `sandbox/` (unscheduled) |
|
|
28
28
|
|
|
@@ -165,7 +165,7 @@ Serve devstuff's catalog-aware tools to any MCP or OpenAPI client, so an AI clie
|
|
|
165
165
|
or inspect a tool instead of guessing at `apt` and `npm` itself.
|
|
166
166
|
|
|
167
167
|
**Spec:** [`specs/mcp/`](specs/mcp/) — **approved**, 2026-10-11 (findings measured; two goals: Claude compatibility, OpenAPI coverage).
|
|
168
|
-
**Progress:** M-1 (bridges, classification), M-2 (the stdio server) and M-3 (`--http`: MCP at `POST /mcp`, REST, `/openapi.json`, the token file)
|
|
168
|
+
**Progress:** M-1 (bridges, classification), M-2 (the stdio server) and M-3 (`--http`: MCP at `POST /mcp`, REST, `/openapi.json`, the token file) and M-4 (`--print-config`, the SDK and `claude mcp list` conformance suites, docs) built 2026-10-12. The live `tools/call` through Claude Code (stdio) was run with consent (spec F-17).
|
|
169
169
|
|
|
170
170
|
- Three framings, one dispatcher: MCP over stdio, MCP over HTTP, and OpenAPI/REST (`/openapi.json`, `/tools`).
|
|
171
171
|
- Read-only tools by default (`list_tools`, `search_catalog`, `tool_info`, `outdated`, `profile_diff`);
|
|
@@ -51,4 +51,4 @@ They are most useful when they capture:
|
|
|
51
51
|
| [`profile/`](profile/) — `devstuff profile snapshot` / `diff`, a portable description of a machine's tools | Complete (v1: snapshot, diff; apply is its own spec) |
|
|
52
52
|
| [`plan-and-progress/`](plan-and-progress/) — plan preview, live progress view and the guided `add` wizard for `install`/`remove`/`update`/`add` | Implemented (documented after the fact; no `stack-decisions.md`) |
|
|
53
53
|
| [`profile-apply/`](profile-apply/) — `devstuff profile apply`, make a machine match a profile | Complete (v1: apply, six bundles; container test written, first run pending) |
|
|
54
|
-
| [`mcp/`](mcp/) — `devstuff mcp`, devstuff's tools as an MCP (stdio + HTTP) and OpenAPI tool server |
|
|
54
|
+
| [`mcp/`](mcp/) — `devstuff mcp`, devstuff's tools as an MCP (stdio + HTTP) and OpenAPI tool server | Built 2026-10-12 (M-1…M-4: stdio, HTTP, OpenAPI, `--print-config`, conformance suites; live Claude Code `tools/call` verified over stdio) |
|
|
@@ -14,7 +14,7 @@ targeting `master` from a branch cut **after** this spec merges (never stacked o
|
|
|
14
14
|
| **M-1** ✅ 2026-10-12 | Measure what remains of F-6/F-11: does sudo's line survive `_run`'s capture (FR-13)? Then `agent/bridges.py` + `agent_tools.yaml`: `outdated` and `profile_diff`; FR-4 test; the FR-1a classification table and its forcing test | — |
|
|
15
15
|
| **M-2** ✅ 2026-10-12 | `src/dev_setup/mcp/`: `core.py` (classification, dispatch, gating, probe lifecycle FR-8a, JSON-RPC handling — pure), `stdio.py` (FR-11/11a/12/19, incl. the detach + supervisor), `commands/mcp_cmd.py` (stdio only) | M-1 |
|
|
16
16
|
| **M-3** ✅ 2026-10-12 | `mcp/http.py`: `POST /mcp`, token/Host/Origin (FR-20, 24–28); then REST + OpenAPI (FR-21–23); `mcp/token.py`, `mcp/openapi.py`, the `--http` flags | M-2 |
|
|
17
|
-
| **M-4** | **G-1:** conformance tests (real SDK client; real `claude mcp list`); `--print-config` (FR-31). **G-2:** OpenAPI validity, both-direction coverage and the document-driven client (FR-22a–c). One live `tools/call` through Claude Code, with consent. README, CLAUDE.md section, specs index, roadmap | M-3 |
|
|
17
|
+
| **M-4** ✅ 2026-10-12 (live stdio `tools/call` through Claude Code run, F-17) | **G-1:** conformance tests (real SDK client; real `claude mcp list`); `--print-config` (FR-31). **G-2:** OpenAPI validity, both-direction coverage and the document-driven client (FR-22a–c). One live `tools/call` through Claude Code, with consent. README, CLAUDE.md section, specs index, roadmap | M-3 |
|
|
18
18
|
|
|
19
19
|
## Layout
|
|
20
20
|
|
|
@@ -65,7 +65,9 @@ status the server never sends, send one it never documents.
|
|
|
65
65
|
**SDK conformance (`tests/integration/test_mcp_conformance.py`, skipped when `mcp` is not importable):** the
|
|
66
66
|
real SDK client — `mcp` in the **dev** dependency group — against `devstuff mcp` over stdio and over HTTP:
|
|
67
67
|
`initialize`, `tools/list`, `tools/call` of a read-only tool, and a gated tool absent without the flag and
|
|
68
|
-
present with it.
|
|
68
|
+
present with it. It uses the high-level `mcp.Client`, the one that opens with `server/discover`, so the
|
|
69
|
+
fallback is exercised on every connect; the lower-level `ClientSession` never sends it, so it cannot (F-16).
|
|
70
|
+
Neither client *fails* on a wrong answer to `server/discover`, so those wire details are held by raw frames.
|
|
69
71
|
|
|
70
72
|
**Review-driven tests (spec §5a), each with the mutation that must break it:**
|
|
71
73
|
- *Classification (FR-1a):* the exact F-10a user file under all four flag combinations; a forcing test over
|
|
@@ -7,7 +7,9 @@ the 2026-10-11 PR review are folded in (§5a). **M-1 built 2026-10-12** (the `ou
|
|
|
7
7
|
bridges, FR-1a's classification in `mcp/core.py`, the FR-4 test, F-12/F-13). **M-2 built 2026-10-12**: the
|
|
8
8
|
stdio server (`devstuff mcp`, FR-1–19, FR-29/30 for stdio) with the detach and supervisor measured (F-14); HTTP,
|
|
9
9
|
REST and OpenAPI (M-3) and `--print-config` (M-4) are not. **M-3 built 2026-10-12**: `--http`, the token file,
|
|
10
|
-
`POST /mcp`, REST and `/openapi.json` (F-15)
|
|
10
|
+
`POST /mcp`, REST and `/openapi.json` (F-15). **M-4 built 2026-10-12**: `--print-config`, the SDK and
|
|
11
|
+
`claude mcp list` conformance suites (F-16). The one live `tools/call` through Claude Code (§6, G-1.3) was run
|
|
12
|
+
2026-10-12 with the user's consent, over stdio (F-17); the same call over HTTP was not.
|
|
11
13
|
**Authors:** Sawyer + Claude
|
|
12
14
|
**Roadmap:** new (overlaps [M4](../../ROADMAP.md): the `outdated` agent tool is built once and serves both)
|
|
13
15
|
**Builds on:** [`agent/`](../agent/) (the tool registry, `AgentTool.to_schema()` / `bind()` and the
|
|
@@ -196,8 +198,10 @@ When a requirement below conflicts with either, the goal wins. Each has a measur
|
|
|
196
198
|
`capabilities: {"tools": {}}` and nothing else.
|
|
197
199
|
- **FR-16** **Method not found is a JSON-RPC `-32601` error, not an empty result.** The current official
|
|
198
200
|
client's first request is `server/discover` under protocol `2026-07-28`, and it falls back to
|
|
199
|
-
`initialize`
|
|
200
|
-
|
|
201
|
+
`initialize` (F-2). `resources/*`, `prompts/*` and any other method get `-32601` too. This is protocol
|
|
202
|
+
correctness, *not* something either real client enforces: both also fall back on `{}`, and the SDK
|
|
203
|
+
waits about five seconds and falls back when the request is never answered (F-16). The raw-frame
|
|
204
|
+
tests are therefore the only ones that can fail on it.
|
|
201
205
|
- **FR-16a** **A request's `id` is echoed back unchanged, type included.** Claude Code sends a *string* id
|
|
202
206
|
(`"server-discover-probe-1"`) and an integer **`0`** for `initialize` (F-8). A request is a notification
|
|
203
207
|
only if the key `id` is *absent* — never because its value is falsy — or the first real reply is
|
|
@@ -391,9 +395,8 @@ When a requirement below conflicts with either, the goal wins. Each has a measur
|
|
|
391
395
|
`Authorization` was on every HTTP request including the `GET`; `Host` was `127.0.0.1:<port>`.
|
|
392
396
|
*Consequences:* FR-16 (confirmed by the product we care most about, not only by the SDK), FR-16a (an
|
|
393
397
|
`if not id` would have dropped the reply to `initialize`), FR-20 (`405` on `GET` is fine), FR-24.
|
|
394
|
-
**Not measured:**
|
|
395
|
-
|
|
396
|
-
Claude renders `isError`.
|
|
398
|
+
**Not measured here:** Claude Desktop (not installed); how Claude renders `isError`. (`tools/call` through
|
|
399
|
+
Claude Code was measured later: F-17.)
|
|
397
400
|
- **F-9 — OpenAPI prototype and tool-name check.** A throwaway generator over the real
|
|
398
401
|
`agent.registry.build()` (non-primitive entries) produced 11 operations — four catalog tools and seven
|
|
399
402
|
`fn_*` — that **validate as OpenAPI 3.1.0** under `openapi-spec-validator`; the same document with one
|
|
@@ -476,6 +479,49 @@ When a requirement below conflicts with either, the goal wins. Each has a measur
|
|
|
476
479
|
to use the same local port (`-L 8765:127.0.0.1:8765`) and a Docker port mapping to a different host port needs
|
|
477
480
|
that port to be the bound one; (9) `serve_forever` polls every 0.1 s instead of 0.5 s, which is how long a
|
|
478
481
|
shutdown would otherwise take to be noticed.
|
|
482
|
+
- **F-16 — M-4: what the real clients do and do not enforce (2026-10-12; `mcp` 2.3.0, Claude Code 2.1.296).**
|
|
483
|
+
*Neither client fails on a wrong answer to `server/discover`.* With `{}` as the answer both fall back to
|
|
484
|
+
`initialize` and connect; with **no answer at all** Claude Code still connects at once and the SDK waits about
|
|
485
|
+
five seconds per connection and then falls back. So `-32601` (FR-16) is protocol correctness that only raw-frame
|
|
486
|
+
tests can hold — a mutation answering `{}` survived every real-client test and was killed by the raw-frame ones.
|
|
487
|
+
*Two SDK clients, one honest test.* The lower-level `ClientSession` never sends `server/discover`; the
|
|
488
|
+
high-level `mcp.Client` does, then `initialize`. A first draft of the conformance suite used `ClientSession` and
|
|
489
|
+
therefore never exercised the fallback at all, which is why the suite uses `Client` and keeps one `ClientSession`
|
|
490
|
+
case for the initialize-first path.
|
|
491
|
+
*`claude mcp list` needs no terminal:* run with stdin `/dev/null` and piped output under an isolated `HOME`, it
|
|
492
|
+
prints one `name: target - <health>` line per server — `✔ Connected`, or `✘ Failed to connect — …` carrying the
|
|
493
|
+
reason (`Server rejected the configured Authorization header (HTTP 401)…` for a wrong token, `ENOENT … posix_spawn`
|
|
494
|
+
for a missing command). Both failures are tested as controls, so `✔ Connected` is shown to be able to be absent.
|
|
495
|
+
*The printed snippets run as printed:* the `--print-config claude-code` stdio command, with and without the gate
|
|
496
|
+
flags, and the HTTP command with its `$(cat <token file>)` header, were each pasted through `bash -c` into a fresh
|
|
497
|
+
`HOME` and then listed `✔ Connected`.
|
|
498
|
+
*Decisions the spec did not make (FR-31):* (1) the launcher is the console script's own absolute path when
|
|
499
|
+
`argv[0]` is a real, executable `devstuff` (a symlink keeps its path: the venv behind it is rebuilt, the link is
|
|
500
|
+
not), otherwise `<this interpreter> -m dev_setup` — never a bare `devstuff` and never a `which` that could name a
|
|
501
|
+
different install; (2) `claude-desktop` with `--http` and `openapi` without `--http` are usage errors, since
|
|
502
|
+
Desktop launches a command over stdio and the OpenAPI document exists only on the HTTP server; (3) `--port 0`
|
|
503
|
+
cannot be printed (nobody knows the port yet); (4) a wildcard `--host` (`0.0.0.0`, `::`) prints `127.0.0.1` and
|
|
504
|
+
says so on stderr; an IPv6 literal is bracketed; (5) the gate flags appear in stdio snippets only — for HTTP they
|
|
505
|
+
are the *server's* launch flags, which a client cannot set, so they are named in a stderr note giving the line
|
|
506
|
+
that starts that server; (6) the snippet is the only thing on stdout and notes go to stderr, so
|
|
507
|
+
`--print-config … > file` is clean; (7) nothing is started, no token file is created or read, and the path is
|
|
508
|
+
printed absolute — a missing file gets a stderr note that the server creates it on first start; (8)
|
|
509
|
+
`--print-config` with `--list-tools` is a usage error, since each prints and exits.
|
|
510
|
+
*Not measured:* Claude Desktop (not installed here, so its snippet is checked for shape only), and the
|
|
511
|
+
expectation that a GUI app does not inherit the shell's `PATH` (it is why the path is absolute, not a finding).
|
|
512
|
+
- **F-17 — the live `tools/call` through Claude Code (2026-10-12, 2.1.296, with the user's consent).** One
|
|
513
|
+
`claude -p` turn (real login, so a model turn; $0.053, 3 turns) with a throwaway `--mcp-config` naming
|
|
514
|
+
`devstuff mcp` over **stdio** and `--strict-mcp-config`, allowed tool `mcp__devstuff__tool_info` only, no session
|
|
515
|
+
saved. The `init` event listed the server `connected` and exactly the five read-only tools as
|
|
516
|
+
`mcp__devstuff__*`. The model first called its own `ToolSearch` (`select:mcp__devstuff__tool_info`) to load the
|
|
517
|
+
deferred tool's schema, then `tool_info {"key": "uv"}`; the result came back with `is_error` absent and our text
|
|
518
|
+
verbatim (`key: uv … install type: bash / installed: yes`), and the model answered from it (`bash` install
|
|
519
|
+
script, already installed). Nothing was installed and no gated tool was reachable; the user's own Claude
|
|
520
|
+
configuration was not changed. *Consequences:* G-1.3 is met for stdio. Claude Code lists MCP tools as
|
|
521
|
+
*deferred* and loads a schema on demand, so a tool's name and description are what a model sees first —
|
|
522
|
+
FR-16b's name rule and the descriptions matter more than the schema. *Not measured:* the same call over HTTP
|
|
523
|
+
(the dispatcher is shared and `claude mcp list` connects over it, but a model turn over HTTP was not made), an
|
|
524
|
+
`isError` result rendered by Claude, and any tool that mutates.
|
|
479
525
|
- **F-12 — the agent catalog had no list-typed parameter (found building M-1).** `outdated`'s `packages`
|
|
480
526
|
(FR-9) is a list of keys, and `agent/catalog.py`'s `PARAM_TYPES` was `string`, `integer`, `number`,
|
|
481
527
|
`boolean`. Decision: add `array` — always an array of strings, advertised as
|
|
@@ -573,7 +619,7 @@ Done means **both goals pass** and every FR has a test that fails when the code
|
|
|
573
619
|
`devstuff mcp`). Skipped, with the reason shown, only when `claude` is not on `PATH`.
|
|
574
620
|
2. The official `mcp` SDK client completes `initialize` → `tools/list` → `tools/call` over both transports.
|
|
575
621
|
3. One live `tools/call` of a read-only tool through Claude Code itself, run once by hand with the user's
|
|
576
|
-
consent (it makes a model turn), reported separately from the automated checks.
|
|
622
|
+
consent (it makes a model turn), reported separately from the automated checks. **Done 2026-10-12, stdio (F-17).**
|
|
577
623
|
4. The snippets from `--print-config claude-code` run as printed and connect. The `claude-desktop` snippet
|
|
578
624
|
is checked for shape only — Desktop is not available here, and the report says so.
|
|
579
625
|
5. A request with `id: 0`, `id: ""` and a string id each get a reply with the same id and type (FR-16a).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "devstuff"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.19.0"
|
|
4
4
|
description = "Development environment setup CLI for Linux"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -46,6 +46,7 @@ packages = ["src/dev_setup"]
|
|
|
46
46
|
[dependency-groups]
|
|
47
47
|
dev = [
|
|
48
48
|
"commitizen>=3.0",
|
|
49
|
+
"mcp>=2.3.0",
|
|
49
50
|
"openapi-spec-validator>=0.9.0",
|
|
50
51
|
"pytest>=8.0",
|
|
51
52
|
"ruff>=0.8",
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import errno
|
|
4
4
|
import ipaddress
|
|
5
|
+
import os
|
|
5
6
|
import re
|
|
6
7
|
import sys
|
|
7
8
|
from pathlib import Path
|
|
@@ -9,7 +10,7 @@ from pathlib import Path
|
|
|
9
10
|
import click
|
|
10
11
|
|
|
11
12
|
from dev_setup.catalog import CatalogError
|
|
12
|
-
from dev_setup.mcp import http, process, stdio, token
|
|
13
|
+
from dev_setup.mcp import http, printconfig, process, stdio, token
|
|
13
14
|
from dev_setup.mcp.core import Dispatcher, Toolbox
|
|
14
15
|
|
|
15
16
|
DEFAULT_HOST = "127.0.0.1"
|
|
@@ -97,6 +98,12 @@ def _is_loopback(host: str) -> bool:
|
|
|
97
98
|
"--list-tools", "list_tools", is_flag=True,
|
|
98
99
|
help="Print the tools these flags would expose, and which gate each sits behind. Starts nothing.",
|
|
99
100
|
)
|
|
101
|
+
@click.option(
|
|
102
|
+
"--print-config", "print_config", type=click.Choice(printconfig.TARGETS), default=None, metavar="TARGET",
|
|
103
|
+
help="Print a snippet to paste into a client, for the other flags given, and exit: claude-code (the "
|
|
104
|
+
"`claude mcp add` command), claude-desktop (the mcpServers JSON) or openapi (URLs and header). "
|
|
105
|
+
"Starts nothing, and never contains the token.",
|
|
106
|
+
)
|
|
100
107
|
def mcp_cmd(
|
|
101
108
|
use_http: bool,
|
|
102
109
|
host: str | None,
|
|
@@ -108,6 +115,7 @@ def mcp_cmd(
|
|
|
108
115
|
allow_install: bool,
|
|
109
116
|
allow_functions: bool,
|
|
110
117
|
list_tools: bool,
|
|
118
|
+
print_config: str | None,
|
|
111
119
|
) -> None:
|
|
112
120
|
"""Serve devstuff's tools to an MCP client (stdio) or over HTTP, MCP and OpenAPI.
|
|
113
121
|
|
|
@@ -140,6 +148,14 @@ def mcp_cmd(
|
|
|
140
148
|
f"--allow-origin takes an origin like http://localhost:3000, not {origin!r}."
|
|
141
149
|
)
|
|
142
150
|
|
|
151
|
+
if print_config and list_tools:
|
|
152
|
+
raise click.UsageError("--print-config and --list-tools each print and exit; pass one.")
|
|
153
|
+
if print_config:
|
|
154
|
+
_print_config(
|
|
155
|
+
print_config, use_http, host or DEFAULT_HOST, DEFAULT_PORT if port is None else port,
|
|
156
|
+
token_file, allow_install, allow_functions,
|
|
157
|
+
)
|
|
158
|
+
return
|
|
143
159
|
if list_tools:
|
|
144
160
|
_print_tools(_load(allow_install, allow_functions))
|
|
145
161
|
return
|
|
@@ -163,6 +179,27 @@ def mcp_cmd(
|
|
|
163
179
|
)
|
|
164
180
|
|
|
165
181
|
|
|
182
|
+
def _print_config(
|
|
183
|
+
target: str, use_http: bool, host: str, port: int, token_file: Path | None,
|
|
184
|
+
allow_install: bool, allow_functions: bool,
|
|
185
|
+
) -> None:
|
|
186
|
+
path = Path(os.path.abspath(token_file or token.default_path()))
|
|
187
|
+
spec = printconfig.Spec(
|
|
188
|
+
launcher=printconfig.launcher(sys.argv[0], sys.executable), http=use_http, host=host, port=port,
|
|
189
|
+
token_file=path, allow_install=allow_install, allow_functions=allow_functions,
|
|
190
|
+
)
|
|
191
|
+
try:
|
|
192
|
+
rendered = printconfig.render(target, spec)
|
|
193
|
+
except printconfig.ConfigError as exc:
|
|
194
|
+
raise click.UsageError(str(exc)) from exc
|
|
195
|
+
click.echo(rendered.text, nl=False)
|
|
196
|
+
# Notes go to stderr so `--print-config … > file` is the snippet and nothing else.
|
|
197
|
+
for note in rendered.notes:
|
|
198
|
+
_warn(note)
|
|
199
|
+
if use_http and target != "claude-desktop" and not path.exists():
|
|
200
|
+
_warn(f"{path} does not exist yet: the server creates it the first time it starts.")
|
|
201
|
+
|
|
202
|
+
|
|
166
203
|
def _serve_http(
|
|
167
204
|
box: Toolbox, dispatcher: Dispatcher, host: str, port: int, token_file: Path | None,
|
|
168
205
|
rotate: bool, allow_origins: tuple[str, ...], allow_hosts: tuple[str, ...], enabled: str,
|
|
@@ -114,3 +114,51 @@ links:
|
|
|
114
114
|
description: Curated list of free developer tools, editors, hosting, and resources
|
|
115
115
|
category: discovery
|
|
116
116
|
url: https://fmhy.net/developer-tools
|
|
117
|
+
|
|
118
|
+
crontab-guru:
|
|
119
|
+
name: crontab guru
|
|
120
|
+
description: Editor for cron schedule expressions that explains in plain English when a schedule runs
|
|
121
|
+
category: utilities
|
|
122
|
+
url: https://crontab.guru/
|
|
123
|
+
|
|
124
|
+
distrosea:
|
|
125
|
+
name: DistroSea
|
|
126
|
+
description: Test drive Linux distributions online, in the browser, without installing them
|
|
127
|
+
category: utilities
|
|
128
|
+
url: https://distrosea.com/
|
|
129
|
+
|
|
130
|
+
oslo-vsc:
|
|
131
|
+
name: Oslo
|
|
132
|
+
description: VS Code theme maker — pick colours, preview them on sample code, and package the theme as a .vsix extension
|
|
133
|
+
category: editors
|
|
134
|
+
url: https://oslo-vsc.netlify.app/
|
|
135
|
+
|
|
136
|
+
playwright-docs:
|
|
137
|
+
name: Playwright Documentation
|
|
138
|
+
description: Web automation for testing, scripting, and AI agents across Chromium, Firefox, and WebKit
|
|
139
|
+
category: web
|
|
140
|
+
url: https://playwright.dev/
|
|
141
|
+
|
|
142
|
+
bootstrap-docs:
|
|
143
|
+
name: Bootstrap 5.3 Documentation
|
|
144
|
+
description: Frontend toolkit — getting started, CDN links, global settings, components, and utilities
|
|
145
|
+
category: web
|
|
146
|
+
url: https://getbootstrap.com/docs/5.3/getting-started/introduction/
|
|
147
|
+
|
|
148
|
+
redoc-repo:
|
|
149
|
+
name: Redoc Repository
|
|
150
|
+
description: Generates browsable API reference docs from OpenAPI/Swagger definitions, as a static page, Docker image, or React component
|
|
151
|
+
category: web
|
|
152
|
+
url: https://github.com/Redocly/redoc
|
|
153
|
+
|
|
154
|
+
duckdb-docs:
|
|
155
|
+
name: DuckDB Documentation
|
|
156
|
+
description: In-process analytical SQL database — client APIs, SQL dialect, data import/export, and extensions
|
|
157
|
+
category: data
|
|
158
|
+
url: https://duckdb.org/docs/current/
|
|
159
|
+
|
|
160
|
+
watchtower-docs:
|
|
161
|
+
name: Watchtower Documentation
|
|
162
|
+
description: Automates Docker container image updates, with scheduling, registry auth, notifications, and an HTTP API
|
|
163
|
+
category: containers
|
|
164
|
+
url: https://watchtower.nickfedor.com/
|
|
@@ -413,8 +413,9 @@ class Dispatcher:
|
|
|
413
413
|
if method == "tools/call":
|
|
414
414
|
return self._tools_call(params)
|
|
415
415
|
# Everything else — `server/discover`, resources/*, prompts/*, notifications — is "method not
|
|
416
|
-
# found"
|
|
417
|
-
#
|
|
416
|
+
# found", which is JSON-RPC's own answer for a method a server does not implement. The current
|
|
417
|
+
# official client opens with `server/discover` and falls back to `initialize`. Neither real client
|
|
418
|
+
# *enforces* -32601 (both also fall back on `{}`, F-16), so only a raw-frame test pins it.
|
|
418
419
|
raise _RpcError(-32601, f"method not found: {method}")
|
|
419
420
|
|
|
420
421
|
def _initialize(self, params: Any) -> dict[str, Any]:
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"""`devstuff mcp --print-config TARGET`: a snippet to paste into a client (docs/specs/mcp, FR-31, F-16).
|
|
2
|
+
|
|
3
|
+
Pure: it formats what it is given and touches no file, socket or process. The one secret on the page,
|
|
4
|
+
the bearer token, is a *path* in every snippet — the client's own shell reads the file when the command
|
|
5
|
+
runs — so a snippet is safe to paste into a ticket or a chat.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import json
|
|
11
|
+
import os
|
|
12
|
+
import shlex
|
|
13
|
+
from dataclasses import dataclass
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
|
|
16
|
+
TARGETS = ("claude-code", "claude-desktop", "openapi")
|
|
17
|
+
NAME = "devstuff"
|
|
18
|
+
|
|
19
|
+
_WILDCARDS = ("", "0.0.0.0", "::") # "every address": a place to listen, not a place to connect
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class ConfigError(ValueError):
|
|
23
|
+
"""A snippet that cannot be printed honestly for these flags."""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@dataclass(frozen=True)
|
|
27
|
+
class Spec:
|
|
28
|
+
launcher: tuple[str, ...]
|
|
29
|
+
http: bool
|
|
30
|
+
host: str
|
|
31
|
+
port: int
|
|
32
|
+
token_file: Path
|
|
33
|
+
allow_install: bool
|
|
34
|
+
allow_functions: bool
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@dataclass(frozen=True)
|
|
38
|
+
class Rendered:
|
|
39
|
+
text: str
|
|
40
|
+
notes: tuple[str, ...] = ()
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def launcher(argv0: str, executable: str) -> tuple[str, ...]:
|
|
44
|
+
"""How to start the devstuff that is running now, as absolute words.
|
|
45
|
+
|
|
46
|
+
A GUI application usually does not inherit the shell's `PATH`, so a bare `devstuff` would work in
|
|
47
|
+
a terminal and fail in Claude Desktop. A console script keeps the path it was started by (a
|
|
48
|
+
symlink such as `~/.local/bin/devstuff` is stable; the venv it points into is not). Anything else
|
|
49
|
+
— `python -m dev_setup`, the `./devstuff` wrapper — is this interpreter running the module, which
|
|
50
|
+
is exactly the code that is answering.
|
|
51
|
+
"""
|
|
52
|
+
if argv0:
|
|
53
|
+
candidate = Path(argv0)
|
|
54
|
+
if candidate.name == "devstuff":
|
|
55
|
+
absolute = Path(os.path.abspath(candidate))
|
|
56
|
+
if absolute.is_file() and os.access(absolute, os.X_OK):
|
|
57
|
+
return (str(absolute),)
|
|
58
|
+
return (os.path.abspath(executable), "-m", "dev_setup")
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _gate_flags(spec: Spec) -> list[str]:
|
|
62
|
+
flags = []
|
|
63
|
+
if spec.allow_install:
|
|
64
|
+
flags.append("--allow-install")
|
|
65
|
+
if spec.allow_functions:
|
|
66
|
+
flags.append("--allow-functions")
|
|
67
|
+
return flags
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def _connect_host(spec: Spec) -> tuple[str, tuple[str, ...]]:
|
|
71
|
+
if spec.host in _WILDCARDS:
|
|
72
|
+
shown = spec.host or "every address"
|
|
73
|
+
return "127.0.0.1", (
|
|
74
|
+
f"the server would be listening on every address ({shown}); the URL below uses 127.0.0.1, "
|
|
75
|
+
"which reaches it from this machine. From another machine, use this machine's own name "
|
|
76
|
+
"or address.",
|
|
77
|
+
)
|
|
78
|
+
return (f"[{spec.host}]" if ":" in spec.host else spec.host), ()
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def _base_url(spec: Spec) -> tuple[str, tuple[str, ...]]:
|
|
82
|
+
if spec.port == 0:
|
|
83
|
+
raise ConfigError(
|
|
84
|
+
"--port 0 asks the OS for a port, so there is no port to write down yet. Pick a port "
|
|
85
|
+
"(the default is fine) and pass it to both the server and --print-config."
|
|
86
|
+
)
|
|
87
|
+
host, notes = _connect_host(spec)
|
|
88
|
+
return f"http://{host}:{spec.port}", notes
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def _server_command(spec: Spec) -> str:
|
|
92
|
+
"""The line that starts the server these snippets talk to, for the note on stderr."""
|
|
93
|
+
words = [*spec.launcher, "mcp", "--http"]
|
|
94
|
+
if spec.host:
|
|
95
|
+
words += ["--host", spec.host]
|
|
96
|
+
words += ["--port", str(spec.port)]
|
|
97
|
+
if spec.token_file:
|
|
98
|
+
words += ["--token-file", str(spec.token_file)]
|
|
99
|
+
words += _gate_flags(spec)
|
|
100
|
+
return shlex.join(words)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def _claude_code(spec: Spec) -> Rendered:
|
|
104
|
+
if not spec.http:
|
|
105
|
+
words = ["claude", "mcp", "add", NAME, "--", *spec.launcher, "mcp", *_gate_flags(spec)]
|
|
106
|
+
return Rendered(shlex.join(words) + "\n")
|
|
107
|
+
base, notes = _base_url(spec)
|
|
108
|
+
# `$(cat …)` is expanded by the shell that runs this command, so the token is read when it is
|
|
109
|
+
# pasted and never appears in what is printed. Quoting restarts inside `$( )`.
|
|
110
|
+
header = f'"Authorization: Bearer $(cat {shlex.quote(str(spec.token_file))})"'
|
|
111
|
+
text = f"claude mcp add --transport http {NAME} {base}/mcp --header {header}\n"
|
|
112
|
+
return Rendered(text, (*notes, f"this talks to a server you start yourself: {_server_command(spec)}"))
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def _claude_desktop(spec: Spec) -> Rendered:
|
|
116
|
+
if spec.http:
|
|
117
|
+
raise ConfigError(
|
|
118
|
+
"Claude Desktop launches a command and talks to it over stdio, so there is no HTTP form to "
|
|
119
|
+
"print. Leave out --http."
|
|
120
|
+
)
|
|
121
|
+
command, *args = spec.launcher
|
|
122
|
+
entry = {"command": command, "args": [*args, "mcp", *_gate_flags(spec)]}
|
|
123
|
+
return Rendered(json.dumps({"mcpServers": {NAME: entry}}, indent=2) + "\n")
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def _openapi(spec: Spec) -> Rendered:
|
|
127
|
+
if not spec.http:
|
|
128
|
+
raise ConfigError("the OpenAPI document is served by the HTTP server: add --http.")
|
|
129
|
+
base, notes = _base_url(spec)
|
|
130
|
+
text = (
|
|
131
|
+
f"Base URL: {base}\n"
|
|
132
|
+
f"OpenAPI URL: {base}/openapi.json\n"
|
|
133
|
+
f"Header: Authorization: Bearer <the contents of {spec.token_file}>\n"
|
|
134
|
+
)
|
|
135
|
+
return Rendered(text, (*notes, f"this talks to a server you start yourself: {_server_command(spec)}"))
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
_RENDERERS = {"claude-code": _claude_code, "claude-desktop": _claude_desktop, "openapi": _openapi}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
def render(target: str, spec: Spec) -> Rendered:
|
|
142
|
+
try:
|
|
143
|
+
renderer = _RENDERERS[target]
|
|
144
|
+
except KeyError:
|
|
145
|
+
raise ConfigError(f"unknown target {target!r}; choose one of: {', '.join(TARGETS)}.") from None
|
|
146
|
+
return renderer(spec)
|