semantifold 0.3.0 → 0.5.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 (303) hide show
  1. package/README.md +61 -15
  2. package/build/index.d.ts +52 -2
  3. package/build/index.d.ts.map +1 -1
  4. package/build/index.js +60 -8
  5. package/build/src/artifact-path.d.ts +23 -1
  6. package/build/src/artifact-path.d.ts.map +1 -1
  7. package/build/src/artifact-path.js +45 -3
  8. package/build/src/artifacts.d.ts.map +1 -1
  9. package/build/src/artifacts.js +66 -1
  10. package/build/src/backends/android.d.ts +49 -0
  11. package/build/src/backends/android.d.ts.map +1 -0
  12. package/build/src/backends/android.js +1274 -0
  13. package/build/src/backends/c-validation.d.ts.map +1 -1
  14. package/build/src/backends/c-validation.js +7 -3
  15. package/build/src/backends/cpp-validation.d.ts.map +1 -1
  16. package/build/src/backends/cpp-validation.js +7 -3
  17. package/build/src/backends/csharp.js +7 -1
  18. package/build/src/backends/dart-runtime.d.ts +2 -0
  19. package/build/src/backends/dart-runtime.d.ts.map +1 -0
  20. package/build/src/backends/dart-runtime.js +41 -0
  21. package/build/src/backends/dart.d.ts +20 -0
  22. package/build/src/backends/dart.d.ts.map +1 -0
  23. package/build/src/backends/dart.js +321 -0
  24. package/build/src/backends/effects.d.ts +60 -0
  25. package/build/src/backends/effects.d.ts.map +1 -0
  26. package/build/src/backends/effects.js +746 -0
  27. package/build/src/backends/go.js +18 -4
  28. package/build/src/backends/identifiers.d.ts +36 -4
  29. package/build/src/backends/identifiers.d.ts.map +1 -1
  30. package/build/src/backends/identifiers.js +160 -10
  31. package/build/src/backends/index.d.ts.map +1 -1
  32. package/build/src/backends/index.js +27 -4
  33. package/build/src/backends/ios.d.ts +68 -0
  34. package/build/src/backends/ios.d.ts.map +1 -0
  35. package/build/src/backends/ios.js +1503 -0
  36. package/build/src/backends/java.d.ts.map +1 -1
  37. package/build/src/backends/java.js +429 -36
  38. package/build/src/backends/javascript.d.ts +6 -0
  39. package/build/src/backends/javascript.d.ts.map +1 -1
  40. package/build/src/backends/javascript.js +380 -24
  41. package/build/src/backends/kotlin-runtime.d.ts +3 -0
  42. package/build/src/backends/kotlin-runtime.d.ts.map +1 -0
  43. package/build/src/backends/kotlin-runtime.js +29 -0
  44. package/build/src/backends/kotlin.d.ts +33 -0
  45. package/build/src/backends/kotlin.d.ts.map +1 -0
  46. package/build/src/backends/kotlin.js +138 -0
  47. package/build/src/backends/native-validation.d.ts +2 -2
  48. package/build/src/backends/native-validation.d.ts.map +1 -1
  49. package/build/src/backends/native-validation.js +2 -2
  50. package/build/src/backends/ordered-expressions.d.ts.map +1 -1
  51. package/build/src/backends/ordered-expressions.js +39 -7
  52. package/build/src/backends/php-stdlib-support.d.ts +19 -0
  53. package/build/src/backends/php-stdlib-support.d.ts.map +1 -0
  54. package/build/src/backends/php-stdlib-support.js +227 -0
  55. package/build/src/backends/php.d.ts.map +1 -1
  56. package/build/src/backends/php.js +448 -33
  57. package/build/src/backends/program.d.ts +83 -0
  58. package/build/src/backends/program.d.ts.map +1 -0
  59. package/build/src/backends/program.js +1309 -0
  60. package/build/src/backends/python.js +7 -1
  61. package/build/src/backends/ruby.d.ts.map +1 -1
  62. package/build/src/backends/ruby.js +310 -24
  63. package/build/src/backends/rust-runtime.d.ts +7 -0
  64. package/build/src/backends/rust-runtime.d.ts.map +1 -0
  65. package/build/src/backends/rust-runtime.js +32 -0
  66. package/build/src/backends/rust-validation.d.ts +9 -0
  67. package/build/src/backends/rust-validation.d.ts.map +1 -0
  68. package/build/src/backends/rust-validation.js +78 -0
  69. package/build/src/backends/rust.d.ts +24 -0
  70. package/build/src/backends/rust.d.ts.map +1 -0
  71. package/build/src/backends/rust.js +344 -0
  72. package/build/src/backends/scalars.d.ts +14 -6
  73. package/build/src/backends/scalars.d.ts.map +1 -1
  74. package/build/src/backends/scalars.js +167 -17
  75. package/build/src/backends/shared.d.ts +23 -4
  76. package/build/src/backends/shared.d.ts.map +1 -1
  77. package/build/src/backends/shared.js +2174 -62
  78. package/build/src/backends/stdlib-support.d.ts +14 -0
  79. package/build/src/backends/stdlib-support.d.ts.map +1 -0
  80. package/build/src/backends/stdlib-support.js +237 -0
  81. package/build/src/backends/swift-runtime.d.ts +3 -0
  82. package/build/src/backends/swift-runtime.d.ts.map +1 -0
  83. package/build/src/backends/swift-runtime.js +14 -0
  84. package/build/src/backends/swift.d.ts +8 -0
  85. package/build/src/backends/swift.d.ts.map +1 -0
  86. package/build/src/backends/swift.js +127 -0
  87. package/build/src/backends/typescript.d.ts.map +1 -1
  88. package/build/src/backends/typescript.js +344 -24
  89. package/build/src/backends/wasm.d.ts +43 -0
  90. package/build/src/backends/wasm.d.ts.map +1 -0
  91. package/build/src/backends/wasm.js +2164 -0
  92. package/build/src/backends/writer.d.ts +255 -4
  93. package/build/src/backends/writer.d.ts.map +1 -1
  94. package/build/src/backends/writer.js +491 -3
  95. package/build/src/diagnostic.d.ts +4 -3
  96. package/build/src/diagnostic.d.ts.map +1 -1
  97. package/build/src/diagnostic.js +5 -3
  98. package/build/src/frontends/c.d.ts.map +1 -1
  99. package/build/src/frontends/c.js +5 -3
  100. package/build/src/frontends/cpp.d.ts.map +1 -1
  101. package/build/src/frontends/cpp.js +5 -3
  102. package/build/src/frontends/csharp.d.ts.map +1 -1
  103. package/build/src/frontends/csharp.js +7 -3
  104. package/build/src/frontends/dart.d.ts +10 -0
  105. package/build/src/frontends/dart.d.ts.map +1 -0
  106. package/build/src/frontends/dart.js +913 -0
  107. package/build/src/frontends/index.d.ts +3 -1
  108. package/build/src/frontends/index.d.ts.map +1 -1
  109. package/build/src/frontends/index.js +15 -5
  110. package/build/src/frontends/java.d.ts +110 -1
  111. package/build/src/frontends/java.d.ts.map +1 -1
  112. package/build/src/frontends/java.js +1725 -70
  113. package/build/src/frontends/javascript-typescript.d.ts +69 -1
  114. package/build/src/frontends/javascript-typescript.d.ts.map +1 -1
  115. package/build/src/frontends/javascript-typescript.js +1825 -93
  116. package/build/src/frontends/kotlin.d.ts +10 -0
  117. package/build/src/frontends/kotlin.d.ts.map +1 -0
  118. package/build/src/frontends/kotlin.js +685 -0
  119. package/build/src/frontends/php.d.ts +118 -1
  120. package/build/src/frontends/php.d.ts.map +1 -1
  121. package/build/src/frontends/php.js +1583 -76
  122. package/build/src/frontends/program.d.ts +74 -0
  123. package/build/src/frontends/program.d.ts.map +1 -0
  124. package/build/src/frontends/program.js +989 -0
  125. package/build/src/frontends/ruby.d.ts +68 -1
  126. package/build/src/frontends/ruby.d.ts.map +1 -1
  127. package/build/src/frontends/ruby.js +1446 -101
  128. package/build/src/frontends/rust-parser.d.ts +11 -0
  129. package/build/src/frontends/rust-parser.d.ts.map +1 -0
  130. package/build/src/frontends/rust-parser.js +15 -0
  131. package/build/src/frontends/rust.d.ts +14 -0
  132. package/build/src/frontends/rust.d.ts.map +1 -0
  133. package/build/src/frontends/rust.js +715 -0
  134. package/build/src/frontends/scalars.d.ts +10 -0
  135. package/build/src/frontends/scalars.d.ts.map +1 -1
  136. package/build/src/frontends/scalars.js +28 -2
  137. package/build/src/frontends/swift.d.ts +10 -0
  138. package/build/src/frontends/swift.d.ts.map +1 -0
  139. package/build/src/frontends/swift.js +860 -0
  140. package/build/src/frontends/types.d.ts +186 -0
  141. package/build/src/frontends/types.d.ts.map +1 -0
  142. package/build/src/frontends/types.js +634 -0
  143. package/build/src/language-registry.d.ts +46 -4
  144. package/build/src/language-registry.d.ts.map +1 -1
  145. package/build/src/language-registry.js +177 -13
  146. package/build/src/mapping.d.ts +2 -2
  147. package/build/src/mapping.d.ts.map +1 -1
  148. package/build/src/mapping.js +31 -10
  149. package/build/src/semantic/capabilities.d.ts +66 -0
  150. package/build/src/semantic/capabilities.d.ts.map +1 -0
  151. package/build/src/semantic/capabilities.js +649 -0
  152. package/build/src/semantic/effects.d.ts +26 -0
  153. package/build/src/semantic/effects.d.ts.map +1 -0
  154. package/build/src/semantic/effects.js +764 -0
  155. package/build/src/semantic/generics.d.ts +23 -0
  156. package/build/src/semantic/generics.d.ts.map +1 -0
  157. package/build/src/semantic/generics.js +61 -0
  158. package/build/src/semantic/lifetime.d.ts +37 -0
  159. package/build/src/semantic/lifetime.d.ts.map +1 -0
  160. package/build/src/semantic/lifetime.js +527 -0
  161. package/build/src/semantic/provenance.d.ts +9 -2
  162. package/build/src/semantic/provenance.d.ts.map +1 -1
  163. package/build/src/semantic/provenance.js +462 -20
  164. package/build/src/semantic/scalars.d.ts +11 -0
  165. package/build/src/semantic/scalars.d.ts.map +1 -1
  166. package/build/src/semantic/scalars.js +16 -1
  167. package/build/src/semantic/stdlib.d.ts +254 -0
  168. package/build/src/semantic/stdlib.d.ts.map +1 -0
  169. package/build/src/semantic/stdlib.js +880 -0
  170. package/build/src/semantic/types.d.ts +3108 -178
  171. package/build/src/semantic/types.d.ts.map +1 -1
  172. package/build/src/semantic/types.js +730 -15
  173. package/build/src/semantic/validate.d.ts +85 -5
  174. package/build/src/semantic/validate.d.ts.map +1 -1
  175. package/build/src/semantic/validate.js +2576 -98
  176. package/build/src/stdlib-facades.d.ts +304 -0
  177. package/build/src/stdlib-facades.d.ts.map +1 -0
  178. package/build/src/stdlib-facades.js +1167 -0
  179. package/build/src/stdlib-negotiation.d.ts +69 -0
  180. package/build/src/stdlib-negotiation.d.ts.map +1 -0
  181. package/build/src/stdlib-negotiation.js +403 -0
  182. package/build/src/stdlib-providers.d.ts +72 -0
  183. package/build/src/stdlib-providers.d.ts.map +1 -0
  184. package/build/src/stdlib-providers.js +339 -0
  185. package/build/src/toolchains.d.ts +55 -1
  186. package/build/src/toolchains.d.ts.map +1 -1
  187. package/build/src/toolchains.js +15 -4
  188. package/docs/android.md +79 -0
  189. package/docs/architecture.md +47 -13
  190. package/docs/dart.md +60 -0
  191. package/docs/goals.md +3 -3
  192. package/docs/ios.md +121 -0
  193. package/docs/kotlin.md +42 -0
  194. package/docs/language-support.md +238 -26
  195. package/docs/multi-file-modules.md +52 -0
  196. package/docs/parser-qualification.md +121 -8
  197. package/docs/plans/2026-09-05-standard-library-portability.md +10 -10
  198. package/docs/rust.md +88 -0
  199. package/docs/source-maps.md +17 -7
  200. package/docs/specification.md +5 -0
  201. package/docs/standard-library-portability.md +39 -8
  202. package/docs/swift.md +44 -0
  203. package/docs/testing.md +381 -4
  204. package/docs/webassembly.md +52 -0
  205. package/index.js +66 -8
  206. package/node_modules/semantifold-tree-sitter-legacy-internal/README.md +2 -2
  207. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/LICENSE +21 -0
  208. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/README.md +45 -0
  209. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/binding.gyp +30 -0
  210. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/bindings/node/binding.cc +20 -0
  211. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/bindings/node/binding_test.js +9 -0
  212. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/bindings/node/index.d.ts +28 -0
  213. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/bindings/node/index.js +11 -0
  214. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/grammar.js +1630 -0
  215. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/package.json +64 -0
  216. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/darwin-arm64/tree-sitter-rust.node +0 -0
  217. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/darwin-x64/tree-sitter-rust.node +0 -0
  218. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/linux-arm64/tree-sitter-rust.node +0 -0
  219. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/linux-x64/tree-sitter-rust.node +0 -0
  220. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/win32-arm64/tree-sitter-rust.node +0 -0
  221. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/win32-x64/tree-sitter-rust.node +0 -0
  222. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/queries/highlights.scm +159 -0
  223. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/queries/injections.scm +9 -0
  224. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/queries/tags.scm +60 -0
  225. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/grammar.json +9405 -0
  226. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/node-types.json +5399 -0
  227. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/parser.c +192569 -0
  228. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/scanner.c +393 -0
  229. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/tree_sitter/alloc.h +54 -0
  230. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/tree_sitter/array.h +290 -0
  231. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/tree_sitter/parser.h +266 -0
  232. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/tree-sitter-rust.wasm +0 -0
  233. package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/tree-sitter.json +53 -0
  234. package/node_modules/semantifold-tree-sitter-legacy-internal/package.json +3 -2
  235. package/node_modules/semantifold-tree-sitter-legacy-internal/src/c.js +5 -4
  236. package/package.json +5 -2
  237. package/src/artifact-path.js +47 -2
  238. package/src/artifacts.js +67 -0
  239. package/src/backends/android.js +1370 -0
  240. package/src/backends/c-validation.js +6 -1
  241. package/src/backends/cpp-validation.js +6 -1
  242. package/src/backends/csharp.js +3 -0
  243. package/src/backends/dart-runtime.js +41 -0
  244. package/src/backends/dart.js +326 -0
  245. package/src/backends/effects.js +705 -0
  246. package/src/backends/go.js +14 -2
  247. package/src/backends/identifiers.js +166 -9
  248. package/src/backends/index.js +27 -2
  249. package/src/backends/ios.js +1612 -0
  250. package/src/backends/java.js +454 -36
  251. package/src/backends/javascript.js +389 -23
  252. package/src/backends/kotlin-runtime.js +29 -0
  253. package/src/backends/kotlin.js +144 -0
  254. package/src/backends/native-validation.js +1 -1
  255. package/src/backends/ordered-expressions.js +40 -6
  256. package/src/backends/php-stdlib-support.js +239 -0
  257. package/src/backends/php.js +469 -32
  258. package/src/backends/program.js +1408 -0
  259. package/src/backends/python.js +3 -0
  260. package/src/backends/ruby.js +326 -23
  261. package/src/backends/rust-runtime.js +34 -0
  262. package/src/backends/rust-validation.js +75 -0
  263. package/src/backends/rust.js +335 -0
  264. package/src/backends/scalars.js +141 -16
  265. package/src/backends/shared.js +2314 -115
  266. package/src/backends/stdlib-support.js +234 -0
  267. package/src/backends/swift-runtime.js +14 -0
  268. package/src/backends/swift.js +132 -0
  269. package/src/backends/typescript.js +349 -23
  270. package/src/backends/wasm.js +2208 -0
  271. package/src/backends/writer.js +545 -2
  272. package/src/diagnostic.js +4 -2
  273. package/src/frontends/c.js +4 -2
  274. package/src/frontends/cpp.js +4 -2
  275. package/src/frontends/csharp.js +4 -2
  276. package/src/frontends/dart.js +963 -0
  277. package/src/frontends/index.js +14 -4
  278. package/src/frontends/java.js +1977 -69
  279. package/src/frontends/javascript-typescript.js +2046 -102
  280. package/src/frontends/kotlin.js +713 -0
  281. package/src/frontends/php.js +1725 -79
  282. package/src/frontends/program.js +1062 -0
  283. package/src/frontends/ruby.js +1624 -98
  284. package/src/frontends/rust-parser.js +18 -0
  285. package/src/frontends/rust.js +714 -0
  286. package/src/frontends/scalars.js +31 -1
  287. package/src/frontends/swift.js +893 -0
  288. package/src/frontends/types.js +750 -0
  289. package/src/language-registry.js +182 -12
  290. package/src/mapping.js +33 -9
  291. package/src/semantic/capabilities.js +671 -0
  292. package/src/semantic/effects.js +737 -0
  293. package/src/semantic/generics.js +58 -0
  294. package/src/semantic/lifetime.js +517 -0
  295. package/src/semantic/provenance.js +412 -19
  296. package/src/semantic/scalars.js +17 -0
  297. package/src/semantic/stdlib.js +921 -0
  298. package/src/semantic/types.js +810 -14
  299. package/src/semantic/validate.js +2934 -209
  300. package/src/stdlib-facades.js +1211 -0
  301. package/src/stdlib-negotiation.js +446 -0
  302. package/src/stdlib-providers.js +377 -0
  303. package/src/toolchains.js +16 -3
