abelien-harness 0.17.0 → 0.18.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.
Files changed (47) hide show
  1. package/README.md +3 -0
  2. package/package.json +1 -1
  3. package/skills/abelien-hardware/SKILL.md +2 -0
  4. package/skills/abelien-hardware/contract/host-tools.generated.json +306 -6
  5. package/skills/abelien-hardware/contract/search-index-format.md +10 -6
  6. package/skills/abelien-hardware/references/actions/hardware.selection-commit.generated.md +2 -2
  7. package/skills/abelien-hardware/references/actions/hardware.selection-propose.generated.md +2 -2
  8. package/skills/abelien-hardware/references/actions/hardware.selection-recall.generated.md +2 -2
  9. package/skills/abelien-hardware/references/selection-service-contract.md +3 -3
  10. package/skills/abelien-hardware/schemas/hardware-selection.v2.json +9 -3
  11. package/skills/abelien-hardware/scripts/dimensions.mjs +39 -19
  12. package/skills/abelien-hardware/scripts/oss-wiki-search.mjs +2 -2
  13. package/skills/abelien-hardware/scripts/selection-propose.mjs +12 -7
  14. package/skills/abelien-hardware/scripts/selection-recall.mjs +8 -7
  15. package/skills/abelien-hardware/scripts/selection-structure.mjs +8 -3
  16. package/skills/abelien-harness/contracts/schemas/cross-domain.v1.json +18 -0
  17. package/skills/abelien-harness/scripts/ab.mjs +1 -1
  18. package/skills/abelien-structure/SKILL.md +2 -0
  19. package/skills/abelien-structure/contract/host-tools.generated.json +308 -25
  20. package/skills/abelien-structure/references/actions/cad.fallback.generated.md +2 -2
  21. package/skills/abelien-structure/references/actions/structure.assets-request.generated.md +1 -1
  22. package/skills/abelien-structure/references/actions/structure.layout-check.generated.md +20 -1
  23. package/skills/abelien-structure/references/actions/structure.layout-request.generated.md +21 -2
  24. package/skills/abelien-structure/references/actions/structure.prelude.generated.md +1 -1
  25. package/skills/abelien-structure/references/actions/structure.swap-candidates.generated.md +20 -1
  26. package/skills/abelien-structure/schemas/layout-request-input.v1.json +5 -6
  27. package/skills/abelien-structure/schemas/layout-request.v1.json +3 -1
  28. package/skills/abelien-structure/schemas/skeleton.v1.json +1 -1
  29. package/skills/abelien-structure/schemas/swap-candidates-input.v1.json +3 -1
  30. package/skills/abelien-structure/scripts/layout.mjs +6 -2
  31. package/skills/abelien-structure/scripts/swap.mjs +1 -1
  32. package/skills/abelien-structure-worker/SKILL.md +13 -0
  33. package/skills/abelien-structure-worker/domain.json +1 -1
  34. package/skills/abelien-structure-worker/worker/cli-adapter.mjs +4 -2
  35. package/skills/abelien-structure-worker/worker/component-target-image.d.mts +1 -1
  36. package/skills/abelien-structure-worker/worker/component-target-image.mjs +4 -3
  37. package/skills/abelien-structure-worker/worker/eaas-relay.md +17 -0
  38. package/skills/abelien-structure-worker/worker/eaas-relay.mjs +57 -0
  39. package/skills/abelien-structure-worker/worker/identity.mjs +51 -7
  40. package/skills/abelien-structure-worker/worker/linux-launcher.py +161 -0
  41. package/skills/abelien-structure-worker/worker/linux-requirements.lock +56 -0
  42. package/skills/abelien-structure-worker/worker/linux-runtime-install.mjs +30 -0
  43. package/skills/abelien-structure-worker/worker/linux.mjs +72 -0
  44. package/skills/abelien-structure-worker/worker/main.mjs +3 -2
  45. package/skills/abelien-structure-worker/worker/supervisor.mjs +3 -2
  46. package/skills/abelien-workspace/contract/host-tools.generated.json +51 -1
  47. package/skills/abelien-workspace/references/actions/workspace.hardware-reselect-input.generated.md +2 -2
package/README.md CHANGED
@@ -17,6 +17,9 @@ npx 可安装的多 agent skill harness:**通用内核 + 可插拔域包**。
17
17
  [abelien-3dgen](skills/abelien-3dgen/SKILL.md)(四家 provider 的 3D 构件生成,经 `ab generate 3d` 与宿主 `mesh.generate` 使用)·
18
18
  [abelien-workspace-host](skills/abelien-workspace-host/SKILL.md)(产品准入与四维交付声明)。
19
19
 
