@techspokes/typescript-wsdl-client 1.1.5 → 1.2.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 (505) hide show
  1. package/README.md +80 -68
  2. package/dist/app/generateApp.d.ts +0 -1
  3. package/dist/app/generateApp.js +1 -1
  4. package/dist/app/generateCheckedApp.d.ts +38 -0
  5. package/dist/app/generateCheckedApp.js +108 -0
  6. package/dist/checkedPipeline.d.ts +155 -0
  7. package/dist/checkedPipeline.js +448 -0
  8. package/dist/checkedPlanning.d.ts +123 -0
  9. package/dist/checkedPlanning.js +268 -0
  10. package/dist/cli.d.ts +0 -1
  11. package/dist/cli.js +92 -2
  12. package/dist/client/checkedDirectRuntime.d.ts +40 -3
  13. package/dist/client/checkedDirectRuntime.js +28 -8
  14. package/dist/client/directClientRuntime.d.ts +27 -2
  15. package/dist/client/directClientRuntime.js +142 -89
  16. package/dist/client/directClientVersion.d.ts +3 -1
  17. package/dist/client/directClientVersion.js +3 -0
  18. package/dist/client/generateClient.d.ts +0 -1
  19. package/dist/client/generateClient.js +98 -28
  20. package/dist/client/generateDirectClient.d.ts +21 -3
  21. package/dist/client/generateDirectClient.js +138 -6
  22. package/dist/client/generateOperations.d.ts +0 -1
  23. package/dist/client/generateOperations.js +30 -11
  24. package/dist/client/generateTypes.d.ts +0 -1
  25. package/dist/client/generateUtils.d.ts +0 -1
  26. package/dist/client/generateUtils.js +7 -1
  27. package/dist/compiler/applicationGroups.d.ts +53 -0
  28. package/dist/compiler/applicationGroups.js +403 -0
  29. package/dist/compiler/buildCanonicalGraph.d.ts +0 -1
  30. package/dist/compiler/canonicalGraph.d.ts +4 -16
  31. package/dist/compiler/canonicalGraph.js +1 -8
  32. package/dist/compiler/catalogErrors.d.ts +0 -1
  33. package/dist/compiler/catalogProvenance.d.ts +0 -1
  34. package/dist/compiler/checkedAssessment.d.ts +0 -1
  35. package/dist/compiler/checkedAssessment.js +1 -1
  36. package/dist/compiler/checkedComponentSource.d.ts +16 -0
  37. package/dist/compiler/checkedComponentSource.js +31 -0
  38. package/dist/compiler/checkedSourcePreparation.d.ts +38 -1
  39. package/dist/compiler/checkedSourcePreparation.js +71 -0
  40. package/dist/compiler/complexTypeContent.d.ts +5 -6
  41. package/dist/compiler/complexTypeContent.js +2 -2
  42. package/dist/compiler/componentCorrespondence.d.ts +32 -0
  43. package/dist/compiler/componentCorrespondence.js +140 -0
  44. package/dist/compiler/componentRecordProjection.d.ts +112 -0
  45. package/dist/compiler/componentRecordProjection.js +329 -0
  46. package/dist/compiler/componentSoapPreparation.d.ts +20 -0
  47. package/dist/compiler/componentSoapPreparation.js +36 -0
  48. package/dist/compiler/composeCanonicalGraph.d.ts +0 -1
  49. package/dist/compiler/dataOwnership.d.ts +0 -1
  50. package/dist/compiler/dataOwnership.js +14 -4
  51. package/dist/compiler/datatypeValues.d.ts +0 -1
  52. package/dist/compiler/declarationIdentity.d.ts +22 -0
  53. package/dist/compiler/declarationIdentity.js +9 -0
  54. package/dist/compiler/directCodec.d.ts +79 -2
  55. package/dist/compiler/directCodec.js +310 -92
  56. package/dist/compiler/directExecutionPolicy.d.ts +0 -1
  57. package/dist/compiler/directOperation.d.ts +72 -8
  58. package/dist/compiler/directOperation.js +164 -19
  59. package/dist/compiler/directSoap.d.ts +29 -5
  60. package/dist/compiler/directSoap.js +154 -44
  61. package/dist/compiler/directSoapSource.d.ts +24 -1
  62. package/dist/compiler/directSoapSource.js +166 -19
  63. package/dist/compiler/directSourceCapsule.d.ts +74 -2
  64. package/dist/compiler/directSourceCapsule.js +484 -6
  65. package/dist/compiler/directStructure.d.ts +83 -6
  66. package/dist/compiler/directStructure.js +353 -58
  67. package/dist/compiler/directStructurePlan.d.ts +144 -2
  68. package/dist/compiler/directStructurePlan.js +615 -30
  69. package/dist/compiler/directValues.d.ts +76 -5
  70. package/dist/compiler/directValues.js +967 -117
  71. package/dist/compiler/finiteRe01Construction.d.ts +69 -0
  72. package/dist/compiler/finiteRe01Construction.js +422 -0
  73. package/dist/compiler/finiteRe01Verification.d.ts +81 -3
  74. package/dist/compiler/finiteRe01Verification.js +391 -4
  75. package/dist/compiler/generateCatalog.d.ts +0 -1
  76. package/dist/compiler/graphTraversal.d.ts +0 -1
  77. package/dist/compiler/hypotheticalScopedIdentity.d.ts +0 -1
  78. package/dist/compiler/legacyDeclarations.d.ts +26 -0
  79. package/dist/compiler/legacyDeclarations.js +144 -0
  80. package/dist/compiler/occurrenceAnalysis.d.ts +2 -1
  81. package/dist/compiler/occurrenceAnalysis.js +23 -7
  82. package/dist/compiler/originalSourceMembership.d.ts +0 -1
  83. package/dist/compiler/particleAttribution.d.ts +0 -1
  84. package/dist/compiler/particleAttribution.js +20 -0
  85. package/dist/compiler/particleDeclarationConsistency.d.ts +0 -1
  86. package/dist/compiler/particleDeclarationConsistency.js +9 -0
  87. package/dist/compiler/particleExtension.d.ts +0 -1
  88. package/dist/compiler/particleExtension.js +5 -1
  89. package/dist/compiler/particleLocalAssessment.d.ts +0 -1
  90. package/dist/compiler/particleRestriction.d.ts +0 -1
  91. package/dist/compiler/particleRestriction.js +6 -1
  92. package/dist/compiler/particleSemanticView.d.ts +2 -1
  93. package/dist/compiler/particleSemanticView.js +16 -3
  94. package/dist/compiler/particleWildcardRelation.d.ts +0 -1
  95. package/dist/compiler/projectionScalar.d.ts +49 -0
  96. package/dist/compiler/projectionScalar.js +218 -0
  97. package/dist/compiler/re01CandidateAssignments.d.ts +95 -0
  98. package/dist/compiler/re01CandidateAssignments.js +341 -0
  99. package/dist/compiler/re01CandidateCorrespondence.d.ts +22 -1
  100. package/dist/compiler/re01CandidateCorrespondence.js +167 -38
  101. package/dist/compiler/re01TypeProperties.d.ts +0 -1
  102. package/dist/compiler/re01TypePropertyValidation.d.ts +0 -1
  103. package/dist/compiler/resolveCanonicalGraph.d.ts +5 -2
  104. package/dist/compiler/resolveCanonicalGraph.js +77 -7
  105. package/dist/compiler/rpcStringValues.d.ts +30 -0
  106. package/dist/compiler/rpcStringValues.js +196 -0
  107. package/dist/compiler/rpcTypedValues.d.ts +48 -0
  108. package/dist/compiler/rpcTypedValues.js +190 -0
  109. package/dist/compiler/scalarSchemaAssessment.d.ts +0 -1
  110. package/dist/compiler/schemaAttributeGroupProperties.d.ts +0 -1
  111. package/dist/compiler/schemaAttributeProperties.d.ts +0 -1
  112. package/dist/compiler/schemaAttributeUses.d.ts +22 -2
  113. package/dist/compiler/schemaAttributeUses.js +86 -13
  114. package/dist/compiler/schemaBinaryWordReconstruction.d.ts +0 -1
  115. package/dist/compiler/schemaBuiltinFacets.d.ts +0 -1
  116. package/dist/compiler/schemaCalendarImages.d.ts +0 -1
  117. package/dist/compiler/schemaCalendarLanguage.d.ts +0 -1
  118. package/dist/compiler/schemaCompiler.d.ts +0 -1
  119. package/dist/compiler/schemaCompiler.js +44 -109
  120. package/dist/compiler/schemaComponentEquality.d.ts +0 -1
  121. package/dist/compiler/schemaConstructionAssessment.d.ts +34 -1
  122. package/dist/compiler/schemaConstructionAssessment.js +88 -6
  123. package/dist/compiler/schemaDatatypeValues.d.ts +0 -1
  124. package/dist/compiler/schemaDecimalLanguage.d.ts +0 -1
  125. package/dist/compiler/schemaDeclarationPrimitives.d.ts +7 -2
  126. package/dist/compiler/schemaDeclarationPrimitives.js +18 -1
  127. package/dist/compiler/schemaDocumentSyntax.d.ts +0 -1
  128. package/dist/compiler/schemaDurationLanguage.d.ts +0 -1
  129. package/dist/compiler/schemaElementInstance.d.ts +30 -0
  130. package/dist/compiler/schemaElementInstance.js +45 -0
  131. package/dist/compiler/schemaElementProperties.d.ts +0 -1
  132. package/dist/compiler/schemaEndpointWordCapacity.d.ts +0 -1
  133. package/dist/compiler/schemaExactCalendar.d.ts +0 -1
  134. package/dist/compiler/schemaFacetAnnotation.d.ts +0 -1
  135. package/dist/compiler/schemaGeneratedScalarShape.d.ts +0 -1
  136. package/dist/compiler/schemaGeneratedScalarShape.js +2 -0
  137. package/dist/compiler/schemaIdentityConstraints.d.ts +0 -1
  138. package/dist/compiler/schemaIeeeLanguage.d.ts +0 -1
  139. package/dist/compiler/schemaIntegerImages.d.ts +0 -1
  140. package/dist/compiler/schemaLexicalPredicates.d.ts +0 -1
  141. package/dist/compiler/schemaNotationProperties.d.ts +0 -1
  142. package/dist/compiler/schemaNumericImageConditions.d.ts +0 -1
  143. package/dist/compiler/schemaParticleWildcardProperties.d.ts +0 -1
  144. package/dist/compiler/schemaPattern.d.ts +0 -1
  145. package/dist/compiler/schemaRegularLanguage.d.ts +0 -1
  146. package/dist/compiler/schemaScalarContext.d.ts +5 -1
  147. package/dist/compiler/schemaScalarKernel.d.ts +0 -1
  148. package/dist/compiler/schemaScalarWitnesses.d.ts +0 -1
  149. package/dist/compiler/schemaSimpleTypeProperties.d.ts +0 -1
  150. package/dist/compiler/schemaSourceGrammar.d.ts +0 -1
  151. package/dist/compiler/schemaSourceLexical.d.ts +0 -1
  152. package/dist/compiler/schemaSourceValues.d.ts +0 -1
  153. package/dist/compiler/schemaSourceWildcards.d.ts +1 -2
  154. package/dist/compiler/schemaSourceWildcards.js +3 -1
  155. package/dist/compiler/schemaSymbolicSequences.d.ts +0 -1
  156. package/dist/compiler/schemaSymbolicValueSets.d.ts +0 -1
  157. package/dist/compiler/schemaSyntaxAssessment.d.ts +0 -1
  158. package/dist/compiler/schemaTemporalAliases.d.ts +0 -1
  159. package/dist/compiler/schemaTokenImages.d.ts +0 -1
  160. package/dist/compiler/schemaTypeIdentity.d.ts +0 -1
  161. package/dist/compiler/schemaTypeIdentity.js +2 -0
  162. package/dist/compiler/schemaTypeRelations.d.ts +0 -1
  163. package/dist/compiler/schemaUri.d.ts +0 -1
  164. package/dist/compiler/schemaValueContext.d.ts +0 -1
  165. package/dist/compiler/schemaValueImages.d.ts +0 -1
  166. package/dist/compiler/schemaValueSequences.d.ts +0 -1
  167. package/dist/compiler/semanticBudget.d.ts +18 -1
  168. package/dist/compiler/semanticBudget.js +17 -2
  169. package/dist/compiler/semanticCatalog.d.ts +2 -3
  170. package/dist/compiler/semanticContext.d.ts +12 -1
  171. package/dist/compiler/semanticContext.js +39 -0
  172. package/dist/compiler/semanticTypeDependencies.d.ts +0 -1
  173. package/dist/compiler/semanticTypeReference.d.ts +0 -1
  174. package/dist/compiler/shapeResolver.d.ts +0 -1
  175. package/dist/compiler/soapHeaders.d.ts +16 -0
  176. package/dist/compiler/soapHeaders.js +42 -0
  177. package/dist/compiler/sourceSchemaBinding.d.ts +0 -1
  178. package/dist/compiler/standardSchemaComponents.d.ts +71 -0
  179. package/dist/compiler/standardSchemaComponents.js +74 -0
  180. package/dist/compiler/standardSchemaConstruction.d.ts +20 -0
  181. package/dist/compiler/standardSchemaConstruction.js +34 -0
  182. package/dist/compiler/structuralCompanions.d.ts +0 -1
  183. package/dist/compiler/validateSemanticGraph.d.ts +0 -1
  184. package/dist/compiler/wildcardAlgebra.d.ts +0 -1
  185. package/dist/compiler/wsdlPolicyRequirements.d.ts +43 -0
  186. package/dist/compiler/wsdlPolicyRequirements.js +239 -0
  187. package/dist/config.d.ts +0 -1
  188. package/dist/gateway/generateCheckedGateway.d.ts +32 -0
  189. package/dist/gateway/generateCheckedGateway.js +293 -0
  190. package/dist/gateway/generateComposedGateway.d.ts +16 -0
  191. package/dist/gateway/generateComposedGateway.js +65 -0
  192. package/dist/gateway/generateGateway.d.ts +0 -1
  193. package/dist/gateway/generateGateway.js +1 -0
  194. package/dist/gateway/generators.d.ts +0 -1
  195. package/dist/gateway/generators.js +19 -4
  196. package/dist/gateway/helpers.d.ts +1 -1
  197. package/dist/gateway/helpers.js +15 -0
  198. package/dist/generation/componentShape.d.ts +14 -0
  199. package/dist/generation/componentShape.js +293 -0
  200. package/dist/generation/preamble.d.ts +0 -1
  201. package/dist/generation/sourceLayout.d.ts +13 -0
  202. package/dist/generation/sourceLayout.js +40 -0
  203. package/dist/generation/writeGeneratedSource.d.ts +0 -1
  204. package/dist/index.d.ts +11 -2
  205. package/dist/index.js +4 -1
  206. package/dist/loader/fetch.d.ts +0 -1
  207. package/dist/loader/orderedSyntax.d.ts +12 -1
  208. package/dist/loader/orderedSyntax.js +40 -6
  209. package/dist/loader/resolutionDepth.d.ts +0 -1
  210. package/dist/loader/schemaInput.d.ts +28 -1
  211. package/dist/loader/schemaInput.js +41 -4
  212. package/dist/loader/schemaResources.d.ts +2 -1
  213. package/dist/loader/schemaResources.js +45 -4
  214. package/dist/loader/wsdlLoader.d.ts +0 -1
  215. package/dist/multiServicePipeline.d.ts +41 -0
  216. package/dist/multiServicePipeline.js +287 -0
  217. package/dist/openapi/casing.d.ts +0 -1
  218. package/dist/openapi/composeOpenAPI.d.ts +29 -0
  219. package/dist/openapi/composeOpenAPI.js +322 -0
  220. package/dist/openapi/generateOpenAPI.d.ts +0 -1
  221. package/dist/openapi/generatePaths.d.ts +0 -1
  222. package/dist/openapi/generateSchemas.d.ts +0 -1
  223. package/dist/openapi/security.d.ts +0 -1
  224. package/dist/pipeline.d.ts +7 -3
  225. package/dist/pipeline.js +15 -0
  226. package/dist/test/generateCheckedTests.d.ts +17 -0
  227. package/dist/test/generateCheckedTests.js +60 -0
  228. package/dist/test/generateTests.d.ts +0 -1
  229. package/dist/test/generators.d.ts +0 -1
  230. package/dist/test/mockData.d.ts +0 -1
  231. package/dist/test/mockData.js +20 -14
  232. package/dist/util/attributeWildcards.d.ts +0 -1
  233. package/dist/util/builder.d.ts +0 -1
  234. package/dist/util/catalogMeta.d.ts +0 -1
  235. package/dist/util/checkedCliDiagnostics.d.ts +11 -0
  236. package/dist/util/checkedCliDiagnostics.js +22 -0
  237. package/dist/util/cli.d.ts +0 -1
  238. package/dist/util/errors.d.ts +0 -1
  239. package/dist/util/imports.d.ts +0 -1
  240. package/dist/util/runtimeSource.d.ts +0 -1
  241. package/dist/util/runtimeSource.js +3 -5
  242. package/dist/util/securityConfig.d.ts +0 -1
  243. package/dist/util/streamConfig.d.ts +0 -1
  244. package/dist/util/tools.d.ts +0 -1
  245. package/dist/util/xmlWhitespace.d.ts +0 -1
  246. package/dist/xsd/primitives.d.ts +0 -1
  247. package/docs/agent-skill.md +12 -1
  248. package/docs/api-reference.md +127 -9
  249. package/docs/checked-gateway.md +212 -0
  250. package/docs/checked-generation.md +167 -0
  251. package/docs/cli-reference.md +48 -6
  252. package/docs/concepts.md +139 -5
  253. package/docs/configuration.md +15 -4
  254. package/docs/corpus.md +33 -0
  255. package/docs/direct-values.md +13 -13
  256. package/docs/examples/checked-forecast.wsdl +19 -0
  257. package/docs/gateway-guide.md +104 -27
  258. package/docs/generated-code.md +22 -11
  259. package/docs/mapping-contract.md +114 -0
  260. package/docs/migration-playbook.md +5 -1
  261. package/docs/migration.md +124 -6
  262. package/docs/output-anatomy.md +21 -18
  263. package/docs/production.md +7 -5
  264. package/docs/start-here.md +19 -3
  265. package/docs/supported-patterns.md +24 -3
  266. package/docs/testing.md +119 -31
  267. package/docs/troubleshooting.md +3 -1
  268. package/llms.txt +16 -8
  269. package/package.json +64 -23
  270. package/src/runtime/checkedGatewayHost.tpl.txt +157 -0
  271. package/src/runtime/clientStreamMethods.tpl.txt +156 -148
  272. package/src/runtime/operationsStreamHelper.tpl.txt +6 -6
  273. package/src/runtime/streamXml.ts +49 -21
  274. package/dist/app/generateApp.d.ts.map +0 -1
  275. package/dist/cli.d.ts.map +0 -1
  276. package/dist/client/checkedDirectRuntime.d.ts.map +0 -1
  277. package/dist/client/directClientRuntime.d.ts.map +0 -1
  278. package/dist/client/directClientVersion.d.ts.map +0 -1
  279. package/dist/client/generateClient.d.ts.map +0 -1
  280. package/dist/client/generateDirectClient.d.ts.map +0 -1
  281. package/dist/client/generateOperations.d.ts.map +0 -1
  282. package/dist/client/generateTypes.d.ts.map +0 -1
  283. package/dist/client/generateUtils.d.ts.map +0 -1
  284. package/dist/compiler/buildCanonicalGraph.d.ts.map +0 -1
  285. package/dist/compiler/canonicalGraph.d.ts.map +0 -1
  286. package/dist/compiler/catalogErrors.d.ts.map +0 -1
  287. package/dist/compiler/catalogProvenance.d.ts.map +0 -1
  288. package/dist/compiler/checkedAssessment.d.ts.map +0 -1
  289. package/dist/compiler/checkedSourcePreparation.d.ts.map +0 -1
  290. package/dist/compiler/complexTypeContent.d.ts.map +0 -1
  291. package/dist/compiler/composeCanonicalGraph.d.ts.map +0 -1
  292. package/dist/compiler/dataOwnership.d.ts.map +0 -1
  293. package/dist/compiler/datatypeValues.d.ts.map +0 -1
  294. package/dist/compiler/directCodec.d.ts.map +0 -1
  295. package/dist/compiler/directExecutionPolicy.d.ts.map +0 -1
  296. package/dist/compiler/directOperation.d.ts.map +0 -1
  297. package/dist/compiler/directSoap.d.ts.map +0 -1
  298. package/dist/compiler/directSoapSource.d.ts.map +0 -1
  299. package/dist/compiler/directSourceCapsule.d.ts.map +0 -1
  300. package/dist/compiler/directStructure.d.ts.map +0 -1
  301. package/dist/compiler/directStructurePlan.d.ts.map +0 -1
  302. package/dist/compiler/directValues.d.ts.map +0 -1
  303. package/dist/compiler/finiteRe01Verification.d.ts.map +0 -1
  304. package/dist/compiler/generateCatalog.d.ts.map +0 -1
  305. package/dist/compiler/graphTraversal.d.ts.map +0 -1
  306. package/dist/compiler/hypotheticalScopedIdentity.d.ts.map +0 -1
  307. package/dist/compiler/occurrenceAnalysis.d.ts.map +0 -1
  308. package/dist/compiler/originalSourceMembership.d.ts.map +0 -1
  309. package/dist/compiler/particleAttribution.d.ts.map +0 -1
  310. package/dist/compiler/particleDeclarationConsistency.d.ts.map +0 -1
  311. package/dist/compiler/particleExtension.d.ts.map +0 -1
  312. package/dist/compiler/particleLocalAssessment.d.ts.map +0 -1
  313. package/dist/compiler/particleRestriction.d.ts.map +0 -1
  314. package/dist/compiler/particleSemanticView.d.ts.map +0 -1
  315. package/dist/compiler/particleWildcardRelation.d.ts.map +0 -1
  316. package/dist/compiler/re01CandidateCorrespondence.d.ts.map +0 -1
  317. package/dist/compiler/re01TypeProperties.d.ts.map +0 -1
  318. package/dist/compiler/re01TypePropertyValidation.d.ts.map +0 -1
  319. package/dist/compiler/resolveCanonicalGraph.d.ts.map +0 -1
  320. package/dist/compiler/scalarSchemaAssessment.d.ts.map +0 -1
  321. package/dist/compiler/schemaAttributeGroupProperties.d.ts.map +0 -1
  322. package/dist/compiler/schemaAttributeProperties.d.ts.map +0 -1
  323. package/dist/compiler/schemaAttributeUses.d.ts.map +0 -1
  324. package/dist/compiler/schemaBinaryWordReconstruction.d.ts.map +0 -1
  325. package/dist/compiler/schemaBuiltinFacets.d.ts.map +0 -1
  326. package/dist/compiler/schemaCalendarImages.d.ts.map +0 -1
  327. package/dist/compiler/schemaCalendarLanguage.d.ts.map +0 -1
  328. package/dist/compiler/schemaCompiler.d.ts.map +0 -1
  329. package/dist/compiler/schemaComponentEquality.d.ts.map +0 -1
  330. package/dist/compiler/schemaConstructionAssessment.d.ts.map +0 -1
  331. package/dist/compiler/schemaDatatypeValues.d.ts.map +0 -1
  332. package/dist/compiler/schemaDecimalLanguage.d.ts.map +0 -1
  333. package/dist/compiler/schemaDeclarationPrimitives.d.ts.map +0 -1
  334. package/dist/compiler/schemaDocumentSyntax.d.ts.map +0 -1
  335. package/dist/compiler/schemaDurationLanguage.d.ts.map +0 -1
  336. package/dist/compiler/schemaElementProperties.d.ts.map +0 -1
  337. package/dist/compiler/schemaEndpointWordCapacity.d.ts.map +0 -1
  338. package/dist/compiler/schemaExactCalendar.d.ts.map +0 -1
  339. package/dist/compiler/schemaFacetAnnotation.d.ts.map +0 -1
  340. package/dist/compiler/schemaGeneratedScalarShape.d.ts.map +0 -1
  341. package/dist/compiler/schemaIdentityConstraints.d.ts.map +0 -1
  342. package/dist/compiler/schemaIeeeLanguage.d.ts.map +0 -1
  343. package/dist/compiler/schemaIntegerImages.d.ts.map +0 -1
  344. package/dist/compiler/schemaLexicalPredicates.d.ts.map +0 -1
  345. package/dist/compiler/schemaNotationProperties.d.ts.map +0 -1
  346. package/dist/compiler/schemaNumericImageConditions.d.ts.map +0 -1
  347. package/dist/compiler/schemaParticleWildcardProperties.d.ts.map +0 -1
  348. package/dist/compiler/schemaPattern.d.ts.map +0 -1
  349. package/dist/compiler/schemaRegularLanguage.d.ts.map +0 -1
  350. package/dist/compiler/schemaScalarContext.d.ts.map +0 -1
  351. package/dist/compiler/schemaScalarKernel.d.ts.map +0 -1
  352. package/dist/compiler/schemaScalarWitnesses.d.ts.map +0 -1
  353. package/dist/compiler/schemaSimpleTypeProperties.d.ts.map +0 -1
  354. package/dist/compiler/schemaSourceGrammar.d.ts.map +0 -1
  355. package/dist/compiler/schemaSourceLexical.d.ts.map +0 -1
  356. package/dist/compiler/schemaSourceValues.d.ts.map +0 -1
  357. package/dist/compiler/schemaSourceWildcards.d.ts.map +0 -1
  358. package/dist/compiler/schemaSymbolicSequences.d.ts.map +0 -1
  359. package/dist/compiler/schemaSymbolicValueSets.d.ts.map +0 -1
  360. package/dist/compiler/schemaSyntaxAssessment.d.ts.map +0 -1
  361. package/dist/compiler/schemaTemporalAliases.d.ts.map +0 -1
  362. package/dist/compiler/schemaTokenImages.d.ts.map +0 -1
  363. package/dist/compiler/schemaTypeIdentity.d.ts.map +0 -1
  364. package/dist/compiler/schemaTypeRelations.d.ts.map +0 -1
  365. package/dist/compiler/schemaUri.d.ts.map +0 -1
  366. package/dist/compiler/schemaValueContext.d.ts.map +0 -1
  367. package/dist/compiler/schemaValueImages.d.ts.map +0 -1
  368. package/dist/compiler/schemaValueSequences.d.ts.map +0 -1
  369. package/dist/compiler/semanticBudget.d.ts.map +0 -1
  370. package/dist/compiler/semanticCatalog.d.ts.map +0 -1
  371. package/dist/compiler/semanticContext.d.ts.map +0 -1
  372. package/dist/compiler/semanticTypeDependencies.d.ts.map +0 -1
  373. package/dist/compiler/semanticTypeReference.d.ts.map +0 -1
  374. package/dist/compiler/shapeResolver.d.ts.map +0 -1
  375. package/dist/compiler/sourceSchemaBinding.d.ts.map +0 -1
  376. package/dist/compiler/structuralCompanions.d.ts.map +0 -1
  377. package/dist/compiler/validateSemanticGraph.d.ts.map +0 -1
  378. package/dist/compiler/wildcardAlgebra.d.ts.map +0 -1
  379. package/dist/config.d.ts.map +0 -1
  380. package/dist/gateway/generateGateway.d.ts.map +0 -1
  381. package/dist/gateway/generators.d.ts.map +0 -1
  382. package/dist/gateway/helpers.d.ts.map +0 -1
  383. package/dist/generation/preamble.d.ts.map +0 -1
  384. package/dist/generation/writeGeneratedSource.d.ts.map +0 -1
  385. package/dist/index.d.ts.map +0 -1
  386. package/dist/loader/fetch.d.ts.map +0 -1
  387. package/dist/loader/orderedSyntax.d.ts.map +0 -1
  388. package/dist/loader/resolutionDepth.d.ts.map +0 -1
  389. package/dist/loader/schemaInput.d.ts.map +0 -1
  390. package/dist/loader/schemaResources.d.ts.map +0 -1
  391. package/dist/loader/wsdlLoader.d.ts.map +0 -1
  392. package/dist/openapi/casing.d.ts.map +0 -1
  393. package/dist/openapi/generateOpenAPI.d.ts.map +0 -1
  394. package/dist/openapi/generatePaths.d.ts.map +0 -1
  395. package/dist/openapi/generateSchemas.d.ts.map +0 -1
  396. package/dist/openapi/security.d.ts.map +0 -1
  397. package/dist/pipeline.d.ts.map +0 -1
  398. package/dist/runtime/jsonArray.d.ts +0 -24
  399. package/dist/runtime/jsonArray.d.ts.map +0 -1
  400. package/dist/runtime/jsonArray.js +0 -52
  401. package/dist/runtime/ndjson.d.ts +0 -24
  402. package/dist/runtime/ndjson.d.ts.map +0 -1
  403. package/dist/runtime/ndjson.js +0 -30
  404. package/dist/runtime/streamXml.d.ts +0 -45
  405. package/dist/runtime/streamXml.d.ts.map +0 -1
  406. package/dist/runtime/streamXml.js +0 -212
  407. package/dist/test/generateTests.d.ts.map +0 -1
  408. package/dist/test/generators.d.ts.map +0 -1
  409. package/dist/test/mockData.d.ts.map +0 -1
  410. package/dist/util/attributeWildcards.d.ts.map +0 -1
  411. package/dist/util/builder.d.ts.map +0 -1
  412. package/dist/util/catalogMeta.d.ts.map +0 -1
  413. package/dist/util/cli.d.ts.map +0 -1
  414. package/dist/util/errors.d.ts.map +0 -1
  415. package/dist/util/imports.d.ts.map +0 -1
  416. package/dist/util/runtimeSource.d.ts.map +0 -1
  417. package/dist/util/securityConfig.d.ts.map +0 -1
  418. package/dist/util/streamConfig.d.ts.map +0 -1
  419. package/dist/util/tools.d.ts.map +0 -1
  420. package/dist/util/xmlWhitespace.d.ts.map +0 -1
  421. package/dist/xsd/primitives.d.ts.map +0 -1
  422. package/docs/AGENTS.md +0 -47
  423. package/docs/README.md +0 -69
  424. package/docs/architecture.md +0 -158
  425. package/docs/content-model-analysis.md +0 -92
  426. package/docs/content-model-baseline.md +0 -121
  427. package/docs/content-model-catalog.md +0 -116
  428. package/docs/content-model-companions.md +0 -90
  429. package/docs/content-model-composition.md +0 -103
  430. package/docs/content-model-decisions.md +0 -79
  431. package/docs/content-model-gateway-feasibility.md +0 -169
  432. package/docs/content-model-graph.md +0 -121
  433. package/docs/content-model-loading.md +0 -163
  434. package/docs/content-model-matching.md +0 -85
  435. package/docs/content-model-readiness.md +0 -144
  436. package/docs/content-model-resolution.md +0 -81
  437. package/docs/content-model-s02-handoff.md +0 -98
  438. package/docs/content-model-s06-au-01.md +0 -425
  439. package/docs/content-model-s06-dt-01.md +0 -386
  440. package/docs/content-model-s06-pw-01.md +0 -350
  441. package/docs/content-model-s06-re-01-resolver-implementation.md +0 -869
  442. package/docs/content-model-s06-re-01-resolver.md +0 -513
  443. package/docs/content-model-s06-re-01-scalar-witnesses.md +0 -1423
  444. package/docs/content-model-s06-re-01-support-reconstruction.md +0 -6337
  445. package/docs/content-model-s06-re-01.md +0 -7477
  446. package/docs/content-model-s06-research-handoff.md +0 -909
  447. package/docs/content-model-shipped-fix.md +0 -83
  448. package/docs/content-model-soap-feasibility.md +0 -165
  449. package/docs/decisions/001-test-generation.md +0 -36
  450. package/docs/decisions/002-streamable-responses.md +0 -332
  451. package/docs/decisions/003-content-model-contracts.md +0 -280
  452. package/docs/file-naming-and-path-organization.md +0 -213
  453. package/docs/reference-validation.md +0 -243
  454. package/docs/releases/README.md +0 -94
  455. package/docs/releases/v0.20.0.md +0 -22
  456. package/docs/releases/v0.21.0.md +0 -30
  457. package/docs/releases/v0.22.0.md +0 -30
  458. package/docs/releases/v0.23.0.md +0 -31
  459. package/docs/releases/v0.24.0.md +0 -38
  460. package/docs/releases/v0.25.0.md +0 -31
  461. package/docs/releases/v0.25.2.md +0 -32
  462. package/docs/releases/v0.26.0.md +0 -32
  463. package/docs/releases/v0.27.0.md +0 -31
  464. package/docs/releases/v0.28.0.md +0 -32
  465. package/docs/releases/v0.29.0.md +0 -32
  466. package/docs/releases/v0.30.0.md +0 -30
  467. package/docs/releases/v0.30.1.md +0 -31
  468. package/docs/releases/v0.30.2.md +0 -30
  469. package/docs/releases/v0.30.3.md +0 -33
  470. package/docs/releases/v0.31.0.md +0 -33
  471. package/docs/releases/v0.32.0.md +0 -33
  472. package/docs/releases/v0.33.0.md +0 -34
  473. package/docs/releases/v0.34.0.md +0 -30
  474. package/docs/releases/v0.35.0.md +0 -33
  475. package/docs/releases/v0.36.0.md +0 -32
  476. package/docs/releases/v0.37.0.md +0 -33
  477. package/docs/releases/v0.38.0.md +0 -35
  478. package/docs/releases/v0.39.0.md +0 -35
  479. package/docs/releases/v0.40.0.md +0 -45
  480. package/docs/releases/v0.40.1.md +0 -34
  481. package/docs/releases/v1.0.0.md +0 -42
  482. package/docs/releases/v1.0.1.md +0 -38
  483. package/docs/releases/v1.0.2.md +0 -51
  484. package/docs/releases/v1.0.3.md +0 -37
  485. package/docs/releases/v1.0.4.md +0 -45
  486. package/docs/releases/v1.0.5.md +0 -41
  487. package/docs/releases/v1.0.6.md +0 -35
  488. package/docs/releases/v1.0.7.md +0 -36
  489. package/docs/releases/v1.1.0.md +0 -42
  490. package/docs/releases/v1.1.1.md +0 -44
  491. package/docs/releases/v1.1.2.md +0 -42
  492. package/docs/releases/v1.1.3.md +0 -36
  493. package/docs/releases/v1.1.4.md +0 -36
  494. package/docs/releases/v1.1.5.md +0 -38
  495. package/docs/roadmap/README.md +0 -107
  496. package/docs/roadmap/v1.0-capability-conformance-framework.md +0 -582
  497. package/docs/roadmap/v1.0-choice-union-mode.md +0 -90
  498. package/docs/roadmap/v1.0-contract-audit.md +0 -75
  499. package/docs/roadmap/v1.0-json-array-streaming.md +0 -101
  500. package/docs/roadmap/v1.0-openapi-fastify-compatibility.md +0 -99
  501. package/docs/roadmap/v1.0-release-candidate-gates.md +0 -92
  502. package/docs/roadmap/v1.0-wsdl-coverage-matrix.md +0 -200
  503. package/docs/roadmap/v1.0-xs-anyattribute-wildcard-bag.md +0 -932
  504. package/src/runtime/jsonArray.ts +0 -55
  505. package/src/runtime/ndjson.ts +0 -32
