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.
Files changed (691) hide show
  1. package/README.md +59 -5
  2. package/bin/agent.mjs +133 -7
  3. package/package.json +1 -1
  4. package/runtime/README.md +239 -5
  5. package/runtime/agent +36 -5
  6. package/runtime/agents/README.md +44 -0
  7. package/runtime/agents/agent-devkit-agent-builder/AGENTS.md +24 -0
  8. package/runtime/agents/agent-devkit-agent-builder/README.md +37 -0
  9. package/runtime/agents/agent-devkit-agent-builder/agent.yaml +46 -0
  10. package/runtime/agents/agent-devkit-agent-builder/capabilities/plan-agent/capability.yaml +29 -0
  11. package/runtime/agents/agent-devkit-agent-builder/capabilities/plan-agent/decision-rules.md +7 -0
  12. package/runtime/agents/agent-devkit-agent-builder/capabilities/plan-agent/runner.py +33 -0
  13. package/runtime/agents/agent-devkit-agent-builder/capabilities/plan-agent/workflow.md +8 -0
  14. package/runtime/agents/agent-devkit-agent-builder/capabilities/scaffold-agent/capability.yaml +31 -0
  15. package/runtime/agents/agent-devkit-agent-builder/capabilities/scaffold-agent/decision-rules.md +9 -0
  16. package/runtime/agents/agent-devkit-agent-builder/capabilities/scaffold-agent/runner.py +39 -0
  17. package/runtime/agents/agent-devkit-agent-builder/capabilities/scaffold-agent/workflow.md +8 -0
  18. package/runtime/agents/agent-devkit-agent-builder/capabilities/validate-agent-contract/capability.yaml +28 -0
  19. package/runtime/agents/agent-devkit-agent-builder/capabilities/validate-agent-contract/decision-rules.md +6 -0
  20. package/runtime/agents/agent-devkit-agent-builder/capabilities/validate-agent-contract/runner.py +33 -0
  21. package/runtime/agents/agent-devkit-agent-builder/capabilities/validate-agent-contract/workflow.md +7 -0
  22. package/runtime/agents/agent-devkit-agent-builder/infra/integrations/agent-devkit/agent_builder_repository.py +527 -0
  23. package/runtime/agents/agent-devkit-agent-builder/knowledge/context.md +15 -0
  24. package/runtime/agents/agent-devkit-agent-builder/knowledge/policies.yaml +11 -0
  25. package/runtime/agents/agent-devkit-agent-builder/knowledge/system.md +11 -0
  26. package/runtime/agents/agent-devkit-agent-builder/templates/agent-plan-output.md +20 -0
  27. package/runtime/agents/agent-devkit-agent-builder/templates/scaffold-plan-output.md +13 -0
  28. package/runtime/agents/agent-devkit-agent-builder/templates/validation-report-output.md +13 -0
  29. package/runtime/agents/agent-devkit-agent-builder/tests/test_runners.py +188 -0
  30. package/runtime/agents/automation-architect/AGENTS.md +11 -0
  31. package/runtime/agents/automation-architect/README.md +27 -0
  32. package/runtime/agents/automation-architect/agent.yaml +57 -0
  33. package/runtime/agents/automation-architect/capabilities/classify-automation-request/capability.yaml +35 -0
  34. package/runtime/agents/automation-architect/capabilities/classify-automation-request/decision-rules.md +10 -0
  35. package/runtime/agents/automation-architect/capabilities/classify-automation-request/runner.py +37 -0
  36. package/runtime/agents/automation-architect/capabilities/classify-automation-request/workflow.md +7 -0
  37. package/runtime/agents/automation-architect/capabilities/delegate-automation-build/capability.yaml +34 -0
  38. package/runtime/agents/automation-architect/capabilities/delegate-automation-build/decision-rules.md +7 -0
  39. package/runtime/agents/automation-architect/capabilities/delegate-automation-build/runner.py +37 -0
  40. package/runtime/agents/automation-architect/capabilities/delegate-automation-build/workflow.md +6 -0
  41. package/runtime/agents/automation-architect/capabilities/plan-automation-solution/capability.yaml +35 -0
  42. package/runtime/agents/automation-architect/capabilities/plan-automation-solution/decision-rules.md +7 -0
  43. package/runtime/agents/automation-architect/capabilities/plan-automation-solution/runner.py +37 -0
  44. package/runtime/agents/automation-architect/capabilities/plan-automation-solution/workflow.md +7 -0
  45. package/runtime/agents/automation-architect/capabilities/review-automation-solution/capability.yaml +36 -0
  46. package/runtime/agents/automation-architect/capabilities/review-automation-solution/decision-rules.md +7 -0
  47. package/runtime/agents/automation-architect/capabilities/review-automation-solution/runner.py +39 -0
  48. package/runtime/agents/automation-architect/capabilities/review-automation-solution/workflow.md +7 -0
  49. package/runtime/agents/automation-architect/infra/integrations/automation-architecture/automation_architecture_repository.py +481 -0
  50. package/runtime/agents/automation-architect/knowledge/context.md +22 -0
  51. package/runtime/agents/automation-architect/knowledge/policies.yaml +20 -0
  52. package/runtime/agents/automation-architect/knowledge/system.md +8 -0
  53. package/runtime/agents/automation-architect/templates/automation-classification.md +6 -0
  54. package/runtime/agents/automation-architect/templates/automation-plan.md +5 -0
  55. package/runtime/agents/automation-architect/tests/test_runners.py +135 -0
  56. package/runtime/agents/aws-architecture-analyst/agent.yaml +17 -4
  57. package/runtime/agents/aws-cloudwatch-log-analyzer/agent.yaml +12 -2
  58. package/runtime/agents/aws-cloudwatch-log-analyzer/capabilities/analyze-service-error/capability.yaml +16 -0
  59. package/runtime/agents/aws-lambda-builder/AGENTS.md +27 -0
  60. package/runtime/agents/aws-lambda-builder/README.md +21 -0
  61. package/runtime/agents/aws-lambda-builder/agent.yaml +46 -0
  62. package/runtime/agents/aws-lambda-builder/capabilities/deploy-lambda-plan/capability.yaml +18 -0
  63. package/runtime/agents/aws-lambda-builder/capabilities/deploy-lambda-plan/decision-rules.md +6 -0
  64. package/runtime/agents/aws-lambda-builder/capabilities/deploy-lambda-plan/runner.py +33 -0
  65. package/runtime/agents/aws-lambda-builder/capabilities/deploy-lambda-plan/workflow.md +6 -0
  66. package/runtime/agents/aws-lambda-builder/capabilities/generate-lambda-project/capability.yaml +20 -0
  67. package/runtime/agents/aws-lambda-builder/capabilities/generate-lambda-project/decision-rules.md +6 -0
  68. package/runtime/agents/aws-lambda-builder/capabilities/generate-lambda-project/runner.py +39 -0
  69. package/runtime/agents/aws-lambda-builder/capabilities/generate-lambda-project/workflow.md +7 -0
  70. package/runtime/agents/aws-lambda-builder/capabilities/package-lambda/capability.yaml +22 -0
  71. package/runtime/agents/aws-lambda-builder/capabilities/package-lambda/decision-rules.md +6 -0
  72. package/runtime/agents/aws-lambda-builder/capabilities/package-lambda/runner.py +41 -0
  73. package/runtime/agents/aws-lambda-builder/capabilities/package-lambda/workflow.md +6 -0
  74. package/runtime/agents/aws-lambda-builder/capabilities/plan-lambda/capability.yaml +18 -0
  75. package/runtime/agents/aws-lambda-builder/capabilities/plan-lambda/decision-rules.md +7 -0
  76. package/runtime/agents/aws-lambda-builder/capabilities/plan-lambda/runner.py +33 -0
  77. package/runtime/agents/aws-lambda-builder/capabilities/plan-lambda/workflow.md +6 -0
  78. package/runtime/agents/aws-lambda-builder/capabilities/review-lambda-security/capability.yaml +18 -0
  79. package/runtime/agents/aws-lambda-builder/capabilities/review-lambda-security/decision-rules.md +7 -0
  80. package/runtime/agents/aws-lambda-builder/capabilities/review-lambda-security/runner.py +33 -0
  81. package/runtime/agents/aws-lambda-builder/capabilities/review-lambda-security/workflow.md +5 -0
  82. package/runtime/agents/aws-lambda-builder/infra/integrations/aws-lambda/aws_lambda_repository.py +688 -0
  83. package/runtime/agents/aws-lambda-builder/knowledge/context.md +12 -0
  84. package/runtime/agents/aws-lambda-builder/knowledge/policies.yaml +23 -0
  85. package/runtime/agents/aws-lambda-builder/knowledge/system.md +10 -0
  86. package/runtime/agents/aws-lambda-builder/templates/lambda-deploy-plan.md +3 -0
  87. package/runtime/agents/aws-lambda-builder/templates/lambda-package.md +3 -0
  88. package/runtime/agents/aws-lambda-builder/templates/lambda-plan.md +3 -0
  89. package/runtime/agents/aws-lambda-builder/templates/lambda-readme.md +3 -0
  90. package/runtime/agents/aws-lambda-builder/templates/lambda-security-review.md +3 -0
  91. package/runtime/agents/aws-lambda-builder/tests/test_runners.py +355 -0
  92. package/runtime/agents/aws-operations-operator/agent.yaml +18 -6
  93. package/runtime/agents/aws-security-governance-auditor/agent.yaml +17 -5
  94. package/runtime/agents/azure-devops-orchestrator/agent.yaml +15 -2
  95. package/runtime/agents/azure-devops-orchestrator/capabilities/read-card/capability.yaml +29 -0
  96. package/runtime/agents/bpo-analyser/agent.yaml +12 -2
  97. package/runtime/agents/bpo-analyser/knowledge/policies.yaml +2 -2
  98. package/runtime/agents/contribution-reviewer/AGENTS.md +8 -0
  99. package/runtime/agents/contribution-reviewer/README.md +8 -0
  100. package/runtime/agents/contribution-reviewer/agent.yaml +40 -0
  101. package/runtime/agents/contribution-reviewer/capabilities/plan-contribution-pr/capability.yaml +27 -0
  102. package/runtime/agents/contribution-reviewer/capabilities/plan-contribution-pr/decision-rules.md +5 -0
  103. package/runtime/agents/contribution-reviewer/capabilities/plan-contribution-pr/workflow.md +6 -0
  104. package/runtime/agents/contribution-reviewer/capabilities/review-contribution/capability.yaml +25 -0
  105. package/runtime/agents/contribution-reviewer/capabilities/review-contribution/decision-rules.md +5 -0
  106. package/runtime/agents/contribution-reviewer/capabilities/review-contribution/workflow.md +5 -0
  107. package/runtime/agents/contribution-reviewer/capabilities/validate-local-contribution/capability.yaml +26 -0
  108. package/runtime/agents/contribution-reviewer/capabilities/validate-local-contribution/decision-rules.md +5 -0
  109. package/runtime/agents/contribution-reviewer/capabilities/validate-local-contribution/workflow.md +6 -0
  110. package/runtime/agents/contribution-reviewer/infra/README.md +6 -0
  111. package/runtime/agents/contribution-reviewer/knowledge/context.md +8 -0
  112. package/runtime/agents/contribution-reviewer/knowledge/system.md +8 -0
  113. package/runtime/agents/contribution-reviewer/templates/README.md +3 -0
  114. package/runtime/agents/data-scientist-analyst/agent.yaml +16 -4
  115. package/runtime/agents/data-scientist-analyst/capabilities/generate-data-report/capability.yaml +1 -1
  116. package/runtime/agents/data-scientist-analyst/capabilities/generate-reconciliation-report/capability.yaml +1 -1
  117. package/runtime/agents/data-scientist-analyst/capabilities/run-data-pipeline/capability.yaml +1 -1
  118. package/runtime/agents/data-scientist-analyst/infra/integrations/agent-bridge/methods/analyze-sql-source.yaml +1 -1
  119. package/runtime/agents/data-scientist-analyst/knowledge/policies.yaml +4 -4
  120. package/runtime/agents/data-scientist-analyst/knowledge/system.md +1 -1
  121. package/runtime/agents/data-scientist-analyst/tests/test_runners.py +1 -1
  122. package/runtime/agents/database-change-operator/agent.yaml +12 -1
  123. package/runtime/agents/docker-container-builder/AGENTS.md +27 -0
  124. package/runtime/agents/docker-container-builder/README.md +21 -0
  125. package/runtime/agents/docker-container-builder/agent.yaml +52 -0
  126. package/runtime/agents/docker-container-builder/capabilities/analyze-containerization-target/capability.yaml +18 -0
  127. package/runtime/agents/docker-container-builder/capabilities/analyze-containerization-target/decision-rules.md +6 -0
  128. package/runtime/agents/docker-container-builder/capabilities/analyze-containerization-target/runner.py +32 -0
  129. package/runtime/agents/docker-container-builder/capabilities/analyze-containerization-target/workflow.md +6 -0
  130. package/runtime/agents/docker-container-builder/capabilities/generate-compose/capability.yaml +18 -0
  131. package/runtime/agents/docker-container-builder/capabilities/generate-compose/decision-rules.md +7 -0
  132. package/runtime/agents/docker-container-builder/capabilities/generate-compose/runner.py +32 -0
  133. package/runtime/agents/docker-container-builder/capabilities/generate-compose/workflow.md +6 -0
  134. package/runtime/agents/docker-container-builder/capabilities/generate-container-project-files/capability.yaml +20 -0
  135. package/runtime/agents/docker-container-builder/capabilities/generate-container-project-files/decision-rules.md +7 -0
  136. package/runtime/agents/docker-container-builder/capabilities/generate-container-project-files/runner.py +38 -0
  137. package/runtime/agents/docker-container-builder/capabilities/generate-container-project-files/workflow.md +7 -0
  138. package/runtime/agents/docker-container-builder/capabilities/generate-dockerfile/capability.yaml +18 -0
  139. package/runtime/agents/docker-container-builder/capabilities/generate-dockerfile/decision-rules.md +6 -0
  140. package/runtime/agents/docker-container-builder/capabilities/generate-dockerfile/runner.py +32 -0
  141. package/runtime/agents/docker-container-builder/capabilities/generate-dockerfile/workflow.md +7 -0
  142. package/runtime/agents/docker-container-builder/capabilities/plan-image-build/capability.yaml +18 -0
  143. package/runtime/agents/docker-container-builder/capabilities/plan-image-build/decision-rules.md +6 -0
  144. package/runtime/agents/docker-container-builder/capabilities/plan-image-build/runner.py +32 -0
  145. package/runtime/agents/docker-container-builder/capabilities/plan-image-build/workflow.md +6 -0
  146. package/runtime/agents/docker-container-builder/capabilities/review-docker-security/capability.yaml +21 -0
  147. package/runtime/agents/docker-container-builder/capabilities/review-docker-security/decision-rules.md +6 -0
  148. package/runtime/agents/docker-container-builder/capabilities/review-docker-security/runner.py +43 -0
  149. package/runtime/agents/docker-container-builder/capabilities/review-docker-security/workflow.md +5 -0
  150. package/runtime/agents/docker-container-builder/infra/integrations/docker-container/docker_container_repository.py +837 -0
  151. package/runtime/agents/docker-container-builder/knowledge/context.md +21 -0
  152. package/runtime/agents/docker-container-builder/knowledge/policies.yaml +13 -0
  153. package/runtime/agents/docker-container-builder/knowledge/system.md +21 -0
  154. package/runtime/agents/docker-container-builder/templates/container-plan.md +4 -0
  155. package/runtime/agents/docker-container-builder/templates/container-review.md +4 -0
  156. package/runtime/agents/docker-container-builder/templates/docker-compose.md +5 -0
  157. package/runtime/agents/docker-container-builder/templates/docker-readme.md +3 -0
  158. package/runtime/agents/docker-container-builder/templates/dockerfile.md +5 -0
  159. package/runtime/agents/docker-container-builder/tests/test_runners.py +255 -0
  160. package/runtime/agents/drawio-diagram-builder/agent.yaml +11 -2
  161. package/runtime/agents/drawio-diagram-builder/capabilities/execute-diagram-delivery/capability.yaml +1 -1
  162. package/runtime/agents/drawio-diagram-builder/capabilities/read-azure-card-context/capability.yaml +1 -1
  163. package/runtime/agents/elasticsearch-log-analyzer/agent.yaml +14 -2
  164. package/runtime/agents/elasticsearch-log-analyzer/capabilities/analyze-service-errors/capability.yaml +14 -0
  165. package/runtime/agents/excel-workbook-builder/agent.yaml +10 -0
  166. package/runtime/agents/excel-workbook-builder/capabilities/create-template/capability.yaml +1 -1
  167. package/runtime/agents/excel-workbook-builder/capabilities/create-template/workflow.md +1 -1
  168. package/runtime/agents/excel-workbook-builder/capabilities/create-template-version/capability.yaml +1 -1
  169. package/runtime/agents/excel-workbook-builder/capabilities/generate-template-input-file/capability.yaml +1 -2
  170. package/runtime/agents/excel-workbook-builder/capabilities/refine-template/capability.yaml +1 -1
  171. package/runtime/agents/excel-workbook-builder/capabilities/register-template/capability.yaml +1 -2
  172. package/runtime/agents/excel-workbook-builder/capabilities/register-template/workflow.md +1 -1
  173. package/runtime/agents/execution-loop-builder/AGENTS.md +24 -0
  174. package/runtime/agents/execution-loop-builder/README.md +19 -0
  175. package/runtime/agents/execution-loop-builder/agent.yaml +49 -0
  176. package/runtime/agents/execution-loop-builder/capabilities/generate-loop-project-files/capability.yaml +20 -0
  177. package/runtime/agents/execution-loop-builder/capabilities/generate-loop-project-files/decision-rules.md +6 -0
  178. package/runtime/agents/execution-loop-builder/capabilities/generate-loop-project-files/runner.py +38 -0
  179. package/runtime/agents/execution-loop-builder/capabilities/generate-loop-project-files/workflow.md +7 -0
  180. package/runtime/agents/execution-loop-builder/capabilities/generate-loop-runner/capability.yaml +18 -0
  181. package/runtime/agents/execution-loop-builder/capabilities/generate-loop-runner/decision-rules.md +5 -0
  182. package/runtime/agents/execution-loop-builder/capabilities/generate-loop-runner/runner.py +32 -0
  183. package/runtime/agents/execution-loop-builder/capabilities/generate-loop-runner/workflow.md +6 -0
  184. package/runtime/agents/execution-loop-builder/capabilities/plan-execution-loop/capability.yaml +18 -0
  185. package/runtime/agents/execution-loop-builder/capabilities/plan-execution-loop/decision-rules.md +6 -0
  186. package/runtime/agents/execution-loop-builder/capabilities/plan-execution-loop/runner.py +32 -0
  187. package/runtime/agents/execution-loop-builder/capabilities/plan-execution-loop/workflow.md +6 -0
  188. package/runtime/agents/execution-loop-builder/capabilities/register-loop-task/capability.yaml +19 -0
  189. package/runtime/agents/execution-loop-builder/capabilities/register-loop-task/decision-rules.md +6 -0
  190. package/runtime/agents/execution-loop-builder/capabilities/register-loop-task/runner.py +36 -0
  191. package/runtime/agents/execution-loop-builder/capabilities/register-loop-task/workflow.md +6 -0
  192. package/runtime/agents/execution-loop-builder/capabilities/review-loop-safety/capability.yaml +19 -0
  193. package/runtime/agents/execution-loop-builder/capabilities/review-loop-safety/decision-rules.md +6 -0
  194. package/runtime/agents/execution-loop-builder/capabilities/review-loop-safety/runner.py +39 -0
  195. package/runtime/agents/execution-loop-builder/capabilities/review-loop-safety/workflow.md +5 -0
  196. package/runtime/agents/execution-loop-builder/infra/integrations/execution-loop/execution_loop_repository.py +608 -0
  197. package/runtime/agents/execution-loop-builder/knowledge/context.md +26 -0
  198. package/runtime/agents/execution-loop-builder/knowledge/policies.yaml +13 -0
  199. package/runtime/agents/execution-loop-builder/knowledge/system.md +19 -0
  200. package/runtime/agents/execution-loop-builder/templates/loop-plan.md +3 -0
  201. package/runtime/agents/execution-loop-builder/templates/loop-readme.md +3 -0
  202. package/runtime/agents/execution-loop-builder/templates/loop-review.md +3 -0
  203. package/runtime/agents/execution-loop-builder/templates/loop-runner.py +2 -0
  204. package/runtime/agents/execution-loop-builder/tests/test_runners.py +274 -0
  205. package/runtime/agents/execution-reviewer/agent.yaml +6 -4
  206. package/runtime/agents/execution-reviewer/capabilities/review-agent-result/capability.yaml +1 -2
  207. package/runtime/agents/execution-reviewer/capabilities/review-final-output/capability.yaml +1 -2
  208. package/runtime/agents/execution-reviewer/capabilities/review-plan/capability.yaml +1 -2
  209. package/runtime/agents/figma-ui-ux-product-designer/agent.yaml +17 -5
  210. package/runtime/agents/figma-ui-ux-product-designer/capabilities/analyze-product-context/capability.yaml +1 -1
  211. package/runtime/agents/figma-ui-ux-product-designer/capabilities/conduct-design-interview/capability.yaml +1 -1
  212. package/runtime/agents/figma-ui-ux-product-designer/capabilities/conduct-design-review-session/capability.yaml +1 -1
  213. package/runtime/agents/figma-ui-ux-product-designer/capabilities/generate-dev-handoff/capability.yaml +1 -1
  214. package/runtime/agents/figma-ui-ux-product-designer/capabilities/generate-user-journey-diagram/capability.yaml +1 -1
  215. package/runtime/agents/figma-ui-ux-product-designer/capabilities/ingest-design-source/capability.yaml +1 -1
  216. package/runtime/agents/figma-ui-ux-product-designer/capabilities/triage-design-feedback/capability.yaml +1 -1
  217. package/runtime/agents/generic-agent-builder/AGENTS.md +20 -0
  218. package/runtime/agents/generic-agent-builder/README.md +40 -0
  219. package/runtime/agents/generic-agent-builder/agent.yaml +43 -0
  220. package/runtime/agents/generic-agent-builder/capabilities/generate-agent-instructions/capability.yaml +18 -0
  221. package/runtime/agents/generic-agent-builder/capabilities/generate-agent-instructions/decision-rules.md +5 -0
  222. package/runtime/agents/generic-agent-builder/capabilities/generate-agent-instructions/runner.py +33 -0
  223. package/runtime/agents/generic-agent-builder/capabilities/generate-agent-instructions/workflow.md +6 -0
  224. package/runtime/agents/generic-agent-builder/capabilities/generate-project-agent-files/capability.yaml +20 -0
  225. package/runtime/agents/generic-agent-builder/capabilities/generate-project-agent-files/decision-rules.md +6 -0
  226. package/runtime/agents/generic-agent-builder/capabilities/generate-project-agent-files/runner.py +39 -0
  227. package/runtime/agents/generic-agent-builder/capabilities/generate-project-agent-files/workflow.md +7 -0
  228. package/runtime/agents/generic-agent-builder/capabilities/generate-skill/capability.yaml +18 -0
  229. package/runtime/agents/generic-agent-builder/capabilities/generate-skill/decision-rules.md +5 -0
  230. package/runtime/agents/generic-agent-builder/capabilities/generate-skill/runner.py +33 -0
  231. package/runtime/agents/generic-agent-builder/capabilities/generate-skill/workflow.md +5 -0
  232. package/runtime/agents/generic-agent-builder/capabilities/plan-generic-agent/capability.yaml +18 -0
  233. package/runtime/agents/generic-agent-builder/capabilities/plan-generic-agent/decision-rules.md +6 -0
  234. package/runtime/agents/generic-agent-builder/capabilities/plan-generic-agent/runner.py +33 -0
  235. package/runtime/agents/generic-agent-builder/capabilities/plan-generic-agent/workflow.md +6 -0
  236. package/runtime/agents/generic-agent-builder/capabilities/review-generic-agent/capability.yaml +20 -0
  237. package/runtime/agents/generic-agent-builder/capabilities/review-generic-agent/decision-rules.md +6 -0
  238. package/runtime/agents/generic-agent-builder/capabilities/review-generic-agent/runner.py +40 -0
  239. package/runtime/agents/generic-agent-builder/capabilities/review-generic-agent/workflow.md +7 -0
  240. package/runtime/agents/generic-agent-builder/infra/integrations/generic-agent/generic_agent_repository.py +445 -0
  241. package/runtime/agents/generic-agent-builder/knowledge/context.md +11 -0
  242. package/runtime/agents/generic-agent-builder/knowledge/policies.yaml +12 -0
  243. package/runtime/agents/generic-agent-builder/knowledge/system.md +17 -0
  244. package/runtime/agents/generic-agent-builder/templates/generic-agent-instructions.md +17 -0
  245. package/runtime/agents/generic-agent-builder/templates/generic-review-report.md +13 -0
  246. package/runtime/agents/generic-agent-builder/templates/generic-skill.md +14 -0
  247. package/runtime/agents/generic-agent-builder/tests/test_runners.py +220 -0
  248. package/runtime/agents/github-pr-reviewer/agent.yaml +17 -5
  249. package/runtime/agents/github-pr-reviewer/capabilities/create-review-automation/capability.yaml +1 -1
  250. package/runtime/agents/github-pr-reviewer/capabilities/inspect-pr/capability.yaml +1 -1
  251. package/runtime/agents/github-pr-reviewer/capabilities/list-review-requests/capability.yaml +1 -1
  252. package/runtime/agents/github-pr-reviewer/capabilities/review-pr-diff/capability.yaml +1 -1
  253. package/runtime/agents/knowledge-author/AGENTS.md +7 -0
  254. package/runtime/agents/knowledge-author/README.md +7 -0
  255. package/runtime/agents/knowledge-author/agent.yaml +37 -0
  256. package/runtime/agents/knowledge-author/capabilities/create-knowledge-snapshot/capability.yaml +30 -0
  257. package/runtime/agents/knowledge-author/capabilities/create-knowledge-snapshot/decision-rules.md +6 -0
  258. package/runtime/agents/knowledge-author/capabilities/create-knowledge-snapshot/workflow.md +7 -0
  259. package/runtime/agents/knowledge-author/infra/.gitkeep +1 -0
  260. package/runtime/agents/knowledge-author/knowledge/context.md +4 -0
  261. package/runtime/agents/knowledge-author/knowledge/system.md +4 -0
  262. package/runtime/agents/knowledge-author/templates/.gitkeep +1 -0
  263. package/runtime/agents/knowledge-curator/AGENTS.md +7 -0
  264. package/runtime/agents/knowledge-curator/README.md +6 -0
  265. package/runtime/agents/knowledge-curator/agent.yaml +37 -0
  266. package/runtime/agents/knowledge-curator/capabilities/curate-knowledge-base/capability.yaml +29 -0
  267. package/runtime/agents/knowledge-curator/capabilities/curate-knowledge-base/decision-rules.md +6 -0
  268. package/runtime/agents/knowledge-curator/capabilities/curate-knowledge-base/workflow.md +7 -0
  269. package/runtime/agents/knowledge-curator/infra/.gitkeep +1 -0
  270. package/runtime/agents/knowledge-curator/knowledge/context.md +4 -0
  271. package/runtime/agents/knowledge-curator/knowledge/system.md +4 -0
  272. package/runtime/agents/knowledge-curator/templates/.gitkeep +1 -0
  273. package/runtime/agents/knowledge-generator/agent.yaml +13 -3
  274. package/runtime/agents/knowledge-generator/capabilities/generate-knowledge/capability.yaml +1 -1
  275. package/runtime/agents/knowledge-infra-builder/AGENTS.md +8 -0
  276. package/runtime/agents/knowledge-infra-builder/README.md +8 -0
  277. package/runtime/agents/knowledge-infra-builder/agent.yaml +38 -0
  278. package/runtime/agents/knowledge-infra-builder/capabilities/create-knowledge-base/capability.yaml +30 -0
  279. package/runtime/agents/knowledge-infra-builder/capabilities/create-knowledge-base/decision-rules.md +6 -0
  280. package/runtime/agents/knowledge-infra-builder/capabilities/create-knowledge-base/workflow.md +7 -0
  281. package/runtime/agents/knowledge-infra-builder/infra/.gitkeep +1 -0
  282. package/runtime/agents/knowledge-infra-builder/knowledge/context.md +4 -0
  283. package/runtime/agents/knowledge-infra-builder/knowledge/system.md +4 -0
  284. package/runtime/agents/knowledge-infra-builder/templates/.gitkeep +1 -0
  285. package/runtime/agents/knowledge-owner/AGENTS.md +7 -0
  286. package/runtime/agents/knowledge-owner/README.md +6 -0
  287. package/runtime/agents/knowledge-owner/agent.yaml +37 -0
  288. package/runtime/agents/knowledge-owner/capabilities/publish-knowledge-snapshot/capability.yaml +28 -0
  289. package/runtime/agents/knowledge-owner/capabilities/publish-knowledge-snapshot/decision-rules.md +6 -0
  290. package/runtime/agents/knowledge-owner/capabilities/publish-knowledge-snapshot/workflow.md +7 -0
  291. package/runtime/agents/knowledge-owner/infra/.gitkeep +1 -0
  292. package/runtime/agents/knowledge-owner/knowledge/context.md +4 -0
  293. package/runtime/agents/knowledge-owner/knowledge/system.md +4 -0
  294. package/runtime/agents/knowledge-owner/templates/.gitkeep +1 -0
  295. package/runtime/agents/knowledge-reviewer/AGENTS.md +7 -0
  296. package/runtime/agents/knowledge-reviewer/README.md +7 -0
  297. package/runtime/agents/knowledge-reviewer/agent.yaml +36 -0
  298. package/runtime/agents/knowledge-reviewer/capabilities/review-knowledge-snapshot/capability.yaml +26 -0
  299. package/runtime/agents/knowledge-reviewer/capabilities/review-knowledge-snapshot/decision-rules.md +6 -0
  300. package/runtime/agents/knowledge-reviewer/capabilities/review-knowledge-snapshot/workflow.md +7 -0
  301. package/runtime/agents/knowledge-reviewer/infra/.gitkeep +1 -0
  302. package/runtime/agents/knowledge-reviewer/knowledge/context.md +4 -0
  303. package/runtime/agents/knowledge-reviewer/knowledge/system.md +4 -0
  304. package/runtime/agents/knowledge-reviewer/templates/.gitkeep +1 -0
  305. package/runtime/agents/local-llm-operator/agent.yaml +6 -4
  306. package/runtime/agents/local-llm-operator/capabilities/delegate-operational-task/capability.yaml +1 -2
  307. package/runtime/agents/local-llm-operator/capabilities/inspect-local-models/capability.yaml +1 -2
  308. package/runtime/agents/local-llm-operator/capabilities/select-local-worker/capability.yaml +1 -2
  309. package/runtime/agents/local-memory-manager/AGENTS.md +5 -0
  310. package/runtime/agents/local-memory-manager/README.md +7 -0
  311. package/runtime/agents/local-memory-manager/agent.yaml +38 -0
  312. package/runtime/agents/local-memory-manager/capabilities/curate-local-memory/capability.yaml +19 -0
  313. package/runtime/agents/local-memory-manager/capabilities/curate-local-memory/decision-rules.md +5 -0
  314. package/runtime/agents/local-memory-manager/capabilities/curate-local-memory/workflow.md +6 -0
  315. package/runtime/agents/local-memory-manager/capabilities/inspect-local-memory/capability.yaml +19 -0
  316. package/runtime/agents/local-memory-manager/capabilities/inspect-local-memory/decision-rules.md +5 -0
  317. package/runtime/agents/local-memory-manager/capabilities/inspect-local-memory/workflow.md +5 -0
  318. package/runtime/agents/local-memory-manager/infra/.gitkeep +1 -0
  319. package/runtime/agents/local-memory-manager/knowledge/context.md +4 -0
  320. package/runtime/agents/local-memory-manager/knowledge/system.md +4 -0
  321. package/runtime/agents/local-memory-manager/templates/.gitkeep +1 -0
  322. package/runtime/agents/memory-sync-manager/AGENTS.md +7 -0
  323. package/runtime/agents/memory-sync-manager/README.md +7 -0
  324. package/runtime/agents/memory-sync-manager/agent.yaml +37 -0
  325. package/runtime/agents/memory-sync-manager/capabilities/plan-memory-backup/capability.yaml +29 -0
  326. package/runtime/agents/memory-sync-manager/capabilities/plan-memory-backup/decision-rules.md +6 -0
  327. package/runtime/agents/memory-sync-manager/capabilities/plan-memory-backup/workflow.md +7 -0
  328. package/runtime/agents/memory-sync-manager/infra/.gitkeep +1 -0
  329. package/runtime/agents/memory-sync-manager/knowledge/context.md +4 -0
  330. package/runtime/agents/memory-sync-manager/knowledge/system.md +4 -0
  331. package/runtime/agents/memory-sync-manager/templates/.gitkeep +1 -0
  332. package/runtime/agents/n1-support-agent/agent.yaml +40 -1
  333. package/runtime/agents/n2-support-agent/agent.yaml +41 -2
  334. package/runtime/agents/n2-support-agent/knowledge/policies.yaml +2 -2
  335. package/runtime/agents/notification-operator/AGENTS.md +11 -0
  336. package/runtime/agents/notification-operator/README.md +15 -0
  337. package/runtime/agents/notification-operator/agent.yaml +43 -0
  338. package/runtime/agents/notification-operator/capabilities/configure-notification-channel/capability.yaml +19 -0
  339. package/runtime/agents/notification-operator/capabilities/configure-notification-channel/decision-rules.md +6 -0
  340. package/runtime/agents/notification-operator/capabilities/configure-notification-channel/runner.py +33 -0
  341. package/runtime/agents/notification-operator/capabilities/configure-notification-channel/workflow.md +6 -0
  342. package/runtime/agents/notification-operator/capabilities/format-task-completion-notification/capability.yaml +25 -0
  343. package/runtime/agents/notification-operator/capabilities/format-task-completion-notification/decision-rules.md +7 -0
  344. package/runtime/agents/notification-operator/capabilities/format-task-completion-notification/runner.py +49 -0
  345. package/runtime/agents/notification-operator/capabilities/format-task-completion-notification/workflow.md +6 -0
  346. package/runtime/agents/notification-operator/capabilities/send-task-completion-notification/capability.yaml +27 -0
  347. package/runtime/agents/notification-operator/capabilities/send-task-completion-notification/decision-rules.md +6 -0
  348. package/runtime/agents/notification-operator/capabilities/send-task-completion-notification/runner.py +68 -0
  349. package/runtime/agents/notification-operator/capabilities/send-task-completion-notification/workflow.md +7 -0
  350. package/runtime/agents/notification-operator/infra/README.md +6 -0
  351. package/runtime/agents/notification-operator/knowledge/context.md +10 -0
  352. package/runtime/agents/notification-operator/knowledge/policies.yaml +9 -0
  353. package/runtime/agents/notification-operator/knowledge/system.md +7 -0
  354. package/runtime/agents/notification-operator/templates/README.md +6 -0
  355. package/runtime/agents/notification-operator/tests/test_runners.py +108 -0
  356. package/runtime/agents/playwright-automation-builder/AGENTS.md +23 -0
  357. package/runtime/agents/playwright-automation-builder/README.md +43 -0
  358. package/runtime/agents/playwright-automation-builder/agent.yaml +48 -0
  359. package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-project-files/capability.yaml +20 -0
  360. package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-project-files/decision-rules.md +6 -0
  361. package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-project-files/runner.py +38 -0
  362. package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-project-files/workflow.md +6 -0
  363. package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-script/capability.yaml +18 -0
  364. package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-script/decision-rules.md +6 -0
  365. package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-script/runner.py +32 -0
  366. package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-script/workflow.md +6 -0
  367. package/runtime/agents/playwright-automation-builder/capabilities/plan-playwright-automation/capability.yaml +18 -0
  368. package/runtime/agents/playwright-automation-builder/capabilities/plan-playwright-automation/decision-rules.md +6 -0
  369. package/runtime/agents/playwright-automation-builder/capabilities/plan-playwright-automation/runner.py +32 -0
  370. package/runtime/agents/playwright-automation-builder/capabilities/plan-playwright-automation/workflow.md +6 -0
  371. package/runtime/agents/playwright-automation-builder/capabilities/review-playwright-artifacts/capability.yaml +19 -0
  372. package/runtime/agents/playwright-automation-builder/capabilities/review-playwright-artifacts/decision-rules.md +6 -0
  373. package/runtime/agents/playwright-automation-builder/capabilities/review-playwright-artifacts/runner.py +33 -0
  374. package/runtime/agents/playwright-automation-builder/capabilities/review-playwright-artifacts/workflow.md +6 -0
  375. package/runtime/agents/playwright-automation-builder/capabilities/run-playwright-check/capability.yaml +22 -0
  376. package/runtime/agents/playwright-automation-builder/capabilities/run-playwright-check/decision-rules.md +6 -0
  377. package/runtime/agents/playwright-automation-builder/capabilities/run-playwright-check/runner.py +40 -0
  378. package/runtime/agents/playwright-automation-builder/capabilities/run-playwright-check/workflow.md +6 -0
  379. package/runtime/agents/playwright-automation-builder/capabilities/wrap-playwright-as-capability/capability.yaml +22 -0
  380. package/runtime/agents/playwright-automation-builder/capabilities/wrap-playwright-as-capability/decision-rules.md +6 -0
  381. package/runtime/agents/playwright-automation-builder/capabilities/wrap-playwright-as-capability/runner.py +42 -0
  382. package/runtime/agents/playwright-automation-builder/capabilities/wrap-playwright-as-capability/workflow.md +6 -0
  383. package/runtime/agents/playwright-automation-builder/infra/integrations/playwright-automation/playwright_automation_repository.py +865 -0
  384. package/runtime/agents/playwright-automation-builder/knowledge/context.md +19 -0
  385. package/runtime/agents/playwright-automation-builder/knowledge/policies.yaml +25 -0
  386. package/runtime/agents/playwright-automation-builder/knowledge/system.md +19 -0
  387. package/runtime/agents/playwright-automation-builder/templates/capability-wrapper.md +4 -0
  388. package/runtime/agents/playwright-automation-builder/templates/playwright-automation.py +12 -0
  389. package/runtime/agents/playwright-automation-builder/templates/playwright-readme.md +13 -0
  390. package/runtime/agents/playwright-automation-builder/templates/playwright-review-report.md +9 -0
  391. package/runtime/agents/playwright-automation-builder/templates/playwright-test.py +2 -0
  392. package/runtime/agents/playwright-automation-builder/tests/test_runners.py +261 -0
  393. package/runtime/agents/postgres-data-analyzer/agent.yaml +13 -2
  394. package/runtime/agents/presentation-deck-builder/agent.yaml +14 -3
  395. package/runtime/agents/presentation-deck-builder/capabilities/create-template/capability.yaml +1 -1
  396. package/runtime/agents/presentation-deck-builder/capabilities/create-template-version/capability.yaml +1 -1
  397. package/runtime/agents/presentation-deck-builder/capabilities/generate-template-input-file/capability.yaml +1 -1
  398. package/runtime/agents/presentation-deck-builder/capabilities/refine-template/capability.yaml +1 -1
  399. package/runtime/agents/presentation-deck-builder/capabilities/register-template/capability.yaml +1 -1
  400. package/runtime/agents/presentation-deck-builder/knowledge/prompts/create-template.md +1 -1
  401. package/runtime/agents/presentation-deck-builder/knowledge/prompts/generate-template-input-file.md +1 -1
  402. package/runtime/agents/provider-configurator/agent.yaml +6 -4
  403. package/runtime/agents/provider-configurator/capabilities/collect-provider-credentials/capability.yaml +1 -2
  404. package/runtime/agents/provider-configurator/capabilities/configure-provider-source/capability.yaml +1 -2
  405. package/runtime/agents/provider-configurator/capabilities/validate-provider-readiness/capability.yaml +1 -2
  406. package/runtime/agents/pyautogui-automation-builder/AGENTS.md +32 -0
  407. package/runtime/agents/pyautogui-automation-builder/README.md +44 -0
  408. package/runtime/agents/pyautogui-automation-builder/agent.yaml +45 -0
  409. package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-project-files/capability.yaml +20 -0
  410. package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-project-files/decision-rules.md +6 -0
  411. package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-project-files/runner.py +39 -0
  412. package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-project-files/workflow.md +7 -0
  413. package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-script/capability.yaml +18 -0
  414. package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-script/decision-rules.md +7 -0
  415. package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-script/runner.py +33 -0
  416. package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-script/workflow.md +7 -0
  417. package/runtime/agents/pyautogui-automation-builder/capabilities/plan-desktop-automation/capability.yaml +18 -0
  418. package/runtime/agents/pyautogui-automation-builder/capabilities/plan-desktop-automation/decision-rules.md +8 -0
  419. package/runtime/agents/pyautogui-automation-builder/capabilities/plan-desktop-automation/runner.py +33 -0
  420. package/runtime/agents/pyautogui-automation-builder/capabilities/plan-desktop-automation/workflow.md +9 -0
  421. package/runtime/agents/pyautogui-automation-builder/capabilities/review-pyautogui-script/capability.yaml +20 -0
  422. package/runtime/agents/pyautogui-automation-builder/capabilities/review-pyautogui-script/decision-rules.md +8 -0
  423. package/runtime/agents/pyautogui-automation-builder/capabilities/review-pyautogui-script/runner.py +43 -0
  424. package/runtime/agents/pyautogui-automation-builder/capabilities/review-pyautogui-script/workflow.md +7 -0
  425. package/runtime/agents/pyautogui-automation-builder/capabilities/wrap-pyautogui-as-capability/capability.yaml +22 -0
  426. package/runtime/agents/pyautogui-automation-builder/capabilities/wrap-pyautogui-as-capability/decision-rules.md +6 -0
  427. package/runtime/agents/pyautogui-automation-builder/capabilities/wrap-pyautogui-as-capability/runner.py +43 -0
  428. package/runtime/agents/pyautogui-automation-builder/capabilities/wrap-pyautogui-as-capability/workflow.md +7 -0
  429. package/runtime/agents/pyautogui-automation-builder/infra/integrations/pyautogui-automation/pyautogui_automation_repository.py +856 -0
  430. package/runtime/agents/pyautogui-automation-builder/knowledge/context.md +17 -0
  431. package/runtime/agents/pyautogui-automation-builder/knowledge/policies.yaml +24 -0
  432. package/runtime/agents/pyautogui-automation-builder/knowledge/system.md +13 -0
  433. package/runtime/agents/pyautogui-automation-builder/templates/capability-wrapper.md +3 -0
  434. package/runtime/agents/pyautogui-automation-builder/templates/pyautogui-automation.py +12 -0
  435. package/runtime/agents/pyautogui-automation-builder/templates/pyautogui-readme.md +3 -0
  436. package/runtime/agents/pyautogui-automation-builder/templates/pyautogui-review-report.md +3 -0
  437. package/runtime/agents/pyautogui-automation-builder/templates/pyautogui-test.py +2 -0
  438. package/runtime/agents/pyautogui-automation-builder/tests/test_runners.py +376 -0
  439. package/runtime/agents/python-automation-builder/AGENTS.md +25 -0
  440. package/runtime/agents/python-automation-builder/README.md +43 -0
  441. package/runtime/agents/python-automation-builder/agent.yaml +45 -0
  442. package/runtime/agents/python-automation-builder/capabilities/generate-automation-project-files/capability.yaml +20 -0
  443. package/runtime/agents/python-automation-builder/capabilities/generate-automation-project-files/decision-rules.md +6 -0
  444. package/runtime/agents/python-automation-builder/capabilities/generate-automation-project-files/runner.py +39 -0
  445. package/runtime/agents/python-automation-builder/capabilities/generate-automation-project-files/workflow.md +7 -0
  446. package/runtime/agents/python-automation-builder/capabilities/generate-python-automation/capability.yaml +18 -0
  447. package/runtime/agents/python-automation-builder/capabilities/generate-python-automation/decision-rules.md +5 -0
  448. package/runtime/agents/python-automation-builder/capabilities/generate-python-automation/runner.py +33 -0
  449. package/runtime/agents/python-automation-builder/capabilities/generate-python-automation/workflow.md +5 -0
  450. package/runtime/agents/python-automation-builder/capabilities/plan-python-automation/capability.yaml +18 -0
  451. package/runtime/agents/python-automation-builder/capabilities/plan-python-automation/decision-rules.md +6 -0
  452. package/runtime/agents/python-automation-builder/capabilities/plan-python-automation/runner.py +33 -0
  453. package/runtime/agents/python-automation-builder/capabilities/plan-python-automation/workflow.md +6 -0
  454. package/runtime/agents/python-automation-builder/capabilities/review-python-automation/capability.yaml +20 -0
  455. package/runtime/agents/python-automation-builder/capabilities/review-python-automation/decision-rules.md +6 -0
  456. package/runtime/agents/python-automation-builder/capabilities/review-python-automation/runner.py +43 -0
  457. package/runtime/agents/python-automation-builder/capabilities/review-python-automation/workflow.md +5 -0
  458. package/runtime/agents/python-automation-builder/capabilities/wrap-automation-as-capability/capability.yaml +22 -0
  459. package/runtime/agents/python-automation-builder/capabilities/wrap-automation-as-capability/decision-rules.md +6 -0
  460. package/runtime/agents/python-automation-builder/capabilities/wrap-automation-as-capability/runner.py +43 -0
  461. package/runtime/agents/python-automation-builder/capabilities/wrap-automation-as-capability/workflow.md +6 -0
  462. package/runtime/agents/python-automation-builder/infra/integrations/python-automation/python_automation_repository.py +717 -0
  463. package/runtime/agents/python-automation-builder/knowledge/context.md +15 -0
  464. package/runtime/agents/python-automation-builder/knowledge/policies.yaml +12 -0
  465. package/runtime/agents/python-automation-builder/knowledge/system.md +19 -0
  466. package/runtime/agents/python-automation-builder/templates/automation-readme.md +13 -0
  467. package/runtime/agents/python-automation-builder/templates/automation-review-report.md +13 -0
  468. package/runtime/agents/python-automation-builder/templates/automation-test.py +9 -0
  469. package/runtime/agents/python-automation-builder/templates/automation.py +19 -0
  470. package/runtime/agents/python-automation-builder/templates/capability-wrapper.md +4 -0
  471. package/runtime/agents/python-automation-builder/tests/test_runners.py +292 -0
  472. package/runtime/agents/selenium-automation-builder/AGENTS.md +27 -0
  473. package/runtime/agents/selenium-automation-builder/README.md +40 -0
  474. package/runtime/agents/selenium-automation-builder/agent.yaml +45 -0
  475. package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-project-files/capability.yaml +20 -0
  476. package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-project-files/decision-rules.md +6 -0
  477. package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-project-files/runner.py +39 -0
  478. package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-project-files/workflow.md +7 -0
  479. package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-script/capability.yaml +18 -0
  480. package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-script/decision-rules.md +6 -0
  481. package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-script/runner.py +33 -0
  482. package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-script/workflow.md +6 -0
  483. package/runtime/agents/selenium-automation-builder/capabilities/plan-selenium-automation/capability.yaml +18 -0
  484. package/runtime/agents/selenium-automation-builder/capabilities/plan-selenium-automation/decision-rules.md +6 -0
  485. package/runtime/agents/selenium-automation-builder/capabilities/plan-selenium-automation/runner.py +33 -0
  486. package/runtime/agents/selenium-automation-builder/capabilities/plan-selenium-automation/workflow.md +6 -0
  487. package/runtime/agents/selenium-automation-builder/capabilities/review-selenium-script/capability.yaml +20 -0
  488. package/runtime/agents/selenium-automation-builder/capabilities/review-selenium-script/decision-rules.md +6 -0
  489. package/runtime/agents/selenium-automation-builder/capabilities/review-selenium-script/runner.py +40 -0
  490. package/runtime/agents/selenium-automation-builder/capabilities/review-selenium-script/workflow.md +6 -0
  491. package/runtime/agents/selenium-automation-builder/capabilities/wrap-selenium-as-capability/capability.yaml +22 -0
  492. package/runtime/agents/selenium-automation-builder/capabilities/wrap-selenium-as-capability/decision-rules.md +6 -0
  493. package/runtime/agents/selenium-automation-builder/capabilities/wrap-selenium-as-capability/runner.py +43 -0
  494. package/runtime/agents/selenium-automation-builder/capabilities/wrap-selenium-as-capability/workflow.md +6 -0
  495. package/runtime/agents/selenium-automation-builder/infra/integrations/selenium-automation/selenium_automation_repository.py +793 -0
  496. package/runtime/agents/selenium-automation-builder/knowledge/context.md +15 -0
  497. package/runtime/agents/selenium-automation-builder/knowledge/policies.yaml +17 -0
  498. package/runtime/agents/selenium-automation-builder/knowledge/system.md +18 -0
  499. package/runtime/agents/selenium-automation-builder/templates/capability-wrapper.md +4 -0
  500. package/runtime/agents/selenium-automation-builder/templates/selenium-automation.py +20 -0
  501. package/runtime/agents/selenium-automation-builder/templates/selenium-readme.md +13 -0
  502. package/runtime/agents/selenium-automation-builder/templates/selenium-review-report.md +13 -0
  503. package/runtime/agents/selenium-automation-builder/templates/selenium-test.py +9 -0
  504. package/runtime/agents/selenium-automation-builder/tests/test_runners.py +282 -0
  505. package/runtime/agents/shared-memory-curator/AGENTS.md +5 -0
  506. package/runtime/agents/shared-memory-curator/README.md +6 -0
  507. package/runtime/agents/shared-memory-curator/agent.yaml +38 -0
  508. package/runtime/agents/shared-memory-curator/capabilities/create-shared-memory/capability.yaml +19 -0
  509. package/runtime/agents/shared-memory-curator/capabilities/create-shared-memory/decision-rules.md +5 -0
  510. package/runtime/agents/shared-memory-curator/capabilities/create-shared-memory/workflow.md +5 -0
  511. package/runtime/agents/shared-memory-curator/capabilities/publish-shared-submission/capability.yaml +19 -0
  512. package/runtime/agents/shared-memory-curator/capabilities/publish-shared-submission/decision-rules.md +5 -0
  513. package/runtime/agents/shared-memory-curator/capabilities/publish-shared-submission/workflow.md +5 -0
  514. package/runtime/agents/shared-memory-curator/capabilities/review-shared-submission/capability.yaml +19 -0
  515. package/runtime/agents/shared-memory-curator/capabilities/review-shared-submission/decision-rules.md +5 -0
  516. package/runtime/agents/shared-memory-curator/capabilities/review-shared-submission/workflow.md +5 -0
  517. package/runtime/agents/shared-memory-curator/infra/.gitkeep +1 -0
  518. package/runtime/agents/shared-memory-curator/knowledge/context.md +5 -0
  519. package/runtime/agents/shared-memory-curator/knowledge/system.md +4 -0
  520. package/runtime/agents/shared-memory-curator/templates/.gitkeep +1 -0
  521. package/runtime/agents/software-specification-analyst/agent.yaml +17 -4
  522. package/runtime/agents/software-specification-analyst/capabilities/analyze-multiple-projects/capability.yaml +1 -1
  523. package/runtime/agents/software-specification-analyst/capabilities/analyze-project-context/capability.yaml +1 -1
  524. package/runtime/agents/software-specification-analyst/capabilities/conduct-requirements-interview/capability.yaml +1 -1
  525. package/runtime/agents/software-specification-analyst/capabilities/create-complete-spec/capability.yaml +1 -1
  526. package/runtime/agents/software-specification-analyst/capabilities/create-final-spec-from-analysis/capability.yaml +1 -1
  527. package/runtime/agents/software-specification-analyst/capabilities/create-functional-spec/capability.yaml +11 -0
  528. package/runtime/agents/software-specification-analyst/capabilities/create-technical-spec/capability.yaml +12 -0
  529. package/runtime/agents/software-specification-analyst/capabilities/refine-analysis-with-feedback/capability.yaml +1 -1
  530. package/runtime/agents/software-specification-analyst/capabilities/write-user-stories/capability.yaml +12 -0
  531. package/runtime/agents/sqlserver-change-operator/agent.yaml +12 -1
  532. package/runtime/agents/sqlserver-data-analyzer/agent.yaml +13 -2
  533. package/runtime/agents/supabase-project-analyst/AGENTS.md +29 -0
  534. package/runtime/agents/supabase-project-analyst/README.md +23 -0
  535. package/runtime/agents/supabase-project-analyst/agent.yaml +53 -0
  536. package/runtime/agents/supabase-project-analyst/capabilities/audit-auth-security/capability.yaml +18 -0
  537. package/runtime/agents/supabase-project-analyst/capabilities/audit-auth-security/decision-rules.md +5 -0
  538. package/runtime/agents/supabase-project-analyst/capabilities/audit-auth-security/runner.py +32 -0
  539. package/runtime/agents/supabase-project-analyst/capabilities/audit-auth-security/workflow.md +6 -0
  540. package/runtime/agents/supabase-project-analyst/capabilities/audit-rls-policies/capability.yaml +18 -0
  541. package/runtime/agents/supabase-project-analyst/capabilities/audit-rls-policies/decision-rules.md +6 -0
  542. package/runtime/agents/supabase-project-analyst/capabilities/audit-rls-policies/runner.py +32 -0
  543. package/runtime/agents/supabase-project-analyst/capabilities/audit-rls-policies/workflow.md +7 -0
  544. package/runtime/agents/supabase-project-analyst/capabilities/audit-storage-policies/capability.yaml +18 -0
  545. package/runtime/agents/supabase-project-analyst/capabilities/audit-storage-policies/decision-rules.md +5 -0
  546. package/runtime/agents/supabase-project-analyst/capabilities/audit-storage-policies/runner.py +32 -0
  547. package/runtime/agents/supabase-project-analyst/capabilities/audit-storage-policies/workflow.md +6 -0
  548. package/runtime/agents/supabase-project-analyst/capabilities/generate-supabase-report/capability.yaml +18 -0
  549. package/runtime/agents/supabase-project-analyst/capabilities/generate-supabase-report/decision-rules.md +6 -0
  550. package/runtime/agents/supabase-project-analyst/capabilities/generate-supabase-report/runner.py +32 -0
  551. package/runtime/agents/supabase-project-analyst/capabilities/generate-supabase-report/workflow.md +6 -0
  552. package/runtime/agents/supabase-project-analyst/capabilities/inspect-supabase-project/capability.yaml +19 -0
  553. package/runtime/agents/supabase-project-analyst/capabilities/inspect-supabase-project/decision-rules.md +6 -0
  554. package/runtime/agents/supabase-project-analyst/capabilities/inspect-supabase-project/runner.py +36 -0
  555. package/runtime/agents/supabase-project-analyst/capabilities/inspect-supabase-project/workflow.md +7 -0
  556. package/runtime/agents/supabase-project-analyst/capabilities/plan-supabase-fix/capability.yaml +18 -0
  557. package/runtime/agents/supabase-project-analyst/capabilities/plan-supabase-fix/decision-rules.md +6 -0
  558. package/runtime/agents/supabase-project-analyst/capabilities/plan-supabase-fix/runner.py +32 -0
  559. package/runtime/agents/supabase-project-analyst/capabilities/plan-supabase-fix/workflow.md +6 -0
  560. package/runtime/agents/supabase-project-analyst/capabilities/review-migrations/capability.yaml +18 -0
  561. package/runtime/agents/supabase-project-analyst/capabilities/review-migrations/decision-rules.md +6 -0
  562. package/runtime/agents/supabase-project-analyst/capabilities/review-migrations/runner.py +32 -0
  563. package/runtime/agents/supabase-project-analyst/capabilities/review-migrations/workflow.md +5 -0
  564. package/runtime/agents/supabase-project-analyst/infra/integrations/supabase-project/supabase_project_repository.py +589 -0
  565. package/runtime/agents/supabase-project-analyst/knowledge/context.md +11 -0
  566. package/runtime/agents/supabase-project-analyst/knowledge/policies.yaml +24 -0
  567. package/runtime/agents/supabase-project-analyst/knowledge/system.md +10 -0
  568. package/runtime/agents/supabase-project-analyst/templates/supabase-audit.md +3 -0
  569. package/runtime/agents/supabase-project-analyst/templates/supabase-fix-plan.md +3 -0
  570. package/runtime/agents/supabase-project-analyst/templates/supabase-inspection.md +3 -0
  571. package/runtime/agents/supabase-project-analyst/templates/supabase-report.md +3 -0
  572. package/runtime/agents/supabase-project-analyst/tests/test_runners.py +239 -0
  573. package/runtime/agents/task-orchestrator/agent.yaml +25 -3
  574. package/runtime/agents/task-orchestrator/capabilities/plan-task/capability.yaml +1 -2
  575. package/runtime/agents/task-orchestrator/capabilities/select-specialists/capability.yaml +1 -2
  576. package/runtime/agents/technical-integration-analyst/agent.yaml +15 -2
  577. package/runtime/agents/topdesk-orchestrator/agent.yaml +10 -2
  578. package/runtime/cli/README.md +35 -4
  579. package/runtime/cli/aikit/__init__.py +1 -1
  580. package/runtime/cli/aikit/acceptance.py +166 -0
  581. package/runtime/cli/aikit/agent_executor.py +26 -3
  582. package/runtime/cli/aikit/agent_registry.py +247 -6
  583. package/runtime/cli/aikit/agentic_commands.py +158 -0
  584. package/runtime/cli/aikit/app_home.py +1 -0
  585. package/runtime/cli/aikit/architecture.py +84 -0
  586. package/runtime/cli/aikit/audit.py +187 -8
  587. package/runtime/cli/aikit/autonomy.py +237 -0
  588. package/runtime/cli/aikit/capability_runtime.py +522 -0
  589. package/runtime/cli/aikit/catalog.py +516 -0
  590. package/runtime/cli/aikit/cli_dispatch.py +1554 -0
  591. package/runtime/cli/aikit/cli_parser.py +547 -0
  592. package/runtime/cli/aikit/collaboration.py +359 -0
  593. package/runtime/cli/aikit/configuration_orchestrator.py +52 -26
  594. package/runtime/cli/aikit/contribution.py +235 -0
  595. package/runtime/cli/aikit/core/__init__.py +1 -0
  596. package/runtime/cli/aikit/core/capability_contract.py +112 -0
  597. package/runtime/cli/aikit/core/requests.py +69 -0
  598. package/runtime/cli/aikit/core/runtime.py +64 -0
  599. package/runtime/cli/aikit/diagnostics.py +8 -2
  600. package/runtime/cli/aikit/doctor_runtime.py +164 -0
  601. package/runtime/cli/aikit/errors.py +7 -0
  602. package/runtime/cli/aikit/eval.py +504 -0
  603. package/runtime/cli/aikit/execution_reviewer.py +21 -0
  604. package/runtime/cli/aikit/extensions.py +140 -0
  605. package/runtime/cli/aikit/fallback.py +1 -0
  606. package/runtime/cli/aikit/github_pr.py +23 -0
  607. package/runtime/cli/aikit/guardrails.py +25 -10
  608. package/runtime/cli/aikit/human_output.py +1332 -0
  609. package/runtime/cli/aikit/impact_map.py +294 -0
  610. package/runtime/cli/aikit/interactive_wizard.py +227 -0
  611. package/runtime/cli/aikit/knowledge_base.py +1067 -0
  612. package/runtime/cli/aikit/llm.py +12 -4
  613. package/runtime/cli/aikit/local_artifacts.py +444 -0
  614. package/runtime/cli/aikit/local_llm.py +161 -0
  615. package/runtime/cli/aikit/local_llm_operator.py +35 -1
  616. package/runtime/cli/aikit/main.py +23 -2833
  617. package/runtime/cli/aikit/mcp_manifest.py +1027 -0
  618. package/runtime/cli/aikit/mcp_server.py +132 -0
  619. package/runtime/cli/aikit/mcp_tools.py +900 -0
  620. package/runtime/cli/aikit/memory.py +405 -0
  621. package/runtime/cli/aikit/mini_brain.py +246 -0
  622. package/runtime/cli/aikit/model_router.py +182 -18
  623. package/runtime/cli/aikit/module_controller.py +335 -0
  624. package/runtime/cli/aikit/natural_prompt_runtime.py +662 -0
  625. package/runtime/cli/aikit/notifications.py +716 -2
  626. package/runtime/cli/aikit/ollama.py +64 -14
  627. package/runtime/cli/aikit/onboarding.py +551 -0
  628. package/runtime/cli/aikit/orchestrator.py +809 -119
  629. package/runtime/cli/aikit/output.py +130 -2
  630. package/runtime/cli/aikit/permissions.py +14 -4
  631. package/runtime/cli/aikit/prompt_injection.py +68 -0
  632. package/runtime/cli/aikit/review_gate.py +38 -6
  633. package/runtime/cli/aikit/roadmap.py +195 -0
  634. package/runtime/cli/aikit/roadmap_cli.py +70 -0
  635. package/runtime/cli/aikit/router.py +41 -12
  636. package/runtime/cli/aikit/router_explain.py +152 -0
  637. package/runtime/cli/aikit/runtime_paths.py +11 -0
  638. package/runtime/cli/aikit/secrets.py +114 -0
  639. package/runtime/cli/aikit/sessions.py +88 -2
  640. package/runtime/cli/aikit/setup_wizard_payload.py +35 -0
  641. package/runtime/cli/aikit/shared_memory.py +415 -0
  642. package/runtime/cli/aikit/sources.py +298 -50
  643. package/runtime/cli/aikit/specialist_readiness.py +152 -0
  644. package/runtime/cli/aikit/tasks.py +553 -22
  645. package/runtime/cli/aikit/team.py +380 -0
  646. package/runtime/cli/aikit/toolchain.py +7 -2
  647. package/runtime/cli/aikit/wizard_state.py +15 -1
  648. package/runtime/cli/aikit/workflows.py +216 -0
  649. package/runtime/cli/aikit/write_policy.py +108 -0
  650. package/runtime/plugins/claude-code-ai-devkit/README.md +17 -0
  651. package/runtime/plugins/claude-code-ai-devkit/agents/README.md +29 -2
  652. package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-db-analyst.md +44 -0
  653. package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-execution-reviewer.md +38 -0
  654. package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-pr-reviewer.md +42 -0
  655. package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-repo-explorer.md +40 -0
  656. package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-support-triage.md +43 -0
  657. package/runtime/plugins/claude-code-ai-devkit/plugin.json +1 -1
  658. package/runtime/plugins/claude-code-ai-devkit/skills/ai-devkit-router/SKILL.md +16 -0
  659. package/runtime/plugins/claude-skill-ai-devkit/ai-devkit/SKILL.md +1 -0
  660. package/runtime/plugins/claude-skill-ai-devkit/ai-devkit/references/subagents.md +21 -0
  661. package/runtime/plugins/claude-skill-ai-devkit/plugin.json +1 -1
  662. package/runtime/providers/azure-devops.yaml +9 -0
  663. package/runtime/providers/github.yaml +4 -0
  664. package/runtime/providers/knowledge-github.yaml +40 -0
  665. package/runtime/providers/knowledge-google-drive.yaml +32 -0
  666. package/runtime/providers/knowledge-local.yaml +26 -0
  667. package/runtime/providers/knowledge-notion.yaml +32 -0
  668. package/runtime/providers/knowledge-obsidian.yaml +24 -0
  669. package/runtime/providers/knowledge-onedrive.yaml +36 -0
  670. package/runtime/providers/knowledge-s3.yaml +45 -0
  671. package/runtime/providers/knowledge-sharepoint.yaml +39 -0
  672. package/runtime/providers/knowledge-supabase.yaml +43 -0
  673. package/runtime/providers/knowledge-vector.yaml +39 -0
  674. package/runtime/providers/local-notification.yaml +5 -2
  675. package/runtime/providers/local-scheduler.yaml +1 -1
  676. package/runtime/providers/supabase.yaml +46 -0
  677. package/runtime/requirements.txt +6 -0
  678. package/runtime/scripts/docker-cli-qa.sh +453 -0
  679. package/runtime/scripts/release-catalog-snapshot.json +594 -0
  680. package/runtime/scripts/release-gate.py +189 -8
  681. package/runtime/scripts/validate-repo.py +312 -0
  682. package/runtime/tooling/toolchain.yaml +92 -0
  683. package/runtime/vendor/skills/napkin/napkin.md +32 -12
  684. package/runtime/workflows/azure-card-analysis/README.md +3 -0
  685. package/runtime/workflows/azure-card-analysis/workflow.yaml +30 -0
  686. package/runtime/workflows/daily-pr-review/README.md +3 -0
  687. package/runtime/workflows/daily-pr-review/workflow.yaml +31 -0
  688. package/runtime/workflows/incident-analysis/README.md +3 -0
  689. package/runtime/workflows/incident-analysis/workflow.yaml +33 -0
  690. package/runtime/workflows/release-prep/README.md +3 -0
  691. package/runtime/workflows/release-prep/workflow.yaml +30 -0
