ccjk 2.2.4 → 2.3.0

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 (70) hide show
  1. package/dist/chunks/auto-updater.mjs +15 -1
  2. package/dist/chunks/ccjk-config.mjs +77 -13
  3. package/dist/chunks/ccr.mjs +7 -10
  4. package/dist/chunks/ccu.mjs +4 -4
  5. package/dist/chunks/check-updates.mjs +4 -7
  6. package/dist/chunks/claude-code-config-manager.mjs +8 -11
  7. package/dist/chunks/claude-code-incremental-manager.mjs +4 -7
  8. package/dist/chunks/codex.mjs +416 -17
  9. package/dist/chunks/commands.mjs +392 -89
  10. package/dist/chunks/commands2.mjs +109 -0
  11. package/dist/chunks/config-consolidator.mjs +2 -2
  12. package/dist/chunks/config-switch.mjs +5 -8
  13. package/dist/chunks/doctor.mjs +6 -6
  14. package/dist/chunks/features.mjs +654 -35
  15. package/dist/chunks/help.mjs +339 -0
  16. package/dist/chunks/index.mjs +1020 -10
  17. package/dist/chunks/index2.mjs +4 -3
  18. package/dist/chunks/index3.mjs +1171 -0
  19. package/dist/chunks/init.mjs +21 -24
  20. package/dist/chunks/installer.mjs +178 -0
  21. package/dist/chunks/interview.mjs +6 -6
  22. package/dist/chunks/mcp-performance.mjs +79 -2
  23. package/dist/chunks/mcp.mjs +500 -0
  24. package/dist/chunks/menu.mjs +10 -10
  25. package/dist/chunks/notification.mjs +5 -5
  26. package/dist/chunks/onboarding.mjs +6 -6
  27. package/dist/chunks/package.mjs +1 -1
  28. package/dist/chunks/platform.mjs +10 -10
  29. package/dist/chunks/prompts.mjs +7 -8
  30. package/dist/chunks/session.mjs +2 -2
  31. package/dist/chunks/skills-sync.mjs +2 -2
  32. package/dist/chunks/uninstall.mjs +4 -5
  33. package/dist/chunks/update.mjs +4 -7
  34. package/dist/chunks/upgrade-manager.mjs +2 -2
  35. package/dist/chunks/version-checker.mjs +88 -7
  36. package/dist/chunks/workflows.mjs +617 -84
  37. package/dist/cli.mjs +295 -55
  38. package/dist/i18n/locales/en/agentBrowser.json +79 -0
  39. package/dist/i18n/locales/en/cloud-sync.json +147 -0
  40. package/dist/i18n/locales/en/marketplace.json +32 -1
  41. package/dist/i18n/locales/en/mcp.json +2 -4
  42. package/dist/i18n/locales/en/updater.json +3 -1
  43. package/dist/i18n/locales/zh/agentBrowser.json +79 -0
  44. package/dist/i18n/locales/zh-CN/cloud-sync.json +147 -0
  45. package/dist/i18n/locales/zh-CN/common.json +1 -1
  46. package/dist/i18n/locales/zh-CN/marketplace.json +32 -1
  47. package/dist/i18n/locales/zh-CN/mcp.json +2 -4
  48. package/dist/i18n/locales/zh-CN/updater.json +3 -1
  49. package/dist/index.d.mts +8 -584
  50. package/dist/index.d.ts +8 -584
  51. package/dist/index.mjs +9 -13
  52. package/dist/shared/{ccjk.DJM5aVQJ.mjs → ccjk.ByTIGCUC.mjs} +3 -3
  53. package/dist/shared/{ccjk.qYAnUMuy.mjs → ccjk.CGTmRqsu.mjs} +2 -3
  54. package/dist/shared/{ccjk.CUdzQluX.mjs → ccjk.CURU8gbR.mjs} +1 -1
  55. package/dist/{chunks/mcp-market.mjs → shared/ccjk.D-RZS4E2.mjs} +6 -65
  56. package/dist/shared/{ccjk.B7169qud.mjs → ccjk.tB4-Y4Qb.mjs} +3 -3
  57. package/package.json +4 -1
  58. package/templates/common/skills/en/agent-browser.md +258 -0
  59. package/templates/common/skills/zh-CN/agent-browser.md +260 -0
  60. package/dist/chunks/claude-config.mjs +0 -228
  61. package/dist/chunks/features2.mjs +0 -661
  62. package/dist/chunks/json-config.mjs +0 -59
  63. package/dist/chunks/mcp-doctor.mjs +0 -160
  64. package/dist/chunks/mcp-profile.mjs +0 -220
  65. package/dist/chunks/mcp-release.mjs +0 -138
  66. package/dist/chunks/shencha.mjs +0 -320
  67. package/dist/chunks/tools.mjs +0 -169
  68. package/dist/shared/ccjk.COdsoe-Y.mjs +0 -64
  69. package/dist/shared/ccjk.DwDtZ5cK.mjs +0 -266
  70. package/dist/shared/ccjk.n_AtlHzB.mjs +0 -186
