@mostra/cli 0.13.0 → 0.15.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 (58) hide show
  1. package/dist/bin.js +2 -2
  2. package/dist/{bootstrap-3_Tdfdg7.js → bootstrap-CYgyuZFk.js} +8 -4
  3. package/dist/bootstrap-CYgyuZFk.js.map +1 -0
  4. package/dist/bootstrap-DHnt5zU_.js +1 -0
  5. package/dist/index.d.ts +2 -0
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +2 -2
  8. package/dist/reference/cli.md +147 -5
  9. package/dist/reference/diagnostics.json +234 -0
  10. package/dist/reference/errors/MOSTRA_LICENSE_ACCEPT_INVALID.md +23 -0
  11. package/dist/reference/errors/MOSTRA_LICENSE_MISMATCH.md +23 -0
  12. package/dist/reference/errors/MOSTRA_LICENSE_UNACCEPTED.md +23 -0
  13. package/dist/reference/errors/MOSTRA_LICENSE_UNDECLARED.md +23 -0
  14. package/dist/reference/errors/MOSTRA_PACK_ADDRESS_INVALID.md +23 -0
  15. package/dist/reference/errors/MOSTRA_PACK_CSS_UNIMPORTED.md +23 -0
  16. package/dist/reference/errors/MOSTRA_PACK_FETCH_FAILED.md +23 -0
  17. package/dist/reference/errors/MOSTRA_PACK_FILE_EXISTS.md +23 -0
  18. package/dist/reference/errors/MOSTRA_PACK_ITEM_INVALID.md +23 -0
  19. package/dist/reference/errors/MOSTRA_PACK_ITEM_NOT_FOUND.md +23 -0
  20. package/dist/reference/errors/MOSTRA_PACK_NOT_APPLIED.md +23 -0
  21. package/dist/reference/errors/MOSTRA_PACK_OFFLINE.md +23 -0
  22. package/dist/reference/errors/MOSTRA_PACK_TARGET_INVALID.md +23 -0
  23. package/dist/reference/errors/MOSTRA_PLUGIN_CONFLICT.md +23 -0
  24. package/dist/reference/errors/MOSTRA_PLUGIN_CONTRACT_UNSUPPORTED.md +23 -0
  25. package/dist/reference/errors/MOSTRA_PLUGIN_ENTRY_INVALID.md +23 -0
  26. package/dist/reference/errors/MOSTRA_PLUGIN_EXPORTER_UNKNOWN.md +23 -0
  27. package/dist/reference/errors/MOSTRA_PLUGIN_FAILED.md +23 -0
  28. package/dist/reference/errors/MOSTRA_PLUGIN_MANIFEST_INVALID.md +23 -0
  29. package/dist/reference/errors/MOSTRA_PLUGIN_MANIFEST_WARNING.md +23 -0
  30. package/dist/reference/errors/MOSTRA_PLUGIN_NOT_A_PLUGIN.md +23 -0
  31. package/dist/reference/errors/MOSTRA_PLUGIN_NOT_INSTALLED.md +23 -0
  32. package/dist/reference/errors/MOSTRA_PLUGIN_OPTIONS_INVALID.md +23 -0
  33. package/dist/reference/errors/MOSTRA_PLUGIN_PLATFORM_UNSUPPORTED.md +23 -0
  34. package/dist/reference/errors/MOSTRA_PLUGIN_SCOPE_INVALID.md +23 -0
  35. package/dist/reference/errors/MOSTRA_PLUGIN_SHADOWED.md +23 -0
  36. package/dist/reference/self-hosting.md +1 -0
  37. package/dist/{run-CtR0PFMj.js → run-BsUzIBQj.js} +437 -29
  38. package/dist/run-BsUzIBQj.js.map +1 -0
  39. package/dist/run-c8U3GkBy.js +1 -0
  40. package/dist/skill/SKILL.md +4 -2
  41. package/dist/skill/assets/examples/dashboard/styles.css +27 -9
  42. package/dist/skill/assets/examples/decision/styles.css +27 -9
  43. package/dist/skill/assets/examples/inbox/styles.css +27 -9
  44. package/dist/skill/assets/studio.css +27 -9
  45. package/dist/skill/references/mcp.md +2 -2
  46. package/dist/skill/references/plugins.md +51 -0
  47. package/package.json +7 -5
  48. package/src/command.ts +2 -0
  49. package/src/commands/authoring.ts +129 -18
  50. package/src/commands/index.ts +14 -3
  51. package/src/commands/plugins.ts +219 -0
  52. package/src/exit.ts +7 -0
  53. package/src/plugin-commands.ts +170 -0
  54. package/src/run.ts +64 -4
  55. package/dist/bootstrap-3_Tdfdg7.js.map +0 -1
  56. package/dist/bootstrap-C9a2gSWf.js +0 -1
  57. package/dist/run-CtR0PFMj.js.map +0 -1
  58. package/dist/run-NWeQcyh9.js +0 -1
