@bluefly/openstandardagents 0.4.0 → 0.4.2

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 (517) hide show
  1. package/CHANGELOG.md +137 -0
  2. package/DEMO.md +212 -0
  3. package/README.md +77 -17
  4. package/dist/adapters/drupal/generator.d.ts +149 -0
  5. package/dist/adapters/drupal/generator.d.ts.map +1 -0
  6. package/dist/adapters/drupal/generator.js +1760 -0
  7. package/dist/adapters/drupal/generator.js.map +1 -0
  8. package/dist/adapters/drupal/index.d.ts +2 -0
  9. package/dist/adapters/drupal/index.d.ts.map +1 -1
  10. package/dist/adapters/drupal/index.js +3 -0
  11. package/dist/adapters/drupal/index.js.map +1 -1
  12. package/dist/adapters/npm/adapter.js +2 -2
  13. package/dist/adapters/npm/converter.js +3 -3
  14. package/dist/cli/banner.d.ts +21 -0
  15. package/dist/cli/banner.d.ts.map +1 -0
  16. package/dist/cli/banner.js +128 -0
  17. package/dist/cli/banner.js.map +1 -0
  18. package/dist/cli/commands/dev.command.d.ts +20 -0
  19. package/dist/cli/commands/dev.command.d.ts.map +1 -0
  20. package/dist/cli/commands/dev.command.js +78 -0
  21. package/dist/cli/commands/dev.command.js.map +1 -0
  22. package/dist/cli/commands/estimate.command.d.ts +12 -0
  23. package/dist/cli/commands/estimate.command.d.ts.map +1 -0
  24. package/dist/cli/commands/estimate.command.js +226 -0
  25. package/dist/cli/commands/estimate.command.js.map +1 -0
  26. package/dist/cli/commands/export-enhanced.command.d.ts +7 -0
  27. package/dist/cli/commands/export-enhanced.command.d.ts.map +1 -0
  28. package/dist/cli/commands/{export-v2.command.js → export-enhanced.command.js} +3 -3
  29. package/dist/cli/commands/export-enhanced.command.js.map +1 -0
  30. package/dist/cli/commands/export.command.d.ts.map +1 -1
  31. package/dist/cli/commands/export.command.js +82 -4
  32. package/dist/cli/commands/export.command.js.map +1 -1
  33. package/dist/cli/commands/init.command.d.ts.map +1 -1
  34. package/dist/cli/commands/init.command.js +2 -0
  35. package/dist/cli/commands/init.command.js.map +1 -1
  36. package/dist/cli/commands/test.command.d.ts +1 -0
  37. package/dist/cli/commands/test.command.d.ts.map +1 -1
  38. package/dist/cli/commands/test.command.js +172 -105
  39. package/dist/cli/commands/test.command.js.map +1 -1
  40. package/dist/cli/commands/types/wizard-config.types.d.ts +59 -0
  41. package/dist/cli/commands/types/wizard-config.types.d.ts.map +1 -0
  42. package/dist/cli/commands/types/wizard-config.types.js +34 -0
  43. package/dist/cli/commands/types/wizard-config.types.js.map +1 -0
  44. package/dist/cli/commands/upgrade.command.d.ts +9 -0
  45. package/dist/cli/commands/upgrade.command.d.ts.map +1 -0
  46. package/dist/cli/commands/upgrade.command.js +167 -0
  47. package/dist/cli/commands/upgrade.command.js.map +1 -0
  48. package/dist/cli/commands/wizard-api-first.command.d.ts +18 -0
  49. package/dist/cli/commands/wizard-api-first.command.d.ts.map +1 -0
  50. package/dist/cli/commands/wizard-api-first.command.js +854 -0
  51. package/dist/cli/commands/wizard-api-first.command.js.map +1 -0
  52. package/dist/cli/commands/wizard-interactive.command.d.ts +25 -0
  53. package/dist/cli/commands/wizard-interactive.command.d.ts.map +1 -0
  54. package/dist/cli/commands/wizard-interactive.command.js +1875 -0
  55. package/dist/cli/commands/wizard-interactive.command.js.map +1 -0
  56. package/dist/cli/commands/workspace.command.js +1 -1
  57. package/dist/cli/commands/workspace.command.js.map +1 -1
  58. package/dist/cli/index.js +9 -0
  59. package/dist/cli/index.js.map +1 -1
  60. package/dist/cli/schema-driven/index.d.ts +27 -0
  61. package/dist/cli/schema-driven/index.d.ts.map +1 -0
  62. package/dist/cli/schema-driven/index.js +34 -0
  63. package/dist/cli/schema-driven/index.js.map +1 -0
  64. package/dist/cli/schema-driven/schema-loader.d.ts +115 -0
  65. package/dist/cli/schema-driven/schema-loader.d.ts.map +1 -0
  66. package/dist/cli/schema-driven/schema-loader.js +270 -0
  67. package/dist/cli/schema-driven/schema-loader.js.map +1 -0
  68. package/dist/cli/schema-driven/ui-generator.d.ts +88 -0
  69. package/dist/cli/schema-driven/ui-generator.d.ts.map +1 -0
  70. package/dist/cli/schema-driven/ui-generator.js +326 -0
  71. package/dist/cli/schema-driven/ui-generator.js.map +1 -0
  72. package/dist/cli/wizard/interactive-wizard.d.ts +26 -0
  73. package/dist/cli/wizard/interactive-wizard.d.ts.map +1 -0
  74. package/dist/cli/wizard/interactive-wizard.js +296 -0
  75. package/dist/cli/wizard/interactive-wizard.js.map +1 -0
  76. package/dist/cli/wizard/template-catalog.d.ts +32 -0
  77. package/dist/cli/wizard/template-catalog.d.ts.map +1 -0
  78. package/dist/cli/wizard/template-catalog.js +99 -0
  79. package/dist/cli/wizard/template-catalog.js.map +1 -0
  80. package/dist/cli/wizard/use-cases.d.ts +37 -0
  81. package/dist/cli/wizard/use-cases.d.ts.map +1 -0
  82. package/dist/cli/wizard/use-cases.js +157 -0
  83. package/dist/cli/wizard/use-cases.js.map +1 -0
  84. package/dist/di-container.d.ts.map +1 -1
  85. package/dist/di-container.js +2 -0
  86. package/dist/di-container.js.map +1 -1
  87. package/dist/package.json +33 -11
  88. package/dist/runtime/agent-runner.d.ts +46 -0
  89. package/dist/runtime/agent-runner.d.ts.map +1 -0
  90. package/dist/runtime/agent-runner.js +346 -0
  91. package/dist/runtime/agent-runner.js.map +1 -0
  92. package/dist/sdks/kagent/crd-generator.d.ts +4 -0
  93. package/dist/sdks/kagent/crd-generator.d.ts.map +1 -1
  94. package/dist/sdks/kagent/crd-generator.js +83 -2
  95. package/dist/sdks/kagent/crd-generator.js.map +1 -1
  96. package/dist/sdks/kagent/k8s-resources-generator.d.ts +73 -0
  97. package/dist/sdks/kagent/k8s-resources-generator.d.ts.map +1 -0
  98. package/dist/sdks/kagent/k8s-resources-generator.js +286 -0
  99. package/dist/sdks/kagent/k8s-resources-generator.js.map +1 -0
  100. package/dist/sdks/kagent/types.d.ts +79 -0
  101. package/dist/sdks/kagent/types.d.ts.map +1 -1
  102. package/dist/sdks/shared/validation.d.ts +2 -2
  103. package/dist/services/cost-estimation/optimization-patterns.d.ts +23 -0
  104. package/dist/services/cost-estimation/optimization-patterns.d.ts.map +1 -0
  105. package/dist/services/cost-estimation/optimization-patterns.js +147 -0
  106. package/dist/services/cost-estimation/optimization-patterns.js.map +1 -0
  107. package/dist/services/cost-estimation/pricing.d.ts +29 -0
  108. package/dist/services/cost-estimation/pricing.d.ts.map +1 -0
  109. package/dist/services/cost-estimation/pricing.js +225 -0
  110. package/dist/services/cost-estimation/pricing.js.map +1 -0
  111. package/dist/services/cost-estimation/scenario-estimator.d.ts +59 -0
  112. package/dist/services/cost-estimation/scenario-estimator.d.ts.map +1 -0
  113. package/dist/services/cost-estimation/scenario-estimator.js +145 -0
  114. package/dist/services/cost-estimation/scenario-estimator.js.map +1 -0
  115. package/dist/services/cost-estimation/token-counter.service.d.ts +51 -0
  116. package/dist/services/cost-estimation/token-counter.service.d.ts.map +1 -0
  117. package/dist/services/cost-estimation/token-counter.service.js +125 -0
  118. package/dist/services/cost-estimation/token-counter.service.js.map +1 -0
  119. package/dist/services/dev-server/dev-server.service.d.ts +121 -0
  120. package/dist/services/dev-server/dev-server.service.d.ts.map +1 -0
  121. package/dist/services/dev-server/dev-server.service.js +290 -0
  122. package/dist/services/dev-server/dev-server.service.js.map +1 -0
  123. package/dist/services/dev-server/file-watcher.d.ts +101 -0
  124. package/dist/services/dev-server/file-watcher.d.ts.map +1 -0
  125. package/dist/services/dev-server/file-watcher.js +190 -0
  126. package/dist/services/dev-server/file-watcher.js.map +1 -0
  127. package/dist/services/dev-server/live-validator.d.ts +157 -0
  128. package/dist/services/dev-server/live-validator.d.ts.map +1 -0
  129. package/dist/services/dev-server/live-validator.js +301 -0
  130. package/dist/services/dev-server/live-validator.js.map +1 -0
  131. package/dist/services/dev-server/websocket-server.d.ts +137 -0
  132. package/dist/services/dev-server/websocket-server.d.ts.map +1 -0
  133. package/dist/services/dev-server/websocket-server.js +229 -0
  134. package/dist/services/dev-server/websocket-server.js.map +1 -0
  135. package/dist/services/export/anthropic/anthropic-exporter.d.ts +70 -0
  136. package/dist/services/export/anthropic/anthropic-exporter.d.ts.map +1 -0
  137. package/dist/services/export/anthropic/anthropic-exporter.js +576 -0
  138. package/dist/services/export/anthropic/anthropic-exporter.js.map +1 -0
  139. package/dist/services/export/anthropic/api-generator.d.ts +39 -0
  140. package/dist/services/export/anthropic/api-generator.d.ts.map +1 -0
  141. package/dist/services/export/anthropic/api-generator.js +395 -0
  142. package/dist/services/export/anthropic/api-generator.js.map +1 -0
  143. package/dist/services/export/anthropic/index.d.ts +18 -0
  144. package/dist/services/export/anthropic/index.d.ts.map +1 -0
  145. package/dist/services/export/anthropic/index.js +16 -0
  146. package/dist/services/export/anthropic/index.js.map +1 -0
  147. package/dist/services/export/anthropic/tools-generator.d.ts +35 -0
  148. package/dist/services/export/anthropic/tools-generator.d.ts.map +1 -0
  149. package/dist/services/export/anthropic/tools-generator.js +260 -0
  150. package/dist/services/export/anthropic/tools-generator.js.map +1 -0
  151. package/dist/services/export/langchain/api-generator.d.ts +17 -0
  152. package/dist/services/export/langchain/api-generator.d.ts.map +1 -0
  153. package/dist/services/export/langchain/api-generator.js +375 -0
  154. package/dist/services/export/langchain/api-generator.js.map +1 -0
  155. package/dist/services/export/langchain/callbacks-generator.d.ts +63 -0
  156. package/dist/services/export/langchain/callbacks-generator.d.ts.map +1 -0
  157. package/dist/services/export/langchain/callbacks-generator.js +408 -0
  158. package/dist/services/export/langchain/callbacks-generator.js.map +1 -0
  159. package/dist/services/export/langchain/error-handling-generator.d.ts +76 -0
  160. package/dist/services/export/langchain/error-handling-generator.d.ts.map +1 -0
  161. package/dist/services/export/langchain/error-handling-generator.js +522 -0
  162. package/dist/services/export/langchain/error-handling-generator.js.map +1 -0
  163. package/dist/services/export/langchain/index.d.ts +17 -0
  164. package/dist/services/export/langchain/index.d.ts.map +1 -0
  165. package/dist/services/export/langchain/index.js +13 -0
  166. package/dist/services/export/langchain/index.js.map +1 -0
  167. package/dist/services/export/langchain/langchain-exporter.d.ts +174 -0
  168. package/dist/services/export/langchain/langchain-exporter.d.ts.map +1 -0
  169. package/dist/services/export/langchain/langchain-exporter.js +953 -0
  170. package/dist/services/export/langchain/langchain-exporter.js.map +1 -0
  171. package/dist/services/export/langchain/langgraph-generator.d.ts +86 -0
  172. package/dist/services/export/langchain/langgraph-generator.d.ts.map +1 -0
  173. package/dist/services/export/langchain/langgraph-generator.js +473 -0
  174. package/dist/services/export/langchain/langgraph-generator.js.map +1 -0
  175. package/dist/services/export/langchain/langserve-generator.d.ts +95 -0
  176. package/dist/services/export/langchain/langserve-generator.d.ts.map +1 -0
  177. package/dist/services/export/langchain/langserve-generator.js +807 -0
  178. package/dist/services/export/langchain/langserve-generator.js.map +1 -0
  179. package/dist/services/export/langchain/memory-generator.d.ts +71 -0
  180. package/dist/services/export/langchain/memory-generator.d.ts.map +1 -0
  181. package/dist/services/export/langchain/memory-generator.js +1182 -0
  182. package/dist/services/export/langchain/memory-generator.js.map +1 -0
  183. package/dist/services/export/langchain/openapi-generator.d.ts +20 -0
  184. package/dist/services/export/langchain/openapi-generator.d.ts.map +1 -0
  185. package/dist/services/export/langchain/openapi-generator.js +364 -0
  186. package/dist/services/export/langchain/openapi-generator.js.map +1 -0
  187. package/dist/services/export/langchain/plan-execute-generator.d.ts +60 -0
  188. package/dist/services/export/langchain/plan-execute-generator.d.ts.map +1 -0
  189. package/dist/services/export/langchain/plan-execute-generator.js +679 -0
  190. package/dist/services/export/langchain/plan-execute-generator.js.map +1 -0
  191. package/dist/services/export/langchain/streaming-generator.d.ts +66 -0
  192. package/dist/services/export/langchain/streaming-generator.d.ts.map +1 -0
  193. package/dist/services/export/langchain/streaming-generator.js +749 -0
  194. package/dist/services/export/langchain/streaming-generator.js.map +1 -0
  195. package/dist/services/export/langchain/tools-generator.d.ts +67 -0
  196. package/dist/services/export/langchain/tools-generator.d.ts.map +1 -0
  197. package/dist/services/export/langchain/tools-generator.js +543 -0
  198. package/dist/services/export/langchain/tools-generator.js.map +1 -0
  199. package/dist/services/export/npm/express-generator.d.ts +23 -0
  200. package/dist/services/export/npm/express-generator.d.ts.map +1 -0
  201. package/dist/services/export/npm/express-generator.js +296 -0
  202. package/dist/services/export/npm/express-generator.js.map +1 -0
  203. package/dist/services/export/npm/index.d.ts +13 -0
  204. package/dist/services/export/npm/index.d.ts.map +1 -0
  205. package/dist/services/export/npm/index.js +11 -0
  206. package/dist/services/export/npm/index.js.map +1 -0
  207. package/dist/services/export/npm/npm-exporter.d.ts +142 -0
  208. package/dist/services/export/npm/npm-exporter.d.ts.map +1 -0
  209. package/dist/services/export/npm/npm-exporter.js +480 -0
  210. package/dist/services/export/npm/npm-exporter.js.map +1 -0
  211. package/dist/services/export/npm/openapi-generator.d.ts +19 -0
  212. package/dist/services/export/npm/openapi-generator.d.ts.map +1 -0
  213. package/dist/services/export/npm/openapi-generator.js +428 -0
  214. package/dist/services/export/npm/openapi-generator.js.map +1 -0
  215. package/dist/services/export/npm/package-json-generator.d.ts +31 -0
  216. package/dist/services/export/npm/package-json-generator.d.ts.map +1 -0
  217. package/dist/services/export/npm/package-json-generator.js +153 -0
  218. package/dist/services/export/npm/package-json-generator.js.map +1 -0
  219. package/dist/services/export/npm/typescript-generator.d.ts +69 -0
  220. package/dist/services/export/npm/typescript-generator.d.ts.map +1 -0
  221. package/dist/services/export/npm/typescript-generator.js +437 -0
  222. package/dist/services/export/npm/typescript-generator.js.map +1 -0
  223. package/dist/services/export/testing/index.d.ts +8 -0
  224. package/dist/services/export/testing/index.d.ts.map +1 -0
  225. package/dist/services/export/testing/index.js +7 -0
  226. package/dist/services/export/testing/index.js.map +1 -0
  227. package/dist/services/export/testing/test-generator.d.ts +178 -0
  228. package/dist/services/export/testing/test-generator.d.ts.map +1 -0
  229. package/dist/services/export/testing/test-generator.js +2542 -0
  230. package/dist/services/export/testing/test-generator.js.map +1 -0
  231. package/dist/services/test-runner/mock-llm.service.d.ts +77 -0
  232. package/dist/services/test-runner/mock-llm.service.d.ts.map +1 -0
  233. package/dist/services/test-runner/mock-llm.service.js +173 -0
  234. package/dist/services/test-runner/mock-llm.service.js.map +1 -0
  235. package/dist/services/test-runner/scenarios.d.ts +36 -0
  236. package/dist/services/test-runner/scenarios.d.ts.map +1 -0
  237. package/dist/services/test-runner/scenarios.js +196 -0
  238. package/dist/services/test-runner/scenarios.js.map +1 -0
  239. package/dist/services/test-runner/test-runner.service.d.ts +19 -1
  240. package/dist/services/test-runner/test-runner.service.d.ts.map +1 -1
  241. package/dist/services/test-runner/test-runner.service.js +72 -6
  242. package/dist/services/test-runner/test-runner.service.js.map +1 -1
  243. package/dist/services/validation/best-practices-validator.d.ts +84 -0
  244. package/dist/services/validation/best-practices-validator.d.ts.map +1 -0
  245. package/dist/services/validation/best-practices-validator.js +499 -0
  246. package/dist/services/validation/best-practices-validator.js.map +1 -0
  247. package/dist/services/validation/cost-estimator.d.ts +69 -0
  248. package/dist/services/validation/cost-estimator.d.ts.map +1 -0
  249. package/dist/services/validation/cost-estimator.js +221 -0
  250. package/dist/services/validation/cost-estimator.js.map +1 -0
  251. package/dist/services/validation/enhanced-validator.d.ts +78 -0
  252. package/dist/services/validation/enhanced-validator.d.ts.map +1 -0
  253. package/dist/services/validation/enhanced-validator.js +212 -0
  254. package/dist/services/validation/enhanced-validator.js.map +1 -0
  255. package/dist/services/validation/index.d.ts +13 -0
  256. package/dist/services/validation/index.d.ts.map +1 -0
  257. package/dist/services/validation/index.js +9 -0
  258. package/dist/services/validation/index.js.map +1 -0
  259. package/dist/services/validation/security-validator.d.ts +81 -0
  260. package/dist/services/validation/security-validator.d.ts.map +1 -0
  261. package/dist/services/validation/security-validator.js +328 -0
  262. package/dist/services/validation/security-validator.js.map +1 -0
  263. package/dist/services/wizard/prompts.d.ts +71 -0
  264. package/dist/services/wizard/prompts.d.ts.map +1 -0
  265. package/dist/services/wizard/prompts.js +322 -0
  266. package/dist/services/wizard/prompts.js.map +1 -0
  267. package/dist/services/wizard/wizard.service.d.ts +60 -0
  268. package/dist/services/wizard/wizard.service.d.ts.map +1 -0
  269. package/dist/services/wizard/wizard.service.js +261 -0
  270. package/dist/services/wizard/wizard.service.js.map +1 -0
  271. package/dist/types/personality.zod.d.ts +23 -23
  272. package/dist/utils/version.d.ts +1 -1
  273. package/dist/utils/version.js +1 -1
  274. package/dist/version-management/core/version-manager.test.js.map +1 -1
  275. package/dist/version.d.ts +62 -0
  276. package/dist/version.d.ts.map +1 -0
  277. package/dist/version.js +73 -0
  278. package/dist/version.js.map +1 -0
  279. package/examples/a2a/agent-handoff.ossa.yaml +1 -1
  280. package/examples/a2a/service-discovery.ossa.yaml +1 -1
  281. package/examples/adapters/drupal-eca-mapping.yaml +1 -1
  282. package/examples/adapters/drupal-eca-task.yaml +1 -1
  283. package/examples/adapters/drupal-flowdrop-mapping.yaml +1 -1
  284. package/examples/adapters/drupal-maestro-mapping.yaml +1 -1
  285. package/examples/adapters/mistral-agent.yaml +1 -1
  286. package/examples/adapters/symfony-messenger-task.yaml +1 -1
  287. package/examples/adapters/symfony-messenger-workflow.yaml +1 -1
  288. package/examples/adk-integration/code-review-workflow.yml +1 -1
  289. package/examples/adk-integration/customer-support.yml +1 -1
  290. package/examples/adk-integration/data-pipeline.yml +1 -1
  291. package/examples/advanced/reasoning-agent.yaml +1 -1
  292. package/examples/advanced/workflows/hybrid-model-strategy.yaml +1 -1
  293. package/examples/agent-manifests/critics/critic-agent.yaml +1 -1
  294. package/examples/agent-manifests/governors/governor-agent.yaml +1 -1
  295. package/examples/agent-manifests/integrators/integrator-agent.yaml +1 -1
  296. package/examples/agent-manifests/judges/judge-agent.yaml +1 -1
  297. package/examples/agent-manifests/monitors/monitor-agent.yaml +1 -1
  298. package/examples/agent-manifests/orchestrators/orchestrator-agent.yaml +1 -1
  299. package/examples/agent-manifests/sample-compliant-agent.yaml +1 -1
  300. package/examples/agent-manifests/workers/worker-agent.yaml +1 -1
  301. package/examples/agents/01-customer-support-bot/.env.example +32 -0
  302. package/examples/agents/01-customer-support-bot/Dockerfile +30 -0
  303. package/examples/agents/01-customer-support-bot/README.md +295 -0
  304. package/examples/agents/01-customer-support-bot/agent.ossa.yaml +172 -0
  305. package/examples/agents/01-customer-support-bot/docker-compose.yml +55 -0
  306. package/examples/agents/01-customer-support-bot/openapi.yaml +238 -0
  307. package/examples/agents/01-customer-support-bot/package.json +48 -0
  308. package/examples/agents/02-code-review-agent/README.md +72 -0
  309. package/examples/agents/02-code-review-agent/agent.ossa.yaml +239 -0
  310. package/examples/agents/02-code-review-agent/docker-compose.yml +22 -0
  311. package/examples/agents/02-code-review-agent/openapi.yaml +150 -0
  312. package/examples/agents/03-data-analysis-agent/README.md +51 -0
  313. package/examples/agents/03-data-analysis-agent/agent.ossa.yaml +97 -0
  314. package/examples/agents/03-data-analysis-agent/openapi.yaml +74 -0
  315. package/examples/agents/04-content-moderator/README.md +55 -0
  316. package/examples/agents/04-content-moderator/agent.ossa.yaml +131 -0
  317. package/examples/agents/04-content-moderator/openapi.yaml +50 -0
  318. package/examples/agents/05-sales-assistant/README.md +37 -0
  319. package/examples/agents/05-sales-assistant/agent.ossa.yaml +146 -0
  320. package/examples/agents/05-sales-assistant/openapi.yaml +59 -0
  321. package/examples/agents/06-devops-agent/README.md +39 -0
  322. package/examples/agents/06-devops-agent/agent.ossa.yaml +141 -0
  323. package/examples/agents/06-devops-agent/openapi.yaml +51 -0
  324. package/examples/agents/07-research-assistant/README.md +31 -0
  325. package/examples/agents/07-research-assistant/agent.ossa.yaml +119 -0
  326. package/examples/agents/07-research-assistant/openapi.yaml +56 -0
  327. package/examples/agents/08-email-triage-agent/README.md +33 -0
  328. package/examples/agents/08-email-triage-agent/agent.ossa.yaml +133 -0
  329. package/examples/agents/08-email-triage-agent/openapi.yaml +41 -0
  330. package/examples/agents/09-security-scanner/README.md +49 -0
  331. package/examples/agents/09-security-scanner/agent.ossa.yaml +174 -0
  332. package/examples/agents/09-security-scanner/openapi.yaml +46 -0
  333. package/examples/agents/10-meeting-assistant/README.md +53 -0
  334. package/examples/agents/10-meeting-assistant/agent.ossa.yaml +211 -0
  335. package/examples/agents/10-meeting-assistant/docker-compose.yml +27 -0
  336. package/examples/agents/10-meeting-assistant/openapi.yaml +131 -0
  337. package/examples/agents/COMPLETION_REPORT.txt +272 -0
  338. package/examples/agents/INDEX.md +296 -0
  339. package/examples/agents/README.md +452 -0
  340. package/examples/agents/SUMMARY.md +362 -0
  341. package/examples/agents/TEST_RESULTS.md +458 -0
  342. package/examples/agents/architecture-healer-enterprise.yaml +1 -1
  343. package/examples/agents/dependency-healer-npm.yaml +1 -1
  344. package/examples/agents/spec-healer-openapi.yaml +1 -1
  345. package/examples/agents/wiki-healer-production.yaml +1 -1
  346. package/examples/agents-md/code-agent.ossa.json +1 -1
  347. package/examples/agents-md/monorepo-agent.ossa.yaml +1 -1
  348. package/examples/anthropic/claude-assistant.ossa.json +1 -1
  349. package/examples/autogen/multi-agent.ossa.json +1 -1
  350. package/examples/autonomous-evolution/self-evolving-agent.ossa.yaml +1 -1
  351. package/examples/build-once-use-everywhere/agent.ossa.yaml +1 -1
  352. package/examples/claude-code/code-reviewer.ossa.yaml +1 -1
  353. package/examples/claude-code/ossa-validator.ossa.yaml +1 -1
  354. package/examples/common_npm/agent-router.ossa.yaml +2 -2
  355. package/examples/contracts/data-consumer.ossa.yaml +1 -1
  356. package/examples/contracts/data-producer-v2.ossa.yaml +1 -1
  357. package/examples/contracts/data-producer.ossa.yaml +1 -1
  358. package/examples/crewai/research-team.ossa.json +1 -1
  359. package/examples/cursor/code-review-agent.ossa.json +1 -1
  360. package/examples/drupal/QUICKSTART.md +439 -0
  361. package/examples/drupal/ai_agents_ossa-module/.agents/example-agent/agent.ossa.yaml +1 -1
  362. package/examples/drupal/content-moderator.ossa.yaml +107 -0
  363. package/examples/drupal/gitlab-ml-recommender.ossa.yaml +2 -2
  364. package/examples/economics/marketplace-agent.ossa.json +1 -1
  365. package/examples/export/langchain/production-agent-with-memory/README.md +373 -0
  366. package/examples/export/langchain/production-agent-with-memory/agent.ossa.yaml +97 -0
  367. package/examples/export/langchain/production-agent-with-streaming/README.md +617 -0
  368. package/examples/export/langchain/production-agent-with-streaming/agent.ossa.yaml +100 -0
  369. package/examples/export/langchain/production-agent-with-streaming/client-example.py +263 -0
  370. package/examples/export/langchain/production-agent-with-tools/README.md +296 -0
  371. package/examples/export/langchain/production-agent-with-tools/agent.ossa.yaml +216 -0
  372. package/examples/export/langchain-export-example.ts +246 -0
  373. package/examples/export/langserve-export-example.ts +246 -0
  374. package/examples/export/test-generation-example.ts +457 -0
  375. package/examples/extensions/agents-md-advanced.yml +1 -1
  376. package/examples/extensions/agents-md-basic.yml +1 -1
  377. package/examples/extensions/agents-md-sync.yml +1 -1
  378. package/examples/extensions/agents-md-v1.yml +1 -1
  379. package/examples/extensions/drupal-v1.yml +1 -1
  380. package/examples/extensions/encryption-multi-provider.yaml +4 -4
  381. package/examples/extensions/kagent-v1.yml +1 -1
  382. package/examples/extensions/knowledge-sources.yaml +1 -1
  383. package/examples/extensions/mcp-full-featured.yaml +1 -1
  384. package/examples/genetics/breeding-agent.ossa.json +1 -1
  385. package/examples/getting-started/01-minimal-agent.ossa.yaml +1 -1
  386. package/examples/getting-started/02-agent-with-tools.ossa.yaml +1 -1
  387. package/examples/getting-started/03-agent-with-safety.ossa.yaml +1 -1
  388. package/examples/getting-started/04-agent-with-messaging.ossa.yaml +1 -1
  389. package/examples/getting-started/05-workflow-composition.ossa.yaml +1 -1
  390. package/examples/getting-started/hello-world-complete.ossa.yaml +1 -1
  391. package/examples/integration-patterns/agent-to-agent-orchestration.ossa.yaml +1 -1
  392. package/examples/kagent/compliance-validator.ossa.yaml +1 -1
  393. package/examples/kagent/cost-optimizer.ossa.yaml +1 -1
  394. package/examples/kagent/documentation-agent.ossa.yaml +1 -1
  395. package/examples/kagent/k8s-troubleshooter-v1.ossa.yaml +2 -2
  396. package/examples/kagent/k8s-troubleshooter.ossa.yaml +1 -1
  397. package/examples/kagent/security-scanner.ossa.yaml +1 -1
  398. package/examples/langchain/chain-agent.ossa.json +1 -1
  399. package/examples/langflow/workflow-agent.ossa.json +1 -1
  400. package/examples/langgraph/state-machine-agent.ossa.json +1 -1
  401. package/examples/lifecycle/mentoring-agent.ossa.json +1 -1
  402. package/examples/llamaindex/rag-agent.ossa.json +1 -1
  403. package/examples/mcp/database-mcp.ossa.yaml +1 -1
  404. package/examples/mcp/filesystem-mcp.ossa.yaml +1 -1
  405. package/examples/messaging/dependency-healer.ossa.yaml +1 -1
  406. package/examples/messaging/incident-responder.ossa.yaml +1 -1
  407. package/examples/messaging/routing-rules.ossa.yaml +1 -1
  408. package/examples/messaging/security-scanner.ossa.yaml +1 -1
  409. package/examples/migration-guides/from-langchain-to-ossa.yaml +4 -4
  410. package/examples/migrations/langchain/01-python-react-agent-after.ossa.yaml +1 -1
  411. package/examples/migrations/langchain/02-typescript-conversational-after.ossa.yaml +1 -1
  412. package/examples/migrations/langchain/03-sequential-chain-after.ossa.yaml +1 -1
  413. package/examples/migrations/langchain/04-config-based-after.ossa.yaml +1 -1
  414. package/examples/migrations/swarm-to-ossa/after-handoffs.ossa.yaml +6 -6
  415. package/examples/migrations/swarm-to-ossa/after-triage-agent.ossa.yaml +3 -3
  416. package/examples/multi-agent/conditional-router.ossa.yaml +1 -1
  417. package/examples/multi-agent/parallel-execution.ossa.yaml +1 -1
  418. package/examples/multi-agent/sequential-pipeline.ossa.yaml +1 -1
  419. package/examples/multi-agent-research-workflow.ossa.yaml +133 -0
  420. package/examples/multi-platform/single-manifest/agent.ossa.yaml +1 -1
  421. package/examples/npm-export-example.ts +150 -0
  422. package/examples/observability/activity-stream-full.yaml +1 -1
  423. package/examples/openai/basic-agent.ossa.yaml +1 -1
  424. package/examples/openai/multi-tool-agent.ossa.json +1 -1
  425. package/examples/openai/swarm-agent.ossa.json +1 -1
  426. package/examples/ossa-templates/01-code-assistant.ossa.yaml +1 -1
  427. package/examples/ossa-templates/02-security-scanner.ossa.yaml +1 -1
  428. package/examples/ossa-templates/03-ci-pipeline.ossa.yaml +1 -1
  429. package/examples/ossa-templates/04-code-reviewer.ossa.yaml +1 -1
  430. package/examples/ossa-templates/05-doc-generator.ossa.yaml +1 -1
  431. package/examples/ossa-templates/06-compliance-validator.ossa.yaml +1 -1
  432. package/examples/ossa-templates/07-workflow-orchestrator.ossa.yaml +1 -1
  433. package/examples/ossa-templates/08-content-writer.ossa.yaml +1 -1
  434. package/examples/ossa-templates/09-test-generator.ossa.yaml +1 -1
  435. package/examples/ossa-templates/10-data-transformer.ossa.yaml +1 -1
  436. package/examples/ossa-templates/11-react-performance-expert.ossa.yaml +1 -1
  437. package/examples/ossa-templates/12-typescript-type-safety-expert.ossa.yaml +1 -1
  438. package/examples/ossa-templates/13-accessibility-champion.ossa.yaml +1 -1
  439. package/examples/ossa-templates/14-security-hardening-agent.ossa.yaml +1 -1
  440. package/examples/production/document-analyzer-openai.yml +1 -1
  441. package/examples/production-ready/01-customer-support-bot/.env.example +32 -0
  442. package/examples/production-ready/01-customer-support-bot/Dockerfile +30 -0
  443. package/examples/production-ready/01-customer-support-bot/README.md +295 -0
  444. package/examples/production-ready/01-customer-support-bot/agent.ossa.yaml +172 -0
  445. package/examples/production-ready/01-customer-support-bot/docker-compose.yml +55 -0
  446. package/examples/production-ready/01-customer-support-bot/openapi.yaml +238 -0
  447. package/examples/production-ready/01-customer-support-bot/package.json +48 -0
  448. package/examples/production-ready/02-code-review-agent/README.md +72 -0
  449. package/examples/production-ready/02-code-review-agent/agent.ossa.yaml +239 -0
  450. package/examples/production-ready/02-code-review-agent/docker-compose.yml +22 -0
  451. package/examples/production-ready/02-code-review-agent/openapi.yaml +150 -0
  452. package/examples/production-ready/03-data-analysis-agent/README.md +51 -0
  453. package/examples/production-ready/03-data-analysis-agent/agent.ossa.yaml +97 -0
  454. package/examples/production-ready/03-data-analysis-agent/openapi.yaml +74 -0
  455. package/examples/production-ready/04-content-moderator/README.md +55 -0
  456. package/examples/production-ready/04-content-moderator/agent.ossa.yaml +131 -0
  457. package/examples/production-ready/04-content-moderator/openapi.yaml +50 -0
  458. package/examples/production-ready/05-sales-assistant/README.md +37 -0
  459. package/examples/production-ready/05-sales-assistant/agent.ossa.yaml +146 -0
  460. package/examples/production-ready/05-sales-assistant/openapi.yaml +59 -0
  461. package/examples/production-ready/06-devops-agent/README.md +39 -0
  462. package/examples/production-ready/06-devops-agent/agent.ossa.yaml +141 -0
  463. package/examples/production-ready/06-devops-agent/openapi.yaml +51 -0
  464. package/examples/production-ready/07-research-assistant/README.md +31 -0
  465. package/examples/production-ready/07-research-assistant/agent.ossa.yaml +119 -0
  466. package/examples/production-ready/07-research-assistant/openapi.yaml +56 -0
  467. package/examples/production-ready/08-email-triage-agent/README.md +33 -0
  468. package/examples/production-ready/08-email-triage-agent/agent.ossa.yaml +133 -0
  469. package/examples/production-ready/08-email-triage-agent/openapi.yaml +41 -0
  470. package/examples/production-ready/09-security-scanner/README.md +49 -0
  471. package/examples/production-ready/09-security-scanner/agent.ossa.yaml +174 -0
  472. package/examples/production-ready/09-security-scanner/openapi.yaml +46 -0
  473. package/examples/production-ready/10-meeting-assistant/README.md +53 -0
  474. package/examples/production-ready/10-meeting-assistant/agent.ossa.yaml +211 -0
  475. package/examples/production-ready/10-meeting-assistant/docker-compose.yml +27 -0
  476. package/examples/production-ready/10-meeting-assistant/openapi.yaml +131 -0
  477. package/examples/production-ready/COMPLETION_REPORT.txt +272 -0
  478. package/examples/production-ready/INDEX.md +296 -0
  479. package/examples/production-ready/README.md +452 -0
  480. package/examples/production-ready/SUMMARY.md +362 -0
  481. package/examples/production-ready/TEST_RESULTS.md +458 -0
  482. package/examples/quickstart/support-agent.ossa.yaml +1 -1
  483. package/examples/real-world/gitlab-cicd-optimizer.ossa.yaml +1 -1
  484. package/examples/real-world/rag-documentation-assistant.ossa.yaml +1 -1
  485. package/examples/registry/agents/code-reviewer/agent.yaml +1 -1
  486. package/examples/registry/agents/security-scanner/agent.yaml +1 -1
  487. package/examples/runtime-adapters/bedrock-claude-example.ossa.yaml +1 -1
  488. package/examples/schema/reusable-components.yaml +1 -1
  489. package/examples/showcase/ci-pipeline.ossa.yaml +1 -1
  490. package/examples/showcase/code-assistant.ossa.yaml +1 -1
  491. package/examples/showcase/code-reviewer.ossa.yaml +1 -1
  492. package/examples/showcase/compliance-validator.ossa.yaml +1 -1
  493. package/examples/showcase/content-writer.ossa.yaml +1 -1
  494. package/examples/showcase/data-transformer.ossa.yaml +1 -1
  495. package/examples/showcase/doc-generator.ossa.yaml +1 -1
  496. package/examples/showcase/security-scanner.ossa.yaml +1 -1
  497. package/examples/showcase/test-generator.ossa.yaml +1 -1
  498. package/examples/showcase/workflow-orchestrator.ossa.yaml +1 -1
  499. package/examples/skills-example.ossa.yaml +140 -0
  500. package/examples/swarm/pso-optimizer.ossa.json +1 -1
  501. package/examples/tasks/batch-email-sender.yaml +1 -1
  502. package/examples/tasks/data-transform.yaml +1 -1
  503. package/examples/tasks/publish-content.yaml +1 -1
  504. package/examples/templates/ossa-compliance.yaml +1 -1
  505. package/examples/unified/security-scanner.ossa.yaml +1 -1
  506. package/examples/v0.3.6-features/genetics-breeding-advanced.ossa.yaml +1 -1
  507. package/examples/v0.3.6-features/genetics-breeding-simple.ossa.yaml +1 -1
  508. package/examples/v0.3.6-features/genetics-fitness-scoring.ossa.yaml +1 -1
  509. package/examples/vercel/edge-agent.ossa.json +1 -1
  510. package/examples/workflows/batch-email-campaign.yaml +1 -1
  511. package/examples/workflows/content-review-publish.yaml +1 -1
  512. package/examples/workflows/simple-etl.yaml +1 -1
  513. package/openapi/cli/openapi.yaml +221 -5
  514. package/package.json +31 -9
  515. package/dist/cli/commands/export-v2.command.d.ts +0 -7
  516. package/dist/cli/commands/export-v2.command.d.ts.map +0 -1
  517. package/dist/cli/commands/export-v2.command.js.map +0 -1
