@hcmai/sdk 0.21.13 → 0.22.0

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/index.js CHANGED
@@ -2004,7 +2004,42 @@ function resolveRefs(record, store) {
2004
2004
 
2005
2005
  // src/import/parse.ts
2006
2006
  import yaml6, { JSON_SCHEMA } from "js-yaml";
2007
- var REQUIRED = ["model", "key_field", "count", "items"];
2007
+
2008
+ // src/import/schema.ts
2009
+ var DATA_PACKAGE_FIXTURE_SCHEMA_V1 = {
2010
+ $schema: "https://json-schema.org/draft/2020-12/schema",
2011
+ $id: "urn:hcmai:data-package-fixture:v1",
2012
+ title: "DataPackage fixture v1",
2013
+ type: "object",
2014
+ required: ["model", "count", "items"],
2015
+ $defs: { nonEmptyString: { type: "string", pattern: "\\S" } },
2016
+ properties: {
2017
+ model: { $ref: "#/$defs/nonEmptyString" },
2018
+ key_field: {
2019
+ $ref: "#/$defs/nonEmptyString",
2020
+ description: "key_field \u58F0\u660E\u5355\u4E00\u771F\u5B9E\u4E1A\u52A1\u952E\uFF0C\u4F8B\u5982 key_field: code\uFF1Bhcm import v1 \u4E0D\u652F\u6301\u590D\u5408\u4E1A\u52A1\u952E\u3002"
2021
+ },
2022
+ key: {
2023
+ type: "array",
2024
+ minItems: 1,
2025
+ maxItems: 1,
2026
+ items: { $ref: "#/$defs/nonEmptyString" },
2027
+ deprecated: true,
2028
+ description: "\u65E7 key: [code] \u4EC5\u517C\u5BB9\u5355\u5143\u7D20\u6570\u7EC4\uFF0C\u8BFB\u53D6\u65F6\u7ED9\u51FA\u5F03\u7528\u544A\u8B66\uFF1B\u8BF7\u8FC1\u79FB\u5230 key_field: code\u3002"
2029
+ },
2030
+ count: { type: "integer", minimum: 0 },
2031
+ items: { type: "array", items: { type: "object" } }
2032
+ },
2033
+ oneOf: [
2034
+ { required: ["key_field"], not: { required: ["key"] } },
2035
+ { required: ["key"], not: { required: ["key_field"] } }
2036
+ ],
2037
+ additionalProperties: true,
2038
+ examples: [{ model: "OrgUnit", key_field: "code", count: 1, items: [{ code: "org-sales", name: "\u9500\u552E\u90E8" }] }]
2039
+ };
2040
+
2041
+ // src/import/parse.ts
2042
+ var nonEmptyString = (value) => typeof value === "string" && new RegExp(DATA_PACKAGE_FIXTURE_SCHEMA_V1.$defs.nonEmptyString.pattern).test(value);
2008
2043
  function parseFixture(yamlText, sourcePath) {
2009
2044
  const where = sourcePath ? ` (${sourcePath})` : "";
2010
2045
  const fail2 = (message) => {
@@ -2020,23 +2055,49 @@ function parseFixture(yamlText, sourcePath) {
2020
2055
  return fail2("fixture \u4E3A\u7A7A\u6216\u4E0D\u662F mapping");
2021
2056
  }
2022
2057
  const doc = parsed;
2023
- for (const f of REQUIRED) {
2058
+ for (const f of DATA_PACKAGE_FIXTURE_SCHEMA_V1.required) {
2024
2059
  if (doc[f] === void 0) return fail2(`fixture \u7F3A\u5FC5\u9700\u5B57\u6BB5 "${f}"`);
2025
2060
  }
2061
+ if (!nonEmptyString(doc.model)) return fail2('"model" \u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32');
2026
2062
  if (!Array.isArray(doc.items)) return fail2('"items" \u5FC5\u987B\u662F list');
2027
2063
  if (!Number.isInteger(doc.count)) return fail2('"count" \u5FC5\u987B\u662F\u6574\u6570');
2064
+ if (doc.count < DATA_PACKAGE_FIXTURE_SCHEMA_V1.properties.count.minimum) return fail2('"count" \u4E0D\u80FD\u5C0F\u4E8E 0');
2028
2065
  if (doc.items.length !== doc.count) {
2029
2066
  return fail2(`count mismatch: count=${doc.count} \u4F46 items \u6709 ${doc.items.length}`);
2030
2067
  }
2031
- const keyField = doc.key_field;
2068
+ const hasKeyField = Object.hasOwn(doc, "key_field");
2069
+ const hasLegacyKey = Object.hasOwn(doc, "key");
2070
+ if (hasKeyField && hasLegacyKey) return fail2("\u4E0D\u80FD\u540C\u65F6\u58F0\u660E key_field \u4E0E key\uFF1B\u8BF7\u53EA\u4FDD\u7559 key_field");
2071
+ if (!hasKeyField && !hasLegacyKey) return fail2('fixture \u7F3A\u5FC5\u9700\u5B57\u6BB5 "key_field"\uFF1B\u4F8B\u5982 key_field: code');
2072
+ let keyField;
2073
+ const warnings = [];
2074
+ if (hasLegacyKey) {
2075
+ const keys = doc.key;
2076
+ if (Array.isArray(keys) && keys.length > DATA_PACKAGE_FIXTURE_SCHEMA_V1.properties.key.maxItems) {
2077
+ return fail2("hcm import v1 \u4E0D\u652F\u6301\u590D\u5408\u4E1A\u52A1\u952E\uFF1B\u8BF7\u58F0\u660E\u5355\u4E00\u771F\u5B9E\u552F\u4E00\u7684 key_field\uFF0C\u6216\u5728\u5B8C\u6574 DataPackage manifest \u4E2D\u58F0\u660E models[].keys \u5E76\u8D70 hcm datapackage install");
2078
+ }
2079
+ if (!Array.isArray(keys) || keys.length !== DATA_PACKAGE_FIXTURE_SCHEMA_V1.properties.key.minItems || !nonEmptyString(keys[0])) {
2080
+ return fail2('"key" \u5FC5\u987B\u662F\u5355\u5143\u7D20\u6570\u7EC4\uFF0C\u5143\u7D20\u987B\u4E3A\u975E\u7A7A\u5B57\u7B26\u4E32\uFF1B\u8BF7\u4F7F\u7528 key_field: code');
2081
+ }
2082
+ keyField = keys[0];
2083
+ warnings.push(`key \u5DF2\u5F03\u7528\uFF1B\u8BF7\u6539\u4E3A key_field: ${keyField}\uFF08\u5DF2\u6309\u5355\u4E00\u4E1A\u52A1\u952E\u517C\u5BB9\u8BFB\u53D6\uFF09${where}`);
2084
+ } else {
2085
+ if (!nonEmptyString(doc.key_field)) return fail2('"key_field" \u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u6BB5\u540D\u5B57\u7B26\u4E32');
2086
+ keyField = doc.key_field;
2087
+ }
2032
2088
  const seen = /* @__PURE__ */ new Set();
2033
- for (const item of doc.items) {
2089
+ for (const [index, item] of doc.items.entries()) {
2090
+ if (!item || typeof item !== "object" || Array.isArray(item)) return fail2(`items[${index}] \u5FC5\u987B\u662F mapping`);
2034
2091
  const k = item[keyField];
2035
- if (k === void 0 || k === null || k === "") return fail2(`item \u7F3A key_field "${keyField}"`);
2092
+ if (!Object.hasOwn(item, keyField) || k === void 0 || k === null || k === "") return fail2(`item \u7F3A key_field "${keyField}"`);
2036
2093
  if (seen.has(String(k))) return fail2(`duplicate key "${k}" in ${String(doc.model)}`);
2037
2094
  seen.add(String(k));
2038
2095
  }
2039
- return { ...doc, sourcePath };
2096
+ const fixture = { ...doc, key_field: keyField, sourcePath };
2097
+ delete fixture.key;
2098
+ delete fixture.warnings;
2099
+ if (warnings.length > 0) fixture.warnings = warnings;
2100
+ return fixture;
2040
2101
  }
2041
2102
 
2042
2103
  // src/import/runner.ts
@@ -2046,6 +2107,7 @@ async function runImport(client, fixtures, opts = {}) {
2046
2107
  const rows = [];
2047
2108
  const tally = { created: 0, updated: 0, skipped: 0, failed: 0 };
2048
2109
  const refsFromTarget = [];
2110
+ const warnings = fixtures.flatMap((fixture) => fixture.warnings ?? []);
2049
2111
  const knownKeysOf = /* @__PURE__ */ new Map();
2050
2112
  const fieldNamesUnverified = [];
2051
2113
  const result = () => ({
@@ -2053,6 +2115,7 @@ async function runImport(client, fixtures, opts = {}) {
2053
2115
  rows,
2054
2116
  refs: store.snapshot(),
2055
2117
  refsFromTarget: [...refsFromTarget],
2118
+ ...warnings.length > 0 ? { warnings: [...warnings] } : {},
2056
2119
  fieldNamesUnverified: [...fieldNamesUnverified]
2057
2120
  });
2058
2121
  const knownKeysFor = async (model) => {
@@ -4484,6 +4547,12 @@ async function createWorkspaceFile(http, workspaceKey, relativePath, content) {
4484
4547
  });
4485
4548
  return toWorkspaceFileItem(resp.data);
4486
4549
  }
4550
+ async function validateWorkspaceFiles(http, workspaceKey, files, deletedPaths = []) {
4551
+ const resp = await http.post(`/api/models/${MODEL}/action/validate-files`, {
4552
+ form: { workspaceKey, files, deletedPaths }
4553
+ });
4554
+ return toWorkspacePreflightResult(unwrapActionData(resp.data));
4555
+ }
4487
4556
  async function deleteWorkspaceFile(http, fileId) {
4488
4557
  await http.delete(`/api/models/${MODEL}/${encodeURIComponent(fileId)}`);
4489
4558
  }
@@ -4524,6 +4593,36 @@ function toWorkspaceFileContent(value) {
4524
4593
  fileType: stringOrUndefined(obj.fileType)
4525
4594
  };
4526
4595
  }
4596
+ function toWorkspacePreflightResult(value) {
4597
+ const obj = asRecord(value);
4598
+ if (typeof obj.ok !== "boolean" || typeof obj.checked !== "number" || !Array.isArray(obj.issues)) {
4599
+ throw new CliError({
4600
+ code: "NETWORK_ERROR" /* NETWORK_ERROR */,
4601
+ message: "\u5DE5\u4F5C\u533A validate-files \u54CD\u5E94\u7F3A\u5C11 ok / checked / issues\uFF0C\u65E0\u6CD5\u5224\u65AD\u9884\u68C0\u7ED3\u8BBA\u3002",
4602
+ context: {
4603
+ reason: "INVALID_WORKSPACE_PREFLIGHT_RESULT",
4604
+ nextStep: "\u786E\u8BA4\u670D\u52A1\u7AEF\u7248\u672C\u5DF2\u5305\u542B validate-files\uFF08HCMNX-328\uFF09\uFF1B\u4E0D\u80FD\u628A\u7F3A\u5931\u7684\u7ED3\u8BBA\u5F53\u4F5C\u9884\u68C0\u901A\u8FC7\u3002"
4605
+ }
4606
+ });
4607
+ }
4608
+ return {
4609
+ ok: obj.ok,
4610
+ workspaceKey: stringOr(obj.workspaceKey),
4611
+ checked: obj.checked,
4612
+ checkedPaths: Array.isArray(obj.checkedPaths) ? obj.checkedPaths.map((p) => stringOr(p)) : [],
4613
+ issues: obj.issues.map((raw) => {
4614
+ const issue = asRecord(raw);
4615
+ return {
4616
+ path: issue.path == null ? null : stringOr(issue.path),
4617
+ errCode: stringOrUndefined(issue.errCode),
4618
+ message: stringOr(issue.message),
4619
+ description: stringOrUndefined(issue.description),
4620
+ field: stringOrUndefined(issue.field),
4621
+ data: issue.data
4622
+ };
4623
+ })
4624
+ };
4625
+ }
4527
4626
  function asRecord(value) {
4528
4627
  return value && typeof value === "object" ? value : {};
4529
4628
  }
@@ -6079,6 +6178,23 @@ async function pushMiniAppProject(args) {
6079
6178
  await writeMiniState(root, context, localFiles, remoteByLocalPath);
6080
6179
  return result;
6081
6180
  }
6181
+ async function collectMiniPushWrites(rootDir, operations) {
6182
+ const localByPath = new Map(
6183
+ (await readLocalMiniFiles(path6.resolve(rootDir))).map((file) => [file.localPath, file])
6184
+ );
6185
+ const files = [];
6186
+ const deletedPaths = [];
6187
+ for (const operation of operations) {
6188
+ if (operation.operation === "delete") {
6189
+ if (operation.fileId) deletedPaths.push(operation.remotePath);
6190
+ continue;
6191
+ }
6192
+ if (operation.operation !== "create" && !(operation.operation === "update" && operation.fileId)) continue;
6193
+ const localFile = localByPath.get(operation.localPath);
6194
+ if (localFile) files.push({ relativePath: operation.remotePath, content: localFile.content });
6195
+ }
6196
+ return { files, deletedPaths };
6197
+ }
6082
6198
  async function buildMiniPreviewTargets(rootDir, frontendBaseUrl) {
6083
6199
  const context = await readMiniContext(path6.resolve(rootDir));
6084
6200
  const app = encodeURIComponent(context.appCode);
@@ -6204,10 +6320,11 @@ function buildMiniVerifyAgentReport(report) {
6204
6320
  url: target.url
6205
6321
  })
6206
6322
  );
6207
- const safeToPush = report.validate.valid && dryRunOk && previewUrls.length > 0 && smokeOk;
6323
+ const preflightFailed = report.preflight?.status === "failed";
6324
+ const safeToPush = report.validate.valid && dryRunOk && previewUrls.length > 0 && smokeOk && !preflightFailed;
6208
6325
  const nextAction = chooseMiniVerifyNextAction(report, previewUrls, smoke);
6209
6326
  return {
6210
- ok: report.ok && smokeOk,
6327
+ ok: report.ok && smokeOk && !preflightFailed,
6211
6328
  safeToPush,
6212
6329
  nextAction,
6213
6330
  summary: {
@@ -6243,7 +6360,8 @@ function buildMiniVerifyAgentReport(report) {
6243
6360
  ok: previewUrls.length > 0,
6244
6361
  count: previewUrls.length,
6245
6362
  surfaces: previewUrls.map((target) => target.surface)
6246
- }
6363
+ },
6364
+ preflight: report.preflight ? { status: report.preflight.status, sent: report.preflight.sent, issues: report.preflight.issues.length } : null
6247
6365
  },
6248
6366
  changedFiles: report.status.filter((entry) => entry.status !== "unchanged").map(
6249
6367
  (entry) => ({
@@ -6295,6 +6413,9 @@ function chooseMiniVerifyNextAction(report, previewUrls, smoke) {
6295
6413
  if (!report.validate.valid) return "fix-validation";
6296
6414
  if (!report.plan) return "inspect-status";
6297
6415
  if (report.plan.conflicts.length) return "resolve-conflict";
6416
+ if (report.preflight?.status === "failed") {
6417
+ return report.preflight.issues.some((issue) => issue.errCode === "WORKSPACE_FILE_CONFLICT") ? "resolve-conflict" : "fix-validation";
6418
+ }
6298
6419
  if (!previewUrls.length) return "inspect-preview";
6299
6420
  return "push";
6300
6421
  }
@@ -6334,6 +6455,13 @@ function formatMiniVerifyReport(report) {
6334
6455
  } else {
6335
6456
  lines.push(`[3/${totalSteps}] dry-run: - skipped (${report.planSkipped ?? "unknown reason"})`);
6336
6457
  }
6458
+ if (report.preflight) {
6459
+ const preflight2 = report.preflight;
6460
+ lines.push(preflight2.status === "failed" ? ` server preflight: \u2717 ${preflight2.issues.length} issue(s)` : ` server preflight: ${preflight2.status} (${preflight2.sent} file(s) sent)`);
6461
+ for (const issue of preflight2.issues) {
6462
+ lines.push(` ${issue.path ?? "(\u6574\u6279)"}: [${issue.errCode ?? "ERROR"}] ${issue.message}`);
6463
+ }
6464
+ }
6337
6465
  if (report.preview.length) {
6338
6466
  lines.push(`[4/${totalSteps}] preview:`);
6339
6467
  for (const target of report.preview) lines.push(` ${target.key.padEnd(11)} ${target.url}`);
@@ -7168,7 +7296,7 @@ async function deleteTenantMeta(http, path24) {
7168
7296
  import yaml9 from "js-yaml";
7169
7297
 
7170
7298
  // src/meta/generated/meta-schemas.ts
7171
- var META_SCHEMA_SOURCE_COMMIT = "2d4b4a9ee24111c6ff425f88d109b2eddf811b51";
7299
+ var META_SCHEMA_SOURCE_COMMIT = "cfad9ef13881cc799a88cbfcef8229b5cefcdc3f";
7172
7300
  var META_SCHEMAS = {
7173
7301
  list: {
7174
7302
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -7311,6 +7439,9 @@ var META_SCHEMAS = {
7311
7439
  },
7312
7440
  "targetModel": {
7313
7441
  "type": "string"
7442
+ },
7443
+ "timeoutMs": {
7444
+ "type": "integer"
7314
7445
  }
7315
7446
  }
7316
7447
  },
@@ -7819,6 +7950,11 @@ var META_SCHEMAS = {
7819
7950
  },
7820
7951
  "targetModel": {
7821
7952
  "type": "string"
7953
+ },
7954
+ "timeoutMs": {
7955
+ "type": "integer",
7956
+ "minimum": 1,
7957
+ "maximum": 3e5
7822
7958
  }
7823
7959
  }
7824
7960
  },
@@ -8839,7 +8975,60 @@ var META_SCHEMAS = {
8839
8975
  "description": "\u5217\u8868\u6811\u5F62\u5C55\u793A;\u6309 parentField \u628A\u5F53\u524D\u9875\u6570\u636E\u6E32\u67D3\u6210\u53EF\u9010\u7EA7\u5C55\u5F00\u7684\u6811\u8868\u3002\u7236\u5B50\u5173\u7CFB\u53EA\u4F5C\u7528\u5728\u6E32\u67D3\u5C42,\u7B5B\u9009/\u6392\u5E8F/\u5206\u9875/\u6743\u9650\u53E3\u5F84\u4E0D\u53D8",
8840
8976
  "additionalProperties": false,
8841
8977
  "required": ["parentField"]
8978
+ },
8979
+ "capabilityVersion": {
8980
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
8981
+ },
8982
+ "columns": {
8983
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
8984
+ },
8985
+ "defaultFilter": {
8986
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
8987
+ },
8988
+ "emptyState": {
8989
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
8990
+ },
8991
+ "filters": {
8992
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
8993
+ },
8994
+ "modelKey": {
8995
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
8996
+ },
8997
+ "orders": {
8998
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
8999
+ },
9000
+ "plugin": {
9001
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9002
+ },
9003
+ "query": {
9004
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9005
+ },
9006
+ "rowActions": {
9007
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9008
+ },
9009
+ "scene": {
9010
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9011
+ },
9012
+ "search": {
9013
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9014
+ },
9015
+ "state": {
9016
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9017
+ },
9018
+ "tip": {
9019
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9020
+ },
9021
+ "title": {
9022
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9023
+ },
9024
+ "toolActions": {
9025
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
8842
9026
  }
9027
+ },
9028
+ "x-hcm-authoring": {
9029
+ "topLevel": "closed",
9030
+ "errCode": "META_UNKNOWN_AUTHORING_KEY",
9031
+ "retiredTopLevelKeys": {}
8843
9032
  }
8844
9033
  },
8845
9034
  info: {
@@ -9094,6 +9283,11 @@ var META_SCHEMAS = {
9094
9283
  },
9095
9284
  "targetModel": {
9096
9285
  "type": "string"
9286
+ },
9287
+ "timeoutMs": {
9288
+ "type": "integer",
9289
+ "minimum": 1,
9290
+ "maximum": 3e5
9097
9291
  }
9098
9292
  }
9099
9293
  },
@@ -9547,6 +9741,55 @@ var META_SCHEMAS = {
9547
9741
  "tip": {
9548
9742
  "type": "string",
9549
9743
  "description": "\u8868\u5355\u9876\u90E8\u63D0\u793A\u6587\u6848(\u652F\u6301\u6362\u884C);\u5E38\u7528\u4E8E\u6DFB\u52A0\u4E1A\u52A1\u8BF4\u660E\u3001\u8B66\u793A\u4FE1\u606F,\u663E\u793A\u5728\u6240\u6709\u5B57\u6BB5\u4E4B\u524D"
9744
+ },
9745
+ "additions": {
9746
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9747
+ },
9748
+ "capabilityVersion": {
9749
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9750
+ },
9751
+ "layout": {
9752
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9753
+ },
9754
+ "modelKey": {
9755
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9756
+ },
9757
+ "plugin": {
9758
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9759
+ },
9760
+ "pluginChildren": {
9761
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9762
+ },
9763
+ "pluginSchemeCardExtFields": {
9764
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9765
+ },
9766
+ "pluginSchemeExtFields": {
9767
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9768
+ },
9769
+ "purpose": {
9770
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9771
+ },
9772
+ "scene": {
9773
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9774
+ },
9775
+ "state": {
9776
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9777
+ },
9778
+ "synonyms": {
9779
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9780
+ },
9781
+ "title": {
9782
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9783
+ },
9784
+ "typicalQueries": {
9785
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
9786
+ }
9787
+ },
9788
+ "x-hcm-authoring": {
9789
+ "topLevel": "closed",
9790
+ "errCode": "META_UNKNOWN_AUTHORING_KEY",
9791
+ "retiredTopLevelKeys": {
9792
+ "sections": "\u6539\u5199\u4E3A\u9876\u5C42 fields[] + groups[]\uFF1Bgroups[].fields \u53EA\u586B\u5199\u5B57\u6BB5 key\uFF08\u5206\u7EC4\u7167\u6837\u6E32\u67D3\uFF09"
9550
9793
  }
9551
9794
  }
9552
9795
  },
@@ -9802,6 +10045,11 @@ var META_SCHEMAS = {
9802
10045
  },
9803
10046
  "targetModel": {
9804
10047
  "type": "string"
10048
+ },
10049
+ "timeoutMs": {
10050
+ "type": "integer",
10051
+ "minimum": 1,
10052
+ "maximum": 3e5
9805
10053
  }
9806
10054
  }
9807
10055
  },
