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,380 @@
|
|
|
1
|
+
"""Project-local team profile support."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import re
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import Any
|
|
9
|
+
|
|
10
|
+
from cli.aikit.errors import DevKitError
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
TEAM_SCHEMA_VERSION = "agent-devkit.team/v1"
|
|
14
|
+
TEAM_DIR = ".agent-devkit"
|
|
15
|
+
TEAM_FILE = "team.yaml"
|
|
16
|
+
SECRET_KEY_PATTERN = re.compile(r"(token|secret|password|api[_-]?key|pat|credential)", re.IGNORECASE)
|
|
17
|
+
SECRET_VALUE_PATTERN = re.compile(r"(sk-[A-Za-z0-9]|ghp_[A-Za-z0-9]|xox[baprs]-|-----BEGIN [A-Z ]*PRIVATE KEY-----)")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def team_init(project: Path | None = None, *, force: bool = False) -> dict[str, Any]:
|
|
21
|
+
path = team_profile_path(project)
|
|
22
|
+
if path.exists() and not force:
|
|
23
|
+
return team_status(project)
|
|
24
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
25
|
+
payload = default_team_payload()
|
|
26
|
+
write_team_payload(path, payload)
|
|
27
|
+
return {
|
|
28
|
+
"kind": "team",
|
|
29
|
+
"schema_version": TEAM_SCHEMA_VERSION,
|
|
30
|
+
"status": "initialized",
|
|
31
|
+
"path": str(path),
|
|
32
|
+
"profile": payload["active_profile"],
|
|
33
|
+
"secret_free": True,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def team_status(project: Path | None = None) -> dict[str, Any]:
|
|
38
|
+
path = team_profile_path(project)
|
|
39
|
+
if not path.exists():
|
|
40
|
+
return {
|
|
41
|
+
"kind": "team",
|
|
42
|
+
"schema_version": TEAM_SCHEMA_VERSION,
|
|
43
|
+
"status": "not-configured",
|
|
44
|
+
"path": str(path),
|
|
45
|
+
"active_profile": None,
|
|
46
|
+
"profiles": [],
|
|
47
|
+
"next_steps": ["Run `agent team init` to create a project-local team profile."],
|
|
48
|
+
}
|
|
49
|
+
payload = read_team_payload(path)
|
|
50
|
+
findings = secret_findings(payload)
|
|
51
|
+
profiles = payload.get("profiles") if isinstance(payload.get("profiles"), dict) else {}
|
|
52
|
+
active_profile = str(payload.get("active_profile") or "")
|
|
53
|
+
return {
|
|
54
|
+
"kind": "team",
|
|
55
|
+
"schema_version": TEAM_SCHEMA_VERSION,
|
|
56
|
+
"status": "ok" if active_profile in profiles and not findings else "blocked",
|
|
57
|
+
"path": str(path),
|
|
58
|
+
"active_profile": active_profile,
|
|
59
|
+
"profiles": sorted(profiles),
|
|
60
|
+
"secret_free": not findings,
|
|
61
|
+
"findings": findings,
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def team_doctor(project: Path | None = None) -> dict[str, Any]:
|
|
66
|
+
status = team_status(project)
|
|
67
|
+
checks = [
|
|
68
|
+
{"id": "team-file-exists", "status": "passed" if status["status"] != "not-configured" else "failed"},
|
|
69
|
+
{"id": "active-profile-exists", "status": "passed" if status.get("active_profile") in set(status.get("profiles") or []) else "failed"},
|
|
70
|
+
{"id": "no-secret-material", "status": "passed" if status.get("secret_free") is not False else "failed"},
|
|
71
|
+
]
|
|
72
|
+
return {
|
|
73
|
+
"kind": "team-doctor",
|
|
74
|
+
"schema_version": TEAM_SCHEMA_VERSION,
|
|
75
|
+
"status": "ok" if all(check["status"] == "passed" for check in checks) else "blocked",
|
|
76
|
+
"team": status,
|
|
77
|
+
"checks": checks,
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def team_onboard(project: Path | None = None) -> dict[str, Any]:
|
|
82
|
+
status = team_status(project)
|
|
83
|
+
if status["status"] == "not-configured":
|
|
84
|
+
return {
|
|
85
|
+
"kind": "team-onboarding",
|
|
86
|
+
"schema_version": TEAM_SCHEMA_VERSION,
|
|
87
|
+
"status": "needs-init",
|
|
88
|
+
"team": status,
|
|
89
|
+
"next_steps": ["Run `agent team init`.", "Review `.agent-devkit/team.yaml` before committing it."],
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
"kind": "team-onboarding",
|
|
93
|
+
"schema_version": TEAM_SCHEMA_VERSION,
|
|
94
|
+
"status": "ok" if status["status"] == "ok" else "blocked",
|
|
95
|
+
"team": status,
|
|
96
|
+
"next_steps": [
|
|
97
|
+
"Configure personal secret refs locally with `agent secret set ... --env ...`.",
|
|
98
|
+
"Run `agent doctor --project .` to validate personal and project setup.",
|
|
99
|
+
"Install desired team workflows locally with `agent workflow install <id> --dry-run` first.",
|
|
100
|
+
],
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def team_profile_list(project: Path | None = None) -> dict[str, Any]:
|
|
105
|
+
payload = require_team_payload(project)
|
|
106
|
+
profiles = payload.get("profiles") if isinstance(payload.get("profiles"), dict) else {}
|
|
107
|
+
return {
|
|
108
|
+
"kind": "team-profiles",
|
|
109
|
+
"schema_version": TEAM_SCHEMA_VERSION,
|
|
110
|
+
"status": "ok",
|
|
111
|
+
"active_profile": payload.get("active_profile"),
|
|
112
|
+
"items": [public_profile(profile_id, profile) for profile_id, profile in sorted(profiles.items())],
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def team_profile_show(profile_id: str | None, project: Path | None = None) -> dict[str, Any]:
|
|
117
|
+
payload = require_team_payload(project)
|
|
118
|
+
profile_id = profile_id or str(payload.get("active_profile") or "")
|
|
119
|
+
profile = require_profile(payload, profile_id)
|
|
120
|
+
return {
|
|
121
|
+
"kind": "team-profile",
|
|
122
|
+
"schema_version": TEAM_SCHEMA_VERSION,
|
|
123
|
+
"status": "ok",
|
|
124
|
+
"active": profile_id == payload.get("active_profile"),
|
|
125
|
+
"profile": public_profile(profile_id, profile, detailed=True),
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def team_profile_use(profile_id: str | None, project: Path | None = None) -> dict[str, Any]:
|
|
130
|
+
if not profile_id:
|
|
131
|
+
raise DevKitError("team profile use requires a profile id")
|
|
132
|
+
path = team_profile_path(project)
|
|
133
|
+
payload = require_team_payload(project)
|
|
134
|
+
require_profile(payload, profile_id)
|
|
135
|
+
payload["active_profile"] = profile_id
|
|
136
|
+
write_team_payload(path, payload)
|
|
137
|
+
return team_profile_show(profile_id, project)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def team_profile_export(profile_id: str | None, destination: str | None, project: Path | None = None) -> dict[str, Any]:
|
|
141
|
+
payload = require_team_payload(project)
|
|
142
|
+
profile_id = profile_id or str(payload.get("active_profile") or "")
|
|
143
|
+
profile = require_profile(payload, profile_id)
|
|
144
|
+
export_payload = {"schema_version": TEAM_SCHEMA_VERSION, "profile_id": profile_id, "profile": profile}
|
|
145
|
+
findings = secret_findings(export_payload)
|
|
146
|
+
if findings:
|
|
147
|
+
raise DevKitError("team profile export blocked because profile contains secret-like material")
|
|
148
|
+
if not destination:
|
|
149
|
+
return {
|
|
150
|
+
"kind": "team-profile-export",
|
|
151
|
+
"schema_version": TEAM_SCHEMA_VERSION,
|
|
152
|
+
"status": "planned",
|
|
153
|
+
"profile_id": profile_id,
|
|
154
|
+
"payload": export_payload,
|
|
155
|
+
"writes": [],
|
|
156
|
+
}
|
|
157
|
+
target = Path(destination).expanduser().resolve()
|
|
158
|
+
target.parent.mkdir(parents=True, exist_ok=True)
|
|
159
|
+
write_team_payload(target, export_payload)
|
|
160
|
+
return {
|
|
161
|
+
"kind": "team-profile-export",
|
|
162
|
+
"schema_version": TEAM_SCHEMA_VERSION,
|
|
163
|
+
"status": "exported",
|
|
164
|
+
"profile_id": profile_id,
|
|
165
|
+
"path": str(target),
|
|
166
|
+
"writes": [str(target)],
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def team_profile_import(source: str | None, project: Path | None = None) -> dict[str, Any]:
|
|
171
|
+
if not source:
|
|
172
|
+
raise DevKitError("team profile import requires a path")
|
|
173
|
+
source_path = Path(source).expanduser().resolve()
|
|
174
|
+
if not source_path.exists():
|
|
175
|
+
raise DevKitError(f"team profile import path not found: {source_path}")
|
|
176
|
+
imported = read_team_payload(source_path)
|
|
177
|
+
findings = secret_findings(imported)
|
|
178
|
+
if findings:
|
|
179
|
+
return {
|
|
180
|
+
"kind": "team-profile-import",
|
|
181
|
+
"schema_version": TEAM_SCHEMA_VERSION,
|
|
182
|
+
"status": "blocked",
|
|
183
|
+
"path": str(source_path),
|
|
184
|
+
"findings": findings,
|
|
185
|
+
}
|
|
186
|
+
profile_id = str(imported.get("profile_id") or imported.get("id") or source_path.stem)
|
|
187
|
+
profile = imported.get("profile") if isinstance(imported.get("profile"), dict) else imported
|
|
188
|
+
path = team_profile_path(project)
|
|
189
|
+
payload = default_team_payload() if not path.exists() else read_team_payload(path)
|
|
190
|
+
profiles = payload.setdefault("profiles", {})
|
|
191
|
+
if not isinstance(profiles, dict):
|
|
192
|
+
raise DevKitError("team profile registry is invalid")
|
|
193
|
+
profiles[profile_id] = profile
|
|
194
|
+
write_team_payload(path, payload)
|
|
195
|
+
return {
|
|
196
|
+
"kind": "team-profile-import",
|
|
197
|
+
"schema_version": TEAM_SCHEMA_VERSION,
|
|
198
|
+
"status": "imported",
|
|
199
|
+
"profile_id": profile_id,
|
|
200
|
+
"path": str(path),
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
def team_profile_path(project: Path | None = None) -> Path:
|
|
205
|
+
root = (project or Path.cwd()).resolve()
|
|
206
|
+
return root / TEAM_DIR / TEAM_FILE
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def default_team_payload() -> dict[str, Any]:
|
|
210
|
+
return {
|
|
211
|
+
"schema_version": TEAM_SCHEMA_VERSION,
|
|
212
|
+
"active_profile": "default",
|
|
213
|
+
"profiles": {
|
|
214
|
+
"default": {
|
|
215
|
+
"description": "Default project team profile",
|
|
216
|
+
"providers": [],
|
|
217
|
+
"sources": [],
|
|
218
|
+
"workflows": ["daily-pr-review"],
|
|
219
|
+
"permissions": {"default_mode": "report-only", "external_writes": "confirm"},
|
|
220
|
+
"local_llm": {"enabled": "personal", "max_context_chars": 6000},
|
|
221
|
+
"prompt_injection": {"external_content_policy": "quote-as-data"},
|
|
222
|
+
"secret_refs": [],
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
def require_team_payload(project: Path | None = None) -> dict[str, Any]:
|
|
229
|
+
path = team_profile_path(project)
|
|
230
|
+
if not path.exists():
|
|
231
|
+
raise DevKitError("team profile not configured. Run `agent team init` first.")
|
|
232
|
+
return read_team_payload(path)
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
def require_profile(payload: dict[str, Any], profile_id: str) -> dict[str, Any]:
|
|
236
|
+
profiles = payload.get("profiles") if isinstance(payload.get("profiles"), dict) else {}
|
|
237
|
+
profile = profiles.get(profile_id)
|
|
238
|
+
if not isinstance(profile, dict):
|
|
239
|
+
raise DevKitError(f"team profile not found: {profile_id}")
|
|
240
|
+
return profile
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
def public_profile(profile_id: str, profile: dict[str, Any], *, detailed: bool = False) -> dict[str, Any]:
|
|
244
|
+
item = {
|
|
245
|
+
"id": profile_id,
|
|
246
|
+
"description": profile.get("description"),
|
|
247
|
+
"providers": list_value(profile.get("providers")),
|
|
248
|
+
"sources": list_value(profile.get("sources")),
|
|
249
|
+
"workflows": list_value(profile.get("workflows")),
|
|
250
|
+
"secret_refs_count": len(list_value(profile.get("secret_refs"))),
|
|
251
|
+
}
|
|
252
|
+
if detailed:
|
|
253
|
+
item["permissions"] = profile.get("permissions") if isinstance(profile.get("permissions"), dict) else {}
|
|
254
|
+
item["local_llm"] = profile.get("local_llm") if isinstance(profile.get("local_llm"), dict) else {}
|
|
255
|
+
item["prompt_injection"] = profile.get("prompt_injection") if isinstance(profile.get("prompt_injection"), dict) else {}
|
|
256
|
+
return item
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
def list_value(value: Any) -> list[Any]:
|
|
260
|
+
return value if isinstance(value, list) else []
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def read_team_payload(path: Path) -> dict[str, Any]:
|
|
264
|
+
text = path.read_text(encoding="utf-8")
|
|
265
|
+
try:
|
|
266
|
+
import yaml # type: ignore
|
|
267
|
+
|
|
268
|
+
payload = yaml.safe_load(text) or {}
|
|
269
|
+
except ImportError:
|
|
270
|
+
payload = read_simple_team_yaml(text)
|
|
271
|
+
if not isinstance(payload, dict):
|
|
272
|
+
raise DevKitError(f"team profile file is invalid: {path}")
|
|
273
|
+
return payload
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
def write_team_payload(path: Path, payload: dict[str, Any]) -> None:
|
|
277
|
+
try:
|
|
278
|
+
import yaml # type: ignore
|
|
279
|
+
|
|
280
|
+
text = yaml.safe_dump(payload, allow_unicode=True, sort_keys=False)
|
|
281
|
+
except ImportError:
|
|
282
|
+
text = json.dumps(payload, ensure_ascii=False, indent=2, sort_keys=True) + "\n"
|
|
283
|
+
path.write_text(text, encoding="utf-8")
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
def read_simple_team_yaml(text: str) -> dict[str, Any]:
|
|
287
|
+
stripped = text.strip()
|
|
288
|
+
if not stripped:
|
|
289
|
+
return {}
|
|
290
|
+
if stripped.startswith("{"):
|
|
291
|
+
data = json.loads(text)
|
|
292
|
+
return data if isinstance(data, dict) else {}
|
|
293
|
+
lines = [
|
|
294
|
+
(len(raw_line) - len(raw_line.lstrip(" ")), raw_line.strip())
|
|
295
|
+
for raw_line in text.splitlines()
|
|
296
|
+
if raw_line.strip() and not raw_line.lstrip().startswith("#")
|
|
297
|
+
]
|
|
298
|
+
data, index = parse_simple_yaml_block(lines, 0, 0)
|
|
299
|
+
if index < len(lines):
|
|
300
|
+
raise DevKitError("team profile YAML fallback parser could not read the complete file")
|
|
301
|
+
return data if isinstance(data, dict) else {}
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
def parse_simple_yaml_block(lines: list[tuple[int, str]], index: int, indent: int) -> tuple[Any, int]:
|
|
305
|
+
if index < len(lines) and lines[index][0] == indent and lines[index][1].startswith("- "):
|
|
306
|
+
values: list[Any] = []
|
|
307
|
+
while index < len(lines) and lines[index][0] == indent and lines[index][1].startswith("- "):
|
|
308
|
+
values.append(parse_simple_scalar(lines[index][1][2:].strip()))
|
|
309
|
+
index += 1
|
|
310
|
+
return values, index
|
|
311
|
+
|
|
312
|
+
data: dict[str, Any] = {}
|
|
313
|
+
while index < len(lines):
|
|
314
|
+
line_indent, content = lines[index]
|
|
315
|
+
if line_indent < indent or content.startswith("- "):
|
|
316
|
+
break
|
|
317
|
+
if line_indent > indent:
|
|
318
|
+
raise DevKitError("team profile YAML fallback parser found unexpected indentation")
|
|
319
|
+
if ":" not in content:
|
|
320
|
+
raise DevKitError("team profile YAML fallback parser found an unsupported line")
|
|
321
|
+
key, raw_value = content.split(":", 1)
|
|
322
|
+
key = key.strip()
|
|
323
|
+
raw_value = raw_value.strip()
|
|
324
|
+
index += 1
|
|
325
|
+
if raw_value:
|
|
326
|
+
data[key] = parse_simple_scalar(raw_value)
|
|
327
|
+
continue
|
|
328
|
+
if index >= len(lines) or lines[index][0] < indent:
|
|
329
|
+
data[key] = {}
|
|
330
|
+
continue
|
|
331
|
+
if lines[index][0] == indent and lines[index][1].startswith("- "):
|
|
332
|
+
data[key], index = parse_simple_yaml_block(lines, index, indent)
|
|
333
|
+
continue
|
|
334
|
+
if lines[index][0] <= indent:
|
|
335
|
+
data[key] = {}
|
|
336
|
+
continue
|
|
337
|
+
data[key], index = parse_simple_yaml_block(lines, index, lines[index][0])
|
|
338
|
+
return data, index
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
def parse_simple_scalar(value: str) -> Any:
|
|
342
|
+
if value == "[]":
|
|
343
|
+
return []
|
|
344
|
+
if value == "{}":
|
|
345
|
+
return {}
|
|
346
|
+
if value in {"true", "false"}:
|
|
347
|
+
return value == "true"
|
|
348
|
+
if value.isdigit():
|
|
349
|
+
return int(value)
|
|
350
|
+
if value.startswith('"') and value.endswith('"'):
|
|
351
|
+
try:
|
|
352
|
+
return json.loads(value)
|
|
353
|
+
except json.JSONDecodeError:
|
|
354
|
+
return value.strip('"')
|
|
355
|
+
if value.startswith("'") and value.endswith("'"):
|
|
356
|
+
return value.strip("'")
|
|
357
|
+
return value
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
def secret_findings(value: Any, *, path: str = "") -> list[dict[str, Any]]:
|
|
361
|
+
findings: list[dict[str, Any]] = []
|
|
362
|
+
if isinstance(value, dict):
|
|
363
|
+
for key, item in value.items():
|
|
364
|
+
key_path = f"{path}.{key}" if path else str(key)
|
|
365
|
+
if SECRET_KEY_PATTERN.search(str(key)) and not is_reference_key(str(key)) and item not in (None, "", [], {}):
|
|
366
|
+
findings.append({"path": key_path, "reason": "secret-like-key"})
|
|
367
|
+
findings.extend(secret_findings(item, path=key_path))
|
|
368
|
+
return findings
|
|
369
|
+
if isinstance(value, list):
|
|
370
|
+
for index, item in enumerate(value):
|
|
371
|
+
findings.extend(secret_findings(item, path=f"{path}[{index}]"))
|
|
372
|
+
return findings
|
|
373
|
+
if isinstance(value, str) and SECRET_VALUE_PATTERN.search(value):
|
|
374
|
+
findings.append({"path": path, "reason": "secret-like-value"})
|
|
375
|
+
return findings
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
def is_reference_key(key: str) -> bool:
|
|
379
|
+
normalized = key.lower().replace("-", "_")
|
|
380
|
+
return normalized in {"secret_ref", "secret_refs", "credential_ref", "credential_refs"} or normalized.endswith("_ref") or normalized.endswith("_refs")
|
|
@@ -162,12 +162,17 @@ def install_payload(
|
|
|
162
162
|
|
|
163
163
|
def load_toolchain(root: Path | None = None) -> dict[str, dict[str, Any]]:
|
|
164
164
|
path = toolchain_path(root)
|
|
165
|
+
if not path.exists():
|
|
166
|
+
return fallback_toolchain()
|
|
165
167
|
try:
|
|
166
168
|
import yaml # type: ignore
|
|
167
169
|
except ImportError:
|
|
168
170
|
return fallback_toolchain()
|
|
169
|
-
|
|
170
|
-
|
|
171
|
+
try:
|
|
172
|
+
with path.open(encoding="utf-8") as file:
|
|
173
|
+
data = yaml.safe_load(file) or {}
|
|
174
|
+
except OSError:
|
|
175
|
+
return fallback_toolchain()
|
|
171
176
|
tools = data.get("tools") if isinstance(data, dict) else {}
|
|
172
177
|
if not isinstance(tools, dict):
|
|
173
178
|
return {}
|
|
@@ -12,7 +12,7 @@ from typing import Any
|
|
|
12
12
|
from cli.aikit.app_home import app_path, ensure_app_home
|
|
13
13
|
from cli.aikit.decision_store import set_decision
|
|
14
14
|
from cli.aikit.memory import redact_secrets
|
|
15
|
-
from cli.aikit.sources import SourceRegistryError, add_source
|
|
15
|
+
from cli.aikit.sources import SourceConfigBlockedError, SourceRegistryError, add_source
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
YES_VALUES = {"s", "sim", "y", "yes", "true", "1", "ok"}
|
|
@@ -196,6 +196,20 @@ def complete_wizard(state: dict[str, Any]) -> dict[str, Any]:
|
|
|
196
196
|
return {"kind": "wizard", "status": "completed", "wizard": public_wizard(state), "stored_secret": False}
|
|
197
197
|
try:
|
|
198
198
|
source_result = create_source_from_wizard(state)
|
|
199
|
+
except SourceConfigBlockedError as exc:
|
|
200
|
+
state["status"] = "failed"
|
|
201
|
+
state["updated_at"] = now_iso()
|
|
202
|
+
state["error"] = str(exc)
|
|
203
|
+
state["source_result"] = exc.payload
|
|
204
|
+
save_state(state)
|
|
205
|
+
return {
|
|
206
|
+
"kind": "wizard",
|
|
207
|
+
"status": "failed",
|
|
208
|
+
"wizard": public_wizard(state),
|
|
209
|
+
"source_result": exc.payload,
|
|
210
|
+
"error": str(exc),
|
|
211
|
+
"stored_secret": False,
|
|
212
|
+
}
|
|
199
213
|
except SourceRegistryError as exc:
|
|
200
214
|
state["status"] = "failed"
|
|
201
215
|
state["updated_at"] = now_iso()
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"""Installable workflow MVP for Agent DevKit."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
from cli.aikit.runtime_paths import ROOT
|
|
9
|
+
from cli.aikit.tasks import create_task, load_tasks, run_task
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
WORKFLOW_SCHEMA_VERSION = "agent-devkit.workflows/v1"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
BUILTIN_WORKFLOWS: dict[str, dict[str, Any]] = {
|
|
16
|
+
"daily-pr-review": {
|
|
17
|
+
"id": "daily-pr-review",
|
|
18
|
+
"title": "Daily PR review",
|
|
19
|
+
"description": "Create a local scheduled prompt to review pending pull requests.",
|
|
20
|
+
"schedule": {"type": "cron", "cron": "0 9 * * 1-5"},
|
|
21
|
+
"task": {
|
|
22
|
+
"title": "Daily PR review",
|
|
23
|
+
"prompt": "Revise as PRs que aguardam minha revisao hoje.",
|
|
24
|
+
"action": {"type": "prompt", "prompt": "Revise as PRs que aguardam minha revisao hoje.", "external_writes": False},
|
|
25
|
+
"permissions": {"mode": "report-only"},
|
|
26
|
+
"notifications": [{"type": "desktop", "events": ["task.completed", "task.blocked"]}],
|
|
27
|
+
},
|
|
28
|
+
"write_policy": "local_config_write",
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def workflow_list(root: Path | None = None) -> dict[str, Any]:
|
|
34
|
+
workflows = load_workflows(root or ROOT)
|
|
35
|
+
return {
|
|
36
|
+
"kind": "workflows",
|
|
37
|
+
"schema_version": WORKFLOW_SCHEMA_VERSION,
|
|
38
|
+
"status": "ok",
|
|
39
|
+
"items": [public_workflow(item) for item in workflows.values()],
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def workflow_show(workflow_id: str, root: Path | None = None) -> dict[str, Any]:
|
|
44
|
+
workflow = require_workflow(workflow_id, root=root)
|
|
45
|
+
return {"kind": "workflow", "schema_version": WORKFLOW_SCHEMA_VERSION, "status": "ok", "workflow": public_workflow(workflow)}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def workflow_install(workflow_id: str, *, dry_run: bool = True, yes: bool = False, root: Path | None = None) -> dict[str, Any]:
|
|
49
|
+
workflow = require_workflow(workflow_id, root=root)
|
|
50
|
+
mode = "dry-run" if dry_run or not yes else "apply"
|
|
51
|
+
task = workflow["task"]
|
|
52
|
+
plan = {
|
|
53
|
+
"task": {
|
|
54
|
+
"id": workflow["id"],
|
|
55
|
+
"title": task["title"],
|
|
56
|
+
"schedule": workflow["schedule"],
|
|
57
|
+
"permissions": task["permissions"],
|
|
58
|
+
"notifications": task["notifications"],
|
|
59
|
+
},
|
|
60
|
+
"writes": ["local task registry"],
|
|
61
|
+
"stores_secret": False,
|
|
62
|
+
}
|
|
63
|
+
if mode == "dry-run":
|
|
64
|
+
return {
|
|
65
|
+
"kind": "workflow-install",
|
|
66
|
+
"schema_version": WORKFLOW_SCHEMA_VERSION,
|
|
67
|
+
"status": "planned",
|
|
68
|
+
"mode": "dry-run",
|
|
69
|
+
"workflow": public_workflow(workflow),
|
|
70
|
+
"plan": plan,
|
|
71
|
+
}
|
|
72
|
+
created = create_task(
|
|
73
|
+
task_id=workflow["id"],
|
|
74
|
+
title=task["title"],
|
|
75
|
+
prompt=task["prompt"],
|
|
76
|
+
schedule=workflow["schedule"],
|
|
77
|
+
action=task["action"],
|
|
78
|
+
permissions=task["permissions"],
|
|
79
|
+
notifications=task["notifications"],
|
|
80
|
+
)
|
|
81
|
+
return {
|
|
82
|
+
"kind": "workflow-install",
|
|
83
|
+
"schema_version": WORKFLOW_SCHEMA_VERSION,
|
|
84
|
+
"status": "installed",
|
|
85
|
+
"mode": "apply",
|
|
86
|
+
"workflow": public_workflow(workflow),
|
|
87
|
+
"task": created.get("task"),
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def workflow_run(workflow_id: str, *, dry_run: bool = True, root: Path | None = None) -> dict[str, Any]:
|
|
92
|
+
workflow = require_workflow(workflow_id, root=root)
|
|
93
|
+
task = workflow["task"]
|
|
94
|
+
plan = {
|
|
95
|
+
"task": {
|
|
96
|
+
"id": workflow["id"],
|
|
97
|
+
"title": task["title"],
|
|
98
|
+
"schedule": workflow["schedule"],
|
|
99
|
+
"action": task["action"],
|
|
100
|
+
"permissions": task["permissions"],
|
|
101
|
+
"notifications": task["notifications"],
|
|
102
|
+
},
|
|
103
|
+
"writes": ["local task registry", "task history"] if not dry_run else [],
|
|
104
|
+
"stores_secret": False,
|
|
105
|
+
}
|
|
106
|
+
if dry_run:
|
|
107
|
+
return {
|
|
108
|
+
"kind": "workflow-run",
|
|
109
|
+
"schema_version": WORKFLOW_SCHEMA_VERSION,
|
|
110
|
+
"status": "planned",
|
|
111
|
+
"dry_run": True,
|
|
112
|
+
"workflow": public_workflow(workflow),
|
|
113
|
+
"plan": plan,
|
|
114
|
+
"next_steps": [f"Run `agent workflow run {workflow['id']} --yes` to execute through the local task runtime."],
|
|
115
|
+
}
|
|
116
|
+
installed = ensure_workflow_task(workflow)
|
|
117
|
+
task_run = run_task(workflow["id"], dry_run=False, origin="workflow")
|
|
118
|
+
return {
|
|
119
|
+
"kind": "workflow-run",
|
|
120
|
+
"schema_version": WORKFLOW_SCHEMA_VERSION,
|
|
121
|
+
"status": task_run.get("status") or "failed",
|
|
122
|
+
"ok": task_run.get("ok") is True,
|
|
123
|
+
"dry_run": False,
|
|
124
|
+
"workflow": public_workflow(workflow),
|
|
125
|
+
"task_installed": installed,
|
|
126
|
+
"task_run": task_run,
|
|
127
|
+
"exit_code": task_run.get("exit_code"),
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def ensure_workflow_task(workflow: dict[str, Any]) -> bool:
|
|
132
|
+
task_id = workflow["id"]
|
|
133
|
+
data = load_tasks()
|
|
134
|
+
for item in data.get("tasks") or []:
|
|
135
|
+
if isinstance(item, dict) and item.get("id") == task_id:
|
|
136
|
+
return False
|
|
137
|
+
task = workflow["task"]
|
|
138
|
+
create_task(
|
|
139
|
+
task_id=task_id,
|
|
140
|
+
title=task["title"],
|
|
141
|
+
prompt=task["prompt"],
|
|
142
|
+
schedule=workflow["schedule"],
|
|
143
|
+
action=task["action"],
|
|
144
|
+
permissions=task["permissions"],
|
|
145
|
+
notifications=task["notifications"],
|
|
146
|
+
)
|
|
147
|
+
return True
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def require_workflow(workflow_id: str, root: Path | None = None) -> dict[str, Any]:
|
|
151
|
+
workflow = load_workflows(root or ROOT).get(workflow_id or "")
|
|
152
|
+
if not workflow:
|
|
153
|
+
raise ValueError(f"workflow not found: {workflow_id}")
|
|
154
|
+
return workflow
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def public_workflow(workflow: dict[str, Any]) -> dict[str, Any]:
|
|
158
|
+
return {
|
|
159
|
+
"id": workflow["id"],
|
|
160
|
+
"title": workflow["title"],
|
|
161
|
+
"description": workflow["description"],
|
|
162
|
+
"schedule": workflow["schedule"],
|
|
163
|
+
"write_policy": workflow["write_policy"],
|
|
164
|
+
"stores_secret": False,
|
|
165
|
+
"providers_required": workflow.get("providers") or workflow.get("providers_required") or [],
|
|
166
|
+
"permissions": workflow.get("permissions") or {},
|
|
167
|
+
"outputs": workflow.get("outputs") or [],
|
|
168
|
+
"risks": workflow.get("risks") or [],
|
|
169
|
+
"examples": workflow.get("examples") or [],
|
|
170
|
+
"path": workflow.get("path"),
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
def load_workflows(root: Path) -> dict[str, dict[str, Any]]:
|
|
175
|
+
workflows = dict(BUILTIN_WORKFLOWS)
|
|
176
|
+
workflows_dir = root / "workflows"
|
|
177
|
+
if not workflows_dir.exists():
|
|
178
|
+
return workflows
|
|
179
|
+
for manifest in sorted(workflows_dir.glob("*/workflow.yaml")):
|
|
180
|
+
item = load_workflow_manifest(manifest)
|
|
181
|
+
if item:
|
|
182
|
+
workflows[item["id"]] = item
|
|
183
|
+
return workflows
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def load_workflow_manifest(path: Path) -> dict[str, Any] | None:
|
|
187
|
+
try:
|
|
188
|
+
import yaml # type: ignore
|
|
189
|
+
except ImportError:
|
|
190
|
+
return None
|
|
191
|
+
try:
|
|
192
|
+
data = yaml.safe_load(path.read_text(encoding="utf-8")) or {}
|
|
193
|
+
except (OSError, ValueError):
|
|
194
|
+
return None
|
|
195
|
+
if not isinstance(data, dict) or not data.get("id"):
|
|
196
|
+
return None
|
|
197
|
+
workflow = dict(data)
|
|
198
|
+
workflow.setdefault("title", str(workflow["id"]))
|
|
199
|
+
workflow.setdefault("description", "")
|
|
200
|
+
workflow.setdefault("schedule", {"type": "manual"})
|
|
201
|
+
workflow.setdefault("permissions", {"mode": "report-only"})
|
|
202
|
+
workflow.setdefault("write_policy", "local_config_write")
|
|
203
|
+
workflow.setdefault("task", default_task(workflow))
|
|
204
|
+
workflow["path"] = str(path)
|
|
205
|
+
return workflow
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
def default_task(workflow: dict[str, Any]) -> dict[str, Any]:
|
|
209
|
+
prompt = str(workflow.get("description") or workflow.get("title") or workflow.get("id"))
|
|
210
|
+
return {
|
|
211
|
+
"title": workflow.get("title") or workflow.get("id"),
|
|
212
|
+
"prompt": prompt,
|
|
213
|
+
"action": {"type": "prompt", "prompt": prompt, "external_writes": False},
|
|
214
|
+
"permissions": workflow.get("permissions") or {"mode": "report-only"},
|
|
215
|
+
"notifications": [{"type": "desktop", "events": ["task.completed", "task.blocked"]}],
|
|
216
|
+
}
|