package/dist/index.mjs CHANGED
@@ -1,40 +1,36 @@
1
1
  export { l as createHomebrewSymlink, f as detectInstalledVersion, m as displayVerificationResult, j as executeInstallMethod, g as getInstallationStatus, k as handleInstallFailure, i as init, b as installClaudeCode, d as installCodex, a as isClaudeCodeInstalled, c as isCodexInstalled, e as isLocalClaudeCodeInstalled, r as removeLocalClaudeCode, h as selectInstallMethod, s as setInstallMethod, u as uninstallCodeTool, v as verifyInstallation } from './chunks/init.mjs';
2
2
  export { AIDER_CONFIG_FILE, AIDER_DIR, AIDER_ENV_FILE, AI_OUTPUT_LANGUAGES, API_DEFAULT_URL, API_ENV_KEY, CCJK_CLOUD_API_URL, CCJK_CLOUD_PLUGINS_API, CCJK_CLOUD_PLUGINS_CACHE_DIR, CCJK_CLOUD_PLUGINS_CACHE_FILE, CCJK_CLOUD_PLUGINS_DIR, CCJK_CLOUD_PLUGINS_INSTALLED_DIR, CCJK_CONFIG_DIR, CCJK_CONFIG_FILE, CCJK_GROUPS_DIR, CCJK_PLUGINS_DIR, CCJK_SKILLS_DIR, CLAUDE_DIR, CLAUDE_MD_FILE, CLAUDE_VSC_CONFIG_FILE, CLINE_CONFIG_FILE, CLINE_DIR, CLOUD_PLUGINS_CACHE_TTL, CLOUD_PLUGINS_MAX_CACHE_SIZE, CODEX_AGENTS_FILE, CODEX_AUTH_FILE, CODEX_CONFIG_FILE, CODEX_DIR, CODEX_PROMPTS_DIR, CODE_TOOL_ALIASES, CODE_TOOL_BANNERS, CODE_TOOL_INFO, CODE_TOOL_TYPES, CONTINUE_CONFIG_FILE, CONTINUE_DIR, CURSOR_CONFIG_FILE, CURSOR_DIR, ClAUDE_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, LANG_LABELS, LEGACY_ZCF_CONFIG_DIR, LEGACY_ZCF_CONFIG_FILE, LEGACY_ZCF_CONFIG_FILES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_DIR, ZCF_CONFIG_FILE, getAiOutputLanguageLabel, isCodeToolType, resolveCodeToolType } from './chunks/constants.mjs';
3
3
  export { C as COLORS, S as STATUS, b as boxify, d as displayBanner, a as displayBannerWithInfo, g as getDisplayWidth, m as menuItem, p as padToDisplayWidth, r as renderProgressBar, s as sectionDivider } from './shared/ccjk.BhKlRJ0h.mjs';
4
- export { c as addCompletedOnboarding, b as backupMcpConfig, a as buildMcpServerConfig, e as ensureApiKeyApproved, f as fixWindowsMcpConfig, g as getMcpConfigPath, h as manageApiKeyApproval, m as mergeMcpServers, r as readMcpConfig, d as removeApiKeyFromRejected, s as setPrimaryApiKey, w as writeMcpConfig } from './chunks/claude-config.mjs';
5
- export { Y as applyAiLanguageDirective, N as applyCodexPlatformCommand, e as backupCodexAgents, b as backupCodexComplete, f as backupCodexConfig, g as backupCodexFiles, h as backupCodexPrompts, P as backupExistingConfig, i as checkCodexUpdate, c as cleanupPermissions, s as codexSwitchToOfficialLogin, R as configureApi, j as configureCodexApi, M as configureCodexMcp, Q as copyConfigFiles, k as createBackupDirectory, d as detectConfigManagementMode, O as ensureClaudeDir, l as ensureEnvKeyMigration, L as getAvailableManagementActions, n as getBackupMessage, o as getCodexVersion, p as getCurrentCodexProvider, X as getExistingApiConfig, W as getExistingModelConfig, q as installCodexCli, t as isCodexCliInstalled, u as listCodexProviders, m as mergeAndCleanPermissions, S as mergeConfigs, V as mergeSettingsFile, v as migrateEnvKeyInContent, x as migrateEnvKeyToTempEnvKey, y as needsEnvKeyMigration, z as parseCodexConfig, _ as promptApiConfigurationAction, r as readCodexConfig, A as renderCodexConfig, B as runCodexFullInit, C as runCodexSystemPromptSelection, D as runCodexUninstall, E as runCodexUpdate, F as runCodexWorkflowImport, G as runCodexWorkflowImportWithLanguageSelection, H as runCodexWorkflowSelection, K as shouldShowManagementMode, I as switchCodexProvider, Z as switchToOfficialLogin, J as switchToProvider, T as updateCustomModel, U as updateDefaultModel, a as writeAuthFile, w as writeCodexConfig } from './chunks/codex.mjs';
4
+ export { l as addCompletedOnboarding, a8 as applyAiLanguageDirective, Z as applyCodexPlatformCommand, q as backupCodexAgents, b as backupCodexComplete, t as backupCodexConfig, u as backupCodexFiles, v as backupCodexPrompts, $ as backupExistingConfig, h as backupMcpConfig, j as buildMcpServerConfig, x as checkCodexUpdate, c as cleanupPermissions, y as codexSwitchToOfficialLogin, a1 as configureApi, z as configureCodexApi, Y as configureCodexMcp, a0 as copyConfigFiles, A as createBackupDirectory, d as detectConfigManagementMode, n as ensureApiKeyApproved, _ as ensureClaudeDir, B as ensureEnvKeyMigration, k as fixWindowsMcpConfig, X as getAvailableManagementActions, C as getBackupMessage, D as getCodexVersion, E as getCurrentCodexProvider, a7 as getExistingApiConfig, a6 as getExistingModelConfig, g as getMcpConfigPath, F as installCodexCli, G as isCodexCliInstalled, H as listCodexProviders, p as manageApiKeyApproval, m as mergeAndCleanPermissions, a2 as mergeConfigs, i as mergeMcpServers, a5 as mergeSettingsFile, I as migrateEnvKeyInContent, J as migrateEnvKeyToTempEnvKey, K as needsEnvKeyMigration, L as parseCodexConfig, aa as promptApiConfigurationAction, r as readCodexConfig, e as readMcpConfig, o as removeApiKeyFromRejected, M as renderCodexConfig, N as runCodexFullInit, O as runCodexSystemPromptSelection, P as runCodexUninstall, Q as runCodexUpdate, R as runCodexWorkflowImport, S as runCodexWorkflowImportWithLanguageSelection, T as runCodexWorkflowSelection, s as setPrimaryApiKey, W as shouldShowManagementMode, U as switchCodexProvider, a9 as switchToOfficialLogin, V as switchToProvider, a3 as updateCustomModel, a4 as updateDefaultModel, a as writeAuthFile, w as writeCodexConfig, f as writeMcpConfig } from './chunks/codex.mjs';
6
5
  export { compareConfigs, consolidateConfigs, detectAllConfigs, displayConfigScan, removeRedundantConfigs, writeConsolidatedConfig } from './chunks/config-consolidator.mjs';
