squadfoundry 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. package/AGENTS.md +76 -0
  2. package/PROJECT.md +79 -0
  3. package/README.md +255 -0
  4. package/dist/orchestrator/adapters/context/IContextAdapter.d.ts +65 -0
  5. package/dist/orchestrator/adapters/context/IContextAdapter.d.ts.map +1 -0
  6. package/dist/orchestrator/adapters/context/IContextAdapter.js +12 -0
  7. package/dist/orchestrator/adapters/context/IContextAdapter.js.map +1 -0
  8. package/dist/orchestrator/adapters/context/filesystem.context-adapter.d.ts +33 -0
  9. package/dist/orchestrator/adapters/context/filesystem.context-adapter.d.ts.map +1 -0
  10. package/dist/orchestrator/adapters/context/filesystem.context-adapter.js +179 -0
  11. package/dist/orchestrator/adapters/context/filesystem.context-adapter.js.map +1 -0
  12. package/dist/orchestrator/adapters/deploy/IDeployAdapter.d.ts +78 -0
  13. package/dist/orchestrator/adapters/deploy/IDeployAdapter.d.ts.map +1 -0
  14. package/dist/orchestrator/adapters/deploy/IDeployAdapter.js +14 -0
  15. package/dist/orchestrator/adapters/deploy/IDeployAdapter.js.map +1 -0
  16. package/dist/orchestrator/adapters/deploy/vercel.adapter.d.ts +31 -0
  17. package/dist/orchestrator/adapters/deploy/vercel.adapter.d.ts.map +1 -0
  18. package/dist/orchestrator/adapters/deploy/vercel.adapter.js +83 -0
  19. package/dist/orchestrator/adapters/deploy/vercel.adapter.js.map +1 -0
  20. package/dist/orchestrator/adapters/host/IHostAdapter.d.ts +89 -0
  21. package/dist/orchestrator/adapters/host/IHostAdapter.d.ts.map +1 -0
  22. package/dist/orchestrator/adapters/host/IHostAdapter.js +10 -0
  23. package/dist/orchestrator/adapters/host/IHostAdapter.js.map +1 -0
  24. package/dist/orchestrator/adapters/host/anthropic.adapter.d.ts +27 -0
  25. package/dist/orchestrator/adapters/host/anthropic.adapter.d.ts.map +1 -0
  26. package/dist/orchestrator/adapters/host/anthropic.adapter.js +118 -0
  27. package/dist/orchestrator/adapters/host/anthropic.adapter.js.map +1 -0
  28. package/dist/orchestrator/adapters/host/antigravity.adapter.d.ts +53 -0
  29. package/dist/orchestrator/adapters/host/antigravity.adapter.d.ts.map +1 -0
  30. package/dist/orchestrator/adapters/host/antigravity.adapter.js +148 -0
  31. package/dist/orchestrator/adapters/host/antigravity.adapter.js.map +1 -0
  32. package/dist/orchestrator/adapters/host/claude-code.adapter.d.ts +13 -0
  33. package/dist/orchestrator/adapters/host/claude-code.adapter.d.ts.map +1 -0
  34. package/dist/orchestrator/adapters/host/claude-code.adapter.js +27 -0
  35. package/dist/orchestrator/adapters/host/claude-code.adapter.js.map +1 -0
  36. package/dist/orchestrator/adapters/host/command-model-invoker.d.ts +8 -0
  37. package/dist/orchestrator/adapters/host/command-model-invoker.d.ts.map +1 -0
  38. package/dist/orchestrator/adapters/host/command-model-invoker.js +46 -0
  39. package/dist/orchestrator/adapters/host/command-model-invoker.js.map +1 -0
  40. package/dist/orchestrator/adapters/host/ide.adapter.d.ts +61 -0
  41. package/dist/orchestrator/adapters/host/ide.adapter.d.ts.map +1 -0
  42. package/dist/orchestrator/adapters/host/ide.adapter.js +173 -0
  43. package/dist/orchestrator/adapters/host/ide.adapter.js.map +1 -0
  44. package/dist/orchestrator/adapters/host/local.adapter.d.ts +26 -0
  45. package/dist/orchestrator/adapters/host/local.adapter.d.ts.map +1 -0
  46. package/dist/orchestrator/adapters/host/local.adapter.js +82 -0
  47. package/dist/orchestrator/adapters/host/local.adapter.js.map +1 -0
  48. package/dist/orchestrator/adapters/host/openai.adapter.d.ts +26 -0
  49. package/dist/orchestrator/adapters/host/openai.adapter.d.ts.map +1 -0
  50. package/dist/orchestrator/adapters/host/openai.adapter.js +77 -0
  51. package/dist/orchestrator/adapters/host/openai.adapter.js.map +1 -0
  52. package/dist/orchestrator/adapters/host/opencode.adapter.d.ts +13 -0
  53. package/dist/orchestrator/adapters/host/opencode.adapter.d.ts.map +1 -0
  54. package/dist/orchestrator/adapters/host/opencode.adapter.js +27 -0
  55. package/dist/orchestrator/adapters/host/opencode.adapter.js.map +1 -0
  56. package/dist/orchestrator/adapters/model/IModelAdapter.d.ts +68 -0
  57. package/dist/orchestrator/adapters/model/IModelAdapter.d.ts.map +1 -0
  58. package/dist/orchestrator/adapters/model/IModelAdapter.js +11 -0
  59. package/dist/orchestrator/adapters/model/IModelAdapter.js.map +1 -0
  60. package/dist/orchestrator/adapters/publishing/ISocialMediaAdapter.d.ts +93 -0
  61. package/dist/orchestrator/adapters/publishing/ISocialMediaAdapter.d.ts.map +1 -0
  62. package/dist/orchestrator/adapters/publishing/ISocialMediaAdapter.js +10 -0
  63. package/dist/orchestrator/adapters/publishing/ISocialMediaAdapter.js.map +1 -0
  64. package/dist/orchestrator/adapters/publishing/instagram.adapter.d.ts +34 -0
  65. package/dist/orchestrator/adapters/publishing/instagram.adapter.d.ts.map +1 -0
  66. package/dist/orchestrator/adapters/publishing/instagram.adapter.js +105 -0
  67. package/dist/orchestrator/adapters/publishing/instagram.adapter.js.map +1 -0
  68. package/dist/orchestrator/adapters/tools/IToolAdapter.d.ts +52 -0
  69. package/dist/orchestrator/adapters/tools/IToolAdapter.d.ts.map +1 -0
  70. package/dist/orchestrator/adapters/tools/IToolAdapter.js +10 -0
  71. package/dist/orchestrator/adapters/tools/IToolAdapter.js.map +1 -0
  72. package/dist/orchestrator/adapters/vcs/IVCSAdapter.d.ts +89 -0
  73. package/dist/orchestrator/adapters/vcs/IVCSAdapter.d.ts.map +1 -0
  74. package/dist/orchestrator/adapters/vcs/IVCSAdapter.js +11 -0
  75. package/dist/orchestrator/adapters/vcs/IVCSAdapter.js.map +1 -0
  76. package/dist/orchestrator/adapters/vcs/github.adapter.d.ts +36 -0
  77. package/dist/orchestrator/adapters/vcs/github.adapter.d.ts.map +1 -0
  78. package/dist/orchestrator/adapters/vcs/github.adapter.js +110 -0
  79. package/dist/orchestrator/adapters/vcs/github.adapter.js.map +1 -0
  80. package/dist/orchestrator/artifacts/artifact-store.d.ts +47 -0
  81. package/dist/orchestrator/artifacts/artifact-store.d.ts.map +1 -0
  82. package/dist/orchestrator/artifacts/artifact-store.js +135 -0
  83. package/dist/orchestrator/artifacts/artifact-store.js.map +1 -0
  84. package/dist/orchestrator/builder/domain-classifier.d.ts +24 -0
  85. package/dist/orchestrator/builder/domain-classifier.d.ts.map +1 -0
  86. package/dist/orchestrator/builder/domain-classifier.js +156 -0
  87. package/dist/orchestrator/builder/domain-classifier.js.map +1 -0
  88. package/dist/orchestrator/builder/interview-questions.d.ts +13 -0
  89. package/dist/orchestrator/builder/interview-questions.d.ts.map +1 -0
  90. package/dist/orchestrator/builder/interview-questions.js +127 -0
  91. package/dist/orchestrator/builder/interview-questions.js.map +1 -0
  92. package/dist/orchestrator/builder/squad-builder.d.ts +53 -0
  93. package/dist/orchestrator/builder/squad-builder.d.ts.map +1 -0
  94. package/dist/orchestrator/builder/squad-builder.js +107 -0
  95. package/dist/orchestrator/builder/squad-builder.js.map +1 -0
  96. package/dist/orchestrator/builder/squad-generator.d.ts +33 -0
  97. package/dist/orchestrator/builder/squad-generator.d.ts.map +1 -0
  98. package/dist/orchestrator/builder/squad-generator.js +360 -0
  99. package/dist/orchestrator/builder/squad-generator.js.map +1 -0
  100. package/dist/orchestrator/cli/index.d.ts +3 -0
  101. package/dist/orchestrator/cli/index.d.ts.map +1 -0
  102. package/dist/orchestrator/cli/index.js +8 -0
  103. package/dist/orchestrator/cli/index.js.map +1 -0
  104. package/dist/orchestrator/context/context-index.d.ts +48 -0
  105. package/dist/orchestrator/context/context-index.d.ts.map +1 -0
  106. package/dist/orchestrator/context/context-index.js +116 -0
  107. package/dist/orchestrator/context/context-index.js.map +1 -0
  108. package/dist/orchestrator/context/context-loader.d.ts +49 -0
  109. package/dist/orchestrator/context/context-loader.d.ts.map +1 -0
  110. package/dist/orchestrator/context/context-loader.js +111 -0
  111. package/dist/orchestrator/context/context-loader.js.map +1 -0
  112. package/dist/orchestrator/core/guardrails.d.ts +33 -0
  113. package/dist/orchestrator/core/guardrails.d.ts.map +1 -0
  114. package/dist/orchestrator/core/guardrails.js +272 -0
  115. package/dist/orchestrator/core/guardrails.js.map +1 -0
  116. package/dist/orchestrator/core/state-machine.d.ts +65 -0
  117. package/dist/orchestrator/core/state-machine.d.ts.map +1 -0
  118. package/dist/orchestrator/core/state-machine.js +227 -0
  119. package/dist/orchestrator/core/state-machine.js.map +1 -0
  120. package/dist/orchestrator/core/types.d.ts +364 -0
  121. package/dist/orchestrator/core/types.d.ts.map +1 -0
  122. package/dist/orchestrator/core/types.js +10 -0
  123. package/dist/orchestrator/core/types.js.map +1 -0
  124. package/dist/orchestrator/index.d.ts +75 -0
  125. package/dist/orchestrator/index.d.ts.map +1 -0
  126. package/dist/orchestrator/index.js +64 -0
  127. package/dist/orchestrator/index.js.map +1 -0
  128. package/dist/orchestrator/mcp/server.d.ts +35 -0
  129. package/dist/orchestrator/mcp/server.d.ts.map +1 -0
  130. package/dist/orchestrator/mcp/server.js +378 -0
  131. package/dist/orchestrator/mcp/server.js.map +1 -0
  132. package/dist/orchestrator/runtime/agent-dispatcher.d.ts +25 -0
  133. package/dist/orchestrator/runtime/agent-dispatcher.d.ts.map +1 -0
  134. package/dist/orchestrator/runtime/agent-dispatcher.js +82 -0
  135. package/dist/orchestrator/runtime/agent-dispatcher.js.map +1 -0
  136. package/dist/orchestrator/runtime/approval-gate.d.ts +55 -0
  137. package/dist/orchestrator/runtime/approval-gate.d.ts.map +1 -0
  138. package/dist/orchestrator/runtime/approval-gate.js +104 -0
  139. package/dist/orchestrator/runtime/approval-gate.js.map +1 -0
  140. package/dist/orchestrator/runtime/handoff-manager.d.ts +29 -0
  141. package/dist/orchestrator/runtime/handoff-manager.d.ts.map +1 -0
  142. package/dist/orchestrator/runtime/handoff-manager.js +80 -0
  143. package/dist/orchestrator/runtime/handoff-manager.js.map +1 -0
  144. package/dist/orchestrator/runtime/job-manager.d.ts +39 -0
  145. package/dist/orchestrator/runtime/job-manager.d.ts.map +1 -0
  146. package/dist/orchestrator/runtime/job-manager.js +132 -0
  147. package/dist/orchestrator/runtime/job-manager.js.map +1 -0
  148. package/dist/orchestrator/runtime/squad-runtime.d.ts +70 -0
  149. package/dist/orchestrator/runtime/squad-runtime.d.ts.map +1 -0
  150. package/dist/orchestrator/runtime/squad-runtime.js +249 -0
  151. package/dist/orchestrator/runtime/squad-runtime.js.map +1 -0
  152. package/dist/orchestrator/shell/cli.d.ts +4 -0
  153. package/dist/orchestrator/shell/cli.d.ts.map +1 -0
  154. package/dist/orchestrator/shell/cli.js +27 -0
  155. package/dist/orchestrator/shell/cli.js.map +1 -0
  156. package/dist/orchestrator/shell/commands/create.command.d.ts +3 -0
  157. package/dist/orchestrator/shell/commands/create.command.d.ts.map +1 -0
  158. package/dist/orchestrator/shell/commands/create.command.js +41 -0
  159. package/dist/orchestrator/shell/commands/create.command.js.map +1 -0
  160. package/dist/orchestrator/shell/commands/edit.command.d.ts +3 -0
  161. package/dist/orchestrator/shell/commands/edit.command.d.ts.map +1 -0
  162. package/dist/orchestrator/shell/commands/edit.command.js +49 -0
  163. package/dist/orchestrator/shell/commands/edit.command.js.map +1 -0
  164. package/dist/orchestrator/shell/commands/hosts.command.d.ts +3 -0
  165. package/dist/orchestrator/shell/commands/hosts.command.d.ts.map +1 -0
  166. package/dist/orchestrator/shell/commands/hosts.command.js +27 -0
  167. package/dist/orchestrator/shell/commands/hosts.command.js.map +1 -0
  168. package/dist/orchestrator/shell/commands/init.command.d.ts +3 -0
  169. package/dist/orchestrator/shell/commands/init.command.d.ts.map +1 -0
  170. package/dist/orchestrator/shell/commands/init.command.js +13 -0
  171. package/dist/orchestrator/shell/commands/init.command.js.map +1 -0
  172. package/dist/orchestrator/shell/commands/list.command.d.ts +3 -0
  173. package/dist/orchestrator/shell/commands/list.command.d.ts.map +1 -0
  174. package/dist/orchestrator/shell/commands/list.command.js +18 -0
  175. package/dist/orchestrator/shell/commands/list.command.js.map +1 -0
  176. package/dist/orchestrator/shell/commands/run.command.d.ts +3 -0
  177. package/dist/orchestrator/shell/commands/run.command.d.ts.map +1 -0
  178. package/dist/orchestrator/shell/commands/run.command.js +71 -0
  179. package/dist/orchestrator/shell/commands/run.command.js.map +1 -0
  180. package/dist/orchestrator/shell/commands/status.command.d.ts +3 -0
  181. package/dist/orchestrator/shell/commands/status.command.d.ts.map +1 -0
  182. package/dist/orchestrator/shell/commands/status.command.js +29 -0
  183. package/dist/orchestrator/shell/commands/status.command.js.map +1 -0
  184. package/dist/orchestrator/shell/services/active-host-detector.service.d.ts +25 -0
  185. package/dist/orchestrator/shell/services/active-host-detector.service.d.ts.map +1 -0
  186. package/dist/orchestrator/shell/services/active-host-detector.service.js +128 -0
  187. package/dist/orchestrator/shell/services/active-host-detector.service.js.map +1 -0
  188. package/dist/orchestrator/shell/services/host-resolution.service.d.ts +42 -0
  189. package/dist/orchestrator/shell/services/host-resolution.service.d.ts.map +1 -0
  190. package/dist/orchestrator/shell/services/host-resolution.service.js +108 -0
  191. package/dist/orchestrator/shell/services/host-resolution.service.js.map +1 -0
  192. package/dist/orchestrator/shell/services/host-runtime.service.d.ts +23 -0
  193. package/dist/orchestrator/shell/services/host-runtime.service.d.ts.map +1 -0
  194. package/dist/orchestrator/shell/services/host-runtime.service.js +167 -0
  195. package/dist/orchestrator/shell/services/host-runtime.service.js.map +1 -0
  196. package/dist/orchestrator/shell/services/interview-host-bridge.service.d.ts +14 -0
  197. package/dist/orchestrator/shell/services/interview-host-bridge.service.d.ts.map +1 -0
  198. package/dist/orchestrator/shell/services/interview-host-bridge.service.js +16 -0
  199. package/dist/orchestrator/shell/services/interview-host-bridge.service.js.map +1 -0
  200. package/dist/orchestrator/shell/services/job-execution.service.d.ts +22 -0
  201. package/dist/orchestrator/shell/services/job-execution.service.d.ts.map +1 -0
  202. package/dist/orchestrator/shell/services/job-execution.service.js +39 -0
  203. package/dist/orchestrator/shell/services/job-execution.service.js.map +1 -0
  204. package/dist/orchestrator/shell/services/project-bootstrap.service.d.ts +6 -0
  205. package/dist/orchestrator/shell/services/project-bootstrap.service.d.ts.map +1 -0
  206. package/dist/orchestrator/shell/services/project-bootstrap.service.js +111 -0
  207. package/dist/orchestrator/shell/services/project-bootstrap.service.js.map +1 -0
  208. package/dist/orchestrator/shell/services/squad-scaffold.service.d.ts +3 -0
  209. package/dist/orchestrator/shell/services/squad-scaffold.service.d.ts.map +1 -0
  210. package/dist/orchestrator/shell/services/squad-scaffold.service.js +30 -0
  211. package/dist/orchestrator/shell/services/squad-scaffold.service.js.map +1 -0
  212. package/dist/tests/integration/instagram-squad.test.d.ts +8 -0
  213. package/dist/tests/integration/instagram-squad.test.d.ts.map +1 -0
  214. package/dist/tests/integration/instagram-squad.test.js +187 -0
  215. package/dist/tests/integration/instagram-squad.test.js.map +1 -0
  216. package/dist/tests/integration/shell/cli-run-host-native.test.d.ts +2 -0
  217. package/dist/tests/integration/shell/cli-run-host-native.test.d.ts.map +1 -0
  218. package/dist/tests/integration/shell/cli-run-host-native.test.js +42 -0
  219. package/dist/tests/integration/shell/cli-run-host-native.test.js.map +1 -0
  220. package/dist/tests/integration/software-squad.test.d.ts +8 -0
  221. package/dist/tests/integration/software-squad.test.d.ts.map +1 -0
  222. package/dist/tests/integration/software-squad.test.js +207 -0
  223. package/dist/tests/integration/software-squad.test.js.map +1 -0
  224. package/dist/tests/unit/artifact-store.test.d.ts +2 -0
  225. package/dist/tests/unit/artifact-store.test.d.ts.map +1 -0
  226. package/dist/tests/unit/artifact-store.test.js +137 -0
  227. package/dist/tests/unit/artifact-store.test.js.map +1 -0
  228. package/dist/tests/unit/context-loader.test.d.ts +2 -0
  229. package/dist/tests/unit/context-loader.test.d.ts.map +1 -0
  230. package/dist/tests/unit/context-loader.test.js +109 -0
  231. package/dist/tests/unit/context-loader.test.js.map +1 -0
  232. package/dist/tests/unit/docs/host-native-docs.test.d.ts +2 -0
  233. package/dist/tests/unit/docs/host-native-docs.test.d.ts.map +1 -0
  234. package/dist/tests/unit/docs/host-native-docs.test.js +18 -0
  235. package/dist/tests/unit/docs/host-native-docs.test.js.map +1 -0
  236. package/dist/tests/unit/guardrails.test.d.ts +2 -0
  237. package/dist/tests/unit/guardrails.test.d.ts.map +1 -0
  238. package/dist/tests/unit/guardrails.test.js +202 -0
  239. package/dist/tests/unit/guardrails.test.js.map +1 -0
  240. package/dist/tests/unit/host/host-adapter-contract.test.d.ts +2 -0
  241. package/dist/tests/unit/host/host-adapter-contract.test.d.ts.map +1 -0
  242. package/dist/tests/unit/host/host-adapter-contract.test.js +53 -0
  243. package/dist/tests/unit/host/host-adapter-contract.test.js.map +1 -0
  244. package/dist/tests/unit/host/ide.adapter.test.d.ts +2 -0
  245. package/dist/tests/unit/host/ide.adapter.test.d.ts.map +1 -0
  246. package/dist/tests/unit/host/ide.adapter.test.js +17 -0
  247. package/dist/tests/unit/host/ide.adapter.test.js.map +1 -0
  248. package/dist/tests/unit/host/native-ide-adapters.test.d.ts +2 -0
  249. package/dist/tests/unit/host/native-ide-adapters.test.d.ts.map +1 -0
  250. package/dist/tests/unit/host/native-ide-adapters.test.js +26 -0
  251. package/dist/tests/unit/host/native-ide-adapters.test.js.map +1 -0
  252. package/dist/tests/unit/runtime/squad-runtime-host-metadata.test.d.ts +2 -0
  253. package/dist/tests/unit/runtime/squad-runtime-host-metadata.test.d.ts.map +1 -0
  254. package/dist/tests/unit/runtime/squad-runtime-host-metadata.test.js +128 -0
  255. package/dist/tests/unit/runtime/squad-runtime-host-metadata.test.js.map +1 -0
  256. package/dist/tests/unit/shell/active-host-detector.test.d.ts +2 -0
  257. package/dist/tests/unit/shell/active-host-detector.test.d.ts.map +1 -0
  258. package/dist/tests/unit/shell/active-host-detector.test.js +85 -0
  259. package/dist/tests/unit/shell/active-host-detector.test.js.map +1 -0
  260. package/dist/tests/unit/shell/host-resolution.service.test.d.ts +2 -0
  261. package/dist/tests/unit/shell/host-resolution.service.test.d.ts.map +1 -0
  262. package/dist/tests/unit/shell/host-resolution.service.test.js +252 -0
  263. package/dist/tests/unit/shell/host-resolution.service.test.js.map +1 -0
  264. package/dist/tests/unit/shell/interview-host-bridge.test.d.ts +2 -0
  265. package/dist/tests/unit/shell/interview-host-bridge.test.d.ts.map +1 -0
  266. package/dist/tests/unit/shell/interview-host-bridge.test.js +58 -0
  267. package/dist/tests/unit/shell/interview-host-bridge.test.js.map +1 -0
  268. package/dist/tests/unit/shell/project-bootstrap.service.test.d.ts +2 -0
  269. package/dist/tests/unit/shell/project-bootstrap.service.test.d.ts.map +1 -0
  270. package/dist/tests/unit/shell/project-bootstrap.service.test.js +58 -0
  271. package/dist/tests/unit/shell/project-bootstrap.service.test.js.map +1 -0
  272. package/dist/tests/unit/shell/squad-scaffold.service.test.d.ts +2 -0
  273. package/dist/tests/unit/shell/squad-scaffold.service.test.d.ts.map +1 -0
  274. package/dist/tests/unit/shell/squad-scaffold.service.test.js +40 -0
  275. package/dist/tests/unit/shell/squad-scaffold.service.test.js.map +1 -0
  276. package/dist/tests/unit/squad-builder.test.d.ts +2 -0
  277. package/dist/tests/unit/squad-builder.test.d.ts.map +1 -0
  278. package/dist/tests/unit/squad-builder.test.js +126 -0
  279. package/dist/tests/unit/squad-builder.test.js.map +1 -0
  280. package/dist/tests/unit/state-machine.test.d.ts +2 -0
  281. package/dist/tests/unit/state-machine.test.d.ts.map +1 -0
  282. package/dist/tests/unit/state-machine.test.js +133 -0
  283. package/dist/tests/unit/state-machine.test.js.map +1 -0
  284. package/docs/architecture/overview.md +115 -0
  285. package/docs/development/adding-agents.md +75 -0
  286. package/docs/development/adding-hosts.md +104 -0
  287. package/docs/development/adding-integrations.md +83 -0
  288. package/docs/development/host-detection-and-resolution.md +59 -0
  289. package/docs/squads/how-to-create.md +85 -0
  290. package/docs/squads/how-to-execute.md +139 -0
  291. package/docs/superpowers/plans/2026-04-01-host-native-cli-shell-implementation.md +617 -0
  292. package/docs/superpowers/specs/2026-04-01-host-native-cli-shell-design.md +253 -0
  293. package/package.json +103 -0
  294. package/squads/examples/instagram-content/AGENTS.md +63 -0
  295. package/squads/examples/instagram-content/POLICIES.md +45 -0
  296. package/squads/examples/instagram-content/SQUAD.md +63 -0
  297. package/squads/examples/instagram-content/WORKFLOW.md +58 -0
  298. package/squads/examples/instagram-content/config/squad.json +474 -0
  299. package/squads/examples/software-development/AGENTS.md +88 -0
  300. package/squads/examples/software-development/POLICIES.md +44 -0
  301. package/squads/examples/software-development/SQUAD.md +65 -0
  302. package/squads/examples/software-development/WORKFLOW.md +78 -0
  303. package/squads/examples/software-development/config/squad.json +442 -0
  304. package/templates/AGENTS.md +46 -0
  305. package/templates/POLICIES.md +24 -0
  306. package/templates/PROJECT.md +52 -0
  307. package/templates/SQUAD.md +52 -0
  308. package/templates/TASKS.md +31 -0
  309. package/templates/WORKFLOW.md +35 -0
