@agimon-ai/doompi-core 0.0.1-alpha.70

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 (1372) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +5 -0
  3. package/dist/_virtual/_rolldown/runtime.cjs +23 -0
  4. package/dist/agent-model.cjs +4 -0
  5. package/dist/agent-model.d.cts +2 -0
  6. package/dist/agent-model.d.mts +2 -0
  7. package/dist/agent-model.mjs +2 -0
  8. package/dist/api-contracts.cjs +27 -0
  9. package/dist/api-contracts.d.cts +7 -0
  10. package/dist/api-contracts.d.mts +7 -0
  11. package/dist/api-contracts.mjs +7 -0
  12. package/dist/ask-user.cjs +8 -0
  13. package/dist/ask-user.d.cts +2 -0
  14. package/dist/ask-user.d.mts +2 -0
  15. package/dist/ask-user.mjs +2 -0
  16. package/dist/author-tools.cjs +5 -0
  17. package/dist/author-tools.d.cts +2 -0
  18. package/dist/author-tools.d.mts +2 -0
  19. package/dist/author-tools.mjs +2 -0
  20. package/dist/background-work.cjs +7 -0
  21. package/dist/background-work.d.cts +2 -0
  22. package/dist/background-work.d.mts +2 -0
  23. package/dist/background-work.mjs +2 -0
  24. package/dist/child-process.cjs +15 -0
  25. package/dist/child-process.d.cts +2 -0
  26. package/dist/child-process.d.mts +2 -0
  27. package/dist/child-process.mjs +2 -0
  28. package/dist/child.cjs +7 -0
  29. package/dist/child.d.cts +3 -0
  30. package/dist/child.d.mts +3 -0
  31. package/dist/child.mjs +3 -0
  32. package/dist/cockpit-container.cjs +4 -0
  33. package/dist/cockpit-container.d.cts +2 -0
  34. package/dist/cockpit-container.d.mts +2 -0
  35. package/dist/cockpit-container.mjs +2 -0
  36. package/dist/config.cjs +13 -0
  37. package/dist/config.d.cts +3 -0
  38. package/dist/config.d.mts +3 -0
  39. package/dist/config.mjs +2 -0
  40. package/dist/constants/authorTools.cjs +10 -0
  41. package/dist/constants/authorTools.cjs.map +1 -0
  42. package/dist/constants/authorTools.d.cts +6 -0
  43. package/dist/constants/authorTools.d.cts.map +1 -0
  44. package/dist/constants/authorTools.d.mts +6 -0
  45. package/dist/constants/authorTools.d.mts.map +1 -0
  46. package/dist/constants/authorTools.mjs +8 -0
  47. package/dist/constants/authorTools.mjs.map +1 -0
  48. package/dist/constants/contextApi.cjs +28 -0
  49. package/dist/constants/contextApi.cjs.map +1 -0
  50. package/dist/constants/contextApi.d.cts +21 -0
  51. package/dist/constants/contextApi.d.cts.map +1 -0
  52. package/dist/constants/contextApi.d.mts +21 -0
  53. package/dist/constants/contextApi.d.mts.map +1 -0
  54. package/dist/constants/contextApi.mjs +23 -0
  55. package/dist/constants/contextApi.mjs.map +1 -0
  56. package/dist/constants/remote.cjs +81 -0
  57. package/dist/constants/remote.cjs.map +1 -0
  58. package/dist/constants/remote.mjs +62 -0
  59. package/dist/constants/remote.mjs.map +1 -0
  60. package/dist/constants/voiceReloadHandoff.cjs +12 -0
  61. package/dist/constants/voiceReloadHandoff.cjs.map +1 -0
  62. package/dist/constants/voiceReloadHandoff.d.cts +7 -0
  63. package/dist/constants/voiceReloadHandoff.d.cts.map +1 -0
  64. package/dist/constants/voiceReloadHandoff.d.mts +7 -0
  65. package/dist/constants/voiceReloadHandoff.d.mts.map +1 -0
  66. package/dist/constants/voiceReloadHandoff.mjs +9 -0
  67. package/dist/constants/voiceReloadHandoff.mjs.map +1 -0
  68. package/dist/constants/voiceTools.cjs +96 -0
  69. package/dist/constants/voiceTools.cjs.map +1 -0
  70. package/dist/constants/voiceTools.d.cts +58 -0
  71. package/dist/constants/voiceTools.d.cts.map +1 -0
  72. package/dist/constants/voiceTools.d.mts +58 -0
  73. package/dist/constants/voiceTools.d.mts.map +1 -0
  74. package/dist/constants/voiceTools.mjs +60 -0
  75. package/dist/constants/voiceTools.mjs.map +1 -0
  76. package/dist/context-api.cjs +10 -0
  77. package/dist/context-api.d.cts +4 -0
  78. package/dist/context-api.d.mts +4 -0
  79. package/dist/context-api.mjs +3 -0
  80. package/dist/context-contributions.cjs +7 -0
  81. package/dist/context-contributions.d.cts +3 -0
  82. package/dist/context-contributions.d.mts +3 -0
  83. package/dist/context-contributions.mjs +3 -0
  84. package/dist/context-detail-store.cjs +100 -0
  85. package/dist/context-detail-store.cjs.map +1 -0
  86. package/dist/context-detail-store.d.cts +19 -0
  87. package/dist/context-detail-store.d.cts.map +1 -0
  88. package/dist/context-detail-store.d.mts +19 -0
  89. package/dist/context-detail-store.d.mts.map +1 -0
  90. package/dist/context-detail-store.mjs +91 -0
  91. package/dist/context-detail-store.mjs.map +1 -0
  92. package/dist/context-detail.cjs +57 -0
  93. package/dist/context-detail.cjs.map +1 -0
  94. package/dist/context-detail.d.cts +13 -0
  95. package/dist/context-detail.d.cts.map +1 -0
  96. package/dist/context-detail.d.mts +13 -0
  97. package/dist/context-detail.d.mts.map +1 -0
  98. package/dist/context-detail.mjs +56 -0
  99. package/dist/context-detail.mjs.map +1 -0
  100. package/dist/context-projection.cjs +120 -0
  101. package/dist/context-projection.cjs.map +1 -0
  102. package/dist/context-projection.d.cts +113 -0
  103. package/dist/context-projection.d.cts.map +1 -0
  104. package/dist/context-projection.d.mts +113 -0
  105. package/dist/context-projection.d.mts.map +1 -0
  106. package/dist/context-projection.mjs +116 -0
  107. package/dist/context-projection.mjs.map +1 -0
  108. package/dist/cordis-host.cjs +10 -0
  109. package/dist/cordis-host.d.cts +2 -0
  110. package/dist/cordis-host.d.mts +2 -0
  111. package/dist/cordis-host.mjs +2 -0
  112. package/dist/delegation.cjs +18 -0
  113. package/dist/delegation.d.cts +2 -0
  114. package/dist/delegation.d.mts +2 -0
  115. package/dist/delegation.mjs +2 -0
  116. package/dist/doom-package.cjs +61 -0
  117. package/dist/doom-package.cjs.map +1 -0
  118. package/dist/doom-package.d.cts +17 -0
  119. package/dist/doom-package.d.cts.map +1 -0
  120. package/dist/doom-package.d.mts +17 -0
  121. package/dist/doom-package.d.mts.map +1 -0
  122. package/dist/doom-package.mjs +54 -0
  123. package/dist/doom-package.mjs.map +1 -0
  124. package/dist/extensions/serverPlugin.cjs +106 -0
  125. package/dist/extensions/serverPlugin.cjs.map +1 -0
  126. package/dist/extensions/serverPlugin.d.cts +5 -0
  127. package/dist/extensions/serverPlugin.d.cts.map +1 -0
  128. package/dist/extensions/serverPlugin.d.mts +5 -0
  129. package/dist/extensions/serverPlugin.d.mts.map +1 -0
  130. package/dist/extensions/serverPlugin.mjs +106 -0
  131. package/dist/extensions/serverPlugin.mjs.map +1 -0
  132. package/dist/extensions/webPlugin.cjs +28 -0
  133. package/dist/extensions/webPlugin.cjs.map +1 -0
  134. package/dist/extensions/webPlugin.d.cts +19 -0
  135. package/dist/extensions/webPlugin.d.cts.map +1 -0
  136. package/dist/extensions/webPlugin.d.mts +19 -0
  137. package/dist/extensions/webPlugin.d.mts.map +1 -0
  138. package/dist/extensions/webPlugin.mjs +26 -0
  139. package/dist/extensions/webPlugin.mjs.map +1 -0
  140. package/dist/footer.cjs +6 -0
  141. package/dist/footer.d.cts +2 -0
  142. package/dist/footer.d.mts +2 -0
  143. package/dist/footer.mjs +2 -0
  144. package/dist/headless-hub.cjs +499 -0
  145. package/dist/headless-hub.cjs.map +1 -0
  146. package/dist/headless-hub.d.cts +96 -0
  147. package/dist/headless-hub.d.cts.map +1 -0
  148. package/dist/headless-hub.d.mts +96 -0
  149. package/dist/headless-hub.d.mts.map +1 -0
  150. package/dist/headless-hub.mjs +498 -0
  151. package/dist/headless-hub.mjs.map +1 -0
  152. package/dist/headless-server.cjs +492 -0
  153. package/dist/headless-server.cjs.map +1 -0
  154. package/dist/headless-server.d.cts +30 -0
  155. package/dist/headless-server.d.cts.map +1 -0
  156. package/dist/headless-server.d.mts +30 -0
  157. package/dist/headless-server.d.mts.map +1 -0
  158. package/dist/headless-server.mjs +488 -0
  159. package/dist/headless-server.mjs.map +1 -0
  160. package/dist/headless-session-host.cjs +0 -0
  161. package/dist/headless-session-host.d.cts +45 -0
  162. package/dist/headless-session-host.d.cts.map +1 -0
  163. package/dist/headless-session-host.d.mts +45 -0
  164. package/dist/headless-session-host.d.mts.map +1 -0
  165. package/dist/headless-session-host.mjs +1 -0
  166. package/dist/headless-session-manager.cjs +51 -0
  167. package/dist/headless-session-manager.cjs.map +1 -0
  168. package/dist/headless-session-manager.d.cts +6 -0
  169. package/dist/headless-session-manager.d.cts.map +1 -0
  170. package/dist/headless-session-manager.d.mts +6 -0
  171. package/dist/headless-session-manager.d.mts.map +1 -0
  172. package/dist/headless-session-manager.mjs +50 -0
  173. package/dist/headless-session-manager.mjs.map +1 -0
  174. package/dist/headless.cjs +7 -0
  175. package/dist/headless.d.cts +2 -0
  176. package/dist/headless.d.mts +2 -0
  177. package/dist/headless.mjs +2 -0
  178. package/dist/help.cjs +21 -0
  179. package/dist/help.d.cts +2 -0
  180. package/dist/help.d.mts +2 -0
  181. package/dist/help.mjs +2 -0
  182. package/dist/history-import.cjs +553 -0
  183. package/dist/history-import.cjs.map +1 -0
  184. package/dist/history-import.d.cts +76 -0
  185. package/dist/history-import.d.cts.map +1 -0
  186. package/dist/history-import.d.mts +76 -0
  187. package/dist/history-import.d.mts.map +1 -0
  188. package/dist/history-import.mjs +547 -0
  189. package/dist/history-import.mjs.map +1 -0
  190. package/dist/history-ownership.cjs +169 -0
  191. package/dist/history-ownership.cjs.map +1 -0
  192. package/dist/history-ownership.d.cts +23 -0
  193. package/dist/history-ownership.d.cts.map +1 -0
  194. package/dist/history-ownership.d.mts +23 -0
  195. package/dist/history-ownership.d.mts.map +1 -0
  196. package/dist/history-ownership.mjs +163 -0
  197. package/dist/history-ownership.mjs.map +1 -0
  198. package/dist/history.cjs +13 -0
  199. package/dist/history.d.cts +6 -0
  200. package/dist/history.d.mts +6 -0
  201. package/dist/history.mjs +6 -0
  202. package/dist/hub-channel.cjs +0 -0
  203. package/dist/hub-channel.d.cts +2 -0
  204. package/dist/hub-channel.d.mts +2 -0
  205. package/dist/hub-channel.mjs +1 -0
  206. package/dist/index.cjs +44 -0
  207. package/dist/index.d.cts +6 -0
  208. package/dist/index.d.mts +6 -0
  209. package/dist/index.mjs +6 -0
  210. package/dist/json.cjs +6 -0
  211. package/dist/json.d.cts +2 -0
  212. package/dist/json.d.mts +2 -0
  213. package/dist/json.mjs +2 -0
  214. package/dist/jsonl-session-repo.cjs +217 -0
  215. package/dist/jsonl-session-repo.cjs.map +1 -0
  216. package/dist/jsonl-session-repo.d.cts +7 -0
  217. package/dist/jsonl-session-repo.d.cts.map +1 -0
  218. package/dist/jsonl-session-repo.d.mts +7 -0
  219. package/dist/jsonl-session-repo.d.mts.map +1 -0
  220. package/dist/jsonl-session-repo.mjs +212 -0
  221. package/dist/jsonl-session-repo.mjs.map +1 -0
  222. package/dist/kernel.cjs +3 -0
  223. package/dist/kernel.d.cts +3 -0
  224. package/dist/kernel.d.mts +3 -0
  225. package/dist/kernel.mjs +2 -0
  226. package/dist/leader.cjs +9 -0
  227. package/dist/leader.d.cts +2 -0
  228. package/dist/leader.d.mts +2 -0
  229. package/dist/leader.mjs +2 -0
  230. package/dist/log-sink-telemetry.cjs +5 -0
  231. package/dist/log-sink-telemetry.d.cts +2 -0
  232. package/dist/log-sink-telemetry.d.mts +2 -0
  233. package/dist/log-sink-telemetry.mjs +2 -0
  234. package/dist/machine-api.cjs +73 -0
  235. package/dist/machine-api.cjs.map +1 -0
  236. package/dist/machine-api.d.cts +7 -0
  237. package/dist/machine-api.d.cts.map +1 -0
  238. package/dist/machine-api.d.mts +7 -0
  239. package/dist/machine-api.d.mts.map +1 -0
  240. package/dist/machine-api.mjs +70 -0
  241. package/dist/machine-api.mjs.map +1 -0
  242. package/dist/main.cjs +10 -0
  243. package/dist/main.d.cts +5 -0
  244. package/dist/main.d.mts +5 -0
  245. package/dist/main.mjs +4 -0
  246. package/dist/mcp-projection.cjs +15 -0
  247. package/dist/mcp-projection.d.cts +2 -0
  248. package/dist/mcp-projection.d.mts +2 -0
  249. package/dist/mcp-projection.mjs +2 -0
  250. package/dist/mcp-schema-cost.cjs +195 -0
  251. package/dist/mcp-schema-cost.cjs.map +1 -0
  252. package/dist/mcp-schema-cost.d.cts +35 -0
  253. package/dist/mcp-schema-cost.d.cts.map +1 -0
  254. package/dist/mcp-schema-cost.d.mts +35 -0
  255. package/dist/mcp-schema-cost.d.mts.map +1 -0
  256. package/dist/mcp-schema-cost.mjs +190 -0
  257. package/dist/mcp-schema-cost.mjs.map +1 -0
  258. package/dist/mcp-session.cjs +9 -0
  259. package/dist/mcp-session.d.cts +2 -0
  260. package/dist/mcp-session.d.mts +2 -0
  261. package/dist/mcp-session.mjs +2 -0
  262. package/dist/mcp-status.cjs +7 -0
  263. package/dist/mcp-status.d.cts +2 -0
  264. package/dist/mcp-status.d.mts +2 -0
  265. package/dist/mcp-status.mjs +2 -0
  266. package/dist/mcp-tool-resolver.cjs +5 -0
  267. package/dist/mcp-tool-resolver.d.cts +2 -0
  268. package/dist/mcp-tool-resolver.d.mts +2 -0
  269. package/dist/mcp-tool-resolver.mjs +2 -0
  270. package/dist/module-resolution.cjs +405 -0
  271. package/dist/module-resolution.cjs.map +1 -0
  272. package/dist/module-resolution.d.cts +67 -0
  273. package/dist/module-resolution.d.cts.map +1 -0
  274. package/dist/module-resolution.d.mts +67 -0
  275. package/dist/module-resolution.d.mts.map +1 -0
  276. package/dist/module-resolution.mjs +389 -0
  277. package/dist/module-resolution.mjs.map +1 -0
  278. package/dist/narration.cjs +10 -0
  279. package/dist/narration.d.cts +2 -0
  280. package/dist/narration.d.mts +2 -0
  281. package/dist/narration.mjs +2 -0
  282. package/dist/notification.cjs +17 -0
  283. package/dist/notification.d.cts +2 -0
  284. package/dist/notification.d.mts +2 -0
  285. package/dist/notification.mjs +2 -0
  286. package/dist/package-api-server.cjs +161 -0
  287. package/dist/package-api-server.cjs.map +1 -0
  288. package/dist/package-api-server.d.cts +47 -0
  289. package/dist/package-api-server.d.cts.map +1 -0
  290. package/dist/package-api-server.d.mts +47 -0
  291. package/dist/package-api-server.d.mts.map +1 -0
  292. package/dist/package-api-server.mjs +159 -0
  293. package/dist/package-api-server.mjs.map +1 -0
  294. package/dist/package-api.cjs +11 -0
  295. package/dist/package-api.d.cts +2 -0
  296. package/dist/package-api.d.mts +2 -0
  297. package/dist/package-api.mjs +2 -0
  298. package/dist/pi/piSessionRuntime.cjs +520 -0
  299. package/dist/pi/piSessionRuntime.cjs.map +1 -0
  300. package/dist/pi/piSessionRuntime.d.cts +43 -0
  301. package/dist/pi/piSessionRuntime.d.cts.map +1 -0
  302. package/dist/pi/piSessionRuntime.d.mts +43 -0
  303. package/dist/pi/piSessionRuntime.d.mts.map +1 -0
  304. package/dist/pi/piSessionRuntime.mjs +519 -0
  305. package/dist/pi/piSessionRuntime.mjs.map +1 -0
  306. package/dist/pi/piWebSocketListener.cjs +115 -0
  307. package/dist/pi/piWebSocketListener.cjs.map +1 -0
  308. package/dist/pi/piWebSocketListener.mjs +115 -0
  309. package/dist/pi/piWebSocketListener.mjs.map +1 -0
  310. package/dist/pi-extension.cjs +8 -0
  311. package/dist/pi-extension.d.cts +5 -0
  312. package/dist/pi-extension.d.mts +5 -0
  313. package/dist/pi-extension.mjs +4 -0
  314. package/dist/pi-settings.cjs +11 -0
  315. package/dist/pi-settings.d.cts +2 -0
  316. package/dist/pi-settings.d.mts +2 -0
  317. package/dist/pi-settings.mjs +2 -0
  318. package/dist/plugin-protocol.cjs +10 -0
  319. package/dist/plugin-protocol.d.cts +2 -0
  320. package/dist/plugin-protocol.d.mts +2 -0
  321. package/dist/plugin-protocol.mjs +2 -0
  322. package/dist/profile-identity.cjs +6 -0
  323. package/dist/profile-identity.d.cts +2 -0
  324. package/dist/profile-identity.d.mts +2 -0
  325. package/dist/profile-identity.mjs +2 -0
  326. package/dist/protocol.cjs +10 -0
  327. package/dist/protocol.d.cts +2 -0
  328. package/dist/protocol.d.mts +2 -0
  329. package/dist/protocol.mjs +2 -0
  330. package/dist/readiness.cjs +8 -0
  331. package/dist/readiness.d.cts +2 -0
  332. package/dist/readiness.d.mts +2 -0
  333. package/dist/readiness.mjs +2 -0
  334. package/dist/relaunch-handoff.cjs +6 -0
  335. package/dist/relaunch-handoff.d.cts +2 -0
  336. package/dist/relaunch-handoff.d.mts +2 -0
  337. package/dist/relaunch-handoff.mjs +2 -0
  338. package/dist/remote-api.cjs +42 -0
  339. package/dist/remote-api.cjs.map +1 -0
  340. package/dist/remote-api.d.cts +7 -0
  341. package/dist/remote-api.d.cts.map +1 -0
  342. package/dist/remote-api.d.mts +7 -0
  343. package/dist/remote-api.d.mts.map +1 -0
  344. package/dist/remote-api.mjs +41 -0
  345. package/dist/remote-api.mjs.map +1 -0
  346. package/dist/remote-runtime.cjs +394 -0
  347. package/dist/remote-runtime.cjs.map +1 -0
  348. package/dist/remote-runtime.d.cts +26 -0
  349. package/dist/remote-runtime.d.cts.map +1 -0
  350. package/dist/remote-runtime.d.mts +26 -0
  351. package/dist/remote-runtime.d.mts.map +1 -0
  352. package/dist/remote-runtime.mjs +390 -0
  353. package/dist/remote-runtime.mjs.map +1 -0
  354. package/dist/runtime-config.cjs +232 -0
  355. package/dist/runtime-config.cjs.map +1 -0
  356. package/dist/runtime-config.d.cts +313 -0
  357. package/dist/runtime-config.d.cts.map +1 -0
  358. package/dist/runtime-config.d.mts +313 -0
  359. package/dist/runtime-config.d.mts.map +1 -0
  360. package/dist/runtime-config.mjs +221 -0
  361. package/dist/runtime-config.mjs.map +1 -0
  362. package/dist/runtime-context-api.cjs +64 -0
  363. package/dist/runtime-context-api.cjs.map +1 -0
  364. package/dist/runtime-context-api.d.cts +16 -0
  365. package/dist/runtime-context-api.d.cts.map +1 -0
  366. package/dist/runtime-context-api.d.mts +16 -0
  367. package/dist/runtime-context-api.d.mts.map +1 -0
  368. package/dist/runtime-context-api.mjs +62 -0
  369. package/dist/runtime-context-api.mjs.map +1 -0
  370. package/dist/runtime-cordis-host.cjs +191 -0
  371. package/dist/runtime-cordis-host.cjs.map +1 -0
  372. package/dist/runtime-cordis-host.d.cts +57 -0
  373. package/dist/runtime-cordis-host.d.cts.map +1 -0
  374. package/dist/runtime-cordis-host.d.mts +57 -0
  375. package/dist/runtime-cordis-host.d.mts.map +1 -0
  376. package/dist/runtime-cordis-host.mjs +183 -0
  377. package/dist/runtime-cordis-host.mjs.map +1 -0
  378. package/dist/runtime-headless-session-manager.cjs +0 -0
  379. package/dist/runtime-headless-session-manager.d.cts +14 -0
  380. package/dist/runtime-headless-session-manager.d.cts.map +1 -0
  381. package/dist/runtime-headless-session-manager.d.mts +14 -0
  382. package/dist/runtime-headless-session-manager.d.mts.map +1 -0
  383. package/dist/runtime-headless-session-manager.mjs +1 -0
  384. package/dist/runtime-identity.cjs +26 -0
  385. package/dist/runtime-identity.cjs.map +1 -0
  386. package/dist/runtime-identity.d.cts +7 -0
  387. package/dist/runtime-identity.d.cts.map +1 -0
  388. package/dist/runtime-identity.d.mts +7 -0
  389. package/dist/runtime-identity.d.mts.map +1 -0
  390. package/dist/runtime-identity.mjs +21 -0
  391. package/dist/runtime-identity.mjs.map +1 -0
  392. package/dist/runtime-json.cjs +46 -0
  393. package/dist/runtime-json.cjs.map +1 -0
  394. package/dist/runtime-json.d.cts +22 -0
  395. package/dist/runtime-json.d.cts.map +1 -0
  396. package/dist/runtime-json.d.mts +22 -0
  397. package/dist/runtime-json.d.mts.map +1 -0
  398. package/dist/runtime-json.mjs +39 -0
  399. package/dist/runtime-json.mjs.map +1 -0
  400. package/dist/runtime-log-sink-telemetry.cjs +102 -0
  401. package/dist/runtime-log-sink-telemetry.cjs.map +1 -0
  402. package/dist/runtime-log-sink-telemetry.d.cts +49 -0
  403. package/dist/runtime-log-sink-telemetry.d.cts.map +1 -0
  404. package/dist/runtime-log-sink-telemetry.d.mts +49 -0
  405. package/dist/runtime-log-sink-telemetry.d.mts.map +1 -0
  406. package/dist/runtime-log-sink-telemetry.mjs +99 -0
  407. package/dist/runtime-log-sink-telemetry.mjs.map +1 -0
  408. package/dist/runtime-pi-extension.cjs +243 -0
  409. package/dist/runtime-pi-extension.cjs.map +1 -0
  410. package/dist/runtime-pi-extension.d.cts +102 -0
  411. package/dist/runtime-pi-extension.d.cts.map +1 -0
  412. package/dist/runtime-pi-extension.d.mts +102 -0
  413. package/dist/runtime-pi-extension.d.mts.map +1 -0
  414. package/dist/runtime-pi-extension.mjs +242 -0
  415. package/dist/runtime-pi-extension.mjs.map +1 -0
  416. package/dist/runtime-pi-settings.cjs +104 -0
  417. package/dist/runtime-pi-settings.cjs.map +1 -0
  418. package/dist/runtime-pi-settings.d.cts +23 -0
  419. package/dist/runtime-pi-settings.d.cts.map +1 -0
  420. package/dist/runtime-pi-settings.d.mts +23 -0
  421. package/dist/runtime-pi-settings.d.mts.map +1 -0
  422. package/dist/runtime-pi-settings.mjs +92 -0
  423. package/dist/runtime-pi-settings.mjs.map +1 -0
  424. package/dist/runtime-protocol.cjs +223 -0
  425. package/dist/runtime-protocol.cjs.map +1 -0
  426. package/dist/runtime-protocol.d.cts +84 -0
  427. package/dist/runtime-protocol.d.cts.map +1 -0
  428. package/dist/runtime-protocol.d.mts +84 -0
  429. package/dist/runtime-protocol.d.mts.map +1 -0
  430. package/dist/runtime-protocol.mjs +215 -0
  431. package/dist/runtime-protocol.mjs.map +1 -0
  432. package/dist/runtime-tool-names.cjs +51 -0
  433. package/dist/runtime-tool-names.cjs.map +1 -0
  434. package/dist/runtime-tool-names.d.cts +24 -0
  435. package/dist/runtime-tool-names.d.cts.map +1 -0
  436. package/dist/runtime-tool-names.d.mts +24 -0
  437. package/dist/runtime-tool-names.d.mts.map +1 -0
  438. package/dist/runtime-tool-names.mjs +49 -0
  439. package/dist/runtime-tool-names.mjs.map +1 -0
  440. package/dist/runtime-transition.cjs +27 -0
  441. package/dist/runtime-transition.cjs.map +1 -0
  442. package/dist/runtime-transition.d.cts +114 -0
  443. package/dist/runtime-transition.d.cts.map +1 -0
  444. package/dist/runtime-transition.d.mts +114 -0
  445. package/dist/runtime-transition.d.mts.map +1 -0
  446. package/dist/runtime-transition.mjs +24 -0
  447. package/dist/runtime-transition.mjs.map +1 -0
  448. package/dist/sandbox-harness.cjs +6 -0
  449. package/dist/sandbox-harness.d.cts +2 -0
  450. package/dist/sandbox-harness.d.mts +2 -0
  451. package/dist/sandbox-harness.mjs +2 -0
  452. package/dist/schemas/agentModel.cjs +33 -0
  453. package/dist/schemas/agentModel.cjs.map +1 -0
  454. package/dist/schemas/agentModel.d.cts +26 -0
  455. package/dist/schemas/agentModel.d.cts.map +1 -0
  456. package/dist/schemas/agentModel.d.mts +26 -0
  457. package/dist/schemas/agentModel.d.mts.map +1 -0
  458. package/dist/schemas/agentModel.mjs +32 -0
  459. package/dist/schemas/agentModel.mjs.map +1 -0
  460. package/dist/schemas/apiContracts.cjs +145 -0
  461. package/dist/schemas/apiContracts.cjs.map +1 -0
  462. package/dist/schemas/apiContracts.d.cts +81 -0
  463. package/dist/schemas/apiContracts.d.cts.map +1 -0
  464. package/dist/schemas/apiContracts.d.mts +81 -0
  465. package/dist/schemas/apiContracts.d.mts.map +1 -0
  466. package/dist/schemas/apiContracts.mjs +140 -0
  467. package/dist/schemas/apiContracts.mjs.map +1 -0
  468. package/dist/schemas/askUser.cjs +42 -0
  469. package/dist/schemas/askUser.cjs.map +1 -0
  470. package/dist/schemas/askUser.d.cts +47 -0
  471. package/dist/schemas/askUser.d.cts.map +1 -0
  472. package/dist/schemas/askUser.d.mts +47 -0
  473. package/dist/schemas/askUser.d.mts.map +1 -0
  474. package/dist/schemas/askUser.mjs +37 -0
  475. package/dist/schemas/askUser.mjs.map +1 -0
  476. package/dist/schemas/backgroundWork.cjs +31 -0
  477. package/dist/schemas/backgroundWork.cjs.map +1 -0
  478. package/dist/schemas/backgroundWork.d.cts +72 -0
  479. package/dist/schemas/backgroundWork.d.cts.map +1 -0
  480. package/dist/schemas/backgroundWork.d.mts +72 -0
  481. package/dist/schemas/backgroundWork.d.mts.map +1 -0
  482. package/dist/schemas/backgroundWork.mjs +27 -0
  483. package/dist/schemas/backgroundWork.mjs.map +1 -0
  484. package/dist/schemas/builtinApiContracts.cjs +37 -0
  485. package/dist/schemas/builtinApiContracts.cjs.map +1 -0
  486. package/dist/schemas/builtinApiContracts.d.cts +51 -0
  487. package/dist/schemas/builtinApiContracts.d.cts.map +1 -0
  488. package/dist/schemas/builtinApiContracts.d.mts +51 -0
  489. package/dist/schemas/builtinApiContracts.d.mts.map +1 -0
  490. package/dist/schemas/builtinApiContracts.mjs +37 -0
  491. package/dist/schemas/builtinApiContracts.mjs.map +1 -0
  492. package/dist/schemas/childProcess.cjs +67 -0
  493. package/dist/schemas/childProcess.cjs.map +1 -0
  494. package/dist/schemas/childProcess.d.cts +30 -0
  495. package/dist/schemas/childProcess.d.cts.map +1 -0
  496. package/dist/schemas/childProcess.d.mts +30 -0
  497. package/dist/schemas/childProcess.d.mts.map +1 -0
  498. package/dist/schemas/childProcess.mjs +55 -0
  499. package/dist/schemas/childProcess.mjs.map +1 -0
  500. package/dist/schemas/cockpitContainer.cjs +31 -0
  501. package/dist/schemas/cockpitContainer.cjs.map +1 -0
  502. package/dist/schemas/cockpitContainer.d.cts +80 -0
  503. package/dist/schemas/cockpitContainer.d.cts.map +1 -0
  504. package/dist/schemas/cockpitContainer.d.mts +80 -0
  505. package/dist/schemas/cockpitContainer.d.mts.map +1 -0
  506. package/dist/schemas/cockpitContainer.mjs +30 -0
  507. package/dist/schemas/cockpitContainer.mjs.map +1 -0
  508. package/dist/schemas/contextContributions.cjs +17 -0
  509. package/dist/schemas/contextContributions.cjs.map +1 -0
  510. package/dist/schemas/contextContributions.d.cts +49 -0
  511. package/dist/schemas/contextContributions.d.cts.map +1 -0
  512. package/dist/schemas/contextContributions.d.mts +49 -0
  513. package/dist/schemas/contextContributions.d.mts.map +1 -0
  514. package/dist/schemas/contextContributions.mjs +15 -0
  515. package/dist/schemas/contextContributions.mjs.map +1 -0
  516. package/dist/schemas/delegation.cjs +91 -0
  517. package/dist/schemas/delegation.cjs.map +1 -0
  518. package/dist/schemas/delegation.d.cts +95 -0
  519. package/dist/schemas/delegation.d.cts.map +1 -0
  520. package/dist/schemas/delegation.d.mts +95 -0
  521. package/dist/schemas/delegation.d.mts.map +1 -0
  522. package/dist/schemas/delegation.mjs +76 -0
  523. package/dist/schemas/delegation.mjs.map +1 -0
  524. package/dist/schemas/footer.cjs +48 -0
  525. package/dist/schemas/footer.cjs.map +1 -0
  526. package/dist/schemas/footer.d.cts +48 -0
  527. package/dist/schemas/footer.d.cts.map +1 -0
  528. package/dist/schemas/footer.d.mts +48 -0
  529. package/dist/schemas/footer.d.mts.map +1 -0
  530. package/dist/schemas/footer.mjs +45 -0
  531. package/dist/schemas/footer.mjs.map +1 -0
  532. package/dist/schemas/headless.cjs +23 -0
  533. package/dist/schemas/headless.cjs.map +1 -0
  534. package/dist/schemas/headless.d.cts +238 -0
  535. package/dist/schemas/headless.d.cts.map +1 -0
  536. package/dist/schemas/headless.d.mts +238 -0
  537. package/dist/schemas/headless.d.mts.map +1 -0
  538. package/dist/schemas/headless.mjs +19 -0
  539. package/dist/schemas/headless.mjs.map +1 -0
  540. package/dist/schemas/help.cjs +249 -0
  541. package/dist/schemas/help.cjs.map +1 -0
  542. package/dist/schemas/help.d.cts +106 -0
  543. package/dist/schemas/help.d.cts.map +1 -0
  544. package/dist/schemas/help.d.mts +106 -0
  545. package/dist/schemas/help.d.mts.map +1 -0
  546. package/dist/schemas/help.mjs +231 -0
  547. package/dist/schemas/help.mjs.map +1 -0
  548. package/dist/schemas/httpApiContracts.cjs +388 -0
  549. package/dist/schemas/httpApiContracts.cjs.map +1 -0
  550. package/dist/schemas/httpApiContracts.d.cts +14 -0
  551. package/dist/schemas/httpApiContracts.d.cts.map +1 -0
  552. package/dist/schemas/httpApiContracts.d.mts +14 -0
  553. package/dist/schemas/httpApiContracts.d.mts.map +1 -0
  554. package/dist/schemas/httpApiContracts.mjs +377 -0
  555. package/dist/schemas/httpApiContracts.mjs.map +1 -0
  556. package/dist/schemas/hubChannel.d.cts +91 -0
  557. package/dist/schemas/hubChannel.d.cts.map +1 -0
  558. package/dist/schemas/hubChannel.d.mts +91 -0
  559. package/dist/schemas/hubChannel.d.mts.map +1 -0
  560. package/dist/schemas/leader.cjs +57 -0
  561. package/dist/schemas/leader.cjs.map +1 -0
  562. package/dist/schemas/leader.d.cts +107 -0
  563. package/dist/schemas/leader.d.cts.map +1 -0
  564. package/dist/schemas/leader.d.mts +107 -0
  565. package/dist/schemas/leader.d.mts.map +1 -0
  566. package/dist/schemas/leader.mjs +51 -0
  567. package/dist/schemas/leader.mjs.map +1 -0
  568. package/dist/schemas/mcpProjection.cjs +114 -0
  569. package/dist/schemas/mcpProjection.cjs.map +1 -0
  570. package/dist/schemas/mcpProjection.d.cts +116 -0
  571. package/dist/schemas/mcpProjection.d.cts.map +1 -0
  572. package/dist/schemas/mcpProjection.d.mts +116 -0
  573. package/dist/schemas/mcpProjection.d.mts.map +1 -0
  574. package/dist/schemas/mcpProjection.mjs +102 -0
  575. package/dist/schemas/mcpProjection.mjs.map +1 -0
  576. package/dist/schemas/mcpSession.cjs +57 -0
  577. package/dist/schemas/mcpSession.cjs.map +1 -0
  578. package/dist/schemas/mcpSession.d.cts +57 -0
  579. package/dist/schemas/mcpSession.d.cts.map +1 -0
  580. package/dist/schemas/mcpSession.d.mts +57 -0
  581. package/dist/schemas/mcpSession.d.mts.map +1 -0
  582. package/dist/schemas/mcpSession.mjs +51 -0
  583. package/dist/schemas/mcpSession.mjs.map +1 -0
  584. package/dist/schemas/mcpStatus.cjs +52 -0
  585. package/dist/schemas/mcpStatus.cjs.map +1 -0
  586. package/dist/schemas/mcpStatus.d.cts +73 -0
  587. package/dist/schemas/mcpStatus.d.cts.map +1 -0
  588. package/dist/schemas/mcpStatus.d.mts +73 -0
  589. package/dist/schemas/mcpStatus.d.mts.map +1 -0
  590. package/dist/schemas/mcpStatus.mjs +48 -0
  591. package/dist/schemas/mcpStatus.mjs.map +1 -0
  592. package/dist/schemas/mcpToolResolver.cjs +17 -0
  593. package/dist/schemas/mcpToolResolver.cjs.map +1 -0
  594. package/dist/schemas/mcpToolResolver.d.cts +24 -0
  595. package/dist/schemas/mcpToolResolver.d.cts.map +1 -0
  596. package/dist/schemas/mcpToolResolver.d.mts +24 -0
  597. package/dist/schemas/mcpToolResolver.d.mts.map +1 -0
  598. package/dist/schemas/mcpToolResolver.mjs +15 -0
  599. package/dist/schemas/mcpToolResolver.mjs.map +1 -0
  600. package/dist/schemas/narration.cjs +54 -0
  601. package/dist/schemas/narration.cjs.map +1 -0
  602. package/dist/schemas/narration.d.cts +29 -0
  603. package/dist/schemas/narration.d.cts.map +1 -0
  604. package/dist/schemas/narration.d.mts +29 -0
  605. package/dist/schemas/narration.d.mts.map +1 -0
  606. package/dist/schemas/narration.mjs +47 -0
  607. package/dist/schemas/narration.mjs.map +1 -0
  608. package/dist/schemas/notification.cjs +122 -0
  609. package/dist/schemas/notification.cjs.map +1 -0
  610. package/dist/schemas/notification.d.cts +48 -0
  611. package/dist/schemas/notification.d.cts.map +1 -0
  612. package/dist/schemas/notification.d.mts +48 -0
  613. package/dist/schemas/notification.d.mts.map +1 -0
  614. package/dist/schemas/notification.mjs +108 -0
  615. package/dist/schemas/notification.mjs.map +1 -0
  616. package/dist/schemas/packageApi.cjs +52 -0
  617. package/dist/schemas/packageApi.cjs.map +1 -0
  618. package/dist/schemas/packageApi.d.cts +149 -0
  619. package/dist/schemas/packageApi.d.cts.map +1 -0
  620. package/dist/schemas/packageApi.d.mts +149 -0
  621. package/dist/schemas/packageApi.d.mts.map +1 -0
  622. package/dist/schemas/packageApi.mjs +44 -0
  623. package/dist/schemas/packageApi.mjs.map +1 -0
  624. package/dist/schemas/piTool.cjs +25 -0
  625. package/dist/schemas/piTool.cjs.map +1 -0
  626. package/dist/schemas/piTool.d.cts +12 -0
  627. package/dist/schemas/piTool.d.cts.map +1 -0
  628. package/dist/schemas/piTool.d.mts +12 -0
  629. package/dist/schemas/piTool.d.mts.map +1 -0
  630. package/dist/schemas/piTool.mjs +25 -0
  631. package/dist/schemas/piTool.mjs.map +1 -0
  632. package/dist/schemas/pluginContributions.cjs +19 -0
  633. package/dist/schemas/pluginContributions.cjs.map +1 -0
  634. package/dist/schemas/pluginContributions.d.cts +56 -0
  635. package/dist/schemas/pluginContributions.d.cts.map +1 -0
  636. package/dist/schemas/pluginContributions.d.mts +56 -0
  637. package/dist/schemas/pluginContributions.d.mts.map +1 -0
  638. package/dist/schemas/pluginContributions.mjs +18 -0
  639. package/dist/schemas/pluginContributions.mjs.map +1 -0
  640. package/dist/schemas/pluginProtocol.cjs +103 -0
  641. package/dist/schemas/pluginProtocol.cjs.map +1 -0
  642. package/dist/schemas/pluginProtocol.d.cts +68 -0
  643. package/dist/schemas/pluginProtocol.d.cts.map +1 -0
  644. package/dist/schemas/pluginProtocol.d.mts +68 -0
  645. package/dist/schemas/pluginProtocol.d.mts.map +1 -0
  646. package/dist/schemas/pluginProtocol.mjs +96 -0
  647. package/dist/schemas/pluginProtocol.mjs.map +1 -0
  648. package/dist/schemas/profileIdentity.cjs +67 -0
  649. package/dist/schemas/profileIdentity.cjs.map +1 -0
  650. package/dist/schemas/profileIdentity.d.cts +50 -0
  651. package/dist/schemas/profileIdentity.d.cts.map +1 -0
  652. package/dist/schemas/profileIdentity.d.mts +50 -0
  653. package/dist/schemas/profileIdentity.d.mts.map +1 -0
  654. package/dist/schemas/profileIdentity.mjs +64 -0
  655. package/dist/schemas/profileIdentity.mjs.map +1 -0
  656. package/dist/schemas/readiness.cjs +251 -0
  657. package/dist/schemas/readiness.cjs.map +1 -0
  658. package/dist/schemas/readiness.d.cts +84 -0
  659. package/dist/schemas/readiness.d.cts.map +1 -0
  660. package/dist/schemas/readiness.d.mts +84 -0
  661. package/dist/schemas/readiness.d.mts.map +1 -0
  662. package/dist/schemas/readiness.mjs +246 -0
  663. package/dist/schemas/readiness.mjs.map +1 -0
  664. package/dist/schemas/relaunchHandoff.cjs +47 -0
  665. package/dist/schemas/relaunchHandoff.cjs.map +1 -0
  666. package/dist/schemas/relaunchHandoff.d.cts +25 -0
  667. package/dist/schemas/relaunchHandoff.d.cts.map +1 -0
  668. package/dist/schemas/relaunchHandoff.d.mts +25 -0
  669. package/dist/schemas/relaunchHandoff.d.mts.map +1 -0
  670. package/dist/schemas/relaunchHandoff.mjs +44 -0
  671. package/dist/schemas/relaunchHandoff.mjs.map +1 -0
  672. package/dist/schemas/remoteApiContracts.cjs +307 -0
  673. package/dist/schemas/remoteApiContracts.cjs.map +1 -0
  674. package/dist/schemas/remoteApiContracts.mjs +303 -0
  675. package/dist/schemas/remoteApiContracts.mjs.map +1 -0
  676. package/dist/schemas/sandboxHarness.cjs +29 -0
  677. package/dist/schemas/sandboxHarness.cjs.map +1 -0
  678. package/dist/schemas/sandboxHarness.d.cts +39 -0
  679. package/dist/schemas/sandboxHarness.d.cts.map +1 -0
  680. package/dist/schemas/sandboxHarness.d.mts +39 -0
  681. package/dist/schemas/sandboxHarness.d.mts.map +1 -0
  682. package/dist/schemas/sandboxHarness.mjs +26 -0
  683. package/dist/schemas/sandboxHarness.mjs.map +1 -0
  684. package/dist/schemas/serverBundle.cjs +79 -0
  685. package/dist/schemas/serverBundle.cjs.map +1 -0
  686. package/dist/schemas/serverBundle.d.cts +34 -0
  687. package/dist/schemas/serverBundle.d.cts.map +1 -0
  688. package/dist/schemas/serverBundle.d.mts +34 -0
  689. package/dist/schemas/serverBundle.d.mts.map +1 -0
  690. package/dist/schemas/serverBundle.mjs +77 -0
  691. package/dist/schemas/serverBundle.mjs.map +1 -0
  692. package/dist/schemas/serverFacet.cjs +102 -0
  693. package/dist/schemas/serverFacet.cjs.map +1 -0
  694. package/dist/schemas/serverFacet.d.cts +141 -0
  695. package/dist/schemas/serverFacet.d.cts.map +1 -0
  696. package/dist/schemas/serverFacet.d.mts +141 -0
  697. package/dist/schemas/serverFacet.d.mts.map +1 -0
  698. package/dist/schemas/serverFacet.mjs +93 -0
  699. package/dist/schemas/serverFacet.mjs.map +1 -0
  700. package/dist/schemas/sessionApiContracts.cjs +474 -0
  701. package/dist/schemas/sessionApiContracts.cjs.map +1 -0
  702. package/dist/schemas/sessionApiContracts.d.cts +563 -0
  703. package/dist/schemas/sessionApiContracts.d.cts.map +1 -0
  704. package/dist/schemas/sessionApiContracts.d.mts +563 -0
  705. package/dist/schemas/sessionApiContracts.d.mts.map +1 -0
  706. package/dist/schemas/sessionApiContracts.mjs +472 -0
  707. package/dist/schemas/sessionApiContracts.mjs.map +1 -0
  708. package/dist/schemas/sessionProtocol.cjs +17 -0
  709. package/dist/schemas/sessionProtocol.cjs.map +1 -0
  710. package/dist/schemas/sessionProtocol.d.cts +269 -0
  711. package/dist/schemas/sessionProtocol.d.cts.map +1 -0
  712. package/dist/schemas/sessionProtocol.d.mts +269 -0
  713. package/dist/schemas/sessionProtocol.d.mts.map +1 -0
  714. package/dist/schemas/sessionProtocol.mjs +12 -0
  715. package/dist/schemas/sessionProtocol.mjs.map +1 -0
  716. package/dist/schemas/sessionUpdates.d.cts +34 -0
  717. package/dist/schemas/sessionUpdates.d.cts.map +1 -0
  718. package/dist/schemas/sessionUpdates.d.mts +34 -0
  719. package/dist/schemas/sessionUpdates.d.mts.map +1 -0
  720. package/dist/schemas/skills.cjs +115 -0
  721. package/dist/schemas/skills.cjs.map +1 -0
  722. package/dist/schemas/skills.d.cts +65 -0
  723. package/dist/schemas/skills.d.cts.map +1 -0
  724. package/dist/schemas/skills.d.mts +65 -0
  725. package/dist/schemas/skills.d.mts.map +1 -0
  726. package/dist/schemas/skills.mjs +109 -0
  727. package/dist/schemas/skills.mjs.map +1 -0
  728. package/dist/schemas/toolOverrides.cjs +17 -0
  729. package/dist/schemas/toolOverrides.cjs.map +1 -0
  730. package/dist/schemas/toolOverrides.d.cts +29 -0
  731. package/dist/schemas/toolOverrides.d.cts.map +1 -0
  732. package/dist/schemas/toolOverrides.d.mts +29 -0
  733. package/dist/schemas/toolOverrides.d.mts.map +1 -0
  734. package/dist/schemas/toolOverrides.mjs +15 -0
  735. package/dist/schemas/toolOverrides.mjs.map +1 -0
  736. package/dist/schemas/toolSurface.cjs +17 -0
  737. package/dist/schemas/toolSurface.cjs.map +1 -0
  738. package/dist/schemas/toolSurface.d.cts +54 -0
  739. package/dist/schemas/toolSurface.d.cts.map +1 -0
  740. package/dist/schemas/toolSurface.d.mts +54 -0
  741. package/dist/schemas/toolSurface.d.mts.map +1 -0
  742. package/dist/schemas/toolSurface.mjs +15 -0
  743. package/dist/schemas/toolSurface.mjs.map +1 -0
  744. package/dist/schemas/transportApiContracts.cjs +248 -0
  745. package/dist/schemas/transportApiContracts.cjs.map +1 -0
  746. package/dist/schemas/transportApiContracts.d.cts +205 -0
  747. package/dist/schemas/transportApiContracts.d.cts.map +1 -0
  748. package/dist/schemas/transportApiContracts.d.mts +205 -0
  749. package/dist/schemas/transportApiContracts.d.mts.map +1 -0
  750. package/dist/schemas/transportApiContracts.mjs +242 -0
  751. package/dist/schemas/transportApiContracts.mjs.map +1 -0
  752. package/dist/schemas/uiHub.cjs +17 -0
  753. package/dist/schemas/uiHub.cjs.map +1 -0
  754. package/dist/schemas/uiHub.d.cts +23 -0
  755. package/dist/schemas/uiHub.d.cts.map +1 -0
  756. package/dist/schemas/uiHub.d.mts +23 -0
  757. package/dist/schemas/uiHub.d.mts.map +1 -0
  758. package/dist/schemas/uiHub.mjs +15 -0
  759. package/dist/schemas/uiHub.mjs.map +1 -0
  760. package/dist/schemas/voiceReloadHandoff.cjs +78 -0
  761. package/dist/schemas/voiceReloadHandoff.cjs.map +1 -0
  762. package/dist/schemas/voiceReloadHandoff.d.cts +31 -0
  763. package/dist/schemas/voiceReloadHandoff.d.cts.map +1 -0
  764. package/dist/schemas/voiceReloadHandoff.d.mts +31 -0
  765. package/dist/schemas/voiceReloadHandoff.d.mts.map +1 -0
  766. package/dist/schemas/voiceReloadHandoff.mjs +75 -0
  767. package/dist/schemas/voiceReloadHandoff.mjs.map +1 -0
  768. package/dist/schemas/voiceTools.cjs +205 -0
  769. package/dist/schemas/voiceTools.cjs.map +1 -0
  770. package/dist/schemas/voiceTools.d.cts +120 -0
  771. package/dist/schemas/voiceTools.d.cts.map +1 -0
  772. package/dist/schemas/voiceTools.d.mts +120 -0
  773. package/dist/schemas/voiceTools.d.mts.map +1 -0
  774. package/dist/schemas/voiceTools.mjs +194 -0
  775. package/dist/schemas/voiceTools.mjs.map +1 -0
  776. package/dist/server/directHarnessRuntime.cjs +981 -0
  777. package/dist/server/directHarnessRuntime.cjs.map +1 -0
  778. package/dist/server/directHarnessRuntime.d.cts +3 -0
  779. package/dist/server/directHarnessRuntime.d.mts +3 -0
  780. package/dist/server/directHarnessRuntime.mjs +976 -0
  781. package/dist/server/directHarnessRuntime.mjs.map +1 -0
  782. package/dist/server/headlessProtocol.cjs +233 -0
  783. package/dist/server/headlessProtocol.cjs.map +1 -0
  784. package/dist/server/headlessProtocol.mjs +233 -0
  785. package/dist/server/headlessProtocol.mjs.map +1 -0
  786. package/dist/server/jsonlTranscriptReader.cjs +85 -0
  787. package/dist/server/jsonlTranscriptReader.cjs.map +1 -0
  788. package/dist/server/jsonlTranscriptReader.mjs +83 -0
  789. package/dist/server/jsonlTranscriptReader.mjs.map +1 -0
  790. package/dist/server/nativeChildTranscriptReader.cjs +20 -0
  791. package/dist/server/nativeChildTranscriptReader.cjs.map +1 -0
  792. package/dist/server/nativeChildTranscriptReader.mjs +18 -0
  793. package/dist/server/nativeChildTranscriptReader.mjs.map +1 -0
  794. package/dist/server/remoteRoutes.cjs +386 -0
  795. package/dist/server/remoteRoutes.cjs.map +1 -0
  796. package/dist/server/remoteRoutes.mjs +386 -0
  797. package/dist/server/remoteRoutes.mjs.map +1 -0
  798. package/dist/server/serverFacetLoader.cjs +220 -0
  799. package/dist/server/serverFacetLoader.cjs.map +1 -0
  800. package/dist/server/serverFacetLoader.d.cts +77 -0
  801. package/dist/server/serverFacetLoader.d.cts.map +1 -0
  802. package/dist/server/serverFacetLoader.d.mts +77 -0
  803. package/dist/server/serverFacetLoader.d.mts.map +1 -0
  804. package/dist/server/serverFacetLoader.mjs +215 -0
  805. package/dist/server/serverFacetLoader.mjs.map +1 -0
  806. package/dist/server/threadJournals.cjs +172 -0
  807. package/dist/server/threadJournals.cjs.map +1 -0
  808. package/dist/server/threadJournals.mjs +169 -0
  809. package/dist/server/threadJournals.mjs.map +1 -0
  810. package/dist/server-facet.cjs +27 -0
  811. package/dist/server-facet.d.cts +7 -0
  812. package/dist/server-facet.d.mts +7 -0
  813. package/dist/server-facet.mjs +7 -0
  814. package/dist/server-telemetry.cjs +25 -0
  815. package/dist/server-telemetry.cjs.map +1 -0
  816. package/dist/server-telemetry.d.cts +12 -0
  817. package/dist/server-telemetry.d.cts.map +1 -0
  818. package/dist/server-telemetry.d.mts +12 -0
  819. package/dist/server-telemetry.d.mts.map +1 -0
  820. package/dist/server-telemetry.mjs +23 -0
  821. package/dist/server-telemetry.mjs.map +1 -0
  822. package/dist/server.cjs +17 -0
  823. package/dist/server.d.cts +10 -0
  824. package/dist/server.d.mts +10 -0
  825. package/dist/server.mjs +7 -0
  826. package/dist/services/acpSessionUpdates/index.cjs +129 -0
  827. package/dist/services/acpSessionUpdates/index.cjs.map +1 -0
  828. package/dist/services/acpSessionUpdates/index.mjs +129 -0
  829. package/dist/services/acpSessionUpdates/index.mjs.map +1 -0
  830. package/dist/services/apiContracts/index.cjs +267 -0
  831. package/dist/services/apiContracts/index.cjs.map +1 -0
  832. package/dist/services/apiContracts/index.d.cts +42 -0
  833. package/dist/services/apiContracts/index.d.cts.map +1 -0
  834. package/dist/services/apiContracts/index.d.mts +42 -0
  835. package/dist/services/apiContracts/index.d.mts.map +1 -0
  836. package/dist/services/apiContracts/index.mjs +266 -0
  837. package/dist/services/apiContracts/index.mjs.map +1 -0
  838. package/dist/services/bundlePublication/index.cjs +88 -0
  839. package/dist/services/bundlePublication/index.cjs.map +1 -0
  840. package/dist/services/bundlePublication/index.mjs +85 -0
  841. package/dist/services/bundlePublication/index.mjs.map +1 -0
  842. package/dist/services/contextApiUrls/index.cjs +15 -0
  843. package/dist/services/contextApiUrls/index.cjs.map +1 -0
  844. package/dist/services/contextApiUrls/index.d.cts +6 -0
  845. package/dist/services/contextApiUrls/index.d.cts.map +1 -0
  846. package/dist/services/contextApiUrls/index.d.mts +6 -0
  847. package/dist/services/contextApiUrls/index.d.mts.map +1 -0
  848. package/dist/services/contextApiUrls/index.mjs +15 -0
  849. package/dist/services/contextApiUrls/index.mjs.map +1 -0
  850. package/dist/services/contextContributions/index.cjs +79 -0
  851. package/dist/services/contextContributions/index.cjs.map +1 -0
  852. package/dist/services/contextContributions/index.d.cts +6 -0
  853. package/dist/services/contextContributions/index.d.cts.map +1 -0
  854. package/dist/services/contextContributions/index.d.mts +6 -0
  855. package/dist/services/contextContributions/index.d.mts.map +1 -0
  856. package/dist/services/contextContributions/index.mjs +79 -0
  857. package/dist/services/contextContributions/index.mjs.map +1 -0
  858. package/dist/services/deviceAuth/index.cjs +125 -0
  859. package/dist/services/deviceAuth/index.cjs.map +1 -0
  860. package/dist/services/deviceAuth/index.d.cts +9 -0
  861. package/dist/services/deviceAuth/index.d.cts.map +1 -0
  862. package/dist/services/deviceAuth/index.d.mts +9 -0
  863. package/dist/services/deviceAuth/index.d.mts.map +1 -0
  864. package/dist/services/deviceAuth/index.mjs +125 -0
  865. package/dist/services/deviceAuth/index.mjs.map +1 -0
  866. package/dist/services/deviceSessions/index.cjs +147 -0
  867. package/dist/services/deviceSessions/index.cjs.map +1 -0
  868. package/dist/services/deviceSessions/index.d.cts +15 -0
  869. package/dist/services/deviceSessions/index.d.cts.map +1 -0
  870. package/dist/services/deviceSessions/index.d.mts +15 -0
  871. package/dist/services/deviceSessions/index.d.mts.map +1 -0
  872. package/dist/services/deviceSessions/index.mjs +141 -0
  873. package/dist/services/deviceSessions/index.mjs.map +1 -0
  874. package/dist/services/headlessClient/index.cjs +117 -0
  875. package/dist/services/headlessClient/index.cjs.map +1 -0
  876. package/dist/services/headlessClient/index.mjs +117 -0
  877. package/dist/services/headlessClient/index.mjs.map +1 -0
  878. package/dist/services/historyCreationFileSystem/index.cjs +114 -0
  879. package/dist/services/historyCreationFileSystem/index.cjs.map +1 -0
  880. package/dist/services/historyCreationFileSystem/index.mjs +114 -0
  881. package/dist/services/historyCreationFileSystem/index.mjs.map +1 -0
  882. package/dist/services/hubChannelHarness/index.cjs +50 -0
  883. package/dist/services/hubChannelHarness/index.cjs.map +1 -0
  884. package/dist/services/hubChannelHarness/index.d.cts +17 -0
  885. package/dist/services/hubChannelHarness/index.d.cts.map +1 -0
  886. package/dist/services/hubChannelHarness/index.d.mts +17 -0
  887. package/dist/services/hubChannelHarness/index.d.mts.map +1 -0
  888. package/dist/services/hubChannelHarness/index.mjs +50 -0
  889. package/dist/services/hubChannelHarness/index.mjs.map +1 -0
  890. package/dist/services/kernel/index.cjs +147 -0
  891. package/dist/services/kernel/index.cjs.map +1 -0
  892. package/dist/services/kernel/index.d.cts +9 -0
  893. package/dist/services/kernel/index.d.cts.map +1 -0
  894. package/dist/services/kernel/index.d.mts +9 -0
  895. package/dist/services/kernel/index.d.mts.map +1 -0
  896. package/dist/services/kernel/index.mjs +147 -0
  897. package/dist/services/kernel/index.mjs.map +1 -0
  898. package/dist/services/loginFlow/index.cjs +131 -0
  899. package/dist/services/loginFlow/index.cjs.map +1 -0
  900. package/dist/services/loginFlow/index.mjs +131 -0
  901. package/dist/services/loginFlow/index.mjs.map +1 -0
  902. package/dist/services/packageApiHarness/index.cjs +36 -0
  903. package/dist/services/packageApiHarness/index.cjs.map +1 -0
  904. package/dist/services/packageApiHarness/index.d.cts +40 -0
  905. package/dist/services/packageApiHarness/index.d.cts.map +1 -0
  906. package/dist/services/packageApiHarness/index.d.mts +40 -0
  907. package/dist/services/packageApiHarness/index.d.mts.map +1 -0
  908. package/dist/services/packageApiHarness/index.mjs +36 -0
  909. package/dist/services/packageApiHarness/index.mjs.map +1 -0
  910. package/dist/services/pairingFlow/index.cjs +145 -0
  911. package/dist/services/pairingFlow/index.cjs.map +1 -0
  912. package/dist/services/pairingFlow/index.d.cts +44 -0
  913. package/dist/services/pairingFlow/index.d.cts.map +1 -0
  914. package/dist/services/pairingFlow/index.d.mts +44 -0
  915. package/dist/services/pairingFlow/index.d.mts.map +1 -0
  916. package/dist/services/pairingFlow/index.mjs +145 -0
  917. package/dist/services/pairingFlow/index.mjs.map +1 -0
  918. package/dist/services/pairingPage/index.cjs +450 -0
  919. package/dist/services/pairingPage/index.cjs.map +1 -0
  920. package/dist/services/pairingPage/index.mjs +447 -0
  921. package/dist/services/pairingPage/index.mjs.map +1 -0
  922. package/dist/services/pluginLifecycle/index.cjs +71 -0
  923. package/dist/services/pluginLifecycle/index.cjs.map +1 -0
  924. package/dist/services/pluginLifecycle/index.d.cts +11 -0
  925. package/dist/services/pluginLifecycle/index.d.cts.map +1 -0
  926. package/dist/services/pluginLifecycle/index.d.mts +11 -0
  927. package/dist/services/pluginLifecycle/index.d.mts.map +1 -0
  928. package/dist/services/pluginLifecycle/index.mjs +71 -0
  929. package/dist/services/pluginLifecycle/index.mjs.map +1 -0
  930. package/dist/services/providerAuth/index.cjs +156 -0
  931. package/dist/services/providerAuth/index.cjs.map +1 -0
  932. package/dist/services/providerAuth/index.mjs +154 -0
  933. package/dist/services/providerAuth/index.mjs.map +1 -0
  934. package/dist/services/remoteAccess/index.cjs +393 -0
  935. package/dist/services/remoteAccess/index.cjs.map +1 -0
  936. package/dist/services/remoteAccess/index.d.cts +79 -0
  937. package/dist/services/remoteAccess/index.d.cts.map +1 -0
  938. package/dist/services/remoteAccess/index.d.mts +79 -0
  939. package/dist/services/remoteAccess/index.d.mts.map +1 -0
  940. package/dist/services/remoteAccess/index.mjs +393 -0
  941. package/dist/services/remoteAccess/index.mjs.map +1 -0
  942. package/dist/services/remoteAccessSettings/index.cjs +151 -0
  943. package/dist/services/remoteAccessSettings/index.cjs.map +1 -0
  944. package/dist/services/remoteAccessSettings/index.mjs +149 -0
  945. package/dist/services/remoteAccessSettings/index.mjs.map +1 -0
  946. package/dist/services/remoteAccessStore/index.cjs +126 -0
  947. package/dist/services/remoteAccessStore/index.cjs.map +1 -0
  948. package/dist/services/remoteAccessStore/index.mjs +121 -0
  949. package/dist/services/remoteAccessStore/index.mjs.map +1 -0
  950. package/dist/services/remoteGuardPolicy/index.cjs +190 -0
  951. package/dist/services/remoteGuardPolicy/index.cjs.map +1 -0
  952. package/dist/services/remoteGuardPolicy/index.d.cts +7 -0
  953. package/dist/services/remoteGuardPolicy/index.d.cts.map +1 -0
  954. package/dist/services/remoteGuardPolicy/index.d.mts +7 -0
  955. package/dist/services/remoteGuardPolicy/index.d.mts.map +1 -0
  956. package/dist/services/remoteGuardPolicy/index.mjs +186 -0
  957. package/dist/services/remoteGuardPolicy/index.mjs.map +1 -0
  958. package/dist/services/rpcTranscript/index.cjs +590 -0
  959. package/dist/services/rpcTranscript/index.cjs.map +1 -0
  960. package/dist/services/rpcTranscript/index.d.cts +50 -0
  961. package/dist/services/rpcTranscript/index.d.cts.map +1 -0
  962. package/dist/services/rpcTranscript/index.d.mts +50 -0
  963. package/dist/services/rpcTranscript/index.d.mts.map +1 -0
  964. package/dist/services/rpcTranscript/index.mjs +589 -0
  965. package/dist/services/rpcTranscript/index.mjs.map +1 -0
  966. package/dist/services/serverFacet/index.cjs +197 -0
  967. package/dist/services/serverFacet/index.cjs.map +1 -0
  968. package/dist/services/serverFacet/index.d.cts +31 -0
  969. package/dist/services/serverFacet/index.d.cts.map +1 -0
  970. package/dist/services/serverFacet/index.d.mts +31 -0
  971. package/dist/services/serverFacet/index.d.mts.map +1 -0
  972. package/dist/services/serverFacet/index.mjs +197 -0
  973. package/dist/services/serverFacet/index.mjs.map +1 -0
  974. package/dist/services/sessionPresentation/index.cjs +117 -0
  975. package/dist/services/sessionPresentation/index.cjs.map +1 -0
  976. package/dist/services/sessionPresentation/index.mjs +117 -0
  977. package/dist/services/sessionPresentation/index.mjs.map +1 -0
  978. package/dist/services/sqliteSessionHistory/index.cjs +59 -0
  979. package/dist/services/sqliteSessionHistory/index.cjs.map +1 -0
  980. package/dist/services/sqliteSessionHistory/index.d.cts +13 -0
  981. package/dist/services/sqliteSessionHistory/index.d.cts.map +1 -0
  982. package/dist/services/sqliteSessionHistory/index.d.mts +13 -0
  983. package/dist/services/sqliteSessionHistory/index.d.mts.map +1 -0
  984. package/dist/services/sqliteSessionHistory/index.mjs +57 -0
  985. package/dist/services/sqliteSessionHistory/index.mjs.map +1 -0
  986. package/dist/services/sqliteTranscriptReader/index.cjs +49 -0
  987. package/dist/services/sqliteTranscriptReader/index.cjs.map +1 -0
  988. package/dist/services/sqliteTranscriptReader/index.mjs +47 -0
  989. package/dist/services/sqliteTranscriptReader/index.mjs.map +1 -0
  990. package/dist/services/toolCost/index.cjs +47 -0
  991. package/dist/services/toolCost/index.cjs.map +1 -0
  992. package/dist/services/toolCost/index.d.cts +38 -0
  993. package/dist/services/toolCost/index.d.cts.map +1 -0
  994. package/dist/services/toolCost/index.d.mts +38 -0
  995. package/dist/services/toolCost/index.d.mts.map +1 -0
  996. package/dist/services/toolCost/index.mjs +46 -0
  997. package/dist/services/toolCost/index.mjs.map +1 -0
  998. package/dist/services/toolOverrides/index.cjs +45 -0
  999. package/dist/services/toolOverrides/index.cjs.map +1 -0
  1000. package/dist/services/toolOverrides/index.d.cts +6 -0
  1001. package/dist/services/toolOverrides/index.d.cts.map +1 -0
  1002. package/dist/services/toolOverrides/index.d.mts +6 -0
  1003. package/dist/services/toolOverrides/index.d.mts.map +1 -0
  1004. package/dist/services/toolOverrides/index.mjs +45 -0
  1005. package/dist/services/toolOverrides/index.mjs.map +1 -0
  1006. package/dist/services/toolSurface/index.cjs +105 -0
  1007. package/dist/services/toolSurface/index.cjs.map +1 -0
  1008. package/dist/services/toolSurface/index.d.cts +19 -0
  1009. package/dist/services/toolSurface/index.d.cts.map +1 -0
  1010. package/dist/services/toolSurface/index.d.mts +19 -0
  1011. package/dist/services/toolSurface/index.d.mts.map +1 -0
  1012. package/dist/services/toolSurface/index.mjs +105 -0
  1013. package/dist/services/toolSurface/index.mjs.map +1 -0
  1014. package/dist/services/traceContext/index.cjs +13 -0
  1015. package/dist/services/traceContext/index.cjs.map +1 -0
  1016. package/dist/services/traceContext/index.mjs +13 -0
  1017. package/dist/services/traceContext/index.mjs.map +1 -0
  1018. package/dist/services/transcriptPages/index.cjs +74 -0
  1019. package/dist/services/transcriptPages/index.cjs.map +1 -0
  1020. package/dist/services/transcriptPages/index.mjs +73 -0
  1021. package/dist/services/transcriptPages/index.mjs.map +1 -0
  1022. package/dist/services/tunnelOutput/index.cjs +58 -0
  1023. package/dist/services/tunnelOutput/index.cjs.map +1 -0
  1024. package/dist/services/tunnelOutput/index.mjs +54 -0
  1025. package/dist/services/tunnelOutput/index.mjs.map +1 -0
  1026. package/dist/services/tunnelProcess/index.cjs +486 -0
  1027. package/dist/services/tunnelProcess/index.cjs.map +1 -0
  1028. package/dist/services/tunnelProcess/index.mjs +480 -0
  1029. package/dist/services/tunnelProcess/index.mjs.map +1 -0
  1030. package/dist/services/voiceReloadHandoff/index.cjs +136 -0
  1031. package/dist/services/voiceReloadHandoff/index.cjs.map +1 -0
  1032. package/dist/services/voiceReloadHandoff/index.d.cts +34 -0
  1033. package/dist/services/voiceReloadHandoff/index.d.cts.map +1 -0
  1034. package/dist/services/voiceReloadHandoff/index.d.mts +34 -0
  1035. package/dist/services/voiceReloadHandoff/index.d.mts.map +1 -0
  1036. package/dist/services/voiceReloadHandoff/index.mjs +135 -0
  1037. package/dist/services/voiceReloadHandoff/index.mjs.map +1 -0
  1038. package/dist/services/voiceToolsContract/index.cjs +26 -0
  1039. package/dist/services/voiceToolsContract/index.cjs.map +1 -0
  1040. package/dist/services/voiceToolsContract/index.d.cts +76 -0
  1041. package/dist/services/voiceToolsContract/index.d.cts.map +1 -0
  1042. package/dist/services/voiceToolsContract/index.d.mts +76 -0
  1043. package/dist/services/voiceToolsContract/index.d.mts.map +1 -0
  1044. package/dist/services/voiceToolsContract/index.mjs +24 -0
  1045. package/dist/services/voiceToolsContract/index.mjs.map +1 -0
  1046. package/dist/services/webauthn/index.cjs +262 -0
  1047. package/dist/services/webauthn/index.cjs.map +1 -0
  1048. package/dist/services/webauthn/index.d.cts +39 -0
  1049. package/dist/services/webauthn/index.d.cts.map +1 -0
  1050. package/dist/services/webauthn/index.d.mts +39 -0
  1051. package/dist/services/webauthn/index.d.mts.map +1 -0
  1052. package/dist/services/webauthn/index.mjs +262 -0
  1053. package/dist/services/webauthn/index.mjs.map +1 -0
  1054. package/dist/services/webauthnPolicy/index.cjs +178 -0
  1055. package/dist/services/webauthnPolicy/index.cjs.map +1 -0
  1056. package/dist/services/webauthnPolicy/index.d.cts +41 -0
  1057. package/dist/services/webauthnPolicy/index.d.cts.map +1 -0
  1058. package/dist/services/webauthnPolicy/index.d.mts +41 -0
  1059. package/dist/services/webauthnPolicy/index.d.mts.map +1 -0
  1060. package/dist/services/webauthnPolicy/index.mjs +171 -0
  1061. package/dist/services/webauthnPolicy/index.mjs.map +1 -0
  1062. package/dist/session-files-api.cjs +61 -0
  1063. package/dist/session-files-api.cjs.map +1 -0
  1064. package/dist/session-files-api.d.cts +7 -0
  1065. package/dist/session-files-api.d.cts.map +1 -0
  1066. package/dist/session-files-api.d.mts +7 -0
  1067. package/dist/session-files-api.d.mts.map +1 -0
  1068. package/dist/session-files-api.mjs +57 -0
  1069. package/dist/session-files-api.mjs.map +1 -0
  1070. package/dist/session-protocol.cjs +8 -0
  1071. package/dist/session-protocol.d.cts +3 -0
  1072. package/dist/session-protocol.d.mts +3 -0
  1073. package/dist/session-protocol.mjs +2 -0
  1074. package/dist/skills.cjs +9 -0
  1075. package/dist/skills.d.cts +2 -0
  1076. package/dist/skills.d.mts +2 -0
  1077. package/dist/skills.mjs +2 -0
  1078. package/dist/sqlite-history-import.cjs +151 -0
  1079. package/dist/sqlite-history-import.cjs.map +1 -0
  1080. package/dist/sqlite-history-import.d.cts +8 -0
  1081. package/dist/sqlite-history-import.d.cts.map +1 -0
  1082. package/dist/sqlite-history-import.d.mts +8 -0
  1083. package/dist/sqlite-history-import.d.mts.map +1 -0
  1084. package/dist/sqlite-history-import.mjs +146 -0
  1085. package/dist/sqlite-history-import.mjs.map +1 -0
  1086. package/dist/sqlite-session-storage.cjs +53 -0
  1087. package/dist/sqlite-session-storage.cjs.map +1 -0
  1088. package/dist/sqlite-session-storage.d.cts +7 -0
  1089. package/dist/sqlite-session-storage.d.cts.map +1 -0
  1090. package/dist/sqlite-session-storage.d.mts +7 -0
  1091. package/dist/sqlite-session-storage.d.mts.map +1 -0
  1092. package/dist/sqlite-session-storage.mjs +49 -0
  1093. package/dist/sqlite-session-storage.mjs.map +1 -0
  1094. package/dist/sync-location.cjs +209 -0
  1095. package/dist/sync-location.cjs.map +1 -0
  1096. package/dist/sync-location.d.cts +31 -0
  1097. package/dist/sync-location.d.cts.map +1 -0
  1098. package/dist/sync-location.d.mts +31 -0
  1099. package/dist/sync-location.d.mts.map +1 -0
  1100. package/dist/sync-location.mjs +199 -0
  1101. package/dist/sync-location.mjs.map +1 -0
  1102. package/dist/sync-registration.cjs +140 -0
  1103. package/dist/sync-registration.cjs.map +1 -0
  1104. package/dist/sync-registration.d.cts +38 -0
  1105. package/dist/sync-registration.d.cts.map +1 -0
  1106. package/dist/sync-registration.d.mts +38 -0
  1107. package/dist/sync-registration.d.mts.map +1 -0
  1108. package/dist/sync-registration.mjs +131 -0
  1109. package/dist/sync-registration.mjs.map +1 -0
  1110. package/dist/sync-state-contract.cjs +19 -0
  1111. package/dist/sync-state-contract.cjs.map +1 -0
  1112. package/dist/sync-state-contract.d.cts +14 -0
  1113. package/dist/sync-state-contract.d.cts.map +1 -0
  1114. package/dist/sync-state-contract.d.mts +14 -0
  1115. package/dist/sync-state-contract.d.mts.map +1 -0
  1116. package/dist/sync-state-contract.mjs +16 -0
  1117. package/dist/sync-state-contract.mjs.map +1 -0
  1118. package/dist/systems/child/adapters/headlessChildSessionService.cjs +210 -0
  1119. package/dist/systems/child/adapters/headlessChildSessionService.cjs.map +1 -0
  1120. package/dist/systems/child/adapters/headlessChildSessionService.d.cts +24 -0
  1121. package/dist/systems/child/adapters/headlessChildSessionService.d.cts.map +1 -0
  1122. package/dist/systems/child/adapters/headlessChildSessionService.d.mts +24 -0
  1123. package/dist/systems/child/adapters/headlessChildSessionService.d.mts.map +1 -0
  1124. package/dist/systems/child/adapters/headlessChildSessionService.mjs +205 -0
  1125. package/dist/systems/child/adapters/headlessChildSessionService.mjs.map +1 -0
  1126. package/dist/systems/child/adapters/nativeChildRuntimes.cjs +28 -0
  1127. package/dist/systems/child/adapters/nativeChildRuntimes.cjs.map +1 -0
  1128. package/dist/systems/child/adapters/nativeChildRuntimes.mjs +25 -0
  1129. package/dist/systems/child/adapters/nativeChildRuntimes.mjs.map +1 -0
  1130. package/dist/systems/child/services/childSession/index.cjs +206 -0
  1131. package/dist/systems/child/services/childSession/index.cjs.map +1 -0
  1132. package/dist/systems/child/services/childSession/index.d.cts +14 -0
  1133. package/dist/systems/child/services/childSession/index.d.cts.map +1 -0
  1134. package/dist/systems/child/services/childSession/index.d.mts +14 -0
  1135. package/dist/systems/child/services/childSession/index.d.mts.map +1 -0
  1136. package/dist/systems/child/services/childSession/index.mjs +206 -0
  1137. package/dist/systems/child/services/childSession/index.mjs.map +1 -0
  1138. package/dist/systems/child/types/childSession.cjs +16 -0
  1139. package/dist/systems/child/types/childSession.cjs.map +1 -0
  1140. package/dist/systems/child/types/childSession.d.cts +135 -0
  1141. package/dist/systems/child/types/childSession.d.cts.map +1 -0
  1142. package/dist/systems/child/types/childSession.d.mts +135 -0
  1143. package/dist/systems/child/types/childSession.d.mts.map +1 -0
  1144. package/dist/systems/child/types/childSession.mjs +14 -0
  1145. package/dist/systems/child/types/childSession.mjs.map +1 -0
  1146. package/dist/systems/main/adapters/headlessHost.cjs +436 -0
  1147. package/dist/systems/main/adapters/headlessHost.cjs.map +1 -0
  1148. package/dist/systems/main/adapters/headlessHost.d.cts +72 -0
  1149. package/dist/systems/main/adapters/headlessHost.d.cts.map +1 -0
  1150. package/dist/systems/main/adapters/headlessHost.d.mts +72 -0
  1151. package/dist/systems/main/adapters/headlessHost.d.mts.map +1 -0
  1152. package/dist/systems/main/adapters/headlessHost.mjs +435 -0
  1153. package/dist/systems/main/adapters/headlessHost.mjs.map +1 -0
  1154. package/dist/systems/main/adapters/headlessSessionHost.cjs +653 -0
  1155. package/dist/systems/main/adapters/headlessSessionHost.cjs.map +1 -0
  1156. package/dist/systems/main/adapters/headlessSessionHost.d.cts +14 -0
  1157. package/dist/systems/main/adapters/headlessSessionHost.d.cts.map +1 -0
  1158. package/dist/systems/main/adapters/headlessSessionHost.d.mts +14 -0
  1159. package/dist/systems/main/adapters/headlessSessionHost.d.mts.map +1 -0
  1160. package/dist/systems/main/adapters/headlessSessionHost.mjs +649 -0
  1161. package/dist/systems/main/adapters/headlessSessionHost.mjs.map +1 -0
  1162. package/dist/systems/main/types/headlessHost.d.cts +36 -0
  1163. package/dist/systems/main/types/headlessHost.d.cts.map +1 -0
  1164. package/dist/systems/main/types/headlessHost.d.mts +36 -0
  1165. package/dist/systems/main/types/headlessHost.d.mts.map +1 -0
  1166. package/dist/terminal-pi-child-session-service.cjs +263 -0
  1167. package/dist/terminal-pi-child-session-service.cjs.map +1 -0
  1168. package/dist/terminal-pi-child-session-service.d.cts +36 -0
  1169. package/dist/terminal-pi-child-session-service.d.cts.map +1 -0
  1170. package/dist/terminal-pi-child-session-service.d.mts +36 -0
  1171. package/dist/terminal-pi-child-session-service.d.mts.map +1 -0
  1172. package/dist/terminal-pi-child-session-service.mjs +256 -0
  1173. package/dist/terminal-pi-child-session-service.mjs.map +1 -0
  1174. package/dist/testing/pi/extensionScenarios.cjs +73 -0
  1175. package/dist/testing/pi/extensionScenarios.cjs.map +1 -0
  1176. package/dist/testing/pi/extensionScenarios.d.cts +41 -0
  1177. package/dist/testing/pi/extensionScenarios.d.cts.map +1 -0
  1178. package/dist/testing/pi/extensionScenarios.d.mts +41 -0
  1179. package/dist/testing/pi/extensionScenarios.d.mts.map +1 -0
  1180. package/dist/testing/pi/extensionScenarios.mjs +73 -0
  1181. package/dist/testing/pi/extensionScenarios.mjs.map +1 -0
  1182. package/dist/testing/pi/testHost.cjs +365 -0
  1183. package/dist/testing/pi/testHost.cjs.map +1 -0
  1184. package/dist/testing/pi/testHost.d.cts +160 -0
  1185. package/dist/testing/pi/testHost.d.cts.map +1 -0
  1186. package/dist/testing/pi/testHost.d.mts +160 -0
  1187. package/dist/testing/pi/testHost.d.mts.map +1 -0
  1188. package/dist/testing/pi/testHost.mjs +365 -0
  1189. package/dist/testing/pi/testHost.mjs.map +1 -0
  1190. package/dist/testing.cjs +9 -0
  1191. package/dist/testing.d.cts +5 -0
  1192. package/dist/testing.d.mts +5 -0
  1193. package/dist/testing.mjs +5 -0
  1194. package/dist/tool-inventory.cjs +136 -0
  1195. package/dist/tool-inventory.cjs.map +1 -0
  1196. package/dist/tool-inventory.d.cts +66 -0
  1197. package/dist/tool-inventory.d.cts.map +1 -0
  1198. package/dist/tool-inventory.d.mts +66 -0
  1199. package/dist/tool-inventory.d.mts.map +1 -0
  1200. package/dist/tool-inventory.mjs +133 -0
  1201. package/dist/tool-inventory.mjs.map +1 -0
  1202. package/dist/tool-names.cjs +4 -0
  1203. package/dist/tool-names.d.cts +2 -0
  1204. package/dist/tool-names.d.mts +2 -0
  1205. package/dist/tool-names.mjs +2 -0
  1206. package/dist/tool-overrides.cjs +7 -0
  1207. package/dist/tool-overrides.d.cts +3 -0
  1208. package/dist/tool-overrides.d.mts +3 -0
  1209. package/dist/tool-overrides.mjs +3 -0
  1210. package/dist/tool-surface.cjs +7 -0
  1211. package/dist/tool-surface.d.cts +3 -0
  1212. package/dist/tool-surface.d.mts +3 -0
  1213. package/dist/tool-surface.mjs +3 -0
  1214. package/dist/transition-classifier.cjs +112 -0
  1215. package/dist/transition-classifier.cjs.map +1 -0
  1216. package/dist/transition-classifier.d.cts +18 -0
  1217. package/dist/transition-classifier.d.cts.map +1 -0
  1218. package/dist/transition-classifier.d.mts +18 -0
  1219. package/dist/transition-classifier.d.mts.map +1 -0
  1220. package/dist/transition-classifier.mjs +111 -0
  1221. package/dist/transition-classifier.mjs.map +1 -0
  1222. package/dist/transition-coordinator.cjs +131 -0
  1223. package/dist/transition-coordinator.cjs.map +1 -0
  1224. package/dist/transition-coordinator.d.cts +16 -0
  1225. package/dist/transition-coordinator.d.cts.map +1 -0
  1226. package/dist/transition-coordinator.d.mts +16 -0
  1227. package/dist/transition-coordinator.d.mts.map +1 -0
  1228. package/dist/transition-coordinator.mjs +130 -0
  1229. package/dist/transition-coordinator.mjs.map +1 -0
  1230. package/dist/transition.cjs +5 -0
  1231. package/dist/transition.d.cts +2 -0
  1232. package/dist/transition.d.mts +2 -0
  1233. package/dist/transition.mjs +2 -0
  1234. package/dist/types/config.d.cts +20 -0
  1235. package/dist/types/config.d.cts.map +1 -0
  1236. package/dist/types/config.d.mts +20 -0
  1237. package/dist/types/config.d.mts.map +1 -0
  1238. package/dist/types/kernel.d.cts +69 -0
  1239. package/dist/types/kernel.d.cts.map +1 -0
  1240. package/dist/types/kernel.d.mts +69 -0
  1241. package/dist/types/kernel.d.mts.map +1 -0
  1242. package/dist/types/remote.d.cts +124 -0
  1243. package/dist/types/remote.d.cts.map +1 -0
  1244. package/dist/types/remote.d.mts +124 -0
  1245. package/dist/types/remote.d.mts.map +1 -0
  1246. package/dist/types/server/directHarnessRuntime.d.cts +156 -0
  1247. package/dist/types/server/directHarnessRuntime.d.cts.map +1 -0
  1248. package/dist/types/server/directHarnessRuntime.d.mts +156 -0
  1249. package/dist/types/server/directHarnessRuntime.d.mts.map +1 -0
  1250. package/dist/types/server/session.d.cts +5 -0
  1251. package/dist/types/server/session.d.cts.map +1 -0
  1252. package/dist/types/server/session.d.mts +5 -0
  1253. package/dist/types/server/session.d.mts.map +1 -0
  1254. package/dist/types-context-api.cjs +0 -0
  1255. package/dist/types-context-api.d.cts +48 -0
  1256. package/dist/types-context-api.d.cts.map +1 -0
  1257. package/dist/types-context-api.d.mts +48 -0
  1258. package/dist/types-context-api.d.mts.map +1 -0
  1259. package/dist/types-context-api.mjs +1 -0
  1260. package/dist/ui-hub.cjs +5 -0
  1261. package/dist/ui-hub.d.cts +2 -0
  1262. package/dist/ui-hub.d.mts +2 -0
  1263. package/dist/ui-hub.mjs +2 -0
  1264. package/dist/v3-export.cjs +1004 -0
  1265. package/dist/v3-export.cjs.map +1 -0
  1266. package/dist/v3-export.d.cts +34 -0
  1267. package/dist/v3-export.d.cts.map +1 -0
  1268. package/dist/v3-export.d.mts +34 -0
  1269. package/dist/v3-export.d.mts.map +1 -0
  1270. package/dist/v3-export.mjs +1000 -0
  1271. package/dist/v3-export.mjs.map +1 -0
  1272. package/dist/voice-reload-handoff.cjs +14 -0
  1273. package/dist/voice-reload-handoff.d.cts +4 -0
  1274. package/dist/voice-reload-handoff.d.mts +4 -0
  1275. package/dist/voice-reload-handoff.mjs +4 -0
  1276. package/dist/voice-tools.cjs +56 -0
  1277. package/dist/voice-tools.d.cts +4 -0
  1278. package/dist/voice-tools.d.mts +4 -0
  1279. package/dist/voice-tools.mjs +4 -0
  1280. package/dist/web/models/globalStore.cjs +23 -0
  1281. package/dist/web/models/globalStore.cjs.map +1 -0
  1282. package/dist/web/models/globalStore.d.cts +6 -0
  1283. package/dist/web/models/globalStore.d.cts.map +1 -0
  1284. package/dist/web/models/globalStore.d.mts +6 -0
  1285. package/dist/web/models/globalStore.d.mts.map +1 -0
  1286. package/dist/web/models/globalStore.mjs +23 -0
  1287. package/dist/web/models/globalStore.mjs.map +1 -0
  1288. package/dist/web/models/sessionStore.cjs +56 -0
  1289. package/dist/web/models/sessionStore.cjs.map +1 -0
  1290. package/dist/web/models/sessionStore.d.cts +14 -0
  1291. package/dist/web/models/sessionStore.d.cts.map +1 -0
  1292. package/dist/web/models/sessionStore.d.mts +14 -0
  1293. package/dist/web/models/sessionStore.d.mts.map +1 -0
  1294. package/dist/web/models/sessionStore.mjs +56 -0
  1295. package/dist/web/models/sessionStore.mjs.map +1 -0
  1296. package/dist/web/schemas/bundleAssetPolicy.cjs +20 -0
  1297. package/dist/web/schemas/bundleAssetPolicy.cjs.map +1 -0
  1298. package/dist/web/schemas/bundleAssetPolicy.d.cts +10 -0
  1299. package/dist/web/schemas/bundleAssetPolicy.d.cts.map +1 -0
  1300. package/dist/web/schemas/bundleAssetPolicy.d.mts +10 -0
  1301. package/dist/web/schemas/bundleAssetPolicy.d.mts.map +1 -0
  1302. package/dist/web/schemas/bundleAssetPolicy.mjs +18 -0
  1303. package/dist/web/schemas/bundleAssetPolicy.mjs.map +1 -0
  1304. package/dist/web/services/sessionRegistry/index.cjs +107 -0
  1305. package/dist/web/services/sessionRegistry/index.cjs.map +1 -0
  1306. package/dist/web/services/sessionRegistry/index.d.cts +42 -0
  1307. package/dist/web/services/sessionRegistry/index.d.cts.map +1 -0
  1308. package/dist/web/services/sessionRegistry/index.d.mts +42 -0
  1309. package/dist/web/services/sessionRegistry/index.d.mts.map +1 -0
  1310. package/dist/web/services/sessionRegistry/index.mjs +100 -0
  1311. package/dist/web/services/sessionRegistry/index.mjs.map +1 -0
  1312. package/dist/web/services/testing/channels.cjs +11 -0
  1313. package/dist/web/services/testing/channels.cjs.map +1 -0
  1314. package/dist/web/services/testing/channels.d.cts +8 -0
  1315. package/dist/web/services/testing/channels.d.cts.map +1 -0
  1316. package/dist/web/services/testing/channels.d.mts +8 -0
  1317. package/dist/web/services/testing/channels.d.mts.map +1 -0
  1318. package/dist/web/services/testing/channels.mjs +11 -0
  1319. package/dist/web/services/testing/channels.mjs.map +1 -0
  1320. package/dist/web/services/testing/index.cjs +27 -0
  1321. package/dist/web/services/testing/index.cjs.map +1 -0
  1322. package/dist/web/services/testing/index.d.cts +31 -0
  1323. package/dist/web/services/testing/index.d.cts.map +1 -0
  1324. package/dist/web/services/testing/index.d.mts +31 -0
  1325. package/dist/web/services/testing/index.d.mts.map +1 -0
  1326. package/dist/web/services/testing/index.mjs +27 -0
  1327. package/dist/web/services/testing/index.mjs.map +1 -0
  1328. package/dist/web/services/testing/slotProps.cjs +90 -0
  1329. package/dist/web/services/testing/slotProps.cjs.map +1 -0
  1330. package/dist/web/services/testing/slotProps.d.cts +67 -0
  1331. package/dist/web/services/testing/slotProps.d.cts.map +1 -0
  1332. package/dist/web/services/testing/slotProps.d.mts +67 -0
  1333. package/dist/web/services/testing/slotProps.d.mts.map +1 -0
  1334. package/dist/web/services/testing/slotProps.mjs +89 -0
  1335. package/dist/web/services/testing/slotProps.mjs.map +1 -0
  1336. package/dist/web/services/toolResult/index.cjs +30 -0
  1337. package/dist/web/services/toolResult/index.cjs.map +1 -0
  1338. package/dist/web/services/toolResult/index.d.cts +14 -0
  1339. package/dist/web/services/toolResult/index.d.cts.map +1 -0
  1340. package/dist/web/services/toolResult/index.d.mts +14 -0
  1341. package/dist/web/services/toolResult/index.d.mts.map +1 -0
  1342. package/dist/web/services/toolResult/index.mjs +29 -0
  1343. package/dist/web/services/toolResult/index.mjs.map +1 -0
  1344. package/dist/web/testing.cjs +8 -0
  1345. package/dist/web/testing.d.cts +4 -0
  1346. package/dist/web/testing.d.mts +4 -0
  1347. package/dist/web/testing.mjs +4 -0
  1348. package/dist/web/types/modelContext.d.cts +43 -0
  1349. package/dist/web/types/modelContext.d.cts.map +1 -0
  1350. package/dist/web/types/modelContext.d.mts +43 -0
  1351. package/dist/web/types/modelContext.d.mts.map +1 -0
  1352. package/dist/web/types/sessionRegistry.d.cts +59 -0
  1353. package/dist/web/types/sessionRegistry.d.cts.map +1 -0
  1354. package/dist/web/types/sessionRegistry.d.mts +59 -0
  1355. package/dist/web/types/sessionRegistry.d.mts.map +1 -0
  1356. package/dist/web/types/webPlugin.d.cts +809 -0
  1357. package/dist/web/types/webPlugin.d.cts.map +1 -0
  1358. package/dist/web/types/webPlugin.d.mts +809 -0
  1359. package/dist/web/types/webPlugin.d.mts.map +1 -0
  1360. package/dist/web-compositions.cjs +100 -0
  1361. package/dist/web-compositions.cjs.map +1 -0
  1362. package/dist/web-compositions.d.cts +20 -0
  1363. package/dist/web-compositions.d.cts.map +1 -0
  1364. package/dist/web-compositions.d.mts +20 -0
  1365. package/dist/web-compositions.d.mts.map +1 -0
  1366. package/dist/web-compositions.mjs +95 -0
  1367. package/dist/web-compositions.mjs.map +1 -0
  1368. package/dist/web.cjs +25 -0
  1369. package/dist/web.d.cts +10 -0
  1370. package/dist/web.d.mts +10 -0
  1371. package/dist/web.mjs +7 -0
  1372. package/package.json +587 -0
