sim-cli-core 0.3.0__py3-none-any.whl → 0.3.1__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/_plugin_install.py +88 -9
- sim/cli.py +69 -3
- sim/compat.py +22 -0
- sim/inspect.py +48 -12
- sim/server.py +37 -3
- sim/session.py +4 -1
- {sim_cli_core-0.3.0.dist-info → sim_cli_core-0.3.1.dist-info}/METADATA +71 -20
- {sim_cli_core-0.3.0.dist-info → sim_cli_core-0.3.1.dist-info}/RECORD +12 -12
- sim_cli_core-0.3.1.dist-info/licenses/NOTICE +35 -0
- sim_cli_core-0.3.0.dist-info/licenses/NOTICE +0 -72
- {sim_cli_core-0.3.0.dist-info → sim_cli_core-0.3.1.dist-info}/WHEEL +0 -0
- {sim_cli_core-0.3.0.dist-info → sim_cli_core-0.3.1.dist-info}/entry_points.txt +0 -0
- {sim_cli_core-0.3.0.dist-info → sim_cli_core-0.3.1.dist-info}/licenses/LICENSE +0 -0
sim/_plugin_install.py
CHANGED
|
@@ -33,6 +33,13 @@ from typing import Any
|
|
|
33
33
|
|
|
34
34
|
# ── Index ───────────────────────────────────────────────────────────────────
|
|
35
35
|
|
|
36
|
+
# Curated wheels published by the project — primary index. Anonymous GET; updated
|
|
37
|
+
# whenever a new wheel is published via tools/publish-wheel.sh.
|
|
38
|
+
R2_MANIFEST_URL = "https://cdn.svdailab.com/manifest.json"
|
|
39
|
+
|
|
40
|
+
# Community-maintained OSS plugin catalogue — fallback for entries the curated
|
|
41
|
+
# manifest does not carry. Different schema (array of entries with git+homepage
|
|
42
|
+
# fields), normalized at lookup time.
|
|
36
43
|
DEFAULT_INDEX_URL = (
|
|
37
44
|
"https://raw.githubusercontent.com/svd-ai-lab/sim-plugin-index/main/index.json"
|
|
38
45
|
)
|
|
@@ -46,16 +53,26 @@ def _index_cache_dir() -> Path:
|
|
|
46
53
|
|
|
47
54
|
|
|
48
55
|
def _index_cache_path() -> Path:
|
|
56
|
+
"""Cache file for the GitHub OSS index (``DEFAULT_INDEX_URL``)."""
|
|
49
57
|
return _index_cache_dir() / "index.json"
|
|
50
58
|
|
|
51
59
|
|
|
60
|
+
def _r2_cache_path() -> Path:
|
|
61
|
+
"""Cache file for the curated R2 manifest (``R2_MANIFEST_URL``)."""
|
|
62
|
+
return _index_cache_dir() / "manifest-r2.json"
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def _cache_for(url: str) -> Path:
|
|
66
|
+
return _r2_cache_path() if url == R2_MANIFEST_URL else _index_cache_path()
|
|
67
|
+
|
|
68
|
+
|
|
52
69
|
def fetch_index(url: str = DEFAULT_INDEX_URL, *, force: bool = False, offline: bool = False) -> dict[str, Any]:
|
|
53
|
-
"""Fetch
|
|
70
|
+
"""Fetch a plugin index by URL. Caches under ``~/.sim/index-cache/`` keyed by URL.
|
|
54
71
|
|
|
55
72
|
In ``--offline`` mode, only the local cache is consulted; an empty index
|
|
56
73
|
is returned if no cache exists.
|
|
57
74
|
"""
|
|
58
|
-
cache =
|
|
75
|
+
cache = _cache_for(url)
|
|
59
76
|
if offline:
|
|
60
77
|
if cache.is_file():
|
|
61
78
|
try:
|
|
@@ -93,8 +110,36 @@ def fetch_index(url: str = DEFAULT_INDEX_URL, *, force: bool = False, offline: b
|
|
|
93
110
|
return parsed
|
|
94
111
|
|
|
95
112
|
|
|
113
|
+
def _normalize_r2_entry(name: str, info: dict[str, Any]) -> dict[str, Any]:
|
|
114
|
+
"""Convert an R2 manifest entry to the GitHub-style entry shape that
|
|
115
|
+
``resolve_source`` consumes (``latest_version`` + ``latest_wheel_url``)."""
|
|
116
|
+
return {
|
|
117
|
+
"name": name,
|
|
118
|
+
"latest_version": info.get("version"),
|
|
119
|
+
"latest_wheel_url": info.get("wheel"),
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def _r2_lookup(name: str, *, offline: bool = False) -> dict[str, Any] | None:
|
|
124
|
+
"""Look up ``name`` in the R2 curated manifest, returning a normalized entry."""
|
|
125
|
+
manifest = fetch_index(url=R2_MANIFEST_URL, offline=offline)
|
|
126
|
+
plugins = manifest.get("plugins")
|
|
127
|
+
if not isinstance(plugins, dict):
|
|
128
|
+
return None
|
|
129
|
+
info = plugins.get(name)
|
|
130
|
+
if not isinstance(info, dict) or not info.get("wheel"):
|
|
131
|
+
return None
|
|
132
|
+
return _normalize_r2_entry(name, info)
|
|
133
|
+
|
|
134
|
+
|
|
96
135
|
def index_entry(name: str, *, offline: bool = False, url: str = DEFAULT_INDEX_URL) -> dict[str, Any] | None:
|
|
97
|
-
"""Look up one plugin by name in
|
|
136
|
+
"""Look up one plugin by name in a single index URL.
|
|
137
|
+
|
|
138
|
+
For ``url == R2_MANIFEST_URL`` the entry is normalized to the GitHub-style
|
|
139
|
+
shape so callers get a consistent dict regardless of which index served it.
|
|
140
|
+
"""
|
|
141
|
+
if url == R2_MANIFEST_URL:
|
|
142
|
+
return _r2_lookup(name, offline=offline)
|
|
98
143
|
idx = fetch_index(url=url, offline=offline)
|
|
99
144
|
for entry in idx.get("plugins", []):
|
|
100
145
|
if entry.get("name") == name:
|
|
@@ -102,6 +147,16 @@ def index_entry(name: str, *, offline: bool = False, url: str = DEFAULT_INDEX_UR
|
|
|
102
147
|
return None
|
|
103
148
|
|
|
104
149
|
|
|
150
|
+
def index_entry_chained(name: str, *, offline: bool = False) -> dict[str, Any] | None:
|
|
151
|
+
"""Resolve ``name`` against the curated R2 manifest first, then fall back
|
|
152
|
+
to the community GitHub OSS index. Returns the first hit, or ``None`` if
|
|
153
|
+
neither has it."""
|
|
154
|
+
e = _r2_lookup(name, offline=offline)
|
|
155
|
+
if e is not None:
|
|
156
|
+
return e
|
|
157
|
+
return index_entry(name, offline=offline, url=DEFAULT_INDEX_URL)
|
|
158
|
+
|
|
159
|
+
|
|
105
160
|
# ── Source resolution ──────────────────────────────────────────────────────
|
|
106
161
|
|
|
107
162
|
|
|
@@ -120,15 +175,23 @@ _NAME_RE = re.compile(r"^[A-Za-z][A-Za-z0-9_]*$")
|
|
|
120
175
|
_NAME_VERSION_RE = re.compile(r"^([A-Za-z][A-Za-z0-9_]*)@([A-Za-z0-9._\-+]+)$")
|
|
121
176
|
|
|
122
177
|
|
|
123
|
-
def resolve_source(source: str, *, offline: bool = False,
|
|
178
|
+
def resolve_source(source: str, *, offline: bool = False,
|
|
179
|
+
index_url: str | None = None) -> ResolvedSource:
|
|
124
180
|
"""Classify a source argument and choose what to hand to pip.
|
|
125
181
|
|
|
126
|
-
For named
|
|
127
|
-
the index
|
|
128
|
-
|
|
182
|
+
For named installs, lookup chains the curated R2 manifest first and falls
|
|
183
|
+
back to the GitHub OSS index. Pass ``index_url`` to force a single source.
|
|
184
|
+
Prefers wheel-from-release URL when the index entry has one; falls back to
|
|
185
|
+
git+https. Raises ``ValueError`` if the name isn't in the index in offline
|
|
186
|
+
mode.
|
|
129
187
|
"""
|
|
130
188
|
s = source.strip()
|
|
131
189
|
|
|
190
|
+
def _lookup(name: str) -> dict[str, Any] | None:
|
|
191
|
+
if index_url is None:
|
|
192
|
+
return index_entry_chained(name, offline=offline)
|
|
193
|
+
return index_entry(name, offline=offline, url=index_url)
|
|
194
|
+
|
|
132
195
|
# Local files / dirs first (cheapest to check).
|
|
133
196
|
p = Path(s)
|
|
134
197
|
if s.startswith(("./", "../", "/", "~")) or p.exists():
|
|
@@ -160,7 +223,7 @@ def resolve_source(source: str, *, offline: bool = False, index_url: str = DEFAU
|
|
|
160
223
|
m = _NAME_VERSION_RE.match(s)
|
|
161
224
|
if m:
|
|
162
225
|
name, version = m.group(1), m.group(2)
|
|
163
|
-
entry =
|
|
226
|
+
entry = _lookup(name)
|
|
164
227
|
if entry is None and offline:
|
|
165
228
|
raise ValueError(f"plugin {name!r} not in offline index")
|
|
166
229
|
if entry is None:
|
|
@@ -171,6 +234,20 @@ def resolve_source(source: str, *, offline: bool = False, index_url: str = DEFAU
|
|
|
171
234
|
if entry.get("latest_version") == version and entry.get("latest_wheel_url"):
|
|
172
235
|
return ResolvedSource(kind="name-version", raw=s, name=name, version=version,
|
|
173
236
|
pip_target=str(entry["latest_wheel_url"]))
|
|
237
|
+
# If the entry came from the R2 manifest, all versioned wheels live at a
|
|
238
|
+
# predictable path — construct the pinned URL by filename convention so
|
|
239
|
+
# ``name@<old-version>`` resolves without needing every version listed
|
|
240
|
+
# in the manifest. (R2 keeps every published wheel; manifest only tracks
|
|
241
|
+
# latest.)
|
|
242
|
+
latest_url = str(entry.get("latest_wheel_url") or "")
|
|
243
|
+
if latest_url.startswith("https://cdn.svdailab.com/wheels/"):
|
|
244
|
+
return ResolvedSource(
|
|
245
|
+
kind="name-version", raw=s, name=name, version=version,
|
|
246
|
+
pip_target=(
|
|
247
|
+
f"https://cdn.svdailab.com/wheels/"
|
|
248
|
+
f"sim_plugin_{name}-{version}-py3-none-any.whl"
|
|
249
|
+
),
|
|
250
|
+
)
|
|
174
251
|
git = entry.get("git")
|
|
175
252
|
if git:
|
|
176
253
|
return ResolvedSource(kind="name-version", raw=s, name=name, version=version,
|
|
@@ -180,7 +257,7 @@ def resolve_source(source: str, *, offline: bool = False, index_url: str = DEFAU
|
|
|
180
257
|
|
|
181
258
|
# bare name
|
|
182
259
|
if _NAME_RE.match(s):
|
|
183
|
-
entry =
|
|
260
|
+
entry = _lookup(s)
|
|
184
261
|
if entry is None and offline:
|
|
185
262
|
raise ValueError(f"plugin {s!r} not in offline index")
|
|
186
263
|
if entry is None:
|
|
@@ -440,10 +517,12 @@ def bundle_plugins(names: list[str], output_dir: Path, *,
|
|
|
440
517
|
|
|
441
518
|
__all__ = [
|
|
442
519
|
"DEFAULT_INDEX_URL",
|
|
520
|
+
"R2_MANIFEST_URL",
|
|
443
521
|
"ResolvedSource",
|
|
444
522
|
"InstallReport",
|
|
445
523
|
"fetch_index",
|
|
446
524
|
"index_entry",
|
|
525
|
+
"index_entry_chained",
|
|
447
526
|
"resolve_source",
|
|
448
527
|
"install_plugin",
|
|
449
528
|
"uninstall_plugin",
|
sim/cli.py
CHANGED
|
@@ -13,6 +13,19 @@ from sim.drivers import get_driver
|
|
|
13
13
|
from sim.runner import execute_script
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
# Reconfigure stdout/stderr to UTF-8 so non-ASCII glyphs (arrows, check marks,
|
|
17
|
+
# warning triangles, etc.) survive on Windows consoles that default to cp1252
|
|
18
|
+
# or older codepages. errors="replace" prevents crashes on terminals that
|
|
19
|
+
# can't render a given codepoint — affected glyphs become "?" instead of
|
|
20
|
+
# raising UnicodeEncodeError.
|
|
21
|
+
if sys.stdout.encoding and sys.stdout.encoding.lower() != "utf-8":
|
|
22
|
+
try:
|
|
23
|
+
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
|
24
|
+
sys.stderr.reconfigure(encoding="utf-8", errors="replace")
|
|
25
|
+
except (AttributeError, OSError):
|
|
26
|
+
pass
|
|
27
|
+
|
|
28
|
+
|
|
16
29
|
# ── Top-level group ──────────────────────────────────────────────────────────
|
|
17
30
|
|
|
18
31
|
@click.group()
|
|
@@ -483,6 +496,47 @@ def _print_followup_hints(run_id, stdout_path, stderr_path, delta):
|
|
|
483
496
|
click.echo(f" cat {delta[0]['path']} # likely solver log (largest write)")
|
|
484
497
|
|
|
485
498
|
|
|
499
|
+
def _parse_driver_option_value(value: str):
|
|
500
|
+
lowered = value.lower()
|
|
501
|
+
if lowered == "true":
|
|
502
|
+
return True
|
|
503
|
+
if lowered == "false":
|
|
504
|
+
return False
|
|
505
|
+
try:
|
|
506
|
+
return int(value)
|
|
507
|
+
except ValueError:
|
|
508
|
+
pass
|
|
509
|
+
try:
|
|
510
|
+
return float(value)
|
|
511
|
+
except ValueError:
|
|
512
|
+
return value
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
def _parse_driver_options(items: tuple[str, ...]) -> dict:
|
|
516
|
+
"""Parse generic driver launch passthrough options from KEY=VALUE pairs."""
|
|
517
|
+
parsed: dict = {}
|
|
518
|
+
for item in items:
|
|
519
|
+
if "=" not in item:
|
|
520
|
+
raise click.BadParameter(
|
|
521
|
+
f"{item!r} is not KEY=VALUE",
|
|
522
|
+
param_hint="--driver-option",
|
|
523
|
+
)
|
|
524
|
+
key, value = item.split("=", 1)
|
|
525
|
+
key = key.strip()
|
|
526
|
+
if not key:
|
|
527
|
+
raise click.BadParameter(
|
|
528
|
+
f"{item!r} has an empty key",
|
|
529
|
+
param_hint="--driver-option",
|
|
530
|
+
)
|
|
531
|
+
if key in parsed:
|
|
532
|
+
raise click.BadParameter(
|
|
533
|
+
f"{key!r} was provided more than once",
|
|
534
|
+
param_hint="--driver-option",
|
|
535
|
+
)
|
|
536
|
+
parsed[key] = _parse_driver_option_value(value)
|
|
537
|
+
return parsed
|
|
538
|
+
|
|
539
|
+
|
|
486
540
|
# ── connect (persistent session) ────────────────────────────────────────────
|
|
487
541
|
|
|
488
542
|
@main.command()
|
|
@@ -492,11 +546,19 @@ def _print_followup_hints(run_id, stdout_path, stderr_path, delta):
|
|
|
492
546
|
@click.option("--processors", default=1, type=int)
|
|
493
547
|
@click.option("--workspace", default=None,
|
|
494
548
|
help="Solver-specific working dir (e.g. flotherm FLOUSERDIR).")
|
|
549
|
+
@click.option("--driver-option", "driver_options", multiple=True,
|
|
550
|
+
metavar="KEY=VALUE",
|
|
551
|
+
help="Generic driver launch option passthrough. Repeat as needed.")
|
|
495
552
|
@click.pass_context
|
|
496
|
-
def connect(ctx, solver, mode, ui_mode, processors, workspace):
|
|
553
|
+
def connect(ctx, solver, mode, ui_mode, processors, workspace, driver_options):
|
|
497
554
|
"""Launch a solver and hold a persistent session."""
|
|
498
555
|
from sim.session import SessionClient
|
|
499
556
|
|
|
557
|
+
try:
|
|
558
|
+
parsed_driver_options = _parse_driver_options(driver_options)
|
|
559
|
+
except click.BadParameter as exc:
|
|
560
|
+
raise click.ClickException(str(exc)) from exc
|
|
561
|
+
|
|
500
562
|
client = SessionClient(host=ctx.obj["host"], port=ctx.obj["port"],
|
|
501
563
|
session_id=ctx.obj.get("session"))
|
|
502
564
|
result = client.connect(
|
|
@@ -505,6 +567,7 @@ def connect(ctx, solver, mode, ui_mode, processors, workspace):
|
|
|
505
567
|
ui_mode=ui_mode,
|
|
506
568
|
processors=processors,
|
|
507
569
|
workspace=workspace,
|
|
570
|
+
driver_options=parsed_driver_options,
|
|
508
571
|
)
|
|
509
572
|
|
|
510
573
|
if ctx.obj["json"]:
|
|
@@ -1022,8 +1085,11 @@ def plugin_info_cmd(ctx, name):
|
|
|
1022
1085
|
@click.argument("source")
|
|
1023
1086
|
@click.option("-e", "--editable", is_flag=True,
|
|
1024
1087
|
help="Editable install (pip install -e). For plugin authors.")
|
|
1025
|
-
@click.option("--upgrade",
|
|
1026
|
-
help="Pass --upgrade to pip
|
|
1088
|
+
@click.option("--upgrade/--no-upgrade", default=True,
|
|
1089
|
+
help="Pass --upgrade to pip so the install replaces any "
|
|
1090
|
+
"existing version with whatever the source resolves to. "
|
|
1091
|
+
"Default: enabled. Use --no-upgrade to keep an existing "
|
|
1092
|
+
"install if one is already present.")
|
|
1027
1093
|
@click.option("--offline", is_flag=True,
|
|
1028
1094
|
help="Use only the local cached index; no network calls.")
|
|
1029
1095
|
@click.option("--no-sync", "no_sync", is_flag=True,
|
sim/compat.py
CHANGED
|
@@ -395,6 +395,28 @@ def skills_block_for_profile(driver: str, profile: "Profile | None") -> dict:
|
|
|
395
395
|
driver_dir = (root / driver) if root is not None else None
|
|
396
396
|
|
|
397
397
|
if driver_dir is None or not driver_dir.is_dir():
|
|
398
|
+
# Out-of-tree plugins can bundle skills through the ``sim.skills``
|
|
399
|
+
# entry-point. Prefer the external sim-skills tree when present so
|
|
400
|
+
# local development overlays win, then fall back to the installed
|
|
401
|
+
# plugin bundle.
|
|
402
|
+
try:
|
|
403
|
+
from sim.plugins import skills_dir_for
|
|
404
|
+
plugin_dir = skills_dir_for(driver)
|
|
405
|
+
except Exception: # noqa: BLE001 - skills are advisory context
|
|
406
|
+
plugin_dir = None
|
|
407
|
+
if plugin_dir is not None:
|
|
408
|
+
try:
|
|
409
|
+
index = plugin_dir.joinpath("SKILL.md")
|
|
410
|
+
if index.is_file():
|
|
411
|
+
return {
|
|
412
|
+
"root": str(plugin_dir),
|
|
413
|
+
"index": str(index),
|
|
414
|
+
"active_sdk_layer": active_sdk,
|
|
415
|
+
"active_solver_layer": active_solver,
|
|
416
|
+
}
|
|
417
|
+
except Exception: # noqa: BLE001 - fall through to hint
|
|
418
|
+
pass
|
|
419
|
+
|
|
398
420
|
return {
|
|
399
421
|
"root": None,
|
|
400
422
|
"index": None,
|
sim/inspect.py
CHANGED
|
@@ -787,13 +787,24 @@ def generic_probes() -> list:
|
|
|
787
787
|
|
|
788
788
|
def _find_matching_windows(
|
|
789
789
|
process_name_substrings: tuple[str, ...],
|
|
790
|
+
target_pid: int | None = None,
|
|
790
791
|
) -> tuple[list[dict], int, list[str]]:
|
|
791
|
-
"""Shared helper: enumerate top-level windows
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
792
|
+
"""Shared helper: enumerate top-level windows for a target process.
|
|
793
|
+
|
|
794
|
+
Two filtering modes:
|
|
795
|
+
* ``target_pid`` is provided → return only windows whose owning process
|
|
796
|
+
ID matches ``target_pid``. The substring list is ignored. Use this
|
|
797
|
+
when the caller knows the exact process (e.g. a driver that just
|
|
798
|
+
spawned the target solver) — it eliminates foreground races where
|
|
799
|
+
another window with a generically-matching name happens to be top.
|
|
800
|
+
* ``target_pid`` is ``None`` → fall back to substring matching against
|
|
801
|
+
the owning process's name. This is the legacy default for callers
|
|
802
|
+
that can only describe the target by class.
|
|
803
|
+
|
|
804
|
+
Returns (matches, total_scanned, errors). Each match dict:
|
|
805
|
+
``{window, pid, proc_name, title, rect}``. ``rect`` is
|
|
806
|
+
``(left, top, right, bottom)`` int tuple, or ``None`` if rect-fetch
|
|
807
|
+
failed. ``window`` is the raw pywinauto wrapper (use it for capture).
|
|
797
808
|
|
|
798
809
|
Lazy-imports pywinauto + psutil so this module stays importable on Linux
|
|
799
810
|
/ in headless environments.
|
|
@@ -823,8 +834,12 @@ def _find_matching_windows(
|
|
|
823
834
|
proc_name = psutil.Process(pid).name().lower()
|
|
824
835
|
except Exception:
|
|
825
836
|
proc_name = ""
|
|
826
|
-
if
|
|
827
|
-
|
|
837
|
+
if target_pid is not None:
|
|
838
|
+
if pid != target_pid:
|
|
839
|
+
continue
|
|
840
|
+
else:
|
|
841
|
+
if not any(sub in proc_name for sub in subs):
|
|
842
|
+
continue
|
|
828
843
|
title = w.window_text() or ""
|
|
829
844
|
try:
|
|
830
845
|
r = w.rectangle()
|
|
@@ -881,9 +896,11 @@ class GuiDialogProbe:
|
|
|
881
896
|
self,
|
|
882
897
|
process_name_substrings: tuple[str, ...] = ("fluent", "ansys", "cx", "cortex"),
|
|
883
898
|
code_prefix: str = "fluent.gui",
|
|
899
|
+
target_pid: int | None = None,
|
|
884
900
|
):
|
|
885
901
|
self.process_name_substrings = tuple(s.lower() for s in process_name_substrings)
|
|
886
902
|
self.code_prefix = code_prefix
|
|
903
|
+
self.target_pid = target_pid
|
|
887
904
|
|
|
888
905
|
def applies(self, ctx: InspectCtx) -> bool:
|
|
889
906
|
try:
|
|
@@ -893,7 +910,9 @@ class GuiDialogProbe:
|
|
|
893
910
|
return False
|
|
894
911
|
|
|
895
912
|
def probe(self, ctx: InspectCtx) -> ProbeResult:
|
|
896
|
-
matches, total, errors = _find_matching_windows(
|
|
913
|
+
matches, total, errors = _find_matching_windows(
|
|
914
|
+
self.process_name_substrings, target_pid=self.target_pid,
|
|
915
|
+
)
|
|
897
916
|
diags: list[Diagnostic] = []
|
|
898
917
|
if errors:
|
|
899
918
|
for msg in errors:
|
|
@@ -957,10 +976,19 @@ class ScreenshotProbe:
|
|
|
957
976
|
"""Channel #8b — per-window screenshot capture via PIL.ImageGrab bbox.
|
|
958
977
|
|
|
959
978
|
IMPORTANT: this probe captures ONLY the bounding box of each matched
|
|
960
|
-
|
|
979
|
+
target window, NOT the whole desktop. If no matching window is found,
|
|
961
980
|
emits a single warning diag and nothing else — we never fall back to
|
|
962
981
|
full-screen capture (that creates noisy / PII-risky artifacts).
|
|
963
982
|
|
|
983
|
+
Two ways to identify the target:
|
|
984
|
+
* ``target_pid`` (preferred when known): bind to the exact process
|
|
985
|
+
the caller spawned. Eliminates foreground races where another
|
|
986
|
+
window whose process name happens to substring-match the legacy
|
|
987
|
+
list wins z-order at probe time.
|
|
988
|
+
* ``process_name_substrings`` (default): match any process whose
|
|
989
|
+
name contains one of the given substrings. Used when the caller
|
|
990
|
+
can only describe the target by class.
|
|
991
|
+
|
|
964
992
|
Every matched window produces:
|
|
965
993
|
- one Artifact (role="screenshot", path=<png>)
|
|
966
994
|
- one info Diag (source=gui:screenshot, code=sim.screenshot.captured)
|
|
@@ -974,9 +1002,11 @@ class ScreenshotProbe:
|
|
|
974
1002
|
self,
|
|
975
1003
|
filename_prefix: str = "shot",
|
|
976
1004
|
process_name_substrings: tuple[str, ...] = ("fluent", "ansys", "cx", "cortex"),
|
|
1005
|
+
target_pid: int | None = None,
|
|
977
1006
|
):
|
|
978
1007
|
self.filename_prefix = filename_prefix
|
|
979
1008
|
self.process_name_substrings = tuple(s.lower() for s in process_name_substrings)
|
|
1009
|
+
self.target_pid = target_pid
|
|
980
1010
|
|
|
981
1011
|
def applies(self, ctx: InspectCtx) -> bool:
|
|
982
1012
|
try:
|
|
@@ -999,7 +1029,9 @@ class ScreenshotProbe:
|
|
|
999
1029
|
message=f"PIL.ImageGrab unavailable: {exc}",
|
|
1000
1030
|
)])
|
|
1001
1031
|
|
|
1002
|
-
matches, _, errors = _find_matching_windows(
|
|
1032
|
+
matches, _, errors = _find_matching_windows(
|
|
1033
|
+
self.process_name_substrings, target_pid=self.target_pid,
|
|
1034
|
+
)
|
|
1003
1035
|
if errors:
|
|
1004
1036
|
return ProbeResult(diagnostics=[Diagnostic(
|
|
1005
1037
|
severity="warning", source="gui:screenshot",
|
|
@@ -1008,10 +1040,14 @@ class ScreenshotProbe:
|
|
|
1008
1040
|
)])
|
|
1009
1041
|
|
|
1010
1042
|
if not matches:
|
|
1043
|
+
target_desc = (
|
|
1044
|
+
f"pid={self.target_pid}" if self.target_pid is not None
|
|
1045
|
+
else f"{self.process_name_substrings}"
|
|
1046
|
+
)
|
|
1011
1047
|
return ProbeResult(diagnostics=[Diagnostic(
|
|
1012
1048
|
severity="info", source="gui:screenshot",
|
|
1013
1049
|
code="sim.screenshot.no_window",
|
|
1014
|
-
message=(f"no window matched {
|
|
1050
|
+
message=(f"no window matched {target_desc}; "
|
|
1015
1051
|
f"no screenshot taken (full-screen fallback disabled)"),
|
|
1016
1052
|
)])
|
|
1017
1053
|
|
sim/server.py
CHANGED
|
@@ -16,7 +16,7 @@ per-session endpoints return 400. See
|
|
|
16
16
|
`docs/architecture/multi-session-and-config.md` for the full contract.
|
|
17
17
|
|
|
18
18
|
Endpoints:
|
|
19
|
-
POST /connect {solver, mode, ui_mode, processors}
|
|
19
|
+
POST /connect {solver, mode, ui_mode, processors, ...} → header-less
|
|
20
20
|
POST /exec {code, label} → header-routed
|
|
21
21
|
POST /run {script, solver} → header-less (one-shot)
|
|
22
22
|
GET /inspect/<name> → header-routed
|
|
@@ -38,7 +38,7 @@ from typing import Any
|
|
|
38
38
|
|
|
39
39
|
from fastapi import BackgroundTasks, FastAPI, Header, HTTPException, Request
|
|
40
40
|
from fastapi.responses import JSONResponse
|
|
41
|
-
from pydantic import BaseModel
|
|
41
|
+
from pydantic import BaseModel, Field
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
def _sanitize_for_json(obj):
|
|
@@ -76,7 +76,16 @@ class ConnectRequest(BaseModel):
|
|
|
76
76
|
mode: str = "meshing"
|
|
77
77
|
ui_mode: str = "gui"
|
|
78
78
|
processors: int = 2
|
|
79
|
-
workspace: str | None = None
|
|
79
|
+
workspace: str | None = None
|
|
80
|
+
driver_options: dict[str, Any] = Field(default_factory=dict)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def _connect_reserved_driver_option_keys() -> set[str]:
|
|
84
|
+
"""Return connect request fields that cannot be overridden by driver options."""
|
|
85
|
+
fields = getattr(ConnectRequest, "model_fields", None)
|
|
86
|
+
if fields is None:
|
|
87
|
+
fields = getattr(ConnectRequest, "__fields__", {})
|
|
88
|
+
return set(fields) - {"driver_options"}
|
|
80
89
|
|
|
81
90
|
|
|
82
91
|
class ExecRequest(BaseModel):
|
|
@@ -98,6 +107,9 @@ class SessionState:
|
|
|
98
107
|
mode: str | None = None
|
|
99
108
|
ui_mode: str | None = None
|
|
100
109
|
processors: int = 1
|
|
110
|
+
workspace: str | None = None
|
|
111
|
+
driver_options: dict = field(default_factory=dict)
|
|
112
|
+
launch_options: dict = field(default_factory=dict)
|
|
101
113
|
connected_at: float | None = None
|
|
102
114
|
run_count: int = 0
|
|
103
115
|
driver: Any = None
|
|
@@ -273,13 +285,23 @@ def connect(req: ConnectRequest):
|
|
|
273
285
|
"two concurrent sessions on the same driver aren't supported yet",
|
|
274
286
|
)
|
|
275
287
|
|
|
288
|
+
reserved_seen = _connect_reserved_driver_option_keys() & set(req.driver_options)
|
|
289
|
+
if reserved_seen:
|
|
290
|
+
names = ", ".join(sorted(reserved_seen))
|
|
291
|
+
raise HTTPException(
|
|
292
|
+
400,
|
|
293
|
+
f"driver_options may not override reserved connect keys: {names}",
|
|
294
|
+
)
|
|
295
|
+
|
|
276
296
|
launch_kwargs: dict = {
|
|
277
297
|
"mode": req.mode,
|
|
278
298
|
"ui_mode": req.ui_mode,
|
|
279
299
|
"processors": req.processors,
|
|
300
|
+
**req.driver_options,
|
|
280
301
|
}
|
|
281
302
|
if req.workspace is not None:
|
|
282
303
|
launch_kwargs["workspace"] = req.workspace
|
|
304
|
+
launch_kwargs.setdefault("cwd", req.workspace)
|
|
283
305
|
try:
|
|
284
306
|
info = driver.launch(**launch_kwargs)
|
|
285
307
|
except HTTPException:
|
|
@@ -297,6 +319,9 @@ def connect(req: ConnectRequest):
|
|
|
297
319
|
mode=req.mode,
|
|
298
320
|
ui_mode=req.ui_mode,
|
|
299
321
|
processors=req.processors,
|
|
322
|
+
workspace=req.workspace,
|
|
323
|
+
driver_options=req.driver_options,
|
|
324
|
+
launch_options=info.get("launch_options") or {},
|
|
300
325
|
connected_at=time.time(),
|
|
301
326
|
run_count=0,
|
|
302
327
|
driver=driver,
|
|
@@ -323,6 +348,9 @@ def connect(req: ConnectRequest):
|
|
|
323
348
|
"solver": req.solver,
|
|
324
349
|
"mode": state.mode,
|
|
325
350
|
"ui_mode": state.ui_mode,
|
|
351
|
+
"workspace": state.workspace,
|
|
352
|
+
"driver_options": state.driver_options,
|
|
353
|
+
"launch_options": state.launch_options,
|
|
326
354
|
"connected_at": state.connected_at,
|
|
327
355
|
"run_count": 0,
|
|
328
356
|
"profile": state.profile,
|
|
@@ -395,6 +423,9 @@ def inspect(
|
|
|
395
423
|
"solver": state.solver,
|
|
396
424
|
"mode": state.mode,
|
|
397
425
|
"ui_mode": state.ui_mode,
|
|
426
|
+
"workspace": state.workspace,
|
|
427
|
+
"driver_options": state.driver_options,
|
|
428
|
+
"launch_options": state.launch_options,
|
|
398
429
|
"connected_at": state.connected_at,
|
|
399
430
|
"run_count": state.run_count,
|
|
400
431
|
"profile": state.profile,
|
|
@@ -442,6 +473,9 @@ def ps():
|
|
|
442
473
|
"mode": s.mode,
|
|
443
474
|
"ui_mode": s.ui_mode,
|
|
444
475
|
"processors": s.processors,
|
|
476
|
+
"workspace": s.workspace,
|
|
477
|
+
"driver_options": s.driver_options,
|
|
478
|
+
"launch_options": s.launch_options,
|
|
445
479
|
"connected_at": s.connected_at,
|
|
446
480
|
"run_count": s.run_count,
|
|
447
481
|
"profile": s.profile,
|
sim/session.py
CHANGED
|
@@ -152,7 +152,8 @@ class SessionClient:
|
|
|
152
152
|
|
|
153
153
|
def connect(self, solver: str, mode: str = "meshing",
|
|
154
154
|
ui_mode: str = "no_gui", processors: int = 1,
|
|
155
|
-
workspace: str | None = None
|
|
155
|
+
workspace: str | None = None,
|
|
156
|
+
driver_options: dict | None = None) -> dict:
|
|
156
157
|
# Auto-start local server if needed
|
|
157
158
|
if self._is_local() and not self._server_reachable():
|
|
158
159
|
if not self._auto_start_server():
|
|
@@ -164,6 +165,8 @@ class SessionClient:
|
|
|
164
165
|
}
|
|
165
166
|
if workspace is not None:
|
|
166
167
|
body["workspace"] = workspace
|
|
168
|
+
if driver_options:
|
|
169
|
+
body["driver_options"] = driver_options
|
|
167
170
|
resp = self._request("post", "/connect", timeout=CONNECT_TIMEOUT_S, json=body)
|
|
168
171
|
# Remember the new session_id so subsequent calls on this client
|
|
169
172
|
# route to it even if another session shows up later.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sim-cli-core
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Make every engineering tool agent-native — a CLI runtime that lets LLM agents launch, drive, and observe CAD/CAE software
|
|
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
|
|
@@ -66,7 +66,7 @@ Description-Content-Type: text/markdown
|
|
|
66
66
|
|
|
67
67
|
**English** · [Deutsch](docs/README.de.md) · [日本語](docs/README.ja.md) · [中文](docs/README.zh.md)
|
|
68
68
|
|
|
69
|
-
[Why sim](#-why-sim) · [Quick Start](#-quick-start) · [Solvers](#-solver-registry) · [Commands](#-commands) · [
|
|
69
|
+
[Why sim](#-why-sim) · [Quick Start](#-quick-start) · [Solvers](#-solver-registry) · [Commands](#-commands) · [Skills](https://github.com/svd-ai-lab/sim-skills)
|
|
70
70
|
|
|
71
71
|
</div>
|
|
72
72
|
|
|
@@ -114,6 +114,10 @@ For the full driver protocol, server endpoints, and execution pipeline see [CLAU
|
|
|
114
114
|
|
|
115
115
|
> **Names at a glance:** repo `svd-ai-lab/sim-cli` · PyPI distribution `sim-cli-core` · console command `sim` · import `import sim`. Yes, three different strings — the repo name predates the PyPI publish; the rest follow Python packaging convention.
|
|
116
116
|
|
|
117
|
+
Prereq: [`uv`](https://docs.astral.sh/uv/) — install with `curl -LsSf https://astral.sh/uv/install.sh | sh` (macOS / Linux) or `irm https://astral.sh/uv/install.ps1 | iex` (Windows PowerShell).
|
|
118
|
+
|
|
119
|
+
**macOS / Linux:**
|
|
120
|
+
|
|
117
121
|
```bash
|
|
118
122
|
# 1. On the host that has the solver installed, install sim core only
|
|
119
123
|
# — no driver choice yet:
|
|
@@ -121,7 +125,7 @@ uv pip install sim-cli-core
|
|
|
121
125
|
|
|
122
126
|
# 2. Install the plugin for the solver you actually want (browse the
|
|
123
127
|
# index with `sim plugin list`):
|
|
124
|
-
sim plugin install <solver> # e.g. ltspice
|
|
128
|
+
sim plugin install <solver> # e.g. ltspice
|
|
125
129
|
|
|
126
130
|
# 3. Tell sim to look at this machine and pick the right SDK profile:
|
|
127
131
|
sim check <solver>
|
|
@@ -142,6 +146,34 @@ sim --host <server-ip> screenshot -o shot.png
|
|
|
142
146
|
sim --host <server-ip> disconnect
|
|
143
147
|
```
|
|
144
148
|
|
|
149
|
+
**Windows (PowerShell):**
|
|
150
|
+
|
|
151
|
+
```powershell
|
|
152
|
+
# 1. On the host that has the solver installed, install sim core only
|
|
153
|
+
# — no driver choice yet:
|
|
154
|
+
uv pip install sim-cli-core
|
|
155
|
+
|
|
156
|
+
# 2. Install the plugin for the solver you actually want (browse the
|
|
157
|
+
# index with `sim plugin list`):
|
|
158
|
+
sim plugin install <solver> # e.g. ltspice
|
|
159
|
+
|
|
160
|
+
# 3. Tell sim to look at this machine and pick the right SDK profile:
|
|
161
|
+
sim check <solver>
|
|
162
|
+
|
|
163
|
+
# 4. Bootstrap that profile env (or pass --auto-install to step 5):
|
|
164
|
+
sim env install <profile>
|
|
165
|
+
|
|
166
|
+
# 5. Start the server (only needed for remote / cross-machine workflows):
|
|
167
|
+
sim serve --host 0.0.0.0 # FastAPI on :7600
|
|
168
|
+
|
|
169
|
+
# 6. From the agent / your laptop / anywhere on the network:
|
|
170
|
+
sim --host <server-ip> connect --solver <solver> --mode solver --ui-mode gui
|
|
171
|
+
sim --host <server-ip> inspect session.versions # ← always do this first
|
|
172
|
+
sim --host <server-ip> exec "<solver-specific snippet>"
|
|
173
|
+
sim --host <server-ip> screenshot -o shot.png
|
|
174
|
+
sim --host <server-ip> disconnect
|
|
175
|
+
```
|
|
176
|
+
|
|
145
177
|
That's the full loop: **detect → bootstrap → launch → drive → observe → tear down** — with the engineer optionally watching the solver GUI in real time.
|
|
146
178
|
|
|
147
179
|
> **Why the bootstrap step?** Each `(solver, SDK, driver, skill)` combo is
|
|
@@ -154,18 +186,47 @@ That's the full loop: **detect → bootstrap → launch → drive → observe
|
|
|
154
186
|
|
|
155
187
|
---
|
|
156
188
|
|
|
189
|
+
## 📦 Plugin index
|
|
190
|
+
|
|
191
|
+
`sim plugin install <name>` resolves names against two indexes, in order:
|
|
192
|
+
|
|
193
|
+
1. **svd-maintained wheel manifest** at `https://cdn.svdailab.com/manifest.json` — pre-built wheels published by the project. Anonymous GET, updated whenever a new wheel ships.
|
|
194
|
+
2. **Community-maintained catalogue** at [`sim-plugin-index`](https://github.com/svd-ai-lab/sim-plugin-index) — broader plugin listing maintained by the community; entries can be OSS or third-party plugins, pointing at GitHub releases or git+https sources.
|
|
195
|
+
|
|
196
|
+
The first hit wins. Most users never see this distinction — `sim plugin install ltspice` just works.
|
|
197
|
+
|
|
198
|
+
svd manifest schema (the community catalogue uses a different shape — see its repo):
|
|
199
|
+
|
|
200
|
+
```json
|
|
201
|
+
{
|
|
202
|
+
"updated": "<ISO date>",
|
|
203
|
+
"plugins": {
|
|
204
|
+
"<name>": {
|
|
205
|
+
"version": "<X.Y.Z>",
|
|
206
|
+
"wheel": "https://cdn.svdailab.com/wheels/<file>.whl"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
To install a wheel directly without going through the resolver, hand `sim plugin install` the URL — `sim plugin install https://cdn.svdailab.com/wheels/<file>.whl`.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
157
216
|
## 🧪 Solver registry
|
|
158
217
|
|
|
159
|
-
`sim-cli` core is **fully solver-agnostic** — it ships with **zero built-in drivers**. Every solver
|
|
218
|
+
`sim-cli` core is **fully solver-agnostic** — it ships with **zero built-in drivers**. Every solver is reached through a **plugin package** registered via the `sim.drivers` entry-point group. Adding a new backend is a ~200-LOC `DriverProtocol` implementation in its own `sim-plugin-<name>` repo.
|
|
219
|
+
|
|
220
|
+
`sim` is most useful for **GUI-heavy solvers** — COMSOL, ANSYS Mechanical, ANSYS Fluent, MATLAB Simulink, Abaqus, Flotherm — where every agent iteration would otherwise mean clicking through dialog boxes.
|
|
160
221
|
|
|
161
|
-
|
|
222
|
+
Install by name (the resolver chains the svd manifest then the community catalogue — see [Plugin index](#-plugin-index)):
|
|
162
223
|
|
|
163
224
|
```bash
|
|
164
|
-
sim plugin list #
|
|
225
|
+
sim plugin list # show installed plugins
|
|
165
226
|
sim plugin install <name> # e.g. sim plugin install ltspice
|
|
166
227
|
```
|
|
167
228
|
|
|
168
|
-
|
|
229
|
+
Reference implementation to read for shape: [`sim-plugin-ltspice`](https://github.com/svd-ai-lab/sim-plugin-ltspice).
|
|
169
230
|
|
|
170
231
|
**Private plugins** (vendor-IP-sensitive backends not in the public index) install directly by URL — same `sim plugin install` flow:
|
|
171
232
|
|
|
@@ -178,16 +239,6 @@ Per-solver protocols, snippets, and demo workflows live in [`sim-skills`](https:
|
|
|
178
239
|
|
|
179
240
|
---
|
|
180
241
|
|
|
181
|
-
## 🎬 Demo
|
|
182
|
-
|
|
183
|
-
> 📺 **Early preview:** [first walkthrough on YouTube](https://www.youtube.com/watch?v=3Fg6Oph44Ik) — rough cut, a polished recording is still wanted (see below).
|
|
184
|
-
|
|
185
|
-
> **Recording in progress.** A short terminal capture of `sim connect → exec → inspect → screenshot` against a live solver session will land here.
|
|
186
|
-
>
|
|
187
|
-
> Want to contribute the recording? Use [`vhs`](https://github.com/charmbracelet/vhs) or [`asciinema`](https://asciinema.org/) and open a PR against `assets/demo.gif`.
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
242
|
## ✨ Features
|
|
192
243
|
|
|
193
244
|
### 🧠 Built for agents
|
|
@@ -199,7 +250,7 @@ Per-solver protocols, snippets, and demo workflows live in [`sim-skills`](https:
|
|
|
199
250
|
### 🔌 Solver-agnostic
|
|
200
251
|
- **One protocol** (`DriverProtocol`) — every driver is ~200 LOC, shipped as its own `sim-plugin-<name>` package via Python entry points
|
|
201
252
|
- **Persistent + one-shot** from the same CLI — no separate client per mode
|
|
202
|
-
- **
|
|
253
|
+
- **Plugin index** — `sim plugin install <name>` chains an [svd-maintained wheel manifest](https://cdn.svdailab.com/manifest.json) and a [community-maintained catalogue](https://github.com/svd-ai-lab/sim-plugin-index)
|
|
203
254
|
- **Companion skills** in [`sim-skills`](https://github.com/svd-ai-lab/sim-skills) so an LLM picks up each new backend without prior context
|
|
204
255
|
|
|
205
256
|
### 🌐 Remote-friendly
|
|
@@ -213,7 +264,7 @@ Per-solver protocols, snippets, and demo workflows live in [`sim-skills`](https:
|
|
|
213
264
|
|
|
214
265
|
| Command | What it does | Analogy |
|
|
215
266
|
|---|---|---|
|
|
216
|
-
| `sim plugin list / install / uninstall` | Manage
|
|
267
|
+
| `sim plugin list / install / uninstall` | Manage solver plugins (resolver chains svd → community index) | `npm install` |
|
|
217
268
|
| `sim check <solver>` | Detect installations + resolve a profile | `docker info` |
|
|
218
269
|
| `sim env install <profile>` | Bootstrap a profile env (venv + pinned SDK) | `pyenv install` |
|
|
219
270
|
| `sim env list [--catalogue]` | Show bootstrapped envs (and the full catalogue) | `pyenv versions` |
|
|
@@ -289,7 +340,7 @@ That is the entire setup — same `sim-cli-core` package on both sides, same wir
|
|
|
289
340
|
|
|
290
341
|
## 🔗 Related projects
|
|
291
342
|
|
|
292
|
-
- **[`sim-plugin-index`](https://github.com/svd-ai-lab/sim-plugin-index)** —
|
|
343
|
+
- **[`sim-plugin-index`](https://github.com/svd-ai-lab/sim-plugin-index)** — community-maintained plugin catalogue; second of two sources `sim plugin install <name>` resolves against (the first is the svd-maintained manifest at `cdn.svdailab.com/manifest.json`)
|
|
293
344
|
- **[`sim-skills`](https://github.com/svd-ai-lab/sim-skills)** — agent skills, snippets, and demo workflows for each supported solver
|
|
294
345
|
- **[`sim-ltspice`](https://github.com/svd-ai-lab/sim-ltspice)** — standalone Python API for LTspice file formats (used by `sim-plugin-ltspice`)
|
|
295
346
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
sim/__init__.py,sha256=FQjdXr5BNBglRfKQ940zGQ3t5c2rCUjzDCuK2SYIp1Y,345
|
|
2
2
|
sim/__main__.py,sha256=hwGnM_V9it8Ds_SjAg0hRDqIaNp7L0A8Zx4WUbPKi6U,1034
|
|
3
|
-
sim/_plugin_install.py,sha256=
|
|
3
|
+
sim/_plugin_install.py,sha256=pw6LWRJZwsBy02T9sQ2WHkotG9u-eqLv_ZXMRto_PWY,21015
|
|
4
4
|
sim/_timeout.py,sha256=jUWw311yDinvqwWGO55CDgInbyioB3a4_8xovR_8g9E,3697
|
|
5
|
-
sim/cli.py,sha256=
|
|
6
|
-
sim/compat.py,sha256=
|
|
5
|
+
sim/cli.py,sha256=2bInx40nw6UsO76tYLz1Uj-1inwh7p_hVp43yC9hkbc,57976
|
|
6
|
+
sim/compat.py,sha256=zdM58EUEYEVwbmvSFVJGcphp90e9pDp51nseVlToVn0,16128
|
|
7
7
|
sim/config.py,sha256=Omm8WDOgk-cEynPsNEHqTPaONg9OChp4T4pjwcuBLgU,12298
|
|
8
8
|
sim/describe.py,sha256=VO-4nVES_Zidp9J4ZV3pjL9BVlKzHIog5USd0bXYc4I,14337
|
|
9
9
|
sim/driver.py,sha256=8jSmoeIeT9fh5XLaTDse8_d8w34xP-TggU5_-jkzrbE,6573
|
|
10
10
|
sim/history.py,sha256=y70gq8D1tL3po3a_2vhPq8icteeozBquR5vQeyeXFi8,5107
|
|
11
|
-
sim/inspect.py,sha256=
|
|
11
|
+
sim/inspect.py,sha256=DJGiC_KKQyEWOYKwZa7ogiHpxnqVsPyCNAade0QGPbs,44676
|
|
12
12
|
sim/plugins.py,sha256=bzBgKKruMwzC2lWVoH49K-J0ksc6Nv7l4RAcTOW2vbA,17554
|
|
13
13
|
sim/runner.py,sha256=QGT9wAfN7mrO1n7BSn1x49c7kerSCXLscyJ2dCwZCOo,6641
|
|
14
|
-
sim/server.py,sha256=
|
|
15
|
-
sim/session.py,sha256=
|
|
14
|
+
sim/server.py,sha256=E4H8YWt_DOh7sHfxpkCvwhDUrJQGCQP4OCDwMmS_uUs,20034
|
|
15
|
+
sim/session.py,sha256=3gJaOW4YpmdCue6kOQgupE8j4ECZ55_MUDY1ulhx1wI,8359
|
|
16
16
|
sim/drivers/__init__.py,sha256=_azo1aQDJgYPJ70INn3sQ4Z3whXlKAj6_PZVxbZlQ14,5820
|
|
17
17
|
sim/gui/__init__.py,sha256=464_Dy-Un-arkWkRFP1T2IR2sf1O4bMRiZYVgzE_dyg,8446
|
|
18
18
|
sim/gui/_pywinauto_tools.py,sha256=dsBPf1tTpc2LBcZDO9_szwfu_F8Vjel9sdVh0iGcdkc,16949
|
|
@@ -20,9 +20,9 @@ sim/gui/_win32_dialog.py,sha256=4hErvQxY4SwW_fTpX3FTUxhugkRYpkTRdBiBDu9_1DE,4731
|
|
|
20
20
|
sim/gui/LICENSES/ATTRIBUTION.md,sha256=X5EdZV0Gt0FdG9FpeCZ-22I3cqRg9SmoQt-86DqCBak,1150
|
|
21
21
|
sim/testing/__init__.py,sha256=iGwbSfJucKuhNLOiDnUmQCBlkhukWyp7cj89YDhoEOk,855
|
|
22
22
|
sim/testing/protocol_conformance.py,sha256=q0r7QgPoAyU-eMqN4fJWx0XZv8YNolGghu9-zDC8bls,9867
|
|
23
|
-
sim_cli_core-0.3.
|
|
24
|
-
sim_cli_core-0.3.
|
|
25
|
-
sim_cli_core-0.3.
|
|
26
|
-
sim_cli_core-0.3.
|
|
27
|
-
sim_cli_core-0.3.
|
|
28
|
-
sim_cli_core-0.3.
|
|
23
|
+
sim_cli_core-0.3.1.dist-info/METADATA,sha256=AtVifaXRHazLpiAPsIzbwsum3sD5Z73xKN22qLeIcU8,18250
|
|
24
|
+
sim_cli_core-0.3.1.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
25
|
+
sim_cli_core-0.3.1.dist-info/entry_points.txt,sha256=hpg7D0fRhpgmo1IyN35XQPoyIZRSw7SLNG7tW0eacGA,37
|
|
26
|
+
sim_cli_core-0.3.1.dist-info/licenses/LICENSE,sha256=7toF0XzHlqSXvTlZ8W77R6pg2ilzKN73EOG0SioX7wQ,10762
|
|
27
|
+
sim_cli_core-0.3.1.dist-info/licenses/NOTICE,sha256=GQ0HVRFnQwrSFFm-7mYWTTtWDcko0_p2Rdv5t62glts,1752
|
|
28
|
+
sim_cli_core-0.3.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
sim-cli
|
|
2
|
+
Copyright 2026 Weiqi Ji
|
|
3
|
+
|
|
4
|
+
This product is licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
see the accompanying LICENSE file for the full text.
|
|
6
|
+
|
|
7
|
+
================================================================================
|
|
8
|
+
Plugin and runtime dependency notice
|
|
9
|
+
================================================================================
|
|
10
|
+
|
|
11
|
+
sim-cli is a solver-agnostic runtime. Solver and tool integrations are provided
|
|
12
|
+
by separately installed plugins. Plugins may depend on third-party software,
|
|
13
|
+
services, SDKs, or local executables that are not bundled with this repository.
|
|
14
|
+
Users are responsible for complying with the license, copyright, and end-user
|
|
15
|
+
terms that apply to any third-party software they install or use with a plugin.
|
|
16
|
+
|
|
17
|
+
Commercial plugin availability depends on third-party license conditions.
|
|
18
|
+
Contact <contact@svd-ai-lab.com> to discuss commercial plugin access.
|
|
19
|
+
|
|
20
|
+
================================================================================
|
|
21
|
+
Direct runtime dependencies (see pyproject.toml)
|
|
22
|
+
================================================================================
|
|
23
|
+
|
|
24
|
+
click, httpx, fastapi, uvicorn, pyyaml, Pillow, lxml
|
|
25
|
+
- each distributed under its own open-source license (BSD / MIT /
|
|
26
|
+
Apache-2.0 family); consult the respective package for terms.
|
|
27
|
+
|
|
28
|
+
================================================================================
|
|
29
|
+
Trademarks
|
|
30
|
+
================================================================================
|
|
31
|
+
|
|
32
|
+
Product, solver, tool, and company names may be trademarks or registered
|
|
33
|
+
trademarks of their respective owners. sim-cli is an independent open-source
|
|
34
|
+
project and is not affiliated with, endorsed by, or sponsored by any third-party
|
|
35
|
+
vendor unless explicitly stated.
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
sim-cli
|
|
2
|
-
Copyright 2026 Weiqi Ji
|
|
3
|
-
|
|
4
|
-
This product is licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
see the accompanying LICENSE file for the full text.
|
|
6
|
-
|
|
7
|
-
================================================================================
|
|
8
|
-
Third-party solver SDKs (runtime, optional — not bundled)
|
|
9
|
-
================================================================================
|
|
10
|
-
|
|
11
|
-
sim-cli integrates with commercial and open-source solvers by dynamically
|
|
12
|
-
importing their Python SDKs at runtime. No vendor SDK, solver binary, or vendor
|
|
13
|
-
example/tutorial material is redistributed as part of this repository. Users
|
|
14
|
-
install each SDK separately (via `sim env install`, optional extras in
|
|
15
|
-
pyproject.toml, or their own package manager) and are responsible for
|
|
16
|
-
complying with the license, copyright, and end-user agreement that ships
|
|
17
|
-
with each SDK and each underlying solver.
|
|
18
|
-
|
|
19
|
-
The drivers in `src/sim/drivers/` reference, but do not bundle, the following
|
|
20
|
-
third-party Python SDKs. This list is informational and may lag the code —
|
|
21
|
-
see `src/sim/drivers/<name>/compatibility.yaml` and `pyproject.toml` for the
|
|
22
|
-
current version pins.
|
|
23
|
-
|
|
24
|
-
Ansys / PyAnsys family (© ANSYS, Inc.)
|
|
25
|
-
- ansys-fluent-core https://github.com/ansys/pyfluent
|
|
26
|
-
- ansys-workbench-core https://github.com/ansys/pyworkbench
|
|
27
|
-
- ansys-mechanical-core https://github.com/ansys/pymechanical
|
|
28
|
-
- ansys-mapdl-core https://github.com/ansys/pymapdl
|
|
29
|
-
- ansys-dyna-core https://github.com/ansys/pydyna
|
|
30
|
-
- ansys-dpf-core https://github.com/ansys/pydpf-core
|
|
31
|
-
|
|
32
|
-
COMSOL (© COMSOL AB)
|
|
33
|
-
- mph https://github.com/MPh-py/MPh
|
|
34
|
-
(third-party Python wrapper around COMSOL's Java API; requires a COMSOL
|
|
35
|
-
Multiphysics license)
|
|
36
|
-
|
|
37
|
-
MathWorks (© The MathWorks, Inc.)
|
|
38
|
-
- matlabengine https://pypi.org/project/matlabengine/
|
|
39
|
-
(distributed by MathWorks; requires a MATLAB license)
|
|
40
|
-
|
|
41
|
-
Dassault Systèmes / Abaqus, Siemens STAR-CCM+ / Flotherm, BETA CAE ANSA,
|
|
42
|
-
Altair HyperMesh, Ansys ICEM CFD, Ansys CFX
|
|
43
|
-
- Driven via vendor CLIs / journal files / Python-in-solver interpreters.
|
|
44
|
-
No additional Python SDK is redistributed by sim-cli.
|
|
45
|
-
|
|
46
|
-
Open-source solvers and libraries
|
|
47
|
-
- PyBaMM, OpenFOAM, SU2, LAMMPS, CalculiX, Elmer FEM, Gmsh, meshio,
|
|
48
|
-
pyvista, PyMFEM, scikit-fem, SfePy, OpenSeesPy, Cantera, OpenMDAO,
|
|
49
|
-
FiPy, pymoo, Pyomo, SimPy, Trimesh, Devito, CoolProp, scikit-rf,
|
|
50
|
-
pandapower, ParaView (pvpython/pvbatch).
|
|
51
|
-
Each retains its own upstream license; consult the corresponding project
|
|
52
|
-
for terms.
|
|
53
|
-
|
|
54
|
-
================================================================================
|
|
55
|
-
Direct runtime dependencies (see pyproject.toml)
|
|
56
|
-
================================================================================
|
|
57
|
-
|
|
58
|
-
click, httpx, fastapi, uvicorn, pyyaml, Pillow, lxml
|
|
59
|
-
— each distributed under its own open-source license (BSD / MIT / Apache-2.0
|
|
60
|
-
family); consult the respective package for terms.
|
|
61
|
-
|
|
62
|
-
================================================================================
|
|
63
|
-
Trademarks
|
|
64
|
-
================================================================================
|
|
65
|
-
|
|
66
|
-
Product, solver, and company names referenced in this repository (including
|
|
67
|
-
Ansys®, Fluent®, Workbench®, Mechanical®, MAPDL, CFX®, LS-DYNA®, ICEM CFD™,
|
|
68
|
-
Abaqus®, SIMULIA®, COMSOL Multiphysics®, MATLAB®, Simcenter™ STAR-CCM+,
|
|
69
|
-
Simcenter Flotherm™, ANSA®, HyperMesh®, Altair®, ParaView®, OpenFOAM®) are
|
|
70
|
-
trademarks or registered trademarks of their respective owners and are used
|
|
71
|
-
solely for identification. sim-cli is an independent open-source project and
|
|
72
|
-
is not affiliated with, endorsed by, or sponsored by any of these vendors.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|