@stalfh233/omc-cli 0.6.39 → 0.6.40

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/cli.js CHANGED
@@ -214,7 +214,7 @@ async function cmdDoctor(store, environment, serviceCode) {
214
214
  steps.push(`配置 ok 环境=${resolved.name}(来源 ${resolved.source})`);
215
215
  steps.push(`远端写 ok 远端写=${environmentWritable(resolved.profile) ? "允许" : "只读"}${requiresProductionConfirmation(resolved.profile) ? ";生产环境:每笔写入需 confirmProduction" : ""}(平台侧变更)`);
216
216
  // r29f F9:读面也会本地落盘(artifacts/usage/describe 缓存);与远端写分开说。
217
- steps.push(`本地落盘 ok .omc/(artifacts·usage·describe 缓存;读面也会写)。重定位:OMC_CONFIG_HOME=<根>(其下 .omc/)或 OMC_ARTIFACTS_HOME=<产物目录>`);
217
+ steps.push(`本地落盘 ok .omc/(artifacts·usage·describe 缓存;读面也会写)。usage 台账只供维护者计量,agent 不要读它自查成本(你的成本口径=轮数+字节)。重定位:OMC_CONFIG_HOME=<根>(其下 .omc/)或 OMC_ARTIFACTS_HOME=<产物目录>`);
218
218
  const removed = removedProfileKeys(resolved.profile);
219
219
  if (removed.length > 0)
220
220
  steps.push(`配置 ⚠ 含已移除键(请删除):${removed.join("、")}`);
@@ -375,7 +375,7 @@ function doctorAnchor() {
375
375
  `方法论 omc help <topic>(或 --topic <name>)--sections / --section "<标题>"(按节读,随包 skills/);topic:${topics}`,
376
376
  "大输出 超预算结果只回 artifactId/sha256/fetch;用 fetch 里的 omc artifact get <id>(可加 --jq <path>)取回,勿全量读入",
377
377
  // r29f F9:只读面不碰远端,但仍会本地落盘——写清,避免「零写入」核对误判。
378
- "落盘 远端写=环境 writable 决定的平台变更;本地落盘=.omc/(artifacts/usage/describe 缓存,读面也会写)。可用 OMC_CONFIG_HOME 重定位配置根(其下 .omc/),或 OMC_ARTIFACTS_HOME 单独重定位产物目录",
378
+ "落盘 远端写=环境 writable 决定的平台变更;本地落盘=.omc/(artifacts/usage/describe 缓存,读面也会写;usage 台账只供维护者计量,agent 不要读它自查成本——你的成本口径=轮数+字节)。可用 OMC_CONFIG_HOME 重定位配置根(其下 .omc/),或 OMC_ARTIFACTS_HOME 单独重定位产物目录",
379
379
  ].join("\n");
380
380
  }
381
381
  function flag0(args, name) {
@@ -2287,9 +2287,14 @@ async function main() {
2287
2287
  console.error("(none configured; run omc setup)");
2288
2288
  // A5(GitLab #15):credential: missing 的环境列得出、调不通(auth-config)——
2289
2289
  // 标注出来,防把"没凭据"误判成"参数写错"。
2290
- else
2290
+ else {
2291
2291
  for (const row of rows)
2292
2292
  console.error(`${row.name}${row.isDefault ? " (default)" : ""} ${row.baseUrl} app=${row.applicationCode}${row.writable ? "" : " [read-only]"}${row.credential === "ok" ? "" : " [credential: missing → omc setup]"}`);
2293
+ // r55(2026-11-11 Windows 真机联调摩擦):agent 为拿 token 花 7 轮、用户手粘
2294
+ // 700+ 字符坏 3 次——正道 `env export` 在所有 skill/文档里零露出。列环境时顺手
2295
+ // 指路(CLI 自更新直达存量项目,比 AGENTS.md 重装传播可靠)。
2296
+ console.error(`联调/token/headers:omc env export --env <env> --example curl|node(CLI 自己登录;别向用户要浏览器 token,也别读 token-cache)`);
2297
+ }
2293
2298
  commandExitCode = CLI_EXIT_CODES.ok;
2294
2299
  });
