trident-tui 0.9.3 → 0.9.5

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
@@ -10,7 +10,7 @@ On first run it:
10
10
 
11
11
  1. installs [`uv`](https://docs.astral.sh/uv/) (a fast Python manager) if you don't have it,
12
12
  2. pulls the Docker sandbox image,
13
- 3. opens a **Configure LLM** screen where you paste your model (e.g. `anthropic/claude-sonnet-4-6`) and **API key** — saved to `~/.strix/cli-config.json`, so you only do it once.
13
+ 3. opens a **Configure LLM** screen where you paste your model (e.g. `anthropic/claude-sonnet-4-6`) and **API key** — saved to `~/.trident/cli-config.json`, so you only do it once.
14
14
 
15
15
  Then scan something:
16
16
 
@@ -20,7 +20,7 @@ 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
23
+ > The first run also installs a global **`trident`** (and `trident`) command. Open a
24
24
  > new terminal afterwards and you can just run `trident …` directly — no `npx`
25
25
  > needed.
26
26
 
package/bin/cli.js CHANGED
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * On first run Trident opens a "Configure LLM" screen and asks for your model
12
12
  * (e.g. anthropic/claude-sonnet-4-6) and API key. Settings are saved to
13
- * ~/.strix/cli-config.json so you only enter them once.
13
+ * ~/.trident/cli-config.json so you only enter them once.
14
14
  *
15
15
  * Docker is required (the security tools run inside a sandbox container).
16
16
  */
@@ -21,7 +21,7 @@ const fs = require('fs');
21
21
  const os = require('os');
22
22
  const path = require('path');
23
23
 
24
- const SANDBOX_IMAGE = 'ghcr.io/usestrix/strix-sandbox:0.1.13';
24
+ const SANDBOX_IMAGE = 'ghcr.io/esprit-labs/trident-sandbox:0.1.13';
25
25
  const isWin = process.platform === 'win32';
26
26
  const HOME = os.homedir();
27
27
  const LOCAL_BIN = path.join(HOME, '.local', 'bin');
@@ -82,6 +82,19 @@ function findWheel() {
82
82
  return files.length ? path.join(vendor, files[0]) : null;
83
83
  }
84
84
 
85
+ // Legacy sandbox image from the old build. Named here ONLY so we can delete it
86
+ // from machines that upgraded — it is never pulled or shown to the user.
87
+ const LEGACY_SANDBOX_IMAGE = 'ghcr.io/usestrix/strix-sandbox:0.1.13';
88
+
89
+ // Best-effort: remove the old sandbox image once the new one is in place, to
90
+ // reclaim disk on upgraded machines. Silent — failures are ignored.
91
+ function removeLegacyImage() {
92
+ if (!commandPath('docker')) return;
93
+ if (spawnSync('docker', ['image', 'inspect', LEGACY_SANDBOX_IMAGE], { stdio: 'ignore' }).status === 0) {
94
+ spawnSync('docker', ['image', 'rm', '-f', LEGACY_SANDBOX_IMAGE], { stdio: 'ignore' });
95
+ }
96
+ }
97
+
85
98
  // Pre-pull the sandbox image with the docker CLI. This is far more reliable
86
99
  // than letting the Python SDK stream the pull on first run (esp. on Windows).
87
100
  function prePullImage() {
@@ -100,12 +113,17 @@ function prePullImage() {
100
113
  }
101
114
  if (spawnSync('docker', ['image', 'inspect', SANDBOX_IMAGE], { stdio: 'ignore' }).status === 0) {
102
115
  log('[ok] Docker sandbox image already present.');
116
+ removeLegacyImage();
103
117
  return;
104
118
  }
105
119
  log('Downloading the Docker sandbox image (one-time, a few GB)...');
106
120
  const r = spawnSync('docker', ['pull', SANDBOX_IMAGE], { stdio: 'inherit' });
107
- if (r.status === 0) log('[ok] Sandbox image downloaded.');
108
- else log('[!] Could not pull the image now; Trident will retry on your first scan.');
121
+ if (r.status === 0) {
122
+ log('[ok] Sandbox image downloaded.');
123
+ removeLegacyImage();
124
+ } else {
125
+ log('[!] Could not pull the image now; Trident will retry on your first scan.');
126
+ }
109
127
  }
110
128
 
111
129
  function main() {
@@ -126,9 +144,9 @@ function main() {
126
144
  }
127
145
 
128
146
  // Version baked into the bundled wheel filename (matches both the legacy
129
- // `strix_agent-` and the new `trident_agent-` naming).
147
+ // `trident_agent-` and the new `trident_agent-` naming).
130
148
  const wheelVer =
131
- (path.basename(wheel).match(/(?:strix|trident)_agent-(\d+\.\d+\.\d+)/) || [])[1] || null;
149
+ (path.basename(wheel).match(/(?:trident|trident)_agent-(\d+\.\d+\.\d+)/) || [])[1] || null;
132
150
 
133
151
  // Return the working global `trident` version, or null if it is not installed
134
152
  // OR is installed-but-broken (a half-removed previous install throws
@@ -149,10 +167,10 @@ function main() {
149
167
  log('Installing the `trident` command (one-time)…');
150
168
  // Clear any previous (possibly broken or locked) install first, so a Windows
151
169
  // file lock on the old Scripts dir can't fail the --force reinstall. Both
152
- // the legacy `strix-agent` and the current `trident-agent` tool names are
170
+ // the legacy `trident-agent` and the current `trident-agent` tool names are
153
171
  // cleared. Errors are ignored — the wheel fallback covers us regardless.
154
172
  spawnSync(uv, ['tool', 'uninstall', 'trident-agent'], { stdio: 'ignore' });
155
- spawnSync(uv, ['tool', 'uninstall', 'strix-agent'], { stdio: 'ignore' });
173
+ spawnSync(uv, ['tool', 'uninstall', 'trident-agent'], { stdio: 'ignore' });
156
174
  const inst = spawnSync(uv, ['tool', 'install', '--force', wheel], { stdio: 'inherit' });
157
175
  if (inst.status === 0) {
158
176
  spawnSync(uv, ['tool', 'update-shell'], { stdio: 'ignore' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trident-tui",
3
- "version": "0.9.3",
3
+ "version": "0.9.5",
4
4
  "description": "Trident — AI penetration-testing agent. Run it with `npx trident-tui`; it bootstraps everything and prompts for your API key.",
5
5
  "bin": {
6
6
  "trident-tui": "bin/cli.js"