@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,96 +0,0 @@
1
- /**
2
- * DEC-107 — EVO-8: CLI auto-upgrade. Three levels:
3
- * (1) `h2a upgrade [--check]` — explicit, user-invoked;
4
- * (2) `mcp-serve` boot version-check notice — non-blocking, cached, opt-out;
5
- * (3) `mcp-serve --auto-upgrade` — self-install `@latest` at boot (the new
6
- * version applies on the NEXT launch — a running Node process cannot
7
- * replace its own binary in flight).
8
- *
9
- * Pure version logic + an injectable `UpgradeRuntime` (network/exec/clock/cache)
10
- * so everything is testable without npm or the network.
11
- */
12
- export declare const H2A_CLI_PACKAGE = "@sentropic/h2a-cli";
13
- /** Re-check at most once per this window for the passive `--upgrade-check` notice. */
14
- export declare const H2A_UPGRADE_CHECK_TTL_MS: number;
15
- /**
16
- * Shorter throttle for `--auto-upgrade`: it is opt-in to *stay current*, so a
17
- * 24h notice cache must not make it lag a same-day release (the bug that left
18
- * agents on 0.39.0 after a restart). 1h still dedups a mass restart through the
19
- * shared per-root cache (only the first booting host hits the network).
20
- */
21
- export declare const H2A_AUTO_UPGRADE_CHECK_TTL_MS: number;
22
- /** Parse a strict X.Y.Z triple, or undefined if it is not one. */
23
- export declare function parseSemver(v: string): {
24
- major: number;
25
- minor: number;
26
- patch: number;
27
- } | undefined;
28
- /** True iff `latest` is a strictly higher X.Y.Z than `current`. */
29
- export declare function isNewerVersion(latest: string, current: string): boolean;
30
- /** The version of the running `@sentropic/h2a-cli` (from its package.json). */
31
- export declare function currentCliVersion(): string;
32
- export interface UpgradeCacheEntry {
33
- readonly checkedAt: number;
34
- readonly latest?: string;
35
- }
36
- /** I/O the upgrade flow needs — injected so tests supply fakes. */
37
- export interface UpgradeRuntime {
38
- /** Latest published version of `pkg`, or undefined on any failure. */
39
- fetchLatest(pkg: string): string | undefined;
40
- /** `npm i -g pkg@latest`; true on success. */
41
- runInstall(pkg: string): boolean;
42
- now(): number;
43
- readCache(path: string): UpgradeCacheEntry | undefined;
44
- writeCache(path: string, entry: UpgradeCacheEntry): void;
45
- }
46
- export declare const defaultUpgradeRuntime: UpgradeRuntime;
47
- export interface UpgradeCheckResult {
48
- readonly current: string;
49
- readonly latest?: string;
50
- readonly upgradeAvailable: boolean;
51
- /** True if the latest came from a fresh cache hit (no network this call). */
52
- readonly fromCache: boolean;
53
- }
54
- export interface CheckUpgradeOptions {
55
- readonly runtime?: UpgradeRuntime;
56
- /** Cache file path; when set, a fresh entry within TTL skips the network. */
57
- readonly cachePath?: string;
58
- readonly ttlMs?: number;
59
- /** Skip the cache entirely (always hit the network). */
60
- readonly force?: boolean;
61
- }
62
- /**
63
- * Determine whether a newer CLI is published. Cached + throttled when a
64
- * `cachePath` is given (level-2 boot notice); always-fresh otherwise. Never
65
- * throws — a network failure yields `{ latest: undefined, upgradeAvailable:false }`.
66
- */
67
- export declare function checkUpgrade(current: string, options?: CheckUpgradeOptions): UpgradeCheckResult;
68
- /** Run the global install of `@latest`. Returns true on success. */
69
- export declare function performUpgrade(runtime?: UpgradeRuntime): boolean;
70
- /** Default cache path for the boot check, under the store root. */
71
- export declare function upgradeCachePath(root: string): string;
72
- /**
73
- * Env flag set across an in-place re-exec so the freshly-exec'd process does
74
- * NOT auto-upgrade + re-exec again this boot (breaks any pathological loop if
75
- * an install reports success without changing the on-disk version).
76
- */
77
- export declare const H2A_REEXEC_GUARD_ENV = "H2A_UPGRADE_REEXECED";
78
- export interface ReexecOptions {
79
- /** Injectable for tests; defaults to `process.execve` when present. */
80
- readonly execve?: (file: string, args: readonly string[], env: Record<string, string | undefined>) => never;
81
- readonly execPath?: string;
82
- readonly argv?: readonly string[];
83
- readonly env?: Record<string, string | undefined>;
84
- }
85
- /** True when an in-place re-exec is possible (POSIX `process.execve`, Node ≥ 23.10). */
86
- export declare function canReexec(): boolean;
87
- /**
88
- * Re-exec the current process into the (just-upgraded) binary at the SAME path,
89
- * preserving PID + stdio fds — so a host-spawned `mcp-serve` picks up the new
90
- * version immediately without the host seeing a disconnect. On success the
91
- * process image is replaced and this never returns; returns `false` if re-exec
92
- * is unavailable or failed (caller falls back to "applies next launch"). The
93
- * `H2A_REEXEC_GUARD_ENV` flag is set so the new image does not re-upgrade.
94
- */
95
- export declare function reexecSelf(options?: ReexecOptions): boolean;
96
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/upgrade/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH,eAAO,MAAM,eAAe,uBAAuB,CAAC;AACpD,sFAAsF;AACtF,eAAO,MAAM,wBAAwB,QAAsB,CAAC;AAC5D;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,QAAiB,CAAC;AAI5D,kEAAkE;AAClE,wBAAgB,WAAW,CACzB,CAAC,EAAE,MAAM,GACR;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAI7D;AAED,mEAAmE;AACnE,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAOvE;AAED,+EAA+E;AAC/E,wBAAgB,iBAAiB,IAAI,MAAM,CAS1C;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,mEAAmE;AACnE,MAAM,WAAW,cAAc;IAC7B,sEAAsE;IACtE,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC7C,8CAA8C;IAC9C,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,GAAG,IAAI,MAAM,CAAC;IACd,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5G,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CACnD;AAED,wFAAwF;AACxF,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAmB/D"}
@@ -1,185 +0,0 @@
1
- /**
2
- * DEC-107 — EVO-8: CLI auto-upgrade. Three levels:
3
- * (1) `h2a upgrade [--check]` — explicit, user-invoked;
4
- * (2) `mcp-serve` boot version-check notice — non-blocking, cached, opt-out;
5
- * (3) `mcp-serve --auto-upgrade` — self-install `@latest` at boot (the new
6
- * version applies on the NEXT launch — a running Node process cannot
7
- * replace its own binary in flight).
8
- *
9
- * Pure version logic + an injectable `UpgradeRuntime` (network/exec/clock/cache)
10
- * so everything is testable without npm or the network.
11
- */
12
- import { spawnSync } from "node:child_process";
13
- import { existsSync, readFileSync, writeFileSync } from "node:fs";
14
- import { dirname, join, resolve as resolvePath } from "node:path";
15
- import { fileURLToPath } from "node:url";
16
- export const H2A_CLI_PACKAGE = "@sentropic/h2a-cli";
17
- /** Re-check at most once per this window for the passive `--upgrade-check` notice. */
18
- export const H2A_UPGRADE_CHECK_TTL_MS = 24 * 60 * 60 * 1000;
19
- /**
20
- * Shorter throttle for `--auto-upgrade`: it is opt-in to *stay current*, so a
21
- * 24h notice cache must not make it lag a same-day release (the bug that left
22
- * agents on 0.39.0 after a restart). 1h still dedups a mass restart through the
23
- * shared per-root cache (only the first booting host hits the network).
24
- */
25
- export const H2A_AUTO_UPGRADE_CHECK_TTL_MS = 60 * 60 * 1000;
26
- const STRICT_SEMVER = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/;
27
- /** Parse a strict X.Y.Z triple, or undefined if it is not one. */
28
- export function parseSemver(v) {
29
- const m = STRICT_SEMVER.exec(v.trim());
30
- if (!m)
31
- return undefined;
32
- return { major: Number(m[1]), minor: Number(m[2]), patch: Number(m[3]) };
33
- }
34
- /** True iff `latest` is a strictly higher X.Y.Z than `current`. */
35
- export function isNewerVersion(latest, current) {
36
- const a = parseSemver(latest);
37
- const b = parseSemver(current);
38
- if (!a || !b)
39
- return false;
40
- if (a.major !== b.major)
41
- return a.major > b.major;
42
- if (a.minor !== b.minor)
43
- return a.minor > b.minor;
44
- return a.patch > b.patch;
45
- }
46
- /** The version of the running `@sentropic/h2a-cli` (from its package.json). */
47
- export function currentCliVersion() {
48
- try {
49
- const here = dirname(fileURLToPath(import.meta.url)); // dist/runtime/upgrade
50
- const pkgPath = resolvePath(here, "..", "..", "..", "package.json");
51
- const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
52
- return typeof pkg.version === "string" ? pkg.version : "0.0.0";
53
- }
54
- catch {
55
- return "0.0.0";
56
- }
57
- }
58
- export const defaultUpgradeRuntime = {
59
- fetchLatest(pkg) {
60
- try {
61
- // Bounded, but realistic: `npm view` routinely takes ~5s, so the old 4s
62
- // timeout fired every time and SILENTLY broke every upgrade check (the
63
- // global + all hosts stayed pinned — DEC-114). 15s covers a slow registry;
64
- // the boot check is cached (24h TTL) so this network call is rare.
65
- const r = spawnSync("npm", ["view", pkg, "version"], { encoding: "utf8", timeout: 15_000 });
66
- if (r.status !== 0)
67
- return undefined;
68
- const v = r.stdout.trim();
69
- return parseSemver(v) ? v : undefined;
70
- }
71
- catch {
72
- return undefined;
73
- }
74
- },
75
- runInstall(pkg) {
76
- try {
77
- const r = spawnSync("npm", ["i", "-g", `${pkg}@latest`], { stdio: "ignore", timeout: 120_000 });
78
- return r.status === 0;
79
- }
80
- catch {
81
- return false;
82
- }
83
- },
84
- now() {
85
- return Date.now();
86
- },
87
- readCache(path) {
88
- try {
89
- if (!existsSync(path))
90
- return undefined;
91
- return JSON.parse(readFileSync(path, "utf8"));
92
- }
93
- catch {
94
- return undefined;
95
- }
96
- },
97
- writeCache(path, entry) {
98
- try {
99
- writeFileSync(path, `${JSON.stringify(entry, null, 2)}\n`, "utf8");
100
- }
101
- catch {
102
- // best-effort
103
- }
104
- }
105
- };
106
- /**
107
- * Determine whether a newer CLI is published. Cached + throttled when a
108
- * `cachePath` is given (level-2 boot notice); always-fresh otherwise. Never
109
- * throws — a network failure yields `{ latest: undefined, upgradeAvailable:false }`.
110
- */
111
- export function checkUpgrade(current, options = {}) {
112
- const runtime = options.runtime ?? defaultUpgradeRuntime;
113
- const ttlMs = options.ttlMs ?? H2A_UPGRADE_CHECK_TTL_MS;
114
- const now = runtime.now();
115
- if (options.cachePath && !options.force) {
116
- const cached = runtime.readCache(options.cachePath);
117
- if (cached && now - cached.checkedAt < ttlMs) {
118
- return {
119
- current,
120
- ...(cached.latest ? { latest: cached.latest } : {}),
121
- upgradeAvailable: cached.latest ? isNewerVersion(cached.latest, current) : false,
122
- fromCache: true
123
- };
124
- }
125
- }
126
- const latest = runtime.fetchLatest(H2A_CLI_PACKAGE);
127
- if (options.cachePath) {
128
- runtime.writeCache(options.cachePath, { checkedAt: now, ...(latest ? { latest } : {}) });
129
- }
130
- return {
131
- current,
132
- ...(latest ? { latest } : {}),
133
- upgradeAvailable: latest ? isNewerVersion(latest, current) : false,
134
- fromCache: false
135
- };
136
- }
137
- /** Run the global install of `@latest`. Returns true on success. */
138
- export function performUpgrade(runtime = defaultUpgradeRuntime) {
139
- return runtime.runInstall(H2A_CLI_PACKAGE);
140
- }
141
- /** Default cache path for the boot check, under the store root. */
142
- export function upgradeCachePath(root) {
143
- return join(root, "upgrade-check.json");
144
- }
145
- /**
146
- * Env flag set across an in-place re-exec so the freshly-exec'd process does
147
- * NOT auto-upgrade + re-exec again this boot (breaks any pathological loop if
148
- * an install reports success without changing the on-disk version).
149
- */
150
- export const H2A_REEXEC_GUARD_ENV = "H2A_UPGRADE_REEXECED";
151
- /** True when an in-place re-exec is possible (POSIX `process.execve`, Node ≥ 23.10). */
152
- export function canReexec() {
153
- return typeof process.execve === "function";
154
- }
155
- /**
156
- * Re-exec the current process into the (just-upgraded) binary at the SAME path,
157
- * preserving PID + stdio fds — so a host-spawned `mcp-serve` picks up the new
158
- * version immediately without the host seeing a disconnect. On success the
159
- * process image is replaced and this never returns; returns `false` if re-exec
160
- * is unavailable or failed (caller falls back to "applies next launch"). The
161
- * `H2A_REEXEC_GUARD_ENV` flag is set so the new image does not re-upgrade.
162
- */
163
- export function reexecSelf(options = {}) {
164
- const execve = options.execve ??
165
- process.execve;
166
- if (typeof execve !== "function")
167
- return false;
168
- const execPath = options.execPath ?? process.execPath;
169
- // CRITICAL: a failing `process.execve` (e.g. a bad path) aborts the process
170
- // *natively* — it is NOT a catchable throw — so we must not call it on a
171
- // target that might fail. Guard on existence first; the real boot path uses
172
- // `process.execPath` (the running node), which is always valid.
173
- if (!existsSync(execPath))
174
- return false;
175
- const argv = options.argv ?? process.argv.slice(1);
176
- const env = { ...(options.env ?? process.env), [H2A_REEXEC_GUARD_ENV]: "1" };
177
- try {
178
- execve(execPath, [execPath, ...argv], env);
179
- return true; // unreachable when execve truly replaces the image
180
- }
181
- catch {
182
- return false;
183
- }
184
- }
185
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runtime/upgrade/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAA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AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAU3D,wFAAwF;AACxF,MAAM,UAAU,SAAS;IACvB,OAAO,OAAQ,OAA2C,CAAC,MAAM,KAAK,UAAU,CAAC;AACnF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,UAAyB,EAAE;IACpD,MAAM,MAAM,GACV,OAAO,CAAC,MAAM;QACb,OAA2D,CAAC,MAAM,CAAC;IACtE,IAAI,OAAO,MAAM,KAAK,UAAU;QAAE,OAAO,KAAK,CAAC;IAC/C,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC;IACtD,4EAA4E;IAC5E,yEAAyE;IACzE,4EAA4E;IAC5E,gEAAgE;IAChE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,KAAK,CAAC;IACxC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnD,MAAM,GAAG,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,oBAAoB,CAAC,EAAE,GAAG,EAAE,CAAC;IAC7E,IAAI,CAAC;QACH,MAAM,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QAC3C,OAAO,IAAI,CAAC,CAAC,mDAAmD;IAClE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -1,15 +0,0 @@
1
- import type { H2AAgentVersion } from "@sentropic/h2a";
2
- /**
3
- * Read the `version` stamp from the installed h2a skill for `host`, best-effort.
4
- * Accepts both YAML frontmatter (`version: x`, SKILL.md) and TOML (`version = "x"`,
5
- * gemini command file). Returns undefined for an unknown host, a missing/unreadable
6
- * file, or a skill with no version stamp.
7
- */
8
- export declare function readInstalledSkillVersion(host: string, home?: string): string | undefined;
9
- /**
10
- * Compose the deployed-version stamp for a session: the running CLI version and
11
- * (when a host is known) its installed skill version. Fields are omitted rather
12
- * than set to undefined so the presence record stays clean.
13
- */
14
- export declare function agentVersion(host?: string, home?: string): H2AAgentVersion;
15
- //# sourceMappingURL=agent-version.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-version.d.ts","sourceRoot":"","sources":["../../../src/runtime/version/agent-version.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAYtD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,MAAkB,GAAG,MAAM,GAAG,SAAS,CAUpG;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,GAAE,MAAkB,GAAG,eAAe,CAOrF"}
@@ -1,53 +0,0 @@
1
- /**
2
- * Deployed-version visibility (EVO — addressing/version convergence, slice #2).
3
- *
4
- * The binary self-upgrades (`mcp-serve --auto-upgrade`) but the **skill does
5
- * not** — it is copied to each host by `h2a install-skills` and then frozen.
6
- * So an agent can run a fresh CLI behind a stale skill, invisibly. Stamping
7
- * `{ cli, skill }` into the presence record at session open makes that drift
8
- * visible in `/h2a discover` and `h2a doctor` without polling each host.
9
- */
10
- import { readFileSync } from "node:fs";
11
- import { homedir } from "node:os";
12
- import { join } from "node:path";
13
- import { currentCliVersion } from "../upgrade/index.js";
14
- /** Where each host's installed h2a skill file lives, relative to a home dir. */
15
- const HOST_SKILL_FILE = {
16
- claude: (home) => join(home, ".claude", "skills", "h2a", "SKILL.md"),
17
- codex: (home) => join(home, ".codex", "skills", "h2a", "SKILL.md"),
18
- gemini: (home) => join(home, ".gemini", "commands", "h2a.toml"),
19
- agy: (home) => join(home, ".gemini", "commands", "h2a.toml")
20
- };
21
- /**
22
- * Read the `version` stamp from the installed h2a skill for `host`, best-effort.
23
- * Accepts both YAML frontmatter (`version: x`, SKILL.md) and TOML (`version = "x"`,
24
- * gemini command file). Returns undefined for an unknown host, a missing/unreadable
25
- * file, or a skill with no version stamp.
26
- */
27
- export function readInstalledSkillVersion(host, home = homedir()) {
28
- const resolve = HOST_SKILL_FILE[host];
29
- if (!resolve)
30
- return undefined;
31
- try {
32
- const raw = readFileSync(resolve(home), "utf8");
33
- const match = /^\s*version\s*[:=]\s*["']?(\d+\.\d+\.\d+[^"'\s]*)/m.exec(raw);
34
- return match ? match[1] : undefined;
35
- }
36
- catch {
37
- return undefined;
38
- }
39
- }
40
- /**
41
- * Compose the deployed-version stamp for a session: the running CLI version and
42
- * (when a host is known) its installed skill version. Fields are omitted rather
43
- * than set to undefined so the presence record stays clean.
44
- */
45
- export function agentVersion(host, home = homedir()) {
46
- const cli = currentCliVersion();
47
- const skill = host ? readInstalledSkillVersion(host, home) : undefined;
48
- return {
49
- ...(cli ? { cli } : {}),
50
- ...(skill ? { skill } : {})
51
- };
52
- }
53
- //# sourceMappingURL=agent-version.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-version.js","sourceRoot":"","sources":["../../../src/runtime/version/agent-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,gFAAgF;AAChF,MAAM,eAAe,GAA6C;IAChE,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC;IACpE,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,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