@@ -0,0 +1,1332 @@
1
+ """Human-readable rendering for Agent DevKit CLI payloads."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import json
6
+ from typing import Any
7
+
8
+ from cli.aikit.calendar import calendar_summary
9
+ from cli.aikit.github_pr import summarize_pr_list
10
+
11
+
12
+ def print_human(result: dict[str, Any]) -> None:
13
+ kind = result["kind"]
14
+ if kind == "version":
15
+ print(f"{result.get('program', 'aikit')} {result['version']}")
16
+ elif kind == "agents":
17
+ print_agents(result["items"])
18
+ elif kind == "capabilities":
19
+ print_capabilities(result["agent"], result["items"])
20
+ elif kind == "capability":
21
+ print_capability(result)
22
+ elif kind == "run":
23
+ print_run(result)
24
+ elif kind == "doctor":
25
+ print_doctor(result)
26
+ elif kind == "commands":
27
+ print_command_modes(result)
28
+ elif kind in {"onboarding", "onboarding-plan"}:
29
+ print_onboarding(result)
30
+ elif kind == "architecture":
31
+ print_architecture(result)
32
+ elif kind == "roadmap":
33
+ print_roadmap(result)
34
+ elif kind in {"catalog", "catalog-item", "catalog-index"}:
35
+ print_catalog(result)
36
+ elif kind == "agentic-plan":
37
+ print_agentic_plan(result)
38
+ elif kind == "route-explain":
39
+ print_route_explain(result)
40
+ elif kind in {"eval-suites", "eval-run", "eval-report"}:
41
+ print_eval(result)
42
+ elif kind in {"secrets-doctor", "secret-backends", "secret-references", "secret-reference", "secret-reference-remove"}:
43
+ print_secrets(result)
44
+ elif kind in {"local-extensions", "local-extension", "local-extension-remove", "local-extension-validation"}:
45
+ print_local_extensions(result)
46
+ elif kind in {
47
+ "local-skills",
48
+ "local-skill",
49
+ "local-scripts",
50
+ "local-script",
51
+ "local-script-run",
52
+ "local-agents",
53
+ "local-agent",
54
+ "local-agent-validation",
55
+ "local-automations",
56
+ "local-automation",
57
+ "local-automation-validation",
58
+ }:
59
+ print_local_artifacts(result)
60
+ elif kind in {"workflows", "workflow", "workflow-install", "workflow-run"}:
61
+ print_workflows(result)
62
+ elif kind in {"team", "team-doctor", "team-onboarding", "team-profiles", "team-profile", "team-profile-export", "team-profile-import"}:
63
+ print_team(result)
64
+ elif kind in {"knowledge", "knowledge-doctor", "knowledge-search", "knowledge-index", "knowledge-snapshot", "knowledge-review", "knowledge-publish", "knowledge-base", "knowledge-base-tokens", "knowledge-base-token"}:
65
+ print_knowledge(result)
66
+ elif kind in {"contributions", "contribution-checklist", "contribution-validation", "contribution-prepare", "contribution-review", "contribution-pr"}:
67
+ print_contribution(result)
68
+ elif kind == "agent":
69
+ print_agent_response(result)
70
+ elif kind == "llm-backends":
71
+ print_llm_backends(result)
72
+ elif kind == "llm-doctor":
73
+ print_llm_doctor(result)
74
+ elif kind == "llm-configure":
75
+ print_llm_configure(result)
76
+ elif kind == "llm-default":
77
+ print_llm_default(result)
78
+ elif kind == "llm-preference":
79
+ print_llm_preference(result)
80
+ elif kind == "providers":
81
+ print_providers(result)
82
+ elif kind == "provider-status":
83
+ print_provider_status(result)
84
+ elif kind == "provider-configure":
85
+ print_provider_configure(result)
86
+ elif kind == "provider-unset":
87
+ print_provider_unset(result)
88
+ elif kind == "credential-resolution":
89
+ print_credential_resolution(result)
90
+ elif kind == "credential-backends":
91
+ print_credential_backends(result)
92
+ elif kind == "sources":
93
+ print_sources(result)
94
+ elif kind == "source-status":
95
+ print_source_status(result)
96
+ elif kind == "source-configure":
97
+ print_source_configure(result)
98
+ elif kind == "source-remove":
99
+ print_source_remove(result)
100
+ elif kind in {"wizards", "wizard"}:
101
+ print_wizard(result)
102
+ elif kind in {"shared-memory", "shared-memories", "shared-memory-read", "shared-memory-submission", "shared-memory-review", "shared-memory-publish"}:
103
+ print_shared_memory(result)
104
+ elif kind == "memory":
105
+ print_memory(result)
106
+ elif kind in {"memory-backup", "memory-backups", "memory-backup-restore", "memory-backup-delete"}:
107
+ print_memory_backup(result)
108
+ elif kind == "memory-path":
109
+ print_memory_path(result)
110
+ elif kind == "memory-reset":
111
+ print_memory_reset(result)
112
+ elif kind == "personality":
113
+ print_personality(result)
114
+ elif kind == "aliases":
115
+ print_aliases(result)
116
+ elif kind == "alias":
117
+ print_alias(result)
118
+ elif kind == "sessions":
119
+ print_sessions(result)
120
+ elif kind == "session":
121
+ print_session(result)
122
+ elif kind in {"setup", "mini-brain-setup"}:
123
+ print_setup(result)
124
+ elif kind == "toolchain":
125
+ print_toolchain(result)
126
+ elif kind == "toolchain-doctor":
127
+ print_toolchain_doctor(result)
128
+ elif kind == "toolchain-install":
129
+ print_toolchain_install(result)
130
+ elif kind == "tasks":
131
+ print_tasks(result)
132
+ elif kind == "task":
133
+ print_task(result)
134
+ elif kind == "task-history":
135
+ print_task_history(result)
136
+ elif kind == "task-run":
137
+ print_task_run(result)
138
+ elif kind == "scheduler":
139
+ print_scheduler(result)
140
+ elif kind == "notification-event":
141
+ print_notification_event(result)
142
+ elif kind == "notifications":
143
+ print_notifications(result)
144
+ elif kind == "calendar":
145
+ print_calendar(result)
146
+ elif kind == "calendar-configure":
147
+ print_calendar_configure(result)
148
+ elif kind in {"pr", "pr-review", "pr-automation"}:
149
+ print_pr(result)
150
+ elif kind == "permissions":
151
+ print_permissions(result)
152
+ elif kind in {"audit", "audit-entry", "audit-export"}:
153
+ print_audit(result)
154
+ elif kind == "config":
155
+ print_config(result)
156
+ elif kind in {"tools", "tool", "integrations", "integration", "skills", "skill", "decisions", "decision", "decisions-reset"}:
157
+ print_control(result)
158
+ elif kind in {"ollama-status", "ollama-models", "ollama-pull", "ollama-update"}:
159
+ print_ollama(result)
160
+ elif kind in {"local-llm", "local-llm-doctor", "local-llm-models", "local-llm-install", "local-llm-remove", "local-llm-benchmark"}:
161
+ print_local_llm(result)
162
+ elif kind in {"mcp-manifest", "mcp-tools", "mcp-doctor"}:
163
+ print_mcp(result)
164
+ elif kind == "install":
165
+ print_install(result)
166
+ else:
167
+ print(json.dumps(result, ensure_ascii=False, indent=2))
168
+ print_structured_warnings(result)
169
+
170
+
171
+ def print_agents(items: list[dict[str, Any]]) -> None:
172
+ if not items:
173
+ print("No agents found.")
174
+ return
175
+ for item in items:
176
+ count = item.get("capabilities", 0)
177
+ print(f"{item['id']} {item.get('status') or '-'} {count} capabilities")
178
+ if item.get("purpose"):
179
+ print(f" {item['purpose']}")
180
+
181
+
182
+ def print_roadmap(result: dict[str, Any]) -> None:
183
+ print(f"Agent DevKit roadmap {result.get('version_scope')}: {len(result.get('active_problems') or [])} active problems")
184
+ preteridos = result.get("preteridos") or []
185
+ if preteridos:
186
+ print(f"Out of scope: {', '.join(str(item) for item in preteridos)}")
187
+ for phase in result.get("phases") or []:
188
+ problems = ", ".join(str(item) for item in phase.get("problems") or []) or "-"
189
+ print(f"- {phase.get('number')}: {phase.get('name')} [{problems}]")
190
+
191
+
192
+ def print_catalog(result: dict[str, Any]) -> None:
193
+ if result["kind"] == "catalog-index":
194
+ print(f"Catalog index {result.get('status')}: {result.get('count', 0)} item(s)")
195
+ print(f"Path: {result.get('path')}")
196
+ return
197
+ if result["kind"] == "catalog-item":
198
+ item = result["item"]
199
+ print(f"{item.get('type')} {item.get('id')}")
200
+ if item.get("description"):
201
+ print(item["description"])
202
+ print(f"Path: {item.get('path') or '-'}")
203
+ print(f"Status: {item.get('status') or '-'}")
204
+ return
205
+ print(f"Catalog {result.get('action')}: {result.get('count', 0)} item(s)")
206
+ for item in result.get("items") or []:
207
+ print(f"- {item.get('type')} {item.get('id')} {item.get('status') or '-'}")
208
+
209
+
210
+ def print_route_explain(result: dict[str, Any]) -> None:
211
+ selected = result.get("selected") or {}
212
+ print(f"Route: {result.get('decision')} ({result.get('confidence_label')})")
213
+ print(f"Selected: {selected.get('agent_id') or '-'} / {selected.get('capability_id') or '-'}")
214
+ print(f"Execution: {result.get('execution')}")
215
+ if result.get("reason"):
216
+ print(result["reason"])
217
+ if result.get("next_step"):
218
+ print(f"Next: {result['next_step']}")
219
+
220
+
221
+ def print_agentic_plan(result: dict[str, Any]) -> None:
222
+ summary = result.get("summary") if isinstance(result.get("summary"), dict) else {}
223
+ print(f"Agentic plan: {result.get('status')}")
224
+ print(f"Routing: {summary.get('routing_status') or '-'}")
225
+ print(f"Selected: {summary.get('selected_agent_id') or '-'} / {summary.get('selected_capability_id') or '-'}")
226
+ print(f"Model: {summary.get('model_strategy') or '-'}")
227
+ print(f"Tasks: {summary.get('specialist_tasks', 0)} specialist, {summary.get('configuration_tasks', 0)} configuration")
228
+ if summary.get("review_required"):
229
+ print("Review: required")
230
+ if summary.get("needs_input"):
231
+ print("Next: provide the missing configuration, route confirmation, or model permission.")
232
+
233
+
234
+ def print_eval(result: dict[str, Any]) -> None:
235
+ if result["kind"] == "eval-suites":
236
+ print("Eval suites:")
237
+ for suite in result.get("suites") or []:
238
+ print(f"- {suite.get('id')}")
239
+ return
240
+ if result["kind"] == "eval-run":
241
+ print(f"Eval {result.get('suite')}: {result.get('status')}")
242
+ for check in result.get("checks") or []:
243
+ print(f"- {check.get('id')}: {check.get('status')}")
244
+ return
245
+ print(result.get("message") or "Eval report")
246
+
247
+
248
+ def print_secrets(result: dict[str, Any]) -> None:
249
+ print(f"{result['kind']}: {result.get('status')}")
250
+ if result.get("backends"):
251
+ for backend in result["backends"]:
252
+ print(f"- {backend.get('id')}: {backend.get('status')}")
253
+ if result.get("references"):
254
+ print(f"References: {len(result['references'])}")
255
+
256
+
257
+ def print_local_extensions(result: dict[str, Any]) -> None:
258
+ print(f"{result['kind']}: {result.get('status')}")
259
+ for item in result.get("items") or []:
260
+ state = "enabled" if item.get("enabled") else "disabled"
261
+ print(f"- {item.get('id')} {state} {item.get('path')}")
262
+
263
+
264
+ def print_local_artifacts(result: dict[str, Any]) -> None:
265
+ kind = result.get("kind")
266
+ print(f"{kind}: {result.get('status')}")
267
+ if "items" in result:
268
+ for item in result.get("items") or []:
269
+ state = "enabled" if item.get("enabled") else "disabled"
270
+ schedule = item.get("schedule") if isinstance(item.get("schedule"), dict) else {}
271
+ schedule_label = schedule.get("type") or ""
272
+ if schedule.get("every"):
273
+ schedule_label = f"{schedule_label}:{schedule.get('every')}"
274
+ if schedule.get("cron"):
275
+ schedule_label = f"{schedule_label}:{schedule.get('cron')}"
276
+ suffix = f" [{schedule_label}]" if schedule_label else ""
277
+ title = f" - {item.get('title')}" if item.get("title") else ""
278
+ print(f"- {item.get('id')} {state}{suffix}{title} {item.get('path')}")
279
+ if not result.get("items"):
280
+ print("- none")
281
+ return
282
+ automation = result.get("automation") if isinstance(result.get("automation"), dict) else None
283
+ if automation:
284
+ print(f"Automation: {automation.get('id')}")
285
+ print(f"Title: {automation.get('title') or '-'}")
286
+ schedule = automation.get("schedule") if isinstance(automation.get("schedule"), dict) else {}
287
+ print(f"Schedule: {schedule.get('type') or 'manual'}")
288
+ print(f"Enabled: {'yes' if automation.get('enabled') is not False else 'no'}")
289
+ if result.get("id"):
290
+ print(f"Id: {result.get('id')}")
291
+ if result.get("path"):
292
+ print(f"Path: {result.get('path')}")
293
+ if result.get("checks"):
294
+ for check in result.get("checks") or []:
295
+ print(f"- {check.get('id')}: {check.get('status')}")
296
+ if result.get("message"):
297
+ print(result["message"])
298
+
299
+
300
+ def print_workflows(result: dict[str, Any]) -> None:
301
+ print(f"{result['kind']}: {result.get('status')}")
302
+ for item in result.get("items") or []:
303
+ print(f"- {item.get('id')}: {item.get('description')}")
304
+ if result.get("workflow"):
305
+ workflow = result["workflow"]
306
+ print(f"{workflow.get('id')}: {workflow.get('description')}")
307
+
308
+
309
+ def print_team(result: dict[str, Any]) -> None:
310
+ print(f"{result['kind']}: {result.get('status')}")
311
+ if result.get("path"):
312
+ print(f"Path: {result.get('path')}")
313
+ if result.get("active_profile"):
314
+ print(f"Active: {result.get('active_profile')}")
315
+ if result.get("profiles"):
316
+ print(f"Profiles: {', '.join(str(item) for item in result.get('profiles') or [])}")
317
+ if result.get("items"):
318
+ for item in result.get("items") or []:
319
+ print(f"- {item.get('id')}: {item.get('description') or '-'}")
320
+ if result.get("profile"):
321
+ profile = result["profile"]
322
+ print(f"Profile: {profile.get('id')}")
323
+ print(f"Workflows: {', '.join(str(item) for item in profile.get('workflows') or []) or '-'}")
324
+ for check in result.get("checks") or []:
325
+ print(f"- {check.get('id')}: {check.get('status')}")
326
+ for step in result.get("next_steps") or []:
327
+ print(f"Next: {step}")
328
+
329
+
330
+ def print_knowledge(result: dict[str, Any]) -> None:
331
+ print(f"{result['kind']}: {result.get('status')}")
332
+ if result.get("path"):
333
+ print(f"Path: {result.get('path')}")
334
+ if result.get("snapshot_id"):
335
+ print(f"Snapshot: {result.get('snapshot_id')}")
336
+ if result.get("count") is not None:
337
+ print(f"Count: {result.get('count')}")
338
+ for item in result.get("items") or []:
339
+ suffix = f" ({item.get('score')})" if item.get("score") is not None else ""
340
+ print(f"- {item.get('path')}{suffix}")
341
+ for check in result.get("checks") or []:
342
+ print(f"- {check.get('id')}: {check.get('status')}")
343
+ for finding in result.get("findings") or []:
344
+ print(f"Finding: {finding.get('reason')} {finding.get('path') or ''}".rstrip())
345
+ for step in result.get("next_steps") or []:
346
+ print(f"Next: {step}")
347
+
348
+
349
+ def print_contribution(result: dict[str, Any]) -> None:
350
+ print(f"{result['kind']}: {result.get('status')}")
351
+ for check in result.get("checks") or []:
352
+ print(f"- {check.get('id')}: {check.get('status')}")
353
+
354
+
355
+ def print_structured_warnings(result: dict[str, Any]) -> None:
356
+ warnings = [
357
+ warning
358
+ for warning in (result.get("warnings") or [])
359
+ if isinstance(warning, dict)
360
+ ]
361
+ audit_warning = result.get("audit_warning")
362
+ if isinstance(audit_warning, dict) and audit_warning not in warnings:
363
+ warnings.insert(0, audit_warning)
364
+ if not warnings:
365
+ return
366
+ print("\nWarnings:")
367
+ for warning in warnings:
368
+ if warning.get("kind") == "audit-warning":
369
+ reason = warning.get("reason")
370
+ suffix = f" Reason: {reason}" if reason else ""
371
+ print(f"- Warning: audit trail was not recorded.{suffix}")
372
+ continue
373
+ message = warning.get("message") or warning.get("code") or "Warning"
374
+ detail = warning.get("error")
375
+ if detail:
376
+ print(f"- {message}: {detail}")
377
+ else:
378
+ print(f"- {message}")
379
+
380
+
381
+ def print_capabilities(agent: str | None, items: list[dict[str, Any]]) -> None:
382
+ if not items:
383
+ suffix = f" for {agent}" if agent else ""
384
+ print(f"No capabilities found{suffix}.")
385
+ return
386
+ if agent:
387
+ print(f"{agent}:")
388
+ for item in items:
389
+ short_id = item["id"].split(".")[-1]
390
+ prefix = "" if agent else f"{item.get('agent', '-')}/"
391
+ runner = "runner" if item.get("has_runner") else "no-runner"
392
+ workflow = "workflow" if item.get("has_workflow") else "no-workflow"
393
+ rules = "rules" if item.get("has_decision_rules") else "no-rules"
394
+ print(f"- {prefix}{short_id} {format_write_policy(item)} {item.get('status') or '-'} {runner} {workflow} {rules}")
395
+ if item.get("purpose"):
396
+ print(f" {item['purpose']}")
397
+
398
+
399
+ def print_capability(result: dict[str, Any]) -> None:
400
+ agent = result["agent"]
401
+ capability = result["capability"]
402
+ print(f"{agent['id']} / {capability['id'].split('.')[-1]}")
403
+ print(f"Status: {capability.get('status') or '-'}")
404
+ print(f"Version: {capability.get('version') or '-'}")
405
+ print(f"Write policy: {format_write_policy(capability)}")
406
+ if capability.get("purpose"):
407
+ print(f"\n{capability['purpose']}")
408
+ print("\nEntrypoints:")
409
+ for key, value in capability.get("entrypoint", {}).items():
410
+ if isinstance(value, dict):
411
+ marker = "ok" if value["exists"] else "missing"
412
+ print(f"- {key}: {value['path']} [{marker}]")
413
+ integration = capability.get("integration", {})
414
+ if integration:
415
+ print("\nIntegration:")
416
+ repo = integration.get("repository")
417
+ if repo:
418
+ marker = "ok" if repo["exists"] else "missing"
419
+ print(f"- repository: {repo['path']} [{marker}]")
420
+ for method in integration.get("methods", []):
421
+ marker = "ok" if method["exists"] else "missing"
422
+ print(f"- method: {method['path']} [{marker}]")
423
+
424
+
425
+ def format_write_policy(item: dict[str, Any]) -> str:
426
+ policy = item.get("write_policy") or "-"
427
+ metadata = item.get("write_policy_metadata") if isinstance(item.get("write_policy_metadata"), dict) else {}
428
+ raw = metadata.get("raw") or item.get("write_policy_raw")
429
+ if raw and raw != policy:
430
+ return f"{policy} (raw: {raw})"
431
+ return str(policy)
432
+
433
+
434
+ def print_run(result: dict[str, Any]) -> None:
435
+ if result.get("status") in {None, "ok"}:
436
+ print(result.get("stdout", ""), end="")
437
+ return
438
+
439
+ print(f"Run {result['status']}: {result['agent']['id']} / {result['capability'].split('.')[-1]}")
440
+ if result.get("fallback_applied"):
441
+ print(f"Fallback: {result['fallback_applied']}")
442
+ providers = result.get("providers") or {}
443
+ missing = providers.get("missing") or []
444
+ if missing:
445
+ print(f"Missing providers: {', '.join(missing)}")
446
+ if result.get("risks"):
447
+ print("\nRisks:")
448
+ for risk in result["risks"]:
449
+ print(f"- {risk}")
450
+ if result.get("next_steps"):
451
+ print("\nNext steps:")
452
+ for step in result["next_steps"]:
453
+ print(f"- {step}")
454
+
455
+
456
+ def print_doctor(result: dict[str, Any]) -> None:
457
+ print(f"AI DevKit doctor: {result['status']}")
458
+ print(f"Root: {result['root']}")
459
+ summary = result["summary"]
460
+ print(f"Agents: {summary['agents']}")
461
+ print(f"Capabilities: {summary['capabilities']}")
462
+ print(f"Declared runners: {summary['declared_runners']}")
463
+ print(f"Workflows: {summary['workflows']}")
464
+ print(f"Decision rules: {summary['decision_rules']}")
465
+ diagnostics = result.get("diagnostics") or {}
466
+ if diagnostics:
467
+ providers = diagnostics.get("providers") or {}
468
+ llm = diagnostics.get("llm") or {}
469
+ plugins = diagnostics.get("plugins") or {}
470
+ locks = diagnostics.get("locks") or {}
471
+ print("\nDiagnostics:")
472
+ print(f"- Locks: {locks.get('status', '-')}")
473
+ print(f"- Plugins: {plugins.get('status', '-')}")
474
+ print(f"- Providers: {providers.get('status', '-')} ({providers.get('ok', 0)} ok, {providers.get('missing', 0)} missing)")
475
+ print(f"- LLM: {llm.get('status', '-')} ({llm.get('ok', 0)} ok, {llm.get('missing', 0)} missing)")
476
+ operational = result.get("operational") or {}
477
+ if operational:
478
+ print("\nOperational:")
479
+ for key, value in operational.items():
480
+ if isinstance(value, dict):
481
+ suffix = f" ({value.get('count')})" if value.get("count") is not None else ""
482
+ print(f"- {key}: {value.get('status', '-')}{suffix}")
483
+ if result["warnings"]:
484
+ print("\nWarnings:")
485
+ for warning in result["warnings"]:
486
+ print(f"- {warning}")
487
+ if result["errors"]:
488
+ print("\nErrors:")
489
+ for error in result["errors"]:
490
+ print(f"- {error}")
491
+
492
+
493
+ def print_command_modes(result: dict[str, Any]) -> None:
494
+ print("Deterministic commands (no LLM required):")
495
+ for item in result["deterministic"]:
496
+ print(f"- {item['command']}")
497
+ print("\nLLM commands:")
498
+ for item in result["llm"]:
499
+ print(f"- {item['command']}")
500
+
501
+
502
+ def print_onboarding(result: dict[str, Any]) -> None:
503
+ if result.get("kind") == "onboarding-plan":
504
+ print_onboarding_plan(result)
505
+ return
506
+ agent = result.get("agent") or {}
507
+ print(f"{agent.get('name') or 'Agent DevKit'}")
508
+ print(f"Status: {result.get('status')}")
509
+
510
+ home = result.get("home") or {}
511
+ print(f"Home: {home.get('home')}")
512
+
513
+ memory = result.get("memory") or {}
514
+ created = memory.get("created") or []
515
+ memory_suffix = f" ({len(created)} file(s) created)" if created else ""
516
+ print(f"Memoria local: {memory.get('status')}{memory_suffix}")
517
+
518
+ sessions = result.get("sessions") or {}
519
+ active = sessions.get("active_session_id") or "-"
520
+ print(f"Sessao ativa: {active} ({sessions.get('count', 0)} total)")
521
+
522
+ llm = result.get("llm") or {}
523
+ print(f"LLMs: {llm.get('usable_count', 0)} usable / {llm.get('configured_count', 0)} configured")
524
+
525
+ ollama = result.get("ollama") or {}
526
+ print(f"Ollama: {ollama.get('status')} ({ollama.get('model_count', 0)} model(s))")
527
+
528
+ toolchain = result.get("toolchain") or {}
529
+ print(
530
+ "Toolchain: "
531
+ f"{toolchain.get('status')} "
532
+ f"({toolchain.get('ok_count', 0)} ok, {toolchain.get('missing_count', 0)} missing)"
533
+ )
534
+
535
+ sources = result.get("sources") or {}
536
+ tasks = result.get("tasks") or {}
537
+ specialists = result.get("specialists") or {}
538
+ print(f"Sources: {sources.get('count', 0)} configured")
539
+ if specialists:
540
+ missing = specialists.get("missing_providers") or []
541
+ missing_label = ""
542
+ if missing:
543
+ first_missing = missing[0] if isinstance(missing[0], dict) else {}
544
+ if first_missing.get("id"):
545
+ missing_label = f", first missing: {first_missing['id']}"
546
+ print(
547
+ "Especialistas: "
548
+ f"{specialists.get('ready_agents', 0)} ready / "
549
+ f"{specialists.get('agents_with_provider_requirements', 0)} provider-bound"
550
+ f"{missing_label}"
551
+ )
552
+ print(f"Tasks: {tasks.get('enabled_count', 0)} enabled / {tasks.get('count', 0)} total")
553
+ if tasks.get("due_count"):
554
+ print(f"Due tasks: {tasks.get('due_count')}")
555
+
556
+ if result.get("assistant_prompt"):
557
+ print(f"\n{result['assistant_prompt']}")
558
+
559
+ blockers = result.get("blockers") or []
560
+ if blockers:
561
+ print("\nNeeds setup:")
562
+ for blocker in blockers:
563
+ print(f"- {blocker.get('message')}")
564
+ if blocker.get("command"):
565
+ print(f" {blocker['command']}")
566
+
567
+ actions = result.get("suggested_actions") or []
568
+ if actions:
569
+ print("\nNext:")
570
+ for action in actions[:8]:
571
+ label = action.get("label") or action.get("id")
572
+ command = action.get("command")
573
+ print(f"- {label}: {command}")
574
+
575
+ modes = result.get("onboarding_modes") or []
576
+ if modes:
577
+ print("\nOnboarding:")
578
+ for mode in modes:
579
+ print(f"- {mode.get('label')}: {mode.get('command')}")
580
+
581
+
582
+ def print_onboarding_plan(result: dict[str, Any]) -> None:
583
+ print(f"Onboarding {result.get('mode')}: {result.get('status')}")
584
+ print("External actions executed: no")
585
+ catalog = result.get("agent_catalog") or {}
586
+ print(f"Catalog: {catalog.get('agents', 0)} agents / {catalog.get('capabilities', 0)} capabilities")
587
+ steps = result.get("steps") or []
588
+ if steps:
589
+ print("\nSteps:")
590
+ for step in steps:
591
+ print(f"- {step.get('id')}: {step.get('command')}")
592
+
593
+
594
+ def print_architecture(result: dict[str, Any]) -> None:
595
+ principal = result.get("principal_agent") or {}
596
+ print(f"{principal.get('name', 'Agent DevKit')}: {principal.get('role', 'runtime-agent')}")
597
+ if principal.get("description"):
598
+ print(principal["description"])
599
+ print("\nModel:")
600
+ for key, value in (result.get("model") or {}).items():
601
+ print(f"- {key}: {value}")
602
+ counts = result.get("counts") or {}
603
+ print("\nInventory:")
604
+ print(f"- Runtime agents: {counts.get('runtime_agents', 0)}")
605
+ print(f"- Specialist agents: {counts.get('specialist_agents', 0)}")
606
+ print(f"- Capabilities: {counts.get('capabilities', 0)}")
607
+ print(f"- Executable capabilities: {counts.get('executable_capabilities', 0)}")
608
+ phases = result.get("implementation_phases") or []
609
+ if phases:
610
+ print("\nImplementation phases:")
611
+ for phase in phases:
612
+ print(f"- {phase.get('number')}: {phase.get('name')}")
613
+ acceptance = result.get("acceptance_model") or {}
614
+ sections = acceptance.get("sections") or []
615
+ change_types = acceptance.get("change_types") or []
616
+ if sections:
617
+ section_ids = ", ".join(str(section.get("id")) for section in sections)
618
+ change_type_ids = ", ".join(str(change_type.get("id")) for change_type in change_types)
619
+ print("\nAcceptance model:")
620
+ print(f"- Sections: {section_ids}")
621
+ print(f"- Change types: {change_type_ids}")
622
+ impact = result.get("impact_model") or {}
623
+ areas = impact.get("areas") or []
624
+ if areas:
625
+ area_ids = ", ".join(str(area.get("id")) for area in areas)
626
+ print("\nImpact model:")
627
+ print(f"- Areas: {area_ids}")
628
+
629
+
630
+ def print_agent_response(result: dict[str, Any]) -> None:
631
+ if result.get("status") == "ok":
632
+ print(result.get("response", ""))
633
+ return
634
+ print(result.get("message") or result.get("response") or "Agent execution did not complete.")
635
+ question = result.get("next_question") or ((result.get("setup_wizard") or {}).get("next_question") if isinstance(result.get("setup_wizard"), dict) else None)
636
+ if isinstance(question, dict) and question.get("text"):
637
+ print(f"\nPergunta: {question['text']}")
638
+ if question.get("type") == "confirm":
639
+ print("[s/N]")
640
+ wizard = result.get("setup_wizard") if isinstance(result.get("setup_wizard"), dict) else {}
641
+ if wizard.get("wizard_id"):
642
+ print(f"\nWizard: {wizard['wizard_id']}")
643
+ print(f"Responder: agent wizard answer {wizard['wizard_id']} <resposta>")
644
+ if result.get("llm_backend"):
645
+ print(f"Requested backend: {result['llm_backend']}")
646
+ if result.get("next_steps"):
647
+ print("\nNext steps:")
648
+ for step in result["next_steps"]:
649
+ print(f"- {step}")
650
+
651
+
652
+ def print_wizard(result: dict[str, Any]) -> None:
653
+ if result.get("kind") == "wizards":
654
+ items = result.get("items") or []
655
+ print(f"Wizards: {len(items)}")
656
+ for item in items:
657
+ print(f"- {item.get('wizard_id')} {item.get('status')} {item.get('provider')}")
658
+ return
659
+ wizard = result.get("wizard") if isinstance(result.get("wizard"), dict) else result.get("setup_wizard")
660
+ if not isinstance(wizard, dict):
661
+ print(json.dumps(result, ensure_ascii=False, indent=2))
662
+ return
663
+ print(f"Wizard {wizard.get('wizard_id')}: {wizard.get('status')}")
664
+ print(f"Provider: {wizard.get('provider')}")
665
+ question = result.get("next_question") or wizard.get("next_question")
666
+ if isinstance(question, dict) and question.get("text"):
667
+ print(f"Pergunta: {question['text']}")
668
+ if question.get("type") == "confirm":
669
+ print("[s/N]")
670
+ print(f"Responder: agent wizard answer {wizard.get('wizard_id')} <resposta>")
671
+ if result.get("source_result"):
672
+ source = result["source_result"].get("source") or {}
673
+ print(f"Source configurada: {source.get('id')}")
674
+ if result.get("resumed_prompt"):
675
+ resume = result.get("resume_result") or {}
676
+ print(f"Prompt retomado: {resume.get('status')}")
677
+
678
+
679
+ def print_sources(result: dict[str, Any]) -> None:
680
+ print(f"Sources config: {result['config_path']}")
681
+ if not result["items"]:
682
+ print("No sources configured.")
683
+ return
684
+ for item in result["items"]:
685
+ marker = " [unsafe config]" if item.get("stored_secret") else ""
686
+ print(f"- {item['id']} {item['provider']} {item.get('label') or '-'}{marker}")
687
+ if item.get("unsafe_config_keys"):
688
+ print(f" Unsafe config keys: {', '.join(item['unsafe_config_keys'])}")
689
+
690
+
691
+ def print_source_status(result: dict[str, Any]) -> None:
692
+ print(f"Source status: {result['status']}")
693
+ for item in result["items"]:
694
+ print(f"- {item['id']}: {item['status']}")
695
+ missing = item.get("missing_env_refs") or []
696
+ if missing:
697
+ print(f" Missing env refs: {', '.join(missing)}")
698
+ unsafe = item.get("unsafe_config_keys") or []
699
+ if unsafe:
700
+ print(f" Unsafe config keys: {', '.join(unsafe)}")
701
+ for step in item.get("next_steps") or []:
702
+ print(f" - {step}")
703
+
704
+
705
+ def print_source_configure(result: dict[str, Any]) -> None:
706
+ if result.get("status") == "blocked":
707
+ print("Source configuration blocked.")
708
+ print(f"Field: {result.get('field') or '-'}")
709
+ print(f"Reason: {result.get('reason') or '-'}")
710
+ if result.get("message"):
711
+ print(str(result["message"]))
712
+ print("Stored secret: no")
713
+ return
714
+ source = result["source"]
715
+ print(f"Source configured: {source['id']}")
716
+ print(f"Provider: {source['provider']}")
717
+ print(f"Config: {result['config_path']}")
718
+ print(f"Stored secret: {'yes' if result.get('stored_secret') else 'no'}")
719
+
720
+
721
+ def print_source_remove(result: dict[str, Any]) -> None:
722
+ print(f"Source removed: {result['source']['id']}")
723
+ print(f"Config: {result['config_path']}")
724
+
725
+
726
+ def print_memory(result: dict[str, Any]) -> None:
727
+ print(f"Memory home: {result['memory_home']}")
728
+ if result.get("files"):
729
+ print("\nFiles:")
730
+ for item in result["files"]:
731
+ print(f"- {item['name']}: {item['path']}")
732
+ for bucket in ("prompts", "routes", "sources"):
733
+ print(f"\n{bucket.title()}:")
734
+ items = result["usage"].get(bucket) or []
735
+ if not items:
736
+ print("- none")
737
+ continue
738
+ for item in items:
739
+ print(f"- {item['key']} ({item.get('count', 0)})")
740
+
741
+
742
+ def print_memory_reset(result: dict[str, Any]) -> None:
743
+ print("Memory reset.")
744
+ print(f"Config: {result['config_path']}")
745
+
746
+
747
+ def print_memory_path(result: dict[str, Any]) -> None:
748
+ print(f"Memory home: {result['home']}")
749
+ if result.get("created"):
750
+ print("Created:")
751
+ for path in result["created"]:
752
+ print(f"- {path}")
753
+ print("Files:")
754
+ for item in result["files"]:
755
+ print(f"- {item['name']}: {item['path']}")
756
+
757
+
758
+ def print_memory_backup(result: dict[str, Any]) -> None:
759
+ print(f"Memory backup: {result.get('status')}")
760
+ if result.get("home"):
761
+ print(f"Home: {result.get('home')}")
762
+ backup = result.get("backup") if isinstance(result.get("backup"), dict) else {}
763
+ if backup:
764
+ print(f"ID: {backup.get('id')}")
765
+ print(f"Path: {backup.get('path')}")
766
+ print(f"Files: {backup.get('file_count', 0)}")
767
+ print(f"Remote upload: {'yes' if backup.get('remote_upload') else 'no'}")
768
+ print(f"Encrypted: {'yes' if backup.get('encrypted') else 'no'}")
769
+ if result.get("items"):
770
+ for item in result["items"]:
771
+ print(f"- {item.get('id')}: {item.get('file_count', 0)} file(s)")
772
+ if result.get("next_steps"):
773
+ print("Next steps:")
774
+ for step in result["next_steps"]:
775
+ print(f"- {step}")
776
+
777
+
778
+ def print_shared_memory(result: dict[str, Any]) -> None:
779
+ print(f"Shared memory: {result.get('status')}")
780
+ memory = result.get("memory") if isinstance(result.get("memory"), dict) else {}
781
+ if memory:
782
+ print(f"ID: {memory.get('id')}")
783
+ print(f"URL: {memory.get('share_url')}")
784
+ if result.get("submission_id"):
785
+ print(f"Submission: {result.get('submission_id')}")
786
+ if result.get("path"):
787
+ print(f"Path: {result.get('path')}")
788
+ if result.get("content"):
789
+ print(result["content"])
790
+ if result.get("items"):
791
+ for item in result["items"]:
792
+ print(f"- {item.get('id')}: {item.get('title')}")
793
+ access = result.get("contributor_access") if isinstance(result.get("contributor_access"), dict) else {}
794
+ if access:
795
+ print("Contributor access:")
796
+ print(f"- URL: {access.get('url')}")
797
+ print(f"- Key: {access.get('key')}")
798
+ owner_access = result.get("owner_access") if isinstance(result.get("owner_access"), dict) else {}
799
+ if owner_access:
800
+ print("Owner access:")
801
+ print(f"- Key: {owner_access.get('key')}")
802
+
803
+
804
+ def print_personality(result: dict[str, Any]) -> None:
805
+ print(f"Personality: {result.get('status', 'ok')}")
806
+ print(f"Path: {result['path']}")
807
+ print(f"Agent name: {result.get('agent_name') or '-'}")
808
+ print(f"User name: {result.get('user_name') or '-'}")
809
+ print(f"Language: {result.get('language') or '-'}")
810
+ print(f"Tone: {result.get('tone') or '-'}")
811
+ print(f"Detail level: {result.get('detail_level') or '-'}")
812
+ if result.get("message"):
813
+ print(result["message"])
814
+ if result.get("status") == "needs-input" and result.get("questions"):
815
+ print("Setup questions:")
816
+ for question in result["questions"]:
817
+ print(f"- {question}")
818
+
819
+
820
+ def print_aliases(result: dict[str, Any]) -> None:
821
+ print(f"Aliases config: {result['config_path']}")
822
+ if not result["items"]:
823
+ print("No aliases configured.")
824
+ return
825
+ for item in result["items"]:
826
+ print(f"- {item['name']}: {item['path']}")
827
+
828
+
829
+ def print_alias(result: dict[str, Any]) -> None:
830
+ print(f"Alias {result['status']}: {result['name']}")
831
+ if result.get("path"):
832
+ print(f"Path: {result['path']}")
833
+ if result.get("removed_paths"):
834
+ print("Removed:")
835
+ for path in result["removed_paths"]:
836
+ print(f"- {path}")
837
+ print(f"Config: {result['config_path']}")
838
+
839
+
840
+ def print_sessions(result: dict[str, Any]) -> None:
841
+ print(f"Sessions home: {result['home']}")
842
+ if result.get("active_session_id"):
843
+ print(f"Active: {result['active_session_id']}")
844
+ if not result["items"]:
845
+ print("No sessions found.")
846
+ return
847
+ for item in result["items"]:
848
+ marker = " active" if item.get("active") else ""
849
+ print(
850
+ f"- {item['id']}{marker} {item.get('title') or '-'} "
851
+ f"{item.get('exchange_count', 0)} exchanges ~{item.get('token_estimate', 0)} tokens"
852
+ )
853
+ if item.get("project"):
854
+ print(f" Project: {item['project']}")
855
+
856
+
857
+ def print_session(result: dict[str, Any]) -> None:
858
+ session = result["session"]
859
+ print(f"Session {result['status']}: {session['id']}")
860
+ print(f"Title: {session.get('title') or '-'}")
861
+ print(f"Path: {session.get('path') or '-'}")
862
+ print(f"Project: {session.get('project') or '-'}")
863
+ print(f"Exchanges: {session.get('exchange_count', 0)}")
864
+ print(f"Token estimate: {session.get('token_estimate', 0)}")
865
+
866
+
867
+ def print_setup(result: dict[str, Any]) -> None:
868
+ print(f"Setup: {result['status']}")
869
+ print(f"Dry-run: {result.get('dry_run', False)}")
870
+ if result.get("kind") == "mini-brain-setup":
871
+ mini_brain = result.get("mini_brain") or {}
872
+ print(f"Mini-brain: {mini_brain.get('status', '-')}")
873
+ print(f"Model: {mini_brain.get('ollama_model') or mini_brain.get('hf_model') or '-'}")
874
+ pull = result.get("pull") or {}
875
+ if pull:
876
+ print(f"Ollama pull: {pull.get('status', '-')}")
877
+ if result.get("message"):
878
+ print(result["message"])
879
+ if result.get("next_steps"):
880
+ print("Next steps:")
881
+ for step in result["next_steps"]:
882
+ print(f"- {step}")
883
+ return
884
+ toolchain = result.get("toolchain") or {}
885
+ print(f"Toolchain: {toolchain.get('status', '-')}")
886
+ missing = (toolchain.get("required_missing") or []) + (toolchain.get("optional_missing") or [])
887
+ if missing:
888
+ print(f"Missing: {', '.join(missing)}")
889
+ if result.get("next_steps"):
890
+ print("Next steps:")
891
+ for step in result["next_steps"]:
892
+ print(f"- {step}")
893
+
894
+
895
+ def print_toolchain(result: dict[str, Any]) -> None:
896
+ print(f"Toolchain: {result['status']}")
897
+ print(f"Platform: {result['platform']}")
898
+ for item in result["items"]:
899
+ print(f"- {item['id']} {item['command']} required={item['required']}")
900
+
901
+
902
+ def print_toolchain_doctor(result: dict[str, Any]) -> None:
903
+ print(f"Toolchain doctor: {result['status']}")
904
+ print(f"Platform: {result['platform']}")
905
+ for item in result["items"]:
906
+ print(f"- {item['id']}: {item['status']}")
907
+ if item.get("binary"):
908
+ print(f" {item['binary']}")
909
+ if item.get("install"):
910
+ print(f" Install: {item['install']}")
911
+
912
+
913
+ def print_toolchain_install(result: dict[str, Any]) -> None:
914
+ print(f"Toolchain install: {result['status']}")
915
+ if result.get("message"):
916
+ print(result["message"])
917
+ for plan in result["plans"]:
918
+ print(f"- {plan['id']}: {plan.get('command') or '-'}")
919
+
920
+
921
+ def print_tasks(result: dict[str, Any]) -> None:
922
+ print(f"Tasks: {len(result['items'])}")
923
+ for item in result["items"]:
924
+ print(f"- {item['id']} {item['status']} {item.get('title') or '-'}")
925
+
926
+
927
+ def print_task(result: dict[str, Any]) -> None:
928
+ if result.get("message"):
929
+ print(result["message"])
930
+ task = result.get("task") or {}
931
+ if task:
932
+ print(f"Task {result['status']}: {task.get('id')}")
933
+ print(f"Title: {task.get('title') or '-'}")
934
+ print(f"Status: {task.get('status') or '-'}")
935
+
936
+
937
+ def print_task_history(result: dict[str, Any]) -> None:
938
+ print(result.get("history") or "No history.")
939
+
940
+
941
+ def print_task_run(result: dict[str, Any]) -> None:
942
+ print(f"Task run: {result['status']}")
943
+ if result.get("run_id"):
944
+ print(f"Run: {result['run_id']}")
945
+ if result.get("duration_seconds") is not None:
946
+ print(f"Duration: {result['duration_seconds']}s")
947
+ if result.get("audit_id"):
948
+ print(f"Audit: {result['audit_id']}")
949
+ if result.get("message"):
950
+ print(result["message"])
951
+ notification = result.get("notification")
952
+ if isinstance(notification, dict):
953
+ print(f"Notification: {notification.get('status')}")
954
+ if notification.get("reason"):
955
+ print(f"Reason: {notification['reason']}")
956
+
957
+
958
+ def print_scheduler(result: dict[str, Any]) -> None:
959
+ print(f"Scheduler: {result['status']}")
960
+ if result.get("message"):
961
+ print(result["message"])
962
+ if "due_count" in result:
963
+ print(f"Due tasks: {result['due_count']}")
964
+ if result.get("events_path"):
965
+ print(f"Events: {result['events_path']}")
966
+
967
+
968
+ def print_notifications(result: dict[str, Any]) -> None:
969
+ action = result.get("action")
970
+ status = result.get("status") or "ok"
971
+ print(f"Notifications: {status}")
972
+ if action:
973
+ print(f"Action: {action}")
974
+ if result.get("reason"):
975
+ print(f"Reason: {result['reason']}")
976
+ if result.get("channel"):
977
+ print(f"Channel: {result['channel']}")
978
+ if isinstance(result.get("notification"), dict):
979
+ notification = result["notification"]
980
+ print(f"Event: {notification.get('event')}")
981
+ print(f"Summary: {notification.get('summary') or notification.get('message')}")
982
+ deliveries = result.get("deliveries") if isinstance(result.get("deliveries"), list) else []
983
+ if deliveries:
984
+ print("Deliveries:")
985
+ for delivery in deliveries:
986
+ detail = delivery.get("reason") or delivery.get("status") or "-"
987
+ print(f"- {delivery.get('channel') or '-'}: {detail}")
988
+ desktop = result.get("desktop")
989
+ if isinstance(desktop, dict):
990
+ print(f"Desktop enabled: {desktop.get('enabled', '-')}")
991
+ events = desktop.get("events") or []
992
+ if events:
993
+ print(f"Events: {', '.join(str(item) for item in events)}")
994
+ backend = desktop.get("backend")
995
+ if isinstance(backend, dict):
996
+ print(f"Backend: {backend.get('name') or '-'} ({backend.get('status') or '-'})")
997
+ if result.get("events"):
998
+ print("Events:")
999
+ for event in result["events"]:
1000
+ print(f"- {event}")
1001
+ if result.get("channels"):
1002
+ print("Channels:")
1003
+ for channel in result["channels"]:
1004
+ print(f"- {channel.get('id')}: {channel.get('status')}")
1005
+ channel_config = result.get("channel_config")
1006
+ if isinstance(channel_config, dict):
1007
+ print(f"Channel enabled: {channel_config.get('enabled', '-')}")
1008
+ events = channel_config.get("events") or []
1009
+ if events:
1010
+ print(f"Channel events: {', '.join(str(item) for item in events)}")
1011
+ if result.get("config_path"):
1012
+ print(f"Config: {result['config_path']}")
1013
+ if result.get("history_path"):
1014
+ print(f"History: {result['history_path']}")
1015
+
1016
+
1017
+ def print_notification_event(result: dict[str, Any]) -> None:
1018
+ print(f"Notification event: {result.get('event')}")
1019
+ print(f"Status: {result.get('status')}")
1020
+ print(f"Title: {result.get('title')}")
1021
+ print(f"Summary: {result.get('summary')}")
1022
+
1023
+
1024
+ def print_calendar(result: dict[str, Any]) -> None:
1025
+ if result.get("status") != "ok":
1026
+ print(result.get("message") or "Calendar is not available.")
1027
+ for step in result.get("next_steps") or []:
1028
+ print(f"- {step}")
1029
+ return
1030
+ print(calendar_summary(result))
1031
+
1032
+
1033
+ def print_calendar_configure(result: dict[str, Any]) -> None:
1034
+ print(f"Calendar configured: {result['provider']}")
1035
+ print(f"Source: {result['source_ref']}")
1036
+ print("Stored secret: no")
1037
+
1038
+
1039
+ def print_pr(result: dict[str, Any]) -> None:
1040
+ if result.get("message"):
1041
+ print(result["message"])
1042
+ if result.get("items") is not None:
1043
+ print(summarize_pr_list(result))
1044
+ elif result.get("summary"):
1045
+ print(result["summary"])
1046
+ elif result.get("task"):
1047
+ task = result["task"]
1048
+ print(f"PR automation {result['status']}: {task.get('id')}")
1049
+
1050
+
1051
+ def print_permissions(result: dict[str, Any]) -> None:
1052
+ print(f"Permissions: {result['status']}")
1053
+ if result.get("default_level"):
1054
+ print(f"Default: {result['default_level']}")
1055
+ if result.get("grant"):
1056
+ grant = result["grant"]
1057
+ print(f"Grant: {grant.get('agent')} / {grant.get('provider')} -> {grant.get('level')}")
1058
+ if result.get("removed") is not None:
1059
+ print(f"Removed: {len(result.get('removed') or [])}")
1060
+ grants = result.get("grants")
1061
+ if grants is not None:
1062
+ if not grants:
1063
+ print("No explicit grants.")
1064
+ for grant in grants:
1065
+ print(f"- {grant.get('agent')} / {grant.get('provider')} -> {grant.get('level')}")
1066
+ if result.get("json_path"):
1067
+ print(f"Policy: {result['json_path']}")
1068
+
1069
+
1070
+ def print_audit(result: dict[str, Any]) -> None:
1071
+ if result["kind"] == "audit":
1072
+ print(f"Audit home: {result['home']}")
1073
+ for item in result.get("items") or []:
1074
+ print(f"- {item.get('id')} {item.get('created_at')} {item.get('command')} {item.get('status')}")
1075
+ return
1076
+ if result["kind"] == "audit-entry":
1077
+ entry = result.get("entry") or {}
1078
+ print(f"Audit: {entry.get('id')}")
1079
+ print(f"Created: {entry.get('created_at')}")
1080
+ print(f"Command: {entry.get('command')}")
1081
+ print(f"Status: {(entry.get('result') or {}).get('status')}")
1082
+ print(f"JSON: {result.get('json_path')}")
1083
+ print(f"Markdown: {result.get('markdown_path')}")
1084
+ return
1085
+ print(result.get("content") or "")
1086
+
1087
+
1088
+ def print_llm_backends(result: dict[str, Any]) -> None:
1089
+ print(f"LLM config: {result['config_path']}")
1090
+ print(f"Default: {result.get('default') or '-'}")
1091
+ for item in result["items"]:
1092
+ markers = []
1093
+ if item.get("configured"):
1094
+ markers.append("configured")
1095
+ if item.get("default"):
1096
+ markers.append("default")
1097
+ suffix = f" [{' '.join(markers)}]" if markers else ""
1098
+ print(f"- {item['id']} {item['kind']} {item['auth']}{suffix}")
1099
+ if item.get("notes"):
1100
+ print(f" {item['notes']}")
1101
+
1102
+
1103
+ def print_llm_doctor(result: dict[str, Any]) -> None:
1104
+ print(f"LLM doctor: {result['status']}")
1105
+ print(f"Config: {result['config_path']}")
1106
+ print(f"Default: {result.get('default') or '-'}")
1107
+ for item in result["items"]:
1108
+ print(f"- {item['id']}: {item['status']}")
1109
+ if item.get("message"):
1110
+ print(f" {item['message']}")
1111
+
1112
+
1113
+ def print_llm_configure(result: dict[str, Any]) -> None:
1114
+ print(f"LLM backend configured: {result['backend']}")
1115
+ print(f"Config: {result['config_path']}")
1116
+ print(f"Default: {result.get('default') or '-'}")
1117
+ print("Stored secret: no")
1118
+
1119
+
1120
+ def print_llm_default(result: dict[str, Any]) -> None:
1121
+ print(f"Default LLM backend: {result['default']}")
1122
+ print(f"Config: {result['config_path']}")
1123
+
1124
+
1125
+ def print_llm_preference(result: dict[str, Any]) -> None:
1126
+ print(f"LLM preference: {result.get('status', 'ok')}")
1127
+ print(f"Primary: {result.get('primary') or '-'}")
1128
+ print(f"Fallback enabled: {result.get('fallback_enabled', True)}")
1129
+ print("Order:")
1130
+ for backend_id in result.get("order") or []:
1131
+ print(f"- {backend_id}")
1132
+ print(f"Config: {result['config_path']}")
1133
+
1134
+
1135
+ def print_providers(result: dict[str, Any]) -> None:
1136
+ if not result["items"]:
1137
+ print("No providers found.")
1138
+ return
1139
+ for item in result["items"]:
1140
+ write_marker = "writes" if item.get("writes") else "read"
1141
+ print(f"- {item['id']} {item['kind']} {item['status']} {write_marker}")
1142
+ if item.get("description"):
1143
+ print(f" {item['description']}")
1144
+
1145
+
1146
+ def print_provider_status(result: dict[str, Any]) -> None:
1147
+ print(f"Provider status: {result['status']}")
1148
+ for item in result["items"]:
1149
+ print(f"- {item['id']}: {item['status']}")
1150
+ if item.get("message"):
1151
+ print(f" {item['message']}")
1152
+ missing = item.get("missing_required_fields") or []
1153
+ if missing:
1154
+ print(f" Missing config: {', '.join(missing)}")
1155
+ auth = item.get("auth") or {}
1156
+ missing_secret_fields = auth.get("missing_secret_fields") or []
1157
+ if missing_secret_fields:
1158
+ print(f" Missing secret refs: {', '.join(missing_secret_fields)}")
1159
+ detected_env_file = item.get("detected_env_file") or []
1160
+ if detected_env_file:
1161
+ print(f" Detected in env-file: {', '.join(detected_env_file)}")
1162
+
1163
+
1164
+ def print_provider_configure(result: dict[str, Any]) -> None:
1165
+ print(result.get("message") or f"Provider configuration {result['status']}.")
1166
+ print(f"Provider: {result['provider']}")
1167
+ if result.get("status") == "configured":
1168
+ print(f"Config: {result['config_path']}")
1169
+ print("Stored secret: no")
1170
+ return
1171
+ if result.get("status") == "session-only":
1172
+ print("Session-only: yes")
1173
+ print("Stored secret: no")
1174
+ return
1175
+ if result.get("required_config_fields"):
1176
+ print("Required config fields:")
1177
+ for field in result["required_config_fields"]:
1178
+ print(f"- {field}")
1179
+ print("Next steps:")
1180
+ for step in result["next_steps"]:
1181
+ print(f"- {step}")
1182
+
1183
+
1184
+ def print_provider_unset(result: dict[str, Any]) -> None:
1185
+ print(f"Provider config {result['status']}: {result['provider']}")
1186
+ print(f"Config: {result['config_path']}")
1187
+
1188
+
1189
+ def print_credential_resolution(result: dict[str, Any]) -> None:
1190
+ print(f"Credential resolution for {result['provider']}: {result['status']}")
1191
+ if result.get("detected_env"):
1192
+ print(f"Detected in env: {', '.join(result['detected_env'])}")
1193
+ if result.get("detected_env_file"):
1194
+ print(f"Detected in env-file: {', '.join(result['detected_env_file'])}")
1195
+ if result.get("missing_required_fields"):
1196
+ print(f"Missing required fields: {', '.join(result['missing_required_fields'])}")
1197
+ auth = result.get("auth") or {}
1198
+ if auth.get("missing_secret_fields"):
1199
+ print(f"Missing secret refs: {', '.join(auth['missing_secret_fields'])}")
1200
+ print("Secret values returned: no")
1201
+
1202
+
1203
+ def print_credential_backends(result: dict[str, Any]) -> None:
1204
+ print("Credential resolver backends:")
1205
+ for item in result["items"]:
1206
+ print(f"- {item}")
1207
+
1208
+
1209
+ def print_config(result: dict[str, Any]) -> None:
1210
+ print(f"Config: {result.get('path')}")
1211
+ if result.get("llm"):
1212
+ print(f"Primary LLM: {(result['llm'] or {}).get('primary') or '-'}")
1213
+ if result.get("ollama"):
1214
+ print(f"Ollama: {(result['ollama'] or {}).get('status')}")
1215
+
1216
+
1217
+ def print_control(result: dict[str, Any]) -> None:
1218
+ kind = result.get("kind")
1219
+ if kind == "decisions-reset":
1220
+ print(f"Decisions reset: {result.get('category') or 'all'}")
1221
+ print(f"Path: {result.get('path')}")
1222
+ return
1223
+ if "items" in result:
1224
+ print(f"{kind}:")
1225
+ for item in result.get("items") or []:
1226
+ print(f"- {item.get('category')}:{item.get('id')} {item.get('state')}")
1227
+ if not result.get("items"):
1228
+ print("- none")
1229
+ return
1230
+ item = result.get("item") or result
1231
+ print(f"{item.get('category') or result.get('category')}:{item.get('id') or result.get('id')} {item.get('state') or result.get('state')}")
1232
+
1233
+
1234
+ def print_ollama(result: dict[str, Any]) -> None:
1235
+ kind = result.get("kind")
1236
+ if kind == "ollama-status":
1237
+ print(f"Ollama: {result.get('status')}")
1238
+ print(f"Binary: {result.get('binary') or '-'}")
1239
+ print(f"Version: {result.get('version') or '-'}")
1240
+ daemon = result.get("daemon") or {}
1241
+ print(f"Daemon: {daemon.get('status') or '-'}")
1242
+ print(f"Models: {result.get('model_count', 0)}")
1243
+ if result.get("install_plan"):
1244
+ print(f"Install: {(result['install_plan'] or {}).get('command')}")
1245
+ return
1246
+ if kind == "ollama-models":
1247
+ print(f"Ollama models: {result.get('status')}")
1248
+ for item in result.get("items") or []:
1249
+ print(f"- {item.get('name')} {item.get('size') or '-'}")
1250
+ if not result.get("items"):
1251
+ print("- none")
1252
+ return
1253
+ print(f"{kind}: {result.get('status')}")
1254
+ if result.get("command"):
1255
+ command = result["command"]
1256
+ print("Command: " + (" ".join(command) if isinstance(command, list) else str(command)))
1257
+ if result.get("message"):
1258
+ print(result["message"])
1259
+
1260
+
1261
+ def print_local_llm(result: dict[str, Any]) -> None:
1262
+ kind = result.get("kind")
1263
+ print(f"Local LLM: {result.get('status')}")
1264
+ if kind == "local-llm":
1265
+ mini = result.get("mini_brain") or {}
1266
+ print(f"Mini-brain: {mini.get('status')} enabled={mini.get('enabled')}")
1267
+ print(f"Workers: {len(result.get('workers') or [])}")
1268
+ return
1269
+ if kind == "local-llm-doctor":
1270
+ ollama = result.get("ollama") or {}
1271
+ mini = result.get("mini_brain") or {}
1272
+ print(f"Ollama: {ollama.get('status')}")
1273
+ print(f"Mini-brain: {mini.get('status')} enabled={mini.get('enabled')}")
1274
+ for step in result.get("next_steps") or []:
1275
+ print(f"- {step}")
1276
+ return
1277
+ if kind == "local-llm-models":
1278
+ print(f"Binary: {result.get('binary') or '-'}")
1279
+ for item in result.get("items") or []:
1280
+ print(f"- {item.get('name')} {item.get('size') or '-'}")
1281
+ recommended = [item for item in result.get("recommended") or [] if not item.get("installed")]
1282
+ if recommended:
1283
+ print("Recommended:")
1284
+ for item in recommended[:5]:
1285
+ print(f"- {item.get('name')}: {item.get('recommended_for')}")
1286
+ return
1287
+ if kind == "local-llm-benchmark":
1288
+ print(f"Model: {result.get('model')}")
1289
+ for check in result.get("checks") or []:
1290
+ print(f"- {check.get('id')}: {check.get('status')}")
1291
+ for step in result.get("next_steps") or []:
1292
+ print(f"Next: {step}")
1293
+ return
1294
+ if result.get("command"):
1295
+ command = result["command"]
1296
+ print("Command: " + (" ".join(command) if isinstance(command, list) else str(command)))
1297
+ if result.get("message"):
1298
+ print(result["message"])
1299
+
1300
+
1301
+ def print_mcp(result: dict[str, Any]) -> None:
1302
+ print(f"MCP: {result.get('status', 'ok')}")
1303
+ print(f"Transport: {result.get('transport', '-')}")
1304
+ print(f"Protocol: {result.get('protocol_version', '-')}")
1305
+ server = result.get("server") if isinstance(result.get("server"), dict) else {}
1306
+ if server:
1307
+ print(f"Server: {server.get('name', '-')} {server.get('version', '')}".rstrip())
1308
+ tools = result.get("tools")
1309
+ if isinstance(tools, list):
1310
+ print("Tools:")
1311
+ for tool in tools:
1312
+ print(f"- {tool.get('name')}")
1313
+ elif isinstance(tools, dict):
1314
+ print(f"Tools: {tools.get('count', 0)}")
1315
+
1316
+
1317
+ def print_install(result: dict[str, Any]) -> None:
1318
+ print(f"AI DevKit install: {result['status']}")
1319
+ print(f"Scope: {result['scope']}")
1320
+ print(f"Target: {result['target']}")
1321
+ print(f"Hosts: {', '.join(result['hosts'])}")
1322
+ print("Stored secret: no")
1323
+ paths = result["planned"] if result.get("dry_run") else result["written"]
1324
+ if paths:
1325
+ label = "Planned writes" if result.get("dry_run") else "Written files"
1326
+ print(f"\n{label}:")
1327
+ for path in paths:
1328
+ print(f"- {path}")
1329
+ if result.get("next_steps"):
1330
+ print("\nNext steps:")
1331
+ for step in result["next_steps"]:
1332
+ print(f"- {step}")