sim-cli-core 0.3.8__py3-none-any.whl → 0.4.0__py3-none-any.whl
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/__init__.py +11 -11
- sim/__main__.py +24 -24
- sim/_plugin_install.py +172 -172
- sim/_skills/external-solver-discovery/LICENSE +21 -0
- sim/_skills/external-solver-discovery/SKILL.md +144 -0
- sim/_skills/external-solver-discovery/provenance.json +7 -0
- sim/_skills/sim-cli/SKILL.md +146 -146
- sim/_skills/sim-cli/gui/SKILL.md +239 -239
- sim/_skills/sim-cli/gui/snippets/dismiss_named_dialog.py +19 -19
- sim/_timeout.py +115 -115
- sim/cli.py +1379 -1379
- sim/compat.py +430 -430
- sim/config.py +377 -377
- sim/describe.py +318 -318
- sim/driver.py +190 -190
- sim/drivers/__init__.py +155 -155
- sim/gui/LICENSES/ATTRIBUTION.md +24 -24
- sim/gui/__init__.py +230 -230
- sim/gui/_pywinauto_tools.py +452 -452
- sim/gui/_win32_dialog.py +148 -148
- sim/history.py +176 -176
- sim/inspect.py +1124 -1124
- sim/plugins.py +484 -484
- sim/runner.py +195 -195
- sim/server.py +659 -659
- sim/session.py +227 -227
- sim/testing/__init__.py +30 -30
- sim/testing/protocol_conformance.py +264 -264
- sim_cli_core-0.4.0.dist-info/METADATA +239 -0
- sim_cli_core-0.4.0.dist-info/RECORD +35 -0
- {sim_cli_core-0.3.8.dist-info → sim_cli_core-0.4.0.dist-info}/WHEEL +1 -1
- {sim_cli_core-0.3.8.dist-info → sim_cli_core-0.4.0.dist-info}/licenses/LICENSE +190 -190
- {sim_cli_core-0.3.8.dist-info → sim_cli_core-0.4.0.dist-info}/licenses/NOTICE +35 -35
- sim_cli_core-0.3.8.dist-info/METADATA +0 -391
- sim_cli_core-0.3.8.dist-info/RECORD +0 -32
- {sim_cli_core-0.3.8.dist-info → sim_cli_core-0.4.0.dist-info}/entry_points.txt +0 -0
sim/__init__.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"""sim — unified CLI for LLM agents to control CAD/CAE simulation software."""
|
|
2
|
-
|
|
3
|
-
from importlib.metadata import PackageNotFoundError, version
|
|
4
|
-
|
|
5
|
-
try:
|
|
6
|
-
__version__ = version("sim-cli-core")
|
|
7
|
-
except PackageNotFoundError:
|
|
8
|
-
try:
|
|
9
|
-
__version__ = version("sim-runtime")
|
|
10
|
-
except PackageNotFoundError:
|
|
11
|
-
__version__ = "0.0.0+unknown"
|
|
1
|
+
"""sim — unified CLI for LLM agents to control CAD/CAE simulation software."""
|
|
2
|
+
|
|
3
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
__version__ = version("sim-cli-core")
|
|
7
|
+
except PackageNotFoundError:
|
|
8
|
+
try:
|
|
9
|
+
__version__ = version("sim-runtime")
|
|
10
|
+
except PackageNotFoundError:
|
|
11
|
+
__version__ = "0.0.0+unknown"
|
sim/__main__.py
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"""Allow ``python -m sim ...`` invocation (equivalent to the ``sim`` console script).
|
|
2
|
-
|
|
3
|
-
Why this exists
|
|
4
|
-
---------------
|
|
5
|
-
The console script ``sim`` (declared in ``[project.scripts]``) is the canonical
|
|
6
|
-
entry point for end users — it stays unchanged. This module forwards
|
|
7
|
-
``python -m sim ...`` to the same Click group so developers have a second
|
|
8
|
-
invocation that does *not* hold a Windows file lock on
|
|
9
|
-
``.venv/Scripts/sim.exe``.
|
|
10
|
-
|
|
11
|
-
That lock is the whole reason this file exists: with the editable install,
|
|
12
|
-
``uv sync`` rewrites ``Scripts/sim.exe`` on every sync, but a running
|
|
13
|
-
``sim serve`` has the exe open, so Windows refuses the rewrite (``os error
|
|
14
|
-
32``) and the entire sync aborts. Launching the dev server as
|
|
15
|
-
``python -m sim serve --reload`` instead means the running process holds
|
|
16
|
-
``python.exe`` (uv-managed, shared, not project-managed), and ``sim.exe``
|
|
17
|
-
stays free for ``uv sync`` to rewrite while iteration proceeds.
|
|
18
|
-
|
|
19
|
-
Same pattern used by pip, ruff, pytest, etc.
|
|
20
|
-
"""
|
|
21
|
-
from sim.cli import main
|
|
22
|
-
|
|
23
|
-
if __name__ == "__main__":
|
|
24
|
-
main()
|
|
1
|
+
"""Allow ``python -m sim ...`` invocation (equivalent to the ``sim`` console script).
|
|
2
|
+
|
|
3
|
+
Why this exists
|
|
4
|
+
---------------
|
|
5
|
+
The console script ``sim`` (declared in ``[project.scripts]``) is the canonical
|
|
6
|
+
entry point for end users — it stays unchanged. This module forwards
|
|
7
|
+
``python -m sim ...`` to the same Click group so developers have a second
|
|
8
|
+
invocation that does *not* hold a Windows file lock on
|
|
9
|
+
``.venv/Scripts/sim.exe``.
|
|
10
|
+
|
|
11
|
+
That lock is the whole reason this file exists: with the editable install,
|
|
12
|
+
``uv sync`` rewrites ``Scripts/sim.exe`` on every sync, but a running
|
|
13
|
+
``sim serve`` has the exe open, so Windows refuses the rewrite (``os error
|
|
14
|
+
32``) and the entire sync aborts. Launching the dev server as
|
|
15
|
+
``python -m sim serve --reload`` instead means the running process holds
|
|
16
|
+
``python.exe`` (uv-managed, shared, not project-managed), and ``sim.exe``
|
|
17
|
+
stays free for ``uv sync`` to rewrite while iteration proceeds.
|
|
18
|
+
|
|
19
|
+
Same pattern used by pip, ruff, pytest, etc.
|
|
20
|
+
"""
|
|
21
|
+
from sim.cli import main
|
|
22
|
+
|
|
23
|
+
if __name__ == "__main__":
|
|
24
|
+
main()
|
sim/_plugin_install.py
CHANGED
|
@@ -1,172 +1,172 @@
|
|
|
1
|
-
"""Migration shims for retired plugin installer commands.
|
|
2
|
-
|
|
3
|
-
``sim`` no longer installs or uninstalls plugin packages. Package mutation
|
|
4
|
-
belongs to the user's uv project; sim inspects installed packages, checks
|
|
5
|
-
drivers, and syncs bundled skills.
|
|
6
|
-
"""
|
|
7
|
-
from __future__ import annotations
|
|
8
|
-
|
|
9
|
-
import re
|
|
10
|
-
from dataclasses import dataclass
|
|
11
|
-
from pathlib import Path
|
|
12
|
-
from typing import Any
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
_PACKAGE_SPEC_RE = re.compile(
|
|
16
|
-
r"^(sim-plugin-[A-Za-z0-9][A-Za-z0-9_.-]*)(?:\[[A-Za-z0-9_,.-]+\])?"
|
|
17
|
-
r"(?:\s*(?:==|!=|~=|>=|<=|>|<)\s*[A-Za-z0-9.*+!_.-]+)?$"
|
|
18
|
-
)
|
|
19
|
-
_SHORT_NAME_RE = re.compile(r"^[A-Za-z][A-Za-z0-9_]*$")
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def _install_migration_message(source: str | None = None) -> str:
|
|
23
|
-
base = (
|
|
24
|
-
"sim plugin install is retired.\n\n"
|
|
25
|
-
"Add plugins with uv instead:\n"
|
|
26
|
-
" uv add sim-cli-core <plugin-package-spec>\n"
|
|
27
|
-
" uv run sim plugin sync-skills --target .agents/skills --copy\n"
|
|
28
|
-
" uv run sim check <solver>"
|
|
29
|
-
)
|
|
30
|
-
|
|
31
|
-
if source:
|
|
32
|
-
match = _PACKAGE_SPEC_RE.match(source.strip())
|
|
33
|
-
if match:
|
|
34
|
-
return (
|
|
35
|
-
f"{base}\n\n"
|
|
36
|
-
f"For this package spec, run:\n"
|
|
37
|
-
f" uv add sim-cli-core {source.strip()}"
|
|
38
|
-
)
|
|
39
|
-
if _SHORT_NAME_RE.match(source.strip()):
|
|
40
|
-
return (
|
|
41
|
-
f"{base}\n\n"
|
|
42
|
-
"Short solver names are not package specs. Find the package spec in "
|
|
43
|
-
"
|
|
44
|
-
" uv add sim-cli-core <plugin-package-spec>"
|
|
45
|
-
)
|
|
46
|
-
|
|
47
|
-
return base
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
def _uninstall_migration_message(name: str | None = None) -> str:
|
|
51
|
-
package = None
|
|
52
|
-
if name:
|
|
53
|
-
clean = name.strip()
|
|
54
|
-
package = clean if clean.startswith("sim-plugin-") else f"sim-plugin-{clean}"
|
|
55
|
-
command = f" uv remove {package}" if package else " uv remove <plugin-package-spec>"
|
|
56
|
-
return (
|
|
57
|
-
"sim plugin uninstall is retired.\n\n"
|
|
58
|
-
"Remove plugin packages with uv instead:\n"
|
|
59
|
-
f"{command}\n"
|
|
60
|
-
" uv run sim plugin sync-skills --target .agents/skills --copy"
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
@dataclass
|
|
65
|
-
class InstallReport:
|
|
66
|
-
ok: bool
|
|
67
|
-
name: str | None
|
|
68
|
-
source_kind: str
|
|
69
|
-
pip_target: str
|
|
70
|
-
pip_returncode: int
|
|
71
|
-
pip_stdout: str
|
|
72
|
-
pip_stderr: str
|
|
73
|
-
sync_skills: dict[str, Any] | None = None
|
|
74
|
-
error_code: str | None = None
|
|
75
|
-
message: str = ""
|
|
76
|
-
|
|
77
|
-
def to_dict(self) -> dict[str, Any]:
|
|
78
|
-
return {
|
|
79
|
-
"ok": self.ok,
|
|
80
|
-
"name": self.name,
|
|
81
|
-
"source_kind": self.source_kind,
|
|
82
|
-
"pip_target": self.pip_target,
|
|
83
|
-
"pip_returncode": self.pip_returncode,
|
|
84
|
-
"pip_stdout": self.pip_stdout[-2000:],
|
|
85
|
-
"pip_stderr": self.pip_stderr[-2000:],
|
|
86
|
-
"sync_skills": self.sync_skills,
|
|
87
|
-
"error_code": self.error_code,
|
|
88
|
-
"message": self.message,
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
def install_plugin(
|
|
93
|
-
source: str,
|
|
94
|
-
*,
|
|
95
|
-
editable: bool = False,
|
|
96
|
-
upgrade: bool = False,
|
|
97
|
-
offline: bool = False,
|
|
98
|
-
sync_target: Path | None = None,
|
|
99
|
-
skip_sync: bool = False,
|
|
100
|
-
python: str | None = None,
|
|
101
|
-
extra_index_urls: list[str] | None = None,
|
|
102
|
-
) -> InstallReport:
|
|
103
|
-
"""Return migration guidance without invoking pip or uv pip."""
|
|
104
|
-
_ = (editable, upgrade, offline, sync_target, skip_sync, python, extra_index_urls)
|
|
105
|
-
match = _PACKAGE_SPEC_RE.match(source.strip())
|
|
106
|
-
return InstallReport(
|
|
107
|
-
ok=False,
|
|
108
|
-
name=match.group(1) if match else None,
|
|
109
|
-
source_kind="retired",
|
|
110
|
-
pip_target=source,
|
|
111
|
-
pip_returncode=-1,
|
|
112
|
-
pip_stdout="",
|
|
113
|
-
pip_stderr="",
|
|
114
|
-
error_code="PLUGIN_INSTALL_RETIRED",
|
|
115
|
-
message=_install_migration_message(source),
|
|
116
|
-
)
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
def _default_skills_target() -> Path:
|
|
120
|
-
"""Where ``sync-skills`` writes by default.
|
|
121
|
-
|
|
122
|
-
Uses ``./.claude/skills/`` if a ``.claude`` dir exists in cwd; falls
|
|
123
|
-
back to ``~/.claude/skills/``. This matches Claude Code's discovery.
|
|
124
|
-
"""
|
|
125
|
-
project = Path.cwd() / ".claude"
|
|
126
|
-
if project.is_dir():
|
|
127
|
-
return project / "skills"
|
|
128
|
-
return Path.home() / ".claude" / "skills"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
def uninstall_plugin(name: str, *, sync: bool = True,
|
|
132
|
-
python: str | None = None) -> dict[str, Any]:
|
|
133
|
-
"""Return migration guidance without invoking pip or uv pip."""
|
|
134
|
-
_ = (sync, python)
|
|
135
|
-
return {
|
|
136
|
-
"ok": False,
|
|
137
|
-
"name": name,
|
|
138
|
-
"error_code": "PLUGIN_INSTALL_RETIRED",
|
|
139
|
-
"message": _uninstall_migration_message(name),
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
def bundle_plugins(names: list[str], output_dir: Path, *,
|
|
144
|
-
index_url: str | None = None) -> dict[str, Any]:
|
|
145
|
-
"""Return migration guidance for the removed bundle flow."""
|
|
146
|
-
_ = index_url
|
|
147
|
-
return {
|
|
148
|
-
"ok": False,
|
|
149
|
-
"output": str(output_dir),
|
|
150
|
-
"fetched": [],
|
|
151
|
-
"errors": [
|
|
152
|
-
{
|
|
153
|
-
"name": name,
|
|
154
|
-
"error_code": "PLUGIN_INSTALL_RETIRED",
|
|
155
|
-
"error": (
|
|
156
|
-
"sim plugin bundle is retired. Add plugin packages with "
|
|
157
|
-
"uv add sim-cli-core <plugin-package-spec> in the target "
|
|
158
|
-
"uv project instead."
|
|
159
|
-
),
|
|
160
|
-
}
|
|
161
|
-
for name in names
|
|
162
|
-
],
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
__all__ = [
|
|
167
|
-
"InstallReport",
|
|
168
|
-
"install_plugin",
|
|
169
|
-
"uninstall_plugin",
|
|
170
|
-
"bundle_plugins",
|
|
171
|
-
"_default_skills_target",
|
|
172
|
-
]
|
|
1
|
+
"""Migration shims for retired plugin installer commands.
|
|
2
|
+
|
|
3
|
+
``sim`` no longer installs or uninstalls plugin packages. Package mutation
|
|
4
|
+
belongs to the user's uv project; sim inspects installed packages, checks
|
|
5
|
+
drivers, and syncs bundled skills.
|
|
6
|
+
"""
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import re
|
|
10
|
+
from dataclasses import dataclass
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
from typing import Any
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
_PACKAGE_SPEC_RE = re.compile(
|
|
16
|
+
r"^(sim-plugin-[A-Za-z0-9][A-Za-z0-9_.-]*)(?:\[[A-Za-z0-9_,.-]+\])?"
|
|
17
|
+
r"(?:\s*(?:==|!=|~=|>=|<=|>|<)\s*[A-Za-z0-9.*+!_.-]+)?$"
|
|
18
|
+
)
|
|
19
|
+
_SHORT_NAME_RE = re.compile(r"^[A-Za-z][A-Za-z0-9_]*$")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _install_migration_message(source: str | None = None) -> str:
|
|
23
|
+
base = (
|
|
24
|
+
"sim plugin install is retired.\n\n"
|
|
25
|
+
"Add plugins with uv instead:\n"
|
|
26
|
+
" uv add sim-cli-core <plugin-package-spec>\n"
|
|
27
|
+
" uv run sim plugin sync-skills --target .agents/skills --copy\n"
|
|
28
|
+
" uv run sim check <solver>"
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
if source:
|
|
32
|
+
match = _PACKAGE_SPEC_RE.match(source.strip())
|
|
33
|
+
if match:
|
|
34
|
+
return (
|
|
35
|
+
f"{base}\n\n"
|
|
36
|
+
f"For this package spec, run:\n"
|
|
37
|
+
f" uv add sim-cli-core {source.strip()}"
|
|
38
|
+
)
|
|
39
|
+
if _SHORT_NAME_RE.match(source.strip()):
|
|
40
|
+
return (
|
|
41
|
+
f"{base}\n\n"
|
|
42
|
+
"Short solver names are not package specs. Find the package spec in "
|
|
43
|
+
"the sim-cli workspace plugin-index.json, then run:\n"
|
|
44
|
+
" uv add sim-cli-core <plugin-package-spec>"
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
return base
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _uninstall_migration_message(name: str | None = None) -> str:
|
|
51
|
+
package = None
|
|
52
|
+
if name:
|
|
53
|
+
clean = name.strip()
|
|
54
|
+
package = clean if clean.startswith("sim-plugin-") else f"sim-plugin-{clean}"
|
|
55
|
+
command = f" uv remove {package}" if package else " uv remove <plugin-package-spec>"
|
|
56
|
+
return (
|
|
57
|
+
"sim plugin uninstall is retired.\n\n"
|
|
58
|
+
"Remove plugin packages with uv instead:\n"
|
|
59
|
+
f"{command}\n"
|
|
60
|
+
" uv run sim plugin sync-skills --target .agents/skills --copy"
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
@dataclass
|
|
65
|
+
class InstallReport:
|
|
66
|
+
ok: bool
|
|
67
|
+
name: str | None
|
|
68
|
+
source_kind: str
|
|
69
|
+
pip_target: str
|
|
70
|
+
pip_returncode: int
|
|
71
|
+
pip_stdout: str
|
|
72
|
+
pip_stderr: str
|
|
73
|
+
sync_skills: dict[str, Any] | None = None
|
|
74
|
+
error_code: str | None = None
|
|
75
|
+
message: str = ""
|
|
76
|
+
|
|
77
|
+
def to_dict(self) -> dict[str, Any]:
|
|
78
|
+
return {
|
|
79
|
+
"ok": self.ok,
|
|
80
|
+
"name": self.name,
|
|
81
|
+
"source_kind": self.source_kind,
|
|
82
|
+
"pip_target": self.pip_target,
|
|
83
|
+
"pip_returncode": self.pip_returncode,
|
|
84
|
+
"pip_stdout": self.pip_stdout[-2000:],
|
|
85
|
+
"pip_stderr": self.pip_stderr[-2000:],
|
|
86
|
+
"sync_skills": self.sync_skills,
|
|
87
|
+
"error_code": self.error_code,
|
|
88
|
+
"message": self.message,
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def install_plugin(
|
|
93
|
+
source: str,
|
|
94
|
+
*,
|
|
95
|
+
editable: bool = False,
|
|
96
|
+
upgrade: bool = False,
|
|
97
|
+
offline: bool = False,
|
|
98
|
+
sync_target: Path | None = None,
|
|
99
|
+
skip_sync: bool = False,
|
|
100
|
+
python: str | None = None,
|
|
101
|
+
extra_index_urls: list[str] | None = None,
|
|
102
|
+
) -> InstallReport:
|
|
103
|
+
"""Return migration guidance without invoking pip or uv pip."""
|
|
104
|
+
_ = (editable, upgrade, offline, sync_target, skip_sync, python, extra_index_urls)
|
|
105
|
+
match = _PACKAGE_SPEC_RE.match(source.strip())
|
|
106
|
+
return InstallReport(
|
|
107
|
+
ok=False,
|
|
108
|
+
name=match.group(1) if match else None,
|
|
109
|
+
source_kind="retired",
|
|
110
|
+
pip_target=source,
|
|
111
|
+
pip_returncode=-1,
|
|
112
|
+
pip_stdout="",
|
|
113
|
+
pip_stderr="",
|
|
114
|
+
error_code="PLUGIN_INSTALL_RETIRED",
|
|
115
|
+
message=_install_migration_message(source),
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
def _default_skills_target() -> Path:
|
|
120
|
+
"""Where ``sync-skills`` writes by default.
|
|
121
|
+
|
|
122
|
+
Uses ``./.claude/skills/`` if a ``.claude`` dir exists in cwd; falls
|
|
123
|
+
back to ``~/.claude/skills/``. This matches Claude Code's discovery.
|
|
124
|
+
"""
|
|
125
|
+
project = Path.cwd() / ".claude"
|
|
126
|
+
if project.is_dir():
|
|
127
|
+
return project / "skills"
|
|
128
|
+
return Path.home() / ".claude" / "skills"
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def uninstall_plugin(name: str, *, sync: bool = True,
|
|
132
|
+
python: str | None = None) -> dict[str, Any]:
|
|
133
|
+
"""Return migration guidance without invoking pip or uv pip."""
|
|
134
|
+
_ = (sync, python)
|
|
135
|
+
return {
|
|
136
|
+
"ok": False,
|
|
137
|
+
"name": name,
|
|
138
|
+
"error_code": "PLUGIN_INSTALL_RETIRED",
|
|
139
|
+
"message": _uninstall_migration_message(name),
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def bundle_plugins(names: list[str], output_dir: Path, *,
|
|
144
|
+
index_url: str | None = None) -> dict[str, Any]:
|
|
145
|
+
"""Return migration guidance for the removed bundle flow."""
|
|
146
|
+
_ = index_url
|
|
147
|
+
return {
|
|
148
|
+
"ok": False,
|
|
149
|
+
"output": str(output_dir),
|
|
150
|
+
"fetched": [],
|
|
151
|
+
"errors": [
|
|
152
|
+
{
|
|
153
|
+
"name": name,
|
|
154
|
+
"error_code": "PLUGIN_INSTALL_RETIRED",
|
|
155
|
+
"error": (
|
|
156
|
+
"sim plugin bundle is retired. Add plugin packages with "
|
|
157
|
+
"uv add sim-cli-core <plugin-package-spec> in the target "
|
|
158
|
+
"uv project instead."
|
|
159
|
+
),
|
|
160
|
+
}
|
|
161
|
+
for name in names
|
|
162
|
+
],
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
__all__ = [
|
|
167
|
+
"InstallReport",
|
|
168
|
+
"install_plugin",
|
|
169
|
+
"uninstall_plugin",
|
|
170
|
+
"bundle_plugins",
|
|
171
|
+
"_default_skills_target",
|
|
172
|
+
]
|
|
@@ -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.
|