@agimon-ai/po-core 0.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1218) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +7 -0
  3. package/dist/_virtual/_rolldown/runtime.cjs +23 -0
  4. package/dist/agentModel.cjs +4 -0
  5. package/dist/agentModel.d.mts +2 -0
  6. package/dist/agentModel.mjs +2 -0
  7. package/dist/apiContracts.cjs +2094 -0
  8. package/dist/apiContracts.cjs.map +1 -0
  9. package/dist/apiContracts.d.mts +1086 -0
  10. package/dist/apiContracts.d.mts.map +1 -0
  11. package/dist/apiContracts.mjs +2074 -0
  12. package/dist/apiContracts.mjs.map +1 -0
  13. package/dist/askUser.cjs +8 -0
  14. package/dist/askUser.d.mts +2 -0
  15. package/dist/askUser.mjs +2 -0
  16. package/dist/authorTools.cjs +5 -0
  17. package/dist/authorTools.d.mts +2 -0
  18. package/dist/authorTools.mjs +2 -0
  19. package/dist/backgroundWork.cjs +9 -0
  20. package/dist/backgroundWork.d.mts +2 -0
  21. package/dist/backgroundWork.mjs +2 -0
  22. package/dist/bundleAssetPolicy.cjs +5 -0
  23. package/dist/bundleAssetPolicy.d.mts +2 -0
  24. package/dist/bundleAssetPolicy.mjs +2 -0
  25. package/dist/childProcess.cjs +15 -0
  26. package/dist/childProcess.d.mts +2 -0
  27. package/dist/childProcess.mjs +2 -0
  28. package/dist/childSession.cjs +9 -0
  29. package/dist/childSession.d.mts +3 -0
  30. package/dist/childSession.mjs +3 -0
  31. package/dist/cockpitContainer.cjs +4 -0
  32. package/dist/cockpitContainer.d.mts +2 -0
  33. package/dist/cockpitContainer.mjs +2 -0
  34. package/dist/config.cjs +13 -0
  35. package/dist/config.d.mts +3 -0
  36. package/dist/config.mjs +2 -0
  37. package/dist/contextApi.cjs +12 -0
  38. package/dist/contextApi.d.mts +4 -0
  39. package/dist/contextApi.mjs +3 -0
  40. package/dist/contextContributions.cjs +7 -0
  41. package/dist/contextContributions.d.mts +3 -0
  42. package/dist/contextContributions.mjs +3 -0
  43. package/dist/contextDetail.cjs +65 -0
  44. package/dist/contextDetail.cjs.map +1 -0
  45. package/dist/contextDetail.d.mts +19 -0
  46. package/dist/contextDetail.d.mts.map +1 -0
  47. package/dist/contextDetail.mjs +64 -0
  48. package/dist/contextDetail.mjs.map +1 -0
  49. package/dist/contextDetailStore.cjs +96 -0
  50. package/dist/contextDetailStore.cjs.map +1 -0
  51. package/dist/contextDetailStore.d.mts +21 -0
  52. package/dist/contextDetailStore.d.mts.map +1 -0
  53. package/dist/contextDetailStore.mjs +87 -0
  54. package/dist/contextDetailStore.mjs.map +1 -0
  55. package/dist/contextProjection.cjs +121 -0
  56. package/dist/contextProjection.cjs.map +1 -0
  57. package/dist/contextProjection.d.mts +130 -0
  58. package/dist/contextProjection.d.mts.map +1 -0
  59. package/dist/contextProjection.mjs +117 -0
  60. package/dist/contextProjection.mjs.map +1 -0
  61. package/dist/cordisHost.cjs +13 -0
  62. package/dist/cordisHost.d.mts +2 -0
  63. package/dist/cordisHost.mjs +2 -0
  64. package/dist/delegation.cjs +18 -0
  65. package/dist/delegation.d.mts +2 -0
  66. package/dist/delegation.mjs +2 -0
  67. package/dist/doomPackage.cjs +61 -0
  68. package/dist/doomPackage.cjs.map +1 -0
  69. package/dist/doomPackage.d.mts +17 -0
  70. package/dist/doomPackage.d.mts.map +1 -0
  71. package/dist/doomPackage.mjs +54 -0
  72. package/dist/doomPackage.mjs.map +1 -0
  73. package/dist/executionBudget.cjs +232 -0
  74. package/dist/executionBudget.cjs.map +1 -0
  75. package/dist/executionBudget.d.mts +11 -0
  76. package/dist/executionBudget.d.mts.map +1 -0
  77. package/dist/executionBudget.mjs +226 -0
  78. package/dist/executionBudget.mjs.map +1 -0
  79. package/dist/extensionFile.cjs +19 -0
  80. package/dist/extensionFile.d.mts +3 -0
  81. package/dist/extensionFile.mjs +2 -0
  82. package/dist/footer.cjs +6 -0
  83. package/dist/footer.d.mts +2 -0
  84. package/dist/footer.mjs +2 -0
  85. package/dist/headless.cjs +16 -0
  86. package/dist/headless.d.mts +2 -0
  87. package/dist/headless.mjs +2 -0
  88. package/dist/headlessHub.cjs +1008 -0
  89. package/dist/headlessHub.cjs.map +1 -0
  90. package/dist/headlessHub.d.mts +176 -0
  91. package/dist/headlessHub.d.mts.map +1 -0
  92. package/dist/headlessHub.mjs +1005 -0
  93. package/dist/headlessHub.mjs.map +1 -0
  94. package/dist/headlessServer.cjs +956 -0
  95. package/dist/headlessServer.cjs.map +1 -0
  96. package/dist/headlessServer.d.mts +66 -0
  97. package/dist/headlessServer.d.mts.map +1 -0
  98. package/dist/headlessServer.mjs +949 -0
  99. package/dist/headlessServer.mjs.map +1 -0
  100. package/dist/headlessSessionHost.cjs +0 -0
  101. package/dist/headlessSessionHost.d.mts +89 -0
  102. package/dist/headlessSessionHost.d.mts.map +1 -0
  103. package/dist/headlessSessionHost.mjs +1 -0
  104. package/dist/headlessSessionManager.cjs +51 -0
  105. package/dist/headlessSessionManager.cjs.map +1 -0
  106. package/dist/headlessSessionManager.d.mts +6 -0
  107. package/dist/headlessSessionManager.d.mts.map +1 -0
  108. package/dist/headlessSessionManager.mjs +50 -0
  109. package/dist/headlessSessionManager.mjs.map +1 -0
  110. package/dist/help.cjs +24 -0
  111. package/dist/help.d.mts +3 -0
  112. package/dist/help.mjs +3 -0
  113. package/dist/history.cjs +25 -0
  114. package/dist/history.d.mts +10 -0
  115. package/dist/history.mjs +10 -0
  116. package/dist/historyOwnership.cjs +253 -0
  117. package/dist/historyOwnership.cjs.map +1 -0
  118. package/dist/historyOwnership.d.mts +23 -0
  119. package/dist/historyOwnership.d.mts.map +1 -0
  120. package/dist/historyOwnership.mjs +247 -0
  121. package/dist/historyOwnership.mjs.map +1 -0
  122. package/dist/hubChannel.cjs +4 -0
  123. package/dist/hubChannel.d.mts +2 -0
  124. package/dist/hubChannel.mjs +2 -0
  125. package/dist/index.cjs +44 -0
  126. package/dist/index.d.mts +6 -0
  127. package/dist/index.mjs +6 -0
  128. package/dist/json.cjs +6 -0
  129. package/dist/json.d.mts +2 -0
  130. package/dist/json.mjs +2 -0
  131. package/dist/jsonlSessionRepo.cjs +44 -0
  132. package/dist/jsonlSessionRepo.cjs.map +1 -0
  133. package/dist/jsonlSessionRepo.d.mts +7 -0
  134. package/dist/jsonlSessionRepo.d.mts.map +1 -0
  135. package/dist/jsonlSessionRepo.mjs +42 -0
  136. package/dist/jsonlSessionRepo.mjs.map +1 -0
  137. package/dist/kernel.cjs +3 -0
  138. package/dist/kernel.d.mts +3 -0
  139. package/dist/kernel.mjs +2 -0
  140. package/dist/leader.cjs +9 -0
  141. package/dist/leader.d.mts +2 -0
  142. package/dist/leader.mjs +2 -0
  143. package/dist/logSinkTelemetry.cjs +5 -0
  144. package/dist/logSinkTelemetry.d.mts +2 -0
  145. package/dist/logSinkTelemetry.mjs +2 -0
  146. package/dist/machineApi.cjs +92 -0
  147. package/dist/machineApi.cjs.map +1 -0
  148. package/dist/machineApi.d.mts +7 -0
  149. package/dist/machineApi.d.mts.map +1 -0
  150. package/dist/machineApi.mjs +88 -0
  151. package/dist/machineApi.mjs.map +1 -0
  152. package/dist/main.cjs +11 -0
  153. package/dist/main.d.mts +5 -0
  154. package/dist/main.mjs +4 -0
  155. package/dist/mcpFacet.cjs +9 -0
  156. package/dist/mcpFacet.d.mts +4 -0
  157. package/dist/mcpFacet.mjs +3 -0
  158. package/dist/mcpProjection.cjs +16 -0
  159. package/dist/mcpProjection.d.mts +2 -0
  160. package/dist/mcpProjection.mjs +2 -0
  161. package/dist/mcpSchemaCost.cjs +195 -0
  162. package/dist/mcpSchemaCost.cjs.map +1 -0
  163. package/dist/mcpSchemaCost.d.mts +35 -0
  164. package/dist/mcpSchemaCost.d.mts.map +1 -0
  165. package/dist/mcpSchemaCost.mjs +190 -0
  166. package/dist/mcpSchemaCost.mjs.map +1 -0
  167. package/dist/mcpSession.cjs +9 -0
  168. package/dist/mcpSession.d.mts +2 -0
  169. package/dist/mcpSession.mjs +2 -0
  170. package/dist/mcpStatus.cjs +7 -0
  171. package/dist/mcpStatus.d.mts +2 -0
  172. package/dist/mcpStatus.mjs +2 -0
  173. package/dist/mcpToolResolver.cjs +5 -0
  174. package/dist/mcpToolResolver.d.mts +2 -0
  175. package/dist/mcpToolResolver.mjs +2 -0
  176. package/dist/mcpWidget.cjs +0 -0
  177. package/dist/mcpWidget.d.mts +2 -0
  178. package/dist/mcpWidget.mjs +1 -0
  179. package/dist/moduleResolution.cjs +412 -0
  180. package/dist/moduleResolution.cjs.map +1 -0
  181. package/dist/moduleResolution.d.mts +72 -0
  182. package/dist/moduleResolution.d.mts.map +1 -0
  183. package/dist/moduleResolution.mjs +396 -0
  184. package/dist/moduleResolution.mjs.map +1 -0
  185. package/dist/narration.cjs +10 -0
  186. package/dist/narration.d.mts +2 -0
  187. package/dist/narration.mjs +2 -0
  188. package/dist/native.cjs +29 -0
  189. package/dist/native.d.mts +12 -0
  190. package/dist/native.mjs +8 -0
  191. package/dist/notification.cjs +17 -0
  192. package/dist/notification.d.mts +2 -0
  193. package/dist/notification.mjs +2 -0
  194. package/dist/packageApi.cjs +17 -0
  195. package/dist/packageApi.d.mts +3 -0
  196. package/dist/packageApi.mjs +3 -0
  197. package/dist/packageApiServer.cjs +196 -0
  198. package/dist/packageApiServer.cjs.map +1 -0
  199. package/dist/packageApiServer.d.mts +62 -0
  200. package/dist/packageApiServer.d.mts.map +1 -0
  201. package/dist/packageApiServer.mjs +194 -0
  202. package/dist/packageApiServer.mjs.map +1 -0
  203. package/dist/piSettings.cjs +20 -0
  204. package/dist/piSettings.d.mts +2 -0
  205. package/dist/piSettings.mjs +2 -0
  206. package/dist/pluginProtocol.cjs +10 -0
  207. package/dist/pluginProtocol.d.mts +2 -0
  208. package/dist/pluginProtocol.mjs +2 -0
  209. package/dist/profileIdentity.cjs +6 -0
  210. package/dist/profileIdentity.d.mts +2 -0
  211. package/dist/profileIdentity.mjs +2 -0
  212. package/dist/protocol.cjs +10 -0
  213. package/dist/protocol.d.mts +2 -0
  214. package/dist/protocol.mjs +2 -0
  215. package/dist/readiness.cjs +8 -0
  216. package/dist/readiness.d.mts +2 -0
  217. package/dist/readiness.mjs +2 -0
  218. package/dist/remoteApi.cjs +45 -0
  219. package/dist/remoteApi.cjs.map +1 -0
  220. package/dist/remoteApi.d.mts +7 -0
  221. package/dist/remoteApi.d.mts.map +1 -0
  222. package/dist/remoteApi.mjs +44 -0
  223. package/dist/remoteApi.mjs.map +1 -0
  224. package/dist/remoteRuntime.cjs +498 -0
  225. package/dist/remoteRuntime.cjs.map +1 -0
  226. package/dist/remoteRuntime.d.mts +36 -0
  227. package/dist/remoteRuntime.d.mts.map +1 -0
  228. package/dist/remoteRuntime.mjs +494 -0
  229. package/dist/remoteRuntime.mjs.map +1 -0
  230. package/dist/runtimeConfig.cjs +232 -0
  231. package/dist/runtimeConfig.cjs.map +1 -0
  232. package/dist/runtimeConfig.d.mts +313 -0
  233. package/dist/runtimeConfig.d.mts.map +1 -0
  234. package/dist/runtimeConfig.mjs +221 -0
  235. package/dist/runtimeConfig.mjs.map +1 -0
  236. package/dist/runtimeContextApi.cjs +64 -0
  237. package/dist/runtimeContextApi.cjs.map +1 -0
  238. package/dist/runtimeContextApi.d.mts +16 -0
  239. package/dist/runtimeContextApi.d.mts.map +1 -0
  240. package/dist/runtimeContextApi.mjs +62 -0
  241. package/dist/runtimeContextApi.mjs.map +1 -0
  242. package/dist/runtimeCordisHost.cjs +223 -0
  243. package/dist/runtimeCordisHost.cjs.map +1 -0
  244. package/dist/runtimeCordisHost.d.mts +78 -0
  245. package/dist/runtimeCordisHost.d.mts.map +1 -0
  246. package/dist/runtimeCordisHost.mjs +212 -0
  247. package/dist/runtimeCordisHost.mjs.map +1 -0
  248. package/dist/runtimeHeadlessSessionManager.cjs +0 -0
  249. package/dist/runtimeHeadlessSessionManager.d.mts +18 -0
  250. package/dist/runtimeHeadlessSessionManager.d.mts.map +1 -0
  251. package/dist/runtimeHeadlessSessionManager.mjs +1 -0
  252. package/dist/runtimeIdentity.cjs +26 -0
  253. package/dist/runtimeIdentity.cjs.map +1 -0
  254. package/dist/runtimeIdentity.d.mts +7 -0
  255. package/dist/runtimeIdentity.d.mts.map +1 -0
  256. package/dist/runtimeIdentity.mjs +21 -0
  257. package/dist/runtimeIdentity.mjs.map +1 -0
  258. package/dist/runtimeJson.cjs +46 -0
  259. package/dist/runtimeJson.cjs.map +1 -0
  260. package/dist/runtimeJson.d.mts +22 -0
  261. package/dist/runtimeJson.d.mts.map +1 -0
  262. package/dist/runtimeJson.mjs +39 -0
  263. package/dist/runtimeJson.mjs.map +1 -0
  264. package/dist/runtimeLogSinkTelemetry.cjs +102 -0
  265. package/dist/runtimeLogSinkTelemetry.cjs.map +1 -0
  266. package/dist/runtimeLogSinkTelemetry.d.mts +49 -0
  267. package/dist/runtimeLogSinkTelemetry.d.mts.map +1 -0
  268. package/dist/runtimeLogSinkTelemetry.mjs +99 -0
  269. package/dist/runtimeLogSinkTelemetry.mjs.map +1 -0
  270. package/dist/runtimePackages.cjs +120 -0
  271. package/dist/runtimePackages.cjs.map +1 -0
  272. package/dist/runtimePackages.d.mts +57 -0
  273. package/dist/runtimePackages.d.mts.map +1 -0
  274. package/dist/runtimePackages.mjs +110 -0
  275. package/dist/runtimePackages.mjs.map +1 -0
  276. package/dist/runtimePiSettings.cjs +257 -0
  277. package/dist/runtimePiSettings.cjs.map +1 -0
  278. package/dist/runtimePiSettings.d.mts +70 -0
  279. package/dist/runtimePiSettings.d.mts.map +1 -0
  280. package/dist/runtimePiSettings.mjs +235 -0
  281. package/dist/runtimePiSettings.mjs.map +1 -0
  282. package/dist/runtimeProtocol.cjs +228 -0
  283. package/dist/runtimeProtocol.cjs.map +1 -0
  284. package/dist/runtimeProtocol.d.mts +86 -0
  285. package/dist/runtimeProtocol.d.mts.map +1 -0
  286. package/dist/runtimeProtocol.mjs +219 -0
  287. package/dist/runtimeProtocol.mjs.map +1 -0
  288. package/dist/runtimeToolNames.cjs +51 -0
  289. package/dist/runtimeToolNames.cjs.map +1 -0
  290. package/dist/runtimeToolNames.d.mts +24 -0
  291. package/dist/runtimeToolNames.d.mts.map +1 -0
  292. package/dist/runtimeToolNames.mjs +49 -0
  293. package/dist/runtimeToolNames.mjs.map +1 -0
  294. package/dist/runtimeTransition.cjs +27 -0
  295. package/dist/runtimeTransition.cjs.map +1 -0
  296. package/dist/runtimeTransition.d.mts +114 -0
  297. package/dist/runtimeTransition.d.mts.map +1 -0
  298. package/dist/runtimeTransition.mjs +24 -0
  299. package/dist/runtimeTransition.mjs.map +1 -0
  300. package/dist/sandboxHarness.cjs +6 -0
  301. package/dist/sandboxHarness.d.mts +2 -0
  302. package/dist/sandboxHarness.mjs +2 -0
  303. package/dist/server.cjs +17 -0
  304. package/dist/server.d.mts +10 -0
  305. package/dist/server.mjs +7 -0
  306. package/dist/serverFacet.cjs +34 -0
  307. package/dist/serverFacet.d.mts +10 -0
  308. package/dist/serverFacet.mjs +9 -0
  309. package/dist/serverTelemetry.cjs +25 -0
  310. package/dist/serverTelemetry.cjs.map +1 -0
  311. package/dist/serverTelemetry.d.mts +12 -0
  312. package/dist/serverTelemetry.d.mts.map +1 -0
  313. package/dist/serverTelemetry.mjs +23 -0
  314. package/dist/serverTelemetry.mjs.map +1 -0
  315. package/dist/sessionFilesApi.cjs +96 -0
  316. package/dist/sessionFilesApi.cjs.map +1 -0
  317. package/dist/sessionFilesApi.d.mts +7 -0
  318. package/dist/sessionFilesApi.d.mts.map +1 -0
  319. package/dist/sessionFilesApi.mjs +91 -0
  320. package/dist/sessionFilesApi.mjs.map +1 -0
  321. package/dist/sessionMcp.cjs +6 -0
  322. package/dist/sessionMcp.d.mts +5 -0
  323. package/dist/sessionMcp.mjs +3 -0
  324. package/dist/sessionProtocol.cjs +8 -0
  325. package/dist/sessionProtocol.d.mts +3 -0
  326. package/dist/sessionProtocol.mjs +2 -0
  327. package/dist/skills.cjs +9 -0
  328. package/dist/skills.d.mts +2 -0
  329. package/dist/skills.mjs +2 -0
  330. package/dist/sqliteSessionStorage.cjs +168 -0
  331. package/dist/sqliteSessionStorage.cjs.map +1 -0
  332. package/dist/sqliteSessionStorage.d.mts +35 -0
  333. package/dist/sqliteSessionStorage.d.mts.map +1 -0
  334. package/dist/sqliteSessionStorage.mjs +158 -0
  335. package/dist/sqliteSessionStorage.mjs.map +1 -0
  336. package/dist/src/constants/authorTools.cjs +10 -0
  337. package/dist/src/constants/authorTools.cjs.map +1 -0
  338. package/dist/src/constants/authorTools.d.mts +6 -0
  339. package/dist/src/constants/authorTools.d.mts.map +1 -0
  340. package/dist/src/constants/authorTools.mjs +8 -0
  341. package/dist/src/constants/authorTools.mjs.map +1 -0
  342. package/dist/src/constants/contextApi.cjs +31 -0
  343. package/dist/src/constants/contextApi.cjs.map +1 -0
  344. package/dist/src/constants/contextApi.d.mts +23 -0
  345. package/dist/src/constants/contextApi.d.mts.map +1 -0
  346. package/dist/src/constants/contextApi.mjs +25 -0
  347. package/dist/src/constants/contextApi.mjs.map +1 -0
  348. package/dist/src/constants/nativeHost.cjs +56 -0
  349. package/dist/src/constants/nativeHost.cjs.map +1 -0
  350. package/dist/src/constants/nativeHost.d.mts +21 -0
  351. package/dist/src/constants/nativeHost.d.mts.map +1 -0
  352. package/dist/src/constants/nativeHost.mjs +53 -0
  353. package/dist/src/constants/nativeHost.mjs.map +1 -0
  354. package/dist/src/constants/remote.cjs +132 -0
  355. package/dist/src/constants/remote.cjs.map +1 -0
  356. package/dist/src/constants/remote.mjs +99 -0
  357. package/dist/src/constants/remote.mjs.map +1 -0
  358. package/dist/src/constants/sessionFiles.cjs +27 -0
  359. package/dist/src/constants/sessionFiles.cjs.map +1 -0
  360. package/dist/src/constants/sessionFiles.mjs +25 -0
  361. package/dist/src/constants/sessionFiles.mjs.map +1 -0
  362. package/dist/src/constants/voiceReloadHandoff.cjs +12 -0
  363. package/dist/src/constants/voiceReloadHandoff.cjs.map +1 -0
  364. package/dist/src/constants/voiceReloadHandoff.d.mts +7 -0
  365. package/dist/src/constants/voiceReloadHandoff.d.mts.map +1 -0
  366. package/dist/src/constants/voiceReloadHandoff.mjs +9 -0
  367. package/dist/src/constants/voiceReloadHandoff.mjs.map +1 -0
  368. package/dist/src/constants/voiceTools.cjs +96 -0
  369. package/dist/src/constants/voiceTools.cjs.map +1 -0
  370. package/dist/src/constants/voiceTools.d.mts +58 -0
  371. package/dist/src/constants/voiceTools.d.mts.map +1 -0
  372. package/dist/src/constants/voiceTools.mjs +60 -0
  373. package/dist/src/constants/voiceTools.mjs.map +1 -0
  374. package/dist/src/extensions/extensionFile.cjs +140 -0
  375. package/dist/src/extensions/extensionFile.cjs.map +1 -0
  376. package/dist/src/extensions/extensionFile.d.mts +69 -0
  377. package/dist/src/extensions/extensionFile.d.mts.map +1 -0
  378. package/dist/src/extensions/extensionFile.mjs +124 -0
  379. package/dist/src/extensions/extensionFile.mjs.map +1 -0
  380. package/dist/src/extensions/serverPlugin.cjs +107 -0
  381. package/dist/src/extensions/serverPlugin.cjs.map +1 -0
  382. package/dist/src/extensions/serverPlugin.d.mts +5 -0
  383. package/dist/src/extensions/serverPlugin.d.mts.map +1 -0
  384. package/dist/src/extensions/serverPlugin.mjs +107 -0
  385. package/dist/src/extensions/serverPlugin.mjs.map +1 -0
  386. package/dist/src/extensions/webPlugin.cjs +136 -0
  387. package/dist/src/extensions/webPlugin.cjs.map +1 -0
  388. package/dist/src/extensions/webPlugin.d.mts +68 -0
  389. package/dist/src/extensions/webPlugin.d.mts.map +1 -0
  390. package/dist/src/extensions/webPlugin.mjs +114 -0
  391. package/dist/src/extensions/webPlugin.mjs.map +1 -0
  392. package/dist/src/pi/piSessionRuntime.cjs +625 -0
  393. package/dist/src/pi/piSessionRuntime.cjs.map +1 -0
  394. package/dist/src/pi/piSessionRuntime.d.mts +43 -0
  395. package/dist/src/pi/piSessionRuntime.d.mts.map +1 -0
  396. package/dist/src/pi/piSessionRuntime.mjs +624 -0
  397. package/dist/src/pi/piSessionRuntime.mjs.map +1 -0
  398. package/dist/src/pi/piWebSocketListener.cjs +115 -0
  399. package/dist/src/pi/piWebSocketListener.cjs.map +1 -0
  400. package/dist/src/pi/piWebSocketListener.mjs +115 -0
  401. package/dist/src/pi/piWebSocketListener.mjs.map +1 -0
  402. package/dist/src/schemas/agentModel.cjs +33 -0
  403. package/dist/src/schemas/agentModel.cjs.map +1 -0
  404. package/dist/src/schemas/agentModel.d.mts +26 -0
  405. package/dist/src/schemas/agentModel.d.mts.map +1 -0
  406. package/dist/src/schemas/agentModel.mjs +32 -0
  407. package/dist/src/schemas/agentModel.mjs.map +1 -0
  408. package/dist/src/schemas/apiContracts.d.mts +58 -0
  409. package/dist/src/schemas/apiContracts.d.mts.map +1 -0
  410. package/dist/src/schemas/askUser.cjs +42 -0
  411. package/dist/src/schemas/askUser.cjs.map +1 -0
  412. package/dist/src/schemas/askUser.d.mts +47 -0
  413. package/dist/src/schemas/askUser.d.mts.map +1 -0
  414. package/dist/src/schemas/askUser.mjs +37 -0
  415. package/dist/src/schemas/askUser.mjs.map +1 -0
  416. package/dist/src/schemas/backgroundWork.cjs +44 -0
  417. package/dist/src/schemas/backgroundWork.cjs.map +1 -0
  418. package/dist/src/schemas/backgroundWork.d.mts +76 -0
  419. package/dist/src/schemas/backgroundWork.d.mts.map +1 -0
  420. package/dist/src/schemas/backgroundWork.mjs +38 -0
  421. package/dist/src/schemas/backgroundWork.mjs.map +1 -0
  422. package/dist/src/schemas/childProcess.cjs +67 -0
  423. package/dist/src/schemas/childProcess.cjs.map +1 -0
  424. package/dist/src/schemas/childProcess.d.mts +30 -0
  425. package/dist/src/schemas/childProcess.d.mts.map +1 -0
  426. package/dist/src/schemas/childProcess.mjs +55 -0
  427. package/dist/src/schemas/childProcess.mjs.map +1 -0
  428. package/dist/src/schemas/cockpitContainer.cjs +31 -0
  429. package/dist/src/schemas/cockpitContainer.cjs.map +1 -0
  430. package/dist/src/schemas/cockpitContainer.d.mts +80 -0
  431. package/dist/src/schemas/cockpitContainer.d.mts.map +1 -0
  432. package/dist/src/schemas/cockpitContainer.mjs +30 -0
  433. package/dist/src/schemas/cockpitContainer.mjs.map +1 -0
  434. package/dist/src/schemas/contextContributions.cjs +17 -0
  435. package/dist/src/schemas/contextContributions.cjs.map +1 -0
  436. package/dist/src/schemas/contextContributions.d.mts +49 -0
  437. package/dist/src/schemas/contextContributions.d.mts.map +1 -0
  438. package/dist/src/schemas/contextContributions.mjs +15 -0
  439. package/dist/src/schemas/contextContributions.mjs.map +1 -0
  440. package/dist/src/schemas/delegation.cjs +91 -0
  441. package/dist/src/schemas/delegation.cjs.map +1 -0
  442. package/dist/src/schemas/delegation.d.mts +95 -0
  443. package/dist/src/schemas/delegation.d.mts.map +1 -0
  444. package/dist/src/schemas/delegation.mjs +76 -0
  445. package/dist/src/schemas/delegation.mjs.map +1 -0
  446. package/dist/src/schemas/extensionFile.d.mts +116 -0
  447. package/dist/src/schemas/extensionFile.d.mts.map +1 -0
  448. package/dist/src/schemas/footer.cjs +48 -0
  449. package/dist/src/schemas/footer.cjs.map +1 -0
  450. package/dist/src/schemas/footer.d.mts +48 -0
  451. package/dist/src/schemas/footer.d.mts.map +1 -0
  452. package/dist/src/schemas/footer.mjs +45 -0
  453. package/dist/src/schemas/footer.mjs.map +1 -0
  454. package/dist/src/schemas/headless.cjs +97 -0
  455. package/dist/src/schemas/headless.cjs.map +1 -0
  456. package/dist/src/schemas/headless.d.mts +472 -0
  457. package/dist/src/schemas/headless.d.mts.map +1 -0
  458. package/dist/src/schemas/headless.mjs +84 -0
  459. package/dist/src/schemas/headless.mjs.map +1 -0
  460. package/dist/src/schemas/help.cjs +281 -0
  461. package/dist/src/schemas/help.cjs.map +1 -0
  462. package/dist/src/schemas/help.d.mts +119 -0
  463. package/dist/src/schemas/help.d.mts.map +1 -0
  464. package/dist/src/schemas/help.mjs +262 -0
  465. package/dist/src/schemas/help.mjs.map +1 -0
  466. package/dist/src/schemas/hubChannel.cjs +20 -0
  467. package/dist/src/schemas/hubChannel.cjs.map +1 -0
  468. package/dist/src/schemas/hubChannel.d.mts +271 -0
  469. package/dist/src/schemas/hubChannel.d.mts.map +1 -0
  470. package/dist/src/schemas/hubChannel.mjs +19 -0
  471. package/dist/src/schemas/hubChannel.mjs.map +1 -0
  472. package/dist/src/schemas/leader.cjs +57 -0
  473. package/dist/src/schemas/leader.cjs.map +1 -0
  474. package/dist/src/schemas/leader.d.mts +107 -0
  475. package/dist/src/schemas/leader.d.mts.map +1 -0
  476. package/dist/src/schemas/leader.mjs +51 -0
  477. package/dist/src/schemas/leader.mjs.map +1 -0
  478. package/dist/src/schemas/mcpBundle.d.mts +13 -0
  479. package/dist/src/schemas/mcpBundle.d.mts.map +1 -0
  480. package/dist/src/schemas/mcpFacet.cjs +24 -0
  481. package/dist/src/schemas/mcpFacet.cjs.map +1 -0
  482. package/dist/src/schemas/mcpFacet.d.mts +91 -0
  483. package/dist/src/schemas/mcpFacet.d.mts.map +1 -0
  484. package/dist/src/schemas/mcpFacet.mjs +21 -0
  485. package/dist/src/schemas/mcpFacet.mjs.map +1 -0
  486. package/dist/src/schemas/mcpProjection.cjs +117 -0
  487. package/dist/src/schemas/mcpProjection.cjs.map +1 -0
  488. package/dist/src/schemas/mcpProjection.d.mts +124 -0
  489. package/dist/src/schemas/mcpProjection.d.mts.map +1 -0
  490. package/dist/src/schemas/mcpProjection.mjs +104 -0
  491. package/dist/src/schemas/mcpProjection.mjs.map +1 -0
  492. package/dist/src/schemas/mcpSession.cjs +57 -0
  493. package/dist/src/schemas/mcpSession.cjs.map +1 -0
  494. package/dist/src/schemas/mcpSession.d.mts +57 -0
  495. package/dist/src/schemas/mcpSession.d.mts.map +1 -0
  496. package/dist/src/schemas/mcpSession.mjs +51 -0
  497. package/dist/src/schemas/mcpSession.mjs.map +1 -0
  498. package/dist/src/schemas/mcpStatus.cjs +52 -0
  499. package/dist/src/schemas/mcpStatus.cjs.map +1 -0
  500. package/dist/src/schemas/mcpStatus.d.mts +73 -0
  501. package/dist/src/schemas/mcpStatus.d.mts.map +1 -0
  502. package/dist/src/schemas/mcpStatus.mjs +48 -0
  503. package/dist/src/schemas/mcpStatus.mjs.map +1 -0
  504. package/dist/src/schemas/mcpToolResolver.cjs +17 -0
  505. package/dist/src/schemas/mcpToolResolver.cjs.map +1 -0
  506. package/dist/src/schemas/mcpToolResolver.d.mts +24 -0
  507. package/dist/src/schemas/mcpToolResolver.d.mts.map +1 -0
  508. package/dist/src/schemas/mcpToolResolver.mjs +15 -0
  509. package/dist/src/schemas/mcpToolResolver.mjs.map +1 -0
  510. package/dist/src/schemas/narration.cjs +54 -0
  511. package/dist/src/schemas/narration.cjs.map +1 -0
  512. package/dist/src/schemas/narration.d.mts +29 -0
  513. package/dist/src/schemas/narration.d.mts.map +1 -0
  514. package/dist/src/schemas/narration.mjs +47 -0
  515. package/dist/src/schemas/narration.mjs.map +1 -0
  516. package/dist/src/schemas/notification.cjs +122 -0
  517. package/dist/src/schemas/notification.cjs.map +1 -0
  518. package/dist/src/schemas/notification.d.mts +48 -0
  519. package/dist/src/schemas/notification.d.mts.map +1 -0
  520. package/dist/src/schemas/notification.mjs +108 -0
  521. package/dist/src/schemas/notification.mjs.map +1 -0
  522. package/dist/src/schemas/packageApi.cjs +76 -0
  523. package/dist/src/schemas/packageApi.cjs.map +1 -0
  524. package/dist/src/schemas/packageApi.d.mts +302 -0
  525. package/dist/src/schemas/packageApi.d.mts.map +1 -0
  526. package/dist/src/schemas/packageApi.mjs +66 -0
  527. package/dist/src/schemas/packageApi.mjs.map +1 -0
  528. package/dist/src/schemas/pluginContributions.cjs +19 -0
  529. package/dist/src/schemas/pluginContributions.cjs.map +1 -0
  530. package/dist/src/schemas/pluginContributions.d.mts +56 -0
  531. package/dist/src/schemas/pluginContributions.d.mts.map +1 -0
  532. package/dist/src/schemas/pluginContributions.mjs +18 -0
  533. package/dist/src/schemas/pluginContributions.mjs.map +1 -0
  534. package/dist/src/schemas/pluginProtocol.cjs +103 -0
  535. package/dist/src/schemas/pluginProtocol.cjs.map +1 -0
  536. package/dist/src/schemas/pluginProtocol.d.mts +70 -0
  537. package/dist/src/schemas/pluginProtocol.d.mts.map +1 -0
  538. package/dist/src/schemas/pluginProtocol.mjs +96 -0
  539. package/dist/src/schemas/pluginProtocol.mjs.map +1 -0
  540. package/dist/src/schemas/profileIdentity.cjs +67 -0
  541. package/dist/src/schemas/profileIdentity.cjs.map +1 -0
  542. package/dist/src/schemas/profileIdentity.d.mts +50 -0
  543. package/dist/src/schemas/profileIdentity.d.mts.map +1 -0
  544. package/dist/src/schemas/profileIdentity.mjs +64 -0
  545. package/dist/src/schemas/profileIdentity.mjs.map +1 -0
  546. package/dist/src/schemas/readiness.cjs +251 -0
  547. package/dist/src/schemas/readiness.cjs.map +1 -0
  548. package/dist/src/schemas/readiness.d.mts +84 -0
  549. package/dist/src/schemas/readiness.d.mts.map +1 -0
  550. package/dist/src/schemas/readiness.mjs +246 -0
  551. package/dist/src/schemas/readiness.mjs.map +1 -0
  552. package/dist/src/schemas/sandboxHarness.cjs +29 -0
  553. package/dist/src/schemas/sandboxHarness.cjs.map +1 -0
  554. package/dist/src/schemas/sandboxHarness.d.mts +39 -0
  555. package/dist/src/schemas/sandboxHarness.d.mts.map +1 -0
  556. package/dist/src/schemas/sandboxHarness.mjs +26 -0
  557. package/dist/src/schemas/sandboxHarness.mjs.map +1 -0
  558. package/dist/src/schemas/serverBundle.d.mts +19 -0
  559. package/dist/src/schemas/serverBundle.d.mts.map +1 -0
  560. package/dist/src/schemas/serverFacet.cjs +111 -0
  561. package/dist/src/schemas/serverFacet.cjs.map +1 -0
  562. package/dist/src/schemas/serverFacet.d.mts +152 -0
  563. package/dist/src/schemas/serverFacet.d.mts.map +1 -0
  564. package/dist/src/schemas/serverFacet.mjs +101 -0
  565. package/dist/src/schemas/serverFacet.mjs.map +1 -0
  566. package/dist/src/schemas/sessionMcpActivity.d.mts +47 -0
  567. package/dist/src/schemas/sessionMcpActivity.d.mts.map +1 -0
  568. package/dist/src/schemas/sessionProtocol.cjs +17 -0
  569. package/dist/src/schemas/sessionProtocol.cjs.map +1 -0
  570. package/dist/src/schemas/sessionProtocol.d.mts +313 -0
  571. package/dist/src/schemas/sessionProtocol.d.mts.map +1 -0
  572. package/dist/src/schemas/sessionProtocol.mjs +12 -0
  573. package/dist/src/schemas/sessionProtocol.mjs.map +1 -0
  574. package/dist/src/schemas/sessionUpdates.d.mts +34 -0
  575. package/dist/src/schemas/sessionUpdates.d.mts.map +1 -0
  576. package/dist/src/schemas/skills.cjs +115 -0
  577. package/dist/src/schemas/skills.cjs.map +1 -0
  578. package/dist/src/schemas/skills.d.mts +65 -0
  579. package/dist/src/schemas/skills.d.mts.map +1 -0
  580. package/dist/src/schemas/skills.mjs +109 -0
  581. package/dist/src/schemas/skills.mjs.map +1 -0
  582. package/dist/src/schemas/toolOverrides.cjs +17 -0
  583. package/dist/src/schemas/toolOverrides.cjs.map +1 -0
  584. package/dist/src/schemas/toolOverrides.d.mts +29 -0
  585. package/dist/src/schemas/toolOverrides.d.mts.map +1 -0
  586. package/dist/src/schemas/toolOverrides.mjs +15 -0
  587. package/dist/src/schemas/toolOverrides.mjs.map +1 -0
  588. package/dist/src/schemas/toolSurface.cjs +17 -0
  589. package/dist/src/schemas/toolSurface.cjs.map +1 -0
  590. package/dist/src/schemas/toolSurface.d.mts +70 -0
  591. package/dist/src/schemas/toolSurface.d.mts.map +1 -0
  592. package/dist/src/schemas/toolSurface.mjs +15 -0
  593. package/dist/src/schemas/toolSurface.mjs.map +1 -0
  594. package/dist/src/schemas/uiHub.cjs +17 -0
  595. package/dist/src/schemas/uiHub.cjs.map +1 -0
  596. package/dist/src/schemas/uiHub.d.mts +23 -0
  597. package/dist/src/schemas/uiHub.d.mts.map +1 -0
  598. package/dist/src/schemas/uiHub.mjs +15 -0
  599. package/dist/src/schemas/uiHub.mjs.map +1 -0
  600. package/dist/src/schemas/voiceReloadHandoff.cjs +78 -0
  601. package/dist/src/schemas/voiceReloadHandoff.cjs.map +1 -0
  602. package/dist/src/schemas/voiceReloadHandoff.d.mts +31 -0
  603. package/dist/src/schemas/voiceReloadHandoff.d.mts.map +1 -0
  604. package/dist/src/schemas/voiceReloadHandoff.mjs +75 -0
  605. package/dist/src/schemas/voiceReloadHandoff.mjs.map +1 -0
  606. package/dist/src/schemas/voiceTools.cjs +205 -0
  607. package/dist/src/schemas/voiceTools.cjs.map +1 -0
  608. package/dist/src/schemas/voiceTools.d.mts +120 -0
  609. package/dist/src/schemas/voiceTools.d.mts.map +1 -0
  610. package/dist/src/schemas/voiceTools.mjs +194 -0
  611. package/dist/src/schemas/voiceTools.mjs.map +1 -0
  612. package/dist/src/server/devProxyForward.cjs +141 -0
  613. package/dist/src/server/devProxyForward.cjs.map +1 -0
  614. package/dist/src/server/devProxyForward.mjs +139 -0
  615. package/dist/src/server/devProxyForward.mjs.map +1 -0
  616. package/dist/src/server/devProxyRoutes.cjs +97 -0
  617. package/dist/src/server/devProxyRoutes.cjs.map +1 -0
  618. package/dist/src/server/devProxyRoutes.mjs +97 -0
  619. package/dist/src/server/devProxyRoutes.mjs.map +1 -0
  620. package/dist/src/server/devProxySocket.cjs +93 -0
  621. package/dist/src/server/devProxySocket.cjs.map +1 -0
  622. package/dist/src/server/devProxySocket.d.mts +25 -0
  623. package/dist/src/server/devProxySocket.d.mts.map +1 -0
  624. package/dist/src/server/devProxySocket.mjs +93 -0
  625. package/dist/src/server/devProxySocket.mjs.map +1 -0
  626. package/dist/src/server/directHarnessRuntime.cjs +2387 -0
  627. package/dist/src/server/directHarnessRuntime.cjs.map +1 -0
  628. package/dist/src/server/directHarnessRuntime.d.mts +4 -0
  629. package/dist/src/server/directHarnessRuntime.mjs +2384 -0
  630. package/dist/src/server/directHarnessRuntime.mjs.map +1 -0
  631. package/dist/src/server/harnessErrorMessage.cjs +13 -0
  632. package/dist/src/server/harnessErrorMessage.cjs.map +1 -0
  633. package/dist/src/server/harnessErrorMessage.mjs +13 -0
  634. package/dist/src/server/harnessErrorMessage.mjs.map +1 -0
  635. package/dist/src/server/headlessProtocol.cjs +382 -0
  636. package/dist/src/server/headlessProtocol.cjs.map +1 -0
  637. package/dist/src/server/headlessProtocol.mjs +382 -0
  638. package/dist/src/server/headlessProtocol.mjs.map +1 -0
  639. package/dist/src/server/liveImport.cjs +37 -0
  640. package/dist/src/server/liveImport.cjs.map +1 -0
  641. package/dist/src/server/liveImport.d.mts +27 -0
  642. package/dist/src/server/liveImport.d.mts.map +1 -0
  643. package/dist/src/server/liveImport.mjs +34 -0
  644. package/dist/src/server/liveImport.mjs.map +1 -0
  645. package/dist/src/server/mcpBundleLoader.cjs +108 -0
  646. package/dist/src/server/mcpBundleLoader.cjs.map +1 -0
  647. package/dist/src/server/mcpBundleLoader.d.mts +46 -0
  648. package/dist/src/server/mcpBundleLoader.d.mts.map +1 -0
  649. package/dist/src/server/mcpBundleLoader.mjs +107 -0
  650. package/dist/src/server/mcpBundleLoader.mjs.map +1 -0
  651. package/dist/src/server/nativeChildTranscriptReader.cjs +20 -0
  652. package/dist/src/server/nativeChildTranscriptReader.cjs.map +1 -0
  653. package/dist/src/server/nativeChildTranscriptReader.mjs +18 -0
  654. package/dist/src/server/nativeChildTranscriptReader.mjs.map +1 -0
  655. package/dist/src/server/remoteRoutes.cjs +463 -0
  656. package/dist/src/server/remoteRoutes.cjs.map +1 -0
  657. package/dist/src/server/remoteRoutes.mjs +463 -0
  658. package/dist/src/server/remoteRoutes.mjs.map +1 -0
  659. package/dist/src/server/serverFacetLoader.cjs +214 -0
  660. package/dist/src/server/serverFacetLoader.cjs.map +1 -0
  661. package/dist/src/server/serverFacetLoader.d.mts +72 -0
  662. package/dist/src/server/serverFacetLoader.d.mts.map +1 -0
  663. package/dist/src/server/serverFacetLoader.mjs +212 -0
  664. package/dist/src/server/serverFacetLoader.mjs.map +1 -0
  665. package/dist/src/server/sessionMcpHandler.cjs +585 -0
  666. package/dist/src/server/sessionMcpHandler.cjs.map +1 -0
  667. package/dist/src/server/sessionMcpHandler.d.mts +50 -0
  668. package/dist/src/server/sessionMcpHandler.d.mts.map +1 -0
  669. package/dist/src/server/sessionMcpHandler.mjs +582 -0
  670. package/dist/src/server/sessionMcpHandler.mjs.map +1 -0
  671. package/dist/src/server/sessionMcpRoutes.cjs +809 -0
  672. package/dist/src/server/sessionMcpRoutes.cjs.map +1 -0
  673. package/dist/src/server/sessionMcpRoutes.mjs +804 -0
  674. package/dist/src/server/sessionMcpRoutes.mjs.map +1 -0
  675. package/dist/src/server/threadJournals.cjs +172 -0
  676. package/dist/src/server/threadJournals.cjs.map +1 -0
  677. package/dist/src/server/threadJournals.mjs +169 -0
  678. package/dist/src/server/threadJournals.mjs.map +1 -0
  679. package/dist/src/services/acpSessionUpdates/index.cjs +129 -0
  680. package/dist/src/services/acpSessionUpdates/index.cjs.map +1 -0
  681. package/dist/src/services/acpSessionUpdates/index.mjs +129 -0
  682. package/dist/src/services/acpSessionUpdates/index.mjs.map +1 -0
  683. package/dist/src/services/apiSurfaceAssert/index.cjs +60 -0
  684. package/dist/src/services/apiSurfaceAssert/index.cjs.map +1 -0
  685. package/dist/src/services/apiSurfaceAssert/index.d.mts +24 -0
  686. package/dist/src/services/apiSurfaceAssert/index.d.mts.map +1 -0
  687. package/dist/src/services/apiSurfaceAssert/index.mjs +60 -0
  688. package/dist/src/services/apiSurfaceAssert/index.mjs.map +1 -0
  689. package/dist/src/services/bundlePublication/index.cjs +89 -0
  690. package/dist/src/services/bundlePublication/index.cjs.map +1 -0
  691. package/dist/src/services/bundlePublication/index.mjs +86 -0
  692. package/dist/src/services/bundlePublication/index.mjs.map +1 -0
  693. package/dist/src/services/contextApiUrls/index.cjs +53 -0
  694. package/dist/src/services/contextApiUrls/index.cjs.map +1 -0
  695. package/dist/src/services/contextApiUrls/index.d.mts +8 -0
  696. package/dist/src/services/contextApiUrls/index.d.mts.map +1 -0
  697. package/dist/src/services/contextApiUrls/index.mjs +52 -0
  698. package/dist/src/services/contextApiUrls/index.mjs.map +1 -0
  699. package/dist/src/services/contextContributions/index.cjs +79 -0
  700. package/dist/src/services/contextContributions/index.cjs.map +1 -0
  701. package/dist/src/services/contextContributions/index.d.mts +6 -0
  702. package/dist/src/services/contextContributions/index.d.mts.map +1 -0
  703. package/dist/src/services/contextContributions/index.mjs +79 -0
  704. package/dist/src/services/contextContributions/index.mjs.map +1 -0
  705. package/dist/src/services/contextUsage/index.cjs +27 -0
  706. package/dist/src/services/contextUsage/index.cjs.map +1 -0
  707. package/dist/src/services/contextUsage/index.mjs +25 -0
  708. package/dist/src/services/contextUsage/index.mjs.map +1 -0
  709. package/dist/src/services/devProxyPolicy/index.cjs +168 -0
  710. package/dist/src/services/devProxyPolicy/index.cjs.map +1 -0
  711. package/dist/src/services/devProxyPolicy/index.mjs +165 -0
  712. package/dist/src/services/devProxyPolicy/index.mjs.map +1 -0
  713. package/dist/src/services/devProxyStore/index.cjs +107 -0
  714. package/dist/src/services/devProxyStore/index.cjs.map +1 -0
  715. package/dist/src/services/devProxyStore/index.mjs +104 -0
  716. package/dist/src/services/devProxyStore/index.mjs.map +1 -0
  717. package/dist/src/services/deviceAuth/index.cjs +146 -0
  718. package/dist/src/services/deviceAuth/index.cjs.map +1 -0
  719. package/dist/src/services/deviceAuth/index.d.mts +9 -0
  720. package/dist/src/services/deviceAuth/index.d.mts.map +1 -0
  721. package/dist/src/services/deviceAuth/index.mjs +146 -0
  722. package/dist/src/services/deviceAuth/index.mjs.map +1 -0
  723. package/dist/src/services/deviceSessions/index.cjs +147 -0
  724. package/dist/src/services/deviceSessions/index.cjs.map +1 -0
  725. package/dist/src/services/deviceSessions/index.d.mts +18 -0
  726. package/dist/src/services/deviceSessions/index.d.mts.map +1 -0
  727. package/dist/src/services/deviceSessions/index.mjs +141 -0
  728. package/dist/src/services/deviceSessions/index.mjs.map +1 -0
  729. package/dist/src/services/deviceTrust/index.cjs +294 -0
  730. package/dist/src/services/deviceTrust/index.cjs.map +1 -0
  731. package/dist/src/services/deviceTrust/index.mjs +282 -0
  732. package/dist/src/services/deviceTrust/index.mjs.map +1 -0
  733. package/dist/src/services/durableNavigation/index.cjs +46 -0
  734. package/dist/src/services/durableNavigation/index.cjs.map +1 -0
  735. package/dist/src/services/durableNavigation/index.mjs +45 -0
  736. package/dist/src/services/durableNavigation/index.mjs.map +1 -0
  737. package/dist/src/services/headlessClient/index.cjs +126 -0
  738. package/dist/src/services/headlessClient/index.cjs.map +1 -0
  739. package/dist/src/services/headlessClient/index.mjs +126 -0
  740. package/dist/src/services/headlessClient/index.mjs.map +1 -0
  741. package/dist/src/services/historyImport/index.cjs +8 -0
  742. package/dist/src/services/historyImport/index.cjs.map +1 -0
  743. package/dist/src/services/historyImport/index.d.mts +68 -0
  744. package/dist/src/services/historyImport/index.d.mts.map +1 -0
  745. package/dist/src/services/historyImport/index.mjs +8 -0
  746. package/dist/src/services/historyImport/index.mjs.map +1 -0
  747. package/dist/src/services/hubChannelHarness/index.cjs +50 -0
  748. package/dist/src/services/hubChannelHarness/index.cjs.map +1 -0
  749. package/dist/src/services/hubChannelHarness/index.d.mts +17 -0
  750. package/dist/src/services/hubChannelHarness/index.d.mts.map +1 -0
  751. package/dist/src/services/hubChannelHarness/index.mjs +50 -0
  752. package/dist/src/services/hubChannelHarness/index.mjs.map +1 -0
  753. package/dist/src/services/kernel/index.cjs +147 -0
  754. package/dist/src/services/kernel/index.cjs.map +1 -0
  755. package/dist/src/services/kernel/index.d.mts +9 -0
  756. package/dist/src/services/kernel/index.d.mts.map +1 -0
  757. package/dist/src/services/kernel/index.mjs +147 -0
  758. package/dist/src/services/kernel/index.mjs.map +1 -0
  759. package/dist/src/services/loginFlow/index.cjs +131 -0
  760. package/dist/src/services/loginFlow/index.cjs.map +1 -0
  761. package/dist/src/services/loginFlow/index.mjs +131 -0
  762. package/dist/src/services/loginFlow/index.mjs.map +1 -0
  763. package/dist/src/services/loopbackAddress/index.cjs +58 -0
  764. package/dist/src/services/loopbackAddress/index.cjs.map +1 -0
  765. package/dist/src/services/loopbackAddress/index.mjs +56 -0
  766. package/dist/src/services/loopbackAddress/index.mjs.map +1 -0
  767. package/dist/src/services/openSessionRegistry/index.cjs +134 -0
  768. package/dist/src/services/openSessionRegistry/index.cjs.map +1 -0
  769. package/dist/src/services/openSessionRegistry/index.d.mts +36 -0
  770. package/dist/src/services/openSessionRegistry/index.d.mts.map +1 -0
  771. package/dist/src/services/openSessionRegistry/index.mjs +131 -0
  772. package/dist/src/services/openSessionRegistry/index.mjs.map +1 -0
  773. package/dist/src/services/packageApiHarness/index.cjs +36 -0
  774. package/dist/src/services/packageApiHarness/index.cjs.map +1 -0
  775. package/dist/src/services/packageApiHarness/index.d.mts +40 -0
  776. package/dist/src/services/packageApiHarness/index.d.mts.map +1 -0
  777. package/dist/src/services/packageApiHarness/index.mjs +36 -0
  778. package/dist/src/services/packageApiHarness/index.mjs.map +1 -0
  779. package/dist/src/services/packageResource/index.cjs +54 -0
  780. package/dist/src/services/packageResource/index.cjs.map +1 -0
  781. package/dist/src/services/packageResource/index.d.mts +26 -0
  782. package/dist/src/services/packageResource/index.d.mts.map +1 -0
  783. package/dist/src/services/packageResource/index.mjs +51 -0
  784. package/dist/src/services/packageResource/index.mjs.map +1 -0
  785. package/dist/src/services/pairingFlow/index.cjs +145 -0
  786. package/dist/src/services/pairingFlow/index.cjs.map +1 -0
  787. package/dist/src/services/pairingFlow/index.d.mts +44 -0
  788. package/dist/src/services/pairingFlow/index.d.mts.map +1 -0
  789. package/dist/src/services/pairingFlow/index.mjs +145 -0
  790. package/dist/src/services/pairingFlow/index.mjs.map +1 -0
  791. package/dist/src/services/pairingPage/index.cjs +450 -0
  792. package/dist/src/services/pairingPage/index.cjs.map +1 -0
  793. package/dist/src/services/pairingPage/index.mjs +447 -0
  794. package/dist/src/services/pairingPage/index.mjs.map +1 -0
  795. package/dist/src/services/piExtensionHost/index.cjs +889 -0
  796. package/dist/src/services/piExtensionHost/index.cjs.map +1 -0
  797. package/dist/src/services/piExtensionHost/index.mjs +885 -0
  798. package/dist/src/services/piExtensionHost/index.mjs.map +1 -0
  799. package/dist/src/services/piHelpTools/index.cjs +68 -0
  800. package/dist/src/services/piHelpTools/index.cjs.map +1 -0
  801. package/dist/src/services/piHelpTools/index.d.mts +10 -0
  802. package/dist/src/services/piHelpTools/index.d.mts.map +1 -0
  803. package/dist/src/services/piHelpTools/index.mjs +68 -0
  804. package/dist/src/services/piHelpTools/index.mjs.map +1 -0
  805. package/dist/src/services/piSessionEntries/index.cjs +121 -0
  806. package/dist/src/services/piSessionEntries/index.cjs.map +1 -0
  807. package/dist/src/services/piSessionEntries/index.mjs +117 -0
  808. package/dist/src/services/piSessionEntries/index.mjs.map +1 -0
  809. package/dist/src/services/pluginLifecycle/index.cjs +71 -0
  810. package/dist/src/services/pluginLifecycle/index.cjs.map +1 -0
  811. package/dist/src/services/pluginLifecycle/index.d.mts +8 -0
  812. package/dist/src/services/pluginLifecycle/index.d.mts.map +1 -0
  813. package/dist/src/services/pluginLifecycle/index.mjs +71 -0
  814. package/dist/src/services/pluginLifecycle/index.mjs.map +1 -0
  815. package/dist/src/services/providerAuth/index.cjs +156 -0
  816. package/dist/src/services/providerAuth/index.cjs.map +1 -0
  817. package/dist/src/services/providerAuth/index.mjs +154 -0
  818. package/dist/src/services/providerAuth/index.mjs.map +1 -0
  819. package/dist/src/services/publicFileShares/index.cjs +192 -0
  820. package/dist/src/services/publicFileShares/index.cjs.map +1 -0
  821. package/dist/src/services/publicFileShares/index.d.mts +16 -0
  822. package/dist/src/services/publicFileShares/index.d.mts.map +1 -0
  823. package/dist/src/services/publicFileShares/index.mjs +188 -0
  824. package/dist/src/services/publicFileShares/index.mjs.map +1 -0
  825. package/dist/src/services/remoteAccess/index.cjs +567 -0
  826. package/dist/src/services/remoteAccess/index.cjs.map +1 -0
  827. package/dist/src/services/remoteAccess/index.d.mts +121 -0
  828. package/dist/src/services/remoteAccess/index.d.mts.map +1 -0
  829. package/dist/src/services/remoteAccess/index.mjs +567 -0
  830. package/dist/src/services/remoteAccess/index.mjs.map +1 -0
  831. package/dist/src/services/remoteAccessSettings/index.cjs +151 -0
  832. package/dist/src/services/remoteAccessSettings/index.cjs.map +1 -0
  833. package/dist/src/services/remoteAccessSettings/index.mjs +149 -0
  834. package/dist/src/services/remoteAccessSettings/index.mjs.map +1 -0
  835. package/dist/src/services/remoteAccessStore/index.cjs +197 -0
  836. package/dist/src/services/remoteAccessStore/index.cjs.map +1 -0
  837. package/dist/src/services/remoteAccessStore/index.mjs +192 -0
  838. package/dist/src/services/remoteAccessStore/index.mjs.map +1 -0
  839. package/dist/src/services/remoteGuardPolicy/index.cjs +200 -0
  840. package/dist/src/services/remoteGuardPolicy/index.cjs.map +1 -0
  841. package/dist/src/services/remoteGuardPolicy/index.d.mts +7 -0
  842. package/dist/src/services/remoteGuardPolicy/index.d.mts.map +1 -0
  843. package/dist/src/services/remoteGuardPolicy/index.mjs +196 -0
  844. package/dist/src/services/remoteGuardPolicy/index.mjs.map +1 -0
  845. package/dist/src/services/requestReceipts/index.cjs +167 -0
  846. package/dist/src/services/requestReceipts/index.cjs.map +1 -0
  847. package/dist/src/services/requestReceipts/index.d.mts +11 -0
  848. package/dist/src/services/requestReceipts/index.d.mts.map +1 -0
  849. package/dist/src/services/requestReceipts/index.mjs +167 -0
  850. package/dist/src/services/requestReceipts/index.mjs.map +1 -0
  851. package/dist/src/services/rpcTranscript/index.cjs +633 -0
  852. package/dist/src/services/rpcTranscript/index.cjs.map +1 -0
  853. package/dist/src/services/rpcTranscript/index.d.mts +50 -0
  854. package/dist/src/services/rpcTranscript/index.d.mts.map +1 -0
  855. package/dist/src/services/rpcTranscript/index.mjs +632 -0
  856. package/dist/src/services/rpcTranscript/index.mjs.map +1 -0
  857. package/dist/src/services/serverFacet/index.cjs +197 -0
  858. package/dist/src/services/serverFacet/index.cjs.map +1 -0
  859. package/dist/src/services/serverFacet/index.d.mts +31 -0
  860. package/dist/src/services/serverFacet/index.d.mts.map +1 -0
  861. package/dist/src/services/serverFacet/index.mjs +197 -0
  862. package/dist/src/services/serverFacet/index.mjs.map +1 -0
  863. package/dist/src/services/sessionAttachments/index.cjs +111 -0
  864. package/dist/src/services/sessionAttachments/index.cjs.map +1 -0
  865. package/dist/src/services/sessionAttachments/index.d.mts +11 -0
  866. package/dist/src/services/sessionAttachments/index.d.mts.map +1 -0
  867. package/dist/src/services/sessionAttachments/index.mjs +107 -0
  868. package/dist/src/services/sessionAttachments/index.mjs.map +1 -0
  869. package/dist/src/services/sessionGitStatus/index.cjs +46 -0
  870. package/dist/src/services/sessionGitStatus/index.cjs.map +1 -0
  871. package/dist/src/services/sessionGitStatus/index.mjs +46 -0
  872. package/dist/src/services/sessionGitStatus/index.mjs.map +1 -0
  873. package/dist/src/services/sessionGitStatus/type.d.mts +8 -0
  874. package/dist/src/services/sessionGitStatus/type.d.mts.map +1 -0
  875. package/dist/src/services/sessionMcpActivity/index.cjs +115 -0
  876. package/dist/src/services/sessionMcpActivity/index.cjs.map +1 -0
  877. package/dist/src/services/sessionMcpActivity/index.mjs +111 -0
  878. package/dist/src/services/sessionMcpActivity/index.mjs.map +1 -0
  879. package/dist/src/services/sessionMcpAuthorization/index.cjs +473 -0
  880. package/dist/src/services/sessionMcpAuthorization/index.cjs.map +1 -0
  881. package/dist/src/services/sessionMcpAuthorization/index.d.mts +125 -0
  882. package/dist/src/services/sessionMcpAuthorization/index.d.mts.map +1 -0
  883. package/dist/src/services/sessionMcpAuthorization/index.mjs +469 -0
  884. package/dist/src/services/sessionMcpAuthorization/index.mjs.map +1 -0
  885. package/dist/src/services/sessionMcpConversations/index.cjs +217 -0
  886. package/dist/src/services/sessionMcpConversations/index.cjs.map +1 -0
  887. package/dist/src/services/sessionMcpConversations/index.mjs +212 -0
  888. package/dist/src/services/sessionMcpConversations/index.mjs.map +1 -0
  889. package/dist/src/services/sessionMcpRegistrationStore/index.cjs +86 -0
  890. package/dist/src/services/sessionMcpRegistrationStore/index.cjs.map +1 -0
  891. package/dist/src/services/sessionMcpRegistrationStore/index.mjs +83 -0
  892. package/dist/src/services/sessionMcpRegistrationStore/index.mjs.map +1 -0
  893. package/dist/src/services/sessionPresentation/index.cjs +120 -0
  894. package/dist/src/services/sessionPresentation/index.cjs.map +1 -0
  895. package/dist/src/services/sessionPresentation/index.mjs +120 -0
  896. package/dist/src/services/sessionPresentation/index.mjs.map +1 -0
  897. package/dist/src/services/sqliteSessionHistory/index.cjs +97 -0
  898. package/dist/src/services/sqliteSessionHistory/index.cjs.map +1 -0
  899. package/dist/src/services/sqliteSessionHistory/index.d.mts +28 -0
  900. package/dist/src/services/sqliteSessionHistory/index.d.mts.map +1 -0
  901. package/dist/src/services/sqliteSessionHistory/index.mjs +92 -0
  902. package/dist/src/services/sqliteSessionHistory/index.mjs.map +1 -0
  903. package/dist/src/services/sqliteTranscriptReader/index.cjs +67 -0
  904. package/dist/src/services/sqliteTranscriptReader/index.cjs.map +1 -0
  905. package/dist/src/services/sqliteTranscriptReader/index.d.mts +14 -0
  906. package/dist/src/services/sqliteTranscriptReader/index.d.mts.map +1 -0
  907. package/dist/src/services/sqliteTranscriptReader/index.mjs +65 -0
  908. package/dist/src/services/sqliteTranscriptReader/index.mjs.map +1 -0
  909. package/dist/src/services/toolCost/index.cjs +47 -0
  910. package/dist/src/services/toolCost/index.cjs.map +1 -0
  911. package/dist/src/services/toolCost/index.d.mts +38 -0
  912. package/dist/src/services/toolCost/index.d.mts.map +1 -0
  913. package/dist/src/services/toolCost/index.mjs +46 -0
  914. package/dist/src/services/toolCost/index.mjs.map +1 -0
  915. package/dist/src/services/toolOverrides/index.cjs +45 -0
  916. package/dist/src/services/toolOverrides/index.cjs.map +1 -0
  917. package/dist/src/services/toolOverrides/index.d.mts +6 -0
  918. package/dist/src/services/toolOverrides/index.d.mts.map +1 -0
  919. package/dist/src/services/toolOverrides/index.mjs +45 -0
  920. package/dist/src/services/toolOverrides/index.mjs.map +1 -0
  921. package/dist/src/services/toolPrompt/index.cjs +13 -0
  922. package/dist/src/services/toolPrompt/index.cjs.map +1 -0
  923. package/dist/src/services/toolPrompt/index.mjs +13 -0
  924. package/dist/src/services/toolPrompt/index.mjs.map +1 -0
  925. package/dist/src/services/toolSurface/index.cjs +134 -0
  926. package/dist/src/services/toolSurface/index.cjs.map +1 -0
  927. package/dist/src/services/toolSurface/index.d.mts +19 -0
  928. package/dist/src/services/toolSurface/index.d.mts.map +1 -0
  929. package/dist/src/services/toolSurface/index.mjs +134 -0
  930. package/dist/src/services/toolSurface/index.mjs.map +1 -0
  931. package/dist/src/services/traceContext/index.cjs +13 -0
  932. package/dist/src/services/traceContext/index.cjs.map +1 -0
  933. package/dist/src/services/traceContext/index.mjs +13 -0
  934. package/dist/src/services/traceContext/index.mjs.map +1 -0
  935. package/dist/src/services/transcriptPages/index.cjs +117 -0
  936. package/dist/src/services/transcriptPages/index.cjs.map +1 -0
  937. package/dist/src/services/transcriptPages/index.mjs +115 -0
  938. package/dist/src/services/transcriptPages/index.mjs.map +1 -0
  939. package/dist/src/services/tunnelOutput/index.cjs +58 -0
  940. package/dist/src/services/tunnelOutput/index.cjs.map +1 -0
  941. package/dist/src/services/tunnelOutput/index.mjs +54 -0
  942. package/dist/src/services/tunnelOutput/index.mjs.map +1 -0
  943. package/dist/src/services/tunnelProcess/index.cjs +487 -0
  944. package/dist/src/services/tunnelProcess/index.cjs.map +1 -0
  945. package/dist/src/services/tunnelProcess/index.mjs +481 -0
  946. package/dist/src/services/tunnelProcess/index.mjs.map +1 -0
  947. package/dist/src/services/voiceReloadHandoff/index.cjs +136 -0
  948. package/dist/src/services/voiceReloadHandoff/index.cjs.map +1 -0
  949. package/dist/src/services/voiceReloadHandoff/index.d.mts +34 -0
  950. package/dist/src/services/voiceReloadHandoff/index.d.mts.map +1 -0
  951. package/dist/src/services/voiceReloadHandoff/index.mjs +135 -0
  952. package/dist/src/services/voiceReloadHandoff/index.mjs.map +1 -0
  953. package/dist/src/services/voiceToolsContract/index.cjs +26 -0
  954. package/dist/src/services/voiceToolsContract/index.cjs.map +1 -0
  955. package/dist/src/services/voiceToolsContract/index.d.mts +76 -0
  956. package/dist/src/services/voiceToolsContract/index.d.mts.map +1 -0
  957. package/dist/src/services/voiceToolsContract/index.mjs +24 -0
  958. package/dist/src/services/voiceToolsContract/index.mjs.map +1 -0
  959. package/dist/src/services/webauthn/index.cjs +262 -0
  960. package/dist/src/services/webauthn/index.cjs.map +1 -0
  961. package/dist/src/services/webauthn/index.d.mts +39 -0
  962. package/dist/src/services/webauthn/index.d.mts.map +1 -0
  963. package/dist/src/services/webauthn/index.mjs +262 -0
  964. package/dist/src/services/webauthn/index.mjs.map +1 -0
  965. package/dist/src/services/webauthnPolicy/index.cjs +174 -0
  966. package/dist/src/services/webauthnPolicy/index.cjs.map +1 -0
  967. package/dist/src/services/webauthnPolicy/index.d.mts +41 -0
  968. package/dist/src/services/webauthnPolicy/index.d.mts.map +1 -0
  969. package/dist/src/services/webauthnPolicy/index.mjs +167 -0
  970. package/dist/src/services/webauthnPolicy/index.mjs.map +1 -0
  971. package/dist/src/services/workspaceRegistry/index.cjs +187 -0
  972. package/dist/src/services/workspaceRegistry/index.cjs.map +1 -0
  973. package/dist/src/services/workspaceRegistry/index.d.mts +47 -0
  974. package/dist/src/services/workspaceRegistry/index.d.mts.map +1 -0
  975. package/dist/src/services/workspaceRegistry/index.mjs +179 -0
  976. package/dist/src/services/workspaceRegistry/index.mjs.map +1 -0
  977. package/dist/src/systems/child/adapters/headlessChildSessionService.cjs +466 -0
  978. package/dist/src/systems/child/adapters/headlessChildSessionService.cjs.map +1 -0
  979. package/dist/src/systems/child/adapters/headlessChildSessionService.d.mts +36 -0
  980. package/dist/src/systems/child/adapters/headlessChildSessionService.d.mts.map +1 -0
  981. package/dist/src/systems/child/adapters/headlessChildSessionService.mjs +457 -0
  982. package/dist/src/systems/child/adapters/headlessChildSessionService.mjs.map +1 -0
  983. package/dist/src/systems/child/adapters/nativeChildRuntimes.cjs +28 -0
  984. package/dist/src/systems/child/adapters/nativeChildRuntimes.cjs.map +1 -0
  985. package/dist/src/systems/child/adapters/nativeChildRuntimes.mjs +25 -0
  986. package/dist/src/systems/child/adapters/nativeChildRuntimes.mjs.map +1 -0
  987. package/dist/src/systems/child/services/childSession/index.cjs +219 -0
  988. package/dist/src/systems/child/services/childSession/index.cjs.map +1 -0
  989. package/dist/src/systems/child/services/childSession/index.d.mts +14 -0
  990. package/dist/src/systems/child/services/childSession/index.d.mts.map +1 -0
  991. package/dist/src/systems/child/services/childSession/index.mjs +219 -0
  992. package/dist/src/systems/child/services/childSession/index.mjs.map +1 -0
  993. package/dist/src/systems/child/types/childSession.cjs +21 -0
  994. package/dist/src/systems/child/types/childSession.cjs.map +1 -0
  995. package/dist/src/systems/child/types/childSession.d.mts +182 -0
  996. package/dist/src/systems/child/types/childSession.d.mts.map +1 -0
  997. package/dist/src/systems/child/types/childSession.mjs +17 -0
  998. package/dist/src/systems/child/types/childSession.mjs.map +1 -0
  999. package/dist/src/systems/main/adapters/headlessHost.cjs +597 -0
  1000. package/dist/src/systems/main/adapters/headlessHost.cjs.map +1 -0
  1001. package/dist/src/systems/main/adapters/headlessHost.d.mts +116 -0
  1002. package/dist/src/systems/main/adapters/headlessHost.d.mts.map +1 -0
  1003. package/dist/src/systems/main/adapters/headlessHost.mjs +595 -0
  1004. package/dist/src/systems/main/adapters/headlessHost.mjs.map +1 -0
  1005. package/dist/src/systems/main/adapters/headlessSessionHost.cjs +1668 -0
  1006. package/dist/src/systems/main/adapters/headlessSessionHost.cjs.map +1 -0
  1007. package/dist/src/systems/main/adapters/headlessSessionHost.d.mts +20 -0
  1008. package/dist/src/systems/main/adapters/headlessSessionHost.d.mts.map +1 -0
  1009. package/dist/src/systems/main/adapters/headlessSessionHost.mjs +1663 -0
  1010. package/dist/src/systems/main/adapters/headlessSessionHost.mjs.map +1 -0
  1011. package/dist/src/systems/main/types/headlessHost.d.mts +37 -0
  1012. package/dist/src/systems/main/types/headlessHost.d.mts.map +1 -0
  1013. package/dist/src/testing/pi/extensionScenarios.cjs +73 -0
  1014. package/dist/src/testing/pi/extensionScenarios.cjs.map +1 -0
  1015. package/dist/src/testing/pi/extensionScenarios.d.mts +41 -0
  1016. package/dist/src/testing/pi/extensionScenarios.d.mts.map +1 -0
  1017. package/dist/src/testing/pi/extensionScenarios.mjs +73 -0
  1018. package/dist/src/testing/pi/extensionScenarios.mjs.map +1 -0
  1019. package/dist/src/testing/pi/testHost.cjs +399 -0
  1020. package/dist/src/testing/pi/testHost.cjs.map +1 -0
  1021. package/dist/src/testing/pi/testHost.d.mts +160 -0
  1022. package/dist/src/testing/pi/testHost.d.mts.map +1 -0
  1023. package/dist/src/testing/pi/testHost.mjs +399 -0
  1024. package/dist/src/testing/pi/testHost.mjs.map +1 -0
  1025. package/dist/src/types/config.d.mts +20 -0
  1026. package/dist/src/types/config.d.mts.map +1 -0
  1027. package/dist/src/types/kernel.d.mts +69 -0
  1028. package/dist/src/types/kernel.d.mts.map +1 -0
  1029. package/dist/src/types/remote.d.mts +152 -0
  1030. package/dist/src/types/remote.d.mts.map +1 -0
  1031. package/dist/src/types/server/directHarnessRuntime.d.mts +526 -0
  1032. package/dist/src/types/server/directHarnessRuntime.d.mts.map +1 -0
  1033. package/dist/src/types/server/session.d.mts +5 -0
  1034. package/dist/src/types/server/session.d.mts.map +1 -0
  1035. package/dist/src/types/server/sessionToolSurface.d.mts +44 -0
  1036. package/dist/src/types/server/sessionToolSurface.d.mts.map +1 -0
  1037. package/dist/src/web/models/globalStore.cjs +23 -0
  1038. package/dist/src/web/models/globalStore.cjs.map +1 -0
  1039. package/dist/src/web/models/globalStore.d.mts +6 -0
  1040. package/dist/src/web/models/globalStore.d.mts.map +1 -0
  1041. package/dist/src/web/models/globalStore.mjs +23 -0
  1042. package/dist/src/web/models/globalStore.mjs.map +1 -0
  1043. package/dist/src/web/models/sessionStore.cjs +56 -0
  1044. package/dist/src/web/models/sessionStore.cjs.map +1 -0
  1045. package/dist/src/web/models/sessionStore.d.mts +14 -0
  1046. package/dist/src/web/models/sessionStore.d.mts.map +1 -0
  1047. package/dist/src/web/models/sessionStore.mjs +56 -0
  1048. package/dist/src/web/models/sessionStore.mjs.map +1 -0
  1049. package/dist/src/web/models/workspaceStore.cjs +50 -0
  1050. package/dist/src/web/models/workspaceStore.cjs.map +1 -0
  1051. package/dist/src/web/models/workspaceStore.d.mts +18 -0
  1052. package/dist/src/web/models/workspaceStore.d.mts.map +1 -0
  1053. package/dist/src/web/models/workspaceStore.mjs +50 -0
  1054. package/dist/src/web/models/workspaceStore.mjs.map +1 -0
  1055. package/dist/src/web/schemas/bundleAssetPolicy.cjs +20 -0
  1056. package/dist/src/web/schemas/bundleAssetPolicy.cjs.map +1 -0
  1057. package/dist/src/web/schemas/bundleAssetPolicy.d.mts +10 -0
  1058. package/dist/src/web/schemas/bundleAssetPolicy.d.mts.map +1 -0
  1059. package/dist/src/web/schemas/bundleAssetPolicy.mjs +18 -0
  1060. package/dist/src/web/schemas/bundleAssetPolicy.mjs.map +1 -0
  1061. package/dist/src/web/schemas/template.cjs +35 -0
  1062. package/dist/src/web/schemas/template.cjs.map +1 -0
  1063. package/dist/src/web/schemas/template.d.mts +9 -0
  1064. package/dist/src/web/schemas/template.d.mts.map +1 -0
  1065. package/dist/src/web/schemas/template.mjs +34 -0
  1066. package/dist/src/web/schemas/template.mjs.map +1 -0
  1067. package/dist/src/web/services/apiClient/index.cjs +156 -0
  1068. package/dist/src/web/services/apiClient/index.cjs.map +1 -0
  1069. package/dist/src/web/services/apiClient/index.d.mts +152 -0
  1070. package/dist/src/web/services/apiClient/index.d.mts.map +1 -0
  1071. package/dist/src/web/services/apiClient/index.mjs +154 -0
  1072. package/dist/src/web/services/apiClient/index.mjs.map +1 -0
  1073. package/dist/src/web/services/apiPaths/index.cjs +83 -0
  1074. package/dist/src/web/services/apiPaths/index.cjs.map +1 -0
  1075. package/dist/src/web/services/apiPaths/index.d.mts +81 -0
  1076. package/dist/src/web/services/apiPaths/index.d.mts.map +1 -0
  1077. package/dist/src/web/services/apiPaths/index.mjs +78 -0
  1078. package/dist/src/web/services/apiPaths/index.mjs.map +1 -0
  1079. package/dist/src/web/services/apiRoutes/index.cjs +47 -0
  1080. package/dist/src/web/services/apiRoutes/index.cjs.map +1 -0
  1081. package/dist/src/web/services/apiRoutes/index.d.mts +21 -0
  1082. package/dist/src/web/services/apiRoutes/index.d.mts.map +1 -0
  1083. package/dist/src/web/services/apiRoutes/index.mjs +43 -0
  1084. package/dist/src/web/services/apiRoutes/index.mjs.map +1 -0
  1085. package/dist/src/web/services/mcpWidget.cjs +9 -0
  1086. package/dist/src/web/services/mcpWidget.cjs.map +1 -0
  1087. package/dist/src/web/services/mcpWidget.d.mts +6 -0
  1088. package/dist/src/web/services/mcpWidget.d.mts.map +1 -0
  1089. package/dist/src/web/services/mcpWidget.mjs +9 -0
  1090. package/dist/src/web/services/mcpWidget.mjs.map +1 -0
  1091. package/dist/src/web/services/sessionRegistry/index.cjs +70 -0
  1092. package/dist/src/web/services/sessionRegistry/index.cjs.map +1 -0
  1093. package/dist/src/web/services/sessionRegistry/index.d.mts +29 -0
  1094. package/dist/src/web/services/sessionRegistry/index.d.mts.map +1 -0
  1095. package/dist/src/web/services/sessionRegistry/index.mjs +66 -0
  1096. package/dist/src/web/services/sessionRegistry/index.mjs.map +1 -0
  1097. package/dist/src/web/services/testing/channels.cjs +11 -0
  1098. package/dist/src/web/services/testing/channels.cjs.map +1 -0
  1099. package/dist/src/web/services/testing/channels.d.mts +8 -0
  1100. package/dist/src/web/services/testing/channels.d.mts.map +1 -0
  1101. package/dist/src/web/services/testing/channels.mjs +11 -0
  1102. package/dist/src/web/services/testing/channels.mjs.map +1 -0
  1103. package/dist/src/web/services/testing/index.cjs +27 -0
  1104. package/dist/src/web/services/testing/index.cjs.map +1 -0
  1105. package/dist/src/web/services/testing/index.d.mts +31 -0
  1106. package/dist/src/web/services/testing/index.d.mts.map +1 -0
  1107. package/dist/src/web/services/testing/index.mjs +27 -0
  1108. package/dist/src/web/services/testing/index.mjs.map +1 -0
  1109. package/dist/src/web/services/testing/rpcStub.cjs +58 -0
  1110. package/dist/src/web/services/testing/rpcStub.cjs.map +1 -0
  1111. package/dist/src/web/services/testing/rpcStub.d.mts +37 -0
  1112. package/dist/src/web/services/testing/rpcStub.d.mts.map +1 -0
  1113. package/dist/src/web/services/testing/rpcStub.mjs +58 -0
  1114. package/dist/src/web/services/testing/rpcStub.mjs.map +1 -0
  1115. package/dist/src/web/services/testing/slotProps.cjs +97 -0
  1116. package/dist/src/web/services/testing/slotProps.cjs.map +1 -0
  1117. package/dist/src/web/services/testing/slotProps.d.mts +69 -0
  1118. package/dist/src/web/services/testing/slotProps.d.mts.map +1 -0
  1119. package/dist/src/web/services/testing/slotProps.mjs +96 -0
  1120. package/dist/src/web/services/testing/slotProps.mjs.map +1 -0
  1121. package/dist/src/web/services/testing/templateRail.cjs +156 -0
  1122. package/dist/src/web/services/testing/templateRail.cjs.map +1 -0
  1123. package/dist/src/web/services/testing/templateRail.d.mts +32 -0
  1124. package/dist/src/web/services/testing/templateRail.d.mts.map +1 -0
  1125. package/dist/src/web/services/testing/templateRail.mjs +154 -0
  1126. package/dist/src/web/services/testing/templateRail.mjs.map +1 -0
  1127. package/dist/src/web/services/toolResult/index.cjs +30 -0
  1128. package/dist/src/web/services/toolResult/index.cjs.map +1 -0
  1129. package/dist/src/web/services/toolResult/index.d.mts +14 -0
  1130. package/dist/src/web/services/toolResult/index.d.mts.map +1 -0
  1131. package/dist/src/web/services/toolResult/index.mjs +29 -0
  1132. package/dist/src/web/services/toolResult/index.mjs.map +1 -0
  1133. package/dist/src/web/types/extensionFile.d.mts +62 -0
  1134. package/dist/src/web/types/extensionFile.d.mts.map +1 -0
  1135. package/dist/src/web/types/mcpWidget.d.mts +14 -0
  1136. package/dist/src/web/types/mcpWidget.d.mts.map +1 -0
  1137. package/dist/src/web/types/modelContext.d.mts +43 -0
  1138. package/dist/src/web/types/modelContext.d.mts.map +1 -0
  1139. package/dist/src/web/types/nativeTemplate.d.mts +29 -0
  1140. package/dist/src/web/types/nativeTemplate.d.mts.map +1 -0
  1141. package/dist/src/web/types/sessionRegistry.d.mts +46 -0
  1142. package/dist/src/web/types/sessionRegistry.d.mts.map +1 -0
  1143. package/dist/src/web/types/template.d.mts +135 -0
  1144. package/dist/src/web/types/template.d.mts.map +1 -0
  1145. package/dist/src/web/types/webPlugin.d.mts +915 -0
  1146. package/dist/src/web/types/webPlugin.d.mts.map +1 -0
  1147. package/dist/terminalPiChildSessionService.cjs +324 -0
  1148. package/dist/terminalPiChildSessionService.cjs.map +1 -0
  1149. package/dist/terminalPiChildSessionService.d.mts +46 -0
  1150. package/dist/terminalPiChildSessionService.d.mts.map +1 -0
  1151. package/dist/terminalPiChildSessionService.mjs +318 -0
  1152. package/dist/terminalPiChildSessionService.mjs.map +1 -0
  1153. package/dist/testing.cjs +11 -0
  1154. package/dist/testing.d.mts +6 -0
  1155. package/dist/testing.mjs +6 -0
  1156. package/dist/toolInventory.cjs +136 -0
  1157. package/dist/toolInventory.cjs.map +1 -0
  1158. package/dist/toolInventory.d.mts +66 -0
  1159. package/dist/toolInventory.d.mts.map +1 -0
  1160. package/dist/toolInventory.mjs +133 -0
  1161. package/dist/toolInventory.mjs.map +1 -0
  1162. package/dist/toolNames.cjs +4 -0
  1163. package/dist/toolNames.d.mts +2 -0
  1164. package/dist/toolNames.mjs +2 -0
  1165. package/dist/toolOverrides.cjs +7 -0
  1166. package/dist/toolOverrides.d.mts +3 -0
  1167. package/dist/toolOverrides.mjs +3 -0
  1168. package/dist/toolSurface.cjs +7 -0
  1169. package/dist/toolSurface.d.mts +3 -0
  1170. package/dist/toolSurface.mjs +3 -0
  1171. package/dist/transition.cjs +5 -0
  1172. package/dist/transition.d.cjs +5 -0
  1173. package/dist/transition.d.mts +2 -0
  1174. package/dist/transition.mjs +2 -0
  1175. package/dist/transitionClassifier.cjs +112 -0
  1176. package/dist/transitionClassifier.cjs.map +1 -0
  1177. package/dist/transitionClassifier.d.mts +18 -0
  1178. package/dist/transitionClassifier.d.mts.map +1 -0
  1179. package/dist/transitionClassifier.mjs +111 -0
  1180. package/dist/transitionClassifier.mjs.map +1 -0
  1181. package/dist/transitionCoordinator.cjs +131 -0
  1182. package/dist/transitionCoordinator.cjs.map +1 -0
  1183. package/dist/transitionCoordinator.d.mts +16 -0
  1184. package/dist/transitionCoordinator.d.mts.map +1 -0
  1185. package/dist/transitionCoordinator.mjs +130 -0
  1186. package/dist/transitionCoordinator.mjs.map +1 -0
  1187. package/dist/typesContextApi.cjs +0 -0
  1188. package/dist/typesContextApi.d.mts +79 -0
  1189. package/dist/typesContextApi.d.mts.map +1 -0
  1190. package/dist/typesContextApi.mjs +1 -0
  1191. package/dist/uiHub.cjs +5 -0
  1192. package/dist/uiHub.d.mts +2 -0
  1193. package/dist/uiHub.mjs +2 -0
  1194. package/dist/v3Export.cjs +10 -0
  1195. package/dist/v3Export.cjs.map +1 -0
  1196. package/dist/v3Export.d.mts +35 -0
  1197. package/dist/v3Export.d.mts.map +1 -0
  1198. package/dist/v3Export.mjs +9 -0
  1199. package/dist/v3Export.mjs.map +1 -0
  1200. package/dist/voiceReloadHandoff.cjs +14 -0
  1201. package/dist/voiceReloadHandoff.d.mts +4 -0
  1202. package/dist/voiceReloadHandoff.mjs +4 -0
  1203. package/dist/voiceTools.cjs +56 -0
  1204. package/dist/voiceTools.d.mts +4 -0
  1205. package/dist/voiceTools.mjs +4 -0
  1206. package/dist/web.cjs +65 -0
  1207. package/dist/web.d.mts +20 -0
  1208. package/dist/web.mjs +13 -0
  1209. package/dist/webCompositions.cjs +181 -0
  1210. package/dist/webCompositions.cjs.map +1 -0
  1211. package/dist/webCompositions.d.mts +79 -0
  1212. package/dist/webCompositions.d.mts.map +1 -0
  1213. package/dist/webCompositions.mjs +174 -0
  1214. package/dist/webCompositions.mjs.map +1 -0
  1215. package/dist/webTesting.cjs +14 -0
  1216. package/dist/webTesting.d.mts +6 -0
  1217. package/dist/webTesting.mjs +6 -0
  1218. package/package.json +586 -0
