sysml2kit 0.1.0__tar.gz → 0.2.0__tar.gz

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 (100) hide show
  1. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/CHANGELOG.md +22 -0
  2. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/PKG-INFO +19 -4
  3. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/README.md +16 -3
  4. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/SPEC.md +21 -0
  5. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/docs/api-client.md +1 -1
  6. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/docs/backends.md +13 -8
  7. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/docs/cli.md +6 -1
  8. sysml2kit-0.2.0/docs/mcp.md +34 -0
  9. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/docs/quickstart.md +8 -5
  10. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/mkdocs.yml +1 -0
  11. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/pyproject.toml +18 -2
  12. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/_version.py +2 -2
  13. sysml2kit-0.2.0/src/sysml2kit/backends/sysmlpy.py +445 -0
  14. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/cli.py +92 -3
  15. sysml2kit-0.2.0/src/sysml2kit/mcp/__init__.py +1 -0
  16. sysml2kit-0.2.0/src/sysml2kit/mcp/_common.py +23 -0
  17. sysml2kit-0.2.0/src/sysml2kit/mcp/server.py +57 -0
  18. sysml2kit-0.2.0/src/sysml2kit/mcp/tools_model.py +240 -0
  19. sysml2kit-0.2.0/src/sysml2kit/mcp/tools_requirements.py +76 -0
  20. sysml2kit-0.2.0/src/sysml2kit/views.py +92 -0
  21. sysml2kit-0.2.0/src/sysml2kit/workspace.py +22 -0
  22. sysml2kit-0.2.0/tests/fixtures/RFParts.sysml +36 -0
  23. sysml2kit-0.2.0/tests/fixtures/RFRequirements.sysml +33 -0
  24. sysml2kit-0.2.0/tests/fixtures/SatcomTerminal28GHz.sysml +109 -0
  25. sysml2kit-0.2.0/tests/test_backend_fidelity.py +172 -0
  26. sysml2kit-0.2.0/tests/test_cli_fmt.py +99 -0
  27. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/tests/test_interop.py +24 -0
  28. sysml2kit-0.2.0/tests/test_mcp.py +111 -0
  29. sysml2kit-0.2.0/tests/test_text_writer/test_vehicle_golden.sysml +27 -0
  30. sysml2kit-0.2.0/tests/test_views/test_trace_contains_all_edge_kinds.trace.mmd +9 -0
  31. sysml2kit-0.2.0/tests/test_views/test_tree_contains_hierarchy.tree.mmd +10 -0
  32. sysml2kit-0.2.0/tests/test_views.py +37 -0
  33. sysml2kit-0.2.0/tests/test_workspace.py +24 -0
  34. sysml2kit-0.2.0/tools/conformance/run_oracle.py +100 -0
  35. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/uv.lock +492 -2
  36. sysml2kit-0.1.0/src/sysml2kit/backends/sysmlpy.py +0 -119
  37. sysml2kit-0.1.0/tools/conformance/run_oracle.py +0 -70
  38. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/.gitignore +0 -0
  39. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/.pre-commit-config.yaml +0 -0
  40. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/.python-version +0 -0
  41. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/CITATION.cff +0 -0
  42. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/CLAUDE.md +0 -0
  43. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/CONTRIBUTING.md +0 -0
  44. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/LICENSE +0 -0
  45. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/NOTICE +0 -0
  46. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/SECURITY.md +0 -0
  47. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/docs/concepts.md +0 -0
  48. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/docs/index.md +0 -0
  49. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/docs/interchange.md +0 -0
  50. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/docs/reference.md +0 -0
  51. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/docs/rf-library.md +0 -0
  52. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/docs/traceability.md +0 -0
  53. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/scripts/slopcheck.sh +0 -0
  54. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/__init__.py +0 -0
  55. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/api/__init__.py +0 -0
  56. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/api/client.py +0 -0
  57. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/api/errors.py +0 -0
  58. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/api/models.py +0 -0
  59. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/backends/__init__.py +0 -0
  60. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/backends/protocol.py +0 -0
  61. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/diff.py +0 -0
  62. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/graph.py +0 -0
  63. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/interchange/__init__.py +0 -0
  64. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/interchange/reader.py +0 -0
  65. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/interchange/typemap.py +0 -0
  66. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/interchange/writer.py +0 -0
  67. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/interop/__init__.py +0 -0
  68. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/interop/requirements.py +0 -0
  69. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/model/__init__.py +0 -0
  70. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/model/analysis.py +0 -0
  71. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/model/base.py +0 -0
  72. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/model/builder.py +0 -0
  73. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/model/container.py +0 -0
  74. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/model/metadata.py +0 -0
  75. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/model/relations.py +0 -0
  76. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/model/requirements.py +0 -0
  77. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/model/structure.py +0 -0
  78. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/model/values.py +0 -0
  79. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/py.typed +0 -0
  80. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/query.py +0 -0
  81. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/text/__init__.py +0 -0
  82. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/text/keywords.py +0 -0
  83. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/text/writer.py +0 -0
  84. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/units.py +0 -0
  85. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/src/sysml2kit/validation.py +0 -0
  86. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/tests/conftest.py +0 -0
  87. /sysml2kit-0.1.0/tests/test_text_writer/test_vehicle_golden.sysml → /sysml2kit-0.2.0/tests/fixtures/vehicle.sysml +0 -0
  88. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/tests/test_api_client.py +0 -0
  89. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/tests/test_backend_sysmlpy.py +0 -0
  90. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/tests/test_cli.py +0 -0
  91. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/tests/test_diff.py +0 -0
  92. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/tests/test_interchange.py +0 -0
  93. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/tests/test_model.py +0 -0
  94. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/tests/test_package.py +0 -0
  95. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/tests/test_query.py +0 -0
  96. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/tests/test_roundtrip_json.py +0 -0
  97. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/tests/test_roundtrip_text.py +0 -0
  98. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/tests/test_text_writer.py +0 -0
  99. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/tests/test_validation.py +0 -0
  100. {sysml2kit-0.1.0 → sysml2kit-0.2.0}/tests/test_values_units.py +0 -0
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0 — 2026-08-21
4
+
5
+ - **Parse fidelity**: the sysmlpy backend now walks the raw ANTLR dict
6
+ (`load_grammar_antlr`) instead of the lossy wrapper objects. Short names,
7
+ feature typing (incl. cross-package), multiplicity, attribute values with
8
+ units, requirement subjects and text, docs, and satisfy statements survive
9
+ a text parse. Upstream visitor losses (dependency statements, allocate and
10
+ connect endpoints, verification cases) are pinned by tests, documented in
11
+ SPEC.md, and filed upstream (sysmlpy #4, #5).
12
+ - **MCP server** (`pip install sysml2kit[mcp]`; `sysml2kit mcp serve`):
13
+ eight tools — model_show, model_validate, model_diff, model_export,
14
+ model_diagram, requirements_trace, requirements_extract, library_load.
15
+ - **`fmt` command** with a loss-refusing safety gate (grammar-signature and
16
+ model-diff comparison; `--lossy` to override, `--check` for CI).
17
+ - **Mermaid views** (`sysml2kit.views`): ownership tree and requirement
18
+ trace diagrams; `export --to mermaid` and the model_diagram tool.
19
+ - **Conformance oracle** pinned to windtrader-java 0.1.1 (sha256-verified,
20
+ out-of-process pilot parser); weekly workflow green.
21
+ - Downstream bridges landed as PRs: phased-array-systems#1 (op-form
22
+ RequirementSet) and aedl#1 (bound-form requirements); the RequirementSpec
23
+ field set is now frozen by a schema test.
24
+
3
25
  ## 0.1.0 — 2026-08-21