@@ -0,0 +1 @@
1
+ export { t as run } from "./run-BsUzIBQj.js";
@@ -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.15.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.15.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
 
@@ -79,6 +79,7 @@ Each step ends when its check holds. Don't hand a link out before step 4 passes.
79
79
  | Show who answered, who is here, who changed what | `useRespondents()`, `usePresence({ cursor })`, a shared field's `meta.updatedBy` | [teams.md](references/teams.md) |
80
80
  | Several pages, packages, MDX, images | `pages/`, any npm import, `index.mdx`, `public/` | [page.md](references/page.md) |
81
81
  | Charts, tables, animation, UI primitives | the preinstalled libraries | [libraries.md](references/libraries.md) |
82
+ | Someone else's component, exporter or command | `mostra add <item>` (shadcn registry items), `mostra plugin add <package>` | [plugins.md](references/plugins.md) |
82
83
 
83
84
  ## Rules verify enforces
84
85
 
@@ -119,6 +120,7 @@ Read the one you need when you need it.
119
120
  | [references/sharing.md](references/sharing.md) | Someone other than the person at this machine opens it, or on another device |
120
121
  | [references/teams.md](references/teams.md) | Several people answer it or work on it together: personal links, waiting for everyone, who is here |
121
122
  | [references/libraries.md](references/libraries.md) | Using charts, tables, motion or UI primitives, or an import fails |
123
+ | [references/plugins.md](references/plugins.md) | Adding a shadcn registry item or a plugin, a license asks for an acknowledgment, or you write a plugin |
122
124
  | [references/mcp.md](references/mcp.md) | You work through Mostra's tools (`artifact_create` and the rest) instead of the `mostra` command |
123
125
 
124
126
  Three complete artifacts that pass verify, to copy from: [assets/examples/decision/](assets/examples/decision/) (a choice with a reason), [assets/examples/inbox/](assets/examples/inbox/) (drafted replies with real Send actions) and [assets/examples/dashboard/](assets/examples/dashboard/) (live data and a shared list). The same guide is `mostra docs guide`, and each reference `mostra docs guide/<name>`.
