lastlight 0.1.15 → 0.2.1

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 +19 -9
  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,103 +0,0 @@
1
- ---
2
- name: github-orchestrator
3
- description: >
4
- Central coordinator for all GitHub work — routes events to the right action
5
- (triage, review, build) and orchestrates the Architect→Executor→Reviewer cycle
6
- for build requests. All work is tracked via GitHub issues.
7
- version: 3.0.0
8
- tags: [github, orchestrator, webhook, build-cycle, coordination]
9
- related_skills: [architect, pr-review, issue-triage, repo-health]
10
- ---
11
-
12
- # GitHub Orchestrator
13
-
14
- The build cycle is orchestrated programmatically by the harness (`src/engine/orchestrator.ts`).
15
- This skill file provides guidelines for each phase that the agent should follow.
16
-
17
- ## Git Authentication
18
-
19
- Git is pre-configured by the harness. Clone, push, pull, and fetch work natively:
20
-
21
- ```bash
22
- git clone https://github.com/owner/repo.git
23
- ```
24
-
25
- If auth fails after ~1 hour, call `refresh_git_auth` MCP tool with the repo path.
26
-
27
- ## Phase Guidelines
28
-
29
- ### Phase 0: Context Assembly
30
- - Read issue context via MCP tools (get_issue, list_issue_comments)
31
- - Clone the repo via `clone_repo` MCP tool
32
- - Check for existing branch: `git branch -a --list '*lastlight/{issue-number}*'`
33
- - If branch exists, read `.lastlight/issue-{N}/status.md` to resume
34
- - Read repo docs: CLAUDE.md, AGENTS.md, CONTRIBUTING.md
35
- - Assemble context snapshot: task, desired outcome, known facts, constraints, unknowns, touchpoints
36
-
37
- ### Phase 1: Architect
38
- - Create branch: `git checkout -b lastlight/{issue-number}-{slug}`
39
- - Analyze codebase (read-only — never edit files)
40
- - Reference specific locations as `file:line`
41
- - Write plan to `.lastlight/issue-{N}/architect-plan.md`
42
- - Plan must include: problem statement, files to modify, implementation steps, risks, test strategy, complexity estimate
43
- - Commit and push the plan
44
-
45
- ### Phase 2: Executor
46
- - Read the architect plan from `.lastlight/issue-{N}/architect-plan.md`
47
- - Follow TDD: write failing test first, then implement, then verify
48
- - Run tests and include fresh verification output
49
- - Write summary to `.lastlight/issue-{N}/executor-summary.md`
50
- - Commit with intent-first messages + Tested/Scope-risk trailers
51
-
52
- ### Phase 3: Reviewer
53
- - Independent context — no shared state with executor
54
- - Review ONLY changed files: `git diff main...HEAD`
55
- - Read architect-plan.md and executor-summary.md for context
56
- - Run tests independently
57
- - Write verdict to `.lastlight/issue-{N}/reviewer-verdict.md`
58
- - End with exactly: APPROVED or REQUEST_CHANGES
59
-
60
- ### Phase 4: Fix Loop (max 2 cycles)
61
- - Fix ONLY issues from reviewer-verdict.md
62
- - APPEND to executor-summary.md (never overwrite)
63
- - Re-run reviewer after each fix
64
-
65
- ### Phase 5: Create PR
66
- - Use `create_pull_request` MCP tool
67
- - Link to tracking issue with "Closes #N"
68
- - Include links to plan, summary, and verdict files on the branch
69
- - Post PR link as comment on the tracking issue
70
-
71
- ## Status File: `.lastlight/issue-{N}/status.md`
72
-
73
- ```markdown
74
- # Orchestrator Status: #{issue-number}
75
-
76
- | Field | Value |
77
- |-------|-------|
78
- | issue | {owner}/{repo}#{issue-number} |
79
- | branch | lastlight/{issue-number}-{slug} |
80
- | current_phase | {phase_0 / architect / executor / reviewer / fix_loop_N / complete} |
81
- | last_updated | {ISO timestamp} |
82
- | fix_cycles | {0, 1, 2} |
83
- | pr_number | {number or empty} |
84
-
85
- ## Phase Log
86
- | Phase | Status | Timestamp | Notes |
87
- |-------|--------|-----------|-------|
88
- ```
89
-
90
- Update after each phase transition. Commit + push alongside phase artifacts.
91
-
92
- ## Tool Usage
93
-
94
- - **GitHub API** (comments, labels, PRs, issues): use MCP tools
95
- - **Reading repo files**: clone once, read locally. Never use get_file_contents for bulk reads.
96
- - **Git auth**: pre-configured by harness. Just `git clone`. Call `refresh_git_auth` if auth expires.
97
- - **Suppress noise**: `git clone --quiet`, `git push --quiet`, `CI=true npm install`
98
-
99
- ## Always Ignore
100
-
101
- - Actions: deleted, edited, labeled, unlabeled, assigned, closed, synchronize
102
- - Bot senders (sender.type === "Bot" or login ending in "[bot]")
103
- - Events where sender matches the bot's own login
@@ -1,3 +0,0 @@
1
- ---
2
- description: Skills for working with MCP (Model Context Protocol) servers, tools, and integrations. Includes the built-in native MCP client (configure servers in config.yaml for automatic tool discovery) and the mcporter CLI bridge for ad-hoc server interaction.
3
- ---
@@ -1,122 +0,0 @@
1
- ---
2
- name: mcporter
3
- description: Use the mcporter CLI to list, configure, auth, and call MCP servers/tools directly (HTTP or stdio), including ad-hoc servers, config edits, and CLI/type generation.
4
- version: 1.0.0
5
- author: community
6
- license: MIT
7
- metadata:
8
- hermes:
9
- tags: [MCP, Tools, API, Integrations, Interop]
10
- homepage: https://mcporter.dev
11
- prerequisites:
12
- commands: [npx]
13
- ---
14
-
15
- # mcporter
16
-
17
- Use `mcporter` to discover, call, and manage [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) servers and tools directly from the terminal.
18
-
19
- ## Prerequisites
20
-
21
- Requires Node.js:
22
- ```bash
23
- # No install needed (runs via npx)
24
- npx mcporter list
25
-
26
- # Or install globally
27
- npm install -g mcporter
28
- ```
29
-
30
- ## Quick Start
31
-
32
- ```bash
33
- # List MCP servers already configured on this machine
34
- mcporter list
35
-
36
- # List tools for a specific server with schema details
37
- mcporter list <server> --schema
38
-
39
- # Call a tool
40
- mcporter call <server.tool> key=value
41
- ```
42
-
43
- ## Discovering MCP Servers
44
-
45
- mcporter auto-discovers servers configured by other MCP clients (Claude Desktop, Cursor, etc.) on the machine. To find new servers to use, browse registries like [mcpfinder.dev](https://mcpfinder.dev) or [mcp.so](https://mcp.so), then connect ad-hoc:
46
-
47
- ```bash
48
- # Connect to any MCP server by URL (no config needed)
49
- mcporter list --http-url https://some-mcp-server.com --name my_server
50
-
51
- # Or run a stdio server on the fly
52
- mcporter list --stdio "npx -y @modelcontextprotocol/server-filesystem" --name fs
53
- ```
54
-
55
- ## Calling Tools
56
-
57
- ```bash
58
- # Key=value syntax
59
- mcporter call linear.list_issues team=ENG limit:5
60
-
61
- # Function syntax
62
- mcporter call "linear.create_issue(title: \"Bug fix needed\")"
63
-
64
- # Ad-hoc HTTP server (no config needed)
65
- mcporter call https://api.example.com/mcp.fetch url=https://example.com
66
-
67
- # Ad-hoc stdio server
68
- mcporter call --stdio "bun run ./server.ts" scrape url=https://example.com
69
-
70
- # JSON payload
71
- mcporter call <server.tool> --args '{"limit": 5}'
72
-
73
- # Machine-readable output (recommended for Hermes)
74
- mcporter call <server.tool> key=value --output json
75
- ```
76
-
77
- ## Auth and Config
78
-
79
- ```bash
80
- # OAuth login for a server
81
- mcporter auth <server | url> [--reset]
82
-
83
- # Manage config
84
- mcporter config list
85
- mcporter config get <key>
86
- mcporter config add <server>
87
- mcporter config remove <server>
88
- mcporter config import <path>
89
- ```
90
-
91
- Config file location: `./config/mcporter.json` (override with `--config`).
92
-
93
- ## Daemon
94
-
95
- For persistent server connections:
96
- ```bash
97
- mcporter daemon start
98
- mcporter daemon status
99
- mcporter daemon stop
100
- mcporter daemon restart
101
- ```
102
-
103
- ## Code Generation
104
-
105
- ```bash
106
- # Generate a CLI wrapper for an MCP server
107
- mcporter generate-cli --server <name>
108
- mcporter generate-cli --command <url>
109
-
110
- # Inspect a generated CLI
111
- mcporter inspect-cli <path> [--json]
112
-
113
- # Generate TypeScript types/client
114
- mcporter emit-ts <server> --mode client
115
- mcporter emit-ts <server> --mode types
116
- ```
117
-
118
- ## Notes
119
-
120
- - Use `--output json` for structured output that's easier to parse
121
- - Ad-hoc servers (HTTP URL or `--stdio` command) work without any config — useful for one-off calls
122
- - OAuth auth may require interactive browser flow — use `terminal(command="mcporter auth <server>", pty=true)` if needed
@@ -1,356 +0,0 @@
1
- ---
2
- name: native-mcp
3
- description: Built-in MCP (Model Context Protocol) client that connects to external MCP servers, discovers their tools, and registers them as native Hermes Agent tools. Supports stdio and HTTP transports with automatic reconnection, security filtering, and zero-config tool injection.
4
- version: 1.0.0
5
- author: Hermes Agent
6
- license: MIT
7
- metadata:
8
- hermes:
9
- tags: [MCP, Tools, Integrations]
10
- related_skills: [mcporter]
11
- ---
12
-
13
- # Native MCP Client
14
-
15
- Hermes Agent has a built-in MCP client that connects to MCP servers at startup, discovers their tools, and makes them available as first-class tools the agent can call directly. No bridge CLI needed -- tools from MCP servers appear alongside built-in tools like `terminal`, `read_file`, etc.
16
-
17
- ## When to Use
18
-
19
- Use this whenever you want to:
20
- - Connect to MCP servers and use their tools from within Hermes Agent
21
- - Add external capabilities (filesystem access, GitHub, databases, APIs) via MCP
22
- - Run local stdio-based MCP servers (npx, uvx, or any command)
23
- - Connect to remote HTTP/StreamableHTTP MCP servers
24
- - Have MCP tools auto-discovered and available in every conversation
25
-
26
- For ad-hoc, one-off MCP tool calls from the terminal without configuring anything, see the `mcporter` skill instead.
27
-
28
- ## Prerequisites
29
-
30
- - **mcp Python package** -- optional dependency; install with `pip install mcp`. If not installed, MCP support is silently disabled.
31
- - **Node.js** -- required for `npx`-based MCP servers (most community servers)
32
- - **uv** -- required for `uvx`-based MCP servers (Python-based servers)
33
-
34
- Install the MCP SDK:
35
-
36
- ```bash
37
- pip install mcp
38
- # or, if using uv:
39
- uv pip install mcp
40
- ```
41
-
42
- ## Quick Start
43
-
44
- Add MCP servers to `~/.hermes/config.yaml` under the `mcp_servers` key:
45
-
46
- ```yaml
47
- mcp_servers:
48
- time:
49
- command: "uvx"
50
- args: ["mcp-server-time"]
51
- ```
52
-
53
- Restart Hermes Agent. On startup it will:
54
- 1. Connect to the server
55
- 2. Discover available tools
56
- 3. Register them with the prefix `mcp_time_*`
57
- 4. Inject them into all platform toolsets
58
-
59
- You can then use the tools naturally -- just ask the agent to get the current time.
60
-
61
- ## Configuration Reference
62
-
63
- Each entry under `mcp_servers` is a server name mapped to its config. There are two transport types: **stdio** (command-based) and **HTTP** (url-based).
64
-
65
- ### Stdio Transport (command + args)
66
-
67
- ```yaml
68
- mcp_servers:
69
- server_name:
70
- command: "npx" # (required) executable to run
71
- args: ["-y", "pkg-name"] # (optional) command arguments, default: []
72
- env: # (optional) environment variables for the subprocess
73
- SOME_API_KEY: "value"
74
- timeout: 120 # (optional) per-tool-call timeout in seconds, default: 120
75
- connect_timeout: 60 # (optional) initial connection timeout in seconds, default: 60
76
- ```
77
-
78
- ### HTTP Transport (url)
79
-
80
- ```yaml
81
- mcp_servers:
82
- server_name:
83
- url: "https://my-server.example.com/mcp" # (required) server URL
84
- headers: # (optional) HTTP headers
85
- Authorization: "Bearer sk-..."
86
- timeout: 180 # (optional) per-tool-call timeout in seconds, default: 120
87
- connect_timeout: 60 # (optional) initial connection timeout in seconds, default: 60
88
- ```
89
-
90
- ### All Config Options
91
-
92
- | Option | Type | Default | Description |
93
- |-------------------|--------|---------|---------------------------------------------------|
94
- | `command` | string | -- | Executable to run (stdio transport, required) |
95
- | `args` | list | `[]` | Arguments passed to the command |
96
- | `env` | dict | `{}` | Extra environment variables for the subprocess |
97
- | `url` | string | -- | Server URL (HTTP transport, required) |
98
- | `headers` | dict | `{}` | HTTP headers sent with every request |
99
- | `timeout` | int | `120` | Per-tool-call timeout in seconds |
100
- | `connect_timeout` | int | `60` | Timeout for initial connection and discovery |
101
-
102
- Note: A server config must have either `command` (stdio) or `url` (HTTP), not both.
103
-
104
- ## How It Works
105
-
106
- ### Startup Discovery
107
-
108
- When Hermes Agent starts, `discover_mcp_tools()` is called during tool initialization:
109
-
110
- 1. Reads `mcp_servers` from `~/.hermes/config.yaml`
111
- 2. For each server, spawns a connection in a dedicated background event loop
112
- 3. Initializes the MCP session and calls `list_tools()` to discover available tools
113
- 4. Registers each tool in the Hermes tool registry
114
-
115
- ### Tool Naming Convention
116
-
117
- MCP tools are registered with the naming pattern:
118
-
119
- ```
120
- mcp_{server_name}_{tool_name}
121
- ```
122
-
123
- Hyphens and dots in names are replaced with underscores for LLM API compatibility.
124
-
125
- Examples:
126
- - Server `filesystem`, tool `read_file` → `mcp_filesystem_read_file`
127
- - Server `github`, tool `list-issues` → `mcp_github_list_issues`
128
- - Server `my-api`, tool `fetch.data` → `mcp_my_api_fetch_data`
129
-
130
- ### Auto-Injection
131
-
132
- After discovery, MCP tools are automatically injected into all `hermes-*` platform toolsets (CLI, Discord, Telegram, etc.). This means MCP tools are available in every conversation without any additional configuration.
133
-
134
- ### Connection Lifecycle
135
-
136
- - Each server runs as a long-lived asyncio Task in a background daemon thread
137
- - Connections persist for the lifetime of the agent process
138
- - If a connection drops, automatic reconnection with exponential backoff kicks in (up to 5 retries, max 60s backoff)
139
- - On agent shutdown, all connections are gracefully closed
140
-
141
- ### Idempotency
142
-
143
- `discover_mcp_tools()` is idempotent -- calling it multiple times only connects to servers that aren't already connected. Failed servers are retried on subsequent calls.
144
-
145
- ## Transport Types
146
-
147
- ### Stdio Transport
148
-
149
- The most common transport. Hermes launches the MCP server as a subprocess and communicates over stdin/stdout.
150
-
151
- ```yaml
152
- mcp_servers:
153
- filesystem:
154
- command: "npx"
155
- args: ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/projects"]
156
- ```
157
-
158
- The subprocess inherits a **filtered** environment (see Security section below) plus any variables you specify in `env`.
159
-
160
- ### HTTP / StreamableHTTP Transport
161
-
162
- For remote or shared MCP servers. Requires the `mcp` package to include HTTP client support (`mcp.client.streamable_http`).
163
-
164
- ```yaml
165
- mcp_servers:
166
- remote_api:
167
- url: "https://mcp.example.com/mcp"
168
- headers:
169
- Authorization: "Bearer sk-..."
170
- ```
171
-
172
- If HTTP support is not available in your installed `mcp` version, the server will fail with an ImportError and other servers will continue normally.
173
-
174
- ## Security
175
-
176
- ### Environment Variable Filtering
177
-
178
- For stdio servers, Hermes does NOT pass your full shell environment to MCP subprocesses. Only safe baseline variables are inherited:
179
-
180
- - `PATH`, `HOME`, `USER`, `LANG`, `LC_ALL`, `TERM`, `SHELL`, `TMPDIR`
181
- - Any `XDG_*` variables
182
-
183
- All other environment variables (API keys, tokens, secrets) are excluded unless you explicitly add them via the `env` config key. This prevents accidental credential leakage to untrusted MCP servers.
184
-
185
- ```yaml
186
- mcp_servers:
187
- github:
188
- command: "npx"
189
- args: ["-y", "@modelcontextprotocol/server-github"]
190
- env:
191
- # Only this token is passed to the subprocess
192
- GITHUB_PERSONAL_ACCESS_TOKEN: "ghp_..."
193
- ```
194
-
195
- ### Credential Stripping in Error Messages
196
-
197
- If an MCP tool call fails, any credential-like patterns in the error message are automatically redacted before being shown to the LLM. This covers:
198
-
199
- - GitHub PATs (`ghp_...`)
200
- - OpenAI-style keys (`sk-...`)
201
- - Bearer tokens
202
- - Generic `token=`, `key=`, `API_KEY=`, `password=`, `secret=` patterns
203
-
204
- ## Troubleshooting
205
-
206
- ### "MCP SDK not available -- skipping MCP tool discovery"
207
-
208
- The `mcp` Python package is not installed. Install it:
209
-
210
- ```bash
211
- pip install mcp
212
- ```
213
-
214
- ### "No MCP servers configured"
215
-
216
- No `mcp_servers` key in `~/.hermes/config.yaml`, or it's empty. Add at least one server.
217
-
218
- ### "Failed to connect to MCP server 'X'"
219
-
220
- Common causes:
221
- - **Command not found**: The `command` binary isn't on PATH. Ensure `npx`, `uvx`, or the relevant command is installed.
222
- - **Package not found**: For npx servers, the npm package may not exist or may need `-y` in args to auto-install.
223
- - **Timeout**: The server took too long to start. Increase `connect_timeout`.
224
- - **Port conflict**: For HTTP servers, the URL may be unreachable.
225
-
226
- ### "MCP server 'X' requires HTTP transport but mcp.client.streamable_http is not available"
227
-
228
- Your `mcp` package version doesn't include HTTP client support. Upgrade:
229
-
230
- ```bash
231
- pip install --upgrade mcp
232
- ```
233
-
234
- ### Tools not appearing
235
-
236
- - Check that the server is listed under `mcp_servers` (not `mcp` or `servers`)
237
- - Ensure the YAML indentation is correct
238
- - Look at Hermes Agent startup logs for connection messages
239
- - Tool names are prefixed with `mcp_{server}_{tool}` -- look for that pattern
240
-
241
- ### Connection keeps dropping
242
-
243
- The client retries up to 5 times with exponential backoff (1s, 2s, 4s, 8s, 16s, capped at 60s). If the server is fundamentally unreachable, it gives up after 5 attempts. Check the server process and network connectivity.
244
-
245
- ## Examples
246
-
247
- ### Time Server (uvx)
248
-
249
- ```yaml
250
- mcp_servers:
251
- time:
252
- command: "uvx"
253
- args: ["mcp-server-time"]
254
- ```
255
-
256
- Registers tools like `mcp_time_get_current_time`.
257
-
258
- ### Filesystem Server (npx)
259
-
260
- ```yaml
261
- mcp_servers:
262
- filesystem:
263
- command: "npx"
264
- args: ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/documents"]
265
- timeout: 30
266
- ```
267
-
268
- Registers tools like `mcp_filesystem_read_file`, `mcp_filesystem_write_file`, `mcp_filesystem_list_directory`.
269
-
270
- ### GitHub Server with Authentication
271
-
272
- ```yaml
273
- mcp_servers:
274
- github:
275
- command: "npx"
276
- args: ["-y", "@modelcontextprotocol/server-github"]
277
- env:
278
- GITHUB_PERSONAL_ACCESS_TOKEN: "ghp_xxxxxxxxxxxxxxxxxxxx"
279
- timeout: 60
280
- ```
281
-
282
- Registers tools like `mcp_github_list_issues`, `mcp_github_create_pull_request`, etc.
283
-
284
- ### Remote HTTP Server
285
-
286
- ```yaml
287
- mcp_servers:
288
- company_api:
289
- url: "https://mcp.mycompany.com/v1/mcp"
290
- headers:
291
- Authorization: "Bearer sk-xxxxxxxxxxxxxxxxxxxx"
292
- X-Team-Id: "engineering"
293
- timeout: 180
294
- connect_timeout: 30
295
- ```
296
-
297
- ### Multiple Servers
298
-
299
- ```yaml
300
- mcp_servers:
301
- time:
302
- command: "uvx"
303
- args: ["mcp-server-time"]
304
-
305
- filesystem:
306
- command: "npx"
307
- args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
308
-
309
- github:
310
- command: "npx"
311
- args: ["-y", "@modelcontextprotocol/server-github"]
312
- env:
313
- GITHUB_PERSONAL_ACCESS_TOKEN: "ghp_xxxxxxxxxxxxxxxxxxxx"
314
-
315
- company_api:
316
- url: "https://mcp.internal.company.com/mcp"
317
- headers:
318
- Authorization: "Bearer sk-xxxxxxxxxxxxxxxxxxxx"
319
- timeout: 300
320
- ```
321
-
322
- All tools from all servers are registered and available simultaneously. Each server's tools are prefixed with its name to avoid collisions.
323
-
324
- ## Sampling (Server-Initiated LLM Requests)
325
-
326
- Hermes supports MCP's `sampling/createMessage` capability — MCP servers can request LLM completions through the agent during tool execution. This enables agent-in-the-loop workflows (data analysis, content generation, decision-making).
327
-
328
- Sampling is **enabled by default**. Configure per server:
329
-
330
- ```yaml
331
- mcp_servers:
332
- my_server:
333
- command: "npx"
334
- args: ["-y", "my-mcp-server"]
335
- sampling:
336
- enabled: true # default: true
337
- model: "gemini-3-flash" # model override (optional)
338
- max_tokens_cap: 4096 # max tokens per request
339
- timeout: 30 # LLM call timeout (seconds)
340
- max_rpm: 10 # max requests per minute
341
- allowed_models: [] # model whitelist (empty = all)
342
- max_tool_rounds: 5 # tool loop limit (0 = disable)
343
- log_level: "info" # audit verbosity
344
- ```
345
-
346
- Servers can also include `tools` in sampling requests for multi-turn tool-augmented workflows. The `max_tool_rounds` config prevents infinite tool loops. Per-server audit metrics (requests, errors, tokens, tool use count) are tracked via `get_mcp_status()`.
347
-
348
- Disable sampling for untrusted servers with `sampling: { enabled: false }`.
349
-
350
- ## Notes
351
-
352
- - MCP tools are called synchronously from the agent's perspective but run asynchronously on a dedicated background event loop
353
- - Tool results are returned as JSON with either `{"result": "..."}` or `{"error": "..."}`
354
- - The native MCP client is independent of `mcporter` -- you can use both simultaneously
355
- - Server connections are persistent and shared across all conversations in the same agent process
356
- - Adding or removing servers requires restarting the agent (no hot-reload currently)