@bluefly/openstandardagents 0.3.5 → 0.3.6

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 (650) hide show
  1. package/.version.json +7 -0
  2. package/CHANGELOG.md +60 -1
  3. package/README.md +41 -31
  4. package/bin/ossa +2 -23
  5. package/bin/postinstall +3 -2
  6. package/dist/adapters/crewai/converter.d.ts +17 -0
  7. package/dist/adapters/crewai/converter.d.ts.map +1 -0
  8. package/dist/adapters/crewai/converter.js +110 -0
  9. package/dist/adapters/crewai/converter.js.map +1 -0
  10. package/dist/adapters/crewai/index.d.ts +7 -0
  11. package/dist/adapters/crewai/index.d.ts.map +1 -0
  12. package/dist/adapters/crewai/index.js +6 -0
  13. package/dist/adapters/crewai/index.js.map +1 -0
  14. package/dist/adapters/crewai/types.d.ts +29 -0
  15. package/dist/adapters/crewai/types.d.ts.map +1 -0
  16. package/dist/adapters/crewai/types.js +5 -0
  17. package/dist/adapters/crewai/types.js.map +1 -0
  18. package/dist/adapters/docker/generators.d.ts +19 -0
  19. package/dist/adapters/docker/generators.d.ts.map +1 -0
  20. package/dist/adapters/docker/generators.js +93 -0
  21. package/dist/adapters/docker/generators.js.map +1 -0
  22. package/dist/adapters/docker/index.d.ts +7 -0
  23. package/dist/adapters/docker/index.d.ts.map +1 -0
  24. package/dist/adapters/docker/index.js +6 -0
  25. package/dist/adapters/docker/index.js.map +1 -0
  26. package/dist/adapters/docker/types.d.ts +17 -0
  27. package/dist/adapters/docker/types.d.ts.map +1 -0
  28. package/dist/adapters/docker/types.js +5 -0
  29. package/dist/adapters/docker/types.js.map +1 -0
  30. package/dist/adapters/gitlab/converter.d.ts +25 -0
  31. package/dist/adapters/gitlab/converter.d.ts.map +1 -0
  32. package/dist/adapters/gitlab/converter.js +96 -0
  33. package/dist/adapters/gitlab/converter.js.map +1 -0
  34. package/dist/adapters/gitlab/index.d.ts +7 -0
  35. package/dist/adapters/gitlab/index.d.ts.map +1 -0
  36. package/dist/adapters/gitlab/index.js +6 -0
  37. package/dist/adapters/gitlab/index.js.map +1 -0
  38. package/dist/adapters/gitlab/types.d.ts +22 -0
  39. package/dist/adapters/gitlab/types.d.ts.map +1 -0
  40. package/dist/adapters/gitlab/types.js +5 -0
  41. package/dist/adapters/gitlab/types.js.map +1 -0
  42. package/dist/adapters/kubernetes/generator.d.ts +29 -0
  43. package/dist/adapters/kubernetes/generator.d.ts.map +1 -0
  44. package/dist/adapters/kubernetes/generator.js +133 -0
  45. package/dist/adapters/kubernetes/generator.js.map +1 -0
  46. package/dist/adapters/kubernetes/index.d.ts +7 -0
  47. package/dist/adapters/kubernetes/index.d.ts.map +1 -0
  48. package/dist/adapters/kubernetes/index.js +6 -0
  49. package/dist/adapters/kubernetes/index.js.map +1 -0
  50. package/dist/adapters/kubernetes/types.d.ts +17 -0
  51. package/dist/adapters/kubernetes/types.d.ts.map +1 -0
  52. package/dist/adapters/kubernetes/types.js +5 -0
  53. package/dist/adapters/kubernetes/types.js.map +1 -0
  54. package/dist/adapters/langchain/converter.d.ts +21 -0
  55. package/dist/adapters/langchain/converter.d.ts.map +1 -0
  56. package/dist/adapters/langchain/converter.js +143 -0
  57. package/dist/adapters/langchain/converter.js.map +1 -0
  58. package/dist/adapters/langchain/index.d.ts +7 -0
  59. package/dist/adapters/langchain/index.d.ts.map +1 -0
  60. package/dist/adapters/langchain/index.js +6 -0
  61. package/dist/adapters/langchain/index.js.map +1 -0
  62. package/dist/adapters/langchain/types.d.ts +27 -0
  63. package/dist/adapters/langchain/types.d.ts.map +1 -0
  64. package/dist/adapters/langchain/types.js +5 -0
  65. package/dist/adapters/langchain/types.js.map +1 -0
  66. package/dist/adapters/n8n/converter.d.ts +17 -0
  67. package/dist/adapters/n8n/converter.d.ts.map +1 -0
  68. package/dist/adapters/n8n/converter.js +77 -0
  69. package/dist/adapters/n8n/converter.js.map +1 -0
  70. package/dist/adapters/n8n/index.d.ts +7 -0
  71. package/dist/adapters/n8n/index.d.ts.map +1 -0
  72. package/dist/adapters/n8n/index.js +6 -0
  73. package/dist/adapters/n8n/index.js.map +1 -0
  74. package/dist/adapters/n8n/types.d.ts +23 -0
  75. package/dist/adapters/n8n/types.d.ts.map +1 -0
  76. package/dist/adapters/n8n/types.js +5 -0
  77. package/dist/adapters/n8n/types.js.map +1 -0
  78. package/dist/adapters/opentelemetry.adapter.d.ts +1 -1
  79. package/dist/adapters/temporal/converter.d.ts +17 -0
  80. package/dist/adapters/temporal/converter.d.ts.map +1 -0
  81. package/dist/adapters/temporal/converter.js +96 -0
  82. package/dist/adapters/temporal/converter.js.map +1 -0
  83. package/dist/adapters/temporal/index.d.ts +7 -0
  84. package/dist/adapters/temporal/index.d.ts.map +1 -0
  85. package/dist/adapters/temporal/index.js +6 -0
  86. package/dist/adapters/temporal/index.js.map +1 -0
  87. package/dist/adapters/temporal/types.d.ts +23 -0
  88. package/dist/adapters/temporal/types.d.ts.map +1 -0
  89. package/dist/adapters/temporal/types.js +5 -0
  90. package/dist/adapters/temporal/types.js.map +1 -0
  91. package/dist/bot/agent-compliance.js +1 -1
  92. package/dist/bot/agent-compliance.js.map +1 -1
  93. package/dist/bot/agent-security_scanner.d.ts +1 -1
  94. package/dist/bot/agent-security_scanner.d.ts.map +1 -1
  95. package/dist/bot/agent-security_scanner.js.map +1 -1
  96. package/dist/cli/commands/agent-create.command.d.ts +18 -0
  97. package/dist/cli/commands/agent-create.command.d.ts.map +1 -0
  98. package/dist/cli/commands/agent-create.command.js +437 -0
  99. package/dist/cli/commands/agent-create.command.js.map +1 -0
  100. package/dist/cli/commands/agent-wizard.command.d.ts +21 -0
  101. package/dist/cli/commands/agent-wizard.command.d.ts.map +1 -0
  102. package/dist/cli/commands/agent-wizard.command.js +1136 -0
  103. package/dist/cli/commands/agent-wizard.command.js.map +1 -0
  104. package/dist/cli/commands/agents-md/batch.command.d.ts +3 -0
  105. package/dist/cli/commands/agents-md/batch.command.d.ts.map +1 -0
  106. package/dist/cli/commands/agents-md/batch.command.js +63 -0
  107. package/dist/cli/commands/agents-md/batch.command.js.map +1 -0
  108. package/dist/cli/commands/agents-md/generate.command.d.ts +3 -0
  109. package/dist/cli/commands/agents-md/generate.command.d.ts.map +1 -0
  110. package/dist/cli/commands/agents-md/generate.command.js +43 -0
  111. package/dist/cli/commands/agents-md/generate.command.js.map +1 -0
  112. package/dist/cli/commands/agents-md/list.command.d.ts +3 -0
  113. package/dist/cli/commands/agents-md/list.command.d.ts.map +1 -0
  114. package/dist/cli/commands/agents-md/list.command.js +59 -0
  115. package/dist/cli/commands/agents-md/list.command.js.map +1 -0
  116. package/dist/cli/commands/agents-md/validate.command.d.ts +3 -0
  117. package/dist/cli/commands/agents-md/validate.command.d.ts.map +1 -0
  118. package/dist/cli/commands/agents-md/validate.command.js +42 -0
  119. package/dist/cli/commands/agents-md/validate.command.js.map +1 -0
  120. package/dist/cli/commands/agents-md.command.d.ts +1 -1
  121. package/dist/cli/commands/agents-md.command.d.ts.map +1 -1
  122. package/dist/cli/commands/agents-md.command.js +40 -122
  123. package/dist/cli/commands/agents-md.command.js.map +1 -1
  124. package/dist/cli/commands/audit.d.ts +8 -0
  125. package/dist/cli/commands/audit.d.ts.map +1 -0
  126. package/dist/cli/commands/audit.js +238 -0
  127. package/dist/cli/commands/audit.js.map +1 -0
  128. package/dist/cli/commands/build.command.d.ts +7 -0
  129. package/dist/cli/commands/build.command.d.ts.map +1 -0
  130. package/dist/cli/commands/build.command.js +314 -0
  131. package/dist/cli/commands/build.command.js.map +1 -0
  132. package/dist/cli/commands/capability/validate.d.ts +3 -0
  133. package/dist/cli/commands/capability/validate.d.ts.map +1 -0
  134. package/dist/cli/commands/capability/validate.js +60 -0
  135. package/dist/cli/commands/capability/validate.js.map +1 -0
  136. package/dist/cli/commands/deploy.command.d.ts +5 -2
  137. package/dist/cli/commands/deploy.command.d.ts.map +1 -1
  138. package/dist/cli/commands/deploy.command.js +50 -154
  139. package/dist/cli/commands/deploy.command.js.map +1 -1
  140. package/dist/cli/commands/enhance.command.d.ts +10 -0
  141. package/dist/cli/commands/enhance.command.d.ts.map +1 -0
  142. package/dist/cli/commands/enhance.command.js +119 -0
  143. package/dist/cli/commands/enhance.command.js.map +1 -0
  144. package/dist/cli/commands/examples.command.d.ts +10 -0
  145. package/dist/cli/commands/examples.command.d.ts.map +1 -0
  146. package/dist/cli/commands/examples.command.js +73 -0
  147. package/dist/cli/commands/examples.command.js.map +1 -0
  148. package/dist/cli/commands/export.command.d.ts +2 -2
  149. package/dist/cli/commands/export.command.d.ts.map +1 -1
  150. package/dist/cli/commands/export.command.js +109 -37
  151. package/dist/cli/commands/export.command.js.map +1 -1
  152. package/dist/cli/commands/generate/conformance.d.ts +3 -0
  153. package/dist/cli/commands/generate/conformance.d.ts.map +1 -0
  154. package/dist/cli/commands/generate/conformance.js +106 -0
  155. package/dist/cli/commands/generate/conformance.js.map +1 -0
  156. package/dist/cli/commands/github-sync.command.js +1 -1
  157. package/dist/cli/commands/identity/plan.d.ts +3 -0
  158. package/dist/cli/commands/identity/plan.d.ts.map +1 -0
  159. package/dist/cli/commands/identity/plan.js +198 -0
  160. package/dist/cli/commands/identity/plan.js.map +1 -0
  161. package/dist/cli/commands/install.command.d.ts.map +1 -1
  162. package/dist/cli/commands/install.command.js +29 -32
  163. package/dist/cli/commands/install.command.js.map +1 -1
  164. package/dist/cli/commands/knowledge-index.command.d.ts +11 -0
  165. package/dist/cli/commands/knowledge-index.command.d.ts.map +1 -0
  166. package/dist/cli/commands/knowledge-index.command.js +111 -0
  167. package/dist/cli/commands/knowledge-index.command.js.map +1 -0
  168. package/dist/cli/commands/knowledge-query.command.d.ts +11 -0
  169. package/dist/cli/commands/knowledge-query.command.d.ts.map +1 -0
  170. package/dist/cli/commands/knowledge-query.command.js +118 -0
  171. package/dist/cli/commands/knowledge-query.command.js.map +1 -0
  172. package/dist/cli/commands/knowledge.command.d.ts +11 -0
  173. package/dist/cli/commands/knowledge.command.d.ts.map +1 -0
  174. package/dist/cli/commands/knowledge.command.js +16 -0
  175. package/dist/cli/commands/knowledge.command.js.map +1 -0
  176. package/dist/cli/commands/migrate.command.d.ts +2 -17
  177. package/dist/cli/commands/migrate.command.d.ts.map +1 -1
  178. package/dist/cli/commands/migrate.command.js +86 -144
  179. package/dist/cli/commands/migrate.command.js.map +1 -1
  180. package/dist/cli/commands/publish.command.d.ts.map +1 -1
  181. package/dist/cli/commands/publish.command.js +36 -106
  182. package/dist/cli/commands/publish.command.js.map +1 -1
  183. package/dist/cli/commands/release.command.d.ts +10 -0
  184. package/dist/cli/commands/release.command.d.ts.map +1 -0
  185. package/dist/cli/commands/release.command.js +73 -0
  186. package/dist/cli/commands/release.command.js.map +1 -0
  187. package/dist/cli/commands/scaffold.command.d.ts.map +1 -1
  188. package/dist/cli/commands/scaffold.command.js +14 -4
  189. package/dist/cli/commands/scaffold.command.js.map +1 -1
  190. package/dist/cli/commands/search.command.d.ts.map +1 -1
  191. package/dist/cli/commands/search.command.js +33 -33
  192. package/dist/cli/commands/search.command.js.map +1 -1
  193. package/dist/cli/commands/skills.command.d.ts +10 -0
  194. package/dist/cli/commands/skills.command.d.ts.map +1 -0
  195. package/dist/cli/commands/skills.command.js +135 -0
  196. package/dist/cli/commands/skills.command.js.map +1 -0
  197. package/dist/cli/commands/taxonomy.command.d.ts +10 -0
  198. package/dist/cli/commands/taxonomy.command.d.ts.map +1 -0
  199. package/dist/cli/commands/taxonomy.command.js +379 -0
  200. package/dist/cli/commands/taxonomy.command.js.map +1 -0
  201. package/dist/cli/commands/template.command.d.ts +7 -0
  202. package/dist/cli/commands/template.command.d.ts.map +1 -0
  203. package/dist/cli/commands/template.command.js +159 -0
  204. package/dist/cli/commands/template.command.js.map +1 -0
  205. package/dist/cli/commands/update.command.d.ts +3 -0
  206. package/dist/cli/commands/update.command.d.ts.map +1 -0
  207. package/dist/cli/commands/update.command.js +43 -0
  208. package/dist/cli/commands/update.command.js.map +1 -0
  209. package/dist/cli/commands/validate.command.d.ts.map +1 -1
  210. package/dist/cli/commands/validate.command.js +43 -0
  211. package/dist/cli/commands/validate.command.js.map +1 -1
  212. package/dist/cli/commands/wizard.command.d.ts.map +1 -1
  213. package/dist/cli/commands/wizard.command.js +29 -3
  214. package/dist/cli/commands/wizard.command.js.map +1 -1
  215. package/dist/cli/commands/workspace.command.js +3 -1
  216. package/dist/cli/commands/workspace.command.js.map +1 -1
  217. package/dist/cli/index.d.ts +2 -11
  218. package/dist/cli/index.d.ts.map +1 -1
  219. package/dist/cli/index.js +24 -229
  220. package/dist/cli/index.js.map +1 -1
  221. package/dist/cli/utils/error-formatter.js.map +1 -1
  222. package/dist/cli/utils/output.d.ts +1 -0
  223. package/dist/cli/utils/output.d.ts.map +1 -1
  224. package/dist/cli/utils/output.js +2 -1
  225. package/dist/cli/utils/output.js.map +1 -1
  226. package/dist/cli/wizard/data/agent-types.d.ts +7 -0
  227. package/dist/cli/wizard/data/agent-types.d.ts.map +1 -0
  228. package/dist/cli/wizard/data/agent-types.js +192 -0
  229. package/dist/cli/wizard/data/agent-types.js.map +1 -0
  230. package/dist/cli/wizard/data/llm-providers.d.ts +10 -0
  231. package/dist/cli/wizard/data/llm-providers.d.ts.map +1 -0
  232. package/dist/cli/wizard/data/llm-providers.js +176 -0
  233. package/dist/cli/wizard/data/llm-providers.js.map +1 -0
  234. package/dist/cli/wizard/data/taxonomy.d.ts +39 -0
  235. package/dist/cli/wizard/data/taxonomy.d.ts.map +1 -0
  236. package/dist/cli/wizard/data/taxonomy.js +134 -0
  237. package/dist/cli/wizard/data/taxonomy.js.map +1 -0
  238. package/dist/cli/wizard/data/templates.d.ts +10 -0
  239. package/dist/cli/wizard/data/templates.d.ts.map +1 -0
  240. package/dist/cli/wizard/data/templates.js +228 -0
  241. package/dist/cli/wizard/data/templates.js.map +1 -0
  242. package/dist/cli/wizard/steps/01-agent-type.d.ts +7 -0
  243. package/dist/cli/wizard/steps/01-agent-type.d.ts.map +1 -0
  244. package/dist/cli/wizard/steps/01-agent-type.js +35 -0
  245. package/dist/cli/wizard/steps/01-agent-type.js.map +1 -0
  246. package/dist/cli/wizard/steps/02-basic-info.d.ts +7 -0
  247. package/dist/cli/wizard/steps/02-basic-info.d.ts.map +1 -0
  248. package/dist/cli/wizard/steps/02-basic-info.js +81 -0
  249. package/dist/cli/wizard/steps/02-basic-info.js.map +1 -0
  250. package/dist/cli/wizard/steps/03-domain-capability.d.ts +7 -0
  251. package/dist/cli/wizard/steps/03-domain-capability.d.ts.map +1 -0
  252. package/dist/cli/wizard/steps/03-domain-capability.js +98 -0
  253. package/dist/cli/wizard/steps/03-domain-capability.js.map +1 -0
  254. package/dist/cli/wizard/steps/04-llm-config.d.ts +7 -0
  255. package/dist/cli/wizard/steps/04-llm-config.d.ts.map +1 -0
  256. package/dist/cli/wizard/steps/04-llm-config.js +86 -0
  257. package/dist/cli/wizard/steps/04-llm-config.js.map +1 -0
  258. package/dist/cli/wizard/steps/05-tools.d.ts +7 -0
  259. package/dist/cli/wizard/steps/05-tools.d.ts.map +1 -0
  260. package/dist/cli/wizard/steps/05-tools.js +172 -0
  261. package/dist/cli/wizard/steps/05-tools.js.map +1 -0
  262. package/dist/cli/wizard/steps/06-autonomy.d.ts +7 -0
  263. package/dist/cli/wizard/steps/06-autonomy.d.ts.map +1 -0
  264. package/dist/cli/wizard/steps/06-autonomy.js +87 -0
  265. package/dist/cli/wizard/steps/06-autonomy.js.map +1 -0
  266. package/dist/cli/wizard/steps/07-observability.d.ts +7 -0
  267. package/dist/cli/wizard/steps/07-observability.d.ts.map +1 -0
  268. package/dist/cli/wizard/steps/07-observability.js +149 -0
  269. package/dist/cli/wizard/steps/07-observability.js.map +1 -0
  270. package/dist/cli/wizard/steps/08-deployment.d.ts +7 -0
  271. package/dist/cli/wizard/steps/08-deployment.d.ts.map +1 -0
  272. package/dist/cli/wizard/steps/08-deployment.js +120 -0
  273. package/dist/cli/wizard/steps/08-deployment.js.map +1 -0
  274. package/dist/cli/wizard/steps/09-advanced.d.ts +7 -0
  275. package/dist/cli/wizard/steps/09-advanced.d.ts.map +1 -0
  276. package/dist/cli/wizard/steps/09-advanced.js +160 -0
  277. package/dist/cli/wizard/steps/09-advanced.js.map +1 -0
  278. package/dist/cli/wizard/steps/10-review.d.ts +7 -0
  279. package/dist/cli/wizard/steps/10-review.d.ts.map +1 -0
  280. package/dist/cli/wizard/steps/10-review.js +109 -0
  281. package/dist/cli/wizard/steps/10-review.js.map +1 -0
  282. package/dist/cli/wizard/steps/12-agents-folder.d.ts +7 -0
  283. package/dist/cli/wizard/steps/12-agents-folder.d.ts.map +1 -0
  284. package/dist/cli/wizard/steps/12-agents-folder.js +101 -0
  285. package/dist/cli/wizard/steps/12-agents-folder.js.map +1 -0
  286. package/dist/cli/wizard/steps/13-openapi-generation.d.ts +7 -0
  287. package/dist/cli/wizard/steps/13-openapi-generation.d.ts.map +1 -0
  288. package/dist/cli/wizard/steps/13-openapi-generation.js +60 -0
  289. package/dist/cli/wizard/steps/13-openapi-generation.js.map +1 -0
  290. package/dist/cli/wizard/steps/14-workspace-registration.d.ts +7 -0
  291. package/dist/cli/wizard/steps/14-workspace-registration.d.ts.map +1 -0
  292. package/dist/cli/wizard/steps/14-workspace-registration.js +65 -0
  293. package/dist/cli/wizard/steps/14-workspace-registration.js.map +1 -0
  294. package/dist/cli/wizard/steps/15-cost-estimation.d.ts +7 -0
  295. package/dist/cli/wizard/steps/15-cost-estimation.d.ts.map +1 -0
  296. package/dist/cli/wizard/steps/15-cost-estimation.js +119 -0
  297. package/dist/cli/wizard/steps/15-cost-estimation.js.map +1 -0
  298. package/dist/cli/wizard/steps/16-best-practices.d.ts +7 -0
  299. package/dist/cli/wizard/steps/16-best-practices.d.ts.map +1 -0
  300. package/dist/cli/wizard/steps/16-best-practices.js +180 -0
  301. package/dist/cli/wizard/steps/16-best-practices.js.map +1 -0
  302. package/dist/cli/wizard/steps/index.d.ts +15 -0
  303. package/dist/cli/wizard/steps/index.d.ts.map +1 -0
  304. package/dist/cli/wizard/steps/index.js +15 -0
  305. package/dist/cli/wizard/steps/index.js.map +1 -0
  306. package/dist/cli/wizard/types.d.ts +94 -0
  307. package/dist/cli/wizard/types.d.ts.map +1 -0
  308. package/dist/cli/wizard/types.js +6 -0
  309. package/dist/cli/wizard/types.js.map +1 -0
  310. package/dist/cli/wizard/ui/console.d.ts +26 -0
  311. package/dist/cli/wizard/ui/console.d.ts.map +1 -0
  312. package/dist/cli/wizard/ui/console.js +104 -0
  313. package/dist/cli/wizard/ui/console.js.map +1 -0
  314. package/dist/cli/wizard/validators/index.d.ts +11 -0
  315. package/dist/cli/wizard/validators/index.d.ts.map +1 -0
  316. package/dist/cli/wizard/validators/index.js +35 -0
  317. package/dist/cli/wizard/validators/index.js.map +1 -0
  318. package/dist/di-container.d.ts.map +1 -1
  319. package/dist/di-container.js +16 -0
  320. package/dist/di-container.js.map +1 -1
  321. package/dist/index.d.ts +7 -24
  322. package/dist/index.d.ts.map +1 -1
  323. package/dist/index.js +9 -31
  324. package/dist/index.js.map +1 -1
  325. package/dist/repositories/manifest.repository.js +1 -1
  326. package/dist/repositories/manifest.repository.js.map +1 -1
  327. package/dist/repositories/schema.repository.d.ts.map +1 -1
  328. package/dist/repositories/schema.repository.js +7 -4
  329. package/dist/repositories/schema.repository.js.map +1 -1
  330. package/dist/runtime/langflow.runtime.d.ts +2 -2
  331. package/dist/sdks/kagent/crd-generator.d.ts +21 -0
  332. package/dist/sdks/kagent/crd-generator.d.ts.map +1 -0
  333. package/dist/sdks/kagent/crd-generator.js +101 -0
  334. package/dist/sdks/kagent/crd-generator.js.map +1 -0
  335. package/dist/sdks/kagent/crd-parser.d.ts +13 -0
  336. package/dist/sdks/kagent/crd-parser.d.ts.map +1 -0
  337. package/dist/sdks/kagent/crd-parser.js +91 -0
  338. package/dist/sdks/kagent/crd-parser.js.map +1 -0
  339. package/dist/sdks/kagent/index.d.ts +10 -0
  340. package/dist/sdks/kagent/index.d.ts.map +1 -0
  341. package/dist/sdks/kagent/index.js +9 -0
  342. package/dist/sdks/kagent/index.js.map +1 -0
  343. package/dist/sdks/kagent/runtime-adapter.d.ts +45 -0
  344. package/dist/sdks/kagent/runtime-adapter.d.ts.map +1 -0
  345. package/dist/sdks/kagent/runtime-adapter.js +129 -0
  346. package/dist/sdks/kagent/runtime-adapter.js.map +1 -0
  347. package/dist/sdks/kagent/types.d.ts +91 -0
  348. package/dist/sdks/kagent/types.d.ts.map +1 -0
  349. package/dist/sdks/kagent/types.js +5 -0
  350. package/dist/sdks/kagent/types.js.map +1 -0
  351. package/dist/sdks/kagent/validator.d.ts +17 -0
  352. package/dist/sdks/kagent/validator.d.ts.map +1 -0
  353. package/dist/sdks/kagent/validator.js +73 -0
  354. package/dist/sdks/kagent/validator.js.map +1 -0
  355. package/dist/sdks/shared/types.d.ts +1 -1
  356. package/dist/sdks/typescript/types.d.ts +3 -3
  357. package/dist/sdks/typescript/types.js +3 -3
  358. package/dist/services/agents-md/agents-md.service.d.ts.map +1 -1
  359. package/dist/services/agents-md/agents-md.service.js +0 -6
  360. package/dist/services/agents-md/agents-md.service.js.map +1 -1
  361. package/dist/services/agents-md/repo-agents-md.service.d.ts +87 -0
  362. package/dist/services/agents-md/repo-agents-md.service.d.ts.map +1 -0
  363. package/dist/services/agents-md/repo-agents-md.service.js +202 -0
  364. package/dist/services/agents-md/repo-agents-md.service.js.map +1 -0
  365. package/dist/services/ai-architect.service.d.ts +48 -0
  366. package/dist/services/ai-architect.service.d.ts.map +1 -0
  367. package/dist/services/ai-architect.service.js +273 -0
  368. package/dist/services/ai-architect.service.js.map +1 -0
  369. package/dist/services/audit.d.ts +80 -0
  370. package/dist/services/audit.d.ts.map +1 -0
  371. package/dist/services/audit.js +245 -0
  372. package/dist/services/audit.js.map +1 -0
  373. package/dist/services/codegen/generators/openapi-zod.generator.js +1 -1
  374. package/dist/services/git.service.d.ts +10 -1
  375. package/dist/services/git.service.d.ts.map +1 -1
  376. package/dist/services/git.service.js +42 -2
  377. package/dist/services/git.service.js.map +1 -1
  378. package/dist/services/knowledge-generation.service.d.ts +46 -0
  379. package/dist/services/knowledge-generation.service.d.ts.map +1 -0
  380. package/dist/services/knowledge-generation.service.js +96 -0
  381. package/dist/services/knowledge-generation.service.js.map +1 -0
  382. package/dist/services/knowledge.service.d.ts +88 -0
  383. package/dist/services/knowledge.service.d.ts.map +1 -0
  384. package/dist/services/knowledge.service.js +214 -0
  385. package/dist/services/knowledge.service.js.map +1 -0
  386. package/dist/services/migration-transform.service.d.ts +11 -3
  387. package/dist/services/migration-transform.service.d.ts.map +1 -1
  388. package/dist/services/migration-transform.service.js +69 -10
  389. package/dist/services/migration-transform.service.js.map +1 -1
  390. package/dist/services/registry.service.d.ts +34 -0
  391. package/dist/services/registry.service.d.ts.map +1 -0
  392. package/dist/services/registry.service.js +161 -0
  393. package/dist/services/registry.service.js.map +1 -0
  394. package/dist/services/release-automation/release-agent.service.d.ts +39 -0
  395. package/dist/services/release-automation/release-agent.service.d.ts.map +1 -0
  396. package/dist/services/release-automation/release-agent.service.js +42 -0
  397. package/dist/services/release-automation/release-agent.service.js.map +1 -0
  398. package/dist/services/skills/claude-skills.service.d.ts +51 -0
  399. package/dist/services/skills/claude-skills.service.d.ts.map +1 -0
  400. package/dist/services/skills/claude-skills.service.js +252 -0
  401. package/dist/services/skills/claude-skills.service.js.map +1 -0
  402. package/dist/services/structure/agents-folder.service.d.ts +37 -0
  403. package/dist/services/structure/agents-folder.service.d.ts.map +1 -0
  404. package/dist/services/structure/agents-folder.service.js +318 -0
  405. package/dist/services/structure/agents-folder.service.js.map +1 -0
  406. package/dist/services/taxonomy-validator.service.d.ts +25 -0
  407. package/dist/services/taxonomy-validator.service.d.ts.map +1 -0
  408. package/dist/services/taxonomy-validator.service.js +149 -0
  409. package/dist/services/taxonomy-validator.service.js.map +1 -0
  410. package/dist/services/taxonomy.service.d.ts +132 -0
  411. package/dist/services/taxonomy.service.d.ts.map +1 -0
  412. package/dist/services/taxonomy.service.js +330 -0
  413. package/dist/services/taxonomy.service.js.map +1 -0
  414. package/dist/services/template-processor.service.d.ts +34 -0
  415. package/dist/services/template-processor.service.d.ts.map +1 -0
  416. package/dist/services/template-processor.service.js +112 -0
  417. package/dist/services/template-processor.service.js.map +1 -0
  418. package/dist/services/template.service.d.ts +54 -0
  419. package/dist/services/template.service.d.ts.map +1 -0
  420. package/dist/services/template.service.js +154 -0
  421. package/dist/services/template.service.js.map +1 -0
  422. package/dist/spec/ossa-audit-api.yaml +311 -0
  423. package/dist/spec/registry/registry-api.yaml +144 -0
  424. package/dist/spec/schema/components/adapter.schema.json +33 -0
  425. package/dist/spec/schema/components/identity.schema.json +78 -0
  426. package/dist/spec/v0.3/CHANGELOG.md +2 -2
  427. package/dist/spec/v0.3/MIGRATION-v0.3.5-to-v0.3.6.md +552 -0
  428. package/dist/spec/v0.3/README.md +2 -2
  429. package/dist/spec/v0.3/ossa-0.3.6.schema.json +17604 -0
  430. package/dist/spec/v0.3/ossa-v0.3.schema.json +15824 -0
  431. package/dist/spec/v0.3.6/CHANGELOG.md +171 -0
  432. package/dist/spec/v0.3.6/README.md +382 -0
  433. package/dist/spec/v0.3.6/taxonomy.yaml +506 -0
  434. package/dist/testing/fixtures.d.ts.map +1 -1
  435. package/dist/testing/fixtures.js +6 -0
  436. package/dist/testing/fixtures.js.map +1 -1
  437. package/dist/testing/runner.d.ts.map +1 -1
  438. package/dist/testing/runner.js +4 -20
  439. package/dist/testing/runner.js.map +1 -1
  440. package/dist/types/architect.d.ts +48 -0
  441. package/dist/types/architect.d.ts.map +1 -0
  442. package/dist/types/architect.js +7 -0
  443. package/dist/types/architect.js.map +1 -0
  444. package/dist/types/identity.d.ts +78 -401
  445. package/dist/types/identity.d.ts.map +1 -1
  446. package/dist/types/identity.js +5 -7
  447. package/dist/types/identity.js.map +1 -1
  448. package/dist/types/identity.zod.d.ts +5 -5
  449. package/dist/types/index.d.ts +69 -41
  450. package/dist/types/index.d.ts.map +1 -1
  451. package/dist/types/index.js +4 -0
  452. package/dist/types/index.js.map +1 -1
  453. package/dist/types/personality.zod.d.ts +24 -24
  454. package/dist/types/prompts.zod.d.ts +4 -4
  455. package/dist/utils/version.d.ts.map +1 -1
  456. package/dist/utils/version.js +73 -46
  457. package/dist/utils/version.js.map +1 -1
  458. package/dist/validation/__tests__/error-codes.test.d.ts +5 -0
  459. package/dist/validation/__tests__/error-codes.test.d.ts.map +1 -0
  460. package/dist/validation/__tests__/error-codes.test.js +252 -0
  461. package/dist/validation/__tests__/error-codes.test.js.map +1 -0
  462. package/dist/validation/enhanced-validator.d.ts +38 -0
  463. package/dist/validation/enhanced-validator.d.ts.map +1 -0
  464. package/dist/validation/enhanced-validator.js +242 -0
  465. package/dist/validation/enhanced-validator.js.map +1 -0
  466. package/dist/validation/error-codes.d.ts +170 -0
  467. package/dist/validation/error-codes.d.ts.map +1 -0
  468. package/dist/validation/error-codes.js +1159 -0
  469. package/dist/validation/error-codes.js.map +1 -0
  470. package/dist/validation/error-formatter.d.ts +81 -0
  471. package/dist/validation/error-formatter.d.ts.map +1 -0
  472. package/dist/validation/error-formatter.js +375 -0
  473. package/dist/validation/error-formatter.js.map +1 -0
  474. package/dist/validation/index.d.ts +16 -0
  475. package/dist/validation/index.d.ts.map +1 -0
  476. package/dist/validation/index.js +20 -0
  477. package/dist/validation/index.js.map +1 -0
  478. package/dist/validation/linter.d.ts +36 -0
  479. package/dist/validation/linter.d.ts.map +1 -0
  480. package/dist/validation/linter.js +453 -0
  481. package/dist/validation/linter.js.map +1 -0
  482. package/dist/validation/validator.d.ts +38 -0
  483. package/dist/validation/validator.d.ts.map +1 -0
  484. package/dist/validation/validator.js +262 -0
  485. package/dist/validation/validator.js.map +1 -0
  486. package/examples/a2a/agent-handoff.ossa.yaml +1 -1
  487. package/examples/a2a/service-discovery.ossa.yaml +1 -1
  488. package/examples/adapters/drupal-eca-mapping.yaml +1 -1
  489. package/examples/adapters/drupal-eca-task.yaml +1 -1
  490. package/examples/adapters/drupal-flowdrop-mapping.yaml +1 -1
  491. package/examples/adapters/drupal-maestro-mapping.yaml +1 -1
  492. package/examples/adapters/mistral-agent.yaml +1 -1
  493. package/examples/adapters/symfony-messenger-task.yaml +1 -1
  494. package/examples/adapters/symfony-messenger-workflow.yaml +1 -1
  495. package/examples/advanced/reasoning-agent.yaml +1 -1
  496. package/examples/advanced/workflows/hybrid-model-strategy.yaml +1 -1
  497. package/examples/agent-manifests/critics/critic-agent.yaml +1 -1
  498. package/examples/agent-manifests/governors/governor-agent.yaml +1 -1
  499. package/examples/agent-manifests/integrators/integrator-agent.yaml +1 -1
  500. package/examples/agent-manifests/judges/judge-agent.yaml +1 -1
  501. package/examples/agent-manifests/monitors/monitor-agent.yaml +1 -1
  502. package/examples/agent-manifests/orchestrators/orchestrator-agent.yaml +1 -1
  503. package/examples/agent-manifests/workers/worker-agent.yaml +1 -1
  504. package/examples/agents/architecture-healer-enterprise.yaml +1 -1
  505. package/examples/agents/dependency-healer-npm.yaml +1 -1
  506. package/examples/agents/spec-healer-openapi.yaml +1 -1
  507. package/examples/agents/wiki-healer-production.yaml +1 -1
  508. package/examples/agents-md/monorepo-agent.ossa.yaml +1 -1
  509. package/examples/autonomous-evolution/self-evolving-agent.ossa.yaml +1 -1
  510. package/examples/build-once-use-everywhere/README.md +184 -0
  511. package/examples/build-once-use-everywhere/agent.ossa.yaml +38 -0
  512. package/examples/build-once-use-everywhere/deploy-config.yaml +32 -0
  513. package/examples/claude-code/ossa-validator.ossa.yaml +1 -1
  514. package/examples/common_npm/agent-router.ossa.yaml +1 -1
  515. package/examples/contracts/data-consumer.ossa.yaml +1 -1
  516. package/examples/contracts/data-producer-v2.ossa.yaml +5 -3
  517. package/examples/contracts/data-producer.ossa.yaml +1 -1
  518. package/examples/drupal/gitlab-ml-recommender.ossa.yaml +1 -1
  519. package/examples/economics/marketplace-agent.ossa.json +210 -0
  520. package/examples/extensions/encryption-multi-provider.yaml +4 -4
  521. package/examples/extensions/knowledge-sources.yaml +1 -1
  522. package/examples/extensions/mcp-full-featured.yaml +1 -1
  523. package/examples/genetics/breeding-agent.ossa.json +194 -0
  524. package/examples/getting-started/01-minimal-agent.ossa.yaml +1 -1
  525. package/examples/getting-started/02-agent-with-tools.ossa.yaml +1 -1
  526. package/examples/getting-started/03-agent-with-safety.ossa.yaml +1 -1
  527. package/examples/getting-started/04-agent-with-messaging.ossa.yaml +1 -1
  528. package/examples/getting-started/05-workflow-composition.ossa.yaml +1 -1
  529. package/examples/getting-started/hello-world-complete.ossa.yaml +1 -1
  530. package/examples/integration-patterns/agent-to-agent-orchestration.ossa.yaml +1 -1
  531. package/examples/kagent/compliance-validator.ossa.yaml +1 -1
  532. package/examples/kagent/cost-optimizer.ossa.yaml +1 -1
  533. package/examples/kagent/documentation-agent.ossa.yaml +1 -1
  534. package/examples/kagent/k8s-troubleshooter-v1.ossa.yaml +1 -1
  535. package/examples/kagent/k8s-troubleshooter.ossa.yaml +1 -1
  536. package/examples/kagent/security-scanner.ossa.yaml +1 -1
  537. package/examples/lifecycle/mentoring-agent.ossa.json +293 -0
  538. package/examples/mcp/database-mcp.ossa.yaml +1 -1
  539. package/examples/mcp/filesystem-mcp.ossa.yaml +1 -1
  540. package/examples/messaging/dependency-healer.ossa.yaml +1 -1
  541. package/examples/messaging/incident-responder.ossa.yaml +1 -1
  542. package/examples/messaging/routing-rules.ossa.yaml +1 -1
  543. package/examples/messaging/security-scanner.ossa.yaml +1 -1
  544. package/examples/migration-guides/from-langchain-to-ossa.yaml +4 -4
  545. package/examples/migrations/crewai-to-ossa/README.md +66 -0
  546. package/examples/migrations/langchain/01-python-react-agent-after.ossa.yaml +2 -2
  547. package/examples/migrations/langchain/02-typescript-conversational-after.ossa.yaml +2 -2
  548. package/examples/migrations/langchain/03-sequential-chain-after.ossa.yaml +2 -2
  549. package/examples/migrations/langchain/04-config-based-after.ossa.yaml +2 -2
  550. package/examples/migrations/langchain-to-ossa/README.md +73 -0
  551. package/examples/migrations/swarm-to-ossa/COMPARISON.md +350 -0
  552. package/examples/migrations/swarm-to-ossa/INDEX.md +355 -0
  553. package/examples/migrations/swarm-to-ossa/MIGRATION-FLOW.md +410 -0
  554. package/examples/migrations/swarm-to-ossa/QUICKSTART.md +453 -0
  555. package/examples/migrations/swarm-to-ossa/README.md +665 -0
  556. package/examples/migrations/swarm-to-ossa/after-handoffs.ossa.yaml +482 -0
  557. package/examples/migrations/swarm-to-ossa/after-triage-agent.ossa.yaml +315 -0
  558. package/examples/migrations/swarm-to-ossa/before-handoffs.py +373 -0
  559. package/examples/migrations/swarm-to-ossa/before-triage-agent.py +234 -0
  560. package/examples/multi-agent/conditional-router.ossa.yaml +1 -1
  561. package/examples/multi-agent/parallel-execution.ossa.yaml +1 -1
  562. package/examples/multi-agent/sequential-pipeline.ossa.yaml +1 -1
  563. package/examples/multi-platform/single-manifest/README.md +72 -0
  564. package/examples/multi-platform/single-manifest/agent.ossa.yaml +32 -0
  565. package/examples/observability/activity-stream-full.yaml +1 -1
  566. package/examples/openai/basic-agent.ossa.yaml +1 -1
  567. package/examples/ossa-templates/11-react-performance-expert.ossa.yaml +1 -1
  568. package/examples/ossa-templates/12-typescript-type-safety-expert.ossa.yaml +1 -1
  569. package/examples/ossa-templates/13-accessibility-champion.ossa.yaml +1 -1
  570. package/examples/ossa-templates/14-security-hardening-agent.ossa.yaml +1 -1
  571. package/examples/quickstart/support-agent.ossa.yaml +1 -1
  572. package/examples/real-world/gitlab-cicd-optimizer.ossa.yaml +1 -1
  573. package/examples/real-world/rag-documentation-assistant.ossa.yaml +1 -1
  574. package/examples/registry/agents/code-reviewer/agent.yaml +1 -1
  575. package/examples/registry/agents/security-scanner/agent.yaml +1 -1
  576. package/examples/runtime-adapters/bedrock-claude-example.ossa.yaml +1 -1
  577. package/examples/schema/reusable-components.yaml +1 -1
  578. package/examples/showcase/ci-pipeline.ossa.yaml +1 -1
  579. package/examples/showcase/code-assistant.ossa.yaml +1 -1
  580. package/examples/showcase/code-reviewer.ossa.yaml +1 -1
  581. package/examples/showcase/compliance-validator.ossa.yaml +1 -1
  582. package/examples/showcase/content-writer.ossa.yaml +1 -1
  583. package/examples/showcase/data-transformer.ossa.yaml +1 -1
  584. package/examples/showcase/doc-generator.ossa.yaml +1 -1
  585. package/examples/showcase/security-scanner.ossa.yaml +1 -1
  586. package/examples/showcase/test-generator.ossa.yaml +1 -1
  587. package/examples/showcase/workflow-orchestrator.ossa.yaml +1 -1
  588. package/examples/swarm/pso-optimizer.ossa.json +171 -0
  589. package/examples/tasks/batch-email-sender.yaml +1 -1
  590. package/examples/tasks/data-transform.yaml +1 -1
  591. package/examples/tasks/publish-content.yaml +1 -1
  592. package/examples/templates/ossa-compliance.yaml +1 -1
  593. package/examples/unified/security-scanner.ossa.yaml +1 -1
  594. package/examples/v0.3.6/full-featured-v0.3.6.ossa.yaml +304 -0
  595. package/examples/v0.3.6/gitlab-duo-composite-identity.ossa.yaml +119 -0
  596. package/examples/v0.3.6/knowledge-graph-integration.ossa.yaml +109 -0
  597. package/examples/v0.3.6/token-efficiency-economy.ossa.yaml +111 -0
  598. package/examples/v0.3.6-features/README.md +433 -0
  599. package/examples/v0.3.6-features/genetics-breeding-advanced.ossa.yaml +496 -0
  600. package/examples/v0.3.6-features/genetics-breeding-simple.ossa.yaml +304 -0
  601. package/examples/v0.3.6-features/genetics-fitness-scoring.ossa.yaml +551 -0
  602. package/examples/validation/error-codes-demo.ts +254 -0
  603. package/examples/workflows/batch-email-campaign.yaml +1 -1
  604. package/examples/workflows/content-review-publish.yaml +1 -1
  605. package/examples/workflows/simple-etl.yaml +1 -1
  606. package/openapi/agents-md-service.yaml +338 -0
  607. package/openapi/cli-commands.openapi.yaml +0 -28
  608. package/openapi/ossa-cli-enhancements.openapi.yaml +148 -0
  609. package/openapi/release-automation.openapi.yaml +144 -0
  610. package/package.json +35 -12
  611. package/schemas/capability-contract.v0.json +116 -0
  612. package/schemas/identity.lock.schema.json +59 -0
  613. package/schemas/identity.plan.schema.json +132 -0
  614. package/spec/ossa-audit-api.yaml +311 -0
  615. package/spec/registry/registry-api.yaml +144 -0
  616. package/spec/schema/components/adapter.schema.json +33 -0
  617. package/spec/schema/components/identity.schema.json +78 -0
  618. package/spec/v0.3/CHANGELOG.md +2 -2
  619. package/spec/v0.3/MIGRATION-v0.3.5-to-v0.3.6.md +552 -0
  620. package/spec/v0.3/README.md +2 -2
  621. package/spec/v0.3/ossa-0.3.6.schema.json +17604 -0
  622. package/spec/v0.3/ossa-v0.3.schema.json +15824 -0
  623. package/spec/v0.3.6/CHANGELOG.md +171 -0
  624. package/spec/v0.3.6/README.md +382 -0
  625. package/spec/v0.3.6/taxonomy.yaml +506 -0
  626. package/src/dev-cli/src/index.ts +0 -0
  627. package/templates/agent-types/analyzer/cost-analyzer.yaml +38 -0
  628. package/templates/agent-types/analyzer/performance-profiler.yaml +38 -0
  629. package/templates/agent-types/analyzer/security-scanner.yaml +36 -0
  630. package/templates/agent-types/backend/api-validator.yaml +37 -0
  631. package/templates/agent-types/backend/load-balancer.yaml +39 -0
  632. package/templates/agent-types/content/content-generator.yaml +40 -0
  633. package/templates/agent-types/content/seo-optimizer.yaml +39 -0
  634. package/templates/agent-types/data/data-processor.yaml +38 -0
  635. package/templates/agent-types/data/report-generator.yaml +40 -0
  636. package/templates/agent-types/development/code-generator.yaml +39 -0
  637. package/templates/agent-types/development/dependency-updater.yaml +38 -0
  638. package/templates/agent-types/frontend/accessibility-checker.yaml +38 -0
  639. package/templates/agent-types/frontend/ui-tester.yaml +38 -0
  640. package/templates/agent-types/infrastructure/deployment-automator.yaml +39 -0
  641. package/templates/agent-types/infrastructure/resource-optimizer.yaml +38 -0
  642. package/templates/agent-types/monitor/health-checker.yaml +37 -0
  643. package/templates/agent-types/monitor/log-analyzer.yaml +37 -0
  644. package/templates/agent-types/orchestrator/multi-agent-coordinator.yaml +38 -0
  645. package/templates/agent-types/orchestrator/workflow-manager.yaml +39 -0
  646. package/templates/agent-types/security/compliance-checker.yaml +38 -0
  647. package/templates/agent-types/security/vulnerability-scanner.yaml +38 -0
  648. package/templates/agent-types/worker/api-tester.yaml +43 -0
  649. package/templates/agent-types/worker/code-reviewer.yaml +39 -0
  650. package/templates/agent-types/worker/database-migrator.yaml +38 -0