2295
2300
  command.command("doctor").option("--environment <environment>").option("--env <environment>").option("--service <serviceCode>", "可选:体检单个业务集成服务的鉴权参数形状(掩码/占位/全 0 检出,WARN 非致命)").action(async (options) => { commandExitCode = await cmdDoctor(new ConfigStore(defaultPaths()), options.environment ?? options.env, options.service); });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stalfh233/omc-cli",
3
- "version": "0.6.39",
3
+ "version": "0.6.40",
4
4
  "description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "dependencies": {
57
57
  "commander": "14.0.3",
58
- "omc-core": "0.6.39",
58
+ "omc-core": "0.6.40",
59
59
  "proper-lockfile": "4.1.2",
60
60
  "write-file-atomic": "6.0.0",
61
61
  "zod": "^3.23.8",
@@ -73,6 +73,6 @@
73
73
  "directory": "packages/omc-cli"
74
74
  },
75
75
  "optionalDependencies": {
76
- "@stalfh233/omc-fake-platform": "0.6.39"
76
+ "@stalfh233/omc-fake-platform": "0.6.40"
77
77
  }
78
78
  }
@@ -410,6 +410,8 @@ owner/creater/modifier/部门/时间字段才从请求上下文回填(显式
410
410
  | 前端 / 站内 | `POST /api/api/v2/businessRule/invoke`(**双层 /api 前缀**,与按钮面一致),body `{appCode,schemaCode,businessRuleCode,data}`;**必带租户头 `X-LowCode-Corpid: <企业ID>`**(缺了 50000,容器日志 `corpId can not be blank`;头名多一个连字符都无效) | Bearer 用户会话 token(RequestContext,无 userId 参数) | **handle 返回值原样 = `ResponseResult.data`(全部键,无白名单)** |
411
411
  | 第三方 | `POST /api/openapi/v3/bo/invokeBizRule`,body 带 `userId` | OAuth2 client_credentials(token 端点**按部署路由不同**,见下) | handle 返回值**包在 `returnObject` 里**(不是直接 data) |
412
412
 
413
+ v2/v3 的用户会话 token:`omc env export --env <env> --field accessToken`(CLI 内部登录,401 自动重登;禁手翻 token-cache)。
414
+
413
415
  **v3 的 token 端点三处口径不一,以真机为准(2026-11-11 实测 1.1.25)**:
414
416
 
415
417
  | 来源 | 写的路径 | 实测 |
@@ -102,6 +102,8 @@ To use another environment you must ask the user first, then either
102
102
  `OMC_ALLOW_CROSS_ENV=1` (prints a `cross-env:` line to stderr). Never widen the
103
103
  scope on your own initiative.
104
104
 
105
+ 联调/token/headers:`omc env export --env <env> --example node|curl`(CLI 自行登录;不向用户要浏览器 token、不读 token-cache)。
106
+
105
107
  ## 4. Boundaries
106
108
 
107
109
  Out-of-coverage, blocked, or unsupported faces refuse with a manifest citation —
@@ -41,6 +41,10 @@ description: Choose the right OMC CLI tool for a goal. Use when unsure whether a
41
41
  | **批量停用**某模型规则 | `omc call rule.disableMany --args '{"schemaCode":"<m>"}'`(默认含预置行;`customOnly:true` 只停自定义) |
42
42
  | 字段清单(去噪) | `omc call field.list --args '{"schemaCode":"<m>","published":true}'`(默认业务字段,`all:true` 取全) |
43
43
 
44
+ ## `omc call` 结果怎么取值
45
+
46
+ A 内联(结果小)`--jq 'result.路径'` 直取;B 外置(带 `artifactId`/`truncated`)同次调用加 `--jq`,或 `omc artifact get <id> --jq`;C pathMiss 按 `available[]` 真键名改路径——别换语法重试。
47
+
44
48
  **业务键优先**:`rule.get`/`datarule.update`/`datarule.delete`/`workflow.get_*` 接受业务键
45
49
  (schemaCode+ruleCode / schemaCode+propertyCode / schemaCode),免去先 list 取 id。
46
50