@@ -10211,7 +10459,30 @@ var META_SCHEMAS = {
10211
10459
  "name": {
10212
10460
  "type": "string",
10213
10461
  "description": '\u5143\u6570\u636E\u663E\u793A\u540D\u79F0(\u5982 "\u7EC4\u7EC7\u5355\u5143");\u901A\u5E38\u7528\u4E8E\u9875\u9762\u6807\u9898\u6216\u5143\u6570\u636E\u6D4F\u89C8'
10462
+ },
10463
+ "capabilityVersion": {
10464
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
10465
+ },
10466
+ "children": {
10467
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
10468
+ },
10469
+ "layout": {
10470
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
10471
+ },
10472
+ "modelKey": {
10473
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
10474
+ },
10475
+ "state": {
10476
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
10477
+ },
10478
+ "subLists": {
10479
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
10214
10480
  }
10481
+ },
10482
+ "x-hcm-authoring": {
10483
+ "topLevel": "closed",
10484
+ "errCode": "META_UNKNOWN_AUTHORING_KEY",
10485
+ "retiredTopLevelKeys": {}
10215
10486
  }
10216
10487
  },
10217
10488
  filter: {
@@ -10323,7 +10594,18 @@ var META_SCHEMAS = {
10323
10594
  "name": {
10324
10595
  "type": "string",
10325
10596
  "description": '\u5143\u6570\u636E\u663E\u793A\u540D\u79F0(\u5982 "\u7EC4\u7EC7\u5355\u5143");\u901A\u5E38\u7528\u4E8E\u9875\u9762\u6807\u9898\u6216\u5143\u6570\u636E\u6D4F\u89C8'
10597
+ },
10598
+ "capabilityVersion": {
10599
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
10600
+ },
10601
+ "modelKey": {
10602
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
10326
10603
  }
10604
+ },
10605
+ "x-hcm-authoring": {
10606
+ "topLevel": "closed",
10607
+ "errCode": "META_UNKNOWN_AUTHORING_KEY",
10608
+ "retiredTopLevelKeys": {}
10327
10609
  }
10328
10610
  },
