@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,306 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contributed descriptors — what a subscribed Applet adds to a subscriber's
|
|
3
|
+
* runtime.
|
|
4
|
+
*
|
|
5
|
+
* The one rule that makes contribution safe: DESCRIPTORS ARE DATA,
|
|
6
|
+
* IMPLEMENTATIONS ARE CODE. Everything in this file is inert JSON. It is
|
|
7
|
+
* validated at publish time, registered into a subscriber's runtime as a shim
|
|
8
|
+
* loader, and executes nothing. Every implementation is named BY REFERENCE into
|
|
9
|
+
* the release's own digest-pinned file inventory, and is dispatched across the
|
|
10
|
+
* sandbox boundary — never imported by the host.
|
|
11
|
+
*
|
|
12
|
+
* Why these shapes differ from the first-party descriptors they feed:
|
|
13
|
+
*
|
|
14
|
+
* - `tools/tool` descriptors carry LIVE ZOD objects for input/output. A manifest
|
|
15
|
+
* is wire data and cannot carry Zod, so contributed tools carry bounded JSON
|
|
16
|
+
* Schema and the host converts at registration.
|
|
17
|
+
* - `cli/command` arguments/options are already declarative primitives, so the
|
|
18
|
+
* contributed shape mirrors them closely.
|
|
19
|
+
* - The `configNamespace` CLI pattern points at a Zod schema BY STRING NAME,
|
|
20
|
+
* which an Applet cannot use — it names nothing the host can resolve. So
|
|
21
|
+
* contributed config carries its value schema inline as JSON Schema.
|
|
22
|
+
*/
|
|
23
|
+
import * as z from 'zod/v4';
|
|
24
|
+
/** Per-kind cap. The per-SUBSCRIBER cap is enforced at subscribe time. */
|
|
25
|
+
export declare const APPLET_CONTRIBUTION_LIMIT = 32;
|
|
26
|
+
/**
|
|
27
|
+
* Where a contributed implementation runs.
|
|
28
|
+
*
|
|
29
|
+
* `client` dispatches to the runner frame over MessagePort and needs a viewer.
|
|
30
|
+
* `server` needs the headless half; until server-side capability brokers exist,
|
|
31
|
+
* declaring it is a publish-time rejection rather than a tool that registers and
|
|
32
|
+
* always throws.
|
|
33
|
+
*/
|
|
34
|
+
export declare const appletImplSurfaceSchema: z.ZodEnum<{
|
|
35
|
+
server: "server";
|
|
36
|
+
client: "client";
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* An implementation named by reference, never by value.
|
|
40
|
+
*
|
|
41
|
+
* `entry` must appear in the manifest's immutable `files[]`, so an
|
|
42
|
+
* implementation is digest-pinned exactly like every other byte of the release.
|
|
43
|
+
* That check lives in the manifest superRefine, where `files[]` is in scope.
|
|
44
|
+
*/
|
|
45
|
+
export declare const appletImplRefSchema: z.ZodObject<{
|
|
46
|
+
surface: z.ZodEnum<{
|
|
47
|
+
server: "server";
|
|
48
|
+
client: "client";
|
|
49
|
+
}>;
|
|
50
|
+
entry: z.ZodString;
|
|
51
|
+
export: z.ZodString;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
/**
|
|
54
|
+
* A configuration key the Applet needs from its subscriber.
|
|
55
|
+
*
|
|
56
|
+
* The key is namespaced by the HOST as `applet.<slug>.<key>` — never
|
|
57
|
+
* author-chosen — which is what stops collision and squatting.
|
|
58
|
+
*/
|
|
59
|
+
export declare const appletConfigDescriptorSchema: z.ZodObject<{
|
|
60
|
+
key: z.ZodString;
|
|
61
|
+
description: z.ZodString;
|
|
62
|
+
valueSchema: z.ZodPipe<z.ZodCustom<import("@vibesdotdev/shared/types").RecordObject, import("@vibesdotdev/shared/types").RecordObject>, z.ZodTransform<import("@vibesdotdev/shared/types").JsonObject, import("@vibesdotdev/shared/types").RecordObject>>;
|
|
63
|
+
default: z.ZodOptional<z.ZodPipe<z.ZodCustom<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue>, z.ZodTransform<string | number | boolean | import("@vibesdotdev/kernel/schemas/json").JsonObject | import("@vibesdotdev/kernel/schemas/json").JsonArray | null, import("@vibesdotdev/kernel/bootstrap").JsonValue>>>;
|
|
64
|
+
secret: z.ZodDefault<z.ZodBoolean>;
|
|
65
|
+
}, z.core.$strict>;
|
|
66
|
+
/** A tool the Applet contributes to its subscriber's agent. */
|
|
67
|
+
export declare const appletToolDescriptorSchema: z.ZodObject<{
|
|
68
|
+
name: z.ZodString;
|
|
69
|
+
description: z.ZodString;
|
|
70
|
+
inputSchema: z.ZodPipe<z.ZodCustom<import("@vibesdotdev/shared/types").RecordObject, import("@vibesdotdev/shared/types").RecordObject>, z.ZodTransform<import("@vibesdotdev/shared/types").JsonObject, import("@vibesdotdev/shared/types").RecordObject>>;
|
|
71
|
+
outputSchema: z.ZodOptional<z.ZodPipe<z.ZodCustom<import("@vibesdotdev/shared/types").RecordObject, import("@vibesdotdev/shared/types").RecordObject>, z.ZodTransform<import("@vibesdotdev/shared/types").JsonObject, import("@vibesdotdev/shared/types").RecordObject>>>;
|
|
72
|
+
impl: z.ZodObject<{
|
|
73
|
+
surface: z.ZodEnum<{
|
|
74
|
+
server: "server";
|
|
75
|
+
client: "client";
|
|
76
|
+
}>;
|
|
77
|
+
entry: z.ZodString;
|
|
78
|
+
export: z.ZodString;
|
|
79
|
+
}, z.core.$strict>;
|
|
80
|
+
requires: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
81
|
+
"storage.read": "storage.read";
|
|
82
|
+
"storage.write": "storage.write";
|
|
83
|
+
"network.fetch": "network.fetch";
|
|
84
|
+
"clipboard.read": "clipboard.read";
|
|
85
|
+
"clipboard.write": "clipboard.write";
|
|
86
|
+
"geolocation.read": "geolocation.read";
|
|
87
|
+
"notification.send": "notification.send";
|
|
88
|
+
"workboard.create": "workboard.create";
|
|
89
|
+
"workboard.update": "workboard.update";
|
|
90
|
+
"applet.snapshot.create": "applet.snapshot.create";
|
|
91
|
+
"applet.snapshot.update": "applet.snapshot.update";
|
|
92
|
+
"output.create": "output.create";
|
|
93
|
+
"output.update": "output.update";
|
|
94
|
+
}>>>;
|
|
95
|
+
}, z.core.$strict>;
|
|
96
|
+
/**
|
|
97
|
+
* A command the Applet contributes.
|
|
98
|
+
*
|
|
99
|
+
* Always mounted at `vibes applet <slug> <command>`. Never top-level, so a
|
|
100
|
+
* subscribed Applet cannot shadow `vibes deploy`.
|
|
101
|
+
*/
|
|
102
|
+
export declare const appletCliDescriptorSchema: z.ZodObject<{
|
|
103
|
+
command: z.ZodString;
|
|
104
|
+
description: z.ZodString;
|
|
105
|
+
arguments: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
106
|
+
name: z.ZodString;
|
|
107
|
+
description: z.ZodString;
|
|
108
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
109
|
+
variadic: z.ZodDefault<z.ZodBoolean>;
|
|
110
|
+
}, z.core.$strict>>>;
|
|
111
|
+
options: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
112
|
+
flags: z.ZodString;
|
|
113
|
+
description: z.ZodString;
|
|
114
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
115
|
+
string: "string";
|
|
116
|
+
number: "number";
|
|
117
|
+
boolean: "boolean";
|
|
118
|
+
}>>;
|
|
119
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
120
|
+
}, z.core.$strict>>>;
|
|
121
|
+
impl: z.ZodObject<{
|
|
122
|
+
surface: z.ZodEnum<{
|
|
123
|
+
server: "server";
|
|
124
|
+
client: "client";
|
|
125
|
+
}>;
|
|
126
|
+
entry: z.ZodString;
|
|
127
|
+
export: z.ZodString;
|
|
128
|
+
}, z.core.$strict>;
|
|
129
|
+
requires: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
130
|
+
"storage.read": "storage.read";
|
|
131
|
+
"storage.write": "storage.write";
|
|
132
|
+
"network.fetch": "network.fetch";
|
|
133
|
+
"clipboard.read": "clipboard.read";
|
|
134
|
+
"clipboard.write": "clipboard.write";
|
|
135
|
+
"geolocation.read": "geolocation.read";
|
|
136
|
+
"notification.send": "notification.send";
|
|
137
|
+
"workboard.create": "workboard.create";
|
|
138
|
+
"workboard.update": "workboard.update";
|
|
139
|
+
"applet.snapshot.create": "applet.snapshot.create";
|
|
140
|
+
"applet.snapshot.update": "applet.snapshot.update";
|
|
141
|
+
"output.create": "output.create";
|
|
142
|
+
"output.update": "output.update";
|
|
143
|
+
}>>>;
|
|
144
|
+
}, z.core.$strict>;
|
|
145
|
+
/**
|
|
146
|
+
* A runtime event the Applet reacts to.
|
|
147
|
+
*
|
|
148
|
+
* There is no viewer and no tab when an event fires, so this is server-side by
|
|
149
|
+
* definition. Delivery is at-least-once, so an implementation must be
|
|
150
|
+
* idempotent on the delivery id the host supplies.
|
|
151
|
+
*/
|
|
152
|
+
export declare const appletEventHandlerDescriptorSchema: z.ZodObject<{
|
|
153
|
+
name: z.ZodString;
|
|
154
|
+
event: z.ZodString;
|
|
155
|
+
description: z.ZodString;
|
|
156
|
+
impl: z.ZodObject<{
|
|
157
|
+
surface: z.ZodEnum<{
|
|
158
|
+
server: "server";
|
|
159
|
+
client: "client";
|
|
160
|
+
}>;
|
|
161
|
+
entry: z.ZodString;
|
|
162
|
+
export: z.ZodString;
|
|
163
|
+
}, z.core.$strict>;
|
|
164
|
+
requires: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
165
|
+
"storage.read": "storage.read";
|
|
166
|
+
"storage.write": "storage.write";
|
|
167
|
+
"network.fetch": "network.fetch";
|
|
168
|
+
"clipboard.read": "clipboard.read";
|
|
169
|
+
"clipboard.write": "clipboard.write";
|
|
170
|
+
"geolocation.read": "geolocation.read";
|
|
171
|
+
"notification.send": "notification.send";
|
|
172
|
+
"workboard.create": "workboard.create";
|
|
173
|
+
"workboard.update": "workboard.update";
|
|
174
|
+
"applet.snapshot.create": "applet.snapshot.create";
|
|
175
|
+
"applet.snapshot.update": "applet.snapshot.update";
|
|
176
|
+
"output.create": "output.create";
|
|
177
|
+
"output.update": "output.update";
|
|
178
|
+
}>>>;
|
|
179
|
+
}, z.core.$strict>;
|
|
180
|
+
/**
|
|
181
|
+
* The closed contribution vocabulary.
|
|
182
|
+
*
|
|
183
|
+
* `.strict()` is load-bearing: an unknown key is a publish-time REJECTION, not
|
|
184
|
+
* a stripped field. Silent tolerance is how a closed vocabulary quietly opens,
|
|
185
|
+
* and the whole point of closing it is that a subscribed Applet must not be able
|
|
186
|
+
* to register an `ai/provider` or `auth/*` descriptor.
|
|
187
|
+
*
|
|
188
|
+
* `storage` is deliberately absent — it predates this block and stays at the
|
|
189
|
+
* manifest top level.
|
|
190
|
+
*/
|
|
191
|
+
export declare const appletContributesSchema: z.ZodObject<{
|
|
192
|
+
config: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
193
|
+
key: z.ZodString;
|
|
194
|
+
description: z.ZodString;
|
|
195
|
+
valueSchema: z.ZodPipe<z.ZodCustom<import("@vibesdotdev/shared/types").RecordObject, import("@vibesdotdev/shared/types").RecordObject>, z.ZodTransform<import("@vibesdotdev/shared/types").JsonObject, import("@vibesdotdev/shared/types").RecordObject>>;
|
|
196
|
+
default: z.ZodOptional<z.ZodPipe<z.ZodCustom<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue>, z.ZodTransform<string | number | boolean | import("@vibesdotdev/kernel/schemas/json").JsonObject | import("@vibesdotdev/kernel/schemas/json").JsonArray | null, import("@vibesdotdev/kernel/bootstrap").JsonValue>>>;
|
|
197
|
+
secret: z.ZodDefault<z.ZodBoolean>;
|
|
198
|
+
}, z.core.$strict>>>;
|
|
199
|
+
tools: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
200
|
+
name: z.ZodString;
|
|
201
|
+
description: z.ZodString;
|
|
202
|
+
inputSchema: z.ZodPipe<z.ZodCustom<import("@vibesdotdev/shared/types").RecordObject, import("@vibesdotdev/shared/types").RecordObject>, z.ZodTransform<import("@vibesdotdev/shared/types").JsonObject, import("@vibesdotdev/shared/types").RecordObject>>;
|
|
203
|
+
outputSchema: z.ZodOptional<z.ZodPipe<z.ZodCustom<import("@vibesdotdev/shared/types").RecordObject, import("@vibesdotdev/shared/types").RecordObject>, z.ZodTransform<import("@vibesdotdev/shared/types").JsonObject, import("@vibesdotdev/shared/types").RecordObject>>>;
|
|
204
|
+
impl: z.ZodObject<{
|
|
205
|
+
surface: z.ZodEnum<{
|
|
206
|
+
server: "server";
|
|
207
|
+
client: "client";
|
|
208
|
+
}>;
|
|
209
|
+
entry: z.ZodString;
|
|
210
|
+
export: z.ZodString;
|
|
211
|
+
}, z.core.$strict>;
|
|
212
|
+
requires: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
213
|
+
"storage.read": "storage.read";
|
|
214
|
+
"storage.write": "storage.write";
|
|
215
|
+
"network.fetch": "network.fetch";
|
|
216
|
+
"clipboard.read": "clipboard.read";
|
|
217
|
+
"clipboard.write": "clipboard.write";
|
|
218
|
+
"geolocation.read": "geolocation.read";
|
|
219
|
+
"notification.send": "notification.send";
|
|
220
|
+
"workboard.create": "workboard.create";
|
|
221
|
+
"workboard.update": "workboard.update";
|
|
222
|
+
"applet.snapshot.create": "applet.snapshot.create";
|
|
223
|
+
"applet.snapshot.update": "applet.snapshot.update";
|
|
224
|
+
"output.create": "output.create";
|
|
225
|
+
"output.update": "output.update";
|
|
226
|
+
}>>>;
|
|
227
|
+
}, z.core.$strict>>>;
|
|
228
|
+
cli: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
229
|
+
command: z.ZodString;
|
|
230
|
+
description: z.ZodString;
|
|
231
|
+
arguments: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
232
|
+
name: z.ZodString;
|
|
233
|
+
description: z.ZodString;
|
|
234
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
235
|
+
variadic: z.ZodDefault<z.ZodBoolean>;
|
|
236
|
+
}, z.core.$strict>>>;
|
|
237
|
+
options: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
238
|
+
flags: z.ZodString;
|
|
239
|
+
description: z.ZodString;
|
|
240
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
241
|
+
string: "string";
|
|
242
|
+
number: "number";
|
|
243
|
+
boolean: "boolean";
|
|
244
|
+
}>>;
|
|
245
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
246
|
+
}, z.core.$strict>>>;
|
|
247
|
+
impl: z.ZodObject<{
|
|
248
|
+
surface: z.ZodEnum<{
|
|
249
|
+
server: "server";
|
|
250
|
+
client: "client";
|
|
251
|
+
}>;
|
|
252
|
+
entry: z.ZodString;
|
|
253
|
+
export: z.ZodString;
|
|
254
|
+
}, z.core.$strict>;
|
|
255
|
+
requires: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
256
|
+
"storage.read": "storage.read";
|
|
257
|
+
"storage.write": "storage.write";
|
|
258
|
+
"network.fetch": "network.fetch";
|
|
259
|
+
"clipboard.read": "clipboard.read";
|
|
260
|
+
"clipboard.write": "clipboard.write";
|
|
261
|
+
"geolocation.read": "geolocation.read";
|
|
262
|
+
"notification.send": "notification.send";
|
|
263
|
+
"workboard.create": "workboard.create";
|
|
264
|
+
"workboard.update": "workboard.update";
|
|
265
|
+
"applet.snapshot.create": "applet.snapshot.create";
|
|
266
|
+
"applet.snapshot.update": "applet.snapshot.update";
|
|
267
|
+
"output.create": "output.create";
|
|
268
|
+
"output.update": "output.update";
|
|
269
|
+
}>>>;
|
|
270
|
+
}, z.core.$strict>>>;
|
|
271
|
+
events: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
272
|
+
name: z.ZodString;
|
|
273
|
+
event: z.ZodString;
|
|
274
|
+
description: z.ZodString;
|
|
275
|
+
impl: z.ZodObject<{
|
|
276
|
+
surface: z.ZodEnum<{
|
|
277
|
+
server: "server";
|
|
278
|
+
client: "client";
|
|
279
|
+
}>;
|
|
280
|
+
entry: z.ZodString;
|
|
281
|
+
export: z.ZodString;
|
|
282
|
+
}, z.core.$strict>;
|
|
283
|
+
requires: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
284
|
+
"storage.read": "storage.read";
|
|
285
|
+
"storage.write": "storage.write";
|
|
286
|
+
"network.fetch": "network.fetch";
|
|
287
|
+
"clipboard.read": "clipboard.read";
|
|
288
|
+
"clipboard.write": "clipboard.write";
|
|
289
|
+
"geolocation.read": "geolocation.read";
|
|
290
|
+
"notification.send": "notification.send";
|
|
291
|
+
"workboard.create": "workboard.create";
|
|
292
|
+
"workboard.update": "workboard.update";
|
|
293
|
+
"applet.snapshot.create": "applet.snapshot.create";
|
|
294
|
+
"applet.snapshot.update": "applet.snapshot.update";
|
|
295
|
+
"output.create": "output.create";
|
|
296
|
+
"output.update": "output.update";
|
|
297
|
+
}>>>;
|
|
298
|
+
}, z.core.$strict>>>;
|
|
299
|
+
}, z.core.$strict>;
|
|
300
|
+
export type AppletImplRef = z.infer<typeof appletImplRefSchema>;
|
|
301
|
+
export type AppletConfigDescriptor = z.infer<typeof appletConfigDescriptorSchema>;
|
|
302
|
+
export type AppletToolDescriptor = z.infer<typeof appletToolDescriptorSchema>;
|
|
303
|
+
export type AppletCliDescriptor = z.infer<typeof appletCliDescriptorSchema>;
|
|
304
|
+
export type AppletEventHandlerDescriptor = z.infer<typeof appletEventHandlerDescriptorSchema>;
|
|
305
|
+
export type AppletContributes = z.infer<typeof appletContributesSchema>;
|
|
306
|
+
//# sourceMappingURL=contributes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contributes.d.ts","sourceRoot":"","sources":["../../src/schemas/contributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAM5B,0EAA0E;AAC1E,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB;;;EAA+B,CAAC;AAEpE;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;;;;;kBAuBrB,CAAC;AAKZ;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B;;;;;;kBAgB9B,CAAC;AAEZ,+DAA+D;AAC/D,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAO5B,CAAC;AA6BZ;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAO3B,CAAC;AAEZ;;;;;;GAMG;AACH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAepC,CAAC;AAEZ;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAU1B,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAC9F,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contributed descriptors — what a subscribed Applet adds to a subscriber's
|
|
3
|
+
* runtime.
|
|
4
|
+
*
|
|
5
|
+
* The one rule that makes contribution safe: DESCRIPTORS ARE DATA,
|
|
6
|
+
* IMPLEMENTATIONS ARE CODE. Everything in this file is inert JSON. It is
|
|
7
|
+
* validated at publish time, registered into a subscriber's runtime as a shim
|
|
8
|
+
* loader, and executes nothing. Every implementation is named BY REFERENCE into
|
|
9
|
+
* the release's own digest-pinned file inventory, and is dispatched across the
|
|
10
|
+
* sandbox boundary — never imported by the host.
|
|
11
|
+
*
|
|
12
|
+
* Why these shapes differ from the first-party descriptors they feed:
|
|
13
|
+
*
|
|
14
|
+
* - `tools/tool` descriptors carry LIVE ZOD objects for input/output. A manifest
|
|
15
|
+
* is wire data and cannot carry Zod, so contributed tools carry bounded JSON
|
|
16
|
+
* Schema and the host converts at registration.
|
|
17
|
+
* - `cli/command` arguments/options are already declarative primitives, so the
|
|
18
|
+
* contributed shape mirrors them closely.
|
|
19
|
+
* - The `configNamespace` CLI pattern points at a Zod schema BY STRING NAME,
|
|
20
|
+
* which an Applet cannot use — it names nothing the host can resolve. So
|
|
21
|
+
* contributed config carries its value schema inline as JSON Schema.
|
|
22
|
+
*/
|
|
23
|
+
import * as z from 'zod/v4';
|
|
24
|
+
import { boundedJsonValueSchema, boundedWireSchemaSchema } from '@vibesdotdev/shared/schemas';
|
|
25
|
+
import { appletCapabilityKindSchema } from "./capabilities.js";
|
|
26
|
+
import { SAFE_ID, SAFE_RELATIVE_PATH } from "./patterns.js";
|
|
27
|
+
/** Per-kind cap. The per-SUBSCRIBER cap is enforced at subscribe time. */
|
|
28
|
+
export const APPLET_CONTRIBUTION_LIMIT = 32;
|
|
29
|
+
/**
|
|
30
|
+
* Where a contributed implementation runs.
|
|
31
|
+
*
|
|
32
|
+
* `client` dispatches to the runner frame over MessagePort and needs a viewer.
|
|
33
|
+
* `server` needs the headless half; until server-side capability brokers exist,
|
|
34
|
+
* declaring it is a publish-time rejection rather than a tool that registers and
|
|
35
|
+
* always throws.
|
|
36
|
+
*/
|
|
37
|
+
export const appletImplSurfaceSchema = z.enum(['client', 'server']);
|
|
38
|
+
/**
|
|
39
|
+
* An implementation named by reference, never by value.
|
|
40
|
+
*
|
|
41
|
+
* `entry` must appear in the manifest's immutable `files[]`, so an
|
|
42
|
+
* implementation is digest-pinned exactly like every other byte of the release.
|
|
43
|
+
* That check lives in the manifest superRefine, where `files[]` is in scope.
|
|
44
|
+
*/
|
|
45
|
+
export const appletImplRefSchema = z.object({
|
|
46
|
+
surface: appletImplSurfaceSchema,
|
|
47
|
+
entry: z
|
|
48
|
+
.string()
|
|
49
|
+
.min(1)
|
|
50
|
+
.max(512)
|
|
51
|
+
.regex(SAFE_RELATIVE_PATH, 'Applet paths must be safe, relative POSIX paths'),
|
|
52
|
+
/**
|
|
53
|
+
* A NAMED export. Required, and `default` is refused.
|
|
54
|
+
*
|
|
55
|
+
* The compiled bundle's `default` export IS the Svelte component itself
|
|
56
|
+
* (`compile.ts` wrapper: `export default Component`). A contribution pointing
|
|
57
|
+
* at `default` would hand the component object to a tool caller instead of an
|
|
58
|
+
* implementation, so there is no sensible default value for this field.
|
|
59
|
+
*/
|
|
60
|
+
export: z
|
|
61
|
+
.string()
|
|
62
|
+
.min(1)
|
|
63
|
+
.max(80)
|
|
64
|
+
.regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/, 'Export must be a JavaScript identifier')
|
|
65
|
+
.refine((name) => name !== 'default', {
|
|
66
|
+
message: 'Contributed implementations must name a named export; `default` is the component'
|
|
67
|
+
})
|
|
68
|
+
}).strict();
|
|
69
|
+
/** Capability tags a contribution needs. Always a subset of the manifest's. */
|
|
70
|
+
const requiresSchema = z.array(appletCapabilityKindSchema).max(16).default([]);
|
|
71
|
+
/**
|
|
72
|
+
* A configuration key the Applet needs from its subscriber.
|
|
73
|
+
*
|
|
74
|
+
* The key is namespaced by the HOST as `applet.<slug>.<key>` — never
|
|
75
|
+
* author-chosen — which is what stops collision and squatting.
|
|
76
|
+
*/
|
|
77
|
+
export const appletConfigDescriptorSchema = z.object({
|
|
78
|
+
key: z.string().min(1).max(64).regex(SAFE_ID, 'Config keys must be kebab-case'),
|
|
79
|
+
description: z.string().min(1).max(500),
|
|
80
|
+
valueSchema: boundedWireSchemaSchema,
|
|
81
|
+
/**
|
|
82
|
+
* The default VALUE for this key — not a schema. Bounded against a 5MB blob
|
|
83
|
+
* riding into the stored manifest, but any JSON value is legitimate here.
|
|
84
|
+
*/
|
|
85
|
+
default: boundedJsonValueSchema.optional(),
|
|
86
|
+
/**
|
|
87
|
+
* Routes through the secrets store instead of config: injected into the
|
|
88
|
+
* implementation, never readable back. The CLI config-namespace pattern has
|
|
89
|
+
* no secret path today, so this is rejected until that lands rather than
|
|
90
|
+
* silently storing a credential in plaintext config.
|
|
91
|
+
*/
|
|
92
|
+
secret: z.boolean().default(false)
|
|
93
|
+
}).strict();
|
|
94
|
+
/** A tool the Applet contributes to its subscriber's agent. */
|
|
95
|
+
export const appletToolDescriptorSchema = z.object({
|
|
96
|
+
name: z.string().min(1).max(64).regex(SAFE_ID, 'Tool names must be kebab-case'),
|
|
97
|
+
description: z.string().min(1).max(1000),
|
|
98
|
+
inputSchema: boundedWireSchemaSchema,
|
|
99
|
+
outputSchema: boundedWireSchemaSchema.optional(),
|
|
100
|
+
impl: appletImplRefSchema,
|
|
101
|
+
requires: requiresSchema
|
|
102
|
+
}).strict();
|
|
103
|
+
/** A CLI argument, mirroring the first-party `cli/command` argument shape. */
|
|
104
|
+
const appletCliArgumentSchema = z.object({
|
|
105
|
+
name: z.string().min(1).max(64).regex(SAFE_ID, 'CLI argument names must be kebab-case'),
|
|
106
|
+
description: z.string().min(1).max(500),
|
|
107
|
+
required: z.boolean().default(false),
|
|
108
|
+
variadic: z.boolean().default(false)
|
|
109
|
+
}).strict();
|
|
110
|
+
/** A CLI option, mirroring the first-party `cli/command` option shape. */
|
|
111
|
+
const appletCliOptionSchema = z.object({
|
|
112
|
+
/**
|
|
113
|
+
* Commander-style flag spec, constrained. Free-form flags let a contribution
|
|
114
|
+
* declare `-h` or otherwise collide with the host's own option parsing.
|
|
115
|
+
*/
|
|
116
|
+
flags: z
|
|
117
|
+
.string()
|
|
118
|
+
.min(1)
|
|
119
|
+
.max(120)
|
|
120
|
+
.regex(/^--[a-z0-9]+(?:-[a-z0-9]+)*(?: <[a-z0-9-]+>| \[[a-z0-9-]+\])?$/, 'CLI option flags must be a single long form, e.g. `--dry-run` or `--path <value>`'),
|
|
121
|
+
description: z.string().min(1).max(500),
|
|
122
|
+
type: z.enum(['string', 'number', 'boolean']).default('string'),
|
|
123
|
+
choices: z.array(z.string().min(1).max(80)).max(32).optional()
|
|
124
|
+
}).strict();
|
|
125
|
+
/**
|
|
126
|
+
* A command the Applet contributes.
|
|
127
|
+
*
|
|
128
|
+
* Always mounted at `vibes applet <slug> <command>`. Never top-level, so a
|
|
129
|
+
* subscribed Applet cannot shadow `vibes deploy`.
|
|
130
|
+
*/
|
|
131
|
+
export const appletCliDescriptorSchema = z.object({
|
|
132
|
+
command: z.string().min(1).max(64).regex(SAFE_ID, 'CLI commands must be kebab-case'),
|
|
133
|
+
description: z.string().min(1).max(500),
|
|
134
|
+
arguments: z.array(appletCliArgumentSchema).max(16).default([]),
|
|
135
|
+
options: z.array(appletCliOptionSchema).max(16).default([]),
|
|
136
|
+
impl: appletImplRefSchema,
|
|
137
|
+
requires: requiresSchema
|
|
138
|
+
}).strict();
|
|
139
|
+
/**
|
|
140
|
+
* A runtime event the Applet reacts to.
|
|
141
|
+
*
|
|
142
|
+
* There is no viewer and no tab when an event fires, so this is server-side by
|
|
143
|
+
* definition. Delivery is at-least-once, so an implementation must be
|
|
144
|
+
* idempotent on the delivery id the host supplies.
|
|
145
|
+
*/
|
|
146
|
+
export const appletEventHandlerDescriptorSchema = z.object({
|
|
147
|
+
name: z.string().min(1).max(64).regex(SAFE_ID, 'Event handler names must be kebab-case'),
|
|
148
|
+
/**
|
|
149
|
+
* Applet-namespaced only. A free-form event name lets a contribution bind to
|
|
150
|
+
* any host event — `auth.session.created` is the obvious escalation — before
|
|
151
|
+
* any host event vocabulary or per-event authority check exists.
|
|
152
|
+
*/
|
|
153
|
+
event: z
|
|
154
|
+
.string()
|
|
155
|
+
.min(1)
|
|
156
|
+
.max(128)
|
|
157
|
+
.regex(/^applet\.[a-z0-9]+(?:[._-][a-z0-9]+)*$/, 'Event types must be applet-namespaced'),
|
|
158
|
+
description: z.string().min(1).max(500),
|
|
159
|
+
impl: appletImplRefSchema,
|
|
160
|
+
requires: requiresSchema
|
|
161
|
+
}).strict();
|
|
162
|
+
/**
|
|
163
|
+
* The closed contribution vocabulary.
|
|
164
|
+
*
|
|
165
|
+
* `.strict()` is load-bearing: an unknown key is a publish-time REJECTION, not
|
|
166
|
+
* a stripped field. Silent tolerance is how a closed vocabulary quietly opens,
|
|
167
|
+
* and the whole point of closing it is that a subscribed Applet must not be able
|
|
168
|
+
* to register an `ai/provider` or `auth/*` descriptor.
|
|
169
|
+
*
|
|
170
|
+
* `storage` is deliberately absent — it predates this block and stays at the
|
|
171
|
+
* manifest top level.
|
|
172
|
+
*/
|
|
173
|
+
export const appletContributesSchema = z
|
|
174
|
+
.object({
|
|
175
|
+
config: z.array(appletConfigDescriptorSchema).max(APPLET_CONTRIBUTION_LIMIT).default([]),
|
|
176
|
+
tools: z.array(appletToolDescriptorSchema).max(APPLET_CONTRIBUTION_LIMIT).default([]),
|
|
177
|
+
cli: z.array(appletCliDescriptorSchema).max(APPLET_CONTRIBUTION_LIMIT).default([]),
|
|
178
|
+
events: z
|
|
179
|
+
.array(appletEventHandlerDescriptorSchema)
|
|
180
|
+
.max(APPLET_CONTRIBUTION_LIMIT)
|
|
181
|
+
.default([])
|
|
182
|
+
})
|
|
183
|
+
.strict();
|
|
184
|
+
//# sourceMappingURL=contributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contributes.js","sourceRoot":"","sources":["../../src/schemas/contributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE5D,0EAA0E;AAC1E,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAE5C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEpE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,OAAO,EAAE,uBAAuB;IAChC,KAAK,EAAE,CAAC;SACN,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,KAAK,CAAC,kBAAkB,EAAE,iDAAiD,CAAC;IAC9E;;;;;;;OAOG;IACH,MAAM,EAAE,CAAC;SACP,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,EAAE,CAAC;SACP,KAAK,CAAC,4BAA4B,EAAE,wCAAwC,CAAC;SAC7E,MAAM,CA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