trace-sec 2.1.1 → 2.1.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.
Files changed (2) hide show
  1. package/bin/trace.js +18 -5
  2. package/package.json +1 -1
package/bin/trace.js CHANGED
@@ -83,11 +83,24 @@ 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 userHome = process.env.USERPROFILE || process.env.HOME || '';
87
+ const candidatePythons = [
88
+ process.env.TRACE_PYTHON,
89
+ join(process.cwd(), '.venv', isWin ? 'Scripts' : 'bin', isWin ? 'python.exe' : 'python'),
90
+ join(projectRoot, '.venv', isWin ? 'Scripts' : 'bin', isWin ? 'python.exe' : 'python'),
91
+ isWin ? 'D:\\Startup\\TRACE\\.venv\\Scripts\\python.exe' : null,
92
+ join(userHome, '.trace', 'venv', isWin ? 'Scripts' : 'bin', isWin ? 'python.exe' : 'python'),
93
+ join(userHome, '.trace', 'models', 'venv', isWin ? 'Scripts' : 'bin', isWin ? 'python.exe' : 'python'),
94
+ isWin ? 'python' : 'python3',
95
+ ];
96
+
97
+ let pythonBin = isWin ? 'python' : 'python3';
98
+ for (const cand of candidatePythons) {
99
+ if (cand && existsSync(cand)) {
100
+ pythonBin = cand;
101
+ break;
102
+ }
103
+ }
91
104
 
92
105
  const cliArgs = ['-m', 'trace_engine.cli', ...args];
93
106
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trace-sec",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
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",