@vybestack/llxprt-code-core 0.8.0-nightly.260116.53b3fef08 → 0.8.0-nightly.260117.da45000b5
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/src/providers/anthropic/AnthropicProvider.d.ts +5 -0
- package/dist/src/providers/anthropic/AnthropicProvider.js +45 -2
- package/dist/src/providers/anthropic/AnthropicProvider.js.map +1 -1
- package/dist/src/providers/gemini/GeminiProvider.js +6 -0
- package/dist/src/providers/gemini/GeminiProvider.js.map +1 -1
- package/dist/src/providers/openai/OpenAIProvider.js +1 -1
- package/dist/src/providers/openai/OpenAIProvider.js.map +1 -1
- package/dist/src/providers/openai/buildResponsesRequest.js +1 -1
- package/dist/src/providers/openai/buildResponsesRequest.js.map +1 -1
- package/dist/src/providers/utils/toolResponsePayload.d.ts +2 -1
- package/dist/src/providers/utils/toolResponsePayload.js +73 -6
- package/dist/src/providers/utils/toolResponsePayload.js.map +1 -1
- package/dist/src/tools/diffOptions.d.ts +3 -2
- package/dist/src/tools/diffOptions.js +6 -2
- package/dist/src/tools/diffOptions.js.map +1 -1
- package/dist/src/utils/parameterCoercion.d.ts +33 -0
- package/dist/src/utils/parameterCoercion.js +195 -0
- package/dist/src/utils/parameterCoercion.js.map +1 -0
- package/package.json +4 -5
|
@@ -21,10 +21,77 @@ export function formatToolResponseText(params) {
|
|
|
21
21
|
return blocks.join('\n');
|
|
22
22
|
}
|
|
23
23
|
export const EMPTY_TOOL_RESULT_PLACEHOLDER = '[no tool result]';
|
|
24
|
-
function
|
|
24
|
+
export function humanizeJsonForDisplay(value) {
|
|
25
|
+
if (!value || typeof value !== 'object') {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
const obj = value;
|
|
29
|
+
// Prefer common text fields to avoid JSON-stringifying multi-line output.
|
|
30
|
+
for (const key of [
|
|
31
|
+
'error',
|
|
32
|
+
'error_text',
|
|
33
|
+
'message',
|
|
34
|
+
'llmContent',
|
|
35
|
+
'returnDisplay',
|
|
36
|
+
]) {
|
|
37
|
+
const v = obj[key];
|
|
38
|
+
if (typeof v === 'string' && v.trim()) {
|
|
39
|
+
return v;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
// Common shell-like result shape.
|
|
43
|
+
const stdout = obj.stdout;
|
|
44
|
+
const stderr = obj.stderr;
|
|
45
|
+
const exitCode = obj.exitCode;
|
|
46
|
+
const hasStdout = typeof stdout === 'string' && stdout.trim();
|
|
47
|
+
const hasStderr = typeof stderr === 'string' && stderr.trim();
|
|
48
|
+
const hasExitCode = typeof exitCode === 'number';
|
|
49
|
+
if (hasStdout || hasStderr || hasExitCode) {
|
|
50
|
+
const out = [];
|
|
51
|
+
if (hasExitCode) {
|
|
52
|
+
out.push('exitCode:');
|
|
53
|
+
out.push(String(exitCode));
|
|
54
|
+
out.push('');
|
|
55
|
+
}
|
|
56
|
+
if (hasStdout) {
|
|
57
|
+
out.push('stdout:');
|
|
58
|
+
out.push(String(stdout)
|
|
59
|
+
.replace(/[\r\n]+$/, '')
|
|
60
|
+
.trimEnd());
|
|
61
|
+
out.push('');
|
|
62
|
+
}
|
|
63
|
+
if (hasStderr) {
|
|
64
|
+
out.push('stderr:');
|
|
65
|
+
out.push(String(stderr)
|
|
66
|
+
.replace(/[\r\n]+$/, '')
|
|
67
|
+
.trimEnd());
|
|
68
|
+
out.push('');
|
|
69
|
+
}
|
|
70
|
+
return out.join('\n').trimEnd();
|
|
71
|
+
}
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
function coerceToString(value, humanizeJson) {
|
|
25
75
|
if (typeof value === 'string') {
|
|
26
76
|
return value;
|
|
27
77
|
}
|
|
78
|
+
// Default behavior is JSON.stringify for non-strings. For OpenAI tool output we may prefer
|
|
79
|
+
// a human-readable multi-line rendering to preserve newlines.
|
|
80
|
+
if (humanizeJson) {
|
|
81
|
+
const human = humanizeJsonForDisplay(value);
|
|
82
|
+
if (typeof human === 'string' && human.trim()) {
|
|
83
|
+
return human;
|
|
84
|
+
}
|
|
85
|
+
// Fallback: pretty JSON (multi-line) instead of a single-line blob.
|
|
86
|
+
if (value && typeof value === 'object') {
|
|
87
|
+
try {
|
|
88
|
+
return JSON.stringify(value, null, 2);
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
// no-op
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
28
95
|
try {
|
|
29
96
|
return JSON.stringify(value);
|
|
30
97
|
}
|
|
@@ -43,7 +110,7 @@ function sanitizeUnicode(result) {
|
|
|
43
110
|
function formatToolResultValue(text) {
|
|
44
111
|
return { value: text, originalLength: text.length };
|
|
45
112
|
}
|
|
46
|
-
function formatToolResult(result) {
|
|
113
|
+
function formatToolResult(result, humanizeJson) {
|
|
47
114
|
if (result === undefined || result === null) {
|
|
48
115
|
return {};
|
|
49
116
|
}
|
|
@@ -58,7 +125,7 @@ function formatToolResult(result) {
|
|
|
58
125
|
return { ...formatted, raw: output };
|
|
59
126
|
}
|
|
60
127
|
}
|
|
61
|
-
const coerced = coerceToString(result);
|
|
128
|
+
const coerced = coerceToString(result, humanizeJson);
|
|
62
129
|
return { value: coerced, raw: coerced };
|
|
63
130
|
}
|
|
64
131
|
function limitToolPayload(serializedResult, block, config) {
|
|
@@ -87,13 +154,13 @@ function limitToolPayload(serializedResult, block, config) {
|
|
|
87
154
|
limitMessage: limited.wasTruncated ? limited.message : undefined,
|
|
88
155
|
};
|
|
89
156
|
}
|
|
90
|
-
export function buildToolResponsePayload(block, config) {
|
|
157
|
+
export function buildToolResponsePayload(block, config, humanizeJson) {
|
|
91
158
|
const payload = {
|
|
92
159
|
status: block.error ? 'error' : 'success',
|
|
93
160
|
toolName: block.toolName,
|
|
94
161
|
result: EMPTY_TOOL_RESULT_PLACEHOLDER,
|
|
95
162
|
};
|
|
96
|
-
const formatted = formatToolResult(block.result);
|
|
163
|
+
const formatted = formatToolResult(block.result, humanizeJson);
|
|
97
164
|
const serializedResult = config && formatted.raw ? formatted.raw : formatted.value;
|
|
98
165
|
if (serializedResult) {
|
|
99
166
|
const limited = limitToolPayload(serializedResult, block, config);
|
|
@@ -107,7 +174,7 @@ export function buildToolResponsePayload(block, config) {
|
|
|
107
174
|
}
|
|
108
175
|
}
|
|
109
176
|
if (block.error) {
|
|
110
|
-
payload.error = coerceToString(block.error);
|
|
177
|
+
payload.error = coerceToString(block.error, humanizeJson);
|
|
111
178
|
}
|
|
112
179
|
return payload;
|
|
113
180
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolResponsePayload.js","sourceRoot":"","sources":["../../../../src/providers/utils/toolResponsePayload.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EACL,cAAc,EACd,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AAErC,MAAM,UAAU,sBAAsB,CAAC,MAKtC;IACC,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAE3B,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACzB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;IAEnC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IAEhC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAA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gBAAgB,GACpB,MAAM,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC;IAC5D,IAAI,gBAAgB,EAAE,CAAC;QACrB,MAAM,OAAO,GAAG,gBAAgB,CAAC,gBAAgB,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QAClE,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;QAC9B,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;YACtB,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;YACzB,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;QAClD,CAAC;QACD,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;YACzB,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QAC9C,CAAC;IACH,CAAC;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
6
|
+
import type { CreatePatchOptionsNonabortable, StructuredPatchOptionsNonabortable } from 'diff';
|
|
7
7
|
import { type DiffStat } from './tools.js';
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const DEFAULT_STRUCTURED_PATCH_OPTIONS: StructuredPatchOptionsNonabortable;
|
|
9
|
+
export declare const DEFAULT_DIFF_OPTIONS: CreatePatchOptionsNonabortable;
|
|
9
10
|
export declare function getDiffStat(fileName: string, oldStr: string, aiStr: string, userStr: string): DiffStat;
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import * as Diff from 'diff';
|
|
7
|
+
export const DEFAULT_STRUCTURED_PATCH_OPTIONS = {
|
|
8
|
+
context: 3,
|
|
9
|
+
ignoreWhitespace: true,
|
|
10
|
+
};
|
|
7
11
|
export const DEFAULT_DIFF_OPTIONS = {
|
|
8
12
|
context: 3,
|
|
9
13
|
ignoreWhitespace: true,
|
|
@@ -24,9 +28,9 @@ export function getDiffStat(fileName, oldStr, aiStr, userStr) {
|
|
|
24
28
|
});
|
|
25
29
|
return { added, removed };
|
|
26
30
|
};
|
|
27
|
-
const patch = Diff.structuredPatch(fileName, fileName, oldStr, aiStr, 'Current', 'Proposed',
|
|
31
|
+
const patch = Diff.structuredPatch(fileName, fileName, oldStr, aiStr, 'Current', 'Proposed', DEFAULT_STRUCTURED_PATCH_OPTIONS);
|
|
28
32
|
const { added: aiAddedLines, removed: aiRemovedLines } = countLines(patch);
|
|
29
|
-
const userPatch = Diff.structuredPatch(fileName, fileName, aiStr, userStr, 'Proposed', 'User',
|
|
33
|
+
const userPatch = Diff.structuredPatch(fileName, fileName, aiStr, userStr, 'Proposed', 'User', DEFAULT_STRUCTURED_PATCH_OPTIONS);
|
|
30
34
|
const { added: userAddedLines, removed: userRemovedLines } = countLines(userPatch);
|
|
31
35
|
return {
|
|
32
36
|
ai_added_lines: aiAddedLines,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diffOptions.js","sourceRoot":"","sources":["../../../src/tools/diffOptions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"diffOptions.js","sourceRoot":"","sources":["../../../src/tools/diffOptions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B,MAAM,CAAC,MAAM,gCAAgC,GAC3C;IACE,OAAO,EAAE,CAAC;IACV,gBAAgB,EAAE,IAAI;CACvB,CAAC;AAEJ,MAAM,CAAC,MA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C5B,gBAAgB,EAAE,cAAc;QAChC,gBAAgB,EAAE,cAAc;QAChC,kBAAkB,EAAE,gBAAgB;KACrC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Vybestack LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Coerce tool parameters to match expected schema types.
|
|
8
|
+
*
|
|
9
|
+
* This function handles common LLM mistakes:
|
|
10
|
+
* - String numbers → actual numbers (e.g., "50" → 50)
|
|
11
|
+
* - String booleans → actual booleans (e.g., "true" → true)
|
|
12
|
+
* - Single values → arrays when schema expects array
|
|
13
|
+
* - JSON strings → objects when schema expects object
|
|
14
|
+
*
|
|
15
|
+
* @param params - The raw parameters from the LLM
|
|
16
|
+
* @param schema - The JSON schema for the tool parameters
|
|
17
|
+
* @returns Coerced parameters matching expected types
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* const schema = {
|
|
22
|
+
* type: 'object',
|
|
23
|
+
* properties: {
|
|
24
|
+
* offset: { type: 'number' },
|
|
25
|
+
* limit: { type: 'number' },
|
|
26
|
+
* },
|
|
27
|
+
* };
|
|
28
|
+
* const params = { offset: '50', limit: '100' };
|
|
29
|
+
* const result = coerceParametersToSchema(params, schema);
|
|
30
|
+
* // result: { offset: 50, limit: 100 }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function coerceParametersToSchema(params: unknown, schema: unknown): unknown;
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Vybestack LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Normalize type string to lowercase for comparison.
|
|
8
|
+
* Handles Gemini's uppercase Type enum (e.g., "ARRAY" → "array", "OBJECT" → "object").
|
|
9
|
+
*/
|
|
10
|
+
function normalizeType(type) {
|
|
11
|
+
if (typeof type === 'string') {
|
|
12
|
+
return type.toLowerCase();
|
|
13
|
+
}
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Coerce a single value to match the expected type from schema.
|
|
18
|
+
*/
|
|
19
|
+
function coerceValue(value, propertySchema) {
|
|
20
|
+
if (value === null || value === undefined) {
|
|
21
|
+
return value;
|
|
22
|
+
}
|
|
23
|
+
const expectedType = normalizeType(propertySchema.type);
|
|
24
|
+
if (!expectedType) {
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
// String → Number coercion
|
|
28
|
+
if ((expectedType === 'number' || expectedType === 'integer') &&
|
|
29
|
+
typeof value === 'string') {
|
|
30
|
+
const trimmed = value.trim();
|
|
31
|
+
if (/^-?(?:\d+|\d*\.\d+)(?:[eE][+-]?\d+)?$/.test(trimmed)) {
|
|
32
|
+
const num = Number(trimmed);
|
|
33
|
+
if (!Number.isFinite(num)) {
|
|
34
|
+
return value;
|
|
35
|
+
}
|
|
36
|
+
// For integer type, only coerce if the value is actually an integer
|
|
37
|
+
if (expectedType === 'integer' && !Number.isInteger(num)) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return num;
|
|
41
|
+
}
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
// String → Boolean coercion
|
|
45
|
+
if (expectedType === 'boolean' && typeof value === 'string') {
|
|
46
|
+
const lower = value.toLowerCase().trim();
|
|
47
|
+
if (lower === 'true') {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
if (lower === 'false') {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
// String → Array coercion (JSON string representing an array)
|
|
56
|
+
if (expectedType === 'array' && typeof value === 'string') {
|
|
57
|
+
const trimmed = value.trim();
|
|
58
|
+
if (trimmed.startsWith('[') && trimmed.endsWith(']')) {
|
|
59
|
+
try {
|
|
60
|
+
const parsed = JSON.parse(trimmed);
|
|
61
|
+
if (Array.isArray(parsed)) {
|
|
62
|
+
// Recursively coerce the parsed array items
|
|
63
|
+
const itemSchema = propertySchema.items;
|
|
64
|
+
if (itemSchema) {
|
|
65
|
+
return parsed.map((item) => coerceValue(item, itemSchema));
|
|
66
|
+
}
|
|
67
|
+
return parsed;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
// Not valid JSON array, fall through to single value wrapping
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
// Single string value → wrap in array
|
|
75
|
+
const itemSchema = propertySchema.items;
|
|
76
|
+
if (itemSchema) {
|
|
77
|
+
return [coerceValue(value, itemSchema)];
|
|
78
|
+
}
|
|
79
|
+
return [value];
|
|
80
|
+
}
|
|
81
|
+
// Single non-string value → Array coercion
|
|
82
|
+
if (expectedType === 'array' && !Array.isArray(value)) {
|
|
83
|
+
const itemSchema = propertySchema.items;
|
|
84
|
+
if (itemSchema) {
|
|
85
|
+
return [coerceValue(value, itemSchema)];
|
|
86
|
+
}
|
|
87
|
+
return [value];
|
|
88
|
+
}
|
|
89
|
+
// Coerce items within arrays
|
|
90
|
+
if (expectedType === 'array' && Array.isArray(value)) {
|
|
91
|
+
const itemSchema = propertySchema.items;
|
|
92
|
+
if (itemSchema) {
|
|
93
|
+
return value.map((item) => coerceValue(item, itemSchema));
|
|
94
|
+
}
|
|
95
|
+
return value;
|
|
96
|
+
}
|
|
97
|
+
// String → Object coercion (JSON string)
|
|
98
|
+
if (expectedType === 'object' && typeof value === 'string') {
|
|
99
|
+
const trimmed = value.trim();
|
|
100
|
+
if (trimmed.startsWith('{') && trimmed.endsWith('}')) {
|
|
101
|
+
try {
|
|
102
|
+
const parsed = JSON.parse(trimmed);
|
|
103
|
+
if (typeof parsed === 'object' && parsed !== null) {
|
|
104
|
+
// Recursively coerce the parsed object if we have nested schema
|
|
105
|
+
if (propertySchema.properties) {
|
|
106
|
+
return coerceObjectProperties(parsed, propertySchema);
|
|
107
|
+
}
|
|
108
|
+
return parsed;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
// Not valid JSON, return original
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return value;
|
|
116
|
+
}
|
|
117
|
+
// Nested object coercion
|
|
118
|
+
if (expectedType === 'object' &&
|
|
119
|
+
typeof value === 'object' &&
|
|
120
|
+
value !== null &&
|
|
121
|
+
!Array.isArray(value) &&
|
|
122
|
+
propertySchema.properties) {
|
|
123
|
+
return coerceObjectProperties(value, propertySchema);
|
|
124
|
+
}
|
|
125
|
+
return value;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Coerce object properties according to schema.
|
|
129
|
+
*/
|
|
130
|
+
function coerceObjectProperties(obj, schema) {
|
|
131
|
+
const properties = schema.properties;
|
|
132
|
+
if (!properties) {
|
|
133
|
+
return obj;
|
|
134
|
+
}
|
|
135
|
+
const result = {};
|
|
136
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
137
|
+
const propertySchema = properties[key];
|
|
138
|
+
if (propertySchema) {
|
|
139
|
+
result[key] = coerceValue(value, propertySchema);
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
// Property not in schema, pass through unchanged
|
|
143
|
+
result[key] = value;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return result;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Coerce tool parameters to match expected schema types.
|
|
150
|
+
*
|
|
151
|
+
* This function handles common LLM mistakes:
|
|
152
|
+
* - String numbers → actual numbers (e.g., "50" → 50)
|
|
153
|
+
* - String booleans → actual booleans (e.g., "true" → true)
|
|
154
|
+
* - Single values → arrays when schema expects array
|
|
155
|
+
* - JSON strings → objects when schema expects object
|
|
156
|
+
*
|
|
157
|
+
* @param params - The raw parameters from the LLM
|
|
158
|
+
* @param schema - The JSON schema for the tool parameters
|
|
159
|
+
* @returns Coerced parameters matching expected types
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```typescript
|
|
163
|
+
* const schema = {
|
|
164
|
+
* type: 'object',
|
|
165
|
+
* properties: {
|
|
166
|
+
* offset: { type: 'number' },
|
|
167
|
+
* limit: { type: 'number' },
|
|
168
|
+
* },
|
|
169
|
+
* };
|
|
170
|
+
* const params = { offset: '50', limit: '100' };
|
|
171
|
+
* const result = coerceParametersToSchema(params, schema);
|
|
172
|
+
* // result: { offset: 50, limit: 100 }
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
export function coerceParametersToSchema(params, schema) {
|
|
176
|
+
// Handle null/undefined params
|
|
177
|
+
if (params === null || params === undefined) {
|
|
178
|
+
return params;
|
|
179
|
+
}
|
|
180
|
+
// Handle null/undefined schema - return params unchanged
|
|
181
|
+
if (!schema || typeof schema !== 'object') {
|
|
182
|
+
return params;
|
|
183
|
+
}
|
|
184
|
+
const typedSchema = schema;
|
|
185
|
+
// Only process object params
|
|
186
|
+
if (typeof params !== 'object' || Array.isArray(params)) {
|
|
187
|
+
return params;
|
|
188
|
+
}
|
|
189
|
+
// If schema doesn't have properties, return unchanged
|
|
190
|
+
if (!typedSchema.properties) {
|
|
191
|
+
return params;
|
|
192
|
+
}
|
|
193
|
+
return coerceObjectProperties(params, typedSchema);
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=parameterCoercion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameterCoercion.js","sourceRoot":"","sources":["../../../src/utils/parameterCoercion.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA2BH;;;GAGG;AACH,SAAS,aAAa,CAAC,IAAa;IAClC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;IAC5B,CAAC;IACD,OAAO,SAAS,CAAC;AACn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,CAAC;IAED,sDAAsD;IACtD,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC;QAC5B,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,sBAAsB,CAC3B,MAAiC,EACjC,WAA6B,CAC9B,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vybestack/llxprt-code-core",
|
|
3
|
-
"version": "0.8.0-nightly.
|
|
3
|
+
"version": "0.8.0-nightly.260117.da45000b5",
|
|
4
4
|
"description": "LLxprt Code Core",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@google/genai": "1.16.0",
|
|
28
28
|
"@iarna/toml": "^2.2.5",
|
|
29
29
|
"@lvce-editor/ripgrep": "^1.6.0",
|
|
30
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
30
|
+
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
31
31
|
"@opentelemetry/api": "^1.9.0",
|
|
32
32
|
"@opentelemetry/exporter-logs-otlp-grpc": "^0.203.0",
|
|
33
33
|
"@opentelemetry/exporter-logs-otlp-http": "^0.203.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"chardet": "^2.1.0",
|
|
47
47
|
"cheerio": "^1.1.2",
|
|
48
48
|
"debug": "^4.3.4",
|
|
49
|
-
"diff": "^
|
|
49
|
+
"diff": "^8.0.3",
|
|
50
50
|
"dotenv": "^17.1.0",
|
|
51
51
|
"execa": "^9.6.0",
|
|
52
52
|
"fast-levenshtein": "^2.0.6",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"strip-ansi": "^7.1.0",
|
|
72
72
|
"tree-sitter-bash": "^0.25.0",
|
|
73
73
|
"turndown": "^7.2.2",
|
|
74
|
-
"undici": "^7.
|
|
74
|
+
"undici": "^7.18.2",
|
|
75
75
|
"web-tree-sitter": "^0.25.10",
|
|
76
76
|
"ws": "^8.18.0",
|
|
77
77
|
"zod": "^3.25.76"
|
|
@@ -88,7 +88,6 @@
|
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@types/debug": "^4.1.12",
|
|
91
|
-
"@types/diff": "^7.0.2",
|
|
92
91
|
"@types/dotenv": "^6.1.1",
|
|
93
92
|
"@types/fast-levenshtein": "^0.0.4",
|
|
94
93
|
"@types/minimatch": "^5.1.2",
|