@mostra/cli 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.js CHANGED
@@ -54,7 +54,7 @@ async function start() {
54
54
  },
55
55
  stderrTty: process.stderr.isTTY === true,
56
56
  terminal: process.stdin.isTTY === true || process.stdout.isTTY === true || process.stderr.isTTY === true
57
- }) ?? await (await import("./run-D1gRM6Bm.js")).run({
57
+ }) ?? await (await import("./run-CMyjOm0Q.js")).run({
58
58
  argv: process.argv.slice(2),
59
59
  env: process.env,
60
60
  cwd: process.cwd(),
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as COMMANDS, i as referenceMarkdown, n as commandDefinition, r as commandHelp, t as run } from "./run-Du266XjI.js";
1
+ import { a as COMMANDS, i as referenceMarkdown, n as commandDefinition, r as commandHelp, t as run } from "./run-BJaRnz-Q.js";
2
2
  import { n as exitCodeFor, t as EXIT } from "./exit-CBIf8nAU.js";
3
3
  export { COMMANDS, EXIT, commandDefinition, commandHelp, exitCodeFor, referenceMarkdown, run };
@@ -798,7 +798,7 @@ Exit codes:
798
798
  3 environment error (no runtime, browser or socket; the home; an unsupported platform)
799
799
 
800
800
  Example:
801
- mostra host --home ~/.jcode/mostra
801
+ mostra host --home ~/.my-host/mostra
802
802
  ```
803
803
 
804
804
  ## mostra docs
@@ -378,6 +378,15 @@
378
378
  "explanation": "Mostra runs on its own runtime bundle, found in the local cache, beside the installed package or at `MOSTRA_BUNDLE`. None was there, and no download could start: Mostra is offline (`MOSTRA_OFFLINE`), this build of the package pins no bundle for this platform, or the platform has none.",
379
379
  "fix": "Run the command once with network access and without `MOSTRA_OFFLINE`, so the pinned bundle is fetched and cached; later runs work offline. On a machine without network access, extract the release's archive for the platform and set `MOSTRA_BUNDLE` to its directory. A development checkout uses its own built runtime instead."
380
380
  },
381
+ {
382
+ "code": "MOSTRA_ENV_HELPER_MISSING",
383
+ "severity": "error",
384
+ "phase": "platform",
385
+ "title": "Windows helper missing",
386
+ "hint": "Reinstall Mostra, or set `MOSTRA_WIN_HELPER` to its `mostra-win.exe`.",
387
+ "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.",
388
+ "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`."
389
+ },
381
390
  {
382
391
  "code": "MOSTRA_ENV_NODE_UNSUPPORTED",
383
392
  "severity": "error",
@@ -621,6 +630,15 @@
621
630
  "explanation": "Events before a cursor were compacted on request (`mostra gc --compact-events`, DATA_MODEL §4): an artifact's old events were replaced by one `artifact.compacted` event that summarizes them. A reader asking for events after an earlier cursor would miss some, and Mostra never leaves a silent gap.",
622
631
  "fix": "Read again with `after` set to the cursor the message names: the next event is the `artifact.compacted` summary. Rebuild what you track from it and continue as usual."
623
632
  },
633
+ {
634
+ "code": "MOSTRA_HOST_IDENTITY_UNAVAILABLE",
635
+ "severity": "error",
636
+ "phase": "host",
637
+ "title": "The host that identifies viewers didn't answer",
638
+ "hint": "Start the host that serves this home's identity port, then open the link again.",
639
+ "explanation": "A host registered the `identity` port, so it decides who opens this home's links. When a link minted without a viewer was opened, that host failed, didn't answer within 5 seconds, gave an answer its schema refuses, or is expected (it lists `identity` in `HomeConfig.ports`) but not connected. Mostra refuses the link rather than let the session act as someone else.",
640
+ "fix": "Start or reconnect the host, then open the link again. A link minted with `view/url`'s `viewer` names its person itself and never needs the port. To return the home to Mostra's own identity, have the host register without the port and clear its expected ports (`HomeConfig.ports: []`)."
641
+ },
624
642
  {
625
643
  "code": "MOSTRA_HOST_INITIALIZE_ORDER",
626
644
  "severity": "error",
@@ -924,8 +942,8 @@
924
942
  "phase": "platform",
925
943
  "title": "Unsupported platform",
926
944
  "hint": "Run Mostra on macOS or Linux, on an x64 or arm64 machine.",
927
- "explanation": "Mostra 1.0 runs on macOS and Linux, on x64 and arm64. On any other operating system or architecture, Windows included, every entry point stops with this code before it creates or changes anything, because the process model, sockets and storage are built and tested only on those platforms. The message names the platform that was detected.",
928
- "fix": "Run Mostra on a macOS or Linux machine with an x64 or arm64 processor. Windows support is planned for a release after 1.0."
945
+ "explanation": "Mostra runs on macOS and Linux, on x64 and arm64. On any other operating system or architecture every entry point stops with this code before it creates or changes anything, because the process model, the control endpoint and storage are built and tested only there. Windows on x64 and arm64 is being added and runs only in Mostra's own development builds until it is complete; a release stops there with this code too. The message names the platform that was detected.",
946
+ "fix": "Run Mostra on a macOS or Linux machine with an x64 or arm64 processor. Windows support arrives in a 1.0 release."
929
947
  },
