subconscious-cli 5.0.0 → 5.0.1

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
@@ -32,7 +32,7 @@ subc pi
32
32
  subc <agent> uninstall
33
33
  ```
34
34
 
35
- Running `subc` with no arguments in a terminal opens the native Go TUI. Use
35
+ Running `subc` with no arguments in a terminal opens the native Go TUI immediately. The npm update check runs in the background. If a newer release is found, `subc` leaves the menu and shows the same update prompt as any other command. Skip for now returns to the menu. Use
36
36
  the arrow keys and Enter to launch agents or manage the active profile, `p` to
37
37
  switch profiles, and `q` to quit. The menu includes dedicated **Usage**,
38
38
  **Create profile**, **Coding sessions**, **Set default model**, **Set subagent model**,
package/bin/cli.js CHANGED
@@ -288,22 +288,35 @@ async function main() {
288
288
  process.stdout.isTTY === true &&
289
289
  process.env.TERM !== 'dumb';
290
290
 
291
- // The TUI opens immediately and surfaces catalog, session, and upgrade
292
- // status itself. Keep the blocking npm prompt for explicit commands.
291
+ // Explicit commands can wait on npm. The TUI opens immediately and prompts
292
+ // only after a newer version is found.
293
293
  if (!launchTui) {
294
294
  const update = await showUpdateNotice();
295
295
  if (update?.action === 'updated' || update?.action === 'cancel') return;
296
296
  }
297
297
 
298
298
  if (launchTui) {
299
- const selection = await runTui({ profileName });
300
- if (!selection?.args?.length) return;
301
- if (selection.baseUrl?.trim()) {
302
- process.env.SUBCONSCIOUS_BASE_URL = selection.baseUrl.trim();
299
+ let disableUpdateCheck = false;
300
+ for (;;) {
301
+ const selection = await runTui({ profileName, disableUpdateCheck });
302
+ if (selection?.updatePrompt) {
303
+ const update = await showUpdateNotice({
304
+ currentVersion: selection.installedVersion,
305
+ latestVersion: selection.latestVersion,
306
+ });
307
+ if (update?.action === 'updated' || update?.action === 'cancel') return;
308
+ disableUpdateCheck = true;
309
+ continue;
310
+ }
311
+ if (!selection?.args?.length) return;
312
+ if (selection.baseUrl?.trim()) {
313
+ process.env.SUBCONSCIOUS_BASE_URL = selection.baseUrl.trim();
314
+ }
315
+ parsed = extractProfile(selection.args);
316
+ ({ args, profileName, profileExplicit } = parsed);
317
+ command = args[0];
318
+ break;
303
319
  }
304
- parsed = extractProfile(selection.args);
305
- ({ args, profileName, profileExplicit } = parsed);
306
- command = args[0];
307
320
  }
308
321
 
309
322
  if (!command || command === '--help' || command === '-h' || (command === 'help' && !args[1])) {
Binary file
Binary file
Binary file
Binary file
package/bin/tui.js CHANGED
@@ -33,9 +33,11 @@ export function isTuiResult(result) {
33
33
  return (
34
34
  result !== null &&
35
35
  typeof result === 'object' &&
36
- Array.isArray(result.args) &&
37
- result.args.every((arg) => typeof arg === 'string') &&
38
- (result.baseUrl === undefined || typeof result.baseUrl === 'string')
36
+ (result.updatePrompt === true ||
37
+ (Array.isArray(result.args) && result.args.every((arg) => typeof arg === 'string'))) &&
38
+ (result.baseUrl === undefined || typeof result.baseUrl === 'string') &&
39
+ (result.installedVersion === undefined || typeof result.installedVersion === 'string') &&
40
+ (result.latestVersion === undefined || typeof result.latestVersion === 'string')
39
41
  );
40
42
  }
41
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "subconscious-cli",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "CLI for Subconscious — run Subconscious Code, Claude Code, Codex, OpenCode, DeepSeek Harness, Cursor, Copilot, and Pi",
5
5
  "bin": {
6
6
  "subc": "bin/cli.js"
@@ -46,4 +46,4 @@
46
46
  ],
47
47
  "author": "Subconscious Systems",
48
48
  "license": "MIT"
49
- }
49
+ }