@techspokes/typescript-wsdl-client 1.1.3 → 1.1.5

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 (360) hide show
  1. package/README.md +50 -1
  2. package/dist/app/generateApp.d.ts.map +1 -1
  3. package/dist/app/generateApp.js +8 -6
  4. package/dist/cli.js +49 -5
  5. package/dist/client/checkedDirectRuntime.d.ts +59 -0
  6. package/dist/client/checkedDirectRuntime.d.ts.map +1 -0
  7. package/dist/client/checkedDirectRuntime.js +23 -0
  8. package/dist/client/directClientRuntime.d.ts +49 -0
  9. package/dist/client/directClientRuntime.d.ts.map +1 -0
  10. package/dist/client/directClientRuntime.js +112 -0
  11. package/dist/client/directClientVersion.d.ts +4 -0
  12. package/dist/client/directClientVersion.d.ts.map +1 -0
  13. package/dist/client/directClientVersion.js +3 -0
  14. package/dist/client/generateClient.d.ts.map +1 -1
  15. package/dist/client/generateClient.js +22 -9
  16. package/dist/client/generateDirectClient.d.ts +14 -0
  17. package/dist/client/generateDirectClient.d.ts.map +1 -0
  18. package/dist/client/generateDirectClient.js +136 -0
  19. package/dist/compiler/buildCanonicalGraph.d.ts +7 -0
  20. package/dist/compiler/buildCanonicalGraph.d.ts.map +1 -0
  21. package/dist/compiler/buildCanonicalGraph.js +381 -0
  22. package/dist/compiler/canonicalGraph.d.ts +198 -0
  23. package/dist/compiler/canonicalGraph.d.ts.map +1 -0
  24. package/dist/compiler/canonicalGraph.js +37 -0
  25. package/dist/compiler/catalogErrors.d.ts +18 -0
  26. package/dist/compiler/catalogErrors.d.ts.map +1 -0
  27. package/dist/compiler/catalogErrors.js +86 -0
  28. package/dist/compiler/catalogProvenance.d.ts +15 -0
  29. package/dist/compiler/catalogProvenance.d.ts.map +1 -0
  30. package/dist/compiler/catalogProvenance.js +229 -0
  31. package/dist/compiler/checkedAssessment.d.ts +91 -0
  32. package/dist/compiler/checkedAssessment.d.ts.map +1 -0
  33. package/dist/compiler/checkedAssessment.js +300 -0
  34. package/dist/compiler/checkedSourcePreparation.d.ts +35 -0
  35. package/dist/compiler/checkedSourcePreparation.d.ts.map +1 -0
  36. package/dist/compiler/checkedSourcePreparation.js +131 -0
  37. package/dist/compiler/complexTypeContent.d.ts +59 -0
  38. package/dist/compiler/complexTypeContent.d.ts.map +1 -0
  39. package/dist/compiler/complexTypeContent.js +558 -0
  40. package/dist/compiler/composeCanonicalGraph.d.ts +69 -0
  41. package/dist/compiler/composeCanonicalGraph.d.ts.map +1 -0
  42. package/dist/compiler/composeCanonicalGraph.js +252 -0
  43. package/dist/compiler/dataOwnership.d.ts +22 -0
  44. package/dist/compiler/dataOwnership.d.ts.map +1 -0
  45. package/dist/compiler/dataOwnership.js +157 -0
  46. package/dist/compiler/datatypeValues.d.ts +47 -0
  47. package/dist/compiler/datatypeValues.d.ts.map +1 -0
  48. package/dist/compiler/datatypeValues.js +275 -0
  49. package/dist/compiler/directCodec.d.ts +59 -0
  50. package/dist/compiler/directCodec.d.ts.map +1 -0
  51. package/dist/compiler/directCodec.js +192 -0
  52. package/dist/compiler/directExecutionPolicy.d.ts +10 -0
  53. package/dist/compiler/directExecutionPolicy.d.ts.map +1 -0
  54. package/dist/compiler/directExecutionPolicy.js +17 -0
  55. package/dist/compiler/directOperation.d.ts +72 -0
  56. package/dist/compiler/directOperation.d.ts.map +1 -0
  57. package/dist/compiler/directOperation.js +282 -0
  58. package/dist/compiler/directSoap.d.ts +42 -0
  59. package/dist/compiler/directSoap.d.ts.map +1 -0
  60. package/dist/compiler/directSoap.js +298 -0
  61. package/dist/compiler/directSoapSource.d.ts +15 -0
  62. package/dist/compiler/directSoapSource.d.ts.map +1 -0
  63. package/dist/compiler/directSoapSource.js +86 -0
  64. package/dist/compiler/directSourceCapsule.d.ts +97 -0
  65. package/dist/compiler/directSourceCapsule.d.ts.map +1 -0
  66. package/dist/compiler/directSourceCapsule.js +305 -0
  67. package/dist/compiler/directStructure.d.ts +51 -0
  68. package/dist/compiler/directStructure.d.ts.map +1 -0
  69. package/dist/compiler/directStructure.js +252 -0
  70. package/dist/compiler/directStructurePlan.d.ts +16 -0
  71. package/dist/compiler/directStructurePlan.d.ts.map +1 -0
  72. package/dist/compiler/directStructurePlan.js +58 -0
  73. package/dist/compiler/directValues.d.ts +69 -0
  74. package/dist/compiler/directValues.d.ts.map +1 -0
  75. package/dist/compiler/directValues.js +282 -0
  76. package/dist/compiler/finiteRe01Verification.d.ts +140 -0
  77. package/dist/compiler/finiteRe01Verification.d.ts.map +1 -0
  78. package/dist/compiler/finiteRe01Verification.js +830 -0
  79. package/dist/compiler/graphTraversal.d.ts +11 -0
  80. package/dist/compiler/graphTraversal.d.ts.map +1 -0
  81. package/dist/compiler/graphTraversal.js +37 -0
  82. package/dist/compiler/hypotheticalScopedIdentity.d.ts +23 -0
  83. package/dist/compiler/hypotheticalScopedIdentity.d.ts.map +1 -0
  84. package/dist/compiler/hypotheticalScopedIdentity.js +81 -0
  85. package/dist/compiler/occurrenceAnalysis.d.ts +65 -0
  86. package/dist/compiler/occurrenceAnalysis.d.ts.map +1 -0
  87. package/dist/compiler/occurrenceAnalysis.js +300 -0
  88. package/dist/compiler/originalSourceMembership.d.ts +6 -0
  89. package/dist/compiler/originalSourceMembership.d.ts.map +1 -0
  90. package/dist/compiler/originalSourceMembership.js +31 -0
  91. package/dist/compiler/particleAttribution.d.ts +17 -0
  92. package/dist/compiler/particleAttribution.d.ts.map +1 -0
  93. package/dist/compiler/particleAttribution.js +474 -0
  94. package/dist/compiler/particleDeclarationConsistency.d.ts +24 -0
  95. package/dist/compiler/particleDeclarationConsistency.d.ts.map +1 -0
  96. package/dist/compiler/particleDeclarationConsistency.js +197 -0
  97. package/dist/compiler/particleExtension.d.ts +22 -0
  98. package/dist/compiler/particleExtension.d.ts.map +1 -0
  99. package/dist/compiler/particleExtension.js +119 -0
  100. package/dist/compiler/particleLocalAssessment.d.ts +20 -0
  101. package/dist/compiler/particleLocalAssessment.d.ts.map +1 -0
  102. package/dist/compiler/particleLocalAssessment.js +92 -0
  103. package/dist/compiler/particleRestriction.d.ts +24 -0
  104. package/dist/compiler/particleRestriction.d.ts.map +1 -0
  105. package/dist/compiler/particleRestriction.js +489 -0
  106. package/dist/compiler/particleSemanticView.d.ts +50 -0
  107. package/dist/compiler/particleSemanticView.d.ts.map +1 -0
  108. package/dist/compiler/particleSemanticView.js +297 -0
  109. package/dist/compiler/particleWildcardRelation.d.ts +88 -0
  110. package/dist/compiler/particleWildcardRelation.d.ts.map +1 -0
  111. package/dist/compiler/particleWildcardRelation.js +143 -0
  112. package/dist/compiler/re01CandidateCorrespondence.d.ts +64 -0
  113. package/dist/compiler/re01CandidateCorrespondence.d.ts.map +1 -0
  114. package/dist/compiler/re01CandidateCorrespondence.js +572 -0
  115. package/dist/compiler/re01TypeProperties.d.ts +71 -0
  116. package/dist/compiler/re01TypeProperties.d.ts.map +1 -0
  117. package/dist/compiler/re01TypeProperties.js +120 -0
  118. package/dist/compiler/re01TypePropertyValidation.d.ts +23 -0
  119. package/dist/compiler/re01TypePropertyValidation.d.ts.map +1 -0
  120. package/dist/compiler/re01TypePropertyValidation.js +161 -0
  121. package/dist/compiler/resolveCanonicalGraph.d.ts +38 -0
  122. package/dist/compiler/resolveCanonicalGraph.d.ts.map +1 -0
  123. package/dist/compiler/resolveCanonicalGraph.js +170 -0
  124. package/dist/compiler/scalarSchemaAssessment.d.ts +425 -0
  125. package/dist/compiler/scalarSchemaAssessment.d.ts.map +1 -0
  126. package/dist/compiler/scalarSchemaAssessment.js +5198 -0
  127. package/dist/compiler/schemaAttributeGroupProperties.d.ts +17 -0
  128. package/dist/compiler/schemaAttributeGroupProperties.d.ts.map +1 -0
  129. package/dist/compiler/schemaAttributeGroupProperties.js +53 -0
  130. package/dist/compiler/schemaAttributeProperties.d.ts +10 -0
  131. package/dist/compiler/schemaAttributeProperties.d.ts.map +1 -0
  132. package/dist/compiler/schemaAttributeProperties.js +11 -0
  133. package/dist/compiler/schemaAttributeUses.d.ts +90 -0
  134. package/dist/compiler/schemaAttributeUses.d.ts.map +1 -0
  135. package/dist/compiler/schemaAttributeUses.js +725 -0
  136. package/dist/compiler/schemaBinaryWordReconstruction.d.ts +10 -0
  137. package/dist/compiler/schemaBinaryWordReconstruction.d.ts.map +1 -0
  138. package/dist/compiler/schemaBinaryWordReconstruction.js +33 -0
  139. package/dist/compiler/schemaBuiltinFacets.d.ts +14 -0
  140. package/dist/compiler/schemaBuiltinFacets.d.ts.map +1 -0
  141. package/dist/compiler/schemaBuiltinFacets.js +51 -0
  142. package/dist/compiler/schemaCalendarImages.d.ts +8 -0
  143. package/dist/compiler/schemaCalendarImages.d.ts.map +1 -0
  144. package/dist/compiler/schemaCalendarImages.js +204 -0
  145. package/dist/compiler/schemaCalendarLanguage.d.ts +11 -0
  146. package/dist/compiler/schemaCalendarLanguage.d.ts.map +1 -0
  147. package/dist/compiler/schemaCalendarLanguage.js +227 -0
  148. package/dist/compiler/schemaComponentEquality.d.ts +28 -0
  149. package/dist/compiler/schemaComponentEquality.d.ts.map +1 -0
  150. package/dist/compiler/schemaComponentEquality.js +446 -0
  151. package/dist/compiler/schemaConstructionAssessment.d.ts +46 -0
  152. package/dist/compiler/schemaConstructionAssessment.d.ts.map +1 -0
  153. package/dist/compiler/schemaConstructionAssessment.js +663 -0
  154. package/dist/compiler/schemaDatatypeValues.d.ts +4 -0
  155. package/dist/compiler/schemaDatatypeValues.d.ts.map +1 -0
  156. package/dist/compiler/schemaDatatypeValues.js +2 -0
  157. package/dist/compiler/schemaDecimalLanguage.d.ts +7 -0
  158. package/dist/compiler/schemaDecimalLanguage.d.ts.map +1 -0
  159. package/dist/compiler/schemaDecimalLanguage.js +102 -0
  160. package/dist/compiler/schemaDeclarationPrimitives.d.ts +34 -0
  161. package/dist/compiler/schemaDeclarationPrimitives.d.ts.map +1 -0
  162. package/dist/compiler/schemaDeclarationPrimitives.js +194 -0
  163. package/dist/compiler/schemaDocumentSyntax.d.ts +55 -0
  164. package/dist/compiler/schemaDocumentSyntax.d.ts.map +1 -0
  165. package/dist/compiler/schemaDocumentSyntax.js +294 -0
  166. package/dist/compiler/schemaDurationLanguage.d.ts +11 -0
  167. package/dist/compiler/schemaDurationLanguage.d.ts.map +1 -0
  168. package/dist/compiler/schemaDurationLanguage.js +170 -0
  169. package/dist/compiler/schemaElementProperties.d.ts +16 -0
  170. package/dist/compiler/schemaElementProperties.d.ts.map +1 -0
  171. package/dist/compiler/schemaElementProperties.js +23 -0
  172. package/dist/compiler/schemaEndpointWordCapacity.d.ts +36 -0
  173. package/dist/compiler/schemaEndpointWordCapacity.d.ts.map +1 -0
  174. package/dist/compiler/schemaEndpointWordCapacity.js +39 -0
  175. package/dist/compiler/schemaExactCalendar.d.ts +73 -0
  176. package/dist/compiler/schemaExactCalendar.d.ts.map +1 -0
  177. package/dist/compiler/schemaExactCalendar.js +264 -0
  178. package/dist/compiler/schemaFacetAnnotation.d.ts +32 -0
  179. package/dist/compiler/schemaFacetAnnotation.d.ts.map +1 -0
  180. package/dist/compiler/schemaFacetAnnotation.js +199 -0
  181. package/dist/compiler/schemaGeneratedScalarShape.d.ts +35 -0
  182. package/dist/compiler/schemaGeneratedScalarShape.d.ts.map +1 -0
  183. package/dist/compiler/schemaGeneratedScalarShape.js +176 -0
  184. package/dist/compiler/schemaIdentityConstraints.d.ts +73 -0
  185. package/dist/compiler/schemaIdentityConstraints.d.ts.map +1 -0
  186. package/dist/compiler/schemaIdentityConstraints.js +362 -0
  187. package/dist/compiler/schemaIeeeLanguage.d.ts +43 -0
  188. package/dist/compiler/schemaIeeeLanguage.d.ts.map +1 -0
  189. package/dist/compiler/schemaIeeeLanguage.js +759 -0
  190. package/dist/compiler/schemaIntegerImages.d.ts +11 -0
  191. package/dist/compiler/schemaIntegerImages.d.ts.map +1 -0
  192. package/dist/compiler/schemaIntegerImages.js +113 -0
  193. package/dist/compiler/schemaLexicalPredicates.d.ts +29 -0
  194. package/dist/compiler/schemaLexicalPredicates.d.ts.map +1 -0
  195. package/dist/compiler/schemaLexicalPredicates.js +63 -0
  196. package/dist/compiler/schemaNotationProperties.d.ts +32 -0
  197. package/dist/compiler/schemaNotationProperties.d.ts.map +1 -0
  198. package/dist/compiler/schemaNotationProperties.js +84 -0
  199. package/dist/compiler/schemaNumericImageConditions.d.ts +24 -0
  200. package/dist/compiler/schemaNumericImageConditions.d.ts.map +1 -0
  201. package/dist/compiler/schemaNumericImageConditions.js +66 -0
  202. package/dist/compiler/schemaParticleWildcardProperties.d.ts +20 -0
  203. package/dist/compiler/schemaParticleWildcardProperties.d.ts.map +1 -0
  204. package/dist/compiler/schemaParticleWildcardProperties.js +43 -0
  205. package/dist/compiler/schemaPattern.d.ts +1062 -0
  206. package/dist/compiler/schemaPattern.d.ts.map +1 -0
  207. package/dist/compiler/schemaPattern.js +581 -0
  208. package/dist/compiler/schemaRegularLanguage.d.ts +67 -0
  209. package/dist/compiler/schemaRegularLanguage.d.ts.map +1 -0
  210. package/dist/compiler/schemaRegularLanguage.js +1166 -0
  211. package/dist/compiler/schemaScalarContext.d.ts +81 -0
  212. package/dist/compiler/schemaScalarContext.d.ts.map +1 -0
  213. package/dist/compiler/schemaScalarContext.js +78 -0
  214. package/dist/compiler/schemaScalarKernel.d.ts +182 -0
  215. package/dist/compiler/schemaScalarKernel.d.ts.map +1 -0
  216. package/dist/compiler/schemaScalarKernel.js +391 -0
  217. package/dist/compiler/schemaScalarWitnesses.d.ts +6 -0
  218. package/dist/compiler/schemaScalarWitnesses.d.ts.map +1 -0
  219. package/dist/compiler/schemaScalarWitnesses.js +118 -0
  220. package/dist/compiler/schemaSimpleTypeProperties.d.ts +95 -0
  221. package/dist/compiler/schemaSimpleTypeProperties.d.ts.map +1 -0
  222. package/dist/compiler/schemaSimpleTypeProperties.js +103 -0
  223. package/dist/compiler/schemaSourceGrammar.d.ts +27 -0
  224. package/dist/compiler/schemaSourceGrammar.d.ts.map +1 -0
  225. package/dist/compiler/schemaSourceGrammar.js +290 -0
  226. package/dist/compiler/schemaSourceLexical.d.ts +4 -0
  227. package/dist/compiler/schemaSourceLexical.d.ts.map +1 -0
  228. package/dist/compiler/schemaSourceLexical.js +12 -0
  229. package/dist/compiler/schemaSourceValues.d.ts +51 -0
  230. package/dist/compiler/schemaSourceValues.d.ts.map +1 -0
  231. package/dist/compiler/schemaSourceValues.js +225 -0
  232. package/dist/compiler/schemaSourceWildcards.d.ts +28 -0
  233. package/dist/compiler/schemaSourceWildcards.d.ts.map +1 -0
  234. package/dist/compiler/schemaSourceWildcards.js +247 -0
  235. package/dist/compiler/schemaSymbolicSequences.d.ts +16 -0
  236. package/dist/compiler/schemaSymbolicSequences.d.ts.map +1 -0
  237. package/dist/compiler/schemaSymbolicSequences.js +99 -0
  238. package/dist/compiler/schemaSymbolicValueSets.d.ts +32 -0
  239. package/dist/compiler/schemaSymbolicValueSets.d.ts.map +1 -0
  240. package/dist/compiler/schemaSymbolicValueSets.js +149 -0
  241. package/dist/compiler/schemaSyntaxAssessment.d.ts +25 -0
  242. package/dist/compiler/schemaSyntaxAssessment.d.ts.map +1 -0
  243. package/dist/compiler/schemaSyntaxAssessment.js +361 -0
  244. package/dist/compiler/schemaTemporalAliases.d.ts +6 -0
  245. package/dist/compiler/schemaTemporalAliases.d.ts.map +1 -0
  246. package/dist/compiler/schemaTemporalAliases.js +195 -0
  247. package/dist/compiler/schemaTokenImages.d.ts +9 -0
  248. package/dist/compiler/schemaTokenImages.d.ts.map +1 -0
  249. package/dist/compiler/schemaTokenImages.js +142 -0
  250. package/dist/compiler/schemaTypeIdentity.d.ts +39 -0
  251. package/dist/compiler/schemaTypeIdentity.d.ts.map +1 -0
  252. package/dist/compiler/schemaTypeIdentity.js +78 -0
  253. package/dist/compiler/schemaTypeRelations.d.ts +38 -0
  254. package/dist/compiler/schemaTypeRelations.d.ts.map +1 -0
  255. package/dist/compiler/schemaTypeRelations.js +576 -0
  256. package/dist/compiler/schemaUri.d.ts +13 -0
  257. package/dist/compiler/schemaUri.d.ts.map +1 -0
  258. package/dist/compiler/schemaUri.js +103 -0
  259. package/dist/compiler/schemaValueContext.d.ts +26 -0
  260. package/dist/compiler/schemaValueContext.d.ts.map +1 -0
  261. package/dist/compiler/schemaValueContext.js +1 -0
  262. package/dist/compiler/schemaValueImages.d.ts +10 -0
  263. package/dist/compiler/schemaValueImages.d.ts.map +1 -0
  264. package/dist/compiler/schemaValueImages.js +142 -0
  265. package/dist/compiler/schemaValueSequences.d.ts +15 -0
  266. package/dist/compiler/schemaValueSequences.d.ts.map +1 -0
  267. package/dist/compiler/schemaValueSequences.js +19 -0
  268. package/dist/compiler/semanticBudget.d.ts +50 -0
  269. package/dist/compiler/semanticBudget.d.ts.map +1 -0
  270. package/dist/compiler/semanticBudget.js +178 -0
  271. package/dist/compiler/semanticCatalog.d.ts +122 -0
  272. package/dist/compiler/semanticCatalog.d.ts.map +1 -0
  273. package/dist/compiler/semanticCatalog.js +160 -0
  274. package/dist/compiler/semanticContext.d.ts +172 -0
  275. package/dist/compiler/semanticContext.d.ts.map +1 -0
  276. package/dist/compiler/semanticContext.js +1168 -0
  277. package/dist/compiler/semanticTypeDependencies.d.ts +8 -0
  278. package/dist/compiler/semanticTypeDependencies.d.ts.map +1 -0
  279. package/dist/compiler/semanticTypeDependencies.js +64 -0
  280. package/dist/compiler/semanticTypeReference.d.ts +24 -0
  281. package/dist/compiler/semanticTypeReference.d.ts.map +1 -0
  282. package/dist/compiler/semanticTypeReference.js +36 -0
  283. package/dist/compiler/shapeResolver.d.ts +1 -0
  284. package/dist/compiler/shapeResolver.d.ts.map +1 -1
  285. package/dist/compiler/shapeResolver.js +7 -9
  286. package/dist/compiler/sourceSchemaBinding.d.ts +26 -0
  287. package/dist/compiler/sourceSchemaBinding.d.ts.map +1 -0
  288. package/dist/compiler/sourceSchemaBinding.js +39 -0
  289. package/dist/compiler/structuralCompanions.d.ts +16 -0
  290. package/dist/compiler/structuralCompanions.d.ts.map +1 -0
  291. package/dist/compiler/structuralCompanions.js +232 -0
  292. package/dist/compiler/validateSemanticGraph.d.ts +5 -0
  293. package/dist/compiler/validateSemanticGraph.d.ts.map +1 -0
  294. package/dist/compiler/validateSemanticGraph.js +376 -0
  295. package/dist/compiler/wildcardAlgebra.d.ts +26 -0
  296. package/dist/compiler/wildcardAlgebra.d.ts.map +1 -0
  297. package/dist/compiler/wildcardAlgebra.js +155 -0
  298. package/dist/gateway/generateGateway.d.ts.map +1 -1
  299. package/dist/gateway/generateGateway.js +2 -2
  300. package/dist/index.d.ts +3 -0
  301. package/dist/index.d.ts.map +1 -1
  302. package/dist/index.js +2 -0
  303. package/dist/loader/orderedSyntax.d.ts +77 -0
  304. package/dist/loader/orderedSyntax.d.ts.map +1 -0
  305. package/dist/loader/orderedSyntax.js +202 -0
  306. package/dist/loader/resolutionDepth.d.ts +7 -0
  307. package/dist/loader/resolutionDepth.d.ts.map +1 -0
  308. package/dist/loader/resolutionDepth.js +65 -0
  309. package/dist/loader/schemaInput.d.ts +53 -0
  310. package/dist/loader/schemaInput.d.ts.map +1 -0
  311. package/dist/loader/schemaInput.js +212 -0
  312. package/dist/loader/schemaResources.d.ts +59 -0
  313. package/dist/loader/schemaResources.d.ts.map +1 -0
  314. package/dist/loader/schemaResources.js +292 -0
  315. package/dist/openapi/generateOpenAPI.d.ts.map +1 -1
  316. package/dist/openapi/generateOpenAPI.js +2 -2
  317. package/dist/test/generateTests.d.ts.map +1 -1
  318. package/dist/test/generateTests.js +2 -2
  319. package/dist/util/xmlWhitespace.d.ts +3 -0
  320. package/dist/util/xmlWhitespace.d.ts.map +1 -0
  321. package/dist/util/xmlWhitespace.js +4 -0
  322. package/docs/README.md +14 -1
  323. package/docs/architecture.md +9 -0
  324. package/docs/cli-reference.md +21 -1
  325. package/docs/content-model-analysis.md +92 -0
  326. package/docs/content-model-baseline.md +121 -0
  327. package/docs/content-model-catalog.md +116 -0
  328. package/docs/content-model-companions.md +90 -0
  329. package/docs/content-model-composition.md +103 -0
  330. package/docs/content-model-decisions.md +79 -0
  331. package/docs/content-model-gateway-feasibility.md +169 -0
  332. package/docs/content-model-graph.md +121 -0
  333. package/docs/content-model-loading.md +163 -0
  334. package/docs/content-model-matching.md +85 -0
  335. package/docs/content-model-readiness.md +144 -0
  336. package/docs/content-model-resolution.md +81 -0
  337. package/docs/content-model-s02-handoff.md +98 -0
  338. package/docs/content-model-s06-au-01.md +425 -0
  339. package/docs/content-model-s06-dt-01.md +386 -0
  340. package/docs/content-model-s06-pw-01.md +350 -0
  341. package/docs/content-model-s06-re-01-resolver-implementation.md +869 -0
  342. package/docs/content-model-s06-re-01-resolver.md +513 -0
  343. package/docs/content-model-s06-re-01-scalar-witnesses.md +1423 -0
  344. package/docs/content-model-s06-re-01-support-reconstruction.md +6337 -0
  345. package/docs/content-model-s06-re-01.md +7477 -0
  346. package/docs/content-model-s06-research-handoff.md +909 -0
  347. package/docs/content-model-shipped-fix.md +83 -0
  348. package/docs/content-model-soap-feasibility.md +165 -0
  349. package/docs/decisions/002-streamable-responses.md +2 -0
  350. package/docs/decisions/003-content-model-contracts.md +280 -0
  351. package/docs/direct-values.md +311 -0
  352. package/docs/generated-code.md +4 -0
  353. package/docs/reference-validation.md +243 -0
  354. package/docs/releases/v1.1.4.md +36 -0
  355. package/docs/releases/v1.1.5.md +38 -0
  356. package/docs/roadmap/README.md +2 -2
  357. package/docs/supported-patterns.md +13 -5
  358. package/package.json +27 -13
  359. package/src/generation/preambles/direct-client/typescript.preamble +3 -0
  360. package/src/runtime/clientStreamMethods.tpl.txt +1 -1
