@stalfh233/omc-cli 0.8.22 → 0.8.25

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.
@@ -97,6 +97,155 @@ export const RESTFUL_AUTH_PARAMETER_DEFINITIONS = Object.freeze({
97
97
  { code: "oauth_path", name: "获取token地址", description: "", required: true },
98
98
  ]),
99
99
  });
100
+ /** 每个适配器在设计器里真实提供的鉴权(平台 adapter_config.authList 的离线基线)。 */
101
+ export const ADAPTER_BUILTIN_AUTH_CODES = Object.freeze({
102
+ RESTFUL: Object.freeze(["basic", "oauth_password", "oauth_client", "customer"]),
103
+ INTERNAL: Object.freeze(["basic", "oauth_password", "oauth_client", "customer"]),
104
+ SOAP: Object.freeze(["basic", "customer"]),
105
+ });
106
+ /**
107
+ * 鉴权参数从哪来(探针 P/Q 的根因:agent 知道 code,但不知道每个 value 该填什么)。
108
+ * 这是 CLI 的教学文案,不是平台契约;平台权威清单始终是 adapter_config.authList。
109
+ */
110
+ export const AUTH_PARAMETER_PROVENANCE = Object.freeze({
111
+ basic: Object.freeze({
112
+ username: "目标系统的账号;自调本实例时就是 CloudPivot 自己的账号",
113
+ password: "该账号的密码;自调本实例时就是 CloudPivot 账号的密码",
114
+ }),
115
+ oauth_password: Object.freeze({
116
+ client_id: "目标系统 OAuth 应用注册后发放的客户端 ID;自调本实例时是本平台 API 客户端",
117
+ client_secret: "同一 OAuth 应用的客户端密钥;自调本实例时是本平台 API 客户端密钥",
118
+ username: "资源所有者账号(目标系统里的用户);自调本实例时就是 CloudPivot 自己的账号",
119
+ password: "该资源所有者账号的密码;自调本实例时就是 CloudPivot 账号的密码",
120
+ oauth_path: "目标系统的 token 端点(如 https://host/oauth/token;平台用它换 Bearer token)",
121
+ }),
122
+ oauth_client: Object.freeze({
123
+ client_id: "目标系统 OAuth 应用注册后发放的客户端 ID;自调本实例时是本平台 API 客户端",
124
+ client_secret: "同一 OAuth 应用的客户端密钥;自调本实例时是本平台 API 客户端密钥",
125
+ oauth_path: "目标系统的 token 端点(client_credentials 模式换 Bearer token 的地址)",
126
+ }),
127
+ customer: Object.freeze({}),
128
+ });
129
+ /** 平台 adapter_config 的 authList → Map(发现驱动的唯一来源;扩展鉴权也走这里)。 */
130
+ export function adapterAuthDefinitions(adapters, adapterCode) {
131
+ if (!Array.isArray(adapters))
132
+ return undefined;
133
+ const row = adapters.find((entry) => isRecord(entry) && entry.code === adapterCode);
134
+ if (!isRecord(row) || !isRecord(row.config) || !Array.isArray(row.config.authList))
135
+ return undefined;
136
+ const map = new Map();
137
+ for (const auth of row.config.authList) {
138
+ if (!isRecord(auth) || typeof auth.code !== "string" || !auth.code)
139
+ continue;
140
+ const parameters = Array.isArray(auth.parameterlist)
141
+ ? auth.parameterlist.flatMap((param) => isRecord(param) && typeof param.code === "string" && param.code
142
+ ? [{
143
+ code: param.code,
144
+ required: param.required !== false,
145
+ ...(typeof param.name === "string" ? { name: param.name } : {}),
146
+ ...(typeof param.description === "string" ? { description: param.description } : {}),
147
+ }]
148
+ : [])
149
+ : [];
150
+ map.set(auth.code, {
151
+ code: auth.code,
152
+ ...(typeof auth.name === "string" ? { name: auth.name } : {}),
153
+ ...(typeof auth.description === "string" ? { description: auth.description } : {}),
154
+ parameters,
155
+ });
156
+ }
157
+ return map;
158
+ }
159
+ /** 参数来源提示(只对内置 4 种有文案;扩展鉴权用平台 authList 的 name/description)。 */
160
+ export function authParameterProvenance(authCode, parameterCode) {
161
+ return AUTH_PARAMETER_PROVENANCE[authCode]?.[parameterCode];
162
+ }
163
+ function provenanceLine(authCode, parameterCode) {
164
+ const source = authParameterProvenance(authCode, parameterCode);
165
+ return source !== undefined ? `${parameterCode}=${source}` : parameterCode;
166
+ }
167
+ function validateAuthItems(adapterCode, auth, authCode, expected) {
168
+ if (!Array.isArray(auth.parameterlist))
169
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, `${adapterCode} 服务 auth.parameterlist 必须是数组`, { key: "auth.parameterlist" });
170
+ const allowed = new Set(expected.map((param) => param.code));
171
+ const required = expected.filter((param) => param.required).map((param) => param.code);
172
+ const seen = new Set();
173
+ for (const [index, item] of auth.parameterlist.entries()) {
174
+ if (!isRecord(item) || typeof item.code !== "string" || !item.code || typeof item.value !== "string" || !item.value)
175
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, `${adapterCode} auth.parameterlist[${index}] 必须含 code/name?/value 非空字符串;敏感 value 只透传不记录`, { key: `auth.parameterlist[${index}]` });
176
+ if (item.name !== undefined && typeof item.name !== "string")
177
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, `${adapterCode} auth.parameterlist[${index}].name 必须是字符串`, { key: `auth.parameterlist[${index}].name` });
178
+ if (item.description !== undefined && typeof item.description !== "string")
179
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, `${adapterCode} auth.parameterlist[${index}].description 必须是字符串`, { key: `auth.parameterlist[${index}].description` });
180
+ if (item.required !== undefined && item.required !== true)
181
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, `${adapterCode} auth.parameterlist[${index}].required 必须为 true(前端 AdapterConfigParam.Param 定义)`, { key: `auth.parameterlist[${index}].required` });
182
+ if (seen.has(item.code))
183
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, `${adapterCode} auth.parameterlist 不允许重复参数 ${item.code}`, { key: "auth.parameterlist" });
184
+ seen.add(item.code);
185
+ if (!allowed.has(item.code))
186
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, `${adapterCode} auth=${authCode} 不允许参数 ${item.code};平台该鉴权的参数:${[...allowed].join(",") || "无"}`, { key: `auth.parameterlist[${index}].code` });
187
+ }
188
+ const missing = required.filter((code) => !seen.has(code));
189
+ if (missing.length > 0)
190
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, `${adapterCode} auth=${authCode} 缺少参数:${missing.join(",")}。参数来源:${missing.map((code) => provenanceLine(authCode, code)).join(";")}。平台权威清单:omc call service.adapter_config --args '{"adapterCode":"${adapterCode}"}'`, { key: "auth.parameterlist", missing, provenance: Object.fromEntries(missing.map((code) => [code, authParameterProvenance(authCode, code) ?? null])) });
191
+ }
192
+ function validateDynamicAuthShape(adapterCode, auth) {
193
+ if (!Array.isArray(auth.parameterlist))
194
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, `${adapterCode} 服务 auth.parameterlist 必须是数组`, { key: "auth.parameterlist" });
195
+ const seen = new Set();
196
+ for (const [index, item] of auth.parameterlist.entries()) {
197
+ if (!isRecord(item) || typeof item.code !== "string" || !item.code || typeof item.value !== "string" || !item.value)
198
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, `${adapterCode} auth.parameterlist[${index}] 必须含 code/name?/value 非空字符串;敏感 value 只透传不记录`, { key: `auth.parameterlist[${index}]` });
199
+ if (seen.has(item.code))
200
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, `${adapterCode} auth.parameterlist 不允许重复参数 ${item.code}`, { key: "auth.parameterlist" });
201
+ seen.add(item.code);
202
+ }
203
+ // 空 parameterlist 合法:某些扩展鉴权(SPI)无参数。离线只校验结构,
204
+ // 参数集合仍交由在线预检按 authList 判定(多给/少给都由平台定义兜底)。
205
+ }
206
+ function validateAuthBase(auth) {
207
+ if (!isRecord(auth))
208
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, "服务 auth 必须是对象", { key: "auth" });
209
+ if (typeof auth.code !== "string" || !auth.code)
210
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, "auth.code 必须是非空字符串(RESTFUL/INTERNAL 内置 customer/basic/oauth_password/oauth_client;SOAP 内置 basic/customer;扩展鉴权仅在 adapter_config 列出时可用)", { key: "auth.code" });
211
+ if (typeof auth.name !== "undefined" && typeof auth.name !== "string")
212
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, "auth.name 必须是字符串", { key: "auth.name" });
213
+ if (typeof auth.description !== "undefined" && typeof auth.description !== "string")
214
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, "auth.description 必须是字符串", { key: "auth.description" });
215
+ }
216
+ /**
217
+ * 按适配器校验鉴权(发现驱动):
218
+ * - 传入 `definitions`(平台 adapter_config.authList 的映射)时,code/参数必须与平台完全一致;
219
+ * - 不传时用离线基线(RESTFUL/INTERNAL 4 种、SOAP 2 种)。
220
+ */
221
+ export function validateAuthForAdapter(adapterCode, auth, definitions, options = {}) {
222
+ validateAuthBase(auth);
223
+ const authCode = auth.code;
224
+ if (definitions !== undefined) {
225
+ const definition = definitions.get(authCode);
226
+ if (definition === undefined)
227
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, `${adapterCode} 的鉴权 ${authCode} 不在平台 adapter_config.authList 里;本环境可用:${[...definitions.keys()].join("、") || "无"}。平台权威清单:omc call service.adapter_config --args '{"adapterCode":"${adapterCode}"}'`, { key: "auth.code", adapterCode, availableAuth: [...definitions.keys()] });
228
+ validateAuthItems(adapterCode, auth, authCode, definition.parameters);
229
+ return;
230
+ }
231
+ const builtinCodes = ADAPTER_BUILTIN_AUTH_CODES[adapterCode];
232
+ // 离线 dry-lint(无环境)遇到未列出的 code:RESTFUL/INTERNAL 可能是环境里装了
233
+ // 扩展鉴权,只校验结构,留到真写/--dry-run 的在线预检按 adapter_config 判定。
234
+ if (options.allowDynamicAuth === true && definitions === undefined
235
+ && (adapterCode === "RESTFUL" || adapterCode === "INTERNAL")
236
+ && builtinCodes !== undefined && !builtinCodes.includes(authCode)) {
237
+ validateDynamicAuthShape(adapterCode, auth);
238
+ return;
239
+ }
240
+ if (builtinCodes === undefined || !builtinCodes.includes(authCode)) {
241
+ if (builtinCodes !== undefined)
242
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, `${adapterCode} 的鉴权只能是 ${builtinCodes.join("/")}(平台 adapter_config 未提供 ${authCode})`, { key: "auth.code", adapterCode, availableAuth: builtinCodes });
243
+ else
244
+ refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, `RESTFUL auth.code 必须是 customer/basic/oauth_password/oauth_client,动态扩展鉴权需先确认平台 adapter_config 列出`, { key: "auth.code" });
245
+ }
246
+ const parameters = RESTFUL_AUTH_PARAMETER_DEFINITIONS[authCode] ?? [];
247
+ validateAuthItems(adapterCode, auth, authCode, parameters.map((param) => ({ code: param.code, required: param.required, name: param.name, description: param.description })));
248
+ }
100
249
  export function validateRestfulAuth(auth) {
101
250
  if (!isRecord(auth))
102
251
  refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, "RESTFUL 服务 auth 必须是对象", { key: "auth" });