@@ -1,14 +1,108 @@
1
1
  // @ts-check
2
2
 
3
- /** @typedef {"php" | "ruby" | "javascript" | "typescript" | "java" | "python" | "csharp" | "go" | "c" | "cpp"} SemanticLanguage */
3
+ /** @typedef {"php" | "ruby" | "javascript" | "typescript" | "java" | "kotlin" | "python" | "csharp" | "go" | "c" | "cpp" | "rust" | "swift" | "dart"} SemanticLanguage */
4
+ /** @typedef {SemanticLanguage} TextBackendLanguage */
5
+ /** @typedef {TextBackendLanguage | "wasm" | "ios" | "android"} BackendLanguage */
6
+ /** @typedef {SemanticLanguage | "html"} GeneratedTextLanguage */
4
7
  /** @typedef {"integer" | "boolean" | "string"} SemanticTypeName */
8
+ /** @typedef {SemanticTypeName | "void"} FunctionReturnTypeName */
5
9
  /** @typedef {"IntegerNegate" | "BooleanNot"} SemanticUnaryOperation */
6
10
  /** @typedef {"IntegerAdd" | "IntegerSubtract" | "IntegerMultiply" | "BooleanAnd" | "BooleanOr" | "IntegerEqual" | "IntegerNotEqual" | "BooleanEqual" | "BooleanNotEqual" | "StringEqual" | "StringNotEqual" | "IntegerLessThan" | "IntegerLessThanOrEqual" | "IntegerGreaterThan" | "IntegerGreaterThanOrEqual" | "StringConcat"} SemanticBinaryOperation */