7
- export { d as detectProjectContext, k as formatFileSize, e as generateContextContent, b as getApplicableRules, j as getContextFileTypeLabel, c as getContextFiles, g as getContextRules, h as getProjectTypeLabel, f as getRecommendedRules, i as importRecommendedEnv, a as importRecommendedPermissions, m as mergeContextContent, o as openSettingsJson, r as readContextFile, w as writeContextFile } from './shared/ccjk.DJM5aVQJ.mjs';
8
- export { a5 as CodexUninstaller, al as MenuBuilder, af as addContinueCustomCommand, ae as addContinueMcpServer, aa as addContinueModel, E as addGroup, a1 as addProviderToExisting, o as addSkill, Z as configureAiderApi, ad as configureContinueApi, a0 as configureIncrementalManagement, an as confirm, p as createBatchSkills, a3 as deleteProviders, F as disableGroup, f as disablePlugin, d as discoverPlugins, aj as displayHealthReport, a2 as editExistingProvider, ag as enableContinueContextProvider, G as enableGroup, c as enablePlugin, W as ensureAiderDir, a6 as ensureContinueDir, H as ensureGroupsDir, e as ensurePluginsDir, q as ensureSkillsDir, I as exportGroups, s as exportSkills, _ as getAiderModelPresets, U as getAiderVersion, J as getAllGroups, t as getAllSkills, v as getBatchCategories, ac as getContinueProviderPresets, K as getEnabledAgents, L as getEnabledSkillIds, M as getGroup, N as getGroupRegistry, g as getLoadedPlugins, i as getPluginAgents, a as getPluginInfo, j as getPluginMcpServices, k as getPluginOutputStyles, m as getPluginSkills, h as getPluginWorkflows, x as getSkill, y as getSkillRegistry, O as importGroups, z as importSkills, n as initializePlugins, V as installAider, T as isAiderInstalled, a7 as isContinueConfigured, P as isGroupEnabled, b as listPlugins, l as loadPlugin, X as readAiderConfig, a8 as readContinueConfig, r as readPluginConfig, Q as refreshGroupRegistry, A as refreshSkillRegistry, ab as removeContinueModel, R as removeGroup, B as removeSkill, $ as runAider, ak as runDoctor, ai as runHealthCheck, S as searchGroups, C as searchSkills, D as setSkillEnabled, am as showQuickMenu, ao as showStatus, ah as syncSkillsToContinue, u as unloadPlugin, a4 as validateProviderData, Y as writeAiderConfig, a9 as writeContinueConfig, w as writePluginConfig } from './chunks/index.mjs';
6
+ export { d as detectProjectContext, k as formatFileSize, e as generateContextContent, b as getApplicableRules, j as getContextFileTypeLabel, c as getContextFiles, g as getContextRules, h as getProjectTypeLabel, f as getRecommendedRules, i as importRecommendedEnv, a as importRecommendedPermissions, m as mergeContextContent, o as openSettingsJson, r as readContextFile, w as writeContextFile } from './shared/ccjk.ByTIGCUC.mjs';
7
+ export { a8 as CodexUninstaller, aB as MenuBuilder, ai as addContinueCustomCommand, ah as addContinueMcpServer, ad as addContinueModel, H as addGroup, a4 as addProviderToExisting, o as addSkill, a0 as configureAiderApi, ag as configureContinueApi, a3 as configureIncrementalManagement, aD as confirm, p as createBatchSkills, a6 as deleteProviders, I as disableGroup, f as disablePlugin, d as discoverPlugins, az as displayHealthReport, a5 as editExistingProvider, aj as enableContinueContextProvider, J as enableGroup, c as enablePlugin, Z as ensureAiderDir, a9 as ensureContinueDir, K as ensureGroupsDir, e as ensurePluginsDir, q as ensureSkillsDir, L as exportGroups, s as exportSkills, aw as formatToolStatus, a1 as getAiderModelPresets, X as getAiderVersion, M as getAllGroups, t as getAllSkills, au as getAllToolsInfo, aq as getAllToolsStatus, v as getBatchCategories, x as getBuiltinSkill, y as getBuiltinSkills, af as getContinueProviderPresets, N as getEnabledAgents, O as getEnabledSkillIds, P as getGroup, Q as getGroupRegistry, ar as getInstalledTools, g as getLoadedPlugins, i as getPluginAgents, a as getPluginInfo, j as getPluginMcpServices, k as getPluginOutputStyles, m as getPluginSkills, h as getPluginWorkflows, ax as getRecommendedTools, z as getSkill, A as getSkillRegistry, al as getToolConfigPath, am as getToolDir, at as getToolInfo, ap as getToolStatus, ao as getToolVersion, av as getToolsByCategory, R as importGroups, B as importSkills, n as initializePlugins, Y as installAider, as as installTool, W as isAiderInstalled, C as isBuiltinSkill, aa as isContinueConfigured, S as isGroupEnabled, an as isToolInstalled, b as listPlugins, l as loadPlugin, _ as readAiderConfig, ab as readContinueConfig, r as readPluginConfig, T as refreshGroupRegistry, D as refreshSkillRegistry, ae as removeContinueModel, U as removeGroup, E as removeSkill, a2 as runAider, aA as runDoctor, ay as runHealthCheck, V as searchGroups, F as searchSkills, G as setSkillEnabled, aC as showQuickMenu, aE as showStatus, ak as syncSkillsToContinue, u as unloadPlugin, a7 as validateProviderData, $ as writeAiderConfig, ac as writeContinueConfig, w as writePluginConfig } from './chunks/index.mjs';
9
8
  export { b as detectBuildTools, e as detectCICDSystems, a as detectFrameworks, f as detectLanguages, d as detectPackageManager, h as detectProject, c as detectTestFrameworks, g as determineProjectType, m as exportProjectKnowledge, i as generateSuggestions, k as getProjectKnowledge, j as getProjectSummary, l as loadKnowledgeBase, q as quickSync, r as runOnboarding, s as saveKnowledgeBase } from './chunks/onboarding.mjs';