@@ -0,0 +1,403 @@
1
+ /** Source-derived application presentation; native particles and scalar owners retain admission duties. */
2
+ import { createHash } from 'node:crypto';
3
+ import { types } from 'node:util';
4
+ import { inspectProjectionGrammar } from './directStructurePlan.js';
5
+ import { deepFreeze } from './canonicalGraph.js';
6
+ const digest = (value) => createHash('sha256').update(JSON.stringify(value)).digest('hex');
7
+ /** Stable private record symbol shared across operation directions and schema scopes. */
8
+ export const applicationRecordName = (id) => 'ApplicationRecord_' + createHash('sha256').update(id).digest('hex').slice(0, 16);
9
+ const reserved = new Set(('break case catch class const continue debugger default delete do else enum export extends false finally for function if import in instanceof new null return super switch this throw true try typeof var void while with as implements interface let package private protected public static yield any bigint boolean constructor declare get module require number set string symbol type from of unknown never object readonly abstract async await namespace undefined NaN Infinity Record Readonly Array Promise Date Error Object String Number Boolean Map Set JSON').split(' '));
10
+ const metadata = new Set(['$value', '$content', '$attributes', '$namespace', '$namespaces', '$nil']);
11
+ /** Copy strict data-only generation options, rejecting malformed arrays before any source work. */
12
+ export function parseApplicationGroups(value) {
13
+ const record = (input, allowed) => {
14
+ if (!input || typeof input !== 'object' || types.isProxy(input) || ![Object.prototype, null].includes(Object.getPrototypeOf(input)))
15
+ throw new TypeError('applicationGroups requires data records');
16
+ const result = Object.create(null);
17
+ for (const key of Reflect.ownKeys(input)) {
18
+ const d = Object.getOwnPropertyDescriptor(input, key);
19
+ if (typeof key !== 'string' || !allowed.includes(key) || !('value' in d))
20
+ throw new TypeError('Unknown applicationGroups field or accessor');
21
+ result[key] = d.value;
22
+ }
23
+ return result;
24
+ };
25
+ const options = record(value, ['names']);
26
+ if (!Object.hasOwn(options, 'names'))
27
+ return {};
28
+ if (types.isProxy(options.names) || !Array.isArray(options.names) || Object.getPrototypeOf(options.names) !== Array.prototype)
29
+ throw new TypeError('applicationGroups.names requires a dense array');
30
+ const array = options.names, length = Object.getOwnPropertyDescriptor(array, 'length').value;
31
+ if (Reflect.ownKeys(array).length !== length + 1)
32
+ throw new TypeError('applicationGroups.names requires a dense array');
33
+ const names = [], seen = new Set();
34
+ for (let i = 0; i < length; i++) {
35
+ const d = Object.getOwnPropertyDescriptor(array, String(i));
36
+ if (!d || !('value' in d))
37
+ throw new TypeError(`applicationGroups.names[${i}] requires data`);
38
+ const item = record(d.value, ['target', 'propertyName', 'typeName']);
39
+ if (typeof item.target !== 'string' || !item.target || seen.has(item.target))
40
+ throw new TypeError(`applicationGroups.names[${i}] requires a unique target`);
41
+ seen.add(item.target);
42
+ if (!Object.hasOwn(item, 'propertyName') && !Object.hasOwn(item, 'typeName'))
43
+ throw new TypeError(`applicationGroups.names[${i}] requires an override`);
44
+ if (Object.hasOwn(item, 'propertyName') && (typeof item.propertyName !== 'string' || !/^\$[a-z][A-Za-z0-9]*$/.test(item.propertyName) || metadata.has(item.propertyName)))
45
+ throw new TypeError(`applicationGroups.names[${i}] invalid propertyName`);
46
+ if (Object.hasOwn(item, 'typeName') && (typeof item.typeName !== 'string' || !/^[A-Za-z_][A-Za-z0-9_]*$/.test(item.typeName) || reserved.has(item.typeName)))
47
+ throw new TypeError(`applicationGroups.names[${i}] invalid typeName`);
48
+ names.push(item);
49
+ }
50
+ return { names };
51
+ }
52
+ /** Derive finite group definitions from exact qualified records; no caller inventory is trusted. */
53
+ export function planApplicationGroups(context, projection, options, checkpoint) {
54
+ const check = () => { checkpoint(); context.budget.chargeWork(16); };
55
+ const records = new Map(), targets = [], dispositions = [];
56
+ const overrides = new Map((options.names ?? []).map(item => [item.target, item]));
57
+ const recordSymbols = [];
58
+ const sourceTypes = context.members.flatMap(id => {
59
+ check();
60
+ const found = context.lookup(id);
61
+ if (found.kind === 'found' && found.node.kind === 'complexType')
62
+ recordSymbols.push(applicationRecordName(found.node.id));
63
+ return found.kind === 'found' && (found.node.kind === 'complexType' || found.node.kind === 'simpleType') && found.node.identity.kind === 'global' ? [found.node] : [];
64
+ });
65
+ // @why Injective source spelling keeps separate operation mappings consistent without a mutable service-wide allocator.
66
+ const sourceStem = (name) => [...name].map(c => /^[A-Za-z0-9]$/.test(c) ? c : '_u' + c.codePointAt(0).toString(16) + '_').join('');
67
+ const shape = (p) => {
68
+ check();
69
+ return [p.kind, p.occurs, p.element ? [p.element.name, p.element.type.kind === 'local' ? p.element.type.target : p.element.type.name] : null, p.children.map(shape)];
70
+ };
71
+ const stem = (record) => {
72
+ const id = record.type.identity;
73
+ if (id.kind === 'global') {
74
+ const base = sourceStem(id.name.local);
75
+ return sourceTypes.filter(t => t.identity.kind === 'global' && t.identity.name.local === id.name.local).length > 1 ? base + '_' + digest(id.name.namespace).slice(0, 8) : base;
76
+ }
77
+ const owner = context.lookup(id.owner);
78
+ const name = owner.kind === 'found' && 'name' in owner.node ? owner.node.name.local : 'Anonymous';
79
+ return sourceStem(name) + '___Anonymous_' + digest([id.owner, id.path]).slice(0, 16);
80
+ };
81
+ for (const record of projection.records) {
82
+ check();
83
+ const grammar = inspectProjectionGrammar(context, record), source = record.type.identity.kind === 'global'
84
+ ? `{${record.type.identity.name.namespace}}${record.type.identity.name.local}` : record.type.id;
85
+ if (!grammar) {
86
+ dispositions.push({ source, disposition: 'compact', reason: 'ordinary-record' });
87
+ continue;
88
+ }
89
+ let reason = record.keyed || record.content !== 'element-only' || record.attributeWildcard ? 'mixed-open-or-keyed-owner' : '';
90
+ const nullable = (p) => grammar.bodyNullable(p);
91
+ const leaves = (p) => new Set(p.element ? [p.element.id] : p.children.flatMap(c => [...leaves(c)]));
92
+ const lengths = (p) => {
93
+ check();
94
+ const items = p.children.map(lengths);
95
+ const min = p.kind === 'element' ? 1n : p.kind === 'choice' ? items.reduce((a, b) => a < b[0] ? a : b[0], items[0]?.[0] ?? 0n) : items.reduce((a, b) => a + b[0], 0n);
96
+ const max = p.kind === 'element' ? 1n : items.some(x => x[1] === undefined) ? undefined : p.kind === 'choice' ? items.reduce((a, b) => a > b[1] ? a : b[1], 0n) : items.reduce((a, b) => a + b[1], 0n);
97
+ return [min * BigInt(p.occurs.min), max === undefined || p.occurs.max === 'unbounded' ? undefined : max * BigInt(p.occurs.max)];
98
+ };
99
+ const last = (n) => {
100
+ check();
101
+ if (n.element)
102
+ return leaves(n);
103
+ const result = new Set();
104
+ for (const child of [...n.children].reverse()) {
105
+ for (const key of last(child))
106
+ result.add(key);
107
+ if (n.kind === 'sequence' && !child.summary.nullable)
108
+ break;
109
+ }
110
+ return result;
111
+ };
112
+ const hasDelimiter = (p, unit = false) => {
113
+ check();
114
+ if (!unit && (p.occurs.min === '0' || p.occurs.min !== p.occurs.max))
115
+ return false;
116
+ if (p.kind === 'element')
117
+ return true;
118
+ return p.kind === 'choice' ? p.children.every(child => hasDelimiter(child)) : p.children.some(child => hasDelimiter(child));
119
+ };
120
+ const partitionable = (p, unit = false) => {
121
+ check();
122
+ // @why Globally disjoint leaf sites make a mandatory fixed-count marker recover item boundaries even beside optional fields.
123
+ if (hasDelimiter(p, unit))
124
+ return true;
125
+ if (p.kind === 'choice' && (unit || p.occurs.min === '1' && p.occurs.max === '1'))
126
+ return p.children.every(child => partitionable(child));
127
+ const [min, max] = lengths(unit ? { ...p, occurs: { min: '1', max: '1' } } : p);
128
+ if (min === max)
129
+ return true;
130
+ const first = grammar.first(p), end = last(p);
131
+ return !record.slots.some(s => end.has(s.element.id) && first.includes(JSON.stringify([s.element.name.namespace, s.element.name.local])));
132
+ };
133
+ const eligible = (p) => {
134
+ check();
135
+ if (p.kind === 'any' || p.kind === 'all')
136
+ reason ||= 'retained-native-compositor';
137
+ if ((p.kind === 'choice' || p.kind === 'sequence' && (p.occurs.max !== '1' || p.occurs.min !== '1')) && nullable(p))
138
+ reason ||= 'empty-capable-group-body';
139
+ if (p.kind !== 'element' && p.occurs.max !== '1') {
140
+ // @why A variable-width body whose end can start another item cannot recover occurrence boundaries.
141
+ if (!partitionable(p, true))
142
+ reason ||= 'ambiguous-group-partition';
143
+ }
144
+ for (const child of p.children)
145
+ eligible(child);
146
+ };
147
+ eligible(grammar.view.root);
148
+ if (reason) {
149
+ dispositions.push({ source, disposition: 'retained-ordered', reason });
150
+ continue;
151
+ }
152
+ const guard = digest(shape(grammar.view.root));
153
+ const target = (p, role, typeName, propertyName, parent) => {
154
+ const token = 'ag1:' + digest([record.type.id, p.source, p.origins, role, parent ?? null, guard, shape(p)]);
155
+ const defaults = { ...(propertyName ? { propertyName } : {}), typeName }, alias = overrides.get(token);
156
+ if (role === 'alternative' && alias?.propertyName !== undefined)
157
+ throw new TypeError(`applicationGroups target ${token} alternative ${source} does not support propertyName`);
158
+ const found = context.lookup(p.source), site = found.kind === 'found' && found.node.identity.kind === 'scoped' ? found.node.identity.path : p.source;
159
+ const item = { target: token, role, source: `${source} ${role} ${site}`, defaults, resolved: { ...defaults } };
160
+ targets.push(item);
161
+ return item;
162
+ };
163
+ const object = (p, contextStem, nested = false) => {
164
+ const counters = { choice: 0, sequence: 0 };
165
+ const visit = (p) => {
166
+ check();
167
+ if (p.kind === 'element')
168
+ return { particle: p, children: [], slot: grammar.slot(JSON.stringify([p.element.name.namespace, p.element.name.local])) };
169
+ const role = p.kind === 'choice' ? 'choice' : p.occurs.max !== '1' || p.occurs.min !== '1' ? 'sequence' : undefined;
170
+ if (!role)
171
+ return { particle: p, children: p.children.map(visit) };
172
+ const index = ++counters[role], suffix = index === 1 ? '' : String(index);
173
+ const title = role === 'choice' ? 'Choice' : 'Sequence';
174
+ const name = contextStem + (nested ? '___' : '') + title + suffix;
175
+ const own = target(p, role, name, '$' + role + suffix);
176
+ if (role === 'choice') {
177
+ const alternatives = p.children.map((child, i) => target(child, 'alternative', name + 'Alternative' + (i + 1), undefined, own.target));
178
+ return { particle: p, target: own, alternatives, children: p.children.map((child, i) => object(child, alternatives[i].defaults.typeName, true)) };
179
+ }
180
+ return { particle: p, target: own, children: object({ ...p, occurs: { min: '1', max: '1' } }, name, true).children };
181
+ };
182
+ // @why An alternative's own occurrence belongs to the alternative, not to a second wrapper around it.
183
+ return { particle: p, children: p.kind === 'sequence' && p.occurs.min === '1' && p.occurs.max === '1' ? p.children.map(visit) : [visit(p)] };
184
+ };
185
+ const root = grammar.view.root;
186
+ const wrapper = root.kind === 'choice' || root.occurs.max !== '1' || root.occurs.min !== '1'
187
+ ? object({ ...root, kind: 'sequence', occurs: { min: '1', max: '1' }, children: [root] }, stem(record)) : object(root, stem(record));
188
+ records.set(record.type.id, wrapper);
189
+ dispositions.push({ source, disposition: 'grouped', reason: 'observable-nonempty-particle-boundaries' });
190
+ }
191
+ // @why Default collisions use identity suffixes; explicit collisions must never silently change requested names.
192
+ const used = new Map();
193
+ for (const name of ['Request', 'Response', 'Usage', 'Name', 'Options', 'Failure', 'NativeSuccess', 'Runtime', 'Common', 'Result', 'ApplicationOpenValue',
194
+ ...Array.from({ length: projection.records.length + 1 }, (_, i) => 'Fault_' + i)])
195
+ used.set(name, 'generated-client');
196
+ for (const type of sourceTypes)
197
+ if (type.identity.kind === 'global')
198
+ used.set(type.identity.name.local, type.id);
199
+ for (const name of recordSymbols)
200
+ used.set(name, 'source-record');
201
+ for (const item of targets) {
202
+ let name = item.defaults.typeName;
203
+ if (used.has(name) && used.get(name) !== item.target) {
204
+ name += '_' + item.target.slice(4, 16);
205
+ item.defaults.typeName = name;
206
+ }
207
+ item.resolved.typeName = name;
208
+ used.set(name, item.target);
209
+ }
210
+ for (const item of targets) {
211
+ const alias = overrides.get(item.target);
212
+ if (alias?.typeName && (/^Fault_[0-9]+$/.test(alias.typeName) || used.has(alias.typeName) && used.get(alias.typeName) !== item.target))
213
+ throw new TypeError(`applicationGroups target ${item.target} ${item.source}: typeName collision ${alias.typeName}`);
214
+ if (alias?.typeName) {
215
+ used.set(alias.typeName, item.target);
216
+ item.resolved.typeName = alias.typeName;
217
+ }
218
+ if (alias?.propertyName)
219
+ item.resolved.propertyName = alias.propertyName;
220
+ }
221
+ const properties = (node, keys) => {
222
+ if (node.slot) {
223
+ keys.add(node.slot.element.name.local);
224
+ return;
225
+ }
226
+ if (!node.target) {
227
+ for (const child of node.children)
228
+ properties(child, keys);
229
+ return;
230
+ }
231
+ const key = node.target.resolved.propertyName;
232
+ if (keys.has(key))
233
+ throw new TypeError(`applicationGroups target ${node.target.target}: propertyName collision ${key}`);
234
+ keys.add(key);
235
+ if (node.alternatives)
236
+ for (const child of node.children)
237
+ properties(child, new Set());
238
+ else {
239
+ const bodyKeys = new Set();
240
+ for (const child of node.children)
241
+ properties(child, bodyKeys);
242
+ }
243
+ };
244
+ for (const node of records.values())
245
+ properties(node, new Set());
246
+ return deepFreeze({ records: Object.fromEntries(records), targets, dispositions });
247
+ }
248
+ export class ApplicationGroupValueError extends Error {
249
+ }
250
+ /** Convert owned data between grouped and existing ordered values without adding XML wrappers.
251
+ * @constraints Input must first pass the bounded data-only owner; recursive calls are depth-limited.
252
+ */
253
+ export function mapApplicationGroups(plan, projection, input, direction, check) {
254
+ const records = new Map(projection.records.map(r => [r.type.id, r]));
255
+ const fail = (reason) => { throw new ApplicationGroupValueError(reason); };
256
+ const object = (value) => value && typeof value === 'object' && !Array.isArray(value) ? value : fail('group-object-required');
257
+ const bounds = (n, p) => {
258
+ if (BigInt(n) < BigInt(p.occurs.min) || p.occurs.max !== 'unbounded' && BigInt(n) > BigInt(p.occurs.max))
259
+ fail('group-occurrence-bound');
260
+ };
261
+ const value = (v, shape, depth) => {
262
+ check();
263
+ if (depth > 200)
264
+ fail('application-group-depth-limit');
265
+ if (shape.kind !== 'record')
266
+ return v;
267
+ const record = records.get(shape.type), data = object(v), result = { ...data };
268
+ if (data.$nil === true)
269
+ return result;
270
+ const group = plan.records[shape.type];
271
+ const child = (v, slot) => value(v, slot.value, depth + 1);
272
+ if (!group) {
273
+ if (record.ordered && Array.isArray(data.$content))
274
+ result.$content = data.$content.map((entry, index) => {
275
+ const item = object(entry);
276
+ const slot = record.keyed ? record.fixedOrder ? record.slots[index] : record.slots.find(s => {
277
+ const v = item[s.element.name.local];
278
+ return Object.hasOwn(item, s.element.name.local) && (!v || typeof v !== 'object' || !Object.hasOwn(v, '$namespace')
279
+ || v.$namespace === s.element.name.namespace);
280
+ }) : record.slots.find(s => JSON.stringify(s.element.name) === JSON.stringify(item.name));
281
+ if (!slot)
282
+ return entry;
283
+ return record.keyed ? { [slot.element.name.local]: child(item[slot.element.name.local], slot) } : { ...item, value: child(item.value, slot) };
284
+ });
285
+ else
286
+ for (const slot of record.slots)
287
+ if (Object.hasOwn(data, slot.element.name.local)) {
288
+ const v = data[slot.element.name.local];
289
+ result[slot.element.name.local] = Array.isArray(v) && slot.particle.occurs.max !== '1' ? v.map(v => child(v, slot)) : child(v, slot);
290
+ }
291
+ return result;
292
+ }
293
+ const entries = direction === 'from-native' ? data.$content : [];
294
+ let cursor = 0;
295
+ const first = (n) => n.slot ? new Set([n.slot.element.name.local]) : new Set(n.children.flatMap(c => [...first(c)]));
296
+ const starts = (n) => entries[cursor] && first(n).has(entries[cursor].name.local);
297
+ const encodeObject = (nodes, data, extra = []) => {
298
+ const keys = new Set(extra);
299
+ const encode = (n) => {
300
+ check();
301
+ if (n.slot) {
302
+ const key = n.slot.element.name.local;
303
+ keys.add(key);
304
+ const present = Object.hasOwn(data, key), v = data[key];
305
+ const list = !present ? [] : n.particle.occurs.max !== '1' ? Array.isArray(v) ? v : fail('group-leaf-array-required') : [v];
306
+ bounds(list.length, n.particle);
307
+ for (const item of list)
308
+ entries.push({ name: n.slot.element.name, value: child(item, n.slot) });
309
+ }
310
+ else if (!n.target)
311
+ for (const c of n.children)
312
+ encode(c);
313
+ else {
314
+ const key = n.target.resolved.propertyName;
315
+ keys.add(key);
316
+ const v = data[key], list = !Object.hasOwn(data, key) ? [] : n.particle.occurs.max !== '1' ? Array.isArray(v) ? v : fail('group-array-required') : [v];
317
+ bounds(list.length, n.particle);
318
+ for (const item of list) {
319
+ const body = object(item);
320
+ if (n.particle.kind === 'choice') {
321
+ // @why Disjoint native leaf alphabets select one branch; full body validation still rejects partial or mixed branches.
322
+ const candidates = n.children.filter(c => hasSelection(c, body));
323
+ if (candidates.length !== 1)
324
+ fail('group-choice-branch');
325
+ encodeObject(candidates[0].children, body);
326
+ }
327
+ else
328
+ encodeObject(n.children, body);
329
+ }
330
+ }
331
+ };
332
+ for (const n of nodes)
333
+ encode(n);
334
+ if (Object.keys(data).some(k => !keys.has(k)))
335
+ fail('unknown-application-group-key');
336
+ };
337
+ const hasSelection = (node, data) => {
338
+ check();
339
+ if (node.slot)
340
+ return Object.hasOwn(data, node.slot.element.name.local);
341
+ if (!node.target)
342
+ return node.children.some(child => hasSelection(child, data));
343
+ const key = node.target.resolved.propertyName;
344
+ if (!Object.hasOwn(data, key))
345
+ return false;
346
+ const member = data[key], items = node.particle.occurs.max === '1' ? [member] : Array.isArray(member) ? member : [];
347
+ // @why Synthetic keys may be equal in different alternatives; only disjoint native leaf sites identify a branch.
348
+ return items.some(item => !!item && typeof item === 'object' && !Array.isArray(item)
349
+ && node.children.some(child => hasSelection(child, item)));
350
+ };
351
+ const decodeObject = (nodes) => {
352
+ const out = Object.create(null);
353
+ const decode = (n) => {
354
+ check();
355
+ if (n.slot) {
356
+ const items = [];
357
+ while (entries[cursor]?.name.local === n.slot.element.name.local && (n.particle.occurs.max === 'unbounded' || BigInt(items.length) < BigInt(n.particle.occurs.max)))
358
+ items.push(child(entries[cursor++].value, n.slot));
359
+ bounds(items.length, n.particle);
360
+ if (items.length || n.particle.occurs.max !== '1' && n.particle.occurs.min !== '0')
361
+ out[n.slot.element.name.local] = n.particle.occurs.max !== '1' ? items : items[0];
362
+ }
363
+ else if (!n.target)
364
+ for (const c of n.children)
365
+ decode(c);
366
+ else {
367
+ const items = [];
368
+ while (starts(n) && (n.particle.occurs.max === 'unbounded' || BigInt(items.length) < BigInt(n.particle.occurs.max))) {
369
+ const before = cursor;
370
+ const branch = n.particle.kind === 'choice' ? n.children.find(starts) : undefined;
371
+ items.push(decodeObject(branch ? branch.children : n.children));
372
+ if (cursor === before)
373
+ fail('zero-width-application-group');
374
+ }
375
+ bounds(items.length, n.particle);
376
+ if (items.length)
377
+ out[n.target.resolved.propertyName] = n.particle.occurs.max !== '1' ? items : items[0];
378
+ }
379
+ };
380
+ for (const n of nodes)
381
+ decode(n);
382
+ return out;
383
+ };
384
+ const extras = [...record.attributes.filter(a => !a.bag).map(a => a.declaration.name.local), ...(record.attributes.some(a => a.bag) ? ['$attributes'] : []),
385
+ ...(record.contextual ? ['$namespaces'] : []), ...(Object.hasOwn(data, '$namespace') ? ['$namespace'] : [])];
386
+ if (direction === 'to-native') {
387
+ encodeObject(group.children, data, extras);
388
+ for (const key of Object.keys(result))
389
+ if (!extras.includes(key))
390
+ delete result[key];
391
+ result.$content = entries;
392
+ }
393
+ else {
394
+ delete result.$content;
395
+ // @why Source fields are own data: assignment to __proto__ would invoke an inherited setter and discard the field.
396
+ Object.defineProperties(result, Object.getOwnPropertyDescriptors(decodeObject(group.children)));
397
+ if (cursor !== entries.length)
398
+ fail('group-particle-language');
399
+ }
400
+ return result;
401
+ };
402
+ return value(input, projection.root, 0);
403
+ }
@@ -4,4 +4,3 @@ export declare function buildCanonicalGraph(input: SchemaInput, options?: {
4
4
  maxNodes?: number;
5
5
  requestBudget?: import("./semanticBudget.js").SemanticBudget;
6
6
  }): CanonicalGraph;
