agent-toolkit-cli 1.11.0__py3-none-win_amd64.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 +5 -0
- agent_toolkit/_paths.py +145 -0
- agent_toolkit/bin/.gitkeep +0 -0
- agent_toolkit/bin/agent-toolkit.exe +0 -0
- agent_toolkit/cli/__init__.py +0 -0
- agent_toolkit/cli/__main__.py +5 -0
- agent_toolkit/cli/build.py +278 -0
- agent_toolkit/cli/completion.py +297 -0
- agent_toolkit/cli/context_budget.py +455 -0
- agent_toolkit/cli/devcompanion.py +923 -0
- agent_toolkit/cli/devcompanion_queue.py +235 -0
- agent_toolkit/cli/diff.py +176 -0
- agent_toolkit/cli/doctor.py +1052 -0
- agent_toolkit/cli/insights.py +771 -0
- agent_toolkit/cli/install.py +706 -0
- agent_toolkit/cli/main.py +171 -0
- agent_toolkit/cli/mcp.py +537 -0
- agent_toolkit/cli/memory.py +739 -0
- agent_toolkit/cli/plugin.py +224 -0
- agent_toolkit/cli/project.py +459 -0
- agent_toolkit/cli/release.py +178 -0
- agent_toolkit/cli/skills.py +461 -0
- agent_toolkit/cli/uninstall.py +166 -0
- agent_toolkit/cli/update.py +298 -0
- agent_toolkit/cli/workspace.py +1713 -0
- agent_toolkit/compiler/hook_registry.py +110 -0
- agent_toolkit/compiler/loader.py +338 -0
- agent_toolkit/compiler/mcp_registry.py +87 -0
- agent_toolkit/compiler/model.py +182 -0
- agent_toolkit/compiler/provenance.py +140 -0
- agent_toolkit/compiler/registry_emit.py +263 -0
- agent_toolkit/compiler/target_registry.py +122 -0
- agent_toolkit/compiler/targets/__init__.py +1 -0
- agent_toolkit/compiler/targets/agent_plugins.py +160 -0
- agent_toolkit/compiler/targets/base.py +229 -0
- agent_toolkit/compiler/targets/claude_code.py +241 -0
- agent_toolkit/compiler/targets/codex.py +261 -0
- agent_toolkit/compiler/targets/copilot.py +275 -0
- agent_toolkit/compiler/targets/cursor.py +207 -0
- agent_toolkit/compiler/targets/gemini_cli.py +213 -0
- agent_toolkit/compiler/targets/muse_code.py +113 -0
- agent_toolkit/compiler/targets/opencode.py +204 -0
- agent_toolkit/compiler/targets/pi.py +263 -0
- agent_toolkit/compiler/targets/windsurf.py +267 -0
- agent_toolkit/compiler/tool_mapping.py +83 -0
- agent_toolkit/data/.gitignore +4 -0
- agent_toolkit/data/__init__.py +1 -0
- agent_toolkit/data/agents/agentic-security-reviewer/AGENT.md +60 -0
- agent_toolkit/data/agents/architect/AGENT.md +30 -0
- agent_toolkit/data/agents/assistant/AGENT.md +59 -0
- agent_toolkit/data/agents/build-error-resolver/AGENT.md +30 -0
- agent_toolkit/data/agents/client-workflow-bootstrap/AGENT.md +60 -0
- agent_toolkit/data/agents/code-reviewer/AGENT.md +49 -0
- agent_toolkit/data/agents/database-reviewer/AGENT.md +44 -0
- agent_toolkit/data/agents/docs-lookup/AGENT.md +28 -0
- agent_toolkit/data/agents/e2e-runner/AGENT.md +38 -0
- agent_toolkit/data/agents/performance-optimizer/AGENT.md +52 -0
- agent_toolkit/data/agents/planner/AGENT.md +41 -0
- agent_toolkit/data/agents/refactor-cleaner/AGENT.md +43 -0
- agent_toolkit/data/agents/reference-lookup/AGENT.md +33 -0
- agent_toolkit/data/agents/security-reviewer/AGENT.md +47 -0
- agent_toolkit/data/agents/tdd-guide/AGENT.md +58 -0
- agent_toolkit/data/agents/tech-assistant/AGENT.md +11 -0
- agent_toolkit/data/agents/typescript-reviewer/AGENT.md +61 -0
- agent_toolkit/data/capabilities/hooks/README.md +6 -0
- agent_toolkit/data/capabilities/hooks/pre-commit-validate.yaml +26 -0
- agent_toolkit/data/capabilities/hooks/scripts/pre-commit-validate.sh +41 -0
- agent_toolkit/data/capabilities/hooks/scripts/session-start-context.sh +11 -0
- agent_toolkit/data/capabilities/hooks/session-start-context.yaml +23 -0
- agent_toolkit/data/capabilities/targets/registry.yaml +90 -0
- agent_toolkit/data/capabilities/upstream.lock +118 -0
- agent_toolkit/data/catalogs/agent-catalog.yaml +81 -0
- agent_toolkit/data/catalogs/loop-catalog.yaml +55 -0
- agent_toolkit/data/catalogs/skill-catalog.yaml +520 -0
- agent_toolkit/data/catalogs/skills-layout.json +391 -0
- agent_toolkit/data/distributions/products.yaml +190 -0
- agent_toolkit/data/distributions/targets/claude-code.yaml +47 -0
- agent_toolkit/data/distributions/targets/cursor.yaml +42 -0
- agent_toolkit/data/distributions/targets/opencode.yaml +55 -0
- agent_toolkit/data/loops/changelog-drafter/loop.yaml +40 -0
- agent_toolkit/data/loops/ci-sweeper/loop.yaml +53 -0
- agent_toolkit/data/loops/daily-triage/loop.yaml +47 -0
- agent_toolkit/data/loops/dep-sweeper/loop.yaml +46 -0
- agent_toolkit/data/loops/issue-triage/loop.yaml +40 -0
- agent_toolkit/data/loops/oss-daily-briefing/loop.yaml +65 -0
- agent_toolkit/data/loops/oss-pr-monitor/loop.yaml +86 -0
- agent_toolkit/data/loops/oss-triage/loop.yaml +67 -0
- agent_toolkit/data/loops/post-merge-cleanup/loop.yaml +44 -0
- agent_toolkit/data/loops/pr-babysitter/loop.yaml +46 -0
- agent_toolkit/data/mcp/registry/chrome-devtools.yaml +61 -0
- agent_toolkit/data/mcp/registry/clickup.yaml +48 -0
- agent_toolkit/data/mcp/registry/figma.yaml +44 -0
- agent_toolkit/data/mcp/registry/github.yaml +52 -0
- agent_toolkit/data/mcp/registry/linear.yaml +47 -0
- agent_toolkit/data/mcp/registry/notion.yaml +48 -0
- agent_toolkit/data/mcp/registry/slack.yaml +46 -0
- agent_toolkit/data/mcp/templates/chrome-devtools/README.md +57 -0
- agent_toolkit/data/mcp/templates/chrome-devtools/config.template.json +6 -0
- agent_toolkit/data/mcp/templates/clickup/README.md +45 -0
- agent_toolkit/data/mcp/templates/clickup/config.template.json +8 -0
- agent_toolkit/data/mcp/templates/clickup/wrapper.sh +23 -0
- agent_toolkit/data/mcp/templates/figma/README.md +54 -0
- agent_toolkit/data/mcp/templates/figma/config.template.json +9 -0
- agent_toolkit/data/mcp/templates/github/README.md +16 -0
- agent_toolkit/data/mcp/templates/github/config.template.json +15 -0
- agent_toolkit/data/mcp/templates/github/wrapper.sh +6 -0
- agent_toolkit/data/mcp/templates/linear/README.md +49 -0
- agent_toolkit/data/mcp/templates/linear/config.template.json +10 -0
- agent_toolkit/data/mcp/templates/notion/README.md +7 -0
- agent_toolkit/data/mcp/templates/notion/config.template.json +8 -0
- agent_toolkit/data/mcp/templates/notion/wrapper.sh +23 -0
- agent_toolkit/data/mcp/templates/slack/README.md +8 -0
- agent_toolkit/data/mcp/templates/slack/config.template.json +9 -0
- agent_toolkit/data/mcp/templates/slack/wrapper.sh +23 -0
- agent_toolkit/data/packs/README.md +66 -0
- agent_toolkit/data/packs/agentic-security/README.md +19 -0
- agent_toolkit/data/packs/agentic-security/config.yaml +25 -0
- agent_toolkit/data/packs/architecture/README.md +22 -0
- agent_toolkit/data/packs/architecture/config.yaml +27 -0
- agent_toolkit/data/packs/code-quality/README.md +19 -0
- agent_toolkit/data/packs/code-quality/config.yaml +21 -0
- agent_toolkit/data/packs/delivery-discipline/README.md +19 -0
- agent_toolkit/data/packs/delivery-discipline/config.yaml +42 -0
- agent_toolkit/data/packs/design-engineering/README.md +19 -0
- agent_toolkit/data/packs/design-engineering/config.yaml +41 -0
- agent_toolkit/data/packs/engineering-workflow/README.md +21 -0
- agent_toolkit/data/packs/engineering-workflow/config.yaml +57 -0
- agent_toolkit/data/packs/oss-maintenance/README.md +245 -0
- agent_toolkit/data/packs/oss-maintenance/config.yaml +75 -0
- agent_toolkit/data/profiles/claude-code/CLAUDE.md +110 -0
- agent_toolkit/data/profiles/claude-code/agents/assistant.md +59 -0
- agent_toolkit/data/profiles/claude-code/agents/build-error-resolver.md +30 -0
- agent_toolkit/data/profiles/claude-code/agents/client-workflow-bootstrap.md +60 -0
- agent_toolkit/data/profiles/claude-code/agents/contribution-planner.md +39 -0
- agent_toolkit/data/profiles/claude-code/agents/database-reviewer.md +44 -0
- agent_toolkit/data/profiles/claude-code/agents/docs-lookup.md +28 -0
- agent_toolkit/data/profiles/claude-code/agents/e2e-runner.md +38 -0
- agent_toolkit/data/profiles/claude-code/agents/performance-optimizer.md +52 -0
- agent_toolkit/data/profiles/claude-code/agents/planner.md +41 -0
- agent_toolkit/data/profiles/claude-code/agents/refactor-cleaner.md +43 -0
- agent_toolkit/data/profiles/claude-code/agents/reference-lookup.md +33 -0
- agent_toolkit/data/profiles/claude-code/agents/security-reviewer.md +47 -0
- agent_toolkit/data/profiles/claude-code/agents/tdd-guide.md +58 -0
- agent_toolkit/data/profiles/claude-code/agents/typescript-reviewer.md +61 -0
- agent_toolkit/data/profiles/claude-code/settings.json +86 -0
- agent_toolkit/data/profiles/copilot/copilot-instructions.md +15 -0
- agent_toolkit/data/profiles/cursor/README.md +33 -0
- agent_toolkit/data/profiles/cursor/rules/architect.mdc +23 -0
- agent_toolkit/data/profiles/cursor/rules/assistant.mdc +61 -0
- agent_toolkit/data/profiles/cursor/rules/build-error-resolver.mdc +20 -0
- agent_toolkit/data/profiles/cursor/rules/code-reviewer.mdc +21 -0
- agent_toolkit/data/profiles/cursor/rules/database-reviewer.mdc +29 -0
- agent_toolkit/data/profiles/cursor/rules/docs-lookup.mdc +15 -0
- agent_toolkit/data/profiles/cursor/rules/e2e-runner.mdc +30 -0
- agent_toolkit/data/profiles/cursor/rules/performance-optimizer.mdc +27 -0
- agent_toolkit/data/profiles/cursor/rules/planner.mdc +28 -0
- agent_toolkit/data/profiles/cursor/rules/refactor-cleaner.mdc +26 -0
- agent_toolkit/data/profiles/cursor/rules/reference-lookup.mdc +20 -0
- agent_toolkit/data/profiles/cursor/rules/security-reviewer.mdc +20 -0
- agent_toolkit/data/profiles/cursor/rules/tdd-guide.mdc +26 -0
- agent_toolkit/data/profiles/cursor/rules/typescript-reviewer.mdc +28 -0
- agent_toolkit/data/profiles/muse-code/README.md +35 -0
- agent_toolkit/data/profiles/opencode/README.md +44 -0
- agent_toolkit/data/profiles/opencode/agents/architect.md +30 -0
- agent_toolkit/data/profiles/opencode/agents/assistant.md +96 -0
- agent_toolkit/data/profiles/opencode/agents/build-error-resolver.md +31 -0
- agent_toolkit/data/profiles/opencode/agents/client-workflow-bootstrap.md +66 -0
- agent_toolkit/data/profiles/opencode/agents/code-reviewer.md +47 -0
- agent_toolkit/data/profiles/opencode/agents/contribution-planner.md +44 -0
- agent_toolkit/data/profiles/opencode/agents/database-reviewer.md +43 -0
- agent_toolkit/data/profiles/opencode/agents/docs-lookup.md +28 -0
- agent_toolkit/data/profiles/opencode/agents/e2e-runner.md +33 -0
- agent_toolkit/data/profiles/opencode/agents/performance-optimizer.md +34 -0
- agent_toolkit/data/profiles/opencode/agents/planner.md +27 -0
- agent_toolkit/data/profiles/opencode/agents/refactor-cleaner.md +27 -0
- agent_toolkit/data/profiles/opencode/agents/reference-lookup.md +27 -0
- agent_toolkit/data/profiles/opencode/agents/security-reviewer.md +27 -0
- agent_toolkit/data/profiles/opencode/agents/tdd-guide.md +27 -0
- agent_toolkit/data/profiles/opencode/agents/typescript-reviewer.md +30 -0
- agent_toolkit/data/profiles/opencode/opencode.json +3 -0
- agent_toolkit/data/profiles/pi/skills/architect/skill.md +5 -0
- agent_toolkit/data/profiles/pi/skills/assistant/skill.md +3 -0
- agent_toolkit/data/profiles/pi/skills/code-reviewer/skill.md +5 -0
- agent_toolkit/data/profiles/pi/skills/planner/skill.md +3 -0
- agent_toolkit/data/profiles/pi/skills/security-reviewer/skill.md +3 -0
- agent_toolkit/data/profiles/windsurf/memories/global_rules.md +114 -0
- agent_toolkit/data/profiles/windsurf/rules/architect.mdc +23 -0
- agent_toolkit/data/profiles/windsurf/rules/assistant.mdc +61 -0
- agent_toolkit/data/profiles/windsurf/rules/build-error-resolver.mdc +20 -0
- agent_toolkit/data/profiles/windsurf/rules/code-reviewer.mdc +21 -0
- agent_toolkit/data/profiles/windsurf/rules/database-reviewer.mdc +29 -0
- agent_toolkit/data/profiles/windsurf/rules/docs-lookup.mdc +15 -0
- agent_toolkit/data/profiles/windsurf/rules/e2e-runner.mdc +30 -0
- agent_toolkit/data/profiles/windsurf/rules/performance-optimizer.mdc +27 -0
- agent_toolkit/data/profiles/windsurf/rules/planner.mdc +28 -0
- agent_toolkit/data/profiles/windsurf/rules/refactor-cleaner.mdc +26 -0
- agent_toolkit/data/profiles/windsurf/rules/reference-lookup.mdc +20 -0
- agent_toolkit/data/profiles/windsurf/rules/security-reviewer.mdc +20 -0
- agent_toolkit/data/profiles/windsurf/rules/tdd-guide.mdc +26 -0
- agent_toolkit/data/profiles/windsurf/rules/typescript-reviewer.mdc +28 -0
- agent_toolkit/data/skills/accessibility/review/SKILL.md +116 -0
- agent_toolkit/data/skills/accessibility/review/references/a11y-checklist.md +25 -0
- agent_toolkit/data/skills/accessibility/review/references/a11y-findings-template.md +56 -0
- agent_toolkit/data/skills/accessibility/review/references/research.md +47 -0
- agent_toolkit/data/skills/agentic-security/mcp-audit/SKILL.md +116 -0
- agent_toolkit/data/skills/agentic-security/mcp-audit/references/mcp-audit-template.md +51 -0
- agent_toolkit/data/skills/agentic-security/owasp-agentic-review/SKILL.md +73 -0
- agent_toolkit/data/skills/agentic-security/owasp-agentic-review/references/owasp-agentic-template.md +32 -0
- agent_toolkit/data/skills/agentic-security/supply-chain-audit/SKILL.md +142 -0
- agent_toolkit/data/skills/agentic-security/threat-modeling/SKILL.md +100 -0
- agent_toolkit/data/skills/agentic-security/threat-modeling/references/threat-model-template.md +55 -0
- agent_toolkit/data/skills/architecture/c4-model/SKILL.md +49 -0
- agent_toolkit/data/skills/cloud/aws-well-architected-review/SKILL.md +37 -0
- agent_toolkit/data/skills/cloud/cloud-design-patterns/SKILL.md +38 -0
- agent_toolkit/data/skills/core/assistant/SKILL.md +216 -0
- agent_toolkit/data/skills/core/assistant/references/AGENTS_TEMPLATE.md +0 -0
- agent_toolkit/data/skills/core/assistant/references/ORCHESTRATION.md +0 -0
- agent_toolkit/data/skills/core/assistant/references/REPO_INSPECTION.md +0 -0
- agent_toolkit/data/skills/core/dev-companion/SKILL.md +65 -0
- agent_toolkit/data/skills/core/dev-companion/references/LOOP_GUARDRAILS.md +0 -0
- agent_toolkit/data/skills/core/onboarding/SKILL.md +122 -0
- agent_toolkit/data/skills/core/output-handshake/SKILL.md +26 -0
- agent_toolkit/data/skills/core/pr-fallback/SKILL.md +35 -0
- agent_toolkit/data/skills/core/pr-fallback/references/pr-body-default.md +0 -0
- agent_toolkit/data/skills/core/project/SKILL.md +89 -0
- agent_toolkit/data/skills/core/workspace/SKILL.md +103 -0
- agent_toolkit/data/skills/core/workspace-knowledge-sync/SKILL.md +140 -0
- agent_toolkit/data/skills/data/dbt-validation/SKILL.md +41 -0
- agent_toolkit/data/skills/data/snowflake-validation/SKILL.md +38 -0
- agent_toolkit/data/skills/delivery/adr/SKILL.md +56 -0
- agent_toolkit/data/skills/delivery/adr/references/default-template.md +35 -0
- agent_toolkit/data/skills/delivery/adr/references/example-001-graphql-adoption.md +66 -0
- agent_toolkit/data/skills/delivery/agreement/SKILL.md +24 -0
- agent_toolkit/data/skills/delivery/agreement/references/default-template.md +17 -0
- agent_toolkit/data/skills/delivery/agreement/references/example-api-versioning.md +29 -0
- agent_toolkit/data/skills/delivery/bug/SKILL.md +26 -0
- agent_toolkit/data/skills/delivery/bug/references/default-template.md +26 -0
- agent_toolkit/data/skills/delivery/bug/references/example-search-filter-bug.md +58 -0
- agent_toolkit/data/skills/delivery/decision-log/SKILL.md +28 -0
- agent_toolkit/data/skills/delivery/decision-log/references/default-template.md +17 -0
- agent_toolkit/data/skills/delivery/decision-log/references/example-repository-pattern.md +27 -0
- agent_toolkit/data/skills/delivery/development-workflow/SKILL.md +34 -0
- agent_toolkit/data/skills/delivery/development-workflow/references/default-workflow-checklist.md +44 -0
- agent_toolkit/data/skills/delivery/epic/SKILL.md +22 -0
- agent_toolkit/data/skills/delivery/epic/references/default-template.md +26 -0
- agent_toolkit/data/skills/delivery/epic/references/example-unified-dashboard.md +40 -0
- agent_toolkit/data/skills/delivery/incident/SKILL.md +24 -0
- agent_toolkit/data/skills/delivery/incident/references/default-template.md +29 -0
- agent_toolkit/data/skills/delivery/incident/references/example-payment-outage.md +62 -0
- agent_toolkit/data/skills/delivery/management-unit-assessment/SKILL.md +104 -0
- agent_toolkit/data/skills/delivery/management-unit-assessment/references/default-template.md +24 -0
- agent_toolkit/data/skills/delivery/management-unit-assessment/references/example-team-assessment.md +126 -0
- agent_toolkit/data/skills/delivery/meeting-minutes/SKILL.md +25 -0
- agent_toolkit/data/skills/delivery/meeting-minutes/references/default-template.md +22 -0
- agent_toolkit/data/skills/delivery/meeting-minutes/references/example-weekly-sync.md +72 -0
- agent_toolkit/data/skills/delivery/planning/SKILL.md +31 -0
- agent_toolkit/data/skills/delivery/planning/references/default-template.md +25 -0
- agent_toolkit/data/skills/delivery/planning/references/example-sprint-planning.md +62 -0
- agent_toolkit/data/skills/delivery/prd/SKILL.md +46 -0
- agent_toolkit/data/skills/delivery/prd/references/default-template.md +31 -0
- agent_toolkit/data/skills/delivery/prd/references/example-unified-api.md +71 -0
- agent_toolkit/data/skills/delivery/project-assessment/SKILL.md +90 -0
- agent_toolkit/data/skills/delivery/project-assessment/references/default-template.md +26 -0
- agent_toolkit/data/skills/delivery/project-assessment/references/example-platform-assessment.md +122 -0
- agent_toolkit/data/skills/delivery/project-assessment-evidence/SKILL.md +88 -0
- agent_toolkit/data/skills/delivery/project-assessment-evidence/references/default-template.md +24 -0
- agent_toolkit/data/skills/delivery/project-assessment-evidence/references/example-evidence-map.md +46 -0
- agent_toolkit/data/skills/delivery/spike/SKILL.md +24 -0
- agent_toolkit/data/skills/delivery/spike/references/default-template.md +29 -0
- agent_toolkit/data/skills/delivery/spike/references/example-graphql-federation.md +79 -0
- agent_toolkit/data/skills/delivery/task/SKILL.md +21 -0
- agent_toolkit/data/skills/delivery/task/references/default-template.md +21 -0
- agent_toolkit/data/skills/delivery/task/references/example-nav-system.md +33 -0
- agent_toolkit/data/skills/delivery/technical-unit-assessment/SKILL.md +58 -0
- agent_toolkit/data/skills/delivery/technical-unit-assessment/references/default-template.md +26 -0
- agent_toolkit/data/skills/delivery/technical-unit-assessment/references/example-frontend-assessment.md +112 -0
- agent_toolkit/data/skills/delivery/technical-unit-assessment/references/indicator-groups.md +65 -0
- agent_toolkit/data/skills/delivery/trd/SKILL.md +49 -0
- agent_toolkit/data/skills/delivery/trd/references/default-template.md +31 -0
- agent_toolkit/data/skills/delivery/trd/references/example-api-migration.md +122 -0
- agent_toolkit/data/skills/delivery/user-story/SKILL.md +21 -0
- agent_toolkit/data/skills/delivery/user-story/references/default-template.md +21 -0
- agent_toolkit/data/skills/delivery/user-story/references/example-advanced-filtering.md +37 -0
- agent_toolkit/data/skills/delivery/work-item/SKILL.md +31 -0
- agent_toolkit/data/skills/delivery/work-item/references/default-template.md +21 -0
- agent_toolkit/data/skills/delivery/work-item/references/example-routing-dashboard.md +23 -0
- agent_toolkit/data/skills/delivery/workflow-client-bootstrap/SKILL.md +148 -0
- agent_toolkit/data/skills/delivery/workflow-client-bootstrap/questions.yaml +165 -0
- agent_toolkit/data/skills/delivery/workflow-generic-project/SKILL.md +79 -0
- agent_toolkit/data/skills/design/design-assessment/SKILL.md +150 -0
- agent_toolkit/data/skills/design/design-assessment/references/design-scorecard-template.md +78 -0
- agent_toolkit/data/skills/design/design-improvement/SKILL.md +167 -0
- agent_toolkit/data/skills/design/design-improvement/references/improvement-plan-template.md +113 -0
- agent_toolkit/data/skills/design/figma/LICENSE.txt +2 -0
- agent_toolkit/data/skills/design/figma/NOTICE.txt +25 -0
- agent_toolkit/data/skills/design/figma/SKILL.md +98 -0
- agent_toolkit/data/skills/design/figma/references/figma-mcp-config.md +82 -0
- agent_toolkit/data/skills/design/figma/references/figma-tools-and-prompts.md +34 -0
- agent_toolkit/data/skills/design/figma-code-connect-components/LICENSE.txt +2 -0
- agent_toolkit/data/skills/design/figma-code-connect-components/NOTICE.txt +18 -0
- agent_toolkit/data/skills/design/figma-code-connect-components/SKILL.md +354 -0
- agent_toolkit/data/skills/design/figma-code-connect-components/references/mapping-checklist.md +7 -0
- agent_toolkit/data/skills/design/figma-code-connect-components/scripts/normalize_node_id.py +25 -0
- agent_toolkit/data/skills/design/figma-create-design-system-rules/LICENSE.txt +2 -0
- agent_toolkit/data/skills/design/figma-create-design-system-rules/NOTICE.txt +19 -0
- agent_toolkit/data/skills/design/figma-create-design-system-rules/SKILL.md +554 -0
- agent_toolkit/data/skills/design/figma-create-design-system-rules/references/rule-template.md +15 -0
- agent_toolkit/data/skills/design/figma-create-design-system-rules/scripts/check_agents_md.sh +9 -0
- agent_toolkit/data/skills/design/figma-create-new-file/LICENSE.txt +2 -0
- agent_toolkit/data/skills/design/figma-create-new-file/NOTICE.txt +17 -0
- agent_toolkit/data/skills/design/figma-create-new-file/SKILL.md +72 -0
- agent_toolkit/data/skills/design/figma-implement-design/LICENSE.txt +2 -0
- agent_toolkit/data/skills/design/figma-implement-design/NOTICE.txt +19 -0
- agent_toolkit/data/skills/design/figma-implement-design/SKILL.md +268 -0
- agent_toolkit/data/skills/design/frontend-design/LICENSE.txt +177 -0
- agent_toolkit/data/skills/design/frontend-design/SKILL.md +82 -0
- agent_toolkit/data/skills/design/frontend-design/UPSTREAM.md +14 -0
- agent_toolkit/data/skills/design/frontend-design-review/LICENSE +21 -0
- agent_toolkit/data/skills/design/frontend-design-review/SKILL.md +194 -0
- agent_toolkit/data/skills/design/frontend-design-review/references/pattern-examples.md +21 -0
- agent_toolkit/data/skills/design/frontend-design-review/references/quick-checklist.md +38 -0
- agent_toolkit/data/skills/design/frontend-design-review/references/review-output-format.md +68 -0
- agent_toolkit/data/skills/design/frontend-design-review/references/review-type-modifiers.md +31 -0
- agent_toolkit/data/skills/design/web-design-guidelines/SKILL.md +78 -0
- agent_toolkit/data/skills/design/web-design-guidelines/references/LICENSE +21 -0
- agent_toolkit/data/skills/design/web-design-guidelines/references/web-interface-guidelines.md +180 -0
- agent_toolkit/data/skills/forge/gh-address-comments/LICENSE.txt +202 -0
- agent_toolkit/data/skills/forge/gh-address-comments/NOTICE.txt +20 -0
- agent_toolkit/data/skills/forge/gh-address-comments/SKILL.md +72 -0
- agent_toolkit/data/skills/forge/gh-address-comments/scripts/fetch_comments.py +239 -0
- agent_toolkit/data/skills/forge/gh-contribution-planner/SKILL.md +160 -0
- agent_toolkit/data/skills/forge/gh-contribution-planner/scripts/inspect_contributions.py +818 -0
- agent_toolkit/data/skills/forge/gh-fix-ci/LICENSE.txt +201 -0
- agent_toolkit/data/skills/forge/gh-fix-ci/NOTICE.txt +20 -0
- agent_toolkit/data/skills/forge/gh-fix-ci/SKILL.md +74 -0
- agent_toolkit/data/skills/forge/gh-fix-ci/scripts/inspect_pr_checks.py +509 -0
- agent_toolkit/data/skills/forge/github-cli-workflow/SKILL.md +49 -0
- agent_toolkit/data/skills/forge/gitlab-cli-workflow/SKILL.md +44 -0
- agent_toolkit/data/skills/forge/workflow-client-bootstrap/SKILL.md +14 -0
- agent_toolkit/data/skills/forge/workflow-generic-project/SKILL.md +14 -0
- agent_toolkit/data/skills/forge/worktree/SKILL.md +113 -0
- agent_toolkit/data/skills/integrations/clickup-cli/SKILL.md +78 -0
- agent_toolkit/data/skills/integrations/clickup-cli/references/docs-management.md +57 -0
- agent_toolkit/data/skills/integrations/clickup-cli/references/task-management.md +131 -0
- agent_toolkit/data/skills/integrations/clickup-cli/references/time-tracking.md +38 -0
- agent_toolkit/data/skills/integrations/linear/LICENSE.txt +202 -0
- agent_toolkit/data/skills/integrations/linear/NOTICE.txt +23 -0
- agent_toolkit/data/skills/integrations/linear/SKILL.md +134 -0
- agent_toolkit/data/skills/integrations/mcp/SKILL.md +88 -0
- agent_toolkit/data/skills/integrations/slack-assistant/SKILL.md +138 -0
- agent_toolkit/data/skills/integrations/slack-cli/SKILL.md +109 -0
- agent_toolkit/data/skills/integrations/slack-cli/references/INSTALLATION.md +42 -0
- agent_toolkit/data/skills/loops/loop-runner/SKILL.md +92 -0
- agent_toolkit/data/skills/ops/docs-generator/SKILL.md +120 -0
- agent_toolkit/data/skills/ops/llm-cost-advisor/SKILL.md +87 -0
- agent_toolkit/data/skills/ops/swarm/SKILL.md +108 -0
- agent_toolkit/data/skills/ops/swarm-handoff/SKILL.md +112 -0
- agent_toolkit/data/skills/ops/swarm-observer/SKILL.md +102 -0
- agent_toolkit/data/skills/ops/triage/SKILL.md +119 -0
- agent_toolkit/data/skills/quality/codeql/SKILL.md +106 -0
- agent_toolkit/data/skills/quality/codeql/references/codeql-queries.md +43 -0
- agent_toolkit/data/skills/quality/megalinter/SKILL.md +162 -0
- agent_toolkit/data/skills/quality/megalinter/references/megalinter-images.md +36 -0
- agent_toolkit/data/skills/quality/megalinter/references/megalinter-license.md +41 -0
- agent_toolkit/data/skills/quality/megalinter/references/megalinter-targets.md +66 -0
- agent_toolkit/data/skills/tooling/chrome-devtools/SKILL.md +146 -0
- agent_toolkit/data/skills/tooling/herdr/SKILL.md +109 -0
- agent_toolkit/data/skills/tooling/inventory/SKILL.md +81 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/LICENSE.txt +201 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/NOTICE.txt +27 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/SKILL.md +145 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/assets/experiment-template.ipynb +117 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/assets/tutorial-template.ipynb +115 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/references/experiment-patterns.md +10 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/references/notebook-structure.md +17 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/references/quality-checklist.md +11 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/references/tutorial-patterns.md +9 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/scripts/new_notebook.py +132 -0
- agent_toolkit/data/skills/tooling/mermaid/SKILL.md +36 -0
- agent_toolkit/data/skills/tooling/playwright-cli/LICENSE.txt +201 -0
- agent_toolkit/data/skills/tooling/playwright-cli/NOTICE.txt +29 -0
- agent_toolkit/data/skills/tooling/playwright-cli/SKILL.md +154 -0
- agent_toolkit/data/skills/tooling/playwright-cli/references/cli.md +116 -0
- agent_toolkit/data/skills/tooling/playwright-cli/references/workflows.md +98 -0
- agent_toolkit/data/skills/tooling/playwright-cli/scripts/executable_playwright_cli.sh +25 -0
- agent_toolkit/data_cache.py +79 -0
- agent_toolkit/data_sync.py +144 -0
- agent_toolkit/installer/__init__.py +0 -0
- agent_toolkit/installer/merge.py +59 -0
- agent_toolkit/installer/receipt.py +89 -0
- agent_toolkit/installer/sources.py +92 -0
- agent_toolkit/installer/tracking.py +63 -0
- agent_toolkit/launcher.py +69 -0
- agent_toolkit/loop/__init__.py +0 -0
- agent_toolkit/loop/budget.py +107 -0
- agent_toolkit/loop/gh_gate.py +923 -0
- agent_toolkit/loop/loop-gh-gate +923 -0
- agent_toolkit/loop/pack.py +65 -0
- agent_toolkit/loop/runner.py +2722 -0
- agent_toolkit/runner/__init__.py +0 -0
- agent_toolkit/runner/dispatcher.py +163 -0
- agent_toolkit/runner/policy.py +356 -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 +103 -0
- agent_toolkit/runner/providers/opencode_provider.py +127 -0
- agent_toolkit/swarm/__init__.py +5 -0
- agent_toolkit/swarm/approvals.py +121 -0
- agent_toolkit/swarm/backends/__init__.py +596 -0
- agent_toolkit/swarm/budget.py +83 -0
- agent_toolkit/swarm/cli.py +2448 -0
- agent_toolkit/swarm/config.py +351 -0
- agent_toolkit/swarm/handoff.py +174 -0
- agent_toolkit/swarm/models.py +230 -0
- agent_toolkit/swarm/prompts.py +177 -0
- agent_toolkit/swarm/recipes.py +304 -0
- agent_toolkit/swarm/runner.py +267 -0
- agent_toolkit/swarm/state.py +93 -0
- agent_toolkit/swarm/store.py +148 -0
- agent_toolkit/swarm/worktree.py +105 -0
- agent_toolkit/templates/workspace/.gitignore +19 -0
- agent_toolkit/templates/workspace/AGENTS.md +82 -0
- agent_toolkit/templates/workspace/knowledge/README.md +22 -0
- agent_toolkit/templates/workspace/knowledge/learnings/general.md +3 -0
- agent_toolkit/templates/workspace/knowledge/todos/pending.md +7 -0
- agent_toolkit/templates/workspace/packs/README.md +24 -0
- agent_toolkit/templates/workspace/personas/architect.md +12 -0
- agent_toolkit/templates/workspace/personas/implementer.md +12 -0
- agent_toolkit/templates/workspace/personas/researcher.md +12 -0
- agent_toolkit/templates/workspace/personas/reviewer.md +12 -0
- agent_toolkit_cli-1.11.0.dist-info/METADATA +363 -0
- agent_toolkit_cli-1.11.0.dist-info/RECORD +438 -0
- agent_toolkit_cli-1.11.0.dist-info/WHEEL +4 -0
- agent_toolkit_cli-1.11.0.dist-info/entry_points.txt +4 -0
- agent_toolkit_cli-1.11.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"""
|
|
2
|
+
uninstall — Remove agent-toolkit profile files recorded in install receipts.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
agent-toolkit uninstall [options]
|
|
6
|
+
|
|
7
|
+
Options:
|
|
8
|
+
--tools <list> Comma-separated tools to uninstall (default: all with receipts)
|
|
9
|
+
--dry-run Show what would be removed without deleting files
|
|
10
|
+
--rollback Alias for uninstall (removes toolkit-owned files from receipt)
|
|
11
|
+
--help Show this help message
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import sys
|
|
17
|
+
from pathlib import Path
|
|
18
|
+
|
|
19
|
+
from agent_toolkit.installer import tracking
|
|
20
|
+
from agent_toolkit.installer.receipt import InstallReceipt
|
|
21
|
+
|
|
22
|
+
_VALID_TOOLS = ("claude-code", "cursor", "opencode", "copilot", "windsurf", "pi")
|
|
23
|
+
_TOOL_RECEIPT_TARGETS = {
|
|
24
|
+
"claude-code": "claude-code",
|
|
25
|
+
"cursor": "cursor",
|
|
26
|
+
"opencode": "opencode",
|
|
27
|
+
"copilot": "copilot",
|
|
28
|
+
"windsurf": "windsurf",
|
|
29
|
+
"pi": "pi",
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _info(msg: str) -> None:
|
|
34
|
+
print(f" [info] {msg}")
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _ok(msg: str) -> None:
|
|
38
|
+
print(f" ✓ {msg}")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _skip(msg: str) -> None:
|
|
42
|
+
print(f" - {msg}")
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def _dry(msg: str) -> None:
|
|
46
|
+
print(f" [dry] {msg}")
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def _err(msg: str) -> None:
|
|
50
|
+
print(f" ✗ {msg}", file=sys.stderr)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def _parse_args(args: list[str]) -> tuple[list[str], bool, bool] | None:
|
|
54
|
+
dry_run = False
|
|
55
|
+
requested = ""
|
|
56
|
+
i = 0
|
|
57
|
+
while i < len(args):
|
|
58
|
+
arg = args[i]
|
|
59
|
+
if arg in ("-h", "--help"):
|
|
60
|
+
print(__doc__)
|
|
61
|
+
return None
|
|
62
|
+
if arg in ("--dry-run",):
|
|
63
|
+
dry_run = True
|
|
64
|
+
elif arg in ("--rollback",):
|
|
65
|
+
dry_run = False # rollback is uninstall with side effects
|
|
66
|
+
elif arg == "--tools":
|
|
67
|
+
if i + 1 >= len(args):
|
|
68
|
+
_err("--tools requires an argument")
|
|
69
|
+
return None
|
|
70
|
+
requested = args[i + 1]
|
|
71
|
+
i += 1
|
|
72
|
+
else:
|
|
73
|
+
_err(f"Unknown option: {arg}")
|
|
74
|
+
return None
|
|
75
|
+
i += 1
|
|
76
|
+
|
|
77
|
+
if requested:
|
|
78
|
+
tools = [t.strip() for t in requested.split(",") if t.strip()]
|
|
79
|
+
else:
|
|
80
|
+
tools = []
|
|
81
|
+
return tools, dry_run, True
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def _discover_tools(receipt_dir: Path) -> list[str]:
|
|
85
|
+
found: list[str] = []
|
|
86
|
+
if not receipt_dir.is_dir():
|
|
87
|
+
return found
|
|
88
|
+
for path in sorted(receipt_dir.glob(f"*-{tracking.PRODUCT}.json")):
|
|
89
|
+
target = path.name[: -len(f"-{tracking.PRODUCT}.json")]
|
|
90
|
+
for tool, receipt_target in _TOOL_RECEIPT_TARGETS.items():
|
|
91
|
+
if receipt_target == target and tool not in found:
|
|
92
|
+
found.append(tool)
|
|
93
|
+
return found
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def _uninstall_tool(tool: str, *, dry_run: bool, receipt_dir: Path) -> bool:
|
|
97
|
+
target = _TOOL_RECEIPT_TARGETS.get(tool)
|
|
98
|
+
if target is None:
|
|
99
|
+
_err(f"Unknown tool: {tool}")
|
|
100
|
+
return False
|
|
101
|
+
|
|
102
|
+
receipt = InstallReceipt.load(target, tracking.PRODUCT, receipt_dir)
|
|
103
|
+
if receipt is None:
|
|
104
|
+
_skip(f"No receipt for {tool} — nothing to uninstall")
|
|
105
|
+
return True
|
|
106
|
+
|
|
107
|
+
_info(f"Uninstalling {tool} ({len(receipt.artifacts)} artifact(s) from receipt)")
|
|
108
|
+
removed = 0
|
|
109
|
+
for entry in receipt.artifacts:
|
|
110
|
+
if entry.ownership != "created":
|
|
111
|
+
_skip(f"Skipping non-owned file ({entry.ownership}): {entry.path}")
|
|
112
|
+
continue
|
|
113
|
+
path = Path(entry.path)
|
|
114
|
+
if not path.exists():
|
|
115
|
+
_skip(f"Already absent: {path}")
|
|
116
|
+
continue
|
|
117
|
+
if dry_run:
|
|
118
|
+
_dry(f"Would remove: {path}")
|
|
119
|
+
else:
|
|
120
|
+
try:
|
|
121
|
+
path.unlink()
|
|
122
|
+
_ok(f"Removed: {path}")
|
|
123
|
+
except OSError as exc:
|
|
124
|
+
_err(f"Failed to remove {path}: {exc}")
|
|
125
|
+
return False
|
|
126
|
+
removed += 1
|
|
127
|
+
|
|
128
|
+
if not dry_run:
|
|
129
|
+
receipt_path = receipt_dir / f"{target}-{tracking.PRODUCT}.json"
|
|
130
|
+
if receipt_path.exists():
|
|
131
|
+
receipt_path.unlink()
|
|
132
|
+
_ok(f"Removed receipt: {receipt_path}")
|
|
133
|
+
|
|
134
|
+
_info(f"{tool}: processed {removed} owned file(s)")
|
|
135
|
+
return True
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
def cmd_uninstall(args: list[str]) -> int:
|
|
139
|
+
parsed = _parse_args(args)
|
|
140
|
+
if parsed is None:
|
|
141
|
+
return 0 if any(a in ("-h", "--help") for a in args) else 2
|
|
142
|
+
tools, dry_run, _ = parsed
|
|
143
|
+
|
|
144
|
+
rdir = tracking.receipt_dir()
|
|
145
|
+
if not tools:
|
|
146
|
+
tools = _discover_tools(rdir)
|
|
147
|
+
if not tools:
|
|
148
|
+
_err("No install receipts found. Nothing to uninstall.")
|
|
149
|
+
return 1
|
|
150
|
+
|
|
151
|
+
print()
|
|
152
|
+
print("agent-toolkit uninstall")
|
|
153
|
+
if dry_run:
|
|
154
|
+
_info("DRY RUN — no files will be deleted")
|
|
155
|
+
|
|
156
|
+
failed: list[str] = []
|
|
157
|
+
for tool in tools:
|
|
158
|
+
if tool not in _VALID_TOOLS:
|
|
159
|
+
_err(f"Unknown tool: {tool}")
|
|
160
|
+
failed.append(tool)
|
|
161
|
+
continue
|
|
162
|
+
if not _uninstall_tool(tool, dry_run=dry_run, receipt_dir=rdir):
|
|
163
|
+
failed.append(tool)
|
|
164
|
+
|
|
165
|
+
print()
|
|
166
|
+
return 1 if failed else 0
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
"""
|
|
2
|
+
update — Refresh installed profiles from toolkit data.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
agent-toolkit update [options]
|
|
6
|
+
|
|
7
|
+
Options:
|
|
8
|
+
--tools <list> Comma-separated tools to update (default: auto-detect installed)
|
|
9
|
+
--check Dry-run — show what would change without writing files
|
|
10
|
+
--pin <version> Download capability data from a specific release before updating
|
|
11
|
+
--help Show this help message
|
|
12
|
+
|
|
13
|
+
Examples:
|
|
14
|
+
agent-toolkit update
|
|
15
|
+
agent-toolkit update --tools cursor,opencode
|
|
16
|
+
agent-toolkit update --check
|
|
17
|
+
agent-toolkit update --pin 1.1.0
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
import hashlib
|
|
23
|
+
import shutil
|
|
24
|
+
import sys
|
|
25
|
+
from collections.abc import Callable, Iterator
|
|
26
|
+
from dataclasses import dataclass, field
|
|
27
|
+
from pathlib import Path
|
|
28
|
+
|
|
29
|
+
from agent_toolkit._paths import reset_toolkit_root, toolkit_root
|
|
30
|
+
from agent_toolkit.cli.install import (
|
|
31
|
+
_VALID_TOOLS,
|
|
32
|
+
_detect_claude_code,
|
|
33
|
+
_detect_cursor,
|
|
34
|
+
_detect_opencode,
|
|
35
|
+
_detect_pi,
|
|
36
|
+
_detect_windsurf,
|
|
37
|
+
_windsurf_config_dir,
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
_PARSE_HELP = object()
|
|
41
|
+
_PARSE_ERROR = object()
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@dataclass
|
|
45
|
+
class FileMapping:
|
|
46
|
+
src: Path
|
|
47
|
+
dst: Path
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
@dataclass
|
|
51
|
+
class ToolUpdatePlan:
|
|
52
|
+
tool: str
|
|
53
|
+
changed: list[Path] = field(default_factory=list)
|
|
54
|
+
added: list[Path] = field(default_factory=list)
|
|
55
|
+
up_to_date: list[Path] = field(default_factory=list)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _file_hash(path: Path) -> str:
|
|
59
|
+
return hashlib.sha256(path.read_bytes()).hexdigest()
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _iter_files(root: Path) -> Iterator[Path]:
|
|
63
|
+
if not root.is_dir():
|
|
64
|
+
return
|
|
65
|
+
for path in sorted(root.rglob("*")):
|
|
66
|
+
if path.is_file():
|
|
67
|
+
yield path
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def _mappings_for_tool(tool: str, data_root: Path, home: Path) -> list[FileMapping]:
|
|
71
|
+
mappings: list[FileMapping] = []
|
|
72
|
+
|
|
73
|
+
if tool == "claude-code":
|
|
74
|
+
src = data_root / "profiles" / "claude-code"
|
|
75
|
+
if src.is_dir():
|
|
76
|
+
claude = src / "CLAUDE.md"
|
|
77
|
+
if claude.is_file():
|
|
78
|
+
mappings.append(FileMapping(claude, home / ".claude" / "CLAUDE.md"))
|
|
79
|
+
agents = src / "agents"
|
|
80
|
+
if agents.is_dir():
|
|
81
|
+
for f in _iter_files(agents):
|
|
82
|
+
rel = f.relative_to(agents)
|
|
83
|
+
mappings.append(FileMapping(f, home / ".claude" / "agents" / rel))
|
|
84
|
+
|
|
85
|
+
elif tool == "cursor":
|
|
86
|
+
src = data_root / "profiles" / "cursor" / "rules"
|
|
87
|
+
if src.is_dir():
|
|
88
|
+
for f in _iter_files(src):
|
|
89
|
+
rel = f.relative_to(src)
|
|
90
|
+
mappings.append(FileMapping(f, home / ".cursor" / "rules" / rel))
|
|
91
|
+
|
|
92
|
+
elif tool == "opencode":
|
|
93
|
+
src = data_root / "profiles" / "opencode"
|
|
94
|
+
cfg = src / "opencode.json"
|
|
95
|
+
if cfg.is_file():
|
|
96
|
+
mappings.append(FileMapping(cfg, home / ".config" / "opencode" / "opencode.json"))
|
|
97
|
+
agents = src / "agents"
|
|
98
|
+
if agents.is_dir():
|
|
99
|
+
for f in _iter_files(agents):
|
|
100
|
+
rel = f.relative_to(agents)
|
|
101
|
+
mappings.append(FileMapping(f, home / ".config" / "opencode" / "agents" / rel))
|
|
102
|
+
|
|
103
|
+
elif tool == "windsurf":
|
|
104
|
+
src = data_root / "profiles" / "windsurf"
|
|
105
|
+
config_dir = _windsurf_config_dir()
|
|
106
|
+
for sub in ("rules", "memories"):
|
|
107
|
+
sub_src = src / sub
|
|
108
|
+
if sub_src.is_dir():
|
|
109
|
+
for f in _iter_files(sub_src):
|
|
110
|
+
rel = f.relative_to(sub_src)
|
|
111
|
+
mappings.append(FileMapping(f, config_dir / sub / rel))
|
|
112
|
+
|
|
113
|
+
elif tool == "pi":
|
|
114
|
+
src = data_root / "profiles" / "pi" / "skills"
|
|
115
|
+
if src.is_dir():
|
|
116
|
+
for f in _iter_files(src):
|
|
117
|
+
rel = f.relative_to(src)
|
|
118
|
+
mappings.append(FileMapping(f, home / ".pi" / "agent" / "skills" / rel))
|
|
119
|
+
|
|
120
|
+
return mappings
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def _plan_tool_update(tool: str, data_root: Path, home: Path) -> ToolUpdatePlan | None:
|
|
124
|
+
mappings = _mappings_for_tool(tool, data_root, home)
|
|
125
|
+
if not mappings:
|
|
126
|
+
return None
|
|
127
|
+
|
|
128
|
+
plan = ToolUpdatePlan(tool=tool)
|
|
129
|
+
for mapping in mappings:
|
|
130
|
+
if not mapping.src.is_file():
|
|
131
|
+
continue
|
|
132
|
+
src_hash = _file_hash(mapping.src)
|
|
133
|
+
if mapping.dst.is_file():
|
|
134
|
+
if _file_hash(mapping.dst) == src_hash:
|
|
135
|
+
plan.up_to_date.append(mapping.dst)
|
|
136
|
+
else:
|
|
137
|
+
plan.changed.append(mapping.dst)
|
|
138
|
+
else:
|
|
139
|
+
plan.added.append(mapping.dst)
|
|
140
|
+
return plan
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def _detect_installed_tools() -> list[str]:
|
|
144
|
+
detectors: list[tuple[str, Callable[[], bool]]] = [
|
|
145
|
+
("claude-code", _detect_claude_code),
|
|
146
|
+
("cursor", _detect_cursor),
|
|
147
|
+
("opencode", _detect_opencode),
|
|
148
|
+
("windsurf", _detect_windsurf),
|
|
149
|
+
("pi", _detect_pi),
|
|
150
|
+
]
|
|
151
|
+
return [name for name, fn in detectors if fn()]
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def _apply_plan(plan: ToolUpdatePlan, data_root: Path, home: Path, *, check_only: bool) -> int:
|
|
155
|
+
updated = 0
|
|
156
|
+
mappings = _mappings_for_tool(plan.tool, data_root, home)
|
|
157
|
+
targets = {m.dst for m in mappings if m.dst in plan.changed or m.dst in plan.added}
|
|
158
|
+
|
|
159
|
+
for mapping in mappings:
|
|
160
|
+
if mapping.dst not in targets:
|
|
161
|
+
continue
|
|
162
|
+
rel = mapping.dst.relative_to(home) if mapping.dst.is_relative_to(home) else mapping.dst
|
|
163
|
+
if check_only:
|
|
164
|
+
print(f" ~ would update: ~/{rel}")
|
|
165
|
+
updated += 1
|
|
166
|
+
continue
|
|
167
|
+
mapping.dst.parent.mkdir(parents=True, exist_ok=True)
|
|
168
|
+
shutil.copy2(mapping.src, mapping.dst)
|
|
169
|
+
print(f" ✓ updated: ~/{rel}")
|
|
170
|
+
updated += 1
|
|
171
|
+
return updated
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
def _parse_args(args: list[str]):
|
|
175
|
+
tools: list[str] = []
|
|
176
|
+
check_only = False
|
|
177
|
+
pin: str | None = None
|
|
178
|
+
requested = ""
|
|
179
|
+
|
|
180
|
+
i = 0
|
|
181
|
+
while i < len(args):
|
|
182
|
+
arg = args[i]
|
|
183
|
+
if arg in ("-h", "--help"):
|
|
184
|
+
print(__doc__)
|
|
185
|
+
return _PARSE_HELP
|
|
186
|
+
if arg == "--check":
|
|
187
|
+
check_only = True
|
|
188
|
+
elif arg == "--tools":
|
|
189
|
+
if i + 1 >= len(args):
|
|
190
|
+
print(" ✗ --tools requires an argument", file=sys.stderr)
|
|
191
|
+
return _PARSE_ERROR
|
|
192
|
+
requested = args[i + 1]
|
|
193
|
+
i += 1
|
|
194
|
+
elif arg == "--pin":
|
|
195
|
+
if i + 1 >= len(args):
|
|
196
|
+
print(" ✗ --pin requires an argument", file=sys.stderr)
|
|
197
|
+
return _PARSE_ERROR
|
|
198
|
+
pin = args[i + 1]
|
|
199
|
+
i += 1
|
|
200
|
+
else:
|
|
201
|
+
print(f" ✗ Unknown option: {arg}", file=sys.stderr)
|
|
202
|
+
return _PARSE_ERROR
|
|
203
|
+
i += 1
|
|
204
|
+
|
|
205
|
+
if requested:
|
|
206
|
+
tools = [t.strip() for t in requested.split(",") if t.strip()]
|
|
207
|
+
return tools, check_only, pin
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
def cmd_update(args: list[str]) -> int:
|
|
211
|
+
"""Refresh installed profiles from toolkit data."""
|
|
212
|
+
result = _parse_args(args)
|
|
213
|
+
if result is _PARSE_HELP:
|
|
214
|
+
return 0
|
|
215
|
+
if result is _PARSE_ERROR:
|
|
216
|
+
return 2
|
|
217
|
+
|
|
218
|
+
tools, check_only, pin = result
|
|
219
|
+
|
|
220
|
+
print()
|
|
221
|
+
print("agent-toolkit update")
|
|
222
|
+
|
|
223
|
+
# Refresh capability data cache when pinned or stale
|
|
224
|
+
if pin:
|
|
225
|
+
from agent_toolkit.data_sync import download_data
|
|
226
|
+
|
|
227
|
+
reset_toolkit_root()
|
|
228
|
+
try:
|
|
229
|
+
download_data(pin, force=True)
|
|
230
|
+
except RuntimeError as exc:
|
|
231
|
+
print(f" ✗ {exc}", file=sys.stderr)
|
|
232
|
+
return 1
|
|
233
|
+
else:
|
|
234
|
+
from agent_toolkit import __version__
|
|
235
|
+
from agent_toolkit._paths import _offline_mode
|
|
236
|
+
from agent_toolkit.data_sync import cached_version, download_data
|
|
237
|
+
|
|
238
|
+
cv = cached_version()
|
|
239
|
+
if cv is None or cv.lstrip("v") != __version__.lstrip("v"):
|
|
240
|
+
if _offline_mode():
|
|
241
|
+
print(" ⚠ Data refresh skipped: offline mode (AGENT_TOOLKIT_OFFLINE)")
|
|
242
|
+
else:
|
|
243
|
+
try:
|
|
244
|
+
download_data(__version__, force=True, quiet=check_only)
|
|
245
|
+
reset_toolkit_root()
|
|
246
|
+
except (RuntimeError, OSError) as exc:
|
|
247
|
+
print(f" ⚠ Data refresh skipped: {exc}")
|
|
248
|
+
|
|
249
|
+
try:
|
|
250
|
+
data_root = toolkit_root()
|
|
251
|
+
except EnvironmentError as exc:
|
|
252
|
+
print(f" ✗ {exc}", file=sys.stderr)
|
|
253
|
+
return 1
|
|
254
|
+
|
|
255
|
+
print(f" Data: {data_root}")
|
|
256
|
+
if check_only:
|
|
257
|
+
print(" [check] Dry run — no files will be written")
|
|
258
|
+
|
|
259
|
+
if not tools:
|
|
260
|
+
tools = _detect_installed_tools()
|
|
261
|
+
if not tools:
|
|
262
|
+
print(" ⚠ No installed tools detected. Use --tools to specify targets.")
|
|
263
|
+
return 1
|
|
264
|
+
print(f" Tools: {', '.join(tools)}")
|
|
265
|
+
|
|
266
|
+
home = Path.home()
|
|
267
|
+
total_changes = 0
|
|
268
|
+
any_errors = False
|
|
269
|
+
|
|
270
|
+
for tool in tools:
|
|
271
|
+
if tool not in _VALID_TOOLS:
|
|
272
|
+
print(f" ⚠ Unknown tool: {tool}")
|
|
273
|
+
any_errors = True
|
|
274
|
+
continue
|
|
275
|
+
|
|
276
|
+
plan = _plan_tool_update(tool, data_root, home)
|
|
277
|
+
if plan is None:
|
|
278
|
+
print(f" ⚠ No profile data for: {tool}")
|
|
279
|
+
continue
|
|
280
|
+
|
|
281
|
+
pending = len(plan.changed) + len(plan.added)
|
|
282
|
+
if pending == 0:
|
|
283
|
+
print(f" ✓ {tool}: up to date ({len(plan.up_to_date)} files)")
|
|
284
|
+
continue
|
|
285
|
+
|
|
286
|
+
print(f" → {tool}: {len(plan.changed)} changed, {len(plan.added)} new")
|
|
287
|
+
total_changes += _apply_plan(plan, data_root, home, check_only=check_only)
|
|
288
|
+
|
|
289
|
+
print()
|
|
290
|
+
if check_only:
|
|
291
|
+
print(f" {total_changes} file(s) would be updated")
|
|
292
|
+
return 1 if total_changes else 0
|
|
293
|
+
|
|
294
|
+
if total_changes:
|
|
295
|
+
print(f" Updated {total_changes} file(s)")
|
|
296
|
+
else:
|
|
297
|
+
print(" All profiles up to date")
|
|
298
|
+
return 1 if any_errors else 0
|