@dommaker/harness 4.0.1 → 5.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/README.md +7 -8
- package/dist/bootstrap/bootstrap.d.ts +15 -0
- package/dist/bootstrap/bootstrap.js +18 -1
- package/dist/bootstrap/index.d.ts +2 -2
- package/dist/bootstrap/index.js +3 -2
- package/dist/cli/commands/acceptance.d.ts +8 -0
- package/dist/cli/commands/acceptance.js +45 -24
- package/dist/cli/commands/check.d.ts +2 -0
- package/dist/cli/commands/check.js +36 -5
- package/dist/cli/commands/command.js +1 -1
- package/dist/cli/commands/definitions.js +4 -1
- package/dist/cli/commands/release.d.ts +11 -3
- package/dist/cli/commands/release.js +159 -52
- package/dist/cli/commands/report.d.ts +2 -0
- package/dist/cli/commands/report.js +54 -6
- package/dist/cli/commands/security.d.ts +3 -3
- package/dist/cli/commands/security.js +3 -2
- package/dist/cli/commands/sync-docs/capabilities-syncer.d.ts +3 -40
- package/dist/cli/commands/sync-docs/capabilities-syncer.js +5 -159
- package/dist/cli/commands/sync-docs/compact.js +2 -2
- package/dist/cli/commands/sync-docs/context-syncer.d.ts +4 -36
- package/dist/cli/commands/sync-docs/context-syncer.js +4 -221
- package/dist/cli/commands/sync-docs/index.d.ts +8 -8
- package/dist/cli/commands/sync-docs/index.js +8 -8
- package/dist/cli/commands/sync-docs/main-flow.d.ts +5 -4
- package/dist/cli/commands/sync-docs/main-flow.js +6 -5
- package/dist/cli/commands/sync-docs/sync-output.d.ts +1 -1
- package/dist/cli/commands/sync-docs/sync-output.js +4 -0
- package/dist/cli/commands/sync-docs/sync-writes.d.ts +1 -1
- package/dist/cli/commands/validate.d.ts +2 -0
- package/dist/cli/commands/validate.js +40 -1
- package/dist/core/command-execution-policy.d.ts +59 -0
- package/dist/core/command-execution-policy.js +167 -0
- package/dist/core/config-files.d.ts +8 -0
- package/dist/core/config-files.js +62 -0
- package/dist/core/constraints/capabilities-parser.d.ts +2 -1
- package/dist/core/constraints/capabilities-parser.js +2 -1
- package/dist/core/constraints/checker.d.ts +18 -6
- package/dist/core/constraints/checker.js +21 -11
- package/dist/core/constraints/checkers/no-hardcoded-credentials.js +14 -15
- package/dist/core/constraints/checkers/no-test-simplification.js +8 -6
- package/dist/core/constraints/checkers/templated/exec.d.ts +4 -0
- package/dist/core/constraints/checkers/templated/exec.js +11 -48
- package/dist/core/constraints/checkers/templated/file-exists.js +7 -4
- package/dist/core/constraints/checkers/templated/regex-scan.js +11 -15
- package/dist/core/constraints/checkers/types.d.ts +13 -2
- package/dist/core/constraints/checkers/types.js +5 -2
- package/dist/core/constraints/construction-sites.d.ts +1 -1
- package/dist/core/constraints/construction-sites.js +1 -1
- package/dist/core/constraints/definitions.d.ts +2 -2
- package/dist/core/constraints/definitions.js +2 -2
- package/dist/core/constraints/injection-writer.d.ts +1 -1
- package/dist/core/constraints/injection-writer.js +1 -1
- package/dist/core/constraints/project-snapshot.d.ts +43 -0
- package/dist/core/constraints/project-snapshot.js +103 -0
- package/dist/core/constraints/run-env.d.ts +35 -0
- package/dist/core/constraints/run-env.js +36 -0
- package/dist/{cli/commands/sync-docs → core/docs-sync}/agents-syncer.d.ts +2 -0
- package/dist/{cli/commands/sync-docs → core/docs-sync}/agents-syncer.js +5 -3
- package/dist/core/docs-sync/capabilities-table.d.ts +46 -0
- package/dist/core/docs-sync/capabilities-table.js +200 -0
- package/dist/core/docs-sync/context-collector.d.ts +40 -0
- package/dist/core/docs-sync/context-collector.js +227 -0
- package/dist/{cli/commands/sync-docs → core/docs-sync}/project-reader.d.ts +5 -1
- package/dist/{cli/commands/sync-docs → core/docs-sync}/project-reader.js +10 -6
- package/dist/{cli/commands/sync-docs → core/docs-sync}/sync-state.d.ts +15 -9
- package/dist/{cli/commands/sync-docs → core/docs-sync}/sync-state.js +26 -29
- package/dist/core/effective-constraints.d.ts +1 -1
- package/dist/core/effective-constraints.js +1 -1
- package/dist/core/validators/check-handlers/command.js +22 -0
- package/dist/core/validators/check-handlers/output.js +26 -3
- package/dist/core/validators/checkpoint.d.ts +4 -0
- package/dist/core/validators/checkpoint.js +10 -2
- package/dist/gates/acceptance.d.ts +8 -4
- package/dist/gates/acceptance.js +76 -14
- package/dist/gates/command.d.ts +3 -4
- package/dist/gates/command.js +2 -3
- package/dist/gates/contract.d.ts +3 -4
- package/dist/gates/contract.js +0 -1
- package/dist/gates/definitions.d.ts +2 -4
- package/dist/gates/definitions.js +2 -8
- package/dist/gates/performance.d.ts +10 -4
- package/dist/gates/performance.js +49 -5
- package/dist/gates/review.d.ts +3 -4
- package/dist/gates/review.js +0 -1
- package/dist/gates/security.d.ts +3 -4
- package/dist/gates/security.js +26 -19
- package/dist/gates/types.d.ts +46 -19
- package/dist/index.d.ts +5 -4
- package/dist/index.js +9 -6
- package/dist/knowledge/index.d.ts +1 -1
- package/dist/knowledge/index.js +1 -2
- package/dist/knowledge/ingest.d.ts +32 -17
- package/dist/knowledge/ingest.js +188 -90
- package/dist/knowledge/lifecycle.d.ts +15 -0
- package/dist/knowledge/lifecycle.js +62 -0
- package/dist/knowledge/query.d.ts +11 -1
- package/dist/knowledge/query.js +61 -9
- package/dist/knowledge/store.d.ts +56 -3
- package/dist/knowledge/store.js +108 -30
- package/dist/monitoring/index.d.ts +2 -1
- package/dist/monitoring/index.js +3 -1
- package/dist/monitoring/traces.d.ts +12 -0
- package/dist/monitoring/traces.js +26 -4
- package/dist/types/checkpoint.d.ts +28 -1
- package/dist/types/command-execution-policy.d.ts +73 -0
- package/dist/types/command-execution-policy.js +16 -0
- package/dist/types/constraint.d.ts +0 -12
- package/dist/utils/exec.d.ts +7 -1
- package/dist/utils/exec.js +7 -1
- package/package.json +1 -1
- package/dist/core/constraints/check-cache.d.ts +0 -43
- package/dist/core/constraints/check-cache.js +0 -77
- package/dist/core/constraints/checkers/templated/glob.d.ts +0 -8
- package/dist/core/constraints/checkers/templated/glob.js +0 -14
- /package/dist/{cli/commands/sync-docs → core/docs-sync}/preserve-block.d.ts +0 -0
- /package/dist/{cli/commands/sync-docs → core/docs-sync}/preserve-block.js +0 -0
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* - 指标采集失败归入 warnings 展示(采集口径语义,见 collectCoverage)
|
|
15
15
|
* - 返回详细的错误信息
|
|
16
16
|
*/
|
|
17
|
-
import type { GateResult,
|
|
17
|
+
import type { GateResult, PerformanceGateContext, PerformanceGateConfig, Gate, GateDecision } from './types';
|
|
18
18
|
/**
|
|
19
19
|
* 性能门禁配置
|
|
20
20
|
*/
|
|
@@ -27,23 +27,29 @@ export interface ExtendedPerformanceGateConfig extends PerformanceGateConfig {
|
|
|
27
27
|
*/
|
|
28
28
|
export declare class PerformanceGate implements Gate {
|
|
29
29
|
readonly id = "performance";
|
|
30
|
-
order: number;
|
|
31
30
|
private config;
|
|
32
31
|
constructor(config?: Partial<ExtendedPerformanceGateConfig>);
|
|
33
32
|
/**
|
|
34
33
|
* 统一门禁接口(G1):执行细节私有,决策三态由 check() 报告推导
|
|
35
34
|
*/
|
|
36
|
-
evaluate(context:
|
|
35
|
+
evaluate(context: PerformanceGateContext): Promise<GateDecision>;
|
|
37
36
|
/**
|
|
38
37
|
* 检查性能
|
|
39
38
|
*/
|
|
40
|
-
check(context:
|
|
39
|
+
check(context: PerformanceGateContext): Promise<GateResult>;
|
|
41
40
|
/**
|
|
42
41
|
* 收集性能指标
|
|
43
42
|
*/
|
|
44
43
|
private collectMetrics;
|
|
45
44
|
/**
|
|
46
45
|
* 收集测试覆盖率(带超时)
|
|
46
|
+
*
|
|
47
|
+
* 报告与本次运行的绑定(D4):运行前把既有 coverage-summary.json 挪作备份,
|
|
48
|
+
* 成功后只认「本次重新出现」的报告——首次生成、同内容重写、内容刷新都由
|
|
49
|
+
* 「重新出现」获得本次运行身份,不依赖内容比较(同内容新报告不会被误判)
|
|
50
|
+
* 也不依赖单次耗时断言。测试失败/超时/成功但未生成时恢复备份,既不读取
|
|
51
|
+
* 旧报告也不销毁用户既有文件;报告损坏/字段缺失照旧由 readCoverageSummaryPct
|
|
52
|
+
* 抛出,归既有 warnings 口径。
|
|
47
53
|
*/
|
|
48
54
|
private collectCoverage;
|
|
49
55
|
/**
|
|
@@ -72,7 +72,6 @@ function execErrorField(error, field) {
|
|
|
72
72
|
*/
|
|
73
73
|
class PerformanceGate {
|
|
74
74
|
id = 'performance';
|
|
75
|
-
order = 0;
|
|
76
75
|
config;
|
|
77
76
|
constructor(config = {}) {
|
|
78
77
|
this.config = {
|
|
@@ -161,21 +160,50 @@ class PerformanceGate {
|
|
|
161
160
|
}
|
|
162
161
|
/**
|
|
163
162
|
* 收集测试覆盖率(带超时)
|
|
163
|
+
*
|
|
164
|
+
* 报告与本次运行的绑定(D4):运行前把既有 coverage-summary.json 挪作备份,
|
|
165
|
+
* 成功后只认「本次重新出现」的报告——首次生成、同内容重写、内容刷新都由
|
|
166
|
+
* 「重新出现」获得本次运行身份,不依赖内容比较(同内容新报告不会被误判)
|
|
167
|
+
* 也不依赖单次耗时断言。测试失败/超时/成功但未生成时恢复备份,既不读取
|
|
168
|
+
* 旧报告也不销毁用户既有文件;报告损坏/字段缺失照旧由 readCoverageSummaryPct
|
|
169
|
+
* 抛出,归既有 warnings 口径。
|
|
164
170
|
*/
|
|
165
171
|
async collectCoverage(projectPath) {
|
|
172
|
+
const coveragePath = path.join(projectPath, 'coverage', 'coverage-summary.json');
|
|
173
|
+
const backupPath = coveragePath + '.harness-stale-backup';
|
|
174
|
+
let backedUp = false;
|
|
175
|
+
// 隔离旧报告:rename 与报告同目录(同文件系统,原子)。ENOENT = 首次生成场景
|
|
176
|
+
try {
|
|
177
|
+
await fs.rename(coveragePath, backupPath);
|
|
178
|
+
backedUp = true;
|
|
179
|
+
}
|
|
180
|
+
catch (error) {
|
|
181
|
+
if (execErrorField(error, 'code') !== 'ENOENT') {
|
|
182
|
+
return { error: `无法隔离既有覆盖率报告: ${(0, error_1.errorMessage)(error)}` };
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const restoreBackup = async () => {
|
|
186
|
+
if (!backedUp)
|
|
187
|
+
return;
|
|
188
|
+
try {
|
|
189
|
+
await fs.rename(backupPath, coveragePath);
|
|
190
|
+
}
|
|
191
|
+
catch {
|
|
192
|
+
// 恢复失败不遮蔽原始错误(原报告丢失仅为卫生问题,判定已按不可用处理)
|
|
193
|
+
}
|
|
194
|
+
};
|
|
166
195
|
try {
|
|
167
196
|
// 使用超时执行覆盖率测试
|
|
168
|
-
await (0, exec_1.execAsync)('npm test -- --coverage --coverageReporters=json-summary 2>/dev/null
|
|
197
|
+
await (0, exec_1.execAsync)('npm test -- --coverage --coverageReporters=json-summary 2>/dev/null', {
|
|
169
198
|
cwd: projectPath,
|
|
170
199
|
maxBuffer: 10 * 1024 * 1024,
|
|
171
200
|
timeout: this.config.coverageTimeout,
|
|
172
201
|
killSignal: 'SIGTERM',
|
|
173
202
|
});
|
|
174
|
-
// 读取覆盖率报告(取数正本:缺失/损坏/字段缺失抛出,由下方 catch 归 warnings 口径)
|
|
175
|
-
return { coverage: await (0, coverage_1.readCoverageSummaryPct)(projectPath) };
|
|
176
203
|
}
|
|
177
204
|
catch (error) {
|
|
178
|
-
//
|
|
205
|
+
// 非零/超时:不读取任何报告,恢复旧报告后按既有口径报错
|
|
206
|
+
await restoreBackup();
|
|
179
207
|
if (execErrorField(error, 'killed')) {
|
|
180
208
|
return { error: `覆盖率测试超时 (${this.config.coverageTimeout}ms)` };
|
|
181
209
|
}
|
|
@@ -184,6 +212,22 @@ class PerformanceGate {
|
|
|
184
212
|
}
|
|
185
213
|
return { error: (0, error_1.errorMessage)(error) };
|
|
186
214
|
}
|
|
215
|
+
try {
|
|
216
|
+
// 报告必须是本次执行重新产出(含同内容重写)的那份
|
|
217
|
+
const coverage = await (0, coverage_1.readCoverageSummaryPct)(projectPath);
|
|
218
|
+
if (backedUp) {
|
|
219
|
+
await fs.rm(backupPath, { force: true }); // 新报告已确立身份,旧报告完成使命
|
|
220
|
+
}
|
|
221
|
+
return { coverage };
|
|
222
|
+
}
|
|
223
|
+
catch (error) {
|
|
224
|
+
// 成功却未生成/损坏/字段缺失:不拿备份冒充,恢复后按既有口径报错
|
|
225
|
+
await restoreBackup();
|
|
226
|
+
if (execErrorField(error, 'code') === 'ENOENT') {
|
|
227
|
+
return { error: '未找到覆盖率报告文件' };
|
|
228
|
+
}
|
|
229
|
+
return { error: (0, error_1.errorMessage)(error) };
|
|
230
|
+
}
|
|
187
231
|
}
|
|
188
232
|
/**
|
|
189
233
|
* 收集打包大小
|
package/dist/gates/review.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - 是否有变更请求
|
|
7
7
|
* - 是否所有评论已解决
|
|
8
8
|
*/
|
|
9
|
-
import type { GateResult,
|
|
9
|
+
import type { GateResult, ReviewGateContext, ReviewGateConfig, Gate, GateDecision } from './types';
|
|
10
10
|
/**
|
|
11
11
|
* `gh pr view --json reviews,state` 的返回形状(只声明判定读取的字段)
|
|
12
12
|
*/
|
|
@@ -33,17 +33,16 @@ export declare function parsePrView(stdout: string): GhPrView;
|
|
|
33
33
|
*/
|
|
34
34
|
export declare class ReviewGate implements Gate {
|
|
35
35
|
readonly id = "review";
|
|
36
|
-
order: number;
|
|
37
36
|
private config;
|
|
38
37
|
constructor(config?: Partial<ReviewGateConfig>);
|
|
39
38
|
/**
|
|
40
39
|
* 统一门禁接口(G1):执行细节私有,决策三态由 check() 报告推导
|
|
41
40
|
*/
|
|
42
|
-
evaluate(context:
|
|
41
|
+
evaluate(context: ReviewGateContext): Promise<GateDecision>;
|
|
43
42
|
/**
|
|
44
43
|
* 检查审查状态(异常报告的单点包装:内层抛,这里统一 fromError)
|
|
45
44
|
*/
|
|
46
|
-
check(context:
|
|
45
|
+
check(context: ReviewGateContext): Promise<GateResult>;
|
|
47
46
|
/**
|
|
48
47
|
* 检查 GitHub PR 审查状态
|
|
49
48
|
*/
|
package/dist/gates/review.js
CHANGED
package/dist/gates/security.d.ts
CHANGED
|
@@ -9,23 +9,22 @@
|
|
|
9
9
|
* fail-fast:扫描输出必须是 npm audit 的 JSON;非 JSON 输出不再有
|
|
10
10
|
* 「正则抠数字」的文本兜底——解析失败直接抛出(外层归一为 deny 报告)。
|
|
11
11
|
*/
|
|
12
|
-
import type { GateResult,
|
|
12
|
+
import type { GateResult, SecurityGateContext, SecurityGateConfig, Gate, GateDecision } from './types';
|
|
13
13
|
/**
|
|
14
14
|
* 安全门禁
|
|
15
15
|
*/
|
|
16
16
|
export declare class SecurityGate implements Gate {
|
|
17
17
|
readonly id = "security";
|
|
18
|
-
order: number;
|
|
19
18
|
private config;
|
|
20
19
|
constructor(config?: Partial<SecurityGateConfig>);
|
|
21
20
|
/**
|
|
22
21
|
* 统一门禁接口(G1):执行细节私有,决策三态由 scan() 报告推导
|
|
23
22
|
*/
|
|
24
|
-
evaluate(context:
|
|
23
|
+
evaluate(context: SecurityGateContext): Promise<GateDecision>;
|
|
25
24
|
/**
|
|
26
25
|
* 扫描安全漏洞
|
|
27
26
|
*/
|
|
28
|
-
scan(context:
|
|
27
|
+
scan(context: SecurityGateContext): Promise<GateResult>;
|
|
29
28
|
/**
|
|
30
29
|
* 检测扫描命令
|
|
31
30
|
*/
|
package/dist/gates/security.js
CHANGED
|
@@ -16,6 +16,13 @@ const exec_1 = require("../utils/exec");
|
|
|
16
16
|
const guards_1 = require("../utils/guards");
|
|
17
17
|
const types_1 = require("./types");
|
|
18
18
|
const decision_1 = require("./decision");
|
|
19
|
+
/**
|
|
20
|
+
* 默认审计固定可信 registry(D4):npm 命令行 `--registry` 旗标优先于项目
|
|
21
|
+
* .npmrc 的 registry 配置,项目 npm 配置不能改变默认审计来源。
|
|
22
|
+
* 仅缺省探测路径(detectScanCommand 第三级)使用;显式可信输入
|
|
23
|
+
* (context.securityScanCommand / 构造器 scanCommand)原样下发,不追加。
|
|
24
|
+
*/
|
|
25
|
+
const TRUSTED_NPM_REGISTRY = 'https://registry.npmjs.org/';
|
|
19
26
|
/** via 的首个来源标题(字符串直取,对象取 title) */
|
|
20
27
|
function viaTitle(via) {
|
|
21
28
|
const first = via?.[0];
|
|
@@ -28,7 +35,6 @@ function viaTitle(via) {
|
|
|
28
35
|
*/
|
|
29
36
|
class SecurityGate {
|
|
30
37
|
id = 'security';
|
|
31
|
-
order = 0;
|
|
32
38
|
config;
|
|
33
39
|
constructor(config = {}) {
|
|
34
40
|
this.config = {
|
|
@@ -82,8 +88,8 @@ class SecurityGate {
|
|
|
82
88
|
* 检测扫描命令
|
|
83
89
|
*/
|
|
84
90
|
detectScanCommand(_projectPath) {
|
|
85
|
-
// 默认使用 npm audit
|
|
86
|
-
return
|
|
91
|
+
// 默认使用 npm audit,固定可信 registry(D4,见 TRUSTED_NPM_REGISTRY)
|
|
92
|
+
return `npm audit --json --registry ${TRUSTED_NPM_REGISTRY}`;
|
|
87
93
|
}
|
|
88
94
|
/**
|
|
89
95
|
* 运行扫描
|
|
@@ -135,23 +141,24 @@ class SecurityGate {
|
|
|
135
141
|
if (!(0, guards_1.isRecord)(raw)) {
|
|
136
142
|
throw new Error('安全扫描输出不是 JSON 对象');
|
|
137
143
|
}
|
|
138
|
-
if ((0, guards_1.isRecord)(raw.vulnerabilities)) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
const severity = vuln.severity?.toLowerCase() ?? 'low';
|
|
148
|
-
count(severity);
|
|
149
|
-
vulnerabilities.push({
|
|
150
|
-
name,
|
|
151
|
-
severity,
|
|
152
|
-
via: viaTitle(vuln.via) ?? vuln.name ?? 'Unknown',
|
|
153
|
-
});
|
|
144
|
+
if (!(0, guards_1.isRecord)(raw.vulnerabilities)) {
|
|
145
|
+
throw new Error('安全扫描输出缺少有效的 vulnerabilities 对象');
|
|
146
|
+
}
|
|
147
|
+
for (const [name, entry] of Object.entries(raw.vulnerabilities)) {
|
|
148
|
+
// 畸形条目(非对象)跳过并计数——不伪装成空漏洞对象(原 `as NpmVulnerability`
|
|
149
|
+
// 会把字符串/数组条目当成 {severity: undefined} 的低危漏洞计入 total)
|
|
150
|
+
if (!(0, guards_1.isRecord)(entry)) {
|
|
151
|
+
skippedMalformed++;
|
|
152
|
+
continue;
|
|
154
153
|
}
|
|
154
|
+
const vuln = entry;
|
|
155
|
+
const severity = vuln.severity?.toLowerCase() ?? 'low';
|
|
156
|
+
count(severity);
|
|
157
|
+
vulnerabilities.push({
|
|
158
|
+
name,
|
|
159
|
+
severity,
|
|
160
|
+
via: viaTitle(vuln.via) ?? vuln.name ?? 'Unknown',
|
|
161
|
+
});
|
|
155
162
|
}
|
|
156
163
|
return {
|
|
157
164
|
critical,
|
package/dist/gates/types.d.ts
CHANGED
|
@@ -28,39 +28,70 @@ export declare function fromError(gate: string, label: string, error: unknown, s
|
|
|
28
28
|
/**
|
|
29
29
|
* 统一门禁接口(G1)
|
|
30
30
|
*
|
|
31
|
-
* 统一的是决策协议(id /
|
|
31
|
+
* 统一的是决策协议(id / evaluate → 三态决策),
|
|
32
32
|
* 各门禁执行细节(gh pr view / 正则黑名单 / OpenAPI diff / benchmark…)私有。
|
|
33
|
+
*
|
|
34
|
+
* 注意:各实现 evaluate 收窄使用专属输入类型(`ReviewGateContext` 等),
|
|
35
|
+
* 而当前没有经本接口多态调 evaluate 的生产消费者。TS 方法参数双变意味着
|
|
36
|
+
* 若未来新增这种调用,基础 `GateContext` 不会替你校验专属必填字段
|
|
37
|
+
* (如 `CommandGateContext.command`)——届时须先收紧接口形状/调用契约。
|
|
33
38
|
*/
|
|
34
39
|
export interface Gate {
|
|
35
40
|
/** 门禁 id(与 gates/definitions.ts 定义一致,注册表闭环校验) */
|
|
36
41
|
readonly id: string;
|
|
37
|
-
/** 声明式顺序(以 gates/definitions.ts 定义表为准,config.yml 无覆盖口——gates.order 生效集已删,ADR-0002「后续变更」),小者先执行 */
|
|
38
|
-
order: number;
|
|
39
42
|
/** 决策协议:返回三态 GateDecision */
|
|
40
43
|
evaluate(ctx: GateContext): Promise<GateDecision> | GateDecision;
|
|
41
44
|
}
|
|
42
45
|
/**
|
|
43
|
-
*
|
|
46
|
+
* 门禁上下文:只带全部门禁真正共享的运行信息(在哪跑 / 跑什么 / 本 run 观察面)
|
|
44
47
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
48
|
+
* P1.4 收窄:各门禁专属输入字段(prNumber / securityScanCommand /
|
|
49
|
+
* performanceThresholds / oldContractPath / newContractPath / command /
|
|
50
|
+
* tasksPath)已迁到各门禁自己的输入类型(`ReviewGateContext` 等),
|
|
51
|
+
* 不再混进共享上下文。配置一律走构造器(`ReviewGateConfig` 等),
|
|
52
|
+
* 不要往这里加字段——本类型曾有 6 个无人读取的配置型字段与构造器
|
|
53
|
+
* 配置平行,填了不生效。
|
|
47
54
|
*/
|
|
48
55
|
export interface GateContext {
|
|
49
56
|
projectPath: string;
|
|
50
57
|
taskId?: string;
|
|
51
|
-
prNumber?: number;
|
|
52
|
-
securityScanCommand?: string;
|
|
53
|
-
performanceThresholds?: PerformanceThresholds;
|
|
54
|
-
oldContractPath?: string;
|
|
55
|
-
newContractPath?: string;
|
|
56
|
-
command?: string;
|
|
57
|
-
tasksPath?: string;
|
|
58
58
|
/**
|
|
59
59
|
* 本 run 的运行级观察面(ADR-0023)。一条守卫链传同一枚 → 项目配置文件整链至多读一次;
|
|
60
60
|
* 不传 = 各门禁自造一枚一次性观察面(判定不变,只是不共享读取)
|
|
61
61
|
*/
|
|
62
62
|
runEnv?: RunEnv;
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* 审查门禁输入:PR 号存在时走 GitHub API,否则落本地 git 检查
|
|
66
|
+
*/
|
|
67
|
+
export interface ReviewGateContext extends GateContext {
|
|
68
|
+
prNumber?: number;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* 安全门禁输入:本次扫描命令覆盖(优先级高于构造器 `scanCommand`,见 SecurityGate.scan)
|
|
72
|
+
*/
|
|
73
|
+
export interface SecurityGateContext extends GateContext {
|
|
74
|
+
securityScanCommand?: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* 性能门禁输入:本次阈值覆盖(优先级高于构造器 `thresholds`,见 PerformanceGate.check)
|
|
78
|
+
*/
|
|
79
|
+
export interface PerformanceGateContext extends GateContext {
|
|
80
|
+
performanceThresholds?: PerformanceThresholds;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* 契约门禁输入:新旧契约路径覆盖(缺省按构造器 `contractPath` 锚 projectPath)
|
|
84
|
+
*/
|
|
85
|
+
export interface ContractGateContext extends GateContext {
|
|
86
|
+
oldContractPath?: string;
|
|
87
|
+
newContractPath?: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* 命令门禁输入:待检命令(必填——evaluate 的判定对象就是它)
|
|
91
|
+
*/
|
|
92
|
+
export interface CommandGateContext extends GateContext {
|
|
93
|
+
command: string;
|
|
94
|
+
}
|
|
64
95
|
/**
|
|
65
96
|
* 审查门禁配置
|
|
66
97
|
*/
|
|
@@ -109,13 +140,9 @@ export interface SpecAcceptanceGateConfig {
|
|
|
109
140
|
projectPath?: string;
|
|
110
141
|
}
|
|
111
142
|
/**
|
|
112
|
-
*
|
|
143
|
+
* 验收标准门禁输入
|
|
113
144
|
*/
|
|
114
|
-
export interface AcceptanceGateContext {
|
|
115
|
-
/** 项目路径 */
|
|
116
|
-
projectPath: string;
|
|
117
|
-
/** 任务 ID */
|
|
118
|
-
taskId?: string;
|
|
145
|
+
export interface AcceptanceGateContext extends GateContext {
|
|
119
146
|
/** tasks.yml 路径;相对值按 projectPath 解析 */
|
|
120
147
|
tasksPath?: string;
|
|
121
148
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 通用工程约束框架
|
|
5
5
|
*
|
|
6
6
|
* 约束体系(ADR-0029 severity 显式模型):
|
|
7
|
-
* -
|
|
7
|
+
* - 约束按 channel 分发:gate 通道执行检查(error 阻断 / warning 告警)
|
|
8
8
|
* - 纯文本提示层已整体关停(ADR-0029)
|
|
9
9
|
*
|
|
10
10
|
* 门禁系统:
|
|
@@ -22,6 +22,7 @@ export { ConstraintViolationError, } from './types/constraint';
|
|
|
22
22
|
export type { Constraint, ConstraintId, ConstraintChannel, ConstraintSeverity, ConstraintTrigger, ConstraintContext, ConstraintResult, ConstraintCheckResult, } from './types/constraint';
|
|
23
23
|
export { CONSTRAINTS, getAllConstraints, getConstraint, } from './core/constraints/definitions';
|
|
24
24
|
export { getEffectiveConstraints, } from './core/effective-constraints';
|
|
25
|
+
export { HARNESS_CONFIG_FILES, propagateConfig, } from './core/config-files';
|
|
25
26
|
export { listRetiredConstraints, } from './core/retired-constraints';
|
|
26
27
|
export type { RetiredConstraintEntry, RetiredConstraintMeta, } from './core/retired-constraints';
|
|
27
28
|
export { retireConstraint, reactivateConstraint, disableConstraint, } from './core/constraint-lifecycle';
|
|
@@ -43,14 +44,14 @@ export type { PassesGateConfig, PassesGateCheckResult, PassesGateViolation, Test
|
|
|
43
44
|
export type { StepMeta, ToolMeta, WorkflowMeta, } from './types/cso';
|
|
44
45
|
export { DEFAULT_TRACE_FILE, } from './types/trace';
|
|
45
46
|
export type { ExecutionTrace, TraceFilter, TraceSummary, TraceAnomaly, TraceCollectorConfig, TraceAnalyzerConfig, } from './types/trace';
|
|
46
|
-
export { TraceCollector, TraceAnalyzer, } from './monitoring';
|
|
47
|
+
export { TraceCollector, TraceAnalyzer, pruneTraceLogs, } from './monitoring';
|
|
47
48
|
export { ErrorType, FailureLevel, DEFAULT_FAILURE_LOG_FILE, DEFAULT_CLASSIFICATION_RULES, DEFAULT_LEVEL_MAPPING, ErrorClassifier, FailureRecorder, } from './failure';
|
|
48
49
|
export type { FailureRecord, ErrorClassificationRule, ClassificationResult, ErrorClassifierConfig, FailureRecorderConfig, } from './failure';
|
|
49
50
|
export { SessionManager, } from './context';
|
|
50
51
|
export type { SessionCheckpoint, SessionEvent, SessionEventType, SessionHandle, } from './context';
|
|
51
|
-
export { FileKnowledgeStore, KnowledgeQuery, KnowledgeLifecycle, KnowledgeIngest,
|
|
52
|
+
export { FileKnowledgeStore, KnowledgeQuery, KnowledgeLifecycle, KnowledgeIngest, ColdStartImporter, KnowledgeAudit, DEFAULT_DECAY_CONFIG, estimateTokens, } from './knowledge';
|
|
52
53
|
/**
|
|
53
|
-
* 外部来源条目的 prompt 标记标准(harness#161
|
|
54
|
+
* 外部来源条目的 prompt 标记标准(harness#161 retrieval marking 的唯一正本,
|
|
54
55
|
* 定义在 `knowledge/query.ts`)。知识注入编排已归下游编排消费方(定位文档裁决),
|
|
55
56
|
* 本标记作为标准/家具保留公开导出:消费方自行格式化注入内容时以此常量对齐标记,
|
|
56
57
|
* 不得另存字面量。
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* 通用工程约束框架
|
|
6
6
|
*
|
|
7
7
|
* 约束体系(ADR-0029 severity 显式模型):
|
|
8
|
-
* -
|
|
8
|
+
* - 约束按 channel 分发:gate 通道执行检查(error 阻断 / warning 告警)
|
|
9
9
|
* - 纯文本提示层已整体关停(ADR-0029)
|
|
10
10
|
*
|
|
11
11
|
* 门禁系统:
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
* (ConstraintChecker / ProjectConfigLoader)不进公共清单。
|
|
21
21
|
*/
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.
|
|
24
|
-
exports.AgentLifecycle = exports.bootstrapHarnessSync = exports.bootstrapHarness = exports.verifyReleaseArtifacts = exports.getCriticalArtifacts = exports.verifyContractPresence = exports.PHASE_SUBJECT_RE = exports.verifyPhaseFormat = exports.TESTS_NONE_RE = exports.TESTED_BY_RE = void 0;
|
|
23
|
+
exports.EXTERNAL_SOURCE_MARKER = exports.estimateTokens = exports.DEFAULT_DECAY_CONFIG = exports.KnowledgeAudit = exports.ColdStartImporter = exports.KnowledgeIngest = exports.KnowledgeLifecycle = exports.KnowledgeQuery = exports.FileKnowledgeStore = exports.SessionManager = exports.FailureRecorder = exports.ErrorClassifier = exports.DEFAULT_LEVEL_MAPPING = exports.DEFAULT_CLASSIFICATION_RULES = exports.DEFAULT_FAILURE_LOG_FILE = exports.FailureLevel = exports.ErrorType = exports.pruneTraceLogs = exports.TraceAnalyzer = exports.TraceCollector = exports.DEFAULT_TRACE_FILE = exports.CSOValidator = exports.PassesGate = exports.CheckpointValidator = exports.formatEvidence = exports.normalizeCheckOutcome = exports.buildCheckEnv = exports.collectConstraints = exports.checkConstraints = exports.checkConstraint = exports.DEFAULT_DIAGNOSE_THRESHOLDS = exports.CANDIDATE_KIND_LABEL = exports.readProjectTracesReport = exports.collectUsageByConstraint = exports.buildConstraintsUsageReport = exports.getConstraintsMeta = exports.renderProposalMarkdown = exports.collectProposalMaterial = exports.packProposal = exports.disableConstraint = exports.reactivateConstraint = exports.retireConstraint = exports.listRetiredConstraints = exports.propagateConfig = exports.HARNESS_CONFIG_FILES = exports.getEffectiveConstraints = exports.getConstraint = exports.getAllConstraints = exports.CONSTRAINTS = exports.ConstraintViolationError = void 0;
|
|
24
|
+
exports.AgentLifecycle = exports.bootstrapHarnessSync = exports.bootstrapHarness = exports.verifyReleaseArtifacts = exports.getCriticalArtifacts = exports.verifyContractPresence = exports.PHASE_SUBJECT_RE = exports.verifyPhaseFormat = exports.TESTS_NONE_RE = exports.TESTED_BY_RE = exports.verifyTddChain = exports.classifyCommitFiles = void 0;
|
|
25
25
|
// ========================================
|
|
26
26
|
// 约束类型(severity 显式模型)
|
|
27
27
|
// ========================================
|
|
@@ -36,6 +36,9 @@ Object.defineProperty(exports, "getAllConstraints", { enumerable: true, get: fun
|
|
|
36
36
|
Object.defineProperty(exports, "getConstraint", { enumerable: true, get: function () { return definitions_1.getConstraint; } });
|
|
37
37
|
var effective_constraints_1 = require("./core/effective-constraints");
|
|
38
38
|
Object.defineProperty(exports, "getEffectiveConstraints", { enumerable: true, get: function () { return effective_constraints_1.getEffectiveConstraints; } });
|
|
39
|
+
var config_files_1 = require("./core/config-files");
|
|
40
|
+
Object.defineProperty(exports, "HARNESS_CONFIG_FILES", { enumerable: true, get: function () { return config_files_1.HARNESS_CONFIG_FILES; } });
|
|
41
|
+
Object.defineProperty(exports, "propagateConfig", { enumerable: true, get: function () { return config_files_1.propagateConfig; } });
|
|
39
42
|
var retired_constraints_1 = require("./core/retired-constraints");
|
|
40
43
|
Object.defineProperty(exports, "listRetiredConstraints", { enumerable: true, get: function () { return retired_constraints_1.listRetiredConstraints; } });
|
|
41
44
|
// ========================================
|
|
@@ -85,13 +88,14 @@ Object.defineProperty(exports, "CheckpointValidator", { enumerable: true, get: f
|
|
|
85
88
|
Object.defineProperty(exports, "PassesGate", { enumerable: true, get: function () { return validators_1.PassesGate; } });
|
|
86
89
|
Object.defineProperty(exports, "CSOValidator", { enumerable: true, get: function () { return validators_1.CSOValidator; } });
|
|
87
90
|
// ========================================
|
|
88
|
-
// 监控(Execution Trace
|
|
91
|
+
// 监控(Execution Trace 收集/分析/轮转备份清理)
|
|
89
92
|
// ========================================
|
|
90
93
|
var trace_1 = require("./types/trace");
|
|
91
94
|
Object.defineProperty(exports, "DEFAULT_TRACE_FILE", { enumerable: true, get: function () { return trace_1.DEFAULT_TRACE_FILE; } });
|
|
92
95
|
var monitoring_1 = require("./monitoring");
|
|
93
96
|
Object.defineProperty(exports, "TraceCollector", { enumerable: true, get: function () { return monitoring_1.TraceCollector; } });
|
|
94
97
|
Object.defineProperty(exports, "TraceAnalyzer", { enumerable: true, get: function () { return monitoring_1.TraceAnalyzer; } });
|
|
98
|
+
Object.defineProperty(exports, "pruneTraceLogs", { enumerable: true, get: function () { return monitoring_1.pruneTraceLogs; } });
|
|
95
99
|
// ========================================
|
|
96
100
|
// 失败处理(错误分类 + 记录 + 违规处理策略)
|
|
97
101
|
// ========================================
|
|
@@ -116,13 +120,12 @@ Object.defineProperty(exports, "FileKnowledgeStore", { enumerable: true, get: fu
|
|
|
116
120
|
Object.defineProperty(exports, "KnowledgeQuery", { enumerable: true, get: function () { return knowledge_1.KnowledgeQuery; } });
|
|
117
121
|
Object.defineProperty(exports, "KnowledgeLifecycle", { enumerable: true, get: function () { return knowledge_1.KnowledgeLifecycle; } });
|
|
118
122
|
Object.defineProperty(exports, "KnowledgeIngest", { enumerable: true, get: function () { return knowledge_1.KnowledgeIngest; } });
|
|
119
|
-
Object.defineProperty(exports, "sanitizeExternalContent", { enumerable: true, get: function () { return knowledge_1.sanitizeExternalContent; } });
|
|
120
123
|
Object.defineProperty(exports, "ColdStartImporter", { enumerable: true, get: function () { return knowledge_1.ColdStartImporter; } });
|
|
121
124
|
Object.defineProperty(exports, "KnowledgeAudit", { enumerable: true, get: function () { return knowledge_1.KnowledgeAudit; } });
|
|
122
125
|
Object.defineProperty(exports, "DEFAULT_DECAY_CONFIG", { enumerable: true, get: function () { return knowledge_1.DEFAULT_DECAY_CONFIG; } });
|
|
123
126
|
Object.defineProperty(exports, "estimateTokens", { enumerable: true, get: function () { return knowledge_1.estimateTokens; } });
|
|
124
127
|
/**
|
|
125
|
-
* 外部来源条目的 prompt 标记标准(harness#161
|
|
128
|
+
* 外部来源条目的 prompt 标记标准(harness#161 retrieval marking 的唯一正本,
|
|
126
129
|
* 定义在 `knowledge/query.ts`)。知识注入编排已归下游编排消费方(定位文档裁决),
|
|
127
130
|
* 本标记作为标准/家具保留公开导出:消费方自行格式化注入内容时以此常量对齐标记,
|
|
128
131
|
* 不得另存字面量。
|
|
@@ -11,7 +11,7 @@ export { KnowledgeQuery, EXTERNAL_SOURCE_MARKER } from './query';
|
|
|
11
11
|
export { estimateTokens } from './token-estimate';
|
|
12
12
|
export { KnowledgeLifecycle } from './lifecycle';
|
|
13
13
|
export type { ConsumptionEvent } from './lifecycle';
|
|
14
|
-
export { KnowledgeIngest
|
|
14
|
+
export { KnowledgeIngest } from './ingest';
|
|
15
15
|
export type { IngestValidationIssue } from './ingest';
|
|
16
16
|
export { ColdStartImporter } from './cold-start';
|
|
17
17
|
export { KnowledgeAudit } from './audit';
|
package/dist/knowledge/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Re-exports all knowledge module components.
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.KnowledgeAudit = exports.ColdStartImporter = exports.
|
|
8
|
+
exports.KnowledgeAudit = exports.ColdStartImporter = exports.KnowledgeIngest = exports.KnowledgeLifecycle = exports.estimateTokens = exports.EXTERNAL_SOURCE_MARKER = exports.KnowledgeQuery = exports.FileKnowledgeStore = exports.DEFAULT_DECAY_CONFIG = void 0;
|
|
9
9
|
var types_1 = require("./types");
|
|
10
10
|
Object.defineProperty(exports, "DEFAULT_DECAY_CONFIG", { enumerable: true, get: function () { return types_1.DEFAULT_DECAY_CONFIG; } });
|
|
11
11
|
var store_1 = require("./store");
|
|
@@ -19,7 +19,6 @@ var lifecycle_1 = require("./lifecycle");
|
|
|
19
19
|
Object.defineProperty(exports, "KnowledgeLifecycle", { enumerable: true, get: function () { return lifecycle_1.KnowledgeLifecycle; } });
|
|
20
20
|
var ingest_1 = require("./ingest");
|
|
21
21
|
Object.defineProperty(exports, "KnowledgeIngest", { enumerable: true, get: function () { return ingest_1.KnowledgeIngest; } });
|
|
22
|
-
Object.defineProperty(exports, "sanitizeExternalContent", { enumerable: true, get: function () { return ingest_1.sanitizeExternalContent; } });
|
|
23
22
|
var cold_start_1 = require("./cold-start");
|
|
24
23
|
Object.defineProperty(exports, "ColdStartImporter", { enumerable: true, get: function () { return cold_start_1.ColdStartImporter; } });
|
|
25
24
|
var audit_1 = require("./audit");
|
|
@@ -16,7 +16,7 @@ export interface IngestValidationIssue {
|
|
|
16
16
|
suggestion: string;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* `ingestEntry` / `ingestBatch`
|
|
19
|
+
* `ingestEntry` / `ingestBatch` 的返回(判别联合):
|
|
20
20
|
* - `accepted`:已落盘(新建或去重合并),`entry` 为最终形态
|
|
21
21
|
* - `rejected`:审计质量门拒收、未落盘,`reasons` 为逐条拒绝理由
|
|
22
22
|
*
|
|
@@ -31,13 +31,6 @@ export type IngestResult = {
|
|
|
31
31
|
entry: KnowledgeEntry;
|
|
32
32
|
reasons: string[];
|
|
33
33
|
};
|
|
34
|
-
/**
|
|
35
|
-
* Sanitize external content for safe ingest.
|
|
36
|
-
* - Strips known prompt injection patterns
|
|
37
|
-
* - Limits content length
|
|
38
|
-
* - Returns sanitized string
|
|
39
|
-
*/
|
|
40
|
-
export declare function sanitizeExternalContent(content: string): string;
|
|
41
34
|
export declare class KnowledgeIngest {
|
|
42
35
|
private store;
|
|
43
36
|
constructor(store: KnowledgeStore);
|
|
@@ -50,17 +43,16 @@ export declare class KnowledgeIngest {
|
|
|
50
43
|
/**
|
|
51
44
|
* Ingest multiple entries in batch.
|
|
52
45
|
* Returns one result per input (accepted/rejected).
|
|
46
|
+
*
|
|
47
|
+
* D7:批内共享一次磁盘去重视图与虚拟 index 起点(IngestContext,惰性各读一次),
|
|
48
|
+
* 本批已接受的新建/merge 即时纳入视图,保留批内重复语义;逐条 ingestEntry 行为不变。
|
|
49
|
+
*
|
|
50
|
+
* 统一落盘:新建与 merge 的完整终态(含 auto-fix 折好)收入写计划,
|
|
51
|
+
* 批尾一次 saveAll——全批只重写一次 index.json,整批预校验
|
|
52
|
+
* (任一脏枚举全批拒写,不制造已落盘假象);批内同 id 按 saveAll 后写覆盖语义。
|
|
53
|
+
* 空批零读写。单条路径(ingestEntry)写时序不变。
|
|
53
54
|
*/
|
|
54
55
|
ingestBatch(partials: Partial<KnowledgeEntry>[], options: IngestOptions): IngestResult[];
|
|
55
|
-
/**
|
|
56
|
-
* Ingest external content with sanitization.
|
|
57
|
-
* - Sanitizes content (strips injection patterns, limits length)
|
|
58
|
-
* - Forces origin: 'external'
|
|
59
|
-
* - Uses consumptionMode from options (default: 'reference')
|
|
60
|
-
*/
|
|
61
|
-
ingestExternal(partial: Partial<KnowledgeEntry>, options: Omit<IngestOptions, 'origin'> & {
|
|
62
|
-
fullContentPath?: string;
|
|
63
|
-
}): IngestResult;
|
|
64
56
|
/**
|
|
65
57
|
* 摄入前单条校验(KnowledgeLinter.validateEntry 的保种落点,ADR-0040 Phase 4;
|
|
66
58
|
* 原 lint.ts 随 audit 正本收口删除)。返回空数组 = 可摄入。
|
|
@@ -81,6 +73,24 @@ export declare class KnowledgeIngest {
|
|
|
81
73
|
maturity?: string;
|
|
82
74
|
layer?: string;
|
|
83
75
|
}): IngestValidationIssue[];
|
|
76
|
+
/**
|
|
77
|
+
* 单条的批内共用执行体(D7):build → audit.validate → reject 或
|
|
78
|
+
* 视图去重 → merge / 新建 + auto-fix。ingestEntry 每调新建上下文(= 原单条行为);
|
|
79
|
+
* ingestBatch 全批共享一个上下文。
|
|
80
|
+
*
|
|
81
|
+
* `plan` 存在 = 批次写计划模式:新建与 merge 的完整终态收进 plan(不逐条落盘,
|
|
82
|
+
* 由批尾一次 saveAll 统一写入);缺省 = 单条即时写路径(save + 逐 fix update),
|
|
83
|
+
* 写时序与旧实现逐字一致。返回值契约两种模式相同(新建返回 pre-fix entry,
|
|
84
|
+
* merge 返回合并终态)。
|
|
85
|
+
*/
|
|
86
|
+
private ingestOne;
|
|
87
|
+
/**
|
|
88
|
+
* auto-fix 折叠(纯,D7 批次模式用):archive/demote/flag 依 issues 顺序折进条目副本,
|
|
89
|
+
* 与单条路径逐步 update 的终态一致。merge 分支不调用(既有语义)。
|
|
90
|
+
*/
|
|
91
|
+
private foldAutoFixes;
|
|
92
|
+
/** 单条即时写路径的 auto-fix:逐步 store.update(写时序与旧实现一致),返回折好终态供 overlay */
|
|
93
|
+
private persistAutoFixes;
|
|
84
94
|
private buildEntry;
|
|
85
95
|
private generateId;
|
|
86
96
|
private findDuplicate;
|
|
@@ -95,6 +105,11 @@ export declare class KnowledgeIngest {
|
|
|
95
105
|
private getContentPrefix;
|
|
96
106
|
/** Calculate keyword overlap ratio between two normalized titles */
|
|
97
107
|
private titleOverlap;
|
|
108
|
+
/**
|
|
109
|
+
* 合并终态(纯,D7 两种写模式共用):merge 字段口径与来源上限(MAX_SOURCE_REFS)
|
|
110
|
+
* 只此一份。merge 分支不做新条目 auto-fix(既有语义)。
|
|
111
|
+
*/
|
|
112
|
+
private computeMerge;
|
|
98
113
|
private mergeEntries;
|
|
99
114
|
private defaultSourceRef;
|
|
100
115
|
}
|