soma-core 2.2.4 → 2.2.6

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 (259) hide show
  1. package/README.md +5 -6
  2. package/bin/soma.cjs +2 -2
  3. package/core/build/compiler/flat-page.ts +16 -0
  4. package/core/build/compiler/full-manifest-builder.ts +0 -3
  5. package/core/build/compiler/page-assets.ts +0 -1
  6. package/core/build/compiler/page-closure.ts +245 -0
  7. package/core/build/compiler/page-declaration-compiler.ts +2 -5
  8. package/core/build/compiler/soma-precompile.js +1848 -3244
  9. package/core/build/compiler/soma-precompile.ts +4 -7
  10. package/core/build/component-tree/artifact-codec.ts +4 -8
  11. package/core/build/lsp/soma-declaration.cjs +1 -1
  12. package/core/build/lsp/std-completion.generated.json +3 -3
  13. package/core/client/a11y/a11y-config.ts +2 -1
  14. package/core/client/a11y/dom-id.ts +1 -1
  15. package/core/client/base/SomaHttpClient.ts +11 -3
  16. package/core/client/base/SomaPageRootBase.ts +6 -0
  17. package/core/client/base/defineSomaView.ts +178 -0
  18. package/core/client/base/index.ts +13 -0
  19. package/core/client/base/view-context.ts +328 -0
  20. package/core/client/behavior/adapter-collection.ts +2 -2
  21. package/core/client/compiler/manifest-compiler.ts +5 -36
  22. package/core/client/component/component-definition.types.ts +2 -1
  23. package/core/client/component/component-manager.ts +110 -20
  24. package/core/client/component/structure-adapter.ts +3 -7
  25. package/core/client/container/SomaContainerAdapter.ts +9 -1
  26. package/core/client/data/data-object-resolver.ts +516 -181
  27. package/core/client/data/data-write-actions.ts +79 -15
  28. package/core/client/data/format-config.ts +3 -1
  29. package/core/client/data/region-scope-port.ts +11 -0
  30. package/core/client/engine/asset-resolver.ts +2 -5
  31. package/core/client/engine/dom-renderer.ts +7 -40
  32. package/core/client/engine/event-engine.ts +1 -105
  33. package/core/client/engine/property-watcher.ts +1 -1
  34. package/core/client/engine/reactive-proxy.ts +78 -17
  35. package/core/client/engine/runtime-builder.ts +0 -14
  36. package/core/client/engine/scope-resolver.ts +18 -0
  37. package/core/client/engine/soma-bootstrap.ts +385 -98
  38. package/core/client/engine/style-binder.ts +49 -106
  39. package/core/client/engine/timer-engine.ts +11 -1
  40. package/core/client/host-bridge/load-host-domain-class.ts +2 -1
  41. package/core/client/infra/http/SomaHttpService.ts +15 -4
  42. package/core/client/infra/i18n/pack-locales.ts +2 -2
  43. package/core/client/mount/domain-rule.ts +7 -3
  44. package/core/client/mount/mount-page.ts +38 -5
  45. package/core/client/mount/types.ts +2 -0
  46. package/core/client/parser/confirm-spec.ts +1 -1
  47. package/core/client/parser/data-config-parser.ts +27 -210
  48. package/core/client/parser/pipeline-parser.ts +14 -59
  49. package/core/client/parser/style-config-parser.ts +101 -95
  50. package/core/client/parser/timer-parser.ts +21 -0
  51. package/core/client/parser/ui-config-parser.ts +64 -12
  52. package/core/client/registry/declaration-renderer.ts +1 -1
  53. package/core/client/runtime/SomaRuntimeServices.ts +2 -1
  54. package/core/client/runtime/SomaSnapshotStore.ts +5 -0
  55. package/core/client/security/url-guard.ts +71 -11
  56. package/core/client/validation/async-check-registry.ts +2 -1
  57. package/core/client/validation/contract-validator.ts +2 -6
  58. package/core/client/validation/field-rules.ts +3 -13
  59. package/core/client/validation/object-rules.ts +2 -10
  60. package/core/index.ts +1 -35
  61. package/core/inspect/check-product.ts +5 -5
  62. package/core/inspect/runtime.ts +2 -1
  63. package/core/server/api/dispatch-service-api.ts +35 -36
  64. package/core/server/api/load-host-service.ts +5 -4
  65. package/core/server/compile-port.ts +1 -1
  66. package/core/server/host/app-config-composer.ts +2 -1
  67. package/core/server/host/host-assembly-entry.ts +1 -0
  68. package/core/server/host/host-assembly.ts +47 -3
  69. package/core/server/host/host-caller.ts +2 -1
  70. package/core/server/host/host-dir.ts +9 -0
  71. package/core/server/host/host-response-headers.ts +2 -1
  72. package/core/server/host/invoke-host-request-hook.ts +28 -4
  73. package/core/server/host/published-page-assets.ts +2 -1
  74. package/core/server/host/resolve-host-request-hook.ts +25 -7
  75. package/core/server/host/server-page-assets.ts +4 -4
  76. package/core/server/host/virtual-pages.ts +3 -2
  77. package/core/server/infra/cache/ServerFileCache.ts +79 -9
  78. package/core/server/registry/api-registry-store.ts +3 -1
  79. package/core/server/registry/declaration-precompiler.ts +0 -2
  80. package/core/server/registry/page-registry-repository.ts +2 -1
  81. package/core/server/registry/page-registry-store.ts +2 -1
  82. package/core/server/registry/registry-error.ts +6 -1
  83. package/core/server/registry/registry-file-lock.ts +296 -23
  84. package/core/server/registry/request-body-limit.ts +3 -2
  85. package/core/server/registry/validation/declaration-safety-scan.ts +151 -27
  86. package/core/server/runtime-space/access-gate.ts +21 -7
  87. package/core/server/runtime-space/bindings.ts +3 -6
  88. package/core/server/runtime-space/dynamic-pages.ts +181 -49
  89. package/core/server/runtime-space/errors.ts +3 -0
  90. package/core/server/runtime-space/inject.ts +74 -15
  91. package/core/server/runtime-space/page-grants.ts +7 -1
  92. package/core/server/runtime-space/resolve.ts +66 -19
  93. package/core/server/runtime-space/store.ts +32 -3
  94. package/core/server/runtime-space/submit-steps.ts +2 -1
  95. package/core/server/runtime-space/types.ts +3 -1
  96. package/core/shared/component-tree-errors.ts +2 -1
  97. package/core/shared/contract-a11y.ts +1 -1
  98. package/core/shared/contract-sections.ts +2 -2
  99. package/core/shared/core-diagnostic-codes.ts +8 -0
  100. package/core/shared/declaration-keys.ts +1 -1
  101. package/core/shared/engines/engine-error.ts +2 -1
  102. package/core/shared/generation-error.ts +2 -1
  103. package/core/shared/page-envelope.ts +1 -1
  104. package/core/shared/pure-binding.ts +88 -0
  105. package/core/shared/registry-generated/diagnostic-registry-index.ts +16 -19
  106. package/core/shared/registry-generated/diagnostic-registry.ts +135 -177
  107. package/core/shared/registry-generated/limits.ts +49 -13
  108. package/core/shared/registry-generated/std-grammar-completion.ts +0 -4
  109. package/core/shared/registry-generated/std-grammar-views.ts +40 -10
  110. package/core/shared/registry-generated/std-grammar.ts +42 -20
  111. package/core/shared/soma-error.ts +36 -0
  112. package/core/shared/types/compile-port.types.ts +1 -1
  113. package/core/shared/types/data-config.types.ts +17 -17
  114. package/core/shared/types/engine.types.ts +0 -3
  115. package/core/shared/types/event.types.ts +1 -11
  116. package/core/shared/types/generation-error.types.ts +5 -1
  117. package/core/shared/types/host-assembly.types.ts +7 -1
  118. package/core/shared/types/manifest.types.ts +0 -3
  119. package/core/shared/types/region-scope.types.ts +5 -1
  120. package/core/shared/types/scope-manifest.types.ts +0 -2
  121. package/core/shared/types/style-config.types.ts +21 -21
  122. package/core/shared/types/ui-config.types.ts +4 -5
  123. package/core/shared/types/watcher.types.ts +1 -1
  124. package/dist/browser/runtime-bundle.manifest.json +11 -13
  125. package/dist/browser/soma-runtime.js +2567 -2696
  126. package/dist/core/index.cjs +5446 -5486
  127. package/dist/host-native/aot-builder.cjs +46 -1
  128. package/dist/host-native/native-server.cjs +4879 -4505
  129. package/dist/lsp/component-tree.cjs +5814 -7042
  130. package/dist/types/build/compiler/full-manifest-builder.d.ts +0 -2
  131. package/dist/types/build/compiler/page-closure.d.ts +21 -0
  132. package/dist/types/build/compiler/page-declaration-compiler.d.ts +2 -4
  133. package/dist/types/build/compiler/soma-precompile.d.ts +1 -3
  134. package/dist/types/build/component-tree/artifact-codec.d.ts +0 -2
  135. package/dist/types/client/a11y/a11y-config.d.ts +2 -1
  136. package/dist/types/client/base/SomaHttpClient.d.ts +1 -1
  137. package/dist/types/client/base/SomaPageRootBase.d.ts +5 -0
  138. package/dist/types/client/base/defineSomaView.d.ts +46 -0
  139. package/dist/types/client/base/index.d.ts +2 -0
  140. package/dist/types/client/base/view-context.d.ts +136 -0
  141. package/dist/types/client/behavior/adapter-collection.d.ts +1 -1
  142. package/dist/types/client/compiler/manifest-compiler.d.ts +0 -3
  143. package/dist/types/client/component/component-definition.types.d.ts +2 -1
  144. package/dist/types/client/component/component-manager.d.ts +29 -0
  145. package/dist/types/client/data/data-object-resolver.d.ts +91 -31
  146. package/dist/types/client/data/format-config.d.ts +2 -1
  147. package/dist/types/client/engine/dom-renderer.d.ts +1 -2
  148. package/dist/types/client/engine/event-engine.d.ts +0 -7
  149. package/dist/types/client/engine/reactive-proxy.d.ts +11 -4
  150. package/dist/types/client/engine/runtime-builder.d.ts +0 -4
  151. package/dist/types/client/engine/soma-bootstrap.d.ts +44 -6
  152. package/dist/types/client/engine/style-binder.d.ts +8 -4
  153. package/dist/types/client/host-bridge/load-host-domain-class.d.ts +2 -1
  154. package/dist/types/client/mount/domain-rule.d.ts +2 -0
  155. package/dist/types/client/mount/mount-page.d.ts +2 -1
  156. package/dist/types/client/mount/types.d.ts +2 -0
  157. package/dist/types/client/parser/data-config-parser.d.ts +6 -5
  158. package/dist/types/client/parser/style-config-parser.d.ts +7 -3
  159. package/dist/types/client/parser/timer-parser.d.ts +5 -0
  160. package/dist/types/client/parser/ui-config-parser.d.ts +6 -2
  161. package/dist/types/client/runtime/SomaSnapshotStore.d.ts +2 -0
  162. package/dist/types/client/security/url-guard.d.ts +14 -0
  163. package/dist/types/client/validation/async-check-registry.d.ts +2 -1
  164. package/dist/types/client/validation/object-rules.d.ts +0 -5
  165. package/dist/types/index.d.ts +2 -7
  166. package/dist/types/inspect/runtime.d.ts +2 -1
  167. package/dist/types/server/api/dispatch-service-api.d.ts +5 -0
  168. package/dist/types/server/api/load-host-service.d.ts +1 -1
  169. package/dist/types/server/compile-port.d.ts +1 -1
  170. package/dist/types/server/host/host-assembly-entry.d.ts +1 -1
  171. package/dist/types/server/host/host-assembly.d.ts +2 -0
  172. package/dist/types/server/host/host-dir.d.ts +2 -0
  173. package/dist/types/server/host/invoke-host-request-hook.d.ts +10 -3
  174. package/dist/types/server/host/published-page-assets.d.ts +2 -1
  175. package/dist/types/server/host/resolve-host-request-hook.d.ts +18 -5
  176. package/dist/types/server/host/server-page-assets.d.ts +2 -1
  177. package/dist/types/server/infra/cache/ServerFileCache.d.ts +8 -0
  178. package/dist/types/server/registry/declaration-precompiler.d.ts +0 -1
  179. package/dist/types/server/registry/registry-error.d.ts +5 -1
  180. package/dist/types/server/registry/registry-file-lock.d.ts +30 -0
  181. package/dist/types/server/registry/request-body-limit.d.ts +3 -2
  182. package/dist/types/server/registry/validation/declaration-safety-scan.d.ts +3 -0
  183. package/dist/types/server/runtime-space/access-gate.d.ts +7 -0
  184. package/dist/types/server/runtime-space/bindings.d.ts +3 -2
  185. package/dist/types/server/runtime-space/dynamic-pages.d.ts +6 -1
  186. package/dist/types/server/runtime-space/errors.d.ts +1 -1
  187. package/dist/types/server/runtime-space/resolve.d.ts +2 -0
  188. package/dist/types/server/runtime-space/store.d.ts +8 -1
  189. package/dist/types/server/runtime-space/submit-steps.d.ts +2 -1
  190. package/dist/types/server/runtime-space/types.d.ts +3 -1
  191. package/dist/types/shared/component-tree-errors.d.ts +2 -1
  192. package/dist/types/shared/core-diagnostic-codes.d.ts +1 -1
  193. package/dist/types/shared/declaration-keys.d.ts +1 -1
  194. package/dist/types/shared/engines/engine-error.d.ts +2 -1
  195. package/dist/types/shared/generation-error.d.ts +2 -1
  196. package/dist/types/shared/pure-binding.d.ts +48 -0
  197. package/dist/types/shared/registry-generated/diagnostic-registry.d.ts +119 -158
  198. package/dist/types/shared/registry-generated/limits.d.ts +40 -10
  199. package/dist/types/shared/registry-generated/std-grammar-completion.d.ts +0 -30
  200. package/dist/types/shared/registry-generated/std-grammar-views.d.ts +97 -23
  201. package/dist/types/shared/registry-generated/std-grammar.d.ts +109 -241
  202. package/dist/types/shared/soma-error.d.ts +15 -0
  203. package/dist/types/shared/types/data-config.types.d.ts +14 -16
  204. package/dist/types/shared/types/engine.types.d.ts +0 -3
  205. package/dist/types/shared/types/event.types.d.ts +1 -7
  206. package/dist/types/shared/types/generation-error.types.d.ts +1 -1
  207. package/dist/types/shared/types/host-assembly.types.d.ts +2 -0
  208. package/dist/types/shared/types/manifest.types.d.ts +0 -3
  209. package/dist/types/shared/types/region-scope.types.d.ts +4 -1
  210. package/dist/types/shared/types/scope-manifest.types.d.ts +0 -2
  211. package/dist/types/shared/types/style-config.types.d.ts +17 -19
  212. package/dist/types/shared/types/ui-config.types.d.ts +4 -5
  213. package/host-native/bin/host-native.cjs +22 -1
  214. package/host-native/client/browser-entry.ts +44 -9
  215. package/host-native/src/aot-builder.ts +52 -0
  216. package/host-native/src/host-prepare.ts +39 -5
  217. package/host-native/src/manifest-http.ts +2 -3
  218. package/host-native/src/native-server.ts +812 -174
  219. package/host-native/src/page-http.ts +3 -3
  220. package/host-native/src/public-packages.cjs +0 -1
  221. package/host-native/src/registry-handler.ts +12 -5
  222. package/host-native/src/static-file.ts +203 -53
  223. package/package.json +3 -2
  224. package/core/client/engine/step-runner.ts +0 -212
  225. package/core/client/engine/trigger-engine.ts +0 -55
  226. package/core/client/format/zoned.ts +0 -10
  227. package/core/client/parser/step-parser.ts +0 -359
  228. package/core/client/parser/trigger-parser.ts +0 -90
  229. package/core/client/parser/value-lang.ts +0 -340
  230. package/core/client/time/instant.ts +0 -2
  231. package/core/shared/calc/coerce.ts +0 -2
  232. package/core/shared/calc/errors.ts +0 -40
  233. package/core/shared/calc/evaluator.ts +0 -113
  234. package/core/shared/calc/index.ts +0 -11
  235. package/core/shared/calc/lexer.ts +0 -189
  236. package/core/shared/calc/parser.ts +0 -193
  237. package/core/shared/calc/typer.ts +0 -171
  238. package/core/shared/date-parts.ts +0 -2
  239. package/core/shared/show-when.ts +0 -77
  240. package/core/shared/types/step.types.ts +0 -91
  241. package/core/shared/types/trigger.types.ts +0 -14
  242. package/dist/types/client/engine/step-runner.d.ts +0 -42
  243. package/dist/types/client/engine/trigger-engine.d.ts +0 -16
  244. package/dist/types/client/format/zoned.d.ts +0 -1
  245. package/dist/types/client/parser/step-parser.d.ts +0 -23
  246. package/dist/types/client/parser/trigger-parser.d.ts +0 -13
  247. package/dist/types/client/parser/value-lang.d.ts +0 -63
  248. package/dist/types/client/time/instant.d.ts +0 -1
  249. package/dist/types/shared/calc/coerce.d.ts +0 -1
  250. package/dist/types/shared/calc/errors.d.ts +0 -14
  251. package/dist/types/shared/calc/evaluator.d.ts +0 -2
  252. package/dist/types/shared/calc/index.d.ts +0 -6
  253. package/dist/types/shared/calc/lexer.d.ts +0 -19
  254. package/dist/types/shared/calc/parser.d.ts +0 -43
  255. package/dist/types/shared/calc/typer.d.ts +0 -11
  256. package/dist/types/shared/date-parts.d.ts +0 -1
  257. package/dist/types/shared/show-when.d.ts +0 -21
  258. package/dist/types/shared/types/step.types.d.ts +0 -76
  259. package/dist/types/shared/types/trigger.types.d.ts +0 -12