@@ -219,15 +368,15 @@ function scanAuthParameterlistForPlaceholders(parameterlist, adapterCode) {
219
368
  refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, `${adapterCode} 服务鉴权凭据 ${finding.code} 包含${finding.reason}——平台 service/create 不校验凭据内容,注册成功但运行时自调必败(r6-onlinejs 真机:全 0 corpId 注册成功、自调 401/500)。凭据必须从任务环境事实取真值(如 doctor 显示的 corpId、任务提供的 client_secret)。`, { key: `auth.parameterlist.${finding.code}`, value: finding.valueKind });
220
369
  }
221
370
  }
222
- function requireAuthAndUrl(serviceConfig, adapterCode) {
371
+ function requireAuthAndUrl(serviceConfig, adapterCode, authDefinitions, options = {}) {
223
372
  const auth = serviceConfig.auth;
224
373
  // T05:掩码/占位分类先于结构校验——结构化掩码对象 {masked:true}(读回形状回灌)
225
374
  // 在 string-only 的 validateRestfulAuth 之前就能拿到专属拒因,而不是笼统的
226
375
  // "必须是非空字符串"。两道防线都保留(INTERNAL 路径只依赖本扫描)。
227
376
  if (isRecord(auth) && Array.isArray(auth.parameterlist))
228
377
  scanAuthParameterlistForPlaceholders(auth.parameterlist, adapterCode);
229
- if (adapterCode === "RESTFUL" || adapterCode === "SOAP")
230
- validateRestfulAuth(auth);
378
+ if (adapterCode === "RESTFUL" || adapterCode === "SOAP" || adapterCode === "INTERNAL")
379
+ validateAuthForAdapter(adapterCode, auth, authDefinitions, options);
231
380
  if (!isRecord(auth) || typeof auth.code !== "string" || !auth.code || !Array.isArray(auth.parameterlist))
232
381
  refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, `${adapterCode} 服务 configJson 需要 auth {code, parameterlist[]}`, { key: "auth" });
233
382
  if (!commonlistValue(serviceConfig, "url"))
@@ -254,12 +403,12 @@ function validateSapMethod(methodConfig) {
254
403
  * Validate a structured service config against the adapter's source-evidenced
255
404
  * required keys. Service configJson is plaintext on the wire for every adapter.
256
405
  */
257
- export function compileServiceConfig(adapterCode, serviceConfig) {
406
+ export function compileServiceConfig(adapterCode, serviceConfig, authDefinitions, options = {}) {
258
407
  assertStructuredConfig(serviceConfig, "serviceConfig");
259
408
  if (!isRecord(serviceConfig))
260
409
  refuse(BIZSERVICE_CONFIG_BLOCKERS.serviceConfigInvalid, "serviceConfig 必须是结构化对象", { adapterCode });
261
410
  if (adapterCode === "RESTFUL" || adapterCode === "INTERNAL" || adapterCode === "SOAP")
262
- requireAuthAndUrl(serviceConfig, adapterCode);
411
+ requireAuthAndUrl(serviceConfig, adapterCode, authDefinitions, options);
263
412
  if (adapterCode === "DATA_SQL" || adapterCode === "DATA_TABLE") {
264
413
  requireEmptyAuth(serviceConfig, adapterCode);
265
414
  requireCommonlist(serviceConfig, "databaseConnectionPoolCode", adapterCode);
package/dist/call.js CHANGED
@@ -276,7 +276,9 @@ function humanResultLine(result) {
276
276
  // F4(w153):写面 summary 已存在时,mappingSnapshotGap 的同一句仍要进
277
277
  // 人类行——探针只读 stderr 的首屏,不能让它埋在 JSON 里。
278
278
  const gapNote = mappingSnapshotGapNote(result);
279
- return gapNote !== undefined ? `${result.summary};${gapNote}` : result.summary;
279
+ const mappingNote = mappingRuntimeNoteOf(result);
280
+ const extra = [gapNote, mappingNote].filter((note) => note !== undefined);
281
+ return extra.length > 0 ? `${result.summary};${extra.join(";")}` : result.summary;
280
282
  }
281
283
  if (status === "ok" || status === "dry-run")
282
284
  return readDiagnosticLine(result);
@@ -309,8 +311,21 @@ function readDiagnosticLine(result) {
309
311
  const mappingGapNote = mappingSnapshotGapNote(result);
310
312
  if (mappingGapNote !== undefined)
311
313
  notes.push(mappingGapNote);
314
+ const mappingNote = mappingRuntimeNoteOf(result);
315
+ if (mappingNote !== undefined)
316
+ notes.push(mappingNote);
312
317
  return notes.length > 0 ? notes.join(";") : null;
313
318
  }
319
+ /**
320
+ * 探针 Q F8(0.8.23,P1):`mappingRuntimeNote` 只活在 JSON 的 readback 里,只看
321
+ * stderr 首屏会把「手填快照」误当成「映射生效」。同一句进人类行——配置面 vs 运行面
322
+ * 的分界必须在第一屏可见。
323
+ */
324
+ function mappingRuntimeNoteOf(result) {
325
+ const nested = result.readback !== null && typeof result.readback === "object" ? result.readback : undefined;
326
+ const note = result.mappingRuntimeNote ?? nested?.mappingRuntimeNote;
327
+ return typeof note === "string" && note.length > 0 ? note : undefined;
328
+ }
314
329
  /**
315
330
  * F4(w153):写面「映射配了但快照空」的人话行——JSON 里 mappingSnapshotGap
316
331
  * 同一份证据,stderr 让调用方在写回执的第一屏就看到具体行/字段。
package/dist/cli.js CHANGED
@@ -2363,12 +2363,19 @@ function cmdDiscovery(kind, transport, value, options = {}) {
2363
2363
  // F7:前缀候选之外,按 description/scope 意图词补 1–2 个(排在原候选之后)。
2364
2364
  const byText = toolsByTextIntent(requested, registry, 2).filter((name) => !candidates.includes(name));
2365
2365
  const shown = [...candidates, ...byText];
2366
+ // 探针 Q F12(0.8.23):model-purge / model-scaffold 等是 CLI 命令,不是 call
2367
+ // 工具;describe 应直接指 --help。命令清单取**权威来源**(调用方传入的
2368
+ // commander 命令名),并排除同名工具(doctor 等以工具优先)——不维护第二份清单。
2369
+ const commandNames = new Set((options.commands ?? []).filter((name) => !registry.some((tool) => tool.name === name)));
2370
+ const commandPointer = commandNames.has(requested)
2371
+ ? `;${requested} 是 CLI 命令(不是 call 工具):用法用 \`omc ${requested} --help\`,参数/破坏性语义同理`
2372
+ : "";
2366
2373
  const pointer = candidates.length === 0 && byText.length === 0 && (kind === "describe" || kind === "contract")
2367
2374
  ? `;describe 的目标是工具名(如 rule.save);图/模板/节点形状用 describe <tool> --full 或 contract <lane>,工具清单用 omc next "<目标>" / omc commands --json --compact`
2368
2375
  : "";
2369
2376
  const absence = absencePointer(requested);
2370
2377
  const textNote = byText.length > 0 ? `;didYouMeanByText: ${byText.join("、")}` : "";
2371
- return emitInvalid(transport, { message: `${kind} target not found: "${requested}"${shown.length > 0 ? `; did you mean: ${shown.join("、")}` : ""}${textNote}${absence}${approvalPointer}${intentPointer}${formPointer}${pointer}` });
2378
+ return emitInvalid(transport, { message: `${kind} target not found: "${requested}"${shown.length > 0 ? `; did you mean: ${shown.join("、")}` : ""}${textNote}${commandPointer}${absence}${approvalPointer}${intentPointer}${formPointer}${pointer}` });
2372
2379
  }
2373
2380
  return emitProjectedResult({ status: "ok", ...result }, transport, options.jq, options.explain === true);
2374
2381
  }
@@ -3031,6 +3038,26 @@ function cmdHelpSearch(topic, query, transport, searchMode, limit) {
3031
3038
  if (query.trim() === "")
3032
3039
  return emitInvalid(transport, { message: `--search 需要一个非空查询词(例:omc help --search "40000")` });
3033
3040
  const result = searchSkills(query, { mode, limit: rawLimit });
3041
+ // 探针 Q F3(0.8.23):help 检索只扫方法论;但「两列」的答案在工具配方里
3042
+ // (form.draft --example two-column-layout)。零命中时把配方标题/别名/index 也搜一遍,
3043
+ // 直接给可复制的 describe 命令。
3044
+ const recipeMatches = result.total === 0
3045
+ ? (() => {
3046
+ const needle = query.trim().toLowerCase();
3047
+ const out = [];
3048
+ for (const tool of buildToolRegistry()) {
3049
+ for (const recipe of tool.executionMetadata?.recipes ?? []) {
3050
+ const haystack = `${recipe.id} ${recipe.title} ${(recipe.aliases ?? []).join(" ")}`.toLowerCase();
3051
+ if (!haystack.includes(needle))
3052
+ continue;
3053
+ out.push({ tool: tool.name, example: recipe.id, title: recipe.title, command: `omc describe ${tool.name} --example ${recipe.id}` });
3054
+ if (out.length >= 5)
3055
+ return out;
3056
+ }
3057
+ }
3058
+ return out;
3059
+ })()
3060
+ : [];
3034
3061
  // A hit bigger than this is a book, not an answer: inlining it would recreate
3035
3062
  // the 12 KB sections agents already pay for. Name the exact `--section`
3036
3063
  // command instead and say the body is not included.
@@ -3061,7 +3088,14 @@ function cmdHelpSearch(topic, query, transport, searchMode, limit) {
3061
3088
  returnedMatches: entries.length,
3062
3089
  truncated: truncated || entries.some((entry) => entry.sectionComplete === false),
3063
3090
  matches: entries,
3064
- ...(result.total === 0 ? { message: "没有匹配章节;换更短的字面词(错误码、字段名、命令名)或加 --search-mode any。格式常量/参数用 `omc describe <tool> --param <name>` 或 `omc contract <lane>` 查(例:omc describe field.create --param options)" } : {}),
3091
+ ...(result.total === 0
3092
+ ? {
3093
+ message: recipeMatches.length > 0
3094
+ ? "没有匹配章节,但工具配方命中(见 recipeMatches):可直接 describe --example 取形状;章节检索换更短的字面词或加 --search-mode any。"
3095
+ : "没有匹配章节;换更短的字面词(错误码、字段名、命令名)或加 --search-mode any。格式常量/参数用 `omc describe <tool> --param <name>` 或 `omc contract <lane>` 查(例:omc describe field.create --param options)",
3096
+ ...(recipeMatches.length > 0 ? { recipeMatches } : {}),
3097
+ }
3098
+ : {}),
3065
3099
  ...(result.total > 0 && entries.length === 0 ? { message: "命中存在但连指针都放不进预算;加 --limit 1 或换更短的查询" } : {}),
3066
3100
  });
3067
3101
  let truncating = false;
@@ -4121,7 +4155,7 @@ async function main() {
4121
4155
  command.command("commands").description("路由索引(不是目录):工具计数+展开梯子;--kind read 一屏列全部只读工具与必填参数;--json 才是全量目录").option("--json").option("--compact").option("--inline", "commands --json 超过 32KiB 时仍内联").option("--filter <keyword>").option("--capability <id>").option("--lane <id>", "按 lane 过滤(完整 id 大小写不敏感;也接受能力 id/别名如 data、list-view;多候选会列出)").option("--kind <kind>", "按读写维度过滤:read|write|meta(read = 只读工具索引)").option("--read-only", "等价 --kind read(与 --kind 互斥)").option("--limit <n>", "分页:最多 n 行(1..200;给定即关闭宽词分组)").option("--offset <n>", "分页起点(默认 0;未给 --limit 时按 50)").option("--max-output-bytes <bytes>").addOption(jqOption()).addOption(explainOption()).action(async (options) => { commandExitCode = await withTransport(options, request, (transport) => cmdDiscovery("commands", transport, undefined, { json: options.json === true, compact: options.compact === true, inline: options.inline === true, ...(options.filter ? { filter: options.filter } : {}), ...(options.capability ? { capability: options.capability } : {}), ...(options.lane ? { lane: options.lane } : {}), ...(options.kind !== undefined ? { kind: options.kind } : {}), ...(options.readOnly === true ? { readOnly: true } : {}), ...(options.limit !== undefined ? { limit: options.limit } : {}), ...(options.offset !== undefined ? { offset: options.offset } : {}), ...(options.jq !== undefined ? { jq: options.jq } : {}), explain: options.explain === true })); }); // C2(0.8.4):describe 是零环境接触的发现面,但 `--env` 是"人人都以为通用"的
4122
4156
  // flag——与 `next` 同处理:接受并忽略(不因反射性传参被 unknown option 打回)。
4123
4157
  command.command("describe <tool>").option("--env <environment>", "接受并忽略:describe 零环境接触(参数表与运行时无关)").option("--environment <environment>", "同 --env(接受并忽略)").option("--full").option("--cache-ok", "允许 --full 在同会话重复读时短路为 artifact 指针(默认每次回全文)").option("--schema-only").option("--param <name>").option("--example [id]").option("--max-output-bytes <bytes>").addOption(jqOption()).addOption(explainOption()).action(async (tool, options) => {
4124
- commandExitCode = await withTransport(options, request, (transport) => cmdDiscovery("describe", transport, tool, { full: options.full === true, cacheOk: options.cacheOk === true, schemaOnly: options.schemaOnly === true, ...(options.param ? { param: options.param } : {}), ...(options.example ? { example: options.example } : {}), ...(options.jq !== undefined ? { jq: options.jq } : {}), explain: options.explain === true }));
4158
+ commandExitCode = await withTransport(options, request, (transport) => cmdDiscovery("describe", transport, tool, { full: options.full === true, cacheOk: options.cacheOk === true, schemaOnly: options.schemaOnly === true, ...(options.param ? { param: options.param } : {}), ...(options.example ? { example: options.example } : {}), ...(options.jq !== undefined ? { jq: options.jq } : {}), explain: options.explain === true, commands: command.commands.map((entry) => entry.name()) }));
4125
4159
  });
4126
4160
  command.command("contract <lane>").option("--full").option("--tool <name>").option("--max-output-bytes <bytes>").addOption(jqOption()).addOption(explainOption()).action(async (lane, options) => { commandExitCode = await withTransport(options, request, (transport) => cmdDiscovery("contract", transport, lane, { full: options.full === true, ...(options.tool ? { tool: options.tool } : {}), ...(options.jq !== undefined ? { jq: options.jq } : {}), explain: options.explain === true })); });
4127
4161
  // 2026-11-05 用户实测:`commands --json` 存在,于是大家自然写 `capabilities --json`
package/dist/field-add.js CHANGED
@@ -185,7 +185,7 @@ export async function cmdFieldAdd(args, contextForTest) {
185
185
  inputJson = readFileSync(assertSafeInputPath(root, fieldsFile, "--fields-file"), "utf8");
186
186
  }
187
187
  catch (error) {
188
- return invalid(`--fields-file 读取失败:${error instanceof Error ? error.message : String(error)}`);
188
+ return invalid(`--fields-file 读取失败:${error instanceof Error ? error.message : String(error)}${/must be inside the configuration root/.test(error instanceof Error ? error.message : String(error)) ? "。把参数文件放到配置根内(如配置根/args.json)再用 --fields-file 引用;不想落盘可直接用 stdin:--fields - < <文件>" : ""}`);
189
189
  }
190
190
  }
191
191
  if (inputJson === undefined)
@@ -186,7 +186,7 @@ export const B2_LANE_CONTRACT = Object.freeze({
186
186
  }),
187
187
  "service.adapter_config": Object.freeze({
188
188
  scope: "readback",
189
- description: "适配器配置发现(设计器同源):`/bizservice/service/adapter_config` 返回 JSON 字符串(已解码),每个适配器 {code,name,config:{authList,commonList,serviceActionList,methodActionList}}——commonList/authList 的 code+required 就是 service.register 预检所依据的必需键(同源无漂移)。顶栏恒带 adapterCodes 摘要;compact:true 只回 code/name/description(选型)。RESTFUL:url 必填 + basic/oauth_password/oauth_client/customer 鉴权面;DATA_SQL:databaseConnectionPoolCode 必填、无服务级鉴权(sqlConfigEnabled 开启时平台会移除 DATA_SQL/DATA_TABLE,读回原样)。纯只读。",
189
+ description: "适配器配置发现(设计器同源):`/bizservice/service/adapter_config` 返回 JSON 字符串(已解码),每个适配器 {code,name,config:{authList,commonList,serviceActionList,methodActionList}}——commonList/authList 的 code+required 就是 service.register 预检所依据的必需键(同源无漂移)。顶栏恒带 adapterCodes 摘要;compact:true 只回 code/name/description(选型)。RESTFUL:url 必填 + basic/oauth_password/oauth_client/customer 鉴权面;DATA_SQL:databaseConnectionPoolCode 必填、无服务级鉴权(sqlConfigEnabled 开启时平台会移除 DATA_SQL/DATA_TABLE,读回原样)。完整面另给 authGuide(每种鉴权的参数及各参数来源)。纯只读。",
190
190
  }),
191
191
  "service.table_list": Object.freeze({
192
192
  scope: "readback",
@@ -13,7 +13,7 @@ import { wireCall, wireRows, wireDownloadBuffer, wireUploadFile, WireError } fro
13
13
  import { parameterFaceCovers, serviceStatusSegment } from "../service-support.js";
14
14
  import { ZipFormatError, readZipEntries, zipEntryByBasename } from "../zip.js";
15
15
  import { B2_LANE_CONTRACT } from "./b2-registration-contract.js";
16
- import { BIZSERVICE_WRITE_ADAPTERS, assertBizServiceAdapterWhitelisted, assertStructuredConfig, compileMethodConfigPlain, compileParameterFace, compileServiceConfig, maskServiceConfigSecrets, normalizeMethodConfigReadback, normalizeParameterFaceReadback, parseIeManifest, iePackageSummary, } from "../bizservice-config.js";
16
+ import { BIZSERVICE_WRITE_ADAPTERS, assertBizServiceAdapterWhitelisted, assertStructuredConfig, compileMethodConfigPlain, compileParameterFace, compileServiceConfig, adapterAuthDefinitions, authParameterProvenance, maskServiceConfigSecrets, normalizeMethodConfigReadback, normalizeParameterFaceReadback, parseIeManifest, iePackageSummary, } from "../bizservice-config.js";
17
17
  import { omcCore } from "../omc-core-lazy.js";
18
18
  const B2_LANE = B2_LANE_CONTRACT.lane;
19
19
  const B2_TOOLS = B2_LANE_CONTRACT.tools;
@@ -202,6 +202,46 @@ function poolReadbackFace(pool) {
202
202
  ...(pool.externInfo !== undefined && pool.externInfo !== null ? { externInfo: pool.externInfo } : {}),
203
203
  };
204
204
  }
205
+ /**
206
+ * 探针 P/Q(0.8.24→0.8.25):鉴权面以平台 `adapter_config.authList` 为唯一来源——只有
207
+ * 平台列出的 code 才能写,参数集合也按平台定义核对(离线基线内嵌 4 种,在线读平台)。
208
+ * 平台证据(两版行号不同,均实测):
209
+ * - REST:8.6.26 RestProtocolAdapterServiceImpl.java:50 getConfig / :55-68 四个 Auth /
210
+ * :69-72 追加 SPI;2.1.5 同文件 :48 / :53-66 / :67-70。
211
+ * - SOAP:8.6.26 SoapProtocolAdapterServiceImpl.java:42 getConfig / :46-47 两个 Auth;
212
+ * 2.1.5 :40 / :44-45。
213
+ * - INTERNAL:8.6.26 InternalProtocolAdapterServiceImpl.java:50 getConfig / :55-68;
214
+ * 2.1.5 :48 / :53-66。
215
+ * - 扩展接口:RestAuthenticationService.java:15-17(@ExtensionPoint + getAuthConfig)。
216
+ * - authList 原样返回:BizServiceFacadeImpl.java:322-328。
217
+ */
218
+ const AUTH_ADAPTERS = new Set(["RESTFUL", "INTERNAL", "SOAP"]);
219
+ async function loadAdapterAuthDefinitions(session, adapterCode) {
220
+ const result = await wireCall(session, { path: ENDPOINTS.bizServiceAdapterConfig });
221
+ let adapters = null;
222
+ if (typeof result.data === "string" && result.data.trim()) {
223
+ try {
224
+ adapters = JSON.parse(result.data);
225
+ }
226
+ catch {
227
+ adapters = null;
228
+ }
229
+ }
230
+ const definitions = adapterAuthDefinitions(adapters, adapterCode);
231
+ if (definitions !== undefined)
232
+ return definitions;
233
+ const codes = Array.isArray(adapters)
234
+ ? adapters.flatMap((row) => row !== null && typeof row === "object" && typeof row.code === "string" ? [String(row.code)] : [])
235
+ : [];
236
+ throw new ToolRefusalError({
237
+ status: "refused",
238
+ blocker: "bizservice-adapter-not-listed",
239
+ adapterCode,
240
+ availableAdapters: codes,
241
+ message: `平台 adapter_config 里没有适配器 ${adapterCode}(本环境:${codes.join("、") || "读取失败"})——鉴权面无法按平台定义校验,拒绝在未知适配器上写鉴权配置`,
242
+ nextCommand: "omc call service.adapter_config --args '{}'",
243
+ });
244
+ }
205
245
  /**
206
246
  * Ticket 104 — fail-closed DATA_SQL/DATA_TABLE binding preflight. The
207
247
  * platform stores commonlist.databaseConnectionPoolCode with no existence
@@ -1226,7 +1266,35 @@ export function registerB2Lane(tools) {
1226
1266
  ...(row.description !== undefined ? { description: row.description } : {}),
1227
1267
  }))
1228
1268
  : adapters;
1229
- return { adapters: face, adapterCodes, rawPresent: typeof result.data === "string", ...(args.compact === true ? { compact: true } : {}) };
1269
+ // 探针 P/Q(0.8.24):鉴权参数从哪来——把平台 authList 与来源提示合成只读指引。
1270
+ // 只在完整面给(compact 选型不付这份字节)。
1271
+ const authGuide = args.compact === true
1272
+ ? undefined
1273
+ : rows.flatMap((row) => {
1274
+ const adapterCode = typeof row.code === "string" ? row.code : "";
1275
+ if (!adapterCode)
1276
+ return [];
1277
+ const definitions = adapterAuthDefinitions(rows, adapterCode);
1278
+ if (definitions === undefined || definitions.size === 0)
1279
+ return [];
1280
+ return [{
1281
+ adapterCode,
1282
+ auths: [...definitions.values()].map((definition) => ({
1283
+ code: definition.code,
1284
+ ...(definition.name !== undefined ? { name: definition.name } : {}),
1285
+ ...(definition.description !== undefined ? { description: definition.description } : {}),
1286
+ parameters: definition.parameters.map((parameter) => ({
1287
+ code: parameter.code,
1288
+ required: parameter.required,
1289
+ ...(parameter.name !== undefined ? { name: parameter.name } : {}),
1290
+ ...(authParameterProvenance(definition.code, parameter.code) !== undefined
1291
+ ? { source: authParameterProvenance(definition.code, parameter.code) }
1292
+ : {}),
1293
+ })),
1294
+ })),
1295
+ }];
1296
+ });
1297
+ return { adapters: face, adapterCodes, rawPresent: typeof result.data === "string", ...(authGuide !== undefined && authGuide.length > 0 ? { authGuide } : {}), ...(args.compact === true ? { compact: true } : {}) };
1230
1298
  }, {
1231
1299
  // 2026-11-01 读门 2048:适配器面本身就是这个工具的存在意义(注册预检的
1232
1300
  // 同源依据)——compact 保留 adapters 本体,不折码表。r28f F5:顶栏
@@ -1293,7 +1361,7 @@ export function registerB2Lane(tools) {
1293
1361
  name: z.string().min(1).describe("服务名称(设计器必填;非空,中文≤50,服务端同样强制)"),
1294
1362
  adapterCode: z.string().min(1).describe("适配器编码(设计器必填):RESTFUL/DATA_SQL/DATA_TABLE/SAP/KAFKA/SOAP。自定义 Java 方法体(扩展接口)的常规做法是用 RESTFUL 指向扩展端点,不要用 INTERNAL/custom_protocol"),
1295
1363
  serviceCategoryId: z.string().min(1).describe("所属目录 id(设计器必填;用 service.category.list 解析,「全部」是空 id 虚拟项不可用,必要时 service.category.create 新建)"),
1296
- serviceConfig: z.record(z.string(), z.unknown()).optional().describe("结构化服务 configJson(明文落库;原生适配器按 adapterCode 校验)。RESTFUL/SOAP 鉴权 auth.code 仅接受 customer(parameterlist=[])、basic(username/password)、oauth_password(client_id/client_secret/username/password/oauth_path)、oauth_client(client_id/client_secret/oauth_path);每项为 code/name?/value 字符串,值只透传不记录;DATA_SQL/DATA_TABLE/SAP/KAFKA 不使用服务级鉴权,auth 只能为空对象或省略"),
1364
+ serviceConfig: z.record(z.string(), z.unknown()).optional().describe("结构化服务 configJson(明文落库;原生适配器按 adapterCode 校验)。鉴权 auth.code:RESTFUL/INTERNAL 内置 customer(parameterlist=[])、basic(username/password)、oauth_password(client_id/client_secret/username/password/oauth_path)、oauth_client(client_id/client_secret/oauth_path),SOAP 仅 basic/customer;每项为 code/name?/value 字符串,值只透传不记录;DATA_SQL/DATA_TABLE/SAP/KAFKA 不使用服务级鉴权,auth 只能为空对象或省略"),
1297
1365
  methodName: z.string().optional(),
1298
1366
  methodConfig: z.record(z.string(), z.unknown()).optional().describe("结构化方法 configJson(工具 AES-128-ECB+Base64 加密后上送;明文会被平台静默存 NULL)。RESTFUL 必填 httpType/requestBodyType/url/frontEndExtensionEnable,枚举可用名字(httpType: Post/Get/Put/Patch/Delete;requestBodyType: Form-urlencoded/JSON/Text),工具会编码成平台整数索引。DATA_SQL/DATA_TABLE 需要 sql/returnType(returnType: Void/SingleObject/List)。RESTFUL/DATA_SQL/DATA_TABLE/SAP/KAFKA 带 methodName 时必填;SOAP 方法由 WSDL 动态发现、无固定方法 configJson"),
1299
1367
  methodInputParameters: z.union([z.array(z.record(z.string(), z.unknown())), z.string()]).optional().describe("方法输入参数声明([{code,name,…}] 数组或 JSON 字符串)→ inputParametersJson;绑定校验按 code 对账;RESTFUL 每参数需 configJson.position"),
@@ -1326,7 +1394,10 @@ export function registerB2Lane(tools) {
1326
1394
  // Ticket 103: the platform never validates serviceCategoryId — refuse a
1327
1395
  // dangling id before any write (read-only resolution precedes this).
1328
1396
  await assertCategoryResolves(session, args.serviceCategoryId);
1329
- const serviceConfigJson = args.serviceConfig !== undefined ? compileServiceConfig(adapterCode, args.serviceConfig) : undefined;
1397
+ const authDefinitions = args.serviceConfig !== undefined && AUTH_ADAPTERS.has(adapterCode)
1398
+ ? await loadAdapterAuthDefinitions(session, adapterCode)
1399
+ : undefined;
1400
+ const serviceConfigJson = args.serviceConfig !== undefined ? compileServiceConfig(adapterCode, args.serviceConfig, authDefinitions) : undefined;
1330
1401
  // Ticket 104: a DATA_SQL/DATA_TABLE binding must reference an existing
1331
1402
  // connection pool before any write (the platform stores it unvalidated).
1332
1403
  if (serviceConfigJson !== undefined && (adapterCode === "DATA_SQL" || adapterCode === "DATA_TABLE")) {
@@ -1406,6 +1477,35 @@ export function registerB2Lane(tools) {
1406
1477
  }),
1407
1478
  };
1408
1479
  },
1480
+ dryRunPayload: async (session, args) => {
1481
+ // dry-run 与真写同门(本仓硬规则):重复 code / 分类 / 平台鉴权面 / 连接池
1482
+ // 全部在只读阶段跑一遍;这里不写任何东西。
1483
+ const adapterCode = String(args.adapterCode ?? "");
1484
+ const existing = await wireCall(session, { path: ENDPOINTS.bizServiceGetByCode, query: { serviceCode: args.serviceCode } }).then((res) => res.data).catch(() => null);
1485
+ if (existing != null)
1486
+ return { wouldChange: false, servicePresent: true, summary: `业务服务 ${args.serviceCode} 已存在——真写会回 duplicate-service(零写入)` };
1487
+ await assertCategoryResolves(session, String(args.serviceCategoryId ?? ""));
1488
+ const authDefinitions = args.serviceConfig !== undefined && AUTH_ADAPTERS.has(adapterCode)
1489
+ ? await loadAdapterAuthDefinitions(session, adapterCode)
1490
+ : undefined;
1491
+ const serviceConfigJson = args.serviceConfig !== undefined ? compileServiceConfig(adapterCode, args.serviceConfig, authDefinitions) : undefined;
1492
+ if (serviceConfigJson !== undefined && (adapterCode === "DATA_SQL" || adapterCode === "DATA_TABLE")) {
1493
+ const poolCode = dbConnPoolCodeOf(args.serviceConfig);
1494
+ if (poolCode !== undefined)
1495
+ await assertDbConnPoolResolves(session, poolCode);
1496
+ }
1497
+ const auth = args.serviceConfig?.auth;
1498
+ return {
1499
+ wouldChange: true,
1500
+ serviceCode: args.serviceCode,
1501
+ adapterCode,
1502
+ summary: `即将注册业务服务 ${args.serviceCode}(adapter=${adapterCode})${args.methodName !== undefined ? ` + 方法 ${args.methodName}` : ""};分类/鉴权面/连接池/配置必需键已按真写同门校验`,
1503
+ ...(auth !== undefined && typeof auth.code === "string"
1504
+ ? { auth: { code: auth.code, parameterCodes: Array.isArray(auth.parameterlist) ? auth.parameterlist.flatMap((item) => item !== null && typeof item === "object" && typeof item.code === "string" ? [String(item.code)] : []) : [] } }
1505
+ : {}),
1506
+ ...(args.methodName !== undefined ? { methodCode: args.methodName } : {}),
1507
+ };
1508
+ },
1409
1509
  preflight: (args) => {
1410
1510
  // Dry-lint (zero wire). `omc call` bypasses zod, so every schema-level
1411
1511
  // required is re-enforced here BEFORE the write permission gate.
@@ -1424,7 +1524,9 @@ export function registerB2Lane(tools) {
1424
1524
  // methods from WSDL via its native refresh path.
1425
1525
  if (args.serviceConfig === undefined)
1426
1526
  throw new ToolRefusalError({ status: "refused", blocker: "bizservice-service-config-invalid", message: `${adapterCode} 服务必须携带结构化 serviceConfig(设计器同款必填)` });
1427
- compileServiceConfig(adapterCode, args.serviceConfig);
1527
+ // 离线 dry-lint:RESTFUL/INTERNAL 未列出的 code 可能是环境里的扩展鉴权,
1528
+ // 这里只校验结构;真写/--dry-run 由 adapter_config 在线预检判定。
1529
+ compileServiceConfig(adapterCode, args.serviceConfig, undefined, { allowDynamicAuth: true });
1428
1530
  if (args.methodName !== undefined && adapterCode === "SOAP")
1429
1531
  throw new ToolRefusalError({ status: "refused", blocker: "bizservice-method-config-invalid", message: "SOAP 方法由 WSDL 动态发现,没有固定 methodConfig;请使用平台原生 SOAP refresh/方法发现接口,不伪造方法体" });
1430
1532
  if (args.methodName !== undefined && args.methodConfig === undefined)
@@ -1457,7 +1559,10 @@ export function registerB2Lane(tools) {
1457
1559
  await assertCategoryResolves(session, args.serviceCategoryId);
1458
1560
  // A structured serviceConfig targets the designer write face: the same
1459
1561
  // adapter whitelist + required-key preflight as register (ticket 92).
1460
- const serviceConfigJson = args.serviceConfig !== undefined ? compileServiceConfig(assertBizServiceAdapterWhitelisted(adapterCode), args.serviceConfig) : undefined;
1562
+ const authDefinitions = args.serviceConfig !== undefined && AUTH_ADAPTERS.has(adapterCode)
1563
+ ? await loadAdapterAuthDefinitions(session, adapterCode)
1564
+ : undefined;
1565
+ const serviceConfigJson = args.serviceConfig !== undefined ? compileServiceConfig(assertBizServiceAdapterWhitelisted(adapterCode), args.serviceConfig, authDefinitions) : undefined;
1461
1566
  // Ticket 104: a DATA_SQL/DATA_TABLE binding must reference an existing
1462
1567
  // connection pool before the update write.
1463
1568
  if (serviceConfigJson !== undefined && (adapterCode === "DATA_SQL" || adapterCode === "DATA_TABLE")) {
@@ -2080,7 +2080,7 @@ function relationMappingsEmptyWarnings(publishedRows) {
2080
2080
  .filter((code) => code.length > 0);
2081
2081
  if (empty.length === 0)
2082
2082
  return undefined;
2083
- return [{ code: "relation-mappings-empty", fields: empty, hint: "选中时不回填副本列;配 options.mappings 后再 field.publish" }];
2083
+ return [{ code: "relation-mappings-empty", fields: empty, hint: "该字段的 mappings 为显式留空(若你本就不打算回填副本列,可忽略这条);需要回填时配 options.mappings 后再 field.publish" }];
2084
2084
  }
2085
2085
  async function formBindingAdvisory(session, schemaCode, publishedRows) {
2086
2086
  const dictionaryStale = await dictionaryStaleAdvisory(session, publishedRows);
@@ -119,7 +119,7 @@ export async function cmdModelScaffold(args) {
119
119
  const detail = error instanceof Error ? error.message : String(error);
120
120
  // F2(0.8.6):越界报错要能直接照做——旧文案只说「必须在配置根内」,
121
121
  // 不给路径。与 --args-file(cli.ts)同配方:给根内示例文件路径。
122
- return invalid(`--fields-file 读取失败:${detail}${/must be inside the configuration root/.test(detail) ? `。把参数文件放到 ${root} 之下(如 ${join(root, "args.json")}),再用 --fields-file 引用` : ""}`);
122
+ return invalid(`--fields-file 读取失败:${detail}${/must be inside the configuration root/.test(detail) ? `。把参数文件放到 ${root} 之下(如 ${join(root, "args.json")})再用 --fields-file 引用;不想落盘可直接用 stdin:--fields - < <文件>` : ""}`);
123
123
  }
124
124
  }
125
125
  if (inputJson === undefined)
@@ -369,6 +369,10 @@ const PATH_KEY_ALIASES = Object.freeze({
369
369
  content: "publishedContent",
370
370
  data: "fields",
371
371
  props: "properties",
372
+ // 探针 Q F4/F7:form.get 的布局在 draftRows/publishedRows(不是 layout);
373
+ // data.load 的记录在 data(不是 record)。
374
+ layout: "publishedRows",
375
+ record: "data",
372
376
  });
373
377
  export function pathMissDidYouMean(at, available, availableAll) {
374
378
  if (at === undefined || at.length === 0)
@@ -21,7 +21,8 @@ const restfulQueryService = Object.freeze({
21
21
  },
22
22
  preconditions: ["serviceCategoryId 由 service.category.list 解析(「全部」是空 id 虚拟项不可用);RESTFUL 服务 configJson 需要 auth 与 commonlist[url];带 methodName 时必须有 methodConfig"],
23
23
  conditionalRequirements: [
24
- "RESTFUL auth.code ∈ customer(parameterlist=[]) / basic(client… username/password) / oauth_password / oauth_client;parameterlist 每项 {code,value} 且必须与 auth.code 期望参数完全一致",
24
+ "鉴权内置 4 种(部署可用 SPI 追加,以 adapter_config.authList 为准):customer(无,parameterlist=[]) / basic(username/password) / oauth_password(client_id/client_secret/username/password/oauth_path) / oauth_client(client_id/client_secret/oauth_path);SOAP 只有 basic/customer。parameterlist 每项 {code,value},code 必须与平台 adapter_config.authList 完全一致",
25
+ "参数从哪来:username/password=目标系统账号与密码(自调本实例时就是 CloudPivot 自己的账号与密码);client_id/client_secret=目标系统 OAuth 应用注册后发放(自调本实例时是本平台 API 客户端);oauth_path=目标系统的 token 端点(换 Bearer token 的地址)。每条鉴权的权威参数清单+来源:omc call service.adapter_config(authGuide);写失败时回执也会逐参数点名来源",
25
26
  "RESTFUL 方法 configJson 必需键:httpType(Post/Get/Put/Patch/Delete)、requestBodyType(Form-urlencoded/JSON/Text)、url、frontEndExtensionEnable(布尔)",
26
27
  "RESTFUL 每个输入/输出参数必须带 configJson.position ∈ QUERY_PARAMS/REQUEST_HEADER/REQUEST_BODY/PATH_PARAMS(URL_VARIABLE 被运行时拒 501007)",
27
28
  "每个输入/输出参数必须带 bizPropertyType(如 SHORT_TEXT/NUMERICAL)——缺它提交即被 bizservice-parameter-face-invalid 拒(r19-p7 首拒根因,2026-10-26 修正本配方)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stalfh233/omc-cli",
3
- "version": "0.8.22",
3
+ "version": "0.8.25",
4
4
  "description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "commander": "14.0.3",
61
- "omc-core": "0.8.22",
61
+ "omc-core": "0.8.25",
62
62
  "proper-lockfile": "4.1.2",
63
63
  "write-file-atomic": "6.0.0",
64
64
  "zod": "^3.23.8",
@@ -76,6 +76,6 @@
76
76
  "directory": "packages/omc-cli"
77
77
  },
78
78
  "optionalDependencies": {
79
- "@stalfh233/omc-fake-platform": "0.8.22"
79
+ "@stalfh233/omc-fake-platform": "0.8.25"
80
80
  }
81
81
  }