10
9
  export { PERMISSION_TEMPLATES, addAutoApprovePattern, applyTemplate, displayPermissions, exportPermissions, getCurrentTemplateId, importPermissions, isDirectoryTrusted, isPermissionAllowed, readPermissions, removeAutoApprovePattern, resetPermissions, trustDirectory, untrustDirectory, writePermissions } from './chunks/permission-manager.mjs';
11
10
  export { commandExists, getPlatform } from './chunks/platform.mjs';
12
11
  export { checkAllVersions, checkCcjkVersion, checkClaudeCodeVersion, checkPluginVersions, upgradeAll, upgradeAllPlugins, upgradeCcjk, upgradeClaudeCode, upgradePlugin } from './chunks/upgrade-manager.mjs';
13
12
  export { d as displayCurrentStatus, r as runConfigWizard } from './shared/ccjk.-FoZ3zat.mjs';
14
- export { l as formatToolStatus, j as getAllToolsInfo, d as getAllToolsStatus, e as getInstalledTools, m as getRecommendedTools, g as getToolConfigPath, a as getToolDir, h as getToolInfo, c as getToolStatus, b as getToolVersion, k as getToolsByCategory, f as installTool, i as isToolInstalled } from './shared/ccjk.n_AtlHzB.mjs';
15
13
  import 'node:fs';
16
14
  import 'node:process';
17
15
  import 'ansis';
18
16
  import 'inquirer';
19
17
  import './chunks/package.mjs';
20
- import './shared/ccjk.DwDtZ5cK.mjs';
21
- import 'node:child_process';
22
- import 'node:os';
23
- import 'pathe';
18
+ import './shared/ccjk.CGTmRqsu.mjs';
24
19
  import './chunks/index2.mjs';
25
20
  import 'node:url';
26
21
  import 'i18next';
27
22
  import 'i18next-fs-backend';
28
- import './shared/ccjk.qYAnUMuy.mjs';
23
+ import 'pathe';
29
24
  import './chunks/ccjk-config.mjs';
30
25
  import 'smol-toml';
31
26
  import './chunks/fs-operations.mjs';
32
27
  import 'node:crypto';
33
28
  import 'node:fs/promises';