7
- /** @typedef {"function" | "parameter" | "local"} SemanticSymbolKind */
8
- /** @typedef {"declaration" | "read" | "write" | "call"} SemanticSymbolRole */
11
+ /** @typedef {"capability" | "resource" | "failure" | "operation" | "record" | "class" | "error" | "field" | "constructor" | "method" | "function" | "typeParameter" | "parameter" | "local" | "iteration" | "catch"} SemanticSymbolKind */
12
+ /** @typedef {"record" | "class" | "error" | "function"} SemanticDeclarationKind */
13
+ /** @typedef {"declaration" | "type" | "construct" | "member" | "read" | "write" | "call"} SemanticSymbolRole */
9
14
  /** @typedef {"parse" | "generate" | "restore" | "compile" | "link" | "validate" | "instantiate" | "execute"} AcceptanceStage */
10
15
  /** @typedef {"entry" | "source" | "manifest" | "support" | "mapping" | "resource" | "loader"} GeneratedArtifactRole */
11
16
 
17
+ /**
18
+ * @typedef IosApplicationConfigurationInput
19
+ * @property {string} productName - Safe Xcode product/path identity.
20
+ * @property {string} moduleName - Safe Swift module identity.
21
+ * @property {string} organizationPrefix - Caller-supplied reverse-DNS organization prefix.
22
+ * @property {string} bundleIdentifier - Caller-supplied reverse-DNS application bundle identity.
23
+ * @property {string} deploymentTarget - Caller-supplied major.minor iOS deployment target; never inferred.
24
+ * @property {string} displayName - User-visible application name.
25
+ * @property {"Sources"} [sourceRoot] - Fixed generated-source root.
26
+ * @property {"Assets.xcassets"} [resourceRoot] - Fixed caller-resource root.
27
+ * @property {"swiftui"} [lifecycle] - Sole supported lifecycle.
28
+ * @property {Record<string, never>} [infoPlist] - Closed baseline caller plist extension; currently empty.
29
+ * @property {unknown[]} [permissions] - Validated as the closed empty baseline permissions.
30
+ * @property {unknown[]} [entitlements] - Validated as the closed empty baseline entitlements.
31
+ * @property {unknown[]} [privacyDeclarations] - Validated as the closed empty baseline privacy declarations.
32
+ * @property {unknown[]} [capabilities] - Validated as the closed empty baseline Apple capabilities.
33
+ */
34
+
35
+ /**
36
+ * @typedef IosApplicationConfiguration
37
+ * @property {string} productName - Validated Xcode product/path identity.
38
+ * @property {string} moduleName - Validated Swift module identity.
39
+ * @property {string} organizationPrefix - Validated reverse-DNS organization prefix.
40
+ * @property {string} bundleIdentifier - Validated reverse-DNS application bundle identity.
41
+ * @property {string} deploymentTarget - Validated caller-supplied deployment target.
42
+ * @property {string} displayName - Validated display name.
43
+ * @property {"Sources"} sourceRoot - Generated-source root.
44
+ * @property {"Assets.xcassets"} resourceRoot - Caller-resource root.
45
+ * @property {"swiftui"} lifecycle - Sole supported lifecycle.
46
+ * @property {Readonly<Record<string, never>>} infoPlist - Empty caller plist extension.
47
+ * @property {readonly never[]} permissions - Empty baseline permissions.
48
+ * @property {readonly never[]} entitlements - Empty baseline entitlements.
49
+ * @property {readonly never[]} privacyDeclarations - Empty baseline privacy declarations.
50
+ * @property {readonly never[]} capabilities - Empty baseline Apple capabilities.
51
+ */
52
+
53
+ /**
54
+ * @typedef IosApplicationAssetInput
55
+ * @property {string} path - Full safe destination below Assets.xcassets.
56
+ * @property {string | Uint8Array} content - Exact caller-provided text or bytes.
57
+ * @property {string} mediaType - Explicit artifact media type.
58
+ * @property {string} sha256 - Lowercase SHA-256 of exact UTF-8 text or bytes.
59
+ */
60
+
61
+ /**
62
+ * @typedef AndroidApplicationConfigurationInput
63
+ * @property {string} [applicationId] - Lowercase reverse-DNS Android application identity.
64
+ * @property {string} [namespace] - Kotlin/Android namespace; defaults to applicationId.
65
+ * @property {string} [packageName] - Generated Kotlin package; defaults to namespace.
66
+ * @property {string} [activityClassName] - Launcher Activity class name.
67
+ * @property {string} [productName] - Deterministic project product name.
68
+ * @property {string} [displayName] - User-visible application label.
69
+ * @property {23} [minimumSdk] - Qualified minimum Android API.
70
+ * @property {35} [targetSdk] - Qualified target Android API.
71
+ * @property {35} [compileSdk] - Qualified compile Android API.
72
+ * @property {"35.0.0"} [buildToolsVersion] - Qualified Android Build Tools version.
73
+ * @property {number} [versionCode] - Positive Android version code.
74
+ * @property {string} [versionName] - Canonical application version name.
75
+ * @property {"unspecified"} [orientation] - Baseline orientation behavior.
76
+ * @property {"system"} [theme] - Baseline platform-native theme.
77
+ * @property {unknown[]} [permissions] - Validated as the closed empty permission set.
78
+ */
79
+
80
+ /**
81
+ * @typedef AndroidApplicationConfiguration
82
+ * @property {string} applicationId - Validated Android application identity.
83
+ * @property {string} namespace - Validated Android namespace.
84
+ * @property {string} packageName - Generated Kotlin package.
85
+ * @property {string} activityClassName - Launcher Activity class name.
86
+ * @property {string} productName - Project product name.
87
+ * @property {string} displayName - User-visible application label.
88
+ * @property {23} minimumSdk - Qualified minimum Android API.
89
+ * @property {35} targetSdk - Qualified target Android API.
90
+ * @property {35} compileSdk - Qualified compile Android API.
91
+ * @property {"35.0.0"} buildToolsVersion - Qualified Android Build Tools version.
92
+ * @property {number} versionCode - Positive Android version code.
93
+ * @property {string} versionName - Canonical application version name.
94
+ * @property {"unspecified"} orientation - Baseline orientation behavior.
95
+ * @property {"system"} theme - Platform-native theme.
96
+ */
97
+
98
+ /**
99
+ * @typedef AndroidApplicationInputFile
100
+ * @property {string} path - Safe path relative to the selected fixed Android resource or asset root.
101
+ * @property {string | Uint8Array} content - Exact caller-provided text or bytes.
102
+ * @property {string} mediaType - Explicit artifact media type.
103
+ * @property {string} sha256 - Lowercase SHA-256 of exact UTF-8 text or bytes.
104
+ */
105
+
12
106
  /**
13
107
  * @typedef LanguageRoleCapabilities
14
108
  * @property {boolean} frontend - Parser adapter availability.
@@ -16,6 +110,7 @@
16
110
  * @property {boolean} binaryBackend - Binary backend availability.
17
111
  * @property {boolean} applicationBackend - Application-artifact backend availability.
18
112
  * @property {boolean} interoperability - Interoperability bridge availability.
113
+ * @property {boolean} provider - Target host stdlib provider/native-binding availability.
19
114
  */
20
115
 
21
116
  /**
@@ -31,12 +126,28 @@
31
126
  * @property {readonly string[]} toolchains - Required canonical toolchain IDs.
32
127
  */
33
128
 
129
+ /**
130
+ * @typedef LanguageFeatureCapabilities
131
+ * @property {boolean} generalFunctionsAndCalls - Task 005 arbitrary required signatures, resolved direct calls, and void functions.
132
+ * @property {boolean} immutableCollections - Task 006 recursive immutable lists/maps, total access, and size.
133
+ * @property {boolean} optionalValues - Task 007 explicit optional values, presence tests, and guarded unwrap.
134
+ * @property {boolean} orderedListIteration - Task 008 ordered immutable-list iteration and nearest-loop control.
135
+ * @property {boolean} orderedMapIteration - Task 014 insertion-ordered immutable-map pair iteration.
136
+ * @property {boolean} conditionControlledLoops - Task 032 strict-Boolean pre-condition loops and resolved control.
137
+ * @property {boolean} closedRecords - Task 009 nominal closed immutable records, construction, and member reads.
138
+ * @property {boolean} typedErrors - Task 011 nominal unchecked errors, raises, and exact typed catches.
139
+ * @property {boolean} typeParametersAndGenerics - Task 012 invariant unbounded type parameters and closed generic applications.
140
+ * @property {boolean} referenceClasses - Task 033 nominal reference classes, private instance state, exact constructors, and receiver methods.
141
+ * @property {boolean} effectfulCapabilitiesAndResources - Task 034 authorized host effects, typed failures, and owned resources.
142
+ */
143
+
34
144
  /**
35
145
  * @typedef LanguageCapabilities
36
146
  * @property {string} id - Stable registry identity.
37
147
  * @property {Readonly<LanguageRoleCapabilities>} roles - Independently registered roles.
38
148
  * @property {"single" | "multiple"} artifactMultiplicity - Target artifact multiplicity.
39
149
  * @property {boolean} roundTrip - Whether frontend/backend round-trip acceptance is declared.
150
+ * @property {Readonly<LanguageFeatureCapabilities>} features - Semantic feature capabilities.
40
151
  * @property {Readonly<LanguageMappingCapabilities>} mapping - Mapping forms.
41
152
  * @property {Readonly<LanguageAcceptanceCapabilities>} acceptance - Stages and toolchains.
42
153
  */
