lastlight 0.1.15 → 0.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 (478) hide show
  1. package/README.md +265 -118
  2. package/agent-context/rules.md +62 -9
  3. package/agent-context/security.md +69 -0
  4. package/config/default.yaml +89 -0
  5. package/deploy/.env.production.example +20 -2
  6. package/deploy/entrypoint.sh +16 -17
  7. package/deploy/native/README.md +160 -0
  8. package/deploy/native/install.sh +110 -0
  9. package/deploy/native/lastlight.env.example +95 -0
  10. package/deploy/native/lastlight.service +50 -0
  11. package/deploy/sandbox-entrypoint.sh +59 -42
  12. package/dist/admin/auth.d.ts +1 -1
  13. package/dist/admin/auth.js +3 -1
  14. package/dist/admin/auth.js.map +1 -1
  15. package/dist/admin/chat-session-reader.d.ts +11 -14
  16. package/dist/admin/chat-session-reader.js +27 -51
  17. package/dist/admin/chat-session-reader.js.map +1 -1
  18. package/dist/admin/docker.d.ts +37 -0
  19. package/dist/admin/docker.js +86 -1
  20. package/dist/admin/docker.js.map +1 -1
  21. package/dist/admin/index.js +38 -3
  22. package/dist/admin/index.js.map +1 -1
  23. package/dist/admin/log-search.test.d.ts +1 -0
  24. package/dist/admin/log-search.test.js +78 -0
  25. package/dist/admin/log-search.test.js.map +1 -0
  26. package/dist/admin/routes.d.ts +52 -3
  27. package/dist/admin/routes.js +780 -63
  28. package/dist/admin/routes.js.map +1 -1
  29. package/dist/admin/routes.test.js +680 -14
  30. package/dist/admin/routes.test.js.map +1 -1
  31. package/dist/admin/server-logs.test.d.ts +1 -0
  32. package/dist/admin/server-logs.test.js +58 -0
  33. package/dist/admin/server-logs.test.js.map +1 -0
  34. package/dist/admin/sessions.d.ts +26 -39
  35. package/dist/admin/sessions.js +86 -310
  36. package/dist/admin/sessions.js.map +1 -1
  37. package/dist/admin/sessions.test.d.ts +1 -0
  38. package/dist/admin/sessions.test.js +78 -0
  39. package/dist/admin/sessions.test.js.map +1 -0
  40. package/dist/admin/version.d.ts +15 -0
  41. package/dist/admin/version.js +73 -0
  42. package/dist/admin/version.js.map +1 -0
  43. package/dist/admin/version.test.d.ts +1 -0
  44. package/dist/admin/version.test.js +71 -0
  45. package/dist/admin/version.test.js.map +1 -0
  46. package/dist/cli-config.d.ts +55 -0
  47. package/dist/cli-config.js +119 -0
  48. package/dist/cli-config.js.map +1 -0
  49. package/dist/cli-config.test.d.ts +1 -0
  50. package/dist/cli-config.test.js +92 -0
  51. package/dist/cli-config.test.js.map +1 -0
  52. package/dist/cli-format.d.ts +19 -0
  53. package/dist/cli-format.js +107 -0
  54. package/dist/cli-format.js.map +1 -0
  55. package/dist/cli-server.d.ts +73 -0
  56. package/dist/cli-server.js +347 -0
  57. package/dist/cli-server.js.map +1 -0
  58. package/dist/cli-server.test.d.ts +1 -0
  59. package/dist/cli-server.test.js +38 -0
  60. package/dist/cli-server.test.js.map +1 -0
  61. package/dist/cli-timeline.d.ts +35 -0
  62. package/dist/cli-timeline.js +373 -0
  63. package/dist/cli-timeline.js.map +1 -0
  64. package/dist/cli-timeline.test.d.ts +1 -0
  65. package/dist/cli-timeline.test.js +104 -0
  66. package/dist/cli-timeline.test.js.map +1 -0
  67. package/dist/cli.d.ts +0 -19
  68. package/dist/cli.js +910 -194
  69. package/dist/cli.js.map +1 -1
  70. package/dist/config-overlay.test.d.ts +1 -0
  71. package/dist/config-overlay.test.js +112 -0
  72. package/dist/config-overlay.test.js.map +1 -0
  73. package/dist/config-resolve.d.ts +28 -0
  74. package/dist/config-resolve.js +47 -0
  75. package/dist/config-resolve.js.map +1 -0
  76. package/dist/config-resolve.test.d.ts +1 -0
  77. package/dist/config-resolve.test.js +68 -0
  78. package/dist/config-resolve.test.js.map +1 -0
  79. package/dist/config.d.ts +62 -49
  80. package/dist/config.js +452 -76
  81. package/dist/config.js.map +1 -1
  82. package/dist/config.test.js +201 -32
  83. package/dist/config.test.js.map +1 -1
  84. package/dist/connectors/github-webhook.js +83 -5
  85. package/dist/connectors/github-webhook.js.map +1 -1
  86. package/dist/connectors/github-webhook.test.d.ts +1 -0
  87. package/dist/connectors/github-webhook.test.js +156 -0
  88. package/dist/connectors/github-webhook.test.js.map +1 -0
  89. package/dist/connectors/messaging/session-manager.d.ts +18 -0
  90. package/dist/connectors/messaging/session-manager.js +83 -2
  91. package/dist/connectors/messaging/session-manager.js.map +1 -1
  92. package/dist/connectors/messaging/session-manager.test.d.ts +1 -0
  93. package/dist/connectors/messaging/session-manager.test.js +144 -0
  94. package/dist/connectors/messaging/session-manager.test.js.map +1 -0
  95. package/dist/connectors/slack/connector.d.ts +9 -0
  96. package/dist/connectors/slack/connector.js +15 -0
  97. package/dist/connectors/slack/connector.js.map +1 -1
  98. package/dist/connectors/slack/mrkdwn.js +81 -0
  99. package/dist/connectors/slack/mrkdwn.js.map +1 -1
  100. package/dist/connectors/slack/mrkdwn.test.js +49 -0
  101. package/dist/connectors/slack/mrkdwn.test.js.map +1 -1
  102. package/dist/connectors/types.d.ts +1 -1
  103. package/dist/cron/fanout.d.ts +33 -0
  104. package/dist/cron/fanout.js +55 -0
  105. package/dist/cron/fanout.js.map +1 -0
  106. package/dist/cron/fanout.test.d.ts +1 -0
  107. package/dist/cron/fanout.test.js +73 -0
  108. package/dist/cron/fanout.test.js.map +1 -0
  109. package/dist/cron/jobs.d.ts +5 -0
  110. package/dist/cron/jobs.js +10 -3
  111. package/dist/cron/jobs.js.map +1 -1
  112. package/dist/cron/scheduler.d.ts +12 -0
  113. package/dist/cron/scheduler.js +27 -1
  114. package/dist/cron/scheduler.js.map +1 -1
  115. package/dist/engine/agent-executor.d.ts +158 -0
  116. package/dist/engine/agent-executor.js +1140 -0
  117. package/dist/engine/agent-executor.js.map +1 -0
  118. package/dist/engine/agent-executor.test.d.ts +1 -0
  119. package/dist/engine/agent-executor.test.js +395 -0
  120. package/dist/engine/agent-executor.test.js.map +1 -0
  121. package/dist/engine/chat-runner.d.ts +123 -0
  122. package/dist/engine/chat-runner.js +379 -0
  123. package/dist/engine/chat-runner.js.map +1 -0
  124. package/dist/engine/chat-runner.test.d.ts +1 -0
  125. package/dist/engine/chat-runner.test.js +104 -0
  126. package/dist/engine/chat-runner.test.js.map +1 -0
  127. package/dist/engine/chat-skills.d.ts +45 -0
  128. package/dist/engine/chat-skills.js +184 -0
  129. package/dist/engine/chat-skills.js.map +1 -0
  130. package/dist/engine/chat-skills.test.d.ts +1 -0
  131. package/dist/engine/chat-skills.test.js +20 -0
  132. package/dist/engine/chat-skills.test.js.map +1 -0
  133. package/dist/engine/chat.d.ts +20 -23
  134. package/dist/engine/chat.js +251 -155
  135. package/dist/engine/chat.js.map +1 -1
  136. package/dist/engine/chat.test.d.ts +1 -0
  137. package/dist/engine/chat.test.js +42 -0
  138. package/dist/engine/chat.test.js.map +1 -0
  139. package/dist/engine/classifier.d.ts +35 -2
  140. package/dist/engine/classifier.js +170 -31
  141. package/dist/engine/classifier.js.map +1 -1
  142. package/dist/engine/classifier.test.d.ts +1 -0
  143. package/dist/engine/classifier.test.js +115 -0
  144. package/dist/engine/classifier.test.js.map +1 -0
  145. package/dist/engine/dispatcher.d.ts +60 -0
  146. package/dist/engine/dispatcher.js +601 -0
  147. package/dist/engine/dispatcher.js.map +1 -0
  148. package/dist/engine/dispatcher.test.d.ts +1 -0
  149. package/dist/engine/dispatcher.test.js +511 -0
  150. package/dist/engine/dispatcher.test.js.map +1 -0
  151. package/dist/engine/event-shim.d.ts +117 -0
  152. package/dist/engine/event-shim.js +435 -0
  153. package/dist/engine/event-shim.js.map +1 -0
  154. package/dist/engine/event-shim.test.d.ts +1 -0
  155. package/dist/engine/event-shim.test.js +194 -0
  156. package/dist/engine/event-shim.test.js.map +1 -0
  157. package/dist/engine/git-auth.d.ts +13 -17
  158. package/dist/engine/git-auth.js +99 -42
  159. package/dist/engine/git-auth.js.map +1 -1
  160. package/dist/engine/git-auth.test.d.ts +1 -0
  161. package/dist/engine/git-auth.test.js +117 -0
  162. package/dist/engine/git-auth.test.js.map +1 -0
  163. package/dist/engine/github-app-client.d.ts +7 -0
  164. package/dist/engine/github-app-client.js +16 -0
  165. package/dist/engine/github-app-client.js.map +1 -0
  166. package/dist/engine/github-app-client.test.d.ts +1 -0
  167. package/dist/engine/github-app-client.test.js +44 -0
  168. package/dist/engine/github-app-client.test.js.map +1 -0
  169. package/dist/engine/github-tools.d.ts +12 -0
  170. package/dist/engine/github-tools.js +261 -0
  171. package/dist/engine/github-tools.js.map +1 -0
  172. package/dist/engine/github.d.ts +1027 -43
  173. package/dist/engine/github.js +153 -14
  174. package/dist/engine/github.js.map +1 -1
  175. package/dist/engine/llm.d.ts +47 -0
  176. package/dist/engine/llm.js +221 -0
  177. package/dist/engine/llm.js.map +1 -0
  178. package/dist/engine/llm.test.d.ts +1 -0
  179. package/dist/engine/llm.test.js +189 -0
  180. package/dist/engine/llm.test.js.map +1 -0
  181. package/dist/engine/profiles.d.ts +249 -0
  182. package/dist/engine/profiles.js +42 -0
  183. package/dist/engine/profiles.js.map +1 -0
  184. package/dist/engine/router.d.ts +12 -6
  185. package/dist/engine/router.js +339 -81
  186. package/dist/engine/router.js.map +1 -1
  187. package/dist/engine/router.test.js +428 -78
  188. package/dist/engine/router.test.js.map +1 -1
  189. package/dist/engine/screen.d.ts +41 -0
  190. package/dist/engine/screen.js +93 -0
  191. package/dist/engine/screen.js.map +1 -0
  192. package/dist/engine/screen.test.d.ts +1 -0
  193. package/dist/engine/screen.test.js +82 -0
  194. package/dist/engine/screen.test.js.map +1 -0
  195. package/dist/index.js +377 -432
  196. package/dist/index.js.map +1 -1
  197. package/dist/managed-repos.d.ts +7 -9
  198. package/dist/managed-repos.js +12 -15
  199. package/dist/managed-repos.js.map +1 -1
  200. package/dist/managed-repos.test.js +24 -19
  201. package/dist/managed-repos.test.js.map +1 -1
  202. package/dist/notify/index.d.ts +15 -0
  203. package/dist/notify/index.js +6 -0
  204. package/dist/notify/index.js.map +1 -0
  205. package/dist/notify/model.d.ts +57 -0
  206. package/dist/notify/model.js +89 -0
  207. package/dist/notify/model.js.map +1 -0
  208. package/dist/notify/model.test.d.ts +1 -0
  209. package/dist/notify/model.test.js +109 -0
  210. package/dist/notify/model.test.js.map +1 -0
  211. package/dist/notify/notifier.d.ts +17 -0
  212. package/dist/notify/notifier.js +87 -0
  213. package/dist/notify/notifier.js.map +1 -0
  214. package/dist/notify/notifier.test.d.ts +1 -0
  215. package/dist/notify/notifier.test.js +100 -0
  216. package/dist/notify/notifier.test.js.map +1 -0
  217. package/dist/notify/render.d.ts +21 -0
  218. package/dist/notify/render.js +59 -0
  219. package/dist/notify/render.js.map +1 -0
  220. package/dist/notify/render.test.d.ts +1 -0
  221. package/dist/notify/render.test.js +65 -0
  222. package/dist/notify/render.test.js.map +1 -0
  223. package/dist/notify/transports/github.d.ts +26 -0
  224. package/dist/notify/transports/github.js +26 -0
  225. package/dist/notify/transports/github.js.map +1 -0
  226. package/dist/notify/transports/slack.d.ts +26 -0
  227. package/dist/notify/transports/slack.js +28 -0
  228. package/dist/notify/transports/slack.js.map +1 -0
  229. package/dist/notify/transports.test.d.ts +1 -0
  230. package/dist/notify/transports.test.js +71 -0
  231. package/dist/notify/transports.test.js.map +1 -0
  232. package/dist/notify/types.d.ts +95 -0
  233. package/dist/notify/types.js +16 -0
  234. package/dist/notify/types.js.map +1 -0
  235. package/dist/sandbox/docker-compose.test.d.ts +1 -0
  236. package/dist/sandbox/docker-compose.test.js +128 -0
  237. package/dist/sandbox/docker-compose.test.js.map +1 -0
  238. package/dist/sandbox/docker.d.ts +97 -9
  239. package/dist/sandbox/docker.js +192 -41
  240. package/dist/sandbox/docker.js.map +1 -1
  241. package/dist/sandbox/docker.test.d.ts +1 -0
  242. package/dist/sandbox/docker.test.js +137 -0
  243. package/dist/sandbox/docker.test.js.map +1 -0
  244. package/dist/sandbox/egress-allowlist.d.ts +69 -0
  245. package/dist/sandbox/egress-allowlist.js +164 -0
  246. package/dist/sandbox/egress-allowlist.js.map +1 -0
  247. package/dist/sandbox/egress-allowlist.test.d.ts +1 -0
  248. package/dist/sandbox/egress-allowlist.test.js +65 -0
  249. package/dist/sandbox/egress-allowlist.test.js.map +1 -0
  250. package/dist/sandbox/egress-firewall-config.d.ts +127 -0
  251. package/dist/sandbox/egress-firewall-config.js +434 -0
  252. package/dist/sandbox/egress-firewall-config.js.map +1 -0
  253. package/dist/sandbox/egress-firewall-config.test.d.ts +1 -0
  254. package/dist/sandbox/egress-firewall-config.test.js +244 -0
  255. package/dist/sandbox/egress-firewall-config.test.js.map +1 -0
  256. package/dist/sandbox/images.d.ts +23 -0
  257. package/dist/sandbox/images.js +55 -0
  258. package/dist/sandbox/images.js.map +1 -0
  259. package/dist/sandbox/index.d.ts +82 -3
  260. package/dist/sandbox/index.js +223 -93
  261. package/dist/sandbox/index.js.map +1 -1
  262. package/dist/sandbox/index.test.d.ts +1 -0
  263. package/dist/sandbox/index.test.js +157 -0
  264. package/dist/sandbox/index.test.js.map +1 -0
  265. package/dist/session-log.d.ts +63 -0
  266. package/dist/session-log.js +290 -0
  267. package/dist/session-log.js.map +1 -0
  268. package/dist/session-log.test.d.ts +1 -0
  269. package/dist/session-log.test.js +85 -0
  270. package/dist/session-log.test.js.map +1 -0
  271. package/dist/setup.d.ts +30 -1
  272. package/dist/setup.js +241 -25
  273. package/dist/setup.js.map +1 -1
  274. package/dist/setup.test.js +138 -6
  275. package/dist/setup.test.js.map +1 -1
  276. package/dist/state/approval-store.d.ts +86 -0
  277. package/dist/state/approval-store.js +140 -0
  278. package/dist/state/approval-store.js.map +1 -0
  279. package/dist/state/build-assets.d.ts +50 -0
  280. package/dist/state/build-assets.js +154 -0
  281. package/dist/state/build-assets.js.map +1 -0
  282. package/dist/state/build-assets.test.d.ts +1 -0
  283. package/dist/state/build-assets.test.js +106 -0
  284. package/dist/state/build-assets.test.js.map +1 -0
  285. package/dist/state/db.d.ts +65 -333
  286. package/dist/state/db.js +112 -835
  287. package/dist/state/db.js.map +1 -1
  288. package/dist/state/db.test.js +127 -91
  289. package/dist/state/db.test.js.map +1 -1
  290. package/dist/state/execution-store.d.ts +257 -0
  291. package/dist/state/execution-store.js +527 -0
  292. package/dist/state/execution-store.js.map +1 -0
  293. package/dist/state/migrate.d.ts +15 -0
  294. package/dist/state/migrate.js +175 -0
  295. package/dist/state/migrate.js.map +1 -0
  296. package/dist/state/workflow-run-store.d.ts +195 -0
  297. package/dist/state/workflow-run-store.js +363 -0
  298. package/dist/state/workflow-run-store.js.map +1 -0
  299. package/dist/state/workflow-run-store.test.d.ts +1 -0
  300. package/dist/state/workflow-run-store.test.js +264 -0
  301. package/dist/state/workflow-run-store.test.js.map +1 -0
  302. package/dist/telemetry/index.d.ts +38 -0
  303. package/dist/telemetry/index.js +253 -0
  304. package/dist/telemetry/index.js.map +1 -0
  305. package/dist/telemetry/index.test.d.ts +1 -0
  306. package/dist/telemetry/index.test.js +73 -0
  307. package/dist/telemetry/index.test.js.map +1 -0
  308. package/dist/telemetry/pi-events.d.ts +12 -0
  309. package/dist/telemetry/pi-events.js +134 -0
  310. package/dist/telemetry/pi-events.js.map +1 -0
  311. package/dist/telemetry/pi-events.test.d.ts +1 -0
  312. package/dist/telemetry/pi-events.test.js +69 -0
  313. package/dist/telemetry/pi-events.test.js.map +1 -0
  314. package/dist/workflows/dag.d.ts +13 -1
  315. package/dist/workflows/dag.js +7 -3
  316. package/dist/workflows/dag.js.map +1 -1
  317. package/dist/workflows/dag.test.js +22 -0
  318. package/dist/workflows/dag.test.js.map +1 -1
  319. package/dist/workflows/golden-build.test.d.ts +1 -0
  320. package/dist/workflows/golden-build.test.js +45 -0
  321. package/dist/workflows/golden-build.test.js.map +1 -0
  322. package/dist/workflows/loader-overlay.test.d.ts +1 -0
  323. package/dist/workflows/loader-overlay.test.js +101 -0
  324. package/dist/workflows/loader-overlay.test.js.map +1 -0
  325. package/dist/workflows/loader.d.ts +36 -11
  326. package/dist/workflows/loader.js +311 -87
  327. package/dist/workflows/loader.js.map +1 -1
  328. package/dist/workflows/loader.test.js +114 -10
  329. package/dist/workflows/loader.test.js.map +1 -1
  330. package/dist/workflows/loop-eval.js +2 -0
  331. package/dist/workflows/loop-eval.js.map +1 -1
  332. package/dist/workflows/loop-eval.test.js +14 -0
  333. package/dist/workflows/loop-eval.test.js.map +1 -1
  334. package/dist/workflows/phase-executor.d.ts +145 -0
  335. package/dist/workflows/phase-executor.js +691 -0
  336. package/dist/workflows/phase-executor.js.map +1 -0
  337. package/dist/workflows/phase-executor.test.d.ts +1 -0
  338. package/dist/workflows/phase-executor.test.js +434 -0
  339. package/dist/workflows/phase-executor.test.js.map +1 -0
  340. package/dist/workflows/phase-ref.d.ts +44 -0
  341. package/dist/workflows/phase-ref.js +78 -0
  342. package/dist/workflows/phase-ref.js.map +1 -0
  343. package/dist/workflows/phase-ref.test.d.ts +1 -0
  344. package/dist/workflows/phase-ref.test.js +24 -0
  345. package/dist/workflows/phase-ref.test.js.map +1 -0
  346. package/dist/workflows/resume.d.ts +5 -11
  347. package/dist/workflows/resume.js +88 -7
  348. package/dist/workflows/resume.js.map +1 -1
  349. package/dist/workflows/runner.d.ts +34 -27
  350. package/dist/workflows/runner.js +252 -930
  351. package/dist/workflows/runner.js.map +1 -1
  352. package/dist/workflows/runner.test.js +346 -35
  353. package/dist/workflows/runner.test.js.map +1 -1
  354. package/dist/workflows/schema.d.ts +52 -10
  355. package/dist/workflows/schema.js +147 -7
  356. package/dist/workflows/schema.js.map +1 -1
  357. package/dist/workflows/simple.d.ts +67 -3
  358. package/dist/workflows/simple.js +248 -87
  359. package/dist/workflows/simple.js.map +1 -1
  360. package/dist/workflows/simple.test.d.ts +1 -0
  361. package/dist/workflows/simple.test.js +107 -0
  362. package/dist/workflows/simple.test.js.map +1 -0
  363. package/dist/workflows/templates.d.ts +29 -0
  364. package/dist/workflows/templates.js +42 -4
  365. package/dist/workflows/templates.js.map +1 -1
  366. package/dist/workflows/templates.test.js +103 -0
  367. package/dist/workflows/templates.test.js.map +1 -1
  368. package/dist/workflows/triggers.d.ts +21 -0
  369. package/dist/workflows/triggers.js +44 -0
  370. package/dist/workflows/triggers.js.map +1 -0
  371. package/dist/workflows/verdict.d.ts +19 -0
  372. package/dist/workflows/verdict.js +30 -0
  373. package/dist/workflows/verdict.js.map +1 -0
  374. package/dist/workflows/verdict.test.d.ts +1 -0
  375. package/dist/workflows/verdict.test.js +44 -0
  376. package/dist/workflows/verdict.test.js.map +1 -0
  377. package/dist/worktree/manager.d.ts +1 -1
  378. package/dist/worktree/manager.js +14 -14
  379. package/dist/worktree/manager.js.map +1 -1
  380. package/dist/worktree/manager.test.d.ts +1 -0
  381. package/dist/worktree/manager.test.js +87 -0
  382. package/dist/worktree/manager.test.js.map +1 -0
  383. package/docker-compose.yml +206 -5
  384. package/package.json +17 -7
  385. package/sandbox.Dockerfile +97 -18
  386. package/skills/README.md +40 -0
  387. package/skills/browser-qa/SKILL.md +193 -0
  388. package/skills/browser-qa/scripts/agent-browser.mjs +380 -0
  389. package/skills/building/SKILL.md +95 -0
  390. package/skills/chat/SKILL.md +30 -11
  391. package/skills/code-review/SKILL.md +59 -0
  392. package/skills/debug-production/SKILL.md +108 -0
  393. package/skills/demo/SKILL.md +194 -0
  394. package/skills/demo/scripts/compose-demo.sh +205 -0
  395. package/skills/issue-answer/SKILL.md +90 -0
  396. package/skills/issue-comment/SKILL.md +38 -24
  397. package/skills/issue-triage/SKILL.md +103 -37
  398. package/skills/issue-triage/references/AGENT-BRIEF.md +61 -0
  399. package/skills/pr-comment/SKILL.md +64 -0
  400. package/skills/pr-review/SKILL.md +65 -49
  401. package/skills/qa-test/SKILL.md +97 -0
  402. package/skills/repo-health/SKILL.md +48 -45
  403. package/skills/security-feedback/SKILL.md +173 -0
  404. package/skills/security-feedback/references/templates.md +77 -0
  405. package/skills/security-review/SKILL.md +213 -0
  406. package/skills/security-review/references/issue-format.md +302 -0
  407. package/skills/verify/SKILL.md +118 -0
  408. package/workflows/answer.yaml +37 -0
  409. package/workflows/build.yaml +32 -22
  410. package/workflows/cron-security.yaml +6 -0
  411. package/workflows/demo.yaml +55 -0
  412. package/workflows/explore.yaml +9 -0
  413. package/workflows/pr-comment.yaml +16 -0
  414. package/workflows/pr-fix.yaml +3 -0
  415. package/workflows/pr-review.yaml +4 -1
  416. package/workflows/prompts/answer.md +67 -0
  417. package/workflows/prompts/architect.md +24 -7
  418. package/workflows/prompts/demo.md +100 -0
  419. package/workflows/prompts/executor.md +29 -20
  420. package/workflows/prompts/explore-ask.md +51 -22
  421. package/workflows/prompts/explore-publish.md +2 -2
  422. package/workflows/prompts/explore-read.md +24 -10
  423. package/workflows/prompts/explore-synthesize.md +15 -8
  424. package/workflows/prompts/fix.md +9 -10
  425. package/workflows/prompts/guardrails.md +26 -8
  426. package/workflows/prompts/pr-fix.md +6 -7
  427. package/workflows/prompts/pr.md +11 -10
  428. package/workflows/prompts/qa-browser.md +95 -0
  429. package/workflows/prompts/qa-synth.md +44 -0
  430. package/workflows/prompts/qa-test.md +60 -0
  431. package/workflows/prompts/re-reviewer.md +8 -9
  432. package/workflows/prompts/reviewer.md +10 -9
  433. package/workflows/prompts/verify-browser.md +93 -0
  434. package/workflows/prompts/verify-synth.md +44 -0
  435. package/workflows/prompts/verify.md +63 -0
  436. package/workflows/qa-test.yaml +87 -0
  437. package/workflows/security-feedback.yaml +25 -0
  438. package/workflows/security-review.yaml +29 -0
  439. package/workflows/verify.yaml +85 -0
  440. package/deploy/mcp-config.tmpl.json +0 -14
  441. package/dist/cron/rate-limits.d.ts +0 -26
  442. package/dist/cron/rate-limits.js +0 -193
  443. package/dist/cron/rate-limits.js.map +0 -1
  444. package/dist/engine/executor.d.ts +0 -75
  445. package/dist/engine/executor.js +0 -292
  446. package/dist/engine/executor.js.map +0 -1
  447. package/mcp-github-app/package.json +0 -18
  448. package/mcp-github-app/src/auth.js +0 -66
  449. package/mcp-github-app/src/github.js +0 -371
  450. package/mcp-github-app/src/index.js +0 -534
  451. package/skills/devops/webhook-subscriptions/SKILL.md +0 -180
  452. package/skills/github/DESCRIPTION.md +0 -3
  453. package/skills/github/codebase-inspection/SKILL.md +0 -115
  454. package/skills/github/github-auth/SKILL.md +0 -54
  455. package/skills/github/github-auth/scripts/gh-env.sh +0 -66
  456. package/skills/github/github-code-review/SKILL.md +0 -480
  457. package/skills/github/github-code-review/references/review-output-template.md +0 -74
  458. package/skills/github/github-issues/SKILL.md +0 -369
  459. package/skills/github/github-issues/templates/bug-report.md +0 -35
  460. package/skills/github/github-issues/templates/feature-request.md +0 -31
  461. package/skills/github/github-pr-workflow/SKILL.md +0 -395
  462. package/skills/github/github-pr-workflow/references/ci-troubleshooting.md +0 -183
  463. package/skills/github/github-pr-workflow/references/conventional-commits.md +0 -71
  464. package/skills/github/github-pr-workflow/templates/pr-body-bugfix.md +0 -35
  465. package/skills/github/github-pr-workflow/templates/pr-body-feature.md +0 -33
  466. package/skills/github/github-repo-management/SKILL.md +0 -515
  467. package/skills/github/github-repo-management/references/github-api-cheatsheet.md +0 -161
  468. package/skills/github-orchestrator/SKILL.md +0 -103
  469. package/skills/mcp/DESCRIPTION.md +0 -3
  470. package/skills/mcp/mcporter/SKILL.md +0 -122
  471. package/skills/mcp/native-mcp/SKILL.md +0 -356
  472. package/skills/software-development/architect/SKILL.md +0 -154
  473. package/skills/software-development/assure-guardrails/SKILL.md +0 -239
  474. package/skills/software-development/plan/SKILL.md +0 -64
  475. package/skills/software-development/requesting-code-review/SKILL.md +0 -291
  476. package/skills/software-development/subagent-driven-development/SKILL.md +0 -433
  477. package/skills/software-development/systematic-debugging/SKILL.md +0 -366
  478. package/skills/software-development/test-driven-development/SKILL.md +0 -342
