agent-devkit 0.1.6 → 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 +13 -1
- package/package.json +1 -1
- package/runtime/README.md +53 -1
- package/runtime/agent +5 -0
- package/runtime/agents/README.md +26 -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/agent.yaml +6 -4
- package/runtime/agents/execution-reviewer/capabilities/review-agent-result/capability.yaml +1 -2
- package/runtime/agents/execution-reviewer/capabilities/review-final-output/capability.yaml +1 -2
- package/runtime/agents/execution-reviewer/capabilities/review-plan/capability.yaml +1 -2
- 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/agent.yaml +6 -4
- package/runtime/agents/local-llm-operator/capabilities/delegate-operational-task/capability.yaml +1 -2
- package/runtime/agents/local-llm-operator/capabilities/inspect-local-models/capability.yaml +1 -2
- package/runtime/agents/local-llm-operator/capabilities/select-local-worker/capability.yaml +1 -2
- 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/agent.yaml +6 -4
- package/runtime/agents/provider-configurator/capabilities/collect-provider-credentials/capability.yaml +1 -2
- package/runtime/agents/provider-configurator/capabilities/configure-provider-source/capability.yaml +1 -2
- package/runtime/agents/provider-configurator/capabilities/validate-provider-readiness/capability.yaml +1 -2
- 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/agent.yaml +25 -3
- package/runtime/agents/task-orchestrator/capabilities/plan-task/capability.yaml +1 -2
- package/runtime/agents/task-orchestrator/capabilities/select-specialists/capability.yaml +1 -2
- package/runtime/agents/technical-integration-analyst/agent.yaml +15 -2
- package/runtime/agents/topdesk-orchestrator/agent.yaml +10 -2
- package/runtime/cli/aikit/__init__.py +1 -1
- package/runtime/cli/aikit/acceptance.py +166 -0
- package/runtime/cli/aikit/agent_executor.py +26 -3
- package/runtime/cli/aikit/agent_registry.py +244 -5
- package/runtime/cli/aikit/architecture.py +84 -0
- package/runtime/cli/aikit/audit.py +172 -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/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/diagnostics.py +8 -2
- 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 +21 -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/interactive_wizard.py +79 -0
- package/runtime/cli/aikit/local_llm_operator.py +35 -1
- package/runtime/cli/aikit/main.py +9 -2834
- 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 +182 -18
- 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 +809 -119
- 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 +88 -2
- package/runtime/cli/aikit/setup_wizard_payload.py +32 -0
- package/runtime/cli/aikit/sources.py +298 -50
- package/runtime/cli/aikit/tasks.py +449 -21
- package/runtime/cli/aikit/wizard_state.py +15 -1
- 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,538 @@
|
|
|
1
|
+
"""Natural-language prompt runtime for `agent <prompt>`."""
|
|
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.agent_executor import execute_plan_tasks
|
|
10
|
+
from cli.aikit.capability_runtime import load_agent, run_capability
|
|
11
|
+
from cli.aikit.calendar import calendar_summary, calendar_today, calendar_tomorrow
|
|
12
|
+
from cli.aikit.control_router import dispatch_natural_control_prompt as route_natural_control_prompt
|
|
13
|
+
from cli.aikit.control_router import plan_natural_control_prompt
|
|
14
|
+
from cli.aikit.core.requests import AgentPromptRequest
|
|
15
|
+
from cli.aikit.errors import DevKitError
|
|
16
|
+
from cli.aikit.execution_reviewer import enforce_execution_review
|
|
17
|
+
from cli.aikit.github_pr import planned_pr_commands, pr_create_automation, pr_list_review_requests, summarize_pr_list
|
|
18
|
+
from cli.aikit.identity import enforce_identity_response, is_identity_question, local_identity_response, public_name
|
|
19
|
+
from cli.aikit.llm import invoke_agent_prompt
|
|
20
|
+
from cli.aikit.local_llm_operator import enrich_prompt_with_local_result, maybe_delegate_local_llm
|
|
21
|
+
from cli.aikit.memory import napkin_context, record_usage
|
|
22
|
+
from cli.aikit.model_router import build_model_plan
|
|
23
|
+
from cli.aikit.module_controller import run_module_controller
|
|
24
|
+
from cli.aikit.orchestrator import attach_source_to_primary_task, build_execution_plan, mark_plan_after_execution, mark_review_task
|
|
25
|
+
from cli.aikit.personality import load_personality
|
|
26
|
+
from cli.aikit.provider_wizard import missing_source_wizard
|
|
27
|
+
from cli.aikit.review_gate import build_review_gate
|
|
28
|
+
from cli.aikit.router import route_prompt
|
|
29
|
+
from cli.aikit.runtime_paths import ROOT
|
|
30
|
+
from cli.aikit.sessions import build_contextual_prompt, get_or_create_session, record_exchange
|
|
31
|
+
from cli.aikit.setup_wizard_payload import persist_setup_wizard_payload
|
|
32
|
+
from cli.aikit.sources import SourceRegistryError, public_source, resolve_source
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def effective_dry_run(args: argparse.Namespace) -> bool:
|
|
36
|
+
return bool(getattr(args, "dry_run", False) or getattr(args, "global_dry_run", False))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def agent_requires_llm(args: argparse.Namespace) -> dict[str, Any]:
|
|
40
|
+
prompt = " ".join(args.prompt).strip()
|
|
41
|
+
return run_agent_prompt_request(
|
|
42
|
+
AgentPromptRequest(
|
|
43
|
+
prompt=prompt,
|
|
44
|
+
llm=args.llm,
|
|
45
|
+
dry_run=effective_dry_run(args),
|
|
46
|
+
session_id=args.session_id,
|
|
47
|
+
new_session=args.new_session,
|
|
48
|
+
no_llm_fallback=args.no_llm_fallback,
|
|
49
|
+
prog_name=getattr(args, "prog_name", "agent"),
|
|
50
|
+
project=str(Path.cwd()),
|
|
51
|
+
)
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def run_agent_prompt_request(request: AgentPromptRequest) -> dict[str, Any]:
|
|
56
|
+
prompt = request.prompt.strip()
|
|
57
|
+
if not prompt:
|
|
58
|
+
raise DevKitError("agent requires a natural-language prompt")
|
|
59
|
+
if request.dry_run:
|
|
60
|
+
return build_agent_dry_run_plan(prompt, request)
|
|
61
|
+
try:
|
|
62
|
+
session = get_or_create_session(
|
|
63
|
+
session_id=request.session_id,
|
|
64
|
+
force_new=request.new_session,
|
|
65
|
+
prompt=prompt,
|
|
66
|
+
project=request.project or str(Path.cwd()),
|
|
67
|
+
backend=request.llm,
|
|
68
|
+
)
|
|
69
|
+
except ValueError as exc:
|
|
70
|
+
raise DevKitError(str(exc)) from exc
|
|
71
|
+
personality = load_personality()
|
|
72
|
+
name = public_name(personality=personality, invoked_as=request.prog_name)
|
|
73
|
+
if is_identity_question(prompt):
|
|
74
|
+
result = {
|
|
75
|
+
"kind": "agent",
|
|
76
|
+
"status": "ok",
|
|
77
|
+
"ok": True,
|
|
78
|
+
"requires_llm": False,
|
|
79
|
+
"prompt_received": True,
|
|
80
|
+
"prompt_length": len(prompt),
|
|
81
|
+
"identity": {"name": name, "source": "local"},
|
|
82
|
+
"response": local_identity_response(prompt, name=name),
|
|
83
|
+
}
|
|
84
|
+
return finalize_agent_session(result, session, prompt, backend=request.llm)
|
|
85
|
+
natural_result = dispatch_natural_operational_prompt(prompt)
|
|
86
|
+
if natural_result:
|
|
87
|
+
return finalize_agent_session(natural_result, session, prompt, backend=request.llm)
|
|
88
|
+
route = route_prompt(prompt, ROOT)
|
|
89
|
+
if route:
|
|
90
|
+
result = invoke_agentic_route(prompt, route)
|
|
91
|
+
return finalize_agent_session(result, session, prompt, backend=request.llm)
|
|
92
|
+
contextual_prompt = build_contextual_prompt(str(session["id"]), prompt)
|
|
93
|
+
execution_plan = build_execution_plan(ROOT, prompt, dry_run=False)
|
|
94
|
+
routing_decision = execution_plan.get("routing_decision") if isinstance(execution_plan.get("routing_decision"), dict) else {}
|
|
95
|
+
if routing_decision.get("status") in {"ambiguous", "low-confidence"}:
|
|
96
|
+
result = agentic_routing_needs_input_from_plan(prompt, execution_plan)
|
|
97
|
+
return finalize_agent_session(result, session, prompt, backend=request.llm)
|
|
98
|
+
if execution_plan.get("configuration_tasks"):
|
|
99
|
+
result = agentic_needs_input_from_plan(prompt, execution_plan)
|
|
100
|
+
return finalize_agent_session(result, session, prompt, backend=request.llm)
|
|
101
|
+
model_plan = (
|
|
102
|
+
execution_plan.get("model_plan")
|
|
103
|
+
if isinstance(execution_plan.get("model_plan"), dict)
|
|
104
|
+
else build_model_plan(prompt)
|
|
105
|
+
)
|
|
106
|
+
if model_plan.get("strategy") == "human":
|
|
107
|
+
result = agentic_model_strategy_needs_input_from_plan(prompt, execution_plan, model_plan)
|
|
108
|
+
return finalize_agent_session(result, session, prompt, backend=request.llm)
|
|
109
|
+
review_gate = (
|
|
110
|
+
execution_plan.get("review_gate")
|
|
111
|
+
if isinstance(execution_plan.get("review_gate"), dict)
|
|
112
|
+
else build_review_gate(prompt, model_plan=model_plan)
|
|
113
|
+
)
|
|
114
|
+
local_llm_execution = maybe_delegate_local_llm(prompt, model_plan)
|
|
115
|
+
coordinator_prompt = enrich_prompt_with_local_result(contextual_prompt, local_llm_execution)
|
|
116
|
+
result = invoke_agent_prompt(
|
|
117
|
+
coordinator_prompt,
|
|
118
|
+
request.llm,
|
|
119
|
+
public_name=name,
|
|
120
|
+
allow_fallback=not request.no_llm_fallback,
|
|
121
|
+
)
|
|
122
|
+
review_result = {
|
|
123
|
+
"kind": "execution-review",
|
|
124
|
+
"agent_id": "execution-reviewer",
|
|
125
|
+
"capability_id": "review-final-output",
|
|
126
|
+
"status": "not-run",
|
|
127
|
+
"ok": False,
|
|
128
|
+
}
|
|
129
|
+
if result.get("ok"):
|
|
130
|
+
result, review_gate, review_result = enforce_execution_review(
|
|
131
|
+
prompt=prompt,
|
|
132
|
+
result=result,
|
|
133
|
+
review_gate=review_gate,
|
|
134
|
+
execution_plan=execution_plan,
|
|
135
|
+
producer_backend=str(result.get("llm_backend") or request.llm or ""),
|
|
136
|
+
)
|
|
137
|
+
if review_result.get("ok"):
|
|
138
|
+
execution_plan = mark_review_task(execution_plan, reviewer=str(review_result.get("llm_backend") or "execution-reviewer"))
|
|
139
|
+
elif review_gate.get("status") == "needs-review":
|
|
140
|
+
execution_plan = mark_review_task_needs_review(execution_plan, review_result)
|
|
141
|
+
result["model_plan"] = model_plan
|
|
142
|
+
result["local_llm_execution"] = local_llm_execution
|
|
143
|
+
result["review_gate"] = review_gate
|
|
144
|
+
result["review_result"] = review_result
|
|
145
|
+
result["review_task"] = execution_plan.get("review_task")
|
|
146
|
+
result["execution_plan"] = execution_plan
|
|
147
|
+
result["orchestration_trace"] = execution_plan.get("trace", [])
|
|
148
|
+
result["prompt_length"] = len(prompt)
|
|
149
|
+
result["session_context_applied"] = contextual_prompt != prompt
|
|
150
|
+
result["local_context_applied"] = coordinator_prompt != contextual_prompt
|
|
151
|
+
if result.get("response"):
|
|
152
|
+
result["response"] = enforce_identity_response(str(result["response"]), prompt, name=name)
|
|
153
|
+
result["identity"] = {"name": name, "source": "local"}
|
|
154
|
+
return finalize_agent_session(result, session, prompt, backend=result.get("llm_backend") or request.llm)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def mark_review_task_needs_review(execution_plan: dict[str, Any], review_result: dict[str, Any]) -> dict[str, Any]:
|
|
158
|
+
task = dict(execution_plan.get("review_task") or {})
|
|
159
|
+
if task:
|
|
160
|
+
task["status"] = "needs-review"
|
|
161
|
+
task["reviewer"] = None
|
|
162
|
+
task["message"] = review_result.get("message")
|
|
163
|
+
execution_plan["review_task"] = task
|
|
164
|
+
return execution_plan
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
def agentic_needs_input_from_plan(prompt: str, execution_plan: dict[str, Any]) -> dict[str, Any]:
|
|
168
|
+
configuration_task = next(
|
|
169
|
+
(task for task in execution_plan.get("configuration_tasks") or [] if isinstance(task, dict)),
|
|
170
|
+
{},
|
|
171
|
+
)
|
|
172
|
+
wizard = configuration_task.get("setup_wizard") if isinstance(configuration_task.get("setup_wizard"), dict) else {}
|
|
173
|
+
provider = configuration_task.get("provider") or wizard.get("provider")
|
|
174
|
+
payload = {
|
|
175
|
+
"kind": "agent",
|
|
176
|
+
"status": "needs-input",
|
|
177
|
+
"ok": False,
|
|
178
|
+
"mode": "agentic-plan",
|
|
179
|
+
"prompt_received": True,
|
|
180
|
+
"prompt_length": len(prompt),
|
|
181
|
+
"provider": provider,
|
|
182
|
+
"source_provider": provider,
|
|
183
|
+
"requires_source": True,
|
|
184
|
+
"execution_plan": execution_plan,
|
|
185
|
+
"orchestration_trace": execution_plan.get("trace", []),
|
|
186
|
+
"setup_wizard": wizard,
|
|
187
|
+
"next_question": wizard.get("next_question"),
|
|
188
|
+
"message": wizard.get("message") or "O plano multiagente precisa de configuracao antes de executar.",
|
|
189
|
+
"next_steps": [
|
|
190
|
+
"Responda a pergunta do wizard para autorizar ou negar a configuracao deste provider.",
|
|
191
|
+
"Depois de configurar a fonte, reexecute ou retome o mesmo prompt.",
|
|
192
|
+
],
|
|
193
|
+
"exit_code": 2,
|
|
194
|
+
}
|
|
195
|
+
return persist_setup_wizard_payload(payload, execution_plan=execution_plan)
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
def agentic_routing_needs_input_from_plan(prompt: str, execution_plan: dict[str, Any]) -> dict[str, Any]:
|
|
199
|
+
routing_decision = execution_plan.get("routing_decision") if isinstance(execution_plan.get("routing_decision"), dict) else {}
|
|
200
|
+
payload = {
|
|
201
|
+
"kind": "agent",
|
|
202
|
+
"status": "needs-input",
|
|
203
|
+
"ok": False,
|
|
204
|
+
"mode": "agentic-routing",
|
|
205
|
+
"prompt_received": True,
|
|
206
|
+
"prompt_length": len(prompt),
|
|
207
|
+
"requires_routing_confirmation": True,
|
|
208
|
+
"routing_decision": routing_decision,
|
|
209
|
+
"matches": routing_decision.get("candidates") or [],
|
|
210
|
+
"execution_plan": execution_plan,
|
|
211
|
+
"orchestration_trace": execution_plan.get("trace", []),
|
|
212
|
+
"message": "O roteamento do prompt ficou ambiguo ou com baixa confianca.",
|
|
213
|
+
"next_steps": [
|
|
214
|
+
"Confirme qual agente/capability deve tratar o pedido ou reformule o prompt com mais contexto.",
|
|
215
|
+
"Use `agent --dry-run \"...\"` para inspecionar candidatos sem executar.",
|
|
216
|
+
],
|
|
217
|
+
"exit_code": 2,
|
|
218
|
+
}
|
|
219
|
+
return payload
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
def agentic_model_strategy_needs_input_from_plan(
|
|
223
|
+
prompt: str,
|
|
224
|
+
execution_plan: dict[str, Any],
|
|
225
|
+
model_plan: dict[str, Any],
|
|
226
|
+
) -> dict[str, Any]:
|
|
227
|
+
execution_plan["status"] = "needs-input"
|
|
228
|
+
execution_plan["model_plan"] = model_plan
|
|
229
|
+
trace = list(execution_plan.get("trace") or [])
|
|
230
|
+
trace.append({"agent_id": "task-orchestrator", "action": "model-strategy", "status": "waiting-for-human"})
|
|
231
|
+
execution_plan["trace"] = trace
|
|
232
|
+
return {
|
|
233
|
+
"kind": "agent",
|
|
234
|
+
"status": "needs-input",
|
|
235
|
+
"ok": False,
|
|
236
|
+
"mode": "model-strategy",
|
|
237
|
+
"prompt_received": True,
|
|
238
|
+
"prompt_length": len(prompt),
|
|
239
|
+
"requires_human_confirmation": True,
|
|
240
|
+
"model_plan": model_plan,
|
|
241
|
+
"execution_plan": execution_plan,
|
|
242
|
+
"orchestration_trace": execution_plan.get("trace", []),
|
|
243
|
+
"message": model_plan.get("reason") or "A politica de modelo exige confirmacao humana antes de executar.",
|
|
244
|
+
"next_steps": [
|
|
245
|
+
"Confirme explicitamente a acao permitida ou reformule o pedido removendo decisoes destrutivas/sensiveis.",
|
|
246
|
+
"Use `agent --dry-run \"...\"` para inspecionar a estrategia e os gates sem executar.",
|
|
247
|
+
],
|
|
248
|
+
"exit_code": 2,
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
def dispatch_natural_operational_prompt(prompt: str) -> dict[str, Any] | None:
|
|
253
|
+
normalized = " ".join(prompt.lower().split())
|
|
254
|
+
control_result = dispatch_natural_control_prompt(normalized)
|
|
255
|
+
if control_result:
|
|
256
|
+
control_result["prompt_received"] = True
|
|
257
|
+
control_result["prompt_length"] = len(prompt)
|
|
258
|
+
return control_result
|
|
259
|
+
if "agenda" in normalized:
|
|
260
|
+
if "amanha" in normalized or "amanhã" in normalized:
|
|
261
|
+
payload = calendar_tomorrow()
|
|
262
|
+
else:
|
|
263
|
+
payload = calendar_today()
|
|
264
|
+
payload = dict(payload)
|
|
265
|
+
payload["kind"] = "agent"
|
|
266
|
+
payload["mode"] = "calendar-route"
|
|
267
|
+
payload["requires_llm"] = False
|
|
268
|
+
payload["prompt_received"] = True
|
|
269
|
+
payload["prompt_length"] = len(prompt)
|
|
270
|
+
payload["response"] = calendar_summary(payload)
|
|
271
|
+
if payload.get("status") == "needs-input":
|
|
272
|
+
payload["ok"] = False
|
|
273
|
+
else:
|
|
274
|
+
payload["ok"] = True
|
|
275
|
+
return payload
|
|
276
|
+
if has_pr_intent(normalized):
|
|
277
|
+
if any(marker in normalized for marker in ("diariamente", "todo dia", "diaria", "diária", "recorrente")):
|
|
278
|
+
payload = pr_create_automation()
|
|
279
|
+
return {
|
|
280
|
+
"kind": "agent",
|
|
281
|
+
"status": payload.get("status"),
|
|
282
|
+
"ok": True,
|
|
283
|
+
"mode": "pr-automation-route",
|
|
284
|
+
"requires_llm": False,
|
|
285
|
+
"prompt_received": True,
|
|
286
|
+
"prompt_length": len(prompt),
|
|
287
|
+
"response": "Automacao diaria de revisao de PRs criada em modo report-only.",
|
|
288
|
+
"result": payload,
|
|
289
|
+
}
|
|
290
|
+
payload = pr_list_review_requests()
|
|
291
|
+
return {
|
|
292
|
+
"kind": "agent",
|
|
293
|
+
"status": payload.get("status"),
|
|
294
|
+
"ok": payload.get("status") == "ok",
|
|
295
|
+
"mode": "pr-route",
|
|
296
|
+
"requires_llm": False,
|
|
297
|
+
"prompt_received": True,
|
|
298
|
+
"prompt_length": len(prompt),
|
|
299
|
+
"response": summarize_pr_list(payload),
|
|
300
|
+
"result": payload,
|
|
301
|
+
"exit_code": payload.get("exit_code", 0 if payload.get("status") == "ok" else 2),
|
|
302
|
+
}
|
|
303
|
+
return None
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
def dispatch_natural_control_prompt(normalized_prompt: str) -> dict[str, Any] | None:
|
|
307
|
+
return route_natural_control_prompt(ROOT, normalized_prompt)
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
def build_agent_dry_run_plan(prompt: str, request: AgentPromptRequest) -> dict[str, Any]:
|
|
311
|
+
normalized = " ".join(prompt.lower().split())
|
|
312
|
+
control_plan = plan_natural_control_prompt(ROOT, normalized)
|
|
313
|
+
if control_plan:
|
|
314
|
+
control_plan["prompt_received"] = True
|
|
315
|
+
control_plan["prompt_length"] = len(prompt)
|
|
316
|
+
return control_plan
|
|
317
|
+
route = route_prompt(prompt, ROOT)
|
|
318
|
+
execution_plan = build_execution_plan(ROOT, prompt, dry_run=True)
|
|
319
|
+
model_plan = (
|
|
320
|
+
execution_plan.get("model_plan")
|
|
321
|
+
if isinstance(execution_plan.get("model_plan"), dict)
|
|
322
|
+
else build_model_plan(prompt, route=route)
|
|
323
|
+
)
|
|
324
|
+
review_gate = execution_plan.get("review_gate") if isinstance(execution_plan.get("review_gate"), dict) else build_review_gate(prompt, route=route, model_plan=model_plan)
|
|
325
|
+
plan: dict[str, Any] = {
|
|
326
|
+
"kind": "agent",
|
|
327
|
+
"status": "planned",
|
|
328
|
+
"ok": True,
|
|
329
|
+
"dry_run": True,
|
|
330
|
+
"requires_llm": False,
|
|
331
|
+
"prompt_received": True,
|
|
332
|
+
"prompt_length": len(prompt),
|
|
333
|
+
"mode": "dry-run",
|
|
334
|
+
"intent": "llm" if not route else route.get("intent"),
|
|
335
|
+
"route": route,
|
|
336
|
+
"llm_backend": request.llm,
|
|
337
|
+
"external_writes": False,
|
|
338
|
+
"providers": {"used": [], "missing": [], "skipped": []},
|
|
339
|
+
"commands": [],
|
|
340
|
+
"permissions": [],
|
|
341
|
+
"model_plan": model_plan,
|
|
342
|
+
"review_gate": review_gate,
|
|
343
|
+
"execution_plan": execution_plan,
|
|
344
|
+
"orchestration_trace": execution_plan.get("trace", []),
|
|
345
|
+
"response": "Dry-run: nenhuma chamada LLM ou escrita externa foi executada.",
|
|
346
|
+
}
|
|
347
|
+
routing_decision = execution_plan.get("routing_decision") if isinstance(execution_plan.get("routing_decision"), dict) else {}
|
|
348
|
+
if routing_decision.get("status") in {"ambiguous", "low-confidence"}:
|
|
349
|
+
plan["requires_routing_confirmation"] = True
|
|
350
|
+
plan["routing_decision"] = routing_decision
|
|
351
|
+
plan["matches"] = routing_decision.get("candidates") or []
|
|
352
|
+
plan["response"] = "Dry-run: o roteamento precisa de confirmacao antes de executar."
|
|
353
|
+
if "agenda" in normalized:
|
|
354
|
+
plan.update(
|
|
355
|
+
{
|
|
356
|
+
"intent": "calendar",
|
|
357
|
+
"mode": "calendar-dry-run",
|
|
358
|
+
"providers": {"used": ["calendar"], "missing": [], "skipped": []},
|
|
359
|
+
"data_reads": ["configured calendar provider, if present"],
|
|
360
|
+
"response": "Dry-run: o calendario seria consultado localmente se configurado.",
|
|
361
|
+
}
|
|
362
|
+
)
|
|
363
|
+
return plan
|
|
364
|
+
if has_pr_intent(normalized):
|
|
365
|
+
recurring = any(marker in normalized for marker in ("diariamente", "todo dia", "diaria", "diária", "recorrente"))
|
|
366
|
+
plan.update(
|
|
367
|
+
{
|
|
368
|
+
"intent": "github-pr-review",
|
|
369
|
+
"mode": "pr-dry-run",
|
|
370
|
+
"providers": {"used": ["github"], "missing": [], "skipped": []},
|
|
371
|
+
"commands": planned_pr_commands("list-review-requests"),
|
|
372
|
+
"external_writes": False,
|
|
373
|
+
"permissions": [{"agent": "github-pr-reviewer", "provider": "github", "required_level": "read-only"}],
|
|
374
|
+
"response": (
|
|
375
|
+
"Dry-run: a automacao diaria de PR seria planejada em modo report-only."
|
|
376
|
+
if recurring
|
|
377
|
+
else "Dry-run: PRs aguardando revisao seriam listadas via gh em modo report-only."
|
|
378
|
+
),
|
|
379
|
+
}
|
|
380
|
+
)
|
|
381
|
+
return plan
|
|
382
|
+
if route:
|
|
383
|
+
plan["providers"] = {"used": [route.get("provider")], "missing": [], "skipped": []}
|
|
384
|
+
plan["response"] = "Dry-run: a capability roteada seria executada somente apos validar source/provider."
|
|
385
|
+
return plan
|
|
386
|
+
if not plan.get("requires_routing_confirmation"):
|
|
387
|
+
plan["response"] = "Dry-run: o prompt exigiria LLM configurada; nenhuma chamada foi feita."
|
|
388
|
+
return plan
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
def has_pr_intent(normalized_prompt: str) -> bool:
|
|
392
|
+
tokens = {token.strip(".,;:!?()[]{}\"'") for token in normalized_prompt.split()}
|
|
393
|
+
return bool({"pr", "prs"} & tokens) or "pull request" in normalized_prompt or "pull requests" in normalized_prompt
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
def finalize_agent_session(
|
|
397
|
+
result: dict[str, Any],
|
|
398
|
+
session: dict[str, Any],
|
|
399
|
+
prompt: str,
|
|
400
|
+
*,
|
|
401
|
+
backend: str | None = None,
|
|
402
|
+
) -> dict[str, Any]:
|
|
403
|
+
try:
|
|
404
|
+
result["session"] = record_exchange(str(session["id"]), prompt=prompt, result=result, backend=backend)
|
|
405
|
+
except ValueError as exc:
|
|
406
|
+
raise DevKitError(str(exc)) from exc
|
|
407
|
+
return result
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
def invoke_agentic_route(prompt: str, route: dict[str, Any]) -> dict[str, Any]:
|
|
411
|
+
execution_plan = build_execution_plan(ROOT, prompt, dry_run=False)
|
|
412
|
+
try:
|
|
413
|
+
source = resolve_source(
|
|
414
|
+
provider=route.get("provider"),
|
|
415
|
+
intent=route.get("intent"),
|
|
416
|
+
agent_id=route.get("agent_id"),
|
|
417
|
+
)
|
|
418
|
+
except SourceRegistryError as exc:
|
|
419
|
+
raise DevKitError(str(exc)) from exc
|
|
420
|
+
|
|
421
|
+
if not source:
|
|
422
|
+
wizard = missing_source_wizard(prompt, route, root=ROOT)
|
|
423
|
+
if execution_plan.get("configuration_tasks"):
|
|
424
|
+
execution_plan["configuration_tasks"][0]["setup_wizard"] = wizard
|
|
425
|
+
execution_plan["status"] = "needs-input"
|
|
426
|
+
execution_plan["trace"] = [
|
|
427
|
+
{"agent_id": "task-orchestrator", "action": "plan", "status": "needs-input"},
|
|
428
|
+
{"agent_id": "provider-configurator", "action": "configure", "status": "waiting-for-user"},
|
|
429
|
+
]
|
|
430
|
+
payload = {
|
|
431
|
+
"kind": "agent",
|
|
432
|
+
"status": "needs-input",
|
|
433
|
+
"ok": False,
|
|
434
|
+
"requires_source": True,
|
|
435
|
+
"provider": route.get("provider"),
|
|
436
|
+
"source_provider": route.get("provider"),
|
|
437
|
+
"prompt_received": True,
|
|
438
|
+
"prompt_length": len(prompt),
|
|
439
|
+
"route": route,
|
|
440
|
+
"napkin": napkin_context(ROOT, agent_id=route.get("agent_id")),
|
|
441
|
+
"execution_plan": execution_plan,
|
|
442
|
+
"orchestration_trace": execution_plan.get("trace", []),
|
|
443
|
+
"setup_wizard": wizard,
|
|
444
|
+
"next_question": wizard.get("next_question"),
|
|
445
|
+
"message": wizard.get("message"),
|
|
446
|
+
"next_steps": [
|
|
447
|
+
"Responda a pergunta do wizard para autorizar ou negar a configuracao desta fonte.",
|
|
448
|
+
"Se preferir teste local, configure uma source com fixture sem armazenar segredos.",
|
|
449
|
+
"O prompt original sera retomado apos a fonte reutilizavel ser configurada.",
|
|
450
|
+
],
|
|
451
|
+
"exit_code": 2,
|
|
452
|
+
}
|
|
453
|
+
return persist_setup_wizard_payload(payload, execution_plan=execution_plan, route=route)
|
|
454
|
+
|
|
455
|
+
model_plan = execution_plan.get("model_plan") if isinstance(execution_plan.get("model_plan"), dict) else build_model_plan(prompt, route=route)
|
|
456
|
+
if model_plan.get("strategy") == "human":
|
|
457
|
+
payload = agentic_model_strategy_needs_input_from_plan(prompt, execution_plan, model_plan)
|
|
458
|
+
payload["route"] = route
|
|
459
|
+
payload["source"] = public_source(source)
|
|
460
|
+
return payload
|
|
461
|
+
|
|
462
|
+
execution_plan = attach_source_to_primary_task(execution_plan)
|
|
463
|
+
def run_prompt_capability(agent: dict[str, Any], capability_id: str, capability_args: list[str]) -> dict[str, Any]:
|
|
464
|
+
return run_capability(
|
|
465
|
+
agent,
|
|
466
|
+
capability_id,
|
|
467
|
+
capability_args,
|
|
468
|
+
capture_output=True,
|
|
469
|
+
origin="agent-prompt",
|
|
470
|
+
)
|
|
471
|
+
|
|
472
|
+
if execution_plan.get("controller_enabled"):
|
|
473
|
+
controller_run = run_module_controller(
|
|
474
|
+
execution_plan,
|
|
475
|
+
load_agent=load_agent,
|
|
476
|
+
run_capability=run_prompt_capability,
|
|
477
|
+
)
|
|
478
|
+
execution_plan["module_controller_run"] = controller_run
|
|
479
|
+
execution_plan["shared_context"] = controller_run.get("shared_context") or execution_plan.get("shared_context")
|
|
480
|
+
executed = list(controller_run.get("executed_tasks") or [])
|
|
481
|
+
blocked = list(controller_run.get("blocked_tasks") or [])
|
|
482
|
+
else:
|
|
483
|
+
executed, blocked = execute_plan_tasks(
|
|
484
|
+
execution_plan,
|
|
485
|
+
load_agent=load_agent,
|
|
486
|
+
run_capability=run_prompt_capability,
|
|
487
|
+
)
|
|
488
|
+
execution_plan = mark_plan_after_execution(execution_plan, executed, blocked)
|
|
489
|
+
result = (executed[0].get("result") if executed else blocked[0].get("result") if blocked and isinstance(blocked[0].get("result"), dict) else {}) or {}
|
|
490
|
+
response = result.get("stdout") or result.get("error") or ""
|
|
491
|
+
record_usage(prompt, route=route, source_id=str(source["id"]))
|
|
492
|
+
review_gate = execution_plan.get("review_gate") if isinstance(execution_plan.get("review_gate"), dict) else build_review_gate(prompt, route=route, model_plan=model_plan)
|
|
493
|
+
review_payload = {
|
|
494
|
+
"kind": "agent",
|
|
495
|
+
"status": execution_plan.get("status") if execution_plan.get("status") != "partial" else result.get("status"),
|
|
496
|
+
"ok": bool(executed) and not blocked,
|
|
497
|
+
"response": response,
|
|
498
|
+
}
|
|
499
|
+
review_result = {
|
|
500
|
+
"kind": "execution-review",
|
|
501
|
+
"agent_id": "execution-reviewer",
|
|
502
|
+
"capability_id": "review-final-output",
|
|
503
|
+
"status": "not-run",
|
|
504
|
+
"ok": False,
|
|
505
|
+
}
|
|
506
|
+
if result.get("ok"):
|
|
507
|
+
review_payload, review_gate, review_result = enforce_execution_review(
|
|
508
|
+
prompt=prompt,
|
|
509
|
+
result=review_payload,
|
|
510
|
+
review_gate=review_gate,
|
|
511
|
+
execution_plan=execution_plan,
|
|
512
|
+
producer_backend="deterministic-capability",
|
|
513
|
+
)
|
|
514
|
+
if review_result.get("ok"):
|
|
515
|
+
execution_plan = mark_review_task(execution_plan, reviewer=str(review_result.get("llm_backend") or "execution-reviewer"))
|
|
516
|
+
elif review_gate.get("status") == "needs-review":
|
|
517
|
+
execution_plan = mark_review_task_needs_review(execution_plan, review_result)
|
|
518
|
+
return {
|
|
519
|
+
"kind": "agent",
|
|
520
|
+
"status": review_payload.get("status"),
|
|
521
|
+
"ok": bool(review_payload.get("ok")),
|
|
522
|
+
"mode": "agentic-route",
|
|
523
|
+
"legacy_mode": "deterministic-route",
|
|
524
|
+
"prompt_received": True,
|
|
525
|
+
"prompt_length": len(prompt),
|
|
526
|
+
"route": route,
|
|
527
|
+
"source": public_source(source),
|
|
528
|
+
"napkin": napkin_context(ROOT, agent_id=route.get("agent_id"), source_id=str(source["id"])),
|
|
529
|
+
"model_plan": model_plan,
|
|
530
|
+
"review_gate": review_gate,
|
|
531
|
+
"review_result": review_result,
|
|
532
|
+
"review_task": execution_plan.get("review_task"),
|
|
533
|
+
"execution_plan": execution_plan,
|
|
534
|
+
"orchestration_trace": execution_plan.get("trace", []),
|
|
535
|
+
"response": review_payload.get("response") or response,
|
|
536
|
+
"result": result,
|
|
537
|
+
"exit_code": review_payload.get("exit_code", result.get("exit_code", 0 if executed and not blocked else 1)),
|
|
538
|
+
}
|