7
- //# sourceMappingURL=buildCanonicalGraph.d.ts.map
@@ -1,19 +1,11 @@
1
+ /** Internal, language-neutral S04 contract. S05 resolves and composes these references. */
2
+ import type { Identity, NodeId, SymbolRole } from "./declarationIdentity.js";
3
+ export { globalId, scopedId } from "./declarationIdentity.js";
4
+ export type { Identity, NodeId, SymbolRole } from "./declarationIdentity.js";
1
5
  import type { ExpandedName, SyntaxAttribute, SyntaxElement, SyntaxSource } from "../loader/orderedSyntax.js";
2
6
  export declare const GRAPH_MODEL: "xsd10-faithful-v1";
3
7
  export declare const DEFAULT_GRAPH_NODES = 100000;
4
8
  export declare const isBuiltinType: (local: string) => boolean;
5
- export type NodeId = string;
6
- export type SymbolRole = "element" | "attribute" | "type" | "group" | "attributeGroup" | "message" | "portType" | "binding" | "service";
7
- export type Identity = Readonly<{
8
- kind: "global";
9
- role: SymbolRole;
10
- name: ExpandedName;
11
- } | {
12
- kind: "scoped";
13
- owner: NodeId;
14
- path: string;
15
- role: string;
16
- }>;
17
9
  export type GraphContext = Readonly<{
18
10
  namespaces: Readonly<Record<string, string>>;
19
11
  baseUri: string;
@@ -190,9 +182,5 @@ export declare class GraphError extends Error {
190
182
  readonly source?: SyntaxSource | undefined;
191
183
  constructor(category: "invalid-schema" | "resource-limit", message: string, source?: SyntaxSource | undefined);
192
184
  }
193
- export declare function globalId(role: SymbolRole, name: ExpandedName): NodeId;
194
- export declare function scopedId(owner: NodeId, path: string, role: string): NodeId;
195
185
  export declare function wsdlReferenceRoles(node: SyntaxElement): Record<string, SymbolRole>;
196
186
  export declare function deepFreeze<T>(value: T): T;
197
- export {};
198
- //# sourceMappingURL=canonicalGraph.d.ts.map
@@ -1,5 +1,4 @@
1
- /** Internal, language-neutral S04 contract. S05 resolves and composes these references. */
2
- import { createHash } from "node:crypto";
1
+ export { globalId, scopedId } from "./declarationIdentity.js";
3
2
  import { WSDL_NAMESPACE } from "../loader/orderedSyntax.js";
4
3
  export const GRAPH_MODEL = "xsd10-faithful-v1";
5
4
  export const DEFAULT_GRAPH_NODES = 100_000;
@@ -15,12 +14,6 @@ export class GraphError extends Error {
15
14
  this.name = "GraphError";
16
15
  }
17
16
  }
