@sentropic/h2a-cli 0.74.0 → 0.78.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 (346) hide show
  1. package/dist/index.d.ts +1 -36
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +2 -40
  4. package/dist/index.js.map +1 -1
  5. package/package.json +4 -15
  6. package/dist/bin.d.ts +0 -3
  7. package/dist/bin.d.ts.map +0 -1
  8. package/dist/bin.js +0 -83
  9. package/dist/bin.js.map +0 -1
  10. package/dist/cli-contract.d.ts +0 -62
  11. package/dist/cli-contract.d.ts.map +0 -1
  12. package/dist/cli-contract.js +0 -729
  13. package/dist/cli-contract.js.map +0 -1
  14. package/dist/cli.d.ts +0 -254
  15. package/dist/cli.d.ts.map +0 -1
  16. package/dist/cli.js +0 -4530
  17. package/dist/cli.js.map +0 -1
  18. package/dist/hosts/agy.d.ts +0 -14
  19. package/dist/hosts/agy.d.ts.map +0 -1
  20. package/dist/hosts/agy.js +0 -47
  21. package/dist/hosts/agy.js.map +0 -1
  22. package/dist/hosts/claude.d.ts +0 -12
  23. package/dist/hosts/claude.d.ts.map +0 -1
  24. package/dist/hosts/claude.js +0 -46
  25. package/dist/hosts/claude.js.map +0 -1
  26. package/dist/hosts/codex.d.ts +0 -65
  27. package/dist/hosts/codex.d.ts.map +0 -1
  28. package/dist/hosts/codex.js +0 -45
  29. package/dist/hosts/codex.js.map +0 -1
  30. package/dist/hosts/gemini.d.ts +0 -12
  31. package/dist/hosts/gemini.d.ts.map +0 -1
  32. package/dist/hosts/gemini.js +0 -46
  33. package/dist/hosts/gemini.js.map +0 -1
  34. package/dist/hosts/plugin.d.ts +0 -151
  35. package/dist/hosts/plugin.d.ts.map +0 -1
  36. package/dist/hosts/plugin.js +0 -188
  37. package/dist/hosts/plugin.js.map +0 -1
  38. package/dist/mcp.d.ts +0 -2
  39. package/dist/mcp.d.ts.map +0 -1
  40. package/dist/mcp.js +0 -32
  41. package/dist/mcp.js.map +0 -1
  42. package/dist/runtime/blockage/index.d.ts +0 -3
  43. package/dist/runtime/blockage/index.d.ts.map +0 -1
  44. package/dist/runtime/blockage/index.js +0 -3
  45. package/dist/runtime/blockage/index.js.map +0 -1
  46. package/dist/runtime/blockage/notifiers.d.ts +0 -52
  47. package/dist/runtime/blockage/notifiers.d.ts.map +0 -1
  48. package/dist/runtime/blockage/notifiers.js +0 -74
  49. package/dist/runtime/blockage/notifiers.js.map +0 -1
  50. package/dist/runtime/blockage/registry.d.ts +0 -30
  51. package/dist/runtime/blockage/registry.d.ts.map +0 -1
  52. package/dist/runtime/blockage/registry.js +0 -86
  53. package/dist/runtime/blockage/registry.js.map +0 -1
  54. package/dist/runtime/deploy/k8s-sidecar.d.ts +0 -92
  55. package/dist/runtime/deploy/k8s-sidecar.d.ts.map +0 -1
  56. package/dist/runtime/deploy/k8s-sidecar.js +0 -166
  57. package/dist/runtime/deploy/k8s-sidecar.js.map +0 -1
  58. package/dist/runtime/deploy/k8s-tenant.d.ts +0 -86
  59. package/dist/runtime/deploy/k8s-tenant.d.ts.map +0 -1
  60. package/dist/runtime/deploy/k8s-tenant.js +0 -255
  61. package/dist/runtime/deploy/k8s-tenant.js.map +0 -1
  62. package/dist/runtime/drive/inbox-wake.d.ts +0 -36
  63. package/dist/runtime/drive/inbox-wake.d.ts.map +0 -1
  64. package/dist/runtime/drive/inbox-wake.js +0 -50
  65. package/dist/runtime/drive/inbox-wake.js.map +0 -1
  66. package/dist/runtime/drive/index.d.ts +0 -173
  67. package/dist/runtime/drive/index.d.ts.map +0 -1
  68. package/dist/runtime/drive/index.js +0 -503
  69. package/dist/runtime/drive/index.js.map +0 -1
  70. package/dist/runtime/drumbeat/deciders.d.ts +0 -32
  71. package/dist/runtime/drumbeat/deciders.d.ts.map +0 -1
  72. package/dist/runtime/drumbeat/deciders.js +0 -65
  73. package/dist/runtime/drumbeat/deciders.js.map +0 -1
  74. package/dist/runtime/drumbeat/decisions.d.ts +0 -19
  75. package/dist/runtime/drumbeat/decisions.d.ts.map +0 -1
  76. package/dist/runtime/drumbeat/decisions.js +0 -34
  77. package/dist/runtime/drumbeat/decisions.js.map +0 -1
  78. package/dist/runtime/drumbeat/inbox-relance.d.ts +0 -29
  79. package/dist/runtime/drumbeat/inbox-relance.d.ts.map +0 -1
  80. package/dist/runtime/drumbeat/inbox-relance.js +0 -101
  81. package/dist/runtime/drumbeat/inbox-relance.js.map +0 -1
  82. package/dist/runtime/drumbeat/index.d.ts +0 -8
  83. package/dist/runtime/drumbeat/index.d.ts.map +0 -1
  84. package/dist/runtime/drumbeat/index.js +0 -8
  85. package/dist/runtime/drumbeat/index.js.map +0 -1
  86. package/dist/runtime/drumbeat/registry.d.ts +0 -60
  87. package/dist/runtime/drumbeat/registry.d.ts.map +0 -1
  88. package/dist/runtime/drumbeat/registry.js +0 -115
  89. package/dist/runtime/drumbeat/registry.js.map +0 -1
  90. package/dist/runtime/drumbeat/relaunchers.d.ts +0 -111
  91. package/dist/runtime/drumbeat/relaunchers.d.ts.map +0 -1
  92. package/dist/runtime/drumbeat/relaunchers.js +0 -242
  93. package/dist/runtime/drumbeat/relaunchers.js.map +0 -1
  94. package/dist/runtime/drumbeat/scan.d.ts +0 -36
  95. package/dist/runtime/drumbeat/scan.d.ts.map +0 -1
  96. package/dist/runtime/drumbeat/scan.js +0 -41
  97. package/dist/runtime/drumbeat/scan.js.map +0 -1
  98. package/dist/runtime/drumbeat/watch.d.ts +0 -74
  99. package/dist/runtime/drumbeat/watch.d.ts.map +0 -1
  100. package/dist/runtime/drumbeat/watch.js +0 -216
  101. package/dist/runtime/drumbeat/watch.js.map +0 -1
  102. package/dist/runtime/escalation/index.d.ts +0 -2
  103. package/dist/runtime/escalation/index.d.ts.map +0 -1
  104. package/dist/runtime/escalation/index.js +0 -2
  105. package/dist/runtime/escalation/index.js.map +0 -1
  106. package/dist/runtime/escalation/registry.d.ts +0 -44
  107. package/dist/runtime/escalation/registry.d.ts.map +0 -1
  108. package/dist/runtime/escalation/registry.js +0 -79
  109. package/dist/runtime/escalation/registry.js.map +0 -1
  110. package/dist/runtime/governance/claims.d.ts +0 -43
  111. package/dist/runtime/governance/claims.d.ts.map +0 -1
  112. package/dist/runtime/governance/claims.js +0 -93
  113. package/dist/runtime/governance/claims.js.map +0 -1
  114. package/dist/runtime/governance/conductor.d.ts +0 -79
  115. package/dist/runtime/governance/conductor.d.ts.map +0 -1
  116. package/dist/runtime/governance/conductor.js +0 -106
  117. package/dist/runtime/governance/conductor.js.map +0 -1
  118. package/dist/runtime/governance/index.d.ts +0 -5
  119. package/dist/runtime/governance/index.d.ts.map +0 -1
  120. package/dist/runtime/governance/index.js +0 -5
  121. package/dist/runtime/governance/index.js.map +0 -1
  122. package/dist/runtime/governance/launch-check.d.ts +0 -93
  123. package/dist/runtime/governance/launch-check.d.ts.map +0 -1
  124. package/dist/runtime/governance/launch-check.js +0 -113
  125. package/dist/runtime/governance/launch-check.js.map +0 -1
  126. package/dist/runtime/governance/spawns.d.ts +0 -50
  127. package/dist/runtime/governance/spawns.d.ts.map +0 -1
  128. package/dist/runtime/governance/spawns.js +0 -91
  129. package/dist/runtime/governance/spawns.js.map +0 -1
  130. package/dist/runtime/identity/bindings.d.ts +0 -84
  131. package/dist/runtime/identity/bindings.d.ts.map +0 -1
  132. package/dist/runtime/identity/bindings.js +0 -112
  133. package/dist/runtime/identity/bindings.js.map +0 -1
  134. package/dist/runtime/identity/index.d.ts +0 -11
  135. package/dist/runtime/identity/index.d.ts.map +0 -1
  136. package/dist/runtime/identity/index.js +0 -6
  137. package/dist/runtime/identity/index.js.map +0 -1
  138. package/dist/runtime/identity/live.d.ts +0 -26
  139. package/dist/runtime/identity/live.d.ts.map +0 -1
  140. package/dist/runtime/identity/live.js +0 -232
  141. package/dist/runtime/identity/live.js.map +0 -1
  142. package/dist/runtime/identity/migration.d.ts +0 -55
  143. package/dist/runtime/identity/migration.d.ts.map +0 -1
  144. package/dist/runtime/identity/migration.js +0 -100
  145. package/dist/runtime/identity/migration.js.map +0 -1
  146. package/dist/runtime/identity/readers.d.ts +0 -42
  147. package/dist/runtime/identity/readers.d.ts.map +0 -1
  148. package/dist/runtime/identity/readers.js +0 -248
  149. package/dist/runtime/identity/readers.js.map +0 -1
  150. package/dist/runtime/identity/resolver.d.ts +0 -50
  151. package/dist/runtime/identity/resolver.d.ts.map +0 -1
  152. package/dist/runtime/identity/resolver.js +0 -61
  153. package/dist/runtime/identity/resolver.js.map +0 -1
  154. package/dist/runtime/identity/workspace-id.d.ts +0 -43
  155. package/dist/runtime/identity/workspace-id.d.ts.map +0 -1
  156. package/dist/runtime/identity/workspace-id.js +0 -138
  157. package/dist/runtime/identity/workspace-id.js.map +0 -1
  158. package/dist/runtime/local-files/index.d.ts +0 -8
  159. package/dist/runtime/local-files/index.d.ts.map +0 -1
  160. package/dist/runtime/local-files/index.js +0 -8
  161. package/dist/runtime/local-files/index.js.map +0 -1
  162. package/dist/runtime/local-files/lease.d.ts +0 -62
  163. package/dist/runtime/local-files/lease.d.ts.map +0 -1
  164. package/dist/runtime/local-files/lease.js +0 -249
  165. package/dist/runtime/local-files/lease.js.map +0 -1
  166. package/dist/runtime/local-files/locks.d.ts +0 -43
  167. package/dist/runtime/local-files/locks.d.ts.map +0 -1
  168. package/dist/runtime/local-files/locks.js +0 -197
  169. package/dist/runtime/local-files/locks.js.map +0 -1
  170. package/dist/runtime/local-files/migrate.d.ts +0 -31
  171. package/dist/runtime/local-files/migrate.d.ts.map +0 -1
  172. package/dist/runtime/local-files/migrate.js +0 -104
  173. package/dist/runtime/local-files/migrate.js.map +0 -1
  174. package/dist/runtime/local-files/paths.d.ts +0 -146
  175. package/dist/runtime/local-files/paths.d.ts.map +0 -1
  176. package/dist/runtime/local-files/paths.js +0 -233
  177. package/dist/runtime/local-files/paths.js.map +0 -1
  178. package/dist/runtime/local-files/presence.d.ts +0 -80
  179. package/dist/runtime/local-files/presence.d.ts.map +0 -1
  180. package/dist/runtime/local-files/presence.js +0 -250
  181. package/dist/runtime/local-files/presence.js.map +0 -1
  182. package/dist/runtime/local-files/schema.d.ts +0 -47
  183. package/dist/runtime/local-files/schema.d.ts.map +0 -1
  184. package/dist/runtime/local-files/schema.js +0 -77
  185. package/dist/runtime/local-files/schema.js.map +0 -1
  186. package/dist/runtime/local-files/store.d.ts +0 -132
  187. package/dist/runtime/local-files/store.d.ts.map +0 -1
  188. package/dist/runtime/local-files/store.js +0 -997
  189. package/dist/runtime/local-files/store.js.map +0 -1
  190. package/dist/runtime/mcp/handlers.d.ts +0 -196
  191. package/dist/runtime/mcp/handlers.d.ts.map +0 -1
  192. package/dist/runtime/mcp/handlers.js +0 -1025
  193. package/dist/runtime/mcp/handlers.js.map +0 -1
  194. package/dist/runtime/mcp/index.d.ts +0 -7
  195. package/dist/runtime/mcp/index.d.ts.map +0 -1
  196. package/dist/runtime/mcp/index.js +0 -7
  197. package/dist/runtime/mcp/index.js.map +0 -1
  198. package/dist/runtime/mcp/notifications.d.ts +0 -47
  199. package/dist/runtime/mcp/notifications.d.ts.map +0 -1
  200. package/dist/runtime/mcp/notifications.js +0 -204
  201. package/dist/runtime/mcp/notifications.js.map +0 -1
  202. package/dist/runtime/mcp/server.d.ts +0 -45
  203. package/dist/runtime/mcp/server.d.ts.map +0 -1
  204. package/dist/runtime/mcp/server.js +0 -94
  205. package/dist/runtime/mcp/server.js.map +0 -1
  206. package/dist/runtime/mcp/sessions.d.ts +0 -68
  207. package/dist/runtime/mcp/sessions.d.ts.map +0 -1
  208. package/dist/runtime/mcp/sessions.js +0 -152
  209. package/dist/runtime/mcp/sessions.js.map +0 -1
  210. package/dist/runtime/mcp/stdio.d.ts +0 -72
  211. package/dist/runtime/mcp/stdio.d.ts.map +0 -1
  212. package/dist/runtime/mcp/stdio.js +0 -274
  213. package/dist/runtime/mcp/stdio.js.map +0 -1
  214. package/dist/runtime/mcp/tools.d.ts +0 -19
  215. package/dist/runtime/mcp/tools.d.ts.map +0 -1
  216. package/dist/runtime/mcp/tools.js +0 -525
  217. package/dist/runtime/mcp/tools.js.map +0 -1
  218. package/dist/runtime/mcp-http/app.d.ts +0 -33
  219. package/dist/runtime/mcp-http/app.d.ts.map +0 -1
  220. package/dist/runtime/mcp-http/app.js +0 -162
  221. package/dist/runtime/mcp-http/app.js.map +0 -1
  222. package/dist/runtime/mcp-http/hosted-mcp-server.d.ts +0 -14
  223. package/dist/runtime/mcp-http/hosted-mcp-server.d.ts.map +0 -1
  224. package/dist/runtime/mcp-http/hosted-mcp-server.js +0 -38
  225. package/dist/runtime/mcp-http/hosted-mcp-server.js.map +0 -1
  226. package/dist/runtime/mcp-http/index.d.ts +0 -18
  227. package/dist/runtime/mcp-http/index.d.ts.map +0 -1
  228. package/dist/runtime/mcp-http/index.js +0 -18
  229. package/dist/runtime/mcp-http/index.js.map +0 -1
  230. package/dist/runtime/mcp-http/main.d.ts +0 -2
  231. package/dist/runtime/mcp-http/main.d.ts.map +0 -1
  232. package/dist/runtime/mcp-http/main.js +0 -14
  233. package/dist/runtime/mcp-http/main.js.map +0 -1
  234. package/dist/runtime/mcp-http/oauth/broker-login.d.ts +0 -50
  235. package/dist/runtime/mcp-http/oauth/broker-login.d.ts.map +0 -1
  236. package/dist/runtime/mcp-http/oauth/broker-login.js +0 -41
  237. package/dist/runtime/mcp-http/oauth/broker-login.js.map +0 -1
  238. package/dist/runtime/mcp-http/oauth/broker-routes.d.ts +0 -45
  239. package/dist/runtime/mcp-http/oauth/broker-routes.d.ts.map +0 -1
  240. package/dist/runtime/mcp-http/oauth/broker-routes.js +0 -54
  241. package/dist/runtime/mcp-http/oauth/broker-routes.js.map +0 -1
  242. package/dist/runtime/mcp-http/oauth/config.d.ts +0 -49
  243. package/dist/runtime/mcp-http/oauth/config.d.ts.map +0 -1
  244. package/dist/runtime/mcp-http/oauth/config.js +0 -69
  245. package/dist/runtime/mcp-http/oauth/config.js.map +0 -1
  246. package/dist/runtime/mcp-http/oauth/crypto.d.ts +0 -14
  247. package/dist/runtime/mcp-http/oauth/crypto.d.ts.map +0 -1
  248. package/dist/runtime/mcp-http/oauth/crypto.js +0 -29
  249. package/dist/runtime/mcp-http/oauth/crypto.js.map +0 -1
  250. package/dist/runtime/mcp-http/oauth/file-store.d.ts +0 -48
  251. package/dist/runtime/mcp-http/oauth/file-store.d.ts.map +0 -1
  252. package/dist/runtime/mcp-http/oauth/file-store.js +0 -101
  253. package/dist/runtime/mcp-http/oauth/file-store.js.map +0 -1
  254. package/dist/runtime/mcp-http/oauth/hono-oauth-router.d.ts +0 -5
  255. package/dist/runtime/mcp-http/oauth/hono-oauth-router.d.ts.map +0 -1
  256. package/dist/runtime/mcp-http/oauth/hono-oauth-router.js +0 -92
  257. package/dist/runtime/mcp-http/oauth/hono-oauth-router.js.map +0 -1
  258. package/dist/runtime/mcp-http/oauth/oidc-rp.d.ts +0 -56
  259. package/dist/runtime/mcp-http/oauth/oidc-rp.d.ts.map +0 -1
  260. package/dist/runtime/mcp-http/oauth/oidc-rp.js +0 -63
  261. package/dist/runtime/mcp-http/oauth/oidc-rp.js.map +0 -1
  262. package/dist/runtime/mcp-http/oauth/redirect-uri.d.ts +0 -11
  263. package/dist/runtime/mcp-http/oauth/redirect-uri.d.ts.map +0 -1
  264. package/dist/runtime/mcp-http/oauth/redirect-uri.js +0 -29
  265. package/dist/runtime/mcp-http/oauth/redirect-uri.js.map +0 -1
  266. package/dist/runtime/mcp-http/oauth/single-tenant-provider.d.ts +0 -70
  267. package/dist/runtime/mcp-http/oauth/single-tenant-provider.d.ts.map +0 -1
  268. package/dist/runtime/mcp-http/oauth/single-tenant-provider.js +0 -247
  269. package/dist/runtime/mcp-http/oauth/single-tenant-provider.js.map +0 -1
  270. package/dist/runtime/mcp-http/oauth/tenancy.d.ts +0 -3
  271. package/dist/runtime/mcp-http/oauth/tenancy.d.ts.map +0 -1
  272. package/dist/runtime/mcp-http/oauth/tenancy.js +0 -18
  273. package/dist/runtime/mcp-http/oauth/tenancy.js.map +0 -1
  274. package/dist/runtime/mcp-http/readonly-allowlist.d.ts +0 -24
  275. package/dist/runtime/mcp-http/readonly-allowlist.d.ts.map +0 -1
  276. package/dist/runtime/mcp-http/readonly-allowlist.js +0 -43
  277. package/dist/runtime/mcp-http/readonly-allowlist.js.map +0 -1
  278. package/dist/runtime/mcp-http/serve.d.ts +0 -39
  279. package/dist/runtime/mcp-http/serve.d.ts.map +0 -1
  280. package/dist/runtime/mcp-http/serve.js +0 -100
  281. package/dist/runtime/mcp-http/serve.js.map +0 -1
  282. package/dist/runtime/mirror/accept.d.ts +0 -57
  283. package/dist/runtime/mirror/accept.d.ts.map +0 -1
  284. package/dist/runtime/mirror/accept.js +0 -70
  285. package/dist/runtime/mirror/accept.js.map +0 -1
  286. package/dist/runtime/mirror/build.d.ts +0 -44
  287. package/dist/runtime/mirror/build.d.ts.map +0 -1
  288. package/dist/runtime/mirror/build.js +0 -37
  289. package/dist/runtime/mirror/build.js.map +0 -1
  290. package/dist/runtime/mirror/index.d.ts +0 -9
  291. package/dist/runtime/mirror/index.d.ts.map +0 -1
  292. package/dist/runtime/mirror/index.js +0 -9
  293. package/dist/runtime/mirror/index.js.map +0 -1
  294. package/dist/runtime/mirror/serve.d.ts +0 -21
  295. package/dist/runtime/mirror/serve.d.ts.map +0 -1
  296. package/dist/runtime/mirror/serve.js +0 -141
  297. package/dist/runtime/mirror/serve.js.map +0 -1
  298. package/dist/runtime/nhi.d.ts +0 -15
  299. package/dist/runtime/nhi.d.ts.map +0 -1
  300. package/dist/runtime/nhi.js +0 -26
  301. package/dist/runtime/nhi.js.map +0 -1
  302. package/dist/runtime/remote/accept.d.ts +0 -50
  303. package/dist/runtime/remote/accept.d.ts.map +0 -1
  304. package/dist/runtime/remote/accept.js +0 -54
  305. package/dist/runtime/remote/accept.js.map +0 -1
  306. package/dist/runtime/remote/client.d.ts +0 -27
  307. package/dist/runtime/remote/client.d.ts.map +0 -1
  308. package/dist/runtime/remote/client.js +0 -34
  309. package/dist/runtime/remote/client.js.map +0 -1
  310. package/dist/runtime/remote/index.d.ts +0 -5
  311. package/dist/runtime/remote/index.d.ts.map +0 -1
  312. package/dist/runtime/remote/index.js +0 -5
  313. package/dist/runtime/remote/index.js.map +0 -1
  314. package/dist/runtime/remote/serve.d.ts +0 -27
  315. package/dist/runtime/remote/serve.d.ts.map +0 -1
  316. package/dist/runtime/remote/serve.js +0 -26
  317. package/dist/runtime/remote/serve.js.map +0 -1
  318. package/dist/runtime/remote/server.d.ts +0 -36
  319. package/dist/runtime/remote/server.d.ts.map +0 -1
  320. package/dist/runtime/remote/server.js +0 -100
  321. package/dist/runtime/remote/server.js.map +0 -1
  322. package/dist/runtime/sysml/client.d.ts +0 -44
  323. package/dist/runtime/sysml/client.d.ts.map +0 -1
  324. package/dist/runtime/sysml/client.js +0 -52
  325. package/dist/runtime/sysml/client.js.map +0 -1
  326. package/dist/runtime/sysml/disclosure.d.ts +0 -23
  327. package/dist/runtime/sysml/disclosure.d.ts.map +0 -1
  328. package/dist/runtime/sysml/disclosure.js +0 -53
  329. package/dist/runtime/sysml/disclosure.js.map +0 -1
  330. package/dist/runtime/sysml/index.d.ts +0 -4
  331. package/dist/runtime/sysml/index.d.ts.map +0 -1
  332. package/dist/runtime/sysml/index.js +0 -4
  333. package/dist/runtime/sysml/index.js.map +0 -1
  334. package/dist/runtime/sysml/verify.d.ts +0 -32
  335. package/dist/runtime/sysml/verify.d.ts.map +0 -1
  336. package/dist/runtime/sysml/verify.js +0 -67
  337. package/dist/runtime/sysml/verify.js.map +0 -1
  338. package/dist/runtime/upgrade/index.d.ts +0 -96
  339. package/dist/runtime/upgrade/index.d.ts.map +0 -1
  340. package/dist/runtime/upgrade/index.js +0 -185
  341. package/dist/runtime/upgrade/index.js.map +0 -1
  342. package/dist/runtime/version/agent-version.d.ts +0 -15
  343. package/dist/runtime/version/agent-version.d.ts.map +0 -1
  344. package/dist/runtime/version/agent-version.js +0 -53
  345. package/dist/runtime/version/agent-version.js.map +0 -1
  346. package/skills/h2a/SKILL.md +0 -345
