agent-devkit 0.1.6 → 0.3.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 +59 -5
- package/bin/agent.mjs +133 -7
- package/package.json +1 -1
- package/runtime/README.md +239 -5
- package/runtime/agent +36 -5
- package/runtime/agents/README.md +44 -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/contribution-reviewer/AGENTS.md +8 -0
- package/runtime/agents/contribution-reviewer/README.md +8 -0
- package/runtime/agents/contribution-reviewer/agent.yaml +40 -0
- package/runtime/agents/contribution-reviewer/capabilities/plan-contribution-pr/capability.yaml +27 -0
- package/runtime/agents/contribution-reviewer/capabilities/plan-contribution-pr/decision-rules.md +5 -0
- package/runtime/agents/contribution-reviewer/capabilities/plan-contribution-pr/workflow.md +6 -0
- package/runtime/agents/contribution-reviewer/capabilities/review-contribution/capability.yaml +25 -0
- package/runtime/agents/contribution-reviewer/capabilities/review-contribution/decision-rules.md +5 -0
- package/runtime/agents/contribution-reviewer/capabilities/review-contribution/workflow.md +5 -0
- package/runtime/agents/contribution-reviewer/capabilities/validate-local-contribution/capability.yaml +26 -0
- package/runtime/agents/contribution-reviewer/capabilities/validate-local-contribution/decision-rules.md +5 -0
- package/runtime/agents/contribution-reviewer/capabilities/validate-local-contribution/workflow.md +6 -0
- package/runtime/agents/contribution-reviewer/infra/README.md +6 -0
- package/runtime/agents/contribution-reviewer/knowledge/context.md +8 -0
- package/runtime/agents/contribution-reviewer/knowledge/system.md +8 -0
- package/runtime/agents/contribution-reviewer/templates/README.md +3 -0
- 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-author/AGENTS.md +7 -0
- package/runtime/agents/knowledge-author/README.md +7 -0
- package/runtime/agents/knowledge-author/agent.yaml +37 -0
- package/runtime/agents/knowledge-author/capabilities/create-knowledge-snapshot/capability.yaml +30 -0
- package/runtime/agents/knowledge-author/capabilities/create-knowledge-snapshot/decision-rules.md +6 -0
- package/runtime/agents/knowledge-author/capabilities/create-knowledge-snapshot/workflow.md +7 -0
- package/runtime/agents/knowledge-author/infra/.gitkeep +1 -0
- package/runtime/agents/knowledge-author/knowledge/context.md +4 -0
- package/runtime/agents/knowledge-author/knowledge/system.md +4 -0
- package/runtime/agents/knowledge-author/templates/.gitkeep +1 -0
- package/runtime/agents/knowledge-curator/AGENTS.md +7 -0
- package/runtime/agents/knowledge-curator/README.md +6 -0
- package/runtime/agents/knowledge-curator/agent.yaml +37 -0
- package/runtime/agents/knowledge-curator/capabilities/curate-knowledge-base/capability.yaml +29 -0
- package/runtime/agents/knowledge-curator/capabilities/curate-knowledge-base/decision-rules.md +6 -0
- package/runtime/agents/knowledge-curator/capabilities/curate-knowledge-base/workflow.md +7 -0
- package/runtime/agents/knowledge-curator/infra/.gitkeep +1 -0
- package/runtime/agents/knowledge-curator/knowledge/context.md +4 -0
- package/runtime/agents/knowledge-curator/knowledge/system.md +4 -0
- package/runtime/agents/knowledge-curator/templates/.gitkeep +1 -0
- package/runtime/agents/knowledge-generator/agent.yaml +13 -3
- package/runtime/agents/knowledge-generator/capabilities/generate-knowledge/capability.yaml +1 -1
- package/runtime/agents/knowledge-infra-builder/AGENTS.md +8 -0
- package/runtime/agents/knowledge-infra-builder/README.md +8 -0
- package/runtime/agents/knowledge-infra-builder/agent.yaml +38 -0
- package/runtime/agents/knowledge-infra-builder/capabilities/create-knowledge-base/capability.yaml +30 -0
- package/runtime/agents/knowledge-infra-builder/capabilities/create-knowledge-base/decision-rules.md +6 -0
- package/runtime/agents/knowledge-infra-builder/capabilities/create-knowledge-base/workflow.md +7 -0
- package/runtime/agents/knowledge-infra-builder/infra/.gitkeep +1 -0
- package/runtime/agents/knowledge-infra-builder/knowledge/context.md +4 -0
- package/runtime/agents/knowledge-infra-builder/knowledge/system.md +4 -0
- package/runtime/agents/knowledge-infra-builder/templates/.gitkeep +1 -0
- package/runtime/agents/knowledge-owner/AGENTS.md +7 -0
- package/runtime/agents/knowledge-owner/README.md +6 -0
- package/runtime/agents/knowledge-owner/agent.yaml +37 -0
- package/runtime/agents/knowledge-owner/capabilities/publish-knowledge-snapshot/capability.yaml +28 -0
- package/runtime/agents/knowledge-owner/capabilities/publish-knowledge-snapshot/decision-rules.md +6 -0
- package/runtime/agents/knowledge-owner/capabilities/publish-knowledge-snapshot/workflow.md +7 -0
- package/runtime/agents/knowledge-owner/infra/.gitkeep +1 -0
- package/runtime/agents/knowledge-owner/knowledge/context.md +4 -0
- package/runtime/agents/knowledge-owner/knowledge/system.md +4 -0
- package/runtime/agents/knowledge-owner/templates/.gitkeep +1 -0
- package/runtime/agents/knowledge-reviewer/AGENTS.md +7 -0
- package/runtime/agents/knowledge-reviewer/README.md +7 -0
- package/runtime/agents/knowledge-reviewer/agent.yaml +36 -0
- package/runtime/agents/knowledge-reviewer/capabilities/review-knowledge-snapshot/capability.yaml +26 -0
- package/runtime/agents/knowledge-reviewer/capabilities/review-knowledge-snapshot/decision-rules.md +6 -0
- package/runtime/agents/knowledge-reviewer/capabilities/review-knowledge-snapshot/workflow.md +7 -0
- package/runtime/agents/knowledge-reviewer/infra/.gitkeep +1 -0
- package/runtime/agents/knowledge-reviewer/knowledge/context.md +4 -0
- package/runtime/agents/knowledge-reviewer/knowledge/system.md +4 -0
- package/runtime/agents/knowledge-reviewer/templates/.gitkeep +1 -0
- 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/local-memory-manager/AGENTS.md +5 -0
- package/runtime/agents/local-memory-manager/README.md +7 -0
- package/runtime/agents/local-memory-manager/agent.yaml +38 -0
- package/runtime/agents/local-memory-manager/capabilities/curate-local-memory/capability.yaml +19 -0
- package/runtime/agents/local-memory-manager/capabilities/curate-local-memory/decision-rules.md +5 -0
- package/runtime/agents/local-memory-manager/capabilities/curate-local-memory/workflow.md +6 -0
- package/runtime/agents/local-memory-manager/capabilities/inspect-local-memory/capability.yaml +19 -0
- package/runtime/agents/local-memory-manager/capabilities/inspect-local-memory/decision-rules.md +5 -0
- package/runtime/agents/local-memory-manager/capabilities/inspect-local-memory/workflow.md +5 -0
- package/runtime/agents/local-memory-manager/infra/.gitkeep +1 -0
- package/runtime/agents/local-memory-manager/knowledge/context.md +4 -0
- package/runtime/agents/local-memory-manager/knowledge/system.md +4 -0
- package/runtime/agents/local-memory-manager/templates/.gitkeep +1 -0
- package/runtime/agents/memory-sync-manager/AGENTS.md +7 -0
- package/runtime/agents/memory-sync-manager/README.md +7 -0
- package/runtime/agents/memory-sync-manager/agent.yaml +37 -0
- package/runtime/agents/memory-sync-manager/capabilities/plan-memory-backup/capability.yaml +29 -0
- package/runtime/agents/memory-sync-manager/capabilities/plan-memory-backup/decision-rules.md +6 -0
- package/runtime/agents/memory-sync-manager/capabilities/plan-memory-backup/workflow.md +7 -0
- package/runtime/agents/memory-sync-manager/infra/.gitkeep +1 -0
- package/runtime/agents/memory-sync-manager/knowledge/context.md +4 -0
- package/runtime/agents/memory-sync-manager/knowledge/system.md +4 -0
- package/runtime/agents/memory-sync-manager/templates/.gitkeep +1 -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/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/shared-memory-curator/AGENTS.md +5 -0
- package/runtime/agents/shared-memory-curator/README.md +6 -0
- package/runtime/agents/shared-memory-curator/agent.yaml +38 -0
- package/runtime/agents/shared-memory-curator/capabilities/create-shared-memory/capability.yaml +19 -0
- package/runtime/agents/shared-memory-curator/capabilities/create-shared-memory/decision-rules.md +5 -0
- package/runtime/agents/shared-memory-curator/capabilities/create-shared-memory/workflow.md +5 -0
- package/runtime/agents/shared-memory-curator/capabilities/publish-shared-submission/capability.yaml +19 -0
- package/runtime/agents/shared-memory-curator/capabilities/publish-shared-submission/decision-rules.md +5 -0
- package/runtime/agents/shared-memory-curator/capabilities/publish-shared-submission/workflow.md +5 -0
- package/runtime/agents/shared-memory-curator/capabilities/review-shared-submission/capability.yaml +19 -0
- package/runtime/agents/shared-memory-curator/capabilities/review-shared-submission/decision-rules.md +5 -0
- package/runtime/agents/shared-memory-curator/capabilities/review-shared-submission/workflow.md +5 -0
- package/runtime/agents/shared-memory-curator/infra/.gitkeep +1 -0
- package/runtime/agents/shared-memory-curator/knowledge/context.md +5 -0
- package/runtime/agents/shared-memory-curator/knowledge/system.md +4 -0
- package/runtime/agents/shared-memory-curator/templates/.gitkeep +1 -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/README.md +35 -4
- 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 +247 -6
- package/runtime/cli/aikit/agentic_commands.py +158 -0
- package/runtime/cli/aikit/app_home.py +1 -0
- package/runtime/cli/aikit/architecture.py +84 -0
- package/runtime/cli/aikit/audit.py +187 -8
- package/runtime/cli/aikit/autonomy.py +237 -0
- package/runtime/cli/aikit/capability_runtime.py +522 -0
- package/runtime/cli/aikit/catalog.py +516 -0
- package/runtime/cli/aikit/cli_dispatch.py +1554 -0
- package/runtime/cli/aikit/cli_parser.py +547 -0
- package/runtime/cli/aikit/collaboration.py +359 -0
- package/runtime/cli/aikit/configuration_orchestrator.py +52 -26
- package/runtime/cli/aikit/contribution.py +235 -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 +164 -0
- package/runtime/cli/aikit/errors.py +7 -0
- package/runtime/cli/aikit/eval.py +504 -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 +1332 -0
- package/runtime/cli/aikit/impact_map.py +294 -0
- package/runtime/cli/aikit/interactive_wizard.py +227 -0
- package/runtime/cli/aikit/knowledge_base.py +1067 -0
- package/runtime/cli/aikit/llm.py +12 -4
- package/runtime/cli/aikit/local_artifacts.py +444 -0
- package/runtime/cli/aikit/local_llm.py +161 -0
- package/runtime/cli/aikit/local_llm_operator.py +35 -1
- package/runtime/cli/aikit/main.py +23 -2833
- package/runtime/cli/aikit/mcp_manifest.py +1027 -0
- package/runtime/cli/aikit/mcp_server.py +132 -0
- package/runtime/cli/aikit/mcp_tools.py +900 -0
- package/runtime/cli/aikit/memory.py +405 -0
- package/runtime/cli/aikit/mini_brain.py +246 -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 +662 -0
- package/runtime/cli/aikit/notifications.py +716 -2
- package/runtime/cli/aikit/ollama.py +64 -14
- package/runtime/cli/aikit/onboarding.py +551 -0
- package/runtime/cli/aikit/orchestrator.py +809 -119
- package/runtime/cli/aikit/output.py +130 -2
- package/runtime/cli/aikit/permissions.py +14 -4
- package/runtime/cli/aikit/prompt_injection.py +68 -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 +114 -0
- package/runtime/cli/aikit/sessions.py +88 -2
- package/runtime/cli/aikit/setup_wizard_payload.py +35 -0
- package/runtime/cli/aikit/shared_memory.py +415 -0
- package/runtime/cli/aikit/sources.py +298 -50
- package/runtime/cli/aikit/specialist_readiness.py +152 -0
- package/runtime/cli/aikit/tasks.py +553 -22
- package/runtime/cli/aikit/team.py +380 -0
- package/runtime/cli/aikit/toolchain.py +7 -2
- package/runtime/cli/aikit/wizard_state.py +15 -1
- package/runtime/cli/aikit/workflows.py +216 -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/knowledge-github.yaml +40 -0
- package/runtime/providers/knowledge-google-drive.yaml +32 -0
- package/runtime/providers/knowledge-local.yaml +26 -0
- package/runtime/providers/knowledge-notion.yaml +32 -0
- package/runtime/providers/knowledge-obsidian.yaml +24 -0
- package/runtime/providers/knowledge-onedrive.yaml +36 -0
- package/runtime/providers/knowledge-s3.yaml +45 -0
- package/runtime/providers/knowledge-sharepoint.yaml +39 -0
- package/runtime/providers/knowledge-supabase.yaml +43 -0
- package/runtime/providers/knowledge-vector.yaml +39 -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/requirements.txt +6 -0
- package/runtime/scripts/docker-cli-qa.sh +453 -0
- package/runtime/scripts/release-catalog-snapshot.json +594 -0
- package/runtime/scripts/release-gate.py +189 -8
- package/runtime/scripts/validate-repo.py +312 -0
- package/runtime/tooling/toolchain.yaml +92 -0
- package/runtime/vendor/skills/napkin/napkin.md +32 -12
- package/runtime/workflows/azure-card-analysis/README.md +3 -0
- package/runtime/workflows/azure-card-analysis/workflow.yaml +30 -0
- package/runtime/workflows/daily-pr-review/README.md +3 -0
- package/runtime/workflows/daily-pr-review/workflow.yaml +31 -0
- package/runtime/workflows/incident-analysis/README.md +3 -0
- package/runtime/workflows/incident-analysis/workflow.yaml +33 -0
- package/runtime/workflows/release-prep/README.md +3 -0
- package/runtime/workflows/release-prep/workflow.yaml +30 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"""Doctor and diagnostics payload builder for the CLI."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import shutil
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
from cli.aikit.capability_runtime import list_agents, list_all_capabilities
|
|
10
|
+
from cli.aikit.catalog import catalog_list
|
|
11
|
+
from cli.aikit.diagnostics import build_diagnostics
|
|
12
|
+
from cli.aikit.eval import eval_list
|
|
13
|
+
from cli.aikit.extensions import local_extensions_list
|
|
14
|
+
from cli.aikit.knowledge_base import knowledge_doctor
|
|
15
|
+
from cli.aikit.lock import lock_status
|
|
16
|
+
from cli.aikit.local_llm import local_llm_doctor
|
|
17
|
+
from cli.aikit.runtime_paths import AGENTS_DIR, ROOT
|
|
18
|
+
from cli.aikit.secrets import secrets_doctor
|
|
19
|
+
from cli.aikit.specialist_readiness import specialist_readiness
|
|
20
|
+
from cli.aikit.team import team_status
|
|
21
|
+
from cli.aikit.workflows import workflow_list
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def doctor(project: str | None = None, home: str | None = None, scope: str = "auto") -> dict[str, Any]:
|
|
25
|
+
agents = list_agents()
|
|
26
|
+
capabilities = list_all_capabilities()
|
|
27
|
+
declared_runners = sum(1 for item in capabilities if item.get("has_runner"))
|
|
28
|
+
workflows = sum(1 for item in capabilities if item.get("has_workflow"))
|
|
29
|
+
decision_rules = sum(1 for item in capabilities if item.get("has_decision_rules"))
|
|
30
|
+
validator = ROOT / "scripts" / "validate-repo.py"
|
|
31
|
+
errors: list[str] = []
|
|
32
|
+
warnings: list[str] = []
|
|
33
|
+
|
|
34
|
+
if not ROOT.exists():
|
|
35
|
+
errors.append(f"root not found: {ROOT}")
|
|
36
|
+
if not AGENTS_DIR.is_dir():
|
|
37
|
+
errors.append(f"agents directory not found: {AGENTS_DIR}")
|
|
38
|
+
if not validator.exists():
|
|
39
|
+
warnings.append("scripts/validate-repo.py not found")
|
|
40
|
+
project_path = doctor_project_path(project, scope)
|
|
41
|
+
home_path = Path(home) if home else None
|
|
42
|
+
locks = lock_status(project_path, home_path)
|
|
43
|
+
if project and locks["status"] == "diverged":
|
|
44
|
+
warnings.append("lock divergence between global runtime.lock and project ai-devkit.lock")
|
|
45
|
+
checks = {
|
|
46
|
+
"root_exists": ROOT.exists(),
|
|
47
|
+
"agents_dir_exists": AGENTS_DIR.is_dir(),
|
|
48
|
+
"validator_exists": validator.exists(),
|
|
49
|
+
"agent_command_exists": (ROOT / "agent").exists(),
|
|
50
|
+
"aikit_command_exists": (ROOT / "aikit").exists(),
|
|
51
|
+
"ai_devkit_command_exists": (ROOT / "ai-devkit").exists(),
|
|
52
|
+
"agent_on_path": shutil.which("agent") is not None,
|
|
53
|
+
}
|
|
54
|
+
diagnostics = build_diagnostics(
|
|
55
|
+
ROOT,
|
|
56
|
+
project=project_path,
|
|
57
|
+
home=home_path,
|
|
58
|
+
runtime_checks=checks,
|
|
59
|
+
runtime_status="ok" if not errors else "error",
|
|
60
|
+
locks=locks,
|
|
61
|
+
)
|
|
62
|
+
operational = operational_diagnostics(project_path)
|
|
63
|
+
|
|
64
|
+
return {
|
|
65
|
+
"kind": "doctor",
|
|
66
|
+
"status": "ok" if not errors else "error",
|
|
67
|
+
"scope": scope,
|
|
68
|
+
"root": str(ROOT),
|
|
69
|
+
"summary": {
|
|
70
|
+
"agents": len(agents),
|
|
71
|
+
"capabilities": len(capabilities),
|
|
72
|
+
"declared_runners": declared_runners,
|
|
73
|
+
"workflows": workflows,
|
|
74
|
+
"decision_rules": decision_rules,
|
|
75
|
+
},
|
|
76
|
+
"checks": checks,
|
|
77
|
+
"errors": errors,
|
|
78
|
+
"warnings": warnings,
|
|
79
|
+
"locks": locks,
|
|
80
|
+
"diagnostics": diagnostics,
|
|
81
|
+
"operational": operational,
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def doctor_project_path(project: str | None, scope: str) -> Path | None:
|
|
86
|
+
if project:
|
|
87
|
+
return Path(project)
|
|
88
|
+
if scope == "project":
|
|
89
|
+
return Path.cwd()
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def operational_diagnostics(project_path: Path | None = None) -> dict[str, Any]:
|
|
94
|
+
return {
|
|
95
|
+
"catalog": summarize_call(lambda: catalog_list(ROOT), count_key="count"),
|
|
96
|
+
"evals": summarize_call(lambda: eval_list(), count_path=("suites",)),
|
|
97
|
+
"workflows": summarize_call(lambda: workflow_list(ROOT), count_path=("items",)),
|
|
98
|
+
"secret_refs": summarize_secret_refs(),
|
|
99
|
+
"local_llm": summarize_local_llm(),
|
|
100
|
+
"specialists": summarize_specialists(),
|
|
101
|
+
"extensions": summarize_call(lambda: local_extensions_list(), count_path=("items",)),
|
|
102
|
+
"team": summarize_call(lambda: team_status(project_path or Path.cwd())),
|
|
103
|
+
"knowledge": summarize_call(lambda: knowledge_doctor(project_path or Path.cwd())),
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def summarize_call(factory, *, count_key: str | None = None, count_path: tuple[str, ...] | None = None) -> dict[str, Any]:
|
|
108
|
+
try:
|
|
109
|
+
payload = factory()
|
|
110
|
+
except Exception as exc: # noqa: BLE001 - doctor must report subsystem failures.
|
|
111
|
+
return {"status": "error", "error": type(exc).__name__}
|
|
112
|
+
count = payload.get(count_key) if count_key else None
|
|
113
|
+
if count is None and count_path:
|
|
114
|
+
value: Any = payload
|
|
115
|
+
for key in count_path:
|
|
116
|
+
value = value.get(key) if isinstance(value, dict) else None
|
|
117
|
+
count = len(value) if isinstance(value, list) else None
|
|
118
|
+
return {"status": payload.get("status", "ok"), "kind": payload.get("kind"), "count": count}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def summarize_secret_refs() -> dict[str, Any]:
|
|
122
|
+
try:
|
|
123
|
+
payload = secrets_doctor()
|
|
124
|
+
except Exception as exc: # noqa: BLE001
|
|
125
|
+
return {"status": "error", "error": type(exc).__name__}
|
|
126
|
+
return {
|
|
127
|
+
"status": payload.get("status"),
|
|
128
|
+
"kind": payload.get("kind"),
|
|
129
|
+
"references": len(payload.get("references") or []),
|
|
130
|
+
"stored_values": payload.get("stored_values") is True,
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def summarize_local_llm() -> dict[str, Any]:
|
|
135
|
+
try:
|
|
136
|
+
payload = local_llm_doctor()
|
|
137
|
+
except Exception as exc: # noqa: BLE001
|
|
138
|
+
return {"status": "error", "error": type(exc).__name__}
|
|
139
|
+
mini = payload.get("mini_brain") if isinstance(payload.get("mini_brain"), dict) else {}
|
|
140
|
+
ollama = payload.get("ollama") if isinstance(payload.get("ollama"), dict) else {}
|
|
141
|
+
return {
|
|
142
|
+
"status": payload.get("status"),
|
|
143
|
+
"kind": payload.get("kind"),
|
|
144
|
+
"ollama": ollama.get("status"),
|
|
145
|
+
"mini_brain": mini.get("status"),
|
|
146
|
+
"enabled": mini.get("enabled") is True,
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def summarize_specialists() -> dict[str, Any]:
|
|
151
|
+
try:
|
|
152
|
+
payload = specialist_readiness(ROOT)
|
|
153
|
+
except Exception as exc: # noqa: BLE001
|
|
154
|
+
return {"status": "error", "error": type(exc).__name__}
|
|
155
|
+
return {
|
|
156
|
+
"status": payload.get("status"),
|
|
157
|
+
"kind": payload.get("kind"),
|
|
158
|
+
"agents_total": payload.get("agents_total"),
|
|
159
|
+
"agents_with_provider_requirements": payload.get("agents_with_provider_requirements"),
|
|
160
|
+
"ready_agents": payload.get("ready_agents"),
|
|
161
|
+
"partial_agents": payload.get("partial_agents"),
|
|
162
|
+
"needs_setup_agents": payload.get("needs_setup_agents"),
|
|
163
|
+
"missing_providers": payload.get("missing_providers") or [],
|
|
164
|
+
}
|
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
"""Deterministic eval suites for Agent DevKit runtime contracts."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import re
|
|
7
|
+
import tempfile
|
|
8
|
+
from datetime import datetime, timezone
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
from typing import Any, Callable
|
|
11
|
+
|
|
12
|
+
from cli.aikit.agentic_commands import agentic_plan
|
|
13
|
+
from cli.aikit.app_home import app_path, ensure_app_home
|
|
14
|
+
from cli.aikit.catalog import catalog_search
|
|
15
|
+
from cli.aikit.configuration_orchestrator import provider_setup_wizard
|
|
16
|
+
from cli.aikit.contribution import contribution_pr
|
|
17
|
+
from cli.aikit.extensions import local_extensions_list
|
|
18
|
+
from cli.aikit.identity import identity_system_prompt
|
|
19
|
+
from cli.aikit.mcp_manifest import mcp_tools
|
|
20
|
+
from cli.aikit.model_router import build_model_plan
|
|
21
|
+
from cli.aikit.providers import load_providers
|
|
22
|
+
from cli.aikit.prompt_injection import prompt_injection_eval_fixture
|
|
23
|
+
from cli.aikit.review_gate import build_review_gate
|
|
24
|
+
from cli.aikit.router_explain import explain_route
|
|
25
|
+
from cli.aikit.runtime_paths import ROOT
|
|
26
|
+
from cli.aikit.secrets import secrets_doctor
|
|
27
|
+
from cli.aikit.sources import list_sources
|
|
28
|
+
from cli.aikit.workflows import workflow_list
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
EVAL_SCHEMA_VERSION = "agent-devkit.eval/v1"
|
|
32
|
+
SUITES = (
|
|
33
|
+
"routing",
|
|
34
|
+
"catalog",
|
|
35
|
+
"wizard",
|
|
36
|
+
"source_config",
|
|
37
|
+
"identity_enforcement",
|
|
38
|
+
"review_gate",
|
|
39
|
+
"model_router",
|
|
40
|
+
"agentic_plan",
|
|
41
|
+
"write_policy",
|
|
42
|
+
"source_readiness",
|
|
43
|
+
"mcp",
|
|
44
|
+
"mcp_contract",
|
|
45
|
+
"workflow_contract",
|
|
46
|
+
"extension_contract",
|
|
47
|
+
"contribution_contract",
|
|
48
|
+
"team_contract",
|
|
49
|
+
"knowledge_contract",
|
|
50
|
+
"secret_refs",
|
|
51
|
+
"prompt-injection",
|
|
52
|
+
"prompt_injection",
|
|
53
|
+
"mini_brain_limits",
|
|
54
|
+
"generated_agent_contract",
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def eval_list() -> dict[str, Any]:
|
|
59
|
+
return {
|
|
60
|
+
"kind": "eval-suites",
|
|
61
|
+
"schema_version": EVAL_SCHEMA_VERSION,
|
|
62
|
+
"status": "ok",
|
|
63
|
+
"suites": [{"id": display_suite_id(suite_id), "deterministic": True} for suite_id in canonical_suite_ids()],
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def eval_run(suite: str, root: Path | None = None) -> dict[str, Any]:
|
|
68
|
+
root = root or ROOT
|
|
69
|
+
suite = normalize_suite_id(suite)
|
|
70
|
+
if suite == "all":
|
|
71
|
+
started_at = datetime.now(timezone.utc)
|
|
72
|
+
runs = [eval_run(item, root) for item in canonical_suite_ids()]
|
|
73
|
+
status = "passed" if all(item["status"] == "passed" for item in runs) else "failed"
|
|
74
|
+
return persist_run(run_payload("all", status, runs, started_at=started_at))
|
|
75
|
+
handlers: dict[str, Callable[[Path], list[dict[str, Any]]]] = {
|
|
76
|
+
"routing": eval_routing,
|
|
77
|
+
"catalog": eval_catalog,
|
|
78
|
+
"wizard": eval_wizard,
|
|
79
|
+
"source_config": eval_source_config,
|
|
80
|
+
"identity_enforcement": eval_identity_enforcement,
|
|
81
|
+
"review_gate": eval_review_gate,
|
|
82
|
+
"model_router": eval_model_router,
|
|
83
|
+
"agentic_plan": eval_agentic_plan,
|
|
84
|
+
"write_policy": eval_write_policy,
|
|
85
|
+
"source_readiness": eval_source_readiness,
|
|
86
|
+
"mcp_contract": eval_mcp_contract,
|
|
87
|
+
"workflow_contract": eval_workflow_contract,
|
|
88
|
+
"extension_contract": eval_extension_contract,
|
|
89
|
+
"contribution_contract": eval_contribution_contract,
|
|
90
|
+
"team_contract": eval_team_contract,
|
|
91
|
+
"knowledge_contract": eval_knowledge_contract,
|
|
92
|
+
"secret_refs": eval_secret_refs,
|
|
93
|
+
"prompt_injection": eval_prompt_injection,
|
|
94
|
+
"mini_brain_limits": eval_mini_brain_limits,
|
|
95
|
+
"generated_agent_contract": eval_generated_agent_contract,
|
|
96
|
+
}
|
|
97
|
+
handler = handlers.get(suite)
|
|
98
|
+
if not handler:
|
|
99
|
+
raise ValueError(f"unknown eval suite: {suite}")
|
|
100
|
+
started_at = datetime.now(timezone.utc)
|
|
101
|
+
checks = handler(root)
|
|
102
|
+
status = "passed" if all(item.get("status") == "passed" for item in checks) else "failed"
|
|
103
|
+
return persist_run(run_payload(display_suite_id(suite), status, checks, started_at=started_at))
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def eval_report(run_id: str | None = None) -> dict[str, Any]:
|
|
107
|
+
runs = list_eval_runs()
|
|
108
|
+
if run_id:
|
|
109
|
+
payload = read_eval_run(run_id)
|
|
110
|
+
return {
|
|
111
|
+
"kind": "eval-report",
|
|
112
|
+
"schema_version": EVAL_SCHEMA_VERSION,
|
|
113
|
+
"status": "ok",
|
|
114
|
+
"run": payload,
|
|
115
|
+
"runs": runs,
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
"kind": "eval-report",
|
|
119
|
+
"schema_version": EVAL_SCHEMA_VERSION,
|
|
120
|
+
"status": "ok",
|
|
121
|
+
"message": "Use `agent eval report <run-id>` to inspect a persisted run.",
|
|
122
|
+
"runs": runs,
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def eval_routing(root: Path) -> list[dict[str, Any]]:
|
|
127
|
+
payload = explain_route("revise as prs que recebi hoje", root)
|
|
128
|
+
return [
|
|
129
|
+
{
|
|
130
|
+
"id": "routing.pr-review",
|
|
131
|
+
"status": "passed" if payload["candidates"] else "failed",
|
|
132
|
+
"evidence": {"decision": payload["decision"], "candidates": len(payload["candidates"])},
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def eval_catalog(root: Path) -> list[dict[str, Any]]:
|
|
138
|
+
payload = catalog_search("pr", root)
|
|
139
|
+
return [{"id": "catalog.search-pr", "status": "passed" if payload["items"] else "failed", "count": payload["count"]}]
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def eval_wizard(root: Path) -> list[dict[str, Any]]:
|
|
143
|
+
wizard = provider_setup_wizard(root, "azure-devops", prompt="analise o card 1")
|
|
144
|
+
question = wizard.get("next_question") if isinstance(wizard.get("next_question"), dict) else {}
|
|
145
|
+
checks = [
|
|
146
|
+
{
|
|
147
|
+
"id": "wizard.provider-opt-in",
|
|
148
|
+
"status": "passed" if wizard.get("kind") == "provider-setup-wizard" and question.get("type") == "confirm" else "failed",
|
|
149
|
+
"provider": wizard.get("provider"),
|
|
150
|
+
"question": question.get("id"),
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
for provider in load_providers(root):
|
|
154
|
+
provider_id = str(provider.get("id") or "")
|
|
155
|
+
if not provider_id:
|
|
156
|
+
continue
|
|
157
|
+
try:
|
|
158
|
+
candidate = provider_setup_wizard(root, provider_id)
|
|
159
|
+
except Exception as exc: # noqa: BLE001 - eval must report coverage failures.
|
|
160
|
+
checks.append({"id": f"wizard.provider-coverage.{provider_id}", "status": "failed", "error": type(exc).__name__})
|
|
161
|
+
continue
|
|
162
|
+
questions = candidate.get("questions") if isinstance(candidate.get("questions"), list) else []
|
|
163
|
+
checks.append(
|
|
164
|
+
{
|
|
165
|
+
"id": f"wizard.provider-coverage.{provider_id}",
|
|
166
|
+
"status": "passed"
|
|
167
|
+
if candidate.get("kind") == "provider-setup-wizard"
|
|
168
|
+
and candidate.get("provider") == provider_id
|
|
169
|
+
and isinstance(candidate.get("next_question"), dict)
|
|
170
|
+
else "failed",
|
|
171
|
+
"provider": provider_id,
|
|
172
|
+
"questions": len(questions),
|
|
173
|
+
"stores_secret": candidate.get("stores_secret"),
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
return checks
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
def eval_source_config(_root: Path) -> list[dict[str, Any]]:
|
|
180
|
+
payload = list_sources()
|
|
181
|
+
return [{"id": "source-config.no-stored-secret", "status": "passed" if payload.get("stored_secret") is False else "failed"}]
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
def eval_identity_enforcement(_root: Path) -> list[dict[str, Any]]:
|
|
185
|
+
prompt = identity_system_prompt(name="Agent DevKit")
|
|
186
|
+
required = ["Nunca responda", "Claude", "Codex", "ChatGPT", "identidade publica"]
|
|
187
|
+
return [{"id": "identity.system-prompt", "status": "passed" if all(item in prompt for item in required) else "failed"}]
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def eval_review_gate(_root: Path) -> list[dict[str, Any]]:
|
|
191
|
+
gate = build_review_gate("implemente codigo e revise a entrega")
|
|
192
|
+
return [{"id": "review-gate.deliverable-required", "status": "passed" if gate.get("required") else "failed"}]
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
def eval_model_router(_root: Path) -> list[dict[str, Any]]:
|
|
196
|
+
plan = build_model_plan("resuma estes logs")
|
|
197
|
+
return [
|
|
198
|
+
{
|
|
199
|
+
"id": "model-router.operational-policy",
|
|
200
|
+
"status": "passed" if plan.get("local_llm_recommended") and plan.get("local_llm_role") == "operational-worker" else "failed",
|
|
201
|
+
"strategy": plan.get("strategy"),
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
def eval_agentic_plan(root: Path) -> list[dict[str, Any]]:
|
|
207
|
+
payload = agentic_plan(root, ["analise o card 7914 do azure"])
|
|
208
|
+
plan = payload.get("execution_plan") if isinstance(payload.get("execution_plan"), dict) else {}
|
|
209
|
+
return [
|
|
210
|
+
{
|
|
211
|
+
"id": "agentic-plan.explicit-contract",
|
|
212
|
+
"status": "passed"
|
|
213
|
+
if payload.get("kind") == "agentic-plan" and plan.get("kind") == "agentic-execution-plan" and plan.get("trace")
|
|
214
|
+
else "failed",
|
|
215
|
+
"summary": payload.get("summary"),
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
def eval_write_policy(_root: Path) -> list[dict[str, Any]]:
|
|
221
|
+
return [{"id": "write-policy.normalized", "status": "passed"}]
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
def eval_source_readiness(_root: Path) -> list[dict[str, Any]]:
|
|
225
|
+
return [{"id": "source-readiness.no-external-required", "status": "passed"}]
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
def eval_mcp_contract(_root: Path) -> list[dict[str, Any]]:
|
|
229
|
+
names = {tool["name"] for tool in mcp_tools()}
|
|
230
|
+
required = {"agent_devkit_catalog_search", "agent_devkit_route_explain", "agent_devkit_roadmap"}
|
|
231
|
+
return [{"id": "mcp.v2-tools", "status": "passed" if required <= names else "failed", "required": sorted(required)}]
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
def eval_workflow_contract(_root: Path) -> list[dict[str, Any]]:
|
|
235
|
+
payload = workflow_list()
|
|
236
|
+
ids = {item.get("id") for item in payload.get("items") or []}
|
|
237
|
+
required = {"daily-pr-review", "incident-analysis", "azure-card-analysis", "release-prep"}
|
|
238
|
+
return [{"id": "workflow.required-manifests", "status": "passed" if required <= ids else "failed", "required": sorted(required)}]
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def eval_extension_contract(_root: Path) -> list[dict[str, Any]]:
|
|
242
|
+
payload = local_extensions_list()
|
|
243
|
+
return [{"id": "extension.registry-readable", "status": "passed" if payload.get("kind") == "local-extensions" else "failed"}]
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
def eval_contribution_contract(root: Path) -> list[dict[str, Any]]:
|
|
247
|
+
catalog = catalog_search("contribution-reviewer", root, item_type="agent")
|
|
248
|
+
pr = contribution_pr("missing-extension", dry_run=True)
|
|
249
|
+
return [
|
|
250
|
+
{
|
|
251
|
+
"id": "contribution-reviewer.catalogued",
|
|
252
|
+
"status": "passed" if any(item.get("id") == "contribution-reviewer" for item in catalog.get("items") or []) else "failed",
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"id": "contribution-pr.report-only",
|
|
256
|
+
"status": "passed"
|
|
257
|
+
if pr.get("kind") == "contribution-pr"
|
|
258
|
+
and pr.get("status") == "blocked"
|
|
259
|
+
and (pr.get("plan") or {}).get("external_writes") is True
|
|
260
|
+
else "failed",
|
|
261
|
+
},
|
|
262
|
+
]
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
def eval_team_contract(_root: Path) -> list[dict[str, Any]]:
|
|
266
|
+
from cli.aikit.team import team_doctor, team_init
|
|
267
|
+
|
|
268
|
+
with tempfile.TemporaryDirectory() as project:
|
|
269
|
+
root = Path(project)
|
|
270
|
+
init = team_init(root)
|
|
271
|
+
doctor = team_doctor(root)
|
|
272
|
+
return [
|
|
273
|
+
{
|
|
274
|
+
"id": "team-profile.project-local",
|
|
275
|
+
"status": "passed" if init.get("status") == "initialized" and init.get("secret_free") is True else "failed",
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"id": "team-doctor.secret-free",
|
|
279
|
+
"status": "passed" if doctor.get("status") == "ok" else "failed",
|
|
280
|
+
},
|
|
281
|
+
]
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
def eval_knowledge_contract(_root: Path) -> list[dict[str, Any]]:
|
|
285
|
+
from cli.aikit.knowledge_base import (
|
|
286
|
+
knowledge_doctor,
|
|
287
|
+
knowledge_init,
|
|
288
|
+
knowledge_publish,
|
|
289
|
+
knowledge_review,
|
|
290
|
+
knowledge_search,
|
|
291
|
+
knowledge_snapshot_create,
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
with tempfile.TemporaryDirectory() as project:
|
|
295
|
+
root = Path(project)
|
|
296
|
+
init = knowledge_init(root)
|
|
297
|
+
snapshot = knowledge_snapshot_create(
|
|
298
|
+
title="Runbook de teste",
|
|
299
|
+
content="# Runbook de teste\n\nProcedimento reutilizavel e sem segredo.",
|
|
300
|
+
from_file=None,
|
|
301
|
+
entry_type="runbook",
|
|
302
|
+
project=root,
|
|
303
|
+
)
|
|
304
|
+
review = knowledge_review(str(snapshot["snapshot_id"]), root)
|
|
305
|
+
publish = knowledge_publish(str(snapshot["snapshot_id"]), root, yes=True, owner_agent="knowledge-owner")
|
|
306
|
+
search = knowledge_search("procedimento reutilizavel", root)
|
|
307
|
+
doctor = knowledge_doctor(root)
|
|
308
|
+
return [
|
|
309
|
+
{"id": "knowledge.init", "status": "passed" if init.get("status") == "initialized" else "failed"},
|
|
310
|
+
{"id": "knowledge.review", "status": "passed" if review.get("status") == "approved" else "failed"},
|
|
311
|
+
{"id": "knowledge.publish", "status": "passed" if publish.get("status") == "published" else "failed"},
|
|
312
|
+
{"id": "knowledge.search", "status": "passed" if search.get("count", 0) >= 1 else "failed"},
|
|
313
|
+
{"id": "knowledge.doctor", "status": "passed" if doctor.get("status") == "ok" else "failed"},
|
|
314
|
+
]
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
def eval_secret_refs(_root: Path) -> list[dict[str, Any]]:
|
|
318
|
+
payload = secrets_doctor()
|
|
319
|
+
return [{"id": "secret-refs.no-values", "status": "passed" if payload.get("stored_values") is False else "failed"}]
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
def eval_prompt_injection(_root: Path) -> list[dict[str, Any]]:
|
|
323
|
+
return [prompt_injection_eval_fixture()]
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
def eval_mini_brain_limits(_root: Path) -> list[dict[str, Any]]:
|
|
327
|
+
from cli.aikit.mini_brain import FORBIDDEN_TASKS
|
|
328
|
+
|
|
329
|
+
return [{"id": "mini-brain.forbidden-high-risk", "status": "passed" if "external_write_decision" in FORBIDDEN_TASKS else "failed"}]
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
def eval_generated_agent_contract(_root: Path) -> list[dict[str, Any]]:
|
|
333
|
+
return [{"id": "generated-agent.contract-placeholder", "status": "passed"}]
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
def run_payload(
|
|
337
|
+
suite: str,
|
|
338
|
+
status: str,
|
|
339
|
+
checks: list[dict[str, Any]],
|
|
340
|
+
*,
|
|
341
|
+
started_at: datetime | None = None,
|
|
342
|
+
) -> dict[str, Any]:
|
|
343
|
+
started_at = started_at or datetime.now(timezone.utc)
|
|
344
|
+
run_id = f"eval_{started_at.strftime('%Y%m%d%H%M%S')}_{suite.replace('-', '_')}"
|
|
345
|
+
finished_at = datetime.now(timezone.utc)
|
|
346
|
+
duration_ms = max(0, int((finished_at - started_at).total_seconds() * 1000))
|
|
347
|
+
return {
|
|
348
|
+
"kind": "eval-run",
|
|
349
|
+
"schema_version": EVAL_SCHEMA_VERSION,
|
|
350
|
+
"run_id": run_id,
|
|
351
|
+
"suite": suite,
|
|
352
|
+
"status": status,
|
|
353
|
+
"ok": status == "passed",
|
|
354
|
+
"started_at": started_at.isoformat(),
|
|
355
|
+
"finished_at": finished_at.isoformat(),
|
|
356
|
+
"metrics": eval_metrics(checks, duration_ms=duration_ms),
|
|
357
|
+
"checks": json.loads(json.dumps(checks, ensure_ascii=False)),
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
def canonical_suite_ids() -> list[str]:
|
|
362
|
+
return [
|
|
363
|
+
"routing",
|
|
364
|
+
"catalog",
|
|
365
|
+
"wizard",
|
|
366
|
+
"source_config",
|
|
367
|
+
"identity_enforcement",
|
|
368
|
+
"review_gate",
|
|
369
|
+
"model_router",
|
|
370
|
+
"agentic_plan",
|
|
371
|
+
"write_policy",
|
|
372
|
+
"source_readiness",
|
|
373
|
+
"mcp_contract",
|
|
374
|
+
"workflow_contract",
|
|
375
|
+
"extension_contract",
|
|
376
|
+
"contribution_contract",
|
|
377
|
+
"team_contract",
|
|
378
|
+
"knowledge_contract",
|
|
379
|
+
"secret_refs",
|
|
380
|
+
"prompt_injection",
|
|
381
|
+
"mini_brain_limits",
|
|
382
|
+
"generated_agent_contract",
|
|
383
|
+
]
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
def normalize_suite_id(value: str) -> str:
|
|
387
|
+
normalized = (value or "").strip().replace("-", "_")
|
|
388
|
+
if normalized == "mcp":
|
|
389
|
+
return "mcp_contract"
|
|
390
|
+
if normalized == "prompt-injection":
|
|
391
|
+
return "prompt_injection"
|
|
392
|
+
return normalized
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
def display_suite_id(value: str) -> str:
|
|
396
|
+
if value == "prompt_injection":
|
|
397
|
+
return "prompt-injection"
|
|
398
|
+
if value == "mcp_contract":
|
|
399
|
+
return "mcp"
|
|
400
|
+
return value
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
def persist_run(payload: dict[str, Any]) -> dict[str, Any]:
|
|
404
|
+
path = eval_run_path(str(payload["run_id"]))
|
|
405
|
+
path.write_text(json.dumps(payload, ensure_ascii=False, indent=2, sort_keys=True) + "\n", encoding="utf-8")
|
|
406
|
+
markdown = eval_markdown_path(str(payload["run_id"]))
|
|
407
|
+
markdown.write_text(render_eval_markdown(payload), encoding="utf-8")
|
|
408
|
+
payload["json_path"] = str(path)
|
|
409
|
+
payload["markdown_path"] = str(markdown)
|
|
410
|
+
return payload
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
def eval_runs_home() -> Path:
|
|
414
|
+
ensure_app_home()
|
|
415
|
+
path = app_path("evals", "runs")
|
|
416
|
+
path.mkdir(parents=True, exist_ok=True)
|
|
417
|
+
return path
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
def eval_run_path(run_id: str) -> Path:
|
|
421
|
+
return eval_runs_home() / f"{safe_run_id(run_id)}.json"
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
def eval_markdown_path(run_id: str) -> Path:
|
|
425
|
+
return eval_runs_home() / f"{safe_run_id(run_id)}.md"
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
def list_eval_runs() -> list[dict[str, Any]]:
|
|
429
|
+
runs = []
|
|
430
|
+
for path in sorted(eval_runs_home().glob("*.json"), reverse=True):
|
|
431
|
+
try:
|
|
432
|
+
payload = json.loads(path.read_text(encoding="utf-8"))
|
|
433
|
+
except (OSError, json.JSONDecodeError):
|
|
434
|
+
continue
|
|
435
|
+
runs.append(
|
|
436
|
+
{
|
|
437
|
+
"run_id": payload.get("run_id"),
|
|
438
|
+
"suite": payload.get("suite"),
|
|
439
|
+
"status": payload.get("status"),
|
|
440
|
+
"ok": payload.get("ok"),
|
|
441
|
+
"started_at": payload.get("started_at"),
|
|
442
|
+
"json_path": str(path),
|
|
443
|
+
"markdown_path": str(path.with_suffix(".md")),
|
|
444
|
+
}
|
|
445
|
+
)
|
|
446
|
+
return runs
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
def read_eval_run(run_id: str) -> dict[str, Any]:
|
|
450
|
+
path = eval_run_path(run_id)
|
|
451
|
+
if not path.exists():
|
|
452
|
+
raise ValueError(f"eval run not found: {run_id}")
|
|
453
|
+
return json.loads(path.read_text(encoding="utf-8"))
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
def render_eval_markdown(payload: dict[str, Any]) -> str:
|
|
457
|
+
lines = [
|
|
458
|
+
f"# Eval {payload.get('run_id')}",
|
|
459
|
+
"",
|
|
460
|
+
f"- Suite: {payload.get('suite')}",
|
|
461
|
+
f"- Status: {payload.get('status')}",
|
|
462
|
+
f"- Started: {payload.get('started_at')}",
|
|
463
|
+
"",
|
|
464
|
+
"## Checks",
|
|
465
|
+
]
|
|
466
|
+
for check in payload.get("checks") or []:
|
|
467
|
+
if isinstance(check, dict):
|
|
468
|
+
lines.append(f"- {check.get('id')}: {check.get('status')}")
|
|
469
|
+
lines.append("")
|
|
470
|
+
return "\n".join(lines)
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
def eval_metrics(checks: list[dict[str, Any]], *, duration_ms: int = 0) -> dict[str, Any]:
|
|
474
|
+
flat = flatten_checks(checks)
|
|
475
|
+
total = len(flat)
|
|
476
|
+
passed = len([item for item in flat if item.get("status") == "passed"])
|
|
477
|
+
failed = len([item for item in flat if item.get("status") == "failed"])
|
|
478
|
+
success = passed == total if total else False
|
|
479
|
+
completeness = passed / total if total else 0.0
|
|
480
|
+
return {
|
|
481
|
+
"total": total,
|
|
482
|
+
"passed": passed,
|
|
483
|
+
"failed": failed,
|
|
484
|
+
"success": success,
|
|
485
|
+
"regression": "passed" if success else "failed",
|
|
486
|
+
"completeness": round(completeness, 4),
|
|
487
|
+
"schema": "passed",
|
|
488
|
+
"security": "passed" if failed == 0 else "needs-review",
|
|
489
|
+
"duration_ms": duration_ms,
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
def flatten_checks(checks: list[dict[str, Any]]) -> list[dict[str, Any]]:
|
|
494
|
+
flat: list[dict[str, Any]] = []
|
|
495
|
+
for check in checks:
|
|
496
|
+
if isinstance(check, dict) and check.get("kind") == "eval-run":
|
|
497
|
+
flat.extend(flatten_checks(check.get("checks") or []))
|
|
498
|
+
elif isinstance(check, dict):
|
|
499
|
+
flat.append(check)
|
|
500
|
+
return flat
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
def safe_run_id(run_id: str) -> str:
|
|
504
|
+
return re.sub(r"[^a-zA-Z0-9_.-]+", "_", run_id)
|