@mostra/cli 0.0.0-stage → 0.2.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 +18 -2
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +79 -0
- package/dist/bin.js.map +1 -0
- package/dist/bootstrap-DfEe_yPr.js +113 -0
- package/dist/bootstrap-DfEe_yPr.js.map +1 -0
- package/dist/exit-CBIf8nAU.js +79 -0
- package/dist/exit-CBIf8nAU.js.map +1 -0
- package/dist/flush-BCuWs0Zh.js +718 -0
- package/dist/flush-BCuWs0Zh.js.map +1 -0
- package/dist/index.d.ts +230 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/reference/cli.md +977 -0
- package/dist/reference/diagnostics.json +1264 -0
- package/dist/reference/errors/MOSTRA_A11Y_MINOR.md +23 -0
- package/dist/reference/errors/MOSTRA_A11Y_SERIOUS.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_CANCELLED.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_EVENT_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_EXPORT_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_INTERRUPTED.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_RUN_NOT_FOUND.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_THREW.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_TOO_LARGE.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_UNKNOWN_FUNCTION.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_UNSERIALIZABLE.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_DIR_NOT_EMPTY.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_ENTRY_AMBIGUOUS.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_NOT_FOUND.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_NO_ENTRY.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_NO_PAGE.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_SOURCE_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_SOURCE_UNREADABLE.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_TEMPLATE_UNKNOWN.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_VERSION_COLLECTED.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_VERSION_NOT_FOUND.md +23 -0
- package/dist/reference/errors/MOSTRA_BUILD_CRASHED.md +23 -0
- package/dist/reference/errors/MOSTRA_BUILD_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_BUILD_TIMEOUT.md +23 -0
- package/dist/reference/errors/MOSTRA_BUILD_UNRESOLVED.md +23 -0
- package/dist/reference/errors/MOSTRA_CLI_CONFIG_UNWRITABLE.md +23 -0
- package/dist/reference/errors/MOSTRA_CLI_UNKNOWN_COMMAND.md +23 -0
- package/dist/reference/errors/MOSTRA_CLI_USAGE.md +23 -0
- package/dist/reference/errors/MOSTRA_CONSOLE_ERROR.md +23 -0
- package/dist/reference/errors/MOSTRA_CONSOLE_WARNING.md +23 -0
- package/dist/reference/errors/MOSTRA_DEP_INSTALL_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_DEP_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_DEP_NOT_FOUND.md +23 -0
- package/dist/reference/errors/MOSTRA_DEP_OFFLINE.md +23 -0
- package/dist/reference/errors/MOSTRA_DEP_SPEC_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_DEP_TIMEOUT.md +23 -0
- package/dist/reference/errors/MOSTRA_DEP_WARM_CONFLICT.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_BIND_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_BROWSER_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_BUNDLE_DOWNLOAD_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_BUNDLE_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_BUNDLE_UNAVAILABLE.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_NODE_UNSUPPORTED.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_PORT_TAKEN.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_RUNTIME_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_SERVICE_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_SHELL_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_WARM_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_FIELD_CONFLICT.md +23 -0
- package/dist/reference/errors/MOSTRA_FIELD_DUPLICATE_ID.md +23 -0
- package/dist/reference/errors/MOSTRA_FIELD_ID_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_FIELD_ID_UNSTABLE.md +23 -0
- package/dist/reference/errors/MOSTRA_FIELD_MUTATION_ID_REUSED.md +23 -0
- package/dist/reference/errors/MOSTRA_FIELD_SHARED.md +23 -0
- package/dist/reference/errors/MOSTRA_FIELD_TOO_LARGE.md +23 -0
- package/dist/reference/errors/MOSTRA_FIELD_UNBOUND.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_DISK_FULL.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_GC_INCOMPLETE.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_GONE.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_INTEGRITY.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_LEDGER_UNREADABLE.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_LOCKED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_MISMATCH.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_NOT_ALWAYS_ON.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_NOT_OWNED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_SOCKET_TOO_LONG.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_TOO_NEW.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_CONNECTION_CLOSED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_CURSOR_COMPACTED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_IDENTITY_UNAVAILABLE.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_INITIALIZE_ORDER.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_INTERNAL_ERROR.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_INVALID_PARAMS.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_MALFORMED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_MESSAGE_TOO_LARGE.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_METHOD_UNKNOWN.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_NOTIFICATION_UNSUPPORTED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_PORT_UNSUPPORTED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_REQUEST_ID_REUSED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_REVISION_UNSUPPORTED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_SHUTDOWN_REFUSED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_SUBSCRIPTION_UNKNOWN.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_TIMEOUT.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_CONTENT_TYPE.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_CSRF_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_HEADERS_TOO_LARGE.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_HOST_REFUSED.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_NOT_SERVED.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_ORIGIN_REFUSED.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_RATE_LIMITED.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_REQUEST_MALFORMED.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_SCOPE_DENIED.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_SESSION_CONFLICT.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_SESSION_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_TOKEN_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_TOKEN_REVOKED.md +23 -0
- package/dist/reference/errors/MOSTRA_LIVE_SOURCE_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_LIVE_TOO_LARGE.md +23 -0
- package/dist/reference/errors/MOSTRA_MANIFEST_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_MANIFEST_NOT_LITERAL.md +23 -0
- package/dist/reference/errors/MOSTRA_MANIFEST_UNKNOWN_KEY.md +23 -0
- package/dist/reference/errors/MOSTRA_NETWORK_EXTERNAL_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_NETWORK_REQUEST_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_PLATFORM_UNSUPPORTED.md +23 -0
- package/dist/reference/errors/MOSTRA_PUBLISH_ID_CONFLICT.md +23 -0
- package/dist/reference/errors/MOSTRA_PUBLISH_SOURCE_CHANGED.md +23 -0
- package/dist/reference/errors/MOSTRA_PUBLISH_VERIFY_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_REGRESSION_ACTION_REMOVED.md +23 -0
- package/dist/reference/errors/MOSTRA_REGRESSION_ARIA.md +23 -0
- package/dist/reference/errors/MOSTRA_REGRESSION_FIELD_REMOVED.md +23 -0
- package/dist/reference/errors/MOSTRA_REGRESSION_LIVE_REMOVED.md +23 -0
- package/dist/reference/errors/MOSTRA_REGRESSION_PAGE_REMOVED.md +23 -0
- package/dist/reference/errors/MOSTRA_REGRESSION_PIXELS.md +23 -0
- package/dist/reference/errors/MOSTRA_RUNTIME_BLANK.md +23 -0
- package/dist/reference/errors/MOSTRA_RUNTIME_NOT_READY.md +23 -0
- package/dist/reference/errors/MOSTRA_RUNTIME_PAGE_ERROR.md +23 -0
- package/dist/reference/errors/MOSTRA_RUNTIME_WORKER_CRASHED.md +23 -0
- package/dist/reference/errors/MOSTRA_RUNTIME_WORKER_PARKED.md +23 -0
- package/dist/reference/errors/MOSTRA_SECRET_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_SMOKE_BUDGET.md +23 -0
- package/dist/reference/errors/MOSTRA_SMOKE_NO_EFFECT.md +23 -0
- package/dist/reference/errors/MOSTRA_SUBMIT_ALREADY.md +23 -0
- package/dist/reference/errors/MOSTRA_SUBMIT_BLOCKED.md +23 -0
- package/dist/reference/errors/MOSTRA_SUBMIT_CHANNEL_DENIED.md +23 -0
- package/dist/reference/errors/MOSTRA_SUBMIT_NOT_FOUND.md +23 -0
- package/dist/reference/errors/MOSTRA_SUBMIT_POLICY_NONE.md +23 -0
- package/dist/reference/errors/MOSTRA_SUBMIT_REVISION_MOVED.md +23 -0
- package/dist/reference/errors/MOSTRA_SUBMIT_SIGNAL_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_SUBMIT_VIEW_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_TARGET_UNAVAILABLE.md +23 -0
- package/dist/reference/errors/MOSTRA_TYPE_ERROR.md +23 -0
- package/dist/reference/errors/MOSTRA_TYPE_UNTYPED_PACKAGE.md +23 -0
- package/dist/reference/errors/MOSTRA_VERIFY_ACTION_SKIPPED.md +23 -0
- package/dist/reference/errors/MOSTRA_VERIFY_BASELINE_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_VERIFY_CRASHED.md +23 -0
- package/dist/reference/errors/MOSTRA_VERIFY_LIVE_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_VERIFY_NO_BASELINE.md +23 -0
- package/dist/reference/errors/MOSTRA_VERIFY_SECRET_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_VERIFY_SKIP_CONSEQUENCE.md +23 -0
- package/dist/reference/errors/MOSTRA_VERIFY_TIMEOUT.md +23 -0
- package/dist/reference/telemetry.md +82 -0
- package/dist/run-BJaRnz-Q.js +3824 -0
- package/dist/run-BJaRnz-Q.js.map +1 -0
- package/dist/run-CMyjOm0Q.js +2 -0
- package/dist/telemetry/flush-main.d.ts +1 -0
- package/dist/telemetry/flush-main.js +14 -0
- package/dist/telemetry/flush-main.js.map +1 -0
- package/package.json +62 -3
- package/src/bin.ts +70 -0
- package/src/bootstrap.ts +156 -0
- package/src/browser.ts +186 -0
- package/src/client.ts +313 -0
- package/src/command.ts +147 -0
- package/src/commands/admin.ts +791 -0
- package/src/commands/authoring.ts +244 -0
- package/src/commands/dev.ts +106 -0
- package/src/commands/index.ts +71 -0
- package/src/commands/interaction.ts +288 -0
- package/src/commands/shared.ts +71 -0
- package/src/commands/viewing.ts +153 -0
- package/src/docs.ts +111 -0
- package/src/exit.ts +89 -0
- package/src/help.ts +170 -0
- package/src/home.ts +111 -0
- package/src/index.ts +23 -0
- package/src/node-gate.ts +15 -0
- package/src/parse.ts +246 -0
- package/src/run.ts +387 -0
- package/src/telemetry/decision.ts +101 -0
- package/src/telemetry/events.ts +147 -0
- package/src/telemetry/flush-main.ts +13 -0
- package/src/telemetry/flush.ts +143 -0
- package/src/telemetry/harness.ts +39 -0
- package/src/telemetry/index.ts +318 -0
- package/src/telemetry/store.ts +379 -0
- package/src/telemetry/timezone.ts +72 -0
- package/src/telemetry/words.ts +87 -0
- package/src/telemetry/zone-sets.ts +182 -0
- package/src/telemetry/zones.generated.ts +720 -0
- package/src/version.ts +43 -0
|
@@ -0,0 +1,1264 @@
|
|
|
1
|
+
{
|
|
2
|
+
"codes": [
|
|
3
|
+
{
|
|
4
|
+
"code": "MOSTRA_A11Y_MINOR",
|
|
5
|
+
"severity": "hint",
|
|
6
|
+
"phase": "a11y",
|
|
7
|
+
"title": "Minor accessibility problem",
|
|
8
|
+
"hint": "Read axe's description of the rule in the message.",
|
|
9
|
+
"explanation": "axe-core found a problem it rates moderate or minor. The message names axe's rule and the elements.",
|
|
10
|
+
"fix": "Optionally follow the rule's advice."
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"code": "MOSTRA_A11Y_SERIOUS",
|
|
14
|
+
"severity": "warning",
|
|
15
|
+
"phase": "a11y",
|
|
16
|
+
"title": "Serious accessibility problem",
|
|
17
|
+
"hint": "Read axe's description of the rule in the message; it names the elements it found.",
|
|
18
|
+
"explanation": "axe-core found a problem it rates critical or serious, such as a button with no accessible name or text with too little contrast. The message names axe's rule and the elements; `count` says how many.",
|
|
19
|
+
"fix": "Follow the rule's advice for each element named, for example add an `aria-label` to an icon button."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"code": "MOSTRA_ACTION_CANCELLED",
|
|
23
|
+
"severity": "warning",
|
|
24
|
+
"phase": "runtime",
|
|
25
|
+
"title": "Action run cancelled",
|
|
26
|
+
"hint": "Start the action again if it should still run.",
|
|
27
|
+
"explanation": "The action run was cancelled from a page, and its `abortSignal` fired. The run ends `cancelled` when the action stops; an action that ignores the signal ends with whatever it returns.",
|
|
28
|
+
"fix": "Nothing to fix. Pass `abortSignal` from `@mostra/server` to `fetch` and other cancellable calls so cancelling stops the work."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"code": "MOSTRA_ACTION_EVENT_INVALID",
|
|
32
|
+
"severity": "error",
|
|
33
|
+
"phase": "runtime",
|
|
34
|
+
"title": "Host event type or payload invalid",
|
|
35
|
+
"hint": "Name the event `host.<name>` with 1 to 64 letters, digits, `.`, `_` and `-`, and keep its payload JSON of at most 64 KiB.",
|
|
36
|
+
"explanation": "Server code called `emit(type, payload)` from `@mostra/server` with a type that isn't `host.` followed by a name, or a payload that isn't JSON or is larger than 64 KiB. The event is not appended; `emit` throws.",
|
|
37
|
+
"fix": "Use a type such as `host.reply-sent` and a small JSON payload. Put larger data in artifact state or a live source and send its key in the event."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"code": "MOSTRA_ACTION_EXPORT_INVALID",
|
|
41
|
+
"severity": "error",
|
|
42
|
+
"phase": "compile",
|
|
43
|
+
"title": "Server module exports something other than an async function",
|
|
44
|
+
"hint": "Export only async functions from a \"use server\" module; move other exports to an ordinary module.",
|
|
45
|
+
"explanation": "A module that starts with `\"use server\"` makes every export a server function the page can call. React's contract allows only async functions there. Mostra reports this code for any other export (a constant, a class, a non-async function, `export *`), naming the export.",
|
|
46
|
+
"fix": "Make the function `async`, or move the value to a separate module without the directive and import it from both sides."
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"code": "MOSTRA_ACTION_INTERRUPTED",
|
|
50
|
+
"severity": "error",
|
|
51
|
+
"phase": "runtime",
|
|
52
|
+
"title": "Action run interrupted",
|
|
53
|
+
"hint": "Check the run's effects at their provider, then start it again with a new key if it should run again.",
|
|
54
|
+
"explanation": "The action run's worker crashed, ran out of memory, was stopped by the event-loop watchdog, or the instance stopped while the run was running. The run ends `failed` with the reason `interrupted`, and Mostra never retries it by itself (D24): an action that had already started a side effect, such as sending an email, may or may not have finished it.",
|
|
55
|
+
"fix": "Look at the effect where it happens (the mail provider's sent folder, say) before running the action again. Pass the provider's own idempotency key from the action (for example, the run's key) so a repeated request can't act twice."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"code": "MOSTRA_ACTION_RUN_NOT_FOUND",
|
|
59
|
+
"severity": "error",
|
|
60
|
+
"phase": "runtime",
|
|
61
|
+
"title": "No such action run",
|
|
62
|
+
"hint": "Start the action again; the run ID names no run of this artifact.",
|
|
63
|
+
"explanation": "A page asked for or cancelled an action run that this artifact doesn't have, or one started from another artifact.",
|
|
64
|
+
"fix": "Use the run IDs `useAction` reports. A page that keeps run IDs itself should drop IDs from other artifacts."
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"code": "MOSTRA_ACTION_THREW",
|
|
68
|
+
"severity": "error",
|
|
69
|
+
"phase": "runtime",
|
|
70
|
+
"title": "Server function threw",
|
|
71
|
+
"hint": "Read the run's log for the stack, then fix the server function or catch the error and return a result instead.",
|
|
72
|
+
"explanation": "A server function threw while it ran. The page gets `{ code: \"MOSTRA_ACTION_THREW\", message }` with the thrown error's message (`useAction`'s `error`, or the rejected promise of a plain call); the stack goes to the action run's log, never to the page. When the error carried a diagnostic code of its own (a `MOSTRA_SECRET_MISSING`, say), that code is reported instead.",
|
|
73
|
+
"fix": "Fix the cause in the function, or catch the error inside it and return a value the page can show. Mostra never retries a run by itself (D24); retry in your own code, or call the action again with a new key."
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"code": "MOSTRA_ACTION_TOO_LARGE",
|
|
77
|
+
"severity": "error",
|
|
78
|
+
"phase": "runtime",
|
|
79
|
+
"title": "Server function arguments or result too large",
|
|
80
|
+
"hint": "Return or pass less data: page through it, or write it to artifact state or a live source instead.",
|
|
81
|
+
"explanation": "A server function's serialized arguments, or an action run's serialized result, is over 16 MiB. A plain call or run with arguments that large is refused before it starts; a run whose result grows past the limit is stopped and ends `failed`.",
|
|
82
|
+
"fix": "Send identifiers rather than whole documents, return a page of results at a time, or publish large data through a live source or artifact state, which the page reads on its own."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"code": "MOSTRA_ACTION_UNKNOWN_FUNCTION",
|
|
86
|
+
"severity": "error",
|
|
87
|
+
"phase": "runtime",
|
|
88
|
+
"title": "No such server function in this version",
|
|
89
|
+
"hint": "Publish the artifact again so the page and its server code come from the same version.",
|
|
90
|
+
"explanation": "The page called a server function ID (`<module path>#<export>`) that the version's server bundle doesn't export. Pages call only functions their own build references, so this means a page and a worker of different versions, or a request written by hand.",
|
|
91
|
+
"fix": "Republish the artifact and reload the page. Call server functions by importing them from their `\"use server\"` module, never by ID."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"code": "MOSTRA_ACTION_UNSERIALIZABLE",
|
|
95
|
+
"severity": "error",
|
|
96
|
+
"phase": "runtime",
|
|
97
|
+
"title": "Server function argument or result outside React's serializable types",
|
|
98
|
+
"hint": "Pass and return only plain objects, arrays, primitives, Map, Set, Date, typed arrays, FormData and promises; convert class instances to plain objects first.",
|
|
99
|
+
"explanation": "Server function arguments and results cross a process boundary, so Mostra accepts exactly the types React documents for Server Functions (D54): strings, numbers, bigints, booleans, `undefined`, `null`, symbols registered with `Symbol.for`, arrays, `Map`, `Set`, typed arrays, `ArrayBuffer`, `Date`, `FormData`, plain objects, other server functions and promises. A result may also be an async iterable, whose items stream to the page. Mostra reports this code for anything else (a class instance, an `Error`, a `RegExp`, an object with a null prototype, a function that isn't a server function, an unregistered symbol, JSX) and names where in the value it is, such as `Argument 2 at .items[1]`. A promise in an argument that rejects fails the call the same way.",
|
|
100
|
+
"fix": "Convert the value to the supported types before the call or the return: `{ ...instance }` or a mapping for class instances, `error.message` for errors and `regexp.source` for regular expressions."
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"code": "MOSTRA_ARTIFACT_DIR_NOT_EMPTY",
|
|
104
|
+
"severity": "error",
|
|
105
|
+
"phase": "host",
|
|
106
|
+
"title": "Directory isn't empty",
|
|
107
|
+
"hint": "Choose a new or empty directory for the artifact.",
|
|
108
|
+
"explanation": "Creating an artifact writes its entry into a directory, and the directory given already has files. Mostra never overwrites them.",
|
|
109
|
+
"fix": "Pass a path that doesn't exist yet or an empty directory. To make existing files an artifact, add the entry yourself and publish."
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"code": "MOSTRA_ARTIFACT_ENTRY_AMBIGUOUS",
|
|
113
|
+
"severity": "error",
|
|
114
|
+
"phase": "manifest",
|
|
115
|
+
"title": "More than one entry file",
|
|
116
|
+
"hint": "Keep one entry file in the directory and rename or remove the others.",
|
|
117
|
+
"explanation": "A directory artifact has exactly one entry, and this directory has more than one of `index.tsx`, `index.jsx` and `index.mdx`, so Mostra can't tell which one is the page.",
|
|
118
|
+
"fix": "Keep the entry you mean and rename the others, for example into `components/`."
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"code": "MOSTRA_ARTIFACT_NO_ENTRY",
|
|
122
|
+
"severity": "error",
|
|
123
|
+
"phase": "manifest",
|
|
124
|
+
"title": "No entry file",
|
|
125
|
+
"hint": "Add `index.tsx` or `index.mdx` to the directory, or publish a single `.tsx` or `.mdx` file.",
|
|
126
|
+
"explanation": "An artifact is a single `.tsx`, `.jsx` or `.mdx` file, or a directory whose entry is `index.tsx`, `index.jsx` or `index.mdx`. The source given is neither.",
|
|
127
|
+
"fix": "Create the entry: its default export is the page, and its manifest is `export const artifact = defineArtifact({ title: \"...\" })` (or frontmatter in MDX). For a single page, publish the file itself."
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"code": "MOSTRA_ARTIFACT_NO_PAGE",
|
|
131
|
+
"severity": "error",
|
|
132
|
+
"phase": "manifest",
|
|
133
|
+
"title": "Entry has no page",
|
|
134
|
+
"hint": "Export the page component as the entry's default export, or add a `pages/` folder.",
|
|
135
|
+
"explanation": "The entry has no default export and the artifact has no `pages/` folder, so there is nothing to render. With `pages/`, each file there is a route and the entry's default export, when present, is the layout around them.",
|
|
136
|
+
"fix": "Add `export default function Page() { ... }` to the entry, or move pages into `pages/index.tsx`, `pages/settings.tsx` and so on."
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"code": "MOSTRA_ARTIFACT_NOT_FOUND",
|
|
140
|
+
"severity": "error",
|
|
141
|
+
"phase": "host",
|
|
142
|
+
"title": "Artifact not found",
|
|
143
|
+
"hint": "Check the artifact ID or source path, or list the home's artifacts with `mostra list`.",
|
|
144
|
+
"explanation": "The artifact named by an ID or a source path doesn't exist in this home: the ID was never published here, or the path was never published.",
|
|
145
|
+
"fix": "Use an ID or path from `mostra list`. A source that was never published becomes an artifact at its first `mostra publish`. A host that uses its own home sees only the artifacts published there."
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"code": "MOSTRA_ARTIFACT_SOURCE_MISSING",
|
|
149
|
+
"severity": "error",
|
|
150
|
+
"phase": "publish",
|
|
151
|
+
"title": "Artifact source missing",
|
|
152
|
+
"hint": "Publish from the artifact's source path, or restore the directory the message names.",
|
|
153
|
+
"explanation": "Publishing needs the artifact's source files. The path given, or the path the artifact was last published from, doesn't exist. Versions already published stay readable, because Mostra keeps a snapshot of their source in the home.",
|
|
154
|
+
"fix": "Pass the path where the source lives now. Its manifest `id`, if it has one, keeps the artifact identity at the new path."
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"code": "MOSTRA_ARTIFACT_SOURCE_UNREADABLE",
|
|
158
|
+
"severity": "error",
|
|
159
|
+
"phase": "publish",
|
|
160
|
+
"title": "Artifact source can't be read",
|
|
161
|
+
"hint": "Fix the file or directory the message names so your user can read it, then publish again.",
|
|
162
|
+
"explanation": "Mostra couldn't read a file of the artifact's source: permissions, a file that disappeared while it was copied, or two names that are the same after Unicode normalization. Nothing was published.",
|
|
163
|
+
"fix": "Make the named file readable, rename one of two clashing names, or exclude the file with `.mostraignore` in the artifact's root."
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"code": "MOSTRA_ARTIFACT_TEMPLATE_UNKNOWN",
|
|
167
|
+
"severity": "error",
|
|
168
|
+
"phase": "host",
|
|
169
|
+
"title": "Unknown template",
|
|
170
|
+
"hint": "Create the artifact without a template, or use a template this Mostra release provides.",
|
|
171
|
+
"explanation": "The template named isn't one this runtime provides. Without a template, Mostra writes a minimal entry with a generated artifact ID.",
|
|
172
|
+
"fix": "Leave out the template, or use one of the templates of this release."
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"code": "MOSTRA_ARTIFACT_VERSION_COLLECTED",
|
|
176
|
+
"severity": "error",
|
|
177
|
+
"phase": "host",
|
|
178
|
+
"title": "Version collected",
|
|
179
|
+
"hint": "Open the artifact's latest version, or publish this version's source again to restore its files.",
|
|
180
|
+
"explanation": "`mostra gc` removed this version's files because nothing referenced it (D140). Its ID and number stay in the ledger forever, so history and events still name it, but it can't be opened or linked.",
|
|
181
|
+
"fix": "Open a version that still exists (`artifact/get` marks collected ones), or publish the exact source of this version again: publish restores its files under the same ID and number."
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"code": "MOSTRA_ARTIFACT_VERSION_NOT_FOUND",
|
|
185
|
+
"severity": "error",
|
|
186
|
+
"phase": "host",
|
|
187
|
+
"title": "No such version",
|
|
188
|
+
"hint": "Name a version the artifact has (`artifact/get` lists them), or leave the version out for the latest.",
|
|
189
|
+
"explanation": "The request named a version number or version ID that this artifact never published in this home. Viewers only ever open published versions (D09), so there is nothing to show.",
|
|
190
|
+
"fix": "List the artifact's versions with `artifact/get` and pick one, or omit the version to open the latest. A link to `/a/<artifactId>/v/<number>` needs a number from that list."
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"code": "MOSTRA_BUILD_CRASHED",
|
|
194
|
+
"severity": "error",
|
|
195
|
+
"phase": "compile",
|
|
196
|
+
"title": "Builder crashed",
|
|
197
|
+
"hint": "Publish again; if it crashes again, report the builder's last output from the message.",
|
|
198
|
+
"explanation": "The builder child process exited before it finished, for example after running out of memory or on a signal. The supervisor and everything else in the instance keep working, and nothing was published. The message carries the builder's last lines of error output.",
|
|
199
|
+
"fix": "Run the publish again, which starts a fresh builder. A crash that repeats points at the artifact's size or at a defect in Mostra: very large inline data is better kept in `public/` or loaded through a live source."
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"code": "MOSTRA_BUILD_FAILED",
|
|
203
|
+
"severity": "error",
|
|
204
|
+
"phase": "compile",
|
|
205
|
+
"title": "Build failed",
|
|
206
|
+
"hint": "Fix the error at the reported location, then publish again.",
|
|
207
|
+
"explanation": "The builder couldn't bundle the artifact: a syntax error, an invalid JSX or MDX construct, a CSS error or another bundler error. The message carries the bundler's own explanation, and the location points at the file, line and column when the bundler reports one. Nothing was published.",
|
|
208
|
+
"fix": "Open the reported file at the reported line and fix the code there. For MDX, check that JSX in the document is closed and that `{` and `<` in prose are escaped. Run `mostra verify` to see the same error with the type checker's findings."
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"code": "MOSTRA_BUILD_TIMEOUT",
|
|
212
|
+
"severity": "error",
|
|
213
|
+
"phase": "compile",
|
|
214
|
+
"title": "Build timed out",
|
|
215
|
+
"hint": "Make the build smaller, for example by moving large data into `public/`, then publish again.",
|
|
216
|
+
"explanation": "The build took longer than its limit (180 seconds) and was stopped. Nothing was published.",
|
|
217
|
+
"fix": "Move large data files that are imported into code into `public/` and fetch them at run time, split very large modules, and remove unused imports of heavy libraries. Then publish again."
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"code": "MOSTRA_BUILD_UNRESOLVED",
|
|
221
|
+
"severity": "error",
|
|
222
|
+
"phase": "compile",
|
|
223
|
+
"title": "Import can't be resolved",
|
|
224
|
+
"hint": "Correct the import path, or import the package from the warm set or add it with `mostra add`.",
|
|
225
|
+
"explanation": "An import in the artifact names a file or package the builder can't find. Relative imports resolve inside the artifact's own files, `@/...` resolves from the artifact's root, and package imports resolve from Mostra's warm set and the artifact's installed packages. The message names the import and the file that contains it.",
|
|
226
|
+
"fix": "For a file, check the path and its extension against the artifact's files. For a package, check its name; packages outside the warm set install with `mostra add <package>`."
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"code": "MOSTRA_CLI_CONFIG_UNWRITABLE",
|
|
230
|
+
"severity": "error",
|
|
231
|
+
"phase": "platform",
|
|
232
|
+
"title": "The CLI's config directory can't be written",
|
|
233
|
+
"hint": "Make the directory the message names yours and writable (or point MOSTRA_CONFIG_DIR at one that is), then run the command again; DO_NOT_TRACK=1 turns telemetry off without writing anything.",
|
|
234
|
+
"explanation": "`mostra telemetry on` and `off` record the choice in the CLI's config directory (`MOSTRA_CONFIG_DIR`, else `${XDG_CONFIG_HOME:-~/.config}/mostra`). The directory or its `telemetry.json` can't be written (another user owns it, the disk is full, it's read-only), so the choice wasn't recorded and nothing changed. Telemetry never stops another command for this: a store that can't be written means nothing is sent.",
|
|
235
|
+
"fix": "Fix the directory's owner or mode, or set `MOSTRA_CONFIG_DIR` to a directory you own, and run the command again. `DO_NOT_TRACK=1` or `MOSTRA_TELEMETRY=0` in your environment turn telemetry off without a file."
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"code": "MOSTRA_CLI_UNKNOWN_COMMAND",
|
|
239
|
+
"severity": "error",
|
|
240
|
+
"phase": "host",
|
|
241
|
+
"title": "Unknown command",
|
|
242
|
+
"hint": "Pick one of the commands this message lists; `mostra --help` describes each.",
|
|
243
|
+
"explanation": "The first word after `mostra` isn't a command this CLI has. The message lists the commands that exist. Commands that later releases add (sharing, export, plugins, terminals) appear only once they exist, never as placeholders.",
|
|
244
|
+
"fix": "Run one of the listed commands. `mostra --help` lists every command with a one-line summary."
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"code": "MOSTRA_CLI_USAGE",
|
|
248
|
+
"severity": "error",
|
|
249
|
+
"phase": "host",
|
|
250
|
+
"title": "Command used wrongly",
|
|
251
|
+
"hint": "Run `mostra <command> --help` for the command's arguments and flags, then run it again.",
|
|
252
|
+
"explanation": "The command line didn't fit the command's definition: a missing or extra argument, an unknown flag, a flag without its value, or a value of the wrong form (a duration, a number, JSON). Nothing ran. In `--json` mode the error is the envelope's `error`, and the exit code is 2.",
|
|
253
|
+
"fix": "Read `mostra <command> --help` (or `--help --json` for the machine-readable definition) and correct the arguments."
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"code": "MOSTRA_CONSOLE_ERROR",
|
|
257
|
+
"severity": "error",
|
|
258
|
+
"phase": "console",
|
|
259
|
+
"title": "Error logged to the console",
|
|
260
|
+
"hint": "Fix what the logged error describes; React logs errors its boundaries catch here too.",
|
|
261
|
+
"explanation": "The page logged an error with `console.error` while verify rendered it or used its controls. Errors caught by React error boundaries, the root's included, are logged this way. A viewer's page would log the same.",
|
|
262
|
+
"fix": "Read the message and fix its cause in the artifact's code. Errors logged by a library usually name what it was given."
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"code": "MOSTRA_CONSOLE_WARNING",
|
|
266
|
+
"severity": "hint",
|
|
267
|
+
"phase": "console",
|
|
268
|
+
"title": "Warning logged to the console",
|
|
269
|
+
"hint": "Read the warning; nothing is broken by it.",
|
|
270
|
+
"explanation": "The page logged a warning with `console.warn`. Warnings are often a library's advice, so they are hints.",
|
|
271
|
+
"fix": "Nothing is required."
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"code": "MOSTRA_DEP_INSTALL_FAILED",
|
|
275
|
+
"severity": "error",
|
|
276
|
+
"phase": "compile",
|
|
277
|
+
"title": "Package install failed",
|
|
278
|
+
"hint": "Read the installer's output in the message, then fix the package spec or choose another version.",
|
|
279
|
+
"explanation": "The package installer failed for a reason other than a missing package or the network: most often a package's lifecycle script (`preinstall`, `install`, `postinstall`) exited with an error, or a downloaded package didn't match its integrity hash. Lifecycle scripts run in an install child in the artifact's directory with the artifact's environment. The message carries the end of the installer's output.",
|
|
280
|
+
"fix": "Fix what the output names. For a failing install script, check what it needs (a compiler, a system library) or use another version of the package."
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"code": "MOSTRA_DEP_MISSING",
|
|
284
|
+
"severity": "error",
|
|
285
|
+
"phase": "compile",
|
|
286
|
+
"title": "Package not added",
|
|
287
|
+
"hint": "Run the `mostra add` command in this diagnostic's fix, then publish again.",
|
|
288
|
+
"explanation": "The artifact imports a package that is neither in Mostra's warm set nor in the artifact's lockfile, and the host has set the dependency policy to `explicit`. Under that policy a package enters an artifact's lockfile only when it is added on purpose, so Mostra installs nothing on its own. The location points at the first import of the package, and the fix carries the exact command that adds every missing package.",
|
|
289
|
+
"fix": "Run the command from the fix (`mostra add <package…> --artifact <path>`, or the host protocol method `deps/add`), then publish again. To use a package from the warm set instead, change the import."
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"code": "MOSTRA_DEP_NOT_FOUND",
|
|
293
|
+
"severity": "error",
|
|
294
|
+
"phase": "compile",
|
|
295
|
+
"title": "Package not found",
|
|
296
|
+
"hint": "Check the package name and version against the npm registry, then fix the import or the spec.",
|
|
297
|
+
"explanation": "The registry has no package by that name, or no version that matches the requested one. A spec without an exact version only matches releases at least a day old, so a package whose every release is newer than that isn't found either. The message names the package and what the registry answered.",
|
|
298
|
+
"fix": "Correct the package name in the import or in the `mostra add` spec. To use a release less than a day old, add it at its exact version: `mostra add <package>@<version>`."
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"code": "MOSTRA_DEP_OFFLINE",
|
|
302
|
+
"severity": "error",
|
|
303
|
+
"phase": "compile",
|
|
304
|
+
"title": "Package unavailable offline",
|
|
305
|
+
"hint": "Connect to the network and publish again, or import a package the home already holds.",
|
|
306
|
+
"explanation": "Mostra is offline (`MOSTRA_OFFLINE` is set, no network interface is up, or the registry can't be reached), and the artifact needs a package that the home's package store doesn't hold yet. Everything the store holds keeps working offline, including rebuilds of published versions. The message names the missing package.",
|
|
307
|
+
"fix": "Publish again once the registry is reachable; the package then stays in the store for later offline use. Otherwise remove the import, or use a package from the warm set."
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"code": "MOSTRA_DEP_SPEC_INVALID",
|
|
311
|
+
"severity": "error",
|
|
312
|
+
"phase": "host",
|
|
313
|
+
"title": "Invalid package spec",
|
|
314
|
+
"hint": "Write the spec as `name`, `name@version`, `name@range` or `name@tag`.",
|
|
315
|
+
"explanation": "A package spec given to `mostra add` (`deps/add`) isn't an npm registry spec. Mostra adds packages from the registry by name, optionally with a version, a semver range or a dist-tag; scoped names such as `@scope/name@1.2.3` work too. Git URLs, local paths and tarball URLs aren't registry specs.",
|
|
316
|
+
"fix": "Correct the spec, for example `mostra add three@0.186.1` or `mostra add @xyflow/react`."
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"code": "MOSTRA_DEP_TIMEOUT",
|
|
320
|
+
"severity": "error",
|
|
321
|
+
"phase": "compile",
|
|
322
|
+
"title": "Package install timed out",
|
|
323
|
+
"hint": "Check the network and the registry, then publish again.",
|
|
324
|
+
"explanation": "Installing the artifact's packages took longer than 300 seconds and was stopped. A slow registry, a stalled download or a lifecycle script that never ends are the usual causes. Nothing was published, and packages already in the store stay there.",
|
|
325
|
+
"fix": "Publish again; packages that finished downloading aren't fetched twice. When a package's install script hangs, use another version of the package or another package."
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"code": "MOSTRA_DEP_WARM_CONFLICT",
|
|
329
|
+
"severity": "error",
|
|
330
|
+
"phase": "compile",
|
|
331
|
+
"title": "Warm package version requested",
|
|
332
|
+
"hint": "Add the package without a version, or with one the warm set's version satisfies.",
|
|
333
|
+
"explanation": "The package is part of Mostra's warm set, which every artifact resolves at one fixed version so that React and the other shared packages exist exactly once. The requested version doesn't match the warm one, and an artifact can't replace a warm package.",
|
|
334
|
+
"fix": "Drop the version from the spec (`mostra add react`), or request a range the warm version satisfies. The message names the warm version."
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"code": "MOSTRA_ENV_BIND_FAILED",
|
|
338
|
+
"severity": "error",
|
|
339
|
+
"phase": "host",
|
|
340
|
+
"title": "Gateway can't bind",
|
|
341
|
+
"hint": "Start Mostra with an address this machine has, or without `--bind` to use the loopback address.",
|
|
342
|
+
"explanation": "The gateway couldn't listen on the address it was given: `--bind` named an address no interface has, a wildcard bind came without `--url-host`, or the operating system refused the address. Mostra doesn't start rather than serve on an address nobody asked for.",
|
|
343
|
+
"fix": "Omit `--bind` to serve on `127.0.0.1` only (the default). For a wider bind, pass an address of one of this machine's interfaces, and with `0.0.0.0` or `::` also `--url-host <name>`, the name viewers use to reach it."
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"code": "MOSTRA_ENV_BROWSER_MISSING",
|
|
347
|
+
"severity": "error",
|
|
348
|
+
"phase": "host",
|
|
349
|
+
"title": "Browser for verify missing",
|
|
350
|
+
"hint": "Run the runtime bundle's `bin/mostra-setup` (with network access) to fetch the browser verify uses, then verify again.",
|
|
351
|
+
"explanation": "Verify renders pages in the Chromium headless shell its Playwright release pins. The runtime bundle fetches that browser when it is set up and checks every file of it (D142). It wasn't there, so verify ran only the stages that need no browser (type check, build and the field-ID scan) and reported this error. Publishing needs `--force` until it is installed.",
|
|
352
|
+
"fix": "Run `bin/mostra-setup` in the runtime bundle's directory (the message names it) with network access; it fetches and checks the pinned browser. Outside a bundle, in a development checkout, run `npx playwright-core install chromium-headless-shell`. Then verify again."
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"code": "MOSTRA_ENV_BUNDLE_DOWNLOAD_FAILED",
|
|
356
|
+
"severity": "error",
|
|
357
|
+
"phase": "platform",
|
|
358
|
+
"title": "Runtime bundle download failed",
|
|
359
|
+
"hint": "Check the network or proxy (`HTTPS_PROXY`), then run the command again: a retry starts the download over.",
|
|
360
|
+
"explanation": "The runtime bundle for this release and platform isn't in the local cache yet, and fetching it failed: the network or a proxy refused it, the server answered with an error, the connection stalled for 60 seconds, or the disk ran out of space while it was written. Nothing partial is kept.",
|
|
361
|
+
"fix": "Check the connection, and set `HTTPS_PROXY` (and `NO_PROXY`) when the network needs a proxy. Behind a firewall that blocks GitHub, host the release's files on a reachable server and set `MOSTRA_BUNDLE_MIRROR` to its base URL (a `file:` URL works for a local directory). Free space in the cache directory (`MOSTRA_CACHE_DIR`) if the message says the disk is full."
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"code": "MOSTRA_ENV_BUNDLE_INVALID",
|
|
365
|
+
"severity": "error",
|
|
366
|
+
"phase": "platform",
|
|
367
|
+
"title": "Runtime bundle failed verification",
|
|
368
|
+
"hint": "Nothing was installed; install Mostra again, and if it fails the same way, report it with the message.",
|
|
369
|
+
"explanation": "Mostra checks every runtime bundle before it runs anything from it: the archive against the SHA-256 the installing package pins, then each extracted file against the bundle's own file list, and the verify browser against the bundle's browser pin. One of them differed, so the download was corrupted, changed on the way or replaced, and Mostra refused it. A bundle already installed that fails a later check (`mostra doctor --deep`) is refused the same way.",
|
|
370
|
+
"fix": "Run the install again (`npm create mostra`, or the command that started it), which downloads a fresh copy. When a mirror is configured (`MOSTRA_BUNDLE_MIRROR`), check that it serves the release's files unchanged. Check a file you downloaded yourself against the release's `SHA256SUMS`, or with `gh attestation verify <file> --repo mostra-dev/mostra`."
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"code": "MOSTRA_ENV_BUNDLE_UNAVAILABLE",
|
|
374
|
+
"severity": "error",
|
|
375
|
+
"phase": "platform",
|
|
376
|
+
"title": "No runtime bundle available",
|
|
377
|
+
"hint": "Run this once with network access, or point `MOSTRA_BUNDLE` at an extracted bundle.",
|
|
378
|
+
"explanation": "Mostra runs on its own runtime bundle, found in the local cache, beside the installed package or at `MOSTRA_BUNDLE`. None was there, and no download could start: Mostra is offline (`MOSTRA_OFFLINE`), this build of the package pins no bundle for this platform, or the platform has none.",
|
|
379
|
+
"fix": "Run the command once with network access and without `MOSTRA_OFFLINE`, so the pinned bundle is fetched and cached; later runs work offline. On a machine without network access, extract the release's archive for the platform and set `MOSTRA_BUNDLE` to its directory. A development checkout uses its own built runtime instead."
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"code": "MOSTRA_ENV_NODE_UNSUPPORTED",
|
|
383
|
+
"severity": "error",
|
|
384
|
+
"phase": "platform",
|
|
385
|
+
"title": "Node.js too old to start Mostra",
|
|
386
|
+
"hint": "Run `mostra` with Node.js 22.19 or later, or run the runtime bundle's own `bin/mostra`, which needs no Node.js.",
|
|
387
|
+
"explanation": "A `mostra` (or `npm create mostra`) installed from npm starts on the machine's Node.js only long enough to find its runtime bundle, then every Mostra process runs on the bundle's own Node.js (RT-01, D142). That start needs Node.js 22.19 or later, and this one is older, so Mostra stopped before loading anything.",
|
|
388
|
+
"fix": "Upgrade the machine's Node.js to 22.19 or later, or run Mostra without npm: download the runtime bundle for your platform from the GitHub release, check it against `SHA256SUMS`, extract it, run its `bin/mostra-setup` once, then use its `bin/mostra`."
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"code": "MOSTRA_ENV_PORT_TAKEN",
|
|
392
|
+
"severity": "warning",
|
|
393
|
+
"phase": "host",
|
|
394
|
+
"title": "Leased port taken",
|
|
395
|
+
"hint": "Open the artifact through a new link: `view/url` or `mostra open` mints one on the new port.",
|
|
396
|
+
"explanation": "The shell's port or an artifact's port is leased per home and reused across restarts, so links keep working (D62, D99). At start-up another program held the leased port, so Mostra leased a new one. Links that named the old port stop working; the shell's port changing affects every link of the home.",
|
|
397
|
+
"fix": "Mint new links with `view/url` (the publish receipt of the next publish carries the new default link too). Stop the program that took the port if you want the old links back; `mostra doctor` names it where it can."
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"code": "MOSTRA_ENV_RUNTIME_MISSING",
|
|
401
|
+
"severity": "error",
|
|
402
|
+
"phase": "host",
|
|
403
|
+
"title": "Runtime not found",
|
|
404
|
+
"hint": "Reinstall Mostra, or set `MOSTRA_RUNTIME_BIN` to the runtime's `mostra-runtime` entry.",
|
|
405
|
+
"explanation": "The CLI starts and attaches to the home's instance through the runtime binary (`mostra-runtime`, D85). It looked, in order, for `MOSTRA_BUNDLE`, `MOSTRA_RUNTIME_BIN`, the runtime bundle it runs from, its release's pinned bundle and a development checkout's built runtime (D142), and found nothing it could run: here, `MOSTRA_RUNTIME_BIN` names a file that doesn't exist, or the runtime couldn't be started.",
|
|
406
|
+
"fix": "Unset `MOSTRA_RUNTIME_BIN` or point it at a `mostra-runtime` entry (its `dist/bin.js`), or reinstall Mostra so the CLI and its runtime are complete."
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"code": "MOSTRA_ENV_SERVICE_FAILED",
|
|
410
|
+
"severity": "error",
|
|
411
|
+
"phase": "host",
|
|
412
|
+
"title": "Login service could not be installed",
|
|
413
|
+
"hint": "Read the message, fix what it names, and run the install again.",
|
|
414
|
+
"explanation": "`mostra daemon install` couldn't register the home's daemon as a login service: writing the launchd agent or systemd user unit failed, or `launchctl` or `systemctl --user` refused to load it.",
|
|
415
|
+
"fix": "Check the named file's directory permissions, and on Linux that a systemd user session is running (`systemctl --user status`). On a machine without one, start the daemon from your own login scripts with `mostra daemon start`."
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"code": "MOSTRA_ENV_SHELL_MISSING",
|
|
419
|
+
"severity": "error",
|
|
420
|
+
"phase": "host",
|
|
421
|
+
"title": "Shell app missing",
|
|
422
|
+
"hint": "Reinstall the Mostra runtime, or set `MOSTRA_SHELL_DIR` to its built shell.",
|
|
423
|
+
"explanation": "Viewers open artifacts inside the shell, Mostra's trusted page, which ships with the runtime as built files. The runtime couldn't find them, which means the runtime installation is incomplete. Artifact frames are still served.",
|
|
424
|
+
"fix": "Reinstall Mostra so the runtime bundle is complete. A custom layout can point the runtime at the shell's built directory with `MOSTRA_SHELL_DIR`."
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"code": "MOSTRA_ENV_WARM_MISSING",
|
|
428
|
+
"severity": "error",
|
|
429
|
+
"phase": "host",
|
|
430
|
+
"title": "Warm package set missing",
|
|
431
|
+
"hint": "Reinstall the Mostra runtime, or set `MOSTRA_WARM_DIR` to its warm package set.",
|
|
432
|
+
"explanation": "Builds resolve React, Tailwind and Mostra's own client packages from the warm package set that ships with the runtime. The runtime couldn't find it, which means the runtime installation is incomplete.",
|
|
433
|
+
"fix": "Reinstall Mostra so the runtime bundle is complete. A custom layout can point the runtime at the warm set's directory with `MOSTRA_WARM_DIR`."
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"code": "MOSTRA_FIELD_CONFLICT",
|
|
437
|
+
"severity": "error",
|
|
438
|
+
"phase": "runtime",
|
|
439
|
+
"title": "Field changed by another writer",
|
|
440
|
+
"hint": "Read the value again, then write it; for a value several writers change often, give each writer a field of its own.",
|
|
441
|
+
"explanation": "Every write names the revision it was based on, and a field changed after it is a conflict, never overwritten silently (D22). `window.storage` writes end with the last write: on a conflict it writes again over the newer value, a few times. When another writer kept changing the field each time, the write is refused with this code, and the field keeps the other writer's value.",
|
|
442
|
+
"fix": "Read the key again and write the new value. For a counter or a list that many viewers change at once, store each viewer's part under its own key (`votes.<viewer>`) and combine them when reading."
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"code": "MOSTRA_FIELD_DUPLICATE_ID",
|
|
446
|
+
"severity": "error",
|
|
447
|
+
"phase": "lint",
|
|
448
|
+
"title": "Field ID used for two different fields",
|
|
449
|
+
"hint": "Give each of these fields its own ID.",
|
|
450
|
+
"explanation": "One field ID is used for two different fields: with two hook kinds (`useField` and `useChoice`, say), two scopes (`viewer` and `artifact`), or initial values of two types. The two would overwrite each other's saved value. The same ID used the same way twice is a deliberately shared value and isn't reported here.",
|
|
451
|
+
"fix": "Rename one of them, for example `notes` and `notes.summary`, so each persisted value has its own ID."
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"code": "MOSTRA_FIELD_ID_INVALID",
|
|
455
|
+
"severity": "error",
|
|
456
|
+
"phase": "runtime",
|
|
457
|
+
"title": "Invalid field ID",
|
|
458
|
+
"hint": "Use a stable field ID of 1 to 256 characters: dot-separated parts, none empty.",
|
|
459
|
+
"explanation": "Every persisted value has an explicit, stable field ID (D52). An ID is 1 to 256 characters with no control characters; dots separate the parts that nest in results (`reply.m1`), so it can't start or end with a dot or hold two in a row.",
|
|
460
|
+
"fix": "Give the field a fixed ID such as `layout` or `reply.m1` (one per message, from its ID), and keep it the same across renders and versions so drafts carry over."
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"code": "MOSTRA_FIELD_ID_UNSTABLE",
|
|
464
|
+
"severity": "error",
|
|
465
|
+
"phase": "lint",
|
|
466
|
+
"title": "Field ID changes between renders",
|
|
467
|
+
"hint": "Build the field's ID from stable data, such as a record's ID, never from random numbers or the time.",
|
|
468
|
+
"explanation": "Verify loaded the page twice with identical inputs and a fixed clock, and a field ID differed between the two loads. A viewer's saved answer would then be lost on every reload. IDs an interaction creates, such as a new list row's, are new fields and aren't reported.",
|
|
469
|
+
"fix": "Derive the ID from something stable, for example a template with the record's ID instead of one with `Math.random()`."
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"code": "MOSTRA_FIELD_MUTATION_ID_REUSED",
|
|
473
|
+
"severity": "error",
|
|
474
|
+
"phase": "runtime",
|
|
475
|
+
"title": "Mutation ID reused",
|
|
476
|
+
"hint": "Generate a new mutation ID for every new change.",
|
|
477
|
+
"explanation": "A mutation ID identifies one change, so a retry after a timeout replays its recorded result (IN-01). This ID was already used for a change with other contents or another target. Mostra refuses it rather than answer with the result of a change nobody sent now.",
|
|
478
|
+
"fix": "Create a fresh `mut_` ID for each change and reuse an ID only to retry exactly the same change."
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"code": "MOSTRA_FIELD_SHARED",
|
|
482
|
+
"severity": "hint",
|
|
483
|
+
"phase": "lint",
|
|
484
|
+
"title": "Field ID shared by several controls",
|
|
485
|
+
"hint": "Nothing to fix if these controls are meant to edit one value; give each its own ID if not.",
|
|
486
|
+
"explanation": "Several mounted components use one field ID in the same way, so they all edit one saved value. That is how a value is shared deliberately; in a list, it can also mean every row edits the same answer.",
|
|
487
|
+
"fix": "If each row should keep its own answer, include the row's identity in the ID, such as a template that adds the task's ID after `done.`."
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"code": "MOSTRA_FIELD_TOO_LARGE",
|
|
491
|
+
"severity": "error",
|
|
492
|
+
"phase": "runtime",
|
|
493
|
+
"title": "Field value too large",
|
|
494
|
+
"hint": "Split large data across fields, keeping each value under 1 MiB and the whole document under 16 MiB.",
|
|
495
|
+
"explanation": "A field value is at most 1 MiB of JSON and a draft or artifact state at most 16 MiB in all (DATA_MODEL §5). This write would pass one of those limits, so Mostra refused it whole: nothing was truncated, and the page keeps the value locally.",
|
|
496
|
+
"fix": "Split the value across several fields under one dotted prefix (`report.part1`, `report.part2`); they nest again in results."
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"code": "MOSTRA_FIELD_UNBOUND",
|
|
500
|
+
"severity": "hint",
|
|
501
|
+
"phase": "smoke",
|
|
502
|
+
"title": "Input not bound to a field",
|
|
503
|
+
"hint": "Bind the input with `useField` (or a kit input with an `id`) if its value should be saved and submitted.",
|
|
504
|
+
"explanation": "Verify's smoke test typed into an input and the page saved nothing: the input isn't bound to a field, so what a viewer types there is lost on reload and isn't part of a submission. A search box or a filter may be meant that way.",
|
|
505
|
+
"fix": "Use `const [value, setValue] = useField(\"<id>\", \"\")` for the input's value, or leave it if it isn't meant to persist."
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
"code": "MOSTRA_HOME_DISK_FULL",
|
|
509
|
+
"severity": "error",
|
|
510
|
+
"phase": "host",
|
|
511
|
+
"title": "Disk full",
|
|
512
|
+
"hint": "Free space on the disk that holds the Mostra home, then retry.",
|
|
513
|
+
"explanation": "A ledger write failed because the disk holding the home is full. The transaction was rolled back, so nothing partial was saved and nothing that was acknowledged earlier is lost. Viewers keep unsaved edits in their browser until a retry succeeds.",
|
|
514
|
+
"fix": "Free space on that disk (`mostra gc` removes unreferenced versions; build caches can be deleted), then retry the operation. Retries with the same request or mutation ID are safe."
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"code": "MOSTRA_HOME_GC_INCOMPLETE",
|
|
518
|
+
"severity": "warning",
|
|
519
|
+
"phase": "host",
|
|
520
|
+
"title": "gc didn't finish a step",
|
|
521
|
+
"hint": "Run `mostra gc` again: what this run removed is in its result, and the next run picks up what it left.",
|
|
522
|
+
"explanation": "`mostra gc` removes what nothing references in steps: version files, source snapshots, lock layouts, the package store, verify's caches and, when asked, events. One step failed (the message names it and why), so it left that step's files in place. Everything an earlier step removed is listed in the result, and the versions it collected stay collected. The home is consistent: what gc left is still recorded as there.",
|
|
523
|
+
"fix": "Run `mostra gc` again; a failure that repeats names its cause in the message (for example, a file the user can't remove)."
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"code": "MOSTRA_HOME_GONE",
|
|
527
|
+
"severity": "error",
|
|
528
|
+
"phase": "host",
|
|
529
|
+
"title": "Home directory removed",
|
|
530
|
+
"hint": "Restore or recreate the home directory, then start Mostra again.",
|
|
531
|
+
"explanation": "The instance's home directory disappeared or was replaced while the instance was running. Writing anywhere else could split the home's data, so the instance stops accepting requests, stops its child processes and exits.",
|
|
532
|
+
"fix": "Put the home back (or choose a new one with `--home` or `MOSTRA_HOME`) and start Mostra again. Clients reconnect and retry their requests by ID."
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"code": "MOSTRA_HOME_INTEGRITY",
|
|
536
|
+
"severity": "error",
|
|
537
|
+
"phase": "host",
|
|
538
|
+
"title": "Stored version or file damaged",
|
|
539
|
+
"hint": "Publish the version's source again to rebuild a damaged version in place, and run `mostra doctor` for other damaged objects.",
|
|
540
|
+
"explanation": "Mostra checks stored versions, source snapshots and blobs against their recorded content digests before using them. This code means a stored object is missing or its content changed after it was written, for example after a disk error or a manual edit inside the home. The message names the object.",
|
|
541
|
+
"fix": "Leave files inside the home unchanged. To repair a version, publish the same source again: Mostra rebuilds the version's directory and puts it back under the same version ID, and the artifact keeps its version number. If the source has changed since, the publish makes a new version and the damaged one stays as it is; its source snapshot in the home holds the original files. `mostra doctor` lists other damaged objects."
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
"code": "MOSTRA_HOME_LEDGER_UNREADABLE",
|
|
545
|
+
"severity": "error",
|
|
546
|
+
"phase": "host",
|
|
547
|
+
"title": "Ledger can't be read",
|
|
548
|
+
"hint": "Restore the ledger from the latest `ledger.sqlite.bak-*` backup in the home's `store/` directory, or move the damaged file aside.",
|
|
549
|
+
"explanation": "The ledger (`store/ledger.sqlite` in the home) holds drafts, submissions, events and the rest of the home's interaction data. Mostra reports this code when the file can't be opened, isn't a SQLite database, isn't a Mostra ledger, or fails SQLite's integrity check. Mostra never replaces an existing ledger with an empty one.",
|
|
550
|
+
"fix": "Stop every Mostra process for this home. Copy `store/ledger.sqlite` somewhere safe, then restore the newest `store/ledger.sqlite.bak-<from>-<to>` in its place, or move the damaged file aside to start an empty ledger. Versions, sources and blobs in the home are untouched either way."
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
"code": "MOSTRA_HOME_LOCKED",
|
|
554
|
+
"severity": "error",
|
|
555
|
+
"phase": "host",
|
|
556
|
+
"title": "Home in use by another instance",
|
|
557
|
+
"hint": "Use the instance that already owns this home, or stop it (`mostra daemon stop`, or end the process named in the message) and start again.",
|
|
558
|
+
"explanation": "One Mostra instance owns a home at a time. It holds an exclusive lock on the home's ledger, and the operating system releases that lock when the process exits. Mostra reports this code in two cases: `mostra host` was started for a home another instance already owns, or a starter found the owner but couldn't reach its control socket. The message names the owner's process ID.",
|
|
559
|
+
"fix": "To share the running instance, attach to it: start the client with the same home (`MOSTRA_HOME` or `--home`) instead of starting a second instance. To replace it, stop it with `mostra daemon stop`, or end the process named in the message, and start again. A host that needs its own instance gives it its own home."
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"code": "MOSTRA_HOME_MISMATCH",
|
|
563
|
+
"severity": "error",
|
|
564
|
+
"phase": "host",
|
|
565
|
+
"title": "Instance serves a different home",
|
|
566
|
+
"hint": "Connect to the instance for the home you expect, or start it with `--home` set to that home.",
|
|
567
|
+
"explanation": "A client sent `home.path` in `mostra/initialize`, and it names a different home from the one the instance locked at start-up. The home is chosen when the instance starts (`--home`, then `MOSTRA_HOME`, then the platform default), so `home.path` is a check: it stops a client from writing to a home it didn't mean.",
|
|
568
|
+
"fix": "Start the instance with `--home` set to the home the client expects, or connect to the socket of the instance that serves it. Leave `home.path` out to accept whichever home the instance serves."
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"code": "MOSTRA_HOME_NOT_ALWAYS_ON",
|
|
572
|
+
"severity": "warning",
|
|
573
|
+
"phase": "host",
|
|
574
|
+
"title": "Long-lived artifacts without an always-on daemon",
|
|
575
|
+
"hint": "Run `mostra daemon install` so the home's daemon runs as a login service and these artifacts answer at any hour.",
|
|
576
|
+
"explanation": "The home has artifacts with submission policy `none`, which are meant to stay open (dashboards, task managers, D63), but no login service runs its daemon. Without one, the daemon exits after 30 idle minutes and their links stop answering until a command starts it again.",
|
|
577
|
+
"fix": "Run `mostra daemon install`. It registers a launchd or systemd user service that keeps the home's daemon running; `mostra daemon uninstall` removes it."
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
"code": "MOSTRA_HOME_NOT_OWNED",
|
|
581
|
+
"severity": "error",
|
|
582
|
+
"phase": "host",
|
|
583
|
+
"title": "Directory not owned by you",
|
|
584
|
+
"hint": "Choose a home you own with `--home` or `MOSTRA_HOME`, or give the directory named in the message back to your user with `chown`.",
|
|
585
|
+
"explanation": "Mostra keeps secrets, answers and its ledger in the home, and its control socket in a runtime directory, so it uses only directories that belong to the user running it. It reports this code when the home or the runtime directory is owned by another user, or when the path exists but isn't a directory. Mostra changes nothing in that case.",
|
|
586
|
+
"fix": "Point Mostra at a directory you own: `--home <dir>` or `MOSTRA_HOME` for the home, `MOSTRA_RUNTIME_DIR` for the runtime directory. If the directory should be yours, change its owner with `chown`. Mostra tightens a directory you own to mode 0700 by itself."
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"code": "MOSTRA_HOME_SOCKET_TOO_LONG",
|
|
590
|
+
"severity": "error",
|
|
591
|
+
"phase": "host",
|
|
592
|
+
"title": "Control socket path too long",
|
|
593
|
+
"hint": "Set `MOSTRA_RUNTIME_DIR` to a short directory you own, for example `/tmp/mostra-$USER`, and start again.",
|
|
594
|
+
"explanation": "Clients reach an instance through a Unix socket in a per-user runtime directory. The operating system limits a socket path to 103 bytes on macOS and 107 on Linux, and the path Mostra computed is longer, usually because the home directory's path is long. Mostra stops instead of using a different place that clients couldn't find.",
|
|
595
|
+
"fix": "Set `MOSTRA_RUNTIME_DIR` to a short directory you own, such as `/tmp/mostra-$USER`, in the environment of every Mostra client and host that uses this home. Mostra creates it with mode 0700 and re-creates its socket if a temporary-file cleanup removes it."
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
"code": "MOSTRA_HOME_TOO_NEW",
|
|
599
|
+
"severity": "error",
|
|
600
|
+
"phase": "host",
|
|
601
|
+
"title": "Home written by a newer Mostra",
|
|
602
|
+
"hint": "Run a Mostra release at least as new as the one named in the message, or use another home with `--home`.",
|
|
603
|
+
"explanation": "A newer Mostra migrated this home's ledger to a schema version this runtime doesn't know. Reading it could misinterpret or lose data, so this runtime refuses to open it. The message names the schema version and the release that wrote it.",
|
|
604
|
+
"fix": "Upgrade the runtime (or the host or CLI that bundles it) to at least the release named in the message. Mostra never migrates a ledger backwards; to keep an older release, give it a separate home with `--home` or `MOSTRA_HOME`."
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"code": "MOSTRA_HOST_CONNECTION_CLOSED",
|
|
608
|
+
"severity": "error",
|
|
609
|
+
"phase": "host",
|
|
610
|
+
"title": "Connection closed",
|
|
611
|
+
"hint": "Reconnect, then retry the request with the same request ID.",
|
|
612
|
+
"explanation": "The connection to the other side closed before a response arrived, for example because the instance exited or restarted. The request may or may not have taken effect.",
|
|
613
|
+
"fix": "Reconnect and send `mostra/initialize` again, then retry the request with the same request ID. Mutating methods are idempotent by request ID, so a retry never applies twice."
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"code": "MOSTRA_HOST_CURSOR_COMPACTED",
|
|
617
|
+
"severity": "error",
|
|
618
|
+
"phase": "host",
|
|
619
|
+
"title": "Events compacted",
|
|
620
|
+
"hint": "Read from the cursor in the message to receive the compaction summary, then continue from there.",
|
|
621
|
+
"explanation": "Events before a cursor were compacted on request (`mostra gc --compact-events`, DATA_MODEL §4): an artifact's old events were replaced by one `artifact.compacted` event that summarizes them. A reader asking for events after an earlier cursor would miss some, and Mostra never leaves a silent gap.",
|
|
622
|
+
"fix": "Read again with `after` set to the cursor the message names: the next event is the `artifact.compacted` summary. Rebuild what you track from it and continue as usual."
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
"code": "MOSTRA_HOST_IDENTITY_UNAVAILABLE",
|
|
626
|
+
"severity": "error",
|
|
627
|
+
"phase": "host",
|
|
628
|
+
"title": "The host that identifies viewers didn't answer",
|
|
629
|
+
"hint": "Start the host that serves this home's identity port, then open the link again.",
|
|
630
|
+
"explanation": "A host registered the `identity` port, so it decides who opens this home's links. When a link minted without a viewer was opened, that host failed, didn't answer within 5 seconds, gave an answer its schema refuses, or is expected (it lists `identity` in `HomeConfig.ports`) but not connected. Mostra refuses the link rather than let the session act as someone else.",
|
|
631
|
+
"fix": "Start or reconnect the host, then open the link again. A link minted with `view/url`'s `viewer` names its person itself and never needs the port. To return the home to Mostra's own identity, have the host register without the port and clear its expected ports (`HomeConfig.ports: []`)."
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
"code": "MOSTRA_HOST_INITIALIZE_ORDER",
|
|
635
|
+
"severity": "error",
|
|
636
|
+
"phase": "host",
|
|
637
|
+
"title": "Initialize first, and only once",
|
|
638
|
+
"hint": "Send `mostra/initialize` as the first request on the connection, and only once.",
|
|
639
|
+
"explanation": "Every connection starts with `mostra/initialize`, which agrees the protocol revision and registers the client's ports. The instance received another request before it, or a second `mostra/initialize` on the same connection.",
|
|
640
|
+
"fix": "Send `mostra/initialize` first and wait for its result before any other request. To renegotiate, open a new connection."
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"code": "MOSTRA_HOST_INTERNAL_ERROR",
|
|
644
|
+
"severity": "error",
|
|
645
|
+
"phase": "host",
|
|
646
|
+
"title": "Unexpected failure in the instance",
|
|
647
|
+
"hint": "Retry the request with the same request ID; if it fails again, report it with the instance's log.",
|
|
648
|
+
"explanation": "The instance failed while handling the request, for a reason that isn't one of its known conditions. Durable state is unaffected: a request is acknowledged only after its ledger transaction commits. The details are in the instance's log (`logs/supervisor.log` in the home), not in the response.",
|
|
649
|
+
"fix": "Retry the request with the same request ID; retries are idempotent. If the failure repeats, report it with the relevant lines of `logs/supervisor.log`."
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"code": "MOSTRA_HOST_INVALID_PARAMS",
|
|
653
|
+
"severity": "error",
|
|
654
|
+
"phase": "host",
|
|
655
|
+
"title": "Invalid method params",
|
|
656
|
+
"hint": "Fix the params named in the message so they match the method's schema.",
|
|
657
|
+
"explanation": "The request's `params` don't match the method's published schema: a required field is missing, a value has the wrong type, or a value is outside its allowed range. The message names the first problem found.",
|
|
658
|
+
"fix": "Compare the request with the method's schema in `@mostra/protocol` (or the published JSON Schema) and correct the field named in the message."
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
"code": "MOSTRA_HOST_MALFORMED",
|
|
662
|
+
"severity": "error",
|
|
663
|
+
"phase": "host",
|
|
664
|
+
"title": "Malformed protocol message",
|
|
665
|
+
"hint": "Send each message as one line of JSON holding a single JSON-RPC 2.0 request or notification.",
|
|
666
|
+
"explanation": "Every message on a Mostra connection is one line of JSON with one JSON-RPC 2.0 object. This code means a line wasn't valid JSON, wasn't a JSON-RPC 2.0 request or response, or was a batch (a JSON array), which revision `2026-10-10` doesn't accept. A client also reports it when a response doesn't match the method's result schema.",
|
|
667
|
+
"fix": "Encode one request per line with `\"jsonrpc\": \"2.0\"`, a `method`, an `id` for requests, and `params` as an object. Send several requests as separate lines instead of a batch."
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"code": "MOSTRA_HOST_MESSAGE_TOO_LARGE",
|
|
671
|
+
"severity": "error",
|
|
672
|
+
"phase": "host",
|
|
673
|
+
"title": "Message too large for the protocol",
|
|
674
|
+
"hint": "Ask for less at once: a specific submission, fewer events, or smaller values.",
|
|
675
|
+
"explanation": "One host-protocol message is one line of JSON, and a line holds at most 64 Mi characters (`MAX_LINE_LENGTH`), so neither side buffers without bound. Mostra checks every message before it writes it: an answer that would be longer is replaced by this error, and a delivery whose envelope would be longer is recorded as undeliverable instead of being sent and retried forever.",
|
|
676
|
+
"fix": "Read less per request (`events/read` with a smaller `limit`, `results/get` for one submission), and keep artifacts' values within the field and document limits."
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
"code": "MOSTRA_HOST_METHOD_UNKNOWN",
|
|
680
|
+
"severity": "error",
|
|
681
|
+
"phase": "host",
|
|
682
|
+
"title": "Unknown protocol method",
|
|
683
|
+
"hint": "Call only the methods listed in `capabilities.methods` of the `mostra/initialize` result.",
|
|
684
|
+
"explanation": "The instance doesn't serve the method that was called. Either the name is misspelled, or the client is newer than the instance and calls a method the instance's release doesn't have.",
|
|
685
|
+
"fix": "Check the method name against INTERFACES §6, and against `capabilities.methods` in the `mostra/initialize` result, which lists every method this instance serves. Upgrade the instance if the client needs a newer method."
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
"code": "MOSTRA_HOST_NOTIFICATION_UNSUPPORTED",
|
|
689
|
+
"severity": "error",
|
|
690
|
+
"phase": "host",
|
|
691
|
+
"title": "Notification not accepted",
|
|
692
|
+
"hint": "List the notification in `capabilities.notifications` when you initialize.",
|
|
693
|
+
"explanation": "Mostra sends a client only the notifications it listed in `mostra/initialize` (D84). This method would send one the client didn't list, such as `events/notify` for `events/subscribe`.",
|
|
694
|
+
"fix": "Reconnect and initialize with `capabilities: { notifications: [\"events/notify\"] }`, or poll with `events/read` instead."
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
"code": "MOSTRA_HOST_PORT_UNSUPPORTED",
|
|
698
|
+
"severity": "warning",
|
|
699
|
+
"phase": "host",
|
|
700
|
+
"title": "Port not supported by this instance",
|
|
701
|
+
"hint": "Leave the port out of `mostra/initialize`, or run a Mostra release that lists it in `capabilities.ports`.",
|
|
702
|
+
"explanation": "The client registered a port this instance doesn't call, so registering it has no effect. The port may be reserved for a later release (such as `ai`), or the client may be newer than the instance. The session continues without the port, and Mostra uses its standalone behavior instead.",
|
|
703
|
+
"fix": "Register only the ports listed in `capabilities.ports` of the `mostra/initialize` result. If the host needs the port, upgrade the instance to a release that supports it."
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
"code": "MOSTRA_HOST_REQUEST_ID_REUSED",
|
|
707
|
+
"severity": "error",
|
|
708
|
+
"phase": "host",
|
|
709
|
+
"title": "A requestId was reused with other parameters",
|
|
710
|
+
"hint": "Send a new `requestId` for a new request; repeat the exact parameters only to retry one.",
|
|
711
|
+
"explanation": "A mutating method recorded its result under this `requestId` for different parameters. Replaying that result would answer a request nobody made (a link for another artifact or with other scopes, another source's publish), so the instance refuses (H-03). Retries with the same parameters still return the recorded result.",
|
|
712
|
+
"fix": "Generate a fresh `requestId` for every new request, and reuse one only to retry the same request after a timeout or a lost connection."
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
"code": "MOSTRA_HOST_REVISION_UNSUPPORTED",
|
|
716
|
+
"severity": "error",
|
|
717
|
+
"phase": "host",
|
|
718
|
+
"title": "No common host protocol revision",
|
|
719
|
+
"hint": "Run the client and the instance from the same Mostra release, for example with `mostra daemon restart`.",
|
|
720
|
+
"explanation": "A client and a Mostra instance agree on a host protocol revision when they connect (`mostra/initialize`). The client offers the revisions it speaks, and the instance picks the newest one it also supports. This code means the two lists have nothing in common, usually because the client and the running daemon come from Mostra releases far apart.",
|
|
721
|
+
"fix": "Restart the daemon so it runs the same release as the client: `mostra daemon restart`. Durable state survives the restart, and open views reconnect. A host that embeds Mostra updates its pinned Mostra runtime or its host library until both support a common revision."
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
"code": "MOSTRA_HOST_SHUTDOWN_REFUSED",
|
|
725
|
+
"severity": "error",
|
|
726
|
+
"phase": "host",
|
|
727
|
+
"title": "Only the spawning host can stop this instance",
|
|
728
|
+
"hint": "Ask the host that started this instance to stop it, or end the connection you opened instead.",
|
|
729
|
+
"explanation": "An instance started by a host over stdio (`mostra host`) lives as long as that host's connection, so only the host may stop it with `mostra/shutdown`. A client that attached through the home's socket asked it to stop. A daemon (`mostra daemon`) accepts `mostra/shutdown` from every attached client (D87).",
|
|
730
|
+
"fix": "Close your own connection when you are done. To stop the instance, stop the host that spawned it, or have the host send `mostra/shutdown` or close its stdio."
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
"code": "MOSTRA_HOST_SUBSCRIPTION_UNKNOWN",
|
|
734
|
+
"severity": "error",
|
|
735
|
+
"phase": "host",
|
|
736
|
+
"title": "Unknown subscription",
|
|
737
|
+
"hint": "Subscribe again with `events/subscribe`, then use the ID it returns.",
|
|
738
|
+
"explanation": "The subscription ID belongs to no subscription on this connection: it was never created here, was ended with `events/unsubscribe`, or belonged to a connection that closed. Subscriptions live as long as their connection; a named subscriber's acknowledged cursor outlives it.",
|
|
739
|
+
"fix": "Call `events/subscribe` again on this connection. With the same `name`, delivery resumes after the last acknowledged cursor."
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"code": "MOSTRA_HOST_TIMEOUT",
|
|
743
|
+
"severity": "error",
|
|
744
|
+
"phase": "host",
|
|
745
|
+
"title": "Request timed out",
|
|
746
|
+
"hint": "Retry the request with the same request ID, or allow it more time.",
|
|
747
|
+
"explanation": "No response arrived within the time the caller allowed. The other side may still be working on the request, and it may still take effect.",
|
|
748
|
+
"fix": "Retry with the same request ID, which returns the recorded result if the first attempt completed. Allow a longer timeout for slow operations."
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"code": "MOSTRA_HYGIENE_CONTENT_TYPE",
|
|
752
|
+
"severity": "error",
|
|
753
|
+
"phase": "hygiene",
|
|
754
|
+
"title": "JSON content type required",
|
|
755
|
+
"hint": "Send the body as JSON with `Content-Type: application/json`.",
|
|
756
|
+
"explanation": "Requests that change state must have a JSON body. A form or plain-text body is something any website can send without asking the browser first, so the gateway refuses it with 415.",
|
|
757
|
+
"fix": "Send `Content-Type: application/json` and a JSON body."
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
"code": "MOSTRA_HYGIENE_CSRF_MISSING",
|
|
761
|
+
"severity": "error",
|
|
762
|
+
"phase": "hygiene",
|
|
763
|
+
"title": "CSRF token missing or wrong",
|
|
764
|
+
"hint": "Send the session's CSRF token from `GET /_mostra/session` in the `X-Mostra-CSRF` header.",
|
|
765
|
+
"explanation": "Every request that changes state through a session carries the session's CSRF token in the `X-Mostra-CSRF` header. The token comes only from the session endpoint of the same origin, which no other page can read. A missing or different token is answered with 403.",
|
|
766
|
+
"fix": "Read `csrf` from `GET /_mostra/session` (on the shell, `GET /a/<artifactId>/_mostra/session`) and send it with every POST. Mostra's client runtime and shell do this for you."
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
"code": "MOSTRA_HYGIENE_HEADERS_TOO_LARGE",
|
|
770
|
+
"severity": "error",
|
|
771
|
+
"phase": "hygiene",
|
|
772
|
+
"title": "The request's headers are too large",
|
|
773
|
+
"hint": "Open the link again: this page cleared the cookies that made the request too large.",
|
|
774
|
+
"explanation": "The request's headers passed the gateway's limit of 1 MiB, more than any browser sends for one host's cookies. Every port of the loopback host shares one cookie jar, so a page on any of them can fill it. The gateway answers 431 with `Clear-Site-Data: \"cookies\"`, which empties the host's cookies, so the next request works. Mostra's sessions go with them and come back when a link is opened again.",
|
|
775
|
+
"fix": "Open the artifact's link again. If it keeps happening, find the page that sets the cookies: it runs on this host."
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"code": "MOSTRA_HYGIENE_HOST_REFUSED",
|
|
779
|
+
"severity": "error",
|
|
780
|
+
"phase": "hygiene",
|
|
781
|
+
"title": "Host not served",
|
|
782
|
+
"hint": "Open the artifact through the exact link Mostra gave you.",
|
|
783
|
+
"explanation": "The request's `Host` header named a host this gateway doesn't serve. Each gateway listener accepts exactly the host and port its capability URLs use, so a page that rebinds its own DNS name to the loopback address can't reach an artifact (DNS rebinding). The gateway answers 421.",
|
|
784
|
+
"fix": "Use the URL from `view/url` or the publish receipt as it is, without replacing `127.0.0.1` by `localhost` or another name. A gateway started with `--bind` and `--url-host` accepts the URL host it was given."
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
"code": "MOSTRA_HYGIENE_NOT_SERVED",
|
|
788
|
+
"severity": "error",
|
|
789
|
+
"phase": "hygiene",
|
|
790
|
+
"title": "Nothing served here",
|
|
791
|
+
"hint": "Request a published version's files or a documented `/_mostra/` path.",
|
|
792
|
+
"explanation": "The gateway serves only published versions' client files and the browser-protocol paths under `/_mostra/`. Everything else in the home, such as sources, server bundles, staging and unpublished builds, has no URL. A path or method nothing answers gets 404 or 405.",
|
|
793
|
+
"fix": "Check the path. Server code runs through the browser protocol, never as a file, and an artifact becomes viewable only once it is published."
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
"code": "MOSTRA_HYGIENE_ORIGIN_REFUSED",
|
|
797
|
+
"severity": "error",
|
|
798
|
+
"phase": "hygiene",
|
|
799
|
+
"title": "Origin refused",
|
|
800
|
+
"hint": "Send the request from the page's own origin.",
|
|
801
|
+
"explanation": "A request that changes state, opens a stream or upgrades to a WebSocket must carry an `Origin` header equal to the origin it is sent to. The gateway compares the strings exactly and answers 403 otherwise, so another website, or another artifact on a different port, can't drive this one.",
|
|
802
|
+
"fix": "Call the gateway from the page it serves: the shell from the shell, the artifact from its own frame. Tools outside a browser send the listener's own origin."
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"code": "MOSTRA_HYGIENE_RATE_LIMITED",
|
|
806
|
+
"severity": "error",
|
|
807
|
+
"phase": "hygiene",
|
|
808
|
+
"title": "Too many failed attempts",
|
|
809
|
+
"hint": "Wait for the time in `Retry-After`, then open the link again.",
|
|
810
|
+
"explanation": "More than 30 capability tokens failed for this artifact within a minute, so the gateway refuses every token for it, valid ones included, until the minute has passed. A guess can't succeed while the limit holds, and only this artifact's links wait. The gateway answers 429 with `Retry-After`.",
|
|
811
|
+
"fix": "Wait, then open the link again. Repeated failures usually come from a mistyped link or a script retrying an old one."
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
"code": "MOSTRA_HYGIENE_REQUEST_MALFORMED",
|
|
815
|
+
"severity": "error",
|
|
816
|
+
"phase": "hygiene",
|
|
817
|
+
"title": "Malformed request",
|
|
818
|
+
"hint": "Send one well-formed HTTP request with a path that starts with `/`.",
|
|
819
|
+
"explanation": "The gateway refused a request it can't interpret safely: a repeated `Host` or `Origin` header, a request target that isn't a path, an encoded `/` or `..` that would leave the served tree, a body that isn't valid JSON, or a header with control characters. It answers 400 rather than guess.",
|
|
820
|
+
"fix": "Send a single request with one `Host` header and a plain path. Browsers always do; this usually means a hand-written client or a probe."
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
"code": "MOSTRA_HYGIENE_SCOPE_DENIED",
|
|
824
|
+
"severity": "error",
|
|
825
|
+
"phase": "hygiene",
|
|
826
|
+
"title": "Not allowed by this link",
|
|
827
|
+
"hint": "Open a link minted with this scope (`view/url` with `scopes`).",
|
|
828
|
+
"explanation": "The session's link doesn't carry the scope this request needs: `draft` to save answers, `submit` to submit, `review` to comment, and `action:*`, `action:<export>` or `action:<module path>#<export>` to run a server function. A view-and-comment link, for example, can't submit or run an action. The gateway answers 403.",
|
|
829
|
+
"fix": "Mint a link with the scopes the viewer needs, such as `view/url` with `scopes: [\"view\", \"draft\", \"submit\"]`. Without `scopes`, a link carries every scope."
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
"code": "MOSTRA_HYGIENE_SESSION_CONFLICT",
|
|
833
|
+
"severity": "warning",
|
|
834
|
+
"phase": "hygiene",
|
|
835
|
+
"title": "Another link is already open for this artifact",
|
|
836
|
+
"hint": "Choose which link to keep; send `replace: true` to use the new one.",
|
|
837
|
+
"explanation": "This browser already has a live session for the artifact from a different link. Opening a link never silently replaces it, because a page elsewhere could send the viewer to its own, narrower link and take over their tabs (D98). The shell shows both links' access and lets the viewer choose; the answer is 409 with `current` and `offered`.",
|
|
838
|
+
"fix": "In the shell, choose the link to keep. A client exchanging tokens itself sends `replace: true` to replace the session."
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
"code": "MOSTRA_HYGIENE_SESSION_MISSING",
|
|
842
|
+
"severity": "error",
|
|
843
|
+
"phase": "hygiene",
|
|
844
|
+
"title": "No session",
|
|
845
|
+
"hint": "Open the artifact's capability link again to start a session.",
|
|
846
|
+
"explanation": "The request carried no valid session for this origin. Sessions start when a capability link is opened: the shell exchanges the link's token for a session cookie, and gives the artifact frame a single-use ticket for its own. A session issued for another origin never counts, because every port of the host shares the browser's cookies. The gateway answers 401.",
|
|
847
|
+
"fix": "Open the full capability link, including the part after `#`. A bookmark of the page without it works while the browser keeps the session cookie (400 days)."
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"code": "MOSTRA_HYGIENE_TOKEN_INVALID",
|
|
851
|
+
"severity": "error",
|
|
852
|
+
"phase": "hygiene",
|
|
853
|
+
"title": "Unknown capability token",
|
|
854
|
+
"hint": "Use the complete capability link Mostra gave you, or mint a new one with `view/url`.",
|
|
855
|
+
"explanation": "The capability token or frame ticket matched nothing in this home: it was mistyped, cut short, belongs to another home or artifact, or the ticket was already used or expired (tickets last 60 seconds and work once). Over the host protocol, the token ID named in `view/revoke` or `view/rotate` doesn't exist. The gateway answers 401, and failed attempts count towards the rate limit.",
|
|
856
|
+
"fix": "Copy the whole link again. An agent or host mints a fresh one with `view/url`; the shell gets a new frame ticket by reloading."
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"code": "MOSTRA_HYGIENE_TOKEN_REVOKED",
|
|
860
|
+
"severity": "error",
|
|
861
|
+
"phase": "hygiene",
|
|
862
|
+
"title": "Link revoked or expired",
|
|
863
|
+
"hint": "Ask for a new link: `view/url` mints one, or `view/rotate` replaces this one.",
|
|
864
|
+
"explanation": "The capability link was revoked (`view/revoke`), replaced (`view/rotate`), or reached the end of its `ttl`. Every session started from it ends too. The gateway answers 410. Local links have no expiry unless one was asked for.",
|
|
865
|
+
"fix": "Get a new link from whoever shared this one. An agent mints it with `view/url`, or rotates the old one with `view/rotate`, and shares the new URL."
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
"code": "MOSTRA_LIVE_SOURCE_FAILED",
|
|
869
|
+
"severity": "error",
|
|
870
|
+
"phase": "runtime",
|
|
871
|
+
"title": "Live source failed",
|
|
872
|
+
"hint": "Read the message, fix the live source's loader or stream, and publish again; the last good value stays meanwhile.",
|
|
873
|
+
"explanation": "A live source's `load` or `stream` threw, or its value was outside the serializable types. Pages keep showing the last good value with `useLive`'s `error` set, and the producer tries again on its schedule (FAILURE_MODEL §6).",
|
|
874
|
+
"fix": "Fix the producer in `live.ts`, or catch transient failures there and return the previous value."
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
"code": "MOSTRA_LIVE_TOO_LARGE",
|
|
878
|
+
"severity": "error",
|
|
879
|
+
"phase": "runtime",
|
|
880
|
+
"title": "Live value too large",
|
|
881
|
+
"hint": "Push or produce a smaller value: at most 4 MiB serialized.",
|
|
882
|
+
"explanation": "A live value, pushed or produced, is over 4 MiB once serialized (DATA_MODEL §5). It is refused and the last good value stays.",
|
|
883
|
+
"fix": "Send a smaller window of the data, or split it across several live sources. For high-rate series, push single points in append mode and let the page keep the window."
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"code": "MOSTRA_MANIFEST_INVALID",
|
|
887
|
+
"severity": "error",
|
|
888
|
+
"phase": "manifest",
|
|
889
|
+
"title": "Manifest value is invalid",
|
|
890
|
+
"hint": "Fix the manifest field named in the message so it matches the manifest's documented shape.",
|
|
891
|
+
"explanation": "The manifest was read, but a field has a value the manifest doesn't allow: a missing `title`, a wrong type, an `id` that isn't an artifact ID (`art_` followed by a ULID), a `mode` this runtime doesn't build (`spa` is the only one), or frontmatter that isn't valid YAML. The message names the field and what was expected.",
|
|
892
|
+
"fix": "Correct the field the message names. Leave `id` out to let Mostra bind the artifact to its source path at first publish, or keep the `id` that `mostra new` wrote. Every field except `title` is optional."
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
"code": "MOSTRA_MANIFEST_NOT_LITERAL",
|
|
896
|
+
"severity": "error",
|
|
897
|
+
"phase": "manifest",
|
|
898
|
+
"title": "Manifest isn't a literal",
|
|
899
|
+
"hint": "Write the manifest as plain values: strings, numbers, booleans, null, arrays and objects, with no variables, calls, spreads or computed keys.",
|
|
900
|
+
"explanation": "Mostra reads an artifact's manifest without running its code: the `export const artifact = defineArtifact({...})` in a TSX entry, or the frontmatter of an MDX entry. It reports this code when the exported `artifact` isn't a `defineArtifact(...)` call with one object literal, or when a value inside it needs evaluation (an identifier, a function call, a spread, a computed key, a template literal with a placeholder). The location points at the first such value.",
|
|
901
|
+
"fix": "Replace the value with the literal it stands for, for example `title: \"Q3 review\"` instead of `title: TITLE`. Keep computed values in the page code, where they can use anything. `as const` and `satisfies` on the object are fine."
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
|
+
"code": "MOSTRA_MANIFEST_UNKNOWN_KEY",
|
|
905
|
+
"severity": "warning",
|
|
906
|
+
"phase": "manifest",
|
|
907
|
+
"title": "Unknown manifest key",
|
|
908
|
+
"hint": "Remove the key or correct its spelling; a newer Mostra may support it.",
|
|
909
|
+
"explanation": "The manifest has a key this runtime doesn't know. Mostra ignores it, so manifests written for a newer release still publish, but a misspelled key (`familly`, `decription`) silently has no effect.",
|
|
910
|
+
"fix": "Check the key against the manifest fields (`id`, `title`, `description`, `family`, `links`, `mode`, `submission`, `kit`, `terminals`, `demos`, `limits`, `verify`) and fix the spelling, or remove it."
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
"code": "MOSTRA_NETWORK_EXTERNAL_FAILED",
|
|
914
|
+
"severity": "warning",
|
|
915
|
+
"phase": "network",
|
|
916
|
+
"title": "Request to another origin failed",
|
|
917
|
+
"hint": "A request to another origin failed while verify ran; check the URL and whether that service was reachable.",
|
|
918
|
+
"explanation": "A request the page made to another origin failed or answered 4xx or 5xx. It may be the environment (no network, a service that is down, a request the service refuses from this origin) rather than the code, so it is a warning.",
|
|
919
|
+
"fix": "Check the URL and the service. If the page depends on it, show a fallback when it fails."
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
"code": "MOSTRA_NETWORK_REQUEST_FAILED",
|
|
923
|
+
"severity": "error",
|
|
924
|
+
"phase": "network",
|
|
925
|
+
"title": "Request for the page's own resource failed",
|
|
926
|
+
"hint": "Check the path: a file the page loads from the artifact itself failed to load.",
|
|
927
|
+
"explanation": "A resource the page loaded from the artifact's own origin (the document, a script, a style, an image, a font, or a fetch by artifact code) failed or answered 4xx or 5xx. Requests the browser makes on its own, such as `/favicon.ico`, and Mostra's own protocol aren't counted.",
|
|
928
|
+
"fix": "Put the file in `public/` (served at the root) or import it from the code so the build includes it, and check the path's spelling."
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
"code": "MOSTRA_PLATFORM_UNSUPPORTED",
|
|
932
|
+
"severity": "error",
|
|
933
|
+
"phase": "platform",
|
|
934
|
+
"title": "Unsupported platform",
|
|
935
|
+
"hint": "Run Mostra on macOS or Linux, on an x64 or arm64 machine.",
|
|
936
|
+
"explanation": "Mostra 1.0 runs on macOS and Linux, on x64 and arm64. On any other operating system or architecture, Windows included, every entry point stops with this code before it creates or changes anything, because the process model, sockets and storage are built and tested only on those platforms. The message names the platform that was detected.",
|
|
937
|
+
"fix": "Run Mostra on a macOS or Linux machine with an x64 or arm64 processor. Windows support is planned for a release after 1.0."
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
"code": "MOSTRA_PUBLISH_ID_CONFLICT",
|
|
941
|
+
"severity": "error",
|
|
942
|
+
"phase": "publish",
|
|
943
|
+
"title": "Artifact ID claimed by two sources",
|
|
944
|
+
"hint": "Give one of the two sources a different `id`, or delete the `id` line from the copy so it becomes a new artifact.",
|
|
945
|
+
"explanation": "An artifact's `id` names exactly one source. Mostra reports this code when a manifest claims an `id` that is already bound to another source path whose entry still claims it, which usually means a directory was copied. A source that moved, so that the old path no longer claims the `id`, is rebound instead. The message names both paths.",
|
|
946
|
+
"fix": "Decide which source is the artifact. In the other one, remove the `id` from the manifest (it is then bound to its own path at its first publish) or replace it with a new ID from `mostra new`."
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
"code": "MOSTRA_PUBLISH_SOURCE_CHANGED",
|
|
950
|
+
"severity": "error",
|
|
951
|
+
"phase": "publish",
|
|
952
|
+
"title": "Source changed during the publish",
|
|
953
|
+
"hint": "Publish again once the artifact's files have stopped changing.",
|
|
954
|
+
"explanation": "Publishing reads the entry's manifest twice: once to find the artifact, and again from the snapshot it builds. Mostra reports this code when the two disagree about which artifact the source is, because the manifest `id` or the source's binding changed while the publish ran, for example when an editor saved the entry mid-publish or another publish rebound the path. Nothing was published.",
|
|
955
|
+
"fix": "Wait until the files are saved and nothing else is publishing the same source, then publish again. If the manifest `id` was changed on purpose, the next publish uses the new one."
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"code": "MOSTRA_PUBLISH_VERIFY_FAILED",
|
|
959
|
+
"severity": "error",
|
|
960
|
+
"phase": "publish",
|
|
961
|
+
"title": "Verify found errors",
|
|
962
|
+
"hint": "Run `mostra verify` to see the errors and fix them, or publish with `--force` to record them in the version.",
|
|
963
|
+
"explanation": "Publish runs verify (or reuses the verdict it cached for the same source and environment) and refuses when the verdict has errors (D41). The message lists their codes. Nothing was published. With `--force`, publish goes ahead and records the codes in the version, where hosts read them; a source that doesn't build can't be published either way.",
|
|
964
|
+
"fix": "Fix the errors `mostra verify` reports and publish again, or publish with `--force` if the version must ship as it is."
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
"code": "MOSTRA_REGRESSION_ACTION_REMOVED",
|
|
968
|
+
"severity": "warning",
|
|
969
|
+
"phase": "contract",
|
|
970
|
+
"title": "Server function gone since the last passing version",
|
|
971
|
+
"hint": "Observed only: the last passing version had this server function and this source doesn't; one removed on purpose needs nothing more.",
|
|
972
|
+
"explanation": "A `\"use server\"` export the last passing version had is gone. Pages of the older version still call it while they are open, and keyed runs started by it can't be started again.",
|
|
973
|
+
"fix": "If it was renamed by mistake, keep its name. If it was removed on purpose, nothing needs to change."
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
"code": "MOSTRA_REGRESSION_ARIA",
|
|
977
|
+
"severity": "warning",
|
|
978
|
+
"phase": "regression",
|
|
979
|
+
"title": "Controls or landmarks gone since the last passing version",
|
|
980
|
+
"hint": "Observed only: the last passing version had these controls or landmarks and this source doesn't; a change that removed them on purpose needs nothing more.",
|
|
981
|
+
"explanation": "Verify compared this source's accessibility snapshot with the newest version whose verdict passed, rendered in the same run with the same data. The controls or landmarks the message lists (by role and name) were there and aren't now. A redesign may remove them on purpose.",
|
|
982
|
+
"fix": "If they should be gone, nothing needs to change. If not, look at what removed them."
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
"code": "MOSTRA_REGRESSION_FIELD_REMOVED",
|
|
986
|
+
"severity": "warning",
|
|
987
|
+
"phase": "contract",
|
|
988
|
+
"title": "Field gone since the last passing version",
|
|
989
|
+
"hint": "Observed only: answers saved under this field ID won't carry over to this version; a field removed on purpose needs nothing more.",
|
|
990
|
+
"explanation": "A field ID the last passing version used is gone from this source. Viewers' answers under it become orphans when they switch (D42): kept, shown read-only and delivered, but not editable. The message gives how many saved answers it affects.",
|
|
991
|
+
"fix": "If the field was renamed by mistake, keep its old ID. If it was removed on purpose, nothing needs to change."
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
"code": "MOSTRA_REGRESSION_LIVE_REMOVED",
|
|
995
|
+
"severity": "warning",
|
|
996
|
+
"phase": "contract",
|
|
997
|
+
"title": "Live source gone since the last passing version",
|
|
998
|
+
"hint": "Observed only: the last passing version had this live source and this source doesn't; one removed on purpose needs nothing more.",
|
|
999
|
+
"explanation": "A live source (`live.ts` export) the last passing version had is gone, so its producer stops and hosts that push to it push to a key no page reads.",
|
|
1000
|
+
"fix": "If it was renamed by mistake, keep its name. If it was removed on purpose, nothing needs to change."
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
"code": "MOSTRA_REGRESSION_PAGE_REMOVED",
|
|
1004
|
+
"severity": "warning",
|
|
1005
|
+
"phase": "contract",
|
|
1006
|
+
"title": "Page route gone since the last passing version",
|
|
1007
|
+
"hint": "Observed only: the last passing version had this page route and this source doesn't; one removed on purpose needs nothing more.",
|
|
1008
|
+
"explanation": "A route of `pages/` the last passing version had is gone, so links and bookmarks to it now open the artifact's fallback page.",
|
|
1009
|
+
"fix": "If it was renamed by mistake, keep its path. If it was removed on purpose, nothing needs to change."
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
"code": "MOSTRA_REGRESSION_PIXELS",
|
|
1013
|
+
"severity": "warning",
|
|
1014
|
+
"phase": "regression",
|
|
1015
|
+
"title": "Page looks different from the last passing version",
|
|
1016
|
+
"hint": "Observed only: this share of the viewport's pixels differs from the last passing version; an intended visual change shows here too and needs nothing more.",
|
|
1017
|
+
"explanation": "Verify rendered the newest version whose verdict passed and this source at the same viewport, clock and data, and the share of pixels the message gives differs between them. Any intended visual change shows here too.",
|
|
1018
|
+
"fix": "If the change is one you made on purpose, nothing needs to change. To see where it is, read the ARIA snapshots, or look at the diff image the message names if you can view images."
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"code": "MOSTRA_RUNTIME_BLANK",
|
|
1022
|
+
"severity": "error",
|
|
1023
|
+
"phase": "runtime",
|
|
1024
|
+
"title": "Page rendered nothing",
|
|
1025
|
+
"hint": "Make the page render something visible; check its first render and its imports.",
|
|
1026
|
+
"explanation": "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.",
|
|
1027
|
+
"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."
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"code": "MOSTRA_RUNTIME_NOT_READY",
|
|
1031
|
+
"severity": "error",
|
|
1032
|
+
"phase": "runtime",
|
|
1033
|
+
"title": "Page never became ready",
|
|
1034
|
+
"hint": "Make sure the entry's default export renders; check the other diagnostics for an error at load.",
|
|
1035
|
+
"explanation": "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.",
|
|
1036
|
+
"fix": "Fix the load error the other diagnostics report. A page that waits for data should render a loading state first."
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
"code": "MOSTRA_RUNTIME_PAGE_ERROR",
|
|
1040
|
+
"severity": "error",
|
|
1041
|
+
"phase": "runtime",
|
|
1042
|
+
"title": "Uncaught error in the page",
|
|
1043
|
+
"hint": "Fix the error the message names; it was thrown in the page and nothing caught it.",
|
|
1044
|
+
"explanation": "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.",
|
|
1045
|
+
"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."
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
"code": "MOSTRA_RUNTIME_WORKER_CRASHED",
|
|
1049
|
+
"severity": "error",
|
|
1050
|
+
"phase": "runtime",
|
|
1051
|
+
"title": "Artifact server code crashed",
|
|
1052
|
+
"hint": "Read the cause and the worker's last output, fix the server code, and publish again.",
|
|
1053
|
+
"explanation": "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.",
|
|
1054
|
+
"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."
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
"code": "MOSTRA_RUNTIME_WORKER_PARKED",
|
|
1058
|
+
"severity": "error",
|
|
1059
|
+
"phase": "runtime",
|
|
1060
|
+
"title": "Artifact server code keeps crashing",
|
|
1061
|
+
"hint": "Fix the server code and publish again, which clears the park; the message names the last crash's cause.",
|
|
1062
|
+
"explanation": "The artifact version's worker crashed more than 5 times in 10 minutes, so Mostra stopped starting it (FAILURE_MODEL §2). 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.",
|
|
1063
|
+
"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."
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
"code": "MOSTRA_SECRET_MISSING",
|
|
1067
|
+
"severity": "error",
|
|
1068
|
+
"phase": "runtime",
|
|
1069
|
+
"title": "Secret not set",
|
|
1070
|
+
"hint": "Set the secret with `mostra secret set NAME`, reading the value from stdin.",
|
|
1071
|
+
"explanation": "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.",
|
|
1072
|
+
"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."
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"code": "MOSTRA_SMOKE_BUDGET",
|
|
1076
|
+
"severity": "hint",
|
|
1077
|
+
"phase": "smoke",
|
|
1078
|
+
"title": "Smoke test stopped at its budget",
|
|
1079
|
+
"hint": "Nothing to fix: the smoke test stops after 200 interactions or 60 s.",
|
|
1080
|
+
"explanation": "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`.",
|
|
1081
|
+
"fix": "Nothing is required."
|
|
1082
|
+
},
|
|
1083
|
+
{
|
|
1084
|
+
"code": "MOSTRA_SMOKE_NO_EFFECT",
|
|
1085
|
+
"severity": "warning",
|
|
1086
|
+
"phase": "smoke",
|
|
1087
|
+
"title": "Control showed no effect",
|
|
1088
|
+
"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.",
|
|
1089
|
+
"explanation": "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.",
|
|
1090
|
+
"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."
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
"code": "MOSTRA_SUBMIT_ALREADY",
|
|
1094
|
+
"severity": "error",
|
|
1095
|
+
"phase": "runtime",
|
|
1096
|
+
"title": "Already submitted",
|
|
1097
|
+
"hint": "This artifact takes one submission, and it was made; read it with `mostra results`.",
|
|
1098
|
+
"explanation": "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.",
|
|
1099
|
+
"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."
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
"code": "MOSTRA_SUBMIT_BLOCKED",
|
|
1103
|
+
"severity": "error",
|
|
1104
|
+
"phase": "runtime",
|
|
1105
|
+
"title": "Answers missing before submit",
|
|
1106
|
+
"hint": "Fill in the fields this diagnostic lists, fix their errors or resolve their conflicts, then submit again.",
|
|
1107
|
+
"explanation": "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.",
|
|
1108
|
+
"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."
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
"code": "MOSTRA_SUBMIT_CHANNEL_DENIED",
|
|
1112
|
+
"severity": "error",
|
|
1113
|
+
"phase": "runtime",
|
|
1114
|
+
"title": "Submit channel not allowed",
|
|
1115
|
+
"hint": "Let the viewer submit with the shell's trusted Submit; this host doesn't take submissions from artifact code.",
|
|
1116
|
+
"explanation": "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.",
|
|
1117
|
+
"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."
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
"code": "MOSTRA_SUBMIT_NOT_FOUND",
|
|
1121
|
+
"severity": "error",
|
|
1122
|
+
"phase": "runtime",
|
|
1123
|
+
"title": "No such submission",
|
|
1124
|
+
"hint": "Wait for a submission with `mostra wait <artifact> --until submitted`, or name one that exists.",
|
|
1125
|
+
"explanation": "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).",
|
|
1126
|
+
"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."
|
|
1127
|
+
},
|
|
1128
|
+
{
|
|
1129
|
+
"code": "MOSTRA_SUBMIT_POLICY_NONE",
|
|
1130
|
+
"severity": "error",
|
|
1131
|
+
"phase": "runtime",
|
|
1132
|
+
"title": "Artifact takes no submissions",
|
|
1133
|
+
"hint": "Exchange data through artifact state, actions and signals; this artifact has no submissions.",
|
|
1134
|
+
"explanation": "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.",
|
|
1135
|
+
"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`."
|
|
1136
|
+
},
|
|
1137
|
+
{
|
|
1138
|
+
"code": "MOSTRA_SUBMIT_REVISION_MOVED",
|
|
1139
|
+
"severity": "error",
|
|
1140
|
+
"phase": "runtime",
|
|
1141
|
+
"title": "Draft changed before submit",
|
|
1142
|
+
"hint": "Reload the draft, check what changed, and submit again with its current revision.",
|
|
1143
|
+
"explanation": "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.",
|
|
1144
|
+
"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."
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
"code": "MOSTRA_SUBMIT_SIGNAL_INVALID",
|
|
1148
|
+
"severity": "error",
|
|
1149
|
+
"phase": "runtime",
|
|
1150
|
+
"title": "Invalid signal",
|
|
1151
|
+
"hint": "Name signals with letters, digits, `.`, `_` and `-`, and keep their payload under 64 KiB of JSON.",
|
|
1152
|
+
"explanation": "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.",
|
|
1153
|
+
"fix": "Rename the signal or shrink its payload; put large data into a field or artifact state and send its ID in the payload."
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
"code": "MOSTRA_SUBMIT_VIEW_INVALID",
|
|
1157
|
+
"severity": "error",
|
|
1158
|
+
"phase": "runtime",
|
|
1159
|
+
"title": "Unknown view",
|
|
1160
|
+
"hint": "Send the view ID this page was opened with.",
|
|
1161
|
+
"explanation": "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.",
|
|
1162
|
+
"fix": "Use the `viewId` the shell handed this frame. A page opened outside Mostra's shell has no view and can't submit."
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
"code": "MOSTRA_TARGET_UNAVAILABLE",
|
|
1166
|
+
"severity": "error",
|
|
1167
|
+
"phase": "runtime",
|
|
1168
|
+
"title": "Not available in this delivery target",
|
|
1169
|
+
"hint": "Open the published version through Mostra to use this feature.",
|
|
1170
|
+
"explanation": "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.",
|
|
1171
|
+
"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."
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
"code": "MOSTRA_TYPE_ERROR",
|
|
1175
|
+
"severity": "error",
|
|
1176
|
+
"phase": "compile",
|
|
1177
|
+
"title": "Type error",
|
|
1178
|
+
"hint": "Fix the type error at the reported location; the message carries TypeScript's code and text.",
|
|
1179
|
+
"explanation": "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.",
|
|
1180
|
+
"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."
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
"code": "MOSTRA_TYPE_UNTYPED_PACKAGE",
|
|
1184
|
+
"severity": "warning",
|
|
1185
|
+
"phase": "compile",
|
|
1186
|
+
"title": "Package without type declarations",
|
|
1187
|
+
"hint": "Nothing breaks: the package works without types; declare a module for it if you want them checked.",
|
|
1188
|
+
"explanation": "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`.",
|
|
1189
|
+
"fix": "Optionally add a declaration file such as `declare module \"<package>\";`, or a typed wrapper, to the artifact."
|
|
1190
|
+
},
|
|
1191
|
+
{
|
|
1192
|
+
"code": "MOSTRA_VERIFY_ACTION_SKIPPED",
|
|
1193
|
+
"severity": "hint",
|
|
1194
|
+
"phase": "smoke",
|
|
1195
|
+
"title": "Action skipped in verify",
|
|
1196
|
+
"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.",
|
|
1197
|
+
"explanation": "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.",
|
|
1198
|
+
"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."
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
"code": "MOSTRA_VERIFY_BASELINE_MISSING",
|
|
1202
|
+
"severity": "hint",
|
|
1203
|
+
"phase": "regression",
|
|
1204
|
+
"title": "Baseline version's build is missing",
|
|
1205
|
+
"hint": "Nothing to fix here; publish again to give later versions a baseline.",
|
|
1206
|
+
"explanation": "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.",
|
|
1207
|
+
"fix": "Nothing is required. A version published from this source becomes the next baseline."
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
"code": "MOSTRA_VERIFY_CRASHED",
|
|
1211
|
+
"severity": "error",
|
|
1212
|
+
"phase": "runtime",
|
|
1213
|
+
"title": "Verify runner crashed",
|
|
1214
|
+
"hint": "Verify again; if it keeps crashing, report the message with `mostra doctor`'s output.",
|
|
1215
|
+
"explanation": "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.",
|
|
1216
|
+
"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."
|
|
1217
|
+
},
|
|
1218
|
+
{
|
|
1219
|
+
"code": "MOSTRA_VERIFY_LIVE_FAILED",
|
|
1220
|
+
"severity": "warning",
|
|
1221
|
+
"phase": "runtime",
|
|
1222
|
+
"title": "Live source failed during verify",
|
|
1223
|
+
"hint": "Check the live source's message: it failed while verify rendered the page, which may be the environment rather than the code.",
|
|
1224
|
+
"explanation": "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.",
|
|
1225
|
+
"fix": "Read the message. If the producer itself is wrong, fix it; if the data source was unreachable, verify again when it is back."
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
"code": "MOSTRA_VERIFY_NO_BASELINE",
|
|
1229
|
+
"severity": "hint",
|
|
1230
|
+
"phase": "regression",
|
|
1231
|
+
"title": "No earlier passing version",
|
|
1232
|
+
"hint": "Nothing to fix: the next version will be compared with this one once it is published.",
|
|
1233
|
+
"explanation": "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.",
|
|
1234
|
+
"fix": "Nothing is required."
|
|
1235
|
+
},
|
|
1236
|
+
{
|
|
1237
|
+
"code": "MOSTRA_VERIFY_SECRET_MISSING",
|
|
1238
|
+
"severity": "warning",
|
|
1239
|
+
"phase": "runtime",
|
|
1240
|
+
"title": "Secret missing during verify",
|
|
1241
|
+
"hint": "Set the secret with `mostra secret set <NAME>` if the artifact needs it; verify reports it as the environment, not the code.",
|
|
1242
|
+
"explanation": "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.",
|
|
1243
|
+
"fix": "Run `mostra secret set <NAME>` (for the artifact or the home) with the value the code needs, then verify again."
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
"code": "MOSTRA_VERIFY_SKIP_CONSEQUENCE",
|
|
1247
|
+
"severity": "hint",
|
|
1248
|
+
"phase": "smoke",
|
|
1249
|
+
"title": "Page reaction to a skipped action",
|
|
1250
|
+
"hint": "Nothing to fix: this followed from verify skipping an action, which a viewer's page never meets.",
|
|
1251
|
+
"explanation": "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.",
|
|
1252
|
+
"fix": "Nothing is required. To let verify see the action's real result, opt it into the smoke test with `dryRun()`."
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
"code": "MOSTRA_VERIFY_TIMEOUT",
|
|
1256
|
+
"severity": "error",
|
|
1257
|
+
"phase": "runtime",
|
|
1258
|
+
"title": "Verify ran out of time",
|
|
1259
|
+
"hint": "Make the page render without waiting on slow work at load, then verify again.",
|
|
1260
|
+
"explanation": "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.",
|
|
1261
|
+
"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."
|
|
1262
|
+
}
|
|
1263
|
+
]
|
|
1264
|
+
}
|