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
package/dist/chunks/stats.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { i18n } from './
|
|
1
|
+
import a from './index2.mjs';
|
|
2
|
+
import { i18n } from './index5.mjs';
|
|
3
3
|
import { existsSync, mkdirSync, readFileSync, writeFileSync, readdirSync } from 'node:fs';
|
|
4
4
|
import { homedir } from 'node:os';
|
|
5
|
-
import { join } from '
|
|
5
|
+
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
6
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
6
7
|
import 'node:process';
|
|
7
8
|
import 'node:url';
|
|
8
|
-
import 'i18next';
|
|
9
|
-
import 'i18next-fs-backend';
|
|
10
9
|
|
|
11
10
|
class StatsStorage {
|
|
12
11
|
baseDir;
|
|
@@ -235,14 +234,14 @@ async function stats(options = {}) {
|
|
|
235
234
|
const { startDate, endDate } = storage.getDateRangeForPeriod(period);
|
|
236
235
|
const records = storage.getRecordsByDateRange(startDate, endDate);
|
|
237
236
|
if (records.length === 0) {
|
|
238
|
-
console.log(
|
|
237
|
+
console.log(a.yellow(`
|
|
239
238
|
${i18n.t("stats:noData")}
|
|
240
239
|
`));
|
|
241
240
|
return;
|
|
242
241
|
}
|
|
243
242
|
const filteredRecords = options.provider ? records.filter((r) => r.provider === options.provider) : records;
|
|
244
243
|
if (filteredRecords.length === 0) {
|
|
245
|
-
console.log(
|
|
244
|
+
console.log(a.yellow(`
|
|
246
245
|
${i18n.t("stats:noData")} for provider: ${options.provider}
|
|
247
246
|
`));
|
|
248
247
|
return;
|
|
@@ -257,7 +256,7 @@ ${i18n.t("stats:noData")} for provider: ${options.provider}
|
|
|
257
256
|
}
|
|
258
257
|
if (options.export) {
|
|
259
258
|
await exportStats(stats2, options.export, format);
|
|
260
|
-
console.log(
|
|
259
|
+
console.log(a.green(`
|
|
261
260
|
${i18n.t("stats:exportSuccess")}: ${options.export}
|
|
262
261
|
`));
|
|
263
262
|
}
|
|
@@ -298,38 +297,38 @@ function calculateStats(records) {
|
|
|
298
297
|
};
|
|
299
298
|
}
|
|
300
299
|
function displayTable(stats2, period) {
|
|
301
|
-
console.log(
|
|
300
|
+
console.log(a.cyan.bold(`
|
|
302
301
|
\u{1F4CA} ${i18n.t("stats:title")} - ${i18n.t(`stats:period.${period}`)}`));
|
|
303
|
-
console.log(
|
|
304
|
-
console.log(
|
|
305
|
-
console.log(` ${i18n.t("stats:totalRequests")}: ${
|
|
306
|
-
console.log(` ${
|
|
307
|
-
console.log(` ${
|
|
308
|
-
console.log(` ${i18n.t("stats:successRate")}: ${
|
|
309
|
-
console.log(
|
|
310
|
-
console.log(` ${i18n.t("stats:input")}: ${
|
|
311
|
-
console.log(` ${i18n.t("stats:output")}: ${
|
|
312
|
-
console.log(` ${i18n.t("stats:totalTokens")}: ${
|
|
313
|
-
console.log(
|
|
314
|
-
console.log(` ${i18n.t("stats:estimatedCost")}: ${
|
|
315
|
-
console.log(
|
|
316
|
-
console.log(` ${i18n.t("stats:averageLatency")}: ${
|
|
302
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
303
|
+
console.log(a.yellow("\n\u{1F4C8} Request Statistics:"));
|
|
304
|
+
console.log(` ${i18n.t("stats:totalRequests")}: ${a.bold(stats2.totalRequests.toLocaleString())}`);
|
|
305
|
+
console.log(` ${a.green("\u2713")} Successful: ${a.bold(stats2.successfulRequests.toLocaleString())}`);
|
|
306
|
+
console.log(` ${a.red("\u2717")} Failed: ${a.bold(stats2.failedRequests.toLocaleString())}`);
|
|
307
|
+
console.log(` ${i18n.t("stats:successRate")}: ${a.bold(stats2.successRate.toFixed(2))}%`);
|
|
308
|
+
console.log(a.yellow("\n\u{1F3AF} Token Usage:"));
|
|
309
|
+
console.log(` ${i18n.t("stats:input")}: ${a.bold(stats2.totalInputTokens.toLocaleString())}`);
|
|
310
|
+
console.log(` ${i18n.t("stats:output")}: ${a.bold(stats2.totalOutputTokens.toLocaleString())}`);
|
|
311
|
+
console.log(` ${i18n.t("stats:totalTokens")}: ${a.bold(stats2.totalTokens.toLocaleString())}`);
|
|
312
|
+
console.log(a.yellow("\n\u{1F4B0} Cost Analysis:"));
|
|
313
|
+
console.log(` ${i18n.t("stats:estimatedCost")}: ${a.bold(`$${stats2.totalCost.toFixed(4)}`)}`);
|
|
314
|
+
console.log(a.yellow("\n\u26A1 Performance:"));
|
|
315
|
+
console.log(` ${i18n.t("stats:averageLatency")}: ${a.bold(stats2.averageLatency.toFixed(0))}ms`);
|
|
317
316
|
if (Object.keys(stats2.providerCounts).length > 0) {
|
|
318
|
-
console.log(
|
|
317
|
+
console.log(a.yellow(`
|
|
319
318
|
\u2601\uFE0F ${i18n.t("stats:providerDistribution")}:`));
|
|
320
319
|
for (const [provider, count] of Object.entries(stats2.providerCounts)) {
|
|
321
320
|
const percentage = (count / stats2.totalRequests * 100).toFixed(1);
|
|
322
|
-
console.log(` ${provider}: ${
|
|
321
|
+
console.log(` ${provider}: ${a.bold(count)} (${percentage}%)`);
|
|
323
322
|
}
|
|
324
323
|
}
|
|
325
324
|
if (Object.keys(stats2.modelCounts).length > 0) {
|
|
326
|
-
console.log(
|
|
325
|
+
console.log(a.yellow("\n\u{1F916} Model Distribution:"));
|
|
327
326
|
for (const [model, count] of Object.entries(stats2.modelCounts)) {
|
|
328
327
|
const percentage = (count / stats2.totalRequests * 100).toFixed(1);
|
|
329
|
-
console.log(` ${model}: ${
|
|
328
|
+
console.log(` ${model}: ${a.bold(count)} (${percentage}%)`);
|
|
330
329
|
}
|
|
331
330
|
}
|
|
332
|
-
console.log(
|
|
331
|
+
console.log(a.dim(`
|
|
333
332
|
${"\u2500".repeat(60)}
|
|
334
333
|
`));
|
|
335
334
|
}
|
|
@@ -373,37 +372,37 @@ async function listStatsDates() {
|
|
|
373
372
|
const storage = getStatsStorage();
|
|
374
373
|
const dates = storage.getAvailableDates();
|
|
375
374
|
if (dates.length === 0) {
|
|
376
|
-
console.log(
|
|
375
|
+
console.log(a.yellow("\nNo statistics data available\n"));
|
|
377
376
|
return;
|
|
378
377
|
}
|
|
379
|
-
console.log(
|
|
380
|
-
console.log(
|
|
378
|
+
console.log(a.cyan.bold("\n\u{1F4C5} Available Statistics Dates:"));
|
|
379
|
+
console.log(a.dim("\u2500".repeat(40)));
|
|
381
380
|
for (const date of dates) {
|
|
382
381
|
const records = storage.getRecordsByDate(date);
|
|
383
|
-
console.log(` ${date}: ${
|
|
382
|
+
console.log(` ${date}: ${a.bold(records.length)} requests`);
|
|
384
383
|
}
|
|
385
|
-
console.log(
|
|
384
|
+
console.log(a.dim(`
|
|
386
385
|
${"\u2500".repeat(40)}
|
|
387
386
|
`));
|
|
388
387
|
}
|
|
389
388
|
async function storageStats() {
|
|
390
389
|
const storage = getStatsStorage();
|
|
391
390
|
const stats2 = storage.getStorageStats();
|
|
392
|
-
console.log(
|
|
393
|
-
console.log(
|
|
394
|
-
console.log(` Total record files: ${
|
|
395
|
-
console.log(` Total daily files: ${
|
|
396
|
-
console.log(` Total records: ${
|
|
397
|
-
console.log(` Oldest date: ${
|
|
398
|
-
console.log(` Newest date: ${
|
|
399
|
-
console.log(
|
|
391
|
+
console.log(a.cyan.bold("\n\u{1F4BE} Storage Statistics:"));
|
|
392
|
+
console.log(a.dim("\u2500".repeat(40)));
|
|
393
|
+
console.log(` Total record files: ${a.bold(stats2.totalRecordFiles)}`);
|
|
394
|
+
console.log(` Total daily files: ${a.bold(stats2.totalDailyFiles)}`);
|
|
395
|
+
console.log(` Total records: ${a.bold(stats2.totalRecords.toLocaleString())}`);
|
|
396
|
+
console.log(` Oldest date: ${a.bold(stats2.oldestDate || "N/A")}`);
|
|
397
|
+
console.log(` Newest date: ${a.bold(stats2.newestDate || "N/A")}`);
|
|
398
|
+
console.log(a.dim(`
|
|
400
399
|
${"\u2500".repeat(40)}
|
|
401
400
|
`));
|
|
402
401
|
}
|
|
403
402
|
async function cleanupStats(daysToKeep = 90) {
|
|
404
403
|
const storage = getStatsStorage();
|
|
405
404
|
const deletedCount = storage.cleanupOldRecords(daysToKeep);
|
|
406
|
-
console.log(
|
|
405
|
+
console.log(a.green(`
|
|
407
406
|
\u2713 Cleanup complete: ${deletedCount} old records marked for deletion
|
|
408
407
|
`));
|
|
409
408
|
}
|
package/dist/chunks/status.mjs
CHANGED
|
@@ -1,57 +1,56 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import process__default from 'node:process';
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { s as scanProject } from '../shared/ccjk.DKojSRzw.mjs';
|
|
4
|
+
import a from './index2.mjs';
|
|
5
|
+
import { s as scanProject } from '../shared/ccjk.BrPUmTqm.mjs';
|
|
7
6
|
import { getContextPersistence } from './persistence.mjs';
|
|
8
7
|
import { MetricsDisplay } from './metrics-display.mjs';
|
|
9
|
-
import { r as runHealthCheck } from '../shared/ccjk.
|
|
8
|
+
import { r as runHealthCheck } from '../shared/ccjk.D5MFQT7w.mjs';
|
|
9
|
+
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
10
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
10
11
|
import 'node:child_process';
|
|
11
12
|
import 'better-sqlite3';
|
|
12
13
|
import './constants.mjs';
|
|
13
|
-
import './
|
|
14
|
+
import './index5.mjs';
|
|
14
15
|
import 'node:url';
|
|
15
|
-
import 'i18next';
|
|
16
|
-
import 'i18next-fs-backend';
|
|
17
16
|
|
|
18
17
|
const GRADE_COLORS = {
|
|
19
|
-
S: (s) =>
|
|
20
|
-
A: (s) =>
|
|
21
|
-
B: (s) =>
|
|
22
|
-
C: (s) =>
|
|
23
|
-
D: (s) =>
|
|
24
|
-
F: (s) =>
|
|
18
|
+
S: (s) => a.magenta.bold(s),
|
|
19
|
+
A: (s) => a.green.bold(s),
|
|
20
|
+
B: (s) => a.cyan.bold(s),
|
|
21
|
+
C: (s) => a.yellow.bold(s),
|
|
22
|
+
D: (s) => a.red(s),
|
|
23
|
+
F: (s) => a.red.bold(s)
|
|
25
24
|
};
|
|
26
25
|
const STATUS_ICONS = {
|
|
27
|
-
pass:
|
|
28
|
-
warn:
|
|
29
|
-
fail:
|
|
26
|
+
pass: a.green("\u2713"),
|
|
27
|
+
warn: a.yellow("\u26A0"),
|
|
28
|
+
fail: a.red("\u2717")
|
|
30
29
|
};
|
|
31
|
-
const INSTALLED =
|
|
32
|
-
const MISSING =
|
|
30
|
+
const INSTALLED = a.green("\u2713");
|
|
31
|
+
const MISSING = a.gray("\u2212");
|
|
33
32
|
function label(text) {
|
|
34
|
-
return
|
|
33
|
+
return a.gray(text);
|
|
35
34
|
}
|
|
36
35
|
function val(text) {
|
|
37
|
-
return
|
|
36
|
+
return a.white(text);
|
|
38
37
|
}
|
|
39
38
|
function heading(text) {
|
|
40
|
-
return
|
|
39
|
+
return a.cyan.bold(text);
|
|
41
40
|
}
|
|
42
41
|
function divider() {
|
|
43
|
-
return
|
|
42
|
+
return a.gray("\u2500".repeat(44));
|
|
44
43
|
}
|
|
45
44
|
function renderScoreBar(score) {
|
|
46
45
|
const filled = Math.round(score / 5);
|
|
47
46
|
const empty = 20 - filled;
|
|
48
47
|
let bar = "";
|
|
49
48
|
if (score >= 80)
|
|
50
|
-
bar =
|
|
49
|
+
bar = a.green("\u2588".repeat(filled));
|
|
51
50
|
else if (score >= 50)
|
|
52
|
-
bar =
|
|
53
|
-
else bar =
|
|
54
|
-
bar +=
|
|
51
|
+
bar = a.yellow("\u2588".repeat(filled));
|
|
52
|
+
else bar = a.red("\u2588".repeat(filled));
|
|
53
|
+
bar += a.gray("\u2591".repeat(empty));
|
|
55
54
|
return bar;
|
|
56
55
|
}
|
|
57
56
|
function loadInstalledSettings() {
|
|
@@ -88,7 +87,7 @@ function renderProjectSection(ctx) {
|
|
|
88
87
|
["Database", ctx.database === "none" ? "none" : ctx.database]
|
|
89
88
|
];
|
|
90
89
|
for (const [k, v] of fields) {
|
|
91
|
-
const display = v === "none" || v === "unknown" ?
|
|
90
|
+
const display = v === "none" || v === "unknown" ? a.gray(v) : val(v);
|
|
92
91
|
lines.push(` ${label(`${k}:`.padEnd(14))} ${display}`);
|
|
93
92
|
}
|
|
94
93
|
const flags = [];
|
|
@@ -106,7 +105,7 @@ function renderRuntimeSection(ctx) {
|
|
|
106
105
|
const lines = [];
|
|
107
106
|
lines.push(heading("Runtime"));
|
|
108
107
|
const rt = ctx.runtime;
|
|
109
|
-
lines.push(` ${label("Platform:".padEnd(14))} ${val(process__default.platform)} ${
|
|
108
|
+
lines.push(` ${label("Platform:".padEnd(14))} ${val(process__default.platform)} ${a.gray(`(${process__default.arch})`)}`);
|
|
110
109
|
const envFlags = [];
|
|
111
110
|
if (rt.isContainer) envFlags.push("container");
|
|
112
111
|
if (rt.isHeadless) envFlags.push("headless");
|
|
@@ -116,9 +115,9 @@ function renderRuntimeSection(ctx) {
|
|
|
116
115
|
if (envFlags.length > 0) {
|
|
117
116
|
lines.push(` ${label("Environment:".padEnd(14))} ${val(envFlags.join(", "))}`);
|
|
118
117
|
} else {
|
|
119
|
-
lines.push(` ${label("Environment:".padEnd(14))} ${
|
|
118
|
+
lines.push(` ${label("Environment:".padEnd(14))} ${a.gray("standard")}`);
|
|
120
119
|
}
|
|
121
|
-
lines.push(` ${label("Browser:".padEnd(14))} ${rt.hasBrowser ?
|
|
120
|
+
lines.push(` ${label("Browser:".padEnd(14))} ${rt.hasBrowser ? a.green("available") : a.gray("unavailable")}`);
|
|
122
121
|
return lines;
|
|
123
122
|
}
|
|
124
123
|
function renderMcpSection(recommended, installed) {
|
|
@@ -126,7 +125,7 @@ function renderMcpSection(recommended, installed) {
|
|
|
126
125
|
lines.push(heading("MCP Services"));
|
|
127
126
|
const installedNames = Object.keys(installed);
|
|
128
127
|
if (recommended.length === 0 && installedNames.length === 0) {
|
|
129
|
-
lines.push(` ${
|
|
128
|
+
lines.push(` ${a.gray("No MCP services detected")}`);
|
|
130
129
|
return lines;
|
|
131
130
|
}
|
|
132
131
|
const shown = /* @__PURE__ */ new Set();
|
|
@@ -135,12 +134,12 @@ function renderMcpSection(recommended, installed) {
|
|
|
135
134
|
(name) => name.toLowerCase().includes(svc.toLowerCase()) || svc.toLowerCase().includes(name.toLowerCase())
|
|
136
135
|
);
|
|
137
136
|
const icon = isInstalled ? INSTALLED : MISSING;
|
|
138
|
-
lines.push(` ${icon} ${isInstalled ? val(svc) :
|
|
137
|
+
lines.push(` ${icon} ${isInstalled ? val(svc) : a.gray(svc)}`);
|
|
139
138
|
shown.add(svc.toLowerCase());
|
|
140
139
|
}
|
|
141
140
|
for (const name of installedNames) {
|
|
142
141
|
if (!shown.has(name.toLowerCase()) && !recommended.some((r) => r.toLowerCase() === name.toLowerCase())) {
|
|
143
|
-
lines.push(` ${INSTALLED} ${val(name)} ${
|
|
142
|
+
lines.push(` ${INSTALLED} ${val(name)} ${a.gray("(extra)")}`);
|
|
144
143
|
}
|
|
145
144
|
}
|
|
146
145
|
return lines;
|
|
@@ -151,13 +150,13 @@ function renderHooksSection(recommended, installed) {
|
|
|
151
150
|
const installedEvents = Object.keys(installed);
|
|
152
151
|
const hasAnyHooks = installedEvents.length > 0;
|
|
153
152
|
if (recommended.length === 0 && !hasAnyHooks) {
|
|
154
|
-
lines.push(` ${
|
|
153
|
+
lines.push(` ${a.gray("No hooks detected")}`);
|
|
155
154
|
return lines;
|
|
156
155
|
}
|
|
157
156
|
for (const hookId of recommended) {
|
|
158
157
|
const isInstalled = hasAnyHooks;
|
|
159
158
|
const icon = isInstalled ? INSTALLED : MISSING;
|
|
160
|
-
lines.push(` ${icon} ${isInstalled ? val(hookId) :
|
|
159
|
+
lines.push(` ${icon} ${isInstalled ? val(hookId) : a.gray(hookId)}`);
|
|
161
160
|
}
|
|
162
161
|
if (hasAnyHooks) {
|
|
163
162
|
const totalHookCount = installedEvents.reduce((sum, event) => {
|
|
@@ -165,7 +164,7 @@ function renderHooksSection(recommended, installed) {
|
|
|
165
164
|
return sum + (Array.isArray(eventHooks) ? eventHooks.length : 0);
|
|
166
165
|
}, 0);
|
|
167
166
|
if (totalHookCount > 0) {
|
|
168
|
-
lines.push(` ${
|
|
167
|
+
lines.push(` ${a.gray(`${totalHookCount} hook(s) across ${installedEvents.length} event(s)`)}`);
|
|
169
168
|
}
|
|
170
169
|
}
|
|
171
170
|
return lines;
|
|
@@ -174,7 +173,7 @@ function renderClaudeCodeSection(defaults) {
|
|
|
174
173
|
const lines = [];
|
|
175
174
|
lines.push(heading("Claude Code"));
|
|
176
175
|
const version = defaults?.claudeCodeVersion;
|
|
177
|
-
lines.push(` ${label("Version:".padEnd(14))} ${version ? val(version) :
|
|
176
|
+
lines.push(` ${label("Version:".padEnd(14))} ${version ? val(version) : a.gray("not detected")}`);
|
|
178
177
|
if (defaults?.nativeFeatures) {
|
|
179
178
|
const nf = defaults.nativeFeatures;
|
|
180
179
|
const features = [];
|
|
@@ -195,18 +194,18 @@ function renderCompressionMetricsSection(projectHash) {
|
|
|
195
194
|
const persistence = getContextPersistence();
|
|
196
195
|
const stats = persistence.getCompressionMetricsStats(projectHash);
|
|
197
196
|
if (stats.totalCompressions === 0) {
|
|
198
|
-
lines.push(` ${
|
|
197
|
+
lines.push(` ${a.gray("No compression data available")}`);
|
|
199
198
|
return lines;
|
|
200
199
|
}
|
|
201
|
-
lines.push(` ${label("Total Saved:".padEnd(14))} ${
|
|
202
|
-
lines.push(` ${label("Avg Reduction:".padEnd(14))} ${
|
|
203
|
-
lines.push(` ${label("Cost Savings:".padEnd(14))} ${
|
|
200
|
+
lines.push(` ${label("Total Saved:".padEnd(14))} ${a.green(MetricsDisplay.formatTokenCount(stats.totalTokensSaved))} tokens`);
|
|
201
|
+
lines.push(` ${label("Avg Reduction:".padEnd(14))} ${a.yellow(MetricsDisplay.formatRatio(stats.averageCompressionRatio))}`);
|
|
202
|
+
lines.push(` ${label("Cost Savings:".padEnd(14))} ${a.green.bold(MetricsDisplay.formatCost(stats.estimatedCostSavings))}`);
|
|
204
203
|
if (stats.sessionStats && stats.sessionStats.compressions > 0) {
|
|
205
|
-
lines.push(` ${label("Session (24h):".padEnd(14))} ${
|
|
204
|
+
lines.push(` ${label("Session (24h):".padEnd(14))} ${a.white(stats.sessionStats.compressions)} compressions, ${a.green(MetricsDisplay.formatCost(stats.sessionStats.costSavings))} saved`);
|
|
206
205
|
}
|
|
207
206
|
return lines;
|
|
208
207
|
} catch {
|
|
209
|
-
lines.push(` ${
|
|
208
|
+
lines.push(` ${a.gray("Metrics unavailable")}`);
|
|
210
209
|
return lines;
|
|
211
210
|
}
|
|
212
211
|
}
|
|
@@ -215,23 +214,23 @@ function renderHealthSection(report, compact) {
|
|
|
215
214
|
lines.push(heading("Brain Dashboard"));
|
|
216
215
|
const gradeColor = GRADE_COLORS[report.grade] || ((s) => s);
|
|
217
216
|
const scoreBar = renderScoreBar(report.totalScore);
|
|
218
|
-
lines.push(` ${label("Score:".padEnd(14))} ${scoreBar} ${gradeColor(report.grade)} ${
|
|
217
|
+
lines.push(` ${label("Score:".padEnd(14))} ${scoreBar} ${gradeColor(report.grade)} ${a.gray(`(${report.totalScore}/100)`)}`);
|
|
219
218
|
if (!compact) {
|
|
220
219
|
lines.push("");
|
|
221
220
|
for (const r of report.results) {
|
|
222
221
|
const icon = STATUS_ICONS[r.status];
|
|
223
|
-
const scoreText =
|
|
224
|
-
lines.push(` ${icon} ${r.name.padEnd(18)} ${scoreText.padEnd(10)} ${
|
|
222
|
+
const scoreText = a.gray(`${r.score}/${r.weight}`);
|
|
223
|
+
lines.push(` ${icon} ${r.name.padEnd(18)} ${scoreText.padEnd(10)} ${a.gray(r.message)}`);
|
|
225
224
|
}
|
|
226
225
|
}
|
|
227
226
|
if (report.recommendations.length > 0) {
|
|
228
227
|
lines.push("");
|
|
229
|
-
lines.push(
|
|
228
|
+
lines.push(a.yellow.bold(" Recommendations:"));
|
|
230
229
|
for (const rec of report.recommendations.slice(0, 3)) {
|
|
231
|
-
const priority = rec.priority === "high" ?
|
|
230
|
+
const priority = rec.priority === "high" ? a.red("!") : rec.priority === "medium" ? a.yellow("\u2022") : a.gray("\xB7");
|
|
232
231
|
lines.push(` ${priority} ${rec.title}`);
|
|
233
232
|
if (rec.command) {
|
|
234
|
-
lines.push(` ${
|
|
233
|
+
lines.push(` ${a.gray("\u2192")} ${a.cyan(rec.command)}`);
|
|
235
234
|
}
|
|
236
235
|
}
|
|
237
236
|
}
|
|
@@ -282,7 +281,7 @@ async function statusCommand(options = {}) {
|
|
|
282
281
|
}
|
|
283
282
|
console.log();
|
|
284
283
|
} catch (error) {
|
|
285
|
-
console.error(
|
|
284
|
+
console.error(a.red("Error running status command:"), error);
|
|
286
285
|
process__default.exit(1);
|
|
287
286
|
}
|
|
288
287
|
}
|
package/dist/chunks/team.mjs
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readFileSync } from 'node:fs';
|
|
2
|
-
import
|
|
3
|
-
import inquirer from '
|
|
4
|
-
import {
|
|
5
|
-
import { i18n } from './index3.mjs';
|
|
2
|
+
import a from './index2.mjs';
|
|
3
|
+
import { i as inquirer } from './index3.mjs';
|
|
4
|
+
import { i18n } from './index5.mjs';
|
|
6
5
|
import { writeFileAtomic } from './fs-operations.mjs';
|
|
6
|
+
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
7
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
8
|
+
import 'node:readline';
|
|
9
|
+
import 'stream';
|
|
10
|
+
import 'node:tty';
|
|
7
11
|
import 'node:process';
|
|
8
|
-
import 'node:
|
|
9
|
-
import '
|
|
10
|
-
import '
|
|
12
|
+
import 'node:async_hooks';
|
|
13
|
+
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
14
|
+
import 'node:util';
|
|
15
|
+
import 'tty';
|
|
16
|
+
import 'fs';
|
|
17
|
+
import 'child_process';
|
|
18
|
+
import 'node:path';
|
|
19
|
+
import 'node:os';
|
|
11
20
|
import 'node:crypto';
|
|
21
|
+
import 'buffer';
|
|
22
|
+
import 'string_decoder';
|
|
23
|
+
import 'node:url';
|
|
12
24
|
import 'node:fs/promises';
|
|
13
25
|
|
|
14
26
|
const TEAM_DIR = ".ccjk/team";
|
|
@@ -29,23 +41,23 @@ async function teamInit() {
|
|
|
29
41
|
sharedSettings: {}
|
|
30
42
|
};
|
|
31
43
|
writeFileAtomic(CONFIG_FILE, JSON.stringify(config, null, 2));
|
|
32
|
-
console.log(
|
|
44
|
+
console.log(a.green(`\u2714 ${i18n.t("team:teamInitialized")}: ${name}`));
|
|
33
45
|
}
|
|
34
46
|
async function teamShare() {
|
|
35
47
|
if (!existsSync(CONFIG_FILE)) {
|
|
36
|
-
console.log(
|
|
48
|
+
console.log(a.yellow(i18n.t("team:noTeamConfig")));
|
|
37
49
|
return;
|
|
38
50
|
}
|
|
39
51
|
const config = JSON.parse(readFileSync(CONFIG_FILE, "utf-8"));
|
|
40
|
-
console.log(
|
|
52
|
+
console.log(a.green(i18n.t("team:shareConfig")));
|
|
41
53
|
console.log(JSON.stringify(config, null, 2));
|
|
42
54
|
}
|
|
43
55
|
async function teamSync() {
|
|
44
56
|
if (!existsSync(CONFIG_FILE)) {
|
|
45
|
-
console.log(
|
|
57
|
+
console.log(a.yellow(i18n.t("team:noTeamConfig")));
|
|
46
58
|
return;
|
|
47
59
|
}
|
|
48
|
-
console.log(
|
|
60
|
+
console.log(a.green(`\u2714 ${i18n.t("team:syncComplete")}`));
|
|
49
61
|
}
|
|
50
62
|
|
|
51
63
|
export { teamInit, teamShare, teamSync };
|