agent-devkit 0.1.5 → 0.2.0
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.
- package/README.md +14 -2
- package/package.json +1 -1
- package/runtime/README.md +127 -6
- package/runtime/agent +5 -0
- package/runtime/agents/README.md +34 -0
- package/runtime/agents/agent-devkit-agent-builder/AGENTS.md +24 -0
- package/runtime/agents/agent-devkit-agent-builder/README.md +37 -0
- package/runtime/agents/agent-devkit-agent-builder/agent.yaml +46 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/plan-agent/capability.yaml +29 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/plan-agent/decision-rules.md +7 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/plan-agent/runner.py +33 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/plan-agent/workflow.md +8 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/scaffold-agent/capability.yaml +31 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/scaffold-agent/decision-rules.md +9 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/scaffold-agent/runner.py +39 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/scaffold-agent/workflow.md +8 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/validate-agent-contract/capability.yaml +28 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/validate-agent-contract/decision-rules.md +6 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/validate-agent-contract/runner.py +33 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/validate-agent-contract/workflow.md +7 -0
- package/runtime/agents/agent-devkit-agent-builder/infra/integrations/agent-devkit/agent_builder_repository.py +527 -0
- package/runtime/agents/agent-devkit-agent-builder/knowledge/context.md +15 -0
- package/runtime/agents/agent-devkit-agent-builder/knowledge/policies.yaml +11 -0
- package/runtime/agents/agent-devkit-agent-builder/knowledge/system.md +11 -0
- package/runtime/agents/agent-devkit-agent-builder/templates/agent-plan-output.md +20 -0
- package/runtime/agents/agent-devkit-agent-builder/templates/scaffold-plan-output.md +13 -0
- package/runtime/agents/agent-devkit-agent-builder/templates/validation-report-output.md +13 -0
- package/runtime/agents/agent-devkit-agent-builder/tests/test_runners.py +188 -0
- package/runtime/agents/automation-architect/AGENTS.md +11 -0
- package/runtime/agents/automation-architect/README.md +27 -0
- package/runtime/agents/automation-architect/agent.yaml +57 -0
- package/runtime/agents/automation-architect/capabilities/classify-automation-request/capability.yaml +35 -0
- package/runtime/agents/automation-architect/capabilities/classify-automation-request/decision-rules.md +10 -0
- package/runtime/agents/automation-architect/capabilities/classify-automation-request/runner.py +37 -0
- package/runtime/agents/automation-architect/capabilities/classify-automation-request/workflow.md +7 -0
- package/runtime/agents/automation-architect/capabilities/delegate-automation-build/capability.yaml +34 -0
- package/runtime/agents/automation-architect/capabilities/delegate-automation-build/decision-rules.md +7 -0
- package/runtime/agents/automation-architect/capabilities/delegate-automation-build/runner.py +37 -0
- package/runtime/agents/automation-architect/capabilities/delegate-automation-build/workflow.md +6 -0
- package/runtime/agents/automation-architect/capabilities/plan-automation-solution/capability.yaml +35 -0
- package/runtime/agents/automation-architect/capabilities/plan-automation-solution/decision-rules.md +7 -0
- package/runtime/agents/automation-architect/capabilities/plan-automation-solution/runner.py +37 -0
- package/runtime/agents/automation-architect/capabilities/plan-automation-solution/workflow.md +7 -0
- package/runtime/agents/automation-architect/capabilities/review-automation-solution/capability.yaml +36 -0
- package/runtime/agents/automation-architect/capabilities/review-automation-solution/decision-rules.md +7 -0
- package/runtime/agents/automation-architect/capabilities/review-automation-solution/runner.py +39 -0
- package/runtime/agents/automation-architect/capabilities/review-automation-solution/workflow.md +7 -0
- package/runtime/agents/automation-architect/infra/integrations/automation-architecture/automation_architecture_repository.py +481 -0
- package/runtime/agents/automation-architect/knowledge/context.md +22 -0
- package/runtime/agents/automation-architect/knowledge/policies.yaml +20 -0
- package/runtime/agents/automation-architect/knowledge/system.md +8 -0
- package/runtime/agents/automation-architect/templates/automation-classification.md +6 -0
- package/runtime/agents/automation-architect/templates/automation-plan.md +5 -0
- package/runtime/agents/automation-architect/tests/test_runners.py +135 -0
- package/runtime/agents/aws-architecture-analyst/agent.yaml +17 -4
- package/runtime/agents/aws-cloudwatch-log-analyzer/agent.yaml +12 -2
- package/runtime/agents/aws-cloudwatch-log-analyzer/capabilities/analyze-service-error/capability.yaml +16 -0
- package/runtime/agents/aws-lambda-builder/AGENTS.md +27 -0
- package/runtime/agents/aws-lambda-builder/README.md +21 -0
- package/runtime/agents/aws-lambda-builder/agent.yaml +46 -0
- package/runtime/agents/aws-lambda-builder/capabilities/deploy-lambda-plan/capability.yaml +18 -0
- package/runtime/agents/aws-lambda-builder/capabilities/deploy-lambda-plan/decision-rules.md +6 -0
- package/runtime/agents/aws-lambda-builder/capabilities/deploy-lambda-plan/runner.py +33 -0
- package/runtime/agents/aws-lambda-builder/capabilities/deploy-lambda-plan/workflow.md +6 -0
- package/runtime/agents/aws-lambda-builder/capabilities/generate-lambda-project/capability.yaml +20 -0
- package/runtime/agents/aws-lambda-builder/capabilities/generate-lambda-project/decision-rules.md +6 -0
- package/runtime/agents/aws-lambda-builder/capabilities/generate-lambda-project/runner.py +39 -0
- package/runtime/agents/aws-lambda-builder/capabilities/generate-lambda-project/workflow.md +7 -0
- package/runtime/agents/aws-lambda-builder/capabilities/package-lambda/capability.yaml +22 -0
- package/runtime/agents/aws-lambda-builder/capabilities/package-lambda/decision-rules.md +6 -0
- package/runtime/agents/aws-lambda-builder/capabilities/package-lambda/runner.py +41 -0
- package/runtime/agents/aws-lambda-builder/capabilities/package-lambda/workflow.md +6 -0
- package/runtime/agents/aws-lambda-builder/capabilities/plan-lambda/capability.yaml +18 -0
- package/runtime/agents/aws-lambda-builder/capabilities/plan-lambda/decision-rules.md +7 -0
- package/runtime/agents/aws-lambda-builder/capabilities/plan-lambda/runner.py +33 -0
- package/runtime/agents/aws-lambda-builder/capabilities/plan-lambda/workflow.md +6 -0
- package/runtime/agents/aws-lambda-builder/capabilities/review-lambda-security/capability.yaml +18 -0
- package/runtime/agents/aws-lambda-builder/capabilities/review-lambda-security/decision-rules.md +7 -0
- package/runtime/agents/aws-lambda-builder/capabilities/review-lambda-security/runner.py +33 -0
- package/runtime/agents/aws-lambda-builder/capabilities/review-lambda-security/workflow.md +5 -0
- package/runtime/agents/aws-lambda-builder/infra/integrations/aws-lambda/aws_lambda_repository.py +688 -0
- package/runtime/agents/aws-lambda-builder/knowledge/context.md +12 -0
- package/runtime/agents/aws-lambda-builder/knowledge/policies.yaml +23 -0
- package/runtime/agents/aws-lambda-builder/knowledge/system.md +10 -0
- package/runtime/agents/aws-lambda-builder/templates/lambda-deploy-plan.md +3 -0
- package/runtime/agents/aws-lambda-builder/templates/lambda-package.md +3 -0
- package/runtime/agents/aws-lambda-builder/templates/lambda-plan.md +3 -0
- package/runtime/agents/aws-lambda-builder/templates/lambda-readme.md +3 -0
- package/runtime/agents/aws-lambda-builder/templates/lambda-security-review.md +3 -0
- package/runtime/agents/aws-lambda-builder/tests/test_runners.py +355 -0
- package/runtime/agents/aws-operations-operator/agent.yaml +18 -6
- package/runtime/agents/aws-security-governance-auditor/agent.yaml +17 -5
- package/runtime/agents/azure-devops-orchestrator/agent.yaml +15 -2
- package/runtime/agents/azure-devops-orchestrator/capabilities/read-card/capability.yaml +29 -0
- package/runtime/agents/bpo-analyser/agent.yaml +12 -2
- package/runtime/agents/bpo-analyser/knowledge/policies.yaml +2 -2
- package/runtime/agents/data-scientist-analyst/agent.yaml +16 -4
- package/runtime/agents/data-scientist-analyst/capabilities/generate-data-report/capability.yaml +1 -1
- package/runtime/agents/data-scientist-analyst/capabilities/generate-reconciliation-report/capability.yaml +1 -1
- package/runtime/agents/data-scientist-analyst/capabilities/run-data-pipeline/capability.yaml +1 -1
- package/runtime/agents/data-scientist-analyst/infra/integrations/agent-bridge/methods/analyze-sql-source.yaml +1 -1
- package/runtime/agents/data-scientist-analyst/knowledge/policies.yaml +4 -4
- package/runtime/agents/data-scientist-analyst/knowledge/system.md +1 -1
- package/runtime/agents/data-scientist-analyst/tests/test_runners.py +1 -1
- package/runtime/agents/database-change-operator/agent.yaml +12 -1
- package/runtime/agents/docker-container-builder/AGENTS.md +27 -0
- package/runtime/agents/docker-container-builder/README.md +21 -0
- package/runtime/agents/docker-container-builder/agent.yaml +52 -0
- package/runtime/agents/docker-container-builder/capabilities/analyze-containerization-target/capability.yaml +18 -0
- package/runtime/agents/docker-container-builder/capabilities/analyze-containerization-target/decision-rules.md +6 -0
- package/runtime/agents/docker-container-builder/capabilities/analyze-containerization-target/runner.py +32 -0
- package/runtime/agents/docker-container-builder/capabilities/analyze-containerization-target/workflow.md +6 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-compose/capability.yaml +18 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-compose/decision-rules.md +7 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-compose/runner.py +32 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-compose/workflow.md +6 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-container-project-files/capability.yaml +20 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-container-project-files/decision-rules.md +7 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-container-project-files/runner.py +38 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-container-project-files/workflow.md +7 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-dockerfile/capability.yaml +18 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-dockerfile/decision-rules.md +6 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-dockerfile/runner.py +32 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-dockerfile/workflow.md +7 -0
- package/runtime/agents/docker-container-builder/capabilities/plan-image-build/capability.yaml +18 -0
- package/runtime/agents/docker-container-builder/capabilities/plan-image-build/decision-rules.md +6 -0
- package/runtime/agents/docker-container-builder/capabilities/plan-image-build/runner.py +32 -0
- package/runtime/agents/docker-container-builder/capabilities/plan-image-build/workflow.md +6 -0
- package/runtime/agents/docker-container-builder/capabilities/review-docker-security/capability.yaml +21 -0
- package/runtime/agents/docker-container-builder/capabilities/review-docker-security/decision-rules.md +6 -0
- package/runtime/agents/docker-container-builder/capabilities/review-docker-security/runner.py +43 -0
- package/runtime/agents/docker-container-builder/capabilities/review-docker-security/workflow.md +5 -0
- package/runtime/agents/docker-container-builder/infra/integrations/docker-container/docker_container_repository.py +837 -0
- package/runtime/agents/docker-container-builder/knowledge/context.md +21 -0
- package/runtime/agents/docker-container-builder/knowledge/policies.yaml +13 -0
- package/runtime/agents/docker-container-builder/knowledge/system.md +21 -0
- package/runtime/agents/docker-container-builder/templates/container-plan.md +4 -0
- package/runtime/agents/docker-container-builder/templates/container-review.md +4 -0
- package/runtime/agents/docker-container-builder/templates/docker-compose.md +5 -0
- package/runtime/agents/docker-container-builder/templates/docker-readme.md +3 -0
- package/runtime/agents/docker-container-builder/templates/dockerfile.md +5 -0
- package/runtime/agents/docker-container-builder/tests/test_runners.py +255 -0
- package/runtime/agents/drawio-diagram-builder/agent.yaml +11 -2
- package/runtime/agents/drawio-diagram-builder/capabilities/execute-diagram-delivery/capability.yaml +1 -1
- package/runtime/agents/drawio-diagram-builder/capabilities/read-azure-card-context/capability.yaml +1 -1
- package/runtime/agents/elasticsearch-log-analyzer/agent.yaml +14 -2
- package/runtime/agents/elasticsearch-log-analyzer/capabilities/analyze-service-errors/capability.yaml +14 -0
- package/runtime/agents/excel-workbook-builder/agent.yaml +10 -0
- package/runtime/agents/excel-workbook-builder/capabilities/create-template/capability.yaml +1 -1
- package/runtime/agents/excel-workbook-builder/capabilities/create-template/workflow.md +1 -1
- package/runtime/agents/excel-workbook-builder/capabilities/create-template-version/capability.yaml +1 -1
- package/runtime/agents/excel-workbook-builder/capabilities/generate-template-input-file/capability.yaml +1 -2
- package/runtime/agents/excel-workbook-builder/capabilities/refine-template/capability.yaml +1 -1
- package/runtime/agents/excel-workbook-builder/capabilities/register-template/capability.yaml +1 -2
- package/runtime/agents/excel-workbook-builder/capabilities/register-template/workflow.md +1 -1
- package/runtime/agents/execution-loop-builder/AGENTS.md +24 -0
- package/runtime/agents/execution-loop-builder/README.md +19 -0
- package/runtime/agents/execution-loop-builder/agent.yaml +49 -0
- package/runtime/agents/execution-loop-builder/capabilities/generate-loop-project-files/capability.yaml +20 -0
- package/runtime/agents/execution-loop-builder/capabilities/generate-loop-project-files/decision-rules.md +6 -0
- package/runtime/agents/execution-loop-builder/capabilities/generate-loop-project-files/runner.py +38 -0
- package/runtime/agents/execution-loop-builder/capabilities/generate-loop-project-files/workflow.md +7 -0
- package/runtime/agents/execution-loop-builder/capabilities/generate-loop-runner/capability.yaml +18 -0
- package/runtime/agents/execution-loop-builder/capabilities/generate-loop-runner/decision-rules.md +5 -0
- package/runtime/agents/execution-loop-builder/capabilities/generate-loop-runner/runner.py +32 -0
- package/runtime/agents/execution-loop-builder/capabilities/generate-loop-runner/workflow.md +6 -0
- package/runtime/agents/execution-loop-builder/capabilities/plan-execution-loop/capability.yaml +18 -0
- package/runtime/agents/execution-loop-builder/capabilities/plan-execution-loop/decision-rules.md +6 -0
- package/runtime/agents/execution-loop-builder/capabilities/plan-execution-loop/runner.py +32 -0
- package/runtime/agents/execution-loop-builder/capabilities/plan-execution-loop/workflow.md +6 -0
- package/runtime/agents/execution-loop-builder/capabilities/register-loop-task/capability.yaml +19 -0
- package/runtime/agents/execution-loop-builder/capabilities/register-loop-task/decision-rules.md +6 -0
- package/runtime/agents/execution-loop-builder/capabilities/register-loop-task/runner.py +36 -0
- package/runtime/agents/execution-loop-builder/capabilities/register-loop-task/workflow.md +6 -0
- package/runtime/agents/execution-loop-builder/capabilities/review-loop-safety/capability.yaml +19 -0
- package/runtime/agents/execution-loop-builder/capabilities/review-loop-safety/decision-rules.md +6 -0
- package/runtime/agents/execution-loop-builder/capabilities/review-loop-safety/runner.py +39 -0
- package/runtime/agents/execution-loop-builder/capabilities/review-loop-safety/workflow.md +5 -0
- package/runtime/agents/execution-loop-builder/infra/integrations/execution-loop/execution_loop_repository.py +608 -0
- package/runtime/agents/execution-loop-builder/knowledge/context.md +26 -0
- package/runtime/agents/execution-loop-builder/knowledge/policies.yaml +13 -0
- package/runtime/agents/execution-loop-builder/knowledge/system.md +19 -0
- package/runtime/agents/execution-loop-builder/templates/loop-plan.md +3 -0
- package/runtime/agents/execution-loop-builder/templates/loop-readme.md +3 -0
- package/runtime/agents/execution-loop-builder/templates/loop-review.md +3 -0
- package/runtime/agents/execution-loop-builder/templates/loop-runner.py +2 -0
- package/runtime/agents/execution-loop-builder/tests/test_runners.py +274 -0
- package/runtime/agents/execution-reviewer/AGENTS.md +8 -0
- package/runtime/agents/execution-reviewer/README.md +13 -0
- package/runtime/agents/execution-reviewer/agent.yaml +27 -0
- package/runtime/agents/execution-reviewer/capabilities/review-agent-result/capability.yaml +14 -0
- package/runtime/agents/execution-reviewer/capabilities/review-agent-result/decision-rules.md +6 -0
- package/runtime/agents/execution-reviewer/capabilities/review-agent-result/workflow.md +7 -0
- package/runtime/agents/execution-reviewer/capabilities/review-final-output/capability.yaml +14 -0
- package/runtime/agents/execution-reviewer/capabilities/review-final-output/decision-rules.md +6 -0
- package/runtime/agents/execution-reviewer/capabilities/review-final-output/workflow.md +7 -0
- package/runtime/agents/execution-reviewer/capabilities/review-plan/capability.yaml +14 -0
- package/runtime/agents/execution-reviewer/capabilities/review-plan/decision-rules.md +6 -0
- package/runtime/agents/execution-reviewer/capabilities/review-plan/workflow.md +7 -0
- package/runtime/agents/execution-reviewer/infra/README.md +4 -0
- package/runtime/agents/execution-reviewer/knowledge/context.md +6 -0
- package/runtime/agents/execution-reviewer/knowledge/system.md +18 -0
- package/runtime/agents/execution-reviewer/templates/README.md +4 -0
- package/runtime/agents/figma-ui-ux-product-designer/agent.yaml +17 -5
- package/runtime/agents/figma-ui-ux-product-designer/capabilities/analyze-product-context/capability.yaml +1 -1
- package/runtime/agents/figma-ui-ux-product-designer/capabilities/conduct-design-interview/capability.yaml +1 -1
- package/runtime/agents/figma-ui-ux-product-designer/capabilities/conduct-design-review-session/capability.yaml +1 -1
- package/runtime/agents/figma-ui-ux-product-designer/capabilities/generate-dev-handoff/capability.yaml +1 -1
- package/runtime/agents/figma-ui-ux-product-designer/capabilities/generate-user-journey-diagram/capability.yaml +1 -1
- package/runtime/agents/figma-ui-ux-product-designer/capabilities/ingest-design-source/capability.yaml +1 -1
- package/runtime/agents/figma-ui-ux-product-designer/capabilities/triage-design-feedback/capability.yaml +1 -1
- package/runtime/agents/generic-agent-builder/AGENTS.md +20 -0
- package/runtime/agents/generic-agent-builder/README.md +40 -0
- package/runtime/agents/generic-agent-builder/agent.yaml +43 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-agent-instructions/capability.yaml +18 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-agent-instructions/decision-rules.md +5 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-agent-instructions/runner.py +33 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-agent-instructions/workflow.md +6 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-project-agent-files/capability.yaml +20 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-project-agent-files/decision-rules.md +6 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-project-agent-files/runner.py +39 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-project-agent-files/workflow.md +7 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-skill/capability.yaml +18 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-skill/decision-rules.md +5 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-skill/runner.py +33 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-skill/workflow.md +5 -0
- package/runtime/agents/generic-agent-builder/capabilities/plan-generic-agent/capability.yaml +18 -0
- package/runtime/agents/generic-agent-builder/capabilities/plan-generic-agent/decision-rules.md +6 -0
- package/runtime/agents/generic-agent-builder/capabilities/plan-generic-agent/runner.py +33 -0
- package/runtime/agents/generic-agent-builder/capabilities/plan-generic-agent/workflow.md +6 -0
- package/runtime/agents/generic-agent-builder/capabilities/review-generic-agent/capability.yaml +20 -0
- package/runtime/agents/generic-agent-builder/capabilities/review-generic-agent/decision-rules.md +6 -0
- package/runtime/agents/generic-agent-builder/capabilities/review-generic-agent/runner.py +40 -0
- package/runtime/agents/generic-agent-builder/capabilities/review-generic-agent/workflow.md +7 -0
- package/runtime/agents/generic-agent-builder/infra/integrations/generic-agent/generic_agent_repository.py +445 -0
- package/runtime/agents/generic-agent-builder/knowledge/context.md +11 -0
- package/runtime/agents/generic-agent-builder/knowledge/policies.yaml +12 -0
- package/runtime/agents/generic-agent-builder/knowledge/system.md +17 -0
- package/runtime/agents/generic-agent-builder/templates/generic-agent-instructions.md +17 -0
- package/runtime/agents/generic-agent-builder/templates/generic-review-report.md +13 -0
- package/runtime/agents/generic-agent-builder/templates/generic-skill.md +14 -0
- package/runtime/agents/generic-agent-builder/tests/test_runners.py +220 -0
- package/runtime/agents/github-pr-reviewer/agent.yaml +17 -5
- package/runtime/agents/github-pr-reviewer/capabilities/create-review-automation/capability.yaml +1 -1
- package/runtime/agents/github-pr-reviewer/capabilities/inspect-pr/capability.yaml +1 -1
- package/runtime/agents/github-pr-reviewer/capabilities/list-review-requests/capability.yaml +1 -1
- package/runtime/agents/github-pr-reviewer/capabilities/review-pr-diff/capability.yaml +1 -1
- package/runtime/agents/knowledge-generator/agent.yaml +13 -3
- package/runtime/agents/knowledge-generator/capabilities/generate-knowledge/capability.yaml +1 -1
- package/runtime/agents/local-llm-operator/AGENTS.md +8 -0
- package/runtime/agents/local-llm-operator/README.md +12 -0
- package/runtime/agents/local-llm-operator/agent.yaml +28 -0
- package/runtime/agents/local-llm-operator/capabilities/delegate-operational-task/capability.yaml +14 -0
- package/runtime/agents/local-llm-operator/capabilities/delegate-operational-task/decision-rules.md +6 -0
- package/runtime/agents/local-llm-operator/capabilities/delegate-operational-task/workflow.md +7 -0
- package/runtime/agents/local-llm-operator/capabilities/inspect-local-models/capability.yaml +14 -0
- package/runtime/agents/local-llm-operator/capabilities/inspect-local-models/decision-rules.md +5 -0
- package/runtime/agents/local-llm-operator/capabilities/inspect-local-models/workflow.md +6 -0
- package/runtime/agents/local-llm-operator/capabilities/select-local-worker/capability.yaml +14 -0
- package/runtime/agents/local-llm-operator/capabilities/select-local-worker/decision-rules.md +6 -0
- package/runtime/agents/local-llm-operator/capabilities/select-local-worker/workflow.md +7 -0
- package/runtime/agents/local-llm-operator/infra/README.md +4 -0
- package/runtime/agents/local-llm-operator/knowledge/context.md +6 -0
- package/runtime/agents/local-llm-operator/knowledge/system.md +18 -0
- package/runtime/agents/local-llm-operator/templates/README.md +4 -0
- package/runtime/agents/n1-support-agent/agent.yaml +40 -1
- package/runtime/agents/n2-support-agent/agent.yaml +41 -2
- package/runtime/agents/n2-support-agent/knowledge/policies.yaml +2 -2
- package/runtime/agents/notification-operator/AGENTS.md +11 -0
- package/runtime/agents/notification-operator/README.md +15 -0
- package/runtime/agents/notification-operator/agent.yaml +43 -0
- package/runtime/agents/notification-operator/capabilities/configure-notification-channel/capability.yaml +19 -0
- package/runtime/agents/notification-operator/capabilities/configure-notification-channel/decision-rules.md +6 -0
- package/runtime/agents/notification-operator/capabilities/configure-notification-channel/runner.py +33 -0
- package/runtime/agents/notification-operator/capabilities/configure-notification-channel/workflow.md +6 -0
- package/runtime/agents/notification-operator/capabilities/format-task-completion-notification/capability.yaml +25 -0
- package/runtime/agents/notification-operator/capabilities/format-task-completion-notification/decision-rules.md +7 -0
- package/runtime/agents/notification-operator/capabilities/format-task-completion-notification/runner.py +49 -0
- package/runtime/agents/notification-operator/capabilities/format-task-completion-notification/workflow.md +6 -0
- package/runtime/agents/notification-operator/capabilities/send-task-completion-notification/capability.yaml +27 -0
- package/runtime/agents/notification-operator/capabilities/send-task-completion-notification/decision-rules.md +6 -0
- package/runtime/agents/notification-operator/capabilities/send-task-completion-notification/runner.py +68 -0
- package/runtime/agents/notification-operator/capabilities/send-task-completion-notification/workflow.md +7 -0
- package/runtime/agents/notification-operator/infra/README.md +6 -0
- package/runtime/agents/notification-operator/knowledge/context.md +10 -0
- package/runtime/agents/notification-operator/knowledge/policies.yaml +9 -0
- package/runtime/agents/notification-operator/knowledge/system.md +7 -0
- package/runtime/agents/notification-operator/templates/README.md +6 -0
- package/runtime/agents/notification-operator/tests/test_runners.py +108 -0
- package/runtime/agents/playwright-automation-builder/AGENTS.md +23 -0
- package/runtime/agents/playwright-automation-builder/README.md +43 -0
- package/runtime/agents/playwright-automation-builder/agent.yaml +48 -0
- package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-project-files/capability.yaml +20 -0
- package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-project-files/decision-rules.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-project-files/runner.py +38 -0
- package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-project-files/workflow.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-script/capability.yaml +18 -0
- package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-script/decision-rules.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-script/runner.py +32 -0
- package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-script/workflow.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/plan-playwright-automation/capability.yaml +18 -0
- package/runtime/agents/playwright-automation-builder/capabilities/plan-playwright-automation/decision-rules.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/plan-playwright-automation/runner.py +32 -0
- package/runtime/agents/playwright-automation-builder/capabilities/plan-playwright-automation/workflow.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/review-playwright-artifacts/capability.yaml +19 -0
- package/runtime/agents/playwright-automation-builder/capabilities/review-playwright-artifacts/decision-rules.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/review-playwright-artifacts/runner.py +33 -0
- package/runtime/agents/playwright-automation-builder/capabilities/review-playwright-artifacts/workflow.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/run-playwright-check/capability.yaml +22 -0
- package/runtime/agents/playwright-automation-builder/capabilities/run-playwright-check/decision-rules.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/run-playwright-check/runner.py +40 -0
- package/runtime/agents/playwright-automation-builder/capabilities/run-playwright-check/workflow.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/wrap-playwright-as-capability/capability.yaml +22 -0
- package/runtime/agents/playwright-automation-builder/capabilities/wrap-playwright-as-capability/decision-rules.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/wrap-playwright-as-capability/runner.py +42 -0
- package/runtime/agents/playwright-automation-builder/capabilities/wrap-playwright-as-capability/workflow.md +6 -0
- package/runtime/agents/playwright-automation-builder/infra/integrations/playwright-automation/playwright_automation_repository.py +865 -0
- package/runtime/agents/playwright-automation-builder/knowledge/context.md +19 -0
- package/runtime/agents/playwright-automation-builder/knowledge/policies.yaml +25 -0
- package/runtime/agents/playwright-automation-builder/knowledge/system.md +19 -0
- package/runtime/agents/playwright-automation-builder/templates/capability-wrapper.md +4 -0
- package/runtime/agents/playwright-automation-builder/templates/playwright-automation.py +12 -0
- package/runtime/agents/playwright-automation-builder/templates/playwright-readme.md +13 -0
- package/runtime/agents/playwright-automation-builder/templates/playwright-review-report.md +9 -0
- package/runtime/agents/playwright-automation-builder/templates/playwright-test.py +2 -0
- package/runtime/agents/playwright-automation-builder/tests/test_runners.py +261 -0
- package/runtime/agents/postgres-data-analyzer/agent.yaml +13 -2
- package/runtime/agents/presentation-deck-builder/agent.yaml +14 -3
- package/runtime/agents/presentation-deck-builder/capabilities/create-template/capability.yaml +1 -1
- package/runtime/agents/presentation-deck-builder/capabilities/create-template-version/capability.yaml +1 -1
- package/runtime/agents/presentation-deck-builder/capabilities/generate-template-input-file/capability.yaml +1 -1
- package/runtime/agents/presentation-deck-builder/capabilities/refine-template/capability.yaml +1 -1
- package/runtime/agents/presentation-deck-builder/capabilities/register-template/capability.yaml +1 -1
- package/runtime/agents/presentation-deck-builder/knowledge/prompts/create-template.md +1 -1
- package/runtime/agents/presentation-deck-builder/knowledge/prompts/generate-template-input-file.md +1 -1
- package/runtime/agents/provider-configurator/AGENTS.md +8 -0
- package/runtime/agents/provider-configurator/README.md +5 -0
- package/runtime/agents/provider-configurator/agent.yaml +27 -0
- package/runtime/agents/provider-configurator/capabilities/collect-provider-credentials/capability.yaml +14 -0
- package/runtime/agents/provider-configurator/capabilities/collect-provider-credentials/decision-rules.md +6 -0
- package/runtime/agents/provider-configurator/capabilities/collect-provider-credentials/workflow.md +7 -0
- package/runtime/agents/provider-configurator/capabilities/configure-provider-source/capability.yaml +14 -0
- package/runtime/agents/provider-configurator/capabilities/configure-provider-source/decision-rules.md +6 -0
- package/runtime/agents/provider-configurator/capabilities/configure-provider-source/workflow.md +8 -0
- package/runtime/agents/provider-configurator/capabilities/validate-provider-readiness/capability.yaml +14 -0
- package/runtime/agents/provider-configurator/capabilities/validate-provider-readiness/decision-rules.md +6 -0
- package/runtime/agents/provider-configurator/capabilities/validate-provider-readiness/workflow.md +7 -0
- package/runtime/agents/provider-configurator/infra/README.md +5 -0
- package/runtime/agents/provider-configurator/knowledge/context.md +8 -0
- package/runtime/agents/provider-configurator/knowledge/system.md +19 -0
- package/runtime/agents/provider-configurator/templates/README.md +4 -0
- package/runtime/agents/pyautogui-automation-builder/AGENTS.md +32 -0
- package/runtime/agents/pyautogui-automation-builder/README.md +44 -0
- package/runtime/agents/pyautogui-automation-builder/agent.yaml +45 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-project-files/capability.yaml +20 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-project-files/decision-rules.md +6 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-project-files/runner.py +39 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-project-files/workflow.md +7 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-script/capability.yaml +18 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-script/decision-rules.md +7 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-script/runner.py +33 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-script/workflow.md +7 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/plan-desktop-automation/capability.yaml +18 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/plan-desktop-automation/decision-rules.md +8 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/plan-desktop-automation/runner.py +33 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/plan-desktop-automation/workflow.md +9 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/review-pyautogui-script/capability.yaml +20 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/review-pyautogui-script/decision-rules.md +8 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/review-pyautogui-script/runner.py +43 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/review-pyautogui-script/workflow.md +7 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/wrap-pyautogui-as-capability/capability.yaml +22 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/wrap-pyautogui-as-capability/decision-rules.md +6 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/wrap-pyautogui-as-capability/runner.py +43 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/wrap-pyautogui-as-capability/workflow.md +7 -0
- package/runtime/agents/pyautogui-automation-builder/infra/integrations/pyautogui-automation/pyautogui_automation_repository.py +856 -0
- package/runtime/agents/pyautogui-automation-builder/knowledge/context.md +17 -0
- package/runtime/agents/pyautogui-automation-builder/knowledge/policies.yaml +24 -0
- package/runtime/agents/pyautogui-automation-builder/knowledge/system.md +13 -0
- package/runtime/agents/pyautogui-automation-builder/templates/capability-wrapper.md +3 -0
- package/runtime/agents/pyautogui-automation-builder/templates/pyautogui-automation.py +12 -0
- package/runtime/agents/pyautogui-automation-builder/templates/pyautogui-readme.md +3 -0
- package/runtime/agents/pyautogui-automation-builder/templates/pyautogui-review-report.md +3 -0
- package/runtime/agents/pyautogui-automation-builder/templates/pyautogui-test.py +2 -0
- package/runtime/agents/pyautogui-automation-builder/tests/test_runners.py +376 -0
- package/runtime/agents/python-automation-builder/AGENTS.md +25 -0
- package/runtime/agents/python-automation-builder/README.md +43 -0
- package/runtime/agents/python-automation-builder/agent.yaml +45 -0
- package/runtime/agents/python-automation-builder/capabilities/generate-automation-project-files/capability.yaml +20 -0
- package/runtime/agents/python-automation-builder/capabilities/generate-automation-project-files/decision-rules.md +6 -0
- package/runtime/agents/python-automation-builder/capabilities/generate-automation-project-files/runner.py +39 -0
- package/runtime/agents/python-automation-builder/capabilities/generate-automation-project-files/workflow.md +7 -0
- package/runtime/agents/python-automation-builder/capabilities/generate-python-automation/capability.yaml +18 -0
- package/runtime/agents/python-automation-builder/capabilities/generate-python-automation/decision-rules.md +5 -0
- package/runtime/agents/python-automation-builder/capabilities/generate-python-automation/runner.py +33 -0
- package/runtime/agents/python-automation-builder/capabilities/generate-python-automation/workflow.md +5 -0
- package/runtime/agents/python-automation-builder/capabilities/plan-python-automation/capability.yaml +18 -0
- package/runtime/agents/python-automation-builder/capabilities/plan-python-automation/decision-rules.md +6 -0
- package/runtime/agents/python-automation-builder/capabilities/plan-python-automation/runner.py +33 -0
- package/runtime/agents/python-automation-builder/capabilities/plan-python-automation/workflow.md +6 -0
- package/runtime/agents/python-automation-builder/capabilities/review-python-automation/capability.yaml +20 -0
- package/runtime/agents/python-automation-builder/capabilities/review-python-automation/decision-rules.md +6 -0
- package/runtime/agents/python-automation-builder/capabilities/review-python-automation/runner.py +43 -0
- package/runtime/agents/python-automation-builder/capabilities/review-python-automation/workflow.md +5 -0
- package/runtime/agents/python-automation-builder/capabilities/wrap-automation-as-capability/capability.yaml +22 -0
- package/runtime/agents/python-automation-builder/capabilities/wrap-automation-as-capability/decision-rules.md +6 -0
- package/runtime/agents/python-automation-builder/capabilities/wrap-automation-as-capability/runner.py +43 -0
- package/runtime/agents/python-automation-builder/capabilities/wrap-automation-as-capability/workflow.md +6 -0
- package/runtime/agents/python-automation-builder/infra/integrations/python-automation/python_automation_repository.py +717 -0
- package/runtime/agents/python-automation-builder/knowledge/context.md +15 -0
- package/runtime/agents/python-automation-builder/knowledge/policies.yaml +12 -0
- package/runtime/agents/python-automation-builder/knowledge/system.md +19 -0
- package/runtime/agents/python-automation-builder/templates/automation-readme.md +13 -0
- package/runtime/agents/python-automation-builder/templates/automation-review-report.md +13 -0
- package/runtime/agents/python-automation-builder/templates/automation-test.py +9 -0
- package/runtime/agents/python-automation-builder/templates/automation.py +19 -0
- package/runtime/agents/python-automation-builder/templates/capability-wrapper.md +4 -0
- package/runtime/agents/python-automation-builder/tests/test_runners.py +292 -0
- package/runtime/agents/selenium-automation-builder/AGENTS.md +27 -0
- package/runtime/agents/selenium-automation-builder/README.md +40 -0
- package/runtime/agents/selenium-automation-builder/agent.yaml +45 -0
- package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-project-files/capability.yaml +20 -0
- package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-project-files/decision-rules.md +6 -0
- package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-project-files/runner.py +39 -0
- package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-project-files/workflow.md +7 -0
- package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-script/capability.yaml +18 -0
- package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-script/decision-rules.md +6 -0
- package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-script/runner.py +33 -0
- package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-script/workflow.md +6 -0
- package/runtime/agents/selenium-automation-builder/capabilities/plan-selenium-automation/capability.yaml +18 -0
- package/runtime/agents/selenium-automation-builder/capabilities/plan-selenium-automation/decision-rules.md +6 -0
- package/runtime/agents/selenium-automation-builder/capabilities/plan-selenium-automation/runner.py +33 -0
- package/runtime/agents/selenium-automation-builder/capabilities/plan-selenium-automation/workflow.md +6 -0
- package/runtime/agents/selenium-automation-builder/capabilities/review-selenium-script/capability.yaml +20 -0
- package/runtime/agents/selenium-automation-builder/capabilities/review-selenium-script/decision-rules.md +6 -0
- package/runtime/agents/selenium-automation-builder/capabilities/review-selenium-script/runner.py +40 -0
- package/runtime/agents/selenium-automation-builder/capabilities/review-selenium-script/workflow.md +6 -0
- package/runtime/agents/selenium-automation-builder/capabilities/wrap-selenium-as-capability/capability.yaml +22 -0
- package/runtime/agents/selenium-automation-builder/capabilities/wrap-selenium-as-capability/decision-rules.md +6 -0
- package/runtime/agents/selenium-automation-builder/capabilities/wrap-selenium-as-capability/runner.py +43 -0
- package/runtime/agents/selenium-automation-builder/capabilities/wrap-selenium-as-capability/workflow.md +6 -0
- package/runtime/agents/selenium-automation-builder/infra/integrations/selenium-automation/selenium_automation_repository.py +793 -0
- package/runtime/agents/selenium-automation-builder/knowledge/context.md +15 -0
- package/runtime/agents/selenium-automation-builder/knowledge/policies.yaml +17 -0
- package/runtime/agents/selenium-automation-builder/knowledge/system.md +18 -0
- package/runtime/agents/selenium-automation-builder/templates/capability-wrapper.md +4 -0
- package/runtime/agents/selenium-automation-builder/templates/selenium-automation.py +20 -0
- package/runtime/agents/selenium-automation-builder/templates/selenium-readme.md +13 -0
- package/runtime/agents/selenium-automation-builder/templates/selenium-review-report.md +13 -0
- package/runtime/agents/selenium-automation-builder/templates/selenium-test.py +9 -0
- package/runtime/agents/selenium-automation-builder/tests/test_runners.py +282 -0
- package/runtime/agents/software-specification-analyst/agent.yaml +17 -4
- package/runtime/agents/software-specification-analyst/capabilities/analyze-multiple-projects/capability.yaml +1 -1
- package/runtime/agents/software-specification-analyst/capabilities/analyze-project-context/capability.yaml +1 -1
- package/runtime/agents/software-specification-analyst/capabilities/conduct-requirements-interview/capability.yaml +1 -1
- package/runtime/agents/software-specification-analyst/capabilities/create-complete-spec/capability.yaml +1 -1
- package/runtime/agents/software-specification-analyst/capabilities/create-final-spec-from-analysis/capability.yaml +1 -1
- package/runtime/agents/software-specification-analyst/capabilities/create-functional-spec/capability.yaml +11 -0
- package/runtime/agents/software-specification-analyst/capabilities/create-technical-spec/capability.yaml +12 -0
- package/runtime/agents/software-specification-analyst/capabilities/refine-analysis-with-feedback/capability.yaml +1 -1
- package/runtime/agents/software-specification-analyst/capabilities/write-user-stories/capability.yaml +12 -0
- package/runtime/agents/sqlserver-change-operator/agent.yaml +12 -1
- package/runtime/agents/sqlserver-data-analyzer/agent.yaml +13 -2
- package/runtime/agents/supabase-project-analyst/AGENTS.md +29 -0
- package/runtime/agents/supabase-project-analyst/README.md +23 -0
- package/runtime/agents/supabase-project-analyst/agent.yaml +53 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-auth-security/capability.yaml +18 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-auth-security/decision-rules.md +5 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-auth-security/runner.py +32 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-auth-security/workflow.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-rls-policies/capability.yaml +18 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-rls-policies/decision-rules.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-rls-policies/runner.py +32 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-rls-policies/workflow.md +7 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-storage-policies/capability.yaml +18 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-storage-policies/decision-rules.md +5 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-storage-policies/runner.py +32 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-storage-policies/workflow.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/generate-supabase-report/capability.yaml +18 -0
- package/runtime/agents/supabase-project-analyst/capabilities/generate-supabase-report/decision-rules.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/generate-supabase-report/runner.py +32 -0
- package/runtime/agents/supabase-project-analyst/capabilities/generate-supabase-report/workflow.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/inspect-supabase-project/capability.yaml +19 -0
- package/runtime/agents/supabase-project-analyst/capabilities/inspect-supabase-project/decision-rules.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/inspect-supabase-project/runner.py +36 -0
- package/runtime/agents/supabase-project-analyst/capabilities/inspect-supabase-project/workflow.md +7 -0
- package/runtime/agents/supabase-project-analyst/capabilities/plan-supabase-fix/capability.yaml +18 -0
- package/runtime/agents/supabase-project-analyst/capabilities/plan-supabase-fix/decision-rules.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/plan-supabase-fix/runner.py +32 -0
- package/runtime/agents/supabase-project-analyst/capabilities/plan-supabase-fix/workflow.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/review-migrations/capability.yaml +18 -0
- package/runtime/agents/supabase-project-analyst/capabilities/review-migrations/decision-rules.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/review-migrations/runner.py +32 -0
- package/runtime/agents/supabase-project-analyst/capabilities/review-migrations/workflow.md +5 -0
- package/runtime/agents/supabase-project-analyst/infra/integrations/supabase-project/supabase_project_repository.py +589 -0
- package/runtime/agents/supabase-project-analyst/knowledge/context.md +11 -0
- package/runtime/agents/supabase-project-analyst/knowledge/policies.yaml +24 -0
- package/runtime/agents/supabase-project-analyst/knowledge/system.md +10 -0
- package/runtime/agents/supabase-project-analyst/templates/supabase-audit.md +3 -0
- package/runtime/agents/supabase-project-analyst/templates/supabase-fix-plan.md +3 -0
- package/runtime/agents/supabase-project-analyst/templates/supabase-inspection.md +3 -0
- package/runtime/agents/supabase-project-analyst/templates/supabase-report.md +3 -0
- package/runtime/agents/supabase-project-analyst/tests/test_runners.py +239 -0
- package/runtime/agents/task-orchestrator/AGENTS.md +8 -0
- package/runtime/agents/task-orchestrator/README.md +7 -0
- package/runtime/agents/task-orchestrator/agent.yaml +53 -0
- package/runtime/agents/task-orchestrator/capabilities/coordinate-execution/capability.yaml +15 -0
- package/runtime/agents/task-orchestrator/capabilities/coordinate-execution/decision-rules.md +6 -0
- package/runtime/agents/task-orchestrator/capabilities/coordinate-execution/workflow.md +7 -0
- package/runtime/agents/task-orchestrator/capabilities/plan-task/capability.yaml +14 -0
- package/runtime/agents/task-orchestrator/capabilities/plan-task/decision-rules.md +6 -0
- package/runtime/agents/task-orchestrator/capabilities/plan-task/workflow.md +8 -0
- package/runtime/agents/task-orchestrator/capabilities/select-specialists/capability.yaml +14 -0
- package/runtime/agents/task-orchestrator/capabilities/select-specialists/decision-rules.md +6 -0
- package/runtime/agents/task-orchestrator/capabilities/select-specialists/workflow.md +7 -0
- package/runtime/agents/task-orchestrator/infra/README.md +5 -0
- package/runtime/agents/task-orchestrator/knowledge/context.md +9 -0
- package/runtime/agents/task-orchestrator/knowledge/system.md +20 -0
- package/runtime/agents/task-orchestrator/templates/README.md +4 -0
- package/runtime/agents/technical-integration-analyst/agent.yaml +15 -2
- package/runtime/agents/topdesk-orchestrator/agent.yaml +10 -2
- package/runtime/cli/README.md +76 -11
- package/runtime/cli/aikit/__init__.py +1 -1
- package/runtime/cli/aikit/acceptance.py +166 -0
- package/runtime/cli/aikit/agent_executor.py +89 -0
- package/runtime/cli/aikit/agent_registry.py +319 -0
- package/runtime/cli/aikit/app_home.py +87 -2
- package/runtime/cli/aikit/architecture.py +84 -0
- package/runtime/cli/aikit/audit.py +216 -3
- package/runtime/cli/aikit/autonomy.py +237 -0
- package/runtime/cli/aikit/capability_runtime.py +522 -0
- package/runtime/cli/aikit/catalog.py +246 -0
- package/runtime/cli/aikit/cli_dispatch.py +1078 -0
- package/runtime/cli/aikit/cli_parser.py +409 -0
- package/runtime/cli/aikit/collaboration.py +359 -0
- package/runtime/cli/aikit/configuration_orchestrator.py +52 -26
- package/runtime/cli/aikit/contribution.py +105 -0
- package/runtime/cli/aikit/control_router.py +298 -0
- package/runtime/cli/aikit/core/__init__.py +1 -0
- package/runtime/cli/aikit/core/capability_contract.py +112 -0
- package/runtime/cli/aikit/core/requests.py +69 -0
- package/runtime/cli/aikit/core/runtime.py +64 -0
- package/runtime/cli/aikit/decision_store.py +17 -0
- package/runtime/cli/aikit/diagnostics.py +10 -3
- package/runtime/cli/aikit/doctor_runtime.py +79 -0
- package/runtime/cli/aikit/errors.py +7 -0
- package/runtime/cli/aikit/eval.py +158 -0
- package/runtime/cli/aikit/execution_reviewer.py +195 -0
- package/runtime/cli/aikit/extensions.py +140 -0
- package/runtime/cli/aikit/fallback.py +1 -0
- package/runtime/cli/aikit/github_pr.py +23 -0
- package/runtime/cli/aikit/guardrails.py +25 -10
- package/runtime/cli/aikit/human_output.py +1026 -0
- package/runtime/cli/aikit/impact_map.py +294 -0
- package/runtime/cli/aikit/install.py +4 -3
- package/runtime/cli/aikit/interactive_wizard.py +79 -0
- package/runtime/cli/aikit/local_llm_operator.py +146 -0
- package/runtime/cli/aikit/lock.py +4 -1
- package/runtime/cli/aikit/main.py +11 -2561
- package/runtime/cli/aikit/mcp_manifest.py +229 -0
- package/runtime/cli/aikit/mcp_server.py +132 -0
- package/runtime/cli/aikit/mcp_tools.py +262 -0
- package/runtime/cli/aikit/mini_brain.py +227 -0
- package/runtime/cli/aikit/model_router.py +193 -20
- package/runtime/cli/aikit/module_controller.py +335 -0
- package/runtime/cli/aikit/natural_prompt_runtime.py +538 -0
- package/runtime/cli/aikit/notifications.py +716 -2
- package/runtime/cli/aikit/ollama.py +1 -0
- package/runtime/cli/aikit/orchestrator.py +1225 -0
- package/runtime/cli/aikit/output.py +63 -2
- package/runtime/cli/aikit/permissions.py +14 -4
- package/runtime/cli/aikit/prompt_injection.py +57 -0
- package/runtime/cli/aikit/review_gate.py +38 -6
- package/runtime/cli/aikit/roadmap.py +195 -0
- package/runtime/cli/aikit/roadmap_cli.py +70 -0
- package/runtime/cli/aikit/router.py +41 -12
- package/runtime/cli/aikit/router_explain.py +152 -0
- package/runtime/cli/aikit/runtime_paths.py +11 -0
- package/runtime/cli/aikit/secrets.py +113 -0
- package/runtime/cli/aikit/sessions.py +125 -2
- package/runtime/cli/aikit/setup_wizard_payload.py +32 -0
- package/runtime/cli/aikit/sources.py +298 -46
- package/runtime/cli/aikit/tasks.py +449 -21
- package/runtime/cli/aikit/wizard_state.py +517 -0
- package/runtime/cli/aikit/workflows.py +115 -0
- package/runtime/cli/aikit/write_policy.py +108 -0
- package/runtime/plugins/claude-code-ai-devkit/README.md +17 -0
- package/runtime/plugins/claude-code-ai-devkit/agents/README.md +29 -2
- package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-db-analyst.md +44 -0
- package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-execution-reviewer.md +38 -0
- package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-pr-reviewer.md +42 -0
- package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-repo-explorer.md +40 -0
- package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-support-triage.md +43 -0
- package/runtime/plugins/claude-code-ai-devkit/plugin.json +1 -1
- package/runtime/plugins/claude-code-ai-devkit/skills/ai-devkit-router/SKILL.md +16 -0
- package/runtime/plugins/claude-skill-ai-devkit/ai-devkit/SKILL.md +1 -0
- package/runtime/plugins/claude-skill-ai-devkit/ai-devkit/references/subagents.md +21 -0
- package/runtime/plugins/claude-skill-ai-devkit/plugin.json +1 -1
- package/runtime/providers/azure-devops.yaml +9 -0
- package/runtime/providers/github.yaml +4 -0
- package/runtime/providers/local-notification.yaml +5 -2
- package/runtime/providers/local-scheduler.yaml +1 -1
- package/runtime/providers/supabase.yaml +46 -0
- package/runtime/scripts/release-catalog-snapshot.json +543 -0
- package/runtime/scripts/release-gate.py +141 -1
- package/runtime/scripts/validate-repo.py +312 -0
- package/runtime/vendor/skills/napkin/napkin.md +15 -9
|
@@ -0,0 +1,1078 @@
|
|
|
1
|
+
"""Command dispatchers for the Agent DevKit CLI."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
from cli.aikit import __version__
|
|
10
|
+
from cli.aikit.aliases import add_alias, list_aliases, remove_alias, sync_aliases
|
|
11
|
+
from cli.aikit.app_home import app_home_status, migrate_default_home
|
|
12
|
+
from cli.aikit.architecture import architecture_contract
|
|
13
|
+
from cli.aikit.audit import export_audit, list_audits, record_audit, show_audit, try_record_audit
|
|
14
|
+
from cli.aikit.calendar import calendar_list, calendar_today, calendar_tomorrow, configure_calendar
|
|
15
|
+
from cli.aikit.catalog import catalog_list, catalog_search, catalog_show
|
|
16
|
+
from cli.aikit.cli_parser import DETERMINISTIC_COMMANDS, LLM_COMMANDS
|
|
17
|
+
from cli.aikit.contribution import (
|
|
18
|
+
contribution_checklist,
|
|
19
|
+
contribution_list,
|
|
20
|
+
contribution_prepare,
|
|
21
|
+
contribution_review,
|
|
22
|
+
contribution_validate,
|
|
23
|
+
)
|
|
24
|
+
from cli.aikit.core.requests import AgentPromptRequest, CapabilityRunRequest
|
|
25
|
+
from cli.aikit.core.runtime import (
|
|
26
|
+
inspect_capability_request,
|
|
27
|
+
list_agent_modules,
|
|
28
|
+
list_capability_modules,
|
|
29
|
+
run_agent_prompt,
|
|
30
|
+
run_capability_request,
|
|
31
|
+
)
|
|
32
|
+
from cli.aikit.credentials import CredentialResolverError, credential_backends
|
|
33
|
+
from cli.aikit.decision_store import forget_decision, list_decisions, reset_decisions, set_decision
|
|
34
|
+
from cli.aikit.doctor_runtime import doctor
|
|
35
|
+
from cli.aikit.eval import eval_list, eval_report, eval_run
|
|
36
|
+
from cli.aikit.errors import DevKitError
|
|
37
|
+
from cli.aikit.extensions import (
|
|
38
|
+
local_extension_add,
|
|
39
|
+
local_extension_enable,
|
|
40
|
+
local_extension_remove,
|
|
41
|
+
local_extension_validate,
|
|
42
|
+
local_extensions_list,
|
|
43
|
+
)
|
|
44
|
+
from cli.aikit.github_pr import planned_pr_commands, pr_create_automation, pr_inspect, pr_list_review_requests, pr_review
|
|
45
|
+
from cli.aikit.install import InstallError, install_runtime
|
|
46
|
+
from cli.aikit.llm import (
|
|
47
|
+
configure_backend,
|
|
48
|
+
doctor_backends,
|
|
49
|
+
list_backends,
|
|
50
|
+
llm_preference,
|
|
51
|
+
set_default_backend,
|
|
52
|
+
set_llm_preference,
|
|
53
|
+
)
|
|
54
|
+
from cli.aikit.lock import parse_profiles
|
|
55
|
+
from cli.aikit.memory import memory_path_payload, reset_memory, show_memory
|
|
56
|
+
from cli.aikit.mcp_manifest import mcp_doctor, mcp_manifest, mcp_tools_payload
|
|
57
|
+
from cli.aikit.mcp_server import serve_mcp_stdio
|
|
58
|
+
from cli.aikit.mini_brain import setup_mini_brain
|
|
59
|
+
from cli.aikit.notifications import (
|
|
60
|
+
configure_notification_channel,
|
|
61
|
+
configure_notifications,
|
|
62
|
+
format_notification_event,
|
|
63
|
+
list_notification_channels,
|
|
64
|
+
list_notification_events,
|
|
65
|
+
notification_doctor,
|
|
66
|
+
send_notification_command,
|
|
67
|
+
)
|
|
68
|
+
from cli.aikit.ollama import ollama_models, ollama_pull, ollama_status, ollama_update
|
|
69
|
+
from cli.aikit.permissions import grant_permission, revoke_permission, show_permissions
|
|
70
|
+
from cli.aikit.personality import load_personality, reset_personality, setup_personality, update_personality
|
|
71
|
+
from cli.aikit.providers import (
|
|
72
|
+
ProviderRegistryError,
|
|
73
|
+
configure_provider,
|
|
74
|
+
credential_resolution,
|
|
75
|
+
list_providers,
|
|
76
|
+
provider_status_with_credentials,
|
|
77
|
+
unset_provider_config,
|
|
78
|
+
)
|
|
79
|
+
from cli.aikit.roadmap_cli import roadmap_payload
|
|
80
|
+
from cli.aikit.router_explain import explain_route
|
|
81
|
+
from cli.aikit.runtime_paths import ROOT
|
|
82
|
+
from cli.aikit.scheduler import run_scheduler_once, scheduler_daemon_plan
|
|
83
|
+
from cli.aikit.sessions import list_sessions, resume_session, show_session
|
|
84
|
+
from cli.aikit.setup_wizard import setup_wizard
|
|
85
|
+
from cli.aikit.secrets import (
|
|
86
|
+
add_secret_reference,
|
|
87
|
+
list_secret_references,
|
|
88
|
+
remove_secret_reference,
|
|
89
|
+
secret_backends,
|
|
90
|
+
secrets_doctor,
|
|
91
|
+
)
|
|
92
|
+
from cli.aikit.sources import SourceConfigBlockedError, SourceRegistryError, add_source, list_sources, remove_source, source_status
|
|
93
|
+
from cli.aikit.tasks import (
|
|
94
|
+
create_task,
|
|
95
|
+
delete_task,
|
|
96
|
+
list_tasks,
|
|
97
|
+
run_task,
|
|
98
|
+
show_task,
|
|
99
|
+
task_history,
|
|
100
|
+
update_task_schedule,
|
|
101
|
+
update_task_status,
|
|
102
|
+
)
|
|
103
|
+
from cli.aikit.toolchain import doctor_toolchain, install_toolchain, list_toolchain
|
|
104
|
+
from cli.aikit.workflows import workflow_install, workflow_list, workflow_run, workflow_show
|
|
105
|
+
from cli.aikit.wizard_state import WizardStateError, answer_wizard, cancel_wizard, list_wizards, show_wizard
|
|
106
|
+
from cli.aikit.interactive_wizard import resume_agent_prompt
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def dispatch(args: argparse.Namespace) -> dict[str, Any] | None:
|
|
110
|
+
if args.version:
|
|
111
|
+
return {"kind": "version", "program": getattr(args, "prog_name", "aikit"), "version": __version__}
|
|
112
|
+
if args.sessions_shortcut:
|
|
113
|
+
return list_sessions()
|
|
114
|
+
|
|
115
|
+
if not args.command:
|
|
116
|
+
raise DevKitError("missing command. Use --help for usage.")
|
|
117
|
+
|
|
118
|
+
command = canonical_command(args.command)
|
|
119
|
+
if command == "agent":
|
|
120
|
+
return run_agent_prompt(agent_prompt_request_from_args(args))
|
|
121
|
+
if command == "commands":
|
|
122
|
+
return list_command_modes()
|
|
123
|
+
if command == "architecture":
|
|
124
|
+
return architecture_contract(ROOT)
|
|
125
|
+
if command == "roadmap":
|
|
126
|
+
return dispatch_roadmap(args)
|
|
127
|
+
if command == "catalog":
|
|
128
|
+
return dispatch_catalog(args)
|
|
129
|
+
if command == "route":
|
|
130
|
+
return dispatch_route(args)
|
|
131
|
+
if command == "eval":
|
|
132
|
+
return dispatch_eval(args)
|
|
133
|
+
if command == "secrets":
|
|
134
|
+
return dispatch_secrets(args)
|
|
135
|
+
if command == "providers":
|
|
136
|
+
return dispatch_providers(args)
|
|
137
|
+
if command == "provider":
|
|
138
|
+
return dispatch_provider(args)
|
|
139
|
+
if command == "credential":
|
|
140
|
+
return dispatch_credential(args)
|
|
141
|
+
if command == "source":
|
|
142
|
+
return dispatch_source(args)
|
|
143
|
+
if command == "wizard":
|
|
144
|
+
return dispatch_wizard(args)
|
|
145
|
+
if command == "memory":
|
|
146
|
+
return dispatch_memory(args)
|
|
147
|
+
if command == "personality":
|
|
148
|
+
return dispatch_personality(args)
|
|
149
|
+
if command == "setup":
|
|
150
|
+
return dispatch_setup(args)
|
|
151
|
+
if command == "alias":
|
|
152
|
+
return dispatch_alias(args)
|
|
153
|
+
if command == "session":
|
|
154
|
+
return dispatch_session(args)
|
|
155
|
+
if command == "toolchain":
|
|
156
|
+
return dispatch_toolchain(args)
|
|
157
|
+
if command == "task":
|
|
158
|
+
return dispatch_task(args)
|
|
159
|
+
if command == "scheduler":
|
|
160
|
+
return dispatch_scheduler(args)
|
|
161
|
+
if command == "notifications":
|
|
162
|
+
return dispatch_notifications(args)
|
|
163
|
+
if command == "calendar":
|
|
164
|
+
return dispatch_calendar(args)
|
|
165
|
+
if command == "pr":
|
|
166
|
+
return dispatch_pr(args)
|
|
167
|
+
if command == "permissions":
|
|
168
|
+
return dispatch_permissions(args)
|
|
169
|
+
if command == "audit":
|
|
170
|
+
return dispatch_audit(args)
|
|
171
|
+
if command == "config":
|
|
172
|
+
return dispatch_config(args)
|
|
173
|
+
if command in {"tools", "integrations", "skills"}:
|
|
174
|
+
return dispatch_control_category(command, args)
|
|
175
|
+
if command == "decisions":
|
|
176
|
+
return dispatch_decisions(args)
|
|
177
|
+
if command == "ollama":
|
|
178
|
+
return dispatch_ollama(args)
|
|
179
|
+
if command == "mcp":
|
|
180
|
+
return dispatch_mcp(args)
|
|
181
|
+
if command == "local":
|
|
182
|
+
return dispatch_local(args)
|
|
183
|
+
if command == "workflow":
|
|
184
|
+
return dispatch_workflow(args)
|
|
185
|
+
if command in {"contribute", "contribution"}:
|
|
186
|
+
return dispatch_contribution(args)
|
|
187
|
+
if command == "llm":
|
|
188
|
+
return dispatch_llm(args)
|
|
189
|
+
if command == "install":
|
|
190
|
+
return dispatch_install(args)
|
|
191
|
+
if command == "agents":
|
|
192
|
+
return dispatch_agents(args)
|
|
193
|
+
if command == "capabilities":
|
|
194
|
+
return dispatch_capabilities(args)
|
|
195
|
+
if command == "inspect":
|
|
196
|
+
return inspect_capability_request(args.agent, args.capability)
|
|
197
|
+
if command == "run":
|
|
198
|
+
return run_capability_request(
|
|
199
|
+
CapabilityRunRequest(
|
|
200
|
+
agent_id=args.agent,
|
|
201
|
+
capability_id=args.capability,
|
|
202
|
+
capability_args=list(args.capability_args),
|
|
203
|
+
capture_output=args.json,
|
|
204
|
+
origin="cli",
|
|
205
|
+
dry_run=effective_dry_run(args),
|
|
206
|
+
)
|
|
207
|
+
)
|
|
208
|
+
if command == "doctor":
|
|
209
|
+
return doctor(args.project, args.home, args.scope)
|
|
210
|
+
raise DevKitError(f"unsupported command: {args.command}")
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
def canonical_command(command: str) -> str:
|
|
214
|
+
aliases = {
|
|
215
|
+
"a": "agents",
|
|
216
|
+
"c": "capabilities",
|
|
217
|
+
"i": "inspect",
|
|
218
|
+
"r": "run",
|
|
219
|
+
}
|
|
220
|
+
return aliases.get(command, command)
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
def agent_prompt_request_from_args(args: argparse.Namespace) -> AgentPromptRequest:
|
|
224
|
+
return AgentPromptRequest(
|
|
225
|
+
prompt=" ".join(args.prompt).strip(),
|
|
226
|
+
llm=args.llm,
|
|
227
|
+
dry_run=effective_dry_run(args),
|
|
228
|
+
session_id=args.session_id,
|
|
229
|
+
new_session=args.new_session,
|
|
230
|
+
no_llm_fallback=args.no_llm_fallback,
|
|
231
|
+
prog_name=getattr(args, "prog_name", "agent"),
|
|
232
|
+
project=str(Path.cwd()),
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
def capabilities_agent_from_args(args: argparse.Namespace) -> str | None:
|
|
237
|
+
if args.agent:
|
|
238
|
+
return args.agent
|
|
239
|
+
action_or_agent = args.action_or_agent
|
|
240
|
+
if action_or_agent == "list":
|
|
241
|
+
return args.legacy_agent
|
|
242
|
+
if args.legacy_agent:
|
|
243
|
+
raise DevKitError("unexpected extra argument for capabilities")
|
|
244
|
+
return action_or_agent
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
def list_command_modes() -> dict[str, Any]:
|
|
248
|
+
return {
|
|
249
|
+
"kind": "commands",
|
|
250
|
+
"deterministic": [
|
|
251
|
+
{
|
|
252
|
+
"command": command,
|
|
253
|
+
"requires_llm": False,
|
|
254
|
+
}
|
|
255
|
+
for command in DETERMINISTIC_COMMANDS
|
|
256
|
+
],
|
|
257
|
+
"llm": [
|
|
258
|
+
{
|
|
259
|
+
"command": command,
|
|
260
|
+
"requires_llm": True,
|
|
261
|
+
}
|
|
262
|
+
for command in LLM_COMMANDS
|
|
263
|
+
],
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
def dispatch_roadmap(args: argparse.Namespace) -> dict[str, Any]:
|
|
268
|
+
if args.action == "show":
|
|
269
|
+
if args.target:
|
|
270
|
+
raise DevKitError("roadmap show does not accept a target")
|
|
271
|
+
return roadmap_payload(ROOT)
|
|
272
|
+
if args.action in {"phase", "problem"}:
|
|
273
|
+
if not args.target or not str(args.target).isdigit():
|
|
274
|
+
raise DevKitError(f"roadmap {args.action} requires a numeric target")
|
|
275
|
+
number = int(args.target)
|
|
276
|
+
return roadmap_payload(ROOT, phase=number if args.action == "phase" else None, problem=number if args.action == "problem" else None)
|
|
277
|
+
raise DevKitError(f"unsupported roadmap action: {args.action}")
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
def dispatch_catalog(args: argparse.Namespace) -> dict[str, Any]:
|
|
281
|
+
if args.action == "list":
|
|
282
|
+
if args.query:
|
|
283
|
+
raise DevKitError("catalog list does not accept a query")
|
|
284
|
+
return catalog_list(ROOT)
|
|
285
|
+
if args.action == "search":
|
|
286
|
+
return catalog_search(args.query or "", ROOT)
|
|
287
|
+
if args.action == "show":
|
|
288
|
+
return catalog_show(args.query or "", ROOT)
|
|
289
|
+
raise DevKitError(f"unsupported catalog action: {args.action}")
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
def dispatch_route(args: argparse.Namespace) -> dict[str, Any]:
|
|
293
|
+
prompt = " ".join(args.prompt or []).strip()
|
|
294
|
+
if not prompt:
|
|
295
|
+
raise DevKitError("route explain requires a prompt")
|
|
296
|
+
return explain_route(prompt, ROOT)
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
def dispatch_eval(args: argparse.Namespace) -> dict[str, Any]:
|
|
300
|
+
try:
|
|
301
|
+
if args.action == "list":
|
|
302
|
+
if args.suite:
|
|
303
|
+
raise DevKitError("eval list does not accept a suite")
|
|
304
|
+
return eval_list()
|
|
305
|
+
if args.action == "run":
|
|
306
|
+
return eval_run(args.suite or "all", ROOT)
|
|
307
|
+
if args.action == "report":
|
|
308
|
+
if args.suite:
|
|
309
|
+
raise DevKitError("eval report does not accept a suite")
|
|
310
|
+
return eval_report()
|
|
311
|
+
except ValueError as exc:
|
|
312
|
+
raise DevKitError(str(exc)) from exc
|
|
313
|
+
raise DevKitError(f"unsupported eval action: {args.action}")
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
def dispatch_secrets(args: argparse.Namespace) -> dict[str, Any]:
|
|
317
|
+
if args.action == "doctor":
|
|
318
|
+
if args.reference_action or args.provider or args.key:
|
|
319
|
+
raise DevKitError("secrets doctor does not accept reference arguments")
|
|
320
|
+
return secrets_doctor()
|
|
321
|
+
if args.action == "backends":
|
|
322
|
+
if args.reference_action or args.provider or args.key:
|
|
323
|
+
raise DevKitError("secrets backends does not accept reference arguments")
|
|
324
|
+
return secret_backends()
|
|
325
|
+
if args.action == "reference":
|
|
326
|
+
if args.reference_action == "list":
|
|
327
|
+
return list_secret_references()
|
|
328
|
+
if args.reference_action == "add":
|
|
329
|
+
return add_secret_reference(args.provider, args.key, env=args.env)
|
|
330
|
+
if args.reference_action == "remove":
|
|
331
|
+
return remove_secret_reference(args.provider, args.key)
|
|
332
|
+
raise DevKitError("secrets reference requires add, list or remove")
|
|
333
|
+
raise DevKitError(f"unsupported secrets action: {args.action}")
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
def dispatch_agents(args: argparse.Namespace) -> dict[str, Any]:
|
|
337
|
+
if args.action == "list":
|
|
338
|
+
if args.query:
|
|
339
|
+
raise DevKitError("agents list does not accept a query")
|
|
340
|
+
return list_agent_modules()
|
|
341
|
+
if args.action == "search":
|
|
342
|
+
return catalog_search(args.query or "", ROOT, item_type="agent")
|
|
343
|
+
if args.action == "show":
|
|
344
|
+
return catalog_show(args.query or "", ROOT, item_type="agent")
|
|
345
|
+
raise DevKitError(f"unsupported agents action: {args.action}")
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
def dispatch_capabilities(args: argparse.Namespace) -> dict[str, Any]:
|
|
349
|
+
action = args.action_or_agent
|
|
350
|
+
if action == "search":
|
|
351
|
+
if not args.legacy_agent:
|
|
352
|
+
raise DevKitError("capabilities search requires a query")
|
|
353
|
+
if args.show_capability:
|
|
354
|
+
raise DevKitError("capabilities search received too many arguments")
|
|
355
|
+
return catalog_search(args.legacy_agent, ROOT, item_type="capability")
|
|
356
|
+
if action == "show":
|
|
357
|
+
if not args.legacy_agent:
|
|
358
|
+
raise DevKitError("capabilities show requires an agent id")
|
|
359
|
+
if not args.show_capability:
|
|
360
|
+
raise DevKitError("capabilities show requires a capability id")
|
|
361
|
+
return catalog_show(f"{args.legacy_agent}/{args.show_capability}", ROOT, item_type="capability")
|
|
362
|
+
if args.show_capability:
|
|
363
|
+
raise DevKitError("unexpected extra argument for capabilities")
|
|
364
|
+
return list_capability_modules(capabilities_agent_from_args(args))
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
def dispatch_local(args: argparse.Namespace) -> dict[str, Any]:
|
|
368
|
+
if args.action == "list":
|
|
369
|
+
if args.extension_id:
|
|
370
|
+
raise DevKitError("local list does not accept an extension id")
|
|
371
|
+
return local_extensions_list()
|
|
372
|
+
if args.action == "add":
|
|
373
|
+
return local_extension_add(args.path)
|
|
374
|
+
if args.action == "enable":
|
|
375
|
+
require_id(args.extension_id, "local enable")
|
|
376
|
+
return local_extension_enable(args.extension_id, True)
|
|
377
|
+
if args.action == "disable":
|
|
378
|
+
require_id(args.extension_id, "local disable")
|
|
379
|
+
return local_extension_enable(args.extension_id, False)
|
|
380
|
+
if args.action == "remove":
|
|
381
|
+
require_id(args.extension_id, "local remove")
|
|
382
|
+
return local_extension_remove(args.extension_id)
|
|
383
|
+
if args.action == "validate":
|
|
384
|
+
require_id(args.extension_id, "local validate")
|
|
385
|
+
return local_extension_validate(args.extension_id)
|
|
386
|
+
raise DevKitError(f"unsupported local action: {args.action}")
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
def dispatch_workflow(args: argparse.Namespace) -> dict[str, Any]:
|
|
390
|
+
try:
|
|
391
|
+
if args.action == "list":
|
|
392
|
+
if args.workflow_id:
|
|
393
|
+
raise DevKitError("workflow list does not accept a workflow id")
|
|
394
|
+
return workflow_list()
|
|
395
|
+
require_id(args.workflow_id, f"workflow {args.action}")
|
|
396
|
+
if args.action == "show":
|
|
397
|
+
return workflow_show(args.workflow_id)
|
|
398
|
+
if args.action == "install":
|
|
399
|
+
return workflow_install(args.workflow_id, dry_run=effective_dry_run(args) or not args.yes, yes=args.yes)
|
|
400
|
+
if args.action == "run":
|
|
401
|
+
return workflow_run(args.workflow_id, dry_run=effective_dry_run(args) or not args.yes)
|
|
402
|
+
except ValueError as exc:
|
|
403
|
+
raise DevKitError(str(exc)) from exc
|
|
404
|
+
raise DevKitError(f"unsupported workflow action: {args.action}")
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
def dispatch_contribution(args: argparse.Namespace) -> dict[str, Any]:
|
|
408
|
+
if args.action == "list":
|
|
409
|
+
if args.extension_id:
|
|
410
|
+
raise DevKitError(f"{args.command} list does not accept an extension id")
|
|
411
|
+
return contribution_list()
|
|
412
|
+
require_id(args.extension_id, f"{args.command} {args.action}")
|
|
413
|
+
if args.action == "prepare":
|
|
414
|
+
return contribution_prepare(args.extension_id)
|
|
415
|
+
if args.action == "validate":
|
|
416
|
+
return contribution_validate(args.extension_id)
|
|
417
|
+
if args.action == "review":
|
|
418
|
+
return contribution_review(args.extension_id)
|
|
419
|
+
if args.action == "checklist":
|
|
420
|
+
return contribution_checklist(args.extension_id)
|
|
421
|
+
raise DevKitError(f"unsupported {args.command} action: {args.action}")
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
def maybe_record_cli_audit(args: argparse.Namespace, *, result: dict[str, Any] | None, error: str | None) -> dict[str, Any] | None:
|
|
425
|
+
command = canonical_command(getattr(args, "command", None) or "")
|
|
426
|
+
if command in {"", "audit"} or getattr(args, "version", False):
|
|
427
|
+
return None
|
|
428
|
+
audit_result = try_record_audit(
|
|
429
|
+
command=command,
|
|
430
|
+
args=vars(args),
|
|
431
|
+
result=result,
|
|
432
|
+
error=error,
|
|
433
|
+
origin="cli",
|
|
434
|
+
required=False,
|
|
435
|
+
recorder=record_audit,
|
|
436
|
+
)
|
|
437
|
+
warning = audit_result.get("audit_warning")
|
|
438
|
+
if warning:
|
|
439
|
+
if result is not None:
|
|
440
|
+
result["audit_warning"] = warning
|
|
441
|
+
add_payload_warning(result, warning)
|
|
442
|
+
return warning
|
|
443
|
+
audit = audit_result.get("audit")
|
|
444
|
+
if result is not None:
|
|
445
|
+
result["audit"] = audit
|
|
446
|
+
return audit
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
def is_audit_warning(value: object) -> bool:
|
|
450
|
+
return isinstance(value, dict) and value.get("kind") == "audit-warning"
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
def format_audit_warning(warning: dict[str, object]) -> str:
|
|
454
|
+
reason = str(warning.get("reason") or "").strip()
|
|
455
|
+
suffix = f" ({reason})" if reason else ""
|
|
456
|
+
return f"warning: {warning.get('message') or 'Audit trail could not be written.'}{suffix}"
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
def add_payload_warning(result: dict[str, Any], warning: dict[str, Any]) -> None:
|
|
460
|
+
warnings = result.get("warnings")
|
|
461
|
+
if isinstance(warnings, list):
|
|
462
|
+
warnings.append(warning)
|
|
463
|
+
elif warnings:
|
|
464
|
+
result["warnings"] = [warnings, warning]
|
|
465
|
+
else:
|
|
466
|
+
result["warnings"] = [warning]
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
def dispatch_llm(args: argparse.Namespace) -> dict[str, Any]:
|
|
470
|
+
try:
|
|
471
|
+
if args.action != "preference" and args.preference_value:
|
|
472
|
+
raise DevKitError(f"llm {args.action} received an unexpected argument: {args.preference_value}")
|
|
473
|
+
if args.action == "list":
|
|
474
|
+
if args.backend:
|
|
475
|
+
raise DevKitError("llm list does not accept a backend argument")
|
|
476
|
+
return list_backends()
|
|
477
|
+
if args.action == "doctor":
|
|
478
|
+
return doctor_backends(args.backend)
|
|
479
|
+
if args.action == "configure":
|
|
480
|
+
if not args.backend:
|
|
481
|
+
raise DevKitError("llm configure requires a backend")
|
|
482
|
+
return configure_backend(
|
|
483
|
+
args.backend,
|
|
484
|
+
api_key_env=args.api_key_env,
|
|
485
|
+
base_url=args.base_url,
|
|
486
|
+
model=args.model,
|
|
487
|
+
command=args.host_command,
|
|
488
|
+
set_default=args.set_default,
|
|
489
|
+
)
|
|
490
|
+
if args.action in {"set-default", "default"}:
|
|
491
|
+
if not args.backend:
|
|
492
|
+
raise DevKitError(f"llm {args.action} requires a backend")
|
|
493
|
+
return set_default_backend(args.backend)
|
|
494
|
+
if args.action in {"enable", "disable"}:
|
|
495
|
+
if not args.backend:
|
|
496
|
+
raise DevKitError(f"llm {args.action} requires a backend")
|
|
497
|
+
state = "enabled" if args.action == "enable" else "disabled_by_user"
|
|
498
|
+
return set_decision("llms", args.backend, state, reason=f"llm {args.action} command")
|
|
499
|
+
if args.action == "preference":
|
|
500
|
+
if args.backend in {None, "show"}:
|
|
501
|
+
return llm_preference()
|
|
502
|
+
if args.backend == "set":
|
|
503
|
+
if not args.primary and not args.order:
|
|
504
|
+
raise DevKitError("llm preference set requires --primary or --order")
|
|
505
|
+
return set_llm_preference(primary=args.primary, order=args.order)
|
|
506
|
+
if args.backend == "reorder":
|
|
507
|
+
order = args.preference_value or args.order
|
|
508
|
+
if not order:
|
|
509
|
+
raise DevKitError("llm preference reorder requires an order value or --order")
|
|
510
|
+
return set_llm_preference(order=order)
|
|
511
|
+
raise DevKitError("llm preference action must be show, set or reorder")
|
|
512
|
+
except ValueError as exc:
|
|
513
|
+
raise DevKitError(str(exc)) from exc
|
|
514
|
+
raise DevKitError(f"unsupported llm action: {args.action}")
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
def dispatch_config(args: argparse.Namespace) -> dict[str, Any]:
|
|
518
|
+
from cli.aikit.llm import config_path
|
|
519
|
+
|
|
520
|
+
if args.action == "path":
|
|
521
|
+
return {"kind": "config", "status": "ok", "path": str(config_path()), "home": app_home_status()}
|
|
522
|
+
if args.action == "migrate-home":
|
|
523
|
+
return migrate_default_home(dry_run=effective_dry_run(args))
|
|
524
|
+
if args.action == "show":
|
|
525
|
+
return {
|
|
526
|
+
"kind": "config",
|
|
527
|
+
"status": "ok",
|
|
528
|
+
"path": str(config_path()),
|
|
529
|
+
"home": app_home_status(),
|
|
530
|
+
"decisions": list_decisions(),
|
|
531
|
+
"llm": llm_preference(),
|
|
532
|
+
"ollama": ollama_status(),
|
|
533
|
+
}
|
|
534
|
+
raise DevKitError(f"unsupported config action: {args.action}")
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
def dispatch_mcp(args: argparse.Namespace) -> dict[str, Any] | None:
|
|
538
|
+
if args.action == "manifest":
|
|
539
|
+
return mcp_manifest()
|
|
540
|
+
if args.action == "tools":
|
|
541
|
+
return mcp_tools_payload()
|
|
542
|
+
if args.action == "doctor":
|
|
543
|
+
return mcp_doctor()
|
|
544
|
+
if args.action == "serve":
|
|
545
|
+
serve_mcp_stdio()
|
|
546
|
+
return None
|
|
547
|
+
raise DevKitError(f"unsupported mcp action: {args.action}")
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
def dispatch_control_category(command: str, args: argparse.Namespace) -> dict[str, Any]:
|
|
551
|
+
try:
|
|
552
|
+
category = command
|
|
553
|
+
if args.action == "list":
|
|
554
|
+
if args.item_id:
|
|
555
|
+
raise DevKitError(f"{command} list does not accept an item id")
|
|
556
|
+
payload = list_decisions(category)
|
|
557
|
+
payload["kind"] = command
|
|
558
|
+
return payload
|
|
559
|
+
if args.action in {"enable", "disable"}:
|
|
560
|
+
if not args.item_id:
|
|
561
|
+
raise DevKitError(f"{command} {args.action} requires an item id")
|
|
562
|
+
state = "enabled" if args.action == "enable" else "disabled_by_user"
|
|
563
|
+
payload = set_decision(category, args.item_id, state, reason=f"{command} {args.action} command")
|
|
564
|
+
payload["kind"] = command[:-1] if command.endswith("s") else command
|
|
565
|
+
return payload
|
|
566
|
+
except ValueError as exc:
|
|
567
|
+
raise DevKitError(str(exc)) from exc
|
|
568
|
+
raise DevKitError(f"unsupported {command} action: {args.action}")
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
def dispatch_decisions(args: argparse.Namespace) -> dict[str, Any]:
|
|
572
|
+
try:
|
|
573
|
+
if args.action == "list":
|
|
574
|
+
if args.item_id:
|
|
575
|
+
raise DevKitError("decisions list does not accept an item id")
|
|
576
|
+
return list_decisions(args.category)
|
|
577
|
+
if args.action == "reset":
|
|
578
|
+
if args.item_id:
|
|
579
|
+
raise DevKitError("decisions reset does not accept an item id")
|
|
580
|
+
return reset_decisions(args.category)
|
|
581
|
+
if args.action == "forget":
|
|
582
|
+
if not args.item_id:
|
|
583
|
+
raise DevKitError("decisions forget requires an item id")
|
|
584
|
+
category = args.category or "tools"
|
|
585
|
+
return forget_decision(category, args.item_id)
|
|
586
|
+
except ValueError as exc:
|
|
587
|
+
raise DevKitError(str(exc)) from exc
|
|
588
|
+
raise DevKitError(f"unsupported decisions action: {args.action}")
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
def dispatch_ollama(args: argparse.Namespace) -> dict[str, Any]:
|
|
592
|
+
try:
|
|
593
|
+
if args.action == "status":
|
|
594
|
+
if args.model:
|
|
595
|
+
raise DevKitError("ollama status does not accept a model")
|
|
596
|
+
return ollama_status()
|
|
597
|
+
if args.action == "models":
|
|
598
|
+
if args.model:
|
|
599
|
+
raise DevKitError("ollama models does not accept a model")
|
|
600
|
+
return ollama_models()
|
|
601
|
+
if args.action == "pull":
|
|
602
|
+
return ollama_pull(args.model, yes=args.yes, dry_run=effective_dry_run(args))
|
|
603
|
+
if args.action == "update":
|
|
604
|
+
if args.model:
|
|
605
|
+
raise DevKitError("ollama update does not accept a model")
|
|
606
|
+
return ollama_update(yes=args.yes, dry_run=effective_dry_run(args))
|
|
607
|
+
except ValueError as exc:
|
|
608
|
+
raise DevKitError(str(exc)) from exc
|
|
609
|
+
raise DevKitError(f"unsupported ollama action: {args.action}")
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
def dispatch_install(args: argparse.Namespace) -> dict[str, Any]:
|
|
613
|
+
try:
|
|
614
|
+
return install_runtime(
|
|
615
|
+
ROOT,
|
|
616
|
+
scope=args.scope,
|
|
617
|
+
host=args.host,
|
|
618
|
+
target=Path(args.target) if args.target else None,
|
|
619
|
+
home=Path(args.home) if args.home else None,
|
|
620
|
+
dry_run=effective_dry_run(args),
|
|
621
|
+
profiles=parse_profiles(args.profiles),
|
|
622
|
+
)
|
|
623
|
+
except InstallError as exc:
|
|
624
|
+
raise DevKitError(str(exc)) from exc
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
def dispatch_providers(args: argparse.Namespace) -> dict[str, Any]:
|
|
628
|
+
if args.action != "list":
|
|
629
|
+
raise DevKitError(f"unsupported providers action: {args.action}")
|
|
630
|
+
try:
|
|
631
|
+
return list_providers(ROOT)
|
|
632
|
+
except ProviderRegistryError as exc:
|
|
633
|
+
raise DevKitError(str(exc)) from exc
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
def dispatch_provider(args: argparse.Namespace) -> dict[str, Any]:
|
|
637
|
+
try:
|
|
638
|
+
if args.action in {"status", "doctor"}:
|
|
639
|
+
return provider_status_with_credentials(ROOT, args.provider, env_files=[Path(item) for item in args.env_file])
|
|
640
|
+
if args.action == "configure":
|
|
641
|
+
if not args.provider:
|
|
642
|
+
raise DevKitError("provider configure requires a provider id")
|
|
643
|
+
return configure_provider(
|
|
644
|
+
ROOT,
|
|
645
|
+
args.provider,
|
|
646
|
+
env_refs=args.env,
|
|
647
|
+
env_files=[Path(item) for item in args.env_file],
|
|
648
|
+
from_env=args.from_env,
|
|
649
|
+
session_only=args.session_only,
|
|
650
|
+
)
|
|
651
|
+
if args.action == "unset":
|
|
652
|
+
if not args.provider:
|
|
653
|
+
raise DevKitError("provider unset requires a provider id")
|
|
654
|
+
return unset_provider_config(ROOT, args.provider)
|
|
655
|
+
except ProviderRegistryError as exc:
|
|
656
|
+
raise DevKitError(str(exc)) from exc
|
|
657
|
+
except CredentialResolverError as exc:
|
|
658
|
+
raise DevKitError(str(exc)) from exc
|
|
659
|
+
raise DevKitError(f"unsupported provider action: {args.action}")
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
def dispatch_credential(args: argparse.Namespace) -> dict[str, Any]:
|
|
663
|
+
if args.action == "backends":
|
|
664
|
+
if args.provider:
|
|
665
|
+
raise DevKitError("credential backends does not accept a provider argument")
|
|
666
|
+
return credential_backends()
|
|
667
|
+
if args.action == "resolve":
|
|
668
|
+
if not args.provider:
|
|
669
|
+
raise DevKitError("credential resolve requires a provider id")
|
|
670
|
+
try:
|
|
671
|
+
return credential_resolution(ROOT, args.provider, env_files=[Path(item) for item in args.env_file])
|
|
672
|
+
except (ProviderRegistryError, CredentialResolverError) as exc:
|
|
673
|
+
raise DevKitError(str(exc)) from exc
|
|
674
|
+
raise DevKitError(f"unsupported credential action: {args.action}")
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
def dispatch_source(args: argparse.Namespace) -> dict[str, Any]:
|
|
678
|
+
try:
|
|
679
|
+
if args.action == "list":
|
|
680
|
+
return list_sources()
|
|
681
|
+
if args.action == "add":
|
|
682
|
+
if not args.source_id:
|
|
683
|
+
raise DevKitError("source add requires a source id")
|
|
684
|
+
return add_source(
|
|
685
|
+
args.source_id,
|
|
686
|
+
provider=args.provider,
|
|
687
|
+
label=args.label,
|
|
688
|
+
config_pairs=args.config,
|
|
689
|
+
env_refs=args.env,
|
|
690
|
+
env_files=args.env_file,
|
|
691
|
+
default_for=args.default_for,
|
|
692
|
+
default_for_agent=args.default_for_agent,
|
|
693
|
+
set_default=args.set_default,
|
|
694
|
+
)
|
|
695
|
+
if args.action == "status":
|
|
696
|
+
return source_status(args.source_id)
|
|
697
|
+
if args.action == "remove":
|
|
698
|
+
if not args.source_id:
|
|
699
|
+
raise DevKitError("source remove requires a source id")
|
|
700
|
+
return remove_source(args.source_id)
|
|
701
|
+
except SourceConfigBlockedError as exc:
|
|
702
|
+
return exc.payload
|
|
703
|
+
except SourceRegistryError as exc:
|
|
704
|
+
raise DevKitError(str(exc)) from exc
|
|
705
|
+
raise DevKitError(f"unsupported source action: {args.action}")
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
def dispatch_wizard(args: argparse.Namespace) -> dict[str, Any]:
|
|
709
|
+
try:
|
|
710
|
+
if args.action == "list":
|
|
711
|
+
return list_wizards(status=args.status)
|
|
712
|
+
if args.action == "show":
|
|
713
|
+
require_id(args.wizard_id, "wizard show")
|
|
714
|
+
return show_wizard(args.wizard_id)
|
|
715
|
+
if args.action == "cancel":
|
|
716
|
+
require_id(args.wizard_id, "wizard cancel")
|
|
717
|
+
return cancel_wizard(args.wizard_id)
|
|
718
|
+
if args.action == "answer":
|
|
719
|
+
require_id(args.wizard_id, "wizard answer")
|
|
720
|
+
answer = " ".join(args.answer or []).strip()
|
|
721
|
+
if not answer:
|
|
722
|
+
raise DevKitError("wizard answer requires an answer")
|
|
723
|
+
payload = answer_wizard(args.wizard_id, answer)
|
|
724
|
+
if payload.get("status") == "completed" and not args.no_run:
|
|
725
|
+
resume_prompt = payload.get("resume_prompt") or (payload.get("wizard") or {}).get("resume_prompt")
|
|
726
|
+
if resume_prompt:
|
|
727
|
+
payload["resumed_prompt"] = True
|
|
728
|
+
payload["resume_result"] = resume_agent_prompt(str(resume_prompt))
|
|
729
|
+
else:
|
|
730
|
+
payload["resumed_prompt"] = False
|
|
731
|
+
else:
|
|
732
|
+
payload.setdefault("resumed_prompt", False)
|
|
733
|
+
return payload
|
|
734
|
+
except WizardStateError as exc:
|
|
735
|
+
raise DevKitError(str(exc)) from exc
|
|
736
|
+
except SourceRegistryError as exc:
|
|
737
|
+
raise DevKitError(str(exc)) from exc
|
|
738
|
+
raise DevKitError(f"unsupported wizard action: {args.action}")
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
def dispatch_memory(args: argparse.Namespace) -> dict[str, Any]:
|
|
743
|
+
if args.action == "show":
|
|
744
|
+
return show_memory(ROOT, agent_id=args.agent_id, source_id=args.source_id)
|
|
745
|
+
if args.action == "path":
|
|
746
|
+
return memory_path_payload()
|
|
747
|
+
if args.action == "reset":
|
|
748
|
+
return reset_memory(
|
|
749
|
+
all_memory=args.all,
|
|
750
|
+
agent_id=args.agent_id,
|
|
751
|
+
source_id=args.source_id,
|
|
752
|
+
reset_sessions=args.sessions,
|
|
753
|
+
reset_tasks=args.tasks,
|
|
754
|
+
reset_cache=args.cache,
|
|
755
|
+
)
|
|
756
|
+
raise DevKitError(f"unsupported memory action: {args.action}")
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
def dispatch_personality(args: argparse.Namespace) -> dict[str, Any]:
|
|
760
|
+
if args.action == "show":
|
|
761
|
+
return load_personality()
|
|
762
|
+
if args.action == "edit":
|
|
763
|
+
if not any([args.agent_name, args.user_name, args.language, args.tone, args.detail_level]):
|
|
764
|
+
payload = load_personality()
|
|
765
|
+
payload["status"] = "needs-input"
|
|
766
|
+
payload["message"] = "Use --name, --user-name, --language, --tone or --detail-level to edit non-interactively."
|
|
767
|
+
return payload
|
|
768
|
+
return update_personality(
|
|
769
|
+
agent_name=args.agent_name,
|
|
770
|
+
user_name=args.user_name,
|
|
771
|
+
language=args.language,
|
|
772
|
+
tone=args.tone,
|
|
773
|
+
detail_level=args.detail_level,
|
|
774
|
+
)
|
|
775
|
+
if args.action == "reset":
|
|
776
|
+
return reset_personality()
|
|
777
|
+
raise DevKitError(f"unsupported personality action: {args.action}")
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
def dispatch_setup(args: argparse.Namespace) -> dict[str, Any]:
|
|
781
|
+
if args.action == "personality":
|
|
782
|
+
return setup_personality()
|
|
783
|
+
if args.action == "mini-brain":
|
|
784
|
+
return setup_mini_brain(
|
|
785
|
+
dry_run=effective_dry_run(args),
|
|
786
|
+
yes=args.yes,
|
|
787
|
+
set_default=args.set_default,
|
|
788
|
+
)
|
|
789
|
+
if args.action == "plan":
|
|
790
|
+
return setup_wizard(ROOT, dry_run=effective_dry_run(args), yes=args.yes)
|
|
791
|
+
raise DevKitError(f"unsupported setup action: {args.action}")
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
def dispatch_toolchain(args: argparse.Namespace) -> dict[str, Any]:
|
|
795
|
+
try:
|
|
796
|
+
if args.action == "list":
|
|
797
|
+
if args.tool != "all":
|
|
798
|
+
raise DevKitError("toolchain list does not accept a tool argument")
|
|
799
|
+
return list_toolchain(ROOT)
|
|
800
|
+
if args.action == "doctor":
|
|
801
|
+
return doctor_toolchain(ROOT, None if args.tool == "all" else args.tool)
|
|
802
|
+
if args.action == "install":
|
|
803
|
+
return install_toolchain(ROOT, None if args.tool == "all" else args.tool, dry_run=effective_dry_run(args), yes=args.yes)
|
|
804
|
+
except ValueError as exc:
|
|
805
|
+
raise DevKitError(str(exc)) from exc
|
|
806
|
+
raise DevKitError(f"unsupported toolchain action: {args.action}")
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
def dispatch_task(args: argparse.Namespace) -> dict[str, Any]:
|
|
810
|
+
try:
|
|
811
|
+
if args.action == "list":
|
|
812
|
+
return list_tasks()
|
|
813
|
+
if args.action == "create":
|
|
814
|
+
schedule = {"type": "manual"}
|
|
815
|
+
if args.every:
|
|
816
|
+
schedule = {"type": "interval", "every": args.every}
|
|
817
|
+
if args.cron:
|
|
818
|
+
schedule = {"type": "cron", "cron": args.cron}
|
|
819
|
+
return create_task(task_id=args.task_id, title=args.title, prompt=args.prompt, schedule=schedule)
|
|
820
|
+
if args.action == "show":
|
|
821
|
+
require_id(args.task_id, "task show")
|
|
822
|
+
return show_task(args.task_id)
|
|
823
|
+
if args.action == "history":
|
|
824
|
+
require_id(args.task_id, "task history")
|
|
825
|
+
return task_history(args.task_id)
|
|
826
|
+
if args.action == "run":
|
|
827
|
+
require_id(args.task_id, "task run")
|
|
828
|
+
return run_task(args.task_id, dry_run=effective_dry_run(args))
|
|
829
|
+
if args.action in {"pause", "disable"}:
|
|
830
|
+
require_id(args.task_id, f"task {args.action}")
|
|
831
|
+
return update_task_status(args.task_id, "paused" if args.action == "pause" else "disabled")
|
|
832
|
+
if args.action in {"resume", "enable"}:
|
|
833
|
+
require_id(args.task_id, f"task {args.action}")
|
|
834
|
+
return update_task_status(args.task_id, "enabled")
|
|
835
|
+
if args.action == "update":
|
|
836
|
+
require_id(args.task_id, "task update")
|
|
837
|
+
return update_task_schedule(args.task_id, every=args.every, cron=args.cron)
|
|
838
|
+
if args.action == "delete":
|
|
839
|
+
require_id(args.task_id, "task delete")
|
|
840
|
+
return delete_task(args.task_id, yes=args.yes)
|
|
841
|
+
except ValueError as exc:
|
|
842
|
+
raise DevKitError(str(exc)) from exc
|
|
843
|
+
raise DevKitError(f"unsupported task action: {args.action}")
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
def dispatch_scheduler(args: argparse.Namespace) -> dict[str, Any]:
|
|
847
|
+
if args.action == "run-once":
|
|
848
|
+
return run_scheduler_once(dry_run=effective_dry_run(args))
|
|
849
|
+
if args.action == "daemon":
|
|
850
|
+
return scheduler_daemon_plan()
|
|
851
|
+
raise DevKitError(f"unsupported scheduler action: {args.action}")
|
|
852
|
+
|
|
853
|
+
|
|
854
|
+
def dispatch_notifications(args: argparse.Namespace) -> dict[str, Any]:
|
|
855
|
+
try:
|
|
856
|
+
if args.action == "doctor":
|
|
857
|
+
return notification_doctor()
|
|
858
|
+
if args.action == "list-events":
|
|
859
|
+
return list_notification_events()
|
|
860
|
+
if args.action == "list-channels":
|
|
861
|
+
return list_notification_channels()
|
|
862
|
+
if args.action == "configure":
|
|
863
|
+
enabled = None
|
|
864
|
+
if args.enabled is not None:
|
|
865
|
+
enabled = args.enabled.lower() == "true"
|
|
866
|
+
return configure_notifications(enabled=enabled, events=args.event_filter or None)
|
|
867
|
+
if args.action == "configure-channel":
|
|
868
|
+
enabled = None
|
|
869
|
+
if args.enabled is not None:
|
|
870
|
+
enabled = args.enabled.lower() == "true"
|
|
871
|
+
channel = args.channel[0] if args.channel else "desktop"
|
|
872
|
+
return configure_notification_channel(channel, enabled=enabled, events=args.event_filter or None)
|
|
873
|
+
if args.action == "format":
|
|
874
|
+
return format_notification_event(notification_payload_from_args(args))
|
|
875
|
+
if args.action == "send":
|
|
876
|
+
if not args.message:
|
|
877
|
+
raise DevKitError("notifications send requires --message")
|
|
878
|
+
return send_notification_command(
|
|
879
|
+
title=args.title,
|
|
880
|
+
message=args.message,
|
|
881
|
+
event=args.event,
|
|
882
|
+
status=args.status,
|
|
883
|
+
summary=args.summary,
|
|
884
|
+
severity=args.severity,
|
|
885
|
+
task_id=args.task_id,
|
|
886
|
+
origin=args.origin,
|
|
887
|
+
artifacts=args.artifact,
|
|
888
|
+
next_steps=args.next_step,
|
|
889
|
+
sensitive=args.sensitive,
|
|
890
|
+
channels=args.channel or None,
|
|
891
|
+
)
|
|
892
|
+
except ValueError as exc:
|
|
893
|
+
raise DevKitError(str(exc)) from exc
|
|
894
|
+
raise DevKitError(f"unsupported notifications action: {args.action}")
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
def notification_payload_from_args(args: argparse.Namespace) -> dict[str, Any]:
|
|
898
|
+
return {
|
|
899
|
+
"event": args.event,
|
|
900
|
+
"status": args.status,
|
|
901
|
+
"title": args.title,
|
|
902
|
+
"message": args.message,
|
|
903
|
+
"summary": args.summary,
|
|
904
|
+
"severity": args.severity,
|
|
905
|
+
"task_id": args.task_id,
|
|
906
|
+
"origin": args.origin,
|
|
907
|
+
"artifacts": args.artifact,
|
|
908
|
+
"next_steps": args.next_step,
|
|
909
|
+
"sensitive": args.sensitive,
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
def dispatch_calendar(args: argparse.Namespace) -> dict[str, Any]:
|
|
914
|
+
try:
|
|
915
|
+
if args.action == "configure":
|
|
916
|
+
return configure_calendar(ics_path=args.ics, timezone=args.timezone)
|
|
917
|
+
if args.action == "today":
|
|
918
|
+
return calendar_today()
|
|
919
|
+
if args.action == "tomorrow":
|
|
920
|
+
return calendar_tomorrow()
|
|
921
|
+
if args.action == "list":
|
|
922
|
+
return calendar_list(args.date_from, args.date_to)
|
|
923
|
+
except ValueError as exc:
|
|
924
|
+
raise DevKitError(str(exc)) from exc
|
|
925
|
+
raise DevKitError(f"unsupported calendar action: {args.action}")
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
def dispatch_pr(args: argparse.Namespace) -> dict[str, Any]:
|
|
929
|
+
if args.action == "list-review-requests":
|
|
930
|
+
if effective_dry_run(args):
|
|
931
|
+
return pr_read_dry_run("list-review-requests")
|
|
932
|
+
return pr_list_review_requests()
|
|
933
|
+
if args.action == "inspect":
|
|
934
|
+
require_id(args.pr_ref, "pr inspect")
|
|
935
|
+
if effective_dry_run(args):
|
|
936
|
+
return pr_read_dry_run("inspect", pr_ref=args.pr_ref)
|
|
937
|
+
return pr_inspect(args.pr_ref)
|
|
938
|
+
if args.action == "review":
|
|
939
|
+
require_id(args.pr_ref, "pr review")
|
|
940
|
+
return pr_review(
|
|
941
|
+
args.pr_ref,
|
|
942
|
+
approve=args.approve,
|
|
943
|
+
request_changes=args.request_changes,
|
|
944
|
+
comment=args.comment,
|
|
945
|
+
allow_write=args.allow_write,
|
|
946
|
+
dry_run=effective_dry_run(args),
|
|
947
|
+
)
|
|
948
|
+
if args.action == "automation":
|
|
949
|
+
if args.automation_action not in {None, "create"}:
|
|
950
|
+
raise DevKitError("pr automation action must be create")
|
|
951
|
+
if effective_dry_run(args):
|
|
952
|
+
return pr_automation_dry_run(time=args.time)
|
|
953
|
+
return pr_create_automation(time=args.time)
|
|
954
|
+
raise DevKitError(f"unsupported pr action: {args.action}")
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
def dispatch_permissions(args: argparse.Namespace) -> dict[str, Any]:
|
|
958
|
+
try:
|
|
959
|
+
if args.action == "show":
|
|
960
|
+
return show_permissions()
|
|
961
|
+
if args.action == "grant":
|
|
962
|
+
if not args.agent or not args.provider or not args.level:
|
|
963
|
+
raise DevKitError("permissions grant requires agent, provider and level")
|
|
964
|
+
return grant_permission(args.agent, args.provider, args.level, project=args.project, task_id=args.task_id)
|
|
965
|
+
if args.action == "revoke":
|
|
966
|
+
if not args.agent or not args.provider:
|
|
967
|
+
raise DevKitError("permissions revoke requires agent and provider")
|
|
968
|
+
return revoke_permission(args.agent, args.provider, args.level, project=args.project, task_id=args.task_id)
|
|
969
|
+
except ValueError as exc:
|
|
970
|
+
raise DevKitError(str(exc)) from exc
|
|
971
|
+
raise DevKitError(f"unsupported permissions action: {args.action}")
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
def dispatch_audit(args: argparse.Namespace) -> dict[str, Any]:
|
|
975
|
+
try:
|
|
976
|
+
if args.action == "list":
|
|
977
|
+
if args.execution_id:
|
|
978
|
+
raise DevKitError("audit list does not accept an execution id")
|
|
979
|
+
return list_audits(limit=max(1, int(args.limit or 20)))
|
|
980
|
+
if args.action == "show":
|
|
981
|
+
require_id(args.execution_id, "audit show")
|
|
982
|
+
return show_audit(args.execution_id)
|
|
983
|
+
if args.action == "export":
|
|
984
|
+
require_id(args.execution_id, "audit export")
|
|
985
|
+
return export_audit(args.execution_id, fmt=args.format)
|
|
986
|
+
except ValueError as exc:
|
|
987
|
+
raise DevKitError(str(exc)) from exc
|
|
988
|
+
raise DevKitError(f"unsupported audit action: {args.action}")
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
def pr_read_dry_run(action: str, *, pr_ref: str | None = None) -> dict[str, Any]:
|
|
992
|
+
return {
|
|
993
|
+
"kind": "pr",
|
|
994
|
+
"status": "planned",
|
|
995
|
+
"ok": True,
|
|
996
|
+
"dry_run": True,
|
|
997
|
+
"mode": "report-only",
|
|
998
|
+
"provider": "github",
|
|
999
|
+
"action": action,
|
|
1000
|
+
"pr_ref": pr_ref,
|
|
1001
|
+
"commands": planned_pr_commands(action, pr_ref=pr_ref),
|
|
1002
|
+
"summary": "Dry-run only. GitHub would be read through gh; no PR write action would be submitted.",
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
def pr_automation_dry_run(*, time: str) -> dict[str, Any]:
|
|
1007
|
+
return {
|
|
1008
|
+
"kind": "pr-automation",
|
|
1009
|
+
"status": "planned",
|
|
1010
|
+
"ok": True,
|
|
1011
|
+
"dry_run": True,
|
|
1012
|
+
"mode": "report-only",
|
|
1013
|
+
"provider": "github",
|
|
1014
|
+
"task": {
|
|
1015
|
+
"id": "daily-pr-review",
|
|
1016
|
+
"title": "Revisar PRs pendentes diariamente",
|
|
1017
|
+
"schedule": {"type": "daily", "time": time},
|
|
1018
|
+
"action": {
|
|
1019
|
+
"type": "capability",
|
|
1020
|
+
"agent": "github-pr-reviewer",
|
|
1021
|
+
"capability": "list-review-requests",
|
|
1022
|
+
"external_writes": False,
|
|
1023
|
+
},
|
|
1024
|
+
"permissions": {"mode": "report-only", "comment": False, "approve": False, "request_changes": False},
|
|
1025
|
+
},
|
|
1026
|
+
"summary": "Dry-run only. A local report-only PR review task would be created.",
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
def require_id(value: str | None, command: str) -> None:
|
|
1031
|
+
if not value:
|
|
1032
|
+
raise DevKitError(f"{command} requires an id")
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
def effective_dry_run(args: argparse.Namespace) -> bool:
|
|
1036
|
+
return bool(getattr(args, "dry_run", False) or getattr(args, "global_dry_run", False))
|
|
1037
|
+
|
|
1038
|
+
|
|
1039
|
+
def dispatch_alias(args: argparse.Namespace) -> dict[str, Any]:
|
|
1040
|
+
try:
|
|
1041
|
+
if args.action == "list":
|
|
1042
|
+
if args.name:
|
|
1043
|
+
raise DevKitError("alias list does not accept a name")
|
|
1044
|
+
return list_aliases()
|
|
1045
|
+
if args.action == "add":
|
|
1046
|
+
if not args.name:
|
|
1047
|
+
raise DevKitError("alias add requires a name")
|
|
1048
|
+
return add_alias(args.name, force=args.force)
|
|
1049
|
+
if args.action == "remove":
|
|
1050
|
+
if not args.name:
|
|
1051
|
+
raise DevKitError("alias remove requires a name")
|
|
1052
|
+
return remove_alias(args.name)
|
|
1053
|
+
if args.action == "sync":
|
|
1054
|
+
if args.name:
|
|
1055
|
+
raise DevKitError("alias sync does not accept a name")
|
|
1056
|
+
return sync_aliases()
|
|
1057
|
+
except ValueError as exc:
|
|
1058
|
+
raise DevKitError(str(exc)) from exc
|
|
1059
|
+
raise DevKitError(f"unsupported alias action: {args.action}")
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
def dispatch_session(args: argparse.Namespace) -> dict[str, Any]:
|
|
1063
|
+
try:
|
|
1064
|
+
if args.action == "list":
|
|
1065
|
+
if args.session_id:
|
|
1066
|
+
raise DevKitError("session list does not accept a session id")
|
|
1067
|
+
return list_sessions()
|
|
1068
|
+
if args.action == "show":
|
|
1069
|
+
if not args.session_id:
|
|
1070
|
+
raise DevKitError("session show requires a session id")
|
|
1071
|
+
return show_session(args.session_id)
|
|
1072
|
+
if args.action == "resume":
|
|
1073
|
+
if not args.session_id:
|
|
1074
|
+
raise DevKitError("session resume requires a session id")
|
|
1075
|
+
return resume_session(args.session_id)
|
|
1076
|
+
except ValueError as exc:
|
|
1077
|
+
raise DevKitError(str(exc)) from exc
|
|
1078
|
+
raise DevKitError(f"unsupported session action: {args.action}")
|