@mostra/protocol 0.8.0 → 0.10.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.
Files changed (224) hide show
  1. package/dist/actions.d.ts +30 -4
  2. package/dist/actions.d.ts.map +1 -1
  3. package/dist/actions.js +14 -4
  4. package/dist/actions.js.map +1 -1
  5. package/dist/artifact.d.ts +2 -1
  6. package/dist/artifact.d.ts.map +1 -1
  7. package/dist/artifact.js +2 -1
  8. package/dist/artifact.js.map +1 -1
  9. package/dist/browser.d.ts +5 -0
  10. package/dist/browser.d.ts.map +1 -1
  11. package/dist/browser.js +7 -2
  12. package/dist/browser.js.map +1 -1
  13. package/dist/capability.d.ts +0 -9
  14. package/dist/capability.d.ts.map +1 -1
  15. package/dist/capability.js +1 -17
  16. package/dist/capability.js.map +1 -1
  17. package/dist/diagnostics/codes/artifact.d.ts +1 -1
  18. package/dist/diagnostics/codes/artifact.d.ts.map +1 -1
  19. package/dist/diagnostics/codes/artifact.js +45 -1
  20. package/dist/diagnostics/codes/artifact.js.map +1 -1
  21. package/dist/diagnostics/codes/env.d.ts +1 -1
  22. package/dist/diagnostics/codes/env.d.ts.map +1 -1
  23. package/dist/diagnostics/codes/env.js +12 -1
  24. package/dist/diagnostics/codes/env.js.map +1 -1
  25. package/dist/diagnostics/codes/home.d.ts +1 -1
  26. package/dist/diagnostics/codes/home.d.ts.map +1 -1
  27. package/dist/diagnostics/codes/home.js +12 -1
  28. package/dist/diagnostics/codes/home.js.map +1 -1
  29. package/dist/diagnostics/codes/index.d.ts +3 -2
  30. package/dist/diagnostics/codes/index.d.ts.map +1 -1
  31. package/dist/diagnostics/codes/index.js +3 -1
  32. package/dist/diagnostics/codes/index.js.map +1 -1
  33. package/dist/diagnostics/codes/remote.d.ts +8 -0
  34. package/dist/diagnostics/codes/remote.d.ts.map +1 -0
  35. package/dist/diagnostics/codes/remote.js +99 -0
  36. package/dist/diagnostics/codes/remote.js.map +1 -0
  37. package/dist/diagnostics/codes/submit.js +3 -3
  38. package/dist/diagnostics/codes/submit.js.map +1 -1
  39. package/dist/diagnostics/diagnostic.d.ts +1 -1
  40. package/dist/diagnostics/diagnostic.d.ts.map +1 -1
  41. package/dist/diagnostics/diagnostic.js +2 -1
  42. package/dist/diagnostics/diagnostic.js.map +1 -1
  43. package/dist/duration.d.ts +13 -0
  44. package/dist/duration.d.ts.map +1 -0
  45. package/dist/duration.js +27 -0
  46. package/dist/duration.js.map +1 -0
  47. package/dist/hygiene.d.ts +4 -1
  48. package/dist/hygiene.d.ts.map +1 -1
  49. package/dist/hygiene.js +4 -0
  50. package/dist/hygiene.js.map +1 -1
  51. package/dist/ids.d.ts +17 -1
  52. package/dist/ids.d.ts.map +1 -1
  53. package/dist/ids.js +9 -1
  54. package/dist/ids.js.map +1 -1
  55. package/dist/index.d.ts +30 -8
  56. package/dist/index.js +30 -8
  57. package/dist/interaction.d.ts +28 -2
  58. package/dist/interaction.d.ts.map +1 -1
  59. package/dist/interaction.js +20 -5
  60. package/dist/interaction.js.map +1 -1
  61. package/dist/manifest.d.ts +59 -14
  62. package/dist/manifest.d.ts.map +1 -1
  63. package/dist/manifest.js +63 -15
  64. package/dist/manifest.js.map +1 -1
  65. package/dist/methods/artifact/export.d.ts +40 -0
  66. package/dist/methods/artifact/export.d.ts.map +1 -0
  67. package/dist/methods/artifact/export.js +36 -0
  68. package/dist/methods/artifact/export.js.map +1 -0
  69. package/dist/methods/artifact/import.d.ts +23 -0
  70. package/dist/methods/artifact/import.d.ts.map +1 -0
  71. package/dist/methods/artifact/import.js +25 -0
  72. package/dist/methods/artifact/import.js.map +1 -0
  73. package/dist/methods/artifact/publish.d.ts +2 -1
  74. package/dist/methods/artifact/publish.d.ts.map +1 -1
  75. package/dist/methods/artifact/publish.js +1 -1
  76. package/dist/methods/hosted/push.d.ts +76 -0
  77. package/dist/methods/hosted/push.d.ts.map +1 -0
  78. package/dist/methods/hosted/push.js +71 -0
  79. package/dist/methods/hosted/push.js.map +1 -0
  80. package/dist/methods/hosted/submission.d.ts +18 -0
  81. package/dist/methods/hosted/submission.d.ts.map +1 -0
  82. package/dist/methods/hosted/submission.js +23 -0
  83. package/dist/methods/hosted/submission.js.map +1 -0
  84. package/dist/methods/index.d.ts.map +1 -1
  85. package/dist/methods/index.js +38 -2
  86. package/dist/methods/index.js.map +1 -1
  87. package/dist/methods/instance/status.d.ts +3 -0
  88. package/dist/methods/instance/status.d.ts.map +1 -1
  89. package/dist/methods/instance/status.js +3 -1
  90. package/dist/methods/instance/status.js.map +1 -1
  91. package/dist/methods/mostra/initialize.d.ts +17 -3
  92. package/dist/methods/mostra/initialize.d.ts.map +1 -1
  93. package/dist/methods/mostra/initialize.js +11 -3
  94. package/dist/methods/mostra/initialize.js.map +1 -1
  95. package/dist/methods/port/relay-call.d.ts +33 -0
  96. package/dist/methods/port/relay-call.d.ts.map +1 -0
  97. package/dist/methods/port/relay-call.js +31 -0
  98. package/dist/methods/port/relay-call.js.map +1 -0
  99. package/dist/methods/port/relay-cancel.d.ts +16 -0
  100. package/dist/methods/port/relay-cancel.d.ts.map +1 -0
  101. package/dist/methods/port/relay-cancel.js +21 -0
  102. package/dist/methods/port/relay-cancel.js.map +1 -0
  103. package/dist/methods/port/relay-live.d.ts +25 -0
  104. package/dist/methods/port/relay-live.d.ts.map +1 -0
  105. package/dist/methods/port/relay-live.js +32 -0
  106. package/dist/methods/port/relay-live.js.map +1 -0
  107. package/dist/methods/port/relay-reconcile.d.ts +39 -0
  108. package/dist/methods/port/relay-reconcile.d.ts.map +1 -0
  109. package/dist/methods/port/relay-reconcile.js +35 -0
  110. package/dist/methods/port/relay-reconcile.js.map +1 -0
  111. package/dist/methods/port/relay-run.d.ts +47 -0
  112. package/dist/methods/port/relay-run.d.ts.map +1 -0
  113. package/dist/methods/port/relay-run.js +41 -0
  114. package/dist/methods/port/relay-run.js.map +1 -0
  115. package/dist/methods/port/submissions-deliver.d.ts +8 -0
  116. package/dist/methods/port/submissions-deliver.d.ts.map +1 -1
  117. package/dist/methods/port/submissions-deliver.js +4 -2
  118. package/dist/methods/port/submissions-deliver.js.map +1 -1
  119. package/dist/methods/relay/call-batch.d.ts +26 -0
  120. package/dist/methods/relay/call-batch.d.ts.map +1 -0
  121. package/dist/methods/relay/call-batch.js +30 -0
  122. package/dist/methods/relay/call-batch.js.map +1 -0
  123. package/dist/methods/relay/effect.d.ts +31 -0
  124. package/dist/methods/relay/effect.d.ts.map +1 -0
  125. package/dist/methods/relay/effect.js +30 -0
  126. package/dist/methods/relay/effect.js.map +1 -0
  127. package/dist/methods/relay/live-value.d.ts +33 -0
  128. package/dist/methods/relay/live-value.d.ts.map +1 -0
  129. package/dist/methods/relay/live-value.js +32 -0
  130. package/dist/methods/relay/live-value.js.map +1 -0
  131. package/dist/methods/relay/run-update.d.ts +46 -0
  132. package/dist/methods/relay/run-update.d.ts.map +1 -0
  133. package/dist/methods/relay/run-update.js +45 -0
  134. package/dist/methods/relay/run-update.js.map +1 -0
  135. package/dist/methods/remote/login-wait.d.ts +30 -0
  136. package/dist/methods/remote/login-wait.d.ts.map +1 -0
  137. package/dist/methods/remote/login-wait.js +36 -0
  138. package/dist/methods/remote/login-wait.js.map +1 -0
  139. package/dist/methods/remote/login.d.ts +41 -0
  140. package/dist/methods/remote/login.d.ts.map +1 -0
  141. package/dist/methods/remote/login.js +37 -0
  142. package/dist/methods/remote/login.js.map +1 -0
  143. package/dist/methods/remote/logout.d.ts +25 -0
  144. package/dist/methods/remote/logout.d.ts.map +1 -0
  145. package/dist/methods/remote/logout.js +28 -0
  146. package/dist/methods/remote/logout.js.map +1 -0
  147. package/dist/methods/remote/status.d.ts +14 -0
  148. package/dist/methods/remote/status.d.ts.map +1 -0
  149. package/dist/methods/remote/status.js +22 -0
  150. package/dist/methods/remote/status.js.map +1 -0
  151. package/dist/methods/remote/token.d.ts +19 -0
  152. package/dist/methods/remote/token.d.ts.map +1 -0
  153. package/dist/methods/remote/token.js +24 -0
  154. package/dist/methods/remote/token.js.map +1 -0
  155. package/dist/methods/share/start.d.ts +5 -2
  156. package/dist/methods/share/start.d.ts.map +1 -1
  157. package/dist/methods/share/start.js +6 -3
  158. package/dist/methods/share/start.js.map +1 -1
  159. package/dist/methods/state/patch.d.ts +7 -0
  160. package/dist/methods/state/patch.d.ts.map +1 -1
  161. package/dist/methods/state/patch.js +2 -1
  162. package/dist/methods/state/patch.js.map +1 -1
  163. package/dist/methods/view/url.d.ts +2 -1
  164. package/dist/methods/view/url.d.ts.map +1 -1
  165. package/dist/methods/view/url.js +2 -1
  166. package/dist/methods/view/url.js.map +1 -1
  167. package/dist/policy.d.ts +18 -0
  168. package/dist/policy.d.ts.map +1 -0
  169. package/dist/policy.js +23 -0
  170. package/dist/policy.js.map +1 -0
  171. package/dist/remote.d.ts +55 -0
  172. package/dist/remote.d.ts.map +1 -0
  173. package/dist/remote.js +52 -0
  174. package/dist/remote.js.map +1 -0
  175. package/dist/view.d.ts +1 -1
  176. package/dist/view.js +1 -1
  177. package/dist/view.js.map +1 -1
  178. package/package.json +2 -2
  179. package/schemas/protocol.draft-07.json +1607 -126
  180. package/schemas/protocol.schema.json +1543 -126
  181. package/src/actions.ts +45 -5
  182. package/src/browser.ts +6 -0
  183. package/src/capability.ts +0 -23
  184. package/src/diagnostics/codes/artifact.ts +48 -0
  185. package/src/diagnostics/codes/env.ts +12 -0
  186. package/src/diagnostics/codes/home.ts +12 -0
  187. package/src/diagnostics/codes/index.ts +6 -2
  188. package/src/diagnostics/codes/remote.ts +113 -0
  189. package/src/diagnostics/codes/submit.ts +3 -3
  190. package/src/diagnostics/diagnostic.ts +3 -1
  191. package/src/duration.ts +29 -0
  192. package/src/hygiene.ts +12 -1
  193. package/src/ids.ts +33 -1
  194. package/src/index.ts +124 -8
  195. package/src/interaction.ts +42 -2
  196. package/src/manifest.ts +115 -24
  197. package/src/methods/artifact/export.ts +68 -0
  198. package/src/methods/artifact/import.ts +39 -0
  199. package/src/methods/hosted/push.ts +146 -0
  200. package/src/methods/hosted/submission.ts +34 -0
  201. package/src/methods/index.ts +36 -0
  202. package/src/methods/instance/status.ts +4 -0
  203. package/src/methods/mostra/initialize.ts +19 -3
  204. package/src/methods/port/relay-call.ts +58 -0
  205. package/src/methods/port/relay-cancel.ts +33 -0
  206. package/src/methods/port/relay-live.ts +48 -0
  207. package/src/methods/port/relay-reconcile.ts +71 -0
  208. package/src/methods/port/relay-run.ts +80 -0
  209. package/src/methods/port/submissions-deliver.ts +13 -1
  210. package/src/methods/relay/call-batch.ts +52 -0
  211. package/src/methods/relay/effect.ts +55 -0
  212. package/src/methods/relay/live-value.ts +54 -0
  213. package/src/methods/relay/run-update.ts +81 -0
  214. package/src/methods/remote/login-wait.ts +55 -0
  215. package/src/methods/remote/login.ts +72 -0
  216. package/src/methods/remote/logout.ts +42 -0
  217. package/src/methods/remote/status.ts +34 -0
  218. package/src/methods/remote/token.ts +39 -0
  219. package/src/methods/share/start.ts +12 -4
  220. package/src/methods/state/patch.ts +6 -0
  221. package/src/methods/view/url.ts +2 -1
  222. package/src/policy.ts +30 -0
  223. package/src/remote.ts +89 -0
  224. package/src/view.ts +1 -1
