@vibesdotdev/applets 0.0.0-stage → 1.0.0-rc.2
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.
- package/LICENSE +18 -0
- package/README.md +43 -2
- package/dist/applet-gate.d.ts +47 -0
- package/dist/applet-gate.d.ts.map +1 -0
- package/dist/applet-gate.js +167 -0
- package/dist/applet-gate.js.map +1 -0
- package/dist/applet-root-surface.d.ts +135 -0
- package/dist/applet-root-surface.d.ts.map +1 -0
- package/dist/applet-root-surface.js +222 -0
- package/dist/applet-root-surface.js.map +1 -0
- package/dist/applet-value-bound.d.ts +24 -0
- package/dist/applet-value-bound.d.ts.map +1 -0
- package/dist/applet-value-bound.js +46 -0
- package/dist/applet-value-bound.js.map +1 -0
- package/dist/applets.cloud.plugin.d.ts +4 -0
- package/dist/applets.cloud.plugin.d.ts.map +1 -0
- package/dist/applets.cloud.plugin.js +11 -0
- package/dist/applets.cloud.plugin.js.map +1 -0
- package/dist/applets.consumer.plugin.d.ts +4 -0
- package/dist/applets.consumer.plugin.d.ts.map +1 -0
- package/dist/applets.consumer.plugin.js +11 -0
- package/dist/applets.consumer.plugin.js.map +1 -0
- package/dist/applets.plugin.d.ts +3 -0
- package/dist/applets.plugin.d.ts.map +1 -0
- package/dist/applets.plugin.js +30 -0
- package/dist/applets.plugin.js.map +1 -0
- package/dist/authorization.d.ts +87 -0
- package/dist/authorization.d.ts.map +1 -0
- package/dist/authorization.js +189 -0
- package/dist/authorization.js.map +1 -0
- package/dist/browser-runtime.d.ts +34 -0
- package/dist/browser-runtime.d.ts.map +1 -0
- package/dist/browser-runtime.js +5 -0
- package/dist/browser-runtime.js.map +1 -0
- package/dist/build-definition.d.ts +34 -0
- package/dist/build-definition.d.ts.map +1 -0
- package/dist/build-definition.js +44 -0
- package/dist/build-definition.js.map +1 -0
- package/dist/capabilities/capability.kind.d.ts +44 -0
- package/dist/capabilities/capability.kind.d.ts.map +1 -0
- package/dist/capabilities/capability.kind.js +17 -0
- package/dist/capabilities/capability.kind.js.map +1 -0
- package/dist/capabilities/runtime-dispatch.d.ts +9 -0
- package/dist/capabilities/runtime-dispatch.d.ts.map +1 -0
- package/dist/capabilities/runtime-dispatch.js +62 -0
- package/dist/capabilities/runtime-dispatch.js.map +1 -0
- package/dist/cli/applet-group.descriptor.d.ts +11 -0
- package/dist/cli/applet-group.descriptor.d.ts.map +1 -0
- package/dist/cli/applet-group.descriptor.js +19 -0
- package/dist/cli/applet-group.descriptor.js.map +1 -0
- package/dist/cli/applet-local-store.storage.descriptor.d.ts +66 -0
- package/dist/cli/applet-local-store.storage.descriptor.d.ts.map +1 -0
- package/dist/cli/applet-local-store.storage.descriptor.js +39 -0
- package/dist/cli/applet-local-store.storage.descriptor.js.map +1 -0
- package/dist/cli/applet-serve.process.descriptor.d.ts +37 -0
- package/dist/cli/applet-serve.process.descriptor.d.ts.map +1 -0
- package/dist/cli/applet-serve.process.descriptor.js +41 -0
- package/dist/cli/applet-serve.process.descriptor.js.map +1 -0
- package/dist/cli/commands/build.command.descriptor.d.ts +40 -0
- package/dist/cli/commands/build.command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/build.command.descriptor.js +52 -0
- package/dist/cli/commands/build.command.descriptor.js.map +1 -0
- package/dist/cli/commands/build.command.impl.d.ts +8 -0
- package/dist/cli/commands/build.command.impl.d.ts.map +1 -0
- package/dist/cli/commands/build.command.impl.js +116 -0
- package/dist/cli/commands/build.command.impl.js.map +1 -0
- package/dist/cli/commands/init.command.descriptor.d.ts +29 -0
- package/dist/cli/commands/init.command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/init.command.descriptor.js +23 -0
- package/dist/cli/commands/init.command.descriptor.js.map +1 -0
- package/dist/cli/commands/init.command.impl.d.ts +7 -0
- package/dist/cli/commands/init.command.impl.d.ts.map +1 -0
- package/dist/cli/commands/init.command.impl.js +64 -0
- package/dist/cli/commands/init.command.impl.js.map +1 -0
- package/dist/cli/commands/list.command.descriptor.d.ts +26 -0
- package/dist/cli/commands/list.command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/list.command.descriptor.js +22 -0
- package/dist/cli/commands/list.command.descriptor.js.map +1 -0
- package/dist/cli/commands/list.command.impl.d.ts +13 -0
- package/dist/cli/commands/list.command.impl.d.ts.map +1 -0
- package/dist/cli/commands/list.command.impl.js +47 -0
- package/dist/cli/commands/list.command.impl.js.map +1 -0
- package/dist/cli/commands/serve-stylesheet.d.ts +11 -0
- package/dist/cli/commands/serve-stylesheet.d.ts.map +1 -0
- package/dist/cli/commands/serve-stylesheet.js +50 -0
- package/dist/cli/commands/serve-stylesheet.js.map +1 -0
- package/dist/cli/commands/serve-surface.d.ts +36 -0
- package/dist/cli/commands/serve-surface.d.ts.map +1 -0
- package/dist/cli/commands/serve-surface.js +410 -0
- package/dist/cli/commands/serve-surface.js.map +1 -0
- package/dist/cli/commands/serve.command.descriptor.d.ts +42 -0
- package/dist/cli/commands/serve.command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/serve.command.descriptor.js +46 -0
- package/dist/cli/commands/serve.command.descriptor.js.map +1 -0
- package/dist/cli/commands/serve.command.impl.d.ts +110 -0
- package/dist/cli/commands/serve.command.impl.d.ts.map +1 -0
- package/dist/cli/commands/serve.command.impl.js +1105 -0
- package/dist/cli/commands/serve.command.impl.js.map +1 -0
- package/dist/cli/commands/serve.schemas.d.ts +127 -0
- package/dist/cli/commands/serve.schemas.d.ts.map +1 -0
- package/dist/cli/commands/serve.schemas.js +85 -0
- package/dist/cli/commands/serve.schemas.js.map +1 -0
- package/dist/cli/commands/served-applet-browser.d.ts +12 -0
- package/dist/cli/commands/served-applet-browser.d.ts.map +1 -0
- package/dist/cli/commands/served-applet-browser.js +48 -0
- package/dist/cli/commands/served-applet-browser.js.map +1 -0
- package/dist/cli/commands/served-applet-connection.d.ts +15 -0
- package/dist/cli/commands/served-applet-connection.d.ts.map +1 -0
- package/dist/cli/commands/served-applet-connection.js +25 -0
- package/dist/cli/commands/served-applet-connection.js.map +1 -0
- package/dist/cli/commands/served-applet-rpc.d.ts +16 -0
- package/dist/cli/commands/served-applet-rpc.d.ts.map +1 -0
- package/dist/cli/commands/served-applet-rpc.js +108 -0
- package/dist/cli/commands/served-applet-rpc.js.map +1 -0
- package/dist/cli/commands/served-applet-surface.d.ts +14 -0
- package/dist/cli/commands/served-applet-surface.d.ts.map +1 -0
- package/dist/cli/commands/served-applet-surface.js +99 -0
- package/dist/cli/commands/served-applet-surface.js.map +1 -0
- package/dist/cli/commands/templates.command.descriptor.d.ts +22 -0
- package/dist/cli/commands/templates.command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/templates.command.descriptor.js +21 -0
- package/dist/cli/commands/templates.command.descriptor.js.map +1 -0
- package/dist/cli/commands/templates.command.impl.d.ts +35 -0
- package/dist/cli/commands/templates.command.impl.d.ts.map +1 -0
- package/dist/cli/commands/templates.command.impl.js +59 -0
- package/dist/cli/commands/templates.command.impl.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +7 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/local-serve.authz-policy.descriptor.d.ts +22 -0
- package/dist/cli/local-serve.authz-policy.descriptor.d.ts.map +1 -0
- package/dist/cli/local-serve.authz-policy.descriptor.js +13 -0
- package/dist/cli/local-serve.authz-policy.descriptor.js.map +1 -0
- package/dist/cli/plugin.d.ts +19 -0
- package/dist/cli/plugin.d.ts.map +1 -0
- package/dist/cli/plugin.js +57 -0
- package/dist/cli/plugin.js.map +1 -0
- package/dist/cli/project-files.d.ts +48 -0
- package/dist/cli/project-files.d.ts.map +1 -0
- package/dist/cli/project-files.js +130 -0
- package/dist/cli/project-files.js.map +1 -0
- package/dist/client/contract.d.ts +113 -0
- package/dist/client/contract.d.ts.map +1 -0
- package/dist/client/contract.js +17 -0
- package/dist/client/contract.js.map +1 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +3 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/repository.context.d.ts +113 -0
- package/dist/client/repository.context.d.ts.map +1 -0
- package/dist/client/repository.context.js +8 -0
- package/dist/client/repository.context.js.map +1 -0
- package/dist/client/runtime-client.d.ts +22 -0
- package/dist/client/runtime-client.d.ts.map +1 -0
- package/dist/client/runtime-client.js +200 -0
- package/dist/client/runtime-client.js.map +1 -0
- package/dist/companion-path.d.ts +25 -0
- package/dist/companion-path.d.ts.map +1 -0
- package/dist/companion-path.js +90 -0
- package/dist/companion-path.js.map +1 -0
- package/dist/component-ref.d.ts +12 -0
- package/dist/component-ref.d.ts.map +1 -0
- package/dist/component-ref.js +45 -0
- package/dist/component-ref.js.map +1 -0
- package/dist/composition-plan.d.ts +92 -0
- package/dist/composition-plan.d.ts.map +1 -0
- package/dist/composition-plan.js +44 -0
- package/dist/composition-plan.js.map +1 -0
- package/dist/composition.d.ts +97 -0
- package/dist/composition.d.ts.map +1 -0
- package/dist/composition.js +99 -0
- package/dist/composition.js.map +1 -0
- package/dist/config/applets.config.descriptor.d.ts +55 -0
- package/dist/config/applets.config.descriptor.d.ts.map +1 -0
- package/dist/config/applets.config.descriptor.js +37 -0
- package/dist/config/applets.config.descriptor.js.map +1 -0
- package/dist/config/load.d.ts +4 -0
- package/dist/config/load.d.ts.map +1 -0
- package/dist/config/load.js +12 -0
- package/dist/config/load.js.map +1 -0
- package/dist/content-path.d.ts +62 -0
- package/dist/content-path.d.ts.map +1 -0
- package/dist/content-path.js +121 -0
- package/dist/content-path.js.map +1 -0
- package/dist/contribution-registry.d.ts +270 -0
- package/dist/contribution-registry.d.ts.map +1 -0
- package/dist/contribution-registry.js +488 -0
- package/dist/contribution-registry.js.map +1 -0
- package/dist/docs/applets.docs.descriptor.d.ts +4 -0
- package/dist/docs/applets.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/applets.docs.descriptor.js +74 -0
- package/dist/docs/applets.docs.descriptor.js.map +1 -0
- package/dist/host/local-host.contract.d.ts +7 -0
- package/dist/host/local-host.contract.d.ts.map +1 -0
- package/dist/host/local-host.contract.js +2 -0
- package/dist/host/local-host.contract.js.map +1 -0
- package/dist/host/local-host.impl.d.ts +9 -0
- package/dist/host/local-host.impl.d.ts.map +1 -0
- package/dist/host/local-host.impl.js +41 -0
- package/dist/host/local-host.impl.js.map +1 -0
- package/dist/host/local-host.plugin.d.ts +3 -0
- package/dist/host/local-host.plugin.d.ts.map +1 -0
- package/dist/host/local-host.plugin.js +16 -0
- package/dist/host/local-host.plugin.js.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/local-project.d.ts +106 -0
- package/dist/local-project.d.ts.map +1 -0
- package/dist/local-project.js +277 -0
- package/dist/local-project.js.map +1 -0
- package/dist/manifest-hash.d.ts +12 -0
- package/dist/manifest-hash.d.ts.map +1 -0
- package/dist/manifest-hash.js +76 -0
- package/dist/manifest-hash.js.map +1 -0
- package/dist/presentation.d.ts +43 -0
- package/dist/presentation.d.ts.map +1 -0
- package/dist/presentation.js +36 -0
- package/dist/presentation.js.map +1 -0
- package/dist/retention.d.ts +34 -0
- package/dist/retention.d.ts.map +1 -0
- package/dist/retention.js +51 -0
- package/dist/retention.js.map +1 -0
- package/dist/schemas/applet-messages.d.ts +97 -0
- package/dist/schemas/applet-messages.d.ts.map +1 -0
- package/dist/schemas/applet-messages.js +51 -0
- package/dist/schemas/applet-messages.js.map +1 -0
- package/dist/schemas/capabilities.d.ts +37 -0
- package/dist/schemas/capabilities.d.ts.map +1 -0
- package/dist/schemas/capabilities.js +28 -0
- package/dist/schemas/capabilities.js.map +1 -0
- package/dist/schemas/component-release-ref.d.ts +13 -0
- package/dist/schemas/component-release-ref.d.ts.map +1 -0
- package/dist/schemas/component-release-ref.js +21 -0
- package/dist/schemas/component-release-ref.js.map +1 -0
- package/dist/schemas/contributes.d.ts +306 -0
- package/dist/schemas/contributes.d.ts.map +1 -0
- package/dist/schemas/contributes.js +184 -0
- package/dist/schemas/contributes.js.map +1 -0
- package/dist/schemas/definition.d.ts +301 -0
- package/dist/schemas/definition.d.ts.map +1 -0
- package/dist/schemas/definition.js +457 -0
- package/dist/schemas/definition.js.map +1 -0
- package/dist/schemas/dispatch.d.ts +52 -0
- package/dist/schemas/dispatch.d.ts.map +1 -0
- package/dist/schemas/dispatch.js +32 -0
- package/dist/schemas/dispatch.js.map +1 -0
- package/dist/schemas/grants.d.ts +56 -0
- package/dist/schemas/grants.d.ts.map +1 -0
- package/dist/schemas/grants.js +64 -0
- package/dist/schemas/grants.js.map +1 -0
- package/dist/schemas/index.d.ts +16 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +16 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/instance.d.ts +230 -0
- package/dist/schemas/instance.d.ts.map +1 -0
- package/dist/schemas/instance.js +44 -0
- package/dist/schemas/instance.js.map +1 -0
- package/dist/schemas/lineage.d.ts +60 -0
- package/dist/schemas/lineage.d.ts.map +1 -0
- package/dist/schemas/lineage.js +52 -0
- package/dist/schemas/lineage.js.map +1 -0
- package/dist/schemas/observation.d.ts +70 -0
- package/dist/schemas/observation.d.ts.map +1 -0
- package/dist/schemas/observation.js +49 -0
- package/dist/schemas/observation.js.map +1 -0
- package/dist/schemas/patterns.d.ts +24 -0
- package/dist/schemas/patterns.d.ts.map +1 -0
- package/dist/schemas/patterns.js +24 -0
- package/dist/schemas/patterns.js.map +1 -0
- package/dist/schemas/publishing.d.ts +27 -0
- package/dist/schemas/publishing.d.ts.map +1 -0
- package/dist/schemas/publishing.js +20 -0
- package/dist/schemas/publishing.js.map +1 -0
- package/dist/schemas/run.d.ts +35 -0
- package/dist/schemas/run.d.ts.map +1 -0
- package/dist/schemas/run.js +26 -0
- package/dist/schemas/run.js.map +1 -0
- package/dist/schemas/share-link.d.ts +61 -0
- package/dist/schemas/share-link.d.ts.map +1 -0
- package/dist/schemas/share-link.js +68 -0
- package/dist/schemas/share-link.js.map +1 -0
- package/dist/schemas/state-events.d.ts +66 -0
- package/dist/schemas/state-events.d.ts.map +1 -0
- package/dist/schemas/state-events.js +66 -0
- package/dist/schemas/state-events.js.map +1 -0
- package/dist/schemas/subscription.d.ts +47 -0
- package/dist/schemas/subscription.d.ts.map +1 -0
- package/dist/schemas/subscription.js +46 -0
- package/dist/schemas/subscription.js.map +1 -0
- package/dist/schemas/template-revision.d.ts +53 -0
- package/dist/schemas/template-revision.d.ts.map +1 -0
- package/dist/schemas/template-revision.js +30 -0
- package/dist/schemas/template-revision.js.map +1 -0
- package/dist/selection.d.ts +22 -0
- package/dist/selection.d.ts.map +1 -0
- package/dist/selection.js +21 -0
- package/dist/selection.js.map +1 -0
- package/dist/storage/index.d.ts +27 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +27 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/records.d.ts +28 -0
- package/dist/storage/records.d.ts.map +1 -0
- package/dist/storage/records.js +272 -0
- package/dist/storage/records.js.map +1 -0
- package/dist/svelte/applets-svelte.plugin.d.ts +38 -0
- package/dist/svelte/applets-svelte.plugin.d.ts.map +1 -0
- package/dist/svelte/applets-svelte.plugin.js +25 -0
- package/dist/svelte/components/AppletCanvas.svelte +488 -0
- package/dist/svelte/components/AppletCanvas.svelte.d.ts +53 -0
- package/dist/svelte/components/AppletCanvas.svelte.d.ts.map +1 -0
- package/dist/svelte/components/AppletCatalog.svelte +42 -0
- package/dist/svelte/components/AppletCatalog.svelte.d.ts +8 -0
- package/dist/svelte/components/AppletCatalog.svelte.d.ts.map +1 -0
- package/dist/svelte/components/AppletComposition.svelte +128 -0
- package/dist/svelte/components/AppletComposition.svelte.d.ts +30 -0
- package/dist/svelte/components/AppletComposition.svelte.d.ts.map +1 -0
- package/dist/svelte/components/AppletConsent.svelte +143 -0
- package/dist/svelte/components/AppletConsent.svelte.d.ts +12 -0
- package/dist/svelte/components/AppletConsent.svelte.d.ts.map +1 -0
- package/dist/svelte/components/LocalAppletView.svelte +102 -0
- package/dist/svelte/components/LocalAppletView.svelte.d.ts +13 -0
- package/dist/svelte/components/LocalAppletView.svelte.d.ts.map +1 -0
- package/dist/svelte/components/RunnableTracker.svelte +51 -0
- package/dist/svelte/components/RunnableTracker.svelte.d.ts +18 -0
- package/dist/svelte/components/RunnableTracker.svelte.d.ts.map +1 -0
- package/dist/svelte/index.d.ts +11 -0
- package/dist/svelte/index.d.ts.map +1 -0
- package/dist/svelte/index.js +10 -0
- package/dist/svelte/lib/canvas-lifecycle.d.ts +68 -0
- package/dist/svelte/lib/canvas-lifecycle.d.ts.map +1 -0
- package/dist/svelte/lib/canvas-lifecycle.js +99 -0
- package/dist/svelte/lib/capability-review.d.ts +64 -0
- package/dist/svelte/lib/capability-review.d.ts.map +1 -0
- package/dist/svelte/lib/capability-review.js +77 -0
- package/dist/svelte/lib/message-protocol.d.ts +184 -0
- package/dist/svelte/lib/message-protocol.d.ts.map +1 -0
- package/dist/svelte/lib/message-protocol.js +251 -0
- package/dist/svelte/runnable-source.d.ts +5 -0
- package/dist/svelte/runnable-source.d.ts.map +1 -0
- package/dist/svelte/runnable-source.js +92 -0
- package/dist/svelte/serve-index.svelte +39 -0
- package/dist/svelte/serve-index.svelte.d.ts +10 -0
- package/dist/svelte/serve-index.svelte.d.ts.map +1 -0
- package/dist/svelte/state.svelte.d.ts +26 -0
- package/dist/svelte/state.svelte.d.ts.map +1 -0
- package/dist/svelte/state.svelte.js +74 -0
- package/dist/svelte/styles.css +4 -0
- package/dist/svelte/tool-widgets/AppletToolCard.svelte +148 -0
- package/dist/svelte/tool-widgets/AppletToolCard.svelte.d.ts +5 -0
- package/dist/svelte/tool-widgets/AppletToolCard.svelte.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/applet-tool-card.d.ts +41 -0
- package/dist/svelte/tool-widgets/applet-tool-card.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/applet-tool-card.js +167 -0
- package/dist/svelte/tool-widgets/index.d.ts +3 -0
- package/dist/svelte/tool-widgets/index.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/index.js +2 -0
- package/dist/templates/index.d.ts +2 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/index.js +2 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/template.kind.d.ts +39 -0
- package/dist/templates/template.kind.d.ts.map +1 -0
- package/dist/templates/template.kind.js +29 -0
- package/dist/templates/template.kind.js.map +1 -0
- package/dist/tools/applet.descriptor.d.ts +196 -0
- package/dist/tools/applet.descriptor.d.ts.map +1 -0
- package/dist/tools/applet.descriptor.js +81 -0
- package/dist/tools/applet.descriptor.js.map +1 -0
- package/dist/tools/applet.impl.d.ts +32 -0
- package/dist/tools/applet.impl.d.ts.map +1 -0
- package/dist/tools/applet.impl.js +485 -0
- package/dist/tools/applet.impl.js.map +1 -0
- package/dist/tools/applet.schemas.d.ts +198 -0
- package/dist/tools/applet.schemas.d.ts.map +1 -0
- package/dist/tools/applet.schemas.js +136 -0
- package/dist/tools/applet.schemas.js.map +1 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +3 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/upgrade.d.ts +45 -0
- package/dist/upgrade.d.ts.map +1 -0
- package/dist/upgrade.js +179 -0
- package/dist/upgrade.js.map +1 -0
- package/dist/vite.d.ts +26 -0
- package/dist/vite.d.ts.map +1 -0
- package/dist/vite.js +28 -0
- package/dist/vite.js.map +1 -0
- package/package.json +264 -4
- package/templates/applet-tour/Applet.svelte +95 -0
- package/templates/applet-tour/applet.descriptor.ts +15 -0
- package/templates/assembly-field/Applet.svelte +242 -0
- package/templates/assembly-field/applet.descriptor.ts +7 -0
- package/templates/assembly-field/applet.storage.json +47 -0
- package/templates/assembly-field/schemas/settings.ts +14 -0
- package/templates/assembly-field/settings.ts +32 -0
- package/templates/benchmark-comparison/Applet.svelte +17 -0
- package/templates/benchmark-comparison/applet.descriptor.ts +7 -0
- package/templates/file-diff-viewer/Applet.svelte +91 -0
- package/templates/file-diff-viewer/applet.descriptor.ts +14 -0
- package/templates/file-diff-viewer/diff.ts +63 -0
- package/templates/file-viewer/Applet.svelte +80 -0
- package/templates/file-viewer/applet.descriptor.ts +14 -0
- package/templates/fleet-runs/Applet.svelte +14 -0
- package/templates/fleet-runs/applet.descriptor.ts +7 -0
- package/templates/graph-runbook-tracker/Applet.svelte +13 -0
- package/templates/graph-runbook-tracker/applet.descriptor.ts +7 -0
- package/templates/runbook-tracker/Applet.svelte +12 -0
- package/templates/runbook-tracker/applet.descriptor.ts +7 -0
- package/templates/runnable-tracker/Applet.svelte +16 -0
- package/templates/runnable-tracker/applet.descriptor.ts +10 -0
- package/templates/storage-viewer/Applet.svelte +90 -0
- package/templates/storage-viewer/applet.descriptor.ts +15 -0
- package/templates/workspace-graph-runbook-tracker/Applet.svelte +13 -0
- package/templates/workspace-graph-runbook-tracker/applet.descriptor.ts +7 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
The subscriber's view of a composed applet: its slots, and what each one needs.
|
|
3
|
+
|
|
4
|
+
COMPOSABLE FIRST, app second. This is a component a host mounts, not a route —
|
|
5
|
+
so a subscriber surface, an owner page, and a preview can all show the same
|
|
6
|
+
thing without one of them becoming the definition of "the applet page".
|
|
7
|
+
|
|
8
|
+
It renders DECISIONS, not applets. `planAppletComposition` decides whether each
|
|
9
|
+
declared slot may mount, and this shows the answer: a mounted child, a consent
|
|
10
|
+
prompt naming that child's own requests, or a stated reason it is unavailable.
|
|
11
|
+
Rendering a hole for a slot the host could not resolve would make a subscriber
|
|
12
|
+
see a different applet than the one that was published.
|
|
13
|
+
-->
|
|
14
|
+
<script lang="ts">
|
|
15
|
+
import type {
|
|
16
|
+
AppletDefinitionManifest,
|
|
17
|
+
AppletSlotDecision,
|
|
18
|
+
ComponentReleaseRef
|
|
19
|
+
} from '@vibesdotdev/applets';
|
|
20
|
+
import type { Snippet } from 'svelte';
|
|
21
|
+
|
|
22
|
+
interface Props {
|
|
23
|
+
/**
|
|
24
|
+
* Per-slot decisions from `planAppletComposition`.
|
|
25
|
+
*
|
|
26
|
+
* Defaulted, because a component that throws when mounted with no props is
|
|
27
|
+
* a component nobody can photograph — and the first real screenshot of this
|
|
28
|
+
* one was blank, which is exactly how that gets noticed.
|
|
29
|
+
*/
|
|
30
|
+
slots?: readonly AppletSlotDecision[];
|
|
31
|
+
/**
|
|
32
|
+
* Render one mountable child. The host owns how an applet is mounted.
|
|
33
|
+
* Optional so this composes in a preview that has no mounting machinery.
|
|
34
|
+
*/
|
|
35
|
+
child?: Snippet<
|
|
36
|
+
[{ slot: string; release: ComponentReleaseRef; manifest: AppletDefinitionManifest | null }]
|
|
37
|
+
>;
|
|
38
|
+
/** Invoked when a viewer asks to approve a child's own capabilities. */
|
|
39
|
+
/** Called with the SLOT being approved — the token every route names it by. */
|
|
40
|
+
onRequestConsent?: (slot: string) => void;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
let { slots = [], child, onRequestConsent }: Props = $props();
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<div class="applet-composition" data-testid="applet-composition">
|
|
47
|
+
{#if slots.length === 0}
|
|
48
|
+
<!-- An applet that composes nothing is ordinary. Saying so beats a blank
|
|
49
|
+
region a reader has to interpret. -->
|
|
50
|
+
<p class="muted" data-testid="composition-empty">This applet composes no other applets.</p>
|
|
51
|
+
{/if}
|
|
52
|
+
{#each slots as decision (decision.slot)}
|
|
53
|
+
<section class="slot" data-slot={decision.slot} data-status={decision.status}>
|
|
54
|
+
{#if decision.status === 'mount'}
|
|
55
|
+
{#if child}
|
|
56
|
+
{@render child({
|
|
57
|
+
slot: decision.slot,
|
|
58
|
+
release: decision.release,
|
|
59
|
+
// `null` when the release was never published, so nothing declares
|
|
60
|
+
// its stores. A host must be able to tell rather than binding a
|
|
61
|
+
// surface to a document that does not exist.
|
|
62
|
+
manifest: decision.manifest
|
|
63
|
+
})}
|
|
64
|
+
{:else}
|
|
65
|
+
<div class="notice" data-testid="slot-mountable">
|
|
66
|
+
<p>Ready to mount: <code>{decision.slot}</code></p>
|
|
67
|
+
</div>
|
|
68
|
+
{/if}
|
|
69
|
+
{:else if decision.status === 'needs-consent'}
|
|
70
|
+
<div class="notice" data-testid="slot-needs-consent">
|
|
71
|
+
<p>
|
|
72
|
+
This part of the applet is a separate release and needs your approval before it can
|
|
73
|
+
run.
|
|
74
|
+
</p>
|
|
75
|
+
{#if decision.capabilities.length > 0}
|
|
76
|
+
<!-- The CHILD's requests. Showing the parent's would let a viewer
|
|
77
|
+
approve one set of capabilities and receive another. -->
|
|
78
|
+
<ul>
|
|
79
|
+
{#each decision.capabilities as capability (capability)}
|
|
80
|
+
<li>{capability}</li>
|
|
81
|
+
{/each}
|
|
82
|
+
</ul>
|
|
83
|
+
{:else}
|
|
84
|
+
<p class="muted">It requests no capabilities.</p>
|
|
85
|
+
{/if}
|
|
86
|
+
{#if onRequestConsent}
|
|
87
|
+
<button type="button" onclick={() => onRequestConsent?.(decision.slot)}>
|
|
88
|
+
Review this part
|
|
89
|
+
</button>
|
|
90
|
+
{/if}
|
|
91
|
+
</div>
|
|
92
|
+
{:else}
|
|
93
|
+
<div class="notice" data-testid="slot-unavailable">
|
|
94
|
+
<p>
|
|
95
|
+
{decision.reason === 'unresolvable'
|
|
96
|
+
? 'This part could not be resolved, so it is not shown.'
|
|
97
|
+
: decision.reason === 'not-attempted'
|
|
98
|
+
? 'This applet composes more parts than are shown here.'
|
|
99
|
+
: 'This part refers to the applet itself and cannot be shown.'}
|
|
100
|
+
</p>
|
|
101
|
+
</div>
|
|
102
|
+
{/if}
|
|
103
|
+
</section>
|
|
104
|
+
{/each}
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<style>
|
|
108
|
+
.applet-composition {
|
|
109
|
+
display: grid;
|
|
110
|
+
gap: 0.75rem;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.notice {
|
|
114
|
+
border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
|
|
115
|
+
border-radius: 0.5rem;
|
|
116
|
+
padding: 0.75rem 1rem;
|
|
117
|
+
font-size: 0.875rem;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.muted {
|
|
121
|
+
opacity: 0.7;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
ul {
|
|
125
|
+
margin: 0.5rem 0 0.75rem;
|
|
126
|
+
padding-left: 1.25rem;
|
|
127
|
+
}
|
|
128
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { AppletDefinitionManifest, AppletSlotDecision, ComponentReleaseRef } from '@vibesdotdev/applets';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
interface Props {
|
|
4
|
+
/**
|
|
5
|
+
* Per-slot decisions from `planAppletComposition`.
|
|
6
|
+
*
|
|
7
|
+
* Defaulted, because a component that throws when mounted with no props is
|
|
8
|
+
* a component nobody can photograph — and the first real screenshot of this
|
|
9
|
+
* one was blank, which is exactly how that gets noticed.
|
|
10
|
+
*/
|
|
11
|
+
slots?: readonly AppletSlotDecision[];
|
|
12
|
+
/**
|
|
13
|
+
* Render one mountable child. The host owns how an applet is mounted.
|
|
14
|
+
* Optional so this composes in a preview that has no mounting machinery.
|
|
15
|
+
*/
|
|
16
|
+
child?: Snippet<[
|
|
17
|
+
{
|
|
18
|
+
slot: string;
|
|
19
|
+
release: ComponentReleaseRef;
|
|
20
|
+
manifest: AppletDefinitionManifest | null;
|
|
21
|
+
}
|
|
22
|
+
]>;
|
|
23
|
+
/** Invoked when a viewer asks to approve a child's own capabilities. */
|
|
24
|
+
/** Called with the SLOT being approved — the token every route names it by. */
|
|
25
|
+
onRequestConsent?: (slot: string) => void;
|
|
26
|
+
}
|
|
27
|
+
declare const AppletComposition: import("svelte").Component<Props, {}, "">;
|
|
28
|
+
type AppletComposition = ReturnType<typeof AppletComposition>;
|
|
29
|
+
export default AppletComposition;
|
|
30
|
+
//# sourceMappingURL=AppletComposition.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppletComposition.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/AppletComposition.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,MAAM,sBAAsB,CAAC;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGrC,UAAU,KAAK;IACd;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACtC;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CACd;QAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,mBAAmB,CAAC;YAAC,QAAQ,EAAE,wBAAwB,GAAG,IAAI,CAAA;SAAE;KAAC,CAC3F,CAAC;IACF,wEAAwE;IACxE,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAyEF,QAAA,MAAM,iBAAiB,2CAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { ComponentReleaseRef, AppletCapabilityGrant } from '@vibesdotdev/applets';
|
|
3
|
+
import { reviewCapabilities, type CapabilityRequest } from '../lib/capability-review.js';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
release: ComponentReleaseRef;
|
|
7
|
+
capabilities: string[];
|
|
8
|
+
capabilityReasons?: Record<string, string>;
|
|
9
|
+
onApprove: () => void;
|
|
10
|
+
onReject: () => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let { release, capabilities, capabilityReasons = {}, onApprove, onReject }: Props = $props();
|
|
14
|
+
|
|
15
|
+
const requestedCapabilities = $derived(
|
|
16
|
+
capabilities.map((tag) => ({
|
|
17
|
+
tag,
|
|
18
|
+
reason: capabilityReasons[tag]
|
|
19
|
+
}))
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
const grantedCapabilities = $derived(
|
|
23
|
+
capabilities.map((tag) => ({
|
|
24
|
+
tag,
|
|
25
|
+
reason: capabilityReasons[tag] ?? 'Approved by user'
|
|
26
|
+
}))
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
const review = $derived(reviewCapabilities(requestedCapabilities, grantedCapabilities));
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<div class="applet-consent" data-testid="applet-consent">
|
|
33
|
+
<div class="consent-header">
|
|
34
|
+
<h2>Review applet capabilities</h2>
|
|
35
|
+
<p class="release-info">
|
|
36
|
+
Component: <code>{release.componentId}</code><br />
|
|
37
|
+
Version: <code>{release.version}</code><br />
|
|
38
|
+
Bundle: <code>{release.bundleHash.slice(0, 12)}...</code>
|
|
39
|
+
</p>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
{#if capabilities.length === 0}
|
|
43
|
+
<p class="no-capabilities">This applet requests no capabilities.</p>
|
|
44
|
+
{:else}
|
|
45
|
+
<ul class="capability-list" data-testid="capability-list">
|
|
46
|
+
{#each capabilities as tag (tag)}
|
|
47
|
+
<li class="capability-item" data-capability={tag}>
|
|
48
|
+
<span class="capability-tag">{tag}</span>
|
|
49
|
+
{#if capabilityReasons[tag]}
|
|
50
|
+
<span class="capability-reason">{capabilityReasons[tag]}</span>
|
|
51
|
+
{/if}
|
|
52
|
+
</li>
|
|
53
|
+
{/each}
|
|
54
|
+
</ul>
|
|
55
|
+
{/if}
|
|
56
|
+
|
|
57
|
+
<div class="consent-actions">
|
|
58
|
+
<button class="reject" data-action="reject" onclick={onReject}>Reject</button>
|
|
59
|
+
<button class="approve" data-action="approve" onclick={onApprove}>Approve and run</button>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<style>
|
|
64
|
+
.applet-consent {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
gap: 1rem;
|
|
68
|
+
padding: 1.5rem;
|
|
69
|
+
border: 1px solid var(--applet-border, #e2e8f0);
|
|
70
|
+
border-radius: 0.5rem;
|
|
71
|
+
background: var(--applet-bg, #fff);
|
|
72
|
+
max-width: 32rem;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.consent-header h2 {
|
|
76
|
+
margin: 0 0 0.5rem;
|
|
77
|
+
font-size: 1.125rem;
|
|
78
|
+
font-weight: 600;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.release-info {
|
|
82
|
+
font-size: 0.875rem;
|
|
83
|
+
color: var(--applet-muted, #64748b);
|
|
84
|
+
line-height: 1.5;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.release-info code {
|
|
88
|
+
font-family: monospace;
|
|
89
|
+
font-size: 0.75rem;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.capability-list {
|
|
93
|
+
list-style: none;
|
|
94
|
+
padding: 0;
|
|
95
|
+
margin: 0;
|
|
96
|
+
display: flex;
|
|
97
|
+
flex-direction: column;
|
|
98
|
+
gap: 0.5rem;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.capability-item {
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-direction: column;
|
|
104
|
+
gap: 0.25rem;
|
|
105
|
+
padding: 0.5rem;
|
|
106
|
+
border: 1px solid var(--applet-border, #e2e8f0);
|
|
107
|
+
border-radius: 0.25rem;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.capability-tag {
|
|
111
|
+
font-weight: 500;
|
|
112
|
+
font-size: 0.875rem;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.capability-reason {
|
|
116
|
+
font-size: 0.75rem;
|
|
117
|
+
color: var(--applet-muted, #64748b);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.consent-actions {
|
|
121
|
+
display: flex;
|
|
122
|
+
gap: 0.5rem;
|
|
123
|
+
justify-content: flex-end;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.consent-actions button {
|
|
127
|
+
padding: 0.5rem 1rem;
|
|
128
|
+
border-radius: 0.25rem;
|
|
129
|
+
border: 1px solid var(--applet-border, #e2e8f0);
|
|
130
|
+
cursor: pointer;
|
|
131
|
+
font-size: 0.875rem;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.approve {
|
|
135
|
+
background: var(--applet-primary, #0f172a);
|
|
136
|
+
color: white;
|
|
137
|
+
border-color: var(--applet-primary, #0f172a);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.reject {
|
|
141
|
+
background: transparent;
|
|
142
|
+
}
|
|
143
|
+
</style>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComponentReleaseRef } from '@vibesdotdev/applets';
|
|
2
|
+
interface Props {
|
|
3
|
+
release: ComponentReleaseRef;
|
|
4
|
+
capabilities: string[];
|
|
5
|
+
capabilityReasons?: Record<string, string>;
|
|
6
|
+
onApprove: () => void;
|
|
7
|
+
onReject: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare const AppletConsent: import("svelte").Component<Props, {}, "">;
|
|
10
|
+
type AppletConsent = ReturnType<typeof AppletConsent>;
|
|
11
|
+
export default AppletConsent;
|
|
12
|
+
//# sourceMappingURL=AppletConsent.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppletConsent.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/AppletConsent.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAyB,MAAM,sBAAsB,CAAC;AAItF,UAAU,KAAK;IACd,OAAO,EAAE,mBAAmB,CAAC;IAC7B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACrB;AA4DF,QAAA,MAAM,aAAa,2CAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { untrack } from 'svelte';
|
|
3
|
+
import { settle, CapabilityError, CaughtFailureSchema } from '@vibesdotdev/kernel';
|
|
4
|
+
import { Button } from '@vibesdotdev/kit/components/ui/button';
|
|
5
|
+
import { Alert, AlertTitle, AlertDescription } from '@vibesdotdev/kit/components/ui/alert';
|
|
6
|
+
import { Spinner } from '@vibesdotdev/kit/components/ui/spinner';
|
|
7
|
+
import { ManifestForm } from '@vibesdotdev/kit/forms';
|
|
8
|
+
import * as Collapsible from '@vibesdotdev/kit/components/ui/collapsible';
|
|
9
|
+
import { getRuntimeSvelteContext } from '@vibesdotdev/surface-sveltekit/svelte/state';
|
|
10
|
+
import type { JsonObject } from '@vibesdotdev/kernel/schemas/json';
|
|
11
|
+
import { connectServedAppletSurface } from '../../cli/commands/served-applet-connection.js';
|
|
12
|
+
import type { AppletComponentLoader, AppletRoute, AppletViewDefinition } from '../../presentation.js';
|
|
13
|
+
|
|
14
|
+
interface Props {
|
|
15
|
+
definition: AppletViewDefinition;
|
|
16
|
+
loadComponent: AppletComponentLoader;
|
|
17
|
+
input: JsonObject;
|
|
18
|
+
route: AppletRoute;
|
|
19
|
+
onConfigure: (input: JsonObject) => void | Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
let { definition, loadComponent, input, route, onConfigure }: Props = $props();
|
|
22
|
+
const runtimeStore = getRuntimeSvelteContext();
|
|
23
|
+
let attempt = $state(0);
|
|
24
|
+
let pending = $state.raw<Promise<{
|
|
25
|
+
Component: Awaited<ReturnType<AppletComponentLoader>>;
|
|
26
|
+
connection: Awaited<ReturnType<typeof connectServedAppletSurface>>;
|
|
27
|
+
}> | null>(null);
|
|
28
|
+
let connectionFailure = $state.raw<CapabilityError | null>(null);
|
|
29
|
+
const request = $derived({ id: definition.id, load: loadComponent, attempt });
|
|
30
|
+
|
|
31
|
+
$effect(() => {
|
|
32
|
+
const { id, load } = request;
|
|
33
|
+
let disposed = false;
|
|
34
|
+
let connection: Awaited<ReturnType<typeof connectServedAppletSurface>> | undefined;
|
|
35
|
+
connectionFailure = null;
|
|
36
|
+
pending = untrack(async () => {
|
|
37
|
+
const Component = await load();
|
|
38
|
+
const runtime = await runtimeStore.load();
|
|
39
|
+
if (disposed) throw new Error('Applet navigation was cancelled.');
|
|
40
|
+
connection = await connectServedAppletSurface({
|
|
41
|
+
projectId: id, origin: window.location.origin, lifecycle: runtime.lifecycle,
|
|
42
|
+
fetch: window.fetch.bind(window), pathPrefix: `/${encodeURIComponent(id)}`
|
|
43
|
+
});
|
|
44
|
+
if (disposed) {
|
|
45
|
+
await connection.close();
|
|
46
|
+
throw new Error('Applet navigation was cancelled.');
|
|
47
|
+
}
|
|
48
|
+
void connection.closed.then(() => {
|
|
49
|
+
if (!disposed) connectionFailure = new CapabilityError('The applet runtime connection closed.', 'UNAVAILABLE', {
|
|
50
|
+
reason: 'applet-host-connection-closed', retryable: true
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
return { Component, connection };
|
|
54
|
+
});
|
|
55
|
+
return () => {
|
|
56
|
+
disposed = true;
|
|
57
|
+
void settle(async () => connection?.close()).then(outcome => {
|
|
58
|
+
if (!outcome.ok) connectionFailure = CapabilityError.from(CaughtFailureSchema.parse(outcome.cause));
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<section class="flex min-h-0 flex-1 flex-col bg-background text-foreground" aria-label={definition.title}>
|
|
65
|
+
{#if definition.shell === 'standard'}
|
|
66
|
+
<header class="flex flex-wrap items-center justify-between gap-3 border-b px-6 py-4">
|
|
67
|
+
<div class="min-w-0 space-y-1">
|
|
68
|
+
<Button href="/applets" variant="link" size="sm" class="h-auto p-0">All applets</Button>
|
|
69
|
+
<h1 class="text-lg font-semibold">{definition.title}</h1>
|
|
70
|
+
{#if definition.description}<p class="text-sm text-muted-foreground">{definition.description}</p>{/if}
|
|
71
|
+
</div>
|
|
72
|
+
</header>
|
|
73
|
+
{/if}
|
|
74
|
+
{#if definition.inputs}
|
|
75
|
+
<Collapsible.Root class="border-b px-6 py-3">
|
|
76
|
+
<Collapsible.Trigger class="text-sm font-medium underline-offset-4 hover:underline">Configure inputs</Collapsible.Trigger>
|
|
77
|
+
<Collapsible.Content class="pt-4">
|
|
78
|
+
<ManifestForm manifest={definition.inputs} initialValues={input} submitLabel="Apply inputs" cardLayout={false}
|
|
79
|
+
onSubmit={values => onConfigure(definition.inputs!.schema.parse(values))} />
|
|
80
|
+
</Collapsible.Content>
|
|
81
|
+
</Collapsible.Root>
|
|
82
|
+
{/if}
|
|
83
|
+
{#if connectionFailure}
|
|
84
|
+
<Alert variant="destructive" class="m-6 w-auto">
|
|
85
|
+
<AlertTitle>Runtime connection closed</AlertTitle>
|
|
86
|
+
<AlertDescription>{connectionFailure.message}</AlertDescription>
|
|
87
|
+
<Button variant="outline" class="mt-3" onclick={() => attempt++}>Reconnect</Button>
|
|
88
|
+
</Alert>
|
|
89
|
+
{:else if pending}
|
|
90
|
+
{#await pending}
|
|
91
|
+
<div role="status" class="flex min-h-48 items-center justify-center gap-3 text-sm text-muted-foreground"><Spinner class="size-4" />Opening {definition.title}…</div>
|
|
92
|
+
{:then opened}
|
|
93
|
+
<opened.Component vibes={opened.connection.surface} {input} {route} />
|
|
94
|
+
{:catch cause}
|
|
95
|
+
<Alert variant="destructive" class="m-6 w-auto">
|
|
96
|
+
<AlertTitle>Could not open {definition.title}</AlertTitle>
|
|
97
|
+
<AlertDescription>{CapabilityError.from(CaughtFailureSchema.parse(cause)).message}</AlertDescription>
|
|
98
|
+
<Button variant="outline" class="mt-3" onclick={() => attempt++}>Try again</Button>
|
|
99
|
+
</Alert>
|
|
100
|
+
{/await}
|
|
101
|
+
{/if}
|
|
102
|
+
</section>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { JsonObject } from '@vibesdotdev/kernel/schemas/json';
|
|
2
|
+
import type { AppletComponentLoader, AppletRoute, AppletViewDefinition } from '../../presentation.ts';
|
|
3
|
+
interface Props {
|
|
4
|
+
definition: AppletViewDefinition;
|
|
5
|
+
loadComponent: AppletComponentLoader;
|
|
6
|
+
input: JsonObject;
|
|
7
|
+
route: AppletRoute;
|
|
8
|
+
onConfigure: (input: JsonObject) => void | Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
declare const LocalAppletView: import("svelte").Component<Props, {}, "">;
|
|
11
|
+
type LocalAppletView = ReturnType<typeof LocalAppletView>;
|
|
12
|
+
export default LocalAppletView;
|
|
13
|
+
//# sourceMappingURL=LocalAppletView.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalAppletView.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/LocalAppletView.svelte.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAEnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAGrG,UAAU,KAAK;IACd,UAAU,EAAE,oBAAoB,CAAC;IACjC,aAAa,EAAE,qBAAqB,CAAC;IACrC,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,WAAW,CAAC;IACnB,WAAW,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD;AAkGF,QAAA,MAAM,eAAe,2CAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { untrack, type Snippet } from 'svelte';
|
|
3
|
+
import { CapabilityError, CaughtFailureSchema, settle } from '@vibesdotdev/kernel';
|
|
4
|
+
import { Alert, AlertTitle, AlertDescription } from '@vibesdotdev/kit/components/ui/alert';
|
|
5
|
+
import { RunFeedbackPanel, RunFeedbackInbox, RunLogThread } from '@vibesdotdev/tools/svelte/tool-widgets';
|
|
6
|
+
import { Spinner } from '@vibesdotdev/kit/components/ui/spinner';
|
|
7
|
+
import { RunsStore, RunsView } from '@vibesdotdev/runnable/svelte';
|
|
8
|
+
import type { RunnableReadQuery, RunnableSnapshot } from '@vibesdotdev/runnable';
|
|
9
|
+
import type { AppletRootSurface } from '../../applet-root-surface.js';
|
|
10
|
+
import { appletRunsSource } from '../runnable-source.js';
|
|
11
|
+
|
|
12
|
+
let { vibes, title, query = {}, projection = 'records', sections, overview, issues, origin }: {
|
|
13
|
+
vibes?: AppletRootSurface;
|
|
14
|
+
title?: string;
|
|
15
|
+
query?: RunnableReadQuery;
|
|
16
|
+
projection?: 'catalog' | 'records';
|
|
17
|
+
sections?: Snippet<[RunnableSnapshot, RunsStore | undefined]>;
|
|
18
|
+
overview?: Snippet<[RunsStore]>;
|
|
19
|
+
issues?: Snippet<[RunsStore, (id: string) => void, () => void]>;
|
|
20
|
+
origin?: string;
|
|
21
|
+
} = $props();
|
|
22
|
+
const store = $derived(vibes ? new RunsStore(appletRunsSource(vibes), query, projection) : null);
|
|
23
|
+
let connectionFailure = $state.raw<CapabilityError | null>(null);
|
|
24
|
+
async function observe(work: () => Promise<void>) {
|
|
25
|
+
const outcome = await settle(work);
|
|
26
|
+
if (!outcome.ok) connectionFailure = CapabilityError.from(CaughtFailureSchema.parse(outcome.cause));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
$effect(() => {
|
|
30
|
+
const current = store;
|
|
31
|
+
if (!current) return;
|
|
32
|
+
untrack(() => { void observe(() => current.open()); });
|
|
33
|
+
return () => {
|
|
34
|
+
void observe(() => current.close());
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
{#if connectionFailure}<div class="bg-background p-4 text-foreground"><Alert variant="destructive"><AlertTitle>Subscription failed</AlertTitle><AlertDescription>{connectionFailure.message}</AlertDescription></Alert></div>{/if}
|
|
40
|
+
{#snippet requests(snapshot: RunnableSnapshot, current: RunsStore | undefined)}
|
|
41
|
+
{#if current}<RunFeedbackPanel {snapshot} source={current.source} />{/if}
|
|
42
|
+
{/snippet}
|
|
43
|
+
{#snippet thread(snapshot: RunnableSnapshot, focusedIndex: number | null)}
|
|
44
|
+
<RunLogThread logs={snapshot.logs} {focusedIndex} />
|
|
45
|
+
{/snippet}
|
|
46
|
+
{#snippet trackerOverview(current: RunsStore)}
|
|
47
|
+
<RunFeedbackInbox runs={current.listRows.map(row => row.run)} loading={current.revision === null} source={current.source} onselect={id => { void observe(() => current.select(id)); }} />
|
|
48
|
+
{@render overview?.(current)}
|
|
49
|
+
{/snippet}
|
|
50
|
+
{#if store}<RunsView {store} {title} {sections} {issues} overview={trackerOverview} {origin} {requests} {thread} />
|
|
51
|
+
{:else}<div role="status" class="flex min-h-48 items-center justify-center gap-3 bg-background p-6 text-sm text-muted-foreground"><Spinner class="size-4" />Waiting for the host runtime connection.</div>{/if}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Snippet } from 'svelte';
|
|
2
|
+
import { RunsStore } from '@vibesdotdev/runnable/svelte';
|
|
3
|
+
import type { RunnableReadQuery, RunnableSnapshot } from '@vibesdotdev/runnable';
|
|
4
|
+
import type { AppletRootSurface } from '../../applet-root-surface.ts';
|
|
5
|
+
type $$ComponentProps = {
|
|
6
|
+
vibes?: AppletRootSurface;
|
|
7
|
+
title?: string;
|
|
8
|
+
query?: RunnableReadQuery;
|
|
9
|
+
projection?: 'catalog' | 'records';
|
|
10
|
+
sections?: Snippet<[RunnableSnapshot, RunsStore | undefined]>;
|
|
11
|
+
overview?: Snippet<[RunsStore]>;
|
|
12
|
+
issues?: Snippet<[RunsStore, (id: string) => void, () => void]>;
|
|
13
|
+
origin?: string;
|
|
14
|
+
};
|
|
15
|
+
declare const RunnableTracker: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
16
|
+
type RunnableTracker = ReturnType<typeof RunnableTracker>;
|
|
17
|
+
export default RunnableTracker;
|
|
18
|
+
//# sourceMappingURL=RunnableTracker.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RunnableTracker.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/RunnableTracker.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAAW,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAK/C,OAAO,EAAE,SAAS,EAAY,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGrE,KAAK,gBAAgB,GAAI;IACxB,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,UAAU,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,gBAAgB,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AA8CH,QAAA,MAAM,eAAe,sDAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as AppletCanvas } from './components/AppletCanvas.svelte';
|
|
2
|
+
export { default as AppletComposition } from './components/AppletComposition.svelte';
|
|
3
|
+
export { default as AppletConsent } from './components/AppletConsent.svelte';
|
|
4
|
+
export { default as RunnableTracker } from './components/RunnableTracker.svelte';
|
|
5
|
+
export { default as AppletCatalog } from './components/AppletCatalog.svelte';
|
|
6
|
+
export { default as LocalAppletView } from './components/LocalAppletView.svelte';
|
|
7
|
+
export { createCanvasState, type CanvasStateStore } from './state.svelte.ts';
|
|
8
|
+
export * from './lib/canvas-lifecycle.ts';
|
|
9
|
+
export * from './lib/capability-review.ts';
|
|
10
|
+
export * from './lib/message-protocol.ts';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/svelte/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as AppletCanvas } from './components/AppletCanvas.svelte';
|
|
2
|
+
export { default as AppletComposition } from './components/AppletComposition.svelte';
|
|
3
|
+
export { default as AppletConsent } from './components/AppletConsent.svelte';
|
|
4
|
+
export { default as RunnableTracker } from './components/RunnableTracker.svelte';
|
|
5
|
+
export { default as AppletCatalog } from './components/AppletCatalog.svelte';
|
|
6
|
+
export { default as LocalAppletView } from './components/LocalAppletView.svelte';
|
|
7
|
+
export { createCanvasState } from "./state.svelte.js";
|
|
8
|
+
export * from "./lib/canvas-lifecycle.js";
|
|
9
|
+
export * from "./lib/capability-review.js";
|
|
10
|
+
export * from "./lib/message-protocol.js";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Applet canvas lifecycle — pure state machine, no Svelte reactivity.
|
|
3
|
+
*
|
|
4
|
+
* The canvas transitions through these states:
|
|
5
|
+
*
|
|
6
|
+
* loading → ready → approved → mounted → (running | crashed | unresponsive)
|
|
7
|
+
* ↑ ↓
|
|
8
|
+
* ←←← revoked / expired / disposed ←←←
|
|
9
|
+
*
|
|
10
|
+
* CRITICAL INVARIANT: no bundle URL, modulepreload, or runner document
|
|
11
|
+
* may enter the DOM before the `approved` state. The `loading` and `ready`
|
|
12
|
+
* states carry ONLY inert release metadata (digest, version, capabilities).
|
|
13
|
+
*/
|
|
14
|
+
export type CanvasState = 'loading' | 'ready' | 'approved' | 'mounted' | 'running' | 'crashed' | 'unresponsive' | 'revoked' | 'expired' | 'disposed';
|
|
15
|
+
export interface CanvasContext {
|
|
16
|
+
state: CanvasState;
|
|
17
|
+
/** True when consent has been granted by the user. */
|
|
18
|
+
consented: boolean;
|
|
19
|
+
/** True when the runner frame has been mounted into the DOM. */
|
|
20
|
+
runnerMounted: boolean;
|
|
21
|
+
/** Monotonic heartbeat counter — 0 means no heartbeat yet. */
|
|
22
|
+
heartbeatCount: number;
|
|
23
|
+
/** Last error message, set when state is `crashed`. */
|
|
24
|
+
error: string | null;
|
|
25
|
+
}
|
|
26
|
+
export declare function createCanvasContext(): CanvasContext;
|
|
27
|
+
/** Transition to `ready` — metadata loaded, awaiting consent. */
|
|
28
|
+
export declare function transitionToReady(ctx: CanvasContext): CanvasContext;
|
|
29
|
+
/** Transition to `approved` — consent granted, may now mount the runner. */
|
|
30
|
+
export declare function transitionToApproved(ctx: CanvasContext): CanvasContext;
|
|
31
|
+
/** Transition to `mounted` — runner frame is in the DOM. */
|
|
32
|
+
export declare function transitionToMounted(ctx: CanvasContext): CanvasContext;
|
|
33
|
+
/** Transition to `running` — runner handshake completed. */
|
|
34
|
+
export declare function transitionToRunning(ctx: CanvasContext): CanvasContext;
|
|
35
|
+
/** Record a heartbeat from the runner. */
|
|
36
|
+
export declare function recordHeartbeat(ctx: CanvasContext): CanvasContext;
|
|
37
|
+
/** Transition to `crashed` — runner reported an error. */
|
|
38
|
+
export declare function transitionToCrashed(ctx: CanvasContext, error: string): CanvasContext;
|
|
39
|
+
/** Transition to `unresponsive` — heartbeat timeout. */
|
|
40
|
+
export declare function transitionToUnresponsive(ctx: CanvasContext): CanvasContext;
|
|
41
|
+
/** Transition to `revoked` — capabilities revoked by user. */
|
|
42
|
+
export declare function transitionToRevoked(ctx: CanvasContext): CanvasContext;
|
|
43
|
+
/** Transition to `expired` — launch lease expired. */
|
|
44
|
+
export declare function transitionToExpired(ctx: CanvasContext): CanvasContext;
|
|
45
|
+
/** Transition to `disposed` — runner destroyed, ports closed. */
|
|
46
|
+
export declare function transitionToDisposed(ctx: CanvasContext): CanvasContext;
|
|
47
|
+
/**
|
|
48
|
+
* Returns true if the current state permits mounting the runner.
|
|
49
|
+
* Only `approved` permits mounting — never `loading`, `ready`, `running`,
|
|
50
|
+
* `crashed`, etc.
|
|
51
|
+
*/
|
|
52
|
+
export declare function canMountRunner(ctx: CanvasContext): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Returns true if the current state permits fetching the bundle bytes.
|
|
55
|
+
* Only `approved` (after consent) permits fetching — never `loading` or
|
|
56
|
+
* `ready`. This is the network assertion: zero bundle requests before
|
|
57
|
+
* consent.
|
|
58
|
+
*/
|
|
59
|
+
export declare function canFetchBundle(ctx: CanvasContext): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Returns true if the current state is terminal (no further transitions).
|
|
62
|
+
*/
|
|
63
|
+
export declare function isTerminal(ctx: CanvasContext): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Returns true if the current state is an error state.
|
|
66
|
+
*/
|
|
67
|
+
export declare function isErrorState(ctx: CanvasContext): boolean;
|
|
68
|
+
//# sourceMappingURL=canvas-lifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas-lifecycle.d.ts","sourceRoot":"","sources":["../../../src/svelte/lib/canvas-lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,WAAW,GACpB,SAAS,GACT,OAAO,GACP,UAAU,GACV,SAAS,GACT,SAAS,GACT,SAAS,GACT,cAAc,GACd,SAAS,GACT,SAAS,GACT,UAAU,CAAC;AAEd,MAAM,WAAW,aAAa;IAC7B,KAAK,EAAE,WAAW,CAAC;IACnB,sDAAsD;IACtD,SAAS,EAAE,OAAO,CAAC;IACnB,gEAAgE;IAChE,aAAa,EAAE,OAAO,CAAC;IACvB,8DAA8D;IAC9D,cAAc,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,wBAAgB,mBAAmB,IAAI,aAAa,CAQnD;AAED,iEAAiE;AACjE,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,aAAa,CAGnE;AAED,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,aAAa,CAGtE;AAED,4DAA4D;AAC5D,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,aAAa,CAGrE;AAED,4DAA4D;AAC5D,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,aAAa,CAGrE;AAED,0CAA0C;AAC1C,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,aAAa,CAEjE;AAED,0DAA0D;AAC1D,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,GAAG,aAAa,CAEpF;AAED,wDAAwD;AACxD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,aAAa,GAAG,aAAa,CAE1E;AAED,8DAA8D;AAC9D,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,aAAa,CAErE;AAED,sDAAsD;AACtD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,aAAa,CAErE;AAED,iEAAiE;AACjE,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,aAAa,CAEtE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAE1D;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAEtD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAExD"}
|