simrig-mcp 0.2.0__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/PKG-INFO +1 -1
  2. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/pyproject.toml +1 -1
  3. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/registry/ac-config-mcp.server.json +2 -2
  4. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/registry/pimax-mcp.server.json +2 -2
  5. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/registry/shakeit-mcp.server.json +2 -2
  6. simrig_mcp-0.2.1/src/simrig_mcp/__init__.py +1 -0
  7. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/src/simrig_mcp/shakeit/audit.py +20 -12
  8. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/src/simrig_mcp/shakeit/server.py +2 -2
  9. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/tests/test_shakeit.py +16 -0
  10. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/uv.lock +1 -1
  11. simrig_mcp-0.2.0/src/simrig_mcp/__init__.py +0 -1
  12. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/.github/scripts/install-mcp-publisher.sh +0 -0
  13. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/.github/workflows/ci.yml +0 -0
  14. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/.github/workflows/publish.yml +0 -0
  15. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/.gitignore +0 -0
  16. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/LICENSE +0 -0
  17. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/README.md +0 -0
  18. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/docs/assetto-corsa-csp-openxr-eye-tracked-vrs.md +0 -0
  19. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/docs/simhub-haptics-one-event-one-owner.md +0 -0
  20. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/glama.json +0 -0
  21. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/run.cmd +0 -0
  22. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/src/simrig_mcp/__main__.py +0 -0
  23. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/src/simrig_mcp/acconfig/__init__.py +0 -0
  24. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/src/simrig_mcp/acconfig/ini.py +0 -0
  25. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/src/simrig_mcp/acconfig/paths.py +0 -0
  26. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/src/simrig_mcp/acconfig/server.py +0 -0
  27. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/src/simrig_mcp/acconfig/store.py +0 -0
  28. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/src/simrig_mcp/compat.py +0 -0
  29. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/src/simrig_mcp/pimax/__init__.py +0 -0
  30. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/src/simrig_mcp/pimax/cli.py +0 -0
  31. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/src/simrig_mcp/pimax/logs.py +0 -0
  32. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/src/simrig_mcp/pimax/server.py +0 -0
  33. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/src/simrig_mcp/shakeit/__init__.py +0 -0
  34. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/tests/conftest.py +0 -0
  35. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/tests/test_acconfig.py +0 -0
  36. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/tests/test_ini.py +0 -0
  37. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/tests/test_install_mod.py +0 -0
  38. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/tests/test_pimax.py +0 -0
  39. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/tests/test_release.py +0 -0
  40. {simrig_mcp-0.2.0 → simrig_mcp-0.2.1}/tests/test_servers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: simrig-mcp
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: MCP servers for sim racing on Windows: Assetto Corsa / CSP / Content Manager config, Pimax VR headsets and SimHub ShakeIt haptics.
5
5
  Project-URL: Homepage, https://github.com/luangrezende/simrig-mcp
6
6
  Project-URL: Issues, https://github.com/luangrezende/simrig-mcp/issues
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "simrig-mcp"
7
- version = "0.2.0"
7
+ version = "0.2.1"
8
8
  description = "MCP servers for sim racing on Windows: Assetto Corsa / CSP / Content Manager config, Pimax VR headsets and SimHub ShakeIt haptics."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -7,12 +7,12 @@
7
7
  "url": "https://github.com/luangrezende/simrig-mcp",
8
8
  "source": "github"
9
9
  },
10
- "version": "0.2.0",
10
+ "version": "0.2.1",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "pypi",
14
14
  "identifier": "simrig-mcp",
15
- "version": "0.2.0",
15
+ "version": "0.2.1",
16
16
  "runtimeHint": "uvx",
17
17
  "transport": {
18
18
  "type": "stdio"
@@ -7,12 +7,12 @@
7
7
  "url": "https://github.com/luangrezende/simrig-mcp",
8
8
  "source": "github"
9
9
  },
10
- "version": "0.2.0",
10
+ "version": "0.2.1",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "pypi",
14
14
  "identifier": "simrig-mcp",
15
- "version": "0.2.0",
15
+ "version": "0.2.1",
16
16
  "runtimeHint": "uvx",
17
17
  "transport": {
18
18
  "type": "stdio"
@@ -7,12 +7,12 @@
7
7
  "url": "https://github.com/luangrezende/simrig-mcp",
8
8
  "source": "github"
9
9
  },
10
- "version": "0.2.0",
10
+ "version": "0.2.1",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "pypi",
14
14
  "identifier": "simrig-mcp",