@@ -10,7 +10,11 @@ const artifactDiagnosticCodes = [
10
10
  "MOSTRA_ARTIFACT_DIR_NOT_EMPTY",
11
11
  "MOSTRA_ARTIFACT_TEMPLATE_UNKNOWN",
12
12
  "MOSTRA_ARTIFACT_VERSION_NOT_FOUND",
13
- "MOSTRA_ARTIFACT_VERSION_COLLECTED"
13
+ "MOSTRA_ARTIFACT_VERSION_COLLECTED",
14
+ "MOSTRA_ARTIFACT_PATH_INVALID",
15
+ "MOSTRA_ARTIFACT_PATCH_REJECTED",
16
+ "MOSTRA_ARTIFACT_ID_DROPPED",
17
+ "MOSTRA_ARTIFACT_BUNDLE_INVALID"
14
18
  ];
15
19
  /** The ARTIFACT area's catalog entries. */
16
20
  const artifactDiagnostics = {
@@ -113,6 +117,46 @@ const artifactDiagnostics = {
113
117
  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.",
114
118
  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."
115
119
  }
120
+ },
121
+ MOSTRA_ARTIFACT_PATH_INVALID: {
122
+ severity: "error",
123
+ phase: "host",
124
+ title: "File path outside the artifact",
125
+ hint: "Name the file by a relative path inside the artifact's directory, such as `index.tsx` or `components/chart.tsx`.",
126
+ docs: {
127
+ explanation: "`artifact_write` and `artifact_patch` change an artifact's own files, which live in its directory. A path that is absolute, climbs out with `..`, names the directory itself or passes through a link to somewhere else names no file of the artifact, so nothing is written.",
128
+ fix: "Give each file's path relative to the artifact's directory, with `/` between folders. To write elsewhere, use your own file tools."
129
+ }
130
+ },
131
+ MOSTRA_ARTIFACT_PATCH_REJECTED: {
132
+ severity: "error",
133
+ phase: "host",
134
+ title: "Patch doesn't apply",
135
+ hint: "Read the file again and send edits whose `old` text appears in it exactly once, or a diff made against its current content.",
136
+ docs: {
137
+ explanation: "An `artifact_patch` changes a file only when every edit applies: each `old` text must appear exactly once in the file as it is now, and each hunk of a unified diff must match its lines. When one doesn't, nothing is written, and the message lists each edit or hunk that didn't apply and why (not found, found more than once, the file is missing).",
138
+ fix: "Use a longer `old` text that appears only once, fix the hunk's context lines, or write the whole file with `artifact_write`."
139
+ }
140
+ },
141
+ MOSTRA_ARTIFACT_ID_DROPPED: {
142
+ severity: "warning",
143
+ phase: "host",
144
+ title: "Manifest id removed",
145
+ hint: "Put the `id: \"art_…\"` line back into the entry's `defineArtifact` (or its frontmatter), or the next publish gives the artifact a new ID.",
146
+ docs: {
147
+ explanation: "A write replaced the artifact's entry (`index.tsx`, `index.jsx` or `index.mdx`) with text that no longer names the artifact ID its manifest held. Mostra wrote it as asked. An artifact without an `id` is bound to its source path at its first publish, so a page that was never published gets a new ID there, and one that was published keeps its ID only while its path stays the same: links, waits and results named by the old ID then don't find it.",
148
+ fix: "Add the `id` back, exactly as it was (`id: \"art_01…\"` in `defineArtifact`, or `id:` in the MDX frontmatter), with `artifact_patch` or `artifact_write`."
149
+ }
150
+ },
151
+ MOSTRA_ARTIFACT_BUNDLE_INVALID: {
152
+ severity: "error",
153
+ phase: "host",
154
+ title: "Not a bundle this version can import",
155
+ hint: "Export the bundle again with `mostra export <artifact> --as bundle`, and import the files it wrote unchanged.",
156
+ docs: {
157
+ explanation: "Importing a bundle checks it before it keeps anything: its `mostra-bundle.json`, that its version ID is the one its artifact ID and digests give, and that its builds and source snapshot have the digests it records. This bundle failed one of those checks, so a file was changed, lost or added after it was exported, or it isn't a bundle Mostra wrote.",
158
+ fix: "Export the version again from the home that published it, and copy the bundle's directory or archive whole."
159
+ }
116
160
  }
117
161
  };
118
162
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"artifact.js","names":[],"sources":["../../../src/diagnostics/codes/artifact.ts"],"sourcesContent":["/**\n * Diagnostic codes of the ARTIFACT area.\n */\nimport type { AreaCatalog } from \"../spec.ts\";\n\n/** The codes of the ARTIFACT area, in the order they were added. */\nexport const artifactDiagnosticCodes = [\n \"MOSTRA_ARTIFACT_NOT_FOUND\",\n \"MOSTRA_ARTIFACT_SOURCE_MISSING\",\n \"MOSTRA_ARTIFACT_SOURCE_UNREADABLE\",\n \"MOSTRA_ARTIFACT_NO_ENTRY\",\n \"MOSTRA_ARTIFACT_ENTRY_AMBIGUOUS\",\n \"MOSTRA_ARTIFACT_NO_PAGE\",\n \"MOSTRA_ARTIFACT_DIR_NOT_EMPTY\",\n \"MOSTRA_ARTIFACT_TEMPLATE_UNKNOWN\",\n \"MOSTRA_ARTIFACT_VERSION_NOT_FOUND\",\n \"MOSTRA_ARTIFACT_VERSION_COLLECTED\",\n // gen:codes\n] as const;\n\n/** The codes of the ARTIFACT area. */\nexport type ArtifactDiagnosticCode = (typeof artifactDiagnosticCodes)[number];\n\n/** The ARTIFACT area's catalog entries. */\nexport const artifactDiagnostics: AreaCatalog<ArtifactDiagnosticCode> = {\n MOSTRA_ARTIFACT_NOT_FOUND: {\n severity: \"error\",\n phase: \"host\",\n title: \"Artifact not found\",\n hint: \"Check the artifact ID or source path, or list the home's artifacts with `mostra list`.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_ARTIFACT_SOURCE_MISSING: {\n severity: \"error\",\n phase: \"publish\",\n title: \"Artifact source missing\",\n hint: \"Publish from the artifact's source path, or restore the directory the message names.\",\n docs: {\n explanation:\n \"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.\",\n fix: \"Pass the path where the source lives now. Its manifest `id`, if it has one, keeps the artifact identity at the new path.\",\n },\n },\n MOSTRA_ARTIFACT_SOURCE_UNREADABLE: {\n severity: \"error\",\n phase: \"publish\",\n title: \"Artifact source can't be read\",\n hint: \"Fix the file or directory the message names so your user can read it, then publish again.\",\n docs: {\n explanation:\n \"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.\",\n fix: \"Make the named file readable, rename one of two clashing names, or exclude the file with `.mostraignore` in the artifact's root.\",\n },\n },\n MOSTRA_ARTIFACT_NO_ENTRY: {\n severity: \"error\",\n phase: \"manifest\",\n title: \"No entry file\",\n hint: \"Add `index.tsx` or `index.mdx` to the directory, or publish a single `.tsx` or `.mdx` file.\",\n docs: {\n explanation:\n \"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.\",\n 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.',\n },\n },\n MOSTRA_ARTIFACT_ENTRY_AMBIGUOUS: {\n severity: \"error\",\n phase: \"manifest\",\n title: \"More than one entry file\",\n hint: \"Keep one entry file in the directory and rename or remove the others.\",\n docs: {\n explanation:\n \"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.\",\n fix: \"Keep the entry you mean and rename the others, for example into `components/`.\",\n },\n },\n MOSTRA_ARTIFACT_NO_PAGE: {\n severity: \"error\",\n phase: \"manifest\",\n title: \"Entry has no page\",\n hint: \"Export the page component as the entry's default export, or add a `pages/` folder.\",\n docs: {\n explanation:\n \"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.\",\n fix: \"Add `export default function Page() { ... }` to the entry, or move pages into `pages/index.tsx`, `pages/settings.tsx` and so on.\",\n },\n },\n MOSTRA_ARTIFACT_DIR_NOT_EMPTY: {\n severity: \"error\",\n phase: \"host\",\n title: \"Directory isn't empty\",\n hint: \"Choose a new or empty directory for the artifact.\",\n docs: {\n explanation:\n \"Creating an artifact writes its entry into a directory, and the directory given already has files. Mostra never overwrites them.\",\n 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.\",\n },\n },\n MOSTRA_ARTIFACT_TEMPLATE_UNKNOWN: {\n severity: \"error\",\n phase: \"host\",\n title: \"Unknown template\",\n hint: \"Create the artifact without a template, or use a template this Mostra release provides.\",\n docs: {\n explanation:\n \"The template named isn't one this runtime provides. Without a template, Mostra writes a minimal entry with a generated artifact ID.\",\n fix: \"Leave out the template, or use one of the templates of this release.\",\n },\n },\n MOSTRA_ARTIFACT_VERSION_NOT_FOUND: {\n severity: \"error\",\n phase: \"host\",\n title: \"No such version\",\n hint: \"Name a version the artifact has (`artifact/get` lists them), or leave the version out for the latest.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_ARTIFACT_VERSION_COLLECTED: {\n severity: \"error\",\n phase: \"host\",\n title: \"Version collected\",\n hint: \"Open the artifact's latest version, or publish this version's source again to restore its files.\",\n docs: {\n explanation:\n \"`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.\",\n 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.\",\n },\n },\n // gen:entries\n};\n"],"mappings":";;AAMA,MAAa,0BAA0B;CACrC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAEF;;AAMA,MAAa,sBAA2D;CACtE,2BAA2B;EACzB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,gCAAgC;EAC9B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,mCAAmC;EACjC,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,0BAA0B;EACxB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,iCAAiC;EAC/B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,yBAAyB;EACvB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,+BAA+B;EAC7B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,kCAAkC;EAChC,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,mCAAmC;EACjC,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,mCAAmC;EACjC,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;AAEF"}
1
+ {"version":3,"file":"artifact.js","names":[],"sources":["../../../src/diagnostics/codes/artifact.ts"],"sourcesContent":["/**\n * Diagnostic codes of the ARTIFACT area.\n */\nimport type { AreaCatalog } from \"../spec.ts\";\n\n/** The codes of the ARTIFACT area, in the order they were added. */\nexport const artifactDiagnosticCodes = [\n \"MOSTRA_ARTIFACT_NOT_FOUND\",\n \"MOSTRA_ARTIFACT_SOURCE_MISSING\",\n \"MOSTRA_ARTIFACT_SOURCE_UNREADABLE\",\n \"MOSTRA_ARTIFACT_NO_ENTRY\",\n \"MOSTRA_ARTIFACT_ENTRY_AMBIGUOUS\",\n \"MOSTRA_ARTIFACT_NO_PAGE\",\n \"MOSTRA_ARTIFACT_DIR_NOT_EMPTY\",\n \"MOSTRA_ARTIFACT_TEMPLATE_UNKNOWN\",\n \"MOSTRA_ARTIFACT_VERSION_NOT_FOUND\",\n \"MOSTRA_ARTIFACT_VERSION_COLLECTED\",\n \"MOSTRA_ARTIFACT_PATH_INVALID\",\n \"MOSTRA_ARTIFACT_PATCH_REJECTED\",\n \"MOSTRA_ARTIFACT_ID_DROPPED\",\n \"MOSTRA_ARTIFACT_BUNDLE_INVALID\",\n // gen:codes\n] as const;\n\n/** The codes of the ARTIFACT area. */\nexport type ArtifactDiagnosticCode = (typeof artifactDiagnosticCodes)[number];\n\n/** The ARTIFACT area's catalog entries. */\nexport const artifactDiagnostics: AreaCatalog<ArtifactDiagnosticCode> = {\n MOSTRA_ARTIFACT_NOT_FOUND: {\n severity: \"error\",\n phase: \"host\",\n title: \"Artifact not found\",\n hint: \"Check the artifact ID or source path, or list the home's artifacts with `mostra list`.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_ARTIFACT_SOURCE_MISSING: {\n severity: \"error\",\n phase: \"publish\",\n title: \"Artifact source missing\",\n hint: \"Publish from the artifact's source path, or restore the directory the message names.\",\n docs: {\n explanation:\n \"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.\",\n fix: \"Pass the path where the source lives now. Its manifest `id`, if it has one, keeps the artifact identity at the new path.\",\n },\n },\n MOSTRA_ARTIFACT_SOURCE_UNREADABLE: {\n severity: \"error\",\n phase: \"publish\",\n title: \"Artifact source can't be read\",\n hint: \"Fix the file or directory the message names so your user can read it, then publish again.\",\n docs: {\n explanation:\n \"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.\",\n fix: \"Make the named file readable, rename one of two clashing names, or exclude the file with `.mostraignore` in the artifact's root.\",\n },\n },\n MOSTRA_ARTIFACT_NO_ENTRY: {\n severity: \"error\",\n phase: \"manifest\",\n title: \"No entry file\",\n hint: \"Add `index.tsx` or `index.mdx` to the directory, or publish a single `.tsx` or `.mdx` file.\",\n docs: {\n explanation:\n \"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.\",\n 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.',\n },\n },\n MOSTRA_ARTIFACT_ENTRY_AMBIGUOUS: {\n severity: \"error\",\n phase: \"manifest\",\n title: \"More than one entry file\",\n hint: \"Keep one entry file in the directory and rename or remove the others.\",\n docs: {\n explanation:\n \"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.\",\n fix: \"Keep the entry you mean and rename the others, for example into `components/`.\",\n },\n },\n MOSTRA_ARTIFACT_NO_PAGE: {\n severity: \"error\",\n phase: \"manifest\",\n title: \"Entry has no page\",\n hint: \"Export the page component as the entry's default export, or add a `pages/` folder.\",\n docs: {\n explanation:\n \"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.\",\n fix: \"Add `export default function Page() { ... }` to the entry, or move pages into `pages/index.tsx`, `pages/settings.tsx` and so on.\",\n },\n },\n MOSTRA_ARTIFACT_DIR_NOT_EMPTY: {\n severity: \"error\",\n phase: \"host\",\n title: \"Directory isn't empty\",\n hint: \"Choose a new or empty directory for the artifact.\",\n docs: {\n explanation:\n \"Creating an artifact writes its entry into a directory, and the directory given already has files. Mostra never overwrites them.\",\n 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.\",\n },\n },\n MOSTRA_ARTIFACT_TEMPLATE_UNKNOWN: {\n severity: \"error\",\n phase: \"host\",\n title: \"Unknown template\",\n hint: \"Create the artifact without a template, or use a template this Mostra release provides.\",\n docs: {\n explanation:\n \"The template named isn't one this runtime provides. Without a template, Mostra writes a minimal entry with a generated artifact ID.\",\n fix: \"Leave out the template, or use one of the templates of this release.\",\n },\n },\n MOSTRA_ARTIFACT_VERSION_NOT_FOUND: {\n severity: \"error\",\n phase: \"host\",\n title: \"No such version\",\n hint: \"Name a version the artifact has (`artifact/get` lists them), or leave the version out for the latest.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_ARTIFACT_VERSION_COLLECTED: {\n severity: \"error\",\n phase: \"host\",\n title: \"Version collected\",\n hint: \"Open the artifact's latest version, or publish this version's source again to restore its files.\",\n docs: {\n explanation:\n \"`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.\",\n 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.\",\n },\n },\n MOSTRA_ARTIFACT_PATH_INVALID: {\n severity: \"error\",\n phase: \"host\",\n title: \"File path outside the artifact\",\n hint: \"Name the file by a relative path inside the artifact's directory, such as `index.tsx` or `components/chart.tsx`.\",\n docs: {\n explanation:\n \"`artifact_write` and `artifact_patch` change an artifact's own files, which live in its directory. A path that is absolute, climbs out with `..`, names the directory itself or passes through a link to somewhere else names no file of the artifact, so nothing is written.\",\n fix: \"Give each file's path relative to the artifact's directory, with `/` between folders. To write elsewhere, use your own file tools.\",\n },\n },\n MOSTRA_ARTIFACT_PATCH_REJECTED: {\n severity: \"error\",\n phase: \"host\",\n title: \"Patch doesn't apply\",\n hint: \"Read the file again and send edits whose `old` text appears in it exactly once, or a diff made against its current content.\",\n docs: {\n explanation:\n \"An `artifact_patch` changes a file only when every edit applies: each `old` text must appear exactly once in the file as it is now, and each hunk of a unified diff must match its lines. When one doesn't, nothing is written, and the message lists each edit or hunk that didn't apply and why (not found, found more than once, the file is missing).\",\n fix: \"Use a longer `old` text that appears only once, fix the hunk's context lines, or write the whole file with `artifact_write`.\",\n },\n },\n MOSTRA_ARTIFACT_ID_DROPPED: {\n severity: \"warning\",\n phase: \"host\",\n title: \"Manifest id removed\",\n hint: 'Put the `id: \"art_…\"` line back into the entry\\'s `defineArtifact` (or its frontmatter), or the next publish gives the artifact a new ID.',\n docs: {\n explanation:\n \"A write replaced the artifact's entry (`index.tsx`, `index.jsx` or `index.mdx`) with text that no longer names the artifact ID its manifest held. Mostra wrote it as asked. An artifact without an `id` is bound to its source path at its first publish, so a page that was never published gets a new ID there, and one that was published keeps its ID only while its path stays the same: links, waits and results named by the old ID then don't find it.\",\n fix: 'Add the `id` back, exactly as it was (`id: \"art_01…\"` in `defineArtifact`, or `id:` in the MDX frontmatter), with `artifact_patch` or `artifact_write`.',\n },\n },\n MOSTRA_ARTIFACT_BUNDLE_INVALID: {\n severity: \"error\",\n phase: \"host\",\n title: \"Not a bundle this version can import\",\n hint: \"Export the bundle again with `mostra export <artifact> --as bundle`, and import the files it wrote unchanged.\",\n docs: {\n explanation:\n \"Importing a bundle checks it before it keeps anything: its `mostra-bundle.json`, that its version ID is the one its artifact ID and digests give, and that its builds and source snapshot have the digests it records. This bundle failed one of those checks, so a file was changed, lost or added after it was exported, or it isn't a bundle Mostra wrote.\",\n fix: \"Export the version again from the home that published it, and copy the bundle's directory or archive whole.\",\n },\n },\n // gen:entries\n};\n"],"mappings":";;AAMA,MAAa,0BAA0B;CACrC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAEF;;AAMA,MAAa,sBAA2D;CACtE,2BAA2B;EACzB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,gCAAgC;EAC9B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,mCAAmC;EACjC,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,0BAA0B;EACxB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,iCAAiC;EAC/B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,yBAAyB;EACvB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,+BAA+B;EAC7B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,kCAAkC;EAChC,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,mCAAmC;EACjC,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,mCAAmC;EACjC,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,8BAA8B;EAC5B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,gCAAgC;EAC9B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,4BAA4B;EAC1B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,gCAAgC;EAC9B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;AAEF"}
@@ -1,7 +1,7 @@
1
1
  import "../spec.js";
