@vibesdotdev/applets 0.0.0-stage → 1.0.0-rc.3

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 (421) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +43 -2
  3. package/dist/applet-gate.d.ts +47 -0
  4. package/dist/applet-gate.d.ts.map +1 -0
  5. package/dist/applet-gate.js +167 -0
  6. package/dist/applet-gate.js.map +1 -0
  7. package/dist/applet-root-surface.d.ts +135 -0
  8. package/dist/applet-root-surface.d.ts.map +1 -0
  9. package/dist/applet-root-surface.js +222 -0
  10. package/dist/applet-root-surface.js.map +1 -0
  11. package/dist/applet-value-bound.d.ts +24 -0
  12. package/dist/applet-value-bound.d.ts.map +1 -0
  13. package/dist/applet-value-bound.js +46 -0
  14. package/dist/applet-value-bound.js.map +1 -0
  15. package/dist/applets.cloud.plugin.d.ts +4 -0
  16. package/dist/applets.cloud.plugin.d.ts.map +1 -0
  17. package/dist/applets.cloud.plugin.js +11 -0
  18. package/dist/applets.cloud.plugin.js.map +1 -0
  19. package/dist/applets.consumer.plugin.d.ts +4 -0
  20. package/dist/applets.consumer.plugin.d.ts.map +1 -0
  21. package/dist/applets.consumer.plugin.js +11 -0
  22. package/dist/applets.consumer.plugin.js.map +1 -0
  23. package/dist/applets.plugin.d.ts +3 -0
  24. package/dist/applets.plugin.d.ts.map +1 -0
  25. package/dist/applets.plugin.js +30 -0
  26. package/dist/applets.plugin.js.map +1 -0
  27. package/dist/authorization.d.ts +87 -0
  28. package/dist/authorization.d.ts.map +1 -0
  29. package/dist/authorization.js +189 -0
  30. package/dist/authorization.js.map +1 -0
  31. package/dist/browser-runtime.d.ts +34 -0
  32. package/dist/browser-runtime.d.ts.map +1 -0
  33. package/dist/browser-runtime.js +5 -0
  34. package/dist/browser-runtime.js.map +1 -0
  35. package/dist/build-definition.d.ts +34 -0
  36. package/dist/build-definition.d.ts.map +1 -0
  37. package/dist/build-definition.js +44 -0
  38. package/dist/build-definition.js.map +1 -0
  39. package/dist/capabilities/capability.kind.d.ts +44 -0
  40. package/dist/capabilities/capability.kind.d.ts.map +1 -0
  41. package/dist/capabilities/capability.kind.js +17 -0
  42. package/dist/capabilities/capability.kind.js.map +1 -0
  43. package/dist/capabilities/runtime-dispatch.d.ts +9 -0
  44. package/dist/capabilities/runtime-dispatch.d.ts.map +1 -0
  45. package/dist/capabilities/runtime-dispatch.js +62 -0
  46. package/dist/capabilities/runtime-dispatch.js.map +1 -0
  47. package/dist/cli/applet-group.descriptor.d.ts +11 -0
  48. package/dist/cli/applet-group.descriptor.d.ts.map +1 -0
  49. package/dist/cli/applet-group.descriptor.js +19 -0
  50. package/dist/cli/applet-group.descriptor.js.map +1 -0
  51. package/dist/cli/applet-local-store.storage.descriptor.d.ts +66 -0
  52. package/dist/cli/applet-local-store.storage.descriptor.d.ts.map +1 -0
  53. package/dist/cli/applet-local-store.storage.descriptor.js +39 -0
  54. package/dist/cli/applet-local-store.storage.descriptor.js.map +1 -0
  55. package/dist/cli/applet-serve.process.descriptor.d.ts +37 -0
  56. package/dist/cli/applet-serve.process.descriptor.d.ts.map +1 -0
  57. package/dist/cli/applet-serve.process.descriptor.js +41 -0
  58. package/dist/cli/applet-serve.process.descriptor.js.map +1 -0
  59. package/dist/cli/commands/build.command.descriptor.d.ts +40 -0
  60. package/dist/cli/commands/build.command.descriptor.d.ts.map +1 -0
  61. package/dist/cli/commands/build.command.descriptor.js +52 -0
  62. package/dist/cli/commands/build.command.descriptor.js.map +1 -0
  63. package/dist/cli/commands/build.command.impl.d.ts +8 -0
  64. package/dist/cli/commands/build.command.impl.d.ts.map +1 -0
  65. package/dist/cli/commands/build.command.impl.js +116 -0
  66. package/dist/cli/commands/build.command.impl.js.map +1 -0
  67. package/dist/cli/commands/init.command.descriptor.d.ts +29 -0
  68. package/dist/cli/commands/init.command.descriptor.d.ts.map +1 -0
  69. package/dist/cli/commands/init.command.descriptor.js +23 -0
  70. package/dist/cli/commands/init.command.descriptor.js.map +1 -0
  71. package/dist/cli/commands/init.command.impl.d.ts +7 -0
  72. package/dist/cli/commands/init.command.impl.d.ts.map +1 -0
  73. package/dist/cli/commands/init.command.impl.js +64 -0
  74. package/dist/cli/commands/init.command.impl.js.map +1 -0
  75. package/dist/cli/commands/list.command.descriptor.d.ts +26 -0
  76. package/dist/cli/commands/list.command.descriptor.d.ts.map +1 -0
  77. package/dist/cli/commands/list.command.descriptor.js +22 -0
  78. package/dist/cli/commands/list.command.descriptor.js.map +1 -0
  79. package/dist/cli/commands/list.command.impl.d.ts +13 -0
  80. package/dist/cli/commands/list.command.impl.d.ts.map +1 -0
  81. package/dist/cli/commands/list.command.impl.js +47 -0
  82. package/dist/cli/commands/list.command.impl.js.map +1 -0
  83. package/dist/cli/commands/serve-stylesheet.d.ts +11 -0
  84. package/dist/cli/commands/serve-stylesheet.d.ts.map +1 -0
  85. package/dist/cli/commands/serve-stylesheet.js +50 -0
  86. package/dist/cli/commands/serve-stylesheet.js.map +1 -0
  87. package/dist/cli/commands/serve-surface.d.ts +36 -0
  88. package/dist/cli/commands/serve-surface.d.ts.map +1 -0
  89. package/dist/cli/commands/serve-surface.js +410 -0
  90. package/dist/cli/commands/serve-surface.js.map +1 -0
  91. package/dist/cli/commands/serve.command.descriptor.d.ts +42 -0
  92. package/dist/cli/commands/serve.command.descriptor.d.ts.map +1 -0
  93. package/dist/cli/commands/serve.command.descriptor.js +46 -0
  94. package/dist/cli/commands/serve.command.descriptor.js.map +1 -0
  95. package/dist/cli/commands/serve.command.impl.d.ts +110 -0
  96. package/dist/cli/commands/serve.command.impl.d.ts.map +1 -0
  97. package/dist/cli/commands/serve.command.impl.js +1105 -0
  98. package/dist/cli/commands/serve.command.impl.js.map +1 -0
  99. package/dist/cli/commands/serve.schemas.d.ts +127 -0
  100. package/dist/cli/commands/serve.schemas.d.ts.map +1 -0
  101. package/dist/cli/commands/serve.schemas.js +85 -0
  102. package/dist/cli/commands/serve.schemas.js.map +1 -0
  103. package/dist/cli/commands/served-applet-browser.d.ts +12 -0
  104. package/dist/cli/commands/served-applet-browser.d.ts.map +1 -0
  105. package/dist/cli/commands/served-applet-browser.js +48 -0
  106. package/dist/cli/commands/served-applet-browser.js.map +1 -0
  107. package/dist/cli/commands/served-applet-connection.d.ts +15 -0
  108. package/dist/cli/commands/served-applet-connection.d.ts.map +1 -0
  109. package/dist/cli/commands/served-applet-connection.js +25 -0
  110. package/dist/cli/commands/served-applet-connection.js.map +1 -0
  111. package/dist/cli/commands/served-applet-rpc.d.ts +16 -0
  112. package/dist/cli/commands/served-applet-rpc.d.ts.map +1 -0
  113. package/dist/cli/commands/served-applet-rpc.js +108 -0
  114. package/dist/cli/commands/served-applet-rpc.js.map +1 -0
  115. package/dist/cli/commands/served-applet-surface.d.ts +14 -0
  116. package/dist/cli/commands/served-applet-surface.d.ts.map +1 -0
  117. package/dist/cli/commands/served-applet-surface.js +99 -0
  118. package/dist/cli/commands/served-applet-surface.js.map +1 -0
  119. package/dist/cli/commands/templates.command.descriptor.d.ts +22 -0
  120. package/dist/cli/commands/templates.command.descriptor.d.ts.map +1 -0
  121. package/dist/cli/commands/templates.command.descriptor.js +21 -0
  122. package/dist/cli/commands/templates.command.descriptor.js.map +1 -0
  123. package/dist/cli/commands/templates.command.impl.d.ts +35 -0
  124. package/dist/cli/commands/templates.command.impl.d.ts.map +1 -0
  125. package/dist/cli/commands/templates.command.impl.js +59 -0
  126. package/dist/cli/commands/templates.command.impl.js.map +1 -0
  127. package/dist/cli/index.d.ts +7 -0
  128. package/dist/cli/index.d.ts.map +1 -0
  129. package/dist/cli/index.js +7 -0
  130. package/dist/cli/index.js.map +1 -0
  131. package/dist/cli/local-serve.authz-policy.descriptor.d.ts +22 -0
  132. package/dist/cli/local-serve.authz-policy.descriptor.d.ts.map +1 -0
  133. package/dist/cli/local-serve.authz-policy.descriptor.js +13 -0
  134. package/dist/cli/local-serve.authz-policy.descriptor.js.map +1 -0
  135. package/dist/cli/plugin.d.ts +19 -0
  136. package/dist/cli/plugin.d.ts.map +1 -0
  137. package/dist/cli/plugin.js +57 -0
  138. package/dist/cli/plugin.js.map +1 -0
  139. package/dist/cli/project-files.d.ts +48 -0
  140. package/dist/cli/project-files.d.ts.map +1 -0
  141. package/dist/cli/project-files.js +130 -0
  142. package/dist/cli/project-files.js.map +1 -0
  143. package/dist/client/contract.d.ts +113 -0
  144. package/dist/client/contract.d.ts.map +1 -0
  145. package/dist/client/contract.js +17 -0
  146. package/dist/client/contract.js.map +1 -0
  147. package/dist/client/index.d.ts +3 -0
  148. package/dist/client/index.d.ts.map +1 -0
  149. package/dist/client/index.js +3 -0
  150. package/dist/client/index.js.map +1 -0
  151. package/dist/client/repository.context.d.ts +113 -0
  152. package/dist/client/repository.context.d.ts.map +1 -0
  153. package/dist/client/repository.context.js +8 -0
  154. package/dist/client/repository.context.js.map +1 -0
  155. package/dist/client/runtime-client.d.ts +22 -0
  156. package/dist/client/runtime-client.d.ts.map +1 -0
  157. package/dist/client/runtime-client.js +200 -0
  158. package/dist/client/runtime-client.js.map +1 -0
  159. package/dist/companion-path.d.ts +25 -0
  160. package/dist/companion-path.d.ts.map +1 -0
  161. package/dist/companion-path.js +90 -0
  162. package/dist/companion-path.js.map +1 -0
  163. package/dist/component-ref.d.ts +12 -0
  164. package/dist/component-ref.d.ts.map +1 -0
  165. package/dist/component-ref.js +45 -0
  166. package/dist/component-ref.js.map +1 -0
  167. package/dist/composition-plan.d.ts +92 -0
  168. package/dist/composition-plan.d.ts.map +1 -0
  169. package/dist/composition-plan.js +44 -0
  170. package/dist/composition-plan.js.map +1 -0
  171. package/dist/composition.d.ts +97 -0
  172. package/dist/composition.d.ts.map +1 -0
  173. package/dist/composition.js +99 -0
  174. package/dist/composition.js.map +1 -0
  175. package/dist/config/applets.config.descriptor.d.ts +55 -0
  176. package/dist/config/applets.config.descriptor.d.ts.map +1 -0
  177. package/dist/config/applets.config.descriptor.js +37 -0
  178. package/dist/config/applets.config.descriptor.js.map +1 -0
  179. package/dist/config/load.d.ts +4 -0
  180. package/dist/config/load.d.ts.map +1 -0
  181. package/dist/config/load.js +12 -0
  182. package/dist/config/load.js.map +1 -0
  183. package/dist/content-path.d.ts +62 -0
  184. package/dist/content-path.d.ts.map +1 -0
  185. package/dist/content-path.js +121 -0
  186. package/dist/content-path.js.map +1 -0
  187. package/dist/contribution-registry.d.ts +270 -0
  188. package/dist/contribution-registry.d.ts.map +1 -0
  189. package/dist/contribution-registry.js +488 -0
  190. package/dist/contribution-registry.js.map +1 -0
  191. package/dist/docs/applets.docs.descriptor.d.ts +4 -0
  192. package/dist/docs/applets.docs.descriptor.d.ts.map +1 -0
  193. package/dist/docs/applets.docs.descriptor.js +74 -0
  194. package/dist/docs/applets.docs.descriptor.js.map +1 -0
  195. package/dist/host/local-host.contract.d.ts +7 -0
  196. package/dist/host/local-host.contract.d.ts.map +1 -0
  197. package/dist/host/local-host.contract.js +2 -0
  198. package/dist/host/local-host.contract.js.map +1 -0
  199. package/dist/host/local-host.impl.d.ts +9 -0
  200. package/dist/host/local-host.impl.d.ts.map +1 -0
  201. package/dist/host/local-host.impl.js +41 -0
  202. package/dist/host/local-host.impl.js.map +1 -0
  203. package/dist/host/local-host.plugin.d.ts +3 -0
  204. package/dist/host/local-host.plugin.d.ts.map +1 -0
  205. package/dist/host/local-host.plugin.js +16 -0
  206. package/dist/host/local-host.plugin.js.map +1 -0
  207. package/dist/index.d.ts +28 -0
  208. package/dist/index.d.ts.map +1 -0
  209. package/dist/index.js +27 -0
  210. package/dist/index.js.map +1 -0
  211. package/dist/local-project.d.ts +106 -0
  212. package/dist/local-project.d.ts.map +1 -0
  213. package/dist/local-project.js +277 -0
  214. package/dist/local-project.js.map +1 -0
  215. package/dist/manifest-hash.d.ts +12 -0
  216. package/dist/manifest-hash.d.ts.map +1 -0
  217. package/dist/manifest-hash.js +76 -0
  218. package/dist/manifest-hash.js.map +1 -0
  219. package/dist/presentation.d.ts +43 -0
  220. package/dist/presentation.d.ts.map +1 -0
  221. package/dist/presentation.js +36 -0
  222. package/dist/presentation.js.map +1 -0
  223. package/dist/retention.d.ts +34 -0
  224. package/dist/retention.d.ts.map +1 -0
  225. package/dist/retention.js +51 -0
  226. package/dist/retention.js.map +1 -0
  227. package/dist/schemas/applet-messages.d.ts +97 -0
  228. package/dist/schemas/applet-messages.d.ts.map +1 -0
  229. package/dist/schemas/applet-messages.js +51 -0
  230. package/dist/schemas/applet-messages.js.map +1 -0
  231. package/dist/schemas/capabilities.d.ts +37 -0
  232. package/dist/schemas/capabilities.d.ts.map +1 -0
  233. package/dist/schemas/capabilities.js +28 -0
  234. package/dist/schemas/capabilities.js.map +1 -0
  235. package/dist/schemas/component-release-ref.d.ts +13 -0
  236. package/dist/schemas/component-release-ref.d.ts.map +1 -0
  237. package/dist/schemas/component-release-ref.js +21 -0
  238. package/dist/schemas/component-release-ref.js.map +1 -0
  239. package/dist/schemas/contributes.d.ts +306 -0
  240. package/dist/schemas/contributes.d.ts.map +1 -0
  241. package/dist/schemas/contributes.js +184 -0
  242. package/dist/schemas/contributes.js.map +1 -0
  243. package/dist/schemas/definition.d.ts +301 -0
  244. package/dist/schemas/definition.d.ts.map +1 -0
  245. package/dist/schemas/definition.js +457 -0
  246. package/dist/schemas/definition.js.map +1 -0
  247. package/dist/schemas/dispatch.d.ts +52 -0
  248. package/dist/schemas/dispatch.d.ts.map +1 -0
  249. package/dist/schemas/dispatch.js +32 -0
  250. package/dist/schemas/dispatch.js.map +1 -0
  251. package/dist/schemas/grants.d.ts +56 -0
  252. package/dist/schemas/grants.d.ts.map +1 -0
  253. package/dist/schemas/grants.js +64 -0
  254. package/dist/schemas/grants.js.map +1 -0
  255. package/dist/schemas/index.d.ts +16 -0
  256. package/dist/schemas/index.d.ts.map +1 -0
  257. package/dist/schemas/index.js +16 -0
  258. package/dist/schemas/index.js.map +1 -0
  259. package/dist/schemas/instance.d.ts +230 -0
  260. package/dist/schemas/instance.d.ts.map +1 -0
  261. package/dist/schemas/instance.js +44 -0
  262. package/dist/schemas/instance.js.map +1 -0
  263. package/dist/schemas/lineage.d.ts +60 -0
  264. package/dist/schemas/lineage.d.ts.map +1 -0
  265. package/dist/schemas/lineage.js +52 -0
  266. package/dist/schemas/lineage.js.map +1 -0
  267. package/dist/schemas/observation.d.ts +70 -0
  268. package/dist/schemas/observation.d.ts.map +1 -0
  269. package/dist/schemas/observation.js +49 -0
  270. package/dist/schemas/observation.js.map +1 -0
  271. package/dist/schemas/patterns.d.ts +24 -0
  272. package/dist/schemas/patterns.d.ts.map +1 -0
  273. package/dist/schemas/patterns.js +24 -0
  274. package/dist/schemas/patterns.js.map +1 -0
  275. package/dist/schemas/publishing.d.ts +27 -0
  276. package/dist/schemas/publishing.d.ts.map +1 -0
  277. package/dist/schemas/publishing.js +20 -0
  278. package/dist/schemas/publishing.js.map +1 -0
  279. package/dist/schemas/run.d.ts +35 -0
  280. package/dist/schemas/run.d.ts.map +1 -0
  281. package/dist/schemas/run.js +26 -0
  282. package/dist/schemas/run.js.map +1 -0
  283. package/dist/schemas/share-link.d.ts +61 -0
  284. package/dist/schemas/share-link.d.ts.map +1 -0
  285. package/dist/schemas/share-link.js +68 -0
  286. package/dist/schemas/share-link.js.map +1 -0
  287. package/dist/schemas/state-events.d.ts +66 -0
  288. package/dist/schemas/state-events.d.ts.map +1 -0
  289. package/dist/schemas/state-events.js +66 -0
  290. package/dist/schemas/state-events.js.map +1 -0
  291. package/dist/schemas/subscription.d.ts +47 -0
  292. package/dist/schemas/subscription.d.ts.map +1 -0
  293. package/dist/schemas/subscription.js +46 -0
  294. package/dist/schemas/subscription.js.map +1 -0
  295. package/dist/schemas/template-revision.d.ts +53 -0
  296. package/dist/schemas/template-revision.d.ts.map +1 -0
  297. package/dist/schemas/template-revision.js +30 -0
  298. package/dist/schemas/template-revision.js.map +1 -0
  299. package/dist/selection.d.ts +22 -0
  300. package/dist/selection.d.ts.map +1 -0
  301. package/dist/selection.js +21 -0
  302. package/dist/selection.js.map +1 -0
  303. package/dist/storage/index.d.ts +27 -0
  304. package/dist/storage/index.d.ts.map +1 -0
  305. package/dist/storage/index.js +27 -0
  306. package/dist/storage/index.js.map +1 -0
  307. package/dist/storage/records.d.ts +28 -0
  308. package/dist/storage/records.d.ts.map +1 -0
  309. package/dist/storage/records.js +272 -0
  310. package/dist/storage/records.js.map +1 -0
  311. package/dist/svelte/applets-svelte.plugin.d.ts +38 -0
  312. package/dist/svelte/applets-svelte.plugin.d.ts.map +1 -0
  313. package/dist/svelte/applets-svelte.plugin.js +25 -0
  314. package/dist/svelte/components/AppletCanvas.svelte +488 -0
  315. package/dist/svelte/components/AppletCanvas.svelte.d.ts +53 -0
  316. package/dist/svelte/components/AppletCanvas.svelte.d.ts.map +1 -0
  317. package/dist/svelte/components/AppletCatalog.svelte +42 -0
  318. package/dist/svelte/components/AppletCatalog.svelte.d.ts +8 -0
  319. package/dist/svelte/components/AppletCatalog.svelte.d.ts.map +1 -0
  320. package/dist/svelte/components/AppletComposition.svelte +128 -0
  321. package/dist/svelte/components/AppletComposition.svelte.d.ts +30 -0
  322. package/dist/svelte/components/AppletComposition.svelte.d.ts.map +1 -0
  323. package/dist/svelte/components/AppletConsent.svelte +143 -0
  324. package/dist/svelte/components/AppletConsent.svelte.d.ts +12 -0
  325. package/dist/svelte/components/AppletConsent.svelte.d.ts.map +1 -0
  326. package/dist/svelte/components/LocalAppletView.svelte +102 -0
  327. package/dist/svelte/components/LocalAppletView.svelte.d.ts +13 -0
  328. package/dist/svelte/components/LocalAppletView.svelte.d.ts.map +1 -0
  329. package/dist/svelte/components/RunnableTracker.svelte +51 -0
  330. package/dist/svelte/components/RunnableTracker.svelte.d.ts +18 -0
  331. package/dist/svelte/components/RunnableTracker.svelte.d.ts.map +1 -0
  332. package/dist/svelte/index.d.ts +11 -0
  333. package/dist/svelte/index.d.ts.map +1 -0
  334. package/dist/svelte/index.js +10 -0
  335. package/dist/svelte/lib/canvas-lifecycle.d.ts +68 -0
  336. package/dist/svelte/lib/canvas-lifecycle.d.ts.map +1 -0
  337. package/dist/svelte/lib/canvas-lifecycle.js +99 -0
  338. package/dist/svelte/lib/capability-review.d.ts +64 -0
  339. package/dist/svelte/lib/capability-review.d.ts.map +1 -0
  340. package/dist/svelte/lib/capability-review.js +77 -0
  341. package/dist/svelte/lib/message-protocol.d.ts +184 -0
  342. package/dist/svelte/lib/message-protocol.d.ts.map +1 -0
  343. package/dist/svelte/lib/message-protocol.js +251 -0
  344. package/dist/svelte/runnable-source.d.ts +5 -0
  345. package/dist/svelte/runnable-source.d.ts.map +1 -0
  346. package/dist/svelte/runnable-source.js +92 -0
  347. package/dist/svelte/serve-index.svelte +39 -0
  348. package/dist/svelte/serve-index.svelte.d.ts +10 -0
  349. package/dist/svelte/serve-index.svelte.d.ts.map +1 -0
  350. package/dist/svelte/state.svelte.d.ts +26 -0
  351. package/dist/svelte/state.svelte.d.ts.map +1 -0
  352. package/dist/svelte/state.svelte.js +74 -0
  353. package/dist/svelte/styles.css +4 -0
  354. package/dist/svelte/tool-widgets/AppletToolCard.svelte +148 -0
  355. package/dist/svelte/tool-widgets/AppletToolCard.svelte.d.ts +5 -0
  356. package/dist/svelte/tool-widgets/AppletToolCard.svelte.d.ts.map +1 -0
  357. package/dist/svelte/tool-widgets/applet-tool-card.d.ts +41 -0
  358. package/dist/svelte/tool-widgets/applet-tool-card.d.ts.map +1 -0
  359. package/dist/svelte/tool-widgets/applet-tool-card.js +167 -0
  360. package/dist/svelte/tool-widgets/index.d.ts +3 -0
  361. package/dist/svelte/tool-widgets/index.d.ts.map +1 -0
  362. package/dist/svelte/tool-widgets/index.js +2 -0
  363. package/dist/templates/index.d.ts +2 -0
  364. package/dist/templates/index.d.ts.map +1 -0
  365. package/dist/templates/index.js +2 -0
  366. package/dist/templates/index.js.map +1 -0
  367. package/dist/templates/template.kind.d.ts +39 -0
  368. package/dist/templates/template.kind.d.ts.map +1 -0
  369. package/dist/templates/template.kind.js +29 -0
  370. package/dist/templates/template.kind.js.map +1 -0
  371. package/dist/tools/applet.descriptor.d.ts +196 -0
  372. package/dist/tools/applet.descriptor.d.ts.map +1 -0
  373. package/dist/tools/applet.descriptor.js +81 -0
  374. package/dist/tools/applet.descriptor.js.map +1 -0
  375. package/dist/tools/applet.impl.d.ts +32 -0
  376. package/dist/tools/applet.impl.d.ts.map +1 -0
  377. package/dist/tools/applet.impl.js +485 -0
  378. package/dist/tools/applet.impl.js.map +1 -0
  379. package/dist/tools/applet.schemas.d.ts +198 -0
  380. package/dist/tools/applet.schemas.d.ts.map +1 -0
  381. package/dist/tools/applet.schemas.js +136 -0
  382. package/dist/tools/applet.schemas.js.map +1 -0
  383. package/dist/tools/index.d.ts +3 -0
  384. package/dist/tools/index.d.ts.map +1 -0
  385. package/dist/tools/index.js +3 -0
  386. package/dist/tools/index.js.map +1 -0
  387. package/dist/upgrade.d.ts +45 -0
  388. package/dist/upgrade.d.ts.map +1 -0
  389. package/dist/upgrade.js +179 -0
  390. package/dist/upgrade.js.map +1 -0
  391. package/dist/vite.d.ts +26 -0
  392. package/dist/vite.d.ts.map +1 -0
  393. package/dist/vite.js +28 -0
  394. package/dist/vite.js.map +1 -0
  395. package/package.json +264 -4
  396. package/templates/applet-tour/Applet.svelte +95 -0
  397. package/templates/applet-tour/applet.descriptor.ts +15 -0
  398. package/templates/assembly-field/Applet.svelte +242 -0
  399. package/templates/assembly-field/applet.descriptor.ts +7 -0
  400. package/templates/assembly-field/applet.storage.json +47 -0
  401. package/templates/assembly-field/schemas/settings.ts +14 -0
  402. package/templates/assembly-field/settings.ts +32 -0
  403. package/templates/benchmark-comparison/Applet.svelte +17 -0
  404. package/templates/benchmark-comparison/applet.descriptor.ts +7 -0
  405. package/templates/file-diff-viewer/Applet.svelte +91 -0
  406. package/templates/file-diff-viewer/applet.descriptor.ts +14 -0
  407. package/templates/file-diff-viewer/diff.ts +63 -0
  408. package/templates/file-viewer/Applet.svelte +80 -0
  409. package/templates/file-viewer/applet.descriptor.ts +14 -0
  410. package/templates/fleet-runs/Applet.svelte +14 -0
  411. package/templates/fleet-runs/applet.descriptor.ts +7 -0
  412. package/templates/graph-runbook-tracker/Applet.svelte +13 -0
  413. package/templates/graph-runbook-tracker/applet.descriptor.ts +7 -0
  414. package/templates/runbook-tracker/Applet.svelte +12 -0
  415. package/templates/runbook-tracker/applet.descriptor.ts +7 -0
  416. package/templates/runnable-tracker/Applet.svelte +16 -0
  417. package/templates/runnable-tracker/applet.descriptor.ts +10 -0
  418. package/templates/storage-viewer/Applet.svelte +90 -0
  419. package/templates/storage-viewer/applet.descriptor.ts +15 -0
  420. package/templates/workspace-graph-runbook-tracker/Applet.svelte +13 -0
  421. package/templates/workspace-graph-runbook-tracker/applet.descriptor.ts +7 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load.js","sourceRoot":"","sources":["../../src/config/load.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAsB,MAAM,4BAA4B,CAAC;AAEhF,OAAO,EACN,0BAA0B,EAC1B,mBAAmB,EAEnB,MAAM,gCAAgC,CAAC;AAMxC,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,OAAqB;IAC5D,MAAM,QAAQ,GAAG,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC/C,IACC,CAAC,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC;QACnC,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC,WAAW,EAAE,CAAC,MAAM,KAAK,CAAC,EAC7F,CAAC;QACF,OAAO,QAAQ,CAAC;IACjB,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,cAAc,CAAe,QAAQ,EAAE,OAAO,CAAC,CAAC;IACrE,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,0BAA0B,EAAE,MAAM,EAAE,mBAAmB,EAAE,CAAC,CAAC;AACrF,CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * The addressable path for a shared thing.