10329
10611
  model: {
@@ -10784,6 +11066,53 @@ var META_SCHEMAS = {
10784
11066
  }
10785
11067
  },
10786
11068
  "required": ["kind"]
11069
+ }, {
11070
+ "type": "object",
11071
+ "description": "\u8BFB\u65F6\u6D3E\u751F\uFF08ADR-442\uFF09\uFF1A\u7531\u5E73\u53F0\u6CE8\u518C\u7684 provider \u5728\u53D6\u6570\u540E\u8BA1\u7B97\uFF0C\u53EA\u80FD\u653E\u5728 fields \u91CC\u5C55\u793A\uFF1B\u4E0D\u53EF\u7B5B\u9009\u3001\u6392\u5E8F\u3001\u5206\u7EC4\u3001\u805A\u5408\uFF0C\u4E0D\u4E0B\u63A8 SQL\u3002security.classification \u5FC5\u586B\u3001security.sources \u7531\u52A0\u8F7D\u5668\u751F\u6210\uFF08\u7981\u6B62\u624B\u5199\uFF09\uFF1B\u79DF\u6237\u5143\u6570\u636E\u4E00\u5F8B\u4E0D\u80FD\u58F0\u660E\u3002",
11072
+ "properties": {
11073
+ "kind": {
11074
+ "const": "provider"
11075
+ },
11076
+ "provider": {
11077
+ "type": "string",
11078
+ "pattern": "^platform:"
11079
+ },
11080
+ "params": {
11081
+ "type": "object"
11082
+ },
11083
+ "dependsOn": {
11084
+ "type": "array",
11085
+ "items": {
11086
+ "type": "string",
11087
+ "pattern": "^[^.]+$"
11088
+ }
11089
+ },
11090
+ "extraSources": {
11091
+ "type": "array",
11092
+ "items": {
11093
+ "type": "string",
11094
+ "pattern": "^[^.]+$"
11095
+ }
11096
+ },
11097
+ "returnType": {
11098
+ "type": "string",
11099
+ "enum": ["STRING", "INTEGER", "LONG", "DECIMAL", "BOOLEAN", "DATE", "DATETIME"]
11100
+ },
11101
+ "computeOnEmptyFields": {
11102
+ "type": "boolean"
11103
+ },
11104
+ "filterable": {
11105
+ "const": false
11106
+ },
11107
+ "sortable": {
11108
+ "const": false
11109
+ },
11110
+ "pushDownable": {
11111
+ "const": false
11112
+ }
11113
+ },
11114
+ "required": ["kind", "provider", "returnType"],
11115
+ "additionalProperties": false
10787
11116
  }]
