trace-sec 2.1.0 → 2.1.2

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.
Files changed (2) hide show
  1. package/bin/trace.js +14 -5
  2. package/package.json +1 -1
package/bin/trace.js CHANGED
@@ -83,11 +83,20 @@ if (args[0] === 'install-skill' || args[0] === 'setup-agent' || args[0] === 'ins
83
83
 
84
84
  // Find virtual environment python or system python
85
85
  const isWin = process.platform === 'win32';
86
- const venvPython = isWin
87
- ? join(projectRoot, '.venv', 'Scripts', 'python.exe')
88
- : join(projectRoot, '.venv', 'bin', 'python');
89
-
90
- const pythonBin = existsSync(venvPython) ? venvPython : (isWin ? 'python' : 'python3');
86
+ const candidatePythons = [
87
+ process.env.TRACE_PYTHON,
88
+ join(process.cwd(), '.venv', isWin ? 'Scripts/python.exe' : 'bin/python'),
89
+ join(projectRoot, '.venv', isWin ? 'Scripts/python.exe' : 'bin/python'),
90
+ isWin ? 'python' : 'python3',
91
+ ];
92
+
93
+ let pythonBin = isWin ? 'python' : 'python3';
94
+ for (const cand of candidatePythons) {
95
+ if (cand && existsSync(cand)) {
96
+ pythonBin = cand;
97
+ break;
98
+ }
99
+ }
91
100
 
92
101
  const cliArgs = ['-m', 'trace_engine.cli', ...args];
93
102
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trace-sec",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Threat Reconnaissance & Attack-path Correlation Engine — Security Verification Layer for Coding Agents with Fine-Tuned SecureBERT 2.0 & Laya AI",
5
5
  "type": "module",
6
6
  "main": "bin/trace.js",