18
- export function globalId(role, name) {
19
- return JSON.stringify(["global", role, name.namespace, name.local]);
20
- }
21
- export function scopedId(owner, path, role) {
22
- return "scoped:" + createHash("sha256").update(JSON.stringify([owner, path, role])).digest("hex");
23
- }
24
17
  export function wsdlReferenceRoles(node) {
25
18
  if (node.name.namespace !== WSDL_NAMESPACE)
26
19
  return {};
@@ -15,4 +15,3 @@ export declare function canonicalJson(value: unknown): string;
15
15
  export declare function positiveLimit(value: number | undefined, fallback: number, name: string): number;
16
16
  /** Scan nesting before JSON.parse can allocate an arbitrarily deep input. */
17
17
  export declare function parseCatalogJson(text: string, limits?: CatalogLimits): unknown;
18
- //# sourceMappingURL=catalogErrors.d.ts.map
@@ -12,4 +12,3 @@ export declare function semanticGraphRepresentation(graph: CanonicalGraph, optio
12
12
  };
13
13
  /** Fingerprinting and companion comparison share the same actual normalized structure. */
14
14
  export declare function semanticGraphFingerprint(graph: CanonicalGraph): string;
15
- //# sourceMappingURL=catalogProvenance.d.ts.map
@@ -88,4 +88,3 @@ export declare function assessSchemaSource(source: string, options: Readonly<{
88
88
  }>): Promise<CheckedAssessmentReport>;
89
89
  /** Validate diagnostic JSON without treating it as authenticated semantic evidence. */
90
90
  export declare function parseAssessmentReport(text: string): CheckedAssessmentReport;
91
- //# sourceMappingURL=checkedAssessment.d.ts.map
@@ -102,7 +102,7 @@ export async function assessSchemaSource(source, options) {
102
102
  budget.chargeWork(1024 + operationName.length * 8);
103
103
  operations.push({ id: opaque(`${document.digest ?? document.root.source.digest}:${operation.source.path}`), name: operationName, admitted: false,
104
104
  capabilities: ['matcher', 'projection', 'scalar-payload', 'bundle', 'codec', 'buffered-transport', 'structured-generation'].map(name => ({ name, status: name === 'structured-generation' ? 'unsupported' : 'not-assessed',
105
- reason: name === 'structured-generation' ? 'Public structured generation is not activated' : 'This assessment does not qualify the downstream runtime owner' })) });
105
+ reason: name === 'structured-generation' ? 'This narrow direct assessment does not assess component generation; use planCheckedComponents or pipeline --checked-report for component readiness' : 'This assessment does not qualify the downstream runtime owner' })) });
106
106
  }
