@casys/mcp-fmi 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -67,6 +67,37 @@ docker build -t casys/mcp-fmi:0.1.0 .
67
67
  docker run --rm -p 3025:3025 -e MCP_BEARER_TOKEN=secret-token casys/mcp-fmi:0.1.0
68
68
  ```
69
69
 
70
+ ## Widgets (MCP Apps)
71
+
72
+ Results are shown as small, individual MCP App widgets, one reading each, never a dashboard. Each
73
+ widget is its own `ui://mcp-fmi/<widget>` resource and adapts to the width its host grants (a
74
+ Compose board snaps its resize handle between `supportedWidths`; a standalone host gets the widest).
75
+
76
+ | Widget (`ui://mcp-fmi/…`) | Kind | Shows | `supportedWidths` |
77
+ | ------------------------- | ----- | ----------------------------------------------------------------------------- | ----------------- |
78
+ | `fmu-verdict` | stat | PASS/FAIL of the simulation limits (or of the SysML contract), 1 to 3 numbers | 280, 380, 520 |
79
+ | `fmu-time-series` | chart | Main signal over time (temperature, or altitude for flight FMUs) vs its limit | 320, 460, 660 |
80
+ | `fmu-variables` | table | Final values of a simulation, or the variables of an inspected FMU | 340, 480, 680 |
81
+ | `fmu-checks` | table | Limit checks of a simulation, or SysML unit bindings of an inspected FMU | 340, 480, 680 |
82
+
83
+ Smallest width: the essential. Middle: the usual reading. Largest: the full detail of that one
84
+ thing, with a small provenance footer (engine, FMU and modelDescription.xml SHA-256, run window).
85
+ The verdict stat never carries a check matrix: that is the `fmu-checks` table. `fmi_inspect_fmu`,
86
+ `fmi_simulate_fmu` and `run_snippet` advertise `fmu-verdict` by default; a board selects another
87
+ widget for the same result by resource URI. Every successful `run_snippet` result also lists all the
88
+ widgets able to render it in `_meta["io.mcpview/views"]` (`name`, `resourceUri`, `title`,
89
+ `supportedWidths`), so a Code Mode program can show one receipt in several widgets with
90
+ `api.panel(receipt.id, { view: "fmu-checks" })`. `FMI_WIDGETS` (exported from `mod.ts`) lists URIs,
91
+ kinds and `supportedWidths` for a board to read:
92
+
93
+ ```ts
94
+ import { FMI_WIDGETS } from "jsr:@casys/mcp-fmi";
95
+ // { resourceUri: widget.uri, supportedWidths: widget.supportedWidths }
96
+ ```
97
+
98
+ Rebuild the committed single-file HTML with `deno task build:ui` (bundles against the published
99
+ `@mcpview/components`); `deno task check:ui:bundle` fails when a bundle is stale.
100
+
70
101
  ## Level-2 Code Mode snippets
71
102
 
72
103
  Connect `@casys/mcp-fmi` to any `@mcpview/compose/code-mode` host using `connectSnippetProviders`: