@hcmai/sdk 0.31.3 → 0.32.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
@@ -8383,7 +8383,7 @@ function columnSlotsToFlex(text3, rewrite = true) {
8383
8383
  import { isMap as isMap3, isScalar as isScalar3, isSeq as isSeq3, parseDocument as parseDocument3 } from "yaml";
8384
8384
 
8385
8385
  // src/meta/generated/meta-schemas.ts
8386
- var META_SCHEMA_SOURCE_COMMIT = "71adaaa601037dcc8ac84d2bfb537b873be37a7c";
8386
+ var META_SCHEMA_SOURCE_COMMIT = "f86b7ac1b12963648eeb7a73eba2492dac2bce86";
8387
8387
  var META_SCHEMAS = {
8388
8388
  list: {
8389
8389
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -8711,7 +8711,7 @@ var META_SCHEMAS = {
8711
8711
  "presentation": {
8712
8712
  "type": "string",
8713
8713
  "enum": ["dialog", "drawer"],
8714
- "description": "1.81.0\uFF1A\u4EC5dialogType=list\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF0C\u4F7F\u7528width\u4F5C\u4E3Asize\uFF1B\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5448\u73B0\u3002"
8714
+ "description": "1.81.0\uFF1Alist\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF1B1.92.0\u8D77\u5DF2\u6CE8\u518Ccustom\u7EC4\u4EF6\u4EA6\u652F\u6301\u3002\u4F7F\u7528width\u4F5C\u4E3Asize\uFF0C\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5BBF\u4E3B\u3002"
8715
8715
  },
8716
8716
  "result": {
8717
8717
  "$ref": "#/$defs/Map(String,Object)",
@@ -8732,6 +8732,10 @@ var META_SCHEMAS = {
8732
8732
  "showSearch": {
8733
8733
  "type": "boolean"
8734
8734
  },
8735
+ "standardForm": {
8736
+ "type": "boolean",
8737
+ "description": "1.92.0\uFF1A\u4EC5dialogType=custom\u652F\u6301\uFF0C\u4E25\u683C\u5E03\u5C14\u503C\uFF1Btrue\u7531\u516C\u5171\u5BBF\u4E3B\u542F\u7528\u6807\u51C6\u8868\u5355\u6837\u5F0F\uFF0C\u7701\u7565\u4FDD\u7559\u539F\u884C\u4E3A\u3002"
8738
+ },
8735
8739
  "targetAction": {
8736
8740
  "type": "string"
8737
8741
  },
@@ -8759,7 +8763,19 @@ var META_SCHEMAS = {
8759
8763
  "required": ["dialogType"],
8760
8764
  "properties": {
8761
8765
  "dialogType": {
8762
- "const": "list"
8766
+ "enum": ["list", "custom"]
8767
+ }
8768
+ }
8769
+ }
8770
+ }, {
8771
+ "if": {
8772
+ "required": ["standardForm"]
8773
+ },
8774
+ "then": {
8775
+ "required": ["dialogType"],
8776
+ "properties": {
8777
+ "dialogType": {
8778
+ "const": "custom"
8763
8779
  }
8764
8780
  }
8765
8781
  }
@@ -9698,7 +9714,11 @@ var META_SCHEMAS = {
9698
9714
  "presentation": {
9699
9715
  "type": "string",
9700
9716
  "enum": ["dialog", "drawer"],
9701
- "description": "1.81.0\uFF1A\u4EC5dialogType=list\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF0C\u4F7F\u7528width\u4F5C\u4E3Asize\uFF1B\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5448\u73B0\u3002"
9717
+ "description": "1.81.0\uFF1Alist\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF1B1.92.0\u8D77\u5DF2\u6CE8\u518Ccustom\u7EC4\u4EF6\u4EA6\u652F\u6301\u3002\u4F7F\u7528width\u4F5C\u4E3Asize\uFF0C\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5BBF\u4E3B\u3002"
9718
+ },
9719
+ "standardForm": {
9720
+ "type": "boolean",
9721
+ "description": "1.92.0\uFF1A\u4EC5dialogType=custom\u652F\u6301\uFF0C\u4E25\u683C\u5E03\u5C14\u503C\uFF1Btrue\u7531\u516C\u5171\u5BBF\u4E3B\u542F\u7528\u6807\u51C6\u8868\u5355\u6837\u5F0F\uFF0C\u7701\u7565\u4FDD\u7559\u539F\u884C\u4E3A\u3002"
9702
9722
  }
9703
9723
  },
9704
9724
  "required": ["dialogType"],
@@ -9710,7 +9730,19 @@ var META_SCHEMAS = {
9710
9730
  "required": ["dialogType"],
9711
9731
  "properties": {
9712
9732
  "dialogType": {
9713
- "const": "list"
9733
+ "enum": ["list", "custom"]
9734
+ }
9735
+ }
9736
+ }
9737
+ }, {
9738
+ "if": {
9739
+ "required": ["standardForm"]
9740
+ },
9741
+ "then": {
9742
+ "required": ["dialogType"],
9743
+ "properties": {
9744
+ "dialogType": {
9745
+ "const": "custom"
9714
9746
  }
9715
9747
  }
9716
9748
  }
@@ -9743,7 +9775,11 @@ var META_SCHEMAS = {
9743
9775
  "presentation": {
9744
9776
  "type": "string",
9745
9777
  "enum": ["dialog", "drawer"],
9746
- "description": "1.81.0\uFF1A\u4EC5dialogType=list\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF0C\u4F7F\u7528width\u4F5C\u4E3Asize\uFF1B\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5448\u73B0\u3002"
9778
+ "description": "1.81.0\uFF1Alist\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF1B1.92.0\u8D77\u5DF2\u6CE8\u518Ccustom\u7EC4\u4EF6\u4EA6\u652F\u6301\u3002\u4F7F\u7528width\u4F5C\u4E3Asize\uFF0C\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5BBF\u4E3B\u3002"
9779
+ },
9780
+ "standardForm": {
9781
+ "type": "boolean",
9782
+ "description": "1.92.0\uFF1A\u4EC5dialogType=custom\u652F\u6301\uFF0C\u4E25\u683C\u5E03\u5C14\u503C\uFF1Btrue\u7531\u516C\u5171\u5BBF\u4E3B\u542F\u7528\u6807\u51C6\u8868\u5355\u6837\u5F0F\uFF0C\u7701\u7565\u4FDD\u7559\u539F\u884C\u4E3A\u3002"
9747
9783
  }
9748
9784
  },
9749
9785
  "allOf": [{
@@ -9754,7 +9790,19 @@ var META_SCHEMAS = {
9754
9790
  "required": ["dialogType"],
9755
9791
  "properties": {
9756
9792
  "dialogType": {
9757
- "const": "list"
9793
+ "enum": ["list", "custom"]
9794
+ }
9795
+ }
9796
+ }
9797
+ }, {
9798
+ "if": {
9799
+ "required": ["standardForm"]
9800
+ },
9801
+ "then": {
9802
+ "required": ["dialogType"],
9803
+ "properties": {
9804
+ "dialogType": {
9805
+ "const": "custom"
9758
9806
  }
9759
9807
  }
9760
9808
  }
@@ -11252,7 +11300,7 @@ var META_SCHEMAS = {
11252
11300
  "presentation": {
11253
11301
  "type": "string",
11254
11302
  "enum": ["dialog", "drawer"],
11255
- "description": "1.81.0\uFF1A\u4EC5dialogType=list\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF0C\u4F7F\u7528width\u4F5C\u4E3Asize\uFF1B\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5448\u73B0\u3002"
11303
+ "description": "1.81.0\uFF1Alist\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF1B1.92.0\u8D77\u5DF2\u6CE8\u518Ccustom\u7EC4\u4EF6\u4EA6\u652F\u6301\u3002\u4F7F\u7528width\u4F5C\u4E3Asize\uFF0C\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5BBF\u4E3B\u3002"
11256
11304
  },
11257
11305
  "result": {
11258
11306
  "$ref": "#/$defs/Map(String,Object)",
@@ -11273,6 +11321,10 @@ var META_SCHEMAS = {
11273
11321
  "showSearch": {
11274
11322
  "type": "boolean"
11275
11323
  },
11324
+ "standardForm": {
11325
+ "type": "boolean",
11326
+ "description": "1.92.0\uFF1A\u4EC5dialogType=custom\u652F\u6301\uFF0C\u4E25\u683C\u5E03\u5C14\u503C\uFF1Btrue\u7531\u516C\u5171\u5BBF\u4E3B\u542F\u7528\u6807\u51C6\u8868\u5355\u6837\u5F0F\uFF0C\u7701\u7565\u4FDD\u7559\u539F\u884C\u4E3A\u3002"
11327
+ },
11276
11328
  "targetAction": {
11277
11329
  "type": "string"
11278
11330
  },
@@ -11300,7 +11352,19 @@ var META_SCHEMAS = {
11300
11352
  "required": ["dialogType"],
11301
11353
  "properties": {
11302
11354
  "dialogType": {
11303
- "const": "list"
11355
+ "enum": ["list", "custom"]
11356
+ }
11357
+ }
11358
+ }
11359
+ }, {
11360
+ "if": {
11361
+ "required": ["standardForm"]
11362
+ },
11363
+ "then": {
11364
+ "required": ["dialogType"],
11365
+ "properties": {
11366
+ "dialogType": {
11367
+ "const": "custom"
11304
11368
  }
11305
11369
  }
11306
11370
  }
@@ -12158,7 +12222,7 @@ var META_SCHEMAS = {
12158
12222
  "presentation": {
12159
12223
  "type": "string",
12160
12224
  "enum": ["dialog", "drawer"],
12161
- "description": "1.81.0\uFF1A\u4EC5dialogType=list\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF0C\u4F7F\u7528width\u4F5C\u4E3Asize\uFF1B\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5448\u73B0\u3002"
12225
+ "description": "1.81.0\uFF1Alist\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF1B1.92.0\u8D77\u5DF2\u6CE8\u518Ccustom\u7EC4\u4EF6\u4EA6\u652F\u6301\u3002\u4F7F\u7528width\u4F5C\u4E3Asize\uFF0C\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5BBF\u4E3B\u3002"
12162
12226
  },
12163
12227
  "result": {
12164
12228
  "$ref": "#/$defs/Map(String,Object)",
@@ -12179,6 +12243,10 @@ var META_SCHEMAS = {
12179
12243
  "showSearch": {
12180
12244
  "type": "boolean"
12181
12245
  },
12246
+ "standardForm": {
12247
+ "type": "boolean",
12248
+ "description": "1.92.0\uFF1A\u4EC5dialogType=custom\u652F\u6301\uFF0C\u4E25\u683C\u5E03\u5C14\u503C\uFF1Btrue\u7531\u516C\u5171\u5BBF\u4E3B\u542F\u7528\u6807\u51C6\u8868\u5355\u6837\u5F0F\uFF0C\u7701\u7565\u4FDD\u7559\u539F\u884C\u4E3A\u3002"
12249
+ },
12182
12250
  "targetAction": {
12183
12251
  "type": "string"
12184
12252
  },
@@ -12206,7 +12274,19 @@ var META_SCHEMAS = {
12206
12274
  "required": ["dialogType"],
12207
12275
  "properties": {
12208
12276
  "dialogType": {
12209
- "const": "list"
12277
+ "enum": ["list", "custom"]
12278
+ }
12279
+ }
12280
+ }
12281
+ }, {
12282
+ "if": {
12283
+ "required": ["standardForm"]
12284
+ },
12285
+ "then": {
12286
+ "required": ["dialogType"],
12287
+ "properties": {
12288
+ "dialogType": {
12289
+ "const": "custom"
12210
12290
  }
12211
12291
  }
12212
12292
  }
@@ -13598,6 +13678,105 @@ var META_SCHEMAS = {
13598
13678
  }
13599
13679
  }
13600
13680
  },
13681
+ "identityCorrection": {
13682
+ "type": "object",
13683
+ "properties": {
13684
+ "approvalEvidence": {
13685
+ "type": "object",
13686
+ "properties": {
13687
+ "approvedValues": {
13688
+ "type": "array",
13689
+ "items": {
13690
+ "type": "string",
13691
+ "minLength": 1,
13692
+ "pattern": "\\S"
13693
+ },
13694
+ "minItems": 1,
13695
+ "uniqueItems": true
13696
+ },
13697
+ "decisionField": {
13698
+ "type": "string",
13699
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$"
13700
+ },
13701
+ "model": {
13702
+ "type": "string",
13703
+ "minLength": 1
13704
+ },
13705
+ "recordField": {
13706
+ "type": "string",
13707
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$"
13708
+ }
13709
+ },
13710
+ "additionalProperties": false,
13711
+ "required": ["model", "recordField", "decisionField", "approvedValues"]
13712
+ },
13713
+ "eligibleStates": {
13714
+ "type": "array",
13715
+ "items": {
13716
+ "type": "string",
13717
+ "minLength": 1,
13718
+ "pattern": "\\S"
13719
+ },
13720
+ "minItems": 1,
13721
+ "uniqueItems": true
13722
+ },
13723
+ "groups": {
13724
+ "type": "array",
13725
+ "items": {
13726
+ "type": "object",
13727
+ "properties": {
13728
+ "employeeCodeField": {
13729
+ "type": "string",
13730
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$"
13731
+ },
13732
+ "employeeField": {
13733
+ "type": "string",
13734
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$"
13735
+ },
13736
+ "employeeNameField": {
13737
+ "type": "string",
13738
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$"
13739
+ },
13740
+ "externalIdentityField": {
13741
+ "type": "string",
13742
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$"
13743
+ },
13744
+ "externalProviderId": {
13745
+ "type": "string",
13746
+ "format": "uuid"
13747
+ },
13748
+ "key": {
13749
+ "type": "string",
13750
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$"
13751
+ },
13752
+ "userField": {
13753
+ "type": "string",
13754
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$"
13755
+ }
13756
+ },
13757
+ "additionalProperties": false,
13758
+ "required": ["key", "employeeField", "userField"],
13759
+ "dependentRequired": {
13760
+ "externalIdentityField": ["externalProviderId"],
13761
+ "externalProviderId": ["externalIdentityField"]
13762
+ }
13763
+ },
13764
+ "minItems": 1
13765
+ },
13766
+ "roles": {
13767
+ "type": "array",
13768
+ "items": {
13769
+ "type": "string",
13770
+ "pattern": "^[A-Za-z][A-Za-z0-9_.-]*$"
13771
+ },
13772
+ "minItems": 1,
13773
+ "uniqueItems": true
13774
+ }
13775
+ },
13776
+ "description": "\u7EC8\u6001\u8EAB\u4EFD\u5173\u8054\u7EA0\u6B63\u7684\u663E\u5F0F\u63A5\u5165\u7B56\u7565\uFF1B\u4E0D\u6539\u53D8\u901A\u7528\u66F4\u65B0\u51BB\u7ED3\uFF0C\u7F3A\u5C11\u7B56\u7565\u3001\u5BA1\u6279\u8BC1\u636E\u6216\u52A8\u4F5C\u6388\u6743\u65F6\u62D2\u7EDD\u6267\u884C\u3002",
13777
+ "required": ["roles", "eligibleStates", "groups", "approvalEvidence"],
13778
+ "additionalProperties": false
13779
+ },
13601
13780
  "immutableWhen": {
13602
13781
  "type": "object",
13603
13782
  "properties": {
@@ -13881,8 +14060,8 @@ var META_SCHEMAS = {
13881
14060
  },
13882
14061
  "storageSlot": {
13883
14062
  "type": "string",
13884
- "description": "\u5B58\u50A8\u69FD\u7F16\u7801\uFF0Cs001~s008\uFF1B\u672A\u58F0\u660E\u4F7F\u7528\u9ED8\u8BA4\u5B58\u50A8",
13885
- "pattern": "^s00[1-8]$"
14063
+ "description": "\u5B58\u50A8\u69FD\u7F16\u7801\uFF08s + 3 \u4F4D\u6570\u5B57\uFF09\uFF0C\u53D6\u503C\u89C1\u5B58\u50A8\u69FD\u76EE\u5F55\uFF08GET /api/tenant-extension/storage-slots\uFF09\uFF1B\u672A\u58F0\u660E\u4F7F\u7528\u9ED8\u8BA4\u5B58\u50A8",
14064
+ "pattern": "^s\\d{3}$"
13886
14065
  },
13887
14066
  "synonyms": {
13888
14067
  "type": "array",
@@ -14455,6 +14634,9 @@ var META_SCHEMAS = {
14455
14634
  "showSearch": {
14456
14635
  "type": "boolean"
14457
14636
  },
14637
+ "standardForm": {
14638
+ "type": "boolean"
14639
+ },
14458
14640
  "targetAction": {
14459
14641
  "type": "string"
14460
14642
  },
@@ -15269,7 +15451,11 @@ var META_SCHEMAS = {
15269
15451
  "presentation": {
15270
15452
  "type": "string",
15271
15453
  "enum": ["dialog", "drawer"],
15272
- "description": "1.81.0\uFF1A\u4EC5dialogType=list\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF0C\u4F7F\u7528width\u4F5C\u4E3Asize\uFF1B\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5448\u73B0\u3002"
15454
+ "description": "1.81.0\uFF1Alist\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF1B1.92.0\u8D77\u5DF2\u6CE8\u518Ccustom\u7EC4\u4EF6\u4EA6\u652F\u6301\u3002\u4F7F\u7528width\u4F5C\u4E3Asize\uFF0C\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5BBF\u4E3B\u3002"
15455
+ },
15456
+ "standardForm": {
15457
+ "type": "boolean",
15458
+ "description": "1.92.0\uFF1A\u4EC5dialogType=custom\u652F\u6301\uFF0C\u4E25\u683C\u5E03\u5C14\u503C\uFF1Btrue\u7531\u516C\u5171\u5BBF\u4E3B\u542F\u7528\u6807\u51C6\u8868\u5355\u6837\u5F0F\uFF0C\u7701\u7565\u4FDD\u7559\u539F\u884C\u4E3A\u3002"
15273
15459
  }
15274
15460
  },
15275
15461
  "allOf": [{
@@ -15280,7 +15466,19 @@ var META_SCHEMAS = {
15280
15466
  "required": ["dialogType"],
15281
15467
  "properties": {
15282
15468
  "dialogType": {
15283
- "const": "list"
15469
+ "enum": ["list", "custom"]
15470
+ }
15471
+ }
15472
+ }
15473
+ }, {
15474
+ "if": {
15475
+ "required": ["standardForm"]
15476
+ },
15477
+ "then": {
15478
+ "required": ["dialogType"],
15479
+ "properties": {
15480
+ "dialogType": {
15481
+ "const": "custom"
15284
15482
  }
15285
15483
  }
15286
15484
  }
@@ -15798,7 +15996,11 @@ var META_SCHEMAS = {
15798
15996
  "presentation": {
15799
15997
  "type": "string",
15800
15998
  "enum": ["dialog", "drawer"],
15801
- "description": "1.81.0\uFF1A\u4EC5dialogType=list\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF0C\u4F7F\u7528width\u4F5C\u4E3Asize\uFF1B\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5448\u73B0\u3002"
15999
+ "description": "1.81.0\uFF1Alist\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF1B1.92.0\u8D77\u5DF2\u6CE8\u518Ccustom\u7EC4\u4EF6\u4EA6\u652F\u6301\u3002\u4F7F\u7528width\u4F5C\u4E3Asize\uFF0C\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5BBF\u4E3B\u3002"
16000
+ },
16001
+ "standardForm": {
16002
+ "type": "boolean",
16003
+ "description": "1.92.0\uFF1A\u4EC5dialogType=custom\u652F\u6301\uFF0C\u4E25\u683C\u5E03\u5C14\u503C\uFF1Btrue\u7531\u516C\u5171\u5BBF\u4E3B\u542F\u7528\u6807\u51C6\u8868\u5355\u6837\u5F0F\uFF0C\u7701\u7565\u4FDD\u7559\u539F\u884C\u4E3A\u3002"
15802
16004
  }
15803
16005
  },
15804
16006
  "allOf": [{
@@ -15809,7 +16011,19 @@ var META_SCHEMAS = {
15809
16011
  "required": ["dialogType"],
15810
16012
  "properties": {
15811
16013
  "dialogType": {
15812
- "const": "list"
16014
+ "enum": ["list", "custom"]
16015
+ }
16016
+ }
16017
+ }
16018
+ }, {
16019
+ "if": {
16020
+ "required": ["standardForm"]
16021
+ },
16022
+ "then": {
16023
+ "required": ["dialogType"],
16024
+ "properties": {
16025
+ "dialogType": {
16026
+ "const": "custom"
15813
16027
  }
15814
16028
  }
15815
16029
  }
@@ -17968,6 +18182,65 @@ async function getColumnSlotSql(http, params, opts = {}) {
17968
18182
  return data;
17969
18183
  }
17970
18184
 
18185
+ // src/meta/storage-slots.ts
18186
+ var STORAGE_SLOTS_PATH = "/api/tenant-extension/storage-slots";
18187
+ function isRecord4(value) {
18188
+ return typeof value === "object" && value !== null && !Array.isArray(value);
18189
+ }
18190
+ function unexpected2(where, body) {
18191
+ return new CliError({
18192
+ code: "PROTOCOL_UNSUPPORTED" /* PROTOCOL_UNSUPPORTED */,
18193
+ message: `${STORAGE_SLOTS_PATH} \u8FD4\u56DE\u4E86 2xx\uFF0C\u4F46\u54CD\u5E94\u4E0D\u662F\u7EA6\u5B9A\u7684\u5B58\u50A8\u69FD\u76EE\u5F55\uFF1A${where}\uFF1B\u6CA1\u6709\u628A\u7F3A\u7684\u90E8\u5206\u8865\u6210\u9ED8\u8BA4\u503C`,
18194
+ context: {
18195
+ reasonCode: "STORAGE_SLOT_RESPONSE_UNRECOGNIZED",
18196
+ details: body,
18197
+ nextStep: "\u7528 `hcm version` \u6838\u5BF9\u540E\u7AEF\u7248\u672C\u662F\u5426\u542B\u5B58\u50A8\u69FD\u767B\u8BB0\uFF08ADR-502\uFF09\uFF1B\u7248\u672C\u5BF9\u5F97\u4E0A\u5C31\u628A\u8FD9\u6BB5\u54CD\u5E94\u62A5\u7ED9 CLI \u7EF4\u62A4\u8005"
18198
+ }
18199
+ });
18200
+ }
18201
+ function entryProblem(entry) {
18202
+ if (!isRecord4(entry)) return "\u4E0D\u662F\u5BF9\u8C61";
18203
+ if (typeof entry.slot !== "string" || !entry.slot.trim()) return "slot \u7F3A\u5931\u6216\u4E3A\u7A7A";
18204
+ if (typeof entry.status !== "string" || !entry.status.trim()) return "status \u7F3A\u5931\u6216\u4E3A\u7A7A";
18205
+ if (typeof entry.available !== "boolean") return "available \u7F3A\u5931\u6216\u4E0D\u662F\u5E03\u5C14";
18206
+ return void 0;
18207
+ }
18208
+ function slotsProblem(slots, path25) {
18209
+ for (let i = 0; i < slots.length; i += 1) {
18210
+ const problem6 = entryProblem(slots[i]);
18211
+ if (problem6) return `${path25}[${i}] ${problem6}`;
18212
+ }
18213
+ return void 0;
18214
+ }
18215
+ async function getStorageSlots(http) {
18216
+ const resp = await http.get(STORAGE_SLOTS_PATH);
18217
+ const data = resp.data?.data;
18218
+ if (!isRecord4(data)) throw unexpected2("\u6CA1\u6709 data \u5BF9\u8C61", resp.data);
18219
+ if (typeof data.synced !== "boolean") throw unexpected2("data.synced \u7F3A\u5931\u6216\u4E0D\u662F\u5E03\u5C14", resp.data);
18220
+ if (!Array.isArray(data.families)) throw unexpected2("data.families \u7F3A\u5931\u6216\u4E0D\u662F\u6570\u7EC4", resp.data);
18221
+ const families = [];
18222
+ for (let i = 0; i < data.families.length; i += 1) {
18223
+ const raw = data.families[i];
18224
+ const at = `data.families[${i}]`;
18225
+ if (!isRecord4(raw)) throw unexpected2(`${at} \u4E0D\u662F\u5BF9\u8C61`, resp.data);
18226
+ if (typeof raw.family !== "string" || !raw.family.trim()) throw unexpected2(`${at}.family \u7F3A\u5931\u6216\u4E3A\u7A7A`, resp.data);
18227
+ if (!Array.isArray(raw.builtInSlots)) throw unexpected2(`${at}.builtInSlots \u7F3A\u5931\u6216\u4E0D\u662F\u6570\u7EC4`, resp.data);
18228
+ const builtInProblem = slotsProblem(raw.builtInSlots, `${at}.builtInSlots`);
18229
+ if (builtInProblem) throw unexpected2(builtInProblem, resp.data);
18230
+ const registered = raw.registeredSlots;
18231
+ if (Array.isArray(registered)) {
18232
+ const registeredProblem = slotsProblem(registered, `${at}.registeredSlots`);
18233
+ if (registeredProblem) throw unexpected2(registeredProblem, resp.data);
18234
+ } else if (registered !== void 0 && registered !== null) {
18235
+ throw unexpected2(`${at}.registeredSlots \u65E2\u4E0D\u662F\u6570\u7EC4\u4E5F\u4E0D\u662F null`, resp.data);
18236
+ } else if (data.synced) {
18237
+ throw unexpected2(`${at} synced=true \u5374\u6CA1\u7ED9 registeredSlots\uFF08\u767B\u8BB0\u69FD\u6E05\u5355\uFF09`, resp.data);
18238
+ }
18239
+ families.push({ ...raw, registeredSlots: Array.isArray(registered) ? registered : null });
18240
+ }
18241
+ return { ...data, families };
18242
+ }
18243
+
17971
18244
  // src/meta/validate-meta.ts
17972
18245
  import yaml8 from "js-yaml";
17973
18246
 
@@ -19987,7 +20260,7 @@ function actionsPath(modelKey, state = "") {
19987
20260
  if (!state) return base;
19988
20261
  return `${base}?${new URLSearchParams({ state }).toString()}`;
19989
20262
  }
19990
- function isRecord4(v) {
20263
+ function isRecord5(v) {
19991
20264
  return Boolean(v) && typeof v === "object" && !Array.isArray(v);
19992
20265
  }
19993
20266
  function keyOrNull(key) {
@@ -20029,7 +20302,7 @@ async function collectActionGates(probe, modelKeys2, state = "") {
20029
20302
  continue;
20030
20303
  }
20031
20304
  const body = out.body;
20032
- if (!isRecord4(body) || !Array.isArray(body.actions)) {
20305
+ if (!isRecord5(body) || !Array.isArray(body.actions)) {
20033
20306
  unavailable.push({
20034
20307
  modelKey: model,
20035
20308
  status: out.status,
@@ -20045,13 +20318,13 @@ async function collectActionGates(probe, modelKeys2, state = "") {
20045
20318
  else statesEchoed.add(echoed);
20046
20319
  for (const action3 of body.actions) {
20047
20320
  actionsSeen += 1;
20048
- if (!isRecord4(action3)) {
20321
+ if (!isRecord5(action3)) {
20049
20322
  reject(rejected, model, null, "malformed-action");
20050
20323
  continue;
20051
20324
  }
20052
20325
  const cands = Array.isArray(action3.candidates) ? action3.candidates : [];
20053
20326
  for (const c of cands) {
20054
- if (isRecord4(c) && typeof c.source === "string" && c.source) sources.add(c.source);
20327
+ if (isRecord5(c) && typeof c.source === "string" && c.source) sources.add(c.source);
20055
20328
  }
20056
20329
  const effectClass = classifyEffect(action3.effect);
20057
20330
  if (effectClass !== "absent") actionsWithEffect += 1;
@@ -20095,7 +20368,7 @@ async function collectActionGates(probe, modelKeys2, state = "") {
20095
20368
  reject(rejected, model, key, "no-candidates");
20096
20369
  continue;
20097
20370
  }
20098
- if (!cands.every((c) => isRecord4(c))) {
20371
+ if (!cands.every((c) => isRecord5(c))) {
20099
20372
  reject(rejected, model, key, "malformed-candidate");
20100
20373
  continue;
20101
20374
  }
@@ -20418,7 +20691,7 @@ var badSection = (t) => `\u4F20\u5165\u7684 mutation \u6BB5\u4E0D\u662F\u5BF9\u8
20418
20691
  var badCell = (op, t) => `\u4F20\u5165\u7684 mutation \u91CC ${op} \u8FD9\u4E00\u9879\u4E0D\u662F\u5BF9\u8C61\uFF08${t}\uFF09\uFF0C\u65E0\u6CD5\u5224\u8BFB`;
20419
20692
  var missingCell = (op) => `\u4F20\u5165\u7684 mutation \u91CC\u6CA1\u6709 ${op} \u8FD9\u4E00\u9879`;
20420
20693
  var WORDING3 = 'writable=false \u7684\u4E24\u79CD\u539F\u56E0\uFF1Aderived:<kind>\uFF08\u6D3E\u751F\u5B57\u6BB5\uFF0C\u670D\u52A1\u7AEF\u7B97\u51FA\u6765\u7684\uFF09\u3001readonly\uFF08\u5143\u6570\u636E\u58F0\u660E\u53EA\u8BFB\uFF09\u3002autoGenerate=true \u7684\u5B57\u6BB5\uFF08\u5DE5\u53F7 / \u7EC4\u7EC7 / \u5C97\u4F4D / \u6CD5\u4EBA\u7F16\u7801\u7B49\uFF09**\u4E0D\u662F**\u4E0D\u53EF\u5199\uFF1A\u670D\u52A1\u7AEF\u53EA\u5728\u5B57\u6BB5\u4E3A\u7A7A\u65F6\u751F\u6210\uFF0C\u8C03\u7528\u65B9\u624B\u5DE5\u6307\u5B9A\u7684\u503C\u4F18\u5148 \u2014\u2014 \u7531\u72EC\u7ACB\u6807\u8BB0 `autoGeneratedIfAbsent` \u70B9\u540D\uFF08\u4E0D\u9001\u5219\u751F\u6210\u3001\u9001\u5219\u91C7\u7EB3\uFF09\uFF0C\u4E0D\u518D\u8FDB notWritableReason\u3002\u{1F534} writable=true **\u53EA\u8868\u793A\u5143\u6570\u636E\u6CA1\u58F0\u660E\u8FD9\u4E24\u79CD\u4E0D\u53EF\u5199**\uFF0C\u4E0D\u8868\u793A\u8FD9\u4E2A\u5B57\u6BB5\u8BE5\u7531\u987E\u95EE\u586B \u2014\u2014 \u5B9E\u6D4B createById / updateById \u8FD9 1476 \u4E2A\u5BA1\u8BA1\u5B57\u6BB5\u56DB\u4E2A\u6807\u5FD7\u5168\u662F false\uFF0C\u7167\u6837\u662F writable=true\uFF0C\u5B83\u4EEC\u7531 ref.auditBackref=true \u70B9\u540D\uFF08topology \u628A\u540C\u4E00\u6279\u8FB9\u6392\u9664\u51FA\u4F9D\u8D56\u56FE\uFF0C\u8FD9\u91CC\u4E0D\u6392\u9664\uFF1Amapping \u662F\u5B57\u6BB5\u6E05\u5355\uFF0C\u4E0D\u662F\u4F9D\u8D56\u56FE\uFF09\u3002ref.valueDomain \u53EA\u5728\u76EE\u6807\u662F\u7801\u8868\uFF08DYNAMIC / CO_*\uFF09\u65F6\u7ED9\u51FA\uFF1B\u6307\u5411\u4E1A\u52A1\u6A21\u578B\u65F6\u4E3A null \u2014\u2014 \u5B9E\u6D4B 234 \u4E2A\u58F0\u660E\u51FA\u6765\u7684\u5F15\u7528\u76EE\u6807\u91CC\uFF0C230 \u4E2A\u5728\u540D\u518C\u4E2D\uFF1A\u5176\u4E2D 32 \u4E2A\u662F\u7801\u8868\u3001198 \u4E2A\u662F\u4E1A\u52A1\u6A21\u578B\uFF08User 1564 / OrgUnit 292 / Employee 199 \u2026\uFF09\u8981\u6309\u4E1A\u52A1\u952E\u73B0\u67E5\uFF1B\u53E6\u6709 4 \u4E2A\u60AC\u7A7A\u76EE\u6807\uFF08\u58F0\u660E\u4E86\u5F15\u7528\u4F46\u4E0D\u5728 /api/system/models \u540D\u518C\u91CC\uFF0C\u89C1 topology.json \u7684 dangling\uFF09\u3002valuedomain \u91CC\u6CA1\u6709\u4E1A\u52A1\u6A21\u578B\u7684\u5BF9\u7167\u8868\uFF0C\u6307\u4E00\u4E2A\u4E0D\u5B58\u5728\u7684\u6587\u4EF6\u6BD4\u4E0D\u6307\u66F4\u7CDF\uFF1A\u987E\u95EE\u4F1A\u4EE5\u4E3A\u90A3\u4EFD\u5BF9\u7167\u8868\u53EA\u662F\u8FD8\u6CA1\u751F\u6210\u3002ref.labelFieldSource=unknown \u8868\u793A\u4EA7\u54C1\u6CA1\u58F0\u660E\u663E\u793A\u5B57\u6BB5\u540D\uFF08\u5B9E\u6D4B\u8FDB\u56FE\u7684 2923 \u6761\u8FB9\u91CC 1366 \u6761\u6CA1\u58F0\u660E\uFF09\uFF0C**\u4E0D\u662F**\u300C\u9ED8\u8BA4\u7528 name\u300D\u2014\u2014 \u90A3 1366 \u6761\u6307\u5411 224 \u4E2A\u5728\u518C\u76EE\u6807\uFF0C\u5176\u4E2D 60 \u4E2A\uFF0827%\uFF0C\u76EE\u6807\u6A21\u578B\u53E3\u5F84\uFF09\u8FDE name \u5B57\u6BB5\u90FD\u6CA1\u6709\uFF0C\u6309\u8FB9\u7B97 152 \u6761\uFF0811%\uFF0C\u5B57\u6BB5\u53E3\u5F84\uFF09\u843D\u5728\u5B83\u4EEC\u8EAB\u4E0A\u3002mutation.allowed \u6052\u4E3A\u4E09\u4E2A\u503C\u4E4B\u4E00\uFF1Atrue / false / "unknown"\u3002"unknown" \u8868\u793A\u8BE5\u6A21\u578B\u8FD9\u4E00\u9879\u6CA1\u67E5\u5230\uFF0C**\u4E0D\u662F**\u300C\u5141\u8BB8\u300D\uFF1B\u5177\u4F53\u662F\u54EA\u4E00\u79CD\u6CA1\u67E5\u5230\u770B reason\uFF08\u670D\u52A1\u7AEF\u4FA7\uFF1A\u6CA1\u5E94\u7B54 / \u54CD\u5E94\u7F3A\u8FD9\u4E00\u9879 / allowed \u4E0D\u662F\u5E03\u5C14\uFF1B\u5DE5\u5177\u4FA7\uFF1A\u5E76\u53D1\u6279\u6B21\u91CC\u6CA1\u62FF\u5230\u8FD9\u4E2A\u6A21\u578B\u7684\u7ED3\u679C\uFF1B\u8C03\u7528\u65B9\u4FA7\uFF1A\u672C\u8F6E\u6CA1\u67E5 / \u4F20\u5165\u7684 mutation \u6BB5\u4E0D\u662F\u5BF9\u8C61 / \u4F20\u5165\u7684\u8FD9\u4E00\u9879\u4E0D\u662F\u5BF9\u8C61 / \u4F20\u5165\u7684\u91CC\u6CA1\u6709\u8FD9\u4E00\u9879 \u2014\u2014 \u516B\u79CD\u6210\u56E0\u63AA\u8F9E\u5404\u4E0D\u76F8\u540C\uFF0C\u300C\u4F20\u5165\u7684\u300D\u5F00\u5934\u7684\u662F\u62FC\u8FD9\u4EFD\u57FA\u7EBF\u7684\u4EBA\u641E\u9519\u4E86\uFF0C\u4E0D\u662F\u670D\u52A1\u7AEF\uFF09\u3002enumCount \u6570\u7684\u662F\u8BE5\u5B57\u6BB5\u5019\u9009\u503C\u7684**\u5143\u7D20\u4E2A\u6570**\uFF0C\u4E0E index/fields.jsonl \u91CC\u8BE5\u5B57\u6BB5\u7684 enums \u884C\u6570\u76F8\u7B49\u3002';
20421
- function isRecord5(v) {
20694
+ function isRecord6(v) {
20422
20695
  return Boolean(v) && typeof v === "object" && !Array.isArray(v);
20423
20696
  }
20424
20697
  function typeName2(v) {
@@ -20443,7 +20716,7 @@ async function collectMutation(probe, modelKeys2) {
20443
20716
  continue;
20444
20717
  }
20445
20718
  const body = out.error === "ok" ? out.body : null;
20446
- if (!isRecord5(body)) {
20719
+ if (!isRecord6(body)) {
20447
20720
  const reason = `\u672A\u5E94\u7B54\uFF08HTTP ${out.status} / ${out.error}\uFF09`;
20448
20721
  problems.push(`${key}: mutation-capability ${reason}`);
20449
20722
  mutation[key] = Object.fromEntries(MUTATION_OPS.map((op) => [op, { allowed: "unknown", reason }]));
@@ -20452,7 +20725,7 @@ async function collectMutation(probe, modelKeys2) {
20452
20725
  const entry = {};
20453
20726
  for (const op of MUTATION_OPS) {
20454
20727
  const cell = body[op];
20455
- if (!isRecord5(cell) || !("allowed" in cell)) {
20728
+ if (!isRecord6(cell) || !("allowed" in cell)) {
20456
20729
  entry[op] = { allowed: "unknown", reason: `\u54CD\u5E94\u91CC\u6CA1\u6709 ${op} \u8FD9\u4E00\u9879` };
20457
20730
  problems.push(`${key}: mutation-capability \u54CD\u5E94\u7F3A ${op}`);
20458
20731
  continue;
@@ -20473,14 +20746,14 @@ function mutationSection(entry) {
20473
20746
  if (entry === void 0 || entry === null) {
20474
20747
  return Object.fromEntries(MUTATION_OPS.map((op) => [op, { allowed: "unknown", reason: NOT_QUERIED }]));
20475
20748
  }
20476
- if (!isRecord5(entry)) {
20749
+ if (!isRecord6(entry)) {
20477
20750
  const reason = badSection(typeName2(entry));
20478
20751
  return Object.fromEntries(MUTATION_OPS.map((op) => [op, { allowed: "unknown", reason }]));
20479
20752
  }
20480
20753
  const section = {};
20481
20754
  for (const op of MUTATION_OPS) {
20482
20755
  const cell = entry[op];
20483
- if (isRecord5(cell)) {
20756
+ if (isRecord6(cell)) {
20484
20757
  section[op] = cell;
20485
20758
  } else if (op in entry) {
20486
20759
  section[op] = { allowed: "unknown", reason: badCell(op, typeName2(cell)) };
@@ -20493,7 +20766,7 @@ function mutationSection(entry) {
20493
20766
  function writability(field) {
20494
20767
  const derived = field.derived;
20495
20768
  if (derived) {
20496
- const kind = isRecord5(derived) ? derived.kind : null;
20769
+ const kind = isRecord6(derived) ? derived.kind : null;
20497
20770
  return { writable: false, reason: `derived:${typeof kind === "string" && kind ? kind : "unknown"}` };
20498
20771
  }
20499
20772
  if (field.isReadonly) return { writable: false, reason: "readonly" };
@@ -20508,7 +20781,7 @@ function buildMapping(metas, edges, mutation, codeTables = []) {
20508
20781
  const { fields, problem: problem6 } = metaFields(metas[modelKey]);
20509
20782
  const rows = [];
20510
20783
  for (const f of fields) {
20511
- if (!isRecord5(f)) continue;
20784
+ if (!isRecord6(f)) continue;
20512
20785
  const key = f.key;
20513
20786
  if (typeof key !== "string" || !key) continue;
20514
20787
  const { writable, reason } = writability(f);
@@ -20551,7 +20824,7 @@ function buildMapping(metas, edges, mutation, codeTables = []) {
20551
20824
  // 「爬过且这个模型确实没有字段」必须与「没爬过」(文件不存在)区分开。
20552
20825
  crawled: true,
20553
20826
  wording: WORDING3,
20554
- mutation: mutationSection(isRecord5(mutation) ? mutation[modelKey] : mutation),
20827
+ mutation: mutationSection(isRecord6(mutation) ? mutation[modelKey] : mutation),
20555
20828
  fieldCount: rows.length,
20556
20829
  // 🔴 `null` = 载荷判读正常(fieldCount=0 就是「这个模型确实没字段」);
20557
20830
  // 非 null = **爬过、但判不出字段**,此时 fieldCount=0 不代表「没字段」。
@@ -20563,8 +20836,8 @@ function buildMapping(metas, edges, mutation, codeTables = []) {
20563
20836
  }
20564
20837
  function allowedIn(sheet, op) {
20565
20838
  const section = sheet.mutation;
20566
- const cell = isRecord5(section) ? section[op] : void 0;
20567
- return isRecord5(cell) ? cell.allowed : "unknown";
20839
+ const cell = isRecord6(section) ? section[op] : void 0;
20840
+ return isRecord6(cell) ? cell.allowed : "unknown";
20568
20841
  }
20569
20842
  var PATH_SEPARATORS = ["/", String.fromCharCode(92)];
20570
20843
  function unsafeKeyReason(modelKey) {
@@ -20746,7 +21019,7 @@ function writeModelsMd(layout, text3) {
20746
21019
  // src/fde/recon/pointer-audit.ts
20747
21020
  import { existsSync as existsSync3 } from "fs";
20748
21021
  import * as path10 from "path";
20749
- function isRecord6(v) {
21022
+ function isRecord7(v) {
20750
21023
  return Boolean(v) && typeof v === "object" && !Array.isArray(v);
20751
21024
  }
20752
21025
  function auditValueDomainPointers(layout, sheets) {
@@ -20755,7 +21028,7 @@ function auditValueDomainPointers(layout, sheets) {
20755
21028
  for (const sheet of sheets) {
20756
21029
  for (const field of sheet.fields) {
20757
21030
  const ref = field.ref;
20758
- const pointer = isRecord6(ref) ? ref.valueDomain : null;
21031
+ const pointer = isRecord7(ref) ? ref.valueDomain : null;
20759
21032
  if (typeof pointer !== "string" || pointer === "") continue;
20760
21033
  if (!seen.has(pointer)) {
20761
21034
  seen.set(pointer, existsSync3(path10.join(layout.dir, pointer)));
@@ -20846,18 +21119,18 @@ var WORDING4 = "rows = \u672C\u8F6E\u4EE5\u5F53\u524D\u767B\u5F55\u8EAB\u4EFD\u8
20846
21119
  function listPath(modelKey) {
20847
21120
  return `/api/models/${modelKey}/list/dsl`;
20848
21121
  }
20849
- function isRecord7(v) {
21122
+ function isRecord8(v) {
20850
21123
  return Boolean(v) && typeof v === "object" && !Array.isArray(v);
20851
21124
  }
20852
21125
  function readContent(body) {
20853
- if (!isRecord7(body)) return { rows: null, total: null, nonDict: 0 };
21126
+ if (!isRecord8(body)) return { rows: null, total: null, nonDict: 0 };
20854
21127
  const rows = body.content;
20855
21128
  const total = body.totalElements;
20856
21129
  if (!Array.isArray(rows)) return { rows: null, total: null, nonDict: 0 };
20857
21130
  if (typeof total !== "number" || !Number.isInteger(total) || total < 0) {
20858
21131
  return { rows: null, total: null, nonDict: 0 };
20859
21132
  }
20860
- const kept = rows.filter((r) => isRecord7(r));
21133
+ const kept = rows.filter((r) => isRecord8(r));
20861
21134
  return { rows: kept, total, nonDict: rows.length - kept.length };
20862
21135
  }
20863
21136
  async function collectCodeTables(probe, modelEntries2, opts = {}) {
@@ -20870,7 +21143,7 @@ async function collectCodeTables(probe, modelEntries2, opts = {}) {
20870
21143
  const problems = [];
20871
21144
  const keys = [];
20872
21145
  for (const entry of modelEntries2) {
20873
- if (!isRecord7(entry) || entry.type !== DYNAMIC_TYPE) continue;
21146
+ if (!isRecord8(entry) || entry.type !== DYNAMIC_TYPE) continue;
20874
21147
  const key = entry.modelKey;
20875
21148
  if (typeof key !== "string" || !key) {
20876
21149
  problems.push(`\u540D\u518C\u91CC\u6709\u4E00\u6761 type=DYNAMIC \u7684\u6761\u76EE\u4F46 modelKey \u4E0D\u53EF\u7528\uFF08${JSON.stringify(key)}\uFF09\uFF0C\u5DF2\u8DF3\u8FC7`);
@@ -21004,12 +21277,12 @@ function collectEnumDomains(metas) {
21004
21277
  for (const modelKey of Object.keys(metas).sort()) {
21005
21278
  const { fields } = metaFields(metas[modelKey]);
21006
21279
  for (const field of fields) {
21007
- if (!isRecord7(field)) continue;
21280
+ if (!isRecord8(field)) continue;
21008
21281
  const fieldKey = field.key;
21009
21282
  if (typeof fieldKey !== "string" || !fieldKey) continue;
21010
21283
  const enums = field.enums;
21011
21284
  if (!Array.isArray(enums) || enums.length === 0) continue;
21012
- const kept = enums.filter(isRecord7).map((e) => ({ ...e }));
21285
+ const kept = enums.filter(isRecord8).map((e) => ({ ...e }));
21013
21286
  rows.push({
21014
21287
  model: modelKey,
21015
21288
  field: fieldKey,
@@ -21020,7 +21293,7 @@ function collectEnumDomains(metas) {
21020
21293
  // —— 否则「这个字段的枚举少了一项」这件事没有任何出处。
21021
21294
  // 实测 3179 条全是对象,这一档从未观测到;**恒发空列表**而不是条件出键:
21022
21295
  // 「有这一列且为空」与「没这一列」是两个值,后者读起来像「没检查过」。
21023
- nonDictElements: enums.filter((e) => !isRecord7(e)).map((e) => JSON.stringify(e) ?? String(e))
21296
+ nonDictElements: enums.filter((e) => !isRecord8(e)).map((e) => JSON.stringify(e) ?? String(e))
21024
21297
  });
21025
21298
  }
21026
21299
  }
@@ -21065,7 +21338,7 @@ function writeValuedomain(layout, codeTables, enums, opts = {}) {
21065
21338
  roundId: opts.roundId ?? null,
21066
21339
  // 🔴 `identity || {}` 会把「调用方没传身份」和「身份是空的」压成同一个值,
21067
21340
  // 而它们的下一步不同(前者去补工具的登录,后者去问服务端为什么不给 user)。
21068
- identity: isRecord7(opts.identity) ? opts.identity : null,
21341
+ identity: isRecord8(opts.identity) ? opts.identity : null,
21069
21342
  codeTableCount: Object.keys(codeTables).length,
21070
21343
  enumFieldCount: enums.length,
21071
21344
  // 🔴 名册里一共看到几条。上游名册加载失败给出空数组时,产物会与
@@ -21135,7 +21408,7 @@ function parseRoundStamp(stamp2) {
21135
21408
  function newRoundId(started) {
21136
21409
  return `${roundStamp(started)}-${randomBytes3(4).toString("hex")}`;
21137
21410
  }
21138
- function isRecord8(v) {
21411
+ function isRecord9(v) {
21139
21412
  return Boolean(v) && typeof v === "object" && !Array.isArray(v);
21140
21413
  }
21141
21414
  function readJsonSoft(file) {
@@ -21154,8 +21427,8 @@ function readJsonSoft(file) {
21154
21427
  }
21155
21428
  function readCrawledAt(layout) {
21156
21429
  const body = readJsonSoft(path11.join(layout.dir, KIT_CRAWLED_AT_FILE));
21157
- const models = isRecord8(body) ? body.models : null;
21158
- return isRecord8(models) ? models : {};
21430
+ const models = isRecord9(body) ? body.models : null;
21431
+ return isRecord9(models) ? models : {};
21159
21432
  }
21160
21433
  function writeCrawledAt(layout, freshKeys, carriedKeys, roundId, started) {
21161
21434
  const previous = readCrawledAt(layout);
@@ -21203,14 +21476,14 @@ function productRoundId(root, rel) {
21203
21476
  const p = path11.join(root, rel);
21204
21477
  if (!existsSync4(p)) return ["missing", null];
21205
21478
  const body = readJsonSoft(p);
21206
- if (body === void 0 || !isRecord8(body)) return ["unreadable", null];
21479
+ if (body === void 0 || !isRecord9(body)) return ["unreadable", null];
21207
21480
  const rid = body.roundId;
21208
21481
  if (typeof rid !== "string" || !rid) return ["unstamped", null];
21209
21482
  return ["stamped", rid];
21210
21483
  }
21211
21484
  function inspectRound(root) {
21212
21485
  const raw = readJsonSoft(path11.join(root, KIT_CRAWLED_AT_FILE));
21213
- const ledger = isRecord8(raw) ? raw : {};
21486
+ const ledger = isRecord9(raw) ? raw : {};
21214
21487
  const rid = ledger.roundId;
21215
21488
  const roundId = typeof rid === "string" && rid ? rid : null;
21216
21489
  const rawWritten = ledger.productsWrittenThisRound;
@@ -21315,7 +21588,7 @@ function renderRound(result) {
21315
21588
  }
21316
21589
  var SCHEMA_RECRAWL_NEXT = "\u4E0B\u4E00\u6B65\uFF1A\u8DD1\u4E00\u6B21**\u5168\u91CF** `hcm chiron recon`\uFF08\u628A `--model` \u53BB\u6389\uFF09\uFF0C\u6574\u4EFD\u57FA\u7EBF\u624D\u90FD\u51FA\u81EA\u672C\u7248 kit\u3002";
21317
21590
  function carriedGatesSchemaProblem(oldGates) {
21318
- if (!isRecord8(oldGates)) {
21591
+ if (!isRecord9(oldGates)) {
21319
21592
  const shape = Array.isArray(oldGates) ? "list" : oldGates === null ? "null" : typeof oldGates;
21320
21593
  return `gates.json: \u4E0A\u4E00\u8F6E\u7684\u95F8\u8868\u8F7D\u8377\u662F ${shape} \u4E0D\u662F\u5BF9\u8C61\uFF0C\u65E2\u8BFB\u4E0D\u51FA schema \u7248\u672C\u3001\u4E5F\u4E00\u6761\u95F8\u90FD\u6CBF\u7528\u4E0D\u4E86\uFF08\u672C\u8F6E\u7684 gates \u6570\u7EC4\u91CC\u53EA\u6709\u8FD9\u4E00\u8F6E\u771F\u722C\u5230\u7684\uFF09\u3002${SCHEMA_RECRAWL_NEXT}`;
21321
21594
  }
@@ -21356,7 +21629,7 @@ function collectCarryOver(layout, freshMetas) {
21356
21629
  problems.push(`${name}: \u8BFB\u4E0D\u56DE\u4E0A\u4E00\u8F6E\u7684 meta\uFF08${e.message}\uFF09\uFF0C\u8BE5\u6A21\u578B\u8FD9\u6B21\u4E0D\u8FDB\u7D22\u5F15`);
21357
21630
  continue;
21358
21631
  }
21359
- if (isRecord8(body)) carriedMetas[key] = body;
21632
+ if (isRecord9(body)) carriedMetas[key] = body;
21360
21633
  else {
21361
21634
  problems.push(
21362
21635
  `${name}: \u4E0A\u4E00\u8F6E\u7684 meta \u8F7D\u8377\u662F ${Array.isArray(body) ? "list" : body === null ? "null" : typeof body} \u4E0D\u662F\u5BF9\u8C61\uFF0C\u8BE5\u6A21\u578B\u8FD9\u6B21\u4E0D\u8FDB\u7D22\u5F15`
@@ -21371,9 +21644,9 @@ function collectCarryOver(layout, freshMetas) {
21371
21644
  const stale = carriedGatesSchemaProblem(oldGates);
21372
21645
  if (stale) problems.push(stale);
21373
21646
  }
21374
- const oldList = isRecord8(oldGates) && Array.isArray(oldGates.gates) ? oldGates.gates : [];
21647
+ const oldList = isRecord9(oldGates) && Array.isArray(oldGates.gates) ? oldGates.gates : [];
21375
21648
  for (const g of oldList) {
21376
- if (isRecord8(g) && !(String(g.model) in freshMetas)) carriedGates.push(g);
21649
+ if (isRecord9(g) && !(String(g.model) in freshMetas)) carriedGates.push(g);
21377
21650
  }
21378
21651
  return { carriedMetas, carriedGates, problems };
21379
21652
  }
@@ -21497,7 +21770,7 @@ async function runRecon(probe, layout, opts = {}) {
21497
21770
  products.push(...mappingPaths.map((p) => relOf(layout, p)));
21498
21771
  const sheetsWritten = Math.max(mappingPaths.length - 1, 0);
21499
21772
  let previous = readJsonSoft(path11.join(layout.dir, "fingerprint.json"));
21500
- if (!isRecord8(previous)) previous = null;
21773
+ if (!isRecord9(previous)) previous = null;
21501
21774
  const current = await computeFingerprint(probe);
21502
21775
  products.push(relOf(layout, layout.writeJson("fingerprint.json", current)));
21503
21776
  const drift = previous === null ? null : compareFingerprint(previous, current);
@@ -31267,6 +31540,7 @@ export {
31267
31540
  STEP_RECORD,
31268
31541
  STEP_STOP,
31269
31542
  STEP_UNBIND,
31543
+ STORAGE_SLOTS_PATH,
31270
31544
  SUPERSEDED_STATUS,
31271
31545
  SYNTH_FOOTNOTE,
31272
31546
  SYNTH_MARK,
@@ -31428,6 +31702,7 @@ export {
31428
31702
  getMiniStatus,
31429
31703
  getScriptTask,
31430
31704
  getSettingDomain,
31705
+ getStorageSlots,
31431
31706
  getTenantMeta,
31432
31707
  gitlabIssueUrl,
31433
31708
  globalConfigFile,