@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,5 @@
|
|
|
1
|
+
import type { RunnableClient } from '@vibesdotdev/runnable';
|
|
2
|
+
import type { AppletRootSurface } from '../applet-root-surface.ts';
|
|
3
|
+
export type AppletRunsSource = Pick<RunnableClient, 'runs' | 'snapshot' | 'watch' | 'watchCatalog' | 'describe' | 'visualizations' | 'control' | 'appendEvent'>;
|
|
4
|
+
export declare function appletRunsSource(surface: Pick<AppletRootSurface, 'runtimeCall'>): AppletRunsSource;
|
|
5
|
+
//# sourceMappingURL=runnable-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runnable-source.d.ts","sourceRoot":"","sources":["../../src/svelte/runnable-source.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAwB,MAAM,uBAAuB,CAAC;AAIlF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,gBAAgB,GAAG,SAAS,GAAG,aAAa,CAAC,CAAC;AAEhK,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,aAAa,CAAC,GAAG,gBAAgB,CAuFlG"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/** Runnable's canonical read/watch/control surface over the applet's admitted runtime connection. */
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
import { CapabilityError, CaughtFailureSchema } from '@vibesdotdev/kernel';
|
|
4
|
+
import { isRpcFailure, RpcErrorSchema } from '@vibesdotdev/kernel-rpc';
|
|
5
|
+
import { JsonObjectSchema, JsonValueSchema, JsonValueFromReaderSchema } from '@vibesdotdev/kernel/schemas/json';
|
|
6
|
+
import { RunnableDescriptionSchema, RunnableVisualizationDescriptorSchema } from '@vibesdotdev/runnable';
|
|
7
|
+
import { RunnableReadQuerySchema, RunnableSnapshotSchema, RunnableTrackedRunSchema, RunnableWatchSnapshotSchema, RunnableCatalogWatchSnapshotSchema, RunnableWatchArgumentSchema, RunnableWatchOptionsSchema } from '@vibesdotdev/runnable/schemas/runs';
|
|
8
|
+
import { FailureFactsSchema } from '@vibesdotdev/runnable/schemas/outcome';
|
|
9
|
+
import { appletRuntimeCallbackSchema } from "../applet-root-surface.js";
|
|
10
|
+
export function appletRunsSource(surface) {
|
|
11
|
+
const remoteCall = surface.runtimeCall.bind(surface, 'runtime/client', 'runnable');
|
|
12
|
+
async function invoke(work) {
|
|
13
|
+
try {
|
|
14
|
+
return await work();
|
|
15
|
+
}
|
|
16
|
+
catch (cause) {
|
|
17
|
+
const failure = CaughtFailureSchema.parse(cause);
|
|
18
|
+
if (!isRpcFailure(failure))
|
|
19
|
+
throw failure;
|
|
20
|
+
throw new CapabilityError(failure.message, 'UNAVAILABLE', {
|
|
21
|
+
reason: 'applet-runtime-rpc-failed', cause: failure,
|
|
22
|
+
details: JsonObjectSchema.parse(JsonValueFromReaderSchema.parse({ rpc: RpcErrorSchema.parse(failure.toJSON()) }))
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const call = (...args) => invoke(() => remoteCall(...args));
|
|
27
|
+
async function describe(id, receive) {
|
|
28
|
+
let delivered;
|
|
29
|
+
await call('describe', id, async (value) => {
|
|
30
|
+
if (delivered !== undefined)
|
|
31
|
+
throw new CapabilityError('Runnable description was delivered more than once.', 'INVALID_INPUT', {
|
|
32
|
+
reason: 'runnable-description-delivery-repeated'
|
|
33
|
+
});
|
|
34
|
+
delivered = RunnableDescriptionSchema.parse(value);
|
|
35
|
+
if (receive)
|
|
36
|
+
await receive(delivered);
|
|
37
|
+
});
|
|
38
|
+
if (delivered === undefined)
|
|
39
|
+
throw new CapabilityError('Runnable owner returned without delivering its description.', 'UNAVAILABLE', {
|
|
40
|
+
reason: 'runnable-description-delivery-missing'
|
|
41
|
+
});
|
|
42
|
+
if (!receive)
|
|
43
|
+
return delivered;
|
|
44
|
+
}
|
|
45
|
+
const watch = async (query, listener, failureOrOptions, nativeOptions) => {
|
|
46
|
+
const options = RunnableWatchOptionsSchema.parse({
|
|
47
|
+
...nativeOptions, ...RunnableWatchArgumentSchema.parse(failureOrOptions)
|
|
48
|
+
});
|
|
49
|
+
if (options.signal !== undefined) {
|
|
50
|
+
throw new CapabilityError('Applet watches inherit their runtime connection lifetime.', 'INVALID_INPUT', {
|
|
51
|
+
reason: 'rpc-cancellation-unsupported', retryable: false
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
const receive = async (value) => {
|
|
55
|
+
await listener(RunnableWatchSnapshotSchema.parse(value));
|
|
56
|
+
};
|
|
57
|
+
const failure = async (value) => {
|
|
58
|
+
const facts = FailureFactsSchema.parse(value);
|
|
59
|
+
if (options.onError)
|
|
60
|
+
await options.onError(facts);
|
|
61
|
+
else
|
|
62
|
+
throw new CapabilityError(facts.message, 'UNAVAILABLE', { reason: 'runnable-watch-failed', details: JsonObjectSchema.parse(facts) });
|
|
63
|
+
};
|
|
64
|
+
const projection = options.projection === undefined ? undefined : { projection: options.projection };
|
|
65
|
+
const stop = appletRuntimeCallbackSchema.parse(await call('watch', RunnableReadQuerySchema.strict().parse(query), receive, failure, ...(projection ? [projection] : [])));
|
|
66
|
+
return async () => { await invoke(() => stop()); };
|
|
67
|
+
};
|
|
68
|
+
return {
|
|
69
|
+
runs: async (query) => z.array(RunnableTrackedRunSchema).parse(await call('runs', RunnableReadQuerySchema.strict().parse(query ?? {}))),
|
|
70
|
+
snapshot: async (id) => RunnableSnapshotSchema.parse(await call('snapshot', id)),
|
|
71
|
+
describe,
|
|
72
|
+
watch,
|
|
73
|
+
watchCatalog: async (query, listener, failureOrOptions) => {
|
|
74
|
+
const options = RunnableWatchOptionsSchema.parse(RunnableWatchArgumentSchema.parse(failureOrOptions));
|
|
75
|
+
if (options.signal !== undefined)
|
|
76
|
+
throw new CapabilityError('Applet watches inherit their runtime connection lifetime.', 'INVALID_INPUT', {
|
|
77
|
+
reason: 'rpc-cancellation-unsupported', retryable: false
|
|
78
|
+
});
|
|
79
|
+
const stop = appletRuntimeCallbackSchema.parse(await call('watchCatalog', RunnableReadQuerySchema.strict().parse(query), async (value) => { await listener(RunnableCatalogWatchSnapshotSchema.parse(value)); }, async (value) => {
|
|
80
|
+
const facts = FailureFactsSchema.parse(value);
|
|
81
|
+
if (options.onError)
|
|
82
|
+
await options.onError(facts);
|
|
83
|
+
else
|
|
84
|
+
throw new CapabilityError(facts.message, 'UNAVAILABLE', { reason: 'runnable-watch-failed', details: JsonObjectSchema.parse(facts) });
|
|
85
|
+
}));
|
|
86
|
+
return async () => { await invoke(() => stop()); };
|
|
87
|
+
},
|
|
88
|
+
visualizations: async (query) => z.array(RunnableVisualizationDescriptorSchema).parse(await call('visualizations', JsonValueSchema.parse(query))),
|
|
89
|
+
appendEvent: async (runId, type, payload) => { await call('appendEvent', runId, type, JsonObjectSchema.parse(payload)); },
|
|
90
|
+
control: async (input) => z.boolean().parse(await call('control', { runId: input.runId, action: input.action }))
|
|
91
|
+
};
|
|
92
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@vibesdotdev/kit/svelte';
|
|
3
|
+
import { Badge } from '@vibesdotdev/kit/svelte';
|
|
4
|
+
import { Button } from '@vibesdotdev/kit/svelte';
|
|
5
|
+
|
|
6
|
+
let { applets = [] }: { applets?: { id: string; entry: string }[] } = $props();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<div class="shell">
|
|
10
|
+
<Card class="w-full max-w-md">
|
|
11
|
+
<CardHeader>
|
|
12
|
+
<CardTitle>Local applets</CardTitle>
|
|
13
|
+
<CardDescription>One server, every project under /applet/{id}/</CardDescription>
|
|
14
|
+
</CardHeader>
|
|
15
|
+
<CardContent class="list">
|
|
16
|
+
{#if applets.length === 0}
|
|
17
|
+
<p class="empty">No applet projects yet — create one under .vibes/applets/.</p>
|
|
18
|
+
{:else}
|
|
19
|
+
{#each applets as a (a.id)}
|
|
20
|
+
<a class="row" href="/applet/{a.id}/">
|
|
21
|
+
<Button variant="outline" class="row-btn">
|
|
22
|
+
<span class="row-id">{a.id}</span>
|
|
23
|
+
<Badge variant="secondary">{a.entry}</Badge>
|
|
24
|
+
</Button>
|
|
25
|
+
</a>
|
|
26
|
+
{/each}
|
|
27
|
+
{/if}
|
|
28
|
+
</CardContent>
|
|
29
|
+
</Card>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<style>
|
|
33
|
+
.shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
|
|
34
|
+
.shell :global(.list) { display: flex; flex-direction: column; gap: 8px; }
|
|
35
|
+
.row { text-decoration: none; }
|
|
36
|
+
.shell :global(.row-btn) { width: 100%; display: flex; justify-content: space-between; align-items: center; }
|
|
37
|
+
.row-id { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
|
|
38
|
+
.empty { font-size: 13px; opacity: 0.7; }
|
|
39
|
+
</style>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
applets?: {
|
|
3
|
+
id: string;
|
|
4
|
+
entry: string;
|
|
5
|
+
}[];
|
|
6
|
+
};
|
|
7
|
+
declare const ServeIndex: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
+
type ServeIndex = ReturnType<typeof ServeIndex>;
|
|
9
|
+
export default ServeIndex;
|
|
10
|
+
//# sourceMappingURL=serve-index.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve-index.svelte.d.ts","sourceRoot":"","sources":["../../src/svelte/serve-index.svelte.ts"],"names":[],"mappings":"AAOC,KAAK,gBAAgB,GAAI;IAAE,OAAO,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,CAAC;AAoCxE,QAAA,MAAM,UAAU,sDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CanvasState } from './lib/canvas-lifecycle.ts';
|
|
2
|
+
export declare function createCanvasState(): {
|
|
3
|
+
readonly state: CanvasState;
|
|
4
|
+
readonly consented: boolean;
|
|
5
|
+
readonly runnerMounted: boolean;
|
|
6
|
+
readonly heartbeatCount: number;
|
|
7
|
+
readonly error: string | null;
|
|
8
|
+
readonly canMountRunner: boolean;
|
|
9
|
+
readonly canFetchBundle: boolean;
|
|
10
|
+
readonly isTerminal: boolean;
|
|
11
|
+
readonly isErrorState: boolean;
|
|
12
|
+
transitionToReady(): void;
|
|
13
|
+
transitionToApproved(): void;
|
|
14
|
+
transitionToMounted(): void;
|
|
15
|
+
transitionToRunning(): void;
|
|
16
|
+
recordHeartbeat(): void;
|
|
17
|
+
transitionToCrashed(error: string): void;
|
|
18
|
+
transitionToUnresponsive(): void;
|
|
19
|
+
transitionToRevoked(): void;
|
|
20
|
+
transitionToExpired(): void;
|
|
21
|
+
transitionToDisposed(): void;
|
|
22
|
+
/** Reset to a fresh loading context (for re-mount after dispose). */
|
|
23
|
+
reset(): void;
|
|
24
|
+
};
|
|
25
|
+
export type CanvasStateStore = ReturnType<typeof createCanvasState>;
|
|
26
|
+
//# sourceMappingURL=state.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.svelte.d.ts","sourceRoot":"","sources":["../../src/svelte/state.svelte.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAiB,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE5E,wBAAgB,iBAAiB;oBAIlB,WAAW;wBAGP,OAAO;4BAGH,OAAO;6BAGN,MAAM;oBAGf,MAAM,GAAG,IAAI;6BAGJ,OAAO;6BAGP,OAAO;yBAGX,OAAO;2BAGL,OAAO;;;;;;+BAkBA,MAAM;;;;;IAejC,qEAAqE;;EAKtE;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reactive canvas state — runes wrapper over the pure lifecycle module.
|
|
3
|
+
*
|
|
4
|
+
* Components import this to get reactive access to the canvas state.
|
|
5
|
+
* Pure logic (transitions, guards) lives in `./lib/canvas-lifecycle.ts`.
|
|
6
|
+
*/
|
|
7
|
+
import { untrack } from 'svelte';
|
|
8
|
+
import * as lifecycle from "./lib/canvas-lifecycle.js";
|
|
9
|
+
export function createCanvasState() {
|
|
10
|
+
let ctx = $state(lifecycle.createCanvasContext());
|
|
11
|
+
return {
|
|
12
|
+
get state() {
|
|
13
|
+
return ctx.state;
|
|
14
|
+
},
|
|
15
|
+
get consented() {
|
|
16
|
+
return ctx.consented;
|
|
17
|
+
},
|
|
18
|
+
get runnerMounted() {
|
|
19
|
+
return ctx.runnerMounted;
|
|
20
|
+
},
|
|
21
|
+
get heartbeatCount() {
|
|
22
|
+
return ctx.heartbeatCount;
|
|
23
|
+
},
|
|
24
|
+
get error() {
|
|
25
|
+
return ctx.error;
|
|
26
|
+
},
|
|
27
|
+
get canMountRunner() {
|
|
28
|
+
return lifecycle.canMountRunner(ctx);
|
|
29
|
+
},
|
|
30
|
+
get canFetchBundle() {
|
|
31
|
+
return lifecycle.canFetchBundle(ctx);
|
|
32
|
+
},
|
|
33
|
+
get isTerminal() {
|
|
34
|
+
return lifecycle.isTerminal(ctx);
|
|
35
|
+
},
|
|
36
|
+
get isErrorState() {
|
|
37
|
+
return lifecycle.isErrorState(ctx);
|
|
38
|
+
},
|
|
39
|
+
transitionToReady() {
|
|
40
|
+
ctx = untrack(() => lifecycle.transitionToReady(ctx));
|
|
41
|
+
},
|
|
42
|
+
transitionToApproved() {
|
|
43
|
+
ctx = untrack(() => lifecycle.transitionToApproved(ctx));
|
|
44
|
+
},
|
|
45
|
+
transitionToMounted() {
|
|
46
|
+
ctx = untrack(() => lifecycle.transitionToMounted(ctx));
|
|
47
|
+
},
|
|
48
|
+
transitionToRunning() {
|
|
49
|
+
ctx = untrack(() => lifecycle.transitionToRunning(ctx));
|
|
50
|
+
},
|
|
51
|
+
recordHeartbeat() {
|
|
52
|
+
ctx = untrack(() => lifecycle.recordHeartbeat(ctx));
|
|
53
|
+
},
|
|
54
|
+
transitionToCrashed(error) {
|
|
55
|
+
ctx = untrack(() => lifecycle.transitionToCrashed(ctx, error));
|
|
56
|
+
},
|
|
57
|
+
transitionToUnresponsive() {
|
|
58
|
+
ctx = untrack(() => lifecycle.transitionToUnresponsive(ctx));
|
|
59
|
+
},
|
|
60
|
+
transitionToRevoked() {
|
|
61
|
+
ctx = untrack(() => lifecycle.transitionToRevoked(ctx));
|
|
62
|
+
},
|
|
63
|
+
transitionToExpired() {
|
|
64
|
+
ctx = untrack(() => lifecycle.transitionToExpired(ctx));
|
|
65
|
+
},
|
|
66
|
+
transitionToDisposed() {
|
|
67
|
+
ctx = untrack(() => lifecycle.transitionToDisposed(ctx));
|
|
68
|
+
},
|
|
69
|
+
/** Reset to a fresh loading context (for re-mount after dispose). */
|
|
70
|
+
reset() {
|
|
71
|
+
ctx = lifecycle.createCanvasContext();
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* First-party widget for `applet`: create, list, get, update-source,
|
|
4
|
+
* templates, and adopt — not a JSON dump.
|
|
5
|
+
*/
|
|
6
|
+
import { Badge } from '@vibesdotdev/kit/components/ui/badge';
|
|
7
|
+
import { Icon } from '@vibesdotdev/kit/components/icon';
|
|
8
|
+
import {
|
|
9
|
+
ToolCard,
|
|
10
|
+
ToolCardBody,
|
|
11
|
+
type ToolWidgetProps
|
|
12
|
+
} from '@vibesdotdev/kit/components/tool-widgets';
|
|
13
|
+
import {
|
|
14
|
+
APPLET_TOOL_CARD_LIST_LIMIT,
|
|
15
|
+
APPLET_TOOL_ICON,
|
|
16
|
+
projectAppletToolCard
|
|
17
|
+
} from './applet-tool-card.js';
|
|
18
|
+
|
|
19
|
+
let { tool, compact = false }: ToolWidgetProps = $props();
|
|
20
|
+
|
|
21
|
+
const model = $derived(projectAppletToolCard(tool.input, tool.output));
|
|
22
|
+
const listedApplets = $derived(model.applets.slice(0, APPLET_TOOL_CARD_LIST_LIMIT));
|
|
23
|
+
const listedTemplates = $derived(model.templates.slice(0, APPLET_TOOL_CARD_LIST_LIMIT));
|
|
24
|
+
const listedAdoptions = $derived(model.adoptions.slice(0, APPLET_TOOL_CARD_LIST_LIMIT));
|
|
25
|
+
const pending = $derived(tool.output === undefined || tool.output === null);
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<ToolCard {tool} {compact} title={model.title} icon={APPLET_TOOL_ICON}>
|
|
29
|
+
{#snippet children()}
|
|
30
|
+
<ToolCardBody {compact}>
|
|
31
|
+
<div class="flex flex-wrap items-center gap-1.5">
|
|
32
|
+
{#if model.action}
|
|
33
|
+
<Badge variant="outline" class="text-caption">{model.action}</Badge>
|
|
34
|
+
{/if}
|
|
35
|
+
{#if model.applet?.status}
|
|
36
|
+
<Badge variant="secondary" class="text-caption">{model.applet.status}</Badge>
|
|
37
|
+
{/if}
|
|
38
|
+
{#if model.applet?.store}
|
|
39
|
+
<Badge variant="outline" class="text-caption">{model.applet.store}</Badge>
|
|
40
|
+
{/if}
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
{#if pending && !tool.error}
|
|
44
|
+
<p class="text-muted-foreground italic">Working…</p>
|
|
45
|
+
{/if}
|
|
46
|
+
|
|
47
|
+
{#if model.message}
|
|
48
|
+
<p class="text-muted-foreground">{model.message}</p>
|
|
49
|
+
{/if}
|
|
50
|
+
|
|
51
|
+
{#if model.instanceId}
|
|
52
|
+
<p class="font-mono text-caption text-muted-foreground">instance {model.instanceId}</p>
|
|
53
|
+
{/if}
|
|
54
|
+
|
|
55
|
+
{#if model.instanceWarning}
|
|
56
|
+
<p class="text-muted-foreground">{model.instanceWarning}</p>
|
|
57
|
+
{/if}
|
|
58
|
+
|
|
59
|
+
{#if model.applet}
|
|
60
|
+
<div class="space-y-1">
|
|
61
|
+
{#if model.applet.componentRef}
|
|
62
|
+
<p class="truncate font-mono text-caption text-muted-foreground">
|
|
63
|
+
{model.applet.componentRef}
|
|
64
|
+
</p>
|
|
65
|
+
{/if}
|
|
66
|
+
{#if model.applet.url}
|
|
67
|
+
<a
|
|
68
|
+
href={model.applet.url}
|
|
69
|
+
class="break-all font-mono text-foreground underline-offset-2 hover:underline"
|
|
70
|
+
target="_blank"
|
|
71
|
+
rel="noopener noreferrer">{model.applet.url}</a
|
|
72
|
+
>
|
|
73
|
+
{/if}
|
|
74
|
+
</div>
|
|
75
|
+
{/if}
|
|
76
|
+
|
|
77
|
+
{#if listedApplets.length}
|
|
78
|
+
<ul class="space-y-1.5">
|
|
79
|
+
{#each listedApplets as row (row.id)}
|
|
80
|
+
<li class="flex min-w-0 items-center gap-2">
|
|
81
|
+
<Icon icon="lucide:app-window" class="size-3.5 shrink-0 text-muted-foreground" />
|
|
82
|
+
<span class="min-w-0 flex-1 truncate font-medium">{row.summary || row.id}</span>
|
|
83
|
+
{#if row.status}
|
|
84
|
+
<span class="shrink-0 text-caption text-muted-foreground">{row.status}</span>
|
|
85
|
+
{/if}
|
|
86
|
+
</li>
|
|
87
|
+
{/each}
|
|
88
|
+
</ul>
|
|
89
|
+
{#if model.applets.length > APPLET_TOOL_CARD_LIST_LIMIT}
|
|
90
|
+
<p class="text-muted-foreground">
|
|
91
|
+
{model.applets.length - APPLET_TOOL_CARD_LIST_LIMIT} more
|
|
92
|
+
</p>
|
|
93
|
+
{/if}
|
|
94
|
+
{/if}
|
|
95
|
+
|
|
96
|
+
{#if listedTemplates.length}
|
|
97
|
+
<ul class="space-y-1.5">
|
|
98
|
+
{#each listedTemplates as row (row.id)}
|
|
99
|
+
<li class="min-w-0">
|
|
100
|
+
<div class="flex min-w-0 items-center gap-2">
|
|
101
|
+
<Icon
|
|
102
|
+
icon="lucide:layout-template"
|
|
103
|
+
class="size-3.5 shrink-0 text-muted-foreground"
|
|
104
|
+
/>
|
|
105
|
+
<span class="min-w-0 flex-1 truncate font-medium">{row.name}</span>
|
|
106
|
+
</div>
|
|
107
|
+
{#if row.description}
|
|
108
|
+
<p class="ml-5 line-clamp-2 text-caption text-muted-foreground">
|
|
109
|
+
{row.description}
|
|
110
|
+
</p>
|
|
111
|
+
{/if}
|
|
112
|
+
</li>
|
|
113
|
+
{/each}
|
|
114
|
+
</ul>
|
|
115
|
+
{#if model.templates.length > APPLET_TOOL_CARD_LIST_LIMIT}
|
|
116
|
+
<p class="text-muted-foreground">
|
|
117
|
+
{model.templates.length - APPLET_TOOL_CARD_LIST_LIMIT} more
|
|
118
|
+
</p>
|
|
119
|
+
{/if}
|
|
120
|
+
{/if}
|
|
121
|
+
|
|
122
|
+
{#if listedAdoptions.length}
|
|
123
|
+
<ul class="space-y-1.5">
|
|
124
|
+
{#each listedAdoptions as row (`${row.sourceAppletId}:${row.adoptedAppletId}`)}
|
|
125
|
+
<li class="min-w-0">
|
|
126
|
+
<p class="truncate font-mono text-caption">
|
|
127
|
+
{row.sourceAppletId} → {row.adoptedAppletId}
|
|
128
|
+
</p>
|
|
129
|
+
{#if row.url}
|
|
130
|
+
<a
|
|
131
|
+
href={row.url}
|
|
132
|
+
class="break-all font-mono text-caption text-muted-foreground underline-offset-2 hover:underline"
|
|
133
|
+
target="_blank"
|
|
134
|
+
rel="noopener noreferrer">{row.url}</a
|
|
135
|
+
>
|
|
136
|
+
{/if}
|
|
137
|
+
</li>
|
|
138
|
+
{/each}
|
|
139
|
+
</ul>
|
|
140
|
+
{#if model.adoptions.length > APPLET_TOOL_CARD_LIST_LIMIT}
|
|
141
|
+
<p class="text-muted-foreground">
|
|
142
|
+
{model.adoptions.length - APPLET_TOOL_CARD_LIST_LIMIT} more
|
|
143
|
+
</p>
|
|
144
|
+
{/if}
|
|
145
|
+
{/if}
|
|
146
|
+
</ToolCardBody>
|
|
147
|
+
{/snippet}
|
|
148
|
+
</ToolCard>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ToolWidgetProps } from '@vibesdotdev/kit/components/tool-widgets';
|
|
2
|
+
declare const AppletToolCard: import("svelte").Component<ToolWidgetProps, {}, "">;
|
|
3
|
+
type AppletToolCard = ReturnType<typeof AppletToolCard>;
|
|
4
|
+
export default AppletToolCard;
|
|
5
|
+
//# sourceMappingURL=AppletToolCard.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppletToolCard.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/tool-widgets/AppletToolCard.svelte.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,eAAe,EACpB,MAAM,0CAA0C,CAAC;AAsInD,QAAA,MAAM,cAAc,qDAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const APPLET_TOOL_ID = "applet";
|
|
2
|
+
export declare const APPLET_TOOL_ICON = "lucide:app-window";
|
|
3
|
+
export declare const APPLET_TOOL_CARD_LIST_LIMIT = 8;
|
|
4
|
+
declare const ACTIONS: readonly ["create", "list", "get", "update-source", "templates", "adopt"];
|
|
5
|
+
export type AppletToolAction = (typeof ACTIONS)[number];
|
|
6
|
+
export declare function isAppletToolAction(value: string): value is AppletToolAction;
|
|
7
|
+
export type AppletCardRow = {
|
|
8
|
+
id: string;
|
|
9
|
+
summary: string;
|
|
10
|
+
status: string;
|
|
11
|
+
store: string;
|
|
12
|
+
url: string;
|
|
13
|
+
componentRef: string;
|
|
14
|
+
visibility: string;
|
|
15
|
+
};
|
|
16
|
+
export type AppletTemplateRow = {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
description: string;
|
|
20
|
+
componentRef: string;
|
|
21
|
+
};
|
|
22
|
+
export type AppletAdoptionRow = {
|
|
23
|
+
sourceAppletId: string;
|
|
24
|
+
adoptedAppletId: string;
|
|
25
|
+
url: string;
|
|
26
|
+
};
|
|
27
|
+
export type AppletToolCardModel = {
|
|
28
|
+
action: string;
|
|
29
|
+
known: boolean;
|
|
30
|
+
title: string;
|
|
31
|
+
applet: AppletCardRow | null;
|
|
32
|
+
applets: AppletCardRow[];
|
|
33
|
+
templates: AppletTemplateRow[];
|
|
34
|
+
adoptions: AppletAdoptionRow[];
|
|
35
|
+
instanceId: string;
|
|
36
|
+
instanceWarning: string;
|
|
37
|
+
message: string;
|
|
38
|
+
};
|
|
39
|
+
export declare function projectAppletToolCard(input: unknown, output: unknown): AppletToolCardModel;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=applet-tool-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applet-tool-card.d.ts","sourceRoot":"","sources":["../../../src/svelte/tool-widgets/applet-tool-card.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,cAAc,WAAW,CAAC;AACvC,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AACpD,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C,QAAA,MAAM,OAAO,2EAA4E,CAAC;AAC1F,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAIxD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,gBAAgB,CAE3E;AAED,MAAM,MAAM,aAAa,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CAChB,CAAC;AAgHF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,mBAAmB,CA2D1F"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Projection for the first-party `applet` Kit ToolCard.
|
|
3
|
+
*
|
|
4
|
+
* Pure so titles and rows can be proven without mounting Svelte. The widget is
|
|
5
|
+
* a thin view over this model.
|
|
6
|
+
*/
|
|
7
|
+
import * as z from 'zod/v4';
|
|
8
|
+
export const APPLET_TOOL_ID = 'applet';
|
|
9
|
+
export const APPLET_TOOL_ICON = 'lucide:app-window';
|
|
10
|
+
export const APPLET_TOOL_CARD_LIST_LIMIT = 8;
|
|
11
|
+
const ACTIONS = ['create', 'list', 'get', 'update-source', 'templates', 'adopt'];
|
|
12
|
+
const actionSet = new Set(ACTIONS);
|
|
13
|
+
export function isAppletToolAction(value) {
|
|
14
|
+
return actionSet.has(value);
|
|
15
|
+
}
|
|
16
|
+
const appletRowSchema = z.object({
|
|
17
|
+
id: z.string().min(1),
|
|
18
|
+
summary: z.string().optional().default(''),
|
|
19
|
+
status: z.string().optional().default(''),
|
|
20
|
+
store: z.string().optional().default(''),
|
|
21
|
+
url: z.string().optional().default(''),
|
|
22
|
+
componentRef: z.string().optional().default(''),
|
|
23
|
+
visibility: z.string().optional().default('')
|
|
24
|
+
});
|
|
25
|
+
const templateRowSchema = z.object({
|
|
26
|
+
id: z.string().min(1),
|
|
27
|
+
name: z.string().min(1),
|
|
28
|
+
description: z.string().optional().default(''),
|
|
29
|
+
componentRef: z.string().optional().default('')
|
|
30
|
+
});
|
|
31
|
+
const adoptionRowSchema = z.object({
|
|
32
|
+
sourceAppletId: z.string().min(1),
|
|
33
|
+
adoptedAppletId: z.string().min(1),
|
|
34
|
+
url: z.string().optional().default('')
|
|
35
|
+
});
|
|
36
|
+
const appletToolCardInputSchema = z.object({
|
|
37
|
+
action: z.string().optional(),
|
|
38
|
+
title: z.string().optional()
|
|
39
|
+
}).passthrough();
|
|
40
|
+
const appletToolCardOutputSchema = z.object({
|
|
41
|
+
action: z.string().optional(),
|
|
42
|
+
applet: appletRowSchema.optional().nullable(),
|
|
43
|
+
applets: z.array(z.unknown()).optional(),
|
|
44
|
+
templates: z.array(z.unknown()).optional(),
|
|
45
|
+
adoptions: z.array(z.unknown()).optional(),
|
|
46
|
+
instanceId: z.string().optional().default(''),
|
|
47
|
+
instanceWarning: z.string().optional().default(''),
|
|
48
|
+
message: z.string().optional().default('')
|
|
49
|
+
}).passthrough();
|
|
50
|
+
function inferAction(inputAction, output) {
|
|
51
|
+
if (inputAction)
|
|
52
|
+
return inputAction;
|
|
53
|
+
if (output?.templates !== undefined)
|
|
54
|
+
return 'templates';
|
|
55
|
+
if (output?.adoptions !== undefined)
|
|
56
|
+
return 'adopt';
|
|
57
|
+
if (output?.applets !== undefined)
|
|
58
|
+
return 'list';
|
|
59
|
+
if (output?.applet)
|
|
60
|
+
return 'get';
|
|
61
|
+
return '';
|
|
62
|
+
}
|
|
63
|
+
function countLabel(count, singular, plural, empty) {
|
|
64
|
+
if (count <= 0)
|
|
65
|
+
return empty;
|
|
66
|
+
if (count === 1)
|
|
67
|
+
return `1 ${singular}`;
|
|
68
|
+
return `${count} ${plural}`;
|
|
69
|
+
}
|
|
70
|
+
function titleFor(action, model, pending, inputTitle) {
|
|
71
|
+
if (pending) {
|
|
72
|
+
switch (action) {
|
|
73
|
+
case 'create':
|
|
74
|
+
return inputTitle ? `Creating ${inputTitle}` : 'Creating applet';
|
|
75
|
+
case 'list':
|
|
76
|
+
return 'Listing applets';
|
|
77
|
+
case 'get':
|
|
78
|
+
return 'Loading applet';
|
|
79
|
+
case 'update-source':
|
|
80
|
+
return 'Updating applet';
|
|
81
|
+
case 'templates':
|
|
82
|
+
return 'Loading templates';
|
|
83
|
+
case 'adopt':
|
|
84
|
+
return 'Adopting applet';
|
|
85
|
+
default:
|
|
86
|
+
return 'Applets';
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
switch (action) {
|
|
90
|
+
case 'create':
|
|
91
|
+
return model.applet?.summary || inputTitle || 'Created applet';
|
|
92
|
+
case 'list':
|
|
93
|
+
return countLabel(model.applets.length, 'applet', 'applets', 'No applets');
|
|
94
|
+
case 'get':
|
|
95
|
+
return model.applet?.summary || 'Applet';
|
|
96
|
+
case 'update-source':
|
|
97
|
+
return model.applet?.summary || 'Updated applet';
|
|
98
|
+
case 'templates':
|
|
99
|
+
return countLabel(model.templates.length, 'template', 'templates', 'No templates');
|
|
100
|
+
case 'adopt':
|
|
101
|
+
return (model.message ||
|
|
102
|
+
(model.adoptions.length
|
|
103
|
+
? countLabel(model.adoptions.length, 'applet adopted', 'applets adopted', 'No applets adopted')
|
|
104
|
+
: model.applet?.summary) ||
|
|
105
|
+
'Adopt applet');
|
|
106
|
+
default:
|
|
107
|
+
return model.applet?.summary || model.message || 'Applets';
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
export function projectAppletToolCard(input, output) {
|
|
111
|
+
const parsedInput = appletToolCardInputSchema.safeParse(input);
|
|
112
|
+
const parsedOutput = appletToolCardOutputSchema.nullable().optional().safeParse(output);
|
|
113
|
+
let inputData = null;
|
|
114
|
+
if (parsedInput.success) {
|
|
115
|
+
inputData = parsedInput.data;
|
|
116
|
+
}
|
|
117
|
+
let outputData = null;
|
|
118
|
+
let pending = true;
|
|
119
|
+
if (parsedOutput.success) {
|
|
120
|
+
outputData = parsedOutput.data ?? null;
|
|
121
|
+
pending = parsedOutput.data === undefined || parsedOutput.data === null;
|
|
122
|
+
}
|
|
123
|
+
const action = inferAction(inputData?.action, outputData);
|
|
124
|
+
const applet = outputData?.applet ?? null;
|
|
125
|
+
const applets = [];
|
|
126
|
+
if (outputData?.applets) {
|
|
127
|
+
for (const item of outputData.applets) {
|
|
128
|
+
const parsed = appletRowSchema.safeParse(item);
|
|
129
|
+
if (parsed.success)
|
|
130
|
+
applets.push(parsed.data);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const templates = [];
|
|
134
|
+
if (outputData?.templates) {
|
|
135
|
+
for (const item of outputData.templates) {
|
|
136
|
+
const parsed = templateRowSchema.safeParse(item);
|
|
137
|
+
if (parsed.success)
|
|
138
|
+
templates.push(parsed.data);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
const adoptions = [];
|
|
142
|
+
if (outputData?.adoptions) {
|
|
143
|
+
for (const item of outputData.adoptions) {
|
|
144
|
+
const parsed = adoptionRowSchema.safeParse(item);
|
|
145
|
+
if (parsed.success)
|
|
146
|
+
adoptions.push(parsed.data);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
const instanceId = outputData?.instanceId ?? '';
|
|
150
|
+
const instanceWarning = outputData?.instanceWarning ?? '';
|
|
151
|
+
const message = outputData?.message ?? '';
|
|
152
|
+
const fields = {
|
|
153
|
+
applet,
|
|
154
|
+
applets,
|
|
155
|
+
templates,
|
|
156
|
+
adoptions,
|
|
157
|
+
instanceId,
|
|
158
|
+
instanceWarning,
|
|
159
|
+
message
|
|
160
|
+
};
|
|
161
|
+
return {
|
|
162
|
+
action,
|
|
163
|
+
known: isAppletToolAction(action),
|
|
164
|
+
title: titleFor(action, fields, pending, inputData?.title ?? ''),
|
|
165
|
+
...fields
|
|
166
|
+
};
|
|
167
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { default as AppletToolCard } from './AppletToolCard.svelte';
|
|
2
|
+
export { APPLET_TOOL_CARD_LIST_LIMIT, APPLET_TOOL_ICON, APPLET_TOOL_ID, isAppletToolAction, projectAppletToolCard, type AppletAdoptionRow, type AppletCardRow, type AppletTemplateRow, type AppletToolAction, type AppletToolCardModel } from './applet-tool-card.ts';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/svelte/tool-widgets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EACN,2BAA2B,EAC3B,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,oBAAoB,EACpB,8BAA8B,EAC9B,kBAAkB,EAClB,KAAK,wBAAwB,EAC7B,MAAM,oBAAoB,CAAC"}
|