boomtick-cli 0.19.3__tar.gz → 0.20.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.
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/PKG-INFO +1 -1
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/boomtick_cli.egg-info/PKG-INFO +1 -1
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/boomtick_cli.egg-info/SOURCES.txt +3 -4
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/cli-schema.json +115 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/session_exec.test.js +6 -54
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/mcp/definitions.js +37 -105
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/mcp/server.js +9 -9
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/mcp/server.test.js +24 -16
- boomtick_cli-0.20.0/dev_tools/dist/tools/agent.submit_pr.js +74 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/tools/agent.submit_pr.test.js +78 -26
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/tools/contract.js +119 -0
- boomtick_cli-0.20.0/dev_tools/dist/tools/td.init.js +17 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/tools/td.init_and_rag.js +1 -0
- boomtick_cli-0.20.0/dev_tools/dist/tools/td.init_rag.test.js +47 -0
- boomtick_cli-0.20.0/dev_tools/dist/tools/td.rag.js +24 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/models/__init__.py +20 -0
- boomtick_cli-0.20.0/dev_tools/resources/__pycache__/__init__.cpython-312.pyc +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/resources/__pycache__/build-repo-context.cpython-312.pyc +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/services/local_sessions.py +29 -4
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/services/scope_gate.py +59 -2
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/services/worktrees.py +48 -12
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/pyproject.toml +1 -1
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_issue_validation_local.py +32 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_local_sessions.py +38 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_td_worktree.py +61 -0
- boomtick_cli-0.19.3/dev_tools/dist/tools/agent.submit_pr.js +0 -67
- boomtick_cli-0.19.3/dev_tools/dist/tools/worktree.create.js +0 -51
- boomtick_cli-0.19.3/dev_tools/dist/tools/worktree.lifecycle.test.js +0 -93
- boomtick_cli-0.19.3/dev_tools/dist/tools/worktree.list.js +0 -40
- boomtick_cli-0.19.3/dev_tools/dist/tools/worktree.remove.js +0 -45
- boomtick_cli-0.19.3/dev_tools/resources/__pycache__/__init__.cpython-312.pyc +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/MANIFEST.in +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/README.md +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/boomtick_cli.egg-info/dependency_links.txt +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/boomtick_cli.egg-info/entry_points.txt +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/boomtick_cli.egg-info/requires.txt +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/boomtick_cli.egg-info/top_level.txt +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/__init__.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/cli-commands-schema.json +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/cli.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/config.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/constants.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/config/dynamic.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/config/github.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/config/repo.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/config.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/config.test.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/evals/run-evals.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/http.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/index.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/cdp_client.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/cdp_client.test.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/dependency_cache.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/dependency_cache.test.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/error_utils.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/error_utils.test.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/executor_prompt.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/git.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/git.test.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/param_utils.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/param_utils.test.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/result.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/result.test.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/session_manager.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/shell.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/shell.test.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/skills.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/tdCli.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/lib/test-utils.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/mcp/http.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/mcp/http.test.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/mcp/schemas.test.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/mcp/tools.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/tools/github.create_issue.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/tools/github.create_issue.test.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/tools/github.get_pr.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/tools/github.issue_comment.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/tools/github.issue_update.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/tools/github.issue_view.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/tools/repo.read_agent_context.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/tools/repo.read_agent_context.test.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/tools/repo.read_ci_logs.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/tools/repo.run_tests.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/tools/skill.access.test.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/tools/td.audit_worktree.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/tools/td.validate_issue.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/dist/tools/td.verify_scope.js +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/get_ai_context.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/handlers/__init__.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/handlers/command_handler.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/handlers/mcp_installer.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/handlers/workflow_installer.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/models/base.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/models/contracts.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/multi_repo.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/orchestrator.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/pr_overlap.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/resources/__init__.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/resources/build-repo-context.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/resources/prompt_constants.json +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/resources/review_template.md +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/resources/ux-audit.config.json +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/resources/visual_guidelines.json +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/review_read_pass.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/schema_gen.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/schema_utils.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/services/__init__.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/services/ast_audit.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/services/browser_cdp.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/services/context_builder.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/services/dependency_graph.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/services/github.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/services/repair_service.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/services/spec_issue.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/services/submit_pr.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/services/vector_store.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/td_cli.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/utils/__init__.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/utils/concurrency.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/utils/git.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/ux_report.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/verify_infra.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/verify_versions.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/version_utils.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/workflows/__init__.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/workflows/context.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/workflows/graph.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/workflows/node.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/workflows/nodes.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/dev_tools/workflows/runner.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/setup.cfg +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_agent_merge_approved.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_agent_suggest_fallback.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_ai_review_header.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_ast_audit.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_browser_cdp.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_build_repo_context.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_buildx_compliance.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_cli_pr_options.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_code_intelligence.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_concurrency.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_config.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_deep_agent_track.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_dependency_graph.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_detect_conflicts.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_doctor.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_fail_fast.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_gh_pr_view_run_jobs.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_github_diff_parser.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_github_no_gh.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_github_parser.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_install_workflows.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_issue_view.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_labels.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_latency_mitigation.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_mcp_installer.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_multi_repo.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_opentelemetry_check.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_orchestrator_aggregation.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_orchestrator_heuristics.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_parse_comment.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_plan_issue_audit.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_pr_overlap.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_review_template_validation.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_schema_utils.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_scope_gate_conformance.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_search_issues.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_spec_issue.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_submit_pr.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_td_gates.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_td_rag.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_td_session_cli.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_verify_ci_metrics.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_verify_scope.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_workflow_audit.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_workflow_installer.py +0 -0
- {boomtick_cli-0.19.3 → boomtick_cli-0.20.0}/tests/test_workflow_orchestration.py +0 -0
|
@@ -75,13 +75,12 @@ dev_tools/dist/tools/repo.read_ci_logs.js
|
|
|
75
75
|
dev_tools/dist/tools/repo.run_tests.js
|
|
76
76
|
dev_tools/dist/tools/skill.access.test.js
|
|
77
77
|
dev_tools/dist/tools/td.audit_worktree.js
|
|
78
|
+
dev_tools/dist/tools/td.init.js
|
|
78
79
|
dev_tools/dist/tools/td.init_and_rag.js
|
|
80
|
+
dev_tools/dist/tools/td.init_rag.test.js
|
|
81
|
+
dev_tools/dist/tools/td.rag.js
|
|
79
82
|
dev_tools/dist/tools/td.validate_issue.js
|
|
80
83
|
dev_tools/dist/tools/td.verify_scope.js
|
|
81
|
-
dev_tools/dist/tools/worktree.create.js
|
|
82
|
-
dev_tools/dist/tools/worktree.lifecycle.test.js
|
|
83
|
-
dev_tools/dist/tools/worktree.list.js
|
|
84
|
-
dev_tools/dist/tools/worktree.remove.js
|
|
85
84
|
dev_tools/handlers/__init__.py
|
|
86
85
|
dev_tools/handlers/command_handler.py
|
|
87
86
|
dev_tools/handlers/mcp_installer.py
|
|
@@ -4752,6 +4752,121 @@
|
|
|
4752
4752
|
"title": "TdInitAndRagResponse",
|
|
4753
4753
|
"type": "object"
|
|
4754
4754
|
},
|
|
4755
|
+
"TdInitInput": {
|
|
4756
|
+
"properties": {
|
|
4757
|
+
"repoRoot": {
|
|
4758
|
+
"anyOf": [
|
|
4759
|
+
{
|
|
4760
|
+
"type": "string"
|
|
4761
|
+
},
|
|
4762
|
+
{
|
|
4763
|
+
"type": "null"
|
|
4764
|
+
}
|
|
4765
|
+
],
|
|
4766
|
+
"default": null,
|
|
4767
|
+
"description": "Repo root to initialize (default: git root).",
|
|
4768
|
+
"title": "Reporoot"
|
|
4769
|
+
}
|
|
4770
|
+
},
|
|
4771
|
+
"title": "TdInitInput",
|
|
4772
|
+
"type": "object"
|
|
4773
|
+
},
|
|
4774
|
+
"TdInitResponse": {
|
|
4775
|
+
"properties": {
|
|
4776
|
+
"status": {
|
|
4777
|
+
"anyOf": [
|
|
4778
|
+
{
|
|
4779
|
+
"type": "string"
|
|
4780
|
+
},
|
|
4781
|
+
{
|
|
4782
|
+
"type": "null"
|
|
4783
|
+
}
|
|
4784
|
+
],
|
|
4785
|
+
"default": null,
|
|
4786
|
+
"title": "Status"
|
|
4787
|
+
},
|
|
4788
|
+
"data": {
|
|
4789
|
+
"anyOf": [
|
|
4790
|
+
{},
|
|
4791
|
+
{
|
|
4792
|
+
"type": "null"
|
|
4793
|
+
}
|
|
4794
|
+
],
|
|
4795
|
+
"default": null,
|
|
4796
|
+
"title": "Data"
|
|
4797
|
+
}
|
|
4798
|
+
},
|
|
4799
|
+
"title": "TdInitResponse",
|
|
4800
|
+
"type": "object"
|
|
4801
|
+
},
|
|
4802
|
+
"TdRagInput": {
|
|
4803
|
+
"properties": {
|
|
4804
|
+
"repoRoot": {
|
|
4805
|
+
"anyOf": [
|
|
4806
|
+
{
|
|
4807
|
+
"type": "string"
|
|
4808
|
+
},
|
|
4809
|
+
{
|
|
4810
|
+
"type": "null"
|
|
4811
|
+
}
|
|
4812
|
+
],
|
|
4813
|
+
"default": null,
|
|
4814
|
+
"description": "Repo root for the RAG index (default: git root).",
|
|
4815
|
+
"title": "Reporoot"
|
|
4816
|
+
},
|
|
4817
|
+
"query": {
|
|
4818
|
+
"description": "Natural-language query to run (no rebuild).",
|
|
4819
|
+
"title": "Query",
|
|
4820
|
+
"type": "string"
|
|
4821
|
+
},
|
|
4822
|
+
"topK": {
|
|
4823
|
+
"anyOf": [
|
|
4824
|
+
{
|
|
4825
|
+
"type": "integer"
|
|
4826
|
+
},
|
|
4827
|
+
{
|
|
4828
|
+
"type": "null"
|
|
4829
|
+
}
|
|
4830
|
+
],
|
|
4831
|
+
"default": null,
|
|
4832
|
+
"description": "Maximum RAG hits to return.",
|
|
4833
|
+
"title": "Topk"
|
|
4834
|
+
}
|
|
4835
|
+
},
|
|
4836
|
+
"required": [
|
|
4837
|
+
"query"
|
|
4838
|
+
],
|
|
4839
|
+
"title": "TdRagInput",
|
|
4840
|
+
"type": "object"
|
|
4841
|
+
},
|
|
4842
|
+
"TdRagResponse": {
|
|
4843
|
+
"properties": {
|
|
4844
|
+
"status": {
|
|
4845
|
+
"anyOf": [
|
|
4846
|
+
{
|
|
4847
|
+
"type": "string"
|
|
4848
|
+
},
|
|
4849
|
+
{
|
|
4850
|
+
"type": "null"
|
|
4851
|
+
}
|
|
4852
|
+
],
|
|
4853
|
+
"default": null,
|
|
4854
|
+
"title": "Status"
|
|
4855
|
+
},
|
|
4856
|
+
"data": {
|
|
4857
|
+
"anyOf": [
|
|
4858
|
+
{},
|
|
4859
|
+
{
|
|
4860
|
+
"type": "null"
|
|
4861
|
+
}
|
|
4862
|
+
],
|
|
4863
|
+
"default": null,
|
|
4864
|
+
"title": "Data"
|
|
4865
|
+
}
|
|
4866
|
+
},
|
|
4867
|
+
"title": "TdRagResponse",
|
|
4868
|
+
"type": "object"
|
|
4869
|
+
},
|
|
4755
4870
|
"TdValidateIssueInput": {
|
|
4756
4871
|
"properties": {
|
|
4757
4872
|
"file": {
|
|
@@ -2,12 +2,12 @@ import { describe, it, expect, beforeEach, afterEach, vi } from "vitest";
|
|
|
2
2
|
import fs from "fs/promises";
|
|
3
3
|
import os from "os";
|
|
4
4
|
import path from "path";
|
|
5
|
-
import { execSync } from "child_process";
|
|
6
|
-
import { config } from "../config.js";
|
|
7
5
|
import { SessionManager } from "./session_manager.js";
|
|
8
6
|
import { EXECUTOR_PROMPT_TEMPLATE, fillExecutorPrompt, } from "./executor_prompt.js";
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
// NOTE (issue 1139, item 1): the worktree.* MCP tools were deleted with the
|
|
8
|
+
// orchestrator (`td worktree` / worktrees.py) owning lifecycle, including
|
|
9
|
+
// remove-side session abandonment (see test_remove_abandons_bound_sessions
|
|
10
|
+
// in cli/tests/test_td_worktree.py).
|
|
11
11
|
function fakeSession(over = {}) {
|
|
12
12
|
return {
|
|
13
13
|
sessionId: "sess_test",
|
|
@@ -31,7 +31,7 @@ function fakeSession(over = {}) {
|
|
|
31
31
|
...over,
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
describe("session machinery confinement (
|
|
34
|
+
describe("session machinery confinement (issues 1099 and 1112)", () => {
|
|
35
35
|
beforeEach(() => {
|
|
36
36
|
SessionManager.resetInstance();
|
|
37
37
|
});
|
|
@@ -97,55 +97,7 @@ describe("session machinery confinement (#1099, #1112)", () => {
|
|
|
97
97
|
expect(mgr.getSession("s2").state).toBe("running");
|
|
98
98
|
});
|
|
99
99
|
});
|
|
100
|
-
describe("
|
|
101
|
-
let tmpRepoDir;
|
|
102
|
-
beforeEach(async () => {
|
|
103
|
-
SessionManager.resetInstance();
|
|
104
|
-
tmpRepoDir = await fs.mkdtemp(path.join(os.tmpdir(), "bt-wt-"));
|
|
105
|
-
execSync("git init -b main", { cwd: tmpRepoDir });
|
|
106
|
-
execSync('git config user.email "test@example.com"', { cwd: tmpRepoDir });
|
|
107
|
-
execSync('git config user.name "Test Runner"', { cwd: tmpRepoDir });
|
|
108
|
-
await fs.writeFile(path.join(tmpRepoDir, "README.md"), "# test\n");
|
|
109
|
-
execSync("git add README.md && git commit -m init", { cwd: tmpRepoDir });
|
|
110
|
-
vi.spyOn(config, "repoPath", "get").mockReturnValue(tmpRepoDir);
|
|
111
|
-
});
|
|
112
|
-
afterEach(async () => {
|
|
113
|
-
vi.restoreAllMocks();
|
|
114
|
-
SessionManager.resetInstance();
|
|
115
|
-
try {
|
|
116
|
-
await fs.rm(tmpRepoDir, { recursive: true, force: true });
|
|
117
|
-
}
|
|
118
|
-
catch {
|
|
119
|
-
// ignore
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
it("remove abandons the bound session and reports it", async () => {
|
|
123
|
-
const created = await worktreeCreateHandler({
|
|
124
|
-
name: "Wt Test",
|
|
125
|
-
baseBranch: "main",
|
|
126
|
-
writeMode: true,
|
|
127
|
-
repo: null,
|
|
128
|
-
path: null,
|
|
129
|
-
});
|
|
130
|
-
const mgr = SessionManager.getInstance();
|
|
131
|
-
mgr.registerSession(fakeSession({
|
|
132
|
-
sessionId: "sess_bound",
|
|
133
|
-
worktreeId: created.worktreeId,
|
|
134
|
-
worktreePath: created.path,
|
|
135
|
-
}));
|
|
136
|
-
const removed = await worktreeRemoveHandler({
|
|
137
|
-
worktreeId: created.worktreeId,
|
|
138
|
-
force: false,
|
|
139
|
-
writeMode: true,
|
|
140
|
-
repo: null,
|
|
141
|
-
path: null,
|
|
142
|
-
});
|
|
143
|
-
expect(removed.status).toBe("removed");
|
|
144
|
-
expect(removed.abandonedSessions).toContain("sess_bound");
|
|
145
|
-
expect(mgr.getSession("sess_bound").state).toBe("abandoned");
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
describe("mandatory tooling receipts (#1146)", () => {
|
|
100
|
+
describe("mandatory tooling receipts (issue 1146)", () => {
|
|
149
101
|
it("prepends the low-token protocol to the executor prompt", async () => {
|
|
150
102
|
const mgr = SessionManager.getInstance();
|
|
151
103
|
const prompt = await mgr.buildExecutorPrompt(fakeSession());
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HealthCheckInputJsonSchema, HealthCheckResponseJsonSchema, ReadCiLogsInputJsonSchema, ReadCiLogsResponseJsonSchema, RunTestsInputJsonSchema, RunTestsResponseJsonSchema, GetPrInputJsonSchema, GetPrResponseJsonSchema, IssueViewInputJsonSchema, IssueViewResponseJsonSchema, IssueUpdateInputJsonSchema, IssueUpdateResponseJsonSchema, IssueCommentInputJsonSchema, IssueCommentResponseJsonSchema, CreateIssueInputJsonSchema, CreateIssueResponseJsonSchema, ReadAgentContextInputJsonSchema as ReadAgentContextSchema, ReadAgentContextResponseJsonSchema, AgentSubmitPrInputJsonSchema, AgentSubmitPrResponseJsonSchema,
|
|
1
|
+
import { HealthCheckInputJsonSchema, HealthCheckResponseJsonSchema, ReadCiLogsInputJsonSchema, ReadCiLogsResponseJsonSchema, RunTestsInputJsonSchema, RunTestsResponseJsonSchema, GetPrInputJsonSchema, GetPrResponseJsonSchema, IssueViewInputJsonSchema, IssueViewResponseJsonSchema, IssueUpdateInputJsonSchema, IssueUpdateResponseJsonSchema, IssueCommentInputJsonSchema, IssueCommentResponseJsonSchema, CreateIssueInputJsonSchema, CreateIssueResponseJsonSchema, ReadAgentContextInputJsonSchema as ReadAgentContextSchema, ReadAgentContextResponseJsonSchema, AgentSubmitPrInputJsonSchema, AgentSubmitPrResponseJsonSchema, TdInitInputJsonSchema, TdInitResponseJsonSchema, TdRagInputJsonSchema, TdRagResponseJsonSchema, TdInitAndRagInputJsonSchema, TdInitAndRagResponseJsonSchema, TdValidateIssueInputJsonSchema, TdValidateIssueResponseJsonSchema, TdVerifyScopeInputJsonSchema, TdVerifyScopeResponseJsonSchema, TdAuditWorktreeInputJsonSchema, TdAuditWorktreeResponseJsonSchema, } from "../tools/contract.js";
|
|
2
2
|
export const MCP_PROMPTS = [
|
|
3
3
|
{
|
|
4
4
|
name: "conflict-scout",
|
|
@@ -131,108 +131,40 @@ export const MCP_RESOURCE_TEMPLATES = [
|
|
|
131
131
|
description: "The validation report for a specific repair branch.",
|
|
132
132
|
},
|
|
133
133
|
];
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
outputSchema: IssueViewResponseJsonSchema,
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
name: "github_issue_update",
|
|
173
|
-
description: "Update a GitHub issue's body, labels, and/or state.",
|
|
174
|
-
inputSchema: IssueUpdateInputJsonSchema,
|
|
175
|
-
outputSchema: IssueUpdateResponseJsonSchema,
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
name: "github_issue_comment",
|
|
179
|
-
description: "Add a new comment to a GitHub issue.",
|
|
180
|
-
inputSchema: IssueCommentInputJsonSchema,
|
|
181
|
-
outputSchema: IssueCommentResponseJsonSchema,
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
name: "github_create_issue",
|
|
185
|
-
description: "Create a new GitHub issue.",
|
|
186
|
-
inputSchema: CreateIssueInputJsonSchema,
|
|
187
|
-
outputSchema: CreateIssueResponseJsonSchema,
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
name: "agent_submit_pr",
|
|
191
|
-
description: "Submit a branch as a pull request (push + open, draft by default). Agents submit; humans merge.",
|
|
192
|
-
inputSchema: AgentSubmitPrInputJsonSchema,
|
|
193
|
-
outputSchema: AgentSubmitPrResponseJsonSchema,
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
name: "worktree_create",
|
|
197
|
-
description: "Create a managed git worktree under .worktrees for an agent session.",
|
|
198
|
-
inputSchema: WorktreeCreateInputJsonSchema,
|
|
199
|
-
outputSchema: WorktreeCreateResponseJsonSchema,
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
name: "worktree_list",
|
|
203
|
-
description: "List managed git worktrees under .worktrees.",
|
|
204
|
-
inputSchema: WorktreeListInputJsonSchema,
|
|
205
|
-
outputSchema: WorktreeListResponseJsonSchema,
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
name: "worktree_remove",
|
|
209
|
-
description: "Remove a managed git worktree. Refuses dirty trees without force.",
|
|
210
|
-
inputSchema: WorktreeRemoveInputJsonSchema,
|
|
211
|
-
outputSchema: WorktreeRemoveResponseJsonSchema,
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
name: "td_init_and_rag",
|
|
215
|
-
description: "Initialize a repo (fast-forward main, sync deps, index RAG) and optionally query the vector index.",
|
|
216
|
-
inputSchema: TdInitAndRagInputJsonSchema,
|
|
217
|
-
outputSchema: TdInitAndRagResponseJsonSchema,
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
name: "td_validate_issue",
|
|
221
|
-
description: "Validate a design spec file deterministically (exit 0 iff valid).",
|
|
222
|
-
inputSchema: TdValidateIssueInputJsonSchema,
|
|
223
|
-
outputSchema: TdValidateIssueResponseJsonSchema,
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
name: "td_verify_scope",
|
|
227
|
-
description: "Gate worktree changes against a spec file (exit 0 iff in scope).",
|
|
228
|
-
inputSchema: TdVerifyScopeInputJsonSchema,
|
|
229
|
-
outputSchema: TdVerifyScopeResponseJsonSchema,
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
name: "td_audit_worktree",
|
|
233
|
-
description: "Audit worktree changes for slop/AST violations with optional blast-radius impact analysis.",
|
|
234
|
-
inputSchema: TdAuditWorktreeInputJsonSchema,
|
|
235
|
-
outputSchema: TdAuditWorktreeResponseJsonSchema,
|
|
236
|
-
},
|
|
134
|
+
// The generated contract schemas carry readonly tuples where the MCP
|
|
135
|
+
// Tool type wants mutable fields, so every entry funnels through this
|
|
136
|
+
// one narrowly-typed adapter instead of a blanket `as any` cast.
|
|
137
|
+
function toolEntry(name, description, inputSchema, outputSchema) {
|
|
138
|
+
return {
|
|
139
|
+
name,
|
|
140
|
+
description,
|
|
141
|
+
inputSchema: inputSchema,
|
|
142
|
+
outputSchema: outputSchema,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
// Primary toolset for the Issue/Coder/Auditor lane roles.
|
|
146
|
+
const CORE_MCP_TOOLS = [
|
|
147
|
+
toolEntry("boomtick_health", "Check the health and configuration of the MCP server.", HealthCheckInputJsonSchema, HealthCheckResponseJsonSchema),
|
|
148
|
+
toolEntry("repo_read_agent_context", "Read the repository index including metadata, model review chains, or multi-repo ecosystem status.", ReadAgentContextSchema, ReadAgentContextResponseJsonSchema),
|
|
149
|
+
toolEntry("repo_run_tests", "Run repository tests and checks.", RunTestsInputJsonSchema, RunTestsResponseJsonSchema),
|
|
150
|
+
toolEntry("github_issue_view", "View details of a GitHub issue including title, body, and state.", IssueViewInputJsonSchema, IssueViewResponseJsonSchema),
|
|
151
|
+
toolEntry("github_issue_update", "Update a GitHub issue's body, labels, and/or state.", IssueUpdateInputJsonSchema, IssueUpdateResponseJsonSchema),
|
|
152
|
+
toolEntry("github_create_issue", "Create a new GitHub issue.", CreateIssueInputJsonSchema, CreateIssueResponseJsonSchema),
|
|
153
|
+
toolEntry("agent_submit_pr", "Submit a branch as a pull request via the deterministic td agent submit-pr exit node (push + open, draft by default). Agents submit; humans merge.", AgentSubmitPrInputJsonSchema, AgentSubmitPrResponseJsonSchema),
|
|
154
|
+
toolEntry("td_init", "Initialize a repo (fast-forward main, sync deps, index RAG). Query separately with td_rag.", TdInitInputJsonSchema, TdInitResponseJsonSchema),
|
|
155
|
+
toolEntry("td_rag", "Query the RAG vector index without re-running init builds.", TdRagInputJsonSchema, TdRagResponseJsonSchema),
|
|
156
|
+
toolEntry("td_init_and_rag", "[Deprecated: use td_init + td_rag] Initialize a repo and optionally query the vector index.", TdInitAndRagInputJsonSchema, TdInitAndRagResponseJsonSchema),
|
|
157
|
+
toolEntry("td_validate_issue", "Validate a design spec file deterministically (exit 0 iff valid).", TdValidateIssueInputJsonSchema, TdValidateIssueResponseJsonSchema),
|
|
158
|
+
toolEntry("td_verify_scope", "Gate worktree changes against a spec file (exit 0 iff in scope).", TdVerifyScopeInputJsonSchema, TdVerifyScopeResponseJsonSchema),
|
|
159
|
+
toolEntry("td_audit_worktree", "Audit worktree changes for slop/AST violations with optional blast-radius impact analysis.", TdAuditWorktreeInputJsonSchema, TdAuditWorktreeResponseJsonSchema),
|
|
160
|
+
];
|
|
161
|
+
// Demoted surface (#1139 item 1): kept on the wire for diagnostics, but
|
|
162
|
+
// out of the primary Issue/Coder/Auditor toolsets. Worktree lifecycle
|
|
163
|
+
// moved to the orchestrator (`td worktree` / worktrees.py); do not
|
|
164
|
+
// re-add worktree_create/list/remove here.
|
|
165
|
+
const EXTENDED_MCP_TOOLS = [
|
|
166
|
+
toolEntry("repo_read_ci_logs", "[Demoted] Read CI logs for a given pull request.", ReadCiLogsInputJsonSchema, ReadCiLogsResponseJsonSchema),
|
|
167
|
+
toolEntry("github_get_pr", "[Demoted] Get details of a GitHub PR including title, state, and URLs.", GetPrInputJsonSchema, GetPrResponseJsonSchema),
|
|
168
|
+
toolEntry("github_issue_comment", "[Demoted] Add a new comment to a GitHub issue.", IssueCommentInputJsonSchema, IssueCommentResponseJsonSchema),
|
|
237
169
|
];
|
|
238
|
-
export const MCP_TOOLS =
|
|
170
|
+
export const MCP_TOOLS = [...CORE_MCP_TOOLS, ...EXTENDED_MCP_TOOLS];
|
|
@@ -15,14 +15,16 @@ import { issueUpdateHandler, IssueUpdateInputSchema } from "../tools/github.issu
|
|
|
15
15
|
import { issueCommentHandler, IssueCommentInputSchema } from "../tools/github.issue_comment.js";
|
|
16
16
|
import { createIssueHandler, CreateIssueInputSchema } from "../tools/github.create_issue.js";
|
|
17
17
|
import { tdInitAndRagHandler, TdInitAndRagInputSchema } from "../tools/td.init_and_rag.js";
|
|
18
|
+
import { tdInitHandler, TdInitInputSchema } from "../tools/td.init.js";
|
|
19
|
+
import { tdRagHandler, TdRagInputSchema } from "../tools/td.rag.js";
|
|
18
20
|
import { tdValidateIssueHandler, TdValidateIssueInputSchema } from "../tools/td.validate_issue.js";
|
|
19
21
|
import { tdVerifyScopeHandler, TdVerifyScopeInputSchema } from "../tools/td.verify_scope.js";
|
|
20
22
|
import { tdAuditWorktreeHandler, TdAuditWorktreeInputSchema } from "../tools/td.audit_worktree.js";
|
|
21
23
|
import { agentSubmitPrHandler } from "../tools/agent.submit_pr.js";
|
|
22
24
|
import { AgentSubmitPrInputSchema } from "../tools/contract.js";
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
// NOTE (#1139 item 1): worktree lifecycle moved to the orchestrator
|
|
26
|
+
// (`td worktree` / cli/dev_tools/services/worktrees.py). The worktree.*
|
|
27
|
+
// MCP tools were deleted; do not re-add them here.
|
|
26
28
|
import { getChangedFiles } from "../lib/git.js";
|
|
27
29
|
import { runTDCli } from "../lib/tdCli.js";
|
|
28
30
|
import fs from "fs/promises";
|
|
@@ -210,6 +212,10 @@ export class BoomtickMCPServer {
|
|
|
210
212
|
return createSuccessResult(await createIssueHandler(CreateIssueInputSchema.parse(normArgs)));
|
|
211
213
|
case "td_init_and_rag":
|
|
212
214
|
return createSuccessResult(await tdInitAndRagHandler(TdInitAndRagInputSchema.parse(normArgs)));
|
|
215
|
+
case "td_init":
|
|
216
|
+
return createSuccessResult(await tdInitHandler(TdInitInputSchema.parse(normArgs)));
|
|
217
|
+
case "td_rag":
|
|
218
|
+
return createSuccessResult(await tdRagHandler(TdRagInputSchema.parse(normArgs)));
|
|
213
219
|
case "td_validate_issue":
|
|
214
220
|
return createSuccessResult(await tdValidateIssueHandler(TdValidateIssueInputSchema.parse(normArgs)));
|
|
215
221
|
case "td_verify_scope":
|
|
@@ -218,12 +224,6 @@ export class BoomtickMCPServer {
|
|
|
218
224
|
return createSuccessResult(await tdAuditWorktreeHandler(TdAuditWorktreeInputSchema.parse(normArgs)));
|
|
219
225
|
case "agent_submit_pr":
|
|
220
226
|
return createSuccessResult(await agentSubmitPrHandler(AgentSubmitPrInputSchema.parse(normArgs)));
|
|
221
|
-
case "worktree_create":
|
|
222
|
-
return createSuccessResult(await worktreeCreateHandler(WorktreeCreateInputSchema.parse(normArgs)));
|
|
223
|
-
case "worktree_list":
|
|
224
|
-
return createSuccessResult(await worktreeListHandler(WorktreeListInputSchema.parse(normArgs)));
|
|
225
|
-
case "worktree_remove":
|
|
226
|
-
return createSuccessResult(await worktreeRemoveHandler(WorktreeRemoveInputSchema.parse(normArgs)));
|
|
227
227
|
default:
|
|
228
228
|
return createErrorResult(`Tool not found: ${request.params.name}`);
|
|
229
229
|
}
|
|
@@ -6,8 +6,8 @@ import * as getPrModule from "../tools/github.get_pr.js";
|
|
|
6
6
|
import * as ciLogsModule from "../tools/repo.read_ci_logs.js";
|
|
7
7
|
import * as gitLibModule from "../lib/git.js";
|
|
8
8
|
import * as tdCliModule from "../lib/tdCli.js";
|
|
9
|
-
import * as worktreeListModule from "../tools/worktree.list.js";
|
|
10
9
|
import * as tdValidateModule from "../tools/td.validate_issue.js";
|
|
10
|
+
import * as tdInitModule from "../tools/td.init.js";
|
|
11
11
|
vi.mock("fs/promises");
|
|
12
12
|
vi.mock("../config.js", () => ({
|
|
13
13
|
config: {
|
|
@@ -254,12 +254,11 @@ describe("BoomtickMCPServer", () => {
|
|
|
254
254
|
"repo_read_ci_logs",
|
|
255
255
|
"repo_run_tests",
|
|
256
256
|
"td_audit_worktree",
|
|
257
|
+
"td_init",
|
|
257
258
|
"td_init_and_rag",
|
|
259
|
+
"td_rag",
|
|
258
260
|
"td_validate_issue",
|
|
259
261
|
"td_verify_scope",
|
|
260
|
-
"worktree_create",
|
|
261
|
-
"worktree_list",
|
|
262
|
-
"worktree_remove",
|
|
263
262
|
]);
|
|
264
263
|
});
|
|
265
264
|
it("should ensure all tools have typed outputSchema and none are empty or untyped DEFAULT_OUTPUT_SCHEMA", async () => {
|
|
@@ -276,14 +275,23 @@ describe("BoomtickMCPServer", () => {
|
|
|
276
275
|
describe("CallTool", () => {
|
|
277
276
|
it("should execute registered tool handler successfully", async () => {
|
|
278
277
|
const handler = requestHandlers.get("tools/call");
|
|
279
|
-
vi.spyOn(healthModule, "healthHandler").mockResolvedValue({
|
|
278
|
+
vi.spyOn(healthModule, "healthHandler").mockResolvedValue({
|
|
279
|
+
status: "ok",
|
|
280
|
+
config: {
|
|
281
|
+
githubOwner: "o",
|
|
282
|
+
githubRepo: "r",
|
|
283
|
+
repoPath: "/mock/repo",
|
|
284
|
+
readOnly: true,
|
|
285
|
+
ghPath: "gh",
|
|
286
|
+
},
|
|
287
|
+
});
|
|
280
288
|
const result = await handler({
|
|
281
289
|
method: "tools/call",
|
|
282
290
|
params: { name: "boomtick_health", arguments: {} },
|
|
283
291
|
});
|
|
284
292
|
expect(result).toEqual({
|
|
285
|
-
content: [{ type: "text", text: JSON.stringify({ status: "ok" }, null, 2) }],
|
|
286
|
-
structuredContent: { status: "ok" },
|
|
293
|
+
content: [{ type: "text", text: JSON.stringify({ status: "ok", config: { githubOwner: "o", githubRepo: "r", repoPath: "/mock/repo", readOnly: true, ghPath: "gh" } }, null, 2) }],
|
|
294
|
+
structuredContent: { status: "ok", config: { githubOwner: "o", githubRepo: "r", repoPath: "/mock/repo", readOnly: true, ghPath: "gh" } },
|
|
287
295
|
});
|
|
288
296
|
});
|
|
289
297
|
it("should execute folded github_get_pr includes via underscore or dot name", async () => {
|
|
@@ -305,6 +313,10 @@ describe("BoomtickMCPServer", () => {
|
|
|
305
313
|
"repo_multi_exec",
|
|
306
314
|
"skill_list",
|
|
307
315
|
"skill_read",
|
|
316
|
+
// Worktree lifecycle moved to the orchestrator (issue 1139, item 1).
|
|
317
|
+
"worktree_create",
|
|
318
|
+
"worktree_list",
|
|
319
|
+
"worktree_remove",
|
|
308
320
|
]) {
|
|
309
321
|
const result = await handler({
|
|
310
322
|
method: "tools/call",
|
|
@@ -322,20 +334,16 @@ describe("BoomtickMCPServer", () => {
|
|
|
322
334
|
});
|
|
323
335
|
expect(res.structuredContent).toEqual({ valid: true });
|
|
324
336
|
});
|
|
325
|
-
it("should execute
|
|
337
|
+
it("should execute td_init split tool (issue 1139, item 2)", async () => {
|
|
326
338
|
const handler = requestHandlers.get("tools/call");
|
|
327
|
-
vi.spyOn(
|
|
328
|
-
|
|
339
|
+
vi.spyOn(tdInitModule, "tdInitHandler").mockResolvedValue({
|
|
340
|
+
status: "ready",
|
|
329
341
|
});
|
|
330
342
|
const res = await handler({
|
|
331
343
|
method: "tools/call",
|
|
332
|
-
params: { name: "
|
|
333
|
-
});
|
|
334
|
-
expect(res.structuredContent).toEqual({
|
|
335
|
-
worktrees: [{ path: "/tmp/wt-1", branch: "agent/1" }],
|
|
344
|
+
params: { name: "td_init", arguments: {} },
|
|
336
345
|
});
|
|
337
|
-
expect(
|
|
338
|
-
expect(typeof res.structuredContent).toBe("object");
|
|
346
|
+
expect(res.structuredContent).toEqual({ status: "ready" });
|
|
339
347
|
});
|
|
340
348
|
it("should return error result for unknown tool", async () => {
|
|
341
349
|
const handler = requestHandlers.get("tools/call");
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as fs from "node:fs";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
import { AgentSubmitPrInputSchema } from "./contract.js";
|
|
4
|
+
import { RECEIPT_FILENAME } from "../lib/session_manager.js";
|
|
5
|
+
import { runTDCli } from "../lib/tdCli.js";
|
|
6
|
+
const RAG_TOOLS = new Set(["td.init_and_rag", "td.init", "td.rag", "repo.read_agent_context"]);
|
|
7
|
+
const SCOPE_TOOLS = new Set(["td.verify_scope", "td.audit_worktree"]);
|
|
8
|
+
function readToolReceipts(worktreePath) {
|
|
9
|
+
const receiptPath = path.join(worktreePath, RECEIPT_FILENAME);
|
|
10
|
+
if (!fs.existsSync(receiptPath)) {
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
13
|
+
try {
|
|
14
|
+
const parsed = JSON.parse(fs.readFileSync(receiptPath, "utf8"));
|
|
15
|
+
return Array.isArray(parsed) ? parsed : [];
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Submit a branch as a pull request (push + open, draft by default). Agents submit;
|
|
23
|
+
* humans merge. There is intentionally no merge authority here:
|
|
24
|
+
* human merging stays in `td agent merge-approved --execute`.
|
|
25
|
+
*
|
|
26
|
+
* Deterministic CLI exit node (#1139 item 1): the push + PR open runs
|
|
27
|
+
* through `td agent submit-pr`, not through inline git/gh calls. This
|
|
28
|
+
* handler keeps the MCP-side submission policy (pushMode safety gate +
|
|
29
|
+
* mandatory RAG/scope tool receipts) and maps the CLI result back.
|
|
30
|
+
*/
|
|
31
|
+
export async function agentSubmitPrHandler(input) {
|
|
32
|
+
const parsed = AgentSubmitPrInputSchema.parse(input);
|
|
33
|
+
if (!parsed.pushMode) {
|
|
34
|
+
throw new Error("pushMode must be true to push and open the PR.");
|
|
35
|
+
}
|
|
36
|
+
const cwd = parsed.worktreePath ?? process.cwd();
|
|
37
|
+
const receipts = readToolReceipts(parsed.worktreePath ?? process.cwd());
|
|
38
|
+
const usedRag = receipts.some((r) => RAG_TOOLS.has(r.tool));
|
|
39
|
+
const usedScope = receipts.some((r) => SCOPE_TOOLS.has(r.tool));
|
|
40
|
+
if (!usedRag || !usedScope) {
|
|
41
|
+
throw new Error(`PR submission blocked: missing mandatory tool receipts (usedRag=${usedRag}, usedScope=${usedScope}). ` +
|
|
42
|
+
"Run td init (or init-and-rag) or repo read-agent-context first, then td verify-scope and td audit-worktree.");
|
|
43
|
+
}
|
|
44
|
+
const cliArgs = [
|
|
45
|
+
"agent",
|
|
46
|
+
"submit-pr",
|
|
47
|
+
"--worktree",
|
|
48
|
+
cwd,
|
|
49
|
+
"--title",
|
|
50
|
+
parsed.title,
|
|
51
|
+
"--body",
|
|
52
|
+
parsed.body ?? "",
|
|
53
|
+
"--base",
|
|
54
|
+
parsed.baseBranch ?? "main",
|
|
55
|
+
];
|
|
56
|
+
if (parsed.repo) {
|
|
57
|
+
cliArgs.push("--repo", parsed.repo);
|
|
58
|
+
}
|
|
59
|
+
if (parsed.draft === false) {
|
|
60
|
+
cliArgs.push("--no-draft");
|
|
61
|
+
}
|
|
62
|
+
cliArgs.push("--json");
|
|
63
|
+
const res = await runTDCli(cliArgs, "submit PR via td agent submit-pr");
|
|
64
|
+
if (res.branch && res.branch !== parsed.branch) {
|
|
65
|
+
throw new Error(`Refusing to submit: worktree is on ${res.branch}, request asked for ${parsed.branch}.`);
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
status: "success",
|
|
69
|
+
url: res.url,
|
|
70
|
+
branch: res.branch ?? parsed.branch,
|
|
71
|
+
baseBranch: res.base ?? parsed.baseBranch ?? "main",
|
|
72
|
+
draft: res.draft ?? parsed.draft ?? true,
|
|
73
|
+
};
|
|
74
|
+
}
|