@@ -0,0 +1,179 @@
1
+ /**
2
+ * FilesystemContextAdapter — Real Implementation
3
+ *
4
+ * Discovers and loads context files from the local filesystem.
5
+ * This is the primary context adapter for local development.
6
+ *
7
+ * Priority order (highest to lowest):
8
+ * 1. PROJECT.md
9
+ * 2. TASKS.md
10
+ * 3. AGENTS.md
11
+ * 4. README.md
12
+ * 5. docs/**
13
+ * 6. specs/**
14
+ * 7. playbooks/**
15
+ * 8. policies/**
16
+ * 9. templates/**
17
+ * 10. workflows/**
18
+ * 11. brand/**
19
+ */
20
+ import { readFileSync, existsSync, statSync } from 'node:fs';
21
+ import { join } from 'node:path';
22
+ import { glob } from 'glob';
23
+ const CATEGORY_RULES = [
24
+ { category: 'project', priority: 100, patterns: [], exactNames: ['PROJECT.md'] },
25
+ { category: 'tasks', priority: 90, patterns: [], exactNames: ['TASKS.md'] },
26
+ { category: 'agents', priority: 85, patterns: [], exactNames: ['AGENTS.md'] },
27
+ { category: 'readme', priority: 80, patterns: [], exactNames: ['README.md'] },
28
+ { category: 'docs', priority: 70, patterns: ['docs/**/*.md', 'docs/**/*.txt'] },
29
+ { category: 'specs', priority: 65, patterns: ['specs/**/*.md', 'spec/**/*.md'] },
30
+ { category: 'playbooks', priority: 60, patterns: ['playbooks/**/*.md', 'playbook/**/*.md'] },
31
+ { category: 'policies', priority: 55, patterns: ['policies/**/*.md', 'policy/**/*.md'] },
32
+ { category: 'templates', priority: 50, patterns: ['templates/**/*.md'] },
33
+ { category: 'workflows', priority: 45, patterns: ['workflows/**/*.md', 'workflow/**/*.md'] },
34
+ { category: 'brand', priority: 40, patterns: ['brand/**/*.md', 'brand-guidelines/**/*.md'] },
35
+ ];
36
+ const RECOMMENDED_FILES = ['PROJECT.md', 'TASKS.md', 'README.md'];
37
+ const DEFAULT_MAX_SIZE = 512 * 1024; // 500 KB
38
+ // ─────────────────────────────────────────────────────────────────────────────
39
+ // Adapter Implementation
40
+ // ─────────────────────────────────────────────────────────────────────────────
41
+ export class FilesystemContextAdapter {
42
+ id = 'filesystem';
43
+ name = 'Filesystem Context Adapter';
44
+ async initialize() {
45
+ // No initialization needed for filesystem access
46
+ }
47
+ async discover(options) {
48
+ const { rootPath, excludePatterns = [], includeCategories } = options;
49
+ const foundFiles = [];
50
+ for (const rule of CATEGORY_RULES) {
51
+ if (includeCategories && !includeCategories.includes(rule.category))
52
+ continue;
53
+ // Check exact names first
54
+ if (rule.exactNames) {
55
+ for (const name of rule.exactNames) {
56
+ const abs = join(rootPath, name);
57
+ if (existsSync(abs)) {
58
+ const stat = statSync(abs);
59
+ foundFiles.push({
60
+ relativePath: name,
61
+ absolutePath: abs,
62
+ category: rule.category,
63
+ priority: rule.priority,
64
+ sizeBytes: stat.size,
65
+ });
66
+ }
67
+ }
68
+ }
69
+ // Glob patterns
70
+ for (const pattern of rule.patterns) {
71
+ try {
72
+ const matches = await glob(pattern, {
73
+ cwd: rootPath,
74
+ ignore: [...excludePatterns, 'node_modules/**', 'dist/**', '.git/**'],
75
+ nodir: true,
76
+ });
77
+ for (const rel of matches) {
78
+ const abs = join(rootPath, rel);
79
+ // Skip if already found by exact name
80
+ if (foundFiles.some((f) => f.absolutePath === abs))
81
+ continue;
82
+ const stat = statSync(abs);
83
+ foundFiles.push({
84
+ relativePath: rel,
85
+ absolutePath: abs,
86
+ category: rule.category,
87
+ priority: rule.priority,
88
+ sizeBytes: stat.size,
89
+ });
90
+ }
91
+ }
92
+ catch {
93
+ // Pattern failed — skip silently
94
+ }
95
+ }
96
+ }
97
+ // Sort by priority descending
98
+ foundFiles.sort((a, b) => b.priority - a.priority);
99
+ const missingRecommended = RECOMMENDED_FILES.filter((name) => !foundFiles.some((f) => f.relativePath === name));
100
+ return {
101
+ rootPath,
102
+ foundFiles,
103
+ missingRecommended,
104
+ loadedAt: new Date().toISOString(),
105
+ };
106
+ }
107
+ async load(options) {
108
+ const { maxFileSizeBytes = DEFAULT_MAX_SIZE } = options;
109
+ const discovery = await this.discover(options);
110
+ const loadFile = (rel) => {
111
+ const file = discovery.foundFiles.find((f) => f.relativePath === rel);
112
+ if (!file || file.sizeBytes > maxFileSizeBytes)
113
+ return undefined;
114
+ try {
115
+ return readFileSync(file.absolutePath, 'utf-8');
116
+ }
117
+ catch {
118
+ return undefined;
119
+ }
120
+ };
121
+ const loadCategory = (category) => {
122
+ return discovery.foundFiles
123
+ .filter((f) => f.category === category && f.sizeBytes <= maxFileSizeBytes)
124
+ .map((f) => {
125
+ try {
126
+ return {
127
+ path: f.relativePath,
128
+ content: readFileSync(f.absolutePath, 'utf-8'),
129
+ loadedAt: new Date().toISOString(),
130
+ };
131
+ }
132
+ catch {
133
+ return null;
134
+ }
135
+ })
136
+ .filter((x) => x !== null);
137
+ };
138
+ return {
139
+ projectMd: loadFile('PROJECT.md'),
140
+ tasksMd: loadFile('TASKS.md'),
141
+ agentsMd: loadFile('AGENTS.md'),
142
+ readmeMd: loadFile('README.md'),
143
+ docs: loadCategory('docs'),
144
+ specs: loadCategory('specs'),
145
+ playbooks: loadCategory('playbooks'),
146
+ policies: loadCategory('policies'),
147
+ templates: loadCategory('templates'),
148
+ custom: [...loadCategory('workflows'), ...loadCategory('brand')],
149
+ };
150
+ }
151
+ async loadFile(path) {
152
+ return readFileSync(path, 'utf-8');
153
+ }
154
+ async summarize(rootPath) {
155
+ const discovery = await this.discover({ rootPath });
156
+ const categoryCounts = {};
157
+ for (const file of discovery.foundFiles) {
158
+ categoryCounts[file.category] = (categoryCounts[file.category] ?? 0) + 1;
159
+ }
160
+ const totalBytes = discovery.foundFiles.reduce((sum, f) => sum + f.sizeBytes, 0);
161
+ return {
162
+ totalFiles: discovery.foundFiles.length,
163
+ totalBytes,
164
+ categoryCounts,
165
+ missingRecommended: discovery.missingRecommended,
166
+ hasProjectMd: discovery.foundFiles.some((f) => f.category === 'project'),
167
+ hasTasksMd: discovery.foundFiles.some((f) => f.category === 'tasks'),
168
+ hasAgentsMd: discovery.foundFiles.some((f) => f.category === 'agents'),
169
+ };
170
+ }
171
+ async listByCategory(rootPath, category) {
172
+ const discovery = await this.discover({ rootPath });
173
+ return discovery.foundFiles.filter((f) => f.category === category);
174
+ }
175
+ async healthCheck() {
176
+ return true;
177
+ }
178
+ }
179
+ //# sourceMappingURL=filesystem.context-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filesystem.context-adapter.js","sourceRoot":"","sources":["../../../../orchestrator/adapters/context/filesystem.context-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAsB3B,MAAM,cAAc,GAAmB;IACrC,EAAE,QAAQ,EAAE,SAAS,EAAI,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,YAAY,CAAC,EAAE;IAClF,EAAE,QAAQ,EAAE,OAAO,EAAM,QAAQ,EAAE,EAAE,EAAG,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,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;YAChD,YAAY,EAAE,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAC;YACxE,UAAU,EAAE,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC;YACpE,WAAW,EAAE,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC;SACvE,CAAA;IACH,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,QAAgB,EAAE,QAA6B;QAClE,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAA;QACnD,OAAO,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAA;IACpE,CAAC;IAED,KAAK,CAAC,WAAW;QACf,OAAO,IAAI,CAAA;IACb,CAAC;CACF"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * IDeployAdapter — Deployment Adapter Interface
3
+ *
4
+ * Abstracts deployment operations (Vercel, AWS, GCP, Railway, Fly.io, etc.).
5
+ *
6
+ * CRITICAL SAFETY NOTE:
7
+ * Deploy operations ALWAYS require explicit human confirmation.
8
+ * The guardrail `require_human_before_deploy` must be satisfied before
9
+ * any implementation of this interface invokes a real deployment.
10
+ *
11
+ * STATUS: Interface defined. Concrete adapters: vercel (stub)
12
+ */
13
+ export type DeployEnvironment = 'production' | 'staging' | 'preview' | 'development';
14
+ export interface DeployRequest {
15
+ /** The git branch or commit SHA to deploy */
16
+ ref: string;
17
+ /** Target environment */
18
+ environment: DeployEnvironment;
19
+ /** Optional environment variables to inject */
20
+ envVars?: Record<string, string>;
21
+ /** Human-provided reason/notes for this deployment */
22
+ notes?: string;
23
+ /** Job ID that triggered this deploy (for traceability) */
24
+ jobId?: string;
25
+ }
26
+ export interface DeployResult {
27
+ id: string;
28
+ url: string;
29
+ environment: DeployEnvironment;
30
+ ref: string;
31
+ status: 'pending' | 'building' | 'deploying' | 'ready' | 'failed' | 'cancelled';
32
+ startedAt: string;
33
+ completedAt?: string;
34
+ errorMessage?: string;
35
+ logUrl?: string;
36
+ }
37
+ export interface DeploymentInfo {
38
+ id: string;
39
+ url: string;
40
+ environment: DeployEnvironment;
41
+ ref: string;
42
+ status: DeployResult['status'];
43
+ createdAt: string;
44
+ }
45
+ export interface DeployCapabilities {
46
+ supportedEnvironments: DeployEnvironment[];
47
+ supportsRollback: boolean;
48
+ supportsPreviewURLs: boolean;
49
+ requiresApprovalForProduction: boolean;
50
+ }
51
+ /**
52
+ * Interface for deployment adapters.
53
+ * Implement this to add Vercel, AWS, Railway, Fly.io, etc. support.
54
+ *
55
+ * All deploy methods MUST be guarded by human approval at the runtime layer.
56
+ */
57
+ export interface IDeployAdapter {
58
+ readonly id: string;
59
+ readonly name: string;
60
+ initialize(): Promise<void>;
61
+ /**
62
+ * Trigger a deployment.
63
+ * SAFETY: Must only be called after human confirmation via ApprovalGate.
64
+ */
65
+ deploy(request: DeployRequest): Promise<DeployResult>;
66
+ /** Poll the status of a running deployment */
67
+ getDeployStatus(deployId: string): Promise<DeployResult>;
68
+ /** List recent deployments */
69
+ listDeployments(environment?: DeployEnvironment, limit?: number): Promise<DeploymentInfo[]>;
70
+ /**
71
+ * Roll back to a previous deployment.
72
+ * SAFETY: Must only be called after human confirmation.
73
+ */
74
+ rollback(deployId: string, environment: DeployEnvironment): Promise<DeployResult>;
75
+ getCapabilities(): DeployCapabilities;
76
+ healthCheck(): Promise<boolean>;
77
+ }
78
+ //# sourceMappingURL=IDeployAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IDeployAdapter.d.ts","sourceRoot":"","sources":["../../../../orchestrator/adapters/deploy/ID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GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IAErB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAE3B;;;OAGG;IACH,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAAA;IAErD,8CAA8C;IAC9C,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAA;IAExD,8BAA8B;IAC9B,eAAe,CAAC,WAAW,CAAC,EAAE,iBAAiB,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAA;IAE3F;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAA;IAEjF,eAAe,IAAI,kBAAkB,CAAA;IAErC,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAAA;CAChC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * IDeployAdapter — Deployment Adapter Interface
3
+ *
4
+ * Abstracts deployment operations (Vercel, AWS, GCP, Railway, Fly.io, etc.).
5
+ *
6
+ * CRITICAL SAFETY NOTE:
7
+ * Deploy operations ALWAYS require explicit human confirmation.
8
+ * The guardrail `require_human_before_deploy` must be satisfied before
9
+ * any implementation of this interface invokes a real deployment.
10
+ *
11
+ * STATUS: Interface defined. Concrete adapters: vercel (stub)
12
+ */
13
+ export {};
14
+ //# sourceMappingURL=IDeployAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IDeployAdapter.js","sourceRoot":"","sources":["../../../../orchestrator/adapters/deploy/IDeployAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * VercelDeployAdapter — Stub
3
+ *
4
+ * Adapter for deployments via the Vercel API.
5
+ *
6
+ * CRITICAL SAFETY NOTE:
7
+ * Deploy operations ALWAYS require explicit human confirmation.
8
+ * Never call deploy() or rollback() without ApprovalGate confirmation.
9
+ *
10
+ * STATUS: STUB — all methods log and return mock data.
11
+ * To activate: set VERCEL_TOKEN and VERCEL_PROJECT_ID.
12
+ */
13
+ import type { IDeployAdapter, DeployRequest, DeployResult, DeploymentInfo, DeployCapabilities, DeployEnvironment } from './IDeployAdapter.js';
14
+ export declare class VercelDeployAdapter implements IDeployAdapter {
15
+ readonly id = "vercel";
16
+ readonly name = "Vercel";
17
+ private token;
18
+ private projectId;
19
+ constructor(opts?: {
20
+ token?: string;
21
+ projectId?: string;
22
+ });
23
+ initialize(): Promise<void>;
24
+ deploy(request: DeployRequest): Promise<DeployResult>;
25
+ getDeployStatus(deployId: string): Promise<DeployResult>;
26
+ listDeployments(_environment?: DeployEnvironment, _limit?: number): Promise<DeploymentInfo[]>;
27
+ rollback(deployId: string, environment: DeployEnvironment): Promise<DeployResult>;
28
+ getCapabilities(): DeployCapabilities;
29
+ healthCheck(): Promise<boolean>;
30
+ }
31
+ //# sourceMappingURL=vercel.adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vercel.adapter.d.ts","sourceRoot":"","sources":["../../../../orchestrator/adapters/deploy/vercel.adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE7I,qBAAa,mBAAoB,YAAW,cAAc;IACxD,QAAQ,CAAC,EAAE,YAAW;IACtB,QAAQ,CAAC,IAAI,YAAW;IAExB,OAAO,CAAC,KAAK,CAAoB;IACjC,OAAO,CAAC,SAAS,CAAoB;gBAEzB,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;IAKnD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAM3B,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IAerD,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAaxD,eAAe,CAAC,YAAY,CAAC,EAAE,iBAAiB,EAAE,MAAM,SAAK,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAIzF,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC;IAcvF,eAAe,IAAI,kBAAkB;IAS/B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;CAItC"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * VercelDeployAdapter — Stub
3
+ *
4
+ * Adapter for deployments via the Vercel API.
5
+ *
6
+ * CRITICAL SAFETY NOTE:
7
+ * Deploy operations ALWAYS require explicit human confirmation.
8
+ * Never call deploy() or rollback() without ApprovalGate confirmation.
9
+ *
10
+ * STATUS: STUB — all methods log and return mock data.
11
+ * To activate: set VERCEL_TOKEN and VERCEL_PROJECT_ID.
12
+ */
13
+ export class VercelDeployAdapter {
14
+ id = 'vercel';
15
+ name = 'Vercel';
16
+ token;
17
+ projectId;
18
+ constructor(opts) {
19
+ this.token = opts?.token ?? process.env['VERCEL_TOKEN'];
20
+ this.projectId = opts?.projectId ?? process.env['VERCEL_PROJECT_ID'];
21
+ }
22
+ async initialize() {
23
+ if (!this.token || !this.projectId) {
24
+ console.warn('[VercelDeployAdapter] VERCEL_TOKEN or VERCEL_PROJECT_ID not set — running in stub mode');
25
+ }
26
+ }
27
+ async deploy(request) {
28
+ // SAFETY: Must only be called after human approval via ApprovalGate.
29
+ // STUB: POST /v13/deployments
30
+ console.log(`[VercelDeployAdapter][STUB] deploy ref=${request.ref} env=${request.environment}`);
31
+ console.warn('[VercelDeployAdapter][STUB] Real deployment NOT executed — stub mode active');
32
+ return {
33
+ id: `stub-deploy-${Date.now()}`,
34
+ url: `https://stub-deploy.vercel.app`,
35
+ environment: request.environment,
36
+ ref: request.ref,
37
+ status: 'pending',
38
+ startedAt: new Date().toISOString(),
39
+ };
40
+ }
41
+ async getDeployStatus(deployId) {
42
+ // STUB: GET /v13/deployments/{id}
43
+ return {
44
+ id: deployId,
45
+ url: 'https://stub-deploy.vercel.app',
46
+ environment: 'staging',
47
+ ref: 'main',
48
+ status: 'ready',
49
+ startedAt: new Date().toISOString(),
50
+ completedAt: new Date().toISOString(),
51
+ };
52
+ }
53
+ async listDeployments(_environment, _limit = 10) {
54
+ return [];
55
+ }
56
+ async rollback(deployId, environment) {
57
+ // SAFETY: Must only be called after human approval via ApprovalGate.
58
+ console.log(`[VercelDeployAdapter][STUB] rollback deployId=${deployId} env=${environment}`);
59
+ console.warn('[VercelDeployAdapter][STUB] Real rollback NOT executed — stub mode active');
60
+ return {
61
+ id: `stub-rollback-${Date.now()}`,
62
+ url: 'https://stub-rollback.vercel.app',
63
+ environment,
64
+ ref: deployId,
65
+ status: 'pending',
66
+ startedAt: new Date().toISOString(),
67
+ };
68
+ }
69
+ getCapabilities() {
70
+ return {
71
+ supportedEnvironments: ['production', 'staging', 'preview'],
72
+ supportsRollback: true,
73
+ supportsPreviewURLs: true,
74
+ requiresApprovalForProduction: true,
75
+ };
76
+ }
77
+ async healthCheck() {
78
+ if (!this.token)
79
+ return false;
80
+ return true;
81
+ }
82
+ }
83
+ //# sourceMappingURL=vercel.adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vercel.adapter.js","sourceRoot":"","sources":["../../../../orchestrator/adapters/deploy/vercel.adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,MAAM,OAAO,mBAAmB;IACrB,EAAE,GAAG,QAAQ,CAAA;IACb,IAAI,GAAG,QAAQ,CAAA;IAEhB,KAAK,CAAoB;IACzB,SAAS,CAAoB;IAErC,YA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MAAM,GAAG,EAAE;QACjE,OAAO,EAAE,CAAA;IACX,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,QAAgB,EAAE,WAA8B;QAC7D,qEAAqE;QACrE,OAAO,CAAC,GAAG,CAAC,iDAAiD,QAAQ,QAAQ,WAAW,EAAE,CAAC,CAAA;QAC3F,OAAO,CAAC,IAAI,CAAC,2EAA2E,CAAC,CAAA;QACzF,OAAO;YACL,EAAE,EAAE,iBAAiB,IAAI,CAAC,GAAG,EAAE,EAAE;YACjC,GAAG,EAAE,kCAAkC;YACvC,WAAW;YACX,GAAG,EAAE,QAAQ;YACb,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACpC,CAAA;IACH,CAAC;IAED,eAAe;QACb,OAAO;YACL,qBAAqB,EAAE,CAAC,YAAY,EAAE,SAAS,EAAE,SAAS,CAAC;YAC3D,gBAAgB,EAAE,IAAI;YACtB,mBAAmB,EAAE,IAAI;YACzB,6BAA6B,EAAE,IAAI;SACpC,CAAA;IACH,CAAC;IAED,KAAK,CAAC,WAAW;QACf,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAA;QAC7B,OAAO,IAAI,CAAA;IACb,CAAC;CACF"}
@@ -0,0 +1,89 @@
1
+ /**
2
+ * IHostAdapter — Host Runtime Adapter Interface
3
+ *
4
+ * Abstracts the execution environment (Claude Code, OpenCode, Cursor, Codex, etc.).
5
+ * The core orchestrator never imports a concrete host implementation directly.
6
+ *
7
+ * STATUS: Interface defined. Concrete adapters: anthropic (stub), openai (stub), local (stub)
8
+ */
9
+ import type { AgentDefinition, AgentResponse, JobDefinition, WorkflowStep } from '../../core/types.js';
10
+ export interface PromptOptions {
11
+ systemPrompt?: string;
12
+ temperature?: number;
13
+ maxTokens?: number;
14
+ model?: string;
15
+ stream?: boolean;
16
+ metadata?: Record<string, unknown>;
17
+ }
18
+ export interface HostCapabilities {
19
+ supportsStreaming: boolean;
20
+ supportsToolUse: boolean;
21
+ supportsVision: boolean;
22
+ maxContextTokens: number;
23
+ supportedModels: string[];
24
+ }
25
+ export interface HostDetectionContext {
26
+ cwd: string;
27
+ argv?: string[];
28
+ env?: Record<string, string | undefined>;
29
+ }
30
+ export interface HostDetectionResult {
31
+ isDetected: boolean;
32
+ confidence: 'high' | 'medium' | 'low';
33
+ reasons: string[];
34
+ }
35
+ export interface InterviewTurnInput {
36
+ prompt: string;
37
+ metadata?: Record<string, unknown>;
38
+ }
39
+ export interface InterviewTurnState {
40
+ turnCount: number;
41
+ history: string[];
42
+ metadata?: Record<string, unknown>;
43
+ }
44
+ export interface InterviewTurnResult {
45
+ content: string;
46
+ status: 'continue' | 'complete';
47
+ metadata?: Record<string, unknown>;
48
+ }
49
+ /**
50
+ * The primary interface every host adapter must implement.
51
+ *
52
+ * A "host" is the execution environment that actually runs the LLM.
53
+ * It could be an IDE extension, a direct API call, a local LLM, etc.
54
+ */
55
+ export interface IHostAdapter {
56
+ /** Unique identifier for this host adapter */
57
+ readonly id: string;
58
+ /** Human-readable name */
59
+ readonly name: string;
60
+ /** Detect whether current execution context belongs to this host. */
61
+ detect(context: HostDetectionContext): HostDetectionResult;
62
+ /**
63
+ * Initialize the adapter (load credentials, check connection, etc.)
64
+ * Called once before any prompts are sent.
65
+ */
66
+ initialize(): Promise<void>;
67
+ /** Execute one interview turn for builder/edit conversational flow. */
68
+ runInterviewTurn(input: InterviewTurnInput, state: InterviewTurnState): Promise<InterviewTurnResult>;
69
+ /** Return active model if host can expose it; null otherwise. */
70
+ getActiveModel(): Promise<string | null>;
71
+ /**
72
+ * Send a complete prompt to the host and await a full response.
73
+ */
74
+ sendPrompt(prompt: string, agent: AgentDefinition, job: JobDefinition, step: WorkflowStep, options?: PromptOptions): Promise<AgentResponse>;
75
+ /**
76
+ * Stream a prompt response (yields chunks as they arrive).
77
+ * Not all hosts support streaming — check capabilities first.
78
+ */
79
+ streamPrompt?(prompt: string, agent: AgentDefinition, job: JobDefinition, step: WorkflowStep, options?: PromptOptions): AsyncGenerator<string>;
80
+ /**
81
+ * Report the capabilities of this host.
82
+ */
83
+ getCapabilities(): HostCapabilities;
84
+ /**
85
+ * Check whether the host is available and configured.
86
+ */
87
+ healthCheck(): Promise<boolean>;
88
+ }
89
+ //# sourceMappingURL=IHostAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IHostAdapter.d.ts","sourceRoot":"","sources":["../../../../orchestrator/adapters/host/IHostAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEtG,MAAM,WAAW,aAAa;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACnC;AAED,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB,EAAE,OAAO,CAAA;IAC1B,eAAe,EAAE,OAAO,CAAA;IACxB,cAAc,EAAE,OAAO,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;IACxB,eAAe,EAAE,MAAM,EAAE,CAAA;CAC1B;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;CACzC;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAA;IACrC,OAAO,EAAE,MAAM,EAAE,C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,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,YAAY,EAClB,OAAO,CAAC,EAAE,aAAa,GACtB,cAAc,CAAC,MAAM,CAAC,CAAA;IAEzB;;OAEG;IACH,eAAe,IAAI,gBAAgB,CAAA;IAEnC;;OAEG;IACH,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAAA;CAChC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * IHostAdapter — Host Runtime Adapter Interface
3
+ *
4
+ * Abstracts the execution environment (Claude Code, OpenCode, Cursor, Codex, etc.).
5
+ * The core orchestrator never imports a concrete host implementation directly.
6
+ *
7
+ * STATUS: Interface defined. Concrete adapters: anthropic (stub), openai (stub), local (stub)
8
+ */
9
+ export {};
10
+ //# sourceMappingURL=IHostAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IHostAdapter.js","sourceRoot":"","sources":["../../../../orchestrator/adapters/host/IHostAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * AnthropicHostAdapter
3
+ *
4
+ * Adapter for running agents via the Anthropic Messages API.
5
+ * Supports Claude models (claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5).
6
+ *
7
+ * Requires: ANTHROPIC_API_KEY env var (or pass apiKey to constructor).
8
+ *
9
+ * STATUS: REAL — full implementation using @anthropic-ai/sdk.
10
+ */
11
+ import type { IHostAdapter, PromptOptions, HostCapabilities, HostDetectionContext, HostDetectionResult, InterviewTurnInput, InterviewTurnState, InterviewTurnResult } from './IHostAdapter.js';
12
+ import type { AgentDefinition, AgentResponse, JobDefinition, WorkflowStep } from '../../core/types.js';
13
+ export declare class AnthropicHostAdapter implements IHostAdapter {
14
+ readonly id = "anthropic";
15
+ readonly name = "Anthropic Claude (API)";
16
+ private client;
17
+ private defaultModel;
18
+ constructor(apiKey?: string, model?: string);
19
+ detect(context: HostDetectionContext): HostDetectionResult;
20
+ initialize(): Promise<void>;
21
+ runInterviewTurn(input: InterviewTurnInput, _state: InterviewTurnState): Promise<InterviewTurnResult>;
22
+ getActiveModel(): Promise<string | null>;
23
+ sendPrompt(prompt: string, agent: AgentDefinition, job: JobDefinition, step: WorkflowStep, options?: PromptOptions): Promise<AgentResponse>;
24
+ getCapabilities(): HostCapabilities;
25
+ healthCheck(): Promise<boolean>;
26
+ }
27
+ //# sourceMappingURL=anthropic.adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anthropic.adapter.d.ts","sourceRoot":"","sources":["../../../../orchestrator/adapters/host/anthropic.adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAmB,MAAM,qBAAqB,CAAA;AAiBvH,qBAAa,oBAAqB,YAAW,YAAY;IACvD,QAAQ,CAAC,EAAE,eAAc;IACzB,QAAQ,CAAC,IAAI,4BAA2B;IAExC,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,YAAY,CAAQ;gBAEhB,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;IAK3C,MAAM,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB;IAUpD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ3B,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAQrG,cAAc,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAIxC,UAAU,CACd,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,eAAe,EACtB,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,YAAY,EAClB,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,aAAa,CAAC;IAuCzB,eAAe,IAAI,gBAAgB;IAc7B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;CAQtC"}