@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.
- 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,457 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Immutable Applet definition metadata carried by one exact Component release.
|
|
3
|
+
*
|
|
4
|
+
* Platform continues to own source, compilation, bundles, and releases. This
|
|
5
|
+
* schema describes the Applet-specific contract of that release: one HTML or
|
|
6
|
+
* Svelte entrypoint, its immutable file inventory, Applet-owned storage,
|
|
7
|
+
* referenced Assets, composition pins, and capabilities over browsing-user or
|
|
8
|
+
* external data.
|
|
9
|
+
*/
|
|
10
|
+
import * as z from 'zod/v4';
|
|
11
|
+
import { componentReleaseRefSchema } from "./component-release-ref.js";
|
|
12
|
+
import { boundedJsonValueSchema, boundedWireSchemaSchema } from '@vibesdotdev/shared/schemas';
|
|
13
|
+
import { appletCapabilityKindSchema } from "./capabilities.js";
|
|
14
|
+
import { appletContributesSchema, appletImplRefSchema } from "./contributes.js";
|
|
15
|
+
import { SAFE_CAPABILITY, SAFE_ID, SAFE_RELATIVE_PATH } from "./patterns.js";
|
|
16
|
+
const SHA256_DIGEST = /^(?:sha256:)?[a-f0-9]{64}$/i;
|
|
17
|
+
export const appletRelativePathSchema = z
|
|
18
|
+
.string()
|
|
19
|
+
.min(1)
|
|
20
|
+
.max(512)
|
|
21
|
+
.regex(SAFE_RELATIVE_PATH, 'Applet paths must be safe, relative POSIX paths');
|
|
22
|
+
export const appletEntrypointKindSchema = z.enum(['html', 'svelte']);
|
|
23
|
+
export const appletEntrypointSchema = z
|
|
24
|
+
.object({
|
|
25
|
+
kind: appletEntrypointKindSchema,
|
|
26
|
+
path: appletRelativePathSchema
|
|
27
|
+
})
|
|
28
|
+
.superRefine((entrypoint, ctx) => {
|
|
29
|
+
const extension = entrypoint.kind === 'html' ? '.html' : '.svelte';
|
|
30
|
+
if (!entrypoint.path.toLowerCase().endsWith(extension)) {
|
|
31
|
+
ctx.addIssue({
|
|
32
|
+
code: 'custom',
|
|
33
|
+
path: ['path'],
|
|
34
|
+
message: `${entrypoint.kind} entrypoints must end in ${extension}`
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export const appletPackageFileSchema = z.object({
|
|
39
|
+
path: appletRelativePathSchema,
|
|
40
|
+
mediaType: z.string().min(1).max(160),
|
|
41
|
+
/** Digest of the immutable published file bytes. */
|
|
42
|
+
digest: z.string().regex(SHA256_DIGEST, 'Applet file digests must be SHA-256'),
|
|
43
|
+
size: z
|
|
44
|
+
.number()
|
|
45
|
+
.int()
|
|
46
|
+
.nonnegative()
|
|
47
|
+
.max(16 * 1024 * 1024)
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* Applet-owned data is not a browsing-user capability. The runtime derives the
|
|
51
|
+
* Applet instance and viewer partition and exposes only these declared stores.
|
|
52
|
+
*/
|
|
53
|
+
export const appletOwnStorageDescriptorSchema = z
|
|
54
|
+
.object({
|
|
55
|
+
id: z.string().min(1).max(64).regex(SAFE_ID, 'Storage ids must be kebab-case'),
|
|
56
|
+
/**
|
|
57
|
+
* Who owns these rows, and therefore who may write them.
|
|
58
|
+
*
|
|
59
|
+
* - `applet-owned` — per-instance state the Applet manages itself.
|
|
60
|
+
* - `author-owned` — one dataset per definition, shared across every
|
|
61
|
+
* install. READ-ONLY to subscribers and billed to the author; this is a
|
|
62
|
+
* multi-tenant read path, so it is the tier most able to leak.
|
|
63
|
+
* - `viewer-owned` — the end user's own data. Portable, and retained
|
|
64
|
+
* under the viewer's authority rather than the instance's.
|
|
65
|
+
*
|
|
66
|
+
* Orthogonal to `scope`, which partitions rows rather than assigning them.
|
|
67
|
+
*/
|
|
68
|
+
authority: z
|
|
69
|
+
.enum(['applet-owned', 'author-owned', 'viewer-owned'])
|
|
70
|
+
.default('applet-owned'),
|
|
71
|
+
scope: z.enum(['instance', 'viewer']).default('instance'),
|
|
72
|
+
schemaVersion: z.number().int().positive(),
|
|
73
|
+
/**
|
|
74
|
+
* Wire-safe JSON Schema for one stored record.
|
|
75
|
+
*
|
|
76
|
+
* Bounded by the safety profile in `wire-schema.ts`: no `$ref`, no
|
|
77
|
+
* catastrophic `pattern`, capped depth/nodes/bytes. Wire-safe is not
|
|
78
|
+
* self-validating, and a manifest is third-party input.
|
|
79
|
+
*/
|
|
80
|
+
recordSchema: boundedWireSchemaSchema,
|
|
81
|
+
/*
|
|
82
|
+
* There is deliberately NO `indexes` field.
|
|
83
|
+
*
|
|
84
|
+
* It was declarable and backed by nothing, and it could not be backed: an
|
|
85
|
+
* index built from a manifest is a DATABASE OBJECT created from third-party
|
|
86
|
+
* input, which is the same argument that rules out a table per declaration.
|
|
87
|
+
* The host owns its schema.
|
|
88
|
+
*
|
|
89
|
+
* Removing it is safe for published manifests — the schema is non-strict, so
|
|
90
|
+
* an old manifest carrying `indexes` still parses and the field is dropped.
|
|
91
|
+
* Listing is ordered and indexed by key, which is the access pattern the
|
|
92
|
+
* store actually offers.
|
|
93
|
+
*/
|
|
94
|
+
quotaBytes: z.number().int().positive().optional(),
|
|
95
|
+
/**
|
|
96
|
+
* Author-defined write conditions (A2b, pattern P1), declarative and
|
|
97
|
+
* bounded: an incoming record must ALSO match this wire schema to be
|
|
98
|
+
* written, evaluated server-side on every write with the acting principal
|
|
99
|
+
* bound by the host. Absent, `recordSchema` alone governs. Requires
|
|
100
|
+
* schemaVersion 3, so a host that cannot evaluate one never accepts a
|
|
101
|
+
* manifest carrying it.
|
|
102
|
+
*/
|
|
103
|
+
writeConditions: boundedWireSchemaSchema.optional()
|
|
104
|
+
})
|
|
105
|
+
.superRefine((store, ctx) => {
|
|
106
|
+
// `author-owned` is ONE dataset per definition. A per-viewer partition of a
|
|
107
|
+
// single shared dataset is incoherent: the two statements cannot both hold,
|
|
108
|
+
// and a store declaring both asks a reader to pick one silently.
|
|
109
|
+
//
|
|
110
|
+
// Refused at DECLARATION rather than handled at read time, because the read
|
|
111
|
+
// path for that combination would have to drop either the definition key or
|
|
112
|
+
// the viewer key, and dropping either one is a leak.
|
|
113
|
+
if (store.authority === 'author-owned' && store.scope === 'viewer') {
|
|
114
|
+
ctx.addIssue({
|
|
115
|
+
code: 'custom',
|
|
116
|
+
path: ['scope'],
|
|
117
|
+
message: 'author-owned storage is one dataset per definition and cannot be viewer-scoped'
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
export const appletAssetRefSchema = z.object({
|
|
122
|
+
assetId: z.string().min(1).max(160),
|
|
123
|
+
/** Immutable Asset revision; never a mutable `latest` alias. */
|
|
124
|
+
revision: z
|
|
125
|
+
.string()
|
|
126
|
+
.min(1)
|
|
127
|
+
.max(80)
|
|
128
|
+
.refine((value) => value.toLowerCase() !== 'latest', {
|
|
129
|
+
message: 'Applet Asset references must pin an exact revision'
|
|
130
|
+
}),
|
|
131
|
+
digest: z.string().regex(SHA256_DIGEST, 'Applet Asset digests must be SHA-256'),
|
|
132
|
+
mountPath: appletRelativePathSchema
|
|
133
|
+
});
|
|
134
|
+
export const appletCompositionSchema = z.object({
|
|
135
|
+
mode: z.enum(['extends', 'renders']),
|
|
136
|
+
/** Exact child/base release; composition never follows `latest`. */
|
|
137
|
+
release: componentReleaseRefSchema,
|
|
138
|
+
slot: z.string().min(1).max(80).regex(SAFE_ID, 'Composition slots must be kebab-case'),
|
|
139
|
+
/**
|
|
140
|
+
* Composition props — VALUES passed to the child, not a schema. Bounded
|
|
141
|
+
* against a 10MB `props` being accepted, stored, and re-parsed on every row
|
|
142
|
+
* of a list read; not interpreted, because a prop may legitimately be named
|
|
143
|
+
* `pattern` or `$ref`.
|
|
144
|
+
*/
|
|
145
|
+
props: boundedJsonValueSchema.default({})
|
|
146
|
+
});
|
|
147
|
+
export const appletCapabilityRequestSchema = z.object({
|
|
148
|
+
tag: z.string().min(1).max(128).regex(SAFE_CAPABILITY, 'Capability tags must be URL-safe'),
|
|
149
|
+
reason: z.string().min(1).max(500),
|
|
150
|
+
required: z.boolean().default(true)
|
|
151
|
+
});
|
|
152
|
+
/**
|
|
153
|
+
* The principal an applet action runs AS (A2b).
|
|
154
|
+
*
|
|
155
|
+
* - `author` — the applet's owner: the local workspace user, or the instance
|
|
156
|
+
* owner in the cloud. Owns paired resources and defines policy/conditions.
|
|
157
|
+
* - `viewer` — the runtime principal at render time: the same user locally,
|
|
158
|
+
* the viewer session in the cloud, carrying its own runtime and auth.
|
|
159
|
+
*/
|
|
160
|
+
export const appletPrincipalSchema = z.enum(['author', 'viewer']);
|
|
161
|
+
/**
|
|
162
|
+
* An approved server action (A2b).
|
|
163
|
+
*
|
|
164
|
+
* The handler is a REFERENCE into the release's own `files[]`, never inline
|
|
165
|
+
* code: dispatching one crosses the sandbox boundary exactly as a contributed
|
|
166
|
+
* implementation does, and the host never imports a release file. `policy`
|
|
167
|
+
* carries the author's declarative conditions, bounded like every other
|
|
168
|
+
* author-supplied value, and is evaluated server-side with the acting
|
|
169
|
+
* principal.
|
|
170
|
+
*/
|
|
171
|
+
export const appletServerActionSchema = z
|
|
172
|
+
.object({
|
|
173
|
+
id: z.string().min(1).max(64).regex(SAFE_ID, 'Server action ids must be kebab-case'),
|
|
174
|
+
/** Which principal the action runs AS; the host binds it, never the caller. */
|
|
175
|
+
principal: appletPrincipalSchema,
|
|
176
|
+
/**
|
|
177
|
+
* A reference into `files[]`. Server actions run SERVER-side by
|
|
178
|
+
* definition, so a `client` handler is refused rather than dispatched to
|
|
179
|
+
* a frame that cannot serve it.
|
|
180
|
+
*/
|
|
181
|
+
handler: appletImplRefSchema.extend({ surface: z.literal('server') }),
|
|
182
|
+
/** Author-defined, declarative conditions; never executable code. */
|
|
183
|
+
policy: boundedJsonValueSchema.default({})
|
|
184
|
+
})
|
|
185
|
+
.strict();
|
|
186
|
+
function duplicateValues(values) {
|
|
187
|
+
const seen = new Set();
|
|
188
|
+
const duplicates = new Set();
|
|
189
|
+
for (const value of values) {
|
|
190
|
+
if (seen.has(value))
|
|
191
|
+
duplicates.add(value);
|
|
192
|
+
seen.add(value);
|
|
193
|
+
}
|
|
194
|
+
return duplicates;
|
|
195
|
+
}
|
|
196
|
+
export const appletDefinitionManifestSchema = z
|
|
197
|
+
.object({
|
|
198
|
+
/**
|
|
199
|
+
* 1 — legacy. Capability tags are free-form; `contributes` is forbidden.
|
|
200
|
+
* 2 — every capability tag must be in the closed capability vocabulary, and
|
|
201
|
+
* `contributes` is permitted.
|
|
202
|
+
* 3 — bounded capability tags are admitted against trusted runtime registrations at consent/invoke.
|
|
203
|
+
*
|
|
204
|
+
* Published manifests are immutable and digest-pinned, so v1 releases can
|
|
205
|
+
* never be corrected in place. Tightening the contract under a new version
|
|
206
|
+
* is what lets the rule be strict without invalidating shipped releases.
|
|
207
|
+
*/
|
|
208
|
+
schemaVersion: z.union([z.literal(1), z.literal(2), z.literal(3)]),
|
|
209
|
+
entrypoint: appletEntrypointSchema,
|
|
210
|
+
files: z.array(appletPackageFileSchema).min(1).max(256),
|
|
211
|
+
storage: z.array(appletOwnStorageDescriptorSchema).max(64).default([]),
|
|
212
|
+
assets: z.array(appletAssetRefSchema).max(256).default([]),
|
|
213
|
+
composition: z.array(appletCompositionSchema).max(64).default([]),
|
|
214
|
+
/**
|
|
215
|
+
* Authority over browsing-user or external data. Applet-owned storage is
|
|
216
|
+
* declared above and deliberately absent from this list.
|
|
217
|
+
*/
|
|
218
|
+
capabilities: z.array(appletCapabilityRequestSchema).max(64).default([]),
|
|
219
|
+
/**
|
|
220
|
+
* What this release adds to a subscriber's runtime. Inert data only —
|
|
221
|
+
* see `contributes.ts`. Permitted from schemaVersion 2 onward.
|
|
222
|
+
*/
|
|
223
|
+
contributes: appletContributesSchema.optional(),
|
|
224
|
+
/**
|
|
225
|
+
* Approved server actions (A2b): references into `files[]` plus the
|
|
226
|
+
* principal they run AS and the author's policy. Inert data; dispatch
|
|
227
|
+
* crosses the sandbox boundary. Permitted from schemaVersion 3 onward.
|
|
228
|
+
*/
|
|
229
|
+
// Optional, never defaulted: an absent field keeps every existing manifest's hash unchanged.
|
|
230
|
+
serverActions: z.array(appletServerActionSchema).max(32).optional()
|
|
231
|
+
})
|
|
232
|
+
.superRefine((manifest, ctx) => {
|
|
233
|
+
const filePaths = manifest.files.map((file) => file.path);
|
|
234
|
+
if (!filePaths.includes(manifest.entrypoint.path)) {
|
|
235
|
+
ctx.addIssue({
|
|
236
|
+
code: 'custom',
|
|
237
|
+
path: ['entrypoint', 'path'],
|
|
238
|
+
message: 'Applet entrypoint must exist in the immutable file inventory'
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
// `./tool.js` and `tool.js` name one file but are distinct strings, so the
|
|
242
|
+
// duplicate check below never sees them and `files[]` can carry both with
|
|
243
|
+
// DIFFERENT digests. Normalize before comparing, and reject the alias.
|
|
244
|
+
const normalizePath = (value) => value.replace(/^\.\//, '').replace(/\/{2,}/g, '/').replace(/\/$/, '');
|
|
245
|
+
// Case is preserved in the path itself — `src/App.svelte` is a legitimate
|
|
246
|
+
// filename — but collisions are detected case-INSENSITIVELY, because
|
|
247
|
+
// `Index.HTML` and `index.html` are one file on a case-insensitive
|
|
248
|
+
// filesystem and accepting both with different digests means whichever the
|
|
249
|
+
// platform picks is what gets served.
|
|
250
|
+
const collisionKey = (value) => normalizePath(value).toLowerCase();
|
|
251
|
+
const normalizedSeen = new Map();
|
|
252
|
+
for (const [index, file] of manifest.files.entries()) {
|
|
253
|
+
const normalized = normalizePath(file.path);
|
|
254
|
+
if (normalized !== file.path) {
|
|
255
|
+
ctx.addIssue({
|
|
256
|
+
code: 'custom',
|
|
257
|
+
path: ['files', index, 'path'],
|
|
258
|
+
message: `Applet file paths must be normalized: use ${normalized}`
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
const previous = normalizedSeen.get(collisionKey(file.path));
|
|
262
|
+
if (previous !== undefined) {
|
|
263
|
+
ctx.addIssue({
|
|
264
|
+
code: 'custom',
|
|
265
|
+
path: ['files', index, 'path'],
|
|
266
|
+
message: `Applet file ${file.path} resolves to the same path as ${previous}`
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
normalizedSeen.set(collisionKey(file.path), file.path);
|
|
270
|
+
}
|
|
271
|
+
// An Asset mounted over a digest-pinned file would shadow it at runtime.
|
|
272
|
+
for (const [index, asset] of manifest.assets.entries()) {
|
|
273
|
+
if (normalizedSeen.has(collisionKey(asset.mountPath))) {
|
|
274
|
+
ctx.addIssue({
|
|
275
|
+
code: 'custom',
|
|
276
|
+
path: ['assets', index, 'mountPath'],
|
|
277
|
+
message: `Asset mount path ${asset.mountPath} would shadow a digest-pinned file`
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
const identities = [
|
|
282
|
+
['file path', filePaths, ['files']],
|
|
283
|
+
['storage id', manifest.storage.map((store) => store.id), ['storage']],
|
|
284
|
+
['Asset mount path', manifest.assets.map((asset) => asset.mountPath), ['assets']],
|
|
285
|
+
['composition slot', manifest.composition.map((edge) => edge.slot), ['composition']],
|
|
286
|
+
[
|
|
287
|
+
'capability tag',
|
|
288
|
+
manifest.capabilities.map((capability) => capability.tag),
|
|
289
|
+
['capabilities']
|
|
290
|
+
],
|
|
291
|
+
['server action id', (manifest.serverActions ?? []).map((action) => action.id), ['serverActions']]
|
|
292
|
+
];
|
|
293
|
+
for (const [label, values, path] of identities) {
|
|
294
|
+
for (const duplicate of duplicateValues(values)) {
|
|
295
|
+
ctx.addIssue({
|
|
296
|
+
code: 'custom',
|
|
297
|
+
path,
|
|
298
|
+
message: `Duplicate Applet ${label}: ${duplicate}`
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
// Version-gated tightening. v1 is legacy and immutable; v2 is the contract
|
|
303
|
+
// we actually want. Applying a stricter rule to v1 would invalidate
|
|
304
|
+
// already-published, digest-pinned releases that can never be corrected.
|
|
305
|
+
if (manifest.schemaVersion === 2) {
|
|
306
|
+
for (const [index, capability] of manifest.capabilities.entries()) {
|
|
307
|
+
// A tag outside the closed vocabulary is author-asserted authority:
|
|
308
|
+
// the consent prompt would name authority no host contract recognizes.
|
|
309
|
+
if (!appletCapabilityKindSchema.safeParse(capability.tag).success) {
|
|
310
|
+
ctx.addIssue({
|
|
311
|
+
code: 'custom',
|
|
312
|
+
path: ['capabilities', index, 'tag'],
|
|
313
|
+
message: `Unknown Applet capability tag: ${capability.tag}. Capability vocabulary is server-attested, never author-defined.`
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
// A2b, version-gated exactly as `contributes` is: a host that predates
|
|
319
|
+
// these fields would publish them while enforcing neither, and a weaker
|
|
320
|
+
// contract silently accepted is the failure mode the gate exists for.
|
|
321
|
+
if ((manifest.serverActions?.length ?? 0) > 0 && manifest.schemaVersion < 3) {
|
|
322
|
+
ctx.addIssue({
|
|
323
|
+
code: 'custom',
|
|
324
|
+
path: ['serverActions'],
|
|
325
|
+
message: 'serverActions requires schemaVersion 3'
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
if (manifest.schemaVersion < 3) {
|
|
329
|
+
for (const [index, store] of manifest.storage.entries()) {
|
|
330
|
+
if (store.writeConditions !== undefined) {
|
|
331
|
+
ctx.addIssue({
|
|
332
|
+
code: 'custom',
|
|
333
|
+
path: ['storage', index, 'writeConditions'],
|
|
334
|
+
message: 'writeConditions requires schemaVersion 3'
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
if ((manifest.serverActions?.length ?? 0) > 0) {
|
|
340
|
+
const inventory = new Set(manifest.files.map((file) => file.path));
|
|
341
|
+
for (const action of manifest.serverActions ?? []) {
|
|
342
|
+
// An implementation outside the inventory is not digest-pinned, so it
|
|
343
|
+
// is not covered by the release's immutability at all.
|
|
344
|
+
if (!inventory.has(action.handler.entry)) {
|
|
345
|
+
ctx.addIssue({
|
|
346
|
+
code: 'custom',
|
|
347
|
+
path: ['serverActions'],
|
|
348
|
+
message: `Server action \`${action.id}\` names ${action.handler.entry}, which is not in the immutable file inventory`
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
const contributes = manifest.contributes;
|
|
354
|
+
if (contributes) {
|
|
355
|
+
// A v1 host does not know this field exists. Accepting it at v1 would
|
|
356
|
+
// let a release register contributions on a host that cannot show them
|
|
357
|
+
// in a consent prompt — authority the subscriber never saw.
|
|
358
|
+
if (manifest.schemaVersion < 2) {
|
|
359
|
+
ctx.addIssue({
|
|
360
|
+
code: 'custom',
|
|
361
|
+
path: ['contributes'],
|
|
362
|
+
message: 'contributes requires schemaVersion 2'
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
const filePaths = new Set(manifest.files.map((file) => file.path));
|
|
366
|
+
const declaredTags = new Set(manifest.capabilities.map((capability) => capability.tag));
|
|
367
|
+
const contributions = [
|
|
368
|
+
...contributes.tools.map((tool) => ['tools', tool.name, tool.impl, tool.requires]),
|
|
369
|
+
...contributes.cli.map((command) => ['cli', command.command, command.impl, command.requires]),
|
|
370
|
+
...contributes.events.map((handler) => ['events', handler.name, handler.impl, handler.requires])
|
|
371
|
+
];
|
|
372
|
+
for (const [group, identity, impl, requires] of contributions) {
|
|
373
|
+
// An implementation outside the inventory is not digest-pinned, so it
|
|
374
|
+
// is not covered by the release's immutability at all.
|
|
375
|
+
if (!filePaths.has(impl.entry)) {
|
|
376
|
+
ctx.addIssue({
|
|
377
|
+
code: 'custom',
|
|
378
|
+
path: ['contributes', group],
|
|
379
|
+
message: `Contributed implementation for \`${identity}\` names ${impl.entry}, which is not in the immutable file inventory`
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
// Server implementations need capability brokers that assume a browser
|
|
383
|
+
// host today. Registering one would produce a tool that always throws.
|
|
384
|
+
if (impl.surface === 'server') {
|
|
385
|
+
ctx.addIssue({
|
|
386
|
+
code: 'custom',
|
|
387
|
+
path: ['contributes', group],
|
|
388
|
+
message: `Contributed implementation for \`${identity}\` targets the server half, which is not available yet`
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
// Internal coherence only — the real escalation check runs at invoke
|
|
392
|
+
// time against the live grant. A contribution may not, however, ask
|
|
393
|
+
// for authority the consent prompt never named.
|
|
394
|
+
for (const tag of requires) {
|
|
395
|
+
if (!declaredTags.has(tag)) {
|
|
396
|
+
ctx.addIssue({
|
|
397
|
+
code: 'custom',
|
|
398
|
+
path: ['contributes', group],
|
|
399
|
+
message: `Contributed \`${identity}\` requires capability ${tag}, which the manifest never requests`
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
for (const entry of contributes.config) {
|
|
405
|
+
if (entry.secret) {
|
|
406
|
+
ctx.addIssue({
|
|
407
|
+
code: 'custom',
|
|
408
|
+
path: ['contributes', 'config'],
|
|
409
|
+
message: `Config key \`${entry.key}\` is marked secret, but no secret-routing path exists yet`
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
const contributionIdentities = [
|
|
414
|
+
['config key', contributes.config.map((entry) => entry.key)],
|
|
415
|
+
['tool name', contributes.tools.map((tool) => tool.name)],
|
|
416
|
+
['CLI command', contributes.cli.map((command) => command.command)],
|
|
417
|
+
['event handler', contributes.events.map((handler) => handler.name)]
|
|
418
|
+
];
|
|
419
|
+
for (const [label, values] of contributionIdentities) {
|
|
420
|
+
for (const duplicate of duplicateValues(values)) {
|
|
421
|
+
ctx.addIssue({
|
|
422
|
+
code: 'custom',
|
|
423
|
+
path: ['contributes'],
|
|
424
|
+
message: `Duplicate contributed ${label}: ${duplicate}`
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
// `html` is a LEGACY entrypoint, readable at v1 and undeclarable at v2.
|
|
430
|
+
//
|
|
431
|
+
// Nothing compiles or serves one: the compiler runs `svelteCompile` with no
|
|
432
|
+
// html branch, and the runner mounts through a compiled module's `__mount`
|
|
433
|
+
// export. Published v1 releases are immutable and digest-pinned, so they
|
|
434
|
+
// must keep parsing — but a NEW manifest must not be able to declare a
|
|
435
|
+
// thing that cannot ship. The starter contract refuses it outright; this is
|
|
436
|
+
// the same rule on the manifest, gated by version exactly as `contributes`
|
|
437
|
+
// is.
|
|
438
|
+
if (manifest.schemaVersion >= 2 && manifest.entrypoint.kind === 'html') {
|
|
439
|
+
ctx.addIssue({
|
|
440
|
+
code: 'custom',
|
|
441
|
+
path: ['entrypoint', 'kind'],
|
|
442
|
+
message: 'html entrypoints cannot be declared at schemaVersion 2: nothing compiles or serves one'
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
if (manifest.composition.filter((edge) => edge.mode === 'extends').length > 1) {
|
|
446
|
+
ctx.addIssue({
|
|
447
|
+
code: 'custom',
|
|
448
|
+
path: ['composition'],
|
|
449
|
+
message: 'An Applet release may extend at most one exact base release'
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
/** HTML receives `window.vibes`; Svelte receives a `vibes` component prop. */
|
|
454
|
+
export function appletRuntimeInjectionForEntrypoint(entrypoint) {
|
|
455
|
+
return entrypoint.kind === 'html' ? 'window' : 'prop';
|
|
456
|
+
}
|
|
457
|
+
//# sourceMappingURL=definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../src/schemas/definition.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEhF,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC7E,MAAM,aAAa,GAAG,6BAA6B,CAAC;AAEpD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC;KACvC,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,GAAG,CAAC;KACR,KAAK,CAAC,kBAAkB,EAAE,iDAAiD,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC;KACrC,MAAM,CAAC;IACP,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,wBAAwB;CAC9B,CAAC;KACD,WAAW,CAAC,CAAC,UAAU,EAAE,GAAG,EAAE,EAAE;IAChC,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IACnE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,W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ACtE,CAAC,CAAC;IACJ,CAAC;AACF,CAAC,CAAC,CAAC;AAeJ,8EAA8E;AAC9E,MAAM,UAAU,mCAAmC,CAClD,UAA0C;IAE1C,OAAO,UAAU,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
/** Must track the runner protocol and Svelte MessagePort protocol version. */
|
|
3
|
+
export declare const APPLET_DISPATCH_PROTOCOL_VERSION: 1;
|
|
4
|
+
export declare const appletCorrelationIdSchema: z.ZodString;
|
|
5
|
+
export declare const appletDispatchRequestSchema: z.ZodObject<{
|
|
6
|
+
type: z.ZodLiteral<"dispatch">;
|
|
7
|
+
version: z.ZodLiteral<1>;
|
|
8
|
+
correlationId: z.ZodString;
|
|
9
|
+
instanceId: z.ZodString;
|
|
10
|
+
release: z.ZodObject<{
|
|
11
|
+
componentId: z.ZodUUID;
|
|
12
|
+
version: z.ZodString;
|
|
13
|
+
bundleHash: z.ZodString;
|
|
14
|
+
manifestHash: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
registrationId: z.ZodString;
|
|
17
|
+
runId: z.ZodString;
|
|
18
|
+
leaseId: z.ZodString;
|
|
19
|
+
impl: z.ZodObject<{
|
|
20
|
+
surface: z.ZodEnum<{
|
|
21
|
+
server: "server";
|
|
22
|
+
client: "client";
|
|
23
|
+
}>;
|
|
24
|
+
entry: z.ZodString;
|
|
25
|
+
export: z.ZodString;
|
|
26
|
+
}, z.core.$strict>;
|
|
27
|
+
args: z.ZodRecord<z.ZodString, z.ZodType<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue>>>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
/** Untrusted sandbox answers: a missing or malformed failure detail is supported. */
|
|
30
|
+
export declare const appletDispatchWireResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
31
|
+
ok: z.ZodLiteral<true>;
|
|
32
|
+
result: z.ZodType<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue>>;
|
|
33
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
34
|
+
ok: z.ZodLiteral<false>;
|
|
35
|
+
error: z.ZodOptional<z.ZodUnknown>;
|
|
36
|
+
}, z.core.$strip>], "ok">;
|
|
37
|
+
export declare const appletDispatchErrorMessageSchema: z.ZodObject<{
|
|
38
|
+
message: z.ZodOptional<z.ZodUnknown>;
|
|
39
|
+
}, z.core.$loose>;
|
|
40
|
+
/** Host-normalized response, after bounding and sanitizing the sandbox's message. */
|
|
41
|
+
export declare const appletDispatchResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
42
|
+
ok: z.ZodLiteral<true>;
|
|
43
|
+
result: z.ZodType<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue>>;
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
45
|
+
ok: z.ZodLiteral<false>;
|
|
46
|
+
error: z.ZodObject<{
|
|
47
|
+
message: z.ZodString;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
}, z.core.$strip>], "ok">;
|
|
50
|
+
export type AppletDispatchRequest = z.infer<typeof appletDispatchRequestSchema>;
|
|
51
|
+
export type AppletDispatchResponse = z.infer<typeof appletDispatchResponseSchema>;
|
|
52
|
+
//# sourceMappingURL=dispatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/schemas/dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAK5B,8EAA8E;AAC9E,eAAO,MAAM,gCAAgC,EAAG,CAAU,CAAC;AAE3D,eAAO,MAAM,yBAAyB,aAA8C,CAAC;AAErF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;iBAYtC,CAAC;AAEH,qFAAqF;AACrF,eAAO,MAAM,gCAAgC;;;;;;yBAG3C,CAAC;AAEH,eAAO,MAAM,gCAAgC;;iBAAqD,CAAC;AAEnG,qFAAqF;AACrF,eAAO,MAAM,4BAA4B;;;;;;;;yBAGvC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { JsonValueSchema } from '@vibesdotdev/kernel/schemas/json';
|
|
3
|
+
import { componentReleaseRefSchema } from "./component-release-ref.js";
|
|
4
|
+
import { appletImplRefSchema } from "./contributes.js";
|
|
5
|
+
/** Must track the runner protocol and Svelte MessagePort protocol version. */
|
|
6
|
+
export const APPLET_DISPATCH_PROTOCOL_VERSION = 1;
|
|
7
|
+
export const appletCorrelationIdSchema = z.string().regex(/^[a-zA-Z0-9_-]{32,128}$/);
|
|
8
|
+
export const appletDispatchRequestSchema = z.object({
|
|
9
|
+
type: z.literal('dispatch'),
|
|
10
|
+
version: z.literal(APPLET_DISPATCH_PROTOCOL_VERSION),
|
|
11
|
+
correlationId: appletCorrelationIdSchema,
|
|
12
|
+
instanceId: z.string(),
|
|
13
|
+
release: componentReleaseRefSchema,
|
|
14
|
+
registrationId: z.string(),
|
|
15
|
+
/** Bind the request to the mounted frame generation and its live lease. */
|
|
16
|
+
runId: z.string(),
|
|
17
|
+
leaseId: z.string(),
|
|
18
|
+
impl: appletImplRefSchema,
|
|
19
|
+
args: z.record(z.string(), JsonValueSchema)
|
|
20
|
+
});
|
|
21
|
+
/** Untrusted sandbox answers: a missing or malformed failure detail is supported. */
|
|
22
|
+
export const appletDispatchWireResponseSchema = z.discriminatedUnion('ok', [
|
|
23
|
+
z.object({ ok: z.literal(true), result: JsonValueSchema }),
|
|
24
|
+
z.object({ ok: z.literal(false), error: z.unknown().optional() })
|
|
25
|
+
]);
|
|
26
|
+
export const appletDispatchErrorMessageSchema = z.looseObject({ message: z.unknown().optional() });
|
|
27
|
+
/** Host-normalized response, after bounding and sanitizing the sandbox's message. */
|
|
28
|
+
export const appletDispatchResponseSchema = z.discriminatedUnion('ok', [
|
|
29
|
+
z.object({ ok: z.literal(true), result: JsonValueSchema }),
|
|
30
|
+
z.object({ ok: z.literal(false), error: z.object({ message: z.string() }) })
|
|
31
|
+
]);
|
|
32
|
+
//# sourceMappingURL=dispatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatch.js","sourceRoot":"","sources":["../../src/schemas/dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAU,CAAC;AAE3D,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;AAErF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,C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AE,CAAC;IAC1D,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;CAC5E,CAAC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Access and capability grants — who may open an applet, and what exact
|
|
3
|
+
* operations/resources they approved for one exact release.
|
|
4
|
+
*
|
|
5
|
+
* Authority separation:
|
|
6
|
+
* - AccessGrant: identity-based (who may open)
|
|
7
|
+
* - CapabilityGrant: operation-based (what the applet may do)
|
|
8
|
+
* - LaunchLease: time-bound authority for one run/frame generation
|
|
9
|
+
*
|
|
10
|
+
* Grants are version-bound — they pin to the exact Component release that
|
|
11
|
+
* was consented to. Upgrading the instance requires re-consent.
|
|
12
|
+
*/
|
|
13
|
+
import * as z from 'zod/v4';
|
|
14
|
+
export declare const appletAccessGrantSchema: z.ZodObject<{
|
|
15
|
+
id: z.ZodUUID;
|
|
16
|
+
instanceId: z.ZodUUID;
|
|
17
|
+
viewerUserId: z.ZodNullable<z.ZodString>;
|
|
18
|
+
viewerOrgId: z.ZodNullable<z.ZodString>;
|
|
19
|
+
scope: z.ZodDefault<z.ZodEnum<{
|
|
20
|
+
edit: "edit";
|
|
21
|
+
open: "open";
|
|
22
|
+
admin: "admin";
|
|
23
|
+
}>>;
|
|
24
|
+
grantReason: z.ZodNullable<z.ZodString>;
|
|
25
|
+
createdAt: z.ZodDate;
|
|
26
|
+
revokedAt: z.ZodNullable<z.ZodDate>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export declare const appletCapabilityGrantSchema: z.ZodObject<{
|
|
29
|
+
id: z.ZodUUID;
|
|
30
|
+
instanceId: z.ZodUUID;
|
|
31
|
+
release: z.ZodObject<{
|
|
32
|
+
componentId: z.ZodUUID;
|
|
33
|
+
version: z.ZodString;
|
|
34
|
+
bundleHash: z.ZodString;
|
|
35
|
+
manifestHash: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
capabilities: z.ZodArray<z.ZodString>;
|
|
38
|
+
capabilityReasons: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
39
|
+
viewerUserId: z.ZodNullable<z.ZodString>;
|
|
40
|
+
viewerOrgId: z.ZodNullable<z.ZodString>;
|
|
41
|
+
consentedAt: z.ZodDate;
|
|
42
|
+
revokedAt: z.ZodNullable<z.ZodDate>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export declare const appletLaunchLeaseSchema: z.ZodObject<{
|
|
45
|
+
id: z.ZodUUID;
|
|
46
|
+
instanceId: z.ZodUUID;
|
|
47
|
+
runId: z.ZodUUID;
|
|
48
|
+
nonce: z.ZodString;
|
|
49
|
+
issuedAt: z.ZodDate;
|
|
50
|
+
expiresAt: z.ZodDate;
|
|
51
|
+
revokedAt: z.ZodNullable<z.ZodDate>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export type AppletAccessGrant = z.infer<typeof appletAccessGrantSchema>;
|
|
54
|
+
export type AppletCapabilityGrant = z.infer<typeof appletCapabilityGrantSchema>;
|
|
55
|
+
export type AppletLaunchLease = z.infer<typeof appletLaunchLeaseSchema>;
|
|
56
|
+
//# sourceMappingURL=grants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grants.d.ts","sourceRoot":"","sources":["../../src/schemas/grants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;iBAWlC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;iBActC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;iBAqBlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|