10788
11117
  },
10789
11118
  "description": {
@@ -10992,7 +11321,36 @@ var META_SCHEMAS = {
10992
11321
  "valueMatch": {
10993
11322
  "type": "boolean"
10994
11323
  }
10995
- }
11324
+ },
11325
+ "allOf": [{
11326
+ "description": "\u8BFB\u65F6\u6D3E\u751F\u5B57\u6BB5\uFF08derived.kind=provider\uFF0CADR-442\uFF09\uFF1Asecurity \u5FC5\u586B\u4E14\u5FC5\u987B\u663E\u5F0F\u5199 classification\uFF1Bsecurity.sources \u7531\u52A0\u8F7D\u5668\u6309 dependsOn \u222A extraSources \u751F\u6210\uFF0C\u7981\u6B62\u624B\u5199\u3002",
11327
+ "if": {
11328
+ "properties": {
11329
+ "derived": {
11330
+ "type": "object",
11331
+ "properties": {
11332
+ "kind": {
11333
+ "const": "provider"
11334
+ }
11335
+ },
11336
+ "required": ["kind"]
11337
+ }
11338
+ },
11339
+ "required": ["derived"]
11340
+ },
11341
+ "then": {
11342
+ "properties": {
11343
+ "security": {
11344
+ "type": "object",
11345
+ "required": ["classification"],
11346
+ "not": {
11347
+ "required": ["sources"]
11348
+ }
11349
+ }
11350
+ },
11351
+ "required": ["security"]
11352
+ }
11353
+ }]
10996
11354
  }
