@stalfh233/omc-cli 0.6.78 → 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.
@@ -190,7 +190,7 @@ const SURFACES = [
190
190
  id: "data",
191
191
  title: "运行数据",
192
192
  lane: LANES.runtimeData,
193
- description: "运行数据条目的列出、加载、保存、更新、删除、提交,以及计数/分组统计。",
193
+ description: "运行数据条目的列出、加载、保存、更新、删除、提交,以及计数/分组/求和平均等统计。",
194
194
  operations: ["list", "aggregate", "load", "save", "update", "delete", "submit"],
195
195
  requires: ["field"],
196
196
  intent: { level: "none", note: "未覆盖;用 omc call data.*。" },
@@ -824,7 +824,13 @@ function goalRouteInner(registry, goal) {
824
824
  const dataRoute = routeById.get("data");
825
825
  if (dataRoute !== undefined) {
826
826
  const readTools = readToolsInLane(registry, dataRoute.lane);
827
- const action = readTools.includes("data.list") ? "omc call data.list --args '{\"schemaCode\":\"<模型code>\",\"size\":1,\"filter\":{\"op\":\"eq\",\"field\":\"<字段>\",\"value\":\"<值>\"}}' --jq '.result.total'" : "omc commands --capability data";
827
+ // r82:data.aggregate 已覆盖 count(服务端 totalElements)与 sum/avg/min/max
828
+ // (本地折叠),聚合问句直指本工具;手工 size:1+filter 只作降级路径保留。
829
+ const action = readTools.includes("data.aggregate")
830
+ ? "omc call data.aggregate --args '{\"schemaCode\":\"<模型code>\",\"metric\":\"count\"}' --jq '.result.total'"
831
+ : readTools.includes("data.list")
832
+ ? "omc call data.list --args '{\"schemaCode\":\"<模型code>\",\"size\":1,\"filter\":{\"op\":\"eq\",\"field\":\"<字段>\",\"value\":\"<值>\"}}' --jq '.result.total'"
833
+ : "omc commands --capability data";
828
834
  return {
829
835
  status: "ok",
830
836
  goal,
@@ -835,7 +841,7 @@ function goalRouteInner(registry, goal) {
835
841
  route: {
836
842
  capability: "data",
837
843
  lane: dataRoute.lane,
838
- note: "平台没有 group-by:**计数/分组计数用 data.list size:1 + filter 只读 total**(服务端精确计数,~1.3KB,不拉行);分组=值域×count,值域从 field.list options/字典元数据取;sum/avg 才拉列(all:true cap 1000,超出分片并如实标 complete:false);跨模型/持久看板归 report,写时计算归 datarule type2。本路由只读。",
844
+ note: "**计数/分组/数值聚合用 data.aggregate**:metric:count=服务端 totalElements(~0.4KB,不拉行);groupBy 单列分组(count 可枚举=值域×count,值域从 field.list options/字典元数据取;数值指标一律本地扫描);sum/avg/min/max 需 field 且已发布 NUMERICAL(2)——本地折叠 cap 1000,null 行不进聚合、avg 分母排除 null,截断如实标 complete:false;跨模型/持久看板归 report,写时计算归 datarule type2。本路由只读。",
839
845
  readTools,
840
846
  readiness: DISCOVERY_AUTHORITY.readiness,
841
847
  firstCommands: [action],
@@ -846,7 +852,7 @@ function goalRouteInner(registry, goal) {
846
852
  state: "needs-input",
847
853
  question: "要统计哪个模型(schemaCode 或业务名)?按哪个字段分组/什么条件?",
848
854
  action,
849
- why: "计数用 size:1+filter→total(服务端精确计数、无需拉行);分组计数=值域×count(值域从 field.list/字典元数据取);sum/avg 才需要拉列(all:true cap 1000)",
855
+ why: "计数用 data.aggregate metric:count→total(服务端精确、无需拉行);分组用 groupBy(值域从 field.list/字典元数据取);数值聚合用 metric:sum/avg/min/max + field(本地折叠 cap 1000,截断标 complete:false)",
850
856
  },
851
857
  };
852
858
  }
@@ -16,7 +16,7 @@ export const APP_WIRE = Object.freeze({
16
16
  defaultFolderSeed: "apppackage/create seeds one top-level Folder with name_i18n.en=defaultGroup (display「默认分组」); app.create readback surfaces defaultFolder{id,path,isDefault:true}; folder.tree marks the same node isDefault:true",
17
17
  exportBody: "apppackage/export POST body {appCode, references} (AppImportExportController.exportApp(AppExportParamVO) — decompiled AI-Platform-v1.1.25) streams a ZIP: <appCode>-<uuid>/manifest.json + meta/{dm,form,view,workflow,report} + dependencies/platform/*; refusals stay HTTP 200 JSON envelopes (10005 应用编码不能为空, 600005 应用不存在!)",
18
18
  exportReferences: "references accepts the design UI's five refTabsKey arrays (relativeDictionary/relativeRole/relativeBizService/relativeAdvanceDataSource/relativeReportAdvanceDataSource) taken verbatim from apppackage/dependencies?appCode=; {} (or omitted) exports zero selected dependencies",
19
- exportBinaryStream: "both exporters answer a non-envelope ZIP stream (Content-Type application/octet-stream) on success; a JSON body on a 200 is a refusal/malformed answer, never a package — bytes are validated for the PK local-header magic and non-zero entry count before reporting success",
19
+ exportBinaryStream: "both exporters answer a non-envelope ZIP stream (Content-Type application/octet-stream) on success; a JSON body on a 200 is a refusal/malformed answer, never a package — bytes are validated for the PK local-header magic and non-zero entry count before reporting success. Live timed run: the ZIP arrives synchronously in 1–3s (r64b 实测), so a timeout must surface as uncertain, never as success",
20
20
  environmentExport: "lifeCycle/apppackage/lifeCycleExport POST {} → metadata.zip (LifeCycleIEFacadeImpl.exportLifeCycle): metadata/app/applist/<appCode>/… for EVERY app + metadata/app/appgroup.json + ALL biz services (metadata/bizservice/manifest.json + servicegroup.json) + bizdatasource.json + metadata/manifest.json; GET answers 40007 请求方法不正确; no per-app/per-asset filter, per-app packages use empty references",
21
21
  });
22
22
  export const APP_LANE_CONTRACT = Object.freeze({
@@ -87,7 +87,7 @@ export const APP_LANE_CONTRACT = Object.freeze({
87
87
  }),
88
88
  "app.export": Object.freeze({
89
89
  scope: "app package export",
90
- description: "导出配置包(备份用;导出≠迁移——CLI 不提供 import,导入走平台控制台/应用导入向导):applicationCode 省略 → 环境级生命周期包(/lifeCycle/apppackage/lifeCycleExport,全部应用包+应用分组+业务集成服务+数据源,metadata/…)。指定 applicationCode → 单应用包(apppackage/export,body {appCode,references},meta/{dm,form,view,workflow,report}+dependencies/platform/*)。includeDependencies 仅单应用有效:先读 apppackage/dependencies,把引用全选后传 references;环境包平台固定空引用,故环境范围传 true 直接拒。ZIP 同步返回(实测 1–3s;超时回 uncertain,勿当成功)。产物落盘:默认会话 artifacts,out 指定配置根内路径(0600)。回执只给 outPath/bytes/sha256/条目清单/资产计数,永不内联包内容。环境包完整性由回执 packageIntegrity/warnings 交叉核(应用被平台跳过会显式告警,勿用于迁移)。平台没有按资产类型筛选的参数,不收 assetTypes。",
90
+ description: "导出配置包(备份用;导出≠迁移——CLI 不提供 import,导入走平台控制台/应用导入向导):applicationCode 省略 → 环境级生命周期包(/lifeCycle/apppackage/lifeCycleExport,全部应用包+应用分组+业务集成服务+数据源,metadata/…)。指定 applicationCode → 单应用包(apppackage/export,body {appCode,references},meta/{dm,form,view,workflow,report}+dependencies/platform/*)。includeDependencies 仅单应用有效:先读 apppackage/dependencies,把引用全选后传 references;环境包平台固定空引用,故环境范围传 true 直接拒。ZIP 同步返回(超时回 uncertain,勿当成功)。产物落盘:默认会话 artifacts,out 指定配置根内路径(0600)。回执只给 outPath/bytes/sha256/条目清单/资产计数,永不内联包内容。环境包完整性由回执 packageIntegrity/warnings 交叉核(应用被平台跳过会显式告警,勿用于迁移)。平台没有按资产类型筛选的参数,不收 assetTypes。",
91
91
  }),
92
92
  }),
93
93
  });
@@ -26,9 +26,9 @@ export const B2_WIRE = Object.freeze({
26
26
  registrationShellBoundary: "a source-evidenced native adapter configuration is complete only when its adapter-specific service config is present; RESTFUL/DATA_SQL/DATA_TABLE/SAP/KAFKA also require their adapter-specific method config for a named method; SOAP methods are WSDL-discovered rather than fixed configJson; INTERNAL method creation remains extension-package import. A fully configured native method is a complete, bindable BizMethod; a name/parameter-face-only registration shell is NOT a published BizMethod and must never be bound",
27
27
  categoryCrud: "ticket 103: category/update {id,name} (missing id → 501052; duplicate name → 501004, BizServiceCategoryServiceImpl.save:54-63) and category/delete?id= (services under the category → 501003 业务服务目录下存在集成服务,不可删除!BizServiceFacadeImpl.java:196-207 — blocked, no cascade); the platform NEVER validates a service's serviceCategoryId (BizServiceServiceImpl.update:251 writes it verbatim), so register/update refuse a dangling id (bizservice-category-dangling) with zero writes after a read-only list resolution",
28
28
  dbConnPoolCrud: "ticket 104: dbconnpool list/create/update/delete (/api/api/bizservice/dbconnpool/*, BizDatabaseConnectionPoolController). The RAW list face returns the password column UNMASKED — the tool strips it (explicit field whitelist; credentials never echo, never enter artifacts). Platform update is a FULL-ROW overwrite (BizDatabaseConnectionPoolServiceImpl.update:135-168 carries only createdTime) → the tool echoes untouched columns including the stored password ciphertext (a name-only update cannot wipe jdbcUrl/username/credentials). delete is blocked with 502006 while any service config references the pool code (BizServiceFacadeImpl delete:173-189 — no cascade); name empty → 502004, code invalid → 502003, duplicate → 502002 (save:103-118). DATA_SQL/DATA_TABLE serviceConfig.commonlist.databaseConnectionPoolCode gets a fail-closed existence preflight (bizservice-dbconnpool-dangling, zero writes)",
29
- discoveryFaces: "ticket 105: /bizservice/service/adapter_config answers a JSON STRING of every registered protocol adapter {code,name,config:{authList,commonList,serviceActionList,methodActionList}} (BizServiceController.java:329-344, AdapterConfigParam.java:16-181; with sqlConfigEnabled the platform removes DATA_SQL/DATA_TABLE — readback verbatim) — the SAME source service.register's adapter preflight enforces, so the faces cannot drift. get_tablename_list / get_table_column (BizServiceMethodController.java:503-560) serve DATA_TABLE services only: a DATA_SQL service answers 501010 业务服务不为DataTable类型 (evidence correction — the research doc's 'DATA_SQL table discovery' reading was wrong), and get_table_column answers GENERATED SQL TEMPLATES (DataTableSqlModel{sql,sqlType ∈ SELECT/INSERT/UPDATE/DELETE/UPSERT}), not column metadata. All strictly read-only (zero POST calls)",
29
+ discoveryFaces: "ticket 105: /bizservice/service/adapter_config answers a JSON STRING of every registered protocol adapter {code,name,config:{authList,commonList,serviceActionList,methodActionList}} (BizServiceController.java:329-344, AdapterConfigParam.java:16-181; with sqlConfigEnabled the platform removes DATA_SQL/DATA_TABLE — readback verbatim) — the SAME source service.register's adapter preflight enforces, so the faces cannot drift. get_tablename_list / get_table_column (BizServiceMethodController.java:503-560) serve DATA_TABLE services only: a DATA_SQL service answers 501010 业务服务不为DataTable类型 (evidence correction — the research doc's 'DATA_SQL table discovery' reading was wrong), and get_table_column answers GENERATED SQL TEMPLATES (DataTableSqlModel{sql,sqlType ∈ SELECT/INSERT/UPDATE/DELETE/UPSERT}), not column metadata. All strictly read-only (zero POST calls). There is no free-SQL query channel: run a registered read-only method through method.test, read business rows through data.list (GitLab #18 P2-6 — do not use table_sql as a query entry)",
30
30
  ieFaces: "ticket 106: the IE chain is export (POST /bizservice/service/export {serviceCodes:[]} → ZIP stream: manifest.json + version.md, BizServiceIEController.java:110-148), upload (POST /api/runtime/query/upload_file, multipart field `file`, answers a PLAIN STRING refId — QueryRuntimeController.java:2414-2428), check ({fileName,overWrite,modifyServiceCodes} → BizServiceIEMsgModel{modifyServiceCodes[isRepeated],missedDataSourceCodes,missedUserList}), import ({fileName,overWrite,modifyServiceCodes,groupId}). Every refId is ONE-SHOT: downloadFile(...,true) removes the refId→filename cache entry (FileOperateHelper2.java:43-57), so each check/import uploads its own fresh copy. The package carries services[]+methodsMap{} verbatim from the DB (service configJson plaintext incl. auth values; method configJson stored PLAINTEXT — controller decrypts on create/update, BizServiceMethodController.java:142-143; the IE import path never AES-decrypts) and NEVER the connection-pool rows; a repeated code without overwrite/modify refuses 309008 (ErrorCode.java:698) and the rename regex is [a-zA-Z][a-zA-Z0-9_]{0,27} (INVALID_NAME 580001). Version gate truncates to major.minor (8.6.x↔8.6.y pass). Tool boundary: responses echo a secret-free package summary only — auth parameterlist VALUES are masked, the zip stays platform-shaped for round-trip and is referenced by path+sha256, never inlined",
31
- testFace: "ticket 107: POST /bizservice/method/service_test {code, serviceCode, testInputParametersMap: Map<String,Object>} (BizServiceMethodController.java:398-412; BizServiceMethodVO.java:14-35) answers {success,msg,data:<adapter result>} (BizServiceFacadeImpl.java:426-464). It is a REAL execution, not a dry-run: BizBusService.invoke dispatches to the service's ProtocolAdapterRuntimeService — RESTFUL fires real HTTP (RestProtocolAdapterRuntimeServiceImpl.java:218-350), DATA_SQL/DATA_TABLE run real JDBC behind the cloudpivot.bizservice.sqlConfig.enabled switch (DataSql…:105-188), SOAP calls for real (Soap…:98-123), INTERNAL reuses the HTTP code path (Internal…:126-230). SAP/KAFKA runtimes are NOT evidenced on this face — refused, never guessed. ZERO config writes: the chain only reads h_biz_service/h_biz_service_method and writes async integration logs (BizBusServiceImpl.java:190-226,403-414). The tool is a governed write (real external side effects), validates testInputParametersMap against the declared parameter face (missing required / unknown key = zero service_test wire), refuses registration shells, and re-reads the method row to prove the config survived untouched",
31
+ testFace: "ticket 107: POST /bizservice/method/service_test {code, serviceCode, testInputParametersMap: Map<String,Object>} (BizServiceMethodController.java:398-412; BizServiceMethodVO.java:14-35) answers {success,msg,data:<adapter result>} (BizServiceFacadeImpl.java:426-464). It is a REAL execution, not a dry-run: BizBusService.invoke dispatches to the service's ProtocolAdapterRuntimeService — RESTFUL fires real HTTP (RestProtocolAdapterRuntimeServiceImpl.java:218-350), DATA_SQL/DATA_TABLE run real JDBC behind the cloudpivot.bizservice.sqlConfig.enabled switch (DataSql…:105-188), SOAP calls for real (Soap…:98-123), INTERNAL reuses the HTTP code path (Internal…:126-230). SAP/KAFKA runtimes are NOT evidenced on this face — refused, never guessed. ZERO config writes: the chain only reads h_biz_service/h_biz_service_method and writes async integration logs (BizBusServiceImpl.java:190-226,403-414). The tool is a governed write (real external side effects), validates testInputParametersMap against the declared parameter face (missing required / unknown key = zero service_test wire), refuses registration shells, and re-reads the method row to prove the config survived untouched. r21 live: the test run does NOT reuse the OMC login session — an endpoint that requires auth must get independent credentials in the service config; even the platform's own endpoints answer 401/needs credentials, surfaced as externalSuccess:false, which is NOT a configuration error",
32
32
  });
33
33
  const B2_SCOPE = "create readback delete";
34
34
  export const B2_LANE_CONTRACT = Object.freeze({
@@ -188,7 +188,7 @@ export const B2_LANE_CONTRACT = Object.freeze({
188
188
  }),
189
189
  "service.table_sql": Object.freeze({
190
190
  scope: "readback",
191
- description: "表 SQL 模板发现:`/bizservice/method/get_table_column?serviceCode=&tableName=`。端点名虽为 column,实际返回**生成的 SQL 模板**(DataTableSqlModel{sql,sqlType ∈ SELECT/INSERT/UPDATE/DELETE/UPSERT},BizServiceFacadeImpl.getDataTableSql:889-910),不是列元数据;同样仅 DATA_TABLE 服务(501010)。纯只读。**只回模板、不执行**——平台没有自由 SQL 查询通道(要跑已注册的只读方法用 method.test,要查业务数据用 data.list 分片),别把本工具当查询入口(GitLab #18 P2-6)。",
191
+ description: "表 SQL 模板发现:`/bizservice/method/get_table_column?serviceCode=&tableName=`。端点名虽为 column,实际返回**生成的 SQL 模板**(DataTableSqlModel{sql,sqlType ∈ SELECT/INSERT/UPDATE/DELETE/UPSERT},BizServiceFacadeImpl.getDataTableSql:889-910),不是列元数据;同样仅 DATA_TABLE 服务(501010)。纯只读。**只回模板、不执行**——平台无自由 SQL 查询通道(已注册只读方法用 method.test,业务数据用 data.list 分片)。",
192
192
  }),
193
193
  "service.delete": Object.freeze({
194
194
  scope: B2_SCOPE,
@@ -208,7 +208,7 @@ export const B2_LANE_CONTRACT = Object.freeze({
208
208
  }),
209
209
  "method.test": Object.freeze({
210
210
  scope: "test readback",
211
- description: "设计器测试面:对已配置的业务集成方法发起一次真实试跑(治理写——会真调用外部系统;**试跑不复用 OMC 登录态——目标端点要求认证时,须在服务配置里给独立认证参数**(r21 实测:指向本平台自身端点也会被拒 401/需凭据,externalSuccess:false 且不等于配置错误);`/bizservice/method/service_test`,body `{serviceCode, code, testInputParametersMap}`,回显平台内层 `{success,msg,data}`)。testInputParametersMap 按方法声明参数面 fail-closed 校验:缺必填入参/未知参数键/注册壳方法/SAP、KAFKA(该面无运行时证据)一律本地拒绝零试跑调用。试跑**零配置写**(链路只读 h_biz_service/h_biz_service_method,仅异步记集成日志),读回面复核方法 config 原样未动;RESTFUL/DATA_SQL/DATA_TABLE/SOAP/INTERNAL 真执行(DATA_SQL/DATA_TABLE 受平台 sqlConfig 开关限制)。服务级 testBizService 是人员/部门回显测试,不属本面。",
211
+ description: "设计器测试面:对已配置的业务集成方法发起一次真实试跑(治理写——会真调用外部系统;**试跑不复用 OMC 登录态——目标端点要求认证时,须在服务配置里给独立认证参数**(认证失败表现为 401/需凭据、externalSuccess:false,不等于配置错误);`/bizservice/method/service_test`,body `{serviceCode, code, testInputParametersMap}`,回显平台内层 `{success,msg,data}`)。testInputParametersMap 按方法声明参数面 fail-closed 校验:缺必填入参/未知参数键/注册壳方法/SAP、KAFKA(该面无运行时证据)一律本地拒绝零试跑调用。试跑**零配置写**(链路只读 h_biz_service/h_biz_service_method,仅异步记集成日志),读回面复核方法 config 原样未动;RESTFUL/DATA_SQL/DATA_TABLE/SOAP/INTERNAL 真执行(DATA_SQL/DATA_TABLE 受平台 sqlConfig 开关限制)。服务级 testBizService 是人员/部门回显测试,不属本面。",
212
212
  }),
213
213
  }),
214
214
  });