@mostra/runtime 0.10.0 → 0.12.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 +4178 -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-CBUlOmzG.js} +1892 -85
- package/dist/instance-CBUlOmzG.js.map +1 -0
- package/dist/reference/cli.md +1432 -0
- package/dist/reference/diagnostics.json +1579 -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_TEAM_PRESENCE_RATE_LIMITED.md +23 -0
- package/dist/reference/errors/MOSTRA_TEAM_ROSTER_POLICY.md +23 -0
- package/dist/reference/errors/MOSTRA_TEAM_ROSTER_TOO_LARGE.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 +124 -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 +219 -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/teams.md +78 -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 +128 -1
- package/src/gateway/capabilities.ts +8 -0
- package/src/gateway/http.ts +12 -1
- package/src/gateway/index.ts +210 -6
- package/src/gateway/listener.ts +31 -6
- package/src/gateway/routes.ts +8 -0
- package/src/gateway/team.ts +181 -0
- package/src/gc/index.ts +5 -0
- package/src/instance/index.ts +22 -2
- package/src/interaction/ephemeral.ts +21 -0
- package/src/interaction/events.ts +17 -0
- package/src/interaction/index.ts +325 -20
- package/src/interaction/pause.ts +106 -0
- package/src/interaction/roster.ts +585 -0
- package/src/interaction/submissions.ts +42 -1
- package/src/interaction/team.ts +426 -0
- package/src/interaction/viewers.ts +34 -1
- package/src/interaction/wait.ts +150 -0
- package/src/ledger/index.ts +20 -1
- package/src/ledger/migrations.ts +86 -0
- package/src/link/author.ts +215 -0
- package/src/link/hosted.ts +51 -4
- package/src/link/http.ts +6 -1
- package/src/link/index.ts +3 -1
- package/src/link/manager.ts +169 -35
- 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 +91 -0
- package/src/server/feed.ts +277 -0
- package/src/server/handle.ts +172 -0
- package/src/server/hosted-pages.ts +532 -0
- package/src/server/hosted.ts +551 -18
- package/src/server/index.ts +353 -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 +557 -0
- package/src/server/providers.ts +284 -0
- package/src/server/remove.ts +148 -0
- package/src/server/routing.ts +275 -0
- package/src/share/index.ts +50 -2
- package/src/verify/index.ts +7 -0
- package/src/verify/runner.ts +27 -2
- package/dist/instance-FExcyENK.js.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_TEAM_PRESENCE_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_TEAM_PRESENCE_RATE_LIMITED
|
|
10
|
+
|
|
11
|
+
Presence updates too fast. Severity: error. Phase: hygiene.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
A page shares its viewer's cursor and selection through `POST /_mostra/v/<rev>/presence`. Each view may send 20 updates a second; past that the gateway answers 429 with `Retry-After`. Presence is never stored, so nothing is lost: the next update replaces the last one.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Use `usePresence` from `@mostra/react`, which sends at most 10 updates a second, or throttle your own calls to the route.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Send presence at most 10 times a second; usePresence does this for you.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_TEAM_ROSTER_POLICY
|
|
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_TEAM_ROSTER_POLICY
|
|
10
|
+
|
|
11
|
+
This artifact's policy can't wait for every respondent. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
`submitted:all` waits until every expected respondent has submitted, and `submitted:<N>` for N submissions. Both need a policy that takes a submission from each person: `once` with scope `per-viewer`, or `epochs`. Under `once` per-artifact the artifact takes one submission in all, so neither can be met beyond the first, and Mostra refuses the wait instead of letting it run forever.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Publish again with `mostra publish <path> --policy once-per-viewer` (or `--policy epochs`), or wait for `submitted`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Publish with the submission policy once per-viewer or epochs, then wait again; or wait for submitted.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_TEAM_ROSTER_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_TEAM_ROSTER_TOO_LARGE
|
|
10
|
+
|
|
11
|
+
Roster larger than 1,000 respondents. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
A roster lists the people an artifact expects answers from, each with a personal link and a status. It holds at most 1,000 of them. Nothing was added: the roster is as it was.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Remove respondents you no longer expect (`mostra roster remove`), or, for a page many people answer, share one link and wait for `submitted:<N>` instead.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Name at most 1,000 expected respondents; share one link for everyone else instead.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_TYPE_ERROR
|
|
3
|
+
severity: error
|
|
4
|
+
phase: compile
|
|
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_TYPE_ERROR
|
|
10
|
+
|
|
11
|
+
Type error. Severity: error. Phase: compile.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Open the file at the reported line and fix the code, for example a missing property, a wrong argument type or a misspelled import.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Fix the type error at the reported location; the message carries TypeScript's code and text.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_TYPE_UNTYPED_PACKAGE
|
|
3
|
+
severity: warning
|
|
4
|
+
phase: compile
|
|
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_TYPE_UNTYPED_PACKAGE
|
|
10
|
+
|
|
11
|
+
Package without type declarations. Severity: warning. Phase: compile.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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`.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Optionally add a declaration file such as `declare module "<package>";`, or a typed wrapper, to the artifact.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Nothing breaks: the package works without types; declare a module for it if you want them checked.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_VERIFY_ACTION_SKIPPED
|
|
3
|
+
severity: hint
|
|
4
|
+
phase: smoke
|
|
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_VERIFY_ACTION_SKIPPED
|
|
10
|
+
|
|
11
|
+
Action skipped in verify. Severity: hint. Phase: smoke.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
To have verify run this action, check `dryRun()` from `@mostra/server` in it and return early without its side effects when it is true.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_VERIFY_BASELINE_MISSING
|
|
3
|
+
severity: hint
|
|
4
|
+
phase: regression
|
|
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_VERIFY_BASELINE_MISSING
|
|
10
|
+
|
|
11
|
+
Baseline version's build is missing. Severity: hint. Phase: regression.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Nothing is required. A version published from this source becomes the next baseline.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Nothing to fix here; publish again to give later versions a baseline.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_VERIFY_CRASHED
|
|
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_VERIFY_CRASHED
|
|
10
|
+
|
|
11
|
+
Verify runner crashed. Severity: error. Phase: runtime.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Verify again; if it keeps crashing, report the message with `mostra doctor`'s output.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_VERIFY_LIVE_FAILED
|
|
3
|
+
severity: warning
|
|
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_VERIFY_LIVE_FAILED
|
|
10
|
+
|
|
11
|
+
Live source failed during verify. Severity: warning. Phase: runtime.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Read the message. If the producer itself is wrong, fix it; if the data source was unreachable, verify again when it is back.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Check the live source's message: it failed while verify rendered the page, which may be the environment rather than the code.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_VERIFY_NO_BASELINE
|
|
3
|
+
severity: hint
|
|
4
|
+
phase: regression
|
|
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_VERIFY_NO_BASELINE
|
|
10
|
+
|
|
11
|
+
No earlier passing version. Severity: hint. Phase: regression.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Nothing is required.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Nothing to fix: the next version will be compared with this one once it is published.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_VERIFY_SECRET_MISSING
|
|
3
|
+
severity: warning
|
|
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_VERIFY_SECRET_MISSING
|
|
10
|
+
|
|
11
|
+
Secret missing during verify. Severity: warning. Phase: runtime.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Run `mostra secret set <NAME>` (for the artifact or the home) with the value the code needs, then verify again.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Set the secret with `mostra secret set <NAME>` if the artifact needs it; verify reports it as the environment, not the code.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_VERIFY_SKIP_CONSEQUENCE
|
|
3
|
+
severity: hint
|
|
4
|
+
phase: smoke
|
|
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_VERIFY_SKIP_CONSEQUENCE
|
|
10
|
+
|
|
11
|
+
Page reaction to a skipped action. Severity: hint. Phase: smoke.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Nothing is required. To let verify see the action's real result, opt it into the smoke test with `dryRun()`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Nothing to fix: this followed from verify skipping an action, which a viewer's page never meets.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_VERIFY_TIMEOUT
|
|
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_VERIFY_TIMEOUT
|
|
10
|
+
|
|
11
|
+
Verify ran out of time. Severity: error. Phase: runtime.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Make the page render without waiting on slow work at load, then verify again.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Self-hosting the remote server
|
|
2
|
+
|
|
3
|
+
The remote server hosts shared pages so their links keep working while the machine that shared them sleeps. It also hosts the remote MCP endpoint for chat apps. You run it as one container behind a TLS front. This page shows the shape with Caddy. Any TLS terminator that keeps the request's `Host` and adds `X-Forwarded-For` works the same way.
|
|
4
|
+
|
|
5
|
+
## What you need
|
|
6
|
+
|
|
7
|
+
- **A host name for the API origin**, such as `api.example.com`. Owners sign in and connect there, chat apps reach `/mcp` there, and version files upload there.
|
|
8
|
+
- **A user-content domain of its own**, such as `example-usercontent.com`. Its apex serves the hosted shell, and each shared page gets a random label under it (`<label>.example-usercontent.com`). Use a registrable domain that serves nothing else, and keep the API origin off it. A page on it can set cookies for the whole domain, so nothing else should live there.
|
|
9
|
+
- **DNS** for the API host, the user-content apex and the wildcard `*.example-usercontent.com`, all pointing at your front. Labels are one level deep, so one wildcard certificate covers every page.
|
|
10
|
+
- **One machine** with Docker and a local disk. The data directory can't be on a network filesystem: the server refuses NFS, SMB and network FUSE mounts at start.
|
|
11
|
+
|
|
12
|
+
## Configuration
|
|
13
|
+
|
|
14
|
+
The server reads a JSON file (`--config`) and `MOSTRA_SERVER_<KEY>` variables. A variable overrides the file's key. It holds JSON, or a plain string for `apiOrigin`, `operator` and `scheme`. If the server can't use a key, it stops before serving anything and names the key (`MOSTRA_REMOTE_CONFIG_INVALID`).
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"apiOrigin": "https://api.example.com",
|
|
19
|
+
"domains": { "active": "example-usercontent.com" },
|
|
20
|
+
"trustedProxies": ["172.31.230.0/24"],
|
|
21
|
+
"identityProviders": [
|
|
22
|
+
{
|
|
23
|
+
"id": "github",
|
|
24
|
+
"kind": "github",
|
|
25
|
+
"label": "GitHub",
|
|
26
|
+
"clientId": "<the OAuth app's client ID>",
|
|
27
|
+
"clientSecretFile": "/run/secrets/github"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"rateLimits": {
|
|
31
|
+
"perIp": { "submissions": { "count": 120, "per": "1m" } },
|
|
32
|
+
"perLink": { "submissions": { "count": 600, "per": "1m" } }
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
| Key | What it does |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `apiOrigin` | The API origin, `https:` |
|
|
40
|
+
| `domains.active`, `domains.spares` | The user-content domain new links use, and older ones that issued links keep working on. To move off a domain, make a spare active and restart the server |
|
|
41
|
+
| `trustedProxies` | Addresses or CIDR ranges whose `X-Forwarded-For` the server believes. It reads the header from the right and takes the first address that isn't a trusted proxy. Rate limits count IPv6 clients per /64 (`rateLimits.ipv6Prefix`) |
|
|
42
|
+
| `identityProviders` | How people sign in: `github` (an OAuth app), `oidc` (any OpenID Connect provider: `issuer`, `clientId`, `clientSecretFile`) or `development` (trusts any typed name; for tests only, never on a public server) |
|
|
43
|
+
| `rateLimits` | Rates as `{ "count", "per" }`: `perIp.submissions` and `perLink.submissions` for answers, `perLink.relayedRuns` for actions, and `perIp.requests` for every request an address sends (a health check aside). Past a rate the answer is 429 with `Retry-After`; a page says to try again shortly and keeps the draft. A key left out is no limit |
|
|
44
|
+
| `relay`, `homes`, `ledger` | The relay's waiting-run cap and drain rate, how long an idle hosted home stays open, and the ledger's WAL checkpoint (`0` for a backup replicator) |
|
|
45
|
+
| `operator` | The path of an operator module, which adds limits, metering, accounts and abuse handling through the operator ports (`@mostra/protocol/operator`). Without one, every port keeps its no-op default |
|
|
46
|
+
|
|
47
|
+
For GitHub sign-in, create an OAuth app with the callback `https://api.example.com/signin/github/callback`. For OpenID Connect, register the redirect URI `https://api.example.com/signin/<id>/callback`. Keep each client secret in a file that only the container's user (UID 10001) can read.
|
|
48
|
+
|
|
49
|
+
## Running it with Caddy
|
|
50
|
+
|
|
51
|
+
The image is `ghcr.io/mostra-dev/mostra-server`, tagged with each release's version, for `linux/amd64` and `linux/arm64`. It runs `mostra-runtime server` as a non-root user. It listens on port 8080 and keeps everything in `/data`: hosted homes, version files and the server's keys. Append `--config <file>` to its command, or set the `MOSTRA_SERVER_*` variables.
|
|
52
|
+
|
|
53
|
+
`compose.yaml`:
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
networks:
|
|
57
|
+
front:
|
|
58
|
+
ipam:
|
|
59
|
+
config:
|
|
60
|
+
- subnet: 172.31.230.0/24
|
|
61
|
+
volumes:
|
|
62
|
+
data: {}
|
|
63
|
+
caddy-data: {}
|
|
64
|
+
services:
|
|
65
|
+
mostra-server:
|
|
66
|
+
image: ghcr.io/mostra-dev/mostra-server:<version>
|
|
67
|
+
command: ["--config", "/config/server.json"]
|
|
68
|
+
restart: unless-stopped
|
|
69
|
+
networks: [front]
|
|
70
|
+
read_only: true
|
|
71
|
+
tmpfs: [/tmp]
|
|
72
|
+
volumes:
|
|
73
|
+
- data:/data
|
|
74
|
+
- ./server.json:/config/server.json:ro
|
|
75
|
+
- ./github-secret:/run/secrets/github:ro
|
|
76
|
+
caddy:
|
|
77
|
+
image: <caddy built with the caddy-dns module for your DNS provider>
|
|
78
|
+
restart: unless-stopped
|
|
79
|
+
networks: [front]
|
|
80
|
+
ports: ["80:80", "443:443", "443:443/udp"]
|
|
81
|
+
volumes:
|
|
82
|
+
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
|
83
|
+
- ./dns-token:/run/secrets/dns-token:ro
|
|
84
|
+
- caddy-data:/data
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`Caddyfile`:
|
|
88
|
+
|
|
89
|
+
```caddyfile
|
|
90
|
+
{
|
|
91
|
+
servers {
|
|
92
|
+
# A sibling page can fill the domain's cookie jar: pass up to 1 MiB of headers.
|
|
93
|
+
max_header_size 1MiB
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
api.example.com {
|
|
98
|
+
reverse_proxy mostra-server:8080
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
example-usercontent.com, *.example-usercontent.com {
|
|
102
|
+
tls {
|
|
103
|
+
dns cloudflare {file./run/secrets/dns-token}
|
|
104
|
+
}
|
|
105
|
+
reverse_proxy mostra-server:8080
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The wildcard certificate needs the DNS-01 challenge, so Caddy needs a build with your DNS provider's module (`xcaddy build --with github.com/caddy-dns/<provider>`) and a token that may edit the zone's records, kept in the file `dns-token` beside the `Caddyfile` (readable by the user Caddy runs as, and by nobody else) and read by `{file.…}`, so it is in no environment a process listing or a log can show. Caddy keeps the request's `Host` and adds `X-Forwarded-For`, and the server believes that header only from the network `trustedProxies` names.
|
|
110
|
+
|
|
111
|
+
Check the server once it runs:
|
|
112
|
+
|
|
113
|
+
```sh
|
|
114
|
+
curl https://api.example.com/health # {"status":"ok",…}
|
|
115
|
+
curl https://api.example.com/.well-known/oauth-authorization-server # the sign-in metadata
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
An owner then links a machine with `mostra login https://api.example.com` and shares a page with `mostra share <dir> --cloud`. A chat app connects to `https://api.example.com/mcp`.
|
|
119
|
+
|
|
120
|
+
## Fronts and request headers
|
|
121
|
+
|
|
122
|
+
Hosted pages use no cookies, and the server drops every `Cookie` header unread. A tenant's page can still fill the user-content domain's cookie jar, and browsers then send up to about 720 KiB of cookies with each request. The server accepts headers up to 1 MiB, so such a jar never costs another page its session. Your front has to pass them too. Caddy's default is 16 KiB, so the Caddyfile above raises it with `max_header_size 1MiB`. A CDN or proxy whose limit is smaller fails every page on the domain for a browser whose jar a sibling page filled.
|
|
123
|
+
|
|
124
|
+
## Backups and restores
|
|
125
|
+
|
|
126
|
+
Each hosted home's ledger is SQLite in WAL mode with normal locking, so a WAL replicator such as Litestream can read it live from its own process. Back up the whole data directory. After restoring a home, or the whole directory, by hand, start the server with `--restored <homeId>` or `--restored all`. The restored homes then rotate their incarnations before they serve anything, so owners never mistake reused cursors for ones they already copied. Each owner's machine also notices a home that holds less than it copied, and records the gap as `remote.regressed`.
|
|
127
|
+
|
|
128
|
+
## What the open server doesn't do
|
|
129
|
+
|
|
130
|
+
It imposes no quota, link expiry or automatic pause, deletes nothing on its own, and sends no email or webhook. Plans, quotas, billing, abuse scoring, placing homes across machines, backup automation and outside domains come from an operator module through the operator ports. An operator pauses, quarantines, suspends and removes through the server handle the module receives.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Telemetry
|
|
2
|
+
|
|
3
|
+
The standalone `mostra` CLI can send anonymous usage events, so we can see which commands work,
|
|
4
|
+
which fail, and which agents people use Mostra with. This page lists every event and every field.
|
|
5
|
+
If it isn't on this page, Mostra doesn't send it.
|
|
6
|
+
|
|
7
|
+
## What Mostra never sends
|
|
8
|
+
|
|
9
|
+
- Artifact content, source code, answers or submissions
|
|
10
|
+
- File paths, project or artifact names, URLs, capability links or tokens
|
|
11
|
+
- Names, emails, usernames, hostnames or account identifiers
|
|
12
|
+
- Your time zone, locale or anything typed on the command line
|
|
13
|
+
|
|
14
|
+
The collector doesn't store IP addresses.
|
|
15
|
+
|
|
16
|
+
## When it is on
|
|
17
|
+
|
|
18
|
+
- **In the EU, the EEA, the UK, Switzerland and nearby countries, and when the time zone is UTC or
|
|
19
|
+
unknown,** Mostra asks first. Nothing is sent until you answer yes or run `mostra telemetry on`.
|
|
20
|
+
Pressing Enter or not answering means no. Where no one can answer (CI, an agent's shell, `--json`),
|
|
21
|
+
Mostra doesn't ask and sends nothing. Mostra checks the time zone on your machine and never
|
|
22
|
+
sends it.
|
|
23
|
+
- **Elsewhere,** telemetry is on by default. Mostra prints a notice once before it sends anything.
|
|
24
|
+
|
|
25
|
+
## When it is off
|
|
26
|
+
|
|
27
|
+
- `mostra telemetry off`, `MOSTRA_TELEMETRY=0` or `DO_NOT_TRACK=1`. Any of these wins over every
|
|
28
|
+
setting that turns it on.
|
|
29
|
+
- Embedded use never sends anything: the TypeScript SDK, the Rust crate, an instance a host starts
|
|
30
|
+
(`mostra host`), any home a host has configured, and an MCP server started with
|
|
31
|
+
`mostra mcp --embedded`, as a harness plugin starts it.
|
|
32
|
+
- A build without a telemetry endpoint sends nothing.
|
|
33
|
+
|
|
34
|
+
`mostra telemetry status` shows whether telemetry is on, why, your install ID and how many
|
|
35
|
+
events are waiting to be sent. `MOSTRA_TELEMETRY_DEBUG=1` prints every event to stderr exactly as
|
|
36
|
+
it would be sent, and sends nothing.
|
|
37
|
+
|
|
38
|
+
## The install ID
|
|
39
|
+
|
|
40
|
+
On the first run that sends, Mostra creates a random ID and stores it in its config directory
|
|
41
|
+
(`${XDG_CONFIG_HOME:-~/.config}/mostra`, or `MOSTRA_CONFIG_DIR`). It is never derived from your
|
|
42
|
+
machine or from you, and it is the only value Mostra keeps between events. It lets us count
|
|
43
|
+
installs. Turning telemetry off deletes it and any unsent events; turning it on again creates a new
|
|
44
|
+
one.
|
|
45
|
+
|
|
46
|
+
## Fields on every event
|
|
47
|
+
|
|
48
|
+
| Field | Example | Why |
|
|
49
|
+
|---|---|---|
|
|
50
|
+
| `schema` | `1` | The version of this list |
|
|
51
|
+
| `event` | `cli.command` | Which event |
|
|
52
|
+
| `at` | `2026-11-10T14:05:00Z` | When, to the minute |
|
|
53
|
+
| `installId` | a random UUID | Count installs without knowing who you are |
|
|
54
|
+
| `version` | `1.0.0` | Know which versions fail |
|
|
55
|
+
| `os`, `arch` | `darwin`, `linux` or `win32`; `x64` or `arm64` | Platform support |
|
|
56
|
+
| `node` | `22` | Which Node versions to support |
|
|
57
|
+
| `harness` | `claude-code`, `codex`, `gemini-cli`, `opencode`, `cursor`, `other`, `none` | Which agents to work with next |
|
|
58
|
+
| `ci` | `false` | Separate CI from people |
|
|
59
|
+
| `consent` | `explicit` or `default` | Whether you said yes or it was on by default |
|
|
60
|
+
|
|
61
|
+
## Events
|
|
62
|
+
|
|
63
|
+
| Event | Sent when | Its own fields |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| `cli.first_run` | The install ID is created | none |
|
|
66
|
+
| `cli.command` | A command finishes | `command` (its name, never its arguments), `exit` (exit code), `duration` (`<1s`, `1-5s`, `5-30s`, `30s-2m`, `2-10m`, `>10m`), `json` (whether `--json` was used), `error` (the diagnostic code, when it failed) |
|
|
67
|
+
| `verify.result` | `mostra verify` finishes | `status` (`pass` or `fail`), `codes` (up to 50 diagnostic codes, never their messages), `codesTruncated` |
|
|
68
|
+
| `publish.done` | A version is published | `reused`, `forced` |
|
|
69
|
+
| `share.done` | A share starts | `kind`: `tailnet`, `funnel`, `cloudflare` or `remote` |
|
|
70
|
+
| `mcp.session` | An MCP client first uses `mostra mcp`, once per client in each run | `client` (a known agent's ID, or `other`), `clientVersion` (known agents only) |
|
|
71
|
+
|
|
72
|
+
## How it is sent
|
|
73
|
+
|
|
74
|
+
Events wait in a small queue in the config directory and are sent in the background after a
|
|
75
|
+
command finishes (`mostra mcp`, which runs until its client stops it, sends `mcp.session` as it
|
|
76
|
+
happens), at most 100 per request. No command waits for the network, and the network
|
|
77
|
+
never changes a command's result. Events that can't be sent within 7 days are dropped.
|
|
78
|
+
|
|
79
|
+
## Retention and your rights
|
|
80
|
+
|
|
81
|
+
We keep raw events for 12 months, then only aggregated counts. To have your events deleted, send
|
|
82
|
+
your install ID (from `mostra telemetry status`) to the privacy contact in our privacy policy.
|
|
83
|
+
|
|
84
|
+
Changes to this list are announced in the changelog before they ship.
|