@@ -61,6 +172,7 @@
61
172
  * @property {string} filename - Original filename, preserved verbatim.
62
173
  * @property {string | null} content - Original source content, preserved verbatim when available.
63
174
  * @property {SemanticLanguage | null} language - Parser language when known.
175
+ * @property {"application" | "facade"} [ownership] - Caller or compiler-owned source role for semantic programs.
64
176
  */
65
177
 
66
178
  /**
@@ -143,6 +255,7 @@
143
255
  * @property {string} name - Semantic symbol name.
144
256
  * @property {SemanticSymbolKind} kind - Symbol category.
145
257
  * @property {string} declarationNodeId - Declaring node identity.
258
+ * @property {string} [semanticDeclarationId] - Stable semantic declaration identity for record, field, and function symbols.
146
259
  * @property {SourceLocation} location - Exact declaration-name range.
147
260
  * @property {SemanticSymbolReference[]} references - Ordered resolved references.
148
261
  */
@@ -173,7 +286,7 @@
173
286
  /**
174
287
  * @typedef GeneratedSource
175
288
  * @property {string} filename - Output filename.
176
- * @property {SemanticLanguage} language - Output language.
289
+ * @property {GeneratedTextLanguage} language - Output text language.
177
290
  * @property {string} content - Exact generated LF source.
178
291
  */
179
292
 
@@ -240,6 +353,7 @@
240
353
  * @property {string} target - Stable language or target ID.
241
354
  * @property {string} entry - Path of the sole declared entry artifact.
242
355
  * @property {readonly GeneratedSetArtifact[]} artifacts - Deterministic artifact order.
356
+ * @property {Readonly<Record<string, unknown>>} [metadata] - Detached target-specific JSON metadata.
243
357
  */
244
358
 
245
359
  /**
@@ -248,8 +362,8 @@
248
362
  * @property {string} command - Documented canonical command.
249
363
  * @property {string} executable - Exact absolute executable path.
250
364
  * @property {"override" | "canonical"} source - Resolution route.
251
- * @property {string} version - First captured version line.
252
- * @property {string} versionOutput - Complete captured version output.
365
+ * @property {string} version - First selected-stream version line.
366
+ * @property {string} versionOutput - Complete normalized stdout, or normalized stderr when stdout is empty.
253
367
  * @property {readonly string[]} versionArguments - Exact version argument array.
254
368
  */
255
369
 
@@ -273,15 +387,291 @@
273
387
  /**
274
388
  * @typedef TypeReference
275
389
  * @property {"TypeReference"} kind - Node discriminator.
276
- * @property {SemanticTypeName} name - Normalized type name.
390
+ * @property {SemanticTypeName} name - Normalized scalar value type name.
391
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance that survives semantic transforms.
392
+ */
393
+
394
+ /**
395
+ * @typedef TypeParameter
396
+ * @property {"TypeParameter"} kind - Declaration-scoped invariant unbounded type parameter.
397
+ * @property {string} [id] - Stable declaration-scoped identity, required after validation.
398
+ * @property {string} name - Source-visible type parameter name.
399
+ * @property {SourceLocation} location - Parser-owned declaration location.
400
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned declaration-name range.
401
+ */
402
+
403
+ /**
404
+ * @typedef TypeVariableReference
405
+ * @property {"TypeVariableReference"} kind - Reference to one declaration-scoped type parameter.
406
+ * @property {string} parameterId - Stable referenced type-parameter identity.
407
+ * @property {SourceLocation} location - Parser-owned reference location.
408
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
409
+ */
410
+
411
+ /**
412
+ * @typedef ListType
413
+ * @property {"ListType"} kind - Recursive list-type discriminator.
414
+ * @property {SemanticValueType} elementType - Homogeneous element type.
415
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned outer and argument ranges.
416
+ */
417
+
418
+ /**
419
+ * @typedef MapType
420
+ * @property {"MapType"} kind - Recursive map-type discriminator.
421
+ * @property {TypeReference} keyType - Exact string key type.
422
+ * @property {SemanticValueType} valueType - Homogeneous value type.
423
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned outer and argument ranges.
424
+ */
425
+
426
+ /**
427
+ * @typedef OrderedMapType
428
+ * @property {"OrderedMapType"} kind - Distinct insertion-ordered map-type discriminator.
429
+ * @property {TypeReference} keyType - Exact supported string key type.
430
+ * @property {SemanticValueType} valueType - Homogeneous value type.
431
+ * @property {"insertion"} order - Canonical first-insertion encounter order.
432
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned outer and argument ranges.
433
+ */
434
+
435
+ /**
436
+ * @typedef OptionalType
437
+ * @property {"OptionalType"} kind - Explicit presence/absence type discriminator.
438
+ * @property {SemanticValueType} valueType - Exact present-value type.
439
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned outer and constituent ranges.
440
+ */
441
+
442
+ /**
443
+ * @typedef RecordType
444
+ * @property {"RecordType"} kind - Nominal record-type discriminator.
445
+ * @property {string} declarationId - Stable module-local record declaration identity.
446
+ * @property {SemanticValueType[]} [arguments] - Exact invariant type arguments; required for generic declarations and absent for non-generic declarations.
447
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
448
+ */
449
+
450
+ /**
451
+ * @typedef ErrorType
452
+ * @property {"ErrorType"} kind - Nominal unchecked-error type discriminator.
453
+ * @property {string} declarationId - Stable error declaration identity.
454
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
455
+ */
456
+
457
+ /**
458
+ * @typedef ReferenceType
459
+ * @property {"ReferenceType"} kind - Nominal reference-class type discriminator.
460
+ * @property {string} declarationId - Stable module-local class declaration identity.
461
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
462
+ */
463
+
464
+ /**
465
+ * @typedef OwnedResourceType
466
+ * @property {"OwnedResourceType"} kind - Compiler-owned linear resource type.
467
+ * @property {string} resourceId - Exact authority resource declaration identity.
468
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
469
+ */
470
+
471
+ /**
472
+ * @typedef OwnedReferenceType
473
+ * @property {"OwnedReferenceType"} kind - Linear reference that owns one protected resource.
474
+ * @property {string} declarationId - Exact owned class declaration identity.
475
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
476
+ */
477
+
478
+ /** @typedef {TypeReference | TypeVariableReference | ListType | MapType | OrderedMapType | OptionalType | RecordType | ReferenceType | OwnedResourceType | OwnedReferenceType} SemanticValueType */
479
+ /** @typedef {SemanticValueType | ErrorType} SemanticBindingType */
480
+
481
+ /**
482
+ * @typedef FunctionReturnTypeReference
483
+ * @property {"TypeReference"} kind - Void return discriminator.
484
+ * @property {"void"} name - Normalized non-value function return.
277
485
  * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance that survives semantic transforms.
278
486
  */
279
487
 