4
26
 
5
27
  First working release.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sysml2kit
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: API-first Python tooling for building, querying, validating, and automating SysML v2 models
5
5
  Project-URL: Homepage, https://github.com/jman4162/sysml2kit
6
6
  Project-URL: Source, https://github.com/jman4162/sysml2kit
@@ -30,6 +30,8 @@ Requires-Dist: pydantic>=2.7
30
30
  Requires-Dist: typer>=0.12
31
31
  Provides-Extra: graph
32
32
  Requires-Dist: networkx>=3.2; extra == 'graph'
33
+ Provides-Extra: mcp
34
+ Requires-Dist: mcp<2,>=1.26; extra == 'mcp'
33
35
  Provides-Extra: parse
34
36
  Requires-Dist: sysmlpy<0.37,>=0.36.2; extra == 'parse'
35
37
  Description-Content-Type: text/markdown
@@ -133,9 +135,22 @@ SysML v2 model library consumed through this package.
133
135
 
134
136
  ## For agents
135
137
 
136
- The CLI (`sysml2kit show | validate | diff | export`) is the current
137
- automation surface. An MCP server is planned for v0.2 under
138
- `sysml2kit.mcp`.
138
+ An MCP server ships behind the `mcp` extra with eight tools: `model_show`,
139
+ `model_validate`, `model_diff`, `model_export`, `model_diagram`,
140
+ `requirements_trace`, `requirements_extract`, `library_load`. Artifacts are
141
+ returned as file paths, not payloads.
142
+
143
+ ```bash
144
+ pip install "sysml2kit[mcp,parse]"
145
+ sysml2kit mcp serve # stdio; --transport http also supported
146
+ ```
147
+
148
+ ```json
149
+ {"mcpServers": {"sysml2kit": {"command": "sysml2kit", "args": ["mcp", "serve"]}}}
150
+ ```
151
+
152
+ The CLI (`sysml2kit show | validate | diff | export | fmt`) covers the same
153
+ operations for shell use.
139
154
 
