ccjk 12.0.0 → 12.0.2
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/dist/chunks/agent-teams.mjs +17 -18
- package/dist/chunks/agent.mjs +105 -102
- package/dist/chunks/agents.mjs +87 -77
- package/dist/chunks/api-cli.mjs +41 -27
- package/dist/chunks/api-providers.mjs +2 -4
- package/dist/chunks/api.mjs +22 -11
- package/dist/chunks/auto-bootstrap.mjs +3 -5
- package/dist/chunks/auto-init.mjs +3 -4
- package/dist/chunks/auto-updater.mjs +103 -91
- package/dist/chunks/banner.mjs +41 -42
- package/dist/chunks/boost.mjs +30 -31
- package/dist/chunks/ccjk-agents.mjs +6 -9
- package/dist/chunks/ccjk-all.mjs +703 -85
- package/dist/chunks/ccjk-config.mjs +6 -6
- package/dist/chunks/ccjk-hooks.mjs +20 -9
- package/dist/chunks/ccjk-mcp.mjs +64 -52
- package/dist/chunks/ccjk-setup.mjs +35 -25
- package/dist/chunks/ccjk-skills.mjs +51 -41
- package/dist/chunks/ccr.mjs +42 -32
- package/dist/chunks/ccu.mjs +16 -12
- package/dist/chunks/check-updates.mjs +30 -19
- package/dist/chunks/claude-code-config-manager.mjs +25 -10
- package/dist/chunks/claude-code-incremental-manager.mjs +65 -51
- package/dist/chunks/claude-config.mjs +2 -2
- package/dist/chunks/claude-wrapper.mjs +9 -6
- package/dist/chunks/cleanup-migration.mjs +1 -1
- package/dist/chunks/cli-hook.mjs +10 -3
- package/dist/chunks/cloud-sync.mjs +1 -1
- package/dist/chunks/codex-config-switch.mjs +58 -45
- package/dist/chunks/codex-provider-manager.mjs +29 -16
- package/dist/chunks/codex-uninstaller.mjs +5 -6
- package/dist/chunks/codex.mjs +89 -89
- package/dist/chunks/commands.mjs +28 -29
- package/dist/chunks/commands2.mjs +4 -3
- package/dist/chunks/commit.mjs +42 -23
- package/dist/chunks/completion.mjs +46 -47
- package/dist/chunks/config-consolidator.mjs +12 -13
- package/dist/chunks/config-switch.mjs +66 -53
- package/dist/chunks/config.mjs +10 -10
- package/dist/chunks/config2.mjs +53 -42
- package/dist/chunks/config3.mjs +107 -93
- package/dist/chunks/constants.mjs +2 -4
- package/dist/chunks/context-loader.mjs +5 -4
- package/dist/chunks/context.mjs +77 -76
- package/dist/chunks/convoy-manager.mjs +4 -4
- package/dist/chunks/dashboard.mjs +28 -29
- package/dist/chunks/doctor.mjs +68 -54
- package/dist/chunks/evolution.mjs +37 -38
- package/dist/chunks/features.mjs +103 -92
- package/dist/chunks/fs-operations.mjs +1 -1
- package/dist/chunks/health-alerts.mjs +1 -1
- package/dist/chunks/health-check.mjs +1 -1
- package/dist/chunks/help.mjs +117 -116
- package/dist/chunks/hook-installer.mjs +3 -2
- package/dist/chunks/index.mjs +20 -6
- package/dist/chunks/index10.mjs +1171 -0
- package/dist/chunks/index11.mjs +1008 -0
- package/dist/chunks/index12.mjs +193 -0
- package/dist/chunks/index13.mjs +218 -0
- package/dist/chunks/index14.mjs +663 -0
- package/dist/chunks/index2.mjs +19 -10
- package/dist/chunks/index3.mjs +19079 -164
- package/dist/chunks/index4.mjs +8 -1171
- package/dist/chunks/index5.mjs +7479 -884
- package/dist/chunks/index6.mjs +160 -184
- package/dist/chunks/index7.mjs +3573 -653
- package/dist/chunks/index8.mjs +19 -0
- package/dist/chunks/index9.mjs +616 -0
- package/dist/chunks/init.mjs +173 -173
- package/dist/chunks/installer.mjs +92 -82
- package/dist/chunks/installer2.mjs +3 -2
- package/dist/chunks/interview.mjs +118 -107
- package/dist/chunks/json-config.mjs +3 -2
- package/dist/chunks/linux.mjs +3863 -0
- package/dist/chunks/macos.mjs +69 -0
- package/dist/chunks/main.mjs +635 -0
- package/dist/chunks/marketplace.mjs +69 -66
- package/dist/chunks/mcp-cli.mjs +61 -48
- package/dist/chunks/mcp.mjs +140 -127
- package/dist/chunks/menu.mjs +85 -85
- package/dist/chunks/metrics-display.mjs +41 -40
- package/dist/chunks/migrator.mjs +4 -5
- package/dist/chunks/monitor.mjs +95 -95
- package/dist/chunks/notification.mjs +151 -141
- package/dist/chunks/onboarding.mjs +26 -15
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/paradigm.mjs +24 -23
- package/dist/chunks/permission-manager.mjs +10 -11
- package/dist/chunks/permissions.mjs +72 -57
- package/dist/chunks/persistence-manager.mjs +97 -84
- package/dist/chunks/persistence.mjs +1 -1
- package/dist/chunks/platform.mjs +29 -29
- package/dist/chunks/plugin.mjs +104 -105
- package/dist/chunks/prompts.mjs +36 -25
- package/dist/chunks/providers.mjs +68 -69
- package/dist/chunks/quick-actions.mjs +71 -72
- package/dist/chunks/quick-provider.mjs +56 -40
- package/dist/chunks/quick-setup.mjs +71 -60
- package/dist/chunks/remote.mjs +21 -12
- package/dist/chunks/session.mjs +116 -103
- package/dist/chunks/sessions.mjs +29 -28
- package/dist/chunks/silent-updater.mjs +8 -10
- package/dist/chunks/simple-config.mjs +13 -10
- package/dist/chunks/skill.mjs +8560 -103
- package/dist/chunks/skills-sync.mjs +5212 -79
- package/dist/chunks/skills.mjs +105 -94
- package/dist/chunks/slash-commands.mjs +36 -37
- package/dist/chunks/smart-defaults.mjs +7 -3
- package/dist/chunks/smart-guide.mjs +1 -1
- package/dist/chunks/startup.mjs +2 -4
- package/dist/chunks/stats.mjs +41 -42
- package/dist/chunks/status.mjs +49 -50
- package/dist/chunks/team.mjs +24 -12
- package/dist/chunks/thinking.mjs +74 -63
- package/dist/chunks/trace.mjs +20 -19
- package/dist/chunks/uninstall.mjs +69 -56
- package/dist/chunks/update.mjs +39 -28
- package/dist/chunks/upgrade-manager.mjs +24 -18
- package/dist/chunks/version-checker.mjs +45 -41
- package/dist/chunks/vim.mjs +81 -69
- package/dist/chunks/windows.mjs +14 -0
- package/dist/chunks/workflows.mjs +15 -15
- package/dist/chunks/wsl.mjs +129 -0
- package/dist/chunks/zero-config.mjs +45 -34
- package/dist/cli.mjs +20 -20
- package/dist/index.mjs +41 -31
- package/dist/shared/ccjk.BAGoDD49.mjs +36 -0
- package/dist/shared/ccjk.BBtCGd_g.mjs +899 -0
- package/dist/shared/{ccjk.CGcy7cNM.mjs → ccjk.BDKUdmLk.mjs} +1 -1
- package/dist/shared/{ccjk.DtMBiwVG.mjs → ccjk.BFxsJM0k.mjs} +1 -1
- package/dist/shared/{ccjk.j4uut26D.mjs → ccjk.BIxuVL3_.mjs} +5 -5
- package/dist/shared/ccjk.BRZ9ww8S.mjs +142 -0
- package/dist/shared/{ccjk.CN0edl87.mjs → ccjk.BSYWk9ML.mjs} +1 -1
- package/dist/shared/{ccjk.Dk1HDseQ.mjs → ccjk.BnpWvs9V.mjs} +75 -75
- package/dist/shared/ccjk.BoApaI4j.mjs +28 -0
- package/dist/shared/{ccjk.DKojSRzw.mjs → ccjk.BrPUmTqm.mjs} +1 -1
- package/dist/shared/{ccjk.C10pepYx.mjs → ccjk.BxSmJ8B7.mjs} +1 -1
- package/dist/shared/ccjk.Bx_rmYfN.mjs +69 -0
- package/dist/shared/ccjk.COweQ1RR.mjs +5 -0
- package/dist/shared/{ccjk.BN90X6oc.mjs → ccjk.CePkJq2S.mjs} +17 -17
- package/dist/shared/{ccjk.Bvoex4TZ.mjs → ccjk.CfKKcvWy.mjs} +1 -1
- package/dist/shared/ccjk.Cjgrln_h.mjs +297 -0
- package/dist/shared/ccjk.CxpGa6MC.mjs +2724 -0
- package/dist/shared/{ccjk.DfwJOEok.mjs → ccjk.D5MFQT7w.mjs} +1 -1
- package/dist/shared/{ccjk.cChAaGgT.mjs → ccjk.DG_o24cZ.mjs} +6 -6
- package/dist/shared/{ccjk.bhFAMRyc.mjs → ccjk.DLLw-h4Y.mjs} +32 -32
- package/dist/shared/ccjk.DOwtZMk8.mjs +4019 -0
- package/dist/shared/{ccjk.BsXQugfY.mjs → ccjk.DTdjs-qK.mjs} +13 -13
- package/dist/shared/{ccjk.Bdhyg3X-.mjs → ccjk.DsYaCCx4.mjs} +1 -1
- package/dist/shared/ccjk.KfSWcGlE.mjs +38 -0
- package/dist/shared/ccjk.RyizuzOI.mjs +21 -0
- package/dist/shared/{ccjk.h7_W-wTs.mjs → ccjk.SPoXMvZD.mjs} +1 -1
- package/dist/shared/ccjk.T_cX87dY.mjs +15 -0
- package/dist/shared/{ccjk.CrB6OYHv.mjs → ccjk._dESH4Rk.mjs} +2 -2
- package/dist/shared/ccjk.bQ7Dh1g4.mjs +249 -0
- package/dist/shared/{ccjk.CBhIZiPz.mjs → ccjk.hoqrwWdN.mjs} +1 -1
- package/dist/shared/{ccjk.BNwRnWYx.mjs → ccjk.s7OCVzdd.mjs} +1230 -33
- package/dist/shared/{ccjk.BOIUTf5z.mjs → ccjk.waa2ikKJ.mjs} +8 -9
- package/package.json +31 -30
- package/dist/shared/ccjk.DHbrGcgg.mjs +0 -13
- package/dist/shared/ccjk.DntgA8fQ.mjs +0 -42
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import 'inquirer';
|
|
1
|
+
import a from './index2.mjs';
|
|
3
2
|
import { EventEmitter } from 'node:events';
|
|
4
3
|
import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'node:fs';
|
|
5
4
|
import { homedir } from 'node:os';
|
|
6
|
-
import { join, dirname } from '
|
|
5
|
+
import { j as join, d as dirname } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
6
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
7
7
|
|
|
8
8
|
const PHASE_CONFIGS = {
|
|
9
9
|
brainstorming: {
|
|
@@ -570,11 +570,11 @@ const PHASE_ICONS = {
|
|
|
570
570
|
finishing: "\u2705"
|
|
571
571
|
};
|
|
572
572
|
const PHASE_COLORS = {
|
|
573
|
-
brainstorming:
|
|
574
|
-
planning:
|
|
575
|
-
implementation:
|
|
576
|
-
review:
|
|
577
|
-
finishing:
|
|
573
|
+
brainstorming: a.magenta,
|
|
574
|
+
planning: a.green,
|
|
575
|
+
implementation: a.yellow,
|
|
576
|
+
review: a.green,
|
|
577
|
+
finishing: a.green
|
|
578
578
|
};
|
|
579
579
|
const STATUS_ICONS = {
|
|
580
580
|
active: "\u{1F504}",
|
|
@@ -603,22 +603,22 @@ async function listAllWorkflows(options = {}) {
|
|
|
603
603
|
return;
|
|
604
604
|
}
|
|
605
605
|
if (workflows.length === 0) {
|
|
606
|
-
console.log(
|
|
606
|
+
console.log(a.yellow("\n \u26A0\uFE0F No workflows found\n"));
|
|
607
607
|
return;
|
|
608
608
|
}
|
|
609
609
|
console.log("");
|
|
610
|
-
console.log(
|
|
611
|
-
console.log(
|
|
612
|
-
console.log(
|
|
610
|
+
console.log(a.bold.cyan("\u2501".repeat(80)));
|
|
611
|
+
console.log(a.bold(` ${"ID".padEnd(10)} ${"Name".padEnd(20)} ${"Phase".padEnd(15)} ${"Status".padEnd(10)} ${"Progress".padEnd(15)}`));
|
|
612
|
+
console.log(a.bold.cyan("\u2501".repeat(80)));
|
|
613
613
|
for (const wf of workflows) {
|
|
614
614
|
const counts = getTaskCounts(wf);
|
|
615
615
|
const progress = `${counts.completed}/${counts.total}`;
|
|
616
616
|
console.log(
|
|
617
|
-
` ${
|
|
617
|
+
` ${a.dim(wf.id.slice(0, 8).padEnd(10))} ${wf.name.slice(0, 18).padEnd(20)} ${formatPhase(wf.currentPhase).padEnd(25)} ${STATUS_ICONS[wf.status]} ${wf.status.padEnd(8)} ${progress}`
|
|
618
618
|
);
|
|
619
619
|
}
|
|
620
|
-
console.log(
|
|
621
|
-
console.log(
|
|
620
|
+
console.log(a.bold.cyan("\u2501".repeat(80)));
|
|
621
|
+
console.log(a.dim(` Total: ${workflows.length} workflows`));
|
|
622
622
|
console.log("");
|
|
623
623
|
}
|
|
624
624
|
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { Buffer } from 'node:buffer';
|
|
2
|
+
import { c as chunkify } from '../shared/ccjk.KfSWcGlE.mjs';
|
|
3
|
+
import { canAccessPowerShell, convertWslPathToWindows, isUncPath } from './index13.mjs';
|
|
4
|
+
import process__default from 'node:process';
|
|
5
|
+
import { promisify } from 'node:util';
|
|
6
|
+
import childProcess from 'node:child_process';
|
|
7
|
+
import 'node:fs/promises';
|
|
8
|
+
import 'node:os';
|
|
9
|
+
import 'node:fs';
|
|
10
|
+
|
|
11
|
+
const execFile = promisify(childProcess.execFile);
|
|
12
|
+
|
|
13
|
+
const powerShellPath = () => `${process__default.env.SYSTEMROOT || process__default.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
14
|
+
|
|
15
|
+
const argumentsPrefix = [
|
|
16
|
+
'-NoProfile',
|
|
17
|
+
'-NonInteractive',
|
|
18
|
+
'-ExecutionPolicy',
|
|
19
|
+
'Bypass',
|
|
20
|
+
'-EncodedCommand',
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
const encodeCommand = command => Buffer.from(command, 'utf16le').toString('base64');
|
|
24
|
+
|
|
25
|
+
const escapeArgument = value => `'${String(value).replaceAll('\'', '\'\'')}'`;
|
|
26
|
+
|
|
27
|
+
const createArguments = command => [...argumentsPrefix, encodeCommand(command)];
|
|
28
|
+
|
|
29
|
+
const executePowerShell = async (command, options = {}) => {
|
|
30
|
+
const {
|
|
31
|
+
powerShellPath: psPath,
|
|
32
|
+
...execFileOptions
|
|
33
|
+
} = options;
|
|
34
|
+
|
|
35
|
+
return execFile(
|
|
36
|
+
psPath ?? powerShellPath(),
|
|
37
|
+
createArguments(command),
|
|
38
|
+
{
|
|
39
|
+
encoding: 'utf8',
|
|
40
|
+
...execFileOptions,
|
|
41
|
+
},
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
executePowerShell.argumentsPrefix = argumentsPrefix;
|
|
46
|
+
executePowerShell.encodeCommand = encodeCommand;
|
|
47
|
+
executePowerShell.escapeArgument = escapeArgument;
|
|
48
|
+
executePowerShell.createArguments = createArguments;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
WSL implementation:
|
|
52
|
+
- Converts WSL paths to Windows paths
|
|
53
|
+
- For Windows-local paths (e.g., `C:\…`), uses PowerShell to send to Recycle Bin
|
|
54
|
+
- For UNC `\\wsl$\…` paths (Linux filesystem), falls back to the Linux trash implementation
|
|
55
|
+
- Processes inputs in chunks to avoid command-line length limits
|
|
56
|
+
- Uses `-LiteralPath` to avoid wildcard expansion
|
|
57
|
+
- Uses `-EncodedCommand` with UTF-16LE to avoid quoting/length issues
|
|
58
|
+
*/
|
|
59
|
+
async function wsl(paths) {
|
|
60
|
+
const interopEnabled = await canAccessPowerShell();
|
|
61
|
+
if (!interopEnabled) {
|
|
62
|
+
const error = new Error('WSL interop is disabled. Enable it or use Linux trash implementation.');
|
|
63
|
+
error.code = 'WSL_INTEROP_DISABLED';
|
|
64
|
+
throw error;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
let linuxTrash;
|
|
68
|
+
|
|
69
|
+
for (const chunk of chunkify(paths, 400)) {
|
|
70
|
+
// eslint-disable-next-line no-await-in-loop
|
|
71
|
+
const windowsPaths = await convertWslPathToWindows(chunk);
|
|
72
|
+
|
|
73
|
+
// Partition into local drive paths and UNC \\wsl$ paths
|
|
74
|
+
const localWindowsPaths = [];
|
|
75
|
+
const uncLinuxPaths = [];
|
|
76
|
+
|
|
77
|
+
for (const [index, windowsPath] of windowsPaths.entries()) {
|
|
78
|
+
if (isUncPath(windowsPath)) {
|
|
79
|
+
uncLinuxPaths.push(chunk[index]);
|
|
80
|
+
} else {
|
|
81
|
+
localWindowsPaths.push(windowsPath);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Fallback to Linux trash for files that live on the Linux filesystem (UNC \\wsl$)
|
|
86
|
+
if (uncLinuxPaths.length > 0) {
|
|
87
|
+
if (!linuxTrash) {
|
|
88
|
+
// eslint-disable-next-line no-await-in-loop
|
|
89
|
+
const {default: linuxTrashImport} = await import('./linux.mjs');
|
|
90
|
+
linuxTrash = linuxTrashImport;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// eslint-disable-next-line no-await-in-loop
|
|
94
|
+
await linuxTrash(uncLinuxPaths);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Nothing to recycle on Windows side for this chunk
|
|
98
|
+
if (localWindowsPaths.length === 0) {
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Build a PowerShell script that:
|
|
103
|
+
// - Decodes a Base64 JSON array of paths
|
|
104
|
+
// - Uses LiteralPath to avoid wildcard expansion
|
|
105
|
+
// - Sends files/dirs to Recycle Bin
|
|
106
|
+
const json = JSON.stringify(localWindowsPaths);
|
|
107
|
+
const base64Json = Buffer.from(json, 'utf8').toString('base64');
|
|
108
|
+
|
|
109
|
+
const psScript = `
|
|
110
|
+
$ErrorActionPreference = 'Stop'
|
|
111
|
+
Add-Type -AssemblyName Microsoft.VisualBasic
|
|
112
|
+
$paths = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String('${base64Json}')) | ConvertFrom-Json
|
|
113
|
+
foreach ($p in $paths) {
|
|
114
|
+
if (Test-Path -LiteralPath $p) {
|
|
115
|
+
if (Test-Path -LiteralPath $p -PathType Container) {
|
|
116
|
+
[Microsoft.VisualBasic.FileIO.FileSystem]::DeleteDirectory($p, 'OnlyErrorDialogs', 'SendToRecycleBin')
|
|
117
|
+
} else {
|
|
118
|
+
[Microsoft.VisualBasic.FileIO.FileSystem]::DeleteFile($p, 'OnlyErrorDialogs', 'SendToRecycleBin')
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
`.trim();
|
|
123
|
+
|
|
124
|
+
// eslint-disable-next-line no-await-in-loop
|
|
125
|
+
await executePowerShell(psScript);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export { wsl as default };
|
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
-
import
|
|
3
|
-
import inquirer from '
|
|
2
|
+
import a from './index2.mjs';
|
|
3
|
+
import { i as inquirer } from './index3.mjs';
|
|
4
4
|
import { SETTINGS_FILE, CLAUDE_DIR } from './constants.mjs';
|
|
5
|
-
import { i18n } from './
|
|
5
|
+
import { i18n } from './index5.mjs';
|
|
6
6
|
import { ensureDir, writeFileAtomic } from './fs-operations.mjs';
|
|
7
7
|
import { m as mergeAndCleanPermissions } from '../shared/ccjk.BiCrMV5O.mjs';
|
|
8
8
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
9
|
-
import '
|
|
10
|
-
import '
|
|
9
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
10
|
+
import 'node:readline';
|
|
11
|
+
import 'stream';
|
|
12
|
+
import 'node:tty';
|
|
11
13
|
import 'node:process';
|
|
12
|
-
import 'node:
|
|
13
|
-
import '
|
|
14
|
-
import '
|
|
14
|
+
import 'node:async_hooks';
|
|
15
|
+
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
16
|
+
import 'node:util';
|
|
17
|
+
import 'tty';
|
|
18
|
+
import 'fs';
|
|
19
|
+
import 'child_process';
|
|
20
|
+
import 'node:path';
|
|
21
|
+
import 'node:os';
|
|
15
22
|
import 'node:crypto';
|
|
23
|
+
import 'buffer';
|
|
24
|
+
import 'string_decoder';
|
|
25
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
26
|
+
import 'node:url';
|
|
16
27
|
import 'node:fs/promises';
|
|
17
28
|
|
|
18
29
|
const MAX_PRESET = {
|
|
@@ -258,46 +269,46 @@ function showPresetDiff(preset, currentSettings) {
|
|
|
258
269
|
const currentPermissions = new Set(currentSettings.permissions?.allow || []);
|
|
259
270
|
const newPermissions = preset.permissions.filter((p) => !currentPermissions.has(p));
|
|
260
271
|
console.log("");
|
|
261
|
-
console.log(
|
|
262
|
-
console.log(
|
|
263
|
-
console.log(`${
|
|
264
|
-
console.log(`${
|
|
272
|
+
console.log(a.bold.cyan(isZh ? "\u{1F4CB} \u9884\u8BBE\u8BE6\u60C5" : "\u{1F4CB} Preset Details"));
|
|
273
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
274
|
+
console.log(`${a.green("Name:")} ${preset.name}`);
|
|
275
|
+
console.log(`${a.green("Description:")} ${preset.description}`);
|
|
265
276
|
console.log("");
|
|
266
277
|
if (newPermissions.length > 0) {
|
|
267
|
-
console.log(
|
|
268
|
-
console.log(
|
|
278
|
+
console.log(a.bold.yellow(isZh ? "\u2728 \u5C06\u6DFB\u52A0\u7684\u6743\u9650:" : "\u2728 Permissions to be added:"));
|
|
279
|
+
console.log(a.dim(` ${isZh ? "\u603B\u8BA1" : "Total"}: ${newPermissions.length} ${isZh ? "\u9879" : "items"}`));
|
|
269
280
|
const bashPerms = newPermissions.filter((p) => p.startsWith("Bash("));
|
|
270
281
|
const filePerms = newPermissions.filter((p) => ["Read", "Edit", "Write", "NotebookEdit"].some((t) => p.startsWith(t)));
|
|
271
282
|
const otherPerms = newPermissions.filter((p) => !bashPerms.includes(p) && !filePerms.includes(p));
|
|
272
283
|
if (bashPerms.length > 0) {
|
|
273
|
-
console.log(` ${
|
|
284
|
+
console.log(` ${a.cyan("Bash:")} ${bashPerms.length} ${isZh ? "\u4E2A\u547D\u4EE4" : "commands"}`);
|
|
274
285
|
}
|
|
275
286
|
if (filePerms.length > 0) {
|
|
276
|
-
console.log(` ${
|
|
287
|
+
console.log(` ${a.cyan("File:")} ${filePerms.length} ${isZh ? "\u4E2A\u64CD\u4F5C" : "operations"}`);
|
|
277
288
|
}
|
|
278
289
|
if (otherPerms.length > 0) {
|
|
279
|
-
console.log(` ${
|
|
290
|
+
console.log(` ${a.cyan("Other:")} ${otherPerms.length} ${isZh ? "\u9879" : "items"}`);
|
|
280
291
|
}
|
|
281
292
|
} else {
|
|
282
|
-
console.log(
|
|
293
|
+
console.log(a.yellow(isZh ? "\u2713 \u6240\u6709\u6743\u9650\u5DF2\u5B58\u5728" : "\u2713 All permissions already exist"));
|
|
283
294
|
}
|
|
284
|
-
console.log(
|
|
295
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
285
296
|
console.log("");
|
|
286
297
|
}
|
|
287
298
|
async function zeroConfig(options = {}) {
|
|
288
299
|
const isZh = i18n.language === "zh-CN";
|
|
289
300
|
if (options.list) {
|
|
290
301
|
console.log("");
|
|
291
|
-
console.log(
|
|
292
|
-
console.log(
|
|
302
|
+
console.log(a.bold.cyan(isZh ? "\u{1F4E6} \u53EF\u7528\u7684\u6743\u9650\u9884\u8BBE" : "\u{1F4E6} Available Permission Presets"));
|
|
303
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
293
304
|
for (const preset of PRESETS) {
|
|
294
|
-
console.log(` ${
|
|
295
|
-
console.log(` ${
|
|
296
|
-
console.log(` ${
|
|
305
|
+
console.log(` ${a.green(preset.id.padEnd(8))} - ${preset.name}`);
|
|
306
|
+
console.log(` ${a.dim(" ".repeat(10))}${preset.description}`);
|
|
307
|
+
console.log(` ${a.dim(" ".repeat(10))}${preset.permissions.length} ${isZh ? "\u9879\u6743\u9650" : "permissions"}`);
|
|
297
308
|
console.log("");
|
|
298
309
|
}
|
|
299
|
-
console.log(
|
|
300
|
-
console.log(
|
|
310
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
311
|
+
console.log(a.gray(isZh ? "\u4F7F\u7528: npx ccjk zc --preset=<id>" : "Usage: npx ccjk zc --preset=<id>"));
|
|
301
312
|
console.log("");
|
|
302
313
|
return;
|
|
303
314
|
}
|
|
@@ -305,8 +316,8 @@ async function zeroConfig(options = {}) {
|
|
|
305
316
|
if (options.preset) {
|
|
306
317
|
selectedPreset = PRESETS.find((p) => p.id === options.preset);
|
|
307
318
|
if (!selectedPreset) {
|
|
308
|
-
console.error(
|
|
309
|
-
console.log(
|
|
319
|
+
console.error(a.red(isZh ? `\u9519\u8BEF: \u672A\u627E\u5230\u9884\u8BBE "${options.preset}"` : `Error: Preset "${options.preset}" not found`));
|
|
320
|
+
console.log(a.gray(isZh ? "\u4F7F\u7528 --list \u67E5\u770B\u53EF\u7528\u9884\u8BBE" : "Use --list to see available presets"));
|
|
310
321
|
return;
|
|
311
322
|
}
|
|
312
323
|
} else {
|
|
@@ -316,7 +327,7 @@ async function zeroConfig(options = {}) {
|
|
|
316
327
|
message: isZh ? "\u9009\u62E9\u6743\u9650\u9884\u8BBE:" : "Select permission preset:",
|
|
317
328
|
choices: addNumbersToChoices(
|
|
318
329
|
PRESETS.map((p) => ({
|
|
319
|
-
name: `${p.name} - ${
|
|
330
|
+
name: `${p.name} - ${a.gray(p.description)}`,
|
|
320
331
|
value: p.id,
|
|
321
332
|
short: p.name
|
|
322
333
|
}))
|
|
@@ -324,7 +335,7 @@ async function zeroConfig(options = {}) {
|
|
|
324
335
|
});
|
|
325
336
|
selectedPreset = PRESETS.find((p) => p.id === presetId);
|
|
326
337
|
if (!selectedPreset) {
|
|
327
|
-
console.log(
|
|
338
|
+
console.log(a.yellow(i18n.t("common:cancelled")));
|
|
328
339
|
return;
|
|
329
340
|
}
|
|
330
341
|
}
|
|
@@ -338,21 +349,21 @@ async function zeroConfig(options = {}) {
|
|
|
338
349
|
default: true
|
|
339
350
|
});
|
|
340
351
|
if (!confirm) {
|
|
341
|
-
console.log(
|
|
352
|
+
console.log(a.yellow(i18n.t("common:cancelled")));
|
|
342
353
|
return;
|
|
343
354
|
}
|
|
344
355
|
}
|
|
345
356
|
if (!options.skipBackup) {
|
|
346
357
|
const backupPath = backupSettings();
|
|
347
358
|
if (backupPath) {
|
|
348
|
-
console.log(
|
|
359
|
+
console.log(a.gray(`\u2714 ${isZh ? "\u5DF2\u5907\u4EFD\u5230" : "Backed up to"}: ${backupPath}`));
|
|
349
360
|
}
|
|
350
361
|
}
|
|
351
362
|
const newSettings = applyPreset(selectedPreset, currentSettings);
|
|
352
363
|
saveSettings(newSettings);
|
|
353
364
|
console.log("");
|
|
354
|
-
console.log(
|
|
355
|
-
console.log(
|
|
365
|
+
console.log(a.green(`\u2705 ${isZh ? "\u6743\u9650\u9884\u8BBE\u5DF2\u5E94\u7528" : "Permission preset applied"}: ${selectedPreset.name}`));
|
|
366
|
+
console.log(a.gray(` ${isZh ? "\u914D\u7F6E\u6587\u4EF6" : "Config file"}: ${SETTINGS_FILE}`));
|
|
356
367
|
console.log("");
|
|
357
368
|
}
|
|
358
369
|
|
package/dist/cli.mjs
CHANGED
|
@@ -523,7 +523,7 @@ const COMMANDS = [
|
|
|
523
523
|
],
|
|
524
524
|
loader: async () => {
|
|
525
525
|
return async (options, action, args) => {
|
|
526
|
-
const { initI18n } = await import('./chunks/
|
|
526
|
+
const { initI18n } = await import('./chunks/index5.mjs');
|
|
527
527
|
await initI18n(options.lang || "zh-CN");
|
|
528
528
|
const actionStr = action;
|
|
529
529
|
const argsArr = args;
|
|
@@ -882,11 +882,11 @@ const COMMANDS = [
|
|
|
882
882
|
return async (options, action, args) => {
|
|
883
883
|
const actionStr = action;
|
|
884
884
|
const argsArr = args || [];
|
|
885
|
-
const { getPostmortemManager } = await import('./chunks/
|
|
885
|
+
const { getPostmortemManager } = await import('./chunks/index10.mjs');
|
|
886
886
|
const manager = getPostmortemManager(process__default.cwd());
|
|
887
887
|
if (actionStr === "init") {
|
|
888
|
-
const ora = (await import('
|
|
889
|
-
const ansis = (await import('
|
|
888
|
+
const ora = (await import('./chunks/index7.mjs')).default;
|
|
889
|
+
const ansis = (await import('./chunks/index2.mjs')).default;
|
|
890
890
|
const spinner = ora("Analyzing historical fix commits...").start();
|
|
891
891
|
try {
|
|
892
892
|
const result = await manager.init();
|
|
@@ -900,8 +900,8 @@ const COMMANDS = [
|
|
|
900
900
|
console.error(error);
|
|
901
901
|
}
|
|
902
902
|
} else if (actionStr === "generate" || actionStr === "gen") {
|
|
903
|
-
const ora = (await import('
|
|
904
|
-
const ansis = (await import('
|
|
903
|
+
const ora = (await import('./chunks/index7.mjs')).default;
|
|
904
|
+
const ansis = (await import('./chunks/index2.mjs')).default;
|
|
905
905
|
const spinner = ora("Analyzing commits...").start();
|
|
906
906
|
try {
|
|
907
907
|
if (options.version) {
|
|
@@ -928,7 +928,7 @@ const COMMANDS = [
|
|
|
928
928
|
console.error(error);
|
|
929
929
|
}
|
|
930
930
|
} else if (actionStr === "list" || actionStr === "ls") {
|
|
931
|
-
const ansis = (await import('
|
|
931
|
+
const ansis = (await import('./chunks/index2.mjs')).default;
|
|
932
932
|
let reports = manager.listReports();
|
|
933
933
|
if (options.severity)
|
|
934
934
|
reports = reports.filter((r) => r.severity === options.severity);
|
|
@@ -953,7 +953,7 @@ ${severityEmoji[r.severity] || "\u26AA"} ${ansis.bold(r.id)}: ${r.title}`);
|
|
|
953
953
|
\u2500 Total: ${reports.length} reports \u2500
|
|
954
954
|
`));
|
|
955
955
|
} else if (actionStr === "show") {
|
|
956
|
-
const ansis = (await import('
|
|
956
|
+
const ansis = (await import('./chunks/index2.mjs')).default;
|
|
957
957
|
const id = argsArr[0];
|
|
958
958
|
if (!id) {
|
|
959
959
|
console.log(ansis.red("Please specify a postmortem ID"));
|
|
@@ -984,8 +984,8 @@ ${ansis.cyan("AI Directives:")}
|
|
|
984
984
|
${report.aiDirectives.map((d) => ` \u2022 ${d}`).join("\n")}
|
|
985
985
|
`);
|
|
986
986
|
} else if (actionStr === "check") {
|
|
987
|
-
const ora = (await import('
|
|
988
|
-
const ansis = (await import('
|
|
987
|
+
const ora = (await import('./chunks/index7.mjs')).default;
|
|
988
|
+
const ansis = (await import('./chunks/index2.mjs')).default;
|
|
989
989
|
const spinner = ora("Checking code...").start();
|
|
990
990
|
try {
|
|
991
991
|
const result = await manager.checkCode({
|
|
@@ -1018,8 +1018,8 @@ ${report.aiDirectives.map((d) => ` \u2022 ${d}`).join("\n")}
|
|
|
1018
1018
|
console.error(error);
|
|
1019
1019
|
}
|
|
1020
1020
|
} else if (actionStr === "sync") {
|
|
1021
|
-
const ora = (await import('
|
|
1022
|
-
const ansis = (await import('
|
|
1021
|
+
const ora = (await import('./chunks/index7.mjs')).default;
|
|
1022
|
+
const ansis = (await import('./chunks/index2.mjs')).default;
|
|
1023
1023
|
const spinner = ora("Syncing to CLAUDE.md...").start();
|
|
1024
1024
|
try {
|
|
1025
1025
|
const result = await manager.syncToClaudeMd();
|
|
@@ -1033,7 +1033,7 @@ ${report.aiDirectives.map((d) => ` \u2022 ${d}`).join("\n")}
|
|
|
1033
1033
|
console.error(error);
|
|
1034
1034
|
}
|
|
1035
1035
|
} else if (actionStr === "stats") {
|
|
1036
|
-
const ansis = (await import('
|
|
1036
|
+
const ansis = (await import('./chunks/index2.mjs')).default;
|
|
1037
1037
|
const index = manager.loadIndex();
|
|
1038
1038
|
if (!index) {
|
|
1039
1039
|
console.log(ansis.yellow("\nNo statistics available"));
|
|
@@ -1703,7 +1703,7 @@ ${ansis.yellow("By Status:")}`);
|
|
|
1703
1703
|
{ flags: "--lang, -l <lang>", description: "Display language (zh-CN, en)" }
|
|
1704
1704
|
],
|
|
1705
1705
|
loader: async () => {
|
|
1706
|
-
const { addCommand } = await import('./chunks/
|
|
1706
|
+
const { addCommand } = await import('./chunks/index11.mjs');
|
|
1707
1707
|
return async (options, source) => {
|
|
1708
1708
|
await addCommand(source, {
|
|
1709
1709
|
type: options.type,
|
|
@@ -1721,7 +1721,7 @@ let currentLang = "en";
|
|
|
1721
1721
|
async function initI18nLazy(lang) {
|
|
1722
1722
|
if (i18nInitialized && lang === currentLang)
|
|
1723
1723
|
return;
|
|
1724
|
-
const { initI18n, changeLanguage } = await import('./chunks/
|
|
1724
|
+
const { initI18n, changeLanguage } = await import('./chunks/index5.mjs');
|
|
1725
1725
|
if (!i18nInitialized) {
|
|
1726
1726
|
await initI18n(lang || "en");
|
|
1727
1727
|
i18nInitialized = true;
|
|
@@ -2022,7 +2022,7 @@ async function runHealthAlertsCheck() {
|
|
|
2022
2022
|
if (!shouldCheck) {
|
|
2023
2023
|
return;
|
|
2024
2024
|
}
|
|
2025
|
-
const { join } = await import('
|
|
2025
|
+
const { join } = await import('./chunks/index8.mjs');
|
|
2026
2026
|
const dbPath = join(
|
|
2027
2027
|
process__default.env.HOME || process__default.env.USERPROFILE || ".",
|
|
2028
2028
|
".ccjk",
|
|
@@ -2043,7 +2043,7 @@ async function showCommandDiscoveryBanner() {
|
|
|
2043
2043
|
if (args.length > 0 && !args[0].startsWith("-")) {
|
|
2044
2044
|
return;
|
|
2045
2045
|
}
|
|
2046
|
-
const { join } = await import('
|
|
2046
|
+
const { join } = await import('./chunks/index8.mjs');
|
|
2047
2047
|
const { existsSync, writeFileSync } = await import('node:fs');
|
|
2048
2048
|
const markerPath = join(
|
|
2049
2049
|
process__default.env.HOME || process__default.env.USERPROFILE || ".",
|
|
@@ -2099,7 +2099,7 @@ async function runLazyCli() {
|
|
|
2099
2099
|
return;
|
|
2100
2100
|
}
|
|
2101
2101
|
}
|
|
2102
|
-
const cac = (await import('
|
|
2102
|
+
const cac = (await import('./chunks/index9.mjs')).default;
|
|
2103
2103
|
const cli = cac("ccjk");
|
|
2104
2104
|
await setupCommandsLazy(cli);
|
|
2105
2105
|
spinner?.stop();
|
|
@@ -2118,7 +2118,7 @@ async function showStartupSpinner() {
|
|
|
2118
2118
|
return null;
|
|
2119
2119
|
}
|
|
2120
2120
|
try {
|
|
2121
|
-
const ora = (await import('
|
|
2121
|
+
const ora = (await import('./chunks/index7.mjs')).default;
|
|
2122
2122
|
const isZh = process__default.env.CCJK_LANG === "zh-CN" || process__default.env.LANG?.includes("zh");
|
|
2123
2123
|
const spinner = ora({
|
|
2124
2124
|
text: isZh ? "\u6B63\u5728\u542F\u52A8 CCJK..." : "Starting CCJK...",
|
|
@@ -2180,7 +2180,7 @@ function bootstrapCloudServices() {
|
|
|
2180
2180
|
await autoBootstrap();
|
|
2181
2181
|
const { autoUpgrade } = await import('./chunks/silent-updater.mjs');
|
|
2182
2182
|
await autoUpgrade();
|
|
2183
|
-
const { activateSuperpowers } = await import('./chunks/
|
|
2183
|
+
const { activateSuperpowers } = await import('./chunks/index12.mjs');
|
|
2184
2184
|
await activateSuperpowers("zh-CN");
|
|
2185
2185
|
const { setupBrainHook } = await import('./chunks/cli-hook.mjs');
|
|
2186
2186
|
await setupBrainHook({
|
package/dist/index.mjs
CHANGED
|
@@ -4,30 +4,40 @@ import * as os from 'node:os';
|
|
|
4
4
|
import { homedir } from 'node:os';
|
|
5
5
|
import * as path from 'node:path';
|
|
6
6
|
import { promisify } from 'node:util';
|
|
7
|
-
import
|
|
7
|
+
import a from './chunks/index2.mjs';
|
|
8
8
|
import { version } from './chunks/package.mjs';
|
|
9
|
-
import {
|
|
9
|
+
import { j as join$1 } from './shared/ccjk.bQ7Dh1g4.mjs';
|
|
10
10
|
export { j as config } from './chunks/config.mjs';
|
|
11
11
|
export { e as extractDisplayName, a as extractString, i as i18nHelpers, n as normalizeRecommendation, b as normalizeRecommendations } from './shared/ccjk.AqnXPAzw.mjs';
|
|
12
|
-
export { a as loggerUtils } from './shared/ccjk.
|
|
12
|
+
export { a as loggerUtils } from './shared/ccjk.DG_o24cZ.mjs';
|
|
13
13
|
export { p as platform } from './chunks/platform.mjs';
|
|
14
14
|
import { Transform } from 'node:stream';
|
|
15
15
|
import { pipeline } from 'node:stream/promises';
|
|
16
|
+
import './shared/ccjk.BAGoDD49.mjs';
|
|
16
17
|
import 'node:url';
|
|
17
|
-
import '
|
|
18
|
-
import 'inquirer';
|
|
19
|
-
import './chunks/constants.mjs';
|
|
18
|
+
import './shared/ccjk.RyizuzOI.mjs';
|
|
20
19
|
import './chunks/index3.mjs';
|
|
20
|
+
import 'node:readline';
|
|
21
|
+
import 'stream';
|
|
22
|
+
import 'node:tty';
|
|
21
23
|
import 'node:process';
|
|
22
|
-
import '
|
|
23
|
-
import '
|
|
24
|
+
import 'node:async_hooks';
|
|
25
|
+
import './shared/ccjk.Cjgrln_h.mjs';
|
|
26
|
+
import 'tty';
|
|
27
|
+
import 'fs';
|
|
28
|
+
import 'child_process';
|
|
29
|
+
import 'node:crypto';
|
|
30
|
+
import 'buffer';
|
|
31
|
+
import 'string_decoder';
|
|
32
|
+
import './chunks/constants.mjs';
|
|
33
|
+
import './chunks/index5.mjs';
|
|
24
34
|
import './chunks/claude-config.mjs';
|
|
25
35
|
import './chunks/json-config.mjs';
|
|
26
36
|
import './chunks/fs-operations.mjs';
|
|
27
|
-
import 'node:crypto';
|
|
28
37
|
import 'node:fs/promises';
|
|
29
38
|
import './shared/ccjk.BiCrMV5O.mjs';
|
|
30
|
-
import '
|
|
39
|
+
import './chunks/main.mjs';
|
|
40
|
+
import 'module';
|
|
31
41
|
|
|
32
42
|
const execAsync$1 = promisify(exec);
|
|
33
43
|
class BaseCodeTool {
|
|
@@ -1604,26 +1614,26 @@ function generateWelcome(scanResult, options = {}) {
|
|
|
1604
1614
|
lines.push(createBorderLine(width, "top"));
|
|
1605
1615
|
if (showVersion) {
|
|
1606
1616
|
const version = getVersion();
|
|
1607
|
-
const title =
|
|
1617
|
+
const title = a.bold.cyan(`\u{1F389} CCJK v${version} - Claude Code JinKu`);
|
|
1608
1618
|
lines.push(centerText(title, width));
|
|
1609
1619
|
} else {
|
|
1610
|
-
const title =
|
|
1620
|
+
const title = a.bold.cyan("\u{1F389} CCJK - Claude Code JinKu");
|
|
1611
1621
|
lines.push(centerText(title, width));
|
|
1612
1622
|
}
|
|
1613
1623
|
if (showStats && scanResult.total > 0) {
|
|
1614
1624
|
lines.push(leftText("", width));
|
|
1615
|
-
lines.push(leftText(
|
|
1625
|
+
lines.push(leftText(a.bold("\u2728 Available Capabilities:"), width));
|
|
1616
1626
|
if (scanResult.skills.length > 0) {
|
|
1617
1627
|
const activeSkills = scanResult.skills.filter((c) => c.status === "active");
|
|
1618
1628
|
if (activeSkills.length > 0) {
|
|
1619
1629
|
lines.push(leftText("", width));
|
|
1620
|
-
lines.push(leftText(
|
|
1630
|
+
lines.push(leftText(a.bold.green(" \u{1F4DA} Skills:"), width));
|
|
1621
1631
|
activeSkills.slice(0, 5).forEach((skill) => {
|
|
1622
1632
|
const trigger = skill.triggers?.[0] || `/${skill.id}`;
|
|
1623
|
-
lines.push(leftText(` ${
|
|
1633
|
+
lines.push(leftText(` ${a.cyan(trigger.padEnd(20))} ${a.dim(skill.description)}`, width));
|
|
1624
1634
|
});
|
|
1625
1635
|
if (activeSkills.length > 5) {
|
|
1626
|
-
lines.push(leftText(` ${
|
|
1636
|
+
lines.push(leftText(` ${a.dim(`... and ${activeSkills.length - 5} more`)}`, width));
|
|
1627
1637
|
}
|
|
1628
1638
|
}
|
|
1629
1639
|
}
|
|
@@ -1631,12 +1641,12 @@ function generateWelcome(scanResult, options = {}) {
|
|
|
1631
1641
|
const activeMcp = scanResult.mcpServices.filter((c) => c.status === "active");
|
|
1632
1642
|
if (activeMcp.length > 0) {
|
|
1633
1643
|
lines.push(leftText("", width));
|
|
1634
|
-
lines.push(leftText(
|
|
1644
|
+
lines.push(leftText(a.bold.green(" \u{1F50C} MCP Services:"), width));
|
|
1635
1645
|
activeMcp.slice(0, 5).forEach((mcp) => {
|
|
1636
|
-
lines.push(leftText(` ${
|
|
1646
|
+
lines.push(leftText(` ${a.cyan(mcp.name.padEnd(20))} ${a.dim(mcp.description)}`, width));
|
|
1637
1647
|
});
|
|
1638
1648
|
if (activeMcp.length > 5) {
|
|
1639
|
-
lines.push(leftText(` ${
|
|
1649
|
+
lines.push(leftText(` ${a.dim(`... and ${activeMcp.length - 5} more`)}`, width));
|
|
1640
1650
|
}
|
|
1641
1651
|
}
|
|
1642
1652
|
}
|
|
@@ -1644,10 +1654,10 @@ function generateWelcome(scanResult, options = {}) {
|
|
|
1644
1654
|
const activeAgents = scanResult.agents.filter((c) => c.status === "active");
|
|
1645
1655
|
if (activeAgents.length > 0) {
|
|
1646
1656
|
lines.push(leftText("", width));
|
|
1647
|
-
lines.push(leftText(
|
|
1657
|
+
lines.push(leftText(a.bold.green(" \u{1F916} Agents:"), width));
|
|
1648
1658
|
activeAgents.forEach((agent) => {
|
|
1649
1659
|
const trigger = agent.triggers?.[0] || agent.id;
|
|
1650
|
-
lines.push(leftText(` ${
|
|
1660
|
+
lines.push(leftText(` ${a.cyan(trigger.padEnd(20))} ${a.dim(agent.description)}`, width));
|
|
1651
1661
|
});
|
|
1652
1662
|
}
|
|
1653
1663
|
}
|
|
@@ -1655,33 +1665,33 @@ function generateWelcome(scanResult, options = {}) {
|
|
|
1655
1665
|
const activeSuperpowers = scanResult.superpowers.filter((c) => c.status === "active");
|
|
1656
1666
|
if (activeSuperpowers.length > 0) {
|
|
1657
1667
|
lines.push(leftText("", width));
|
|
1658
|
-
lines.push(leftText(
|
|
1668
|
+
lines.push(leftText(a.bold.green(" \u26A1 Superpowers:"), width));
|
|
1659
1669
|
activeSuperpowers.slice(0, 3).forEach((sp) => {
|
|
1660
|
-
lines.push(leftText(` ${
|
|
1670
|
+
lines.push(leftText(` ${a.cyan(sp.name.padEnd(20))} ${a.dim(sp.description)}`, width));
|
|
1661
1671
|
});
|
|
1662
1672
|
if (activeSuperpowers.length > 3) {
|
|
1663
|
-
lines.push(leftText(` ${
|
|
1673
|
+
lines.push(leftText(` ${a.dim(`... and ${activeSuperpowers.length - 3} more`)}`, width));
|
|
1664
1674
|
}
|
|
1665
1675
|
}
|
|
1666
1676
|
}
|
|
1667
1677
|
if (scanResult.commands.length > 0) {
|
|
1668
1678
|
const activeCommands = scanResult.commands.filter((c) => c.status === "active").length;
|
|
1669
1679
|
lines.push(leftText("", width));
|
|
1670
|
-
lines.push(leftText(` ${
|
|
1680
|
+
lines.push(leftText(` ${a.green("\u2022")} ${activeCommands} CCJK Command(s) available`, width));
|
|
1671
1681
|
}
|
|
1672
1682
|
if (scanResult.errorCount > 0) {
|
|
1673
1683
|
lines.push(leftText("", width));
|
|
1674
|
-
lines.push(leftText(` ${
|
|
1684
|
+
lines.push(leftText(` ${a.red("\u26A0")} ${scanResult.errorCount} capability error(s) detected`, width));
|
|
1675
1685
|
}
|
|
1676
1686
|
}
|
|
1677
1687
|
if (showRecommendations && !compact) {
|
|
1678
1688
|
lines.push(leftText("", width));
|
|
1679
|
-
lines.push(leftText(
|
|
1680
|
-
lines.push(leftText(` ${
|
|
1681
|
-
lines.push(leftText(` ${
|
|
1689
|
+
lines.push(leftText(a.bold("\u{1F4A1} Quick Tips:"), width));
|
|
1690
|
+
lines.push(leftText(` ${a.green("/ccjk:status")} - View detailed capability status`, width));
|
|
1691
|
+
lines.push(leftText(` ${a.green("/ccjk:help")} - Get help and documentation`, width));
|
|
1682
1692
|
const activeSkills = scanResult.skills.filter((c) => c.status === "active");
|
|
1683
1693
|
if (activeSkills.length > 0 && activeSkills[0].triggers?.[0]) {
|
|
1684
|
-
lines.push(leftText(` ${
|
|
1694
|
+
lines.push(leftText(` ${a.green(activeSkills[0].triggers[0])} - Try this skill`, width));
|
|
1685
1695
|
}
|
|
1686
1696
|
}
|
|
1687
1697
|
lines.push(createBorderLine(width, "bottom"));
|
|
@@ -1699,7 +1709,7 @@ function generateCompactWelcome(scanResult) {
|
|
|
1699
1709
|
parts.push(`${scanResult.superpowers.filter((c) => c.status === "active").length} superpowers`);
|
|
1700
1710
|
}
|
|
1701
1711
|
const summary = parts.join(", ");
|
|
1702
|
-
return
|
|
1712
|
+
return a.dim(`CCJK loaded: ${summary || "no capabilities"}`);
|
|
1703
1713
|
}
|
|
1704
1714
|
function generateRecommendations(scanResult) {
|
|
1705
1715
|
const recommendations = [];
|