@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 @@
1
+ {"version":3,"file":"directSoapSource.d.ts","sourceRoot":"","sources":["../../src/compiler/directSoapSource.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;AAGlE,OAAO,KAAK,EAAC,YAAY,EAAgB,MAAM,4BAA4B,CAAC;AAG5E,eAAO,MAAM,4BAA4B,QAAY,CAAC;AACtD,qBAAa,qBAAsB,SAAQ,KAAK;IACjB,QAAQ,CAAC,IAAI,EAAE,aAAa,GAAG,gBAAgB;gBAAhE,OAAO,EAAE,MAAM,EAAW,IAAI,GAAE,aAAa,GAAG,gBAAgC;CAC7F;AACD,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,uBAAuB,EAAE,MAAM,EAAE;IAAC,OAAO,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,EAAE,KAAK,EAAE,MAAM,IAAI;;;EA0D1I"}
@@ -0,0 +1,86 @@
1
+ import { directLimit } from './directExecutionPolicy.js';
2
+ /** Shared authenticated single-resource SOAP bootstrap policy; no transport. */
3
+ import { inspectDirectOperation } from './directOperation.js';
4
+ import { copyOriginalSchemaResource } from '../loader/schemaInput.js';
5
+ import { resolveLexicalQName, syntaxAttribute, WSDL_NAMESPACE, XSD_NAMESPACE } from '../loader/orderedSyntax.js';
6
+ const WSDL_SOAP = 'http://schemas.xmlsoap.org/wsdl/soap/';
7
+ const same = (a, b) => a.namespace === b.namespace && a.local === b.local;
8
+ export const DIRECT_SOAP_SOURCE_MAX_BYTES = 64 * 1024;
9
+ export class DirectSoapSourceError extends Error {
10
+ kind;
11
+ constructor(message, kind = 'unsupported') {
12
+ super(message);
13
+ this.kind = kind;
14
+ }
15
+ }
16
+ export function prepareDirectSoapSource(contract, config, check) {
17
+ const { source, context: { budget } } = inspectDirectOperation(contract);
18
+ if (source.resources.some(r => r.byteLength > directLimit(budget, DIRECT_SOAP_SOURCE_MAX_BYTES))) {
19
+ throw new DirectSoapSourceError('SOAP source byte limit', 'resource-limit');
20
+ }
21
+ const refuse = (rule) => { throw new DirectSoapSourceError(rule); };
22
+ if (/[^\x20-\x21\x23-\x7e]|\\/.test(contract.binding.action))
23
+ refuse('unsafe SOAPAction');
24
+ if (source.resources.length !== 1 || source.edges.length || source.documents.length !== 1)
25
+ throw new DirectSoapSourceError('single original WSDL resource required');
26
+ const elements = (node) => {
27
+ check();
28
+ return node.children.filter((child) => child.kind === 'element');
29
+ };
30
+ // node-soap uses local-name dispatch and ordinary object maps internally.
31
+ // Refuse fetch triggers even in foreign/otherwise ignored source syntax.
32
+ const inspectSource = (node) => {
33
+ check();
34
+ if (['import', 'include', 'redefine'].includes(node.name.local))
35
+ refuse('dependency bootstrap imports');
36
+ const grammar = {
37
+ [WSDL_NAMESPACE]: ['definitions', 'types', 'message', 'part', 'portType', 'operation', 'input', 'output', 'fault', 'binding', 'service', 'port', 'documentation'],
38
+ [WSDL_SOAP]: ['binding', 'operation', 'body', 'fault', 'address'],
39
+ ['http://schemas.xmlsoap.org/wsdl/soap12/']: ['binding', 'operation', 'body', 'fault', 'address'],
40
+ [XSD_NAMESPACE]: ['schema', 'complexType', 'sequence', 'element'],
41
+ };
42
+ if (!Object.hasOwn(grammar, node.name.namespace) || !grammar[node.name.namespace].includes(node.name.local))
43
+ refuse('WSDL bootstrap extension');
44
+ for (const a of node.attributes) {
45
+ if (a.name.local === 'name' && (a.value in Object.prototype || a.value === 'prototype'))
46
+ refuse('dependency reserved name');
47
+ }
48
+ for (const prefix in node.namespaces) {
49
+ if (['__proto__', 'prototype', 'constructor'].includes(prefix) || /["<&\r\n\t]/.test(node.namespaces[prefix]))
50
+ refuse('dependency namespace interpolation');
51
+ }
52
+ for (const child of elements(node))
53
+ inspectSource(child);
54
+ };
55
+ inspectSource(source.root.root);
56
+ const definitions = source.root.root;
57
+ if (definitions.name.namespace !== WSDL_NAMESPACE || definitions.name.local !== 'definitions')
58
+ throw new DirectSoapSourceError('WSDL definitions required');
59
+ const services = elements(definitions).filter(n => n.name.namespace === WSDL_NAMESPACE && n.name.local === 'service'
60
+ && same({ namespace: syntaxAttribute(definitions, 'targetNamespace') ?? '', local: syntaxAttribute(n, 'name') ?? '' }, config.service));
61
+ if (services.length !== 1)
62
+ throw new DirectSoapSourceError('SOAP service mismatch');
63
+ const ports = elements(services[0]).filter(n => n.name.namespace === WSDL_NAMESPACE && n.name.local === 'port' && syntaxAttribute(n, 'name') === config.port);
64
+ if (ports.length !== 1)
65
+ throw new DirectSoapSourceError('SOAP port mismatch');
66
+ const binding = syntaxAttribute(ports[0], 'binding');
67
+ if (!binding || !same(resolveLexicalQName(binding, ports[0]), contract.selector.binding))
68
+ throw new DirectSoapSourceError('SOAP binding mismatch');
69
+ const addresses = elements(ports[0]).filter(n => n.name.namespace === WSDL_SOAP && n.name.local === 'address');
70
+ if (addresses.length !== 1 || elements(ports[0]).some(n => !(n.name.namespace === WSDL_SOAP && n.name.local === 'address')
71
+ && !(n.name.namespace === WSDL_NAMESPACE && n.name.local === 'documentation')))
72
+ throw new DirectSoapSourceError('SOAP port extension');
73
+ const original = copyOriginalSchemaResource(source, source.root.uri, amount => { check(); });
74
+ // This packet admits UTF-8 source bootstrap only; response encoding remains
75
+ // owned by the existing strict XML byte decoder.
76
+ let wsdlText;
77
+ try {
78
+ wsdlText = new TextDecoder('utf-8', { fatal: true }).decode(original);
79
+ }
80
+ catch {
81
+ throw new DirectSoapSourceError('UTF-8 WSDL bootstrap required');
82
+ }
83
+ if (/^<\?xml\s[^?]*encoding\s*=\s*["'](?!utf-?8["'])/i.test(wsdlText))
84
+ throw new DirectSoapSourceError('UTF-8 WSDL bootstrap required');
85
+ return { original, wsdlText };
86
+ }
@@ -0,0 +1,97 @@
1
+ import type { SemanticBudget, SemanticBudgetLimits, ResolverUsage } from './semanticBudget.js';
2
+ import type { DirectOperationContract, DirectOperationSelector } from './directOperation.js';
3
+ import type { DirectValueMapping } from './directValues.js';
4
+ import type { SchemaResourcePolicy } from '../loader/schemaResources.js';
5
+ import type { ExpandedName } from '../loader/orderedSyntax.js';
6
+ export declare const DIRECT_CAPSULE_LIMITS: Readonly<{
7
+ maxBytes: number;
8
+ sourceBytes: number;
9
+ }>;
10
+ declare const versions: Readonly<{
11
+ readonly capsuleFormat: 1;
12
+ readonly model: "xsd10-faithful-v1";
13
+ readonly scope: "direct-soap11-single-utf8-v1";
14
+ readonly mapping: "direct-values-v1";
15
+ readonly scalarPolicy: "direct-string-boolean-int-v1";
16
+ readonly runtimePolicy: "owned-loopback-http-no-extensions-v1";
17
+ }>;
18
+ export interface DirectSourceSelection {
19
+ readonly service: ExpandedName;
20
+ readonly port: string;
21
+ }
22
+ interface Root {
23
+ readonly element: ExpandedName;
24
+ readonly message: ExpandedName;
25
+ readonly part: string;
26
+ readonly type: ExpandedName;
27
+ readonly builtin: ExpandedName | null;
28
+ readonly slots: readonly {
29
+ element: ExpandedName;
30
+ builtin: ExpandedName;
31
+ min: string;
32
+ max: string;
33
+ }[];
34
+ }
35
+ interface Compatibility extends DirectSourceSelection {
36
+ readonly selector: DirectOperationSelector;
37
+ readonly action: string;
38
+ readonly input: Root;
39
+ readonly output: Root;
40
+ readonly faults: readonly {
41
+ name: string;
42
+ root: Root;
43
+ }[];
44
+ }
45
+ interface Capsule {
46
+ readonly versions: typeof versions;
47
+ readonly source: {
48
+ readonly base64: string;
49
+ readonly digest: string;
50
+ };
51
+ readonly compatibility: Compatibility;
52
+ readonly fingerprint: string;
53
+ }
54
+ export interface ReconstructedDirectSource {
55
+ readonly kind: 'reconstructed-direct';
56
+ readonly contract: DirectOperationContract;
57
+ readonly mappings: readonly DirectValueMapping[];
58
+ readonly selection: DirectSourceSelection;
59
+ readonly admitted: false;
60
+ readonly usage: ResolverUsage;
61
+ }
62
+ export interface DirectCapsuleFailure {
63
+ readonly kind: 'incompatible-artifact' | 'unsupported' | 'missing-authority' | 'resource-limit' | 'cancelled' | 'inconclusive' | 'invalid-schema';
64
+ readonly rule: string;
65
+ readonly repair: string;
66
+ readonly usage: ResolverUsage;
67
+ }
68
+ /** Bounded bytes only, duplicate checking delegated to the existing catalog reader. No I/O. */
69
+ export declare function readDirectSourceCapsule(bytes: Uint8Array, budget: SemanticBudget, signal?: AbortSignal): Capsule | DirectCapsuleFailure;
70
+ /** Writer consumes native authority; produced bytes contain no handles or source paths. */
71
+ export declare function createDirectSourceCapsule(contract: DirectOperationContract, selection: DirectSourceSelection, signal?: AbortSignal): Readonly<{
72
+ kind: 'direct-capsule';
73
+ bytes: Uint8Array;
74
+ admitted: false;
75
+ usage: ResolverUsage;
76
+ }> | DirectCapsuleFailure;
77
+ /** No capsule path is used. Caller chooses and authorizes a NEW physical source. */
78
+ export declare function reconstructDirectSourceCapsule(bytes: Uint8Array, localSource: string, options: Readonly<{
79
+ policy: SchemaResourcePolicy;
80
+ limits?: SemanticBudgetLimits;
81
+ signal?: AbortSignal;
82
+ }>): Promise<ReconstructedDirectSource | DirectCapsuleFailure>;
83
+ /** Internal consumer entry: decoding/emission and reconstruction share one sticky request. */
84
+ export declare function reconstructDirectSourceCapsuleInRequest(bytes: Uint8Array, localSource: string, options: Readonly<{
85
+ policy: SchemaResourcePolicy;
86
+ limits?: SemanticBudgetLimits;
87
+ signal?: AbortSignal;
88
+ }>, budget: SemanticBudget): Promise<ReconstructedDirectSource | DirectCapsuleFailure>;
89
+ /** #195/#201 handoff: compare expected data against a freshly issued native plan. */
90
+ export declare function checkDirectSourceCompatibility(expected: unknown, contract: DirectOperationContract, selection: DirectSourceSelection, signal?: AbortSignal): Readonly<{
91
+ kind: 'compatible-direct';
92
+ sourceIdentity: 'exact-bytes' | 'revised-bytes';
93
+ admitted: false;
94
+ usage: ResolverUsage;
95
+ }> | DirectCapsuleFailure;
96
+ export {};
97
+ //# sourceMappingURL=directSourceCapsule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directSourceCapsule.d.ts","sourceRoot":"","sources":["../../src/compiler/directSourceCapsule.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAC,cAAc,EAAE,oBAAoB,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAE7F,OAAO,KAAK,EAAC,uBAAuB,EAAE,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;AAE3F,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AAG1D,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,8BAA8B,CAAC;AAEvE,OAAO,KAAK,EAAC,YAAY,EAAC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M,EAAE,oBAAoB,CAAC;IAAC,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CACnF,CAAC,GAAG,OAAO,CAAC,yBAAyB,GAAG,oBAAoB,CAAC,CAG7D;AACD,8FAA8F;AAC9F,wBAAsB,uCAAuC,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC;IACtH,MAAM,EAAE,oBAAoB,CAAC;IAAC,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CACnF,CAAC,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,yBAAyB,GAAG,oBAAoB,CAAC,CAwCrF;AACD,qFAAqF;AACrF,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,uBAAuB,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;IAAC,IAAI,EAAE,mBAAmB,CAAC;IAAC,cAAc,EAAE,aAAa,GAAG,eAAe,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,aAAa,CAAA;CAAC,CAAC,GAAG,oBAAoB,CAUjT"}
@@ -0,0 +1,305 @@
1
+ import { directDataOwnership, directLimit, directLoadingLimits } from './directExecutionPolicy.js';
2
+ /** Internal P3.6 data boundary. Reading data never grants source or dispatch authority. */
3
+ import { checkSemanticBudget } from './semanticBudget.js';
4
+ import { DataOwnershipLimitError } from './dataOwnership.js';
5
+ import { createHash } from 'node:crypto';
6
+ import { types } from 'node:util';
7
+ import { canonicalJson, parseCatalogJson, CatalogError } from './catalogErrors.js';
8
+ import { createApplicationBudget } from './semanticBudget.js';
9
+ import { inspectDirectOperation, selectDirectOperationInRequest } from './directOperation.js';
10
+ import { createDirectValueMapping, DIRECT_VALUE_VERSION, DIRECT_SCALAR_POLICY } from './directValues.js';
11
+ import { prepareDirectSoapSource, DirectSoapSourceError, DIRECT_SOAP_SOURCE_MAX_BYTES } from './directSoapSource.js';
12
+ import { SchemaResourceLoader, resolveResourceUri } from '../loader/schemaResources.js';
13
+ import { parseOrderedSyntax, syntaxElements, isXmlNCName, SchemaLoadingError } from '../loader/orderedSyntax.js';
14
+ export const DIRECT_CAPSULE_LIMITS = Object.freeze({ maxBytes: 256 * 1024, sourceBytes: DIRECT_SOAP_SOURCE_MAX_BYTES });
15
+ const versions = Object.freeze({ capsuleFormat: 1, model: 'xsd10-faithful-v1', scope: 'direct-soap11-single-utf8-v1',
16
+ mapping: DIRECT_VALUE_VERSION, scalarPolicy: DIRECT_SCALAR_POLICY, runtimePolicy: 'owned-loopback-http-no-extensions-v1' });
17
+ const reconstructed = new WeakMap();
18
+ class Stop extends Error {
19
+ kind;
20
+ rule;
21
+ constructor(kind, rule) {
22
+ super(rule);
23
+ this.kind = kind;
24
+ this.rule = rule;
25
+ }
26
+ }
27
+ const reject = (rule) => { throw new Stop('incompatible-artifact', rule); };
28
+ function failure(error, budget) {
29
+ let kind, rule;
30
+ if (budget.exhausted()) {
31
+ kind = 'resource-limit';
32
+ rule = 'request-budget';
33
+ }
34
+ else if (error instanceof DataOwnershipLimitError) {
35
+ kind = 'resource-limit';
36
+ rule = error.message;
37
+ }
38
+ else if (error instanceof Stop) {
39
+ ({ kind, rule } = error);
40
+ }
41
+ else if (error instanceof CatalogError) {
42
+ kind = error.category === 'resource-limit' ? 'resource-limit' : 'incompatible-artifact';
43
+ rule = 'capsule-json';
44
+ }
45
+ else if (error instanceof DirectSoapSourceError) {
46
+ kind = error.kind;
47
+ rule = error.message;
48
+ }
49
+ else if (error instanceof SchemaLoadingError) {
50
+ kind = error.category === 'resource-limit' ? 'resource-limit' : 'missing-authority';
51
+ rule = 'authorized-local-source-required';
52
+ }
53
+ else
54
+ throw error;
55
+ return Object.freeze({ kind, rule, repair: 'Regenerate matched internal direct artifacts from explicitly authorized original WSDL; public generation remains unavailable.', usage: Object.freeze({ ...budget.usage() }) });
56
+ }
57
+ function check(budget, signal) {
58
+ checkSemanticBudget(budget);
59
+ if (signal?.aborted)
60
+ throw new Stop('cancelled', 'cooperative-cancellation');
61
+ }
62
+ function hash(text) { return createHash('sha256').update(text).digest('hex'); }
63
+ function json(value, budget) {
64
+ directDataOwnership(budget).freeze(value);
65
+ return canonicalJson(value);
66
+ }
67
+ function record(value, fields) {
68
+ if (!value || typeof value !== 'object' || Array.isArray(value))
69
+ return reject('data-record-required');
70
+ const result = value;
71
+ const keys = Object.keys(result);
72
+ if (keys.length !== fields.length || keys.some(key => !fields.includes(key)))
73
+ return reject('missing-or-unknown-field');
74
+ return result;
75
+ }
76
+ function text(value) { if (typeof value !== 'string')
77
+ reject('string-required'); }
78
+ function name(value) {
79
+ const v = record(value, ['namespace', 'local']);
80
+ text(v.namespace);
81
+ text(v.local);
82
+ if (!isXmlNCName(v.local))
83
+ reject('expanded-name-required');
84
+ }
85
+ function ncname(value) { text(value); if (!isXmlNCName(value))
86
+ reject('name-required'); }
87
+ function root(value) {
88
+ const v = record(value, ['element', 'message', 'part', 'type', 'builtin', 'slots']);
89
+ name(v.element);
90
+ name(v.message);
91
+ ncname(v.part);
92
+ name(v.type);
93
+ if (v.builtin !== null)
94
+ name(v.builtin);
95
+ if (!Array.isArray(v.slots))
96
+ reject('slots-required');
97
+ for (const item of v.slots) {
98
+ const slot = record(item, ['element', 'builtin', 'min', 'max']);
99
+ name(slot.element);
100
+ name(slot.builtin);
101
+ if (!['0', '1'].includes(slot.min) || !['1', 'unbounded'].includes(slot.max))
102
+ reject('direct-occurrence-required');
103
+ }
104
+ }
105
+ /** Bounded bytes only, duplicate checking delegated to the existing catalog reader. No I/O. */
106
+ export function readDirectSourceCapsule(bytes, budget, signal) {
107
+ try {
108
+ return read(bytes, budget, signal);
109
+ }
110
+ catch (error) {
111
+ return failure(error, budget);
112
+ }
113
+ }
114
+ function read(bytes, budget, signal) {
115
+ check(budget, signal);
116
+ if (!types.isUint8Array(bytes) || types.isProxy(bytes))
117
+ return reject('byte-input-required');
118
+ const typed = Object.getPrototypeOf(Uint8Array.prototype);
119
+ const length = Object.getOwnPropertyDescriptor(typed, 'byteLength').get.call(bytes);
120
+ const backing = Object.getOwnPropertyDescriptor(typed, 'buffer').get.call(bytes);
121
+ if (types.isSharedArrayBuffer(backing))
122
+ return reject('shared-bytes-unsupported');
123
+ if (length > directLimit(budget, DIRECT_CAPSULE_LIMITS.maxBytes))
124
+ throw new Stop('resource-limit', 'capsule-byte-limit');
125
+ // The actual capsule byte/depth caps bound decoding, hashing and canonicalization.
126
+ const input = new Uint8Array(length);
127
+ Uint8Array.prototype.set.call(input, bytes);
128
+ let decoded;
129
+ try {
130
+ decoded = new TextDecoder('utf-8', { fatal: true, ignoreBOM: true }).decode(input);
131
+ }
132
+ catch {
133
+ return reject('capsule-utf8');
134
+ }
135
+ const parsed = record(parseCatalogJson(decoded, { maxBytes: directLimit(budget, DIRECT_CAPSULE_LIMITS.maxBytes), maxDepth: 16 }), ['versions', 'source', 'compatibility', 'fingerprint']);
136
+ const actual = record(parsed.versions, Object.keys(versions));
137
+ for (const key of Object.keys(versions))
138
+ if (actual[key] !== versions[key])
139
+ reject('unsupported-version-mode-or-policy');
140
+ const source = record(parsed.source, ['base64', 'digest']);
141
+ text(source.base64);
142
+ text(source.digest);
143
+ if (source.base64.length > Math.ceil(directLimit(budget, DIRECT_CAPSULE_LIMITS.sourceBytes) / 3) * 4)
144
+ throw new Stop('resource-limit', 'source-byte-limit');
145
+ const sourceBytes = Buffer.from(source.base64, 'base64');
146
+ if (sourceBytes.byteLength > directLimit(budget, DIRECT_CAPSULE_LIMITS.sourceBytes))
147
+ throw new Stop('resource-limit', 'source-byte-limit');
148
+ if (sourceBytes.toString('base64') !== source.base64 || hash(sourceBytes) !== source.digest)
149
+ reject('corrupt-source');
150
+ try {
151
+ new TextDecoder('utf-8', { fatal: true }).decode(sourceBytes);
152
+ }
153
+ catch {
154
+ return reject('source-utf8');
155
+ }
156
+ const c = record(parsed.compatibility, ['selector', 'service', 'port', 'action', 'input', 'output', 'faults']);
157
+ const s = record(c.selector, ['portType', 'binding', 'operation']);
158
+ name(s.portType);
159
+ name(s.binding);
160
+ ncname(s.operation);
161
+ name(c.service);
162
+ ncname(c.port);
163
+ text(c.action);
164
+ root(c.input);
165
+ root(c.output);
166
+ if (!Array.isArray(c.faults))
167
+ reject('faults-required');
168
+ const faults = new Set();
169
+ for (const item of c.faults) {
170
+ const f = record(item, ['name', 'root']);
171
+ ncname(f.name);
172
+ root(f.root);
173
+ if (faults.has(f.name))
174
+ reject('duplicate-fault');
175
+ faults.add(f.name);
176
+ }
177
+ text(parsed.fingerprint);
178
+ if (hash(json({ versions: parsed.versions, compatibility: c }, budget)) !== parsed.fingerprint)
179
+ reject('compatibility-fingerprint');
180
+ check(budget, signal);
181
+ return directDataOwnership(budget).freeze(parsed);
182
+ }
183
+ function descriptor(contract, selection, signal) {
184
+ const { context: { budget }, source } = inspectDirectOperation(contract);
185
+ check(budget, signal);
186
+ if (source.resources.some(r => r.byteLength > directLimit(budget, DIRECT_CAPSULE_LIMITS.sourceBytes)))
187
+ throw new Stop('resource-limit', 'source-byte-limit');
188
+ const owned = directDataOwnership(budget).snapshot(selection, () => check(budget, signal));
189
+ name(owned.service);
190
+ ncname(owned.port);
191
+ record(owned, ['service', 'port']);
192
+ const { original } = prepareDirectSoapSource(contract, owned, () => check(budget, signal));
193
+ if (original.byteLength > directLimit(budget, DIRECT_CAPSULE_LIMITS.sourceBytes))
194
+ throw new Stop('resource-limit', 'source-byte-limit');
195
+ const mappings = [];
196
+ const make = (direction) => {
197
+ const m = createDirectValueMapping(contract, direction, { signal });
198
+ if (m.kind !== 'direct-mapping')
199
+ throw new Stop(m.kind === 'resource-limit' || m.kind === 'cancelled' ? m.kind : 'unsupported', m.rule);
200
+ mappings.push(m);
201
+ // Resolved schema type names and expanded slot identities are independent
202
+ // of retrieval URI, source offsets, lexical prefixes and context IDs.
203
+ const type = m.root.type;
204
+ if (type.kind !== 'builtin' && type.kind !== 'symbol')
205
+ throw new Stop('unsupported', 'named-direct-type-required');
206
+ return { element: m.root.element.name, message: m.root.message, part: m.root.part, type: type.name,
207
+ builtin: m.rootBuiltin ?? null, slots: m.slots.map(s => ({ element: s.element.name, builtin: s.builtin, min: s.particle.occurs.min, max: s.particle.occurs.max })) };
208
+ };
209
+ const input = make({ kind: 'input' }), output = make({ kind: 'output' });
210
+ const faults = contract.faults.map(f => ({ name: f.name, root: make({ kind: 'fault', name: f.name }) }));
211
+ const compatibility = directDataOwnership(budget).freeze({ selector: contract.selector, service: owned.service, port: owned.port, action: contract.binding.action, input, output, faults });
212
+ return { compatibility, original, mappings };
213
+ }
214
+ /** Writer consumes native authority; produced bytes contain no handles or source paths. */
215
+ export function createDirectSourceCapsule(contract, selection, signal) {
216
+ const { budget } = inspectDirectOperation(contract).context;
217
+ try {
218
+ const { compatibility, original } = descriptor(contract, selection, signal);
219
+ const capsule = { versions, source: { base64: Buffer.from(original).toString('base64'), digest: hash(original) }, compatibility,
220
+ fingerprint: hash(json({ versions, compatibility }, budget)) };
221
+ const serialized = json(capsule, budget) + '\n';
222
+ if (Buffer.byteLength(serialized) > directLimit(budget, DIRECT_CAPSULE_LIMITS.maxBytes))
223
+ throw new Stop('resource-limit', 'capsule-byte-limit');
224
+ const bytes = Buffer.from(serialized);
225
+ read(bytes, budget, signal);
226
+ check(budget, signal);
227
+ return Object.freeze({ kind: 'direct-capsule', bytes, admitted: false, usage: Object.freeze({ ...budget.usage() }) });
228
+ }
229
+ catch (error) {
230
+ return failure(error, budget);
231
+ }
232
+ }
233
+ /** No capsule path is used. Caller chooses and authorizes a NEW physical source. */
234
+ export async function reconstructDirectSourceCapsule(bytes, localSource, options) {
235
+ const budget = createApplicationBudget(options.limits);
236
+ return reconstructDirectSourceCapsuleInRequest(bytes, localSource, options, budget);
237
+ }
238
+ /** Internal consumer entry: decoding/emission and reconstruction share one sticky request. */
239
+ export async function reconstructDirectSourceCapsuleInRequest(bytes, localSource, options, budget) {
240
+ try {
241
+ const capsule = read(bytes, budget, options.signal);
242
+ if (new URL(resolveResourceUri(localSource)).protocol !== 'file:')
243
+ throw new Stop('missing-authority', 'new-local-file-required');
244
+ // Pin the caller-authorized actual file, rather than substituting artifact
245
+ // bytes for a modified file. No network origins are inherited or accepted.
246
+ const loader = await SchemaResourceLoader.create({ fileRoots: options.policy.fileRoots }, { ...directLoadingLimits(budget), resources: 1, resourceBytes: directLimit(budget, DIRECT_CAPSULE_LIMITS.sourceBytes), totalBytes: directLimit(budget, DIRECT_CAPSULE_LIMITS.sourceBytes) }, undefined, () => check(budget, options.signal), options.signal);
247
+ const resource = await loader.fetchResource(localSource);
248
+ if (resource.digest !== capsule.source.digest || Buffer.from(resource.bytes).toString('base64') !== capsule.source.base64)
249
+ reject('local-source-changed');
250
+ // Existing syntax owner refuses DTD/entities; graph triggers are rejected
251
+ // before semantic preparation, even if the caller authorized a wider root.
252
+ let syntax;
253
+ try {
254
+ syntax = parseOrderedSyntax(resource.bytes, resource.uri, { maxDepth: directLimit(budget, 256), maxNodes: options.limits?.maxNodes,
255
+ reserveNode: () => budget.reserveNodes(1), chargeWork: () => check(budget, options.signal) });
256
+ }
257
+ catch (error) {
258
+ if (error instanceof SchemaLoadingError)
259
+ throw new Stop(error.category === 'resource-limit' ? 'resource-limit' : error.category === 'unsupported-capability' ? 'unsupported' : 'invalid-schema', 'source-syntax');
260
+ throw error;
261
+ }
262
+ const stack = [syntax.root];
263
+ while (stack.length) {
264
+ check(budget, options.signal);
265
+ const node = stack.pop();
266
+ if (['import', 'include', 'redefine'].includes(node.name.local))
267
+ throw new Stop('unsupported', 'single-source-required');
268
+ stack.push(...syntaxElements(node));
269
+ }
270
+ const selected = await selectDirectOperationInRequest(resource.uri, capsule.compatibility.selector, {
271
+ loading: { policy: { fileRoots: options.policy.fileRoots }, offlineResources: new Map([[resource.uri, resource]]) }, limits: options.limits, signal: options.signal,
272
+ }, budget);
273
+ if (selected.kind !== 'selected')
274
+ throw new Stop(selected.kind === 'loading-refused' ? 'missing-authority' : selected.kind === 'selection-refused' ? 'incompatible-artifact' : selected.kind, selected.rule);
275
+ const derived = descriptor(selected.contract, { service: capsule.compatibility.service, port: capsule.compatibility.port }, options.signal);
276
+ if (json(derived.compatibility, budget) !== json(capsule.compatibility, budget))
277
+ reject('source-contract-changed');
278
+ check(budget, options.signal);
279
+ const result = Object.freeze({ kind: 'reconstructed-direct', contract: selected.contract, mappings: Object.freeze(derived.mappings), selection: Object.freeze({ service: capsule.compatibility.service, port: capsule.compatibility.port }), admitted: false, usage: Object.freeze({ ...budget.usage() }) });
280
+ reconstructed.set(result, capsule);
281
+ return result;
282
+ }
283
+ catch (error) {
284
+ if (!budget.exhausted() && options.signal?.aborted)
285
+ return failure(new Stop('cancelled', 'cooperative-cancellation'), budget);
286
+ return failure(error, budget);
287
+ }
288
+ }
289
+ /** #195/#201 handoff: compare expected data against a freshly issued native plan. */
290
+ export function checkDirectSourceCompatibility(expected, contract, selection, signal) {
291
+ const { budget } = inspectDirectOperation(contract).context;
292
+ if (!expected || typeof expected !== 'object' || !reconstructed.has(expected))
293
+ throw new TypeError('Freshly reconstructed expected source required');
294
+ try {
295
+ const capsule = reconstructed.get(expected);
296
+ const fresh = descriptor(contract, selection, signal);
297
+ if (json(capsule.compatibility, budget) !== json(fresh.compatibility, budget))
298
+ reject('operation-binding-root-fault-slot-or-datatype-changed');
299
+ check(budget, signal);
300
+ return Object.freeze({ kind: 'compatible-direct', sourceIdentity: capsule.source.digest === hash(fresh.original) ? 'exact-bytes' : 'revised-bytes', admitted: false, usage: Object.freeze({ ...budget.usage() }) });
301
+ }
302
+ catch (error) {
303
+ return failure(error, budget);
304
+ }
305
+ }
@@ -0,0 +1,51 @@
1
+ import type { DirectMessageRoot, DirectOperationContract } from './directOperation.js';
2
+ import type { ElementNode, Reference } from './canonicalGraph.js';
3
+ import type { ExpandedName, SyntaxElement, SyntaxSource } from '../loader/orderedSyntax.js';
4
+ import type { ResolverUsage } from './semanticBudget.js';
5
+ export type DirectDirection = Readonly<{
6
+ kind: 'input' | 'output';
7
+ } | {
8
+ kind: 'fault';
9
+ name: string;
10
+ }>;
11
+ export interface DirectScalarDuty {
12
+ readonly declaration: ElementNode;
13
+ readonly type: Reference;
14
+ readonly builtin: ExpandedName;
15
+ readonly lexical: string;
16
+ readonly namespaces: Readonly<Record<string, string>>;
17
+ readonly payloadSource: SyntaxSource;
18
+ readonly payloadPath: string;
19
+ readonly schemaPath: string;
20
+ }
21
+ export type DirectStructuralResult = Readonly<{
22
+ kind: 'structural-match';
23
+ scope: 'structure-only';
24
+ scalarValidity: 'unassessed';
25
+ admitted: false;
26
+ root: DirectMessageRoot;
27
+ contextId: string;
28
+ direction: DirectDirection;
29
+ occurrences: readonly DirectScalarDuty[];
30
+ usage: ResolverUsage;
31
+ }> | Readonly<{
32
+ kind: 'mismatch' | 'unsupported' | 'cancelled' | 'resource-limit';
33
+ rule: string;
34
+ schemaPath?: string;
35
+ payloadPath?: string;
36
+ usage: ResolverUsage;
37
+ }>;
38
+ export type DirectStructuralMatch = Extract<DirectStructuralResult, {
39
+ kind: 'structural-match';
40
+ }>;
41
+ /** Identity is checked before any receipt fields; no retrospective authentication. */
42
+ export declare function inspectDirectStructuralMatch(match: unknown, expectedContract: DirectOperationContract): DirectStructuralMatch;
43
+ /**
44
+ * Data-only SyntaxElement input (plain records/arrays, no proxies/accessors). Malformed
45
+ * input throws TypeError; XML structure differences return mismatch. No caller is frozen.
46
+ * Cancellation is synchronous/cooperative, checked at visits and before publication.
47
+ */
48
+ export declare function matchDirectOperation(contract: DirectOperationContract, direction: DirectDirection, payload: SyntaxElement, options?: Readonly<{
49
+ signal?: AbortSignal;
50
+ }>): DirectStructuralResult;
51
+ //# sourceMappingURL=directStructure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directStructure.d.ts","sourceRoot":"","sources":["../../src/compiler/directStructure.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