@@ -0,0 +1,1875 @@
1
+ /**
2
+ * OSSA Wizard v2.0 - BEAST MODE EDITION
3
+ *
4
+ * The most comprehensive agent creation wizard ever built.
5
+ * Covers 105+ OSSA v0.4 features with modern UX using inquirer.
6
+ *
7
+ * Features:
8
+ * - Template/preset system
9
+ * - Skills integration
10
+ * - RAG/Vector DB configuration
11
+ * - Communication/A2A messaging
12
+ * - State/memory management
13
+ * - Workflows & orchestration
14
+ * - Cost management & budgeting
15
+ * - Complete LLM configuration with fallbacks
16
+ * - All 22+ framework integrations
17
+ * - Auto-generation: agents.md, llms.txt
18
+ * - Knowledge graph integration
19
+ * - Deployment targets
20
+ * - Testing configuration
21
+ * - And SO MUCH MORE!
22
+ */
23
+ import { Command } from 'commander';
24
+ import inquirer from 'inquirer';
25
+ import chalk from 'chalk';
26
+ import * as fs from 'fs';
27
+ import * as path from 'path';
28
+ import * as yaml from 'yaml';
29
+ import { getApiVersion } from '../../utils/version';
30
+ import { printBanner, printWizardBanner, printTemplates, printCompletion, printProgress, printStep, printSuccess, printInfo, printError, } from '../banner.js';
31
+ // =============================================================================
32
+ // TEMPLATES & PRESETS
33
+ // =============================================================================
34
+ const AGENT_TEMPLATES = [
35
+ {
36
+ id: 'code-reviewer',
37
+ name: 'Code Reviewer',
38
+ description: 'Automated code review with best practices enforcement',
39
+ category: 'development',
40
+ icon: '🔍',
41
+ features: [
42
+ 'Code compliance',
43
+ 'Knowledge sources (React, TypeScript, etc.)',
44
+ 'Pre-commit hooks',
45
+ 'Violation tracking',
46
+ ],
47
+ manifest: {
48
+ metadata: {
49
+ name: 'code-reviewer',
50
+ description: 'Automated code review agent with best practices enforcement',
51
+ },
52
+ spec: {
53
+ role: `You are an expert code reviewer specializing in modern software development practices.
54
+
55
+ Your responsibilities:
56
+ - Review code changes for quality, security, and best practices
57
+ - Enforce coding standards and conventions
58
+ - Identify potential bugs, vulnerabilities, and performance issues
59
+ - Provide constructive feedback with specific improvement suggestions
60
+ - Reference relevant best practices and documentation
61
+
62
+ Guidelines:
63
+ - Be thorough but constructive in reviews
64
+ - Prioritize critical issues (security, correctness) over style
65
+ - Provide code examples when suggesting improvements
66
+ - Reference official documentation and standards
67
+ - Track all reviews in knowledge graph for continuous learning`,
68
+ llm: {
69
+ provider: 'anthropic',
70
+ model: 'claude-sonnet-4-20250514',
71
+ temperature: 0.3,
72
+ },
73
+ code_compliance: {
74
+ enabled: true,
75
+ enforcement_hooks: {
76
+ pre_write: { enabled: true, action: 'query' },
77
+ pre_commit: { enabled: true, action: 'block', check_critical: true },
78
+ pre_merge: { enabled: true, action: 'block', require_approval: true },
79
+ build: { enabled: true, fail_on_violations: true },
80
+ },
81
+ },
82
+ },
83
+ },
84
+ },
85
+ {
86
+ id: 'web-scraper',
87
+ name: 'Web Scraper',
88
+ description: 'Extract data from websites intelligently',
89
+ category: 'data',
90
+ icon: '🕷️',
91
+ features: ['HTTP tools', 'Data extraction', 'Rate limiting', 'Error handling'],
92
+ manifest: {
93
+ metadata: {
94
+ name: 'web-scraper',
95
+ description: 'Intelligent web scraping agent with rate limiting and error handling',
96
+ },
97
+ spec: {
98
+ role: `You are a web scraping specialist that extracts structured data from websites.
99
+
100
+ Your capabilities:
101
+ - Navigate websites and extract specific data
102
+ - Handle dynamic content and JavaScript-rendered pages
103
+ - Respect robots.txt and rate limits
104
+ - Parse HTML/JSON/XML responses
105
+ - Store extracted data in structured format
106
+ - Handle errors and retries gracefully
107
+
108
+ Best practices:
109
+ - Always check robots.txt before scraping
110
+ - Implement respectful rate limiting
111
+ - Use user-agent identification
112
+ - Cache responses when appropriate
113
+ - Handle pagination automatically
114
+ - Validate extracted data`,
115
+ llm: {
116
+ provider: 'anthropic',
117
+ model: 'claude-sonnet-4-20250514',
118
+ temperature: 0.2,
119
+ },
120
+ tools: [
121
+ {
122
+ type: 'http',
123
+ name: 'fetch',
124
+ description: 'HTTP client for web requests',
125
+ },
126
+ ],
127
+ safety: {
128
+ rate_limiting: {
129
+ enabled: true,
130
+ requests_per_minute: 30,
131
+ burst_limit: 5,
132
+ },
133
+ },
134
+ },
135
+ },
136
+ },
137
+ {
138
+ id: 'data-analyst',
139
+ name: 'Data Analyst',
140
+ description: 'Analyze datasets and generate insights',
141
+ category: 'analytics',
142
+ icon: '📊',
143
+ features: ['Data processing', 'Statistical analysis', 'Visualization', 'RAG'],
144
+ manifest: {
145
+ metadata: {
146
+ name: 'data-analyst',
147
+ description: 'AI-powered data analysis agent with statistical expertise',
148
+ },
149
+ spec: {
150
+ role: `You are an expert data analyst specializing in exploratory data analysis and insight generation.
151
+
152
+ Your expertise includes:
153
+ - Statistical analysis (descriptive, inferential)
154
+ - Data visualization and storytelling
155
+ - Pattern recognition and anomaly detection
156
+ - Hypothesis testing
157
+ - Predictive modeling basics
158
+ - Data quality assessment
159
+
160
+ Approach:
161
+ - Start with data exploration and profiling
162
+ - Identify key patterns and relationships
163
+ - Generate clear, actionable insights
164
+ - Visualize findings effectively
165
+ - Provide statistical context and confidence levels
166
+ - Recommend next steps for deeper analysis`,
167
+ llm: {
168
+ provider: 'anthropic',
169
+ model: 'claude-sonnet-4-20250514',
170
+ temperature: 0.4,
171
+ },
172
+ },
173
+ },
174
+ },
175
+ {
176
+ id: 'devops-agent',
177
+ name: 'DevOps Agent',
178
+ description: 'CI/CD automation and infrastructure management',
179
+ category: 'operations',
180
+ icon: '⚙️',
181
+ features: ['CI/CD', 'Kubernetes', 'Infrastructure as Code', 'Monitoring'],
182
+ manifest: {
183
+ metadata: {
184
+ name: 'devops-agent',
185
+ description: 'DevOps automation agent for CI/CD and infrastructure',
186
+ },
187
+ spec: {
188
+ role: `You are a DevOps automation specialist managing CI/CD pipelines and infrastructure.
189
+
190
+ Your responsibilities:
191
+ - Automate deployment pipelines
192
+ - Manage Kubernetes clusters
193
+ - Monitor system health and performance
194
+ - Respond to alerts and incidents
195
+ - Implement infrastructure as code
196
+ - Enforce security and compliance
197
+
198
+ Tools and platforms:
199
+ - GitLab CI/CD, GitHub Actions
200
+ - Kubernetes, Docker
201
+ - Terraform, Ansible
202
+ - Prometheus, Grafana
203
+ - Cloud providers (AWS, GCP, Azure)
204
+
205
+ Best practices:
206
+ - Implement blue-green deployments
207
+ - Use canary releases for safety
208
+ - Maintain infrastructure as code
209
+ - Automate everything possible
210
+ - Monitor continuously
211
+ - Document all changes`,
212
+ llm: {
213
+ provider: 'anthropic',
214
+ model: 'claude-sonnet-4-20250514',
215
+ temperature: 0.2,
216
+ },
217
+ tools: [
218
+ {
219
+ type: 'kubernetes',
220
+ name: 'kubectl',
221
+ description: 'Kubernetes API access',
222
+ },
223
+ ],
224
+ },
225
+ },
226
+ },
227
+ {
228
+ id: 'support-bot',
229
+ name: 'Customer Support Bot',
230
+ description: 'Automated customer support with knowledge base',
231
+ category: 'customer_service',
232
+ icon: '💬',
233
+ features: ['RAG', 'Knowledge base', 'Multi-language', 'Sentiment analysis'],
234
+ manifest: {
235
+ metadata: {
236
+ name: 'support-bot',
237
+ description: 'AI customer support agent with knowledge base integration',
238
+ },
239
+ spec: {
240
+ role: `You are a friendly and helpful customer support agent.
241
+
242
+ Your goals:
243
+ - Provide accurate, helpful answers to customer questions
244
+ - Resolve issues quickly and efficiently
245
+ - Escalate complex issues to human agents when needed
246
+ - Maintain a positive, empathetic tone
247
+ - Learn from interactions to improve over time
248
+
249
+ Capabilities:
250
+ - Search knowledge base for answers
251
+ - Handle multiple languages
252
+ - Track conversation context
253
+ - Detect customer sentiment
254
+ - Provide product recommendations
255
+ - Process returns and refunds (with approval)
256
+
257
+ Guidelines:
258
+ - Always be polite and professional
259
+ - Acknowledge customer frustration
260
+ - Provide clear, step-by-step solutions
261
+ - Offer alternatives when needed
262
+ - Know when to escalate to humans
263
+ - Follow company policies strictly`,
264
+ llm: {
265
+ provider: 'anthropic',
266
+ model: 'claude-sonnet-4-20250514',
267
+ temperature: 0.7,
268
+ },
269
+ },
270
+ },
271
+ },
272
+ {
273
+ id: 'content-generator',
274
+ name: 'Content Generator',
275
+ description: 'Blog posts, documentation, and marketing copy',
276
+ category: 'content',
277
+ icon: '✍️',
278
+ features: ['SEO optimization', 'Multi-format', 'Brand voice', 'Fact-checking'],
279
+ manifest: {
280
+ metadata: {
281
+ name: 'content-generator',
282
+ description: 'AI content creation agent for various formats and purposes',
283
+ },
284
+ spec: {
285
+ role: `You are a professional content creator specializing in engaging, high-quality written content.
286
+
287
+ Content types you create:
288
+ - Blog posts and articles
289
+ - Technical documentation
290
+ - Marketing copy
291
+ - Social media posts
292
+ - Email campaigns
293
+ - Product descriptions
294
+ - Case studies
295
+ - White papers
296
+
297
+ Best practices:
298
+ - Match brand voice and tone
299
+ - Optimize for SEO when relevant
300
+ - Use clear, accessible language
301
+ - Structure content for readability
302
+ - Include relevant examples
303
+ - Fact-check all claims
304
+ - Cite sources when appropriate
305
+ - Adapt style to audience
306
+
307
+ Quality standards:
308
+ - Original, plagiarism-free content
309
+ - Grammatically correct
310
+ - Well-researched and accurate
311
+ - Engaging and valuable to readers
312
+ - Properly formatted`,
313
+ llm: {
314
+ provider: 'anthropic',
315
+ model: 'claude-sonnet-4-20250514',
316
+ temperature: 0.8,
317
+ },
318
+ },
319
+ },
320
+ },
321
+ {
322
+ id: 'security-scanner',
323
+ name: 'Security Scanner',
324
+ description: 'Vulnerability detection and security analysis',
325
+ category: 'security',
326
+ icon: '🔒',
327
+ features: ['SAST', 'DAST', 'Dependency scanning', 'Compliance checks'],
328
+ manifest: {
329
+ metadata: {
330
+ name: 'security-scanner',
331
+ description: 'Security vulnerability scanner and analyzer',
332
+ },
333
+ spec: {
334
+ role: `You are a security expert specializing in vulnerability detection and remediation.
335
+
336
+ Your focus areas:
337
+ - Static application security testing (SAST)
338
+ - Dependency vulnerability scanning
339
+ - Secret detection in code
340
+ - Security best practices enforcement
341
+ - Compliance verification (OWASP, CWE)
342
+ - Threat modeling
343
+
344
+ Scan types:
345
+ - Code analysis for security flaws
346
+ - Third-party dependency vulnerabilities
347
+ - Configuration security issues
348
+ - API security problems
349
+ - Container and infrastructure security
350
+
351
+ Reporting:
352
+ - Categorize by severity (Critical, High, Medium, Low)
353
+ - Provide CVE references when applicable
354
+ - Include remediation guidance
355
+ - Prioritize based on exploitability
356
+ - Track vulnerability lifecycle`,
357
+ llm: {
358
+ provider: 'anthropic',
359
+ model: 'claude-sonnet-4-20250514',
360
+ temperature: 0.1,
361
+ },
362
+ },
363
+ },
364
+ },
365
+ {
366
+ id: 'testing-agent',
367
+ name: 'Testing Agent',
368
+ description: 'Automated test generation and execution',
369
+ category: 'quality',
370
+ icon: '🧪',
371
+ features: ['Test generation', 'Coverage analysis', 'E2E testing', 'Performance testing'],
372
+ manifest: {
373
+ metadata: {
374
+ name: 'testing-agent',
375
+ description: 'Automated testing agent for comprehensive test coverage',
376
+ },
377
+ spec: {
378
+ role: `You are a QA automation specialist focused on comprehensive test coverage.
379
+
380
+ Testing capabilities:
381
+ - Unit test generation
382
+ - Integration test creation
383
+ - End-to-end test scenarios
384
+ - Performance and load testing
385
+ - Security testing
386
+ - Accessibility testing
387
+
388
+ Test strategies:
389
+ - Boundary value analysis
390
+ - Equivalence partitioning
391
+ - Error guessing
392
+ - Risk-based testing
393
+ - Property-based testing
394
+
395
+ Quality metrics:
396
+ - Code coverage (line, branch, function)
397
+ - Test execution time
398
+ - Flaky test detection
399
+ - Mutation testing scores
400
+ - Performance benchmarks
401
+
402
+ Best practices:
403
+ - Write clear, maintainable tests
404
+ - Follow AAA pattern (Arrange, Act, Assert)
405
+ - Use meaningful test names
406
+ - Isolate tests from each other
407
+ - Mock external dependencies
408
+ - Keep tests fast and reliable`,
409
+ llm: {
410
+ provider: 'anthropic',
411
+ model: 'claude-sonnet-4-20250514',
412
+ temperature: 0.3,
413
+ },
414
+ },
415
+ },
416
+ },
417
+ {
418
+ id: 'documentation-generator',
419
+ name: 'Documentation Generator',
420
+ description: 'Auto-generate project documentation',
421
+ category: 'documentation',
422
+ icon: '📚',
423
+ features: ['API docs', 'README', 'Guides', 'Diagrams'],
424
+ manifest: {
425
+ metadata: {
426
+ name: 'documentation-generator',
427
+ description: 'Automated documentation generation agent',
428
+ },
429
+ spec: {
430
+ role: `You are a technical writer specializing in clear, comprehensive documentation.
431
+
432
+ Documentation types:
433
+ - API documentation
434
+ - README files
435
+ - Getting started guides
436
+ - Architecture documentation
437
+ - Troubleshooting guides
438
+ - FAQ sections
439
+ - Release notes
440
+ - Code comments
441
+
442
+ Documentation standards:
443
+ - Clear, concise language
444
+ - Logical structure and flow
445
+ - Code examples for all features
446
+ - Visual diagrams when helpful
447
+ - Version-specific information
448
+ - Searchable and indexable
449
+ - Accessible to target audience
450
+
451
+ Tools and formats:
452
+ - Markdown, MDX
453
+ - OpenAPI/Swagger
454
+ - JSDoc, TypeDoc
455
+ - Mermaid diagrams
456
+ - Docusaurus, GitBook
457
+ - Wiki formats`,
458
+ llm: {
459
+ provider: 'anthropic',
460
+ model: 'claude-sonnet-4-20250514',
461
+ temperature: 0.5,
462
+ },
463
+ },
464
+ },
465
+ },
466
+ {
467
+ id: 'custom',
468
+ name: 'Custom Agent (Blank Slate)',
469
+ description: 'Start from scratch with full guided setup',
470
+ category: 'custom',
471
+ icon: '🎨',
472
+ features: ['Full customization', 'All features available', 'Expert mode'],
473
+ manifest: {
474
+ metadata: {
475
+ name: 'custom-agent',
476
+ description: 'Custom agent with full configuration',
477
+ },
478
+ spec: {
479
+ role: 'You are an AI agent. Your role will be defined during setup.',
480
+ llm: {
481
+ provider: 'anthropic',
482
+ model: 'claude-sonnet-4-20250514',
483
+ temperature: 0.7,
484
+ },
485
+ },
486
+ },
487
+ },
488
+ ];
489
+ // =============================================================================
490
+ // WIZARD STATE MANAGEMENT
491
+ // =============================================================================
492
+ class WizardStateManager {
493
+ state;
494
+ constructor(mode = 'guided') {
495
+ this.state = {
496
+ currentStep: 0,
497
+ totalSteps: this.calculateTotalSteps(mode),
498
+ agent: {
499
+ apiVersion: getApiVersion(),
500
+ kind: 'Agent',
501
+ metadata: {
502
+ name: '',
503
+ },
504
+ spec: {
505
+ role: '',
506
+ },
507
+ },
508
+ mode,
509
+ features: {
510
+ skills: false,
511
+ rag: false,
512
+ communication: false,
513
+ workflows: false,
514
+ observability: false,
515
+ cost_management: false,
516
+ state_management: false,
517
+ testing: false,
518
+ },
519
+ };
520
+ }
521
+ calculateTotalSteps(mode) {
522
+ // Base steps include: Template, Basic Info, LLM, Features, Tools, Safety,
523
+ // Export Targets, Testing & Validation, Output Generation
524
+ switch (mode) {
525
+ case 'quick':
526
+ return 7; // Essential steps + export + testing
527
+ case 'expert':
528
+ return 27; // All features + export + testing
529
+ case 'guided':
530
+ default:
531
+ return 17; // Common features + export + testing
532
+ }
533
+ }
534
+ nextStep(stepName) {
535
+ this.state.currentStep++;
536
+ printProgress(this.state.currentStep, this.state.totalSteps, stepName);
537
+ }
538
+ setTemplate(template) {
539
+ this.state.template = template;
540
+ this.state.agent = {
541
+ ...this.state.agent,
542
+ ...template.manifest,
543
+ };
544
+ }
545
+ enableFeature(feature) {
546
+ this.state.features[feature] = true;
547
+ }
548
+ updateAgent(updates) {
549
+ this.state.agent = {
550
+ ...this.state.agent,
551
+ ...updates,
552
+ spec: {
553
+ ...this.state.agent.spec,
554
+ ...updates.spec,
555
+ },
556
+ metadata: {
557
+ ...this.state.agent.metadata,
558
+ ...updates.metadata,
559
+ },
560
+ };
561
+ }
562
+ getAgent() {
563
+ return this.state.agent;
564
+ }
565
+ getState() {
566
+ return this.state;
567
+ }
568
+ }
569
+ // =============================================================================
570
+ // MAIN WIZARD CLASS
571
+ // =============================================================================
572
+ class OSSAWizardV2 {
573
+ state;
574
+ options;
575
+ constructor(options) {
576
+ this.options = options;
577
+ this.state = new WizardStateManager(options.mode || 'guided');
578
+ }
579
+ async run() {
580
+ try {
581
+ printBanner();
582
+ printWizardBanner();
583
+ // Step 1: Template Selection
584
+ await this.selectTemplate();
585
+ // Step 2: Basic Information
586
+ await this.configureBasicInfo();
587
+ // Step 3: LLM Configuration
588
+ await this.configureLLM();
589
+ // Step 4: Feature Selection
590
+ await this.selectFeatures();
591
+ // Conditional steps based on features
592
+ if (this.state.getState().features.skills) {
593
+ await this.configureSkills();
594
+ }
595
+ if (this.state.getState().features.rag) {
596
+ await this.configureRAG();
597
+ }
598
+ if (this.state.getState().features.communication) {
599
+ await this.configureCommunication();
600
+ }
601
+ if (this.state.getState().features.state_management) {
602
+ await this.configureStateManagement();
603
+ }
604
+ if (this.state.getState().features.cost_management) {
605
+ await this.configureCostManagement();
606
+ }
607
+ if (this.state.getState().features.observability) {
608
+ await this.configureObservability();
609
+ }
610
+ // Step N: Tools & Capabilities
611
+ await this.configureTools();
612
+ // Step N+1: Safety & Security
613
+ await this.configureSafety();
614
+ // Step N+2: Export Target Configuration
615
+ await this.configureExportTargets();
616
+ // Step N+3: Testing & Validation Configuration
617
+ await this.configureTestingValidation();
618
+ // Step N+4: Output & Generation
619
+ await this.generateOutput();
620
+ printCompletion();
621
+ this.printNextSteps();
622
+ }
623
+ catch (error) {
624
+ printError(error instanceof Error ? error.message : String(error));
625
+ process.exit(1);
626
+ }
627
+ }
628
+ // =========================================================================
629
+ // STEP IMPLEMENTATIONS
630
+ // =========================================================================
631
+ async selectTemplate() {
632
+ this.state.nextStep('Template Selection');
633
+ printStep(1, this.state.getState().totalSteps, 'Select Agent Template');
634
+ if (this.options.template) {
635
+ const template = AGENT_TEMPLATES.find((t) => t.id === this.options.template);
636
+ if (template) {
637
+ this.state.setTemplate(template);
638
+ printSuccess(`Using template: ${template.name}`);
639
+ return;
640
+ }
641
+ }
642
+ printTemplates();
643
+ const { templateId } = await inquirer.prompt([
644
+ {
645
+ type: 'list',
646
+ name: 'templateId',
647
+ message: 'Choose a template to get started:',
648
+ choices: AGENT_TEMPLATES.map((t) => ({
649
+ name: `${t.icon} ${chalk.bold(t.name)} - ${chalk.gray(t.description)}`,
650
+ value: t.id,
651
+ short: t.name,
652
+ })),
653
+ pageSize: 12,
654
+ },
655
+ ]);
656
+ const template = AGENT_TEMPLATES.find((t) => t.id === templateId);
657
+ if (template) {
658
+ this.state.setTemplate(template);
659
+ printSuccess(`Selected: ${template.name}`);
660
+ if (template.id !== 'custom') {
661
+ printInfo('Template features:');
662
+ template.features.forEach((f) => console.log(chalk.gray(` • ${f}`)));
663
+ }
664
+ }
665
+ }
666
+ async configureBasicInfo() {
667
+ this.state.nextStep('Basic Information');
668
+ printStep(2, this.state.getState().totalSteps, 'Basic Agent Information', 'Configure name, version, and description');
669
+ const answers = await inquirer.prompt([
670
+ {
671
+ type: 'input',
672
+ name: 'name',
673
+ message: 'Agent ID (DNS-1123 format):',
674
+ default: this.state.getAgent().metadata?.name || 'my-agent',
675
+ validate: (input) => {
676
+ const valid = /^[a-z0-9]([-a-z0-9]*[a-z0-9])?$/.test(input);
677
+ return valid || 'Must be DNS-1123 compliant (lowercase, alphanumeric, hyphens)';
678
+ },
679
+ },
680
+ {
681
+ type: 'input',
682
+ name: 'displayName',
683
+ message: 'Display Name:',
684
+ default: (answers) => answers.name,
685
+ },
686
+ {
687
+ type: 'input',
688
+ name: 'description',
689
+ message: 'Description:',
690
+ default: this.state.getAgent().metadata?.description || 'An OSSA-compliant agent',
691
+ },
692
+ {
693
+ type: 'input',
694
+ name: 'version',
695
+ message: 'Version (semver):',
696
+ default: '1.0.0',
697
+ validate: (input) => {
698
+ const valid = /^\d+\.\d+\.\d+(-[a-zA-Z0-9]+)?$/.test(input);
699
+ return valid || 'Must be valid semver (e.g., 1.0.0, 0.1.0-beta)';
700
+ },
701
+ },
702
+ ]);
703
+ this.state.updateAgent({
704
+ metadata: {
705
+ name: answers.name,
706
+ version: answers.version,
707
+ description: answers.description,
708
+ labels: {
709
+ 'ossa.io/created-by': 'wizard-v2',
710
+ },
711
+ },
712
+ });
713
+ printSuccess('Basic information configured');
714
+ }
715
+ async configureLLM() {
716
+ this.state.nextStep('LLM Configuration');
717
+ printStep(3, this.state.getState().totalSteps, 'LLM Configuration', 'Configure primary LLM, fallbacks, and cost controls');
718
+ const { provider } = await inquirer.prompt([
719
+ {
720
+ type: 'list',
721
+ name: 'provider',
722
+ message: 'Select LLM Provider:',
723
+ choices: [
724
+ { name: 'Anthropic Claude (Recommended)', value: 'anthropic' },
725
+ { name: 'OpenAI', value: 'openai' },
726
+ { name: 'Google Gemini', value: 'google' },
727
+ { name: 'Mistral AI', value: 'mistral' },
728
+ { name: 'Cohere', value: 'cohere' },
729
+ { name: 'Groq', value: 'groq' },
730
+ { name: 'Together AI', value: 'together' },
731
+ ],
732
+ default: 'anthropic',
733
+ },
734
+ ]);
735
+ const modelChoices = {
736
+ anthropic: [
737
+ { name: 'Claude Sonnet 4 (Recommended)', value: 'claude-sonnet-4-20250514' },
738
+ { name: 'Claude Opus 4', value: 'claude-opus-4-20250514' },
739
+ { name: 'Claude Haiku 4', value: 'claude-haiku-4-20250514' },
740
+ ],
741
+ openai: [
742
+ { name: 'GPT-4o (Recommended)', value: 'gpt-4o' },
743
+ { name: 'GPT-4 Turbo', value: 'gpt-4-turbo' },
744
+ { name: 'GPT-3.5 Turbo', value: 'gpt-3.5-turbo' },
745
+ ],
746
+ google: [
747
+ { name: 'Gemini 2.0 Flash (Recommended)', value: 'gemini-2.0-flash-exp' },
748
+ { name: 'Gemini 1.5 Pro', value: 'gemini-1.5-pro' },
749
+ ],
750
+ mistral: [
751
+ { name: 'Mistral Large', value: 'mistral-large-latest' },
752
+ { name: 'Mixtral 8x7B', value: 'mixtral-8x7b-32768' },
753
+ ],
754
+ cohere: [
755
+ { name: 'Command R+', value: 'command-r-plus' },
756
+ { name: 'Command R', value: 'command-r' },
757
+ ],
758
+ groq: [{ name: 'Llama 3.1 70B', value: 'llama-3.1-70b-versatile' }],
759
+ together: [{ name: 'Llama 3.1 70B', value: 'meta-llama/Llama-3.1-70B-Instruct-Turbo' }],
760
+ };
761
+ const llmAnswers = await inquirer.prompt([
762
+ {
763
+ type: 'list',
764
+ name: 'model',
765
+ message: 'Select Model:',
766
+ choices: modelChoices[provider] || [{ name: 'Default', value: 'default' }],
767
+ },
768
+ {
769
+ type: 'number',
770
+ name: 'temperature',
771
+ message: 'Temperature (0.0-2.0):',
772
+ default: 0.7,
773
+ validate: (input) => {
774
+ return (input >= 0 && input <= 2) || 'Must be between 0.0 and 2.0';
775
+ },
776
+ },
777
+ {
778
+ type: 'confirm',
779
+ name: 'addFallback',
780
+ message: 'Add fallback LLM for reliability?',
781
+ default: false,
782
+ },
783
+ ]);
784
+ const llmConfig = {
785
+ provider,
786
+ model: llmAnswers.model,
787
+ temperature: llmAnswers.temperature,
788
+ };
789
+ if (llmAnswers.addFallback) {
790
+ const { fallbackProvider } = await inquirer.prompt([
791
+ {
792
+ type: 'list',
793
+ name: 'fallbackProvider',
794
+ message: 'Select fallback provider:',
795
+ choices: [
796
+ { name: 'OpenAI', value: 'openai' },
797
+ { name: 'Google', value: 'google' },
798
+ { name: 'Mistral', value: 'mistral' },
799
+ ],
800
+ default: provider === 'anthropic' ? 'openai' : 'anthropic',
801
+ },
802
+ ]);
803
+ llmConfig.fallback_models = [
804
+ {
805
+ provider: fallbackProvider,
806
+ model: modelChoices[fallbackProvider]?.[0]?.value || 'default',
807
+ },
808
+ ];
809
+ printSuccess('Fallback LLM configured for high availability');
810
+ }
811
+ this.state.updateAgent({
812
+ spec: {
813
+ llm: llmConfig,
814
+ },
815
+ });
816
+ printSuccess('LLM configuration complete');
817
+ }
818
+ async selectFeatures() {
819
+ this.state.nextStep('Feature Selection');
820
+ printStep(4, this.state.getState().totalSteps, 'Select Features', 'Choose which advanced features to configure');
821
+ const { features } = await inquirer.prompt([
822
+ {
823
+ type: 'checkbox',
824
+ name: 'features',
825
+ message: 'Select features to configure:',
826
+ choices: [
827
+ {
828
+ name: '🎯 Skills System - Define reusable capabilities',
829
+ value: 'skills',
830
+ checked: false,
831
+ },
832
+ {
833
+ name: '🧠 RAG & Vector Database - Knowledge retrieval',
834
+ value: 'rag',
835
+ checked: false,
836
+ },
837
+ {
838
+ name: '📡 Communication (A2A) - Agent-to-agent messaging',
839
+ value: 'communication',
840
+ checked: false,
841
+ },
842
+ {
843
+ name: '💾 State Management - Persistent memory',
844
+ value: 'state_management',
845
+ checked: false,
846
+ },
847
+ {
848
+ name: '💰 Cost Management - Budget limits & tracking',
849
+ value: 'cost_management',
850
+ checked: false,
851
+ },
852
+ {
853
+ name: '📊 Observability - Tracing, metrics, logging',
854
+ value: 'observability',
855
+ checked: false,
856
+ },
857
+ {
858
+ name: '🧪 Testing Configuration - Test strategies',
859
+ value: 'testing',
860
+ checked: false,
861
+ },
862
+ ],
863
+ pageSize: 10,
864
+ },
865
+ ]);
866
+ features.forEach((feature) => {
867
+ this.state.enableFeature(feature);
868
+ });
869
+ printSuccess(`${features.length} features selected`);
870
+ }
871
+ async configureSkills() {
872
+ this.state.nextStep('Skills Configuration');
873
+ printStep(this.state.getState().currentStep, this.state.getState().totalSteps, 'Skills System', 'Configure reusable skills and capabilities');
874
+ printInfo('Skills allow you to define reusable capabilities that can be shared across agents');
875
+ const { addSkills } = await inquirer.prompt([
876
+ {
877
+ type: 'confirm',
878
+ name: 'addSkills',
879
+ message: 'Would you like to add Claude Skills to this agent?',
880
+ default: true,
881
+ },
882
+ ]);
883
+ if (!addSkills) {
884
+ return;
885
+ }
886
+ const skills = [];
887
+ let addingSkills = true;
888
+ while (addingSkills) {
889
+ console.log('');
890
+ printInfo(`Adding skill ${skills.length + 1}`);
891
+ const skillAnswers = await inquirer.prompt([
892
+ {
893
+ type: 'input',
894
+ name: 'id',
895
+ message: 'Skill ID (identifier):',
896
+ validate: (input) => {
897
+ const valid = /^[a-z0-9]([-a-z0-9]*[a-z0-9])?$/.test(input);
898
+ return (valid ||
899
+ 'Must be lowercase alphanumeric with hyphens (e.g., research-skill)');
900
+ },
901
+ },
902
+ {
903
+ type: 'input',
904
+ name: 'name',
905
+ message: 'Skill name (display name):',
906
+ default: (answers) => answers.id
907
+ .split('-')
908
+ .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
909
+ .join(' '),
910
+ },
911
+ {
912
+ type: 'input',
913
+ name: 'description',
914
+ message: 'Skill description:',
915
+ validate: (input) => {
916
+ return (input.length >= 10 ||
917
+ 'Description must be at least 10 characters');
918
+ },
919
+ },
920
+ {
921
+ type: 'editor',
922
+ name: 'instructions',
923
+ message: 'Skill instructions (detailed prompt):',
924
+ default: 'You are a skilled assistant. When invoked, you should...\n\nCapabilities:\n- \n\nGuidelines:\n- ',
925
+ },
926
+ {
927
+ type: 'list',
928
+ name: 'type',
929
+ message: 'Skill type:',
930
+ choices: [
931
+ { name: 'Task - Execute specific actions', value: 'task' },
932
+ { name: 'Query - Retrieve information', value: 'query' },
933
+ { name: 'Creative - Generate content', value: 'creative' },
934
+ { name: 'Analysis - Analyze data', value: 'analysis' },
935
+ { name: 'Other', value: 'other' },
936
+ ],
937
+ default: 'task',
938
+ },
939
+ ]);
940
+ // Ask for parameters
941
+ const { addParams } = await inquirer.prompt([
942
+ {
943
+ type: 'confirm',
944
+ name: 'addParams',
945
+ message: 'Add parameters to this skill?',
946
+ default: false,
947
+ },
948
+ ]);
949
+ const parameters = {};
950
+ if (addParams) {
951
+ let addingParams = true;
952
+ while (addingParams) {
953
+ const paramAnswers = await inquirer.prompt([
954
+ {
955
+ type: 'input',
956
+ name: 'paramName',
957
+ message: 'Parameter name:',
958
+ },
959
+ {
960
+ type: 'list',
961
+ name: 'paramType',
962
+ message: 'Parameter type:',
963
+ choices: ['string', 'number', 'boolean', 'array', 'object'],
964
+ },
965
+ {
966
+ type: 'input',
967
+ name: 'paramDescription',
968
+ message: 'Parameter description:',
969
+ },
970
+ {
971
+ type: 'confirm',
972
+ name: 'paramRequired',
973
+ message: 'Is this parameter required?',
974
+ default: false,
975
+ },
976
+ ]);
977
+ parameters[paramAnswers.paramName] = {
978
+ type: paramAnswers.paramType,
979
+ description: paramAnswers.paramDescription,
980
+ };
981
+ if (paramAnswers.paramRequired) {
982
+ if (!parameters._required) {
983
+ parameters._required = [];
984
+ }
985
+ parameters._required.push(paramAnswers.paramName);
986
+ }
987
+ const { addAnother } = await inquirer.prompt([
988
+ {
989
+ type: 'confirm',
990
+ name: 'addAnother',
991
+ message: 'Add another parameter?',
992
+ default: false,
993
+ },
994
+ ]);
995
+ addingParams = addAnother;
996
+ }
997
+ }
998
+ // Build skill object
999
+ const skill = {
1000
+ id: skillAnswers.id,
1001
+ name: skillAnswers.name,
1002
+ description: skillAnswers.description,
1003
+ instructions: skillAnswers.instructions,
1004
+ type: skillAnswers.type,
1005
+ };
1006
+ if (Object.keys(parameters).length > 0) {
1007
+ // Extract required array if exists
1008
+ const required = parameters._required;
1009
+ delete parameters._required;
1010
+ skill.parameters = {
1011
+ type: 'object',
1012
+ properties: parameters,
1013
+ };
1014
+ if (required && required.length > 0) {
1015
+ skill.parameters.required = required;
1016
+ }
1017
+ }
1018
+ skills.push(skill);
1019
+ printSuccess(`Skill "${skill.name}" added`);
1020
+ const { addMore } = await inquirer.prompt([
1021
+ {
1022
+ type: 'confirm',
1023
+ name: 'addMore',
1024
+ message: 'Add another skill?',
1025
+ default: false,
1026
+ },
1027
+ ]);
1028
+ addingSkills = addMore;
1029
+ }
1030
+ if (skills.length > 0) {
1031
+ this.state.updateAgent({
1032
+ spec: {
1033
+ skills,
1034
+ },
1035
+ });
1036
+ printSuccess(`${skills.length} skill(s) configured`);
1037
+ }
1038
+ }
1039
+ async configureRAG() {
1040
+ this.state.nextStep('RAG Configuration');
1041
+ printStep(this.state.getState().currentStep, this.state.getState().totalSteps, 'RAG & Vector Database', 'Configure knowledge retrieval and vector storage');
1042
+ const ragAnswers = await inquirer.prompt([
1043
+ {
1044
+ type: 'list',
1045
+ name: 'provider',
1046
+ message: 'Select vector database provider:',
1047
+ choices: [
1048
+ { name: 'Qdrant (Recommended)', value: 'qdrant' },
1049
+ { name: 'Pinecone', value: 'pinecone' },
1050
+ { name: 'Weaviate', value: 'weaviate' },
1051
+ { name: 'LangChain', value: 'langchain' },
1052
+ ],
1053
+ },
1054
+ {
1055
+ type: 'list',
1056
+ name: 'search_strategy',
1057
+ message: 'Search strategy:',
1058
+ choices: [
1059
+ { name: 'Semantic Search', value: 'semantic' },
1060
+ { name: 'Hybrid (Semantic + Keyword)', value: 'hybrid' },
1061
+ { name: 'Neural Search', value: 'neural' },
1062
+ ],
1063
+ default: 'hybrid',
1064
+ },
1065
+ {
1066
+ type: 'number',
1067
+ name: 'top_k',
1068
+ message: 'Number of results to retrieve (top_k):',
1069
+ default: 10,
1070
+ },
1071
+ ]);
1072
+ this.state.updateAgent({
1073
+ spec: {
1074
+ knowledge_sources: [
1075
+ {
1076
+ name: 'primary-knowledge-base',
1077
+ provider: ragAnswers.provider,
1078
+ search: {
1079
+ default_strategy: ragAnswers.search_strategy,
1080
+ top_k: ragAnswers.top_k,
1081
+ min_score: 0.7,
1082
+ rerank: true,
1083
+ },
1084
+ enabled: true,
1085
+ },
1086
+ ],
1087
+ },
1088
+ });
1089
+ printSuccess('RAG configuration complete');
1090
+ }
1091
+ async configureCommunication() {
1092
+ this.state.nextStep('Communication Configuration');
1093
+ printStep(this.state.getState().currentStep, this.state.getState().totalSteps, 'Agent Communication (A2A)', 'Configure agent-to-agent messaging');
1094
+ const commAnswers = await inquirer.prompt([
1095
+ {
1096
+ type: 'list',
1097
+ name: 'transport',
1098
+ message: 'Message transport:',
1099
+ choices: [
1100
+ { name: 'Redis (Recommended)', value: 'redis' },
1101
+ { name: 'NATS', value: 'nats' },
1102
+ { name: 'Kafka', value: 'kafka' },
1103
+ { name: 'Memory (Testing only)', value: 'memory' },
1104
+ ],
1105
+ },
1106
+ {
1107
+ type: 'input',
1108
+ name: 'broker_url',
1109
+ message: 'Broker URL:',
1110
+ default: 'redis://localhost:6379',
1111
+ when: (answers) => answers.transport !== 'memory',
1112
+ },
1113
+ ]);
1114
+ this.state.updateAgent({
1115
+ extensions: {
1116
+ ...this.state.getAgent().extensions,
1117
+ messaging: {
1118
+ transport: commAnswers.transport,
1119
+ broker: {
1120
+ type: commAnswers.transport,
1121
+ url: commAnswers.broker_url,
1122
+ },
1123
+ },
1124
+ },
1125
+ });
1126
+ printSuccess('Communication configuration complete');
1127
+ }
1128
+ async configureStateManagement() {
1129
+ this.state.nextStep('State Management');
1130
+ printStep(this.state.getState().currentStep, this.state.getState().totalSteps, 'State & Memory', 'Configure persistent state and memory');
1131
+ const stateAnswers = await inquirer.prompt([
1132
+ {
1133
+ type: 'list',
1134
+ name: 'mode',
1135
+ message: 'State mode:',
1136
+ choices: [
1137
+ { name: 'Stateless', value: 'stateless' },
1138
+ { name: 'Session (per-conversation)', value: 'session' },
1139
+ { name: 'Long-Running (persistent)', value: 'long_running' },
1140
+ ],
1141
+ },
1142
+ {
1143
+ type: 'list',
1144
+ name: 'storage_type',
1145
+ message: 'Storage backend:',
1146
+ choices: [
1147
+ { name: 'Memory (Fast, temporary)', value: 'memory' },
1148
+ { name: 'Redis', value: 'kv' },
1149
+ { name: 'PostgreSQL', value: 'rdbms' },
1150
+ { name: 'Vector DB', value: 'vector-db' },
1151
+ ],
1152
+ when: (answers) => answers.mode !== 'stateless',
1153
+ },
1154
+ ]);
1155
+ if (stateAnswers.mode !== 'stateless') {
1156
+ this.state.updateAgent({
1157
+ spec: {
1158
+ state: {
1159
+ mode: stateAnswers.mode,
1160
+ storage: {
1161
+ type: stateAnswers.storage_type,
1162
+ retention: stateAnswers.mode === 'session' ? '24h' : '30d',
1163
+ },
1164
+ },
1165
+ },
1166
+ });
1167
+ }
1168
+ printSuccess('State management configured');
1169
+ }
1170
+ async configureCostManagement() {
1171
+ this.state.nextStep('Cost Management');
1172
+ printStep(this.state.getState().currentStep, this.state.getState().totalSteps, 'Cost Management & Budgeting', 'Set budget limits and cost tracking');
1173
+ const costAnswers = await inquirer.prompt([
1174
+ {
1175
+ type: 'confirm',
1176
+ name: 'enable_budget',
1177
+ message: 'Enable token budgets?',
1178
+ default: true,
1179
+ },
1180
+ {
1181
+ type: 'number',
1182
+ name: 'daily_limit',
1183
+ message: 'Daily token limit:',
1184
+ default: 1000000,
1185
+ when: (answers) => answers.enable_budget,
1186
+ },
1187
+ {
1188
+ type: 'list',
1189
+ name: 'enforcement',
1190
+ message: 'Budget enforcement:',
1191
+ choices: [
1192
+ { name: 'Soft (warn only)', value: 'soft' },
1193
+ { name: 'Hard (block when exceeded)', value: 'hard' },
1194
+ { name: 'Adaptive (scale down)', value: 'adaptive' },
1195
+ ],
1196
+ default: 'soft',
1197
+ when: (answers) => answers.enable_budget,
1198
+ },
1199
+ ]);
1200
+ if (costAnswers.enable_budget) {
1201
+ this.state.updateAgent({
1202
+ spec: {
1203
+ token_budget: {
1204
+ enabled: true,
1205
+ daily_limit: costAnswers.daily_limit,
1206
+ enforcement: costAnswers.enforcement,
1207
+ },
1208
+ },
1209
+ });
1210
+ printSuccess('Cost management configured');
1211
+ }
1212
+ }
1213
+ async configureObservability() {
1214
+ this.state.nextStep('Observability');
1215
+ printStep(this.state.getState().currentStep, this.state.getState().totalSteps, 'Observability & Monitoring', 'Configure tracing, metrics, and logging');
1216
+ const obsAnswers = await inquirer.prompt([
1217
+ {
1218
+ type: 'confirm',
1219
+ name: 'enable_tracing',
1220
+ message: 'Enable OpenTelemetry tracing?',
1221
+ default: true,
1222
+ },
1223
+ {
1224
+ type: 'confirm',
1225
+ name: 'enable_metrics',
1226
+ message: 'Enable metrics collection?',
1227
+ default: true,
1228
+ },
1229
+ {
1230
+ type: 'list',
1231
+ name: 'log_level',
1232
+ message: 'Logging level:',
1233
+ choices: ['debug', 'info', 'warn', 'error'],
1234
+ default: 'info',
1235
+ },
1236
+ ]);
1237
+ this.state.updateAgent({
1238
+ spec: {
1239
+ observability: {
1240
+ tracing: obsAnswers.enable_tracing
1241
+ ? {
1242
+ enabled: true,
1243
+ exporter: 'otlp',
1244
+ endpoint: '${OTEL_ENDPOINT:-http://localhost:4317}',
1245
+ }
1246
+ : undefined,
1247
+ metrics: obsAnswers.enable_metrics
1248
+ ? {
1249
+ enabled: true,
1250
+ exporter: 'prometheus',
1251
+ }
1252
+ : undefined,
1253
+ logging: {
1254
+ level: obsAnswers.log_level,
1255
+ },
1256
+ },
1257
+ },
1258
+ });
1259
+ printSuccess('Observability configured');
1260
+ }
1261
+ async configureTools() {
1262
+ this.state.nextStep('Tools & Capabilities');
1263
+ printStep(this.state.getState().currentStep, this.state.getState().totalSteps, 'Tools & Capabilities', 'Add tools and capabilities for your agent');
1264
+ const { addTools } = await inquirer.prompt([
1265
+ {
1266
+ type: 'confirm',
1267
+ name: 'addTools',
1268
+ message: 'Add tools to your agent?',
1269
+ default: true,
1270
+ },
1271
+ ]);
1272
+ if (!addTools) {
1273
+ return;
1274
+ }
1275
+ const tools = [];
1276
+ // Add tools interactively
1277
+ let addingTools = true;
1278
+ while (addingTools) {
1279
+ const { toolType } = await inquirer.prompt([
1280
+ {
1281
+ type: 'list',
1282
+ name: 'toolType',
1283
+ message: 'Select tool type:',
1284
+ choices: [
1285
+ { name: 'MCP Server', value: 'mcp' },
1286
+ { name: 'HTTP API', value: 'http' },
1287
+ { name: 'Function', value: 'function' },
1288
+ { name: 'Done adding tools', value: 'done' },
1289
+ ],
1290
+ },
1291
+ ]);
1292
+ if (toolType === 'done') {
1293
+ addingTools = false;
1294
+ continue;
1295
+ }
1296
+ if (toolType === 'mcp') {
1297
+ const mcpAnswers = await inquirer.prompt([
1298
+ {
1299
+ type: 'input',
1300
+ name: 'name',
1301
+ message: 'MCP server name:',
1302
+ },
1303
+ {
1304
+ type: 'input',
1305
+ name: 'command',
1306
+ message: 'MCP server command:',
1307
+ default: 'npx -y @modelcontextprotocol/server-filesystem',
1308
+ },
1309
+ ]);
1310
+ tools.push({
1311
+ type: 'mcp',
1312
+ name: mcpAnswers.name,
1313
+ config: {
1314
+ server: mcpAnswers.command,
1315
+ },
1316
+ });
1317
+ printSuccess(`Added MCP server: ${mcpAnswers.name}`);
1318
+ }
1319
+ // Add more tool types as needed
1320
+ }
1321
+ if (tools.length > 0) {
1322
+ this.state.updateAgent({
1323
+ spec: {
1324
+ tools,
1325
+ },
1326
+ });
1327
+ printSuccess(`${tools.length} tools configured`);
1328
+ }
1329
+ }
1330
+ async configureSafety() {
1331
+ this.state.nextStep('Safety & Security');
1332
+ printStep(this.state.getState().currentStep, this.state.getState().totalSteps, 'Safety & Security', 'Configure safety controls and security measures');
1333
+ const safetyAnswers = await inquirer.prompt([
1334
+ {
1335
+ type: 'confirm',
1336
+ name: 'enable_content_filtering',
1337
+ message: 'Enable content filtering?',
1338
+ default: true,
1339
+ },
1340
+ {
1341
+ type: 'confirm',
1342
+ name: 'enable_pii_detection',
1343
+ message: 'Enable PII detection?',
1344
+ default: true,
1345
+ },
1346
+ {
1347
+ type: 'confirm',
1348
+ name: 'enable_rate_limiting',
1349
+ message: 'Enable rate limiting?',
1350
+ default: false,
1351
+ },
1352
+ ]);
1353
+ const safety = {};
1354
+ if (safetyAnswers.enable_content_filtering) {
1355
+ safety.content_filtering = {
1356
+ enabled: true,
1357
+ categories: ['hate_speech', 'violence', 'illegal_activity'],
1358
+ action: 'block',
1359
+ };
1360
+ }
1361
+ if (safetyAnswers.enable_pii_detection) {
1362
+ safety.pii_detection = {
1363
+ enabled: true,
1364
+ types: ['email', 'phone', 'ssn', 'credit_card'],
1365
+ action: 'redact',
1366
+ };
1367
+ }
1368
+ if (safetyAnswers.enable_rate_limiting) {
1369
+ safety.rate_limiting = {
1370
+ enabled: true,
1371
+ requests_per_minute: 30,
1372
+ };
1373
+ }
1374
+ if (Object.keys(safety).length > 0) {
1375
+ this.state.updateAgent({
1376
+ spec: {
1377
+ safety,
1378
+ },
1379
+ });
1380
+ printSuccess('Safety controls configured');
1381
+ }
1382
+ }
1383
+ async configureExportTargets() {
1384
+ this.state.nextStep('Export Configuration');
1385
+ printStep(this.state.getState().currentStep, this.state.getState().totalSteps, 'Export Targets', 'Configure deployment platforms');
1386
+ const exportAnswers = await inquirer.prompt([
1387
+ {
1388
+ type: 'confirm',
1389
+ name: 'configureExport',
1390
+ message: 'Configure export targets for deployment?',
1391
+ default: true,
1392
+ },
1393
+ ]);
1394
+ if (!exportAnswers.configureExport) {
1395
+ return;
1396
+ }
1397
+ const { platforms } = await inquirer.prompt([
1398
+ {
1399
+ type: 'checkbox',
1400
+ name: 'platforms',
1401
+ message: 'Select export platforms:',
1402
+ choices: [
1403
+ {
1404
+ name: 'LangChain (Python) - Full framework with observability',
1405
+ value: 'langchain',
1406
+ checked: true,
1407
+ },
1408
+ {
1409
+ name: 'KAgent (Kubernetes) - Cloud-native deployment',
1410
+ value: 'kagent',
1411
+ },
1412
+ {
1413
+ name: 'Drupal Module - CMS integration',
1414
+ value: 'drupal',
1415
+ },
1416
+ {
1417
+ name: 'Symfony Bundle - PHP framework',
1418
+ value: 'symfony',
1419
+ },
1420
+ ],
1421
+ validate: (answer) => {
1422
+ if (answer.length < 1) {
1423
+ return 'You must select at least one export platform.';
1424
+ }
1425
+ return true;
1426
+ },
1427
+ },
1428
+ ]);
1429
+ const exportConfig = {
1430
+ enabled: true,
1431
+ platforms: platforms,
1432
+ };
1433
+ // Platform-specific configuration
1434
+ for (const platform of platforms) {
1435
+ if (platform === 'langchain') {
1436
+ const langchainConfig = await inquirer.prompt([
1437
+ {
1438
+ type: 'confirm',
1439
+ name: 'includeCallbacks',
1440
+ message: 'Include observability (LangSmith, LangFuse, OpenTelemetry)?',
1441
+ default: true,
1442
+ },
1443
+ {
1444
+ type: 'confirm',
1445
+ name: 'includeErrorHandling',
1446
+ message: 'Include production error handling (retry, circuit breaker)?',
1447
+ default: true,
1448
+ },
1449
+ {
1450
+ type: 'confirm',
1451
+ name: 'includeLangServe',
1452
+ message: 'Generate LangServe REST API deployment?',
1453
+ default: false,
1454
+ },
1455
+ {
1456
+ type: 'confirm',
1457
+ name: 'includeTests',
1458
+ message: 'Generate pytest test suite?',
1459
+ default: true,
1460
+ },
1461
+ ]);
1462
+ exportConfig.langchain = langchainConfig;
1463
+ }
1464
+ else if (platform === 'kagent') {
1465
+ const kagentConfig = await inquirer.prompt([
1466
+ {
1467
+ type: 'confirm',
1468
+ name: 'includeRBAC',
1469
+ message: 'Include RBAC (ServiceAccount, Roles)?',
1470
+ default: true,
1471
+ },
1472
+ {
1473
+ type: 'confirm',
1474
+ name: 'includeTLS',
1475
+ message: 'Configure TLS for secure communication?',
1476
+ default: true,
1477
+ },
1478
+ {
1479
+ type: 'confirm',
1480
+ name: 'includeNetworkPolicy',
1481
+ message: 'Generate NetworkPolicy for isolation?',
1482
+ default: true,
1483
+ },
1484
+ ]);
1485
+ exportConfig.kagent = kagentConfig;
1486
+ }
1487
+ else if (platform === 'drupal') {
1488
+ const drupalConfig = await inquirer.prompt([
1489
+ {
1490
+ type: 'input',
1491
+ name: 'moduleName',
1492
+ message: 'Drupal module name:',
1493
+ default: this.state.getAgent().metadata?.name?.replace(/-/g, '_') || 'ossa_agent',
1494
+ validate: (input) => {
1495
+ const valid = /^[a-z][a-z0-9_]*$/.test(input);
1496
+ return valid || 'Must be lowercase alphanumeric with underscores';
1497
+ },
1498
+ },
1499
+ {
1500
+ type: 'confirm',
1501
+ name: 'includeQueue',
1502
+ message: 'Include queue worker for async execution?',
1503
+ default: true,
1504
+ },
1505
+ {
1506
+ type: 'confirm',
1507
+ name: 'includeEntity',
1508
+ message: 'Generate entity storage with Views integration?',
1509
+ default: true,
1510
+ },
1511
+ ]);
1512
+ exportConfig.drupal = drupalConfig;
1513
+ }
1514
+ else if (platform === 'symfony') {
1515
+ const symfonyConfig = await inquirer.prompt([
1516
+ {
1517
+ type: 'input',
1518
+ name: 'bundleName',
1519
+ message: 'Symfony bundle name:',
1520
+ default: (this.state.getAgent().metadata?.name
1521
+ ?.split('-')
1522
+ .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
1523
+ .join('') || 'Ossa') + 'Bundle',
1524
+ },
1525
+ {
1526
+ type: 'confirm',
1527
+ name: 'includeEvents',
1528
+ message: 'Include event system (start, complete, error)?',
1529
+ default: true,
1530
+ },
1531
+ {
1532
+ type: 'confirm',
1533
+ name: 'includeCaching',
1534
+ message: 'Include caching layer?',
1535
+ default: true,
1536
+ },
1537
+ ]);
1538
+ exportConfig.symfony = symfonyConfig;
1539
+ }
1540
+ }
1541
+ // Store in annotations (buildkit-specific metadata)
1542
+ this.state.updateAgent({
1543
+ metadata: {
1544
+ ...this.state.getAgent().metadata,
1545
+ annotations: {
1546
+ ...this.state.getAgent().metadata?.annotations,
1547
+ 'buildkit.ossa.io/export-config': JSON.stringify(exportConfig),
1548
+ },
1549
+ },
1550
+ });
1551
+ printSuccess(`Export configured for ${platforms.length} platform(s)`);
1552
+ }
1553
+ async configureTestingValidation() {
1554
+ this.state.nextStep('Testing Configuration');
1555
+ printStep(this.state.getState().currentStep, this.state.getState().totalSteps, 'Testing & Validation', 'Configure automated testing');
1556
+ const { enableTesting } = await inquirer.prompt([
1557
+ {
1558
+ type: 'confirm',
1559
+ name: 'enableTesting',
1560
+ message: 'Configure testing for this agent?',
1561
+ default: true,
1562
+ },
1563
+ ]);
1564
+ if (!enableTesting) {
1565
+ return;
1566
+ }
1567
+ const testConfig = await inquirer.prompt([
1568
+ {
1569
+ type: 'checkbox',
1570
+ name: 'types',
1571
+ message: 'Which test types to generate?',
1572
+ choices: [
1573
+ { name: 'Unit tests (recommended)', value: 'unit', checked: true },
1574
+ { name: 'Integration tests', value: 'integration' },
1575
+ { name: 'Load tests', value: 'load' },
1576
+ { name: 'Security tests', value: 'security' },
1577
+ { name: 'Cost tests', value: 'cost' },
1578
+ ],
1579
+ validate: (answer) => {
1580
+ if (answer.length < 1) {
1581
+ return 'You must choose at least one test type.';
1582
+ }
1583
+ return true;
1584
+ },
1585
+ },
1586
+ {
1587
+ type: 'confirm',
1588
+ name: 'mockLLM',
1589
+ message: 'Mock LLM by default?',
1590
+ default: true,
1591
+ },
1592
+ {
1593
+ type: 'confirm',
1594
+ name: 'generateFixtures',
1595
+ message: 'Generate test fixtures?',
1596
+ default: true,
1597
+ },
1598
+ {
1599
+ type: 'confirm',
1600
+ name: 'includeCICD',
1601
+ message: 'Include CI/CD configurations?',
1602
+ default: true,
1603
+ },
1604
+ ]);
1605
+ let cicdPlatforms = [];
1606
+ if (testConfig.includeCICD) {
1607
+ const { platforms } = await inquirer.prompt([
1608
+ {
1609
+ type: 'checkbox',
1610
+ name: 'platforms',
1611
+ message: 'Which CI/CD platforms?',
1612
+ choices: [
1613
+ { name: 'GitHub Actions', value: 'github-actions', checked: true },
1614
+ { name: 'GitLab CI', value: 'gitlab-ci' },
1615
+ ],
1616
+ validate: (answer) => {
1617
+ if (answer.length < 1) {
1618
+ return 'You must choose at least one CI/CD platform.';
1619
+ }
1620
+ return true;
1621
+ },
1622
+ },
1623
+ ]);
1624
+ cicdPlatforms = platforms;
1625
+ }
1626
+ const validationConfig = await inquirer.prompt([
1627
+ {
1628
+ type: 'confirm',
1629
+ name: 'manifest',
1630
+ message: 'Enable manifest validation?',
1631
+ default: true,
1632
+ },
1633
+ {
1634
+ type: 'confirm',
1635
+ name: 'safety',
1636
+ message: 'Enable safety checks?',
1637
+ default: true,
1638
+ },
1639
+ {
1640
+ type: 'number',
1641
+ name: 'costBudget',
1642
+ message: 'Cost budget per test run? (USD)',
1643
+ default: 0.1,
1644
+ validate: (input) => {
1645
+ if (input < 0) {
1646
+ return 'Cost budget must be positive';
1647
+ }
1648
+ return true;
1649
+ },
1650
+ },
1651
+ ]);
1652
+ const testingConfig = {
1653
+ enabled: true,
1654
+ types: testConfig.types,
1655
+ mockLLM: testConfig.mockLLM,
1656
+ generateFixtures: testConfig.generateFixtures,
1657
+ cicd: cicdPlatforms,
1658
+ validation: validationConfig,
1659
+ };
1660
+ // Store in annotations (buildkit-specific metadata)
1661
+ this.state.updateAgent({
1662
+ metadata: {
1663
+ ...this.state.getAgent().metadata,
1664
+ annotations: {
1665
+ ...this.state.getAgent().metadata?.annotations,
1666
+ 'buildkit.ossa.io/testing-config': JSON.stringify(testingConfig),
1667
+ },
1668
+ },
1669
+ });
1670
+ printSuccess(`Testing configured: ${testConfig.types.join(', ')}`);
1671
+ }
1672
+ async generateOutput() {
1673
+ this.state.nextStep('Output Generation');
1674
+ printStep(this.state.getState().currentStep, this.state.getState().totalSteps, 'Generate Output Files', 'Create agent manifest and supporting files');
1675
+ const outputAnswers = await inquirer.prompt([
1676
+ {
1677
+ type: 'confirm',
1678
+ name: 'generate_agents_md',
1679
+ message: 'Generate AGENTS.md file?',
1680
+ default: true,
1681
+ },
1682
+ {
1683
+ type: 'confirm',
1684
+ name: 'generate_llms_txt',
1685
+ message: 'Generate llms.txt file?',
1686
+ default: true,
1687
+ },
1688
+ {
1689
+ type: 'input',
1690
+ name: 'output_path',
1691
+ message: 'Output file path:',
1692
+ default: this.options.output || 'agent.ossa.yaml',
1693
+ },
1694
+ ]);
1695
+ const agent = this.state.getAgent();
1696
+ const outputPath = outputAnswers.output_path;
1697
+ // Write manifest
1698
+ const yamlContent = yaml.stringify(agent, {
1699
+ indent: 2,
1700
+ lineWidth: 0,
1701
+ });
1702
+ fs.writeFileSync(outputPath, yamlContent, 'utf-8');
1703
+ printSuccess(`Agent manifest written to: ${outputPath}`);
1704
+ // Generate AGENTS.md if requested
1705
+ if (outputAnswers.generate_agents_md) {
1706
+ await this.generateAgentsMd(path.dirname(outputPath));
1707
+ }
1708
+ // Generate llms.txt if requested
1709
+ if (outputAnswers.generate_llms_txt) {
1710
+ await this.generateLlmsTxt(path.dirname(outputPath));
1711
+ }
1712
+ printSuccess('All files generated successfully!');
1713
+ }
1714
+ async generateAgentsMd(directory) {
1715
+ const agent = this.state.getAgent();
1716
+ const agentsMdPath = path.join(directory, 'AGENTS.md');
1717
+ const content = `# ${agent.metadata?.name || 'Agent'}
1718
+
1719
+ ${agent.metadata?.description || 'Agent description'}
1720
+
1721
+ ## Overview
1722
+
1723
+ - **Name**: ${agent.metadata?.name}
1724
+ - **Version**: ${agent.metadata?.version}
1725
+ - **Created**: ${new Date().toISOString()}
1726
+ - **Type**: ${agent.kind || 'Agent'}
1727
+
1728
+ ## Capabilities
1729
+
1730
+ ${agent.spec?.tools?.map((t) => `- ${t.name || t.type}`).join('\n') || 'No tools configured'}
1731
+
1732
+ ## Configuration
1733
+
1734
+ ### LLM
1735
+ - **Provider**: ${agent.spec?.llm?.provider}
1736
+ - **Model**: ${agent.spec?.llm?.model}
1737
+ - **Temperature**: ${agent.spec?.llm?.temperature}
1738
+
1739
+ ### Features
1740
+
1741
+ ${this.state.getState().features.rag ? '- ✅ RAG & Vector Database\n' : ''}${this.state.getState().features.communication ? '- ✅ Agent Communication (A2A)\n' : ''}${this.state.getState().features.state_management ? '- ✅ State Management\n' : ''}${this.state.getState().features.observability ? '- ✅ Observability\n' : ''}${this.state.getState().features.cost_management ? '- ✅ Cost Management\n' : ''}
1742
+
1743
+ ## Usage
1744
+
1745
+ \`\`\`bash
1746
+ # Validate the agent
1747
+ ossa validate agent.ossa.yaml
1748
+
1749
+ # Run the agent
1750
+ ossa run agent.ossa.yaml
1751
+
1752
+ # Export to platform
1753
+ ossa export agent.ossa.yaml --platform langchain
1754
+ \`\`\`
1755
+
1756
+ ## Development
1757
+
1758
+ ### Building
1759
+
1760
+ \`\`\`bash
1761
+ npm run build
1762
+ \`\`\`
1763
+
1764
+ ### Testing
1765
+
1766
+ \`\`\`bash
1767
+ npm test
1768
+ \`\`\`
1769
+
1770
+ ## Best Practices
1771
+
1772
+ - Always validate before deployment
1773
+ - Monitor costs and token usage
1774
+ - Enable observability in production
1775
+ - Test thoroughly before release
1776
+
1777
+ ## Support
1778
+
1779
+ For issues and questions, please refer to:
1780
+ - [OSSA Documentation](https://openstandardagents.org)
1781
+ - [GitHub Issues](https://github.com/openstandardagents/issues)
1782
+
1783
+ ---
1784
+
1785
+ *Generated by OSSA Wizard v2.0*
1786
+ `;
1787
+ fs.writeFileSync(agentsMdPath, content, 'utf-8');
1788
+ printSuccess(`AGENTS.md written to: ${agentsMdPath}`);
1789
+ }
1790
+ async generateLlmsTxt(directory) {
1791
+ const agent = this.state.getAgent();
1792
+ const llmsTxtPath = path.join(directory, 'llms.txt');
1793
+ const content = `# ${agent.metadata?.name || 'Agent'} - LLM Context
1794
+
1795
+ ## Agent Information
1796
+
1797
+ Name: ${agent.metadata?.name}
1798
+ Version: ${agent.metadata?.version}
1799
+ Description: ${agent.metadata?.description}
1800
+
1801
+ ## Capabilities
1802
+
1803
+ ${agent.spec?.role || 'No role defined'}
1804
+
1805
+ ## Tools
1806
+
1807
+ ${agent.spec?.tools?.map((t) => `- ${t.name || t.type}: ${t.description || 'No description'}`).join('\n') || 'No tools available'}
1808
+
1809
+ ## LLM Configuration
1810
+
1811
+ Provider: ${agent.spec?.llm?.provider}
1812
+ Model: ${agent.spec?.llm?.model}
1813
+ Temperature: ${agent.spec?.llm?.temperature}
1814
+
1815
+ ## Usage Examples
1816
+
1817
+ \`\`\`bash
1818
+ # Run this agent
1819
+ ossa run agent.ossa.yaml
1820
+ \`\`\`
1821
+
1822
+ ## Constraints
1823
+
1824
+ ${agent.spec?.safety ? '- Safety controls enabled\n' : ''}${agent.spec?.token_budget ? '- Token budgets configured\n' : ''}${agent.spec?.autonomy ? '- Autonomy level configured\n' : ''}
1825
+
1826
+ ---
1827
+
1828
+ For more information, see AGENTS.md
1829
+ `;
1830
+ fs.writeFileSync(llmsTxtPath, content, 'utf-8');
1831
+ printSuccess(`llms.txt written to: ${llmsTxtPath}`);
1832
+ }
1833
+ printNextSteps() {
1834
+ const agent = this.state.getAgent();
1835
+ const outputPath = this.options.output || 'agent.ossa.yaml';
1836
+ console.log(chalk.cyan('Next Steps:'));
1837
+ console.log(chalk.gray(`\n1. Review your agent:`));
1838
+ console.log(chalk.white(` cat ${outputPath}`));
1839
+ console.log(chalk.gray(`\n2. Validate the manifest:`));
1840
+ console.log(chalk.white(` ossa validate ${outputPath}`));
1841
+ console.log(chalk.gray(`\n3. Test the agent:`));
1842
+ console.log(chalk.white(` ossa run ${outputPath}`));
1843
+ if (this.state.getState().features.rag) {
1844
+ console.log(chalk.gray(`\n4. Set up vector database (RAG):`));
1845
+ console.log(chalk.white(` # Configure your Qdrant/Pinecone instance`));
1846
+ }
1847
+ if (this.state.getState().features.communication) {
1848
+ console.log(chalk.gray(`\n5. Set up message broker (A2A):`));
1849
+ console.log(chalk.white(` # Start Redis/NATS for agent communication`));
1850
+ }
1851
+ console.log(chalk.gray(`\n6. Export to platform:`));
1852
+ console.log(chalk.white(` ossa export ${outputPath} --platform langchain`));
1853
+ console.log(chalk.gray(`\n7. Deploy:`));
1854
+ console.log(chalk.white(` # Follow platform-specific deployment guide`));
1855
+ console.log('');
1856
+ console.log(chalk.green.bold('🎉 Your agent is ready for production!'));
1857
+ console.log('');
1858
+ }
1859
+ }
1860
+ // =============================================================================
1861
+ // COMMAND REGISTRATION
1862
+ // =============================================================================
1863
+ export const wizardV2Command = new Command('wizard-v2')
1864
+ .description('🧙 OSSA Agent Creation Wizard v2.0 - BEAST MODE EDITION')
1865
+ .option('-o, --output <path>', 'Output file path', 'agent.ossa.yaml')
1866
+ .option('-d, --directory <dir>', 'Create agent in directory', '.')
1867
+ .option('-t, --template <id>', 'Use specific template')
1868
+ .option('-m, --mode <mode>', 'Wizard mode (guided|quick|expert)', 'guided')
1869
+ .option('--validate', 'Validate after creation', false)
1870
+ .option('--test', 'Test after creation', false)
1871
+ .action(async (options) => {
1872
+ const wizard = new OSSAWizardV2(options);
1873
+ await wizard.run();
1874
+ });
1875
+ //# sourceMappingURL=wizard-interactive.command.js.map