bpmax-cli 0.2.1-beta.86 → 0.2.1-beta.87
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/dist/bin.js +212 -13
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -540,7 +540,7 @@ function pluginAgentCapabilityForRequest(method, normalizedPath) {
|
|
|
540
540
|
// package.json
|
|
541
541
|
var package_default = {
|
|
542
542
|
name: "bpmax-cli",
|
|
543
|
-
version: "0.2.1-beta.
|
|
543
|
+
version: "0.2.1-beta.87",
|
|
544
544
|
description: "CLI for BPMAX environments with multi-profile config and local login callback flow",
|
|
545
545
|
type: "module",
|
|
546
546
|
bin: {
|
|
@@ -5143,6 +5143,51 @@ function matchesBoundary(path29, declared) {
|
|
|
5143
5143
|
}
|
|
5144
5144
|
return path29 === normalized || path29.startsWith(`${normalized}/`);
|
|
5145
5145
|
}
|
|
5146
|
+
var LIST_TEMPLATE_PRESENTATION_PATH = /\/(?:props\/)?(?:width|minWidth|align|headerAlign|showOverflowTooltip|fixed|sortable|className)$/;
|
|
5147
|
+
function isPresentationOnlyChange(changedPaths) {
|
|
5148
|
+
return changedPaths.length > 0 && changedPaths.every((path29) => LIST_TEMPLATE_PRESENTATION_PATH.test(path29));
|
|
5149
|
+
}
|
|
5150
|
+
function isPresentationOnlyListTemplateChange(changedPaths) {
|
|
5151
|
+
return isPresentationOnlyChange([...changedPaths]);
|
|
5152
|
+
}
|
|
5153
|
+
function validateListTemplateColumnWidthEvidence(value, context2) {
|
|
5154
|
+
if (!isRecord5(value)) {
|
|
5155
|
+
throw new Error("[list_template_column_width_report_invalid] Column-width report must be a JSON object.");
|
|
5156
|
+
}
|
|
5157
|
+
if (value.schema_version !== 1 || value.result !== "pass") {
|
|
5158
|
+
throw new Error('[list_template_column_width_report_invalid] Column-width report must use schema_version=1 and result="pass".');
|
|
5159
|
+
}
|
|
5160
|
+
if (value.template_id !== context2.templateId || value.profile !== context2.profile) {
|
|
5161
|
+
throw new Error("[list_template_column_width_report_mismatch] Column-width report is not bound to this template and profile.");
|
|
5162
|
+
}
|
|
5163
|
+
if (value.submit_payload_hash !== context2.payloadHash) {
|
|
5164
|
+
throw new Error("[list_template_column_width_report_mismatch] Column-width report is not bound to this submit payload.");
|
|
5165
|
+
}
|
|
5166
|
+
const columns = Array.isArray(value.columns) ? value.columns.filter(isRecord5) : [];
|
|
5167
|
+
if (!columns.length) {
|
|
5168
|
+
throw new Error("[list_template_column_width_report_invalid] Column-width report must record at least one measured column.");
|
|
5169
|
+
}
|
|
5170
|
+
const unmeasured = columns.filter((column) => typeof column.truncated !== "boolean");
|
|
5171
|
+
if (unmeasured.length) {
|
|
5172
|
+
throw new Error(
|
|
5173
|
+
`[list_template_column_width_report_invalid] Every measured column must record truncated: true|false; missing for ${unmeasured.map((column) => String(column.title ?? column.prop ?? "<unknown>")).join(", ")}.`
|
|
5174
|
+
);
|
|
5175
|
+
}
|
|
5176
|
+
const truncated = columns.filter((column) => column.truncated === true);
|
|
5177
|
+
if (truncated.length) {
|
|
5178
|
+
throw new Error(
|
|
5179
|
+
`[list_template_column_width_report_truncated] Rendered columns still truncate their content: ${truncated.map((column) => String(column.title ?? column.prop ?? "<unknown>")).join(", ")}. Increase the width instead of overriding the gate.`
|
|
5180
|
+
);
|
|
5181
|
+
}
|
|
5182
|
+
return {
|
|
5183
|
+
schema_version: 1,
|
|
5184
|
+
kind: "list_template_column_width_evidence",
|
|
5185
|
+
template_id: context2.templateId,
|
|
5186
|
+
profile: context2.profile,
|
|
5187
|
+
submit_payload_hash: context2.payloadHash,
|
|
5188
|
+
measured_columns: columns.length
|
|
5189
|
+
};
|
|
5190
|
+
}
|
|
5146
5191
|
function analyzeListTemplatePermissionBoundary(raw, work, manifest) {
|
|
5147
5192
|
const changedPaths = changedJsonPaths(raw, work);
|
|
5148
5193
|
const permissionRelated = changedPaths.some((path29) => containsPermissionIdentifier(path29) || containsPermissionIdentifier(changedTextFragment(
|
|
@@ -5180,6 +5225,7 @@ function analyzeListTemplatePermissionBoundary(raw, work, manifest) {
|
|
|
5180
5225
|
boundary: {
|
|
5181
5226
|
schema_version: 1,
|
|
5182
5227
|
change_type: "list-template-permission",
|
|
5228
|
+
presentation_only: isPresentationOnlyChange(changedPaths),
|
|
5183
5229
|
allowed_paths: allowedPaths,
|
|
5184
5230
|
allowed_functions: allowedFunctions,
|
|
5185
5231
|
forbidden_paths: forbiddenPaths,
|
|
@@ -9949,7 +9995,40 @@ function hasListTemplateOverflowDisclosure(column) {
|
|
|
9949
9995
|
visit(column.createElement);
|
|
9950
9996
|
return disclosed;
|
|
9951
9997
|
}
|
|
9952
|
-
|
|
9998
|
+
var LIST_TEMPLATE_CONTENT_MIN_WIDTH = [
|
|
9999
|
+
// `编码`/`code` only when the column is a document number, not every "code" word:
|
|
10000
|
+
// 门店编码 is an identifier list column and does need room, so include it, but
|
|
10001
|
+
// keep the width below a full date-stamped serial number.
|
|
10002
|
+
{ kind: "document_no", pattern: /(单号|单据号|流水号|订单号|合同号|批次号)/i, minWidth: 180, why: "\u5355\u53F7\u7C7B\u5185\u5BB9\u542B\u65E5\u671F\u6BB5\u6216\u524D\u7F00\uFF0C\u901A\u5E38\u9700\u8981 180px \u4EE5\u4E0A" },
|
|
10003
|
+
{ kind: "identifier", pattern: /(编码|编号|\bno\b|\bsn\b|\bcode\b|\bid\b)/i, minWidth: 130, why: "\u7F16\u7801/\u7F16\u53F7\u7C7B\u5185\u5BB9\u901A\u5E38\u9700\u8981 130px \u4EE5\u4E0A" },
|
|
10004
|
+
{ kind: "date", pattern: /(日期|时间|截止|\bdate\b|\btime\b|_at\b)/i, minWidth: 130, why: "\u65E5\u671F\u5E38\u5E26\u56FE\u6807\u4E0E\u65F6:\u5206\uFF0C\u901A\u5E38\u9700\u8981 130px \u4EE5\u4E0A" },
|
|
10005
|
+
{ kind: "people", pattern: /(负责人|处理人|申请人|创建人|审批人|经办人|owner|assignee|creator|approver|manager)/i, minWidth: 130, why: "\u4EBA\u5458\u5217\u542B\u5934\u50CF\u6216\u201C\u59D3\u540D | \u7EC4\u7EC7\u201D\uFF0C\u901A\u5E38\u9700\u8981 130px \u4EE5\u4E0A" },
|
|
10006
|
+
// Only multi-value shapes are listed: a plain 状态 column renders one short enum
|
|
10007
|
+
// and is usually fine at 110px, so it must not be pulled into this rule.
|
|
10008
|
+
{ kind: "multi_value", pattern: /(包件|范围|标签|多选|\btags?\b|\bscope\b)/i, minWidth: 180, why: "\u591A\u503C\u62FC\u63A5\u5217\u4F1A\u968F\u53D6\u503C\u6570\u91CF\u53D8\u957F\uFF0C\u901A\u5E38\u9700\u8981 180px \u4EE5\u4E0A" }
|
|
10009
|
+
];
|
|
10010
|
+
function listTemplateContentMinWidth(column) {
|
|
10011
|
+
const title = typeof column.title === "string" ? column.title : "";
|
|
10012
|
+
const key = typeof column.key === "string" ? column.key : typeof column.prop === "string" ? column.prop : "";
|
|
10013
|
+
const renderer = textOf2(column.createElement);
|
|
10014
|
+
const probe = `${title} ${key} ${renderer}`;
|
|
10015
|
+
const match = LIST_TEMPLATE_CONTENT_MIN_WIDTH.find((entry) => entry.pattern.test(probe));
|
|
10016
|
+
if (match) {
|
|
10017
|
+
if (/\.join\s*\(|\{\{\s*[^}]*\}\}\s*[,,]/.test(renderer)) {
|
|
10018
|
+
return { minWidth: Math.max(match.minWidth, 180), why: "\u5355\u5143\u683C\u62FC\u63A5\u4E86\u591A\u4E2A\u503C\uFF0C\u5BBD\u5EA6\u4F1A\u968F\u53D6\u503C\u6570\u91CF\u589E\u957F" };
|
|
10019
|
+
}
|
|
10020
|
+
return { minWidth: match.minWidth, why: match.why };
|
|
10021
|
+
}
|
|
10022
|
+
if (/el-avatar/.test(renderer)) {
|
|
10023
|
+
return { minWidth: 130, why: "\u5355\u5143\u683C\u542B\u5934\u50CF\uFF0C\u9700\u8981\u4E3A\u5934\u50CF\u548C\u59D3\u540D\u7559\u51FA 130px \u4EE5\u4E0A" };
|
|
10024
|
+
}
|
|
10025
|
+
return void 0;
|
|
10026
|
+
}
|
|
10027
|
+
function listTemplateUsesFixedWidthOnly(column) {
|
|
10028
|
+
const props = isRecord6(column.props) ? column.props : {};
|
|
10029
|
+
return props.width !== void 0 && props.width !== null && props.width !== "";
|
|
10030
|
+
}
|
|
10031
|
+
function validateListTemplateColumnWidths(columns, errors, warnings = []) {
|
|
9953
10032
|
const recordColumns = columns.filter(isRecord6);
|
|
9954
10033
|
const dataColumns = recordColumns.filter((column) => !isListTemplateUtilityColumn(column));
|
|
9955
10034
|
if (dataColumns.length === 0) {
|
|
@@ -9957,6 +10036,7 @@ function validateListTemplateColumnWidths(columns, errors) {
|
|
|
9957
10036
|
return;
|
|
9958
10037
|
}
|
|
9959
10038
|
let adaptiveColumnCount = 0;
|
|
10039
|
+
const pinnedToTitleFloor = [];
|
|
9960
10040
|
recordColumns.forEach((column, index) => {
|
|
9961
10041
|
const props = isRecord6(column.props) ? column.props : {};
|
|
9962
10042
|
const label = listTemplateColumnLabel(column, index);
|
|
@@ -9983,6 +10063,17 @@ function validateListTemplateColumnWidths(columns, errors) {
|
|
|
9983
10063
|
const requiredWidth = estimatedListTemplateTitleWidth(title);
|
|
9984
10064
|
if (effectiveReadableWidth < requiredWidth) {
|
|
9985
10065
|
errors.push(`\u5217\u8868\u6A21\u677F\u5217\u201C${label}\u201D\u5BBD\u5EA6\u8FC7\u5C0F\uFF0C\u6807\u9898\u5B8C\u6574\u5C55\u793A\u81F3\u5C11\u9700\u8981\u7EA6 ${requiredWidth}px\u3002`);
|
|
10066
|
+
} else if (Math.abs(effectiveReadableWidth - requiredWidth) <= 2) {
|
|
10067
|
+
pinnedToTitleFloor.push(label);
|
|
10068
|
+
}
|
|
10069
|
+
}
|
|
10070
|
+
if (isDataColumn && effectiveReadableWidth !== void 0) {
|
|
10071
|
+
const content = listTemplateContentMinWidth(column);
|
|
10072
|
+
if (content && effectiveReadableWidth < content.minWidth) {
|
|
10073
|
+
const hint = listTemplateUsesFixedWidthOnly(column) ? `\uFF1B\u56FA\u5B9A\u5BBD\u5EA6\u5217\u53EF\u6309\u6B64\u4E0B\u9650\u914D\u7F6E\uFF0C\u6216\u6539\u7528 minWidth \u8BA9\u5185\u5BB9\u53C2\u4E0E\u6491\u5F00` : "";
|
|
10074
|
+
warnings.push(
|
|
10075
|
+
`\u5217\u8868\u6A21\u677F\u5217\u201C${label}\u201D\u5F53\u524D\u7EA6 ${effectiveReadableWidth}px\uFF0C\u6309\u5217\u8BED\u4E49\uFF08${content.why}\uFF09\u5185\u5BB9\u53EF\u80FD\u88AB\u622A\u65AD\uFF0C\u5EFA\u8BAE\u81F3\u5C11 ${content.minWidth}px${hint}\u3002\u8FD9\u662F\u6309\u5B57\u6BB5\u8BED\u4E49\u7684\u4F30\u7B97\uFF0C\u8BF7\u4EE5\u771F\u5B9E\u9875\u9762\u6BCF\u5217 scrollWidth == clientWidth \u4E3A\u51C6\u3002`
|
|
10076
|
+
);
|
|
9986
10077
|
}
|
|
9987
10078
|
}
|
|
9988
10079
|
if (isDataColumn && hasWidth && isListTemplateLongTextColumn(column) && !hasListTemplateOverflowDisclosure(column)) {
|
|
@@ -9992,6 +10083,11 @@ function validateListTemplateColumnWidths(columns, errors) {
|
|
|
9992
10083
|
if (adaptiveColumnCount === 0) {
|
|
9993
10084
|
errors.push("\u5217\u8868\u6A21\u677F\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u81EA\u9002\u5E94\u6570\u636E\u5217\uFF1B\u8BF7\u5728\u4E00\u4E2A\u975E\u64CD\u4F5C\u5217\u4E0A\u5220\u9664 props.width\uFF0C\u53EF\u4FDD\u7559 props.minWidth\u3002");
|
|
9994
10085
|
}
|
|
10086
|
+
if (pinnedToTitleFloor.length >= 2) {
|
|
10087
|
+
warnings.push(
|
|
10088
|
+
`\u5217\u8868\u6A21\u677F\u6709 ${pinnedToTitleFloor.length} \u5217\u5BBD\u5EA6\u6B63\u597D\u7B49\u4E8E\u8868\u5934\u4E0B\u9650\uFF08${pinnedToTitleFloor.slice(0, 6).join("\u3001")}${pinnedToTitleFloor.length > 6 ? " \u7B49" : ""}\uFF09\u3002\u6309\u8868\u5934\u4E0B\u9650\u914D\u5BBD\u5EA6\u4F1A\u8BA9\u6BCF\u884C\u5185\u5BB9\u88AB\u7701\u7565\u53F7\u622A\u65AD\uFF1B\u8BF7\u6309\u5B57\u6BB5\u8BED\u4E49\u7ED9\u8DB3\u5BBD\u5EA6\uFF0C\u6216\u6539\u7528\u81EA\u9002\u5E94\u5217\u3002`
|
|
10089
|
+
);
|
|
10090
|
+
}
|
|
9995
10091
|
}
|
|
9996
10092
|
function classifyListTemplateAction(label) {
|
|
9997
10093
|
if (/(删除|移除|作废|delete|remove|discard)/i.test(label)) {
|
|
@@ -10365,6 +10461,65 @@ function validateDeletePermissionGuard(item, errors) {
|
|
|
10365
10461
|
errors.push("list-template delete action must include a permission guard using ctx.$CAN_DELETE or an equivalent project.delete/project.delete.my + owner check.");
|
|
10366
10462
|
}
|
|
10367
10463
|
}
|
|
10464
|
+
var LIST_TEMPLATE_ROW_CONTEXT_PATTERN = /\{\{\s*__id\s*\}\}|ctx\.__id\b|ctx\.\$PROJECT\b|\{\{\s*(?:id|project_id)\s*\}\}/;
|
|
10465
|
+
function listTemplateLinkTargets(node) {
|
|
10466
|
+
const attribute = isRecord6(node.attribute) ? node.attribute : {};
|
|
10467
|
+
const props = isRecord6(attribute.props) ? attribute.props : {};
|
|
10468
|
+
const targets = [];
|
|
10469
|
+
const visit = (value) => {
|
|
10470
|
+
if (value === void 0 || value === null) return;
|
|
10471
|
+
if (typeof value === "string") {
|
|
10472
|
+
if (value.trim()) targets.push(value);
|
|
10473
|
+
return;
|
|
10474
|
+
}
|
|
10475
|
+
if (Array.isArray(value)) {
|
|
10476
|
+
value.forEach(visit);
|
|
10477
|
+
return;
|
|
10478
|
+
}
|
|
10479
|
+
if (!isRecord6(value)) return;
|
|
10480
|
+
if (typeof value.$template === "string") {
|
|
10481
|
+
targets.push(value.$template);
|
|
10482
|
+
return;
|
|
10483
|
+
}
|
|
10484
|
+
Object.values(value).forEach(visit);
|
|
10485
|
+
};
|
|
10486
|
+
visit(props.to);
|
|
10487
|
+
visit(props.href);
|
|
10488
|
+
visit(attribute.to);
|
|
10489
|
+
return targets;
|
|
10490
|
+
}
|
|
10491
|
+
function hardCodedStepNameGuard(text5) {
|
|
10492
|
+
if (!/\bcurrent_(?:flow_)?step_name\b/.test(text5)) return false;
|
|
10493
|
+
if (/\bcurrent_(?:flow_)?step_name\b\s*(?:===|==|!==|!=)\s*['"`]/.test(text5)) return true;
|
|
10494
|
+
if (/['"`][^'"`]*['"`]\s*(?:===|==|!==|!=)\s*\bcurrent_(?:flow_)?step_name\b/.test(text5)) return true;
|
|
10495
|
+
if (/\bcurrent_(?:flow_)?step_name\b[^\n]{0,40}?\.includes\s*\(/.test(text5)) return true;
|
|
10496
|
+
return Boolean(/!{1,2}\s*ctx\.current_(?:flow_)?step_name\b/.test(text5));
|
|
10497
|
+
}
|
|
10498
|
+
function lintListTemplateRowContext(columns, warnings) {
|
|
10499
|
+
for (const column of columns.filter(isRecord6)) {
|
|
10500
|
+
const label = listTemplateColumnLabel(column, columns.indexOf(column));
|
|
10501
|
+
const visit = (value) => {
|
|
10502
|
+
if (value === void 0 || value === null) return;
|
|
10503
|
+
if (Array.isArray(value)) {
|
|
10504
|
+
value.forEach(visit);
|
|
10505
|
+
return;
|
|
10506
|
+
}
|
|
10507
|
+
if (!isRecord6(value)) return;
|
|
10508
|
+
if (value.is === "router-link") {
|
|
10509
|
+
const targets = listTemplateLinkTargets(value);
|
|
10510
|
+
const joined = targets.join("\n");
|
|
10511
|
+
const looksLikeNavigation = /\/(?:w:|project|myProject|project_detail|projectContinue)\b|workspace/.test(joined);
|
|
10512
|
+
if (looksLikeNavigation && !LIST_TEMPLATE_ROW_CONTEXT_PATTERN.test(joined)) {
|
|
10513
|
+
warnings.push(
|
|
10514
|
+
`\u5217\u8868\u6A21\u677F\u5217\u201C${label}\u201D\u7684\u4E0B\u94BB\u94FE\u63A5\u6CA1\u6709\u643A\u5E26\u884C\u4E0A\u4E0B\u6587\uFF08\u672A\u89C1 {{__id}} \u6216 ctx.__id\uFF09\uFF1A\u6BCF\u884C\u90FD\u4F1A\u8DF3\u5230\u540C\u4E00\u4E2A\u5168\u5C40\u9875\u9762\u3002\u82E5\u662F\u884C\u5185\u4E0B\u94BB\uFF0C\u8BF7\u628A\u884C id \u6216\u4E1A\u52A1\u7F16\u53F7\u5E26\u8FDB\u76EE\u6807 URL\uFF1B\u786E\u5B9E\u662F\u5168\u5C40\u52A8\u4F5C\u8BF7\u5728\u94FE\u63A5\u6587\u6848\u548C skill \u5907\u6CE8\u4E2D\u663E\u5F0F\u8BF4\u660E\u3002`
|
|
10515
|
+
);
|
|
10516
|
+
}
|
|
10517
|
+
}
|
|
10518
|
+
Object.values(value).forEach(visit);
|
|
10519
|
+
};
|
|
10520
|
+
visit(column.createElement);
|
|
10521
|
+
}
|
|
10522
|
+
}
|
|
10368
10523
|
function validateListTemplateActionGate(value, errors, warnings) {
|
|
10369
10524
|
const nextErrors = [];
|
|
10370
10525
|
const content = parseTemplateContent(value, nextErrors);
|
|
@@ -10387,8 +10542,11 @@ function validateListTemplateActionGate(value, errors, warnings) {
|
|
|
10387
10542
|
lintListTemplateDatasetFieldReferences(value, content, nextErrors);
|
|
10388
10543
|
lintListTemplateNullableDomCoercion(content, nextErrors);
|
|
10389
10544
|
lintListTemplateRuntimeStateConflicts(content, nextErrors);
|
|
10390
|
-
if (warnings)
|
|
10391
|
-
|
|
10545
|
+
if (warnings) {
|
|
10546
|
+
lintListTemplateRowRendererSideEffects(columns, warnings);
|
|
10547
|
+
lintListTemplateRowContext(columns, warnings);
|
|
10548
|
+
}
|
|
10549
|
+
validateListTemplateColumnWidths(columns, nextErrors, warnings);
|
|
10392
10550
|
validateListTemplateIcons(columns, nextErrors);
|
|
10393
10551
|
const operationColumn = columns.filter(isRecord6).find(isListTemplateOperationColumn);
|
|
10394
10552
|
if (!operationColumn) {
|
|
@@ -10416,6 +10574,14 @@ function validateListTemplateActionGate(value, errors, warnings) {
|
|
|
10416
10574
|
else warnings?.push(message);
|
|
10417
10575
|
}
|
|
10418
10576
|
});
|
|
10577
|
+
classified.forEach((item) => {
|
|
10578
|
+
const guards = [...item.inheritedGuards, ...listTemplateNodeGuards(item.node)];
|
|
10579
|
+
if (guards.some((guard) => hardCodedStepNameGuard(guard.text))) {
|
|
10580
|
+
warnings?.push(
|
|
10581
|
+
`list-template \u64CD\u4F5C\u6309\u94AE ${JSON.stringify(item.label.trim() || item.kind)} \u7684\u663E\u793A\u6761\u4EF6\u4F9D\u8D56 current_step_name \u7684\u5B57\u9762\u91CF\u6216\u5B58\u5728\u6027\u5224\u65AD\uFF1B\u73AF\u8282\u6539\u540D\u6216\u589E\u5220\u8282\u70B9\u540E\u8BE5\u6761\u4EF6\u4F1A\u9759\u9ED8\u5931\u6548\u3002\u8BF7\u6539\u7528 status\u3001\u662F\u5426\u5DF2\u5F00\u6807\u3001\u662F\u5426\u5DF2\u53D1\u51FA\u7B49\u8BED\u4E49\u5B57\u6BB5\u3002`
|
|
10582
|
+
);
|
|
10583
|
+
}
|
|
10584
|
+
});
|
|
10419
10585
|
}
|
|
10420
10586
|
if (!nextErrors.length) {
|
|
10421
10587
|
return;
|
|
@@ -17786,16 +17952,20 @@ async function buildConfigSubmitPayload(domain, workFile, outFile, metaFile, opt
|
|
|
17786
17952
|
}
|
|
17787
17953
|
const unverified = Array.isArray(impactReport?.unverified_surfaces) ? impactReport.unverified_surfaces.filter((item) => typeof item === "string") : [];
|
|
17788
17954
|
const impactStatus = String(impactReport?.impact_status ?? "not_provided");
|
|
17789
|
-
const
|
|
17955
|
+
const presentationOnly = isPresentationOnlyListTemplateChange(boundary.changed_paths);
|
|
17956
|
+
const validationRequired = boundary.permission_related || !presentationOnly && ["review_recommended", "required_collateral_review"].includes(impactStatus) && (unverified.includes("runtime-script") || unverified.includes("e2e"));
|
|
17790
17957
|
listTemplateSafety = {
|
|
17791
17958
|
schema_version: 1,
|
|
17792
17959
|
permission_related: boundary.permission_related,
|
|
17960
|
+
presentation_only: presentationOnly,
|
|
17793
17961
|
changed_paths: boundary.changed_paths,
|
|
17794
17962
|
boundary: boundary.boundary,
|
|
17795
17963
|
impact_report: impactReport ?? null,
|
|
17796
17964
|
submit_gate: {
|
|
17797
17965
|
validation_required: validationRequired,
|
|
17798
|
-
|
|
17966
|
+
evidence_kind: validationRequired ? "permission_matrix" : presentationOnly ? "column_width_runtime_check" : null,
|
|
17967
|
+
unverified_surfaces: unverified,
|
|
17968
|
+
reason: validationRequired ? "permission or high-risk impact changes have unverified runtime-script/e2e surfaces" : presentationOnly ? "only presentation properties changed; a rendered column-width check is sufficient" : "no high-risk unverified surface detected"
|
|
17799
17969
|
}
|
|
17800
17970
|
};
|
|
17801
17971
|
}
|
|
@@ -18708,9 +18878,28 @@ async function submitConfigDomain(config, profile, domain, id, submitFile, confi
|
|
|
18708
18878
|
reason: options.overrideReason.trim(),
|
|
18709
18879
|
evidence_missing: true
|
|
18710
18880
|
};
|
|
18881
|
+
} else {
|
|
18882
|
+
const changedPaths = Array.isArray(safety.changed_paths) ? safety.changed_paths : [];
|
|
18883
|
+
const unverifiedSurfaces = Array.isArray(gate.unverified_surfaces) ? gate.unverified_surfaces : [];
|
|
18884
|
+
throw new Error(
|
|
18885
|
+
`[list_template_submit_validation_required] This list-template needs a permission/high-risk validation report. Reason: ${String(gate.reason ?? "unspecified")}. Changed paths: ${changedPaths.length ? changedPaths.slice(0, 8).join(", ") : "<none recorded>"}. Unverified surfaces: ${unverifiedSurfaces.length ? unverifiedSurfaces.join(", ") : "<none>"}. Provide --validation-report, or explicitly use --override-reason with a specific audited reason.`
|
|
18886
|
+
);
|
|
18887
|
+
}
|
|
18888
|
+
} else if (safety.presentation_only === true) {
|
|
18889
|
+
if (options.validationReportFile) {
|
|
18890
|
+
listTemplateValidation = validateListTemplateColumnWidthEvidence(
|
|
18891
|
+
await readJsonFile(options.validationReportFile),
|
|
18892
|
+
{ templateId: id, profile: profile.name, payloadHash: hashJson(submit.payload) }
|
|
18893
|
+
);
|
|
18894
|
+
} else if (typeof options.overrideReason === "string" && options.overrideReason.trim().length >= 12) {
|
|
18895
|
+
listTemplateOverride = {
|
|
18896
|
+
used: true,
|
|
18897
|
+
reason: options.overrideReason.trim(),
|
|
18898
|
+
evidence_missing: true
|
|
18899
|
+
};
|
|
18711
18900
|
} else {
|
|
18712
18901
|
throw new Error(
|
|
18713
|
-
|
|
18902
|
+
'[list_template_column_width_validation_required] Only presentation properties changed, so a permission matrix is not required. Provide --validation-report with a rendered column-width check (schema_version=1, result="pass", columns with truncated=false), or explicitly use --override-reason with a specific audited reason.'
|
|
18714
18903
|
);
|
|
18715
18904
|
}
|
|
18716
18905
|
}
|
|
@@ -45094,6 +45283,16 @@ function hasExactConfirmEvidence(evidence) {
|
|
|
45094
45283
|
function rowsHaveExecutableTable(text5) {
|
|
45095
45284
|
return extractTaskRows(text5).length > 0;
|
|
45096
45285
|
}
|
|
45286
|
+
function adjustmentTraceIds(cell) {
|
|
45287
|
+
return [...cell.matchAll(ADJUSTMENT_TRACE_ID_PATTERN)].map((match) => match[0]);
|
|
45288
|
+
}
|
|
45289
|
+
var ADJUSTMENT_TRACE_ID_PATTERN = /\b(?!T\d)[A-Z]\d+\b/gi;
|
|
45290
|
+
var NODE_TRACE_PHRASE = "\u7CFB\u7EDF\u52A8\u4F5C";
|
|
45291
|
+
function nodeTraceIds(cell) {
|
|
45292
|
+
const ids = [...cell.matchAll(/\b(?!T\d)[A-Z]\d+\b|\b\d{1,2}\b/g)].map((match) => match[0]);
|
|
45293
|
+
if (cell.includes(NODE_TRACE_PHRASE)) ids.push(NODE_TRACE_PHRASE);
|
|
45294
|
+
return ids;
|
|
45295
|
+
}
|
|
45097
45296
|
function validateTaskbookTraceabilityGates(text5) {
|
|
45098
45297
|
const messages = [];
|
|
45099
45298
|
const rows2 = extractTaskRows(text5);
|
|
@@ -45105,13 +45304,13 @@ function validateTaskbookTraceabilityGates(text5) {
|
|
|
45105
45304
|
section: "\u8C03\u6574\u9879 \u2192 \u4EFB\u52A1\u8FFD\u6EAF\u8868",
|
|
45106
45305
|
idLabel: "\u8C03\u6574\u9879\u7F16\u53F7",
|
|
45107
45306
|
sourceLabel: "\u8C03\u6574\u6E05\u5355\u6765\u6E90",
|
|
45108
|
-
|
|
45307
|
+
extract: adjustmentTraceIds
|
|
45109
45308
|
},
|
|
45110
45309
|
{
|
|
45111
45310
|
section: "\u84DD\u56FE\u8282\u70B9 \u2192 \u4EFB\u52A1\u8FFD\u6EAF\u8868",
|
|
45112
45311
|
idLabel: "\u8282\u70B9\u7F16\u53F7",
|
|
45113
45312
|
sourceLabel: "\u8282\u70B9\u6E05\u5355\u6765\u6E90",
|
|
45114
|
-
|
|
45313
|
+
extract: nodeTraceIds
|
|
45115
45314
|
}
|
|
45116
45315
|
];
|
|
45117
45316
|
for (const spec of specs) {
|
|
@@ -45136,7 +45335,7 @@ function validateTaskbookTraceabilityGates(text5) {
|
|
|
45136
45335
|
}
|
|
45137
45336
|
const seenIDs = /* @__PURE__ */ new Set();
|
|
45138
45337
|
for (const [rowIndex, row] of table.rows.entries()) {
|
|
45139
|
-
const ids = (row[spec.idLabel] || "")
|
|
45338
|
+
const ids = spec.extract(row[spec.idLabel] || "");
|
|
45140
45339
|
if (!ids.length) {
|
|
45141
45340
|
if (BLUEPRINT_PLACEHOLDER_PATTERN.test((row[spec.idLabel] || "").trim())) continue;
|
|
45142
45341
|
messages.push(`\u300C${spec.section}\u300D\u7B2C ${rowIndex + 1} \u884C\u7F3A\u5C11\u6709\u6548${spec.idLabel}\u3002`);
|
|
@@ -45156,7 +45355,7 @@ function validateTaskbookTraceabilityGates(text5) {
|
|
|
45156
45355
|
}
|
|
45157
45356
|
const declaredBlock = section.match(/编号清单\s*[::]\s*([^\n]+)/)?.[1] || "";
|
|
45158
45357
|
if (!BLUEPRINT_PLACEHOLDER_PATTERN.test(declaredBlock.trim())) {
|
|
45159
|
-
const declaredIDs = (declaredBlock
|
|
45358
|
+
const declaredIDs = spec.extract(declaredBlock).map((id) => id.toUpperCase());
|
|
45160
45359
|
for (const declared of new Set(declaredIDs)) {
|
|
45161
45360
|
if (!seenIDs.has(declared)) {
|
|
45162
45361
|
messages.push(`\u300C${spec.section}\u300D\u58F0\u660E\u7684${spec.idLabel} ${declared} \u6CA1\u6709\u51FA\u73B0\u5728\u4EFB\u4F55\u4EFB\u52A1\u884C\u4E2D\u3002`);
|
|
@@ -46104,7 +46303,7 @@ function taskbookTemplate(title = "BPMAX AI \u5B9E\u65BD\u7F16\u6392\u4EFB\u52A1
|
|
|
46104
46303
|
"## \u8C03\u6574\u9879 \u2192 \u4EFB\u52A1\u8FFD\u6EAF\u8868",
|
|
46105
46304
|
"",
|
|
46106
46305
|
"- \u8C03\u6574\u6E05\u5355\u6765\u6E90\uFF1A`<\u84DD\u56FE\u8C03\u6574\u6E05\u5355\u6587\u4EF6\u8DEF\u5F84>`\uFF0C\u7248\u672C\uFF1A\u5F85\u586B\u5199\u3002",
|
|
46107
|
-
"- \u7F16\u53F7\u6E05\u5355\uFF1A\u5F85\u586B\u5199\u3002\u9010\u4E2A\u5217\u51FA\u8C03\u6574\u6E05\u5355\u91CC\u7684\u6BCF\u4E2A\u7F16\u53F7\
|
|
46306
|
+
"- \u7F16\u53F7\u6E05\u5355\uFF1A\u5F85\u586B\u5199\u3002\u9010\u4E2A\u5217\u51FA\u8C03\u6574\u6E05\u5355\u91CC\u7684\u6BCF\u4E2A\u7F16\u53F7\uFF1B\u7F16\u53F7\u5F62\u5982\u5B57\u6BCD\u52A0\u5E8F\u53F7\uFF0C\u5177\u4F53\u65CF\u522B\u4EE5\u84DD\u56FE\u4E3A\u51C6\u3002",
|
|
46108
46307
|
"",
|
|
46109
46308
|
"| \u8C03\u6574\u9879\u7F16\u53F7 | \u8C03\u6574\u5185\u5BB9 | \u4EFB\u52A1 | \u9A8C\u6536\u8BC1\u636E |",
|
|
46110
46309
|
"|---|---|---|---|",
|
|
@@ -46113,7 +46312,7 @@ function taskbookTemplate(title = "BPMAX AI \u5B9E\u65BD\u7F16\u6392\u4EFB\u52A1
|
|
|
46113
46312
|
"## \u84DD\u56FE\u8282\u70B9 \u2192 \u4EFB\u52A1\u8FFD\u6EAF\u8868",
|
|
46114
46313
|
"",
|
|
46115
46314
|
"- \u8282\u70B9\u6E05\u5355\u6765\u6E90\uFF1A`<\u84DD\u56FE\u76EE\u6807\u6D41\u7A0B\u8282\u70B9\u8868\u6587\u4EF6\u8DEF\u5F84>`\uFF0C\u7248\u672C\uFF1A\u5F85\u586B\u5199\u3002",
|
|
46116
|
-
"- \u7F16\u53F7\u6E05\u5355\uFF1A\u5F85\u586B\u5199\u3002\u9010\u4E2A\u5217\u51FA\u76EE\u6807\u6D41\u7A0B\u8282\u70B9\u8868\u91CC\u7684\u6BCF\u4E2A\u7F16\u53F7\uFF0C\u5305\u62EC\u4E3B\u5E8F\u53F7\u8282\u70B9\
|
|
46315
|
+
"- \u7F16\u53F7\u6E05\u5355\uFF1A\u5F85\u586B\u5199\u3002\u9010\u4E2A\u5217\u51FA\u76EE\u6807\u6D41\u7A0B\u8282\u70B9\u8868\u91CC\u7684\u6BCF\u4E2A\u7F16\u53F7\uFF0C\u5305\u62EC\u4E3B\u5E8F\u53F7\u8282\u70B9\u3001\u5B57\u6BCD\u52A0\u5E8F\u53F7\u7684\u5E76\u884C\u5206\u652F\u8282\u70B9\uFF0C\u4EE5\u53CA\u56FA\u5B9A\u77ED\u8BED\u8282\u70B9\u3002",
|
|
46117
46316
|
"- \u8C03\u6574\u6E05\u5355\u4E0E\u76EE\u6807\u6D41\u7A0B\u8282\u70B9\u8868\u7C92\u5EA6\u4E0D\u540C\uFF1A\u53EA\u6309\u8C03\u6574\u9879\u6253\u52FE\u4F1A\u6F0F\u6389\u8282\u70B9\u8868\u91CC\u7684\u5E76\u884C\u5206\u652F\u548C\u652F\u6491\u8282\u70B9\uFF0C\u4E24\u8005\u5FC5\u987B\u5206\u522B\u8FFD\u6EAF\u3002",
|
|
46118
46317
|
"",
|
|
46119
46318
|
"| \u8282\u70B9\u7F16\u53F7 | \u8282\u70B9\u540D\u79F0 | \u4EFB\u52A1 | \u8868\u5355 | \u8D23\u4EFB\u89D2\u8272 | \u9A8C\u6536\u8BC1\u636E |",
|