ccjk 13.6.7 → 14.0.1

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.
Files changed (51) hide show
  1. package/dist/chunks/api-cli.mjs +4 -2
  2. package/dist/chunks/api-config-selector.mjs +2 -4
  3. package/dist/chunks/auto-fix.mjs +3 -1
  4. package/dist/chunks/ccjk-all.mjs +5 -2
  5. package/dist/chunks/ccjk-mcp.mjs +5 -2
  6. package/dist/chunks/ccjk-setup.mjs +4 -1
  7. package/dist/chunks/ccr.mjs +5 -8
  8. package/dist/chunks/check-updates.mjs +1 -4
  9. package/dist/chunks/claude-code-incremental-manager.mjs +4 -6
  10. package/dist/chunks/code-type-resolver.mjs +878 -0
  11. package/dist/chunks/codex-config-switch.mjs +0 -1
  12. package/dist/chunks/codex-provider-manager.mjs +0 -1
  13. package/dist/chunks/codex.mjs +2 -2
  14. package/dist/chunks/config-switch.mjs +2 -4
  15. package/dist/chunks/config.mjs +1144 -5
  16. package/dist/chunks/config2.mjs +6 -4
  17. package/dist/chunks/config3.mjs +4 -2
  18. package/dist/chunks/doctor.mjs +1 -1
  19. package/dist/chunks/evolution.mjs +47 -27
  20. package/dist/chunks/features.mjs +2 -3
  21. package/dist/chunks/index10.mjs +115 -12
  22. package/dist/chunks/init.mjs +44 -17
  23. package/dist/chunks/installer.mjs +2 -2
  24. package/dist/chunks/mcp-cli.mjs +18 -19
  25. package/dist/chunks/mcp.mjs +6 -7
  26. package/dist/chunks/package.mjs +1 -1
  27. package/dist/chunks/platform.mjs +1 -1
  28. package/dist/chunks/quick-setup.mjs +2 -5
  29. package/dist/chunks/slash-commands.mjs +1 -1
  30. package/dist/chunks/status.mjs +63 -16
  31. package/dist/chunks/uninstall.mjs +1 -3
  32. package/dist/chunks/update.mjs +4 -5
  33. package/dist/cli.mjs +58 -17
  34. package/dist/i18n/locales/en/configuration.json +6 -2
  35. package/dist/i18n/locales/en/menu.json +7 -0
  36. package/dist/i18n/locales/zh-CN/configuration.json +6 -2
  37. package/dist/i18n/locales/zh-CN/menu.json +7 -0
  38. package/dist/index.d.mts +64 -17
  39. package/dist/index.d.ts +64 -17
  40. package/dist/index.mjs +12 -720
  41. package/dist/shared/{ccjk.DHaUdzX3.mjs → ccjk.B6VCKdyy.mjs} +2 -2
  42. package/dist/shared/ccjk.BO45TPXJ.mjs +807 -0
  43. package/dist/shared/{ccjk.B4aXNclK.mjs → ccjk.CVjfbEIj.mjs} +1 -1
  44. package/dist/shared/{ccjk.Dz0ssUQx.mjs → ccjk.Dh6Be-ef.mjs} +1 -1
  45. package/package.json +1 -1
  46. package/dist/chunks/claude-code-config-manager.mjs +0 -811
  47. package/dist/chunks/claude-config.mjs +0 -286
  48. package/dist/chunks/intent-engine.mjs +0 -142
  49. package/dist/chunks/smart-defaults.mjs +0 -425
  50. package/dist/shared/ccjk.DJuyfrlL.mjs +0 -348
  51. package/dist/shared/ccjk.yYQMbHH3.mjs +0 -115
package/dist/index.mjs CHANGED
@@ -1,21 +1,22 @@
1
1
  export { P as ProjectAnalyzer, T as TemplatesClient, d as analyzeDependencies, a as analyzeProject, h as batchAnalyze, b as createTemplatesClient, e as detectProject, f as detectProjectType, g as getTemplatesClient } from './shared/ccjk.Cv13QsGp.mjs';
2
2
  import { a as createCloudClient } from './shared/ccjk.Dhu8ia5S.mjs';
3
3
  export { C as CachedCloudClient, b as CloudCache, d as CloudClient, F as FallbackCloudClient, R as RetryableCloudClient, T as TelemetryReporter, c as createCompleteCloudClient, g as getTelemetry, i as initializeTelemetry, r as retryUtils, s as stopTelemetry, t as telemetryUtils, e as trackEvent, w as withRetry } from './shared/ccjk.Dhu8ia5S.mjs';