@@ -1,70 +0,0 @@
1
- /**
2
- * EVO-12 hosted OAuth — single-tenant authorization server (ported from
3
- * mcp-wave). Implements the MCP SDK OAuthServerProvider surface: DCR client
4
- * registration (redirect-uri allowlisted), operator-consent authorize,
5
- * auth-code + PKCE exchange, refresh, access-token verify/revoke. Scope is
6
- * read-only `h2a:read`. The OAuth tokens grant access to the read-only MCP tool
7
- * surface only — never to any signing tool / private key (DEC-116). The
8
- * client never receives an h2a private key.
9
- */
10
- import type { OAuthRegisteredClientsStore } from "@modelcontextprotocol/sdk/server/auth/clients.js";
11
- import type { AuthorizationParams } from "@modelcontextprotocol/sdk/server/auth/provider.js";
12
- import type { AuthInfo } from "@modelcontextprotocol/sdk/server/auth/types.js";
13
- import type { OAuthClientInformationFull, OAuthTokenRevocationRequest, OAuthTokens } from "@modelcontextprotocol/sdk/shared/auth.js";
14
- import type { FileOAuthStore } from "./file-store.js";
15
- export type AuthorizeOutcome = {
16
- kind: "consent";
17
- status: 200 | 401;
18
- html: string;
19
- } | {
20
- kind: "redirect";
21
- location: string;
22
- };
23
- interface ProviderOptions {
24
- store: FileOAuthStore;
25
- nodeEnv: string;
26
- issuerUrl: URL;
27
- publicBaseUrl: URL;
28
- resourceServerUrl: URL;
29
- consentSecret: string;
30
- allowedRedirectUris: readonly string[];
31
- authCodeTtlSeconds: number;
32
- accessTokenTtlSeconds: number;
33
- refreshTokenTtlSeconds: number;
34
- nowSeconds?: () => number;
35
- }
36
- interface IssueCodeParams {
37
- redirectUri: string;
38
- codeChallenge: string;
39
- scopes: string[];
40
- resource?: URL;
41
- state?: string;
42
- /** EVO-12 P2 (mode 3): the 39-auth subject this code is minted for (broker flow). */
43
- sub?: string;
44
- }
45
- type WideClientsStore = Omit<OAuthRegisteredClientsStore, "registerClient"> & {
46
- registerClient?(client: OAuthClientInformationFull): OAuthClientInformationFull | Promise<OAuthClientInformationFull>;
47
- };
48
- export declare class SingleTenantOAuthProvider {
49
- private readonly opts;
50
- readonly clientsStore: WideClientsStore;
51
- constructor(opts: ProviderOptions);
52
- private nowSeconds;
53
- authorizeRequest(client: OAuthClientInformationFull, params: AuthorizationParams, input: {
54
- method: string;
55
- consentSecret?: string;
56
- }): Promise<AuthorizeOutcome>;
57
- issueAuthorizationCode(client: OAuthClientInformationFull, params: IssueCodeParams): Promise<string>;
58
- private renderConsentForm;
59
- challengeForAuthorizationCode(_client: OAuthClientInformationFull, authorizationCode: string): Promise<string>;
60
- exchangeAuthorizationCode(client: OAuthClientInformationFull, authorizationCode: string, _codeVerifier?: string, redirectUri?: string, resource?: URL): Promise<OAuthTokens>;
61
- exchangeRefreshToken(client: OAuthClientInformationFull, refreshToken: string, scopes?: string[], resource?: URL): Promise<OAuthTokens>;
62
- verifyAccessToken(token: string): Promise<AuthInfo>;
63
- revokeToken(_client: OAuthClientInformationFull, request: OAuthTokenRevocationRequest): Promise<void>;
64
- issueTokensForTests(client: OAuthClientInformationFull): Promise<OAuthTokens>;
65
- private issueTokens;
66
- private normalizeScopes;
67
- private normalizeResource;
68
- }
69
- export {};
70
- //# sourceMappingURL=single-tenant-provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"single-tenant-provider.d.ts","sourceRoot":"","sources":["../../../../src/runtime/mcp-http/oauth/single-tenant-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAQpG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAC7F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,KAAK,EACV,0BAA0B,EAC1B,2BAA2B,EAC3B,WAAW,EACZ,MAAM,0CAA0C,CAAC;AAIlD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,GAAG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C,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,GAChD,OAAO,CAAC,gBAAgB,CAAC;IAoBtB,sBAAsB,CAAC,MAAM,EAAE,0BAA0B,EAAE,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;IAkB1G,OAAO,CAAC,iBAAiB;IAiEnB,6BAA6B,CACjC,OAAO,EAAE,0BAA0B,EACnC,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAAC,MAAM,CAAC;IAMZ,yBAAyB,CAC7B,MAAM,EAAE,0BAA0B,EAClC,iBAAiB,EAAE,MAAM,EACzB,aAAa,CAAC,EAAE,MAAM,EACtB,WAAW,CAAC,EAAE,MAAM,EACpB,QAAQ,CAAC,EAAE,GAAG,GACb,OAAO,CAAC,WAAW,CAAC;IAYjB,oBAAoB,CACxB,MAAM,EAAE,0BAA0B,EAClC,YAAY,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,MAAM,EAAE,EACjB,QAAQ,CAAC,EAAE,GAAG,GACb,OAAO,CAAC,WAAW,CAAC;IAkBjB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAsBnD,WAAW,CAAC,OAAO,EAAE,0BAA0B,EAAE,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrG,mBAAmB,CAAC,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC,WAAW,CAAC;YAIrE,WAAW;IAuCzB,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,iBAAiB;CAQ1B"}
@@ -1,247 +0,0 @@
1
- import { InvalidClientMetadataError, InvalidGrantError, InvalidScopeError, InvalidTargetError, InvalidTokenError } from "@modelcontextprotocol/sdk/server/auth/errors.js";
2
- import { H2A_HOSTED_OAUTH_SCOPE as OAUTH_SCOPE } from "./config.js";
3
- import { randomToken, sha256Hex, timingSafeEqualString, tokenHashPrefix } from "./crypto.js";
4
- import { allRedirectUrisAllowed } from "./redirect-uri.js";
5
- export class SingleTenantOAuthProvider {
6
- opts;
7
- clientsStore;
8
- constructor(opts) {
9
- this.opts = opts;
10
- this.clientsStore = {
11
- getClient: (clientId) => this.opts.store.getClient(clientId),
12
- registerClient: async (client) => {
13
- if (!allRedirectUrisAllowed(client.redirect_uris, this.opts.allowedRedirectUris, this.opts.nodeEnv)) {
14
- throw new InvalidClientMetadataError("redirect_uris contains a URI that is not allowed");
15
- }
16
- const normalized = {
17
- ...client,
18
- scope: OAUTH_SCOPE,
19
- grant_types: ["authorization_code", "refresh_token"],
20
- response_types: ["code"],
21
- token_endpoint_auth_method: client.token_endpoint_auth_method ?? "none"
22
- };
23
- return this.opts.store.registerClient(normalized);
24
- }
25
- };
26
- }
27
- nowSeconds() {
28
- return this.opts.nowSeconds?.() ?? Math.floor(Date.now() / 1000);
29
- }
30
- async authorizeRequest(client, params, input) {
31
- if (input.method !== "POST") {
32
- return { kind: "consent", status: 200, html: this.renderConsentForm(client, params, undefined) };
33
- }
34
- if (!input.consentSecret || !timingSafeEqualString(input.consentSecret, this.opts.consentSecret)) {
35
- return { kind: "consent", status: 401, html: this.renderConsentForm(client, params, "Invalid consent secret") };
36
- }
37
- const code = await this.issueAuthorizationCode(client, {
38
- redirectUri: params.redirectUri,
39
- codeChallenge: params.codeChallenge,
40
- scopes: this.normalizeScopes(params.scopes),
41
- ...(params.resource !== undefined && { resource: params.resource }),
42
- ...(params.state !== undefined && { state: params.state })
43
- });
44
- const redirect = new URL(params.redirectUri);
45
- redirect.searchParams.set("code", code);
46
- if (params.state)
47
- redirect.searchParams.set("state", params.state);
48
- return { kind: "redirect", location: redirect.href };
49
- }
50
- async issueAuthorizationCode(client, params) {
51
- const resource = this.normalizeResource(params.resource);
52
- const scopes = this.normalizeScopes(params.scopes);
53
- const code = randomToken();
54
- const now = this.nowSeconds();
55
- await this.opts.store.putAuthorizationCode(code, {
56
- clientId: client.client_id,
57
- redirectUri: params.redirectUri,
58
- codeChallenge: params.codeChallenge,
59
- scopes,
60
- resource: resource.href,
61
- createdAt: now,
62
- expiresAt: now + this.opts.authCodeTtlSeconds,
63
- ...(params.sub !== undefined && { sub: params.sub })
64
- });
65
- return code;
66
- }
67
- renderConsentForm(client, params, error) {
68
- const scope = this.normalizeScopes(params.scopes).join(" ");
69
- const resource = this.normalizeResource(params.resource).href;
70
- const clientName = escapeHtml(client.client_name ?? client.client_id);
71
- const errorHtml = error ? `<p class="alert" role="alert">${escapeHtml(error)}</p>` : "";
72
- return `<!doctype html>
73
- <html lang="en">
74
- <head>
75
- <meta charset="utf-8">
76
- <meta name="viewport" content="width=device-width, initial-scale=1">
77
- <title>Connect to h2a · SENT Tech</title>
78
- <style>
79
- body { margin:0; min-height:100vh; display:grid; place-items:center; background:#f8fafc;
80
- color:#0f172a; font-family:Inter,system-ui,sans-serif; line-height:1.5; padding:1.5rem; }
81
- .card { width:100%; max-width:30rem; background:#fff; border:1px solid #e2e8f0;
82
- border-radius:.5rem; box-shadow:0 1px 3px rgb(15 23 42 / .08); padding:1.75rem; }
83
- h1 { font-size:1.125rem; margin:0 0 .25rem; }
84
- .lead { font-size:.9375rem; color:#475569; margin:0 0 1.25rem; }
85
- dl { display:grid; grid-template-columns:auto 1fr; gap:.4rem .9rem; margin:0 0 1.25rem; font-size:.8125rem; }
86
- dt { color:#475569; } dd { margin:0; word-break:break-all; font-family:monospace; font-size:.75rem; }
87
- label { display:block; font-size:.875rem; font-weight:600; margin-bottom:.35rem; }
88
- .hint { font-weight:400; color:#475569; font-size:.8125rem; }
89
- input[type=password] { width:100%; padding:.6rem .7rem; font-size:.95rem; border:1px solid #e2e8f0;
90
- border-radius:.5rem; margin-bottom:1rem; font-family:monospace; }
91
- button { width:100%; padding:.65rem 1rem; font-size:.95rem; font-weight:600; color:#fff;
92
- background:oklch(50% 0.134 242.749); border:0; border-radius:.5rem; cursor:pointer; }
93
- .alert { background:#fef2f2; border:1px solid #fecaca; color:#991b1b; border-radius:.5rem;
94
- padding:.6rem .8rem; font-size:.8125rem; margin:0 0 1rem; }
95
- </style>
96
- </head>
97
- <body>
98
- <main class="card">
99
- <h1>Connect to h2a</h1>
100
- <p class="lead"><strong>${clientName}</strong> is requesting access to this h2a MCP connector.
101
- Approving grants it the <code>h2a:read</code> scope on this endpoint only &mdash; a
102
- <strong>read-only</strong> view (discover / nhi / posture). It never receives any h2a
103
- private key and cannot sign or mutate. Enter the operator consent secret to approve.</p>
104
- ${errorHtml}
105
- <dl>
106
- <dt>Client</dt><dd>${clientName}</dd>
107
- <dt>Redirect</dt><dd>${escapeHtml(params.redirectUri)}</dd>
108
- <dt>Scope</dt><dd>${escapeHtml(scope)}</dd>
109
- </dl>
110
- <form method="post" action="/authorize">
111
- <input type="hidden" name="response_type" value="code">
112
- <input type="hidden" name="client_id" value="${escapeHtml(client.client_id)}">
113
- <input type="hidden" name="redirect_uri" value="${escapeHtml(params.redirectUri)}">
114
- <input type="hidden" name="code_challenge" value="${escapeHtml(params.codeChallenge)}">
115
- <input type="hidden" name="code_challenge_method" value="S256">
116
- <input type="hidden" name="scope" value="${escapeHtml(scope)}">
117
- <input type="hidden" name="resource" value="${escapeHtml(resource)}">
118
- ${params.state ? `<input type="hidden" name="state" value="${escapeHtml(params.state)}">` : ""}
119
- <label for="cs">Consent secret <span class="hint">— operator only</span></label>
120
- <input id="cs" name="consent_secret" type="password" autocomplete="current-password" autofocus>
121
- <button type="submit">Authorize</button>
122
- </form>
123
- </main>
124
- </body>
125
- </html>`;
126
- }
127
- async challengeForAuthorizationCode(_client, authorizationCode) {
128
- const record = await this.opts.store.getAuthorizationCode(authorizationCode, this.nowSeconds());
129
- if (!record)
130
- throw new InvalidGrantError("authorization code is invalid or expired");
131
- return record.codeChallenge;
132
- }
133
- async exchangeAuthorizationCode(client, authorizationCode, _codeVerifier, redirectUri, resource) {
134
- const record = await this.opts.store.consumeAuthorizationCode(authorizationCode, this.nowSeconds());
135
- if (!record)
136
- throw new InvalidGrantError("authorization code is invalid, expired, or already used");
137
- if (record.clientId !== client.client_id)
138
- throw new InvalidGrantError("authorization code was issued to another client");
139
- if (redirectUri && redirectUri !== record.redirectUri)
140
- throw new InvalidGrantError("redirect_uri does not match authorization code");
141
- if (this.normalizeResource(resource).href !== record.resource)
142
- throw new InvalidTargetError("resource does not match authorization code");
143
- return this.issueTokens(client, record.scopes, new URL(record.resource), undefined, record.sub);
144
- }
145
- async exchangeRefreshToken(client, refreshToken, scopes, resource) {
146
- const record = await this.opts.store.findToken(refreshToken);
147
- const now = this.nowSeconds();
148
- if (!record || record.tokenType !== "refresh" || record.revokedAt || record.expiresAt <= now) {
149
- throw new InvalidGrantError("refresh token is invalid or expired");
150
- }
151
- if (record.clientId !== client.client_id)
152
- throw new InvalidGrantError("refresh token was issued to another client");
153
- if (this.normalizeResource(resource).href !== record.resource)
154
- throw new InvalidTargetError("resource does not match refresh token");
155
- const requestedScopes = this.normalizeScopes(scopes ?? record.scopes);
156
- if (!requestedScopes.every((scope) => record.scopes.includes(scope))) {
157
- throw new InvalidScopeError("requested scope exceeds refresh token scope");
158
- }
159
- await this.opts.store.revokeToken(refreshToken, now);
160
- return this.issueTokens(client, requestedScopes, new URL(record.resource), sha256Hex(refreshToken), record.sub);
161
- }
162
- async verifyAccessToken(token) {
163
- const record = await this.opts.store.findToken(token);
164
- const now = this.nowSeconds();
165
- if (!record || record.tokenType !== "access" || record.revokedAt || record.expiresAt <= now) {
166
- throw new InvalidTokenError("access token is invalid or expired");
167
- }
168
- return {
169
- token,
170
- clientId: record.clientId,
171
- scopes: record.scopes,
172
- expiresAt: record.expiresAt,
173
- resource: new URL(record.resource),
174
- extra: {
175
- tokenHashPrefix: tokenHashPrefix(record.tokenHash),
176
- // EVO-12 P2 (mode 3): the per-user root key. Present iff this token was
177
- // minted through the broker flow; the /mcp handler derives the tenant
178
- // root from it (rootForSub) and serves that root.
179
- ...(record.sub !== undefined && { sub: record.sub })
180
- }
181
- };
182
- }
183
- async revokeToken(_client, request) {
184
- await this.opts.store.revokeToken(request.token, this.nowSeconds());
185
- }
186
- async issueTokensForTests(client) {
187
- return this.issueTokens(client, [OAUTH_SCOPE], this.opts.resourceServerUrl, undefined);
188
- }
189
- async issueTokens(client, scopes, resource, parentRefreshTokenHash, sub) {
190
- const accessToken = randomToken();
191
- const refreshToken = randomToken();
192
- const now = this.nowSeconds();
193
- await this.opts.store.putToken(accessToken, {
194
- tokenType: "access",
195
- clientId: client.client_id,
196
- scopes,
197
- resource: resource.href,
198
- issuedAt: now,
199
- expiresAt: now + this.opts.accessTokenTtlSeconds,
200
- ...(parentRefreshTokenHash !== undefined && { parentRefreshTokenHash }),
201
- ...(sub !== undefined && { sub })
202
- });
203
- await this.opts.store.putToken(refreshToken, {
204
- tokenType: "refresh",
205
- clientId: client.client_id,
206
- scopes,
207
- resource: resource.href,
208
- issuedAt: now,
209
- expiresAt: now + this.opts.refreshTokenTtlSeconds,
210
- ...(parentRefreshTokenHash !== undefined && { parentRefreshTokenHash }),
211
- ...(sub !== undefined && { sub })
212
- });
213
- return {
214
- access_token: accessToken,
215
- refresh_token: refreshToken,
216
- token_type: "Bearer",
217
- expires_in: this.opts.accessTokenTtlSeconds,
218
- scope: scopes.join(" ")
219
- };
220
- }
221
- normalizeScopes(scopes) {
222
- const requested = scopes && scopes.length > 0 ? [...scopes] : [OAUTH_SCOPE];
223
- if (!requested.every((scope) => scope === OAUTH_SCOPE)) {
224
- throw new InvalidScopeError(`only ${OAUTH_SCOPE} scope is supported`);
225
- }
226
- return [OAUTH_SCOPE];
227
- }
228
- normalizeResource(resource) {
229
- const rs = this.opts.resourceServerUrl;
230
- if (resource === undefined)
231
- return rs;
232
- const path = resource.pathname.replace(/\/+$/, "");
233
- const rsPath = rs.pathname.replace(/\/+$/, "");
234
- if (resource.origin === rs.origin && (path === rsPath || path === ""))
235
- return rs;
236
- throw new InvalidTargetError("resource must match the MCP resource server URL");
237
- }
238
- }
239
- function escapeHtml(value) {
240
- return value
241
- .replaceAll("&", "&amp;")
242
- .replaceAll("<", "&lt;")
243
- .replaceAll(">", "&gt;")
244
- .replaceAll('"', "&quot;")
245
- .replaceAll("'", "&#39;");
246
- }
247
- //# sourceMappingURL=single-tenant-provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"single-tenant-provider.js","sourceRoot":"","sources":["../../../../src/runtime/mcp-http/oauth/single-tenant-provider.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,iDAAiD,CAAC;AASzD,OAAO,EAAE,sBAAsB,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAoC3D,MAAM,OAAO,yBAAyB;IAGP;IAFpB,YAAY,CAAmB;IAExC,YAA6B,IAAqB;QAArB,SAAI,GAAJ,IAAI,CAAiB;QAChD,IAAI,CAAC,YAAY,GAAG;YAClB,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC;YAC5D,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;gBAC/B,IAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;oBACpG,MAAM,IAAI,0BAA0B,CAAC,kDAAkD,CAAC,CAAC;gBAC3F,CAAC;gBACD,MAAM,UAAU,GAA+B;oBAC7C,GAAG,MAAM;oBACT,KAAK,EAAE,WAAW;oBAClB,WAAW,EAAE,CAAC,oBAAoB,EAAE,eAAe,CAAC;oBACpD,cAAc,EAAE,CAAC,MAAM,CAAC;oBACxB,0BAA0B,EAAE,MAAM,CAA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AC,EAAE,CAAC;YACvD,MAAM,IAAI,iBAAiB,CAAC,QAAQ,WAAW,qBAAqB,CAAC,CAAC;QACxE,CAAC;QACD,OAAO,CAAC,WAAW,CAAC,CAAC;IACvB,CAAC;IAEO,iBAAiB,CAAC,QAAyB;QACjD,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC;QACvC,IAAI,QAAQ,KAAK,SAAS;YAAE,OAAO,EAAE,CAAC;QACtC,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACnD,MAAM,MAAM,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAC/C,IAAI,QAAQ,CAAC,MAAM,KAAK,EAAE,CAAC,MAAM,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YAAE,OAAO,EAAE,CAAC;QACjF,MAAM,IAAI,kBAAkB,CAAC,iDAAiD,CAAC,CAAC;IAClF,CAAC;CACF;AAED,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,KAAK;SACT,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC;SACxB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;SACvB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;SACvB,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC;SACzB,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAC9B,CAAC"}
@@ -1,3 +0,0 @@
1
- /** Per-tenant h2a root for an authenticated `sub`. */
2
- export declare function rootForSub(baseRoot: string, sub: string): string;
3
- //# sourceMappingURL=tenancy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tenancy.d.ts","sourceRoot":"","sources":["../../../../src/runtime/mcp-http/oauth/tenancy.ts"],"names":[],"mappings":"AAYA,sDAAsD;AACtD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAKhE"}
@@ -1,18 +0,0 @@
1
- /**
2
- * EVO-12 P2 (mode 3, multi-tenant) — map an authenticated 39-auth `sub` to that
3
- * user's own h2a root, under `<baseRoot>/tenants/<safe(sub)>`. The gateway picks
4
- * the per-user root after the broker login (so the read-only surface + mirror
5
- * ingester scope to one user); the single-tenant mode keeps using `baseRoot`.
6
- *
7
- * Pure. `safePathSegment` neutralizes path-traversal / unsafe chars in `sub`.
8
- */
9
- import { join } from "node:path";
10
- import { safePathSegment } from "../../local-files/index.js";
11
- /** Per-tenant h2a root for an authenticated `sub`. */
12
- export function rootForSub(baseRoot, sub) {
13
- if (typeof sub !== "string" || sub.length === 0) {
14
- throw new Error("rootForSub: empty sub");
15
- }
16
- return join(baseRoot, "tenants", safePathSegment(sub));
17
- }
18
- //# sourceMappingURL=tenancy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tenancy.js","sourceRoot":"","sources":["../../../../src/runtime/mcp-http/oauth/tenancy.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,sDAAsD;AACtD,MAAM,UAAU,UAAU,CAAC,QAAgB,EAAE,GAAW;IACtD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,IAAI,CAAC,QAAQ,EAAE,SAAS,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;AACzD,CAAC"}
@@ -1,24 +0,0 @@
1
- /**
2
- * EVO-12 hosted MCP — read-only tool allowlist (the load-bearing security
3
- * invariant, DEC-116 / EVO-11 key custody).
4
- *
5
- * The internet-facing hosted MCP (enrolled from claude.ai) exposes ONLY read
6
- * tools. No tool that takes a private key is ever routable on the hosted
7
- * surface, so the ed25519 private key never travels over the wire. Signing
8
- * stays on the keyring-holding side (local CLI / sidecar). This is a STRUCTURAL
9
- * deployment property, not a phase: `hostedReadOnlyDescriptors` throws if the
10
- * allowlist ever contains a private-key tool (defense-in-depth schema scan).
11
- */
12
- import type { McpToolDescriptor, McpToolName } from "../mcp/tools.js";
13
- /** Phase-1 read-only surface: "claude.ai has the info" (discover / nhi / posture). */
14
- export declare const H2A_HOSTED_READONLY_TOOLS: readonly McpToolName[];
15
- /** True iff the tool's input schema carries a private key (must never be hosted). */
16
- export declare function toolTakesPrivateKey(descriptor: McpToolDescriptor): boolean;
17
- export declare function isHostedReadOnlyTool(name: string): boolean;
18
- /**
19
- * The read-only descriptor subset to expose on the hosted MCP. THROWS if any
20
- * allowlisted tool takes a private key — the allowlist must never include a
21
- * signing tool (structural invariant, not a runtime hope).
22
- */
23
- export declare function hostedReadOnlyDescriptors(all: readonly McpToolDescriptor[]): McpToolDescriptor[];
24
- //# sourceMappingURL=readonly-allowlist.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"readonly-allowlist.d.ts","sourceRoot":"","sources":["../../../src/runtime/mcp-http/readonly-allowlist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEtE,sFAAsF;AACtF,eAAO,MAAM,yBAAyB,EAAE,SAAS,WAAW,EAO3D,CAAC;AAEF,qFAAqF;AACrF,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAE1E;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,SAAS,iBAAiB,EAAE,GAChC,iBAAiB,EAAE,CAWrB"}
@@ -1,43 +0,0 @@
1
- /**
2
- * EVO-12 hosted MCP — read-only tool allowlist (the load-bearing security
3
- * invariant, DEC-116 / EVO-11 key custody).
4
- *
5
- * The internet-facing hosted MCP (enrolled from claude.ai) exposes ONLY read
6
- * tools. No tool that takes a private key is ever routable on the hosted
7
- * surface, so the ed25519 private key never travels over the wire. Signing
8
- * stays on the keyring-holding side (local CLI / sidecar). This is a STRUCTURAL
9
- * deployment property, not a phase: `hostedReadOnlyDescriptors` throws if the
10
- * allowlist ever contains a private-key tool (defense-in-depth schema scan).
11
- */
12
- /** Phase-1 read-only surface: "claude.ai has the info" (discover / nhi / posture). */
13
- export const H2A_HOSTED_READONLY_TOOLS = [
14
- "h2a_discover_instances",
15
- "h2a_discover_sessions",
16
- "h2a_nhi_inventory",
17
- "h2a_nhi_report",
18
- "h2a_conflict_posture",
19
- "h2a_blockage_list"
20
- ];
21
- /** True iff the tool's input schema carries a private key (must never be hosted). */
22
- export function toolTakesPrivateKey(descriptor) {
23
- return JSON.stringify(descriptor.inputSchema ?? {}).includes("privateKeyPem");
24
- }
25
- export function isHostedReadOnlyTool(name) {
26
- return H2A_HOSTED_READONLY_TOOLS.includes(name);
27
- }
28
- /**
29
- * The read-only descriptor subset to expose on the hosted MCP. THROWS if any
30
- * allowlisted tool takes a private key — the allowlist must never include a
31
- * signing tool (structural invariant, not a runtime hope).
32
- */
33
- export function hostedReadOnlyDescriptors(all) {
34
- const exposed = all.filter((d) => isHostedReadOnlyTool(d.name));
35
- const leaky = exposed.filter(toolTakesPrivateKey);
36
- if (leaky.length > 0) {
37
- throw new Error(`EVO-12 hosted allowlist must not include private-key tools: ${leaky
38
- .map((d) => d.name)
39
- .join(", ")}`);
40
- }
41
- return exposed;
42
- }
43
- //# sourceMappingURL=readonly-allowlist.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"readonly-allowlist.js","sourceRoot":"","sources":["../../../src/runtime/mcp-http/readonly-allowlist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,sFAAsF;AACtF,MAAM,CAAC,MAAM,yBAAyB,GAA2B;IAC/D,wBAAwB;IACxB,uBAAuB;IACvB,mBAAmB;IACnB,gBAAgB;IAChB,sBAAsB;IACtB,mBAAmB;CACpB,CAAC;AAEF,qFAAqF;AACrF,MAAM,UAAU,mBAAmB,CAAC,UAA6B;IAC/D,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AAChF,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,OAAQ,yBAA+C,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACzE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CACvC,GAAiC;IAEjC,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAChE,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAClD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CACb,+DAA+D,KAAK;aACjE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;aAClB,IAAI,CAAC,IAAI,CAAC,EAAE,CAChB,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,39 +0,0 @@
1
- import type { McpServer } from "../mcp/server.js";
2
- import { type H2AHostedOAuthConfig } from "./oauth/config.js";
3
- export interface HostedEnv {
4
- PUBLIC_BASE_URL?: string;
5
- OAUTH_ISSUER_URL?: string;
6
- OAUTH_ALLOWED_REDIRECT_URIS?: string;
7
- OAUTH_CONSENT_SECRET?: string;
8
- OAUTH_ACCESS_TOKEN_TTL_SECONDS?: string;
9
- OAUTH_REFRESH_TOKEN_TTL_SECONDS?: string;
10
- OAUTH_AUTH_CODE_TTL_SECONDS?: string;
11
- H2A_HOSTED_ENROLLMENT_ENABLED?: string;
12
- OAUTH_STORE_PATH?: string;
13
- H2A_ROOT?: string;
14
- PORT?: string;
15
- NODE_ENV?: string;
16
- H2A_BROKER_MODE?: string;
17
- H2A_UPSTREAM_ISSUER?: string;
18
- H2A_UPSTREAM_AUTHORIZE_URL?: string;
19
- H2A_UPSTREAM_TOKEN_URL?: string;
20
- H2A_UPSTREAM_CLIENT_ID?: string;
21
- H2A_UPSTREAM_CLIENT_SECRET?: string;
22
- H2A_UPSTREAM_REDIRECT_URI?: string;
23
- H2A_UPSTREAM_SCOPES?: string;
24
- }
25
- export interface HostedConfig {
26
- oauthConfig: H2AHostedOAuthConfig;
27
- storePath: string;
28
- root: string;
29
- port: number;
30
- }
31
- /** Pure: validate + derive the hosted config from env (defaults claude.ai redirects). */
32
- export declare function buildHostedConfigFromEnv(env: HostedEnv): HostedConfig;
33
- export interface StartedHostedServer {
34
- port: number;
35
- h2aMcpServer: McpServer;
36
- stop(): void;
37
- }
38
- export declare function startHostedServer(env?: HostedEnv): Promise<StartedHostedServer>;
39
- //# sourceMappingURL=serve.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../../src/runtime/mcp-http/serve.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,KAAK,oBAAoB,EAAsB,MAAM,mBAAmB,CAAC;AAMlF,MAAM,WAAW,SAAS;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,6BAA6B,CAAC,EAAE,MAAM,CAAC;IACvC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAKD,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,oBAAoB,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,yFAAyF;AACzF,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,SAAS,GAAG,YAAY,CAuCrE;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,SAAS,CAAC;IACxB,IAAI,IAAI,IAAI,CAAC;CACd;AAED,wBAAsB,iBAAiB,CAAC,GAAG,GAAE,SAAuB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA0ClG"}
@@ -1,100 +0,0 @@
1
- /**
2
- * EVO-12 hosted MCP — env-driven entrypoint. Reads the deploy env, builds the
3
- * OAuth provider + the read-only h2a MCP surface, and serves the Hono app over
4
- * HTTP (@hono/node-server). `buildHostedConfigFromEnv` is the testable core.
5
- */
6
- import { join } from "node:path";
7
- import { serve } from "@hono/node-server";
8
- import { createMcpServer } from "../mcp/index.js";
9
- import { createHostedApp } from "./app.js";
10
- import { createBrokerLogin } from "./oauth/broker-login.js";
11
- import { oauthConfigFromEnv } from "./oauth/config.js";
12
- import { pkceS256, randomToken } from "./oauth/crypto.js";
13
- import { FileOAuthStore } from "./oauth/file-store.js";
14
- import { exchangeUpstreamCode } from "./oauth/oidc-rp.js";
15
- import { SingleTenantOAuthProvider } from "./oauth/single-tenant-provider.js";
16
- const DEFAULT_CLAUDE_REDIRECTS = "https://claude.ai/api/mcp/auth_callback,https://claude.com/api/mcp/auth_callback";
17
- /** Pure: validate + derive the hosted config from env (defaults claude.ai redirects). */
18
- export function buildHostedConfigFromEnv(env) {
19
- const publicBaseUrl = env.PUBLIC_BASE_URL;
20
- if (!publicBaseUrl)
21
- throw new Error("PUBLIC_BASE_URL is required");
22
- const root = env.H2A_ROOT ?? join(process.cwd(), ".h2a");
23
- const oauthConfig = oauthConfigFromEnv({
24
- PUBLIC_BASE_URL: publicBaseUrl,
25
- OAUTH_ISSUER_URL: env.OAUTH_ISSUER_URL ?? publicBaseUrl,
26
- OAUTH_ALLOWED_REDIRECT_URIS: env.OAUTH_ALLOWED_REDIRECT_URIS ?? DEFAULT_CLAUDE_REDIRECTS,
27
- ...(env.OAUTH_CONSENT_SECRET !== undefined && { OAUTH_CONSENT_SECRET: env.OAUTH_CONSENT_SECRET }),
28
- ...(env.H2A_HOSTED_ENROLLMENT_ENABLED !== undefined && {
29
- H2A_HOSTED_ENROLLMENT_ENABLED: env.H2A_HOSTED_ENROLLMENT_ENABLED
30
- }),
31
- OAUTH_ACCESS_TOKEN_TTL_SECONDS: Number(env.OAUTH_ACCESS_TOKEN_TTL_SECONDS ?? 3600),
32
- OAUTH_REFRESH_TOKEN_TTL_SECONDS: Number(env.OAUTH_REFRESH_TOKEN_TTL_SECONDS ?? 1_209_600),
33
- OAUTH_AUTH_CODE_TTL_SECONDS: Number(env.OAUTH_AUTH_CODE_TTL_SECONDS ?? 60),
34
- NODE_ENV: env.NODE_ENV ?? "production",
35
- // EVO-12 P2 (mode 3): broker passthrough — oauthConfigFromEnv parses these
36
- // and throws if brokerMode is on but an upstream field is missing.
37
- ...(env.H2A_BROKER_MODE !== undefined && { H2A_BROKER_MODE: env.H2A_BROKER_MODE }),
38
- ...(env.H2A_UPSTREAM_ISSUER !== undefined && { H2A_UPSTREAM_ISSUER: env.H2A_UPSTREAM_ISSUER }),
39
- ...(env.H2A_UPSTREAM_AUTHORIZE_URL !== undefined && {
40
- H2A_UPSTREAM_AUTHORIZE_URL: env.H2A_UPSTREAM_AUTHORIZE_URL
41
- }),
42
- ...(env.H2A_UPSTREAM_TOKEN_URL !== undefined && { H2A_UPSTREAM_TOKEN_URL: env.H2A_UPSTREAM_TOKEN_URL }),
43
- ...(env.H2A_UPSTREAM_CLIENT_ID !== undefined && { H2A_UPSTREAM_CLIENT_ID: env.H2A_UPSTREAM_CLIENT_ID }),
44
- ...(env.H2A_UPSTREAM_CLIENT_SECRET !== undefined && {
45
- H2A_UPSTREAM_CLIENT_SECRET: env.H2A_UPSTREAM_CLIENT_SECRET
46
- }),
47
- ...(env.H2A_UPSTREAM_REDIRECT_URI !== undefined && {
48
- H2A_UPSTREAM_REDIRECT_URI: env.H2A_UPSTREAM_REDIRECT_URI
49
- }),
50
- ...(env.H2A_UPSTREAM_SCOPES !== undefined && { H2A_UPSTREAM_SCOPES: env.H2A_UPSTREAM_SCOPES })
51
- });
52
- return {
53
- oauthConfig,
54
- storePath: env.OAUTH_STORE_PATH ?? join(root, "oauth-clients.json"),
55
- root,
56
- port: Number(env.PORT ?? 8787)
57
- };
58
- }
59
- export async function startHostedServer(env = process.env) {
60
- const cfg = buildHostedConfigFromEnv(env);
61
- const store = new FileOAuthStore(cfg.storePath);
62
- await store.load();
63
- const oauthProvider = new SingleTenantOAuthProvider({ store, ...cfg.oauthConfig });
64
- const h2aMcpServer = createMcpServer({ root: cfg.root });
65
- // EVO-12 P2 (mode 3, multi-tenant gateway): when broker mode is configured,
66
- // delegate user login to 39-auth and serve each user their own root.
67
- let brokerLogin;
68
- let tenancy;
69
- if (cfg.oauthConfig.brokerMode && cfg.oauthConfig.upstream) {
70
- const upstream = cfg.oauthConfig.upstream;
71
- const upstreamFetch = async (url, init) => {
72
- const res = await fetch(url, init);
73
- return { ok: res.ok, status: res.status, json: () => res.json() };
74
- };
75
- brokerLogin = createBrokerLogin({
76
- config: upstream,
77
- exchange: (code, codeVerifier) => exchangeUpstreamCode(upstream, { code, codeVerifier }, upstreamFetch),
78
- baseRoot: cfg.root,
79
- randomState: () => randomToken(),
80
- pkce: pkceS256
81
- });
82
- tenancy = { baseRoot: cfg.root, createServer: (root) => createMcpServer({ root }) };
83
- }
84
- const app = createHostedApp({
85
- oauthProvider,
86
- oauthConfig: cfg.oauthConfig,
87
- h2aMcpServer,
88
- ...(brokerLogin && { brokerLogin }),
89
- ...(tenancy && { tenancy })
90
- });
91
- const server = serve({ fetch: app.fetch, port: cfg.port });
92
- return {
93
- port: cfg.port,
94
- h2aMcpServer,
95
- stop: () => {
96
- server.close?.();
97
- }
98
- };
99
- }
100
- //# sourceMappingURL=serve.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serve.js","sourceRoot":"","sources":["../../../src/runtime/mcp-http/serve.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,eAAe,EAAsB,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAoB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAA6B,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAs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