@mostra/runtime 0.15.0 → 0.15.1
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 +1 -1
- package/dist/index.js +1 -1
- package/dist/{instance-C7NZDQqj.js → instance-Bw1BxctF.js} +15 -9
- package/dist/instance-Bw1BxctF.js.map +1 -0
- package/dist/plugins/child/host.js +1 -1
- package/dist/skill/SKILL.md +2 -2
- package/dist/skill/references/mcp.md +2 -2
- package/package.json +7 -7
- package/src/deps/installer.ts +18 -8
- package/dist/instance-C7NZDQqj.js.map +0 -1
|
@@ -4,8 +4,8 @@ import { isAbsolute, join, relative, sep } from "node:path";
|
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
import { checkArtifactPath } from "@mostra/protocol";
|
|
6
6
|
import { readFile, readdir, realpath } from "node:fs/promises";
|
|
7
|
-
import * as z from "zod";
|
|
8
7
|
import { stampServed } from "@mostra/protocol/plugin";
|
|
8
|
+
import * as z from "zod";
|
|
9
9
|
//#region src/plugins/child/host.ts
|
|
10
10
|
/**
|
|
11
11
|
* The plugin child's entry (`dist/plugins/child/host.js`, D30): the process that loads a plugin's
|
package/dist/skill/SKILL.md
CHANGED
|
@@ -4,7 +4,7 @@ description: Communicate visually with the user through Mostra. Use whenever sho
|
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
compatibility: Needs a shell that runs `mostra` (or `npx` with Node.js 22.19 or later) on macOS, Linux or Windows, x64 or arm64.
|
|
6
6
|
metadata:
|
|
7
|
-
version: "0.15.
|
|
7
|
+
version: "0.15.1"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Mostra
|
|
@@ -13,7 +13,7 @@ Mostra turns a React page you write into an **artifact**: a web page a person op
|
|
|
13
13
|
|
|
14
14
|
## Running Mostra
|
|
15
15
|
|
|
16
|
-
Run `mostra <command>`. When `mostra` isn't on the `PATH`, run `npx -y @mostra/cli@0.15.
|
|
16
|
+
Run `mostra <command>`. When `mostra` isn't on the `PATH`, run `npx -y @mostra/cli@0.15.1 <command>` everywhere this Skill says `mostra`; the first run downloads Mostra's own runtime (no global Node.js needed beyond `npx`). Every command takes `--json` (one JSON envelope on stdout, logs on stderr) and `--help`. `mostra docs <topic>` prints the reference, including every diagnostic code's page (`mostra docs MOSTRA_FIELD_DUPLICATE_ID`). `mostra list` lists the artifacts you've published, and `mostra status` shows the running instance.
|
|
17
17
|
|
|
18
18
|
When Mostra's tools are in your tool list (`artifact_create`, `artifact_verify` and the rest), use them instead: each step below has its tool, and everything else here holds unchanged. See [references/mcp.md](references/mcp.md).
|
|
19
19
|
|
|
@@ -59,10 +59,10 @@ A chat app's connector reaches the person's own computer through their Mostra se
|
|
|
59
59
|
|
|
60
60
|
## Adding the server to a client
|
|
61
61
|
|
|
62
|
-
A client starts the server as `mostra mcp` over stdio, or `npx -y @mostra/cli@0.15.
|
|
62
|
+
A client starts the server as `mostra mcp` over stdio, or `npx -y @mostra/cli@0.15.1 mcp` where `mostra` isn't installed. Its configuration names that command, for example:
|
|
63
63
|
|
|
64
64
|
```json
|
|
65
|
-
{ "mcpServers": { "mostra": { "command": "npx", "args": ["-y", "@mostra/cli@0.15.
|
|
65
|
+
{ "mcpServers": { "mostra": { "command": "npx", "args": ["-y", "@mostra/cli@0.15.1", "mcp"] } } }
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
For a client that speaks only HTTP, `mostra mcp --http` serves Streamable HTTP on `127.0.0.1` and prints its URL and a token on stderr; every request sends `Authorization: Bearer <token>` (set `MOSTRA_MCP_TOKEN` to choose it). `--workspace <dir>` chooses where new artifacts go.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mostra/runtime",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "The Mostra runtime: the supervisor that owns a home, its ledger, its child processes and the host protocol server (mostra-runtime host|daemon).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "The Mostra Authors",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@hono/node-server": "2.1.5",
|
|
38
38
|
"@mdx-js/mdx": "3.1.1",
|
|
39
|
-
"@mostra/mcp": "0.15.
|
|
40
|
-
"@mostra/protocol": "0.15.
|
|
41
|
-
"@mostra/themes": "0.15.
|
|
39
|
+
"@mostra/mcp": "0.15.1",
|
|
40
|
+
"@mostra/protocol": "0.15.1",
|
|
41
|
+
"@mostra/themes": "0.15.1",
|
|
42
42
|
"@tailwindcss/vite": "4.3.3",
|
|
43
43
|
"@vitejs/plugin-react": "6.1.2",
|
|
44
44
|
"better-sqlite3": "13.0.3",
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"@modelcontextprotocol/conformance-next": "npm:@modelcontextprotocol/conformance@0.2.0-alpha.12",
|
|
65
65
|
"@mostra/contract-cli-command": "0.1.0",
|
|
66
66
|
"@mostra/contract-exporter": "0.1.0",
|
|
67
|
-
"@mostra/shell": "0.15.
|
|
67
|
+
"@mostra/shell": "0.15.1",
|
|
68
68
|
"@mostra/tools": "0.0.0",
|
|
69
|
-
"@mostra/verify": "0.15.
|
|
69
|
+
"@mostra/verify": "0.15.1",
|
|
70
70
|
"@mostra/warm": "0.0.0",
|
|
71
|
-
"@mostra/worker": "0.15.
|
|
71
|
+
"@mostra/worker": "0.15.1",
|
|
72
72
|
"@types/better-sqlite3": "9.6.0",
|
|
73
73
|
"@types/node": "24.19.2",
|
|
74
74
|
"@types/semver": "7.8.0",
|
package/src/deps/installer.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { writeFile } from "node:fs/promises";
|
|
|
10
10
|
import { dirname, join } from "node:path";
|
|
11
11
|
import { fileURLToPath } from "node:url";
|
|
12
12
|
import { createDiagnostic, type Diagnostic } from "@mostra/protocol";
|
|
13
|
+
import { PLUGIN_CONTRACTS } from "@mostra/protocol/plugin";
|
|
13
14
|
import type { Environment, Log } from "../log.ts";
|
|
14
15
|
import { artifactEnvironment, type ProcessManager } from "../processes/index.ts";
|
|
15
16
|
import { runtimeRoot } from "./warm.ts";
|
|
@@ -125,15 +126,24 @@ function locatePnpm(): { entry: string; version: string } {
|
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
/**
|
|
129
|
+
/**
|
|
130
|
+
* The extension contracts' packages, which the release age never holds back (D173): Mostra's own
|
|
131
|
+
* release pipeline publishes them beside the runtime that runs them, so a plugin built on a
|
|
132
|
+
* contract released today installs today, wherever in its tree the contract is.
|
|
133
|
+
*/
|
|
134
|
+
export const RELEASE_AGE_EXEMPT: readonly string[] = Object.values(PLUGIN_CONTRACTS).map(
|
|
135
|
+
(contract) => contract.package,
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The project settings of a run: the release age, the packages named exactly and the extension
|
|
140
|
+
* contracts' packages, which it doesn't hold back (D95, D173).
|
|
141
|
+
*/
|
|
129
142
|
export function workspaceSettings(releaseAge: InstallRun["releaseAge"]): string {
|
|
130
143
|
if (releaseAge === false) return "minimumReleaseAge: 0\n";
|
|
131
|
-
const lines = [`minimumReleaseAge: ${MINIMUM_RELEASE_AGE_MINUTES}
|
|
132
|
-
|
|
133
|
-
lines.push(
|
|
134
|
-
for (const name of [...new Set(releaseAge.exempt)].sort()) {
|
|
135
|
-
lines.push(` - ${JSON.stringify(name)}`);
|
|
136
|
-
}
|
|
144
|
+
const lines = [`minimumReleaseAge: ${MINIMUM_RELEASE_AGE_MINUTES}`, "minimumReleaseAgeExclude:"];
|
|
145
|
+
for (const name of [...new Set([...RELEASE_AGE_EXEMPT, ...releaseAge.exempt])].sort()) {
|
|
146
|
+
lines.push(` - ${JSON.stringify(name)}`);
|
|
137
147
|
}
|
|
138
148
|
return `${lines.join("\n")}\n`;
|
|
139
149
|
}
|
|
@@ -343,7 +353,7 @@ function diagnose(
|
|
|
343
353
|
const mature =
|
|
344
354
|
first.code === "ERR_PNPM_FETCH_404"
|
|
345
355
|
? ""
|
|
346
|
-
: " Without an exact version, only releases at least a day old match
|
|
356
|
+
: " Without an exact version, only releases at least a day old match: a release less than a day old installs when it is named exactly, and, when it is a dependency of what was named, once it is a day old.";
|
|
347
357
|
return createDiagnostic("MOSTRA_DEP_NOT_FOUND", {
|
|
348
358
|
message: `The registry has no match for ${subject}: ${first.message}.${mature}`,
|
|
349
359
|
});
|