@@ -114,12 +114,6 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
114
114
  readonly contexts: readonly ["state"];
115
115
  readonly writes: "member";
116
116
  readonly complete: true;
117
- }, {
118
- readonly file: "soma-core/core/shared/types/data-config.types.ts";
119
- readonly type: "SomaObjectVariants";
120
- readonly contexts: readonly ["variants"];
121
- readonly writes: "member";
122
- readonly complete: true;
123
117
  }, {
124
118
  readonly file: "soma-core/core/shared/types/session.types.ts";
125
119
  readonly type: "SomaSessionConfig";
@@ -167,11 +161,6 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
167
161
  readonly type: "SomaObjectConstraint";
168
162
  readonly contexts: readonly ["constraint"];
169
163
  readonly writes: "structural";
170
- }, {
171
- readonly file: "soma-core/core/shared/object-constraints.ts";
172
- readonly type: "SomaObjectConstraintWhen";
173
- readonly contexts: readonly ["constraint.when"];
174
- readonly writes: "structural";
175
164
  }];
176
165
  }, {
177
166
  readonly id: "facts";
@@ -548,11 +537,6 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
548
537
  readonly ref: "SOMA_VALIDATE_TRIGGERS";
549
538
  readonly values: readonly ["change", "blur", "submit"];
550
539
  readonly note: "写通道 validate_on 的校验时机:非空无重复列表";
551
- }, {
552
- readonly id: "show-when-presence-ops";
553
- readonly ref: "SOMA_SHOW_WHEN_PRESENCE_OPS";
554
- readonly values: readonly ["present", "blank"];
555
- readonly note: "Show when 对象形 { field, op, value? } 在谓词算子(predicate-ops)之外多出的有无值算子,不带 value:present = 非 null / undefined / 空白串 / 空数组(0 与 false 算有值,与动作 available_when.requires 同口径);blank = 相反。谓词里的 empty / not_empty 把 false 当空,口径不同";
556
540
  }, {
557
541
  readonly id: "url-schemes";
558
542
  readonly ref: "SOMA_URL_FIELD_SCHEMES";
@@ -789,7 +773,7 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
789
773
  }];
