Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,12 @@ npm pack --dry-run

## Release notes

### v5.0.16

- Fixed `gx doctor` runtime crash (`parseDoctorArgs is not defined`) by restoring the doctor argument parser for `--target` and `--strict`.
- Added regression coverage that asserts the doctor parser function exists in `bin/multiagent-safety.js`.
- Bumped package version from `5.0.15` to `5.0.16`.

### v5.0.15

- Added `gx setup --parent-workspace-view` to generate a parent-folder VS Code workspace (`../<repo>-branches.code-workspace`) that shows both the base repo and `.omx/agent-worktrees` in Source Control.
Expand Down
23 changes: 23 additions & 0 deletions bin/multiagent-safety.js
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,29 @@ function parseSetupArgs(rawArgs, defaults) {
return parseCommonArgs(forwardedArgs, setupDefaults);
}

function parseDoctorArgs(rawArgs) {
const options = {
target: process.cwd(),
strict: false,
};

for (let index = 0; index < rawArgs.length; index += 1) {
const arg = rawArgs[index];
if (arg === '--target' || arg === '-t') {
options.target = requireValue(rawArgs, index, '--target');
index += 1;
continue;
}
if (arg === '--strict') {
options.strict = true;
continue;
}
throw new Error(`Unknown option: ${arg}`);
}

return options;
}

function normalizeWorkspacePath(relativePath) {
return String(relativePath || '.').replace(/\\/g, '/');
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@imdeadpool/guardex",
"version": "5.0.15",
"version": "5.0.16",
"description": "GuardeX: the Guardian T-Rex for your repo, with hardened multi-agent git guardrails.",
"license": "MIT",
"preferGlobal": true,
Expand Down
7 changes: 7 additions & 0 deletions test/metadata.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,10 @@ test('critical runtime helper scripts stay in sync with templates', () => {
);
}
});

test('doctor CLI parser exists to prevent runtime ReferenceError regressions', () => {
const cliPath = path.join(repoRoot, 'bin', 'multiagent-safety.js');
const cliSource = fs.readFileSync(cliPath, 'utf8');
assert.match(cliSource, /function parseDoctorArgs\(rawArgs\)/);
assert.match(cliSource, /const options = parseDoctorArgs\(rawArgs\);/);
});