@elie-laloum/outpost 2.0.0 → 4.0.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 (588) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +3 -1
  3. package/SECURITY.md +3 -1
  4. package/dist/adapters/agents/claude-diagnostics.d.ts +1 -0
  5. package/dist/adapters/agents/claude-diagnostics.js +7 -0
  6. package/dist/adapters/agents/claude-diagnostics.js.map +1 -0
  7. package/dist/adapters/agents/cli-diagnostics.constants.d.ts +12 -0
  8. package/dist/adapters/agents/cli-diagnostics.constants.js +24 -0
  9. package/dist/adapters/agents/cli-diagnostics.constants.js.map +1 -0
  10. package/dist/adapters/agents/cli-diagnostics.d.ts +4 -0
  11. package/dist/adapters/agents/cli-diagnostics.js +14 -0
  12. package/dist/adapters/agents/cli-diagnostics.js.map +1 -0
  13. package/dist/adapters/agents/cli-diagnostics.types.d.ts +13 -0
  14. package/dist/adapters/agents/cli-diagnostics.types.js +2 -0
  15. package/dist/adapters/agents/cli-diagnostics.types.js.map +1 -0
  16. package/dist/adapters/agents/codex-diagnostics.d.ts +1 -0
  17. package/dist/adapters/agents/codex-diagnostics.js +7 -0
  18. package/dist/adapters/agents/codex-diagnostics.js.map +1 -0
  19. package/dist/adapters/agents/gemini-adapter.d.ts +3 -0
  20. package/dist/adapters/agents/gemini-adapter.js +15 -0
  21. package/dist/adapters/agents/gemini-adapter.js.map +1 -0
  22. package/dist/adapters/agents/gemini-diagnostics.d.ts +2 -0
  23. package/dist/adapters/agents/gemini-diagnostics.js +15 -0
  24. package/dist/adapters/agents/gemini-diagnostics.js.map +1 -0
  25. package/dist/adapters/agents/gemini-events.d.ts +2 -0
  26. package/dist/adapters/agents/gemini-events.js +50 -0
  27. package/dist/adapters/agents/gemini-events.js.map +1 -0
  28. package/dist/adapters/agents/gemini-request.d.ts +4 -0
  29. package/dist/adapters/agents/gemini-request.js +21 -0
  30. package/dist/adapters/agents/gemini-request.js.map +1 -0
  31. package/dist/adapters/agents/gemini.types.d.ts +6 -0
  32. package/dist/adapters/agents/gemini.types.js +2 -0
  33. package/dist/adapters/agents/gemini.types.js.map +1 -0
  34. package/dist/adapters/agents/protocol-fixtures.constants.d.ts +2 -0
  35. package/dist/adapters/agents/protocol-fixtures.constants.js +105 -0
  36. package/dist/adapters/agents/protocol-fixtures.constants.js.map +1 -0
  37. package/dist/adapters/agents/protocol-fixtures.types.d.ts +6 -0
  38. package/dist/adapters/agents/protocol-fixtures.types.js +2 -0
  39. package/dist/adapters/agents/protocol-fixtures.types.js.map +1 -0
  40. package/dist/application/agent-bootstrap.constants.d.ts +1 -0
  41. package/dist/application/agent-bootstrap.constants.js +1 -0
  42. package/dist/application/agent-bootstrap.constants.js.map +1 -1
  43. package/dist/application/agent-bootstrap.js +6 -2
  44. package/dist/application/agent-bootstrap.js.map +1 -1
  45. package/dist/application/agent-output.js +9 -2
  46. package/dist/application/agent-output.js.map +1 -1
  47. package/dist/application/artifact-tasks.d.ts +5 -0
  48. package/dist/application/artifact-tasks.js +31 -0
  49. package/dist/application/artifact-tasks.js.map +1 -0
  50. package/dist/application/artifact-tasks.types.d.ts +8 -0
  51. package/dist/application/artifact-tasks.types.js +2 -0
  52. package/dist/application/artifact-tasks.types.js.map +1 -0
  53. package/dist/application/diagnostic-probe.d.ts +3 -0
  54. package/dist/application/diagnostic-probe.js +55 -0
  55. package/dist/application/diagnostic-probe.js.map +1 -0
  56. package/dist/application/dispatch-validation.js +2 -0
  57. package/dist/application/dispatch-validation.js.map +1 -1
  58. package/dist/application/doctor-agent.constants.d.ts +11 -0
  59. package/dist/application/doctor-agent.constants.js +10 -0
  60. package/dist/application/doctor-agent.constants.js.map +1 -0
  61. package/dist/application/doctor-agent.d.ts +3 -0
  62. package/dist/application/doctor-agent.js +53 -0
  63. package/dist/application/doctor-agent.js.map +1 -0
  64. package/dist/application/doctor-image.d.ts +3 -0
  65. package/dist/application/doctor-image.js +133 -0
  66. package/dist/application/doctor-image.js.map +1 -0
  67. package/dist/application/doctor-protocol.d.ts +3 -0
  68. package/dist/application/doctor-protocol.js +30 -0
  69. package/dist/application/doctor-protocol.js.map +1 -0
  70. package/dist/application/doctor-protocol.types.d.ts +10 -0
  71. package/dist/application/doctor-protocol.types.js +2 -0
  72. package/dist/application/doctor-protocol.types.js.map +1 -0
  73. package/dist/application/doctor-sandbox.constants.d.ts +5 -0
  74. package/dist/application/doctor-sandbox.constants.js +6 -0
  75. package/dist/application/doctor-sandbox.constants.js.map +1 -0
  76. package/dist/application/doctor-sandbox.d.ts +4 -0
  77. package/dist/application/doctor-sandbox.js +133 -0
  78. package/dist/application/doctor-sandbox.js.map +1 -0
  79. package/dist/application/doctor-sandbox.types.d.ts +23 -0
  80. package/dist/application/doctor-sandbox.types.js +2 -0
  81. package/dist/application/doctor-sandbox.types.js.map +1 -0
  82. package/dist/application/doctor-transfers.constants.d.ts +6 -0
  83. package/dist/application/doctor-transfers.constants.js +7 -0
  84. package/dist/application/doctor-transfers.constants.js.map +1 -0
  85. package/dist/application/doctor-transfers.d.ts +4 -0
  86. package/dist/application/doctor-transfers.js +88 -0
  87. package/dist/application/doctor-transfers.js.map +1 -0
  88. package/dist/application/doctor.constants.d.ts +9 -0
  89. package/dist/application/doctor.constants.js +15 -0
  90. package/dist/application/doctor.constants.js.map +1 -0
  91. package/dist/application/doctor.d.ts +3 -0
  92. package/dist/application/doctor.js +106 -0
  93. package/dist/application/doctor.js.map +1 -0
  94. package/dist/application/doctor.types.d.ts +39 -0
  95. package/dist/application/doctor.types.js +2 -0
  96. package/dist/application/doctor.types.js.map +1 -0
  97. package/dist/application/execution.js +1 -0
  98. package/dist/application/execution.js.map +1 -1
  99. package/dist/application/outpost.types.d.ts +4 -0
  100. package/dist/application/outpost.types.js.map +1 -1
  101. package/dist/application/queue-worker.d.ts +2 -0
  102. package/dist/application/queue-worker.js +75 -0
  103. package/dist/application/queue-worker.js.map +1 -0
  104. package/dist/application/queue-worker.types.d.ts +15 -0
  105. package/dist/application/queue-worker.types.js +2 -0
  106. package/dist/application/queue-worker.types.js.map +1 -0
  107. package/dist/application/queued-task.d.ts +3 -0
  108. package/dist/application/queued-task.js +56 -0
  109. package/dist/application/queued-task.js.map +1 -0
  110. package/dist/application/queued-task.types.d.ts +11 -0
  111. package/dist/application/queued-task.types.js +2 -0
  112. package/dist/application/queued-task.types.js.map +1 -0
  113. package/dist/application/recovery-checksum-capture.d.ts +2 -0
  114. package/dist/application/recovery-checksum-capture.js +32 -0
  115. package/dist/application/recovery-checksum-capture.js.map +1 -0
  116. package/dist/application/recovery-checksum-paths.d.ts +2 -0
  117. package/dist/application/recovery-checksum-paths.js +11 -0
  118. package/dist/application/recovery-checksum-paths.js.map +1 -0
  119. package/dist/application/recovery-checksums.constants.d.ts +5 -0
  120. package/dist/application/recovery-checksums.constants.js +6 -0
  121. package/dist/application/recovery-checksums.constants.js.map +1 -0
  122. package/dist/application/recovery-checksums.d.ts +3 -0
  123. package/dist/application/recovery-checksums.js +94 -0
  124. package/dist/application/recovery-checksums.js.map +1 -0
  125. package/dist/application/recovery-checksums.types.d.ts +17 -0
  126. package/dist/application/recovery-checksums.types.js +2 -0
  127. package/dist/application/recovery-checksums.types.js.map +1 -0
  128. package/dist/application/recovery-inspection.d.ts +2 -0
  129. package/dist/application/recovery-inspection.js +32 -0
  130. package/dist/application/recovery-inspection.js.map +1 -0
  131. package/dist/application/recovery-inspection.types.d.ts +18 -0
  132. package/dist/application/recovery-inspection.types.js +2 -0
  133. package/dist/application/recovery-inspection.types.js.map +1 -0
  134. package/dist/application/recovery-restorability.d.ts +2 -0
  135. package/dist/application/recovery-restorability.js +137 -0
  136. package/dist/application/recovery-restorability.js.map +1 -0
  137. package/dist/application/recovery-restore-snapshot.d.ts +2 -0
  138. package/dist/application/recovery-restore-snapshot.js +57 -0
  139. package/dist/application/recovery-restore-snapshot.js.map +1 -0
  140. package/dist/application/recovery-restore.d.ts +3 -0
  141. package/dist/application/recovery-restore.js +161 -0
  142. package/dist/application/recovery-restore.js.map +1 -0
  143. package/dist/application/recovery-restore.types.d.ts +28 -0
  144. package/dist/application/recovery-restore.types.js +2 -0
  145. package/dist/application/recovery-restore.types.js.map +1 -0
  146. package/dist/application/recovery-retention-policy.d.ts +2 -0
  147. package/dist/application/recovery-retention-policy.js +21 -0
  148. package/dist/application/recovery-retention-policy.js.map +1 -0
  149. package/dist/application/recovery-retention.constants.d.ts +3 -0
  150. package/dist/application/recovery-retention.constants.js +2 -0
  151. package/dist/application/recovery-retention.constants.js.map +1 -0
  152. package/dist/application/recovery-retention.d.ts +4 -0
  153. package/dist/application/recovery-retention.js +207 -0
  154. package/dist/application/recovery-retention.js.map +1 -0
  155. package/dist/application/recovery-retention.types.d.ts +52 -0
  156. package/dist/application/recovery-retention.types.js +2 -0
  157. package/dist/application/recovery-retention.types.js.map +1 -0
  158. package/dist/application/recovery-verification.constants.d.ts +5 -0
  159. package/dist/application/recovery-verification.constants.js +10 -0
  160. package/dist/application/recovery-verification.constants.js.map +1 -0
  161. package/dist/application/recovery-verification.d.ts +3 -0
  162. package/dist/application/recovery-verification.js +107 -0
  163. package/dist/application/recovery-verification.js.map +1 -0
  164. package/dist/application/recovery-verification.types.d.ts +26 -0
  165. package/dist/application/recovery-verification.types.js +2 -0
  166. package/dist/application/recovery-verification.types.js.map +1 -0
  167. package/dist/application/remote-apply.js +30 -6
  168. package/dist/application/remote-apply.js.map +1 -1
  169. package/dist/application/remote-backup.js +6 -2
  170. package/dist/application/remote-backup.js.map +1 -1
  171. package/dist/application/remote-download.js +38 -6
  172. package/dist/application/remote-download.js.map +1 -1
  173. package/dist/application/remote-history.d.ts +6 -0
  174. package/dist/application/remote-history.js +114 -0
  175. package/dist/application/remote-history.js.map +1 -0
  176. package/dist/application/remote-upload.d.ts +2 -0
  177. package/dist/application/remote-upload.js +17 -0
  178. package/dist/application/remote-upload.js.map +1 -0
  179. package/dist/application/remote-validation.js +39 -28
  180. package/dist/application/remote-validation.js.map +1 -1
  181. package/dist/application/remote-workspace.constants.d.ts +3 -0
  182. package/dist/application/remote-workspace.constants.js +2 -0
  183. package/dist/application/remote-workspace.constants.js.map +1 -0
  184. package/dist/application/remote-workspace.js +10 -10
  185. package/dist/application/remote-workspace.js.map +1 -1
  186. package/dist/application/remote-workspace.types.d.ts +3 -1
  187. package/dist/application/remote-workspace.types.js.map +1 -1
  188. package/dist/application/sandbox-activity.d.ts +3 -0
  189. package/dist/application/sandbox-activity.js +25 -0
  190. package/dist/application/sandbox-activity.js.map +1 -0
  191. package/dist/application/sandbox-provision.js +55 -10
  192. package/dist/application/sandbox-provision.js.map +1 -1
  193. package/dist/application/sandbox-session.types.d.ts +2 -0
  194. package/dist/application/sandbox-session.types.js.map +1 -1
  195. package/dist/application/sandbox.js +33 -10
  196. package/dist/application/sandbox.js.map +1 -1
  197. package/dist/application/speculation-host.d.ts +2 -0
  198. package/dist/application/speculation-host.js +30 -0
  199. package/dist/application/speculation-host.js.map +1 -0
  200. package/dist/application/speculation.constants.d.ts +4 -0
  201. package/dist/application/speculation.constants.js +2 -0
  202. package/dist/application/speculation.constants.js.map +1 -0
  203. package/dist/application/speculation.d.ts +2 -0
  204. package/dist/application/speculation.js +166 -0
  205. package/dist/application/speculation.js.map +1 -0
  206. package/dist/application/speculation.types.d.ts +56 -0
  207. package/dist/application/speculation.types.js +2 -0
  208. package/dist/application/speculation.types.js.map +1 -0
  209. package/dist/application/storage-reservation.d.ts +3 -0
  210. package/dist/application/storage-reservation.js +10 -0
  211. package/dist/application/storage-reservation.js.map +1 -0
  212. package/dist/application/storage-reservation.types.d.ts +4 -0
  213. package/dist/application/storage-reservation.types.js +2 -0
  214. package/dist/application/storage-reservation.types.js.map +1 -0
  215. package/dist/application/task-usage.d.ts +4 -0
  216. package/dist/application/task-usage.js +41 -0
  217. package/dist/application/task-usage.js.map +1 -0
  218. package/dist/application/task-usage.types.d.ts +5 -0
  219. package/dist/application/task-usage.types.js +2 -0
  220. package/dist/application/task-usage.types.js.map +1 -0
  221. package/dist/application/tasks.js +23 -2
  222. package/dist/application/tasks.js.map +1 -1
  223. package/dist/application/tasks.types.d.ts +4 -3
  224. package/dist/application/tasks.types.js.map +1 -1
  225. package/dist/application/workspace-allocation.d.ts +3 -0
  226. package/dist/application/workspace-allocation.js +34 -0
  227. package/dist/application/workspace-allocation.js.map +1 -0
  228. package/dist/application/workspace.js +2 -2
  229. package/dist/application/workspace.js.map +1 -1
  230. package/dist/cli/commands.js +4 -0
  231. package/dist/cli/commands.js.map +1 -1
  232. package/dist/cli/doctor-command.d.ts +3 -0
  233. package/dist/cli/doctor-command.js +38 -0
  234. package/dist/cli/doctor-command.js.map +1 -0
  235. package/dist/cli/main.constants.d.ts +38 -2
  236. package/dist/cli/main.constants.js +21 -2
  237. package/dist/cli/main.constants.js.map +1 -1
  238. package/dist/cli/recovery-command.d.ts +2 -0
  239. package/dist/cli/recovery-command.js +93 -0
  240. package/dist/cli/recovery-command.js.map +1 -0
  241. package/dist/cli/recovery-prune-command.d.ts +2 -0
  242. package/dist/cli/recovery-prune-command.js +34 -0
  243. package/dist/cli/recovery-prune-command.js.map +1 -0
  244. package/dist/cli/recovery-restore-command.d.ts +2 -0
  245. package/dist/cli/recovery-restore-command.js +34 -0
  246. package/dist/cli/recovery-restore-command.js.map +1 -0
  247. package/dist/cli/recovery-verify-command.d.ts +2 -0
  248. package/dist/cli/recovery-verify-command.js +43 -0
  249. package/dist/cli/recovery-verify-command.js.map +1 -0
  250. package/dist/cli/scaffold-files.js +2 -2
  251. package/dist/cli/scaffold-files.js.map +1 -1
  252. package/dist/cli/scaffold-validation.js +1 -1
  253. package/dist/cli/scaffold-validation.js.map +1 -1
  254. package/dist/cli/scaffold.constants.d.ts +5 -0
  255. package/dist/cli/scaffold.constants.js +7 -2
  256. package/dist/cli/scaffold.constants.js.map +1 -1
  257. package/dist/cli/scaffold.types.d.ts +1 -1
  258. package/dist/cli/scaffold.types.js.map +1 -1
  259. package/dist/domain/agent.types.d.ts +2 -0
  260. package/dist/domain/agent.types.js.map +1 -1
  261. package/dist/domain/artifact-reference.d.ts +4 -0
  262. package/dist/domain/artifact-reference.js +90 -0
  263. package/dist/domain/artifact-reference.js.map +1 -0
  264. package/dist/domain/artifact.constants.d.ts +2 -0
  265. package/dist/domain/artifact.constants.js +3 -0
  266. package/dist/domain/artifact.constants.js.map +1 -0
  267. package/dist/domain/artifact.d.ts +7 -0
  268. package/dist/domain/artifact.js +104 -0
  269. package/dist/domain/artifact.js.map +1 -0
  270. package/dist/domain/artifact.types.d.ts +44 -0
  271. package/dist/domain/artifact.types.js +2 -0
  272. package/dist/domain/artifact.types.js.map +1 -0
  273. package/dist/domain/egress.constants.d.ts +1 -0
  274. package/dist/domain/egress.constants.js +7 -0
  275. package/dist/domain/egress.constants.js.map +1 -0
  276. package/dist/domain/egress.d.ts +2 -0
  277. package/dist/domain/egress.js +48 -0
  278. package/dist/domain/egress.js.map +1 -0
  279. package/dist/domain/egress.types.d.ts +8 -0
  280. package/dist/domain/egress.types.js +2 -0
  281. package/dist/domain/egress.types.js.map +1 -0
  282. package/dist/domain/ports.d.ts +1 -1
  283. package/dist/domain/ports.js.map +1 -1
  284. package/dist/domain/sandbox.types.d.ts +13 -0
  285. package/dist/domain/sandbox.types.js.map +1 -1
  286. package/dist/domain/task-queue.constants.d.ts +8 -0
  287. package/dist/domain/task-queue.constants.js +9 -0
  288. package/dist/domain/task-queue.constants.js.map +1 -0
  289. package/dist/domain/task-queue.d.ts +11 -0
  290. package/dist/domain/task-queue.js +105 -0
  291. package/dist/domain/task-queue.js.map +1 -0
  292. package/dist/domain/task-queue.types.d.ts +41 -0
  293. package/dist/domain/task-queue.types.js +2 -0
  294. package/dist/domain/task-queue.types.js.map +1 -0
  295. package/dist/domain/workflow/budget.constants.d.ts +1 -0
  296. package/dist/domain/workflow/budget.constants.js +7 -0
  297. package/dist/domain/workflow/budget.constants.js.map +1 -0
  298. package/dist/domain/workflow/budget.d.ts +9 -0
  299. package/dist/domain/workflow/budget.js +69 -0
  300. package/dist/domain/workflow/budget.js.map +1 -0
  301. package/dist/domain/workflow/budget.types.d.ts +15 -0
  302. package/dist/domain/workflow/budget.types.js +2 -0
  303. package/dist/domain/workflow/budget.types.js.map +1 -0
  304. package/dist/domain/workflow/checkpoint-validation.d.ts +3 -0
  305. package/dist/domain/workflow/checkpoint-validation.js +81 -0
  306. package/dist/domain/workflow/checkpoint-validation.js.map +1 -0
  307. package/dist/domain/workflow/checkpoint-value.d.ts +2 -0
  308. package/dist/domain/workflow/checkpoint-value.js +49 -0
  309. package/dist/domain/workflow/checkpoint-value.js.map +1 -0
  310. package/dist/domain/workflow/checkpoint.d.ts +3 -0
  311. package/dist/domain/workflow/checkpoint.js +70 -0
  312. package/dist/domain/workflow/checkpoint.js.map +1 -0
  313. package/dist/domain/workflow/checkpoint.types.d.ts +40 -0
  314. package/dist/domain/workflow/checkpoint.types.js +2 -0
  315. package/dist/domain/workflow/checkpoint.types.js.map +1 -0
  316. package/dist/domain/workflow/gate-validation.d.ts +4 -0
  317. package/dist/domain/workflow/gate-validation.js +71 -0
  318. package/dist/domain/workflow/gate-validation.js.map +1 -0
  319. package/dist/domain/workflow/gates.constants.d.ts +4 -0
  320. package/dist/domain/workflow/gates.constants.js +5 -0
  321. package/dist/domain/workflow/gates.constants.js.map +1 -0
  322. package/dist/domain/workflow/gates.d.ts +7 -0
  323. package/dist/domain/workflow/gates.js +85 -0
  324. package/dist/domain/workflow/gates.js.map +1 -0
  325. package/dist/domain/workflow/gates.types.d.ts +27 -0
  326. package/dist/domain/workflow/gates.types.js +2 -0
  327. package/dist/domain/workflow/gates.types.js.map +1 -0
  328. package/dist/domain/workflow/task-runner.js +22 -3
  329. package/dist/domain/workflow/task-runner.js.map +1 -1
  330. package/dist/domain/workflow/usage-receipt.constants.d.ts +2 -0
  331. package/dist/domain/workflow/usage-receipt.constants.js +3 -0
  332. package/dist/domain/workflow/usage-receipt.constants.js.map +1 -0
  333. package/dist/domain/workflow/usage-receipt.d.ts +2 -0
  334. package/dist/domain/workflow/usage-receipt.js +18 -0
  335. package/dist/domain/workflow/usage-receipt.js.map +1 -0
  336. package/dist/domain/workflow/validation.js +6 -0
  337. package/dist/domain/workflow/validation.js.map +1 -1
  338. package/dist/domain/workflow/workflow-scheduler.js +68 -33
  339. package/dist/domain/workflow/workflow-scheduler.js.map +1 -1
  340. package/dist/domain/workflow/workflow-state.d.ts +2 -1
  341. package/dist/domain/workflow/workflow-state.js +107 -3
  342. package/dist/domain/workflow/workflow-state.js.map +1 -1
  343. package/dist/domain/workflow.d.ts +2 -0
  344. package/dist/domain/workflow.js +1 -0
  345. package/dist/domain/workflow.js.map +1 -1
  346. package/dist/domain/workflow.types.d.ts +23 -3
  347. package/dist/domain/workflow.types.js.map +1 -1
  348. package/dist/index.d.ts +44 -5
  349. package/dist/index.js +19 -2
  350. package/dist/index.js.map +1 -1
  351. package/dist/infrastructure/artifact-store.constants.d.ts +1 -0
  352. package/dist/infrastructure/artifact-store.constants.js +2 -0
  353. package/dist/infrastructure/artifact-store.constants.js.map +1 -0
  354. package/dist/infrastructure/artifact-store.d.ts +3 -0
  355. package/dist/infrastructure/artifact-store.js +100 -0
  356. package/dist/infrastructure/artifact-store.js.map +1 -0
  357. package/dist/infrastructure/artifact-store.types.d.ts +4 -0
  358. package/dist/infrastructure/artifact-store.types.js +2 -0
  359. package/dist/infrastructure/artifact-store.types.js.map +1 -0
  360. package/dist/infrastructure/file-manifest.d.ts +6 -0
  361. package/dist/infrastructure/file-manifest.js +92 -0
  362. package/dist/infrastructure/file-manifest.js.map +1 -0
  363. package/dist/infrastructure/git/lock-inspection.constants.d.ts +4 -0
  364. package/dist/infrastructure/git/lock-inspection.constants.js +5 -0
  365. package/dist/infrastructure/git/lock-inspection.constants.js.map +1 -0
  366. package/dist/infrastructure/git/lock-inspection.d.ts +3 -0
  367. package/dist/infrastructure/git/lock-inspection.js +64 -0
  368. package/dist/infrastructure/git/lock-inspection.js.map +1 -0
  369. package/dist/infrastructure/git/lock-inspection.types.d.ts +27 -0
  370. package/dist/infrastructure/git/lock-inspection.types.js +2 -0
  371. package/dist/infrastructure/git/lock-inspection.types.js.map +1 -0
  372. package/dist/infrastructure/git/lock.d.ts +1 -0
  373. package/dist/infrastructure/git/lock.js +70 -29
  374. package/dist/infrastructure/git/lock.js.map +1 -1
  375. package/dist/infrastructure/git/process-identity.d.ts +3 -0
  376. package/dist/infrastructure/git/process-identity.js +73 -0
  377. package/dist/infrastructure/git/process-identity.js.map +1 -0
  378. package/dist/infrastructure/git/process-identity.types.d.ts +10 -0
  379. package/dist/infrastructure/git/process-identity.types.js +2 -0
  380. package/dist/infrastructure/git/process-identity.types.js.map +1 -0
  381. package/dist/infrastructure/git/verification-command.d.ts +1 -0
  382. package/dist/infrastructure/git/verification-command.js +37 -0
  383. package/dist/infrastructure/git/verification-command.js.map +1 -0
  384. package/dist/infrastructure/git/workspace-lease.js +1 -0
  385. package/dist/infrastructure/git/workspace-lease.js.map +1 -1
  386. package/dist/infrastructure/git/workspace.js +5 -1
  387. package/dist/infrastructure/git/workspace.js.map +1 -1
  388. package/dist/infrastructure/git/worktree-inspection.constants.d.ts +5 -0
  389. package/dist/infrastructure/git/worktree-inspection.constants.js +16 -0
  390. package/dist/infrastructure/git/worktree-inspection.constants.js.map +1 -0
  391. package/dist/infrastructure/git/worktree-inspection.d.ts +3 -0
  392. package/dist/infrastructure/git/worktree-inspection.js +120 -0
  393. package/dist/infrastructure/git/worktree-inspection.js.map +1 -0
  394. package/dist/infrastructure/git/worktree-inspection.types.d.ts +19 -0
  395. package/dist/infrastructure/git/worktree-inspection.types.js +2 -0
  396. package/dist/infrastructure/git/worktree-inspection.types.js.map +1 -0
  397. package/dist/infrastructure/inspection-file.constants.d.ts +1 -0
  398. package/dist/infrastructure/inspection-file.constants.js +5 -0
  399. package/dist/infrastructure/inspection-file.constants.js.map +1 -0
  400. package/dist/infrastructure/inspection-file.d.ts +1 -0
  401. package/dist/infrastructure/inspection-file.js +43 -0
  402. package/dist/infrastructure/inspection-file.js.map +1 -0
  403. package/dist/infrastructure/inspection-hash.constants.d.ts +1 -0
  404. package/dist/infrastructure/inspection-hash.constants.js +2 -0
  405. package/dist/infrastructure/inspection-hash.constants.js.map +1 -0
  406. package/dist/infrastructure/inspection-hash.d.ts +2 -0
  407. package/dist/infrastructure/inspection-hash.js +62 -0
  408. package/dist/infrastructure/inspection-hash.js.map +1 -0
  409. package/dist/infrastructure/inspection-hash.types.d.ts +5 -0
  410. package/dist/infrastructure/inspection-hash.types.js +2 -0
  411. package/dist/infrastructure/inspection-hash.types.js.map +1 -0
  412. package/dist/infrastructure/journal-retention.constants.d.ts +4 -0
  413. package/dist/infrastructure/journal-retention.constants.js +5 -0
  414. package/dist/infrastructure/journal-retention.constants.js.map +1 -0
  415. package/dist/infrastructure/journal-retention.d.ts +2 -0
  416. package/dist/infrastructure/journal-retention.js +51 -0
  417. package/dist/infrastructure/journal-retention.js.map +1 -0
  418. package/dist/infrastructure/journal.js +37 -13
  419. package/dist/infrastructure/journal.js.map +1 -1
  420. package/dist/infrastructure/opentelemetry.constants.d.ts +10 -0
  421. package/dist/infrastructure/opentelemetry.constants.js +11 -0
  422. package/dist/infrastructure/opentelemetry.constants.js.map +1 -0
  423. package/dist/infrastructure/opentelemetry.d.ts +3 -0
  424. package/dist/infrastructure/opentelemetry.js +131 -0
  425. package/dist/infrastructure/opentelemetry.js.map +1 -0
  426. package/dist/infrastructure/opentelemetry.types.d.ts +21 -0
  427. package/dist/infrastructure/opentelemetry.types.js +2 -0
  428. package/dist/infrastructure/opentelemetry.types.js.map +1 -0
  429. package/dist/infrastructure/resource-activity-inspection.d.ts +2 -0
  430. package/dist/infrastructure/resource-activity-inspection.js +152 -0
  431. package/dist/infrastructure/resource-activity-inspection.js.map +1 -0
  432. package/dist/infrastructure/resource-activity.constants.d.ts +8 -0
  433. package/dist/infrastructure/resource-activity.constants.js +26 -0
  434. package/dist/infrastructure/resource-activity.constants.js.map +1 -0
  435. package/dist/infrastructure/resource-activity.d.ts +2 -0
  436. package/dist/infrastructure/resource-activity.js +166 -0
  437. package/dist/infrastructure/resource-activity.js.map +1 -0
  438. package/dist/infrastructure/resource-activity.types.d.ts +53 -0
  439. package/dist/infrastructure/resource-activity.types.js +2 -0
  440. package/dist/infrastructure/resource-activity.types.js.map +1 -0
  441. package/dist/infrastructure/storage-inventory.constants.d.ts +6 -0
  442. package/dist/infrastructure/storage-inventory.constants.js +11 -0
  443. package/dist/infrastructure/storage-inventory.constants.js.map +1 -0
  444. package/dist/infrastructure/storage-inventory.d.ts +2 -0
  445. package/dist/infrastructure/storage-inventory.js +123 -0
  446. package/dist/infrastructure/storage-inventory.js.map +1 -0
  447. package/dist/infrastructure/storage-inventory.types.d.ts +38 -0
  448. package/dist/infrastructure/storage-inventory.types.js +2 -0
  449. package/dist/infrastructure/storage-inventory.types.js.map +1 -0
  450. package/dist/infrastructure/storage-mutation-lock.constants.d.ts +5 -0
  451. package/dist/infrastructure/storage-mutation-lock.constants.js +6 -0
  452. package/dist/infrastructure/storage-mutation-lock.constants.js.map +1 -0
  453. package/dist/infrastructure/storage-mutation-lock.d.ts +1 -0
  454. package/dist/infrastructure/storage-mutation-lock.js +21 -0
  455. package/dist/infrastructure/storage-mutation-lock.js.map +1 -0
  456. package/dist/infrastructure/storage-reservations.constants.d.ts +4 -0
  457. package/dist/infrastructure/storage-reservations.constants.js +5 -0
  458. package/dist/infrastructure/storage-reservations.constants.js.map +1 -0
  459. package/dist/infrastructure/storage-reservations.d.ts +2 -0
  460. package/dist/infrastructure/storage-reservations.js +150 -0
  461. package/dist/infrastructure/storage-reservations.js.map +1 -0
  462. package/dist/infrastructure/storage-reservations.types.d.ts +21 -0
  463. package/dist/infrastructure/storage-reservations.types.js +2 -0
  464. package/dist/infrastructure/storage-reservations.types.js.map +1 -0
  465. package/dist/infrastructure/task-queue-http.constants.d.ts +2 -0
  466. package/dist/infrastructure/task-queue-http.constants.js +3 -0
  467. package/dist/infrastructure/task-queue-http.constants.js.map +1 -0
  468. package/dist/infrastructure/task-queue-http.d.ts +4 -0
  469. package/dist/infrastructure/task-queue-http.js +158 -0
  470. package/dist/infrastructure/task-queue-http.js.map +1 -0
  471. package/dist/infrastructure/task-queue-http.types.d.ts +16 -0
  472. package/dist/infrastructure/task-queue-http.types.js +2 -0
  473. package/dist/infrastructure/task-queue-http.types.js.map +1 -0
  474. package/dist/infrastructure/task-queue.d.ts +2 -0
  475. package/dist/infrastructure/task-queue.js +134 -0
  476. package/dist/infrastructure/task-queue.js.map +1 -0
  477. package/dist/infrastructure/transfer.js +17 -0
  478. package/dist/infrastructure/transfer.js.map +1 -1
  479. package/dist/infrastructure/workflow-checkpoint.constants.d.ts +1 -0
  480. package/dist/infrastructure/workflow-checkpoint.constants.js +2 -0
  481. package/dist/infrastructure/workflow-checkpoint.constants.js.map +1 -0
  482. package/dist/infrastructure/workflow-checkpoint.d.ts +3 -0
  483. package/dist/infrastructure/workflow-checkpoint.js +77 -0
  484. package/dist/infrastructure/workflow-checkpoint.js.map +1 -0
  485. package/dist/infrastructure/workflow-checkpoint.types.d.ts +4 -0
  486. package/dist/infrastructure/workflow-checkpoint.types.js +2 -0
  487. package/dist/infrastructure/workflow-checkpoint.types.js.map +1 -0
  488. package/dist/providers/agents.d.ts +2 -0
  489. package/dist/providers/agents.js +1 -0
  490. package/dist/providers/agents.js.map +1 -1
  491. package/dist/providers/cloud.constants.d.ts +1 -0
  492. package/dist/providers/cloud.constants.js +1 -0
  493. package/dist/providers/cloud.constants.js.map +1 -1
  494. package/dist/providers/container-cache.constants.d.ts +11 -0
  495. package/dist/providers/container-cache.constants.js +9 -0
  496. package/dist/providers/container-cache.constants.js.map +1 -0
  497. package/dist/providers/container-cache.d.ts +4 -0
  498. package/dist/providers/container-cache.js +48 -0
  499. package/dist/providers/container-cache.js.map +1 -0
  500. package/dist/providers/container-cache.types.d.ts +8 -0
  501. package/dist/providers/container-cache.types.js +2 -0
  502. package/dist/providers/container-cache.types.js.map +1 -0
  503. package/dist/providers/container-isolation.d.ts +2 -0
  504. package/dist/providers/container-isolation.js +29 -0
  505. package/dist/providers/container-isolation.js.map +1 -0
  506. package/dist/providers/container-mounts.js +7 -2
  507. package/dist/providers/container-mounts.js.map +1 -1
  508. package/dist/providers/container-network.d.ts +2 -0
  509. package/dist/providers/container-network.js +14 -0
  510. package/dist/providers/container-network.js.map +1 -0
  511. package/dist/providers/container-plan.js +6 -2
  512. package/dist/providers/container-plan.js.map +1 -1
  513. package/dist/providers/container.constants.d.ts +1 -0
  514. package/dist/providers/container.constants.js +1 -0
  515. package/dist/providers/container.constants.js.map +1 -1
  516. package/dist/providers/container.js +50 -3
  517. package/dist/providers/container.js.map +1 -1
  518. package/dist/providers/container.types.d.ts +5 -0
  519. package/dist/providers/container.types.js.map +1 -1
  520. package/dist/providers/daytona-command.js +10 -6
  521. package/dist/providers/daytona-command.js.map +1 -1
  522. package/dist/providers/daytona-terminal.d.ts +3 -0
  523. package/dist/providers/daytona-terminal.js +128 -0
  524. package/dist/providers/daytona-terminal.js.map +1 -0
  525. package/dist/providers/daytona.js +15 -4
  526. package/dist/providers/daytona.js.map +1 -1
  527. package/dist/providers/diagnostic-container.d.ts +4 -0
  528. package/dist/providers/diagnostic-container.js +15 -0
  529. package/dist/providers/diagnostic-container.js.map +1 -0
  530. package/dist/providers/docker.d.ts +2 -0
  531. package/dist/providers/docker.js.map +1 -1
  532. package/dist/providers/file-batches.constants.d.ts +10 -0
  533. package/dist/providers/file-batches.constants.js +57 -0
  534. package/dist/providers/file-batches.constants.js.map +1 -0
  535. package/dist/providers/file-batches.d.ts +2 -0
  536. package/dist/providers/file-batches.js +160 -0
  537. package/dist/providers/file-batches.js.map +1 -0
  538. package/dist/providers/file-upload.constants.d.ts +1 -0
  539. package/dist/providers/file-upload.constants.js +68 -0
  540. package/dist/providers/file-upload.constants.js.map +1 -0
  541. package/dist/providers/file-upload.d.ts +2 -0
  542. package/dist/providers/file-upload.js +146 -0
  543. package/dist/providers/file-upload.js.map +1 -0
  544. package/dist/providers/firecracker-command.d.ts +5 -0
  545. package/dist/providers/firecracker-command.js +114 -0
  546. package/dist/providers/firecracker-command.js.map +1 -0
  547. package/dist/providers/firecracker-files.constants.d.ts +1 -0
  548. package/dist/providers/firecracker-files.constants.js +21 -0
  549. package/dist/providers/firecracker-files.constants.js.map +1 -0
  550. package/dist/providers/firecracker-files.d.ts +3 -0
  551. package/dist/providers/firecracker-files.js +110 -0
  552. package/dist/providers/firecracker-files.js.map +1 -0
  553. package/dist/providers/firecracker-machine.d.ts +3 -0
  554. package/dist/providers/firecracker-machine.js +155 -0
  555. package/dist/providers/firecracker-machine.js.map +1 -0
  556. package/dist/providers/firecracker.constants.d.ts +10 -0
  557. package/dist/providers/firecracker.constants.js +11 -0
  558. package/dist/providers/firecracker.constants.js.map +1 -0
  559. package/dist/providers/firecracker.d.ts +4 -0
  560. package/dist/providers/firecracker.js +103 -0
  561. package/dist/providers/firecracker.js.map +1 -0
  562. package/dist/providers/firecracker.types.d.ts +36 -0
  563. package/dist/providers/firecracker.types.js +2 -0
  564. package/dist/providers/firecracker.types.js.map +1 -0
  565. package/dist/providers/local.js +2 -1
  566. package/dist/providers/local.js.map +1 -1
  567. package/dist/providers/podman.d.ts +2 -0
  568. package/dist/providers/podman.js.map +1 -1
  569. package/dist/providers/terminal-bridge.d.ts +14 -0
  570. package/dist/providers/terminal-bridge.js +100 -0
  571. package/dist/providers/terminal-bridge.js.map +1 -0
  572. package/dist/providers/vercel-directory.d.ts +2 -0
  573. package/dist/providers/vercel-directory.js +7 -0
  574. package/dist/providers/vercel-directory.js.map +1 -0
  575. package/dist/providers/vercel-files.js +3 -2
  576. package/dist/providers/vercel-files.js.map +1 -1
  577. package/dist/providers/vercel-network.d.ts +2 -0
  578. package/dist/providers/vercel-network.js +18 -0
  579. package/dist/providers/vercel-network.js.map +1 -0
  580. package/dist/providers/vercel.d.ts +1 -0
  581. package/dist/providers/vercel.js +8 -2
  582. package/dist/providers/vercel.js.map +1 -1
  583. package/dist/providers/vercel.types.d.ts +2 -0
  584. package/dist/providers/vercel.types.js.map +1 -1
  585. package/dist/providers/versions.constants.d.ts +1 -0
  586. package/dist/providers/versions.constants.js +1 -0
  587. package/dist/providers/versions.constants.js.map +1 -1
  588. package/package.json +16 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.0