@@ -0,0 +1,315 @@
1
+ ---
2
+ # OSSA v0.3.6 - Customer Service Triage Agent
3
+ #
4
+ # This is the OSSA equivalent of before-triage-agent.py
5
+ #
6
+ # Benefits over OpenAI Swarm:
7
+ # - Declarative YAML (version control, CI/CD, GitOps)
8
+ # - Deploy to ANY platform (Anthropic, OpenAI, LangChain, CrewAI, AutoGen)
9
+ # - Production-ready (auth, observability, rate limiting, governance)
10
+ # - 50% less code
11
+ # - Enterprise features built-in
12
+
13
+ apiVersion: ossa/v0.3.6
14
+ kind: Agent
15
+ metadata:
16
+ name: customer-service-triage
17
+ version: 1.0.0
18
+ description: "Customer service triage agent that routes requests to specialized agents"
19
+
20
+ # Agent Catalog (for discovery and reuse)
21
+ catalog:
22
+ published: true
23
+ catalog_id: ossa-customer-service-triage
24
+ visibility: public
25
+ categories:
26
+ - customer-service
27
+ - triage
28
+ - multi-agent
29
+ tags:
30
+ - customer-support
31
+ - routing
32
+ - handoffs
33
+ documentation_url: https://docs.example.com/agents/customer-service-triage
34
+
35
+ labels:
36
+ department: customer-service
37
+ tier: production
38
+ version: v1
39
+
40
+ spec:
41
+ # Agent role and behavior
42
+ role: |
43
+ You are a friendly customer service triage agent.
44
+
45
+ Your role is to:
46
+ 1. Greet customers warmly
47
+ 2. Understand their request or issue
48
+ 3. Route them to the appropriate specialist:
49
+ - Sales Agent: For product inquiries, purchases, or general questions
50
+ - Refunds Agent: For returns, refunds, or order issues
51
+
52
+ Be concise and efficient in your routing.
53
+
54
+ # LLM Configuration
55
+ llm:
56
+ provider: anthropic # or "openai" to keep using OpenAI
57
+ model: claude-sonnet-4-5
58
+ temperature: 0.7
59
+ max_tokens: 2048
60
+
61
+ # Handoffs (Swarm's "transfer functions" → OSSA handoffs)
62
+ # This replaces transfer_to_sales_agent() and transfer_to_refunds_agent()
63
+ handoffs:
64
+ - name: route_to_sales
65
+ target_agent: sales-agent
66
+ description: "Route customer to sales agent for purchases and product questions"
67
+ condition: "intent == 'purchase' or intent == 'product_info' or intent == 'general_question'"
68
+ trigger: automatic # Handoff happens automatically when condition is met
69
+ context_transfer: full # Transfer entire conversation history
70
+
71
+ - name: route_to_refunds
72
+ target_agent: refunds-agent
73
+ description: "Route customer to refunds agent for returns and refunds"
74
+ condition: "intent == 'refund' or intent == 'return' or intent == 'complaint'"
75
+ trigger: automatic
76
+ context_transfer: full
77
+
78
+ # Context variables (Swarm's context_variables → OSSA context)
79
+ context_propagation:
80
+ mode: selective # Only propagate specified fields
81
+ allowed_fields:
82
+ - user_id
83
+ - account_type
84
+ - session_id
85
+ - conversation_history
86
+ sensitive_fields: # These require encryption in transit
87
+ - payment_info
88
+ - personal_data
89
+
90
+ # Authentication & Authorization (NOT available in Swarm)
91
+ identity:
92
+ provider: oauth2
93
+ authentication:
94
+ method: oauth2
95
+ scopes:
96
+ - read:user
97
+ - write:support_ticket
98
+ auto_refresh: true
99
+
100
+ # Observability (NOT available in Swarm)
101
+ observability:
102
+ metrics:
103
+ enabled: true
104
+ export_interval: 30s
105
+ metrics:
106
+ - handoff_rate
107
+ - response_time
108
+ - customer_satisfaction
109
+ tracing:
110
+ enabled: true
111
+ sampler: always_on
112
+ logging:
113
+ level: info
114
+ structured: true
115
+ include_context: true
116
+
117
+ # Rate Limiting (NOT available in Swarm)
118
+ constraints:
119
+ rate_limits:
120
+ requests_per_minute: 100
121
+ requests_per_hour: 1000
122
+ tokens_per_day: 500000
123
+ max_conversation_turns: 50
124
+ timeout_seconds: 30
125
+
126
+ # Cost Control (NOT available in Swarm)
127
+ token_efficiency:
128
+ enabled: true
129
+ target_savings: 0.5 # 50% token reduction
130
+ context_management:
131
+ strategy: adaptive
132
+ pruning:
133
+ enabled: true
134
+ threshold: 0.3 # Remove low-relevance context
135
+ caching:
136
+ enabled: true
137
+ strategy: semantic
138
+ ttl: 3600
139
+
140
+ ---
141
+ # Sales Agent (equivalent to sales_agent in Swarm)
142
+ apiVersion: ossa/v0.3.6
143
+ kind: Agent
144
+ metadata:
145
+ name: sales-agent
146
+ version: 1.0.0
147
+ description: "Sales specialist agent for product questions and orders"
148
+
149
+ spec:
150
+ role: |
151
+ You are a knowledgeable sales agent.
152
+
153
+ Your role is to:
154
+ 1. Answer product questions
155
+ 2. Help customers make purchases
156
+ 3. Provide recommendations
157
+ 4. Execute orders when customers are ready
158
+
159
+ Be helpful and enthusiastic about our products!
160
+
161
+ llm:
162
+ provider: anthropic
163
+ model: claude-sonnet-4-5
164
+ temperature: 0.8 # More creative for sales
165
+ max_tokens: 2048
166
+
167
+ # Capabilities (Swarm's "functions" → OSSA capabilities)
168
+ # This replaces execute_order() function
169
+ capabilities:
170
+ - name: execute_order
171
+ description: "Execute a product order for the customer"
172
+ input_schema:
173
+ type: object
174
+ properties:
175
+ product_id:
176
+ type: string
177
+ description: "The product identifier"
178
+ pattern: "^[A-Z0-9-]+$"
179
+ quantity:
180
+ type: integer
181
+ description: "Number of items to order"
182
+ minimum: 1
183
+ maximum: 100
184
+ default: 1
185
+ required:
186
+ - product_id
187
+ output_schema:
188
+ type: object
189
+ properties:
190
+ order_id:
191
+ type: string
192
+ description: "Generated order identifier"
193
+ total_price:
194
+ type: number
195
+ description: "Total order price in USD"
196
+ status:
197
+ type: string
198
+ enum: [confirmed, pending, failed]
199
+ message:
200
+ type: string
201
+ description: "Order confirmation message"
202
+
203
+ # Handoffs back to triage or to refunds
204
+ handoffs:
205
+ - name: escalate_to_refunds
206
+ target_agent: refunds-agent
207
+ condition: "customer_wants_refund == true"
208
+ trigger: manual # Sales agent must explicitly decide to handoff
209
+
210
+ - name: return_to_triage
211
+ target_agent: customer-service-triage
212
+ condition: "request_type == 'other'"
213
+ trigger: automatic
214
+
215
+ # Observability
216
+ observability:
217
+ metrics:
218
+ enabled: true
219
+ metrics:
220
+ - orders_executed
221
+ - average_order_value
222
+ - conversion_rate
223
+
224
+ ---
225
+ # Refunds Agent (equivalent to refunds_agent in Swarm)
226
+ apiVersion: ossa/v0.3.6
227
+ kind: Agent
228
+ metadata:
229
+ name: refunds-agent
230
+ version: 1.0.0
231
+ description: "Refunds specialist agent for returns and refunds"
232
+
233
+ spec:
234
+ role: |
235
+ You are an empathetic refunds specialist.
236
+
237
+ Your role is to:
238
+ 1. Listen to customer concerns
239
+ 2. Process refund requests
240
+ 3. Explain refund policies clearly
241
+ 4. Resolve issues with care
242
+
243
+ Be understanding and process refunds quickly.
244
+
245
+ llm:
246
+ provider: anthropic
247
+ model: claude-sonnet-4-5
248
+ temperature: 0.6 # Balanced for empathy and accuracy
249
+ max_tokens: 2048
250
+
251
+ # Capabilities (Swarm's "functions" → OSSA capabilities)
252
+ # This replaces process_refund() function
253
+ capabilities:
254
+ - name: process_refund
255
+ description: "Process a refund request for an item"
256
+ input_schema:
257
+ type: object
258
+ properties:
259
+ item_id:
260
+ type: string
261
+ description: "The item identifier to refund"
262
+ pattern: "^[A-Z0-9-]+$"
263
+ reason:
264
+ type: string
265
+ description: "Reason for the refund"
266
+ minLength: 10
267
+ maxLength: 500
268
+ required:
269
+ - item_id
270
+ - reason
271
+ output_schema:
272
+ type: object
273
+ properties:
274
+ refund_id:
275
+ type: string
276
+ description: "Generated refund identifier"
277
+ status:
278
+ type: string
279
+ enum: [processed, pending, rejected]
280
+ amount:
281
+ type: number
282
+ description: "Refund amount in USD"
283
+ message:
284
+ type: string
285
+ description: "Refund confirmation message"
286
+
287
+ # Handoffs back to sales or triage
288
+ handoffs:
289
+ - name: upsell_opportunity
290
+ target_agent: sales-agent
291
+ condition: "customer_wants_replacement == true"
292
+ trigger: automatic
293
+
294
+ - name: return_to_triage
295
+ target_agent: customer-service-triage
296
+ condition: "issue_resolved == false"
297
+ trigger: manual
298
+
299
+ # Compliance & Governance (NOT available in Swarm)
300
+ compliance:
301
+ data_retention:
302
+ policy: gdpr
303
+ retention_days: 90
304
+ audit_logging:
305
+ enabled: true
306
+ log_all_interactions: true
307
+
308
+ # Observability
309
+ observability:
310
+ metrics:
311
+ enabled: true
312
+ metrics:
313
+ - refunds_processed
314
+ - average_refund_amount
315
+ - customer_satisfaction_score
@@ -0,0 +1,373 @@
1
+ """
2
+ OpenAI Swarm: Advanced Handoff Patterns
3
+
4
+ This example demonstrates various handoff patterns in OpenAI Swarm:
5
+ 1. Conditional handoffs
6
+ 2. Bidirectional handoffs (agents can transfer back and forth)
7
+ 3. Context preservation across handoffs
8
+ 4. Handoff with state changes
9
+
10
+ Swarm Documentation: https://github.com/openai/swarm
11
+ """
12
+
13
+ from swarm import Swarm, Agent
14
+ from typing import Dict, Any, Optional
15
+
16
+ # Initialize Swarm client
17
+ client = Swarm()
18
+
19
+ # ============================================================================
20
+ # Shared State (simulated database)
21
+ # ============================================================================
22
+
23
+ conversation_state = {
24
+ "order_id": None,
25
+ "customer_tier": "standard",
26
+ "issue_resolved": False,
27
+ "escalation_count": 0
28
+ }
29
+
30
+ # ============================================================================
31
+ # Transfer Functions with Context
32
+ # ============================================================================
33
+
34
+ def transfer_to_order_verification():
35
+ """Transfer to order verification agent to validate order details."""
36
+ print("[HANDOFF] → Order Verification Agent")
37
+ return order_verification_agent
38
+
39
+
40
+ def transfer_to_payment_processing():
41
+ """Transfer to payment processing agent after order verification."""
42
+ print("[HANDOFF] → Payment Processing Agent")
43
+ return payment_processing_agent
44
+
45
+
46
+ def transfer_to_fulfillment():
47
+ """Transfer to fulfillment agent after payment is processed."""
48
+ print("[HANDOFF] → Fulfillment Agent")
49
+ return fulfillment_agent
50
+
51
+
52
+ def transfer_to_supervisor():
53
+ """Escalate to supervisor for complex issues."""
54
+ global conversation_state
55
+ conversation_state["escalation_count"] += 1
56
+ print(f"[ESCALATION] → Supervisor (Escalation #{conversation_state['escalation_count']})")
57
+ return supervisor_agent
58
+
59
+
60
+ def transfer_back_to_sales():
61
+ """Return customer to sales agent."""
62
+ print("[HANDOFF] ← Sales Agent")
63
+ return sales_agent
64
+
65
+
66
+ # ============================================================================
67
+ # Conditional Transfer Functions
68
+ # ============================================================================
69
+
70
+ def conditional_transfer_payment(context_variables: Dict[str, Any]):
71
+ """
72
+ Conditionally transfer to payment based on order total.
73
+ High-value orders go to supervisor for approval.
74
+ """
75
+ order_total = context_variables.get("order_total", 0)
76
+
77
+ if order_total > 10000:
78
+ print(f"[CONDITIONAL] High-value order (${order_total}) → Supervisor")
79
+ return supervisor_agent
80
+ else:
81
+ print(f"[CONDITIONAL] Standard order (${order_total}) → Payment Processing")
82
+ return payment_processing_agent
83
+
84
+
85
+ # ============================================================================
86
+ # Agent Functions
87
+ # ============================================================================
88
+
89
+ def verify_order(order_id: str, customer_id: str) -> str:
90
+ """Verify order details and customer eligibility."""
91
+ global conversation_state
92
+ conversation_state["order_id"] = order_id
93
+
94
+ # Simulated verification
95
+ return f"Order {order_id} verified for customer {customer_id}. Ready for payment."
96
+
97
+
98
+ def process_payment(payment_method: str, amount: float) -> str:
99
+ """Process payment for the order."""
100
+ # Simulated payment processing
101
+ return f"Payment of ${amount:.2f} processed via {payment_method}. Transaction ID: TXN-{payment_method}-001"
102
+
103
+
104
+ def schedule_fulfillment(order_id: str, delivery_address: str) -> str:
105
+ """Schedule order fulfillment and delivery."""
106
+ # Simulated fulfillment
107
+ return f"Order {order_id} scheduled for delivery to {delivery_address}. Expected delivery: 3-5 business days."
108
+
109
+
110
+ def approve_order(order_id: str, approval_note: str) -> str:
111
+ """Supervisor approves high-value orders."""
112
+ return f"Order {order_id} approved by supervisor. Note: {approval_note}"
113
+
114
+
115
+ # ============================================================================
116
+ # Agent Definitions with Handoff Patterns
117
+ # ============================================================================
118
+
119
+ # Sales Agent - Entry point
120
+ sales_agent = Agent(
121
+ name="Sales Agent",
122
+ instructions="""You are a sales agent helping customers place orders.
123
+
124
+ When a customer wants to order:
125
+ 1. Collect order details (items, quantities)
126
+ 2. Calculate order total
127
+ 3. Transfer to Order Verification Agent to validate the order
128
+
129
+ Be friendly and helpful!""",
130
+ functions=[transfer_to_order_verification]
131
+ )
132
+
133
+ # Order Verification Agent
134
+ order_verification_agent = Agent(
135
+ name="Order Verification Agent",
136
+ instructions="""You verify order details and customer eligibility.
137
+
138
+ Process:
139
+ 1. Verify the order details provided by the customer
140
+ 2. Check customer eligibility
141
+ 3. Transfer to Payment Processing Agent when verification is complete
142
+
143
+ If there are issues with the order, transfer back to Sales Agent.""",
144
+ functions=[verify_order, transfer_to_payment_processing, transfer_back_to_sales]
145
+ )
146
+
147
+ # Payment Processing Agent
148
+ payment_processing_agent = Agent(
149
+ name="Payment Processing Agent",
150
+ instructions="""You handle payment processing for orders.
151
+
152
+ Process:
153
+ 1. Collect payment information
154
+ 2. Process the payment securely
155
+ 3. Transfer to Fulfillment Agent when payment is successful
156
+
157
+ For high-value orders (>$10,000), escalate to Supervisor for approval first.
158
+ If payment fails, transfer back to Sales Agent.""",
159
+ functions=[process_payment, transfer_to_fulfillment, transfer_to_supervisor, transfer_back_to_sales]
160
+ )
161
+
162
+ # Fulfillment Agent
163
+ fulfillment_agent = Agent(
164
+ name="Fulfillment Agent",
165
+ instructions="""You handle order fulfillment and delivery.
166
+
167
+ Process:
168
+ 1. Schedule order fulfillment
169
+ 2. Arrange delivery
170
+ 3. Provide tracking information
171
+
172
+ Mark the issue as resolved when delivery is scheduled.""",
173
+ functions=[schedule_fulfillment, transfer_back_to_sales]
174
+ )
175
+
176
+ # Supervisor Agent - Handles escalations
177
+ supervisor_agent = Agent(
178
+ name="Supervisor Agent",
179
+ instructions="""You are a supervisor handling escalated cases.
180
+
181
+ Your role:
182
+ 1. Review escalated orders (especially high-value ones)
183
+ 2. Approve or modify orders as needed
184
+ 3. Resolve complex customer issues
185
+
186
+ You can transfer to any other agent as needed.""",
187
+ functions=[
188
+ approve_order,
189
+ transfer_to_payment_processing,
190
+ transfer_to_fulfillment,
191
+ transfer_back_to_sales
192
+ ]
193
+ )
194
+
195
+ # ============================================================================
196
+ # Usage Examples
197
+ # ============================================================================
198
+
199
+ def example_simple_handoff():
200
+ """Example 1: Simple linear handoff flow."""
201
+ print("\n" + "=" * 80)
202
+ print("Example 1: Simple Handoff Flow (Sales → Verification → Payment → Fulfillment)")
203
+ print("=" * 80)
204
+
205
+ messages = [
206
+ {"role": "user", "content": "I want to order 2 premium widgets for $500 total"}
207
+ ]
208
+
209
+ context_variables = {
210
+ "customer_id": "CUST123",
211
+ "customer_tier": "premium",
212
+ "order_total": 500
213
+ }
214
+
215
+ # Start with sales agent
216
+ response = client.run(
217
+ agent=sales_agent,
218
+ messages=messages,
219
+ context_variables=context_variables
220
+ )
221
+
222
+ print(f"Current Agent: {response.agent.name}")
223
+ print(f"Response: {response.messages[-1]['content']}")
224
+
225
+ # Continue to verification
226
+ messages = response.messages
227
+ messages.append({"role": "user", "content": "Yes, verify the order please"})
228
+
229
+ response = client.run(
230
+ agent=response.agent,
231
+ messages=messages,
232
+ context_variables=context_variables
233
+ )
234
+
235
+ print(f"Current Agent: {response.agent.name}")
236
+ print(f"Response: {response.messages[-1]['content']}")
237
+
238
+
239
+ def example_conditional_handoff():
240
+ """Example 2: Conditional handoff based on order value."""
241
+ print("\n" + "=" * 80)
242
+ print("Example 2: Conditional Handoff (High-Value Order → Supervisor)")
243
+ print("=" * 80)
244
+
245
+ messages = [
246
+ {"role": "user", "content": "I want to place a large enterprise order worth $15,000"}
247
+ ]
248
+
249
+ context_variables = {
250
+ "customer_id": "CUST456",
251
+ "customer_tier": "enterprise",
252
+ "order_total": 15000
253
+ }
254
+
255
+ response = client.run(
256
+ agent=sales_agent,
257
+ messages=messages,
258
+ context_variables=context_variables
259
+ )
260
+
261
+ print(f"Current Agent: {response.agent.name}")
262
+ print(f"Context: {context_variables}")
263
+
264
+
265
+ def example_bidirectional_handoff():
266
+ """Example 3: Bidirectional handoff (agent can go back)."""
267
+ print("\n" + "=" * 80)
268
+ print("Example 3: Bidirectional Handoff (Payment fails → Back to Sales)")
269
+ print("=" * 80)
270
+
271
+ messages = [
272
+ {"role": "user", "content": "My payment failed, what should I do?"}
273
+ ]
274
+
275
+ context_variables = {
276
+ "customer_id": "CUST789",
277
+ "payment_failed": True
278
+ }
279
+
280
+ # Start at payment processing agent
281
+ response = client.run(
282
+ agent=payment_processing_agent,
283
+ messages=messages,
284
+ context_variables=context_variables
285
+ )
286
+
287
+ print(f"Current Agent: {response.agent.name}")
288
+ print(f"Response: {response.messages[-1]['content']}")
289
+
290
+
291
+ def example_context_preservation():
292
+ """Example 4: Context preservation across handoffs."""
293
+ print("\n" + "=" * 80)
294
+ print("Example 4: Context Preservation Across Handoffs")
295
+ print("=" * 80)
296
+
297
+ initial_context = {
298
+ "customer_id": "CUST999",
299
+ "customer_tier": "premium",
300
+ "order_total": 750,
301
+ "order_items": ["widget-pro", "widget-plus"],
302
+ "delivery_address": "123 Main St, City, State 12345"
303
+ }
304
+
305
+ messages = [
306
+ {"role": "user", "content": "I'm ready to complete my order"}
307
+ ]
308
+
309
+ response = client.run(
310
+ agent=sales_agent,
311
+ messages=messages,
312
+ context_variables=initial_context
313
+ )
314
+
315
+ print(f"Initial Context: {initial_context}")
316
+ print(f"Current Agent: {response.agent.name}")
317
+ print("Context is automatically preserved across all handoffs!")
318
+
319
+
320
+ # ============================================================================
321
+ # Swarm Handoff Limitations
322
+ # ============================================================================
323
+
324
+ def demonstrate_limitations():
325
+ """Demonstrate limitations of Swarm's handoff system."""
326
+ print("\n" + "=" * 80)
327
+ print("Swarm Handoff Limitations")
328
+ print("=" * 80)
329
+
330
+ limitations = [
331
+ "1. NO DECLARATIVE HANDOFF RULES: Handoffs are coded in functions, not declared",
332
+ "2. NO CONDITIONAL SYNTAX: Must write Python code for conditions",
333
+ "3. NO HANDOFF OBSERVABILITY: Can't track handoff metrics or patterns",
334
+ "4. NO HANDOFF POLICIES: Can't enforce rules like 'max 3 handoffs'",
335
+ "5. MANUAL CONTEXT MANAGEMENT: Must manually pass context_variables",
336
+ "6. NO HANDOFF APPROVAL: Can't require approval for certain handoffs",
337
+ "7. NO HANDOFF ROLLBACK: Can't undo a handoff if it was wrong",
338
+ "8. HARD TO TEST: Handoff logic scattered across functions",
339
+ ]
340
+
341
+ for limitation in limitations:
342
+ print(f" ❌ {limitation}")
343
+
344
+ print("\n ✓ OSSA solves ALL of these with declarative handoff configuration!")
345
+ print(" See after-handoffs.ossa.yaml for the solution.")
346
+
347
+
348
+ # ============================================================================
349
+ # Main
350
+ # ============================================================================
351
+
352
+ if __name__ == "__main__":
353
+ print("OpenAI Swarm - Advanced Handoff Patterns")
354
+ print("=" * 80)
355
+
356
+ # Run examples
357
+ example_simple_handoff()
358
+ example_conditional_handoff()
359
+ example_bidirectional_handoff()
360
+ example_context_preservation()
361
+ demonstrate_limitations()
362
+
363
+ print("\n" + "=" * 80)
364
+ print("Migration to OSSA")
365
+ print("=" * 80)
366
+ print("See after-handoffs.ossa.yaml for declarative handoff configuration.")
367
+ print("\nOSSA Benefits:")
368
+ print(" ✓ Declarative handoff rules (YAML, not code)")
369
+ print(" ✓ Conditional handoffs with expression syntax")
370
+ print(" ✓ Automatic context propagation (no manual passing)")
371
+ print(" ✓ Handoff observability (metrics, tracing, logging)")
372
+ print(" ✓ Handoff policies (max handoffs, approval rules)")
373
+ print(" ✓ Easy testing and validation")