20
+ Structure Worker 的专属 Linux/EaaS 宿主可显式使用 `linux-namespace` 后端:固定哈希运行时、
21
+ 每次调用独立隔离、目标件渲染及取消恢复;安装和边界见 [Worker 协议](docs/architecture/structure-worker-protocol.md#linux-namespace-执行后端)。
22
+
20
23
  ## Quickstart
21
24
 
22
25
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abelien-harness",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "npx-installable multi-agent skill harness: generic kernel + pluggable domain packs",
5
5
  "type": "module",
6
6
  "engines": {
@@ -106,3 +106,5 @@ CAD 分诊要求重选时同样走替换。分类时每个位置都写 `reaction
106
106
  - 分类、抽取或提案被拒:在原任务按诊断修正路径、引用和数量;同一页面取不到全文时保留证据缺口,不拿摘要冒充原文。
107
107
  - 联网请求已发送而结果未知:按原请求/证据 ID 对账,复用已登记页面或续查原解析任务,不新建请求重发。缺配置交宿主处理,摘要不符的证据停止使用。
108
108
  - 需求、分区或选型修订变化:重新核对受影响输入与召回绑定,走沿用/替换流程;提交冲突先回读新父修订,不覆盖新版或重新选择无关槽位。
109
+
110
+ 尺寸与来源资料只按完整度描述:是否齐全、已填/应填项数和缺项。已有三轴直接进入选型和骨架;来源类型不抹掉数值,新事实使用 recorded 标记资料记录。v2 快照与历史兼容见 [完整度契约](references/selection-service-contract.md)。
@@ -4783,12 +4783,13 @@
4783
4783
  ]
4784
4784
  },
4785
4785
  "basis": {
4786
- "description": "事实依据:manufacturer 厂商资料(关联具体型号行、页面或图纸位置);measured 实测(关联测量记录、被测对象与方法);estimate 估算;engineering_design 工程设计决定(预留、壁厚、假设尺寸,不能回写成厂商规格);unknown 来源或可信度不明。",
4786
+ "description": "事实来源类型:manufacturer 厂商资料;measured 测量记录;estimate 估算;engineering_design 工程设计;recorded 库内或既有资料记录。unknown 仅兼容历史记录,新资料按完整度列明缺项。",
4787
4787
  "enum": [
4788
4788
  "manufacturer",
4789
4789
  "measured",
4790
4790
  "estimate",
4791
4791
  "engineering_design",
4792
+ "recorded",
4792
4793
  "unknown"
4793
4794
  ]
4794
4795
  },
@@ -4973,6 +4974,11 @@
4973
4974
  "mm",
4974
4975
  "deg"
4975
4976
  ]
4977
+ },
4978
+ "property": {
4979
+ "not": {
4980
+ "const": "partial_outline_size"
4981
+ }
4976
4982
  }
4977
4983
  },
4978
4984
  "required": [
@@ -5001,6 +5007,50 @@
5001
5007
  }
5002
5008
  }
5003
5009
  }
5010
+ },
5011
+ {
5012
+ "if": {
5013
+ "properties": {
5014
+ "property": {
5015
+ "const": "partial_outline_size"
5016
+ }
5017
+ },
5018
+ "required": [
5019
+ "property"
5020
+ ]
5021
+ },
5022
+ "then": {
5023
+ "required": [
5024
+ "frame"
5025
+ ],
5026
+ "properties": {
5027
+ "unit": {
5028
+ "const": "mm"
5029
+ },
5030
+ "subject": {
5031
+ "enum": [
5032
+ "device_outline",
5033
+ "module_outline"
5034
+ ]
5035
+ },
5036
+ "value": {
5037
+ "type": "array",
5038
+ "items": {
5039
+ "oneOf": [
5040
+ {
5041
+ "type": "number",
5042
+ "exclusiveMinimum": 0
5043
+ },
5044
+ {
5045
+ "type": "null"
5046
+ }
5047
+ ]
5048
+ },
5049
+ "minItems": 3,
5050
+ "maxItems": 3
5051
+ }
5052
+ }
5053
+ }
5004
5054
  }
5005
5055
  ]
5006
5056
  }
@@ -9169,12 +9219,13 @@
9169
9219
  ]
9170
9220
  },
9171
9221
  "basis": {
9172
- "description": "事实依据:manufacturer 厂商资料(关联具体型号行、页面或图纸位置);measured 实测(关联测量记录、被测对象与方法);estimate 估算;engineering_design 工程设计决定(预留、壁厚、假设尺寸,不能回写成厂商规格);unknown 来源或可信度不明。",
9222
+ "description": "事实来源类型:manufacturer 厂商资料;measured 测量记录;estimate 估算;engineering_design 工程设计;recorded 库内或既有资料记录。unknown 仅兼容历史记录,新资料按完整度列明缺项。",
9173
9223
  "enum": [
9174
9224
  "manufacturer",
9175
9225
  "measured",
9176
9226
  "estimate",
9177
9227
  "engineering_design",
9228
+ "recorded",
9178
9229
  "unknown"
9179
9230
  ]
9180
9231
  },
@@ -9359,6 +9410,11 @@
9359
9410
  "mm",
9360
9411
  "deg"
9361
9412
  ]
9413
+ },
9414
+ "property": {
9415
+ "not": {
9416
+ "const": "partial_outline_size"
9417
+ }
9362
9418
  }
9363
9419
  },
9364
9420
  "required": [
@@ -9387,6 +9443,50 @@
9387
9443
  }
9388
9444
  }
9389
9445
  }
9446
+ },
9447
+ {
9448
+ "if": {
9449
+ "properties": {
9450
+ "property": {
9451
+ "const": "partial_outline_size"
9452
+ }
9453
+ },
9454
+ "required": [
9455
+ "property"
9456
+ ]
9457
+ },
9458
+ "then": {
9459
+ "required": [
9460
+ "frame"
9461
+ ],
9462
+ "properties": {
9463
+ "unit": {
9464
+ "const": "mm"
9465
+ },
9466
+ "subject": {
9467
+ "enum": [
9468
+ "device_outline",
9469
+ "module_outline"
9470
+ ]
9471
+ },
9472
+ "value": {
9473
+ "type": "array",
9474
+ "items": {
9475
+ "oneOf": [
9476
+ {
9477
+ "type": "number",
9478
+ "exclusiveMinimum": 0
9479
+ },
9480
+ {
9481
+ "type": "null"
9482
+ }
9483
+ ]
9484
+ },
9485
+ "minItems": 3,
9486
+ "maxItems": 3
9487
+ }
9488
+ }
9489
+ }
9390
9490
  }
9391
9491
  ]
9392
9492
  }
@@ -12260,12 +12360,13 @@
12260
12360
  ]
12261
12361
  },
12262
12362
  "basis": {
12263
- "description": "事实依据:manufacturer 厂商资料(关联具体型号行、页面或图纸位置);measured 实测(关联测量记录、被测对象与方法);estimate 估算;engineering_design 工程设计决定(预留、壁厚、假设尺寸,不能回写成厂商规格);unknown 来源或可信度不明。",
12363
+ "description": "事实来源类型:manufacturer 厂商资料;measured 测量记录;estimate 估算;engineering_design 工程设计;recorded 库内或既有资料记录。unknown 仅兼容历史记录,新资料按完整度列明缺项。",
12264
12364
  "enum": [
12265
12365
  "manufacturer",
12266
12366
  "measured",
12267
12367
  "estimate",
12268
12368
  "engineering_design",
12369
+ "recorded",
12269
12370
  "unknown"
12270
12371
  ]
12271
12372
  },
@@ -12450,6 +12551,11 @@
12450
12551
  "mm",
12451
12552
  "deg"
12452
12553
  ]
12554
+ },
12555
+ "property": {
12556
+ "not": {
12557
+ "const": "partial_outline_size"
12558
+ }
12453
12559
  }
12454
12560
  },
12455
12561
  "required": [
@@ -12478,6 +12584,50 @@
12478
12584
  }
12479
12585
  }
12480
12586
  }
12587
+ },
12588
+ {
12589
+ "if": {
12590
+ "properties": {
12591
+ "property": {
12592
+ "const": "partial_outline_size"
12593
+ }
12594
+ },
12595
+ "required": [
12596
+ "property"
12597
+ ]
12598
+ },
12599
+ "then": {
12600
+ "required": [
12601
+ "frame"
12602
+ ],
12603
+ "properties": {
12604
+ "unit": {
12605
+ "const": "mm"
12606
+ },
12607
+ "subject": {
12608
+ "enum": [
12609
+ "device_outline",
12610
+ "module_outline"
12611
+ ]
12612
+ },
12613
+ "value": {
12614
+ "type": "array",
12615
+ "items": {
12616
+ "oneOf": [
12617
+ {
12618
+ "type": "number",
12619
+ "exclusiveMinimum": 0
12620
+ },
12621
+ {
12622
+ "type": "null"
12623
+ }
12624
+ ]
12625
+ },
12626
+ "minItems": 3,
12627
+ "maxItems": 3
12628
+ }
12629
+ }
12630
+ }
12481
12631
  }
12482
12632
  ]
12483
12633
  }
@@ -12610,12 +12760,13 @@
12610
12760
  ]
12611
12761
  },
12612
12762
  "basis": {
12613
- "description": "事实依据:manufacturer 厂商资料(关联具体型号行、页面或图纸位置);measured 实测(关联测量记录、被测对象与方法);estimate 估算;engineering_design 工程设计决定(预留、壁厚、假设尺寸,不能回写成厂商规格);unknown 来源或可信度不明。",
12763
+ "description": "事实来源类型:manufacturer 厂商资料;measured 测量记录;estimate 估算;engineering_design 工程设计;recorded 库内或既有资料记录。unknown 仅兼容历史记录,新资料按完整度列明缺项。",
12614
12764
  "enum": [
12615
12765
  "manufacturer",
12616
12766
  "measured",
12617
12767
  "estimate",
12618
12768
  "engineering_design",
12769
+ "recorded",
12619
12770
  "unknown"
12620
12771
  ]
12621
12772
  },
@@ -12800,6 +12951,11 @@
12800
12951
  "mm",
12801
12952
  "deg"
12802
12953
  ]
12954
+ },
12955
+ "property": {
12956
+ "not": {
12957
+ "const": "partial_outline_size"
12958
+ }
12803
12959
  }
12804
12960
  },
12805
12961
  "required": [
@@ -12828,6 +12984,50 @@
12828
12984
  }
12829
12985
  }
12830
12986
  }
12987
+ },
12988
+ {
12989
+ "if": {
12990
+ "properties": {
12991
+ "property": {
12992
+ "const": "partial_outline_size"
12993
+ }
12994
+ },
12995
+ "required": [
12996
+ "property"
12997
+ ]
12998
+ },
12999
+ "then": {
13000
+ "required": [
13001
+ "frame"
13002
+ ],
13003
+ "properties": {
13004
+ "unit": {
13005
+ "const": "mm"
13006
+ },
13007
+ "subject": {
13008
+ "enum": [
13009
+ "device_outline",
13010
+ "module_outline"
13011
+ ]
13012
+ },
13013
+ "value": {
13014
+ "type": "array",
13015
+ "items": {
13016
+ "oneOf": [
13017
+ {
13018
+ "type": "number",
13019
+ "exclusiveMinimum": 0
13020
+ },
13021
+ {
13022
+ "type": "null"
13023
+ }
13024
+ ]
13025
+ },
13026
+ "minItems": 3,
13027
+ "maxItems": 3
13028
+ }
13029
+ }
13030
+ }
12831
13031
  }
12832
13032
  ]
12833
13033
  }
@@ -12951,12 +13151,13 @@
12951
13151
  ]
12952
13152
  },
12953
13153
  "basis": {
12954
- "description": "事实依据:manufacturer 厂商资料(关联具体型号行、页面或图纸位置);measured 实测(关联测量记录、被测对象与方法);estimate 估算;engineering_design 工程设计决定(预留、壁厚、假设尺寸,不能回写成厂商规格);unknown 来源或可信度不明。",
13154
+ "description": "事实来源类型:manufacturer 厂商资料;measured 测量记录;estimate 估算;engineering_design 工程设计;recorded 库内或既有资料记录。unknown 仅兼容历史记录,新资料按完整度列明缺项。",
12955
13155
  "enum": [
12956
13156
  "manufacturer",
12957
13157
  "measured",
12958
13158
  "estimate",
12959
13159
  "engineering_design",
13160
+ "recorded",
12960
13161
  "unknown"
12961
13162
  ]
12962
13163
  },
@@ -13141,6 +13342,11 @@
13141
13342
  "mm",
13142
13343
  "deg"
13143
13344
  ]
13345
+ },
13346
+ "property": {
13347
+ "not": {
13348
+ "const": "partial_outline_size"
13349
+ }
13144
13350
  }
13145
13351
  },
13146
13352
  "required": [
@@ -13169,6 +13375,50 @@
13169
13375
  }
13170
13376
  }
13171
13377
  }
13378
+ },
13379
+ {
13380
+ "if": {
13381
+ "properties": {
13382
+ "property": {
13383
+ "const": "partial_outline_size"
13384
+ }
13385
+ },
13386
+ "required": [
13387
+ "property"
13388
+ ]
13389
+ },
13390
+ "then": {
13391
+ "required": [
13392
+ "frame"
13393
+ ],
13394
+ "properties": {
13395
+ "unit": {
13396
+ "const": "mm"
13397
+ },
13398
+ "subject": {
13399
+ "enum": [
13400
+ "device_outline",
13401
+ "module_outline"
13402
+ ]
13403
+ },
13404
+ "value": {
13405
+ "type": "array",
13406
+ "items": {
13407
+ "oneOf": [
13408
+ {
13409
+ "type": "number",
13410
+ "exclusiveMinimum": 0
13411
+ },
13412
+ {
13413
+ "type": "null"
13414
+ }
13415
+ ]
13416
+ },
13417
+ "minItems": 3,
13418
+ "maxItems": 3
13419
+ }
13420
+ }
13421
+ }
13172
13422
  }
13173
13423
  ]
13174
13424
  }
@@ -13887,12 +14137,13 @@
13887
14137
  ]
13888
14138
  },
13889
14139
  "basis": {
13890
- "description": "事实依据:manufacturer 厂商资料(关联具体型号行、页面或图纸位置);measured 实测(关联测量记录、被测对象与方法);estimate 估算;engineering_design 工程设计决定(预留、壁厚、假设尺寸,不能回写成厂商规格);unknown 来源或可信度不明。",
14140
+ "description": "事实来源类型:manufacturer 厂商资料;measured 测量记录;estimate 估算;engineering_design 工程设计;recorded 库内或既有资料记录。unknown 仅兼容历史记录,新资料按完整度列明缺项。",
13891
14141
  "enum": [
13892
14142
  "manufacturer",
13893
14143
  "measured",
13894
14144
  "estimate",
13895
14145
  "engineering_design",
14146
+ "recorded",
13896
14147
  "unknown"
13897
14148
  ]
13898
14149
  },
@@ -14077,6 +14328,11 @@
14077
14328
  "mm",
14078
14329
  "deg"
14079
14330
  ]
14331
+ },
14332
+ "property": {
14333
+ "not": {
14334
+ "const": "partial_outline_size"
14335
+ }
14080
14336
  }
14081
14337
  },
14082
14338
  "required": [
@@ -14105,6 +14361,50 @@
14105
14361
  }
14106
14362
  }
14107
14363
  }
14364
+ },
14365
+ {
14366
+ "if": {
14367
+ "properties": {
14368
+ "property": {
14369
+ "const": "partial_outline_size"
14370
+ }
14371
+ },
14372
+ "required": [
14373
+ "property"
14374
+ ]
14375
+ },
14376
+ "then": {
14377
+ "required": [
14378
+ "frame"
14379
+ ],
14380
+ "properties": {
14381
+ "unit": {
14382
+ "const": "mm"
14383
+ },
14384
+ "subject": {
14385
+ "enum": [
14386
+ "device_outline",
14387
+ "module_outline"
14388
+ ]
14389
+ },
14390
+ "value": {
14391
+ "type": "array",
14392
+ "items": {
14393
+ "oneOf": [
14394
+ {
14395
+ "type": "number",
14396
+ "exclusiveMinimum": 0
14397
+ },
14398
+ {
14399
+ "type": "null"
14400
+ }
14401
+ ]
14402
+ },
14403
+ "minItems": 3,
14404
+ "maxItems": 3
14405
+ }
14406
+ }
14407
+ }
14108
14408
  }
14109
14409
  ]
14110
14410
  }
@@ -45,9 +45,13 @@ npm run build:hardware-search-index -- \
45
45
  正常响应的 `retrieval_mode` 为 `category_index`。每个槽位同时返回 `available_documents`、`indexed_candidates` 和 `fetched_documents`,用于核对“索引看了多少、全文实际下载多少”。
46
46
 
47
47
 
48
- ## 数据库尺寸快照 v1
48
+ ## 数据库尺寸快照与完整度 v2
49
49
 
50
- 数据库导出格式为 `abelien.component-dimensions.v1`,不是可手填的 Wiki 事实。`records` 按 component_id 的 Unicode 编码顺序排序且不得重复。每项包含 component_id、revision、dimensions_mm(正有限三元组或 null)、dimension_basis(measured/datasheet/estimate/unknown)、dimension_geometry(solid_box/bounding_box/unknown),可含 evidence_ref。revision 是去掉 revision 的记录递归按键排序、无空格 UTF-8 JSON 的 SHA-256 十六进制;snapshot_id 同法哈希整个 records 数组。缺尺寸必须 null/unknown/unknown。占位、默认、未证明的库尺寸不能升级成 measured 或 datasheet;solid_box 只能来自明确形体证据,不从 AABB、名称或占位 CAD 推断。
50
+ 2026-10-19 起新导出采用 `abelien.component-dimensions.v2`。资料只评价 `data_completeness={complete,filled,total,missing}`,分母为 `x_mm / y_mm / z_mm / source_ref` 四项;来源引用可以指向数据库观察、厂家资料或测量记录。尺寸保留局部轴次序:有限正数轴保留,缺轴为 null,全缺为 null。例如 `[10,null,3]` 有来源引用时为 3/4、缺 y_mm。4/4 表示这四项齐全。部分轴以 partial_outline_size 事实保留,结构交接的 partial_dimensions_mm 与完整度原样保留;完整三轴才作为可计算的 dimensions_mm。
51
+
52
+ 每项包含 component_id、revision、dimensions_mm、dimension_basis(measured/datasheet/estimate/catalog)、dimension_geometry(solid_box/bounding_box/null)、data_completeness,可含 evidence_ref。catalog 表示已有资料记录,不是可信等级;占位 CAD 标签和来源记录不完整都不抹掉已有三轴。只有缺轴才不能执行三维计算。新记录不输出 unknown 来源状态。
53
+
54
+ revision 是不含自身的完整记录规范 JSON 摘要,包含 data_completeness;snapshot_id 哈希按 component_id 码元顺序排列的 records。格式、完整度计数与摘要都校验,不能自填 complete=true。v2 的 dimension_source 额外带 `record_schema: abelien.component-dimensions.v2`,用于选择正确的记录摘要字段。历史 v1 按其原始字段与摘要只读验证,不能就地改写历史快照。
51
55
 
52
56
  ```bash
53
57
  npm run build:hardware-search-index -- \
@@ -58,11 +62,11 @@ npm run build:hardware-search-index -- \
58
62
 
59
63
  source 与 output 须是互不嵌套的目录。每个 Wiki record_id 必须命中数据库导出,缺行失败;多余数据库行允许存在。构建器保留原人工 frontmatter 和正文,仅在 output/wiki 生成尺寸字段及来源,原文件不改。输出路径为 `wiki/components/<snapshot_id>/<content_sha>/<原相对路径>`,Manifest 与导出另存;catalog 指向不可变 `wiki/snapshots/<manifest_sha>/` 清单和数据库快照。再次构建已生成源时会核对 `_component-dimensions.json` 和全部尺寸字段;没有快照却手填尺寸、摘要不符或尺寸篡改均拒绝。
60
64
 
61
- 新增 dimension_source/dimensions_mm 以单行严格 JSON 写入并解析(包括有限科学计数值);原有 capability_coverage 等 YAML inline map 沿用旧解析语义,不因尺寸扩展改写或拒绝。
65
+ 新增 dimension_source/dimensions_mm/data_completeness 以单行严格 JSON 写入并解析(包括有限科学计数值);原有 capability_coverage 等 YAML inline map 沿用旧解析语义,不因尺寸扩展改写或拒绝。
62
66
 
63
- 候选和 selected_models 携带 dimensions_mm、dimension_basis、dimension_geometry、dimension_source={component_id,revision,snapshot_id,evidence_ref?}、dimension_check={status,decision_required,reasons,method}。status 只表达粗筛装配结果:clear 为所有粗筛通过,risk 为至少一项失败但不构成证明,incompatible 为用户 hard 上限+measured/datasheet 尺寸下的证明,unknown 为无法判定;依据与上限权威仍看 dimension_basis 和 limit source,不另编码进 status。decision_required 仅在用户 hard 上限+measured/datasheet 尺寸且轴对齐装法全部失败时为 true。索引读入时每条 Wiki sha256 必须存在且合法;即使该行会被尺寸剔除,也不能缺 hash。实际抓取时验证正文 hash、身份、分类及全部尺寸元数据与索引相同。source_snapshot 包含 catalog 和实际分片内容摘要,不以 ETag 代替内容身份。
67
+ 候选和 selected_models 携带 dimensions_mm、dimension_basis、dimension_geometry、dimension_source={component_id,revision,snapshot_id,evidence_ref?,record_schema?}、data_completeness、dimension_check={status,decision_required,reasons,method}。status 只表达粗筛装配结果:clear 为所有粗筛通过,risk 为至少一项失败但不构成证明,incompatible 为用户 hard 上限+measured/datasheet 尺寸下的证明,incomplete 为实际缺轴(附完整度和缺项),unknown 只用于缺少容器约束或数值范围无法计算;来源类型与上限依据仍看 dimension_basis 和 limit source,不另编码进 status。decision_required 仅在用户 hard 上限+measured/datasheet 尺寸且轴对齐装法全部失败时为 true。索引读入时每条 Wiki sha256 必须存在且合法;即使该行会被尺寸剔除,也不能缺 hash。实际抓取时验证正文 hash、身份、分类及全部尺寸元数据与索引相同。source_snapshot 包含 catalog 和实际分片内容摘要,不以 ETag 代替内容身份。
64
68
 
65
- 旧 v1 索引缺内容 hash 必须重新构建,迁移开关也不绕过 hash;缺尺寸或缺 geometry 的旧条目仍可读,但 dimension_check=unknown,不获得 hard rejection 或 clear。新索引为 legacy 无尺寸记录显式输出 null/unknown。搜索保留所有 unknown 和 estimate 候选;`dimension_screen` 报 evaluated/rejected/retained/demoted 和逐个硬拒绝原因。按相关度排序后,risk 候选保留但不占 Top-K 名额,因此每个 risk 会多带入一个可能装得下的替补,总抓取数不超过 OSS_MAX_FULL_WIKI_FETCH_PER_SLOT;返回列表先列非 risk、后列 risk,各层内保持相关度顺序,unknown 不降级。`all_indexed_candidates_rejected` 仅指该槽位已评估分类索引,不能说所有硬件都不适用。
69
+ 旧 v1 索引缺内容 hash 必须重新构建,迁移开关也不绕过 hash。旧条目有完整三轴时直接粗筛,来源或形状标签不会清空数值;没有实心形体记录时只按包络。实际缺轴记 incomplete 并保留候选,不降级;`dimension_screen` 报 evaluated/rejected/retained/demoted 和逐个硬拒绝原因。按相关度排序后,risk 候选保留但不占 Top-K 名额,因此每个 risk 会多带入一个可能装得下的替补,总抓取数不超过 OSS_MAX_FULL_WIKI_FETCH_PER_SLOT;返回列表先列非 risk、后列 risk,各层内保持相关度顺序,unknown 不降级。`all_indexed_candidates_rejected` 仅指该槽位已评估分类索引,不能说所有硬件都不适用。
66
70
 
67
71
  ## 尺寸判定与占用边界
68
72
 
@@ -70,7 +74,7 @@ source 与 output 须是互不嵌套的目录。每个 Wiki record_id 必须命
70
74
 
71
75
  槽位 `fit_envelope` 是结构分区给该槽位的额外容器,形状规则同上:basis=locked 不是证明(分区由结构声明、无可复核出处),可信尺寸放不下时记 risk 且 decision_required=true、从不硬拒绝,原因带 `basis: locked`;basis=inferred 视同非硬边界;原因以 `limit_id=fit:<slot_id>` 标出,有 zone 时带 `zone`。没有 fit_envelope 的槽位判定结果不变。
72
76
 
73
- 只有 user+hard 边界和 measured/datasheet 组件可硬拒绝;locked 分区只要求用户裁决。solid_box 可用最小边、对角线、实体体积三项必要条件;任意 bounding_box 只可用最大支撑跨度超过容器最大弦长,不能用包围盒最小边、对角线或体积。六轴置换、圆柱 footprint 只是可装下粗筛,失败是 risk,未知形体是 unknown。clear 只表示单件粗筛,不代表多件装配、CAD 或工程通过。
77
+ 只有 user+hard 边界和 measured/datasheet 组件可硬拒绝;locked 分区只要求用户裁决。solid_box 可用最小边、对角线、实体体积三项必要条件;任意 bounding_box 只可用最大支撑跨度超过容器最大弦长,不能用包围盒最小边、对角线或体积。六轴置换、圆柱 footprint 只是可装下粗筛,失败是 risk;没有实心形体记录时按包络判据。clear 只表示单件粗筛,不代表多件装配、CAD 或工程通过。
74
78
 
75
79
 
76
80
  新域包 hardware 1.2.0 / selection 0.5.0 / workspace 1.3.0 使用此加法契约。已有持久结果只读原样;旧 workflow JSON 摘要不固定模块代码,因此不可用旧定义配新包宣称旧行为仍相同。宿主必须固定完整发布包,为尺寸筛选开新运行,不能原地改写旧 CAD 输入或已失败/未知副作用。
@@ -203,7 +203,7 @@ array<Identifier>;3 项。
203
203
  | `subject` | Subject | 是 | 事实描述的对象。显示有效区、模组 PCB、裸芯片、完整设备外形是不同对象,不共享一个含糊的“尺寸”。尺寸适配只认 device_outline 与 module_outline |
204
204
  | `value` | 任意 | 是 | — |
205
205
  | `unit` | Unit | 是 | 受控单位。px 用来如实记录没有尺度依据的读图结果,不能当毫米用;none 用于无量纲值或结构化记录 |
206
- | `basis` | Basis | 是 | 事实依据:manufacturer 厂商资料(关联具体型号行、页面或图纸位置);measured 实测(关联测量记录、被测对象与方法);estimate 估算;engineering_design 工程设计决定(预留、壁厚、假设尺寸,不能回写成厂商规格);unknown 来源或可信度不明 |
206
+ | `basis` | Basis | 是 | 事实来源类型:manufacturer 厂商资料;measured 测量记录;estimate 估算;engineering_design 工程设计;recorded 库内或既有资料记录。unknown 仅兼容历史记录,新资料按完整度列明缺项 |
207
207
  | `source_ref` | null / Ref | 是 | — |
208
208
  | `locator` | null / object | 是 | — |
209
209
  | `conditions` | object | 是 | — |
@@ -344,7 +344,7 @@ string;受控单位。px 用来如实记录没有尺度依据的读图结果
344
344
 
345
345
  ### Basis
346
346
 
347
- string;事实依据:manufacturer 厂商资料(关联具体型号行、页面或图纸位置);measured 实测(关联测量记录、被测对象与方法);estimate 估算;engineering_design 工程设计决定(预留、壁厚、假设尺寸,不能回写成厂商规格);unknown 来源或可信度不明;取值 `"manufacturer"` / `"measured"` / `"estimate"` / `"engineering_design"` / `"unknown"`。
347
+ string;事实来源类型:manufacturer 厂商资料;measured 测量记录;estimate 估算;engineering_design 工程设计;recorded 库内或既有资料记录。unknown 仅兼容历史记录,新资料按完整度列明缺项;取值 `"manufacturer"` / `"measured"` / `"estimate"` / `"engineering_design"` / `"recorded"` / `"unknown"`。
348
348
 
349
349
  ### GeometryFrame
350
350
 
@@ -243,7 +243,7 @@ array<Identifier>;3 项。
243
243
  | `subject` | Subject | 是 | 事实描述的对象。显示有效区、模组 PCB、裸芯片、完整设备外形是不同对象,不共享一个含糊的“尺寸”。尺寸适配只认 device_outline 与 module_outline |
244
244
  | `value` | 任意 | 是 | — |
245
245
  | `unit` | Unit | 是 | 受控单位。px 用来如实记录没有尺度依据的读图结果,不能当毫米用;none 用于无量纲值或结构化记录 |
246
- | `basis` | Basis | 是 | 事实依据:manufacturer 厂商资料(关联具体型号行、页面或图纸位置);measured 实测(关联测量记录、被测对象与方法);estimate 估算;engineering_design 工程设计决定(预留、壁厚、假设尺寸,不能回写成厂商规格);unknown 来源或可信度不明 |
246
+ | `basis` | Basis | 是 | 事实来源类型:manufacturer 厂商资料;measured 测量记录;estimate 估算;engineering_design 工程设计;recorded 库内或既有资料记录。unknown 仅兼容历史记录,新资料按完整度列明缺项 |
247
247
  | `source_ref` | null / Ref | 是 | — |
248
248
  | `locator` | null / object | 是 | — |
249
249
  | `conditions` | object | 是 | — |
@@ -379,7 +379,7 @@ string;受控单位。px 用来如实记录没有尺度依据的读图结果
379
379
 
380
380
  ### Basis
381
381
 
382
- string;事实依据:manufacturer 厂商资料(关联具体型号行、页面或图纸位置);measured 实测(关联测量记录、被测对象与方法);estimate 估算;engineering_design 工程设计决定(预留、壁厚、假设尺寸,不能回写成厂商规格);unknown 来源或可信度不明;取值 `"manufacturer"` / `"measured"` / `"estimate"` / `"engineering_design"` / `"unknown"`。
382
+ string;事实来源类型:manufacturer 厂商资料;measured 测量记录;estimate 估算;engineering_design 工程设计;recorded 库内或既有资料记录。unknown 仅兼容历史记录,新资料按完整度列明缺项;取值 `"manufacturer"` / `"measured"` / `"estimate"` / `"engineering_design"` / `"recorded"` / `"unknown"`。
383
383
 
384
384
  ### GeometryFrame
385
385
 
@@ -238,7 +238,7 @@ string;sha256 小写十六进制(64 位,不带 sha256: 前缀)。对 JSO
238
238
  | `subject` | Subject | 是 | 事实描述的对象。显示有效区、模组 PCB、裸芯片、完整设备外形是不同对象,不共享一个含糊的“尺寸”。尺寸适配只认 device_outline 与 module_outline |
239
239
  | `value` | 任意 | 是 | — |
240
240
  | `unit` | Unit | 是 | 受控单位。px 用来如实记录没有尺度依据的读图结果,不能当毫米用;none 用于无量纲值或结构化记录 |
241
- | `basis` | Basis | 是 | 事实依据:manufacturer 厂商资料(关联具体型号行、页面或图纸位置);measured 实测(关联测量记录、被测对象与方法);estimate 估算;engineering_design 工程设计决定(预留、壁厚、假设尺寸,不能回写成厂商规格);unknown 来源或可信度不明 |
241
+ | `basis` | Basis | 是 | 事实来源类型:manufacturer 厂商资料;measured 测量记录;estimate 估算;engineering_design 工程设计;recorded 库内或既有资料记录。unknown 仅兼容历史记录,新资料按完整度列明缺项 |
242
242
  | `source_ref` | null / Ref | 是 | — |
243
243
  | `locator` | null / object | 是 | — |
244
244
  | `conditions` | object | 是 | — |
@@ -300,7 +300,7 @@ string;受控单位。px 用来如实记录没有尺度依据的读图结果
300
300
 
301
301
  ### Basis
302
302
 
303
- string;事实依据:manufacturer 厂商资料(关联具体型号行、页面或图纸位置);measured 实测(关联测量记录、被测对象与方法);estimate 估算;engineering_design 工程设计决定(预留、壁厚、假设尺寸,不能回写成厂商规格);unknown 来源或可信度不明;取值 `"manufacturer"` / `"measured"` / `"estimate"` / `"engineering_design"` / `"unknown"`。
303
+ string;事实来源类型:manufacturer 厂商资料;measured 测量记录;estimate 估算;engineering_design 工程设计;recorded 库内或既有资料记录。unknown 仅兼容历史记录,新资料按完整度列明缺项;取值 `"manufacturer"` / `"measured"` / `"estimate"` / `"engineering_design"` / `"recorded"` / `"unknown"`。
304
304
 
305
305
  ### GeometryFrame
306
306
 
@@ -65,15 +65,15 @@ verified 只代表同源、完整数量和有归属证据的 Agent 选型判断
65
65
 
66
66
  ## 结构化尺寸与正式门禁
67
67
 
68
- limits 可附 envelope(形状与字段见 clarify 的 Requirements 定义)。hardware.search 在分类所有索引记录上先筛尺寸再 Top-K,未知和估算保留。hardware.select 读取冻结 recall 并核对 request_digest、正文 SHA-256 后,复用纯判定器重算,忽略模型伪造的尺寸、来源、名称和 dimension_check。incompatible 以 VALIDATION 拒绝所选件,必须选其他存活候选;dimension_check.decision_required=true(用户 hard 上限+measured/datasheet 尺寸,且轴对齐装法全部失败,仍不足以证明放不下)时加入 DIMENSION_DECISION_REQUIRED 并返回 needs_confirmation,模型引用、确认或机械 verified 不能覆盖。unknown、估算尺寸、system/preference 上限或估算壁厚下的 risk 只随 selected_models.dimension_check 提示,不进入 unknowns,也不单独阻止 verified;尺寸限制仍须经原 constraint_checks 的 Wiki 证据门。
68
+ limits 可附 envelope(形状与字段见 clarify 的 Requirements 定义)。hardware.search 在分类所有索引记录上先筛尺寸再 Top-K,实际缺轴和估算保留;资料完整度按已填/应填及缺项输出,已有数值不因历史来源标签丢失。hardware.select 读取冻结 recall 并核对 request_digest、正文 SHA-256 后,复用纯判定器重算,忽略模型伪造的尺寸、来源、名称和 dimension_check。incompatible 以 VALIDATION 拒绝所选件,必须选其他存活候选;dimension_check.decision_required=true(用户 hard 上限+measured/datasheet 尺寸,且轴对齐装法全部失败,仍不足以证明放不下)时加入 DIMENSION_DECISION_REQUIRED 并返回 needs_confirmation,模型引用、确认或机械 verified 不能覆盖。unknown、估算尺寸、system/preference 上限或估算壁厚下的 risk 只随 selected_models.dimension_check 提示,不进入 unknowns,也不单独阻止 verified;尺寸限制仍须经原 constraint_checks 的 Wiki 证据门。
69
69
 
70
70
  槽位可附 `fit_envelope: {envelope, basis: locked|inferred, zone?}`,envelope 与 limits 的 envelope 同一校验,zone 为短标识;字段不合法以 VALIDATION 拒绝。它只对本槽位追加一个容器,原因的 `limit_id` 为 `fit:<slot_id>`,有 zone 时同时带 `zone`。locked 由结构声明、没有可复核出处,不是证明:可信尺寸放不下时只 risk 并 decision_required(返回 needs_confirmation,由用户在换件与放宽分区/外形间取舍),从不 incompatible;inferred 与 system/preference 上限相同(只 risk)。硬拒绝只属于 user+hard 上限。它属于结构输入,不进入 constraint_checks 的 expected ID,由判定器确定性复核;槽位已计入 request_digest,改分区须重新检索。只有 fit_envelope、没有产品 envelope 时也做尺寸检查。
71
71
 
72
72
  没有 envelope 时旧流程仍可在原 Wiki 证据范围 verified,但 selected_models.dimension_check 始终显式为 unknown(PRODUCT_ENVELOPE_MISSING;槽位有 fit_envelope 时除外),不能宣传尺寸检查通过。clear 也只表示单件粗筛;device_tested 仍 false。hardware.finalize 仍只返回 proposed/needs_confirmation 的提案,不创建硬件正式资源。
73
73
 
74
- 每个型号额外携带可信候选 title 派生的 name、dimensions_mm、dimension_basis、dimension_geometry、dimension_source 和 dimension_check;interfaces 只在候选存在时透传。bom_item_id 为 `selection-line-<24hex>`,以 slot_id/component_id 派生的稳定选型行身份,不冒称数据库 BOM 主键,不使用模型提供的 ID。
74
+ 每个型号额外携带可信候选 title 派生的 name、dimensions_mm、dimension_basis(来源类型)、dimension_geometry、dimension_source、data_completeness 和 dimension_check;interfaces 只在候选存在时透传。bom_item_id 为 `selection-line-<24hex>`,以 slot_id/component_id 派生的稳定选型行身份,不冒称数据库 BOM 主键,不使用模型提供的 ID。
75
75
 
76
- 有 envelope 时输出增加可选 occupancy:advisory=true、method、estimated_volume_mm3、unknown_lines、containers(limit_id/cavity_volume_mm3/ratio)。只统计 selected_models 的实际数量,按 bom_item_id 去重,不再次加入 coverage_ledger 的整机内部覆盖。它是包围体积估算,非装箱证明;unknown 基础的占位尺寸不计入体积,仅保留 unknown_lines;全未知时不输出容器密度。部分未知时体积/比例只含已知或显式估算行,不代表整体密度。浮点溢出/下溢等不可表示的几何量保持 unknown,无法表示的体积或比例省略,不序列化 NaN/Infinity;没有隐含硬阈值。工具函数只在调用方显式提供 occupancy_warning_ratio 策略时给 warning,默认没有告警阈值。接入方须接受这一可选加法,但不得将 occupancy 或 ratio 作为通过/拒绝权威。
76
+ 有 envelope 时输出增加可选 occupancy:advisory=true、method、estimated_volume_mm3、unknown_lines、containers(limit_id/cavity_volume_mm3/ratio)。只统计 selected_models 的实际数量,按 bom_item_id 去重,不再次加入 coverage_ledger 的整机内部覆盖。它是包围体积估算,非装箱证明;所有完整三轴都计入体积,包括既有库值和历史来源标签的尺寸;unknown_lines 是旧线协议字段,现只统计实际缺轴、数量缺失或不可表示的行,不是来源可信状态。全缺尺寸时不输出容器密度,部分缺失时只汇总可计算行。浮点溢出/下溢等不可表示的几何量保持 unknown,无法表示的体积或比例省略,不序列化 NaN/Infinity;没有隐含硬阈值。工具函数只在调用方显式提供 occupancy_warning_ratio 策略时给 warning,默认没有告警阈值。接入方须接受这一可选加法,但不得将 occupancy 或 ratio 作为通过/拒绝权威。
77
77
 
78
78
  ## 电气兼容与兼容报告
79
79