ccjk 14.2.2 → 15.0.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 +58 -341
- package/dist/cli.js +59 -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 +102 -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 +33 -0
- package/dist/commands/menu.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/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
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { exec, spawn } from 'node:child_process';
|
|
2
|
-
import { promisify } from 'node:util';
|
|
3
|
-
|
|
4
|
-
const execAsync = promisify(exec);
|
|
5
|
-
async function executeCommand(command, args = [], options = {}) {
|
|
6
|
-
try {
|
|
7
|
-
const fullCommand = buildCommand(command, args);
|
|
8
|
-
const execOptions = {
|
|
9
|
-
cwd: options.cwd,
|
|
10
|
-
env: { ...process.env, ...options.env },
|
|
11
|
-
timeout: options.timeout,
|
|
12
|
-
shell: typeof options.shell === "string" ? options.shell : options.shell ? "/bin/sh" : void 0,
|
|
13
|
-
encoding: options.encoding || "utf8",
|
|
14
|
-
maxBuffer: options.maxBuffer || 1024 * 1024 * 10
|
|
15
|
-
// 10MB default
|
|
16
|
-
};
|
|
17
|
-
const { stdout, stderr } = await execAsync(fullCommand, execOptions);
|
|
18
|
-
return {
|
|
19
|
-
success: true,
|
|
20
|
-
stdout: stdout.toString().trim(),
|
|
21
|
-
stderr: stderr.toString().trim(),
|
|
22
|
-
exitCode: 0
|
|
23
|
-
};
|
|
24
|
-
} catch (error) {
|
|
25
|
-
return {
|
|
26
|
-
success: false,
|
|
27
|
-
stdout: error.stdout?.toString().trim() || "",
|
|
28
|
-
stderr: error.stderr?.toString().trim() || "",
|
|
29
|
-
exitCode: error.code || 1,
|
|
30
|
-
error: error.message
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
function executeCommandStream(command, args = [], options = {}) {
|
|
35
|
-
return new Promise((resolve) => {
|
|
36
|
-
const spawnOptions = {
|
|
37
|
-
cwd: options.cwd,
|
|
38
|
-
env: { ...process.env, ...options.env },
|
|
39
|
-
shell: options.shell !== false
|
|
40
|
-
};
|
|
41
|
-
const child = spawn(command, args, spawnOptions);
|
|
42
|
-
let stdout = "";
|
|
43
|
-
let stderr = "";
|
|
44
|
-
child.stdout?.on("data", (data) => {
|
|
45
|
-
const text = data.toString();
|
|
46
|
-
stdout += text;
|
|
47
|
-
if (options.onStdout) {
|
|
48
|
-
options.onStdout(text);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
child.stderr?.on("data", (data) => {
|
|
52
|
-
const text = data.toString();
|
|
53
|
-
stderr += text;
|
|
54
|
-
if (options.onStderr) {
|
|
55
|
-
options.onStderr(text);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
child.on("close", (code) => {
|
|
59
|
-
resolve({
|
|
60
|
-
success: code === 0,
|
|
61
|
-
stdout: stdout.trim(),
|
|
62
|
-
stderr: stderr.trim(),
|
|
63
|
-
exitCode: code || 0,
|
|
64
|
-
error: code !== 0 ? `Command exited with code ${code}` : void 0
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
child.on("error", (error) => {
|
|
68
|
-
resolve({
|
|
69
|
-
success: false,
|
|
70
|
-
stdout: stdout.trim(),
|
|
71
|
-
stderr: stderr.trim(),
|
|
72
|
-
exitCode: 1,
|
|
73
|
-
error: error.message
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
if (options.timeout) {
|
|
77
|
-
setTimeout(() => {
|
|
78
|
-
child.kill();
|
|
79
|
-
resolve({
|
|
80
|
-
success: false,
|
|
81
|
-
stdout: stdout.trim(),
|
|
82
|
-
stderr: stderr.trim(),
|
|
83
|
-
exitCode: 1,
|
|
84
|
-
error: `Command timed out after ${options.timeout}ms`
|
|
85
|
-
});
|
|
86
|
-
}, options.timeout);
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
function buildCommand(command, args) {
|
|
91
|
-
const escapedArgs = args.map(escapeArgument);
|
|
92
|
-
return [command, ...escapedArgs].join(" ");
|
|
93
|
-
}
|
|
94
|
-
function escapeArgument(arg) {
|
|
95
|
-
if (/[\s"'`$&|;<>(){}[\]\\]/.test(arg)) {
|
|
96
|
-
const escaped = arg.replace(/"/g, '\\"');
|
|
97
|
-
return `"${escaped}"`;
|
|
98
|
-
}
|
|
99
|
-
return arg;
|
|
100
|
-
}
|
|
101
|
-
async function commandExists(command) {
|
|
102
|
-
const isWindows = process.platform === "win32";
|
|
103
|
-
const checkCommand = isWindows ? "where" : "which";
|
|
104
|
-
try {
|
|
105
|
-
const result = await executeCommand(checkCommand, [command]);
|
|
106
|
-
return result.success;
|
|
107
|
-
} catch {
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
async function getCommandPath(command) {
|
|
112
|
-
const isWindows = process.platform === "win32";
|
|
113
|
-
const checkCommand = isWindows ? "where" : "which";
|
|
114
|
-
try {
|
|
115
|
-
const result = await executeCommand(checkCommand, [command]);
|
|
116
|
-
if (result.success) {
|
|
117
|
-
return result.stdout.split("\n")[0].trim();
|
|
118
|
-
}
|
|
119
|
-
return null;
|
|
120
|
-
} catch {
|
|
121
|
-
return null;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
function parseVersion(output) {
|
|
125
|
-
const patterns = [
|
|
126
|
-
/version\s+v?(\d+\.\d+\.\d+)/i,
|
|
127
|
-
/v?(\d+\.\d+\.\d+)/,
|
|
128
|
-
/(\d+\.\d+\.\d+)/
|
|
129
|
-
];
|
|
130
|
-
for (const pattern of patterns) {
|
|
131
|
-
const match = output.match(pattern);
|
|
132
|
-
if (match) {
|
|
133
|
-
return match[1];
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
return null;
|
|
137
|
-
}
|
|
138
|
-
async function getCommandVersion(command, versionFlag = "--version") {
|
|
139
|
-
try {
|
|
140
|
-
const result = await executeCommand(command, [versionFlag]);
|
|
141
|
-
if (result.success) {
|
|
142
|
-
return parseVersion(result.stdout || result.stderr);
|
|
143
|
-
}
|
|
144
|
-
return null;
|
|
145
|
-
} catch {
|
|
146
|
-
return null;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
async function executeCommandSequence(commands) {
|
|
150
|
-
const results = [];
|
|
151
|
-
for (const cmd of commands) {
|
|
152
|
-
const result = await executeCommand(
|
|
153
|
-
cmd.command,
|
|
154
|
-
cmd.args || [],
|
|
155
|
-
cmd.options || {}
|
|
156
|
-
);
|
|
157
|
-
results.push(result);
|
|
158
|
-
if (!result.success) {
|
|
159
|
-
break;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
return results;
|
|
163
|
-
}
|
|
164
|
-
async function executeCommandParallel(commands) {
|
|
165
|
-
const promises = commands.map(
|
|
166
|
-
(cmd) => executeCommand(cmd.command, cmd.args || [], cmd.options || {})
|
|
167
|
-
);
|
|
168
|
-
return Promise.all(promises);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export { escapeArgument as a, buildCommand as b, commandExists as c, executeCommandParallel as d, executeCommand as e, executeCommandSequence as f, executeCommandStream as g, getCommandPath as h, getCommandVersion as i, parseVersion as p };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { webcrypto } from 'node:crypto';
|
|
2
|
-
|
|
3
|
-
const urlAlphabet =
|
|
4
|
-
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
|
5
|
-
|
|
6
|
-
const POOL_SIZE_MULTIPLIER = 128;
|
|
7
|
-
let pool, poolOffset;
|
|
8
|
-
function fillPool(bytes) {
|
|
9
|
-
if (!pool || pool.length < bytes) {
|
|
10
|
-
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
|
|
11
|
-
webcrypto.getRandomValues(pool);
|
|
12
|
-
poolOffset = 0;
|
|
13
|
-
} else if (poolOffset + bytes > pool.length) {
|
|
14
|
-
webcrypto.getRandomValues(pool);
|
|
15
|
-
poolOffset = 0;
|
|
16
|
-
}
|
|
17
|
-
poolOffset += bytes;
|
|
18
|
-
}
|
|
19
|
-
function nanoid(size = 21) {
|
|
20
|
-
fillPool((size |= 0));
|
|
21
|
-
let id = '';
|
|
22
|
-
for (let i = poolOffset - size; i < poolOffset; i++) {
|
|
23
|
-
id += urlAlphabet[pool[i] & 63];
|
|
24
|
-
}
|
|
25
|
-
return id
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { nanoid as n };
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { exec } from 'node:child_process';
|
|
2
|
-
import { existsSync } from 'node:fs';
|
|
3
|
-
import { readFile } from 'node:fs/promises';
|
|
4
|
-
import { homedir } from 'node:os';
|
|
5
|
-
import { promisify } from 'node:util';
|
|
6
|
-
import { i18n } from '../chunks/index2.mjs';
|
|
7
|
-
import { j as join } from './ccjk.bQ7Dh1g4.mjs';
|
|
8
|
-
|
|
9
|
-
const execAsync = promisify(exec);
|
|
10
|
-
function getClaudePluginDir() {
|
|
11
|
-
return join(homedir(), ".claude", "plugins");
|
|
12
|
-
}
|
|
13
|
-
function getSuperpowersPath() {
|
|
14
|
-
return join(getClaudePluginDir(), "superpowers");
|
|
15
|
-
}
|
|
16
|
-
async function checkSuperpowersInstalled() {
|
|
17
|
-
const superpowersPath = getSuperpowersPath();
|
|
18
|
-
if (!existsSync(superpowersPath)) {
|
|
19
|
-
return { installed: false };
|
|
20
|
-
}
|
|
21
|
-
try {
|
|
22
|
-
const packageJsonPath = join(superpowersPath, "package.json");
|
|
23
|
-
if (existsSync(packageJsonPath)) {
|
|
24
|
-
const packageJson = JSON.parse(await readFile(packageJsonPath, "utf-8"));
|
|
25
|
-
const skillsDir = join(superpowersPath, "skills");
|
|
26
|
-
let skillCount = 0;
|
|
27
|
-
if (existsSync(skillsDir)) {
|
|
28
|
-
const { readdir } = await import('node:fs/promises');
|
|
29
|
-
const entries = await readdir(skillsDir, { withFileTypes: true });
|
|
30
|
-
skillCount = entries.filter((e) => e.isDirectory()).length;
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
installed: true,
|
|
34
|
-
version: packageJson.version,
|
|
35
|
-
skillCount,
|
|
36
|
-
path: superpowersPath
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
return { installed: true, path: superpowersPath };
|
|
40
|
-
} catch {
|
|
41
|
-
return { installed: true, path: superpowersPath };
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
async function installSuperpowers(options) {
|
|
45
|
-
try {
|
|
46
|
-
const status = await checkSuperpowersInstalled();
|
|
47
|
-
if (status.installed) {
|
|
48
|
-
return {
|
|
49
|
-
success: true,
|
|
50
|
-
message: i18n.t("superpowers:alreadyInstalled")
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
const result = await installSuperpowersViaGit(options.skipPrompt);
|
|
54
|
-
if (result.success && options.enableCloudSync && options.cloudProvider && options.cloudCredentials) {
|
|
55
|
-
try {
|
|
56
|
-
const { configureCloudSync } = await import('../chunks/cloud-sync.mjs');
|
|
57
|
-
await configureCloudSync(options.cloudProvider, options.cloudCredentials);
|
|
58
|
-
if (!options.skipPrompt) {
|
|
59
|
-
console.log(i18n.t("superpowers:cloudSync.configured"));
|
|
60
|
-
}
|
|
61
|
-
} catch (error) {
|
|
62
|
-
if (!options.skipPrompt) {
|
|
63
|
-
console.warn(i18n.t("superpowers:cloudSync.configFailed"), error);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return result;
|
|
68
|
-
} catch (error) {
|
|
69
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
70
|
-
return {
|
|
71
|
-
success: false,
|
|
72
|
-
message: i18n.t("superpowers:installFailed"),
|
|
73
|
-
error: errorMessage
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
async function installSuperpowersViaGit(silent = false) {
|
|
78
|
-
try {
|
|
79
|
-
const pluginDir = getClaudePluginDir();
|
|
80
|
-
const superpowersPath = getSuperpowersPath();
|
|
81
|
-
const { mkdir } = await import('node:fs/promises');
|
|
82
|
-
await mkdir(pluginDir, { recursive: true });
|
|
83
|
-
if (!silent) {
|
|
84
|
-
console.log(i18n.t("superpowers:cloning"));
|
|
85
|
-
}
|
|
86
|
-
await execAsync(
|
|
87
|
-
`git clone https://github.com/obra/superpowers.git "${superpowersPath}"`,
|
|
88
|
-
{ timeout: 12e4 }
|
|
89
|
-
);
|
|
90
|
-
const status = await checkSuperpowersInstalled();
|
|
91
|
-
if (status.installed) {
|
|
92
|
-
return {
|
|
93
|
-
success: true,
|
|
94
|
-
message: i18n.t("superpowers:installSuccess")
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
return {
|
|
98
|
-
success: false,
|
|
99
|
-
message: i18n.t("superpowers:installFailed")
|
|
100
|
-
};
|
|
101
|
-
} catch (error) {
|
|
102
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
103
|
-
return {
|
|
104
|
-
success: false,
|
|
105
|
-
message: i18n.t("superpowers:installFailed"),
|
|
106
|
-
error: errorMessage
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
async function uninstallSuperpowers() {
|
|
111
|
-
try {
|
|
112
|
-
const status = await checkSuperpowersInstalled();
|
|
113
|
-
if (!status.installed) {
|
|
114
|
-
return {
|
|
115
|
-
success: true,
|
|
116
|
-
message: i18n.t("superpowers:notInstalled")
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
const superpowersPath = getSuperpowersPath();
|
|
120
|
-
if (existsSync(superpowersPath)) {
|
|
121
|
-
const { rm } = await import('node:fs/promises');
|
|
122
|
-
await rm(superpowersPath, { recursive: true, force: true });
|
|
123
|
-
}
|
|
124
|
-
const newStatus = await checkSuperpowersInstalled();
|
|
125
|
-
if (!newStatus.installed) {
|
|
126
|
-
return {
|
|
127
|
-
success: true,
|
|
128
|
-
message: i18n.t("superpowers:uninstallSuccess")
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
return {
|
|
132
|
-
success: false,
|
|
133
|
-
message: i18n.t("superpowers:uninstallFailed")
|
|
134
|
-
};
|
|
135
|
-
} catch (error) {
|
|
136
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
137
|
-
return {
|
|
138
|
-
success: false,
|
|
139
|
-
message: i18n.t("superpowers:uninstallFailed"),
|
|
140
|
-
error: errorMessage
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
async function updateSuperpowers() {
|
|
145
|
-
try {
|
|
146
|
-
const status = await checkSuperpowersInstalled();
|
|
147
|
-
if (!status.installed) {
|
|
148
|
-
return {
|
|
149
|
-
success: false,
|
|
150
|
-
message: i18n.t("superpowers:notInstalled")
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
const superpowersPath = getSuperpowersPath();
|
|
154
|
-
await execAsync("git pull", {
|
|
155
|
-
cwd: superpowersPath,
|
|
156
|
-
timeout: 6e4
|
|
157
|
-
});
|
|
158
|
-
return {
|
|
159
|
-
success: true,
|
|
160
|
-
message: i18n.t("superpowers:updateSuccess")
|
|
161
|
-
};
|
|
162
|
-
} catch (error) {
|
|
163
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
164
|
-
return {
|
|
165
|
-
success: false,
|
|
166
|
-
message: i18n.t("superpowers:updateFailed"),
|
|
167
|
-
error: errorMessage
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
async function getSuperpowersSkills() {
|
|
172
|
-
try {
|
|
173
|
-
const status = await checkSuperpowersInstalled();
|
|
174
|
-
if (!status.installed || !status.path) {
|
|
175
|
-
return [];
|
|
176
|
-
}
|
|
177
|
-
const skillsDir = join(status.path, "skills");
|
|
178
|
-
if (!existsSync(skillsDir)) {
|
|
179
|
-
return [];
|
|
180
|
-
}
|
|
181
|
-
const { readdir } = await import('node:fs/promises');
|
|
182
|
-
const entries = await readdir(skillsDir, { withFileTypes: true });
|
|
183
|
-
return entries.filter((e) => e.isDirectory()).map((e) => e.name);
|
|
184
|
-
} catch {
|
|
185
|
-
return [];
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export { uninstallSuperpowers as a, installSuperpowersViaGit as b, checkSuperpowersInstalled as c, getSuperpowersSkills as g, installSuperpowers as i, updateSuperpowers as u };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import process__default from 'node:process';
|
|
2
|
-
import a from '../chunks/index5.mjs';
|
|
3
|
-
import { ensureI18nInitialized, i18n } from '../chunks/index2.mjs';
|
|
4
|
-
|
|
5
|
-
function handleExitPromptError(error) {
|
|
6
|
-
const isExitError = error instanceof Error && (error.name === "ExitPromptError" || error.message?.includes("ExitPromptError") || error.message?.includes("User force closed the prompt"));
|
|
7
|
-
if (isExitError) {
|
|
8
|
-
ensureI18nInitialized();
|
|
9
|
-
console.log(a.green(`
|
|
10
|
-
${i18n.t("common:goodbye")}
|
|
11
|
-
`));
|
|
12
|
-
process__default.exit(0);
|
|
13
|
-
}
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
function handleGeneralError(error) {
|
|
17
|
-
ensureI18nInitialized();
|
|
18
|
-
console.error(a.red(`${i18n.t("errors:generalError")}:`), error);
|
|
19
|
-
if (error instanceof Error) {
|
|
20
|
-
console.error(a.gray(`${i18n.t("errors:stackTrace")}: ${error.stack}`));
|
|
21
|
-
}
|
|
22
|
-
process__default.exit(1);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { handleGeneralError as a, handleExitPromptError as h };
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import process__default from 'node:process';
|
|
2
|
-
import path__default from 'node:path';
|
|
3
|
-
import fs__default, { promises } from 'node:fs';
|
|
4
|
-
|
|
5
|
-
const resolvePath = (cwd, sourcePath, destinationPath) => {
|
|
6
|
-
sourcePath = path__default.resolve(cwd, sourcePath);
|
|
7
|
-
destinationPath = path__default.resolve(cwd, destinationPath);
|
|
8
|
-
|
|
9
|
-
return {
|
|
10
|
-
sourcePath,
|
|
11
|
-
destinationPath,
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const validatePathsExist = (sourcePath, destinationPath, suffix = 'Path') => {
|
|
16
|
-
if (!sourcePath || !destinationPath) {
|
|
17
|
-
throw new TypeError(`\`source${suffix}\` and \`destination${suffix}\` required`);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const validateSameDirectory = (source, destination) => {
|
|
22
|
-
if (path__default.dirname(source) !== path__default.dirname(destination)) {
|
|
23
|
-
throw new Error('`source` and `destination` must be in the same directory');
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const _moveFile = async (sourcePath, destinationPath, {overwrite = true, cwd = process__default.cwd(), directoryMode, validateDirectory = false} = {}) => {
|
|
28
|
-
if (cwd) {
|
|
29
|
-
({sourcePath, destinationPath} = resolvePath(cwd, sourcePath, destinationPath));
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (validateDirectory) {
|
|
33
|
-
validateSameDirectory(sourcePath, destinationPath);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (!overwrite && fs__default.existsSync(destinationPath)) {
|
|
37
|
-
throw new Error(`The destination file exists: ${destinationPath}`);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
await promises.mkdir(path__default.dirname(destinationPath), {
|
|
41
|
-
recursive: true,
|
|
42
|
-
mode: directoryMode,
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
try {
|
|
46
|
-
await promises.rename(sourcePath, destinationPath);
|
|
47
|
-
} catch (error) {
|
|
48
|
-
if (error.code === 'EXDEV') {
|
|
49
|
-
const stats = await promises.lstat(sourcePath);
|
|
50
|
-
if (stats.isSymbolicLink()) {
|
|
51
|
-
const target = await promises.readlink(sourcePath);
|
|
52
|
-
await promises.symlink(target, destinationPath);
|
|
53
|
-
await promises.unlink(sourcePath);
|
|
54
|
-
} else {
|
|
55
|
-
await promises.cp(sourcePath, destinationPath, {recursive: true, preserveTimestamps: true});
|
|
56
|
-
await promises.rm(sourcePath, {recursive: true});
|
|
57
|
-
}
|
|
58
|
-
} else {
|
|
59
|
-
throw error;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
async function moveFile(sourcePath, destinationPath, options) {
|
|
65
|
-
validatePathsExist(sourcePath, destinationPath);
|
|
66
|
-
return _moveFile(sourcePath, destinationPath, options);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export { moveFile as m };
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync, readdirSync, rmSync } from 'node:fs';
|
|
2
|
-
import { CCJK_CONFIG_DIR } from '../chunks/constants.mjs';
|
|
3
|
-
import { writeFileAtomic, ensureDir } from '../chunks/fs-operations.mjs';
|
|
4
|
-
import { j as join, b as basename } from './ccjk.bQ7Dh1g4.mjs';
|
|
5
|
-
|
|
6
|
-
const SNAPSHOTS_DIR = join(CCJK_CONFIG_DIR, "snapshots");
|
|
7
|
-
function getSnapshotsDir() {
|
|
8
|
-
return process.env.CCJK_SNAPSHOTS_DIR || SNAPSHOTS_DIR;
|
|
9
|
-
}
|
|
10
|
-
function safeTimestamp(date = /* @__PURE__ */ new Date()) {
|
|
11
|
-
return date.toISOString().replace(/[:.]/g, "-");
|
|
12
|
-
}
|
|
13
|
-
function safeFileName(path) {
|
|
14
|
-
return basename(path).replace(/[^\w.-]/g, "_") || "config";
|
|
15
|
-
}
|
|
16
|
-
function createConfigSnapshot(plan) {
|
|
17
|
-
const id = `${safeTimestamp()}-${plan.id.slice(0, 8)}`;
|
|
18
|
-
const snapshotDir = join(getSnapshotsDir(), id);
|
|
19
|
-
const filesDir = join(snapshotDir, "files");
|
|
20
|
-
ensureDir(filesDir);
|
|
21
|
-
const seen = /* @__PURE__ */ new Map();
|
|
22
|
-
const files = [];
|
|
23
|
-
for (const change of plan.changes) {
|
|
24
|
-
const beforeContent = change.beforeContent ?? "";
|
|
25
|
-
const count = seen.get(change.file) ?? 0;
|
|
26
|
-
seen.set(change.file, count + 1);
|
|
27
|
-
const backupName = `${String(count + 1).padStart(2, "0")}-${safeFileName(change.file)}`;
|
|
28
|
-
const backupPath = join("files", backupName);
|
|
29
|
-
writeFileAtomic(join(snapshotDir, backupPath), beforeContent);
|
|
30
|
-
files.push({
|
|
31
|
-
target: change.target,
|
|
32
|
-
sourcePath: change.file,
|
|
33
|
-
backupPath,
|
|
34
|
-
beforeHash: change.beforeHash,
|
|
35
|
-
afterHash: change.afterHash,
|
|
36
|
-
operation: change.operation,
|
|
37
|
-
reason: change.reason,
|
|
38
|
-
existed: change.beforeExists
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
const manifest = {
|
|
42
|
-
version: 1,
|
|
43
|
-
id,
|
|
44
|
-
planId: plan.id,
|
|
45
|
-
title: plan.title,
|
|
46
|
-
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
47
|
-
risk: plan.risk,
|
|
48
|
-
files
|
|
49
|
-
};
|
|
50
|
-
writeFileAtomic(join(snapshotDir, "manifest.json"), JSON.stringify(manifest, null, 2));
|
|
51
|
-
return {
|
|
52
|
-
id,
|
|
53
|
-
path: snapshotDir,
|
|
54
|
-
manifest
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
function listConfigSnapshots() {
|
|
58
|
-
const snapshotsDir = getSnapshotsDir();
|
|
59
|
-
if (!existsSync(snapshotsDir)) {
|
|
60
|
-
return [];
|
|
61
|
-
}
|
|
62
|
-
return readdirSync(snapshotsDir).map((entry) => {
|
|
63
|
-
const manifestPath = join(snapshotsDir, entry, "manifest.json");
|
|
64
|
-
try {
|
|
65
|
-
return JSON.parse(readFileSync(manifestPath, "utf-8"));
|
|
66
|
-
} catch {
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
}).filter((item) => Boolean(item)).sort((a, b) => b.createdAt.localeCompare(a.createdAt));
|
|
70
|
-
}
|
|
71
|
-
function readConfigSnapshot(id) {
|
|
72
|
-
const snapshotDir = join(getSnapshotsDir(), id);
|
|
73
|
-
const manifestPath = join(snapshotDir, "manifest.json");
|
|
74
|
-
if (!existsSync(manifestPath)) {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
try {
|
|
78
|
-
const manifest = JSON.parse(readFileSync(manifestPath, "utf-8"));
|
|
79
|
-
return {
|
|
80
|
-
id: manifest.id,
|
|
81
|
-
path: snapshotDir,
|
|
82
|
-
manifest
|
|
83
|
-
};
|
|
84
|
-
} catch {
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
function restoreConfigSnapshot(id) {
|
|
89
|
-
const snapshot = readConfigSnapshot(id);
|
|
90
|
-
if (!snapshot) {
|
|
91
|
-
throw new Error(`Snapshot not found: ${id}`);
|
|
92
|
-
}
|
|
93
|
-
const restored = [];
|
|
94
|
-
const skipped = [];
|
|
95
|
-
for (const file of snapshot.manifest.files) {
|
|
96
|
-
const backupPath = join(snapshot.path, file.backupPath);
|
|
97
|
-
if (!existsSync(backupPath)) {
|
|
98
|
-
skipped.push(file);
|
|
99
|
-
continue;
|
|
100
|
-
}
|
|
101
|
-
if (!file.existed) {
|
|
102
|
-
if (existsSync(file.sourcePath)) {
|
|
103
|
-
rmSync(file.sourcePath, { force: true });
|
|
104
|
-
}
|
|
105
|
-
restored.push(file);
|
|
106
|
-
continue;
|
|
107
|
-
}
|
|
108
|
-
const content = readFileSync(backupPath, "utf-8");
|
|
109
|
-
writeFileAtomic(file.sourcePath, content);
|
|
110
|
-
restored.push(file);
|
|
111
|
-
}
|
|
112
|
-
return { restored, skipped };
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export { restoreConfigSnapshot as a, createConfigSnapshot as c, listConfigSnapshots as l, readConfigSnapshot as r };
|