@@ -0,0 +1,140 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
3
+ const require_serverBundle = require("./schemas/serverBundle.cjs");
4
+ require("./server-facet.cjs");
5
+ const require_runtime_json = require("./runtime-json.cjs");
6
+ require("./doom-package.cjs");
7
+ const require_sync_location = require("./sync-location.cjs");
8
+ let node_fs = require("node:fs");
9
+ node_fs = require_runtime.__toESM(node_fs, 1);
10
+ let node_path = require("node:path");
11
+ node_path = require_runtime.__toESM(node_path, 1);
12
+ let node_crypto = require("node:crypto");
13
+ node_crypto = require_runtime.__toESM(node_crypto, 1);
14
+ //#region src/services/syncRegistration/index.ts
15
+ /** Stable protocol shared by sync, the managed dispatcher, and runtime consumers. */
16
+ const SYNC_REGISTRATION_VERSION = 1;
17
+ const SHA256 = /^[a-f0-9]{64}$/u;
18
+ const PRIVATE_FILE_MODE = 384;
19
+ function canonicalPath(target) {
20
+ return node_fs.default.realpathSync.native(node_path.default.resolve(target));
21
+ }
22
+ function isInside(directory, target) {
23
+ const relative = node_path.default.relative(canonicalPath(directory), canonicalPath(target));
24
+ return relative === "" || !relative.startsWith("..") && !node_path.default.isAbsolute(relative);
25
+ }
26
+ function requiredString(value, field, recordPath) {
27
+ if (typeof value !== "string" || value === "") throw new Error(`Doom sync registration at ${recordPath} has an invalid ${field}`);
28
+ return value;
29
+ }
30
+ function identityFrom(value, recordPath) {
31
+ if (!require_runtime_json.isRecord(value)) throw new Error(`Doom sync registration at ${recordPath} has no identity`);
32
+ return {
33
+ repositoryId: requiredString(value.repositoryId, "repository id", recordPath),
34
+ worktreeId: requiredString(value.worktreeId, "worktree id", recordPath)
35
+ };
36
+ }
37
+ function packageFrom(value, recordPath) {
38
+ if (!require_runtime_json.isRecord(value)) throw new Error(`Doom sync registration at ${recordPath} has no package record`);
39
+ return {
40
+ root: requiredString(value.root, "package root", recordPath),
41
+ version: requiredString(value.version, "package version", recordPath),
42
+ manifestPath: requiredString(value.manifestPath, "package manifest", recordPath),
43
+ entry: requiredString(value.entry, "package entry", recordPath)
44
+ };
45
+ }
46
+ function sha256File(filePath) {
47
+ return node_crypto.default.createHash("sha256").update(node_fs.default.readFileSync(filePath)).digest("hex");
48
+ }
49
+ function validatePackage(value, recordPath) {
50
+ const packageRoot = canonicalPath(value.root);
51
+ if (packageRoot !== node_path.default.resolve(value.root)) throw new Error(`Doom sync registration at ${recordPath} has a noncanonical package root`);
52
+ if (!isInside(packageRoot, value.manifestPath) || !isInside(packageRoot, value.entry)) throw new Error(`Doom sync registration at ${recordPath} references package material outside ${packageRoot}`);
53
+ if (canonicalPath(value.manifestPath) !== canonicalPath(node_path.default.join(packageRoot, "package.json"))) throw new Error(`Doom sync registration at ${recordPath} has an invalid package manifest path`);
54
+ const manifest = JSON.parse(node_fs.default.readFileSync(value.manifestPath, "utf8"));
55
+ if (manifest.name !== "@agimon-ai/doompi" || manifest.version !== value.version) throw new Error(`Doom sync registration at ${recordPath} does not match its DoomPi package`);
56
+ const extensions = manifest.pi?.extensions;
57
+ if (!Array.isArray(extensions) || !extensions.some((entry) => typeof entry === "string" && canonicalPath(node_path.default.resolve(packageRoot, entry)) === canonicalPath(value.entry))) throw new Error(`Doom sync registration at ${recordPath} does not match the package Pi entry`);
58
+ }
59
+ /** Validates one parsed registration against its canonical repository/worktree location. */
60
+ function validateSyncRegistration(registration, location) {
61
+ const recordPath = location.registrationPath;
62
+ if (registration.version !== 1) throw new Error(`Unsupported Doom sync registration version at ${recordPath}`);
63
+ const canonicalRoot = canonicalPath(registration.root);
64
+ if (canonicalRoot !== location.root || node_path.default.resolve(registration.root) !== canonicalRoot) throw new Error(`Doom sync registration at ${recordPath} has an invalid repository root`);
65
+ if (registration.identity.repositoryId !== location.identity.repositoryId || registration.identity.worktreeId !== location.identity.worktreeId) throw new Error(`Doom sync registration at ${recordPath} belongs to another repository or worktree`);
66
+ const expectedGenerationRoot = require_sync_location.syncGenerationDirectory(location, registration.generation);
67
+ if (node_path.default.resolve(registration.generationRoot) !== node_path.default.resolve(expectedGenerationRoot)) throw new Error(`Doom sync registration at ${recordPath} has an invalid generation root`);
68
+ const generationStat = node_fs.default.lstatSync(registration.generationRoot, { throwIfNoEntry: false });
69
+ if (!generationStat?.isDirectory() || generationStat.isSymbolicLink()) throw new Error(`Doom sync registration at ${recordPath} has an unavailable generation`);
70
+ for (const target of [registration.statePath, registration.apiDirectory]) if (!isInside(registration.generationRoot, target)) throw new Error(`Doom sync registration at ${recordPath} references material outside its generation`);
71
+ if (registration.webDirectory !== null && !isInside(registration.generationRoot, registration.webDirectory)) throw new Error(`Doom sync registration at ${recordPath} references web material outside its generation`);
72
+ if (!SHA256.test(registration.stateSha256) || sha256File(registration.statePath) !== registration.stateSha256) throw new Error(`Doom sync registration at ${recordPath} has a mismatched state hash`);
73
+ let state = {};
74
+ try {
75
+ const parsed = JSON.parse(node_fs.default.readFileSync(registration.statePath, "utf8"));
76
+ if (require_runtime_json.isRecord(parsed)) state = parsed;
77
+ } catch (error) {
78
+ if (registration.serverBundle !== void 0) throw error;
79
+ }
80
+ if (registration.serverBundle !== void 0) {
81
+ const bundle = registration.serverBundle;
82
+ if (!isInside(registration.generationRoot, bundle.path) || canonicalPath(bundle.path) !== canonicalPath(node_path.default.join(registration.apiDirectory, "server.bundle.json"))) throw new Error(`Doom sync registration at ${recordPath} has an invalid server descriptor path`);
83
+ if (!SHA256.test(bundle.sha256) || sha256File(bundle.path) !== bundle.sha256) throw new Error(`Doom sync registration at ${recordPath} has a mismatched server descriptor hash`);
84
+ const descriptor = require_serverBundle.parseDoomServerBundle(JSON.parse(node_fs.default.readFileSync(bundle.path, "utf8")));
85
+ const recorded = state.serverBundle;
86
+ if (descriptor.generation !== registration.generation || descriptor.fingerprint !== bundle.fingerprint || !require_runtime_json.isRecord(recorded) || recorded.fingerprint !== bundle.fingerprint || recorded.descriptorPath !== bundle.path) throw new Error(`Doom sync registration at ${recordPath} has mismatched server bundle identity`);
87
+ } else if (state.serverBundle !== void 0) throw new Error(`Doom sync registration at ${recordPath} is missing its server bundle record`);
88
+ validatePackage(registration.package, recordPath);
89
+ return registration;
90
+ }
91
+ function parseRegistration(value, recordPath) {
92
+ if (!require_runtime_json.isRecord(value)) throw new Error(`Doom sync registration at ${recordPath} is not an object`);
93
+ return {
94
+ version: value.version,
95
+ root: requiredString(value.root, "repository root", recordPath),
96
+ identity: identityFrom(value.identity, recordPath),
97
+ generation: requiredString(value.generation, "generation", recordPath),
98
+ generationRoot: requiredString(value.generationRoot, "generation root", recordPath),
99
+ statePath: requiredString(value.statePath, "state path", recordPath),
100
+ stateSha256: requiredString(value.stateSha256, "state hash", recordPath),
101
+ webDirectory: value.webDirectory === null ? null : requiredString(value.webDirectory, "web directory", recordPath),
102
+ apiDirectory: requiredString(value.apiDirectory, "API directory", recordPath),
103
+ ...value.serverBundle === void 0 ? {} : { serverBundle: serverBundleFrom(value.serverBundle, recordPath) },
104
+ package: packageFrom(value.package, recordPath)
105
+ };
106
+ }
107
+ function serverBundleFrom(value, recordPath) {
108
+ if (!require_runtime_json.isRecord(value)) throw new Error(`Doom sync registration at ${recordPath} has an invalid server bundle record`);
109
+ return {
110
+ path: requiredString(value.path, "server descriptor path", recordPath),
111
+ sha256: requiredString(value.sha256, "server descriptor hash", recordPath),
112
+ fingerprint: requiredString(value.fingerprint, "server descriptor fingerprint", recordPath)
113
+ };
114
+ }
115
+ /** Reads only the exact registration for this repository/worktree. */
116
+ function readSyncRegistration(repoRoot, homeDirectory) {
117
+ const location = require_sync_location.resolveSyncLocation(repoRoot, homeDirectory);
118
+ if (!node_fs.default.existsSync(location.registrationPath)) return void 0;
119
+ return validateSyncRegistration(parseRegistration(JSON.parse(node_fs.default.readFileSync(location.registrationPath, "utf8")), location.registrationPath), location);
120
+ }
121
+ /** Atomically activates one fully staged generation for its worktree. */
122
+ function publishSyncRegistration(repoRoot, registration, homeDirectory) {
123
+ const location = require_sync_location.resolveSyncLocation(repoRoot, homeDirectory);
124
+ require_sync_location.assertSyncLocationSafe(location);
125
+ validateSyncRegistration(registration, location);
126
+ require_runtime_json.writeFileAtomic(location.registrationPath, `${JSON.stringify(registration, null, 2)}\n`);
127
+ node_fs.default.chmodSync(location.registrationPath, PRIVATE_FILE_MODE);
128
+ return location.registrationPath;
129
+ }
130
+ function syncStateSha256(statePath) {
131
+ return sha256File(statePath);
132
+ }
133
+ //#endregion
134
+ exports.SYNC_REGISTRATION_VERSION = SYNC_REGISTRATION_VERSION;
135
+ exports.publishSyncRegistration = publishSyncRegistration;
136
+ exports.readSyncRegistration = readSyncRegistration;
137
+ exports.syncStateSha256 = syncStateSha256;
138
+ exports.validateSyncRegistration = validateSyncRegistration;
139
+
140
+ //# sourceMappingURL=sync-registration.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-registration.cjs","names":["fs","path","isRecord","crypto","syncGenerationDirectory","parseDoomServerBundle","resolveSyncLocation"],"sources":["../src/services/syncRegistration/index.ts"],"sourcesContent":["import crypto from 'node:crypto';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nimport { DOOM_SERVER_BUNDLE_FILE, parseDoomServerBundle } from '../../exports/serverFacet';\nimport { DOOM_PACKAGE_NAME } from '../doomPackage';\nimport { isRecord, writeFileAtomic } from '../json';\nimport {\n assertSyncLocationSafe,\n resolveSyncLocation,\n syncGenerationDirectory,\n type SyncIdentity,\n type SyncLocation,\n} from '../syncLocation';\n\n/** Stable protocol shared by sync, the managed dispatcher, and runtime consumers. */\nexport const SYNC_REGISTRATION_VERSION = 1;\n\nconst SHA256 = /^[a-f0-9]{64}$/u;\nconst PRIVATE_FILE_MODE = 0o600;\n\nexport interface SyncPackageRegistration {\n root: string;\n version: string;\n manifestPath: string;\n entry: string;\n}\n\nexport interface SyncServerBundleRegistration {\n path: string;\n sha256: string;\n fingerprint: string;\n}\n\nexport interface SyncRegistration {\n version: number;\n root: string;\n identity: SyncIdentity;\n generation: string;\n generationRoot: string;\n statePath: string;\n stateSha256: string;\n webDirectory: string | null;\n apiDirectory: string;\n /** Missing only for explicitly supported pre-cutover generations. */\n serverBundle?: SyncServerBundleRegistration;\n package: SyncPackageRegistration;\n}\n\nfunction canonicalPath(target: string): string {\n return fs.realpathSync.native(path.resolve(target));\n}\n\nfunction isInside(directory: string, target: string): boolean {\n const relative = path.relative(canonicalPath(directory), canonicalPath(target));\n return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative));\n}\n\nfunction requiredString(value: unknown, field: string, recordPath: string): string {\n if (typeof value !== 'string' || value === '') {\n throw new Error(`Doom sync registration at ${recordPath} has an invalid ${field}`);\n }\n return value;\n}\n\nfunction identityFrom(value: unknown, recordPath: string): SyncIdentity {\n if (!isRecord(value)) throw new Error(`Doom sync registration at ${recordPath} has no identity`);\n return {\n repositoryId: requiredString(value.repositoryId, 'repository id', recordPath),\n worktreeId: requiredString(value.worktreeId, 'worktree id', recordPath),\n };\n}\n\nfunction packageFrom(value: unknown, recordPath: string): SyncPackageRegistration {\n if (!isRecord(value)) throw new Error(`Doom sync registration at ${recordPath} has no package record`);\n return {\n root: requiredString(value.root, 'package root', recordPath),\n version: requiredString(value.version, 'package version', recordPath),\n manifestPath: requiredString(value.manifestPath, 'package manifest', recordPath),\n entry: requiredString(value.entry, 'package entry', recordPath),\n };\n}\n\nfunction sha256File(filePath: string): string {\n return crypto.createHash('sha256').update(fs.readFileSync(filePath)).digest('hex');\n}\n\nfunction validatePackage(value: SyncPackageRegistration, recordPath: string): void {\n const packageRoot = canonicalPath(value.root);\n if (packageRoot !== path.resolve(value.root)) {\n throw new Error(`Doom sync registration at ${recordPath} has a noncanonical package root`);\n }\n if (!isInside(packageRoot, value.manifestPath) || !isInside(packageRoot, value.entry)) {\n throw new Error(`Doom sync registration at ${recordPath} references package material outside ${packageRoot}`);\n }\n if (canonicalPath(value.manifestPath) !== canonicalPath(path.join(packageRoot, 'package.json'))) {\n throw new Error(`Doom sync registration at ${recordPath} has an invalid package manifest path`);\n }\n const manifest = JSON.parse(fs.readFileSync(value.manifestPath, 'utf8')) as {\n name?: unknown;\n version?: unknown;\n pi?: { extensions?: unknown };\n };\n if (manifest.name !== DOOM_PACKAGE_NAME || manifest.version !== value.version) {\n throw new Error(`Doom sync registration at ${recordPath} does not match its DoomPi package`);\n }\n const extensions = manifest.pi?.extensions;\n if (\n !Array.isArray(extensions) ||\n !extensions.some(\n (entry) =>\n typeof entry === 'string' && canonicalPath(path.resolve(packageRoot, entry)) === canonicalPath(value.entry),\n )\n ) {\n throw new Error(`Doom sync registration at ${recordPath} does not match the package Pi entry`);\n }\n}\n\n/** Validates one parsed registration against its canonical repository/worktree location. */\nexport function validateSyncRegistration(registration: SyncRegistration, location: SyncLocation): SyncRegistration {\n const recordPath = location.registrationPath;\n if (registration.version !== SYNC_REGISTRATION_VERSION) {\n throw new Error(`Unsupported Doom sync registration version at ${recordPath}`);\n }\n const canonicalRoot = canonicalPath(registration.root);\n if (canonicalRoot !== location.root || path.resolve(registration.root) !== canonicalRoot) {\n throw new Error(`Doom sync registration at ${recordPath} has an invalid repository root`);\n }\n if (\n registration.identity.repositoryId !== location.identity.repositoryId ||\n registration.identity.worktreeId !== location.identity.worktreeId\n ) {\n throw new Error(`Doom sync registration at ${recordPath} belongs to another repository or worktree`);\n }\n const expectedGenerationRoot = syncGenerationDirectory(location, registration.generation);\n if (path.resolve(registration.generationRoot) !== path.resolve(expectedGenerationRoot)) {\n throw new Error(`Doom sync registration at ${recordPath} has an invalid generation root`);\n }\n const generationStat = fs.lstatSync(registration.generationRoot, { throwIfNoEntry: false });\n if (!generationStat?.isDirectory() || generationStat.isSymbolicLink()) {\n throw new Error(`Doom sync registration at ${recordPath} has an unavailable generation`);\n }\n for (const target of [registration.statePath, registration.apiDirectory]) {\n if (!isInside(registration.generationRoot, target)) {\n throw new Error(`Doom sync registration at ${recordPath} references material outside its generation`);\n }\n }\n if (registration.webDirectory !== null && !isInside(registration.generationRoot, registration.webDirectory)) {\n throw new Error(`Doom sync registration at ${recordPath} references web material outside its generation`);\n }\n if (!SHA256.test(registration.stateSha256) || sha256File(registration.statePath) !== registration.stateSha256) {\n throw new Error(`Doom sync registration at ${recordPath} has a mismatched state hash`);\n }\n let state: Record<string, unknown> = {};\n try {\n const parsed: unknown = JSON.parse(fs.readFileSync(registration.statePath, 'utf8'));\n if (isRecord(parsed)) state = parsed;\n } catch (error) {\n // Legacy state validation remains the state reader's responsibility. New\n // descriptor generations require their state identity during admission.\n if (registration.serverBundle !== undefined) throw error;\n }\n if (registration.serverBundle !== undefined) {\n const bundle = registration.serverBundle;\n if (\n !isInside(registration.generationRoot, bundle.path) ||\n canonicalPath(bundle.path) !== canonicalPath(path.join(registration.apiDirectory, DOOM_SERVER_BUNDLE_FILE))\n ) {\n throw new Error(`Doom sync registration at ${recordPath} has an invalid server descriptor path`);\n }\n if (!SHA256.test(bundle.sha256) || sha256File(bundle.path) !== bundle.sha256) {\n throw new Error(`Doom sync registration at ${recordPath} has a mismatched server descriptor hash`);\n }\n const descriptor = parseDoomServerBundle(JSON.parse(fs.readFileSync(bundle.path, 'utf8')));\n const recorded = state.serverBundle;\n if (\n descriptor.generation !== registration.generation ||\n descriptor.fingerprint !== bundle.fingerprint ||\n !isRecord(recorded) ||\n recorded.fingerprint !== bundle.fingerprint ||\n recorded.descriptorPath !== bundle.path\n ) {\n throw new Error(`Doom sync registration at ${recordPath} has mismatched server bundle identity`);\n }\n } else if (state.serverBundle !== undefined) {\n throw new Error(`Doom sync registration at ${recordPath} is missing its server bundle record`);\n }\n validatePackage(registration.package, recordPath);\n return registration;\n}\n\nfunction parseRegistration(value: unknown, recordPath: string): SyncRegistration {\n if (!isRecord(value)) throw new Error(`Doom sync registration at ${recordPath} is not an object`);\n return {\n version: value.version as number,\n root: requiredString(value.root, 'repository root', recordPath),\n identity: identityFrom(value.identity, recordPath),\n generation: requiredString(value.generation, 'generation', recordPath),\n generationRoot: requiredString(value.generationRoot, 'generation root', recordPath),\n statePath: requiredString(value.statePath, 'state path', recordPath),\n stateSha256: requiredString(value.stateSha256, 'state hash', recordPath),\n webDirectory: value.webDirectory === null ? null : requiredString(value.webDirectory, 'web directory', recordPath),\n apiDirectory: requiredString(value.apiDirectory, 'API directory', recordPath),\n ...(value.serverBundle === undefined ? {} : { serverBundle: serverBundleFrom(value.serverBundle, recordPath) }),\n package: packageFrom(value.package, recordPath),\n };\n}\n\nfunction serverBundleFrom(value: unknown, recordPath: string): SyncServerBundleRegistration {\n if (!isRecord(value)) throw new Error(`Doom sync registration at ${recordPath} has an invalid server bundle record`);\n return {\n path: requiredString(value.path, 'server descriptor path', recordPath),\n sha256: requiredString(value.sha256, 'server descriptor hash', recordPath),\n fingerprint: requiredString(value.fingerprint, 'server descriptor fingerprint', recordPath),\n };\n}\n\n/** Reads only the exact registration for this repository/worktree. */\nexport function readSyncRegistration(repoRoot: string, homeDirectory?: string): SyncRegistration | undefined {\n const location = resolveSyncLocation(repoRoot, homeDirectory);\n if (!fs.existsSync(location.registrationPath)) return undefined;\n const parsed = parseRegistration(\n JSON.parse(fs.readFileSync(location.registrationPath, 'utf8')),\n location.registrationPath,\n );\n return validateSyncRegistration(parsed, location);\n}\n\n/** Atomically activates one fully staged generation for its worktree. */\nexport function publishSyncRegistration(\n repoRoot: string,\n registration: SyncRegistration,\n homeDirectory?: string,\n): string {\n const location = resolveSyncLocation(repoRoot, homeDirectory);\n assertSyncLocationSafe(location);\n validateSyncRegistration(registration, location);\n writeFileAtomic(location.registrationPath, `${JSON.stringify(registration, null, 2)}\\n`);\n fs.chmodSync(location.registrationPath, PRIVATE_FILE_MODE);\n return location.registrationPath;\n}\n\nexport function syncStateSha256(statePath: string): string {\n return sha256File(statePath);\n}\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,MAAa,4BAA4B;AAEzC,MAAM,SAAS;AACf,MAAM,oBAAoB;AA8B1B,SAAS,cAAc,QAAwB;CAC7C,OAAOA,QAAAA,QAAG,aAAa,OAAOC,UAAAA,QAAK,QAAQ,MAAM,CAAC;AACpD;AAEA,SAAS,SAAS,WAAmB,QAAyB;CAC5D,MAAM,WAAWA,UAAAA,QAAK,SAAS,cAAc,SAAS,GAAG,cAAc,MAAM,CAAC;CAC9E,OAAO,aAAa,MAAO,CAAC,SAAS,WAAW,IAAI,KAAK,CAACA,UAAAA,QAAK,WAAW,QAAQ;AACpF;AAEA,SAAS,eAAe,OAAgB,OAAe,YAA4B;CACjF,IAAI,OAAO,UAAU,YAAY,UAAU,IACzC,MAAM,IAAI,MAAM,6BAA6B,WAAW,kBAAkB,OAAO;CAEnF,OAAO;AACT;AAEA,SAAS,aAAa,OAAgB,YAAkC;CACtE,IAAI,CAACC,qBAAAA,SAAS,KAAK,GAAG,MAAM,IAAI,MAAM,6BAA6B,WAAW,iBAAiB;CAC/F,OAAO;EACL,cAAc,eAAe,MAAM,cAAc,iBAAiB,UAAU;EAC5E,YAAY,eAAe,MAAM,YAAY,eAAe,UAAU;CACxE;AACF;AAEA,SAAS,YAAY,OAAgB,YAA6C;CAChF,IAAI,CAACA,qBAAAA,SAAS,KAAK,GAAG,MAAM,IAAI,MAAM,6BAA6B,WAAW,uBAAuB;CACrG,OAAO;EACL,MAAM,eAAe,MAAM,MAAM,gBAAgB,UAAU;EAC3D,SAAS,eAAe,MAAM,SAAS,mBAAmB,UAAU;EACpE,cAAc,eAAe,MAAM,cAAc,oBAAoB,UAAU;EAC/E,OAAO,eAAe,MAAM,OAAO,iBAAiB,UAAU;CAChE;AACF;AAEA,SAAS,WAAW,UAA0B;CAC5C,OAAOC,YAAAA,QAA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;EAC5E,GAAI,MAAM,iBAAiB,KAAA,IAAY,CAAC,IAAI,EAAE,cAAc,iBAAiB,MAAM,cAAc,UAAU,EAAE;EAC7G,SAAS,YAAY,MAAM,SAAS,UAAU;CAChD;AACF;AAEA,SAAS,iBAAiB,OAAgB,YAAkD;CAC1F,IAAI,CAACA,qBAAAA,SAAS,KAAK,GAAG,MAAM,IAAI,MAAM,6BAA6B,WAAW,qCAAqC;CACnH,OAAO;EACL,MAAM,eAAe,MAAM,MAAM,0BAA0B,UAAU;EACrE,QAAQ,eAAe,MAAM,QAAQ,0BAA0B,UAAU;EACzE,aAAa,eAAe,MAAM,aAAa,iCAAiC,UAAU;CAC5F;AACF;;AAGA,SAAgB,qBAAqB,UAAkB,eAAsD;CAC3G,MAAM,WAAWI,sBAAAA,oBAAoB,UAAU,aAAa;CAC5D,IAAI,CAACN,QAAAA,QAAG,WAAW,SAAS,gBAAgB,GAAG,OAAO,KAAA;CAKtD,OAAO,yBAJQ,kBACb,KAAK,MAAMA,QAAAA,QAAG,aAAa,SAAS,kBAAkB,MAAM,CAAC,GAC7D,SAAS,gBAE0B,GAAG,QAAQ;AAClD;;AAGA,SAAgB,wBACd,UACA,cACA,eACQ;CACR,MAAM,WAAWM,sBAAAA,oBAAoB,UAAU,aAAa;CAC5D,sBAAA,uBAAuB,QAAQ;CAC/B,yBAAyB,cAAc,QAAQ;CAC/C,qBAAA,gBAAgB,SAAS,kBAAkB,GAAG,KAAK,UAAU,cAAc,MAAM,CAAC,EAAE,GAAG;CACvF,QAAA,QAAG,UAAU,SAAS,kBAAkB,iBAAiB;CACzD,OAAO,SAAS;AAClB;AAEA,SAAgB,gBAAgB,WAA2B;CACzD,OAAO,WAAW,SAAS;AAC7B"}
@@ -0,0 +1,38 @@
1
+ import { SyncIdentity, SyncLocation } from "./sync-location.cjs";
2
+ //#region src/services/syncRegistration/index.d.ts
3
+ /** Stable protocol shared by sync, the managed dispatcher, and runtime consumers. */
4
+ export declare const SYNC_REGISTRATION_VERSION = 1;
5
+ export interface SyncPackageRegistration {
6
+ root: string;
7
+ version: string;
8
+ manifestPath: string;
9
+ entry: string;
10
+ }
11
+ export interface SyncServerBundleRegistration {
12
+ path: string;
13
+ sha256: string;
14
+ fingerprint: string;
15
+ }
16
+ export interface SyncRegistration {
17
+ version: number;
18
+ root: string;
19
+ identity: SyncIdentity;
20
+ generation: string;
21
+ generationRoot: string;
22
+ statePath: string;
23
+ stateSha256: string;
24
+ webDirectory: string | null;
25
+ apiDirectory: string;
26
+ /** Missing only for explicitly supported pre-cutover generations. */
27
+ serverBundle?: SyncServerBundleRegistration;
28
+ package: SyncPackageRegistration;
29
+ }
30
+ /** Validates one parsed registration against its canonical repository/worktree location. */
31
+ export declare function validateSyncRegistration(registration: SyncRegistration, location: SyncLocation): SyncRegistration;
32
+ /** Reads only the exact registration for this repository/worktree. */
33
+ export declare function readSyncRegistration(repoRoot: string, homeDirectory?: string): SyncRegistration | undefined;
34
+ /** Atomically activates one fully staged generation for its worktree. */
35
+ export declare function publishSyncRegistration(repoRoot: string, registration: SyncRegistration, homeDirectory?: string): string;
36
+ export declare function syncStateSha256(statePath: string): string;
37
+ //#endregion
38
+ //# sourceMappingURL=sync-registration.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-registration.d.cts","names":[],"sources":["../src/services/syncRegistration/index.ts"],"mappings":";;;qBAgBa;iBAKI;EACf;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;;iBAGe;EACf;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;;EAEA,eAAe;EACf,SAAS;;;wBAyEK,yBAAyB,cAAc,kBAAkB,UAAU,eAAe;;wBAmGlF,qBAAqB,kBAAkB,yBAAyB;;wBAWhE,wBACd,kBACA,cAAc,kBACd;wBAUc,gBAAgB"}
@@ -0,0 +1,38 @@
1
+ import { SyncIdentity, SyncLocation } from "./sync-location.mjs";
2
+ //#region src/services/syncRegistration/index.d.ts
3
+ /** Stable protocol shared by sync, the managed dispatcher, and runtime consumers. */
4
+ export declare const SYNC_REGISTRATION_VERSION = 1;
5
+ export interface SyncPackageRegistration {
6
+ root: string;
7
+ version: string;
8
+ manifestPath: string;
9
+ entry: string;
10
+ }
11
+ export interface SyncServerBundleRegistration {
12
+ path: string;
13
+ sha256: string;
14
+ fingerprint: string;
15
+ }
16
+ export interface SyncRegistration {
17
+ version: number;
18
+ root: string;
19
+ identity: SyncIdentity;
20
+ generation: string;
21
+ generationRoot: string;
22
+ statePath: string;
23
+ stateSha256: string;
24
+ webDirectory: string | null;
25
+ apiDirectory: string;
26
+ /** Missing only for explicitly supported pre-cutover generations. */
27
+ serverBundle?: SyncServerBundleRegistration;
28
+ package: SyncPackageRegistration;
29
+ }
30
+ /** Validates one parsed registration against its canonical repository/worktree location. */
31
+ export declare function validateSyncRegistration(registration: SyncRegistration, location: SyncLocation): SyncRegistration;
32
+ /** Reads only the exact registration for this repository/worktree. */
33
+ export declare function readSyncRegistration(repoRoot: string, homeDirectory?: string): SyncRegistration | undefined;
34
+ /** Atomically activates one fully staged generation for its worktree. */
35
+ export declare function publishSyncRegistration(repoRoot: string, registration: SyncRegistration, homeDirectory?: string): string;
36
+ export declare function syncStateSha256(statePath: string): string;
37
+ //#endregion
38
+ //# sourceMappingURL=sync-registration.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-registration.d.mts","names":[],"sources":["../src/services/syncRegistration/index.ts"],"mappings":";;;qBAgBa;iBAKI;EACf;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;;iBAGe;EACf;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;;EAEA,eAAe;EACf,SAAS;;;wBAyEK,yBAAyB,cAAc,kBAAkB,UAAU,eAAe;;wBAmGlF,qBAAqB,kBAAkB,yBAAyB;;wBAWhE,wBACd,kBACA,cAAc,kBACd;wBAUc,gBAAgB"}
@@ -0,0 +1,131 @@
1
+ import { parseDoomServerBundle } from "./schemas/serverBundle.mjs";
2
+ import "./server-facet.mjs";
3
+ import { isRecord, writeFileAtomic } from "./runtime-json.mjs";
4
+ import "./doom-package.mjs";
5
+ import { assertSyncLocationSafe, resolveSyncLocation, syncGenerationDirectory } from "./sync-location.mjs";
6
+ import fs from "node:fs";
7
+ import path from "node:path";
8
+ import crypto from "node:crypto";
9
+ //#region src/services/syncRegistration/index.ts
10
+ /** Stable protocol shared by sync, the managed dispatcher, and runtime consumers. */
11
+ const SYNC_REGISTRATION_VERSION = 1;
12
+ const SHA256 = /^[a-f0-9]{64}$/u;
13
+ const PRIVATE_FILE_MODE = 384;
14
+ function canonicalPath(target) {
15
+ return fs.realpathSync.native(path.resolve(target));
16
+ }
17
+ function isInside(directory, target) {
18
+ const relative = path.relative(canonicalPath(directory), canonicalPath(target));
19
+ return relative === "" || !relative.startsWith("..") && !path.isAbsolute(relative);
20
+ }
21
+ function requiredString(value, field, recordPath) {
22
+ if (typeof value !== "string" || value === "") throw new Error(`Doom sync registration at ${recordPath} has an invalid ${field}`);
23
+ return value;
24
+ }
25
+ function identityFrom(value, recordPath) {
26
+ if (!isRecord(value)) throw new Error(`Doom sync registration at ${recordPath} has no identity`);
27
+ return {
28
+ repositoryId: requiredString(value.repositoryId, "repository id", recordPath),
29
+ worktreeId: requiredString(value.worktreeId, "worktree id", recordPath)
30
+ };
31
+ }
32
+ function packageFrom(value, recordPath) {
33
+ if (!isRecord(value)) throw new Error(`Doom sync registration at ${recordPath} has no package record`);
34
+ return {
35
+ root: requiredString(value.root, "package root", recordPath),
36
+ version: requiredString(value.version, "package version", recordPath),
37
+ manifestPath: requiredString(value.manifestPath, "package manifest", recordPath),
38
+ entry: requiredString(value.entry, "package entry", recordPath)
39
+ };
40
+ }
41
+ function sha256File(filePath) {
42
+ return crypto.createHash("sha256").update(fs.readFileSync(filePath)).digest("hex");
43
+ }
44
+ function validatePackage(value, recordPath) {
45
+ const packageRoot = canonicalPath(value.root);
46
+ if (packageRoot !== path.resolve(value.root)) throw new Error(`Doom sync registration at ${recordPath} has a noncanonical package root`);
47
+ if (!isInside(packageRoot, value.manifestPath) || !isInside(packageRoot, value.entry)) throw new Error(`Doom sync registration at ${recordPath} references package material outside ${packageRoot}`);
48
+ if (canonicalPath(value.manifestPath) !== canonicalPath(path.join(packageRoot, "package.json"))) throw new Error(`Doom sync registration at ${recordPath} has an invalid package manifest path`);
49
+ const manifest = JSON.parse(fs.readFileSync(value.manifestPath, "utf8"));
50
+ if (manifest.name !== "@agimon-ai/doompi" || manifest.version !== value.version) throw new Error(`Doom sync registration at ${recordPath} does not match its DoomPi package`);
51
+ const extensions = manifest.pi?.extensions;
52
+ if (!Array.isArray(extensions) || !extensions.some((entry) => typeof entry === "string" && canonicalPath(path.resolve(packageRoot, entry)) === canonicalPath(value.entry))) throw new Error(`Doom sync registration at ${recordPath} does not match the package Pi entry`);
53
+ }
54
+ /** Validates one parsed registration against its canonical repository/worktree location. */
55
+ function validateSyncRegistration(registration, location) {
56
+ const recordPath = location.registrationPath;
57
+ if (registration.version !== 1) throw new Error(`Unsupported Doom sync registration version at ${recordPath}`);
58
+ const canonicalRoot = canonicalPath(registration.root);
59
+ if (canonicalRoot !== location.root || path.resolve(registration.root) !== canonicalRoot) throw new Error(`Doom sync registration at ${recordPath} has an invalid repository root`);
60
+ if (registration.identity.repositoryId !== location.identity.repositoryId || registration.identity.worktreeId !== location.identity.worktreeId) throw new Error(`Doom sync registration at ${recordPath} belongs to another repository or worktree`);
61
+ const expectedGenerationRoot = syncGenerationDirectory(location, registration.generation);
62
+ if (path.resolve(registration.generationRoot) !== path.resolve(expectedGenerationRoot)) throw new Error(`Doom sync registration at ${recordPath} has an invalid generation root`);
63
+ const generationStat = fs.lstatSync(registration.generationRoot, { throwIfNoEntry: false });
64
+ if (!generationStat?.isDirectory() || generationStat.isSymbolicLink()) throw new Error(`Doom sync registration at ${recordPath} has an unavailable generation`);
65
+ for (const target of [registration.statePath, registration.apiDirectory]) if (!isInside(registration.generationRoot, target)) throw new Error(`Doom sync registration at ${recordPath} references material outside its generation`);
66
+ if (registration.webDirectory !== null && !isInside(registration.generationRoot, registration.webDirectory)) throw new Error(`Doom sync registration at ${recordPath} references web material outside its generation`);
67
+ if (!SHA256.test(registration.stateSha256) || sha256File(registration.statePath) !== registration.stateSha256) throw new Error(`Doom sync registration at ${recordPath} has a mismatched state hash`);
68
+ let state = {};
69
+ try {
70
+ const parsed = JSON.parse(fs.readFileSync(registration.statePath, "utf8"));
71
+ if (isRecord(parsed)) state = parsed;
72
+ } catch (error) {
73
+ if (registration.serverBundle !== void 0) throw error;
74
+ }
75
+ if (registration.serverBundle !== void 0) {
76
+ const bundle = registration.serverBundle;
77
+ if (!isInside(registration.generationRoot, bundle.path) || canonicalPath(bundle.path) !== canonicalPath(path.join(registration.apiDirectory, "server.bundle.json"))) throw new Error(`Doom sync registration at ${recordPath} has an invalid server descriptor path`);
78
+ if (!SHA256.test(bundle.sha256) || sha256File(bundle.path) !== bundle.sha256) throw new Error(`Doom sync registration at ${recordPath} has a mismatched server descriptor hash`);
79
+ const descriptor = parseDoomServerBundle(JSON.parse(fs.readFileSync(bundle.path, "utf8")));
80
+ const recorded = state.serverBundle;
81
+ if (descriptor.generation !== registration.generation || descriptor.fingerprint !== bundle.fingerprint || !isRecord(recorded) || recorded.fingerprint !== bundle.fingerprint || recorded.descriptorPath !== bundle.path) throw new Error(`Doom sync registration at ${recordPath} has mismatched server bundle identity`);
82
+ } else if (state.serverBundle !== void 0) throw new Error(`Doom sync registration at ${recordPath} is missing its server bundle record`);
83
+ validatePackage(registration.package, recordPath);
84
+ return registration;
85
+ }
86
+ function parseRegistration(value, recordPath) {
87
+ if (!isRecord(value)) throw new Error(`Doom sync registration at ${recordPath} is not an object`);
88
+ return {
89
+ version: value.version,
90
+ root: requiredString(value.root, "repository root", recordPath),
91
+ identity: identityFrom(value.identity, recordPath),
92
+ generation: requiredString(value.generation, "generation", recordPath),
93
+ generationRoot: requiredString(value.generationRoot, "generation root", recordPath),
94
+ statePath: requiredString(value.statePath, "state path", recordPath),
95
+ stateSha256: requiredString(value.stateSha256, "state hash", recordPath),
96
+ webDirectory: value.webDirectory === null ? null : requiredString(value.webDirectory, "web directory", recordPath),
97
+ apiDirectory: requiredString(value.apiDirectory, "API directory", recordPath),
98
+ ...value.serverBundle === void 0 ? {} : { serverBundle: serverBundleFrom(value.serverBundle, recordPath) },
99
+ package: packageFrom(value.package, recordPath)
100
+ };
101
+ }
102
+ function serverBundleFrom(value, recordPath) {
103
+ if (!isRecord(value)) throw new Error(`Doom sync registration at ${recordPath} has an invalid server bundle record`);
104
+ return {
105
+ path: requiredString(value.path, "server descriptor path", recordPath),
106
+ sha256: requiredString(value.sha256, "server descriptor hash", recordPath),
107
+ fingerprint: requiredString(value.fingerprint, "server descriptor fingerprint", recordPath)
108
+ };
109
+ }
110
+ /** Reads only the exact registration for this repository/worktree. */
111
+ function readSyncRegistration(repoRoot, homeDirectory) {
112
+ const location = resolveSyncLocation(repoRoot, homeDirectory);
113
+ if (!fs.existsSync(location.registrationPath)) return void 0;
114
+ return validateSyncRegistration(parseRegistration(JSON.parse(fs.readFileSync(location.registrationPath, "utf8")), location.registrationPath), location);
115
+ }
116
+ /** Atomically activates one fully staged generation for its worktree. */
117
+ function publishSyncRegistration(repoRoot, registration, homeDirectory) {
118
+ const location = resolveSyncLocation(repoRoot, homeDirectory);
119
+ assertSyncLocationSafe(location);
120
+ validateSyncRegistration(registration, location);
121
+ writeFileAtomic(location.registrationPath, `${JSON.stringify(registration, null, 2)}\n`);
122
+ fs.chmodSync(location.registrationPath, PRIVATE_FILE_MODE);
123
+ return location.registrationPath;
124
+ }
125
+ function syncStateSha256(statePath) {
126
+ return sha256File(statePath);
127
+ }
128
+ //#endregion
129
+ export { SYNC_REGISTRATION_VERSION, publishSyncRegistration, readSyncRegistration, syncStateSha256, validateSyncRegistration };
130
+
131
+ //# sourceMappingURL=sync-registration.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-registration.mjs","names":[],"sources":["../src/services/syncRegistration/index.ts"],"sourcesContent":["import crypto from 'node:crypto';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nimport { DOOM_SERVER_BUNDLE_FILE, parseDoomServerBundle } from '../../exports/serverFacet';\nimport { DOOM_PACKAGE_NAME } from '../doomPackage';\nimport { isRecord, writeFileAtomic } from '../json';\nimport {\n assertSyncLocationSafe,\n resolveSyncLocation,\n syncGenerationDirectory,\n type SyncIdentity,\n type SyncLocation,\n} from '../syncLocation';\n\n/** Stable protocol shared by sync, the managed dispatcher, and runtime consumers. */\nexport const SYNC_REGISTRATION_VERSION = 1;\n\nconst SHA256 = /^[a-f0-9]{64}$/u;\nconst PRIVATE_FILE_MODE = 0o600;\n\nexport interface SyncPackageRegistration {\n root: string;\n version: string;\n manifestPath: string;\n entry: string;\n}\n\nexport interface SyncServerBundleRegistration {\n path: string;\n sha256: string;\n fingerprint: string;\n}\n\nexport interface SyncRegistration {\n version: number;\n root: string;\n identity: SyncIdentity;\n generation: string;\n generationRoot: string;\n statePath: string;\n stateSha256: string;\n webDirectory: string | null;\n apiDirectory: string;\n /** Missing only for explicitly supported pre-cutover generations. */\n serverBundle?: SyncServerBundleRegistration;\n package: SyncPackageRegistration;\n}\n\nfunction canonicalPath(target: string): string {\n return fs.realpathSync.native(path.resolve(target));\n}\n\nfunction isInside(directory: string, target: string): boolean {\n const relative = path.relative(canonicalPath(directory), canonicalPath(target));\n return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative));\n}\n\nfunction requiredString(value: unknown, field: string, recordPath: string): string {\n if (typeof value !== 'string' || value === '') {\n throw new Error(`Doom sync registration at ${recordPath} has an invalid ${field}`);\n }\n return value;\n}\n\nfunction identityFrom(value: unknown, recordPath: string): SyncIdentity {\n if (!isRecord(value)) throw new Error(`Doom sync registration at ${recordPath} has no identity`);\n return {\n repositoryId: requiredString(value.repositoryId, 'repository id', recordPath),\n worktreeId: requiredString(value.worktreeId, 'worktree id', recordPath),\n };\n}\n\nfunction packageFrom(value: unknown, recordPath: string): SyncPackageRegistration {\n if (!isRecord(value)) throw new Error(`Doom sync registration at ${recordPath} has no package record`);\n return {\n root: requiredString(value.root, 'package root', recordPath),\n version: requiredString(value.version, 'package version', recordPath),\n manifestPath: requiredString(value.manifestPath, 'package manifest', recordPath),\n entry: requiredString(value.entry, 'package entry', recordPath),\n };\n}\n\nfunction sha256File(filePath: string): string {\n return crypto.createHash('sha256').update(fs.readFileSync(filePath)).digest('hex');\n}\n\nfunction validatePackage(value: SyncPackageRegistration, recordPath: string): void {\n const packageRoot = canonicalPath(value.root);\n if (packageRoot !== path.resolve(value.root)) {\n throw new Error(`Doom sync registration at ${recordPath} has a noncanonical package root`);\n }\n if (!isInside(packageRoot, value.manifestPath) || !isInside(packageRoot, value.entry)) {\n throw new Error(`Doom sync registration at ${recordPath} references package material outside ${packageRoot}`);\n }\n if (canonicalPath(value.manifestPath) !== canonicalPath(path.join(packageRoot, 'package.json'))) {\n throw new Error(`Doom sync registration at ${recordPath} has an invalid package manifest path`);\n }\n const manifest = JSON.parse(fs.readFileSync(value.manifestPath, 'utf8')) as {\n name?: unknown;\n version?: unknown;\n pi?: { extensions?: unknown };\n };\n if (manifest.name !== DOOM_PACKAGE_NAME || manifest.version !== value.version) {\n throw new Error(`Doom sync registration at ${recordPath} does not match its DoomPi package`);\n }\n const extensions = manifest.pi?.extensions;\n if (\n !Array.isArray(extensions) ||\n !extensions.some(\n (entry) =>\n typeof entry === 'string' && canonicalPath(path.resolve(packageRoot, entry)) === canonicalPath(value.entry),\n )\n ) {\n throw new Error(`Doom sync registration at ${recordPath} does not match the package Pi entry`);\n }\n}\n\n/** Validates one parsed registration against its canonical repository/worktree location. */\nexport function validateSyncRegistration(registration: SyncRegistration, location: SyncLocation): SyncRegistration {\n const recordPath = location.registrationPath;\n if (registration.version !== SYNC_REGISTRATION_VERSION) {\n throw new Error(`Unsupported Doom sync registration version at ${recordPath}`);\n }\n const canonicalRoot = canonicalPath(registration.root);\n if (canonicalRoot !== location.root || path.resolve(registration.root) !== canonicalRoot) {\n throw new Error(`Doom sync registration at ${recordPath} has an invalid repository root`);\n }\n if (\n registration.identity.repositoryId !== location.identity.repositoryId ||\n registration.identity.worktreeId !== location.identity.worktreeId\n ) {\n throw new Error(`Doom sync registration at ${recordPath} belongs to another repository or worktree`);\n }\n const expectedGenerationRoot = syncGenerationDirectory(location, registration.generation);\n if (path.resolve(registration.generationRoot) !== path.resolve(expectedGenerationRoot)) {\n throw new Error(`Doom sync registration at ${recordPath} has an invalid generation root`);\n }\n const generationStat = fs.lstatSync(registration.generationRoot, { throwIfNoEntry: false });\n if (!generationStat?.isDirectory() || generationStat.isSymbolicLink()) {\n throw new Error(`Doom sync registration at ${recordPath} has an unavailable generation`);\n }\n for (const target of [registration.statePath, registration.apiDirectory]) {\n if (!isInside(registration.generationRoot, target)) {\n throw new Error(`Doom sync registration at ${recordPath} references material outside its generation`);\n }\n }\n if (registration.webDirectory !== null && !isInside(registration.generationRoot, registration.webDirectory)) {\n throw new Error(`Doom sync registration at ${recordPath} references web material outside its generation`);\n }\n if (!SHA256.test(registration.stateSha256) || sha256File(registration.statePath) !== registration.stateSha256) {\n throw new Error(`Doom sync registration at ${recordPath} has a mismatched state hash`);\n }\n let state: Record<string, unknown> = {};\n try {\n const parsed: unknown = JSON.parse(fs.readFileSync(registration.statePath, 'utf8'));\n if (isRecord(parsed)) state = parsed;\n } catch (error) {\n // Legacy state validation remains the state reader's responsibility. New\n // descriptor generations require their state identity during admission.\n if (registration.serverBundle !== undefined) throw error;\n }\n if (registration.serverBundle !== undefined) {\n const bundle = registration.serverBundle;\n if (\n !isInside(registration.generationRoot, bundle.path) ||\n canonicalPath(bundle.path) !== canonicalPath(path.join(registration.apiDirectory, DOOM_SERVER_BUNDLE_FILE))\n ) {\n throw new Error(`Doom sync registration at ${recordPath} has an invalid server descriptor path`);\n }\n if (!SHA256.test(bundle.sha256) || sha256File(bundle.path) !== bundle.sha256) {\n throw new Error(`Doom sync registration at ${recordPath} has a mismatched server descriptor hash`);\n }\n const descriptor = parseDoomServerBundle(JSON.parse(fs.readFileSync(bundle.path, 'utf8')));\n const recorded = state.serverBundle;\n if (\n descriptor.generation !== registration.generation ||\n descriptor.fingerprint !== bundle.fingerprint ||\n !isRecord(recorded) ||\n recorded.fingerprint !== bundle.fingerprint ||\n recorded.descriptorPath !== bundle.path\n ) {\n throw new Error(`Doom sync registration at ${recordPath} has mismatched server bundle identity`);\n }\n } else if (state.serverBundle !== undefined) {\n throw new Error(`Doom sync registration at ${recordPath} is missing its server bundle record`);\n }\n validatePackage(registration.package, recordPath);\n return registration;\n}\n\nfunction parseRegistration(value: unknown, recordPath: string): SyncRegistration {\n if (!isRecord(value)) throw new Error(`Doom sync registration at ${recordPath} is not an object`);\n return {\n version: value.version as number,\n root: requiredString(value.root, 'repository root', recordPath),\n identity: identityFrom(value.identity, recordPath),\n generation: requiredString(value.generation, 'generation', recordPath),\n generationRoot: requiredString(value.generationRoot, 'generation root', recordPath),\n statePath: requiredString(value.statePath, 'state path', recordPath),\n stateSha256: requiredString(value.stateSha256, 'state hash', recordPath),\n webDirectory: value.webDirectory === null ? null : requiredString(value.webDirectory, 'web directory', recordPath),\n apiDirectory: requiredString(value.apiDirectory, 'API directory', recordPath),\n ...(value.serverBundle === undefined ? {} : { serverBundle: serverBundleFrom(value.serverBundle, recordPath) }),\n package: packageFrom(value.package, recordPath),\n };\n}\n\nfunction serverBundleFrom(value: unknown, recordPath: string): SyncServerBundleRegistration {\n if (!isRecord(value)) throw new Error(`Doom sync registration at ${recordPath} has an invalid server bundle record`);\n return {\n path: requiredString(value.path, 'server descriptor path', recordPath),\n sha256: requiredString(value.sha256, 'server descriptor hash', recordPath),\n fingerprint: requiredString(value.fingerprint, 'server descriptor fingerprint', recordPath),\n };\n}\n\n/** Reads only the exact registration for this repository/worktree. */\nexport function readSyncRegistration(repoRoot: string, homeDirectory?: string): SyncRegistration | undefined {\n const location = resolveSyncLocation(repoRoot, homeDirectory);\n if (!fs.existsSync(location.registrationPath)) return undefined;\n const parsed = parseRegistration(\n JSON.parse(fs.readFileSync(location.registrationPath, 'utf8')),\n location.registrationPath,\n );\n return validateSyncRegistration(parsed, location);\n}\n\n/** Atomically activates one fully staged generation for its worktree. */\nexport function publishSyncRegistration(\n repoRoot: string,\n registration: SyncRegistration,\n homeDirectory?: string,\n): string {\n const location = resolveSyncLocation(repoRoot, homeDirectory);\n assertSyncLocationSafe(location);\n validateSyncRegistration(registration, location);\n writeFileAtomic(location.registrationPath, `${JSON.stringify(registration, null, 2)}\\n`);\n fs.chmodSync(location.registrationPath, PRIVATE_FILE_MODE);\n return location.registrationPath;\n}\n\nexport function syncStateSha256(statePath: string): string {\n return sha256File(statePath);\n}\n"],"mappings":";;;;;;;;;;AAgBA,MAAa,4BAA4B;AAEzC,MAAM,SAAS;AACf,MAAM,oBAAoB;AA8B1B,SAAS,cAAc,QAAwB;CAC7C,OAAO,GAAG,aAAa,OAAO,KAAK,QAAQ,MAAM,CAAC;AACpD;AAEA,SAAS,SAAS,WAAmB,QAAyB;CAC5D,MAAM,WAAW,KAAK,SAAS,cAAc,SAAS,GAAG,cAAc,MAAM,CAAC;CAC9E,OAAO,aAAa,MAAO,CAAC,SAAS,WAAW,IAAI,KAAK,CAAC,KAAK,WAAW,QAAQ;AACpF;AAEA,SAAS,eAAe,OAAgB,OAAe,YAA4B;CACjF,IAAI,OAAO,UAAU,YAAY,UAAU,IACzC,MAAM,IAAI,MAAM,6BAA6B,WAAW,kBAAkB,OAAO;CAEnF,OAAO;AACT;AAEA,SAAS,aAAa,OAAgB,YAAkC;CACtE,IAAI,CAAC,SAAS,KAAK,GAAG,MAAM,IAAI,MAAM,6BAA6B,WAAW,iBAAiB;CAC/F,OAAO;EACL,cAAc,eAAe,MAAM,cAAc,iBAAiB,UAAU;EAC5E,YAAY,eAAe,MAAM,YAAY,eAAe,UAAU;CACxE;AACF;AAEA,SAAS,YAAY,OAAgB,YAA6C;CAChF,IAAI,CAAC,SAAS,KAAK,G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StateContract/index.ts
3
+ /**
4
+ * Bumped whenever the persisted sync-state shape changes.
5
+ *
6
+ * Version 13 carries the immutable MCP projection as file-only state. Older
7
+ * records relied on process environment and cannot safely select MCP servers
8
+ * after an in-process reload.
9
+ */
10
+ const SYNC_STATE_VERSION = 13;
11
+ /** Version 5 maps each composition fingerprint directly to its compiler manifest. */
12
+ const PRECOMPILE_STATE_VERSION = 5;
13
+ const BUNDLED_PRECOMPILE_STRATEGY = "bundle";
14
+ //#endregion
15
+ exports.BUNDLED_PRECOMPILE_STRATEGY = BUNDLED_PRECOMPILE_STRATEGY;
16
+ exports.PRECOMPILE_STATE_VERSION = PRECOMPILE_STATE_VERSION;
17
+ exports.SYNC_STATE_VERSION = SYNC_STATE_VERSION;
18
+
19
+ //# sourceMappingURL=sync-state-contract.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-state-contract.cjs","names":[],"sources":["../src/services/syncStateContract/index.ts"],"sourcesContent":["/**\n * Bumped whenever the persisted sync-state shape changes.\n *\n * Version 13 carries the immutable MCP projection as file-only state. Older\n * records relied on process environment and cannot safely select MCP servers\n * after an in-process reload.\n */\nexport const SYNC_STATE_VERSION = 13;\n\n/** Version 5 maps each composition fingerprint directly to its compiler manifest. */\nexport const PRECOMPILE_STATE_VERSION = 5;\n\nexport const BUNDLED_PRECOMPILE_STRATEGY = 'bundle';\n"],"mappings":";;;;;;;;;AAOA,MAAa,qBAAqB;;AAGlC,MAAa,2BAA2B;AAExC,MAAa,8BAA8B"}
@@ -0,0 +1,14 @@
1
+ //#region src/services/syncStateContract/index.d.ts
2
+ /**
3
+ * Bumped whenever the persisted sync-state shape changes.
4
+ *
5
+ * Version 13 carries the immutable MCP projection as file-only state. Older
6
+ * records relied on process environment and cannot safely select MCP servers
7
+ * after an in-process reload.
8
+ */
9
+ export declare const SYNC_STATE_VERSION = 13;
10
+ /** Version 5 maps each composition fingerprint directly to its compiler manifest. */
11
+ export declare const PRECOMPILE_STATE_VERSION = 5;
12
+ export declare const BUNDLED_PRECOMPILE_STRATEGY = "bundle";
13
+ //#endregion
14
+ //# sourceMappingURL=sync-state-contract.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-state-contract.d.cts","names":[],"sources":["../src/services/syncStateContract/index.ts"],"mappings":";;;;;;;;qBAOa;;qBAGA;qBAEA"}
@@ -0,0 +1,14 @@
1
+ //#region src/services/syncStateContract/index.d.ts
2
+ /**
3
+ * Bumped whenever the persisted sync-state shape changes.
4
+ *
5
+ * Version 13 carries the immutable MCP projection as file-only state. Older
6
+ * records relied on process environment and cannot safely select MCP servers
7
+ * after an in-process reload.
8
+ */
9
+ export declare const SYNC_STATE_VERSION = 13;
10
+ /** Version 5 maps each composition fingerprint directly to its compiler manifest. */
11
+ export declare const PRECOMPILE_STATE_VERSION = 5;
12
+ export declare const BUNDLED_PRECOMPILE_STRATEGY = "bundle";
13
+ //#endregion
14
+ //# sourceMappingURL=sync-state-contract.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-state-contract.d.mts","names":[],"sources":["../src/services/syncStateContract/index.ts"],"mappings":";;;;;;;;qBAOa;;qBAGA;qBAEA"}
@@ -0,0 +1,16 @@
1
+ //#region src/services/syncStateContract/index.ts
2
+ /**
3
+ * Bumped whenever the persisted sync-state shape changes.
4
+ *
5
+ * Version 13 carries the immutable MCP projection as file-only state. Older
6
+ * records relied on process environment and cannot safely select MCP servers
7
+ * after an in-process reload.
8
+ */
9
+ const SYNC_STATE_VERSION = 13;
10
+ /** Version 5 maps each composition fingerprint directly to its compiler manifest. */
11
+ const PRECOMPILE_STATE_VERSION = 5;
12
+ const BUNDLED_PRECOMPILE_STRATEGY = "bundle";
13
+ //#endregion
14
+ export { BUNDLED_PRECOMPILE_STRATEGY, PRECOMPILE_STATE_VERSION, SYNC_STATE_VERSION };
15
+
16
+ //# sourceMappingURL=sync-state-contract.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-state-contract.mjs","names":[],"sources":["../src/services/syncStateContract/index.ts"],"sourcesContent":["/**\n * Bumped whenever the persisted sync-state shape changes.\n *\n * Version 13 carries the immutable MCP projection as file-only state. Older\n * records relied on process environment and cannot safely select MCP servers\n * after an in-process reload.\n */\nexport const SYNC_STATE_VERSION = 13;\n\n/** Version 5 maps each composition fingerprint directly to its compiler manifest. */\nexport const PRECOMPILE_STATE_VERSION = 5;\n\nexport const BUNDLED_PRECOMPILE_STRATEGY = 'bundle';\n"],"mappings":";;;;;;;;AAOA,MAAa,qBAAqB;;AAGlC,MAAa,2BAA2B;AAExC,MAAa,8BAA8B"}