488
+ /** @typedef {SemanticValueType | FunctionReturnTypeReference} SemanticFunctionReturnType */
489
+
490
+ /** @typedef {SemanticTypeName | {kind: "TypeVariableReference", parameterId: string} | {kind: "ListType", elementType: SemanticTypeIdentity} | {kind: "MapType", keyType: SemanticTypeIdentity, valueType: SemanticTypeIdentity} | {kind: "OrderedMapType", keyType: SemanticTypeIdentity, valueType: SemanticTypeIdentity, order: "insertion"} | {kind: "OptionalType", valueType: SemanticTypeIdentity} | {kind: "RecordType", declarationId: string, arguments?: SemanticTypeIdentity[]} | {kind: "ReferenceType", declarationId: string} | {kind: "OwnedResourceType", resourceId: string} | {kind: "OwnedReferenceType", declarationId: string}} SemanticTypeIdentity */
491
+ /** @typedef {SemanticTypeIdentity | "void"} FunctionReturnTypeIdentity */
492
+
493
+ /**
494
+ * @typedef ResolvedFunctionSignature
495
+ * @property {"ResolvedFunctionSignature"} kind - Resolution discriminator.
496
+ * @property {string} declarationId - Deterministic module-local declaration identity.
497
+ * @property {SemanticTypeIdentity[]} parameterTypes - Exact required positional parameter types.
498
+ * @property {FunctionReturnTypeIdentity} returnType - Exact resolved return type.
499
+ * @property {SemanticTypeIdentity[]} [typeArguments] - Inferred declaration-order type arguments for a generic call.
500
+ */
501
+
280
502
  /**
281
503
  * @typedef Parameter
282
504
  * @property {"Parameter"} kind - Node discriminator.
283
505
  * @property {string} name - Parameter name.
284
- * @property {TypeReference} type - Parameter type.
506
+ * @property {SemanticValueType} type - Parameter type.
507
+ * @property {SourceLocation} location - Source location.
508
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
509
+ */
510
+
511
+ /**
512
+ * @typedef ResolvedEffectOperationSignature
513
+ * @property {"ResolvedEffectOperationSignature"} kind - Resolution discriminator.
514
+ * @property {string} capabilityId - Exact capability declaration identity.
515
+ * @property {string} operationId - Exact operation declaration identity.
516
+ * @property {SemanticTypeIdentity[]} parameterTypes - Exact ordered parameter types.
517
+ * @property {FunctionReturnTypeIdentity} returnType - Exact operation result.
518
+ * @property {readonly ["host"]} effects - Closed initial effect set.
519
+ * @property {string[]} failureIds - Exact ordered declared failures.
520
+ * @property {EffectResourceFlow} resourceFlow - Exact ownership transition.
521
+ */
522
+
523
+ /**
524
+ * @typedef OwnedMoveExpression
525
+ * @property {"OwnedMoveExpression"} kind - Explicit linear ownership transfer.
526
+ * @property {IdentifierExpression} expression - Moved owner.
527
+ * @property {OwnedResourceType | OwnedReferenceType} type - Exact owned type.
528
+ * @property {SourceLocation} location - Exact transfer location.
529
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Derived source provenance.
530
+ */
531
+
532
+ /**
533
+ * @typedef OwnedBorrowExpression
534
+ * @property {"OwnedBorrowExpression"} kind - Immediate nonescaping resource borrow.
535
+ * @property {"shared" | "exclusive"} mode - Borrow mode.
536
+ * @property {IdentifierExpression | ReceiverExpression | PrivateFieldRead} expression - Borrowed place.
537
+ * @property {OwnedResourceType | OwnedReferenceType} type - Exact owned type.
538
+ * @property {SourceLocation} location - Exact borrow location.
539
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Derived source provenance.
540
+ */
541
+
542
+ /**
543
+ * @typedef EffectCallExpression
544
+ * @property {"EffectCallExpression"} kind - Compiler-authorized effect invocation.
545
+ * @property {string} operation - Exact operation declaration identity.
546
+ * @property {Expression[]} arguments - Source-ordered arguments.
547
+ * @property {string} effectSiteId - Deterministic semantic evaluation identity.
548
+ * @property {ResolvedEffectOperationSignature} resolution - Complete authority resolution.
549
+ * @property {SourceLocation} location - Complete call location.
550
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned operation-name range.
551
+ */
552
+
553
+ /**
554
+ * @typedef EffectParameter
555
+ * @property {string} name - Stable parameter name.
556
+ * @property {SemanticValueType} type - Exact ordered parameter type.
557
+ */
558
+
559
+ /** @typedef {{kind: "none"} | {kind: "acquire", resourceId: string} | {kind: "borrow" | "close", parameterIndex: number, terminalFailureId: string}} EffectResourceFlow */
560
+
561
+ /**
562
+ * @typedef EffectResourceDeclaration
563
+ * @property {"EffectResourceDeclaration"} kind - Capability resource declaration.
564
+ * @property {string} id - Deterministic authority-local identity.
565
+ * @property {string} name - Source-visible nominal resource name.
566
+ */
567
+
568
+ /**
569
+ * @typedef EffectFailureDeclaration
570
+ * @property {"EffectFailureDeclaration"} kind - Capability failure declaration.
571
+ * @property {string} id - Deterministic authority-local identity.
572
+ * @property {string} name - Source-visible nominal failure name.
573
+ */
574
+
575
+ /**
576
+ * @typedef EffectOperationDeclaration
577
+ * @property {"EffectOperationDeclaration"} kind - Compiler-authorized operation declaration.
578
+ * @property {string} id - Deterministic authority-local identity.
579
+ * @property {string} name - Source-visible operation name.
580
+ * @property {EffectParameter[]} parameters - Exact positional parameters.
581
+ * @property {SemanticFunctionReturnType} returnType - Exact result type.
582
+ * @property {readonly ["host"]} effects - Closed initial effect set.
583
+ * @property {string[]} failureIds - Ordered nominal failure identities.
584
+ * @property {EffectResourceFlow} resourceFlow - Exact ownership transition.
585
+ */
586
+
587
+ /**
588
+ * @typedef EffectCapabilityDeclaration
589
+ * @property {"EffectCapabilityDeclaration"} kind - Authorized capability declaration.
590
+ * @property {string} id - Deterministic module-local identity.
591
+ * @property {string} authorityId - Opaque authority identity.
592
+ * @property {string} name - Capability name.
593
+ * @property {EffectResourceDeclaration[]} resources - Ordered resources.
594
+ * @property {EffectFailureDeclaration[]} failures - Ordered failures.
595
+ * @property {EffectOperationDeclaration[]} operations - Ordered operations.
596
+ */
597
+
598
+ /**
599
+ * @typedef CapabilityAuthority
600
+ * @property {"SemantifoldCapabilityAuthority"} schema - Authority schema discriminator.
601
+ * @property {1 | 2} schemaVersion - Authority payload version, not a standard-library contract version.
602
+ * @property {string} id - Opaque caller-supplied authority identity.
603
+ * @property {EffectCapabilityDeclaration[]} capabilities - Normalized declarations.
604
+ * @property {string} [contractVersion] - Declared standard-library contract version, present only when the caller supplied one.
605
+ * @property {{identity: string, contractVersion: string, capabilities: EffectCapabilityDeclaration[]}[]} [modules] - Schema-v2 canonical module authorities.
606
+ */
607
+
608
+ /** @typedef {{module: string, name: string}} CapabilityDeclarationReferenceInput */
609
+ /** @typedef {{name: string, type: SemanticTypeName | {kind: "OwnedResourceType", resource: string | CapabilityDeclarationReferenceInput} | {kind: "OptionalType", valueType: SemanticTypeName}}} CapabilityParameterInput */
610
+ /** @typedef {{name: string}} CapabilityNamedInput */
611
+ /** @typedef {{kind: "none"} | {kind: "acquire", resource: string | CapabilityDeclarationReferenceInput} | {kind: "borrow" | "close", parameterIndex: number, terminalFailure: string | CapabilityDeclarationReferenceInput}} CapabilityResourceFlowInput */
612
+ /** @typedef {{name: string, parameters: CapabilityParameterInput[], returnType: FunctionReturnTypeName | {kind: "OwnedResourceType", resource: string | CapabilityDeclarationReferenceInput} | {kind: "OptionalType", valueType: SemanticTypeName}, effects: ["host"], failures: (string | CapabilityDeclarationReferenceInput)[], resourceFlow: CapabilityResourceFlowInput}} CapabilityOperationInput */
613
+ /** @typedef {{name: string, resources: CapabilityNamedInput[], failures: CapabilityNamedInput[], operations: CapabilityOperationInput[]}} CapabilityDeclarationInput */
614
+ /** @typedef {{identity: string, contractVersion: string, capabilities: CapabilityDeclarationInput[]}} CapabilityAuthorityModuleInput */
615
+ /** @typedef {{schema: "SemantifoldCapabilityAuthority", schemaVersion: 1, id: string, capabilities: CapabilityDeclarationInput[], contractVersion?: string} | {schema: "SemantifoldCapabilityAuthority", schemaVersion: 2, id: string, modules: CapabilityAuthorityModuleInput[]}} CapabilityAuthorityInput */
616
+
617
+ /**
618
+ * @typedef ListLiteral
619
+ * @property {"ListLiteral"} kind - Ordered immutable list literal.
620
+ * @property {Expression[]} elements - Source-ordered, duplicate-preserving elements.
621
+ * @property {SourceLocation} location - Source location.
622
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
623
+ */
624
+
625
+ /**
626
+ * @typedef MapEntry
627
+ * @property {"MapEntry"} kind - Source-ordered map initializer entry.
628
+ * @property {StringLiteral} key - Literal nonnumeric string key.
629
+ * @property {Expression} value - Entry value.
630
+ * @property {SourceLocation} location - Source location.
631
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
632
+ */
633
+
634
+ /**
635
+ * @typedef MapLiteral
636
+ * @property {"MapLiteral"} kind - Immutable map literal; entry order is diagnostic-only.
637
+ * @property {MapEntry[]} entries - Source initializer order.
638
+ * @property {SourceLocation} location - Source location.
639
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
640
+ */
641
+
642
+ /**
643
+ * @typedef OrderedMapLiteral
644
+ * @property {"OrderedMapLiteral"} kind - Immutable map literal with observable first-insertion order.
645
+ * @property {MapEntry[]} entries - Source-ordered unique entries.
646
+ * @property {SourceLocation} location - Complete ordered construction boundary.
647
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
648
+ */
649
+
650
+ /**
651
+ * @typedef ListIndexExpression
652
+ * @property {"ListIndexExpression"} kind - Total zero-based list index.
653
+ * @property {Expression} collection - List-valued receiver.
654
+ * @property {Expression} index - Integer index.
655
+ * @property {"proven" | "fail-on-absence"} totality - Admission basis; never optional.
656
+ * @property {SourceLocation} location - Source location.
657
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
658
+ */
659
+
660
+ /**
661
+ * @typedef MapLookupExpression
662
+ * @property {"MapLookupExpression"} kind - Total string-key map lookup.
663
+ * @property {Expression} collection - Map-valued receiver.
664
+ * @property {Expression} key - String key expression.
665
+ * @property {"proven" | "fail-on-absence"} totality - Admission basis; never optional.
666
+ * @property {SourceLocation} location - Source location.
667
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
668
+ */
669
+
670
+ /**
671
+ * @typedef CollectionSizeExpression
672
+ * @property {"CollectionSizeExpression"} kind - Finite collection size.
673
+ * @property {Expression} collection - List- or map-valued receiver.
674
+ * @property {"list" | "map"} [collectionKind] - Validated receiver kind for target spelling.
285
675
  * @property {SourceLocation} location - Source location.
286
676
  * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
287
677
  */