2
2
  //#region src/diagnostics/codes/env.d.ts
3
3
  /** The codes of the ENV area, in the order they were added. */
4
- export declare const envDiagnosticCodes: readonly ["MOSTRA_ENV_WARM_MISSING", "MOSTRA_ENV_PORT_TAKEN", "MOSTRA_ENV_BIND_FAILED", "MOSTRA_ENV_SHELL_MISSING", "MOSTRA_ENV_SERVICE_FAILED", "MOSTRA_ENV_BROWSER_MISSING", "MOSTRA_ENV_RUNTIME_MISSING", "MOSTRA_ENV_BUNDLE_INVALID", "MOSTRA_ENV_BUNDLE_DOWNLOAD_FAILED", "MOSTRA_ENV_BUNDLE_UNAVAILABLE", "MOSTRA_ENV_NODE_UNSUPPORTED", "MOSTRA_ENV_HELPER_MISSING"];
4
+ export declare const envDiagnosticCodes: readonly ["MOSTRA_ENV_WARM_MISSING", "MOSTRA_ENV_PORT_TAKEN", "MOSTRA_ENV_BIND_FAILED", "MOSTRA_ENV_SHELL_MISSING", "MOSTRA_ENV_SERVICE_FAILED", "MOSTRA_ENV_BROWSER_MISSING", "MOSTRA_ENV_RUNTIME_MISSING", "MOSTRA_ENV_BUNDLE_INVALID", "MOSTRA_ENV_BUNDLE_DOWNLOAD_FAILED", "MOSTRA_ENV_BUNDLE_UNAVAILABLE", "MOSTRA_ENV_NODE_UNSUPPORTED", "MOSTRA_ENV_HELPER_MISSING", "MOSTRA_ENV_RUNTIME_INSTALLING"];
5
5
  /** The codes of the ENV area. */
6
6
  export type EnvDiagnosticCode = (typeof envDiagnosticCodes)[number];
7
7
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","names":[],"sources":["../../../src/diagnostics/codes/env.ts"],"mappings":";;;qBAMa;;YAiBD,4BAA4B"}
1
+ {"version":3,"file":"env.d.ts","names":[],"sources":["../../../src/diagnostics/codes/env.ts"],"mappings":";;;qBAMa;;YAkBD,4BAA4B"}
@@ -12,7 +12,8 @@ const envDiagnosticCodes = [
12
12
  "MOSTRA_ENV_BUNDLE_DOWNLOAD_FAILED",
13
13
  "MOSTRA_ENV_BUNDLE_UNAVAILABLE",
14
14
  "MOSTRA_ENV_NODE_UNSUPPORTED",
15
- "MOSTRA_ENV_HELPER_MISSING"
15
+ "MOSTRA_ENV_HELPER_MISSING",
16
+ "MOSTRA_ENV_RUNTIME_INSTALLING"
16
17
  ];
17
18
  /** The ENV area's catalog entries. */
18
19
  const envDiagnostics = {
@@ -135,6 +136,16 @@ const envDiagnostics = {
135
136
  explanation: "On Windows the runtime runs `mostra-win.exe`, a helper that ships with it, for what Node.js can't do there: owner-only access to the home, the home's control pipe, and every child process in a Job Object. The runtime looked for it at `MOSTRA_WIN_HELPER`, in its runtime bundle, and in a development checkout's Cargo build, and found none, so it stopped before touching the home.",
136
137
  fix: "Reinstall Mostra so the runtime bundle is complete. In a development checkout, build the helper with `cargo build -p mostra-win`. A custom layout can point the runtime at the helper with `MOSTRA_WIN_HELPER`."
137
138
  }
139
+ },
140
+ MOSTRA_ENV_RUNTIME_INSTALLING: {
141
+ severity: "error",
142
+ phase: "host",
143
+ title: "Runtime still installing",
144
+ hint: "Call the tool again in a minute: Mostra keeps installing its runtime meanwhile.",
145
+ docs: {
146
+ explanation: "`mostra mcp` installed from npm answers its client at once and installs its release's runtime bundle in the background on its first start (about 200 MB, D164 item 7), so a client's startup timeout never waits for the download. A tool that needs the instance waits for that install, up to 45 seconds per call; this call's time ran out first. The install goes on, and the message says how far it is. Tools that need no instance (`docs_search`, `artifact_write`, `artifact_patch`) work during it.",
147
+ fix: "Call the tool again once the install has had time to finish. When it fails instead, the next call says why (`MOSTRA_ENV_BUNDLE_DOWNLOAD_FAILED`, `MOSTRA_ENV_BUNDLE_UNAVAILABLE` offline) and starts it again."
148
+ }
138
149
  }
139
150
  };
