ccjk 12.0.1 → 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/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 -29
- package/dist/shared/ccjk.DHbrGcgg.mjs +0 -13
- package/dist/shared/ccjk.DntgA8fQ.mjs +0 -42
package/dist/chunks/agents.mjs
CHANGED
|
@@ -1,18 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import ora from '
|
|
3
|
-
import { nanoid } from '
|
|
1
|
+
import a from './index2.mjs';
|
|
2
|
+
import ora from './index7.mjs';
|
|
3
|
+
import { n as nanoid } from '../shared/ccjk.BoApaI4j.mjs';
|
|
4
4
|
import { EventEmitter } from 'node:events';
|
|
5
|
-
import { resolve } from '
|
|
6
|
-
import { e as executionTracer } from '../shared/ccjk.
|
|
7
|
-
import { t as taskPersistence } from '../shared/ccjk.
|
|
5
|
+
import { c as resolve } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
6
|
+
import { e as executionTracer } from '../shared/ccjk.CePkJq2S.mjs';
|
|
7
|
+
import { t as taskPersistence } from '../shared/ccjk.BFxsJM0k.mjs';
|
|
8
8
|
import { contextLoader } from './context-loader.mjs';
|
|
9
9
|
import { g as getGlobalConvoyManager } from './convoy-manager.mjs';
|
|
10
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
11
|
+
import 'node:process';
|
|
12
|
+
import 'node:util';
|
|
13
|
+
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
14
|
+
import 'node:crypto';
|
|
10
15
|
import 'better-sqlite3';
|
|
11
16
|
import 'node:fs';
|
|
12
17
|
import 'tinyglobby';
|
|
13
|
-
import '../shared/ccjk.
|
|
18
|
+
import '../shared/ccjk.BxSmJ8B7.mjs';
|
|
14
19
|
import 'node:os';
|
|
15
|
-
import '
|
|
20
|
+
import './main.mjs';
|
|
21
|
+
import 'module';
|
|
22
|
+
import 'node:child_process';
|
|
23
|
+
import 'node:path';
|
|
24
|
+
import 'node:stream';
|
|
25
|
+
import 'node:readline';
|
|
16
26
|
|
|
17
27
|
const DEFAULT_AGENT_TYPE_MAPPINGS = {
|
|
18
28
|
"typescript": "coder",
|
|
@@ -915,11 +925,11 @@ class AgentForkManager {
|
|
|
915
925
|
try {
|
|
916
926
|
await this.executeWithTimeout(async () => {
|
|
917
927
|
if (hook.command) {
|
|
918
|
-
const { exec } = await import('
|
|
928
|
+
const { exec } = await import('./main.mjs');
|
|
919
929
|
const execOptions = { env: this.buildForkConfig(forkId).env };
|
|
920
930
|
await exec("sh", ["-c", hook.command], execOptions);
|
|
921
931
|
} else if (hook.script) {
|
|
922
|
-
const { exec } = await import('
|
|
932
|
+
const { exec } = await import('./main.mjs');
|
|
923
933
|
const execOptions = { env: this.buildForkConfig(forkId).env };
|
|
924
934
|
await exec("node", ["-e", hook.script], execOptions);
|
|
925
935
|
}
|
|
@@ -3539,20 +3549,20 @@ async function handleAgentsCommand(args, options = {}) {
|
|
|
3539
3549
|
}
|
|
3540
3550
|
async function runAgentTeam(options) {
|
|
3541
3551
|
if (!options.task) {
|
|
3542
|
-
console.log(
|
|
3543
|
-
console.log(
|
|
3552
|
+
console.log(a.red("Error: Please specify a task with --task"));
|
|
3553
|
+
console.log(a.dim('Example: agents run --task "Analyze the codebase"'));
|
|
3544
3554
|
return;
|
|
3545
3555
|
}
|
|
3546
3556
|
const workflow = options.workflow ? WORKFLOW_PRESETS.find((w) => w.id === options.workflow) : WORKFLOW_PRESETS[0];
|
|
3547
3557
|
if (options.workflow && !workflow) {
|
|
3548
|
-
console.log(
|
|
3549
|
-
console.log(
|
|
3558
|
+
console.log(a.red(`Error: Unknown workflow: ${options.workflow}`));
|
|
3559
|
+
console.log(a.dim('Run "agents list" to see available workflows'));
|
|
3550
3560
|
return;
|
|
3551
3561
|
}
|
|
3552
|
-
console.log(
|
|
3553
|
-
console.log(
|
|
3562
|
+
console.log(a.cyan("\n\u{1F916} Starting Agent Team\n"));
|
|
3563
|
+
console.log(a.bold("Task:"), options.task);
|
|
3554
3564
|
if (workflow) {
|
|
3555
|
-
console.log(
|
|
3565
|
+
console.log(a.bold("Workflow:"), workflow.name);
|
|
3556
3566
|
}
|
|
3557
3567
|
console.log("");
|
|
3558
3568
|
const task = workflow.taskTemplate(options.task);
|
|
@@ -3605,43 +3615,43 @@ async function runAgentTeam(options) {
|
|
|
3605
3615
|
}
|
|
3606
3616
|
console.log("");
|
|
3607
3617
|
if (result.success) {
|
|
3608
|
-
console.log(
|
|
3618
|
+
console.log(a.green("\u2705 Agent team completed successfully!"));
|
|
3609
3619
|
} else {
|
|
3610
|
-
console.log(
|
|
3620
|
+
console.log(a.red("\u274C Agent team failed"));
|
|
3611
3621
|
}
|
|
3612
3622
|
console.log("");
|
|
3613
|
-
console.log(
|
|
3614
|
-
console.log(
|
|
3623
|
+
console.log(a.bold("Results:"));
|
|
3624
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
3615
3625
|
if (options.json) {
|
|
3616
3626
|
console.log(JSON.stringify(result, null, 2));
|
|
3617
3627
|
} else {
|
|
3618
|
-
console.log(
|
|
3619
|
-
console.log(
|
|
3620
|
-
console.log(
|
|
3621
|
-
console.log(
|
|
3622
|
-
console.log(
|
|
3628
|
+
console.log(a.dim(`Status: ${result.status}`));
|
|
3629
|
+
console.log(a.dim(`Tasks Completed: ${result.completedTasks.length}`));
|
|
3630
|
+
console.log(a.dim(`Tasks Failed: ${result.failedTasks.length}`));
|
|
3631
|
+
console.log(a.dim(`Duration: ${result.duration}ms`));
|
|
3632
|
+
console.log(a.dim(`Success Rate: ${(result.metrics.successRate * 100).toFixed(1)}%`));
|
|
3623
3633
|
if (result.errors.length > 0) {
|
|
3624
3634
|
console.log("");
|
|
3625
|
-
console.log(
|
|
3635
|
+
console.log(a.bold("Errors:"));
|
|
3626
3636
|
for (const error of result.errors) {
|
|
3627
|
-
console.log(
|
|
3637
|
+
console.log(a.red(` \u2022 ${error.message}`));
|
|
3628
3638
|
}
|
|
3629
3639
|
}
|
|
3630
3640
|
if (result.warnings.length > 0) {
|
|
3631
3641
|
console.log("");
|
|
3632
|
-
console.log(
|
|
3642
|
+
console.log(a.bold("Warnings:"));
|
|
3633
3643
|
for (const warning of result.warnings) {
|
|
3634
|
-
console.log(
|
|
3644
|
+
console.log(a.yellow(` \u2022 ${warning}`));
|
|
3635
3645
|
}
|
|
3636
3646
|
}
|
|
3637
3647
|
}
|
|
3638
|
-
console.log(
|
|
3648
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
3639
3649
|
console.log("");
|
|
3640
|
-
console.log(
|
|
3641
|
-
console.log(
|
|
3650
|
+
console.log(a.dim(`Convoy ID: ${convoy.id}`));
|
|
3651
|
+
console.log(a.dim('Run "agents status" to see all convoys'));
|
|
3642
3652
|
} catch (error) {
|
|
3643
3653
|
spinner.fail("Agent team execution failed");
|
|
3644
|
-
console.log(
|
|
3654
|
+
console.log(a.red(`
|
|
3645
3655
|
\u274C Error: ${error instanceof Error ? error.message : error}`));
|
|
3646
3656
|
const convoyTask = convoy.tasks[0];
|
|
3647
3657
|
await convoyManager.failTask(
|
|
@@ -3660,108 +3670,108 @@ async function showStatus(options) {
|
|
|
3660
3670
|
console.log(JSON.stringify({ active: activeConvoys, all: allConvoys }, null, 2));
|
|
3661
3671
|
return;
|
|
3662
3672
|
}
|
|
3663
|
-
console.log(
|
|
3673
|
+
console.log(a.cyan("\n\u{1F680} Agent Teams Status\n"));
|
|
3664
3674
|
if (activeConvoys.length === 0) {
|
|
3665
|
-
console.log(
|
|
3675
|
+
console.log(a.dim("No active convoys"));
|
|
3666
3676
|
} else {
|
|
3667
|
-
console.log(
|
|
3677
|
+
console.log(a.bold("Active Convoys:"));
|
|
3668
3678
|
console.log("");
|
|
3669
3679
|
for (const convoy of activeConvoys) {
|
|
3670
|
-
console.log(` ${
|
|
3671
|
-
console.log(
|
|
3672
|
-
console.log(
|
|
3673
|
-
console.log(
|
|
3680
|
+
console.log(` ${a.bold(convoy.name)} ${a.dim("(" + convoy.id + ")")}`);
|
|
3681
|
+
console.log(a.dim(` Status: ${convoy.status}`));
|
|
3682
|
+
console.log(a.dim(` Progress: ${convoy.progress}%`));
|
|
3683
|
+
console.log(a.dim(` Tasks: ${convoy.completedTasks}/${convoy.totalTasks}`));
|
|
3674
3684
|
console.log("");
|
|
3675
3685
|
}
|
|
3676
3686
|
}
|
|
3677
3687
|
const recentConvoys = allConvoys.slice(0, 5);
|
|
3678
3688
|
if (recentConvoys.length > 0) {
|
|
3679
|
-
console.log(
|
|
3689
|
+
console.log(a.bold("Recent Convoys:"));
|
|
3680
3690
|
console.log("");
|
|
3681
3691
|
for (const convoy of recentConvoys) {
|
|
3682
3692
|
const statusIcon = convoy.status === "completed" ? "\u2705" : convoy.status === "failed" ? "\u274C" : "\u23F8\uFE0F";
|
|
3683
|
-
console.log(` ${statusIcon} ${
|
|
3684
|
-
console.log(
|
|
3685
|
-
console.log(
|
|
3686
|
-
console.log(
|
|
3693
|
+
console.log(` ${statusIcon} ${a.bold(convoy.name)} ${a.dim("(" + convoy.id + ")")}`);
|
|
3694
|
+
console.log(a.dim(` Status: ${convoy.status}`));
|
|
3695
|
+
console.log(a.dim(` Progress: ${convoy.progress}%`));
|
|
3696
|
+
console.log(a.dim(` Created: ${new Date(convoy.createdAt).toLocaleString()}`));
|
|
3687
3697
|
console.log("");
|
|
3688
3698
|
}
|
|
3689
3699
|
}
|
|
3690
|
-
console.log(
|
|
3700
|
+
console.log(a.dim(`Total convoys: ${allConvoys.length}`));
|
|
3691
3701
|
}
|
|
3692
3702
|
async function listWorkflows(options) {
|
|
3693
3703
|
if (options.json) {
|
|
3694
3704
|
console.log(JSON.stringify(WORKFLOW_PRESETS, null, 2));
|
|
3695
3705
|
return;
|
|
3696
3706
|
}
|
|
3697
|
-
console.log(
|
|
3707
|
+
console.log(a.cyan("\n\u{1F4CB} Available Workflow Presets\n"));
|
|
3698
3708
|
for (const workflow of WORKFLOW_PRESETS) {
|
|
3699
|
-
console.log(` ${
|
|
3700
|
-
console.log(
|
|
3709
|
+
console.log(` ${a.bold(workflow.name)} ${a.dim("(" + workflow.id + ")")}`);
|
|
3710
|
+
console.log(a.dim(` ${workflow.description}`));
|
|
3701
3711
|
console.log("");
|
|
3702
3712
|
}
|
|
3703
|
-
console.log(
|
|
3704
|
-
console.log(
|
|
3713
|
+
console.log(a.dim("Usage:"));
|
|
3714
|
+
console.log(a.dim(' agents run --task "Your task" --workflow <id>'));
|
|
3705
3715
|
console.log("");
|
|
3706
|
-
console.log(
|
|
3707
|
-
console.log(
|
|
3716
|
+
console.log(a.dim("Example:"));
|
|
3717
|
+
console.log(a.dim(' agents run --task "Find performance bottlenecks" --workflow optimize'));
|
|
3708
3718
|
}
|
|
3709
3719
|
async function cancelConvoy(convoyId, options) {
|
|
3710
3720
|
if (!convoyId) {
|
|
3711
|
-
console.log(
|
|
3712
|
-
console.log(
|
|
3721
|
+
console.log(a.red("Error: Please specify a convoy ID"));
|
|
3722
|
+
console.log(a.dim("Example: agents cancel cv-abc123"));
|
|
3713
3723
|
return;
|
|
3714
3724
|
}
|
|
3715
3725
|
const convoyManager = getGlobalConvoyManager();
|
|
3716
3726
|
await convoyManager.initialize();
|
|
3717
3727
|
const convoy = convoyManager.get(convoyId);
|
|
3718
3728
|
if (!convoy) {
|
|
3719
|
-
console.log(
|
|
3729
|
+
console.log(a.red(`Error: Convoy not found: ${convoyId}`));
|
|
3720
3730
|
return;
|
|
3721
3731
|
}
|
|
3722
3732
|
await convoyManager.cancel(convoyId);
|
|
3723
|
-
console.log(
|
|
3733
|
+
console.log(a.green(`\u2705 Cancelled convoy: ${convoy.name}`));
|
|
3724
3734
|
}
|
|
3725
3735
|
function showHelp() {
|
|
3726
3736
|
console.log(`
|
|
3727
|
-
${
|
|
3737
|
+
${a.bold(a.cyan("\u{1F916} Agent Teams Command"))}
|
|
3728
3738
|
|
|
3729
|
-
${
|
|
3739
|
+
${a.bold("Usage:")}
|
|
3730
3740
|
agents <command> [options]
|
|
3731
3741
|
|
|
3732
|
-
${
|
|
3733
|
-
${
|
|
3734
|
-
${
|
|
3735
|
-
${
|
|
3736
|
-
${
|
|
3742
|
+
${a.bold("Commands:")}
|
|
3743
|
+
${a.green("run")} Execute a task with agent teams
|
|
3744
|
+
${a.green("status")} Show active convoys and status
|
|
3745
|
+
${a.green("list")} List available workflow presets
|
|
3746
|
+
${a.green("cancel")} <id> Cancel a running convoy
|
|
3737
3747
|
|
|
3738
|
-
${
|
|
3748
|
+
${a.bold("Options:")}
|
|
3739
3749
|
--task <task> Task description (required for run)
|
|
3740
3750
|
--workflow <id> Workflow preset (analyze, fix, test, optimize)
|
|
3741
3751
|
--verbose, -v Enable verbose logging
|
|
3742
3752
|
--json Output as JSON
|
|
3743
3753
|
|
|
3744
|
-
${
|
|
3745
|
-
${
|
|
3754
|
+
${a.bold("Examples:")}
|
|
3755
|
+
${a.dim("# Run code analysis")}
|
|
3746
3756
|
agents run --task "Analyze the codebase for issues"
|
|
3747
3757
|
|
|
3748
|
-
${
|
|
3758
|
+
${a.dim("# Run with specific workflow")}
|
|
3749
3759
|
agents run --task "Fix memory leaks" --workflow fix
|
|
3750
3760
|
|
|
3751
|
-
${
|
|
3761
|
+
${a.dim("# Show status")}
|
|
3752
3762
|
agents status
|
|
3753
3763
|
|
|
3754
|
-
${
|
|
3764
|
+
${a.dim("# List workflows")}
|
|
3755
3765
|
agents list
|
|
3756
3766
|
|
|
3757
|
-
${
|
|
3767
|
+
${a.dim("# Cancel convoy")}
|
|
3758
3768
|
agents cancel cv-abc123
|
|
3759
3769
|
|
|
3760
|
-
${
|
|
3761
|
-
${
|
|
3762
|
-
${
|
|
3763
|
-
${
|
|
3764
|
-
${
|
|
3770
|
+
${a.bold("Workflow Presets:")}
|
|
3771
|
+
${a.green("analyze")} - Code analysis and quality checks
|
|
3772
|
+
${a.green("fix")} - Bug detection and fixing
|
|
3773
|
+
${a.green("test")} - Test generation and coverage
|
|
3774
|
+
${a.green("optimize")} - Performance optimization
|
|
3765
3775
|
`);
|
|
3766
3776
|
}
|
|
3767
3777
|
|
package/dist/chunks/api-cli.mjs
CHANGED
|
@@ -1,24 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { i18n } from './
|
|
1
|
+
import a from './index2.mjs';
|
|
2
|
+
import { i18n } from './index5.mjs';
|
|
3
3
|
import { f as configureApi, e as getExistingApiConfig } from './config.mjs';
|
|
4
4
|
import { g as getAllPresets } from '../shared/ccjk.CL4Yat0G.mjs';
|
|
5
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
5
6
|
import 'node:fs';
|
|
6
7
|
import 'node:process';
|
|
7
8
|
import 'node:url';
|
|
8
|
-
import '
|
|
9
|
-
import '
|
|
10
|
-
import '
|
|
11
|
-
import '
|
|
12
|
-
import '
|
|
13
|
-
import '
|
|
9
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
10
|
+
import '../shared/ccjk.RyizuzOI.mjs';
|
|
11
|
+
import './index3.mjs';
|
|
12
|
+
import 'node:readline';
|
|
13
|
+
import 'stream';
|
|
14
|
+
import 'node:tty';
|
|
15
|
+
import 'node:async_hooks';
|
|
16
|
+
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
17
|
+
import 'node:util';
|
|
18
|
+
import 'tty';
|
|
19
|
+
import 'fs';
|
|
20
|
+
import 'child_process';
|
|
21
|
+
import 'node:path';
|
|
14
22
|
import 'node:os';
|
|
23
|
+
import 'node:crypto';
|
|
24
|
+
import 'buffer';
|
|
25
|
+
import 'string_decoder';
|
|
26
|
+
import './constants.mjs';
|
|
15
27
|
import './claude-config.mjs';
|
|
16
28
|
import './json-config.mjs';
|
|
17
29
|
import './fs-operations.mjs';
|
|
18
|
-
import 'node:crypto';
|
|
19
30
|
import 'node:fs/promises';
|
|
20
31
|
import './platform.mjs';
|
|
21
|
-
import '
|
|
32
|
+
import './main.mjs';
|
|
33
|
+
import 'module';
|
|
34
|
+
import 'node:child_process';
|
|
35
|
+
import 'node:stream';
|
|
22
36
|
import '../shared/ccjk.BiCrMV5O.mjs';
|
|
23
37
|
|
|
24
38
|
async function apiConfigure(options = {}) {
|
|
@@ -30,8 +44,8 @@ async function apiConfigure(options = {}) {
|
|
|
30
44
|
return;
|
|
31
45
|
}
|
|
32
46
|
if (!options.provider) {
|
|
33
|
-
console.log(
|
|
34
|
-
console.log(
|
|
47
|
+
console.log(a.red(isZh ? "\u9519\u8BEF: \u5FC5\u987B\u6307\u5B9A --provider" : "Error: --provider is required"));
|
|
48
|
+
console.log(a.dim(isZh ? "\u7528\u6CD5: ccjk api configure --provider <name> --key <key>" : "Usage: ccjk api configure --provider <name> --key <key>"));
|
|
35
49
|
process.exit(1);
|
|
36
50
|
}
|
|
37
51
|
const presets = getAllPresets();
|
|
@@ -39,16 +53,16 @@ async function apiConfigure(options = {}) {
|
|
|
39
53
|
(p) => p.id === options.provider || p.name.toLowerCase() === options.provider?.toLowerCase()
|
|
40
54
|
);
|
|
41
55
|
if (!preset) {
|
|
42
|
-
console.log(
|
|
43
|
-
console.log(
|
|
56
|
+
console.log(a.red(isZh ? `\u9519\u8BEF: \u672A\u77E5\u7684\u63D0\u4F9B\u5546 "${options.provider}"` : `Error: Unknown provider "${options.provider}"`));
|
|
57
|
+
console.log(a.dim(isZh ? "\u63D0\u793A: \u4F7F\u7528 ccjk api list \u67E5\u770B\u53EF\u7528\u63D0\u4F9B\u5546" : "Tip: Use ccjk api list to see available providers"));
|
|
44
58
|
process.exit(1);
|
|
45
59
|
}
|
|
46
60
|
if (preset.requiresApiKey && !options.key) {
|
|
47
|
-
console.log(
|
|
61
|
+
console.log(a.red(isZh ? "\u9519\u8BEF: \u5FC5\u987B\u6307\u5B9A --key" : "Error: --key is required"));
|
|
48
62
|
process.exit(1);
|
|
49
63
|
}
|
|
50
64
|
if (!options.yes) {
|
|
51
|
-
const inquirer = await import('
|
|
65
|
+
const inquirer = await import('./index3.mjs').then(function (n) { return n.c; });
|
|
52
66
|
const { confirm } = await inquirer.default.prompt([{
|
|
53
67
|
type: "confirm",
|
|
54
68
|
name: "confirm",
|
|
@@ -56,7 +70,7 @@ async function apiConfigure(options = {}) {
|
|
|
56
70
|
default: true
|
|
57
71
|
}]);
|
|
58
72
|
if (!confirm) {
|
|
59
|
-
console.log(
|
|
73
|
+
console.log(a.yellow(isZh ? "\u5DF2\u53D6\u6D88" : "Cancelled"));
|
|
60
74
|
return;
|
|
61
75
|
}
|
|
62
76
|
}
|
|
@@ -71,10 +85,10 @@ async function apiConfigure(options = {}) {
|
|
|
71
85
|
}
|
|
72
86
|
const result = configureApi(config);
|
|
73
87
|
if (result) {
|
|
74
|
-
console.log(
|
|
75
|
-
console.log(
|
|
88
|
+
console.log(a.green(isZh ? `\u2713 \u5DF2\u914D\u7F6E ${preset.name}` : `\u2713 Configured ${preset.name}`));
|
|
89
|
+
console.log(a.dim(isZh ? "\u63D0\u793A: \u91CD\u542F Claude Code \u4EE5\u5E94\u7528\u66F4\u6539" : "Tip: Restart Claude Code to apply changes"));
|
|
76
90
|
} else {
|
|
77
|
-
console.log(
|
|
91
|
+
console.log(a.red(isZh ? "\u2717 \u914D\u7F6E\u5931\u8D25" : "\u2717 Configuration failed"));
|
|
78
92
|
process.exit(1);
|
|
79
93
|
}
|
|
80
94
|
}
|
|
@@ -95,24 +109,24 @@ async function apiList(options = {}) {
|
|
|
95
109
|
return;
|
|
96
110
|
}
|
|
97
111
|
console.log("");
|
|
98
|
-
console.log(
|
|
99
|
-
console.log(
|
|
112
|
+
console.log(a.bold.cyan(isZh ? "\u{1F4CB} API \u914D\u7F6E" : "\u{1F4CB} API Configuration"));
|
|
113
|
+
console.log(a.dim("\u2500".repeat(50)));
|
|
100
114
|
console.log("");
|
|
101
115
|
if (config) {
|
|
102
|
-
console.log(
|
|
116
|
+
console.log(a.green(isZh ? "\u5F53\u524D\u914D\u7F6E:" : "Current configuration:"));
|
|
103
117
|
const apiUrl = config.apiUrl;
|
|
104
118
|
const model = config.model;
|
|
105
119
|
if (apiUrl) {
|
|
106
|
-
console.log(` ${
|
|
120
|
+
console.log(` ${a.dim("URL:")} ${apiUrl}`);
|
|
107
121
|
}
|
|
108
122
|
if (model) {
|
|
109
|
-
console.log(` ${
|
|
123
|
+
console.log(` ${a.dim("Model:")} ${model}`);
|
|
110
124
|
}
|
|
111
125
|
} else {
|
|
112
|
-
console.log(
|
|
126
|
+
console.log(a.yellow(isZh ? "\u672A\u914D\u7F6E API" : "No API configured"));
|
|
113
127
|
}
|
|
114
128
|
console.log("");
|
|
115
|
-
console.log(
|
|
129
|
+
console.log(a.dim(isZh ? "\u63D0\u793A: \u4F7F\u7528 ccjk api configure --provider <name> \u914D\u7F6E API" : "Tip: Use ccjk api configure --provider <name> to configure API"));
|
|
116
130
|
}
|
|
117
131
|
|
|
118
132
|
export { apiConfigure, apiList };
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { CCJK_CLOUD_API_URL } from './constants.mjs';
|
|
2
2
|
import 'node:os';
|
|
3
|
-
import '
|
|
4
|
-
import './index3.mjs';
|
|
3
|
+
import './index5.mjs';
|
|
5
4
|
import 'node:fs';
|
|
6
5
|
import 'node:process';
|
|
7
6
|
import 'node:url';
|
|
8
|
-
import '
|
|
9
|
-
import 'i18next-fs-backend';
|
|
7
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
10
8
|
|
|
11
9
|
const LOCAL_PROVIDER_PRESETS = [
|
|
12
10
|
{
|
package/dist/chunks/api.mjs
CHANGED
|
@@ -1,19 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { i18n, format } from './
|
|
1
|
+
import a from './index2.mjs';
|
|
2
|
+
import { i18n, format } from './index5.mjs';
|
|
3
3
|
import { STATUS, COLORS as theme } from './banner.mjs';
|
|
4
|
-
import { r as runConfigWizard, t as testApiConnection, d as displayCurrentStatus, q as quickSetup } from '../shared/ccjk.
|
|
4
|
+
import { r as runConfigWizard, t as testApiConnection, d as displayCurrentStatus, q as quickSetup } from '../shared/ccjk.DLLw-h4Y.mjs';
|
|
5
5
|
import { g as getAllPresets } from '../shared/ccjk.CL4Yat0G.mjs';
|
|
6
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
6
7
|
import 'node:fs';
|
|
7
8
|
import 'node:process';
|
|
8
9
|
import 'node:url';
|
|
9
|
-
import '
|
|
10
|
-
import 'i18next-fs-backend';
|
|
11
|
-
import 'pathe';
|
|
10
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
12
11
|
import './package.mjs';
|
|
13
|
-
import '
|
|
12
|
+
import './index3.mjs';
|
|
13
|
+
import 'node:readline';
|
|
14
|
+
import 'stream';
|
|
15
|
+
import 'node:tty';
|
|
16
|
+
import 'node:async_hooks';
|
|
17
|
+
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
18
|
+
import 'node:util';
|
|
19
|
+
import 'tty';
|
|
20
|
+
import 'fs';
|
|
21
|
+
import 'child_process';
|
|
22
|
+
import 'node:path';
|
|
14
23
|
import 'node:os';
|
|
15
|
-
import './fs-operations.mjs';
|
|
16
24
|
import 'node:crypto';
|
|
25
|
+
import 'buffer';
|
|
26
|
+
import 'string_decoder';
|
|
27
|
+
import './fs-operations.mjs';
|
|
17
28
|
import 'node:fs/promises';
|
|
18
29
|
|
|
19
30
|
function listProviders(lang = "en") {
|
|
@@ -39,8 +50,8 @@ function listProviders(lang = "en") {
|
|
|
39
50
|
const name = lang === "zh-CN" ? preset.nameZh : preset.name;
|
|
40
51
|
const desc = lang === "zh-CN" ? preset.descriptionZh : preset.description;
|
|
41
52
|
const keyIcon = preset.requiresApiKey ? "\u{1F511}" : "\u{1F193}";
|
|
42
|
-
console.log(` ${keyIcon} ${
|
|
43
|
-
console.log(
|
|
53
|
+
console.log(` ${keyIcon} ${a.green(preset.id.padEnd(15))} ${name}`);
|
|
54
|
+
console.log(a.gray(` ${desc}`));
|
|
44
55
|
}
|
|
45
56
|
console.log("");
|
|
46
57
|
}
|
|
@@ -78,7 +89,7 @@ async function apiCommand(action = "wizard", args = [], options = {}) {
|
|
|
78
89
|
setupApi(args[0], args[1], lang);
|
|
79
90
|
} else {
|
|
80
91
|
console.log(STATUS.error(i18n.t("api:setupUsage")));
|
|
81
|
-
console.log(
|
|
92
|
+
console.log(a.gray(` ${i18n.t("api:setupExample")}`));
|
|
82
93
|
}
|
|
83
94
|
break;
|
|
84
95
|
case "status":
|
|
@@ -2,12 +2,10 @@ import { randomUUID, createHash } from 'node:crypto';
|
|
|
2
2
|
import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
3
3
|
import { release, platform, type, homedir, hostname } from 'node:os';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
|
-
import { join, dirname } from 'pathe';
|
|
6
5
|
import { CCJK_CONFIG_DIR } from './constants.mjs';
|
|
7
|
-
import '
|
|
6
|
+
import { j as join, d as dirname } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
7
|
+
import './index5.mjs';
|
|
8
8
|
import 'node:process';
|
|
9
|
-
import 'i18next';
|
|
10
|
-
import 'i18next-fs-backend';
|
|
11
9
|
|
|
12
10
|
const __filename = fileURLToPath(import.meta.url);
|
|
13
11
|
const __dirname = dirname(__filename);
|
|
@@ -269,7 +267,7 @@ function isNewerVersion(latest, current) {
|
|
|
269
267
|
async function performSilentUpgrade(targetVersion) {
|
|
270
268
|
const currentVersion = getCcjkVersion();
|
|
271
269
|
try {
|
|
272
|
-
const { exec } = await import('
|
|
270
|
+
const { exec } = await import('./main.mjs');
|
|
273
271
|
const result = await exec("npm", ["update", "-g", "ccjk"], {
|
|
274
272
|
timeout: 6e4
|
|
275
273
|
// 60 秒超时
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { l as logger } from '../shared/ccjk.
|
|
1
|
+
import { l as logger } from '../shared/ccjk.DG_o24cZ.mjs';
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
+
import { c as commonjsGlobal } from '../shared/ccjk.BAGoDD49.mjs';
|
|
3
4
|
import require$$0 from 'crypto';
|
|
4
5
|
import { existsSync, readFileSync } from 'fs';
|
|
5
6
|
import { homedir } from 'os';
|
|
6
7
|
import { join } from 'path';
|
|
7
|
-
import '
|
|
8
|
+
import './index2.mjs';
|
|
8
9
|
|
|
9
10
|
class HookRegistry {
|
|
10
11
|
hooks = /* @__PURE__ */ new Map();
|
|
@@ -81,8 +82,6 @@ class HookRegistry {
|
|
|
81
82
|
}
|
|
82
83
|
const hookRegistry = new HookRegistry();
|
|
83
84
|
|
|
84
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
85
|
-
|
|
86
85
|
var cuid2 = {};
|
|
87
86
|
|
|
88
87
|
var src = {};
|