@@ -318,6 +708,37 @@
318
708
  * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
319
709
  */
320
710
 
711
+ /**
712
+ * @typedef OptionalNone
713
+ * @property {"OptionalNone"} kind - Contextually typed absence value.
714
+ * @property {SourceLocation} location - Source location.
715
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
716
+ */
717
+
718
+ /**
719
+ * @typedef OptionalSome
720
+ * @property {"OptionalSome"} kind - Explicit present optional value.
721
+ * @property {Expression} value - Exact non-optional present value.
722
+ * @property {SourceLocation} location - Source location.
723
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
724
+ */
725
+
726
+ /**
727
+ * @typedef OptionalIsPresent
728
+ * @property {"OptionalIsPresent"} kind - Presence test for one simple identifier.
729
+ * @property {IdentifierExpression} operand - Tested optional binding.
730
+ * @property {SourceLocation} location - Source location.
731
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
732
+ */
733
+
734
+ /**
735
+ * @typedef OptionalUnwrap
736
+ * @property {"OptionalUnwrap"} kind - Guarded unwrap of one simple identifier.
737
+ * @property {IdentifierExpression} operand - Proven-present optional binding.
738
+ * @property {SourceLocation} location - Source location.
739
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
740
+ */
741
+
321
742
  /**
322
743
  * @typedef UnaryExpression
323
744
  * @property {"UnaryExpression"} kind - Node discriminator.
@@ -344,17 +765,107 @@
344
765
  * @property {"CallExpression"} kind - Node discriminator.
345
766
  * @property {string} callee - Function name.
346
767
  * @property {Expression[]} arguments - Positional arguments.
768
+ * @property {ResolvedFunctionSignature} [resolution] - Deterministic declaration and signature binding, required after frontend validation.
769
+ * @property {string} [effectSiteId] - Deterministic site identity when the resolved function reaches a host effect.
770
+ * @property {readonly ["host"]} [effects] - Inferred checked host-effect fact.
771
+ * @property {string[]} [failureIds] - Ordered capability failures reachable through this call.
347
772
  * @property {SourceLocation} location - Source location.
348
773
  * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
349
774
  */
350
775
 
351
- /** @typedef {IdentifierExpression | IntegerLiteral | BooleanLiteral | StringLiteral | UnaryExpression | BinaryExpression | CallExpression} Expression */
776
+ /**
777
+ * @typedef ResolvedConstructorSignature
778
+ * @property {"ResolvedConstructorSignature"} kind - Resolution discriminator.
779
+ * @property {string} declarationId - Exact constructor declaration identity.
780
+ * @property {SemanticTypeIdentity[]} parameterTypes - Exact constructor parameter types.
781
+ */
782
+
783
+ /**
784
+ * @typedef ResolvedMethodSignature
785
+ * @property {"ResolvedMethodSignature"} kind - Resolution discriminator.
786
+ * @property {string} declarationId - Exact resolved method identity.
787
+ * @property {SemanticTypeIdentity[]} parameterTypes - Exact method parameter types.
788
+ * @property {FunctionReturnTypeIdentity} returnType - Exact method return type.
789
+ * @property {{kind: "preserve" | "terminal", terminalFailureId?: string}} [resourceFlow] - Owned receiver transition and declared terminal-use failure when applicable.
790
+ */
791
+
792
+ /**
793
+ * @typedef ReceiverExpression
794
+ * @property {"ReceiverExpression"} kind - The declaring class instance receiver.
795
+ * @property {string} classId - Stable declaring class identity.
796
+ * @property {SourceLocation} location - Source receiver location.
797
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned receiver range.
798
+ */
799
+
800
+ /**
801
+ * @typedef ReferenceConstruction
802
+ * @property {"ReferenceConstruction"} kind - Fresh nominal reference construction.
803
+ * @property {ReferenceType | OwnedReferenceType} reference - Exact class type.
804
+ * @property {Expression[]} arguments - Source-ordered constructor arguments.
805
+ * @property {ResolvedConstructorSignature} [resolution] - Exact constructor binding, required after validation.
806
+ * @property {string} [effectSiteId] - Deterministic site identity when construction reaches a host effect.
807
+ * @property {readonly ["host"]} [effects] - Inferred checked host-effect fact.
808
+ * @property {string[]} [failureIds] - Ordered capability failures reachable through construction.
809
+ * @property {SourceLocation} location - Complete construction location.
810
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned class-name range.
811
+ */
812
+
813
+ /**
814
+ * @typedef MethodCallExpression
815
+ * @property {"MethodCallExpression"} kind - Resolved receiver-method invocation.
816
+ * @property {Expression} receiver - Receiver evaluated once before arguments.
817
+ * @property {string} method - Stable method identity after validation.
818
+ * @property {Expression[]} arguments - Source-ordered arguments.
819
+ * @property {ResolvedMethodSignature} [resolution] - Exact method binding, required after validation.
820
+ * @property {string} [effectSiteId] - Deterministic site identity when the method reaches a host effect.
821
+ * @property {readonly ["host"]} [effects] - Inferred checked host-effect fact.
822
+ * @property {string[]} [failureIds] - Ordered capability failures reachable through the method.
823
+ * @property {SourceLocation} location - Complete call location.
824
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned method-name range.
825
+ */
826
+
827
+ /**
828
+ * @typedef PrivateFieldRead
829
+ * @property {"PrivateFieldRead"} kind - Declaring-receiver-only private field read.
830
+ * @property {ReceiverExpression} receiver - Exact declaring receiver.
831
+ * @property {string} field - Stable private field identity.
832
+ * @property {SourceLocation} location - Complete read location.
833
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned field-name range.
834
+ */
835
+
836
+ /**
837
+ * @typedef RecordConstruction
838
+ * @property {"RecordConstruction"} kind - Nominal record construction.
839
+ * @property {RecordType} record - Resolved record declaration identity.
840
+ * @property {Expression[]} arguments - Complete field-ordered constructor arguments.
841
+ * @property {SourceLocation} location - Complete construction source location.
842
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned record-name range.
843
+ */
844
+
845
+ /**
846
+ * @typedef MemberRead
847
+ * @property {"MemberRead"} kind - Nominal immutable record-field read.
848
+ * @property {Expression} receiver - Record-valued receiver.
849
+ * @property {string} field - Stable resolved field identity after frontend validation.
850
+ * @property {SourceLocation} location - Complete member-read source location.
851
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned member-name range.
852
+ */
853
+
854
+ /**
855
+ * @typedef ErrorMessageRead
856
+ * @property {"ErrorMessageRead"} kind - The sole portable error member operation.
857
+ * @property {IdentifierExpression} receiver - Catch binding whose immutable message is read.
858
+ * @property {SourceLocation} location - Complete message-read source location.
859
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned message-member range.
860
+ */
861
+
862
+ /** @typedef {IdentifierExpression | ReceiverExpression | IntegerLiteral | BooleanLiteral | StringLiteral | OptionalNone | OptionalSome | OptionalIsPresent | OptionalUnwrap | ListLiteral | MapLiteral | OrderedMapLiteral | ListIndexExpression | MapLookupExpression | CollectionSizeExpression | UnaryExpression | BinaryExpression | CallExpression | EffectCallExpression | OwnedMoveExpression | OwnedBorrowExpression | MethodCallExpression | ReferenceConstruction | RecordConstruction | MemberRead | PrivateFieldRead | ErrorMessageRead} Expression */
352
863
 
353
864
  /**
354
865
  * @typedef LocalDeclaration
355
866
  * @property {"LocalDeclaration"} kind - Node discriminator.
356
867
  * @property {string} name - Declared local name.
357
- * @property {TypeReference} type - Explicit local type.
868
+ * @property {SemanticValueType} type - Explicit local type.
358
869
  * @property {boolean} mutable - Whether later assignment is allowed.
359
870
  * @property {Expression} initializer - Required initializer expression.
360
871
  * @property {SourceLocation} location - Declaration source location.
@@ -370,10 +881,28 @@
370
881
  * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
371
882
  */
372
883
 
884
+ /**
885
+ * @typedef PrivateFieldWriteStatement
886
+ * @property {"PrivateFieldWriteStatement"} kind - Declaring-receiver-only private field mutation.
887
+ * @property {ReceiverExpression} receiver - Exact declaring receiver.
888
+ * @property {string} field - Stable private field identity.
889
+ * @property {Expression} expression - New field value.
890
+ * @property {SourceLocation} location - Assignment source location.
891
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned field-name range.
892
+ */
893
+
373
894
  /**
374
895
  * @typedef ReturnStatement
375
896
  * @property {"ReturnStatement"} kind - Node discriminator.
376
- * @property {Expression} expression - Returned expression.
897
+ * @property {Expression} [expression] - Returned expression; absent exactly for a bare void return.
898
+ * @property {SourceLocation} location - Source location.
899
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
900
+ */
901
+
902
+ /**
903
+ * @typedef ExpressionStatement
904
+ * @property {"ExpressionStatement"} kind - Node discriminator.
905
+ * @property {CallExpression | MethodCallExpression | EffectCallExpression} expression - A direct, receiver, or authorized call whose resolved return type is void.
377
906
  * @property {SourceLocation} location - Source location.
378
907
  * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
379
908
  */