140
151
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"env.js","names":[],"sources":["../../../src/diagnostics/codes/env.ts"],"sourcesContent":["/**\n * Diagnostic codes of the ENV area.\n */\nimport type { AreaCatalog } from \"../spec.ts\";\n\n/** The codes of the ENV area, in the order they were added. */\nexport const envDiagnosticCodes = [\n \"MOSTRA_ENV_WARM_MISSING\",\n \"MOSTRA_ENV_PORT_TAKEN\",\n \"MOSTRA_ENV_BIND_FAILED\",\n \"MOSTRA_ENV_SHELL_MISSING\",\n \"MOSTRA_ENV_SERVICE_FAILED\",\n \"MOSTRA_ENV_BROWSER_MISSING\",\n \"MOSTRA_ENV_RUNTIME_MISSING\",\n \"MOSTRA_ENV_BUNDLE_INVALID\",\n \"MOSTRA_ENV_BUNDLE_DOWNLOAD_FAILED\",\n \"MOSTRA_ENV_BUNDLE_UNAVAILABLE\",\n \"MOSTRA_ENV_NODE_UNSUPPORTED\",\n \"MOSTRA_ENV_HELPER_MISSING\",\n // gen:codes\n] as const;\n\n/** The codes of the ENV area. */\nexport type EnvDiagnosticCode = (typeof envDiagnosticCodes)[number];\n\n/** The ENV area's catalog entries. */\nexport const envDiagnostics: AreaCatalog<EnvDiagnosticCode> = {\n MOSTRA_ENV_WARM_MISSING: {\n severity: \"error\",\n phase: \"host\",\n title: \"Warm package set missing\",\n hint: \"Reinstall the Mostra runtime, or set `MOSTRA_WARM_DIR` to its warm package set.\",\n docs: {\n explanation:\n \"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.\",\n 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`.\",\n },\n },\n MOSTRA_ENV_PORT_TAKEN: {\n severity: \"warning\",\n phase: \"host\",\n title: \"Leased port taken\",\n hint: \"Open the artifact through a new link: `view/url` or `mostra open` mints one on the new port.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_ENV_BIND_FAILED: {\n severity: \"error\",\n phase: \"host\",\n title: \"Gateway can't bind\",\n hint: \"Start Mostra with an address this machine has, or without `--bind` to use the loopback address.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_ENV_SHELL_MISSING: {\n severity: \"error\",\n phase: \"host\",\n title: \"Shell app missing\",\n hint: \"Reinstall the Mostra runtime, or set `MOSTRA_SHELL_DIR` to its built shell.\",\n docs: {\n explanation:\n \"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.\",\n 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`.\",\n },\n },\n MOSTRA_ENV_SERVICE_FAILED: {\n severity: \"error\",\n phase: \"host\",\n title: \"Login service could not be installed\",\n hint: \"Read the message, fix what it names, and run the install again.\",\n docs: {\n explanation:\n \"`mostra daemon install` couldn't register the home's daemon as a login service: writing the launchd agent, systemd user unit or Task Scheduler task failed, or `launchctl`, `systemctl --user` or `schtasks` refused it.\",\n fix: \"Check the named file's directory permissions; on Linux, that a systemd user session is running (`systemctl --user status`); on Windows, that Task Scheduler runs and your account may create tasks (`schtasks /Query`). On a machine without one, start the daemon from your own login scripts with `mostra daemon start`.\",\n },\n },\n MOSTRA_ENV_BROWSER_MISSING: {\n severity: \"error\",\n phase: \"host\",\n title: \"Browser for verify missing\",\n hint: \"Run the runtime bundle's `bin/mostra-setup` (with network access) to fetch the browser verify uses, then verify again.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_ENV_RUNTIME_MISSING: {\n severity: \"error\",\n phase: \"host\",\n title: \"Runtime not found\",\n hint: \"Reinstall Mostra, or set `MOSTRA_RUNTIME_BIN` to the runtime's `mostra-runtime` entry.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_ENV_BUNDLE_INVALID: {\n severity: \"error\",\n phase: \"platform\",\n title: \"Runtime bundle failed verification\",\n hint: \"Nothing was installed; install Mostra again, and if it fails the same way, report it with the message.\",\n docs: {\n explanation:\n \"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.\",\n 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`.\",\n },\n },\n MOSTRA_ENV_BUNDLE_DOWNLOAD_FAILED: {\n severity: \"error\",\n phase: \"platform\",\n title: \"Runtime bundle download failed\",\n hint: \"Check the network or proxy (`HTTPS_PROXY`), then run the command again: a retry starts the download over.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_ENV_BUNDLE_UNAVAILABLE: {\n severity: \"error\",\n phase: \"platform\",\n title: \"No runtime bundle available\",\n hint: \"Run this once with network access, or point `MOSTRA_BUNDLE` at an extracted bundle.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_ENV_NODE_UNSUPPORTED: {\n severity: \"error\",\n phase: \"platform\",\n title: \"Node.js too old to start Mostra\",\n hint: \"Run `mostra` with Node.js 22.19 or later, or run the runtime bundle's own `bin/mostra`, which needs no Node.js.\",\n docs: {\n explanation:\n \"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.\",\n 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`.\",\n },\n },\n MOSTRA_ENV_HELPER_MISSING: {\n severity: \"error\",\n phase: \"platform\",\n title: \"Windows helper missing\",\n hint: \"Reinstall Mostra, or set `MOSTRA_WIN_HELPER` to its `mostra-win.exe`.\",\n docs: {\n explanation:\n \"On Windows the runtime runs `mostra-win.exe`, a helper that ships with it, for what Node.js can't do there: owner-only access to the home, the home's control pipe, and every child process in a Job Object. The runtime looked for it at `MOSTRA_WIN_HELPER`, in its runtime bundle, and in a development checkout's Cargo build, and found none, so it stopped before touching the home.\",\n fix: \"Reinstall Mostra so the runtime bundle is complete. In a development checkout, build the helper with `cargo build -p mostra-win`. A custom layout can point the runtime at the helper with `MOSTRA_WIN_HELPER`.\",\n },\n },\n // gen:entries\n};\n"],"mappings":";;AAMA,MAAa,qBAAqB;CAChC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAEF;;AAMA,MAAa,iBAAiD;CAC5D,yBAAyB;EACvB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,uBAAuB;EACrB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,wBAAwB;EACtB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,0BAA0B;EACxB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,2BAA2B;EACzB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,4BAA4B;EAC1B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,4BAA4B;EAC1B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,2BAA2B;EACzB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,mCAAmC;EACjC,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,+BAA+B;EAC7B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,6BAA6B;EAC3B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,2BAA2B;EACzB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;AAEF"}
1
+ {"version":3,"file":"env.js","names":[],"sources":["../../../src/diagnostics/codes/env.ts"],"sourcesContent":["/**\n * Diagnostic codes of the ENV area.\n */\nimport type { AreaCatalog } from \"../spec.ts\";\n\n/** The codes of the ENV area, in the order they were added. */\nexport const envDiagnosticCodes = [\n \"MOSTRA_ENV_WARM_MISSING\",\n \"MOSTRA_ENV_PORT_TAKEN\",\n \"MOSTRA_ENV_BIND_FAILED\",\n \"MOSTRA_ENV_SHELL_MISSING\",\n \"MOSTRA_ENV_SERVICE_FAILED\",\n \"MOSTRA_ENV_BROWSER_MISSING\",\n \"MOSTRA_ENV_RUNTIME_MISSING\",\n \"MOSTRA_ENV_BUNDLE_INVALID\",\n \"MOSTRA_ENV_BUNDLE_DOWNLOAD_FAILED\",\n \"MOSTRA_ENV_BUNDLE_UNAVAILABLE\",\n \"MOSTRA_ENV_NODE_UNSUPPORTED\",\n \"MOSTRA_ENV_HELPER_MISSING\",\n \"MOSTRA_ENV_RUNTIME_INSTALLING\",\n // gen:codes\n] as const;\n\n/** The codes of the ENV area. */\nexport type EnvDiagnosticCode = (typeof envDiagnosticCodes)[number];\n\n/** The ENV area's catalog entries. */\nexport const envDiagnostics: AreaCatalog<EnvDiagnosticCode> = {\n MOSTRA_ENV_WARM_MISSING: {\n severity: \"error\",\n phase: \"host\",\n title: \"Warm package set missing\",\n hint: \"Reinstall the Mostra runtime, or set `MOSTRA_WARM_DIR` to its warm package set.\",\n docs: {\n explanation:\n \"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.\",\n 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`.\",\n },\n },\n MOSTRA_ENV_PORT_TAKEN: {\n severity: \"warning\",\n phase: \"host\",\n title: \"Leased port taken\",\n hint: \"Open the artifact through a new link: `view/url` or `mostra open` mints one on the new port.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_ENV_BIND_FAILED: {\n severity: \"error\",\n phase: \"host\",\n title: \"Gateway can't bind\",\n hint: \"Start Mostra with an address this machine has, or without `--bind` to use the loopback address.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_ENV_SHELL_MISSING: {\n severity: \"error\",\n phase: \"host\",\n title: \"Shell app missing\",\n hint: \"Reinstall the Mostra runtime, or set `MOSTRA_SHELL_DIR` to its built shell.\",\n docs: {\n explanation:\n \"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.\",\n 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`.\",\n },\n },\n MOSTRA_ENV_SERVICE_FAILED: {\n severity: \"error\",\n phase: \"host\",\n title: \"Login service could not be installed\",\n hint: \"Read the message, fix what it names, and run the install again.\",\n docs: {\n explanation:\n \"`mostra daemon install` couldn't register the home's daemon as a login service: writing the launchd agent, systemd user unit or Task Scheduler task failed, or `launchctl`, `systemctl --user` or `schtasks` refused it.\",\n fix: \"Check the named file's directory permissions; on Linux, that a systemd user session is running (`systemctl --user status`); on Windows, that Task Scheduler runs and your account may create tasks (`schtasks /Query`). On a machine without one, start the daemon from your own login scripts with `mostra daemon start`.\",\n },\n },\n MOSTRA_ENV_BROWSER_MISSING: {\n severity: \"error\",\n phase: \"host\",\n title: \"Browser for verify missing\",\n hint: \"Run the runtime bundle's `bin/mostra-setup` (with network access) to fetch the browser verify uses, then verify again.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_ENV_RUNTIME_MISSING: {\n severity: \"error\",\n phase: \"host\",\n title: \"Runtime not found\",\n hint: \"Reinstall Mostra, or set `MOSTRA_RUNTIME_BIN` to the runtime's `mostra-runtime` entry.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_ENV_BUNDLE_INVALID: {\n severity: \"error\",\n phase: \"platform\",\n title: \"Runtime bundle failed verification\",\n hint: \"Nothing was installed; install Mostra again, and if it fails the same way, report it with the message.\",\n docs: {\n explanation:\n \"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.\",\n 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`.\",\n },\n },\n MOSTRA_ENV_BUNDLE_DOWNLOAD_FAILED: {\n severity: \"error\",\n phase: \"platform\",\n title: \"Runtime bundle download failed\",\n hint: \"Check the network or proxy (`HTTPS_PROXY`), then run the command again: a retry starts the download over.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_ENV_BUNDLE_UNAVAILABLE: {\n severity: \"error\",\n phase: \"platform\",\n title: \"No runtime bundle available\",\n hint: \"Run this once with network access, or point `MOSTRA_BUNDLE` at an extracted bundle.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_ENV_NODE_UNSUPPORTED: {\n severity: \"error\",\n phase: \"platform\",\n title: \"Node.js too old to start Mostra\",\n hint: \"Run `mostra` with Node.js 22.19 or later, or run the runtime bundle's own `bin/mostra`, which needs no Node.js.\",\n docs: {\n explanation:\n \"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.\",\n 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`.\",\n },\n },\n MOSTRA_ENV_HELPER_MISSING: {\n severity: \"error\",\n phase: \"platform\",\n title: \"Windows helper missing\",\n hint: \"Reinstall Mostra, or set `MOSTRA_WIN_HELPER` to its `mostra-win.exe`.\",\n docs: {\n explanation:\n \"On Windows the runtime runs `mostra-win.exe`, a helper that ships with it, for what Node.js can't do there: owner-only access to the home, the home's control pipe, and every child process in a Job Object. The runtime looked for it at `MOSTRA_WIN_HELPER`, in its runtime bundle, and in a development checkout's Cargo build, and found none, so it stopped before touching the home.\",\n fix: \"Reinstall Mostra so the runtime bundle is complete. In a development checkout, build the helper with `cargo build -p mostra-win`. A custom layout can point the runtime at the helper with `MOSTRA_WIN_HELPER`.\",\n },\n },\n MOSTRA_ENV_RUNTIME_INSTALLING: {\n severity: \"error\",\n phase: \"host\",\n title: \"Runtime still installing\",\n hint: \"Call the tool again in a minute: Mostra keeps installing its runtime meanwhile.\",\n docs: {\n explanation:\n \"`mostra mcp` installed from npm answers its client at once and installs its release's runtime bundle in the background on its first start (about 200 MB, D164 item 7), so a client's startup timeout never waits for the download. A tool that needs the instance waits for that install, up to 45 seconds per call; this call's time ran out first. The install goes on, and the message says how far it is. Tools that need no instance (`docs_search`, `artifact_write`, `artifact_patch`) work during it.\",\n fix: \"Call the tool again once the install has had time to finish. When it fails instead, the next call says why (`MOSTRA_ENV_BUNDLE_DOWNLOAD_FAILED`, `MOSTRA_ENV_BUNDLE_UNAVAILABLE` offline) and starts it again.\",\n },\n },\n // gen:entries\n};\n"],"mappings":";;AAMA,MAAa,qBAAqB;CAChC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAEF;;AAMA,MAAa,iBAAiD;CAC5D,yBAAyB;EACvB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,uBAAuB;EACrB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,wBAAwB;EACtB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,0BAA0B;EACxB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,2BAA2B;EACzB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,4BAA4B;EAC1B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,4BAA4B;EAC1B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,2BAA2B;EACzB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,mCAAmC;EACjC,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,+BAA+B;EAC7B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,6BAA6B;EAC3B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,2BAA2B;EACzB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,+BAA+B;EAC7B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;AAEF"}
@@ -1,7 +1,7 @@
1
1
  import "../spec.js";
2
2
  //#region src/diagnostics/codes/home.d.ts
3
3
  /** The codes of the HOME area, in the order they were added. */
4
- export declare const homeDiagnosticCodes: readonly ["MOSTRA_HOME_LOCKED", "MOSTRA_HOME_NOT_OWNED", "MOSTRA_HOME_SOCKET_TOO_LONG", "MOSTRA_HOME_TOO_NEW", "MOSTRA_HOME_LEDGER_UNREADABLE", "MOSTRA_HOME_DISK_FULL", "MOSTRA_HOME_GONE", "MOSTRA_HOME_MISMATCH", "MOSTRA_HOME_INTEGRITY", "MOSTRA_HOME_NOT_ALWAYS_ON", "MOSTRA_HOME_GC_INCOMPLETE"];
4
+ export declare const homeDiagnosticCodes: readonly ["MOSTRA_HOME_LOCKED", "MOSTRA_HOME_NOT_OWNED", "MOSTRA_HOME_SOCKET_TOO_LONG", "MOSTRA_HOME_TOO_NEW", "MOSTRA_HOME_LEDGER_UNREADABLE", "MOSTRA_HOME_DISK_FULL", "MOSTRA_HOME_GONE", "MOSTRA_HOME_MISMATCH", "MOSTRA_HOME_INTEGRITY", "MOSTRA_HOME_NOT_ALWAYS_ON", "MOSTRA_HOME_GC_INCOMPLETE", "MOSTRA_HOME_NETWORK_FILESYSTEM"];
5
5
  /** The codes of the HOME area. */
6
6
  export type HomeDiagnosticCode = (typeof homeDiagnosticCodes)[number];
7
7
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"home.d.ts","names":[],"sources":["../../../src/diagnostics/codes/home.ts"],"mappings":";;;qBAOa;;YAgBD,6BAA6B"}
1
+ {"version":3,"file":"home.d.ts","names":[],"sources":["../../../src/diagnostics/codes/home.ts"],"mappings":";;;qBAOa;;YAiBD,6BAA6B"}
@@ -11,7 +11,8 @@ const homeDiagnosticCodes = [
11
11
  "MOSTRA_HOME_MISMATCH",
12
12
  "MOSTRA_HOME_INTEGRITY",
13
13
  "MOSTRA_HOME_NOT_ALWAYS_ON",
14
- "MOSTRA_HOME_GC_INCOMPLETE"
14
+ "MOSTRA_HOME_GC_INCOMPLETE",
15
+ "MOSTRA_HOME_NETWORK_FILESYSTEM"
15
16
  ];
16
17
  /** The HOME area's catalog entries. */
17
18
  const homeDiagnostics = {
@@ -124,6 +125,16 @@ const homeDiagnostics = {
124
125
  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.",
125
126
  fix: "Run `mostra gc` again; a failure that repeats names its cause in the message (for example, a file the user can't remove)."
126
127
  }
128
+ },
129
+ MOSTRA_HOME_NETWORK_FILESYSTEM: {
130
+ severity: "error",
131
+ phase: "host",
132
+ title: "Data directory on a network filesystem",
133
+ hint: "Put the server's data directory on a local disk.",
134
+ docs: {
135
+ explanation: "A remote server's data directory holds its hosted homes' ledgers and locks, which need a local disk: on a network filesystem a lock can seem held by two machines at once, and SQLite's WAL can't share memory across them (D165 item 0b). The server refuses a data directory it detects on NFS, SMB, AFP, WebDAV or a FUSE mount, before it opens anything.",
136
+ fix: "Pass `--data` a directory on a local disk. To keep a copy elsewhere, replicate the homes with a backup tool instead."
137
+ }
127
138
  }
128
139
  };