10997
11355
  },
10998
11356
  "immutableWhen": {
@@ -12390,7 +12748,30 @@ var META_SCHEMAS = {
12390
12748
  "name": {
12391
12749
  "type": "string",
12392
12750
  "description": '\u5143\u6570\u636E\u663E\u793A\u540D\u79F0(\u5982 "\u7EC4\u7EC7\u5355\u5143");\u901A\u5E38\u7528\u4E8E\u9875\u9762\u6807\u9898\u6216\u5143\u6570\u636E\u6D4F\u89C8'
12751
+ },
12752
+ "actions": {
12753
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
12754
+ },
12755
+ "capabilityVersion": {
12756
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
12757
+ },
12758
+ "componentKey": {
12759
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
12760
+ },
12761
+ "modelKey": {
12762
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
12763
+ },
12764
+ "scene": {
12765
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
12766
+ },
12767
+ "state": {
12768
+ "description": "\u4F5C\u8005\u6001\u9876\u5C42\u952E\uFF1A\u670D\u52A1\u7AEF\u79DF\u6237\u5199\u5165\u767D\u540D\u5355\u63A5\u53D7\uFF1B\u672C schema \u4E0D\u7EA6\u675F\u5176\u5185\u90E8\u5F62\u72B6\uFF08\u767D\u540D\u5355\u767B\u8BB0\u5728 MetaAuthoringContract\uFF09"
12393
12769
  }
12770
+ },
12771
+ "x-hcm-authoring": {
12772
+ "topLevel": "closed",
12773
+ "errCode": "META_UNKNOWN_AUTHORING_KEY",
12774
+ "retiredTopLevelKeys": {}
12394
12775
  }
12395
12776
  },
