@siddharthm28/minions-ai 0.0.0-stage → 1.0.1-beta.7

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 (337) hide show
  1. package/README.md +370 -2
  2. package/SECURITY.md +49 -0
  3. package/dist/a2a/cards.d.ts +5 -0
  4. package/dist/a2a/cards.js +131 -0
  5. package/dist/a2a/cards.js.map +1 -0
  6. package/dist/a2a/mapper.d.ts +33 -0
  7. package/dist/a2a/mapper.js +177 -0
  8. package/dist/a2a/mapper.js.map +1 -0
  9. package/dist/a2a/routes-a2a.d.ts +12 -0
  10. package/dist/a2a/routes-a2a.js +360 -0
  11. package/dist/a2a/routes-a2a.js.map +1 -0
  12. package/dist/a2a/types.d.ts +145 -0
  13. package/dist/a2a/types.js +21 -0
  14. package/dist/a2a/types.js.map +1 -0
  15. package/dist/agents/author-agents.d.ts +16 -0
  16. package/dist/agents/author-agents.js +54 -0
  17. package/dist/agents/author-agents.js.map +1 -0
  18. package/dist/agents/author-tools.d.ts +34 -0
  19. package/dist/agents/author-tools.js +201 -0
  20. package/dist/agents/author-tools.js.map +1 -0
  21. package/dist/agents/default-agent.d.ts +25 -0
  22. package/dist/agents/default-agent.js +121 -0
  23. package/dist/agents/default-agent.js.map +1 -0
  24. package/dist/agents/default-prompt.d.ts +40 -0
  25. package/dist/agents/default-prompt.js +196 -0
  26. package/dist/agents/default-prompt.js.map +1 -0
  27. package/dist/agents/harness-tools.d.ts +84 -0
  28. package/dist/agents/harness-tools.js +289 -0
  29. package/dist/agents/harness-tools.js.map +1 -0
  30. package/dist/agents/loader.d.ts +23 -0
  31. package/dist/agents/loader.js +170 -0
  32. package/dist/agents/loader.js.map +1 -0
  33. package/dist/agents/md-profile.d.ts +58 -0
  34. package/dist/agents/md-profile.js +120 -0
  35. package/dist/agents/md-profile.js.map +1 -0
  36. package/dist/agents/permissions.d.ts +71 -0
  37. package/dist/agents/permissions.js +142 -0
  38. package/dist/agents/permissions.js.map +1 -0
  39. package/dist/agents/provider-keys.d.ts +19 -0
  40. package/dist/agents/provider-keys.js +55 -0
  41. package/dist/agents/provider-keys.js.map +1 -0
  42. package/dist/agents/tools-policy.d.ts +83 -0
  43. package/dist/agents/tools-policy.js +143 -0
  44. package/dist/agents/tools-policy.js.map +1 -0
  45. package/dist/agents/translator.d.ts +54 -0
  46. package/dist/agents/translator.js +238 -0
  47. package/dist/agents/translator.js.map +1 -0
  48. package/dist/cli.d.ts +2 -0
  49. package/dist/cli.js +1102 -0
  50. package/dist/cli.js.map +1 -0
  51. package/dist/core/agent-colors.d.ts +35 -0
  52. package/dist/core/agent-colors.js +75 -0
  53. package/dist/core/agent-colors.js.map +1 -0
  54. package/dist/core/audit.d.ts +14 -0
  55. package/dist/core/audit.js +26 -0
  56. package/dist/core/audit.js.map +1 -0
  57. package/dist/core/copilot-runtime.d.ts +7 -0
  58. package/dist/core/copilot-runtime.js +26 -0
  59. package/dist/core/copilot-runtime.js.map +1 -0
  60. package/dist/core/crypto.d.ts +25 -0
  61. package/dist/core/crypto.js +103 -0
  62. package/dist/core/crypto.js.map +1 -0
  63. package/dist/core/embedded-assets.d.ts +7 -0
  64. package/dist/core/embedded-assets.js +114 -0
  65. package/dist/core/embedded-assets.js.map +1 -0
  66. package/dist/core/html.d.ts +2 -0
  67. package/dist/core/html.js +5 -0
  68. package/dist/core/html.js.map +1 -0
  69. package/dist/core/install-paths.d.ts +14 -0
  70. package/dist/core/install-paths.js +52 -0
  71. package/dist/core/install-paths.js.map +1 -0
  72. package/dist/core/module-path.d.ts +7 -0
  73. package/dist/core/module-path.js +18 -0
  74. package/dist/core/module-path.js.map +1 -0
  75. package/dist/core/pkg.d.ts +4 -0
  76. package/dist/core/pkg.js +2 -0
  77. package/dist/core/pkg.js.map +1 -0
  78. package/dist/core/run-queue.d.ts +14 -0
  79. package/dist/core/run-queue.js +19 -0
  80. package/dist/core/run-queue.js.map +1 -0
  81. package/dist/core/types.d.ts +244 -0
  82. package/dist/core/types.js +2 -0
  83. package/dist/core/types.js.map +1 -0
  84. package/dist/core/workspace.d.ts +29 -0
  85. package/dist/core/workspace.js +64 -0
  86. package/dist/core/workspace.js.map +1 -0
  87. package/dist/execution/approvals.d.ts +32 -0
  88. package/dist/execution/approvals.js +87 -0
  89. package/dist/execution/approvals.js.map +1 -0
  90. package/dist/execution/chat-engine.d.ts +66 -0
  91. package/dist/execution/chat-engine.js +266 -0
  92. package/dist/execution/chat-engine.js.map +1 -0
  93. package/dist/execution/chat-hub.d.ts +73 -0
  94. package/dist/execution/chat-hub.js +38 -0
  95. package/dist/execution/chat-hub.js.map +1 -0
  96. package/dist/execution/chat-runner.d.ts +104 -0
  97. package/dist/execution/chat-runner.js +380 -0
  98. package/dist/execution/chat-runner.js.map +1 -0
  99. package/dist/execution/retention.d.ts +34 -0
  100. package/dist/execution/retention.js +62 -0
  101. package/dist/execution/retention.js.map +1 -0
  102. package/dist/execution/runner.d.ts +56 -0
  103. package/dist/execution/runner.js +459 -0
  104. package/dist/execution/runner.js.map +1 -0
  105. package/dist/execution/team/artifacts.d.ts +36 -0
  106. package/dist/execution/team/artifacts.js +70 -0
  107. package/dist/execution/team/artifacts.js.map +1 -0
  108. package/dist/execution/team/conditions.d.ts +22 -0
  109. package/dist/execution/team/conditions.js +121 -0
  110. package/dist/execution/team/conditions.js.map +1 -0
  111. package/dist/execution/team/engine.d.ts +90 -0
  112. package/dist/execution/team/engine.js +854 -0
  113. package/dist/execution/team/engine.js.map +1 -0
  114. package/dist/execution/team/executor.d.ts +96 -0
  115. package/dist/execution/team/executor.js +290 -0
  116. package/dist/execution/team/executor.js.map +1 -0
  117. package/dist/execution/team/hub.d.ts +11 -0
  118. package/dist/execution/team/hub.js +29 -0
  119. package/dist/execution/team/hub.js.map +1 -0
  120. package/dist/execution/team/messages.d.ts +7 -0
  121. package/dist/execution/team/messages.js +19 -0
  122. package/dist/execution/team/messages.js.map +1 -0
  123. package/dist/execution/team/output.d.ts +23 -0
  124. package/dist/execution/team/output.js +101 -0
  125. package/dist/execution/team/output.js.map +1 -0
  126. package/dist/execution/team/tools.d.ts +30 -0
  127. package/dist/execution/team/tools.js +208 -0
  128. package/dist/execution/team/tools.js.map +1 -0
  129. package/dist/execution/usage-proxy.d.ts +36 -0
  130. package/dist/execution/usage-proxy.js +206 -0
  131. package/dist/execution/usage-proxy.js.map +1 -0
  132. package/dist/http/route-schemas.d.ts +10 -0
  133. package/dist/http/route-schemas.js +3 -0
  134. package/dist/http/route-schemas.js.map +1 -0
  135. package/dist/http/routes-agents.d.ts +12 -0
  136. package/dist/http/routes-agents.js +642 -0
  137. package/dist/http/routes-agents.js.map +1 -0
  138. package/dist/http/routes-chat.d.ts +19 -0
  139. package/dist/http/routes-chat.js +340 -0
  140. package/dist/http/routes-chat.js.map +1 -0
  141. package/dist/http/routes-mcp.d.ts +11 -0
  142. package/dist/http/routes-mcp.js +520 -0
  143. package/dist/http/routes-mcp.js.map +1 -0
  144. package/dist/http/routes-memory.d.ts +10 -0
  145. package/dist/http/routes-memory.js +400 -0
  146. package/dist/http/routes-memory.js.map +1 -0
  147. package/dist/http/routes-platform.d.ts +12 -0
  148. package/dist/http/routes-platform.js +242 -0
  149. package/dist/http/routes-platform.js.map +1 -0
  150. package/dist/http/routes-runs.d.ts +15 -0
  151. package/dist/http/routes-runs.js +306 -0
  152. package/dist/http/routes-runs.js.map +1 -0
  153. package/dist/http/routes-system.d.ts +19 -0
  154. package/dist/http/routes-system.js +357 -0
  155. package/dist/http/routes-system.js.map +1 -0
  156. package/dist/http/routes-teams.d.ts +19 -0
  157. package/dist/http/routes-teams.js +356 -0
  158. package/dist/http/routes-teams.js.map +1 -0
  159. package/dist/http/security.d.ts +15 -0
  160. package/dist/http/security.js +61 -0
  161. package/dist/http/security.js.map +1 -0
  162. package/dist/http/web-static.d.ts +5 -0
  163. package/dist/http/web-static.js +43 -0
  164. package/dist/http/web-static.js.map +1 -0
  165. package/dist/mcp/mcp.d.ts +77 -0
  166. package/dist/mcp/mcp.js +465 -0
  167. package/dist/mcp/mcp.js.map +1 -0
  168. package/dist/mcp/oauth.d.ts +76 -0
  169. package/dist/mcp/oauth.js +185 -0
  170. package/dist/mcp/oauth.js.map +1 -0
  171. package/dist/memory/capture.d.ts +65 -0
  172. package/dist/memory/capture.js +152 -0
  173. package/dist/memory/capture.js.map +1 -0
  174. package/dist/memory/code-index.d.ts +19 -0
  175. package/dist/memory/code-index.js +447 -0
  176. package/dist/memory/code-index.js.map +1 -0
  177. package/dist/memory/config.d.ts +36 -0
  178. package/dist/memory/config.js +169 -0
  179. package/dist/memory/config.js.map +1 -0
  180. package/dist/memory/context.d.ts +34 -0
  181. package/dist/memory/context.js +110 -0
  182. package/dist/memory/context.js.map +1 -0
  183. package/dist/memory/embeddings.d.ts +48 -0
  184. package/dist/memory/embeddings.js +115 -0
  185. package/dist/memory/embeddings.js.map +1 -0
  186. package/dist/memory/lessons.d.ts +58 -0
  187. package/dist/memory/lessons.js +242 -0
  188. package/dist/memory/lessons.js.map +1 -0
  189. package/dist/memory/retrieve.d.ts +3 -0
  190. package/dist/memory/retrieve.js +162 -0
  191. package/dist/memory/retrieve.js.map +1 -0
  192. package/dist/memory/runtime.d.ts +72 -0
  193. package/dist/memory/runtime.js +202 -0
  194. package/dist/memory/runtime.js.map +1 -0
  195. package/dist/memory/schema.d.ts +24 -0
  196. package/dist/memory/schema.js +124 -0
  197. package/dist/memory/schema.js.map +1 -0
  198. package/dist/memory/sqlite-store.d.ts +71 -0
  199. package/dist/memory/sqlite-store.js +414 -0
  200. package/dist/memory/sqlite-store.js.map +1 -0
  201. package/dist/memory/store.d.ts +126 -0
  202. package/dist/memory/store.js +2 -0
  203. package/dist/memory/store.js.map +1 -0
  204. package/dist/memory/text.d.ts +23 -0
  205. package/dist/memory/text.js +114 -0
  206. package/dist/memory/text.js.map +1 -0
  207. package/dist/memory/tools.d.ts +28 -0
  208. package/dist/memory/tools.js +201 -0
  209. package/dist/memory/tools.js.map +1 -0
  210. package/dist/memory/types.d.ts +231 -0
  211. package/dist/memory/types.js +20 -0
  212. package/dist/memory/types.js.map +1 -0
  213. package/dist/onboarding/init.d.ts +74 -0
  214. package/dist/onboarding/init.js +375 -0
  215. package/dist/onboarding/init.js.map +1 -0
  216. package/dist/onboarding/reset.d.ts +28 -0
  217. package/dist/onboarding/reset.js +87 -0
  218. package/dist/onboarding/reset.js.map +1 -0
  219. package/dist/onboarding/wizard.d.ts +5 -0
  220. package/dist/onboarding/wizard.js +95 -0
  221. package/dist/onboarding/wizard.js.map +1 -0
  222. package/dist/schema/agent-definition.schema.json +493 -0
  223. package/dist/schema/agent-run-snapshot-1.0.json +90 -0
  224. package/dist/schema/agent-system-definition-1.0.json +210 -0
  225. package/dist/serve.d.ts +2 -0
  226. package/dist/serve.js +28 -0
  227. package/dist/serve.js.map +1 -0
  228. package/dist/server.d.ts +37 -0
  229. package/dist/server.js +206 -0
  230. package/dist/server.js.map +1 -0
  231. package/dist/store/adapter.d.ts +170 -0
  232. package/dist/store/adapter.js +2 -0
  233. package/dist/store/adapter.js.map +1 -0
  234. package/dist/store/migrations.d.ts +5 -0
  235. package/dist/store/migrations.js +164 -0
  236. package/dist/store/migrations.js.map +1 -0
  237. package/dist/store/platform.d.ts +185 -0
  238. package/dist/store/platform.js +373 -0
  239. package/dist/store/platform.js.map +1 -0
  240. package/dist/store/postgres-stub.d.ts +60 -0
  241. package/dist/store/postgres-stub.js +46 -0
  242. package/dist/store/postgres-stub.js.map +1 -0
  243. package/dist/store/sqlite.d.ts +199 -0
  244. package/dist/store/sqlite.js +376 -0
  245. package/dist/store/sqlite.js.map +1 -0
  246. package/dist/store/teams.d.ts +205 -0
  247. package/dist/store/teams.js +356 -0
  248. package/dist/store/teams.js.map +1 -0
  249. package/dist/systems/resolver.d.ts +68 -0
  250. package/dist/systems/resolver.js +93 -0
  251. package/dist/systems/resolver.js.map +1 -0
  252. package/dist/systems/schema.d.ts +25 -0
  253. package/dist/systems/schema.js +92 -0
  254. package/dist/systems/schema.js.map +1 -0
  255. package/dist/systems/service.d.ts +79 -0
  256. package/dist/systems/service.js +332 -0
  257. package/dist/systems/service.js.map +1 -0
  258. package/dist/systems/types.d.ts +343 -0
  259. package/dist/systems/types.js +9 -0
  260. package/dist/systems/types.js.map +1 -0
  261. package/dist/systems/validate.d.ts +31 -0
  262. package/dist/systems/validate.js +221 -0
  263. package/dist/systems/validate.js.map +1 -0
  264. package/dist/web/assets/AgentBuilder-Dv1BXU5g.js +6 -0
  265. package/dist/web/assets/Agents-B-lLJiV_.js +1 -0
  266. package/dist/web/assets/ApiDocs-Ca_HH10a.js +1 -0
  267. package/dist/web/assets/Audit-Bt9bUmFj.js +1 -0
  268. package/dist/web/assets/Chat-37rPXOES.js +23 -0
  269. package/dist/web/assets/Dashboard-B5JRvBY-.js +55 -0
  270. package/dist/web/assets/ImportDialog-B6IWYCZa.js +6 -0
  271. package/dist/web/assets/Mcp-BydyyVHi.js +1 -0
  272. package/dist/web/assets/NewRun-CxR5Gtek.js +1 -0
  273. package/dist/web/assets/Onboarding-BboOS1_0.js +1 -0
  274. package/dist/web/assets/ProviderForm-CdQgm4r6.js +1 -0
  275. package/dist/web/assets/RunDetail-U0DDTERT.js +1 -0
  276. package/dist/web/assets/Runs-Bk8MdPDD.js +1 -0
  277. package/dist/web/assets/RunsExplorer-BIk5XeTu.js +1 -0
  278. package/dist/web/assets/Settings-WHYbjOUL.js +1 -0
  279. package/dist/web/assets/TeamBuilder-DXzttBSd.js +1 -0
  280. package/dist/web/assets/TeamRun-DjiIjnlI.js +1 -0
  281. package/dist/web/assets/TeamRuns-BWZP6PkG.js +1 -0
  282. package/dist/web/assets/Teams-C4Mrzu-4.js +1 -0
  283. package/dist/web/assets/arrow-left-Bp5r-obb.js +1 -0
  284. package/dist/web/assets/arrow-right-uwrP4PqN.js +1 -0
  285. package/dist/web/assets/chevron-down-CGEablze.js +1 -0
  286. package/dist/web/assets/chevron-right-DzxbYGj6.js +1 -0
  287. package/dist/web/assets/circle-check-DmGqw_vu.js +1 -0
  288. package/dist/web/assets/components-v9BHvaAb.js +1 -0
  289. package/dist/web/assets/copy-sksv66WA.js +1 -0
  290. package/dist/web/assets/external-link-BaFBm9tb.js +1 -0
  291. package/dist/web/assets/eye-C639CufJ.js +1 -0
  292. package/dist/web/assets/file-braces-GgY_6UIQ.js +1 -0
  293. package/dist/web/assets/index-BR3-ClJj.css +2 -0
  294. package/dist/web/assets/index-BmX2ZpWv.js +12 -0
  295. package/dist/web/assets/key-round-DMXLzVY1.js +1 -0
  296. package/dist/web/assets/lib-BPSKZisq.js +14 -0
  297. package/dist/web/assets/plus-CZRzhmry.js +1 -0
  298. package/dist/web/assets/refresh-cw-DiU472Sz.js +1 -0
  299. package/dist/web/assets/rocket-RaC3J1Y_.js +1 -0
  300. package/dist/web/assets/save-DUGK5lPZ.js +1 -0
  301. package/dist/web/assets/shield-check-BTQrCDUH.js +1 -0
  302. package/dist/web/assets/sparkles-B3uUOi1n.js +1 -0
  303. package/dist/web/assets/teams-BIWpqKFl.js +1 -0
  304. package/dist/web/assets/ui-DaoC-VN2.js +1 -0
  305. package/dist/web/assets/wand-sparkles-CZV_SdvR.js +1 -0
  306. package/dist/web/assets/wrench-CW3XutzC.js +1 -0
  307. package/dist/web/assets/zap-DjW8cFZP.js +1 -0
  308. package/dist/web/index.html +25 -0
  309. package/docs/A2A.md +94 -0
  310. package/docs/API.md +187 -0
  311. package/docs/CLI.md +161 -0
  312. package/docs/EXECUTABLE.md +178 -0
  313. package/docs/TEAMS-GUIDE.md +214 -0
  314. package/docs/UAT.md +170 -0
  315. package/docs/media/agent-author.gif +0 -0
  316. package/docs/media/agents-builder.gif +0 -0
  317. package/docs/media/minions-ai-icon.png +0 -0
  318. package/docs/media/minions-ai-icon.svg +100 -0
  319. package/docs/media/minions-ai-logo.png +0 -0
  320. package/docs/media/minions-ai-logo.svg +107 -0
  321. package/docs/media/northwind-storefront.gif +0 -0
  322. package/docs/media/setup-wizard.gif +0 -0
  323. package/docs/media/sidebar-theme.gif +0 -0
  324. package/docs/media/team-author.gif +0 -0
  325. package/docs/media/team-builder.gif +0 -0
  326. package/docs/media/team-run-dialog.png +0 -0
  327. package/docs/media/team-run-overview.png +0 -0
  328. package/docs/media/team-run.gif +0 -0
  329. package/docs/media/teams-list.png +0 -0
  330. package/examples/architect.agent.json +146 -0
  331. package/examples/full-stack-developer.agent.json +165 -0
  332. package/examples/manager.agent.json +148 -0
  333. package/examples/qe-engineer.agent.json +146 -0
  334. package/examples/requirements-analyst.agent.json +155 -0
  335. package/examples/software-delivery-team.agent-system.json +268 -0
  336. package/package.json +101 -4
  337. package/scripts/postinstall.mjs +33 -0
