@sentropic/h2a-cli 0.75.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 (350) hide show
  1. package/dist/index.d.ts +1 -37
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +2 -41
  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 -794
  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 -4672
  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 -260
  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/loop/index.d.ts +0 -73
  191. package/dist/runtime/loop/index.d.ts.map +0 -1
  192. package/dist/runtime/loop/index.js +0 -107
  193. package/dist/runtime/loop/index.js.map +0 -1
  194. package/dist/runtime/mcp/handlers.d.ts +0 -196
  195. package/dist/runtime/mcp/handlers.d.ts.map +0 -1
  196. package/dist/runtime/mcp/handlers.js +0 -1025
  197. package/dist/runtime/mcp/handlers.js.map +0 -1
  198. package/dist/runtime/mcp/index.d.ts +0 -7
  199. package/dist/runtime/mcp/index.d.ts.map +0 -1
  200. package/dist/runtime/mcp/index.js +0 -7
  201. package/dist/runtime/mcp/index.js.map +0 -1
  202. package/dist/runtime/mcp/notifications.d.ts +0 -47
  203. package/dist/runtime/mcp/notifications.d.ts.map +0 -1
  204. package/dist/runtime/mcp/notifications.js +0 -204
  205. package/dist/runtime/mcp/notifications.js.map +0 -1
  206. package/dist/runtime/mcp/server.d.ts +0 -45
  207. package/dist/runtime/mcp/server.d.ts.map +0 -1
  208. package/dist/runtime/mcp/server.js +0 -94
  209. package/dist/runtime/mcp/server.js.map +0 -1
  210. package/dist/runtime/mcp/sessions.d.ts +0 -68
  211. package/dist/runtime/mcp/sessions.d.ts.map +0 -1
  212. package/dist/runtime/mcp/sessions.js +0 -152
  213. package/dist/runtime/mcp/sessions.js.map +0 -1
  214. package/dist/runtime/mcp/stdio.d.ts +0 -72
  215. package/dist/runtime/mcp/stdio.d.ts.map +0 -1
  216. package/dist/runtime/mcp/stdio.js +0 -274
  217. package/dist/runtime/mcp/stdio.js.map +0 -1
  218. package/dist/runtime/mcp/tools.d.ts +0 -19
  219. package/dist/runtime/mcp/tools.d.ts.map +0 -1
  220. package/dist/runtime/mcp/tools.js +0 -525
  221. package/dist/runtime/mcp/tools.js.map +0 -1
  222. package/dist/runtime/mcp-http/app.d.ts +0 -33
  223. package/dist/runtime/mcp-http/app.d.ts.map +0 -1
  224. package/dist/runtime/mcp-http/app.js +0 -162
  225. package/dist/runtime/mcp-http/app.js.map +0 -1
  226. package/dist/runtime/mcp-http/hosted-mcp-server.d.ts +0 -14
  227. package/dist/runtime/mcp-http/hosted-mcp-server.d.ts.map +0 -1
  228. package/dist/runtime/mcp-http/hosted-mcp-server.js +0 -38
  229. package/dist/runtime/mcp-http/hosted-mcp-server.js.map +0 -1
  230. package/dist/runtime/mcp-http/index.d.ts +0 -18
  231. package/dist/runtime/mcp-http/index.d.ts.map +0 -1
  232. package/dist/runtime/mcp-http/index.js +0 -18
  233. package/dist/runtime/mcp-http/index.js.map +0 -1
  234. package/dist/runtime/mcp-http/main.d.ts +0 -2
  235. package/dist/runtime/mcp-http/main.d.ts.map +0 -1
  236. package/dist/runtime/mcp-http/main.js +0 -14
  237. package/dist/runtime/mcp-http/main.js.map +0 -1
  238. package/dist/runtime/mcp-http/oauth/broker-login.d.ts +0 -50
  239. package/dist/runtime/mcp-http/oauth/broker-login.d.ts.map +0 -1
  240. package/dist/runtime/mcp-http/oauth/broker-login.js +0 -41
  241. package/dist/runtime/mcp-http/oauth/broker-login.js.map +0 -1
  242. package/dist/runtime/mcp-http/oauth/broker-routes.d.ts +0 -45
  243. package/dist/runtime/mcp-http/oauth/broker-routes.d.ts.map +0 -1
  244. package/dist/runtime/mcp-http/oauth/broker-routes.js +0 -54
  245. package/dist/runtime/mcp-http/oauth/broker-routes.js.map +0 -1
  246. package/dist/runtime/mcp-http/oauth/config.d.ts +0 -49
  247. package/dist/runtime/mcp-http/oauth/config.d.ts.map +0 -1
  248. package/dist/runtime/mcp-http/oauth/config.js +0 -69
  249. package/dist/runtime/mcp-http/oauth/config.js.map +0 -1
  250. package/dist/runtime/mcp-http/oauth/crypto.d.ts +0 -14
  251. package/dist/runtime/mcp-http/oauth/crypto.d.ts.map +0 -1
  252. package/dist/runtime/mcp-http/oauth/crypto.js +0 -29
  253. package/dist/runtime/mcp-http/oauth/crypto.js.map +0 -1
  254. package/dist/runtime/mcp-http/oauth/file-store.d.ts +0 -48
  255. package/dist/runtime/mcp-http/oauth/file-store.d.ts.map +0 -1
  256. package/dist/runtime/mcp-http/oauth/file-store.js +0 -101
  257. package/dist/runtime/mcp-http/oauth/file-store.js.map +0 -1
  258. package/dist/runtime/mcp-http/oauth/hono-oauth-router.d.ts +0 -5
  259. package/dist/runtime/mcp-http/oauth/hono-oauth-router.d.ts.map +0 -1
  260. package/dist/runtime/mcp-http/oauth/hono-oauth-router.js +0 -92
  261. package/dist/runtime/mcp-http/oauth/hono-oauth-router.js.map +0 -1
  262. package/dist/runtime/mcp-http/oauth/oidc-rp.d.ts +0 -56
  263. package/dist/runtime/mcp-http/oauth/oidc-rp.d.ts.map +0 -1
  264. package/dist/runtime/mcp-http/oauth/oidc-rp.js +0 -63
  265. package/dist/runtime/mcp-http/oauth/oidc-rp.js.map +0 -1
  266. package/dist/runtime/mcp-http/oauth/redirect-uri.d.ts +0 -11
  267. package/dist/runtime/mcp-http/oauth/redirect-uri.d.ts.map +0 -1
  268. package/dist/runtime/mcp-http/oauth/redirect-uri.js +0 -29
  269. package/dist/runtime/mcp-http/oauth/redirect-uri.js.map +0 -1
  270. package/dist/runtime/mcp-http/oauth/single-tenant-provider.d.ts +0 -70
  271. package/dist/runtime/mcp-http/oauth/single-tenant-provider.d.ts.map +0 -1
  272. package/dist/runtime/mcp-http/oauth/single-tenant-provider.js +0 -247
  273. package/dist/runtime/mcp-http/oauth/single-tenant-provider.js.map +0 -1
  274. package/dist/runtime/mcp-http/oauth/tenancy.d.ts +0 -3
  275. package/dist/runtime/mcp-http/oauth/tenancy.d.ts.map +0 -1
  276. package/dist/runtime/mcp-http/oauth/tenancy.js +0 -18
  277. package/dist/runtime/mcp-http/oauth/tenancy.js.map +0 -1
  278. package/dist/runtime/mcp-http/readonly-allowlist.d.ts +0 -24
  279. package/dist/runtime/mcp-http/readonly-allowlist.d.ts.map +0 -1
  280. package/dist/runtime/mcp-http/readonly-allowlist.js +0 -43
  281. package/dist/runtime/mcp-http/readonly-allowlist.js.map +0 -1
  282. package/dist/runtime/mcp-http/serve.d.ts +0 -39
  283. package/dist/runtime/mcp-http/serve.d.ts.map +0 -1
  284. package/dist/runtime/mcp-http/serve.js +0 -100
  285. package/dist/runtime/mcp-http/serve.js.map +0 -1
  286. package/dist/runtime/mirror/accept.d.ts +0 -57
  287. package/dist/runtime/mirror/accept.d.ts.map +0 -1
  288. package/dist/runtime/mirror/accept.js +0 -70
  289. package/dist/runtime/mirror/accept.js.map +0 -1
  290. package/dist/runtime/mirror/build.d.ts +0 -44
  291. package/dist/runtime/mirror/build.d.ts.map +0 -1
  292. package/dist/runtime/mirror/build.js +0 -37
  293. package/dist/runtime/mirror/build.js.map +0 -1
  294. package/dist/runtime/mirror/index.d.ts +0 -9
  295. package/dist/runtime/mirror/index.d.ts.map +0 -1
  296. package/dist/runtime/mirror/index.js +0 -9
  297. package/dist/runtime/mirror/index.js.map +0 -1
  298. package/dist/runtime/mirror/serve.d.ts +0 -21
  299. package/dist/runtime/mirror/serve.d.ts.map +0 -1
  300. package/dist/runtime/mirror/serve.js +0 -141
  301. package/dist/runtime/mirror/serve.js.map +0 -1
  302. package/dist/runtime/nhi.d.ts +0 -15
  303. package/dist/runtime/nhi.d.ts.map +0 -1
  304. package/dist/runtime/nhi.js +0 -26
  305. package/dist/runtime/nhi.js.map +0 -1
  306. package/dist/runtime/remote/accept.d.ts +0 -50
  307. package/dist/runtime/remote/accept.d.ts.map +0 -1
  308. package/dist/runtime/remote/accept.js +0 -54
  309. package/dist/runtime/remote/accept.js.map +0 -1
  310. package/dist/runtime/remote/client.d.ts +0 -27
  311. package/dist/runtime/remote/client.d.ts.map +0 -1
  312. package/dist/runtime/remote/client.js +0 -34
  313. package/dist/runtime/remote/client.js.map +0 -1
  314. package/dist/runtime/remote/index.d.ts +0 -5
  315. package/dist/runtime/remote/index.d.ts.map +0 -1
  316. package/dist/runtime/remote/index.js +0 -5
  317. package/dist/runtime/remote/index.js.map +0 -1
  318. package/dist/runtime/remote/serve.d.ts +0 -27
  319. package/dist/runtime/remote/serve.d.ts.map +0 -1
  320. package/dist/runtime/remote/serve.js +0 -26
  321. package/dist/runtime/remote/serve.js.map +0 -1
  322. package/dist/runtime/remote/server.d.ts +0 -36
  323. package/dist/runtime/remote/server.d.ts.map +0 -1
  324. package/dist/runtime/remote/server.js +0 -100
  325. package/dist/runtime/remote/server.js.map +0 -1
  326. package/dist/runtime/sysml/client.d.ts +0 -44
  327. package/dist/runtime/sysml/client.d.ts.map +0 -1
  328. package/dist/runtime/sysml/client.js +0 -52
  329. package/dist/runtime/sysml/client.js.map +0 -1
  330. package/dist/runtime/sysml/disclosure.d.ts +0 -23
  331. package/dist/runtime/sysml/disclosure.d.ts.map +0 -1
  332. package/dist/runtime/sysml/disclosure.js +0 -53
  333. package/dist/runtime/sysml/disclosure.js.map +0 -1
  334. package/dist/runtime/sysml/index.d.ts +0 -4
  335. package/dist/runtime/sysml/index.d.ts.map +0 -1
  336. package/dist/runtime/sysml/index.js +0 -4
  337. package/dist/runtime/sysml/index.js.map +0 -1
  338. package/dist/runtime/sysml/verify.d.ts +0 -32
  339. package/dist/runtime/sysml/verify.d.ts.map +0 -1
  340. package/dist/runtime/sysml/verify.js +0 -67
  341. package/dist/runtime/sysml/verify.js.map +0 -1
  342. package/dist/runtime/upgrade/index.d.ts +0 -96
  343. package/dist/runtime/upgrade/index.d.ts.map +0 -1
  344. package/dist/runtime/upgrade/index.js +0 -185
  345. package/dist/runtime/upgrade/index.js.map +0 -1
  346. package/dist/runtime/version/agent-version.d.ts +0 -15
  347. package/dist/runtime/version/agent-version.d.ts.map +0 -1
  348. package/dist/runtime/version/agent-version.js +0 -53
  349. package/dist/runtime/version/agent-version.js.map +0 -1
  350. package/skills/h2a/SKILL.md +0 -345