790
774
  readonly terminal: {
791
775
  readonly kind: "consumed";
792
- readonly readers: readonly ["soma-ui/src/data-kit/"];
776
+ readonly readers: readonly ["soma-core/core/client/data/"];
793
777
  };
794
778
  }, {
795
779
  readonly path: readonly [{
@@ -1080,54 +1064,6 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
1080
1064
  };
1081
1065
  }];
1082
1066
  readonly docSummary: "持久度(memory / runtime / registry)";
1083
- }, {
1084
- readonly id: "object.transform";
1085
- readonly context: "object";
1086
- readonly key: "transform";
1087
- readonly order: 2;
1088
- readonly origin: "base";
1089
- readonly surface: readonly ["standard"];
1090
- readonly value: {
1091
- readonly kind: "map";
1092
- readonly of: "string";
1093
- };
1094
- readonly default: null;
1095
- readonly sample: {
1096
- readonly value: {
1097
- readonly total_text: "total | money";
1098
- };
1099
- };
1100
- readonly carry: {
1101
- readonly transform: "ObjectTransform";
1102
- };
1103
- readonly prop: "transform";
1104
- readonly carriesTo: readonly [{
1105
- readonly path: readonly [{
1106
- readonly stage: "core-config";
1107
- readonly prop: "SomaDataObjectConfig.transform";
1108
- }];
1109
- readonly terminal: {
1110
- readonly kind: "consumed";
1111
- readonly readers: readonly ["soma-core/core/client/data/data-object-resolver.ts"];
1112
- };
1113
- }, {
1114
- readonly path: readonly [{
1115
- readonly stage: "core-config";
1116
- readonly prop: "SomaDataObjectConfig.transform";
1117
- }, {
1118
- readonly stage: "facts";
1119
- readonly prop: "SomaFieldFact.derived";
1120
- }];
1121
- readonly terminal: {
1122
- readonly kind: "consumed";
1123
- readonly readers: readonly ["soma-ui/src/compiler/need/object-facts.ts", "soma-ui/src/compiler/settle/style.ts"];
1124
- };
1125
- }];
1126
- readonly effect: {
1127
- readonly changes: readonly ["artifact"];
1128
- };
1129
- readonly docSummary: "取数后派生";
1130
- readonly status: "implemented";
1131
1067
  }, {
1132
1068
  readonly id: "poll.while";
1133
1069
  readonly context: "poll";
@@ -1251,7 +1187,7 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
1251
1187
  }];
