lastlight 0.1.8 → 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 +423 -437
  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 +31 -12
  272. package/dist/setup.js +516 -174
  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 +19 -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,33 +0,0 @@
1
- ## Summary
2
-
3
- <!-- 1-3 bullet points describing what this PR does -->
4
-
5
- -
6
-
7
- ## Motivation
8
-
9
- <!-- Why is this change needed? Link to issue if applicable -->
10
-
11
- Closes #
12
-
13
- ## Changes
14
-
15
- <!-- Detailed list of changes made -->
16
-
17
- -
18
-
19
- ## Test Plan
20
-
21
- <!-- How was this tested? Checklist of verification steps -->
22
-
23
- - [ ] Unit tests pass (`pytest`)
24
- - [ ] Manual testing of new functionality
25
- - [ ] No regressions in existing behavior
26
-
27
- ## Screenshots / Examples
28
-
29
- <!-- If UI changes or new output, show before/after -->
30
-
31
- ## Notes for Reviewers
32
-
33
- <!-- Anything reviewers should pay special attention to -->
@@ -1,515 +0,0 @@
1
- ---
2
- name: github-repo-management
3
- description: Clone, create, fork, configure, and manage GitHub repositories. Manage remotes, secrets, releases, and workflows. Works with gh CLI or falls back to git + GitHub REST API via curl.
4
- version: 1.1.0
5
- author: Hermes Agent
6
- license: MIT
7
- metadata:
8
- hermes:
9
- tags: [GitHub, Repositories, Git, Releases, Secrets, Configuration]
10
- related_skills: [github-auth, github-pr-workflow, github-issues]
11
- ---
12
-
13
- # GitHub Repository Management
14
-
15
- Create, clone, fork, configure, and manage GitHub repositories. Each section shows `gh` first, then the `git` + `curl` fallback.
16
-
17
- ## Prerequisites
18
-
19
- - Authenticated with GitHub (see `github-auth` skill)
20
-
21
- ### Setup
22
-
23
- ```bash
24
- if command -v gh &>/dev/null && gh auth status &>/dev/null; then
25
- AUTH="gh"
26
- else
27
- AUTH="git"
28
- if [ -z "$GITHUB_TOKEN" ]; then
29
- if [ -f ~/.hermes/.env ] && grep -q "^GITHUB_TOKEN=" ~/.hermes/.env; then
30
- GITHUB_TOKEN=$(grep "^GITHUB_TOKEN=" ~/.hermes/.env | head -1 | cut -d= -f2 | tr -d '\n\r')
31
- elif grep -q "github.com" ~/.git-credentials 2>/dev/null; then
32
- GITHUB_TOKEN=$(grep "github.com" ~/.git-credentials 2>/dev/null | head -1 | sed 's|https://[^:]*:\([^@]*\)@.*|\1|')
33
- fi
34
- fi
35
- fi
36
-
37
- # Get your GitHub username (needed for several operations)
38
- if [ "$AUTH" = "gh" ]; then
39
- GH_USER=$(gh api user --jq '.login')
40
- else
41
- GH_USER=$(curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user | python3 -c "import sys,json; print(json.load(sys.stdin)['login'])")
42
- fi
43
- ```
44
-
45
- If you're inside a repo already:
46
-
47
- ```bash
48
- REMOTE_URL=$(git remote get-url origin)
49
- OWNER_REPO=$(echo "$REMOTE_URL" | sed -E 's|.*github\.com[:/]||; s|\.git$||')
50
- OWNER=$(echo "$OWNER_REPO" | cut -d/ -f1)
51
- REPO=$(echo "$OWNER_REPO" | cut -d/ -f2)
52
- ```
53
-
54
- ---
55
-
56
- ## 1. Cloning Repositories
57
-
58
- Cloning is pure `git` — works identically either way:
59
-
60
- ```bash
61
- # Clone via HTTPS (works with credential helper or token-embedded URL)
62
- git clone https://github.com/owner/repo-name.git
63
-
64
- # Clone into a specific directory
65
- git clone https://github.com/owner/repo-name.git ./my-local-dir
66
-
67
- # Shallow clone (faster for large repos)
68
- git clone --depth 1 https://github.com/owner/repo-name.git
69
-
70
- # Clone a specific branch
71
- git clone --branch develop https://github.com/owner/repo-name.git
72
-
73
- # Clone via SSH (if SSH is configured)
74
- git clone git@github.com:owner/repo-name.git
75
- ```
76
-
77
- **With gh (shorthand):**
78
-
79
- ```bash
80
- gh repo clone owner/repo-name
81
- gh repo clone owner/repo-name -- --depth 1
82
- ```
83
-
84
- ## 2. Creating Repositories
85
-
86
- **With gh:**
87
-
88
- ```bash
89
- # Create a public repo and clone it
90
- gh repo create my-new-project --public --clone
91
-
92
- # Private, with description and license
93
- gh repo create my-new-project --private --description "A useful tool" --license MIT --clone
94
-
95
- # Under an organization
96
- gh repo create my-org/my-new-project --public --clone
97
-
98
- # From existing local directory
99
- cd /path/to/existing/project
100
- gh repo create my-project --source . --public --push
101
- ```
102
-
103
- **With git + curl:**
104
-
105
- ```bash
106
- # Create the remote repo via API
107
- curl -s -X POST \
108
- -H "Authorization: token $GITHUB_TOKEN" \
109
- https://api.github.com/user/repos \
110
- -d '{
111
- "name": "my-new-project",
112
- "description": "A useful tool",
113
- "private": false,
114
- "auto_init": true,
115
- "license_template": "mit"
116
- }'
117
-
118
- # Clone it
119
- git clone https://github.com/$GH_USER/my-new-project.git
120
- cd my-new-project
121
-
122
- # -- OR -- push an existing local directory to the new repo
123
- cd /path/to/existing/project
124
- git init
125
- git add .
126
- git commit -m "Initial commit"
127
- git remote add origin https://github.com/$GH_USER/my-new-project.git
128
- git push -u origin main
129
- ```
130
-
131
- To create under an organization:
132
-
133
- ```bash
134
- curl -s -X POST \
135
- -H "Authorization: token $GITHUB_TOKEN" \
136
- https://api.github.com/orgs/my-org/repos \
137
- -d '{"name": "my-new-project", "private": false}'
138
- ```
139
-
140
- ### From a Template
141
-
142
- **With gh:**
143
-
144
- ```bash
145
- gh repo create my-new-app --template owner/template-repo --public --clone
146
- ```
147
-
148
- **With curl:**
149
-
150
- ```bash
151
- curl -s -X POST \
152
- -H "Authorization: token $GITHUB_TOKEN" \
153
- https://api.github.com/repos/owner/template-repo/generate \
154
- -d '{"owner": "'"$GH_USER"'", "name": "my-new-app", "private": false}'
155
- ```
156
-
157
- ## 3. Forking Repositories
158
-
159
- **With gh:**
160
-
161
- ```bash
162
- gh repo fork owner/repo-name --clone
163
- ```
164
-
165
- **With git + curl:**
166
-
167
- ```bash
168
- # Create the fork via API
169
- curl -s -X POST \
170
- -H "Authorization: token $GITHUB_TOKEN" \
171
- https://api.github.com/repos/owner/repo-name/forks
172
-
173
- # Wait a moment for GitHub to create it, then clone
174
- sleep 3
175
- git clone https://github.com/$GH_USER/repo-name.git
176
- cd repo-name
177
-
178
- # Add the original repo as "upstream" remote
179
- git remote add upstream https://github.com/owner/repo-name.git
180
- ```
181
-
182
- ### Keeping a Fork in Sync
183
-
184
- ```bash
185
- # Pure git — works everywhere
186
- git fetch upstream
187
- git checkout main
188
- git merge upstream/main
189
- git push origin main
190
- ```
191
-
192
- **With gh (shortcut):**
193
-
194
- ```bash
195
- gh repo sync $GH_USER/repo-name
196
- ```
197
-
198
- ## 4. Repository Information
199
-
200
- **With gh:**
201
-
202
- ```bash
203
- gh repo view owner/repo-name
204
- gh repo list --limit 20
205
- gh search repos "machine learning" --language python --sort stars
206
- ```
207
-
208
- **With curl:**
209
-
210
- ```bash
211
- # View repo details
212
- curl -s \
213
- -H "Authorization: token $GITHUB_TOKEN" \
214
- https://api.github.com/repos/$OWNER/$REPO \
215
- | python3 -c "
216
- import sys, json
217
- r = json.load(sys.stdin)
218
- print(f\"Name: {r['full_name']}\")
219
- print(f\"Description: {r['description']}\")
220
- print(f\"Stars: {r['stargazers_count']} Forks: {r['forks_count']}\")
221
- print(f\"Default branch: {r['default_branch']}\")
222
- print(f\"Language: {r['language']}\")"
223
-
224
- # List your repos
225
- curl -s \
226
- -H "Authorization: token $GITHUB_TOKEN" \
227
- "https://api.github.com/user/repos?per_page=20&sort=updated" \
228
- | python3 -c "
229
- import sys, json
230
- for r in json.load(sys.stdin):
231
- vis = 'private' if r['private'] else 'public'
232
- print(f\" {r['full_name']:40} {vis:8} {r.get('language', ''):10} ★{r['stargazers_count']}\")"
233
-
234
- # Search repos
235
- curl -s \
236
- "https://api.github.com/search/repositories?q=machine+learning+language:python&sort=stars&per_page=10" \
237
- | python3 -c "
238
- import sys, json
239
- for r in json.load(sys.stdin)['items']:
240
- print(f\" {r['full_name']:40} ★{r['stargazers_count']:6} {r['description'][:60] if r['description'] else ''}\")"
241
- ```
242
-
243
- ## 5. Repository Settings
244
-
245
- **With gh:**
246
-
247
- ```bash
248
- gh repo edit --description "Updated description" --visibility public
249
- gh repo edit --enable-wiki=false --enable-issues=true
250
- gh repo edit --default-branch main
251
- gh repo edit --add-topic "machine-learning,python"
252
- gh repo edit --enable-auto-merge
253
- ```
254
-
255
- **With curl:**
256
-
257
- ```bash
258
- curl -s -X PATCH \
259
- -H "Authorization: token $GITHUB_TOKEN" \
260
- https://api.github.com/repos/$OWNER/$REPO \
261
- -d '{
262
- "description": "Updated description",
263
- "has_wiki": false,
264
- "has_issues": true,
265
- "allow_auto_merge": true
266
- }'
267
-
268
- # Update topics
269
- curl -s -X PUT \
270
- -H "Authorization: token $GITHUB_TOKEN" \
271
- -H "Accept: application/vnd.github.mercy-preview+json" \
272
- https://api.github.com/repos/$OWNER/$REPO/topics \
273
- -d '{"names": ["machine-learning", "python", "automation"]}'
274
- ```
275
-
276
- ## 6. Branch Protection
277
-
278
- ```bash
279
- # View current protection
280
- curl -s \
281
- -H "Authorization: token $GITHUB_TOKEN" \
282
- https://api.github.com/repos/$OWNER/$REPO/branches/main/protection
283
-
284
- # Set up branch protection
285
- curl -s -X PUT \
286
- -H "Authorization: token $GITHUB_TOKEN" \
287
- https://api.github.com/repos/$OWNER/$REPO/branches/main/protection \
288
- -d '{
289
- "required_status_checks": {
290
- "strict": true,
291
- "contexts": ["ci/test", "ci/lint"]
292
- },
293
- "enforce_admins": false,
294
- "required_pull_request_reviews": {
295
- "required_approving_review_count": 1
296
- },
297
- "restrictions": null
298
- }'
299
- ```
300
-
301
- ## 7. Secrets Management (GitHub Actions)
302
-
303
- **With gh:**
304
-
305
- ```bash
306
- gh secret set API_KEY --body "your-secret-value"
307
- gh secret set SSH_KEY < ~/.ssh/id_rsa
308
- gh secret list
309
- gh secret delete API_KEY
310
- ```
311
-
312
- **With curl:**
313
-
314
- Secrets require encryption with the repo's public key — more involved via API:
315
-
316
- ```bash
317
- # Get the repo's public key for encrypting secrets
318
- curl -s \
319
- -H "Authorization: token $GITHUB_TOKEN" \
320
- https://api.github.com/repos/$OWNER/$REPO/actions/secrets/public-key
321
-
322
- # Encrypt and set (requires Python with PyNaCl)
323
- python3 -c "
324
- from base64 import b64encode
325
- from nacl import encoding, public
326
- import json, sys
327
-
328
- # Get the public key
329
- key_id = '<key_id_from_above>'
330
- public_key = '<base64_key_from_above>'
331
-
332
- # Encrypt
333
- sealed = public.SealedBox(
334
- public.PublicKey(public_key.encode('utf-8'), encoding.Base64Encoder)
335
- ).encrypt('your-secret-value'.encode('utf-8'))
336
- print(json.dumps({
337
- 'encrypted_value': b64encode(sealed).decode('utf-8'),
338
- 'key_id': key_id
339
- }))"
340
-
341
- # Then PUT the encrypted secret
342
- curl -s -X PUT \
343
- -H "Authorization: token $GITHUB_TOKEN" \
344
- https://api.github.com/repos/$OWNER/$REPO/actions/secrets/API_KEY \
345
- -d '<output from python script above>'
346
-
347
- # List secrets (names only, values hidden)
348
- curl -s \
349
- -H "Authorization: token $GITHUB_TOKEN" \
350
- https://api.github.com/repos/$OWNER/$REPO/actions/secrets \
351
- | python3 -c "
352
- import sys, json
353
- for s in json.load(sys.stdin)['secrets']:
354
- print(f\" {s['name']:30} updated: {s['updated_at']}\")"
355
- ```
356
-
357
- Note: For secrets, `gh secret set` is dramatically simpler. If setting secrets is needed and `gh` isn't available, recommend installing it for just that operation.
358
-
359
- ## 8. Releases
360
-
361
- **With gh:**
362
-
363
- ```bash
364
- gh release create v1.0.0 --title "v1.0.0" --generate-notes
365
- gh release create v2.0.0-rc1 --draft --prerelease --generate-notes
366
- gh release create v1.0.0 ./dist/binary --title "v1.0.0" --notes "Release notes"
367
- gh release list
368
- gh release download v1.0.0 --dir ./downloads
369
- ```
370
-
371
- **With curl:**
372
-
373
- ```bash
374
- # Create a release
375
- curl -s -X POST \
376
- -H "Authorization: token $GITHUB_TOKEN" \
377
- https://api.github.com/repos/$OWNER/$REPO/releases \
378
- -d '{
379
- "tag_name": "v1.0.0",
380
- "name": "v1.0.0",
381
- "body": "## Changelog\n- Feature A\n- Bug fix B",
382
- "draft": false,
383
- "prerelease": false,
384
- "generate_release_notes": true
385
- }'
386
-
387
- # List releases
388
- curl -s \
389
- -H "Authorization: token $GITHUB_TOKEN" \
390
- https://api.github.com/repos/$OWNER/$REPO/releases \
391
- | python3 -c "
392
- import sys, json
393
- for r in json.load(sys.stdin):
394
- tag = r.get('tag_name', 'no tag')
395
- print(f\" {tag:15} {r['name']:30} {'draft' if r['draft'] else 'published'}\")"
396
-
397
- # Upload a release asset (binary file)
398
- RELEASE_ID=<id_from_create_response>
399
- curl -s -X POST \
400
- -H "Authorization: token $GITHUB_TOKEN" \
401
- -H "Content-Type: application/octet-stream" \
402
- "https://uploads.github.com/repos/$OWNER/$REPO/releases/$RELEASE_ID/assets?name=binary-amd64" \
403
- --data-binary @./dist/binary-amd64
404
- ```
405
-
406
- ## 9. GitHub Actions Workflows
407
-
408
- **With gh:**
409
-
410
- ```bash
411
- gh workflow list
412
- gh run list --limit 10
413
- gh run view <RUN_ID>
414
- gh run view <RUN_ID> --log-failed
415
- gh run rerun <RUN_ID>
416
- gh run rerun <RUN_ID> --failed
417
- gh workflow run ci.yml --ref main
418
- gh workflow run deploy.yml -f environment=staging
419
- ```
420
-
421
- **With curl:**
422
-
423
- ```bash
424
- # List workflows
425
- curl -s \
426
- -H "Authorization: token $GITHUB_TOKEN" \
427
- https://api.github.com/repos/$OWNER/$REPO/actions/workflows \
428
- | python3 -c "
429
- import sys, json
430
- for w in json.load(sys.stdin)['workflows']:
431
- print(f\" {w['id']:10} {w['name']:30} {w['state']}\")"
432
-
433
- # List recent runs
434
- curl -s \
435
- -H "Authorization: token $GITHUB_TOKEN" \
436
- "https://api.github.com/repos/$OWNER/$REPO/actions/runs?per_page=10" \
437
- | python3 -c "
438
- import sys, json
439
- for r in json.load(sys.stdin)['workflow_runs']:
440
- print(f\" Run {r['id']} {r['name']:30} {r['conclusion'] or r['status']}\")"
441
-
442
- # Download failed run logs
443
- RUN_ID=<run_id>
444
- curl -s -L \
445
- -H "Authorization: token $GITHUB_TOKEN" \
446
- https://api.github.com/repos/$OWNER/$REPO/actions/runs/$RUN_ID/logs \
447
- -o /tmp/ci-logs.zip
448
- cd /tmp && unzip -o ci-logs.zip -d ci-logs
449
-
450
- # Re-run a failed workflow
451
- curl -s -X POST \
452
- -H "Authorization: token $GITHUB_TOKEN" \
453
- https://api.github.com/repos/$OWNER/$REPO/actions/runs/$RUN_ID/rerun
454
-
455
- # Re-run only failed jobs
456
- curl -s -X POST \
457
- -H "Authorization: token $GITHUB_TOKEN" \
458
- https://api.github.com/repos/$OWNER/$REPO/actions/runs/$RUN_ID/rerun-failed-jobs
459
-
460
- # Trigger a workflow manually (workflow_dispatch)
461
- WORKFLOW_ID=<workflow_id_or_filename>
462
- curl -s -X POST \
463
- -H "Authorization: token $GITHUB_TOKEN" \
464
- https://api.github.com/repos/$OWNER/$REPO/actions/workflows/$WORKFLOW_ID/dispatches \
465
- -d '{"ref": "main", "inputs": {"environment": "staging"}}'
466
- ```
467
-
468
- ## 10. Gists
469
-
470
- **With gh:**
471
-
472
- ```bash
473
- gh gist create script.py --public --desc "Useful script"
474
- gh gist list
475
- ```
476
-
477
- **With curl:**
478
-
479
- ```bash
480
- # Create a gist
481
- curl -s -X POST \
482
- -H "Authorization: token $GITHUB_TOKEN" \
483
- https://api.github.com/gists \
484
- -d '{
485
- "description": "Useful script",
486
- "public": true,
487
- "files": {
488
- "script.py": {"content": "print(\"hello\")"}
489
- }
490
- }'
491
-
492
- # List your gists
493
- curl -s \
494
- -H "Authorization: token $GITHUB_TOKEN" \
495
- https://api.github.com/gists \
496
- | python3 -c "
497
- import sys, json
498
- for g in json.load(sys.stdin):
499
- files = ', '.join(g['files'].keys())
500
- print(f\" {g['id']} {g['description'] or '(no desc)':40} {files}\")"
501
- ```
502
-
503
- ## Quick Reference Table
504
-
505
- | Action | gh | git + curl |
506
- |--------|-----|-----------|
507
- | Clone | `gh repo clone o/r` | `git clone https://github.com/o/r.git` |
508
- | Create repo | `gh repo create name --public` | `curl POST /user/repos` |
509
- | Fork | `gh repo fork o/r --clone` | `curl POST /repos/o/r/forks` + `git clone` |
510
- | Repo info | `gh repo view o/r` | `curl GET /repos/o/r` |
511
- | Edit settings | `gh repo edit --...` | `curl PATCH /repos/o/r` |
512
- | Create release | `gh release create v1.0` | `curl POST /repos/o/r/releases` |
513
- | List workflows | `gh workflow list` | `curl GET /repos/o/r/actions/workflows` |
514
- | Rerun CI | `gh run rerun ID` | `curl POST /repos/o/r/actions/runs/ID/rerun` |
515
- | Set secret | `gh secret set KEY` | `curl PUT /repos/o/r/actions/secrets/KEY` (+ encryption) |
@@ -1,161 +0,0 @@
1
- # GitHub REST API Cheatsheet
2
-
3
- Base URL: `https://api.github.com`
4
-
5
- All requests need: `-H "Authorization: token $GITHUB_TOKEN"`
6
-
7
- Use the `gh-env.sh` helper to set `$GITHUB_TOKEN`, `$GH_OWNER`, `$GH_REPO` automatically:
8
- ```bash
9
- source ~/.hermes/skills/github/github-auth/scripts/gh-env.sh
10
- ```
11
-
12
- ## Repositories
13
-
14
- | Action | Method | Endpoint |
15
- |--------|--------|----------|
16
- | Get repo info | GET | `/repos/{owner}/{repo}` |
17
- | Create repo (user) | POST | `/user/repos` |
18
- | Create repo (org) | POST | `/orgs/{org}/repos` |
19
- | Update repo | PATCH | `/repos/{owner}/{repo}` |
20
- | Delete repo | DELETE | `/repos/{owner}/{repo}` |
21
- | List your repos | GET | `/user/repos?per_page=30&sort=updated` |
22
- | List org repos | GET | `/orgs/{org}/repos` |
23
- | Fork repo | POST | `/repos/{owner}/{repo}/forks` |
24
- | Create from template | POST | `/repos/{owner}/{template}/generate` |
25
- | Get topics | GET | `/repos/{owner}/{repo}/topics` |
26
- | Set topics | PUT | `/repos/{owner}/{repo}/topics` |
27
-
28
- ## Pull Requests
29
-
30
- | Action | Method | Endpoint |
31
- |--------|--------|----------|
32
- | List PRs | GET | `/repos/{owner}/{repo}/pulls?state=open` |
33
- | Create PR | POST | `/repos/{owner}/{repo}/pulls` |
34
- | Get PR | GET | `/repos/{owner}/{repo}/pulls/{number}` |
35
- | Update PR | PATCH | `/repos/{owner}/{repo}/pulls/{number}` |
36
- | List PR files | GET | `/repos/{owner}/{repo}/pulls/{number}/files` |
37
- | Merge PR | PUT | `/repos/{owner}/{repo}/pulls/{number}/merge` |
38
- | Request reviewers | POST | `/repos/{owner}/{repo}/pulls/{number}/requested_reviewers` |
39
- | Create review | POST | `/repos/{owner}/{repo}/pulls/{number}/reviews` |
40
- | Inline comment | POST | `/repos/{owner}/{repo}/pulls/{number}/comments` |
41
-
42
- ### PR Merge Body
43
-
44
- ```json
45
- {"merge_method": "squash", "commit_title": "feat: description (#N)"}
46
- ```
47
-
48
- Merge methods: `"merge"`, `"squash"`, `"rebase"`
49
-
50
- ### PR Review Events
51
-
52
- `"APPROVE"`, `"REQUEST_CHANGES"`, `"COMMENT"`
53
-
54
- ## Issues
55
-
56
- | Action | Method | Endpoint |
57
- |--------|--------|----------|
58
- | List issues | GET | `/repos/{owner}/{repo}/issues?state=open` |
59
- | Create issue | POST | `/repos/{owner}/{repo}/issues` |
60
- | Get issue | GET | `/repos/{owner}/{repo}/issues/{number}` |
61
- | Update issue | PATCH | `/repos/{owner}/{repo}/issues/{number}` |
62
- | Add comment | POST | `/repos/{owner}/{repo}/issues/{number}/comments` |
63
- | Add labels | POST | `/repos/{owner}/{repo}/issues/{number}/labels` |
64
- | Remove label | DELETE | `/repos/{owner}/{repo}/issues/{number}/labels/{name}` |
65
- | Add assignees | POST | `/repos/{owner}/{repo}/issues/{number}/assignees` |
66
- | List labels | GET | `/repos/{owner}/{repo}/labels` |
67
- | Search issues | GET | `/search/issues?q={query}+repo:{owner}/{repo}` |
68
-
69
- Note: The Issues API also returns PRs. Filter with `"pull_request" not in item` when parsing.
70
-
71
- ## CI / GitHub Actions
72
-
73
- | Action | Method | Endpoint |
74
- |--------|--------|----------|
75
- | List workflows | GET | `/repos/{owner}/{repo}/actions/workflows` |
76
- | List runs | GET | `/repos/{owner}/{repo}/actions/runs?per_page=10` |
77
- | List runs (branch) | GET | `/repos/{owner}/{repo}/actions/runs?branch={branch}` |
78
- | Get run | GET | `/repos/{owner}/{repo}/actions/runs/{run_id}` |
79
- | Download logs | GET | `/repos/{owner}/{repo}/actions/runs/{run_id}/logs` |
80
- | Re-run | POST | `/repos/{owner}/{repo}/actions/runs/{run_id}/rerun` |
81
- | Re-run failed | POST | `/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs` |
82
- | Trigger dispatch | POST | `/repos/{owner}/{repo}/actions/workflows/{id}/dispatches` |
83
- | Commit status | GET | `/repos/{owner}/{repo}/commits/{sha}/status` |
84
- | Check runs | GET | `/repos/{owner}/{repo}/commits/{sha}/check-runs` |
85
-
86
- ## Releases
87
-
88
- | Action | Method | Endpoint |
89
- |--------|--------|----------|
90
- | List releases | GET | `/repos/{owner}/{repo}/releases` |
91
- | Create release | POST | `/repos/{owner}/{repo}/releases` |
92
- | Get release | GET | `/repos/{owner}/{repo}/releases/{id}` |
93
- | Delete release | DELETE | `/repos/{owner}/{repo}/releases/{id}` |
94
- | Upload asset | POST | `https://uploads.github.com/repos/{owner}/{repo}/releases/{id}/assets?name={filename}` |
95
-
96
- ## Secrets
97
-
98
- | Action | Method | Endpoint |
99
- |--------|--------|----------|
100
- | List secrets | GET | `/repos/{owner}/{repo}/actions/secrets` |
101
- | Get public key | GET | `/repos/{owner}/{repo}/actions/secrets/public-key` |
102
- | Set secret | PUT | `/repos/{owner}/{repo}/actions/secrets/{name}` |
103
- | Delete secret | DELETE | `/repos/{owner}/{repo}/actions/secrets/{name}` |
104
-
105
- ## Branch Protection
106
-
107
- | Action | Method | Endpoint |
108
- |--------|--------|----------|
109
- | Get protection | GET | `/repos/{owner}/{repo}/branches/{branch}/protection` |
110
- | Set protection | PUT | `/repos/{owner}/{repo}/branches/{branch}/protection` |
111
- | Delete protection | DELETE | `/repos/{owner}/{repo}/branches/{branch}/protection` |
112
-
113
- ## User / Auth
114
-
115
- | Action | Method | Endpoint |
116
- |--------|--------|----------|
117
- | Get current user | GET | `/user` |
118
- | List user repos | GET | `/user/repos` |
119
- | List user gists | GET | `/gists` |
120
- | Create gist | POST | `/gists` |
121
- | Search repos | GET | `/search/repositories?q={query}` |
122
-
123
- ## Pagination
124
-
125
- Most list endpoints support:
126
- - `?per_page=100` (max 100)
127
- - `?page=2` for next page
128
- - Check `Link` header for `rel="next"` URL
129
-
130
- ## Rate Limits
131
-
132
- - Authenticated: 5,000 requests/hour
133
- - Check remaining: `curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/rate_limit`
134
-
135
- ## Common curl Patterns
136
-
137
- ```bash
138
- # GET
139
- curl -s -H "Authorization: token $GITHUB_TOKEN" \
140
- https://api.github.com/repos/$GH_OWNER/$GH_REPO
141
-
142
- # POST with JSON body
143
- curl -s -X POST \
144
- -H "Authorization: token $GITHUB_TOKEN" \
145
- https://api.github.com/repos/$GH_OWNER/$GH_REPO/issues \
146
- -d '{"title": "...", "body": "..."}'
147
-
148
- # PATCH (update)
149
- curl -s -X PATCH \
150
- -H "Authorization: token $GITHUB_TOKEN" \
151
- https://api.github.com/repos/$GH_OWNER/$GH_REPO/issues/42 \
152
- -d '{"state": "closed"}'
153
-
154
- # DELETE
155
- curl -s -X DELETE \
156
- -H "Authorization: token $GITHUB_TOKEN" \
157
- https://api.github.com/repos/$GH_OWNER/$GH_REPO/issues/42/labels/bug
158
-
159
- # Parse JSON response with python3
160
- curl -s ... | python3 -c "import sys,json; data=json.load(sys.stdin); print(data['field'])"
161
- ```