trident-tui 0.8.5 → 0.8.7
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/README.md
CHANGED
|
@@ -20,6 +20,10 @@ npx trident-tui --target ./my-project
|
|
|
20
20
|
npx trident-tui --help
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
> The first run also installs a global **`trident`** (and `strix`) command. Open a
|
|
24
|
+
> new terminal afterwards and you can just run `trident …` directly — no `npx`
|
|
25
|
+
> needed.
|
|
26
|
+
|
|
23
27
|
## Requirements
|
|
24
28
|
|
|
25
29
|
- **Docker** (running) — the security tools execute inside a sandbox container. Install Docker Desktop: https://docs.docker.com/get-docker/
|
package/bin/cli.js
CHANGED
|
@@ -125,11 +125,38 @@ function main() {
|
|
|
125
125
|
process.exit(1);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
// Install the global `trident` (and `strix`) command so it's available
|
|
129
|
+
// directly in future terminals — not only via `npx`. Only (re)install when
|
|
130
|
+
// the installed version differs from the bundled wheel, to stay fast.
|
|
131
|
+
const wheelVer = (path.basename(wheel).match(/strix_agent-(\d+\.\d+\.\d+)/) || [])[1] || null;
|
|
132
|
+
let installedVer = null;
|
|
133
|
+
const vcheck = spawnSync('trident', ['--version'], { encoding: 'utf8' });
|
|
134
|
+
if (vcheck.status === 0 && vcheck.stdout) {
|
|
135
|
+
installedVer = (vcheck.stdout.match(/(\d+\.\d+\.\d+)/) || [])[1] || null;
|
|
136
|
+
}
|
|
137
|
+
if (!installedVer || installedVer !== wheelVer) {
|
|
138
|
+
log('Installing the `trident` command (one-time)…');
|
|
139
|
+
const inst = spawnSync(uv, ['tool', 'install', '--force', wheel], { stdio: 'inherit' });
|
|
140
|
+
if (inst.status === 0) {
|
|
141
|
+
spawnSync(uv, ['tool', 'update-shell'], { stdio: 'ignore' });
|
|
142
|
+
log('[ok] `trident` and `strix` installed — open a NEW terminal to run `trident` directly.');
|
|
143
|
+
} else {
|
|
144
|
+
log('[!] Could not install the global `trident` command; continuing via npx for now.');
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
128
148
|
prePullImage();
|
|
129
149
|
|
|
130
|
-
//
|
|
150
|
+
// Make the freshly-installed command reachable in THIS process, then run it.
|
|
151
|
+
// Falls back to an ephemeral run if it isn't on PATH yet.
|
|
152
|
+
process.env.PATH = LOCAL_BIN + path.delimiter + (process.env.PATH || '');
|
|
131
153
|
const args = process.argv.slice(2);
|
|
132
|
-
|
|
154
|
+
let r;
|
|
155
|
+
if (commandPath('trident')) {
|
|
156
|
+
r = spawnSync('trident', args, { stdio: 'inherit' });
|
|
157
|
+
} else {
|
|
158
|
+
r = spawnSync(uv, ['tool', 'run', '--from', wheel, 'trident', ...args], { stdio: 'inherit' });
|
|
159
|
+
}
|
|
133
160
|
process.exit(r.status === null ? 1 : r.status);
|
|
134
161
|
}
|
|
135
162
|
|
package/package.json
CHANGED
|
index 6a06796..8708b24 100644
|
|
|
Binary file
|