@mostra/runtime 0.13.0 → 0.14.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.
@@ -43,6 +43,7 @@ The server reads a JSON file (`--config`) and `MOSTRA_SERVER_<KEY>` variables. A
43
43
  | `rateLimits` | Rates as `{ "count", "per" }`: `perIp.submissions` and `perLink.submissions` for answers, `perLink.relayedRuns` for actions, and `perIp.requests` for every request an address sends (a health check aside). Past a rate the answer is 429 with `Retry-After`; a page says to try again shortly and keeps the draft. A key left out is no limit |
44
44
  | `relay`, `homes`, `ledger` | The relay's waiting-run cap and drain rate, how long an idle hosted home stays open, and the ledger's WAL checkpoint (`0` for a backup replicator) |
45
45
  | `operator` | The path of an operator module, which adds limits, metering, accounts and abuse handling through the operator ports (`@mostra/protocol/operator`). Without one, every port keeps its no-op default |
46
+ | `appearance` | How the server's own pages (sign-in, linking a machine, a chat app's consent, and the page someone meets at a link that doesn't work) look and name themselves. `name` is what they call the server (`Mostra` unless you set another name, or `null` for none); `logo` is an image of yours the server serves (`{ "file", "alt", "width", "height" }`, an `.svg`, `.png` or `.webp` of at most 256 KiB); `default` is `system`, `light` or `dark`, before a person picks with the page's own button; `footer` adds up to six links (your terms, privacy, help). Every page says "Runs on Mostra" in its footer, and every hosted page carries the small Mostra mark with "Make pages like this" unless an operator module's `policy.link` turns it off for the pages it serves unbranded |
46
47
 
47
48
  For GitHub sign-in, create an OAuth app with the callback `https://api.example.com/signin/github/callback`. For OpenID Connect, register the redirect URI `https://api.example.com/signin/<id>/callback`. Keep each client secret in a file that only the container's user (UID 10001) can read.
48
49
 
@@ -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.13.0"
7
+ version: "0.14.0"
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.13.0 <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.
16
+ Run `mostra <command>`. When `mostra` isn't on the `PATH`, run `npx -y @mostra/cli@0.14.0 <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
 
@@ -1,19 +1,25 @@
1
1
  @import "tailwindcss";
2
+ @import "@mostra/themes/css/faces.css";
2
3
 
3
4
  /*
4
- * Studio: Mostra's quiet baseline theme. White and warm grey surfaces, near-black text, one blue
5
- * for the main action and focus, and a yellow `answer` reserved for what the person answered or
6
- * chose. Change any value; nothing depends on it.
5
+ * Studio: Mostra's default theme: the brand's palette, faces and shapes without its marks, quiet so the page's own content leads.
6
+ * Generated from @mostra/themes. Change any value; nothing depends on it.
7
7
  */
8
8
  :root {
9
- --background: oklch(1 0 0);
9
+ --font-sans: "Figtree", ui-sans-serif, system-ui, sans-serif;
10
+ --font-display: "Jost", ui-sans-serif, system-ui, sans-serif;
11
+ --font-mono: "Spline Sans Mono", ui-monospace, monospace;
12
+ --background: oklch(0.972 0.004 106.5);
10
13
  --foreground: oklch(0.191 0 0);
11
14
  --card: oklch(1 0 0);
12
15
  --card-foreground: oklch(0.191 0 0);
16
+ --popover: oklch(1 0 0);
17
+ --popover-foreground: oklch(0.191 0 0);
13
18
  --muted: oklch(0.972 0.004 106.5);
14
19
  --muted-foreground: oklch(0.466 0.008 106.7);
15
20
  --border: oklch(0.917 0.008 106.6);
16
- --input: oklch(0.88 0.009 106.6);
21
+ --input: oklch(0.64 0.009 106.6);
22
+ --ring: oklch(0.45 0.212 267);
17
23
  --primary: oklch(0.45 0.212 267);
18
24
  --primary-foreground: oklch(1 0 0);
19
25
  --secondary: oklch(0.957 0.004 106.5);
@@ -21,17 +27,17 @@
21
27
  --accent: oklch(0.959 0.015 273.9);
22
28
  --accent-foreground: oklch(0.37 0.173 267.5);
23
29
  --destructive: oklch(0.541 0.198 32);
30
+ --destructive-foreground: oklch(1 0 0);
24
31
  --success: oklch(0.513 0.111 161.3);
25
32
  --warning: oklch(0.528 0.109 82.4);
26
33
  --answer: oklch(0.814 0.167 83.9);
27
- --ring: oklch(0.45 0.212 267);
28
34
  --chart-1: oklch(0.45 0.212 267);
29
35
  --chart-2: oklch(0.627 0.201 33);
30
36
  --chart-3: oklch(0.559 0.192 301.5);
31
37
  --chart-4: oklch(0.561 0.121 160.3);
32
38
  --chart-5: oklch(0.651 0.135 80.9);
33
39
  --chart-6: oklch(0.586 0.176 358.8);
34
- --radius: 0.625rem;
40
+ --radius: 10px;
35
41
  }
