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
package/runtime/cli/aikit/llm.py
CHANGED
|
@@ -77,7 +77,7 @@ BACKENDS: dict[str, LlmBackend] = {
|
|
|
77
77
|
base_url_env="OLLAMA_BASE_URL",
|
|
78
78
|
model_env="OLLAMA_MODEL",
|
|
79
79
|
default_base_url="http://localhost:11434/v1",
|
|
80
|
-
default_model="
|
|
80
|
+
default_model="qwen3:0.6b",
|
|
81
81
|
notes="Uses a local Ollama server through an OpenAI-compatible endpoint.",
|
|
82
82
|
),
|
|
83
83
|
"codex-cli": LlmBackend(
|
|
@@ -387,18 +387,26 @@ def doctor_backend(backend: LlmBackend, config: dict[str, Any]) -> dict[str, Any
|
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
if backend.auth == "none":
|
|
390
|
-
|
|
390
|
+
env_base_url = env_value(backend.base_url_env)
|
|
391
|
+
base_url = configured.get("base_url") or env_base_url or backend.default_base_url
|
|
391
392
|
model = configured.get("model") or env_value(backend.model_env) or backend.default_model
|
|
393
|
+
binary = shutil.which(backend.id) if backend.id == "ollama" else None
|
|
394
|
+
local_available = bool(configured or env_base_url or binary)
|
|
392
395
|
return {
|
|
393
396
|
"id": backend.id,
|
|
394
397
|
"display_name": backend.display_name,
|
|
395
398
|
"kind": backend.kind,
|
|
396
|
-
"status": "ok" if
|
|
399
|
+
"status": "ok" if local_available else "missing",
|
|
397
400
|
"configured": bool(configured),
|
|
398
401
|
"base_url": base_url,
|
|
399
402
|
"model": model,
|
|
403
|
+
"binary": binary,
|
|
400
404
|
"health": "unchecked",
|
|
401
|
-
"message":
|
|
405
|
+
"message": (
|
|
406
|
+
"Local backend configured; daemon health is not probed by default."
|
|
407
|
+
if local_available
|
|
408
|
+
else "Local backend is not configured and no local binary was found in PATH."
|
|
409
|
+
),
|
|
402
410
|
}
|
|
403
411
|
|
|
404
412
|
api_key_env = configured.get("api_key_env") or backend.api_key_env
|
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
"""Local user-created skills, scripts and agent scaffolds."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import re
|
|
7
|
+
import shutil
|
|
8
|
+
import subprocess
|
|
9
|
+
from datetime import datetime, timezone
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
from typing import Any
|
|
12
|
+
|
|
13
|
+
from cli.aikit.app_home import app_home, ensure_app_home
|
|
14
|
+
from cli.aikit.errors import DevKitError
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
LOCAL_ARTIFACT_SCHEMA_VERSION = "agent-devkit.local-artifacts/v1"
|
|
18
|
+
ID_PATTERN = re.compile(r"^[a-z0-9][a-z0-9._-]*$")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def skill_create(skill_id: str | None, *, description: str | None = None, force: bool = False) -> dict[str, Any]:
|
|
22
|
+
item_id = require_id(skill_id, "skill id")
|
|
23
|
+
path = local_home("skills") / item_id
|
|
24
|
+
if path.exists() and not force:
|
|
25
|
+
raise DevKitError(f"local skill already exists: {item_id}")
|
|
26
|
+
path.mkdir(parents=True, exist_ok=True)
|
|
27
|
+
skill_path = path / "SKILL.md"
|
|
28
|
+
if force or not skill_path.exists():
|
|
29
|
+
skill_path.write_text(render_skill(item_id, description), encoding="utf-8")
|
|
30
|
+
return local_artifact_payload("local-skill", "created", item_id, path, write_policy="local_config_write")
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def skill_list() -> dict[str, Any]:
|
|
34
|
+
return local_artifact_list("local-skills", "skills", marker="SKILL.md")
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def skill_show(skill_id: str | None) -> dict[str, Any]:
|
|
38
|
+
return local_artifact_show("local-skill", "skills", require_id(skill_id, "skill id"), marker="SKILL.md")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def skill_update(skill_id: str | None, *, description: str | None = None) -> dict[str, Any]:
|
|
42
|
+
item_id = require_id(skill_id, "skill id")
|
|
43
|
+
path = local_home("skills") / item_id
|
|
44
|
+
if not path.exists():
|
|
45
|
+
raise DevKitError(f"local skill not found: {item_id}")
|
|
46
|
+
(path / "SKILL.md").write_text(render_skill(item_id, description), encoding="utf-8")
|
|
47
|
+
return local_artifact_payload("local-skill", "updated", item_id, path, write_policy="local_config_write")
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def skill_delete(skill_id: str | None, *, yes: bool = False) -> dict[str, Any]:
|
|
51
|
+
item_id = require_id(skill_id, "skill id")
|
|
52
|
+
path = local_home("skills") / item_id
|
|
53
|
+
if not yes:
|
|
54
|
+
payload = local_artifact_payload("local-skill", "needs-confirmation", item_id, path, write_policy="local_config_write")
|
|
55
|
+
payload["ok"] = False
|
|
56
|
+
payload["exit_code"] = 2
|
|
57
|
+
return payload
|
|
58
|
+
shutil.rmtree(path, ignore_errors=True)
|
|
59
|
+
return local_artifact_payload("local-skill", "deleted", item_id, path, write_policy="local_config_write")
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def script_create(script_id: str | None, *, command: str | None = None, force: bool = False) -> dict[str, Any]:
|
|
63
|
+
item_id = require_id(script_id, "script id")
|
|
64
|
+
path = local_home("scripts") / f"{item_id}.sh"
|
|
65
|
+
if path.exists() and not force:
|
|
66
|
+
raise DevKitError(f"local script already exists: {item_id}")
|
|
67
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
68
|
+
path.write_text(render_script(command), encoding="utf-8")
|
|
69
|
+
path.chmod(0o755)
|
|
70
|
+
return local_artifact_payload("local-script", "created", item_id, path, write_policy="local_write")
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def script_list() -> dict[str, Any]:
|
|
74
|
+
home = local_home("scripts")
|
|
75
|
+
items = [
|
|
76
|
+
local_artifact_item(path.stem, path, "local-script", enabled=True)
|
|
77
|
+
for path in sorted(home.glob("*.sh"))
|
|
78
|
+
]
|
|
79
|
+
return {"kind": "local-scripts", "schema_version": LOCAL_ARTIFACT_SCHEMA_VERSION, "status": "ok", "home": str(home), "items": items}
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def script_run(script_id: str | None, *, dry_run: bool = False, yes: bool = False) -> dict[str, Any]:
|
|
83
|
+
item_id = require_id(script_id, "script id")
|
|
84
|
+
path = local_home("scripts") / f"{item_id}.sh"
|
|
85
|
+
if not path.exists():
|
|
86
|
+
raise DevKitError(f"local script not found: {item_id}")
|
|
87
|
+
if dry_run or not yes:
|
|
88
|
+
return {
|
|
89
|
+
"kind": "local-script-run",
|
|
90
|
+
"schema_version": LOCAL_ARTIFACT_SCHEMA_VERSION,
|
|
91
|
+
"status": "planned" if dry_run else "needs-confirmation",
|
|
92
|
+
"ok": bool(dry_run),
|
|
93
|
+
"id": item_id,
|
|
94
|
+
"path": str(path),
|
|
95
|
+
"command": [str(path)],
|
|
96
|
+
"write_policy": "local_write",
|
|
97
|
+
"message": "Use --yes to run the local script." if not dry_run and not yes else "Dry-run only.",
|
|
98
|
+
**({} if dry_run else {"exit_code": 2}),
|
|
99
|
+
}
|
|
100
|
+
process = subprocess.run([str(path)], check=False, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=300)
|
|
101
|
+
return {
|
|
102
|
+
"kind": "local-script-run",
|
|
103
|
+
"schema_version": LOCAL_ARTIFACT_SCHEMA_VERSION,
|
|
104
|
+
"status": "ok" if process.returncode == 0 else "failed",
|
|
105
|
+
"ok": process.returncode == 0,
|
|
106
|
+
"id": item_id,
|
|
107
|
+
"path": str(path),
|
|
108
|
+
"exit_code": process.returncode,
|
|
109
|
+
"stdout": process.stdout[-4000:],
|
|
110
|
+
"stderr": process.stderr[-4000:],
|
|
111
|
+
"write_policy": "local_write",
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def local_agent_create(agent_id: str | None, *, description: str | None = None, force: bool = False) -> dict[str, Any]:
|
|
116
|
+
item_id = require_id(agent_id, "agent id")
|
|
117
|
+
path = local_home("agents") / item_id
|
|
118
|
+
if path.exists() and not force:
|
|
119
|
+
raise DevKitError(f"local agent already exists: {item_id}")
|
|
120
|
+
(path / "capabilities").mkdir(parents=True, exist_ok=True)
|
|
121
|
+
(path / "knowledge").mkdir(parents=True, exist_ok=True)
|
|
122
|
+
(path / "templates").mkdir(parents=True, exist_ok=True)
|
|
123
|
+
(path / "infra").mkdir(parents=True, exist_ok=True)
|
|
124
|
+
(path / "agent.yaml").write_text(render_agent_yaml(item_id, description), encoding="utf-8")
|
|
125
|
+
(path / "README.md").write_text(f"# {item_id}\n\n{description or 'Local Agent DevKit agent.'}\n", encoding="utf-8")
|
|
126
|
+
return local_artifact_payload("local-agent", "created", item_id, path, write_policy="local_config_write")
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def local_agent_validate(agent_id: str | None) -> dict[str, Any]:
|
|
130
|
+
item_id = require_id(agent_id, "agent id")
|
|
131
|
+
path = local_home("agents") / item_id
|
|
132
|
+
checks = [
|
|
133
|
+
{"id": "path-exists", "status": "passed" if path.exists() else "failed"},
|
|
134
|
+
{"id": "agent-yaml", "status": "passed" if (path / "agent.yaml").exists() else "failed"},
|
|
135
|
+
{"id": "capabilities-dir", "status": "passed" if (path / "capabilities").is_dir() else "failed"},
|
|
136
|
+
{"id": "knowledge-dir", "status": "passed" if (path / "knowledge").is_dir() else "failed"},
|
|
137
|
+
]
|
|
138
|
+
return {
|
|
139
|
+
"kind": "local-agent-validation",
|
|
140
|
+
"schema_version": LOCAL_ARTIFACT_SCHEMA_VERSION,
|
|
141
|
+
"status": "passed" if all(check["status"] == "passed" for check in checks) else "failed",
|
|
142
|
+
"id": item_id,
|
|
143
|
+
"path": str(path),
|
|
144
|
+
"checks": checks,
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def local_agent_show(agent_id: str | None) -> dict[str, Any]:
|
|
149
|
+
item_id = require_id(agent_id, "agent id")
|
|
150
|
+
path = local_home("agents") / item_id
|
|
151
|
+
if not (path / "agent.yaml").exists():
|
|
152
|
+
raise DevKitError(f"local agent not found: {item_id}")
|
|
153
|
+
payload = local_artifact_payload("local-agent", "ok", item_id, path, write_policy="read_only")
|
|
154
|
+
payload["manifest"] = (path / "agent.yaml").read_text(encoding="utf-8")
|
|
155
|
+
readme = path / "README.md"
|
|
156
|
+
if readme.exists():
|
|
157
|
+
payload["readme"] = readme.read_text(encoding="utf-8")
|
|
158
|
+
return payload
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
def local_agent_list() -> dict[str, Any]:
|
|
162
|
+
return local_artifact_list("local-agents", "agents", marker="agent.yaml")
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
def local_automation_create(
|
|
166
|
+
automation_id: str | None,
|
|
167
|
+
*,
|
|
168
|
+
title: str | None = None,
|
|
169
|
+
prompt: str | None = None,
|
|
170
|
+
command: str | None = None,
|
|
171
|
+
every: str | None = None,
|
|
172
|
+
cron: str | None = None,
|
|
173
|
+
force: bool = False,
|
|
174
|
+
) -> dict[str, Any]:
|
|
175
|
+
item_id = generated_id(automation_id, title, prefix="automation")
|
|
176
|
+
path = local_home("automations") / item_id
|
|
177
|
+
manifest = path / "automation.json"
|
|
178
|
+
if manifest.exists() and not force:
|
|
179
|
+
raise DevKitError(f"local automation already exists: {item_id}")
|
|
180
|
+
path.mkdir(parents=True, exist_ok=True)
|
|
181
|
+
payload = automation_manifest(item_id, title=title, prompt=prompt, command=command, every=every, cron=cron, enabled=True)
|
|
182
|
+
write_json(manifest, payload)
|
|
183
|
+
if command:
|
|
184
|
+
script_path = path / "run.sh"
|
|
185
|
+
script_path.write_text(render_script(command), encoding="utf-8")
|
|
186
|
+
script_path.chmod(0o755)
|
|
187
|
+
return local_automation_payload("created", item_id, path, payload)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def local_automation_list() -> dict[str, Any]:
|
|
191
|
+
home = local_home("automations")
|
|
192
|
+
items = []
|
|
193
|
+
for manifest in sorted(home.glob("*/automation.json")):
|
|
194
|
+
payload = read_json(manifest)
|
|
195
|
+
item_id = str(payload.get("id") or manifest.parent.name)
|
|
196
|
+
items.append(
|
|
197
|
+
{
|
|
198
|
+
"id": item_id,
|
|
199
|
+
"kind": "local-automation",
|
|
200
|
+
"path": str(manifest.parent),
|
|
201
|
+
"enabled": payload.get("enabled") is True,
|
|
202
|
+
"title": payload.get("title"),
|
|
203
|
+
"schedule": payload.get("schedule") or {},
|
|
204
|
+
"write_policy": payload.get("write_policy") or "local_write",
|
|
205
|
+
}
|
|
206
|
+
)
|
|
207
|
+
return {"kind": "local-automations", "schema_version": LOCAL_ARTIFACT_SCHEMA_VERSION, "status": "ok", "home": str(home), "items": items}
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
def local_automation_show(automation_id: str | None) -> dict[str, Any]:
|
|
211
|
+
item_id = require_id(automation_id, "automation id")
|
|
212
|
+
path = local_home("automations") / item_id
|
|
213
|
+
payload = read_required_automation(path, item_id)
|
|
214
|
+
return local_automation_payload("ok", item_id, path, payload)
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
def local_automation_update(
|
|
218
|
+
automation_id: str | None,
|
|
219
|
+
*,
|
|
220
|
+
title: str | None = None,
|
|
221
|
+
prompt: str | None = None,
|
|
222
|
+
command: str | None = None,
|
|
223
|
+
every: str | None = None,
|
|
224
|
+
cron: str | None = None,
|
|
225
|
+
) -> dict[str, Any]:
|
|
226
|
+
item_id = require_id(automation_id, "automation id")
|
|
227
|
+
path = local_home("automations") / item_id
|
|
228
|
+
current = read_required_automation(path, item_id)
|
|
229
|
+
current_schedule = current.get("schedule") if isinstance(current.get("schedule"), dict) else {"type": "manual"}
|
|
230
|
+
updated = automation_manifest(
|
|
231
|
+
item_id,
|
|
232
|
+
title=title if title is not None else str(current.get("title") or ""),
|
|
233
|
+
prompt=prompt if prompt is not None else current.get("prompt"),
|
|
234
|
+
command=command if command is not None else current.get("command"),
|
|
235
|
+
every=every,
|
|
236
|
+
cron=cron,
|
|
237
|
+
enabled=current.get("enabled") is not False,
|
|
238
|
+
created_at=str(current.get("created_at") or now_iso()),
|
|
239
|
+
)
|
|
240
|
+
if every is None and cron is None:
|
|
241
|
+
updated["schedule"] = current_schedule
|
|
242
|
+
write_json(path / "automation.json", updated)
|
|
243
|
+
return local_automation_payload("updated", item_id, path, updated)
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
def local_automation_enable(automation_id: str | None, enabled: bool) -> dict[str, Any]:
|
|
247
|
+
item_id = require_id(automation_id, "automation id")
|
|
248
|
+
path = local_home("automations") / item_id
|
|
249
|
+
payload = read_required_automation(path, item_id)
|
|
250
|
+
payload["enabled"] = enabled
|
|
251
|
+
payload["updated_at"] = now_iso()
|
|
252
|
+
write_json(path / "automation.json", payload)
|
|
253
|
+
return local_automation_payload("enabled" if enabled else "disabled", item_id, path, payload)
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
def local_automation_remove(automation_id: str | None, *, yes: bool = False) -> dict[str, Any]:
|
|
257
|
+
item_id = require_id(automation_id, "automation id")
|
|
258
|
+
path = local_home("automations") / item_id
|
|
259
|
+
if not yes:
|
|
260
|
+
payload = local_artifact_payload("local-automation", "needs-confirmation", item_id, path, write_policy="local_config_write")
|
|
261
|
+
payload["ok"] = False
|
|
262
|
+
payload["exit_code"] = 2
|
|
263
|
+
return payload
|
|
264
|
+
shutil.rmtree(path, ignore_errors=True)
|
|
265
|
+
return local_artifact_payload("local-automation", "removed", item_id, path, write_policy="local_config_write")
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
def local_automation_validate(automation_id: str | None) -> dict[str, Any]:
|
|
269
|
+
item_id = require_id(automation_id, "automation id")
|
|
270
|
+
path = local_home("automations") / item_id
|
|
271
|
+
payload = read_json(path / "automation.json") if (path / "automation.json").exists() else {}
|
|
272
|
+
checks = [
|
|
273
|
+
{"id": "path-exists", "status": "passed" if path.exists() else "failed"},
|
|
274
|
+
{"id": "manifest-exists", "status": "passed" if (path / "automation.json").exists() else "failed"},
|
|
275
|
+
{"id": "has-action", "status": "passed" if payload.get("prompt") or payload.get("command") else "failed"},
|
|
276
|
+
{"id": "no-stored-secret", "status": "passed" if not contains_secret_like_text(json.dumps(payload, ensure_ascii=False)) else "failed"},
|
|
277
|
+
]
|
|
278
|
+
return {
|
|
279
|
+
"kind": "local-automation-validation",
|
|
280
|
+
"schema_version": LOCAL_ARTIFACT_SCHEMA_VERSION,
|
|
281
|
+
"status": "passed" if all(check["status"] == "passed" for check in checks) else "failed",
|
|
282
|
+
"id": item_id,
|
|
283
|
+
"path": str(path),
|
|
284
|
+
"checks": checks,
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
def local_home(*parts: str) -> Path:
|
|
289
|
+
ensure_app_home()
|
|
290
|
+
path = app_home() / "local" / Path(*parts)
|
|
291
|
+
path.mkdir(parents=True, exist_ok=True)
|
|
292
|
+
return path
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
def local_artifact_list(kind: str, folder: str, *, marker: str) -> dict[str, Any]:
|
|
296
|
+
home = local_home(folder)
|
|
297
|
+
items = [
|
|
298
|
+
local_artifact_item(path.parent.name, path.parent, kind.removesuffix("s"), enabled=True)
|
|
299
|
+
for path in sorted(home.glob(f"*/{marker}"))
|
|
300
|
+
]
|
|
301
|
+
return {"kind": kind, "schema_version": LOCAL_ARTIFACT_SCHEMA_VERSION, "status": "ok", "home": str(home), "items": items}
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
def local_artifact_show(kind: str, folder: str, item_id: str, *, marker: str) -> dict[str, Any]:
|
|
305
|
+
path = local_home(folder) / item_id
|
|
306
|
+
marker_path = path / marker
|
|
307
|
+
if not marker_path.exists():
|
|
308
|
+
raise DevKitError(f"{kind} not found: {item_id}")
|
|
309
|
+
payload = local_artifact_payload(kind, "ok", item_id, path, write_policy="read_only")
|
|
310
|
+
payload["content"] = marker_path.read_text(encoding="utf-8")
|
|
311
|
+
return payload
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
def local_artifact_payload(kind: str, status: str, item_id: str, path: Path, *, write_policy: str) -> dict[str, Any]:
|
|
315
|
+
return {
|
|
316
|
+
"kind": kind,
|
|
317
|
+
"schema_version": LOCAL_ARTIFACT_SCHEMA_VERSION,
|
|
318
|
+
"status": status,
|
|
319
|
+
"id": item_id,
|
|
320
|
+
"path": str(path),
|
|
321
|
+
"write_policy": write_policy,
|
|
322
|
+
"stored_secret": False,
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
def local_artifact_item(item_id: str, path: Path, kind: str, *, enabled: bool) -> dict[str, Any]:
|
|
327
|
+
return {"id": item_id, "kind": kind, "path": str(path), "enabled": enabled}
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
def require_id(value: str | None, label: str) -> str:
|
|
331
|
+
item_id = (value or "").strip()
|
|
332
|
+
if not ID_PATTERN.fullmatch(item_id):
|
|
333
|
+
raise DevKitError(f"{label} must use lowercase letters, numbers, dots, dashes or underscores")
|
|
334
|
+
return item_id
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
def generated_id(value: str | None, title: str | None, *, prefix: str) -> str:
|
|
338
|
+
if value:
|
|
339
|
+
return require_id(value, f"{prefix} id")
|
|
340
|
+
raw = title or f"{prefix}-{datetime.now(timezone.utc).strftime('%Y%m%d%H%M%S')}"
|
|
341
|
+
slug = re.sub(r"[^a-z0-9._-]+", "-", raw.strip().lower()).strip("-._")
|
|
342
|
+
return require_id(slug or prefix, f"{prefix} id")
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
def automation_manifest(
|
|
346
|
+
item_id: str,
|
|
347
|
+
*,
|
|
348
|
+
title: str | None,
|
|
349
|
+
prompt: Any,
|
|
350
|
+
command: Any,
|
|
351
|
+
every: str | None,
|
|
352
|
+
cron: str | None,
|
|
353
|
+
enabled: bool,
|
|
354
|
+
created_at: str | None = None,
|
|
355
|
+
) -> dict[str, Any]:
|
|
356
|
+
schedule: dict[str, Any] = {"type": "manual"}
|
|
357
|
+
if every:
|
|
358
|
+
schedule = {"type": "interval", "every": every}
|
|
359
|
+
if cron:
|
|
360
|
+
schedule = {"type": "cron", "cron": cron}
|
|
361
|
+
now = now_iso()
|
|
362
|
+
return {
|
|
363
|
+
"schema_version": LOCAL_ARTIFACT_SCHEMA_VERSION,
|
|
364
|
+
"id": item_id,
|
|
365
|
+
"kind": "local-automation",
|
|
366
|
+
"title": title or item_id,
|
|
367
|
+
"prompt": prompt,
|
|
368
|
+
"command": command,
|
|
369
|
+
"schedule": schedule,
|
|
370
|
+
"enabled": enabled,
|
|
371
|
+
"write_policy": "local_write" if command else "local_config_write",
|
|
372
|
+
"external_writes": False,
|
|
373
|
+
"stored_secret": False,
|
|
374
|
+
"created_at": created_at or now,
|
|
375
|
+
"updated_at": now,
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
def local_automation_payload(status: str, item_id: str, path: Path, manifest: dict[str, Any]) -> dict[str, Any]:
|
|
380
|
+
payload = local_artifact_payload("local-automation", status, item_id, path, write_policy=str(manifest.get("write_policy") or "local_config_write"))
|
|
381
|
+
payload["automation"] = manifest
|
|
382
|
+
return payload
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
def read_required_automation(path: Path, item_id: str) -> dict[str, Any]:
|
|
386
|
+
manifest = path / "automation.json"
|
|
387
|
+
if not manifest.exists():
|
|
388
|
+
raise DevKitError(f"local automation not found: {item_id}")
|
|
389
|
+
return read_json(manifest)
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
def read_json(path: Path) -> dict[str, Any]:
|
|
393
|
+
try:
|
|
394
|
+
payload = json.loads(path.read_text(encoding="utf-8"))
|
|
395
|
+
except (OSError, json.JSONDecodeError):
|
|
396
|
+
return {}
|
|
397
|
+
return payload if isinstance(payload, dict) else {}
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
def write_json(path: Path, payload: dict[str, Any]) -> None:
|
|
401
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
402
|
+
path.write_text(json.dumps(payload, ensure_ascii=False, indent=2, sort_keys=True) + "\n", encoding="utf-8")
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
def contains_secret_like_text(text: str) -> bool:
|
|
406
|
+
return bool(re.search(r"(?i)(api[_-]?key|token|secret|password|senha|pat)\s*[:=]", text))
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
def now_iso() -> str:
|
|
410
|
+
return datetime.now(timezone.utc).isoformat()
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
def render_skill(skill_id: str, description: str | None) -> str:
|
|
414
|
+
return f"""---
|
|
415
|
+
name: {skill_id}
|
|
416
|
+
description: {description or 'Local Agent DevKit skill.'}
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
# {skill_id}
|
|
420
|
+
|
|
421
|
+
{description or 'Local skill created by Agent DevKit.'}
|
|
422
|
+
"""
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
def render_script(command: str | None) -> str:
|
|
426
|
+
body = command or "echo 'local script placeholder'"
|
|
427
|
+
return f"#!/usr/bin/env sh\nset -eu\n{body}\n"
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
def render_agent_yaml(agent_id: str, description: str | None) -> str:
|
|
431
|
+
return json.dumps(
|
|
432
|
+
{
|
|
433
|
+
"id": agent_id,
|
|
434
|
+
"kind": "agent",
|
|
435
|
+
"name": agent_id,
|
|
436
|
+
"version": "0.1.0",
|
|
437
|
+
"status": "draft",
|
|
438
|
+
"purpose": description or "Local Agent DevKit agent.",
|
|
439
|
+
"default_context": ["knowledge/context.md"],
|
|
440
|
+
"capabilities": [],
|
|
441
|
+
},
|
|
442
|
+
ensure_ascii=False,
|
|
443
|
+
indent=2,
|
|
444
|
+
) + "\n"
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"""Canonical local-LLM CLI surface over Ollama and mini-brain policy."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import shutil
|
|
6
|
+
import subprocess
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
from cli.aikit.mini_brain import DEFAULT_OLLAMA_MODEL, mini_brain_contract
|
|
10
|
+
from cli.aikit.model_router import build_model_plan
|
|
11
|
+
from cli.aikit.ollama import ollama_models, ollama_pull, ollama_status
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
LOCAL_LLM_SCHEMA_VERSION = "agent-devkit.local-llm/v1"
|
|
15
|
+
LOCAL_WORKERS = (
|
|
16
|
+
("local-classifier", "intent classification and routing hints"),
|
|
17
|
+
("local-summarizer", "short summaries and extraction"),
|
|
18
|
+
("local-coder", "mechanical code drafts with coordinator review"),
|
|
19
|
+
("local-log-analyzer", "log clustering and evidence extraction"),
|
|
20
|
+
("local-sql-helper", "SQL draft assistance with review required"),
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def local_llm_list() -> dict[str, Any]:
|
|
25
|
+
status = ollama_status()
|
|
26
|
+
contract = mini_brain_contract(ollama_payload=status)
|
|
27
|
+
return {
|
|
28
|
+
"kind": "local-llm",
|
|
29
|
+
"schema_version": LOCAL_LLM_SCHEMA_VERSION,
|
|
30
|
+
"status": "ok",
|
|
31
|
+
"provider": "ollama",
|
|
32
|
+
"mini_brain": contract,
|
|
33
|
+
"workers": [{"id": worker_id, "purpose": purpose} for worker_id, purpose in LOCAL_WORKERS],
|
|
34
|
+
"models": {
|
|
35
|
+
"status": status.get("status"),
|
|
36
|
+
"count": status.get("model_count", 0),
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def local_llm_doctor() -> dict[str, Any]:
|
|
42
|
+
status = ollama_status()
|
|
43
|
+
contract = mini_brain_contract(ollama_payload=status)
|
|
44
|
+
model_plan = build_model_plan("resuma estes logs operacionais")
|
|
45
|
+
ok = status.get("status") == "ok" and contract.get("enabled") is True
|
|
46
|
+
return {
|
|
47
|
+
"kind": "local-llm-doctor",
|
|
48
|
+
"schema_version": LOCAL_LLM_SCHEMA_VERSION,
|
|
49
|
+
"status": "ok" if ok else "partial",
|
|
50
|
+
"provider": "ollama",
|
|
51
|
+
"ollama": status,
|
|
52
|
+
"mini_brain": contract,
|
|
53
|
+
"model_plan": {
|
|
54
|
+
"strategy": model_plan.get("strategy"),
|
|
55
|
+
"local_llm_recommended": model_plan.get("local_llm_recommended"),
|
|
56
|
+
"local_llm_selected": model_plan.get("local_llm_selected"),
|
|
57
|
+
"local_llm_role": model_plan.get("local_llm_role"),
|
|
58
|
+
"forbidden_actions": model_plan.get("forbidden_actions") or [],
|
|
59
|
+
},
|
|
60
|
+
"next_steps": local_llm_next_steps(status=status, mini_brain=contract),
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def local_llm_models() -> dict[str, Any]:
|
|
65
|
+
payload = ollama_models()
|
|
66
|
+
payload["kind"] = "local-llm-models"
|
|
67
|
+
payload["schema_version"] = LOCAL_LLM_SCHEMA_VERSION
|
|
68
|
+
payload["provider"] = "ollama"
|
|
69
|
+
return payload
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def local_llm_install(model: str | None, *, dry_run: bool = False, yes: bool = False) -> dict[str, Any]:
|
|
73
|
+
model = model or DEFAULT_OLLAMA_MODEL
|
|
74
|
+
payload = ollama_pull(model, dry_run=dry_run, yes=yes)
|
|
75
|
+
payload["kind"] = "local-llm-install"
|
|
76
|
+
payload["schema_version"] = LOCAL_LLM_SCHEMA_VERSION
|
|
77
|
+
payload["provider"] = "ollama"
|
|
78
|
+
return payload
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def local_llm_remove(model: str | None, *, dry_run: bool = False, yes: bool = False) -> dict[str, Any]:
|
|
82
|
+
model = model or DEFAULT_OLLAMA_MODEL
|
|
83
|
+
command = ["ollama", "rm", model]
|
|
84
|
+
binary = shutil.which("ollama")
|
|
85
|
+
if dry_run or not yes:
|
|
86
|
+
needs_confirmation = not dry_run and not yes
|
|
87
|
+
return {
|
|
88
|
+
"kind": "local-llm-remove",
|
|
89
|
+
"schema_version": LOCAL_LLM_SCHEMA_VERSION,
|
|
90
|
+
"status": "planned" if dry_run else "needs-confirmation",
|
|
91
|
+
"ok": bool(dry_run),
|
|
92
|
+
"exit_code": 2 if needs_confirmation else 0,
|
|
93
|
+
"provider": "ollama",
|
|
94
|
+
"model": model,
|
|
95
|
+
"binary": binary,
|
|
96
|
+
"command": command,
|
|
97
|
+
"dry_run": dry_run,
|
|
98
|
+
"yes": yes,
|
|
99
|
+
"message": "Use --yes to remove the local model." if not dry_run and not yes else "Dry-run only.",
|
|
100
|
+
}
|
|
101
|
+
if not binary:
|
|
102
|
+
return {
|
|
103
|
+
"kind": "local-llm-remove",
|
|
104
|
+
"schema_version": LOCAL_LLM_SCHEMA_VERSION,
|
|
105
|
+
"status": "missing",
|
|
106
|
+
"ok": False,
|
|
107
|
+
"provider": "ollama",
|
|
108
|
+
"model": model,
|
|
109
|
+
"command": command,
|
|
110
|
+
"message": "Ollama binary not found in PATH.",
|
|
111
|
+
"exit_code": 2,
|
|
112
|
+
}
|
|
113
|
+
process = subprocess.run(command, check=False, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=120)
|
|
114
|
+
return {
|
|
115
|
+
"kind": "local-llm-remove",
|
|
116
|
+
"schema_version": LOCAL_LLM_SCHEMA_VERSION,
|
|
117
|
+
"status": "ok" if process.returncode == 0 else "failed",
|
|
118
|
+
"ok": process.returncode == 0,
|
|
119
|
+
"provider": "ollama",
|
|
120
|
+
"model": model,
|
|
121
|
+
"binary": binary,
|
|
122
|
+
"command": command,
|
|
123
|
+
"exit_code": process.returncode,
|
|
124
|
+
"stdout": process.stdout[-4000:],
|
|
125
|
+
"stderr": process.stderr[-4000:],
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def local_llm_benchmark(model: str | None = None) -> dict[str, Any]:
|
|
130
|
+
model = model or DEFAULT_OLLAMA_MODEL
|
|
131
|
+
status = ollama_status()
|
|
132
|
+
installed = {item.get("name") for item in status.get("models") or [] if isinstance(item, dict)}
|
|
133
|
+
available = status.get("status") == "ok" and model in installed
|
|
134
|
+
return {
|
|
135
|
+
"kind": "local-llm-benchmark",
|
|
136
|
+
"schema_version": LOCAL_LLM_SCHEMA_VERSION,
|
|
137
|
+
"status": "ready" if available else "planned",
|
|
138
|
+
"ok": available,
|
|
139
|
+
"provider": "ollama",
|
|
140
|
+
"model": model,
|
|
141
|
+
"checks": [
|
|
142
|
+
{"id": "ollama-binary", "status": "passed" if status.get("status") == "ok" else "failed"},
|
|
143
|
+
{"id": "model-installed", "status": "passed" if model in installed else "planned"},
|
|
144
|
+
{"id": "policy", "status": "passed", "message": "Benchmark is read-only and does not approve final work."},
|
|
145
|
+
],
|
|
146
|
+
"next_steps": [] if available else [f"agent local-llm install {model} --yes"],
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def local_llm_next_steps(*, status: dict[str, Any], mini_brain: dict[str, Any]) -> list[str]:
|
|
151
|
+
steps: list[str] = []
|
|
152
|
+
if status.get("status") != "ok":
|
|
153
|
+
install_plan = status.get("install_plan") if isinstance(status.get("install_plan"), dict) else {}
|
|
154
|
+
command = install_plan.get("command")
|
|
155
|
+
if command:
|
|
156
|
+
steps.append(f"Install Ollama: {command}")
|
|
157
|
+
if not mini_brain.get("enabled"):
|
|
158
|
+
steps.append("agent setup mini-brain --yes")
|
|
159
|
+
if status.get("model_count", 0) < 1:
|
|
160
|
+
steps.append(f"agent local-llm install {DEFAULT_OLLAMA_MODEL} --yes")
|
|
161
|
+
return steps
|