@mostra/runtime 0.10.0 → 0.11.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/dist/bin.js +4058 -310
- package/dist/bin.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/{instance-FExcyENK.js → instance-DCiUHvgZ.js} +682 -47
- package/dist/instance-DCiUHvgZ.js.map +1 -0
- package/dist/reference/cli.md +1322 -0
- package/dist/reference/diagnostics.json +1552 -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_PAUSED.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_BUNDLE_INVALID.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_ID_DROPPED.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_PATCH_REJECTED.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_PATH_INVALID.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_HELPER_MISSING.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_INSTALLING.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_NETWORK_FILESYSTEM.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_FRAME_SESSION.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_REMOTE_CONFIG_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_REMOTE_HOME_MOVING.md +23 -0
- package/dist/reference/errors/MOSTRA_REMOTE_HOME_SUSPENDED.md +23 -0
- package/dist/reference/errors/MOSTRA_REMOTE_LIMIT_REACHED.md +23 -0
- package/dist/reference/errors/MOSTRA_REMOTE_LOGIN_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_REMOTE_NOT_OWNER_INSTANCE.md +23 -0
- package/dist/reference/errors/MOSTRA_REMOTE_NO_INSTANCE.md +23 -0
- package/dist/reference/errors/MOSTRA_REMOTE_OPERATOR_UNAVAILABLE.md +23 -0
- package/dist/reference/errors/MOSTRA_REMOTE_OWNER_OFFLINE.md +23 -0
- package/dist/reference/errors/MOSTRA_REMOTE_PAUSED_BY_OPERATOR.md +23 -0
- package/dist/reference/errors/MOSTRA_REMOTE_QUEUE_FULL.md +23 -0
- package/dist/reference/errors/MOSTRA_REMOTE_RATE_LIMITED.md +23 -0
- package/dist/reference/errors/MOSTRA_REMOTE_SIGN_IN_REQUIRED.md +23 -0
- package/dist/reference/errors/MOSTRA_REMOTE_UNDER_REVIEW.md +23 -0
- package/dist/reference/errors/MOSTRA_REMOTE_UNREACHABLE.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_SHARE_NOT_ENABLED.md +23 -0
- package/dist/reference/errors/MOSTRA_SHARE_NOT_FOUND.md +23 -0
- package/dist/reference/errors/MOSTRA_SHARE_PORTS_EXHAUSTED.md +23 -0
- package/dist/reference/errors/MOSTRA_SHARE_TOOL_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_SHARE_TOOL_NOT_READY.md +23 -0
- package/dist/reference/errors/MOSTRA_SHARE_TTL_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_SHARE_TUNNEL_FAILED.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_PAUSED.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/self-hosting.md +130 -0
- package/dist/reference/telemetry.md +84 -0
- package/dist/skill/SKILL.md +122 -0
- package/dist/skill/assets/examples/dashboard/index.tsx +161 -0
- package/dist/skill/assets/examples/dashboard/live.ts +25 -0
- package/dist/skill/assets/examples/dashboard/styles.css +125 -0
- package/dist/skill/assets/examples/decision/index.tsx +95 -0
- package/dist/skill/assets/examples/decision/styles.css +125 -0
- package/dist/skill/assets/examples/inbox/actions.ts +23 -0
- package/dist/skill/assets/examples/inbox/index.tsx +109 -0
- package/dist/skill/assets/examples/inbox/styles.css +125 -0
- package/dist/skill/assets/studio.css +125 -0
- package/dist/skill/references/answers.md +217 -0
- package/dist/skill/references/design.md +154 -0
- package/dist/skill/references/libraries.md +167 -0
- package/dist/skill/references/long-lived.md +148 -0
- package/dist/skill/references/mcp.md +68 -0
- package/dist/skill/references/page.md +131 -0
- package/dist/skill/references/server.md +146 -0
- package/dist/skill/references/sharing.md +123 -0
- package/dist/skill/references/verify.md +71 -0
- package/package.json +10 -5
- package/src/gateway/actions.ts +20 -0
- package/src/gateway/browser.ts +44 -0
- package/src/gateway/capabilities.ts +8 -0
- package/src/gateway/http.ts +12 -1
- package/src/gateway/index.ts +170 -5
- package/src/gateway/listener.ts +31 -6
- package/src/gateway/routes.ts +8 -0
- package/src/gc/index.ts +5 -0
- package/src/instance/index.ts +20 -1
- package/src/interaction/index.ts +60 -0
- package/src/interaction/pause.ts +106 -0
- package/src/interaction/submissions.ts +42 -1
- package/src/interaction/viewers.ts +34 -1
- package/src/ledger/index.ts +20 -1
- package/src/ledger/migrations.ts +51 -0
- package/src/link/author.ts +215 -0
- package/src/link/hosted.ts +37 -1
- package/src/link/http.ts +6 -1
- package/src/link/index.ts +3 -1
- package/src/link/manager.ts +138 -34
- package/src/protocol-server/client.ts +53 -0
- package/src/protocol-server/index.ts +1 -1
- package/src/server/api.ts +514 -72
- package/src/server/auth.ts +600 -74
- package/src/server/authorize.ts +816 -0
- package/src/server/clients.ts +235 -0
- package/src/server/config.ts +7 -0
- package/src/server/data.ts +59 -1
- package/src/server/directory.ts +69 -0
- package/src/server/feed.ts +191 -0
- package/src/server/handle.ts +172 -0
- package/src/server/hosted-pages.ts +532 -0
- package/src/server/hosted.ts +519 -18
- package/src/server/index.ts +343 -61
- package/src/server/mcp.ts +330 -0
- package/src/server/metering.ts +156 -0
- package/src/server/oauth-clients.ts +510 -0
- package/src/server/operator.ts +498 -0
- package/src/server/providers.ts +284 -0
- package/src/server/remove.ts +148 -0
- package/src/server/routing.ts +275 -0
- package/src/verify/runner.ts +23 -2
- package/dist/instance-FExcyENK.js.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HOST_MALFORMED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HOST_MALFORMED
|
|
10
|
+
|
|
11
|
+
Malformed protocol message. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Send each message as one line of JSON holding a single JSON-RPC 2.0 request or notification.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HOST_MESSAGE_TOO_LARGE
|
|
3
|
+
severity: error
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HOST_MESSAGE_TOO_LARGE
|
|
10
|
+
|
|
11
|
+
Message too large for the protocol. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Ask for less at once: a specific submission, fewer events, or smaller values.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HOST_METHOD_UNKNOWN
|
|
3
|
+
severity: error
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HOST_METHOD_UNKNOWN
|
|
10
|
+
|
|
11
|
+
Unknown protocol method. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Call only the methods listed in `capabilities.methods` of the `mostra/initialize` result.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HOST_NOTIFICATION_UNSUPPORTED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HOST_NOTIFICATION_UNSUPPORTED
|
|
10
|
+
|
|
11
|
+
Notification not accepted. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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`.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Reconnect and initialize with `capabilities: { notifications: ["events/notify"] }`, or poll with `events/read` instead.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
List the notification in `capabilities.notifications` when you initialize.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HOST_PORT_UNSUPPORTED
|
|
3
|
+
severity: warning
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HOST_PORT_UNSUPPORTED
|
|
10
|
+
|
|
11
|
+
Port not supported by this instance. Severity: warning. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Leave the port out of `mostra/initialize`, or run a Mostra release that lists it in `capabilities.ports`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HOST_REQUEST_ID_REUSED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HOST_REQUEST_ID_REUSED
|
|
10
|
+
|
|
11
|
+
A requestId was reused with other parameters. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Generate a fresh `requestId` for every new request, and reuse one only to retry the same request after a timeout or a lost connection.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Send a new `requestId` for a new request; repeat the exact parameters only to retry one.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HOST_REVISION_UNSUPPORTED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HOST_REVISION_UNSUPPORTED
|
|
10
|
+
|
|
11
|
+
No common host protocol revision. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Run the client and the instance from the same Mostra release, for example with `mostra daemon restart`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HOST_SHUTDOWN_REFUSED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HOST_SHUTDOWN_REFUSED
|
|
10
|
+
|
|
11
|
+
Only the spawning host can stop this instance. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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).
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Ask the host that started this instance to stop it, or end the connection you opened instead.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HOST_SUBSCRIPTION_UNKNOWN
|
|
3
|
+
severity: error
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HOST_SUBSCRIPTION_UNKNOWN
|
|
10
|
+
|
|
11
|
+
Unknown subscription. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Call `events/subscribe` again on this connection. With the same `name`, delivery resumes after the last acknowledged cursor.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Subscribe again with `events/subscribe`, then use the ID it returns.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HOST_TIMEOUT
|
|
3
|
+
severity: error
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HOST_TIMEOUT
|
|
10
|
+
|
|
11
|
+
Request timed out. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Retry with the same request ID, which returns the recorded result if the first attempt completed. Allow a longer timeout for slow operations.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Retry the request with the same request ID, or allow it more time.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HYGIENE_CONTENT_TYPE
|
|
3
|
+
severity: error
|
|
4
|
+
phase: hygiene
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HYGIENE_CONTENT_TYPE
|
|
10
|
+
|
|
11
|
+
JSON content type required. Severity: error. Phase: hygiene.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Send `Content-Type: application/json` and a JSON body.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Send the body as JSON with `Content-Type: application/json`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HYGIENE_CSRF_MISSING
|
|
3
|
+
severity: error
|
|
4
|
+
phase: hygiene
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HYGIENE_CSRF_MISSING
|
|
10
|
+
|
|
11
|
+
CSRF token missing or wrong. Severity: error. Phase: hygiene.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Send the session's CSRF token from `GET /_mostra/session` in the `X-Mostra-CSRF` header.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HYGIENE_FRAME_SESSION
|
|
3
|
+
severity: error
|
|
4
|
+
phase: hygiene
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HYGIENE_FRAME_SESSION
|
|
10
|
+
|
|
11
|
+
Frame session couldn't start. Severity: error. Phase: hygiene.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
Where the shell and the artifact are two sites (a Cloudflare quick tunnel, or a host's addresses on two hosts), the artifact's frame can't use a cookie: it enters through a bootstrap page that installs Mostra's service worker at `/`, which signs every request of the frame (worker mode, D70). Mostra reports this code when that can't happen: the browser offers the frame no service worker (a private window, a setting that blocks third-party storage), refuses to install it, or the gateway refused the frame's entry. The client runtime reports it too when the artifact's own code registers another service worker at `/`, which would replace Mostra's and end the frame's session.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Open the artifact through a tailnet or Funnel share, where the frame uses a cookie, or in a browser window that allows service workers in frames. An artifact that needs its own service worker registers it at a narrower scope than `/`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Open the artifact's tailnet or Funnel link, or this link in a normal window of another browser.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HYGIENE_HEADERS_TOO_LARGE
|
|
3
|
+
severity: error
|
|
4
|
+
phase: hygiene
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HYGIENE_HEADERS_TOO_LARGE
|
|
10
|
+
|
|
11
|
+
The request's headers are too large. Severity: error. Phase: hygiene.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Open the artifact's link again. If it keeps happening, find the page that sets the cookies: it runs on this host.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Open the link again: this page cleared the cookies that made the request too large.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HYGIENE_HOST_REFUSED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: hygiene
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HYGIENE_HOST_REFUSED
|
|
10
|
+
|
|
11
|
+
Host not served. Severity: error. Phase: hygiene.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Open the artifact through the exact link Mostra gave you.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HYGIENE_NOT_SERVED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: hygiene
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HYGIENE_NOT_SERVED
|
|
10
|
+
|
|
11
|
+
Nothing served here. Severity: error. Phase: hygiene.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Check the path. Server code runs through the browser protocol, never as a file, and an artifact becomes viewable only once it is published.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Request a published version's files or a documented `/_mostra/` path.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HYGIENE_ORIGIN_REFUSED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: hygiene
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HYGIENE_ORIGIN_REFUSED
|
|
10
|
+
|
|
11
|
+
Origin refused. Severity: error. Phase: hygiene.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Send the request from the page's own origin.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HYGIENE_RATE_LIMITED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: hygiene
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HYGIENE_RATE_LIMITED
|
|
10
|
+
|
|
11
|
+
Too many failed attempts. Severity: error. Phase: hygiene.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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`.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Wait, then open the link again. Repeated failures usually come from a mistyped link or a script retrying an old one.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Wait for the time in `Retry-After`, then open the link again.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HYGIENE_REQUEST_MALFORMED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: hygiene
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HYGIENE_REQUEST_MALFORMED
|
|
10
|
+
|
|
11
|
+
Malformed request. Severity: error. Phase: hygiene.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Send one well-formed HTTP request with a path that starts with `/`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HYGIENE_SCOPE_DENIED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: hygiene
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HYGIENE_SCOPE_DENIED
|
|
10
|
+
|
|
11
|
+
Not allowed by this link. Severity: error. Phase: hygiene.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Open a link minted with this scope (`view/url` with `scopes`).
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HYGIENE_SESSION_CONFLICT
|
|
3
|
+
severity: warning
|
|
4
|
+
phase: hygiene
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HYGIENE_SESSION_CONFLICT
|
|
10
|
+
|
|
11
|
+
Another link is already open for this artifact. Severity: warning. Phase: hygiene.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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`.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
In the shell, choose the link to keep. A client exchanging tokens itself sends `replace: true` to replace the session.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Choose which link to keep; send `replace: true` to use the new one.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HYGIENE_SESSION_MISSING
|
|
3
|
+
severity: error
|
|
4
|
+
phase: hygiene
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HYGIENE_SESSION_MISSING
|
|
10
|
+
|
|
11
|
+
No session. Severity: error. Phase: hygiene.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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).
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Open the artifact's capability link again to start a session.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HYGIENE_TOKEN_INVALID
|
|
3
|
+
severity: error
|
|
4
|
+
phase: hygiene
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HYGIENE_TOKEN_INVALID
|
|
10
|
+
|
|
11
|
+
Unknown capability token. Severity: error. Phase: hygiene.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Use the complete capability link Mostra gave you, or mint a new one with `view/url`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_HYGIENE_TOKEN_REVOKED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: hygiene
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_HYGIENE_TOKEN_REVOKED
|
|
10
|
+
|
|
11
|
+
Link revoked or expired. Severity: error. Phase: hygiene.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Ask for a new link: `view/url` mints one, or `view/rotate` replaces this one.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_LIVE_SOURCE_FAILED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: runtime
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_LIVE_SOURCE_FAILED
|
|
10
|
+
|
|
11
|
+
Live source failed. Severity: error. Phase: runtime.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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).
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Fix the producer in `live.ts`, or catch transient failures there and return the previous value.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Read the message, fix the live source's loader or stream, and publish again; the last good value stays meanwhile.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_LIVE_TOO_LARGE
|
|
3
|
+
severity: error
|
|
4
|
+
phase: runtime
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_LIVE_TOO_LARGE
|
|
10
|
+
|
|
11
|
+
Live value too large. Severity: error. Phase: runtime.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
A live value, pushed or produced, is over 4 MiB once serialized (DATA_MODEL §5). It is refused and the last good value stays.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Push or produce a smaller value: at most 4 MiB serialized.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_MANIFEST_INVALID
|
|
3
|
+
severity: error
|
|
4
|
+
phase: manifest
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_MANIFEST_INVALID
|
|
10
|
+
|
|
11
|
+
Manifest value is invalid. Severity: error. Phase: manifest.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Fix the manifest field named in the message so it matches the manifest's documented shape.
|