140
155
  ## Development
141
156
 
@@ -97,9 +97,22 @@ SysML v2 model library consumed through this package.
97
97
 
98
98
  ## For agents
99
99
 
100
- The CLI (`sysml2kit show | validate | diff | export`) is the current
101
- automation surface. An MCP server is planned for v0.2 under
102
- `sysml2kit.mcp`.
100
+ An MCP server ships behind the `mcp` extra with eight tools: `model_show`,
101
+ `model_validate`, `model_diff`, `model_export`, `model_diagram`,
102
+ `requirements_trace`, `requirements_extract`, `library_load`. Artifacts are
103
+ returned as file paths, not payloads.
104
+
105
+ ```bash
106
+ pip install "sysml2kit[mcp,parse]"
107
+ sysml2kit mcp serve # stdio; --transport http also supported
108
+ ```
109
+
110
+ ```json
111
+ {"mcpServers": {"sysml2kit": {"command": "sysml2kit", "args": ["mcp", "serve"]}}}
112
+ ```
113
+
114
+ The CLI (`sysml2kit show | validate | diff | export | fmt`) covers the same
115
+ operations for shell use.
103
116
 
104
117
  ## Development
105
118
 
@@ -46,6 +46,27 @@ not drop elements the profile lacks classes for.
46
46
  - **Documentation is a field** (`Element.doc`), not an owned `Documentation`
47
47
  element; the writer emits `doc /* ... */` bodies.
48
48
 
49
+ ## Text parse fidelity (sysmlpy backend, 0.36.x)
50
+
51
+ The backend parses via ``sysmlpy.load_grammar_antlr`` and walks the raw
52
+ ANTLR dict (the wrapper-object loader rebuilds usage bodies lossily and is
53
+ not used). What survives a text round trip:
54
+
55
+ | Round-trips | Lost upstream (sysmlpy visitor discards it) |
56
+ |---|---|
57
+ | names, short names | `dependency A to B;` statements (how the writer emits verify/derive) |
58
+ | docs (package/part/requirement scope) | `allocate X to Y;` endpoints |
59
+ | feature typing, incl. cross-package | `connect a.pa to b.pb;` endpoints |
60
+ | multiplicity | `verification` case usages (dropped entirely) |
61
+ | attribute values with units | value provenance (`source`/`confidence` have no textual slot) |
62
+ | requirement subject and text | |
63
+ | satisfy (package level and inside part bodies) | |
64
+
65
+ Consequence: **satisfy traceability survives text; verify/derive/allocate
66
+ require the JSON interchange.** The losses are pinned by tests in
67
+ `tests/test_backend_fidelity.py` so an upstream sysmlpy fix surfaces as a
68
+ test failure.
69
+
49
70
  ## Identity and ownership
50
71
 
51
72
  - Every element has a UUID `element_id`, mapping to the API JSON `@id`.
@@ -10,7 +10,7 @@ from sysml2kit.api import SysMLApiClient
10
10
  with SysMLApiClient("https://models.example.com", token="…") as client:
11
11
  for project in client.list_projects():
12
12
  print(project.id, project.name)
13
- model = client.list_elements(project_id, commit_id) # -> sysml2kit Model
13
+ model = client.list_elements(project_id, commit_id) # -> sysml2kit Model
14
14
  client.push_model(project_id, model, message="update")
