@stalfh233/omc-cli 0.4.36 → 0.4.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/bench/call-face-eval.js +1 -1
- package/dist/bench/discovery-cost-eval.js +1 -1
- package/dist/bench/driver.js +1 -1
- package/dist/bench/intent-face-eval.js +1 -1
- package/dist/capability-shape.js +2 -153
- package/dist/cli.js +42 -578
- package/dist/contract-consistency.js +5 -1
- package/dist/execution-metadata.js +24 -1160
- package/dist/field-families.js +2 -22
- package/dist/intent/plan-apply.js +587 -0
- package/dist/json-column.js +2 -67
- package/dist/lanes/businessrule-contract.js +4 -3
- package/dist/lanes/list-view-shapes.js +13 -98
- package/dist/lanes/model-contract.js +2 -2
- package/dist/lanes/rule-graph.js +2 -2
- package/dist/lanes/runtime-data-contract.js +6 -83
- package/dist/recipes/b2-registration.js +87 -0
- package/dist/recipes/businessrule.js +269 -0
- package/dist/recipes/datarule.js +215 -0
- package/dist/recipes/dictionary.js +42 -0
- package/dist/recipes/field.js +230 -0
- package/dist/recipes/form.js +19 -0
- package/dist/recipes/list-view.js +31 -0
- package/dist/recipes/model.js +34 -0
- package/dist/recipes/online-js.js +32 -0
- package/dist/recipes/runtime-data.js +113 -0
- package/dist/recipes/shared.js +8 -0
- package/dist/recipes/workflow.js +119 -0
- package/dist/tool-types.js +2 -7
- package/dist/zip.js +2 -155
- package/package.json +3 -2
- package/dist/bench/fake-http-server.js +0 -65
- package/dist/fake/app.js +0 -45
- package/dist/fake/b2-registration.js +0 -620
- package/dist/fake/businessrule.js +0 -242
- package/dist/fake/datarule.js +0 -72
- package/dist/fake/dictionary.js +0 -108
- package/dist/fake/environment.js +0 -30
- package/dist/fake/field.js +0 -167
- package/dist/fake/form.js +0 -101
- package/dist/fake/index.js +0 -121
- package/dist/fake/list-view.js +0 -289
- package/dist/fake/model.js +0 -136
- package/dist/fake/online-js.js +0 -18
- package/dist/fake/report.js +0 -253
- package/dist/fake/routes.js +0 -47
- package/dist/fake/rule-lifecycle.js +0 -37
- package/dist/fake/runtime-data.js +0 -367
- package/dist/fake/state.js +0 -67
- package/dist/fake/workflow.js +0 -364
package/README.md
CHANGED
|
@@ -246,12 +246,12 @@ src/ args/support/plan/read/write/package/context(治理管道)
|
|
|
246
246
|
|
|
247
247
|
## npm 分发
|
|
248
248
|
|
|
249
|
-
本包(`@stalfh233/omc-cli`,可执行命令仍是 `omc`)通过公共 npm registry 分发。`omc-core` 是 `omc-cli` 的内部依赖,发布时先发 `omc-core`,再发 `omc-cli`;两者版本保持一致。当前版本为 `0.4.
|
|
249
|
+
本包(`@stalfh233/omc-cli`,可执行命令仍是 `omc`)通过公共 npm registry 分发。`omc-core` 是 `omc-cli` 的内部依赖,发布时先发 `omc-core`,再发 `omc-cli`;两者版本保持一致。当前版本为 `0.4.36`,尚未宣称 `1.0.0` 稳定契约。
|
|
250
250
|
|
|
251
251
|
### 使用已发布包
|
|
252
252
|
|
|
253
253
|
```bash
|
|
254
|
-
npm install -g @stalfh233/omc-cli@
|
|
254
|
+
npm install -g @stalfh233/omc-cli@latest
|
|
255
255
|
omc setup
|
|
256
256
|
omc doctor
|
|
257
257
|
omc help omc-write-hazards
|
|
@@ -2,7 +2,7 @@ import { spawn } from "node:child_process";
|
|
|
2
2
|
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { join, resolve } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
import { startFakeHttpServer } from "
|
|
5
|
+
import { startFakeHttpServer } from "@stalfh233/omc-fake-platform/http-server";
|
|
6
6
|
/**
|
|
7
7
|
* Call-face eval (Spec 100 acceptance / Spec 107 baseline): a scripted
|
|
8
8
|
* reference agent completes real tasks using ONLY the omc CLI face
|
|
@@ -2,7 +2,7 @@ import { spawn } from "node:child_process";
|
|
|
2
2
|
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
import { startFakeHttpServer } from "
|
|
5
|
+
import { startFakeHttpServer } from "@stalfh233/omc-fake-platform/http-server";
|
|
6
6
|
const packageRoot = fileURLToPath(new URL("../..", import.meta.url));
|
|
7
7
|
const cli = join(packageRoot, "dist", "cli.js");
|
|
8
8
|
const PASSWORD = "discovery-cost-password";
|
package/dist/bench/driver.js
CHANGED
|
@@ -6,7 +6,7 @@ import { ConfigStore, defaultPaths } from "../config-store.js";
|
|
|
6
6
|
import { SessionManager } from "../session-manager.js";
|
|
7
7
|
import { makeToolContext } from "../context.js";
|
|
8
8
|
import { buildToolRegistry } from "../tools.js";
|
|
9
|
-
import { FakeCloudPivot } from "
|
|
9
|
+
import { FakeCloudPivot } from "@stalfh233/omc-fake-platform";
|
|
10
10
|
import { resetWireReadCacheStats } from "../wire.js";
|
|
11
11
|
import { ToolTap, WireTap } from "./instrument.js";
|
|
12
12
|
export function makeBenchHarness(mode, liveEnvironment) {
|
|
@@ -2,7 +2,7 @@ import { spawn } from "node:child_process";
|
|
|
2
2
|
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
import { startFakeHttpServer } from "
|
|
5
|
+
import { startFakeHttpServer } from "@stalfh233/omc-fake-platform/http-server";
|
|
6
6
|
/**
|
|
7
7
|
* Intent-face eval (Spec 107 acceptance): the SAME scripted reference-agent
|
|
8
8
|
* task set as the call-face eval, driven through the declarative face
|
package/dist/capability-shape.js
CHANGED
|
@@ -1,154 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
1: 2,
|
|
4
|
-
2: 4,
|
|
5
|
-
3: 3,
|
|
6
|
-
4: 8,
|
|
7
|
-
5: 62,
|
|
8
|
-
6: 9,
|
|
9
|
-
8: 201,
|
|
10
|
-
9: 80,
|
|
11
|
-
10: 14,
|
|
12
|
-
11: 81,
|
|
13
|
-
12: 5,
|
|
14
|
-
13: 6,
|
|
15
|
-
14: 7,
|
|
16
|
-
15: 19,
|
|
17
|
-
16: 82,
|
|
18
|
-
17: 17,
|
|
19
|
-
28: 28,
|
|
20
|
-
50: 50,
|
|
21
|
-
51: 51,
|
|
22
|
-
60: 60,
|
|
23
|
-
61: 61,
|
|
24
|
-
100: 89,
|
|
25
|
-
});
|
|
26
|
-
const commonEvidence = [
|
|
27
|
-
"8.6.26 BizPropertyType/BizFormPropertyType",
|
|
28
|
-
"desensitized-config-shapes.md §3.2",
|
|
29
|
-
"frontend-dist/admin/js/4280.*.js designer bundle",
|
|
30
|
-
];
|
|
31
|
-
const shape = (propertyType, field, control, evidence = commonEvidence) => ({ propertyType, controlType: CAPABILITY_CONTROL_TYPES[propertyType], field, control, evidence });
|
|
32
|
-
const face = (requiredKeys, defaults, evidence = commonEvidence, nonEmptyKeys) => ({ requiredKeys, defaults, evidence, ...(nonEmptyKeys ? { nonEmptyKeys } : {}) });
|
|
33
|
-
export const FIELD_CAPABILITY_SHAPES = Object.freeze({
|
|
34
|
-
0: shape(0, face([], { dictionaryData: "" }), face(["defaultValue", "maxLength"], { defaultValue: null, placeholder: "请输入", maxLength: 200, currentMaxLength: 2000000, noRepeat: false, enableEncrypt: false })),
|
|
35
|
-
1: shape(1, face([], { dictionaryData: "" }), face(["defaultValue", "maxLength"], { defaultValue: null, textAreaType: "longText", maxLength: 2000, placeholder: "请输入" })),
|
|
36
|
-
2: shape(2, face([], { dictionaryData: "" }), face(["defaultValue", "format"], { defaultValue: null, placeholder: "请输入", computeFormula: "", format1: "decimal", format: "decimal", verifyFormula: "", isFlag: false })),
|
|
37
|
-
3: shape(3, face(["format"], { dictionaryData: "", format: "YYYY-MM-DD" }), face(["format", "format1"], { defaultValue: null, dataItemDefault: "", format1: "YYYY-MM-DD", format: "YYYY-MM-DD", minDate: "", maxDate: "", verifyFormula: "" })),
|
|
38
|
-
4: shape(4, face(["defaultValue"], { defaultValue: false }), face(["defaultValue"], { defaultValue: true })),
|
|
39
|
-
6: shape(6, face([], {}), face(["displayTemplate", "limitNumber", "fileNumber", "batch"], { displayTemplate: true, limitNumber: "unlimited", fileNumber: 1, batch: true, displayFormula: "", requiredFormula: "", readonlyFormula: false, limit: "200M", onUpload: "", onDelete: "" }), ["cp-sources/frontend-dist/admin/js/12404.1675d362.js attachment schema", "cp-sources/frontend-dist/admin/js/24187.6e75bd30.js uploadOptions/baseUploadOptions"]),
|
|
40
|
-
// CHILD_TABLE(8) — scalar child table. Lifted from blocked on 2026-09-18:
|
|
41
|
-
// the wire shape is live-accepted (omc-core `childtable-field-contract.ts`,
|
|
42
|
-
// live record `childtable-execute-20260908070635135.md`, 2026-09-08) and the
|
|
43
|
-
// Sheet201 form control is live-proven (omc-core
|
|
44
|
-
// `childtable-sheet201-contract.ts`). The field row carries no `options`; its
|
|
45
|
-
// definition is the `subSchema` ({code:<parent field code>, properties:[...]})
|
|
46
|
-
// and the form control is Sheet(201) with `columns`. Nested CHILD_TABLE (a
|
|
47
|
-
// child of a child) remains out of coverage and is refused in
|
|
48
|
-
// `assertFieldFamilyAllowed`.
|
|
49
|
-
8: shape(8, face([], {}), face([], {}), ["omc-core childtable-field-contract.ts (live 2026-09-08)", "omc-core childtable-sheet201-contract.ts", "8.6.26 BizPropertyType CHILD_TABLE=8 / BizFormPropertyType Sheet=201"]),
|
|
50
|
-
9: shape(9, face([], { dictionaryData: "" }), face([], { schemaCode: "", displayField: "name", relativePropertyMatchCode: "name", queryCode: "", linkMode: true, showStyle: "", selectMode: "popup", isAuthorize: true, treeView: false, treeStartFromRoot: false, mappings: "", searchFormula: "", conditions: "" })),
|
|
51
|
-
10: shape(10, face(["defaultValue"], { defaultValue: "" }), face(["locationType", "addressDetail", "showEmpty", "emptyValue", "autoGetLocation"], { locationType: "pp-cc-aa", addressDetail: "true", showEmpty: "false", emptyValue: "请选择", autoGetLocation: "false" }), [".scratch/omc-app-management/research/desensitized-config-shapes.md §3.2 ADDRESS", "cp-sources/frontend-dist/admin/js/12404.1675d362.js address schema", ".scratch/omc-app-management/evidence/field-families-fwb-20260914.md:113-119 (fwb field row {\"defaultValue\":\"\",\"virtualField\":false})"]),
|
|
52
|
-
11: shape(11, face([], { dictionaryData: "" }), face([], { schemaCode: "", displayField: "name", relativePropertyMatchCode: "name", queryCode: "", linkMode: true, showStyle: "", selectMode: "popup", isAuthorize: true, treeView: false, treeStartFromRoot: false, mappings: "", searchFormula: "", conditions: "" })),
|
|
53
|
-
// Ticket 108 determination: selection families (12/13/14/15) emit NO
|
|
54
|
-
// dictionaryData — designer-produced rows carry none of it (fwb §12-15
|
|
55
|
-
// outer key unions) and live 8.6.26 proves the platform merely
|
|
56
|
-
// accepts-and-persists the extra key without requiring it. The other
|
|
57
|
-
// text/date/relation families keep the designer-carried empty-string
|
|
58
|
-
// default; ATTACHMENT(6) stays intentionally empty (system rows often
|
|
59
|
-
// have no options). The wider 2026-09-14 key unions are multi-field
|
|
60
|
-
// unions of designer rows — platform auto-fill territory, never required
|
|
61
|
-
// for creation (minimal default + caller passthrough is the boundary).
|
|
62
|
-
12: shape(12, face([], {}), face([], { defaultValue: "", options: "", hasLabel: false })),
|
|
63
|
-
13: shape(13, face([], {}), face([], { defaultValue: "", options: "", hasLabel: false, direction: "horizontal", displaySetting: "showSelected" })),
|
|
64
|
-
14: shape(14, face([], {}), face([], { displayEmpty: true, emptyValue: "请选择", multi: false })),
|
|
65
|
-
15: shape(15, face([], {}), face([], { displayEmpty: true, emptyValue: "请选择", multi: true })),
|
|
66
|
-
16: shape(16, face([], { dictionaryData: "" }), face([], {})),
|
|
67
|
-
17: shape(17, face(["defaultValue", "dictionaryData", "maxLength"], { defaultValue: "", dictionaryData: "", maxLength: 200 }), face(["defaultValue", "placeholder", "maxLength"], { defaultValue: "", placeholder: "请输入", maxLength: 200 }), [".scratch/omc-app-management/research/desensitized-config-shapes.md §3.2 HYPER_LINK", "cp-sources/frontend-dist/admin/js/12404.1675d362.js URL schema"]),
|
|
68
|
-
28: shape(28, face(["format"], { defaultValue: "", format: "HH:mm" }), face(["format", "format1"], { defaultValue: "none", dataItemDefault: "", format: "HH:mm", format1: "HH:mm", syncFormate: true }), [".scratch/omc-app-management/research/desensitized-config-shapes.md §3.2 TIME", "cp-sources/frontend-dist/admin/js/46948.4825f4e2.js Time1760153573819"]),
|
|
69
|
-
// Org-selector families. Evidence: the yst/fwb published-face dumps
|
|
70
|
-
// (origin/research/yst-examples, 2656 rows of types 5/50/51/60/61) show the
|
|
71
|
-
// FIELD row (bizproperty) options as null or `{defaultValue, mappings,
|
|
72
|
-
// virtualField, noRepeat}` — deptVisible/multi NEVER appear there. The
|
|
73
|
-
// deptVisible/multi discriminator is FORM-CONTROL-face only (source:
|
|
74
|
-
// DataModelInitUtils.updateSelectionType / BizPropertyTypeUpdateUtils.
|
|
75
|
-
// disposeUpdateType read `control.options`; ticket 69 already writes them on
|
|
76
|
-
// the control face). Field faces below mirror the observed publish-safe
|
|
77
|
-
// shapes (single: defaultValue ""; multi: defaultValue []).
|
|
78
|
-
5: shape(5, face([], { defaultValue: [], mappings: "", virtualField: false }), face(["defaultValue", "deptVisible", "multi"], { defaultValue: [], defaultValueType: "", deptVisible: "all", multi: "true" })),
|
|
79
|
-
50: shape(50, face([], { defaultValue: "", mappings: "", virtualField: false }), face(["deptVisible", "multi"], { deptVisible: "user", multi: "false" })),
|
|
80
|
-
51: shape(51, face([], { defaultValue: [], mappings: "", virtualField: false }), face(["deptVisible", "multi"], { deptVisible: "user", multi: "true" })),
|
|
81
|
-
60: shape(60, face([], { defaultValue: [], mappings: "", virtualField: false }), face(["deptVisible", "multi"], { deptVisible: "org", multi: "false" })),
|
|
82
|
-
61: shape(61, face([], { defaultValue: [], mappings: "", virtualField: false }), face(["deptVisible", "multi"], { deptVisible: "org", multi: "true" })),
|
|
83
|
-
100: shape(100, face([], {}), face([], { defaultValue: null })),
|
|
84
|
-
});
|
|
85
|
-
export const BLOCKED_CAPABILITY_SHAPES = Object.freeze({});
|
|
86
|
-
/**
|
|
87
|
-
* Ticket 101 — control codes observed in real forms but with NO field-family
|
|
88
|
-
* emission path. PHONE(24) and PHOTO(10) are authoritative 8.6.26 control
|
|
89
|
-
* codes (BizFormPropertyType.java:23-51), but BizPropertyType.java:27-54 has
|
|
90
|
-
* no PHONE/PHOTO entry, so no accepted field family can scaffold them and no
|
|
91
|
-
* options shape is evidenced for a write. Declared blocked so the absence
|
|
92
|
-
* reads as policy (fail-closed), not omission; caller-provided explicit
|
|
93
|
-
* layouts are unaffected. Adding an emission path requires new family
|
|
94
|
-
* evidence AND consciously lifting this declaration.
|
|
95
|
-
*/
|
|
96
|
-
export const BLOCKED_CONTROL_CODES = Object.freeze({
|
|
97
|
-
24: "PHONE control has no BizPropertyType mapping (BizPropertyType.java:27-54) — no field family emits it; creation not offered until a family + options shape are evidenced",
|
|
98
|
-
10: "PHOTO control has no BizPropertyType mapping (BizPropertyType.java:27-54) — no field family emits it; creation not offered until a family + options shape are evidenced",
|
|
99
|
-
});
|
|
100
|
-
export const CAPABILITY_SHAPE_ACCEPTED_TYPES = Object.freeze(Object.keys(FIELD_CAPABILITY_SHAPES).map(Number));
|
|
101
|
-
export function capabilityShapeFor(type) {
|
|
102
|
-
return FIELD_CAPABILITY_SHAPES[type] ?? BLOCKED_CAPABILITY_SHAPES[type];
|
|
103
|
-
}
|
|
104
|
-
export function capabilityShapeError(type, faceName, options) {
|
|
105
|
-
const current = capabilityShapeFor(type);
|
|
106
|
-
if (!current)
|
|
107
|
-
return `propertyType ${type} has no capability shape`;
|
|
108
|
-
if (current.blocked)
|
|
109
|
-
return `${current.citation ?? "blocked capability"} (propertyType ${type})`;
|
|
110
|
-
const face = current[faceName];
|
|
111
|
-
const missing = face.requiredKeys.filter((key) => options[key] === undefined || ((face.nonEmptyKeys ?? []).includes(key) && options[key] === ""));
|
|
112
|
-
return missing.length > 0 ? `capability shape ${faceName} missing required keys for propertyType ${type}: ${missing.join(", ")}` : undefined;
|
|
113
|
-
}
|
|
114
|
-
export function assertCapabilityShapeContract() {
|
|
115
|
-
for (const type of CAPABILITY_SHAPE_ACCEPTED_TYPES) {
|
|
116
|
-
const current = FIELD_CAPABILITY_SHAPES[type];
|
|
117
|
-
if (!current)
|
|
118
|
-
throw new Error(`capability shape missing for propertyType ${type}`);
|
|
119
|
-
if (current.blocked && !current.citation)
|
|
120
|
-
throw new Error(`blocked capability shape ${type} requires citation`);
|
|
121
|
-
if (current.controlType !== CAPABILITY_CONTROL_TYPES[type])
|
|
122
|
-
throw new Error(`capability shape control type mismatch for ${type}`);
|
|
123
|
-
for (const key of current.field.requiredKeys)
|
|
124
|
-
if (!(key in current.field.defaults))
|
|
125
|
-
throw new Error(`field shape ${type} missing default for ${key}`);
|
|
126
|
-
for (const key of current.control.requiredKeys)
|
|
127
|
-
if (!(key in current.control.defaults))
|
|
128
|
-
throw new Error(`control shape ${type} missing default for ${key}`);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
export function assertCapabilityFace(type, faceName, options) {
|
|
132
|
-
const current = capabilityShapeFor(type);
|
|
133
|
-
if (!current)
|
|
134
|
-
throw new Error(`capability shape missing for propertyType ${type}`);
|
|
135
|
-
if (current.blocked)
|
|
136
|
-
throw new Error(`propertyType ${type} is blocked: ${current.citation ?? "missing evidence"}`);
|
|
137
|
-
const face = current[faceName];
|
|
138
|
-
const missing = face.requiredKeys.filter((key) => options[key] === undefined || ((face.nonEmptyKeys ?? []).includes(key) && options[key] === ""));
|
|
139
|
-
if (missing.length > 0)
|
|
140
|
-
throw new Error(`capability shape ${faceName} missing required keys for propertyType ${type}: ${missing.join(", ")}`);
|
|
141
|
-
}
|
|
142
|
-
export function deriveFieldOptions(type, explicit) {
|
|
143
|
-
const current = capabilityShapeFor(type);
|
|
144
|
-
if (!current || current.blocked)
|
|
145
|
-
throw new Error(`propertyType ${type} is blocked or has no capability shape`);
|
|
146
|
-
return { ...current.field.defaults, ...(explicit ?? {}) };
|
|
147
|
-
}
|
|
148
|
-
export function deriveControlOptions(type, explicit) {
|
|
149
|
-
const current = capabilityShapeFor(type);
|
|
150
|
-
if (!current || current.blocked)
|
|
151
|
-
throw new Error(`propertyType ${type} is blocked or has no capability shape`);
|
|
152
|
-
return { ...current.control.defaults, ...(explicit ?? {}) };
|
|
153
|
-
}
|
|
1
|
+
// C1 拆分:capability-shape 已下沉 omc-core(真 lane 与 @stalfh233/omc-fake-platform 共用唯一事实源);此处 re-export 保持既有 import 路径不变。
|
|
2
|
+
export * from "omc-core/capability-shape";
|
|
154
3
|
//# sourceMappingURL=capability-shape.js.map
|