@mxf-dev/core 2.0.3 → 2.0.5
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/protocols/mcp/services/ExternalMcpServerManager.d.ts +93 -5
- package/dist/protocols/mcp/services/ExternalMcpServerManager.d.ts.map +1 -1
- package/dist/protocols/mcp/services/ExternalMcpServerManager.js +406 -81
- package/dist/protocols/mcp/services/ExternalMcpServerManager.js.map +1 -1
- package/dist/services/AutoCorrectionService.d.ts.map +1 -1
- package/dist/services/AutoCorrectionService.js +8 -0
- package/dist/services/AutoCorrectionService.js.map +1 -1
- package/package.json +1 -1
- package/src/protocols/mcp/services/ExternalMcpServerManager.ts +510 -94
- package/src/services/AutoCorrectionService.ts +8 -0
|
@@ -834,6 +834,14 @@ export class AutoCorrectionService {
|
|
|
834
834
|
private convertType(value: any, targetType: 'string' | 'number' | 'boolean' | 'object'): any {
|
|
835
835
|
switch (targetType) {
|
|
836
836
|
case 'string':
|
|
837
|
+
// Objects and arrays are stringified as JSON so the corrected
|
|
838
|
+
// value stays faithful to what the model sent — String() would
|
|
839
|
+
// collapse an object to "[object Object]", and the "successful"
|
|
840
|
+
// correction would silently destroy the payload without the
|
|
841
|
+
// model ever seeing an error it could learn from.
|
|
842
|
+
if (typeof value === 'object' && value !== null) {
|
|
843
|
+
return JSON.stringify(value);
|
|
844
|
+
}
|
|
837
845
|
return String(value);
|
|
838
846
|
case 'number':
|
|
839
847
|
const num = Number(value);
|