@casys/mcp-openems 0.1.0 → 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 +43 -0
- package/THIRD_PARTY_NOTICES.txt +1096 -0
- package/mcp-openems.mjs +127 -12
- package/package.json +2 -2
- package/ui-dist/rf-case/index.html +3713 -0
- package/ui-dist/rf-gates/index.html +3713 -0
- package/ui-dist/rf-margin/index.html +3713 -0
- package/ui-dist/rf-verdict/index.html +3713 -0
package/README.md
CHANGED
|
@@ -31,3 +31,46 @@ npx @casys/mcp-openems --port=3030
|
|
|
31
31
|
|
|
32
32
|
Both need a local openEMS build with its Python bindings (`openEMS`, `CSXCAD`, `numpy`) on the host;
|
|
33
33
|
the Docker image above ships one.
|
|
34
|
+
|
|
35
|
+
## Widgets
|
|
36
|
+
|
|
37
|
+
Results are shown as small, individual MCP App widgets, one reading each, never a dashboard. Each
|
|
38
|
+
widget is its own `ui://mcp-openems/<widget>` resource and adapts to the width its host grants (a
|
|
39
|
+
Compose board snaps its resize handle between `supportedWidths`; a standalone host gets the widest).
|
|
40
|
+
They work for both solver results (blade antenna and radome).
|
|
41
|
+
|
|
42
|
+
| Widget (`ui://mcp-openems/…`) | Kind | Shows | `supportedWidths` |
|
|
43
|
+
| ----------------------------- | ----- | -------------------------------------------------------------------------- | ----------------- |
|
|
44
|
+
| `rf-verdict` | stat | PASS or FAIL with 1 to 3 headline numbers (S11, VSWR, or insertion loss) | 280, 380, 520 |
|
|
45
|
+
| `rf-gates` | table | Each qualification gate: requirement, reported value, pass or fail | 320, 440, 600 |
|
|
46
|
+
| `rf-margin` | chart | Each gated quantity as a marker against its limit (-10 dB, 2, 1.5 dB) | 320, 440, 640 |
|
|
47
|
+
| `rf-case` | table | Solver results, then inputs and numerics of the case, one row per quantity | 340, 480, 680 |
|
|
48
|
+
|
|
49
|
+
Smallest width: the essential. Middle: the usual reading. Largest: the full detail of that one
|
|
50
|
+
thing, with a provenance footer (engine, openEMS version, case SHA-256). The solver returns scalars,
|
|
51
|
+
not the S11 sweep, so no frequency curve is drawn; `rf-margin` shows the best S11 over the sweep as
|
|
52
|
+
a second marker at the largest width. The stat stays a verdict plus at most 3 numbers and a
|
|
53
|
+
provenance line; the gate-by-gate matrix is the `rf-gates` table. `openems_simulate_blade_antenna`,
|
|
54
|
+
`openems_simulate_radome_patch` and `run_snippet` advertise `rf-verdict` by default; a board selects
|
|
55
|
+
another widget for the same result by resource URI. Every successful `run_snippet` result also
|
|
56
|
+
carries `_meta["io.mcpview/views"]` (name, `resourceUri`, title, `supportedWidths` of each widget),
|
|
57
|
+
so a Code Mode program can show one receipt in several widgets with
|
|
58
|
+
`api.panel(receipt.id, { view:
|
|
59
|
+
"rf-gates" })`. `OPENEMS_WIDGETS` (exported from `mod.ts`) lists
|
|
60
|
+
URIs, kinds and `supportedWidths` for a board to read:
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import { OPENEMS_WIDGETS } from "jsr:@casys/mcp-openems";
|
|
64
|
+
// { resourceUri: widget.uri, supportedWidths: widget.supportedWidths }
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The qualification limits (`ANTENNA_S11_MAX_DB`, `ANTENNA_VSWR_MAX`, `RADOME_LOSS_MAX_DB`) live in
|
|
68
|
+
`src/qualification.ts`; the solver scripts and the widgets both read them.
|
|
69
|
+
|
|
70
|
+
The widget bundle is reproducible: `src/ui/widgets/deno.json` pins exact versions with a
|
|
71
|
+
`minimumDependencyAge` of one day, `src/ui/widgets/deno.lock` is committed, and the build runs
|
|
72
|
+
`deno bundle --lock --frozen`. Each widget HTML embeds `THIRD_PARTY_NOTICES.txt`, which also ships
|
|
73
|
+
in the JSR package and the npm bundle.
|
|
74
|
+
|
|
75
|
+
Rebuild the bundled HTML (`src/ui/dist/<widget>/index.html`) with `deno task build:ui`;
|
|
76
|
+
`deno task check:ui:bundle` fails when a committed bundle is stale.
|