107
107
  }
108
108
  stack.push(...syntaxElements(node));
@@ -0,0 +1,16 @@
1
+ /** Additive schema qualification; operation/runtime admission remains a separate owner. */
2
+ import type { SchemaInput } from '../loader/schemaInput.js';
3
+ import { constructNativeSource } from './checkedSourcePreparation.js';
4
+ import type { NativeSourceConstruction } from './checkedSourcePreparation.js';
5
+ import type { ComponentCorrespondenceResult } from './componentCorrespondence.js';
6
+ export interface ComponentSourceQualification {
7
+ readonly kind: 'component-source';
8
+ readonly construction: NativeSourceConstruction;
9
+ readonly correspondence: ComponentCorrespondenceResult;
10
+ readonly schemaEligible: boolean;
11
+ readonly admitted: false;
12
+ }
13
+ /** Qualify through fresh native construction and the separate sufficient dated component route. */
14
+ export declare function qualifyComponentSource(input: SchemaInput, options: Parameters<typeof constructNativeSource>[1]): Exclude<ReturnType<typeof constructNativeSource>, NativeSourceConstruction> | ComponentSourceQualification;
15
+ /** Revalidate the exact source/receipt identities before a consumer uses schema eligibility. */
16
+ export declare function inspectComponentSourceQualification(value: ComponentSourceQualification, expectedSource?: SchemaInput): ComponentSourceQualification;
@@ -0,0 +1,31 @@
1
+ import { constructNativeSource, inspectNativeSourceConstruction } from './checkedSourcePreparation.js';
2
+ import { checkComponentCorrespondence, inspectComponentCorrespondence } from './componentCorrespondence.js';
3
+ const issued = new WeakMap();
4
+ /** Qualify through fresh native construction and the separate sufficient dated component route. */
5
+ export function qualifyComponentSource(input, options) {
6
+ return options.budget.guard(() => {
7
+ const construction = constructNativeSource(input, { ...options, extensionChains: options.extensionChains ?? true,
8
+ simpleExtensions: options.simpleExtensions ?? options.extensionChains !== false });
9
+ if (construction.kind !== 'constructed-source')
10
+ return construction;
11
+ const correspondence = checkComponentCorrespondence(input, construction, options);
12
+ if (correspondence.kind === 'resource-limit')
13
+ return correspondence;
14
+ options.check?.();
15
+ options.budget.chargeWork(128);
16
+ const result = Object.freeze({ kind: 'component-source', construction, correspondence,
17
+ schemaEligible: construction.nativeEstablished && correspondence.kind === 'component-correspondence', admitted: false });
18
+ issued.set(result, input);
19
+ return result;
20
+ });
21
+ }
22
+ /** Revalidate the exact source/receipt identities before a consumer uses schema eligibility. */
23
+ export function inspectComponentSourceQualification(value, expectedSource) {
24
+ const source = issued.get(value);
25
+ if (!source || expectedSource !== undefined && source !== expectedSource)
26
+ throw new TypeError('Fresh component source qualification required');
27
+ inspectNativeSourceConstruction(value.construction, source);
28
+ if (value.correspondence.kind === 'component-correspondence')
29
+ inspectComponentCorrespondence(value.correspondence, value.construction);
30
+ return value;
31
+ }
@@ -5,7 +5,45 @@ import type { ComponentConstructionResult } from './schemaConstructionAssessment
5
5
  import { verifyDirectActualSchema } from './finiteRe01Verification.js';
