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
@@ -13,8 +13,8 @@
13
13
  background: #131217;
14
14
  }
15
15
  </style>
16
- <script type="module" crossorigin src="/assets/index-DH1SOwNV.js"></script>
17
- <link rel="stylesheet" crossorigin href="/assets/index-DZ1uRLgV.css">
16
+ <script type="module" crossorigin src="/assets/index-9SGCQLg7.js"></script>
17
+ <link rel="stylesheet" crossorigin href="/assets/index-DWXBQDJB.css">
18
18
  </head>
19
19
  <body>
20
20
  <div id="root"></div>
@@ -0,0 +1,61 @@
1
+ CREATE TABLE `plugins` (
2
+ `id` text PRIMARY KEY NOT NULL,
3
+ `display_name` text NOT NULL,
4
+ `short_name` text NOT NULL,
5
+ `description` text NOT NULL,
6
+ `source_kind` text NOT NULL,
7
+ `source_reference` text NOT NULL,
8
+ `source_version` text NOT NULL,
9
+ `package_digest` text NOT NULL,
10
+ `manifest_json` text NOT NULL,
11
+ `package_directory` text NOT NULL,
12
+ `image_storage_key` text NOT NULL,
13
+ `image_content_type` text NOT NULL,
14
+ `image_size` integer NOT NULL,
15
+ `image_width` integer NOT NULL,
16
+ `image_height` integer NOT NULL,
17
+ `image_thumbhash` text NOT NULL,
18
+ `image_checksum_sha256` text NOT NULL,
19
+ `installed_by_user_id` text,
20
+ `sync_sequence` integer DEFAULT 0 NOT NULL,
21
+ `installed_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
22
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
23
+ FOREIGN KEY (`installed_by_user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE set null
24
+ );
25
+ --> statement-breakpoint
26
+ CREATE UNIQUE INDEX `plugins_short_name_unique` ON `plugins` (`short_name`);
27
+ --> statement-breakpoint
28
+ CREATE UNIQUE INDEX `plugins_source_unique` ON `plugins` (`source_kind`,`source_reference`);
29
+ --> statement-breakpoint
30
+ CREATE TABLE `plugin_installations` (
31
+ `id` text PRIMARY KEY NOT NULL,
32
+ `plugin_id` text NOT NULL,
33
+ `container_image_id` text,
34
+ `runtime_image_tag` text,
35
+ `container_name` text,
36
+ `status` text DEFAULT 'preparing' NOT NULL,
37
+ `status_detail` text,
38
+ `last_error` text,
39
+ `installed_by_user_id` text,
40
+ `sync_sequence` integer DEFAULT 0 NOT NULL,
41
+ `installed_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
42
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
43
+ `ready_at` text,
44
+ FOREIGN KEY (`plugin_id`) REFERENCES `plugins`(`id`) ON UPDATE no action ON DELETE restrict,
45
+ FOREIGN KEY (`container_image_id`) REFERENCES `agent_images`(`id`) ON UPDATE no action ON DELETE restrict,
46
+ FOREIGN KEY (`installed_by_user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE set null
47
+ );
48
+ --> statement-breakpoint
49
+ CREATE INDEX `plugin_installations_plugin_id_index` ON `plugin_installations` (`plugin_id`);
50
+ --> statement-breakpoint
51
+ CREATE TABLE `plugin_installation_variables` (
52
+ `installation_id` text NOT NULL,
53
+ `key` text NOT NULL,
54
+ `kind` text NOT NULL,
55
+ `text_value` text,
56
+ `secret_ciphertext` text,
57
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
58
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
59
+ PRIMARY KEY(`installation_id`, `key`),
60
+ FOREIGN KEY (`installation_id`) REFERENCES `plugin_installations`(`id`) ON UPDATE no action ON DELETE cascade
61
+ );
@@ -0,0 +1,11 @@
1
+ CREATE TABLE `plugin_function_results` (
2
+ `session_id` text NOT NULL,
3
+ `call_id` text NOT NULL,
4
+ `status` text DEFAULT 'in_progress' NOT NULL,
5
+ `lease_token` text,
6
+ `locked_until` text,
7
+ `resolution_json` text,
8
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
9
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
10
+ PRIMARY KEY(`session_id`, `call_id`)
11
+ );
@@ -0,0 +1,16 @@
1
+ ALTER TABLE `plugin_installations` ADD `mcp_tools_synced_at` text;
2
+ --> statement-breakpoint
3
+ ALTER TABLE `plugin_installations` ADD `container_instance_id` text;
4
+ --> statement-breakpoint
5
+ CREATE TABLE `plugin_mcp_tools` (
6
+ `installation_id` text NOT NULL,
7
+ `name` text NOT NULL,
8
+ `title` text,
9
+ `description` text,
10
+ `input_schema_json` text NOT NULL,
11
+ `output_schema_json` text,
12
+ `annotations_json` text,
13
+ `synced_at` text NOT NULL,
14
+ PRIMARY KEY(`installation_id`, `name`),
15
+ FOREIGN KEY (`installation_id`) REFERENCES `plugin_installations`(`id`) ON UPDATE no action ON DELETE cascade
16
+ );
@@ -141,6 +141,27 @@
141
141
  "when": 1784360000000,
142
142
  "tag": "0019_channel_agent_audiences",
143
143
  "breakpoints": true
144
+ },
145
+ {
146
+ "idx": 20,
147
+ "version": "6",
148
+ "when": 1784365000000,
149
+ "tag": "0020_plugins",
150
+ "breakpoints": true
151
+ },
152
+ {
153
+ "idx": 21,
154
+ "version": "6",
155
+ "when": 1784418000000,
156
+ "tag": "0021_plugin_function_results",
157
+ "breakpoints": true
158
+ },
159
+ {
160
+ "idx": 22,
161
+ "version": "6",
162
+ "when": 1784420000000,
163
+ "tag": "0022_plugin_container_runtime_tools",
164
+ "breakpoints": true
144
165
  }