@@ -388,8 +917,105 @@
388
917
  * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
389
918
  */
390
919
 
920
+ /**
921
+ * @typedef ValueBinding
922
+ * @property {"ValueBinding"} kind - Iteration-binding discriminator.
923
+ * @property {string} name - Body-local binding name.
924
+ * @property {SemanticValueType} type - Exact list element type.
925
+ * @property {false} mutable - Iteration bindings are always immutable.
926
+ * @property {SourceLocation} location - Binding source location.
927
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
928
+ */
929
+
930
+ /**
931
+ * @typedef ForEachStatement
932
+ * @property {"ForEachStatement"} kind - Ordered list-iteration discriminator.
933
+ * @property {string} [id] - Deterministic module-local loop identity, required after frontend validation.
934
+ * @property {Expression} list - List expression evaluated exactly once before traversal.
935
+ * @property {ValueBinding} valueBinding - Immutable binding scoped to the body.
936
+ * @property {Block} body - Loop body.
937
+ * @property {SourceLocation} location - Complete loop source location.
938
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
939
+ */
940
+
941
+ /**
942
+ * @typedef ForEachMapStatement
943
+ * @property {"ForEachMapStatement"} kind - Insertion-ordered map pair-iteration discriminator.
944
+ * @property {string} [id] - Deterministic module-local loop identity, required after frontend validation.
945
+ * @property {Expression} map - Ordered-map expression evaluated exactly once before traversal.
946
+ * @property {ValueBinding} keyBinding - Immutable string-key binding scoped to the body.
947
+ * @property {ValueBinding} valueBinding - Immutable homogeneous value binding scoped to the body.
948
+ * @property {Block} body - Loop body.
949
+ * @property {SourceLocation} location - Complete loop source location.
950
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
951
+ */
952
+
953
+ /**
954
+ * @typedef WhileStatement
955
+ * @property {"WhileStatement"} kind - Strict-Boolean pre-condition loop discriminator.
956
+ * @property {string} [id] - Deterministic module-local loop identity, required after frontend validation.
957
+ * @property {Expression} condition - Boolean expression evaluated before every iteration.
958
+ * @property {Block} body - Ordered loop body.
959
+ * @property {SourceLocation} location - Complete loop source location.
960
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
961
+ */
962
+
963
+ /**
964
+ * @typedef BreakStatement
965
+ * @property {"BreakStatement"} kind - Nearest-loop break discriminator.
966
+ * @property {string} [targetLoopId] - Resolved nearest-loop identity, required after frontend validation in loop context.
967
+ * @property {SourceLocation} location - Keyword source location.
968
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
969
+ */
970
+
971
+ /**
972
+ * @typedef ContinueStatement
973
+ * @property {"ContinueStatement"} kind - Nearest-loop continue discriminator.
974
+ * @property {string} [targetLoopId] - Resolved nearest-loop identity, required after frontend validation in loop context.
975
+ * @property {SourceLocation} location - Keyword source location.
976
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
977
+ */
978
+
979
+ /**
980
+ * @typedef ErrorConstruction
981
+ * @property {"ErrorConstruction"} kind - Construction of one declared unchecked error.
982
+ * @property {ErrorType} error - Exact nominal error type.
983
+ * @property {Expression} message - Sole immutable string payload.
984
+ * @property {SourceLocation} location - Complete construction source location.
985
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type and message ranges.
986
+ */
987
+
988
+ /**
989
+ * @typedef RaiseStatement
990
+ * @property {"RaiseStatement"} kind - Abrupt unchecked-error propagation.
991
+ * @property {ErrorConstruction} error - Exact constructed semantic error.
992
+ * @property {SourceLocation} location - Complete raise source location.
993
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned raise range.
994
+ */
995
+
996
+ /**
997
+ * @typedef CatchBinding
998
+ * @property {"CatchBinding"} kind - Exact-handler binding discriminator.
999
+ * @property {string} name - Handler-local binding name.
1000
+ * @property {ErrorType} type - Exact caught nominal error type.
1001
+ * @property {false} mutable - Catch bindings are immutable.
1002
+ * @property {SourceLocation} location - Binding source location.
1003
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned binding range.
1004
+ */
1005
+
1006
+ /**
1007
+ * @typedef TryStatement
1008
+ * @property {"TryStatement"} kind - One body and one exact typed handler.
1009
+ * @property {Block} body - Protected body.
1010
+ * @property {ErrorType} catchType - Exact caught nominal error type.
1011
+ * @property {CatchBinding} catchBinding - Immutable handler-local binding.
1012
+ * @property {Block} catchBody - Handler body.
1013
+ * @property {SourceLocation} location - Complete try/handler source location.
1014
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned try/catch ranges.
1015
+ */
1016
+
391
1017
  /** @typedef {LocalDeclaration | AssignmentStatement} LocalStatement */
392
- /** @typedef {LocalStatement | IfStatement | ReturnStatement | PrintStatement} Statement */
1018
+ /** @typedef {LocalStatement | PrivateFieldWriteStatement | ExpressionStatement | IfStatement | ForEachStatement | ForEachMapStatement | WhileStatement | BreakStatement | ContinueStatement | ReturnStatement | PrintStatement | RaiseStatement | TryStatement} Statement */
393
1019
 
394
1020
  /**
395
1021
  * @typedef Block
@@ -402,14 +1028,95 @@
402
1028
  /**
403
1029
  * @typedef FunctionDeclaration
404
1030
  * @property {"FunctionDeclaration"} kind - Node discriminator.
1031
+ * @property {string} [id] - Deterministic module-local declaration identity, required after frontend validation.
405
1032
  * @property {string} name - Function name.
1033
+ * @property {TypeParameter[]} [typeParameters] - Ordered declaration-scoped invariant unbounded parameters.
406
1034
  * @property {Parameter[]} parameters - Function parameters.
407
- * @property {TypeReference} returnType - Return type.
1035
+ * @property {SemanticFunctionReturnType} returnType - Return type.
408
1036
  * @property {Block} body - Function body.
409
1037
  * @property {SourceLocation} location - Source location.
410
1038
  * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
411
1039
  */
412
1040
 
1041
+ /**
1042
+ * @typedef RecordField
1043
+ * @property {"RecordField"} kind - Closed record-field discriminator.
1044
+ * @property {string} [id] - Stable module-local field identity, required after frontend validation.
1045
+ * @property {string} name - Field name.
1046
+ * @property {SemanticValueType} type - Exact field type.
1047
+ * @property {SourceLocation} location - Field declaration source location.
1048
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned name/type ranges.
1049
+ */
1050
+
1051
+ /**
1052
+ * @typedef RecordDeclaration
1053
+ * @property {"RecordDeclaration"} kind - Nominal closed immutable record declaration.
1054
+ * @property {string} [id] - Stable module-local declaration identity, required after frontend validation.
1055
+ * @property {string} name - Record name.
1056
+ * @property {TypeParameter[]} [typeParameters] - Ordered declaration-scoped invariant unbounded parameters.
1057
+ * @property {RecordField[]} fields - Ordered unique visible fields.
1058
+ * @property {SourceLocation} location - Complete declaration source location.
1059
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned declaration-name range.
1060
+ */
1061
+
1062
+ /**
1063
+ * @typedef PrivateField
1064
+ * @property {"PrivateField"} kind - Declaring-class-private mutable instance field.
1065
+ * @property {string} [id] - Stable class-scoped field identity, required after validation.
1066
+ * @property {string} name - Source-visible field name inside the declaring class only.
1067
+ * @property {SemanticValueType} type - Exact field type.
1068
+ * @property {SourceLocation} location - Field declaration location.
1069
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned name/type ranges.
1070
+ */
1071
+
1072
+ /**
1073
+ * @typedef ConstructorDeclaration
1074
+ * @property {"ConstructorDeclaration"} kind - Exact complete private-state initializer.
1075
+ * @property {string} [id] - Stable class-scoped constructor identity, required after validation.
1076
+ * @property {Parameter[]} parameters - Exact positional constructor signature.
1077
+ * @property {Block} body - Field-order initialization body.
1078
+ * @property {readonly ["host"]} [effects] - Inferred checked host-effect fact.
1079
+ * @property {string[]} [failureIds] - Ordered capability failures reachable through construction.
1080
+ * @property {SourceLocation} location - Complete constructor location.
1081
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned constructor range.
1082
+ */
1083
+
1084
+ /**
1085
+ * @typedef MethodDeclaration
1086
+ * @property {"MethodDeclaration"} kind - Receiver-bound class method.
1087
+ * @property {string} [id] - Stable class-scoped method identity, required after validation.
1088
+ * @property {string} name - Source-visible method name.
1089
+ * @property {Parameter[]} parameters - Exact positional method signature.
1090
+ * @property {SemanticFunctionReturnType} returnType - Exact return type.
1091
+ * @property {Block} body - Method body.
1092
+ * @property {readonly ["host"]} [effects] - Inferred checked host-effect fact.
1093
+ * @property {string[]} [failureIds] - Ordered capability failures reachable through the method.
1094
+ * @property {SourceLocation} location - Complete method location.
1095
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned method-name range.
1096
+ */
1097
+
1098
+ /**
1099
+ * @typedef ClassDeclaration
1100
+ * @property {"ClassDeclaration"} kind - Nominal reference class with private mutable state.
1101
+ * @property {string} [id] - Stable module-local class identity, required after validation.
1102
+ * @property {string} name - Source-visible class name.
1103
+ * @property {PrivateField[]} fields - Ordered private instance state.
1104
+ * @property {ConstructorDeclaration} constructor - Sole exact constructor.
1105
+ * @property {MethodDeclaration[]} methods - Ordered receiver methods.
1106
+ * @property {{kind: "ordinary"} | {kind: "ownedResource", fieldId: string, resourceId: string}} [ownership] - Explicit class ownership profile.
1107
+ * @property {SourceLocation} location - Complete class location.
1108
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned class-name range.
1109
+ */
1110
+
1111
+ /**
1112
+ * @typedef ErrorDeclaration
1113
+ * @property {"ErrorDeclaration"} kind - Nominal unchecked error with one immutable string message.
1114
+ * @property {string} [id] - Stable module-local declaration identity, required after frontend validation.
1115
+ * @property {string} name - Error type name.
1116
+ * @property {SourceLocation} location - Complete declaration source location.
1117
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned declaration-name range.
1118
+ */
1119
+
413
1120
  /**
414
1121
  * @typedef PrintStatement
415
1122
  * @property {"PrintStatement"} kind - Node discriminator.
@@ -429,6 +1136,10 @@
429
1136
  /**
430
1137
  * @typedef SemanticModule
431
1138
  * @property {"Module"} kind - Node discriminator.
1139
+ * @property {RecordDeclaration[]} [records] - Top-level nominal record declarations in source order; omitted when empty.
1140
+ * @property {ClassDeclaration[]} [classes] - Top-level nominal reference classes in source order; omitted when empty.
1141
+ * @property {ErrorDeclaration[]} [errors] - Top-level nominal unchecked error declarations in source order; omitted when empty.
1142
+ * @property {EffectCapabilityDeclaration[]} [capabilities] - Compiler-authorized Task 034 declarations; omission is the legacy empty set.
432
1143
  * @property {FunctionDeclaration[]} functions - Top-level functions.
433
1144
  * @property {EntryPoint} entryPoint - Executable entry point.
434
1145
  * @property {SourceLocation} location - Source location.
@@ -436,7 +1147,92 @@
436
1147
  * @property {SemanticProvenance} [provenance] - Parser-authored source and identity index; optional for legacy caller-authored modules.
437
1148
  */