4
+ import { T as ToolRegistry } from './shared/ccjk.BO45TPXJ.mjs';
5
+ export { A as AiderTool, B as BaseCodeTool, C as ClaudeCodeTool, b as ClineTool, c as CodexTool, d as ContinueTool, e as CursorTool, a as getRegistry, g as getRuntimeCapabilityDescriptor } from './shared/ccjk.BO45TPXJ.mjs';
4
6
  import { CLOUD_ENDPOINTS } from './chunks/constants.mjs';
5
7
  export { C as CloudError, a as CloudErrorCode, b as CloudErrorFactory, f as formatErrorForLogging, g as getRetryDelay, h as handleCloudError, i as isAuthError, c as isRateLimitError, d as isRetryableError, e as isRetryableErrorCode } from './shared/ccjk.vO3d1ABk.mjs';
6
8
  import { e as extractString } from './shared/ccjk.C2jHOZVP.mjs';
7
9
  export { a as extractDisplayName, i as i18nHelpers, n as normalizeRecommendation, b as normalizeRecommendations } from './shared/ccjk.C2jHOZVP.mjs';
8
- import { exec, execSync } from 'node:child_process';
9
- import { promises, existsSync, readdirSync, readFileSync, statSync, createReadStream } from 'node:fs';
10
- import * as os from 'node:os';
11
- import { homedir } from 'node:os';
12
- import * as path from 'node:path';
13
- import { promisify } from 'node:util';
14
10
  import a from './chunks/index5.mjs';
15
11
  import { g as getRuntimeVersion } from './shared/ccjk.gDEDGD_t.mjs';
12
+ import { execSync } from 'node:child_process';
13
+ import { existsSync, readdirSync, readFileSync, statSync, promises, createReadStream } from 'node:fs';
14
+ import * as os from 'node:os';
15
+ import { homedir } from 'node:os';
16
16
  import { j as join$1 } from './shared/ccjk.bQ7Dh1g4.mjs';
17
17
  import { b as buildCommand, c as commandExists, a as escapeArgument, e as executeCommand, d as executeCommandParallel, f as executeCommandSequence, g as executeCommandStream, h as getCommandPath, i as getCommandVersion, p as parseVersion } from './shared/ccjk.BnsY5WxD.mjs';
18
- export { j as config } from './chunks/config.mjs';
18
+ export { B as config } from './chunks/config.mjs';
19
+ import * as path from 'node:path';
19
20
  export { a as loggerUtils } from './shared/ccjk.8oaxX4iR.mjs';
20
21
  export { p as platform } from './chunks/platform.mjs';
21
22
  import { Transform } from 'node:stream';
@@ -25,6 +26,7 @@ import 'tinyglobby';
25
26
  import './shared/ccjk.BBtCGd_g.mjs';
26
27
  import 'node:url';
27
28
  import 'node:crypto';
29
+ import 'node:util';
28
30
  import './chunks/index2.mjs';
29
31
  import 'node:process';
30
32
  import './shared/ccjk.BAGoDD49.mjs';
@@ -40,11 +42,12 @@ import 'fs';
40
42
  import 'child_process';
41
43
  import 'buffer';
42
44
  import 'string_decoder';
43
- import './chunks/claude-config.mjs';
44
45
  import './chunks/json-config.mjs';
45
46
  import './chunks/fs-operations.mjs';
46
47
  import 'node:fs/promises';
47
48
  import './shared/ccjk.DScm_NnL.mjs';
49
+ import './chunks/ccjk-config.mjs';
50
+ import './chunks/index3.mjs';
48
51
  import './chunks/main.mjs';
49
52
  import 'module';
50
53
 
@@ -1037,717 +1040,6 @@ const userSkillsApi = {
1037
1040
  sortByLastUsed
1038
1041
  };
1039
1042
 
