@stalfh233/omc-cli 0.6.79 → 0.6.80
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/lanes/app-contract.js +2 -2
- package/dist/lanes/b2-registration-contract.js +4 -4
- package/dist/lanes/businessrule.js +402 -121
- package/dist/lanes/field-contract.js +17 -8
- package/dist/lanes/field.js +1 -1
- package/dist/lanes/folder-contract.js +1 -1
- package/dist/lanes/folder.js +1 -1
- package/dist/lanes/form-contract.js +3 -3
- package/dist/lanes/form.js +1 -1
- package/dist/lanes/list-view-contract.js +2 -2
- package/dist/lanes/list-view.js +1 -1
- package/dist/lanes/organization.js +7 -7
- package/dist/lanes/report-contract.js +1 -1
- package/dist/lanes/report.js +1 -1
- package/dist/lanes/workflow-contract.js +4 -1
- package/dist/lanes/workflow.js +1 -1
- package/dist/read-shapes.js +6 -4
- package/dist/read.js +37 -1
- package/dist/recipes/field.js +2 -1
- package/dist/recipes/list-view.js +3 -2
- package/dist/tool-search.js +5 -2
- package/dist/tool-types.js +45 -14
- package/package.json +3 -3
- package/skills/omc-capabilities.md +1 -0
|
@@ -155,6 +155,10 @@ export const FIELD_LANE_CONTRACT = Object.freeze({
|
|
|
155
155
|
publishScope: "model",
|
|
156
156
|
controlEmissionPolicy: "ticket 101: controls PHONE(24)/PHOTO(10) are blocked for creation (no BizPropertyType maps to them — BizPropertyType.java:27-54); Tab(500) is a layout container (DataModelInitUtils.java:61-75 recurses panels, never a field); CreatedDeptId(102) is a system-field projection (DefaultPropertyType.java:18-21 → DEPARTMENT_SELECTOR 60, BizMainSystemPropertyRegistry.java:88-101); the scaffold SKIPS any field type without a control mapping — unknown/blocked control types are never auto-created (fail-closed)",
|
|
157
157
|
fieldRowDefaultPolicy: "ticket 108 determination (live 8.6.26 write+read 2026-09-15 + fwb 8.6.39 readback): the 2026-09-14 key unions are MULTI-FIELD UNIONS of designer rows, not per-field required keys — the platform accepts-and-persists minimal rows, so the minimal default + caller passthrough is the INTENTIONAL boundary. Selection families 12/13/14/15 MUST-FIXED to omit dictionaryData (designer rows carry none; live proves the platform merely accepts the extra key — omc_mcp_t108dd readback carried it only because we sent it). Families 0/1/2/9/11/17 keep the designer-carried {dictionaryData:\"\"}; DATE(3) keeps required format (BizObjectFacadeImpl.java:2949); ATTACHMENT(6) stays intentionally empty (system rows often have no options)",
|
|
158
|
+
orgSelectorFieldRowOptions: "org-selector families STAFF_SELECTOR / STAFF_MULTI_SELECTOR / DEPARTMENT_SELECTOR / DEPARTMENT_MULTI_SELECTOR (5/50/51/60/61): the field-row options are a publish-safe shape observed on the yst/fwb publish face (2656 rows) — null or {defaultValue, mappings, virtualField[, noRepeat]}; single-select defaultValue \"\" and multi-select []; deptVisible/multi are FORM-CONTROL discriminator keys (read from control.options via disposeUpdateType/updateSelectionType) and never appear on the field row",
|
|
159
|
+
relationMappingsSource: "the field row's options.mappings is the source of truth for relation carry-through; editing a form control's mappings is recomputed from the field and does not survive readback (live 2026-10-14 中冶). Update chain: field.update with the full options (change only mappings, keep queryCode/displayField/schemaCode/conditions… as-is) → field.publish → form.draft rebuild:false (keeps the existing layout and any online JS) → form.publish → readback. Do NOT use cascadeRepublish on a form that already carries a custom layout or online JS — it re-scaffolds the default form",
|
|
160
|
+
propertyEmptyReadback: "propertyEmpty overrides the data-model not-null declaration; false reopens a field the platform previously created wrongly (required/readonly belong to the form and workflow nodes). bizproperty/list rows do NOT carry propertyEmpty, so readback.propertyEmpty appears only when the draft face returns it — the CLI never fabricates it; readback.committed lists what actually went on the wire",
|
|
161
|
+
listFace: "field.list default face inlines code/name/type(+typeName)/conditions signal/shapeWarning only; the whole choices package is not inlined (a selection field measured ~500B/row) — verify options/subSchema with the code/fields selectors or full:true",
|
|
158
162
|
}),
|
|
159
163
|
wireBindings: Object.freeze({
|
|
160
164
|
acceptedFamilies: Object.freeze([emitterBinding("lanes/field-contract.FIELD_FAMILY_LIST", assertFieldContract)]),
|
|
@@ -170,6 +174,10 @@ export const FIELD_LANE_CONTRACT = Object.freeze({
|
|
|
170
174
|
publishScope: Object.freeze([behaviorBinding("test/field-publish-batch.test.ts#field.publish batch: a single call publishes every draft field", assertFieldContract)]),
|
|
171
175
|
controlEmissionPolicy: Object.freeze([behaviorBinding("test/ticket-101-control-coverage.test.ts#controls 24 (PHONE) and 10 (PHOTO) are declared blocked", assertFieldContract)]),
|
|
172
176
|
fieldRowDefaultPolicy: Object.freeze([behaviorBinding("test/ticket-108-field-row-defaults.test.ts#intentional minimal defaults are pinned per the determination table", assertFieldContract)]),
|
|
177
|
+
orgSelectorFieldRowOptions: Object.freeze([behaviorBinding("test/ticket-79-staff-selector-publish.test.ts#ticket 79: field.create STAFF_SELECTOR emits the observed publish-safe field-row shape", assertFieldContract)]),
|
|
178
|
+
relationMappingsSource: Object.freeze([behaviorBinding("test/form-scaffold.test.ts#form.draft propagates relation mappings into an existing draft", assertFieldContract)]),
|
|
179
|
+
propertyEmptyReadback: Object.freeze([behaviorBinding("test/field-property-empty-readback.test.ts#field.update reports committed and unverifiable write-only propertyEmpty", assertFieldContract)]),
|
|
180
|
+
listFace: Object.freeze([behaviorBinding("test/field-property-empty-readback.test.ts#field.list --full omits propertyEmpty when the platform row omits it", assertFieldContract)]),
|
|
173
181
|
}),
|
|
174
182
|
evidence: Object.freeze([
|
|
175
183
|
"ticket 01-3 (2026-09-11): a DATE(3) field created without options.format 50000s on the first runtime save",
|
|
@@ -183,41 +191,42 @@ export const FIELD_LANE_CONTRACT = Object.freeze({
|
|
|
183
191
|
"ticket 24 live (2026-09-12): FORMULA options readback + RELEVANCE_DATA create/publish/form-binding readback",
|
|
184
192
|
"ticket 61 source (8.6.26): the runtime list face resolves a relation's displayed value from the field ROW's top-level relativePropertyCode, not options.displayField — QueryRuntimeController.java:1214-1226 (getRelativePropertyCode; empty → \"name\" data title); BizPropertyController create/update :851/:987 never auto-fill it, so every relation create/update must carry it",
|
|
185
193
|
"capability-shape-spec.md: field-row and form-control options are declared once with required keys, defaults, and evidence; LOGICAL/ATTACHMENT/ADDRESS/HYPER_LINK/TIME are completed",
|
|
194
|
+
"ticket 79: DDL-intermediate transient retries (≤3, backoff 2s/5s) on a small-resource environment; after a failure wait ≥30s before retrying and never re-create the field",
|
|
186
195
|
]),
|
|
187
196
|
tools: Object.freeze({
|
|
188
197
|
"field.list": Object.freeze({
|
|
189
198
|
scope: "create publish readback",
|
|
190
|
-
description: "List draft/published fields of a model.
|
|
199
|
+
description: "List draft/published fields of a model. 默认面紧凑(整包 choices 不内联);验证 options/subSchema 用 code/fields 选择器或 full:true。",
|
|
191
200
|
}),
|
|
192
201
|
"field.create": Object.freeze({
|
|
193
202
|
scope: "create publish readback",
|
|
194
203
|
description: describeTool("Create a draft field on a model (bizproperty/create).", [
|
|
195
204
|
"Field type must be one of the live-accepted families; nested child tables and OCR/ELECTRONIC_SIGN are out of coverage.",
|
|
196
205
|
`Reserved/system codes are refused (code_reserved): ${[...RESERVED_CODES].join(", ")} — pick a business code (e.g. owner → taskOwner).`,
|
|
197
|
-
"**mapping
|
|
206
|
+
"**mapping 类型兼容**(三层口径):①拦截依据=设计器 `filterCondition`:长文本←长文本/短文本(单向);短文本/下拉/单选←同族;复选框/下拉多选←同族;**其余必须同型**。违反→`mapping-type-incompatible`。②设计器只过滤下拉:保存不复核、平台 `checkOptions` 缺 WORK_SHEET、运行期直接 put——绕过设计器可写违规组合。③后果:50000 或**静默损坏**(`→LOGICAL` 恒 false、`NUMERICAL→DATE` 丢 null、文本→人员/关联=悬空 id、多值→单选串进单值列、`→COMMENT/OCR/SIGN/RELEVANCE_DATA` 不落库)。④映射只在关联单选建记录时生效;`data.save/submit` 不跑映射。",
|
|
198
207
|
"For single/multi-select pass `choices` (e.g. [\"A\",\"B\",\"C\"]) or `options.optionsSet` with optionsType custom/dictionary/businessModel; dictionary uses checkedDictionary/checkedDictionaryCode, businessModel uses schemaCode/sheetDataItem.",
|
|
199
208
|
"For a relation pass `relativeCode` and `options` (schemaCode/displayField/...). `searchFormula` and `conditions` are JSON strings for the relation data restriction/query conditions.",
|
|
200
209
|
"For a relation display field the tool writes the field-row top-level `relativePropertyCode` = options.displayField (the runtime reads THAT key, not options.displayField — QueryRuntimeController.java:1214-1226) and defaults options.displayFieldType:0 + displayFieldFormat:\"\".",
|
|
201
210
|
"For FORMULA pass `options.formulaConfig` (nested JSON string) + `options.persistent:true`; for RELEVANCE_DATA pass `options.relevanceField` + `options.referenceField` + `options.referenceFieldPropertyType`. 数值字段的小数位写 `options.scale`;顶层 `precision` 不被读取,若误传请改为 `precision→options.scale(数值小数位)`。数值显示格式写 `options.format`(`ratio.percentile`=20.00%、`RMB.percentile`=¥2,000.00、`percentile`=2,000.00;**百分比存比值** 0.5→50.00%;别名 percent/currency 归一;全表见 contract 的 numericalFormat)。",
|
|
202
|
-
"org 选人族(STAFF_SELECTOR 等 5/50/51/60/61)字段行 options
|
|
211
|
+
"org 选人族(STAFF_SELECTOR 等 5/50/51/60/61)字段行 options 由工具写成发布安全形状(形状与读面键见 contract field 的 orgSelectorFieldRowOptions)。deptVisible/multi 是**表单控件面**判别键(disposeUpdateType/updateSelectionType 读 control.options,票 69 已由表单脚手架写入控件面),不出现在字段行。",
|
|
203
212
|
]),
|
|
204
213
|
}),
|
|
205
214
|
"field.update": Object.freeze({
|
|
206
215
|
scope: "create publish readback",
|
|
207
216
|
description: describeTool("Update an existing field (bizproperty/update) — merges `options` (and optional `choices`/`relativeCode`) onto the current draft/published record.", [
|
|
208
|
-
"**不切换 propertyType**:field.update 传 propertyType 会被静默忽略(errcode 0
|
|
217
|
+
"**不切换 propertyType**:field.update 传 propertyType 会被静默忽略(errcode 0 但类型不变)——已发布字段改类型只能 field.delete + field.create 重建(mapping 兼容见 field.create)。choices 只对文本单选族(RADIO/DROPDOWN_BOX 等)合法,传给其它类型会被出门校验拒。",
|
|
209
218
|
"字典-backed 可用 `syncDictionary:true` 重填 useDictionariesData;readback 带 face:\"draft\"。",
|
|
210
|
-
"
|
|
219
|
+
"**关联填充映射的事实源是字段行 `options.mappings`**(改控件映射会被重算覆盖)。改映射的正确链:`field.update` 按完整 options 提交(只改 mappings,其余键 queryCode/displayField/schemaCode/conditions… 原值保留)→ `field.publish` → 已发布表单重派生一次:`form.draft`(**rebuild:false**,保留现有布局与已挂在线JS)重存 → `form.publish` → 回读核对。**不要用 field.update 的 cascadeRepublish 刷已带自定义布局/在线JS 的表单**——它会 rebuild 脚手架,可能动到现有自定义布局(rebuild:false 手动链才安全)。",
|
|
211
220
|
"A relation's display field is the field-row top-level `relativePropertyCode` (options.displayField is mirrored but not what the runtime reads); the tool rewrites it when you pass a new displayField.",
|
|
212
|
-
"数值显示格式可改:`options.format
|
|
221
|
+
"数值显示格式可改:`options.format`(白名单)用平台常量(全表见 contract 的 numericalFormat),别名 percent/currency 会归一。字段行 format 优先于表单控件,改完 `field.publish` 即生效(无需重建表单)。",
|
|
213
222
|
"表单条件(`options.requiredFormula`(必填)/`readonlyCondition`(只读)/`displayFormula`(显示))会**自动配对**一条 `bizdatarule` type3/4/5 行:门户**运行时**读字段 options,表单设计器**设计态** Set/Unset 读 `bizdatarule/list`——只写 options 会让设计器显示 Unset。readback.formConditionSync 报 created/updated/deleted/skipped;清空条件传空串(如 requiredFormula:\"\")会同时删规则行;字段未发布时只写 options 并在 skipped 说明原因。",
|
|
214
223
|
"Re-publish with field.publish for the change to take effect — or pass `cascadeRepublish:true` for the one-call chain: field.update → field.publish → form.draft(rebuild) → form.publish(force). The cascade re-scaffolds the default form from the published fields (non-structural control options are preserved); there is no cross-endpoint transaction, so a mid-chain failure is reported honestly as partial (status:partial) with steps/failedStep/envelope (the completed prefix stays).",
|
|
215
|
-
"form.publish(rebuild:true)
|
|
224
|
+
"form.publish(rebuild:true) 可不重碰字段地做同样的表单侧刷新。",
|
|
216
225
|
]),
|
|
217
226
|
}),
|
|
218
227
|
"field.publish": Object.freeze({
|
|
219
228
|
scope: "create publish readback",
|
|
220
|
-
description: "Publish the model's draft fields (bizproperty/publish). **Model-scoped**: one call publishes every draft field — never once per field. Optional `code`/`codes` verify published face; readback 回 `publishedCodes`。`codes` 短路须草稿/发布 options 一致,否则真发布。formBinding 可含 dictionaryStale / relation-mappings-empty
|
|
229
|
+
description: "Publish the model's draft fields (bizproperty/publish). **Model-scoped**: one call publishes every draft field — never once per field. Optional `code`/`codes` verify published face; readback 回 `publishedCodes`。`codes` 短路须草稿/发布 options 一致,否则真发布。formBinding 可含 dictionaryStale / relation-mappings-empty。瞬态重试:DDL 中间态自动重试≤3(退避 2s/5s);仍失败等≥30s 再发,勿重复建字段。**部分交付口径**:有请求的 code 不在发布面时 `allRequestedPresent:false` + `verified:false` + `readback.present:false`(共享写门据此把 deliveryState 降为 WRITE_UNVERIFIED)+ `unpublishedRequested`,并区分 `nonexistentCodes`(草稿面都没有——先 field.list 核对)与 `stillDraftCodes`(模型里有、发布后仍不在发布面)——已发布的字段仍然算发布了,但不要只看 ok/DELIVERED。",
|
|
221
230
|
}),
|
|
222
231
|
"field.delete": Object.freeze({
|
|
223
232
|
scope: "create publish readback",
|
package/dist/lanes/field.js
CHANGED
|
@@ -692,7 +692,7 @@ export function registerFieldLane(tools) {
|
|
|
692
692
|
choices: choicesArg,
|
|
693
693
|
relativeCode: relativeCodeArg,
|
|
694
694
|
subFields: subFieldArg,
|
|
695
|
-
propertyEmpty: z.boolean().optional().describe("覆盖数据模型层的不可为空声明;传 false
|
|
695
|
+
propertyEmpty: z.boolean().optional().describe("覆盖数据模型层的不可为空声明;传 false 可把历史误建的字段改回可为空。读面不回该键,确认看 readback.committed(见 contract field 的 propertyEmptyReadback)"),
|
|
696
696
|
syncDictionary: z
|
|
697
697
|
.boolean()
|
|
698
698
|
.optional()
|
|
@@ -13,7 +13,7 @@ export const FOLDER_WIRE = Object.freeze({
|
|
|
13
13
|
delete: "POST /api/api/app/folders/delete?folderId=",
|
|
14
14
|
}),
|
|
15
15
|
defaults: "createFolder forces type=Folder, defaults parentId to the app package id (root) and does NOT reject duplicate names; updateFolder refuses parentId===id and only writes parentId when non-empty; deleteFolder refuses a non-empty folder (DIRECTORY_NOT_EMPTY) — delete is NOT recursive",
|
|
16
|
-
tree: "apppackage/trees?appCode= returns a NESTED tree (folders carry children[]); reading only the top-level array makes a freshly created child folder look absent — flatten recursively and report path/depth; missing app → applicationExists:false + empty nodes (still ok); default folder marked isDefault via name_i18n.en=defaultGroup; BizModel gets displayPath",
|
|
16
|
+
tree: "apppackage/trees?appCode= returns a NESTED tree (folders carry children[]); reading only the top-level array makes a freshly created child folder look absent — flatten recursively and report path/depth (issue 2026-10-23: a create that answered errcode 0 looked like 'folder not created' when read from the top level); missing app → applicationExists:false + empty nodes (still ok); default folder marked isDefault via name_i18n.en=defaultGroup; BizModel gets displayPath",
|
|
17
17
|
live: "2026-10-23 customer HAR replay: folders/create answered errcode 0 成功创建目录; after the token was attached apppackage/trees returned the full tree",
|
|
18
18
|
customPage: "CustomPageController(8.6.26, @RequestMapping \"/api/custom\"): POST /create takes AppFunctionVO and requires parentId + a non-null menuPointType (getMenuPointType().toString() NPEs to 50000 otherwise) and forces type=Page; POST /page/content/update writes draftContent (existDraft=true) and /page/content/publish writes publishedContent (published=true); BOTH first do getAppFunctionByCode(code) and throw BIZ_SCHEMA_NOT_EXIST when the tree node is missing — node first, then body",
|
|
19
19
|
});
|
package/dist/lanes/folder.js
CHANGED
|
@@ -198,7 +198,7 @@ function folderTools(tools) {
|
|
|
198
198
|
kind: "read",
|
|
199
199
|
lane: LANE,
|
|
200
200
|
scope: T["folder.tree"].scope,
|
|
201
|
-
description: "读取**应用树**(应用**内**目录/分组 + 模型节点;不是应用包本身——应用包用 app.*)。**递归展平**并给出每个节点的 `path`/`depth`(平台 `apppackage/trees?appCode=` 返回嵌套 children
|
|
201
|
+
description: "读取**应用树**(应用**内**目录/分组 + 模型节点;不是应用包本身——应用包用 app.*)。**递归展平**并给出每个节点的 `path`/`depth`(平台 `apppackage/trees?appCode=` 返回嵌套 children,只看顶层会误判“目录没建成”)。`foldersOnly:true` 只回目录(type=Folder)。目录 id 就是 folder.update/delete 与 model.move/model.create 的 `folderId/parentId`。不存在的应用回 `applicationExists:false` + 空树(仍 ok,不拒——与「存在但空」可区分)。平台自动建的默认分组节点带 `isDefault:true`(判据:name_i18n.en=defaultGroup)。",
|
|
202
202
|
inputSchema: {
|
|
203
203
|
environment: environmentArg,
|
|
204
204
|
applicationCode: z.string().optional().describe("应用 code;省略用配置默认应用(别名:appCode)"),
|
|
@@ -15,14 +15,14 @@ export const FORM_WIRE = Object.freeze({
|
|
|
15
15
|
publishAlreadyPublished: "published:true with force!==true skips as already-published",
|
|
16
16
|
forceRepublish: "onlinejs.compose passes force:true so it can re-promote after a prior publish",
|
|
17
17
|
emptyLayoutGuard: "ticket 74: the platform designer's Save is NOT lossless — it clears draftViewJson to \"[]\" and draftAttributesJson to \"{}\"; form.draft refuses CALLER-PROVIDED empty layouts (blocker form-empty-layout, zero wire, escape allowEmptyLayout:true) and form.publish refuses to promote a draft with fewer controls than the published face (blocker form-publish-degrade, escape allowDegrade:true); the recovery path is the form version history (/api/api/app/bizsheet/history/list) — fetch the intact version's view/attributes originals and rewrite the draft before publishing",
|
|
18
|
-
formButtons: "form toolbar buttons are a three-layer configuration (live 2026-10-23, 1.1.25; shape corrected by GitLab #38 live 8.6.26 2026-11-16): (1) bizsheet.options.customButtonJson — a JSON ARRAY with each entry's actionConfig as an OBJECT (the designer's save shape; a STRINGIFIED array is double encoding the platform stores verbatim and the form page then silently drops every button — the pre-r72 CLI form, now unwrapped+healed on every write and linted via shapeWarning in readbacks) — is the authoring face; ModelManagementFacadeImpl.publishBizForm:1022 turns it into h_biz_button rows with triggerType=FORM, triggerCode=<formCode> at publish; (2) those rows are what ActionPermissionHandler.getByTriggerTypeAndCode(FORM, bizCode) reads; (3) whether a button shows at a node is filtered by the workflow activity's buttonPermission.customBtns[].enabled (the designer 表单操作 checkboxes) plus showPermCode; the execute face is POST /api/api/runtime/form/executeCustomButton {bizButtonModel, bizObjectList:[<full bizObject>], reacquireDataFromDb:true} — NOT the list-button launcher path with ids[]",
|
|
18
|
+
formButtons: "form toolbar buttons are a three-layer configuration (live 2026-10-23, 1.1.25; shape corrected by GitLab #38 live 8.6.26 2026-11-16): (1) bizsheet.options.customButtonJson — a JSON ARRAY with each entry's actionConfig as an OBJECT (the designer's save shape; a STRINGIFIED array is double encoding the platform stores verbatim and the form page then silently drops every button — the pre-r72 CLI form, now unwrapped+healed on every write and linted via shapeWarning in readbacks) — is the authoring face; ModelManagementFacadeImpl.publishBizForm:1022 turns it into h_biz_button rows with triggerType=FORM, triggerCode=<formCode> at publish; (2) those rows are what ActionPermissionHandler.getByTriggerTypeAndCode(FORM, bizCode) reads; (3) whether a button shows at a node is filtered by the workflow activity's buttonPermission.customBtns[].enabled (the designer 表单操作 checkboxes) plus showPermCode; the execute face is POST /api/api/runtime/form/executeCustomButton {bizButtonModel, bizObjectList:[<full bizObject>], reacquireDataFromDb:true} — NOT the list-button launcher path with ids[]; when executeCustomButton answers 10005, retry through the equivalent face rule.run (launcher/domain_service_runtime/<schema>/<rule> + ids[]) — the same bound rule is proven usable there (r28b live), so never loop on executeCustomButton; a newly authored button needs code/name/bindAction/operateType plus triggerCode/triggerType/showPermCode/showPermType + name_i18n (JSON string form) + addviewType (useLocation defaults to FORM; missing keys answer platform 40000)",
|
|
19
19
|
actionsColumns: "ticket 100: draftActionsJson/publishedActionsJson are REAL bizsheet columns (BizForm.java:95-100 @SerializableField; BizFormModel.java:59-62 serialized by bizsheet/get) — the designer writes draftActionsJson on save and both faces on publish (frontend-dist/admin/js/4280.cfa75764.js offsets 193538/185347); form.get full:true surfaces them; publish promotes draftActionsJson → publishedActionsJson",
|
|
20
20
|
sheetListFace: "form.list: GET /api/api/app/bizsheet/list?schemaCode= (BizFormController.java:137-152 → ModelManagementFacadeImpl.getBizForms:481-488) answers the BizFormHeaderModel HEADER projection only — code, name, schemaCode, published, formType, sortKey, icon. formType is the INTEGER index (@JsonValue getIndex(), BizFormType.java:45-48): 0 DEFAULT_SHEET / 1 CUSTOMIZE_SHEET / 2 PRINT_TEMPLATE — decoded to the name with formTypeIndex kept (ADR 0002). existDraft/buttonCount/hasCustomScript are NOT on this face, so the default read never fabricates them: detail:true pays 1+N bizsheet/get for the content-derived faces. published is the same platform flag bit (r79-04): publish→draft leaves it false while the content is intact — the flag is reported as-is, content judgement needs detail:true. HTTP 404 means the version family has no /list endpoint: the tool answers sheetListUnavailable:true + the default slot only, never a fabricated list; a 601003 业务模型不存在 refusal is modelPresent:false (zero retries)",
|
|
21
21
|
});
|
|
22
22
|
const FORM_GET_DESCRIPTION = '读取默认表单(bizsheet/get)的发布状态与控件清单(紧凑默认)。**发布态以返回的 `published` / `existDraft` 布尔为准**(`published:true`=已发布;`published:false,existDraft:true`=只有草稿,**未发布**)——不要用 `publishedControlCodes` 是否非空来推断(草稿字段会让它非空,误判为已发布)。**每个模型交付前其默认表单必须 `published:true`**:用 `configure_form` 或 `form.draft(rebuild:true)`+`form.publish` 发布,并逐模型 `form.get` 核对。`full:true` 还返回 `options` 与 `customButtonJson`(表单工具栏按钮,数组原样;库里是字符串脏形时附 `customButtonJsonShapeWarning`——线上 #38 前端按钮不渲染)。传 `controls:["code",…]` 只取指定控件的 options(如关联控件的 mappings);传 `full:true` 才返回 draft/published 的完整 view/attributes/html/actions JSON(actions 列为设计器保存/发布的表单级按钮动作)。体积大,仅在需要整体布局时用。';
|
|
23
|
-
const FORM_DRAFT_DESCRIPTION = "Save the default-form DRAFT (bizsheet/update). Reads the current sheet, merges the caller's explicit draftViewJson/draftAttributesJson (or preserves the existing draft); when both are absent on a fresh default form, composes the designer-standard scaffold from the model's published fields. A redundant field (relation-mapping carry-through target) always stays bound; with no workflow it is hidden in the design (options.visible=false), with a workflow it stays visible for per-node propertyPermissions. Pass `draftHtmlJson` to thread custom online-script HTML through. Empty-layout guard: explicitly passing \"[]\"/\"{}\" view/attributes is refused (form-empty-layout) — the platform designer's Save is NOT lossless and clears drafts to exactly that shape; escape with allowEmptyLayout:true, and recover cleared drafts from the form version history (/api/api/app/bizsheet/history/list). **读回原样回写**:从 `form.get` 取回的 view/attributes 直接回传时加 `fromReadback:true`——工具会与已存草稿/发布面逐字比对,一致才放行(平台自身布局可能含子表列行/系统行默认宽度),被改动过的面照常按 validation 拒绝。**表单工具栏按钮**:`buttons`(数组)或 `customButtonJson`(原样字符串)写进 `biz_sheet.options.customButtonJson`(**数组+actionConfig 对象**,设计器同形——线上 #38:字符串形=双重编码,前端按钮不渲染,重写即自愈);**要到 form.publish 才生成 h_biz_button(triggerType=FORM)**,且表单页是否显示还取决于流程节点 `buttonPermission.customBtns[].enabled`(设计器「表单操作」勾选)。`useLocation` 用 FORM/ROW/LIST,表单工具栏按钮用 FORM
|
|
23
|
+
const FORM_DRAFT_DESCRIPTION = "Save the default-form DRAFT (bizsheet/update). Reads the current sheet, merges the caller's explicit draftViewJson/draftAttributesJson (or preserves the existing draft); when both are absent on a fresh default form, composes the designer-standard scaffold from the model's published fields. A redundant field (relation-mapping carry-through target) always stays bound; with no workflow it is hidden in the design (options.visible=false), with a workflow it stays visible for per-node propertyPermissions. Pass `draftHtmlJson` to thread custom online-script HTML through. Empty-layout guard: explicitly passing \"[]\"/\"{}\" view/attributes is refused (form-empty-layout) — the platform designer's Save is NOT lossless and clears drafts to exactly that shape; escape with allowEmptyLayout:true, and recover cleared drafts from the form version history (/api/api/app/bizsheet/history/list). **读回原样回写**:从 `form.get` 取回的 view/attributes 直接回传时加 `fromReadback:true`——工具会与已存草稿/发布面逐字比对,一致才放行(平台自身布局可能含子表列行/系统行默认宽度),被改动过的面照常按 validation 拒绝。**表单工具栏按钮**:`buttons`(数组)或 `customButtonJson`(原样字符串)写进 `biz_sheet.options.customButtonJson`(**数组+actionConfig 对象**,设计器同形——线上 #38:字符串形=双重编码,前端按钮不渲染,重写即自愈);**要到 form.publish 才生成 h_biz_button(triggerType=FORM)**,且表单页是否显示还取决于流程节点 `buttonPermission.customBtns[].enabled`(设计器「表单操作」勾选)。`useLocation` 用 FORM/ROW/LIST,表单工具栏按钮用 FORM。字段发布后如需刷新已发布表单的控件映射,用本工具 rebuild:false 重存(保留现有布局与在线JS)再 form.publish。";
|
|
24
24
|
const FORM_PUBLISH_DESCRIPTION = "Publish the default form (bizsheet/publish, proven shape: draft*Json promoted to published*Json verbatim) with published-face readback. **不影响在线 JS**:本工具只提拔布局草稿;改 JS 请用 onlinejs.compose(它自己会连同整张表单一起发布,不必再调本工具)。 Degrade guard: refuses to promote a draft carrying FEWER controls than the published face (form-publish-degrade) — the designer's Save clears drafts non-losslessly; recover via the form version history (/api/api/app/bizsheet/history/list) and rewrite the draft first, or pass allowDegrade:true to force the reduction. rebuild:true is the one-call refresh: discard the existing draft, re-scaffold from the published fields (non-structural control options preserved), then force-promote — use it after a field shape change. **表单工具栏按钮**:传 `buttons`(或 `customButtonJson`)→ 写进 `options.customButtonJson` 并在本次 publish 生成 `h_biz_button(triggerType=FORM, triggerCode=<formCode>)`(平台 `publishBizForm:1022`);`options.customButtonJson` 以**数组**写入(条目 `actionConfig` 为对象,设计器同形——线上 #38:字符串形=双重编码,前端按钮不渲染,回执给 formButtonsShapeWarning);表单页是否显示再由流程节点 `buttonPermission.customBtns[].enabled` 过滤。";
|
|
25
|
-
const FORM_RUN_BUTTON_DESCRIPTION = "执行表单工具栏按钮(平台同款面:`POST /api/api/runtime/form/executeCustomButton`,body `{bizButtonModel, bizObjectList:[<完整业务对象>], reacquireDataFromDb:true}`)。**与列表行按钮不同**:列表按钮发 `launcher/domain_service_runtime/<schema>/<rule>` + `ids[]`(用 `rule.run`),表单按钮带**整条记录**,不能互换。按钮来源 `GET /api/api/system/getCustomButtons`(只列 triggerType=FORM 的 h_biz_button)。前提:按钮已由 `form.publish` 的 `buttons`/`customButtonJson` 生成。返回是执行结果信封,规则副作用用 `data.load` 另读;被规则 UPDATE 的目标行须是 COMPLETED(引擎查不到 DRAFT)。`302045` = 数据被占用。**`10005`
|
|
25
|
+
const FORM_RUN_BUTTON_DESCRIPTION = "执行表单工具栏按钮(平台同款面:`POST /api/api/runtime/form/executeCustomButton`,body `{bizButtonModel, bizObjectList:[<完整业务对象>], reacquireDataFromDb:true}`)。**与列表行按钮不同**:列表按钮发 `launcher/domain_service_runtime/<schema>/<rule>` + `ids[]`(用 `rule.run`),表单按钮带**整条记录**,不能互换。按钮来源 `GET /api/api/system/getCustomButtons`(只列 triggerType=FORM 的 h_biz_button)。前提:按钮已由 `form.publish` 的 `buttons`/`customButtonJson` 生成。返回是执行结果信封,规则副作用用 `data.load` 另读;被规则 UPDATE 的目标行须是 COMPLETED(引擎查不到 DRAFT)。`302045` = 数据被占用。**`10005` 换等价面 `rule.run`(见 contract form),勿反复重试。**";
|
|
26
26
|
const CONFIGURE_FORM_DESCRIPTION = "High-level: bind fields into the default form and publish it (form.draft → form.publish), subject to the write permission gate. Delegates to the proven form.draft scaffold + form.publish paths so the real empty-form layout (and any caller-supplied draftHtmlJson) is persisted and promoted — never bypasses with a shortcut body. `sheetCode` is optional: omitted means the model's default sheet (sheetCode = schemaCode).";
|
|
27
27
|
const FORM_LIST_DESCRIPTION = "列出模型的多张表单(`/api/api/app/bizsheet/list?schemaCode=`,header-only 投影):每行 `sheetCode`/`name`/`formType`(整数索引解码为名字,另带 formTypeIndex)/`published`。默认只发 1 次 wire;`detail:true` 才逐面 `bizsheet/get`(上限 maxSheets=12,超出回 partial+omittedSheets)补 existDraft/controlCount/buttonCount/publishedActionCount/hasCustomScript/faces。**默认面不伪造这些内容推导键,也不改旗标**:`published` 是平台旗标位(publish→draft 后它为 false 而内容俱在),判「有没有发布面内容」用 detail:true 的 faces。业务模型不存在 → modelPresent:false;该版本族无 /list 端点(HTTP 404)→ sheetListUnavailable:true + 只回默认槽(明确标注是推断,不是清单)。`defaultSheetCode` 由清单推导(formType=DEFAULT_SHEET 且 sheetCode===schemaCode),权威仍是 form.get 的显式 sheetCode。";
|
|
28
28
|
export const FORM_LANE_CONTRACT = Object.freeze({
|
package/dist/lanes/form.js
CHANGED
|
@@ -564,7 +564,7 @@ export function registerFormLane(tools) {
|
|
|
564
564
|
buttons: z
|
|
565
565
|
.array(z.record(z.unknown()))
|
|
566
566
|
.optional()
|
|
567
|
-
.describe("表单工具栏按钮(写进 biz_sheet.options.customButtonJson;publish 时才生成 h_biz_button(triggerType=FORM)
|
|
567
|
+
.describe("表单工具栏按钮(写进 biz_sheet.options.customButtonJson;publish 时才生成 h_biz_button(triggerType=FORM))。每条必填键见 contract form 的 formButtons;code 语义化"),
|
|
568
568
|
customButtonJson: z.string().optional().describe("buttons 的原样 JSON 数组字符串(与 buttons 互斥;用于把 form.get 读回值直接回写)"),
|
|
569
569
|
buttonsMode: z.enum(["merge", "replace"]).optional().describe("默认 merge:按 code 增量 upsert(改一个按钮不必重发全表);replace:整表替换"),
|
|
570
570
|
removeButtonCodes: z.array(z.string().min(1)).optional().describe("要删除的按钮 code(仅 merge 模式)"),
|
|
@@ -7,7 +7,7 @@ import { mergeActions, PLATFORM_DEFAULT_LIST_ACTIONS } from "./list-view-shapes.
|
|
|
7
7
|
* single source for the handler descriptions and the coverage declarations.
|
|
8
8
|
*/
|
|
9
9
|
export const LIST_VIEW_WIRE = Object.freeze({
|
|
10
|
-
createBody: "query/create body {schemaCode, name, code, type:'LIST', showOnPc:false, published:false} (forced design-time defaults)",
|
|
10
|
+
createBody: "query/create body {schemaCode, name, code, type:'LIST', showOnPc:false, published:false} (forced design-time defaults); code is required by the platform — a missing code is refused with errcode 10005 「编码不能为空」 on a wasted live round trip (r26 live), so the tool fills schemaCode when code is omitted",
|
|
11
11
|
createReadback: "query/get_header readback",
|
|
12
12
|
configureDefault: "code omitted means the default view (code=schemaCode)",
|
|
13
13
|
configureColumns: "query/get then query/update: for each fieldCodes entry, append a missing column as visible, or repair an existing column's name/propertyType/displayFormat/visible in place (never skip an already-present column), then query/get readback; propertyType comes from published field metadata; NUMERICAL displayFormat is derived from the field's 0-based `options.scale` (0=integer,1=1dp,2=2dp,3=3dp…8=8dp) through the platform parseNumber table ({0:1,1:2,2:3,3:11,4:12,23:…, percent 0..:4/5/6/13/14/27..30, currency ¥ 2dp..:7/15/16/31..34} — verified live: scale 2 → displayFormat 3 = 2 decimals) and DATE displayFormat from options.format (1=yyyy-MM-dd,2=datetime,3=minute,4=yyyy-MM); the readback columns array carries {propertyCode,propertyType,displayFormat,visible,sumType} and added/updated name the fieldCodes touched",
|
|
@@ -126,7 +126,7 @@ export const LIST_VIEW_LANE_CONTRACT = Object.freeze({
|
|
|
126
126
|
}),
|
|
127
127
|
"listview.configure": Object.freeze({
|
|
128
128
|
scope: LIST_VIEW_SCOPE,
|
|
129
|
-
description: "
|
|
129
|
+
description: "配置列表视图(列、排序、查询条件、行/列表按钮、呈现、自定义按钮、视图头扩展选项与视图类型)。**code 语义**:省略 `code`(或 code=schemaCode)= 配置**默认视图**(code = 模型 code,8.6.41 起默认视图同样可 configure),日常配列就用它,**不要先 listview.create**(会多一个视图);改默认视图影响所有用户;仅需第二个视图时才 listview.create(configure 带 code 指向它)。读回 query,按 `fieldCodes` 追加缺失列或**原地修正**已存在列的 name/propertyType/displayFormat/visible(不再跳过既有列),置为可见;数值列 displayFormat 由字段 0 基 `options.scale` 推导(0=整数,1=1位,2=2位,3=3位…8=8位)、日期列由 `options.format` 推导(1/2/3/4),回显 `columns` 为完整列对象并给出 `added`/`updated`;`sorts`→querySorts(direction ASC/DESC)、`conditions`→queryConditions(**比较符是 `filterType`(QueryFilterType 字符串枚举 Eq/NotEq/…;别名 operator/op;省略时按 propertyType 取平台默认)**、displayType/choiceType/options 字符串解码;写后条件回读等价校验给出 conditionReadback)、`actions`→queryActions(queryActionType QUERY(1)…BATCH_SUBMIT(23)、associationType BIZSHEET(0)/WORKFLOW(1))、`presentation`→queryPresentation(htmlJson/actionsJson/columnsJson/queryViewDataSource/schemaRelations/options 均为 JSON 字符串,合法 JSON 读回解码)、`buttons`→customButtons(写面 customButtonJson JSON 数组字符串;bindAction/useLocation/operateType/showPermType 以枚举名发送;triggerType 强制 QUERY、triggerCode=视图 code、sortKey 按数组位,缺省回传读面 customButtons 有效集;ADD_DATA/FORM 目标绑定走 actionConfig——schemaCodeVal+formListData+configureList,targetCode/targetObjCode 对其无效会被拒;高层参数 targetModel/targetForm/configureList 从读回元数据展开,未解析即 listview-button-target-unresolved 零副作用拒)、`options`→视图头 BizQueryOption(`pagingSetting`{pageSize,showTotal} 分页、`listViewModeSetting`{mode,canSwitch} 列表模式,缺省回传读面有效 options、提供时整体替换,rowColorSetting 无 8.6.26 类证据故对象形态拒绝)与 `presentationType`→QueryPresentationType(LIST/BOARD/CALENDAR/GANTT,缺省回传读面有效值;GANTT 必须同时提供 `gantt`→queryGanttModel 且 startTimePropertyCode/endTimePropertyCode/titlePropertyCode 非空,缺省不触碰既有 gantt)与 `queryLayer`→层级展示(BizQueryLayer[] 数组原样发送)及 `multiTableHeaderConfig`→多级表头(HeaderConfig[] JSON 字符串;缺省回传读面有效值、提供时整体替换)省略时不触碰既有值,提供时整体替换并经出门前 dry-lint;`query/update` 后回读。`queryConditionMap` 为只读派生(query/get 带 formCode 子表条件时才出现),非配置输入。**发布语义**:`query/update` 自动置 publish=TRUE——视图无草稿/发布两态、无需独立发布步骤。**依赖顺序**:视图与表单脚手架都依赖**已发布字段**,规范顺序 model.create → field.create → field.publish(模型级)→ form.draft → form.publish →(需要第二视图时 listview.create)→ listview.configure → rule.save → rule.enable → workflow。",
|
|
130
130
|
}),
|
|
131
131
|
"listview.delete": Object.freeze({
|
|
132
132
|
scope: LIST_VIEW_SCOPE,
|
package/dist/lanes/list-view.js
CHANGED
|
@@ -612,7 +612,7 @@ export function registerListViewLane(tools) {
|
|
|
612
612
|
inputSchema: {
|
|
613
613
|
schemaCode: z.string().min(1),
|
|
614
614
|
name: z.string().min(1),
|
|
615
|
-
code: z.string().optional().describe("视图 code
|
|
615
|
+
code: z.string().optional().describe("视图 code;省略时默认取 schemaCode。平台必填,由本工具代填(案卷见 contract list-view 的 createBody)"),
|
|
616
616
|
},
|
|
617
617
|
execute: async (session, args) => {
|
|
618
618
|
// r26 真机:`code` 在 schema 里可选,但三处读面/rollback 都用
|
|
@@ -475,7 +475,7 @@ export function registerOrganizationLane(tools) {
|
|
|
475
475
|
search: { intents: ["新建角色组", "建一个角色组", "创建角色分组"] },
|
|
476
476
|
lane: LANE,
|
|
477
477
|
scope: SCOPES.groupCreate,
|
|
478
|
-
description: "创建角色组(`POST organization/role/add_role_group`)。返回 roleGroupId,角色挂在它下面。**corpId 默认写当前企业**(`session.enterpriseId()`):平台的 `corpId` 只从 body 取,body 缺省时才按 parentId 反查企业设置,查不到就 NPE(被吞成 errcode 0);`corpId=\"other\"` 是平台合法的「非组织分组」语义,只有明确要建非组织分组时才传。**parentId 必填**:空值会 50000;根级组请传 `\"0\"
|
|
478
|
+
description: "创建角色组(`POST organization/role/add_role_group`)。返回 roleGroupId,角色挂在它下面。**corpId 默认写当前企业**(`session.enterpriseId()`):平台的 `corpId` 只从 body 取,body 缺省时才按 parentId 反查企业设置,查不到就 NPE(被吞成 errcode 0);`corpId=\"other\"` 是平台合法的「非组织分组」语义,只有明确要建非组织分组时才传。**parentId 必填**:空值会 50000;根级组请传 `\"0\"`(path=组名);挂到既有组下则传该组 id(`org.role.list` 的 groups[].id)。创建回执会再读一次 role/list,补上真实 `code`/`parentId`/`path`(平台 add 瞬间 code 常为 null)。",
|
|
479
479
|
inputSchema: {
|
|
480
480
|
roleGroupName: z.string().min(1).describe("角色组名称(界面显示的分组名)"),
|
|
481
481
|
parentId: z.string().min(1).describe("上级角色组 id。**必填**:空值直接 50000 parentIds cannot be empty。根级组传 \"0\";挂到既有组下传该组 id(如「默认」组)。挂到既有组=给该组添子节点(会改既有组的层级语义)"),
|
|
@@ -524,7 +524,7 @@ export function registerOrganizationLane(tools) {
|
|
|
524
524
|
search: { intents: ["建角色", "新建角色", "创建角色"] },
|
|
525
525
|
lane: LANE,
|
|
526
526
|
scope: SCOPES.roleCreate,
|
|
527
|
-
description: "创建角色(界面「分组」;`POST organization/role/add_role`)。返回 roleId;code 创建时 null、随后补 SYS<时间戳>,要稳定编码就传 code。**所属角色组推荐用 `roleGroupCode`(如 SYS_1000000)**:`org.role.list` 的紧凑码表只给 `code|name`、不显示组 id,而平台对错的 roleGroupId
|
|
527
|
+
description: "创建角色(界面「分组」;`POST organization/role/add_role`)。返回 roleId;code 创建时 null、随后补 SYS<时间戳>,要稳定编码就传 code。**所属角色组推荐用 `roleGroupCode`(如 SYS_1000000)**:`org.role.list` 的紧凑码表只给 `code|name`、不显示组 id,而平台对错的 roleGroupId **静默接受**——会变成看不见的孤儿角色。工具会把 code 归一成真实 id,并在创建后回读可见性。",
|
|
528
528
|
inputSchema: {
|
|
529
529
|
roleName: z.string().min(1),
|
|
530
530
|
roleGroupCode: z.string().min(1).optional().describe("所属角色组的 code(org.role.list 的 groups 码表,如 SYS_1000000)或名称。**推荐**;与 roleGroupId 二选一"),
|
|
@@ -867,7 +867,7 @@ export function registerOrganizationLane(tools) {
|
|
|
867
867
|
search: { intents: ["新建员工", "加一个用户", "创建员工账号", "加人"] },
|
|
868
868
|
lane: LANE,
|
|
869
869
|
scope: SCOPES.userCreate,
|
|
870
|
-
description: "新建员工账号(`POST organization/user/add`)。必填 name/username/departmentId
|
|
870
|
+
description: "新建员工账号(`POST organization/user/add`)。必填 name/username/departmentId;返回 userId(recId);平台不接受的 null 数组由工具补齐,初始密码由平台默认策略生成。",
|
|
871
871
|
inputSchema: {
|
|
872
872
|
name: z.string().min(1),
|
|
873
873
|
username: z.string().min(1).describe("登录账号"),
|
|
@@ -923,7 +923,7 @@ export function registerOrganizationLane(tools) {
|
|
|
923
923
|
search: { intents: ["改员工信息", "修改用户资料", "更新员工"] },
|
|
924
924
|
lane: LANE,
|
|
925
925
|
scope: SCOPES.userUpdate,
|
|
926
|
-
description: "改员工(`POST organization/user/modify`)。先 user/info
|
|
926
|
+
description: "改员工(`POST organization/user/modify`)。先 user/info 读现状再合并;平台不接受的 null 数组由工具补齐。可改姓名/部门/手机/邮箱/角色/启停。",
|
|
927
927
|
inputSchema: {
|
|
928
928
|
userId: z.string().min(1),
|
|
929
929
|
name: z.string().optional(),
|
|
@@ -1059,7 +1059,7 @@ export function registerOrganizationLane(tools) {
|
|
|
1059
1059
|
search: { intents: ["删除角色", "删掉这个角色"] },
|
|
1060
1060
|
lane: LANE,
|
|
1061
1061
|
scope: SCOPES.roleDelete,
|
|
1062
|
-
description: "删除角色(`GET organization/role/strike_out_role?ids
|
|
1062
|
+
description: "删除角色(`GET organization/role/strike_out_role?ids=`)。平台**拒绝删除仍有成员的角色**:默认先读成员并拒绝;拒绝回执带可直接粘贴的 `org.role.removeUsers` 命令。`force:true` 的语义是**先逐人移出全部成员,再删除角色**(不是强行绕过平台校验)。**可用 roleCode 代替 roleId**(org.role.list 的码表只有 code)。",
|
|
1063
1063
|
inputSchema: {
|
|
1064
1064
|
roleId: z.string().min(1).optional().describe("角色 id(32 位 hex);与 roleCode 二选一"),
|
|
1065
1065
|
roleCode: z.string().min(1).optional().describe("角色 code(org.role.list 的 roles 码表,如 qc_manager)或名称"),
|
|
@@ -1192,7 +1192,7 @@ export function registerOrganizationLane(tools) {
|
|
|
1192
1192
|
search: { intents: ["给角色加用户", "角色加成员", "给角色加人"] },
|
|
1193
1193
|
lane: LANE,
|
|
1194
1194
|
scope: SCOPES.addUsers,
|
|
1195
|
-
description: "加成员并(可选)一次设好管理范围(`add_role_user` + 逐人 `update_ouscope`,一个工具调用)。users[].id 必须是 recId(org.user.search 的 id);传 `scopes`
|
|
1195
|
+
description: "加成员并(可选)一次设好管理范围(`add_role_user` + 逐人 `update_ouscope`,一个工具调用)。users[].id 必须是 recId(org.user.search 的 id);传 `scopes` 会应用到本次新增的每个人。加完回读成员与范围(`add_role_user` 不写 `ouScope`,范围由工具另写)。",
|
|
1196
1196
|
inputSchema: {
|
|
1197
1197
|
roleId: z.string().min(1).optional().describe("角色 id(32 位 hex);与 roleCode 二选一"),
|
|
1198
1198
|
roleCode: z.string().min(1).optional().describe("角色 code(org.role.list 的 roles 码表)或名称——省掉取 artifact 找 id"),
|
|
@@ -1275,7 +1275,7 @@ export function registerOrganizationLane(tools) {
|
|
|
1275
1275
|
search: { intents: ["把角色里的用户移掉", "角色移除用户"] },
|
|
1276
1276
|
lane: LANE,
|
|
1277
1277
|
scope: SCOPES.removeUsers,
|
|
1278
|
-
description: "把成员移出角色(`POST organization/role/strike_out_role_user
|
|
1278
|
+
description: "把成员移出角色(`POST organization/role/strike_out_role_user`)。工具按平台要求的 JSON body `{roleId,userIds:[...]}` 发送。只移出角色,不删用户。",
|
|
1279
1279
|
inputSchema: {
|
|
1280
1280
|
roleId: z.string().min(1).optional().describe("角色 id(32 位 hex);与 roleCode 二选一"),
|
|
1281
1281
|
roleCode: z.string().min(1).optional().describe("角色 code(org.role.list 的 roles 码表)或名称"),
|
|
@@ -11,7 +11,7 @@ import { LANES } from "./lane-ids.js";
|
|
|
11
11
|
export const REPORT_WIRE = Object.freeze({
|
|
12
12
|
surface: "报表是两层:平台通道 /api/api/report/* 维护报表页(app 功能树 type=Report,errcode 信封);BI 通道 /dashboard/v1/* 维护 dashboard 配置与图表(成功 {data},失败 {errorCode,errorMessage,errorType:BIZ},HTTP 仍 200)。BI 的 objectId = report/get 的 data.id(首次保存后 reportObjectId 同值)。",
|
|
13
13
|
authConfig: "BI 每个请求 body 必须带 config:{token,reportCode,appCode} 与外层 corpId(实测缺 config 的写会返回 {data:true} 但不生效——静默 no-op);token 取会话登录 token,corpId 为该部署 BI corp id(aozhe 实测 \"a\")。平台通道照旧 Authorization + X-LowCode-Corpid。",
|
|
14
|
-
reportPage: "report/create body {code,name,name_i18n:'{\"zh\":\"...\"}',parentId:<folder id>,icon,pcAble,mobileAble,appCode}(parentId 必填,否则断言失败);report/update 同形再加 id;report/logical_delete?code=。",
|
|
14
|
+
reportPage: "report/create body {code,name,name_i18n:'{\"zh\":\"...\"}',parentId:<folder id>,icon,pcAble,mobileAble,appCode}(parentId 必填,否则断言失败);report/update 同形再加 id;report/logical_delete?code=。code 上限 28 字符:超长由平台 10005 拒(r33 实证),工具按 max(28) 在提交前本地拒绝。",
|
|
15
15
|
reportPageSave: "report/v2/reportpage body {report:{objectId,title,attributes:'<json字符串>',global:'<json字符串>'},corpId,config} → {data:'<objectId>'};用于首次创建 BI dashboard(全新报表页在 BI 侧不存在,需先 save 再读写图表)。",
|
|
16
16
|
chartWrite: "chart/addChart body {charts:[...]}、chart/updateChart body {charts:[...]}、chart/removeCharts body {objectIds:[<chart uuid>...]}、chart/removeChart body {objectId:<uuid>}(均需 corpId+config)。图表字段 uuid/type/position/dataSourceId/mainTable/data 等,position/data/styles 多为 JSON 字符串。",
|
|
17
17
|
globalAttributes: "report/saveGlobal body {objectId,global}、report/saveAttributes body {attributes,objectId}(均需 corpId+config);global/attributes 自身是 JSON 字符串。",
|
package/dist/lanes/report.js
CHANGED
|
@@ -592,7 +592,7 @@ export function registerReportLane(tools) {
|
|
|
592
592
|
inputSchema: {
|
|
593
593
|
// r33: the platform refuses report codes longer than 28 chars (errcode
|
|
594
594
|
// 10005) — enforce offline so the shape never costs a wire round trip.
|
|
595
|
-
code: z.string().min(1).max(28).describe("报表 code;平台上限 28
|
|
595
|
+
code: z.string().min(1).max(28).describe("报表 code;平台上限 28 字符,超长提交前即拒(errcode 10005)"),
|
|
596
596
|
name: z.string().min(1).max(60),
|
|
597
597
|
appCode: z.string().min(1),
|
|
598
598
|
parentId: z
|
|
@@ -80,6 +80,7 @@ export const WORKFLOW_WIRE = Object.freeze({
|
|
|
80
80
|
mutuallyExclusiveBinding: "同一处理器绑定多条规则时它们**全部执行、无互斥**:审批通过/驳回这类互斥结果不要用两条各自 FIXED 赋值都绑 end(bench22 病灶)——通过绑 end(endEventHandler)或规则 Available,驳回绑 cancel(cancelEventHandler)或规则 Cancel,或用一条多分支图(生产 case_info_update 只在 endEventHandler 绑一条 updateData 多分支图);workflow.bindRule 回读在 bizActions.length>1 时给 advisory",
|
|
81
81
|
participantRoleValidation: "写前参与人校验:PARTICIPANT 的 FindUserByRole(<org>,\"<roleCode>\",\"<order>\") 会与 org.role.list 的真实角色 code 比对;缺失即拒绝 workflow-participant-role-not-found,并给 activityCode/activityName/roleCode、最多 5 个 candidates 与 nextCommand。org.role.list 读取失败时 fail-open,不阻断写入。{Originator} 是发起人关键字,不按角色校验;所有 PARTICIPANT 都是 {Originator} 时给 approval-by-originator warning。",
|
|
82
82
|
userSearch: "POST /api/api/organization/user/search,@RequestBody {wd (关键字,必填), page, size, filterType?} → PageVO<UserVO>{totalElements,totalPages,content[{id,name,username,userId,departmentId,corpId,status}]}(UserController.search:337-341;缺 wd 报 10005 关键字不能为空)。用于把姓名解析成真实用户,构造参与者对象 type 3=用户(type 2=角色)",
|
|
83
|
+
organizationWrite: "org 写面不变式(1.1.25 真机;tools/list 只留紧凑契约句,案卷在这里):① org.role.create 的 roleGroupId **平台静默接受**——不是真实组 id 时角色变成看不见的孤儿(r70 实测:行在库里、role/users 查得到,role/list 永不返回、role/get 回 50000);优先 roleGroupCode,工具归一成真实 id 并回读可见性。② org.roleGroup.create 的 parentId 必填:根级组传 \"0\"(1.1.25 实测可建根级,path=组名、不挂在既有组下),挂到既有组下传该组 id。③ org.role.addUsers 底层的 add_role_user 收 ouScope 但**忽略它**(1.1.25 实测回读仍为空)——范围必须逐人 update_ouscope 单独写,工具已按序完成。④ org.role.removeUsers 要求 JSON body {roleId,userIds:[...]}:用 query 或 `ids` 报 10009 Required request body is missing(1.1.25 实测)。⑤ org.role.delete 对仍有成员的角色被平台拒绝:`-1 角色下已经包含用户数据!`(1.1.25 实测);force:true 是先逐人移出再删,不是绕过平台校验。⑥ org.user.create 的 dealUserLabel 与 org.user.update 的 modified 对 null 数组直接 NPE(50000,1.1.25 真机)——工具自动补 userLabelIds/userManagerConfigList/roleIds/deptIds 的 []。⑦ org.role.list 的关键字过滤在 CLI 本地做(服务端无关键字面):r9 C2 实测 113 个角色的全量清单 34KB,只为找一个 code,用 search 收窄。",
|
|
83
84
|
});
|
|
84
85
|
/** Workflow template object (workflow/update|publish raw body). */
|
|
85
86
|
export const workflowTemplateArg = z
|
|
@@ -118,6 +119,7 @@ export const WORKFLOW_LANE_CONTRACT = Object.freeze({
|
|
|
118
119
|
bizObjectResolution: WORKFLOW_WIRE.bizObjectResolution,
|
|
119
120
|
mutuallyExclusiveBinding: WORKFLOW_WIRE.mutuallyExclusiveBinding,
|
|
120
121
|
userSearch: WORKFLOW_WIRE.userSearch,
|
|
122
|
+
organizationWrite: WORKFLOW_WIRE.organizationWrite,
|
|
121
123
|
participantRoleValidation: WORKFLOW_WIRE.participantRoleValidation,
|
|
122
124
|
}),
|
|
123
125
|
wireBindings: Object.freeze({
|
|
@@ -137,6 +139,7 @@ export const WORKFLOW_LANE_CONTRACT = Object.freeze({
|
|
|
137
139
|
bizObjectResolution: Object.freeze([emitterBinding("workflow-support.resolveBizObjectIdByInstance", assertWorkflowContract)]),
|
|
138
140
|
mutuallyExclusiveBinding: Object.freeze([behaviorBinding("test/issue-14-workflow-bind-rule.test.ts#workflow.bindRule merges endEventHandler", assertWorkflowContract)]),
|
|
139
141
|
userSearch: Object.freeze([behaviorBinding("test/round4-org-user-search.test.ts#org.user.search resolves a user by name into participant fields", assertWorkflowContract)]),
|
|
142
|
+
organizationWrite: Object.freeze([behaviorBinding("test/organization-write.test.ts#org.role.create resolves a role group CODE to the real id (no orphan role)", assertWorkflowContract)]),
|
|
140
143
|
participantRoleValidation: Object.freeze([behaviorBinding("test/workflow-participant-role.test.ts#workflow.update refuses an unknown FindUserByRole role before the wire", assertWorkflowContract)]),
|
|
141
144
|
}),
|
|
142
145
|
evidence: Object.freeze([
|
|
@@ -199,7 +202,7 @@ export const WORKFLOW_LANE_CONTRACT = Object.freeze({
|
|
|
199
202
|
}),
|
|
200
203
|
"org.role.list": Object.freeze({
|
|
201
204
|
scope: "workflow participant resolution",
|
|
202
|
-
description: "列出组织角色(`GET /api/api/organization/role/list`),递归展开角色组,返回 {count, roleCount, groupCount, roles[{id,name,code,roleType,corpId,group,groupId,groupCode,groupName}], groups[{id,name,code,parentId,path,childCount}]}。**`count` 只数角色,不含角色组**——角色组是容器(平台行标记 `group:true`),旧版把空组当角色列出,曾让调用方把「19 个角色组」误读成「目标角色未创建」;`groups[].childCount` 才说明组内是否真的没有角色。`roles[].group` 是组名(兼容旧读法),写角色请用 `groupId`/`groupCode
|
|
205
|
+
description: "列出组织角色(`GET /api/api/organization/role/list`),递归展开角色组,返回 {count, roleCount, groupCount, roles[{id,name,code,roleType,corpId,group,groupId,groupCode,groupName}], groups[{id,name,code,parentId,path,childCount}]}。**`count` 只数角色,不含角色组**——角色组是容器(平台行标记 `group:true`),旧版把空组当角色列出,曾让调用方把「19 个角色组」误读成「目标角色未创建」;`groups[].childCount` 才说明组内是否真的没有角色。`roles[].group` 是组名(兼容旧读法),写角色请用 `groupId`/`groupCode`。用于把审批节点的参与者解析成平台认识的引用。**参与者写法**:`participant` 的三形态(`{Originator}` / 角色对象数组(`type` 2=角色、3=用户) / 函数表达式)与自由文本名不生成待办的陷阱,见 `omc describe workflow.update --example workflow-approval-template-update`。",
|
|
203
206
|
}),
|
|
204
207
|
"org.department.list": Object.freeze({
|
|
205
208
|
scope: "workflow participant resolution",
|
package/dist/lanes/workflow.js
CHANGED
|
@@ -3957,7 +3957,7 @@ export function registerWorkflowLane(tools) {
|
|
|
3957
3957
|
lane: WORKFLOW_LANE,
|
|
3958
3958
|
scope: WORKFLOW_TOOLS["org.role.list"].scope,
|
|
3959
3959
|
description: WORKFLOW_TOOLS["org.role.list"].description,
|
|
3960
|
-
inputSchema: { environment: environmentArg, search: z.string().min(1).optional().describe("关键字过滤(CLI 侧,按 code/name
|
|
3960
|
+
inputSchema: { environment: environmentArg, search: z.string().min(1).optional().describe("关键字过滤(CLI 侧,按 code/name 不区分大小写子串);服务端无关键字面,过滤在本地做——避免为找一个 code 全量 dump"), expandAll: z.boolean().optional().describe("默认 true:展开所有角色组并带回角色。平台的 /role/list 只有 expandAll=true 才填 children(RoleController.list,1.1.25);传 false 只回角色组、roles 恒为空,别据此判断「角色未创建」"), capability: capabilityArg },
|
|
3961
3961
|
handler: async (ctx, args, self) => governedRead(ctx, self, args, async (session) => {
|
|
3962
3962
|
// `/role/list` without `expandAll=true` only expands the FIRST group's
|
|
3963
3963
|
// children (RoleController.list, 1.1.25), so a role created under any
|
package/dist/read-shapes.js
CHANGED
|
@@ -131,11 +131,13 @@ const READ_SHAPES = {
|
|
|
131
131
|
notes: ["与 workflow.get_published 同形(少了 published 键);节点绑定看 activities[].bizActions;templateType=DRAFT;深层字段投影写到叶子,完整模板在 data/detailArtifactId"],
|
|
132
132
|
},
|
|
133
133
|
"rule.list": {
|
|
134
|
-
keys: ["rules:array<{code,name,enabled,status}>", "modelPresent", "source", "executableHint"],
|
|
134
|
+
keys: ["rules:array<{code,name,enabled,status,ruleVersion,defaultRule,preset,mappings?,mappingsUnavailable?}>", "rulesCount", "modelPresent", "source", "executableHint", "mappingsWireNote?", "schemaCodes?/modelsCount?/models?:array<每模型同单模型回执>/partial?/failed?:array<{schemaCode,code,message}>/absentModels?"],
|
|
135
135
|
notes: [
|
|
136
136
|
"入参/他面叫 ruleCode,本面返回 rules[].code",
|
|
137
137
|
"source=published-list:enabled/status 来自 PUBLISH 投影;可执行性看 rule.get / rule.enable.verified",
|
|
138
138
|
"modelPresent:false 时未发 list(避免幻影 schema 补建 7 条预置)",
|
|
139
|
+
"withMappings:true 时每行带 mappings[]={nodeCode,serviceCode,serviceMethodCode,inputCount,outputCount}(摘要,正文 inputMappings/outputMappings 用 rule.get);行里读不到图 → mappingsUnavailable:true(≠没有映射)",
|
|
140
|
+
"schemaCodes[] 跨模型清单:models[] 每元素与单模型回执同形(含 modelPresent:false/rulesCount;三句提示抬到顶层 crossModelNotes,逐模型相同不重复),失败汇总在 failed[](partial:true);上限 20 个模型",
|
|
139
141
|
],
|
|
140
142
|
},
|
|
141
143
|
// r72g(2026-11-17 探针):`rule.references`(在线,仅 businessrule)与
|
|
@@ -155,10 +157,10 @@ const READ_SHAPES = {
|
|
|
155
157
|
// service.get,分插各自族附近);键集全部来自真机回执采样(非手写发明),
|
|
156
158
|
// returnsFace 只显 notes[0],高频陷阱并进首条。
|
|
157
159
|
"rule.get": {
|
|
158
|
-
keys: ["status", "id", "absent", "code", "name", "schemaCode", "bizRuleType", "enabled", "executable", "executableBasis", "ruleStatus", "defaultRule", "developmentMode", "ruleVersion", "templateType", "nodes:array<{nodeCode,nodeName,nodeType,nodeCategory?,inputParam?,methodMapping:{schemaCode,serviceCode,serviceMethodCode,inputMappings[],outputMappings[],serviceName,serviceMethodName},serviceType?}>", "routes:array<{preNode,postNode,routeCondition,matchType}>", "schedulerSetting?", "renderCompat", "semanticFindings?", "roundTrip", "nodeDigests?:array<{nodeCode,nodeType,methodMapping:{serviceCode,serviceMethodCode}}>(summary)", "methodMappingCount?(summary)", "bytesOmitted?(summary)", "rules?:array<摘要体>(ruleCodes 批量)", "rulesCount?/requestedCount?/partial?/failed?:array<{code,reason}>(
|
|
160
|
+
keys: ["status", "id", "absent", "code", "name", "schemaCode", "bizRuleType", "enabled", "executable", "executableBasis", "ruleStatus", "defaultRule", "developmentMode", "ruleVersion", "templateType", "nodes:array<{nodeCode,nodeName,nodeType,nodeCategory?,inputParam?,methodMapping:{schemaCode,serviceCode,serviceMethodCode,inputMappings[],outputMappings[],serviceName,serviceMethodName},serviceType?}>", "routes:array<{preNode,postNode,routeCondition,matchType}>", "schedulerSetting?", "renderCompat", "semanticFindings?", "roundTrip", "nodeDigests?:array<{nodeCode,nodeType,methodMapping:{serviceCode,serviceMethodCode}}>(summary)", "methodMappingCount?(summary)", "bytesOmitted?(summary)", "rules?:array<摘要体>(ruleCodes 批量)", "rulesCount?/requestedCount?/partial?/failed?:array<{code,reason}>(批量;跨模型 failed 每条带 schemaCode)", "models?:array<{schemaCode,modelPresent,rulesCount,failedCount}>(跨模型)", "environmentFingerprint", "detailArtifactId?", "detailSha256?", "fetch?"],
|
|
159
161
|
notes: [
|
|
160
|
-
"绑定方法:默认面看 nodes[].methodMapping.serviceCode/serviceMethodCode
|
|
161
|
-
"入参 ruleCode 对应本面返回的 code;enabled 是开关推断,可执行性看 executable/executableBasis;批量面的 failed 是**数组**,所以信封仍是 status:ok + partial:true(不是 partial
|
|
162
|
+
"绑定方法:默认面看 nodes[].methodMapping.serviceCode/serviceMethodCode(三层深);扫多规则用 summary:true + ruleCodes[](同 schemaCode,1 次 list),扫多模型再配 schemaCodes[](≤20,逐模型 1 探针 + 1 list)——摘要键是 nodeDigests,不是 nodes(nodes 只在默认面)",
|
|
163
|
+
"入参 ruleCode 对应本面返回的 code;enabled 是开关推断,可执行性看 executable/executableBasis;批量面的 failed 是**数组**,所以信封仍是 status:ok + partial:true(不是 partial 状态);跨模型 failed[] 每条带 schemaCode(模型不存在 → modelPresent:false,不发规则面请求)",
|
|
162
164
|
],
|
|
163
165
|
},
|
|
164
166
|
"datarule.list": {
|
package/dist/read.js
CHANGED
|
@@ -148,7 +148,33 @@ function compactReadback(result) {
|
|
|
148
148
|
// 变成死代码——`models` 同时在 BULKY_READ_KEYS 里,而那个分支排在最前,于是
|
|
149
149
|
// 永远只回 `modelsCount:30` + `models:[]`,调用方拿不到任何 schemaCode,被迫
|
|
150
150
|
// 再花一次 `--jq`/artifact(997 B + 一整轮)。保形分支必须先于折叠分支。
|
|
151
|
-
|
|
151
|
+
// r83:rule.list --schemaCodes[] 的 models[] 是**回执对象数组**(元素带
|
|
152
|
+
// modelPresent),不是码表——CODE_NAME_LIST_KEYS 会把它折成字符串数组,
|
|
153
|
+
// 跨模型回执不可用。保形:每元素留 schemaCode/modelPresent/rulesCount/
|
|
154
|
+
// customCount + rules 瘦身行(≤12,同顶层 rules 口径);三句提示已抬到
|
|
155
|
+
// crossModelNotes,不逐模型重复。
|
|
156
|
+
if (key === "models" && Array.isArray(value) && value.length > 0 &&
|
|
157
|
+
typeof value[0] === "object" && value[0] !== null &&
|
|
158
|
+
"modelPresent" in value[0]) {
|
|
159
|
+
compact[key] = value.map((model) => {
|
|
160
|
+
const rules = Array.isArray(model.rules) ? model.rules : [];
|
|
161
|
+
return {
|
|
162
|
+
schemaCode: model.schemaCode ?? null,
|
|
163
|
+
modelPresent: model.modelPresent ?? null,
|
|
164
|
+
rulesCount: typeof model.rulesCount === "number" ? model.rulesCount : rules.length,
|
|
165
|
+
...(model.customCount !== undefined ? { customCount: model.customCount } : {}),
|
|
166
|
+
rules: rules.slice(0, 12).map((rule) => ({
|
|
167
|
+
code: typeof rule.code === "string" ? rule.code : null,
|
|
168
|
+
name: typeof rule.name === "string" ? rule.name : null,
|
|
169
|
+
...(rule.enabled !== undefined ? { enabled: rule.enabled } : {}),
|
|
170
|
+
...(Array.isArray(rule.mappings) ? { mappings: rule.mappings } : {}),
|
|
171
|
+
...(rule.mappingsUnavailable === true ? { mappingsUnavailable: true } : {}),
|
|
172
|
+
})),
|
|
173
|
+
};
|
|
174
|
+
});
|
|
175
|
+
compact[`${key}Count`] = value.length;
|
|
176
|
+
}
|
|
177
|
+
else if (CODE_NAME_LIST_KEYS.has(key) && Array.isArray(value)) {
|
|
152
178
|
const pairs = value.map(codeNameOfEntry).filter((entry) => entry !== undefined);
|
|
153
179
|
// 40 对上限(~1-2KB):更大的清单回退 count+artifact,保冷启动可扫又不失控
|
|
154
180
|
if (pairs.length <= 40)
|
|
@@ -158,6 +184,11 @@ function compactReadback(result) {
|
|
|
158
184
|
if (!compact[`${key}Count`])
|
|
159
185
|
compact[`${key}Count`] = value.length;
|
|
160
186
|
}
|
|
187
|
+
else if (key === "crossModelNotes" && value !== null && typeof value === "object" && !Array.isArray(value)) {
|
|
188
|
+
// r83:跨模型面抬上来的三句提示(逐模型相同,只存一份)——原样保留,
|
|
189
|
+
// 不被通用对象分支摘要成 {keys}(否则默认面丢教学)。
|
|
190
|
+
compact[key] = value;
|
|
191
|
+
}
|
|
161
192
|
else if (CODE_LIST_KEYS.has(key) && Array.isArray(value)) {
|
|
162
193
|
// 2026-11-01 预算批 v2:读门 4096→2048 后,中结果(r38 实测 model.inspect
|
|
163
194
|
// 17 次 51KB 全部卡旧门下全内联)走 compact——配置清单类数组保形为码表
|
|
@@ -181,6 +212,11 @@ function compactReadback(result) {
|
|
|
181
212
|
name: typeof rule.name === "string" ? rule.name : null,
|
|
182
213
|
...(rule.enabled !== undefined ? { enabled: rule.enabled } : {}),
|
|
183
214
|
...(rule.defaultRule !== undefined ? { defaultRule: rule.defaultRule } : {}),
|
|
215
|
+
// r83:rule.list --withMappings 的映射摘要随行保留(否则 >2048B 的
|
|
216
|
+
// 常见 7 条预置规则会「开了 withMappings 却在默认面看不到映射」);
|
|
217
|
+
// 只有显式开启该参数的行才有这个键,其余工具的 rules 不受影响。
|
|
218
|
+
...(Array.isArray(rule.mappings) ? { mappings: rule.mappings } : {}),
|
|
219
|
+
...(rule.mappingsUnavailable === true ? { mappingsUnavailable: true } : {}),
|
|
184
220
|
}));
|
|
185
221
|
compact[key] = slim;
|
|
186
222
|
}
|
package/dist/recipes/field.js
CHANGED
|
@@ -379,7 +379,7 @@ const formulaExpressionSameModel = Object.freeze({
|
|
|
379
379
|
const externalLookupModel = Object.freeze({
|
|
380
380
|
id: "external-lookup-model",
|
|
381
381
|
title: "外部数据映射模型:接口数据落表 + 关联单选下拉带出(填表时即映射)",
|
|
382
|
-
aliases: ["外部数据源", "接口映射模型", "企查查下拉", "关联带出", "映射模型", "外部数据带出"],
|
|
382
|
+
aliases: ["外部数据源", "接口映射模型", "企查查下拉", "关联带出", "映射模型", "外部数据带出", "关联映射", "改关联映射"],
|
|
383
383
|
status: "requires-prior-readback",
|
|
384
384
|
tool: "field.create",
|
|
385
385
|
args: {
|
|
@@ -403,6 +403,7 @@ const externalLookupModel = Object.freeze({
|
|
|
403
403
|
"**数据段首选(平台标准模式,2026-10-29 playwright 门户实证定案)**:映射模型的 GetList/Load 规则挂 BIZ_ACTION 实时调接口(接口方法配 frontEndExtensionEnable:true)——门户关联控件**打开即触发**前端查询链→GetList 规则→BIZ_ACTION 实时调外部接口(引擎日志 bizBusService.invoke + 外部网关日志双侧铁证)。**验证必须走门户填表;data.list 后端查询不反映此链,别用它判死**(r29 曾据此误判不成立)。配置侧三个收尾点:① WORK_SHEET 字段必须带 relativeCode(仅 options.schemaCode 发布表单会 301015 关联业务模型为空);② GetList 规则的 BIZ_ACTION 入参映射要接前端搜索词(实测未配词时 invoke 参数为空 {});③ 出参→列表行的映射配完候选才回显(未配时弹窗 Total 0 但接口已调)。「下拉框形态(输关键字回车查询)」是表单 attributes 层的控件形态设置,默认弹窗形态。备选(不需要实时时):预置 Create/Update 规则落映射表 / TIMING 定时同步。图内「BIZ_ACTION→CREATE 落表→再查」回环在 1.1.25 不可表达,不要走这条岔路。",
|
|
404
404
|
"**表单段是平台原生能力**:关联单选指向映射模型后,门户上输入关键字回车即查映射表、选中即 mappings 带出——前台填表时映射自然出现,无需按钮/脚本。",
|
|
405
405
|
"下拉框形态在 form.draft 控件层配置;映射表要有数据下拉才有选项。",
|
|
406
|
+
"**关联填充映射的事实源是字段行 `options.mappings`**:改表单控件属性里的 mappings 会被平台按字段重算覆盖、回读不生效(真机 2026-10-14 中冶实证)。改映射走 `field.update` 按完整 options 提交(只改 mappings,其余键 queryCode/displayField/schemaCode/conditions… 原值保留)→ `field.publish` → `form.draft`(**rebuild:false**,保留现有布局与已挂在线JS)重存 → `form.publish` → 回读核对。**不要用 field.update 的 cascadeRepublish 刷已带自定义布局/在线JS 的表单**——它会 rebuild 脚手架(rebuild:false 手动链才安全)。",
|
|
406
407
|
],
|
|
407
408
|
priorToolReferences: [
|
|
408
409
|
{ tool: "model.create", args: { environment }, purpose: "建映射模型(字段与接口返回一一对应;mappings 的 source/target 只填裸字段 code,不带模型前缀)" },
|
|
@@ -7,9 +7,10 @@ const listViewConfigure = Object.freeze({
|
|
|
7
7
|
args: { environment, schemaCode: model, fieldCodes: ["applyNo", "applyAmount", "applyNote"] },
|
|
8
8
|
preconditions: ["字段已 field.publish(视图与表单脚手架都依赖已发布字段)", "默认视图在 model.create 时由平台自动生成,code = schemaCode"],
|
|
9
9
|
conditionalRequirements: [
|
|
10
|
-
"**省略 `code` 即配置默认视图(code = schemaCode);不要先 listview.create——那会多出一个自定义视图。** 只有确实需要第二个视图时才 listview.create
|
|
10
|
+
"**省略 `code` 即配置默认视图(code = schemaCode);不要先 listview.create——那会多出一个自定义视图。** 只有确实需要第二个视图时才 listview.create。案卷:r60a-F13 真机对齐 2026-11-13;r73 #6 真机对齐 2026-11-17;8.6.41 实测默认视图同样可 configure(改默认视图影响所有用户)。",
|
|
11
11
|
"`fieldCodes` 只列业务字段,可给 propertyCode 或字段显示名;系统列由平台决定。未知引用被拒(listview-columns-unknown-field)。",
|
|
12
|
-
"数值列 displayFormat 由字段 0 基 `options.scale` 推导(0=整数,1=1位,2=2
|
|
12
|
+
"数值列 displayFormat 由字段 0 基 `options.scale` 推导(0=整数,1=1位,2=2位…;真机:scale 2 → displayFormat 3 = 两位小数);本工具会原地修正既有列的 displayFormat。",
|
|
13
|
+
"**列汇总**:数值列 `sumType` wire 为整数——0=不统计/1=求和/2=平均/3=最小/4=最大/5=计数,写进 `presentation.columnsJson` 的列对象(8.6.26 反编译 SumType 实证)。",
|
|
13
14
|
"`query/update` 自动 publish=TRUE——视图无草稿/发布两态,无需独立发布步骤。",
|
|
14
15
|
],
|
|
15
16
|
priorToolReferences: [
|
package/dist/tool-search.js
CHANGED
|
@@ -218,10 +218,13 @@ export function toolSearchMetaReport(registry) {
|
|
|
218
218
|
*/
|
|
219
219
|
const TOOL_PARENTS = Object.freeze({
|
|
220
220
|
"field.create": ["model"], "field.update": ["model"], "field.delete": ["model"], "field.list": ["model"], "field.publish": ["model"],
|
|
221
|
-
"form.publish": ["model"], "form.get": ["model"], "form.draft": ["model"],
|
|
221
|
+
"form.publish": ["model"], "form.get": ["model"], "form.draft": ["model"], "form.list": ["model"],
|
|
222
222
|
"listview.configure": ["model"], "listview.create": ["model"], "listview.get": ["model"], "listview.list": ["model"], "listview.delete": ["model"],
|
|
223
223
|
"datarule.create": ["model", "field"], "datarule.update": ["model", "field"], "datarule.list": ["model", "field"], "datarule.delete": ["model", "field"],
|
|
224
|
-
"method.create": ["service"], "method.update": ["service"], "method.get": ["service"], "method.delete": ["service"], "method.test": ["service"],
|
|
224
|
+
"method.create": ["service"], "method.update": ["service"], "method.get": ["service"], "method.delete": ["service"], "method.test": ["service"], "method.list": ["service"],
|
|
225
|
+
// r83(R79 二期):data.aggregate 是「模型数据的聚合」——句子里点模型时
|
|
226
|
+
// 与 data.list/data.load 同族给出父对象信号(此前只有 data 段命中)。
|
|
227
|
+
"data.aggregate": ["model"],
|
|
225
228
|
"org.role.addUsers": ["user"], "org.role.removeUsers": ["user"],
|
|
226
229
|
});
|
|
227
230
|
/** 反向约束:句子里出现这些词时,该工具**直接出局**(它不是干这个的)。见 scoreTools 内的一票否决注释。 */
|