fullcourtdefense-cli 1.5.0 → 1.5.1
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/dist/commands/mcpGateway.js +38 -21
- package/dist/version.json +1 -1
- package/package.json +1 -1
|
@@ -1035,7 +1035,7 @@ function wrapJsonConfigFile(file, gatewayConfig, agentClient, dryRun) {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
const downstreamCommand = entry.command;
|
|
1037
1037
|
const downstreamArgs = Array.isArray(entry.args) ? entry.args.map(String) : [];
|
|
1038
|
-
const perServer = { ...gatewayConfig, agentName: perServerAgentName(gatewayConfig.developerName, agentClient, name) };
|
|
1038
|
+
const perServer = { ...gatewayConfig, agentClient, agentName: perServerAgentName(gatewayConfig.developerName, agentClient, name) };
|
|
1039
1039
|
const wrappedArgs = buildGatewayCommandArgs(perServer, downstreamCommand, downstreamArgs, INSTALL_GATEWAY_ARGS);
|
|
1040
1040
|
entry.command = nodeExe;
|
|
1041
1041
|
entry.args = wrappedArgs;
|
|
@@ -1087,30 +1087,47 @@ function unwrapJsonConfigFile(file, dryRun) {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
return { restored };
|
|
1089
1089
|
}
|
|
1090
|
-
/** Parse a single-line TOML scalar string value: command = "x". */
|
|
1090
|
+
/** Parse a single-line TOML scalar string value: command = "x" or command = 'x'. */
|
|
1091
1091
|
function parseTomlInlineString(line) {
|
|
1092
|
-
const
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1092
|
+
const rhs = line.slice(line.indexOf('=') + 1).trim();
|
|
1093
|
+
const basic = rhs.match(/^"((?:[^"\\]|\\.)*)"/);
|
|
1094
|
+
if (basic) {
|
|
1095
|
+
try {
|
|
1096
|
+
return JSON.parse(`"${basic[1]}"`);
|
|
1097
|
+
}
|
|
1098
|
+
catch {
|
|
1099
|
+
return basic[1];
|
|
1100
|
+
}
|
|
1100
1101
|
}
|
|
1102
|
+
const literal = rhs.match(/^'([^']*)'/); // TOML literal string — no escapes
|
|
1103
|
+
if (literal)
|
|
1104
|
+
return literal[1];
|
|
1105
|
+
return undefined;
|
|
1101
1106
|
}
|
|
1102
|
-
/** Parse a single-line TOML string array: args = ["a",
|
|
1107
|
+
/** Parse a single-line TOML string array: args = ["a", 'b'] (mixed quotes ok). */
|
|
1103
1108
|
function parseTomlInlineStringArray(line) {
|
|
1104
|
-
const
|
|
1105
|
-
if (!
|
|
1106
|
-
return undefined;
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1109
|
+
const rhs = line.slice(line.indexOf('=') + 1).trim();
|
|
1110
|
+
if (!rhs.startsWith('[') || !rhs.endsWith(']'))
|
|
1111
|
+
return undefined; // multi-line / not an inline array
|
|
1112
|
+
const inner = rhs.slice(1, -1).trim();
|
|
1113
|
+
if (inner === '')
|
|
1114
|
+
return [];
|
|
1115
|
+
const out = [];
|
|
1116
|
+
const re = /"((?:[^"\\]|\\.)*)"|'([^']*)'/g;
|
|
1117
|
+
let match;
|
|
1118
|
+
while ((match = re.exec(inner)) !== null) {
|
|
1119
|
+
if (match[1] !== undefined) {
|
|
1120
|
+
try {
|
|
1121
|
+
out.push(JSON.parse(`"${match[1]}"`));
|
|
1122
|
+
}
|
|
1123
|
+
catch {
|
|
1124
|
+
out.push(match[1]);
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
else
|
|
1128
|
+
out.push(match[2] ?? '');
|
|
1111
1129
|
}
|
|
1112
|
-
|
|
1113
|
-
return undefined;
|
|
1130
|
+
return out;
|
|
1114
1131
|
}
|
|
1115
1132
|
function tomlStringArrayLiteral(values) {
|
|
1116
1133
|
return `[${values.map(v => JSON.stringify(v)).join(', ')}]`;
|
|
@@ -1169,7 +1186,7 @@ function transformCodexToml(file, mode, gatewayConfig, dryRun) {
|
|
|
1169
1186
|
stats.skippedManaged.push(section.name);
|
|
1170
1187
|
continue;
|
|
1171
1188
|
}
|
|
1172
|
-
const perServer = { ...gatewayConfig, agentName: perServerAgentName(gatewayConfig.developerName, 'codex', section.name) };
|
|
1189
|
+
const perServer = { ...gatewayConfig, agentClient: 'codex', agentName: perServerAgentName(gatewayConfig.developerName, 'codex', section.name) };
|
|
1173
1190
|
const wrappedArgs = buildGatewayCommandArgs(perServer, section.command, section.args || [], INSTALL_GATEWAY_ARGS);
|
|
1174
1191
|
const indent = lines[section.cmdLine].match(/^\s*/)?.[0] || '';
|
|
1175
1192
|
lines[section.cmdLine] = `${indent}command = ${JSON.stringify(nodeExe)}`;
|
package/dist/version.json
CHANGED