@@ -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.15.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.15.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.
@@ -0,0 +1,51 @@
1
+ # Plugins and packs: other people's components, exporters and commands
2
+
3
+ Two kinds of extension reach an artifact. A **pack** is source you copy in: a shadcn registry item (a component, a block, a hook), whose files become the artifact's own and are yours to edit. A **plugin** is an npm package with a `"mostra"` manifest that Mostra loads: an exporter, a CLI command, an engine a component mounts, a verify check. Both install into one artifact and are recorded in its lockfile, so its versions carry them.
4
+
5
+ ## Contents
6
+
7
+ - Copy an item in: `mostra add`
8
+ - Install a plugin: `mostra plugin add`
9
+ - Licenses that need an acknowledgment
10
+ - Use what a plugin contributes
11
+ - Write a plugin
12
+
13
+ ## Copy an item in: `mostra add`
14
+
15
+ `mostra add` takes shadcn's addresses as well as npm packages, and installs any shadcn registry item as shadcn would:
16
+
17
+ | Address | Example |
18
+ |---|---|
19
+ | An item's URL | `mostra add https://ui.shadcn.com/r/styles/new-york-v4/login-01.json --artifact <dir>` |
20
+ | A GitHub repository's registry | `mostra add acme/ui/date-field#v1.2.0 --artifact <dir>` |
21
+ | A namespace `components.json` registers | `mostra add @acme/date-field --artifact <dir>` |
22
+ | A local item | `mostra add ./items/date-field.json --artifact <dir>` |
23
+ | A pack an installed plugin carries | `mostra add plugin:mostra-pack-acme/date-field --artifact <dir>` |
24
+
25
+ The item's registry dependencies come with it, its files land where shadcn puts them (`components/ui/`, `components/`, `lib/`, `hooks/`, or its `target`), its npm packages join the lockfile, and its CSS joins the stylesheet your entry imports. Nothing is written until every file is checked. A file you already have with other content stops the install: add `--overwrite` to replace it. A page item (`registry:page`) lands in `pages/` when the artifact has one. *Done when* the files are listed in the output and `mostra verify <dir>` passes with them imported.
26
+
27
+ Read the notes `mostra add` prints. An item's environment variables become secrets (`mostra secret set NAME --artifact <dir>`), and a stylesheet your entry doesn't import yet needs its `import "./styles.css";`.
28
+
29
+ ## Install a plugin: `mostra plugin add`
30
+
31
+ ```sh
32
+ mostra plugin add mostra-plugin-pdf --artifact <dir>
33
+ mostra plugin list --artifact <dir>
34
+ mostra plugin remove mostra-plugin-pdf --artifact <dir>
35
+ ```
36
+
37
+ Mostra checks each plugin before it records anything: the contract versions it needs are ones this release implements, no other plugin of the artifact contributes the same ID, every entry exports a definition stamped with its contract, and every license it brings is disclosed. `verify` and `publish` check the artifact's plugins again, so a plugin this release can't load is reported before a version is made. A plugin of only exporters and CLI commands may be installed for every artifact of the home with `--global` in place of `--artifact`.
38
+
39
+ ## Licenses that need an acknowledgment
40
+
41
+ An install that brings a source-available or proprietary license, or one Mostra can't read, stops with `MOSTRA_LICENSE_UNACCEPTED`, naming each license, its class and the packages under it. That is disclosure, not a refusal: tell the person what the license asks (its summary and link are in the message) and, once they agree, repeat the command the diagnostic's fix gives, with `--accept-license <id>` for each license. The acknowledgment is recorded in the artifact's lockfile and needs no repeat. A `mostra add <package>` that upgrades a plugin, or changes what one depends on, is checked the same way and takes the same flag. A host may accept licenses for its home, in which case none of this stops you. OSI-approved, public-domain and other free licenses need nothing.
42
+
43
+ ## Use what a plugin contributes
44
+
45
+ - An exporter: `mostra export <dir> --as <id> --out <path>`, with `--option name=value` for each option its schema takes (a value is read as JSON when it parses).
46
+ - A CLI command: run `mostra` followed by its words, from the artifact's directory (or anywhere, for the home's plugins). `mostra plugin list` names each one.
47
+ - An engine, an anchor provider or a connector: import the plugin's package in the page or in `live.ts`, as its README shows.
48
+
49
+ ## Write a plugin
50
+
51
+ A plugin is an npm package whose `package.json` has a `"mostra"` manifest and whose entries export what one of the contract packages' `define*` functions returns: `@mostra/contract-exporter`, `-cli-command`, `-connector`, `-embed-engine`, `-anchor-provider` or `-verify-check`. Each package's README has a complete example. `mostra plugin validate <dir>` reports every problem with its place in `package.json`. *Done when* it says `valid`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mostra/cli",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "description": "The mostra command: author, verify, publish, share and wait on agent artifacts, as a thin client of the Mostra host protocol.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "The Mostra Authors",
@@ -36,16 +36,18 @@
36
36
  "dependencies": {
37
37
  "@hono/node-server": "2.1.5",
38
38
  "@modelcontextprotocol/server": "2.4.0",
39
- "@mostra/mcp": "0.13.0",
40
- "@mostra/protocol": "0.13.0",
41
- "@mostra/sdk": "0.13.0",
39
+ "@mostra/mcp": "0.15.0",
40
+ "@mostra/protocol": "0.15.0",
41
+ "@mostra/sdk": "0.15.0",
42
42
  "zod": "4.6.7"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@modelcontextprotocol/client": "2.4.0",
46
46
  "@modelcontextprotocol/conformance": "0.1.16",
47
47
  "@modelcontextprotocol/conformance-next": "npm:@modelcontextprotocol/conformance@0.2.0-alpha.12",
48
- "@mostra/runtime": "0.13.0",
48
+ "@mostra/contract-cli-command": "0.1.0",
49
+ "@mostra/contract-exporter": "0.1.0",
50
+ "@mostra/runtime": "0.15.0",
49
51
  "@mostra/tools": "0.0.0",
50
52
  "@types/node": "24.19.2",
51
53
  "tsdown": "0.23.1",
package/src/command.ts CHANGED
@@ -142,6 +142,8 @@ export interface CommandDef {
142
142
  * function of its flags, when it runs on someone's behalf (`mcp --embedded`, D148).
143
143
  */
144
144
  readonly quiet?: boolean | ((flags: CommandContext["flags"]) => boolean);
145
+ /** The name telemetry records for it, when not its words: `plugin` for a plugin's command. */
146
+ readonly telemetryName?: string;
145
147
  /** Does the command's work. */
146
148
  run(context: CommandContext): Promise<CommandOutcome>;
147
149
  }