15
15
  ```
16
16
 
@@ -15,14 +15,19 @@ model = backend.parse_files([path_a, path_b])
15
15
 
16
16
  `pip install sysml2kit[parse]` installs
17
17
  [sysmlpy](https://github.com/mycr0ft/sysmlpy) (MIT, ANTLR4-based). The
18
- adapter maps its parse tree into the pragmatic profile; constructs the
19
- profile lacks come back as `OpaqueElement` with a logged warning.
20
-
21
- Fidelity: sysmlpy 0.36 does not surface typing, multiplicity, or attribute
22
- values on its wrapper objects, so those fields are empty after a parse.
23
- Names, kinds, docs, and ownership round-trip; the writer-emit → parse →
24
- compare test in CI pins exactly that contract. Use JSON interchange when you
25
- need full fidelity.
18
+ backend parses with `sysmlpy.load_grammar_antlr` and walks the raw ANTLR
19
+ dict sysmlpy's own wrapper loader rebuilds usage bodies lossily, so the
20
+ wrappers are not used.
21
+
22
+ Fidelity: names, short names, docs, feature typing (including
23
+ cross-package), multiplicity, attribute values with units, requirement
24
+ subjects, and satisfy statements survive a text parse. What cannot
25
+ round-trip is what sysmlpy's visitor discards before we see it: `dependency`
26
+ statements (how the writer emits verify/derive), `allocate` and `connect`
27
+ endpoints, and `verification` cases (filed upstream as sysmlpy #4 and #5).
28
+ The fidelity table lives in SPEC.md and is pinned by
29
+ `tests/test_backend_fidelity.py`. Use JSON interchange when you need the
30
+ full traceability graph.
26
31
 
27
32
  The dependency is capped (`sysmlpy>=0.36.2,<0.37`) because it has a single
28
33
  maintainer; bumps are deliberate, after reading the release notes.
@@ -12,8 +12,13 @@ sysml2kit diff old.json new.json --by-name # match by qualified name, not id
12
12
  sysml2kit export model.sysml --to json -o model.json
13
13
  sysml2kit export model.json --to sysml
14
14
  sysml2kit export model.json --to json --stable-ids # UUIDv5 ids for committing
15
+ sysml2kit export model.json --to mermaid --diagram trace # or tree
16
+ sysml2kit fmt model.sysml # refuses lossy rewrites; --lossy overrides
17
+ sysml2kit fmt model.sysml --check # CI mode: exit 1 if it would change
18
+ sysml2kit mcp serve # MCP server (mcp extra)
15
19
  sysml2kit version
16
20
  ```
17
21
 
18
22
  Exit codes: `validate` returns 1 when any error-severity issue is found;
19
- `diff` returns 1 when the models differ. Both suit CI gates.
23
+ `diff` returns 1 when the models differ; `fmt --check` returns 1 when the
24
+ file would change. All suit CI gates.
@@ -0,0 +1,34 @@
1
+ # MCP server
2
+
3
+ `pip install "sysml2kit[mcp]"` and run:
4
+
5
+ ```bash
6
+ sysml2kit mcp serve # stdio (default)
7
+ sysml2kit mcp serve --transport http # streamable HTTP
8
+ ```
9
+
10
+ Client config:
11
+
12
+ ```json
13
+ {"mcpServers": {"sysml2kit": {"command": "sysml2kit", "args": ["mcp", "serve"]}}}
14
+ ```
15
+
16
+ Every tool takes model file paths (`.json` interchange always works;
17
+ `.sysml` needs the `parse` extra), returns a JSON dict with a `status` key,
18
+ and reports failures as `{"error": ..., "status": "failed"}` instead of
19
+ raising. Artifacts are returned as file paths, not payloads.
20
+
21
+ | Tool | What it does |
22
+ |---|---|
23
+ | `model_show(path, traceability)` | Element tree, kind counts, optional trace matrix |
24
+ | `model_validate(path)` | S2K rule issues with severity counts |
25
+ | `model_diff(path_a, path_b, by_name)` | Element-level differences (capped list) |
26
+ | `model_export(path, out, to, stable_ids)` | Convert to interchange JSON or `.sysml` |
27
+ | `model_diagram(path, out, kind)` | Write a mermaid `.mmd` (trace or tree view) |
28
+ | `requirements_trace(path)` | Matrix plus unsatisfied/unverified lists |
29
+ | `requirements_extract(path)` | `RequirementSpec` list (the adapter payload) |
30
+ | `library_load(name, out)` | Write a packaged rf-library model as JSON |
31
+
32
+ A typical agent loop: write a `.sysml` file, `model_validate` it, fix issues,
33
+ `requirements_trace` to check coverage, `model_export --stable-ids` to commit
34
+ the interchange form, `model_diagram` to explain the result.
@@ -13,18 +13,21 @@ model = Model()
13
13
  pkg = builder.pkg(model, "Vehicle")
14
14
  battery = builder.part(model, "battery", owner=pkg)
15
15
  range_req = builder.req(
16
- model, "REQ-001", "Range", owner=pkg,
16
+ model,
17
+ "REQ-001",
18
+ "Range",
19
+ owner=pkg,
17
20
  text="The vehicle shall travel at least 400 km on one charge.",
18
21
  )
