metheus-governance-mcp-cli 0.2.14 → 0.2.15
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.
- package/cli.mjs +7 -5
- package/package.json +1 -1
package/cli.mjs
CHANGED
|
@@ -4011,16 +4011,18 @@ function resolveSetupContext(flags) {
|
|
|
4011
4011
|
const ctxpackKey = String(flags["ctxpack-key"] || buildCtxpackKeyFromMeta(workspaceMeta) || "").trim();
|
|
4012
4012
|
const baseURL = String(flags["base-url"] || DEFAULT_SITE_URL).trim().replace(/\/+$/, "");
|
|
4013
4013
|
const workspaceDirRaw = String(flags["workspace-dir"] || "").trim();
|
|
4014
|
-
const workspaceAutoMode = isAutoWorkspaceMode(workspaceDirRaw);
|
|
4015
4014
|
const hasWorkspaceDirFlag = workspaceDirRaw.length > 0;
|
|
4016
|
-
const
|
|
4015
|
+
const workspaceAutoMode = hasWorkspaceDirFlag && isAutoWorkspaceMode(workspaceDirRaw);
|
|
4016
|
+
// Default: auto workspace detection at runtime.
|
|
4017
|
+
// Pin only when user explicitly passes --workspace-dir <path>.
|
|
4018
|
+
const shouldPinWorkspaceDir = hasWorkspaceDirFlag && !workspaceAutoMode;
|
|
4017
4019
|
const workspaceDir = resolveWorkspaceDir(
|
|
4018
|
-
|
|
4020
|
+
shouldPinWorkspaceDir ? workspaceDirRaw : process.cwd(),
|
|
4019
4021
|
);
|
|
4020
4022
|
const serverName = String(flags.name || DEFAULT_SERVER_NAME).trim() || DEFAULT_SERVER_NAME;
|
|
4021
4023
|
const proxyArgs = ["--base-url", `${baseURL}/governance/mcp`];
|
|
4022
|
-
//
|
|
4023
|
-
// Use --workspace-dir
|
|
4024
|
+
// Runtime auto-detection is default.
|
|
4025
|
+
// Use --workspace-dir <path> when deterministic pinning is preferred.
|
|
4024
4026
|
if (shouldPinWorkspaceDir) {
|
|
4025
4027
|
proxyArgs.push("--workspace-dir", workspaceDir);
|
|
4026
4028
|
}
|