34
- import './chunks/json-config.mjs';
35
29
  import 'dayjs';
36
30
  import './shared/ccjk.DhBeLRzf.mjs';
37
31
  import 'inquirer-toggle';
32
+ import 'node:child_process';
33
+ import 'node:os';
38
34
  import 'node:util';
39
35
  import './chunks/auto-updater.mjs';
40
36
  import 'ora';
@@ -42,8 +38,8 @@ import 'tinyexec';
42
38
  import './chunks/version-checker.mjs';
43
39
  import 'node:path';
44
40
  import 'semver';
45
- import './shared/ccjk.CUdzQluX.mjs';
46
- import './shared/ccjk.B7169qud.mjs';
41
+ import './shared/ccjk.CURU8gbR.mjs';
42
+ import './shared/ccjk.tB4-Y4Qb.mjs';
47
43
  import './chunks/prompts.mjs';
48
44
  import 'fs-extra';
49
45
  import './shared/ccjk.DGjQxTq_.mjs';
@@ -1,6 +1,6 @@
1
1
  import { existsSync, readdirSync, statSync, readFileSync } from 'node:fs';
2
2
  import { homedir } from 'node:os';
3
- import process from 'node:process';
3
+ import process__default from 'node:process';
4
4
  import { join, dirname } from 'pathe';
5
5
  import { readFile, writeFileAtomic, ensureDir } from '../chunks/fs-operations.mjs';
6
6
  import { fileURLToPath } from 'node:url';
@@ -9,7 +9,7 @@ import { CLAUDE_DIR, SETTINGS_FILE } from '../chunks/constants.mjs';
9
9
  import { m as mergeAndCleanPermissions } from '../chunks/codex.mjs';
10
10
  import { getPlatform } from '../chunks/platform.mjs';
11
11
 