19
22
  builder.satisfy(model, source=battery, target=range_req)
20
23
 
21
- print(unverified_requirements(model)) # [REQ-001] - nothing verifies it yet
22
- print(trace_matrix(model).render()) # requirement-by-part grid
24
+ print(unverified_requirements(model)) # [REQ-001] - nothing verifies it yet
25
+ print(trace_matrix(model).render()) # requirement-by-part grid
23
26
  for issue in validate(model):
24
27
  print(issue.rule_id, issue.severity, issue.message)
25
28
 
26
- print(write_model(model)) # SysML v2 textual notation
27
- write_json(model, "vehicle.json") # Systems Modeling API interchange
29
+ print(write_model(model)) # SysML v2 textual notation
30
+ write_json(model, "vehicle.json") # Systems Modeling API interchange
28
31
  ```
29
32
 
30
33
  The same operations from the command line:
@@ -36,6 +36,7 @@ nav:
36
36
  - Traceability: traceability.md
37
37
  - Interchange: interchange.md
38
38
  - Command line: cli.md
39
+ - MCP server: mcp.md
39
40
  - API client: api-client.md
40
41
  - Parser backends: backends.md
41
42
  - RF library: rf-library.md
@@ -50,6 +50,8 @@ dependencies = [
50
50
  # after checking the release notes.
51
51
  parse = ["sysmlpy>=0.36.2,<0.37"]
52
52
  graph = ["networkx>=3.2"]
53
+ # mcp 2.0.0 removed mcp.server.fastmcp; stay on 1.x until the surface is ported.
54
+ mcp = ["mcp>=1.26,<2"]
53
55
 
54
56
  [project.scripts]
55
57
  sysml2kit = "sysml2kit.cli:app"
@@ -70,11 +72,13 @@ test = [
70
72
  ]
71
73
  lint = ["mypy>=1.15", "ruff>=0.16"]
72
74
  parse-test = ["sysmlpy>=0.36.2,<0.37"]
75
+ mcp-test = ["mcp>=1.26,<2"]
73
76
  docs = ["mkdocs-material>=9.5", "mkdocstrings[python]>=0.27"]
74
77
  dev = [
75
78
  { include-group = "test" },
76
79
  { include-group = "lint" },
77
80
  { include-group = "parse-test" },
81
+ { include-group = "mcp-test" },
78
82
  { include-group = "docs" },
79
83
  ]
80
84
 
@@ -137,9 +141,16 @@ files = ["src/sysml2kit"]
137
141
  plugins = ["pydantic.mypy"]
138
142
 
139
143
  [[tool.mypy.overrides]]
140
- module = ["sysmlpy.*", "pint.*", "networkx.*"]
144
+ # sysml2kit_rf_library is an optional runtime peer, not a dependency.
145
+ module = ["sysmlpy.*", "pint.*", "networkx.*", "sysml2kit_rf_library", "sysml2kit_rf_library.*"]
141
146
  ignore_missing_imports = true
142
147
 
148
+ [[tool.mypy.overrides]]
149
+ # The MCP server class is typed loosely (SDK 1.x/2.x compatibility), so its
150
+ # tool decorator is Any; the tools themselves stay fully annotated.
151
+ module = "sysml2kit.mcp.*"
152
+ disallow_untyped_decorators = false
153
+
143
154
  [[tool.mypy.overrides]]
144
155
  module = "tests.*"
145
156
  disallow_untyped_defs = false
@@ -150,7 +161,12 @@ minversion = "8.0"
150
161
  testpaths = ["tests", "src/sysml2kit"]
151
162
  addopts = ["-ra", "--strict-markers", "--strict-config", "--doctest-modules"]
152
163
  xfail_strict = true
153
- filterwarnings = ["error"]
164
+ filterwarnings = [
165
+ "error",
166
+ # The mcp SDK's FastMCP settings model trips this pydantic-settings warning
167
+ # internally; not ours to fix.
168
+ "ignore::pydantic_settings.exceptions.IncompleteFieldDefinitionWarning",
169
+ ]
154
170
  markers = [
155
171
  "parse: requires the sysmlpy parse extra",
156
172
  "api: requires a live Systems Modeling API server",
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.1.0'
22
- __version_tuple__ = version_tuple = (0, 1, 0)
21
+ __version__ = version = '0.2.0'
22
+ __version_tuple__ = version_tuple = (0, 2, 0)
23
23
 
24
24
  __commit_id__ = commit_id = None