sim-cli-core 0.3.9__tar.gz → 0.4.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.
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/.gitignore +1 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/PKG-INFO +12 -8
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/README.md +11 -7
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/pyproject.toml +13 -1
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/_plugin_install.py +1 -1
- sim_cli_core-0.4.0/src/sim/_skills/external-solver-discovery/LICENSE +21 -0
- sim_cli_core-0.4.0/src/sim/_skills/external-solver-discovery/SKILL.md +144 -0
- sim_cli_core-0.4.0/src/sim/_skills/external-solver-discovery/provenance.json +7 -0
- sim_cli_core-0.3.9/.github/workflows/publish.yml +0 -46
- sim_cli_core-0.3.9/CLAUDE.md +0 -238
- sim_cli_core-0.3.9/CONTRIBUTING.md +0 -25
- sim_cli_core-0.3.9/assets/architecture.svg +0 -89
- sim_cli_core-0.3.9/assets/banner.svg +0 -70
- sim_cli_core-0.3.9/assets/logo.svg +0 -22
- sim_cli_core-0.3.9/docs/DEVELOPMENT.md +0 -116
- sim_cli_core-0.3.9/docs/agent-readability.md +0 -195
- sim_cli_core-0.3.9/docs/architecture/multi-session-and-config.md +0 -204
- sim_cli_core-0.3.9/docs/architecture/skills-layering-plan.md +0 -68
- sim_cli_core-0.3.9/docs/architecture/version-compat.md +0 -148
- sim_cli_core-0.3.9/docs/plugin-install.md +0 -202
- sim_cli_core-0.3.9/docs/remote-solvers.md +0 -49
- sim_cli_core-0.3.9/docs/why-cli-first.md +0 -18
- sim_cli_core-0.3.9/tests/__init__.py +0 -0
- sim_cli_core-0.3.9/tests/base/__init__.py +0 -0
- sim_cli_core-0.3.9/tests/base/test_cli.py +0 -234
- sim_cli_core-0.3.9/tests/base/test_compat.py +0 -373
- sim_cli_core-0.3.9/tests/base/test_config.py +0 -122
- sim_cli_core-0.3.9/tests/base/test_connect.py +0 -26
- sim_cli_core-0.3.9/tests/base/test_describe.py +0 -184
- sim_cli_core-0.3.9/tests/base/test_driver_discovery.py +0 -135
- sim_cli_core-0.3.9/tests/base/test_history.py +0 -98
- sim_cli_core-0.3.9/tests/base/test_init_setup.py +0 -204
- sim_cli_core-0.3.9/tests/base/test_lint.py +0 -49
- sim_cli_core-0.3.9/tests/base/test_lint_public_corpus.py +0 -159
- sim_cli_core-0.3.9/tests/base/test_logs.py +0 -100
- sim_cli_core-0.3.9/tests/base/test_multi_session.py +0 -233
- sim_cli_core-0.3.9/tests/base/test_plugin_install.py +0 -92
- sim_cli_core-0.3.9/tests/base/test_plugins.py +0 -159
- sim_cli_core-0.3.9/tests/base/test_protocol_conformance.py +0 -212
- sim_cli_core-0.3.9/tests/base/test_python_floor_audit.py +0 -127
- sim_cli_core-0.3.9/tests/base/test_run.py +0 -127
- sim_cli_core-0.3.9/tests/base/test_scan.py +0 -194
- sim_cli_core-0.3.9/tests/base/test_session_versions.py +0 -158
- sim_cli_core-0.3.9/tests/conftest.py +0 -131
- sim_cli_core-0.3.9/tests/drivers/__init__.py +0 -0
- sim_cli_core-0.3.9/tests/execution/calculix_e2e_cantilever_run.py +0 -163
- sim_cli_core-0.3.9/tests/execution/coolprop/water_props.py +0 -33
- sim_cli_core-0.3.9/tests/execution/elmer_e2e_heat_square.py +0 -171
- sim_cli_core-0.3.9/tests/execution/gmsh_e2e_sphere_mesh.py +0 -131
- sim_cli_core-0.3.9/tests/execution/lammps_e2e_lj_nvt.py +0 -159
- sim_cli_core-0.3.9/tests/execution/meshio_e2e_gmsh_to_vtk.py +0 -105
- sim_cli_core-0.3.9/tests/execution/pymfem_e2e_poisson.py +0 -78
- sim_cli_core-0.3.9/tests/execution/pyvista_e2e_sphere_stats.py +0 -109
- sim_cli_core-0.3.9/tests/execution/scikit_fem_e2e_poisson.py +0 -60
- sim_cli_core-0.3.9/tests/execution/scikitrf/short_load.py +0 -32
- sim_cli_core-0.3.9/tests/execution/su2_e2e_inviscid_bump.py +0 -113
- sim_cli_core-0.3.9/tests/fixtures/comsol/comsol_good.py +0 -12
- sim_cli_core-0.3.9/tests/fixtures/comsol/comsol_no_client.py +0 -4
- sim_cli_core-0.3.9/tests/fixtures/comsol/comsol_no_import.py +0 -3
- sim_cli_core-0.3.9/tests/fixtures/hypermesh_good.py +0 -13
- sim_cli_core-0.3.9/tests/fixtures/hypermesh_gui.py +0 -7
- sim_cli_core-0.3.9/tests/fixtures/hypermesh_no_import.py +0 -3
- sim_cli_core-0.3.9/tests/fixtures/hypermesh_no_usage.py +0 -3
- sim_cli_core-0.3.9/tests/fixtures/hypermesh_syntax_error.py +0 -4
- sim_cli_core-0.3.9/tests/fixtures/isaac/bad_import_order.py +0 -5
- sim_cli_core-0.3.9/tests/fixtures/isaac/bad_no_close.py +0 -4
- sim_cli_core-0.3.9/tests/fixtures/isaac/bad_no_simapp.py +0 -3
- sim_cli_core-0.3.9/tests/fixtures/isaac/hello_world.py +0 -51
- sim_cli_core-0.3.9/tests/fixtures/isaac/import_franka.py +0 -34
- sim_cli_core-0.3.9/tests/fixtures/isaac/not_isaac.py +0 -2
- sim_cli_core-0.3.9/tests/fixtures/isaac/official_hello_world.py +0 -50
- sim_cli_core-0.3.9/tests/fixtures/isaac/replicator_cubes.py +0 -57
- sim_cli_core-0.3.9/tests/fixtures/isaac/syntax_error.py +0 -2
- sim_cli_core-0.3.9/tests/fixtures/isaac/warehouse_sdg.py +0 -50
- sim_cli_core-0.3.9/tests/fixtures/matlab/empty_model.mdl +0 -0
- sim_cli_core-0.3.9/tests/fixtures/matlab/empty_model.slx +0 -0
- sim_cli_core-0.3.9/tests/fixtures/matlab/matlab_ok.m +0 -2
- sim_cli_core-0.3.9/tests/fixtures/mfem_good.py +0 -14
- sim_cli_core-0.3.9/tests/fixtures/mfem_no_import.py +0 -3
- sim_cli_core-0.3.9/tests/fixtures/mfem_no_mesh.py +0 -3
- sim_cli_core-0.3.9/tests/fixtures/mfem_syntax_error.py +0 -3
- sim_cli_core-0.3.9/tests/fixtures/mock_fail.py +0 -5
- sim_cli_core-0.3.9/tests/fixtures/mock_solver.py +0 -6
- sim_cli_core-0.3.9/tests/fixtures/newton/basic_pendulum.json +0 -34
- sim_cli_core-0.3.9/tests/fixtures/newton/cable_twist.py +0 -75
- sim_cli_core-0.3.9/tests/fixtures/newton/robot_g1.json +0 -42
- sim_cli_core-0.3.9/tests/fixtures/not_simulation.py +0 -2
- sim_cli_core-0.3.9/tests/fixtures/pybamm/pybamm_bad_import.py +0 -4
- sim_cli_core-0.3.9/tests/fixtures/pybamm/pybamm_crate_sweep.py +0 -43
- sim_cli_core-0.3.9/tests/fixtures/pybamm/pybamm_no_solve.py +0 -6
- sim_cli_core-0.3.9/tests/fixtures/pybamm/pybamm_spm_good.py +0 -47
- sim_cli_core-0.3.9/tests/fixtures/skfem_good.py +0 -22
- sim_cli_core-0.3.9/tests/fixtures/skfem_no_import.py +0 -3
- sim_cli_core-0.3.9/tests/fixtures/skfem_no_solve.py +0 -6
- sim_cli_core-0.3.9/tests/fixtures/skfem_syntax_error.py +0 -3
- sim_cli_core-0.3.9/tests/gui/__init__.py +0 -0
- sim_cli_core-0.3.9/tests/gui/test_connect_tools_field.py +0 -91
- sim_cli_core-0.3.9/tests/gui/test_gui_facade.py +0 -164
- sim_cli_core-0.3.9/tests/inspect/__init__.py +0 -0
- sim_cli_core-0.3.9/tests/inspect/_extract_comsol_Tmax.py +0 -81
- sim_cli_core-0.3.9/tests/inspect/test_channel_3_4_5_9.py +0 -401
- sim_cli_core-0.3.9/tests/inspect/test_gui_probes.py +0 -331
- sim_cli_core-0.3.9/tests/inspect/test_inspect_types.py +0 -164
- sim_cli_core-0.3.9/tests/inspect/test_probes.py +0 -244
- sim_cli_core-0.3.9/tests/inspect/test_snippet_timeout.py +0 -110
- sim_cli_core-0.3.9/tools/audit_python_floor.py +0 -339
- sim_cli_core-0.3.9/tools/extract_driver.py +0 -598
- sim_cli_core-0.3.9/tools/lint-public-corpus.py +0 -279
- sim_cli_core-0.3.9/uv.lock +0 -859
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/LICENSE +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/NOTICE +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/__init__.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/__main__.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/_skills/sim-cli/SKILL.md +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/_skills/sim-cli/gui/SKILL.md +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/_skills/sim-cli/gui/snippets/dismiss_named_dialog.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/_timeout.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/assets.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/cli.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/compat.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/config.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/describe.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/driver.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/drivers/__init__.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/gui/LICENSES/ATTRIBUTION.md +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/gui/__init__.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/gui/_pywinauto_tools.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/gui/_win32_dialog.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/history.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/inspect.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/plugins.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/runner.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/server.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/session.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/testing/__init__.py +0 -0
- {sim_cli_core-0.3.9 → sim_cli_core-0.4.0}/src/sim/testing/protocol_conformance.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: sim-cli-core
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Agent-native simulation asset parsing and CAD/CAE runtime
|
|
5
5
|
Project-URL: Homepage, https://github.com/svd-ai-lab/sim-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/svd-ai-lab/sim-cli
|
|
@@ -98,6 +98,8 @@ roll-up `summary` block.)
|
|
|
98
98
|
| Ansys Mechanical | `.mechdb`, `.mechdat` | `ansys-mechanical` |
|
|
99
99
|
| Icepak Classic | `.tzr` | `icepak-tzr` |
|
|
100
100
|
| Simcenter FloTHERM | `.pack`, `.xml`, `.floxml` | `flotherm-pack`, `flotherm-floxml` |
|
|
101
|
+
| Simulink | `.slx`, `.mdl` | `simulink-slx`, `simulink-mdl` |
|
|
102
|
+
| MATLAB data | `.mat` | `matlab-mat` |
|
|
101
103
|
|
|
102
104
|
The default view is bounded — lists come back as `{total, sample, truncated}`
|
|
103
105
|
so a large scan cannot blow up an agent's context — and absolute paths are
|
|
@@ -173,14 +175,16 @@ provides a **driver**, so `sim` can launch or talk to the solver, and a
|
|
|
173
175
|
**skill**, so the agent knows that solver's workflow, pitfalls, and inspection
|
|
174
176
|
rules.
|
|
175
177
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
178
|
+
Packages and entry points are listed in the [workspace plugin index](plugin-index.json).
|
|
179
|
+
Each plugin remains independently installable from PyPI under its existing
|
|
180
|
+
`sim-plugin-<solver>` name. Its source and bundled skills live in
|
|
181
|
+
[`plugins/<solver>/`](plugins/).
|
|
182
|
+
|
|
183
|
+
For a source install of one plugin:
|
|
181
184
|
|
|
182
|
-
|
|
183
|
-
|
|
185
|
+
```bash
|
|
186
|
+
uv add sim-cli-core "sim-plugin-fluent @ git+https://github.com/svd-ai-lab/sim-cli.git#subdirectory=plugins/fluent"
|
|
187
|
+
```
|
|
184
188
|
|
|
185
189
|
## Commands
|
|
186
190
|
|
|
@@ -56,6 +56,8 @@ roll-up `summary` block.)
|
|
|
56
56
|
| Ansys Mechanical | `.mechdb`, `.mechdat` | `ansys-mechanical` |
|
|
57
57
|
| Icepak Classic | `.tzr` | `icepak-tzr` |
|
|
58
58
|
| Simcenter FloTHERM | `.pack`, `.xml`, `.floxml` | `flotherm-pack`, `flotherm-floxml` |
|
|
59
|
+
| Simulink | `.slx`, `.mdl` | `simulink-slx`, `simulink-mdl` |
|
|
60
|
+
| MATLAB data | `.mat` | `matlab-mat` |
|
|
59
61
|
|
|
60
62
|
The default view is bounded — lists come back as `{total, sample, truncated}`
|
|
61
63
|
so a large scan cannot blow up an agent's context — and absolute paths are
|
|
@@ -131,14 +133,16 @@ provides a **driver**, so `sim` can launch or talk to the solver, and a
|
|
|
131
133
|
**skill**, so the agent knows that solver's workflow, pitfalls, and inspection
|
|
132
134
|
rules.
|
|
133
135
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
Packages and entry points are listed in the [workspace plugin index](plugin-index.json).
|
|
137
|
+
Each plugin remains independently installable from PyPI under its existing
|
|
138
|
+
`sim-plugin-<solver>` name. Its source and bundled skills live in
|
|
139
|
+
[`plugins/<solver>/`](plugins/).
|
|
140
|
+
|
|
141
|
+
For a source install of one plugin:
|
|
139
142
|
|
|
140
|
-
|
|
141
|
-
|
|
143
|
+
```bash
|
|
144
|
+
uv add sim-cli-core "sim-plugin-fluent @ git+https://github.com/svd-ai-lab/sim-cli.git#subdirectory=plugins/fluent"
|
|
145
|
+
```
|
|
142
146
|
|
|
143
147
|
## Commands
|
|
144
148
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sim-cli-core"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.4.0"
|
|
4
4
|
description = "Agent-native simulation asset parsing and CAD/CAE runtime"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -46,6 +46,9 @@ dependencies = [
|
|
|
46
46
|
[project.optional-dependencies]
|
|
47
47
|
dev = ["pytest>=8.0", "ruff>=0.4"]
|
|
48
48
|
|
|
49
|
+
[dependency-groups]
|
|
50
|
+
dev = ["pytest>=8.0", "ruff>=0.4", "build>=1.0", "hatchling>=1.26"]
|
|
51
|
+
|
|
49
52
|
[project.urls]
|
|
50
53
|
Homepage = "https://github.com/svd-ai-lab/sim-cli"
|
|
51
54
|
Repository = "https://github.com/svd-ai-lab/sim-cli"
|
|
@@ -56,6 +59,12 @@ Changelog = "https://github.com/svd-ai-lab/sim-cli/blob/main/CHANGELOG.md"
|
|
|
56
59
|
[project.scripts]
|
|
57
60
|
sim = "sim.cli:main"
|
|
58
61
|
|
|
62
|
+
[tool.uv.workspace]
|
|
63
|
+
members = ["plugins/*"]
|
|
64
|
+
|
|
65
|
+
[tool.uv.sources]
|
|
66
|
+
sim-cli-core = { workspace = true }
|
|
67
|
+
|
|
59
68
|
[build-system]
|
|
60
69
|
requires = ["hatchling"]
|
|
61
70
|
build-backend = "hatchling.build"
|
|
@@ -69,3 +78,6 @@ markers = ["integration: requires solver packages installed"]
|
|
|
69
78
|
|
|
70
79
|
[tool.ruff]
|
|
71
80
|
target-version = "py310"
|
|
81
|
+
|
|
82
|
+
[tool.hatch.build.targets.sdist]
|
|
83
|
+
only-include = ["src/sim", "pyproject.toml", "README.md", "LICENSE", "NOTICE", "CHANGELOG.md"]
|
|
@@ -40,7 +40,7 @@ def _install_migration_message(source: str | None = None) -> str:
|
|
|
40
40
|
return (
|
|
41
41
|
f"{base}\n\n"
|
|
42
42
|
"Short solver names are not package specs. Find the package spec in "
|
|
43
|
-
"
|
|
43
|
+
"the sim-cli workspace plugin-index.json, then run:\n"
|
|
44
44
|
" uv add sim-cli-core <plugin-package-spec>"
|
|
45
45
|
)
|
|
46
46
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SVD AI Lab
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: external-solver-discovery
|
|
3
|
+
description: "Discover and safely use external ad hoc solver capabilities, third-party skills, plugins, MCP servers, or native APIs when the host app or agent environment does not bundle a first-party solver path. Use for unsupported solver requests such as FDTD, Lumerical, Meep, openEMS, Tidy3D, gprMax, CST Studio Suite, or user-provided external integrations."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# External Solver Discovery
|
|
7
|
+
|
|
8
|
+
Use this skill when a user needs a solver, third-party plugin, MCP server,
|
|
9
|
+
native API, or cloud service that is not already covered by a bundled
|
|
10
|
+
solver-specific skill.
|
|
11
|
+
|
|
12
|
+
This skill is an ad hoc discovery layer. It does not make an external solver
|
|
13
|
+
supported, installed, licensed, authenticated, or available. It helps the agent
|
|
14
|
+
find credible local or user-configured routes and report evidence honestly.
|
|
15
|
+
|
|
16
|
+
## Required Protocol
|
|
17
|
+
|
|
18
|
+
1. Name the requested capability and distinguish it from bundled solver support.
|
|
19
|
+
For example, HFSS support is 3D EM support, not FDTD support.
|
|
20
|
+
2. Check the current runtime before network-dependent discovery:
|
|
21
|
+
- attached files and workspace extensions
|
|
22
|
+
- project package files and scripts
|
|
23
|
+
- installed commands, environment variables, registry/app paths, and common
|
|
24
|
+
application locations
|
|
25
|
+
- visible skills, plugins, MCP tools, connector tools, and native APIs
|
|
26
|
+
- user-provided licenses, paths, profiles, or account hints
|
|
27
|
+
3. If a third-party skill, plugin, or MCP server is visible, inspect its own
|
|
28
|
+
manifest, README, SKILL file, tool schema, or help output before using it.
|
|
29
|
+
Prefer integrations that expose provenance, version, tool list, and logs.
|
|
30
|
+
4. Do not install packages, enable cloud services, consume a license seat, submit
|
|
31
|
+
jobs, or authenticate accounts without user approval.
|
|
32
|
+
5. Probe the smallest real route first:
|
|
33
|
+
- version or import check
|
|
34
|
+
- open/list a project without solving
|
|
35
|
+
- dry script parse
|
|
36
|
+
- tiny example run
|
|
37
|
+
- MCP health/tool-list call
|
|
38
|
+
6. Treat command success as transport evidence only. Engineering evidence must
|
|
39
|
+
come from solver logs, exported data, result files, convergence, field data,
|
|
40
|
+
S-parameters, or another domain-specific output requested by the user.
|
|
41
|
+
7. If no credible route is available, state exactly what is missing and give the
|
|
42
|
+
narrowest next step, such as a vendor install path, Python environment,
|
|
43
|
+
package install, MCP server command, API key, or license check.
|
|
44
|
+
|
|
45
|
+
## Candidate Selection
|
|
46
|
+
|
|
47
|
+
Prefer the user's already visible capability over installing a new one. Use
|
|
48
|
+
these tie-breakers:
|
|
49
|
+
|
|
50
|
+
- Project-native files first. A `.fsp` or `.lsf` project points to a different
|
|
51
|
+
route than a Python Meep script.
|
|
52
|
+
- Local native APIs before GUI automation when they can expose the required
|
|
53
|
+
state and logs.
|
|
54
|
+
- GUI automation only when the user needs visual operation or the API cannot
|
|
55
|
+
expose the required state.
|
|
56
|
+
- Cloud APIs only when the user confirms account, credentials, data-sensitivity
|
|
57
|
+
constraints, and job-cost expectations.
|
|
58
|
+
- sim-cli plugins when a matching plugin exists and standardized checks,
|
|
59
|
+
session control, or plugin diagnostics materially reduce risk.
|
|
60
|
+
|
|
61
|
+
## FDTD Ad Hoc Checklist
|
|
62
|
+
|
|
63
|
+
The host app or agent environment may not bundle first-party FDTD support. When
|
|
64
|
+
a user asks for FDTD, Lumerical, Meep, openEMS, Tidy3D, gprMax, or files such as
|
|
65
|
+
`.fsp` or `.lsf`, treat the request as external ad hoc discovery.
|
|
66
|
+
|
|
67
|
+
Candidate routes to check:
|
|
68
|
+
|
|
69
|
+
- **Ansys Lumerical FDTD**: Prefer when the user has a licensed install or the
|
|
70
|
+
workspace contains `.fsp` / `.lsf` files. Probe user-provided paths, common
|
|
71
|
+
install locations, and the vendor Python API only after locating a real
|
|
72
|
+
install. Do not attempt to install Lumerical or obtain licenses.
|
|
73
|
+
- **Meep**: Prefer when the project already has Python or Scheme Meep scripts,
|
|
74
|
+
or an open-source scriptable FDTD path is acceptable. Probe the project
|
|
75
|
+
Python/conda/container environment with an import or version check before any
|
|
76
|
+
run. Ask before installing Meep or creating a new environment.
|
|
77
|
+
- **openEMS**: Prefer for RF, microwave, antenna, or PCB-oriented workflows,
|
|
78
|
+
especially when MATLAB/Octave/Python openEMS scripts or CSXCAD references are
|
|
79
|
+
present. Probe MATLAB, Octave, Python, and `PATH` before running examples.
|
|
80
|
+
- **Tidy3D**: Prefer only when the user confirms a Tidy3D account/API
|
|
81
|
+
configuration and cloud submission is acceptable for the project data. Run
|
|
82
|
+
local validation or no-submit construction before uploading or submitting a
|
|
83
|
+
paid/cloud job.
|
|
84
|
+
- **gprMax**: Prefer for ground-penetrating radar or geophysical FDTD problems.
|
|
85
|
+
Probe input files for gprMax directives and run a version/import check before
|
|
86
|
+
any full model.
|
|
87
|
+
|
|
88
|
+
Common project signals include `.fsp`, `.lsf`, `.ctl`, `lumapi`, `import meep`,
|
|
89
|
+
`openEMS`, `CSXCAD`, `InitFDTD`, `RunOpenEMS`, `tidy3d`, `TIDY3D`, `gprMax`,
|
|
90
|
+
`#domain`, `#material`, and `#waveform`.
|
|
91
|
+
|
|
92
|
+
For any FDTD route, collect evidence from the actual tool or API: version or
|
|
93
|
+
install path, opened project or parsed script, run log, mesh/result metadata,
|
|
94
|
+
monitor exports, fields, flux data, S-parameters, HDF5/CSV output, or the
|
|
95
|
+
domain-specific result requested by the user.
|
|
96
|
+
|
|
97
|
+
## CST Third-Party Reference Checklist
|
|
98
|
+
|
|
99
|
+
The host app or agent environment may not bundle first-party CST Studio Suite
|
|
100
|
+
support. The public CAE-Agent-Hub repository can be used as a third-party
|
|
101
|
+
reference when the user explicitly wants a CST MCP route or CST workflow skill:
|
|
102
|
+
|
|
103
|
+
- CST MCP reference:
|
|
104
|
+
`https://github.com/Cai-aa/CAE-Agent-Hub/tree/main/MCP/CST`
|
|
105
|
+
- CST workflow skill reference:
|
|
106
|
+
`https://github.com/Cai-aa/CAE-Agent-Hub/tree/main/Skill/CST/cst-simulation-workflow`
|
|
107
|
+
|
|
108
|
+
Treat these URLs as discovery pointers, not bundled or audited support. Before
|
|
109
|
+
using them:
|
|
110
|
+
|
|
111
|
+
- Check local evidence first: `.cst` projects, CST Studio Suite install paths,
|
|
112
|
+
`CST_INSTALL_ROOT`, visible MCP server registrations, visible skill folders,
|
|
113
|
+
project package files, and user-provided paths or license hints.
|
|
114
|
+
- If CAE-Agent-Hub is present or the user asks to install it, inspect the
|
|
115
|
+
repository README, CST MCP README, CST skill `SKILL.md`, and MCP tool surface
|
|
116
|
+
from that checkout before running tools.
|
|
117
|
+
- Do not clone, install dependencies, register the MCP server, open CST, run a
|
|
118
|
+
solver, or consume a CST license seat without user approval.
|
|
119
|
+
- Prefer a project-local checkout pinned to a tag or commit when installing.
|
|
120
|
+
Avoid presenting a floating third-party `main` checkout as a reproducible
|
|
121
|
+
integration.
|
|
122
|
+
- Verify the MCP transport with a health, detect, or tool-list probe before
|
|
123
|
+
opening projects or invoking CST automation.
|
|
124
|
+
- Work on a copy of any user `.cst` project unless the user explicitly requests
|
|
125
|
+
in-place modification.
|
|
126
|
+
|
|
127
|
+
For CST work, engineering evidence should come from the real CST route: detected
|
|
128
|
+
version or install path, opened project metadata, saved project path, solver log,
|
|
129
|
+
result tree entries, exported S-parameters, Touchstone files, field data,
|
|
130
|
+
far-field or near-field exports, sweep summaries, or the specific result the
|
|
131
|
+
user requested.
|
|
132
|
+
|
|
133
|
+
## Reporting
|
|
134
|
+
|
|
135
|
+
Keep the status crisp:
|
|
136
|
+
|
|
137
|
+
- `verified`: the runtime exposed the tool/API/MCP and a real probe succeeded.
|
|
138
|
+
- `available but unproven`: a likely install or config exists but no probe has
|
|
139
|
+
run yet.
|
|
140
|
+
- `installable`: there is a known package/service route, but it is not present.
|
|
141
|
+
- `blocked`: a required install, license, credential, path, or network route is
|
|
142
|
+
missing.
|
|
143
|
+
|
|
144
|
+
Never describe an ad hoc external route as bundled or first-party support.
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
name: Publish to PyPI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags: ["v*"]
|
|
6
|
-
workflow_dispatch:
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
build:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- uses: actions/checkout@v4
|
|
13
|
-
|
|
14
|
-
- uses: astral-sh/setup-uv@v5
|
|
15
|
-
with:
|
|
16
|
-
python-version: "3.12"
|
|
17
|
-
|
|
18
|
-
- name: Build sdist + wheel
|
|
19
|
-
run: uv build
|
|
20
|
-
|
|
21
|
-
- name: Sanity-check artifacts
|
|
22
|
-
run: |
|
|
23
|
-
uv tool run twine check dist/*
|
|
24
|
-
ls -lh dist/
|
|
25
|
-
|
|
26
|
-
- uses: actions/upload-artifact@v4
|
|
27
|
-
with:
|
|
28
|
-
name: dist
|
|
29
|
-
path: dist/
|
|
30
|
-
|
|
31
|
-
publish:
|
|
32
|
-
name: Upload to PyPI (trusted publishing)
|
|
33
|
-
needs: build
|
|
34
|
-
runs-on: ubuntu-latest
|
|
35
|
-
environment:
|
|
36
|
-
name: pypi
|
|
37
|
-
url: https://pypi.org/p/sim-cli-core
|
|
38
|
-
permissions:
|
|
39
|
-
id-token: write
|
|
40
|
-
steps:
|
|
41
|
-
- uses: actions/download-artifact@v4
|
|
42
|
-
with:
|
|
43
|
-
name: dist
|
|
44
|
-
path: dist/
|
|
45
|
-
|
|
46
|
-
- uses: pypa/gh-action-pypi-publish@release/v1
|
sim_cli_core-0.3.9/CLAUDE.md
DELETED
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
-
|
|
5
|
-
## Project Overview
|
|
6
|
-
|
|
7
|
-
**sim** reads existing CAE files and turns them into structured text an agent can use, detects local solver installs, validates scripts, and can hold a live solver session open across steps. The `pyproject.toml` description — "Agent-native simulation asset parsing and CAD/CAE runtime" — states the priority correctly: parsing first, runtime second.
|
|
8
|
-
|
|
9
|
-
**Know which tier you are working in, because their dependencies differ:**
|
|
10
|
-
|
|
11
|
-
- **Asset parsing** (`sim scan`) — pure core, no plugin, no solver, no license. Backed by the `simparse` native extension, a hard dependency of `sim-cli-core`. This is the most-used capability in practice: agents can already drive solver GUIs directly, so the highest-value thing `sim` does today is recover engineering context from historical case files (a preprocessing step, closer to a document-to-structured-text converter than to a solver driver).
|
|
12
|
-
- **Solver discovery and script validation** (`sim check`, `sim lint`) — require the solver's plugin. With no plugins installed, `check --all` reports "scanned 0 drivers" and `lint` errors with `No registered driver claims ...`.
|
|
13
|
-
- **Execution** — requires a plugin, and comes in two modes:
|
|
14
|
-
- **One-shot** (`sim run script --solver=X`): subprocess execution, result stored as a numbered run, `sim logs` to browse.
|
|
15
|
-
- **Persistent session** (`sim connect/exec/inspect/disconnect`): a long-lived HTTP server holds a live solver session; agents send code snippets and inspect state without restarting the solver. `sim connect` auto-starts a local server when none is reachable (`session.py:_auto_start_server`), so `sim serve` is only needed explicitly for remote hosts — and `sim stop` is the counterpart that reaps that background process.
|
|
16
|
-
|
|
17
|
-
This tiering is load-bearing for docs and error messages: never imply `sim scan` needs a plugin, and never imply `sim check` works without one.
|
|
18
|
-
|
|
19
|
-
The shared runtime skill is bundled at `src/sim/_skills/sim-cli/` and synced into agent skill directories by `sim plugin sync-skills`. Per-solver agent skills ship inside their own `sim-plugin-<solver>` packages.
|
|
20
|
-
|
|
21
|
-
## Commands
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
# Install
|
|
25
|
-
uv pip install -e ".[dev]" # core + pytest + ruff
|
|
26
|
-
|
|
27
|
-
# Tests
|
|
28
|
-
pytest -q # unit tests (no solver needed)
|
|
29
|
-
pytest tests/base/test_scan.py # single test file
|
|
30
|
-
pytest -q -m integration # integration tests (need solvers + sim serve)
|
|
31
|
-
|
|
32
|
-
# Lint
|
|
33
|
-
ruff check src/sim tests
|
|
34
|
-
ruff check --fix src/sim tests
|
|
35
|
-
|
|
36
|
-
# CLI — asset parsing (core only, no plugin/solver needed)
|
|
37
|
-
sim --json scan ./historical-cases # bounded summary, paths redacted
|
|
38
|
-
sim --json scan model.mph --full --include-paths
|
|
39
|
-
sim --json scan case.inp --format abaqus-inp # force format for a named file
|
|
40
|
-
|
|
41
|
-
# CLI — sessions
|
|
42
|
-
sim serve --host 0.0.0.0 # start HTTP server (default port 7600)
|
|
43
|
-
sim --host <ip> connect --solver <name> --mode solver --ui-mode gui
|
|
44
|
-
sim --host <ip> exec "solver.settings.mesh.check()"
|
|
45
|
-
sim --host <ip> inspect session.summary
|
|
46
|
-
sim --host <ip> screenshot -o shot.png
|
|
47
|
-
sim --host <ip> disconnect
|
|
48
|
-
|
|
49
|
-
sim disconnect # tear down the session
|
|
50
|
-
sim stop # reap the auto-started local server
|
|
51
|
-
|
|
52
|
-
sim run script.py --solver pybamm # one-shot mode
|
|
53
|
-
sim logs # list runs
|
|
54
|
-
sim logs last --field voltage_V # extract a parsed field
|
|
55
|
-
sim check <name> # solver availability (needs the plugin)
|
|
56
|
-
sim lint script.py # validate before running (needs the plugin)
|
|
57
|
-
sim --json describe # machine-readable command manifest
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
**`--json` is a group-level flag and must precede the subcommand.** `sim --json describe` works; `sim describe --json` fails with `Error: No such option: --json`. The same applies to `--host`, `--port`, and `--session`. Note `docs/agent-readability.md` still shows the broken postfix form in two places.
|
|
61
|
-
|
|
62
|
-
Environment variables: `SIM_HOST`, `SIM_PORT` (CLI client, also `[server]` in config), `SIM_HOME` (global config + history dir, default `~/.sim/`), `SIM_DIR` (project dir, default `./.sim/`).
|
|
63
|
-
|
|
64
|
-
Config files (issue #5): `~/.sim/config.toml` (global) + `.sim/config.toml` (project). Resolution order `env > project > global > default`. With no config files present, behavior is unchanged from pre-config sim. Run `sim config path | show | init` to manage. See `docs/architecture/multi-session-and-config.md` for the full schema.
|
|
65
|
-
|
|
66
|
-
## Architecture
|
|
67
|
-
|
|
68
|
-
### CLI (`src/sim/cli.py`)
|
|
69
|
-
Click app with subcommands: `serve`, `scan`, `check`, `lint`, `run`, `connect`, `exec`, `inspect`, `ps`, `disconnect`, `stop`, `screenshot`, `logs`, `config`, `init`, `setup`, `plugin`, `describe`. The session-related commands (`connect`/`exec`/`inspect`/`ps`/`disconnect`/`screenshot`) all delegate to `sim.session.SessionClient`, an HTTP client that talks to a running `sim serve`. The non-session commands (`scan`, `run`, `lint`, `check`, `logs`, `config`, `init`, `setup`, `plugin`, `describe`) work locally without a server.
|
|
70
|
-
|
|
71
|
-
### Asset parsing (`src/sim/assets.py`)
|
|
72
|
-
`sim scan` → `assets.scan_assets(paths, ...)`, which lazily imports the `simparse` native extension (`_load_simparse`) and calls `simparse.scan` / `simparse.inspect`. There is no Python-level parser here: `assets.py` handles path walking, redaction, bounding, and envelope shaping; all format knowledge lives in the compiled `simparse` wheel.
|
|
73
|
-
|
|
74
|
-
Formats and their `--format` ids come from the `simparse` package metadata — check `simparse-<ver>.dist-info/METADATA` for the authoritative table rather than guessing, and re-check when the pinned range in `pyproject.toml` (`simparse>=0.3.2,<0.4`) moves. As of 0.3.2: COMSOL `.mph` (`comsol-mph`), Abaqus `.inp`/`.inc` (`abaqus-inp`), Fluent `.cas.h5`/`.msh.h5` (`fluent-hdf5`), Ansys Electronics Desktop `.aedt`/`.aedtz` (`hfss-aedt`), Ansys Mechanical `.mechdb`/`.mechdat` (`ansys-mechanical`), Icepak Classic `.tzr` (`icepak-tzr`), Simcenter FloTHERM `.pack`/`.xml`/`.floxml` (`flotherm-pack`, `flotherm-floxml`).
|
|
75
|
-
|
|
76
|
-
Output contract (`schema_version: "sim.scan/v1"`), which agents depend on:
|
|
77
|
-
- **Default (summary) view is bounded** — every list is wrapped as `{total, sample, truncated}` so a large directory scan cannot blow up an agent's context. `--full` returns plain lists and is documented for small input sets only.
|
|
78
|
-
- **Absolute paths are redacted** unless `--include-paths` is passed. Preserve this default in any new output path.
|
|
79
|
-
- `--format` is honored only for explicitly named files; directory scans always auto-detect.
|
|
80
|
-
- Unparseable input yields `error_code: ASSET_FORMAT_UNSUPPORTED` inside the standard failure envelope, not an exception.
|
|
81
|
-
|
|
82
|
-
### HTTP server (`src/sim/server.py`)
|
|
83
|
-
FastAPI app exposing:
|
|
84
|
-
- `POST /connect` — launch a solver, register a new session in `_sessions: dict[str, SessionState]` keyed by session_id
|
|
85
|
-
- `POST /exec` — `exec()` a Python snippet against the live `session`/`meshing`/`solver` namespace for the session selected by `X-Sim-Session` header (or the single live session if unambiguous); capture stdout/stderr/return value, append to that session's runs
|
|
86
|
-
- `GET /inspect/<name>` — query `session.summary`, `session.mode`, `last.result`, `workflow.summary` (session-scoped)
|
|
87
|
-
- `POST /run` — one-shot script execution (no session required)
|
|
88
|
-
- `GET /ps` — list of all live sessions + default_session (set only when exactly one live)
|
|
89
|
-
- `GET /screenshot` — base64 PNG of the server's desktop
|
|
90
|
-
- `POST /disconnect` — tear down the session selected by `X-Sim-Session` (or the sole live session)
|
|
91
|
-
- `POST /shutdown` — tear down all sessions, exit the server process
|
|
92
|
-
|
|
93
|
-
The server supports multiple concurrent sessions keyed by session_id. Each `SessionState` carries its own `threading.Lock` so exec/inspect against different sessions can run in parallel. A single solver name can only be live once (driver instances are module-level singletons).
|
|
94
|
-
|
|
95
|
-
**`sim serve --reload` drops all sessions on any source change under the watched tree.** uvicorn's reload watchdog observes file mtimes in `src/sim/**`; any edit (git pull, scp of a modified driver, even touching an unrelated module) restarts the worker, wiping `_sessions`. Child solver processes (out-of-process GUIs, separately spawned solver binaries) survive the reload because they're spawned separately, but the session handles to them are gone — you have to `connect` again. Driver temp files written into the solver's workspace live outside `src/` so they don't retrigger. Practical rules:
|
|
96
|
-
|
|
97
|
-
- Don't edit driver code mid-experiment; finish the run, then edit.
|
|
98
|
-
- For long autonomous experiments where you're editing driver code iteratively, launch **without** `--reload` and restart manually when you want the new code picked up.
|
|
99
|
-
- Reconnecting after a reload can take tens of seconds for GUI-mode drivers that re-adopt the existing window rather than relaunching it.
|
|
100
|
-
|
|
101
|
-
### Driver protocol (`src/sim/driver.py`)
|
|
102
|
-
`DriverProtocol` (a `runtime_checkable` `Protocol`):
|
|
103
|
-
- `name: str` — registered driver name
|
|
104
|
-
- `detect(script) -> bool` — does this script target this solver?
|
|
105
|
-
- `lint(script) -> LintResult` — pre-execution validation, returns `Diagnostic`s
|
|
106
|
-
- `connect() -> ConnectionInfo` — package availability + version check
|
|
107
|
-
- `parse_output(stdout) -> dict` — extract structured results (convention: last JSON line on stdout)
|
|
108
|
-
- `run_file(script) -> RunResult` — one-shot execution
|
|
109
|
-
|
|
110
|
-
`LintResult`, `Diagnostic`, `RunResult`, `ConnectionInfo` are dataclasses with `to_dict()` for JSON serialization.
|
|
111
|
-
|
|
112
|
-
### Driver registry (plugin entry points)
|
|
113
|
-
|
|
114
|
-
`sim-cli-core` is solver-agnostic and ships with no in-tree solver drivers. Drivers are provided by installed plugin packages that expose the `sim.drivers` entry-point group. Use `sim plugin list` and `sim plugin info <name>` to inspect the plugins visible in the active environment.
|
|
115
|
-
|
|
116
|
-
Plugin implementation work belongs in the owning `sim-plugin-<solver>` repository, where the package metadata, `DriverProtocol` implementation, `compatibility.yaml`, bundled skills, and plugin tests live. Do not add solver drivers under `src/sim/drivers/<name>` in this repo.
|
|
117
|
-
|
|
118
|
-
A driver may set `supports_session = True` to implement the persistent-session lifecycle (`launch`/`run`/`query`/`disconnect`); the rest are one-shot only. `get_driver(name)` looks up by `.name` attribute and lazily imports the implementation module on first use, so a broken plugin does not crash the CLI.
|
|
119
|
-
|
|
120
|
-
### Execution pipeline — one-shot (`run`)
|
|
121
|
-
1. `cli.run` → `runner.execute_script(script, solver, driver)` → subprocess, captures stdout/stderr/duration
|
|
122
|
-
2. `driver.parse_output(stdout)` → extract structured fields
|
|
123
|
-
3. `history.append({cwd, solver, session_id, run_id, ...})` → single jsonl line in `~/.sim/history.jsonl`
|
|
124
|
-
4. `sim logs <id>` reads back via `history.get_by_id`; `sim logs --solver X --all` filters
|
|
125
|
-
|
|
126
|
-
### Execution pipeline — persistent session (`exec`)
|
|
127
|
-
1. `cli.connect` → HTTP `POST /connect` to server → `driver.launch(...)` → new `SessionState` added to `_sessions`; response carries the session_id which the client stores
|
|
128
|
-
2. `cli.exec` → HTTP `POST /exec` with code + `X-Sim-Session: <id>` → server routes to that session, then `_execute_snippet()` runs `exec(code, namespace)` where `namespace` has `session`, `meshing`/`solver`, `_result`
|
|
129
|
-
3. `cli.inspect <name>` → HTTP `GET /inspect/<name>` (session-scoped) → driver- or session-specific query
|
|
130
|
-
4. `cli.disconnect` → HTTP `POST /disconnect` (session-scoped) → driver-specific teardown, remove from `_sessions`
|
|
131
|
-
|
|
132
|
-
Session routing rules: an explicit `X-Sim-Session` header wins (404 if unknown); otherwise the server falls back to the sole live session; otherwise `/exec` returns 400. Clients can also set `SIM_SESSION` env var or pass `sim --session <id> ...` to scope a whole CLI invocation.
|
|
133
|
-
|
|
134
|
-
## Adding or changing a solver driver
|
|
135
|
-
|
|
136
|
-
Create or update solver drivers in the owning `sim-plugin-<solver>` repository. A plugin should implement `DriverProtocol`, register the driver through `[project.entry-points."sim.drivers"]` in its `pyproject.toml`, and carry its own compatibility metadata, bundled skills, and tests.
|
|
137
|
-
|
|
138
|
-
The core CLI should only change when the shared runtime contract or plugin discovery machinery changes. Before editing driver-facing docs or behavior, inspect the installed environment with `sim plugin list` and `sim plugin info <solver>`, then work in the plugin repo that owns that solver.
|
|
139
|
-
|
|
140
|
-
**Prefer generic primitives over task-specific ones.** Before adding a new
|
|
141
|
-
driver method purpose-built for one workflow (a resumable-sweep runner, an
|
|
142
|
-
auto-coupling helper, etc.), check whether bounded `run(timeout_s=...)` +
|
|
143
|
-
`health()`/progress inspection + the solver's own retained state already let
|
|
144
|
-
the agent script that workflow step-by-step. Add a new dedicated primitive
|
|
145
|
-
only for a genuine generic gap proven by a real session (missing timeout
|
|
146
|
-
guard, no orphan-process cleanup, no liveness check) — not for workflow
|
|
147
|
-
convenience alone. See `sim-studio-desktop` issues #62/#80 for the HFSS case
|
|
148
|
-
this pattern was drawn from.
|
|
149
|
-
|
|
150
|
-
## Test Layout
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
tests/
|
|
154
|
-
__init__.py
|
|
155
|
-
conftest.py shared fixtures / execution paths
|
|
156
|
-
base/ core framework tests (no solver needed)
|
|
157
|
-
test_scan.py asset scanning contract (envelope, bounding, redaction)
|
|
158
|
-
test_cli.py smoke tests for click commands
|
|
159
|
-
test_describe.py CLI manifest / self-describing surface
|
|
160
|
-
test_compat.py skills layering / profile resolution
|
|
161
|
-
test_config.py two-tier config resolution
|
|
162
|
-
test_init_setup.py sim.toml init + setup, exit codes
|
|
163
|
-
test_connect.py driver.connect() availability checks
|
|
164
|
-
test_driver_discovery.py entry-point plugin discovery
|
|
165
|
-
test_plugins.py plugin listing / info
|
|
166
|
-
test_plugin_install.py retired-installer migration shim
|
|
167
|
-
test_protocol_conformance.py DriverProtocol conformance
|
|
168
|
-
test_history.py global run history persistence
|
|
169
|
-
test_lint.py lint protocol coverage
|
|
170
|
-
test_lint_public_corpus.py lint against a public script corpus
|
|
171
|
-
test_logs.py sim logs CLI
|
|
172
|
-
test_multi_session.py session routing + concurrency
|
|
173
|
-
test_session_versions.py session.versions inspect target
|
|
174
|
-
test_run.py one-shot subprocess execution
|
|
175
|
-
test_python_floor_audit.py minimum-Python-version audit
|
|
176
|
-
drivers/ per-solver driver checks (skipped without the solver)
|
|
177
|
-
execution/ end-to-end solver runs (integration marker)
|
|
178
|
-
gui/ GUI facade + connect tool fields
|
|
179
|
-
inspect/ inspect targets, probes, snippet timeouts
|
|
180
|
-
fixtures/ mock scripts and shared test assets
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
Only `-m integration` tests need solvers; `pytest -q` runs green with no plugins installed.
|
|
184
|
-
|
|
185
|
-
Solver plugin tests live in their own plugin repos. Tests in this repo cover the shared CLI/runtime contract and plugin discovery behavior.
|
|
186
|
-
|
|
187
|
-
## Notes
|
|
188
|
-
|
|
189
|
-
- Global run history lives in `~/.sim/history.jsonl` (append-only; override dir via `SIM_HOME`); git-ignored
|
|
190
|
-
- The server supports multiple concurrent sessions keyed by `X-Sim-Session` header; a solver name can only be live once per server process (driver instances are module-level singletons)
|
|
191
|
-
- Project uses `uv` for dependency locking (`uv.lock`)
|
|
192
|
-
- The shared runtime skill lives at `src/sim/_skills/sim-cli/`; per-solver skills ship in their `sim-plugin-<solver>` packages (synced via `sim plugin sync-skills`)
|
|
193
|
-
|
|
194
|
-
## Releases
|
|
195
|
-
|
|
196
|
-
- **PyPI distribution name:** `sim-cli-core` (renamed from `sim-runtime` in Phase 4 — see `src/sim/plugins.py` dual-lookup; `sim-runtime 0.2.1`–`0.2.3` remain on PyPI but are no longer released against). Both names were rejected for `sim-cli` itself, which is too similar to the existing `simcli` placeholder.
|
|
197
|
-
- **Console script + import name:** `sim`. The PyPI dist name and the import name intentionally differ; `src/sim/__init__.py` looks up `version("sim-cli-core")` first, falling back to `version("sim-runtime")` for editable installs predating the rename, and `try/except PackageNotFoundError` for source checkouts.
|
|
198
|
-
- **Trusted publisher:** GitHub OIDC, repo `svd-ai-lab/sim-cli`, workflow `.github/workflows/publish.yml`, environment `pypi`. Configured at https://pypi.org/manage/project/sim-cli-core/settings/publishing/.
|
|
199
|
-
- **Tag format:** `v<MAJOR.MINOR.PATCH>` matching `pyproject.toml` `version` exactly. Always tag from `main` after PR-merging a release branch.
|
|
200
|
-
- **Don't skip the clean-venv smoke test before tagging.** 0.2.1 shipped broken (`__init__.py` referenced `version("sim-cli")` after the rename) because no one ran `sim --version` in a fresh venv before pushing the tag. Twine check verifies packaging, not import.
|
|
201
|
-
|
|
202
|
-
## Public-artifact privacy / license safety
|
|
203
|
-
|
|
204
|
-
When writing anything that lands in a *public* place — GitHub issues,
|
|
205
|
-
PR titles/bodies/comments, public commit messages, public docs — keep
|
|
206
|
-
**engineering-relevant** facts and drop **diary-style disclosure**
|
|
207
|
-
that ties a specific commercial-software install to a specific
|
|
208
|
-
machine or account. The two are easy to confuse.
|
|
209
|
-
|
|
210
|
-
**Keep:**
|
|
211
|
-
- The bug, the error message, the exit code, the reproducing input.
|
|
212
|
-
- Version info that is a genuine reproduction prereq — when a behavior
|
|
213
|
-
is gated to a specific release of an open-source dependency, the
|
|
214
|
-
version is part of the engineering claim and stays. Use neutral
|
|
215
|
-
framing for closed-source dependencies ("a CFD solver release that
|
|
216
|
-
changed the boundary-condition API") rather than naming the vendor
|
|
217
|
-
and release.
|
|
218
|
-
- Platform when behavior is platform-gated (Linux vs Windows
|
|
219
|
-
filesystem casing, COM availability, etc.).
|
|
220
|
-
|
|
221
|
-
**Drop / replace:**
|
|
222
|
-
- Personal usernames and hostnames → "a Windows test host", "a
|
|
223
|
-
development machine", or elide.
|
|
224
|
-
- Personal IPs (including Tailscale `100.90.x.x`) → elide.
|
|
225
|
-
- Personal filesystem paths (`C:\Users\<you>\...`,
|
|
226
|
-
`~/Documents/GitHub/...`, `C:\Python<NN>\...`,
|
|
227
|
-
`C:\Program Files\<Vendor>\<version>\...`) → "a local clone",
|
|
228
|
-
"the editable install", or elide.
|
|
229
|
-
- Specific commercial-software *versions tied to a personal machine*
|
|
230
|
-
— vendor compliance teams treat these as license-audit signals
|
|
231
|
-
even when the version alone would be fine. Replace with neutral
|
|
232
|
-
phrasing.
|
|
233
|
-
- Tailscale tailnet names, OS account SIDs, MAC/serial numbers.
|
|
234
|
-
|
|
235
|
-
Sanitize existing artifacts by editing PR/issue/comment bodies
|
|
236
|
-
(`gh pr edit`, `gh issue comment --edit-last`). Avoid force-pushing
|
|
237
|
-
to rewrite commit-message history unless the disclosure is severe
|
|
238
|
-
*and* the branch is unmerged *and* not being collaborated on.
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Contributing to sim-cli
|
|
2
|
-
|
|
3
|
-
Thanks for your interest in `sim-cli`. Contributions of all sizes are welcome —
|
|
4
|
-
bug reports, fixes, new drivers, docs, examples.
|
|
5
|
-
|
|
6
|
-
## Getting started
|
|
7
|
-
|
|
8
|
-
See [`docs/DEVELOPMENT.md`](docs/DEVELOPMENT.md) for local setup, running tests,
|
|
9
|
-
and adding a new solver driver.
|
|
10
|
-
|
|
11
|
-
## Submitting changes
|
|
12
|
-
|
|
13
|
-
1. Fork the repo and create a topic branch off `main`.
|
|
14
|
-
2. Make your change. Run `pytest -q` and `ruff check src/sim tests`.
|
|
15
|
-
3. Open a pull request against `main` with a short description of the change
|
|
16
|
-
and any context a reviewer would want.
|
|
17
|
-
|
|
18
|
-
## Licensing of contributions
|
|
19
|
-
|
|
20
|
-
`sim-cli` is released under the [Apache License, Version 2.0](LICENSE).
|
|
21
|
-
By submitting a pull request, you agree that your contribution is licensed
|
|
22
|
-
under the same Apache-2.0 terms (inbound = outbound), and you represent that
|
|
23
|
-
you have the right to do so.
|
|
24
|
-
|
|
25
|
-
No separate Contributor License Agreement (CLA) is required at this time.
|