kushi-agents 5.9.2 → 5.9.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/cli.mjs +19 -7
  2. package/package.json +1 -1
package/bin/cli.mjs CHANGED
@@ -5,20 +5,32 @@ import { runMultiHost } from '../src/multi-host.mjs';
5
5
 
6
6
  const args = process.argv.slice(2);
7
7
 
8
- // ── bare invocation (v5.4.0+) ────────────────────────────────────────────────
9
- // v5.4.1: on an interactive TTY, auto-launch the setup wizard (matches the
10
- // ergonomics of `npx create-*`). Non-TTY (CI, scripts, piped stdin) and the
11
- // explicit KUSHI_SKIP_WELCOME=1 still print the welcome card and exit 0, so
12
- // nothing is installed by side-effect.
8
+ // ── bare invocation ──────────────────────────────────────────────────────────
9
+ // Two bins share this cli: `kushi-agents` (the installer entry npx target)
10
+ // and `kushi` (the post-install user verb). Behavior diverges on no-args:
11
+ // - `kushi-agents` (no args) on a TTY → setup wizard (first-install ergonomics)
12
+ // - `kushi` (no args) on a TTY → Docker-style help (post-install verb)
13
+ // - Either, non-TTY → welcome card (no side effects)
14
+ // Override env vars: KUSHI_FORCE_WIZARD=1 forces wizard; KUSHI_SKIP_WELCOME=1
15
+ // forces the welcome card.
13
16
  if (args.length === 0) {
17
+ const path0 = await import('node:path');
18
+ const invokedAs = (process.argv[1] || '').toLowerCase();
19
+ const isInstallerBin = /kushi-agents(\.cmd|\.js|\.mjs)?$/.test(path0.basename(invokedAs));
14
20
  const forceWelcome = process.env.KUSHI_SKIP_WELCOME === '1';
15
21
  const forceWizard = process.env.KUSHI_FORCE_WIZARD === '1';
16
- const interactive = forceWizard || (process.stdin.isTTY && !forceWelcome);
17
- if (interactive) {
22
+ const tty = process.stdin.isTTY && !forceWelcome;
23
+
24
+ if (forceWizard || (tty && isInstallerBin)) {
18
25
  const { runSetupWizard } = await import('../src/setup-wizard.mjs');
19
26
  await runSetupWizard({ args: [] });
20
27
  process.exit(0);
21
28
  }
29
+ if (tty) {
30
+ // Bare `kushi` on a TTY — Docker-style help (no side effects).
31
+ await printHelp();
32
+ process.exit(0);
33
+ }
22
34
  await printWelcome();
23
35
  process.exit(0);
24
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kushi-agents",
3
- "version": "5.9.2",
3
+ "version": "5.9.3",
4
4
  "description": "Install Kushi — multi-source project evidence agent with Comprehensive Structured Capture (CSC) into weekly-only files across Email, Teams, OneNote, Loop, SharePoint, Meetings, CRM, ADO. Meetings retain a sibling verbatim/ audit folder. WorkIQ-only for M365 sources (Graph / m365_* FORBIDDEN as fallbacks; user-paste is first-class). Host-agnostic.",
5
5
  "type": "module",
6
6
  "bin": {