4
+
5
+ This major release extends public workflow status unions. Exhaustive consumers must handle task statuses `paused` and `rejected`, and workflow result status `paused`. Research features remain explicitly opt-in with their documented limitations.
6
+
7
+ - Allocate isolated container workspaces under a writable private parent for rootless Podman, and publish file artifacts without recreating Windows drive roots. Document manual checkpoint lock recovery when process ownership cannot be verified.
8
+ - Create missing Vercel workspace and transfer parent directories recursively before writing files.
9
+
10
+ - Add cooperative storage reservations with workspace ownership, isolated restoration of retained previous/incoming transfer state, and local sandbox/resource activity inspection.
11
+ - Batch and verify incremental file/symlink uploads; transfer verified Git history deltas while retaining complete recovery bundles. Directory copies keep their existing transfer behavior.
12
+ - Persist workflow checkpoints with JSON outputs, explicit replay and cumulative usage. Add approval/pause gates and typed immutable artifacts with unsigned lineage.
13
+ - Add SQLite durable task queues, authenticated HTTP transport and fenced workers. Replays can repeat side effects; terminal usage receipts prevent double accounting without guaranteeing real-time billing caps.
14
+ - Extend task statuses with `paused` and `rejected`, and workflow result status with `paused`; exhaustive status consumers must handle these values. Add optional checkpoint flushing and usage-receipt methods to task contexts.
15
+ - Support Daytona native PTY attachment with cancellation, resize and reuse; live account validation remains outstanding.
16
+ - Add the Gemini CLI adapter, bootstrap, diagnostics and image installation pinned to 0.61.0. Gemini supports fresh sessions only, without native conversation capture, continuation or automatic response repairs.
17
+ - Add opt-in research prototypes for isolated Docker/Podman Git checkouts, prepared-host Firecracker microVMs, container deny-all/Vercel egress policies, and bounded speculative candidates with explicit validation and no automatic integration.
18
+ - Attribute cloud reports to source commit/runtime/time and retain successful image-attestation verification artifacts. Live cloud campaigns, signed publication and real Firecracker boot remain separately gated validation, not implied successes.
19
+ - Synchronize the complete public API reference, bilingual guides and roadmap with implemented behavior and remaining prototype limits.
20
+
21
+ ## 3.0.0
22
+
23
+ - Canonicalize temporary recovery verification directories across platforms and reuse existing Podman cache volumes without recreation.
24
+ - Breaking: custom implementations of `Sandbox`, `TaskContext` and `WorkflowResult` must provide `diagnose`, `reportUsage` and `usage`, respectively; exhaustive workflow observers must handle the new `attempt` and `usage` events. Factory-created objects provide these members automatically.
25
+ - Treat uncertain or legacy lock ownership conservatively; simultaneous writers to the same configured journal now conflict instead of sharing the file.
26
+ - Add shared workflow attempt and observed usage budgets, including retries and agent repairs, with graceful admission draining and cooperative token-limit cancellation.
27
+ - Add structured workflow usage/lifecycle events and an optional OpenTelemetry entry point with injected tracer/meter, fixed span names, counters and duration histograms without task contents or identifiers.
28
+ - Diagnose caller-owned sandboxes through an exclusive operation, with optional binary transfer probes and cleanup; report observed capabilities separately from advertised contracts and bundled agent protocol fixture checks.
29
+ - Add credential-free cloud contract fixtures and explicitly enabled scheduled Vercel/Daytona checks with sanitized reports, independent cleanup and optional live CLI syntax probes; authenticated model turns remain outside this suite.
30
+ - Wait for Daytona command exit status after output closes, and register allocation cleanup before discovering the sandbox home.
31
+ - Add explicit recovery retention plans, revalidated cleanup and quota admission; protect recovery artifacts, uncertain logs and workspaces containing ignored files.
32
+ - Observe lock ownership using Linux host, boot, namespace and process-start identity; serialize stale-lock reclamation and refuse uncertain owners.
33
+ - Verify retained Git bundles, objects and patch applicability in an isolated copy without inherited Git filters or changes to the source repository.
34
+ - Add opt-in Docker/Podman dependency caches with explicit invalidation keys and repository, image and user scoping; add pinned agent-image build tooling and a gated publication workflow with signed provenance verification.
35
+ - Download changed untracked files from Vercel/Daytona using SHA-256 manifests and bounded gzip batches; reuse verified unchanged files while retaining complete recovery payloads and protecting ignored host files.
36
+ - Record atomic SHA-256 manifests for new remote transfer backups before host apply; add opt-in `recovery verify --checksums` with bounded streaming verification, explicit missing/mismatched results and preserved host state on capture failure.
37
+ - Add read-only `recovery verify --directory` checks for retained transfer metadata and required backup files, with bounded state parsing and explicit separation from content integrity or restoration validation.
38
+ - Add optional `recovery inspect --locks` with bounded lock metadata reads and local PID observations; report invalid or unverifiable records explicitly without claiming ownership or deleting locks.
39
+ - Add optional `recovery inspect --git` workspace reports with branch/detached HEAD, clean/dirty status, Git locks and explicit unregistered/unavailable states, without refreshing indexes or pruning registrations.
40
+ - Add read-only `outpost recovery inspect` reports for recovery files, logs, locks and managed workspaces, with metadata-only logical sizes, symlink protection and explicit partial results when traversal limits or filesystem errors prevent a complete inventory.
41
+ - Check default agent start/resume/fork CLI help inside diagnostic images, verifying command usage and declared options instead of trusting a successful help exit; keep real execution and protocol compatibility explicitly unverified.
42
+ - Extend `doctor --image` to check a local Docker/Podman image in a temporary sandbox, without image downloads or networking; report image agent versions and cleanup failures separately from host checks.
43
+ - Add `outpost doctor` with bounded host prerequisite checks, Docker/Podman connectivity, host agent version comparison, explicit unchecked capabilities and JSON reports.
44
+
3
45
  ## 2.0.0