930
948
  {
931
949
  "code": "MOSTRA_PUBLISH_ID_CONFLICT",
@@ -0,0 +1,23 @@
1
+ ---
2
+ code: MOSTRA_ENV_HELPER_MISSING
3
+ severity: error
4
+ phase: platform
5
+ ---
6
+
7
+ <!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
8
+
9
+ # MOSTRA_ENV_HELPER_MISSING
10
+
11
+ Windows helper missing. Severity: error. Phase: platform.
12
+
13
+ ## What it means
14
+
15
+ 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.
16
+
17
+ ## How to fix it
18
+
19
+ 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`.
20
+
21
+ ## Hint
22
+
23
+ Reinstall Mostra, or set `MOSTRA_WIN_HELPER` to its `mostra-win.exe`.
@@ -0,0 +1,23 @@
1
+ ---
2
+ code: MOSTRA_HOST_IDENTITY_UNAVAILABLE
3
+ severity: error
4
+ phase: host
5
+ ---
6
+
7
+ <!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
8
+
9
+ # MOSTRA_HOST_IDENTITY_UNAVAILABLE
10
+
11
+ The host that identifies viewers didn't answer. Severity: error. Phase: host.
12
+
13
+ ## What it means
14
+
15
+ A host registered the `identity` port, so it decides who opens this home's links. When a link minted without a viewer was opened, that host failed, didn't answer within 5 seconds, gave an answer its schema refuses, or is expected (it lists `identity` in `HomeConfig.ports`) but not connected. Mostra refuses the link rather than let the session act as someone else.
16
+
17
+ ## How to fix it
18
+
19
+ Start or reconnect the host, then open the link again. A link minted with `view/url`'s `viewer` names its person itself and never needs the port. To return the home to Mostra's own identity, have the host register without the port and clear its expected ports (`HomeConfig.ports: []`).
20
+
21
+ ## Hint
22
+
23
+ Start the host that serves this home's identity port, then open the link again.
@@ -12,11 +12,11 @@ Unsupported platform. Severity: error. Phase: platform.
12
12
 
13
13
  ## What it means
14
14
 
15
- Mostra 1.0 runs on macOS and Linux, on x64 and arm64. On any other operating system or architecture, Windows included, every entry point stops with this code before it creates or changes anything, because the process model, sockets and storage are built and tested only on those platforms. The message names the platform that was detected.
15
+ Mostra runs on macOS and Linux, on x64 and arm64. On any other operating system or architecture every entry point stops with this code before it creates or changes anything, because the process model, the control endpoint and storage are built and tested only there. Windows on x64 and arm64 is being added and runs only in Mostra's own development builds until it is complete; a release stops there with this code too. The message names the platform that was detected.
16
16
 
17
17
  ## How to fix it
18
18
 
19
- Run Mostra on a macOS or Linux machine with an x64 or arm64 processor. Windows support is planned for a release after 1.0.
19
+ Run Mostra on a macOS or Linux machine with an x64 or arm64 processor. Windows support arrives in a 1.0 release.
20
20
 
21
21
  ## Hint
22
22
 
@@ -1802,7 +1802,7 @@ const hostCommand = defineCommand({
1802
1802
  topic: "cli"
1803
1803
  },
1804
1804
  exits: [],
1805
- example: "host --home ~/.jcode/mostra",
1805
+ example: "host --home ~/.my-host/mostra",
1806
1806
  local: true,
1807
1807
  quiet: true,
1808
1808
  readsStdin: true,
@@ -3821,4 +3821,4 @@ async function runRuntime(io, args, stdio) {
3821
3821
  //#endregion
3822
3822
  export { COMMANDS as a, referenceMarkdown as i, commandDefinition as n, commandHelp as r, run as t };
3823
3823
 
3824
- //# sourceMappingURL=run-Du266XjI.js.map
3824
+ //# sourceMappingURL=run-BJaRnz-Q.js.map