12396
12777
  wiz: {
@@ -13467,6 +13848,11 @@ var META_SCHEMAS = {
13467
13848
  "type": {
13468
13849
  "type": "string"
13469
13850
  }
13851
+ },
13852
+ "x-hcm-authoring": {
13853
+ "topLevel": "closed",
13854
+ "errCode": "META_UNKNOWN_AUTHORING_KEY",
13855
+ "retiredTopLevelKeys": {}
13470
13856
  }
13471
13857
  }
13472
13858
  };
@@ -13608,6 +13994,11 @@ function preview(v) {
13608
13994
  function locateLine(rawLines, segs, root) {
13609
13995
  const leaf = segs[segs.length - 1];
13610
13996
  if (typeof leaf !== "string") return void 0;
13997
+ if (segs.length === 1) {
13998
+ const rootRe = new RegExp(`^["']?${leaf.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}["']?\\s*:`);
13999
+ const hits = rawLines.flatMap((l, i) => rootRe.test(l) ? [i] : []);
14000
+ return hits.length === 1 ? hits[0] + 1 : void 0;
14001
+ }
13611
14002
  let anchorKey;
13612
14003
  let node = root;
13613
14004
  for (const s of segs) {
@@ -13679,6 +14070,11 @@ function walk2(root, schema, value, segs, kind, issues, depth) {
13679
14070
  continue;
13680
14071
  }
13681
14072
  if (openMap || isDirectiveKey(k)) continue;
14073
+ const closedRoot = segs.length === 0 ? authoringContract(root) : void 0;
14074
+ if (closedRoot) {
14075
+ issues.push(closedRootIssue(kind, k, props, closedRoot));
14076
+ continue;
14077
+ }
13682
14078
  const inFieldItem = segs.length >= 2 && typeof segs[segs.length - 1] === "number" && segs[segs.length - 2] === "fields";
13683
14079
  const alias = inFieldItem ? ALIAS_HINTS[kind]?.[k] : void 0;
13684
14080
  const twin = alias ? void 0 : isPrefixedTwin(props, k);
@@ -13701,6 +14097,26 @@ function walk2(root, schema, value, segs, kind, issues, depth) {
13701
14097
  }
13702
14098
  }
13703
14099
  }
14100
+ var AUTHORING_EXTENSION_KEY = "x-hcm-authoring";
14101
+ function authoringContract(root) {
14102
+ const ext = root[AUTHORING_EXTENSION_KEY];
14103
+ if (!ext || typeof ext !== "object" || ext.topLevel !== "closed") return void 0;
14104
+ const retired = ext.retiredTopLevelKeys;
14105
+ return {
14106
+ errCode: typeof ext.errCode === "string" ? ext.errCode : "META_UNKNOWN_AUTHORING_KEY",
14107
+ retiredTopLevelKeys: retired && typeof retired === "object" ? retired : {}
14108
+ };
14109
+ }
14110
+ function closedRootIssue(kind, key, props, contract) {
14111
+ const rewrite = contract.retiredTopLevelKeys[key];
14112
+ const allowed = Object.keys(props).sort();
14113
+ return {
14114
+ severity: "error",
14115
+ path: key,
14116
+ message: rewrite ? `${contract.errCode}: \u9876\u5C42\u952E \`${key}\` \u662F\u5DF2\u9000\u5F79\u7684 ${kind} \u4F5C\u8005\u6001\u5F62\u6001\uFF0C\u670D\u52A1\u7AEF\u5199\u5165\u4F1A\u62D2\u7EDD` : `${contract.errCode}: \u9876\u5C42\u952E \`${key}\` \u4E0D\u662F ${kind} \u4F5C\u8005\u6001\u5951\u7EA6\u7684\u4E00\u90E8\u5206\uFF0C\u670D\u52A1\u7AEF\u5199\u5165\u4F1A\u62D2\u7EDD`,
14117
+ hint: (rewrite ?? `\u5141\u8BB8\u7684\u9876\u5C42\u952E\uFF1A${allowed.join(", ")}`) + `\uFF08\u5951\u7EA6\u6765\u6E90 core@${META_SCHEMA_SOURCE_COMMIT.slice(0, 8)}\uFF1B\u670D\u52A1\u7AEF\u82E5\u5DF2\u66F4\u65B0\uFF0C\u4EE5 \`hcm workspace verify\` \u7684\u670D\u52A1\u7AEF\u9884\u68C0\u4E3A\u51C6\uFF09`
14118
+ };
14119
+ }
13704
14120
  function validateScriptActionNames(doc, issues) {
13705
14121
  if (!doc || typeof doc !== "object" || !Array.isArray(doc.actions))
13706
14122
  return;
@@ -25831,6 +26247,7 @@ export {
25831
26247
  CREDENTIAL_STORE_MODES,
25832
26248
  CliError,
25833
26249
  CliErrorCode,
26250
+ DATA_PACKAGE_FIXTURE_SCHEMA_V1,
25834
26251
  DATA_PACKAGE_MODELS,
25835
26252
  DEBT_PREFIX,
25836
26253
  DEBT_UNKNOWN,
@@ -26044,6 +26461,7 @@ export {
26044
26461
  clearMetaCache,
26045
26462
  clearModelCache,
26046
26463
  cliAuthorizationExpired,
26464
+ collectMiniPushWrites,
26047
26465
  commandsFor,
26048
26466
  compareFingerprint,
26049
26467
  computeFingerprint,
@@ -26290,6 +26708,7 @@ export {
26290
26708
  validateMetaContent,
26291
26709
  validateMiniProject,
26292
26710
  validateScriptManifest,
26711
+ validateWorkspaceFiles,
26293
26712
  valueState,
26294
26713
  valuesRoundCaveat,
26295
26714
  verifyAttention,