1040
- const execAsync = promisify(exec);
1041
- class BaseCodeTool {
1042
- config;
1043
- configPath;
1044
- constructor(initialConfig) {
1045
- this.config = {
1046
- name: this.getMetadata().name,
1047
- ...initialConfig
1048
- };
1049
- this.configPath = this.getDefaultConfigPath();
1050
- }
1051
- /**
1052
- * Get the default configuration path for this tool
1053
- */
1054
- getDefaultConfigPath() {
1055
- const homeDir = os.homedir();
1056
- const configDir = path.join(homeDir, ".ccjk", "tools");
1057
- return path.join(configDir, `${this.getMetadata().name}.json`);
1058
- }
1059
- /**
1060
- * Check if the tool is installed
1061
- */
1062
- async isInstalled() {
1063
- try {
1064
- const command = this.getInstallCheckCommand();
1065
- const { stdout, stderr } = await execAsync(command);
1066
- const version = this.parseVersion(stdout || stderr);
1067
- return {
1068
- installed: true,
1069
- version,
1070
- path: await this.findToolPath()
1071
- };
1072
- } catch (error) {
1073
- return {
1074
- installed: false,
1075
- error: error instanceof Error ? error.message : "Unknown error"
1076
- };
1077
- }
1078
- }
1079
- /**
1080
- * Install the tool
1081
- */
1082
- async install() {
1083
- try {
1084
- const command = this.getInstallCommand();
1085
- const { stdout, stderr } = await execAsync(command);
1086
- return {
1087
- success: true,
1088
- output: stdout || stderr,
1089
- exitCode: 0
1090
- };
1091
- } catch (error) {
1092
- return {
1093
- success: false,
1094
- error: error instanceof Error ? error.message : "Installation failed",
1095
- exitCode: 1
1096
- };
1097
- }
1098
- }
1099
- /**
1100
- * Uninstall the tool
1101
- */
1102
- async uninstall() {
1103
- try {
1104
- const command = this.getUninstallCommand();
1105
- const { stdout, stderr } = await execAsync(command);
1106
- await this.removeConfigFile();
1107
- return {
1108
- success: true,
1109
- output: stdout || stderr,
1110
- exitCode: 0
1111
- };
1112
- } catch (error) {
1113
- return {
1114
- success: false,
1115
- error: error instanceof Error ? error.message : "Uninstallation failed",
1116
- exitCode: 1
1117
- };
1118
- }
1119
- }
1120
- /**
1121
- * Get current configuration
1122
- */
1123
- async getConfig() {
1124
- try {
1125
- await this.loadConfig();
1126
- return { ...this.config };
1127
- } catch (_error) {
1128
- return { ...this.config };
1129
- }
1130
- }
1131
- /**
1132
- * Update configuration
1133
- */
1134
- async updateConfig(updates) {
1135
- this.config = {
1136
- ...this.config,
1137
- ...updates
1138
- };
1139
- await this.saveConfig();
1140
- }
1141
- /**
1142
- * Configure the tool with full config
1143
- */
1144
- async configure(config) {
1145
- const isValid = await this.validateConfig(config);
1146
- if (!isValid) {
1147
- throw new Error("Invalid configuration");
1148
- }
1149
- this.config = { ...config };
1150
- await this.saveConfig();
1151
- }
1152
- /**
1153
- * Validate configuration
1154
- */
1155
- async validateConfig(config) {
1156
- if (!config.name) {
1157
- return false;
1158
- }
1159
- return true;
1160
- }
1161
- /**
1162
- * Execute a command with the tool
1163
- */
1164
- async execute(command, args = []) {
1165
- try {
1166
- const fullCommand = this.buildCommand(command, args);
1167
- const { stdout, stderr } = await execAsync(fullCommand, {
1168
- env: { ...process.env, ...this.config.env }
1169
- });
1170
- return {
1171
- success: true,
1172
- output: stdout || stderr,
1173
- exitCode: 0
1174
- };
1175
- } catch (error) {
1176
- return {
1177
- success: false,
1178
- error: error.message || "Execution failed",
1179
- exitCode: error.code || 1
1180
- };
1181
- }
1182
- }
1183
- /**
1184
- * Get tool version
1185
- */
1186
- async getVersion() {
1187
- const status = await this.isInstalled();
1188
- return status.version;
1189
- }
1190
- /**
1191
- * Reset tool to default configuration
1192
- */
1193
- async reset() {
1194
- this.config = {
1195
- name: this.getMetadata().name
1196
- };
1197
- await this.removeConfigFile();
1198
- }
1199
- /**
1200
- * Load configuration from file
1201
- */
1202
- async loadConfig() {
1203
- try {
1204
- const data = await promises.readFile(this.configPath, "utf-8");
1205
- const loadedConfig = JSON.parse(data);
1206
- this.config = { ...this.config, ...loadedConfig };
1207
- } catch (_error) {
1208
- }
1209
- }
1210
- /**
1211
- * Save configuration to file
1212
- */
1213
- async saveConfig() {
1214
- try {
1215
- const configDir = path.dirname(this.configPath);
1216
- await promises.mkdir(configDir, { recursive: true });
1217
- await promises.writeFile(this.configPath, JSON.stringify(this.config, null, 2));
1218
- } catch (error) {
1219
- throw new Error(`Failed to save configuration: ${error}`);
1220
- }
1221
- }
1222
- /**
1223
- * Remove configuration file
1224
- */
1225
- async removeConfigFile() {
1226
- try {
1227
- await promises.unlink(this.configPath);
1228
- } catch (_error) {
1229
- }
1230
- }
1231
- /**
1232
- * Build command string from command and arguments
1233
- */
1234
- buildCommand(command, args) {
1235
- const escapedArgs = args.map((arg) => {
1236
- return arg.includes(" ") ? `"${arg}"` : arg;
1237
- });
1238
- return [command, ...escapedArgs].join(" ");
1239
- }
1240
- /**
1241
- * Parse version from command output
1242
- */
1243
- parseVersion(output) {
1244
- const patterns = [
1245
- /version\s+(\d+\.\d+\.\d+)/i,
1246
- /v?(\d+\.\d+\.\d+)/,
1247
- /(\d+\.\d+\.\d+)/
1248
- ];
1249
- for (const pattern of patterns) {
1250
- const match = output.match(pattern);
1251
- if (match) {
1252
- return match[1];
1253
- }
1254
- }
1255
- return void 0;
1256
- }
1257
- /**
1258
- * Find the tool's installation path
1259
- */
1260
- async findToolPath() {
1261
- try {
1262
- const { stdout } = await execAsync(`which ${this.getMetadata().name}`);
1263
- return stdout.trim();
1264
- } catch (_error) {
1265
- return void 0;
1266
- }
1267
- }
1268
- /**
1269
- * Create default capabilities object
1270
- */
1271
- createDefaultCapabilities() {
1272
- return {
1273
- supportsChat: false,
1274
- supportsFileEdit: false,
1275
- supportsCodeGen: false,
1276
- supportsReview: false,
1277
- supportsTesting: false,
1278
- supportsDebugging: false
1279
- };
1280
- }
1281
- }
1282
-
1283
- class AiderTool extends BaseCodeTool {
1284
- getMetadata() {
1285
- return {
1286
- name: "aider",
1287
- displayName: "Aider",
1288
- description: "AI pair programming in your terminal",
1289
- version: "1.0.0",
1290
- homepage: "https://aider.chat",
1291
- documentation: "https://aider.chat/docs",
1292
- capabilities: {
1293
- supportsChat: true,
1294
- supportsFileEdit: true,
1295
- supportsCodeGen: true,
1296
- supportsReview: true,
1297
- supportsTesting: false,
1298
- supportsDebugging: true
1299
- }
1300
- };
1301
- }
1302
- getInstallCheckCommand() {
1303
- return "aider --version";
1304
- }
1305
- getInstallCommand() {
1306
- return "pip install aider-chat";
1307
- }
1308
- getUninstallCommand() {
1309
- return "pip uninstall -y aider-chat";
1310
- }
1311
- /**
1312
- * Start a chat session
1313
- */
1314
- async chat(prompt) {
1315
- return this.execute("aider", ["--message", prompt]);
1316
- }
1317
- /**
1318
- * Continue a chat session
1319
- */
1320
- async continueChat(message) {
1321
- return this.execute("aider", ["--message", message]);
1322
- }
1323
- /**
1324
- * End chat session
1325
- */
1326
- async endChat() {
1327
- await this.execute("aider", ["--exit"]);
1328
- }
1329
- /**
1330
- * Edit a file
1331
- */
1332
- async editFile(filePath, instructions) {
1333
- return this.execute("aider", [filePath, "--message", instructions]);
1334
- }
1335
- /**
1336
- * Edit multiple files
1337
- */
1338
- async editFiles(files, instructions) {
1339
- return this.execute("aider", [...files, "--message", instructions]);
1340
- }
1341
- }
1342
-
1343
- class ClaudeCodeTool extends BaseCodeTool {
1344
- getMetadata() {
1345
- return {
1346
- name: "claude-code",
1347
- displayName: "Claude Code",
1348
- description: "Anthropic's official CLI tool for Claude AI",
1349
- version: "1.0.0",
1350
- homepage: "https://claude.ai",
1351
- documentation: "https://docs.anthropic.com/claude/docs",
1352
- capabilities: {
1353
- supportsChat: true,
1354
- supportsFileEdit: true,
1355
- supportsCodeGen: true,
1356
- supportsReview: true,
1357
- supportsTesting: true,
1358
- supportsDebugging: true
1359
- }
1360
- };
1361
- }
1362
- getInstallCheckCommand() {
1363
- return "claude --version";
1364
- }
1365
- getInstallCommand() {
1366
- return "npm install -g @anthropic-ai/claude-code";
1367
- }
1368
- getUninstallCommand() {
1369
- return "npm uninstall -g @anthropic-ai/claude-code";
1370
- }
1371
- /**
1372
- * Start a chat session
1373
- */
1374
- async chat(prompt) {
1375
- return this.execute("claude", ["chat", prompt]);
1376
- }
1377
- /**
1378
- * Continue a chat session
1379
- */
1380
- async continueChat(message) {
1381
- return this.execute("claude", ["continue", message]);
1382
- }
1383
- /**
1384
- * End chat session
1385
- */
1386
- async endChat() {
1387
- await this.execute("claude", ["exit"]);
1388
- }
1389
- /**
1390
- * Edit a file
1391
- */
1392
- async editFile(filePath, instructions) {
1393
- return this.execute("claude", ["edit", filePath, "--instructions", instructions]);
1394
- }
1395
- /**
1396
- * Edit multiple files
1397
- */
1398
- async editFiles(files, instructions) {
1399
- const fileArgs = files.flatMap((f) => ["--file", f]);
1400
- return this.execute("claude", ["edit", ...fileArgs, "--instructions", instructions]);
1401
- }
1402
- /**
1403
- * Generate code
1404
- */
1405
- async generateCode(prompt, outputPath) {
1406
- const args = ["generate", prompt];
1407
- if (outputPath) {
1408
- args.push("--output", outputPath);
1409
- }
1410
- return this.execute("claude", args);
1411
- }
1412
- }
1413
-
1414
- class ClineTool extends BaseCodeTool {
1415
- getMetadata() {
1416
- return {
1417
- name: "cline",
1418
- displayName: "Cline",
1419
- description: "Autonomous coding agent for VS Code",
1420
- version: "1.0.0",
1421
- homepage: "https://github.com/cline/cline",
1422
- documentation: "https://github.com/cline/cline/wiki",
1423
- capabilities: {
1424
- supportsChat: true,
1425
- supportsFileEdit: true,
1426
- supportsCodeGen: true,
1427
- supportsReview: true,
1428
- supportsTesting: true,
1429
- supportsDebugging: true
1430
- }
1431
- };
1432
- }
1433
- getInstallCheckCommand() {
1434
- return "cline --version";
1435
- }
1436
- getInstallCommand() {
1437
- return "npm install -g cline";
1438
- }
1439
- getUninstallCommand() {
1440
- return "npm uninstall -g cline";
1441
- }
1442
- /**
1443
- * Start a chat session
1444
- */
1445
- async chat(prompt) {
1446
- return this.execute("cline", ["chat", prompt]);
1447
- }
1448
- /**
1449
- * Continue a chat session
1450
- */
1451
- async continueChat(message) {
1452
- return this.execute("cline", ["continue", message]);
1453
- }
1454
- /**
1455
- * End chat session
1456
- */
1457
- async endChat() {
1458
- await this.execute("cline", ["exit"]);
1459
- }
1460
- /**
1461
- * Edit a file
1462
- */
1463
- async editFile(filePath, instructions) {
1464
- return this.execute("cline", ["edit", filePath, "--instructions", instructions]);
1465
- }
1466
- /**
1467
- * Edit multiple files
1468
- */
1469
- async editFiles(files, instructions) {
1470
- const fileArgs = files.flatMap((f) => ["--file", f]);
1471
- return this.execute("cline", ["edit", ...fileArgs, "--instructions", instructions]);
1472
- }
1473
- /**
1474
- * Generate code
1475
- */
1476
- async generateCode(prompt, outputPath) {
1477
- const args = ["generate", prompt];
1478
- if (outputPath) {
1479
- args.push("--output", outputPath);
1480
- }
1481
- return this.execute("cline", args);
1482
- }
1483
- }
1484
-
1485
- class CodexTool extends BaseCodeTool {
1486
- getMetadata() {
1487
- return {
1488
- name: "codex",
1489
- displayName: "OpenAI Codex",
1490
- description: "OpenAI's code generation model",
1491
- version: "1.0.0",
1492
- homepage: "https://openai.com/codex",
1493
- documentation: "https://platform.openai.com/docs",
1494
- capabilities: {
1495
- supportsChat: true,
1496
- supportsFileEdit: false,
1497
- supportsCodeGen: true,
1498
- supportsReview: false,
1499
- supportsTesting: false,
1500
- supportsDebugging: false
1501
- }
1502
- };
1503
- }
1504
- getInstallCheckCommand() {
1505
- return "codex --version";
1506
- }
1507
- getInstallCommand() {
1508
- return "pip install openai-codex";
1509
- }
1510
- getUninstallCommand() {
1511
- return "pip uninstall -y openai-codex";
1512
- }
1513
- /**
1514
- * Generate code
1515
- */
1516
- async generateCode(prompt, outputPath) {
1517
- const args = ["generate", prompt];
1518
- if (outputPath) {
1519
- args.push("--output", outputPath);
1520
- }
1521
- return this.execute("codex", args);
1522
- }
1523
- }
1524
-
1525
- class ContinueTool extends BaseCodeTool {
1526
- getMetadata() {
1527
- return {
1528
- name: "continue",
1529
- displayName: "Continue",
1530
- description: "Open-source autopilot for software development",
1531
- version: "1.0.0",
1532
- homepage: "https://continue.dev",
1533
- documentation: "https://continue.dev/docs",
1534
- capabilities: {
1535
- supportsChat: true,
1536
- supportsFileEdit: true,
1537
- supportsCodeGen: true,
1538
- supportsReview: true,
1539
- supportsTesting: true,
1540
- supportsDebugging: true
1541
- }
1542
- };
1543
- }
1544
- getInstallCheckCommand() {
1545
- return "continue --version";
1546
- }
1547
- getInstallCommand() {
1548
- return "npm install -g continue";
1549
- }
1550
- getUninstallCommand() {
1551
- return "npm uninstall -g continue";
1552
- }
1553
- /**
1554
- * Start a chat session
1555
- */
1556
- async chat(prompt) {
1557
- return this.execute("continue", ["chat", prompt]);
1558
- }
1559
- /**
1560
- * Continue a chat session
1561
- */
1562
- async continueChat(message) {
1563
- return this.execute("continue", ["chat", message]);
1564
- }
1565
- /**
1566
- * End chat session
1567
- */
1568
- async endChat() {
1569
- await this.execute("continue", ["exit"]);
1570
- }
1571
- /**
1572
- * Generate code
1573
- */
1574
- async generateCode(prompt, outputPath) {
1575
- const args = ["generate", prompt];
1576
- if (outputPath) {
1577
- args.push("--output", outputPath);
1578
- }
1579
- return this.execute("continue", args);
1580
- }
1581
- }
1582
-
1583
- class CursorTool extends BaseCodeTool {
1584
- getMetadata() {
1585
- return {
1586
- name: "cursor",
1587
- displayName: "Cursor",
1588
- description: "AI-first code editor",
1589
- version: "1.0.0",
1590
- homepage: "https://cursor.sh",
1591
- documentation: "https://cursor.sh/docs",
1592
- capabilities: {
1593
- supportsChat: true,
1594
- supportsFileEdit: true,
1595
- supportsCodeGen: true,
1596
- supportsReview: true,
1597
- supportsTesting: true,
1598
- supportsDebugging: true
1599
- }
1600
- };
1601
- }
1602
- getInstallCheckCommand() {
1603
- return "cursor --version";
1604
- }
1605
- getInstallCommand() {
1606
- return 'echo "Please download Cursor from https://cursor.sh"';
1607
- }
1608
- getUninstallCommand() {
1609
- return 'echo "Please uninstall Cursor manually"';
1610
- }
1611
- /**
1612
- * Start a chat session
1613
- */
1614
- async chat(prompt) {
1615
- return this.execute("cursor", ["chat", prompt]);
1616
- }
1617
- /**
1618
- * Continue a chat session
1619
- */
1620
- async continueChat(message) {
1621
- return this.execute("cursor", ["chat", message]);
1622
- }
1623
- /**
1624
- * End chat session
1625
- */
1626
- async endChat() {
1627
- await this.execute("cursor", ["exit"]);
1628
- }
1629
- /**
1630
- * Edit a file
1631
- */
1632
- async editFile(filePath, instructions) {
1633
- return this.execute("cursor", ["edit", filePath, "--instructions", instructions]);
1634
- }
1635
- /**
1636
- * Edit multiple files
1637
- */
1638
- async editFiles(files, instructions) {
1639
- const fileArgs = files.flatMap((f) => ["--file", f]);
1640
- return this.execute("cursor", ["edit", ...fileArgs, "--instructions", instructions]);
1641
- }
1642
- /**
1643
- * Generate code
1644
- */
1645
- async generateCode(prompt, outputPath) {
1646
- const args = ["generate", prompt];
1647
- if (outputPath) {
1648
- args.push("--output", outputPath);
1649
- }
1650
- return this.execute("cursor", args);
1651
- }
1652
- }
1653
-
1654
- class ToolRegistry {
1655
- static instance;
1656
- tools;
1657
- toolClasses;
1658
- constructor() {
1659
- this.tools = /* @__PURE__ */ new Map();
1660
- this.toolClasses = /* @__PURE__ */ new Map();
1661
- }
1662
- /**
1663
- * Get singleton instance
1664
- */
1665
- static getInstance() {
1666
- if (!ToolRegistry.instance) {
1667
- ToolRegistry.instance = new ToolRegistry();
1668
- }
1669
- return ToolRegistry.instance;
1670
- }
1671
- /**
1672
- * Register a tool class
1673
- */
1674
- registerToolClass(name, toolClass) {
1675
- this.toolClasses.set(name.toLowerCase(), toolClass);
1676
- }
1677
- /**
1678
- * Register a tool instance
1679
- */
1680
- registerTool(tool) {
1681
- const metadata = tool.getMetadata();
1682
- this.tools.set(metadata.name.toLowerCase(), tool);
1683
- }
1684
- /**
1685
- * Get a tool instance by name
1686
- */
1687
- getTool(name) {
1688
- const normalizedName = name.toLowerCase();
1689
- if (this.tools.has(normalizedName)) {
1690
- return this.tools.get(normalizedName);
1691
- }
1692
- const ToolClass = this.toolClasses.get(normalizedName);
1693
- if (ToolClass) {
1694
- const tool = new ToolClass();
1695
- this.tools.set(normalizedName, tool);
1696
- return tool;
1697
- }
1698
- return void 0;
1699
- }
1700
- /**
1701
- * Get all registered tool names
1702
- */
1703
- getToolNames() {
1704
- return Array.from(this.toolClasses.keys());
1705
- }
1706
- /**
1707
- * Get all tool instances
1708
- */
1709
- getAllTools() {
1710
- return Array.from(this.tools.values());
1711
- }
1712
- /**
1713
- * Check if a tool is registered
1714
- */
1715
- hasTool(name) {
1716
- return this.toolClasses.has(name.toLowerCase());
1717
- }
1718
- /**
1719
- * Unregister a tool
1720
- */
1721
- unregisterTool(name) {
1722
- const normalizedName = name.toLowerCase();
1723
- this.tools.delete(normalizedName);
1724
- this.toolClasses.delete(normalizedName);
1725
- }
1726
- /**
1727
- * Clear all registered tools
1728
- */
1729
- clear() {
1730
- this.tools.clear();
1731
- this.toolClasses.clear();
1732
- }
1733
- /**
1734
- * Get metadata for all registered tools
1735
- */
1736
- async getAllMetadata() {
1737
- const metadata = [];
1738
- for (const name of this.toolClasses.keys()) {
1739
- const tool = this.getTool(name);
1740
- if (tool) {
1741
- metadata.push(tool.getMetadata());
1742
- }
1743
- }
1744
- return metadata;
1745
- }
1746
- }
1747
- function getRegistry() {
1748
- return ToolRegistry.getInstance();
1749
- }
1750
-
1751
1043
  class ToolFactory {
1752
1044
  registry;
1753
1045
  constructor(registry) {
@@ -4436,4 +3728,4 @@ function assert(condition, message) {
4436
3728
  }
4437
3729
  }
4438
3730
 
4439
- export { AiderTool, BaseCodeTool, BaseError, ClaudeCodeTool, ClineTool, CodexTool, ConfigManager, ConfigValidator, ConfigurationError, ContinueTool, CursorTool, InternalError, Logger, Mutex, NotFoundError, RatingsApiError, RatingsApiErrorCode, Semaphore, TimeoutError, ToolFactory, ToolRegistry, UnauthorizedError, ValidationError, index$6 as array, assert, assertDefined, index$5 as async, batchProcessFiles, camelCase, canInstallMore, capitalize, chunk, index$4 as command, commandExists, convertBatchTemplateResponse, convertConfig, convertParameterDefault, convertProjectAnalysisResponse, convertRecommendation, convertTemplate, convertTemplateParameter, copyFile, countLines, createCloudClient, createConfigManager, createLogger, createRating, createTool, createValidator, debounce, deepClone, deepMerge, deleteDir, deleteFile, difference, ensureDir, index$3 as error, executeCommand, executeCommandStream, exists, extractString, flatten, flatten$1 as flattenArray, formatError, index$2 as fs, generateCompactWelcome, generateRecommendations, generateWelcome, get, getArchitecture, getCacheDir, getCapabilitiesByType, getCapability, getCloudMcpRecommendations, getCloudRecommendations, getCloudSkillRecommendations, getCommandPath, getCommandVersion, getConfigDir, getDataDir, getDisabledSkills, getEnabledSkills, getErrorMessage, getFileInfo, getFileSize, getHomeDir, getPlatform, getPlatformInfo, getQuotaUsagePercentage, getRecommendations, getRegistry, getSkillRatings, getTempDir, getUserQuota, getUserSkills, has, installSkill, intersection, isArray, isBoolean, isDefined, isDirectory, isDuplicateRatingError, isEmail, isFile, isLargeFile, isLinux, isMacOS, isNumber, isObject, isRecommendationConfig, isSkillInstalled, isSkillNotFoundError, isString, isTelemetryEventData, isTemplateParameterValue, isURL, isUnauthorizedError, isUnix, isWindows, kebabCase, listDirs, listFiles, logger, moveFile, index$1 as object, omit, parallelLimit, partition, pascalCase, pick, processLargeFile, processLineByLine, ratingsApi, readFile, readJSON, retry, scanCapabilities, sequence, set, shuffle, skillsMarketplaceApi, sleep, slugify, snakeCase, sortByLastUsed, sortByUsage, streamJSON, streamWriteJSON, index as string, template, throttle, timeout, truncate, tryCatch, tryCatchAsync, unflatten, uninstallSkill, union, unique, updateSkill, userSkillsApi, validateBatchTemplateRequest, validateProjectAnalysisRequest, validateUsageReport, validation, validators, waitFor, wrapError, writeFile, writeJSON };
3731
+ export { BaseError, ConfigManager, ConfigValidator, ConfigurationError, InternalError, Logger, Mutex, NotFoundError, RatingsApiError, RatingsApiErrorCode, Semaphore, TimeoutError, ToolFactory, ToolRegistry, UnauthorizedError, ValidationError, index$6 as array, assert, assertDefined, index$5 as async, batchProcessFiles, camelCase, canInstallMore, capitalize, chunk, index$4 as command, commandExists, convertBatchTemplateResponse, convertConfig, convertParameterDefault, convertProjectAnalysisResponse, convertRecommendation, convertTemplate, convertTemplateParameter, copyFile, countLines, createCloudClient, createConfigManager, createLogger, createRating, createTool, createValidator, debounce, deepClone, deepMerge, deleteDir, deleteFile, difference, ensureDir, index$3 as error, executeCommand, executeCommandStream, exists, extractString, flatten, flatten$1 as flattenArray, formatError, index$2 as fs, generateCompactWelcome, generateRecommendations, generateWelcome, get, getArchitecture, getCacheDir, getCapabilitiesByType, getCapability, getCloudMcpRecommendations, getCloudRecommendations, getCloudSkillRecommendations, getCommandPath, getCommandVersion, getConfigDir, getDataDir, getDisabledSkills, getEnabledSkills, getErrorMessage, getFileInfo, getFileSize, getHomeDir, getPlatform, getPlatformInfo, getQuotaUsagePercentage, getRecommendations, getSkillRatings, getTempDir, getUserQuota, getUserSkills, has, installSkill, intersection, isArray, isBoolean, isDefined, isDirectory, isDuplicateRatingError, isEmail, isFile, isLargeFile, isLinux, isMacOS, isNumber, isObject, isRecommendationConfig, isSkillInstalled, isSkillNotFoundError, isString, isTelemetryEventData, isTemplateParameterValue, isURL, isUnauthorizedError, isUnix, isWindows, kebabCase, listDirs, listFiles, logger, moveFile, index$1 as object, omit, parallelLimit, partition, pascalCase, pick, processLargeFile, processLineByLine, ratingsApi, readFile, readJSON, retry, scanCapabilities, sequence, set, shuffle, skillsMarketplaceApi, sleep, slugify, snakeCase, sortByLastUsed, sortByUsage, streamJSON, streamWriteJSON, index as string, template, throttle, timeout, truncate, tryCatch, tryCatchAsync, unflatten, uninstallSkill, union, unique, updateSkill, userSkillsApi, validateBatchTemplateRequest, validateProjectAnalysisRequest, validateUsageReport, validation, validators, waitFor, wrapError, writeFile, writeJSON };