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
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
-
import
|
|
2
|
+
import a from './index2.mjs';
|
|
3
3
|
import { SETTINGS_FILE } from './constants.mjs';
|
|
4
|
-
import { ensureI18nInitialized, i18n } from './
|
|
4
|
+
import { ensureI18nInitialized, i18n } from './index5.mjs';
|
|
5
5
|
import { writeJsonConfig } from './json-config.mjs';
|
|
6
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
6
7
|
import 'node:os';
|
|
7
|
-
import '
|
|
8
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
8
9
|
import 'node:process';
|
|
9
10
|
import 'node:url';
|
|
10
|
-
import '
|
|
11
|
-
import 'i18next-fs-backend';
|
|
12
|
-
import 'dayjs';
|
|
11
|
+
import '../shared/ccjk.RyizuzOI.mjs';
|
|
13
12
|
import './fs-operations.mjs';
|
|
14
13
|
import 'node:crypto';
|
|
15
14
|
import 'node:fs/promises';
|
|
@@ -58,21 +57,21 @@ async function agentTeamsCommand(options) {
|
|
|
58
57
|
if (options.on !== void 0 || options.off !== void 0) {
|
|
59
58
|
const enable = options.on === true;
|
|
60
59
|
setAgentTeams(enable);
|
|
61
|
-
console.log(
|
|
60
|
+
console.log(a.green(t(enable ? "enabled" : "disabled")));
|
|
62
61
|
return;
|
|
63
62
|
}
|
|
64
63
|
if (options.mode) {
|
|
65
64
|
const valid = ["auto", "in-process", "tmux"];
|
|
66
65
|
if (!valid.includes(options.mode)) {
|
|
67
|
-
console.log(
|
|
66
|
+
console.log(a.red(t("invalidMode")));
|
|
68
67
|
return;
|
|
69
68
|
}
|
|
70
69
|
setTeammateMode(options.mode);
|
|
71
|
-
console.log(
|
|
70
|
+
console.log(a.green(t("modeSet", { mode: options.mode })));
|
|
72
71
|
return;
|
|
73
72
|
}
|
|
74
73
|
const current = isAgentTeamsEnabled();
|
|
75
|
-
const { default: inquirer } = await import('
|
|
74
|
+
const { default: inquirer } = await import('./index3.mjs').then(function (n) { return n.c; });
|
|
76
75
|
const { action } = await inquirer.prompt([{
|
|
77
76
|
type: "list",
|
|
78
77
|
name: "action",
|
|
@@ -98,7 +97,7 @@ async function agentTeamsCommand(options) {
|
|
|
98
97
|
}]);
|
|
99
98
|
if (action === "toggle") {
|
|
100
99
|
setAgentTeams(!current);
|
|
101
|
-
console.log(
|
|
100
|
+
console.log(a.green(t(!current ? "enabled" : "disabled")));
|
|
102
101
|
} else if (action === "mode") {
|
|
103
102
|
const currentMode = getTeammateMode();
|
|
104
103
|
const { mode } = await inquirer.prompt([{
|
|
@@ -112,7 +111,7 @@ async function agentTeamsCommand(options) {
|
|
|
112
111
|
]
|
|
113
112
|
}]);
|
|
114
113
|
setTeammateMode(mode);
|
|
115
|
-
console.log(
|
|
114
|
+
console.log(a.green(t("modeSet", { mode })));
|
|
116
115
|
} else if (action === "status") {
|
|
117
116
|
printStatus();
|
|
118
117
|
}
|
|
@@ -121,15 +120,15 @@ function printStatus() {
|
|
|
121
120
|
const enabled = isAgentTeamsEnabled();
|
|
122
121
|
const mode = getTeammateMode();
|
|
123
122
|
console.log();
|
|
124
|
-
console.log(
|
|
125
|
-
console.log(
|
|
126
|
-
console.log(` ${t("statusLabel")}: ${enabled ?
|
|
127
|
-
console.log(` ${t("modeLabel")}: ${
|
|
123
|
+
console.log(a.bold(t("statusTitle")));
|
|
124
|
+
console.log(a.gray("\u2500".repeat(40)));
|
|
125
|
+
console.log(` ${t("statusLabel")}: ${enabled ? a.green("\u2705 Enabled") : a.dim("\u2B1C Disabled")}`);
|
|
126
|
+
console.log(` ${t("modeLabel")}: ${a.cyan(mode)}`);
|
|
128
127
|
console.log();
|
|
129
128
|
if (!enabled) {
|
|
130
|
-
console.log(
|
|
129
|
+
console.log(a.dim(` ${t("enableHint")}`));
|
|
131
130
|
} else {
|
|
132
|
-
console.log(
|
|
131
|
+
console.log(a.dim(` ${t("usageHint")}`));
|
|
133
132
|
}
|
|
134
133
|
console.log();
|
|
135
134
|
}
|
package/dist/chunks/agent.mjs
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from './index2.mjs';
|
|
2
2
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, readdirSync } from 'node:fs';
|
|
3
|
-
import { join } from 'pathe';
|
|
4
3
|
import { CCJK_CONFIG_DIR } from './constants.mjs';
|
|
5
|
-
import { w as writeAgentFile } from '../shared/ccjk.
|
|
6
|
-
import { g as getPluginManager } from '../shared/ccjk.
|
|
4
|
+
import { w as writeAgentFile } from '../shared/ccjk.CfKKcvWy.mjs';
|
|
5
|
+
import { g as getPluginManager } from '../shared/ccjk.DTdjs-qK.mjs';
|
|
7
6
|
import { homedir } from 'node:os';
|
|
8
|
-
import '
|
|
7
|
+
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
8
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
9
|
+
import './index5.mjs';
|
|
9
10
|
import 'node:process';
|
|
10
11
|
import 'node:url';
|
|
11
|
-
import '
|
|
12
|
-
import '
|
|
13
|
-
import 'tinyexec';
|
|
12
|
+
import './main.mjs';
|
|
13
|
+
import 'module';
|
|
14
14
|
import 'node:child_process';
|
|
15
|
-
import '
|
|
15
|
+
import 'node:path';
|
|
16
|
+
import 'node:stream';
|
|
17
|
+
import 'node:readline';
|
|
18
|
+
import '../shared/ccjk.DsYaCCx4.mjs';
|
|
16
19
|
|
|
17
20
|
const CLAUDE_CONFIG_PATH = join(homedir(), ".claude.json");
|
|
18
21
|
const TOOL_CACHE_TTL = 5 * 60 * 1e3;
|
|
@@ -1094,17 +1097,17 @@ async function handleAgentCommand(args, options = {}) {
|
|
|
1094
1097
|
}
|
|
1095
1098
|
async function createNewAgent(name, options) {
|
|
1096
1099
|
if (!name) {
|
|
1097
|
-
console.log(
|
|
1098
|
-
console.log(
|
|
1100
|
+
console.log(a.red("Error: Please specify an agent name"));
|
|
1101
|
+
console.log(a.dim("Example: agent create my-assistant"));
|
|
1099
1102
|
return;
|
|
1100
1103
|
}
|
|
1101
|
-
console.log(
|
|
1104
|
+
console.log(a.cyan(`
|
|
1102
1105
|
\u{1F916} Creating agent: ${name}
|
|
1103
1106
|
`));
|
|
1104
1107
|
try {
|
|
1105
1108
|
let agent;
|
|
1106
1109
|
if (options.template) {
|
|
1107
|
-
console.log(
|
|
1110
|
+
console.log(a.dim(`Using template: ${options.template}`));
|
|
1108
1111
|
agent = await createAgentFromTemplate(options.template, {
|
|
1109
1112
|
id: name,
|
|
1110
1113
|
name: { "en": name, "zh-CN": name }
|
|
@@ -1113,30 +1116,30 @@ async function createNewAgent(name, options) {
|
|
|
1113
1116
|
const builder = createAgent().id(name).name(name).description(`Custom agent: ${name}`);
|
|
1114
1117
|
if (options.skills && options.skills.length > 0) {
|
|
1115
1118
|
builder.addSkills(options.skills);
|
|
1116
|
-
console.log(
|
|
1119
|
+
console.log(a.dim(`Adding skills: ${options.skills.join(", ")}`));
|
|
1117
1120
|
}
|
|
1118
1121
|
if (options.mcp && options.mcp.length > 0) {
|
|
1119
1122
|
builder.addMcpServers(options.mcp);
|
|
1120
|
-
console.log(
|
|
1123
|
+
console.log(a.dim(`Adding MCP servers: ${options.mcp.join(", ")}`));
|
|
1121
1124
|
}
|
|
1122
1125
|
if (options.persona) {
|
|
1123
1126
|
builder.persona(options.persona);
|
|
1124
1127
|
}
|
|
1125
1128
|
agent = await builder.save();
|
|
1126
1129
|
}
|
|
1127
|
-
console.log(
|
|
1130
|
+
console.log(a.green(`
|
|
1128
1131
|
\u2705 Agent created successfully!`));
|
|
1129
1132
|
console.log("");
|
|
1130
|
-
console.log(
|
|
1131
|
-
console.log(
|
|
1132
|
-
console.log(
|
|
1133
|
-
console.log(
|
|
1134
|
-
console.log(
|
|
1135
|
-
console.log(
|
|
1133
|
+
console.log(a.bold("Agent Details:"));
|
|
1134
|
+
console.log(a.dim(` ID: ${agent.id}`));
|
|
1135
|
+
console.log(a.dim(` Name: ${agent.name.en}`));
|
|
1136
|
+
console.log(a.dim(` Skills: ${agent.skills.length}`));
|
|
1137
|
+
console.log(a.dim(` MCP Servers: ${agent.mcpServers.length}`));
|
|
1138
|
+
console.log(a.dim(` Capabilities: ${agent.capabilities.join(", ")}`));
|
|
1136
1139
|
console.log("");
|
|
1137
|
-
console.log(
|
|
1140
|
+
console.log(a.dim(`Run with: agent run ${agent.id}`));
|
|
1138
1141
|
} catch (error) {
|
|
1139
|
-
console.log(
|
|
1142
|
+
console.log(a.red(`\u274C Failed to create agent: ${error instanceof Error ? error.message : error}`));
|
|
1140
1143
|
}
|
|
1141
1144
|
}
|
|
1142
1145
|
async function listAgents(options) {
|
|
@@ -1146,18 +1149,18 @@ async function listAgents(options) {
|
|
|
1146
1149
|
console.log(JSON.stringify(agents, null, 2));
|
|
1147
1150
|
return;
|
|
1148
1151
|
}
|
|
1149
|
-
console.log(
|
|
1152
|
+
console.log(a.cyan("\n\u{1F916} Installed Agents\n"));
|
|
1150
1153
|
if (agents.length === 0) {
|
|
1151
|
-
console.log(
|
|
1152
|
-
console.log(
|
|
1153
|
-
console.log(
|
|
1154
|
-
console.log(
|
|
1154
|
+
console.log(a.dim("No agents created yet."));
|
|
1155
|
+
console.log(a.dim("\nCreate an agent with:"));
|
|
1156
|
+
console.log(a.dim(" agent create my-assistant --template code-assistant"));
|
|
1157
|
+
console.log(a.dim(" agent create my-agent --skills git-helper,code-reviewer"));
|
|
1155
1158
|
return;
|
|
1156
1159
|
}
|
|
1157
1160
|
for (const agent of agents) {
|
|
1158
1161
|
const name = agent.name.en || agent.id;
|
|
1159
|
-
console.log(` ${
|
|
1160
|
-
console.log(
|
|
1162
|
+
console.log(` ${a.bold(name)} ${a.dim(`(${agent.id})`)}`);
|
|
1163
|
+
console.log(a.dim(` ${agent.description.en}`));
|
|
1161
1164
|
const badges = [];
|
|
1162
1165
|
if (agent.skills.length > 0)
|
|
1163
1166
|
badges.push(`\u{1F4DA} ${agent.skills.length} skills`);
|
|
@@ -1166,21 +1169,21 @@ async function listAgents(options) {
|
|
|
1166
1169
|
if (agent.capabilities.length > 0)
|
|
1167
1170
|
badges.push(`\u26A1 ${agent.capabilities.length} capabilities`);
|
|
1168
1171
|
if (badges.length > 0) {
|
|
1169
|
-
console.log(
|
|
1172
|
+
console.log(a.dim(` ${badges.join(" \u2022 ")}`));
|
|
1170
1173
|
}
|
|
1171
1174
|
console.log("");
|
|
1172
1175
|
}
|
|
1173
|
-
console.log(
|
|
1176
|
+
console.log(a.dim(`Total: ${agents.length} agents`));
|
|
1174
1177
|
}
|
|
1175
1178
|
async function showAgentInfo(agentId, options) {
|
|
1176
1179
|
if (!agentId) {
|
|
1177
|
-
console.log(
|
|
1180
|
+
console.log(a.red("Error: Please specify an agent ID"));
|
|
1178
1181
|
return;
|
|
1179
1182
|
}
|
|
1180
1183
|
const manager = await getPluginManager();
|
|
1181
1184
|
const agent = manager.getAgent(agentId);
|
|
1182
1185
|
if (!agent) {
|
|
1183
|
-
console.log(
|
|
1186
|
+
console.log(a.red(`Agent not found: ${agentId}`));
|
|
1184
1187
|
return;
|
|
1185
1188
|
}
|
|
1186
1189
|
if (options.json) {
|
|
@@ -1188,132 +1191,132 @@ async function showAgentInfo(agentId, options) {
|
|
|
1188
1191
|
return;
|
|
1189
1192
|
}
|
|
1190
1193
|
console.log("");
|
|
1191
|
-
console.log(
|
|
1192
|
-
console.log(
|
|
1194
|
+
console.log(a.bold(a.cyan(`\u{1F916} ${agent.name.en}`)));
|
|
1195
|
+
console.log(a.dim(`ID: ${agent.id}`));
|
|
1193
1196
|
console.log("");
|
|
1194
|
-
console.log(
|
|
1195
|
-
console.log(
|
|
1197
|
+
console.log(a.bold("\u{1F4DD} Description"));
|
|
1198
|
+
console.log(a.dim(` ${agent.description.en}`));
|
|
1196
1199
|
console.log("");
|
|
1197
|
-
console.log(
|
|
1198
|
-
console.log(
|
|
1200
|
+
console.log(a.bold("\u{1F3AD} Persona"));
|
|
1201
|
+
console.log(a.dim(` ${agent.persona.substring(0, 200)}${agent.persona.length > 200 ? "..." : ""}`));
|
|
1199
1202
|
console.log("");
|
|
1200
1203
|
if (agent.instructions) {
|
|
1201
|
-
console.log(
|
|
1204
|
+
console.log(a.bold("\u{1F4CB} Instructions"));
|
|
1202
1205
|
const lines = agent.instructions.split("\n").slice(0, 5);
|
|
1203
1206
|
for (const line of lines) {
|
|
1204
|
-
console.log(
|
|
1207
|
+
console.log(a.dim(` ${line}`));
|
|
1205
1208
|
}
|
|
1206
1209
|
if (agent.instructions.split("\n").length > 5) {
|
|
1207
|
-
console.log(
|
|
1210
|
+
console.log(a.dim(" ..."));
|
|
1208
1211
|
}
|
|
1209
1212
|
console.log("");
|
|
1210
1213
|
}
|
|
1211
1214
|
if (agent.skills.length > 0) {
|
|
1212
|
-
console.log(
|
|
1215
|
+
console.log(a.bold("\u{1F4DA} Skills"));
|
|
1213
1216
|
for (const skill of agent.skills) {
|
|
1214
1217
|
const plugin = manager.getPlugin(skill.pluginId);
|
|
1215
1218
|
const name = plugin?.manifest.name.en || skill.pluginId;
|
|
1216
|
-
console.log(
|
|
1219
|
+
console.log(a.dim(` \u2022 ${name}`));
|
|
1217
1220
|
}
|
|
1218
1221
|
console.log("");
|
|
1219
1222
|
}
|
|
1220
1223
|
if (agent.mcpServers.length > 0) {
|
|
1221
|
-
console.log(
|
|
1224
|
+
console.log(a.bold("\u{1F527} MCP Servers"));
|
|
1222
1225
|
for (const mcp of agent.mcpServers) {
|
|
1223
|
-
console.log(
|
|
1226
|
+
console.log(a.dim(` \u2022 ${mcp.serverName}`));
|
|
1224
1227
|
if (mcp.tools && mcp.tools.length > 0) {
|
|
1225
|
-
console.log(
|
|
1228
|
+
console.log(a.dim(` Tools: ${mcp.tools.join(", ")}`));
|
|
1226
1229
|
}
|
|
1227
1230
|
}
|
|
1228
1231
|
console.log("");
|
|
1229
1232
|
}
|
|
1230
1233
|
if (agent.capabilities.length > 0) {
|
|
1231
|
-
console.log(
|
|
1234
|
+
console.log(a.bold("\u26A1 Capabilities"));
|
|
1232
1235
|
for (const cap of agent.capabilities) {
|
|
1233
|
-
console.log(
|
|
1236
|
+
console.log(a.dim(` \u2022 ${formatCapability(cap)}`));
|
|
1234
1237
|
}
|
|
1235
1238
|
console.log("");
|
|
1236
1239
|
}
|
|
1237
1240
|
if (agent.triggers && agent.triggers.length > 0) {
|
|
1238
|
-
console.log(
|
|
1241
|
+
console.log(a.bold("\u{1F3AF} Triggers"));
|
|
1239
1242
|
for (const trigger of agent.triggers) {
|
|
1240
|
-
console.log(
|
|
1243
|
+
console.log(a.dim(` \u2022 ${trigger}`));
|
|
1241
1244
|
}
|
|
1242
1245
|
console.log("");
|
|
1243
1246
|
}
|
|
1244
|
-
console.log(
|
|
1247
|
+
console.log(a.bold("\u{1F4AC} System Prompt Preview"));
|
|
1245
1248
|
try {
|
|
1246
1249
|
const runtime = await getAgentRuntime(agentId);
|
|
1247
1250
|
const prompt = runtime.getSystemPrompt();
|
|
1248
1251
|
const lines = prompt.split("\n").slice(0, 10);
|
|
1249
1252
|
for (const line of lines) {
|
|
1250
|
-
console.log(
|
|
1253
|
+
console.log(a.dim(` ${line}`));
|
|
1251
1254
|
}
|
|
1252
|
-
console.log(
|
|
1255
|
+
console.log(a.dim(" ..."));
|
|
1253
1256
|
} catch {
|
|
1254
|
-
console.log(
|
|
1257
|
+
console.log(a.dim(" (Unable to generate preview)"));
|
|
1255
1258
|
}
|
|
1256
1259
|
}
|
|
1257
1260
|
async function removeAgent(agentId) {
|
|
1258
1261
|
if (!agentId) {
|
|
1259
|
-
console.log(
|
|
1262
|
+
console.log(a.red("Error: Please specify an agent ID"));
|
|
1260
1263
|
return;
|
|
1261
1264
|
}
|
|
1262
1265
|
const manager = await getPluginManager();
|
|
1263
1266
|
const agent = manager.getAgent(agentId);
|
|
1264
1267
|
if (!agent) {
|
|
1265
|
-
console.log(
|
|
1268
|
+
console.log(a.red(`Agent not found: ${agentId}`));
|
|
1266
1269
|
return;
|
|
1267
1270
|
}
|
|
1268
|
-
console.log(
|
|
1271
|
+
console.log(a.yellow(`
|
|
1269
1272
|
\u26A0\uFE0F Removing agent: ${agent.name.en}`));
|
|
1270
|
-
console.log(
|
|
1273
|
+
console.log(a.red("Agent removal not yet implemented"));
|
|
1271
1274
|
}
|
|
1272
1275
|
async function runAgent(agentId, task) {
|
|
1273
1276
|
if (!agentId) {
|
|
1274
|
-
console.log(
|
|
1277
|
+
console.log(a.red("Error: Please specify an agent ID"));
|
|
1275
1278
|
return;
|
|
1276
1279
|
}
|
|
1277
1280
|
const manager = await getPluginManager();
|
|
1278
1281
|
const agent = manager.getAgent(agentId);
|
|
1279
1282
|
if (!agent) {
|
|
1280
|
-
console.log(
|
|
1283
|
+
console.log(a.red(`Agent not found: ${agentId}`));
|
|
1281
1284
|
return;
|
|
1282
1285
|
}
|
|
1283
|
-
console.log(
|
|
1286
|
+
console.log(a.cyan(`
|
|
1284
1287
|
\u{1F916} Starting agent: ${agent.name.en}
|
|
1285
1288
|
`));
|
|
1286
1289
|
try {
|
|
1287
1290
|
const runtime = await getAgentRuntime(agentId);
|
|
1288
|
-
console.log(
|
|
1289
|
-
console.log(
|
|
1290
|
-
console.log(
|
|
1291
|
-
console.log(
|
|
1291
|
+
console.log(a.bold("System Prompt:"));
|
|
1292
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
1293
|
+
console.log(a.dim(runtime.getSystemPrompt()));
|
|
1294
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
1292
1295
|
console.log("");
|
|
1293
1296
|
if (task) {
|
|
1294
1297
|
runtime.setTask(task);
|
|
1295
|
-
console.log(
|
|
1296
|
-
console.log(
|
|
1298
|
+
console.log(a.bold("Task:"));
|
|
1299
|
+
console.log(a.dim(task));
|
|
1297
1300
|
console.log("");
|
|
1298
1301
|
}
|
|
1299
1302
|
const skillContent = runtime.getSkillContent();
|
|
1300
1303
|
if (skillContent) {
|
|
1301
|
-
console.log(
|
|
1302
|
-
console.log(
|
|
1304
|
+
console.log(a.bold("Skill Knowledge:"));
|
|
1305
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
1303
1306
|
const lines = skillContent.split("\n").slice(0, 20);
|
|
1304
1307
|
for (const line of lines) {
|
|
1305
|
-
console.log(
|
|
1308
|
+
console.log(a.dim(line));
|
|
1306
1309
|
}
|
|
1307
1310
|
if (skillContent.split("\n").length > 20) {
|
|
1308
|
-
console.log(
|
|
1311
|
+
console.log(a.dim("... (truncated)"));
|
|
1309
1312
|
}
|
|
1310
|
-
console.log(
|
|
1313
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
1311
1314
|
}
|
|
1312
1315
|
console.log("");
|
|
1313
|
-
console.log(
|
|
1314
|
-
console.log(
|
|
1316
|
+
console.log(a.green("\u2705 Agent ready!"));
|
|
1317
|
+
console.log(a.dim("The system prompt and skill knowledge above can be used with Claude."));
|
|
1315
1318
|
} catch (error) {
|
|
1316
|
-
console.log(
|
|
1319
|
+
console.log(a.red(`\u274C Failed to start agent: ${error instanceof Error ? error.message : error}`));
|
|
1317
1320
|
}
|
|
1318
1321
|
}
|
|
1319
1322
|
async function listTemplates(options) {
|
|
@@ -1323,7 +1326,7 @@ async function listTemplates(options) {
|
|
|
1323
1326
|
console.log(JSON.stringify(templates, null, 2));
|
|
1324
1327
|
return;
|
|
1325
1328
|
}
|
|
1326
|
-
console.log(
|
|
1329
|
+
console.log(a.cyan("\n\u{1F4CB} Available Agent Templates\n"));
|
|
1327
1330
|
const templateInfo = {
|
|
1328
1331
|
"code-assistant": {
|
|
1329
1332
|
name: "Code Assistant",
|
|
@@ -1354,17 +1357,17 @@ async function listTemplates(options) {
|
|
|
1354
1357
|
for (const templateId of templates) {
|
|
1355
1358
|
const info = templateInfo[templateId];
|
|
1356
1359
|
if (info) {
|
|
1357
|
-
console.log(` ${
|
|
1358
|
-
console.log(
|
|
1359
|
-
console.log(
|
|
1360
|
+
console.log(` ${a.bold(info.name)} ${a.dim(`(${templateId})`)}`);
|
|
1361
|
+
console.log(a.dim(` ${info.description}`));
|
|
1362
|
+
console.log(a.dim(` Capabilities: ${info.capabilities.join(", ")}`));
|
|
1360
1363
|
console.log("");
|
|
1361
1364
|
} else {
|
|
1362
|
-
console.log(` ${
|
|
1365
|
+
console.log(` ${a.bold(templateId)}`);
|
|
1363
1366
|
console.log("");
|
|
1364
1367
|
}
|
|
1365
1368
|
}
|
|
1366
|
-
console.log(
|
|
1367
|
-
console.log(
|
|
1369
|
+
console.log(a.dim("Create an agent from template:"));
|
|
1370
|
+
console.log(a.dim(" agent create my-assistant --template code-assistant"));
|
|
1368
1371
|
}
|
|
1369
1372
|
function formatCapability(cap) {
|
|
1370
1373
|
const labels = {
|
|
@@ -1384,43 +1387,43 @@ function formatCapability(cap) {
|
|
|
1384
1387
|
}
|
|
1385
1388
|
function showAgentHelp() {
|
|
1386
1389
|
console.log(`
|
|
1387
|
-
${
|
|
1390
|
+
${a.bold(a.cyan("\u{1F916} Agent Command"))}
|
|
1388
1391
|
|
|
1389
|
-
${
|
|
1392
|
+
${a.bold("Usage:")}
|
|
1390
1393
|
agent <command> [options]
|
|
1391
1394
|
|
|
1392
|
-
${
|
|
1393
|
-
${
|
|
1394
|
-
${
|
|
1395
|
-
${
|
|
1396
|
-
${
|
|
1397
|
-
${
|
|
1398
|
-
${
|
|
1395
|
+
${a.bold("Commands:")}
|
|
1396
|
+
${a.green("create")} <name> Create a new agent
|
|
1397
|
+
${a.green("list")} List all agents
|
|
1398
|
+
${a.green("info")} <id> Show agent details
|
|
1399
|
+
${a.green("remove")} <id> Remove an agent
|
|
1400
|
+
${a.green("run")} <id> [task] Run an agent
|
|
1401
|
+
${a.green("templates")} List available templates
|
|
1399
1402
|
|
|
1400
|
-
${
|
|
1403
|
+
${a.bold("Options:")}
|
|
1401
1404
|
--template <id> Use a template (code-assistant, git-master, etc.)
|
|
1402
1405
|
--skills <ids> Comma-separated skill IDs to include
|
|
1403
1406
|
--mcp <servers> Comma-separated MCP server names
|
|
1404
1407
|
--persona <text> Custom persona for the agent
|
|
1405
1408
|
--json Output as JSON
|
|
1406
1409
|
|
|
1407
|
-
${
|
|
1408
|
-
${
|
|
1410
|
+
${a.bold("Examples:")}
|
|
1411
|
+
${a.dim("# Create from template")}
|
|
1409
1412
|
agent create my-assistant --template code-assistant
|
|
1410
1413
|
|
|
1411
|
-
${
|
|
1414
|
+
${a.dim("# Create with specific skills")}
|
|
1412
1415
|
agent create reviewer --skills code-reviewer,react-best-practices
|
|
1413
1416
|
|
|
1414
|
-
${
|
|
1417
|
+
${a.dim("# Create with MCP servers")}
|
|
1415
1418
|
agent create deployer --mcp vercel,github --skills vercel-deploy
|
|
1416
1419
|
|
|
1417
|
-
${
|
|
1420
|
+
${a.dim("# List all agents")}
|
|
1418
1421
|
agent list
|
|
1419
1422
|
|
|
1420
|
-
${
|
|
1423
|
+
${a.dim("# Run an agent")}
|
|
1421
1424
|
agent run my-assistant "Review this code"
|
|
1422
1425
|
|
|
1423
|
-
${
|
|
1426
|
+
${a.bold("Agent Composition:")}
|
|
1424
1427
|
Agents combine Skills (knowledge) + MCP (tools) + Persona (behavior)
|
|
1425
1428
|
|
|
1426
1429
|
\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510
|