package/dist/web.cjs ADDED
@@ -0,0 +1,65 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_bundleAssetPolicy = require("./src/web/schemas/bundleAssetPolicy.cjs");
3
+ const require_webPlugin = require("./src/extensions/webPlugin.cjs");
4
+ const require_globalStore = require("./src/web/models/globalStore.cjs");
5
+ const require_sessionStore = require("./src/web/models/sessionStore.cjs");
6
+ const require_workspaceStore = require("./src/web/models/workspaceStore.cjs");
7
+ const require_index = require("./src/web/services/toolResult/index.cjs");
8
+ const require_template = require("./src/web/schemas/template.cjs");
9
+ const require_index$1 = require("./src/web/services/apiPaths/index.cjs");
10
+ const require_index$2 = require("./src/web/services/apiRoutes/index.cjs");
11
+ const require_index$3 = require("./src/web/services/apiClient/index.cjs");
12
+ const require_index$4 = require("./src/web/services/sessionRegistry/index.cjs");
13
+ const require_mcpWidget = require("./src/web/services/mcpWidget.cjs");
14
+ exports.BUNDLE_ASSET_POLICY_PATH = require_bundleAssetPolicy.BUNDLE_ASSET_POLICY_PATH;
15
+ exports.BUNDLE_ASSET_POLICY_VERSION = require_bundleAssetPolicy.BUNDLE_ASSET_POLICY_VERSION;
16
+ exports.HUB_ADVERTISEMENT_VERSION = require_index$4.HUB_ADVERTISEMENT_VERSION;
17
+ exports.REGISTRY_DIR_ENV = require_index$4.REGISTRY_DIR_ENV;
18
+ exports.SETTINGS_BASE_PATH = require_index$1.SETTINGS_BASE_PATH;
19
+ exports.apiQueryString = require_index$1.apiQueryString;
20
+ exports.apiResponse = require_index$3.apiResponse;
21
+ exports.applyPathParams = require_index$1.applyPathParams;
22
+ exports.bindSessionApiWorkspace = require_index$2.bindSessionApiWorkspace;
23
+ exports.createApiClient = require_index$3.createApiClient;
24
+ exports.defineActivityGroup = require_webPlugin.defineActivityGroup;
25
+ exports.defineApiRoutes = require_index$3.defineApiRoutes;
26
+ exports.defineChannelFile = require_webPlugin.defineChannelFile;
27
+ exports.defineContextAction = require_webPlugin.defineContextAction;
28
+ exports.defineDockFace = require_webPlugin.defineDockFace;
29
+ exports.defineFileLinks = require_webPlugin.defineFileLinks;
30
+ exports.defineFill = require_webPlugin.defineFill;
31
+ exports.defineGlobalStore = require_globalStore.defineGlobalStore;
32
+ exports.defineLeaderBinding = require_webPlugin.defineLeaderBinding;
33
+ exports.defineMcpWidget = require_mcpWidget.defineMcpWidget;
34
+ exports.defineMinorModeFile = require_webPlugin.defineMinorModeFile;
35
+ exports.definePaletteCommand = require_webPlugin.definePaletteCommand;
36
+ exports.defineRepositorySettingsPanel = require_webPlugin.defineRepositorySettingsPanel;
37
+ exports.defineSelectionAxis = require_webPlugin.defineSelectionAxis;
38
+ exports.defineSessionChannel = require_webPlugin.defineSessionChannel;
39
+ exports.defineSessionStore = require_sessionStore.defineSessionStore;
40
+ exports.defineSettingsPanel = require_webPlugin.defineSettingsPanel;
41
+ exports.defineSettingsSection = require_webPlugin.defineSettingsSection;
42
+ exports.defineSlot = require_webPlugin.defineSlot;
43
+ exports.defineSlotFile = require_webPlugin.defineSlotFile;
44
+ exports.defineTab = require_webPlugin.defineTab;
45
+ exports.defineToolRenderer = require_webPlugin.defineToolRenderer;
46
+ exports.defineUserMessageAction = require_webPlugin.defineUserMessageAction;
47
+ exports.defineWebLifecycle = require_webPlugin.defineWebLifecycle;
48
+ exports.defineWebPlugin = require_webPlugin.defineWebPlugin;
49
+ exports.defineWebTemplate = require_webPlugin.defineWebTemplate;
50
+ exports.defineWorkspaceStore = require_workspaceStore.defineWorkspaceStore;
51
+ exports.globalApiPath = require_index$2.globalApiPath;
52
+ exports.hubAdvertisementPath = require_index$4.hubAdvertisementPath;
53
+ exports.parseBundleAssetPolicy = require_bundleAssetPolicy.parseBundleAssetPolicy;
54
+ exports.parseHubAdvertisement = require_index$4.parseHubAdvertisement;
55
+ exports.parseNativeTemplate = require_template.parseNativeTemplate;
56
+ exports.parseWebTemplate = require_template.parseWebTemplate;
57
+ exports.pluginApiBase = require_index$1.pluginApiBase;
58
+ exports.pluginApiUrl = require_index$1.pluginApiUrl;
59
+ exports.resolveRegistryDir = require_index$4.resolveRegistryDir;
60
+ exports.scopeApiRoot = require_index$1.scopeApiRoot;
61
+ exports.sessionApiAddress = require_index$2.sessionApiAddress;
62
+ exports.sessionApiPath = require_index$2.sessionApiPath;
63
+ exports.toolResultText = require_index.toolResultText;
64
+ exports.toolResultTextLines = require_index.toolResultTextLines;
65
+ exports.workspaceApiPath = require_index$2.workspaceApiPath;
package/dist/web.d.mts ADDED
@@ -0,0 +1,20 @@
1
+ import { BUNDLE_ASSET_POLICY_PATH, BUNDLE_ASSET_POLICY_VERSION, BundleAssetPolicy, parseBundleAssetPolicy } from "./src/web/schemas/bundleAssetPolicy.mjs";
2
+ import { DoomMcpWidgetProps } from "./src/web/types/mcpWidget.mjs";
3
+ import { WebTemplateContribution, WebTemplateHeaderOptions, WebTemplateRail, WebTemplateRailActions, WebTemplateRailDirectoryListing, WebTemplateRailPendingSetup, WebTemplateRailResult, WebTemplateRailSession, WebTemplateRailWorkspace } from "./src/web/types/template.mjs";
4
+ import { NativeTemplateContribution, NativeTemplateScreens, NativeTemplateSessionsProps } from "./src/web/types/nativeTemplate.mjs";
5
+ import { ModelContext, ModelContextAbortSignal, ModelContextBinding, ModelContextExecutionOptions, ModelContextRegistrationOptions, ModelContextTool, ModelContextToolChangeEvent, ModelContextToolChangeListener, ModelContextToolDescriptor } from "./src/web/types/modelContext.mjs";
6
+ import { ActivityGroupContribution, CaptureStatusEvent, ComposerCapture, ComposerSubmission, ContextAction, ContextActionContribution, ContextActionRunContext, DockFaceContribution, FileLinkSource, GlobalStore, LeaderBindingContribution, LeaderKeyContribution, MinorModeContribution, PaletteCommandContext, PaletteCommandContribution, RepositorySettingsPanelContribution, RepositorySettingsPanelProps, RepositorySettingsRepository, SelectionAxisContribution, SessionChannelContribution, SessionFrameSender, SessionRecords, SessionStore, SessionStoreChannel, SettingsFieldContribution, SettingsFieldOption, SettingsPanelContribution, SettingsPanelProps, SettingsSectionContribution, SlotDataFill, SlotDeclaration, SlotFillContribution, SurfaceContribution, TabContribution, ThreadViewOptions, ToolCompletionEvent, ToolMessageRenderProps, ToolPromptContribution, ToolPromptDialog, ToolPromptRenderProps, ToolRendererContribution, ToolResultView, TransientTab, UserMessageActionContribution, UserMessageActionRunContext, WebPluginContextInventoryItem, WebPluginContextItem, WebPluginContributions, WebPluginDefinition, WebPluginMount, WebPluginNewSessionContext, WebPluginRuntime, WebPluginScope, WebPluginSessionContext, WebPluginSlotProps, WorkspaceRecords, WorkspaceStore } from "./src/web/types/webPlugin.mjs";
7
+ import { ActivityGroupFile, ChannelFile, ContextActionFile, DockFaceFile, FillFile, LeaderBindingFile, MinorModeFile, PaletteCommandFile, SelectionAxisFile, SettingsPanelFile, SettingsSectionFile, SlotFile, TabFile, ToolRendererFile, UserMessageActionFile, WebTemplateFile } from "./src/web/types/extensionFile.mjs";
8
+ import { defineActivityGroup, defineChannelFile, defineContextAction, defineDockFace, defineFileLinks, defineFill, defineLeaderBinding, defineMinorModeFile, definePaletteCommand, defineRepositorySettingsPanel, defineSelectionAxis, defineSessionChannel, defineSettingsPanel, defineSettingsSection, defineSlot, defineSlotFile, defineTab, defineToolRenderer, defineUserMessageAction, defineWebLifecycle, defineWebPlugin, defineWebTemplate } from "./src/extensions/webPlugin.mjs";
9
+ import { defineGlobalStore } from "./src/web/models/globalStore.mjs";
10
+ import { defineSessionStore } from "./src/web/models/sessionStore.mjs";
11
+ import { defineWorkspaceStore } from "./src/web/models/workspaceStore.mjs";
12
+ import { toolResultText, toolResultTextLines } from "./src/web/services/toolResult/index.mjs";
13
+ import { parseNativeTemplate, parseWebTemplate } from "./src/web/schemas/template.mjs";
14
+ import { ApiParams, ApiQuery, ApiScopeAddress, SETTINGS_BASE_PATH, apiQueryString, applyPathParams, pluginApiBase, pluginApiUrl, scopeApiRoot } from "./src/web/services/apiPaths/index.mjs";
15
+ import { bindSessionApiWorkspace, globalApiPath, sessionApiAddress, sessionApiPath, workspaceApiPath } from "./src/web/services/apiRoutes/index.mjs";
16
+ import { ApiCallInit, ApiClient, ApiClientOptions, ApiMethod, ApiResponseOf, ApiResult, ApiRouteMethod, ApiRouteSpec, ApiRoutes, ApiScopeClient, ApiScopeName, ApiStreamMethod, ApiTransport, apiResponse, createApiClient, defineApiRoutes } from "./src/web/services/apiClient/index.mjs";
17
+ import { HubAdvertisement, RegistryDirInput } from "./src/web/types/sessionRegistry.mjs";
18
+ import { HUB_ADVERTISEMENT_VERSION, REGISTRY_DIR_ENV, hubAdvertisementPath, parseHubAdvertisement, resolveRegistryDir } from "./src/web/services/sessionRegistry/index.mjs";
19
+ import { defineMcpWidget } from "./src/web/services/mcpWidget.mjs";
20
+ export { type ActivityGroupContribution, type ActivityGroupFile, type ApiCallInit, type ApiClient, type ApiClientOptions, type ApiMethod, type ApiParams, type ApiQuery, type ApiResponseOf, type ApiResult, type ApiRouteMethod, type ApiRouteSpec, type ApiRoutes, type ApiScopeAddress, type ApiScopeClient, type ApiScopeName, type ApiStreamMethod, type ApiTransport, BUNDLE_ASSET_POLICY_PATH, BUNDLE_ASSET_POLICY_VERSION, type BundleAssetPolicy, type CaptureStatusEvent, type ChannelFile, type ComposerCapture, type ComposerSubmission, type ContextAction, type ContextActionContribution, type ContextActionFile, type ContextActionRunContext, type DockFaceContribution, type DockFaceFile, type DoomMcpWidgetProps, type FileLinkSource, type FillFile, type GlobalStore, HUB_ADVERTISEMENT_VERSION, type HubAdvertisement, type LeaderBindingContribution, type LeaderBindingFile, type LeaderKeyContribution, type MinorModeContribution, type MinorModeFile, type ModelContext, type ModelContextAbortSignal, type ModelContextBinding, type ModelContextExecutionOptions, type ModelContextRegistrationOptions, type ModelContextTool, type ModelContextToolChangeEvent, type ModelContextToolChangeListener, type ModelContextToolDescriptor, type NativeTemplateContribution, type NativeTemplateScreens, type NativeTemplateSessionsProps, type PaletteCommandContext, type PaletteCommandContribution, type PaletteCommandFile, REGISTRY_DIR_ENV, type RegistryDirInput, type RepositorySettingsPanelContribution, type RepositorySettingsPanelProps, type RepositorySettingsRepository, SETTINGS_BASE_PATH, type SelectionAxisContribution, type SelectionAxisFile, type SessionChannelContribution, type SessionFrameSender, type SessionRecords, type SessionStore, type SessionStoreChannel, type SettingsFieldContribution, type SettingsFieldOption, type SettingsPanelContribution, type SettingsPanelFile, type SettingsPanelProps, type SettingsSectionContribution, type SettingsSectionFile, type SlotDataFill, type SlotDeclaration, type SlotFile, type SlotFillContribution, type SurfaceContribution, type TabContribution, type TabFile, type ThreadViewOptions, type ToolCompletionEvent, type ToolMessageRenderProps, type ToolPromptContribution, type ToolPromptDialog, type ToolPromptRenderProps, type ToolRendererContribution, type ToolRendererFile, type ToolResultView, type TransientTab, type UserMessageActionContribution, type UserMessageActionFile, type UserMessageActionRunContext, type WebPluginContextInventoryItem, type WebPluginContextItem, type WebPluginContributions, type WebPluginDefinition, type WebPluginMount, type WebPluginNewSessionContext, type WebPluginRuntime, type WebPluginScope, type WebPluginSessionContext, type WebPluginSlotProps, type WebTemplateContribution, type WebTemplateFile, type WebTemplateHeaderOptions, type WebTemplateRail, type WebTemplateRailActions, type WebTemplateRailDirectoryListing, type WebTemplateRailPendingSetup, type WebTemplateRailResult, type WebTemplateRailSession, type WebTemplateRailWorkspace, type WorkspaceRecords, type WorkspaceStore, apiQueryString, apiResponse, applyPathParams, bindSessionApiWorkspace, createApiClient, defineActivityGroup, defineApiRoutes, defineChannelFile, defineContextAction, defineDockFace, defineFileLinks, defineFill, defineGlobalStore, defineLeaderBinding, defineMcpWidget, defineMinorModeFile, definePaletteCommand, defineRepositorySettingsPanel, defineSelectionAxis, defineSessionChannel, defineSessionStore, defineSettingsPanel, defineSettingsSection, defineSlot, defineSlotFile, defineTab, defineToolRenderer, defineUserMessageAction, defineWebLifecycle, defineWebPlugin, defineWebTemplate, defineWorkspaceStore, globalApiPath, hubAdvertisementPath, parseBundleAssetPolicy, parseHubAdvertisement, parseNativeTemplate, parseWebTemplate, pluginApiBase, pluginApiUrl, resolveRegistryDir, scopeApiRoot, sessionApiAddress, sessionApiPath, toolResultText, toolResultTextLines, workspaceApiPath };
package/dist/web.mjs ADDED
@@ -0,0 +1,13 @@
1
+ import { BUNDLE_ASSET_POLICY_PATH, BUNDLE_ASSET_POLICY_VERSION, parseBundleAssetPolicy } from "./src/web/schemas/bundleAssetPolicy.mjs";
2
+ import { defineActivityGroup, defineChannelFile, defineContextAction, defineDockFace, defineFileLinks, defineFill, defineLeaderBinding, defineMinorModeFile, definePaletteCommand, defineRepositorySettingsPanel, defineSelectionAxis, defineSessionChannel, defineSettingsPanel, defineSettingsSection, defineSlot, defineSlotFile, defineTab, defineToolRenderer, defineUserMessageAction, defineWebLifecycle, defineWebPlugin, defineWebTemplate } from "./src/extensions/webPlugin.mjs";
3
+ import { defineGlobalStore } from "./src/web/models/globalStore.mjs";
4
+ import { defineSessionStore } from "./src/web/models/sessionStore.mjs";
5
+ import { defineWorkspaceStore } from "./src/web/models/workspaceStore.mjs";
6
+ import { toolResultText, toolResultTextLines } from "./src/web/services/toolResult/index.mjs";
7
+ import { parseNativeTemplate, parseWebTemplate } from "./src/web/schemas/template.mjs";
8
+ import { SETTINGS_BASE_PATH, apiQueryString, applyPathParams, pluginApiBase, pluginApiUrl, scopeApiRoot } from "./src/web/services/apiPaths/index.mjs";
9
+ import { bindSessionApiWorkspace, globalApiPath, sessionApiAddress, sessionApiPath, workspaceApiPath } from "./src/web/services/apiRoutes/index.mjs";
10
+ import { apiResponse, createApiClient, defineApiRoutes } from "./src/web/services/apiClient/index.mjs";
11
+ import { HUB_ADVERTISEMENT_VERSION, REGISTRY_DIR_ENV, hubAdvertisementPath, parseHubAdvertisement, resolveRegistryDir } from "./src/web/services/sessionRegistry/index.mjs";
12
+ import { defineMcpWidget } from "./src/web/services/mcpWidget.mjs";
13
+ export { BUNDLE_ASSET_POLICY_PATH, BUNDLE_ASSET_POLICY_VERSION, HUB_ADVERTISEMENT_VERSION, REGISTRY_DIR_ENV, SETTINGS_BASE_PATH, apiQueryString, apiResponse, applyPathParams, bindSessionApiWorkspace, createApiClient, defineActivityGroup, defineApiRoutes, defineChannelFile, defineContextAction, defineDockFace, defineFileLinks, defineFill, defineGlobalStore, defineLeaderBinding, defineMcpWidget, defineMinorModeFile, definePaletteCommand, defineRepositorySettingsPanel, defineSelectionAxis, defineSessionChannel, defineSessionStore, defineSettingsPanel, defineSettingsSection, defineSlot, defineSlotFile, defineTab, defineToolRenderer, defineUserMessageAction, defineWebLifecycle, defineWebPlugin, defineWebTemplate, defineWorkspaceStore, globalApiPath, hubAdvertisementPath, parseBundleAssetPolicy, parseHubAdvertisement, parseNativeTemplate, parseWebTemplate, pluginApiBase, pluginApiUrl, resolveRegistryDir, scopeApiRoot, sessionApiAddress, sessionApiPath, toolResultText, toolResultTextLines, workspaceApiPath };
@@ -0,0 +1,181 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
3
+ const require_remote = require("./src/constants/remote.cjs");
4
+ const require_index = require("./src/services/bundlePublication/index.cjs");
5
+ let node_crypto = require("node:crypto");
6
+ node_crypto = require_runtime.__toESM(node_crypto, 1);
7
+ let node_fs = require("node:fs");
8
+ node_fs = require_runtime.__toESM(node_fs, 1);
9
+ let node_path = require("node:path");
10
+ node_path = require_runtime.__toESM(node_path, 1);
11
+ let _agimon_ai_po_web_security = require("@agimon-ai/po-web-security");
12
+ //#region src/services/webCompositions/index.ts
13
+ const absolute = (file) => file.startsWith("/") ? file : `/${file}`;
14
+ /** The build's plugin copies for exactly the given slots, in slot order. */
15
+ function slotPlugins(build, slots) {
16
+ return slots.flatMap((slot) => build.plugins.filter((plugin) => plugin.slot === slot));
17
+ }
18
+ /**
19
+ * The stylesheets of exactly the given slots, each loaded once: the stylesheets their code
20
+ * imports first, then each slot's own stylesheet in slot order.
21
+ */
22
+ function mountStylePaths(build, slots) {
23
+ const paths = slots.map((slot) => build.pluginStyles[slot]).filter((style) => style !== void 0);
24
+ if (paths.length === 0 && build.baseStyle !== void 0) paths.push(build.baseStyle);
25
+ const imported = slotPlugins(build, slots).flatMap((plugin) => plugin.css);
26
+ return [...new Set([...imported, ...paths].map(absolute))];
27
+ }
28
+ /** Every file the given slots can load: their reachable files and static stylesheets, each once. */
29
+ function mountAssetPaths(build, slots) {
30
+ return [...new Set(slotPlugins(build, slots).flatMap((plugin) => [...plugin.files, ...plugin.css]).map(absolute))];
31
+ }
32
+ const sha256 = (value) => node_crypto.default.createHash("sha256").update(value).digest("hex");
33
+ /**
34
+ * Signs the global build once and hands each mount a composition naming its own plugins.
35
+ *
36
+ * Every mount of one build shares a publication id, so the bytes are counted per mount and
37
+ * released only when the last mount leaves or moves to another build.
38
+ */
39
+ function createWebCompositions(stateDirectory, onNotice) {
40
+ const publication = require_index.createPluginBundlePublication(stateDirectory, onNotice);
41
+ let shell;
42
+ const mounts = /* @__PURE__ */ new Map();
43
+ const nativeMounts = /* @__PURE__ */ new Map();
44
+ const references = /* @__PURE__ */ new Map();
45
+ const keyOf = (mount) => mount.scope === "global" ? "global" : mount.scope === "workspace" ? `workspace:${mount.workspaceId}` : `session:${mount.sessionId}`;
46
+ const release = (id) => {
47
+ const count = (references.get(id) ?? 0) - 1;
48
+ if (count > 0) {
49
+ references.set(id, count);
50
+ return;
51
+ }
52
+ references.delete(id);
53
+ publication.release(id);
54
+ };
55
+ return {
56
+ publishShell(build) {
57
+ shell = publication.publish(sha256(`shell:${build.key}`), build.webDirectory);
58
+ if (!shell) throw new Error("Could not publish the global web shell.");
59
+ },
60
+ shellTrust: () => shell === void 0 ? void 0 : {
61
+ publicKey: shell.signed.publicKey,
62
+ revision: shell.signed.manifest.revision
63
+ },
64
+ publish(mount, build, channels, slots) {
65
+ const id = sha256(`plugins:${build.key}`);
66
+ const published = publication.publish(id, build.pluginsDirectory);
67
+ if (!published) throw new Error(`Could not publish ${keyOf(mount)} web composition.`);
68
+ const previous = mounts.get(keyOf(mount));
69
+ if (previous?.id !== id) references.set(id, (references.get(id) ?? 0) + 1);
70
+ const revision = published.signed.manifest.revision;
71
+ const base = `/api/web-plugins/${id}/${String(revision)}`;
72
+ const signedPaths = new Set(published.signed.manifest.assets.map((asset) => asset.path));
73
+ const composition = {
74
+ id,
75
+ scope: mount.scope,
76
+ revision,
77
+ manifestUrl: `${base}/manifest`,
78
+ rawAssetBaseUrl: `${base}/assets`,
79
+ verifiedAssetBaseUrl: `/verified-plugins/${id}/${String(revision)}`,
80
+ pluginEntries: slotPlugins(build, slots).map((plugin) => [plugin.slot, absolute(plugin.entry)]),
81
+ assetPaths: mountAssetPaths(build, slots).filter((file) => signedPaths.has(file)),
82
+ stylePaths: mountStylePaths(build, slots).filter((style) => signedPaths.has(style)),
83
+ channels: [...channels],
84
+ plugins: [...slots]
85
+ };
86
+ mounts.set(keyOf(mount), composition);
87
+ if (previous !== void 0 && previous.id !== id) release(previous.id);
88
+ return composition;
89
+ },
90
+ get: (mount) => mounts.get(keyOf(mount)),
91
+ remove: (mount) => {
92
+ const previous = mounts.get(keyOf(mount));
93
+ mounts.delete(keyOf(mount));
94
+ if (previous) release(previous.id);
95
+ },
96
+ /**
97
+ * Publishes the native composition for one mount. Signed under the `native` profile, so it can
98
+ * never be served or verified as a web bundle. Shares reference counting with web publications.
99
+ */
100
+ publishNative(mount, build, channels, pluginIds) {
101
+ const id = sha256(`native:${build.key}`);
102
+ const published = publication.publish(id, build.pluginsDirectory, "native");
103
+ if (!published) throw new Error(`Could not publish ${keyOf(mount)} native composition.`);
104
+ const previous = nativeMounts.get(keyOf(mount));
105
+ if (previous?.id !== id) references.set(id, (references.get(id) ?? 0) + 1);
106
+ const revision = published.signed.manifest.revision;
107
+ const base = `/api/web-plugins/${id}/${String(revision)}`;
108
+ const composition = {
109
+ id,
110
+ scope: mount.scope,
111
+ revision,
112
+ manifestUrl: `${base}/manifest`,
113
+ rawAssetBaseUrl: `${base}/assets`,
114
+ entryPath: _agimon_ai_po_web_security.NATIVE_ENTRY_PATH,
115
+ channels: [...channels],
116
+ plugins: [...pluginIds]
117
+ };
118
+ nativeMounts.set(keyOf(mount), composition);
119
+ if (previous !== void 0 && previous.id !== id) release(previous.id);
120
+ return composition;
121
+ },
122
+ getNative: (mount) => nativeMounts.get(keyOf(mount)),
123
+ removeNative: (mount) => {
124
+ const previous = nativeMounts.get(keyOf(mount));
125
+ nativeMounts.delete(keyOf(mount));
126
+ if (previous) release(previous.id);
127
+ },
128
+ /**
129
+ * Signs `po/host-channel-key/v1` with the shell publication's signer, the key the pairing QR pins
130
+ * as `s`. Undefined until the shell is published.
131
+ */
132
+ attestHost: (fields) => shell === void 0 ? void 0 : publication.attest(require_remote.HOST_CHANNEL_KEY_TAG, fields),
133
+ publicKey: () => publication.publicKey(),
134
+ async request(request) {
135
+ const url = new URL(request.url);
136
+ if ((url.pathname === "/bundle-manifest.json" || url.pathname.startsWith("/bundle-assets/")) && request.method !== "GET" && request.method !== "HEAD") return new Response(null, { status: 405 });
137
+ if (url.pathname === "/bundle-manifest.json") {
138
+ if (!shell) return new Response(null, { status: 404 });
139
+ return Response.json(shell.signed);
140
+ }
141
+ const shellAsset = /^\/bundle-assets\/(\d+)(\/.*)$/u.exec(url.pathname);
142
+ if (shellAsset) {
143
+ if (!shell || Number(shellAsset[1]) !== shell.signed.manifest.revision) return new Response(null, { status: 404 });
144
+ const asset = shell.signed.manifest.assets.find((entry) => entry.path === shellAsset[2]);
145
+ if (!asset) return new Response(null, { status: 404 });
146
+ const bytes = await node_fs.default.promises.readFile(node_path.default.join(shell.assetsDir, asset.path));
147
+ return new Response(request.method === "HEAD" ? null : bytes, { headers: {
148
+ "content-type": asset.contentType,
149
+ "x-content-type-options": "nosniff"
150
+ } });
151
+ }
152
+ const match = /^\/api\/web-plugins\/([a-f0-9]{64})\/(\d+)\/(manifest|assets(?:\/.*)?)$/u.exec(url.pathname);
153
+ if (!match) return void 0;
154
+ if (request.method !== "GET" && request.method !== "HEAD") return new Response(null, { status: 405 });
155
+ const bundle = publication.get(match[1], Number(match[2]));
156
+ if (!bundle) return Response.json({ error: "Plugin generation not found." }, { status: 404 });
157
+ if (match[3] === "manifest") return Response.json(bundle.signed);
158
+ const assetPath = match[3].slice(6);
159
+ const asset = bundle.signed.manifest.assets.find((candidate) => candidate.path === assetPath);
160
+ if (!asset) return Response.json({ error: "Plugin asset not found." }, { status: 404 });
161
+ const bytes = await node_fs.default.promises.readFile(node_path.default.join(bundle.assetsDir, asset.path));
162
+ return new Response(request.method === "HEAD" ? null : bytes, { headers: {
163
+ "content-type": asset.contentType,
164
+ "cache-control": "private, max-age=31536000, immutable",
165
+ "x-content-type-options": "nosniff"
166
+ } });
167
+ },
168
+ close() {
169
+ mounts.clear();
170
+ nativeMounts.clear();
171
+ references.clear();
172
+ publication.close();
173
+ }
174
+ };
175
+ }
176
+ //#endregion
177
+ exports.createWebCompositions = createWebCompositions;
178
+ exports.mountAssetPaths = mountAssetPaths;
179
+ exports.mountStylePaths = mountStylePaths;
180
+
181
+ //# sourceMappingURL=webCompositions.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webCompositions.cjs","names":["crypto","createPluginBundlePublication","NATIVE_ENTRY_PATH","HOST_CHANNEL_KEY_TAG","fs","path"],"sources":["../src/services/webCompositions/index.ts"],"sourcesContent":["import crypto from 'node:crypto';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nimport { NATIVE_ENTRY_PATH } from '@agimon-ai/po-web-security';\n\nimport { HOST_CHANNEL_KEY_TAG } from '../../constants/remote';\nimport type { DoomApiMount, DoomNativeComposition, DoomWebComposition } from '../../exports/packageApi';\nimport { createPluginBundlePublication, type PublishedBundle } from '../bundlePublication';\n\n/** One plugin copy in a global web build: its slot entry and the files that entry can load. */\nexport interface GlobalWebBuildPlugin {\n pluginId: string;\n /** The copy's identity: the pluginId for a host plugin, else the pluginId plus a package hash. */\n slot: string;\n packageDir: string;\n isHost: boolean;\n /** The slot entry module below `pluginsDirectory`. */\n entry: string;\n /** Every file below `pluginsDirectory` the entry reaches through static and dynamic imports, plus its stylesheet. */\n files: readonly string[];\n /** The stylesheets of the entry's static import closure. */\n css: readonly string[];\n}\n\n/** One global web build: the shell, the shared plugin composition, and one stylesheet per plugin copy. */\nexport interface GlobalWebBuild {\n /** Content key of the build; equal keys hold identical bytes. */\n key: string;\n /** Signed cockpit shell directory. */\n webDirectory: string;\n /** Shared plugin composition directory, published once for every mount. */\n pluginsDirectory: string;\n /** Every plugin copy in the build, in build order. */\n plugins: readonly GlobalWebBuildPlugin[];\n /** Content-hashed stylesheet paths below `pluginsDirectory`, keyed by slot. */\n pluginStyles: Readonly<Record<string, string>>;\n /** Stylesheet a mount without plugin styles still loads, for the host shell and fallback template. */\n baseStyle?: string;\n}\n\n/** One global native build: a single signed CommonJS composition shared by every mount. */\nexport interface GlobalNativeBuild {\n /** Content key of the build; equal keys hold identical bytes. */\n key: string;\n /** Directory holding exactly `/composition.js`. */\n pluginsDirectory: string;\n}\n\nconst absolute = (file: string): string => (file.startsWith('/') ? file : `/${file}`);\n\n/** The build's plugin copies for exactly the given slots, in slot order. */\nfunction slotPlugins(build: GlobalWebBuild, slots: readonly string[]): GlobalWebBuildPlugin[] {\n return slots.flatMap((slot) => build.plugins.filter((plugin) => plugin.slot === slot));\n}\n\n/**\n * The stylesheets of exactly the given slots, each loaded once: the stylesheets their code\n * imports first, then each slot's own stylesheet in slot order.\n */\nexport function mountStylePaths(build: GlobalWebBuild, slots: readonly string[]): string[] {\n const paths = slots.map((slot) => build.pluginStyles[slot]).filter((style) => style !== undefined);\n if (paths.length === 0 && build.baseStyle !== undefined) paths.push(build.baseStyle);\n const imported = slotPlugins(build, slots).flatMap((plugin) => plugin.css);\n return [...new Set([...imported, ...paths].map(absolute))];\n}\n\n/** Every file the given slots can load: their reachable files and static stylesheets, each once. */\nexport function mountAssetPaths(build: GlobalWebBuild, slots: readonly string[]): string[] {\n return [\n ...new Set(\n slotPlugins(build, slots)\n .flatMap((plugin) => [...plugin.files, ...plugin.css])\n .map(absolute),\n ),\n ];\n}\n\nconst sha256 = (value: string): string => crypto.createHash('sha256').update(value).digest('hex');\n\n/**\n * Signs the global build once and hands each mount a composition naming its own plugins.\n *\n * Every mount of one build shares a publication id, so the bytes are counted per mount and\n * released only when the last mount leaves or moves to another build.\n */\nexport function createWebCompositions(stateDirectory: string, onNotice: (message: string) => void) {\n const publication = createPluginBundlePublication(stateDirectory, onNotice);\n let shell: PublishedBundle | undefined;\n const mounts = new Map<string, DoomWebComposition>();\n const nativeMounts = new Map<string, DoomNativeComposition>();\n const references = new Map<string, number>();\n const keyOf = (mount: DoomApiMount): string =>\n mount.scope === 'global'\n ? 'global'\n : mount.scope === 'workspace'\n ? `workspace:${mount.workspaceId}`\n : `session:${mount.sessionId}`;\n const release = (id: string): void => {\n const count = (references.get(id) ?? 0) - 1;\n if (count > 0) {\n references.set(id, count);\n return;\n }\n references.delete(id);\n publication.release(id);\n };\n return {\n publishShell(build: GlobalWebBuild): void {\n shell = publication.publish(sha256(`shell:${build.key}`), build.webDirectory);\n if (!shell) throw new Error('Could not publish the global web shell.');\n },\n shellTrust: () =>\n shell === undefined ? undefined : { publicKey: shell.signed.publicKey, revision: shell.signed.manifest.revision },\n publish(\n mount: DoomApiMount,\n build: GlobalWebBuild,\n channels: readonly string[],\n slots: readonly string[],\n ): DoomWebComposition | undefined {\n const id = sha256(`plugins:${build.key}`);\n const published = publication.publish(id, build.pluginsDirectory);\n if (!published) throw new Error(`Could not publish ${keyOf(mount)} web composition.`);\n const previous = mounts.get(keyOf(mount));\n if (previous?.id !== id) references.set(id, (references.get(id) ?? 0) + 1);\n const revision = published.signed.manifest.revision;\n const base = `/api/web-plugins/${id}/${String(revision)}`;\n const signedPaths = new Set(published.signed.manifest.assets.map((asset) => asset.path));\n const composition: DoomWebComposition = {\n id,\n scope: mount.scope,\n revision,\n manifestUrl: `${base}/manifest`,\n rawAssetBaseUrl: `${base}/assets`,\n verifiedAssetBaseUrl: `/verified-plugins/${id}/${String(revision)}`,\n pluginEntries: slotPlugins(build, slots).map((plugin): [string, string] => [\n plugin.slot,\n absolute(plugin.entry),\n ]),\n assetPaths: mountAssetPaths(build, slots).filter((file) => signedPaths.has(file)),\n stylePaths: mountStylePaths(build, slots).filter((style) => signedPaths.has(style)),\n channels: [...channels],\n plugins: [...slots],\n };\n mounts.set(keyOf(mount), composition);\n if (previous !== undefined && previous.id !== id) release(previous.id);\n return composition;\n },\n get: (mount: DoomApiMount) => mounts.get(keyOf(mount)),\n remove: (mount: DoomApiMount) => {\n const previous = mounts.get(keyOf(mount));\n mounts.delete(keyOf(mount));\n if (previous) release(previous.id);\n },\n /**\n * Publishes the native composition for one mount. Signed under the `native` profile, so it can\n * never be served or verified as a web bundle. Shares reference counting with web publications.\n */\n publishNative(\n mount: DoomApiMount,\n build: GlobalNativeBuild,\n channels: readonly string[],\n pluginIds: readonly string[],\n ): DoomNativeComposition {\n const id = sha256(`native:${build.key}`);\n const published = publication.publish(id, build.pluginsDirectory, 'native');\n if (!published) throw new Error(`Could not publish ${keyOf(mount)} native composition.`);\n const previous = nativeMounts.get(keyOf(mount));\n if (previous?.id !== id) references.set(id, (references.get(id) ?? 0) + 1);\n const revision = published.signed.manifest.revision;\n const base = `/api/web-plugins/${id}/${String(revision)}`;\n const composition: DoomNativeComposition = {\n id,\n scope: mount.scope,\n revision,\n manifestUrl: `${base}/manifest`,\n rawAssetBaseUrl: `${base}/assets`,\n entryPath: NATIVE_ENTRY_PATH,\n channels: [...channels],\n plugins: [...pluginIds],\n };\n nativeMounts.set(keyOf(mount), composition);\n if (previous !== undefined && previous.id !== id) release(previous.id);\n return composition;\n },\n getNative: (mount: DoomApiMount) => nativeMounts.get(keyOf(mount)),\n removeNative: (mount: DoomApiMount) => {\n const previous = nativeMounts.get(keyOf(mount));\n nativeMounts.delete(keyOf(mount));\n if (previous) release(previous.id);\n },\n /**\n * Signs `po/host-channel-key/v1` with the shell publication's signer, the key the pairing QR pins\n * as `s`. Undefined until the shell is published.\n */\n attestHost: (fields: readonly string[]): string | undefined =>\n shell === undefined ? undefined : publication.attest(HOST_CHANNEL_KEY_TAG, fields),\n publicKey: () => publication.publicKey(),\n async request(request: Request): Promise<Response | undefined> {\n const url = new URL(request.url);\n if (\n (url.pathname === '/bundle-manifest.json' || url.pathname.startsWith('/bundle-assets/')) &&\n request.method !== 'GET' &&\n request.method !== 'HEAD'\n )\n return new Response(null, { status: 405 });\n if (url.pathname === '/bundle-manifest.json') {\n if (!shell) return new Response(null, { status: 404 });\n return Response.json(shell.signed);\n }\n const shellAsset = /^\\/bundle-assets\\/(\\d+)(\\/.*)$/u.exec(url.pathname);\n if (shellAsset) {\n if (!shell || Number(shellAsset[1]) !== shell.signed.manifest.revision)\n return new Response(null, { status: 404 });\n const asset = shell.signed.manifest.assets.find((entry) => entry.path === shellAsset[2]);\n if (!asset) return new Response(null, { status: 404 });\n const bytes = await fs.promises.readFile(path.join(shell.assetsDir, asset.path));\n return new Response(request.method === 'HEAD' ? null : bytes, {\n headers: { 'content-type': asset.contentType, 'x-content-type-options': 'nosniff' },\n });\n }\n const match = /^\\/api\\/web-plugins\\/([a-f0-9]{64})\\/(\\d+)\\/(manifest|assets(?:\\/.*)?)$/u.exec(url.pathname);\n if (!match) return undefined;\n if (request.method !== 'GET' && request.method !== 'HEAD') return new Response(null, { status: 405 });\n const bundle = publication.get(match[1], Number(match[2]));\n if (!bundle) return Response.json({ error: 'Plugin generation not found.' }, { status: 404 });\n if (match[3] === 'manifest') return Response.json(bundle.signed);\n const assetPath = match[3].slice('assets'.length);\n const asset = bundle.signed.manifest.assets.find((candidate) => candidate.path === assetPath);\n if (!asset) return Response.json({ error: 'Plugin asset not found.' }, { status: 404 });\n const bytes = await fs.promises.readFile(path.join(bundle.assetsDir, asset.path));\n return new Response(request.method === 'HEAD' ? null : bytes, {\n headers: {\n 'content-type': asset.contentType,\n 'cache-control': 'private, max-age=31536000, immutable',\n 'x-content-type-options': 'nosniff',\n },\n });\n },\n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QAAQ,WAAW,SAAS,OAAO,OAAO,EAC5D,SAAS;KAAE,gBAAgB,MAAM;KAAa,0BAA0B;IAAU,EACpF,CAAC;GACH;GACA,MAAM,QAAQ,2EAA2E,KAAK,IAAI,QAAQ;GAC1G,IAAI,CAAC,OAAO,OAAO,KAAA;GACnB,IAAI,QAAQ,WAAW,SAAS,QAAQ,WAAW,QAAQ,OAAO,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC;GACpG,MAAM,SAAS,YAAY,IAAI,MAAM,IAAI,OAAO,MAAM,EAAE,CAAC;GACzD,IAAI,CAAC,QAAQ,OAAO,SAAS,KAAK,EAAE,OAAO,+BAA+B,GAAG,EAAE,QAAQ,IAAI,CAAC;GAC5F,IAAI,MAAM,OAAO,YAAY,OAAO,SAAS,KAAK,OAAO,MAAM;GAC/D,MAAM,YAAY,MAAM,EAAE,CAAC,MAAM,CAAe;GAChD,MAAM,QAAQ,OAAO,OAAO,SAAS,OAAO,MAAM,cAAc,UAAU,SAAS,SAAS;GAC5F,IAAI,CAAC,OAAO,OAAO,SAAS,KAAK,EAAE,OAAO,0BAA0B,GAAG,EAAE,QAAQ,IAAI,CAAC;GACtF,MAAM,QAAQ,MAAMD,QAAAA,QAAG,SAAS,SAASC,UAAAA,QAAK,KAAK,OAAO,WAAW,MAAM,IAAI,CAAC;GAChF,OAAO,IAAI,SAAS,QAAQ,WAAW,SAAS,OAAO,OAAO,EAC5D,SAAS;IACP,gBAAgB,MAAM;IACtB,iBAAiB;IACjB,0BAA0B;GAC5B,EACF,CAAC;EACH;EACA,QAAQ;GACN,OAAO,MAAM;GACb,aAAa,MAAM;GACnB,WAAW,MAAM;GACjB,YAAY,MAAM;EACpB;CACF;AACF"}
@@ -0,0 +1,79 @@
1
+ import { DoomApiMount, DoomNativeComposition, DoomWebComposition } from "./src/schemas/packageApi.mjs";
2
+ import "./packageApi.mjs";
3
+ //#region src/services/webCompositions/index.d.ts
4
+ /** One plugin copy in a global web build: its slot entry and the files that entry can load. */
5
+ export interface GlobalWebBuildPlugin {
6
+ pluginId: string;
7
+ /** The copy's identity: the pluginId for a host plugin, else the pluginId plus a package hash. */
8
+ slot: string;
9
+ packageDir: string;
10
+ isHost: boolean;
11
+ /** The slot entry module below `pluginsDirectory`. */
12
+ entry: string;
13
+ /** Every file below `pluginsDirectory` the entry reaches through static and dynamic imports, plus its stylesheet. */
14
+ files: readonly string[];
15
+ /** The stylesheets of the entry's static import closure. */
16
+ css: readonly string[];
17
+ }
18
+ /** One global web build: the shell, the shared plugin composition, and one stylesheet per plugin copy. */
19
+ export interface GlobalWebBuild {
20
+ /** Content key of the build; equal keys hold identical bytes. */
21
+ key: string;
22
+ /** Signed cockpit shell directory. */
23
+ webDirectory: string;
24
+ /** Shared plugin composition directory, published once for every mount. */
25
+ pluginsDirectory: string;
26
+ /** Every plugin copy in the build, in build order. */
27
+ plugins: readonly GlobalWebBuildPlugin[];
28
+ /** Content-hashed stylesheet paths below `pluginsDirectory`, keyed by slot. */
29
+ pluginStyles: Readonly<Record<string, string>>;
30
+ /** Stylesheet a mount without plugin styles still loads, for the host shell and fallback template. */
31
+ baseStyle?: string;
32
+ }
33
+ /** One global native build: a single signed CommonJS composition shared by every mount. */
34
+ export interface GlobalNativeBuild {
35
+ /** Content key of the build; equal keys hold identical bytes. */
36
+ key: string;
37
+ /** Directory holding exactly `/composition.js`. */
38
+ pluginsDirectory: string;
39
+ }
40
+ /**
41
+ * The stylesheets of exactly the given slots, each loaded once: the stylesheets their code
42
+ * imports first, then each slot's own stylesheet in slot order.
43
+ */
44
+ export declare function mountStylePaths(build: GlobalWebBuild, slots: readonly string[]): string[];
45
+ /** Every file the given slots can load: their reachable files and static stylesheets, each once. */
46
+ export declare function mountAssetPaths(build: GlobalWebBuild, slots: readonly string[]): string[];
47
+ /**
48
+ * Signs the global build once and hands each mount a composition naming its own plugins.
49
+ *
50
+ * Every mount of one build shares a publication id, so the bytes are counted per mount and
51
+ * released only when the last mount leaves or moves to another build.
52
+ */
53
+ export declare function createWebCompositions(stateDirectory: string, onNotice: (message: string) => void): {
54
+ publishShell(build: GlobalWebBuild): void;
55
+ shellTrust: () => {
56
+ publicKey: string;
57
+ revision: number;
58
+ } | undefined;
59
+ publish(mount: DoomApiMount, build: GlobalWebBuild, channels: readonly string[], slots: readonly string[]): DoomWebComposition | undefined;
60
+ get: (mount: DoomApiMount) => DoomWebComposition | undefined;
61
+ remove: (mount: DoomApiMount) => void;
62
+ /**
63
+ * Publishes the native composition for one mount. Signed under the `native` profile, so it can
64
+ * never be served or verified as a web bundle. Shares reference counting with web publications.
65
+ */
66
+ publishNative(mount: DoomApiMount, build: GlobalNativeBuild, channels: readonly string[], pluginIds: readonly string[]): DoomNativeComposition;
67
+ getNative: (mount: DoomApiMount) => DoomNativeComposition | undefined;
68
+ removeNative: (mount: DoomApiMount) => void;
69
+ /**
70
+ * Signs `po/host-channel-key/v1` with the shell publication's signer, the key the pairing QR pins
71
+ * as `s`. Undefined until the shell is published.
72
+ */
73
+ attestHost: (fields: readonly string[]) => string | undefined;
74
+ publicKey: () => string | undefined;
75
+ request(request: Request): Promise<Response | undefined>;
76
+ close(): void;
77
+ };
78
+ //#endregion
79
+ //# sourceMappingURL=webCompositions.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webCompositions.d.mts","names":[],"sources":["../src/services/webCompositions/index.ts"],"mappings":";;;;iBAWiB;EACf;;EAEA;EACA;EACA;;EAEA;;EAEA;;EAEA;;;iBAIe;;EAEf;;EAEA;;EAEA;;EAEA,kBAAkB;;EAElB,cAAc,SAAS;;EAEvB;;;iBAIe;;EAEf;;EAEA;;;;;;wBAcc,gBAAgB,OAAO,gBAAgB;;wBAQvC,gBAAgB,OAAO,gBAAgB;;;;;;;wBAkBvC,sBAAsB,wBAAwB,WAAW;EAsBrE,aAAY,OAAQ;EAIpB;;;;EAEA,QAAO,OACE,cAAY,OACZ,gBAAc,6BACM,2BAE1B;EA6BH,MAAG,OAAU,iBAAY;EACzB,SAAM,OAAU;;;;;EAShB,cAAa,OACJ,cAAY,OACZ,mBAAiB,6BACG,+BAE1B;EAsBH,YAAS,OAAU,iBAAY;EAC/B,eAAY,OAAU;;;;;EAStB,aAAU;EAEV;EACM,QAAO,SAAU,UAAU,QAAQ;EAyCzC"}
@@ -0,0 +1,174 @@
1
+ import { HOST_CHANNEL_KEY_TAG } from "./src/constants/remote.mjs";
2
+ import { createPluginBundlePublication } from "./src/services/bundlePublication/index.mjs";
3
+ import crypto from "node:crypto";
4
+ import fs from "node:fs";
5
+ import path from "node:path";
6
+ import { NATIVE_ENTRY_PATH } from "@agimon-ai/po-web-security";
7
+ //#region src/services/webCompositions/index.ts
8
+ const absolute = (file) => file.startsWith("/") ? file : `/${file}`;
9
+ /** The build's plugin copies for exactly the given slots, in slot order. */
10
+ function slotPlugins(build, slots) {
11
+ return slots.flatMap((slot) => build.plugins.filter((plugin) => plugin.slot === slot));
12
+ }
13
+ /**
14
+ * The stylesheets of exactly the given slots, each loaded once: the stylesheets their code
15
+ * imports first, then each slot's own stylesheet in slot order.
16
+ */
17
+ function mountStylePaths(build, slots) {
18
+ const paths = slots.map((slot) => build.pluginStyles[slot]).filter((style) => style !== void 0);
19
+ if (paths.length === 0 && build.baseStyle !== void 0) paths.push(build.baseStyle);
20
+ const imported = slotPlugins(build, slots).flatMap((plugin) => plugin.css);
21
+ return [...new Set([...imported, ...paths].map(absolute))];
22
+ }
23
+ /** Every file the given slots can load: their reachable files and static stylesheets, each once. */
24
+ function mountAssetPaths(build, slots) {
25
+ return [...new Set(slotPlugins(build, slots).flatMap((plugin) => [...plugin.files, ...plugin.css]).map(absolute))];
26
+ }
27
+ const sha256 = (value) => crypto.createHash("sha256").update(value).digest("hex");
28
+ /**
29
+ * Signs the global build once and hands each mount a composition naming its own plugins.
30
+ *
31
+ * Every mount of one build shares a publication id, so the bytes are counted per mount and
32
+ * released only when the last mount leaves or moves to another build.
33
+ */
34
+ function createWebCompositions(stateDirectory, onNotice) {
35
+ const publication = createPluginBundlePublication(stateDirectory, onNotice);
36
+ let shell;
37
+ const mounts = /* @__PURE__ */ new Map();
38
+ const nativeMounts = /* @__PURE__ */ new Map();
39
+ const references = /* @__PURE__ */ new Map();
40
+ const keyOf = (mount) => mount.scope === "global" ? "global" : mount.scope === "workspace" ? `workspace:${mount.workspaceId}` : `session:${mount.sessionId}`;
41
+ const release = (id) => {
42
+ const count = (references.get(id) ?? 0) - 1;
43
+ if (count > 0) {
44
+ references.set(id, count);
45
+ return;
46
+ }
47
+ references.delete(id);
48
+ publication.release(id);
49
+ };
50
+ return {
51
+ publishShell(build) {
52
+ shell = publication.publish(sha256(`shell:${build.key}`), build.webDirectory);
53
+ if (!shell) throw new Error("Could not publish the global web shell.");
54
+ },
55
+ shellTrust: () => shell === void 0 ? void 0 : {
56
+ publicKey: shell.signed.publicKey,
57
+ revision: shell.signed.manifest.revision
58
+ },
59
+ publish(mount, build, channels, slots) {
60
+ const id = sha256(`plugins:${build.key}`);
61
+ const published = publication.publish(id, build.pluginsDirectory);
62
+ if (!published) throw new Error(`Could not publish ${keyOf(mount)} web composition.`);
63
+ const previous = mounts.get(keyOf(mount));
64
+ if (previous?.id !== id) references.set(id, (references.get(id) ?? 0) + 1);
65
+ const revision = published.signed.manifest.revision;
66
+ const base = `/api/web-plugins/${id}/${String(revision)}`;
67
+ const signedPaths = new Set(published.signed.manifest.assets.map((asset) => asset.path));
68
+ const composition = {
69
+ id,
70
+ scope: mount.scope,
71
+ revision,
72
+ manifestUrl: `${base}/manifest`,
73
+ rawAssetBaseUrl: `${base}/assets`,
74
+ verifiedAssetBaseUrl: `/verified-plugins/${id}/${String(revision)}`,
75
+ pluginEntries: slotPlugins(build, slots).map((plugin) => [plugin.slot, absolute(plugin.entry)]),
76
+ assetPaths: mountAssetPaths(build, slots).filter((file) => signedPaths.has(file)),
77
+ stylePaths: mountStylePaths(build, slots).filter((style) => signedPaths.has(style)),
78
+ channels: [...channels],
79
+ plugins: [...slots]
80
+ };
81
+ mounts.set(keyOf(mount), composition);
82
+ if (previous !== void 0 && previous.id !== id) release(previous.id);
83
+ return composition;
84
+ },
85
+ get: (mount) => mounts.get(keyOf(mount)),
86
+ remove: (mount) => {
87
+ const previous = mounts.get(keyOf(mount));
88
+ mounts.delete(keyOf(mount));
89
+ if (previous) release(previous.id);
90
+ },
91
+ /**
92
+ * Publishes the native composition for one mount. Signed under the `native` profile, so it can
93
+ * never be served or verified as a web bundle. Shares reference counting with web publications.
94
+ */
95
+ publishNative(mount, build, channels, pluginIds) {
96
+ const id = sha256(`native:${build.key}`);
97
+ const published = publication.publish(id, build.pluginsDirectory, "native");
98
+ if (!published) throw new Error(`Could not publish ${keyOf(mount)} native composition.`);
99
+ const previous = nativeMounts.get(keyOf(mount));
100
+ if (previous?.id !== id) references.set(id, (references.get(id) ?? 0) + 1);
101
+ const revision = published.signed.manifest.revision;
102
+ const base = `/api/web-plugins/${id}/${String(revision)}`;
103
+ const composition = {
104
+ id,
105
+ scope: mount.scope,
106
+ revision,
107
+ manifestUrl: `${base}/manifest`,
108
+ rawAssetBaseUrl: `${base}/assets`,
109
+ entryPath: NATIVE_ENTRY_PATH,
110
+ channels: [...channels],
111
+ plugins: [...pluginIds]
112
+ };
113
+ nativeMounts.set(keyOf(mount), composition);
114
+ if (previous !== void 0 && previous.id !== id) release(previous.id);
115
+ return composition;
116
+ },
117
+ getNative: (mount) => nativeMounts.get(keyOf(mount)),
118
+ removeNative: (mount) => {
119
+ const previous = nativeMounts.get(keyOf(mount));
120
+ nativeMounts.delete(keyOf(mount));
121
+ if (previous) release(previous.id);
122
+ },
123
+ /**
124
+ * Signs `po/host-channel-key/v1` with the shell publication's signer, the key the pairing QR pins
125
+ * as `s`. Undefined until the shell is published.
126
+ */
127
+ attestHost: (fields) => shell === void 0 ? void 0 : publication.attest(HOST_CHANNEL_KEY_TAG, fields),
128
+ publicKey: () => publication.publicKey(),
129
+ async request(request) {
130
+ const url = new URL(request.url);
131
+ if ((url.pathname === "/bundle-manifest.json" || url.pathname.startsWith("/bundle-assets/")) && request.method !== "GET" && request.method !== "HEAD") return new Response(null, { status: 405 });
132
+ if (url.pathname === "/bundle-manifest.json") {
133
+ if (!shell) return new Response(null, { status: 404 });
134
+ return Response.json(shell.signed);
135
+ }
136
+ const shellAsset = /^\/bundle-assets\/(\d+)(\/.*)$/u.exec(url.pathname);
137
+ if (shellAsset) {
138
+ if (!shell || Number(shellAsset[1]) !== shell.signed.manifest.revision) return new Response(null, { status: 404 });
139
+ const asset = shell.signed.manifest.assets.find((entry) => entry.path === shellAsset[2]);
140
+ if (!asset) return new Response(null, { status: 404 });
141
+ const bytes = await fs.promises.readFile(path.join(shell.assetsDir, asset.path));
142
+ return new Response(request.method === "HEAD" ? null : bytes, { headers: {
143
+ "content-type": asset.contentType,
144
+ "x-content-type-options": "nosniff"
145
+ } });
146
+ }
147
+ const match = /^\/api\/web-plugins\/([a-f0-9]{64})\/(\d+)\/(manifest|assets(?:\/.*)?)$/u.exec(url.pathname);
148
+ if (!match) return void 0;
149
+ if (request.method !== "GET" && request.method !== "HEAD") return new Response(null, { status: 405 });
150
+ const bundle = publication.get(match[1], Number(match[2]));
151
+ if (!bundle) return Response.json({ error: "Plugin generation not found." }, { status: 404 });
152
+ if (match[3] === "manifest") return Response.json(bundle.signed);
153
+ const assetPath = match[3].slice(6);
154
+ const asset = bundle.signed.manifest.assets.find((candidate) => candidate.path === assetPath);
155
+ if (!asset) return Response.json({ error: "Plugin asset not found." }, { status: 404 });
156
+ const bytes = await fs.promises.readFile(path.join(bundle.assetsDir, asset.path));
157
+ return new Response(request.method === "HEAD" ? null : bytes, { headers: {
158
+ "content-type": asset.contentType,
159
+ "cache-control": "private, max-age=31536000, immutable",
160
+ "x-content-type-options": "nosniff"
161
+ } });
162
+ },
163
+ close() {
164
+ mounts.clear();
165
+ nativeMounts.clear();
166
+ references.clear();
167
+ publication.close();
168
+ }
169
+ };
170
+ }
171
+ //#endregion
172
+ export { createWebCompositions, mountAssetPaths, mountStylePaths };
173
+
174
+ //# sourceMappingURL=webCompositions.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webCompositions.mjs","names":[],"sources":["../src/services/webCompositions/index.ts"],"sourcesContent":["import crypto from 'node:crypto';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nimport { NATIVE_ENTRY_PATH } from '@agimon-ai/po-web-security';\n\nimport { HOST_CHANNEL_KEY_TAG } from '../../constants/remote';\nimport type { DoomApiMount, DoomNativeComposition, DoomWebComposition } from '../../exports/packageApi';\nimport { createPluginBundlePublication, type PublishedBundle } from '../bundlePublication';\n\n/** One plugin copy in a global web build: its slot entry and the files that entry can load. */\nexport interface GlobalWebBuildPlugin {\n pluginId: string;\n /** The copy's identity: the pluginId for a host plugin, else the pluginId plus a package hash. */\n slot: string;\n packageDir: string;\n isHost: boolean;\n /** The slot entry module below `pluginsDirectory`. */\n entry: string;\n /** Every file below `pluginsDirectory` the entry reaches through static and dynamic imports, plus its stylesheet. */\n files: readonly string[];\n /** The stylesheets of the entry's static import closure. */\n css: readonly string[];\n}\n\n/** One global web build: the shell, the shared plugin composition, and one stylesheet per plugin copy. */\nexport interface GlobalWebBuild {\n /** Content key of the build; equal keys hold identical bytes. */\n key: string;\n /** Signed cockpit shell directory. */\n webDirectory: string;\n /** Shared plugin composition directory, published once for every mount. */\n pluginsDirectory: string;\n /** Every plugin copy in the build, in build order. */\n plugins: readonly GlobalWebBuildPlugin[];\n /** Content-hashed stylesheet paths below `pluginsDirectory`, keyed by slot. */\n pluginStyles: Readonly<Record<string, string>>;\n /** Stylesheet a mount without plugin styles still loads, for the host shell and fallback template. */\n baseStyle?: string;\n}\n\n/** One global native build: a single signed CommonJS composition shared by every mount. */\nexport interface GlobalNativeBuild {\n /** Content key of the build; equal keys hold identical bytes. */\n key: string;\n /** Directory holding exactly `/composition.js`. */\n pluginsDirectory: string;\n}\n\nconst absolute = (file: string): string => (file.startsWith('/') ? file : `/${file}`);\n\n/** The build's plugin copies for exactly the given slots, in slot order. */\nfunction slotPlugins(build: GlobalWebBuild, slots: readonly string[]): GlobalWebBuildPlugin[] {\n return slots.flatMap((slot) => build.plugins.filter((plugin) => plugin.slot === slot));\n}\n\n/**\n * The stylesheets of exactly the given slots, each loaded once: the stylesheets their code\n * imports first, then each slot's own stylesheet in slot order.\n */\nexport function mountStylePaths(build: GlobalWebBuild, slots: readonly string[]): string[] {\n const paths = slots.map((slot) => build.pluginStyles[slot]).filter((style) => style !== undefined);\n if (paths.length === 0 && build.baseStyle !== undefined) paths.push(build.baseStyle);\n const imported = slotPlugins(build, slots).flatMap((plugin) => plugin.css);\n return [...new Set([...imported, ...paths].map(absolute))];\n}\n\n/** Every file the given slots can load: their reachable files and static stylesheets, each once. */\nexport function mountAssetPaths(build: GlobalWebBuild, slots: readonly string[]): string[] {\n return [\n ...new Set(\n slotPlugins(build, slots)\n .flatMap((plugin) => [...plugin.files, ...plugin.css])\n .map(absolute),\n ),\n ];\n}\n\nconst sha256 = (value: string): string => crypto.createHash('sha256').update(value).digest('hex');\n\n/**\n * Signs the global build once and hands each mount a composition naming its own plugins.\n *\n * Every mount of one build shares a publication id, so the bytes are counted per mount and\n * released only when the last mount leaves or moves to another build.\n */\nexport function createWebCompositions(stateDirectory: string, onNotice: (message: string) => void) {\n const publication = createPluginBundlePublication(stateDirectory, onNotice);\n let shell: PublishedBundle | undefined;\n const mounts = new Map<string, DoomWebComposition>();\n const nativeMounts = new Map<string, DoomNativeComposition>();\n const references = new Map<string, number>();\n const keyOf = (mount: DoomApiMount): string =>\n mount.scope === 'global'\n ? 'global'\n : mount.scope === 'workspace'\n ? `workspace:${mount.workspaceId}`\n : `session:${mount.sessionId}`;\n const release = (id: string): void => {\n const count = (references.get(id) ?? 0) - 1;\n if (count > 0) {\n references.set(id, count);\n return;\n }\n references.delete(id);\n publication.release(id);\n };\n return {\n publishShell(build: GlobalWebBuild): void {\n shell = publication.publish(sha256(`shell:${build.key}`), build.webDirectory);\n if (!shell) throw new Error('Could not publish the global web shell.');\n },\n shellTrust: () =>\n shell === undefined ? undefined : { publicKey: shell.signed.publicKey, revision: shell.signed.manifest.revision },\n publish(\n mount: DoomApiMount,\n build: GlobalWebBuild,\n channels: readonly string[],\n slots: readonly string[],\n ): DoomWebComposition | undefined {\n const id = sha256(`plugins:${build.key}`);\n const published = publication.publish(id, build.pluginsDirectory);\n if (!published) throw new Error(`Could not publish ${keyOf(mount)} web composition.`);\n const previous = mounts.get(keyOf(mount));\n if (previous?.id !== id) references.set(id, (references.get(id) ?? 0) + 1);\n const revision = published.signed.manifest.revision;\n const base = `/api/web-plugins/${id}/${String(revision)}`;\n const signedPaths = new Set(published.signed.manifest.assets.map((asset) => asset.path));\n const composition: DoomWebComposition = {\n id,\n scope: mount.scope,\n revision,\n manifestUrl: `${base}/manifest`,\n rawAssetBaseUrl: `${base}/assets`,\n verifiedAssetBaseUrl: `/verified-plugins/${id}/${String(revision)}`,\n pluginEntries: slotPlugins(build, slots).map((plugin): [string, string] => [\n plugin.slot,\n absolute(plugin.entry),\n ]),\n assetPaths: mountAssetPaths(build, slots).filter((file) => signedPaths.has(file)),\n stylePaths: mountStylePaths(build, slots).filter((style) => signedPaths.has(style)),\n channels: [...channels],\n plugins: [...slots],\n };\n mounts.set(keyOf(mount), composition);\n if (previous !== undefined && previous.id !== id) release(previous.id);\n return composition;\n },\n get: (mount: DoomApiMount) => mounts.get(keyOf(mount)),\n remove: (mount: DoomApiMount) => {\n const previous = mounts.get(keyOf(mount));\n mounts.delete(keyOf(mount));\n if (previous) release(previous.id);\n },\n /**\n * Publishes the native composition for one mount. Signed under the `native` profile, so it can\n * never be served or verified as a web bundle. Shares reference counting with web publications.\n */\n publishNative(\n mount: DoomApiMount,\n build: GlobalNativeBuild,\n channels: readonly string[],\n pluginIds: readonly string[],\n ): DoomNativeComposition {\n const id = sha256(`native:${build.key}`);\n const published = publication.publish(id, build.pluginsDirectory, 'native');\n if (!published) throw new Error(`Could not publish ${keyOf(mount)} native composition.`);\n const previous = nativeMounts.get(keyOf(mount));\n if (previous?.id !== id) references.set(id, (references.get(id) ?? 0) + 1);\n const revision = published.signed.manifest.revision;\n const base = `/api/web-plugins/${id}/${String(revision)}`;\n const composition: DoomNativeComposition = {\n id,\n scope: mount.scope,\n revision,\n manifestUrl: `${base}/manifest`,\n rawAssetBaseUrl: `${base}/assets`,\n entryPath: NATIVE_ENTRY_PATH,\n channels: [...channels],\n plugins: [...pluginIds],\n };\n nativeMounts.set(keyOf(mount), composition);\n if (previous !== undefined && previous.id !== id) release(previous.id);\n return composition;\n },\n getNative: (mount: DoomApiMount) => nativeMounts.get(keyOf(mount)),\n removeNative: (mount: DoomApiMount) => {\n const previous = nativeMounts.get(keyOf(mount));\n nativeMounts.delete(keyOf(mount));\n if (previous) release(previous.id);\n },\n /**\n * Signs `po/host-channel-key/v1` with the shell publication's signer, the key the pairing QR pins\n * as `s`. Undefined until the shell is published.\n */\n attestHost: (fields: readonly string[]): string | undefined =>\n shell === undefined ? undefined : publication.attest(HOST_CHANNEL_KEY_TAG, fields),\n publicKey: () => publication.publicKey(),\n async request(request: Request): Promise<Response | undefined> {\n const url = new URL(request.url);\n if (\n (url.pathname === '/bundle-manifest.json' || url.pathname.startsWith('/bundle-assets/')) &&\n request.method !== 'GET' &&\n request.method !== 'HEAD'\n )\n return new Response(null, { status: 405 });\n if (url.pathname === '/bundle-manifest.json') {\n if (!shell) return new Response(null, { status: 404 });\n return Response.json(shell.signed);\n }\n const shellAsset = /^\\/bundle-assets\\/(\\d+)(\\/.*)$/u.exec(url.pathname);\n if (shellAsset) {\n if (!shell || Number(shellAsset[1]) !== shell.signed.manifest.revision)\n return new Response(null, { status: 404 });\n const asset = shell.signed.manifest.assets.find((entry) => entry.path === shellAsset[2]);\n if (!asset) return new Response(null, { status: 404 });\n const bytes = await fs.promises.readFile(path.join(shell.assetsDir, asset.path));\n return new Response(request.method === 'HEAD' ? null : bytes, {\n headers: { 'content-type': asset.contentType, 'x-content-type-options': 'nosniff' },\n });\n }\n const match = /^\\/api\\/web-plugins\\/([a-f0-9]{64})\\/(\\d+)\\/(manifest|assets(?:\\/.*)?)$/u.exec(url.pathname);\n if (!match) return undefined;\n if (request.method !== 'GET' && request.method !== 'HEAD') return new Response(null, { status: 405 });\n const bundle = publication.get(match[1], Number(match[2]));\n if (!bundle) return Response.json({ error: 'Plugin generation not found.' }, { status: 404 });\n if (match[3] === 'manifest') return Response.json(bundle.signed);\n const assetPath = match[3].slice('assets'.length);\n const asset = bundle.signed.manifest.assets.find((candidate) => candidate.path === assetPath);\n if (!asset) return Response.json({ error: 'Plugin asset not found.' }, { status: 404 });\n const bytes = await fs.promises.readFile(path.join(bundle.assetsDir, asset.path));\n return new Response(request.method === 'HEAD' ? null : bytes, {\n headers: {\n 'content-type': asset.contentType,\n 'cache-control': 'private, max-age=31536000, immutable',\n 'x-content-type-options': 'nosniff',\n },\n });\n },\n close() {\n mounts.clear();\n nativeMounts.clear();\n references.clear();\n publication.close();\n },\n };\n}\n"],"mappings":";;;;;;;AAiDA,MAAM,YAAY,SAA0B,KAAK,WAAW,GAAG,IAAI,OAAO,IAAI;;AAG9E,SAAS,YAAY,OAAuB,OAAkD;CAC5F,OAAO,MAAM,SAAS,SAAS,MAAM,QAAQ,QAAQ,WAAW,OAAO,SAAS,IAAI,CAAC;AACvF;;;;;AAMA,SAAgB,gBAAgB,OAAuB,OAAoC;CACzF,MAAM,QAAQ,MAAM,KAAK,SAAS,MAAM,aAAa,KAAK,CAAC,CAAC,QAAQ,UAAU,UAAU,KAAA,CAAS;CACjG,IAAI,MAAM,WAAW,KAAK,MAAM,cAAc,KAAA,GAAW,MAAM,KAAK,MAAM,SAAS;CACnF,MAAM,WAAW,YAAY,OAAO,KAAK,CAAC,CAAC,SAAS,WAAW,OAAO,GAAG;CACzE,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,UAAU,GAAG,KAAK,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC;AAC3D;;AAGA,SAAgB,gBAAgB,OA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