4
46
 
5
47
  - Normalize the workflow test directory before computing relative repository paths, fixing macOS CI with symlinked temporary directories.
package/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  [Documentation](https://elie-laloum.github.io/outpost/) · [Français](https://elie-laloum.github.io/outpost/fr/) · [API](https://elie-laloum.github.io/outpost/reference/) · [Changelog](CHANGELOG.md)
4
4
 
5
- Outpost is a TypeScript library for running coding agents in reusable sandboxes, managing their Git workspaces and composing typed workflows. Claude Code and Codex adapters work with Docker, Podman, Vercel, Daytona or explicit host execution.
5
+ Outpost is a TypeScript library for running coding agents in reusable sandboxes, managing their Git workspaces and composing typed workflows. Claude Code, Codex and Gemini CLI adapters work with Docker, Podman, Vercel, Daytona or explicit host execution. Gemini supports fresh sessions only; native conversation capture, resume and fork are available for Claude Code and Codex.
6
+
7
+ Version 4.0.0 adds durable orchestration, recovery and transfer improvements, Gemini CLI and native Daytona terminals. Research prototypes remain opt-in; see the [changelog](CHANGELOG.md#400) for public contract changes and the [roadmap](https://elie-laloum.github.io/outpost/project/roadmap/) for capabilities, limits and remaining work.
6
8
 
7
9
  ## Get started
8
10
 
package/SECURITY.md CHANGED
@@ -2,10 +2,12 @@
2
2
 
3
3
  Outpost runs coding agents that execute arbitrary project commands. Use it with repositories and credentials appropriate for that task.
4
4
 
5
- Docker/Podman expose only the selected checkout, Git metadata and explicit volumes. The Docker socket is not mounted by default. Containers use a chosen UID/GID, dropped capabilities, no-new-privileges and a private home. Extra devices, writable mounts and elevated hooks expand the boundary deliberately.
5
+ By default, Docker/Podman expose the selected checkout, Git metadata and explicit volumes. The Docker socket is not mounted by default. Containers use a chosen UID/GID, dropped capabilities, no-new-privileges and a private home. Extra devices, writable mounts and elevated hooks expand the boundary deliberately.
6
6
 
7
7
  Shared Git metadata is writable by the agent. A mounted sandbox is not an adversarial boundary protecting the host repository or its configuration. Outpost disables host Git hooks for its own Git commands, but a malicious repository can contain other executable configuration or project tooling. Do not run untrusted repositories with valuable host credentials. Host `local()` provides no isolation.
8
8
 
9
+ The opt-in Docker/Podman `repositoryMode: "isolated"` prototype uses a private container checkout and Git directory, without mounting the host checkout or Git metadata. Bundle transfer and validated synchronization import changes into the host workspace; host hooks, configuration and unrelated refs are not copied back. Explicit mounts overlapping canonical host repository/workspace/Git paths or container workspace/control paths are rejected, including read-only mounts. Dependency caches remain separate engine-managed volumes. Trust the container image, engine and host mount configuration: custom devices, external mounts, credentials, network access and shared caches expand the boundary. This is not a certified hostile-agent sandbox or protection against container/kernel escapes, malicious host path replacement during allocation, or dangerous project code later executed on the host.
10
+
9
11
  Remote providers upload repository history and inputs to the selected cloud account. Explicit credentials and environment files are sent to that environment. Review the cloud provider's own storage/network policy. Concurrent host changes stop synchronization; recovery files preserve prior and incoming state when available.
10
12
 
11
13
  Prompt command expansion only recognizes commands present in the original prompt file. Substitution cannot introduce new expansion fragments. Values substituted inside an original shell command still have shell semantics and must be trusted or quoted by the prompt author.
@@ -0,0 +1 @@
1
+ export declare function claudeDiagnostics(): readonly import("./cli-diagnostics.types.ts").AgentCliDiagnostic[];
@@ -0,0 +1,7 @@
1
+ import { claudeDiagnosticUsage } from "./cli-diagnostics.constants.js";
2
+ import { cliDiagnostics } from "./cli-diagnostics.js";
3
+ import { claudeRequest } from "./claude-request.js";
4
+ export function claudeDiagnostics() {
5
+ return cliDiagnostics((input) => claudeRequest({}, input), claudeDiagnosticUsage);
6
+ }
7
+ //# sourceMappingURL=claude-diagnostics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-diagnostics.js","sourceRoot":"","sources":["../../../src/adapters/agents/claude-diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,UAAU,iBAAiB;IAC/B,OAAO,cAAc,CACnB,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,EAAE,KAAK,CAAC,EACnC,qBAAqB,CACtB,CAAC;AACJ,CAAC","sourcesContent":["import { claudeDiagnosticUsage } from \"./cli-diagnostics.constants.ts\";\nimport { cliDiagnostics } from \"./cli-diagnostics.ts\";\nimport { claudeRequest } from \"./claude-request.ts\";\n\nexport function claudeDiagnostics() {\n return cliDiagnostics(\n (input) => claudeRequest({}, input),\n claudeDiagnosticUsage,\n );\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import type { AgentCliScenario } from "./cli-diagnostics.types.ts";
2
+ export declare const cliDiagnosticScenarios: readonly AgentCliScenario[];
3
+ export declare const codexDiagnosticUsage: {
4
+ readonly start: "codex exec";
5
+ readonly resume: "codex exec resume";
6
+ readonly fork: "codex exec fork";
7
+ };
8
+ export declare const claudeDiagnosticUsage: {
9
+ readonly start: "claude";
10
+ readonly resume: "claude";
11
+ readonly fork: "claude";
12
+ };
@@ -0,0 +1,24 @@
1
+ export const cliDiagnosticScenarios = [
2
+ { mode: "start", input: {} },
3
+ {
4
+ mode: "resume",
5
+ input: { continuation: { id: "00000000-0000-0000-0000-000000000000" } },
6
+ },
7
+ {
8
+ mode: "fork",
9
+ input: {
10
+ continuation: { id: "00000000-0000-0000-0000-000000000000", fork: true },
11
+ },
12
+ },
13
+ ];
14
+ export const codexDiagnosticUsage = {
15
+ start: "codex exec",
16
+ resume: "codex exec resume",
17
+ fork: "codex exec fork",
18
+ };
19
+ export const claudeDiagnosticUsage = {
20
+ start: "claude",
21
+ resume: "claude",
22
+ fork: "claude",
23
+ };
24
+ //# sourceMappingURL=cli-diagnostics.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-diagnostics.constants.js","sourceRoot":"","sources":["../../../src/adapters/agents/cli-diagnostics.constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAgC;IACjE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;IAC5B;QACE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,EAAE,sCAAsC,EAAE,EAAE;KACxE;IACD;QACE,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE;YACL,YAAY,EAAE,EAAE,EAAE,EAAE,sCAAsC,EAAE,IAAI,EAAE,IAAI,EAAE;SACzE;KACF;CACF,CAAC;AACF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,mBAAmB;IAC3B,IAAI,EAAE,iBAAiB;CACf,CAAC;AACX,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,QAAQ;CACN,CAAC","sourcesContent":["import type { AgentCliScenario } from \"./cli-diagnostics.types.ts\";\n\nexport const cliDiagnosticScenarios: readonly AgentCliScenario[] = [\n { mode: \"start\", input: {} },\n {\n mode: \"resume\",\n input: { continuation: { id: \"00000000-0000-0000-0000-000000000000\" } },\n },\n {\n mode: \"fork\",\n input: {\n continuation: { id: \"00000000-0000-0000-0000-000000000000\", fork: true },\n },\n },\n];\nexport const codexDiagnosticUsage = {\n start: \"codex exec\",\n resume: \"codex exec resume\",\n fork: \"codex exec fork\",\n} as const;\nexport const claudeDiagnosticUsage = {\n start: \"claude\",\n resume: \"claude\",\n fork: \"claude\",\n} as const;\n"]}
@@ -0,0 +1,4 @@
1
+ import type { AgentInput } from "../../domain/agent.types.ts";
2
+ import type { Command } from "../../domain/command.types.ts";
3
+ import type { AgentCliDiagnostic, AgentCliMode } from "./cli-diagnostics.types.ts";
4
+ export declare function cliDiagnostics(request: (input: AgentInput) => Command, usage: Readonly<Record<AgentCliMode, string>>): readonly AgentCliDiagnostic[];
@@ -0,0 +1,14 @@
1
+ import { cliDiagnosticScenarios } from "./cli-diagnostics.constants.js";
2
+ export function cliDiagnostics(request, usage) {
3
+ return cliDiagnosticScenarios.map(({ mode, input }) => {
4
+ const command = request(input);
5
+ const args = command.arguments ?? [];
6
+ return {
7
+ mode,
8
+ usage: usage[mode],
9
+ options: args.filter((argument) => argument.startsWith("--")),
10
+ command: { ...command, arguments: [...args, "--help"] },
11
+ };
12
+ });
13
+ }
14
+ //# sourceMappingURL=cli-diagnostics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-diagnostics.js","sourceRoot":"","sources":["../../../src/adapters/agents/cli-diagnostics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAMxE,MAAM,UAAU,cAAc,CAC5B,OAAuC,EACvC,KAA6C;IAE7C,OAAO,sBAAsB,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;QACpD,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QAC/B,MAAM,IAAI,GAAG,OAAO,CAAC,SAAS,IAAI,EAAE,CAAC;QACrC,OAAO;YACL,IAAI;YACJ,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC;YAClB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAC7D,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,QAAQ,CAAC,EAAE;SACxD,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { AgentInput } from \"../../domain/agent.types.ts\";\nimport type { Command } from \"../../domain/command.types.ts\";\nimport { cliDiagnosticScenarios } from \"./cli-diagnostics.constants.ts\";\nimport type {\n AgentCliDiagnostic,\n AgentCliMode,\n} from \"./cli-diagnostics.types.ts\";\n\nexport function cliDiagnostics(\n request: (input: AgentInput) => Command,\n usage: Readonly<Record<AgentCliMode, string>>,\n): readonly AgentCliDiagnostic[] {\n return cliDiagnosticScenarios.map(({ mode, input }) => {\n const command = request(input);\n const args = command.arguments ?? [];\n return {\n mode,\n usage: usage[mode],\n options: args.filter((argument) => argument.startsWith(\"--\")),\n command: { ...command, arguments: [...args, \"--help\"] },\n };\n });\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import type { AgentInput } from "../../domain/agent.types.ts";
2
+ import type { Command } from "../../domain/command.types.ts";
3
+ export type AgentCliMode = "start" | "resume" | "fork";
4
+ export interface AgentCliScenario {
5
+ readonly mode: AgentCliMode;
6
+ readonly input: AgentInput;
7
+ }
8
+ export interface AgentCliDiagnostic {
9
+ readonly mode: AgentCliMode;
10
+ readonly command: Command;
11
+ readonly usage: string;
12
+ readonly options: readonly string[];
13
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cli-diagnostics.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-diagnostics.types.js","sourceRoot":"","sources":["../../../src/adapters/agents/cli-diagnostics.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AgentInput } from \"../../domain/agent.types.ts\";\nimport type { Command } from \"../../domain/command.types.ts\";\n\nexport type AgentCliMode = \"start\" | \"resume\" | \"fork\";\nexport interface AgentCliScenario {\n readonly mode: AgentCliMode;\n readonly input: AgentInput;\n}\nexport interface AgentCliDiagnostic {\n readonly mode: AgentCliMode;\n readonly command: Command;\n readonly usage: string;\n readonly options: readonly string[];\n}\n"]}
@@ -0,0 +1 @@
1
+ export declare function codexDiagnostics(): readonly import("./cli-diagnostics.types.ts").AgentCliDiagnostic[];
@@ -0,0 +1,7 @@
1
+ import { codexDiagnosticUsage } from "./cli-diagnostics.constants.js";
2
+ import { cliDiagnostics } from "./cli-diagnostics.js";
3
+ import { codexRequest } from "./codex-request.js";
4
+ export function codexDiagnostics() {
5
+ return cliDiagnostics((input) => codexRequest({}, input), codexDiagnosticUsage);
6
+ }
7
+ //# sourceMappingURL=codex-diagnostics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-diagnostics.js","sourceRoot":"","sources":["../../../src/adapters/agents/codex-diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,UAAU,gBAAgB;IAC9B,OAAO,cAAc,CACnB,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,EAAE,KAAK,CAAC,EAClC,oBAAoB,CACrB,CAAC;AACJ,CAAC","sourcesContent":["import { codexDiagnosticUsage } from \"./cli-diagnostics.constants.ts\";\nimport { cliDiagnostics } from \"./cli-diagnostics.ts\";\nimport { codexRequest } from \"./codex-request.ts\";\n\nexport function codexDiagnostics() {\n return cliDiagnostics(\n (input) => codexRequest({}, input),\n codexDiagnosticUsage,\n );\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import type { AgentAdapter } from "../../domain/agent.types.ts";
2
+ import type { GeminiSettings } from "./gemini.types.ts";
3
+ export declare function gemini(settings?: GeminiSettings): AgentAdapter;
@@ -0,0 +1,15 @@
1
+ import { geminiEvents } from "./gemini-events.js";
2
+ import { geminiRequest } from "./gemini-request.js";
3
+ export function gemini(settings = {}) {
4
+ return Object.freeze({
5
+ name: "gemini",
6
+ bootstrap: "gemini",
7
+ resumable: false,
8
+ capture: false,
9
+ requiresFinishedEvent: true,
10
+ variables: Object.freeze({ ...settings.variables }),
11
+ request: (input) => geminiRequest(settings, input),
12
+ events: geminiEvents,
13
+ });
14
+ }
15
+ //# sourceMappingURL=gemini-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini-adapter.js","sourceRoot":"","sources":["../../../src/adapters/agents/gemini-adapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,MAAM,UAAU,MAAM,CAAC,WAA2B,EAAE;IAClD,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,QAAQ;QACnB,SAAS,EAAE,KAAK;QAChB,OAAO,EAAE,KAAK;QACd,qBAAqB,EAAE,IAAI;QAC3B,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;QACnD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,KAAK,CAAC;QAClD,MAAM,EAAE,YAAY;KACE,CAAC,CAAC;AAC5B,CAAC","sourcesContent":["import type { AgentAdapter } from \"../../domain/agent.types.ts\";\nimport { geminiEvents } from \"./gemini-events.ts\";\nimport { geminiRequest } from \"./gemini-request.ts\";\nimport type { GeminiSettings } from \"./gemini.types.ts\";\n\nexport function gemini(settings: GeminiSettings = {}): AgentAdapter {\n return Object.freeze({\n name: \"gemini\",\n bootstrap: \"gemini\",\n resumable: false,\n capture: false,\n requiresFinishedEvent: true,\n variables: Object.freeze({ ...settings.variables }),\n request: (input) => geminiRequest(settings, input),\n events: geminiEvents,\n } satisfies AgentAdapter);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import type { AgentCliDiagnostic } from "./cli-diagnostics.types.ts";
2
+ export declare function geminiDiagnostics(): readonly AgentCliDiagnostic[];
@@ -0,0 +1,15 @@
1
+ import { geminiRequest } from "./gemini-request.js";
2
+ export function geminiDiagnostics() {
3
+ const command = geminiRequest({}, {});
4
+ const args = command.arguments ?? [];
5
+ return [
6
+ {
7
+ mode: "start",
8
+ usage: "gemini",
9
+ options: args.filter((argument) => argument.startsWith("--")),
10
+ // Gemini omits supplied options from its help output.
11
+ command: { ...command, arguments: ["--help"] },
12
+ },
13
+ ];
14
+ }
15
+ //# sourceMappingURL=gemini-diagnostics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini-diagnostics.js","sourceRoot":"","sources":["../../../src/adapters/agents/gemini-diagnostics.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,UAAU,iBAAiB;IAC/B,MAAM,OAAO,GAAG,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,OAAO,CAAC,SAAS,IAAI,EAAE,CAAC;IACrC,OAAO;QACL;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,QAAQ;YACf,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAC7D,sDAAsD;YACtD,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;SAC/C;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { AgentCliDiagnostic } from \"./cli-diagnostics.types.ts\";\nimport { geminiRequest } from \"./gemini-request.ts\";\n\nexport function geminiDiagnostics(): readonly AgentCliDiagnostic[] {\n const command = geminiRequest({}, {});\n const args = command.arguments ?? [];\n return [\n {\n mode: \"start\",\n usage: \"gemini\",\n options: args.filter((argument) => argument.startsWith(\"--\")),\n // Gemini omits supplied options from its help output.\n command: { ...command, arguments: [\"--help\"] },\n },\n ];\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import type { AgentEvent } from "../../domain/agent.types.ts";
2
+ export declare function geminiEvents(line: string): AgentEvent[];
@@ -0,0 +1,50 @@
1
+ import { decodeLine } from "./event-decoder.js";
2
+ import { asRecord, numberOrZero } from "./protocol.js";
3
+ function message(event) {
4
+ if (event.role !== "assistant" || typeof event.content !== "string")
5
+ return [];
6
+ return [{ kind: "text", text: event.content }];
7
+ }
8
+ function result(event) {
9
+ const events = [];
10
+ if (event.stats) {
11
+ const stats = asRecord(event.stats);
12
+ events.push({
13
+ kind: "usage",
14
+ tokens: {
15
+ input: numberOrZero(stats.input_tokens),
16
+ cached: numberOrZero(stats.cached),
17
+ output: numberOrZero(stats.output_tokens),
18
+ },
19
+ });
20
+ }
21
+ if (event.status === "success")
22
+ events.push({ kind: "finished" });
23
+ if (event.status === "error")
24
+ events.push({
25
+ kind: "failure",
26
+ message: String(asRecord(event.error).message ?? "Gemini failed"),
27
+ });
28
+ return events;
29
+ }
30
+ export function geminiEvents(line) {
31
+ return decodeLine(line, {
32
+ init: (event) => typeof event.session_id === "string"
33
+ ? [{ kind: "conversation", id: event.session_id }]
34
+ : [],
35
+ message,
36
+ tool_use: (event) => typeof event.tool_name === "string"
37
+ ? [{ kind: "tool", name: event.tool_name, input: event.parameters }]
38
+ : [],
39
+ error: (event) => typeof event.message === "string"
40
+ ? [
41
+ {
42
+ kind: event.severity === "warning" ? "warning" : "failure",
43
+ message: event.message,
44
+ },
45
+ ]
46
+ : [],
47
+ result,
48
+ });
49
+ }
50
+ //# sourceMappingURL=gemini-events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini-events.js","sourceRoot":"","sources":["../../../src/adapters/agents/gemini-events.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGvD,SAAS,OAAO,CAAC,KAAqB;IACpC,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;QACjE,OAAO,EAAE,CAAC;IACZ,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;AACjD,CAAC;AAED,SAAS,MAAM,CAAC,KAAqB;IACnC,MAAM,MAAM,GAAiB,EAAE,CAAC;IAChC,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QAChB,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACpC,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,OAAO;YACb,MAAM,EAAE;gBACN,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC,YAAY,CAAC;gBACvC,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC;gBAClC,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC,aAAa,CAAC;aAC1C;SACF,CAAC,CAAC;IACL,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS;QAAE,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;IAClE,IAAI,KAAK,CAAC,MAAM,KAAK,OAAO;QAC1B,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,OAAO,IAAI,eAAe,CAAC;SAClE,CAAC,CAAC;IACL,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,UAAU,CAAC,IAAI,EAAE;QACtB,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CACd,OAAO,KAAK,CAAC,UAAU,KAAK,QAAQ;YAClC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC;YAClD,CAAC,CAAC,EAAE;QACR,OAAO;QACP,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAClB,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ;YACjC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC;YACpE,CAAC,CAAC,EAAE;QACR,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CACf,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;YAC/B,CAAC,CAAC;gBACE;oBACE,IAAI,EAAE,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;oBAC1D,OAAO,EAAE,KAAK,CAAC,OAAO;iBACvB;aACF;YACH,CAAC,CAAC,EAAE;QACR,MAAM;KACP,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { AgentEvent } from \"../../domain/agent.types.ts\";\nimport { decodeLine } from \"./event-decoder.ts\";\nimport { asRecord, numberOrZero } from \"./protocol.ts\";\nimport type { ProtocolRecord } from \"./protocol.types.ts\";\n\nfunction message(event: ProtocolRecord): AgentEvent[] {\n if (event.role !== \"assistant\" || typeof event.content !== \"string\")\n return [];\n return [{ kind: \"text\", text: event.content }];\n}\n\nfunction result(event: ProtocolRecord): AgentEvent[] {\n const events: AgentEvent[] = [];\n if (event.stats) {\n const stats = asRecord(event.stats);\n events.push({\n kind: \"usage\",\n tokens: {\n input: numberOrZero(stats.input_tokens),\n cached: numberOrZero(stats.cached),\n output: numberOrZero(stats.output_tokens),\n },\n });\n }\n if (event.status === \"success\") events.push({ kind: \"finished\" });\n if (event.status === \"error\")\n events.push({\n kind: \"failure\",\n message: String(asRecord(event.error).message ?? \"Gemini failed\"),\n });\n return events;\n}\n\nexport function geminiEvents(line: string): AgentEvent[] {\n return decodeLine(line, {\n init: (event) =>\n typeof event.session_id === \"string\"\n ? [{ kind: \"conversation\", id: event.session_id }]\n : [],\n message,\n tool_use: (event) =>\n typeof event.tool_name === \"string\"\n ? [{ kind: \"tool\", name: event.tool_name, input: event.parameters }]\n : [],\n error: (event) =>\n typeof event.message === \"string\"\n ? [\n {\n kind: event.severity === \"warning\" ? \"warning\" : \"failure\",\n message: event.message,\n },\n ]\n : [],\n result,\n });\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { AgentInput } from "../../domain/agent.types.ts";
2
+ import type { Command } from "../../domain/command.types.ts";
3
+ import type { GeminiSettings } from "./gemini.types.ts";
4
+ export declare function geminiRequest(settings: GeminiSettings, input: AgentInput): Command;
@@ -0,0 +1,21 @@
1
+ import { invariant } from "../../domain/errors.js";
2
+ export function geminiRequest(settings, input) {
3
+ invariant(!input.continuation, "Gemini does not support continuation or fork in Outpost");
4
+ const args = [];
5
+ if (settings.model)
6
+ args.push("--model", settings.model);
7
+ const approvalMode = settings.approvalMode ?? (input.interactive ? "default" : "yolo");
8
+ args.push("--approval-mode", approvalMode);
9
+ if (!input.interactive)
10
+ args.push("--output-format", "stream-json");
11
+ if (input.interactive && input.text !== undefined)
12
+ args.push("--prompt-interactive", input.text);
13
+ return {
14
+ executable: "gemini",
15
+ arguments: args,
16
+ ...(input.interactive
17
+ ? { interactive: true }
18
+ : { stdin: input.text ?? "" }),
19
+ };
20
+ }
21
+ //# sourceMappingURL=gemini-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini-request.js","sourceRoot":"","sources":["../../../src/adapters/agents/gemini-request.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,MAAM,UAAU,aAAa,CAC3B,QAAwB,EACxB,KAAiB;IAEjB,SAAS,CACP,CAAC,KAAK,CAAC,YAAY,EACnB,yDAAyD,CAC1D,CAAC;IACF,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,IAAI,QAAQ,CAAC,KAAK;QAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzD,MAAM,YAAY,GAChB,QAAQ,CAAC,YAAY,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACpE,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAC;IAC3C,IAAI,CAAC,KAAK,CAAC,WAAW;QAAE,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;IACpE,IAAI,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS;QAC/C,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAChD,OAAO;QACL,UAAU,EAAE,QAAQ;QACpB,SAAS,EAAE,IAAI;QACf,GAAG,CAAC,KAAK,CAAC,WAAW;YACnB,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE;YACvB,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;KACjC,CAAC;AACJ,CAAC","sourcesContent":["import type { AgentInput } from \"../../domain/agent.types.ts\";\nimport type { Command } from \"../../domain/command.types.ts\";\nimport { invariant } from \"../../domain/errors.ts\";\nimport type { GeminiSettings } from \"./gemini.types.ts\";\n\nexport function geminiRequest(\n settings: GeminiSettings,\n input: AgentInput,\n): Command {\n invariant(\n !input.continuation,\n \"Gemini does not support continuation or fork in Outpost\",\n );\n const args: string[] = [];\n if (settings.model) args.push(\"--model\", settings.model);\n const approvalMode =\n settings.approvalMode ?? (input.interactive ? \"default\" : \"yolo\");\n args.push(\"--approval-mode\", approvalMode);\n if (!input.interactive) args.push(\"--output-format\", \"stream-json\");\n if (input.interactive && input.text !== undefined)\n args.push(\"--prompt-interactive\", input.text);\n return {\n executable: \"gemini\",\n arguments: args,\n ...(input.interactive\n ? { interactive: true }\n : { stdin: input.text ?? \"\" }),\n };\n}\n"]}
@@ -0,0 +1,6 @@
1
+ import type { Variables } from "../../domain/command.types.ts";
2
+ export interface GeminiSettings {
3
+ readonly model?: string;
4
+ readonly variables?: Variables;
5
+ readonly approvalMode?: "default" | "auto_edit" | "yolo" | "plan";
6
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=gemini.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini.types.js","sourceRoot":"","sources":["../../../src/adapters/agents/gemini.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Variables } from \"../../domain/command.types.ts\";\n\nexport interface GeminiSettings {\n readonly model?: string;\n readonly variables?: Variables;\n readonly approvalMode?: \"default\" | \"auto_edit\" | \"yolo\" | \"plan\";\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import type { AgentProtocolFixture } from "./protocol-fixtures.types.ts";
2
+ export declare const protocolFixtures: Readonly<Record<"claude" | "codex" | "gemini", readonly AgentProtocolFixture[]>>;
@@ -0,0 +1,105 @@
1
+ export const protocolFixtures = {
2
+ gemini: [
3
+ {
4
+ name: "turn",
5
+ lines: [
6
+ '{"type":"init","session_id":"fixture-conversation","model":"fixture-model"}',
7
+ '{"type":"tool_use","tool_name":"command","tool_id":"call-1","parameters":{"command":"fixture-command"}}',
8
+ '{"type":"message","role":"assistant","content":"fixture-result","delta":true}',
9
+ '{"type":"result","status":"success","stats":{"input_tokens":10,"cached":2,"output_tokens":3}}',
10
+ ],
11
+ expected: [
12
+ { kind: "conversation", id: "fixture-conversation" },
13
+ {
14
+ kind: "tool",
15
+ name: "command",
16
+ input: { command: "fixture-command" },
17
+ },
18
+ { kind: "text", text: "fixture-result" },
19
+ { kind: "usage", tokens: { input: 10, cached: 2, output: 3 } },
20
+ { kind: "finished" },
21
+ ],
22
+ },
23
+ {
24
+ name: "failure",
25
+ lines: [
26
+ '{"type":"result","status":"error","error":{"message":"fixture-failure"}}',
27
+ ],
28
+ expected: [{ kind: "failure", message: "fixture-failure" }],
29
+ },
30
+ {
31
+ name: "unknown",
32
+ lines: ['{"type":"future.event"}', "invalid-json"],
33
+ expected: [
34
+ { kind: "raw", value: { type: "future.event" } },
35
+ { kind: "raw", value: "invalid-json" },
36
+ ],
37
+ },
38
+ ],
39
+ codex: [
40
+ {
41
+ name: "turn",
42
+ lines: [
43
+ '{"type":"thread.started","thread_id":"fixture-conversation"}',
44
+ '{"type":"item.started","item":{"type":"command_execution","command":"fixture-command"}}',
45
+ '{"type":"item.completed","item":{"type":"agent_message","text":"fixture-result"}}',
46
+ '{"type":"turn.completed","usage":{"input_tokens":10,"cached_input_tokens":2,"output_tokens":3}}',
47
+ ],
48
+ expected: [
49
+ { kind: "conversation", id: "fixture-conversation" },
50
+ { kind: "tool", name: "command", input: "fixture-command" },
51
+ { kind: "text", text: "fixture-result" },
52
+ { kind: "usage", tokens: { input: 10, cached: 2, output: 3 } },
53
+ { kind: "finished" },
54
+ ],
55
+ },
56
+ {
57
+ name: "failure",
58
+ lines: ['{"type":"turn.failed","error":{"message":"fixture-failure"}}'],
59
+ expected: [{ kind: "failure", message: "fixture-failure" }],
60
+ },
61
+ {
62
+ name: "unknown",
63
+ lines: ['{"type":"future.event"}', "invalid-json"],
64
+ expected: [
65
+ { kind: "raw", value: { type: "future.event" } },
66
+ { kind: "raw", value: "invalid-json" },
67
+ ],
68
+ },
69
+ ],
70
+ claude: [
71
+ {
72
+ name: "turn",
73
+ lines: [
74
+ '{"type":"system","session_id":"fixture-conversation"}',
75
+ '{"type":"assistant","message":{"content":[{"type":"tool_use","name":"command","input":"fixture-command"},{"type":"text","text":"fixture-result"}]}}',
76
+ '{"type":"result","result":"fixture-result","usage":{"input_tokens":10,"cache_creation_input_tokens":1,"cache_read_input_tokens":2,"output_tokens":3}}',
77
+ ],
78
+ expected: [
79
+ { kind: "conversation", id: "fixture-conversation" },
80
+ { kind: "tool", name: "command", input: "fixture-command" },
81
+ { kind: "text", text: "fixture-result" },
82
+ { kind: "result", text: "fixture-result" },
83
+ {
84
+ kind: "usage",
85
+ tokens: { input: 10, cached: 2, cacheCreated: 1, output: 3 },
86
+ },
87
+ { kind: "finished" },
88
+ ],
89
+ },
90
+ {
91
+ name: "failure",
92
+ lines: ['{"type":"result","is_error":true,"result":"fixture-failure"}'],
93
+ expected: [{ kind: "failure", message: "fixture-failure" }],
94
+ },
95
+ {
96
+ name: "unknown",
97
+ lines: ['{"type":"future.event"}', "invalid-json"],
98
+ expected: [
99
+ { kind: "raw", value: { type: "future.event" } },
100
+ { kind: "raw", value: "invalid-json" },
101
+ ],
102
+ },
103
+ ],
104
+ };
105
+ //# sourceMappingURL=protocol-fixtures.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol-fixtures.constants.js","sourceRoot":"","sources":["../../../src/adapters/agents/protocol-fixtures.constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAEzB;IACF,MAAM,EAAE;QACN;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE;gBACL,6EAA6E;gBAC7E,yGAAyG;gBACzG,+EAA+E;gBAC/E,+FAA+F;aAChG;YACD,QAAQ,EAAE;gBACR,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,sBAAsB,EAAE;gBACpD;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;oBACf,KAAK,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE;iBACtC;gBACD,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE;gBACxC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC9D,EAAE,IAAI,EAAE,UAAU,EAAE;aACrB;SACF;QACD;YACE,IAAI,EAAE,SAAS;YACf,KAAK,EAAE;gBACL,0EAA0E;aAC3E;YACD,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC;SAC5D;QACD;YACE,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,CAAC,yBAAyB,EAAE,cAAc,CAAC;YAClD,QAAQ,EAAE;gBACR,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE;gBAChD,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE;aACvC;SACF;KACF;IACD,KAAK,EAAE;QACL;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE;gBACL,8DAA8D;gBAC9D,yFAAyF;gBACzF,mFAAmF;gBACnF,iGAAiG;aAClG;YACD,QAAQ,EAAE;gBACR,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,sBAAsB,EAAE;gBACpD,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,iBAAiB,EAAE;gBAC3D,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE;gBACxC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC9D,EAAE,IAAI,EAAE,UAAU,EAAE;aACrB;SACF;QACD;YACE,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,CAAC,8DAA8D,CAAC;YACvE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC;SAC5D;QACD;YACE,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,CAAC,yBAAyB,EAAE,cAAc,CAAC;YAClD,QAAQ,EAAE;gBACR,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE;gBAChD,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE;aACvC;SACF;KACF;IACD,MAAM,EAAE;QACN;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE;gBACL,uDAAuD;gBACvD,qJAAqJ;gBACrJ,uJAAuJ;aACxJ;YACD,QAAQ,EAAE;gBACR,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,sBAAsB,EAAE;gBACpD,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,iBAAiB,EAAE;gBAC3D,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE;gBACxC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,gBAAgB,EAAE;gBAC1C;oBACE,IAAI,EAAE,OAAO;oBACb,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;iBAC7D;gBACD,EAAE,IAAI,EAAE,UAAU,EAAE;aACrB;SACF;QACD;YACE,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,CAAC,8DAA8D,CAAC;YACvE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC;SAC5D;QACD;YACE,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,CAAC,yBAAyB,EAAE,cAAc,CAAC;YAClD,QAAQ,EAAE;gBACR,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE;gBAChD,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE;aACvC;SACF;KACF;CACF,CAAC","sourcesContent":["import type { AgentProtocolFixture } from \"./protocol-fixtures.types.ts\";\n\nexport const protocolFixtures: Readonly<\n Record<\"claude\" | \"codex\" | \"gemini\", readonly AgentProtocolFixture[]>\n> = {\n gemini: [\n {\n name: \"turn\",\n lines: [\n '{\"type\":\"init\",\"session_id\":\"fixture-conversation\",\"model\":\"fixture-model\"}',\n '{\"type\":\"tool_use\",\"tool_name\":\"command\",\"tool_id\":\"call-1\",\"parameters\":{\"command\":\"fixture-command\"}}',\n '{\"type\":\"message\",\"role\":\"assistant\",\"content\":\"fixture-result\",\"delta\":true}',\n '{\"type\":\"result\",\"status\":\"success\",\"stats\":{\"input_tokens\":10,\"cached\":2,\"output_tokens\":3}}',\n ],\n expected: [\n { kind: \"conversation\", id: \"fixture-conversation\" },\n {\n kind: \"tool\",\n name: \"command\",\n input: { command: \"fixture-command\" },\n },\n { kind: \"text\", text: \"fixture-result\" },\n { kind: \"usage\", tokens: { input: 10, cached: 2, output: 3 } },\n { kind: \"finished\" },\n ],\n },\n {\n name: \"failure\",\n lines: [\n '{\"type\":\"result\",\"status\":\"error\",\"error\":{\"message\":\"fixture-failure\"}}',\n ],\n expected: [{ kind: \"failure\", message: \"fixture-failure\" }],\n },\n {\n name: \"unknown\",\n lines: ['{\"type\":\"future.event\"}', \"invalid-json\"],\n expected: [\n { kind: \"raw\", value: { type: \"future.event\" } },\n { kind: \"raw\", value: \"invalid-json\" },\n ],\n },\n ],\n codex: [\n {\n name: \"turn\",\n lines: [\n '{\"type\":\"thread.started\",\"thread_id\":\"fixture-conversation\"}',\n '{\"type\":\"item.started\",\"item\":{\"type\":\"command_execution\",\"command\":\"fixture-command\"}}',\n '{\"type\":\"item.completed\",\"item\":{\"type\":\"agent_message\",\"text\":\"fixture-result\"}}',\n '{\"type\":\"turn.completed\",\"usage\":{\"input_tokens\":10,\"cached_input_tokens\":2,\"output_tokens\":3}}',\n ],\n expected: [\n { kind: \"conversation\", id: \"fixture-conversation\" },\n { kind: \"tool\", name: \"command\", input: \"fixture-command\" },\n { kind: \"text\", text: \"fixture-result\" },\n { kind: \"usage\", tokens: { input: 10, cached: 2, output: 3 } },\n { kind: \"finished\" },\n ],\n },\n {\n name: \"failure\",\n lines: ['{\"type\":\"turn.failed\",\"error\":{\"message\":\"fixture-failure\"}}'],\n expected: [{ kind: \"failure\", message: \"fixture-failure\" }],\n },\n {\n name: \"unknown\",\n lines: ['{\"type\":\"future.event\"}', \"invalid-json\"],\n expected: [\n { kind: \"raw\", value: { type: \"future.event\" } },\n { kind: \"raw\", value: \"invalid-json\" },\n ],\n },\n ],\n claude: [\n {\n name: \"turn\",\n lines: [\n '{\"type\":\"system\",\"session_id\":\"fixture-conversation\"}',\n '{\"type\":\"assistant\",\"message\":{\"content\":[{\"type\":\"tool_use\",\"name\":\"command\",\"input\":\"fixture-command\"},{\"type\":\"text\",\"text\":\"fixture-result\"}]}}',\n '{\"type\":\"result\",\"result\":\"fixture-result\",\"usage\":{\"input_tokens\":10,\"cache_creation_input_tokens\":1,\"cache_read_input_tokens\":2,\"output_tokens\":3}}',\n ],\n expected: [\n { kind: \"conversation\", id: \"fixture-conversation\" },\n { kind: \"tool\", name: \"command\", input: \"fixture-command\" },\n { kind: \"text\", text: \"fixture-result\" },\n { kind: \"result\", text: \"fixture-result\" },\n {\n kind: \"usage\",\n tokens: { input: 10, cached: 2, cacheCreated: 1, output: 3 },\n },\n { kind: \"finished\" },\n ],\n },\n {\n name: \"failure\",\n lines: ['{\"type\":\"result\",\"is_error\":true,\"result\":\"fixture-failure\"}'],\n expected: [{ kind: \"failure\", message: \"fixture-failure\" }],\n },\n {\n name: \"unknown\",\n lines: ['{\"type\":\"future.event\"}', \"invalid-json\"],\n expected: [\n { kind: \"raw\", value: { type: \"future.event\" } },\n { kind: \"raw\", value: \"invalid-json\" },\n ],\n },\n ],\n};\n"]}
@@ -0,0 +1,6 @@
1
+ import type { AgentEvent } from "../../domain/agent.types.ts";
2
+ export interface AgentProtocolFixture {
3
+ readonly name: string;
4
+ readonly lines: readonly string[];
5
+ readonly expected: readonly AgentEvent[];
6
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=protocol-fixtures.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol-fixtures.types.js","sourceRoot":"","sources":["../../../src/adapters/agents/protocol-fixtures.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AgentEvent } from \"../../domain/agent.types.ts\";\n\nexport interface AgentProtocolFixture {\n readonly name: string;\n readonly lines: readonly string[];\n readonly expected: readonly AgentEvent[];\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  export declare const agentPackages: Readonly<{
2
2
  claude: "@anthropic-ai/claude-code@2.1.280";