1252
1188
  readonly terminal: {
1253
1189
  readonly kind: "consumed";
1254
- readonly readers: readonly ["soma-core/core/client/data/", "soma-ui/src/compiler/page/", "soma-ui/src/data-kit/"];
1190
+ readonly readers: readonly ["soma-core/core/client/data/"];
1255
1191
  };
1256
1192
  }, {
1257
1193
  readonly path: readonly [{
@@ -1545,7 +1481,7 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
1545
1481
  readonly id: "object.fields";
1546
1482
  readonly context: "object";
1547
1483
  readonly key: "fields";
1548
- readonly order: 3;
1484
+ readonly order: 2;
1549
1485
  readonly origin: "base";
1550
1486
  readonly surface: readonly ["standard"];
1551
1487
  readonly value: {
@@ -2124,7 +2060,7 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
2124
2060
  readonly id: "object.write";
2125
2061
  readonly context: "object";
2126
2062
  readonly key: "write";
2127
- readonly order: 5;
2063
+ readonly order: 4;
2128
2064
  readonly origin: "base";
2129
2065
  readonly surface: readonly ["standard"];
2130
2066
  readonly value: {
@@ -2450,57 +2386,6 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
2450
2386
  };
2451
2387
  }];
2452
2388
  readonly docSummary: "导航项描述器 [{ key, text, href, active, forceIntoMore, children, divider, actions, priority, parent, access, available, requires, on_unavailable, route_to, requires_secrets, unavailable_reason }](C54:不可用分流 hide / grey,requires_secrets 点名外部密钥,route_to / unavailable_reason 只在 grey 时有意义)";
2453
- }, {
2454
- readonly id: "object.predicates";
2455
- readonly context: "object";
2456
- readonly key: "predicates";
2457
- readonly order: 6;
2458
- readonly origin: "base";
2459
- readonly surface: readonly ["standard"];
2460
- readonly value: {
2461
- readonly kind: "map";
2462
- readonly of: "shape";
2463
- };
2464
- readonly default: null;
2465
- readonly sample: {
2466
- readonly value: {
2467
- readonly vip: {
2468
- readonly field: "level";
2469
- readonly op: "eq";
2470
- readonly value: "vip";
2471
- };
2472
- };
2473
- readonly root: {
2474
- readonly from: readonly [{
2475
- readonly api: "/api/orders";
2476
- }];
2477
- readonly fields: {
2478
- readonly level: {
2479
- readonly type: "text";
2480
- };
2481
- };
2482
- };
2483
- };
2484
- readonly carry: {
2485
- readonly transform: "ObjectPredicates";
2486
- };
2487
- readonly prop: "predicates";
2488
- readonly carriesTo: readonly [{
2489
- readonly path: readonly [{
2490
- readonly stage: "core-config";
2491
- readonly prop: "SomaDataObjectConfig.predicates";
2492
- }];
2493
- readonly terminal: {
2494
- readonly kind: "consumed";
2495
- readonly readers: readonly ["soma-core/core/client/data/data-object-resolver.ts"];
2496
- };
2497
- }];
2498
- readonly effect: {
2499
- readonly changes: readonly ["runtime"];
2500
- };
2501
- readonly docSummary: "具名条件";
2502
- readonly status: "implemented";
2503
- readonly note: "页内 objects: 不收(编译产物形态)";
2504
2389
  }, {
2505
2390
  readonly id: "field.rule.max";
2506
2391
  readonly context: "field.rule";
@@ -2760,7 +2645,7 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
2760
2645
  readonly id: "write.delete";
2761
2646
  readonly context: "write";
2762
2647
  readonly key: "delete";
2763
- readonly order: 9;
2648
+ readonly order: 7;
2764
2649
  readonly surface: readonly ["standard"];
2765
2650
  readonly value: {
2766
2651
  readonly kind: "shape";
@@ -2790,59 +2675,6 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
2790
2675
  readonly lsp: {
2791
2676
  readonly detail: "删除端点 { api, method?: DELETE },不带请求体";
2792
2677
  };
2793
- }, {
2794
- readonly id: "field.rule.when";
2795
- readonly context: "field.rule";
2796
- readonly key: "when";
2797
- readonly order: 9;
2798
- readonly origin: "extra";
2799
- readonly surface: readonly ["standard"];
2800
- readonly value: {
2801
- readonly kind: "shape";
2802
- readonly shape: "predicate";
2803
- };
2804
- readonly default: null;
2805
- readonly sample: {
2806
- readonly value: {
2807
- readonly field: "g";
2808
- readonly op: "eq";
2809
- readonly value: true;
2810
- };
2811
- readonly with: {
2812
- readonly required: true;
2813
- };
2814
- readonly root: {
2815
- readonly from: readonly [{
2816
- readonly api: "/api/orders";
2817
- }];
2818
- readonly fields: {
2819
- readonly g: {
2820
- readonly type: "bool";
2821
- };
2822
- readonly f: {
2823
- readonly type: "int";
2824
- readonly rules: readonly [{
2825
- readonly message: "提示";
2826
- }];
2827
- };
2828
- };
2829
- };
2830
- };
2831
- readonly carriesTo: readonly [{
2832
- readonly path: readonly [{
2833
- readonly stage: "core-config";
2834
- readonly prop: "SomaDataFieldRule.when";
2835
- }];
2836
- readonly terminal: {
2837
- readonly kind: "consumed";
2838
- readonly readers: readonly ["soma-core/core/client/validation/field-rules.ts", "soma-core/core/client/parser/data-config-parser.ts"];
2839
- };
2840
- }];
2841
- readonly effect: {
2842
- readonly changes: readonly ["runtime"];
2843
- };
2844
- readonly docSummary: "条件规则(谓词成立才参与)";
2845
- readonly status: "implemented";
2846
2678
  }, {
2847
2679
  readonly id: "page.envelope.locale";
2848
2680
  readonly context: "page.envelope";
@@ -2873,7 +2705,7 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
2873
2705
  readonly id: "write.validate_on";
2874
2706
  readonly context: "write";
2875
2707
  readonly key: "validate_on";
2876
- readonly order: 10;
2708
+ readonly order: 8;
2877
2709
  readonly surface: readonly ["standard"];
2878
2710
  readonly value: {
2879
2711
  readonly kind: "list";
@@ -2906,7 +2738,7 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
2906
2738
  readonly id: "write.failWhen";
2907
2739
  readonly context: "write";
2908
2740
  readonly key: "failWhen";
2909
- readonly order: 19;
2741
+ readonly order: 17;
2910
2742
  readonly surface: readonly ["standard"];
2911
2743
  readonly value: {
2912
2744
  readonly kind: "map";
@@ -2958,7 +2790,7 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
2958
2790
  readonly id: "write.messagePath";
2959
2791
  readonly context: "write";
2960
2792
  readonly key: "messagePath";
2961
- readonly order: 20;
2793
+ readonly order: 18;
2962
2794
  readonly surface: readonly ["standard"];
2963
2795
  readonly value: {
2964
2796
  readonly kind: "string";
@@ -3011,7 +2843,7 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
3011
2843
  readonly id: "write.timeoutMs";
3012
2844
  readonly context: "write";
3013
2845
  readonly key: "timeoutMs";
3014
- readonly order: 21;
2846
+ readonly order: 19;
3015
2847
  readonly surface: readonly ["standard"];
3016
2848
  readonly value: {
3017
2849
  readonly kind: "int";
@@ -3062,7 +2894,7 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
3062
2894
  readonly id: "field.rule.async";
3063
2895
  readonly context: "field.rule";
3064
2896
  readonly key: "async";
3065
- readonly order: 10;
2897
+ readonly order: 9;
3066
2898
  readonly origin: "extra";
3067
2899
  readonly surface: readonly ["standard"];
3068
2900
  readonly value: {
@@ -3125,7 +2957,7 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
3125
2957
  readonly id: "field.rule.severity";
3126
2958
  readonly context: "field.rule";
3127
2959
  readonly key: "severity";
3128
- readonly order: 11;
2960
+ readonly order: 10;
3129
2961
  readonly origin: "base";
3130
2962
  readonly surface: readonly ["standard"];
3131
2963
  readonly value: {
@@ -3215,7 +3047,7 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
3215
3047
  readonly id: "object.name";
3216
3048
  readonly context: "object";
3217
3049
  readonly key: "name";
3218
- readonly order: 13;
3050
+ readonly order: 10;
3219
3051
  readonly origin: "extra";
3220
3052
  readonly surface: readonly ["standard"];
3221
3053
  readonly value: {
@@ -3288,7 +3120,7 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
3288
3120
  readonly id: "object.poll";
3289
3121
  readonly context: "object";
3290
3122
  readonly key: "poll";
3291
- readonly order: 20;
3123
+ readonly order: 17;
3292
3124
  readonly origin: "extra";
3293
3125
  readonly surface: readonly ["standard"];
3294
3126
  readonly value: {
@@ -3342,70 +3174,11 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
3342
3174
  };
3343
3175
  readonly docSummary: "自动重取";
3344
3176
  readonly status: "implemented";
3345
- }, {
3346
- readonly id: "field.calc";
3347
- readonly context: "field";
3348
- readonly key: "calc";
3349
- readonly order: 6;
3350
- readonly origin: "base";
3351
- readonly surface: readonly ["standard"];
3352
- readonly value: {
3353
- readonly kind: "string";
3354
- };
3355
- readonly default: null;
3356
- readonly sample: {
3357
- readonly value: "[revenue] - [cost]";
3358
- readonly root: {
3359
- readonly from: readonly [{
3360
- readonly api: "/api/orders";
3361
- }];
3362
- readonly fields: {
3363
- readonly revenue: {
3364
- readonly type: "money";
3365
- };
3366
- readonly cost: {
3367
- readonly type: "money";
3368
- };
3369
- readonly f: {
3370
- readonly type: "money";
3371
- };
3372
- };
3373
- };
3374
- };
3375
- readonly carry: "passthrough";
3376
- readonly prop: "calc";
3377
- readonly carriesTo: readonly [{
3378
- readonly path: readonly [{
3379
- readonly stage: "core-config";
3380
- readonly prop: "SomaDataFieldConfig.calc";
3381
- }];
3382
- readonly terminal: {
3383
- readonly kind: "consumed";
3384
- readonly readers: readonly ["soma-core/core/client/data/", "soma-ui/src/compiler/certify/invariants/edit.ts", "soma-ui/src/compiler/page/region-scope.ts", "soma-ui/src/data-kit/"];
3385
- };
3386
- }, {
3387
- readonly path: readonly [{
3388
- readonly stage: "core-config";
3389
- readonly prop: "SomaDataFieldConfig.calc";
3390
- }, {
3391
- readonly stage: "facts";
3392
- readonly prop: "SomaFieldFact.derived";
3393
- }];
3394
- readonly terminal: {
3395
- readonly kind: "consumed";
3396
- readonly readers: readonly ["soma-ui/src/compiler/need/object-facts.ts", "soma-ui/src/compiler/settle/style.ts"];
3397
- };
3398
- }];
3399
- readonly effect: {
3400
- readonly changes: readonly ["artifact"];
3401
- };
3402
- readonly docSummary: "派生";
3403
- readonly status: "implemented";
3404
3177
  }, {
3405
3178
  readonly id: "field.default";
3406
3179
  readonly context: "field";
3407
3180
  readonly key: "default";
3408
- readonly order: 29;
3181
+ readonly order: 26;
3409
3182
  readonly origin: "extra";
3410
3183
  readonly surface: readonly ["standard"];
3411
3184
  readonly value: {
@@ -3439,6 +3212,101 @@ export declare const SOMA_PIPELINE_STD_GRAMMAR: {
3439
3212
  readonly docSummary: "新建初值";
3440
3213
  readonly status: "implemented";
3441
3214
  }];
3215
+ readonly pageForbiddenLogicKeys: {
3216
+ readonly title: "视觉页面不含逻辑语法:页面语法里禁止出现的逻辑键(三层分工:业务逻辑归业务对象,交互逻辑归展示对象,页面只做纯视觉翻译;见 knowledge/SOMA领域建模与组件编写准则.md §1.0)";
3217
+ readonly decidedAt: "2026-11-09";
3218
+ readonly keys: readonly [{
3219
+ readonly key: "calc";
3220
+ readonly was: "core 字段计算";
3221
+ }, {
3222
+ readonly key: "derive";
3223
+ readonly was: "foundation 字段级派生(K19)/ kit derive 模板";
3224
+ }, {
3225
+ readonly key: "derived";
3226
+ readonly was: "页面声明里的派生写法";
3227
+ }, {
3228
+ readonly key: "showWhen";
3229
+ readonly was: "条件显示";
3230
+ }, {
3231
+ readonly key: "hiddenWhen";
3232
+ readonly was: "条件隐藏";
3233
+ }, {
3234
+ readonly key: "disabledWhen";
3235
+ readonly was: "条件禁用";
3236
+ }, {
3237
+ readonly key: "requiredWhen";
3238
+ readonly was: "条件必填";
3239
+ }, {
3240
+ readonly key: "when";
3241
+ readonly was: "动作 when 条件 / show when 对象谓词 { field, op, value } / rules[].when 条件规则(纯路径字符串形 when 是纯绑定,放行)";
3242
+ readonly forbiddenShape: "object";
3243
+ }, {
3244
+ readonly key: "predicates";
3245
+ readonly scope: "standard";
3246
+ readonly was: "data.<对象>.predicates 具名谓词";
3247
+ }, {
3248
+ readonly key: "transform";
3249
+ readonly scope: "standard";
3250
+ readonly was: "data.<对象>.transform 取数后派生字段";
3251
+ }, {
3252
+ readonly key: "steps";
3253
+ readonly scope: "standard";
3254
+ readonly was: "_event 事件编排(when / switch / for_each / goto)";
3255
+ }, {
3256
+ readonly key: "triggers";
3257
+ readonly scope: "standard";
3258
+ readonly was: "_event triggers 条件触发器(condition + value)";
3259
+ }, {
3260
+ readonly key: "switch";
3261
+ readonly scope: "standard";
3262
+ readonly was: "_event steps 内 switch 条件分支";
3263
+ }, {
3264
+ readonly key: "for_each";
3265
+ readonly scope: "standard";
3266
+ readonly was: "_event steps 内 for_each 循环";
3267
+ }, {
3268
+ readonly key: "parallel";
3269
+ readonly scope: "standard";
3270
+ readonly was: "_event steps 内 parallel 并行编排";
3271
+ }];
3272
+ readonly pureBinding: {
3273
+ readonly title: "展示对象的值对页面只读:页面只做纯路径读取,不在页面里取反、比较、映射;需要判断的地方由展示对象直接给最终值(2026-11-10 裁决)";
3274
+ readonly negatedPath: {
3275
+ readonly code: "CORE-PAGE-NEGATE-FORBIDDEN";
3276
+ readonly prefix: "!";
3277
+ readonly positions: readonly ["show.when", "show.class 值", "show.props 值", "嵌套绑定 when"];
3278
+ readonly pathPattern: "^!\\s*[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*)+\\s*$";
3279
+ readonly was: "`!path` 取反前缀(when / class 条件路径 / 组件 props 值)";
3280
+ readonly remedy: "由展示对象另给相反的成员(如 remarkHidden),页面绑定它";
3281
+ };
3282
+ readonly styleComparison: {
3283
+ readonly code: "CORE-STYLE-COMPARE-FORBIDDEN";
3284
+ readonly keys: readonly ["condition", "value"];
3285
+ readonly positions: readonly ["_style states 条目", "_style transitions.active_state"];
3286
+ readonly was: "_style states 的 `condition: 路径` + `value` 比较 + `apply`,以及 transitions.active_state 的 condition + value";
3287
+ readonly remedy: "改写成类名档位绑定:`bind: page.成员` + `tiers: { 档位名: 类名 }`,成员的值就是档位名";
3288
+ };
3289
+ readonly styleTier: {
3290
+ readonly keys: readonly ["bind", "tiers"];
3291
+ readonly tierNamePattern: "^[a-z][a-z0-9_-]*$";
3292
+ readonly maxTiers: 8;
3293
+ readonly positions: readonly ["_style states.<锚点>", "_style transitions.<锚点>(trigger: active_state)"];
3294
+ readonly note: "bind 是纯路径(点分标识符,无取反 / 管道 / 运算符);tiers 是 档位名 到 类名串 的闭集映射,成员值不在档位内时不加任何类;档位名闭集 pattern 与个数上限读本节,页面不写比较";
3295
+ };
3296
+ readonly roleBy: {
3297
+ readonly code: "CORE-PAGE-ROLE-BY-INVALID";
3298
+ readonly pathPattern: "^[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*)*$";
3299
+ readonly positions: readonly ["bind.role_by"];
3300
+ readonly was: "bind.role_by 写了表达式 / 取反 / 管道 / 映射";
3301
+ readonly remedy: "role_by 只许纯路径:行字段的值直接作为模板名,匹配 data-soma-role=\"item:取值\";行数据自带模板名";
3302
+ };
3303
+ };
3304
+ readonly exemptContexts: readonly ["diagnostics", "diagnosticExamples", "rejected", "title", "basis", "was", "summary", "docSummary"];
3305
+ readonly exampleRoots: readonly ["soma-kit-demo/pages", "soma-kit/examples", "soma-ui/tests/fixtures/hosts", "soma-core-demo/ui", "soma-core-demo/pages"];
3306
+ readonly exampleFilePatterns: readonly ["_ui.yaml", ".kit.yaml", "_style.yaml"];
3307
+ readonly exampleSkipDirs: readonly ["node_modules", "negative", "__negative__"];
3308
+ readonly note: "forbiddenShape: 'object' = 只禁对象 / 列表形,值为字符串(纯路径绑定)放行;scope: 'standard' = 只在 core 标准格式(四件套 / 注入口)判定,不进 G83 的跨方言语法源与示例页扫描(方言同名键含义不同,如 steps 页面模式)";
3309
+ };
3442
3310
  readonly views: readonly [{
3443
3311
  readonly name: "SOMA_DATA_OBJECT_KEYS";
3444
3312
  readonly kind: "keys";
@@ -0,0 +1,15 @@
1
+ export declare class SomaError extends Error {
2
+ /**
3
+ * 错误码;由子类声明并赋值,基类不写入。
4
+ * 绝大多数子类用字符串码;注册中心错误(`RegistryError`)沿用 45xx 数字码,故类型放宽到 `string | number`,
5
+ * 子类可收窄为 `string` 或 `number`。读码的统一口径 `somaErrorCodeOf` 仍只认非空字符串(数字码读不出、不会被误当字符串码)。
6
+ */
7
+ readonly code?: string | number;
8
+ constructor(message?: string, options?: {
9
+ cause?: unknown;
10
+ });
11
+ }
12
+ /** 是否 SOMA 受控错误:`instanceof SomaError`,或(跨打包副本时)Error 且带非空字符串码 */
13
+ export declare function isSomaError(value: unknown): value is SomaError;
14
+ /** 读出错误码;不是 Error 或没有非空字符串码时返回 undefined */
15
+ export declare function somaErrorCodeOf(value: unknown): string | undefined;
@@ -1,4 +1,4 @@
1
- import type { SomaFieldPredicate, SomaNamedPredicates } from '../predicates';
1
+ import type { SomaFieldPredicate } from '../predicates';
2
2
  import type { SomaWriteActionName, SomaWriteOutcomeView } from './write-outcome-view.types';
3
3
  import type { SomaWriteOutcomeMeta } from './write.types';
4
4
  import { SOMA_STD_DOMAIN_FIELD_TYPES } from '../registry-generated/std-grammar-views';
@@ -56,8 +56,6 @@ export interface SomaDataFieldRule {
56
56
  severity?: SomaValidationSeverity;
57
57
  /** 校验失败提示文案 */
58
58
  message: string;
59
- /** 条件规则(`rules[].when`):对所在记录求值的字段谓词,成立才执行本条规则;没写 = 恒参与 */
60
- when?: SomaFieldPredicate;
61
59
  }
62
60
  /** 字段字典条目(驱动 UI 的元数据,全部可选) */
63
61
  export interface SomaDataFieldConfig {
@@ -71,12 +69,6 @@ export interface SomaDataFieldConfig {
71
69
  options?: SomaDataFieldOption[];
72
70
  /** 缺省值 */
73
71
  default?: unknown;
74
- /**
75
- * 派生列:`"[revenue] - [cost]"`。受限算式(方括号引用同对象字段、四则、比较、六个函数),
76
- * 解析期推出结果类型并与声明的 `type` 对账;取数收尾时由 core 算出来挂到记录上。
77
- * 派生字段是算出来的,提交时不能写它。
78
- */
79
- calc?: string;
80
72
  }
81
73
  /**
82
74
  * 单个取数来源:一个后端接口 + 参数 + 聚合位置。
@@ -181,19 +173,12 @@ export interface SomaDataObjectConfig {
181
173
  displayName?: string;
182
174
  /** 取数来源列表 */
183
175
  from: SomaDataSourceConfig[];
184
- /**
185
- * 派生字段:值为 "源字段路径 | 管道链"(复用 pipe-registry)。
186
- * 解析期已归一化为标准管道语法(`date: 'x'` → `date('x')`)。
187
- */
188
- transform?: Record<string, string>;
189
176
  /** 字段字典(字段名 → 字典条目) */
190
177
  fields?: Record<string, SomaDataFieldConfig>;
191
178
  /** 写通道声明;不给 = 该对象只读 */
192
179
  write?: SomaDataWriteConfig;
193
180
  /** 对象级轮询:服务端状态会自己变的对象(排队 → 生成中 → 已生成) */
194
181
  poll?: SomaObjectPoll;
195
- /** 具名谓词表:`{ 名字: 谓词 }`,条件规则 `{ ref: 名字 }` 复用 */
196
- predicates?: SomaNamedPredicates;
197
182
  /** 解析期提取:params 引用到的其他数据对象名(DAG 拓扑排序输入,不含自引用) */
198
183
  deps: string[];
199
184
  }
@@ -231,6 +216,17 @@ export type SomaCommandResult = {
231
216
  status?: number;
232
217
  fieldErrors?: Record<string, string>;
233
218
  };
219
+ /** 数据对象标准读状态 */
220
+ export type SomaDataReadState = 'idle' | 'loading' | 'ready' | 'error' | 'forbidden' | 'partial';
221
+ /** 数据对象完整读状态视图(同时以非枚举属性挂在数据对象自身上) */
222
+ export interface SomaDataReadStatus {
223
+ readonly readState: SomaDataReadState;
224
+ readonly loading: boolean;
225
+ readonly ready: boolean;
226
+ readonly errorMessage?: string;
227
+ readonly errorStatus?: number;
228
+ readonly retry?: () => Promise<void>;
229
+ }
234
230
  /**
235
231
  * 注入给组件的数据端口(services 白名单里的 `data`)。
236
232
  * 复杂度沉引擎:组件只做「收值 → 调 submit → 渲染返回的 fieldErrors」。
@@ -240,6 +236,8 @@ export interface SomaDataPort {
240
236
  getObject(name: string): unknown;
241
237
  /** 对象读状态:`idle` = 因 `from[].require` 的必填参数缺而跳过过请求;`ready` = 其余;未声明 / 数据层未就绪 = undefined */
242
238
  getObjectStatus?(name: string): 'idle' | 'ready' | undefined;
239
+ /** 对象完整读状态(含 loading / ready / error / forbidden / partial、错误信息、状态码与 retry) */
240
+ getObjectReadStatus?(name: string): SomaDataReadStatus | undefined;
243
241
  /** 字段字典(控件 / 校验来源) */
244
242
  getDict(name: string): Record<string, SomaDataFieldConfig>;
245
243
  /** 提交:剔只读字段、map/only、基础规则校验、version 令牌、构体、发请求、错误逆映射;从不抛 */
@@ -9,9 +9,6 @@ export interface BindingEntry {
9
9
  templateCache?: DocumentFragment;
10
10
  childShowConfig?: ShowMapping;
11
11
  attrName?: string;
12
- negate?: boolean;
13
- /** `when` 对象谓词(来自 SomaCompiledBinding.whenTest) */
14
- whenTest?: import('../show-when').SomaShowWhenTest;
15
12
  classRules?: Record<string, string>;
16
13
  /** 展示格式化管道链(text/attr 绑定,来自 SomaCompiledBinding.pipes) */
17
14
  pipes?: import('./scope-manifest.types').SomaPipeCall[];
@@ -2,9 +2,8 @@
2
2
  * 事件类型枚举
3
3
  * 定义 Pipeline DSL 支持的四种事件处理类型
4
4
  */
5
- import type { SomaStepGraph } from './step.types';
6
5
  import type { SomaScopeEventSpec } from './region-scope.types';
7
- export type EventType = 'NAV_STATIC' | 'NAV_ACTION' | 'UI_REFRESH' | 'UI_INTERACT' | 'ACTION' | 'SCOPE' | 'NOTIFY' | 'STEPS';
6
+ export type EventType = 'NAV_STATIC' | 'NAV_ACTION' | 'UI_REFRESH' | 'UI_INTERACT' | 'ACTION' | 'SCOPE' | 'NOTIFY';
8
7
  /**
9
8
  * UI 交互动作枚举
10
9
  * 用于 UI_INTERACT 类型的动作指令
@@ -48,11 +47,6 @@ export interface SomaConfirmSpec {
48
47
  * Pipeline DSL 解析器将 YAML 中的事件声明解析为此结构
49
48
  */
50
49
  export interface ParsedEvent {
51
- /**
52
- * 动作编排图(`type === 'STEPS'` 时有)。
53
- * 解析在 `step-parser`,执行在 `step-runner`;不带它的事件走原来的单管道路径。
54
- */
55
- steps?: SomaStepGraph;
56
50
  /** 目标元素的 data-soma-id 值 */
57
51
  somaId: string;
58
52
  /** DOM 事件类型(click, input, change, keydown 等) */
@@ -1,5 +1,5 @@
1
1
  import type { SomaSource } from './source.types';
2
- export declare const SOMA_GENERATION_ERROR_CODES: readonly ["ERR-BIZ-001", "ERR-BIZ-002", "ERR-BIZ-003", "ERR-BIZ-004", "ERR-BIZ-005", "ERR-BIZ-006", "ERR-BIZ-007", "ERR-BIZ-008", "ERR-BIZ-009", "ERR-BIZ-010", "ERR-BIZ-011", "ERR-BIZ-012", "ERR-BIZ-013", "ERR-BIZ-014", "ERR-BIZ-015", "ERR-BIZ-016", "ERR-BIZ-017", "ERR-BIZ-018", "ERR-BIZ-019", "ERR-PAGE-001", "ERR-PAGE-002", "ERR-PAGE-003", "ERR-GEN-001", "ERR-GEN-002", "ERR-GEN-003", "ERR-GEN-004", "ERR-GEN-005", "ERR-GEN-006", "ERR-GEN-007", "ERR-GEN-008", "ERR-GEN-009", "ERR-GEN-010", "ERR-GEN-011", "ERR-PAGE-004", "ERR-GEN-015", "ERR-GEN-016", "ERR-PAGE-005", "ERR-PAGE-006", "ERR-PAGE-007", "ERR-PAGE-008", "ERR-PAGE-009", "ERR-UNIT-001", "ERR-UNIT-002", "ERR-UNIT-003", "ERR-RUN-001", "ERR-RUN-002", "ERR-RUN-003", "ERR-PUB-001", "ERR-PUB-002", "ERR-PUB-003", "ERR-AI-001", "ERR-AI-002", "ERR-AI-003", "ERR-AI-004", "ERR-APP-001", "ERR-APP-002", "ERR-APP-003", "ERR-APP-004", "ERR-APP-005", "ERR-APP-006", "ERR-APP-007", "ERR-APP-008", "ERR-APP-009", "ERR-APP-010", "ERR-APP-011", "ERR-APP-012", "ERR-APP-013", "ERR-APP-014", "ERR-APP-015", "ERR-LOCALE-001", "ERR-LOCALE-002", "ERR-LOCALE-003"];
2
+ export declare const SOMA_GENERATION_ERROR_CODES: readonly ["ERR-BIZ-001", "ERR-BIZ-002", "ERR-BIZ-003", "ERR-BIZ-004", "ERR-BIZ-005", "ERR-BIZ-006", "ERR-BIZ-007", "ERR-BIZ-008", "ERR-BIZ-009", "ERR-BIZ-010", "ERR-BIZ-011", "ERR-BIZ-012", "ERR-BIZ-013", "ERR-BIZ-014", "ERR-BIZ-015", "ERR-BIZ-016", "ERR-BIZ-017", "ERR-BIZ-018", "ERR-PAGE-001", "ERR-PAGE-002", "ERR-PAGE-003", "ERR-GEN-001", "ERR-GEN-002", "ERR-GEN-003", "ERR-GEN-004", "ERR-GEN-005", "ERR-GEN-006", "ERR-GEN-007", "ERR-GEN-008", "ERR-GEN-009", "ERR-GEN-010", "ERR-GEN-011", "ERR-PAGE-004", "ERR-GEN-015", "ERR-GEN-016", "ERR-PAGE-005", "ERR-PAGE-006", "ERR-PAGE-007", "ERR-PAGE-008", "ERR-PAGE-009", "ERR-PAGE-010", "ERR-PAGE-011", "ERR-PAGE-012", "ERR-PAGE-013", "ERR-PAGE-014", "ERR-PAGE-015", "ERR-PAGE-016", "ERR-UNIT-001", "ERR-UNIT-002", "ERR-UNIT-003", "ERR-RUN-001", "ERR-RUN-002", "ERR-RUN-003", "ERR-PUB-001", "ERR-PUB-002", "ERR-PUB-003", "ERR-AI-001", "ERR-AI-002", "ERR-AI-003", "ERR-AI-004", "ERR-APP-001", "ERR-APP-002", "ERR-APP-003", "ERR-APP-004", "ERR-APP-005", "ERR-APP-006", "ERR-APP-007", "ERR-APP-008", "ERR-APP-009", "ERR-APP-010", "ERR-APP-011", "ERR-APP-012", "ERR-APP-013", "ERR-APP-014", "ERR-APP-015", "ERR-APP-016", "ERR-APP-017", "ERR-APP-018", "ERR-APP-019", "ERR-LOCALE-001", "ERR-LOCALE-002", "ERR-LOCALE-003"];
3
3
  export type SomaGenerationErrorCode = (typeof SOMA_GENERATION_ERROR_CODES)[number];
4
4
  /** 错误发生在哪一层(与错误码前缀一一对应,另加 `page` 表示页面编译层) */
5
5
  export type SomaGenerationLayer = 'biz' | 'page' | 'need' | 'generate' | 'unit' | 'certify' | 'run' | 'publish' | 'ai' | 'app' | 'locale';
@@ -4,6 +4,8 @@ export type SomaHostAssemblyRequestHook = (request: Request, context: {
4
4
  readonly kind: 'page' | 'api';
5
5
  readonly path: string;
6
6
  readonly pageHref?: string;
7
+ /** 原生宿主可选惰性读取入口;返回副本,限流并响应客户端断连。 */
8
+ readonly readBody?: () => Promise<Uint8Array>;
7
9
  }) => Response | undefined | Promise<Response | undefined>;
8
10
  /** 虚拟页登记项(形状同 `SomaVirtualPageRegistration`) */
9
11
  export interface SomaHostAssemblyVirtualPage {
@@ -10,9 +10,6 @@ export interface SomaCompiledBinding {
10
10
  dataPath: string;
11
11
  watchPaths: string[];
12
12
  attrName?: string;
13
- negate?: boolean;
14
- /** `when` 对象谓词(type 为 when 时;路径在 dataPath);缺省 = 字符串形的真值判定 */
15
- whenTest?: import('../show-when').SomaShowWhenTest;
16
13
  classRules?: Record<string, string>;
17
14
  childShowConfig?: ShowMapping;
18
15
  /** 静态提升标记:值在初始化后不会变化,不需要注册 watchPaths */