438
1149
 
439
- /** @typedef {SemanticModule | FunctionDeclaration | Parameter | Block | Statement | EntryPoint | Expression | TypeReference} SemanticNode */
1150
+ /**
1151
+ * @typedef SemanticImport
1152
+ * @property {"Import"} kind - Node discriminator.
1153
+ * @property {string} moduleId - Stable imported semantic module identity.
1154
+ * @property {string} importedName - Exported declaration name in the source module.
1155
+ * @property {string} localName - Binding name visible in the importing module.
1156
+ * @property {SemanticDeclarationKind} symbolKind - Imported declaration namespace.
1157
+ * @property {string} declarationId - Stable resolved declaration identity.
1158
+ * @property {boolean} typeOnly - Whether source syntax admitted only type-position use.
1159
+ * @property {SourceLocation} location - Complete import declaration/specifier location.
1160
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned import ranges.
1161
+ * @property {StdlibFacadeResolutionEvidence} [stdlibFacade] - Exact parser-proved native facade identity evidence.
1162
+ */
1163
+
1164
+ /**
1165
+ * @typedef StdlibFacadeResolutionEvidence
1166
+ * @property {"SemantifoldStdlibFacadeResolution"} schema - Evidence schema.
1167
+ * @property {1} version - Evidence version.
1168
+ * @property {string} facadeIdentity - Selected facade identity.
1169
+ * @property {string} facadeVersion - Selected exact facade version.
1170
+ * @property {string} nativeModule - Parser-proved source stdlib module identity.
1171
+ * @property {string} nativeSymbol - Parser-proved source stdlib symbol identity.
1172
+ */
1173
+
1174
+ /**
1175
+ * @typedef SemanticExport
1176
+ * @property {"Export"} kind - Node discriminator.
1177
+ * @property {string} exportedName - Name visible to importing modules.
1178
+ * @property {SemanticDeclarationKind} symbolKind - Exported declaration namespace.
1179
+ * @property {string} declarationId - Stable exported declaration identity.
1180
+ * @property {SourceLocation} location - Complete export declaration/specifier location.
1181
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned export ranges.
1182
+ */
1183
+
1184
+ /**
1185
+ * @typedef SemanticProgramModule
1186
+ * @property {"Module"} kind - Node discriminator.
1187
+ * @property {string} id - Stable caller-supplied logical module identity.
1188
+ * @property {string} sourceFilename - Explicit source filename; never an implicit read request.
1189
+ * @property {RecordDeclaration[]} [records] - Top-level nominal record declarations.
1190
+ * @property {ClassDeclaration[]} [classes] - Compiler-owned facade reference classes.
1191
+ * @property {ErrorDeclaration[]} [errors] - Top-level nominal unchecked error declarations.
1192
+ * @property {FunctionDeclaration[]} functions - Top-level functions.
1193
+ * @property {SemanticImport[]} imports - Resolved imports in source order.
1194
+ * @property {SemanticExport[]} exports - Resolved exports in source order.
1195
+ * @property {EffectCapabilityDeclaration[]} [capabilities] - Authority declarations shared by reference when the program declares a standard-library contract.
1196
+ * @property {EntryPoint} [entryPoint] - Sole executable entry point, present only on the selected module.
1197
+ * @property {SourceLocation} location - Source location.
1198
+ * @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
1199
+ * @property {SemanticProvenance} [provenance] - Parser-authored source and identity index.
1200
+ * @property {{identity: string, version: string}} [stdlibFacade] - Selected compiler-owned facade module identity.
1201
+ */
1202
+
1203
+ /**
1204
+ * @typedef StdlibFacadeProgramModuleDescriptor
1205
+ * @property {{identity: string, range: string}[]} dependencies - Versioned facade dependencies.
1206
+ * @property {string} identity - Facade identity.
1207
+ * @property {({identity: string, kind: "module", symbols: string[]} | {forms: ("unqualified-call" | "receiver-call")[], identity: string, kind: "builtin", symbols: string[]})[]} nativeModules - Exact native source identities.
1208
+ * @property {({effects: string[], failures: string[], forms: ("direct-call" | "unqualified-call" | "receiver-call")[], kind: "function", name: string, ownership: "not-applicable", parameters: {name: string, type: string}[], returnType: string} | {constructor: {effects: string[], failures: string[], ownership: "acquired", parameters: {name: string, type: string}[]}, forms: ["constructor-call"], kind: "class", methods: {effects: string[], failures: string[], forms: ["receiver-call"], name: string, ownership: "borrowed" | "consumed", parameters: {name: string, type: string}[], returnType: string}[], name: string, ownership: "owned-reference"})[]} publicDeclarations - Public source declarations.
1209
+ * @property {{module: string, operations: string[], range: string}[]} requirements - Canonical capability requirements.
1210
+ * @property {string} runtimeProfile - Exact source runtime profile.
1211
+ * @property {string} sourceModule - Compiler-owned semantic module identity.
1212
+ * @property {string} version - Exact facade version.
1213
+ * @property {"internal" | "public"} visibility - Native-selectable visibility.
1214
+ */
1215
+
1216
+ /**
1217
+ * @typedef StdlibFacadeProgramDescriptor
1218
+ * @property {"SemantifoldStdlibFacades"} schema - Facade descriptor schema.
1219
+ * @property {1} version - Facade descriptor version.
1220
+ * @property {SemanticLanguage} language - Source-language compatibility profile.
1221
+ * @property {StdlibFacadeProgramModuleDescriptor[]} modules - Dependency-first selected executable closure.
1222
+ */
1223
+
1224
+ /**
1225
+ * @typedef SemanticProgram
1226
+ * @property {"Program"} kind - Node discriminator.
1227
+ * @property {SemanticProgramModule[]} modules - Dependency-first deterministic module order.
1228
+ * @property {string} entryModule - Stable identity of the sole entry module.
1229
+ * @property {RegisteredSource[]} sources - Caller-order complete source registry.
1230
+ * @property {{contractVersion?: string, identity: string}} [stdlibContract] - Declared standard-library contract; plain, never frozen.
1231
+ * @property {{contractVersion?: string, identity: string}[]} [stdlibContracts] - Ordered declared standard-library contracts; plain, never frozen.
1232
+ * @property {StdlibFacadeProgramDescriptor} [stdlibFacades] - Complete selected source-language facade closure.
1233
+ */
1234
+
1235
+ /** @typedef {SemanticModule | SemanticProgramModule | SemanticImport | SemanticExport | RecordDeclaration | ClassDeclaration | ErrorDeclaration | EffectCapabilityDeclaration | EffectResourceDeclaration | EffectFailureDeclaration | EffectOperationDeclaration | RecordField | PrivateField | ConstructorDeclaration | MethodDeclaration | FunctionDeclaration | TypeParameter | Parameter | ValueBinding | CatchBinding | Block | Statement | EntryPoint | Expression | ErrorConstruction | ErrorType | MapEntry | SemanticValueType | FunctionReturnTypeReference} SemanticNode */
440
1236
  /** @typedef {SemanticNode} SemanticNodeWithoutLocations */
441
1237
 
442
1238
  export {}