@@ -1,27 +0,0 @@
1
- /**
2
- * HTTP client for signed envelopes (DEC-076), the send side of slice 3b.
3
- *
4
- * Signs an envelope (DEC-073) and POSTs it to a remote h2a endpoint. The
5
- * transport only moves bytes — provenance and freshness are carried in the
6
- * envelope itself and verified by the receiver (DEC-075).
7
- */
8
- import { type H2AEnvelope } from "@sentropic/h2a";
9
- export interface SendRemoteOptions {
10
- /** Signer instance id recorded in the signature's `by`. */
11
- by: string;
12
- /** Signer's ed25519 private-key PEM. */
13
- privateKeyPem: string;
14
- /** Optional fetch override (tests / custom agents). Defaults to global fetch. */
15
- fetchImpl?: typeof fetch;
16
- }
17
- export interface SendRemoteResult {
18
- status: number;
19
- body: unknown;
20
- }
21
- /**
22
- * Sign `envelope` and POST it as JSON to `url`. Returns the HTTP status and the
23
- * parsed JSON body (or undefined if the response was not JSON). Network errors
24
- * propagate to the caller.
25
- */
26
- export declare function sendRemoteEnvelope(url: string, envelope: H2AEnvelope, options: SendRemoteOptions): Promise<SendRemoteResult>;
27
- //# sourceMappingURL=client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/runtime/remote/client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEhE,MAAM,WAAW,iBAAiB;IAChC,2DAA2D;IAC3D,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,iFAAiF;IACjF,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,gBAAgB,CAAC,CAkB3B"}
@@ -1,34 +0,0 @@
1
- /**
2
- * HTTP client for signed envelopes (DEC-076), the send side of slice 3b.
3
- *
4
- * Signs an envelope (DEC-073) and POSTs it to a remote h2a endpoint. The
5
- * transport only moves bytes — provenance and freshness are carried in the
6
- * envelope itself and verified by the receiver (DEC-075).
7
- */
8
- import { signEnvelope } from "@sentropic/h2a";
9
- /**
10
- * Sign `envelope` and POST it as JSON to `url`. Returns the HTTP status and the
11
- * parsed JSON body (or undefined if the response was not JSON). Network errors
12
- * propagate to the caller.
13
- */
14
- export async function sendRemoteEnvelope(url, envelope, options) {
15
- const signed = signEnvelope(envelope, {
16
- by: options.by,
17
- privateKeyPem: options.privateKeyPem
18
- });
19
- const doFetch = options.fetchImpl ?? fetch;
20
- const res = await doFetch(url, {
21
- method: "POST",
22
- headers: { "content-type": "application/json" },
23
- body: JSON.stringify(signed)
24
- });
25
- let body;
26
- try {
27
- body = await res.json();
28
- }
29
- catch {
30
- body = undefined;
31
- }
32
- return { status: res.status, body };
33
- }
34
- //# sourceMappingURL=client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/runtime/remote/client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,YAAY,EAAoB,MAAM,gBAAgB,CAAC;AAgBhE;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,GAAW,EACX,QAAqB,EACrB,OAA0B;IAE1B,MAAM,MAAM,GAAG,YAAY,CAAC,QAAQ,EAAE;QACpC,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,aAAa,EAAE,OAAO,CAAC,aAAa;KACrC,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,IAAI,KAAK,CAAC;IAC3C,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,GAAG,EAAE;QAC7B,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;KAC7B,CAAC,CAAC;IACH,IAAI,IAAa,CAAC;IAClB,IAAI,CAAC;QACH,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,IAAI,GAAG,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC;AACtC,CAAC"}
@@ -1,5 +0,0 @@
1
- export { acceptRemoteEnvelope, type AcceptRemoteOptions, type H2AAcceptRejection, type H2AAcceptResult } from "./accept.js";
2
- export { createRemoteServer, rejectionStatus, type RemoteServerOptions } from "./server.js";
3
- export { sendRemoteEnvelope, type SendRemoteOptions, type SendRemoteResult } from "./client.js";
4
- export { remoteServerForStore, type RemoteServerForStoreOptions } from "./serve.js";
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/remote/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,KAAK,mBAAmB,EACzB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,oBAAoB,EACpB,KAAK,2BAA2B,EACjC,MAAM,YAAY,CAAC"}
@@ -1,5 +0,0 @@
1
- export { acceptRemoteEnvelope } from "./accept.js";
2
- export { createRemoteServer, rejectionStatus } from "./server.js";
3
- export { sendRemoteEnvelope } from "./client.js";
4
- export { remoteServerForStore } from "./serve.js";
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runtime/remote/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAIrB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,eAAe,EAEhB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAGnB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,oBAAoB,EAErB,MAAM,YAAY,CAAC"}
@@ -1,27 +0,0 @@
1
- /**
2
- * Store wiring for the remote HTTP server (DEC-077), slice 3b-ii.
3
- *
4
- * Binds the generic `createRemoteServer` (DEC-076) to a local-files store:
5
- * public keys are resolved from the registry, and accepted envelopes are
6
- * delivered to the recipient's inbox. Kept separate from `server.ts` so the
7
- * HTTP layer stays store-agnostic and unit-testable.
8
- */
9
- import type { Server } from "node:http";
10
- import { type H2AReplayGuard } from "@sentropic/h2a";
11
- import type { LocalStore } from "../local-files/store.js";
12
- export interface RemoteServerForStoreOptions {
13
- /** POST endpoint path. Default `/h2a/envelopes`. */
14
- path?: string;
15
- /** Shared replay guard. Defaults to a fresh in-memory guard. */
16
- guard?: H2AReplayGuard;
17
- /** Body-size cap (bytes). */
18
- maxBodyBytes?: number;
19
- }
20
- /**
21
- * Build (unstarted) an HTTP server that authenticates against `store`'s
22
- * registry and delivers accepted envelopes to local inboxes. Resolving a
23
- * signer with no registered public key yields `no-public-key` (401), so an
24
- * unknown or key-less sender is refused.
25
- */
26
- export declare function remoteServerForStore(store: LocalStore, options?: RemoteServerForStoreOptions): Server;
27
- //# sourceMappingURL=serve.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../../src/runtime/remote/serve.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAG1D,MAAM,WAAW,2BAA2B;IAC1C,oDAAoD;IACpD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,6BAA6B;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,UAAU,EACjB,OAAO,GAAE,2BAAgC,GACxC,MAAM,CAQR"}
@@ -1,26 +0,0 @@
1
- /**
2
- * Store wiring for the remote HTTP server (DEC-077), slice 3b-ii.
3
- *
4
- * Binds the generic `createRemoteServer` (DEC-076) to a local-files store:
5
- * public keys are resolved from the registry, and accepted envelopes are
6
- * delivered to the recipient's inbox. Kept separate from `server.ts` so the
7
- * HTTP layer stays store-agnostic and unit-testable.
8
- */
9
- import { createReplayGuard } from "@sentropic/h2a";
10
- import { createRemoteServer } from "./server.js";
11
- /**
12
- * Build (unstarted) an HTTP server that authenticates against `store`'s
13
- * registry and delivers accepted envelopes to local inboxes. Resolving a
14
- * signer with no registered public key yields `no-public-key` (401), so an
15
- * unknown or key-less sender is refused.
16
- */
17
- export function remoteServerForStore(store, options = {}) {
18
- return createRemoteServer({
19
- resolvePublicKeys: (signer) => store.listInstanceKeys(signer),
20
- deliver: (recipient, envelope) => store.putInboxMessage(recipient, envelope),
21
- guard: options.guard ?? createReplayGuard(),
22
- path: options.path,
23
- maxBodyBytes: options.maxBodyBytes
24
- });
25
- }
26
- //# sourceMappingURL=serve.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serve.js","sourceRoot":"","sources":["../../../src/runtime/remote/serve.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,iBAAiB,EAAuB,MAAM,gBAAgB,CAAC;AAGxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAWjD;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAClC,KAAiB,EACjB,UAAuC,EAAE;IAEzC,OAAO,kBAAkB,CAAC;QACxB,iBAAiB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC;QAC7D,OAAO,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,SAAS,EAAE,QAAQ,CAAC;QAC5E,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,iBAAiB,EAAE;QAC3C,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,YAAY,EAAE,OAAO,CAAC,YAAY;KACnC,CAAC,CAAC;AACL,CAAC"}
@@ -1,36 +0,0 @@
1
- /**
2
- * HTTP transport for signed envelopes (DEC-076), slice 3b of the signed-bearer
3
- * transport-auth workstream (DEC-073/074/075).
4
- *
5
- * The server is a thin, channel-untrusting front-end over the DEC-075
6
- * `acceptRemoteEnvelope` pipeline: it reads a POSTed JSON envelope and hands it
7
- * to the pipeline, which does all verification. The HTTP layer adds only
8
- * framing (a single POST endpoint, a body-size cap) and a result→status map.
9
- */
10
- import { type Server } from "node:http";
11
- import { type H2AEnvelope, type H2AReplayGuard } from "@sentropic/h2a";
12
- import { type H2AAcceptRejection } from "./accept.js";
13
- export interface RemoteServerOptions {
14
- /** Resolve a signer instance to its active ed25519 public-key PEMs (DEC-078). */
15
- resolvePublicKeys: (signerInstance: string) => string[];
16
- /** Deliver an accepted envelope to a local recipient's inbox. */
17
- deliver: (recipient: string, envelope: H2AEnvelope) => void;
18
- /** Shared replay guard. Defaults to a fresh in-memory guard (DEC-074). */
19
- guard?: H2AReplayGuard;
20
- /** POST endpoint path. Default `/h2a/envelopes`. */
21
- path?: string;
22
- /** Reject bodies larger than this many bytes. Default 256 KiB. */
23
- maxBodyBytes?: number;
24
- /** Clock source handed to the replay guard. Defaults to `Date.now`. */
25
- now?: () => number;
26
- }
27
- /** Map an accept-pipeline rejection to an HTTP status code. */
28
- export declare function rejectionStatus(reason: H2AAcceptRejection): number;
29
- /**
30
- * Build (but do not start) an HTTP server that feeds POSTed envelopes to the
31
- * DEC-075 trust boundary. Accepted → 202; rejected → see {@link rejectionStatus};
32
- * wrong method/path → 404/405. The caller starts it with `.listen(port, host)`
33
- * and is responsible for closing it.
34
- */
35
- export declare function createRemoteServer(options: RemoteServerOptions): Server;
36
- //# sourceMappingURL=server.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/runtime/remote/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AAEtD,OAAO,EAAqB,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE1F,OAAO,EAAwB,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE5E,MAAM,WAAW,mBAAmB;IAClC,iFAAiF;IACjF,iBAAiB,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;IACxD,iEAAiE;IACjE,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5D,0EAA0E;IAC1E,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,oDAAoD;IACpD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAED,+DAA+D;AAC/D,wBAAgB,eAAe,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAkBlE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CA2DvE"}
@@ -1,100 +0,0 @@
1
- /**
2
- * HTTP transport for signed envelopes (DEC-076), slice 3b of the signed-bearer
3
- * transport-auth workstream (DEC-073/074/075).
4
- *
5
- * The server is a thin, channel-untrusting front-end over the DEC-075
6
- * `acceptRemoteEnvelope` pipeline: it reads a POSTed JSON envelope and hands it
7
- * to the pipeline, which does all verification. The HTTP layer adds only
8
- * framing (a single POST endpoint, a body-size cap) and a result→status map.
9
- */
10
- import { createServer } from "node:http";
11
- import { createReplayGuard } from "@sentropic/h2a";
12
- import { acceptRemoteEnvelope } from "./accept.js";
13
- /** Map an accept-pipeline rejection to an HTTP status code. */
14
- export function rejectionStatus(reason) {
15
- switch (reason) {
16
- case "malformed":
17
- case "no-target":
18
- case "no-signature":
19
- case "invalid-timestamp":
20
- return 400; // bad request (structural / unparseable)
21
- case "no-public-key":
22
- case "bad-signature":
23
- return 401; // unauthorized (cannot authenticate the emitter)
24
- case "replayed":
25
- return 409; // conflict (already seen)
26
- case "expired":
27
- case "future":
28
- return 422; // unprocessable (outside the freshness window)
29
- default:
30
- return 400;
31
- }
32
- }
33
- /**
34
- * Build (but do not start) an HTTP server that feeds POSTed envelopes to the
35
- * DEC-075 trust boundary. Accepted → 202; rejected → see {@link rejectionStatus};
36
- * wrong method/path → 404/405. The caller starts it with `.listen(port, host)`
37
- * and is responsible for closing it.
38
- */
39
- export function createRemoteServer(options) {
40
- const guard = options.guard ?? createReplayGuard();
41
- const path = options.path ?? "/h2a/envelopes";
42
- const maxBodyBytes = options.maxBodyBytes ?? 256 * 1024;
43
- return createServer((req, res) => {
44
- const respond = (status, body) => {
45
- const payload = JSON.stringify(body);
46
- res.writeHead(status, { "content-type": "application/json" });
47
- res.end(payload);
48
- };
49
- const url = req.url ?? "";
50
- if (url.split("?")[0] !== path) {
51
- respond(404, { ok: false, error: "not-found" });
52
- return;
53
- }
54
- if (req.method !== "POST") {
55
- res.setHeader("allow", "POST");
56
- respond(405, { ok: false, error: "method-not-allowed" });
57
- return;
58
- }
59
- const chunks = [];
60
- let total = 0;
61
- let aborted = false;
62
- req.on("data", (chunk) => {
63
- if (aborted)
64
- return;
65
- total += chunk.length;
66
- if (total > maxBodyBytes) {
67
- aborted = true;
68
- respond(413, { ok: false, error: "payload-too-large" });
69
- req.destroy();
70
- return;
71
- }
72
- chunks.push(chunk);
73
- });
74
- req.on("end", () => {
75
- if (aborted)
76
- return;
77
- let payload;
78
- try {
79
- payload = JSON.parse(Buffer.concat(chunks).toString("utf8"));
80
- }
81
- catch {
82
- respond(400, { ok: false, reason: "malformed" });
83
- return;
84
- }
85
- const result = acceptRemoteEnvelope(payload, {
86
- resolvePublicKeys: options.resolvePublicKeys,
87
- guard,
88
- deliver: options.deliver,
89
- now: options.now?.()
90
- });
91
- if (result.ok) {
92
- respond(202, result);
93
- }
94
- else {
95
- respond(rejectionStatus(result.reason), result);
96
- }
97
- });
98
- });
99
- }
100
- //# sourceMappingURL=server.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/runtime/remote/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAe,MAAM,WAAW,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAyC,MAAM,gBAAgB,CAAC;AAE1F,OAAO,EAAE,oBAAoB,EAA2B,MAAM,aAAa,CAAC;AAiB5E,+DAA+D;AAC/D,MAAM,UAAU,eAAe,CAAC,MAA0B;IACxD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,WAAW,CAAC;QACjB,KAAK,WAAW,CAAC;QACjB,KAAK,cAAc,CAAC;QACpB,KAAK,mBAAmB;YACtB,OAAO,GAAG,CAAC,CAAC,yCAAyC;QACvD,KAAK,eAAe,CAAC;QACrB,KAAK,eAAe;YAClB,OAAO,GAAG,CAAC,CAAC,iDAAiD;QAC/D,KAAK,UAAU;YACb,OAAO,G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,CAAC;gBACd,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;YACvB,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;YAClD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,44 +0,0 @@
1
- /**
2
- * DEC-098 — SysML v2 interop S2 (spec: docs/sysml-interop.md §7, DEC-081). The
3
- * I/O adapter: fetch a referenced element from the SysML v2 API & Services and
4
- * canonical-hash it for content-integrity (trust level (b), §4). Pure ref types
5
- * stay in core (S1); all I/O lives here. The verify path + CLI are S3.
6
- *
7
- * Endpoint follows the OMG SysML v2 API & Services REST/HTTP PSM:
8
- * GET {apiBase}/projects/{project}/commits/{commit}/elements/{element}
9
- *
10
- * The HTTP client is injectable (`fetchImpl`) so the adapter is unit-testable
11
- * against a mock API with no network. API credentials are held out-of-band and
12
- * passed per call (`auth`); h2a never embeds them in envelopes (§6).
13
- */
14
- import { type H2ASysmlRef } from "@sentropic/h2a";
15
- /** Minimal subset of the Fetch `Response` the adapter needs (global `fetch` satisfies it). */
16
- export interface SysmlFetchResponse {
17
- readonly ok: boolean;
18
- readonly status: number;
19
- json(): Promise<unknown>;
20
- }
21
- export type SysmlFetchImpl = (url: string, init?: {
22
- headers?: Record<string, string>;
23
- }) => Promise<SysmlFetchResponse>;
24
- export interface ResolveSysmlOptions {
25
- /** Repository base URL; falls back to `ref.apiBase`. */
26
- readonly apiBase?: string;
27
- /** Bearer token for the SysML API (held out-of-band, never in an envelope). */
28
- readonly auth?: string;
29
- /** Injected HTTP client; defaults to global `fetch`. */
30
- readonly fetchImpl?: SysmlFetchImpl;
31
- }
32
- /**
33
- * Fetch the referenced element at its immutable commit. Requires `ref.element`
34
- * (whole-project resolution — `element` omitted — is a later slice; default
35
- * documented in docs/loop-decisions.md). Throws on a non-OK HTTP status.
36
- */
37
- export declare function resolveSysmlElement(ref: H2ASysmlRef, options?: ResolveSysmlOptions): Promise<unknown>;
38
- /**
39
- * Canonical hash of a fetched element, for content-integrity (trust level (b)).
40
- * Reuses the core canonical hashing (DEC-035) so the value is comparable to a
41
- * `ref.elementHash` embedded at sign time.
42
- */
43
- export declare function hashSysmlElement(element: unknown): string;
44
- //# sourceMappingURL=client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/runtime/sysml/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE/D,8FAA8F;AAC9F,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1B;AAED,MAAM,MAAM,cAAc,GAAG,CAC3B,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,KACxC,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC,MAAM,WAAW,mBAAmB;IAClC,wDAAwD;IACxD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,+EAA+E;IAC/E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,QAAQ,CAAC,SAAS,CAAC,EAAE,cAAc,CAAC;CACrC;AAUD;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,WAAW,EAChB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,OAAO,CAAC,CAoBlB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEzD"}
@@ -1,52 +0,0 @@
1
- /**
2
- * DEC-098 — SysML v2 interop S2 (spec: docs/sysml-interop.md §7, DEC-081). The
3
- * I/O adapter: fetch a referenced element from the SysML v2 API & Services and
4
- * canonical-hash it for content-integrity (trust level (b), §4). Pure ref types
5
- * stay in core (S1); all I/O lives here. The verify path + CLI are S3.
6
- *
7
- * Endpoint follows the OMG SysML v2 API & Services REST/HTTP PSM:
8
- * GET {apiBase}/projects/{project}/commits/{commit}/elements/{element}
9
- *
10
- * The HTTP client is injectable (`fetchImpl`) so the adapter is unit-testable
11
- * against a mock API with no network. API credentials are held out-of-band and
12
- * passed per call (`auth`); h2a never embeds them in envelopes (§6).
13
- */
14
- import { computeHash } from "@sentropic/h2a";
15
- function resolveBase(ref, options) {
16
- const base = options.apiBase ?? ref.apiBase;
17
- if (!base) {
18
- throw new Error("resolveSysmlElement: apiBase is required (pass it or set ref.apiBase)");
19
- }
20
- return base.replace(/\/+$/, "");
21
- }
22
- /**
23
- * Fetch the referenced element at its immutable commit. Requires `ref.element`
24
- * (whole-project resolution — `element` omitted — is a later slice; default
25
- * documented in docs/loop-decisions.md). Throws on a non-OK HTTP status.
26
- */
27
- export async function resolveSysmlElement(ref, options = {}) {
28
- if (!ref.element) {
29
- throw new Error("resolveSysmlElement: ref.element is required (whole-project resolution is not supported yet)");
30
- }
31
- const base = resolveBase(ref, options);
32
- const url = `${base}/projects/${encodeURIComponent(ref.project)}/commits/${encodeURIComponent(ref.commit)}/elements/${encodeURIComponent(ref.element)}`;
33
- const fetchImpl = options.fetchImpl ?? globalThis.fetch;
34
- if (!fetchImpl) {
35
- throw new Error("resolveSysmlElement: no fetch implementation available (pass fetchImpl)");
36
- }
37
- const headers = options.auth ? { Authorization: `Bearer ${options.auth}` } : undefined;
38
- const res = await fetchImpl(url, headers ? { headers } : undefined);
39
- if (!res.ok) {
40
- throw new Error(`resolveSysmlElement: ${url} returned HTTP ${res.status}`);
41
- }
42
- return res.json();
43
- }
44
- /**
45
- * Canonical hash of a fetched element, for content-integrity (trust level (b)).
46
- * Reuses the core canonical hashing (DEC-035) so the value is comparable to a
47
- * `ref.elementHash` embedded at sign time.
48
- */
49
- export function hashSysmlElement(element) {
50
- return computeHash(element);
51
- }
52
- //# sourceMappingURL=client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/runtime/sysml/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,WAAW,EAAoB,MAAM,gBAAgB,CAAC;AAuB/D,SAAS,WAAW,CAAC,GAAgB,EAAE,OAA4B;IACjE,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC;IAC5C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;IAC3F,CAAC;IACD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAClC,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,GAAgB,EAChB,UAA+B,EAAE;IAEjC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CACb,8FAA8F,CAC/F,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACvC,MAAM,GAAG,GAAG,GAAG,IAAI,aAAa,kBAAkB,CAAC,GAAG,CAAC,OAAO,CAAC,YAAY,kBAAkB,CAC3F,GAAG,CAAC,MAAM,CACX,aAAa,kBAAkB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;IAChD,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAK,UAAU,CAAC,KAA+C,CAAC;IACnG,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,yEAAyE,CAAC,CAAC;IAC7F,CAAC;IACD,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IACvF,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACpE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,wBAAwB,GAAG,kBAAkB,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7E,CAAC;IACD,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;AACpB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAgB;IAC/C,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC"}
@@ -1,23 +0,0 @@
1
- /**
2
- * DEC-100 — SysML v2 interop S4 (spec §5, DEC-081). Map an h2a disclosure mode
3
- * (DEC-045) onto a SysML v2 **query scope**: what a CONTROL / recipient may read
4
- * through the API, expressed abstractly (the concrete API params / SysML `view`
5
- * id are repo-specific — this is the policy→scope decision, not the wire call).
6
- *
7
- * Pure + total over the six disclosure modes.
8
- */
9
- import type { H2ADisclosureMode } from "@sentropic/h2a";
10
- /** How much of the referenced element the recipient may read. */
11
- export type H2ASysmlQueryDetail = "none" | "attestation" | "metadata" | "redacted" | "full";
12
- export interface H2ASysmlQueryScope {
13
- readonly mode: H2ADisclosureMode;
14
- /** Whether the adapter should fetch element content at all. */
15
- readonly fetch: boolean;
16
- readonly detail: H2ASysmlQueryDetail;
17
- /** Suggested SysML view id (viewpoint/view mechanism) when a filtered query applies. */
18
- readonly view?: string;
19
- readonly note: string;
20
- }
21
- /** Total: every disclosure mode maps to a query scope. */
22
- export declare function sysmlQueryScope(mode: H2ADisclosureMode): H2ASysmlQueryScope;
23
- //# sourceMappingURL=disclosure.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"disclosure.d.ts","sourceRoot":"","sources":["../../../src/runtime/sysml/disclosure.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,iEAAiE;AACjE,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,aAAa,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;AAE5F,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,wFAAwF;IACxF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AA2CD,0DAA0D;AAC1D,wBAAgB,eAAe,CAAC,IAAI,EAAE,iBAAiB,GAAG,kBAAkB,CAE3E"}
@@ -1,53 +0,0 @@
1
- /**
2
- * DEC-100 — SysML v2 interop S4 (spec §5, DEC-081). Map an h2a disclosure mode
3
- * (DEC-045) onto a SysML v2 **query scope**: what a CONTROL / recipient may read
4
- * through the API, expressed abstractly (the concrete API params / SysML `view`
5
- * id are repo-specific — this is the policy→scope decision, not the wire call).
6
- *
7
- * Pure + total over the six disclosure modes.
8
- */
9
- const SCOPES = {
10
- denied: {
11
- mode: "denied",
12
- fetch: false,
13
- detail: "none",
14
- note: "no access — the recipient may not query the model"
15
- },
16
- "hash-only": {
17
- mode: "hash-only",
18
- fetch: false,
19
- detail: "none",
20
- note: "compare the embedded elementHash only; no content query"
21
- },
22
- attestation: {
23
- mode: "attestation",
24
- fetch: false,
25
- detail: "attestation",
26
- note: "the signed envelope (with elementHash) is the attestation; no content query"
27
- },
28
- "evidence-package": {
29
- mode: "evidence-package",
30
- fetch: true,
31
- detail: "metadata",
32
- note: "fetch element metadata + hash for an evidence package (not full content)"
33
- },
34
- "redacted-view": {
35
- mode: "redacted-view",
36
- fetch: true,
37
- detail: "redacted",
38
- view: "redacted",
39
- note: "query a SysML redacted view (sensitive members excluded)"
40
- },
41
- "full-view": {
42
- mode: "full-view",
43
- fetch: true,
44
- detail: "full",
45
- view: "full",
46
- note: "query the full element"
47
- }
48
- };
49
- /** Total: every disclosure mode maps to a query scope. */
50
- export function sysmlQueryScope(mode) {
51
- return SCOPES[mode];
52
- }
53
- //# sourceMappingURL=disclosure.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"disclosure.js","sourceRoot":"","sources":["../../../src/runtime/sysml/disclosure.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAiBH,MAAM,MAAM,GAAkD;IAC5D,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,mDAAmD;KAC1D;IACD,WAAW,EAAE;QACX,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,yDAAyD;KAChE;IACD,WAAW,EAAE;QACX,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,aAAa;QACrB,IAAI,EAAE,6EAA6E;KACpF;IACD,kBAAkB,EAAE;QAClB,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,UAAU;QAClB,IAAI,EAAE,0EAA0E;KACjF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,eAAe;QACrB,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,UAAU;QAClB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,0DAA0D;KACjE;IACD,WAAW,EAAE;QACX,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,wBAAwB;KAC/B;CACF,CAAC;AAEF,0DAA0D;AAC1D,MAAM,UAAU,eAAe,CAAC,IAAuB;IACrD,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC"}
@@ -1,4 +0,0 @@
1
- export { resolveSysmlElement, hashSysmlElement, type SysmlFetchImpl, type SysmlFetchResponse, type ResolveSysmlOptions } from "./client.js";
2
- export { verifyEnvelopeSysmlRef, extractSysmlRef, type VerifyEnvelopeSysmlOptions, type VerifyEnvelopeSysmlResult } from "./verify.js";
3
- export { sysmlQueryScope, type H2ASysmlQueryScope, type H2ASysmlQueryDetail } from "./disclosure.js";
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/sysml/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC/B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,iBAAiB,CAAC"}
@@ -1,4 +0,0 @@
1
- export { resolveSysmlElement, hashSysmlElement } from "./client.js";
2
- export { verifyEnvelopeSysmlRef, extractSysmlRef } from "./verify.js";
3
- export { sysmlQueryScope } from "./disclosure.js";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runtime/sysml/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAIjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,sBAAsB,EACtB,eAAe,EAGhB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EAGhB,MAAM,iBAAiB,CAAC"}
@@ -1,32 +0,0 @@
1
- /**
2
- * DEC-099 — SysML v2 interop S3 (spec §4, DEC-081). Verify that an envelope's
3
- * embedded `H2ASysmlRef` is (a) signed by the claimed actor — **commit-trust**,
4
- * the default: a valid signature over an immutable commit is enough — and
5
- * optionally (b) **content-integrity**: re-fetch the element (S2) and check its
6
- * canonical hash against the `elementHash` embedded at sign time, catching a
7
- * repository that violated immutability or a wrong `apiBase`.
8
- */
9
- import { type H2AEnvelope, type H2ASysmlRef } from "@sentropic/h2a";
10
- import { type SysmlFetchImpl } from "./client.js";
11
- /** Extract the ref from the conventional location `body.subject.sysmlRef` (spec §2). */
12
- export declare function extractSysmlRef(envelope: H2AEnvelope): H2ASysmlRef | undefined;
13
- export interface VerifyEnvelopeSysmlOptions {
14
- /** Public key to verify the envelope signature against (commit-trust). */
15
- readonly publicKeyPem: string;
16
- /** Only accept a signature from this signer id. */
17
- readonly by?: string;
18
- /** Also re-fetch + re-hash the element and compare to `ref.elementHash`. */
19
- readonly contentIntegrity?: boolean;
20
- readonly apiBase?: string;
21
- readonly auth?: string;
22
- readonly fetchImpl?: SysmlFetchImpl;
23
- }
24
- export interface VerifyEnvelopeSysmlResult {
25
- readonly ok: boolean;
26
- readonly ref?: H2ASysmlRef;
27
- readonly signatureVerified: boolean;
28
- readonly contentVerified?: boolean;
29
- readonly reason?: string;
30
- }
31
- export declare function verifyEnvelopeSysmlRef(envelope: H2AEnvelope, options: VerifyEnvelopeSysmlOptions): Promise<VerifyEnvelopeSysmlResult>;
32
- //# sourceMappingURL=verify.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../src/runtime/sysml/verify.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAyC,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAEzF,wFAAwF;AACxF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,WAAW,GAAG,WAAW,GAAG,SAAS,CAO9E;AAED,MAAM,WAAW,0BAA0B;IACzC,0EAA0E;IAC1E,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,mDAAmD;IACnD,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,cAAc,CAAC;CACrC;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,yBAAyB,CAAC,CA8CpC"}
@@ -1,67 +0,0 @@
1
- /**
2
- * DEC-099 — SysML v2 interop S3 (spec §4, DEC-081). Verify that an envelope's
3
- * embedded `H2ASysmlRef` is (a) signed by the claimed actor — **commit-trust**,
4
- * the default: a valid signature over an immutable commit is enough — and
5
- * optionally (b) **content-integrity**: re-fetch the element (S2) and check its
6
- * canonical hash against the `elementHash` embedded at sign time, catching a
7
- * repository that violated immutability or a wrong `apiBase`.
8
- */
9
- import { isH2ASysmlRef, validateSysmlRef, verifyEnvelopeSignature } from "@sentropic/h2a";
10
- import { hashSysmlElement, resolveSysmlElement } from "./client.js";
11
- /** Extract the ref from the conventional location `body.subject.sysmlRef` (spec §2). */
12
- export function extractSysmlRef(envelope) {
13
- const body = envelope.body;
14
- if (!body || typeof body !== "object")
15
- return undefined;
16
- const subject = body.subject;
17
- if (!subject || typeof subject !== "object")
18
- return undefined;
19
- const ref = subject.sysmlRef;
20
- return isH2ASysmlRef(ref) ? ref : undefined;
21
- }
22
- export async function verifyEnvelopeSysmlRef(envelope, options) {
23
- const ref = extractSysmlRef(envelope);
24
- if (!ref)
25
- return { ok: false, signatureVerified: false, reason: "no-sysml-ref" };
26
- const validation = validateSysmlRef(ref);
27
- if (!validation.ok) {
28
- return { ok: false, ref, signatureVerified: false, reason: `invalid-ref:${validation.errors.join(",")}` };
29
- }
30
- const signatureVerified = verifyEnvelopeSignature(envelope, options.publicKeyPem, options.by ? { by: options.by } : {});
31
- if (!signatureVerified) {
32
- return { ok: false, ref, signatureVerified: false, reason: "signature-failed" };
33
- }
34
- // (a) commit-trust: a valid signature over the immutable commit is enough.
35
- if (!options.contentIntegrity) {
36
- return { ok: true, ref, signatureVerified: true };
37
- }
38
- // (b) content-integrity: re-fetch + re-hash + compare.
39
- if (!ref.elementHash) {
40
- return { ok: false, ref, signatureVerified: true, contentVerified: false, reason: "no-element-hash" };
41
- }
42
- try {
43
- const element = await resolveSysmlElement(ref, {
44
- ...(options.apiBase ? { apiBase: options.apiBase } : {}),
45
- ...(options.auth ? { auth: options.auth } : {}),
46
- ...(options.fetchImpl ? { fetchImpl: options.fetchImpl } : {})
47
- });
48
- const contentVerified = hashSysmlElement(element) === ref.elementHash;
49
- return {
50
- ok: contentVerified,
51
- ref,
52
- signatureVerified: true,
53
- contentVerified,
54
- ...(contentVerified ? {} : { reason: "content-hash-mismatch" })
55
- };
56
- }
57
- catch (err) {
58
- return {
59
- ok: false,
60
- ref,
61
- signatureVerified: true,
62
- contentVerified: false,
63
- reason: `fetch-failed:${err.message}`
64
- };
65
- }
66
- }
67
-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