6
6
  import type { SemanticRequest } from './semanticContext.js';
7
7
  import type { SemanticBudget, ResourceLimitFailure } from './semanticBudget.js';
8
+ import type { FiniteCandidateReceipt, FinitePrimitiveReceipt, ExtensionChainReceipt } from './finiteRe01Verification.js';
9
+ import type { SimpleExtensionConstructionReceipt } from './finiteRe01Verification.js';
10
+ import type { StandardSchemaLibrary } from './standardSchemaComponents.js';
8
11
  type Closure = Exclude<ReturnType<typeof verifyDirectActualSchema>, ResourceLimitFailure>;
12
+ type ConstructedClosure = Closure | FiniteCandidateReceipt | FinitePrimitiveReceipt | ExtensionChainReceipt | SimpleExtensionConstructionReceipt | Readonly<{
13
+ kind: 'inconclusive-construction';
14
+ reason: string;
15
+ }>;
16
+ export interface NativeSourceConstruction {
17
+ readonly kind: 'constructed-source';
18
+ readonly request: SemanticRequest;
19
+ readonly closure: ConstructedClosure;
20
+ readonly localEstablished: boolean;
21
+ readonly localDisproved: boolean;
22
+ readonly nativeEstablished: boolean;
23
+ readonly correspondence: 'unassessed';
24
+ readonly eligible: false;
25
+ }
26
+ /** Authenticate fresh source construction; neither fields nor saved reports grant this identity. */
27
+ export declare function inspectNativeSourceConstruction(value: NativeSourceConstruction, expectedSource?: SchemaInput): NativeSourceConstruction;
28
+ /** Construct and natively verify whole-source obligations without granting dated-XSD correspondence or generation.
29
+ * @remarks This additive route may propose finite constructions. The existing direct preview remains unchanged.
30
+ * Missing constructions are inconclusive, and unrelated actual failures are still checked.
31
+ * @returns Fresh native construction or preparation/resource failure; eligibility always remains false.
32
+ */
33
+ export declare function constructNativeSource(input: SchemaInput, options: Readonly<{
34
+ budget: SemanticBudget;
35
+ maxNodes: number;
36
+ check?: () => void;
37
+ /** Explicit processor-acquired components; selection never substitutes for native application-source checks. */
38
+ standardLibraries?: readonly StandardSchemaLibrary[];
39
+ /** Try actual-only extension ancestry before finite construction; the legacy direct preview never sets this. */
40
+ extensionChains?: boolean;
41
+ /** Collect fresh-owned simple-extension premises; dated qualification remains a separate owner. */
42
+ simpleExtensions?: boolean;
43
+ onLocal?: (id: string, result: Exclude<ComponentConstructionResult, ResourceLimitFailure>) => void;
44
+ }>): Exclude<SourceSchemaPreparation, {
45
+ kind: 'prepared';
46
+ }> | NativeSourceConstruction;
9
47
  export type DirectSourceQualification = Exclude<SourceSchemaPreparation, {
10
48
  kind: 'prepared';
11
49
  }> | Readonly<{
@@ -32,4 +70,3 @@ export declare function qualifyDirectSource(input: SchemaInput, options: Readonl
32
70
  onClosure?: (closure: Closure) => void;
33
71
  }>): DirectSourceQualification;
34
72
  export {};
35
- //# sourceMappingURL=checkedSourcePreparation.d.ts.map