universal-agent-protocol 0.10.1 → 0.10.3
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/package.json
CHANGED
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
10
10
|
|
|
11
|
-
const { execFileSync } =
|
|
12
|
-
const path =
|
|
13
|
-
const os =
|
|
11
|
+
const { execFileSync } = await import('child_process');
|
|
12
|
+
const path = await import('path');
|
|
13
|
+
const os = await import('os');
|
|
14
14
|
|
|
15
15
|
// Determine Python executable based on platform
|
|
16
16
|
const getPythonExecutable = () => {
|
|
17
|
-
if (os.platform
|
|
17
|
+
if (os.platform === 'win32') {
|
|
18
18
|
return 'python';
|
|
19
19
|
}
|
|
20
20
|
// Try python3 first, then fall back to python
|
|
@@ -27,10 +27,10 @@ const getPythonExecutable = () => {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
// Get the directory where this script is located
|
|
30
|
-
const scriptDir =
|
|
30
|
+
const scriptDir = path.default.dirname(new URL(import.meta.url).pathname);
|
|
31
31
|
|
|
32
32
|
// Build the path to the Python script
|
|
33
|
-
const pythonScript = path.join(scriptDir, 'fix_qwen_chat_template.py');
|
|
33
|
+
const pythonScript = path.default.join(scriptDir, 'fix_qwen_chat_template.py');
|
|
34
34
|
|
|
35
35
|
// Get command line arguments (skip first two: node, script path)
|
|
36
36
|
const args = process.argv.slice(2);
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
10
10
|
|
|
11
|
-
const { execFileSync } =
|
|
12
|
-
const path =
|
|
13
|
-
const os =
|
|
11
|
+
const { execFileSync } = await import('child_process');
|
|
12
|
+
const path = await import('path');
|
|
13
|
+
const os = await import('os');
|
|
14
14
|
|
|
15
15
|
// Determine Python executable based on platform
|
|
16
16
|
const getPythonExecutable = () => {
|
|
17
|
-
if (os.platform
|
|
17
|
+
if (os.platform === 'win32') {
|
|
18
18
|
return 'python';
|
|
19
19
|
}
|
|
20
20
|
// Try python3 first, then fall back to python
|
|
@@ -27,10 +27,10 @@ const getPythonExecutable = () => {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
// Get the directory where this script is located
|
|
30
|
-
const scriptDir =
|
|
30
|
+
const scriptDir = path.default.dirname(new URL(import.meta.url).pathname);
|
|
31
31
|
|
|
32
32
|
// Build the path to the Python script
|
|
33
|
-
const pythonScript = path.join(scriptDir, 'qwen_tool_call_test.py');
|
|
33
|
+
const pythonScript = path.default.join(scriptDir, 'qwen_tool_call_test.py');
|
|
34
34
|
|
|
35
35
|
// Get command line arguments (skip first two: node, script path)
|
|
36
36
|
const args = process.argv.slice(2);
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
10
10
|
|
|
11
|
-
const { execFileSync } =
|
|
12
|
-
const path =
|
|
13
|
-
const os =
|
|
11
|
+
const { execFileSync } = await import('child_process');
|
|
12
|
+
const path = await import('path');
|
|
13
|
+
const os = await import('os');
|
|
14
14
|
|
|
15
15
|
// Determine Python executable based on platform
|
|
16
16
|
const getPythonExecutable = () => {
|
|
17
|
-
if (os.platform
|
|
17
|
+
if (os.platform === 'win32') {
|
|
18
18
|
return 'python';
|
|
19
19
|
}
|
|
20
20
|
// Try python3 first, then fall back to python
|
|
@@ -27,10 +27,10 @@ const getPythonExecutable = () => {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
// Get the directory where this script is located
|
|
30
|
-
const scriptDir =
|
|
30
|
+
const scriptDir = path.default.dirname(new URL(import.meta.url).pathname);
|
|
31
31
|
|
|
32
32
|
// Build the path to the Python script
|
|
33
|
-
const pythonScript = path.join(scriptDir, 'qwen_tool_call_wrapper.py');
|
|
33
|
+
const pythonScript = path.default.join(scriptDir, 'qwen_tool_call_wrapper.py');
|
|
34
34
|
|
|
35
35
|
// Get command line arguments (skip first two: node, script path)
|
|
36
36
|
const args = process.argv.slice(2);
|