You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Handle osslili informational output in download_and_scan_package (v1.6.1)
- Strip informational messages (e.g., 'ℹ Processing local path...') before JSON parsing
- Find first '{' character and parse from there
- Fixes JSON parsing errors when osslili outputs messages before JSON
- All 7 tests passing
- Document pipx purl2src installation requirement
The `download_and_scan_package` tool was failing with JSON parsing errors when osslili outputs informational messages before JSON output. osslili now prefixes output with messages like:
18
+
```
19
+
ℹ Processing local path: package.tar.gz
20
+
```
21
+
22
+
This caused `json.loads()` to fail with "Expecting value: line 1 column 1 (char 0)"
23
+
24
+
**Root Cause:**
25
+
Line 2026 in server.py attempted to parse osslili stdout directly as JSON without stripping informational messages.
26
+
27
+
**Solution:**
28
+
Added preprocessing to find the first `{` character and parse JSON from that position, effectively stripping any informational messages before the JSON payload.
29
+
30
+
**Changes:**
31
+
- mcp_semclone/server.py:
32
+
* Added informational message stripping before JSON parsing (lines 2026-2031)
33
+
* Finds first `{` in output and parses from there
34
+
* Preserves backward compatibility with osslili versions that don't output messages
35
+
36
+
**Installation Note:**
37
+
When using pipx, ensure `purl2src` is installed with console scripts enabled:
0 commit comments