@agimon-ai/po-core 0.0.0-alpha.2 → 0.0.0-alpha.21

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 (1149) hide show
  1. package/LICENSE +149 -21
  2. package/NOTICE +41 -0
  3. package/dist/agentModel.cjs +1 -1
  4. package/dist/agentModel.d.mts +2 -2
  5. package/dist/agentModel.mjs +1 -2
  6. package/dist/apiContracts.cjs +623 -802
  7. package/dist/apiContracts.cjs.map +1 -1
  8. package/dist/apiContracts.d.mts +277 -615
  9. package/dist/apiContracts.d.mts.map +1 -1
  10. package/dist/apiContracts.mjs +617 -794
  11. package/dist/apiContracts.mjs.map +1 -1
  12. package/dist/askUser.cjs +2 -2
  13. package/dist/askUser.d.mts +2 -2
  14. package/dist/askUser.mjs +1 -2
  15. package/dist/authorTools.mjs +1 -2
  16. package/dist/backgroundWork.cjs +3 -3
  17. package/dist/backgroundWork.d.mts +2 -2
  18. package/dist/backgroundWork.mjs +1 -2
  19. package/dist/bundleAssetPolicy.mjs +1 -2
  20. package/dist/chatgptAuth.cjs +3 -2
  21. package/dist/chatgptAuth.d.mts +3 -2
  22. package/dist/chatgptAuth.mjs +2 -1
  23. package/dist/childProcess.cjs +1 -1
  24. package/dist/childProcess.d.mts +2 -2
  25. package/dist/childProcess.mjs +1 -2
  26. package/dist/childSession.cjs +11 -6
  27. package/dist/childSession.d.mts +3 -3
  28. package/dist/childSession.mjs +3 -3
  29. package/dist/cockpitContainer.mjs +1 -2
  30. package/dist/config.cjs +1 -1
  31. package/dist/config.d.mts +3 -3
  32. package/dist/config.mjs +1 -2
  33. package/dist/contextApi.cjs +1 -0
  34. package/dist/contextApi.d.mts +2 -2
  35. package/dist/contextApi.mjs +2 -2
  36. package/dist/contextContributions.cjs +4 -4
  37. package/dist/contextContributions.d.mts +3 -3
  38. package/dist/contextContributions.mjs +3 -3
  39. package/dist/contextDetailStore.cjs +7 -5
  40. package/dist/contextDetailStore.cjs.map +1 -1
  41. package/dist/contextDetailStore.d.mts +2 -1
  42. package/dist/contextDetailStore.d.mts.map +1 -1
  43. package/dist/contextDetailStore.mjs +6 -4
  44. package/dist/contextDetailStore.mjs.map +1 -1
  45. package/dist/contextProjection.cjs +7 -2
  46. package/dist/contextProjection.cjs.map +1 -1
  47. package/dist/contextProjection.d.mts +4 -1
  48. package/dist/contextProjection.d.mts.map +1 -1
  49. package/dist/contextProjection.mjs +5 -2
  50. package/dist/contextProjection.mjs.map +1 -1
  51. package/dist/cordisHost.cjs +11 -11
  52. package/dist/cordisHost.d.mts +2 -2
  53. package/dist/cordisHost.mjs +1 -2
  54. package/dist/delegation.cjs +8 -8
  55. package/dist/delegation.d.mts +2 -2
  56. package/dist/delegation.mjs +1 -2
  57. package/dist/executionBudget.cjs +4 -3
  58. package/dist/executionBudget.cjs.map +1 -1
  59. package/dist/executionBudget.d.mts +2 -2
  60. package/dist/executionBudget.d.mts.map +1 -1
  61. package/dist/executionBudget.mjs +4 -3
  62. package/dist/executionBudget.mjs.map +1 -1
  63. package/dist/extensionFile.cjs +5 -0
  64. package/dist/extensionFile.d.mts +4 -2
  65. package/dist/extensionFile.mjs +4 -2
  66. package/dist/footer.d.mts +2 -2
  67. package/dist/footer.mjs +1 -2
  68. package/dist/headless.cjs +14 -14
  69. package/dist/headless.d.mts +2 -2
  70. package/dist/headless.mjs +1 -2
  71. package/dist/headlessHub.cjs +308 -109
  72. package/dist/headlessHub.cjs.map +1 -1
  73. package/dist/headlessHub.d.mts +71 -36
  74. package/dist/headlessHub.d.mts.map +1 -1
  75. package/dist/headlessHub.mjs +309 -110
  76. package/dist/headlessHub.mjs.map +1 -1
  77. package/dist/headlessProtocol.cjs +327 -0
  78. package/dist/headlessProtocol.cjs.map +1 -0
  79. package/dist/headlessProtocol.d.mts +30 -0
  80. package/dist/headlessProtocol.d.mts.map +1 -0
  81. package/dist/headlessProtocol.mjs +326 -0
  82. package/dist/headlessProtocol.mjs.map +1 -0
  83. package/dist/headlessServer.cjs +166 -151
  84. package/dist/headlessServer.cjs.map +1 -1
  85. package/dist/headlessServer.d.mts +13 -5
  86. package/dist/headlessServer.d.mts.map +1 -1
  87. package/dist/headlessServer.mjs +166 -151
  88. package/dist/headlessServer.mjs.map +1 -1
  89. package/dist/headlessSessionHost.d.mts +58 -21
  90. package/dist/headlessSessionHost.d.mts.map +1 -1
  91. package/dist/help.cjs +20 -20
  92. package/dist/help.d.mts +2 -2
  93. package/dist/help.mjs +2 -2
  94. package/dist/history.cjs +16 -20
  95. package/dist/history.d.mts +9 -7
  96. package/dist/history.mjs +6 -7
  97. package/dist/historyOwnership.cjs.map +1 -1
  98. package/dist/historyOwnership.d.mts +1 -1
  99. package/dist/historyOwnership.mjs.map +1 -1
  100. package/dist/hubChannel.cjs +9 -0
  101. package/dist/hubChannel.d.mts +3 -2
  102. package/dist/hubChannel.mjs +3 -2
  103. package/dist/index.cjs +26 -28
  104. package/dist/index.d.mts +6 -6
  105. package/dist/index.mjs +6 -6
  106. package/dist/interop/chord.mjs +1 -0
  107. package/dist/interop/chordContext.mjs +1 -0
  108. package/dist/json.cjs +11 -5
  109. package/dist/json.d.mts +4 -2
  110. package/dist/json.mjs +4 -2
  111. package/dist/kernel.cjs +1 -1
  112. package/dist/kernel.d.mts +3 -3
  113. package/dist/kernel.mjs +1 -2
  114. package/dist/leader.d.mts +2 -2
  115. package/dist/leader.mjs +1 -2
  116. package/dist/logSinkTelemetry.mjs +1 -2
  117. package/dist/machineApi.cjs +80 -74
  118. package/dist/machineApi.cjs.map +1 -1
  119. package/dist/machineApi.d.mts +5 -2
  120. package/dist/machineApi.d.mts.map +1 -1
  121. package/dist/machineApi.mjs +78 -71
  122. package/dist/machineApi.mjs.map +1 -1
  123. package/dist/main.cjs +2 -1
  124. package/dist/main.d.mts +2 -1
  125. package/dist/main.mjs +2 -1
  126. package/dist/mcpFacet.d.mts +3 -3
  127. package/dist/mcpProjection.cjs +13 -13
  128. package/dist/mcpProjection.d.mts +2 -2
  129. package/dist/mcpProjection.mjs +1 -2
  130. package/dist/mcpSchemaCost.cjs +4 -4
  131. package/dist/mcpSchemaCost.cjs.map +1 -1
  132. package/dist/mcpSchemaCost.d.mts +2 -2
  133. package/dist/mcpSchemaCost.mjs +4 -4
  134. package/dist/mcpSchemaCost.mjs.map +1 -1
  135. package/dist/mcpSession.cjs +7 -7
  136. package/dist/mcpSession.d.mts +2 -2
  137. package/dist/mcpSession.mjs +1 -2
  138. package/dist/mcpStatus.cjs +2 -2
  139. package/dist/mcpStatus.d.mts +2 -2
  140. package/dist/mcpStatus.mjs +1 -2
  141. package/dist/mcpToolResolver.cjs +3 -3
  142. package/dist/mcpToolResolver.d.mts +2 -2
  143. package/dist/mcpToolResolver.mjs +1 -2
  144. package/dist/mcpWidget.d.mts +2 -2
  145. package/dist/moduleResolution.cjs +43 -8
  146. package/dist/moduleResolution.cjs.map +1 -1
  147. package/dist/moduleResolution.d.mts +10 -1
  148. package/dist/moduleResolution.d.mts.map +1 -1
  149. package/dist/moduleResolution.mjs +40 -7
  150. package/dist/moduleResolution.mjs.map +1 -1
  151. package/dist/narration.cjs +3 -3
  152. package/dist/narration.d.mts +2 -2
  153. package/dist/narration.mjs +1 -2
  154. package/dist/native.cjs +9 -0
  155. package/dist/native.d.mts +4 -3
  156. package/dist/native.mjs +3 -2
  157. package/dist/nodePlatform.cjs +77 -0
  158. package/dist/nodePlatform.cjs.map +1 -0
  159. package/dist/nodePlatform.d.mts +17 -0
  160. package/dist/nodePlatform.d.mts.map +1 -0
  161. package/dist/nodePlatform.mjs +72 -0
  162. package/dist/nodePlatform.mjs.map +1 -0
  163. package/dist/notification.cjs +15 -15
  164. package/dist/notification.d.mts +2 -2
  165. package/dist/notification.mjs +1 -2
  166. package/dist/packageApi.cjs +11 -11
  167. package/dist/packageApi.d.mts +2 -2
  168. package/dist/packageApi.mjs +2 -2
  169. package/dist/packageApiServer.cjs +45 -27
  170. package/dist/packageApiServer.cjs.map +1 -1
  171. package/dist/packageApiServer.d.mts +36 -26
  172. package/dist/packageApiServer.d.mts.map +1 -1
  173. package/dist/packageApiServer.mjs +44 -26
  174. package/dist/packageApiServer.mjs.map +1 -1
  175. package/dist/piSettings.cjs +41 -20
  176. package/dist/piSettings.d.mts +4 -2
  177. package/dist/piSettings.mjs +4 -2
  178. package/dist/platform.cjs +62 -0
  179. package/dist/platform.d.mts +10 -0
  180. package/dist/platform.mjs +10 -0
  181. package/dist/pluginProtocol.cjs +7 -8
  182. package/dist/pluginProtocol.d.mts +2 -2
  183. package/dist/pluginProtocol.mjs +1 -2
  184. package/dist/poPackage.cjs +12 -0
  185. package/dist/poPackage.d.mts +3 -0
  186. package/dist/poPackage.mjs +3 -0
  187. package/dist/profileIdentity.cjs +1 -1
  188. package/dist/profileIdentity.d.mts +2 -2
  189. package/dist/profileIdentity.mjs +1 -2
  190. package/dist/protocol.cjs +3 -3
  191. package/dist/protocol.d.mts +2 -2
  192. package/dist/protocol.mjs +1 -2
  193. package/dist/readiness.cjs +6 -6
  194. package/dist/readiness.d.mts +2 -2
  195. package/dist/readiness.mjs +1 -2
  196. package/dist/remoteApi.cjs.map +1 -1
  197. package/dist/remoteApi.d.mts +2 -2
  198. package/dist/remoteApi.mjs.map +1 -1
  199. package/dist/remoteRuntime.cjs +42 -65
  200. package/dist/remoteRuntime.cjs.map +1 -1
  201. package/dist/remoteRuntime.d.mts +3 -2
  202. package/dist/remoteRuntime.d.mts.map +1 -1
  203. package/dist/remoteRuntime.mjs +41 -62
  204. package/dist/remoteRuntime.mjs.map +1 -1
  205. package/dist/runtimeConfig.cjs +4 -4
  206. package/dist/runtimeConfig.cjs.map +1 -1
  207. package/dist/runtimeConfig.d.mts +10 -9
  208. package/dist/runtimeConfig.d.mts.map +1 -1
  209. package/dist/runtimeConfig.mjs +4 -4
  210. package/dist/runtimeConfig.mjs.map +1 -1
  211. package/dist/runtimeContextApi.cjs +10 -3
  212. package/dist/runtimeContextApi.cjs.map +1 -1
  213. package/dist/runtimeContextApi.d.mts +3 -3
  214. package/dist/runtimeContextApi.d.mts.map +1 -1
  215. package/dist/runtimeContextApi.mjs +10 -3
  216. package/dist/runtimeContextApi.mjs.map +1 -1
  217. package/dist/runtimeCordisHost.cjs +46 -46
  218. package/dist/runtimeCordisHost.cjs.map +1 -1
  219. package/dist/runtimeCordisHost.d.mts +29 -28
  220. package/dist/runtimeCordisHost.d.mts.map +1 -1
  221. package/dist/runtimeCordisHost.mjs +42 -42
  222. package/dist/runtimeCordisHost.mjs.map +1 -1
  223. package/dist/runtimeIdentity.cjs +6 -9
  224. package/dist/runtimeIdentity.cjs.map +1 -1
  225. package/dist/runtimeIdentity.d.mts +5 -1
  226. package/dist/runtimeIdentity.d.mts.map +1 -1
  227. package/dist/runtimeIdentity.mjs +5 -8
  228. package/dist/runtimeIdentity.mjs.map +1 -1
  229. package/dist/runtimeJson.cjs +10 -45
  230. package/dist/runtimeJson.d.mts +3 -22
  231. package/dist/runtimeJson.mjs +3 -39
  232. package/dist/runtimeLogSinkTelemetry.cjs +19 -19
  233. package/dist/runtimeLogSinkTelemetry.cjs.map +1 -1
  234. package/dist/runtimeLogSinkTelemetry.d.mts +19 -19
  235. package/dist/runtimeLogSinkTelemetry.mjs +19 -19
  236. package/dist/runtimeLogSinkTelemetry.mjs.map +1 -1
  237. package/dist/runtimePackages.cjs +7 -2
  238. package/dist/runtimePackages.cjs.map +1 -1
  239. package/dist/runtimePackages.d.mts +4 -1
  240. package/dist/runtimePackages.d.mts.map +1 -1
  241. package/dist/runtimePackages.mjs +7 -2
  242. package/dist/runtimePackages.mjs.map +1 -1
  243. package/dist/runtimePiSettings.cjs +40 -263
  244. package/dist/runtimePiSettings.d.mts +3 -72
  245. package/dist/runtimePiSettings.mjs +3 -241
  246. package/dist/runtimeProtocol.cjs +19 -19
  247. package/dist/runtimeProtocol.cjs.map +1 -1
  248. package/dist/runtimeProtocol.d.mts +7 -7
  249. package/dist/runtimeProtocol.d.mts.map +1 -1
  250. package/dist/runtimeProtocol.mjs +17 -17
  251. package/dist/runtimeProtocol.mjs.map +1 -1
  252. package/dist/runtimeTransition.cjs +9 -9
  253. package/dist/runtimeTransition.cjs.map +1 -1
  254. package/dist/runtimeTransition.d.mts +10 -10
  255. package/dist/runtimeTransition.d.mts.map +1 -1
  256. package/dist/runtimeTransition.mjs +7 -7
  257. package/dist/runtimeTransition.mjs.map +1 -1
  258. package/dist/sandboxHarness.mjs +1 -2
  259. package/dist/server.cjs +3 -7
  260. package/dist/server.d.mts +6 -6
  261. package/dist/server.mjs +3 -4
  262. package/dist/serverPlugin.cjs +39 -0
  263. package/dist/serverPlugin.d.mts +12 -0
  264. package/dist/serverPlugin.mjs +11 -0
  265. package/dist/serverTelemetry.cjs +1 -1
  266. package/dist/serverTelemetry.cjs.map +1 -1
  267. package/dist/serverTelemetry.d.mts +2 -2
  268. package/dist/serverTelemetry.mjs +2 -2
  269. package/dist/serverTelemetry.mjs.map +1 -1
  270. package/dist/sessionFilesApi.cjs +41 -37
  271. package/dist/sessionFilesApi.cjs.map +1 -1
  272. package/dist/sessionFilesApi.d.mts +6 -3
  273. package/dist/sessionFilesApi.d.mts.map +1 -1
  274. package/dist/sessionFilesApi.mjs +41 -36
  275. package/dist/sessionFilesApi.mjs.map +1 -1
  276. package/dist/sessionProtocol.cjs +31 -6
  277. package/dist/sessionProtocol.d.mts +8 -3
  278. package/dist/sessionProtocol.mjs +8 -2
  279. package/dist/skills.cjs +5 -5
  280. package/dist/skills.d.mts +2 -2
  281. package/dist/skills.mjs +1 -2
  282. package/dist/sqliteSessionStorage.cjs +28 -50
  283. package/dist/sqliteSessionStorage.cjs.map +1 -1
  284. package/dist/sqliteSessionStorage.d.mts +13 -20
  285. package/dist/sqliteSessionStorage.d.mts.map +1 -1
  286. package/dist/sqliteSessionStorage.mjs +25 -48
  287. package/dist/sqliteSessionStorage.mjs.map +1 -1
  288. package/dist/src/constants/agentSettled.cjs +7 -0
  289. package/dist/src/constants/agentSettled.cjs.map +1 -0
  290. package/dist/src/constants/agentSettled.mjs +7 -0
  291. package/dist/src/constants/agentSettled.mjs.map +1 -0
  292. package/dist/src/constants/contextApi.cjs +3 -1
  293. package/dist/src/constants/contextApi.cjs.map +1 -1
  294. package/dist/src/constants/contextApi.d.mts +2 -1
  295. package/dist/src/constants/contextApi.d.mts.map +1 -1
  296. package/dist/src/constants/contextApi.mjs +3 -2
  297. package/dist/src/constants/contextApi.mjs.map +1 -1
  298. package/dist/src/constants/voiceTools.cjs +6 -6
  299. package/dist/src/constants/voiceTools.cjs.map +1 -1
  300. package/dist/src/constants/voiceTools.d.mts +3 -3
  301. package/dist/src/constants/voiceTools.mjs +4 -4
  302. package/dist/src/constants/voiceTools.mjs.map +1 -1
  303. package/dist/src/extensions/extensionFile.cjs +22 -5
  304. package/dist/src/extensions/extensionFile.cjs.map +1 -1
  305. package/dist/src/extensions/extensionFile.d.mts +17 -4
  306. package/dist/src/extensions/extensionFile.d.mts.map +1 -1
  307. package/dist/src/extensions/extensionFile.mjs +22 -6
  308. package/dist/src/extensions/extensionFile.mjs.map +1 -1
  309. package/dist/src/extensions/serverPlugin.cjs +231 -92
  310. package/dist/src/extensions/serverPlugin.cjs.map +1 -1
  311. package/dist/src/extensions/serverPlugin.d.mts +2 -2
  312. package/dist/src/extensions/serverPlugin.d.mts.map +1 -1
  313. package/dist/src/extensions/serverPlugin.mjs +232 -93
  314. package/dist/src/extensions/serverPlugin.mjs.map +1 -1
  315. package/dist/src/pi/piSessionRuntime.cjs +349 -142
  316. package/dist/src/pi/piSessionRuntime.cjs.map +1 -1
  317. package/dist/src/pi/piSessionRuntime.d.mts +18 -17
  318. package/dist/src/pi/piSessionRuntime.d.mts.map +1 -1
  319. package/dist/src/pi/piSessionRuntime.mjs +342 -135
  320. package/dist/src/pi/piSessionRuntime.mjs.map +1 -1
  321. package/dist/src/schemas/agentModel.cjs +2 -2
  322. package/dist/src/schemas/agentModel.cjs.map +1 -1
  323. package/dist/src/schemas/agentModel.d.mts +1 -1
  324. package/dist/src/schemas/agentModel.mjs +2 -2
  325. package/dist/src/schemas/agentModel.mjs.map +1 -1
  326. package/dist/src/schemas/apiContracts.d.mts +2 -2
  327. package/dist/src/schemas/apiContracts.d.mts.map +1 -1
  328. package/dist/src/schemas/askUser.cjs +4 -4
  329. package/dist/src/schemas/askUser.cjs.map +1 -1
  330. package/dist/src/schemas/askUser.d.mts +4 -4
  331. package/dist/src/schemas/askUser.d.mts.map +1 -1
  332. package/dist/src/schemas/askUser.mjs +3 -3
  333. package/dist/src/schemas/askUser.mjs.map +1 -1
  334. package/dist/src/schemas/backgroundWork.cjs +10 -10
  335. package/dist/src/schemas/backgroundWork.cjs.map +1 -1
  336. package/dist/src/schemas/backgroundWork.d.mts +9 -9
  337. package/dist/src/schemas/backgroundWork.d.mts.map +1 -1
  338. package/dist/src/schemas/backgroundWork.mjs +8 -8
  339. package/dist/src/schemas/backgroundWork.mjs.map +1 -1
  340. package/dist/src/schemas/childProcess.cjs +5 -5
  341. package/dist/src/schemas/childProcess.cjs.map +1 -1
  342. package/dist/src/schemas/childProcess.d.mts +2 -2
  343. package/dist/src/schemas/childProcess.mjs +5 -5
  344. package/dist/src/schemas/childProcess.mjs.map +1 -1
  345. package/dist/src/schemas/contextContributions.cjs +10 -10
  346. package/dist/src/schemas/contextContributions.cjs.map +1 -1
  347. package/dist/src/schemas/contextContributions.d.mts +16 -16
  348. package/dist/src/schemas/contextContributions.d.mts.map +1 -1
  349. package/dist/src/schemas/contextContributions.mjs +8 -8
  350. package/dist/src/schemas/contextContributions.mjs.map +1 -1
  351. package/dist/src/schemas/delegation.cjs +17 -17
  352. package/dist/src/schemas/delegation.cjs.map +1 -1
  353. package/dist/src/schemas/delegation.d.mts +16 -16
  354. package/dist/src/schemas/delegation.d.mts.map +1 -1
  355. package/dist/src/schemas/delegation.mjs +10 -10
  356. package/dist/src/schemas/delegation.mjs.map +1 -1
  357. package/dist/src/schemas/extensionFile.d.mts +23 -19
  358. package/dist/src/schemas/extensionFile.d.mts.map +1 -1
  359. package/dist/src/schemas/footer.cjs.map +1 -1
  360. package/dist/src/schemas/footer.d.mts +5 -5
  361. package/dist/src/schemas/footer.d.mts.map +1 -1
  362. package/dist/src/schemas/footer.mjs.map +1 -1
  363. package/dist/src/schemas/headless.cjs +37 -37
  364. package/dist/src/schemas/headless.cjs.map +1 -1
  365. package/dist/src/schemas/headless.d.mts +100 -101
  366. package/dist/src/schemas/headless.d.mts.map +1 -1
  367. package/dist/src/schemas/headless.mjs +24 -24
  368. package/dist/src/schemas/headless.mjs.map +1 -1
  369. package/dist/src/schemas/help.cjs +60 -60
  370. package/dist/src/schemas/help.cjs.map +1 -1
  371. package/dist/src/schemas/help.d.mts +43 -43
  372. package/dist/src/schemas/help.d.mts.map +1 -1
  373. package/dist/src/schemas/help.mjs +41 -41
  374. package/dist/src/schemas/help.mjs.map +1 -1
  375. package/dist/src/schemas/home.cjs +127 -0
  376. package/dist/src/schemas/home.cjs.map +1 -0
  377. package/dist/src/schemas/home.d.mts +63 -0
  378. package/dist/src/schemas/home.d.mts.map +1 -0
  379. package/dist/src/schemas/home.mjs +121 -0
  380. package/dist/src/schemas/home.mjs.map +1 -0
  381. package/dist/src/schemas/httpApiContracts.cjs +441 -0
  382. package/dist/src/schemas/httpApiContracts.cjs.map +1 -0
  383. package/dist/src/schemas/httpApiContracts.d.mts +78 -0
  384. package/dist/src/schemas/httpApiContracts.d.mts.map +1 -0
  385. package/dist/src/schemas/httpApiContracts.mjs +434 -0
  386. package/dist/src/schemas/httpApiContracts.mjs.map +1 -0
  387. package/dist/src/schemas/hubChannel.cjs +3 -0
  388. package/dist/src/schemas/hubChannel.cjs.map +1 -1
  389. package/dist/src/schemas/hubChannel.d.mts +84 -60
  390. package/dist/src/schemas/hubChannel.d.mts.map +1 -1
  391. package/dist/src/schemas/hubChannel.mjs +3 -1
  392. package/dist/src/schemas/hubChannel.mjs.map +1 -1
  393. package/dist/src/schemas/leader.cjs.map +1 -1
  394. package/dist/src/schemas/leader.d.mts +3 -3
  395. package/dist/src/schemas/leader.d.mts.map +1 -1
  396. package/dist/src/schemas/leader.mjs.map +1 -1
  397. package/dist/src/schemas/mcpBundle.d.mts +3 -3
  398. package/dist/src/schemas/mcpFacet.cjs.map +1 -1
  399. package/dist/src/schemas/mcpFacet.d.mts +22 -22
  400. package/dist/src/schemas/mcpFacet.d.mts.map +1 -1
  401. package/dist/src/schemas/mcpFacet.mjs.map +1 -1
  402. package/dist/src/schemas/mcpProjection.cjs +41 -41
  403. package/dist/src/schemas/mcpProjection.cjs.map +1 -1
  404. package/dist/src/schemas/mcpProjection.d.mts +31 -30
  405. package/dist/src/schemas/mcpProjection.d.mts.map +1 -1
  406. package/dist/src/schemas/mcpProjection.mjs +29 -29
  407. package/dist/src/schemas/mcpProjection.mjs.map +1 -1
  408. package/dist/src/schemas/mcpSession.cjs +23 -23
  409. package/dist/src/schemas/mcpSession.cjs.map +1 -1
  410. package/dist/src/schemas/mcpSession.d.mts +12 -12
  411. package/dist/src/schemas/mcpSession.d.mts.map +1 -1
  412. package/dist/src/schemas/mcpSession.mjs +18 -18
  413. package/dist/src/schemas/mcpSession.mjs.map +1 -1
  414. package/dist/src/schemas/mcpStatus.cjs +5 -5
  415. package/dist/src/schemas/mcpStatus.cjs.map +1 -1
  416. package/dist/src/schemas/mcpStatus.d.mts +4 -4
  417. package/dist/src/schemas/mcpStatus.d.mts.map +1 -1
  418. package/dist/src/schemas/mcpStatus.mjs +4 -4
  419. package/dist/src/schemas/mcpStatus.mjs.map +1 -1
  420. package/dist/src/schemas/mcpToolResolver.cjs +9 -9
  421. package/dist/src/schemas/mcpToolResolver.cjs.map +1 -1
  422. package/dist/src/schemas/mcpToolResolver.d.mts +7 -7
  423. package/dist/src/schemas/mcpToolResolver.d.mts.map +1 -1
  424. package/dist/src/schemas/mcpToolResolver.mjs +7 -7
  425. package/dist/src/schemas/mcpToolResolver.mjs.map +1 -1
  426. package/dist/src/schemas/narration.cjs +9 -9
  427. package/dist/src/schemas/narration.cjs.map +1 -1
  428. package/dist/src/schemas/narration.d.mts +5 -5
  429. package/dist/src/schemas/narration.d.mts.map +1 -1
  430. package/dist/src/schemas/narration.mjs +7 -7
  431. package/dist/src/schemas/narration.mjs.map +1 -1
  432. package/dist/src/schemas/notification.cjs +45 -45
  433. package/dist/src/schemas/notification.cjs.map +1 -1
  434. package/dist/src/schemas/notification.d.mts +22 -22
  435. package/dist/src/schemas/notification.d.mts.map +1 -1
  436. package/dist/src/schemas/notification.mjs +31 -31
  437. package/dist/src/schemas/notification.mjs.map +1 -1
  438. package/dist/src/schemas/packageApi.cjs +28 -28
  439. package/dist/src/schemas/packageApi.cjs.map +1 -1
  440. package/dist/src/schemas/packageApi.d.mts +91 -65
  441. package/dist/src/schemas/packageApi.d.mts.map +1 -1
  442. package/dist/src/schemas/packageApi.mjs +18 -18
  443. package/dist/src/schemas/packageApi.mjs.map +1 -1
  444. package/dist/src/schemas/platform.cjs +34 -0
  445. package/dist/src/schemas/platform.cjs.map +1 -0
  446. package/dist/src/schemas/platform.d.mts +75 -0
  447. package/dist/src/schemas/platform.d.mts.map +1 -0
  448. package/dist/src/schemas/platform.mjs +27 -0
  449. package/dist/src/schemas/platform.mjs.map +1 -0
  450. package/dist/src/schemas/pluginContributions.cjs.map +1 -1
  451. package/dist/src/schemas/pluginContributions.d.mts +12 -12
  452. package/dist/src/schemas/pluginContributions.d.mts.map +1 -1
  453. package/dist/src/schemas/pluginContributions.mjs.map +1 -1
  454. package/dist/src/schemas/pluginProtocol.cjs +24 -27
  455. package/dist/src/schemas/pluginProtocol.cjs.map +1 -1
  456. package/dist/src/schemas/pluginProtocol.d.mts +21 -21
  457. package/dist/src/schemas/pluginProtocol.d.mts.map +1 -1
  458. package/dist/src/schemas/pluginProtocol.mjs +18 -20
  459. package/dist/src/schemas/pluginProtocol.mjs.map +1 -1
  460. package/dist/src/schemas/profileIdentity.cjs +2 -2
  461. package/dist/src/schemas/profileIdentity.cjs.map +1 -1
  462. package/dist/src/schemas/profileIdentity.d.mts +1 -1
  463. package/dist/src/schemas/profileIdentity.mjs +2 -2
  464. package/dist/src/schemas/profileIdentity.mjs.map +1 -1
  465. package/dist/src/schemas/protocolChannelsContract.cjs +27 -0
  466. package/dist/src/schemas/protocolChannelsContract.cjs.map +1 -0
  467. package/dist/src/schemas/protocolChannelsContract.d.mts +37 -0
  468. package/dist/src/schemas/protocolChannelsContract.d.mts.map +1 -0
  469. package/dist/src/schemas/protocolChannelsContract.mjs +25 -0
  470. package/dist/src/schemas/protocolChannelsContract.mjs.map +1 -0
  471. package/dist/src/schemas/protocolContracts.cjs +168 -0
  472. package/dist/src/schemas/protocolContracts.cjs.map +1 -0
  473. package/dist/src/schemas/protocolContracts.d.mts +69 -0
  474. package/dist/src/schemas/protocolContracts.d.mts.map +1 -0
  475. package/dist/src/schemas/protocolContracts.mjs +164 -0
  476. package/dist/src/schemas/protocolContracts.mjs.map +1 -0
  477. package/dist/src/schemas/protocolHubContract.cjs +51 -0
  478. package/dist/src/schemas/protocolHubContract.cjs.map +1 -0
  479. package/dist/src/schemas/protocolHubContract.d.mts +218 -0
  480. package/dist/src/schemas/protocolHubContract.d.mts.map +1 -0
  481. package/dist/src/schemas/protocolHubContract.mjs +49 -0
  482. package/dist/src/schemas/protocolHubContract.mjs.map +1 -0
  483. package/dist/src/schemas/protocolSessionContract.cjs +22 -0
  484. package/dist/src/schemas/protocolSessionContract.cjs.map +1 -0
  485. package/dist/src/schemas/protocolSessionContract.d.mts +324 -0
  486. package/dist/src/schemas/protocolSessionContract.d.mts.map +1 -0
  487. package/dist/src/schemas/protocolSessionContract.mjs +22 -0
  488. package/dist/src/schemas/protocolSessionContract.mjs.map +1 -0
  489. package/dist/src/schemas/protocolThreadContract.cjs +21 -0
  490. package/dist/src/schemas/protocolThreadContract.cjs.map +1 -0
  491. package/dist/src/schemas/protocolThreadContract.d.mts +29 -0
  492. package/dist/src/schemas/protocolThreadContract.d.mts.map +1 -0
  493. package/dist/src/schemas/protocolThreadContract.mjs +20 -0
  494. package/dist/src/schemas/protocolThreadContract.mjs.map +1 -0
  495. package/dist/src/schemas/readiness.cjs +36 -36
  496. package/dist/src/schemas/readiness.cjs.map +1 -1
  497. package/dist/src/schemas/readiness.d.mts +37 -37
  498. package/dist/src/schemas/readiness.d.mts.map +1 -1
  499. package/dist/src/schemas/readiness.mjs +31 -31
  500. package/dist/src/schemas/readiness.mjs.map +1 -1
  501. package/dist/src/schemas/serverBundle.d.mts +5 -5
  502. package/dist/src/schemas/serverPlugin.cjs +103 -0
  503. package/dist/src/schemas/serverPlugin.cjs.map +1 -0
  504. package/dist/src/schemas/serverPlugin.d.mts +176 -0
  505. package/dist/src/schemas/serverPlugin.d.mts.map +1 -0
  506. package/dist/src/schemas/serverPlugin.mjs +95 -0
  507. package/dist/src/schemas/serverPlugin.mjs.map +1 -0
  508. package/dist/src/schemas/serverScope.cjs +37 -0
  509. package/dist/src/schemas/serverScope.cjs.map +1 -0
  510. package/dist/src/schemas/serverScope.d.mts +77 -0
  511. package/dist/src/schemas/serverScope.d.mts.map +1 -0
  512. package/dist/src/schemas/serverScope.mjs +33 -0
  513. package/dist/src/schemas/serverScope.mjs.map +1 -0
  514. package/dist/src/schemas/sessionApiContracts.cjs +320 -0
  515. package/dist/src/schemas/sessionApiContracts.cjs.map +1 -0
  516. package/dist/src/schemas/sessionApiContracts.mjs +318 -0
  517. package/dist/src/schemas/sessionApiContracts.mjs.map +1 -0
  518. package/dist/src/schemas/sessionProtocol.cjs +20 -13
  519. package/dist/src/schemas/sessionProtocol.cjs.map +1 -1
  520. package/dist/src/schemas/sessionProtocol.d.mts +37 -54
  521. package/dist/src/schemas/sessionProtocol.d.mts.map +1 -1
  522. package/dist/src/schemas/sessionProtocol.mjs +17 -8
  523. package/dist/src/schemas/sessionProtocol.mjs.map +1 -1
  524. package/dist/src/schemas/skills.cjs +16 -16
  525. package/dist/src/schemas/skills.cjs.map +1 -1
  526. package/dist/src/schemas/skills.d.mts +7 -7
  527. package/dist/src/schemas/skills.d.mts.map +1 -1
  528. package/dist/src/schemas/skills.mjs +12 -12
  529. package/dist/src/schemas/skills.mjs.map +1 -1
  530. package/dist/src/schemas/toolOverrides.cjs +9 -9
  531. package/dist/src/schemas/toolOverrides.cjs.map +1 -1
  532. package/dist/src/schemas/toolOverrides.d.mts +8 -8
  533. package/dist/src/schemas/toolOverrides.d.mts.map +1 -1
  534. package/dist/src/schemas/toolOverrides.mjs +7 -7
  535. package/dist/src/schemas/toolOverrides.mjs.map +1 -1
  536. package/dist/src/schemas/toolSurface.cjs +9 -9
  537. package/dist/src/schemas/toolSurface.cjs.map +1 -1
  538. package/dist/src/schemas/toolSurface.d.mts +13 -13
  539. package/dist/src/schemas/toolSurface.d.mts.map +1 -1
  540. package/dist/src/schemas/toolSurface.mjs +7 -7
  541. package/dist/src/schemas/toolSurface.mjs.map +1 -1
  542. package/dist/src/schemas/uiHub.cjs +9 -9
  543. package/dist/src/schemas/uiHub.cjs.map +1 -1
  544. package/dist/src/schemas/uiHub.d.mts +12 -12
  545. package/dist/src/schemas/uiHub.d.mts.map +1 -1
  546. package/dist/src/schemas/uiHub.mjs +7 -7
  547. package/dist/src/schemas/uiHub.mjs.map +1 -1
  548. package/dist/src/server/directHarnessRuntime.cjs +691 -775
  549. package/dist/src/server/directHarnessRuntime.cjs.map +1 -1
  550. package/dist/src/server/directHarnessRuntime.d.mts +5 -1
  551. package/dist/src/server/directHarnessRuntime.d.mts.map +1 -0
  552. package/dist/src/server/directHarnessRuntime.mjs +671 -754
  553. package/dist/src/server/directHarnessRuntime.mjs.map +1 -1
  554. package/dist/src/server/largeFrameLink.cjs +47 -0
  555. package/dist/src/server/largeFrameLink.cjs.map +1 -0
  556. package/dist/src/server/largeFrameLink.mjs +47 -0
  557. package/dist/src/server/largeFrameLink.mjs.map +1 -0
  558. package/dist/src/server/liveImport.cjs +1 -1
  559. package/dist/src/server/liveImport.cjs.map +1 -1
  560. package/dist/src/server/liveImport.d.mts +1 -1
  561. package/dist/src/server/liveImport.mjs +1 -1
  562. package/dist/src/server/liveImport.mjs.map +1 -1
  563. package/dist/src/server/mcpBundleLoader.cjs.map +1 -1
  564. package/dist/src/server/mcpBundleLoader.d.mts +6 -6
  565. package/dist/src/server/mcpBundleLoader.d.mts.map +1 -1
  566. package/dist/src/server/mcpBundleLoader.mjs.map +1 -1
  567. package/dist/src/server/serverPackages.cjs +60 -0
  568. package/dist/src/server/serverPackages.cjs.map +1 -0
  569. package/dist/src/server/serverPackages.d.mts +44 -0
  570. package/dist/src/server/serverPackages.d.mts.map +1 -0
  571. package/dist/src/server/serverPackages.mjs +59 -0
  572. package/dist/src/server/serverPackages.mjs.map +1 -0
  573. package/dist/src/server/serverScope.cjs +510 -0
  574. package/dist/src/server/serverScope.cjs.map +1 -0
  575. package/dist/src/server/serverScope.d.mts +123 -0
  576. package/dist/src/server/serverScope.d.mts.map +1 -0
  577. package/dist/src/server/serverScope.mjs +510 -0
  578. package/dist/src/server/serverScope.mjs.map +1 -0
  579. package/dist/src/server/sessionMcpHandler.cjs +3 -3
  580. package/dist/src/server/sessionMcpHandler.cjs.map +1 -1
  581. package/dist/src/server/sessionMcpHandler.mjs +4 -4
  582. package/dist/src/server/sessionMcpHandler.mjs.map +1 -1
  583. package/dist/src/server/sessionMcpRoutes.cjs +2 -1
  584. package/dist/src/server/sessionMcpRoutes.cjs.map +1 -1
  585. package/dist/src/server/sessionMcpRoutes.mjs +2 -1
  586. package/dist/src/server/sessionMcpRoutes.mjs.map +1 -1
  587. package/dist/src/server/threadJournals.cjs +38 -107
  588. package/dist/src/server/threadJournals.cjs.map +1 -1
  589. package/dist/src/server/threadJournals.mjs +38 -104
  590. package/dist/src/server/threadJournals.mjs.map +1 -1
  591. package/dist/src/services/apiSurfaceAssert/index.cjs +1 -1
  592. package/dist/src/services/apiSurfaceAssert/index.cjs.map +1 -1
  593. package/dist/src/services/apiSurfaceAssert/index.d.mts +6 -6
  594. package/dist/src/services/apiSurfaceAssert/index.mjs +1 -1
  595. package/dist/src/services/apiSurfaceAssert/index.mjs.map +1 -1
  596. package/dist/src/services/chatgptAuth/index.cjs +1 -220
  597. package/dist/src/services/chatgptAuth/index.cjs.map +1 -1
  598. package/dist/src/services/chatgptAuth/index.d.mts +0 -18
  599. package/dist/src/services/chatgptAuth/index.d.mts.map +1 -1
  600. package/dist/src/services/chatgptAuth/index.mjs +1 -217
  601. package/dist/src/services/chatgptAuth/index.mjs.map +1 -1
  602. package/dist/src/services/chatgptImages/index.cjs +1 -1
  603. package/dist/src/services/chatgptImages/index.cjs.map +1 -1
  604. package/dist/src/services/chatgptImages/index.mjs +1 -1
  605. package/dist/src/services/chatgptImages/index.mjs.map +1 -1
  606. package/dist/src/services/chatgptLogin/index.cjs +230 -0
  607. package/dist/src/services/chatgptLogin/index.cjs.map +1 -0
  608. package/dist/src/services/chatgptLogin/index.d.mts +21 -0
  609. package/dist/src/services/chatgptLogin/index.d.mts.map +1 -0
  610. package/dist/src/services/chatgptLogin/index.mjs +227 -0
  611. package/dist/src/services/chatgptLogin/index.mjs.map +1 -0
  612. package/dist/src/services/chatgptWebSearch/index.cjs +1 -1
  613. package/dist/src/services/chatgptWebSearch/index.cjs.map +1 -1
  614. package/dist/src/services/chatgptWebSearch/index.mjs +1 -1
  615. package/dist/src/services/chatgptWebSearch/index.mjs.map +1 -1
  616. package/dist/src/services/contextContributions/index.cjs +8 -8
  617. package/dist/src/services/contextContributions/index.cjs.map +1 -1
  618. package/dist/src/services/contextContributions/index.d.mts +3 -3
  619. package/dist/src/services/contextContributions/index.d.mts.map +1 -1
  620. package/dist/src/services/contextContributions/index.mjs +8 -8
  621. package/dist/src/services/contextContributions/index.mjs.map +1 -1
  622. package/dist/src/services/devProxyStore/devProxyRecords.cjs +59 -0
  623. package/dist/src/services/devProxyStore/devProxyRecords.cjs.map +1 -0
  624. package/dist/src/services/devProxyStore/devProxyRecords.mjs +56 -0
  625. package/dist/src/services/devProxyStore/devProxyRecords.mjs.map +1 -0
  626. package/dist/src/services/devProxyStore/index.cjs +7 -101
  627. package/dist/src/services/devProxyStore/index.cjs.map +1 -1
  628. package/dist/src/services/devProxyStore/index.mjs +7 -101
  629. package/dist/src/services/devProxyStore/index.mjs.map +1 -1
  630. package/dist/src/services/devProxyStore/sync.cjs +66 -0
  631. package/dist/src/services/devProxyStore/sync.cjs.map +1 -0
  632. package/dist/src/services/devProxyStore/sync.mjs +63 -0
  633. package/dist/src/services/devProxyStore/sync.mjs.map +1 -0
  634. package/dist/src/services/durableNavigation/docs.cjs +15 -0
  635. package/dist/src/services/durableNavigation/docs.cjs.map +1 -0
  636. package/dist/src/services/durableNavigation/docs.mjs +16 -0
  637. package/dist/src/services/durableNavigation/docs.mjs.map +1 -0
  638. package/dist/src/services/durableNavigation/index.cjs +3 -18
  639. package/dist/src/services/durableNavigation/index.cjs.map +1 -1
  640. package/dist/src/services/durableNavigation/index.mjs +2 -17
  641. package/dist/src/services/durableNavigation/index.mjs.map +1 -1
  642. package/dist/src/services/durableQueue/docs.cjs +12 -0
  643. package/dist/src/services/durableQueue/docs.cjs.map +1 -0
  644. package/dist/src/services/durableQueue/docs.mjs +13 -0
  645. package/dist/src/services/durableQueue/docs.mjs.map +1 -0
  646. package/dist/src/services/durableQueue/index.cjs +151 -0
  647. package/dist/src/services/durableQueue/index.cjs.map +1 -0
  648. package/dist/src/services/durableQueue/index.mjs +149 -0
  649. package/dist/src/services/durableQueue/index.mjs.map +1 -0
  650. package/dist/src/services/durableRequestReceipts/docs.cjs +11 -0
  651. package/dist/src/services/durableRequestReceipts/docs.cjs.map +1 -0
  652. package/dist/src/services/durableRequestReceipts/docs.mjs +12 -0
  653. package/dist/src/services/durableRequestReceipts/docs.mjs.map +1 -0
  654. package/dist/src/services/{requestReceipts → durableRequestReceipts}/index.cjs +10 -16
  655. package/dist/src/services/durableRequestReceipts/index.cjs.map +1 -0
  656. package/dist/src/services/durableRequestReceipts/index.d.mts +12 -0
  657. package/dist/src/services/durableRequestReceipts/index.d.mts.map +1 -0
  658. package/dist/src/services/{requestReceipts → durableRequestReceipts}/index.mjs +7 -13
  659. package/dist/src/services/durableRequestReceipts/index.mjs.map +1 -0
  660. package/dist/src/services/durableSession/docs.cjs +65 -0
  661. package/dist/src/services/durableSession/docs.cjs.map +1 -0
  662. package/dist/src/services/durableSession/docs.d.mts +17 -0
  663. package/dist/src/services/durableSession/docs.d.mts.map +1 -0
  664. package/dist/src/services/durableSession/docs.mjs +60 -0
  665. package/dist/src/services/durableSession/docs.mjs.map +1 -0
  666. package/dist/src/services/durableSession/index.cjs +21 -0
  667. package/dist/src/services/durableSession/index.cjs.map +1 -0
  668. package/dist/src/services/durableSession/index.d.mts +13 -0
  669. package/dist/src/services/durableSession/index.d.mts.map +1 -0
  670. package/dist/src/services/durableSession/index.mjs +20 -0
  671. package/dist/src/services/durableSession/index.mjs.map +1 -0
  672. package/dist/src/services/durableSubagents/docs.cjs +15 -0
  673. package/dist/src/services/durableSubagents/docs.cjs.map +1 -0
  674. package/dist/src/services/durableSubagents/docs.mjs +16 -0
  675. package/dist/src/services/durableSubagents/docs.mjs.map +1 -0
  676. package/dist/src/services/durableSubagents/extension.cjs +11 -0
  677. package/dist/src/services/durableSubagents/extension.cjs.map +1 -0
  678. package/dist/src/services/durableSubagents/extension.mjs +12 -0
  679. package/dist/src/services/durableSubagents/extension.mjs.map +1 -0
  680. package/dist/src/services/durableSubagents/index.cjs +95 -0
  681. package/dist/src/services/durableSubagents/index.cjs.map +1 -0
  682. package/dist/src/services/durableSubagents/index.mjs +90 -0
  683. package/dist/src/services/durableSubagents/index.mjs.map +1 -0
  684. package/dist/src/services/durableSubagents/tasks.cjs +25 -0
  685. package/dist/src/services/durableSubagents/tasks.cjs.map +1 -0
  686. package/dist/src/services/durableSubagents/tasks.mjs +26 -0
  687. package/dist/src/services/durableSubagents/tasks.mjs.map +1 -0
  688. package/dist/src/services/headlessClient/index.cjs +20 -13
  689. package/dist/src/services/headlessClient/index.cjs.map +1 -1
  690. package/dist/src/services/headlessClient/index.mjs +21 -14
  691. package/dist/src/services/headlessClient/index.mjs.map +1 -1
  692. package/dist/src/services/historyOwnership/type.d.mts +15 -0
  693. package/dist/src/services/historyOwnership/type.d.mts.map +1 -0
  694. package/dist/src/services/hubChannelHarness/index.cjs +2 -2
  695. package/dist/src/services/hubChannelHarness/index.cjs.map +1 -1
  696. package/dist/src/services/hubChannelHarness/index.d.mts +8 -8
  697. package/dist/src/services/hubChannelHarness/index.d.mts.map +1 -1
  698. package/dist/src/services/hubChannelHarness/index.mjs +2 -2
  699. package/dist/src/services/hubChannelHarness/index.mjs.map +1 -1
  700. package/dist/src/services/json/core.cjs +30 -0
  701. package/dist/src/services/json/core.cjs.map +1 -0
  702. package/dist/src/services/json/core.d.mts +21 -0
  703. package/dist/src/services/json/core.d.mts.map +1 -0
  704. package/dist/src/services/json/core.mjs +26 -0
  705. package/dist/src/services/json/core.mjs.map +1 -0
  706. package/dist/src/services/json/sync.cjs +48 -0
  707. package/dist/src/services/json/sync.cjs.map +1 -0
  708. package/dist/src/services/json/sync.d.mts +22 -0
  709. package/dist/src/services/json/sync.d.mts.map +1 -0
  710. package/dist/src/services/json/sync.mjs +43 -0
  711. package/dist/src/services/json/sync.mjs.map +1 -0
  712. package/dist/src/services/kernel/index.cjs +2 -2
  713. package/dist/src/services/kernel/index.cjs.map +1 -1
  714. package/dist/src/services/kernel/index.d.mts +3 -3
  715. package/dist/src/services/kernel/index.d.mts.map +1 -1
  716. package/dist/src/services/kernel/index.mjs +2 -2
  717. package/dist/src/services/kernel/index.mjs.map +1 -1
  718. package/dist/src/services/nativeChildTools/index.cjs +16 -0
  719. package/dist/src/services/nativeChildTools/index.cjs.map +1 -0
  720. package/dist/src/services/nativeChildTools/index.mjs +16 -0
  721. package/dist/src/services/nativeChildTools/index.mjs.map +1 -0
  722. package/dist/src/services/nodeHost/index.cjs +30 -0
  723. package/dist/src/services/nodeHost/index.cjs.map +1 -0
  724. package/dist/src/services/nodeHost/index.d.mts +16 -0
  725. package/dist/src/services/nodeHost/index.d.mts.map +1 -0
  726. package/dist/src/services/nodeHost/index.mjs +27 -0
  727. package/dist/src/services/nodeHost/index.mjs.map +1 -0
  728. package/dist/src/services/nodeModelDependencies/index.cjs +89 -0
  729. package/dist/src/services/nodeModelDependencies/index.cjs.map +1 -0
  730. package/dist/src/services/nodeModelDependencies/index.mjs +86 -0
  731. package/dist/src/services/nodeModelDependencies/index.mjs.map +1 -0
  732. package/dist/src/services/openSessionRegistry/index.cjs +6 -128
  733. package/dist/src/services/openSessionRegistry/index.cjs.map +1 -1
  734. package/dist/src/services/openSessionRegistry/index.d.mts +5 -36
  735. package/dist/src/services/openSessionRegistry/index.mjs +6 -128
  736. package/dist/src/services/openSessionRegistry/index.mjs.map +1 -1
  737. package/dist/src/services/openSessionRegistry/openSessionRecords.cjs +87 -0
  738. package/dist/src/services/openSessionRegistry/openSessionRecords.cjs.map +1 -0
  739. package/dist/src/services/openSessionRegistry/openSessionRecords.d.mts +30 -0
  740. package/dist/src/services/openSessionRegistry/openSessionRecords.d.mts.map +1 -0
  741. package/dist/src/services/openSessionRegistry/openSessionRecords.mjs +81 -0
  742. package/dist/src/services/openSessionRegistry/openSessionRecords.mjs.map +1 -0
  743. package/dist/src/services/openSessionRegistry/sync.cjs +71 -0
  744. package/dist/src/services/openSessionRegistry/sync.cjs.map +1 -0
  745. package/dist/src/services/openSessionRegistry/sync.d.mts +14 -0
  746. package/dist/src/services/openSessionRegistry/sync.d.mts.map +1 -0
  747. package/dist/src/services/openSessionRegistry/sync.mjs +68 -0
  748. package/dist/src/services/openSessionRegistry/sync.mjs.map +1 -0
  749. package/dist/src/services/packageApiHarness/index.cjs +1 -1
  750. package/dist/src/services/packageApiHarness/index.cjs.map +1 -1
  751. package/dist/src/services/packageApiHarness/index.d.mts +6 -6
  752. package/dist/src/services/packageApiHarness/index.d.mts.map +1 -1
  753. package/dist/src/services/packageApiHarness/index.mjs +2 -2
  754. package/dist/src/services/packageApiHarness/index.mjs.map +1 -1
  755. package/dist/src/services/piArgs/index.cjs +53 -0
  756. package/dist/src/services/piArgs/index.cjs.map +1 -0
  757. package/dist/src/services/piArgs/index.d.mts +6 -0
  758. package/dist/src/services/piArgs/index.d.mts.map +1 -0
  759. package/dist/src/services/piArgs/index.mjs +53 -0
  760. package/dist/src/services/piArgs/index.mjs.map +1 -0
  761. package/dist/src/services/piExtensionHost/index.cjs +47 -39
  762. package/dist/src/services/piExtensionHost/index.cjs.map +1 -1
  763. package/dist/src/services/piExtensionHost/index.d.mts +83 -0
  764. package/dist/src/services/piExtensionHost/index.d.mts.map +1 -0
  765. package/dist/src/services/piExtensionHost/index.mjs +47 -38
  766. package/dist/src/services/piExtensionHost/index.mjs.map +1 -1
  767. package/dist/src/services/piHelpTools/index.cjs +5 -5
  768. package/dist/src/services/piHelpTools/index.cjs.map +1 -1
  769. package/dist/src/services/piHelpTools/index.d.mts.map +1 -1
  770. package/dist/src/services/piHelpTools/index.mjs +7 -7
  771. package/dist/src/services/piHelpTools/index.mjs.map +1 -1
  772. package/dist/src/services/piMessages/index.cjs +106 -0
  773. package/dist/src/services/piMessages/index.cjs.map +1 -0
  774. package/dist/src/services/piMessages/index.mjs +105 -0
  775. package/dist/src/services/piMessages/index.mjs.map +1 -0
  776. package/dist/src/services/piSessionEntries/index.cjs +4 -4
  777. package/dist/src/services/piSessionEntries/index.cjs.map +1 -1
  778. package/dist/src/services/piSessionEntries/index.mjs +3 -3
  779. package/dist/src/services/piSessionEntries/index.mjs.map +1 -1
  780. package/dist/src/services/piSettings/core.cjs +308 -0
  781. package/dist/src/services/piSettings/core.cjs.map +1 -0
  782. package/dist/src/services/piSettings/core.d.mts +102 -0
  783. package/dist/src/services/piSettings/core.d.mts.map +1 -0
  784. package/dist/src/services/piSettings/core.mjs +276 -0
  785. package/dist/src/services/piSettings/core.mjs.map +1 -0
  786. package/dist/src/services/piSettings/sync.cjs +119 -0
  787. package/dist/src/services/piSettings/sync.cjs.map +1 -0
  788. package/dist/src/services/piSettings/sync.d.mts +44 -0
  789. package/dist/src/services/piSettings/sync.d.mts.map +1 -0
  790. package/dist/src/services/piSettings/sync.mjs +110 -0
  791. package/dist/src/services/piSettings/sync.mjs.map +1 -0
  792. package/dist/src/services/piSummary/index.cjs +7 -0
  793. package/dist/src/services/piSummary/index.cjs.map +1 -0
  794. package/dist/src/services/piSummary/index.mjs +7 -0
  795. package/dist/src/services/piSummary/index.mjs.map +1 -0
  796. package/dist/src/services/platformFiles/index.cjs +44 -0
  797. package/dist/src/services/platformFiles/index.cjs.map +1 -0
  798. package/dist/src/services/platformFiles/index.d.mts +16 -0
  799. package/dist/src/services/platformFiles/index.d.mts.map +1 -0
  800. package/dist/src/services/platformFiles/index.mjs +39 -0
  801. package/dist/src/services/platformFiles/index.mjs.map +1 -0
  802. package/dist/src/services/pluginLifecycle/index.cjs +19 -13
  803. package/dist/src/services/pluginLifecycle/index.cjs.map +1 -1
  804. package/dist/src/services/pluginLifecycle/index.d.mts +2 -0
  805. package/dist/src/services/pluginLifecycle/index.d.mts.map +1 -1
  806. package/dist/src/services/pluginLifecycle/index.mjs +19 -14
  807. package/dist/src/services/pluginLifecycle/index.mjs.map +1 -1
  808. package/dist/src/services/poPackage/core.cjs +73 -0
  809. package/dist/src/services/poPackage/core.cjs.map +1 -0
  810. package/dist/src/services/poPackage/core.d.mts +32 -0
  811. package/dist/src/services/poPackage/core.d.mts.map +1 -0
  812. package/dist/src/services/poPackage/core.mjs +66 -0
  813. package/dist/src/services/poPackage/core.mjs.map +1 -0
  814. package/dist/src/services/poPackage/sync.cjs +55 -0
  815. package/dist/src/services/poPackage/sync.cjs.map +1 -0
  816. package/dist/src/services/poPackage/sync.d.mts +21 -0
  817. package/dist/src/services/poPackage/sync.d.mts.map +1 -0
  818. package/dist/src/services/poPackage/sync.mjs +50 -0
  819. package/dist/src/services/poPackage/sync.mjs.map +1 -0
  820. package/dist/src/services/providerAuth/index.cjs +11 -7
  821. package/dist/src/services/providerAuth/index.cjs.map +1 -1
  822. package/dist/src/services/providerAuth/index.mjs +11 -7
  823. package/dist/src/services/providerAuth/index.mjs.map +1 -1
  824. package/dist/src/services/publicFileShares/index.cjs +1 -1
  825. package/dist/src/services/publicFileShares/index.cjs.map +1 -1
  826. package/dist/src/services/publicFileShares/index.d.mts +2 -2
  827. package/dist/src/services/publicFileShares/index.mjs +2 -2
  828. package/dist/src/services/publicFileShares/index.mjs.map +1 -1
  829. package/dist/src/services/remoteAccess/index.d.mts +1 -0
  830. package/dist/src/services/remoteAccess/index.d.mts.map +1 -1
  831. package/dist/src/services/remoteAccessStore/index.cjs +8 -190
  832. package/dist/src/services/remoteAccessStore/index.cjs.map +1 -1
  833. package/dist/src/services/remoteAccessStore/index.d.mts +2 -0
  834. package/dist/src/services/remoteAccessStore/index.mjs +7 -187
  835. package/dist/src/services/remoteAccessStore/index.mjs.map +1 -1
  836. package/dist/src/services/remoteAccessStore/remoteAccessRecords.cjs +98 -0
  837. package/dist/src/services/remoteAccessStore/remoteAccessRecords.cjs.map +1 -0
  838. package/dist/src/services/remoteAccessStore/remoteAccessRecords.mjs +88 -0
  839. package/dist/src/services/remoteAccessStore/remoteAccessRecords.mjs.map +1 -0
  840. package/dist/src/services/remoteAccessStore/sync.cjs +111 -0
  841. package/dist/src/services/remoteAccessStore/sync.cjs.map +1 -0
  842. package/dist/src/services/remoteAccessStore/sync.mjs +108 -0
  843. package/dist/src/services/remoteAccessStore/sync.mjs.map +1 -0
  844. package/dist/src/services/runtimeIdentity/sync.cjs +23 -0
  845. package/dist/src/services/runtimeIdentity/sync.cjs.map +1 -0
  846. package/dist/src/services/runtimeIdentity/sync.d.mts +9 -0
  847. package/dist/src/services/runtimeIdentity/sync.d.mts.map +1 -0
  848. package/dist/src/services/runtimeIdentity/sync.mjs +20 -0
  849. package/dist/src/services/runtimeIdentity/sync.mjs.map +1 -0
  850. package/dist/src/services/serialRunner/index.cjs +25 -0
  851. package/dist/src/services/serialRunner/index.cjs.map +1 -0
  852. package/dist/src/services/serialRunner/index.d.mts +10 -0
  853. package/dist/src/services/serialRunner/index.d.mts.map +1 -0
  854. package/dist/src/services/serialRunner/index.mjs +25 -0
  855. package/dist/src/services/serialRunner/index.mjs.map +1 -0
  856. package/dist/src/services/{serverFacet → serverHost}/index.cjs +5 -5
  857. package/dist/src/services/serverHost/index.cjs.map +1 -0
  858. package/dist/src/services/serverHost/index.d.mts +31 -0
  859. package/dist/src/services/serverHost/index.d.mts.map +1 -0
  860. package/dist/src/services/{serverFacet → serverHost}/index.mjs +5 -5
  861. package/dist/src/services/serverHost/index.mjs.map +1 -0
  862. package/dist/src/services/sessionAttachments/index.cjs +4 -3
  863. package/dist/src/services/sessionAttachments/index.cjs.map +1 -1
  864. package/dist/src/services/sessionAttachments/index.d.mts +1 -6
  865. package/dist/src/services/sessionAttachments/index.d.mts.map +1 -1
  866. package/dist/src/services/sessionAttachments/index.mjs +3 -2
  867. package/dist/src/services/sessionAttachments/index.mjs.map +1 -1
  868. package/dist/src/services/sessionAttachments/type.d.mts +9 -0
  869. package/dist/src/services/sessionAttachments/type.d.mts.map +1 -0
  870. package/dist/src/services/sessionFiles/index.cjs +96 -0
  871. package/dist/src/services/sessionFiles/index.cjs.map +1 -0
  872. package/dist/src/services/sessionFiles/index.d.mts +33 -0
  873. package/dist/src/services/sessionFiles/index.d.mts.map +1 -0
  874. package/dist/src/services/sessionFiles/index.mjs +89 -0
  875. package/dist/src/services/sessionFiles/index.mjs.map +1 -0
  876. package/dist/src/services/sessionFiles/sessionDirectory.cjs +66 -0
  877. package/dist/src/services/sessionFiles/sessionDirectory.cjs.map +1 -0
  878. package/dist/src/services/sessionFiles/sessionDirectory.mjs +62 -0
  879. package/dist/src/services/sessionFiles/sessionDirectory.mjs.map +1 -0
  880. package/dist/src/services/sessionGitStatus/index.cjs +31 -33
  881. package/dist/src/services/sessionGitStatus/index.cjs.map +1 -1
  882. package/dist/src/services/sessionGitStatus/index.mjs +31 -33
  883. package/dist/src/services/sessionGitStatus/index.mjs.map +1 -1
  884. package/dist/src/services/sessionPresentation/index.cjs +3 -27
  885. package/dist/src/services/sessionPresentation/index.cjs.map +1 -1
  886. package/dist/src/services/sessionPresentation/index.mjs +3 -27
  887. package/dist/src/services/sessionPresentation/index.mjs.map +1 -1
  888. package/dist/src/services/skillPrompt/index.cjs +11 -0
  889. package/dist/src/services/skillPrompt/index.cjs.map +1 -0
  890. package/dist/src/services/skillPrompt/index.mjs +11 -0
  891. package/dist/src/services/skillPrompt/index.mjs.map +1 -0
  892. package/dist/src/services/sqliteSessionHistory/index.cjs +44 -30
  893. package/dist/src/services/sqliteSessionHistory/index.cjs.map +1 -1
  894. package/dist/src/services/sqliteSessionHistory/index.d.mts +7 -4
  895. package/dist/src/services/sqliteSessionHistory/index.d.mts.map +1 -1
  896. package/dist/src/services/sqliteSessionHistory/index.mjs +43 -28
  897. package/dist/src/services/sqliteSessionHistory/index.mjs.map +1 -1
  898. package/dist/src/services/sqliteTranscriptReader/index.cjs +21 -45
  899. package/dist/src/services/sqliteTranscriptReader/index.cjs.map +1 -1
  900. package/dist/src/services/sqliteTranscriptReader/index.d.mts +3 -2
  901. package/dist/src/services/sqliteTranscriptReader/index.d.mts.map +1 -1
  902. package/dist/src/services/sqliteTranscriptReader/index.mjs +16 -38
  903. package/dist/src/services/sqliteTranscriptReader/index.mjs.map +1 -1
  904. package/dist/src/services/testMode/index.cjs +162 -0
  905. package/dist/src/services/testMode/index.cjs.map +1 -0
  906. package/dist/src/services/testMode/index.d.mts +17 -0
  907. package/dist/src/services/testMode/index.d.mts.map +1 -0
  908. package/dist/src/services/testMode/index.mjs +155 -0
  909. package/dist/src/services/testMode/index.mjs.map +1 -0
  910. package/dist/src/services/toolOverrides/index.cjs +6 -6
  911. package/dist/src/services/toolOverrides/index.cjs.map +1 -1
  912. package/dist/src/services/toolOverrides/index.d.mts +3 -3
  913. package/dist/src/services/toolOverrides/index.d.mts.map +1 -1
  914. package/dist/src/services/toolOverrides/index.mjs +6 -6
  915. package/dist/src/services/toolOverrides/index.mjs.map +1 -1
  916. package/dist/src/services/toolPrompt/index.d.mts +17 -0
  917. package/dist/src/services/toolPrompt/index.d.mts.map +1 -0
  918. package/dist/src/services/toolSurface/index.cjs +3 -3
  919. package/dist/src/services/toolSurface/index.cjs.map +1 -1
  920. package/dist/src/services/toolSurface/index.d.mts +3 -3
  921. package/dist/src/services/toolSurface/index.d.mts.map +1 -1
  922. package/dist/src/services/toolSurface/index.mjs +4 -4
  923. package/dist/src/services/toolSurface/index.mjs.map +1 -1
  924. package/dist/src/services/traceContext/index.cjs.map +1 -1
  925. package/dist/src/services/traceContext/index.mjs.map +1 -1
  926. package/dist/src/services/transcriptPages/index.cjs +159 -33
  927. package/dist/src/services/transcriptPages/index.cjs.map +1 -1
  928. package/dist/src/services/transcriptPages/index.mjs +158 -34
  929. package/dist/src/services/transcriptPages/index.mjs.map +1 -1
  930. package/dist/src/services/voiceToolsContract/index.cjs +7 -7
  931. package/dist/src/services/voiceToolsContract/index.cjs.map +1 -1
  932. package/dist/src/services/voiceToolsContract/index.d.mts +4 -4
  933. package/dist/src/services/voiceToolsContract/index.d.mts.map +1 -1
  934. package/dist/src/services/voiceToolsContract/index.mjs +7 -7
  935. package/dist/src/services/voiceToolsContract/index.mjs.map +1 -1
  936. package/dist/src/services/workspaceRegistry/index.cjs +9 -179
  937. package/dist/src/services/workspaceRegistry/index.cjs.map +1 -1
  938. package/dist/src/services/workspaceRegistry/index.d.mts +5 -47
  939. package/dist/src/services/workspaceRegistry/index.mjs +7 -176
  940. package/dist/src/services/workspaceRegistry/index.mjs.map +1 -1
  941. package/dist/src/services/workspaceRegistry/sync.cjs +148 -0
  942. package/dist/src/services/workspaceRegistry/sync.cjs.map +1 -0
  943. package/dist/src/services/workspaceRegistry/sync.d.mts +34 -0
  944. package/dist/src/services/workspaceRegistry/sync.d.mts.map +1 -0
  945. package/dist/src/services/workspaceRegistry/sync.mjs +140 -0
  946. package/dist/src/services/workspaceRegistry/sync.mjs.map +1 -0
  947. package/dist/src/services/workspaceRegistry/workspaceRecords.cjs +114 -0
  948. package/dist/src/services/workspaceRegistry/workspaceRecords.cjs.map +1 -0
  949. package/dist/src/services/workspaceRegistry/workspaceRecords.d.mts +31 -0
  950. package/dist/src/services/workspaceRegistry/workspaceRecords.d.mts.map +1 -0
  951. package/dist/src/services/workspaceRegistry/workspaceRecords.mjs +101 -0
  952. package/dist/src/services/workspaceRegistry/workspaceRecords.mjs.map +1 -0
  953. package/dist/src/systems/child/adapters/headlessChildSessionService.cjs +339 -202
  954. package/dist/src/systems/child/adapters/headlessChildSessionService.cjs.map +1 -1
  955. package/dist/src/systems/child/adapters/headlessChildSessionService.d.mts +16 -21
  956. package/dist/src/systems/child/adapters/headlessChildSessionService.d.mts.map +1 -1
  957. package/dist/src/systems/child/adapters/headlessChildSessionService.mjs +329 -191
  958. package/dist/src/systems/child/adapters/headlessChildSessionService.mjs.map +1 -1
  959. package/dist/src/systems/child/services/childSession/index.cjs +94 -20
  960. package/dist/src/systems/child/services/childSession/index.cjs.map +1 -1
  961. package/dist/src/systems/child/services/childSession/index.d.mts +12 -3
  962. package/dist/src/systems/child/services/childSession/index.d.mts.map +1 -1
  963. package/dist/src/systems/child/services/childSession/index.mjs +94 -20
  964. package/dist/src/systems/child/services/childSession/index.mjs.map +1 -1
  965. package/dist/src/systems/child/types/childSession.cjs +33 -13
  966. package/dist/src/systems/child/types/childSession.cjs.map +1 -1
  967. package/dist/src/systems/child/types/childSession.d.mts +143 -80
  968. package/dist/src/systems/child/types/childSession.d.mts.map +1 -1
  969. package/dist/src/systems/child/types/childSession.mjs +24 -9
  970. package/dist/src/systems/child/types/childSession.mjs.map +1 -1
  971. package/dist/src/systems/main/adapters/headlessHost.cjs +30 -27
  972. package/dist/src/systems/main/adapters/headlessHost.cjs.map +1 -1
  973. package/dist/src/systems/main/adapters/headlessHost.d.mts +22 -22
  974. package/dist/src/systems/main/adapters/headlessHost.d.mts.map +1 -1
  975. package/dist/src/systems/main/adapters/headlessHost.mjs +33 -30
  976. package/dist/src/systems/main/adapters/headlessHost.mjs.map +1 -1
  977. package/dist/src/systems/main/adapters/headlessSessionHost.cjs +248 -229
  978. package/dist/src/systems/main/adapters/headlessSessionHost.cjs.map +1 -1
  979. package/dist/src/systems/main/adapters/headlessSessionHost.d.mts +4 -5
  980. package/dist/src/systems/main/adapters/headlessSessionHost.d.mts.map +1 -1
  981. package/dist/src/systems/main/adapters/headlessSessionHost.mjs +239 -219
  982. package/dist/src/systems/main/adapters/headlessSessionHost.mjs.map +1 -1
  983. package/dist/src/systems/main/types/headlessHost.d.mts +16 -14
  984. package/dist/src/systems/main/types/headlessHost.d.mts.map +1 -1
  985. package/dist/src/testing/pi/testHost.cjs +2 -2
  986. package/dist/src/testing/pi/testHost.cjs.map +1 -1
  987. package/dist/src/testing/pi/testHost.d.mts +3 -2
  988. package/dist/src/testing/pi/testHost.mjs +3 -3
  989. package/dist/src/testing/pi/testHost.mjs.map +1 -1
  990. package/dist/src/types/config.d.mts +1 -1
  991. package/dist/src/types/config.d.mts.map +1 -1
  992. package/dist/src/types/kernel.d.mts +3 -3
  993. package/dist/src/types/server/directHarnessRuntime.d.mts +54 -25
  994. package/dist/src/types/server/directHarnessRuntime.d.mts.map +1 -1
  995. package/dist/src/types/server/sessionToolSurface.d.mts +9 -9
  996. package/dist/src/web/services/apiClient/index.d.mts +1 -0
  997. package/dist/src/web/services/apiPaths/index.cjs.map +1 -1
  998. package/dist/src/web/services/apiPaths/index.d.mts +1 -1
  999. package/dist/src/web/services/apiPaths/index.mjs.map +1 -1
  1000. package/dist/src/web/services/mcpWidget.cjs.map +1 -1
  1001. package/dist/src/web/services/mcpWidget.d.mts +2 -2
  1002. package/dist/src/web/services/mcpWidget.d.mts.map +1 -1
  1003. package/dist/src/web/services/mcpWidget.mjs.map +1 -1
  1004. package/dist/src/web/services/testing/templateRail.cjs +3 -0
  1005. package/dist/src/web/services/testing/templateRail.cjs.map +1 -1
  1006. package/dist/src/web/services/testing/templateRail.mjs +3 -0
  1007. package/dist/src/web/services/testing/templateRail.mjs.map +1 -1
  1008. package/dist/src/web/types/mcpWidget.d.mts +1 -1
  1009. package/dist/src/web/types/nativeTemplate.d.mts +1 -1
  1010. package/dist/src/web/types/nativeTemplate.d.mts.map +1 -1
  1011. package/dist/src/web/types/template.d.mts +8 -0
  1012. package/dist/src/web/types/template.d.mts.map +1 -1
  1013. package/dist/src/web/types/webPlugin.d.mts +17 -5
  1014. package/dist/src/web/types/webPlugin.d.mts.map +1 -1
  1015. package/dist/testMode.cjs +4 -0
  1016. package/dist/testMode.d.mts +2 -0
  1017. package/dist/testMode.mjs +1 -0
  1018. package/dist/testing.cjs +1 -1
  1019. package/dist/testing.d.mts +2 -2
  1020. package/dist/testing.mjs +2 -2
  1021. package/dist/toolInventory.cjs.map +1 -1
  1022. package/dist/toolInventory.mjs.map +1 -1
  1023. package/dist/toolNames.mjs +1 -2
  1024. package/dist/toolOverrides.cjs +4 -4
  1025. package/dist/toolOverrides.d.mts +3 -3
  1026. package/dist/toolOverrides.mjs +3 -3
  1027. package/dist/toolSurface.cjs +4 -4
  1028. package/dist/toolSurface.d.mts +3 -3
  1029. package/dist/toolSurface.mjs +3 -3
  1030. package/dist/transition.cjs +3 -3
  1031. package/dist/transition.d.cjs +3 -3
  1032. package/dist/transition.d.mts +2 -2
  1033. package/dist/transition.mjs +1 -2
  1034. package/dist/transitionClassifier.cjs.map +1 -1
  1035. package/dist/transitionClassifier.d.mts +2 -2
  1036. package/dist/transitionClassifier.d.mts.map +1 -1
  1037. package/dist/transitionClassifier.mjs.map +1 -1
  1038. package/dist/transitionCoordinator.cjs +3 -3
  1039. package/dist/transitionCoordinator.cjs.map +1 -1
  1040. package/dist/transitionCoordinator.d.mts +4 -4
  1041. package/dist/transitionCoordinator.d.mts.map +1 -1
  1042. package/dist/transitionCoordinator.mjs +3 -3
  1043. package/dist/transitionCoordinator.mjs.map +1 -1
  1044. package/dist/typesContextApi.d.mts +2 -1
  1045. package/dist/typesContextApi.d.mts.map +1 -1
  1046. package/dist/uiHub.cjs +3 -3
  1047. package/dist/uiHub.d.mts +2 -2
  1048. package/dist/uiHub.mjs +1 -2
  1049. package/dist/voiceTools.cjs +5 -5
  1050. package/dist/voiceTools.d.mts +3 -3
  1051. package/dist/voiceTools.mjs +3 -3
  1052. package/dist/web.cjs +8 -0
  1053. package/dist/web.d.mts +3 -2
  1054. package/dist/web.mjs +2 -1
  1055. package/dist/webCompositions.cjs.map +1 -1
  1056. package/dist/webCompositions.d.mts +7 -7
  1057. package/dist/webCompositions.d.mts.map +1 -1
  1058. package/dist/webCompositions.mjs.map +1 -1
  1059. package/licenses/Codex-Apache-2.0.txt +201 -0
  1060. package/package.json +58 -53
  1061. package/dist/doomPackage.cjs +0 -61
  1062. package/dist/doomPackage.cjs.map +0 -1
  1063. package/dist/doomPackage.d.mts +0 -17
  1064. package/dist/doomPackage.d.mts.map +0 -1
  1065. package/dist/doomPackage.mjs +0 -54
  1066. package/dist/doomPackage.mjs.map +0 -1
  1067. package/dist/jsonlSessionRepo.cjs +0 -44
  1068. package/dist/jsonlSessionRepo.cjs.map +0 -1
  1069. package/dist/jsonlSessionRepo.d.mts +0 -7
  1070. package/dist/jsonlSessionRepo.d.mts.map +0 -1
  1071. package/dist/jsonlSessionRepo.mjs +0 -42
  1072. package/dist/jsonlSessionRepo.mjs.map +0 -1
  1073. package/dist/runtimeJson.cjs.map +0 -1
  1074. package/dist/runtimeJson.d.mts.map +0 -1
  1075. package/dist/runtimeJson.mjs.map +0 -1
  1076. package/dist/runtimePiSettings.cjs.map +0 -1
  1077. package/dist/runtimePiSettings.d.mts.map +0 -1
  1078. package/dist/runtimePiSettings.mjs.map +0 -1
  1079. package/dist/serverFacet.cjs +0 -34
  1080. package/dist/serverFacet.d.mts +0 -10
  1081. package/dist/serverFacet.mjs +0 -9
  1082. package/dist/src/pi/piWebSocketListener.cjs +0 -115
  1083. package/dist/src/pi/piWebSocketListener.cjs.map +0 -1
  1084. package/dist/src/pi/piWebSocketListener.mjs +0 -115
  1085. package/dist/src/pi/piWebSocketListener.mjs.map +0 -1
  1086. package/dist/src/schemas/serverFacet.cjs +0 -111
  1087. package/dist/src/schemas/serverFacet.cjs.map +0 -1
  1088. package/dist/src/schemas/serverFacet.d.mts +0 -152
  1089. package/dist/src/schemas/serverFacet.d.mts.map +0 -1
  1090. package/dist/src/schemas/serverFacet.mjs +0 -101
  1091. package/dist/src/schemas/serverFacet.mjs.map +0 -1
  1092. package/dist/src/schemas/sessionUpdates.d.mts +0 -34
  1093. package/dist/src/schemas/sessionUpdates.d.mts.map +0 -1
  1094. package/dist/src/server/headlessProtocol.cjs +0 -382
  1095. package/dist/src/server/headlessProtocol.cjs.map +0 -1
  1096. package/dist/src/server/headlessProtocol.mjs +0 -382
  1097. package/dist/src/server/headlessProtocol.mjs.map +0 -1
  1098. package/dist/src/server/nativeChildTranscriptReader.cjs +0 -20
  1099. package/dist/src/server/nativeChildTranscriptReader.cjs.map +0 -1
  1100. package/dist/src/server/nativeChildTranscriptReader.mjs +0 -18
  1101. package/dist/src/server/nativeChildTranscriptReader.mjs.map +0 -1
  1102. package/dist/src/server/serverFacetLoader.cjs +0 -214
  1103. package/dist/src/server/serverFacetLoader.cjs.map +0 -1
  1104. package/dist/src/server/serverFacetLoader.d.mts +0 -72
  1105. package/dist/src/server/serverFacetLoader.d.mts.map +0 -1
  1106. package/dist/src/server/serverFacetLoader.mjs +0 -212
  1107. package/dist/src/server/serverFacetLoader.mjs.map +0 -1
  1108. package/dist/src/services/acpSessionUpdates/index.cjs +0 -129
  1109. package/dist/src/services/acpSessionUpdates/index.cjs.map +0 -1
  1110. package/dist/src/services/acpSessionUpdates/index.mjs +0 -129
  1111. package/dist/src/services/acpSessionUpdates/index.mjs.map +0 -1
  1112. package/dist/src/services/historyImport/index.cjs +0 -8
  1113. package/dist/src/services/historyImport/index.cjs.map +0 -1
  1114. package/dist/src/services/historyImport/index.d.mts +0 -68
  1115. package/dist/src/services/historyImport/index.d.mts.map +0 -1
  1116. package/dist/src/services/historyImport/index.mjs +0 -8
  1117. package/dist/src/services/historyImport/index.mjs.map +0 -1
  1118. package/dist/src/services/openSessionRegistry/index.d.mts.map +0 -1
  1119. package/dist/src/services/requestReceipts/index.cjs.map +0 -1
  1120. package/dist/src/services/requestReceipts/index.d.mts +0 -11
  1121. package/dist/src/services/requestReceipts/index.d.mts.map +0 -1
  1122. package/dist/src/services/requestReceipts/index.mjs.map +0 -1
  1123. package/dist/src/services/rpcTranscript/index.cjs +0 -633
  1124. package/dist/src/services/rpcTranscript/index.cjs.map +0 -1
  1125. package/dist/src/services/rpcTranscript/index.d.mts +0 -50
  1126. package/dist/src/services/rpcTranscript/index.d.mts.map +0 -1
  1127. package/dist/src/services/rpcTranscript/index.mjs +0 -632
  1128. package/dist/src/services/rpcTranscript/index.mjs.map +0 -1
  1129. package/dist/src/services/serverFacet/index.cjs.map +0 -1
  1130. package/dist/src/services/serverFacet/index.d.mts +0 -31
  1131. package/dist/src/services/serverFacet/index.d.mts.map +0 -1
  1132. package/dist/src/services/serverFacet/index.mjs.map +0 -1
  1133. package/dist/src/services/workspaceRegistry/index.d.mts.map +0 -1
  1134. package/dist/src/systems/child/adapters/nativeChildRuntimes.cjs +0 -28
  1135. package/dist/src/systems/child/adapters/nativeChildRuntimes.cjs.map +0 -1
  1136. package/dist/src/systems/child/adapters/nativeChildRuntimes.mjs +0 -25
  1137. package/dist/src/systems/child/adapters/nativeChildRuntimes.mjs.map +0 -1
  1138. package/dist/terminalPiChildSessionService.cjs +0 -324
  1139. package/dist/terminalPiChildSessionService.cjs.map +0 -1
  1140. package/dist/terminalPiChildSessionService.d.mts +0 -46
  1141. package/dist/terminalPiChildSessionService.d.mts.map +0 -1
  1142. package/dist/terminalPiChildSessionService.mjs +0 -318
  1143. package/dist/terminalPiChildSessionService.mjs.map +0 -1
  1144. package/dist/v3Export.cjs +0 -10
  1145. package/dist/v3Export.cjs.map +0 -1
  1146. package/dist/v3Export.d.mts +0 -35
  1147. package/dist/v3Export.d.mts.map +0 -1
  1148. package/dist/v3Export.mjs +0 -9
  1149. package/dist/v3Export.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/services/openSessionRegistry/index.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\nconst REGISTRY_FILE = 'open-sessions.json';\nconst DIRECTORY_MODE = 0o700;\nconst FILE_MODE = 0o600;\n/** The id becomes a journal filename, so it is constrained exactly as SQLite storage constrains it. */\nconst SESSION_ID_PATTERN = /^[A-Za-z0-9_-]+$/u;\n\n/** One cockpit session the server had open, enough to reopen its journal by id. */\nexport interface OpenSessionRecord {\n sessionId: string;\n workspaceId: string;\n cwd: string;\n /** Child checkout root, distinct from the parent grouping root for worktrees. */\n repoRoot?: string;\n /** Parent workspace path used only to restore the workspace identity. */\n groupingRoot?: string;\n name: string;\n createdAt: string;\n parentSessionId?: string;\n sessionProvenance?: string;\n}\n\nexport interface OpenSessionRegistry {\n list(): readonly OpenSessionRecord[];\n /** True only after the record is durably published. */\n add(record: OpenSessionRecord): boolean;\n remove(sessionId: string): void;\n}\n\nexport interface OpenSessionRegistryOptions {\n /** Directory holding the `sessions` journal folder, so the registry sits beside what it points at. */\n directory: string;\n onNotice?: (message: string) => void;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction optionalText(value: unknown): string | undefined {\n return typeof value === 'string' && value !== '' ? value : undefined;\n}\n\n/**\n * Reads one entry, or nothing.\n *\n * The file is editable by hand and its session id is joined into a journal\n * path, so it is a trust boundary rather than trusted state this process wrote.\n * A bad entry is dropped instead of narrowing the whole file to nothing. A legacy\n * `artifact` (the worktree's pinned sync generation) is ignored: sessions compose live.\n */\nfunction parseRecord(value: unknown): OpenSessionRecord | undefined {\n if (!isRecord(value)) return undefined;\n const { sessionId, workspaceId, cwd, name, createdAt } = value;\n if (typeof sessionId !== 'string' || !SESSION_ID_PATTERN.test(sessionId)) return undefined;\n if (typeof workspaceId !== 'string' || workspaceId === '') return undefined;\n if (typeof cwd !== 'string' || !path.isAbsolute(cwd)) return undefined;\n if (typeof name !== 'string' || typeof createdAt !== 'string') return undefined;\n const parentSessionId = optionalText(value.parentSessionId);\n const sessionProvenance = optionalText(value.sessionProvenance);\n const repoRoot = optionalText(value.repoRoot);\n const groupingRoot = optionalText(value.groupingRoot);\n if (value.repoRoot !== undefined && (!repoRoot || !path.isAbsolute(repoRoot))) return undefined;\n if (value.groupingRoot !== undefined && (!groupingRoot || !path.isAbsolute(groupingRoot))) return undefined;\n return {\n sessionId,\n workspaceId,\n cwd,\n ...(repoRoot === undefined ? {} : { repoRoot }),\n ...(groupingRoot === undefined ? {} : { groupingRoot }),\n name,\n createdAt,\n ...(parentSessionId === undefined ? {} : { parentSessionId }),\n ...(sessionProvenance === undefined ? {} : { sessionProvenance }),\n };\n}\n\n/**\n * The sessions the cockpit had open, so a server restart can offer them back.\n *\n * Journals already survive a restart; what does not is the knowledge of which\n * of them were open rather than merely finished. Without that, a restart either\n * loses every session or revives every thread ever recorded.\n */\nexport function createOpenSessionRegistry(options: OpenSessionRegistryOptions): OpenSessionRegistry {\n const notice = options.onNotice ?? ((): void => {});\n const filePath = path.join(options.directory, REGISTRY_FILE);\n\n const load = (): OpenSessionRecord[] => {\n let raw: string;\n try {\n raw = fs.readFileSync(filePath, 'utf8');\n } catch {\n // No file is the normal first run, so this is not worth a notice.\n return [];\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch {\n // Left in place rather than rewritten: a file somebody hand-edited is\n // worth more as evidence than as something this process silently repairs.\n notice(`open sessions at ${filePath} are not valid JSON; none will be restored`);\n return [];\n }\n if (!Array.isArray(parsed)) {\n notice(`open sessions at ${filePath} are not a list; none will be restored`);\n return [];\n }\n const records: OpenSessionRecord[] = [];\n for (const entry of parsed) {\n const record = parseRecord(entry);\n if (record === undefined) notice(`open sessions at ${filePath} contain an unusable entry; skipping it`);\n else records.push(record);\n }\n return records;\n };\n\n let current = load();\n\n const persist = (next: OpenSessionRecord[]): boolean => {\n const temporary = `${filePath}.${String(process.pid)}.tmp`;\n try {\n fs.mkdirSync(options.directory, { recursive: true, mode: DIRECTORY_MODE });\n const descriptor = fs.openSync(temporary, 'w', FILE_MODE);\n try {\n fs.writeFileSync(descriptor, `${JSON.stringify(next, undefined, 2)}\\n`);\n fs.fsyncSync(descriptor);\n } finally {\n fs.closeSync(descriptor);\n }\n // Rename rather than write in place, so a crash mid-write leaves the\n // previous contents rather than a truncated file.\n fs.renameSync(temporary, filePath);\n current = next;\n return true;\n } catch (error) {\n notice(`${filePath} could not be saved: ${error instanceof Error ? error.message : String(error)}`);\n try {\n fs.rmSync(temporary, { force: true });\n } catch {\n // Nothing further to do; the temp file is inert either way.\n }\n return false;\n }\n };\n\n return {\n list: () => current,\n add(record) {\n if (!SESSION_ID_PATTERN.test(record.sessionId)) throw new Error(`Invalid session id '${record.sessionId}'.`);\n for (const directory of [record.cwd, record.repoRoot, record.groupingRoot]) {\n if (directory !== undefined && !path.isAbsolute(directory))\n throw new Error('Session directories must be absolute.');\n }\n return persist([...current.filter((held) => held.sessionId !== record.sessionId), record]);\n },\n remove(sessionId) {\n const next = current.filter((held) => held.sessionId !== sessionId);\n if (next.length === current.length) return;\n persist(next);\n },\n };\n}\n"],"mappings":";;;AAGA,MAAM,gBAAgB;AACtB,MAAM,iBAAiB;AACvB,MAAM,YAAY;;AAElB,MAAM,qBAAqB;AA8B3B,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAS,aAAa,OAAoC;CACxD,OAAO,OAAO,UAAU,YAAY,UAAU,KAAK,QAAQ,KAAA;AAC7D;;;;;;;;;AAUA,SAAS,YAAY,OAA+C;CAClE,IAAI,CAAC,SAAS,KAAK,GAAG,OAAO,KAAA;CAC7B,MAAM,EAAE,WAAW,aAAa,KAAK,MAAM,cAAc;CACzD,IAAI,OAAO,cAAc,YAAY,CAAC,mBAAmB,KAAK,SAAS,GAAG,OAAO,KAAA;CACjF,IAAI,OAAO,gBAAgB,YAAY,gBAAgB,IAAI,OAAO,KAAA;CAClE,IAAI,OAAO,QAAQ,YAAY,CAAC,KAAK,WAAW,GAAG,GAAG,OAAO,KAAA;CAC7D,IAAI,OAAO,SAAS,YAAY,OAAO,cAAc,UAAU,OAAO,KAAA;CACtE,MAAM,kBAAkB,aAAa,MAAM,eAAe;CAC1D,MAAM,oBAAoB,aAAa,MAAM,iBAAiB;CAC9D,MAAM,WAAW,aAAa,MAAM,QAAQ;CAC5C,MAAM,eAAe,aAAa,MAAM,YAAY;CACpD,IAAI,MAAM,aAAa,KAAA,MAAc,CAAC,YAAY,CAAC,KAAK,WAAW,QAAQ,IAAI,OAAO,KAAA;CACtF,IAAI,MAAM,iBAAiB,KAAA,MAAc,CAAC,gBAAgB,CAAC,KAAK,WAAW,YAAY,IAAI,OAAO,KAAA;CAClG,OAAO;EACL;EACA;EACA;EACA,GAAI,aAAa,KAAA,IAAY,CAAC,IAAI,EAAE,SAAS;EAC7C,GAAI,iBAAiB,KAAA,IAAY,CAAC,IAAI,EAAE,aAAa;EACrD;EACA;EACA,GAAI,oBAAoB,KAAA,IAAY,CAAC,IAAI,EAAE,gBAAgB;EAC3D,GAAI,sBAAsB,KAAA,IAAY,CAAC,IAAI,EAAE,kBAAkB;CACjE;AACF;;;;;;;;AASA,SAAgB,0BAA0B,SAA0D;CAClG,MAAM,SAAS,QAAQ,mBAAyB,CAAC;CACjD,MAAM,WAAW,KAAK,KAAK,QAAQ,WAAW,aAAa;CAE3D,MAAM,aAAkC;EACtC,IAAI;EACJ,IAAI;GACF,MAAM,GAAG,aAAa,UAAU,MAAM;EACxC,QAAQ;GAEN,OAAO,CAAC;EACV;EACA,IAAI;EACJ,IAAI;GACF,SAAS,KAAK,MAAM,GAAG;EACzB,QAAQ;GAGN,OAAO,oBAAoB,SAAS,2CAA2C;GAC/E,OAAO,CAAC;EACV;EACA,IAAI,CAAC,MAAM,QAAQ,MAAM,GAAG;GAC1B,OAAO,oBAAoB,SAAS,uCAAuC;GAC3E,OAAO,CAAC;EACV;EACA,MAAM,UAA+B,CAAC;EACtC,KAAK,MAAM,SAAS,QAAQ;GAC1B,MAAM,SAAS,YAAY,KAAK;GAChC,IAAI,WAAW,KAAA,GAAW,OAAO,oBAAoB,SAAS,wCAAwC;QACjG,QAAQ,KAAK,MAAM;EAC1B;EACA,OAAO;CACT;CAEA,IAAI,UAAU,KAAK;CAEnB,MAAM,WAAW,SAAuC;EACtD,MAAM,YAAY,GAAG,SAAS,GAAG,OAAO,QAAQ,GAAG,EAAE;EACrD,IAAI;GACF,GAAG,UAAU,QAAQ,WAAW;IAAE,WAAW;IAAM,MAAM;GAAe,CAAC;GACzE,MAAM,aAAa,GAAG,SAAS,WAAW,KAAK,SAAS;GACxD,IAAI;IACF,GAAG,cAAc,YAAY,GAAG,KAAK,UAAU,MAAM,KAAA,GAAW,CAAC,EAAE,GAAG;IACtE,GAAG,UAAU,UAAU;GACzB,UAAU;IACR,GAAG,UAAU,UAAU;GACzB;GAGA,GAAG,WAAW,WAAW,QAAQ;GACjC,UAAU;GACV,OAAO;EACT,SAAS,OAAO;GACd,OAAO,GAAG,SAAS,uBAAuB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,GAAG;GAClG,IAAI;IACF,GAAG,OAAO,WAAW,EAAE,OAAO,KAAK,CAAC;GACtC,QAAQ,CAER;GACA,OAAO;EACT;CACF;CAEA,OAAO;EACL,YAAY;EACZ,IAAI,QAAQ;GACV,IAAI,CAAC,mBAAmB,KAAK,OAAO,SAAS,GAAG,MAAM,IAAI,MAAM,uBAAuB,OAAO,UAAU,GAAG;GAC3G,KAAK,MAAM,aAAa;IAAC,OAAO;IAAK,OAAO;IAAU,OAAO;GAAY,GACvE,IAAI,cAAc,KAAA,KAAa,CAAC,KAAK,WAAW,SAAS,GACvD,MAAM,IAAI,MAAM,uCAAuC;GAE3D,OAAO,QAAQ,CAAC,GAAG,QAAQ,QAAQ,SAAS,KAAK,cAAc,OAAO,SAAS,GAAG,MAAM,CAAC;EAC3F;EACA,OAAO,WAAW;GAChB,MAAM,OAAO,QAAQ,QAAQ,SAAS,KAAK,cAAc,SAAS;GAClE,IAAI,KAAK,WAAW,QAAQ,QAAQ;GACpC,QAAQ,IAAI;EACd;CACF;AACF"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/services/openSessionRegistry/index.ts"],"sourcesContent":["import path from 'node:path';\n\nimport type { Context } from '@earendil-works/chord';\nimport { getOrThrow, type FileSystem } from '@earendil-works/pi-durable/env';\n\nimport { nodeHost } from '../nodeHost';\nimport { writeFileAtomic } from '../platformFiles';\nimport { createSerialRunner } from '../serialRunner';\nimport {\n assertOpenSessionRecord,\n DIRECTORY_MODE,\n FILE_MODE,\n parseOpenSessionRecords,\n REGISTRY_FILE,\n serializeOpenSessionRecords,\n type OpenSessionRecord,\n type OpenSessionRegistryOptions,\n} from './openSessionRecords';\n\nexport type { OpenSessionRecord, OpenSessionRegistry, OpenSessionRegistryOptions } from './openSessionRecords';\nexport { createOpenSessionRegistry } from './sync';\n\n/** One queue per registry file, so concurrent writes in this process never interleave. */\nconst registryWrites = createSerialRunner();\n\nexport interface OpenSessionRegistryAsync {\n list(): readonly OpenSessionRecord[];\n /** True only after the record is durably published. */\n add(record: OpenSessionRecord): Promise<boolean>;\n remove(sessionId: string): Promise<void>;\n}\n\n/**\n * The sessions the cockpit had open, so a server restart can offer them back.\n *\n * Journals already survive a restart; what does not is the knowledge of which\n * of them were open rather than merely finished. Without that, a restart either\n * loses every session or revives every thread ever recorded. Writes serialise per\n * registry file and publish through a uniquely named temporary file and a rename.\n */\nexport async function createOpenSessionRegistryAsync(\n fs: FileSystem,\n options: OpenSessionRegistryOptions,\n context: Context,\n): Promise<OpenSessionRegistryAsync> {\n const notice = options.onNotice ?? ((): void => {});\n const filePath = path.join(options.directory, REGISTRY_FILE);\n const serial = registryWrites.forKey(filePath);\n\n // No file, or one this process cannot read, is the normal first run, so it is not worth a notice.\n const raw = await fs.readTextFile(filePath, context);\n let current = raw.ok ? parseOpenSessionRecords(raw.value, filePath, notice) : [];\n\n const persist = async (next: OpenSessionRecord[]): Promise<boolean> => {\n try {\n if (!getOrThrow(await fs.exists(options.directory, context))) {\n getOrThrow(await fs.createDir(options.directory, { recursive: true }, context));\n await nodeHost.setMode(options.directory, DIRECTORY_MODE);\n }\n await writeFileAtomic(fs, filePath, serializeOpenSessionRecords(next), context);\n await nodeHost.setMode(filePath, FILE_MODE);\n current = next;\n return true;\n } catch (error) {\n notice(`${filePath} could not be saved: ${error instanceof Error ? error.message : String(error)}`);\n return false;\n }\n };\n\n return {\n list: () => current,\n add: async (record) => {\n assertOpenSessionRecord(record);\n return await serial(() => persist([...current.filter((held) => held.sessionId !== record.sessionId), record]));\n },\n remove: (sessionId) =>\n serial(async () => {\n const next = current.filter((held) => held.sessionId !== sessionId);\n if (next.length !== current.length) await persist(next);\n }),\n };\n}\n"],"mappings":";;;;;;AAuBuB,mBAAmB"}
@@ -0,0 +1,87 @@
1
+ const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
2
+ let node_path = require("node:path");
3
+ node_path = require_runtime.__toESM(node_path, 1);
4
+ //#region src/services/openSessionRegistry/openSessionRecords.ts
5
+ const REGISTRY_FILE = "open-sessions.json";
6
+ /** The id becomes a journal filename, so it is constrained exactly as SQLite storage constrains it. */
7
+ const SESSION_ID_PATTERN = /^[A-Za-z0-9_-]+$/u;
8
+ function isRecord(value) {
9
+ return typeof value === "object" && value !== null && !Array.isArray(value);
10
+ }
11
+ function optionalText(value) {
12
+ return typeof value === "string" && value !== "" ? value : void 0;
13
+ }
14
+ /**
15
+ * Reads one entry, or nothing.
16
+ *
17
+ * The file is editable by hand and its session id is joined into a journal
18
+ * path, so it is a trust boundary rather than trusted state this process wrote.
19
+ * A bad entry is dropped instead of narrowing the whole file to nothing. A legacy
20
+ * `artifact` (the worktree's pinned sync generation) is ignored: sessions compose live.
21
+ */
22
+ function parseRecord(value) {
23
+ if (!isRecord(value)) return void 0;
24
+ const { sessionId, workspaceId, cwd, name, createdAt } = value;
25
+ if (typeof sessionId !== "string" || !SESSION_ID_PATTERN.test(sessionId)) return void 0;
26
+ if (typeof workspaceId !== "string" || workspaceId === "") return void 0;
27
+ if (typeof cwd !== "string" || !node_path.default.isAbsolute(cwd)) return void 0;
28
+ if (typeof name !== "string" || typeof createdAt !== "string") return void 0;
29
+ const parentSessionId = optionalText(value.parentSessionId);
30
+ const sessionProvenance = optionalText(value.sessionProvenance);
31
+ const repoRoot = optionalText(value.repoRoot);
32
+ const groupingRoot = optionalText(value.groupingRoot);
33
+ if (value.repoRoot !== void 0 && (!repoRoot || !node_path.default.isAbsolute(repoRoot))) return void 0;
34
+ if (value.groupingRoot !== void 0 && (!groupingRoot || !node_path.default.isAbsolute(groupingRoot))) return void 0;
35
+ return {
36
+ sessionId,
37
+ workspaceId,
38
+ cwd,
39
+ ...repoRoot === void 0 ? {} : { repoRoot },
40
+ ...groupingRoot === void 0 ? {} : { groupingRoot },
41
+ name,
42
+ createdAt,
43
+ ...parentSessionId === void 0 ? {} : { parentSessionId },
44
+ ...sessionProvenance === void 0 ? {} : { sessionProvenance },
45
+ ...Array.isArray(value.groups) ? { groups: value.groups.filter((group) => typeof group === "string") } : {}
46
+ };
47
+ }
48
+ /** Parses registry file text; unusable content is reported and dropped. */
49
+ function parseOpenSessionRecords(raw, filePath, notice) {
50
+ let parsed;
51
+ try {
52
+ parsed = JSON.parse(raw);
53
+ } catch {
54
+ notice(`open sessions at ${filePath} are not valid JSON; none will be restored`);
55
+ return [];
56
+ }
57
+ if (!Array.isArray(parsed)) {
58
+ notice(`open sessions at ${filePath} are not a list; none will be restored`);
59
+ return [];
60
+ }
61
+ const records = [];
62
+ for (const entry of parsed) {
63
+ const record = parseRecord(entry);
64
+ if (record === void 0) notice(`open sessions at ${filePath} contain an unusable entry; skipping it`);
65
+ else records.push(record);
66
+ }
67
+ return records;
68
+ }
69
+ function serializeOpenSessionRecords(records) {
70
+ return `${JSON.stringify(records, void 0, 2)}\n`;
71
+ }
72
+ function assertOpenSessionRecord(record) {
73
+ if (!SESSION_ID_PATTERN.test(record.sessionId)) throw new Error(`Invalid session id '${record.sessionId}'.`);
74
+ for (const directory of [
75
+ record.cwd,
76
+ record.repoRoot,
77
+ record.groupingRoot
78
+ ]) if (directory !== void 0 && !node_path.default.isAbsolute(directory)) throw new Error("Session directories must be absolute.");
79
+ }
80
+ //#endregion
81
+ exports.REGISTRY_FILE = REGISTRY_FILE;
82
+ exports.SESSION_ID_PATTERN = SESSION_ID_PATTERN;
83
+ exports.assertOpenSessionRecord = assertOpenSessionRecord;
84
+ exports.parseOpenSessionRecords = parseOpenSessionRecords;
85
+ exports.serializeOpenSessionRecords = serializeOpenSessionRecords;
86
+
87
+ //# sourceMappingURL=openSessionRecords.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openSessionRecords.cjs","names":["path"],"sources":["../../../../src/services/openSessionRegistry/openSessionRecords.ts"],"sourcesContent":["import path from 'node:path';\n\nexport const REGISTRY_FILE = 'open-sessions.json';\nexport const DIRECTORY_MODE = 0o700;\nexport const FILE_MODE = 0o600;\n/** The id becomes a journal filename, so it is constrained exactly as SQLite storage constrains it. */\nexport const SESSION_ID_PATTERN = /^[A-Za-z0-9_-]+$/u;\n\n/** One cockpit session the server had open, enough to reopen its journal by id. */\nexport interface OpenSessionRecord {\n sessionId: string;\n workspaceId: string;\n cwd: string;\n /** Child checkout root, distinct from the parent grouping root for worktrees. */\n repoRoot?: string;\n /** Parent workspace path used only to restore the workspace identity. */\n groupingRoot?: string;\n name: string;\n createdAt: string;\n parentSessionId?: string;\n sessionProvenance?: string;\n /** Mirrors the journal's groups so the rail can show them while the session is dormant. */\n groups?: readonly string[];\n}\n\nexport interface OpenSessionRegistry {\n list(): readonly OpenSessionRecord[];\n /** True only after the record is durably published. */\n add(record: OpenSessionRecord): boolean;\n remove(sessionId: string): void;\n}\n\nexport interface OpenSessionRegistryOptions {\n /** Directory holding the `sessions` journal folder, so the registry sits beside what it points at. */\n directory: string;\n onNotice?: (message: string) => void;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction optionalText(value: unknown): string | undefined {\n return typeof value === 'string' && value !== '' ? value : undefined;\n}\n\n/**\n * Reads one entry, or nothing.\n *\n * The file is editable by hand and its session id is joined into a journal\n * path, so it is a trust boundary rather than trusted state this process wrote.\n * A bad entry is dropped instead of narrowing the whole file to nothing. A legacy\n * `artifact` (the worktree's pinned sync generation) is ignored: sessions compose live.\n */\nfunction parseRecord(value: unknown): OpenSessionRecord | undefined {\n if (!isRecord(value)) return undefined;\n const { sessionId, workspaceId, cwd, name, createdAt } = value;\n if (typeof sessionId !== 'string' || !SESSION_ID_PATTERN.test(sessionId)) return undefined;\n if (typeof workspaceId !== 'string' || workspaceId === '') return undefined;\n if (typeof cwd !== 'string' || !path.isAbsolute(cwd)) return undefined;\n if (typeof name !== 'string' || typeof createdAt !== 'string') return undefined;\n const parentSessionId = optionalText(value.parentSessionId);\n const sessionProvenance = optionalText(value.sessionProvenance);\n const repoRoot = optionalText(value.repoRoot);\n const groupingRoot = optionalText(value.groupingRoot);\n if (value.repoRoot !== undefined && (!repoRoot || !path.isAbsolute(repoRoot))) return undefined;\n if (value.groupingRoot !== undefined && (!groupingRoot || !path.isAbsolute(groupingRoot))) return undefined;\n return {\n sessionId,\n workspaceId,\n cwd,\n ...(repoRoot === undefined ? {} : { repoRoot }),\n ...(groupingRoot === undefined ? {} : { groupingRoot }),\n name,\n createdAt,\n ...(parentSessionId === undefined ? {} : { parentSessionId }),\n ...(sessionProvenance === undefined ? {} : { sessionProvenance }),\n ...(Array.isArray(value.groups)\n ? { groups: value.groups.filter((group): group is string => typeof group === 'string') }\n : {}),\n };\n}\n\n/** Parses registry file text; unusable content is reported and dropped. */\nexport function parseOpenSessionRecords(\n raw: string,\n filePath: string,\n notice: (message: string) => void,\n): OpenSessionRecord[] {\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch {\n // Left in place rather than rewritten: a file somebody hand-edited is\n // worth more as evidence than as something this process silently repairs.\n notice(`open sessions at ${filePath} are not valid JSON; none will be restored`);\n return [];\n }\n if (!Array.isArray(parsed)) {\n notice(`open sessions at ${filePath} are not a list; none will be restored`);\n return [];\n }\n const records: OpenSessionRecord[] = [];\n for (const entry of parsed) {\n const record = parseRecord(entry);\n if (record === undefined) notice(`open sessions at ${filePath} contain an unusable entry; skipping it`);\n else records.push(record);\n }\n return records;\n}\n\nexport function serializeOpenSessionRecords(records: readonly OpenSessionRecord[]): string {\n return `${JSON.stringify(records, undefined, 2)}\\n`;\n}\n\nexport function assertOpenSessionRecord(record: OpenSessionRecord): void {\n if (!SESSION_ID_PATTERN.test(record.sessionId)) throw new Error(`Invalid session id '${record.sessionId}'.`);\n for (const directory of [record.cwd, record.repoRoot, record.groupingRoot]) {\n if (directory !== undefined && !path.isAbsolute(directory))\n throw new Error('Session directories must be absolute.');\n }\n}\n"],"mappings":";;;;AAEA,MAAa,gBAAgB;;AAI7B,MAAa,qBAAqB;AAgClC,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAS,aAAa,OAAoC;CACxD,OAAO,OAAO,UAAU,YAAY,UAAU,KAAK,QAAQ,KAAA;AAC7D;;;;;;;;;AAUA,SAAS,YAAY,OAA+C;CAClE,IAAI,CAAC,SAAS,KAAK,GAAG,OAAO,KAAA;CAC7B,MAAM,EAAE,WAAW,aAAa,KAAK,MAAM,cAAc;CACzD,IAAI,OAAO,cAAc,YAAY,CAAC,mBAAmB,KAAK,SAAS,GAAG,OAAO,KAAA;CACjF,IAAI,OAAO,gBAAgB,YAAY,gBAAgB,IAAI,OAAO,KAAA;CAClE,IAAI,OAAO,QAAQ,YAAY,CAACA,UAAAA,QAAK,WAAW,GAAG,GAAG,OAAO,KAAA;CAC7D,IAAI,OAAO,SAAS,YAAY,OAAO,cAAc,UAAU,OAAO,KAAA;CACtE,MAAM,kBAAkB,aAAa,MAAM,eAAe;CAC1D,MAAM,oBAAoB,aAAa,MAAM,iBAAiB;CAC9D,MAAM,WAAW,aAAa,MAAM,QAAQ;CAC5C,MAAM,eAAe,aAAa,MAAM,YAAY;CACpD,IAAI,MAAM,aAAa,KAAA,MAAc,CAAC,YAAY,CAACA,UAAAA,QAAK,WAAW,QAAQ,IAAI,OAAO,KAAA;CACtF,IAAI,MAAM,iBAAiB,KAAA,MAAc,CAAC,gBAAgB,CAACA,UAAAA,QAAK,WAAW,YAAY,IAAI,OAAO,KAAA;CAClG,OAAO;EACL;EACA;EACA;EACA,GAAI,aAAa,KAAA,IAAY,CAAC,IAAI,EAAE,SAAS;EAC7C,GAAI,iBAAiB,KAAA,IAAY,CAAC,IAAI,EAAE,aAAa;EACrD;EACA;EACA,GAAI,oBAAoB,KAAA,IAAY,CAAC,IAAI,EAAE,gBAAgB;EAC3D,GAAI,sBAAsB,KAAA,IAAY,CAAC,IAAI,EAAE,kBAAkB;EAC/D,GAAI,MAAM,QAAQ,MAAM,MAAM,IAC1B,EAAE,QAAQ,MAAM,OAAO,QAAQ,UAA2B,OAAO,UAAU,QAAQ,EAAE,IACrF,CAAC;CACP;AACF;;AAGA,SAAgB,wBACd,KACA,UACA,QACqB;CACrB,IAAI;CACJ,IAAI;EACF,SAAS,KAAK,MAAM,GAAG;CACzB,QAAQ;EAGN,OAAO,oBAAoB,SAAS,2CAA2C;EAC/E,OAAO,CAAC;CACV;CACA,IAAI,CAAC,MAAM,QAAQ,MAAM,GAAG;EAC1B,OAAO,oBAAoB,SAAS,uCAAuC;EAC3E,OAAO,CAAC;CACV;CACA,MAAM,UAA+B,CAAC;CACtC,KAAK,MAAM,SAAS,QAAQ;EAC1B,MAAM,SAAS,YAAY,KAAK;EAChC,IAAI,WAAW,KAAA,GAAW,OAAO,oBAAoB,SAAS,wCAAwC;OACjG,QAAQ,KAAK,MAAM;CAC1B;CACA,OAAO;AACT;AAEA,SAAgB,4BAA4B,SAA+C;CACzF,OAAO,GAAG,KAAK,UAAU,SAAS,KAAA,GAAW,CAAC,EAAE;AAClD;AAEA,SAAgB,wBAAwB,QAAiC;CACvE,IAAI,CAAC,mBAAmB,KAAK,OAAO,SAAS,GAAG,MAAM,IAAI,MAAM,uBAAuB,OAAO,UAAU,GAAG;CAC3G,KAAK,MAAM,aAAa;EAAC,OAAO;EAAK,OAAO;EAAU,OAAO;CAAY,GACvE,IAAI,cAAc,KAAA,KAAa,CAACA,UAAAA,QAAK,WAAW,SAAS,GACvD,MAAM,IAAI,MAAM,uCAAuC;AAE7D"}
@@ -0,0 +1,30 @@
1
+ //#region src/services/openSessionRegistry/openSessionRecords.d.ts
2
+ /** One cockpit session the server had open, enough to reopen its journal by id. */
3
+ export interface OpenSessionRecord {
4
+ sessionId: string;
5
+ workspaceId: string;
6
+ cwd: string;
7
+ /** Child checkout root, distinct from the parent grouping root for worktrees. */
8
+ repoRoot?: string;
9
+ /** Parent workspace path used only to restore the workspace identity. */
10
+ groupingRoot?: string;
11
+ name: string;
12
+ createdAt: string;
13
+ parentSessionId?: string;
14
+ sessionProvenance?: string;
15
+ /** Mirrors the journal's groups so the rail can show them while the session is dormant. */
16
+ groups?: readonly string[];
17
+ }
18
+ export interface OpenSessionRegistry {
19
+ list(): readonly OpenSessionRecord[];
20
+ /** True only after the record is durably published. */
21
+ add(record: OpenSessionRecord): boolean;
22
+ remove(sessionId: string): void;
23
+ }
24
+ export interface OpenSessionRegistryOptions {
25
+ /** Directory holding the `sessions` journal folder, so the registry sits beside what it points at. */
26
+ directory: string;
27
+ onNotice?: (message: string) => void;
28
+ }
29
+ //#endregion
30
+ //# sourceMappingURL=openSessionRecords.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openSessionRecords.d.mts","names":[],"sources":["../../../../src/services/openSessionRegistry/openSessionRecords.ts"],"mappings":";;iBASiB;EACf;EACA;EACA;;EAEA;;EAEA;EACA;EACA;EACA;EACA;;EAEA;;iBAGe;EACf,iBAAiB;;EAEjB,IAAI,QAAQ;EACZ,OAAO;;iBAGQ;;EAEf;EACA,YAAY"}
@@ -0,0 +1,81 @@
1
+ import path from "node:path";
2
+ //#region src/services/openSessionRegistry/openSessionRecords.ts
3
+ const REGISTRY_FILE = "open-sessions.json";
4
+ /** The id becomes a journal filename, so it is constrained exactly as SQLite storage constrains it. */
5
+ const SESSION_ID_PATTERN = /^[A-Za-z0-9_-]+$/u;
6
+ function isRecord(value) {
7
+ return typeof value === "object" && value !== null && !Array.isArray(value);
8
+ }
9
+ function optionalText(value) {
10
+ return typeof value === "string" && value !== "" ? value : void 0;
11
+ }
12
+ /**
13
+ * Reads one entry, or nothing.
14
+ *
15
+ * The file is editable by hand and its session id is joined into a journal
16
+ * path, so it is a trust boundary rather than trusted state this process wrote.
17
+ * A bad entry is dropped instead of narrowing the whole file to nothing. A legacy
18
+ * `artifact` (the worktree's pinned sync generation) is ignored: sessions compose live.
19
+ */
20
+ function parseRecord(value) {
21
+ if (!isRecord(value)) return void 0;
22
+ const { sessionId, workspaceId, cwd, name, createdAt } = value;
23
+ if (typeof sessionId !== "string" || !SESSION_ID_PATTERN.test(sessionId)) return void 0;
24
+ if (typeof workspaceId !== "string" || workspaceId === "") return void 0;
25
+ if (typeof cwd !== "string" || !path.isAbsolute(cwd)) return void 0;
26
+ if (typeof name !== "string" || typeof createdAt !== "string") return void 0;
27
+ const parentSessionId = optionalText(value.parentSessionId);
28
+ const sessionProvenance = optionalText(value.sessionProvenance);
29
+ const repoRoot = optionalText(value.repoRoot);
30
+ const groupingRoot = optionalText(value.groupingRoot);
31
+ if (value.repoRoot !== void 0 && (!repoRoot || !path.isAbsolute(repoRoot))) return void 0;
32
+ if (value.groupingRoot !== void 0 && (!groupingRoot || !path.isAbsolute(groupingRoot))) return void 0;
33
+ return {
34
+ sessionId,
35
+ workspaceId,
36
+ cwd,
37
+ ...repoRoot === void 0 ? {} : { repoRoot },
38
+ ...groupingRoot === void 0 ? {} : { groupingRoot },
39
+ name,
40
+ createdAt,
41
+ ...parentSessionId === void 0 ? {} : { parentSessionId },
42
+ ...sessionProvenance === void 0 ? {} : { sessionProvenance },
43
+ ...Array.isArray(value.groups) ? { groups: value.groups.filter((group) => typeof group === "string") } : {}
44
+ };
45
+ }
46
+ /** Parses registry file text; unusable content is reported and dropped. */
47
+ function parseOpenSessionRecords(raw, filePath, notice) {
48
+ let parsed;
49
+ try {
50
+ parsed = JSON.parse(raw);
51
+ } catch {
52
+ notice(`open sessions at ${filePath} are not valid JSON; none will be restored`);
53
+ return [];
54
+ }
55
+ if (!Array.isArray(parsed)) {
56
+ notice(`open sessions at ${filePath} are not a list; none will be restored`);
57
+ return [];
58
+ }
59
+ const records = [];
60
+ for (const entry of parsed) {
61
+ const record = parseRecord(entry);
62
+ if (record === void 0) notice(`open sessions at ${filePath} contain an unusable entry; skipping it`);
63
+ else records.push(record);
64
+ }
65
+ return records;
66
+ }
67
+ function serializeOpenSessionRecords(records) {
68
+ return `${JSON.stringify(records, void 0, 2)}\n`;
69
+ }
70
+ function assertOpenSessionRecord(record) {
71
+ if (!SESSION_ID_PATTERN.test(record.sessionId)) throw new Error(`Invalid session id '${record.sessionId}'.`);
72
+ for (const directory of [
73
+ record.cwd,
74
+ record.repoRoot,
75
+ record.groupingRoot
76
+ ]) if (directory !== void 0 && !path.isAbsolute(directory)) throw new Error("Session directories must be absolute.");
77
+ }
78
+ //#endregion
79
+ export { REGISTRY_FILE, SESSION_ID_PATTERN, assertOpenSessionRecord, parseOpenSessionRecords, serializeOpenSessionRecords };
80
+
81
+ //# sourceMappingURL=openSessionRecords.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openSessionRecords.mjs","names":[],"sources":["../../../../src/services/openSessionRegistry/openSessionRecords.ts"],"sourcesContent":["import path from 'node:path';\n\nexport const REGISTRY_FILE = 'open-sessions.json';\nexport const DIRECTORY_MODE = 0o700;\nexport const FILE_MODE = 0o600;\n/** The id becomes a journal filename, so it is constrained exactly as SQLite storage constrains it. */\nexport const SESSION_ID_PATTERN = /^[A-Za-z0-9_-]+$/u;\n\n/** One cockpit session the server had open, enough to reopen its journal by id. */\nexport interface OpenSessionRecord {\n sessionId: string;\n workspaceId: string;\n cwd: string;\n /** Child checkout root, distinct from the parent grouping root for worktrees. */\n repoRoot?: string;\n /** Parent workspace path used only to restore the workspace identity. */\n groupingRoot?: string;\n name: string;\n createdAt: string;\n parentSessionId?: string;\n sessionProvenance?: string;\n /** Mirrors the journal's groups so the rail can show them while the session is dormant. */\n groups?: readonly string[];\n}\n\nexport interface OpenSessionRegistry {\n list(): readonly OpenSessionRecord[];\n /** True only after the record is durably published. */\n add(record: OpenSessionRecord): boolean;\n remove(sessionId: string): void;\n}\n\nexport interface OpenSessionRegistryOptions {\n /** Directory holding the `sessions` journal folder, so the registry sits beside what it points at. */\n directory: string;\n onNotice?: (message: string) => void;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction optionalText(value: unknown): string | undefined {\n return typeof value === 'string' && value !== '' ? value : undefined;\n}\n\n/**\n * Reads one entry, or nothing.\n *\n * The file is editable by hand and its session id is joined into a journal\n * path, so it is a trust boundary rather than trusted state this process wrote.\n * A bad entry is dropped instead of narrowing the whole file to nothing. A legacy\n * `artifact` (the worktree's pinned sync generation) is ignored: sessions compose live.\n */\nfunction parseRecord(value: unknown): OpenSessionRecord | undefined {\n if (!isRecord(value)) return undefined;\n const { sessionId, workspaceId, cwd, name, createdAt } = value;\n if (typeof sessionId !== 'string' || !SESSION_ID_PATTERN.test(sessionId)) return undefined;\n if (typeof workspaceId !== 'string' || workspaceId === '') return undefined;\n if (typeof cwd !== 'string' || !path.isAbsolute(cwd)) return undefined;\n if (typeof name !== 'string' || typeof createdAt !== 'string') return undefined;\n const parentSessionId = optionalText(value.parentSessionId);\n const sessionProvenance = optionalText(value.sessionProvenance);\n const repoRoot = optionalText(value.repoRoot);\n const groupingRoot = optionalText(value.groupingRoot);\n if (value.repoRoot !== undefined && (!repoRoot || !path.isAbsolute(repoRoot))) return undefined;\n if (value.groupingRoot !== undefined && (!groupingRoot || !path.isAbsolute(groupingRoot))) return undefined;\n return {\n sessionId,\n workspaceId,\n cwd,\n ...(repoRoot === undefined ? {} : { repoRoot }),\n ...(groupingRoot === undefined ? {} : { groupingRoot }),\n name,\n createdAt,\n ...(parentSessionId === undefined ? {} : { parentSessionId }),\n ...(sessionProvenance === undefined ? {} : { sessionProvenance }),\n ...(Array.isArray(value.groups)\n ? { groups: value.groups.filter((group): group is string => typeof group === 'string') }\n : {}),\n };\n}\n\n/** Parses registry file text; unusable content is reported and dropped. */\nexport function parseOpenSessionRecords(\n raw: string,\n filePath: string,\n notice: (message: string) => void,\n): OpenSessionRecord[] {\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch {\n // Left in place rather than rewritten: a file somebody hand-edited is\n // worth more as evidence than as something this process silently repairs.\n notice(`open sessions at ${filePath} are not valid JSON; none will be restored`);\n return [];\n }\n if (!Array.isArray(parsed)) {\n notice(`open sessions at ${filePath} are not a list; none will be restored`);\n return [];\n }\n const records: OpenSessionRecord[] = [];\n for (const entry of parsed) {\n const record = parseRecord(entry);\n if (record === undefined) notice(`open sessions at ${filePath} contain an unusable entry; skipping it`);\n else records.push(record);\n }\n return records;\n}\n\nexport function serializeOpenSessionRecords(records: readonly OpenSessionRecord[]): string {\n return `${JSON.stringify(records, undefined, 2)}\\n`;\n}\n\nexport function assertOpenSessionRecord(record: OpenSessionRecord): void {\n if (!SESSION_ID_PATTERN.test(record.sessionId)) throw new Error(`Invalid session id '${record.sessionId}'.`);\n for (const directory of [record.cwd, record.repoRoot, record.groupingRoot]) {\n if (directory !== undefined && !path.isAbsolute(directory))\n throw new Error('Session directories must be absolute.');\n }\n}\n"],"mappings":";;AAEA,MAAa,gBAAgB;;AAI7B,MAAa,qBAAqB;AAgClC,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAS,aAAa,OAAoC;CACxD,OAAO,OAAO,UAAU,YAAY,UAAU,KAAK,QAAQ,KAAA;AAC7D;;;;;;;;;AAUA,SAAS,YAAY,OAA+C;CAClE,IAAI,CAAC,SAAS,KAAK,GAAG,OAAO,KAAA;CAC7B,MAAM,EAAE,WAAW,aAAa,KAAK,MAAM,cAAc;CACzD,IAAI,OAAO,cAAc,YAAY,CAAC,mBAAmB,KAAK,SAAS,GAAG,OAAO,KAAA;CACjF,IAAI,OAAO,gBAAgB,YAAY,gBAAgB,IAAI,OAAO,KAAA;CAClE,IAAI,OAAO,QAAQ,YAAY,CAAC,KAAK,WAAW,GAAG,GAAG,OAAO,KAAA;CAC7D,IAAI,OAAO,SAAS,YAAY,OAAO,cAAc,UAAU,OAAO,KAAA;CACtE,MAAM,kBAAkB,aAAa,MAAM,eAAe;CAC1D,MAAM,oBAAoB,aAAa,MAAM,iBAAiB;CAC9D,MAAM,WAAW,aAAa,MAAM,QAAQ;CAC5C,MAAM,eAAe,aAAa,MAAM,YAAY;CACpD,IAAI,MAAM,aAAa,KAAA,MAAc,CAAC,YAAY,CAAC,KAAK,WAAW,QAAQ,IAAI,OAAO,KAAA;CACtF,IAAI,MAAM,iBAAiB,KAAA,MAAc,CAAC,gBAAgB,CAAC,KAAK,WAAW,YAAY,IAAI,OAAO,KAAA;CAClG,OAAO;EACL;EACA;EACA;EACA,GAAI,aAAa,KAAA,IAAY,CAAC,IAAI,EAAE,SAAS;EAC7C,GAAI,iBAAiB,KAAA,IAAY,CAAC,IAAI,EAAE,aAAa;EACrD;EACA;EACA,GAAI,oBAAoB,KAAA,IAAY,CAAC,IAAI,EAAE,gBAAgB;EAC3D,GAAI,sBAAsB,KAAA,IAAY,CAAC,IAAI,EAAE,kBAAkB;EAC/D,GAAI,MAAM,QAAQ,MAAM,MAAM,IAC1B,EAAE,QAAQ,MAAM,OAAO,QAAQ,UAA2B,OAAO,UAAU,QAAQ,EAAE,IACrF,CAAC;CACP;AACF;;AAGA,SAAgB,wBACd,KACA,UACA,QACqB;CACrB,IAAI;CACJ,IAAI;EACF,SAAS,KAAK,MAAM,GAAG;CACzB,QAAQ;EAGN,OAAO,oBAAoB,SAAS,2CAA2C;EAC/E,OAAO,CAAC;CACV;CACA,IAAI,CAAC,MAAM,QAAQ,MAAM,GAAG;EAC1B,OAAO,oBAAoB,SAAS,uCAAuC;EAC3E,OAAO,CAAC;CACV;CACA,MAAM,UAA+B,CAAC;CACtC,KAAK,MAAM,SAAS,QAAQ;EAC1B,MAAM,SAAS,YAAY,KAAK;EAChC,IAAI,WAAW,KAAA,GAAW,OAAO,oBAAoB,SAAS,wCAAwC;OACjG,QAAQ,KAAK,MAAM;CAC1B;CACA,OAAO;AACT;AAEA,SAAgB,4BAA4B,SAA+C;CACzF,OAAO,GAAG,KAAK,UAAU,SAAS,KAAA,GAAW,CAAC,EAAE;AAClD;AAEA,SAAgB,wBAAwB,QAAiC;CACvE,IAAI,CAAC,mBAAmB,KAAK,OAAO,SAAS,GAAG,MAAM,IAAI,MAAM,uBAAuB,OAAO,UAAU,GAAG;CAC3G,KAAK,MAAM,aAAa;EAAC,OAAO;EAAK,OAAO;EAAU,OAAO;CAAY,GACvE,IAAI,cAAc,KAAA,KAAa,CAAC,KAAK,WAAW,SAAS,GACvD,MAAM,IAAI,MAAM,uCAAuC;AAE7D"}
@@ -0,0 +1,71 @@
1
+ const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
2
+ const require_openSessionRecords = require("./openSessionRecords.cjs");
3
+ let node_fs = require("node:fs");
4
+ node_fs = require_runtime.__toESM(node_fs, 1);
5
+ let node_path = require("node:path");
6
+ node_path = require_runtime.__toESM(node_path, 1);
7
+ //#region src/services/openSessionRegistry/sync.ts
8
+ /**
9
+ * The sessions the cockpit had open, so a server restart can offer them back.
10
+ *
11
+ * Journals already survive a restart; what does not is the knowledge of which
12
+ * of them were open rather than merely finished. Without that, a restart either
13
+ * loses every session or revives every thread ever recorded.
14
+ *
15
+ * @deprecated Node-only sync shim; use createOpenSessionRegistryAsync. Removed in M2.
16
+ */
17
+ function createOpenSessionRegistry(options) {
18
+ const notice = options.onNotice ?? (() => {});
19
+ const filePath = node_path.default.join(options.directory, require_openSessionRecords.REGISTRY_FILE);
20
+ const load = () => {
21
+ let raw;
22
+ try {
23
+ raw = node_fs.default.readFileSync(filePath, "utf8");
24
+ } catch {
25
+ return [];
26
+ }
27
+ return require_openSessionRecords.parseOpenSessionRecords(raw, filePath, notice);
28
+ };
29
+ let current = load();
30
+ const persist = (next) => {
31
+ const temporary = `${filePath}.${String(process.pid)}.tmp`;
32
+ try {
33
+ node_fs.default.mkdirSync(options.directory, {
34
+ recursive: true,
35
+ mode: 448
36
+ });
37
+ const descriptor = node_fs.default.openSync(temporary, "w", 384);
38
+ try {
39
+ node_fs.default.writeFileSync(descriptor, require_openSessionRecords.serializeOpenSessionRecords(next));
40
+ node_fs.default.fsyncSync(descriptor);
41
+ } finally {
42
+ node_fs.default.closeSync(descriptor);
43
+ }
44
+ node_fs.default.renameSync(temporary, filePath);
45
+ current = next;
46
+ return true;
47
+ } catch (error) {
48
+ notice(`${filePath} could not be saved: ${error instanceof Error ? error.message : String(error)}`);
49
+ try {
50
+ node_fs.default.rmSync(temporary, { force: true });
51
+ } catch {}
52
+ return false;
53
+ }
54
+ };
55
+ return {
56
+ list: () => current,
57
+ add(record) {
58
+ require_openSessionRecords.assertOpenSessionRecord(record);
59
+ return persist([...current.filter((held) => held.sessionId !== record.sessionId), record]);
60
+ },
61
+ remove(sessionId) {
62
+ const next = current.filter((held) => held.sessionId !== sessionId);
63
+ if (next.length === current.length) return;
64
+ persist(next);
65
+ }
66
+ };
67
+ }
68
+ //#endregion
69
+ exports.createOpenSessionRegistry = createOpenSessionRegistry;
70
+
71
+ //# sourceMappingURL=sync.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.cjs","names":["path","REGISTRY_FILE","fs","parseOpenSessionRecords","serializeOpenSessionRecords"],"sources":["../../../../src/services/openSessionRegistry/sync.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\nimport {\n assertOpenSessionRecord,\n DIRECTORY_MODE,\n FILE_MODE,\n parseOpenSessionRecords,\n REGISTRY_FILE,\n serializeOpenSessionRecords,\n type OpenSessionRecord,\n type OpenSessionRegistry,\n type OpenSessionRegistryOptions,\n} from './openSessionRecords';\n\n/**\n * The sessions the cockpit had open, so a server restart can offer them back.\n *\n * Journals already survive a restart; what does not is the knowledge of which\n * of them were open rather than merely finished. Without that, a restart either\n * loses every session or revives every thread ever recorded.\n *\n * @deprecated Node-only sync shim; use createOpenSessionRegistryAsync. Removed in M2.\n */\nexport function createOpenSessionRegistry(options: OpenSessionRegistryOptions): OpenSessionRegistry {\n const notice = options.onNotice ?? ((): void => {});\n const filePath = path.join(options.directory, REGISTRY_FILE);\n\n const load = (): OpenSessionRecord[] => {\n let raw: string;\n try {\n raw = fs.readFileSync(filePath, 'utf8');\n } catch {\n // No file is the normal first run, so this is not worth a notice.\n return [];\n }\n return parseOpenSessionRecords(raw, filePath, notice);\n };\n\n let current = load();\n\n const persist = (next: OpenSessionRecord[]): boolean => {\n const temporary = `${filePath}.${String(process.pid)}.tmp`;\n try {\n fs.mkdirSync(options.directory, { recursive: true, mode: DIRECTORY_MODE });\n const descriptor = fs.openSync(temporary, 'w', FILE_MODE);\n try {\n fs.writeFileSync(descriptor, serializeOpenSessionRecords(next));\n fs.fsyncSync(descriptor);\n } finally {\n fs.closeSync(descriptor);\n }\n // Rename rather than write in place, so a crash mid-write leaves the\n // previous contents rather than a truncated file.\n fs.renameSync(temporary, filePath);\n current = next;\n return true;\n } catch (error) {\n notice(`${filePath} could not be saved: ${error instanceof Error ? error.message : String(error)}`);\n try {\n fs.rmSync(temporary, { force: true });\n } catch {\n // Nothing further to do; the temp file is inert either way.\n }\n return false;\n }\n };\n\n return {\n list: () => current,\n add(record) {\n assertOpenSessionRecord(record);\n return persist([...current.filter((held) => held.sessionId !== record.sessionId), record]);\n },\n remove(sessionId) {\n const next = current.filter((held) => held.sessionId !== sessionId);\n if (next.length === current.length) return;\n persist(next);\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,SAAgB,0BAA0B,SAA0D;CAClG,MAAM,SAAS,QAAQ,mBAAyB,CAAC;CACjD,MAAM,WAAWA,UAAAA,QAAK,KAAK,QAAQ,WAAWC,2BAAAA,aAAa;CAE3D,MAAM,aAAkC;EACtC,IAAI;EACJ,IAAI;GACF,MAAMC,QAAAA,QAAG,aAAa,UAAU,MAAM;EACxC,QAAQ;GAEN,OAAO,CAAC;EACV;EACA,OAAOC,2BAAAA,wBAAwB,KAAK,UAAU,MAAM;CACtD;CAEA,IAAI,UAAU,KAAK;CAEnB,MAAM,WAAW,SAAuC;EACtD,MAAM,YAAY,GAAG,SAAS,GAAG,OAAO,QAAQ,GAAG,EAAE;EACrD,IAAI;GACF,QAAA,QAAG,UAAU,QAAQ,WAAW;IAAE,WAAW;IAAM,MAAA;GAAqB,CAAC;GACzE,MAAM,aAAaD,QAAAA,QAAG,SAAS,WAAW,KAAA,GAAc;GACxD,IAAI;IACF,QAAA,QAAG,cAAc,YAAYE,2BAAAA,4BAA4B,IAAI,CAAC;IAC9D,QAAA,QAAG,UAAU,UAAU;GACzB,UAAU;IACR,QAAA,QAAG,UAAU,UAAU;GACzB;GAGA,QAAA,QAAG,WAAW,WAAW,QAAQ;GACjC,UAAU;GACV,OAAO;EACT,SAAS,OAAO;GACd,OAAO,GAAG,SAAS,uBAAuB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,GAAG;GAClG,IAAI;IACF,QAAA,QAAG,OAAO,WAAW,EAAE,OAAO,KAAK,CAAC;GACtC,QAAQ,CAER;GACA,OAAO;EACT;CACF;CAEA,OAAO;EACL,YAAY;EACZ,IAAI,QAAQ;GACV,2BAAA,wBAAwB,MAAM;GAC9B,OAAO,QAAQ,CAAC,GAAG,QAAQ,QAAQ,SAAS,KAAK,cAAc,OAAO,SAAS,GAAG,MAAM,CAAC;EAC3F;EACA,OAAO,WAAW;GAChB,MAAM,OAAO,QAAQ,QAAQ,SAAS,KAAK,cAAc,SAAS;GAClE,IAAI,KAAK,WAAW,QAAQ,QAAQ;GACpC,QAAQ,IAAI;EACd;CACF;AACF"}
@@ -0,0 +1,14 @@
1
+ import { OpenSessionRegistry, OpenSessionRegistryOptions } from "./openSessionRecords.mjs";
2
+ //#region src/services/openSessionRegistry/sync.d.ts
3
+ /**
4
+ * The sessions the cockpit had open, so a server restart can offer them back.
5
+ *
6
+ * Journals already survive a restart; what does not is the knowledge of which
7
+ * of them were open rather than merely finished. Without that, a restart either
8
+ * loses every session or revives every thread ever recorded.
9
+ *
10
+ * @deprecated Node-only sync shim; use createOpenSessionRegistryAsync. Removed in M2.
11
+ */
12
+ export declare function createOpenSessionRegistry(options: OpenSessionRegistryOptions): OpenSessionRegistry;
13
+ //#endregion
14
+ //# sourceMappingURL=sync.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.d.mts","names":[],"sources":["../../../../src/services/openSessionRegistry/sync.ts"],"mappings":";;;;;;;;;;;wBAwBgB,0BAA0B,SAAS,6BAA6B"}
@@ -0,0 +1,68 @@
1
+ import { REGISTRY_FILE, assertOpenSessionRecord, parseOpenSessionRecords, serializeOpenSessionRecords } from "./openSessionRecords.mjs";
2
+ import fs from "node:fs";
3
+ import path from "node:path";
4
+ //#region src/services/openSessionRegistry/sync.ts
5
+ /**
6
+ * The sessions the cockpit had open, so a server restart can offer them back.
7
+ *
8
+ * Journals already survive a restart; what does not is the knowledge of which
9
+ * of them were open rather than merely finished. Without that, a restart either
10
+ * loses every session or revives every thread ever recorded.
11
+ *
12
+ * @deprecated Node-only sync shim; use createOpenSessionRegistryAsync. Removed in M2.
13
+ */
14
+ function createOpenSessionRegistry(options) {
15
+ const notice = options.onNotice ?? (() => {});
16
+ const filePath = path.join(options.directory, REGISTRY_FILE);
17
+ const load = () => {
18
+ let raw;
19
+ try {
20
+ raw = fs.readFileSync(filePath, "utf8");
21
+ } catch {
22
+ return [];
23
+ }
24
+ return parseOpenSessionRecords(raw, filePath, notice);
25
+ };
26
+ let current = load();
27
+ const persist = (next) => {
28
+ const temporary = `${filePath}.${String(process.pid)}.tmp`;
29
+ try {
30
+ fs.mkdirSync(options.directory, {
31
+ recursive: true,
32
+ mode: 448
33
+ });
34
+ const descriptor = fs.openSync(temporary, "w", 384);
35
+ try {
36
+ fs.writeFileSync(descriptor, serializeOpenSessionRecords(next));
37
+ fs.fsyncSync(descriptor);
38
+ } finally {
39
+ fs.closeSync(descriptor);
40
+ }
41
+ fs.renameSync(temporary, filePath);
42
+ current = next;
43
+ return true;
44
+ } catch (error) {
45
+ notice(`${filePath} could not be saved: ${error instanceof Error ? error.message : String(error)}`);
46
+ try {
47
+ fs.rmSync(temporary, { force: true });
48
+ } catch {}
49
+ return false;
50
+ }
51
+ };
52
+ return {
53
+ list: () => current,
54
+ add(record) {
55
+ assertOpenSessionRecord(record);
56
+ return persist([...current.filter((held) => held.sessionId !== record.sessionId), record]);
57
+ },
58
+ remove(sessionId) {
59
+ const next = current.filter((held) => held.sessionId !== sessionId);
60
+ if (next.length === current.length) return;
61
+ persist(next);
62
+ }
63
+ };
64
+ }
65
+ //#endregion
66
+ export { createOpenSessionRegistry };
67
+
68
+ //# sourceMappingURL=sync.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.mjs","names":[],"sources":["../../../../src/services/openSessionRegistry/sync.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\nimport {\n assertOpenSessionRecord,\n DIRECTORY_MODE,\n FILE_MODE,\n parseOpenSessionRecords,\n REGISTRY_FILE,\n serializeOpenSessionRecords,\n type OpenSessionRecord,\n type OpenSessionRegistry,\n type OpenSessionRegistryOptions,\n} from './openSessionRecords';\n\n/**\n * The sessions the cockpit had open, so a server restart can offer them back.\n *\n * Journals already survive a restart; what does not is the knowledge of which\n * of them were open rather than merely finished. Without that, a restart either\n * loses every session or revives every thread ever recorded.\n *\n * @deprecated Node-only sync shim; use createOpenSessionRegistryAsync. Removed in M2.\n */\nexport function createOpenSessionRegistry(options: OpenSessionRegistryOptions): OpenSessionRegistry {\n const notice = options.onNotice ?? ((): void => {});\n const filePath = path.join(options.directory, REGISTRY_FILE);\n\n const load = (): OpenSessionRecord[] => {\n let raw: string;\n try {\n raw = fs.readFileSync(filePath, 'utf8');\n } catch {\n // No file is the normal first run, so this is not worth a notice.\n return [];\n }\n return parseOpenSessionRecords(raw, filePath, notice);\n };\n\n let current = load();\n\n const persist = (next: OpenSessionRecord[]): boolean => {\n const temporary = `${filePath}.${String(process.pid)}.tmp`;\n try {\n fs.mkdirSync(options.directory, { recursive: true, mode: DIRECTORY_MODE });\n const descriptor = fs.openSync(temporary, 'w', FILE_MODE);\n try {\n fs.writeFileSync(descriptor, serializeOpenSessionRecords(next));\n fs.fsyncSync(descriptor);\n } finally {\n fs.closeSync(descriptor);\n }\n // Rename rather than write in place, so a crash mid-write leaves the\n // previous contents rather than a truncated file.\n fs.renameSync(temporary, filePath);\n current = next;\n return true;\n } catch (error) {\n notice(`${filePath} could not be saved: ${error instanceof Error ? error.message : String(error)}`);\n try {\n fs.rmSync(temporary, { force: true });\n } catch {\n // Nothing further to do; the temp file is inert either way.\n }\n return false;\n }\n };\n\n return {\n list: () => current,\n add(record) {\n assertOpenSessionRecord(record);\n return persist([...current.filter((held) => held.sessionId !== record.sessionId), record]);\n },\n remove(sessionId) {\n const next = current.filter((held) => held.sessionId !== sessionId);\n if (next.length === current.length) return;\n persist(next);\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAwBA,SAAgB,0BAA0B,SAA0D;CAClG,MAAM,SAAS,QAAQ,mBAAyB,CAAC;CACjD,MAAM,WAAW,KAAK,KAAK,QAAQ,WAAW,aAAa;CAE3D,MAAM,aAAkC;EACtC,IAAI;EACJ,IAAI;GACF,MAAM,GAAG,aAAa,UAAU,MAAM;EACxC,QAAQ;GAEN,OAAO,CAAC;EACV;EACA,OAAO,wBAAwB,KAAK,UAAU,MAAM;CACtD;CAEA,IAAI,UAAU,KAAK;CAEnB,MAAM,WAAW,SAAuC;EACtD,MAAM,YAAY,GAAG,SAAS,GAAG,OAAO,QAAQ,GAAG,EAAE;EACrD,IAAI;GACF,GAAG,UAAU,QAAQ,WAAW;IAAE,WAAW;IAAM,MAAA;GAAqB,CAAC;GACzE,MAAM,aAAa,GAAG,SAAS,WAAW,KAAA,GAAc;GACxD,IAAI;IACF,GAAG,cAAc,YAAY,4BAA4B,IAAI,CAAC;IAC9D,GAAG,UAAU,UAAU;GACzB,UAAU;IACR,GAAG,UAAU,UAAU;GACzB;GAGA,GAAG,WAAW,WAAW,QAAQ;GACjC,UAAU;GACV,OAAO;EACT,SAAS,OAAO;GACd,OAAO,GAAG,SAAS,uBAAuB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,GAAG;GAClG,IAAI;IACF,GAAG,OAAO,WAAW,EAAE,OAAO,KAAK,CAAC;GACtC,QAAQ,CAER;GACA,OAAO;EACT;CACF;CAEA,OAAO;EACL,YAAY;EACZ,IAAI,QAAQ;GACV,wBAAwB,MAAM;GAC9B,OAAO,QAAQ,CAAC,GAAG,QAAQ,QAAQ,SAAS,KAAK,cAAc,OAAO,SAAS,GAAG,MAAM,CAAC;EAC3F;EACA,OAAO,WAAW;GAChB,MAAM,OAAO,QAAQ,QAAQ,SAAS,KAAK,cAAc,SAAS;GAClE,IAAI,KAAK,WAAW,QAAQ,QAAQ;GACpC,QAAQ,IAAI;EACd;CACF;AACF"}
@@ -7,7 +7,7 @@ const ORIGIN = "http://host";
7
7
  function mountPackageApi(api, options = {}) {
8
8
  const scope = options.scope ?? DEFAULT_SCOPE;
9
9
  const notices = [];
10
- const mountPath = `${require_packageApi.DOOM_API_ROUTE_PREFIX}/${api.basePath}`;
10
+ const mountPath = `${require_packageApi.PO_API_ROUTE_PREFIX}/${api.basePath}`;
11
11
  const context = {
12
12
  scope,
13
13
  ...scope === "session" ? {
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["DOOM_API_ROUTE_PREFIX"],"sources":["../../../../src/services/packageApiHarness/index.ts"],"sourcesContent":["import type { DoomDirectEventBus } from '../../schemas/hubChannel';\nimport {\n type DoomApi,\n type DoomApiContext,\n type DoomApiHandler,\n DOOM_API_ROUTE_PREFIX,\n type DoomApiScope,\n} from '../../schemas/packageApi';\n\n/**\n * A package's HTTP surface, mounted the way a host mounts it.\n *\n * A package tests its routes by calling its Hono app directly, which proves the\n * routes but not the mount: the host serves them under\n * `/api/plugins/<basePath>` and strips that prefix before the app sees the\n * request. A package whose routes are written absolute passes its own suite and\n * answers nothing in a running cockpit.\n *\n * This mounts the declared `DoomApi` the same way, so a test asks for the URL a\n * browser would ask for. Plain `Request` and `Response`; no HTTP framework and\n * no server.\n */\n\nexport interface MountPackageApiOptions {\n scope?: DoomApiScope;\n sessionId?: string;\n cwd?: string;\n directEvents?: DoomDirectEventBus;\n}\n\nexport interface MountedPackageApi {\n /** Where the host mounted it, for building a URL the way a client does. */\n readonly mountPath: string;\n /** What the API reported to its host; a package that notices nothing leaves this empty. */\n readonly notices: readonly string[];\n /**\n * Fetches one path.\n *\n * The path is host-absolute, so it carries the mount the client would send:\n * `/api/plugins/workflow/runs/repo/blog-4`. A path outside the mount is a 404\n * from this, exactly as it is from the host.\n */\n fetch(path: string, init?: RequestInit): Promise<Response>;\n close(): void;\n}\n\nconst DEFAULT_SCOPE: DoomApiScope = 'global';\nconst DEFAULT_CWD = '/repo';\n/** Any origin will do: the host routes on path, and a Request needs an absolute URL. */\nconst ORIGIN = 'http://host';\n\nexport function mountPackageApi(api: DoomApi, options: MountPackageApiOptions = {}): MountedPackageApi {\n const scope = options.scope ?? DEFAULT_SCOPE;\n const notices: string[] = [];\n const mountPath = `${DOOM_API_ROUTE_PREFIX}/${api.basePath}`;\n const context: DoomApiContext = {\n scope,\n // A session-scoped host knows both; a hub-scoped one knows neither, and an\n // API that reads them anyway should see the same undefined it would there.\n ...(scope === 'session' ? { sessionId: options.sessionId ?? 'test-session', cwd: options.cwd ?? DEFAULT_CWD } : {}),\n ...(options.directEvents ? { directEvents: options.directEvents } : {}),\n onNotice: (message) => notices.push(message),\n };\n const handler: DoomApiHandler = api.start(context);\n\n return {\n mountPath,\n notices,\n async fetch(path, init) {\n const url = new URL(path, ORIGIN);\n if (url.pathname !== mountPath && !url.pathname.startsWith(`${mountPath}/`)) {\n return new Response(`No package API is mounted at ${url.pathname}.`, { status: 404 });\n }\n // The host strips its own mount, so a package declares '/runs/:id' and\n // never repeats where it was mounted.\n url.pathname = url.pathname.slice(mountPath.length) || '/';\n return handler.fetch(new Request(url, init));\n },\n close: () => handler.close(),\n };\n}\n"],"mappings":";;AA8CA,MAAM,gBAA8B;AACpC,MAAM,cAAc;;AAEpB,MAAM,SAAS;AAEf,SAAgB,gBAAgB,KAAc,UAAkC,CAAC,GAAsB;CACrG,MAAM,QAAQ,QAAQ,SAAS;CAC/B,MAAM,UAAoB,CAAC;CAC3B,MAAM,YAAY,GAAGA,mBAAAA,sBAAsB,GAAG,IAAI;CAClD,MAAM,UAA0B;EAC9B;EAGA,GAAI,UAAU,YAAY;GAAE,WAAW,QAAQ,aAAa;GAAgB,KAAK,QAAQ,OAAO;EAAY,IAAI,CAAC;EACjH,GAAI,QAAQ,eAAe,EAAE,cAAc,QAAQ,aAAa,IAAI,CAAC;EACrE,WAAW,YAAY,QAAQ,KAAK,OAAO;CAC7C;CACA,MAAM,UAA0B,IAAI,MAAM,OAAO;CAEjD,OAAO;EACL;EACA;EACA,MAAM,MAAM,MAAM,MAAM;GACtB,MAAM,MAAM,IAAI,IAAI,MAAM,MAAM;GAChC,IAAI,IAAI,aAAa,aAAa,CAAC,IAAI,SAAS,WAAW,GAAG,UAAU,EAAE,GACxE,OAAO,IAAI,SAAS,gCAAgC,IAAI,SAAS,IAAI,EAAE,QAAQ,IAAI,CAAC;GAItF,IAAI,WAAW,IAAI,SAAS,MAAM,UAAU,MAAM,KAAK;GACvD,OAAO,QAAQ,MAAM,IAAI,QAAQ,KAAK,IAAI,CAAC;EAC7C;EACA,aAAa,QAAQ,MAAM;CAC7B;AACF"}
1
+ {"version":3,"file":"index.cjs","names":["PO_API_ROUTE_PREFIX"],"sources":["../../../../src/services/packageApiHarness/index.ts"],"sourcesContent":["import type { PoDirectEventBus } from '../../schemas/hubChannel';\nimport {\n type PoApi,\n type PoApiContext,\n type PoApiHandler,\n PO_API_ROUTE_PREFIX,\n type PoApiScope,\n} from '../../schemas/packageApi';\n\n/**\n * A package's HTTP surface, mounted the way a host mounts it.\n *\n * A package tests its routes by calling its Hono app directly, which proves the\n * routes but not the mount: the host serves them under\n * `/api/plugins/<basePath>` and strips that prefix before the app sees the\n * request. A package whose routes are written absolute passes its own suite and\n * answers nothing in a running cockpit.\n *\n * This mounts the declared `PoApi` the same way, so a test asks for the URL a\n * browser would ask for. Plain `Request` and `Response`; no HTTP framework and\n * no server.\n */\n\nexport interface MountPackageApiOptions {\n scope?: PoApiScope;\n sessionId?: string;\n cwd?: string;\n directEvents?: PoDirectEventBus;\n}\n\nexport interface MountedPackageApi {\n /** Where the host mounted it, for building a URL the way a client does. */\n readonly mountPath: string;\n /** What the API reported to its host; a package that notices nothing leaves this empty. */\n readonly notices: readonly string[];\n /**\n * Fetches one path.\n *\n * The path is host-absolute, so it carries the mount the client would send:\n * `/api/plugins/workflow/runs/repo/blog-4`. A path outside the mount is a 404\n * from this, exactly as it is from the host.\n */\n fetch(path: string, init?: RequestInit): Promise<Response>;\n close(): void;\n}\n\nconst DEFAULT_SCOPE: PoApiScope = 'global';\nconst DEFAULT_CWD = '/repo';\n/** Any origin will do: the host routes on path, and a Request needs an absolute URL. */\nconst ORIGIN = 'http://host';\n\nexport function mountPackageApi(api: PoApi, options: MountPackageApiOptions = {}): MountedPackageApi {\n const scope = options.scope ?? DEFAULT_SCOPE;\n const notices: string[] = [];\n const mountPath = `${PO_API_ROUTE_PREFIX}/${api.basePath}`;\n const context: PoApiContext = {\n scope,\n // A session-scoped host knows both; a hub-scoped one knows neither, and an\n // API that reads them anyway should see the same undefined it would there.\n ...(scope === 'session' ? { sessionId: options.sessionId ?? 'test-session', cwd: options.cwd ?? DEFAULT_CWD } : {}),\n ...(options.directEvents ? { directEvents: options.directEvents } : {}),\n onNotice: (message) => notices.push(message),\n };\n const handler: PoApiHandler = api.start(context);\n\n return {\n mountPath,\n notices,\n async fetch(path, init) {\n const url = new URL(path, ORIGIN);\n if (url.pathname !== mountPath && !url.pathname.startsWith(`${mountPath}/`)) {\n return new Response(`No package API is mounted at ${url.pathname}.`, { status: 404 });\n }\n // The host strips its own mount, so a package declares '/runs/:id' and\n // never repeats where it was mounted.\n url.pathname = url.pathname.slice(mountPath.length) || '/';\n return handler.fetch(new Request(url, init));\n },\n close: () => handler.close(),\n };\n}\n"],"mappings":";;AA8CA,MAAM,gBAA4B;AAClC,MAAM,cAAc;;AAEpB,MAAM,SAAS;AAEf,SAAgB,gBAAgB,KAAY,UAAkC,CAAC,GAAsB;CACnG,MAAM,QAAQ,QAAQ,SAAS;CAC/B,MAAM,UAAoB,CAAC;CAC3B,MAAM,YAAY,GAAGA,mBAAAA,oBAAoB,GAAG,IAAI;CAChD,MAAM,UAAwB;EAC5B;EAGA,GAAI,UAAU,YAAY;GAAE,WAAW,QAAQ,aAAa;GAAgB,KAAK,QAAQ,OAAO;EAAY,IAAI,CAAC;EACjH,GAAI,QAAQ,eAAe,EAAE,cAAc,QAAQ,aAAa,IAAI,CAAC;EACrE,WAAW,YAAY,QAAQ,KAAK,OAAO;CAC7C;CACA,MAAM,UAAwB,IAAI,MAAM,OAAO;CAE/C,OAAO;EACL;EACA;EACA,MAAM,MAAM,MAAM,MAAM;GACtB,MAAM,MAAM,IAAI,IAAI,MAAM,MAAM;GAChC,IAAI,IAAI,aAAa,aAAa,CAAC,IAAI,SAAS,WAAW,GAAG,UAAU,EAAE,GACxE,OAAO,IAAI,SAAS,gCAAgC,IAAI,SAAS,IAAI,EAAE,QAAQ,IAAI,CAAC;GAItF,IAAI,WAAW,IAAI,SAAS,MAAM,UAAU,MAAM,KAAK;GACvD,OAAO,QAAQ,MAAM,IAAI,QAAQ,KAAK,IAAI,CAAC;EAC7C;EACA,aAAa,QAAQ,MAAM;CAC7B;AACF"}
@@ -1,5 +1,5 @@
1
- import { DoomDirectEventBus } from "../../schemas/hubChannel.mjs";
2
- import { DoomApi, DoomApiScope } from "../../schemas/packageApi.mjs";
1
+ import { PoDirectEventBus } from "../../schemas/hubChannel.mjs";
2
+ import { PoApi, PoApiScope } from "../../schemas/packageApi.mjs";
3
3
  //#region src/services/packageApiHarness/index.d.ts
4
4
  /**
5
5
  * A package's HTTP surface, mounted the way a host mounts it.
@@ -10,15 +10,15 @@ import { DoomApi, DoomApiScope } from "../../schemas/packageApi.mjs";
10
10
  * request. A package whose routes are written absolute passes its own suite and
11
11
  * answers nothing in a running cockpit.
12
12
  *
13
- * This mounts the declared `DoomApi` the same way, so a test asks for the URL a
13
+ * This mounts the declared `PoApi` the same way, so a test asks for the URL a
14
14
  * browser would ask for. Plain `Request` and `Response`; no HTTP framework and
15
15
  * no server.
16
16
  */
17
17
  export interface MountPackageApiOptions {
18
- scope?: DoomApiScope;
18
+ scope?: PoApiScope;
19
19
  sessionId?: string;
20
20
  cwd?: string;
21
- directEvents?: DoomDirectEventBus;
21
+ directEvents?: PoDirectEventBus;
22
22
  }
23
23
  export interface MountedPackageApi {
24
24
  /** Where the host mounted it, for building a URL the way a client does. */
@@ -35,6 +35,6 @@ export interface MountedPackageApi {
35
35
  fetch(path: string, init?: RequestInit): Promise<Response>;
36
36
  close(): void;
37
37
  }
38
- export declare function mountPackageApi(api: DoomApi, options?: MountPackageApiOptions): MountedPackageApi;
38
+ export declare function mountPackageApi(api: PoApi, options?: MountPackageApiOptions): MountedPackageApi;
39
39
  //#endregion
40
40
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/services/packageApiHarness/index.ts"],"mappings":";;;;;;;;;;;;;;;;iBAuBiB;EACf,QAAQ;EACR;EACA;EACA,eAAe;;iBAGA;;WAEN;;WAEA;;;;;;;;EAQT,MAAM,cAAc,OAAO,cAAc,QAAQ;EACjD;;wBAQc,gBAAgB,KAAK,SAAS,UAAS,yBAA8B"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/services/packageApiHarness/index.ts"],"mappings":";;;;;;;;;;;;;;;;iBAuBiB;EACf,QAAQ;EACR;EACA;EACA,eAAe;;iBAGA;;WAEN;;WAEA;;;;;;;;EAQT,MAAM,cAAc,OAAO,cAAc,QAAQ;EACjD;;wBAQc,gBAAgB,KAAK,OAAO,UAAS,yBAA8B"}
@@ -1,4 +1,4 @@
1
- import { DOOM_API_ROUTE_PREFIX } from "../../schemas/packageApi.mjs";
1
+ import { PO_API_ROUTE_PREFIX } from "../../schemas/packageApi.mjs";
2
2
  //#region src/services/packageApiHarness/index.ts
3
3
  const DEFAULT_SCOPE = "global";
4
4
  const DEFAULT_CWD = "/repo";
@@ -7,7 +7,7 @@ const ORIGIN = "http://host";
7
7
  function mountPackageApi(api, options = {}) {
8
8
  const scope = options.scope ?? DEFAULT_SCOPE;
9
9
  const notices = [];
10
- const mountPath = `${DOOM_API_ROUTE_PREFIX}/${api.basePath}`;
10
+ const mountPath = `${PO_API_ROUTE_PREFIX}/${api.basePath}`;
11
11
  const context = {
12
12
  scope,
13
13
  ...scope === "session" ? {
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/services/packageApiHarness/index.ts"],"sourcesContent":["import type { DoomDirectEventBus } from '../../schemas/hubChannel';\nimport {\n type DoomApi,\n type DoomApiContext,\n type DoomApiHandler,\n DOOM_API_ROUTE_PREFIX,\n type DoomApiScope,\n} from '../../schemas/packageApi';\n\n/**\n * A package's HTTP surface, mounted the way a host mounts it.\n *\n * A package tests its routes by calling its Hono app directly, which proves the\n * routes but not the mount: the host serves them under\n * `/api/plugins/<basePath>` and strips that prefix before the app sees the\n * request. A package whose routes are written absolute passes its own suite and\n * answers nothing in a running cockpit.\n *\n * This mounts the declared `DoomApi` the same way, so a test asks for the URL a\n * browser would ask for. Plain `Request` and `Response`; no HTTP framework and\n * no server.\n */\n\nexport interface MountPackageApiOptions {\n scope?: DoomApiScope;\n sessionId?: string;\n cwd?: string;\n directEvents?: DoomDirectEventBus;\n}\n\nexport interface MountedPackageApi {\n /** Where the host mounted it, for building a URL the way a client does. */\n readonly mountPath: string;\n /** What the API reported to its host; a package that notices nothing leaves this empty. */\n readonly notices: readonly string[];\n /**\n * Fetches one path.\n *\n * The path is host-absolute, so it carries the mount the client would send:\n * `/api/plugins/workflow/runs/repo/blog-4`. A path outside the mount is a 404\n * from this, exactly as it is from the host.\n */\n fetch(path: string, init?: RequestInit): Promise<Response>;\n close(): void;\n}\n\nconst DEFAULT_SCOPE: DoomApiScope = 'global';\nconst DEFAULT_CWD = '/repo';\n/** Any origin will do: the host routes on path, and a Request needs an absolute URL. */\nconst ORIGIN = 'http://host';\n\nexport function mountPackageApi(api: DoomApi, options: MountPackageApiOptions = {}): MountedPackageApi {\n const scope = options.scope ?? DEFAULT_SCOPE;\n const notices: string[] = [];\n const mountPath = `${DOOM_API_ROUTE_PREFIX}/${api.basePath}`;\n const context: DoomApiContext = {\n scope,\n // A session-scoped host knows both; a hub-scoped one knows neither, and an\n // API that reads them anyway should see the same undefined it would there.\n ...(scope === 'session' ? { sessionId: options.sessionId ?? 'test-session', cwd: options.cwd ?? DEFAULT_CWD } : {}),\n ...(options.directEvents ? { directEvents: options.directEvents } : {}),\n onNotice: (message) => notices.push(message),\n };\n const handler: DoomApiHandler = api.start(context);\n\n return {\n mountPath,\n notices,\n async fetch(path, init) {\n const url = new URL(path, ORIGIN);\n if (url.pathname !== mountPath && !url.pathname.startsWith(`${mountPath}/`)) {\n return new Response(`No package API is mounted at ${url.pathname}.`, { status: 404 });\n }\n // The host strips its own mount, so a package declares '/runs/:id' and\n // never repeats where it was mounted.\n url.pathname = url.pathname.slice(mountPath.length) || '/';\n return handler.fetch(new Request(url, init));\n },\n close: () => handler.close(),\n };\n}\n"],"mappings":";;AA8CA,MAAM,gBAA8B;AACpC,MAAM,cAAc;;AAEpB,MAAM,SAAS;AAEf,SAAgB,gBAAgB,KAAc,UAAkC,CAAC,GAAsB;CACrG,MAAM,QAAQ,QAAQ,SAAS;CAC/B,MAAM,UAAoB,CAAC;CAC3B,MAAM,YAAY,GAAG,sBAAsB,GAAG,IAAI;CAClD,MAAM,UAA0B;EAC9B;EAGA,GAAI,UAAU,YAAY;GAAE,WAAW,QAAQ,aAAa;GAAgB,KAAK,QAAQ,OAAO;EAAY,IAAI,CAAC;EACjH,GAAI,QAAQ,eAAe,EAAE,cAAc,QAAQ,aAAa,IAAI,CAAC;EACrE,WAAW,YAAY,QAAQ,KAAK,OAAO;CAC7C;CACA,MAAM,UAA0B,IAAI,MAAM,OAAO;CAEjD,OAAO;EACL;EACA;EACA,MAAM,MAAM,MAAM,MAAM;GACtB,MAAM,MAAM,IAAI,IAAI,MAAM,MAAM;GAChC,IAAI,IAAI,aAAa,aAAa,CAAC,IAAI,SAAS,WAAW,GAAG,UAAU,EAAE,GACxE,OAAO,IAAI,SAAS,gCAAgC,IAAI,SAAS,IAAI,EAAE,QAAQ,IAAI,CAAC;GAItF,IAAI,WAAW,IAAI,SAAS,MAAM,UAAU,MAAM,KAAK;GACvD,OAAO,QAAQ,MAAM,IAAI,QAAQ,KAAK,IAAI,CAAC;EAC7C;EACA,aAAa,QAAQ,MAAM;CAC7B;AACF"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/services/packageApiHarness/index.ts"],"sourcesContent":["import type { PoDirectEventBus } from '../../schemas/hubChannel';\nimport {\n type PoApi,\n type PoApiContext,\n type PoApiHandler,\n PO_API_ROUTE_PREFIX,\n type PoApiScope,\n} from '../../schemas/packageApi';\n\n/**\n * A package's HTTP surface, mounted the way a host mounts it.\n *\n * A package tests its routes by calling its Hono app directly, which proves the\n * routes but not the mount: the host serves them under\n * `/api/plugins/<basePath>` and strips that prefix before the app sees the\n * request. A package whose routes are written absolute passes its own suite and\n * answers nothing in a running cockpit.\n *\n * This mounts the declared `PoApi` the same way, so a test asks for the URL a\n * browser would ask for. Plain `Request` and `Response`; no HTTP framework and\n * no server.\n */\n\nexport interface MountPackageApiOptions {\n scope?: PoApiScope;\n sessionId?: string;\n cwd?: string;\n directEvents?: PoDirectEventBus;\n}\n\nexport interface MountedPackageApi {\n /** Where the host mounted it, for building a URL the way a client does. */\n readonly mountPath: string;\n /** What the API reported to its host; a package that notices nothing leaves this empty. */\n readonly notices: readonly string[];\n /**\n * Fetches one path.\n *\n * The path is host-absolute, so it carries the mount the client would send:\n * `/api/plugins/workflow/runs/repo/blog-4`. A path outside the mount is a 404\n * from this, exactly as it is from the host.\n */\n fetch(path: string, init?: RequestInit): Promise<Response>;\n close(): void;\n}\n\nconst DEFAULT_SCOPE: PoApiScope = 'global';\nconst DEFAULT_CWD = '/repo';\n/** Any origin will do: the host routes on path, and a Request needs an absolute URL. */\nconst ORIGIN = 'http://host';\n\nexport function mountPackageApi(api: PoApi, options: MountPackageApiOptions = {}): MountedPackageApi {\n const scope = options.scope ?? DEFAULT_SCOPE;\n const notices: string[] = [];\n const mountPath = `${PO_API_ROUTE_PREFIX}/${api.basePath}`;\n const context: PoApiContext = {\n scope,\n // A session-scoped host knows both; a hub-scoped one knows neither, and an\n // API that reads them anyway should see the same undefined it would there.\n ...(scope === 'session' ? { sessionId: options.sessionId ?? 'test-session', cwd: options.cwd ?? DEFAULT_CWD } : {}),\n ...(options.directEvents ? { directEvents: options.directEvents } : {}),\n onNotice: (message) => notices.push(message),\n };\n const handler: PoApiHandler = api.start(context);\n\n return {\n mountPath,\n notices,\n async fetch(path, init) {\n const url = new URL(path, ORIGIN);\n if (url.pathname !== mountPath && !url.pathname.startsWith(`${mountPath}/`)) {\n return new Response(`No package API is mounted at ${url.pathname}.`, { status: 404 });\n }\n // The host strips its own mount, so a package declares '/runs/:id' and\n // never repeats where it was mounted.\n url.pathname = url.pathname.slice(mountPath.length) || '/';\n return handler.fetch(new Request(url, init));\n },\n close: () => handler.close(),\n };\n}\n"],"mappings":";;AA8CA,MAAM,gBAA4B;AAClC,MAAM,cAAc;;AAEpB,MAAM,SAAS;AAEf,SAAgB,gBAAgB,KAAY,UAAkC,CAAC,GAAsB;CACnG,MAAM,QAAQ,QAAQ,SAAS;CAC/B,MAAM,UAAoB,CAAC;CAC3B,MAAM,YAAY,GAAG,oBAAoB,GAAG,IAAI;CAChD,MAAM,UAAwB;EAC5B;EAGA,GAAI,UAAU,YAAY;GAAE,WAAW,QAAQ,aAAa;GAAgB,KAAK,QAAQ,OAAO;EAAY,IAAI,CAAC;EACjH,GAAI,QAAQ,eAAe,EAAE,cAAc,QAAQ,aAAa,IAAI,CAAC;EACrE,WAAW,YAAY,QAAQ,KAAK,OAAO;CAC7C;CACA,MAAM,UAAwB,IAAI,MAAM,OAAO;CAE/C,OAAO;EACL;EACA;EACA,MAAM,MAAM,MAAM,MAAM;GACtB,MAAM,MAAM,IAAI,IAAI,MAAM,MAAM;GAChC,IAAI,IAAI,aAAa,aAAa,CAAC,IAAI,SAAS,WAAW,GAAG,UAAU,EAAE,GACxE,OAAO,IAAI,SAAS,gCAAgC,IAAI,SAAS,IAAI,EAAE,QAAQ,IAAI,CAAC;GAItF,IAAI,WAAW,IAAI,SAAS,MAAM,UAAU,MAAM,KAAK;GACvD,OAAO,QAAQ,MAAM,IAAI,QAAQ,KAAK,IAAI,CAAC;EAC7C;EACA,aAAa,QAAQ,MAAM;CAC7B;AACF"}
@@ -0,0 +1,53 @@
1
+ let _earendil_works_pi_coding_agent = require("@earendil-works/pi-coding-agent");
2
+ //#region src/services/piArgs/index.ts
3
+ const unsupported = (parsed) => {
4
+ const match = [
5
+ ["--help", parsed.help],
6
+ ["--version", parsed.version],
7
+ ["--mode", parsed.mode],
8
+ ["--print", parsed.print],
9
+ ["--export", parsed.export],
10
+ ["--no-session", parsed.noSession],
11
+ ["--session", parsed.session],
12
+ ["--session-dir", parsed.sessionDir],
13
+ ["--continue", parsed.continue],
14
+ ["--resume", parsed.resume],
15
+ ["--fork", parsed.fork],
16
+ ["--list-models", parsed.listModels],
17
+ ["--offline", parsed.offline],
18
+ ["--tui-mode", parsed.tuiMode],
19
+ ["--extensions", parsed.extensions],
20
+ ["--no-extensions", parsed.noExtensions],
21
+ ["--skills", parsed.skills],
22
+ ["--no-skills", parsed.noSkills],
23
+ ["--prompt-templates", parsed.promptTemplates],
24
+ ["--no-prompt-templates", parsed.noPromptTemplates],
25
+ ["--themes", parsed.themes],
26
+ ["--no-themes", parsed.noThemes],
27
+ ["--no-context-files", parsed.noContextFiles],
28
+ ["--tools", parsed.tools],
29
+ ["--exclude-tools", parsed.excludeTools],
30
+ ["--no-tools", parsed.noTools],
31
+ ["--no-builtin-tools", parsed.noBuiltinTools],
32
+ ["--project-trust-override", parsed.projectTrustOverride],
33
+ ["--verbose", parsed.verbose]
34
+ ].find(([, value]) => value !== void 0 && value !== false);
35
+ if (match) return `Direct headless mode does not support ${match[0]}.`;
36
+ if (parsed.messages.length > 0 || parsed.fileArgs.length > 0) return "Direct headless mode does not support positional prompts or files.";
37
+ const unknown = parsed.unknownFlags.keys().next().value;
38
+ return typeof unknown === "string" ? `Direct headless mode does not support --${unknown}.` : void 0;
39
+ };
40
+ /** Validate the Pi flags that remain after Po's harness flags are removed. */
41
+ function validateDirectHeadlessArgs(agentArgs) {
42
+ if (agentArgs.includes("--mode")) throw new Error("Direct headless mode does not support --mode.");
43
+ const parsed = (0, _earendil_works_pi_coding_agent.parseArgs)([...agentArgs]);
44
+ const diagnostics = parsed.diagnostics.filter((diagnostic) => diagnostic.type === "error");
45
+ if (diagnostics.length) throw new Error(diagnostics.map((diagnostic) => diagnostic.message).join("\n"));
46
+ const error = unsupported(parsed);
47
+ if (error) throw new Error(error);
48
+ return parsed;
49
+ }
50
+ //#endregion
51
+ exports.validateDirectHeadlessArgs = validateDirectHeadlessArgs;
52
+
53
+ //# sourceMappingURL=index.cjs.map