3
+ *
4
+ * `content.vibes.dev/{scope}/{name}/{kind}/{slug}`. Specified in the proposal
5
+ * and unimplemented until now, which meant the reserved-segment protection it
6
+ * claimed did not exist.
7
+ *
8
+ * Pure grammar, deliberately separate from any surface: which app serves this is
9
+ * an open product question, and the shape of the URL is not. Building it here
10
+ * means the answer to that question inherits a tested parser rather than
11
+ * reinventing one.
12
+ *
13
+ * `{kind}` is validated as a SEGMENT only, not against a vocabulary. This module
14
+ * deliberately does not own the list of shareable kinds: that is
15
+ * `marketplaceListingKindSchema`, and the surface that routes a request should
16
+ * check against it. Duplicating the enum here would create exactly the second
17
+ * vocabulary this is meant to avoid, and importing it would drag a DOM-typed
18
+ * package into a package that has no DOM lib.
19
+ *
20
+ * So the grammar is permissive about kind and the router is strict. Stated
21
+ * because an earlier draft of the test claimed this module "uses the marketplace
22
+ * vocabulary", which nothing here enforces.
23
+ */
24
+ import * as z from 'zod/v4';
25
+ export declare const appletContentScopeSchema: z.ZodEnum<{
26
+ user: "user";
27
+ project: "project";
28
+ org: "org";
29
+ }>;
30
+ /**
31
+ * Segments a name may never take.
32
+ *
33
+ * Without this a user called `api` owns `content.vibes.dev/user/api/...` and,
34
+ * more importantly, a future first-party route at `/api/...` collides with a
35
+ * name someone already registered. Reserving them costs nothing now and is
36
+ * impossible later.
37
+ */
38
+ export declare const RESERVED_CONTENT_SEGMENTS: readonly string[];
39
+ export declare const appletContentNameSchema: z.ZodString;
40
+ export declare const appletContentSlugSchema: z.ZodString;
41
+ /**
42
+ * The kind segment. Shape and LENGTH, because every other segment is capped and
43
+ * an uncapped one is the one an attacker uses: a 5000-character kind produced a
44
+ * valid path and parsed back cleanly.
45
+ */
46
+ export declare const appletContentKindSchema: z.ZodString;
47
+ export interface AppletContentAddress {
48
+ scope: z.infer<typeof appletContentScopeSchema>;
49
+ name: string;
50
+ kind: string;
51
+ slug: string;
52
+ }
53
+ /** Build the path. Refuses rather than emitting something unroutable. */
54
+ export declare function appletContentPath(address: AppletContentAddress): string;
55
+ /**
56
+ * Parse a path back into an address, or null.
57
+ *
58
+ * Null rather than throwing: this runs on request paths, where a miss is an
59
+ * ordinary 404 and not an exceptional condition.
60
+ */
61
+ export declare function parseAppletContentPath(pathname: string): AppletContentAddress | null;
62
+ //# sourceMappingURL=content-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-path.d.ts","sourceRoot":"","sources":["../src/content-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,eAAO,MAAM,wBAAwB;;;;EAAqC,CAAC;AAE3E;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,EAAE,SAAS,MAAM,EAiBrD,CAAC;AAIH,eAAO,MAAM,uBAAuB,aAOjC,CAAC;AAEJ,eAAO,MAAM,uBAAuB,aAIkB,CAAC;AAEvD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,aAIkB,CAAC;AAEvD,MAAM,WAAW,oBAAoB;IACpC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACb;AAED,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,CAMvE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAuBpF"}
@@ -0,0 +1,121 @@
1
+ /**
2
+ * The addressable path for a shared thing.
3
+ *
4
+ * `content.vibes.dev/{scope}/{name}/{kind}/{slug}`. Specified in the proposal
5
+ * and unimplemented until now, which meant the reserved-segment protection it
6
+ * claimed did not exist.
7
+ *
8
+ * Pure grammar, deliberately separate from any surface: which app serves this is
9
+ * an open product question, and the shape of the URL is not. Building it here
10
+ * means the answer to that question inherits a tested parser rather than
11
+ * reinventing one.
12
+ *
13
+ * `{kind}` is validated as a SEGMENT only, not against a vocabulary. This module
14
+ * deliberately does not own the list of shareable kinds: that is
15
+ * `marketplaceListingKindSchema`, and the surface that routes a request should
16
+ * check against it. Duplicating the enum here would create exactly the second
17
+ * vocabulary this is meant to avoid, and importing it would drag a DOM-typed
18
+ * package into a package that has no DOM lib.
19
+ *
20
+ * So the grammar is permissive about kind and the router is strict. Stated
21
+ * because an earlier draft of the test claimed this module "uses the marketplace
22
+ * vocabulary", which nothing here enforces.
23
+ */
24
+ import * as z from 'zod/v4';
25
+ export const appletContentScopeSchema = z.enum(['user', 'org', 'project']);
26
+ /**
27
+ * Segments a name may never take.
28
+ *
29
+ * Without this a user called `api` owns `content.vibes.dev/user/api/...` and,
30
+ * more importantly, a future first-party route at `/api/...` collides with a
31
+ * name someone already registered. Reserving them costs nothing now and is
32
+ * impossible later.
33
+ */
34
+ export const RESERVED_CONTENT_SEGMENTS = Object.freeze([
35
+ 'api',
36
+ '_app',
37
+ '_next',
38
+ 'admin',
39
+ 'assets',
40
+ 'health',
41
+ 'internal',
42
+ 'login',
43
+ 'logout',
44
+ 'oauth',
45
+ 'org',
46
+ 'project',
47
+ 'settings',
48
+ 'static',
49
+ 'user',
50
+ 'well-known'
51
+ ]);
52
+ const SEGMENT = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
53
+ export const appletContentNameSchema = z
54
+ .string()
55
+ .min(1)
56
+ .max(64)
57
+ .regex(SEGMENT, 'Names must be lowercase kebab-case')
58
+ .refine((value) => !RESERVED_CONTENT_SEGMENTS.includes(value), {
59
+ message: 'This name is reserved for first-party routes'
60
+ });
61
+ export const appletContentSlugSchema = z
62
+ .string()
63
+ .min(1)
64
+ .max(80)
65
+ .regex(SEGMENT, 'Slugs must be lowercase kebab-case');
66
+ /**
67
+ * The kind segment. Shape and LENGTH, because every other segment is capped and
68
+ * an uncapped one is the one an attacker uses: a 5000-character kind produced a
69
+ * valid path and parsed back cleanly.
70
+ */
71
+ export const appletContentKindSchema = z
72
+ .string()
73
+ .min(1)
74
+ .max(40)
75
+ .regex(SEGMENT, 'Kinds must be lowercase kebab-case');
76
+ /** Build the path. Refuses rather than emitting something unroutable. */
77
+ export function appletContentPath(address) {
78
+ appletContentScopeSchema.parse(address.scope);
79
+ appletContentNameSchema.parse(address.name);
80
+ appletContentSlugSchema.parse(address.slug);
81
+ appletContentKindSchema.parse(address.kind);
82
+ return `/${address.scope}/${address.name}/${address.kind}/${address.slug}`;
83
+ }
84
+ /**
85
+ * Parse a path back into an address, or null.
86
+ *
87
+ * Null rather than throwing: this runs on request paths, where a miss is an
88
+ * ordinary 404 and not an exceptional condition.
89
+ */
90
+ export function parseAppletContentPath(pathname) {
91
+ // Canonical form only. FILTERING empty segments — which an earlier version
92
+ // did — silently accepted `//user/x/y/z` and `/user//x/y/z` as the same
93
+ // address, so one resource answered at several URLs. That is how a cache and
94
+ // a path-prefix rule end up disagreeing about what they are protecting.
95
+ //
96
+ // Splitting without filtering is enough on its own: an extra slash produces
97
+ // an extra segment and fails the length check, and a blank segment in a
98
+ // four-part path fails its own schema, every one of which requires at least
99
+ // one character. An explicit empty-segment guard was here briefly and was
100
+ // unreachable, so it is gone rather than left looking protective.
101
+ const canonical = pathname.endsWith('/') ? pathname.slice(0, -1) : pathname;
102
+ if (!canonical.startsWith('/'))
103
+ return null;
104
+ const segments = canonical.slice(1).split('/');
105
+ if (segments.length !== 4)
106
+ return null;
107
+ const [scope, name, kind, slug] = segments;
108
+ if (!scope || !name || !kind || !slug)
109
+ return null;
110
+ const parsedScope = appletContentScopeSchema.safeParse(scope);
111
+ if (!parsedScope.success)
112
+ return null;
113
+ if (!appletContentNameSchema.safeParse(name).success)
114
+ return null;
115
+ if (!appletContentSlugSchema.safeParse(slug).success)
116
+ return null;
117
+ if (!appletContentKindSchema.safeParse(kind).success)
118
+ return null;
119
+ return { scope: parsedScope.data, name, kind, slug };
120
+ }
121
+ //# sourceMappingURL=content-path.js.map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AC,IAAI,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACnD,MAAM,WAAW,GAAG,wBAAwB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC9D,IAAI,CAAC,WAAW,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IACtC,IAAI,CAAC,uBAAuB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAClE,IAAI,CAAC,uBAAuB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAClE,IAAI,CAAC,uBAAuB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAClE,OAAO,EAAE,KAAK,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACtD,CAAC"}
@@ -0,0 +1,270 @@
1
+ /**
2
+ * Contribution registration and dispatch.
3
+ *
4
+ * This is where the proposal's central claim becomes enforceable code:
5
+ *
6
+ * Descriptors are data. Implementations are code.
7
+ * The host registers a shim; it never imports applet code.
8
+ *
9
+ * Nothing in this file resolves an applet path, and nothing calls `import()`.
10
+ * A contributed implementation is named by reference, and the only thing the
11
+ * host ever does with that reference is put it in a message envelope that
12
+ * crosses the sandbox boundary.
13
+ *
14
+ * Two rules that look like ceremony and are not:
15
+ *
16
+ * 1. Authorization is re-read on EVERY dispatch through an injected reader.
17
+ * Registration is a cache, not a boundary — a long-lived runtime keeps its
18
+ * shims until something restarts it, so a revoked subscription must be
19
+ * refused by the call itself.
20
+ * 2. A contribution whose capabilities were declined is never registered at
21
+ * all, rather than registered and failing at call time.
22
+ */
23
+ import type { AppletCapabilityGrant, AppletLaunchLease } from './schemas/grants.ts';
24
+ import type { AppletSubscription } from './schemas/subscription.ts';
25
+ import type { AppletObservationRecorder } from './schemas/observation.ts';
26
+ import type { AppletContributes, AppletImplRef } from './schemas/contributes.ts';
27
+ import type { ComponentReleaseRef } from './schemas/component-release-ref.ts';
28
+ import { CapabilityError, type CaughtFailure, type RuntimeRef, type CapabilityErrorCode, type VibesRuntime } from '@vibesdotdev/kernel';
29
+ import type { ToolCallContext } from '@vibesdotdev/kernel/schemas/tool-call';
30
+ import type { JsonValue } from '@vibesdotdev/kernel/schemas/json';
31
+ import { type AppletDispatchRequest, type AppletDispatchResponse } from './schemas/dispatch.ts';
32
+ /** Runtime kinds a contribution can register into. Closed, like the manifest. */
33
+ export type AppletContributionKind = 'tools/tool' | 'cli/command' | 'applet/event-handler';
34
+ export interface AppletContributionRegistration {
35
+ kind: AppletContributionKind;
36
+ /** Host-assigned identity. Authors never choose this. */
37
+ id: string;
38
+ requires: readonly string[];
39
+ impl: AppletImplRef;
40
+ }
41
+ export interface AppletWithheldContribution {
42
+ kind: AppletContributionKind;
43
+ id: string;
44
+ missing: string[];
45
+ }
46
+ export interface AppletContributionPlan {
47
+ registered: AppletContributionRegistration[];
48
+ withheld: AppletWithheldContribution[];
49
+ }
50
+ /**
51
+ * Host-assigned identities.
52
+ *
53
+ * Namespacing is what stops collision and squatting, so it is computed here
54
+ * from the slug rather than read from anything the author supplied. CLI
55
+ * commands are always mounted under `vibes applet <slug>` and can never reach
56
+ * the top level, because this function cannot express a top-level command.
57
+ */
58
+ export declare function appletToolId(slug: string, name: string): string;
59
+ export declare function appletCliCommandId(slug: string, command: string): string;
60
+ export declare function appletCliCommandPath(slug: string, command: string): readonly string[];
61
+ export declare function appletEventHandlerId(slug: string, name: string): string;
62
+ /**
63
+ * Decide what a subscription registers, given what the subscriber actually
64
+ * granted. Pure: it reads no runtime and performs no I/O.
65
+ */
66
+ export declare function planAppletContributionRegistrations(input: {
67
+ slug: string;
68
+ contributes: AppletContributes | undefined;
69
+ grantedCapabilities: readonly string[];
70
+ }): AppletContributionPlan;
71
+ /**
72
+ * Runtime key for one contributed implementation: `<entry>#<export>`.
73
+ *
74
+ * CANONICAL definition. The compiler emits this key onto the bundle's
75
+ * `__contributions` map and the runner reads it back, so the two must agree
76
+ * exactly or every dispatch resolves to nothing.
77
+ *
78
+ * `apps/applet-runner` mirrors this by value because it takes no @vibesdotdev
79
+ * runtime dependency; `apps/applet-runner/test/protocol-parity.test.ts` asserts
80
+ * the two implementations agree.
81
+ */
82
+ export declare function appletContributionKey(impl: {
83
+ entry: string;
84
+ export: string;
85
+ }): string;
86
+ export { APPLET_DISPATCH_PROTOCOL_VERSION } from './schemas/dispatch.ts';
87
+ export type { AppletDispatchRequest, AppletDispatchResponse } from './schemas/dispatch.ts';
88
+ export interface AppletDispatchTransport {
89
+ /** MessagePort or headless RPC answer; parsed once at the host dispatch boundary. */
90
+ send(request: AppletDispatchRequest): Promise<JsonValue>;
91
+ }
92
+ /**
93
+ * How long the HOST waits for a dispatch reply.
94
+ *
95
+ * This is the bound that actually protects the caller. The runner's own timeout
96
+ * cannot interrupt synchronous applet code — a `while (true)` in a contributed
97
+ * function blocks that frame's only thread and no reply is ever sent — so
98
+ * without a host-side deadline the caller waits forever on a hostile applet.
99
+ */
100
+ export declare const APPLET_DISPATCH_TIMEOUT_MS = 20000;
101
+ /** Live authority for one dispatch. Re-read per call; never cached. */
102
+ export interface AppletAuthorizationState {
103
+ subscription: AppletSubscription;
104
+ grant: AppletCapabilityGrant;
105
+ lease?: AppletLaunchLease;
106
+ }
107
+ export declare class AppletAuthorizationError extends CapabilityError {
108
+ constructor(reason: string, detail: string);
109
+ }
110
+ /** Longest applet-supplied error text the host will carry. */
111
+ export declare const MAX_DISPATCH_ERROR_MESSAGE = 500;
112
+ /**
113
+ * Parse the ONE wire crossing from the sandbox into the host.
114
+ *
115
+ * The response is third-party output and was previously trusted raw: a malformed
116
+ * `{ok:false}` threw a TypeError instead of a dispatch error, and an
117
+ * applet-controlled `error.message` propagated verbatim into an agent's tool
118
+ * result — unbounded, control-character-bearing, prompt-injection-shaped.
119
+ */
120
+ export declare function parseAppletDispatchResponse(value: unknown): AppletDispatchResponse;
121
+ export interface AppletDispatchFailure {
122
+ readonly code: CapabilityErrorCode;
123
+ readonly reason: string;
124
+ readonly hostOriginated: boolean;
125
+ readonly cause?: CaughtFailure;
126
+ }
127
+ export declare class AppletDispatchError extends CapabilityError {
128
+ /**
129
+ * Whether the HOST produced this, rather than relaying applet text.
130
+ *
131
+ * Without it an applet can forge a host error: returning
132
+ * `{ok:false, error:{message:'Applet dispatch timed out.'}}` produced a
133
+ * byte-identical exception, so a caller could not tell a real deadline from
134
+ * an applet pretending there was one.
135
+ */
136
+ readonly hostOriginated: boolean;
137
+ constructor(message: string, init: AppletDispatchFailure);
138
+ }
139
+ export interface AppletDispatchShim {
140
+ readonly registrationId: string;
141
+ /**
142
+ * The canonical tools shape `(input, runtime, ctx)`, mirrored structurally:
143
+ * the shim dispatches on `input` only and ignores `runtime` and `ctx`.
144
+ * Types come from the runtime package below, never from tools above.
145
+ */
146
+ execute(input?: Record<string, JsonValue>, runtime?: VibesRuntime, ctx?: ToolCallContext): Promise<JsonValue>;
147
+ }
148
+ /**
149
+ * Correlation ids must satisfy the runner protocol's rule, or the far side
150
+ * rejects the envelope: 32-128 chars of `[A-Za-z0-9_-]`.
151
+ */
152
+ export declare function isAppletCorrelationId(value: string): value is string;
153
+ /**
154
+ * Build the implementation the host registers for one contributed descriptor.
155
+ *
156
+ * The returned object closes over identity and a transport. It never receives,
157
+ * resolves, or executes applet code — `impl` travels as data inside the
158
+ * envelope and is resolved on the far side of the boundary.
159
+ */
160
+ export declare function createAppletDispatchShim(input: {
161
+ /** The runtime whose lifecycle bounds each dispatch, and whose logging reports a failed ledger append. */
162
+ runtime: RuntimeRef;
163
+ registration: AppletContributionRegistration;
164
+ release: ComponentReleaseRef;
165
+ transport: AppletDispatchTransport;
166
+ /** Live authority, re-read on every call. */
167
+ readAuthorization: () => Promise<AppletAuthorizationState>;
168
+ newCorrelationId: () => string;
169
+ now?: () => Date;
170
+ /** Overridable so tests do not wait the real deadline. */
171
+ dispatchTimeoutMs?: number;
172
+ /**
173
+ * Appends to the observation ledger.
174
+ *
175
+ * Taken here, at the boundary, rather than left to callers: the shim is the
176
+ * only path across the sandbox, so recording here is what makes the ledger
177
+ * non-bypassable. A caller that could choose not to record would eventually
178
+ * be a caller that does not.
179
+ */
180
+ recordObservation?: AppletObservationRecorder;
181
+ }): AppletDispatchShim;
182
+ /**
183
+ * The loader the host registers, in the shape `runtime.registerLoader` expects.
184
+ *
185
+ * `ImplementationLoader<T> = () => Promise<{ impl: T }>`. The blessed lazy
186
+ * pattern normally has the loader `import()` an implementation module — here it
187
+ * deliberately does not. There is nothing to import: the implementation lives
188
+ * inside the sandbox, and the loader hands back a shim that dispatches to it.
189
+ *
190
+ * This is the strongest form of the invariant. The usual lazy loader defers an
191
+ * import; this one has no import to defer, at any point, ever.
192
+ *
193
+ * Register with:
194
+ * runtime.registerLoader(registration.kind, registration.id, loader)
195
+ */
196
+ export declare function createAppletContributionLoader(input: {
197
+ /** The runtime whose lifecycle bounds each dispatch, and whose logging reports a failed ledger append. */
198
+ runtime: RuntimeRef;
199
+ registration: AppletContributionRegistration;
200
+ release: ComponentReleaseRef;
201
+ transport: AppletDispatchTransport;
202
+ readAuthorization: () => Promise<AppletAuthorizationState>;
203
+ newCorrelationId: () => string;
204
+ now?: () => Date;
205
+ dispatchTimeoutMs?: number;
206
+ /**
207
+ * Threaded through deliberately. Without it the blessed registration path
208
+ * produced an UNLEDGERED shim while the ledger was described as
209
+ * non-bypassable — the recorder was optional on the shim and absent here, so
210
+ * the documented way to register a contribution was also the way to lose its
211
+ * receipts.
212
+ */
213
+ recordObservation?: AppletObservationRecorder;
214
+ }): () => Promise<{
215
+ impl: AppletDispatchShim;
216
+ }>;
217
+ /** One named export the compiled bundle must expose, in the compiler's terms. */
218
+ export interface AppletCompileContribution {
219
+ entry: string;
220
+ exportName: string;
221
+ }
222
+ /**
223
+ * Map a manifest's `contributes` onto the compiler's contribution input.
224
+ *
225
+ * The translation exists because the two sides own different vocabularies:
226
+ * Applets declares WHAT a release contributes and why; Platform owns source,
227
+ * compilation, bundles, and releases and only needs to know WHICH named exports
228
+ * to expose. Keeping the compiler Applet-agnostic is what stops applet semantics
229
+ * leaking into the build.
230
+ *
231
+ * Deduplicated on the same `<entry>#<export>` key the compiler refuses
232
+ * duplicates on: two contributions may legitimately share one implementation
233
+ * (a tool and a CLI command over the same function), and that must not become a
234
+ * publish-time failure.
235
+ */
236
+ export declare function appletCompileContributions(contributes: AppletContributes | undefined): AppletCompileContribution[];
237
+ /** One subscription plus the records it references, as a resolver reads them. */
238
+ export interface SubscribedApplet {
239
+ subscription: AppletSubscription;
240
+ grant: AppletCapabilityGrant;
241
+ /** Host-assigned namespace segment. Comes from the publication, not the author. */
242
+ slug: string;
243
+ /** The manifest stored on the instance. Absent means nothing to register. */
244
+ definitionManifest: {
245
+ contributes?: AppletContributes;
246
+ } | null;
247
+ }
248
+ export interface SubscribedContributionPlan {
249
+ registered: AppletContributionRegistration[];
250
+ withheld: AppletWithheldContribution[];
251
+ /** Why a subscription contributed nothing, for an operator staring at a gap. */
252
+ skipped: Array<{
253
+ subscriptionId: string;
254
+ reason: string;
255
+ }>;
256
+ }
257
+ /**
258
+ * Turn live subscriptions into a registration plan.
259
+ *
260
+ * Pure. Registration decides only what EXISTS; every dispatch re-derives
261
+ * authority through `authorizeAppletContribution`, so nothing here is a security
262
+ * decision and a stale plan cannot grant anything. What it must get right is the
263
+ * opposite: never registering something the subscriber did not consent to, so a
264
+ * revoked or mismatched subscription contributes nothing at all.
265
+ *
266
+ * Reasons are recorded rather than silently dropped, because "my applet's tool
267
+ * isn't there" is otherwise unanswerable.
268
+ */
269
+ export declare function resolveSubscribedContributions(subscribed: readonly SubscribedApplet[]): SubscribedContributionPlan;
270
+ //# sourceMappingURL=contribution-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contribution-registry.d.ts","sourceRoot":"","sources":["../src/contribution-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG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