129
140
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"home.js","names":[],"sources":["../../../src/diagnostics/codes/home.ts"],"sourcesContent":["/**\n * Diagnostic codes of the HOME area: the Mostra home, its ledger and the instance that owns it\n * (DATA_MODEL §1, §6; FAILURE_MODEL §2, §3).\n */\nimport type { AreaCatalog } from \"../spec.ts\";\n\n/** The codes of the HOME area, in the order they were added. */\nexport const homeDiagnosticCodes = [\n \"MOSTRA_HOME_LOCKED\",\n \"MOSTRA_HOME_NOT_OWNED\",\n \"MOSTRA_HOME_SOCKET_TOO_LONG\",\n \"MOSTRA_HOME_TOO_NEW\",\n \"MOSTRA_HOME_LEDGER_UNREADABLE\",\n \"MOSTRA_HOME_DISK_FULL\",\n \"MOSTRA_HOME_GONE\",\n \"MOSTRA_HOME_MISMATCH\",\n \"MOSTRA_HOME_INTEGRITY\",\n \"MOSTRA_HOME_NOT_ALWAYS_ON\",\n \"MOSTRA_HOME_GC_INCOMPLETE\",\n // gen:codes\n] as const;\n\n/** The codes of the HOME area. */\nexport type HomeDiagnosticCode = (typeof homeDiagnosticCodes)[number];\n\n/** The HOME area's catalog entries. */\nexport const homeDiagnostics: AreaCatalog<HomeDiagnosticCode> = {\n MOSTRA_HOME_LOCKED: {\n severity: \"error\",\n phase: \"host\",\n title: \"Home in use by another instance\",\n 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.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_HOME_NOT_OWNED: {\n severity: \"error\",\n phase: \"host\",\n title: \"Directory not owned by you\",\n 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`.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_HOME_SOCKET_TOO_LONG: {\n severity: \"error\",\n phase: \"host\",\n title: \"Control socket path too long\",\n hint: \"Set `MOSTRA_RUNTIME_DIR` to a short directory you own, for example `/tmp/mostra-$USER`, and start again.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_HOME_TOO_NEW: {\n severity: \"error\",\n phase: \"host\",\n title: \"Home written by a newer Mostra\",\n hint: \"Run a Mostra release at least as new as the one named in the message, or use another home with `--home`.\",\n docs: {\n explanation:\n \"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.\",\n 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`.\",\n },\n },\n MOSTRA_HOME_LEDGER_UNREADABLE: {\n severity: \"error\",\n phase: \"host\",\n title: \"Ledger can't be read\",\n hint: \"Restore the ledger from the latest `ledger.sqlite.bak-*` backup in the home's `store/` directory, or move the damaged file aside.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_HOME_DISK_FULL: {\n severity: \"error\",\n phase: \"host\",\n title: \"Disk full\",\n hint: \"Free space on the disk that holds the Mostra home, then retry.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_HOME_GONE: {\n severity: \"error\",\n phase: \"host\",\n title: \"Home directory removed\",\n hint: \"Restore or recreate the home directory, then start Mostra again.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_HOME_MISMATCH: {\n severity: \"error\",\n phase: \"host\",\n title: \"Instance serves a different home\",\n hint: \"Connect to the instance for the home you expect, or start it with `--home` set to that home.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_HOME_INTEGRITY: {\n severity: \"error\",\n phase: \"host\",\n title: \"Stored version or file damaged\",\n hint: \"Publish the version's source again to rebuild a damaged version in place, and run `mostra doctor` for other damaged objects.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_HOME_NOT_ALWAYS_ON: {\n severity: \"warning\",\n phase: \"host\",\n title: \"Long-lived artifacts without an always-on daemon\",\n hint: \"Run `mostra daemon install` so the home's daemon runs as a login service and these artifacts answer at any hour.\",\n docs: {\n explanation:\n \"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.\",\n fix: \"Run `mostra daemon install`. It registers a login service (a launchd agent, a systemd user service or a Task Scheduler task) that keeps the home's daemon running; `mostra daemon uninstall` removes it.\",\n },\n },\n MOSTRA_HOME_GC_INCOMPLETE: {\n severity: \"warning\",\n phase: \"host\",\n title: \"gc didn't finish a step\",\n hint: \"Run `mostra gc` again: what this run removed is in its result, and the next run picks up what it left.\",\n docs: {\n explanation:\n \"`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.\",\n fix: \"Run `mostra gc` again; a failure that repeats names its cause in the message (for example, a file the user can't remove).\",\n },\n },\n // gen:entries\n};\n"],"mappings":";;AAOA,MAAa,sBAAsB;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAEF;;AAMA,MAAa,kBAAmD;CAC9D,oBAAoB;EAClB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,uBAAuB;EACrB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,6BAA6B;EAC3B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,qBAAqB;EACnB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,+BAA+B;EAC7B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,uBAAuB;EACrB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,kBAAkB;EAChB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,sBAAsB;EACpB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,uBAAuB;EACrB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,2BAA2B;EACzB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,2BAA2B;EACzB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;AAEF"}
1
+ {"version":3,"file":"home.js","names":[],"sources":["../../../src/diagnostics/codes/home.ts"],"sourcesContent":["/**\n * Diagnostic codes of the HOME area: the Mostra home, its ledger and the instance that owns it\n * (DATA_MODEL §1, §6; FAILURE_MODEL §2, §3).\n */\nimport type { AreaCatalog } from \"../spec.ts\";\n\n/** The codes of the HOME area, in the order they were added. */\nexport const homeDiagnosticCodes = [\n \"MOSTRA_HOME_LOCKED\",\n \"MOSTRA_HOME_NOT_OWNED\",\n \"MOSTRA_HOME_SOCKET_TOO_LONG\",\n \"MOSTRA_HOME_TOO_NEW\",\n \"MOSTRA_HOME_LEDGER_UNREADABLE\",\n \"MOSTRA_HOME_DISK_FULL\",\n \"MOSTRA_HOME_GONE\",\n \"MOSTRA_HOME_MISMATCH\",\n \"MOSTRA_HOME_INTEGRITY\",\n \"MOSTRA_HOME_NOT_ALWAYS_ON\",\n \"MOSTRA_HOME_GC_INCOMPLETE\",\n \"MOSTRA_HOME_NETWORK_FILESYSTEM\",\n // gen:codes\n] as const;\n\n/** The codes of the HOME area. */\nexport type HomeDiagnosticCode = (typeof homeDiagnosticCodes)[number];\n\n/** The HOME area's catalog entries. */\nexport const homeDiagnostics: AreaCatalog<HomeDiagnosticCode> = {\n MOSTRA_HOME_LOCKED: {\n severity: \"error\",\n phase: \"host\",\n title: \"Home in use by another instance\",\n 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.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_HOME_NOT_OWNED: {\n severity: \"error\",\n phase: \"host\",\n title: \"Directory not owned by you\",\n 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`.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_HOME_SOCKET_TOO_LONG: {\n severity: \"error\",\n phase: \"host\",\n title: \"Control socket path too long\",\n hint: \"Set `MOSTRA_RUNTIME_DIR` to a short directory you own, for example `/tmp/mostra-$USER`, and start again.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_HOME_TOO_NEW: {\n severity: \"error\",\n phase: \"host\",\n title: \"Home written by a newer Mostra\",\n hint: \"Run a Mostra release at least as new as the one named in the message, or use another home with `--home`.\",\n docs: {\n explanation:\n \"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.\",\n 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`.\",\n },\n },\n MOSTRA_HOME_LEDGER_UNREADABLE: {\n severity: \"error\",\n phase: \"host\",\n title: \"Ledger can't be read\",\n hint: \"Restore the ledger from the latest `ledger.sqlite.bak-*` backup in the home's `store/` directory, or move the damaged file aside.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_HOME_DISK_FULL: {\n severity: \"error\",\n phase: \"host\",\n title: \"Disk full\",\n hint: \"Free space on the disk that holds the Mostra home, then retry.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_HOME_GONE: {\n severity: \"error\",\n phase: \"host\",\n title: \"Home directory removed\",\n hint: \"Restore or recreate the home directory, then start Mostra again.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_HOME_MISMATCH: {\n severity: \"error\",\n phase: \"host\",\n title: \"Instance serves a different home\",\n hint: \"Connect to the instance for the home you expect, or start it with `--home` set to that home.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_HOME_INTEGRITY: {\n severity: \"error\",\n phase: \"host\",\n title: \"Stored version or file damaged\",\n hint: \"Publish the version's source again to rebuild a damaged version in place, and run `mostra doctor` for other damaged objects.\",\n docs: {\n explanation:\n \"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.\",\n 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.\",\n },\n },\n MOSTRA_HOME_NOT_ALWAYS_ON: {\n severity: \"warning\",\n phase: \"host\",\n title: \"Long-lived artifacts without an always-on daemon\",\n hint: \"Run `mostra daemon install` so the home's daemon runs as a login service and these artifacts answer at any hour.\",\n docs: {\n explanation:\n \"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.\",\n fix: \"Run `mostra daemon install`. It registers a login service (a launchd agent, a systemd user service or a Task Scheduler task) that keeps the home's daemon running; `mostra daemon uninstall` removes it.\",\n },\n },\n MOSTRA_HOME_GC_INCOMPLETE: {\n severity: \"warning\",\n phase: \"host\",\n title: \"gc didn't finish a step\",\n hint: \"Run `mostra gc` again: what this run removed is in its result, and the next run picks up what it left.\",\n docs: {\n explanation:\n \"`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.\",\n fix: \"Run `mostra gc` again; a failure that repeats names its cause in the message (for example, a file the user can't remove).\",\n },\n },\n MOSTRA_HOME_NETWORK_FILESYSTEM: {\n severity: \"error\",\n phase: \"host\",\n title: \"Data directory on a network filesystem\",\n hint: \"Put the server's data directory on a local disk.\",\n docs: {\n explanation:\n \"A remote server's data directory holds its hosted homes' ledgers and locks, which need a local disk: on a network filesystem a lock can seem held by two machines at once, and SQLite's WAL can't share memory across them (D165 item 0b). The server refuses a data directory it detects on NFS, SMB, AFP, WebDAV or a FUSE mount, before it opens anything.\",\n fix: \"Pass `--data` a directory on a local disk. To keep a copy elsewhere, replicate the homes with a backup tool instead.\",\n },\n },\n // gen:entries\n};\n"],"mappings":";;AAOA,MAAa,sBAAsB;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAEF;;AAMA,MAAa,kBAAmD;CAC9D,oBAAoB;EAClB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,uBAAuB;EACrB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,6BAA6B;EAC3B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,qBAAqB;EACnB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,+BAA+B;EAC7B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,uBAAuB;EACrB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,kBAAkB;EAChB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,sBAAsB;EACpB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,uBAAuB;EACrB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,2BAA2B;EACzB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,2BAA2B;EACzB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,gCAAgC;EAC9B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;AAEF"}
@@ -18,6 +18,7 @@ import { NetworkDiagnosticCode, networkDiagnosticCodes } from "./network.js";
18
18
  import { PlatformDiagnosticCode, platformDiagnosticCodes } from "./platform.js";
19
19
  import { PublishDiagnosticCode, publishDiagnosticCodes } from "./publish.js";
20
20
  import { RegressionDiagnosticCode, regressionDiagnosticCodes } from "./regression.js";
21
+ import { RemoteDiagnosticCode, remoteDiagnosticCodes } from "./remote.js";
21
22
  import { RuntimeDiagnosticCode, runtimeDiagnosticCodes } from "./runtime.js";
22
23
  import { SecretDiagnosticCode, secretDiagnosticCodes } from "./secret.js";
23
24
  import { ShareDiagnosticCode, shareDiagnosticCodes } from "./share.js";
@@ -28,7 +29,7 @@ import { TypeDiagnosticCode, typeDiagnosticCodes } from "./type.js";
28
29
  import { VerifyDiagnosticCode, verifyDiagnosticCodes } from "./verify.js";
29
30
  //#region src/diagnostics/codes/index.d.ts
30
31
  /** Every code in the catalog. Codes are semver surface and are never removed (AX-03). */
31
- export type KnownDiagnosticCode = ShareDiagnosticCode | CliDiagnosticCode | RegressionDiagnosticCode | SmokeDiagnosticCode | A11yDiagnosticCode | NetworkDiagnosticCode | ConsoleDiagnosticCode | TypeDiagnosticCode | VerifyDiagnosticCode | LiveDiagnosticCode | SecretDiagnosticCode | RuntimeDiagnosticCode | FieldDiagnosticCode | SubmitDiagnosticCode | HygieneDiagnosticCode | DepDiagnosticCode | EnvDiagnosticCode | TargetDiagnosticCode | ArtifactDiagnosticCode | PublishDiagnosticCode | ActionDiagnosticCode | BuildDiagnosticCode | ManifestDiagnosticCode | HomeDiagnosticCode | PlatformDiagnosticCode | HostDiagnosticCode;
32
+ export type KnownDiagnosticCode = RemoteDiagnosticCode | ShareDiagnosticCode | CliDiagnosticCode | RegressionDiagnosticCode | SmokeDiagnosticCode | A11yDiagnosticCode | NetworkDiagnosticCode | ConsoleDiagnosticCode | TypeDiagnosticCode | VerifyDiagnosticCode | LiveDiagnosticCode | SecretDiagnosticCode | RuntimeDiagnosticCode | FieldDiagnosticCode | SubmitDiagnosticCode | HygieneDiagnosticCode | DepDiagnosticCode | EnvDiagnosticCode | TargetDiagnosticCode | ArtifactDiagnosticCode | PublishDiagnosticCode | ActionDiagnosticCode | BuildDiagnosticCode | ManifestDiagnosticCode | HomeDiagnosticCode | PlatformDiagnosticCode | HostDiagnosticCode;
32
33
  /** Every cataloged code with its severity, phase, title, default hint and docs text. */
