happy2 0.0.9 → 0.0.12

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 (286) hide show
  1. package/README.md +29 -0
  2. package/package.json +7 -3
  3. package/packages/happy2-server/PLUGINS.md +402 -0
  4. package/packages/happy2-server/README.md +39 -0
  5. package/packages/happy2-server/dist/daemon.d.ts +39 -0
  6. package/packages/happy2-server/dist/daemon.d.ts.map +1 -0
  7. package/packages/happy2-server/dist/daemon.js +302 -0
  8. package/packages/happy2-server/dist/daemon.js.map +1 -0
  9. package/packages/happy2-server/dist/daemon.test.d.ts +2 -0
  10. package/packages/happy2-server/dist/daemon.test.d.ts.map +1 -0
  11. package/packages/happy2-server/dist/daemon.test.js +245 -0
  12. package/packages/happy2-server/dist/daemon.test.js.map +1 -0
  13. package/packages/happy2-server/dist/index.d.ts +7 -1
  14. package/packages/happy2-server/dist/index.d.ts.map +1 -1
  15. package/packages/happy2-server/dist/index.js +5 -1
  16. package/packages/happy2-server/dist/index.js.map +1 -1
  17. package/packages/happy2-server/dist/modules/agents/daemon.d.ts +10 -13
  18. package/packages/happy2-server/dist/modules/agents/daemon.d.ts.map +1 -1
  19. package/packages/happy2-server/dist/modules/agents/daemon.js +19 -5
  20. package/packages/happy2-server/dist/modules/agents/daemon.js.map +1 -1
  21. package/packages/happy2-server/dist/modules/agents/service.d.ts +9 -1
  22. package/packages/happy2-server/dist/modules/agents/service.d.ts.map +1 -1
  23. package/packages/happy2-server/dist/modules/agents/service.js +59 -2
  24. package/packages/happy2-server/dist/modules/agents/service.js.map +1 -1
  25. package/packages/happy2-server/dist/modules/auth/tokens.d.ts +7 -0
  26. package/packages/happy2-server/dist/modules/auth/tokens.d.ts.map +1 -1
  27. package/packages/happy2-server/dist/modules/auth/tokens.js +33 -0
  28. package/packages/happy2-server/dist/modules/auth/tokens.js.map +1 -1
  29. package/packages/happy2-server/dist/modules/auth/tokens.test.d.ts +2 -0
  30. package/packages/happy2-server/dist/modules/auth/tokens.test.d.ts.map +1 -0
  31. package/packages/happy2-server/dist/modules/auth/tokens.test.js +28 -0
  32. package/packages/happy2-server/dist/modules/auth/tokens.test.js.map +1 -0
  33. package/packages/happy2-server/dist/modules/chat/types.d.ts +1 -1
  34. package/packages/happy2-server/dist/modules/chat/types.d.ts.map +1 -1
  35. package/packages/happy2-server/dist/modules/config/defaults.d.ts.map +1 -1
  36. package/packages/happy2-server/dist/modules/config/defaults.js +5 -0
  37. package/packages/happy2-server/dist/modules/config/defaults.js.map +1 -1
  38. package/packages/happy2-server/dist/modules/config/loader.d.ts.map +1 -1
  39. package/packages/happy2-server/dist/modules/config/loader.js +9 -0
  40. package/packages/happy2-server/dist/modules/config/loader.js.map +1 -1
  41. package/packages/happy2-server/dist/modules/config/loader.test.js +15 -0
  42. package/packages/happy2-server/dist/modules/config/loader.test.js.map +1 -1
  43. package/packages/happy2-server/dist/modules/config/paths.d.ts +1 -0
  44. package/packages/happy2-server/dist/modules/config/paths.d.ts.map +1 -1
  45. package/packages/happy2-server/dist/modules/config/paths.js +1 -0
  46. package/packages/happy2-server/dist/modules/config/paths.js.map +1 -1
  47. package/packages/happy2-server/dist/modules/config/paths.test.js +1 -0
  48. package/packages/happy2-server/dist/modules/config/paths.test.js.map +1 -1
  49. package/packages/happy2-server/dist/modules/config/type.d.ts +5 -0
  50. package/packages/happy2-server/dist/modules/config/type.d.ts.map +1 -1
  51. package/packages/happy2-server/dist/modules/integrations/transport.d.ts.map +1 -1
  52. package/packages/happy2-server/dist/modules/integrations/transport.js +8 -1
  53. package/packages/happy2-server/dist/modules/integrations/transport.js.map +1 -1
  54. package/packages/happy2-server/dist/modules/integrations/types.d.ts +2 -0
  55. package/packages/happy2-server/dist/modules/integrations/types.d.ts.map +1 -1
  56. package/packages/happy2-server/dist/modules/integrations/types.js.map +1 -1
  57. package/packages/happy2-server/dist/modules/plugin/catalog.d.ts +13 -0
  58. package/packages/happy2-server/dist/modules/plugin/catalog.d.ts.map +1 -0
  59. package/packages/happy2-server/dist/modules/plugin/catalog.js +400 -0
  60. package/packages/happy2-server/dist/modules/plugin/catalog.js.map +1 -0
  61. package/packages/happy2-server/dist/modules/plugin/catalog.test.d.ts +2 -0
  62. package/packages/happy2-server/dist/modules/plugin/catalog.test.d.ts.map +1 -0
  63. package/packages/happy2-server/dist/modules/plugin/catalog.test.js +172 -0
  64. package/packages/happy2-server/dist/modules/plugin/catalog.test.js.map +1 -0
  65. package/packages/happy2-server/dist/modules/plugin/functions.test.d.ts +2 -0
  66. package/packages/happy2-server/dist/modules/plugin/functions.test.d.ts.map +1 -0
  67. package/packages/happy2-server/dist/modules/plugin/functions.test.js +123 -0
  68. package/packages/happy2-server/dist/modules/plugin/functions.test.js.map +1 -0
  69. package/packages/happy2-server/dist/modules/plugin/httpBridge.d.ts +19 -0
  70. package/packages/happy2-server/dist/modules/plugin/httpBridge.d.ts.map +1 -0
  71. package/packages/happy2-server/dist/modules/plugin/httpBridge.js +206 -0
  72. package/packages/happy2-server/dist/modules/plugin/httpBridge.js.map +1 -0
  73. package/packages/happy2-server/dist/modules/plugin/impl/asInstallation.d.ts +3 -0
  74. package/packages/happy2-server/dist/modules/plugin/impl/asInstallation.d.ts.map +1 -0
  75. package/packages/happy2-server/dist/modules/plugin/impl/asInstallation.js +47 -0
  76. package/packages/happy2-server/dist/modules/plugin/impl/asInstallation.js.map +1 -0
  77. package/packages/happy2-server/dist/modules/plugin/impl/asPlugin.d.ts +3 -0
  78. package/packages/happy2-server/dist/modules/plugin/impl/asPlugin.d.ts.map +1 -0
  79. package/packages/happy2-server/dist/modules/plugin/impl/asPlugin.js +82 -0
  80. package/packages/happy2-server/dist/modules/plugin/impl/asPlugin.js.map +1 -0
  81. package/packages/happy2-server/dist/modules/plugin/impl/effectiveContainer.d.ts +3 -0
  82. package/packages/happy2-server/dist/modules/plugin/impl/effectiveContainer.d.ts.map +1 -0
  83. package/packages/happy2-server/dist/modules/plugin/impl/effectiveContainer.js +12 -0
  84. package/packages/happy2-server/dist/modules/plugin/impl/effectiveContainer.js.map +1 -0
  85. package/packages/happy2-server/dist/modules/plugin/impl/installationSelection.d.ts +288 -0
  86. package/packages/happy2-server/dist/modules/plugin/impl/installationSelection.d.ts.map +1 -0
  87. package/packages/happy2-server/dist/modules/plugin/impl/installationSelection.js +19 -0
  88. package/packages/happy2-server/dist/modules/plugin/impl/installationSelection.js.map +1 -0
  89. package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.d.ts +3 -0
  90. package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.d.ts.map +1 -0
  91. package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.js +63 -0
  92. package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.js.map +1 -0
  93. package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.test.d.ts +2 -0
  94. package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.test.d.ts.map +1 -0
  95. package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.test.js +17 -0
  96. package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.test.js.map +1 -0
  97. package/packages/happy2-server/dist/modules/plugin/impl/pluginFunctionResult.d.ts +3 -0
  98. package/packages/happy2-server/dist/modules/plugin/impl/pluginFunctionResult.d.ts.map +1 -0
  99. package/packages/happy2-server/dist/modules/plugin/impl/pluginFunctionResult.js +16 -0
  100. package/packages/happy2-server/dist/modules/plugin/impl/pluginFunctionResult.js.map +1 -0
  101. package/packages/happy2-server/dist/modules/plugin/impl/pluginSelection.d.ts +339 -0
  102. package/packages/happy2-server/dist/modules/plugin/impl/pluginSelection.d.ts.map +1 -0
  103. package/packages/happy2-server/dist/modules/plugin/impl/pluginSelection.js +22 -0
  104. package/packages/happy2-server/dist/modules/plugin/impl/pluginSelection.js.map +1 -0
  105. package/packages/happy2-server/dist/modules/plugin/index.d.ts +3 -0
  106. package/packages/happy2-server/dist/modules/plugin/index.d.ts.map +1 -0
  107. package/packages/happy2-server/dist/modules/plugin/index.js +3 -0
  108. package/packages/happy2-server/dist/modules/plugin/index.js.map +1 -0
  109. package/packages/happy2-server/dist/modules/plugin/packageStore.d.ts +15 -0
  110. package/packages/happy2-server/dist/modules/plugin/packageStore.d.ts.map +1 -0
  111. package/packages/happy2-server/dist/modules/plugin/packageStore.js +90 -0
  112. package/packages/happy2-server/dist/modules/plugin/packageStore.js.map +1 -0
  113. package/packages/happy2-server/dist/modules/plugin/pluginAuthorizeManagement.d.ts +7 -0
  114. package/packages/happy2-server/dist/modules/plugin/pluginAuthorizeManagement.d.ts.map +1 -0
  115. package/packages/happy2-server/dist/modules/plugin/pluginAuthorizeManagement.js +9 -0
  116. package/packages/happy2-server/dist/modules/plugin/pluginAuthorizeManagement.js.map +1 -0
  117. package/packages/happy2-server/dist/modules/plugin/pluginCatalogList.d.ts +9 -0
  118. package/packages/happy2-server/dist/modules/plugin/pluginCatalogList.d.ts.map +1 -0
  119. package/packages/happy2-server/dist/modules/plugin/pluginCatalogList.js +64 -0
  120. package/packages/happy2-server/dist/modules/plugin/pluginCatalogList.js.map +1 -0
  121. package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceAuthorize.d.ts +10 -0
  122. package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceAuthorize.d.ts.map +1 -0
  123. package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceAuthorize.js +20 -0
  124. package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceAuthorize.js.map +1 -0
  125. package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceInvalidate.d.ts +12 -0
  126. package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceInvalidate.d.ts.map +1 -0
  127. package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceInvalidate.js +44 -0
  128. package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceInvalidate.js.map +1 -0
  129. package/packages/happy2-server/dist/modules/plugin/pluginFindBySource.d.ts +9 -0
  130. package/packages/happy2-server/dist/modules/plugin/pluginFindBySource.d.ts.map +1 -0
  131. package/packages/happy2-server/dist/modules/plugin/pluginFindBySource.js +15 -0
  132. package/packages/happy2-server/dist/modules/plugin/pluginFindBySource.js.map +1 -0
  133. package/packages/happy2-server/dist/modules/plugin/pluginFunctionResultAcquire.d.ts +23 -0
  134. package/packages/happy2-server/dist/modules/plugin/pluginFunctionResultAcquire.d.ts.map +1 -0
  135. package/packages/happy2-server/dist/modules/plugin/pluginFunctionResultAcquire.js +54 -0
  136. package/packages/happy2-server/dist/modules/plugin/pluginFunctionResultAcquire.js.map +1 -0
  137. package/packages/happy2-server/dist/modules/plugin/pluginFunctionResultComplete.d.ts +13 -0
  138. package/packages/happy2-server/dist/modules/plugin/pluginFunctionResultComplete.d.ts.map +1 -0
  139. package/packages/happy2-server/dist/modules/plugin/pluginFunctionResultComplete.js +37 -0
  140. package/packages/happy2-server/dist/modules/plugin/pluginFunctionResultComplete.js.map +1 -0
  141. package/packages/happy2-server/dist/modules/plugin/pluginGetImage.d.ts +17 -0
  142. package/packages/happy2-server/dist/modules/plugin/pluginGetImage.d.ts.map +1 -0
  143. package/packages/happy2-server/dist/modules/plugin/pluginGetImage.js +29 -0
  144. package/packages/happy2-server/dist/modules/plugin/pluginGetImage.js.map +1 -0
  145. package/packages/happy2-server/dist/modules/plugin/pluginInstall.d.ts +27 -0
  146. package/packages/happy2-server/dist/modules/plugin/pluginInstall.d.ts.map +1 -0
  147. package/packages/happy2-server/dist/modules/plugin/pluginInstall.js +180 -0
  148. package/packages/happy2-server/dist/modules/plugin/pluginInstall.js.map +1 -0
  149. package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRuntimeConfiguration.d.ts +9 -0
  150. package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRuntimeConfiguration.d.ts.map +1 -0
  151. package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRuntimeConfiguration.js +122 -0
  152. package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRuntimeConfiguration.js.map +1 -0
  153. package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetStatus.d.ts +11 -0
  154. package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetStatus.d.ts.map +1 -0
  155. package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetStatus.js +18 -0
  156. package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetStatus.js.map +1 -0
  157. package/packages/happy2-server/dist/modules/plugin/pluginInstallationList.d.ts +8 -0
  158. package/packages/happy2-server/dist/modules/plugin/pluginInstallationList.d.ts.map +1 -0
  159. package/packages/happy2-server/dist/modules/plugin/pluginInstallationList.js +19 -0
  160. package/packages/happy2-server/dist/modules/plugin/pluginInstallationList.js.map +1 -0
  161. package/packages/happy2-server/dist/modules/plugin/pluginInstallationListForHost.d.ts +14 -0
  162. package/packages/happy2-server/dist/modules/plugin/pluginInstallationListForHost.d.ts.map +1 -0
  163. package/packages/happy2-server/dist/modules/plugin/pluginInstallationListForHost.js +20 -0
  164. package/packages/happy2-server/dist/modules/plugin/pluginInstallationListForHost.js.map +1 -0
  165. package/packages/happy2-server/dist/modules/plugin/pluginInstallationListIds.d.ts +7 -0
  166. package/packages/happy2-server/dist/modules/plugin/pluginInstallationListIds.d.ts.map +1 -0
  167. package/packages/happy2-server/dist/modules/plugin/pluginInstallationListIds.js +13 -0
  168. package/packages/happy2-server/dist/modules/plugin/pluginInstallationListIds.js.map +1 -0
  169. package/packages/happy2-server/dist/modules/plugin/pluginInstallationListReadyMcpIds.d.ts +7 -0
  170. package/packages/happy2-server/dist/modules/plugin/pluginInstallationListReadyMcpIds.d.ts.map +1 -0
  171. package/packages/happy2-server/dist/modules/plugin/pluginInstallationListReadyMcpIds.js +16 -0
  172. package/packages/happy2-server/dist/modules/plugin/pluginInstallationListReadyMcpIds.js.map +1 -0
  173. package/packages/happy2-server/dist/modules/plugin/pluginInstallationUpdateStatus.d.ts +16 -0
  174. package/packages/happy2-server/dist/modules/plugin/pluginInstallationUpdateStatus.d.ts.map +1 -0
  175. package/packages/happy2-server/dist/modules/plugin/pluginInstallationUpdateStatus.js +38 -0
  176. package/packages/happy2-server/dist/modules/plugin/pluginInstallationUpdateStatus.js.map +1 -0
  177. package/packages/happy2-server/dist/modules/plugin/pluginList.d.ts +8 -0
  178. package/packages/happy2-server/dist/modules/plugin/pluginList.d.ts.map +1 -0
  179. package/packages/happy2-server/dist/modules/plugin/pluginList.js +17 -0
  180. package/packages/happy2-server/dist/modules/plugin/pluginList.js.map +1 -0
  181. package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsList.d.ts +11 -0
  182. package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsList.d.ts.map +1 -0
  183. package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsList.js +43 -0
  184. package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsList.js.map +1 -0
  185. package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsListReady.d.ts +15 -0
  186. package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsListReady.d.ts.map +1 -0
  187. package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsListReady.js +37 -0
  188. package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsListReady.js.map +1 -0
  189. package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsReplace.d.ts +16 -0
  190. package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsReplace.d.ts.map +1 -0
  191. package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsReplace.js +71 -0
  192. package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsReplace.js.map +1 -0
  193. package/packages/happy2-server/dist/modules/plugin/pluginRemoveMissingBuiltins.d.ts +14 -0
  194. package/packages/happy2-server/dist/modules/plugin/pluginRemoveMissingBuiltins.d.ts.map +1 -0
  195. package/packages/happy2-server/dist/modules/plugin/pluginRemoveMissingBuiltins.js +51 -0
  196. package/packages/happy2-server/dist/modules/plugin/pluginRemoveMissingBuiltins.js.map +1 -0
  197. package/packages/happy2-server/dist/modules/plugin/runtime.d.ts +56 -0
  198. package/packages/happy2-server/dist/modules/plugin/runtime.d.ts.map +1 -0
  199. package/packages/happy2-server/dist/modules/plugin/runtime.js +147 -0
  200. package/packages/happy2-server/dist/modules/plugin/runtime.js.map +1 -0
  201. package/packages/happy2-server/dist/modules/plugin/secrets.d.ts +17 -0
  202. package/packages/happy2-server/dist/modules/plugin/secrets.d.ts.map +1 -0
  203. package/packages/happy2-server/dist/modules/plugin/secrets.js +56 -0
  204. package/packages/happy2-server/dist/modules/plugin/secrets.js.map +1 -0
  205. package/packages/happy2-server/dist/modules/plugin/secrets.test.d.ts +2 -0
  206. package/packages/happy2-server/dist/modules/plugin/secrets.test.d.ts.map +1 -0
  207. package/packages/happy2-server/dist/modules/plugin/secrets.test.js +14 -0
  208. package/packages/happy2-server/dist/modules/plugin/secrets.test.js.map +1 -0
  209. package/packages/happy2-server/dist/modules/plugin/service.d.ts +60 -0
  210. package/packages/happy2-server/dist/modules/plugin/service.d.ts.map +1 -0
  211. package/packages/happy2-server/dist/modules/plugin/service.js +584 -0
  212. package/packages/happy2-server/dist/modules/plugin/service.js.map +1 -0
  213. package/packages/happy2-server/dist/modules/plugin/types.d.ts +194 -0
  214. package/packages/happy2-server/dist/modules/plugin/types.d.ts.map +1 -0
  215. package/packages/happy2-server/dist/modules/plugin/types.js +10 -0
  216. package/packages/happy2-server/dist/modules/plugin/types.js.map +1 -0
  217. package/packages/happy2-server/dist/modules/plugin/utils/ndjsonStreamTransport.d.ts +19 -0
  218. package/packages/happy2-server/dist/modules/plugin/utils/ndjsonStreamTransport.d.ts.map +1 -0
  219. package/packages/happy2-server/dist/modules/plugin/utils/ndjsonStreamTransport.js +97 -0
  220. package/packages/happy2-server/dist/modules/plugin/utils/ndjsonStreamTransport.js.map +1 -0
  221. package/packages/happy2-server/dist/modules/plugin/utils/ndjsonStreamTransport.test.d.ts +2 -0
  222. package/packages/happy2-server/dist/modules/plugin/utils/ndjsonStreamTransport.test.d.ts.map +1 -0
  223. package/packages/happy2-server/dist/modules/plugin/utils/ndjsonStreamTransport.test.js +74 -0
  224. package/packages/happy2-server/dist/modules/plugin/utils/ndjsonStreamTransport.test.js.map +1 -0
  225. package/packages/happy2-server/dist/modules/plugin/utils/remoteMcpTransport.d.ts +29 -0
  226. package/packages/happy2-server/dist/modules/plugin/utils/remoteMcpTransport.d.ts.map +1 -0
  227. package/packages/happy2-server/dist/modules/plugin/utils/remoteMcpTransport.js +126 -0
  228. package/packages/happy2-server/dist/modules/plugin/utils/remoteMcpTransport.js.map +1 -0
  229. package/packages/happy2-server/dist/modules/plugin/utils/remoteMcpTransport.test.d.ts +2 -0
  230. package/packages/happy2-server/dist/modules/plugin/utils/remoteMcpTransport.test.d.ts.map +1 -0
  231. package/packages/happy2-server/dist/modules/plugin/utils/remoteMcpTransport.test.js +75 -0
  232. package/packages/happy2-server/dist/modules/plugin/utils/remoteMcpTransport.test.js.map +1 -0
  233. package/packages/happy2-server/dist/modules/sandbox/index.d.ts +1 -1
  234. package/packages/happy2-server/dist/modules/sandbox/index.d.ts.map +1 -1
  235. package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.d.ts +9 -1
  236. package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.d.ts.map +1 -1
  237. package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.js +218 -4
  238. package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.js.map +1 -1
  239. package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.test.js +157 -2
  240. package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.test.js.map +1 -1
  241. package/packages/happy2-server/dist/modules/sandbox/types.d.ts +24 -0
  242. package/packages/happy2-server/dist/modules/sandbox/types.d.ts.map +1 -1
  243. package/packages/happy2-server/dist/modules/schema.d.ts +7781 -5489
  244. package/packages/happy2-server/dist/modules/schema.d.ts.map +1 -1
  245. package/packages/happy2-server/dist/modules/schema.js +87 -1
  246. package/packages/happy2-server/dist/modules/schema.js.map +1 -1
  247. package/packages/happy2-server/dist/modules/sync/syncGetDifference.d.ts.map +1 -1
  248. package/packages/happy2-server/dist/modules/sync/syncGetDifference.js +2 -0
  249. package/packages/happy2-server/dist/modules/sync/syncGetDifference.js.map +1 -1
  250. package/packages/happy2-server/dist/routes/pluginHost.d.ts +6 -0
  251. package/packages/happy2-server/dist/routes/pluginHost.d.ts.map +1 -0
  252. package/packages/happy2-server/dist/routes/pluginHost.js +37 -0
  253. package/packages/happy2-server/dist/routes/pluginHost.js.map +1 -0
  254. package/packages/happy2-server/dist/routes/plugins.d.ts +8 -0
  255. package/packages/happy2-server/dist/routes/plugins.d.ts.map +1 -0
  256. package/packages/happy2-server/dist/routes/plugins.js +198 -0
  257. package/packages/happy2-server/dist/routes/plugins.js.map +1 -0
  258. package/packages/happy2-server/dist/runner.js +64 -19
  259. package/packages/happy2-server/dist/runner.js.map +1 -1
  260. package/packages/happy2-server/dist/server.d.ts +8 -0
  261. package/packages/happy2-server/dist/server.d.ts.map +1 -1
  262. package/packages/happy2-server/dist/server.js +65 -3
  263. package/packages/happy2-server/dist/server.js.map +1 -1
  264. package/packages/happy2-server/dist/systemService.d.ts +48 -0
  265. package/packages/happy2-server/dist/systemService.d.ts.map +1 -0
  266. package/packages/happy2-server/dist/systemService.js +323 -0
  267. package/packages/happy2-server/dist/systemService.js.map +1 -0
  268. package/packages/happy2-server/dist/systemService.test.d.ts +2 -0
  269. package/packages/happy2-server/dist/systemService.test.d.ts.map +1 -0
  270. package/packages/happy2-server/dist/systemService.test.js +280 -0
  271. package/packages/happy2-server/dist/systemService.test.js.map +1 -0
  272. package/packages/happy2-server/dist/web/assets/index-9SGCQLg7.js +46 -0
  273. package/packages/happy2-server/dist/web/assets/{index-DZ1uRLgV.css → index-DWXBQDJB.css} +1 -1
  274. package/packages/happy2-server/dist/web/index.html +2 -2
  275. package/packages/happy2-server/drizzle/0020_plugins.sql +61 -0
  276. package/packages/happy2-server/drizzle/0021_plugin_function_results.sql +11 -0
  277. package/packages/happy2-server/drizzle/0022_plugin_container_runtime_tools.sql +16 -0
  278. package/packages/happy2-server/drizzle/meta/_journal.json +21 -0
  279. package/packages/happy2-server/happy2.example.toml +13 -0
  280. package/packages/happy2-server/plugins/README.md +7 -0
  281. package/packages/happy2-server/plugins/hello/container/Dockerfile +6 -0
  282. package/packages/happy2-server/plugins/hello/plugin.json +16 -0
  283. package/packages/happy2-server/plugins/hello/plugin.png +0 -0
  284. package/packages/happy2-server/plugins/hello/server.mjs +75 -0
  285. package/packages/happy2-server/plugins/hello/skills/hello/SKILL.md +11 -0
  286. package/packages/happy2-server/dist/web/assets/index-DH1SOwNV.js +0 -46