@@ -0,0 +1,294 @@
1
+ import { XSD_NAMESPACE, XML_NAMESPACE } from '../loader/orderedSyntax.js';
2
+ import { assertSemanticContext, prepareSemanticRequest } from './semanticContext.js';
3
+ import { createSemanticBudget } from './semanticBudget.js';
4
+ import { normalizeWhitespace } from './schemaDatatypeValues.js';
5
+ import { schemaUri } from './schemaUri.js';
6
+ import { assessSchemaSourceWildcards, validSchemaXmlLanguage } from './schemaSourceWildcards.js';
7
+ import { checkNotationProperties, equalNotationProperties, notationNameKey, readSourceNotationProperties, sourceNotationNamespace } from './schemaNotationProperties.js';
8
+ import { prepareBoundSourceGraph, sourceSchemasForResolvedGraph } from './sourceSchemaBinding.js';
9
+ const sourceDocuments = new WeakMap();
10
+ /**
11
+ * One issued input snapshot owns both graph construction and retained source syntax.
12
+ * Loading happened before entry. Canonical construction/reference resolution retain
13
+ * their named legacy limits; the snapshot/context/syntax share the supplied budget.
14
+ */
15
+ export function prepareSourceSchemaRequest(input, options = {}) {
16
+ const budget = options.budget ?? createSemanticBudget();
17
+ const source = prepareBoundSourceGraph(input, { budget, sourceLimits: options.sourceLimits, accountPreparation: options.accountPreparation });
18
+ if (source.kind !== 'prepared')
19
+ return source;
20
+ return budget.guard(() => {
21
+ const prepared = prepareSemanticRequest(source.resolved, { budget });
22
+ if (prepared.kind === 'prepared') {
23
+ budget.chargeWork(2);
24
+ sourceDocuments.set(prepared.request.actual, sourceSchemasForResolvedGraph(source.resolved));
25
+ }
26
+ return prepared;
27
+ });
28
+ }
29
+ class DocumentProblem extends Error {
30
+ kind;
31
+ rule;
32
+ source;
33
+ constructor(kind, rule, message, source) {
34
+ super(message);
35
+ this.kind = kind;
36
+ this.rule = rule;
37
+ this.source = source;
38
+ }
39
+ }
40
+ const globals = new Set(['simpleType', 'complexType', 'element', 'attribute', 'group', 'attributeGroup', 'notation']);
41
+ const unsupported = new Set(['redefine', 'override', 'assert', 'assertion', 'alternative', 'openContent', 'defaultOpenContent', 'explicitTimezone']);
42
+ const rootAttributes = ['id', 'attributeFormDefault', 'elementFormDefault', 'blockDefault', 'finalDefault', 'targetNamespace', 'version'];
43
+ /** Checks source document representation only; component grammar/semantics remain owned elsewhere. */
44
+ export function checkSchemaDocumentSyntax(context) {
45
+ assertSemanticContext(context);
46
+ const budget = context.budget;
47
+ return budget.guard(() => {
48
+ budget.chargeWork(100);
49
+ if (context.kind !== 'actual')
50
+ return Object.freeze({ kind: 'unresolved', rule: 'actual-source-only' });
51
+ const schemas = sourceDocuments.get(context);
52
+ if (!schemas)
53
+ return Object.freeze({ kind: 'unresolved', rule: 'missing-source-syntax' });
54
+ budget.chargeWork(16);
55
+ const checkedRoots = new Set();
56
+ const sources = [];
57
+ const wildcardObligations = [];
58
+ const step = (_owner, count = 1) => budget.chargeWork(count);
59
+ const text = (value) => budget.chargeWork(2 + value.length * 4);
60
+ const fail = (node, rule, message) => {
61
+ budget.chargeWork(8 + rule.length + message.length);
62
+ throw new DocumentProblem('invalid-schema', rule, message, node.source);
63
+ };
64
+ const rejectUnsupported = (node) => {
65
+ text(node.name.local);
66
+ budget.chargeWork(150);
67
+ throw new DocumentProblem('unsupported-capability', `xsd:${node.name.local}`, 'Source feature is outside the approved XSD 1.0 profile', node.source);
68
+ };
69
+ const value = (node, name) => {
70
+ for (const attr of node.attributes) {
71
+ budget.chargeWork(4);
72
+ text(attr.name.local);
73
+ if (attr.name.namespace === '' && attr.name.local === name) {
74
+ text(attr.value);
75
+ return normalizeWhitespace(attr.value, 'collapse');
76
+ }
77
+ }
78
+ return undefined;
79
+ };
80
+ const uri = (node, lexical) => {
81
+ if (!schemaUri(lexical, node, { step }))
82
+ fail(node, 'schema-for-schemas', 'Invalid schema anyURI value');
83
+ };
84
+ const notationProperties = (node, namespace) => {
85
+ const mapped = readSourceNotationProperties(node, namespace, budget);
86
+ if (mapped.kind === 'invalid-schema')
87
+ return fail(node, mapped.rule, mapped.message);
88
+ return mapped.properties;
89
+ };
90
+ const attrs = (node, allowed, language = false) => {
91
+ for (const attr of node.attributes) {
92
+ budget.chargeWork(10 + allowed.length);
93
+ text(attr.name.local);
94
+ text(attr.name.namespace);
95
+ text(attr.value);
96
+ if (language && attr.name.namespace === XML_NAMESPACE && attr.name.local === 'lang') {
97
+ if (!validSchemaXmlLanguage(attr.value, budget))
98
+ fail(node, 'schema-for-schemas', 'Invalid language value');
99
+ }
100
+ else if (attr.name.namespace === XSD_NAMESPACE || attr.name.namespace === '' && !allowed.includes(attr.name.local)) {
101
+ fail(node, 'schema-for-schemas', 'Attribute is not permitted in this schema document syntax');
102
+ }
103
+ }
104
+ };
105
+ const children = (node) => {
106
+ budget.chargeWork(2);
107
+ const result = [];
108
+ for (const child of node.children) {
109
+ budget.chargeWork(3);
110
+ if (child.kind === 'element') {
111
+ budget.chargeWork();
112
+ result.push(child);
113
+ }
114
+ else {
115
+ text(child.value);
116
+ if (/[^\t\r\n ]/.test(child.value))
117
+ fail(node, 'schema-for-schemas', 'Schema syntax requires element-only content');
118
+ }
119
+ }
120
+ return result;
121
+ };
122
+ try {
123
+ for (const schema of schemas) {
124
+ budget.chargeWork(8);
125
+ text(schema.key);
126
+ text(schema.digest);
127
+ sources.push(Object.freeze({ key: schema.key, digest: schema.digest, source: schema.syntax.source }));
128
+ const root = schema.syntax;
129
+ if (checkedRoots.has(root))
130
+ continue;
131
+ budget.chargeWork(5);
132
+ checkedRoots.add(root);
133
+ // Preserve source-profile classification before evaluating the separate
134
+ // S4S instance episode. Inert annotation descendants are not components.
135
+ budget.chargeWork(2);
136
+ const sourceStack = [root];
137
+ while (sourceStack.length) {
138
+ budget.chargeWork(3);
139
+ const node = sourceStack.pop();
140
+ if (node.name.namespace !== XSD_NAMESPACE)
141
+ continue;
142
+ text(node.name.local);
143
+ if (unsupported.has(node.name.local))
144
+ rejectUnsupported(node);
145
+ if (node.name.local === 'annotation')
146
+ continue;
147
+ for (const child of node.children) {
148
+ budget.chargeWork(2);
149
+ if (child.kind === 'element') {
150
+ budget.chargeWork();
151
+ sourceStack.push(child);
152
+ }
153
+ }
154
+ }
155
+ const wildcardResult = assessSchemaSourceWildcards(root, budget);
156
+ if (wildcardResult.kind !== 'checked')
157
+ return wildcardResult;
158
+ budget.chargeWork(wildcardResult.remaining.length + 1);
159
+ wildcardObligations.push(...wildcardResult.remaining);
160
+ attrs(root, rootAttributes, true);
161
+ const namespace = value(root, 'targetNamespace');
162
+ if (namespace !== undefined) {
163
+ if (namespace === '')
164
+ fail(root, 'declare-schema', 'An explicit target namespace cannot be empty');
165
+ uri(root, namespace);
166
+ }
167
+ for (const name of ['attributeFormDefault', 'elementFormDefault']) {
168
+ const form = value(root, name);
169
+ if (form !== undefined && form !== 'qualified' && form !== 'unqualified')
170
+ fail(root, 'schema-for-schemas', 'Invalid schema form default');
171
+ }
172
+ for (const name of ['blockDefault', 'finalDefault']) {
173
+ const lexical = value(root, name);
174
+ if (lexical === undefined || lexical === '' || lexical === '#all')
175
+ continue;
176
+ text(lexical);
177
+ budget.chargeWork(10);
178
+ const allowed = name === 'blockDefault' ? ['extension', 'restriction', 'substitution'] : ['extension', 'restriction', 'list', 'union'];
179
+ if (lexical.split(' ').some(token => !allowed.includes(token)))
180
+ fail(root, 'schema-for-schemas', 'Invalid schema default derivation set');
181
+ }
182
+ budget.chargeWork();
183
+ const notationNames = new Set();
184
+ let declarations = false;
185
+ for (const child of children(root)) {
186
+ budget.chargeWork(4);
187
+ text(child.name.local);
188
+ text(child.name.namespace);
189
+ if (child.name.namespace !== XSD_NAMESPACE)
190
+ fail(child, 'schema-for-schemas', 'Schema root child must be an XSD declaration');
191
+ const role = child.name.local;
192
+ if (unsupported.has(role))
193
+ rejectUnsupported(child);
194
+ if (role === 'annotation')
195
+ continue;
196
+ if (role === 'include' || role === 'import') {
197
+ if (declarations)
198
+ fail(child, 'schema-for-schemas', 'Schema directives must precede declarations');
199
+ attrs(child, role === 'include' ? ['id', 'schemaLocation'] : ['id', 'namespace', 'schemaLocation']);
200
+ const location = value(child, 'schemaLocation');
201
+ if (location !== undefined)
202
+ uri(child, location);
203
+ else if (role === 'include')
204
+ fail(child, 'schema-for-schemas', 'Include requires schemaLocation');
205
+ if (role === 'import') {
206
+ const imported = value(child, 'namespace');
207
+ if (imported !== undefined) {
208
+ uri(child, imported);
209
+ if (imported === namespace)
210
+ fail(child, 'src-import', 'Import namespace must differ from the enclosing target namespace');
211
+ }
212
+ else if (namespace === undefined)
213
+ fail(child, 'src-import', 'Import without namespace requires an enclosing target namespace');
214
+ }
215
+ continue;
216
+ }
217
+ if (!globals.has(role))
218
+ fail(child, 'schema-for-schemas', 'Unexpected schema root child');
219
+ declarations = true;
220
+ if (role === 'notation') {
221
+ attrs(child, ['id', 'name', 'public', 'system']);
222
+ const properties = notationProperties(child, namespace ?? '');
223
+ const valid = checkNotationProperties(properties, budget);
224
+ if (valid.kind === 'invalid-schema')
225
+ fail(child, valid.rule, valid.message);
226
+ const name = properties.name.local;
227
+ // S4S schema/notation key is scoped to this physical schema root.
228
+ // Equal cross-document representations are reconciled separately.
229
+ text(name);
230
+ budget.chargeWork(2);
231
+ if (notationNames.has(name))
232
+ fail(child, 'schema-notation-key', 'Notation names must be unique within their schema validation root');
233
+ notationNames.add(name);
234
+ }
235
+ }
236
+ // Contextual S4S owns typed ID/IDREF scope across source and payload;
237
+ // the source profile walk above does not type them a second time.
238
+ }
239
+ // no-identity fixes top-level notation identity by component kind and
240
+ // expanded name. Equal complete property records describe that one
241
+ // component even when represented by distinct original XML declarations.
242
+ // Absence is a property state, not unknown information to fill from peers.
243
+ // All original annotations and document obligations were checked above.
244
+ budget.chargeWork(3);
245
+ const notations = new Map();
246
+ let namespaceInterpretation = false;
247
+ for (const schema of schemas) {
248
+ budget.chargeWork(5);
249
+ text(schema.targetNamespace);
250
+ text(schema.context.namespace);
251
+ const effectiveNamespace = sourceNotationNamespace(schema, budget);
252
+ // The legacy loader preserves raw namespace spellings. Source anyURI
253
+ // normalization must not silently certify that legacy symbol mapping.
254
+ if (schema.targetNamespace !== effectiveNamespace)
255
+ namespaceInterpretation = true;
256
+ for (const child of schema.syntax.children) {
257
+ budget.chargeWork(5);
258
+ if (child.kind !== 'element' || child.name.namespace !== XSD_NAMESPACE || child.name.local !== 'notation')
259
+ continue;
260
+ const properties = notationProperties(child, effectiveNamespace);
261
+ const key = notationNameKey(properties.name, budget);
262
+ const previous = notations.get(key);
263
+ if (previous !== undefined) {
264
+ if (!equalNotationProperties(previous, properties, budget)) {
265
+ fail(child, 'notation-component-properties', 'Same-name notation representations must have equal public and system identifier properties');
266
+ }
267
+ }
268
+ else {
269
+ budget.chargeWork();
270
+ notations.set(key, properties);
271
+ }
272
+ }
273
+ }
274
+ budget.chargeWork(500 + context.contextId.length);
275
+ const remaining = ['child-component-syntax', 'semantic-construction'];
276
+ for (const category of ['foreign-attribute-assessment', 'annotation-payload-assessment']) {
277
+ budget.chargeWork(wildcardObligations.length + 1);
278
+ if (wildcardObligations.some(obligation => obligation.category === category))
279
+ remaining.push(category);
280
+ }
281
+ if (namespaceInterpretation)
282
+ remaining.push('namespace-interpretation');
283
+ return Object.freeze({ kind: 'checked', authority: 'XSD10-schema-document-syntax-v1', scope: 'schema-document-source-syntax',
284
+ contextId: context.contextId, sources: Object.freeze(sources), remaining: Object.freeze(remaining),
285
+ wildcardObligations: Object.freeze(wildcardObligations) });
286
+ }
287
+ catch (error) {
288
+ if (!(error instanceof DocumentProblem))
289
+ throw error;
290
+ budget.chargeWork(180 + error.rule.length + error.message.length);
291
+ return Object.freeze({ kind: error.kind, rule: error.rule, message: error.message, source: error.source });
292
+ }
293
+ });
294
+ }
@@ -0,0 +1,11 @@
1
+ import type { Duration } from './schemaExactCalendar.js';
2
+ import type { RegularLanguage } from './schemaRegularLanguage.js';
3
+ import { schemaRegularLanguages } from './schemaRegularLanguage.js';
4
+ import type { SchemaPatternContext } from './schemaValueContext.js';
5
+ export declare function schemaDurationLanguages<Owner>(c: SchemaPatternContext<Owner>, regular: ReturnType<typeof schemaRegularLanguages<Owner>>, expression: (text: string, owner: Owner) => RegularLanguage): {
6
+ bound: (input: RegularLanguage, endpoint: Duration, name: "minInclusive" | "minExclusive" | "maxInclusive" | "maxExclusive", owner: Owner) => RegularLanguage;
7
+ valid: (owner: Owner) => Readonly<{
8
+ kind: "private-regular-language";
9
+ }>;
10
+ };
11
+ //# sourceMappingURL=schemaDurationLanguage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaDurationLanguage.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaDurationLanguage.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAA0B,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAChF,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAC,sBAAsB,EAAC,MAAM,4BAA4B,CAAC;AAGlE,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAGlE,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC,EACtI,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,eAAe;mBAyCrC,eAAe,YAAY,QAAQ,QAAQ,cAAc,GAAG,cAAc,GAAG,cAAc,GAAG,cAAc,SAAS,KAAK,KAAG,eAAe;mBAF5I,KAAK;;;EA0F5B"}
@@ -0,0 +1,170 @@
1
+ /** Complete duration-bound preimages for the four strict Appendix E anchors. */
2
+ import { addDuration, parseCalendar } from './schemaExactCalendar.js';
3
+ import { schemaRegularLanguages } from './schemaRegularLanguage.js';
4
+ import { schemaDecimalLanguages } from './schemaDecimalLanguage.js';
5
+ import { durationAliasExpressions } from './schemaTemporalAliases.js';
6
+ const ANCHORS = ['1696-09-01T00:00:00Z', '1697-02-01T00:00:00Z', '1903-03-01T00:00:00Z', '1903-07-01T00:00:00Z'];
7
+ export function schemaDurationLanguages(c, regular, expression) {
8
+ const decimals = schemaDecimalLanguages(c);
9
+ const integer = '[0-9]+', seconds = '[0-9]+([.][0-9]+)?';
10
+ const rest = '([0-9]+D)?(T([0-9]+H)?([0-9]+M)?(' + seconds + 'S)?)?';
11
+ const time = '(T([0-9]+H)?([0-9]+M)?(' + seconds + 'S)?)?';
12
+ const budget = (owner) => ({ charge: count => c.step(owner, count),
13
+ arithmetic: digits => c.step(owner, (digits + 4) ** 2), text: value => { c.text(value, owner); } });
14
+ const text = (value, owner) => {
15
+ c.step(owner, (value.digits + value.scale + 4) ** 2);
16
+ c.step(owner, value.digits + value.scale + 4);
17
+ const negative = value.coefficient < 0n, digits = (negative ? -value.coefficient : value.coefficient).toString().padStart(value.scale + 1, '0');
18
+ return (negative ? '-' : '') + (value.scale ? digits.slice(0, -value.scale) + '.' + digits.slice(-value.scale) : digits);
19
+ };
20
+ const field = (value, unit, owner, digits) => {
21
+ c.step(owner, (digits + 4) ** 2 + digits * 2 + 16);
22
+ return value ? '0*' + value.toString() + unit : '(0+' + unit + ')?';
23
+ };
24
+ const relation = (value, greater, owner) => {
25
+ const source = decimals.relation(text(value, owner), greater, owner);
26
+ return source === undefined ? regular.union([], owner) : expression(source, owner);
27
+ };
28
+ const integers = (source, prefix, suffix, maximum, owner, digits) => {
29
+ function* values() {
30
+ if (maximum < 0n)
31
+ return;
32
+ c.step(owner, prefix.length + suffix.length + 8);
33
+ const p = expression(prefix, owner), s = expression(suffix, owner);
34
+ const projected = regular.intersect([regular.quotient(source, p, s, owner), expression(integer, owner)], owner);
35
+ const zero = regular.witness(regular.intersect([projected, expression('0+', owner)], owner), owner) !== undefined
36
+ || regular.witness(regular.intersect([source, regular.concatenate([p, expression(suffix.slice(1), owner)], owner)], owner), owner) !== undefined;
37
+ if (zero)
38
+ yield 0n;
39
+ // Removing leading zeroes preserves the numeric image, and the finite
40
+ // upper bound makes the remaining canonical-word graph acyclic.
41
+ const canonical = regular.intersect([regular.quotient(projected, expression('0*', owner), expression('', owner), owner),
42
+ expression('[1-9][0-9]*', owner), regular.negate(relation({ coefficient: maximum, scale: 0, digits }, true, owner), owner)], owner);
43
+ const finite = regular.finiteWords(canonical, owner);
44
+ if (finite.kind !== 'finite')
45
+ throw new TypeError('A bounded canonical nonnegative integer language must be finite');
46
+ for (const word of finite.words) {
47
+ c.step(owner, (word.length + 4) ** 2);
48
+ yield BigInt(word);
49
+ }
50
+ }
51
+ return values();
52
+ };
53
+ const valid = (owner) => regular.intersect([expression('\\-?P([0-9]+Y)?([0-9]+M)?' + rest, owner),
54
+ regular.negate(expression('\\-?P|\\-?P([0-9]+Y)?([0-9]+M)?([0-9]+D)?T', owner), owner)], owner);
55
+ const bound = (input, endpoint, name, owner) => {
56
+ const source = regular.intersect([input, valid(owner)], owner), greater = name.startsWith('min'), b = budget(owner);
57
+ b.arithmetic(endpoint.digits + endpoint.seconds.scale + 16);
58
+ const scale = endpoint.seconds.scale, power = 10n ** BigInt(scale), unit = 28n * 86400n * power;
59
+ const digits = endpoint.digits + scale + 64;
60
+ const integerText = (value) => { c.step(owner, (digits + 4) ** 2 + digits + 2); return value.toString(); };
61
+ c.step(owner, 16);
62
+ const starts = ANCHORS.map(anchor => parseCalendar('dateTime', anchor, b));
63
+ const targets = starts.map(start => addDuration(start, endpoint, b));
64
+ let largest = 0n;
65
+ for (let index = 0; index < starts.length; index++) {
66
+ b.arithmetic(endpoint.digits + starts[index].digits + scale + 16);
67
+ const delta = targets[index].coefficient - starts[index].seconds.coefficient * power;
68
+ const magnitude = delta < 0n ? -delta : delta;
69
+ if (magnitude > largest)
70
+ largest = magnitude;
71
+ }
72
+ b.arithmetic(endpoint.digits + scale + 16);
73
+ const cutoff = largest / unit + 2n;
74
+ c.step(owner, 4);
75
+ const choices = [];
76
+ const possible = (value) => regular.witness(regular.intersect([source, expression(value, owner)], owner), owner) !== undefined;
77
+ const append = (value) => { c.step(owner, value.length + 2); choices.push(regular.intersect([source, expression(value, owner)], owner)); };
78
+ const secondsPredicate = (prefix, threshold, more) => {
79
+ b.arithmetic(threshold.digits + threshold.scale + 16);
80
+ const p = 10n ** BigInt(threshold.scale), coefficient = threshold.coefficient;
81
+ if (coefficient < 0n) {
82
+ if (more)
83
+ append(prefix + rest);
84
+ return;
85
+ }
86
+ const floorDay = coefficient / (86400n * p);
87
+ const large = (limit) => {
88
+ const language = decimals.relation(integerText(limit), true, owner);
89
+ c.step(owner, language.length + 8);
90
+ return '(' + language + ')';
91
+ };
92
+ if (more)
93
+ append(prefix + large(floorDay) + 'D' + time);
94
+ for (const day of integers(source, prefix, 'D' + time, floorDay, owner, digits)) {
95
+ b.arithmetic(threshold.digits + threshold.scale + 16);
96
+ const afterDay = coefficient - day * 86400n * p, dayPrefix = prefix + field(day, 'D', owner, digits);
97
+ // No T denotes exactly the integral day contribution.
98
+ if (more ? afterDay < 0n : afterDay > 0n)
99
+ append(dayPrefix);
100
+ const hLimit = afterDay / (3600n * p);
101
+ if (more)
102
+ append(dayPrefix + 'T' + large(hLimit) + 'H([0-9]+M)?(' + seconds + 'S)?');
103
+ for (const hour of integers(source, dayPrefix + 'T', 'H([0-9]+M)?(' + seconds + 'S)?', hLimit, owner, digits)) {
104
+ b.arithmetic(threshold.digits + threshold.scale + 16);
105
+ const afterHour = afterDay - hour * 3600n * p, hourPrefix = dayPrefix + 'T' + field(hour, 'H', owner, digits), minuteLimit = afterHour / (60n * p);
106
+ if (more)
107
+ append(hourPrefix + large(minuteLimit) + 'M(' + seconds + 'S)?');
108
+ for (const minute of integers(source, hourPrefix, 'M(' + seconds + 'S)?', minuteLimit, owner, digits)) {
109
+ b.arithmetic(threshold.digits + threshold.scale + 16);
110
+ const remainder = afterHour - minute * 60n * p, minutePrefix = hourPrefix + field(minute, 'M', owner, digits);
111
+ const predicate = relation({ ...threshold, coefficient: remainder }, more, owner);
112
+ choices.push(regular.intersect([source, regular.concatenate([expression(minutePrefix, owner),
113
+ regular.intersect([expression(seconds, owner), predicate], owner), expression('S', owner)], owner)], owner));
114
+ if (!more && remainder > 0n)
115
+ append(minutePrefix);
116
+ }
117
+ // An omitted minute is zero and is already represented above.
118
+ }
119
+ // Omitted hours/minutes are represented by the zero projections.
120
+ }
121
+ };
122
+ for (const negative of [false, true]) {
123
+ const prefix = (negative ? '\\-' : '') + 'P';
124
+ const automatic = negative ? !greater : greater;
125
+ const yearLimit = (cutoff - 1n) / 12n;
126
+ if (automatic) {
127
+ const y = decimals.relation(integerText(yearLimit), true, owner);
128
+ append(prefix + '(' + y + ')Y([0-9]+M)?' + rest);
129
+ }
130
+ for (const year of integers(source, prefix, 'Y([0-9]+M)?' + rest, yearLimit, owner, digits)) {
131
+ const yPrefix = prefix + field(year, 'Y', owner, digits), monthLimit = cutoff - 1n - year * 12n;
132
+ if (automatic) {
133
+ const m = decimals.relation(integerText(monthLimit), true, owner);
134
+ append(yPrefix + '(' + m + ')M' + rest);
135
+ }
136
+ for (const month of integers(source, yPrefix, 'M' + rest, monthLimit, owner, digits)) {
137
+ const mPrefix = yPrefix + field(month, 'M', owner, digits);
138
+ if (!possible(mPrefix + rest))
139
+ continue;
140
+ b.arithmetic(endpoint.digits + scale + 32);
141
+ const magnitude = year * 12n + month;
142
+ c.step(owner, 8);
143
+ const duration = { months: negative ? -magnitude : magnitude,
144
+ seconds: { coefficient: 0n, scale: 0, digits: 1 }, digits: endpoint.digits + 32, lexical: '' };
145
+ const deltas = starts.map((start, index) => {
146
+ const at = addDuration(start, duration, b);
147
+ b.arithmetic(endpoint.digits + at.digits + scale + 16);
148
+ return negative ? at.coefficient * power - targets[index].coefficient : targets[index].coefficient - at.coefficient * power;
149
+ });
150
+ const more = negative ? !greater : greater;
151
+ let threshold = deltas[0];
152
+ for (const delta of deltas) {
153
+ c.step(owner);
154
+ if (more ? delta > threshold : delta < threshold)
155
+ threshold = delta;
156
+ }
157
+ secondsPredicate(mPrefix, { coefficient: threshold, scale, digits: endpoint.digits + scale + 32 }, more);
158
+ }
159
+ }
160
+ }
161
+ // Appendix E returns equality only for the same (months, seconds) pair.
162
+ // Equality at all four anchors with a different pair is indeterminate.
163
+ if (name.endsWith('Inclusive'))
164
+ for (const alias of durationAliasExpressions(endpoint, owner, c, possible))
165
+ append(alias);
166
+ c.step(owner, choices.length + 2);
167
+ return regular.union(choices, owner);
168
+ };
169
+ return { bound, valid };
170
+ }
@@ -0,0 +1,16 @@
1
+ /** Abstract declaration flags; GraphNode carries the other canonical declaration properties. */
2
+ import type { NodeId } from './canonicalGraph.js';
3
+ import type { SemanticBudget } from './semanticBudget.js';
4
+ import type { SemanticTypeReference } from './semanticTypeReference.js';
5
+ import type { OriginalIdentityConstraintId } from './schemaIdentityConstraints.js';
6
+ export type RawElementProperties = Readonly<{
7
+ element: NodeId;
8
+ /** Explicit semantic type overrides the canonical source contribution. */
9
+ type?: SemanticTypeReference;
10
+ /** Original IC identities only, admitted at this ELEMENT's genuine first birth. */
11
+ identityConstraints?: readonly OriginalIdentityConstraintId[];
12
+ final: readonly ('restriction' | 'extension')[];
13
+ block: readonly ('restriction' | 'extension' | 'substitution')[];
14
+ }>;
15
+ export declare function validateRawElementShape(value: unknown, budget: SemanticBudget): value is RawElementProperties;
16
+ //# sourceMappingURL=schemaElementProperties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaElementProperties.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaElementProperties.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAC,4BAA4B,EAAC,MAAM,gCAAgC,CAAC;AACjF,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,mFAAmF;IACnF,mBAAmB,CAAC,EAAE,SAAS,4BAA4B,EAAE,CAAC;IAC9D,KAAK,EAAE,SAAS,CAAC,aAAa,GAAG,WAAW,CAAC,EAAE,CAAC;IAChD,KAAK,EAAE,SAAS,CAAC,aAAa,GAAG,WAAW,GAAG,cAAc,CAAC,EAAE,CAAC;CAClE,CAAC,CAAC;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,GAAG,KAAK,IAAI,oBAAoB,CAgB7G"}
@@ -0,0 +1,23 @@
1
+ import { assertSemanticTypeReferenceShape } from './semanticTypeReference.js';
2
+ export function validateRawElementShape(value, budget) {
3
+ budget.chargeWork(8);
4
+ if (!value || typeof value !== 'object' || Array.isArray(value))
5
+ return false;
6
+ const row = value;
7
+ if (typeof row.element !== 'string' || !Array.isArray(row.final) || !Array.isArray(row.block))
8
+ return false;
9
+ if (row.type !== undefined)
10
+ assertSemanticTypeReferenceShape(row.type, budget);
11
+ if (row.identityConstraints !== undefined) {
12
+ if (!Array.isArray(row.identityConstraints))
13
+ return false;
14
+ budget.chargeWork(4 + row.identityConstraints.length * 2);
15
+ for (const identity of row.identityConstraints) {
16
+ if (typeof identity !== 'string')
17
+ return false;
18
+ budget.chargeWork(identity.length);
19
+ }
20
+ }
21
+ budget.chargeWork(row.element.length + row.final.length * 4 + row.block.length * 4);
22
+ return row.final.every(x => x === 'restriction' || x === 'extension') && row.block.every(x => x === 'restriction' || x === 'extension' || x === 'substitution');
23
+ }
@@ -0,0 +1,36 @@
1
+ /** Private alias capacity builder; its metrics come from the formed scalar owner. */
2
+ export type EndpointCapacityExpression = Readonly<{
3
+ kind: 'integer';
4
+ value: string;
5
+ }> | Readonly<{
6
+ kind: 'add' | 'multiply';
7
+ children: readonly EndpointCapacityExpression[];
8
+ }> | Readonly<{
9
+ kind: 'power';
10
+ base: EndpointCapacityExpression;
11
+ exponent: string;
12
+ }>;
13
+ export type EndpointCapacityMetrics = Readonly<{
14
+ family: string;
15
+ roles: number;
16
+ formulaLeaves: number;
17
+ rawMaskStates: number;
18
+ constantCount: number;
19
+ constantTextUnits: number;
20
+ inputMagnitude: bigint;
21
+ magnitudeDigits: number;
22
+ }>;
23
+ export declare function endpointCapacity(metrics: EndpointCapacityMetrics, step: (count: number) => void): {
24
+ kind: "finite-capacity";
25
+ family: string;
26
+ roles: number;
27
+ formulaLeaves: number;
28
+ maskStates: number;
29
+ constants: number;
30
+ equations: number;
31
+ tracks: number;
32
+ fieldStates: EndpointCapacityExpression;
33
+ jointStates: EndpointCapacityExpression;
34
+ encodedTuple: EndpointCapacityExpression;
35
+ };
36
+ //# sourceMappingURL=schemaEndpointWordCapacity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaEndpointWordCapacity.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaEndpointWordCapacity.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAAC,GAC/E,QAAQ,CAAC;IAAC,IAAI,EAAE,KAAK,GAAG,UAAU,CAAC;IAAC,QAAQ,EAAE,SAAS,0BAA0B,EAAE,CAAA;CAAC,CAAC,GACrF,QAAQ,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,0BAA0B,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAAC,CAAC;AAClF,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAC1H,aAAa,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAC,CAAC,CAAC;AACtG,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;;;;;;;;;;;;EA+B/F"}
@@ -0,0 +1,39 @@
1
+ export function endpointCapacity(metrics, step) {
2
+ // Reserve the entire fixed AST topology, rest arrays, closures and metadata before construction.
3
+ step(1024 + metrics.magnitudeDigits * 2);
4
+ const count = (n) => {
5
+ if (!Number.isSafeInteger(n) || n < 0) {
6
+ step(Number.MAX_SAFE_INTEGER);
7
+ throw new Error('Unreachable exhausted capacity count');
8
+ }
9
+ return n;
10
+ };
11
+ const integer = (value) => {
12
+ const digits = typeof value === 'number' ? 24 : metrics.magnitudeDigits + 64;
13
+ step(digits + 8);
14
+ const text = value.toString();
15
+ return { kind: 'integer', value: text };
16
+ };
17
+ const combine = (kind, children) => {
18
+ step(children.length + 4);
19
+ return { kind, children };
20
+ };
21
+ const power = (base, exponent) => {
22
+ count(exponent);
23
+ step(32);
24
+ return { kind: 'power', base, exponent: String(exponent) };
25
+ };
26
+ const add = (...parts) => combine('add', parts);
27
+ const multiply = (...parts) => combine('multiply', parts);
28
+ const nStates = count(1 + metrics.rawMaskStates + 16 * metrics.constantTextUnits + 512);
29
+ const equations = count(16 * metrics.formulaLeaves + 4 * metrics.roles + 4);
30
+ const tracks = count(7 * metrics.roles + 6 * metrics.constantCount + equations + 1);
31
+ step((metrics.magnitudeDigits + 64) ** 2 + 16);
32
+ const carry = BigInt(tracks + 1) * 1000000000000000n * (1n + metrics.inputMagnitude);
33
+ const fieldStates = power(integer(2), count(64 * (nStates + 1)));
34
+ const jointStates = multiply(add(power(multiply(integer(2), fieldStates), tracks), power(add(fieldStates, integer(1)), tracks)), power(integer(2n * carry + 1n), equations), power(integer(2), tracks));
35
+ const encodedTuple = multiply(integer(count(2 * metrics.roles)), add(multiply(integer(8), add(jointStates, integer(1))), integer(count(2 * nStates + 64))));
36
+ step(16);
37
+ return { kind: 'finite-capacity', family: metrics.family, roles: metrics.roles, formulaLeaves: metrics.formulaLeaves,
38
+ maskStates: metrics.rawMaskStates, constants: metrics.constantCount, equations, tracks, fieldStates, jointStates, encodedTuple };
39
+ }