@stalfh233/omc-cli 0.6.100 → 0.8.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/conformance/README.md +267 -0
- package/conformance/frontend-behavior-probe.mjs +1986 -0
- package/conformance/frontend-scenarios/calc-visibility.json +22 -0
- package/conformance/frontend-scenarios/form-buttons.json +19 -0
- package/conformance/frontend-scenarios/list-buttons.json +28 -0
- package/conformance/frontend-scenarios/onlinejs.json +19 -0
- package/coverage/m1-coverage-manifest-v1.json +88 -2
- package/dist/capability-overview.js +16 -4
- package/dist/cli-stdout.js +4 -0
- package/dist/cli.js +190 -7
- package/dist/contract-resources.js +2 -0
- package/dist/coverage-registry.js +4 -0
- package/dist/coverage.js +16 -2
- package/dist/endpoints.js +65 -0
- package/dist/environment-policy.js +15 -1
- package/dist/field-change.js +9 -2
- package/dist/field-families.js +27 -6
- package/dist/governed-execution.js +18 -12
- package/dist/human-summary.js +8 -0
- package/dist/intent/capabilities/field.js +6 -0
- package/dist/lanes/environment.js +3 -0
- package/dist/lanes/field-contract.js +117 -6
- package/dist/lanes/file-contract.js +69 -0
- package/dist/lanes/file-coverage.js +16 -0
- package/dist/lanes/file.js +257 -0
- package/dist/lanes/lane-ids.js +1 -0
- package/dist/lanes/list-view-contract.js +3 -3
- package/dist/lanes/list-view-shapes.js +56 -0
- package/dist/lanes/list-view.js +40 -5
- package/dist/lanes/meta.js +4 -3
- package/dist/lanes/model.js +8 -4
- package/dist/lanes/org-query-contract.js +62 -0
- package/dist/lanes/org-query-coverage.js +27 -0
- package/dist/lanes/org-query.js +610 -0
- package/dist/lanes/organization.js +44 -11
- package/dist/lanes/runtime-data.js +228 -59
- package/dist/lanes/workflow-contract.js +100 -1
- package/dist/lanes/workflow-coverage.js +13 -0
- package/dist/lanes/workflow.js +615 -15
- package/dist/package.js +3 -1
- package/dist/read-shapes.js +3 -3
- package/dist/recipes/runtime-data.js +8 -6
- package/dist/refusal-guidance.js +1 -1
- package/dist/rule-support.js +15 -17
- package/dist/session.js +16 -1
- package/dist/tool-types.js +15 -1
- package/dist/tools.js +7 -0
- package/dist/version-family-gaps.js +8 -1
- package/dist/version-partition.js +633 -0
- package/dist/wire.js +8 -2
- package/dist/write.js +11 -2
- package/package.json +6 -4
- package/skills/omc-capabilities.md +8 -1
package/dist/package.js
CHANGED
|
@@ -29,6 +29,8 @@ export async function executePackage(ctx, plan, coverage, args, execute) {
|
|
|
29
29
|
wouldChange: true,
|
|
30
30
|
plan: boundPlan,
|
|
31
31
|
planFingerprint: planFingerprint(boundPlan),
|
|
32
|
+
...(boundPlan.versionEvidence !== undefined ? { versionEvidence: boundPlan.versionEvidence } : {}),
|
|
33
|
+
...(boundPlan.versionNotice !== undefined ? { versionNotice: boundPlan.versionNotice } : {}),
|
|
32
34
|
...(typeof args.requestId === "string" ? { requestId: args.requestId } : {}),
|
|
33
35
|
}),
|
|
34
36
|
});
|
|
@@ -76,7 +78,7 @@ export async function executePackage(ctx, plan, coverage, args, execute) {
|
|
|
76
78
|
writeArtifact(ctx, `package-${randomUUID().slice(0, 8)}.json`, artifact);
|
|
77
79
|
// A4(r89 契约层):ruleStatus 透传(configure_rule 等套餐面)——与原子工具
|
|
78
80
|
// (write.ts)同一键、同一构造(rule-support.ts ruleStatusSegment)。
|
|
79
|
-
return { status: "ok", deliveryState: "DELIVERED", steps, readback, ...(ruleStatus !== undefined ? { ruleStatus } : {}), ...(productionConfirmed ? { productionConfirmed: true } : {}), ...(reason !== undefined ? { reason } : {}), ...(summary !== undefined ? { summary } : {}), artifactFingerprint: sha256(artifact) };
|
|
81
|
+
return { status: "ok", deliveryState: "DELIVERED", steps, readback, ...(ruleStatus !== undefined ? { ruleStatus } : {}), ...(productionConfirmed ? { productionConfirmed: true } : {}), ...(reason !== undefined ? { reason } : {}), ...(boundPlan.versionEvidence !== undefined ? { versionEvidence: boundPlan.versionEvidence } : {}), ...(boundPlan.versionNotice !== undefined ? { versionNotice: boundPlan.versionNotice } : {}), ...(summary !== undefined ? { summary } : {}), artifactFingerprint: sha256(artifact) };
|
|
80
82
|
});
|
|
81
83
|
}
|
|
82
84
|
//# sourceMappingURL=package.js.map
|
package/dist/read-shapes.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
const READ_SHAPES = {
|
|
13
13
|
// r28k 治理面形状钉:截断≠空表;指纹有用途;doctor/get_status 分流。
|
|
14
14
|
"discover_environment": {
|
|
15
|
-
keys: ["applications:array<{code,name,groupId?,portalHidden?}>", "applicationsCount", "groups", "groupsCount", "foldersAndModels?", "foldersAndModelsCount?", "foldersAndModelsOmitted?", "models?", "modelsCount?", "modelsOmitted?", "tablesHint?", "applicationCode", "applicationResolution", "readiness", "detectedVersion", "inAnchorFamily", "versionSource", "versionFamily", "anchorVersion", "versionNotice?", "environmentFingerprint", "fingerprintHint?", "platform:{productVersion,buildTime?,licenseType?,licenseExpiration?,source,licenseFaceUnavailable?,extensionBuildShaUnavailable?}|{versionUnavailable}", "detailArtifactId?"],
|
|
15
|
+
keys: ["applications:array<{code,name,groupId?,portalHidden?}>", "applicationsCount", "groups", "groupsCount", "foldersAndModels?", "foldersAndModelsCount?", "foldersAndModelsOmitted?", "models?", "modelsCount?", "modelsOmitted?", "tablesHint?", "applicationCode", "applicationResolution", "readiness", "detectedVersion", "inAnchorFamily", "versionSource", "versionFamily", "anchorVersion", "partition:{family,confidence,matched}", "versionNotice?", "environmentFingerprint", "fingerprintHint?", "platform:{productVersion,buildTime?,licenseType?,licenseExpiration?,source,licenseFaceUnavailable?,extensionBuildShaUnavailable?}|{versionUnavailable}", "detailArtifactId?"],
|
|
16
16
|
notes: [
|
|
17
17
|
"applications/groups 内联;foldersAndModels/models 外置时是 null + *Omitted:true(不是 [])",
|
|
18
18
|
"environmentFingerprint 用途见 fingerprintHint(写前漂移/计划绑定/读缓存键,非审批令牌)",
|
|
@@ -21,8 +21,8 @@ const READ_SHAPES = {
|
|
|
21
21
|
],
|
|
22
22
|
},
|
|
23
23
|
"environment.fingerprint": {
|
|
24
|
-
keys: ["environment", "fingerprint", "fingerprintHint", "detectedVersion", "inAnchorFamily", "versionSource", "versionFamily", "anchorVersion", "versionNotice?"],
|
|
25
|
-
notes: ["fingerprint 随 env/origin/application/enterprise 变;写前漂移/计划绑定", "版本证据与 discover/doctor
|
|
24
|
+
keys: ["environment", "fingerprint", "fingerprintHint", "detectedVersion", "inAnchorFamily", "versionSource", "versionFamily", "anchorVersion", "partition:{family,confidence,matched}", "versionNotice?"],
|
|
25
|
+
notes: ["fingerprint 随 env/origin/application/enterprise 变;写前漂移/计划绑定", "版本证据与 discover/doctor 同源;partition 是三态分区的单一真相源"],
|
|
26
26
|
},
|
|
27
27
|
"get_status": {
|
|
28
28
|
keys: ["environment", "session", "coverage", "environmentScope", "unsupportedCapabilities?", "writeLease"],
|
|
@@ -131,16 +131,18 @@ const dataDeleteSweep = Object.freeze({
|
|
|
131
131
|
title: "清空模型数据并权威验证(list 取 ids → 逐条 delete → 逐条 load 确认 absent)",
|
|
132
132
|
status: "offline-valid",
|
|
133
133
|
tool: "data.delete",
|
|
134
|
-
// 1.1.
|
|
135
|
-
//
|
|
134
|
+
// 批量删除不按版本拒绝(多版本兼容优先):1.1.25 有已知假成功(r30),
|
|
135
|
+
// 2.1.5 实测真实生效;所有版本都放行,主防线是删后逐条回读——仍能读到的 id
|
|
136
|
+
// 进 readback.batchDeleteIneffective / undeletedIds,提示改单条重试。
|
|
137
|
+
// recipe.args 给单条形状;批量可用 bizObjectIds,失败 id 用 dryRun.command 的 --args-list 重跑。
|
|
136
138
|
args: { environment, schemaCode: model, bizObjectId: "<data.list 一条 id>" },
|
|
137
139
|
preconditions: [
|
|
138
140
|
"先 data.list 取全量 ids(`all:true` 才含 DRAFT;翻页取全),清理对象按 data.list 全量",
|
|
139
141
|
"**行数以 data.list total 为准,别按「N 提交=2N 行」外推**:带流程的 submit 原地推进同一行(r28b 实测 3→3);双行只在平台另起草稿行时出现(r30 的 5→10)",
|
|
140
142
|
],
|
|
141
143
|
conditionalRequirements: [
|
|
142
|
-
"
|
|
143
|
-
"删完逐条 `data.load` 确认 `exists:false`(`absent:true` / `modelResidue.total` 递减都不是删除成功的证明);最后再 `data.list` 复验 total:0",
|
|
144
|
+
"批量 `bizObjectIds` 所有版本都放行(单次上限 200,超限分块串行),但必须看删后回读:成功判据是 `undeletedIds` 为空(`deletionVerified:true`),**不是** `remainingRows`/`clean`(整表状态,删一部分时 clean:false 正常)。出现 `undeletedIds`/`batchDeleteIneffective`(1.1.25 已知批量假成功:回执成功但行仍在)→ 对这些 id 改用单条 `bizObjectId` 重试(可 `--args-list` 一次跑多条单删)",
|
|
145
|
+
"删完逐条 `data.load` 确认 `exists:false`(`absent:true` / `modelResidue.total` 递减都不是删除成功的证明);最后再 `data.list` 复验 total:0。批量回执的 deletedCount/已删条数与 alreadyAbsentCount/本来不存在条数要能对上",
|
|
144
146
|
"id 已被删时幂等 no-op,重复清理安全",
|
|
145
147
|
],
|
|
146
148
|
priorToolReferences: [
|
|
@@ -149,7 +151,7 @@ const dataDeleteSweep = Object.freeze({
|
|
|
149
151
|
dryRun: {
|
|
150
152
|
supported: true,
|
|
151
153
|
command: `omc call data.delete --env ${environment} --args-list '[{"schemaCode":"${model}","bizObjectId":"<id1>"},{"schemaCode":"${model}","bizObjectId":"<id2>"}]'`,
|
|
152
|
-
notes: "多条用 --args-list
|
|
154
|
+
notes: "多条用 bizObjectIds(所有版本放行,单次上限 200;删后逐条回读,dry-run 回执给 estimatedWireCalls≈3N+1);若回执报 batch-delete-ineffective/undeletedIds,用 --args-list 对未删 id 逐条单删。成功判据是 undeletedIds 为空,不是 remainingRows/clean",
|
|
153
155
|
},
|
|
154
156
|
expectedReadback: {
|
|
155
157
|
readback: { deleted: true, exists: false },
|
|
@@ -159,7 +161,7 @@ const dataDeleteSweep = Object.freeze({
|
|
|
159
161
|
],
|
|
160
162
|
},
|
|
161
163
|
refusalRecovery: [
|
|
162
|
-
{ code: "
|
|
164
|
+
{ code: "batch-delete-ineffective", action: "列出 undeletedIds 改用单条 bizObjectId 重试(可 --args-list 一次跑多条单删),每条删完 data.load 确认 exists:false" },
|
|
163
165
|
{ code: "wire-business", action: "模型须已创建且有已发布字段;运行面 50000 时先 model.inspect modelPresent 判存在" },
|
|
164
166
|
],
|
|
165
167
|
requiresEnvironmentDerivedIds: false,
|
package/dist/refusal-guidance.js
CHANGED
|
@@ -120,7 +120,7 @@ const FIX_FIRST_GATES = Object.freeze({
|
|
|
120
120
|
"app-not-published": "目标应用未发布:先 workflow/form/field 各面发布(或 app 级发布),再重试运行面操作",
|
|
121
121
|
"submit-workitem-not-mine": "该 workItem 不在当前登录人的待办里:用 omc call workitem.list --args '{\"status\":\"PENDING\"}' 拿**自己的** workItemId,不要用别人的 id 提交",
|
|
122
122
|
"capability-out-of-coverage": "需求不在覆盖面内:这份拒绝就是答案——用 omc capabilities 核对运行时清单,不要换相近工具伪造实现",
|
|
123
|
-
"version-family-evidence-missing": "
|
|
123
|
+
"version-family-evidence-missing": "**已放宽为兼容模式**(2026-11-24):这个 blocker 不再产生 refuse——版本串探测不到时写入照常放行,回执带 `versionEvidence:\"absent\"` + 兼容提示,平台是最终门。见到它只说明是旧版回执:按兼容模式继续,无需为「取版本」阻塞;要拿版本证据跑 omc doctor / discover_environment(必要时 refresh 刷登录缓存)",
|
|
124
124
|
});
|
|
125
125
|
/**
|
|
126
126
|
* `tool-input-invalid` and friends: point at the refused **parameter**, not the
|
package/dist/rule-support.js
CHANGED
|
@@ -13,6 +13,7 @@ import { closestMatches } from "./closest-match.js";
|
|
|
13
13
|
import { RESERVED_CODES } from "./code-rules.js";
|
|
14
14
|
import { SYSTEM_FIELD_CODES } from "./field-families.js";
|
|
15
15
|
import { FIELD_PROPERTY_TYPES } from "./field-families.js";
|
|
16
|
+
import { CAPABILITIES, partitionVersion } from "./version-partition.js";
|
|
16
17
|
/** Business-rule node graph. Platform trigger rules are addressed by ruleCode: Create / Update / Delete / Available / Cancel / GetList / Load. */
|
|
17
18
|
export const ruleNodeGraphArg = z
|
|
18
19
|
.object({
|
|
@@ -577,24 +578,16 @@ async function assertRuleMappingFieldsPublished(session, schemaCode, nodes, opti
|
|
|
577
578
|
* 8.6, and AI-Platform 1.x uses the same modern shape (DataAssignNode in
|
|
578
579
|
* 1.1.25). OMC only writes the modern shape, so on a pre-8.6 environment it must
|
|
579
580
|
* refuse rather than send keys the target will silently misread.
|
|
581
|
+
*
|
|
582
|
+
* The gate itself lives in `CAPABILITIES[partitionVersion(version).family]
|
|
583
|
+
* .assignNodeModernShape` (version-partition.ts): preflight refusal is a matrix
|
|
584
|
+
* decision, not a bare version comparison.
|
|
580
585
|
*/
|
|
581
586
|
export function assignNodes(nodes) {
|
|
582
587
|
return nodes
|
|
583
588
|
.filter((node) => String(node.nodeType ?? "") === "ASSIGN")
|
|
584
589
|
.map((node) => String(node.nodeCode ?? "ASSIGN"));
|
|
585
590
|
}
|
|
586
|
-
export function isModernAssignVersion(version) {
|
|
587
|
-
if (version === undefined || version.trim() === "")
|
|
588
|
-
return true;
|
|
589
|
-
const match = /^(\d+)\.(\d+)/u.exec(version.trim());
|
|
590
|
-
if (!match)
|
|
591
|
-
return true;
|
|
592
|
-
const major = Number(match[1]);
|
|
593
|
-
const minor = Number(match[2]);
|
|
594
|
-
if (major >= 1 && major < 8)
|
|
595
|
-
return true;
|
|
596
|
-
return major > 8 || (major === 8 && minor >= 6);
|
|
597
|
-
}
|
|
598
591
|
/**
|
|
599
592
|
* 1.2 (r8 2026-10-22, 1.1.25): a `dataCondition` that compares a text-CHOICE field
|
|
600
593
|
* (RADIO/CHECKBOX/DROPDOWN) with a FIXED value never evaluates — the launcher
|
|
@@ -1299,21 +1292,26 @@ export async function lintRuleSaveWrite(session, args) {
|
|
|
1299
1292
|
// rule model plus two target/query models) and refuse before rule.save.
|
|
1300
1293
|
blockers.push(...(await assertRuleGraphFieldOwnership(session, args.schemaCode, Array.isArray(nodes) ? nodes : [], args.allowAdvisory === true)));
|
|
1301
1294
|
// Ticket 96: phantom-schema gate — r85 起已提前到函数首(一切规则面 wire 之前)。
|
|
1302
|
-
// ASSIGN shape is version-dependent
|
|
1295
|
+
// ASSIGN shape is version-dependent; the decision lives in the partition matrix
|
|
1296
|
+
// (version-partition.ts), not in a bare version comparison.
|
|
1303
1297
|
const assignCodes = assignNodes(nodes);
|
|
1304
1298
|
if (assignCodes.length > 0) {
|
|
1305
1299
|
const version = session.detectedVersion();
|
|
1306
|
-
|
|
1300
|
+
const partition = partitionVersion(version);
|
|
1301
|
+
const capability = CAPABILITIES[partition.family].assignNodeModernShape;
|
|
1302
|
+
if (capability.guard === "preflight-refuse") {
|
|
1307
1303
|
throw new ToolRefusalError({
|
|
1308
1304
|
status: "refused",
|
|
1309
1305
|
blocker: "rule-graph-assign-version-unsupported",
|
|
1310
1306
|
schemaCode: args.schemaCode,
|
|
1311
1307
|
ruleCode: args.ruleCode,
|
|
1312
1308
|
version: version ?? "unknown",
|
|
1309
|
+
partition: { family: partition.family, confidence: partition.confidence, matched: partition.matched },
|
|
1313
1310
|
nodes: assignCodes,
|
|
1314
|
-
message: `检测到 CloudPivot ${version ?? "未知版本"}
|
|
1315
|
-
`8.6.26 自带 BusinessRuleUpgradeServiceImpl + UpgradeRuleHandler.upgradeAssignNode 正是用来把旧图升级成 inputParam+targetObjectCode+nonMatchingAdded
|
|
1316
|
-
|
|
1311
|
+
message: `检测到 CloudPivot ${version ?? "未知版本"}(分区 ${partition.family}/${partition.confidence}):「数据赋值」在 8.6 之前是旧形状(triggerObjectCode/currentDataModel/targetSchemaModel/tableConditionGroups),` +
|
|
1312
|
+
`8.6.26 自带 BusinessRuleUpgradeServiceImpl + UpgradeRuleHandler.upgradeAssignNode 正是用来把旧图升级成 inputParam+targetObjectCode+nonMatchingAdded 的;升级器只做旧→新,没有反向降级。` +
|
|
1313
|
+
`现代形状从 8.6 起(AI-Platform 1.x 同形),OMC 只写现代形状;在旧形状环境会被静默误读。` +
|
|
1314
|
+
`${capability.diagnostic ?? ""} ` +
|
|
1317
1315
|
`请改用 UPDATE/CREATE 表达同一逻辑,或在该版本的设计器里配置 ASSIGN。`,
|
|
1318
1316
|
});
|
|
1319
1317
|
}
|
package/dist/session.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { omcCore } from "./omc-core-lazy.js";
|
|
2
|
+
import { partitionVersion } from "./version-partition.js";
|
|
2
3
|
/**
|
|
3
4
|
* An authenticated CloudPivot session for one named environment. Wraps the
|
|
4
5
|
* core authenticator; exposes a version-family probe used by the 8.6-only
|
|
@@ -125,7 +126,8 @@ export class CloudPivotSession {
|
|
|
125
126
|
// F7(issue 05):缓存命中**不意味着**要重新探测。已有版本且属于锚定族
|
|
126
127
|
// (或本来就是 license 证据)就零 wire 直接用;只有「没有版本」或「缓存说
|
|
127
128
|
// 自己不是 8.6 族」时才重探——后者正是真机 1.1.25 误报的场景。
|
|
128
|
-
|
|
129
|
+
// 族判定走 partitionVersion(version-partition.ts),不再裸比字符串。
|
|
130
|
+
if (cacheVersionSkipsReprobe(cachedVersion, this.versionSource))
|
|
129
131
|
return { version: cachedVersion, rawVersion: cachedRawVersion, source: this.versionSource ?? "system-config" };
|
|
130
132
|
let license;
|
|
131
133
|
try {
|
|
@@ -263,6 +265,19 @@ export class CloudPivotSession {
|
|
|
263
265
|
return this.httpAdapter;
|
|
264
266
|
}
|
|
265
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* F7: does a cached version prove enough to skip the version re-probe?
|
|
270
|
+
* Only license/info evidence or an anchor-family cache may short-circuit;
|
|
271
|
+
* 8.7 / 8.8 / 2.1.x / 1.1.x / unknown all re-probe (the 1.1.25 false-positive
|
|
272
|
+
* case). Family classification lives in version-partition.ts.
|
|
273
|
+
*/
|
|
274
|
+
export function cacheVersionSkipsReprobe(cachedVersion, source) {
|
|
275
|
+
if (cachedVersion === undefined)
|
|
276
|
+
return false;
|
|
277
|
+
if (source === "license/info")
|
|
278
|
+
return true;
|
|
279
|
+
return partitionVersion(cachedVersion).family === "anchor-8.6";
|
|
280
|
+
}
|
|
266
281
|
function detectVersion(systemConfig) {
|
|
267
282
|
if (!systemConfig)
|
|
268
283
|
return undefined;
|
package/dist/tool-types.js
CHANGED
|
@@ -544,8 +544,22 @@ export function parseToolInput(tool, input) {
|
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
const result = z.object(tool.inputSchema).safeParse(normalized);
|
|
547
|
-
if (result.success)
|
|
547
|
+
if (result.success) {
|
|
548
|
+
// 跨字段约束(zod raw shape 表达不了):在 schema 通过后、handler 之前
|
|
549
|
+
// 拒绝,零 wire。错误信封与 zod 拒绝同形,调用方只认 blocker/issues。
|
|
550
|
+
const violation = tool.inputRefine?.(result.data);
|
|
551
|
+
if (violation !== undefined) {
|
|
552
|
+
throw new ToolInputError({
|
|
553
|
+
status: "error",
|
|
554
|
+
blocker: "tool-input-invalid",
|
|
555
|
+
tool: tool.name,
|
|
556
|
+
message: violation.message,
|
|
557
|
+
issues: [{ path: violation.path === undefined ? [] : violation.path.split("."), code: "custom", message: violation.message }],
|
|
558
|
+
...(violation.path === undefined ? {} : { nextCommand: `omc describe ${tool.name} --param ${violation.path.split(".")[0]}` }),
|
|
559
|
+
});
|
|
560
|
+
}
|
|
548
561
|
return result.data;
|
|
562
|
+
}
|
|
549
563
|
// T3(GitLab #17,2026-11-04):封闭取值此前只能靠报错试出来(`dir:"desc"`
|
|
550
564
|
// → zod 原生 "Expected 'ASC' | 'DESC'",而 filter op 的枚举又只在拒绝文案里)。
|
|
551
565
|
// 把「这个参数到底收哪些值」直接放进错误信封:zod 的 invalid_enum_value 自带
|
package/dist/tools.js
CHANGED
|
@@ -19,6 +19,7 @@ import { registerRuntimeDataLane } from "./lanes/runtime-data.js";
|
|
|
19
19
|
import { registerWorkflowLane } from "./lanes/workflow.js";
|
|
20
20
|
import { registerConfigDiffTool } from "./lanes/config-diff.js";
|
|
21
21
|
import { registerOrganizationLane } from "./lanes/organization.js";
|
|
22
|
+
import { registerOrgQueryLane } from "./lanes/org-query.js";
|
|
22
23
|
import { registerOnlineJsLane } from "./lanes/online-js.js";
|
|
23
24
|
import { registerProgrammingLane } from "./lanes/programming.js";
|
|
24
25
|
import { registerB2Lane } from "./lanes/b2-registration.js";
|
|
@@ -27,6 +28,7 @@ import { registerListViewLane } from "./lanes/list-view.js";
|
|
|
27
28
|
import { registerReportLane } from "./lanes/report.js";
|
|
28
29
|
import { registerApplyChangesLane } from "./lanes/apply-changes.js";
|
|
29
30
|
import { registerPermLane } from "./lanes/perm.js";
|
|
31
|
+
import { registerFileLane } from "./lanes/file.js";
|
|
30
32
|
import { executionMetadataFor } from "./execution-metadata.js";
|
|
31
33
|
import { attachRefusalRecovery } from "./refusal-guidance.js";
|
|
32
34
|
import { defineTool, ToolRefusalError } from "./tool-types.js";
|
|
@@ -72,6 +74,10 @@ export function buildToolRegistry() {
|
|
|
72
74
|
// workflow.ts instead would create a module cycle.
|
|
73
75
|
registerConfigDiffTool(tools);
|
|
74
76
|
registerOrganizationLane(tools);
|
|
77
|
+
// Organization light-query read faces (searchUnits / department.search /
|
|
78
|
+
// visibleDepartments / departmentTree / users). Declared in their own coverage
|
|
79
|
+
// module so the workflow lane files (owned by a parallel change) stay untouched.
|
|
80
|
+
registerOrgQueryLane(tools);
|
|
75
81
|
registerOnlineJsLane(tools);
|
|
76
82
|
registerProgrammingLane(tools);
|
|
77
83
|
registerB2Lane(tools);
|
|
@@ -79,6 +85,7 @@ export function buildToolRegistry() {
|
|
|
79
85
|
registerListViewLane(tools);
|
|
80
86
|
registerReportLane(tools);
|
|
81
87
|
registerPermLane(tools);
|
|
88
|
+
registerFileLane(tools);
|
|
82
89
|
// LAST: apply_changes looks up sibling write tools at call time, so it must
|
|
83
90
|
// capture the fully-populated registry array.
|
|
84
91
|
registerApplyChangesLane(tools);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { partitionVersion } from "./version-partition.js";
|
|
1
2
|
/** 与版本无关的平台永久缺席面(与 `capability-absences.ts` 同源的事实,此处只投影)。 */
|
|
2
3
|
const PLATFORM_ABSENCES = [
|
|
3
4
|
{
|
|
@@ -58,8 +59,13 @@ function familyOf(version) {
|
|
|
58
59
|
* 给定检测到的版本,返回**当前环境适用**的已知缺口。
|
|
59
60
|
* `version` 为 undefined(无版本证据)时返回全部家族条目——保守方向:
|
|
60
61
|
* 调用方宁可多看到一条,也不要漏掉一个会 404 的端点。
|
|
62
|
+
*
|
|
63
|
+
* 族判定用 `partitionVersion`(version-partition.ts);FAMILY_GAPS 里的
|
|
64
|
+
* `families` 仍是 **X.Y 端点族**(8.0/8.1、1.0/1.1),因为缺口是端点级而不是
|
|
65
|
+
* 整个分区级的——分区级能力差异看 `CAPABILITIES`。
|
|
61
66
|
*/
|
|
62
67
|
export function unsupportedCapabilities(manifest, version) {
|
|
68
|
+
const partition = partitionVersion(version);
|
|
63
69
|
const family = version === undefined ? undefined : familyOf(version);
|
|
64
70
|
const applicable = FAMILY_GAPS.filter((gap) => family === undefined || gap.families === undefined || gap.families.includes(family));
|
|
65
71
|
return {
|
|
@@ -67,7 +73,8 @@ export function unsupportedCapabilities(manifest, version) {
|
|
|
67
73
|
coverageClaim: "known-gaps-only",
|
|
68
74
|
coverageClaimMeaning: KNOWN_GAPS_CLAIM_MEANING,
|
|
69
75
|
detectedVersion: version ?? null,
|
|
70
|
-
inAnchorFamily: version === undefined ? null : version.startsWith(`${manifest.version_family}.`),
|
|
76
|
+
inAnchorFamily: version === undefined ? null : partition.family === "anchor-8.6" || version.startsWith(`${manifest.version_family}.`),
|
|
77
|
+
partition: { family: partition.family, confidence: partition.confidence, matched: partition.matched },
|
|
71
78
|
// 锚点族内部无缺口时也别回空数组造成"没有限制"的错觉——platform-absent 永远在。
|
|
72
79
|
capabilities: [...applicable, ...PLATFORM_ABSENCES],
|
|
73
80
|
};
|