@mostra/runtime 0.14.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.
Files changed (61) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/child-protocol-CPXR6pMu.js +13 -0
  3. package/dist/child-protocol-CPXR6pMu.js.map +1 -0
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/{instance-CFTw3g-c.js → instance-Bw1BxctF.js} +2581 -189
  7. package/dist/instance-Bw1BxctF.js.map +1 -0
  8. package/dist/plugins/child/host.d.ts +1 -0
  9. package/dist/plugins/child/host.js +165 -0
  10. package/dist/plugins/child/host.js.map +1 -0
  11. package/dist/reference/cli.md +147 -5
  12. package/dist/reference/diagnostics.json +234 -0
  13. package/dist/reference/errors/MOSTRA_LICENSE_ACCEPT_INVALID.md +23 -0
  14. package/dist/reference/errors/MOSTRA_LICENSE_MISMATCH.md +23 -0
  15. package/dist/reference/errors/MOSTRA_LICENSE_UNACCEPTED.md +23 -0
  16. package/dist/reference/errors/MOSTRA_LICENSE_UNDECLARED.md +23 -0
  17. package/dist/reference/errors/MOSTRA_PACK_ADDRESS_INVALID.md +23 -0
  18. package/dist/reference/errors/MOSTRA_PACK_CSS_UNIMPORTED.md +23 -0
  19. package/dist/reference/errors/MOSTRA_PACK_FETCH_FAILED.md +23 -0
  20. package/dist/reference/errors/MOSTRA_PACK_FILE_EXISTS.md +23 -0
  21. package/dist/reference/errors/MOSTRA_PACK_ITEM_INVALID.md +23 -0
  22. package/dist/reference/errors/MOSTRA_PACK_ITEM_NOT_FOUND.md +23 -0
  23. package/dist/reference/errors/MOSTRA_PACK_NOT_APPLIED.md +23 -0
  24. package/dist/reference/errors/MOSTRA_PACK_OFFLINE.md +23 -0
  25. package/dist/reference/errors/MOSTRA_PACK_TARGET_INVALID.md +23 -0
  26. package/dist/reference/errors/MOSTRA_PLUGIN_CONFLICT.md +23 -0
  27. package/dist/reference/errors/MOSTRA_PLUGIN_CONTRACT_UNSUPPORTED.md +23 -0
  28. package/dist/reference/errors/MOSTRA_PLUGIN_ENTRY_INVALID.md +23 -0
  29. package/dist/reference/errors/MOSTRA_PLUGIN_EXPORTER_UNKNOWN.md +23 -0
  30. package/dist/reference/errors/MOSTRA_PLUGIN_FAILED.md +23 -0
  31. package/dist/reference/errors/MOSTRA_PLUGIN_MANIFEST_INVALID.md +23 -0
  32. package/dist/reference/errors/MOSTRA_PLUGIN_MANIFEST_WARNING.md +23 -0
  33. package/dist/reference/errors/MOSTRA_PLUGIN_NOT_A_PLUGIN.md +23 -0
  34. package/dist/reference/errors/MOSTRA_PLUGIN_NOT_INSTALLED.md +23 -0
  35. package/dist/reference/errors/MOSTRA_PLUGIN_OPTIONS_INVALID.md +23 -0
  36. package/dist/reference/errors/MOSTRA_PLUGIN_PLATFORM_UNSUPPORTED.md +23 -0
  37. package/dist/reference/errors/MOSTRA_PLUGIN_SCOPE_INVALID.md +23 -0
  38. package/dist/reference/errors/MOSTRA_PLUGIN_SHADOWED.md +23 -0
  39. package/dist/skill/SKILL.md +4 -2
  40. package/dist/skill/references/mcp.md +2 -2
  41. package/dist/skill/references/plugins.md +51 -0
  42. package/package.json +10 -7
  43. package/src/deps/index.ts +407 -90
  44. package/src/deps/installer.ts +53 -10
  45. package/src/deps/lock.ts +74 -2
  46. package/src/home/settings.ts +3 -0
  47. package/src/instance/index.ts +57 -0
  48. package/src/packs/index.ts +7 -0
  49. package/src/packs/methods.ts +49 -0
  50. package/src/packs/packs.ts +706 -0
  51. package/src/packs/read.ts +759 -0
  52. package/src/platform/index.ts +1 -0
  53. package/src/platform/shell.ts +14 -0
  54. package/src/plugins/child/host.ts +231 -0
  55. package/src/plugins/child-protocol.ts +68 -0
  56. package/src/plugins/index.ts +7 -0
  57. package/src/plugins/location.ts +109 -0
  58. package/src/plugins/methods.ts +269 -0
  59. package/src/plugins/plugins.ts +1396 -0
  60. package/src/publish/publisher.ts +71 -3
  61. package/dist/instance-CFTw3g-c.js.map +0 -1
