ccjk 14.2.2 → 15.1.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.
- package/LICENSE +1 -1
- package/README.md +75 -338
- package/dist/cli.js +89 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/detect.js +15 -0
- package/dist/commands/detect.js.map +1 -0
- package/dist/commands/doctor.js +68 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/git-install.js +50 -0
- package/dist/commands/git-install.js.map +1 -0
- package/dist/commands/init.js +165 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/mcp.js +66 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/menu.js +42 -0
- package/dist/commands/menu.js.map +1 -0
- package/dist/commands/profile.js +138 -0
- package/dist/commands/profile.js.map +1 -0
- package/dist/core/detect.js +24 -0
- package/dist/core/detect.js.map +1 -0
- package/dist/core/lint.js +49 -0
- package/dist/core/lint.js.map +1 -0
- package/dist/core/mcp.js +41 -0
- package/dist/core/mcp.js.map +1 -0
- package/dist/core/paths.js +9 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/profiles.js +104 -0
- package/dist/core/profiles.js.map +1 -0
- package/dist/core/providers.js +53 -0
- package/dist/core/providers.js.map +1 -0
- package/dist/core/settings.js +31 -0
- package/dist/core/settings.js.map +1 -0
- package/dist/core/slash-templates.js +56 -0
- package/dist/core/slash-templates.js.map +1 -0
- package/dist/core/tools.js +27 -0
- package/dist/core/tools.js.map +1 -0
- package/package.json +43 -164
- package/README.HONEST.md +0 -176
- package/README.en.md +0 -67
- package/README.ja.md +0 -67
- package/README.ko.md +0 -67
- package/README.zh-CN.md +0 -86
- package/bin/ccjk.mjs +0 -5
- package/bin/ccjk.ts +0 -222
- package/dist/chunks/agent-teams.mjs +0 -145
- package/dist/chunks/agent.mjs +0 -1439
- package/dist/chunks/agents.mjs +0 -3783
- package/dist/chunks/api-cli.mjs +0 -135
- package/dist/chunks/api-config-selector.mjs +0 -159
- package/dist/chunks/api-providers.mjs +0 -144
- package/dist/chunks/api.mjs +0 -115
- package/dist/chunks/auto-bootstrap.mjs +0 -358
- package/dist/chunks/auto-fixer.mjs +0 -95
- package/dist/chunks/auto-updater.mjs +0 -507
- package/dist/chunks/banner.mjs +0 -173
- package/dist/chunks/bash.mjs +0 -187
- package/dist/chunks/boost.mjs +0 -474
- package/dist/chunks/brain-config.mjs +0 -75
- package/dist/chunks/brain-status.mjs +0 -89
- package/dist/chunks/ccjk-agents.mjs +0 -416
- package/dist/chunks/ccjk-all.mjs +0 -1046
- package/dist/chunks/ccjk-config.mjs +0 -445
- package/dist/chunks/ccjk-hooks.mjs +0 -1074
- package/dist/chunks/ccjk-mcp.mjs +0 -763
- package/dist/chunks/ccjk-setup.mjs +0 -765
- package/dist/chunks/ccjk-skills.mjs +0 -518
- package/dist/chunks/ccr.mjs +0 -109
- package/dist/chunks/ccu.mjs +0 -40
- package/dist/chunks/check-updates.mjs +0 -117
- package/dist/chunks/claude-code-incremental-manager.mjs +0 -761
- package/dist/chunks/claude-config.mjs +0 -606
- package/dist/chunks/claude-config2.mjs +0 -62
- package/dist/chunks/claude-wrapper.mjs +0 -85
- package/dist/chunks/clavue-config.mjs +0 -1454
- package/dist/chunks/cleanup-migration.mjs +0 -20
- package/dist/chunks/cli-hook.mjs +0 -4096
- package/dist/chunks/cloud-sync.mjs +0 -29
- package/dist/chunks/code-type-resolver.mjs +0 -880
- package/dist/chunks/codex-config-switch.mjs +0 -452
- package/dist/chunks/codex-provider-manager.mjs +0 -238
- package/dist/chunks/codex-uninstaller.mjs +0 -404
- package/dist/chunks/codex.mjs +0 -2141
- package/dist/chunks/commands.mjs +0 -108
- package/dist/chunks/commands2.mjs +0 -421
- package/dist/chunks/commit.mjs +0 -140
- package/dist/chunks/completion.mjs +0 -517
- package/dist/chunks/config-consolidator.mjs +0 -172
- package/dist/chunks/config-switch.mjs +0 -334
- package/dist/chunks/config.mjs +0 -558
- package/dist/chunks/config2.mjs +0 -484
- package/dist/chunks/config3.mjs +0 -486
- package/dist/chunks/constants.mjs +0 -323
- package/dist/chunks/context-opt.mjs +0 -444
- package/dist/chunks/context.mjs +0 -974
- package/dist/chunks/dashboard.mjs +0 -481
- package/dist/chunks/doctor.mjs +0 -1301
- package/dist/chunks/eval.mjs +0 -502
- package/dist/chunks/evolution.mjs +0 -322
- package/dist/chunks/features.mjs +0 -715
- package/dist/chunks/fish.mjs +0 -181
- package/dist/chunks/fs-operations.mjs +0 -180
- package/dist/chunks/health-alerts.mjs +0 -830
- package/dist/chunks/help.mjs +0 -341
- package/dist/chunks/hook-installer.mjs +0 -48
- package/dist/chunks/impact.mjs +0 -651
- package/dist/chunks/index.mjs +0 -23
- package/dist/chunks/index10.mjs +0 -19
- package/dist/chunks/index11.mjs +0 -1171
- package/dist/chunks/index12.mjs +0 -218
- package/dist/chunks/index13.mjs +0 -679
- package/dist/chunks/index14.mjs +0 -1009
- package/dist/chunks/index15.mjs +0 -194
- package/dist/chunks/index2.mjs +0 -7637
- package/dist/chunks/index3.mjs +0 -171
- package/dist/chunks/index4.mjs +0 -26
- package/dist/chunks/index5.mjs +0 -19
- package/dist/chunks/index6.mjs +0 -19092
- package/dist/chunks/index7.mjs +0 -616
- package/dist/chunks/index8.mjs +0 -1602
- package/dist/chunks/index9.mjs +0 -5384
- package/dist/chunks/init.mjs +0 -1911
- package/dist/chunks/installer.mjs +0 -757
- package/dist/chunks/installer2.mjs +0 -103
- package/dist/chunks/interview.mjs +0 -2927
- package/dist/chunks/json-config.mjs +0 -60
- package/dist/chunks/linux.mjs +0 -3863
- package/dist/chunks/macos.mjs +0 -69
- package/dist/chunks/main.mjs +0 -635
- package/dist/chunks/manager.mjs +0 -1048
- package/dist/chunks/marketplace.mjs +0 -265
- package/dist/chunks/mcp-cli.mjs +0 -205
- package/dist/chunks/mcp-performance.mjs +0 -187
- package/dist/chunks/mcp.mjs +0 -667
- package/dist/chunks/memory-check.mjs +0 -2973
- package/dist/chunks/memory-paths.mjs +0 -259
- package/dist/chunks/memory-sync.mjs +0 -209
- package/dist/chunks/memory.mjs +0 -354
- package/dist/chunks/metrics-display.mjs +0 -153
- package/dist/chunks/monitor.mjs +0 -1856
- package/dist/chunks/notification.mjs +0 -1864
- package/dist/chunks/onboarding.mjs +0 -386
- package/dist/chunks/package.mjs +0 -3
- package/dist/chunks/paradigm.mjs +0 -74
- package/dist/chunks/permission-manager.mjs +0 -250
- package/dist/chunks/permissions.mjs +0 -265
- package/dist/chunks/persistence-manager.mjs +0 -801
- package/dist/chunks/persistence.mjs +0 -707
- package/dist/chunks/platform.mjs +0 -395
- package/dist/chunks/plugin.mjs +0 -1936
- package/dist/chunks/powershell.mjs +0 -213
- package/dist/chunks/prompts.mjs +0 -244
- package/dist/chunks/providers.mjs +0 -263
- package/dist/chunks/quick-actions.mjs +0 -335
- package/dist/chunks/quick-provider.mjs +0 -755
- package/dist/chunks/quick-setup.mjs +0 -421
- package/dist/chunks/remote.mjs +0 -497
- package/dist/chunks/research.mjs +0 -1904
- package/dist/chunks/rollback.mjs +0 -38
- package/dist/chunks/session-manager.mjs +0 -1371
- package/dist/chunks/session.mjs +0 -878
- package/dist/chunks/sessions.mjs +0 -106
- package/dist/chunks/silent-updater.mjs +0 -396
- package/dist/chunks/simple-config.mjs +0 -122
- package/dist/chunks/skill.mjs +0 -117
- package/dist/chunks/skill2.mjs +0 -9052
- package/dist/chunks/skills-sync.mjs +0 -1343
- package/dist/chunks/skills.mjs +0 -577
- package/dist/chunks/slash-commands.mjs +0 -208
- package/dist/chunks/smart-guide.mjs +0 -247
- package/dist/chunks/snapshot.mjs +0 -58
- package/dist/chunks/startup.mjs +0 -487
- package/dist/chunks/stats.mjs +0 -191
- package/dist/chunks/status.mjs +0 -471
- package/dist/chunks/team.mjs +0 -63
- package/dist/chunks/thinking.mjs +0 -626
- package/dist/chunks/trace.mjs +0 -57
- package/dist/chunks/uninstall.mjs +0 -852
- package/dist/chunks/update.mjs +0 -174
- package/dist/chunks/upgrade-manager.mjs +0 -204
- package/dist/chunks/upgrade.mjs +0 -133
- package/dist/chunks/version-checker.mjs +0 -891
- package/dist/chunks/vim.mjs +0 -903
- package/dist/chunks/windows.mjs +0 -14
- package/dist/chunks/workflows.mjs +0 -633
- package/dist/chunks/wsl.mjs +0 -129
- package/dist/chunks/zero-config.mjs +0 -871
- package/dist/chunks/zsh.mjs +0 -182
- package/dist/cli.d.mts +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.mjs +0 -2684
- package/dist/i18n/locales/en/agent-teams.json +0 -18
- package/dist/i18n/locales/en/agentBrowser.json +0 -80
- package/dist/i18n/locales/en/agents.json +0 -135
- package/dist/i18n/locales/en/api.json +0 -63
- package/dist/i18n/locales/en/ccjk-agents.json +0 -33
- package/dist/i18n/locales/en/ccjk-all.json +0 -23
- package/dist/i18n/locales/en/ccjk-skills.json +0 -22
- package/dist/i18n/locales/en/ccjk.json +0 -276
- package/dist/i18n/locales/en/ccr.json +0 -65
- package/dist/i18n/locales/en/claude-md.json +0 -73
- package/dist/i18n/locales/en/cli.json +0 -148
- package/dist/i18n/locales/en/cloud-setup.json +0 -31
- package/dist/i18n/locales/en/cloud-sync.json +0 -147
- package/dist/i18n/locales/en/cloud.json +0 -40
- package/dist/i18n/locales/en/cloudPlugins.json +0 -118
- package/dist/i18n/locales/en/codex.json +0 -184
- package/dist/i18n/locales/en/cometix.json +0 -29
- package/dist/i18n/locales/en/common.json +0 -68
- package/dist/i18n/locales/en/config.json +0 -108
- package/dist/i18n/locales/en/configuration.json +0 -236
- package/dist/i18n/locales/en/context.json +0 -85
- package/dist/i18n/locales/en/dashboard.json +0 -78
- package/dist/i18n/locales/en/errors.json +0 -26
- package/dist/i18n/locales/en/evolution.json +0 -54
- package/dist/i18n/locales/en/hooks.json +0 -74
- package/dist/i18n/locales/en/hooksSync.json +0 -133
- package/dist/i18n/locales/en/installation.json +0 -83
- package/dist/i18n/locales/en/interview.json +0 -104
- package/dist/i18n/locales/en/language.json +0 -19
- package/dist/i18n/locales/en/lsp.json +0 -78
- package/dist/i18n/locales/en/marketplace.json +0 -116
- package/dist/i18n/locales/en/mcp.json +0 -180
- package/dist/i18n/locales/en/memory.json +0 -23
- package/dist/i18n/locales/en/menu.json +0 -299
- package/dist/i18n/locales/en/multi-config.json +0 -79
- package/dist/i18n/locales/en/notification.json +0 -307
- package/dist/i18n/locales/en/permissions.json +0 -95
- package/dist/i18n/locales/en/persistence.json +0 -127
- package/dist/i18n/locales/en/plugins.json +0 -146
- package/dist/i18n/locales/en/quick-actions.json +0 -78
- package/dist/i18n/locales/en/registry.json +0 -54
- package/dist/i18n/locales/en/remote.json +0 -93
- package/dist/i18n/locales/en/sandbox.json +0 -44
- package/dist/i18n/locales/en/setup.json +0 -44
- package/dist/i18n/locales/en/shencha.json +0 -14
- package/dist/i18n/locales/en/skills.json +0 -100
- package/dist/i18n/locales/en/skillsSync.json +0 -74
- package/dist/i18n/locales/en/smartGuide.json +0 -49
- package/dist/i18n/locales/en/stats.json +0 -20
- package/dist/i18n/locales/en/subagent.json +0 -69
- package/dist/i18n/locales/en/superpowers.json +0 -117
- package/dist/i18n/locales/en/team.json +0 -7
- package/dist/i18n/locales/en/thinking.json +0 -65
- package/dist/i18n/locales/en/tools.json +0 -42
- package/dist/i18n/locales/en/uninstall.json +0 -56
- package/dist/i18n/locales/en/updater.json +0 -29
- package/dist/i18n/locales/en/vim.json +0 -169
- package/dist/i18n/locales/en/workflow.json +0 -55
- package/dist/i18n/locales/en/workspace.json +0 -108
- package/dist/i18n/locales/zh-CN/agent-teams.json +0 -18
- package/dist/i18n/locales/zh-CN/agentBrowser.json +0 -80
- package/dist/i18n/locales/zh-CN/agents.json +0 -135
- package/dist/i18n/locales/zh-CN/api.json +0 -63
- package/dist/i18n/locales/zh-CN/ccjk-agents.json +0 -33
- package/dist/i18n/locales/zh-CN/ccjk-all.json +0 -23
- package/dist/i18n/locales/zh-CN/ccjk-skills.json +0 -22
- package/dist/i18n/locales/zh-CN/ccjk.json +0 -276
- package/dist/i18n/locales/zh-CN/ccr.json +0 -65
- package/dist/i18n/locales/zh-CN/claude-md.json +0 -73
- package/dist/i18n/locales/zh-CN/cli.json +0 -148
- package/dist/i18n/locales/zh-CN/cloud-setup.json +0 -31
- package/dist/i18n/locales/zh-CN/cloud-sync.json +0 -147
- package/dist/i18n/locales/zh-CN/cloud.json +0 -40
- package/dist/i18n/locales/zh-CN/cloudPlugins.json +0 -118
- package/dist/i18n/locales/zh-CN/codex.json +0 -184
- package/dist/i18n/locales/zh-CN/cometix.json +0 -29
- package/dist/i18n/locales/zh-CN/common.json +0 -68
- package/dist/i18n/locales/zh-CN/config.json +0 -108
- package/dist/i18n/locales/zh-CN/configuration.json +0 -234
- package/dist/i18n/locales/zh-CN/context.json +0 -85
- package/dist/i18n/locales/zh-CN/dashboard.json +0 -78
- package/dist/i18n/locales/zh-CN/errors.json +0 -26
- package/dist/i18n/locales/zh-CN/evolution.json +0 -54
- package/dist/i18n/locales/zh-CN/hooks.json +0 -74
- package/dist/i18n/locales/zh-CN/hooksSync.json +0 -133
- package/dist/i18n/locales/zh-CN/installation.json +0 -83
- package/dist/i18n/locales/zh-CN/interview.json +0 -104
- package/dist/i18n/locales/zh-CN/language.json +0 -19
- package/dist/i18n/locales/zh-CN/lsp.json +0 -78
- package/dist/i18n/locales/zh-CN/marketplace.json +0 -116
- package/dist/i18n/locales/zh-CN/mcp.json +0 -180
- package/dist/i18n/locales/zh-CN/memory.json +0 -23
- package/dist/i18n/locales/zh-CN/menu.json +0 -299
- package/dist/i18n/locales/zh-CN/multi-config.json +0 -79
- package/dist/i18n/locales/zh-CN/notification.json +0 -307
- package/dist/i18n/locales/zh-CN/permissions.json +0 -95
- package/dist/i18n/locales/zh-CN/persistence.json +0 -127
- package/dist/i18n/locales/zh-CN/plugins.json +0 -146
- package/dist/i18n/locales/zh-CN/quick-actions.json +0 -78
- package/dist/i18n/locales/zh-CN/registry.json +0 -54
- package/dist/i18n/locales/zh-CN/remote.json +0 -93
- package/dist/i18n/locales/zh-CN/sandbox.json +0 -44
- package/dist/i18n/locales/zh-CN/setup.json +0 -44
- package/dist/i18n/locales/zh-CN/shencha.json +0 -14
- package/dist/i18n/locales/zh-CN/skills.json +0 -100
- package/dist/i18n/locales/zh-CN/skillsSync.json +0 -74
- package/dist/i18n/locales/zh-CN/smartGuide.json +0 -49
- package/dist/i18n/locales/zh-CN/stats.json +0 -20
- package/dist/i18n/locales/zh-CN/subagent.json +0 -69
- package/dist/i18n/locales/zh-CN/superpowers.json +0 -117
- package/dist/i18n/locales/zh-CN/team.json +0 -7
- package/dist/i18n/locales/zh-CN/thinking.json +0 -65
- package/dist/i18n/locales/zh-CN/tools.json +0 -42
- package/dist/i18n/locales/zh-CN/uninstall.json +0 -56
- package/dist/i18n/locales/zh-CN/updater.json +0 -29
- package/dist/i18n/locales/zh-CN/vim.json +0 -169
- package/dist/i18n/locales/zh-CN/workflow.json +0 -55
- package/dist/i18n/locales/zh-CN/workspace.json +0 -108
- package/dist/index.d.mts +0 -5658
- package/dist/index.d.ts +0 -5658
- package/dist/index.mjs +0 -3732
- package/dist/shared/ccjk.5bEolFrk.mjs +0 -254
- package/dist/shared/ccjk.8oaxX4iR.mjs +0 -90
- package/dist/shared/ccjk.B2U7DsPy.mjs +0 -31
- package/dist/shared/ccjk.B2f-cwUP.mjs +0 -468
- package/dist/shared/ccjk.BAGoDD49.mjs +0 -36
- package/dist/shared/ccjk.BBtCGd_g.mjs +0 -899
- package/dist/shared/ccjk.BFQ7yr5S.mjs +0 -16
- package/dist/shared/ccjk.BLsIiTqO.mjs +0 -449
- package/dist/shared/ccjk.BXv8aYs1.mjs +0 -170
- package/dist/shared/ccjk.BnsY5WxD.mjs +0 -171
- package/dist/shared/ccjk.BoApaI4j.mjs +0 -28
- package/dist/shared/ccjk.Bq8TqZG_.mjs +0 -189
- package/dist/shared/ccjk.BtrioX1Z.mjs +0 -25
- package/dist/shared/ccjk.Bx_rmYfN.mjs +0 -69
- package/dist/shared/ccjk.BzPbSEP2.mjs +0 -115
- package/dist/shared/ccjk.C0WLUnFV.mjs +0 -293
- package/dist/shared/ccjk.C1hANZTu.mjs +0 -19
- package/dist/shared/ccjk.C2jHOZVP.mjs +0 -52
- package/dist/shared/ccjk.CNhnT6uQ.mjs +0 -636
- package/dist/shared/ccjk.COweQ1RR.mjs +0 -5
- package/dist/shared/ccjk.CfKKcvWy.mjs +0 -126
- package/dist/shared/ccjk.Cjgrln_h.mjs +0 -297
- package/dist/shared/ccjk.CoCHVXl3.mjs +0 -3951
- package/dist/shared/ccjk.CwGZSTAK.mjs +0 -319
- package/dist/shared/ccjk.CxpGa6MC.mjs +0 -2724
- package/dist/shared/ccjk.D-magaEx.mjs +0 -763
- package/dist/shared/ccjk.D0g2ABGg.mjs +0 -171
- package/dist/shared/ccjk.D6ycHbak.mjs +0 -270
- package/dist/shared/ccjk.D75wivnp.mjs +0 -142
- package/dist/shared/ccjk.DDL-4C-k.mjs +0 -100
- package/dist/shared/ccjk.DFRPtmK_.mjs +0 -75
- package/dist/shared/ccjk.DMV3x5Sd.mjs +0 -299
- package/dist/shared/ccjk.DZ2LLOa-.mjs +0 -2195
- package/dist/shared/ccjk.DbigonEQ.mjs +0 -698
- package/dist/shared/ccjk.DcMvE7lf.mjs +0 -618
- package/dist/shared/ccjk.DeWpAShp.mjs +0 -1828
- package/dist/shared/ccjk.DhJ1kyDR.mjs +0 -30
- package/dist/shared/ccjk.DlTXS9rP.mjs +0 -224
- package/dist/shared/ccjk.DopKzo3z.mjs +0 -305
- package/dist/shared/ccjk.DsZsc4LR.mjs +0 -1280
- package/dist/shared/ccjk.DuzJZlgj.mjs +0 -418
- package/dist/shared/ccjk.Dxgd2vjc.mjs +0 -444
- package/dist/shared/ccjk.J8YiPsOw.mjs +0 -259
- package/dist/shared/ccjk.KfSWcGlE.mjs +0 -38
- package/dist/shared/ccjk.L7yC58_i.mjs +0 -225
- package/dist/shared/ccjk.MwtjAULc.mjs +0 -1447
- package/dist/shared/ccjk.OJKHVSOb.mjs +0 -2005
- package/dist/shared/ccjk.OTnevPNE.mjs +0 -225
- package/dist/shared/ccjk.RyizuzOI.mjs +0 -21
- package/dist/shared/ccjk.T_cX87dY.mjs +0 -15
- package/dist/shared/ccjk.bQ7Dh1g4.mjs +0 -249
- package/dist/shared/ccjk.gDEDGD_t.mjs +0 -38
- package/dist/shared/ccjk.hoqrwWdN.mjs +0 -333
- package/dist/shared/ccjk.i_vn-9C3.mjs +0 -317
- package/dist/shared/ccjk.lG3ccFjm.mjs +0 -885
- package/dist/shared/ccjk.wLJHO0Af.mjs +0 -244
- package/dist/shared/ccjk.y-a_1vK4.mjs +0 -5127
- package/dist/templates/agents/README.md +0 -78
- package/dist/templates/agents/fullstack-developer.json +0 -70
- package/dist/templates/agents/go-expert.json +0 -69
- package/dist/templates/agents/index.json +0 -64
- package/dist/templates/agents/python-expert.json +0 -69
- package/dist/templates/agents/react-specialist.json +0 -69
- package/dist/templates/agents/testing-automation-expert.json +0 -70
- package/dist/templates/agents/typescript-architect.json +0 -69
- package/dist/templates/claude-code/common/settings.json +0 -109
- package/dist/templates/common/error-prevention.md +0 -267
- package/dist/templates/common/karpathy-baseline.md +0 -83
- package/dist/templates/common/output-styles/zh-CN/carmack-mode.md +0 -381
- package/dist/templates/common/output-styles/zh-CN/codex-rigor-mode.md +0 -114
- package/dist/templates/common/output-styles/zh-CN/dhh-mode.md +0 -265
- package/dist/templates/common/output-styles/zh-CN/evan-you-mode.md +0 -539
- package/dist/templates/common/output-styles/zh-CN/jobs-mode.md +0 -369
- package/dist/templates/common/output-styles/zh-CN/linus-mode.md +0 -135
- package/dist/templates/common/output-styles/zh-CN/uncle-bob-mode.md +0 -221
- package/dist/templates/common/workflow/continuousDelivery/en/continuous-delivery.md +0 -628
- package/dist/templates/common/workflow/continuousDelivery/zh-CN/continuous-delivery.md +0 -628
- package/dist/templates/common/workflow/essential/en/agents/ccjk-config-agent.md +0 -187
- package/dist/templates/common/workflow/essential/en/agents/ccjk-mcp-agent.md +0 -191
- package/dist/templates/common/workflow/essential/en/agents/ccjk-skill-agent.md +0 -249
- package/dist/templates/common/workflow/essential/en/agents/ccjk-workflow-agent.md +0 -277
- package/dist/templates/common/workflow/essential/en/agents/get-current-datetime.md +0 -29
- package/dist/templates/common/workflow/essential/en/agents/init-architect.md +0 -115
- package/dist/templates/common/workflow/essential/en/agents/ui-ux-designer.md +0 -91
- package/dist/templates/common/workflow/essential/en/feat.md +0 -92
- package/dist/templates/common/workflow/essential/en/goal.md +0 -147
- package/dist/templates/common/workflow/essential/en/init-project.md +0 -53
- package/dist/templates/common/workflow/essential/zh-CN/agents/get-current-datetime.md +0 -29
- package/dist/templates/common/workflow/essential/zh-CN/agents/init-architect.md +0 -115
- package/dist/templates/common/workflow/essential/zh-CN/agents/ui-ux-designer.md +0 -91
- package/dist/templates/common/workflow/essential/zh-CN/feat.md +0 -315
- package/dist/templates/common/workflow/essential/zh-CN/goal.md +0 -146
- package/dist/templates/common/workflow/essential/zh-CN/init-project.md +0 -53
- package/dist/templates/common/workflow/git/en/git-cleanBranches.md +0 -102
- package/dist/templates/common/workflow/git/en/git-commit.md +0 -205
- package/dist/templates/common/workflow/git/en/git-rollback.md +0 -90
- package/dist/templates/common/workflow/git/en/git-worktree.md +0 -276
- package/dist/templates/common/workflow/git/zh-CN/git-cleanBranches.md +0 -102
- package/dist/templates/common/workflow/git/zh-CN/git-commit.md +0 -205
- package/dist/templates/common/workflow/git/zh-CN/git-rollback.md +0 -90
- package/dist/templates/common/workflow/git/zh-CN/git-worktree.md +0 -276
- package/dist/templates/common/workflow/interview/en/interview.md +0 -67
- package/dist/templates/common/workflow/interview/zh-CN/interview.md +0 -67
- package/dist/templates/common/workflow/linearMethod/en/linear-method.md +0 -651
- package/dist/templates/common/workflow/linearMethod/zh-CN/linear-method.md +0 -752
- package/dist/templates/common/workflow/refactoringMaster/en/refactoring-master.md +0 -516
- package/dist/templates/common/workflow/refactoringMaster/zh-CN/refactoring-master.md +0 -812
- package/dist/templates/common/workflow/sixStep/en/workflow.md +0 -83
- package/dist/templates/common/workflow/sixStep/zh-CN/workflow.md +0 -359
- package/dist/templates/common/workflow/specFirstTDD/en/spec-first-tdd.md +0 -364
- package/dist/templates/common/workflow/specFirstTDD/zh-CN/spec-first-tdd.md +0 -366
- package/dist/templates/hooks/README.md +0 -212
- package/dist/templates/hooks/git-workflow-hooks.md +0 -551
- package/dist/templates/hooks/post-test/coverage.json +0 -21
- package/dist/templates/hooks/post-test/summary.json +0 -21
- package/dist/templates/hooks/post-test-coverage.md +0 -434
- package/dist/templates/hooks/pre-commit/eslint.json +0 -22
- package/dist/templates/hooks/pre-commit/prettier.json +0 -22
- package/dist/templates/hooks/pre-commit-black.md +0 -274
- package/dist/templates/hooks/pre-commit-eslint.md +0 -153
- package/dist/templates/hooks/pre-commit-gofmt.md +0 -284
- package/dist/templates/hooks/pre-commit-prettier.md +0 -212
- package/dist/templates/hooks/pre-commit-type-check.md +0 -377
- package/dist/templates/skills/ccjk-init.md +0 -154
- package/dist/templates/skills/ccjk-mcp-setup.md +0 -205
- package/dist/templates/skills/ccjk-troubleshoot.md +0 -228
- package/dist/templates/skills/django-patterns.md +0 -1016
- package/dist/templates/skills/git-workflow.md +0 -748
- package/dist/templates/skills/go-idioms.md +0 -963
- package/dist/templates/skills/index.json +0 -132
- package/dist/templates/skills/nextjs-optimization.md +0 -694
- package/dist/templates/skills/python-pep8.md +0 -852
- package/dist/templates/skills/react-patterns.md +0 -686
- package/dist/templates/skills/rust-patterns.md +0 -1057
- package/dist/templates/skills/security-best-practices.md +0 -1413
- package/dist/templates/skills/testing-best-practices.md +0 -1315
- package/dist/templates/skills/ts-best-practices.md +0 -354
- package/templates/agents/README.md +0 -78
- package/templates/agents/fullstack-developer.json +0 -70
- package/templates/agents/go-expert.json +0 -69
- package/templates/agents/index.json +0 -64
- package/templates/agents/python-expert.json +0 -69
- package/templates/agents/react-specialist.json +0 -69
- package/templates/agents/testing-automation-expert.json +0 -70
- package/templates/agents/typescript-architect.json +0 -69
- package/templates/claude-code/common/settings.json +0 -109
- package/templates/common/error-prevention.md +0 -267
- package/templates/common/karpathy-baseline.md +0 -83
- package/templates/common/output-styles/zh-CN/carmack-mode.md +0 -381
- package/templates/common/output-styles/zh-CN/codex-rigor-mode.md +0 -114
- package/templates/common/output-styles/zh-CN/dhh-mode.md +0 -265
- package/templates/common/output-styles/zh-CN/evan-you-mode.md +0 -539
- package/templates/common/output-styles/zh-CN/jobs-mode.md +0 -369
- package/templates/common/output-styles/zh-CN/linus-mode.md +0 -135
- package/templates/common/output-styles/zh-CN/uncle-bob-mode.md +0 -221
- package/templates/common/workflow/continuousDelivery/en/continuous-delivery.md +0 -628
- package/templates/common/workflow/continuousDelivery/zh-CN/continuous-delivery.md +0 -628
- package/templates/common/workflow/essential/en/agents/ccjk-config-agent.md +0 -187
- package/templates/common/workflow/essential/en/agents/ccjk-mcp-agent.md +0 -191
- package/templates/common/workflow/essential/en/agents/ccjk-skill-agent.md +0 -249
- package/templates/common/workflow/essential/en/agents/ccjk-workflow-agent.md +0 -277
- package/templates/common/workflow/essential/en/agents/get-current-datetime.md +0 -29
- package/templates/common/workflow/essential/en/agents/init-architect.md +0 -115
- package/templates/common/workflow/essential/en/agents/ui-ux-designer.md +0 -91
- package/templates/common/workflow/essential/en/feat.md +0 -92
- package/templates/common/workflow/essential/en/goal.md +0 -147
- package/templates/common/workflow/essential/en/init-project.md +0 -53
- package/templates/common/workflow/essential/zh-CN/agents/get-current-datetime.md +0 -29
- package/templates/common/workflow/essential/zh-CN/agents/init-architect.md +0 -115
- package/templates/common/workflow/essential/zh-CN/agents/ui-ux-designer.md +0 -91
- package/templates/common/workflow/essential/zh-CN/feat.md +0 -315
- package/templates/common/workflow/essential/zh-CN/goal.md +0 -146
- package/templates/common/workflow/essential/zh-CN/init-project.md +0 -53
- package/templates/common/workflow/git/en/git-cleanBranches.md +0 -102
- package/templates/common/workflow/git/en/git-commit.md +0 -205
- package/templates/common/workflow/git/en/git-rollback.md +0 -90
- package/templates/common/workflow/git/en/git-worktree.md +0 -276
- package/templates/common/workflow/git/zh-CN/git-cleanBranches.md +0 -102
- package/templates/common/workflow/git/zh-CN/git-commit.md +0 -205
- package/templates/common/workflow/git/zh-CN/git-rollback.md +0 -90
- package/templates/common/workflow/git/zh-CN/git-worktree.md +0 -276
- package/templates/common/workflow/interview/en/interview.md +0 -67
- package/templates/common/workflow/interview/zh-CN/interview.md +0 -67
- package/templates/common/workflow/linearMethod/en/linear-method.md +0 -651
- package/templates/common/workflow/linearMethod/zh-CN/linear-method.md +0 -752
- package/templates/common/workflow/refactoringMaster/en/refactoring-master.md +0 -516
- package/templates/common/workflow/refactoringMaster/zh-CN/refactoring-master.md +0 -812
- package/templates/common/workflow/sixStep/en/workflow.md +0 -83
- package/templates/common/workflow/sixStep/zh-CN/workflow.md +0 -359
- package/templates/common/workflow/specFirstTDD/en/spec-first-tdd.md +0 -364
- package/templates/common/workflow/specFirstTDD/zh-CN/spec-first-tdd.md +0 -366
- package/templates/hooks/README.md +0 -212
- package/templates/hooks/git-workflow-hooks.md +0 -551
- package/templates/hooks/post-test/coverage.json +0 -21
- package/templates/hooks/post-test/summary.json +0 -21
- package/templates/hooks/post-test-coverage.md +0 -434
- package/templates/hooks/pre-commit/eslint.json +0 -22
- package/templates/hooks/pre-commit/prettier.json +0 -22
- package/templates/hooks/pre-commit-black.md +0 -274
- package/templates/hooks/pre-commit-eslint.md +0 -153
- package/templates/hooks/pre-commit-gofmt.md +0 -284
- package/templates/hooks/pre-commit-prettier.md +0 -212
- package/templates/hooks/pre-commit-type-check.md +0 -377
- package/templates/skills/basic.hbs +0 -72
- package/templates/skills/ccjk-init.md +0 -154
- package/templates/skills/ccjk-mcp-setup.md +0 -205
- package/templates/skills/ccjk-troubleshoot.md +0 -228
- package/templates/skills/code-refactor.hbs +0 -133
- package/templates/skills/code-review.hbs +0 -141
- package/templates/skills/django-patterns.md +0 -1016
- package/templates/skills/git-workflow.md +0 -748
- package/templates/skills/go-idioms.md +0 -963
- package/templates/skills/index.json +0 -132
- package/templates/skills/nextjs-optimization.md +0 -694
- package/templates/skills/python-pep8.md +0 -852
- package/templates/skills/react-patterns.md +0 -686
- package/templates/skills/rust-patterns.md +0 -1057
- package/templates/skills/security-best-practices.md +0 -1413
- package/templates/skills/testing-best-practices.md +0 -1315
- package/templates/skills/ts-best-practices.md +0 -354
- package/templates/skills/type-fix.hbs +0 -132
package/dist/chunks/features.mjs
DELETED
|
@@ -1,715 +0,0 @@
|
|
|
1
|
-
import 'node:fs';
|
|
2
|
-
import { homedir } from 'node:os';
|
|
3
|
-
import process__default from 'node:process';
|
|
4
|
-
import a from './index5.mjs';
|
|
5
|
-
import { i as inquirer } from './index6.mjs';
|
|
6
|
-
import { r as readMcpConfig, f as fixWindowsMcpConfig, w as writeMcpConfig, c as backupMcpConfig, g as getMcpServices, b as buildMcpServerConfig, m as mergeMcpServers } from './claude-config.mjs';
|
|
7
|
-
import { SUPPORTED_LANGS, LANG_LABELS } from './constants.mjs';
|
|
8
|
-
import { ensureI18nInitialized, i18n, changeLanguage } from './index2.mjs';
|
|
9
|
-
import { readZcfConfig, updateZcfConfig } from './ccjk-config.mjs';
|
|
10
|
-
import { s as syncClavueActiveProviderModelSelection } from './clavue-config.mjs';
|
|
11
|
-
import { g as getExistingModelConfig, a as getExistingCustomModelConfig, u as updateCustomModel, d as updateDefaultModel, e as getExistingApiConfig, p as promptApiConfigurationAction, f as configureApi } from './config.mjs';
|
|
12
|
-
import { m as modifyApiConfigPartially, v as validateApiKey, f as formatApiKeyDisplay } from '../shared/ccjk.L7yC58_i.mjs';
|
|
13
|
-
import { s as selectMcpServices } from '../shared/ccjk.DhJ1kyDR.mjs';
|
|
14
|
-
import { a as configureOutputStyle } from '../shared/ccjk.C0WLUnFV.mjs';
|
|
15
|
-
import { i as isWindows } from './platform.mjs';
|
|
16
|
-
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
17
|
-
import { openSettingsJson, importRecommendedPermissions, importRecommendedEnv } from './simple-config.mjs';
|
|
18
|
-
import { p as promptBoolean } from '../shared/ccjk.DZ2LLOa-.mjs';
|
|
19
|
-
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
20
|
-
import '../shared/ccjk.BAGoDD49.mjs';
|
|
21
|
-
import 'node:readline';
|
|
22
|
-
import 'stream';
|
|
23
|
-
import 'node:tty';
|
|
24
|
-
import 'node:async_hooks';
|
|
25
|
-
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
26
|
-
import 'node:util';
|
|
27
|
-
import 'tty';
|
|
28
|
-
import 'fs';
|
|
29
|
-
import 'child_process';
|
|
30
|
-
import 'node:path';
|
|
31
|
-
import 'node:crypto';
|
|
32
|
-
import 'buffer';
|
|
33
|
-
import 'string_decoder';
|
|
34
|
-
import 'node:child_process';
|
|
35
|
-
import '../shared/ccjk.DDL-4C-k.mjs';
|
|
36
|
-
import './json-config.mjs';
|
|
37
|
-
import '../shared/ccjk.RyizuzOI.mjs';
|
|
38
|
-
import './fs-operations.mjs';
|
|
39
|
-
import 'node:fs/promises';
|
|
40
|
-
import 'node:url';
|
|
41
|
-
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
42
|
-
import './index3.mjs';
|
|
43
|
-
import './main.mjs';
|
|
44
|
-
import 'module';
|
|
45
|
-
import 'node:stream';
|
|
46
|
-
import '../shared/ccjk.DeWpAShp.mjs';
|
|
47
|
-
|
|
48
|
-
const DEFAULT_MODEL_CHOICES = [
|
|
49
|
-
{
|
|
50
|
-
nameKey: "configuration:defaultModelOption",
|
|
51
|
-
fallback: "Default - Let Claude Code choose",
|
|
52
|
-
value: "default"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
nameKey: "configuration:opusModelOption",
|
|
56
|
-
fallback: "Opus - Only use opus, high token consumption, use with caution",
|
|
57
|
-
value: "opus"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
nameKey: "configuration:sonnetModelOption",
|
|
61
|
-
fallback: "Sonnet - Recommended balanced model for daily coding",
|
|
62
|
-
value: "sonnet"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
nameKey: "configuration:sonnet1mModelOption",
|
|
66
|
-
fallback: "Sonnet 1M - 1M context version",
|
|
67
|
-
value: "sonnet[1m]"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
nameKey: "configuration:customModelOption",
|
|
71
|
-
fallback: "Custom - Specify custom model names",
|
|
72
|
-
value: "custom"
|
|
73
|
-
}
|
|
74
|
-
];
|
|
75
|
-
const CODEX_MODEL_CHOICES = [
|
|
76
|
-
{
|
|
77
|
-
nameKey: "configuration:codexModelOptions.gpt5Codex",
|
|
78
|
-
fallback: "GPT-5-Codex - Recommended default for serious coding work",
|
|
79
|
-
value: "gpt-5-codex"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
nameKey: "configuration:codexModelOptions.codexMiniLatest",
|
|
83
|
-
fallback: "codex-mini-latest - Faster and lighter for high-frequency tasks",
|
|
84
|
-
value: "codex-mini-latest"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
nameKey: "configuration:codexModelOptions.gpt5",
|
|
88
|
-
fallback: "GPT-5 - General-purpose fallback for mixed tasks",
|
|
89
|
-
value: "gpt-5"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
nameKey: "configuration:codexModelOptions.custom",
|
|
93
|
-
fallback: "Custom - Specify custom model names",
|
|
94
|
-
value: "custom"
|
|
95
|
-
}
|
|
96
|
-
];
|
|
97
|
-
function formatCodexModelLabel(model) {
|
|
98
|
-
const predefined = CODEX_MODEL_CHOICES.find((choice) => choice.value === model);
|
|
99
|
-
if (predefined) {
|
|
100
|
-
return i18n.t(predefined.nameKey) || predefined.fallback;
|
|
101
|
-
}
|
|
102
|
-
return model;
|
|
103
|
-
}
|
|
104
|
-
async function handleCancellation() {
|
|
105
|
-
ensureI18nInitialized();
|
|
106
|
-
console.log(a.yellow(i18n.t("common:cancelled")));
|
|
107
|
-
}
|
|
108
|
-
async function handleCustomApiMode() {
|
|
109
|
-
ensureI18nInitialized();
|
|
110
|
-
const zcfConfig = readZcfConfig();
|
|
111
|
-
const codeToolType = zcfConfig?.codeToolType || "claude-code";
|
|
112
|
-
if (codeToolType === "claude-code" || codeToolType === "clavue") {
|
|
113
|
-
const { configureIncrementalManagement } = await import('./claude-code-incremental-manager.mjs');
|
|
114
|
-
await configureIncrementalManagement();
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
const existingConfig = getExistingApiConfig();
|
|
118
|
-
if (existingConfig) {
|
|
119
|
-
const configAction = await promptApiConfigurationAction();
|
|
120
|
-
if (configAction === "keep-existing") {
|
|
121
|
-
console.log(a.green(`\u2714 ${i18n.t("api:keepExistingConfig")}`));
|
|
122
|
-
return;
|
|
123
|
-
} else if (configAction === "modify-partial") {
|
|
124
|
-
await modifyApiConfigPartially(existingConfig);
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
const { apiChoice } = await inquirer.prompt({
|
|
129
|
-
type: "list",
|
|
130
|
-
name: "apiChoice",
|
|
131
|
-
message: i18n.t("api:configureApi"),
|
|
132
|
-
choices: addNumbersToChoices([
|
|
133
|
-
{
|
|
134
|
-
name: `${i18n.t("api:useAuthToken")} - ${a.gray(i18n.t("api:authTokenDesc"))}`,
|
|
135
|
-
value: "auth_token",
|
|
136
|
-
short: i18n.t("api:useAuthToken")
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
name: `${i18n.t("api:useApiKey")} - ${a.gray(i18n.t("api:apiKeyDesc"))}`,
|
|
140
|
-
value: "api_key",
|
|
141
|
-
short: i18n.t("api:useApiKey")
|
|
142
|
-
},
|
|
143
|
-
{ name: i18n.t("api:skipApi"), value: "skip" }
|
|
144
|
-
])
|
|
145
|
-
});
|
|
146
|
-
if (!apiChoice || apiChoice === "skip") {
|
|
147
|
-
await handleCancellation();
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
const { url } = await inquirer.prompt({
|
|
151
|
-
type: "input",
|
|
152
|
-
name: "url",
|
|
153
|
-
message: `${i18n.t("api:enterApiUrl")}${i18n.t("common:emptyToSkip")}`,
|
|
154
|
-
validate: (value) => {
|
|
155
|
-
if (!value) {
|
|
156
|
-
return true;
|
|
157
|
-
}
|
|
158
|
-
try {
|
|
159
|
-
void new URL(value);
|
|
160
|
-
return true;
|
|
161
|
-
} catch {
|
|
162
|
-
return i18n.t("api:invalidUrl");
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
if (url === void 0 || !url) {
|
|
167
|
-
await handleCancellation();
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
const keyMessage = apiChoice === "auth_token" ? `${i18n.t("api:enterAuthToken")}${i18n.t("common:emptyToSkip")}` : `${i18n.t("api:enterApiKey")}${i18n.t("common:emptyToSkip")}`;
|
|
171
|
-
const { key } = await inquirer.prompt({
|
|
172
|
-
type: "input",
|
|
173
|
-
name: "key",
|
|
174
|
-
message: keyMessage,
|
|
175
|
-
validate: (value) => {
|
|
176
|
-
if (!value) {
|
|
177
|
-
return true;
|
|
178
|
-
}
|
|
179
|
-
const validation = validateApiKey(value);
|
|
180
|
-
if (!validation.isValid) {
|
|
181
|
-
return validation.error || i18n.t("api:invalidKeyFormat");
|
|
182
|
-
}
|
|
183
|
-
return true;
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
if (key === void 0 || !key) {
|
|
187
|
-
await handleCancellation();
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
const apiConfig = { url, key, authType: apiChoice };
|
|
191
|
-
const configuredApi = configureApi(apiConfig);
|
|
192
|
-
if (configuredApi) {
|
|
193
|
-
console.log(a.green(`\u2714 ${i18n.t("api:apiConfigSuccess")}`));
|
|
194
|
-
console.log(a.gray(` URL: ${configuredApi.url}`));
|
|
195
|
-
console.log(a.gray(` Key: ${formatApiKeyDisplay(configuredApi.key)}`));
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
async function configureMcpFeature() {
|
|
199
|
-
ensureI18nInitialized();
|
|
200
|
-
if (isWindows()) {
|
|
201
|
-
const fixWindows = await promptBoolean({
|
|
202
|
-
message: i18n.t("configuration:fixWindowsMcp") || "Fix Windows MCP configuration?",
|
|
203
|
-
defaultValue: true
|
|
204
|
-
});
|
|
205
|
-
if (fixWindows) {
|
|
206
|
-
const existingConfig = readMcpConfig() || { mcpServers: {} };
|
|
207
|
-
const fixedConfig = fixWindowsMcpConfig(existingConfig);
|
|
208
|
-
writeMcpConfig(fixedConfig);
|
|
209
|
-
console.log(a.green(`\u2714 ${i18n.t("configuration:windowsMcpConfigFixed")}`));
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
const selectedServices = await selectMcpServices();
|
|
213
|
-
if (!selectedServices) {
|
|
214
|
-
return;
|
|
215
|
-
}
|
|
216
|
-
if (selectedServices.length > 0) {
|
|
217
|
-
const mcpBackupPath = backupMcpConfig();
|
|
218
|
-
if (mcpBackupPath) {
|
|
219
|
-
console.log(a.gray(`\u2714 ${i18n.t("mcp:mcpBackupSuccess")}: ${mcpBackupPath}`));
|
|
220
|
-
}
|
|
221
|
-
const newServers = {};
|
|
222
|
-
for (const serviceId of selectedServices) {
|
|
223
|
-
const service = (await getMcpServices()).find((s) => s.id === serviceId);
|
|
224
|
-
if (!service)
|
|
225
|
-
continue;
|
|
226
|
-
let config = service.config;
|
|
227
|
-
if (service.requiresApiKey) {
|
|
228
|
-
const { apiKey } = await inquirer.prompt({
|
|
229
|
-
type: "input",
|
|
230
|
-
name: "apiKey",
|
|
231
|
-
message: service.apiKeyPrompt,
|
|
232
|
-
validate: async (value) => !!value || i18n.t("api:keyRequired")
|
|
233
|
-
});
|
|
234
|
-
if (apiKey) {
|
|
235
|
-
config = buildMcpServerConfig(service.config, apiKey, service.apiKeyPlaceholder, service.apiKeyEnvVar);
|
|
236
|
-
} else {
|
|
237
|
-
continue;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
newServers[service.id] = config;
|
|
241
|
-
}
|
|
242
|
-
const existingConfig = readMcpConfig();
|
|
243
|
-
let mergedConfig = mergeMcpServers(existingConfig, newServers);
|
|
244
|
-
mergedConfig = fixWindowsMcpConfig(mergedConfig);
|
|
245
|
-
writeMcpConfig(mergedConfig);
|
|
246
|
-
console.log(a.green(`\u2714 ${i18n.t("mcp:mcpConfigSuccess")}`));
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
async function configureDefaultModelFeature(codeTool) {
|
|
250
|
-
ensureI18nInitialized();
|
|
251
|
-
const codeToolType = codeTool || readZcfConfig()?.codeToolType || "claude-code";
|
|
252
|
-
const existingModel = getExistingModelConfig(codeToolType);
|
|
253
|
-
if (existingModel) {
|
|
254
|
-
console.log(`
|
|
255
|
-
${a.green(`\u2139 ${i18n.t("configuration:existingModelConfig") || "Existing model configuration"}`)}`);
|
|
256
|
-
const modelDisplay = existingModel === "default" ? i18n.t("configuration:defaultModelOption") || "Default (Let Claude Code choose)" : existingModel.charAt(0).toUpperCase() + existingModel.slice(1);
|
|
257
|
-
console.log(a.gray(` ${i18n.t("configuration:currentModel") || "Current model"}: ${modelDisplay}
|
|
258
|
-
`));
|
|
259
|
-
const modify = await promptBoolean({
|
|
260
|
-
message: i18n.t("configuration:modifyModel") || "Modify model configuration?",
|
|
261
|
-
defaultValue: false
|
|
262
|
-
});
|
|
263
|
-
if (!modify) {
|
|
264
|
-
console.log(a.green(`\u2714 ${i18n.t("configuration:keepModel") || "Keeping existing model configuration"}`));
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
const { model } = await inquirer.prompt({
|
|
269
|
-
type: "list",
|
|
270
|
-
name: "model",
|
|
271
|
-
message: i18n.t("configuration:selectDefaultModel") || "Select default model",
|
|
272
|
-
choices: DEFAULT_MODEL_CHOICES.map((choice) => ({
|
|
273
|
-
name: i18n.t(choice.nameKey) || choice.fallback,
|
|
274
|
-
value: choice.value
|
|
275
|
-
})),
|
|
276
|
-
default: existingModel ? DEFAULT_MODEL_CHOICES.findIndex((choice) => choice.value === existingModel) : 0
|
|
277
|
-
});
|
|
278
|
-
if (!model) {
|
|
279
|
-
await handleCancellation();
|
|
280
|
-
return;
|
|
281
|
-
}
|
|
282
|
-
if (model === "custom") {
|
|
283
|
-
const existingCustomConfig = getExistingCustomModelConfig(codeToolType);
|
|
284
|
-
const { primaryModel, haikuModel, sonnetModel, opusModel } = await promptCustomModels(
|
|
285
|
-
existingCustomConfig?.primaryModel,
|
|
286
|
-
existingCustomConfig?.haikuModel,
|
|
287
|
-
existingCustomConfig?.sonnetModel,
|
|
288
|
-
existingCustomConfig?.opusModel
|
|
289
|
-
);
|
|
290
|
-
if (!primaryModel.trim() && !haikuModel.trim() && !sonnetModel.trim() && !opusModel.trim()) {
|
|
291
|
-
console.log(a.yellow(`\u26A0 ${i18n.t("configuration:customModelSkipped") || "Custom model configuration skipped"}`));
|
|
292
|
-
return;
|
|
293
|
-
}
|
|
294
|
-
updateCustomModel(primaryModel, haikuModel, sonnetModel, opusModel, codeToolType);
|
|
295
|
-
if (codeToolType === "clavue") {
|
|
296
|
-
syncClavueActiveProviderModelSelection({
|
|
297
|
-
primaryModel,
|
|
298
|
-
haikuModel,
|
|
299
|
-
sonnetModel,
|
|
300
|
-
opusModel
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
console.log(a.green(`\u2714 ${i18n.t("configuration:customModelConfigured") || "Custom model configuration completed"}`));
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
|
-
updateDefaultModel(model, codeToolType);
|
|
307
|
-
if (codeToolType === "clavue") {
|
|
308
|
-
syncClavueActiveProviderModelSelection(
|
|
309
|
-
model === "default" ? { reset: true } : { selectedModel: model }
|
|
310
|
-
);
|
|
311
|
-
}
|
|
312
|
-
console.log(a.green(`\u2714 ${i18n.t("configuration:modelConfigured") || "Default model configured"}`));
|
|
313
|
-
}
|
|
314
|
-
async function promptCustomModels(defaultPrimaryModel, defaultHaikuModel, defaultSonnetModel, defaultOpusModel) {
|
|
315
|
-
const { primaryModel } = await inquirer.prompt({
|
|
316
|
-
type: "input",
|
|
317
|
-
name: "primaryModel",
|
|
318
|
-
message: `${i18n.t("configuration:enterPrimaryModel")}${i18n.t("common:emptyToSkip")}`,
|
|
319
|
-
default: defaultPrimaryModel || ""
|
|
320
|
-
});
|
|
321
|
-
const { haikuModel } = await inquirer.prompt({
|
|
322
|
-
type: "input",
|
|
323
|
-
name: "haikuModel",
|
|
324
|
-
message: `${i18n.t("configuration:enterHaikuModel")}${i18n.t("common:emptyToSkip")}`,
|
|
325
|
-
default: defaultHaikuModel || ""
|
|
326
|
-
});
|
|
327
|
-
const { sonnetModel } = await inquirer.prompt({
|
|
328
|
-
type: "input",
|
|
329
|
-
name: "sonnetModel",
|
|
330
|
-
message: `${i18n.t("configuration:enterSonnetModel")}${i18n.t("common:emptyToSkip")}`,
|
|
331
|
-
default: defaultSonnetModel || ""
|
|
332
|
-
});
|
|
333
|
-
const { opusModel } = await inquirer.prompt({
|
|
334
|
-
type: "input",
|
|
335
|
-
name: "opusModel",
|
|
336
|
-
message: `${i18n.t("configuration:enterOpusModel")}${i18n.t("common:emptyToSkip")}`,
|
|
337
|
-
default: defaultOpusModel || ""
|
|
338
|
-
});
|
|
339
|
-
return { primaryModel, haikuModel, sonnetModel, opusModel };
|
|
340
|
-
}
|
|
341
|
-
async function changeScriptLanguageFeature(currentLang) {
|
|
342
|
-
ensureI18nInitialized();
|
|
343
|
-
const { lang } = await inquirer.prompt({
|
|
344
|
-
type: "list",
|
|
345
|
-
name: "lang",
|
|
346
|
-
message: i18n.t("language:selectScriptLang"),
|
|
347
|
-
choices: addNumbersToChoices(
|
|
348
|
-
SUPPORTED_LANGS.map((l) => ({
|
|
349
|
-
name: LANG_LABELS[l],
|
|
350
|
-
value: l
|
|
351
|
-
}))
|
|
352
|
-
),
|
|
353
|
-
default: SUPPORTED_LANGS.indexOf(currentLang)
|
|
354
|
-
});
|
|
355
|
-
if (!lang) {
|
|
356
|
-
return currentLang;
|
|
357
|
-
}
|
|
358
|
-
updateZcfConfig({ preferredLang: lang });
|
|
359
|
-
await changeLanguage(lang);
|
|
360
|
-
console.log(a.green(`\u2714 ${i18n.t("language:languageChanged") || "Language changed"}`));
|
|
361
|
-
return lang;
|
|
362
|
-
}
|
|
363
|
-
async function configureCodexDefaultModelFeature() {
|
|
364
|
-
ensureI18nInitialized();
|
|
365
|
-
const { readCodexConfig } = await import('./codex.mjs').then(function (n) { return n.t; });
|
|
366
|
-
const existingConfig = readCodexConfig();
|
|
367
|
-
const currentModel = existingConfig?.model;
|
|
368
|
-
if (currentModel) {
|
|
369
|
-
console.log(`
|
|
370
|
-
${a.green(`\u2139 ${i18n.t("configuration:existingModelConfig") || "Existing model configuration"}`)}`);
|
|
371
|
-
const modelDisplay = formatCodexModelLabel(currentModel);
|
|
372
|
-
console.log(a.gray(` ${i18n.t("configuration:currentModel") || "Current model"}: ${modelDisplay}
|
|
373
|
-
`));
|
|
374
|
-
const modify = await promptBoolean({
|
|
375
|
-
message: i18n.t("configuration:modifyModel") || "Modify model configuration?",
|
|
376
|
-
defaultValue: false
|
|
377
|
-
});
|
|
378
|
-
if (!modify) {
|
|
379
|
-
console.log(a.green(`\u2714 ${i18n.t("configuration:keepModel") || "Keeping existing model configuration"}`));
|
|
380
|
-
return;
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
const supportedModels = CODEX_MODEL_CHOICES.map((choice) => choice.value);
|
|
384
|
-
const defaultModel = currentModel && supportedModels.includes(currentModel) ? currentModel : currentModel ? "custom" : "gpt-5-codex";
|
|
385
|
-
const { model } = await inquirer.prompt({
|
|
386
|
-
type: "list",
|
|
387
|
-
name: "model",
|
|
388
|
-
message: i18n.t("configuration:selectDefaultModel") || "Select default model",
|
|
389
|
-
choices: addNumbersToChoices(CODEX_MODEL_CHOICES.map((choice) => ({
|
|
390
|
-
name: i18n.t(choice.nameKey) || choice.fallback,
|
|
391
|
-
value: choice.value
|
|
392
|
-
}))),
|
|
393
|
-
default: defaultModel
|
|
394
|
-
});
|
|
395
|
-
if (!model) {
|
|
396
|
-
await handleCancellation();
|
|
397
|
-
return;
|
|
398
|
-
}
|
|
399
|
-
if (model === "custom") {
|
|
400
|
-
const { customModel } = await inquirer.prompt({
|
|
401
|
-
type: "input",
|
|
402
|
-
name: "customModel",
|
|
403
|
-
message: `${i18n.t("configuration:enterCustomModel")}${i18n.t("common:emptyToSkip")}`,
|
|
404
|
-
default: ""
|
|
405
|
-
});
|
|
406
|
-
if (!customModel.trim()) {
|
|
407
|
-
console.log(a.yellow(`\u26A0 ${i18n.t("configuration:customModelSkipped") || "Custom model configuration skipped"}`));
|
|
408
|
-
return;
|
|
409
|
-
}
|
|
410
|
-
await updateCodexModelProvider(customModel.trim());
|
|
411
|
-
console.log(a.green(`\u2714 ${i18n.t("configuration:customModelConfigured") || "Custom model configuration completed"}`));
|
|
412
|
-
return;
|
|
413
|
-
}
|
|
414
|
-
await updateCodexModelProvider(model);
|
|
415
|
-
console.log(a.green(`\u2714 ${i18n.t("configuration:modelConfigured") || "Default model configured"}`));
|
|
416
|
-
}
|
|
417
|
-
async function configureCodexAiMemoryFeature() {
|
|
418
|
-
ensureI18nInitialized();
|
|
419
|
-
const { option } = await inquirer.prompt({
|
|
420
|
-
type: "list",
|
|
421
|
-
name: "option",
|
|
422
|
-
message: i18n.t("configuration:selectMemoryOption") || "Select configuration option",
|
|
423
|
-
choices: addNumbersToChoices([
|
|
424
|
-
{
|
|
425
|
-
name: i18n.t("configuration:configureAiLanguage") || "Configure AI output language",
|
|
426
|
-
value: "language"
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
name: i18n.t("configuration:configureSystemPromptStyle") || "Configure global AI system prompt style",
|
|
430
|
-
value: "systemPrompt"
|
|
431
|
-
}
|
|
432
|
-
])
|
|
433
|
-
});
|
|
434
|
-
if (!option) {
|
|
435
|
-
return;
|
|
436
|
-
}
|
|
437
|
-
if (option === "language") {
|
|
438
|
-
const zcfConfig = readZcfConfig();
|
|
439
|
-
const existingLang = zcfConfig?.aiOutputLang;
|
|
440
|
-
if (existingLang) {
|
|
441
|
-
console.log(
|
|
442
|
-
`
|
|
443
|
-
${a.green(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Existing AI output language configuration"}`)}`
|
|
444
|
-
);
|
|
445
|
-
console.log(a.gray(` ${i18n.t("configuration:currentLanguage") || "Current language"}: ${existingLang}
|
|
446
|
-
`));
|
|
447
|
-
const modify = await promptBoolean({
|
|
448
|
-
message: i18n.t("configuration:modifyLanguage") || "Modify AI output language?",
|
|
449
|
-
defaultValue: false
|
|
450
|
-
});
|
|
451
|
-
if (!modify) {
|
|
452
|
-
console.log(a.green(`\u2714 ${i18n.t("configuration:keepLanguage") || "Keeping existing language configuration"}`));
|
|
453
|
-
await ensureLanguageDirectiveInAgents(existingLang);
|
|
454
|
-
return;
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
const { selectAiOutputLanguage } = await import('./prompts.mjs');
|
|
458
|
-
const aiOutputLang = await selectAiOutputLanguage();
|
|
459
|
-
await updateCodexLanguageDirective(aiOutputLang);
|
|
460
|
-
updateZcfConfig({ aiOutputLang });
|
|
461
|
-
console.log(a.green(`\u2714 ${i18n.t("configuration:aiLanguageConfigured") || "AI output language configured"}`));
|
|
462
|
-
} else if (option === "systemPrompt") {
|
|
463
|
-
const zcfConfig = readZcfConfig();
|
|
464
|
-
const currentLang = zcfConfig?.aiOutputLang || "English";
|
|
465
|
-
const { runCodexSystemPromptSelection } = await import('./codex.mjs').then(function (n) { return n.t; });
|
|
466
|
-
await runCodexSystemPromptSelection();
|
|
467
|
-
await ensureLanguageDirectiveInAgents(currentLang);
|
|
468
|
-
console.log(a.green(`\u2714 ${i18n.t("configuration:systemPromptConfigured")}`));
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
async function updateCodexModelProvider(modelProvider) {
|
|
472
|
-
const { readCodexConfig, writeCodexConfig, backupCodexConfig, getBackupMessage } = await import('./codex.mjs').then(function (n) { return n.t; });
|
|
473
|
-
const backupPath = backupCodexConfig();
|
|
474
|
-
if (backupPath) {
|
|
475
|
-
console.log(a.gray(getBackupMessage(backupPath)));
|
|
476
|
-
}
|
|
477
|
-
const existingConfig = readCodexConfig();
|
|
478
|
-
const updatedConfig = {
|
|
479
|
-
...existingConfig,
|
|
480
|
-
model: modelProvider,
|
|
481
|
-
// Set the model field
|
|
482
|
-
modelProvider: existingConfig?.modelProvider || null,
|
|
483
|
-
// Preserve existing API provider
|
|
484
|
-
providers: existingConfig?.providers || [],
|
|
485
|
-
mcpServices: existingConfig?.mcpServices || [],
|
|
486
|
-
managed: true,
|
|
487
|
-
features: existingConfig?.features,
|
|
488
|
-
otherConfig: existingConfig?.otherConfig || [],
|
|
489
|
-
modelProviderCommented: existingConfig?.modelProviderCommented
|
|
490
|
-
};
|
|
491
|
-
writeCodexConfig(updatedConfig);
|
|
492
|
-
}
|
|
493
|
-
const LANG_DIRECTIVE_RE = /\*\*Most Important:\s*Always respond in [^*]+\*\*/i;
|
|
494
|
-
const LANG_DIRECTIVE_RE_G = /\*\*Most Important:\s*Always respond in [^*]+\*\*\s*/g;
|
|
495
|
-
const codexLanguageLabels = {
|
|
496
|
-
"Chinese": "Chinese-simplified",
|
|
497
|
-
"English": "English",
|
|
498
|
-
"zh-CN": "Chinese-simplified",
|
|
499
|
-
"en": "English"
|
|
500
|
-
};
|
|
501
|
-
async function setCodexLanguageDirective(aiOutputLang, mode) {
|
|
502
|
-
const { readFile, writeFileAtomic, exists } = await import('./fs-operations.mjs');
|
|
503
|
-
const { backupCodexAgents, getBackupMessage } = await import('./codex.mjs').then(function (n) { return n.t; });
|
|
504
|
-
const CODEX_AGENTS_FILE = join(homedir(), ".codex", "AGENTS.md");
|
|
505
|
-
if (!exists(CODEX_AGENTS_FILE)) {
|
|
506
|
-
console.log(a.yellow(i18n.t("codex:agentsFileNotFound")));
|
|
507
|
-
return;
|
|
508
|
-
}
|
|
509
|
-
let content = readFile(CODEX_AGENTS_FILE);
|
|
510
|
-
const langLabel = codexLanguageLabels[aiOutputLang] || aiOutputLang;
|
|
511
|
-
if (mode === "ensure" && LANG_DIRECTIVE_RE.test(content))
|
|
512
|
-
return;
|
|
513
|
-
const backupPath = backupCodexAgents();
|
|
514
|
-
if (backupPath)
|
|
515
|
-
console.log(a.gray(getBackupMessage(backupPath)));
|
|
516
|
-
content = content.replace(LANG_DIRECTIVE_RE_G, "");
|
|
517
|
-
if (!content.endsWith("\n"))
|
|
518
|
-
content += "\n";
|
|
519
|
-
content += `
|
|
520
|
-
**Most Important:Always respond in ${langLabel}**
|
|
521
|
-
`;
|
|
522
|
-
writeFileAtomic(CODEX_AGENTS_FILE, content);
|
|
523
|
-
if (mode === "ensure")
|
|
524
|
-
console.log(a.gray(` ${i18n.t("configuration:addedLanguageDirective")}: ${langLabel}`));
|
|
525
|
-
}
|
|
526
|
-
async function ensureLanguageDirectiveInAgents(aiOutputLang) {
|
|
527
|
-
return setCodexLanguageDirective(aiOutputLang, "ensure");
|
|
528
|
-
}
|
|
529
|
-
async function updateCodexLanguageDirective(aiOutputLang) {
|
|
530
|
-
return setCodexLanguageDirective(aiOutputLang, "update");
|
|
531
|
-
}
|
|
532
|
-
async function configureMergedPermissionsFeature() {
|
|
533
|
-
ensureI18nInitialized();
|
|
534
|
-
const isZh = i18n.language === "zh-CN";
|
|
535
|
-
const { choice } = await inquirer.prompt({
|
|
536
|
-
type: "list",
|
|
537
|
-
name: "choice",
|
|
538
|
-
message: isZh ? "\u6743\u9650 & \u73AF\u5883\u914D\u7F6E \u2014 \u9009\u62E9\u64CD\u4F5C:" : "Permissions & Env Setup \u2014 Select action:",
|
|
539
|
-
choices: addNumbersToChoices([
|
|
540
|
-
{
|
|
541
|
-
name: isZh ? `\u5BFC\u5165\u63A8\u8350\u73AF\u5883\u53D8\u91CF ${a.gray("- \u5199\u5165\u9690\u79C1\u4FDD\u62A4 env \u5230 settings.json")}` : `Import recommended env vars ${a.gray("- Write privacy env to settings.json")}`,
|
|
542
|
-
value: "env"
|
|
543
|
-
},
|
|
544
|
-
{
|
|
545
|
-
name: isZh ? `\u5BFC\u5165\u63A8\u8350\u6743\u9650\u914D\u7F6E ${a.gray("- \u8FFD\u52A0\u63A8\u8350 allow \u89C4\u5219\u5230 settings.json")}` : `Import recommended permissions ${a.gray("- Append recommended allow rules")}`,
|
|
546
|
-
value: "permissions"
|
|
547
|
-
},
|
|
548
|
-
{
|
|
549
|
-
name: isZh ? `\u4E00\u952E\u6743\u9650\u9884\u8BBE ${a.gray("- \u6700\u5927(max) / \u5F00\u53D1\u8005(dev) / \u5B89\u5168(safe) \u9884\u8BBE")}` : `Zero-config permission preset ${a.gray("- max / dev / safe preset")}`,
|
|
550
|
-
value: "preset"
|
|
551
|
-
},
|
|
552
|
-
{
|
|
553
|
-
name: isZh ? `\u6253\u5F00 settings.json ${a.gray("- \u5728\u7F16\u8F91\u5668\u4E2D\u67E5\u770B\u5F53\u524D\u914D\u7F6E")}` : `Open settings.json ${a.gray("- View current config in editor")}`,
|
|
554
|
-
value: "open"
|
|
555
|
-
}
|
|
556
|
-
])
|
|
557
|
-
});
|
|
558
|
-
if (!choice) {
|
|
559
|
-
await handleCancellation();
|
|
560
|
-
return;
|
|
561
|
-
}
|
|
562
|
-
try {
|
|
563
|
-
switch (choice) {
|
|
564
|
-
case "env":
|
|
565
|
-
await importRecommendedEnv();
|
|
566
|
-
console.log(a.green(`\u2705 ${i18n.t("configuration:envImportSuccess")}`));
|
|
567
|
-
break;
|
|
568
|
-
case "permissions":
|
|
569
|
-
await importRecommendedPermissions();
|
|
570
|
-
console.log(a.green(`\u2705 ${i18n.t("configuration:permissionsImportSuccess") || "Permissions imported"}`));
|
|
571
|
-
break;
|
|
572
|
-
case "preset": {
|
|
573
|
-
const { zeroConfig } = await import('./zero-config.mjs');
|
|
574
|
-
await zeroConfig();
|
|
575
|
-
break;
|
|
576
|
-
}
|
|
577
|
-
case "open":
|
|
578
|
-
console.log(a.green(i18n.t("configuration:openingSettingsJson") || "Opening settings.json..."));
|
|
579
|
-
await openSettingsJson();
|
|
580
|
-
break;
|
|
581
|
-
}
|
|
582
|
-
} catch (error) {
|
|
583
|
-
console.error(a.red(`${i18n.t("common:error")}: ${error.message}`));
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
async function configureMemoryFeature() {
|
|
587
|
-
ensureI18nInitialized();
|
|
588
|
-
const isZh = i18n.language === "zh-CN";
|
|
589
|
-
const inquirer2 = (await import('./index6.mjs').then(function (n) { return n.c; })).default;
|
|
590
|
-
const ansis2 = (await import('./index5.mjs')).default;
|
|
591
|
-
const { execSync } = await import('node:child_process');
|
|
592
|
-
const fs = await import('node:fs/promises');
|
|
593
|
-
const { getCcjkMemoryPath, getClaudeMemoryPath } = await import('./memory-paths.mjs');
|
|
594
|
-
const { inspectMemoryFiles, syncMemoryFiles } = await import('./memory-sync.mjs');
|
|
595
|
-
const { memoryCheck } = await import('./memory-check.mjs');
|
|
596
|
-
console.log(ansis2.cyan(`
|
|
597
|
-
${i18n.t("memory:title")}`));
|
|
598
|
-
const projectPath = process__default.cwd();
|
|
599
|
-
const claudeMemoryPath = getClaudeMemoryPath(projectPath);
|
|
600
|
-
const ccjkMemoryPath = getCcjkMemoryPath(projectPath);
|
|
601
|
-
let claudeMemoryExists = false;
|
|
602
|
-
let ccjkMemoryExists = false;
|
|
603
|
-
try {
|
|
604
|
-
await fs.access(claudeMemoryPath);
|
|
605
|
-
claudeMemoryExists = true;
|
|
606
|
-
} catch {
|
|
607
|
-
}
|
|
608
|
-
try {
|
|
609
|
-
await fs.access(ccjkMemoryPath);
|
|
610
|
-
ccjkMemoryExists = true;
|
|
611
|
-
} catch {
|
|
612
|
-
}
|
|
613
|
-
console.log(`
|
|
614
|
-
${ansis2.bold(i18n.t("memory:currentStatus"))}`);
|
|
615
|
-
console.log(ansis2.gray("\u2500".repeat(50)));
|
|
616
|
-
console.log(`${ansis2.yellow(i18n.t("memory:claudeMemory"))}: ${claudeMemoryExists ? ansis2.green("\u2713") : ansis2.red("\u2717")}`);
|
|
617
|
-
console.log(`${ansis2.yellow(i18n.t("memory:ccjkMemory"))}: ${ccjkMemoryExists ? ansis2.green("\u2713") : ansis2.red("\u2717")}`);
|
|
618
|
-
console.log(ansis2.gray("\u2500".repeat(50)));
|
|
619
|
-
const { action } = await inquirer2.prompt([
|
|
620
|
-
{
|
|
621
|
-
type: "list",
|
|
622
|
-
name: "action",
|
|
623
|
-
message: i18n.t("memory:selectAction"),
|
|
624
|
-
choices: [
|
|
625
|
-
{ name: "Status", value: "status" },
|
|
626
|
-
{ name: "Doctor", value: "doctor" },
|
|
627
|
-
{ name: i18n.t("memory:viewMemory"), value: "view" },
|
|
628
|
-
{ name: i18n.t("memory:editMemory"), value: "edit" },
|
|
629
|
-
{ name: i18n.t("memory:syncNow"), value: "sync" },
|
|
630
|
-
{ name: i18n.t("memory:configureRules"), value: "rules" },
|
|
631
|
-
{ name: isZh ? "\u{1F310} \u914D\u7F6E AI \u8F93\u51FA\u8BED\u8A00" : "\u{1F310} Configure AI output language", value: "language" },
|
|
632
|
-
{ name: isZh ? "\u{1F3A8} \u914D\u7F6E\u8F93\u51FA\u98CE\u683C" : "\u{1F3A8} Configure output style", value: "outputStyle" },
|
|
633
|
-
{ name: i18n.t("memory:back"), value: "back" }
|
|
634
|
-
]
|
|
635
|
-
}
|
|
636
|
-
]);
|
|
637
|
-
switch (action) {
|
|
638
|
-
case "status": {
|
|
639
|
-
const inspection = inspectMemoryFiles({ projectPath });
|
|
640
|
-
console.log(ansis2.bold("\nMemory Status"));
|
|
641
|
-
console.log(ansis2.gray("\u2500".repeat(50)));
|
|
642
|
-
console.log(`State: ${inspection.syncState}`);
|
|
643
|
-
console.log(`Source: ${inspection.source}`);
|
|
644
|
-
console.log(`Claude: ${inspection.paths.claude}`);
|
|
645
|
-
console.log(`CCJK: ${inspection.paths.ccjk}`);
|
|
646
|
-
console.log(`Entries: ${inspection.entryCount}`);
|
|
647
|
-
console.log(ansis2.gray("\u2500".repeat(50)));
|
|
648
|
-
break;
|
|
649
|
-
}
|
|
650
|
-
case "doctor": {
|
|
651
|
-
const health = await memoryCheck.check();
|
|
652
|
-
console.log(ansis2.bold("\nMemory Doctor"));
|
|
653
|
-
console.log(ansis2.gray("\u2500".repeat(50)));
|
|
654
|
-
console.log(`${health.message} (${health.score}/100)`);
|
|
655
|
-
for (const detail of health.details || []) {
|
|
656
|
-
console.log(detail);
|
|
657
|
-
}
|
|
658
|
-
if (health.fix) {
|
|
659
|
-
console.log(ansis2.yellow(`Fix: ${health.fix}`));
|
|
660
|
-
}
|
|
661
|
-
console.log(ansis2.gray("\u2500".repeat(50)));
|
|
662
|
-
break;
|
|
663
|
-
}
|
|
664
|
-
case "view": {
|
|
665
|
-
const memoryPath = getClaudeMemoryPath(projectPath);
|
|
666
|
-
try {
|
|
667
|
-
const content = await fs.readFile(memoryPath, "utf-8");
|
|
668
|
-
console.log(`
|
|
669
|
-
${ansis2.bold(i18n.t("memory:memoryContent"))}`);
|
|
670
|
-
console.log(ansis2.gray("\u2500".repeat(50)));
|
|
671
|
-
console.log(content);
|
|
672
|
-
console.log(ansis2.gray("\u2500".repeat(50)));
|
|
673
|
-
} catch (_error) {
|
|
674
|
-
console.log(ansis2.red(i18n.t("memory:readError")));
|
|
675
|
-
}
|
|
676
|
-
break;
|
|
677
|
-
}
|
|
678
|
-
case "edit": {
|
|
679
|
-
const memoryPath = getClaudeMemoryPath(projectPath);
|
|
680
|
-
const editor = process__default.env.EDITOR || "nano";
|
|
681
|
-
try {
|
|
682
|
-
execSync(`${editor} "${memoryPath}"`, { stdio: "inherit" });
|
|
683
|
-
console.log(ansis2.green(i18n.t("memory:editComplete")));
|
|
684
|
-
} catch (_error) {
|
|
685
|
-
console.log(ansis2.red(i18n.t("memory:editError")));
|
|
686
|
-
}
|
|
687
|
-
break;
|
|
688
|
-
}
|
|
689
|
-
case "sync": {
|
|
690
|
-
console.log(ansis2.cyan(i18n.t("memory:syncing")));
|
|
691
|
-
try {
|
|
692
|
-
syncMemoryFiles({ projectPath });
|
|
693
|
-
console.log(ansis2.green(i18n.t("memory:syncComplete")));
|
|
694
|
-
} catch (_error) {
|
|
695
|
-
console.log(ansis2.red(i18n.t("memory:syncError")));
|
|
696
|
-
}
|
|
697
|
-
break;
|
|
698
|
-
}
|
|
699
|
-
case "rules": {
|
|
700
|
-
console.log(ansis2.yellow(i18n.t("memory:rulesInfo")));
|
|
701
|
-
console.log(i18n.t("memory:rulesDescription"));
|
|
702
|
-
break;
|
|
703
|
-
}
|
|
704
|
-
case "language": {
|
|
705
|
-
await changeScriptLanguageFeature(i18n.language);
|
|
706
|
-
break;
|
|
707
|
-
}
|
|
708
|
-
case "outputStyle": {
|
|
709
|
-
await configureOutputStyle();
|
|
710
|
-
break;
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
export { CODEX_MODEL_CHOICES, DEFAULT_MODEL_CHOICES, changeScriptLanguageFeature, configureCodexAiMemoryFeature, configureCodexDefaultModelFeature, configureDefaultModelFeature, configureMcpFeature, configureMemoryFeature, configureMergedPermissionsFeature, formatCodexModelLabel, handleCustomApiMode, promptCustomModels };
|