36
42
 
37
43
  @media (prefers-color-scheme: dark) {
@@ -40,10 +46,13 @@
40
46
  --foreground: oklch(0.96 0.004 106.5);
41
47
  --card: oklch(0.205 0.008 274.5);
42
48
  --card-foreground: oklch(0.96 0.004 106.5);
49
+ --popover: oklch(0.205 0.008 274.5);
50
+ --popover-foreground: oklch(0.96 0.004 106.5);
43
51
  --muted: oklch(0.223 0.01 276.6);
44
52
  --muted-foreground: oklch(0.717 0.007 286.2);
45
53
  --border: oklch(0.29 0.011 278.2);
46
- --input: oklch(0.331 0.012 279.2);
54
+ --input: oklch(0.52 0.012 279.2);
55
+ --ring: oklch(0.662 0.18 272.8);
47
56
  --primary: oklch(0.662 0.18 272.8);
48
57
  --primary-foreground: oklch(0.165 0.009 274.3);
49
58
  --secondary: oklch(0.258 0.013 279);
@@ -51,10 +60,10 @@
51
60
  --accent: oklch(0.265 0.055 271.9);
52
61
  --accent-foreground: oklch(0.855 0.072 277);
53
62
  --destructive: oklch(0.706 0.188 32.9);
63
+ --destructive-foreground: oklch(0.165 0.009 274.3);
54
64
  --success: oklch(0.797 0.164 159.7);
55
65
  --warning: oklch(0.861 0.163 87.1);
56
66
  --answer: oklch(0.861 0.163 87.1);
57
- --ring: oklch(0.662 0.18 272.8);
58
67
  --chart-1: oklch(0.657 0.182 273.1);
59
68
  --chart-2: oklch(0.636 0.186 35.5);
60
69
  --chart-3: oklch(0.63 0.182 299);
@@ -69,6 +78,8 @@
69
78
  --color-foreground: var(--foreground);
70
79
  --color-card: var(--card);
71
80
  --color-card-foreground: var(--card-foreground);
81
+ --color-popover: var(--popover);
82
+ --color-popover-foreground: var(--popover-foreground);
72
83
  --color-muted: var(--muted);
73
84
  --color-muted-foreground: var(--muted-foreground);
74
85
  --color-border: var(--border);
@@ -80,6 +91,7 @@
80
91
  --color-accent: var(--accent);
81
92
  --color-accent-foreground: var(--accent-foreground);
82
93
  --color-destructive: var(--destructive);
94
+ --color-destructive-foreground: var(--destructive-foreground);
83
95
  --color-success: var(--success);
84
96
  --color-warning: var(--warning);
85
97
  --color-answer: var(--answer);
@@ -90,6 +102,9 @@
90
102
  --color-chart-4: var(--chart-4);
91
103
  --color-chart-5: var(--chart-5);
92
104
  --color-chart-6: var(--chart-6);
105
+ --font-sans: var(--font-sans);
106
+ --font-display: var(--font-display);
107
+ --font-mono: var(--font-mono);
93
108
  --radius-sm: calc(var(--radius) - 4px);
94
109
  --radius-md: calc(var(--radius) - 2px);
95
110
  --radius-lg: var(--radius);
@@ -104,12 +119,15 @@
104
119
  color-scheme: light dark;
105
120
  background: var(--background);
106
121
  color: var(--foreground);
122
+ font-family: var(--font-sans);
107
123
  -webkit-font-smoothing: antialiased;
108
124
  text-rendering: optimizeLegibility;
109
125
  }