3
+ gemini: "@google/gemini-cli@0.61.0";
3
4
  codex: "@openai/codex@0.156.1";
4
5
  }>;
@@ -1,6 +1,7 @@
1
1
  import { agentVersions } from "../providers/versions.js";
2
2
  export const agentPackages = Object.freeze({
3
3
  claude: `@anthropic-ai/claude-code@${agentVersions.claude}`,
4
+ gemini: `@google/gemini-cli@${agentVersions.gemini}`,
4
5
  codex: `@openai/codex@${agentVersions.codex}`,
5
6
  });
6
7
  //# sourceMappingURL=agent-bootstrap.constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-bootstrap.constants.js","sourceRoot":"","sources":["../../src/application/agent-bootstrap.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IACzC,MAAM,EAAE,6BAA6B,aAAa,CAAC,MAAM,EAAE;IAC3D,KAAK,EAAE,iBAAiB,aAAa,CAAC,KAAK,EAAE;CAC9C,CAAC,CAAC","sourcesContent":["import { agentVersions } from \"../providers/versions.ts\";\n\nexport const agentPackages = Object.freeze({\n claude: `@anthropic-ai/claude-code@${agentVersions.claude}`,\n codex: `@openai/codex@${agentVersions.codex}`,\n});\n"]}
1
+ {"version":3,"file":"agent-bootstrap.constants.js","sourceRoot":"","sources":["../../src/application/agent-bootstrap.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IACzC,MAAM,EAAE,6BAA6B,aAAa,CAAC,MAAM,EAAE;IAC3D,MAAM,EAAE,sBAAsB,aAAa,CAAC,MAAM,EAAE;IACpD,KAAK,EAAE,iBAAiB,aAAa,CAAC,KAAK,EAAE;CAC9C,CAAC,CAAC","sourcesContent":["import { agentVersions } from \"../providers/versions.ts\";\n\nexport const agentPackages = Object.freeze({\n claude: `@anthropic-ai/claude-code@${agentVersions.claude}`,\n gemini: `@google/gemini-cli@${agentVersions.gemini}`,\n codex: `@openai/codex@${agentVersions.codex}`,\n});\n"]}
@@ -2,10 +2,14 @@ import { posix } from "node:path";
2
2
  import { invariant } from "../domain/errors.js";
3
3
  import { quote, requireSuccess } from "../infrastructure/process.js";
4
4
  import { agentPackages } from "./agent-bootstrap.constants.js";
5
+ function isBootstrapAgent(name) {
6
+ return Object.hasOwn(agentPackages, name);
7
+ }
5
8
  export async function prepareAdapter(agent, runtime, signal) {
6
- if (!agent.conversations)
9
+ const executable = agent.bootstrap ?? agent.conversations;
10
+ if (!executable)
7
11
  return agent;
8
- const executable = agent.conversations;
12
+ invariant(isBootstrapAgent(executable), `Unknown agent bootstrap: ${executable}`);
9
13
  const cli = agentPackages[executable];
10
14
  const prefix = posix.join(runtime.home, ".outpost-tools"), target = posix.join(prefix, "bin", executable);
11
15
  const installed = await requireSuccess({
@@ -1 +1 @@
1
- {"version":3,"file":"agent-bootstrap.js","sourceRoot":"","sources":["../../src/application/agent-bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,KAAmB,EACnB,OAAqB,EACrB,MAAmB;IAEnB,IAAI,CAAC,KAAK,CAAC,aAAa;QAAE,OAAO,KAAK,CAAC;IACvC,MAAM,UAAU,GAAG,KAAK,CAAC,aAAa,CAAC;IACvC,MAAM,GAAG,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;IACtC,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,EACvD,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;IACjD,MAAM,SAAS,GAAG,MAAM,cAAc,CACpC;QACE,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE;YACT,IAAI;YACJ,iBAAiB,UAAU,qCAAqC,UAAU,kBAAkB,KAAK,CAAC,MAAM,CAAC,yBAAyB,KAAK,CAAC,MAAM,CAAC,kFAAkF,KAAK,CAAC,MAAM,CAAC,IAAI,GAAG,0BAA0B,KAAK,CAAC,MAAM,CAAC,MAAM;SACnS;QACD,MAAM;KACP,EACD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAC7B,CAAC;IACF,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACvC,SAAS,CACP,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAChD,qDAAqD,CACtD,CAAC;IACF,OAAO;QACL,GAAG,KAAK;QACR,OAAO,CAAC,KAAK;YACX,OAAO,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;QACzD,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { posix } from \"node:path\";\nimport type { AgentAdapter } from \"../domain/agent.types.ts\";\nimport { invariant } from \"../domain/errors.ts\";\nimport type { SandboxLease } from \"../domain/sandbox.types.ts\";\nimport { quote, requireSuccess } from \"../infrastructure/process.ts\";\nimport { agentPackages } from \"./agent-bootstrap.constants.ts\";\n\nexport async function prepareAdapter(\n agent: AgentAdapter,\n runtime: SandboxLease,\n signal: AbortSignal,\n): Promise<AgentAdapter> {\n if (!agent.conversations) return agent;\n const executable = agent.conversations;\n const cli = agentPackages[executable];\n const prefix = posix.join(runtime.home, \".outpost-tools\"),\n target = posix.join(prefix, \"bin\", executable);\n const installed = await requireSuccess(\n {\n executable: \"sh\",\n arguments: [\n \"-c\",\n `if command -v ${executable} >/dev/null 2>&1; then command -v ${executable}; elif test -x ${quote(target)}; then printf '%s\\\\n' ${quote(target)}; else npm install --global --allow-scripts=@anthropic-ai/claude-code --prefix ${quote(prefix)} ${cli} >&2 && printf '%s\\\\n' ${quote(target)}; fi`,\n ],\n signal,\n },\n runtime.invoke.bind(runtime),\n );\n const binary = installed.stdout.trim();\n invariant(\n binary.startsWith(\"/\") && !binary.includes(\"\\n\"),\n \"Agent bootstrap returned an invalid executable path\",\n );\n return {\n ...agent,\n request(input) {\n return { ...agent.request(input), executable: binary };\n },\n };\n}\n"]}
1
+ {"version":3,"file":"agent-bootstrap.js","sourceRoot":"","sources":["../../src/application/agent-bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,SAAS,gBAAgB,CAAC,IAAY;IACpC,OAAO,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,KAAmB,EACnB,OAAqB,EACrB,MAAmB;IAEnB,MAAM,UAAU,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,aAAa,CAAC;IAC1D,IAAI,CAAC,UAAU;QAAE,OAAO,KAAK,CAAC;IAC9B,SAAS,CACP,gBAAgB,CAAC,UAAU,CAAC,EAC5B,4BAA4B,UAAU,EAAE,CACzC,CAAC;IACF,MAAM,GAAG,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;IACtC,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,EACvD,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;IACjD,MAAM,SAAS,GAAG,MAAM,cAAc,CACpC;QACE,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE;YACT,IAAI;YACJ,iBAAiB,UAAU,qCAAqC,UAAU,kBAAkB,KAAK,CAAC,MAAM,CAAC,yBAAyB,KAAK,CAAC,MAAM,CAAC,kFAAkF,KAAK,CAAC,MAAM,CAAC,IAAI,GAAG,0BAA0B,KAAK,CAAC,MAAM,CAAC,MAAM;SACnS;QACD,MAAM;KACP,EACD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAC7B,CAAC;IACF,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACvC,SAAS,CACP,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAChD,qDAAqD,CACtD,CAAC;IACF,OAAO;QACL,GAAG,KAAK;QACR,OAAO,CAAC,KAAK;YACX,OAAO,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;QACzD,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { posix } from \"node:path\";\nimport type { AgentAdapter } from \"../domain/agent.types.ts\";\nimport { invariant } from \"../domain/errors.ts\";\nimport type { SandboxLease } from \"../domain/sandbox.types.ts\";\nimport { quote, requireSuccess } from \"../infrastructure/process.ts\";\nimport { agentPackages } from \"./agent-bootstrap.constants.ts\";\n\nfunction isBootstrapAgent(name: string): name is keyof typeof agentPackages {\n return Object.hasOwn(agentPackages, name);\n}\n\nexport async function prepareAdapter(\n agent: AgentAdapter,\n runtime: SandboxLease,\n signal: AbortSignal,\n): Promise<AgentAdapter> {\n const executable = agent.bootstrap ?? agent.conversations;\n if (!executable) return agent;\n invariant(\n isBootstrapAgent(executable),\n `Unknown agent bootstrap: ${executable}`,\n );\n const cli = agentPackages[executable];\n const prefix = posix.join(runtime.home, \".outpost-tools\"),\n target = posix.join(prefix, \"bin\", executable);\n const installed = await requireSuccess(\n {\n executable: \"sh\",\n arguments: [\n \"-c\",\n `if command -v ${executable} >/dev/null 2>&1; then command -v ${executable}; elif test -x ${quote(target)}; then printf '%s\\\\n' ${quote(target)}; else npm install --global --allow-scripts=@anthropic-ai/claude-code --prefix ${quote(prefix)} ${cli} >&2 && printf '%s\\\\n' ${quote(target)}; fi`,\n ],\n signal,\n },\n runtime.invoke.bind(runtime),\n );\n const binary = installed.stdout.trim();\n invariant(\n binary.startsWith(\"/\") && !binary.includes(\"\\n\"),\n \"Agent bootstrap returned an invalid executable path\",\n );\n return {\n ...agent,\n request(input) {\n return { ...agent.request(input), executable: binary };\n },\n };\n}\n"]}