33
34
  export declare const diagnosticCatalog: Readonly<Record<KnownDiagnosticCode, DiagnosticSpec>>;
34
35
  /** Options for {@link createDiagnostic}. */
@@ -48,5 +49,5 @@ export interface CreateDiagnosticOptions {
48
49
  */
49
50
  export declare function createDiagnostic(code: KnownDiagnosticCode, details: DiagnosticDetails, options?: CreateDiagnosticOptions): Diagnostic;
50
51
  //#endregion
51
- export { type A11yDiagnosticCode, type ActionDiagnosticCode, type ArtifactDiagnosticCode, type BuildDiagnosticCode, type CliDiagnosticCode, type ConsoleDiagnosticCode, type DepDiagnosticCode, type EnvDiagnosticCode, type FieldDiagnosticCode, type HomeDiagnosticCode, type HostDiagnosticCode, type HygieneDiagnosticCode, type LiveDiagnosticCode, type ManifestDiagnosticCode, type NetworkDiagnosticCode, type PlatformDiagnosticCode, type PublishDiagnosticCode, type RegressionDiagnosticCode, type RuntimeDiagnosticCode, type SecretDiagnosticCode, type ShareDiagnosticCode, type SmokeDiagnosticCode, type SubmitDiagnosticCode, type TargetDiagnosticCode, type TypeDiagnosticCode, type VerifyDiagnosticCode, a11yDiagnosticCodes, actionDiagnosticCodes, artifactDiagnosticCodes, buildDiagnosticCodes, cliDiagnosticCodes, consoleDiagnosticCodes, depDiagnosticCodes, envDiagnosticCodes, fieldDiagnosticCodes, homeDiagnosticCodes, hostDiagnosticCodes, hygieneDiagnosticCodes, liveDiagnosticCodes, manifestDiagnosticCodes, networkDiagnosticCodes, platformDiagnosticCodes, publishDiagnosticCodes, regressionDiagnosticCodes, runtimeDiagnosticCodes, secretDiagnosticCodes, shareDiagnosticCodes, smokeDiagnosticCodes, submitDiagnosticCodes, targetDiagnosticCodes, typeDiagnosticCodes, verifyDiagnosticCodes };
52
+ export { type A11yDiagnosticCode, type ActionDiagnosticCode, type ArtifactDiagnosticCode, type BuildDiagnosticCode, type CliDiagnosticCode, type ConsoleDiagnosticCode, type DepDiagnosticCode, type EnvDiagnosticCode, type FieldDiagnosticCode, type HomeDiagnosticCode, type HostDiagnosticCode, type HygieneDiagnosticCode, type LiveDiagnosticCode, type ManifestDiagnosticCode, type NetworkDiagnosticCode, type PlatformDiagnosticCode, type PublishDiagnosticCode, type RegressionDiagnosticCode, type RemoteDiagnosticCode, type RuntimeDiagnosticCode, type SecretDiagnosticCode, type ShareDiagnosticCode, type SmokeDiagnosticCode, type SubmitDiagnosticCode, type TargetDiagnosticCode, type TypeDiagnosticCode, type VerifyDiagnosticCode, a11yDiagnosticCodes, actionDiagnosticCodes, artifactDiagnosticCodes, buildDiagnosticCodes, cliDiagnosticCodes, consoleDiagnosticCodes, depDiagnosticCodes, envDiagnosticCodes, fieldDiagnosticCodes, homeDiagnosticCodes, hostDiagnosticCodes, hygieneDiagnosticCodes, liveDiagnosticCodes, manifestDiagnosticCodes, networkDiagnosticCodes, platformDiagnosticCodes, publishDiagnosticCodes, regressionDiagnosticCodes, remoteDiagnosticCodes, runtimeDiagnosticCodes, secretDiagnosticCodes, shareDiagnosticCodes, smokeDiagnosticCodes, submitDiagnosticCodes, targetDiagnosticCodes, typeDiagnosticCodes, verifyDiagnosticCodes };
52
53
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/diagnostics/codes/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA+DY,sBAER,sBACA,oBACA,2BACA,sBACA,qBACA,wBACA,wBACA,qBACA,uBACA,qBACA,uBACA,wBACA,sBACA,uBACA,wBACA,oBACA,oBACA,uBACA,yBACA,wBACA,uBACA,sBACA,yBACA,qBACA,yBACA;;qBAGS,mBAAmB,SAAS,OAAO,qBAAqB;;iBA+BpD;;WAEN;;;;;;;;;;;;wBAaK,iBACd,MAAM,qBACN,SAAS,mBACT,UAAS,0BACR"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/diagnostics/codes/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAiEY,sBAER,uBACA,sBACA,oBACA,2BACA,sBACA,qBACA,wBACA,wBACA,qBACA,uBACA,qBACA,uBACA,wBACA,sBACA,uBACA,wBACA,oBACA,oBACA,uBACA,yBACA,wBACA,uBACA,sBACA,yBACA,qBACA,yBACA;;qBAGS,mBAAmB,SAAS,OAAO,qBAAqB;;iBAgCpD;;WAEN;;;;;;;;;;;;wBAaK,iBACd,MAAM,qBACN,SAAS,mBACT,UAAS,0BACR"}
@@ -17,6 +17,7 @@ import { networkDiagnosticCodes, networkDiagnostics } from "./network.js";
17
17
  import { platformDiagnosticCodes, platformDiagnostics } from "./platform.js";
18
18
  import { publishDiagnosticCodes, publishDiagnostics } from "./publish.js";
19
19
  import { regressionDiagnosticCodes, regressionDiagnostics } from "./regression.js";
20
+ import { remoteDiagnosticCodes, remoteDiagnostics } from "./remote.js";
20
21
  import { runtimeDiagnosticCodes, runtimeDiagnostics } from "./runtime.js";
21
22
  import { secretDiagnosticCodes, secretDiagnostics } from "./secret.js";
22
23
  import { shareDiagnosticCodes, shareDiagnostics } from "./share.js";
@@ -28,6 +29,7 @@ import { verifyDiagnosticCodes, verifyDiagnostics } from "./verify.js";
28
29
  //#region src/diagnostics/codes/index.ts
29
30
  /** Every cataloged code with its severity, phase, title, default hint and docs text. */
