@elie-laloum/outpost 11.1.2 → 11.2.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 (596) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +2 -1
  3. package/SECURITY.md +5 -1
  4. package/dist/adapters/agents/antigravity/antigravity-adapter.js +9 -0
  5. package/dist/adapters/agents/antigravity/antigravity-adapter.js.map +1 -1
  6. package/dist/adapters/agents/antigravity/antigravity-hook-plan.d.ts +3 -0
  7. package/dist/adapters/agents/antigravity/antigravity-hook-plan.js +39 -0
  8. package/dist/adapters/agents/antigravity/antigravity-hook-plan.js.map +1 -0
  9. package/dist/adapters/agents/antigravity/antigravity-hooks.constants.d.ts +3 -0
  10. package/dist/adapters/agents/antigravity/antigravity-hooks.constants.js +394 -0
  11. package/dist/adapters/agents/antigravity/antigravity-hooks.constants.js.map +1 -0
  12. package/dist/adapters/agents/antigravity/antigravity-hooks.d.ts +2 -0
  13. package/dist/adapters/agents/antigravity/antigravity-hooks.js +6 -0
  14. package/dist/adapters/agents/antigravity/antigravity-hooks.js.map +1 -0
  15. package/dist/adapters/agents/antigravity/antigravity-hooks.types.d.ts +114 -0
  16. package/dist/adapters/agents/antigravity/antigravity-hooks.types.js +2 -0
  17. package/dist/adapters/agents/antigravity/antigravity-hooks.types.js.map +1 -0
  18. package/dist/adapters/agents/antigravity/antigravity.types.d.ts +1 -0
  19. package/dist/adapters/agents/antigravity/antigravity.types.js.map +1 -1
  20. package/dist/adapters/agents/authentication.js +1 -0
  21. package/dist/adapters/agents/authentication.js.map +1 -1
  22. package/dist/adapters/agents/claude/claude-adapter.js +15 -0
  23. package/dist/adapters/agents/claude/claude-adapter.js.map +1 -1
  24. package/dist/adapters/agents/claude/claude-hook-plan.constants.d.ts +1 -0
  25. package/dist/adapters/agents/claude/claude-hook-plan.constants.js +20 -0
  26. package/dist/adapters/agents/claude/claude-hook-plan.constants.js.map +1 -0
  27. package/dist/adapters/agents/claude/claude-hook-plan.d.ts +4 -0
  28. package/dist/adapters/agents/claude/claude-hook-plan.js +60 -0
  29. package/dist/adapters/agents/claude/claude-hook-plan.js.map +1 -0
  30. package/dist/adapters/agents/claude/claude-hooks.constants.d.ts +3 -0
  31. package/dist/adapters/agents/claude/claude-hooks.constants.js +2968 -0
  32. package/dist/adapters/agents/claude/claude-hooks.constants.js.map +1 -0
  33. package/dist/adapters/agents/claude/claude-hooks.d.ts +2 -0
  34. package/dist/adapters/agents/claude/claude-hooks.js +6 -0
  35. package/dist/adapters/agents/claude/claude-hooks.js.map +1 -0
  36. package/dist/adapters/agents/claude/claude-hooks.types.d.ts +900 -0
  37. package/dist/adapters/agents/claude/claude-hooks.types.js +2 -0
  38. package/dist/adapters/agents/claude/claude-hooks.types.js.map +1 -0
  39. package/dist/adapters/agents/claude/claude-profile.d.ts +1 -0
  40. package/dist/adapters/agents/claude/claude-profile.js +23 -11
  41. package/dist/adapters/agents/claude/claude-profile.js.map +1 -1
  42. package/dist/adapters/agents/codex/codex-adapter.js +17 -1
  43. package/dist/adapters/agents/codex/codex-adapter.js.map +1 -1
  44. package/dist/adapters/agents/codex/codex-authentication.js +1 -0
  45. package/dist/adapters/agents/codex/codex-authentication.js.map +1 -1
  46. package/dist/adapters/agents/codex/codex-conversations.constants.d.ts +1 -0
  47. package/dist/adapters/agents/codex/codex-conversations.constants.js +2 -0
  48. package/dist/adapters/agents/codex/codex-conversations.constants.js.map +1 -0
  49. package/dist/adapters/agents/codex/codex-conversations.js +8 -5
  50. package/dist/adapters/agents/codex/codex-conversations.js.map +1 -1
  51. package/dist/adapters/agents/codex/codex-hook-plan.d.ts +3 -0
  52. package/dist/adapters/agents/codex/codex-hook-plan.js +72 -0
  53. package/dist/adapters/agents/codex/codex-hook-plan.js.map +1 -0
  54. package/dist/adapters/agents/codex/codex-hooks.constants.d.ts +3 -0
  55. package/dist/adapters/agents/codex/codex-hooks.constants.js +942 -0
  56. package/dist/adapters/agents/codex/codex-hooks.constants.js.map +1 -0
  57. package/dist/adapters/agents/codex/codex-hooks.d.ts +2 -0
  58. package/dist/adapters/agents/codex/codex-hooks.js +6 -0
  59. package/dist/adapters/agents/codex/codex-hooks.js.map +1 -0
  60. package/dist/adapters/agents/codex/codex-hooks.types.d.ts +255 -0
  61. package/dist/adapters/agents/codex/codex-hooks.types.js +2 -0
  62. package/dist/adapters/agents/codex/codex-hooks.types.js.map +1 -0
  63. package/dist/adapters/agents/codex/codex-provider.js +2 -2
  64. package/dist/adapters/agents/codex/codex-provider.js.map +1 -1
  65. package/dist/adapters/agents/copilot/copilot-adapter.js +14 -0
  66. package/dist/adapters/agents/copilot/copilot-adapter.js.map +1 -1
  67. package/dist/adapters/agents/copilot/copilot-hook-plan.d.ts +3 -0
  68. package/dist/adapters/agents/copilot/copilot-hook-plan.js +26 -0
  69. package/dist/adapters/agents/copilot/copilot-hook-plan.js.map +1 -0
  70. package/dist/adapters/agents/copilot/copilot-hooks.constants.d.ts +3 -0
  71. package/dist/adapters/agents/copilot/copilot-hooks.constants.js +528 -0
  72. package/dist/adapters/agents/copilot/copilot-hooks.constants.js.map +1 -0
  73. package/dist/adapters/agents/copilot/copilot-hooks.d.ts +2 -0
  74. package/dist/adapters/agents/copilot/copilot-hooks.js +6 -0
  75. package/dist/adapters/agents/copilot/copilot-hooks.js.map +1 -0
  76. package/dist/adapters/agents/copilot/copilot-hooks.types.d.ts +166 -0
  77. package/dist/adapters/agents/copilot/copilot-hooks.types.js +2 -0
  78. package/dist/adapters/agents/copilot/copilot-hooks.types.js.map +1 -0
  79. package/dist/adapters/agents/copilot/copilot.types.d.ts +1 -0
  80. package/dist/adapters/agents/copilot/copilot.types.js.map +1 -1
  81. package/dist/adapters/agents/hook-groups.d.ts +2 -0
  82. package/dist/adapters/agents/hook-groups.js +17 -0
  83. package/dist/adapters/agents/hook-groups.js.map +1 -0
  84. package/dist/adapters/agents/kimi/kimi-adapter.js +16 -1
  85. package/dist/adapters/agents/kimi/kimi-adapter.js.map +1 -1
  86. package/dist/adapters/agents/kimi/kimi-hook-plan.d.ts +3 -0
  87. package/dist/adapters/agents/kimi/kimi-hook-plan.js +33 -0
  88. package/dist/adapters/agents/kimi/kimi-hook-plan.js.map +1 -0
  89. package/dist/adapters/agents/kimi/kimi-hooks.constants.d.ts +3 -0
  90. package/dist/adapters/agents/kimi/kimi-hooks.constants.js +747 -0
  91. package/dist/adapters/agents/kimi/kimi-hooks.constants.js.map +1 -0
  92. package/dist/adapters/agents/kimi/kimi-hooks.d.ts +2 -0
  93. package/dist/adapters/agents/kimi/kimi-hooks.js +6 -0
  94. package/dist/adapters/agents/kimi/kimi-hooks.js.map +1 -0
  95. package/dist/adapters/agents/kimi/kimi-hooks.types.d.ts +226 -0
  96. package/dist/adapters/agents/kimi/kimi-hooks.types.js +2 -0
  97. package/dist/adapters/agents/kimi/kimi-hooks.types.js.map +1 -0
  98. package/dist/adapters/agents/kimi/kimi-request.js +2 -0
  99. package/dist/adapters/agents/kimi/kimi-request.js.map +1 -1
  100. package/dist/adapters/agents/kimi/kimi.constants.d.ts +1 -0
  101. package/dist/adapters/agents/kimi/kimi.constants.js +1 -0
  102. package/dist/adapters/agents/kimi/kimi.constants.js.map +1 -1
  103. package/dist/adapters/agents/kimi/kimi.types.d.ts +1 -0
  104. package/dist/adapters/agents/kimi/kimi.types.js.map +1 -1
  105. package/dist/adapters/agents/native-hooks.d.ts +4 -0
  106. package/dist/adapters/agents/native-hooks.js +63 -0
  107. package/dist/adapters/agents/native-hooks.js.map +1 -0
  108. package/dist/adapters/agents/native-hooks.types.d.ts +22 -0
  109. package/dist/adapters/agents/native-hooks.types.js +2 -0
  110. package/dist/adapters/agents/native-hooks.types.js.map +1 -0
  111. package/dist/adapters/agents/settings.types.d.ts +2 -0
  112. package/dist/adapters/agents/settings.types.js.map +1 -1
  113. package/dist/adapters/decisions/system-one-provider.constants.d.ts +1 -1
  114. package/dist/adapters/decisions/system-one-provider.constants.js +1 -1
  115. package/dist/adapters/decisions/system-one-provider.constants.js.map +1 -1
  116. package/dist/adapters/decisions/system-one-provider.js +8 -21
  117. package/dist/adapters/decisions/system-one-provider.js.map +1 -1
  118. package/dist/adapters/models/anthropic-model-provider.constants.d.ts +1 -0
  119. package/dist/adapters/models/anthropic-model-provider.constants.js +4 -0
  120. package/dist/adapters/models/anthropic-model-provider.constants.js.map +1 -1
  121. package/dist/adapters/models/anthropic-model-provider.js +7 -1
  122. package/dist/adapters/models/anthropic-model-provider.js.map +1 -1
  123. package/dist/adapters/models/http-failure.d.ts +3 -0
  124. package/dist/adapters/models/http-failure.js +43 -0
  125. package/dist/adapters/models/http-failure.js.map +1 -0
  126. package/dist/adapters/models/http-provider.js +14 -20
  127. package/dist/adapters/models/http-provider.js.map +1 -1
  128. package/dist/adapters/models/model-protocol.types.d.ts +1 -0
  129. package/dist/adapters/models/model-protocol.types.js.map +1 -1
  130. package/dist/adapters/models/model.constants.d.ts +2 -0
  131. package/dist/adapters/models/model.constants.js +17 -0
  132. package/dist/adapters/models/model.constants.js.map +1 -1
  133. package/dist/adapters/models/openai-chat-stream.js +3 -1
  134. package/dist/adapters/models/openai-chat-stream.js.map +1 -1
  135. package/dist/adapters/models/openai-responses.js +4 -0
  136. package/dist/adapters/models/openai-responses.js.map +1 -1
  137. package/dist/adapters/secrets/aws.js +5 -4
  138. package/dist/adapters/secrets/aws.js.map +1 -1
  139. package/dist/adapters/secrets/azure.constants.d.ts +1 -0
  140. package/dist/adapters/secrets/azure.constants.js +2 -0
  141. package/dist/adapters/secrets/azure.constants.js.map +1 -0
  142. package/dist/adapters/secrets/azure.js +2 -1
  143. package/dist/adapters/secrets/azure.js.map +1 -1
  144. package/dist/adapters/secrets/gcp.constants.d.ts +1 -0
  145. package/dist/adapters/secrets/gcp.constants.js +2 -0
  146. package/dist/adapters/secrets/gcp.constants.js.map +1 -0
  147. package/dist/adapters/secrets/gcp.js +11 -9
  148. package/dist/adapters/secrets/gcp.js.map +1 -1
  149. package/dist/adapters/secrets/infisical.js +3 -2
  150. package/dist/adapters/secrets/infisical.js.map +1 -1
  151. package/dist/adapters/secrets/onepassword.constants.d.ts +1 -0
  152. package/dist/adapters/secrets/onepassword.constants.js +2 -0
  153. package/dist/adapters/secrets/onepassword.constants.js.map +1 -0
  154. package/dist/adapters/secrets/onepassword.js +2 -1
  155. package/dist/adapters/secrets/onepassword.js.map +1 -1
  156. package/dist/adapters/secrets/secret-source.js +3 -1
  157. package/dist/adapters/secrets/secret-source.js.map +1 -1
  158. package/dist/adapters/secrets/vault-response.js +5 -5
  159. package/dist/adapters/secrets/vault-response.js.map +1 -1
  160. package/dist/adapters/secrets/vault.js +4 -3
  161. package/dist/adapters/secrets/vault.js.map +1 -1
  162. package/dist/adapters/testing/scripted-agent.d.ts +3 -1
  163. package/dist/adapters/testing/scripted-agent.js +3 -1
  164. package/dist/adapters/testing/scripted-agent.js.map +1 -1
  165. package/dist/adapters/tools/edit-tools.js +3 -3
  166. package/dist/adapters/tools/edit-tools.js.map +1 -1
  167. package/dist/adapters/tools/git-tools.js +16 -1
  168. package/dist/adapters/tools/git-tools.js.map +1 -1
  169. package/dist/adapters/tools/mcp-launcher.constants.d.ts +1 -1
  170. package/dist/adapters/tools/mcp-launcher.constants.js +29 -7
  171. package/dist/adapters/tools/mcp-launcher.constants.js.map +1 -1
  172. package/dist/adapters/tools/mcp-resources.js +5 -1
  173. package/dist/adapters/tools/mcp-resources.js.map +1 -1
  174. package/dist/adapters/tools/mcp.constants.d.ts +0 -6
  175. package/dist/adapters/tools/mcp.constants.js +0 -6
  176. package/dist/adapters/tools/mcp.constants.js.map +1 -1
  177. package/dist/adapters/tools/mcp.js +1 -0
  178. package/dist/adapters/tools/mcp.js.map +1 -1
  179. package/dist/adapters/tools/sandbox-files.constants.d.ts +1 -0
  180. package/dist/adapters/tools/sandbox-files.constants.js +17 -0
  181. package/dist/adapters/tools/sandbox-files.constants.js.map +1 -0
  182. package/dist/adapters/tools/sandbox-files.d.ts +1 -0
  183. package/dist/adapters/tools/sandbox-files.js +14 -1
  184. package/dist/adapters/tools/sandbox-files.js.map +1 -1
  185. package/dist/adapters/tools/tools.constants.js +1 -0
  186. package/dist/adapters/tools/tools.constants.js.map +1 -1
  187. package/dist/adapters/triggers/github-webhook.js +14 -11
  188. package/dist/adapters/triggers/github-webhook.js.map +1 -1
  189. package/dist/adapters/triggers/gitlab-webhook.js +16 -13
  190. package/dist/adapters/triggers/gitlab-webhook.js.map +1 -1
  191. package/dist/adapters/triggers/slack-request.js +10 -7
  192. package/dist/adapters/triggers/slack-request.js.map +1 -1
  193. package/dist/adapters/triggers/standard-webhook.js +10 -7
  194. package/dist/adapters/triggers/standard-webhook.js.map +1 -1
  195. package/dist/application/agent-authentication.js +4 -1
  196. package/dist/application/agent-authentication.js.map +1 -1
  197. package/dist/application/agent-turn.js +20 -5
  198. package/dist/application/agent-turn.js.map +1 -1
  199. package/dist/application/cli-hooks.constants.d.ts +2 -0
  200. package/dist/application/cli-hooks.constants.js +69 -0
  201. package/dist/application/cli-hooks.constants.js.map +1 -0
  202. package/dist/application/cli-hooks.d.ts +3 -0
  203. package/dist/application/cli-hooks.js +168 -0
  204. package/dist/application/cli-hooks.js.map +1 -0
  205. package/dist/application/cli-steering.js +33 -2
  206. package/dist/application/cli-steering.js.map +1 -1
  207. package/dist/application/custom-turn.js +10 -1
  208. package/dist/application/custom-turn.js.map +1 -1
  209. package/dist/application/diagnostic-probe.d.ts +1 -1
  210. package/dist/application/diagnostic-probe.js +7 -3
  211. package/dist/application/diagnostic-probe.js.map +1 -1
  212. package/dist/application/dispatch-observation.js +4 -0
  213. package/dist/application/dispatch-observation.js.map +1 -1
  214. package/dist/application/doctor-agent.d.ts +1 -1
  215. package/dist/application/doctor-agent.js +2 -2
  216. package/dist/application/doctor-agent.js.map +1 -1
  217. package/dist/application/doctor-deadline.d.ts +1 -0
  218. package/dist/application/doctor-deadline.js +10 -0
  219. package/dist/application/doctor-deadline.js.map +1 -0
  220. package/dist/application/doctor-image.js +9 -7
  221. package/dist/application/doctor-image.js.map +1 -1
  222. package/dist/application/doctor-sandbox.js +4 -4
  223. package/dist/application/doctor-sandbox.js.map +1 -1
  224. package/dist/application/doctor.constants.d.ts +2 -0
  225. package/dist/application/doctor.constants.js +2 -0
  226. package/dist/application/doctor.constants.js.map +1 -1
  227. package/dist/application/doctor.js +12 -8
  228. package/dist/application/doctor.js.map +1 -1
  229. package/dist/application/doctor.types.d.ts +2 -0
  230. package/dist/application/doctor.types.js.map +1 -1
  231. package/dist/application/file-sandbox.js +49 -11
  232. package/dist/application/file-sandbox.js.map +1 -1
  233. package/dist/application/harness-context.js +4 -2
  234. package/dist/application/harness-context.js.map +1 -1
  235. package/dist/application/harness-hook-transforms.d.ts +8 -0
  236. package/dist/application/harness-hook-transforms.js +115 -0
  237. package/dist/application/harness-hook-transforms.js.map +1 -0
  238. package/dist/application/harness-hooks.d.ts +5 -3
  239. package/dist/application/harness-hooks.js +37 -50
  240. package/dist/application/harness-hooks.js.map +1 -1
  241. package/dist/application/harness-loop.d.ts +2 -1
  242. package/dist/application/harness-loop.js +95 -21
  243. package/dist/application/harness-loop.js.map +1 -1
  244. package/dist/application/harness-subagent.d.ts +1 -1
  245. package/dist/application/harness-subagent.js +63 -12
  246. package/dist/application/harness-subagent.js.map +1 -1
  247. package/dist/application/harness.types.d.ts +3 -0
  248. package/dist/application/harness.types.js.map +1 -1
  249. package/dist/application/hook-invocation.d.ts +4 -0
  250. package/dist/application/hook-invocation.js +59 -0
  251. package/dist/application/hook-invocation.js.map +1 -0
  252. package/dist/application/queue-worker.js +51 -9
  253. package/dist/application/queue-worker.js.map +1 -1
  254. package/dist/application/queue-worker.types.d.ts +1 -0
  255. package/dist/application/queue-worker.types.js.map +1 -1
  256. package/dist/application/recipes/native-schemas.constants.js +1439 -218
  257. package/dist/application/recipes/native-schemas.constants.js.map +1 -1
  258. package/dist/application/recovery-inspection.js +4 -1
  259. package/dist/application/recovery-inspection.js.map +1 -1
  260. package/dist/application/remote-download.js +15 -5
  261. package/dist/application/remote-download.js.map +1 -1
  262. package/dist/application/remote-paths.d.ts +1 -0
  263. package/dist/application/remote-paths.js +7 -0
  264. package/dist/application/remote-paths.js.map +1 -0
  265. package/dist/application/remote-validation.js +40 -9
  266. package/dist/application/remote-validation.js.map +1 -1
  267. package/dist/application/remote-workspace.js +17 -2
  268. package/dist/application/remote-workspace.js.map +1 -1
  269. package/dist/application/repetition-watchdog.js +3 -1
  270. package/dist/application/repetition-watchdog.js.map +1 -1
  271. package/dist/application/sandbox-attach.js +38 -9
  272. package/dist/application/sandbox-attach.js.map +1 -1
  273. package/dist/application/sandbox-dispatch.js +7 -1
  274. package/dist/application/sandbox-dispatch.js.map +1 -1
  275. package/dist/application/schedules.js +2 -0
  276. package/dist/application/schedules.js.map +1 -1
  277. package/dist/application/secrets.js +4 -0
  278. package/dist/application/secrets.js.map +1 -1
  279. package/dist/application/tool-execution.js +28 -8
  280. package/dist/application/tool-execution.js.map +1 -1
  281. package/dist/application/transport-retention.js +3 -3
  282. package/dist/application/transport-retention.js.map +1 -1
  283. package/dist/application/workspace-fingerprint.d.ts +1 -0
  284. package/dist/application/workspace-fingerprint.js +19 -4
  285. package/dist/application/workspace-fingerprint.js.map +1 -1
  286. package/dist/cli/doctor-command.js +12 -2
  287. package/dist/cli/doctor-command.js.map +1 -1
  288. package/dist/cli/image.js +2 -0
  289. package/dist/cli/image.js.map +1 -1
  290. package/dist/cli/main.constants.d.ts +14 -2
  291. package/dist/cli/main.constants.js +27 -1
  292. package/dist/cli/main.constants.js.map +1 -1
  293. package/dist/cli/project-settings.js +7 -1
  294. package/dist/cli/project-settings.js.map +1 -1
  295. package/dist/cli/recipe-yaml.js +8 -0
  296. package/dist/cli/recipe-yaml.js.map +1 -1
  297. package/dist/cli/recovery-command.js +3 -0
  298. package/dist/cli/recovery-command.js.map +1 -1
  299. package/dist/cli/recovery-unlock-command.d.ts +2 -0
  300. package/dist/cli/recovery-unlock-command.js +19 -0
  301. package/dist/cli/recovery-unlock-command.js.map +1 -0
  302. package/dist/cli/scaffold-files.js +4 -1
  303. package/dist/cli/scaffold-files.js.map +1 -1
  304. package/dist/cli/scaffold-validation.js +3 -0
  305. package/dist/cli/scaffold-validation.js.map +1 -1
  306. package/dist/cli/scaffold.js +2 -0
  307. package/dist/cli/scaffold.js.map +1 -1
  308. package/dist/domain/agent-hook.types.d.ts +28 -0
  309. package/dist/domain/agent-hook.types.js +2 -0
  310. package/dist/domain/agent-hook.types.js.map +1 -0
  311. package/dist/domain/agent-profile-hooks.d.ts +2 -0
  312. package/dist/domain/agent-profile-hooks.js +52 -0
  313. package/dist/domain/agent-profile-hooks.js.map +1 -0
  314. package/dist/domain/agent-profile-permissions.js +11 -1
  315. package/dist/domain/agent-profile-permissions.js.map +1 -1
  316. package/dist/domain/agent-profile.constants.d.ts +1 -0
  317. package/dist/domain/agent-profile.constants.js +9 -0
  318. package/dist/domain/agent-profile.constants.js.map +1 -1
  319. package/dist/domain/agent-profile.js +6 -1
  320. package/dist/domain/agent-profile.js.map +1 -1
  321. package/dist/domain/agent-profile.types.d.ts +11 -0
  322. package/dist/domain/agent-profile.types.js.map +1 -1
  323. package/dist/domain/agent.types.d.ts +2 -0
  324. package/dist/domain/agent.types.js.map +1 -1
  325. package/dist/domain/container-image.d.ts +1 -0
  326. package/dist/domain/container-image.js +8 -0
  327. package/dist/domain/container-image.js.map +1 -0
  328. package/dist/domain/context.constants.d.ts +1 -0
  329. package/dist/domain/context.constants.js +1 -0
  330. package/dist/domain/context.constants.js.map +1 -1
  331. package/dist/domain/context.js +6 -1
  332. package/dist/domain/context.js.map +1 -1
  333. package/dist/domain/egress.js +6 -1
  334. package/dist/domain/egress.js.map +1 -1
  335. package/dist/domain/glob.js +1 -1
  336. package/dist/domain/glob.js.map +1 -1
  337. package/dist/domain/harness.js +4 -1
  338. package/dist/domain/harness.js.map +1 -1
  339. package/dist/domain/hook-command.d.ts +2 -0
  340. package/dist/domain/hook-command.js +26 -0
  341. package/dist/domain/hook-command.js.map +1 -0
  342. package/dist/domain/hook-command.types.d.ts +7 -0
  343. package/dist/domain/hook-command.types.js +2 -0
  344. package/dist/domain/hook-command.types.js.map +1 -0
  345. package/dist/domain/hook-decision.d.ts +2 -0
  346. package/dist/domain/hook-decision.js +38 -0
  347. package/dist/domain/hook-decision.js.map +1 -0
  348. package/dist/domain/hook.constants.d.ts +3 -0
  349. package/dist/domain/hook.constants.js +31 -1
  350. package/dist/domain/hook.constants.js.map +1 -1
  351. package/dist/domain/hook.js +49 -5
  352. package/dist/domain/hook.js.map +1 -1
  353. package/dist/domain/hook.types.d.ts +82 -5
  354. package/dist/domain/hook.types.js.map +1 -1
  355. package/dist/domain/mcp-server.constants.d.ts +6 -0
  356. package/dist/domain/mcp-server.constants.js +6 -0
  357. package/dist/domain/mcp-server.constants.js.map +1 -1
  358. package/dist/domain/mcp-server.js +1 -0
  359. package/dist/domain/mcp-server.js.map +1 -1
  360. package/dist/domain/permissions.types.d.ts +1 -0
  361. package/dist/domain/permissions.types.js.map +1 -1
  362. package/dist/domain/pricing.js +4 -2
  363. package/dist/domain/pricing.js.map +1 -1
  364. package/dist/domain/redaction.js +6 -3
  365. package/dist/domain/redaction.js.map +1 -1
  366. package/dist/domain/secret-fault.d.ts +4 -0
  367. package/dist/domain/secret-fault.js +11 -0
  368. package/dist/domain/secret-fault.js.map +1 -0
  369. package/dist/domain/secrets.js +3 -2
  370. package/dist/domain/secrets.js.map +1 -1
  371. package/dist/domain/steering.js +2 -0
  372. package/dist/domain/steering.js.map +1 -1
  373. package/dist/domain/steering.types.d.ts +1 -1
  374. package/dist/domain/steering.types.js.map +1 -1
  375. package/dist/domain/transport.js +5 -1
  376. package/dist/domain/transport.js.map +1 -1
  377. package/dist/domain/trigger-payload.d.ts +4 -0
  378. package/dist/domain/trigger-payload.js +15 -0
  379. package/dist/domain/trigger-payload.js.map +1 -0
  380. package/dist/domain/workflow/checkpoint.js +19 -2
  381. package/dist/domain/workflow/checkpoint.js.map +1 -1
  382. package/dist/domain/workflow/retry.constants.d.ts +1 -0
  383. package/dist/domain/workflow/retry.constants.js +1 -0
  384. package/dist/domain/workflow/retry.constants.js.map +1 -1
  385. package/dist/domain/workflow/retry.js +6 -2
  386. package/dist/domain/workflow/retry.js.map +1 -1
  387. package/dist/domain/workflow/task-runner.js +5 -3
  388. package/dist/domain/workflow/task-runner.js.map +1 -1
  389. package/dist/domain/workflow/workflow-state.js +2 -1
  390. package/dist/domain/workflow/workflow-state.js.map +1 -1
  391. package/dist/domain/workflow.types.d.ts +1 -0
  392. package/dist/domain/workflow.types.js.map +1 -1
  393. package/dist/index.d.ts +15 -1
  394. package/dist/index.js +6 -0
  395. package/dist/index.js.map +1 -1
  396. package/dist/infrastructure/conversations/transcript-store.js +32 -5
  397. package/dist/infrastructure/conversations/transcript-store.js.map +1 -1
  398. package/dist/infrastructure/files.d.ts +1 -0
  399. package/dist/infrastructure/files.js +8 -4
  400. package/dist/infrastructure/files.js.map +1 -1
  401. package/dist/infrastructure/git/integration-candidate.js +3 -2
  402. package/dist/infrastructure/git/integration-candidate.js.map +1 -1
  403. package/dist/infrastructure/git/lock-recovery.d.ts +3 -0
  404. package/dist/infrastructure/git/lock-recovery.js +58 -0
  405. package/dist/infrastructure/git/lock-recovery.js.map +1 -0
  406. package/dist/infrastructure/git/lock-recovery.types.d.ts +11 -0
  407. package/dist/infrastructure/git/lock-recovery.types.js +2 -0
  408. package/dist/infrastructure/git/lock-recovery.types.js.map +1 -0
  409. package/dist/infrastructure/git/managed-worktree.js +5 -8
  410. package/dist/infrastructure/git/managed-worktree.js.map +1 -1
  411. package/dist/infrastructure/git/verification-command.js +35 -30
  412. package/dist/infrastructure/git/verification-command.js.map +1 -1
  413. package/dist/infrastructure/git/workspace-lease.js +12 -5
  414. package/dist/infrastructure/git/workspace-lease.js.map +1 -1
  415. package/dist/infrastructure/hook-configuration.constants.d.ts +1 -0
  416. package/dist/infrastructure/hook-configuration.constants.js +59 -0
  417. package/dist/infrastructure/hook-configuration.constants.js.map +1 -0
  418. package/dist/infrastructure/hook-configuration.d.ts +3 -0
  419. package/dist/infrastructure/hook-configuration.js +16 -0
  420. package/dist/infrastructure/hook-configuration.js.map +1 -0
  421. package/dist/infrastructure/hook-configuration.types.d.ts +14 -0
  422. package/dist/infrastructure/hook-configuration.types.js +2 -0
  423. package/dist/infrastructure/hook-configuration.types.js.map +1 -0
  424. package/dist/infrastructure/http-transport.constants.d.ts +1 -0
  425. package/dist/infrastructure/http-transport.constants.js +14 -0
  426. package/dist/infrastructure/http-transport.constants.js.map +1 -0
  427. package/dist/infrastructure/http-transport.d.ts +7 -0
  428. package/dist/infrastructure/http-transport.js +19 -0
  429. package/dist/infrastructure/http-transport.js.map +1 -0
  430. package/dist/infrastructure/input-failure.d.ts +4 -0
  431. package/dist/infrastructure/input-failure.js +14 -0
  432. package/dist/infrastructure/input-failure.js.map +1 -0
  433. package/dist/infrastructure/inspection-file.d.ts +1 -0
  434. package/dist/infrastructure/inspection-file.js +8 -2
  435. package/dist/infrastructure/inspection-file.js.map +1 -1
  436. package/dist/infrastructure/local-transport.js +16 -11
  437. package/dist/infrastructure/local-transport.js.map +1 -1
  438. package/dist/infrastructure/process.constants.d.ts +1 -0
  439. package/dist/infrastructure/process.constants.js +1 -0
  440. package/dist/infrastructure/process.constants.js.map +1 -1
  441. package/dist/infrastructure/process.d.ts +1 -0
  442. package/dist/infrastructure/process.js +48 -8
  443. package/dist/infrastructure/process.js.map +1 -1
  444. package/dist/infrastructure/reservation-ledger.d.ts +2 -0
  445. package/dist/infrastructure/reservation-ledger.js +84 -0
  446. package/dist/infrastructure/reservation-ledger.js.map +1 -0
  447. package/dist/infrastructure/reservation-recovery.d.ts +4 -0
  448. package/dist/infrastructure/reservation-recovery.js +28 -0
  449. package/dist/infrastructure/reservation-recovery.js.map +1 -0
  450. package/dist/infrastructure/s3-tombstones.d.ts +3 -0
  451. package/dist/infrastructure/s3-tombstones.js +46 -0
  452. package/dist/infrastructure/s3-tombstones.js.map +1 -0
  453. package/dist/infrastructure/s3-tombstones.types.d.ts +6 -0
  454. package/dist/infrastructure/s3-tombstones.types.js +2 -0
  455. package/dist/infrastructure/s3-tombstones.types.js.map +1 -0
  456. package/dist/infrastructure/s3-transport.d.ts +2 -0
  457. package/dist/infrastructure/s3-transport.js +4 -2
  458. package/dist/infrastructure/s3-transport.js.map +1 -1
  459. package/dist/infrastructure/sse.js +6 -3
  460. package/dist/infrastructure/sse.js.map +1 -1
  461. package/dist/infrastructure/task-queue-bullmq-connection.d.ts +3 -0
  462. package/dist/infrastructure/task-queue-bullmq-connection.js +32 -0
  463. package/dist/infrastructure/task-queue-bullmq-connection.js.map +1 -0
  464. package/dist/infrastructure/task-queue-bullmq-connection.types.d.ts +8 -0
  465. package/dist/infrastructure/task-queue-bullmq-connection.types.js +2 -0
  466. package/dist/infrastructure/task-queue-bullmq-connection.types.js.map +1 -0
  467. package/dist/infrastructure/task-queue-bullmq-resources.js +21 -15
  468. package/dist/infrastructure/task-queue-bullmq-resources.js.map +1 -1
  469. package/dist/infrastructure/task-queue-bullmq-state.d.ts +1 -0
  470. package/dist/infrastructure/task-queue-bullmq-state.js +1 -0
  471. package/dist/infrastructure/task-queue-bullmq-state.js.map +1 -1
  472. package/dist/infrastructure/task-queue-bullmq.constants.d.ts +2 -1
  473. package/dist/infrastructure/task-queue-bullmq.constants.js +2 -1
  474. package/dist/infrastructure/task-queue-bullmq.constants.js.map +1 -1
  475. package/dist/infrastructure/task-queue-bullmq.js +10 -1
  476. package/dist/infrastructure/task-queue-bullmq.js.map +1 -1
  477. package/dist/infrastructure/task-queue.js +13 -4
  478. package/dist/infrastructure/task-queue.js.map +1 -1
  479. package/dist/infrastructure/transfer-copy.d.ts +1 -0
  480. package/dist/infrastructure/transfer-copy.js +16 -1
  481. package/dist/infrastructure/transfer-copy.js.map +1 -1
  482. package/dist/infrastructure/transport-archive.d.ts +3 -3
  483. package/dist/infrastructure/transport-archive.js +71 -48
  484. package/dist/infrastructure/transport-archive.js.map +1 -1
  485. package/dist/infrastructure/transport-archive.types.d.ts +3 -0
  486. package/dist/infrastructure/transport-archive.types.js.map +1 -1
  487. package/dist/infrastructure/transport-checkpoint.js +14 -4
  488. package/dist/infrastructure/transport-checkpoint.js.map +1 -1
  489. package/dist/infrastructure/transport-envelope.d.ts +1 -0
  490. package/dist/infrastructure/transport-envelope.js +22 -5
  491. package/dist/infrastructure/transport-envelope.js.map +1 -1
  492. package/dist/infrastructure/transport-reservations.constants.d.ts +2 -0
  493. package/dist/infrastructure/transport-reservations.constants.js +3 -0
  494. package/dist/infrastructure/transport-reservations.constants.js.map +1 -0
  495. package/dist/infrastructure/transport-reservations.d.ts +1 -2
  496. package/dist/infrastructure/transport-reservations.js +18 -22
  497. package/dist/infrastructure/transport-reservations.js.map +1 -1
  498. package/dist/infrastructure/transport-reservations.types.d.ts +23 -2
  499. package/dist/infrastructure/transport-reservations.types.js.map +1 -1
  500. package/dist/infrastructure/trigger-server.js +12 -9
  501. package/dist/infrastructure/trigger-server.js.map +1 -1
  502. package/dist/infrastructure/trigger-server.types.d.ts +1 -1
  503. package/dist/infrastructure/trigger-server.types.js.map +1 -1
  504. package/dist/infrastructure/workflow-checkpoint.constants.d.ts +1 -0
  505. package/dist/infrastructure/workflow-checkpoint.constants.js +1 -0
  506. package/dist/infrastructure/workflow-checkpoint.constants.js.map +1 -1
  507. package/dist/infrastructure/workspace-lock.constants.d.ts +2 -1
  508. package/dist/infrastructure/workspace-lock.constants.js +2 -1
  509. package/dist/infrastructure/workspace-lock.constants.js.map +1 -1
  510. package/dist/infrastructure/workspace-lock.js +48 -10
  511. package/dist/infrastructure/workspace-lock.js.map +1 -1
  512. package/dist/providers/cloud-cache.js +14 -9
  513. package/dist/providers/cloud-cache.js.map +1 -1
  514. package/dist/providers/cloud-cache.types.d.ts +1 -0
  515. package/dist/providers/cloud-cache.types.js.map +1 -1
  516. package/dist/providers/cloud-files.js +3 -4
  517. package/dist/providers/cloud-files.js.map +1 -1
  518. package/dist/providers/cloud-input.constants.d.ts +2 -2
  519. package/dist/providers/cloud-input.constants.js +2 -1
  520. package/dist/providers/cloud-input.constants.js.map +1 -1
  521. package/dist/providers/cloud-input.d.ts +2 -2
  522. package/dist/providers/cloud-input.js +14 -3
  523. package/dist/providers/cloud-input.js.map +1 -1
  524. package/dist/providers/container-command.js +30 -5
  525. package/dist/providers/container-command.js.map +1 -1
  526. package/dist/providers/container-egress.constants.d.ts +7 -0
  527. package/dist/providers/container-egress.constants.js +8 -0
  528. package/dist/providers/container-egress.constants.js.map +1 -0
  529. package/dist/providers/container-egress.d.ts +7 -0
  530. package/dist/providers/container-egress.js +101 -0
  531. package/dist/providers/container-egress.js.map +1 -0
  532. package/dist/providers/container-files.js +10 -11
  533. package/dist/providers/container-files.js.map +1 -1
  534. package/dist/providers/container-mounts.js +3 -0
  535. package/dist/providers/container-mounts.js.map +1 -1
  536. package/dist/providers/container-network.js +16 -1
  537. package/dist/providers/container-network.js.map +1 -1
  538. package/dist/providers/container-plan.js +7 -10
  539. package/dist/providers/container-plan.js.map +1 -1
  540. package/dist/providers/container-recovery.js +8 -3
  541. package/dist/providers/container-recovery.js.map +1 -1
  542. package/dist/providers/container.js +36 -5
  543. package/dist/providers/container.js.map +1 -1
  544. package/dist/providers/container.types.d.ts +1 -0
  545. package/dist/providers/container.types.js.map +1 -1
  546. package/dist/providers/daytona-command.constants.js +4 -1
  547. package/dist/providers/daytona-command.constants.js.map +1 -1
  548. package/dist/providers/daytona-command.js +39 -16
  549. package/dist/providers/daytona-command.js.map +1 -1
  550. package/dist/providers/daytona-files.js +5 -5
  551. package/dist/providers/daytona-files.js.map +1 -1
  552. package/dist/providers/daytona-output.js +11 -3
  553. package/dist/providers/daytona-output.js.map +1 -1
  554. package/dist/providers/daytona.js +11 -9
  555. package/dist/providers/daytona.js.map +1 -1
  556. package/dist/providers/egress/address.d.ts +3 -0
  557. package/dist/providers/egress/address.js +26 -0
  558. package/dist/providers/egress/address.js.map +1 -0
  559. package/dist/providers/egress/egress.constants.d.ts +22 -0
  560. package/dist/providers/egress/egress.constants.js +23 -0
  561. package/dist/providers/egress/egress.constants.js.map +1 -0
  562. package/dist/providers/egress/egress.types.d.ts +11 -0
  563. package/dist/providers/egress/egress.types.js +2 -0
  564. package/dist/providers/egress/egress.types.js.map +1 -0
  565. package/dist/providers/egress/firewall.d.ts +3 -0
  566. package/dist/providers/egress/firewall.js +29 -0
  567. package/dist/providers/egress/firewall.js.map +1 -0
  568. package/dist/providers/egress/main.d.ts +1 -0
  569. package/dist/providers/egress/main.js +90 -0
  570. package/dist/providers/egress/main.js.map +1 -0
  571. package/dist/providers/egress/policy.d.ts +5 -0
  572. package/dist/providers/egress/policy.js +54 -0
  573. package/dist/providers/egress/policy.js.map +1 -0
  574. package/dist/providers/egress/proxy.d.ts +2 -0
  575. package/dist/providers/egress/proxy.js +129 -0
  576. package/dist/providers/egress/proxy.js.map +1 -0
  577. package/dist/providers/egress/tls-hello.d.ts +1 -0
  578. package/dist/providers/egress/tls-hello.js +75 -0
  579. package/dist/providers/egress/tls-hello.js.map +1 -0
  580. package/dist/providers/firecracker-command.js +12 -6
  581. package/dist/providers/firecracker-command.js.map +1 -1
  582. package/dist/providers/local-files.d.ts +2 -0
  583. package/dist/providers/local-files.js +24 -0
  584. package/dist/providers/local-files.js.map +1 -0
  585. package/dist/providers/local.js +2 -20
  586. package/dist/providers/local.js.map +1 -1
  587. package/dist/providers/vercel-command.js +33 -9
  588. package/dist/providers/vercel-command.js.map +1 -1
  589. package/dist/providers/vercel.js +11 -9
  590. package/dist/providers/vercel.js.map +1 -1
  591. package/dist/testing.d.ts +1 -1
  592. package/dist/testing.js +1 -1
  593. package/dist/testing.js.map +1 -1
  594. package/package.json +2 -2
  595. package/recipe-configuration.schema.json +2164 -35
  596. package/recipe.schema.json +2512 -404
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-hooks.constants.js","sourceRoot":"","sources":["../../../../src/adapters/agents/codex/codex-hooks.constants.ts"],"names":[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ACP,IAAI,EAAE,QAAQ;iBACf;gBACD,eAAe,EAAE;oBACf,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,QAAQ,EAAE,CAAC,YAAY,EAAE,KAAK,EAAE,iBAAiB,CAAC;YAClD,oBAAoB,EAAE,IAAI;SAC3B;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,QAAQ,EAAE,EAAE;YACZ,oBAAoB,EAAE,KAAK;SAC5B;KACF;CACF,CAAC","sourcesContent":["import type { NativeHookSchema } from \"../native-hooks.types.ts\";\nimport type { CodexHookPhase } from \"./codex-hooks.types.ts\";\n\nexport const codexHookSchemas: Readonly<\n Record<CodexHookPhase, NativeHookSchema>\n> = {\n SessionStart: {\n input: {\n type: \"object\",\n properties: {\n session_id: {\n type: \"string\",\n },\n transcript_path: {\n anyOf: [\n {\n type: \"string\",\n },\n {\n type: \"null\",\n },\n ],\n },\n cwd: {\n type: \"string\",\n },\n hook_event_name: {\n type: \"string\",\n enum: [\"SessionStart\"],\n },\n model: {\n type: \"string\",\n },\n turn_id: {\n type: \"string\",\n },\n permission_mode: {\n type: \"string\",\n },\n source: {\n type: \"string\",\n },\n agent_type: {\n type: \"string\",\n },\n session_title: {\n type: \"string\",\n },\n },\n required: [\"session_id\", \"cwd\", \"hook_event_name\"],\n additionalProperties: true,\n },\n output: {\n type: \"object\",\n properties: {\n decision: {\n type: \"string\",\n enum: [\"block\"],\n },\n reason: {\n type: \"string\",\n },\n hookSpecificOutput: {\n type: \"object\",\n properties: {\n hookEventName: {\n type: \"string\",\n enum: [\"SessionStart\"],\n },\n additionalContext: {\n type: \"string\",\n },\n },\n required: [\"hookEventName\"],\n additionalProperties: false,\n },\n continue: {\n type: \"boolean\",\n },\n stopReason: {\n type: \"string\",\n },\n suppressOutput: {\n type: \"boolean\",\n },\n systemMessage: {\n type: \"string\",\n },\n terminalSequence: {\n type: \"string\",\n },\n },\n required: [],\n additionalProperties: false,\n },\n text: true,\n },\n SessionEnd: {\n input: {\n type: \"object\",\n properties: {\n session_id: {\n type: \"string\",\n },\n transcript_path: {\n anyOf: [\n {\n type: \"string\",\n },\n {\n type: \"null\",\n },\n ],\n },\n cwd: {\n type: \"string\",\n },\n hook_event_name: {\n type: \"string\",\n enum: [\"SessionEnd\"],\n },\n model: {\n type: \"string\",\n },\n turn_id: {\n type: \"string\",\n },\n permission_mode: {\n type: \"string\",\n },\n reason: {\n type: \"string\",\n },\n },\n required: [\"session_id\", \"cwd\", \"hook_event_name\"],\n additionalProperties: true,\n },\n output: {\n not: {},\n },\n },\n UserPromptSubmit: {\n input: {\n type: \"object\",\n properties: {\n session_id: {\n type: \"string\",\n },\n transcript_path: {\n anyOf: [\n {\n type: \"string\",\n },\n {\n type: \"null\",\n },\n ],\n },\n cwd: {\n type: \"string\",\n },\n hook_event_name: {\n type: \"string\",\n enum: [\"UserPromptSubmit\"],\n },\n model: {\n type: \"string\",\n },\n turn_id: {\n type: \"string\",\n },\n permission_mode: {\n type: \"string\",\n },\n prompt: {\n type: \"string\",\n },\n session_title: {\n type: \"string\",\n },\n },\n required: [\"session_id\", \"cwd\", \"hook_event_name\", \"prompt\"],\n additionalProperties: true,\n },\n output: {\n type: \"object\",\n properties: {\n decision: {\n type: \"string\",\n enum: [\"block\"],\n },\n reason: {\n type: \"string\",\n },\n hookSpecificOutput: {\n type: \"object\",\n properties: {\n hookEventName: {\n type: \"string\",\n enum: [\"UserPromptSubmit\"],\n },\n additionalContext: {\n type: \"string\",\n },\n },\n required: [\"hookEventName\"],\n additionalProperties: false,\n },\n continue: {\n type: \"boolean\",\n },\n stopReason: {\n type: \"string\",\n },\n suppressOutput: {\n type: \"boolean\",\n },\n systemMessage: {\n type: \"string\",\n },\n terminalSequence: {\n type: \"string\",\n },\n },\n required: [],\n additionalProperties: false,\n },\n text: true,\n },\n PreToolUse: {\n input: {\n type: \"object\",\n properties: {\n session_id: {\n type: \"string\",\n },\n transcript_path: {\n anyOf: [\n {\n type: \"string\",\n },\n {\n type: \"null\",\n },\n ],\n },\n cwd: {\n type: \"string\",\n },\n hook_event_name: {\n type: \"string\",\n enum: [\"PreToolUse\"],\n },\n model: {\n type: \"string\",\n },\n turn_id: {\n type: \"string\",\n },\n permission_mode: {\n type: \"string\",\n },\n tool_name: {\n type: \"string\",\n },\n tool_input: {},\n tool_use_id: {\n type: \"string\",\n },\n mcp_server: {\n type: \"object\",\n },\n },\n required: [\"session_id\", \"cwd\", \"hook_event_name\", \"tool_name\"],\n additionalProperties: true,\n },\n output: {\n type: \"object\",\n properties: {\n systemMessage: {\n type: \"string\",\n },\n decision: {\n type: \"string\",\n enum: [\"block\"],\n },\n reason: {\n type: \"string\",\n },\n hookSpecificOutput: {\n type: \"object\",\n properties: {\n hookEventName: {\n type: \"string\",\n enum: [\"PreToolUse\"],\n },\n permissionDecision: {\n type: \"string\",\n enum: [\"allow\", \"deny\"],\n },\n permissionDecisionReason: {\n type: \"string\",\n },\n updatedInput: {\n type: \"object\",\n },\n additionalContext: {\n type: \"string\",\n },\n },\n required: [\"hookEventName\"],\n additionalProperties: false,\n allOf: [\n {\n if: {\n required: [\"updatedInput\"],\n },\n then: {\n properties: {\n permissionDecision: {\n const: \"allow\",\n },\n },\n required: [\"permissionDecision\"],\n },\n },\n ],\n },\n },\n required: [],\n additionalProperties: false,\n },\n },\n PermissionRequest: {\n input: {\n type: \"object\",\n properties: {\n session_id: {\n type: \"string\",\n },\n transcript_path: {\n anyOf: [\n {\n type: \"string\",\n },\n {\n type: \"null\",\n },\n ],\n },\n cwd: {\n type: \"string\",\n },\n hook_event_name: {\n type: \"string\",\n enum: [\"PermissionRequest\"],\n },\n model: {\n type: \"string\",\n },\n turn_id: {\n type: \"string\",\n },\n permission_mode: {\n type: \"string\",\n },\n tool_name: {\n type: \"string\",\n },\n tool_input: {},\n tool_use_id: {\n type: \"string\",\n },\n permission_suggestions: {\n type: \"array\",\n },\n mcp_server: {\n type: \"object\",\n },\n },\n required: [\"session_id\", \"cwd\", \"hook_event_name\", \"tool_name\"],\n additionalProperties: true,\n },\n output: {\n type: \"object\",\n properties: {\n systemMessage: {\n type: \"string\",\n },\n hookSpecificOutput: {\n type: \"object\",\n properties: {\n hookEventName: {\n type: \"string\",\n enum: [\"PermissionRequest\"],\n },\n decision: {\n type: \"object\",\n properties: {\n behavior: {\n type: \"string\",\n enum: [\"allow\", \"deny\"],\n },\n message: {\n type: \"string\",\n },\n },\n required: [\"behavior\"],\n additionalProperties: false,\n },\n },\n required: [\"hookEventName\"],\n additionalProperties: false,\n },\n },\n required: [],\n additionalProperties: false,\n },\n },\n PostToolUse: {\n input: {\n type: \"object\",\n properties: {\n session_id: {\n type: \"string\",\n },\n transcript_path: {\n anyOf: [\n {\n type: \"string\",\n },\n {\n type: \"null\",\n },\n ],\n },\n cwd: {\n type: \"string\",\n },\n hook_event_name: {\n type: \"string\",\n enum: [\"PostToolUse\"],\n },\n model: {\n type: \"string\",\n },\n turn_id: {\n type: \"string\",\n },\n permission_mode: {\n type: \"string\",\n },\n tool_name: {\n type: \"string\",\n },\n tool_input: {},\n tool_use_id: {\n type: \"string\",\n },\n tool_response: {},\n mcp_server: {\n type: \"object\",\n },\n },\n required: [\"session_id\", \"cwd\", \"hook_event_name\", \"tool_name\"],\n additionalProperties: true,\n },\n output: {\n type: \"object\",\n properties: {\n systemMessage: {\n type: \"string\",\n },\n continue: {\n type: \"boolean\",\n },\n stopReason: {\n type: \"string\",\n },\n decision: {\n type: \"string\",\n enum: [\"block\"],\n },\n reason: {\n type: \"string\",\n },\n hookSpecificOutput: {\n type: \"object\",\n properties: {\n hookEventName: {\n type: \"string\",\n enum: [\"PostToolUse\"],\n },\n additionalContext: {\n type: \"string\",\n },\n },\n required: [\"hookEventName\"],\n additionalProperties: false,\n },\n },\n required: [],\n additionalProperties: false,\n },\n },\n PreCompact: {\n input: {\n type: \"object\",\n properties: {\n session_id: {\n type: \"string\",\n },\n transcript_path: {\n anyOf: [\n {\n type: \"string\",\n },\n {\n type: \"null\",\n },\n ],\n },\n cwd: {\n type: \"string\",\n },\n hook_event_name: {\n type: \"string\",\n enum: [\"PreCompact\"],\n },\n model: {\n type: \"string\",\n },\n turn_id: {\n type: \"string\",\n },\n permission_mode: {\n type: \"string\",\n },\n trigger: {\n type: \"string\",\n enum: [\"manual\", \"auto\"],\n },\n },\n required: [\"session_id\", \"cwd\", \"hook_event_name\"],\n additionalProperties: true,\n },\n output: {\n type: \"object\",\n properties: {\n continue: {\n type: \"boolean\",\n },\n stopReason: {\n type: \"string\",\n },\n suppressOutput: {\n type: \"boolean\",\n },\n systemMessage: {\n type: \"string\",\n },\n terminalSequence: {\n type: \"string\",\n },\n },\n required: [],\n additionalProperties: false,\n },\n },\n PostCompact: {\n input: {\n type: \"object\",\n properties: {\n session_id: {\n type: \"string\",\n },\n transcript_path: {\n anyOf: [\n {\n type: \"string\",\n },\n {\n type: \"null\",\n },\n ],\n },\n cwd: {\n type: \"string\",\n },\n hook_event_name: {\n type: \"string\",\n enum: [\"PostCompact\"],\n },\n model: {\n type: \"string\",\n },\n turn_id: {\n type: \"string\",\n },\n permission_mode: {\n type: \"string\",\n },\n trigger: {\n type: \"string\",\n enum: [\"manual\", \"auto\"],\n },\n },\n required: [\"session_id\", \"cwd\", \"hook_event_name\"],\n additionalProperties: true,\n },\n output: {\n type: \"object\",\n properties: {\n continue: {\n type: \"boolean\",\n },\n stopReason: {\n type: \"string\",\n },\n suppressOutput: {\n type: \"boolean\",\n },\n systemMessage: {\n type: \"string\",\n },\n terminalSequence: {\n type: \"string\",\n },\n },\n required: [],\n additionalProperties: false,\n },\n },\n SubagentStart: {\n input: {\n type: \"object\",\n properties: {\n session_id: {\n type: \"string\",\n },\n transcript_path: {\n anyOf: [\n {\n type: \"string\",\n },\n {\n type: \"null\",\n },\n ],\n },\n cwd: {\n type: \"string\",\n },\n hook_event_name: {\n type: \"string\",\n enum: [\"SubagentStart\"],\n },\n model: {\n type: \"string\",\n },\n turn_id: {\n type: \"string\",\n },\n permission_mode: {\n type: \"string\",\n },\n agent_id: {\n type: \"string\",\n },\n agent_type: {\n type: \"string\",\n },\n },\n required: [\"session_id\", \"cwd\", \"hook_event_name\"],\n additionalProperties: true,\n },\n output: {\n type: \"object\",\n properties: {\n decision: {\n type: \"string\",\n enum: [\"block\"],\n },\n reason: {\n type: \"string\",\n },\n hookSpecificOutput: {\n type: \"object\",\n properties: {\n hookEventName: {\n type: \"string\",\n enum: [\"SubagentStart\"],\n },\n additionalContext: {\n type: \"string\",\n },\n },\n required: [\"hookEventName\"],\n additionalProperties: false,\n },\n continue: {\n type: \"boolean\",\n },\n stopReason: {\n type: \"string\",\n },\n suppressOutput: {\n type: \"boolean\",\n },\n systemMessage: {\n type: \"string\",\n },\n terminalSequence: {\n type: \"string\",\n },\n },\n required: [],\n additionalProperties: false,\n },\n text: true,\n },\n SubagentStop: {\n input: {\n type: \"object\",\n properties: {\n session_id: {\n type: \"string\",\n },\n transcript_path: {\n anyOf: [\n {\n type: \"string\",\n },\n {\n type: \"null\",\n },\n ],\n },\n cwd: {\n type: \"string\",\n },\n hook_event_name: {\n type: \"string\",\n enum: [\"SubagentStop\"],\n },\n model: {\n type: \"string\",\n },\n turn_id: {\n type: \"string\",\n },\n permission_mode: {\n type: \"string\",\n },\n agent_id: {\n type: \"string\",\n },\n agent_type: {\n type: \"string\",\n },\n agent_transcript_path: {\n anyOf: [\n {\n type: \"string\",\n },\n {\n type: \"null\",\n },\n ],\n },\n last_assistant_message: {\n anyOf: [\n {\n type: \"string\",\n },\n {\n type: \"null\",\n },\n ],\n },\n stop_hook_active: {\n type: \"boolean\",\n },\n },\n required: [\"session_id\", \"cwd\", \"hook_event_name\"],\n additionalProperties: true,\n },\n output: {\n type: \"object\",\n properties: {\n decision: {\n type: \"string\",\n enum: [\"block\"],\n },\n reason: {\n type: \"string\",\n },\n continue: {\n type: \"boolean\",\n },\n stopReason: {\n type: \"string\",\n },\n suppressOutput: {\n type: \"boolean\",\n },\n systemMessage: {\n type: \"string\",\n },\n terminalSequence: {\n type: \"string\",\n },\n },\n required: [],\n additionalProperties: false,\n },\n },\n Stop: {\n input: {\n type: \"object\",\n properties: {\n session_id: {\n type: \"string\",\n },\n transcript_path: {\n anyOf: [\n {\n type: \"string\",\n },\n {\n type: \"null\",\n },\n ],\n },\n cwd: {\n type: \"string\",\n },\n hook_event_name: {\n type: \"string\",\n enum: [\"Stop\"],\n },\n model: {\n type: \"string\",\n },\n turn_id: {\n type: \"string\",\n },\n permission_mode: {\n type: \"string\",\n },\n stop_hook_active: {\n type: \"boolean\",\n },\n last_assistant_message: {\n anyOf: [\n {\n type: \"string\",\n },\n {\n type: \"null\",\n },\n ],\n },\n },\n required: [\"session_id\", \"cwd\", \"hook_event_name\"],\n additionalProperties: true,\n },\n output: {\n type: \"object\",\n properties: {\n decision: {\n type: \"string\",\n enum: [\"block\"],\n },\n reason: {\n type: \"string\",\n },\n continue: {\n type: \"boolean\",\n },\n stopReason: {\n type: \"string\",\n },\n suppressOutput: {\n type: \"boolean\",\n },\n systemMessage: {\n type: \"string\",\n },\n terminalSequence: {\n type: \"string\",\n },\n },\n required: [],\n additionalProperties: false,\n },\n },\n Interrupt: {\n input: {\n type: \"object\",\n properties: {\n session_id: {\n type: \"string\",\n },\n transcript_path: {\n anyOf: [\n {\n type: \"string\",\n },\n {\n type: \"null\",\n },\n ],\n },\n cwd: {\n type: \"string\",\n },\n hook_event_name: {\n type: \"string\",\n enum: [\"Interrupt\"],\n },\n model: {\n type: \"string\",\n },\n turn_id: {\n type: \"string\",\n },\n permission_mode: {\n type: \"string\",\n },\n },\n required: [\"session_id\", \"cwd\", \"hook_event_name\"],\n additionalProperties: true,\n },\n output: {\n type: \"object\",\n properties: {\n systemMessage: {\n type: \"string\",\n },\n },\n required: [],\n additionalProperties: false,\n },\n },\n};\n"]}
@@ -0,0 +1,2 @@
1
+ import type { CodexHook, CodexHookPhase, CodexHookOptions } from "./codex-hooks.types.ts";
2
+ export declare function defineCodexHook<Phase extends CodexHookPhase>(options: CodexHookOptions<Phase>): CodexHook<Phase>;
@@ -0,0 +1,6 @@
1
+ import { defineNativeHook } from "../native-hooks.js";
2
+ import { codexHookSchemas } from "./codex-hooks.constants.js";
3
+ export function defineCodexHook(options) {
4
+ return defineNativeHook("codex", codexHookSchemas, options);
5
+ }
6
+ //# sourceMappingURL=codex-hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-hooks.js","sourceRoot":"","sources":["../../../../src/adapters/agents/codex/codex-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAS9D,MAAM,UAAU,eAAe,CAC7B,OAAgC;IAEhC,OAAO,gBAAgB,CAKrB,OAAO,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC","sourcesContent":["import { defineNativeHook } from \"../native-hooks.ts\";\nimport { codexHookSchemas } from \"./codex-hooks.constants.ts\";\nimport type {\n CodexHook,\n CodexHookPhase,\n CodexHookOptions,\n CodexHookEvents,\n CodexHookDecisions,\n} from \"./codex-hooks.types.ts\";\n\nexport function defineCodexHook<Phase extends CodexHookPhase>(\n options: CodexHookOptions<Phase>,\n): CodexHook<Phase> {\n return defineNativeHook<\n \"codex\",\n Phase,\n CodexHookEvents[Phase],\n CodexHookDecisions[Phase]\n >(\"codex\", codexHookSchemas, options);\n}\n"]}
@@ -0,0 +1,255 @@
1
+ import type { NativeHook, NativeHookOptions } from "../native-hooks.types.ts";
2
+ export interface CodexHookEvents {
3
+ readonly SessionStart: {
4
+ readonly session_id: string;
5
+ readonly transcript_path?: string | null;
6
+ readonly cwd: string;
7
+ readonly hook_event_name: "SessionStart";
8
+ readonly model?: string;
9
+ readonly turn_id?: string;
10
+ readonly permission_mode?: string;
11
+ readonly source?: string;
12
+ readonly agent_type?: string;
13
+ readonly session_title?: string;
14
+ };
15
+ readonly SessionEnd: {
16
+ readonly session_id: string;
17
+ readonly transcript_path?: string | null;
18
+ readonly cwd: string;
19
+ readonly hook_event_name: "SessionEnd";
20
+ readonly model?: string;
21
+ readonly turn_id?: string;
22
+ readonly permission_mode?: string;
23
+ readonly reason?: string;
24
+ };
25
+ readonly UserPromptSubmit: {
26
+ readonly session_id: string;
27
+ readonly transcript_path?: string | null;
28
+ readonly cwd: string;
29
+ readonly hook_event_name: "UserPromptSubmit";
30
+ readonly model?: string;
31
+ readonly turn_id?: string;
32
+ readonly permission_mode?: string;
33
+ readonly prompt: string;
34
+ readonly session_title?: string;
35
+ };
36
+ readonly PreToolUse: {
37
+ readonly session_id: string;
38
+ readonly transcript_path?: string | null;
39
+ readonly cwd: string;
40
+ readonly hook_event_name: "PreToolUse";
41
+ readonly model?: string;
42
+ readonly turn_id?: string;
43
+ readonly permission_mode?: string;
44
+ readonly tool_name: string;
45
+ readonly tool_input?: unknown;
46
+ readonly tool_use_id?: string;
47
+ readonly mcp_server?: Readonly<Record<string, unknown>>;
48
+ };
49
+ readonly PermissionRequest: {
50
+ readonly session_id: string;
51
+ readonly transcript_path?: string | null;
52
+ readonly cwd: string;
53
+ readonly hook_event_name: "PermissionRequest";
54
+ readonly model?: string;
55
+ readonly turn_id?: string;
56
+ readonly permission_mode?: string;
57
+ readonly tool_name: string;
58
+ readonly tool_input?: unknown;
59
+ readonly tool_use_id?: string;
60
+ readonly permission_suggestions?: readonly unknown[];
61
+ readonly mcp_server?: Readonly<Record<string, unknown>>;
62
+ };
63
+ readonly PostToolUse: {
64
+ readonly session_id: string;
65
+ readonly transcript_path?: string | null;
66
+ readonly cwd: string;
67
+ readonly hook_event_name: "PostToolUse";
68
+ readonly model?: string;
69
+ readonly turn_id?: string;
70
+ readonly permission_mode?: string;
71
+ readonly tool_name: string;
72
+ readonly tool_input?: unknown;
73
+ readonly tool_use_id?: string;
74
+ readonly tool_response?: unknown;
75
+ readonly mcp_server?: Readonly<Record<string, unknown>>;
76
+ };
77
+ readonly PreCompact: {
78
+ readonly session_id: string;
79
+ readonly transcript_path?: string | null;
80
+ readonly cwd: string;
81
+ readonly hook_event_name: "PreCompact";
82
+ readonly model?: string;
83
+ readonly turn_id?: string;
84
+ readonly permission_mode?: string;
85
+ readonly trigger?: "manual" | "auto";
86
+ };
87
+ readonly PostCompact: {
88
+ readonly session_id: string;
89
+ readonly transcript_path?: string | null;
90
+ readonly cwd: string;
91
+ readonly hook_event_name: "PostCompact";
92
+ readonly model?: string;
93
+ readonly turn_id?: string;
94
+ readonly permission_mode?: string;
95
+ readonly trigger?: "manual" | "auto";
96
+ };
97
+ readonly SubagentStart: {
98
+ readonly session_id: string;
99
+ readonly transcript_path?: string | null;
100
+ readonly cwd: string;
101
+ readonly hook_event_name: "SubagentStart";
102
+ readonly model?: string;
103
+ readonly turn_id?: string;
104
+ readonly permission_mode?: string;
105
+ readonly agent_id?: string;
106
+ readonly agent_type?: string;
107
+ };
108
+ readonly SubagentStop: {
109
+ readonly session_id: string;
110
+ readonly transcript_path?: string | null;
111
+ readonly cwd: string;
112
+ readonly hook_event_name: "SubagentStop";
113
+ readonly model?: string;
114
+ readonly turn_id?: string;
115
+ readonly permission_mode?: string;
116
+ readonly agent_id?: string;
117
+ readonly agent_type?: string;
118
+ readonly agent_transcript_path?: string | null;
119
+ readonly last_assistant_message?: string | null;
120
+ readonly stop_hook_active?: boolean;
121
+ };
122
+ readonly Stop: {
123
+ readonly session_id: string;
124
+ readonly transcript_path?: string | null;
125
+ readonly cwd: string;
126
+ readonly hook_event_name: "Stop";
127
+ readonly model?: string;
128
+ readonly turn_id?: string;
129
+ readonly permission_mode?: string;
130
+ readonly stop_hook_active?: boolean;
131
+ readonly last_assistant_message?: string | null;
132
+ };
133
+ readonly Interrupt: {
134
+ readonly session_id: string;
135
+ readonly transcript_path?: string | null;
136
+ readonly cwd: string;
137
+ readonly hook_event_name: "Interrupt";
138
+ readonly model?: string;
139
+ readonly turn_id?: string;
140
+ readonly permission_mode?: string;
141
+ };
142
+ }
143
+ export interface CodexHookDecisions {
144
+ readonly SessionStart: string | {
145
+ readonly decision?: "block";
146
+ readonly reason?: string;
147
+ readonly hookSpecificOutput?: {
148
+ readonly hookEventName: "SessionStart";
149
+ readonly additionalContext?: string;
150
+ };
151
+ readonly continue?: boolean;
152
+ readonly stopReason?: string;
153
+ readonly suppressOutput?: boolean;
154
+ readonly systemMessage?: string;
155
+ readonly terminalSequence?: string;
156
+ };
157
+ readonly SessionEnd: never;
158
+ readonly UserPromptSubmit: string | {
159
+ readonly decision?: "block";
160
+ readonly reason?: string;
161
+ readonly hookSpecificOutput?: {
162
+ readonly hookEventName: "UserPromptSubmit";
163
+ readonly additionalContext?: string;
164
+ };
165
+ readonly continue?: boolean;
166
+ readonly stopReason?: string;
167
+ readonly suppressOutput?: boolean;
168
+ readonly systemMessage?: string;
169
+ readonly terminalSequence?: string;
170
+ };
171
+ readonly PreToolUse: {
172
+ readonly systemMessage?: string;
173
+ readonly decision?: "block";
174
+ readonly reason?: string;
175
+ readonly hookSpecificOutput?: {
176
+ readonly hookEventName: "PreToolUse";
177
+ readonly permissionDecision?: "allow" | "deny";
178
+ readonly permissionDecisionReason?: string;
179
+ readonly updatedInput?: Readonly<Record<string, unknown>>;
180
+ readonly additionalContext?: string;
181
+ };
182
+ };
183
+ readonly PermissionRequest: {
184
+ readonly systemMessage?: string;
185
+ readonly hookSpecificOutput?: {
186
+ readonly hookEventName: "PermissionRequest";
187
+ readonly decision?: {
188
+ readonly behavior: "allow" | "deny";
189
+ readonly message?: string;
190
+ };
191
+ };
192
+ };
193
+ readonly PostToolUse: {
194
+ readonly systemMessage?: string;
195
+ readonly continue?: boolean;
196
+ readonly stopReason?: string;
197
+ readonly decision?: "block";
198
+ readonly reason?: string;
199
+ readonly hookSpecificOutput?: {
200
+ readonly hookEventName: "PostToolUse";
201
+ readonly additionalContext?: string;
202
+ };
203
+ };
204
+ readonly PreCompact: {
205
+ readonly continue?: boolean;
206
+ readonly stopReason?: string;
207
+ readonly suppressOutput?: boolean;
208
+ readonly systemMessage?: string;
209
+ readonly terminalSequence?: string;
210
+ };
211
+ readonly PostCompact: {
212
+ readonly continue?: boolean;
213
+ readonly stopReason?: string;
214
+ readonly suppressOutput?: boolean;
215
+ readonly systemMessage?: string;
216
+ readonly terminalSequence?: string;
217
+ };
218
+ readonly SubagentStart: string | {
219
+ readonly decision?: "block";
220
+ readonly reason?: string;
221
+ readonly hookSpecificOutput?: {
222
+ readonly hookEventName: "SubagentStart";
223
+ readonly additionalContext?: string;
224
+ };
225
+ readonly continue?: boolean;
226
+ readonly stopReason?: string;
227
+ readonly suppressOutput?: boolean;
228
+ readonly systemMessage?: string;
229
+ readonly terminalSequence?: string;
230
+ };
231
+ readonly SubagentStop: {
232
+ readonly decision?: "block";
233
+ readonly reason?: string;
234
+ readonly continue?: boolean;
235
+ readonly stopReason?: string;
236
+ readonly suppressOutput?: boolean;
237
+ readonly systemMessage?: string;
238
+ readonly terminalSequence?: string;
239
+ };
240
+ readonly Stop: {
241
+ readonly decision?: "block";
242
+ readonly reason?: string;
243
+ readonly continue?: boolean;
244
+ readonly stopReason?: string;
245
+ readonly suppressOutput?: boolean;
246
+ readonly systemMessage?: string;
247
+ readonly terminalSequence?: string;
248
+ };
249
+ readonly Interrupt: {
250
+ readonly systemMessage?: string;
251
+ };
252
+ }
253
+ export type CodexHookPhase = keyof CodexHookEvents;
254
+ export type CodexHook<Phase extends CodexHookPhase = CodexHookPhase> = NativeHook<"codex", Phase>;
255
+ export type CodexHookOptions<Phase extends CodexHookPhase> = NativeHookOptions<Phase, CodexHookEvents[Phase], CodexHookDecisions[Phase]>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=codex-hooks.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-hooks.types.js","sourceRoot":"","sources":["../../../../src/adapters/agents/codex/codex-hooks.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { NativeHook, NativeHookOptions } from \"../native-hooks.types.ts\";\n\nexport interface CodexHookEvents {\n readonly SessionStart: {\n readonly session_id: string;\n readonly transcript_path?: string | null;\n readonly cwd: string;\n readonly hook_event_name: \"SessionStart\";\n readonly model?: string;\n readonly turn_id?: string;\n readonly permission_mode?: string;\n readonly source?: string;\n readonly agent_type?: string;\n readonly session_title?: string;\n };\n readonly SessionEnd: {\n readonly session_id: string;\n readonly transcript_path?: string | null;\n readonly cwd: string;\n readonly hook_event_name: \"SessionEnd\";\n readonly model?: string;\n readonly turn_id?: string;\n readonly permission_mode?: string;\n readonly reason?: string;\n };\n readonly UserPromptSubmit: {\n readonly session_id: string;\n readonly transcript_path?: string | null;\n readonly cwd: string;\n readonly hook_event_name: \"UserPromptSubmit\";\n readonly model?: string;\n readonly turn_id?: string;\n readonly permission_mode?: string;\n readonly prompt: string;\n readonly session_title?: string;\n };\n readonly PreToolUse: {\n readonly session_id: string;\n readonly transcript_path?: string | null;\n readonly cwd: string;\n readonly hook_event_name: \"PreToolUse\";\n readonly model?: string;\n readonly turn_id?: string;\n readonly permission_mode?: string;\n readonly tool_name: string;\n readonly tool_input?: unknown;\n readonly tool_use_id?: string;\n readonly mcp_server?: Readonly<Record<string, unknown>>;\n };\n readonly PermissionRequest: {\n readonly session_id: string;\n readonly transcript_path?: string | null;\n readonly cwd: string;\n readonly hook_event_name: \"PermissionRequest\";\n readonly model?: string;\n readonly turn_id?: string;\n readonly permission_mode?: string;\n readonly tool_name: string;\n readonly tool_input?: unknown;\n readonly tool_use_id?: string;\n readonly permission_suggestions?: readonly unknown[];\n readonly mcp_server?: Readonly<Record<string, unknown>>;\n };\n readonly PostToolUse: {\n readonly session_id: string;\n readonly transcript_path?: string | null;\n readonly cwd: string;\n readonly hook_event_name: \"PostToolUse\";\n readonly model?: string;\n readonly turn_id?: string;\n readonly permission_mode?: string;\n readonly tool_name: string;\n readonly tool_input?: unknown;\n readonly tool_use_id?: string;\n readonly tool_response?: unknown;\n readonly mcp_server?: Readonly<Record<string, unknown>>;\n };\n readonly PreCompact: {\n readonly session_id: string;\n readonly transcript_path?: string | null;\n readonly cwd: string;\n readonly hook_event_name: \"PreCompact\";\n readonly model?: string;\n readonly turn_id?: string;\n readonly permission_mode?: string;\n readonly trigger?: \"manual\" | \"auto\";\n };\n readonly PostCompact: {\n readonly session_id: string;\n readonly transcript_path?: string | null;\n readonly cwd: string;\n readonly hook_event_name: \"PostCompact\";\n readonly model?: string;\n readonly turn_id?: string;\n readonly permission_mode?: string;\n readonly trigger?: \"manual\" | \"auto\";\n };\n readonly SubagentStart: {\n readonly session_id: string;\n readonly transcript_path?: string | null;\n readonly cwd: string;\n readonly hook_event_name: \"SubagentStart\";\n readonly model?: string;\n readonly turn_id?: string;\n readonly permission_mode?: string;\n readonly agent_id?: string;\n readonly agent_type?: string;\n };\n readonly SubagentStop: {\n readonly session_id: string;\n readonly transcript_path?: string | null;\n readonly cwd: string;\n readonly hook_event_name: \"SubagentStop\";\n readonly model?: string;\n readonly turn_id?: string;\n readonly permission_mode?: string;\n readonly agent_id?: string;\n readonly agent_type?: string;\n readonly agent_transcript_path?: string | null;\n readonly last_assistant_message?: string | null;\n readonly stop_hook_active?: boolean;\n };\n readonly Stop: {\n readonly session_id: string;\n readonly transcript_path?: string | null;\n readonly cwd: string;\n readonly hook_event_name: \"Stop\";\n readonly model?: string;\n readonly turn_id?: string;\n readonly permission_mode?: string;\n readonly stop_hook_active?: boolean;\n readonly last_assistant_message?: string | null;\n };\n readonly Interrupt: {\n readonly session_id: string;\n readonly transcript_path?: string | null;\n readonly cwd: string;\n readonly hook_event_name: \"Interrupt\";\n readonly model?: string;\n readonly turn_id?: string;\n readonly permission_mode?: string;\n };\n}\n\nexport interface CodexHookDecisions {\n readonly SessionStart:\n | string\n | {\n readonly decision?: \"block\";\n readonly reason?: string;\n readonly hookSpecificOutput?: {\n readonly hookEventName: \"SessionStart\";\n readonly additionalContext?: string;\n };\n readonly continue?: boolean;\n readonly stopReason?: string;\n readonly suppressOutput?: boolean;\n readonly systemMessage?: string;\n readonly terminalSequence?: string;\n };\n readonly SessionEnd: never;\n readonly UserPromptSubmit:\n | string\n | {\n readonly decision?: \"block\";\n readonly reason?: string;\n readonly hookSpecificOutput?: {\n readonly hookEventName: \"UserPromptSubmit\";\n readonly additionalContext?: string;\n };\n readonly continue?: boolean;\n readonly stopReason?: string;\n readonly suppressOutput?: boolean;\n readonly systemMessage?: string;\n readonly terminalSequence?: string;\n };\n readonly PreToolUse: {\n readonly systemMessage?: string;\n readonly decision?: \"block\";\n readonly reason?: string;\n readonly hookSpecificOutput?: {\n readonly hookEventName: \"PreToolUse\";\n readonly permissionDecision?: \"allow\" | \"deny\";\n readonly permissionDecisionReason?: string;\n readonly updatedInput?: Readonly<Record<string, unknown>>;\n readonly additionalContext?: string;\n };\n };\n readonly PermissionRequest: {\n readonly systemMessage?: string;\n readonly hookSpecificOutput?: {\n readonly hookEventName: \"PermissionRequest\";\n readonly decision?: {\n readonly behavior: \"allow\" | \"deny\";\n readonly message?: string;\n };\n };\n };\n readonly PostToolUse: {\n readonly systemMessage?: string;\n readonly continue?: boolean;\n readonly stopReason?: string;\n readonly decision?: \"block\";\n readonly reason?: string;\n readonly hookSpecificOutput?: {\n readonly hookEventName: \"PostToolUse\";\n readonly additionalContext?: string;\n };\n };\n readonly PreCompact: {\n readonly continue?: boolean;\n readonly stopReason?: string;\n readonly suppressOutput?: boolean;\n readonly systemMessage?: string;\n readonly terminalSequence?: string;\n };\n readonly PostCompact: {\n readonly continue?: boolean;\n readonly stopReason?: string;\n readonly suppressOutput?: boolean;\n readonly systemMessage?: string;\n readonly terminalSequence?: string;\n };\n readonly SubagentStart:\n | string\n | {\n readonly decision?: \"block\";\n readonly reason?: string;\n readonly hookSpecificOutput?: {\n readonly hookEventName: \"SubagentStart\";\n readonly additionalContext?: string;\n };\n readonly continue?: boolean;\n readonly stopReason?: string;\n readonly suppressOutput?: boolean;\n readonly systemMessage?: string;\n readonly terminalSequence?: string;\n };\n readonly SubagentStop: {\n readonly decision?: \"block\";\n readonly reason?: string;\n readonly continue?: boolean;\n readonly stopReason?: string;\n readonly suppressOutput?: boolean;\n readonly systemMessage?: string;\n readonly terminalSequence?: string;\n };\n readonly Stop: {\n readonly decision?: \"block\";\n readonly reason?: string;\n readonly continue?: boolean;\n readonly stopReason?: string;\n readonly suppressOutput?: boolean;\n readonly systemMessage?: string;\n readonly terminalSequence?: string;\n };\n readonly Interrupt: { readonly systemMessage?: string };\n}\n\nexport type CodexHookPhase = keyof CodexHookEvents;\nexport type CodexHook<Phase extends CodexHookPhase = CodexHookPhase> =\n NativeHook<\"codex\", Phase>;\nexport type CodexHookOptions<Phase extends CodexHookPhase> = NativeHookOptions<\n Phase,\n CodexHookEvents[Phase],\n CodexHookDecisions[Phase]\n>;\n"]}
@@ -1,4 +1,4 @@
1
- import { invariant } from "../../../domain/errors.js";
1
+ import { invariant, OutpostError } from "../../../domain/errors.js";
2
2
  export function codexProvider(settings) {
3
3
  const provider = settings.modelProvider;
4
4
  if (!provider)
@@ -9,7 +9,7 @@ export function codexProvider(settings) {
9
9
  url = new URL(provider.baseUrl);
10
10
  }
11
11
  catch {
12
- throw new Error("Model provider baseUrl must be an absolute HTTP(S) URL");
12
+ throw new OutpostError("configuration", "Model provider baseUrl must be an absolute HTTP(S) URL");
13
13
  }
14
14
  invariant(["http:", "https:"].includes(url.protocol) &&
15
15
  !url.username &&
@@ -1 +1 @@
1
- {"version":3,"file":"codex-provider.js","sourceRoot":"","sources":["../../../../src/adapters/agents/codex/codex-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,MAAM,UAAU,aAAa,CAC3B,QAA8B;IAE9B,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC;IACxC,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IACzB,SAAS,CACP,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,EAC3B,+CAA+C,CAChD,CAAC;IACF,IAAI,GAAQ,CAAC;IACb,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC5E,CAAC;IACD,SAAS,CACP,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC;QACxC,CAAC,GAAG,CAAC,QAAQ;QACb,CAAC,GAAG,CAAC,QAAQ;QACb,CAAC,GAAG,CAAC,MAAM;QACX,CAAC,GAAG,CAAC,IAAI,EACX,yFAAyF,CAC1F,CAAC;IACF,MAAM,WAAW,GAAG,QAAQ,CAAC,iBAAiB,IAAI,gBAAgB,CAAC;IACnE,SAAS,CACP,WAAW,KAAK,KAAK,IAAI,0BAA0B,CAAC,IAAI,CAAC,WAAW,CAAC,EACrE,qDAAqD,CACtD,CAAC;IACF,MAAM,aAAa,GAAG;QACpB,qCAAqC;QACrC,6DAA6D;QAC7D,+CAA+C,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;QACjF,yDAAyD;QACzD,+DAA+D;KAChE,CAAC;IACF,IAAI,WAAW,KAAK,KAAK;QACvB,aAAa,CAAC,IAAI,CAChB,8CAA8C,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAC5E,CAAC;IACJ,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AACzD,CAAC","sourcesContent":["import { invariant } from \"../../../domain/errors.ts\";\nimport type { Bound, CodexSettings } from \"../settings.types.ts\";\n\nexport function codexProvider(\n settings: Bound<CodexSettings>,\n): readonly string[] {\n const provider = settings.modelProvider;\n if (!provider) return [];\n invariant(\n settings.model?.name.trim(),\n \"A custom model provider requires a model name\",\n );\n let url: URL;\n try {\n url = new URL(provider.baseUrl);\n } catch {\n throw new Error(\"Model provider baseUrl must be an absolute HTTP(S) URL\");\n }\n invariant(\n [\"http:\", \"https:\"].includes(url.protocol) &&\n !url.username &&\n !url.password &&\n !url.search &&\n !url.hash,\n \"Model provider baseUrl must use HTTP(S) without embedded credentials, query or fragment\",\n );\n const environment = provider.apiKeyEnvironment ?? \"OPENAI_API_KEY\";\n invariant(\n environment === false || /^[A-Za-z_][A-Za-z0-9_]*$/.test(environment),\n \"Invalid model provider API-key environment variable\",\n );\n const configuration = [\n 'model_provider=\"outpost_compatible\"',\n 'model_providers.outpost_compatible.name=\"OpenAI compatible\"',\n `model_providers.outpost_compatible.base_url=${JSON.stringify(provider.baseUrl)}`,\n 'model_providers.outpost_compatible.wire_api=\"responses\"',\n \"model_providers.outpost_compatible.requires_openai_auth=false\",\n ];\n if (environment !== false)\n configuration.push(\n `model_providers.outpost_compatible.env_key=${JSON.stringify(environment)}`,\n );\n return configuration.flatMap((value) => [\"-c\", value]);\n}\n"]}
1
+ {"version":3,"file":"codex-provider.js","sourceRoot":"","sources":["../../../../src/adapters/agents/codex/codex-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGpE,MAAM,UAAU,aAAa,CAC3B,QAA8B;IAE9B,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC;IACxC,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IACzB,SAAS,CACP,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,EAC3B,+CAA+C,CAChD,CAAC;IACF,IAAI,GAAQ,CAAC;IACb,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,YAAY,CACpB,eAAe,EACf,wDAAwD,CACzD,CAAC;IACJ,CAAC;IACD,SAAS,CACP,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC;QACxC,CAAC,GAAG,CAAC,QAAQ;QACb,CAAC,GAAG,CAAC,QAAQ;QACb,CAAC,GAAG,CAAC,MAAM;QACX,CAAC,GAAG,CAAC,IAAI,EACX,yFAAyF,CAC1F,CAAC;IACF,MAAM,WAAW,GAAG,QAAQ,CAAC,iBAAiB,IAAI,gBAAgB,CAAC;IACnE,SAAS,CACP,WAAW,KAAK,KAAK,IAAI,0BAA0B,CAAC,IAAI,CAAC,WAAW,CAAC,EACrE,qDAAqD,CACtD,CAAC;IACF,MAAM,aAAa,GAAG;QACpB,qCAAqC;QACrC,6DAA6D;QAC7D,+CAA+C,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;QACjF,yDAAyD;QACzD,+DAA+D;KAChE,CAAC;IACF,IAAI,WAAW,KAAK,KAAK;QACvB,aAAa,CAAC,IAAI,CAChB,8CAA8C,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAC5E,CAAC;IACJ,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AACzD,CAAC","sourcesContent":["import { invariant, OutpostError } from \"../../../domain/errors.ts\";\nimport type { Bound, CodexSettings } from \"../settings.types.ts\";\n\nexport function codexProvider(\n settings: Bound<CodexSettings>,\n): readonly string[] {\n const provider = settings.modelProvider;\n if (!provider) return [];\n invariant(\n settings.model?.name.trim(),\n \"A custom model provider requires a model name\",\n );\n let url: URL;\n try {\n url = new URL(provider.baseUrl);\n } catch {\n throw new OutpostError(\n \"configuration\",\n \"Model provider baseUrl must be an absolute HTTP(S) URL\",\n );\n }\n invariant(\n [\"http:\", \"https:\"].includes(url.protocol) &&\n !url.username &&\n !url.password &&\n !url.search &&\n !url.hash,\n \"Model provider baseUrl must use HTTP(S) without embedded credentials, query or fragment\",\n );\n const environment = provider.apiKeyEnvironment ?? \"OPENAI_API_KEY\";\n invariant(\n environment === false || /^[A-Za-z_][A-Za-z0-9_]*$/.test(environment),\n \"Invalid model provider API-key environment variable\",\n );\n const configuration = [\n 'model_provider=\"outpost_compatible\"',\n 'model_providers.outpost_compatible.name=\"OpenAI compatible\"',\n `model_providers.outpost_compatible.base_url=${JSON.stringify(provider.baseUrl)}`,\n 'model_providers.outpost_compatible.wire_api=\"responses\"',\n \"model_providers.outpost_compatible.requires_openai_auth=false\",\n ];\n if (environment !== false)\n configuration.push(\n `model_providers.outpost_compatible.env_key=${JSON.stringify(environment)}`,\n );\n return configuration.flatMap((value) => [\"-c\", value]);\n}\n"]}
@@ -1,3 +1,6 @@
1
+ import { composedNativeHooks } from "../native-hooks.js";
2
+ import { copilotHookSchemas } from "./copilot-hooks.constants.js";
3
+ import { copilotHookPlan } from "./copilot-hook-plan.js";
1
4
  import { rejectProfileTools } from "../profile-support.js";
2
5
  import { createCopilotConversations, copilotSessionProfile, } from "./copilot-conversations.js";
3
6
  import { copilotLabel, copilotMcpSupport, copilotModelSupport, copilotQuotaPatterns, copilotUnavailablePatterns, } from "./copilot.constants.js";
@@ -19,11 +22,20 @@ function bindCopilot(settings) {
19
22
  const credentials = credentialPlanner(copilotLabel, copilotCredentials, settings.authentication, settings.model);
20
23
  const configuration = mcpConfigurationPlanner(copilotLabel, settings.mcpServers);
21
24
  return Object.freeze({
25
+ ...(settings.hooks?.length
26
+ ? { hooks: copilotHookPlan(settings.hooks) }
27
+ : {}),
22
28
  name: "copilot",
23
29
  ...(credentials ? { credentials } : {}),
24
30
  ...(configuration ? { configuration } : {}),
25
31
  bootstrap: "copilot",
26
32
  resumable: true,
33
+ fileWorkspaces: Object.freeze({
34
+ dispatch: true,
35
+ repairs: true,
36
+ continuation: true,
37
+ interactive: true,
38
+ }),
27
39
  forkable: false,
28
40
  ...conversationStorage(settings, createCopilotConversations),
29
41
  requiresFinishedEvent: true,
@@ -44,10 +56,12 @@ export function createCopilotHarness(settings = {}) {
44
56
  harnessSettings(settings);
45
57
  conversationSettings(copilotLabel, copilotSessionProfile.format, settings);
46
58
  const configured = configuredSettings(settings);
59
+ const hooks = composedNativeHooks("copilot", copilotHookSchemas, configured.profile?.hooks?.copilot, settings.hooks);
47
60
  return Object.freeze({
48
61
  kind: "cli",
49
62
  bind: (model) => bindCopilot({
50
63
  ...configured,
64
+ hooks,
51
65
  ...(model === undefined ? {} : { model }),
52
66
  }),
53
67
  });
@@ -1 +1 @@
1
- {"version":3,"file":"copilot-adapter.js","sourceRoot":"","sources":["../../../../src/adapters/agents/copilot/copilot-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,M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AuB,CACxB;QACD,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,CAAC,YAAY,EAAE,EAAE,CAC7B,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC;QAC9C,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,EAAE,YAAY,CAAC;KACvC,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,WAA4B,EAAE;IAE9B,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC1B,oBAAoB,CAAC,YAAY,EAAE,qBAAqB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3E,MAAM,UAAU,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,CAAC,KAAkB,EAAE,EAAE,CAC3B,WAAW,CAAC;YACV,GAAG,UAAU;YACb,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;SAC1C,CAAC;KACL,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { rejectProfileTools } from \"../profile-support.ts\";\nimport {\n createCopilotConversations,\n copilotSessionProfile,\n} from \"./copilot-conversations.ts\";\nimport {\n copilotLabel,\n copilotMcpSupport,\n copilotModelSupport,\n copilotQuotaPatterns,\n copilotUnavailablePatterns,\n} from \"./copilot.constants.ts\";\nimport {\n mcpConfigurationPlanner,\n supportMcpServers,\n} from \"../mcp-configuration.ts\";\nimport { textMatcher } from \"../text-matcher.ts\";\nimport {\n conversationSettings,\n conversationStorage,\n} from \"../conversation-settings.ts\";\nimport { transientNoticePatterns } from \"../unavailable.constants.ts\";\nimport { copilotUsage } from \"./copilot-usage.ts\";\nimport { sessionUsageCommand, sessionUsageResult } from \"../session-usage.ts\";\nimport type { AgentAdapter, CliHarness } from \"../../../domain/agent.types.ts\";\nimport type { AgentModel } from \"../../../domain/model.types.ts\";\nimport { credentialPlanner } from \"../authentication.ts\";\nimport { copilotCredentials } from \"./copilot-authentication.ts\";\nimport { copilotEvents } from \"./copilot-events.ts\";\nimport { copilotRequest } from \"./copilot-request.ts\";\nimport type { CopilotSettings } from \"./copilot.types.ts\";\nimport {\n configuredSettings,\n harnessSettings,\n supportModel,\n} from \"../model-support.ts\";\nimport type { Bound } from \"../settings.types.ts\";\n\nfunction bindCopilot(settings: Bound<CopilotSettings>): AgentAdapter {\n supportModel(copilotModelSupport, settings.model);\n rejectProfileTools(copilotLabel, settings.profile);\n supportMcpServers(copilotMcpSupport, settings.mcpServers);\n const credentials = credentialPlanner(\n copilotLabel,\n copilotCredentials,\n settings.authentication,\n settings.model,\n );\n const configuration = mcpConfigurationPlanner(\n copilotLabel,\n settings.mcpServers,\n );\n return Object.freeze({\n name: \"copilot\",\n ...(credentials ? { credentials } : {}),\n ...(configuration ? { configuration } : {}),\n bootstrap: \"copilot\",\n resumable: true,\n forkable: false,\n ...conversationStorage(settings, createCopilotConversations),\n requiresFinishedEvent: true,\n variables: Object.freeze({\n COPILOT_AUTO_UPDATE: \"false\",\n ...settings.variables,\n }),\n request: (input) => copilotRequest(settings, input),\n events: copilotEvents,\n quota: textMatcher(copilotQuotaPatterns),\n unavailable: textMatcher(\n copilotUnavailablePatterns,\n transientNoticePatterns,\n ),\n usage: \"session\",\n usageCommand: (conversation) =>\n sessionUsageCommand(\"copilot\", conversation),\n usageResult: (text) => sessionUsageResult(text, copilotUsage),\n } satisfies AgentAdapter);\n}\n\nexport function createCopilotHarness(\n settings: CopilotSettings = {},\n): CliHarness {\n harnessSettings(settings);\n conversationSettings(copilotLabel, copilotSessionProfile.format, settings);\n const configured = configuredSettings(settings);\n return Object.freeze({\n kind: \"cli\",\n bind: (model?: AgentModel) =>\n bindCopilot({\n ...configured,\n ...(model === undefined ? {} : { model }),\n }),\n });\n}\n"]}
1
+ {"version":3,"file":"copilot-adapter.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,CAAC,oBAAoB,CAAC;QACxC,WAAW,EAAE,WAAW,CACtB,0BAA0B,EAC1B,uBAAuB,CACxB;QACD,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,CAAC,YAAY,EAAE,EAAE,CAC7B,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC;QAC9C,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,EAAE,YAAY,CAAC;KACvC,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,WAA4B,EAAE;IAE9B,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC1B,oBAAoB,CAAC,YAAY,EAAE,qBAAqB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3E,MAAM,UAAU,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG,mBAAmB,CAC/B,SAAS,EACT,kBAAkB,EAClB,UAAU,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAClC,QAAQ,CAAC,KAAK,CACf,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,CAAC,KAAkB,EAAE,EAAE,CAC3B,WAAW,CAAC;YACV,GAAG,UAAU;YACb,KAAK;YACL,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;SAC1C,CAAC;KACL,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { composedNativeHooks } from \"../native-hooks.ts\";\nimport { copilotHookSchemas } from \"./copilot-hooks.constants.ts\";\nimport { copilotHookPlan } from \"./copilot-hook-plan.ts\";\nimport { rejectProfileTools } from \"../profile-support.ts\";\nimport {\n createCopilotConversations,\n copilotSessionProfile,\n} from \"./copilot-conversations.ts\";\nimport {\n copilotLabel,\n copilotMcpSupport,\n copilotModelSupport,\n copilotQuotaPatterns,\n copilotUnavailablePatterns,\n} from \"./copilot.constants.ts\";\nimport {\n mcpConfigurationPlanner,\n supportMcpServers,\n} from \"../mcp-configuration.ts\";\nimport { textMatcher } from \"../text-matcher.ts\";\nimport {\n conversationSettings,\n conversationStorage,\n} from \"../conversation-settings.ts\";\nimport { transientNoticePatterns } from \"../unavailable.constants.ts\";\nimport { copilotUsage } from \"./copilot-usage.ts\";\nimport { sessionUsageCommand, sessionUsageResult } from \"../session-usage.ts\";\nimport type { AgentAdapter, CliHarness } from \"../../../domain/agent.types.ts\";\nimport type { AgentModel } from \"../../../domain/model.types.ts\";\nimport { credentialPlanner } from \"../authentication.ts\";\nimport { copilotCredentials } from \"./copilot-authentication.ts\";\nimport { copilotEvents } from \"./copilot-events.ts\";\nimport { copilotRequest } from \"./copilot-request.ts\";\nimport type { CopilotSettings } from \"./copilot.types.ts\";\nimport {\n configuredSettings,\n harnessSettings,\n supportModel,\n} from \"../model-support.ts\";\nimport type { Bound } from \"../settings.types.ts\";\n\nfunction bindCopilot(settings: Bound<CopilotSettings>): AgentAdapter {\n supportModel(copilotModelSupport, settings.model);\n rejectProfileTools(copilotLabel, settings.profile);\n supportMcpServers(copilotMcpSupport, settings.mcpServers);\n const credentials = credentialPlanner(\n copilotLabel,\n copilotCredentials,\n settings.authentication,\n settings.model,\n );\n const configuration = mcpConfigurationPlanner(\n copilotLabel,\n settings.mcpServers,\n );\n return Object.freeze({\n ...(settings.hooks?.length\n ? { hooks: copilotHookPlan(settings.hooks) }\n : {}),\n name: \"copilot\",\n ...(credentials ? { credentials } : {}),\n ...(configuration ? { configuration } : {}),\n bootstrap: \"copilot\",\n resumable: true,\n fileWorkspaces: Object.freeze({\n dispatch: true,\n repairs: true,\n continuation: true,\n interactive: true,\n }),\n forkable: false,\n ...conversationStorage(settings, createCopilotConversations),\n requiresFinishedEvent: true,\n variables: Object.freeze({\n COPILOT_AUTO_UPDATE: \"false\",\n ...settings.variables,\n }),\n request: (input) => copilotRequest(settings, input),\n events: copilotEvents,\n quota: textMatcher(copilotQuotaPatterns),\n unavailable: textMatcher(\n copilotUnavailablePatterns,\n transientNoticePatterns,\n ),\n usage: \"session\",\n usageCommand: (conversation) =>\n sessionUsageCommand(\"copilot\", conversation),\n usageResult: (text) => sessionUsageResult(text, copilotUsage),\n } satisfies AgentAdapter);\n}\n\nexport function createCopilotHarness(\n settings: CopilotSettings = {},\n): CliHarness {\n harnessSettings(settings);\n conversationSettings(copilotLabel, copilotSessionProfile.format, settings);\n const configured = configuredSettings(settings);\n const hooks = composedNativeHooks(\n \"copilot\",\n copilotHookSchemas,\n configured.profile?.hooks?.copilot,\n settings.hooks,\n );\n return Object.freeze({\n kind: \"cli\",\n bind: (model?: AgentModel) =>\n bindCopilot({\n ...configured,\n hooks,\n ...(model === undefined ? {} : { model }),\n }),\n });\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import type { AgentHookPlan } from "../../../domain/agent-hook.types.ts";
2
+ import type { CopilotHook } from "./copilot-hooks.types.ts";
3
+ export declare function copilotHookPlan(value: readonly CopilotHook[]): AgentHookPlan;
@@ -0,0 +1,26 @@
1
+ import { randomUUID } from "node:crypto";
2
+ import { installHookConfiguration } from "../../../infrastructure/hook-configuration.js";
3
+ import { nativeHooks } from "../native-hooks.js";
4
+ export function copilotHookPlan(value) {
5
+ const handlers = nativeHooks("copilot", value);
6
+ return {
7
+ handlers,
8
+ async prepare(sandbox, commands, signal) {
9
+ const hooks = {};
10
+ handlers.forEach((hook, index) => (hooks[hook.on] ??= []).push({
11
+ type: "command",
12
+ bash: commands[index],
13
+ powershell: commands[index],
14
+ timeoutSec: Math.ceil(hook.timeoutMs / 1000),
15
+ ...(hook.matcher === undefined ? {} : { matcher: hook.matcher }),
16
+ }));
17
+ const close = await installHookConfiguration(sandbox, {
18
+ kind: "exclusive",
19
+ path: `.copilot/hooks/outpost-${randomUUID()}.json`,
20
+ content: JSON.stringify({ version: 1, hooks }),
21
+ }, signal);
22
+ return { command: (command) => command, close };
23
+ },
24
+ };
25
+ }
26
+ //# sourceMappingURL=copilot-hook-plan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copilot-hook-plan.js","sourceRoot":"","sources":["../../../../src/adapters/agents/copilot/copilot-hook-plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,UAAU,eAAe,CAAC,KAA6B;IAC3D,MAAM,QAAQ,GAAG,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC/C,OAAO;QACL,QAAQ;QACR,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM;YACrC,MAAM,KAAK,GAA8B,EAAE,CAAC;YAC5C,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAC/B,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC;gBAC3B,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC;gBACrB,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC;gBAC3B,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;gBAC5C,GAAG,CAAC,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;aACjE,CAAC,CACH,CAAC;YACF,MAAM,KAAK,GAAG,MAAM,wBAAwB,CAC1C,OAAO,EACP;gBACE,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,0BAA0B,UAAU,EAAE,OAAO;gBACnD,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC;aAC/C,EACD,MAAM,CACP,CAAC;YACF,OAAO,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;QAClD,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { randomUUID } from \"node:crypto\";\nimport type { AgentHookPlan } from \"../../../domain/agent-hook.types.ts\";\nimport { installHookConfiguration } from \"../../../infrastructure/hook-configuration.ts\";\nimport { nativeHooks } from \"../native-hooks.ts\";\nimport type { CopilotHook } from \"./copilot-hooks.types.ts\";\n\nexport function copilotHookPlan(value: readonly CopilotHook[]): AgentHookPlan {\n const handlers = nativeHooks(\"copilot\", value);\n return {\n handlers,\n async prepare(sandbox, commands, signal) {\n const hooks: Record<string, unknown[]> = {};\n handlers.forEach((hook, index) =>\n (hooks[hook.on] ??= []).push({\n type: \"command\",\n bash: commands[index],\n powershell: commands[index],\n timeoutSec: Math.ceil(hook.timeoutMs / 1000),\n ...(hook.matcher === undefined ? {} : { matcher: hook.matcher }),\n }),\n );\n const close = await installHookConfiguration(\n sandbox,\n {\n kind: \"exclusive\",\n path: `.copilot/hooks/outpost-${randomUUID()}.json`,\n content: JSON.stringify({ version: 1, hooks }),\n },\n signal,\n );\n return { command: (command) => command, close };\n },\n };\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import type { NativeHookSchema } from "../native-hooks.types.ts";
2
+ import type { CopilotHookPhase } from "./copilot-hooks.types.ts";
3
+ export declare const copilotHookSchemas: Readonly<Record<CopilotHookPhase, NativeHookSchema>>;