@mostra/protocol 0.0.0-stage → 0.1.0
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 +202 -0
- package/README.md +38 -2
- package/dist/actions.d.ts +273 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +154 -0
- package/dist/actions.js.map +1 -0
- package/dist/artifact.d.ts +113 -0
- package/dist/artifact.d.ts.map +1 -0
- package/dist/artifact.js +79 -0
- package/dist/artifact.js.map +1 -0
- package/dist/bridge.d.ts +295 -0
- package/dist/bridge.d.ts.map +1 -0
- package/dist/bridge.js +343 -0
- package/dist/bridge.js.map +1 -0
- package/dist/browser.d.ts +195 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +156 -0
- package/dist/browser.js.map +1 -0
- package/dist/bundle.d.ts +155 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/bundle.js +130 -0
- package/dist/bundle.js.map +1 -0
- package/dist/canonical.d.ts +23 -0
- package/dist/canonical.d.ts.map +1 -0
- package/dist/canonical.js +45 -0
- package/dist/canonical.js.map +1 -0
- package/dist/capability.d.ts +38 -0
- package/dist/capability.d.ts.map +1 -0
- package/dist/capability.js +61 -0
- package/dist/capability.js.map +1 -0
- package/dist/diagnostics/codes/a11y.d.ts +8 -0
- package/dist/diagnostics/codes/a11y.d.ts.map +1 -0
- package/dist/diagnostics/codes/a11y.js +30 -0
- package/dist/diagnostics/codes/a11y.js.map +1 -0
- package/dist/diagnostics/codes/action.d.ts +8 -0
- package/dist/diagnostics/codes/action.d.ts.map +1 -0
- package/dist/diagnostics/codes/action.js +110 -0
- package/dist/diagnostics/codes/action.js.map +1 -0
- package/dist/diagnostics/codes/artifact.d.ts +8 -0
- package/dist/diagnostics/codes/artifact.d.ts.map +1 -0
- package/dist/diagnostics/codes/artifact.js +121 -0
- package/dist/diagnostics/codes/artifact.js.map +1 -0
- package/dist/diagnostics/codes/build.d.ts +8 -0
- package/dist/diagnostics/codes/build.d.ts.map +1 -0
- package/dist/diagnostics/codes/build.js +55 -0
- package/dist/diagnostics/codes/build.js.map +1 -0
- package/dist/diagnostics/codes/cli.d.ts +8 -0
- package/dist/diagnostics/codes/cli.d.ts.map +1 -0
- package/dist/diagnostics/codes/cli.js +44 -0
- package/dist/diagnostics/codes/cli.js.map +1 -0
- package/dist/diagnostics/codes/console.d.ts +8 -0
- package/dist/diagnostics/codes/console.d.ts.map +1 -0
- package/dist/diagnostics/codes/console.js +30 -0
- package/dist/diagnostics/codes/console.js.map +1 -0
- package/dist/diagnostics/codes/dep.d.ts +8 -0
- package/dist/diagnostics/codes/dep.d.ts.map +1 -0
- package/dist/diagnostics/codes/dep.js +88 -0
- package/dist/diagnostics/codes/dep.js.map +1 -0
- package/dist/diagnostics/codes/env.d.ts +8 -0
- package/dist/diagnostics/codes/env.d.ts.map +1 -0
- package/dist/diagnostics/codes/env.js +132 -0
- package/dist/diagnostics/codes/env.js.map +1 -0
- package/dist/diagnostics/codes/field.d.ts +8 -0
- package/dist/diagnostics/codes/field.d.ts.map +1 -0
- package/dist/diagnostics/codes/field.js +99 -0
- package/dist/diagnostics/codes/field.js.map +1 -0
- package/dist/diagnostics/codes/home.d.ts +8 -0
- package/dist/diagnostics/codes/home.d.ts.map +1 -0
- package/dist/diagnostics/codes/home.js +132 -0
- package/dist/diagnostics/codes/home.js.map +1 -0
- package/dist/diagnostics/codes/host.d.ts +8 -0
- package/dist/diagnostics/codes/host.d.ts.map +1 -0
- package/dist/diagnostics/codes/host.js +176 -0
- package/dist/diagnostics/codes/host.js.map +1 -0
- package/dist/diagnostics/codes/hygiene.d.ts +8 -0
- package/dist/diagnostics/codes/hygiene.d.ts.map +1 -0
- package/dist/diagnostics/codes/hygiene.js +154 -0
- package/dist/diagnostics/codes/hygiene.js.map +1 -0
- package/dist/diagnostics/codes/index.d.ts +51 -0
- package/dist/diagnostics/codes/index.d.ts.map +1 -0
- package/dist/diagnostics/codes/index.js +72 -0
- package/dist/diagnostics/codes/index.js.map +1 -0
- package/dist/diagnostics/codes/live.d.ts +8 -0
- package/dist/diagnostics/codes/live.d.ts.map +1 -0
- package/dist/diagnostics/codes/live.js +30 -0
- package/dist/diagnostics/codes/live.js.map +1 -0
- package/dist/diagnostics/codes/manifest.d.ts +8 -0
- package/dist/diagnostics/codes/manifest.d.ts.map +1 -0
- package/dist/diagnostics/codes/manifest.js +44 -0
- package/dist/diagnostics/codes/manifest.js.map +1 -0
- package/dist/diagnostics/codes/network.d.ts +8 -0
- package/dist/diagnostics/codes/network.d.ts.map +1 -0
- package/dist/diagnostics/codes/network.js +30 -0
- package/dist/diagnostics/codes/network.js.map +1 -0
- package/dist/diagnostics/codes/platform.d.ts +8 -0
- package/dist/diagnostics/codes/platform.d.ts.map +1 -0
- package/dist/diagnostics/codes/platform.js +18 -0
- package/dist/diagnostics/codes/platform.js.map +1 -0
- package/dist/diagnostics/codes/publish.d.ts +8 -0
- package/dist/diagnostics/codes/publish.d.ts.map +1 -0
- package/dist/diagnostics/codes/publish.js +44 -0
- package/dist/diagnostics/codes/publish.js.map +1 -0
- package/dist/diagnostics/codes/regression.d.ts +8 -0
- package/dist/diagnostics/codes/regression.d.ts.map +1 -0
- package/dist/diagnostics/codes/regression.js +77 -0
- package/dist/diagnostics/codes/regression.js.map +1 -0
- package/dist/diagnostics/codes/runtime.d.ts +8 -0
- package/dist/diagnostics/codes/runtime.d.ts.map +1 -0
- package/dist/diagnostics/codes/runtime.js +66 -0
- package/dist/diagnostics/codes/runtime.js.map +1 -0
- package/dist/diagnostics/codes/secret.d.ts +8 -0
- package/dist/diagnostics/codes/secret.d.ts.map +1 -0
- package/dist/diagnostics/codes/secret.js +18 -0
- package/dist/diagnostics/codes/secret.js.map +1 -0
- package/dist/diagnostics/codes/smoke.d.ts +8 -0
- package/dist/diagnostics/codes/smoke.d.ts.map +1 -0
- package/dist/diagnostics/codes/smoke.js +30 -0
- package/dist/diagnostics/codes/smoke.js.map +1 -0
- package/dist/diagnostics/codes/submit.d.ts +8 -0
- package/dist/diagnostics/codes/submit.d.ts.map +1 -0
- package/dist/diagnostics/codes/submit.js +99 -0
- package/dist/diagnostics/codes/submit.js.map +1 -0
- package/dist/diagnostics/codes/target.d.ts +8 -0
- package/dist/diagnostics/codes/target.d.ts.map +1 -0
- package/dist/diagnostics/codes/target.js +18 -0
- package/dist/diagnostics/codes/target.js.map +1 -0
- package/dist/diagnostics/codes/type.d.ts +8 -0
- package/dist/diagnostics/codes/type.d.ts.map +1 -0
- package/dist/diagnostics/codes/type.js +30 -0
- package/dist/diagnostics/codes/type.js.map +1 -0
- package/dist/diagnostics/codes/verify.d.ts +8 -0
- package/dist/diagnostics/codes/verify.d.ts.map +1 -0
- package/dist/diagnostics/codes/verify.js +99 -0
- package/dist/diagnostics/codes/verify.js.map +1 -0
- package/dist/diagnostics/diagnostic.d.ts +79 -0
- package/dist/diagnostics/diagnostic.d.ts.map +1 -0
- package/dist/diagnostics/diagnostic.js +131 -0
- package/dist/diagnostics/diagnostic.js.map +1 -0
- package/dist/diagnostics/spec.d.ts +49 -0
- package/dist/diagnostics/spec.d.ts.map +1 -0
- package/dist/diagnostics/spec.js +31 -0
- package/dist/diagnostics/spec.js.map +1 -0
- package/dist/hygiene.d.ts +66 -0
- package/dist/hygiene.d.ts.map +1 -0
- package/dist/hygiene.js +134 -0
- package/dist/hygiene.js.map +1 -0
- package/dist/ids.d.ts +119 -0
- package/dist/ids.d.ts.map +1 -0
- package/dist/ids.js +135 -0
- package/dist/ids.js.map +1 -0
- package/dist/index.d.ts +86 -0
- package/dist/index.js +86 -0
- package/dist/interaction.d.ts +391 -0
- package/dist/interaction.d.ts.map +1 -0
- package/dist/interaction.js +306 -0
- package/dist/interaction.js.map +1 -0
- package/dist/manifest.d.ts +97 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +101 -0
- package/dist/manifest.js.map +1 -0
- package/dist/method.d.ts +26 -0
- package/dist/method.d.ts.map +1 -0
- package/dist/method.js +10 -0
- package/dist/method.js.map +1 -0
- package/dist/methods/artifact/create.d.ts +29 -0
- package/dist/methods/artifact/create.d.ts.map +1 -0
- package/dist/methods/artifact/create.js +31 -0
- package/dist/methods/artifact/create.js.map +1 -0
- package/dist/methods/artifact/get.d.ts +17 -0
- package/dist/methods/artifact/get.d.ts.map +1 -0
- package/dist/methods/artifact/get.js +21 -0
- package/dist/methods/artifact/get.js.map +1 -0
- package/dist/methods/artifact/list.d.ts +22 -0
- package/dist/methods/artifact/list.d.ts.map +1 -0
- package/dist/methods/artifact/list.js +19 -0
- package/dist/methods/artifact/list.js.map +1 -0
- package/dist/methods/artifact/publish.d.ts +28 -0
- package/dist/methods/artifact/publish.d.ts.map +1 -0
- package/dist/methods/artifact/publish.js +28 -0
- package/dist/methods/artifact/publish.js.map +1 -0
- package/dist/methods/artifact/verify.d.ts +29 -0
- package/dist/methods/artifact/verify.d.ts.map +1 -0
- package/dist/methods/artifact/verify.js +27 -0
- package/dist/methods/artifact/verify.js.map +1 -0
- package/dist/methods/deps/add.d.ts +43 -0
- package/dist/methods/deps/add.d.ts.map +1 -0
- package/dist/methods/deps/add.js +40 -0
- package/dist/methods/deps/add.js.map +1 -0
- package/dist/methods/dev/start.d.ts +52 -0
- package/dist/methods/dev/start.d.ts.map +1 -0
- package/dist/methods/dev/start.js +56 -0
- package/dist/methods/dev/start.js.map +1 -0
- package/dist/methods/dev/stop.d.ts +16 -0
- package/dist/methods/dev/stop.d.ts.map +1 -0
- package/dist/methods/dev/stop.js +21 -0
- package/dist/methods/dev/stop.js.map +1 -0
- package/dist/methods/events/ack.d.ts +20 -0
- package/dist/methods/events/ack.d.ts.map +1 -0
- package/dist/methods/events/ack.js +26 -0
- package/dist/methods/events/ack.js.map +1 -0
- package/dist/methods/events/read.d.ts +40 -0
- package/dist/methods/events/read.d.ts.map +1 -0
- package/dist/methods/events/read.js +35 -0
- package/dist/methods/events/read.js.map +1 -0
- package/dist/methods/events/subscribe.d.ts +54 -0
- package/dist/methods/events/subscribe.d.ts.map +1 -0
- package/dist/methods/events/subscribe.js +44 -0
- package/dist/methods/events/subscribe.js.map +1 -0
- package/dist/methods/events/unsubscribe.d.ts +16 -0
- package/dist/methods/events/unsubscribe.d.ts.map +1 -0
- package/dist/methods/events/unsubscribe.js +21 -0
- package/dist/methods/events/unsubscribe.js.map +1 -0
- package/dist/methods/gc/run.d.ts +76 -0
- package/dist/methods/gc/run.d.ts.map +1 -0
- package/dist/methods/gc/run.js +56 -0
- package/dist/methods/gc/run.js.map +1 -0
- package/dist/methods/index.d.ts +6 -0
- package/dist/methods/index.d.ts.map +1 -0
- package/dist/methods/index.js +78 -0
- package/dist/methods/index.js.map +1 -0
- package/dist/methods/instance/check.d.ts +30 -0
- package/dist/methods/instance/check.d.ts.map +1 -0
- package/dist/methods/instance/check.js +34 -0
- package/dist/methods/instance/check.js.map +1 -0
- package/dist/methods/instance/status.d.ts +102 -0
- package/dist/methods/instance/status.d.ts.map +1 -0
- package/dist/methods/instance/status.js +83 -0
- package/dist/methods/instance/status.js.map +1 -0
- package/dist/methods/live/push.d.ts +28 -0
- package/dist/methods/live/push.d.ts.map +1 -0
- package/dist/methods/live/push.js +35 -0
- package/dist/methods/live/push.js.map +1 -0
- package/dist/methods/mostra/initialize.d.ts +143 -0
- package/dist/methods/mostra/initialize.d.ts.map +1 -0
- package/dist/methods/mostra/initialize.js +97 -0
- package/dist/methods/mostra/initialize.js.map +1 -0
- package/dist/methods/mostra/shutdown.d.ts +14 -0
- package/dist/methods/mostra/shutdown.d.ts.map +1 -0
- package/dist/methods/mostra/shutdown.js +22 -0
- package/dist/methods/mostra/shutdown.js.map +1 -0
- package/dist/methods/port/drafts-mirror.d.ts +30 -0
- package/dist/methods/port/drafts-mirror.d.ts.map +1 -0
- package/dist/methods/port/drafts-mirror.js +33 -0
- package/dist/methods/port/drafts-mirror.js.map +1 -0
- package/dist/methods/port/secrets-get.d.ts +19 -0
- package/dist/methods/port/secrets-get.d.ts.map +1 -0
- package/dist/methods/port/secrets-get.js +31 -0
- package/dist/methods/port/secrets-get.js.map +1 -0
- package/dist/methods/port/submissions-deliver.d.ts +38 -0
- package/dist/methods/port/submissions-deliver.d.ts.map +1 -0
- package/dist/methods/port/submissions-deliver.js +38 -0
- package/dist/methods/port/submissions-deliver.js.map +1 -0
- package/dist/methods/port/trusted-controls-activated.d.ts +27 -0
- package/dist/methods/port/trusted-controls-activated.d.ts.map +1 -0
- package/dist/methods/port/trusted-controls-activated.js +33 -0
- package/dist/methods/port/trusted-controls-activated.js.map +1 -0
- package/dist/methods/port/trusted-controls-policy.d.ts +21 -0
- package/dist/methods/port/trusted-controls-policy.d.ts.map +1 -0
- package/dist/methods/port/trusted-controls-policy.js +27 -0
- package/dist/methods/port/trusted-controls-policy.js.map +1 -0
- package/dist/methods/results/get.d.ts +32 -0
- package/dist/methods/results/get.d.ts.map +1 -0
- package/dist/methods/results/get.js +36 -0
- package/dist/methods/results/get.js.map +1 -0
- package/dist/methods/secret/delete.d.ts +22 -0
- package/dist/methods/secret/delete.d.ts.map +1 -0
- package/dist/methods/secret/delete.js +32 -0
- package/dist/methods/secret/delete.js.map +1 -0
- package/dist/methods/secret/list.d.ts +21 -0
- package/dist/methods/secret/list.d.ts.map +1 -0
- package/dist/methods/secret/list.js +29 -0
- package/dist/methods/secret/list.js.map +1 -0
- package/dist/methods/secret/set.d.ts +37 -0
- package/dist/methods/secret/set.d.ts.map +1 -0
- package/dist/methods/secret/set.js +41 -0
- package/dist/methods/secret/set.js.map +1 -0
- package/dist/methods/state/get.d.ts +25 -0
- package/dist/methods/state/get.d.ts.map +1 -0
- package/dist/methods/state/get.js +29 -0
- package/dist/methods/state/get.js.map +1 -0
- package/dist/methods/state/patch.d.ts +32 -0
- package/dist/methods/state/patch.d.ts.map +1 -0
- package/dist/methods/state/patch.js +29 -0
- package/dist/methods/state/patch.js.map +1 -0
- package/dist/methods/view/default.d.ts +19 -0
- package/dist/methods/view/default.d.ts.map +1 -0
- package/dist/methods/view/default.js +23 -0
- package/dist/methods/view/default.js.map +1 -0
- package/dist/methods/view/launch.d.ts +27 -0
- package/dist/methods/view/launch.d.ts.map +1 -0
- package/dist/methods/view/launch.js +30 -0
- package/dist/methods/view/launch.js.map +1 -0
- package/dist/methods/view/revoke.d.ts +19 -0
- package/dist/methods/view/revoke.d.ts.map +1 -0
- package/dist/methods/view/revoke.js +26 -0
- package/dist/methods/view/revoke.js.map +1 -0
- package/dist/methods/view/rotate.d.ts +21 -0
- package/dist/methods/view/rotate.d.ts.map +1 -0
- package/dist/methods/view/rotate.js +27 -0
- package/dist/methods/view/rotate.js.map +1 -0
- package/dist/methods/view/url.d.ts +52 -0
- package/dist/methods/view/url.d.ts.map +1 -0
- package/dist/methods/view/url.js +43 -0
- package/dist/methods/view/url.js.map +1 -0
- package/dist/methods/wait/wait.d.ts +37 -0
- package/dist/methods/wait/wait.d.ts.map +1 -0
- package/dist/methods/wait/wait.js +39 -0
- package/dist/methods/wait/wait.js.map +1 -0
- package/dist/revision.d.ts +43 -0
- package/dist/revision.d.ts.map +1 -0
- package/dist/revision.js +69 -0
- package/dist/revision.js.map +1 -0
- package/dist/rpc/error.d.ts +47 -0
- package/dist/rpc/error.d.ts.map +1 -0
- package/dist/rpc/error.js +77 -0
- package/dist/rpc/error.js.map +1 -0
- package/dist/rpc/lines.d.ts +30 -0
- package/dist/rpc/lines.d.ts.map +1 -0
- package/dist/rpc/lines.js +63 -0
- package/dist/rpc/lines.js.map +1 -0
- package/dist/rpc/messages.d.ts +92 -0
- package/dist/rpc/messages.d.ts.map +1 -0
- package/dist/rpc/messages.js +133 -0
- package/dist/rpc/messages.js.map +1 -0
- package/dist/rpc/peer.d.ts +81 -0
- package/dist/rpc/peer.d.ts.map +1 -0
- package/dist/rpc/peer.js +208 -0
- package/dist/rpc/peer.js.map +1 -0
- package/dist/serializer.d.ts +178 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/serializer.js +929 -0
- package/dist/serializer.js.map +1 -0
- package/dist/verify.d.ts +254 -0
- package/dist/verify.d.ts.map +1 -0
- package/dist/verify.js +243 -0
- package/dist/verify.js.map +1 -0
- package/dist/view.d.ts +103 -0
- package/dist/view.d.ts.map +1 -0
- package/dist/view.js +110 -0
- package/dist/view.js.map +1 -0
- package/dist/wire-registry.js +11 -0
- package/dist/wire-registry.js.map +1 -0
- package/dist/worker.d.ts +249 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +158 -0
- package/dist/worker.js.map +1 -0
- package/package.json +114 -3
- package/schemas/protocol.draft-07.json +5120 -0
- package/schemas/protocol.schema.json +4964 -0
- package/src/actions.ts +418 -0
- package/src/artifact.ts +187 -0
- package/src/bridge.ts +618 -0
- package/src/browser.ts +374 -0
- package/src/bundle.ts +264 -0
- package/src/canonical.ts +49 -0
- package/src/capability.ts +92 -0
- package/src/diagnostics/codes/a11y.ts +41 -0
- package/src/diagnostics/codes/action.ts +125 -0
- package/src/diagnostics/codes/artifact.ts +137 -0
- package/src/diagnostics/codes/build.ts +65 -0
- package/src/diagnostics/codes/cli.ts +53 -0
- package/src/diagnostics/codes/console.ts +41 -0
- package/src/diagnostics/codes/dep.ts +101 -0
- package/src/diagnostics/codes/env.ts +149 -0
- package/src/diagnostics/codes/field.ts +113 -0
- package/src/diagnostics/codes/home.ts +150 -0
- package/src/diagnostics/codes/host.ts +197 -0
- package/src/diagnostics/codes/hygiene.ts +175 -0
- package/src/diagnostics/codes/index.ts +142 -0
- package/src/diagnostics/codes/live.ts +41 -0
- package/src/diagnostics/codes/manifest.ts +53 -0
- package/src/diagnostics/codes/network.ts +41 -0
- package/src/diagnostics/codes/platform.ts +30 -0
- package/src/diagnostics/codes/publish.ts +53 -0
- package/src/diagnostics/codes/regression.ts +89 -0
- package/src/diagnostics/codes/runtime.ts +77 -0
- package/src/diagnostics/codes/secret.ts +29 -0
- package/src/diagnostics/codes/smoke.ts +41 -0
- package/src/diagnostics/codes/submit.ts +113 -0
- package/src/diagnostics/codes/target.ts +29 -0
- package/src/diagnostics/codes/type.ts +41 -0
- package/src/diagnostics/codes/verify.ts +113 -0
- package/src/diagnostics/diagnostic.ts +240 -0
- package/src/diagnostics/spec.ts +90 -0
- package/src/hygiene.ts +224 -0
- package/src/ids.ts +279 -0
- package/src/index.ts +576 -0
- package/src/interaction.ts +728 -0
- package/src/manifest.ts +206 -0
- package/src/method.ts +42 -0
- package/src/methods/artifact/create.ts +56 -0
- package/src/methods/artifact/get.ts +30 -0
- package/src/methods/artifact/list.ts +42 -0
- package/src/methods/artifact/publish.ts +46 -0
- package/src/methods/artifact/verify.ts +46 -0
- package/src/methods/deps/add.ts +72 -0
- package/src/methods/dev/start.ts +84 -0
- package/src/methods/dev/stop.ts +32 -0
- package/src/methods/events/ack.ts +41 -0
- package/src/methods/events/read.ts +67 -0
- package/src/methods/events/subscribe.ts +91 -0
- package/src/methods/events/unsubscribe.ts +35 -0
- package/src/methods/gc/run.ts +125 -0
- package/src/methods/index.ts +81 -0
- package/src/methods/instance/check.ts +61 -0
- package/src/methods/instance/status.ts +172 -0
- package/src/methods/live/push.ts +54 -0
- package/src/methods/mostra/initialize.ts +249 -0
- package/src/methods/mostra/shutdown.ts +31 -0
- package/src/methods/port/drafts-mirror.ts +52 -0
- package/src/methods/port/secrets-get.ts +40 -0
- package/src/methods/port/submissions-deliver.ts +70 -0
- package/src/methods/port/trusted-controls-activated.ts +51 -0
- package/src/methods/port/trusted-controls-policy.ts +38 -0
- package/src/methods/results/get.ts +59 -0
- package/src/methods/secret/delete.ts +43 -0
- package/src/methods/secret/list.ts +40 -0
- package/src/methods/secret/set.ts +69 -0
- package/src/methods/state/get.ts +44 -0
- package/src/methods/state/patch.ts +51 -0
- package/src/methods/view/default.ts +32 -0
- package/src/methods/view/launch.ts +47 -0
- package/src/methods/view/revoke.ts +39 -0
- package/src/methods/view/rotate.ts +37 -0
- package/src/methods/view/url.ts +84 -0
- package/src/methods/wait/wait.ts +58 -0
- package/src/revision.ts +101 -0
- package/src/rpc/error.ts +107 -0
- package/src/rpc/lines.ts +70 -0
- package/src/rpc/messages.ts +188 -0
- package/src/rpc/peer.ts +341 -0
- package/src/serializer.ts +1217 -0
- package/src/timers.d.ts +8 -0
- package/src/verify.ts +458 -0
- package/src/view.ts +200 -0
- package/src/web-crypto.d.ts +9 -0
- package/src/web-platform.d.ts +35 -0
- package/src/wire-registry.ts +14 -0
- package/src/worker.ts +374 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diagnostic codes of the RUNTIME area.
|
|
3
|
+
*/
|
|
4
|
+
import type { AreaCatalog } from "../spec.ts";
|
|
5
|
+
|
|
6
|
+
/** The codes of the RUNTIME area, in the order they were added. */
|
|
7
|
+
export const runtimeDiagnosticCodes = [
|
|
8
|
+
"MOSTRA_RUNTIME_WORKER_CRASHED",
|
|
9
|
+
"MOSTRA_RUNTIME_WORKER_PARKED",
|
|
10
|
+
"MOSTRA_RUNTIME_PAGE_ERROR",
|
|
11
|
+
"MOSTRA_RUNTIME_BLANK",
|
|
12
|
+
"MOSTRA_RUNTIME_NOT_READY",
|
|
13
|
+
// gen:codes
|
|
14
|
+
] as const;
|
|
15
|
+
|
|
16
|
+
/** The codes of the RUNTIME area. */
|
|
17
|
+
export type RuntimeDiagnosticCode = (typeof runtimeDiagnosticCodes)[number];
|
|
18
|
+
|
|
19
|
+
/** The RUNTIME area's catalog entries. */
|
|
20
|
+
export const runtimeDiagnostics: AreaCatalog<RuntimeDiagnosticCode> = {
|
|
21
|
+
MOSTRA_RUNTIME_WORKER_CRASHED: {
|
|
22
|
+
severity: "error",
|
|
23
|
+
phase: "runtime",
|
|
24
|
+
title: "Artifact server code crashed",
|
|
25
|
+
hint: "Read the cause and the worker's last output, fix the server code, and publish again.",
|
|
26
|
+
docs: {
|
|
27
|
+
explanation:
|
|
28
|
+
"The artifact version's worker process exited while serving a call: it threw outside any call, ran out of its heap (1 GiB by default), or kept its event loop blocked past the watchdog (10 s by default). Other artifacts and the gateway keep working (RT-04). Mostra appends `worker.crashed` with the cause and starts the worker again on the next request, waiting longer after each crash (1 s up to 60 s). `verify` reports it too when the source's server code crashes, fails to load or hangs while the page renders, even when the page handled the failed call.",
|
|
29
|
+
fix: "Fix the crash in the server code. A long synchronous computation can raise `limits.watchdogMs` in the manifest, and a large data set `limits.heapMb`; both are stability limits, not security ones.",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
MOSTRA_RUNTIME_WORKER_PARKED: {
|
|
33
|
+
severity: "error",
|
|
34
|
+
phase: "runtime",
|
|
35
|
+
title: "Artifact server code keeps crashing",
|
|
36
|
+
hint: "Fix the server code and publish again, which clears the park; the message names the last crash's cause.",
|
|
37
|
+
docs: {
|
|
38
|
+
explanation:
|
|
39
|
+
"The artifact version's worker crashed more than 5 times in 10 minutes, so Mostra stopped starting it (FAILURE_MODEL \u00a72). Calls, runs and live sources of that version answer this code until the park clears, and the shell tells the viewer that the artifact's server code keeps crashing.",
|
|
40
|
+
fix: "Find the cause in the message and the worker's output, fix it, and publish again: a new publish, `verify` or a restart of the instance clears the park.",
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
MOSTRA_RUNTIME_PAGE_ERROR: {
|
|
44
|
+
severity: "error",
|
|
45
|
+
phase: "runtime",
|
|
46
|
+
title: "Uncaught error in the page",
|
|
47
|
+
hint: "Fix the error the message names; it was thrown in the page and nothing caught it.",
|
|
48
|
+
docs: {
|
|
49
|
+
explanation:
|
|
50
|
+
"The artifact's page threw an error that nothing caught, or a promise rejected with nothing handling it, while verify rendered it or while the smoke test used a control (the message says which). A viewer's page would meet the same error.",
|
|
51
|
+
fix: "Find the stack's first frame in the artifact's code and fix the error there, or catch it where the page can recover.",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
MOSTRA_RUNTIME_BLANK: {
|
|
55
|
+
severity: "error",
|
|
56
|
+
phase: "runtime",
|
|
57
|
+
title: "Page rendered nothing",
|
|
58
|
+
hint: "Make the page render something visible; check its first render and its imports.",
|
|
59
|
+
docs: {
|
|
60
|
+
explanation:
|
|
61
|
+
"After the page reported ready, no element had a visible box (text, image, SVG, canvas or video) and the screenshot was one uniform color. Usually the page threw during its first render, rendered nothing until data arrived, or hid everything with CSS.",
|
|
62
|
+
fix: "Look at the other diagnostics for an error during the first render, and make the page show content (or a loading state) right away.",
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
MOSTRA_RUNTIME_NOT_READY: {
|
|
66
|
+
severity: "error",
|
|
67
|
+
phase: "runtime",
|
|
68
|
+
title: "Page never became ready",
|
|
69
|
+
hint: "Make sure the entry's default export renders; check the other diagnostics for an error at load.",
|
|
70
|
+
docs: {
|
|
71
|
+
explanation:
|
|
72
|
+
"The page never reported `mostra/ready`: the client runtime didn't mount it within the time verify allows, usually because the entry threw while loading or a module failed to load.",
|
|
73
|
+
fix: "Fix the load error the other diagnostics report. A page that waits for data should render a loading state first.",
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
// gen:entries
|
|
77
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diagnostic codes of the SECRET area.
|
|
3
|
+
*/
|
|
4
|
+
import type { AreaCatalog } from "../spec.ts";
|
|
5
|
+
|
|
6
|
+
/** The codes of the SECRET area, in the order they were added. */
|
|
7
|
+
export const secretDiagnosticCodes = [
|
|
8
|
+
"MOSTRA_SECRET_MISSING",
|
|
9
|
+
// gen:codes
|
|
10
|
+
] as const;
|
|
11
|
+
|
|
12
|
+
/** The codes of the SECRET area. */
|
|
13
|
+
export type SecretDiagnosticCode = (typeof secretDiagnosticCodes)[number];
|
|
14
|
+
|
|
15
|
+
/** The SECRET area's catalog entries. */
|
|
16
|
+
export const secretDiagnostics: AreaCatalog<SecretDiagnosticCode> = {
|
|
17
|
+
MOSTRA_SECRET_MISSING: {
|
|
18
|
+
severity: "error",
|
|
19
|
+
phase: "runtime",
|
|
20
|
+
title: "Secret not set",
|
|
21
|
+
hint: "Set the secret with `mostra secret set NAME`, reading the value from stdin.",
|
|
22
|
+
docs: {
|
|
23
|
+
explanation:
|
|
24
|
+
"Server code called `secret(name)` for a secret that neither the host's `secrets` port, the artifact's own secrets nor the home's shared secrets hold (D44). The call throws, and an action run fails with this code.",
|
|
25
|
+
fix: "Set the secret for the artifact (`mostra secret set NAME --artifact <path|id>`) or for every artifact of the home (`mostra secret set NAME`), passing the value on stdin, then run the action again. Secret values never go into the artifact's source.",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
// gen:entries
|
|
29
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diagnostic codes of the SMOKE area.
|
|
3
|
+
*/
|
|
4
|
+
import type { AreaCatalog } from "../spec.ts";
|
|
5
|
+
|
|
6
|
+
/** The codes of the SMOKE area, in the order they were added. */
|
|
7
|
+
export const smokeDiagnosticCodes = [
|
|
8
|
+
"MOSTRA_SMOKE_NO_EFFECT",
|
|
9
|
+
"MOSTRA_SMOKE_BUDGET",
|
|
10
|
+
// gen:codes
|
|
11
|
+
] as const;
|
|
12
|
+
|
|
13
|
+
/** The codes of the SMOKE area. */
|
|
14
|
+
export type SmokeDiagnosticCode = (typeof smokeDiagnosticCodes)[number];
|
|
15
|
+
|
|
16
|
+
/** The SMOKE area's catalog entries. */
|
|
17
|
+
export const smokeDiagnostics: AreaCatalog<SmokeDiagnosticCode> = {
|
|
18
|
+
MOSTRA_SMOKE_NO_EFFECT: {
|
|
19
|
+
severity: "warning",
|
|
20
|
+
phase: "smoke",
|
|
21
|
+
title: "Control showed no effect",
|
|
22
|
+
hint: "Observed only: using this control twice changed nothing verify could see; a control that acts on something verify can't observe needs no change.",
|
|
23
|
+
docs: {
|
|
24
|
+
explanation:
|
|
25
|
+
"Verify's smoke test clicked or hovered the control the message names, once among the other controls and again after them, and saw no change either time: no change to the page, no request, no saved field, no navigation and no error. Controls that are disabled or already active (the selected tab) are skipped, and those that open on hover are hovered. A control can still be fine: it may act on something verify can't observe, such as the clipboard or a sound.",
|
|
26
|
+
fix: "Read the control's handler. If it does what it should, nothing needs to change; if it is meant to change the page, look at why it doesn't.",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
MOSTRA_SMOKE_BUDGET: {
|
|
30
|
+
severity: "hint",
|
|
31
|
+
phase: "smoke",
|
|
32
|
+
title: "Smoke test stopped at its budget",
|
|
33
|
+
hint: "Nothing to fix: the smoke test stops after 200 interactions or 60 s.",
|
|
34
|
+
docs: {
|
|
35
|
+
explanation:
|
|
36
|
+
"The page has more controls than the smoke test uses in one run, so it stopped at its budget. The controls it used are counted in `smoke.interactions`.",
|
|
37
|
+
fix: "Nothing is required.",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
// gen:entries
|
|
41
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diagnostic codes of the SUBMIT area.
|
|
3
|
+
*/
|
|
4
|
+
import type { AreaCatalog } from "../spec.ts";
|
|
5
|
+
|
|
6
|
+
/** The codes of the SUBMIT area, in the order they were added. */
|
|
7
|
+
export const submitDiagnosticCodes = [
|
|
8
|
+
"MOSTRA_SUBMIT_ALREADY",
|
|
9
|
+
"MOSTRA_SUBMIT_REVISION_MOVED",
|
|
10
|
+
"MOSTRA_SUBMIT_POLICY_NONE",
|
|
11
|
+
"MOSTRA_SUBMIT_NOT_FOUND",
|
|
12
|
+
"MOSTRA_SUBMIT_VIEW_INVALID",
|
|
13
|
+
"MOSTRA_SUBMIT_SIGNAL_INVALID",
|
|
14
|
+
"MOSTRA_SUBMIT_CHANNEL_DENIED",
|
|
15
|
+
"MOSTRA_SUBMIT_BLOCKED",
|
|
16
|
+
// gen:codes
|
|
17
|
+
] as const;
|
|
18
|
+
|
|
19
|
+
/** The codes of the SUBMIT area. */
|
|
20
|
+
export type SubmitDiagnosticCode = (typeof submitDiagnosticCodes)[number];
|
|
21
|
+
|
|
22
|
+
/** The SUBMIT area's catalog entries. */
|
|
23
|
+
export const submitDiagnostics: AreaCatalog<SubmitDiagnosticCode> = {
|
|
24
|
+
MOSTRA_SUBMIT_ALREADY: {
|
|
25
|
+
severity: "error",
|
|
26
|
+
phase: "runtime",
|
|
27
|
+
title: "Already submitted",
|
|
28
|
+
hint: "This artifact takes one submission, and it was made; read it with `mostra results`.",
|
|
29
|
+
docs: {
|
|
30
|
+
explanation:
|
|
31
|
+
"The artifact's submission policy is `once`, and a submission already closed this draft: for scope `per-artifact` any viewer's submission closes every draft, for `per-viewer` the viewer's own. A submission is immutable and final, so Mostra refuses a second one and further edits to the closed draft. The refusal carries the existing submission. A repeated submit of the same view at the same draft revision is not refused: it returns the original submission.",
|
|
32
|
+
fix: 'Read the existing submission with `mostra results <artifact>`. When another round of answers is wanted, publish a new artifact linked to this one (`links: [{ rel: "round-of", artifact }]`), or have the host publish with the `epochs` policy.',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
MOSTRA_SUBMIT_REVISION_MOVED: {
|
|
36
|
+
severity: "error",
|
|
37
|
+
phase: "runtime",
|
|
38
|
+
title: "Draft changed before submit",
|
|
39
|
+
hint: "Reload the draft, check what changed, and submit again with its current revision.",
|
|
40
|
+
docs: {
|
|
41
|
+
explanation:
|
|
42
|
+
"A submit names the draft revision the viewer saw (`expectedRevision`), and the draft has changed since: another tab, device or writer saved an edit. Mostra never makes a submission from content the viewer didn't see (FAILURE_MODEL §4), so it refuses. The message names the draft's current revision.",
|
|
43
|
+
fix: "Let the page reload the draft so the viewer sees exactly what will be sent, then submit with the new revision. The shell and the client runtime flush pending saves before they submit, which makes this rare.",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
MOSTRA_SUBMIT_POLICY_NONE: {
|
|
47
|
+
severity: "error",
|
|
48
|
+
phase: "runtime",
|
|
49
|
+
title: "Artifact takes no submissions",
|
|
50
|
+
hint: "Exchange data through artifact state, actions and signals; this artifact has no submissions.",
|
|
51
|
+
docs: {
|
|
52
|
+
explanation:
|
|
53
|
+
"The artifact's submission policy is `none` (D63): long-lived artifacts such as dashboards and task managers talk to agents through artifact state, actions, signals and events, and the shell shows no Submit control. Mostra refuses a submit, and a `wait --until submitted`, on such an artifact.",
|
|
54
|
+
fix: "Wait for a signal (`--until signal:<name>`), a state change (`--until state:<field>`) or an event instead, and read state with `mostra state get`. To collect submissions, publish with policy `once` or `epochs`.",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
MOSTRA_SUBMIT_NOT_FOUND: {
|
|
58
|
+
severity: "error",
|
|
59
|
+
phase: "runtime",
|
|
60
|
+
title: "No such submission",
|
|
61
|
+
hint: "Wait for a submission with `mostra wait <artifact> --until submitted`, or name one that exists.",
|
|
62
|
+
docs: {
|
|
63
|
+
explanation:
|
|
64
|
+
"The artifact has no submission yet, or none with the ID asked for. Submissions are durable once made, so this means none was made (or the ID belongs to another artifact or home).",
|
|
65
|
+
fix: "Run `mostra wait <artifact> --until submitted` to block until the viewer submits, then read the results. List the artifact's submissions through `submission.created` events.",
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
MOSTRA_SUBMIT_VIEW_INVALID: {
|
|
69
|
+
severity: "error",
|
|
70
|
+
phase: "runtime",
|
|
71
|
+
title: "Unknown view",
|
|
72
|
+
hint: "Send the view ID this page was opened with.",
|
|
73
|
+
docs: {
|
|
74
|
+
explanation:
|
|
75
|
+
"Mutations and submits name the view they come from, the one the shell created when it opened this frame. The view named doesn't exist, belongs to another artifact, or belongs to another viewer. Mostra binds every submission to the exact version its view showed, so it refuses a view it can't place.",
|
|
76
|
+
fix: "Use the `viewId` the shell handed this frame. A page opened outside Mostra's shell has no view and can't submit.",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
MOSTRA_SUBMIT_SIGNAL_INVALID: {
|
|
80
|
+
severity: "error",
|
|
81
|
+
phase: "runtime",
|
|
82
|
+
title: "Invalid signal",
|
|
83
|
+
hint: "Name signals with letters, digits, `.`, `_` and `-`, and keep their payload under 64 KiB of JSON.",
|
|
84
|
+
docs: {
|
|
85
|
+
explanation:
|
|
86
|
+
"A signal names something the artifact wants a host's attention for, such as `ping-agent`. Its name is 1 to 64 characters of letters, digits, `.`, `_` and `-`, starting with a letter or digit, and its payload is JSON of at most 64 KiB. This one broke one of those rules. The name `submit` is reserved for submissions.",
|
|
87
|
+
fix: "Rename the signal or shrink its payload; put large data into a field or artifact state and send its ID in the payload.",
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
MOSTRA_SUBMIT_CHANNEL_DENIED: {
|
|
91
|
+
severity: "error",
|
|
92
|
+
phase: "runtime",
|
|
93
|
+
title: "Submit channel not allowed",
|
|
94
|
+
hint: "Let the viewer submit with the shell's trusted Submit; this host doesn't take submissions from artifact code.",
|
|
95
|
+
docs: {
|
|
96
|
+
explanation:
|
|
97
|
+
"A submission comes through one of two channels (D40): the shell's trusted Submit (`shell`), which only a person can press, or the artifact's own code (`artifact`, `useSubmit().submit()` and `useChoice().choose()`). The host decides which it accepts (D108): through `HomeConfig.submitChannels` for the home, or its `trustedControls` port for each artifact. This view allows only the other channel, so Mostra refused the submit or the choice. `useSubmit().allowed` is `false` in such a view.",
|
|
98
|
+
fix: "Ask the viewer to press the shell's Submit (relabel it with `useSubmitControl`), and use `useChoice(id, { candidates })` to have the shell render a trusted Choose. Check `allowed` before showing an in-page submit button.",
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
MOSTRA_SUBMIT_BLOCKED: {
|
|
102
|
+
severity: "error",
|
|
103
|
+
phase: "runtime",
|
|
104
|
+
title: "Answers missing before submit",
|
|
105
|
+
hint: "Fill in the fields this diagnostic lists, fix their errors or resolve their conflicts, then submit again.",
|
|
106
|
+
docs: {
|
|
107
|
+
explanation:
|
|
108
|
+
"Before a submit, the shell and the client runtime check every mounted field (D106): a `required` field without a value, a value its `validate` rejects, or a conflict the viewer hasn't resolved blocks the submit. The diagnostic lists the blockers with their field IDs and labels; `useSubmit().blockers` lists them before anyone submits. Nothing was submitted.",
|
|
109
|
+
fix: "Show `useSubmit().blockers` next to your submit button, or let the shell list them by label. Answer the required fields, fix the invalid values, and keep or take the conflicting values, then submit again.",
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
// gen:entries
|
|
113
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diagnostic codes of the TARGET area.
|
|
3
|
+
*/
|
|
4
|
+
import type { AreaCatalog } from "../spec.ts";
|
|
5
|
+
|
|
6
|
+
/** The codes of the TARGET area, in the order they were added. */
|
|
7
|
+
export const targetDiagnosticCodes = [
|
|
8
|
+
"MOSTRA_TARGET_UNAVAILABLE",
|
|
9
|
+
// gen:codes
|
|
10
|
+
] as const;
|
|
11
|
+
|
|
12
|
+
/** The codes of the TARGET area. */
|
|
13
|
+
export type TargetDiagnosticCode = (typeof targetDiagnosticCodes)[number];
|
|
14
|
+
|
|
15
|
+
/** The TARGET area's catalog entries. */
|
|
16
|
+
export const targetDiagnostics: AreaCatalog<TargetDiagnosticCode> = {
|
|
17
|
+
MOSTRA_TARGET_UNAVAILABLE: {
|
|
18
|
+
severity: "error",
|
|
19
|
+
phase: "runtime",
|
|
20
|
+
title: "Not available in this delivery target",
|
|
21
|
+
hint: "Open the published version through Mostra to use this feature.",
|
|
22
|
+
docs: {
|
|
23
|
+
explanation:
|
|
24
|
+
"The page called something that needs Mostra's server, such as a server function, and this delivery target doesn't provide it: a static export, a file opened from disk, or a runtime without server support. The page keeps working without it.",
|
|
25
|
+
fix: "Open the artifact through its Mostra link, where server functions, submissions and live data are available. In a static export, handle the error so the page explains what isn't available.",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
// gen:entries
|
|
29
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diagnostic codes of the TYPE area.
|
|
3
|
+
*/
|
|
4
|
+
import type { AreaCatalog } from "../spec.ts";
|
|
5
|
+
|
|
6
|
+
/** The codes of the TYPE area, in the order they were added. */
|
|
7
|
+
export const typeDiagnosticCodes = [
|
|
8
|
+
"MOSTRA_TYPE_ERROR",
|
|
9
|
+
"MOSTRA_TYPE_UNTYPED_PACKAGE",
|
|
10
|
+
// gen:codes
|
|
11
|
+
] as const;
|
|
12
|
+
|
|
13
|
+
/** The codes of the TYPE area. */
|
|
14
|
+
export type TypeDiagnosticCode = (typeof typeDiagnosticCodes)[number];
|
|
15
|
+
|
|
16
|
+
/** The TYPE area's catalog entries. */
|
|
17
|
+
export const typeDiagnostics: AreaCatalog<TypeDiagnosticCode> = {
|
|
18
|
+
MOSTRA_TYPE_ERROR: {
|
|
19
|
+
severity: "error",
|
|
20
|
+
phase: "compile",
|
|
21
|
+
title: "Type error",
|
|
22
|
+
hint: "Fix the type error at the reported location; the message carries TypeScript's code and text.",
|
|
23
|
+
docs: {
|
|
24
|
+
explanation:
|
|
25
|
+
"TypeScript's checker (`tsc --noEmit`, TypeScript 7) found an error in the artifact's code. Verify checks with the artifact's own `tsconfig.json` when it has one, else in strict mode without the unused-variable rules, and resolves imports exactly as the build does. MDX isn't checked.",
|
|
26
|
+
fix: "Open the file at the reported line and fix the code, for example a missing property, a wrong argument type or a misspelled import.",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
MOSTRA_TYPE_UNTYPED_PACKAGE: {
|
|
30
|
+
severity: "warning",
|
|
31
|
+
phase: "compile",
|
|
32
|
+
title: "Package without type declarations",
|
|
33
|
+
hint: "Nothing breaks: the package works without types; declare a module for it if you want them checked.",
|
|
34
|
+
docs: {
|
|
35
|
+
explanation:
|
|
36
|
+
"The artifact imports a package that ships no type declarations (TypeScript's TS7016). The package still builds and runs, so this is a warning: its values are typed `any`.",
|
|
37
|
+
fix: 'Optionally add a declaration file such as `declare module "<package>";`, or a typed wrapper, to the artifact.',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
// gen:entries
|
|
41
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diagnostic codes of the VERIFY area.
|
|
3
|
+
*/
|
|
4
|
+
import type { AreaCatalog } from "../spec.ts";
|
|
5
|
+
|
|
6
|
+
/** The codes of the VERIFY area, in the order they were added. */
|
|
7
|
+
export const verifyDiagnosticCodes = [
|
|
8
|
+
"MOSTRA_VERIFY_ACTION_SKIPPED",
|
|
9
|
+
"MOSTRA_VERIFY_SKIP_CONSEQUENCE",
|
|
10
|
+
"MOSTRA_VERIFY_TIMEOUT",
|
|
11
|
+
"MOSTRA_VERIFY_CRASHED",
|
|
12
|
+
"MOSTRA_VERIFY_NO_BASELINE",
|
|
13
|
+
"MOSTRA_VERIFY_BASELINE_MISSING",
|
|
14
|
+
"MOSTRA_VERIFY_LIVE_FAILED",
|
|
15
|
+
"MOSTRA_VERIFY_SECRET_MISSING",
|
|
16
|
+
// gen:codes
|
|
17
|
+
] as const;
|
|
18
|
+
|
|
19
|
+
/** The codes of the VERIFY area. */
|
|
20
|
+
export type VerifyDiagnosticCode = (typeof verifyDiagnosticCodes)[number];
|
|
21
|
+
|
|
22
|
+
/** The VERIFY area's catalog entries. */
|
|
23
|
+
export const verifyDiagnostics: AreaCatalog<VerifyDiagnosticCode> = {
|
|
24
|
+
MOSTRA_VERIFY_ACTION_SKIPPED: {
|
|
25
|
+
severity: "hint",
|
|
26
|
+
phase: "smoke",
|
|
27
|
+
title: "Action skipped in verify",
|
|
28
|
+
hint: "To have verify run this action, check `dryRun()` from `@mostra/server` in it and return early without its side effects when it is true.",
|
|
29
|
+
docs: {
|
|
30
|
+
explanation:
|
|
31
|
+
"Verify's smoke test never runs a server function that doesn't check `dryRun()` (D55). When the page called one, verify refused the call instead: the page's `run()` or server reference rejected with a `MostraError` carrying this code, as it would for any failed action. The verdict lists every such function in `smoke.skippedActions`. Nothing was sent, written or charged.",
|
|
32
|
+
fix: "Nothing is wrong. To have verify exercise the action, add `if (dryRun()) return <a representative result>;` before its side effects; verify then runs it with `dryRun()` true.",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
MOSTRA_VERIFY_SKIP_CONSEQUENCE: {
|
|
36
|
+
severity: "hint",
|
|
37
|
+
phase: "smoke",
|
|
38
|
+
title: "Page reaction to a skipped action",
|
|
39
|
+
hint: "Nothing to fix: this followed from verify skipping an action, which a viewer's page never meets.",
|
|
40
|
+
docs: {
|
|
41
|
+
explanation:
|
|
42
|
+
"After verify refused a server function that doesn't check `dryRun()`, the page reported an error: an unhandled rejection, an error a boundary caught, or a console error while it settled. It follows from verify's synthetic refusal, not from a defect a viewer would meet, so it is reported as a hint naming the skipped action.",
|
|
43
|
+
fix: "Nothing is required. To let verify see the action's real result, opt it into the smoke test with `dryRun()`.",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
MOSTRA_VERIFY_TIMEOUT: {
|
|
47
|
+
severity: "error",
|
|
48
|
+
phase: "runtime",
|
|
49
|
+
title: "Verify ran out of time",
|
|
50
|
+
hint: "Make the page render without waiting on slow work at load, then verify again.",
|
|
51
|
+
docs: {
|
|
52
|
+
explanation:
|
|
53
|
+
"Verify allows 120 s for everything after the build: booting the sandbox, rendering each viewport, the smoke test and the regression stage. This run went past it, so its verdict is partial: the message names the stage it reached. A partial run can't vouch for the page, so this is an error, and the verdict isn't cached.",
|
|
54
|
+
fix: "Look for work the page does at load that takes long (large data, long animations, requests that never answer) and defer it, then verify again. On a heavily loaded machine, verifying again may be enough.",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
MOSTRA_VERIFY_CRASHED: {
|
|
58
|
+
severity: "error",
|
|
59
|
+
phase: "runtime",
|
|
60
|
+
title: "Verify runner crashed",
|
|
61
|
+
hint: "Verify again; if it keeps crashing, report the message with `mostra doctor`'s output.",
|
|
62
|
+
docs: {
|
|
63
|
+
explanation:
|
|
64
|
+
"The verify runner, the child process that drives the browser, stopped before it finished (FAILURE_MODEL §2). The message carries its last lines of output. Nothing was published, and the next verify starts a fresh runner.",
|
|
65
|
+
fix: "Verify again. A crash that repeats for the same artifact can come from a page that exhausts the browser's memory; one that repeats for every artifact means the runtime's browser is damaged.",
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
MOSTRA_VERIFY_NO_BASELINE: {
|
|
69
|
+
severity: "hint",
|
|
70
|
+
phase: "regression",
|
|
71
|
+
title: "No earlier passing version",
|
|
72
|
+
hint: "Nothing to fix: the next version will be compared with this one once it is published.",
|
|
73
|
+
docs: {
|
|
74
|
+
explanation:
|
|
75
|
+
"Verify compares a source with the newest published version of its artifact whose verdict passed. This artifact has none yet (it is new, or every earlier version was published with `--force`), so no regression stage ran.",
|
|
76
|
+
fix: "Nothing is required.",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
MOSTRA_VERIFY_BASELINE_MISSING: {
|
|
80
|
+
severity: "hint",
|
|
81
|
+
phase: "regression",
|
|
82
|
+
title: "Baseline version's build is missing",
|
|
83
|
+
hint: "Nothing to fix here; publish again to give later versions a baseline.",
|
|
84
|
+
docs: {
|
|
85
|
+
explanation:
|
|
86
|
+
"The newest version that passed verify is recorded in the ledger, but its stored build isn't in the home any more, so verify couldn't render it and ran no regression stage.",
|
|
87
|
+
fix: "Nothing is required. A version published from this source becomes the next baseline.",
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
MOSTRA_VERIFY_LIVE_FAILED: {
|
|
91
|
+
severity: "warning",
|
|
92
|
+
phase: "runtime",
|
|
93
|
+
title: "Live source failed during verify",
|
|
94
|
+
hint: "Check the live source's message: it failed while verify rendered the page, which may be the environment rather than the code.",
|
|
95
|
+
docs: {
|
|
96
|
+
explanation:
|
|
97
|
+
"A live source's producer (`live.ts`) threw or couldn't reach its data while verify rendered the page. Verify runs producers for real, since they only read, so a failure can come from the environment (no network, a service that is down) as well as from the code. The page shows `useLive`'s `error` meanwhile.",
|
|
98
|
+
fix: "Read the message. If the producer itself is wrong, fix it; if the data source was unreachable, verify again when it is back.",
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
MOSTRA_VERIFY_SECRET_MISSING: {
|
|
102
|
+
severity: "warning",
|
|
103
|
+
phase: "runtime",
|
|
104
|
+
title: "Secret missing during verify",
|
|
105
|
+
hint: "Set the secret with `mostra secret set <NAME>` if the artifact needs it; verify reports it as the environment, not the code.",
|
|
106
|
+
docs: {
|
|
107
|
+
explanation:
|
|
108
|
+
"Server code asked for a secret (`secret()`) that neither the host, the artifact's secrets nor the home's hold, while verify ran it. Secrets are part of the environment, so verify reports this as a warning rather than an error.",
|
|
109
|
+
fix: "Run `mostra secret set <NAME>` (for the artifact or the home) with the value the code needs, then verify again.",
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
// gen:entries
|
|
113
|
+
};
|