30
31
  const diagnosticCatalog = {
32
+ ...remoteDiagnostics,
31
33
  ...shareDiagnostics,
32
34
  ...cliDiagnostics,
33
35
  ...regressionDiagnostics,
@@ -69,6 +71,6 @@ function createDiagnostic(code, details, options = {}) {
69
71
  return buildDiagnostic(code, diagnosticCatalog[code], details, options.docsBase);
70
72
  }
71
73
  //#endregion
72
- export { a11yDiagnosticCodes, actionDiagnosticCodes, artifactDiagnosticCodes, buildDiagnosticCodes, cliDiagnosticCodes, consoleDiagnosticCodes, createDiagnostic, depDiagnosticCodes, diagnosticCatalog, envDiagnosticCodes, fieldDiagnosticCodes, homeDiagnosticCodes, hostDiagnosticCodes, hygieneDiagnosticCodes, liveDiagnosticCodes, manifestDiagnosticCodes, networkDiagnosticCodes, platformDiagnosticCodes, publishDiagnosticCodes, regressionDiagnosticCodes, runtimeDiagnosticCodes, secretDiagnosticCodes, shareDiagnosticCodes, smokeDiagnosticCodes, submitDiagnosticCodes, targetDiagnosticCodes, typeDiagnosticCodes, verifyDiagnosticCodes };
74
+ export { a11yDiagnosticCodes, actionDiagnosticCodes, artifactDiagnosticCodes, buildDiagnosticCodes, cliDiagnosticCodes, consoleDiagnosticCodes, createDiagnostic, depDiagnosticCodes, diagnosticCatalog, envDiagnosticCodes, fieldDiagnosticCodes, homeDiagnosticCodes, hostDiagnosticCodes, hygieneDiagnosticCodes, liveDiagnosticCodes, manifestDiagnosticCodes, networkDiagnosticCodes, platformDiagnosticCodes, publishDiagnosticCodes, regressionDiagnosticCodes, remoteDiagnosticCodes, runtimeDiagnosticCodes, secretDiagnosticCodes, shareDiagnosticCodes, smokeDiagnosticCodes, submitDiagnosticCodes, targetDiagnosticCodes, typeDiagnosticCodes, verifyDiagnosticCodes };
73
75
 
74
76
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/diagnostics/codes/index.ts"],"sourcesContent":["/**\n * The diagnostic catalog, assembled from one source file per area. `pnpm gen diagnostic` keeps\n * the lists below in step with the area files; edit the area files, not these lists.\n */\nimport type { Diagnostic } from \"../diagnostic.ts\";\nimport { buildDiagnostic, type DiagnosticDetails, type DiagnosticSpec } from \"../spec.ts\";\nimport { type A11yDiagnosticCode, a11yDiagnostics } from \"./a11y.ts\";\nimport { type ActionDiagnosticCode, actionDiagnostics } from \"./action.ts\";\nimport { type ArtifactDiagnosticCode, artifactDiagnostics } from \"./artifact.ts\";\nimport { type BuildDiagnosticCode, buildDiagnostics } from \"./build.ts\";\nimport { type CliDiagnosticCode, cliDiagnostics } from \"./cli.ts\";\nimport { type ConsoleDiagnosticCode, consoleDiagnostics } from \"./console.ts\";\nimport { type DepDiagnosticCode, depDiagnostics } from \"./dep.ts\";\nimport { type EnvDiagnosticCode, envDiagnostics } from \"./env.ts\";\nimport { type FieldDiagnosticCode, fieldDiagnostics } from \"./field.ts\";\nimport { type HomeDiagnosticCode, homeDiagnostics } from \"./home.ts\";\nimport { type HostDiagnosticCode, hostDiagnostics } from \"./host.ts\";\nimport { type HygieneDiagnosticCode, hygieneDiagnostics } from \"./hygiene.ts\";\nimport { type LiveDiagnosticCode, liveDiagnostics } from \"./live.ts\";\nimport { type ManifestDiagnosticCode, manifestDiagnostics } from \"./manifest.ts\";\nimport { type NetworkDiagnosticCode, networkDiagnostics } from \"./network.ts\";\nimport { type PlatformDiagnosticCode, platformDiagnostics } from \"./platform.ts\";\nimport { type PublishDiagnosticCode, publishDiagnostics } from \"./publish.ts\";\nimport { type RegressionDiagnosticCode, regressionDiagnostics } from \"./regression.ts\";\nimport { type RuntimeDiagnosticCode, runtimeDiagnostics } from \"./runtime.ts\";\nimport { type SecretDiagnosticCode, secretDiagnostics } from \"./secret.ts\";\n// gen:area-imports\nimport { type ShareDiagnosticCode, shareDiagnostics } from \"./share.ts\";\nimport { type SmokeDiagnosticCode, smokeDiagnostics } from \"./smoke.ts\";\nimport { type SubmitDiagnosticCode, submitDiagnostics } from \"./submit.ts\";\nimport { type TargetDiagnosticCode, targetDiagnostics } from \"./target.ts\";\nimport { type TypeDiagnosticCode, typeDiagnostics } from \"./type.ts\";\nimport { type VerifyDiagnosticCode, verifyDiagnostics } from \"./verify.ts\";\n\nexport { type A11yDiagnosticCode, a11yDiagnosticCodes } from \"./a11y.ts\";\nexport { type ActionDiagnosticCode, actionDiagnosticCodes } from \"./action.ts\";\nexport { type ArtifactDiagnosticCode, artifactDiagnosticCodes } from \"./artifact.ts\";\nexport { type BuildDiagnosticCode, buildDiagnosticCodes } from \"./build.ts\";\nexport { type CliDiagnosticCode, cliDiagnosticCodes } from \"./cli.ts\";\nexport { type ConsoleDiagnosticCode, consoleDiagnosticCodes } from \"./console.ts\";\nexport { type DepDiagnosticCode, depDiagnosticCodes } from \"./dep.ts\";\nexport { type EnvDiagnosticCode, envDiagnosticCodes } from \"./env.ts\";\nexport { type FieldDiagnosticCode, fieldDiagnosticCodes } from \"./field.ts\";\nexport { type HomeDiagnosticCode, homeDiagnosticCodes } from \"./home.ts\";\nexport { type HostDiagnosticCode, hostDiagnosticCodes } from \"./host.ts\";\nexport { type HygieneDiagnosticCode, hygieneDiagnosticCodes } from \"./hygiene.ts\";\nexport { type LiveDiagnosticCode, liveDiagnosticCodes } from \"./live.ts\";\nexport { type ManifestDiagnosticCode, manifestDiagnosticCodes } from \"./manifest.ts\";\nexport { type NetworkDiagnosticCode, networkDiagnosticCodes } from \"./network.ts\";\nexport { type PlatformDiagnosticCode, platformDiagnosticCodes } from \"./platform.ts\";\nexport { type PublishDiagnosticCode, publishDiagnosticCodes } from \"./publish.ts\";\nexport { type RegressionDiagnosticCode, regressionDiagnosticCodes } from \"./regression.ts\";\nexport { type RuntimeDiagnosticCode, runtimeDiagnosticCodes } from \"./runtime.ts\";\nexport { type SecretDiagnosticCode, secretDiagnosticCodes } from \"./secret.ts\";\n// gen:area-exports\nexport { type ShareDiagnosticCode, shareDiagnosticCodes } from \"./share.ts\";\nexport { type SmokeDiagnosticCode, smokeDiagnosticCodes } from \"./smoke.ts\";\nexport { type SubmitDiagnosticCode, submitDiagnosticCodes } from \"./submit.ts\";\nexport { type TargetDiagnosticCode, targetDiagnosticCodes } from \"./target.ts\";\nexport { type TypeDiagnosticCode, typeDiagnosticCodes } from \"./type.ts\";\nexport { type VerifyDiagnosticCode, verifyDiagnosticCodes } from \"./verify.ts\";\n\n/** Every code in the catalog. Codes are semver surface and are never removed (AX-03). */\nexport type KnownDiagnosticCode =\n // gen:area-codes\n | ShareDiagnosticCode\n | CliDiagnosticCode\n | RegressionDiagnosticCode\n | SmokeDiagnosticCode\n | A11yDiagnosticCode\n | NetworkDiagnosticCode\n | ConsoleDiagnosticCode\n | TypeDiagnosticCode\n | VerifyDiagnosticCode\n | LiveDiagnosticCode\n | SecretDiagnosticCode\n | RuntimeDiagnosticCode\n | FieldDiagnosticCode\n | SubmitDiagnosticCode\n | HygieneDiagnosticCode\n | DepDiagnosticCode\n | EnvDiagnosticCode\n | TargetDiagnosticCode\n | ArtifactDiagnosticCode\n | PublishDiagnosticCode\n | ActionDiagnosticCode\n | BuildDiagnosticCode\n | ManifestDiagnosticCode\n | HomeDiagnosticCode\n | PlatformDiagnosticCode\n | HostDiagnosticCode;\n\n/** Every cataloged code with its severity, phase, title, default hint and docs text. */\nexport const diagnosticCatalog: Readonly<Record<KnownDiagnosticCode, DiagnosticSpec>> = {\n // gen:area-spreads\n ...shareDiagnostics,\n ...cliDiagnostics,\n ...regressionDiagnostics,\n ...smokeDiagnostics,\n ...a11yDiagnostics,\n ...networkDiagnostics,\n ...consoleDiagnostics,\n ...typeDiagnostics,\n ...verifyDiagnostics,\n ...liveDiagnostics,\n ...secretDiagnostics,\n ...runtimeDiagnostics,\n ...fieldDiagnostics,\n ...submitDiagnostics,\n ...hygieneDiagnostics,\n ...depDiagnostics,\n ...envDiagnostics,\n ...targetDiagnostics,\n ...artifactDiagnostics,\n ...publishDiagnostics,\n ...actionDiagnostics,\n ...buildDiagnostics,\n ...manifestDiagnostics,\n ...homeDiagnostics,\n ...platformDiagnostics,\n ...hostDiagnostics,\n};\n\n/** Options for {@link createDiagnostic}. */\nexport interface CreateDiagnosticOptions {\n /** The docs site base URL. Defaults to `DEFAULT_DOCS_BASE`. */\n readonly docsBase?: string;\n}\n\n/**\n * Creates the diagnostic for one occurrence of a cataloged code. Severity, phase, the default hint\n * and the docs link come from the catalog.\n *\n * ```ts\n * createDiagnostic(\"MOSTRA_HOST_REVISION_UNSUPPORTED\", {\n * message: \"The client offered 2026-01-01; this instance supports 2026-10-10.\",\n * });\n * ```\n */\nexport function createDiagnostic(\n code: KnownDiagnosticCode,\n details: DiagnosticDetails,\n options: CreateDiagnosticOptions = {},\n): Diagnostic {\n return buildDiagnostic(code, diagnosticCatalog[code], details, options.docsBase);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6FA,MAAa,oBAA2E;CAEtF,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACL;;;;;;;;;;;AAkBA,SAAgB,iBACd,MACA,SACA,UAAmC,CAAC,GACxB;CACZ,OAAO,gBAAgB,MAAM,kBAAkB,OAAO,SAAS,QAAQ,QAAQ;AACjF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/diagnostics/codes/index.ts"],"sourcesContent":["/**\n * The diagnostic catalog, assembled from one source file per area. `pnpm gen diagnostic` keeps\n * the lists below in step with the area files; edit the area files, not these lists.\n */\nimport type { Diagnostic } from \"../diagnostic.ts\";\nimport { buildDiagnostic, type DiagnosticDetails, type DiagnosticSpec } from \"../spec.ts\";\nimport { type A11yDiagnosticCode, a11yDiagnostics } from \"./a11y.ts\";\nimport { type ActionDiagnosticCode, actionDiagnostics } from \"./action.ts\";\nimport { type ArtifactDiagnosticCode, artifactDiagnostics } from \"./artifact.ts\";\nimport { type BuildDiagnosticCode, buildDiagnostics } from \"./build.ts\";\nimport { type CliDiagnosticCode, cliDiagnostics } from \"./cli.ts\";\nimport { type ConsoleDiagnosticCode, consoleDiagnostics } from \"./console.ts\";\nimport { type DepDiagnosticCode, depDiagnostics } from \"./dep.ts\";\nimport { type EnvDiagnosticCode, envDiagnostics } from \"./env.ts\";\nimport { type FieldDiagnosticCode, fieldDiagnostics } from \"./field.ts\";\nimport { type HomeDiagnosticCode, homeDiagnostics } from \"./home.ts\";\nimport { type HostDiagnosticCode, hostDiagnostics } from \"./host.ts\";\nimport { type HygieneDiagnosticCode, hygieneDiagnostics } from \"./hygiene.ts\";\nimport { type LiveDiagnosticCode, liveDiagnostics } from \"./live.ts\";\nimport { type ManifestDiagnosticCode, manifestDiagnostics } from \"./manifest.ts\";\nimport { type NetworkDiagnosticCode, networkDiagnostics } from \"./network.ts\";\nimport { type PlatformDiagnosticCode, platformDiagnostics } from \"./platform.ts\";\nimport { type PublishDiagnosticCode, publishDiagnostics } from \"./publish.ts\";\nimport { type RegressionDiagnosticCode, regressionDiagnostics } from \"./regression.ts\";\n// gen:area-imports\nimport { type RemoteDiagnosticCode, remoteDiagnostics } from \"./remote.ts\";\nimport { type RuntimeDiagnosticCode, runtimeDiagnostics } from \"./runtime.ts\";\nimport { type SecretDiagnosticCode, secretDiagnostics } from \"./secret.ts\";\nimport { type ShareDiagnosticCode, shareDiagnostics } from \"./share.ts\";\nimport { type SmokeDiagnosticCode, smokeDiagnostics } from \"./smoke.ts\";\nimport { type SubmitDiagnosticCode, submitDiagnostics } from \"./submit.ts\";\nimport { type TargetDiagnosticCode, targetDiagnostics } from \"./target.ts\";\nimport { type TypeDiagnosticCode, typeDiagnostics } from \"./type.ts\";\nimport { type VerifyDiagnosticCode, verifyDiagnostics } from \"./verify.ts\";\n\nexport { type A11yDiagnosticCode, a11yDiagnosticCodes } from \"./a11y.ts\";\nexport { type ActionDiagnosticCode, actionDiagnosticCodes } from \"./action.ts\";\nexport { type ArtifactDiagnosticCode, artifactDiagnosticCodes } from \"./artifact.ts\";\nexport { type BuildDiagnosticCode, buildDiagnosticCodes } from \"./build.ts\";\nexport { type CliDiagnosticCode, cliDiagnosticCodes } from \"./cli.ts\";\nexport { type ConsoleDiagnosticCode, consoleDiagnosticCodes } from \"./console.ts\";\nexport { type DepDiagnosticCode, depDiagnosticCodes } from \"./dep.ts\";\nexport { type EnvDiagnosticCode, envDiagnosticCodes } from \"./env.ts\";\nexport { type FieldDiagnosticCode, fieldDiagnosticCodes } from \"./field.ts\";\nexport { type HomeDiagnosticCode, homeDiagnosticCodes } from \"./home.ts\";\nexport { type HostDiagnosticCode, hostDiagnosticCodes } from \"./host.ts\";\nexport { type HygieneDiagnosticCode, hygieneDiagnosticCodes } from \"./hygiene.ts\";\nexport { type LiveDiagnosticCode, liveDiagnosticCodes } from \"./live.ts\";\nexport { type ManifestDiagnosticCode, manifestDiagnosticCodes } from \"./manifest.ts\";\nexport { type NetworkDiagnosticCode, networkDiagnosticCodes } from \"./network.ts\";\nexport { type PlatformDiagnosticCode, platformDiagnosticCodes } from \"./platform.ts\";\nexport { type PublishDiagnosticCode, publishDiagnosticCodes } from \"./publish.ts\";\nexport { type RegressionDiagnosticCode, regressionDiagnosticCodes } from \"./regression.ts\";\n// gen:area-exports\nexport { type RemoteDiagnosticCode, remoteDiagnosticCodes } from \"./remote.ts\";\nexport { type RuntimeDiagnosticCode, runtimeDiagnosticCodes } from \"./runtime.ts\";\nexport { type SecretDiagnosticCode, secretDiagnosticCodes } from \"./secret.ts\";\nexport { type ShareDiagnosticCode, shareDiagnosticCodes } from \"./share.ts\";\nexport { type SmokeDiagnosticCode, smokeDiagnosticCodes } from \"./smoke.ts\";\nexport { type SubmitDiagnosticCode, submitDiagnosticCodes } from \"./submit.ts\";\nexport { type TargetDiagnosticCode, targetDiagnosticCodes } from \"./target.ts\";\nexport { type TypeDiagnosticCode, typeDiagnosticCodes } from \"./type.ts\";\nexport { type VerifyDiagnosticCode, verifyDiagnosticCodes } from \"./verify.ts\";\n\n/** Every code in the catalog. Codes are semver surface and are never removed (AX-03). */\nexport type KnownDiagnosticCode =\n // gen:area-codes\n | RemoteDiagnosticCode\n | ShareDiagnosticCode\n | CliDiagnosticCode\n | RegressionDiagnosticCode\n | SmokeDiagnosticCode\n | A11yDiagnosticCode\n | NetworkDiagnosticCode\n | ConsoleDiagnosticCode\n | TypeDiagnosticCode\n | VerifyDiagnosticCode\n | LiveDiagnosticCode\n | SecretDiagnosticCode\n | RuntimeDiagnosticCode\n | FieldDiagnosticCode\n | SubmitDiagnosticCode\n | HygieneDiagnosticCode\n | DepDiagnosticCode\n | EnvDiagnosticCode\n | TargetDiagnosticCode\n | ArtifactDiagnosticCode\n | PublishDiagnosticCode\n | ActionDiagnosticCode\n | BuildDiagnosticCode\n | ManifestDiagnosticCode\n | HomeDiagnosticCode\n | PlatformDiagnosticCode\n | HostDiagnosticCode;\n\n/** Every cataloged code with its severity, phase, title, default hint and docs text. */\nexport const diagnosticCatalog: Readonly<Record<KnownDiagnosticCode, DiagnosticSpec>> = {\n // gen:area-spreads\n ...remoteDiagnostics,\n ...shareDiagnostics,\n ...cliDiagnostics,\n ...regressionDiagnostics,\n ...smokeDiagnostics,\n ...a11yDiagnostics,\n ...networkDiagnostics,\n ...consoleDiagnostics,\n ...typeDiagnostics,\n ...verifyDiagnostics,\n ...liveDiagnostics,\n ...secretDiagnostics,\n ...runtimeDiagnostics,\n ...fieldDiagnostics,\n ...submitDiagnostics,\n ...hygieneDiagnostics,\n ...depDiagnostics,\n ...envDiagnostics,\n ...targetDiagnostics,\n ...artifactDiagnostics,\n ...publishDiagnostics,\n ...actionDiagnostics,\n ...buildDiagnostics,\n ...manifestDiagnostics,\n ...homeDiagnostics,\n ...platformDiagnostics,\n ...hostDiagnostics,\n};\n\n/** Options for {@link createDiagnostic}. */\nexport interface CreateDiagnosticOptions {\n /** The docs site base URL. Defaults to `DEFAULT_DOCS_BASE`. */\n readonly docsBase?: string;\n}\n\n/**\n * Creates the diagnostic for one occurrence of a cataloged code. Severity, phase, the default hint\n * and the docs link come from the catalog.\n *\n * ```ts\n * createDiagnostic(\"MOSTRA_HOST_REVISION_UNSUPPORTED\", {\n * message: \"The client offered 2026-01-01; this instance supports 2026-10-10.\",\n * });\n * ```\n */\nexport function createDiagnostic(\n code: KnownDiagnosticCode,\n details: DiagnosticDetails,\n options: CreateDiagnosticOptions = {},\n): Diagnostic {\n return buildDiagnostic(code, diagnosticCatalog[code], details, options.docsBase);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgGA,MAAa,oBAA2E;CAEtF,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACL;;;;;;;;;;;AAkBA,SAAgB,iBACd,MACA,SACA,UAAmC,CAAC,GACxB;CACZ,OAAO,gBAAgB,MAAM,kBAAkB,OAAO,SAAS,QAAQ,QAAQ;AACjF"}
@@ -0,0 +1,8 @@
1
+ import "../spec.js";
2
+ //#region src/diagnostics/codes/remote.d.ts
3
+ /** The codes of the REMOTE area, in the order they were added. */
4
+ export declare const remoteDiagnosticCodes: readonly ["MOSTRA_REMOTE_CONFIG_INVALID", "MOSTRA_REMOTE_LOGIN_FAILED", "MOSTRA_REMOTE_UNREACHABLE", "MOSTRA_REMOTE_OWNER_OFFLINE", "MOSTRA_REMOTE_QUEUE_FULL", "MOSTRA_REMOTE_NOT_OWNER_INSTANCE", "MOSTRA_REMOTE_SIGN_IN_REQUIRED", "MOSTRA_REMOTE_RATE_LIMITED"];
5
+ /** The codes of the REMOTE area. */
6
+ export type RemoteDiagnosticCode = (typeof remoteDiagnosticCodes)[number];
7
+ //#endregion
8
+ //# sourceMappingURL=remote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.d.ts","names":[],"sources":["../../../src/diagnostics/codes/remote.ts"],"mappings":";;;qBAMa;;YAaD,+BAA+B"}
@@ -0,0 +1,99 @@
1
+ //#region src/diagnostics/codes/remote.ts
2
+ /** The codes of the REMOTE area, in the order they were added. */
3
+ const remoteDiagnosticCodes = [
4
+ "MOSTRA_REMOTE_CONFIG_INVALID",
5
+ "MOSTRA_REMOTE_LOGIN_FAILED",
6
+ "MOSTRA_REMOTE_UNREACHABLE",
7
+ "MOSTRA_REMOTE_OWNER_OFFLINE",
8
+ "MOSTRA_REMOTE_QUEUE_FULL",
9
+ "MOSTRA_REMOTE_NOT_OWNER_INSTANCE",
10
+ "MOSTRA_REMOTE_SIGN_IN_REQUIRED",
11
+ "MOSTRA_REMOTE_RATE_LIMITED"
12
+ ];
13
+ /** The REMOTE area's catalog entries. */
14
+ const remoteDiagnostics = {
15
+ MOSTRA_REMOTE_CONFIG_INVALID: {
16
+ severity: "error",
17
+ phase: "host",
18
+ title: "Remote server configuration can't be used",
19
+ hint: "Fix the configuration key the message names, then start mostra-runtime server again.",
20
+ docs: {
21
+ explanation: "`mostra-runtime server` reads its configuration (the file `--config` names and `MOSTRA_SERVER_*` variables) before it serves anything, and stops when a key is missing, of the wrong type or out of range, naming the key. Nothing was served.",
22
+ fix: "Correct the key the message names: `apiOrigin` must be an `https:` origin (or `http:` on loopback), and `domains.active` a host name."
23
+ }
24
+ },
25
+ MOSTRA_REMOTE_LOGIN_FAILED: {
26
+ severity: "error",
27
+ phase: "host",
28
+ title: "Signing in to a remote server failed",
29
+ hint: "Run mostra login again, and approve the code on the server's page within ten minutes.",
30
+ docs: {
31
+ explanation: "Signing this home in to a remote server didn't finish: the code expired, the person refused it, the server refused the client, or the binding's access token was refused (revoked, expired, or for another server). Nothing of the home changed; artifacts it owns on that server stay its own.",
32
+ fix: "Sign in to the server again and approve the code on the page it names. A refusal you didn't expect means the sign-in was revoked on the server."
33
+ }
34
+ },
35
+ MOSTRA_REMOTE_UNREACHABLE: {
36
+ severity: "error",
37
+ phase: "host",
38
+ title: "The remote server can't be reached",
39
+ hint: "Check the network and the server's address, then try again; mostra status shows the link.",
40
+ docs: {
41
+ explanation: "The owner instance couldn't reach the remote server that holds this hosted artifact, so a write that must go there (its artifact state, a live value) was refused, never applied locally alone (D165 item 1). Nothing was lost: a page's edit stays in its journal and is sent again.",
42
+ fix: "Run `mostra status` to see each server's link. When the server is back the link reconnects by itself; then write again."
43
+ }
44
+ },
45
+ MOSTRA_REMOTE_OWNER_OFFLINE: {
46
+ severity: "error",
47
+ phase: "host",
48
+ title: "The artifact's owner instance is offline",
49
+ hint: "Start Mostra on the machine that shared the page, or try again once it is back.",
50
+ docs: {
51
+ explanation: "A hosted page called server code its owner instance runs, and the owner instance isn't connected. A plain call isn't kept, so it is refused at once; an action run waits or fails as the artifact's `hosted.offline` says.",
52
+ fix: "Start Mostra on the owner's machine (`mostra daemon start`, or `mostra daemon install` for always-on). An action that must work while the owner is away should be an action run with `hosted.offline.actions: \"queue\"`."
53
+ }
54
+ },
55
+ MOSTRA_REMOTE_QUEUE_FULL: {
56
+ severity: "error",
57
+ phase: "host",
58
+ title: "Too many runs wait for the owner",
59
+ hint: "Wait for the owner to come back and work through its queue, then press again.",
60
+ docs: {
61
+ explanation: "The artifact's owner instance is offline and as many runs as the server allows already wait for it, so this one was refused before anything was recorded. Runs already waiting keep their place.",
62
+ fix: "Bring the owner instance back online: waiting runs then go out in the order they were made. The cap is the server's `relay.waitingRunsPerArtifact` setting."
63
+ }
64
+ },
65
+ MOSTRA_REMOTE_NOT_OWNER_INSTANCE: {
66
+ severity: "error",
67
+ phase: "host",
68
+ title: "Another instance owns this hosted artifact",
69
+ hint: "Share or push this artifact from its owner instance, named in the message.",
70
+ docs: {
71
+ explanation: "A hosted artifact has one owner instance: the one that shared it. It alone receives the artifact's submissions, relayed runs and authoring, and only it pushes versions of it (D165 item 1b). Another instance of the same account reads and waits through the hosted home.",
72
+ fix: "Run the command on the instance the message names. Moving an artifact to another owner instance isn't part of this release."
73
+ }
74
+ },
75
+ MOSTRA_REMOTE_SIGN_IN_REQUIRED: {
76
+ severity: "error",
77
+ phase: "host",
78
+ title: "This action needs a signed-in viewer",
79
+ hint: "Sign in from the page's chrome, or have the owner allow this for anyone with the link.",
80
+ docs: {
81
+ explanation: "On a hosted link, an action that runs on the owner's machine, or a submission when the artifact asks for it, needs a viewer signed in (D159, D165 item 13). Nothing was recorded.",
82
+ fix: "Sign in with the page's Sign in. An owner who wants anyone with the link to run actions sets `hosted: { actions: \"link\" }` in the manifest (and `submissions: \"link\"` for answers)."
83
+ }
84
+ },
85
+ MOSTRA_REMOTE_RATE_LIMITED: {
86
+ severity: "error",
87
+ phase: "host",
88
+ title: "Too many requests on this link",
89
+ hint: "Try again after the time the answer's Retry-After gives.",
90
+ docs: {
91
+ explanation: "Too many requests of this kind came through one link or one address in a short time, past the server's `rateLimits`. Nothing was recorded, and a draft stays as it was.",
92
+ fix: "Wait for the `Retry-After` the answer carries and try again. The limits are the server's `rateLimits` settings."
93
+ }
94
+ }
95
+ };
96
+ //#endregion
97
+ export { remoteDiagnosticCodes, remoteDiagnostics };
98
+
99
+ //# sourceMappingURL=remote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.js","names":[],"sources":["../../../src/diagnostics/codes/remote.ts"],"sourcesContent":["/**\n * Diagnostic codes of the REMOTE area.\n */\nimport type { AreaCatalog } from \"../spec.ts\";\n\n/** The codes of the REMOTE area, in the order they were added. */\nexport const remoteDiagnosticCodes = [\n \"MOSTRA_REMOTE_CONFIG_INVALID\",\n \"MOSTRA_REMOTE_LOGIN_FAILED\",\n \"MOSTRA_REMOTE_UNREACHABLE\",\n \"MOSTRA_REMOTE_OWNER_OFFLINE\",\n \"MOSTRA_REMOTE_QUEUE_FULL\",\n \"MOSTRA_REMOTE_NOT_OWNER_INSTANCE\",\n \"MOSTRA_REMOTE_SIGN_IN_REQUIRED\",\n \"MOSTRA_REMOTE_RATE_LIMITED\",\n // gen:codes\n] as const;\n\n/** The codes of the REMOTE area. */\nexport type RemoteDiagnosticCode = (typeof remoteDiagnosticCodes)[number];\n\n/** The REMOTE area's catalog entries. */\nexport const remoteDiagnostics: AreaCatalog<RemoteDiagnosticCode> = {\n MOSTRA_REMOTE_CONFIG_INVALID: {\n severity: \"error\",\n phase: \"host\",\n title: \"Remote server configuration can't be used\",\n hint: \"Fix the configuration key the message names, then start mostra-runtime server again.\",\n docs: {\n explanation:\n \"`mostra-runtime server` reads its configuration (the file `--config` names and `MOSTRA_SERVER_*` variables) before it serves anything, and stops when a key is missing, of the wrong type or out of range, naming the key. Nothing was served.\",\n fix: \"Correct the key the message names: `apiOrigin` must be an `https:` origin (or `http:` on loopback), and `domains.active` a host name.\",\n },\n },\n MOSTRA_REMOTE_LOGIN_FAILED: {\n severity: \"error\",\n phase: \"host\",\n title: \"Signing in to a remote server failed\",\n hint: \"Run mostra login again, and approve the code on the server's page within ten minutes.\",\n docs: {\n explanation:\n \"Signing this home in to a remote server didn't finish: the code expired, the person refused it, the server refused the client, or the binding's access token was refused (revoked, expired, or for another server). Nothing of the home changed; artifacts it owns on that server stay its own.\",\n fix: \"Sign in to the server again and approve the code on the page it names. A refusal you didn't expect means the sign-in was revoked on the server.\",\n },\n },\n MOSTRA_REMOTE_UNREACHABLE: {\n severity: \"error\",\n phase: \"host\",\n title: \"The remote server can't be reached\",\n hint: \"Check the network and the server's address, then try again; mostra status shows the link.\",\n docs: {\n explanation:\n \"The owner instance couldn't reach the remote server that holds this hosted artifact, so a write that must go there (its artifact state, a live value) was refused, never applied locally alone (D165 item 1). Nothing was lost: a page's edit stays in its journal and is sent again.\",\n fix: \"Run `mostra status` to see each server's link. When the server is back the link reconnects by itself; then write again.\",\n },\n },\n MOSTRA_REMOTE_OWNER_OFFLINE: {\n severity: \"error\",\n phase: \"host\",\n title: \"The artifact's owner instance is offline\",\n hint: \"Start Mostra on the machine that shared the page, or try again once it is back.\",\n docs: {\n explanation:\n \"A hosted page called server code its owner instance runs, and the owner instance isn't connected. A plain call isn't kept, so it is refused at once; an action run waits or fails as the artifact's `hosted.offline` says.\",\n fix: 'Start Mostra on the owner\\'s machine (`mostra daemon start`, or `mostra daemon install` for always-on). An action that must work while the owner is away should be an action run with `hosted.offline.actions: \"queue\"`.',\n },\n },\n MOSTRA_REMOTE_QUEUE_FULL: {\n severity: \"error\",\n phase: \"host\",\n title: \"Too many runs wait for the owner\",\n hint: \"Wait for the owner to come back and work through its queue, then press again.\",\n docs: {\n explanation:\n \"The artifact's owner instance is offline and as many runs as the server allows already wait for it, so this one was refused before anything was recorded. Runs already waiting keep their place.\",\n fix: \"Bring the owner instance back online: waiting runs then go out in the order they were made. The cap is the server's `relay.waitingRunsPerArtifact` setting.\",\n },\n },\n MOSTRA_REMOTE_NOT_OWNER_INSTANCE: {\n severity: \"error\",\n phase: \"host\",\n title: \"Another instance owns this hosted artifact\",\n hint: \"Share or push this artifact from its owner instance, named in the message.\",\n docs: {\n explanation:\n \"A hosted artifact has one owner instance: the one that shared it. It alone receives the artifact's submissions, relayed runs and authoring, and only it pushes versions of it (D165 item 1b). Another instance of the same account reads and waits through the hosted home.\",\n fix: \"Run the command on the instance the message names. Moving an artifact to another owner instance isn't part of this release.\",\n },\n },\n MOSTRA_REMOTE_SIGN_IN_REQUIRED: {\n severity: \"error\",\n phase: \"host\",\n title: \"This action needs a signed-in viewer\",\n hint: \"Sign in from the page's chrome, or have the owner allow this for anyone with the link.\",\n docs: {\n explanation:\n \"On a hosted link, an action that runs on the owner's machine, or a submission when the artifact asks for it, needs a viewer signed in (D159, D165 item 13). Nothing was recorded.\",\n fix: 'Sign in with the page\\'s Sign in. An owner who wants anyone with the link to run actions sets `hosted: { actions: \"link\" }` in the manifest (and `submissions: \"link\"` for answers).',\n },\n },\n MOSTRA_REMOTE_RATE_LIMITED: {\n severity: \"error\",\n phase: \"host\",\n title: \"Too many requests on this link\",\n hint: \"Try again after the time the answer's Retry-After gives.\",\n docs: {\n explanation:\n \"Too many requests of this kind came through one link or one address in a short time, past the server's `rateLimits`. Nothing was recorded, and a draft stays as it was.\",\n fix: \"Wait for the `Retry-After` the answer carries and try again. The limits are the server's `rateLimits` settings.\",\n },\n },\n // gen:entries\n};\n"],"mappings":";;AAMA,MAAa,wBAAwB;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAEF;;AAMA,MAAa,oBAAuD;CAClE,8BAA8B;EAC5B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,4BAA4B;EAC1B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,2BAA2B;EACzB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,6BAA6B;EAC3B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,0BAA0B;EACxB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,kCAAkC;EAChC,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,gCAAgC;EAC9B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,4BAA4B;EAC1B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;AAEF"}
@@ -46,10 +46,10 @@ const submitDiagnostics = {
46
46
  severity: "error",
47
47
  phase: "runtime",
48
48
  title: "No such submission",
49
- hint: "Wait for a submission with `mostra wait <artifact> --until submitted`, or name one that exists.",
49
+ hint: "Wait for a submission with `mostra wait <artifact> --until submitted`, or, when the message says the policy is none, read `mostra state get <artifact>` or wait for a signal with `--until signal:<name>`.",
50
50
  docs: {
51
- 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).",
52
- 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."
51
+ 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). An artifact whose submission policy is `none` never has one, and the message says so: its viewers' work is in its shared state, its signals and its action runs.",
52
+ 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. Under policy `none`, read the shared state with `mostra state get <artifact>`, or wait for a signal the page raises with `mostra wait <artifact> --until signal:<name>`: its event carries the signal's payload."
53
53
  }
54
54
  },
55
55
  MOSTRA_SUBMIT_VIEW_INVALID: {