@jspg-ai/coding-bb 0.0.3-beta.1 → 0.0.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cbb/lib/install/init.js +13 -7
- package/package.json +1 -1
package/cbb/lib/install/init.js
CHANGED
|
@@ -72,9 +72,13 @@ const SUPERPOWERS_WHITELIST = [
|
|
|
72
72
|
// (单层安装:业务空间根是唯一安装点,worktree 管理入口 init 同样部署在根)
|
|
73
73
|
const WORKTREE_SKILLS = ['cbb-worktree-init', 'cbb-worktree-close', 'cbb-worktree-push'];
|
|
74
74
|
|
|
75
|
-
// 装到空间的 tools skills
|
|
76
|
-
// cbb-wiki-ops
|
|
77
|
-
const TOOLS_SKILLS = [
|
|
75
|
+
// 装到空间的 tools skills:当前不分发。
|
|
76
|
+
// cbb-design-to-wiki(Wiki 发布)与 cbb-wiki-ops 保留在源仓库,需要时加入本清单即恢复分发;Java 工具不装。
|
|
77
|
+
const TOOLS_SKILLS = [];
|
|
78
|
+
|
|
79
|
+
// 不随安装分发的官方 OpenSpec 命令(源仓库保留,仍由 CLI 接管升级):
|
|
80
|
+
// onboard 为新手引导教程,团队入门已由文档覆盖;sync 是 archive 流程承重件,保留分发。
|
|
81
|
+
const OPENSPEC_COMMANDS_EXCLUDE = ['onboard.md'];
|
|
78
82
|
|
|
79
83
|
// settings.json hook 工具
|
|
80
84
|
const settingsManager = require('../utils/settings');
|
|
@@ -899,7 +903,7 @@ async function init(targetDir, options = {}) {
|
|
|
899
903
|
osCount = osExtResult.count;
|
|
900
904
|
osExtResult.names.forEach(name => newPaths.add(`${adapter.skillsDir}/${name}`));
|
|
901
905
|
}
|
|
902
|
-
// 工具 Skills
|
|
906
|
+
// 工具 Skills:当前不分发(恢复方式见 TOOLS_SKILLS 注释)
|
|
903
907
|
const extResult = deploySkills(adapter, isUpgrade, managedPaths, extendsSkillsSrc, TOOLS_SKILLS);
|
|
904
908
|
if (extResult.count > 0) {
|
|
905
909
|
extCount = extResult.count;
|
|
@@ -931,13 +935,15 @@ async function init(targetDir, options = {}) {
|
|
|
931
935
|
await detectUserLevelSuperpowers(selectedAdapters, yes);
|
|
932
936
|
}
|
|
933
937
|
|
|
934
|
-
// 安装 Commands(官方
|
|
938
|
+
// 安装 Commands(官方 11 个 → /opsx:*,onboard 不分发;worktree 管理 → /cbb:worktree-*,init/close/push 三件套)
|
|
935
939
|
const commandsAdapters = selectedAdapters.filter(a => a.commandsDir);
|
|
936
940
|
if (commandsAdapters.length > 0) {
|
|
937
941
|
console.log(`\n ⚡ ${action} Commands...`);
|
|
938
942
|
const commandsBaseSrc = path.join(SHARED_STANDARDS_DIR, 'openspec', 'commands');
|
|
939
943
|
const commandsExtendsSrc = path.join(SHARED_STANDARDS_DIR, 'cbb', 'worktrees', 'commands');
|
|
940
944
|
const cmdFilter = ['worktree-init.md', 'worktree-close.md', 'worktree-push.md'];
|
|
945
|
+
const openspecCmdInclude = fs.readdirSync(commandsBaseSrc)
|
|
946
|
+
.filter(f => f.endsWith('.md') && !OPENSPEC_COMMANDS_EXCLUDE.includes(f));
|
|
941
947
|
|
|
942
948
|
const cmdDests = [...new Set(commandsAdapters
|
|
943
949
|
.flatMap(a => [a.commandsDir, a.worktreeCommandsDir])
|
|
@@ -945,8 +951,8 @@ async function init(targetDir, options = {}) {
|
|
|
945
951
|
let cmdCount = 0;
|
|
946
952
|
commandsAdapters.forEach(adapter => {
|
|
947
953
|
let adapterCmdCount = 0;
|
|
948
|
-
// 官方 Commands(openspec/commands/)—
|
|
949
|
-
const baseResult = deployCommands(adapter, isUpgrade, managedPaths, commandsBaseSrc);
|
|
954
|
+
// 官方 Commands(openspec/commands/)— 部署除不分发清单外的全部
|
|
955
|
+
const baseResult = deployCommands(adapter, isUpgrade, managedPaths, commandsBaseSrc, openspecCmdInclude);
|
|
950
956
|
if (baseResult.count > 0) {
|
|
951
957
|
adapterCmdCount += baseResult.count;
|
|
952
958
|
baseResult.names.forEach(name => newPaths.add(`${adapter.commandsDir}/${name}`));
|