145
166
  ]
146
167
  }
@@ -9,6 +9,14 @@ public_url = "http://127.0.0.1:3000"
9
9
  # A wrong nonzero value lets clients spoof rate-limit and access telemetry IPs.
10
10
  trusted_proxy_hops = 0
11
11
 
12
+ [plugins]
13
+ # Dedicated capability-only listener reached by plugin containers through the
14
+ # happy2.host.internal container-host mapping.
15
+ # The cross-platform host-gateway path requires a non-loopback bind. Firewall
16
+ # this fixed port from untrusted LANs; it is not a public product API.
17
+ host_api_host = "0.0.0.0"
18
+ host_api_port = 3001
19
+
12
20
  [database]
13
21
  # A local file works for one host. Use a shared libSQL endpoint when auth and
14
22
  # API are independently deployed, so every instance sees the same sessions.
@@ -48,6 +56,11 @@ malware_scan_timeout_seconds = 120
48
56
  # "deny" quarantines files when the scanner is unavailable; "allow" fails open.
49
57
  malware_scan_failure_mode = "deny"
50
58
 
59
+ [plugins]
60
+ # Immutable installed package snapshots live here. Keep this persistent so a
61
+ # bundled plugin continues to run until an explicit upgrade replaces it.
62
+ directory = "plugins"
63
+
51
64
  [security]
52
65
  integration_secret_env = "HAPPY2_INTEGRATION_SECRET"
53
66
 
@@ -0,0 +1,7 @@
1
+ # Bundled plugins
2
+
3
+ Each child directory is one immutable, built-in plugin package. See
4
+ [`../PLUGINS.md`](../PLUGINS.md) for the manifest and package contract.
5
+
6
+ `hello` is the minimal built-in example with both a skill and a bundled stdio MCP
7
+ tool. Product plugins should be added here as separate, reviewable changes.
@@ -0,0 +1,6 @@
1
+ FROM node:22-alpine
2
+
3
+ WORKDIR /plugin
4
+ COPY server.mjs /plugin/server.mjs
5
+
6
+ CMD ["sleep", "infinity"]
@@ -0,0 +1,16 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "version": "1.0.0",
4
+ "displayName": "Hello",
5
+ "shortName": "hello",
6
+ "description": "A tiny built-in skill and MCP tool that help an agent greet people warmly.",
7
+ "variables": [],
8
+ "mcp": {
9
+ "type": "stdio",
10
+ "command": "node",
11
+ "args": ["/plugin/server.mjs"],
12
+ "container": {
13
+ "dockerfile": "container/Dockerfile"
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,75 @@
1
+ import { createInterface } from "node:readline";
2
+
3
+ const lines = createInterface({ input: process.stdin, crlfDelay: Infinity });
4
+
5
+ for await (const line of lines) {
6
+ if (!line.trim()) continue;
7
+ let request;
8
+ try {
9
+ request = JSON.parse(line);
10
+ } catch {
11
+ continue;
12
+ }
13
+ if (request.id === undefined) continue;
14
+ const result = handle(request);
15
+ process.stdout.write(`${JSON.stringify({ jsonrpc: "2.0", id: request.id, ...result })}\n`);
16
+ }
17
+
18
+ function handle(request) {
19
+ if (request.method === "initialize") {
20
+ return {
21
+ result: {
22
+ protocolVersion: request.params?.protocolVersion ?? "2025-06-18",
23
+ capabilities: { tools: {} },
24
+ serverInfo: { name: "happy2-hello", version: "1.0.0" },
25
+ },
26
+ };
27
+ }
28
+ if (request.method === "ping") return { result: {} };
29
+ if (request.method === "tools/list") {
30
+ return {
31
+ result: {
32
+ tools: [
33
+ {
34
+ name: "hello_greet",
35
+ title: "Greet someone",
36
+ description: "Creates a short, friendly greeting for a person.",
37
+ inputSchema: {
38
+ type: "object",
39
+ properties: {
40
+ name: {
41
+ type: "string",
42
+ description: "The name of the person to greet.",
43
+ },
44
+ },
45
+ required: ["name"],
46
+ additionalProperties: false,
47
+ },
48
+ },
49
+ ],
50
+ },
51
+ };
52
+ }
53
+ if (request.method === "tools/call" && request.params?.name === "hello_greet") {
54
+ const name =
55
+ typeof request.params.arguments?.name === "string"
56
+ ? request.params.arguments.name.trim()
57
+ : "";
58
+ if (!name) {
59
+ return {
60
+ result: {
61
+ isError: true,
62
+ content: [{ type: "text", text: "A non-empty name is required." }],
63
+ },
64
+ };
65
+ }
66
+ return {
67
+ result: {
68
+ content: [{ type: "text", text: `Hello, ${name}! It’s lovely to meet you.` }],
69
+ },
70
+ };
71
+ }
72
+ return {
73
+ error: { code: -32601, message: `Method not found: ${String(request.method)}` },
74
+ };
75
+ }
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: hello
3
+ description: Give the user a short, friendly greeting when they ask the agent to say hello or demonstrate the Hello plugin.
4
+ ---
5
+
6
+ # Hello
7
+
8
+ Respond with a concise, warm greeting that fits the user's tone.
9
+
10
+ If the user is testing the plugin, mention that the Hello skill is working. Do not
11
+ claim that the skill provides tools, external data, or an MCP server.