@@ -0,0 +1,288 @@
1
+ export declare const pluginInstallationSelection: {
2
+ id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3
+ name: "id";
4
+ tableName: "plugin_installations";
5
+ dataType: "string";
6
+ columnType: "SQLiteText";
7
+ data: string;
8
+ driverParam: string;
9
+ notNull: true;
10
+ hasDefault: false;
11
+ isPrimaryKey: true;
12
+ isAutoincrement: false;
13
+ hasRuntimeDefault: false;
14
+ enumValues: [string, ...string[]];
15
+ baseColumn: never;
16
+ identity: undefined;
17
+ generated: undefined;
18
+ }, {}, {
19
+ length: number | undefined;
20
+ }>;
21
+ pluginId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
22
+ name: "plugin_id";
23
+ tableName: "plugin_installations";
24
+ dataType: "string";
25
+ columnType: "SQLiteText";
26
+ data: string;
27
+ driverParam: string;
28
+ notNull: true;
29
+ hasDefault: false;
30
+ isPrimaryKey: false;
31
+ isAutoincrement: false;
32
+ hasRuntimeDefault: false;
33
+ enumValues: [string, ...string[]];
34
+ baseColumn: never;
35
+ identity: undefined;
36
+ generated: undefined;
37
+ }, {}, {
38
+ length: number | undefined;
39
+ }>;
40
+ shortName: import("drizzle-orm/sqlite-core").SQLiteColumn<{
41
+ name: "short_name";
42
+ tableName: "plugins";
43
+ dataType: "string";
44
+ columnType: "SQLiteText";
45
+ data: string;
46
+ driverParam: string;
47
+ notNull: true;
48
+ hasDefault: false;
49
+ isPrimaryKey: false;
50
+ isAutoincrement: false;
51
+ hasRuntimeDefault: false;
52
+ enumValues: [string, ...string[]];
53
+ baseColumn: never;
54
+ identity: undefined;
55
+ generated: undefined;
56
+ }, {}, {
57
+ length: number | undefined;
58
+ }>;
59
+ sourceKind: import("drizzle-orm/sqlite-core").SQLiteColumn<{
60
+ name: "source_kind";
61
+ tableName: "plugins";
62
+ dataType: "string";
63
+ columnType: "SQLiteText";
64
+ data: string;
65
+ driverParam: string;
66
+ notNull: true;
67
+ hasDefault: false;
68
+ isPrimaryKey: false;
69
+ isAutoincrement: false;
70
+ hasRuntimeDefault: false;
71
+ enumValues: [string, ...string[]];
72
+ baseColumn: never;
73
+ identity: undefined;
74
+ generated: undefined;
75
+ }, {}, {
76
+ length: number | undefined;
77
+ }>;
78
+ sourceReference: import("drizzle-orm/sqlite-core").SQLiteColumn<{
79
+ name: "source_reference";
80
+ tableName: "plugins";
81
+ dataType: "string";
82
+ columnType: "SQLiteText";
83
+ data: string;
84
+ driverParam: string;
85
+ notNull: true;
86
+ hasDefault: false;
87
+ isPrimaryKey: false;
88
+ isAutoincrement: false;
89
+ hasRuntimeDefault: false;
90
+ enumValues: [string, ...string[]];
91
+ baseColumn: never;
92
+ identity: undefined;
93
+ generated: undefined;
94
+ }, {}, {
95
+ length: number | undefined;
96
+ }>;
97
+ sourceVersion: import("drizzle-orm/sqlite-core").SQLiteColumn<{
98
+ name: "source_version";
99
+ tableName: "plugins";
100
+ dataType: "string";
101
+ columnType: "SQLiteText";
102
+ data: string;
103
+ driverParam: string;
104
+ notNull: true;
105
+ hasDefault: false;
106
+ isPrimaryKey: false;
107
+ isAutoincrement: false;
108
+ hasRuntimeDefault: false;
109
+ enumValues: [string, ...string[]];
110
+ baseColumn: never;
111
+ identity: undefined;
112
+ generated: undefined;
113
+ }, {}, {
114
+ length: number | undefined;
115
+ }>;
116
+ packageDigest: import("drizzle-orm/sqlite-core").SQLiteColumn<{
117
+ name: "package_digest";
118
+ tableName: "plugins";
119
+ dataType: "string";
120
+ columnType: "SQLiteText";
121
+ data: string;
122
+ driverParam: string;
123
+ notNull: true;
124
+ hasDefault: false;
125
+ isPrimaryKey: false;
126
+ isAutoincrement: false;
127
+ hasRuntimeDefault: false;
128
+ enumValues: [string, ...string[]];
129
+ baseColumn: never;
130
+ identity: undefined;
131
+ generated: undefined;
132
+ }, {}, {
133
+ length: number | undefined;
134
+ }>;
135
+ containerImageId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
136
+ name: "container_image_id";
137
+ tableName: "plugin_installations";
138
+ dataType: "string";
139
+ columnType: "SQLiteText";
140
+ data: string;
141
+ driverParam: string;
142
+ notNull: false;
143
+ hasDefault: false;
144
+ isPrimaryKey: false;
145
+ isAutoincrement: false;
146
+ hasRuntimeDefault: false;
147
+ enumValues: [string, ...string[]];
148
+ baseColumn: never;
149
+ identity: undefined;
150
+ generated: undefined;
151
+ }, {}, {
152
+ length: number | undefined;
153
+ }>;
154
+ status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
155
+ name: "status";
156
+ tableName: "plugin_installations";
157
+ dataType: "string";
158
+ columnType: "SQLiteText";
159
+ data: string;
160
+ driverParam: string;
161
+ notNull: true;
162
+ hasDefault: true;
163
+ isPrimaryKey: false;
164
+ isAutoincrement: false;
165
+ hasRuntimeDefault: false;
166
+ enumValues: [string, ...string[]];
167
+ baseColumn: never;
168
+ identity: undefined;
169
+ generated: undefined;
170
+ }, {}, {
171
+ length: number | undefined;
172
+ }>;
173
+ statusDetail: import("drizzle-orm/sqlite-core").SQLiteColumn<{
174
+ name: "status_detail";
175
+ tableName: "plugin_installations";
176
+ dataType: "string";
177
+ columnType: "SQLiteText";
178
+ data: string;
179
+ driverParam: string;
180
+ notNull: false;
181
+ hasDefault: false;
182
+ isPrimaryKey: false;
183
+ isAutoincrement: false;
184
+ hasRuntimeDefault: false;
185
+ enumValues: [string, ...string[]];
186
+ baseColumn: never;
187
+ identity: undefined;
188
+ generated: undefined;
189
+ }, {}, {
190
+ length: number | undefined;
191
+ }>;
192
+ lastError: import("drizzle-orm/sqlite-core").SQLiteColumn<{
193
+ name: "last_error";
194
+ tableName: "plugin_installations";
195
+ dataType: "string";
196
+ columnType: "SQLiteText";
197
+ data: string;
198
+ driverParam: string;
199
+ notNull: false;
200
+ hasDefault: false;
201
+ isPrimaryKey: false;
202
+ isAutoincrement: false;
203
+ hasRuntimeDefault: false;
204
+ enumValues: [string, ...string[]];
205
+ baseColumn: never;
206
+ identity: undefined;
207
+ generated: undefined;
208
+ }, {}, {
209
+ length: number | undefined;
210
+ }>;
211
+ installedByUserId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
212
+ name: "installed_by_user_id";
213
+ tableName: "plugin_installations";
214
+ dataType: "string";
215
+ columnType: "SQLiteText";
216
+ data: string;
217
+ driverParam: string;
218
+ notNull: false;
219
+ hasDefault: false;
220
+ isPrimaryKey: false;
221
+ isAutoincrement: false;
222
+ hasRuntimeDefault: false;
223
+ enumValues: [string, ...string[]];
224
+ baseColumn: never;
225
+ identity: undefined;
226
+ generated: undefined;
227
+ }, {}, {
228
+ length: number | undefined;
229
+ }>;
230
+ installedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
231
+ name: "installed_at";
232
+ tableName: "plugin_installations";
233
+ dataType: "string";
234
+ columnType: "SQLiteText";
235
+ data: string;
236
+ driverParam: string;
237
+ notNull: true;
238
+ hasDefault: true;
239
+ isPrimaryKey: false;
240
+ isAutoincrement: false;
241
+ hasRuntimeDefault: false;
242
+ enumValues: [string, ...string[]];
243
+ baseColumn: never;
244
+ identity: undefined;
245
+ generated: undefined;
246
+ }, {}, {
247
+ length: number | undefined;
248
+ }>;
249
+ updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
250
+ name: "updated_at";
251
+ tableName: "plugin_installations";
252
+ dataType: "string";
253
+ columnType: "SQLiteText";
254
+ data: string;
255
+ driverParam: string;
256
+ notNull: true;
257
+ hasDefault: true;
258
+ isPrimaryKey: false;
259
+ isAutoincrement: false;
260
+ hasRuntimeDefault: false;
261
+ enumValues: [string, ...string[]];
262
+ baseColumn: never;
263
+ identity: undefined;
264
+ generated: undefined;
265
+ }, {}, {
266
+ length: number | undefined;
267
+ }>;
268
+ readyAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
269
+ name: "ready_at";
270
+ tableName: "plugin_installations";
271
+ dataType: "string";
272
+ columnType: "SQLiteText";
273
+ data: string;
274
+ driverParam: string;
275
+ notNull: false;
276
+ hasDefault: false;
277
+ isPrimaryKey: false;
278
+ isAutoincrement: false;
279
+ hasRuntimeDefault: false;
280
+ enumValues: [string, ...string[]];
281
+ baseColumn: never;
282
+ identity: undefined;
283
+ generated: undefined;
284
+ }, {}, {
285
+ length: number | undefined;
286
+ }>;
287
+ };
288
+ //# sourceMappingURL=installationSelection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installationSelection.d.ts","sourceRoot":"","sources":["../../../../sources/modules/plugin/impl/installationSelection.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,2BAA2B;IACpC,EAAE;;;;;;;;;;;;;;;;;;;IACF,QAAQ;;;;;;;;;;;;;;;;;;;IACR,SAAS;;;;;;;;;;;;;;;;;;;IACT,UAAU;;;;;;;;;;;;;;;;;;;IACV,eAAe;;;;;;;;;;;;;;;;;;;IACf,aAAa;;;;;;;;;;;;;;;;;;;IACb,aAAa;;;;;;;;;;;;;;;;;;;IACb,gBAAgB;;;;;;;;;;;;;;;;;;;IAChB,MAAM;;;;;;;;;;;;;;;;;;;IACN,YAAY;;;;;;;;;;;;;;;;;;;IACZ,SAAS;;;;;;;;;;;;;;;;;;;IACT,iBAAiB;;;;;;;;;;;;;;;;;;;IACjB,WAAW;;;;;;;;;;;;;;;;;;;IACX,SAAS;;;;;;;;;;;;;;;;;;;IACT,OAAO;;;;;;;;;;;;;;;;;;;CACV,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { pluginInstallations, plugins } from "../../schema.js";
2
+ export const pluginInstallationSelection = {
3
+ id: pluginInstallations.id,
4
+ pluginId: pluginInstallations.pluginId,
5
+ shortName: plugins.shortName,
6
+ sourceKind: plugins.sourceKind,
7
+ sourceReference: plugins.sourceReference,
8
+ sourceVersion: plugins.sourceVersion,
9
+ packageDigest: plugins.packageDigest,
10
+ containerImageId: pluginInstallations.containerImageId,
11
+ status: pluginInstallations.status,
12
+ statusDetail: pluginInstallations.statusDetail,
13
+ lastError: pluginInstallations.lastError,
14
+ installedByUserId: pluginInstallations.installedByUserId,
15
+ installedAt: pluginInstallations.installedAt,
16
+ updatedAt: pluginInstallations.updatedAt,
17
+ readyAt: pluginInstallations.readyAt,
18
+ };
19
+ //# sourceMappingURL=installationSelection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installationSelection.js","sourceRoot":"","sources":["../../../../sources/modules/plugin/impl/installationSelection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/D,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACvC,EAAE,EAAE,mBAAmB,CAAC,EAAE;IAC1B,QAAQ,EAAE,mBAAmB,CAAC,QAAQ;IACtC,SAAS,EAAE,OAAO,CAAC,SAAS;IAC5B,UAAU,EAAE,OAAO,CAAC,UAAU;IAC9B,eAAe,EAAE,OAAO,CAAC,eAAe;IACxC,aAAa,EAAE,OAAO,CAAC,aAAa;IACpC,aAAa,EAAE,OAAO,CAAC,aAAa;IACpC,gBAAgB,EAAE,mBAAmB,CAAC,gBAAgB;IACtD,MAAM,EAAE,mBAAmB,CAAC,MAAM;IAClC,YAAY,EAAE,mBAAmB,CAAC,YAAY;IAC9C,SAAS,EAAE,mBAAmB,CAAC,SAAS;IACxC,iBAAiB,EAAE,mBAAmB,CAAC,iBAAiB;IACxD,WAAW,EAAE,mBAAmB,CAAC,WAAW;IAC5C,SAAS,EAAE,mBAAmB,CAAC,SAAS;IACxC,OAAO,EAAE,mBAAmB,CAAC,OAAO;CACvC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type PluginManifest } from "../types.js";
2
+ export declare function installedManifest(source: string): PluginManifest;
3
+ //# sourceMappingURL=installedManifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installedManifest.d.ts","sourceRoot":"","sources":["../../../../sources/modules/plugin/impl/installedManifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAqBhE"}
@@ -0,0 +1,63 @@
1
+ import { PluginError } from "../types.js";
2
+ export function installedManifest(source) {
3
+ let value;
4
+ try {
5
+ value = JSON.parse(source);
6
+ }
7
+ catch {
8
+ throw unreadable();
9
+ }
10
+ if (!record(value))
11
+ throw unreadable();
12
+ if (value.schemaVersion !== 1 ||
13
+ typeof value.version !== "string" ||
14
+ typeof value.displayName !== "string" ||
15
+ typeof value.shortName !== "string" ||
16
+ typeof value.description !== "string" ||
17
+ !Array.isArray(value.variables) ||
18
+ !value.variables.every(variable))
19
+ throw unreadable();
20
+ if (value.container !== undefined && !container(value.container))
21
+ throw unreadable();
22
+ if (value.mcp !== undefined && !mcp(value.mcp))
23
+ throw unreadable();
24
+ return value;
25
+ }
26
+ function container(value) {
27
+ return (record(value) &&
28
+ (value.dockerfile === undefined || typeof value.dockerfile === "string") &&
29
+ (value.command === undefined || typeof value.command === "string") &&
30
+ Array.isArray(value.args) &&
31
+ value.args.every((argument) => typeof argument === "string") &&
32
+ Array.isArray(value.permissions) &&
33
+ value.permissions.every((permission) => permission === "plugins:list"));
34
+ }
35
+ function variable(value) {
36
+ return (record(value) &&
37
+ typeof value.key === "string" &&
38
+ typeof value.displayName === "string" &&
39
+ typeof value.description === "string" &&
40
+ (value.kind === "secret" || value.kind === "text"));
41
+ }
42
+ function mcp(value) {
43
+ if (!record(value))
44
+ return false;
45
+ if (value.type === "remote")
46
+ return (typeof value.url === "string" &&
47
+ record(value.headers) &&
48
+ Object.values(value.headers).every((header) => typeof header === "string"));
49
+ if (value.type !== "stdio")
50
+ return false;
51
+ return (typeof value.command === "string" &&
52
+ Array.isArray(value.args) &&
53
+ value.args.every((argument) => typeof argument === "string") &&
54
+ (value.container === undefined ||
55
+ (record(value.container) && typeof value.container.dockerfile === "string")));
56
+ }
57
+ function record(value) {
58
+ return Boolean(value && typeof value === "object" && !Array.isArray(value));
59
+ }
60
+ function unreadable() {
61
+ return new PluginError("broken_configuration", "Installed plugin manifest is unreadable");
62
+ }
63
+ //# sourceMappingURL=installedManifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installedManifest.js","sourceRoot":"","sources":["../../../../sources/modules/plugin/impl/installedManifest.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=installedManifest.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installedManifest.test.d.ts","sourceRoot":"","sources":["../../../../sources/modules/plugin/impl/installedManifest.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { installedManifest } from "./installedManifest.js";
3
+ describe("installedManifest", () => {
4
+ it("rejects null and structurally incomplete persisted manifests", () => {
5
+ expect(() => installedManifest("null")).toThrow("Installed plugin manifest is unreadable");
6
+ expect(() => installedManifest(JSON.stringify({
7
+ schemaVersion: 1,
8
+ version: "1.0.0",
9
+ displayName: "Broken",
10
+ shortName: "broken",
11
+ description: "Broken manifest",
12
+ variables: [],
13
+ mcp: { type: "remote", url: "https://example.com", headers: null },
14
+ }))).toThrow("Installed plugin manifest is unreadable");
15
+ });
16
+ });
17
+ //# sourceMappingURL=installedManifest.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installedManifest.test.js","sourceRoot":"","sources":["../../../../sources/modules/plugin/impl/installedManifest.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,8DAA8D,EAAE,GAAG,EAAE;QACpE,MAAM,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,yCAAyC,CAAC,CAAC;QAC3F,MAAM,CAAC,GAAG,EAAE,CACR,iBAAiB,CACb,IAAI,CAAC,SAAS,CAAC;YACX,aAAa,EAAE,CAAC;YAChB,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,QAAQ;YACrB,SAAS,EAAE,QAAQ;YACnB,WAAW,EAAE,iBAAiB;YAC9B,SAAS,EAAE,EAAE;YACb,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,qBAAqB,EAAE,OAAO,EAAE,IAAI,EAAE;SACrE,CAAC,CACL,CACJ,CAAC,OAAO,CAAC,yCAAyC,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { PluginFunctionResult } from "../types.js";
2
+ export declare function parsePluginFunctionResult(value: string): PluginFunctionResult;
3
+ //# sourceMappingURL=pluginFunctionResult.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pluginFunctionResult.d.ts","sourceRoot":"","sources":["../../../../sources/modules/plugin/impl/pluginFunctionResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,oBAAoB,CAe7E"}
@@ -0,0 +1,16 @@
1
+ export function parsePluginFunctionResult(value) {
2
+ const parsed = JSON.parse(value);
3
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
4
+ throw new Error("Stored plugin function result is invalid");
5
+ const result = parsed;
6
+ if (result.status === "completed")
7
+ return parsed;
8
+ if (result.status === "failed" &&
9
+ result.error &&
10
+ typeof result.error === "object" &&
11
+ !Array.isArray(result.error) &&
12
+ typeof result.error.message === "string")
13
+ return parsed;
14
+ throw new Error("Stored plugin function result is invalid");
15
+ }
16
+ //# sourceMappingURL=pluginFunctionResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pluginFunctionResult.js","sourceRoot":"","sources":["../../../../sources/modules/plugin/impl/pluginFunctionResult.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,yBAAyB,CAAC,KAAa;IACnD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAY,CAAC;IAC5C,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAC9D,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAChE,MAAM,MAAM,GAAG,MAAiC,CAAC;IACjD,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW;QAAE,OAAO,MAA8B,CAAC;IACzE,IACI,MAAM,CAAC,MAAM,KAAK,QAAQ;QAC1B,MAAM,CAAC,KAAK;QACZ,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ;QAChC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;QAC5B,OAAQ,MAAM,CAAC,KAAiC,CAAC,OAAO,KAAK,QAAQ;QAErE,OAAO,MAA8B,CAAC;IAC1C,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;AAChE,CAAC"}