package/README.md CHANGED
@@ -1,3 +1,371 @@
1
- # Temporary Holding Version
1
+ <p align="center">
2
+ <img src="docs/media/minions-ai-logo.svg" alt="Minions-ai — a software factory of custom agent teams" width="760">
3
+ </p>
2
4
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
5
+ <h1 align="center">Minions-ai</h1>
6
+
7
+ <p align="center"><strong>A fully configurable software factory of custom AI agent teams — ship to market faster, and let every run make the next one smarter.</strong></p>
8
+
9
+ <p align="center">
10
+ <a href="https://github.com/siddharth-mishra-28/minions-ai/releases/latest"><img alt="Latest release" src="https://img.shields.io/github/v/release/siddharth-mishra-28/minions-ai?style=flat-square"></a>
11
+ <img alt="UI · API · CLI" src="https://img.shields.io/badge/UI%20%C2%B7%20API%20%C2%B7%20CLI-one%20executable-35c6a1?style=flat-square">
12
+ </p>
13
+
14
+ Minions-ai is a local-first delivery platform for teams of AI agents. Every role, model, tool, permission, memory scope and workflow is yours to define. The shipped **Software Delivery Team** is a working template, not a fixed pipeline: requirements, architecture, implementation and independent QA are five editable agents connected by a workflow you control. Each run records its evidence, and agents accumulate episodes, lessons and feedback so the next delivery starts further ahead.
15
+
16
+ The whole platform ships as **one self-contained executable per operating system** for Windows, macOS and Linux — with a React cockpit, REST API, CLI and A2A surface around the same execution engine. Bring your own model provider; keys stay in a local encrypted vault.
17
+
18
+ ![A Minions-ai team run](docs/media/team-run.gif)
19
+
20
+ ## Why a software factory, not another chat box
21
+
22
+ - **Ship sooner.** Reusable role agents, pinned team versions and bounded rework loops cut the distance between a brief and a verified delivery.
23
+ - **Make quality repeatable.** Every member has an explicit output contract. QA verifies the product independently instead of trusting the builders' own reports.
24
+ - **Specialise without glue code.** Swap the model, prompt, tools, permissions and memory scope of each role independently. Clone a working agent and change one thing.
25
+ - **Govern what runs.** Tool policy, approvals, budgets, audit events and content-hashed artifacts are part of the definition, not an afterthought.
26
+ - **Keep your data local.** The server binds loopback by default; SQLite, run artifacts and provider credentials live on your machine.
27
+ - **Improve with every delivery.** Episodic memory, learned lessons and feedback are recalled into later runs, so the team compounds experience instead of starting cold.
28
+ - **Connect the rest of your stack.** MCP servers extend tools; A2A lets other agents drive a published team; the REST API and CLI expose the same run record.
29
+
30
+ ## Download and run
31
+
32
+ Pick the executable for your operating system. Each download is a single file; the native SQLite addon and the Copilot runtime are embedded and extracted once to a versioned cache on first use.
33
+
34
+ | Platform | Download | First run |
35
+ | --- | --- | --- |
36
+ | **Windows x64** | [`minions-ai-win-x64.exe`](https://siddharth-mishra-28.github.io/minions-ai/downloads/minions-ai-win-x64.exe) | Double-click, or run `minions-ai.exe ui` |
37
+ | **macOS Apple Silicon** | [`minions-ai-mac-arm64.zip`](https://siddharth-mishra-28.github.io/minions-ai/downloads/minions-ai-mac-arm64.zip) | Unzip, then open **Minions-ai.app** |
38
+ | **macOS Intel** | [`minions-ai-mac-x64.zip`](https://siddharth-mishra-28.github.io/minions-ai/downloads/minions-ai-mac-x64.zip) | Unzip, then open **Minions-ai.app** |
39
+ | **Linux x64** | [`minions-ai-linux-x64.tar.gz`](https://siddharth-mishra-28.github.io/minions-ai/downloads/minions-ai-linux-x64.tar.gz) | Extract, then run `./minions-ai ui` (or `./install.sh`) |
40
+
41
+ Every download above is the build from the latest commit, hosted on the project site. Verify it against [`SHA256SUMS`](https://siddharth-mishra-28.github.io/minions-ai/downloads/SHA256SUMS); tagged releases are also on [GitHub](https://github.com/siddharth-mishra-28/minions-ai/releases/latest).
42
+
43
+ ### First launch
44
+
45
+ Double-click the executable (or **Minions-ai.app** on macOS) to start the cockpit and open it in your default browser. The explicit equivalent is `minions-ai.exe ui`; every command, option and CLI workflow is still available through arguments.
46
+
47
+ **Windows**
48
+
49
+ ```bat
50
+ minions-ai.exe ui
51
+ ```
52
+
53
+ If SmartScreen appears, choose **More info → Run anyway**. The executable is not code-signed; verify the published SHA-256 if you want to confirm the download.
54
+
55
+ **macOS**
56
+
57
+ ```bash
58
+ unzip minions-ai-mac-arm64.zip
59
+ open Minions-ai.app # or double-click it in Finder
60
+
61
+ # Gatekeeper blocked an unsigned build? Right-click the app -> Open, or:
62
+ xattr -dr com.apple.quarantine Minions-ai.app
63
+
64
+ # CLI flags run through the bundle:
65
+ ./Minions-ai.app/Contents/MacOS/minions-ai --help
66
+ ```
67
+
68
+ Builds are unsigned unless the release notes say otherwise.
69
+
70
+ **Linux**
71
+
72
+ ```bash
73
+ tar -xzf minions-ai-linux-x64.tar.gz
74
+ cd minions-ai-linux-x64
75
+ ./minions-ai ui
76
+
77
+ # Optional: install under ~/.local/bin with the Minions-ai icon in your app menu
78
+ ./install.sh
79
+ ```
80
+
81
+ `ui` starts the cockpit and opens `http://127.0.0.1:3100` in your browser. On a headless machine use `ui --no-open` or `serve`.
82
+
83
+ The first screen is the setup wizard. Choose a provider, enter its OpenAI-compatible endpoint and key, and press **Test connection**. The key is sealed locally with AES-256-GCM; it is never printed or sent anywhere except your provider. Finishing the wizard registers the five starter role agents and publishes the sample team.
84
+
85
+ ![First-run setup wizard](docs/media/setup-wizard.gif)
86
+
87
+ ## One executable, three ways to work
88
+
89
+ | Mode | Start it | What you get |
90
+ | --- | --- | --- |
91
+ | **Cockpit UI** | `minions-ai.exe ui` | Browser UI for agents, teams, runs, chat, memory, approvals and settings. `--no-open` keeps it headless. |
92
+ | **API server** | `minions-ai.exe serve --port 3100` | The same cockpit plus REST API, OpenAPI docs and A2A on one origin. `--open` opens a browser. |
93
+ | **CLI** | `minions-ai.exe --help` | Validation, headless runs, team lifecycle, chat, memory, MCP and inspection, scriptable end to end. |
94
+
95
+ Both server modes serve Swagger at **`/docs`** and the raw contract at **`/openapi.json`**:
96
+
97
+ ```text
98
+ http://127.0.0.1:3100/ cockpit
99
+ http://127.0.0.1:3100/docs Swagger UI
100
+ http://127.0.0.1:3100/openapi.json
101
+ http://127.0.0.1:3100/a2a platform A2A card
102
+ ```
103
+
104
+ ![The cockpit sidebar and dark mode](docs/media/sidebar-theme.gif)
105
+
106
+ ### Where your data lives
107
+
108
+ Packaged builds keep state in a user-writable directory, so the executable can live in `Program Files`, `Downloads` or `/usr/local/bin`:
109
+
110
+ | Platform | Data (database, vault key, workspaces) | Cache (extracted assets) |
111
+ | --- | --- | --- |
112
+ | Windows | `%LOCALAPPDATA%\MinionsAI` | `%LOCALAPPDATA%\MinionsAI\cache` |
113
+ | macOS | `~/Library/Application Support/MinionsAI` | `~/Library/Caches/MinionsAI` |
114
+ | Linux | `$XDG_DATA_HOME/minions-ai` (or `~/.local/share/minions-ai`) | `$XDG_CACHE_HOME/minions-ai` (or `~/.cache/minions-ai`) |
115
+
116
+ Override them with `MINIONS_DATA_DIR` and `MINIONS_CACHE_DIR`. `--db` still points any command at a specific SQLite file. A source checkout keeps the historical `./data` default. To move an existing installation, copy the old `data/` directory to the new data directory before the first packaged launch.
117
+
118
+ ## The starter software factory
119
+
120
+ The shipped team models a small, accountable delivery organisation:
121
+
122
+ | Role | Responsibility | Default posture |
123
+ | --- | --- | --- |
124
+ | **Manager** | Decompose the objective, delegate, review specialist results, decide when the delivery is done | Full tool set, delegation policy |
125
+ | **Requirements analyst** | Turn the brief into numbered, testable requirements and acceptance criteria | Read-only investigation |
126
+ | **Architect** | Components, data model, interfaces, ADRs and delivery risks | Read-mostly |
127
+ | **Full-stack developer** | Implement the product and its tests; a code-reviewer sub-agent checks the work | Full workspace tools |
128
+ | **QE engineer** | Independently verify the delivered product with reproducible evidence | Full verification tools |
129
+
130
+ They are composed as `software-delivery-team` with two workflows:
131
+
132
+ 1. **`agile-delivery`** — requirements → implementation → independent QA, with a bounded rework loop when QA returns a failure.
133
+ 2. **`manager-led`** — the manager decomposes the objective, delegates to specialists, reviews each result and controls the next batch.
134
+
135
+ Every node has an output contract, every handoff is recorded, and every artifact is typed, versioned and content-hashed. Approvals are explicit (`interactive`, `autopilot` or `strict`), tool calls are policy-checked, and the audit trail is exportable. That is the difference between "an agent wrote something" and a delivery you can defend.
136
+
137
+ ![A completed storefront delivered by the sample team](docs/media/northwind-storefront.gif)
138
+
139
+ Change any of it. Replace the analyst with a regulatory specialist, give the architect a different model, add a security reviewer, or build a completely different factory for data pipelines, support operations or content production. Agents are versioned JSON; teams pin their members by definition hash; a published team version is immutable.
140
+
141
+ ## Cockpit tour
142
+
143
+ ### Agents: build, clone or design with AI
144
+
145
+ ![Agent builder](docs/media/agents-builder.gif)
146
+
147
+ **Agents → New agent** opens a guided builder for identity, provider, persona, tools, knowledge, permissions and advanced runtime settings. Every field has an **ⓘ** explanation. **Clone** copies an existing agent under a new name. **Create with AI** opens the Agent Designer, which interviews you about goals, duties, skills, tool policy and MCP servers, validates the definition through the same API the UI uses, and saves it.
148
+
149
+ ![Agent Designer](docs/media/agent-author.gif)
150
+
151
+ ### Teams: compose or design
152
+
153
+ ![Team designer](docs/media/team-author.gif)
154
+
155
+ **Teams → New team** opens the member and workflow designer for sequential, parallel, hierarchical and hybrid graphs, output contracts, delegation policies and communication budgets. **Design with AI** composes a team from your registered agents and pins each member by hash.
156
+
157
+ ![Team builder](docs/media/team-builder.gif)
158
+
159
+ ### Runs: live, auditable, exportable
160
+
161
+ ![Team run overview](docs/media/team-run-overview.png)
162
+
163
+ Every run — single-agent or team — lands on a live timeline with:
164
+
165
+ - **Execution** — every node, member, attempt, status and duration.
166
+ - **Conversation** — structured messages, reviews, decisions and handoffs between members.
167
+ - **Deliverables** — typed, versioned artifacts you can download.
168
+ - **Timeline** — the append-only audit stream (`run.start`, `node.start`, `member.prompt.send`, `artifact.publish`, `edge.fire`, …).
169
+ - **A2A** — the task as an A2A client sees it, including a reproducible JSON-RPC request.
170
+ - **Snapshot** — the pinned team version, workflow graph, member hashes and limits.
171
+
172
+ ![Team run dialog](docs/media/team-run-dialog.png)
173
+
174
+ The run header always shows the team, pinned version, workflow, workspace and run ID. **Stop** ends a run safely; **Export** downloads the whole bundle as JSON.
175
+
176
+ ![Teams list](docs/media/teams-list.png)
177
+
178
+ ## CLI reference
179
+
180
+ Use `minions-ai.exe` on Windows and `./minions-ai` on macOS/Linux. Run `minions-ai --help` or `minions-ai <command> --help` for every option.
181
+
182
+ ```bash
183
+ minions-ai init # setup wizard: provider, key, starter agents and team
184
+ minions-ai init --provider xiaomi --model mimo-v2.6-flash --api-key-stdin
185
+ minions-ai ui # cockpit + API; opens the browser
186
+ minions-ai ui --no-open --port 3100 # headless cockpit
187
+ minions-ai serve --port 3100 # headless UI + REST + Swagger + A2A
188
+ minions-ai serve --port 3100 --open
189
+ minions-ai reset --new-install --yes # wipe state and reseed the starter content
190
+ ```
191
+
192
+ ### Validate, run and inspect agents
193
+
194
+ ```bash
195
+ minions-ai validate --agentDefinition examples/full-stack-developer.agent.json
196
+ minions-ai run --agentDefinition examples/full-stack-developer.agent.json \
197
+ --task "Reply with exactly: OK" --approval autopilot --no-stream --output-format json
198
+ minions-ai list
199
+ minions-ai show full-stack-developer@1.0.0
200
+ minions-ai history --agentId full-stack-developer@1.0.0
201
+ minions-ai import-md --file ./profiles/reviewer.agent.md
202
+ ```
203
+
204
+ ### Teams
205
+
206
+ ```bash
207
+ minions-ai team validate --definition examples/software-delivery-team.agent-system.json
208
+ minions-ai team publish --definition examples/software-delivery-team.agent-system.json
209
+ minions-ai team list
210
+ minions-ai team show software-delivery-team
211
+ minions-ai team run --team software-delivery-team --workflow agile-delivery \
212
+ --task "Build the support-desk app described in SPEC.md" --workspace ./app --follow
213
+ minions-ai team status <runId>
214
+ minions-ai team stop <runId>
215
+ minions-ai team resume <runId> --follow
216
+ minions-ai team export <runId> --out ./team-run.json
217
+ ```
218
+
219
+ `team run --definition <path>` publishes the definition first, then runs it.
220
+
221
+ ### Chat and memory
222
+
223
+ ```bash
224
+ minions-ai chat create --agent full-stack-developer@1.0.0
225
+ minions-ai chat list
226
+ minions-ai chat send --thread <threadId> --message "Review the checkout flow"
227
+ minions-ai chat read --thread <threadId>
228
+
229
+ minions-ai memory index --root .
230
+ minions-ai memory search "checkout flow" --k 5
231
+ minions-ai memory recall --agent full-stack-developer@1.0.0 --task "Add refunds"
232
+ minions-ai memory stats
233
+ minions-ai memory lesson --trigger "the test suite fails on a missing lockfile" --text "Run the install step first."
234
+ minions-ai memory improve
235
+ minions-ai memory promote --id <nodeId>
236
+ minions-ai memory forget --id <nodeId>
237
+ minions-ai memory config --set '{"recall":{"k":12}}'
238
+ ```
239
+
240
+ ### MCP and A2A
241
+
242
+ ```bash
243
+ minions-ai mcp register --name docs --config ./mcp/docs.json --probe
244
+ minions-ai mcp-list
245
+ minions-ai team a2a card software-delivery-team
246
+ minions-ai team a2a task <runId>
247
+ ```
248
+
249
+ ## REST API
250
+
251
+ The full contract is served at `/docs` (Swagger UI) and `/openapi.json`. The common headless flow is:
252
+
253
+ 1. `POST /api/agents` — register an agent definition.
254
+ 2. `POST /api/teams` — register a team that pins those agents.
255
+ 3. `POST /api/teams/:id/publish` — freeze an immutable, runnable team version.
256
+ 4. `POST /api/teams/:id/runs` — start a team run; or `POST /api/agent-definitions/runs` for one agent.
257
+ 5. `GET /api/team-runs/:id` and `GET /api/team-runs/:id/events` — inspect the live record.
258
+ 6. `GET /api/team-runs/:id/export` — download the complete run bundle.
259
+
260
+ Minimal one-agent run:
261
+
262
+ ```bash
263
+ curl -sS -X POST http://127.0.0.1:3100/api/agent-definitions/runs \
264
+ -H 'content-type: application/json' \
265
+ -d '{
266
+ "definition": { "schemaVersion": "1.0", "metadata": { "name": "smoke", "version": "1.0.0" },
267
+ "task": { "prompt": "Reply with exactly: OK" } },
268
+ "taskOverride": "Reply with exactly: OK",
269
+ "approvalMode": "autopilot",
270
+ "runDir": "./runs/smoke"
271
+ }'
272
+ ```
273
+
274
+ Agent card and A2A:
275
+
276
+ ```bash
277
+ curl -s http://127.0.0.1:3100/.well-known/agent-card.json
278
+ curl -s http://127.0.0.1:3100/a2a/software-delivery-team/agent-card.json
279
+ ```
280
+
281
+ A2A RPC and task reads are loopback-only unless `A2A_TOKEN` is set. See [`docs/A2A.md`](docs/A2A.md) for methods, aliases, task states and artifact mapping.
282
+
283
+ ## Agent definitions
284
+
285
+ An agent is a versioned JSON document validated against schema v1.0. The important parts:
286
+
287
+ ```jsonc
288
+ {
289
+ "schemaVersion": "1.0",
290
+ "metadata": { "name": "slug", "version": "1.0.0", "description": "…", "tags": [], "color": "#2f6feb" },
291
+ "persona": { "useCopilotDefaultPrompt": true,
292
+ "systemMessage": { "mode": "append", "content": "…" } },
293
+ "instructions": { "global": ["…"], "scoped": [{ "applyTo": "src/**/*.ts", "body": "…" }] },
294
+ "knowledge": { "workingDirectory": ".", "additionalDirectories": [], "sessionStore": false },
295
+ "agents": [{ "name": "code-reviewer", "prompt": "…", "tools": ["read"], "infer": true }],
296
+ "task": { "prompt": "…", "deliveryMode": "enqueue" },
297
+ "tools": { "permissionPolicy": "pattern-list", "harness": true, "allowDestructive": false,
298
+ "builtins": { "default": "ask" }, "patterns": [], "custom": [] },
299
+ "mcp": { "servers": {}, "use": ["server-name"] },
300
+ "memory": { "enabled": true, "recall": { "k": 12 }, "codeGraph": { "enabled": true } },
301
+ "provider": { "type": "openai", "baseUrl": "https://api.example.com/v1", "model": "model-name",
302
+ "wireApi": "completions", "providerApiKey": "${MIMO_API_KEY}" },
303
+ "runtime": { "turnTimeoutMs": 5400000, "maxAiCredits": 5000, "streaming": false }
304
+ }
305
+ ```
306
+
307
+ Definitions store `${ENV_VAR}` references or sealed `enc:v1:` tokens, never raw keys in exports. The builder's **ⓘ** tooltips explain every field; the source of truth is `src/core/types.ts` plus the JSON schemas.
308
+
309
+ ## Teams, workflows and communication
310
+
311
+ A team pins its members by version and definition hash, then defines:
312
+
313
+ - **Members** — which agent fills each role (`lead`, `analyst`, `developer`, `qa`, …).
314
+ - **Workflows** — `sequential`, `parallel`, `hierarchical` or `hybrid`, with conditional edges and bounded attempts.
315
+ - **Contracts** — the artifact type each node must publish.
316
+ - **Delegation** — allowed members, depth, concurrency and review policy.
317
+ - **Communication** — peer-to-peer on/off, message budget and routing mode.
318
+ - **Limits** — wall-clock and turn budgets.
319
+
320
+ A published version is immutable. A run pins the team version plus a snapshot of every member, so months later you can explain exactly what ran, even after the definitions change.
321
+
322
+ Read the beginner's guide: [`docs/TEAMS-GUIDE.md`](docs/TEAMS-GUIDE.md).
323
+
324
+ ## Memory, MCP and A2A
325
+
326
+ **Memory.** A deterministic code graph plus BM25/graph recall supplies working context. Long-term knowledge accumulates as episodes and lessons per agent dataset, with a shared platform dataset you can promote to. Feedback and `memory improve` decay stale weights and lift cross-agent lessons. Every definition can tune recall (`k`, hops, budgets) and code-graph indexing independently.
327
+
328
+ **MCP.** Register servers with `mcp register --probe`, inspect discovered tools, and reference them by name in a definition's `mcp.use`. MCP tools are governed by the same permission policy as built-ins.
329
+
330
+ **A2A.** Every published team is an Agent2Agent agent with a card, `message/send`, `message/stream`, `tasks/get`, `tasks/list` and `tasks/cancel`. The platform card lists every team as a skill. External agents can drive a team without the cockpit, while the same run record and artifacts remain available locally.
331
+
332
+ ## Security and operations
333
+
334
+ - The server binds `127.0.0.1` by default. Exposing it with `--host` requires a trusted proxy and `MINIONS_API_TOKEN`.
335
+ - Loopback host allow-lists and same-origin checks protect state-changing HTTP requests.
336
+ - Provider keys are sealed with AES-256-GCM using a locally generated `.master-key`; the API never returns them.
337
+ - Tool visibility and permission are separate. Destructive tools are denied unless the definition opts in and the operator approves.
338
+ - A2A discovery is public; RPC and task reads are loopback-only unless `A2A_TOKEN` is configured.
339
+ - Run bundles, databases, workspaces and backups are sensitive. They are never uploaded by the platform.
340
+ - `reset --new-install --yes` deletes credentials, runs, chats, teams and memory; it keeps a timestamped database backup unless `--no-backup` is passed.
341
+
342
+ Full model and reporting process: [`SECURITY.md`](SECURITY.md).
343
+
344
+ ## Troubleshooting
345
+
346
+ | Symptom | Fix |
347
+ | --- | --- |
348
+ | Windows SmartScreen blocks the executable | **More info → Run anyway**, or verify the release SHA-256. The binary is unsigned. |
349
+ | macOS says the app is damaged or cannot be opened | `xattr -dr com.apple.quarantine ./minions-ai`, or right-click **Open**. |
350
+ | `ui` starts but no browser opens | Open the printed URL, or run `ui --no-open`/`serve` and navigate yourself. |
351
+ | `init` says the connection failed | Check that the endpoint is the OpenAI-compatible `/v1` root, the model name is exact, and the key is valid. `--skip-test` saves without probing. |
352
+ | Chat says no model provider is configured | Finish the wizard, or add a provider in **Settings → Providers**. |
353
+ | A team member fails immediately | The member's provider or model is missing; open the agent and check its Provider section. |
354
+ | A workflow ends with "no transition matched" | The node returned a status no edge routes; widen the edge conditions. |
355
+ | A port is already in use | Use `--port 3110` (or another free port). One process per SQLite file. |
356
+ | The first run is slow to start | The Copilot runtime is extracted once into the cache (about 100 MB). Later launches reuse it. |
357
+ | You need to start over | `minions-ai reset --new-install --yes` (backup retained by default). |
358
+
359
+ ## Upgrading and uninstalling
360
+
361
+ Replace the executable with the newer release; your data directory and cache remain. The cache is keyed by version, so old runtime files can be removed safely after an upgrade. To uninstall, delete the executable. To remove all state, delete the platform data directory and cache directory listed above.
362
+
363
+ ## Build from source
364
+
365
+ The binary is built from this repository with a reproducible pipeline that bundles the server and CLI, embeds the cockpit, Swagger UI, examples, SQLite prebuild and Copilot runtime, and packages everything into a single self-extracting executable. The app bundle is V8 bytecode; the native runtime and SQLite addon must be real files and are extracted on first use.
366
+
367
+ Source setup, per-platform build commands, signing notes, the release workflow and the honest limits of bytecode hardening are in [`docs/EXECUTABLE.md`](docs/EXECUTABLE.md). The end-user CLI and API references are [`docs/CLI.md`](docs/CLI.md) and [`docs/API.md`](docs/API.md).
368
+
369
+ ---
370
+
371
+ <p align="center">Developed by <a href="https://www.linkedin.com/in/connect-2-siddharth/">Siddharth Mishra</a></p>
package/SECURITY.md ADDED
@@ -0,0 +1,49 @@
1
+ # Security
2
+
3
+ ## Reporting a vulnerability
4
+
5
+ Open a private security advisory in the repository rather than a public issue. Include the
6
+ version, the command or endpoint involved and a minimal reproduction. Please do not attach
7
+ real provider keys, tokens or user data.
8
+
9
+ ## Binary downloads
10
+
11
+ Release executables are unsigned unless the release notes say otherwise. Windows SmartScreen and
12
+ macOS Gatekeeper may warn on first launch. Download only from the official
13
+ [releases page](https://github.com/siddharth-mishra-28/minions-ai/releases), compare the published
14
+ `SHA256SUMS`, and prefer a signed build when one is available. The executable extracts native
15
+ SQLite and Copilot runtime files into a versioned cache; the extraction verifies SHA-256 hashes
16
+ and rejects path traversal.
17
+
18
+ ## Supported versions
19
+
20
+ The latest 1.x release receives security fixes.
21
+
22
+ ## Security model
23
+
24
+ - **Local-first.** The server binds `127.0.0.1` by default. `--host` can expose it; only do
25
+ that behind a trusted reverse proxy or with `MINIONS_API_TOKEN` set.
26
+ - **Host and Origin checks.** A loopback host allow-list and same-origin checks protect
27
+ state-changing HTTP requests. A configured bearer token is required for every API call.
28
+ - **Provider credentials.** Keys are sealed with AES-256-GCM using a locally generated
29
+ `.master-key` (owner-readable) and are never returned by the API. The `init` command reads
30
+ keys from a hidden prompt, `--api-key-env` or `--api-key-stdin`, never from argv.
31
+ - **A2A.** Discovery cards are public; JSON-RPC and task reads are loopback-only unless
32
+ `A2A_TOKEN` is set, in which case a bearer token is required.
33
+ - **Agent tools.** Definitions carry an explicit builtin tool policy; destructive tools are
34
+ denied unless the definition opts in and the operator approves. Workspace writes stay under
35
+ the configured workspace.
36
+ - **Data.** SQLite databases, run artifacts, chat bodies and memory live in the platform data
37
+ directory (`%LOCALAPPDATA%\MinionsAI`, `~/Library/Application Support/MinionsAI`, or
38
+ `$XDG_DATA_HOME/minions-ai`) and the workspace. Packaged builds extract native runtime files
39
+ into a versioned cache. They are not uploaded anywhere by the platform. Run exports are written
40
+ where the operator asks.
41
+ - **Secrets in CI.** Use CI variables or a secret store; do not commit `.env`, `.master-key`
42
+ or exported run bundles.
43
+
44
+ ## First-run and reset
45
+
46
+ `minions-ai init` stores exactly what the operator enters. `reset --new-install --yes` deletes
47
+ provider rows, credentials, chats, runs, teams, memory and `.master-key`, keeping a timestamped
48
+ database backup under the platform data directory unless `--no-backup` is passed. Treat that
49
+ backup as sensitive.
@@ -0,0 +1,5 @@
1
+ import type { AgentSystemRow } from '../systems/types.js';
2
+ import { type A2AAgentCard } from './types.js';
3
+ export declare function platformCard(baseUrl: string, systems: AgentSystemRow[]): A2AAgentCard;
4
+ export declare function teamCard(baseUrl: string, system: AgentSystemRow): A2AAgentCard;
5
+ export declare function memberCard(baseUrl: string, system: AgentSystemRow, memberId: string): A2AAgentCard | undefined;
@@ -0,0 +1,131 @@
1
+ import { A2A_PROTOCOL_VERSION } from './types.js';
2
+ const cleanBase = (base) => base.replace(/\/+$/, '');
3
+ function security() {
4
+ if (!process.env.A2A_TOKEN?.trim())
5
+ return {};
6
+ return {
7
+ securitySchemes: { bearer: { type: 'http', scheme: 'bearer', bearerFormat: 'opaque' } },
8
+ security: [{ bearer: [] }],
9
+ };
10
+ }
11
+ function parse(json) {
12
+ try {
13
+ return JSON.parse(json);
14
+ }
15
+ catch {
16
+ return undefined;
17
+ }
18
+ }
19
+ function workflowSkills(system) {
20
+ const def = parse(system.definition_json);
21
+ return (def?.orchestration?.workflows ?? []).map((w) => ({
22
+ id: `${system.id}-${w.workflowId}`,
23
+ name: w.name,
24
+ description: `${w.mode} workflow "${w.workflowId}" with ${w.nodes.length} node(s) and ${w.edges.length} transition(s).`,
25
+ tags: ['team', 'workflow', w.mode],
26
+ examples: w.nodes.filter((n) => n.task).slice(0, 3).map((n) => String(n.task).slice(0, 180)),
27
+ }));
28
+ }
29
+ export function platformCard(baseUrl, systems) {
30
+ const base = cleanBase(baseUrl);
31
+ return {
32
+ name: 'Minions-ai',
33
+ description: 'Local agent-team orchestrator. Each published team is an A2A agent; members are exposed under the team.',
34
+ url: `${base}/a2a`,
35
+ version: '1.0.0',
36
+ protocolVersion: A2A_PROTOCOL_VERSION,
37
+ preferredTransport: 'JSONRPC',
38
+ capabilities: { streaming: true, pushNotifications: false, stateTransitionHistory: true },
39
+ defaultInputModes: ['text/plain'],
40
+ defaultOutputModes: ['text/plain'],
41
+ skills: systems.map((s) => ({
42
+ id: s.id,
43
+ name: s.name,
44
+ description: s.description ?? `Agent team ${s.id}`,
45
+ tags: ['team', ...(s.status === 'published' ? ['published'] : ['draft'])],
46
+ examples: [`Run ${s.name} on an objective`],
47
+ })),
48
+ supportedInterfaces: [{ url: `${base}/a2a`, protocolBinding: 'JSONRPC', protocolVersion: A2A_PROTOCOL_VERSION }],
49
+ ...security(),
50
+ metadata: { teams: systems.map((s) => ({ id: s.id, status: s.status, version: s.current_version })) },
51
+ };
52
+ }
53
+ export function teamCard(baseUrl, system) {
54
+ const base = cleanBase(baseUrl);
55
+ const def = parse(system.definition_json);
56
+ const members = def?.team.members ?? [];
57
+ const workflows = def?.orchestration.workflows ?? [];
58
+ const skills = workflowSkills(system);
59
+ if (members.length) {
60
+ skills.push({
61
+ id: `${system.id}-specialists`,
62
+ name: 'Specialist agents',
63
+ description: members.map((m) => `${m.role} (${m.memberId})`).join(', '),
64
+ tags: ['team', 'members'],
65
+ });
66
+ }
67
+ return {
68
+ name: system.name,
69
+ description: system.description ?? def?.metadata.description ?? `Agent team ${system.id}`,
70
+ url: `${base}/a2a/${encodeURIComponent(system.id)}`,
71
+ version: system.current_version ?? def?.metadata.version ?? 'draft',
72
+ protocolVersion: A2A_PROTOCOL_VERSION,
73
+ preferredTransport: 'JSONRPC',
74
+ capabilities: { streaming: true, pushNotifications: false, stateTransitionHistory: true },
75
+ defaultInputModes: ['text/plain'],
76
+ defaultOutputModes: ['text/plain'],
77
+ skills,
78
+ supportedInterfaces: [{ url: `${base}/a2a/${encodeURIComponent(system.id)}`, protocolBinding: 'JSONRPC', protocolVersion: A2A_PROTOCOL_VERSION }],
79
+ ...security(),
80
+ metadata: {
81
+ teamId: system.id,
82
+ status: system.status,
83
+ publishedVersion: system.current_version,
84
+ defaultWorkflowId: def?.orchestration.defaultWorkflowId,
85
+ workflows: workflows.map((w) => ({ id: w.workflowId, name: w.name, mode: w.mode })),
86
+ members: members.map((m) => ({
87
+ memberId: m.memberId, role: m.role, reportsTo: m.reportsTo ?? null,
88
+ capabilities: m.capabilities ?? {}, agentRef: m.agentRef,
89
+ cardUrl: `${base}/a2a/${encodeURIComponent(system.id)}/members/${encodeURIComponent(m.memberId)}/.well-known/agent-card.json`,
90
+ })),
91
+ },
92
+ };
93
+ }
94
+ export function memberCard(baseUrl, system, memberId) {
95
+ const base = cleanBase(baseUrl);
96
+ const def = parse(system.definition_json);
97
+ const member = def?.team.members.find((m) => m.memberId === memberId);
98
+ if (!member)
99
+ return undefined;
100
+ const reports = member.reportsTo
101
+ ? `Reports to ${member.reportsTo}.`
102
+ : 'Independent specialist in this team.';
103
+ return {
104
+ name: `${member.role} · ${system.name}`,
105
+ description: `${member.role} in team ${system.name}. ${reports}`,
106
+ url: `${base}/a2a/${encodeURIComponent(system.id)}/members/${encodeURIComponent(member.memberId)}`,
107
+ version: system.current_version ?? 'draft',
108
+ protocolVersion: A2A_PROTOCOL_VERSION,
109
+ preferredTransport: 'JSONRPC',
110
+ capabilities: { streaming: true, pushNotifications: false, stateTransitionHistory: true },
111
+ defaultInputModes: ['text/plain'],
112
+ defaultOutputModes: ['text/plain'],
113
+ skills: [{
114
+ id: `${system.id}-${member.memberId}`,
115
+ name: member.role,
116
+ description: member.instructions?.slice(0, 600) ?? `${member.role} for ${system.name}`,
117
+ tags: ['member', member.role.toLowerCase().replace(/[^a-z0-9]+/g, '-')],
118
+ examples: member.instructions ? [member.instructions.slice(0, 180)] : undefined,
119
+ }],
120
+ supportedInterfaces: [{
121
+ url: `${base}/a2a/${encodeURIComponent(system.id)}/members/${encodeURIComponent(member.memberId)}`,
122
+ protocolBinding: 'JSONRPC', protocolVersion: A2A_PROTOCOL_VERSION,
123
+ }],
124
+ ...security(),
125
+ metadata: {
126
+ teamId: system.id, memberId, role: member.role, reportsTo: member.reportsTo ?? null,
127
+ capabilities: member.capabilities ?? {}, agentRef: member.agentRef,
128
+ },
129
+ };
130
+ }
131
+ //# sourceMappingURL=cards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cards.js","sourceRoot":"","sources":["../../src/a2a/cards.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAoC,MAAM,YAAY,CAAC;AAEpF,MAAM,SAAS,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAErE,SAAS,QAAQ;IACf,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,EAAE;QAAE,OAAO,EAAE,CAAC;IAC9C,OAAO;QACL,eAAe,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE;QACvF,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;KAC3B,CAAC;AACJ,CAAC;AAED,SAAS,KAAK,CAAI,IAAY;IAC5B,IAAI,CAAC;QAAC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAM,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,SAAS,CAAC;IAAC,CAAC;AACnE,CAAC;AAED,SAAS,cAAc,CAAC,MAAsB;IAC5C,MAAM,GAAG,GAAG,KAAK,CAA2D,MAAM,CAAC,eAAe,CAAC,CAAC;IACpG,OAAO,CAAC,GAAG,EAAE,aAAa,EAAE,SAAS,IAA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E,CAAC,YAAY,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;gBAClG,eAAe,EAAE,SAAS,EAAE,eAAe,EAAE,oBAAoB;aAClE,CAAC;QACF,GAAG,QAAQ,EAAE;QACb,QAAQ,EAAE;YACR,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,IAAI;YACnF,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ;SACnE;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { ArtifactRow, TeamEvent, TeamMessage } from '../systems/types.js';
2
+ import type { TeamStore } from '../store/teams.js';
3
+ import type { A2AArtifact, A2AArtifactUpdateEvent, A2AMessage, A2APart, A2AStatusUpdateEvent, A2ATask, A2ATaskState } from './types.js';
4
+ export interface RunRow {
5
+ id: string;
6
+ status: string;
7
+ system_id: string;
8
+ system_name?: string | null;
9
+ system_version?: string | null;
10
+ workflow_id: string;
11
+ workflow_version?: string | null;
12
+ mode?: string | null;
13
+ task?: string | null;
14
+ workspace?: string | null;
15
+ started_at?: string | null;
16
+ finished_at?: string | null;
17
+ error?: string | null;
18
+ created_at?: string | null;
19
+ snapshot_json?: string | null;
20
+ }
21
+ export declare function partsToText(parts: A2APart[] | undefined): string;
22
+ export declare function textPart(text: string): A2APart;
23
+ export declare function textMessage(role: A2AMessage['role'], text: string, extra?: Partial<A2AMessage>): A2AMessage;
24
+ export declare function stateFor(status: string): A2ATaskState;
25
+ export declare function rowToMessage(row: TeamMessage & {
26
+ to_members?: string[];
27
+ }): A2AMessage;
28
+ export declare function artifactToA2A(row: ArtifactRow, includeContent?: boolean): A2AArtifact;
29
+ export declare function buildTask(store: TeamStore, run: RunRow, opts?: {
30
+ historyLimit?: number;
31
+ includeArtifactContent?: boolean;
32
+ }): A2ATask;
33
+ export declare function eventToA2AUpdate(store: TeamStore, runId: string, event: TeamEvent): A2AStatusUpdateEvent | A2AArtifactUpdateEvent | undefined;