agent-toolkit-cli 1.0.3__py3-none-any.whl
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.
- agent_toolkit/__init__.py +4 -0
- agent_toolkit/__main__.py +3 -0
- agent_toolkit/_paths.py +64 -0
- agent_toolkit/cli/__init__.py +0 -0
- agent_toolkit/cli/doctor.py +453 -0
- agent_toolkit/cli/install.py +445 -0
- agent_toolkit/cli/main.py +66 -0
- agent_toolkit/cli/mcp.py +418 -0
- agent_toolkit/cli/plugin.py +213 -0
- agent_toolkit/cli/skills.py +421 -0
- agent_toolkit/loop/__init__.py +0 -0
- agent_toolkit/loop/gh_gate.py +626 -0
- agent_toolkit/loop/runner.py +1548 -0
- agent_toolkit/runner/__init__.py +0 -0
- agent_toolkit/runner/dispatcher.py +164 -0
- agent_toolkit/runner/policy.py +345 -0
- agent_toolkit/runner/providers/__init__.py +21 -0
- agent_toolkit/runner/providers/anthropic_provider.py +109 -0
- agent_toolkit/runner/providers/base.py +53 -0
- agent_toolkit/runner/providers/ollama_provider.py +108 -0
- agent_toolkit/runner/providers/openai_provider.py +105 -0
- agent_toolkit/runner/providers/opencode_provider.py +127 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/agents/architect/AGENT.md +30 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/agents/assistant/AGENT.md +59 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/agents/build-error-resolver/AGENT.md +30 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/agents/client-workflow-bootstrap/AGENT.md +60 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/agents/code-reviewer/AGENT.md +49 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/agents/database-reviewer/AGENT.md +44 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/agents/docs-lookup/AGENT.md +28 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/agents/e2e-runner/AGENT.md +38 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/agents/performance-optimizer/AGENT.md +52 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/agents/planner/AGENT.md +41 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/agents/refactor-cleaner/AGENT.md +43 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/agents/reference-lookup/AGENT.md +33 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/agents/security-reviewer/AGENT.md +47 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/agents/tdd-guide/AGENT.md +58 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/agents/tech-assistant/AGENT.md +11 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/agents/typescript-reviewer/AGENT.md +61 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/catalogs/agent-catalog.yaml +202 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/catalogs/loop-catalog.yaml +165 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/catalogs/skill-catalog.yaml +699 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/catalogs/skills-layout.json +337 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/loops/changelog-drafter/loop.yaml +40 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/loops/ci-sweeper/loop.yaml +53 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/loops/daily-triage/loop.yaml +47 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/loops/dep-sweeper/loop.yaml +46 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/loops/issue-triage/loop.yaml +40 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/loops/oss-daily-briefing/loop.yaml +65 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/loops/oss-pr-monitor/loop.yaml +85 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/loops/oss-triage/loop.yaml +67 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/loops/post-merge-cleanup/loop.yaml +44 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/loops/pr-babysitter/loop.yaml +46 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/mcp/templates/clickup/README.md +45 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/mcp/templates/clickup/config.template.json +7 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/mcp/templates/clickup/wrapper.sh +23 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/mcp/templates/figma/README.md +56 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/mcp/templates/figma/config.template.json +9 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/mcp/templates/github/README.md +11 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/mcp/templates/github/config.template.json +7 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/mcp/templates/github/wrapper.sh +23 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/mcp/templates/linear/README.md +49 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/mcp/templates/linear/config.template.json +10 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/mcp/templates/notion/README.md +7 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/mcp/templates/notion/config.template.json +7 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/mcp/templates/notion/wrapper.sh +23 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/mcp/templates/slack/README.md +8 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/mcp/templates/slack/config.template.json +8 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/mcp/templates/slack/wrapper.sh +23 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/claude-code/CLAUDE.md +66 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/claude-code/agents/assistant.md +59 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/claude-code/agents/build-error-resolver.md +30 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/claude-code/agents/client-workflow-bootstrap.md +60 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/claude-code/agents/contribution-planner.md +39 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/claude-code/agents/database-reviewer.md +44 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/claude-code/agents/docs-lookup.md +28 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/claude-code/agents/e2e-runner.md +38 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/claude-code/agents/performance-optimizer.md +52 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/claude-code/agents/planner.md +41 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/claude-code/agents/refactor-cleaner.md +43 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/claude-code/agents/reference-lookup.md +33 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/claude-code/agents/security-reviewer.md +47 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/claude-code/agents/tdd-guide.md +58 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/claude-code/agents/typescript-reviewer.md +61 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/claude-code/settings.json +87 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/copilot/copilot-instructions.md +15 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/cursor/README.md +33 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/cursor/rules/architect.mdc +23 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/cursor/rules/assistant.mdc +25 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/cursor/rules/build-error-resolver.mdc +20 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/cursor/rules/code-reviewer.mdc +21 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/cursor/rules/database-reviewer.mdc +29 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/cursor/rules/docs-lookup.mdc +15 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/cursor/rules/e2e-runner.mdc +30 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/cursor/rules/performance-optimizer.mdc +27 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/cursor/rules/planner.mdc +28 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/cursor/rules/refactor-cleaner.mdc +26 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/cursor/rules/reference-lookup.mdc +20 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/cursor/rules/security-reviewer.mdc +20 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/cursor/rules/tdd-guide.mdc +26 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/cursor/rules/typescript-reviewer.mdc +28 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/opencode/agents/architect.md +30 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/opencode/agents/assistant.md +52 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/opencode/agents/build-error-resolver.md +31 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/opencode/agents/client-workflow-bootstrap.md +66 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/opencode/agents/code-reviewer.md +47 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/opencode/agents/contribution-planner.md +44 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/opencode/agents/database-reviewer.md +43 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/opencode/agents/docs-lookup.md +28 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/opencode/agents/e2e-runner.md +33 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/opencode/agents/performance-optimizer.md +34 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/opencode/agents/planner.md +27 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/opencode/agents/refactor-cleaner.md +27 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/opencode/agents/reference-lookup.md +27 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/opencode/agents/security-reviewer.md +27 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/opencode/agents/tdd-guide.md +27 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/opencode/agents/typescript-reviewer.md +30 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/opencode/opencode.json +37 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/pi/skills/architect/skill.md +5 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/pi/skills/assistant/skill.md +3 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/pi/skills/code-reviewer/skill.md +5 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/pi/skills/planner/skill.md +3 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/pi/skills/security-reviewer/skill.md +3 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/windsurf/memories/global_rules.md +74 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/windsurf/rules/architect.mdc +23 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/windsurf/rules/build-error-resolver.mdc +20 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/windsurf/rules/code-reviewer.mdc +21 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/windsurf/rules/database-reviewer.mdc +29 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/windsurf/rules/docs-lookup.mdc +15 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/windsurf/rules/e2e-runner.mdc +30 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/windsurf/rules/performance-optimizer.mdc +27 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/windsurf/rules/planner.mdc +28 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/windsurf/rules/refactor-cleaner.mdc +26 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/windsurf/rules/security-reviewer.mdc +20 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/windsurf/rules/tdd-guide.mdc +26 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/profiles/windsurf/rules/typescript-reviewer.mdc +28 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/core/assistant/SKILL.md +213 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/core/assistant/references/AGENTS_TEMPLATE.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/core/assistant/references/ORCHESTRATION.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/core/assistant/references/REPO_INSPECTION.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/core/dev-companion/SKILL.md +65 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/core/dev-companion/references/LOOP_GUARDRAILS.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/core/onboarding/SKILL.md +119 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/core/output-handshake/SKILL.md +24 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/core/pr-fallback/SKILL.md +33 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/core/pr-fallback/references/pr-body-default.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/core/workspace-knowledge-sync/SKILL.md +141 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/data/dbt-validation/SKILL.md +41 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/data/snowflake-validation/SKILL.md +38 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/adr/SKILL.md +46 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/adr/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/adr/references/example-001-graphql-adoption.md +66 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/agreement/SKILL.md +23 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/agreement/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/agreement/references/example-api-versioning.md +29 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/bug/SKILL.md +25 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/bug/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/bug/references/example-search-filter-bug.md +58 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/decision-log/SKILL.md +27 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/decision-log/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/decision-log/references/example-repository-pattern.md +27 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/development-workflow/SKILL.md +33 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/development-workflow/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/development-workflow/references/default-workflow-checklist.md +44 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/epic/SKILL.md +21 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/epic/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/epic/references/example-unified-dashboard.md +40 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/incident/SKILL.md +23 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/incident/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/incident/references/example-payment-outage.md +62 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/management-unit-assessment/SKILL.md +105 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/management-unit-assessment/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/management-unit-assessment/references/example-team-assessment.md +126 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/meeting-minutes/SKILL.md +24 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/meeting-minutes/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/meeting-minutes/references/example-weekly-sync.md +72 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/planning/SKILL.md +30 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/planning/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/planning/references/example-sprint-planning.md +62 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/prd/SKILL.md +44 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/prd/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/prd/references/example-unified-api.md +71 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/project-assessment/SKILL.md +90 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/project-assessment/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/project-assessment/references/example-platform-assessment.md +122 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/project-assessment-evidence/SKILL.md +88 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/project-assessment-evidence/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/project-assessment-evidence/references/example-evidence-map.md +46 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/spike/SKILL.md +23 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/spike/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/spike/references/example-graphql-federation.md +79 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/task/SKILL.md +20 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/task/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/task/references/example-nav-system.md +33 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/technical-unit-assessment/SKILL.md +58 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/technical-unit-assessment/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/technical-unit-assessment/references/example-frontend-assessment.md +112 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/technical-unit-assessment/references/indicator-groups.md +65 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/trd/SKILL.md +47 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/trd/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/trd/references/example-api-migration.md +122 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/user-story/SKILL.md +20 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/user-story/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/user-story/references/example-advanced-filtering.md +37 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/work-item/SKILL.md +30 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/work-item/references/default-template.md +0 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/work-item/references/example-routing-dashboard.md +23 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/workflow-client-bootstrap/SKILL.md +148 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/workflow-client-bootstrap/questions.yaml +165 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/delivery/workflow-generic-project/SKILL.md +78 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma/LICENSE.txt +2 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma/NOTICE.txt +25 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma/SKILL.md +95 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma/references/figma-mcp-config.md +82 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma/references/figma-tools-and-prompts.md +34 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma-code-connect-components/LICENSE.txt +2 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma-code-connect-components/NOTICE.txt +18 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma-code-connect-components/SKILL.md +350 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma-code-connect-components/references/mapping-checklist.md +7 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma-code-connect-components/scripts/normalize_node_id.py +25 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma-create-design-system-rules/LICENSE.txt +2 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma-create-design-system-rules/NOTICE.txt +19 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma-create-design-system-rules/SKILL.md +550 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma-create-design-system-rules/references/rule-template.md +15 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma-create-design-system-rules/scripts/check_agents_md.sh +9 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma-create-new-file/LICENSE.txt +2 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma-create-new-file/NOTICE.txt +17 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma-create-new-file/SKILL.md +69 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma-implement-design/LICENSE.txt +2 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma-implement-design/NOTICE.txt +19 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/figma-implement-design/SKILL.md +264 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/SKILL.md +60 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/charts.csv +26 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/colors.csv +97 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/icons.csv +101 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/landing.csv +31 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/products.csv +97 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/react-performance.csv +45 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/stacks/react.csv +54 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/styles.csv +68 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/typography.csv +58 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/data/web-interface.csv +31 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/references/pre-delivery-checklist.md +39 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/references/search-reference.md +44 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/references/ui-rules.md +35 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/scripts/core.py +253 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/scripts/design_system.py +1067 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/design/ui-ux-pro-max/scripts/search.py +114 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/forge/gh-address-comments/LICENSE.txt +202 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/forge/gh-address-comments/NOTICE.txt +20 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/forge/gh-address-comments/SKILL.md +69 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/forge/gh-address-comments/scripts/fetch_comments.py +237 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/forge/gh-contribution-planner/SKILL.md +157 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/forge/gh-contribution-planner/scripts/inspect_contributions.py +800 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/forge/gh-fix-ci/LICENSE.txt +201 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/forge/gh-fix-ci/NOTICE.txt +20 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/forge/gh-fix-ci/SKILL.md +71 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/forge/gh-fix-ci/scripts/inspect_pr_checks.py +509 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/forge/github-cli-workflow/SKILL.md +49 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/forge/gitlab-cli-workflow/SKILL.md +44 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/forge/workflow-client-bootstrap/SKILL.md +14 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/forge/workflow-generic-project/SKILL.md +14 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/integrations/clickup-cli/SKILL.md +75 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/integrations/clickup-cli/references/docs-management.md +57 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/integrations/clickup-cli/references/task-management.md +131 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/integrations/clickup-cli/references/time-tracking.md +38 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/integrations/linear/LICENSE.txt +202 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/integrations/linear/NOTICE.txt +23 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/integrations/linear/SKILL.md +131 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/integrations/slack-assistant/SKILL.md +134 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/integrations/slack-cli/SKILL.md +105 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/integrations/slack-cli/references/INSTALLATION.md +42 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/loops/loop-runner/SKILL.md +90 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/ops/docs-generator/SKILL.md +81 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/ops/llm-cost-advisor/SKILL.md +83 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/ops/triage/SKILL.md +117 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/tooling/jupyter-notebook/LICENSE.txt +201 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/tooling/jupyter-notebook/NOTICE.txt +27 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/tooling/jupyter-notebook/SKILL.md +142 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/tooling/jupyter-notebook/assets/experiment-template.ipynb +110 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/tooling/jupyter-notebook/assets/tutorial-template.ipynb +107 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/tooling/jupyter-notebook/references/experiment-patterns.md +10 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/tooling/jupyter-notebook/references/notebook-structure.md +17 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/tooling/jupyter-notebook/references/quality-checklist.md +11 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/tooling/jupyter-notebook/references/tutorial-patterns.md +9 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/tooling/jupyter-notebook/scripts/new_notebook.py +130 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/tooling/playwright-cli/LICENSE.txt +201 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/tooling/playwright-cli/NOTICE.txt +29 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/tooling/playwright-cli/SKILL.md +151 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/tooling/playwright-cli/references/cli.md +116 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/tooling/playwright-cli/references/workflows.md +98 -0
- agent_toolkit_cli-1.0.3.data/data/agent_toolkit/data/skills/tooling/playwright-cli/scripts/executable_playwright_cli.sh +25 -0
- agent_toolkit_cli-1.0.3.dist-info/METADATA +411 -0
- agent_toolkit_cli-1.0.3.dist-info/RECORD +310 -0
- agent_toolkit_cli-1.0.3.dist-info/WHEEL +4 -0
- agent_toolkit_cli-1.0.3.dist-info/entry_points.txt +2 -0
- agent_toolkit_cli-1.0.3.dist-info/licenses/LICENSE +21 -0
agent_toolkit/cli/mcp.py
ADDED
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
"""
|
|
2
|
+
mcp — MCP (Model Context Protocol) provider management.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
agent-toolkit mcp <subcommand> [args]
|
|
6
|
+
|
|
7
|
+
Subcommands:
|
|
8
|
+
list List available MCP providers
|
|
9
|
+
setup <provider> Interactive wizard to configure a provider
|
|
10
|
+
doctor [provider] Check env vars and connectivity for provider(s)
|
|
11
|
+
|
|
12
|
+
Options:
|
|
13
|
+
--help Show this help message
|
|
14
|
+
"""
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import json
|
|
18
|
+
import os
|
|
19
|
+
import re
|
|
20
|
+
import sys
|
|
21
|
+
import urllib.request
|
|
22
|
+
from datetime import datetime, timezone
|
|
23
|
+
from pathlib import Path
|
|
24
|
+
from agent_toolkit._paths import toolkit_root
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# ---------------------------------------------------------------------------
|
|
28
|
+
# Toolkit directory & config paths
|
|
29
|
+
# ---------------------------------------------------------------------------
|
|
30
|
+
|
|
31
|
+
def toolkit_root() -> Path | None:
|
|
32
|
+
candidate = Path(__file__).resolve()
|
|
33
|
+
for _ in range(10):
|
|
34
|
+
candidate = candidate.parent
|
|
35
|
+
if (candidate / "profiles").is_dir():
|
|
36
|
+
return candidate
|
|
37
|
+
return None
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _mcp_config_path() -> Path:
|
|
41
|
+
return Path.home() / ".config" / "agent-toolkit" / "mcp-config.json"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _templates_dir(toolkit_dir: Path) -> Path:
|
|
45
|
+
return toolkit_dir / "mcp" / "templates"
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
# ---------------------------------------------------------------------------
|
|
49
|
+
# Config I/O
|
|
50
|
+
# ---------------------------------------------------------------------------
|
|
51
|
+
|
|
52
|
+
def _load_config() -> dict:
|
|
53
|
+
path = _mcp_config_path()
|
|
54
|
+
if not path.exists():
|
|
55
|
+
return {"providers": {}}
|
|
56
|
+
try:
|
|
57
|
+
return json.loads(path.read_text())
|
|
58
|
+
except (json.JSONDecodeError, OSError):
|
|
59
|
+
return {"providers": {}}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _save_config(cfg: dict) -> None:
|
|
63
|
+
path = _mcp_config_path()
|
|
64
|
+
try:
|
|
65
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
66
|
+
path.write_text(json.dumps(cfg, indent=2) + "\n")
|
|
67
|
+
except (PermissionError, OSError) as exc:
|
|
68
|
+
print(f" ✗ Failed to save config: {exc}", file=sys.stderr)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# ---------------------------------------------------------------------------
|
|
72
|
+
# Template parsing
|
|
73
|
+
# ---------------------------------------------------------------------------
|
|
74
|
+
|
|
75
|
+
def _extract_env_vars(template: dict) -> list[str]:
|
|
76
|
+
"""Extract ${ENV_VAR} names from all string values in a dict (recursive)."""
|
|
77
|
+
pattern = re.compile(r"\$\{([A-Za-z_][A-Za-z0-9_]*)\}")
|
|
78
|
+
found: list[str] = []
|
|
79
|
+
|
|
80
|
+
def _walk(obj: object) -> None:
|
|
81
|
+
if isinstance(obj, str):
|
|
82
|
+
for m in pattern.finditer(obj):
|
|
83
|
+
name = m.group(1)
|
|
84
|
+
if name not in found:
|
|
85
|
+
found.append(name)
|
|
86
|
+
elif isinstance(obj, dict):
|
|
87
|
+
for v in obj.values():
|
|
88
|
+
_walk(v)
|
|
89
|
+
elif isinstance(obj, list):
|
|
90
|
+
for item in obj:
|
|
91
|
+
_walk(item)
|
|
92
|
+
|
|
93
|
+
_walk(template)
|
|
94
|
+
return found
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def _load_template(templates_dir: Path, provider: str) -> dict | None:
|
|
98
|
+
"""Load and parse a provider's config.template.json."""
|
|
99
|
+
template_file = templates_dir / provider / "config.template.json"
|
|
100
|
+
if not template_file.exists():
|
|
101
|
+
return None
|
|
102
|
+
try:
|
|
103
|
+
return json.loads(template_file.read_text())
|
|
104
|
+
except (json.JSONDecodeError, OSError) as exc:
|
|
105
|
+
print(f" ✗ Cannot read template {template_file}: {exc}", file=sys.stderr)
|
|
106
|
+
return None
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def _load_readme(templates_dir: Path, provider: str) -> str:
|
|
110
|
+
readme = templates_dir / provider / "README.md"
|
|
111
|
+
if readme.exists():
|
|
112
|
+
try:
|
|
113
|
+
return readme.read_text().strip()
|
|
114
|
+
except OSError:
|
|
115
|
+
pass
|
|
116
|
+
return ""
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
# ---------------------------------------------------------------------------
|
|
120
|
+
# Connectivity tests
|
|
121
|
+
# ---------------------------------------------------------------------------
|
|
122
|
+
|
|
123
|
+
def _test_github(token: str) -> tuple[bool, str]:
|
|
124
|
+
try:
|
|
125
|
+
req = urllib.request.Request("https://api.github.com/user")
|
|
126
|
+
req.add_header("Authorization", f"Bearer {token}")
|
|
127
|
+
req.add_header("User-Agent", "agent-toolkit-mcp/1")
|
|
128
|
+
with urllib.request.urlopen(req, timeout=8) as resp:
|
|
129
|
+
data = json.loads(resp.read())
|
|
130
|
+
return True, f"Authenticated as: {data.get('login', 'unknown')}"
|
|
131
|
+
except urllib.error.HTTPError as exc:
|
|
132
|
+
return False, f"HTTP {exc.code}: {exc.reason}"
|
|
133
|
+
except Exception as exc:
|
|
134
|
+
return False, str(exc)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def _test_connectivity(provider: str, env_vals: dict[str, str]) -> tuple[bool, str]:
|
|
138
|
+
"""Run a lightweight connectivity test if we know how for this provider."""
|
|
139
|
+
if provider == "github":
|
|
140
|
+
token = env_vals.get("GITHUB_TOKEN", "")
|
|
141
|
+
if token:
|
|
142
|
+
return _test_github(token)
|
|
143
|
+
return False, "GITHUB_TOKEN not provided"
|
|
144
|
+
# For other providers we just confirm env vars are set
|
|
145
|
+
return True, "env vars provided (connectivity test not available for this provider)"
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
# ---------------------------------------------------------------------------
|
|
149
|
+
# Subcommands
|
|
150
|
+
# ---------------------------------------------------------------------------
|
|
151
|
+
|
|
152
|
+
def _cmd_list(toolkit_dir: Path | None) -> int:
|
|
153
|
+
"""List available MCP providers from mcp/templates/."""
|
|
154
|
+
if toolkit_dir is None:
|
|
155
|
+
print(" ✗ Cannot locate toolkit directory", file=sys.stderr)
|
|
156
|
+
return 1
|
|
157
|
+
|
|
158
|
+
tdir = _templates_dir(toolkit_dir)
|
|
159
|
+
if not tdir.is_dir():
|
|
160
|
+
print(f" ✗ MCP templates directory not found: {tdir}", file=sys.stderr)
|
|
161
|
+
return 1
|
|
162
|
+
|
|
163
|
+
providers = sorted(p.name for p in tdir.iterdir() if p.is_dir())
|
|
164
|
+
if not providers:
|
|
165
|
+
print(" ⚠ No MCP provider templates found")
|
|
166
|
+
return 0
|
|
167
|
+
|
|
168
|
+
cfg = _load_config()
|
|
169
|
+
configured = cfg.get("providers", {})
|
|
170
|
+
|
|
171
|
+
print()
|
|
172
|
+
print("Available MCP providers")
|
|
173
|
+
print()
|
|
174
|
+
col_name = max(len(p) for p in providers) + 2
|
|
175
|
+
|
|
176
|
+
header = f" {'Provider':<{col_name}} {'Status':<12} Required env vars"
|
|
177
|
+
print(header)
|
|
178
|
+
print(" " + "-" * (len(header) - 2))
|
|
179
|
+
|
|
180
|
+
for provider in providers:
|
|
181
|
+
template = _load_template(tdir, provider)
|
|
182
|
+
env_vars = _extract_env_vars(template) if template else []
|
|
183
|
+
env_str = ", ".join(env_vars) if env_vars else "(none)"
|
|
184
|
+
|
|
185
|
+
prov_cfg = configured.get(provider, {})
|
|
186
|
+
if prov_cfg.get("enabled"):
|
|
187
|
+
status = "✓ configured"
|
|
188
|
+
elif prov_cfg:
|
|
189
|
+
status = "- disabled"
|
|
190
|
+
else:
|
|
191
|
+
status = " not setup"
|
|
192
|
+
|
|
193
|
+
print(f" {provider:<{col_name}} {status:<12} {env_str}")
|
|
194
|
+
|
|
195
|
+
print()
|
|
196
|
+
print("Run: agent-toolkit mcp setup <provider>")
|
|
197
|
+
print()
|
|
198
|
+
return 0
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
def _cmd_setup(provider: str, toolkit_dir: Path | None) -> int:
|
|
202
|
+
"""Interactive wizard to configure an MCP provider."""
|
|
203
|
+
if toolkit_dir is None:
|
|
204
|
+
print(" ✗ Cannot locate toolkit directory", file=sys.stderr)
|
|
205
|
+
return 1
|
|
206
|
+
|
|
207
|
+
tdir = _templates_dir(toolkit_dir)
|
|
208
|
+
template = _load_template(tdir, provider)
|
|
209
|
+
if template is None:
|
|
210
|
+
providers = sorted(p.name for p in tdir.iterdir() if p.is_dir()) if tdir.is_dir() else []
|
|
211
|
+
print(f" ✗ Provider '{provider}' not found.", file=sys.stderr)
|
|
212
|
+
if providers:
|
|
213
|
+
print(f" Available: {', '.join(providers)}", file=sys.stderr)
|
|
214
|
+
return 1
|
|
215
|
+
|
|
216
|
+
env_vars = _extract_env_vars(template)
|
|
217
|
+
readme = _load_readme(tdir, provider)
|
|
218
|
+
|
|
219
|
+
print()
|
|
220
|
+
print(f"MCP setup: {provider}")
|
|
221
|
+
print()
|
|
222
|
+
|
|
223
|
+
if readme:
|
|
224
|
+
# Print the first paragraph of the README as a hint
|
|
225
|
+
first_para = readme.split("\n\n")[0]
|
|
226
|
+
for line in first_para.splitlines():
|
|
227
|
+
print(f" {line}")
|
|
228
|
+
print()
|
|
229
|
+
|
|
230
|
+
if not env_vars:
|
|
231
|
+
print(" ⚠ No environment variables required for this provider.")
|
|
232
|
+
else:
|
|
233
|
+
print(f" Required env vars: {', '.join(env_vars)}")
|
|
234
|
+
print()
|
|
235
|
+
|
|
236
|
+
# Collect env var values
|
|
237
|
+
import getpass
|
|
238
|
+
env_vals: dict[str, str] = {}
|
|
239
|
+
token_words = ("TOKEN", "KEY", "SECRET", "PASSWORD", "PASS")
|
|
240
|
+
|
|
241
|
+
for var in env_vars:
|
|
242
|
+
current = os.environ.get(var, "")
|
|
243
|
+
is_sensitive = any(w in var.upper() for w in token_words)
|
|
244
|
+
|
|
245
|
+
if current:
|
|
246
|
+
hint = f"[already set in env"
|
|
247
|
+
if is_sensitive:
|
|
248
|
+
hint += ", press Enter to keep]"
|
|
249
|
+
else:
|
|
250
|
+
hint += f" = {current!r}, press Enter to keep]"
|
|
251
|
+
else:
|
|
252
|
+
hint = "[required]"
|
|
253
|
+
|
|
254
|
+
prompt = f" {var} {hint}: "
|
|
255
|
+
|
|
256
|
+
try:
|
|
257
|
+
if is_sensitive:
|
|
258
|
+
value = getpass.getpass(prompt) or current
|
|
259
|
+
else:
|
|
260
|
+
value = input(prompt).strip() or current
|
|
261
|
+
except (EOFError, KeyboardInterrupt):
|
|
262
|
+
print()
|
|
263
|
+
print(" ⚠ Setup cancelled")
|
|
264
|
+
return 1
|
|
265
|
+
|
|
266
|
+
env_vals[var] = value
|
|
267
|
+
|
|
268
|
+
# Validate / test connectivity
|
|
269
|
+
print()
|
|
270
|
+
print(" Testing connectivity...")
|
|
271
|
+
ok, detail = _test_connectivity(provider, env_vals)
|
|
272
|
+
if ok:
|
|
273
|
+
print(f" ✓ {detail}")
|
|
274
|
+
else:
|
|
275
|
+
print(f" ⚠ Connectivity check failed: {detail}")
|
|
276
|
+
print(" Saving configuration anyway — double-check your credentials.")
|
|
277
|
+
|
|
278
|
+
# Save config: store env var names (not plaintext values)
|
|
279
|
+
cfg = _load_config()
|
|
280
|
+
cfg.setdefault("providers", {})[provider] = {
|
|
281
|
+
"enabled": True,
|
|
282
|
+
"required_env": env_vars,
|
|
283
|
+
"validated_at": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"),
|
|
284
|
+
}
|
|
285
|
+
_save_config(cfg)
|
|
286
|
+
print(f" ✓ Saved to {_mcp_config_path()}")
|
|
287
|
+
print()
|
|
288
|
+
|
|
289
|
+
# Next steps per tool
|
|
290
|
+
print("── Next steps ──")
|
|
291
|
+
print()
|
|
292
|
+
print(" Export env vars in your shell profile (e.g. ~/.zshrc / ~/.bashrc):")
|
|
293
|
+
print()
|
|
294
|
+
for var in env_vars:
|
|
295
|
+
print(f" export {var}=\"<your-value>\"")
|
|
296
|
+
print()
|
|
297
|
+
print(" Then configure each AI tool:")
|
|
298
|
+
print(" Claude Code → add MCP server to ~/.claude/settings.json")
|
|
299
|
+
print(" Cursor → add MCP server in Cursor Settings → MCP")
|
|
300
|
+
print(" OpenCode → add entry to ~/.config/opencode/opencode.json")
|
|
301
|
+
print()
|
|
302
|
+
print(f" See: mcp/templates/{provider}/README.md for full instructions")
|
|
303
|
+
print()
|
|
304
|
+
return 0
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
def _cmd_doctor_provider(provider: str, toolkit_dir: Path | None) -> tuple[int, int, int]:
|
|
308
|
+
"""Check a single provider. Returns (ok, warn, err) counts."""
|
|
309
|
+
n_ok = n_warn = n_err = 0
|
|
310
|
+
|
|
311
|
+
if toolkit_dir:
|
|
312
|
+
tdir = _templates_dir(toolkit_dir)
|
|
313
|
+
template = _load_template(tdir, provider)
|
|
314
|
+
env_vars = _extract_env_vars(template) if template else []
|
|
315
|
+
else:
|
|
316
|
+
env_vars = []
|
|
317
|
+
|
|
318
|
+
cfg = _load_config()
|
|
319
|
+
prov_cfg = cfg.get("providers", {}).get(provider, {})
|
|
320
|
+
if not prov_cfg:
|
|
321
|
+
print(f" ⚠ {provider}: not configured (run: agent-toolkit mcp setup {provider})")
|
|
322
|
+
n_warn += 1
|
|
323
|
+
else:
|
|
324
|
+
enabled = prov_cfg.get("enabled", False)
|
|
325
|
+
validated = prov_cfg.get("validated_at", "never")
|
|
326
|
+
icon = "✓" if enabled else "⚠"
|
|
327
|
+
print(f" {icon} {provider}: enabled={enabled}, validated_at={validated}")
|
|
328
|
+
if enabled:
|
|
329
|
+
n_ok += 1
|
|
330
|
+
else:
|
|
331
|
+
n_warn += 1
|
|
332
|
+
|
|
333
|
+
# Check env vars
|
|
334
|
+
for var in env_vars:
|
|
335
|
+
if os.environ.get(var):
|
|
336
|
+
print(f" ✓ {var}: set")
|
|
337
|
+
n_ok += 1
|
|
338
|
+
else:
|
|
339
|
+
print(f" ✗ {var}: not set in environment")
|
|
340
|
+
n_err += 1
|
|
341
|
+
|
|
342
|
+
# Connectivity test
|
|
343
|
+
env_vals = {v: os.environ.get(v, "") for v in env_vars}
|
|
344
|
+
if all(env_vals.values()):
|
|
345
|
+
ok, detail = _test_connectivity(provider, env_vals)
|
|
346
|
+
if ok:
|
|
347
|
+
print(f" ✓ connectivity: {detail}")
|
|
348
|
+
n_ok += 1
|
|
349
|
+
else:
|
|
350
|
+
print(f" ⚠ connectivity: {detail}")
|
|
351
|
+
n_warn += 1
|
|
352
|
+
|
|
353
|
+
return n_ok, n_warn, n_err
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
def _cmd_doctor(providers_arg: list[str], toolkit_dir: Path | None) -> int:
|
|
357
|
+
"""Check MCP provider configuration and connectivity."""
|
|
358
|
+
cfg = _load_config()
|
|
359
|
+
configured_providers = list(cfg.get("providers", {}).keys())
|
|
360
|
+
|
|
361
|
+
if providers_arg:
|
|
362
|
+
targets = providers_arg
|
|
363
|
+
elif configured_providers:
|
|
364
|
+
targets = configured_providers
|
|
365
|
+
else:
|
|
366
|
+
print(" ⚠ No MCP providers configured. Run: agent-toolkit mcp list")
|
|
367
|
+
return 0
|
|
368
|
+
|
|
369
|
+
print()
|
|
370
|
+
print("MCP doctor")
|
|
371
|
+
|
|
372
|
+
total_ok = total_warn = total_err = 0
|
|
373
|
+
for provider in targets:
|
|
374
|
+
print(f"\n── {provider} ──")
|
|
375
|
+
n_ok, n_warn, n_err = _cmd_doctor_provider(provider, toolkit_dir)
|
|
376
|
+
total_ok += n_ok
|
|
377
|
+
total_warn += n_warn
|
|
378
|
+
total_err += n_err
|
|
379
|
+
|
|
380
|
+
print()
|
|
381
|
+
print(f"── Summary: {total_ok} ok, {total_warn} warnings, {total_err} errors ──")
|
|
382
|
+
print()
|
|
383
|
+
return 1 if total_err else 0
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
# ---------------------------------------------------------------------------
|
|
387
|
+
# Argument parsing & dispatch
|
|
388
|
+
# ---------------------------------------------------------------------------
|
|
389
|
+
|
|
390
|
+
def cmd_mcp(args: list[str]) -> int:
|
|
391
|
+
"""MCP provider management entry point.
|
|
392
|
+
|
|
393
|
+
Returns 0 on success, 1 on failure.
|
|
394
|
+
"""
|
|
395
|
+
if not args or args[0] in ("-h", "--help"):
|
|
396
|
+
print(__doc__)
|
|
397
|
+
return 0
|
|
398
|
+
|
|
399
|
+
toolkit_dir = toolkit_root()
|
|
400
|
+
subcommand = args[0]
|
|
401
|
+
rest = args[1:]
|
|
402
|
+
|
|
403
|
+
if subcommand == "list":
|
|
404
|
+
return _cmd_list(toolkit_dir)
|
|
405
|
+
|
|
406
|
+
elif subcommand == "setup":
|
|
407
|
+
if not rest:
|
|
408
|
+
print(" ✗ Usage: agent-toolkit mcp setup <provider>", file=sys.stderr)
|
|
409
|
+
return 1
|
|
410
|
+
return _cmd_setup(rest[0], toolkit_dir)
|
|
411
|
+
|
|
412
|
+
elif subcommand == "doctor":
|
|
413
|
+
return _cmd_doctor(rest, toolkit_dir)
|
|
414
|
+
|
|
415
|
+
else:
|
|
416
|
+
print(f" ✗ Unknown subcommand: {subcommand}", file=sys.stderr)
|
|
417
|
+
print(" Valid subcommands: list, setup, doctor", file=sys.stderr)
|
|
418
|
+
return 1
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
"""
|
|
2
|
+
plugin — Plugin bundle management for agent-toolkit.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
agent-toolkit plugin <subcommand>
|
|
6
|
+
|
|
7
|
+
Subcommands:
|
|
8
|
+
sync Sync canonical agents/skills into plugin bundles
|
|
9
|
+
check Verify plugin bundles are in sync (exit 1 if drift)
|
|
10
|
+
|
|
11
|
+
Options:
|
|
12
|
+
--help Show this help message
|
|
13
|
+
"""
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import filecmp
|
|
17
|
+
import shutil
|
|
18
|
+
import sys
|
|
19
|
+
from pathlib import Path
|
|
20
|
+
from agent_toolkit._paths import toolkit_root
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# ---------------------------------------------------------------------------
|
|
24
|
+
# Toolkit directory resolution
|
|
25
|
+
# ---------------------------------------------------------------------------
|
|
26
|
+
|
|
27
|
+
def toolkit_root() -> Path | None:
|
|
28
|
+
candidate = Path(__file__).resolve()
|
|
29
|
+
for _ in range(10):
|
|
30
|
+
candidate = candidate.parent
|
|
31
|
+
if (candidate / "profiles").is_dir():
|
|
32
|
+
return candidate
|
|
33
|
+
return None
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# ---------------------------------------------------------------------------
|
|
37
|
+
# gen-surfaces logic (inlined from scripts/gen-surfaces.py)
|
|
38
|
+
# ---------------------------------------------------------------------------
|
|
39
|
+
|
|
40
|
+
def _build_surfaces(toolkit_dir: Path) -> dict[str, list[tuple[str, str]]]:
|
|
41
|
+
"""Return the plugin→surfaces mapping, mirroring scripts/gen-surfaces.py."""
|
|
42
|
+
agents_dir = toolkit_dir / "agents"
|
|
43
|
+
skills_dir = toolkit_dir / "skills"
|
|
44
|
+
|
|
45
|
+
surfaces: dict[str, list[tuple[str, str]]] = {
|
|
46
|
+
"agent-toolkit-core": [
|
|
47
|
+
("agents/code-reviewer", "agents/code-reviewer"),
|
|
48
|
+
("skills/core/assistant", "skills/assistant"),
|
|
49
|
+
("skills/core/dev-companion", "skills/dev-companion"),
|
|
50
|
+
("skills/core/output-handshake", "skills/output-handshake"),
|
|
51
|
+
("skills/core/pr-fallback", "skills/pr-fallback"),
|
|
52
|
+
("skills/core/workspace-knowledge-sync", "skills/workspace-knowledge-sync"),
|
|
53
|
+
("skills/core/onboarding", "skills/onboarding"),
|
|
54
|
+
],
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
# agent-toolkit-agents: one entry per agent directory
|
|
58
|
+
if agents_dir.is_dir():
|
|
59
|
+
surfaces["agent-toolkit-agents"] = [
|
|
60
|
+
(f"agents/{d.name}", f"agents/{d.name}")
|
|
61
|
+
for d in sorted(agents_dir.iterdir()) if d.is_dir()
|
|
62
|
+
]
|
|
63
|
+
else:
|
|
64
|
+
surfaces["agent-toolkit-agents"] = []
|
|
65
|
+
|
|
66
|
+
# agent-toolkit-forge: one entry per forge skill directory
|
|
67
|
+
forge_dir = skills_dir / "forge"
|
|
68
|
+
if forge_dir.is_dir():
|
|
69
|
+
surfaces["agent-toolkit-forge"] = [
|
|
70
|
+
(f"skills/forge/{d.name}", f"skills/{d.name}")
|
|
71
|
+
for d in sorted(forge_dir.iterdir()) if d.is_dir()
|
|
72
|
+
]
|
|
73
|
+
else:
|
|
74
|
+
surfaces["agent-toolkit-forge"] = []
|
|
75
|
+
|
|
76
|
+
return surfaces
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def _dirs_in_sync(src: Path, dst: Path) -> bool:
|
|
80
|
+
"""Recursively compare two directories. Return True if identical."""
|
|
81
|
+
if not dst.exists():
|
|
82
|
+
return False
|
|
83
|
+
cmp = filecmp.dircmp(src, dst)
|
|
84
|
+
if cmp.left_only or cmp.right_only or cmp.diff_files:
|
|
85
|
+
return False
|
|
86
|
+
return all(_dirs_in_sync(src / sub, dst / sub) for sub in cmp.common_dirs)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def _sync_surface(
|
|
90
|
+
src: Path,
|
|
91
|
+
dst: Path,
|
|
92
|
+
toolkit_dir: Path,
|
|
93
|
+
*,
|
|
94
|
+
check: bool,
|
|
95
|
+
) -> bool:
|
|
96
|
+
"""Sync or check a single surface directory.
|
|
97
|
+
|
|
98
|
+
In check mode returns False on drift.
|
|
99
|
+
In sync mode returns True after syncing (or skip if source missing).
|
|
100
|
+
"""
|
|
101
|
+
if not src.exists():
|
|
102
|
+
return True # source gone, silently skip
|
|
103
|
+
|
|
104
|
+
in_sync = _dirs_in_sync(src, dst)
|
|
105
|
+
if in_sync:
|
|
106
|
+
return True
|
|
107
|
+
|
|
108
|
+
if check:
|
|
109
|
+
try:
|
|
110
|
+
src_rel = src.relative_to(toolkit_dir)
|
|
111
|
+
dst_rel = dst.relative_to(toolkit_dir)
|
|
112
|
+
except ValueError:
|
|
113
|
+
src_rel, dst_rel = src, dst
|
|
114
|
+
print(f" ✗ DRIFT: {src_rel} → {dst_rel}")
|
|
115
|
+
return False
|
|
116
|
+
|
|
117
|
+
# Sync
|
|
118
|
+
try:
|
|
119
|
+
if dst.exists():
|
|
120
|
+
shutil.rmtree(dst)
|
|
121
|
+
shutil.copytree(src, dst)
|
|
122
|
+
try:
|
|
123
|
+
src_rel = src.relative_to(toolkit_dir)
|
|
124
|
+
dst_rel = dst.relative_to(toolkit_dir)
|
|
125
|
+
except ValueError:
|
|
126
|
+
src_rel, dst_rel = src, dst
|
|
127
|
+
print(f" ✓ synced: {src_rel} → {dst_rel}")
|
|
128
|
+
return True
|
|
129
|
+
except (PermissionError, OSError) as exc:
|
|
130
|
+
print(f" ✗ Failed to sync {src} → {dst}: {exc}", file=sys.stderr)
|
|
131
|
+
return False
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def _run_gen_surfaces(toolkit_dir: Path, *, check: bool) -> int:
|
|
135
|
+
"""Run the full surface sync/check logic.
|
|
136
|
+
|
|
137
|
+
Returns 0 on success, 1 if any drift or errors.
|
|
138
|
+
"""
|
|
139
|
+
plugins_dir = toolkit_dir / "plugins"
|
|
140
|
+
surfaces = _build_surfaces(toolkit_dir)
|
|
141
|
+
|
|
142
|
+
mode = "checking" if check else "syncing"
|
|
143
|
+
mode_icon = "🔍" if check else "🔄"
|
|
144
|
+
print(f"\n{mode_icon} plugin bundles ({mode})...\n")
|
|
145
|
+
|
|
146
|
+
drift = False
|
|
147
|
+
for plugin_name, surface_pairs in surfaces.items():
|
|
148
|
+
plugin_dir = plugins_dir / plugin_name
|
|
149
|
+
if not plugin_dir.exists():
|
|
150
|
+
print(f" ⚠ Plugin dir missing: {plugin_name}")
|
|
151
|
+
continue
|
|
152
|
+
|
|
153
|
+
print(f"── {plugin_name} ──")
|
|
154
|
+
for src_rel, dst_rel in surface_pairs:
|
|
155
|
+
src = toolkit_dir / src_rel
|
|
156
|
+
dst = plugin_dir / dst_rel
|
|
157
|
+
ok = _sync_surface(src, dst, toolkit_dir, check=check)
|
|
158
|
+
if not ok:
|
|
159
|
+
drift = True
|
|
160
|
+
print()
|
|
161
|
+
|
|
162
|
+
if drift:
|
|
163
|
+
print(" ✗ Plugin surfaces are out of sync")
|
|
164
|
+
if check:
|
|
165
|
+
print(" Run: agent-toolkit plugin sync")
|
|
166
|
+
return 1
|
|
167
|
+
|
|
168
|
+
print(" ✓ All plugin surfaces are in sync!")
|
|
169
|
+
return 0
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
# ---------------------------------------------------------------------------
|
|
173
|
+
# Subcommands
|
|
174
|
+
# ---------------------------------------------------------------------------
|
|
175
|
+
|
|
176
|
+
def _cmd_sync(toolkit_dir: Path) -> int:
|
|
177
|
+
"""Sync canonical agents/skills into plugin bundles."""
|
|
178
|
+
return _run_gen_surfaces(toolkit_dir, check=False)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
def _cmd_check(toolkit_dir: Path) -> int:
|
|
182
|
+
"""Verify plugin bundles are in sync. Exit 1 if drift detected."""
|
|
183
|
+
return _run_gen_surfaces(toolkit_dir, check=True)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
# ---------------------------------------------------------------------------
|
|
187
|
+
# Argument parsing & dispatch
|
|
188
|
+
# ---------------------------------------------------------------------------
|
|
189
|
+
|
|
190
|
+
def cmd_plugin(args: list[str]) -> int:
|
|
191
|
+
"""Plugin bundle management entry point.
|
|
192
|
+
|
|
193
|
+
Returns 0 on success, 1 on failure or drift.
|
|
194
|
+
"""
|
|
195
|
+
if not args or args[0] in ("-h", "--help"):
|
|
196
|
+
print(__doc__)
|
|
197
|
+
return 0
|
|
198
|
+
|
|
199
|
+
toolkit_dir = toolkit_root()
|
|
200
|
+
if toolkit_dir is None:
|
|
201
|
+
print(" ✗ Cannot locate toolkit directory", file=sys.stderr)
|
|
202
|
+
return 1
|
|
203
|
+
|
|
204
|
+
subcommand = args[0]
|
|
205
|
+
|
|
206
|
+
if subcommand == "sync":
|
|
207
|
+
return _cmd_sync(toolkit_dir)
|
|
208
|
+
elif subcommand == "check":
|
|
209
|
+
return _cmd_check(toolkit_dir)
|
|
210
|
+
else:
|
|
211
|
+
print(f" ✗ Unknown subcommand: {subcommand}", file=sys.stderr)
|
|
212
|
+
print(" Valid subcommands: sync, check", file=sys.stderr)
|
|
213
|
+
return 1
|