@@ -1,15 +1,27 @@
1
+ import { type GitHubAppClientConfig } from "./github-app-client.js";
2
+ /** GitHub reaction emoji values accepted by the reactions API. */
3
+ export type ReactionContent = "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes";
1
4
  /**
2
5
  * GitHub client for the harness — uses GitHub App auth.
3
6
  * Used by the orchestrator to post comments, not by agent sessions.
4
7
  */
5
8
  export declare class GitHubClient {
6
9
  private octokit;
7
- constructor(config: {
8
- appId: string;
9
- privateKeyPath: string;
10
- installationId: string;
11
- });
12
- postComment(owner: string, repo: string, issueNumber: number, body: string): Promise<void>;
10
+ constructor(config: GitHubAppClientConfig);
11
+ /**
12
+ * Create a new comment on an issue/PR. Returns the new comment id so callers
13
+ * that want to edit it later (the in-place status checklist — see
14
+ * `src/notify/transports/github.ts`) can hold onto a handle. Callers that
15
+ * just post a one-off comment can ignore the return.
16
+ */
17
+ postComment(owner: string, repo: string, issueNumber: number, body: string): Promise<number>;
18
+ /**
19
+ * Edit an existing issue/PR comment in place. Paired with `postComment` to
20
+ * maintain a single status comment that updates as a workflow progresses,
21
+ * rather than posting a new comment per phase. GitHub does NOT notify
22
+ * watchers on edits, which is exactly why this keeps the thread quiet.
23
+ */
24
+ updateComment(owner: string, repo: string, commentId: number, body: string): Promise<void>;
13
25
  /**
14
26
  * Add an emoji reaction to a specific issue comment. Used as an immediate
15
27
  * (silent) acknowledgment that the agent has accepted a request, before
@@ -18,7 +30,19 @@ export declare class GitHubClient {
18
30
  * Reaction `content` values: "+1" | "-1" | "laugh" | "confused" | "heart"
19
31
  * | "hooray" | "rocket" | "eyes".
20
32
  */
21
- reactToComment(owner: string, repo: string, commentId: number, content?: "rocket" | "+1" | "eyes" | "hooray"): Promise<void>;
33
+ reactToComment(owner: string, repo: string, commentId: number, content?: ReactionContent): Promise<void>;
34
+ /**
35
+ * Add an emoji reaction to an issue or PR itself (not a comment) — used to
36
+ * ack events that aren't comments, e.g. a freshly opened issue/PR. PRs are
37
+ * issues for the reactions API, so this works for both.
38
+ */
39
+ reactToIssue(owner: string, repo: string, issueNumber: number, content?: ReactionContent): Promise<void>;
40
+ /**
41
+ * Add an emoji reaction to a pull-request review comment (inline diff
42
+ * comment). Distinct endpoint from issue comments — review comments live on
43
+ * the pulls API.
44
+ */
45
+ reactToReviewComment(owner: string, repo: string, commentId: number, content?: ReactionContent): Promise<void>;
22
46
  getIssue(owner: string, repo: string, issueNumber: number): Promise<{
23
47
  id: number;
24
48
  node_id: string;
@@ -33,8 +57,31 @@ export declare class GitHubClient {
33
57
  state_reason?: "completed" | "reopened" | "not_planned" | "duplicate" | null;
34
58
  title: string;
35
59
  body?: string | null;
36
- user: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"];
37
- labels: import("@octokit/openapi-types").OneOf<[string, {
60
+ user: {
61
+ name?: string | null;
62
+ email?: string | null;
63
+ login: string;
64
+ id: number;
65
+ node_id: string;
66
+ avatar_url: string;
67
+ gravatar_id: string | null;
68
+ url: string;
69
+ html_url: string;
70
+ followers_url: string;
71
+ following_url: string;
72
+ gists_url: string;
73
+ starred_url: string;
74
+ subscriptions_url: string;
75
+ organizations_url: string;
76
+ repos_url: string;
77
+ events_url: string;
78
+ received_events_url: string;
79
+ type: string;
80
+ site_admin: boolean;
81
+ starred_at?: string;
82
+ user_view_type?: string;
83
+ } | null;
84
+ labels: (string | {
38
85
  id?: number;
39
86
  node_id?: string;
40
87
  url?: string;
@@ -42,10 +89,96 @@ export declare class GitHubClient {
42
89
  description?: string | null;
43
90
  color?: string | null;
44
91
  default?: boolean;
45
- }]>[];
46
- assignee: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"];
47
- assignees?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null;
48
- milestone: import("@octokit/openapi-types").components["schemas"]["nullable-milestone"];
92
+ })[];
93
+ assignee: {
94
+ name?: string | null;
95
+ email?: string | null;
96
+ login: string;
97
+ id: number;
98
+ node_id: string;
99
+ avatar_url: string;
100
+ gravatar_id: string | null;
101
+ url: string;
102
+ html_url: string;
103
+ followers_url: string;
104
+ following_url: string;
105
+ gists_url: string;
106
+ starred_url: string;
107
+ subscriptions_url: string;
108
+ organizations_url: string;
109
+ repos_url: string;
110
+ events_url: string;
111
+ received_events_url: string;
112
+ type: string;
113
+ site_admin: boolean;
114
+ starred_at?: string;
115
+ user_view_type?: string;
116
+ } | null;
117
+ assignees?: {
118
+ name?: string | null;
119
+ email?: string | null;
120
+ login: string;
121
+ id: number;
122
+ node_id: string;
123
+ avatar_url: string;
124
+ gravatar_id: string | null;
125
+ url: string;
126
+ html_url: string;
127
+ followers_url: string;
128
+ following_url: string;
129
+ gists_url: string;
130
+ starred_url: string;
131
+ subscriptions_url: string;
132
+ organizations_url: string;
133
+ repos_url: string;
134
+ events_url: string;
135
+ received_events_url: string;
136
+ type: string;
137
+ site_admin: boolean;
138
+ starred_at?: string;
139
+ user_view_type?: string;
140
+ }[] | null;
141
+ milestone: {
142
+ url: string;
143
+ html_url: string;
144
+ labels_url: string;
145
+ id: number;
146
+ node_id: string;
147
+ number: number;
148
+ state: "open" | "closed";
149
+ title: string;
150
+ description: string | null;
151
+ creator: {
152
+ name?: string | null;
153
+ email?: string | null;
154
+ login: string;
155
+ id: number;
156
+ node_id: string;
157
+ avatar_url: string;
158
+ gravatar_id: string | null;
159
+ url: string;
160
+ html_url: string;
161
+ followers_url: string;
162
+ following_url: string;
163
+ gists_url: string;
164
+ starred_url: string;
165
+ subscriptions_url: string;
166
+ organizations_url: string;
167
+ repos_url: string;
168
+ events_url: string;
169
+ received_events_url: string;
170
+ type: string;
171
+ site_admin: boolean;
172
+ starred_at?: string;
173
+ user_view_type?: string;
174
+ } | null;
175
+ open_issues: number;
176
+ closed_issues: number;
177
+ created_at: string;
178
+ updated_at: string;
179
+ closed_at: string | null;
180
+ due_on: string | null;
181
+ } | null;
49
182
  locked: boolean;
50
183
  active_lock_reason?: string | null;
51
184
  comments: number;
@@ -60,20 +193,292 @@ export declare class GitHubClient {
60
193
  created_at: string;
61
194
  updated_at: string;
62
195
  draft?: boolean;
63
- closed_by?: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"];
196
+ closed_by?: {
197
+ name?: string | null;
198
+ email?: string | null;
199
+ login: string;
200
+ id: number;
201
+ node_id: string;
202
+ avatar_url: string;
203
+ gravatar_id: string | null;
204
+ url: string;
205
+ html_url: string;
206
+ followers_url: string;
207
+ following_url: string;
208
+ gists_url: string;
209
+ starred_url: string;
210
+ subscriptions_url: string;
211
+ organizations_url: string;
212
+ repos_url: string;
213
+ events_url: string;
214
+ received_events_url: string;
215
+ type: string;
216
+ site_admin: boolean;
217
+ starred_at?: string;
218
+ user_view_type?: string;
219
+ } | null;
64
220
  body_html?: string;
65
221
  body_text?: string;
66
222
  timeline_url?: string;
67
- type?: import("@octokit/openapi-types").components["schemas"]["issue-type"];
68
- repository?: import("@octokit/openapi-types").components["schemas"]["repository"];
69
- performed_via_github_app?: import("@octokit/openapi-types").components["schemas"]["nullable-integration"];
70
- author_association?: import("@octokit/openapi-types").components["schemas"]["author-association"];
71
- reactions?: import("@octokit/openapi-types").components["schemas"]["reaction-rollup"];
72
- sub_issues_summary?: import("@octokit/openapi-types").components["schemas"]["sub-issues-summary"];
223
+ type?: {
224
+ id: number;
225
+ node_id: string;
226
+ name: string;
227
+ description: string | null;
228
+ color?: "gray" | "blue" | "green" | "yellow" | "orange" | "red" | "pink" | "purple" | null;
229
+ created_at?: string;
230
+ updated_at?: string;
231
+ is_enabled?: boolean;
232
+ } | null;
233
+ repository?: {
234
+ id: number;
235
+ node_id: string;
236
+ name: string;
237
+ full_name: string;
238
+ license: {
239
+ key: string;
240
+ name: string;
241
+ url: string | null;
242
+ spdx_id: string | null;
243
+ node_id: string;
244
+ html_url?: string;
245
+ } | null;
246
+ forks: number;
247
+ permissions?: {
248
+ admin: boolean;
249
+ pull: boolean;
250
+ triage?: boolean;
251
+ push: boolean;
252
+ maintain?: boolean;
253
+ };
254
+ owner: {
255
+ name?: string | null;
256
+ email?: string | null;
257
+ login: string;
258
+ id: number;
259
+ node_id: string;
260
+ avatar_url: string;
261
+ gravatar_id: string | null;
262
+ url: string;
263
+ html_url: string;
264
+ followers_url: string;
265
+ following_url: string;
266
+ gists_url: string;
267
+ starred_url: string;
268
+ subscriptions_url: string;
269
+ organizations_url: string;
270
+ repos_url: string;
271
+ events_url: string;
272
+ received_events_url: string;
273
+ type: string;
274
+ site_admin: boolean;
275
+ starred_at?: string;
276
+ user_view_type?: string;
277
+ };
278
+ private: boolean;
279
+ html_url: string;
280
+ description: string | null;
281
+ fork: boolean;
282
+ url: string;
283
+ archive_url: string;
284
+ assignees_url: string;
285
+ blobs_url: string;
286
+ branches_url: string;
287
+ collaborators_url: string;
288
+ comments_url: string;
289
+ commits_url: string;
290
+ compare_url: string;
291
+ contents_url: string;
292
+ contributors_url: string;
293
+ deployments_url: string;
294
+ downloads_url: string;
295
+ events_url: string;
296
+ forks_url: string;
297
+ git_commits_url: string;
298
+ git_refs_url: string;
299
+ git_tags_url: string;
300
+ git_url: string;
301
+ issue_comment_url: string;
302
+ issue_events_url: string;
303
+ issues_url: string;
304
+ keys_url: string;
305
+ labels_url: string;
306
+ languages_url: string;
307
+ merges_url: string;
308
+ milestones_url: string;
309
+ notifications_url: string;
310
+ pulls_url: string;
311
+ releases_url: string;
312
+ ssh_url: string;
313
+ stargazers_url: string;
314
+ statuses_url: string;
315
+ subscribers_url: string;
316
+ subscription_url: string;
317
+ tags_url: string;
318
+ teams_url: string;
319
+ trees_url: string;
320
+ clone_url: string;
321
+ mirror_url: string | null;
322
+ hooks_url: string;
323
+ svn_url: string;
324
+ homepage: string | null;
325
+ language: string | null;
326
+ forks_count: number;
327
+ stargazers_count: number;
328
+ watchers_count: number;
329
+ size: number;
330
+ default_branch: string;
331
+ open_issues_count: number;
332
+ is_template?: boolean;
333
+ topics?: string[];
334
+ has_issues: boolean;
335
+ has_projects: boolean;
336
+ has_wiki: boolean;
337
+ has_pages: boolean;
338
+ has_downloads: boolean;
339
+ has_discussions?: boolean;
340
+ archived: boolean;
341
+ disabled: boolean;
342
+ visibility?: string;
343
+ pushed_at: string | null;
344
+ created_at: string | null;
345
+ updated_at: string | null;
346
+ allow_rebase_merge?: boolean;
347
+ temp_clone_token?: string;
348
+ allow_squash_merge?: boolean;
349
+ allow_auto_merge?: boolean;
350
+ delete_branch_on_merge?: boolean;
351
+ allow_update_branch?: boolean;
352
+ use_squash_pr_title_as_default?: boolean;
353
+ squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE";
354
+ squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK";
355
+ merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE";
356
+ merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK";
357
+ allow_merge_commit?: boolean;
358
+ allow_forking?: boolean;
359
+ web_commit_signoff_required?: boolean;
360
+ open_issues: number;
361
+ watchers: number;
362
+ master_branch?: string;
363
+ starred_at?: string;
364
+ anonymous_access_enabled?: boolean;
365
+ code_search_index_status?: {
366
+ lexical_search_ok?: boolean;
367
+ lexical_commit_sha?: string;
368
+ };
369
+ };
370
+ performed_via_github_app?: {
371
+ id: number;
372
+ slug?: string;
373
+ node_id: string;
374
+ client_id?: string;
375
+ owner: {
376
+ name?: string | null;
377
+ email?: string | null;
378
+ login: string;
379
+ id: number;
380
+ node_id: string;
381
+ avatar_url: string;
382
+ gravatar_id: string | null;
383
+ url: string;
384
+ html_url: string;
385
+ followers_url: string;
386
+ following_url: string;
387
+ gists_url: string;
388
+ starred_url: string;
389
+ subscriptions_url: string;
390
+ organizations_url: string;
391
+ repos_url: string;
392
+ events_url: string;
393
+ received_events_url: string;
394
+ type: string;
395
+ site_admin: boolean;
396
+ starred_at?: string;
397
+ user_view_type?: string;
398
+ } | {
399
+ description?: string | null;
400
+ html_url: string;
401
+ website_url?: string | null;
402
+ id: number;
403
+ node_id: string;
404
+ name: string;
405
+ slug: string;
406
+ created_at: string | null;
407
+ updated_at: string | null;
408
+ avatar_url: string;
409
+ };
410
+ name: string;
411
+ description: string | null;
412
+ external_url: string;
413
+ html_url: string;
414
+ created_at: string;
415
+ updated_at: string;
416
+ permissions: {
417
+ issues?: string;
418
+ checks?: string;
419
+ metadata?: string;
420
+ contents?: string;
421
+ deployments?: string;
422
+ [key: string]: string | undefined;
423
+ };
424
+ events: string[];
425
+ installations_count?: number;
426
+ } | null;
427
+ author_association?: "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIMER" | "FIRST_TIME_CONTRIBUTOR" | "MANNEQUIN" | "MEMBER" | "NONE" | "OWNER";
428
+ reactions?: {
429
+ url: string;
430
+ total_count: number;
431
+ "+1": number;
432
+ "-1": number;
433
+ laugh: number;
434
+ confused: number;
435
+ heart: number;
436
+ hooray: number;
437
+ eyes: number;
438
+ rocket: number;
439
+ };
440
+ sub_issues_summary?: {
441
+ total: number;
442
+ completed: number;
443
+ percent_completed: number;
444
+ };
73
445
  parent_issue_url?: string | null;
74
- issue_dependencies_summary?: import("@octokit/openapi-types").components["schemas"]["issue-dependencies-summary"];
75
- issue_field_values?: import("@octokit/openapi-types").components["schemas"]["issue-field-value"][];
446
+ issue_dependencies_summary?: {
447
+ blocked_by: number;
448
+ blocking: number;
449
+ total_blocked_by: number;
450
+ total_blocking: number;
451
+ };
452
+ issue_field_values?: {
453
+ issue_field_id: number;
454
+ node_id: string;
455
+ data_type: "text" | "single_select" | "number" | "date";
456
+ value: (string | number) | null;
457
+ single_select_option?: {
458
+ id: number;
459
+ name: string;
460
+ color: string;
461
+ } | null;
462
+ }[];
76
463
  }>;
464
+ /**
465
+ * Fetch the issue body. Used by the dispatch path so build/explore/pr-fix
466
+ * workflows always see the real issue body, even when triggered from a
467
+ * comment (where the EventEnvelope.body field is the comment, not the
468
+ * issue body).
469
+ */
470
+ getIssueBody(owner: string, repo: string, issueNumber: number): Promise<string>;
471
+ /**
472
+ * List all comments on an issue/PR, oldest first. Used by the dispatch path
473
+ * to inject the full conversation thread into the architect's context — the
474
+ * spec the bot writes during an `explore` run lives here, and the build
475
+ * cycle needs to see it to implement the agreed design.
476
+ */
477
+ listIssueComments(owner: string, repo: string, issueNumber: number): Promise<Array<{
478
+ user: string;
479
+ body: string;
480
+ createdAt: string;
481
+ }>>;
77
482
  getPullRequest(owner: string, repo: string, pullNumber: number): Promise<{
78
483
  url: string;
79
484
  id: number;
@@ -91,7 +496,30 @@ export declare class GitHubClient {
91
496
  state: "open" | "closed";
92
497
  locked: boolean;
93
498
  title: string;
94
- user: import("@octokit/openapi-types").components["schemas"]["simple-user"];
499
+ user: {
500
+ name?: string | null;
501
+ email?: string | null;
502
+ login: string;
503
+ id: number;
504
+ node_id: string;
505
+ avatar_url: string;
506
+ gravatar_id: string | null;
507
+ url: string;
508
+ html_url: string;
509
+ followers_url: string;
510
+ following_url: string;
511
+ gists_url: string;
512
+ starred_url: string;
513
+ subscriptions_url: string;
514
+ organizations_url: string;
515
+ repos_url: string;
516
+ events_url: string;
517
+ received_events_url: string;
518
+ type: string;
519
+ site_admin: boolean;
520
+ starred_at?: string;
521
+ user_view_type?: string;
522
+ };
95
523
  body: string | null;
96
524
  labels: {
97
525
  id: number;
@@ -102,49 +530,560 @@ export declare class GitHubClient {
102
530
  color: string;
103
531
  default: boolean;
104
532
  }[];
105
- milestone: import("@octokit/openapi-types").components["schemas"]["nullable-milestone"];
533
+ milestone: {
534
+ url: string;
535
+ html_url: string;
536
+ labels_url: string;
537
+ id: number;
538
+ node_id: string;
539
+ number: number;
540
+ state: "open" | "closed";
541
+ title: string;
542
+ description: string | null;
543
+ creator: {
544
+ name?: string | null;
545
+ email?: string | null;
546
+ login: string;
547
+ id: number;
548
+ node_id: string;
549
+ avatar_url: string;
550
+ gravatar_id: string | null;
551
+ url: string;
552
+ html_url: string;
553
+ followers_url: string;
554
+ following_url: string;
555
+ gists_url: string;
556
+ starred_url: string;
557
+ subscriptions_url: string;
558
+ organizations_url: string;
559
+ repos_url: string;
560
+ events_url: string;
561
+ received_events_url: string;
562
+ type: string;
563
+ site_admin: boolean;
564
+ starred_at?: string;
565
+ user_view_type?: string;
566
+ } | null;
567
+ open_issues: number;
568
+ closed_issues: number;
569
+ created_at: string;
570
+ updated_at: string;
571
+ closed_at: string | null;
572
+ due_on: string | null;
573
+ } | null;
106
574
  active_lock_reason?: string | null;
107
575
  created_at: string;
108
576
  updated_at: string;
109
577
  closed_at: string | null;
110
578
  merged_at: string | null;
111
579
  merge_commit_sha: string | null;
112
- assignee: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"];
113
- assignees?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null;
114
- requested_reviewers?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null;
115
- requested_teams?: import("@octokit/openapi-types").components["schemas"]["team-simple"][] | null;
580
+ assignee: {
581
+ name?: string | null;
582
+ email?: string | null;
583
+ login: string;
584
+ id: number;
585
+ node_id: string;
586
+ avatar_url: string;
587
+ gravatar_id: string | null;
588
+ url: string;
589
+ html_url: string;
590
+ followers_url: string;
591
+ following_url: string;
592
+ gists_url: string;
593
+ starred_url: string;
594
+ subscriptions_url: string;
595
+ organizations_url: string;
596
+ repos_url: string;
597
+ events_url: string;
598
+ received_events_url: string;
599
+ type: string;
600
+ site_admin: boolean;
601
+ starred_at?: string;
602
+ user_view_type?: string;
603
+ } | null;
604
+ assignees?: {
605
+ name?: string | null;
606
+ email?: string | null;
607
+ login: string;
608
+ id: number;
609
+ node_id: string;
610
+ avatar_url: string;
611
+ gravatar_id: string | null;
612
+ url: string;
613
+ html_url: string;
614
+ followers_url: string;
615
+ following_url: string;
616
+ gists_url: string;
617
+ starred_url: string;
618
+ subscriptions_url: string;
619
+ organizations_url: string;
620
+ repos_url: string;
621
+ events_url: string;
622
+ received_events_url: string;
623
+ type: string;
624
+ site_admin: boolean;
625
+ starred_at?: string;
626
+ user_view_type?: string;
627
+ }[] | null;
628
+ requested_reviewers?: {
629
+ name?: string | null;
630
+ email?: string | null;
631
+ login: string;
632
+ id: number;
633
+ node_id: string;
634
+ avatar_url: string;
635
+ gravatar_id: string | null;
636
+ url: string;
637
+ html_url: string;
638
+ followers_url: string;
639
+ following_url: string;
640
+ gists_url: string;
641
+ starred_url: string;
642
+ subscriptions_url: string;
643
+ organizations_url: string;
644
+ repos_url: string;
645
+ events_url: string;
646
+ received_events_url: string;
647
+ type: string;
648
+ site_admin: boolean;
649
+ starred_at?: string;
650
+ user_view_type?: string;
651
+ }[] | null;
652
+ requested_teams?: {
653
+ id: number;
654
+ node_id: string;
655
+ url: string;
656
+ members_url: string;
657
+ name: string;
658
+ description: string | null;
659
+ permission: string;
660
+ privacy?: string;
661
+ notification_setting?: string;
662
+ html_url: string;
663
+ repositories_url: string;
664
+ slug: string;
665
+ ldap_dn?: string;
666
+ type: "enterprise" | "organization";
667
+ organization_id?: number;
668
+ enterprise_id?: number;
669
+ }[] | null;
116
670
  head: {
117
671
  label: string;
118
672
  ref: string;
119
- repo: import("@octokit/openapi-types").components["schemas"]["repository"];
673
+ repo: {
674
+ id: number;
675
+ node_id: string;
676
+ name: string;
677
+ full_name: string;
678
+ license: {
679
+ key: string;
680
+ name: string;
681
+ url: string | null;
682
+ spdx_id: string | null;
683
+ node_id: string;
684
+ html_url?: string;
685
+ } | null;
686
+ forks: number;
687
+ permissions?: {
688
+ admin: boolean;
689
+ pull: boolean;
690
+ triage?: boolean;
691
+ push: boolean;
692
+ maintain?: boolean;
693
+ };
694
+ owner: {
695
+ name?: string | null;
696
+ email?: string | null;
697
+ login: string;
698
+ id: number;
699
+ node_id: string;
700
+ avatar_url: string;
701
+ gravatar_id: string | null;
702
+ url: string;
703
+ html_url: string;
704
+ followers_url: string;
705
+ following_url: string;
706
+ gists_url: string;
707
+ starred_url: string;
708
+ subscriptions_url: string;
709
+ organizations_url: string;
710
+ repos_url: string;
711
+ events_url: string;
712
+ received_events_url: string;
713
+ type: string;
714
+ site_admin: boolean;
715
+ starred_at?: string;
716
+ user_view_type?: string;
717
+ };
718
+ private: boolean;
719
+ html_url: string;
720
+ description: string | null;
721
+ fork: boolean;
722
+ url: string;
723
+ archive_url: string;
724
+ assignees_url: string;
725
+ blobs_url: string;
726
+ branches_url: string;
727
+ collaborators_url: string;
728
+ comments_url: string;
729
+ commits_url: string;
730
+ compare_url: string;
731
+ contents_url: string;
732
+ contributors_url: string;
733
+ deployments_url: string;
734
+ downloads_url: string;
735
+ events_url: string;
736
+ forks_url: string;
737
+ git_commits_url: string;
738
+ git_refs_url: string;
739
+ git_tags_url: string;
740
+ git_url: string;
741
+ issue_comment_url: string;
742
+ issue_events_url: string;
743
+ issues_url: string;
744
+ keys_url: string;
745
+ labels_url: string;
746
+ languages_url: string;
747
+ merges_url: string;
748
+ milestones_url: string;
749
+ notifications_url: string;
750
+ pulls_url: string;
751
+ releases_url: string;
752
+ ssh_url: string;
753
+ stargazers_url: string;
754
+ statuses_url: string;
755
+ subscribers_url: string;
756
+ subscription_url: string;
757
+ tags_url: string;
758
+ teams_url: string;
759
+ trees_url: string;
760
+ clone_url: string;
761
+ mirror_url: string | null;
762
+ hooks_url: string;
763
+ svn_url: string;
764
+ homepage: string | null;
765
+ language: string | null;
766
+ forks_count: number;
767
+ stargazers_count: number;
768
+ watchers_count: number;
769
+ size: number;
770
+ default_branch: string;
771
+ open_issues_count: number;
772
+ is_template?: boolean;
773
+ topics?: string[];
774
+ has_issues: boolean;
775
+ has_projects: boolean;
776
+ has_wiki: boolean;
777
+ has_pages: boolean;
778
+ has_downloads: boolean;
779
+ has_discussions?: boolean;
780
+ archived: boolean;
781
+ disabled: boolean;
782
+ visibility?: string;
783
+ pushed_at: string | null;
784
+ created_at: string | null;
785
+ updated_at: string | null;
786
+ allow_rebase_merge?: boolean;
787
+ temp_clone_token?: string;
788
+ allow_squash_merge?: boolean;
789
+ allow_auto_merge?: boolean;
790
+ delete_branch_on_merge?: boolean;
791
+ allow_update_branch?: boolean;
792
+ use_squash_pr_title_as_default?: boolean;
793
+ squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE";
794
+ squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK";
795
+ merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE";
796
+ merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK";
797
+ allow_merge_commit?: boolean;
798
+ allow_forking?: boolean;
799
+ web_commit_signoff_required?: boolean;
800
+ open_issues: number;
801
+ watchers: number;
802
+ master_branch?: string;
803
+ starred_at?: string;
804
+ anonymous_access_enabled?: boolean;
805
+ code_search_index_status?: {
806
+ lexical_search_ok?: boolean;
807
+ lexical_commit_sha?: string;
808
+ };
809
+ };
120
810
  sha: string;
121
- user: import("@octokit/openapi-types").components["schemas"]["simple-user"];
811
+ user: {
812
+ name?: string | null;
813
+ email?: string | null;
814
+ login: string;
815
+ id: number;
816
+ node_id: string;
817
+ avatar_url: string;
818
+ gravatar_id: string | null;
819
+ url: string;
820
+ html_url: string;
821
+ followers_url: string;
822
+ following_url: string;
823
+ gists_url: string;
824
+ starred_url: string;
825
+ subscriptions_url: string;
826
+ organizations_url: string;
827
+ repos_url: string;
828
+ events_url: string;
829
+ received_events_url: string;
830
+ type: string;
831
+ site_admin: boolean;
832
+ starred_at?: string;
833
+ user_view_type?: string;
834
+ };
122
835
  };
123
836
  base: {
124
837
  label: string;
125
838
  ref: string;
126
- repo: import("@octokit/openapi-types").components["schemas"]["repository"];
839
+ repo: {
840
+ id: number;
841
+ node_id: string;
842
+ name: string;
843
+ full_name: string;
844
+ license: {
845
+ key: string;
846
+ name: string;
847
+ url: string | null;
848
+ spdx_id: string | null;
849
+ node_id: string;
850
+ html_url?: string;
851
+ } | null;
852
+ forks: number;
853
+ permissions?: {
854
+ admin: boolean;
855
+ pull: boolean;
856
+ triage?: boolean;
857
+ push: boolean;
858
+ maintain?: boolean;
859
+ };
860
+ owner: {
861
+ name?: string | null;
862
+ email?: string | null;
863
+ login: string;
864
+ id: number;
865
+ node_id: string;
866
+ avatar_url: string;
867
+ gravatar_id: string | null;
868
+ url: string;
869
+ html_url: string;
870
+ followers_url: string;
871
+ following_url: string;
872
+ gists_url: string;
873
+ starred_url: string;
874
+ subscriptions_url: string;
875
+ organizations_url: string;
876
+ repos_url: string;
877
+ events_url: string;
878
+ received_events_url: string;
879
+ type: string;
880
+ site_admin: boolean;
881
+ starred_at?: string;
882
+ user_view_type?: string;
883
+ };
884
+ private: boolean;
885
+ html_url: string;
886
+ description: string | null;
887
+ fork: boolean;
888
+ url: string;
889
+ archive_url: string;
890
+ assignees_url: string;
891
+ blobs_url: string;
892
+ branches_url: string;
893
+ collaborators_url: string;
894
+ comments_url: string;
895
+ commits_url: string;
896
+ compare_url: string;
897
+ contents_url: string;
898
+ contributors_url: string;
899
+ deployments_url: string;
900
+ downloads_url: string;
901
+ events_url: string;
902
+ forks_url: string;
903
+ git_commits_url: string;
904
+ git_refs_url: string;
905
+ git_tags_url: string;
906
+ git_url: string;
907
+ issue_comment_url: string;
908
+ issue_events_url: string;
909
+ issues_url: string;
910
+ keys_url: string;
911
+ labels_url: string;
912
+ languages_url: string;
913
+ merges_url: string;
914
+ milestones_url: string;
915
+ notifications_url: string;
916
+ pulls_url: string;
917
+ releases_url: string;
918
+ ssh_url: string;
919
+ stargazers_url: string;
920
+ statuses_url: string;
921
+ subscribers_url: string;
922
+ subscription_url: string;
923
+ tags_url: string;
924
+ teams_url: string;
925
+ trees_url: string;
926
+ clone_url: string;
927
+ mirror_url: string | null;
928
+ hooks_url: string;
929
+ svn_url: string;
930
+ homepage: string | null;
931
+ language: string | null;
932
+ forks_count: number;
933
+ stargazers_count: number;
934
+ watchers_count: number;
935
+ size: number;
936
+ default_branch: string;
937
+ open_issues_count: number;
938
+ is_template?: boolean;
939
+ topics?: string[];
940
+ has_issues: boolean;
941
+ has_projects: boolean;
942
+ has_wiki: boolean;
943
+ has_pages: boolean;
944
+ has_downloads: boolean;
945
+ has_discussions?: boolean;
946
+ archived: boolean;
947
+ disabled: boolean;
948
+ visibility?: string;
949
+ pushed_at: string | null;
950
+ created_at: string | null;
951
+ updated_at: string | null;
952
+ allow_rebase_merge?: boolean;
953
+ temp_clone_token?: string;
954
+ allow_squash_merge?: boolean;
955
+ allow_auto_merge?: boolean;
956
+ delete_branch_on_merge?: boolean;
957
+ allow_update_branch?: boolean;
958
+ use_squash_pr_title_as_default?: boolean;
959
+ squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE";
960
+ squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK";
961
+ merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE";
962
+ merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK";
963
+ allow_merge_commit?: boolean;
964
+ allow_forking?: boolean;
965
+ web_commit_signoff_required?: boolean;
966
+ open_issues: number;
967
+ watchers: number;
968
+ master_branch?: string;
969
+ starred_at?: string;
970
+ anonymous_access_enabled?: boolean;
971
+ code_search_index_status?: {
972
+ lexical_search_ok?: boolean;
973
+ lexical_commit_sha?: string;
974
+ };
975
+ };
127
976
  sha: string;
128
- user: import("@octokit/openapi-types").components["schemas"]["simple-user"];
977
+ user: {
978
+ name?: string | null;
979
+ email?: string | null;
980
+ login: string;
981
+ id: number;
982
+ node_id: string;
983
+ avatar_url: string;
984
+ gravatar_id: string | null;
985
+ url: string;
986
+ html_url: string;
987
+ followers_url: string;
988
+ following_url: string;
989
+ gists_url: string;
990
+ starred_url: string;
991
+ subscriptions_url: string;
992
+ organizations_url: string;
993
+ repos_url: string;
994
+ events_url: string;
995
+ received_events_url: string;
996
+ type: string;
997
+ site_admin: boolean;
998
+ starred_at?: string;
999
+ user_view_type?: string;
1000
+ };
129
1001
  };
130
1002
  _links: {
131
- comments: import("@octokit/openapi-types").components["schemas"]["link"];
132
- commits: import("@octokit/openapi-types").components["schemas"]["link"];
133
- statuses: import("@octokit/openapi-types").components["schemas"]["link"];
134
- html: import("@octokit/openapi-types").components["schemas"]["link"];
135
- issue: import("@octokit/openapi-types").components["schemas"]["link"];
136
- review_comments: import("@octokit/openapi-types").components["schemas"]["link"];
137
- review_comment: import("@octokit/openapi-types").components["schemas"]["link"];
138
- self: import("@octokit/openapi-types").components["schemas"]["link"];
1003
+ comments: {
1004
+ href: string;
1005
+ };
1006
+ commits: {
1007
+ href: string;
1008
+ };
1009
+ statuses: {
1010
+ href: string;
1011
+ };
1012
+ html: {
1013
+ href: string;
1014
+ };
1015
+ issue: {
1016
+ href: string;
1017
+ };
1018
+ review_comments: {
1019
+ href: string;
1020
+ };
1021
+ review_comment: {
1022
+ href: string;
1023
+ };
1024
+ self: {
1025
+ href: string;
1026
+ };
139
1027
  };
140
- author_association: import("@octokit/openapi-types").components["schemas"]["author-association"];
141
- auto_merge: import("@octokit/openapi-types").components["schemas"]["auto-merge"];
1028
+ author_association: "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIMER" | "FIRST_TIME_CONTRIBUTOR" | "MANNEQUIN" | "MEMBER" | "NONE" | "OWNER";
1029
+ auto_merge: {
1030
+ enabled_by: {
1031
+ name?: string | null;
1032
+ email?: string | null;
1033
+ login: string;
1034
+ id: number;
1035
+ node_id: string;
1036
+ avatar_url: string;
1037
+ gravatar_id: string | null;
1038
+ url: string;
1039
+ html_url: string;
1040
+ followers_url: string;
1041
+ following_url: string;
1042
+ gists_url: string;
1043
+ starred_url: string;
1044
+ subscriptions_url: string;
1045
+ organizations_url: string;
1046
+ repos_url: string;
1047
+ events_url: string;
1048
+ received_events_url: string;
1049
+ type: string;
1050
+ site_admin: boolean;
1051
+ starred_at?: string;
1052
+ user_view_type?: string;
1053
+ };
1054
+ merge_method: "merge" | "squash" | "rebase";
1055
+ commit_title: string;
1056
+ commit_message: string;
1057
+ } | null;
142
1058
  draft?: boolean;
143
1059
  merged: boolean;
144
1060
  mergeable: boolean | null;
145
1061
  rebaseable?: boolean | null;
146
1062
  mergeable_state: string;
147
- merged_by: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"];
1063
+ merged_by: {
1064
+ name?: string | null;
1065
+ email?: string | null;
1066
+ login: string;
1067
+ id: number;
1068
+ node_id: string;
1069
+ avatar_url: string;
1070
+ gravatar_id: string | null;
1071
+ url: string;
1072
+ html_url: string;
1073
+ followers_url: string;
1074
+ following_url: string;
1075
+ gists_url: string;
1076
+ starred_url: string;
1077
+ subscriptions_url: string;
1078
+ organizations_url: string;
1079
+ repos_url: string;
1080
+ events_url: string;
1081
+ received_events_url: string;
1082
+ type: string;
1083
+ site_admin: boolean;
1084
+ starred_at?: string;
1085
+ user_view_type?: string;
1086
+ } | null;
148
1087
  comments: number;
149
1088
  review_comments: number;
150
1089
  maintainer_can_modify: boolean;
@@ -153,6 +1092,51 @@ export declare class GitHubClient {
153
1092
  deletions: number;
154
1093
  changed_files: number;
155
1094
  }>;
1095
+ /** Convenience: fetch only the PR's head commit SHA. Used by check-run code. */
1096
+ getPullRequestHeadSha(owner: string, repo: string, pullNumber: number): Promise<string>;
1097
+ /**
1098
+ * Create a Check Run on a PR's head commit. Returns the new check_run id so
1099
+ * the caller can later transition it from `in_progress` → `completed` with
1100
+ * a conclusion. Repos that enable "Require status checks to pass" with
1101
+ * `name` in their list will gate merges on the eventual conclusion.
1102
+ *
1103
+ * Requires the GitHub App to have `Checks: Read and write` permission.
1104
+ */
1105
+ createCheckRun(owner: string, repo: string, headSha: string, name: string, options?: {
1106
+ detailsUrl?: string;
1107
+ output?: {
1108
+ title: string;
1109
+ summary: string;
1110
+ };
1111
+ }): Promise<number>;
1112
+ /**
1113
+ * Update an existing Check Run — typically to transition `in_progress` →
1114
+ * `completed` with a conclusion. Conclusion values that branch protection
1115
+ * treats as passing: `success`, `neutral`, `skipped`. Failing: `failure`,
1116
+ * `cancelled`, `timed_out`, `action_required`.
1117
+ */
1118
+ updateCheckRun(owner: string, repo: string, checkRunId: number, update: {
1119
+ status?: "queued" | "in_progress" | "completed";
1120
+ conclusion?: "success" | "failure" | "neutral" | "cancelled" | "timed_out" | "action_required" | "skipped";
1121
+ output?: {
1122
+ title: string;
1123
+ summary: string;
1124
+ };
1125
+ }): Promise<void>;
1126
+ /**
1127
+ * Find the bot's most recent review on this PR's current head commit. Used
1128
+ * after a pr-review workflow finishes to derive the check-run conclusion
1129
+ * from the review the agent actually posted (APPROVE / REQUEST_CHANGES /
1130
+ * COMMENT). Returns null when the bot hasn't reviewed this SHA yet.
1131
+ *
1132
+ * `botLogin` defaults to `last-light[bot]` so the lookup matches App-auth'd
1133
+ * reviews regardless of how the agent identified itself.
1134
+ */
1135
+ getLatestBotReview(owner: string, repo: string, pullNumber: number, headSha: string, botLogin?: string): Promise<{
1136
+ state: string;
1137
+ body: string | null;
1138
+ submittedAt: string | null;
1139
+ } | null>;
156
1140
  /**
157
1141
  * Get failed check runs for a PR's head SHA.
158
1142
  * Fetches the actual job logs (not just annotations) to show real errors.