12
- function detectProjectContext(projectPath = process.cwd()) {
12
+ function detectProjectContext(projectPath = process__default.cwd()) {
13
13
  const context = {
14
14
  type: "unknown",
15
15
  language: "unknown",
@@ -350,7 +350,7 @@ function getApplicableRules(projectType) {
350
350
  (rule) => rule.applicableTo.includes(projectType) || rule.applicableTo.includes("unknown")
351
351
  );
352
352
  }
353
- function getContextFiles(projectPath = process.cwd()) {
353
+ function getContextFiles(projectPath = process__default.cwd()) {
354
354
  const home = homedir();
355
355
  const files = [];
356
356
  const globalPath = join(home, ".claude", "CLAUDE.md");
@@ -2,12 +2,11 @@ import ansis from 'ansis';
2
2
  import inquirer from 'inquirer';
3
3
  import { CLAUDE_DIR, SETTINGS_FILE } from '../chunks/constants.mjs';
4
4
  import { ensureI18nInitialized, i18n } from '../chunks/index2.mjs';
5
- import { X as getExistingApiConfig, R as configureApi, Z as switchToOfficialLogin, P as backupExistingConfig, Y as applyAiLanguageDirective } from '../chunks/codex.mjs';
5
+ import { a7 as getExistingApiConfig, a1 as configureApi, a9 as switchToOfficialLogin, $ as backupExistingConfig, a8 as applyAiLanguageDirective } from '../chunks/codex.mjs';
6
6
  import { fileURLToPath } from 'node:url';
7
7
  import { join, dirname } from 'pathe';
8
- import { updateZcfConfig } from '../chunks/ccjk-config.mjs';
8
+ import { u as updateZcfConfig, r as readJsonConfig, w as writeJsonConfig } from '../chunks/ccjk-config.mjs';
9
9
  import { exists, removeFile, ensureDir, copyFile } from '../chunks/fs-operations.mjs';
10
- import { readJsonConfig, writeJsonConfig } from '../chunks/json-config.mjs';
11
10
  import { p as promptBoolean, a as addNumbersToChoices } from './ccjk.DhBeLRzf.mjs';
12
11
  import { existsSync } from 'node:fs';
13
12
  import { rm, mkdir, copyFile as copyFile$1 } from 'node:fs/promises';
@@ -1,6 +1,6 @@
1
1
  import { DEFAULT_CODE_TOOL_TYPE } from '../chunks/constants.mjs';
2
2
  import { i18n } from '../chunks/index2.mjs';
3
- import { readZcfConfigAsync } from '../chunks/ccjk-config.mjs';
3
+ import { e as readZcfConfigAsync } from '../chunks/ccjk-config.mjs';
4
4
 
5
5
  const CODE_TYPE_ABBREVIATIONS = {
6
6
  cc: "claude-code",
@@ -1,33 +1,10 @@
1
1
  import ansis from 'ansis';
2
2
  import inquirer from 'inquirer';
3
- import { a as getMcpService, M as MCP_SERVICE_CONFIGS } from '../shared/ccjk.DwDtZ5cK.mjs';
4
- import { ensureI18nInitialized, i18n } from './index2.mjs';
5
- import { ClAUDE_CONFIG_FILE, CODEX_CONFIG_FILE } from './constants.mjs';
6
- import { r as readMcpConfig, w as writeMcpConfig, a as buildMcpServerConfig } from './claude-config.mjs';
7
- import { r as readCodexConfig, w as writeCodexConfig, N as applyCodexPlatformCommand } from './codex.mjs';
8
- import { exists } from './fs-operations.mjs';
9
- import { isWindows, getSystemRoot } from './platform.mjs';
10
- import 'node:child_process';
11
- import 'node:os';
12
- import 'node:process';
13
- import 'pathe';
14
- import 'node:fs';
15
- import 'node:url';
16
- import 'i18next';
17
- import 'i18next-fs-backend';
18
- import './json-config.mjs';
19
- import 'dayjs';
20
- import 'node:crypto';
21
- import 'node:fs/promises';
22
- import 'ora';
23
- import 'semver';
24
- import 'smol-toml';
25
- import 'tinyexec';
26
- import './ccjk-config.mjs';
27
- import '../shared/ccjk.DhBeLRzf.mjs';
28
- import 'inquirer-toggle';
29
- import './prompts.mjs';
30
- import './package.mjs';
3
+ import { af as getMcpService, r as readCodexConfig, Z as applyCodexPlatformCommand, w as writeCodexConfig, e as readMcpConfig, j as buildMcpServerConfig, f as writeMcpConfig, ab as MCP_SERVICE_CONFIGS } from '../chunks/codex.mjs';
4
+ import { ensureI18nInitialized, i18n } from '../chunks/index2.mjs';
5
+ import { ClAUDE_CONFIG_FILE, CODEX_CONFIG_FILE } from '../chunks/constants.mjs';
6
+ import { exists } from '../chunks/fs-operations.mjs';
7
+ import { isWindows, getSystemRoot } from '../chunks/platform.mjs';
31
8
 
32
9
  function detectActiveTool() {
33
10
  const hasClaudeConfig = exists(ClAUDE_CONFIG_FILE);
@@ -399,42 +376,6 @@ ${i18n.t("mcp:market.installSuccess", { name: server.name })}`));
399
376
  console.log(ansis.dim(i18n.t("mcp:market.manualConfig")));
400
377
  }
401
378
  }
402
- async function mcpMarket(action, args, options = {}) {
403
- switch (action) {
404
- case "search":
405
- if (!args[0]) {
406
- console.log(ansis.red(i18n.t("mcp:market.searchKeywordRequired")));
407
- return;
408
- }
409
- await mcpSearch(args[0], options);
410
- break;
411
- case "trending":
412
- await mcpTrending(options);
413
- break;
414
- case "install":
415
- if (!args[0]) {
416
- console.log(ansis.red(i18n.t("mcp:market.installNameRequired")));
417
- return;
418
- }
419
- await mcpInstall(args[0], options);
420
- break;
421
- case "uninstall":
422
- case "remove":
423
- if (!args[0]) {
424
- console.log(ansis.red(i18n.t("mcp:market.uninstallNameRequired")));
425
- return;
426
- }
427
- await mcpUninstall(args[0], options);
428
- break;
429
- case "list":
430
- case "ls":
431
- await mcpList(options);
432
- break;
433
- default:
434
- console.log(ansis.yellow(i18n.t("mcp:market.unknownAction", { action })));
435
- console.log(ansis.dim("Available: search, trending, install, uninstall, list"));
436
- }
437
- }
438
379
  async function mcpUninstall(serverName, options = {}) {
439
380
  const server = MCP_SERVERS.find((s) => s.name.toLowerCase() === serverName.toLowerCase());
440
381
  const serviceId = server?.serviceId || serverName;
@@ -472,4 +413,4 @@ async function mcpList(options = {}) {
472
413
  await displayInstalledMcpServices(options.tool);
473
414
  }
474
415
 
475
- export { mcpInstall, mcpList, mcpMarket, mcpSearch, mcpTrending, mcpUninstall };
416
+ export { mcpList as a, mcpSearch as b, mcpUninstall as c, mcpTrending as d, mcpInstall as m };
@@ -1,4 +1,4 @@
1
- import process from 'node:process';
1
+ import process__default from 'node:process';
2
2
  import ansis from 'ansis';
3
3
  import { ensureI18nInitialized, i18n } from '../chunks/index2.mjs';
4
4
 
@@ -9,7 +9,7 @@ function handleExitPromptError(error) {
9
9
  console.log(ansis.cyan(`
10
10
  ${i18n.t("common:goodbye")}
11
11
  `));
12
- process.exit(0);
12
+ process__default.exit(0);
13
13
  }
14
14
  return false;
15
15
  }
@@ -19,7 +19,7 @@ function handleGeneralError(error) {
19
19
  if (error instanceof Error) {
20
20
  console.error(ansis.gray(`${i18n.t("errors:stackTrace")}: ${error.stack}`));
21
21
  }
22
- process.exit(1);
22
+ process__default.exit(1);
23
23
  }
24
24
 
25
25
  export { handleGeneralError as a, handleExitPromptError as h };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ccjk",
3
3
  "type": "module",
4
- "version": "2.2.4",
4
+ "version": "2.3.0",
5
5
  "packageManager": "pnpm@10.17.1",
6
6
  "description": "Claude Code JinKu - Advanced AI-powered development assistant with skills, agents, and LLM-driven audit",
7
7
  "author": {
@@ -125,7 +125,9 @@
125
125
  "@types/semver": "^7.7.1",
126
126
  "ansis": "^4.1.0",
127
127
  "cac": "^6.7.14",
128
+ "chalk": "^5.6.2",
128
129
  "chokidar": "^4.0.3",
130
+ "commander": "^14.0.2",
129
131
  "dayjs": "^1.11.18",
130
132
  "find-up-simple": "^1.0.1",
131
133
  "fs-extra": "^11.3.2",
@@ -134,6 +136,7 @@
134
136
  "i18next-fs-backend": "^2.6.0",
135
137
  "inquirer": "^12.9.6",
136
138
  "inquirer-toggle": "^1.0.1",
139
+ "nanoid": "^5.1.6",
137
140
  "ora": "^9.0.0",
138
141
  "pathe": "^2.0.3",
139
142
  "semver": "^7.7.2",
@@ -0,0 +1,258 @@
1
+ ---
2
+ name: agent-browser
3
+ description: Zero-config headless browser automation for AI agents
4
+ version: 1.0.0
5
+ author: Vercel Labs / CCJK
6
+ category: automation
7
+ triggers:
8
+ - /browser
9
+ - /web
10
+ - /scrape
11
+ - /test-ui
12
+ use_when:
13
+ - "User needs web automation or browser control"
14
+ - "User wants to scrape or interact with websites"
15
+ - "User needs UI testing or screenshot capture"
16
+ - "User mentions browser, web page, or website interaction"
17
+ auto_activate: true
18
+ priority: 8
19
+ difficulty: beginner
20
+ tags:
21
+ - browser
22
+ - automation
23
+ - web
24
+ - zero-config
25
+ - ai-native
26
+ dependencies:
27
+ - agent-browser
28
+ ---
29
+
30
+ # Agent Browser - Zero-Config Web Automation
31
+
32
+ > **Philosophy**: AI-native, zero-config, ref-based interaction
33
+
34
+ Headless browser automation designed specifically for AI agents. Fast Rust CLI with Node.js fallback.
35
+
36
+ ## Quick Start
37
+
38
+ ```bash
39
+ # One-time setup (auto-detected, usually not needed)
40
+ agent-browser install
41
+
42
+ # Core workflow
43
+ agent-browser open <url> # Navigate
44
+ agent-browser snapshot -i # Get interactive elements with refs
45
+ agent-browser click @e1 # Click by ref
46
+ agent-browser fill @e2 "text" # Fill by ref
47
+ agent-browser screenshot page.png # Capture
48
+ agent-browser close # Done
49
+ ```
50
+
51
+ ## Why Agent Browser?
52
+
53
+ | Feature | Agent Browser | Traditional MCP |
54
+ |---------|--------------|-----------------|
55
+ | Setup | Zero-config | Complex JSON config |
56
+ | Speed | Native Rust | Node.js overhead |
57
+ | AI-Native | Ref-based (@e1) | CSS selectors |
58
+ | Memory | Minimal | Heavy daemon |
59
+ | Learning | 5 minutes | Hours |
60
+
61
+ ## Core Commands
62
+
63
+ ### Navigation
64
+ ```bash
65
+ agent-browser open example.com # Open URL
66
+ agent-browser back # Go back
67
+ agent-browser forward # Go forward
68
+ agent-browser reload # Reload page
69
+ ```
70
+
71
+ ### Snapshot (AI-Optimized)
72
+ ```bash
73
+ agent-browser snapshot # Full accessibility tree
74
+ agent-browser snapshot -i # Interactive elements only (recommended)
75
+ agent-browser snapshot -c # Compact mode
76
+ agent-browser snapshot -d 3 # Limit depth
77
+ agent-browser snapshot -i -c # Combine options
78
+ ```
79
+
80
+ **Output Example:**
81
+ ```
82
+ - heading "Example Domain" [ref=e1] [level=1]
83
+ - button "Submit" [ref=e2]
84
+ - textbox "Email" [ref=e3]
85
+ - link "Learn more" [ref=e4]
86
+ ```
87
+
88
+ ### Interaction (Ref-Based)
89
+ ```bash
90
+ agent-browser click @e2 # Click element
91
+ agent-browser fill @e3 "email@test.com" # Fill input
92
+ agent-browser hover @e4 # Hover element
93
+ agent-browser check @e5 # Check checkbox
94
+ agent-browser select @e6 "option" # Select dropdown
95
+ ```
96
+
97
+ ### Get Information
98
+ ```bash
99
+ agent-browser get text @e1 # Get text content
100
+ agent-browser get html @e1 # Get innerHTML
101
+ agent-browser get value @e3 # Get input value
102
+ agent-browser get title # Page title
103
+ agent-browser get url # Current URL
104
+ ```
105
+
106
+ ### Screenshots & PDF
107
+ ```bash
108
+ agent-browser screenshot # Viewport screenshot
109
+ agent-browser screenshot --full # Full page
110
+ agent-browser screenshot page.png # Save to file
111
+ agent-browser pdf report.pdf # Save as PDF
112
+ ```
113
+
114
+ ### Wait Operations
115
+ ```bash
116
+ agent-browser wait @e1 # Wait for element
117
+ agent-browser wait 2000 # Wait 2 seconds
118
+ agent-browser wait --text "Welcome" # Wait for text
119
+ agent-browser wait --load networkidle # Wait for load
120
+ ```
121
+
122
+ ## Optimal AI Workflow
123
+
124
+ ### Pattern 1: Simple Interaction
125
+ ```bash
126
+ agent-browser open example.com
127
+ agent-browser snapshot -i --json # Parse refs
128
+ agent-browser click @e2 # Execute action
129
+ ```
130
+
131
+ ### Pattern 2: Form Filling
132
+ ```bash
133
+ agent-browser open login.example.com
134
+ agent-browser snapshot -i
135
+ agent-browser fill @e1 "username"
136
+ agent-browser fill @e2 "password"
137
+ agent-browser click @e3 # Submit button
138
+ agent-browser wait --text "Dashboard"
139
+ agent-browser snapshot -i # Verify success
140
+ ```
141
+
142
+ ### Pattern 3: Data Extraction
143
+ ```bash
144
+ agent-browser open data.example.com
145
+ agent-browser snapshot -i
146
+ agent-browser get text @e1 # Extract specific data
147
+ agent-browser screenshot data.png # Visual record
148
+ ```
149
+
150
+ ### Pattern 4: Multi-Page Flow
151
+ ```bash
152
+ agent-browser open shop.example.com
153
+ agent-browser snapshot -i
154
+ agent-browser click @e5 # Product link
155
+ agent-browser wait --load networkidle
156
+ agent-browser snapshot -i # New page refs
157
+ agent-browser click @e2 # Add to cart
158
+ ```
159
+
160
+ ## Sessions (Parallel Browsers)
161
+
162
+ ```bash
163
+ # Run multiple isolated sessions
164
+ agent-browser --session agent1 open site-a.com
165
+ agent-browser --session agent2 open site-b.com
166
+
167
+ # List sessions
168
+ agent-browser session list
169
+
170
+ # Each session has isolated:
171
+ # - Cookies & storage
172
+ # - Navigation history
173
+ # - Authentication state
174
+ ```
175
+
176
+ ## Advanced Features
177
+
178
+ ### Semantic Locators (Fallback)
179
+ ```bash
180
+ agent-browser find role button click --name "Submit"
181
+ agent-browser find label "Email" fill "test@test.com"
182
+ agent-browser find text "Sign In" click
183
+ ```
184
+
185
+ ### Network Control
186
+ ```bash
187
+ agent-browser network requests # View requests
188
+ agent-browser network route "**/api" --abort # Block requests
189
+ agent-browser set offline on # Offline mode
190
+ ```
191
+
192
+ ### Debug Mode
193
+ ```bash
194
+ agent-browser open example.com --headed # Show browser window
195
+ agent-browser console # View console logs
196
+ agent-browser errors # View page errors
197
+ agent-browser highlight @e1 # Highlight element
198
+ ```
199
+
200
+ ## Integration Examples
201
+
202
+ ### With Workflow Skill
203
+ ```bash
204
+ # In /workflow execution phase
205
+ agent-browser open $TEST_URL
206
+ agent-browser snapshot -i
207
+ # AI analyzes snapshot, identifies test targets
208
+ agent-browser click @e2
209
+ agent-browser wait --text "Success"
210
+ ```
211
+
212
+ ### With TDD Skill
213
+ ```bash
214
+ # E2E test execution
215
+ agent-browser open localhost:3000
216
+ agent-browser snapshot -i
217
+ agent-browser fill @e1 "test input"
218
+ agent-browser click @e2
219
+ agent-browser get text @e3 # Verify output
220
+ ```
221
+
222
+ ## Best Practices
223
+
224
+ 1. **Always use `-i` flag** for snapshots (interactive elements only)
225
+ 2. **Use refs (@e1)** instead of CSS selectors
226
+ 3. **Re-snapshot after page changes** to get fresh refs
227
+ 4. **Use `--json` flag** for programmatic parsing
228
+ 5. **Combine with wait** for dynamic content
229
+
230
+ ## Troubleshooting
231
+
232
+ ```bash
233
+ # Browser not installed
234
+ agent-browser install
235
+
236
+ # Linux dependencies
237
+ agent-browser install --with-deps
238
+
239
+ # Debug issues
240
+ agent-browser open url --headed --debug
241
+ ```
242
+
243
+ ## Command Reference
244
+
245
+ | Command | Description |
246
+ |---------|-------------|
247
+ | `open <url>` | Navigate to URL |
248
+ | `snapshot [-i] [-c]` | Get accessibility tree |
249
+ | `click @ref` | Click element |
250
+ | `fill @ref "text"` | Fill input |
251
+ | `get text @ref` | Get text content |
252
+ | `screenshot [path]` | Take screenshot |
253
+ | `wait <ref\|ms\|--text>` | Wait for condition |
254
+ | `close` | Close browser |
255
+
256
+ ---
257
+
258
+ **Zero-Config. AI-Native. Just Works.**