kushi-agents 5.9.2 → 5.9.4
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/bin/cli.mjs +47 -7
- package/bin/kushi-agents.mjs +5 -0
- package/bin/kushi.mjs +4 -0
- package/package.json +3 -3
package/bin/cli.mjs
CHANGED
|
@@ -5,20 +5,30 @@ import { runMultiHost } from '../src/multi-host.mjs';
|
|
|
5
5
|
|
|
6
6
|
const args = process.argv.slice(2);
|
|
7
7
|
|
|
8
|
-
// ── bare invocation
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
8
|
+
// ── bare invocation ──────────────────────────────────────────────────────────
|
|
9
|
+
// Two bins share this cli (via thin wrappers in bin/kushi.mjs and
|
|
10
|
+
// bin/kushi-agents.mjs that set KUSHI_BIN_NAME). 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 isInstallerBin = process.env.KUSHI_BIN_NAME === 'kushi-agents';
|
|
14
18
|
const forceWelcome = process.env.KUSHI_SKIP_WELCOME === '1';
|
|
15
19
|
const forceWizard = process.env.KUSHI_FORCE_WIZARD === '1';
|
|
16
|
-
const
|
|
17
|
-
|
|
20
|
+
const tty = process.stdin.isTTY && !forceWelcome;
|
|
21
|
+
|
|
22
|
+
if (forceWizard || (tty && isInstallerBin)) {
|
|
18
23
|
const { runSetupWizard } = await import('../src/setup-wizard.mjs');
|
|
19
24
|
await runSetupWizard({ args: [] });
|
|
20
25
|
process.exit(0);
|
|
21
26
|
}
|
|
27
|
+
if (tty) {
|
|
28
|
+
// Bare `kushi` on a TTY — Docker-style help (no side effects).
|
|
29
|
+
await printHelp();
|
|
30
|
+
process.exit(0);
|
|
31
|
+
}
|
|
22
32
|
await printWelcome();
|
|
23
33
|
process.exit(0);
|
|
24
34
|
}
|
|
@@ -347,6 +357,36 @@ if (args.length > 0 && args[0] === 'upgrade') {
|
|
|
347
357
|
}
|
|
348
358
|
}
|
|
349
359
|
|
|
360
|
+
// ── chat-verb guard (v5.9.4+) ───────────────────────────────────────────────
|
|
361
|
+
// These verbs are dispatched by Copilot Chat (`@Kushi <verb>`), not the CLI.
|
|
362
|
+
// If a user types e.g. `kushi ask HCA "..."` in PowerShell, fall through to
|
|
363
|
+
// installer used to silently run. Now we print a friendly redirect.
|
|
364
|
+
const CHAT_ONLY_VERBS = new Set([
|
|
365
|
+
'ask', 'bootstrap', 'refresh', 'status', 'consolidate', 'tour', 'dashboard',
|
|
366
|
+
'aggregate', 'fde-intake', 'fde-report', 'fde-triage', 'link-entities',
|
|
367
|
+
'migrate-files', 'pull', 'schema-evolve', 'teach', 'vertex-link',
|
|
368
|
+
'emit-vertex',
|
|
369
|
+
]);
|
|
370
|
+
if (args.length > 0 && CHAT_ONLY_VERBS.has(args[0])) {
|
|
371
|
+
const verb = args[0];
|
|
372
|
+
const rest = args.slice(1).map(a => a.includes(' ') ? `"${a}"` : a).join(' ');
|
|
373
|
+
console.log(`
|
|
374
|
+
'${verb}' is a chat verb — run it from Copilot Chat, not PowerShell.
|
|
375
|
+
|
|
376
|
+
In VS Code Copilot Chat:
|
|
377
|
+
@Kushi ${verb}${rest ? ' ' + rest : ' <project> [args]'}
|
|
378
|
+
|
|
379
|
+
In Clawpilot:
|
|
380
|
+
kushi ${verb}${rest ? ' ' + rest : ' <project> [args]'}
|
|
381
|
+
|
|
382
|
+
CLI verbs (run from PowerShell): kushi help, kushi wiki, kushi doctor,
|
|
383
|
+
kushi upgrade, kushi uninstall, kushi setup,
|
|
384
|
+
kushi state, kushi promote, kushi global, kushi lint
|
|
385
|
+
See: kushi help
|
|
386
|
+
`);
|
|
387
|
+
process.exit(2);
|
|
388
|
+
}
|
|
389
|
+
|
|
350
390
|
// ── multi-host mode (v5.0.2+) ───────────────────────────────────────────────
|
|
351
391
|
// Trigger when the user passes any of: --vscode, --all-hosts, --uninstall.
|
|
352
392
|
// --clawpilot ALONE continues to route through the legacy main.mjs path so
|
package/bin/kushi.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kushi-agents",
|
|
3
|
-
"version": "5.9.
|
|
3
|
+
"version": "5.9.4",
|
|
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": {
|
|
7
|
-
"kushi": "./bin/
|
|
8
|
-
"kushi-agents": "./bin/
|
|
7
|
+
"kushi": "./bin/kushi.mjs",
|
|
8
|
+
"kushi-agents": "./bin/kushi-agents.mjs"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"bin/",
|