15
- "version": "0.2.0",
15
+ "version": "0.2.1",
16
16
  "runtimeHint": "uvx",
17
17
  "transport": {
18
18
  "type": "stdio"
@@ -0,0 +1 @@
1
+ __version__ = "0.2.1"
@@ -91,9 +91,16 @@ def effects(profile: dict | None) -> list[dict]:
91
91
  return rows
92
92
 
93
93
 
94
- def bass_outputs(data: dict | None) -> list[dict]:
94
+ def output_manager(data: dict | None, profile: dict | None = None) -> dict:
95
+ """The output settings in effect: a profile saved with "include output settings" carries its own."""
96
+ if profile and profile.get("IncludeOutputSettingsInProfile") and profile.get("OutputManager"):
97
+ return profile["OutputManager"]
98
+ return (data or {}).get("OutputManager") or {}
99
+
100
+
101
+ def bass_outputs(data: dict | None, profile: dict | None = None) -> list[dict]:
95
102
  rows = []
96
- for d in ((data or {}).get("OutputManager") or {}).get("ChannelsSettingsV3") or []:
103
+ for d in output_manager(data, profile).get("ChannelsSettingsV3") or []:
97
104
  channels = []
98
105
  for mode, v in (d.get("GlobalChannelsSettings") or {}).items():
99
106
  channels += [dict(m, mode=mode) for m in parse_maps((v or {}).get("MapsStore"))]
@@ -109,16 +116,15 @@ def bass_outputs(data: dict | None) -> list[dict]:
109
116
  return rows
110
117
 
111
118
 
112
- def motor_outputs(data: dict | None) -> dict[str, dict]:
119
+ def motor_outputs(data: dict | None, profile: dict | None = None) -> dict[str, dict]:
113
120
  """Every motor output block (Arduino, Fanatec, Simagic, ...) that has an effect-to-channel map."""
114
- manager = (data or {}).get("OutputManager") or {}
115
- return {name: block for name, block in manager.items()
121
+ return {name: block for name, block in output_manager(data, profile).items()
116
122
  if isinstance(block, dict) and "EffectToChannelsMapStore" in block}
117
123
 
118
124
 
119
- def motor_routing(data: dict | None) -> list[dict]:
125
+ def motor_routing(data: dict | None, profile: dict | None = None) -> list[dict]:
120
126
  rows = []
121
- for output, block in motor_outputs(data).items():
127
+ for output, block in motor_outputs(data, profile).items():
122
128
  enabled = bool(block.get("IsEnabled")) and not block.get("ArduinoPluginDisabled", False)
123
129
  for effect, positions in (block.get("EffectToChannelsMapStore") or {}).items():
124
130
  for position, v in (positions or {}).items():
@@ -135,7 +141,7 @@ def _finding(severity: str, title: str, detail: str) -> dict:
135
141
  def audit(bass: dict | None, motors: dict | None, belt: dict | None = None) -> dict:
136
142
  bass_profile, motor_profile = active_profile(bass), active_profile(motors)
137
143
  bass_fx, motor_fx = effects(bass_profile), effects(motor_profile)
138
- routed = {r["effect"] for r in motor_routing(motors) if r["output_enabled"] and r["channels"]}
144
+ routed = {r["effect"] for r in motor_routing(motors, motor_profile) if r["output_enabled"] and r["channels"]}
139
145
  for e in bass_fx:
140
146
  e["active"] = e["enabled"]
141
147
  for e in motor_fx:
@@ -181,7 +187,7 @@ def audit(bass: dict | None, motors: dict | None, belt: dict | None = None) -> d
181
187
  "A headroom heuristic, not a clipping measurement. Real clipping can only be measured on the signal "
182
188
  "(record the output by loopback and look for samples at full scale)."))
183
189
 
184
- for d in bass_outputs(bass):
190
+ for d in bass_outputs(bass, bass_profile):
185
191
  if not d["enabled"]:
186
192
  continue
187
193
  if d["highpass_hz"] is None:
@@ -194,7 +200,7 @@ def audit(bass: dict | None, motors: dict | None, belt: dict | None = None) -> d
194
200
  "info", f"{d['device']}: low-pass filter off",
195
201
  "Content above ~100-200 Hz is mostly heard, not felt. A low-pass keeps the shaker on tactile duty."))
196
202
 
