@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,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Access and capability grants — who may open an applet, and what exact
|
|
3
|
+
* operations/resources they approved for one exact release.
|
|
4
|
+
*
|
|
5
|
+
* Authority separation:
|
|
6
|
+
* - AccessGrant: identity-based (who may open)
|
|
7
|
+
* - CapabilityGrant: operation-based (what the applet may do)
|
|
8
|
+
* - LaunchLease: time-bound authority for one run/frame generation
|
|
9
|
+
*
|
|
10
|
+
* Grants are version-bound — they pin to the exact Component release that
|
|
11
|
+
* was consented to. Upgrading the instance requires re-consent.
|
|
12
|
+
*/
|
|
13
|
+
import * as z from 'zod/v4';
|
|
14
|
+
import { componentReleaseRefSchema } from "./component-release-ref.js";
|
|
15
|
+
export const appletAccessGrantSchema = z.object({
|
|
16
|
+
id: z.uuid(),
|
|
17
|
+
instanceId: z.uuid(),
|
|
18
|
+
/** Grantee identity — server-derived, never client-supplied. */
|
|
19
|
+
viewerUserId: z.string().nullable(),
|
|
20
|
+
viewerOrgId: z.string().nullable(),
|
|
21
|
+
/** Scope of access. */
|
|
22
|
+
scope: z.enum(['open', 'edit', 'admin']).default('open'),
|
|
23
|
+
grantReason: z.string().nullable(),
|
|
24
|
+
createdAt: z.date(),
|
|
25
|
+
revokedAt: z.date().nullable()
|
|
26
|
+
});
|
|
27
|
+
export const appletCapabilityGrantSchema = z.object({
|
|
28
|
+
id: z.uuid(),
|
|
29
|
+
instanceId: z.uuid(),
|
|
30
|
+
/** Exact release the user consented to. */
|
|
31
|
+
release: componentReleaseRefSchema,
|
|
32
|
+
/** Capability tags approved by the user. */
|
|
33
|
+
capabilities: z.array(z.string()).min(0),
|
|
34
|
+
/** User-supplied reason text for each capability (from consent UI). */
|
|
35
|
+
capabilityReasons: z.record(z.string(), z.string()).default({}),
|
|
36
|
+
/** Viewer identity at consent time. */
|
|
37
|
+
viewerUserId: z.string().nullable(),
|
|
38
|
+
viewerOrgId: z.string().nullable(),
|
|
39
|
+
consentedAt: z.date(),
|
|
40
|
+
revokedAt: z.date().nullable()
|
|
41
|
+
});
|
|
42
|
+
export const appletLaunchLeaseSchema = z.object({
|
|
43
|
+
id: z.uuid(),
|
|
44
|
+
instanceId: z.uuid(),
|
|
45
|
+
runId: z.uuid(),
|
|
46
|
+
/** Short-lived authority for one run/frame generation. */
|
|
47
|
+
/**
|
|
48
|
+
* Opaque value stored with the lease.
|
|
49
|
+
*
|
|
50
|
+
* NOT a launch secret. It is generated at lease creation and compared to
|
|
51
|
+
* nothing, anywhere — the runner's mount handshake carries its own unrelated
|
|
52
|
+
* per-message nonce. Authorization binds a dispatch through `runId`, the
|
|
53
|
+
* lease's expiry, and its revocation, none of which involve this field.
|
|
54
|
+
*
|
|
55
|
+
* Left in place because it is pre-existing storage, but do not add a check
|
|
56
|
+
* that reads it as proof of anything without first making the runtime
|
|
57
|
+
* actually present it.
|
|
58
|
+
*/
|
|
59
|
+
nonce: z.string().min(1),
|
|
60
|
+
issuedAt: z.date(),
|
|
61
|
+
expiresAt: z.date(),
|
|
62
|
+
revokedAt: z.date().nullable()
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=grants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grants.js","sourceRoot":"","sources":["../../src/schemas/grants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE;IACZ,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE;IACpB,gEAAgE;IAChE,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,uBAAuB;IACvB,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACxD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE;IACnB,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE;IACZ,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE;IACpB,2CAA2C;IAC3C,OAAO,EAAE,yBAAyB;IAClC,4CAA4C;IAC5C,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACxC,uEAAuE;IACvE,iBAAiB,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/D,uCAAuC;IACvC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,WAAW,EAAE,CAAC,CAAC,IAAI,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE;IACZ,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE;IACpB,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE;IACf,0DAA0D;IAC1D;;;;;;;;;;;OAWG;IACH,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE;IAClB,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE;IACnB,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from './component-release-ref.ts';
|
|
2
|
+
export * from './template-revision.ts';
|
|
3
|
+
export * from './instance.ts';
|
|
4
|
+
export * from './run.ts';
|
|
5
|
+
export * from './grants.ts';
|
|
6
|
+
export * from './state-events.ts';
|
|
7
|
+
export * from './lineage.ts';
|
|
8
|
+
export * from './capabilities.ts';
|
|
9
|
+
export * from './contributes.ts';
|
|
10
|
+
export * from './definition.ts';
|
|
11
|
+
export * from './observation.ts';
|
|
12
|
+
export * from './share-link.ts';
|
|
13
|
+
export * from './subscription.ts';
|
|
14
|
+
export * from './publishing.ts';
|
|
15
|
+
export * from './dispatch.ts';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from "./component-release-ref.js";
|
|
2
|
+
export * from "./template-revision.js";
|
|
3
|
+
export * from "./instance.js";
|
|
4
|
+
export * from "./run.js";
|
|
5
|
+
export * from "./grants.js";
|
|
6
|
+
export * from "./state-events.js";
|
|
7
|
+
export * from "./lineage.js";
|
|
8
|
+
export * from "./capabilities.js";
|
|
9
|
+
export * from "./contributes.js";
|
|
10
|
+
export * from "./definition.js";
|
|
11
|
+
export * from "./observation.js";
|
|
12
|
+
export * from "./share-link.js";
|
|
13
|
+
export * from "./subscription.js";
|
|
14
|
+
export * from "./publishing.js";
|
|
15
|
+
export * from "./dispatch.js";
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AppletInstance — stable owner-scoped installation pinned to exact release
|
|
3
|
+
* and digests. The central record that grants, leases, state, and events
|
|
4
|
+
* reference.
|
|
5
|
+
*/
|
|
6
|
+
import * as z from 'zod/v4';
|
|
7
|
+
export declare const appletInstanceStatusSchema: z.ZodEnum<{
|
|
8
|
+
active: "active";
|
|
9
|
+
pending: "pending";
|
|
10
|
+
archived: "archived";
|
|
11
|
+
restricted: "restricted";
|
|
12
|
+
revoked: "revoked";
|
|
13
|
+
expired: "expired";
|
|
14
|
+
}>;
|
|
15
|
+
export declare const appletInstanceSchema: z.ZodObject<{
|
|
16
|
+
id: z.ZodUUID;
|
|
17
|
+
release: z.ZodObject<{
|
|
18
|
+
componentId: z.ZodUUID;
|
|
19
|
+
version: z.ZodString;
|
|
20
|
+
bundleHash: z.ZodString;
|
|
21
|
+
manifestHash: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
templateRevisionId: z.ZodNullable<z.ZodUUID>;
|
|
24
|
+
title: z.ZodString;
|
|
25
|
+
description: z.ZodNullable<z.ZodString>;
|
|
26
|
+
ownerType: z.ZodEnum<{
|
|
27
|
+
user: "user";
|
|
28
|
+
organization: "organization";
|
|
29
|
+
system: "system";
|
|
30
|
+
}>;
|
|
31
|
+
ownerId: z.ZodString;
|
|
32
|
+
visibility: z.ZodDefault<z.ZodEnum<{
|
|
33
|
+
public: "public";
|
|
34
|
+
private: "private";
|
|
35
|
+
org: "org";
|
|
36
|
+
}>>;
|
|
37
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
38
|
+
active: "active";
|
|
39
|
+
pending: "pending";
|
|
40
|
+
archived: "archived";
|
|
41
|
+
restricted: "restricted";
|
|
42
|
+
revoked: "revoked";
|
|
43
|
+
expired: "expired";
|
|
44
|
+
}>>;
|
|
45
|
+
definitionManifest: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
46
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
47
|
+
entrypoint: z.ZodObject<{
|
|
48
|
+
kind: z.ZodEnum<{
|
|
49
|
+
html: "html";
|
|
50
|
+
svelte: "svelte";
|
|
51
|
+
}>;
|
|
52
|
+
path: z.ZodString;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
files: z.ZodArray<z.ZodObject<{
|
|
55
|
+
path: z.ZodString;
|
|
56
|
+
mediaType: z.ZodString;
|
|
57
|
+
digest: z.ZodString;
|
|
58
|
+
size: z.ZodNumber;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
storage: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
61
|
+
id: z.ZodString;
|
|
62
|
+
authority: z.ZodDefault<z.ZodEnum<{
|
|
63
|
+
"applet-owned": "applet-owned";
|
|
64
|
+
"author-owned": "author-owned";
|
|
65
|
+
"viewer-owned": "viewer-owned";
|
|
66
|
+
}>>;
|
|
67
|
+
scope: z.ZodDefault<z.ZodEnum<{
|
|
68
|
+
instance: "instance";
|
|
69
|
+
viewer: "viewer";
|
|
70
|
+
}>>;
|
|
71
|
+
schemaVersion: z.ZodNumber;
|
|
72
|
+
recordSchema: 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>>;
|
|
73
|
+
quotaBytes: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
writeConditions: 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>>>;
|
|
75
|
+
}, z.core.$strip>>>;
|
|
76
|
+
assets: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
77
|
+
assetId: z.ZodString;
|
|
78
|
+
revision: z.ZodString;
|
|
79
|
+
digest: z.ZodString;
|
|
80
|
+
mountPath: z.ZodString;
|
|
81
|
+
}, z.core.$strip>>>;
|
|
82
|
+
composition: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
83
|
+
mode: z.ZodEnum<{
|
|
84
|
+
extends: "extends";
|
|
85
|
+
renders: "renders";
|
|
86
|
+
}>;
|
|
87
|
+
release: z.ZodObject<{
|
|
88
|
+
componentId: z.ZodUUID;
|
|
89
|
+
version: z.ZodString;
|
|
90
|
+
bundleHash: z.ZodString;
|
|
91
|
+
manifestHash: z.ZodOptional<z.ZodString>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
slot: z.ZodString;
|
|
94
|
+
props: z.ZodDefault<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>>>;
|
|
95
|
+
}, z.core.$strip>>>;
|
|
96
|
+
capabilities: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
97
|
+
tag: z.ZodString;
|
|
98
|
+
reason: z.ZodString;
|
|
99
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
100
|
+
}, z.core.$strip>>>;
|
|
101
|
+
contributes: z.ZodOptional<z.ZodObject<{
|
|
102
|
+
config: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
103
|
+
key: z.ZodString;
|
|
104
|
+
description: z.ZodString;
|
|
105
|
+
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>>;
|
|
106
|
+
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>>>;
|
|
107
|
+
secret: z.ZodDefault<z.ZodBoolean>;
|
|
108
|
+
}, z.core.$strict>>>;
|
|
109
|
+
tools: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
110
|
+
name: z.ZodString;
|
|
111
|
+
description: z.ZodString;
|
|
112
|
+
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>>;
|
|
113
|
+
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>>>;
|
|
114
|
+
impl: z.ZodObject<{
|
|
115
|
+
surface: z.ZodEnum<{
|
|
116
|
+
server: "server";
|
|
117
|
+
client: "client";
|
|
118
|
+
}>;
|
|
119
|
+
entry: z.ZodString;
|
|
120
|
+
export: z.ZodString;
|
|
121
|
+
}, z.core.$strict>;
|
|
122
|
+
requires: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
123
|
+
"storage.read": "storage.read";
|
|
124
|
+
"storage.write": "storage.write";
|
|
125
|
+
"network.fetch": "network.fetch";
|
|
126
|
+
"clipboard.read": "clipboard.read";
|
|
127
|
+
"clipboard.write": "clipboard.write";
|
|
128
|
+
"geolocation.read": "geolocation.read";
|
|
129
|
+
"notification.send": "notification.send";
|
|
130
|
+
"workboard.create": "workboard.create";
|
|
131
|
+
"workboard.update": "workboard.update";
|
|
132
|
+
"applet.snapshot.create": "applet.snapshot.create";
|
|
133
|
+
"applet.snapshot.update": "applet.snapshot.update";
|
|
134
|
+
"output.create": "output.create";
|
|
135
|
+
"output.update": "output.update";
|
|
136
|
+
}>>>;
|
|
137
|
+
}, z.core.$strict>>>;
|
|
138
|
+
cli: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
139
|
+
command: z.ZodString;
|
|
140
|
+
description: z.ZodString;
|
|
141
|
+
arguments: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
142
|
+
name: z.ZodString;
|
|
143
|
+
description: z.ZodString;
|
|
144
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
145
|
+
variadic: z.ZodDefault<z.ZodBoolean>;
|
|
146
|
+
}, z.core.$strict>>>;
|
|
147
|
+
options: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
148
|
+
flags: z.ZodString;
|
|
149
|
+
description: z.ZodString;
|
|
150
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
151
|
+
string: "string";
|
|
152
|
+
number: "number";
|
|
153
|
+
boolean: "boolean";
|
|
154
|
+
}>>;
|
|
155
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
156
|
+
}, z.core.$strict>>>;
|
|
157
|
+
impl: z.ZodObject<{
|
|
158
|
+
surface: z.ZodEnum<{
|
|
159
|
+
server: "server";
|
|
160
|
+
client: "client";
|
|
161
|
+
}>;
|
|
162
|
+
entry: z.ZodString;
|
|
163
|
+
export: z.ZodString;
|
|
164
|
+
}, z.core.$strict>;
|
|
165
|
+
requires: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
166
|
+
"storage.read": "storage.read";
|
|
167
|
+
"storage.write": "storage.write";
|
|
168
|
+
"network.fetch": "network.fetch";
|
|
169
|
+
"clipboard.read": "clipboard.read";
|
|
170
|
+
"clipboard.write": "clipboard.write";
|
|
171
|
+
"geolocation.read": "geolocation.read";
|
|
172
|
+
"notification.send": "notification.send";
|
|
173
|
+
"workboard.create": "workboard.create";
|
|
174
|
+
"workboard.update": "workboard.update";
|
|
175
|
+
"applet.snapshot.create": "applet.snapshot.create";
|
|
176
|
+
"applet.snapshot.update": "applet.snapshot.update";
|
|
177
|
+
"output.create": "output.create";
|
|
178
|
+
"output.update": "output.update";
|
|
179
|
+
}>>>;
|
|
180
|
+
}, z.core.$strict>>>;
|
|
181
|
+
events: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
182
|
+
name: z.ZodString;
|
|
183
|
+
event: z.ZodString;
|
|
184
|
+
description: z.ZodString;
|
|
185
|
+
impl: z.ZodObject<{
|
|
186
|
+
surface: z.ZodEnum<{
|
|
187
|
+
server: "server";
|
|
188
|
+
client: "client";
|
|
189
|
+
}>;
|
|
190
|
+
entry: z.ZodString;
|
|
191
|
+
export: z.ZodString;
|
|
192
|
+
}, z.core.$strict>;
|
|
193
|
+
requires: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
194
|
+
"storage.read": "storage.read";
|
|
195
|
+
"storage.write": "storage.write";
|
|
196
|
+
"network.fetch": "network.fetch";
|
|
197
|
+
"clipboard.read": "clipboard.read";
|
|
198
|
+
"clipboard.write": "clipboard.write";
|
|
199
|
+
"geolocation.read": "geolocation.read";
|
|
200
|
+
"notification.send": "notification.send";
|
|
201
|
+
"workboard.create": "workboard.create";
|
|
202
|
+
"workboard.update": "workboard.update";
|
|
203
|
+
"applet.snapshot.create": "applet.snapshot.create";
|
|
204
|
+
"applet.snapshot.update": "applet.snapshot.update";
|
|
205
|
+
"output.create": "output.create";
|
|
206
|
+
"output.update": "output.update";
|
|
207
|
+
}>>>;
|
|
208
|
+
}, z.core.$strict>>>;
|
|
209
|
+
}, z.core.$strict>>;
|
|
210
|
+
serverActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
211
|
+
id: z.ZodString;
|
|
212
|
+
principal: z.ZodEnum<{
|
|
213
|
+
author: "author";
|
|
214
|
+
viewer: "viewer";
|
|
215
|
+
}>;
|
|
216
|
+
handler: z.ZodObject<{
|
|
217
|
+
entry: z.ZodString;
|
|
218
|
+
export: z.ZodString;
|
|
219
|
+
surface: z.ZodLiteral<"server">;
|
|
220
|
+
}, z.core.$strict>;
|
|
221
|
+
policy: z.ZodDefault<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>>>;
|
|
222
|
+
}, z.core.$strict>>>;
|
|
223
|
+
}, z.core.$strip>>>;
|
|
224
|
+
stateRevision: z.ZodDefault<z.ZodNumber>;
|
|
225
|
+
createdAt: z.ZodDate;
|
|
226
|
+
updatedAt: z.ZodDate;
|
|
227
|
+
}, z.core.$strip>;
|
|
228
|
+
export type AppletInstance = z.infer<typeof appletInstanceSchema>;
|
|
229
|
+
export type AppletInstanceStatus = z.infer<typeof appletInstanceStatusSchema>;
|
|
230
|
+
//# sourceMappingURL=instance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../../src/schemas/instance.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAI5B,eAAO,MAAM,0BAA0B;;;;;;;EAOrC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0B/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AppletInstance — stable owner-scoped installation pinned to exact release
|
|
3
|
+
* and digests. The central record that grants, leases, state, and events
|
|
4
|
+
* reference.
|
|
5
|
+
*/
|
|
6
|
+
import * as z from 'zod/v4';
|
|
7
|
+
import { componentReleaseRefSchema } from "./component-release-ref.js";
|
|
8
|
+
import { appletDefinitionManifestSchema } from "./definition.js";
|
|
9
|
+
export const appletInstanceStatusSchema = z.enum([
|
|
10
|
+
'pending',
|
|
11
|
+
'active',
|
|
12
|
+
'restricted',
|
|
13
|
+
'revoked',
|
|
14
|
+
'expired',
|
|
15
|
+
'archived'
|
|
16
|
+
]);
|
|
17
|
+
export const appletInstanceSchema = z.object({
|
|
18
|
+
id: z.uuid(),
|
|
19
|
+
/** Exact release this instance is pinned to. */
|
|
20
|
+
release: componentReleaseRefSchema,
|
|
21
|
+
/** Template revision this instance was created from, if any. */
|
|
22
|
+
templateRevisionId: z.uuid().nullable(),
|
|
23
|
+
title: z.string().min(1).max(200),
|
|
24
|
+
description: z.string().nullable(),
|
|
25
|
+
ownerType: z.enum(['user', 'organization', 'system']),
|
|
26
|
+
ownerId: z.string(),
|
|
27
|
+
visibility: z.enum(['private', 'org', 'public']).default('private'),
|
|
28
|
+
status: appletInstanceStatusSchema.default('pending'),
|
|
29
|
+
/**
|
|
30
|
+
* The Applet definition manifest this instance runs under.
|
|
31
|
+
*
|
|
32
|
+
* Nullable because instances predate it. Without a stored manifest the host
|
|
33
|
+
* cannot know what a release declares — which storage it owns, which
|
|
34
|
+
* capabilities it requests, or what it contributes — so contribution
|
|
35
|
+
* registration and consent have nothing to read. `manifest_hash` alone
|
|
36
|
+
* identifies a manifest without containing one.
|
|
37
|
+
*/
|
|
38
|
+
definitionManifest: appletDefinitionManifestSchema.nullable().optional(),
|
|
39
|
+
/** Current shared state revision (optimistic concurrency). */
|
|
40
|
+
stateRevision: z.number().int().nonnegative().default(0),
|
|
41
|
+
createdAt: z.date(),
|
|
42
|
+
updatedAt: z.date()
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=instance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance.js","sourceRoot":"","sources":["../../src/schemas/instance.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAEjE,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,IAAI,CAAC;IAChD,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,SAAS;IACT,SAAS;IACT,UAAU;CACV,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE;IACZ,gDAAgD;IAChD,OAAO,EAAE,yBAAyB;IAClC,gEAAgE;IAChE,kBAAkB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACvC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACjC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC;IACrD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IACnE,MAAM,EAAE,0BAA0B,CAAC,OAAO,CAAC,SAAS,CAAC;IACrD;;;;;;;;OAQG;IACH,kBAAkB,EAAE,8BAA8B,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACxE,8DAA8D;IAC9D,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACxD,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE;IACnB,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE;CACnB,CAAC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lineage edges and projection receipts.
|
|
3
|
+
*
|
|
4
|
+
* Lineage records the provenance of each applet: instantiate, duplicate,
|
|
5
|
+
* remix, copy/import, migrate, or adopt. Each edge is immutable.
|
|
6
|
+
*
|
|
7
|
+
* Projection receipts track idempotent delivery of selected events to
|
|
8
|
+
* Workboard, Outputs, or notifications. Applet state remains canonical;
|
|
9
|
+
* projections are derived.
|
|
10
|
+
*/
|
|
11
|
+
import * as z from 'zod/v4';
|
|
12
|
+
export declare const appletLineageEdgeTypeSchema: z.ZodEnum<{
|
|
13
|
+
duplicate: "duplicate";
|
|
14
|
+
migrate: "migrate";
|
|
15
|
+
instantiate: "instantiate";
|
|
16
|
+
remix: "remix";
|
|
17
|
+
copy_import: "copy_import";
|
|
18
|
+
adopt: "adopt";
|
|
19
|
+
}>;
|
|
20
|
+
export declare const appletLineageEdgeSchema: z.ZodObject<{
|
|
21
|
+
id: z.ZodUUID;
|
|
22
|
+
targetInstanceId: z.ZodUUID;
|
|
23
|
+
sourceInstanceId: z.ZodNullable<z.ZodUUID>;
|
|
24
|
+
sourceReleaseId: z.ZodNullable<z.ZodUUID>;
|
|
25
|
+
edgeType: z.ZodEnum<{
|
|
26
|
+
duplicate: "duplicate";
|
|
27
|
+
migrate: "migrate";
|
|
28
|
+
instantiate: "instantiate";
|
|
29
|
+
remix: "remix";
|
|
30
|
+
copy_import: "copy_import";
|
|
31
|
+
adopt: "adopt";
|
|
32
|
+
}>;
|
|
33
|
+
sourceCheckpointId: z.ZodNullable<z.ZodUUID>;
|
|
34
|
+
createdAt: z.ZodDate;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export declare const appletProjectionTargetSchema: z.ZodEnum<{
|
|
37
|
+
output: "output";
|
|
38
|
+
notification: "notification";
|
|
39
|
+
workboard: "workboard";
|
|
40
|
+
applet_snapshot: "applet_snapshot";
|
|
41
|
+
}>;
|
|
42
|
+
export declare const appletProjectionReceiptSchema: z.ZodObject<{
|
|
43
|
+
id: z.ZodUUID;
|
|
44
|
+
instanceId: z.ZodUUID;
|
|
45
|
+
eventId: z.ZodUUID;
|
|
46
|
+
target: z.ZodEnum<{
|
|
47
|
+
output: "output";
|
|
48
|
+
notification: "notification";
|
|
49
|
+
workboard: "workboard";
|
|
50
|
+
applet_snapshot: "applet_snapshot";
|
|
51
|
+
}>;
|
|
52
|
+
targetReceiptId: z.ZodString;
|
|
53
|
+
delivered: z.ZodBoolean;
|
|
54
|
+
createdAt: z.ZodDate;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
export type AppletLineageEdgeType = z.infer<typeof appletLineageEdgeTypeSchema>;
|
|
57
|
+
export type AppletLineageEdge = z.infer<typeof appletLineageEdgeSchema>;
|
|
58
|
+
export type AppletProjectionTarget = z.infer<typeof appletProjectionTargetSchema>;
|
|
59
|
+
export type AppletProjectionReceipt = z.infer<typeof appletProjectionReceiptSchema>;
|
|
60
|
+
//# sourceMappingURL=lineage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineage.d.ts","sourceRoot":"","sources":["../../src/schemas/lineage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,eAAO,MAAM,2BAA2B;;;;;;;EAOtC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;iBAWlC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;EAMvC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;iBAYxC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lineage edges and projection receipts.
|
|
3
|
+
*
|
|
4
|
+
* Lineage records the provenance of each applet: instantiate, duplicate,
|
|
5
|
+
* remix, copy/import, migrate, or adopt. Each edge is immutable.
|
|
6
|
+
*
|
|
7
|
+
* Projection receipts track idempotent delivery of selected events to
|
|
8
|
+
* Workboard, Outputs, or notifications. Applet state remains canonical;
|
|
9
|
+
* projections are derived.
|
|
10
|
+
*/
|
|
11
|
+
import * as z from 'zod/v4';
|
|
12
|
+
export const appletLineageEdgeTypeSchema = z.enum([
|
|
13
|
+
'instantiate',
|
|
14
|
+
'duplicate',
|
|
15
|
+
'remix',
|
|
16
|
+
'copy_import',
|
|
17
|
+
'migrate',
|
|
18
|
+
'adopt'
|
|
19
|
+
]);
|
|
20
|
+
export const appletLineageEdgeSchema = z.object({
|
|
21
|
+
id: z.uuid(),
|
|
22
|
+
/** The instance this edge points TO (the new instance). */
|
|
23
|
+
targetInstanceId: z.uuid(),
|
|
24
|
+
/** The instance or release this edge points FROM (the source). */
|
|
25
|
+
sourceInstanceId: z.uuid().nullable(),
|
|
26
|
+
sourceReleaseId: z.uuid().nullable(),
|
|
27
|
+
edgeType: appletLineageEdgeTypeSchema,
|
|
28
|
+
/** Checkpoint used as the duplication source, if any. */
|
|
29
|
+
sourceCheckpointId: z.uuid().nullable(),
|
|
30
|
+
createdAt: z.date()
|
|
31
|
+
});
|
|
32
|
+
export const appletProjectionTargetSchema = z.enum([
|
|
33
|
+
'workboard',
|
|
34
|
+
'applet_snapshot',
|
|
35
|
+
/** @deprecated Persistence compatibility only; use applet_snapshot. */
|
|
36
|
+
'output',
|
|
37
|
+
'notification'
|
|
38
|
+
]);
|
|
39
|
+
export const appletProjectionReceiptSchema = z.object({
|
|
40
|
+
id: z.uuid(),
|
|
41
|
+
instanceId: z.uuid(),
|
|
42
|
+
/** The event being projected. */
|
|
43
|
+
eventId: z.uuid(),
|
|
44
|
+
/** Where the event was projected to. */
|
|
45
|
+
target: appletProjectionTargetSchema,
|
|
46
|
+
/** Idempotency key — the target's receipt id. */
|
|
47
|
+
targetReceiptId: z.string().min(1),
|
|
48
|
+
/** Whether the projection was delivered or was a duplicate. */
|
|
49
|
+
delivered: z.boolean(),
|
|
50
|
+
createdAt: z.date()
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=lineage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineage.js","sourceRoot":"","sources":["../../src/schemas/lineage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,IAAI,CAAC;IACjD,aAAa;IACb,WAAW;IACX,OAAO;IACP,aAAa;IACb,SAAS;IACT,OAAO;CACP,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE;IACZ,2DAA2D;IAC3D,gBAAgB,EAAE,CAAC,CAAC,IAAI,EAAE;IAC1B,kEAAkE;IAClE,gBAAgB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACrC,eAAe,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACpC,QAAQ,EAAE,2BAA2B;IACrC,yDAAyD;IACzD,kBAAkB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACvC,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE;CACnB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,IAAI,CAAC;IAClD,WAAW;IACX,iBAAiB;IACjB,uEAAuE;IACvE,QAAQ;IACR,cAAc;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE;IACZ,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE;IACpB,iCAAiC;IACjC,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE;IACjB,wCAAwC;IACxC,MAAM,EAAE,4BAA4B;IACpC,iDAAiD;IACjD,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAClC,+DAA+D;IAC/D,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE;CACnB,CAAC,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Observation ledger — what a subscribed Applet actually did.
|
|
3
|
+
*
|
|
4
|
+
* The receipts half of "trusted, with receipts". Cloudflare OS gates every write
|
|
5
|
+
* behind human approval; we record instead, and gate only at real tenancy
|
|
6
|
+
* boundaries. That trade is only honest if the recording is real and cheap, so
|
|
7
|
+
* an observation is appended on every AUTHORIZED-or-DENIED capability dispatch —
|
|
8
|
+
* successes and refusals alike (see SCOPE below).
|
|
9
|
+
*
|
|
10
|
+
* A refusal is the more interesting row. "Nothing happened" and "something was
|
|
11
|
+
* stopped" look identical in a system that only logs successes, and the second
|
|
12
|
+
* is what tells you an applet is probing.
|
|
13
|
+
*
|
|
14
|
+
* SCOPE, stated precisely because "every dispatch" was too strong: an
|
|
15
|
+
* observation is recorded once a dispatch has been AUTHORIZED or DENIED — that
|
|
16
|
+
* is, once there is a subscription and grant to attribute it to. Failures before
|
|
17
|
+
* that point (a malformed correlation id, non-cloneable arguments, a missing
|
|
18
|
+
* lease) throw without a row, because there is no authority context to record
|
|
19
|
+
* against and inventing one would put fiction in the ledger. A host-side timeout
|
|
20
|
+
* likewise records nothing today; that is a genuine gap, not a design choice.
|
|
21
|
+
*/
|
|
22
|
+
import * as z from 'zod/v4';
|
|
23
|
+
import { componentReleaseRefSchema } from './component-release-ref.ts';
|
|
24
|
+
export declare const appletObservationOutcomeSchema: z.ZodEnum<{
|
|
25
|
+
denied: "denied";
|
|
26
|
+
failed: "failed";
|
|
27
|
+
allowed: "allowed";
|
|
28
|
+
}>;
|
|
29
|
+
export declare const appletObservationSchema: z.ZodObject<{
|
|
30
|
+
id: z.ZodUUID;
|
|
31
|
+
instanceId: z.ZodUUID;
|
|
32
|
+
subscriptionId: z.ZodNullable<z.ZodUUID>;
|
|
33
|
+
capabilityGrantId: z.ZodNullable<z.ZodUUID>;
|
|
34
|
+
release: z.ZodObject<{
|
|
35
|
+
componentId: z.ZodUUID;
|
|
36
|
+
version: z.ZodString;
|
|
37
|
+
bundleHash: z.ZodString;
|
|
38
|
+
manifestHash: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
registrationId: z.ZodNullable<z.ZodString>;
|
|
41
|
+
capabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
42
|
+
outcome: z.ZodEnum<{
|
|
43
|
+
denied: "denied";
|
|
44
|
+
failed: "failed";
|
|
45
|
+
allowed: "allowed";
|
|
46
|
+
}>;
|
|
47
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
48
|
+
viewerUserId: z.ZodNullable<z.ZodString>;
|
|
49
|
+
viewerOrgId: z.ZodNullable<z.ZodString>;
|
|
50
|
+
occurredAt: z.ZodDate;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
export type AppletObservationOutcome = z.infer<typeof appletObservationOutcomeSchema>;
|
|
53
|
+
export type AppletObservation = z.infer<typeof appletObservationSchema>;
|
|
54
|
+
/** What the dispatch boundary records. The host supplies identity and time. */
|
|
55
|
+
export interface AppletObservationInput {
|
|
56
|
+
instanceId: string;
|
|
57
|
+
subscriptionId: string | null;
|
|
58
|
+
capabilityGrantId: string | null;
|
|
59
|
+
release: z.infer<typeof componentReleaseRefSchema>;
|
|
60
|
+
registrationId: string | null;
|
|
61
|
+
capabilities: readonly string[];
|
|
62
|
+
outcome: AppletObservationOutcome;
|
|
63
|
+
reason: string | null;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Appends an observation. Deliberately returns void and is never awaited for its
|
|
67
|
+
* value: a ledger that can fail a dispatch is a ledger someone will disable.
|
|
68
|
+
*/
|
|
69
|
+
export type AppletObservationRecorder = (observation: AppletObservationInput) => void;
|
|
70
|
+
//# sourceMappingURL=observation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observation.d.ts","sourceRoot":"","sources":["../../src/schemas/observation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,eAAO,MAAM,8BAA8B;;;;EAA0C,CAAC;AAEtF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;iBAuBlC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,+EAA+E;AAC/E,MAAM,WAAW,sBAAsB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;IACnD,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,OAAO,EAAE,wBAAwB,CAAC;IAClC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,WAAW,EAAE,sBAAsB,KAAK,IAAI,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Observation ledger — what a subscribed Applet actually did.
|
|
3
|
+
*
|
|
4
|
+
* The receipts half of "trusted, with receipts". Cloudflare OS gates every write
|
|
5
|
+
* behind human approval; we record instead, and gate only at real tenancy
|
|
6
|
+
* boundaries. That trade is only honest if the recording is real and cheap, so
|
|
7
|
+
* an observation is appended on every AUTHORIZED-or-DENIED capability dispatch —
|
|
8
|
+
* successes and refusals alike (see SCOPE below).
|
|
9
|
+
*
|
|
10
|
+
* A refusal is the more interesting row. "Nothing happened" and "something was
|
|
11
|
+
* stopped" look identical in a system that only logs successes, and the second
|
|
12
|
+
* is what tells you an applet is probing.
|
|
13
|
+
*
|
|
14
|
+
* SCOPE, stated precisely because "every dispatch" was too strong: an
|
|
15
|
+
* observation is recorded once a dispatch has been AUTHORIZED or DENIED — that
|
|
16
|
+
* is, once there is a subscription and grant to attribute it to. Failures before
|
|
17
|
+
* that point (a malformed correlation id, non-cloneable arguments, a missing
|
|
18
|
+
* lease) throw without a row, because there is no authority context to record
|
|
19
|
+
* against and inventing one would put fiction in the ledger. A host-side timeout
|
|
20
|
+
* likewise records nothing today; that is a genuine gap, not a design choice.
|
|
21
|
+
*/
|
|
22
|
+
import * as z from 'zod/v4';
|
|
23
|
+
import { componentReleaseRefSchema } from "./component-release-ref.js";
|
|
24
|
+
export const appletObservationOutcomeSchema = z.enum(['allowed', 'denied', 'failed']);
|
|
25
|
+
export const appletObservationSchema = z.object({
|
|
26
|
+
id: z.uuid(),
|
|
27
|
+
instanceId: z.uuid(),
|
|
28
|
+
/** The subscription this ran under, when the call came through one. */
|
|
29
|
+
subscriptionId: z.uuid().nullable(),
|
|
30
|
+
/** The grant that authority was checked against. */
|
|
31
|
+
capabilityGrantId: z.uuid().nullable(),
|
|
32
|
+
release: componentReleaseRefSchema,
|
|
33
|
+
/** Host-assigned registration id, e.g. `applet.notes.tool.summarize`. */
|
|
34
|
+
registrationId: z.string().min(1).max(200).nullable(),
|
|
35
|
+
/** Capability tags the call required. Empty for a contribution needing none. */
|
|
36
|
+
capabilities: z.array(z.string().min(1).max(128)).max(16).default([]),
|
|
37
|
+
outcome: appletObservationOutcomeSchema,
|
|
38
|
+
/**
|
|
39
|
+
* Why, for a denial. A stable machine reason from
|
|
40
|
+
* `AppletAuthorizationDenial` — never applet-supplied text, which would put
|
|
41
|
+
* attacker-chosen strings into an operator's ledger.
|
|
42
|
+
*/
|
|
43
|
+
reason: z.string().min(1).max(120).nullable(),
|
|
44
|
+
/** Server-derived viewer identity at call time. */
|
|
45
|
+
viewerUserId: z.string().nullable(),
|
|
46
|
+
viewerOrgId: z.string().nullable(),
|
|
47
|
+
occurredAt: z.date()
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=observation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observation.js","sourceRoot":"","sources":["../../src/schemas/observation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEtF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE;IACZ,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE;IACpB,uEAAuE;IACvE,cAAc,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACnC,oDAAoD;IACpD,iBAAiB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACtC,OAAO,EAAE,yBAAyB;IAClC,yEAAyE;IACzE,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACrD,gFAAgF;IAChF,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACrE,OAAO,EAAE,8BAA8B;IACvC;;;;OAIG;IACH,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAC7C,mDAAmD;IACnD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE;CACpB,CAAC,CAAC"}
|