110
126
  h1,
111
127
  h2,
112
128
  h3 {
129
+ font-family: var(--font-display);
130
+ letter-spacing: -0.015em;
113
131
  text-wrap: balance;
114
132
  }
115
133
  p {
@@ -1,19 +1,25 @@
1
1
  @import "tailwindcss";
2
+ @import "@mostra/themes/css/faces.css";
2
3
 
3
4
  /*
4
- * Studio: Mostra's quiet baseline theme. White and warm grey surfaces, near-black text, one blue
5
- * for the main action and focus, and a yellow `answer` reserved for what the person answered or
6
- * chose. Change any value; nothing depends on it.
5
+ * Studio: Mostra's default theme: the brand's palette, faces and shapes without its marks, quiet so the page's own content leads.
6
+ * Generated from @mostra/themes. Change any value; nothing depends on it.
7
7
  */
8
8
  :root {
9
- --background: oklch(1 0 0);
9
+ --font-sans: "Figtree", ui-sans-serif, system-ui, sans-serif;
10
+ --font-display: "Jost", ui-sans-serif, system-ui, sans-serif;
11
+ --font-mono: "Spline Sans Mono", ui-monospace, monospace;
12
+ --background: oklch(0.972 0.004 106.5);
10
13
  --foreground: oklch(0.191 0 0);
11
14
  --card: oklch(1 0 0);
12
15
  --card-foreground: oklch(0.191 0 0);
16
+ --popover: oklch(1 0 0);
17
+ --popover-foreground: oklch(0.191 0 0);
13
18
  --muted: oklch(0.972 0.004 106.5);
14
19
  --muted-foreground: oklch(0.466 0.008 106.7);
15
20
  --border: oklch(0.917 0.008 106.6);
16
- --input: oklch(0.88 0.009 106.6);
21
+ --input: oklch(0.64 0.009 106.6);
22
+ --ring: oklch(0.45 0.212 267);
17
23
  --primary: oklch(0.45 0.212 267);
18
24
  --primary-foreground: oklch(1 0 0);
19
25
  --secondary: oklch(0.957 0.004 106.5);
@@ -21,17 +27,17 @@
21
27
  --accent: oklch(0.959 0.015 273.9);
22
28
  --accent-foreground: oklch(0.37 0.173 267.5);
23
29
  --destructive: oklch(0.541 0.198 32);
30
+ --destructive-foreground: oklch(1 0 0);
24
31
  --success: oklch(0.513 0.111 161.3);
25
32
  --warning: oklch(0.528 0.109 82.4);
26
33
  --answer: oklch(0.814 0.167 83.9);
27
- --ring: oklch(0.45 0.212 267);
28
34
  --chart-1: oklch(0.45 0.212 267);
29
35
  --chart-2: oklch(0.627 0.201 33);
30
36
  --chart-3: oklch(0.559 0.192 301.5);
31
37
  --chart-4: oklch(0.561 0.121 160.3);
32
38
  --chart-5: oklch(0.651 0.135 80.9);
33
39
  --chart-6: oklch(0.586 0.176 358.8);
34
- --radius: 0.625rem;
40
+ --radius: 10px;
35
41
  }
36
42
 
37
43
  @media (prefers-color-scheme: dark) {
@@ -40,10 +46,13 @@
40
46
  --foreground: oklch(0.96 0.004 106.5);
41
47
  --card: oklch(0.205 0.008 274.5);
42
48
  --card-foreground: oklch(0.96 0.004 106.5);
49
+ --popover: oklch(0.205 0.008 274.5);
50
+ --popover-foreground: oklch(0.96 0.004 106.5);
43
51
  --muted: oklch(0.223 0.01 276.6);
44
52
  --muted-foreground: oklch(0.717 0.007 286.2);
45
53
  --border: oklch(0.29 0.011 278.2);
46
- --input: oklch(0.331 0.012 279.2);
54
+ --input: oklch(0.52 0.012 279.2);
55
+ --ring: oklch(0.662 0.18 272.8);
47
56
  --primary: oklch(0.662 0.18 272.8);
48
57
  --primary-foreground: oklch(0.165 0.009 274.3);
49
58
  --secondary: oklch(0.258 0.013 279);
@@ -51,10 +60,10 @@
51
60
  --accent: oklch(0.265 0.055 271.9);
52
61
  --accent-foreground: oklch(0.855 0.072 277);
53
62
  --destructive: oklch(0.706 0.188 32.9);
63
+ --destructive-foreground: oklch(0.165 0.009 274.3);
54
64
  --success: oklch(0.797 0.164 159.7);
55
65
  --warning: oklch(0.861 0.163 87.1);
56
66
  --answer: oklch(0.861 0.163 87.1);
57
- --ring: oklch(0.662 0.18 272.8);
58
67
  --chart-1: oklch(0.657 0.182 273.1);
59
68
  --chart-2: oklch(0.636 0.186 35.5);
60
69
  --chart-3: oklch(0.63 0.182 299);
@@ -69,6 +78,8 @@
69
78
  --color-foreground: var(--foreground);
70
79
  --color-card: var(--card);
71
80
  --color-card-foreground: var(--card-foreground);
81
+ --color-popover: var(--popover);
82
+ --color-popover-foreground: var(--popover-foreground);
72
83
  --color-muted: var(--muted);
73
84
  --color-muted-foreground: var(--muted-foreground);
74
85
  --color-border: var(--border);
@@ -80,6 +91,7 @@
80
91
  --color-accent: var(--accent);
81
92
  --color-accent-foreground: var(--accent-foreground);
82
93
  --color-destructive: var(--destructive);
94
+ --color-destructive-foreground: var(--destructive-foreground);
83
95
  --color-success: var(--success);
84
96
  --color-warning: var(--warning);
85
97
  --color-answer: var(--answer);
@@ -90,6 +102,9 @@
90
102
  --color-chart-4: var(--chart-4);
91
103
  --color-chart-5: var(--chart-5);
92
104
  --color-chart-6: var(--chart-6);
105
+ --font-sans: var(--font-sans);
106
+ --font-display: var(--font-display);
107
+ --font-mono: var(--font-mono);
93
108
  --radius-sm: calc(var(--radius) - 4px);
94
109
  --radius-md: calc(var(--radius) - 2px);
95
110
  --radius-lg: var(--radius);
@@ -104,12 +119,15 @@
104
119
  color-scheme: light dark;
105
120
  background: var(--background);
106
121
  color: var(--foreground);
122
+ font-family: var(--font-sans);
107
123
  -webkit-font-smoothing: antialiased;
108
124
  text-rendering: optimizeLegibility;
109
125
  }
110
126
  h1,
111
127
  h2,
112
128
  h3 {
129
+ font-family: var(--font-display);
130
+ letter-spacing: -0.015em;
113
131
  text-wrap: balance;
114
132
  }
115
133
  p {
@@ -1,19 +1,25 @@
1
1
  @import "tailwindcss";
2
+ @import "@mostra/themes/css/faces.css";
2
3
 
3
4
  /*
4
- * Studio: Mostra's quiet baseline theme. White and warm grey surfaces, near-black text, one blue
5
- * for the main action and focus, and a yellow `answer` reserved for what the person answered or
6
- * chose. Change any value; nothing depends on it.
5
+ * Studio: Mostra's default theme: the brand's palette, faces and shapes without its marks, quiet so the page's own content leads.
6
+ * Generated from @mostra/themes. Change any value; nothing depends on it.
7
7
  */
8
8
  :root {
9
- --background: oklch(1 0 0);
9
+ --font-sans: "Figtree", ui-sans-serif, system-ui, sans-serif;
10
+ --font-display: "Jost", ui-sans-serif, system-ui, sans-serif;
11
+ --font-mono: "Spline Sans Mono", ui-monospace, monospace;
12
+ --background: oklch(0.972 0.004 106.5);
10
13
  --foreground: oklch(0.191 0 0);
11
14
  --card: oklch(1 0 0);
12
15
  --card-foreground: oklch(0.191 0 0);
16
+ --popover: oklch(1 0 0);
17
+ --popover-foreground: oklch(0.191 0 0);
13
18
  --muted: oklch(0.972 0.004 106.5);
14
19
  --muted-foreground: oklch(0.466 0.008 106.7);
15
20
  --border: oklch(0.917 0.008 106.6);
16
- --input: oklch(0.88 0.009 106.6);
21
+ --input: oklch(0.64 0.009 106.6);
22
+ --ring: oklch(0.45 0.212 267);
17
23
  --primary: oklch(0.45 0.212 267);
18
24
  --primary-foreground: oklch(1 0 0);
19
25
  --secondary: oklch(0.957 0.004 106.5);
@@ -21,17 +27,17 @@
21
27
  --accent: oklch(0.959 0.015 273.9);
22
28
  --accent-foreground: oklch(0.37 0.173 267.5);
23
29
  --destructive: oklch(0.541 0.198 32);
30
+ --destructive-foreground: oklch(1 0 0);
24
31
  --success: oklch(0.513 0.111 161.3);
25
32
  --warning: oklch(0.528 0.109 82.4);
26
33
  --answer: oklch(0.814 0.167 83.9);
27
- --ring: oklch(0.45 0.212 267);
28
34
  --chart-1: oklch(0.45 0.212 267);
29
35
  --chart-2: oklch(0.627 0.201 33);
30
36
  --chart-3: oklch(0.559 0.192 301.5);
31
37
  --chart-4: oklch(0.561 0.121 160.3);
32
38
  --chart-5: oklch(0.651 0.135 80.9);
33
39
  --chart-6: oklch(0.586 0.176 358.8);
34
- --radius: 0.625rem;
40
+ --radius: 10px;
35
41
  }
36
42
 
37
43
  @media (prefers-color-scheme: dark) {
@@ -40,10 +46,13 @@
40
46
  --foreground: oklch(0.96 0.004 106.5);
41
47
  --card: oklch(0.205 0.008 274.5);
42
48
  --card-foreground: oklch(0.96 0.004 106.5);
49
+ --popover: oklch(0.205 0.008 274.5);
50
+ --popover-foreground: oklch(0.96 0.004 106.5);
43
51
  --muted: oklch(0.223 0.01 276.6);
44
52
  --muted-foreground: oklch(0.717 0.007 286.2);
45
53
  --border: oklch(0.29 0.011 278.2);
46
- --input: oklch(0.331 0.012 279.2);
54
+ --input: oklch(0.52 0.012 279.2);
55
+ --ring: oklch(0.662 0.18 272.8);
47
56
  --primary: oklch(0.662 0.18 272.8);
48
57
  --primary-foreground: oklch(0.165 0.009 274.3);
49
58
  --secondary: oklch(0.258 0.013 279);
@@ -51,10 +60,10 @@
51
60
  --accent: oklch(0.265 0.055 271.9);
52
61
  --accent-foreground: oklch(0.855 0.072 277);
53
62
  --destructive: oklch(0.706 0.188 32.9);
63
+ --destructive-foreground: oklch(0.165 0.009 274.3);
54
64
  --success: oklch(0.797 0.164 159.7);
55
65
  --warning: oklch(0.861 0.163 87.1);
56
66
  --answer: oklch(0.861 0.163 87.1);
57
- --ring: oklch(0.662 0.18 272.8);
58
67
  --chart-1: oklch(0.657 0.182 273.1);
59
68
  --chart-2: oklch(0.636 0.186 35.5);
60
69
  --chart-3: oklch(0.63 0.182 299);
@@ -69,6 +78,8 @@
69
78
  --color-foreground: var(--foreground);
70
79
  --color-card: var(--card);
71
80
  --color-card-foreground: var(--card-foreground);
81
+ --color-popover: var(--popover);
82
+ --color-popover-foreground: var(--popover-foreground);
72
83
  --color-muted: var(--muted);
73
84
  --color-muted-foreground: var(--muted-foreground);
74
85
  --color-border: var(--border);
@@ -80,6 +91,7 @@
80
91
  --color-accent: var(--accent);
81
92
  --color-accent-foreground: var(--accent-foreground);
82
93
  --color-destructive: var(--destructive);
94
+ --color-destructive-foreground: var(--destructive-foreground);
83
95
  --color-success: var(--success);
84
96
  --color-warning: var(--warning);
85
97
  --color-answer: var(--answer);
@@ -90,6 +102,9 @@
90
102
  --color-chart-4: var(--chart-4);
91
103
  --color-chart-5: var(--chart-5);
92
104
  --color-chart-6: var(--chart-6);
105
+ --font-sans: var(--font-sans);
106
+ --font-display: var(--font-display);
107
+ --font-mono: var(--font-mono);
93
108
  --radius-sm: calc(var(--radius) - 4px);
94
109
  --radius-md: calc(var(--radius) - 2px);
95
110
  --radius-lg: var(--radius);
@@ -104,12 +119,15 @@
104
119
  color-scheme: light dark;
105
120
  background: var(--background);
106
121
  color: var(--foreground);
122
+ font-family: var(--font-sans);
107
123
  -webkit-font-smoothing: antialiased;
108
124
  text-rendering: optimizeLegibility;
109
125
  }
110
126
  h1,
111
127
  h2,
112
128
  h3 {
129
+ font-family: var(--font-display);
130
+ letter-spacing: -0.015em;
113
131
  text-wrap: balance;
114
132
  }
115
133
  p {
@@ -1,19 +1,25 @@
1
1
  @import "tailwindcss";
2
+ @import "@mostra/themes/css/faces.css";
2
3
 
3
4
  /*
4
- * Studio: Mostra's quiet baseline theme. White and warm grey surfaces, near-black text, one blue
5
- * for the main action and focus, and a yellow `answer` reserved for what the person answered or
6
- * chose. Change any value; nothing depends on it.
5
+ * Studio: Mostra's default theme: the brand's palette, faces and shapes without its marks, quiet so the page's own content leads.
6
+ * Generated from @mostra/themes. Change any value; nothing depends on it.
7
7
  */
8
8
  :root {
9
- --background: oklch(1 0 0);
9
+ --font-sans: "Figtree", ui-sans-serif, system-ui, sans-serif;
10
+ --font-display: "Jost", ui-sans-serif, system-ui, sans-serif;
11
+ --font-mono: "Spline Sans Mono", ui-monospace, monospace;
12
+ --background: oklch(0.972 0.004 106.5);
10
13
  --foreground: oklch(0.191 0 0);
11
14
  --card: oklch(1 0 0);
12
15
  --card-foreground: oklch(0.191 0 0);
16
+ --popover: oklch(1 0 0);
17
+ --popover-foreground: oklch(0.191 0 0);
13
18
  --muted: oklch(0.972 0.004 106.5);
14
19
  --muted-foreground: oklch(0.466 0.008 106.7);
15
20
  --border: oklch(0.917 0.008 106.6);
16
- --input: oklch(0.88 0.009 106.6);
21
+ --input: oklch(0.64 0.009 106.6);
22
+ --ring: oklch(0.45 0.212 267);
17
23
  --primary: oklch(0.45 0.212 267);
18
24
  --primary-foreground: oklch(1 0 0);
19
25
  --secondary: oklch(0.957 0.004 106.5);
@@ -21,17 +27,17 @@
21
27
  --accent: oklch(0.959 0.015 273.9);
22
28
  --accent-foreground: oklch(0.37 0.173 267.5);
23
29
  --destructive: oklch(0.541 0.198 32);
30
+ --destructive-foreground: oklch(1 0 0);
24
31
  --success: oklch(0.513 0.111 161.3);
25
32
  --warning: oklch(0.528 0.109 82.4);
26
33
  --answer: oklch(0.814 0.167 83.9);
27
- --ring: oklch(0.45 0.212 267);
28
34
  --chart-1: oklch(0.45 0.212 267);
29
35
  --chart-2: oklch(0.627 0.201 33);
30
36
  --chart-3: oklch(0.559 0.192 301.5);
31
37
  --chart-4: oklch(0.561 0.121 160.3);
32
38
  --chart-5: oklch(0.651 0.135 80.9);
33
39
  --chart-6: oklch(0.586 0.176 358.8);
34
- --radius: 0.625rem;
40
+ --radius: 10px;
35
41
  }
36
42
 
37
43
  @media (prefers-color-scheme: dark) {
@@ -40,10 +46,13 @@
40
46
  --foreground: oklch(0.96 0.004 106.5);
41
47
  --card: oklch(0.205 0.008 274.5);
42
48
  --card-foreground: oklch(0.96 0.004 106.5);
49
+ --popover: oklch(0.205 0.008 274.5);
50
+ --popover-foreground: oklch(0.96 0.004 106.5);
43
51
  --muted: oklch(0.223 0.01 276.6);
44
52
  --muted-foreground: oklch(0.717 0.007 286.2);
45
53
  --border: oklch(0.29 0.011 278.2);
46
- --input: oklch(0.331 0.012 279.2);
54
+ --input: oklch(0.52 0.012 279.2);
55
+ --ring: oklch(0.662 0.18 272.8);
47
56
  --primary: oklch(0.662 0.18 272.8);
48
57
  --primary-foreground: oklch(0.165 0.009 274.3);
49
58
  --secondary: oklch(0.258 0.013 279);
@@ -51,10 +60,10 @@
51
60
  --accent: oklch(0.265 0.055 271.9);
52
61
  --accent-foreground: oklch(0.855 0.072 277);
53
62
  --destructive: oklch(0.706 0.188 32.9);
63
+ --destructive-foreground: oklch(0.165 0.009 274.3);
54
64
  --success: oklch(0.797 0.164 159.7);
55
65
  --warning: oklch(0.861 0.163 87.1);
56
66
  --answer: oklch(0.861 0.163 87.1);
57
- --ring: oklch(0.662 0.18 272.8);
58
67
  --chart-1: oklch(0.657 0.182 273.1);
59
68
  --chart-2: oklch(0.636 0.186 35.5);
60
69
  --chart-3: oklch(0.63 0.182 299);
@@ -69,6 +78,8 @@
69
78
  --color-foreground: var(--foreground);
70
79
  --color-card: var(--card);
71
80
  --color-card-foreground: var(--card-foreground);
81
+ --color-popover: var(--popover);
82
+ --color-popover-foreground: var(--popover-foreground);
72
83
  --color-muted: var(--muted);
73
84
  --color-muted-foreground: var(--muted-foreground);
74
85
  --color-border: var(--border);
@@ -80,6 +91,7 @@
80
91
  --color-accent: var(--accent);
81
92
  --color-accent-foreground: var(--accent-foreground);
82
93
  --color-destructive: var(--destructive);
94
+ --color-destructive-foreground: var(--destructive-foreground);
83
95
  --color-success: var(--success);
84
96
  --color-warning: var(--warning);
85
97
  --color-answer: var(--answer);
@@ -90,6 +102,9 @@
90
102
  --color-chart-4: var(--chart-4);
91
103
  --color-chart-5: var(--chart-5);
92
104
  --color-chart-6: var(--chart-6);
105
+ --font-sans: var(--font-sans);
106
+ --font-display: var(--font-display);
107
+ --font-mono: var(--font-mono);
93
108
  --radius-sm: calc(var(--radius) - 4px);
94
109
  --radius-md: calc(var(--radius) - 2px);
95
110
  --radius-lg: var(--radius);
@@ -104,12 +119,15 @@
104
119
  color-scheme: light dark;
105
120
  background: var(--background);
106
121
  color: var(--foreground);
122
+ font-family: var(--font-sans);
107
123
  -webkit-font-smoothing: antialiased;
108
124
  text-rendering: optimizeLegibility;
109
125
  }
110
126
  h1,
111
127
  h2,
112
128
  h3 {
129
+ font-family: var(--font-display);
130
+ letter-spacing: -0.015em;
113
131
  text-wrap: balance;
114
132
  }
115
133
  p {
@@ -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.13.0 mcp` where `mostra` isn't installed. Its configuration names that command, for example:
62
+ A client starts the server as `mostra mcp` over stdio, or `npx -y @mostra/cli@0.14.0 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.13.0", "mcp"] } } }
65
+ { "mcpServers": { "mostra": { "command": "npx", "args": ["-y", "@mostra/cli@0.14.0", "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.13.0",
3
+ "version": "0.14.0",
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,8 +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.13.0",
40
- "@mostra/protocol": "0.13.0",
39
+ "@mostra/mcp": "0.14.0",
40
+ "@mostra/protocol": "0.14.0",
41
+ "@mostra/themes": "0.14.0",
41
42
  "@tailwindcss/vite": "4.3.3",
42
43
  "@vitejs/plugin-react": "6.1.2",
43
44
  "better-sqlite3": "13.0.3",
@@ -60,11 +61,11 @@
60
61
  "@modelcontextprotocol/client": "2.4.0",
61
62
  "@modelcontextprotocol/conformance": "0.1.16",
62
63
  "@modelcontextprotocol/conformance-next": "npm:@modelcontextprotocol/conformance@0.2.0-alpha.12",
63
- "@mostra/shell": "0.13.0",
64
+ "@mostra/shell": "0.14.0",
64
65
  "@mostra/tools": "0.0.0",
65
- "@mostra/verify": "0.13.0",
66
+ "@mostra/verify": "0.14.0",
66
67
  "@mostra/warm": "0.0.0",
67
- "@mostra/worker": "0.13.0",
68
+ "@mostra/worker": "0.14.0",
68
69
  "@types/better-sqlite3": "9.6.0",
69
70
  "@types/node": "24.19.2",
70
71
  "@types/semver": "7.8.0",
@@ -6,8 +6,10 @@
6
6
  */
7
7
  import type { IncomingMessage } from "node:http";
8
8
  import type { HttpBindings } from "@hono/node-server";
9
- import type { Diagnostic, Refusal } from "@mostra/protocol";
9
+ import type { Refusal } from "@mostra/protocol";
10
10
  import { refusal } from "@mostra/protocol";
11
+ import type { Pages } from "@mostra/themes";
12
+ import { defaultPages, refusalDocument, themePageCsp } from "./theme.ts";
11
13
 
12
14
  /** The Hono environment of a listener: Node's request and response objects. */
13
15
  export type HttpEnv = { Bindings: HttpBindings };
@@ -97,16 +99,6 @@ export function wantsDocument(headers: Headers): boolean {
97
99
  return (headers.get("accept") ?? "").includes("text/html");
98
100
  }
99
101
 
100
- /** Escapes text for HTML. */
101
- function escapeHtml(text: string): string {
102
- return text.replace(/[&<>"']/g, (char) => `&#${char.charCodeAt(0)};`);
103
- }
104
-
105
- /** A plain page for a refused navigation: no scripts, no external resources. */
106
- function refusalPage(diagnostic: Diagnostic): string {
107
- return `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="referrer" content="no-referrer"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Mostra</title><style>body{font-family:system-ui,sans-serif;margin:0;min-height:100vh;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:.25rem;padding:2rem;text-align:center;color-scheme:light dark}h1{font-size:1.25rem;margin:0}p{margin:0;opacity:.8}code{opacity:.5;font-size:.75rem;margin-top:1rem}</style></head><body><h1>${escapeHtml(diagnostic.message)}</h1>${diagnostic.hint ? `<p>${escapeHtml(diagnostic.hint)}</p>` : ""}<code>${escapeHtml(diagnostic.code)}</code></body></html>`;
108
- }
109
-
110
102
  /** The response for a refusal: the diagnostic as JSON, or a plain page for a navigation. */
111
103
  export function refusalResponse(
112
104
  refused: Refusal & { readonly retryAfter?: number },
@@ -114,6 +106,8 @@ export function refusalResponse(
114
106
  readonly document: boolean;
115
107
  readonly method?: string;
116
108
  readonly frameAncestors?: string;
109
+ /** The server's own pages, in its operator's theme; Studio, named Mostra, by default. */
110
+ readonly pages?: Pages;
117
111
  },
118
112
  ): Response {
119
113
  const headers: Record<string, string> = { ...BASE_HEADERS, "cache-control": "no-store" };
@@ -122,14 +116,16 @@ export function refusalResponse(
122
116
  const head = options.method === "HEAD";
123
117
  if (options.document) {
124
118
  headers["content-type"] = "text/html; charset=utf-8";
125
- // The page has an inline style and nothing else; only the shell may frame it (on artifacts).
126
- headers["content-security-policy"] = [
127
- "default-src 'none'",
128
- "style-src 'unsafe-inline'",
129
- `frame-ancestors ${options.frameAncestors ?? "'none'"}`,
130
- "base-uri 'none'",
131
- ].join("; ");
132
- return new Response(head ? null : refusalPage(refused.diagnostic), {
119
+ // The page loads its theme's files from its own origin and runs nothing; only the shell may
120
+ // frame it (on artifacts).
121
+ const pages = options.pages ?? defaultPages().pages;
122
+ headers["content-security-policy"] = themePageCsp(pages, options.frameAncestors ?? "'none'");
123
+ const page = refusalDocument(pages, {
124
+ title: refused.diagnostic.message,
125
+ detail: refused.diagnostic.hint,
126
+ code: refused.diagnostic.code,
127
+ });
128
+ return new Response(head ? null : page, {
133
129
  status: refused.status,
134
130
  headers,
135
131
  });