Repository navigation
[Clarification & Hotfix] JSON Syntax Error Resolution and CI Pipeline Fix in v3.1.2 #13
Zyrexnn
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Overview
In release
v3.1.1, users configuring OpenCode Interpreter (opencode.json) or Claude Code CLI (.claude.json) encountered the following JSON syntax error during auto-injection:This issue has been resolved in
cybermes-mcp@3.1.2, which is now live on NPM and GitHub Releases.Root Cause Analysis
Aggressive JSON Comment Stripping:
The internal
safeReadJsonhelper implemented inv3.1.1used a standard line-comment regex:This regex stripped everything after
//, including URLs inside string literals (e.g.,"$schema": "https://opencode.ai/config.json"or"baseURL": "https://api.adacode.ai/v1"). This removed closing quotes, leaving trailing newline characters inside unclosed strings and triggering theBad control character in string literalerror inJSON.parse.CI Pipeline Step:
The regression test in
npm/test.jsinadvertently triggered the entry pointmain()during headless CI runs prior to binary extraction, causing the initial CI check to exit with code 1.Fixes Introduced in v3.1.2
safeReadJson(Node.js) andsafe_read_json(Python) now attempt nativeJSON.parsefirst. If parsing fails, a quote-aware regex strips comments strictly outside string literals while preserving URLs and sanitizing trailing commas.test.jsfrom the executable entry point to guarantee clean, reproducible CI runs across all environments.How to Upgrade
Run the injector directly via
npx:For global NPM installations:
All reactions