@@ -0,0 +1,23 @@
1
+ ---
2
+ code: MOSTRA_PLUGIN_ENTRY_INVALID
3
+ severity: error
4
+ phase: contract
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_PLUGIN_ENTRY_INVALID
10
+
11
+ Plugin entry doesn't load. Severity: error. Phase: contract.
12
+
13
+ ## What it means
14
+
15
+ A contribution's `entry` module is missing from the package, leaves it, failed to load, or doesn't export (at `export`, `default` when absent) a definition stamped by the contract's blueprint (`defineExporter`, `defineCliCommand` …) with the ID the manifest gives. Mostra reads the stamp from the loaded object itself, in a child process of the instance, so a manifest alone can't claim a contract. Contributions that run in the page (embed engines, anchor providers) are checked when the page uses them.
16
+
17
+ ## How to fix it
18
+
19
+ Build the plugin so the module exists, export the value its `define*` function returns, and keep the manifest's ID equal to the definition's. Then run `mostra plugin validate <dir>`.
20
+
21
+ ## Hint
22
+
23
+ Fix the module the message names so it exports the definition its contract's define function returns.
@@ -0,0 +1,23 @@
1
+ ---
2
+ code: MOSTRA_PLUGIN_EXPORTER_UNKNOWN
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_PLUGIN_EXPORTER_UNKNOWN
10
+
11
+ No such exporter. Severity: error. Phase: host.
12
+
13
+ ## What it means
14
+
15
+ `mostra export <artifact> --as <id> --out <path>` names an exporter that neither Mostra builds in nor any plugin of the artifact or the home contributes. The message lists every exporter available for the artifact.
16
+
17
+ ## How to fix it
18
+
19
+ Pick an exporter from the list, or install a plugin that contributes it: `mostra plugin add <package> --artifact <path>`.
20
+
21
+ ## Hint
22
+
23
+ Use one of the exporters the message lists, or add a plugin that contributes this one.
@@ -0,0 +1,23 @@
1
+ ---
2
+ code: MOSTRA_PLUGIN_FAILED
3
+ severity: error
4
+ phase: runtime
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_PLUGIN_FAILED
10
+
11
+ Plugin failed. Severity: error. Phase: runtime.
12
+
13
+ ## What it means
14
+
15
+ A plugin's contribution threw, returned something its contract doesn't allow (a file outside the export, a result that isn't JSON), or ran past its time limit while Mostra ran it. It runs in a child process of the instance, so the instance and other artifacts are unaffected; nothing it returned was kept.
16
+
17
+ ## How to fix it
18
+
19
+ Fix the contribution if it is your plugin; otherwise update or remove it (`mostra plugin remove`).
20
+
21
+ ## Hint
22
+
23
+ Read the plugin's error in the message and report it to the plugin's author if it isn't yours to fix.
@@ -0,0 +1,23 @@
1
+ ---
2
+ code: MOSTRA_PLUGIN_MANIFEST_INVALID
3
+ severity: error
4
+ phase: manifest
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_PLUGIN_MANIFEST_INVALID
10
+
11
+ Plugin manifest invalid. Severity: error. Phase: manifest.
12
+
13
+ ## What it means
14
+
15
+ A field of the plugin's manifest, the `"mostra"` key of its `package.json`, isn't one Mostra can load: a required field is missing, a value has the wrong form, a contribution kind has no contract range, an ID is contributed twice, a command would take one of `mostra`'s own words, or a license isn't an SPDX expression. The location points at the field, and `mostra plugin validate` reports every one at once.
16
+
17
+ ## How to fix it
18
+
19
+ Correct the field (the message says what it expects) and validate again. The manifest's shape is published as JSON Schema in `@mostra/protocol/schemas/plugin-manifest.schema.json`.
20
+
21
+ ## Hint
22
+
23
+ Fix the field this diagnostic names in the plugin's package.json, then run `mostra plugin validate` again.
@@ -0,0 +1,23 @@
1
+ ---
2
+ code: MOSTRA_PLUGIN_MANIFEST_WARNING
3
+ severity: warning
4
+ phase: manifest
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_PLUGIN_MANIFEST_WARNING
10
+
11
+ Plugin manifest questionable. Severity: warning. Phase: manifest.
12
+
13
+ ## What it means
14
+
15
+ The plugin's manifest has something this Mostra release loads around: a key it doesn't know, an effect or a system it doesn't know, or a contract declared with nothing contributed to it. Manifests grow additively, so a newer plugin may carry keys an older Mostra skips; a misspelled key is skipped the same way, which can leave a contribution or a license undeclared.
16
+
17
+ ## How to fix it
18
+
19
+ Correct the field if it is a mistake. If it is something a newer Mostra reads, nothing is needed.
20
+
21
+ ## Hint
22
+
23
+ Check the field this diagnostic names; Mostra loads the plugin and ignores what it doesn't know.
@@ -0,0 +1,23 @@
1
+ ---
2
+ code: MOSTRA_PLUGIN_NOT_A_PLUGIN
3
+ severity: error
4
+ phase: manifest
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_PLUGIN_NOT_A_PLUGIN
10
+
11
+ Not a Mostra plugin. Severity: error. Phase: manifest.
12
+
13
+ ## What it means
14
+
15
+ The package has no `"mostra"` key in its `package.json`, so it contributes nothing Mostra could load. `mostra plugin add` installs only plugins; ordinary npm packages go through `mostra add`.
16
+
17
+ ## How to fix it
18
+
19
+ Run `mostra add <package> --artifact <path>` for an ordinary package. For a plugin you write, add the manifest (`mostra docs guide/plugins`) and run `mostra plugin validate`.
20
+
21
+ ## Hint
22
+
23
+ Add the package with `mostra add` if it is an ordinary package, or give it a "mostra" manifest if it is a plugin.
@@ -0,0 +1,23 @@
1
+ ---
2
+ code: MOSTRA_PLUGIN_NOT_INSTALLED
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_PLUGIN_NOT_INSTALLED
10
+
11
+ Plugin not installed. Severity: error. Phase: host.
12
+
13
+ ## What it means
14
+
15
+ The package isn't one of the plugins of the artifact (or of the home) the call names, so there is nothing to remove.
16
+
17
+ ## How to fix it
18
+
19
+ List the scope's plugins with `mostra plugin list --artifact <path>` (or `--global`) and use a name from it.
20
+
21
+ ## Hint
22
+
23
+ Check the package name against `mostra plugin list`.
@@ -0,0 +1,23 @@
1
+ ---
2
+ code: MOSTRA_PLUGIN_OPTIONS_INVALID
3
+ severity: error
4
+ phase: contract
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_PLUGIN_OPTIONS_INVALID
10
+
11
+ Exporter options invalid. Severity: error. Phase: contract.
12
+
13
+ ## What it means
14
+
15
+ The options given to a plugin's exporter don't fit the JSON Schema its definition declares (`options`), or it declares none and was given some. Mostra checks them in the plugin's child before the exporter runs, so nothing was exported.
16
+
17
+ ## How to fix it
18
+
19
+ Read the exporter's options in its plugin's documentation (`mostra plugin list` names the plugin), and run `mostra export <artifact> --as <exporter> --out <path> --option name=value` with them. A value that reads as JSON (`3`, `true`, `["a"]`) is passed as that value, anything else as text.
20
+
21
+ ## Hint
22
+
23
+ Give the options the exporter's schema asks for, each as `--option name=value`.
@@ -0,0 +1,23 @@
1
+ ---
2
+ code: MOSTRA_PLUGIN_PLATFORM_UNSUPPORTED
3
+ severity: warning
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_PLUGIN_PLATFORM_UNSUPPORTED
10
+
11
+ Plugin doesn't name this system. Severity: warning. Phase: platform.
12
+
13
+ ## What it means
14
+
15
+ The plugin's manifest lists the systems it runs on (`platforms`), and this one isn't among them. Mostra installs it anyway (it adds no capability limits), and says so, since its exporters, checks, connectors or commands may fail here.
16
+
17
+ ## How to fix it
18
+
19
+ Use the plugin on a system it lists, or ask its author to support this one.
20
+
21
+ ## Hint
22
+
23
+ Expect the plugin's Node.js parts to fail here, or use a plugin that supports this system.
@@ -0,0 +1,23 @@
1
+ ---
2
+ code: MOSTRA_PLUGIN_SCOPE_INVALID
3
+ severity: error
4
+ phase: contract
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_PLUGIN_SCOPE_INVALID
10
+
11
+ Plugin can't be installed there. Severity: error. Phase: contract.
12
+
13
+ ## What it means
14
+
15
+ Plugins are installed for one artifact (recorded in its lockfile, part of its versions) or, when they contribute only exporters and CLI commands, for the whole home (ROUND-3 §6.4). This plugin contributes something that changes what an artifact's version is (an embed engine, a verify check, an anchor provider, a connector or a pack), so it can't be installed for the home; or the call named both scopes or neither.
16
+
17
+ ## How to fix it
18
+
19
+ Run `mostra plugin add <package> --artifact <path>` for each artifact that uses it.
20
+
21
+ ## Hint
22
+
23
+ Install the plugin for an artifact with `--artifact`, or pass exactly one of `--artifact` and `--global`.
@@ -0,0 +1,23 @@
1
+ ---
2
+ code: MOSTRA_PLUGIN_SHADOWED
3
+ severity: warning
4
+ phase: contract
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_PLUGIN_SHADOWED
10
+
11
+ Plugin contribution shadowed. Severity: warning. Phase: contract.
12
+
13
+ ## What it means
14
+
15
+ An artifact's plugin and one of the home's (`--global`) contribute the same exporter or CLI command. Nothing is refused: in this artifact its own plugin's contribution is used, and the home's everywhere else. A home install never breaks an artifact that worked.
16
+
17
+ ## How to fix it
18
+
19
+ Nothing is needed when the artifact's own contribution is the one it should use. Otherwise remove it from the artifact (`mostra plugin remove <package> --artifact <path>`), and the home's is used.
20
+
21
+ ## Hint
22
+
23
+ Remove one of the two plugins if the artifact should use the other's contribution.
@@ -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.14.0"
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.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.
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
 
@@ -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>`.
@@ -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.14.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.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.14.0", "mcp"] } } }
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.
@@ -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/runtime",
3
- "version": "0.14.0",
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.14.0",
40
- "@mostra/protocol": "0.14.0",
41
- "@mostra/themes": "0.14.0",
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",
@@ -52,6 +52,7 @@
52
52
  "semver": "7.8.5",
53
53
  "tailwindcss": "4.3.3",
54
54
  "typescript": "7.0.2",
55
+ "undici": "8.12.3",
55
56
  "vite": "8.3.4",
56
57
  "ws": "8.22.0",
57
58
  "yaml": "2.9.1",
@@ -61,11 +62,13 @@
61
62
  "@modelcontextprotocol/client": "2.4.0",
62
63
  "@modelcontextprotocol/conformance": "0.1.16",
63
64
  "@modelcontextprotocol/conformance-next": "npm:@modelcontextprotocol/conformance@0.2.0-alpha.12",
64
- "@mostra/shell": "0.14.0",
65
+ "@mostra/contract-cli-command": "0.1.0",
66
+ "@mostra/contract-exporter": "0.1.0",
67
+ "@mostra/shell": "0.15.1",
65
68
  "@mostra/tools": "0.0.0",
66
- "@mostra/verify": "0.14.0",
69
+ "@mostra/verify": "0.15.1",
67
70
  "@mostra/warm": "0.0.0",
68
- "@mostra/worker": "0.14.0",
71
+ "@mostra/worker": "0.15.1",
69
72
  "@types/better-sqlite3": "9.6.0",
70
73
  "@types/node": "24.19.2",
71
74
  "@types/semver": "7.8.0",