scene-capability-engine 3.6.57 → 3.6.59
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/CHANGELOG.md +18 -0
- package/README.md +5 -3
- package/README.zh.md +5 -3
- package/bin/scene-capability-engine.js +2 -0
- package/docs/command-reference.md +72 -0
- package/docs/magicball-adaptation-task-checklist-v1.md +65 -10
- package/docs/magicball-cli-invocation-examples.md +53 -8
- package/docs/magicball-engineering-projection-contract.md +175 -0
- package/docs/magicball-frontend-state-and-command-mapping.md +42 -5
- package/docs/magicball-integration-doc-index.md +19 -5
- package/docs/magicball-integration-issue-tracker.md +15 -5
- package/docs/magicball-mode-home-and-ontology-empty-state-playbook.md +13 -5
- package/docs/magicball-project-portfolio-contract.md +216 -0
- package/docs/magicball-sce-adaptation-guide.md +18 -4
- package/docs/magicball-ui-surface-checklist.md +25 -0
- package/docs/magicball-write-auth-adaptation-guide.md +3 -1
- package/docs/release-checklist.md +8 -0
- package/docs/releases/README.md +2 -0
- package/docs/releases/v3.6.58.md +27 -0
- package/docs/releases/v3.6.59.md +18 -0
- package/docs/zh/release-checklist.md +8 -0
- package/docs/zh/releases/README.md +2 -0
- package/docs/zh/releases/v3.6.58.md +27 -0
- package/docs/zh/releases/v3.6.59.md +18 -0
- package/lib/app/engineering-scaffold-service.js +154 -0
- package/lib/commands/app.js +442 -13
- package/lib/commands/project.js +105 -0
- package/lib/commands/scene.js +16 -0
- package/lib/project/portfolio-projection-service.js +389 -0
- package/lib/project/supervision-projection-service.js +329 -0
- package/lib/project/target-resolution-service.js +180 -0
- package/lib/scene/delivery-projection-service.js +650 -0
- package/package.json +6 -2
- package/scripts/magicball-engineering-contract-audit.js +347 -0
- package/scripts/magicball-project-contract-audit.js +254 -0
- package/template/.sce/README.md +2 -2
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# v3.6.58 发布说明
|
|
2
|
+
|
|
3
|
+
发布日期:2026-03-19
|
|
4
|
+
|
|
5
|
+
## 重点变化
|
|
6
|
+
|
|
7
|
+
- 增加了面向 MagicBall 的规范化交付与工程投影契约,包括 `sce scene delivery show` 以及 `app engineering preview|ownership|open|import|scaffold` 这一组命令。
|
|
8
|
+
- 增加了 phase-1 多项目只读契约:`sce project portfolio show`、`sce project target resolve`、`sce project supervision show`。
|
|
9
|
+
- 同步更新了 MagicBall 集成文档、CLI 示例、前端状态映射、检查清单、问题跟踪、README 和发版检查清单,明确这些 project/engineering 能力已经是稳定集成输入。
|
|
10
|
+
- 增加了发布期的 MagicBall project-contract 审计,使发布流程同时检查 engineering 与 multi-project 契约漂移。
|
|
11
|
+
|
|
12
|
+
## 验证
|
|
13
|
+
|
|
14
|
+
- `npx jest tests/unit/commands/app-mode.test.js --runInBand`
|
|
15
|
+
- `npx jest tests/unit/commands/scene-delivery.test.js --runInBand`
|
|
16
|
+
- `npx jest tests/unit/commands/project.test.js --runInBand`
|
|
17
|
+
- `npx jest tests/integration/project-cli.integration.test.js --runInBand`
|
|
18
|
+
- `npx jest tests/unit/scripts/magicball-engineering-contract-audit.test.js --runInBand`
|
|
19
|
+
- `npx jest tests/unit/scripts/magicball-project-contract-audit.test.js --runInBand`
|
|
20
|
+
- `npm run audit:magicball-project-contract`
|
|
21
|
+
- `npm run audit:magicball-engineering-contract`
|
|
22
|
+
- `npm run test:release`
|
|
23
|
+
- `node scripts/release-doc-version-audit.js --fail-on-error`
|
|
24
|
+
|
|
25
|
+
## 发布说明
|
|
26
|
+
|
|
27
|
+
- 这个补丁版把最近的 MagicBall/IDE 投影工作真正固化成了正式发布线,而不是停留在本地补丁栈。工程侧现在通过一组明确文档化的契约暴露了交付投影,以及保守的工程 readiness、ownership、open/import、scaffold 包络;多项目侧则新增了由引擎负责的项目组合视图、目标项目预解析能力和按项目聚焦的监督快照,适配层不再需要自行从本地 workspace 状态拼装所谓“项目真相”。配套的 MagicBall 文档与发布审计也一起更新,后续无论是 npm 安装新版还是本机切换版本,都不会静默丢失这组集成能力。
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# v3.6.59 发布说明
|
|
2
|
+
|
|
3
|
+
发布日期:2026-03-19
|
|
4
|
+
|
|
5
|
+
## 重点变化
|
|
6
|
+
|
|
7
|
+
- 发布了一个仅用于对齐的补丁版,使 npm 包、仓库 tag 与发布分支都指向同一份最终仓库状态。
|
|
8
|
+
- MagicBall 的 delivery、engineering 与 multi-project 契约能力与 `v3.6.58` 保持完全一致,没有新增运行时能力变化。
|
|
9
|
+
|
|
10
|
+
## 验证
|
|
11
|
+
|
|
12
|
+
- `npm run audit:release-docs`
|
|
13
|
+
- `node scripts/git-managed-gate.js --fail-on-violation --json`
|
|
14
|
+
- 通过 `prepublishOnly` 执行 `npm publish --access public`
|
|
15
|
+
|
|
16
|
+
## 发布说明
|
|
17
|
+
|
|
18
|
+
- 这个补丁版不引入新的运行时行为,也不改变适配层合同。它的目的只是消除发版状态歧义:在共享项目问题投影快照于发版后写回仓库后,再给出一个严格对齐 npm/tag/仓库状态的正式版本。如果你要求 npm、tag、GitHub 发布线完全一致,应以后续的 `v3.6.59` 作为标准版本。
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const fs = require('fs-extra');
|
|
3
|
+
|
|
4
|
+
const DEFAULT_ENGINEERING_SCAFFOLD_ENTRIES = Object.freeze([
|
|
5
|
+
'README.md',
|
|
6
|
+
'config',
|
|
7
|
+
'steering',
|
|
8
|
+
'knowledge',
|
|
9
|
+
'specs'
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
function normalizeString(value) {
|
|
13
|
+
if (typeof value !== 'string') {
|
|
14
|
+
return '';
|
|
15
|
+
}
|
|
16
|
+
return value.trim();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function normalizeOverwritePolicy(value) {
|
|
20
|
+
const candidate = normalizeString(value).toLowerCase();
|
|
21
|
+
if (!candidate) {
|
|
22
|
+
return 'missing-only';
|
|
23
|
+
}
|
|
24
|
+
if (['never', 'missing-only', 'explicit'].includes(candidate)) {
|
|
25
|
+
return candidate;
|
|
26
|
+
}
|
|
27
|
+
throw new Error(`invalid overwrite policy: ${value}`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async function pathExists(fileSystem, targetPath) {
|
|
31
|
+
try {
|
|
32
|
+
return await fileSystem.pathExists(targetPath);
|
|
33
|
+
} catch (error) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async function copyEntryRecursive(sourcePath, targetPath, state, options) {
|
|
39
|
+
const { fileSystem, overwritePolicy } = options;
|
|
40
|
+
const sourceStat = await fileSystem.stat(sourcePath);
|
|
41
|
+
|
|
42
|
+
if (sourceStat.isDirectory()) {
|
|
43
|
+
const exists = await pathExists(fileSystem, targetPath);
|
|
44
|
+
if (exists) {
|
|
45
|
+
state.skippedDirectoryCount += 1;
|
|
46
|
+
if (overwritePolicy === 'never') {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
} else {
|
|
50
|
+
await fileSystem.ensureDir(targetPath);
|
|
51
|
+
state.createdDirectoryCount += 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const entries = (await fileSystem.readdir(sourcePath)).sort();
|
|
55
|
+
for (const entry of entries) {
|
|
56
|
+
await copyEntryRecursive(
|
|
57
|
+
path.join(sourcePath, entry),
|
|
58
|
+
path.join(targetPath, entry),
|
|
59
|
+
state,
|
|
60
|
+
options
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const exists = await pathExists(fileSystem, targetPath);
|
|
67
|
+
if (exists) {
|
|
68
|
+
if (overwritePolicy === 'explicit') {
|
|
69
|
+
await fileSystem.ensureDir(path.dirname(targetPath));
|
|
70
|
+
await fileSystem.copy(sourcePath, targetPath, {
|
|
71
|
+
overwrite: true,
|
|
72
|
+
errorOnExist: false
|
|
73
|
+
});
|
|
74
|
+
state.createdFileCount += 1;
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
state.skippedFileCount += 1;
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
await fileSystem.ensureDir(path.dirname(targetPath));
|
|
82
|
+
await fileSystem.copy(sourcePath, targetPath, {
|
|
83
|
+
overwrite: false,
|
|
84
|
+
errorOnExist: true
|
|
85
|
+
});
|
|
86
|
+
state.createdFileCount += 1;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
async function scaffoldEngineeringWorkspace(options = {}) {
|
|
90
|
+
const workspacePath = normalizeString(options.workspacePath);
|
|
91
|
+
if (!workspacePath) {
|
|
92
|
+
throw new Error('workspacePath is required');
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const fileSystem = options.fileSystem || fs;
|
|
96
|
+
const templateRoot = options.templateRoot
|
|
97
|
+
? path.resolve(options.templateRoot)
|
|
98
|
+
: path.resolve(__dirname, '../../template/.sce');
|
|
99
|
+
const overwritePolicy = normalizeOverwritePolicy(options.overwritePolicy);
|
|
100
|
+
const scaffoldEntries = Array.isArray(options.entries) && options.entries.length > 0
|
|
101
|
+
? options.entries
|
|
102
|
+
: DEFAULT_ENGINEERING_SCAFFOLD_ENTRIES;
|
|
103
|
+
const result = {
|
|
104
|
+
workspacePath,
|
|
105
|
+
createdDirectoryCount: 0,
|
|
106
|
+
skippedDirectoryCount: 0,
|
|
107
|
+
failedDirectoryCount: 0,
|
|
108
|
+
createdFileCount: 0,
|
|
109
|
+
skippedFileCount: 0,
|
|
110
|
+
failedFileCount: 0,
|
|
111
|
+
overwritePolicy
|
|
112
|
+
};
|
|
113
|
+
const scaffoldRoot = path.join(workspacePath, '.sce');
|
|
114
|
+
const scaffoldRootExists = await pathExists(fileSystem, scaffoldRoot);
|
|
115
|
+
|
|
116
|
+
if (scaffoldRootExists) {
|
|
117
|
+
result.skippedDirectoryCount += 1;
|
|
118
|
+
if (overwritePolicy === 'never') {
|
|
119
|
+
return result;
|
|
120
|
+
}
|
|
121
|
+
} else {
|
|
122
|
+
await fileSystem.ensureDir(scaffoldRoot);
|
|
123
|
+
result.createdDirectoryCount += 1;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
for (const entry of scaffoldEntries) {
|
|
127
|
+
const sourcePath = path.join(templateRoot, entry);
|
|
128
|
+
const targetPath = path.join(scaffoldRoot, entry);
|
|
129
|
+
if (!await pathExists(fileSystem, sourcePath)) {
|
|
130
|
+
throw new Error(`engineering scaffold template entry is missing: ${entry}`);
|
|
131
|
+
}
|
|
132
|
+
try {
|
|
133
|
+
await copyEntryRecursive(sourcePath, targetPath, result, {
|
|
134
|
+
fileSystem,
|
|
135
|
+
overwritePolicy
|
|
136
|
+
});
|
|
137
|
+
} catch (error) {
|
|
138
|
+
const targetExists = await pathExists(fileSystem, targetPath);
|
|
139
|
+
if (targetExists) {
|
|
140
|
+
result.failedFileCount += 1;
|
|
141
|
+
} else {
|
|
142
|
+
result.failedDirectoryCount += 1;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return result;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
module.exports = {
|
|
151
|
+
DEFAULT_ENGINEERING_SCAFFOLD_ENTRIES,
|
|
152
|
+
normalizeOverwritePolicy,
|
|
153
|
+
scaffoldEngineeringWorkspace
|
|
154
|
+
};
|