197
- if any(r["output_enabled"] for r in motor_routing(motors)):
203
+ if any(r["output_enabled"] for r in motor_routing(motors, motor_profile)):
198
204
  unrouted = sorted(e["effect"] for e in motor_fx if e["enabled"] and not e["routed"] and e["effect"])
199
205
  if unrouted:
200
206
  findings.append(_finding(
@@ -213,8 +219,10 @@ def audit(bass: dict | None, motors: dict | None, belt: dict | None = None) -> d
213
219
 
214
220
  return {
215
221
  "bass": {"profile": (bass_profile or {}).get("Name"), "global_gain": (bass or {}).get("GlobalGain"),
216
- "profile_gain": (bass_profile or {}).get("GlobalGain"), "outputs": bass_outputs(bass), "effects": bass_fx},
217
- "motors": {"profile": (motor_profile or {}).get("Name"), "effects": motor_fx, "routing": motor_routing(motors)},
222
+ "profile_gain": (bass_profile or {}).get("GlobalGain"), "outputs": bass_outputs(bass, bass_profile),
223
+ "effects": bass_fx},
224
+ "motors": {"profile": (motor_profile or {}).get("Name"), "effects": motor_fx,
225
+ "routing": motor_routing(motors, motor_profile)},
218
226
  "belt": {k: v for k, v in belt.items() if k.endswith(("Enabled", "MaxG", "DeadZone", "Curve", "Smoothing",
219
227
  "Frequency", "Amplitude", "Intensity", "Duration"))},
220
228
  "findings": findings,
@@ -35,8 +35,8 @@ class ShakeItTools:
35
35
  """Bass shaker sound outputs (filters, latency mode, channels) and the motor routing table
36
36
  (effect and wheel position -> motor channels with gain) for every motor output (Arduino, Fanatec, ...)."""
37
37
  common, s = self._settings()
38
- return {"ok": True, "source": str(common), "bass_outputs": A.bass_outputs(s["bass"]),
39
- "motor_routing": A.motor_routing(s["motors"])}
38
+ return {"ok": True, "source": str(common), "bass_outputs": A.bass_outputs(s["bass"], A.active_profile(s["bass"])),
39
+ "motor_routing": A.motor_routing(s["motors"], A.active_profile(s["motors"]))}
40
40
 
41
41
 
42
42
  def build_server(tools: ShakeItTools | None = None) -> FastMCP:
@@ -70,6 +70,22 @@ def test_disabled_motor_output_routes_nothing() -> None:
70
70
  assert not any("not routed" in t for t in titles(result))
71
71
 
72
72
 
73
+ def test_profile_with_own_output_settings_overrides_global_routing() -> None:
74
+ data = motors([container("RPMContainer"), container("JumpContainer")],
75
+ {"RPMContainer": "0;0;100;;;", "JumpContainer": "0;1;100;;;"})
76
+ profile = data["Profiles"][1]
77
+ profile["IncludeOutputSettingsInProfile"] = True
78
+ profile["OutputManager"] = {"ArduinoSettings": {"IsEnabled": True, "EffectToChannelsMapStore": {
79
+ "RPMContainer": {"All": {"MapsStore": "0;1;85;;;|1;1;85;;;"}},
80
+ "JumpContainer": {"Front": {"MapsStore": "0;0;100;;;"}}}}}
81
+ routed = {e["effect"]: e["routed"] for e in A.audit(None, data)["motors"]["effects"]}
82
+ assert routed == {"RPMContainer": True, "JumpContainer": False}
83
+
84
+ profile["IncludeOutputSettingsInProfile"] = False
85
+ routed = {e["effect"]: e["routed"] for e in A.audit(None, data)["motors"]["effects"]}
86
+ assert routed == {"RPMContainer": False, "JumpContainer": True}
87
+
88
+
73
89
  def test_stacked_continuous_effects_and_redundant_pairs() -> None:
74
90
  fx = [container(k, gain=90) for k in ("SpeedContainer", "LocalizedSpeedContainer", "RPMContainer",
75
91
  "RoadTextureContainer", "WheelsRumbleContainer")]
@@ -1054,7 +1054,7 @@ wheels = [
1054
1054
 
1055
1055
  [[package]]
1056
1056
  name = "simrig-mcp"
1057
- version = "0.2.0"
1057
+ version = "0.2.1"
1058
1058
  source = { editable = "." }
1059
1059
  dependencies = [
1060
1060
  { name = "mcp" },
@@ -1 +0,0 @@
1
- __version__ = "0.2.0"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes