@techspokes/typescript-wsdl-client 1.1.5 → 1.1.8
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.
- package/README.md +64 -66
- package/dist/app/generateApp.d.ts +0 -1
- package/dist/app/generateApp.js +1 -1
- package/dist/app/generateCheckedApp.d.ts +38 -0
- package/dist/app/generateCheckedApp.js +108 -0
- package/dist/checkedPipeline.d.ts +155 -0
- package/dist/checkedPipeline.js +448 -0
- package/dist/checkedPlanning.d.ts +123 -0
- package/dist/checkedPlanning.js +245 -0
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +75 -1
- package/dist/client/checkedDirectRuntime.d.ts +40 -3
- package/dist/client/checkedDirectRuntime.js +28 -8
- package/dist/client/directClientRuntime.d.ts +27 -2
- package/dist/client/directClientRuntime.js +142 -89
- package/dist/client/directClientVersion.d.ts +3 -1
- package/dist/client/directClientVersion.js +3 -0
- package/dist/client/generateClient.d.ts +0 -1
- package/dist/client/generateClient.js +26 -12
- package/dist/client/generateDirectClient.d.ts +21 -3
- package/dist/client/generateDirectClient.js +138 -6
- package/dist/client/generateOperations.d.ts +0 -1
- package/dist/client/generateTypes.d.ts +0 -1
- package/dist/client/generateUtils.d.ts +0 -1
- package/dist/client/generateUtils.js +3 -1
- package/dist/compiler/applicationGroups.d.ts +53 -0
- package/dist/compiler/applicationGroups.js +403 -0
- package/dist/compiler/buildCanonicalGraph.d.ts +0 -1
- package/dist/compiler/canonicalGraph.d.ts +0 -1
- package/dist/compiler/catalogErrors.d.ts +0 -1
- package/dist/compiler/catalogProvenance.d.ts +0 -1
- package/dist/compiler/checkedAssessment.d.ts +0 -1
- package/dist/compiler/checkedAssessment.js +1 -1
- package/dist/compiler/checkedComponentSource.d.ts +16 -0
- package/dist/compiler/checkedComponentSource.js +31 -0
- package/dist/compiler/checkedSourcePreparation.d.ts +38 -1
- package/dist/compiler/checkedSourcePreparation.js +71 -0
- package/dist/compiler/complexTypeContent.d.ts +5 -6
- package/dist/compiler/complexTypeContent.js +2 -2
- package/dist/compiler/componentCorrespondence.d.ts +32 -0
- package/dist/compiler/componentCorrespondence.js +140 -0
- package/dist/compiler/componentRecordProjection.d.ts +109 -0
- package/dist/compiler/componentRecordProjection.js +319 -0
- package/dist/compiler/componentSoapPreparation.d.ts +20 -0
- package/dist/compiler/componentSoapPreparation.js +36 -0
- package/dist/compiler/composeCanonicalGraph.d.ts +0 -1
- package/dist/compiler/dataOwnership.d.ts +0 -1
- package/dist/compiler/dataOwnership.js +14 -4
- package/dist/compiler/datatypeValues.d.ts +0 -1
- package/dist/compiler/directCodec.d.ts +59 -2
- package/dist/compiler/directCodec.js +275 -90
- package/dist/compiler/directExecutionPolicy.d.ts +0 -1
- package/dist/compiler/directOperation.d.ts +46 -4
- package/dist/compiler/directOperation.js +105 -14
- package/dist/compiler/directSoap.d.ts +29 -5
- package/dist/compiler/directSoap.js +130 -37
- package/dist/compiler/directSoapSource.d.ts +24 -1
- package/dist/compiler/directSoapSource.js +166 -19
- package/dist/compiler/directSourceCapsule.d.ts +74 -2
- package/dist/compiler/directSourceCapsule.js +428 -6
- package/dist/compiler/directStructure.d.ts +83 -6
- package/dist/compiler/directStructure.js +349 -58
- package/dist/compiler/directStructurePlan.d.ts +135 -2
- package/dist/compiler/directStructurePlan.js +594 -29
- package/dist/compiler/directValues.d.ts +63 -4
- package/dist/compiler/directValues.js +950 -116
- package/dist/compiler/finiteRe01Construction.d.ts +69 -0
- package/dist/compiler/finiteRe01Construction.js +422 -0
- package/dist/compiler/finiteRe01Verification.d.ts +81 -3
- package/dist/compiler/finiteRe01Verification.js +391 -4
- package/dist/compiler/generateCatalog.d.ts +0 -1
- package/dist/compiler/graphTraversal.d.ts +0 -1
- package/dist/compiler/hypotheticalScopedIdentity.d.ts +0 -1
- package/dist/compiler/occurrenceAnalysis.d.ts +2 -1
- package/dist/compiler/occurrenceAnalysis.js +23 -7
- package/dist/compiler/originalSourceMembership.d.ts +0 -1
- package/dist/compiler/particleAttribution.d.ts +0 -1
- package/dist/compiler/particleAttribution.js +20 -0
- package/dist/compiler/particleDeclarationConsistency.d.ts +0 -1
- package/dist/compiler/particleDeclarationConsistency.js +9 -0
- package/dist/compiler/particleExtension.d.ts +0 -1
- package/dist/compiler/particleExtension.js +5 -1
- package/dist/compiler/particleLocalAssessment.d.ts +0 -1
- package/dist/compiler/particleRestriction.d.ts +0 -1
- package/dist/compiler/particleRestriction.js +6 -1
- package/dist/compiler/particleSemanticView.d.ts +2 -1
- package/dist/compiler/particleSemanticView.js +16 -3
- package/dist/compiler/particleWildcardRelation.d.ts +0 -1
- package/dist/compiler/projectionScalar.d.ts +32 -0
- package/dist/compiler/projectionScalar.js +184 -0
- package/dist/compiler/re01CandidateAssignments.d.ts +95 -0
- package/dist/compiler/re01CandidateAssignments.js +341 -0
- package/dist/compiler/re01CandidateCorrespondence.d.ts +22 -1
- package/dist/compiler/re01CandidateCorrespondence.js +167 -38
- package/dist/compiler/re01TypeProperties.d.ts +0 -1
- package/dist/compiler/re01TypePropertyValidation.d.ts +0 -1
- package/dist/compiler/resolveCanonicalGraph.d.ts +5 -2
- package/dist/compiler/resolveCanonicalGraph.js +77 -7
- package/dist/compiler/scalarSchemaAssessment.d.ts +0 -1
- package/dist/compiler/schemaAttributeGroupProperties.d.ts +0 -1
- package/dist/compiler/schemaAttributeProperties.d.ts +0 -1
- package/dist/compiler/schemaAttributeUses.d.ts +22 -2
- package/dist/compiler/schemaAttributeUses.js +86 -13
- package/dist/compiler/schemaBinaryWordReconstruction.d.ts +0 -1
- package/dist/compiler/schemaBuiltinFacets.d.ts +0 -1
- package/dist/compiler/schemaCalendarImages.d.ts +0 -1
- package/dist/compiler/schemaCalendarLanguage.d.ts +0 -1
- package/dist/compiler/schemaCompiler.d.ts +0 -1
- package/dist/compiler/schemaComponentEquality.d.ts +0 -1
- package/dist/compiler/schemaConstructionAssessment.d.ts +34 -1
- package/dist/compiler/schemaConstructionAssessment.js +88 -6
- package/dist/compiler/schemaDatatypeValues.d.ts +0 -1
- package/dist/compiler/schemaDecimalLanguage.d.ts +0 -1
- package/dist/compiler/schemaDeclarationPrimitives.d.ts +7 -2
- package/dist/compiler/schemaDeclarationPrimitives.js +18 -1
- package/dist/compiler/schemaDocumentSyntax.d.ts +0 -1
- package/dist/compiler/schemaDurationLanguage.d.ts +0 -1
- package/dist/compiler/schemaElementInstance.d.ts +30 -0
- package/dist/compiler/schemaElementInstance.js +45 -0
- package/dist/compiler/schemaElementProperties.d.ts +0 -1
- package/dist/compiler/schemaEndpointWordCapacity.d.ts +0 -1
- package/dist/compiler/schemaExactCalendar.d.ts +0 -1
- package/dist/compiler/schemaFacetAnnotation.d.ts +0 -1
- package/dist/compiler/schemaGeneratedScalarShape.d.ts +0 -1
- package/dist/compiler/schemaGeneratedScalarShape.js +2 -0
- package/dist/compiler/schemaIdentityConstraints.d.ts +0 -1
- package/dist/compiler/schemaIeeeLanguage.d.ts +0 -1
- package/dist/compiler/schemaIntegerImages.d.ts +0 -1
- package/dist/compiler/schemaLexicalPredicates.d.ts +0 -1
- package/dist/compiler/schemaNotationProperties.d.ts +0 -1
- package/dist/compiler/schemaNumericImageConditions.d.ts +0 -1
- package/dist/compiler/schemaParticleWildcardProperties.d.ts +0 -1
- package/dist/compiler/schemaPattern.d.ts +0 -1
- package/dist/compiler/schemaRegularLanguage.d.ts +0 -1
- package/dist/compiler/schemaScalarContext.d.ts +5 -1
- package/dist/compiler/schemaScalarKernel.d.ts +0 -1
- package/dist/compiler/schemaScalarWitnesses.d.ts +0 -1
- package/dist/compiler/schemaSimpleTypeProperties.d.ts +0 -1
- package/dist/compiler/schemaSourceGrammar.d.ts +0 -1
- package/dist/compiler/schemaSourceLexical.d.ts +0 -1
- package/dist/compiler/schemaSourceValues.d.ts +0 -1
- package/dist/compiler/schemaSourceWildcards.d.ts +1 -2
- package/dist/compiler/schemaSourceWildcards.js +3 -1
- package/dist/compiler/schemaSymbolicSequences.d.ts +0 -1
- package/dist/compiler/schemaSymbolicValueSets.d.ts +0 -1
- package/dist/compiler/schemaSyntaxAssessment.d.ts +0 -1
- package/dist/compiler/schemaTemporalAliases.d.ts +0 -1
- package/dist/compiler/schemaTokenImages.d.ts +0 -1
- package/dist/compiler/schemaTypeIdentity.d.ts +0 -1
- package/dist/compiler/schemaTypeIdentity.js +2 -0
- package/dist/compiler/schemaTypeRelations.d.ts +0 -1
- package/dist/compiler/schemaUri.d.ts +0 -1
- package/dist/compiler/schemaValueContext.d.ts +0 -1
- package/dist/compiler/schemaValueImages.d.ts +0 -1
- package/dist/compiler/schemaValueSequences.d.ts +0 -1
- package/dist/compiler/semanticBudget.d.ts +18 -1
- package/dist/compiler/semanticBudget.js +17 -2
- package/dist/compiler/semanticCatalog.d.ts +1 -2
- package/dist/compiler/semanticContext.d.ts +12 -1
- package/dist/compiler/semanticContext.js +39 -0
- package/dist/compiler/semanticTypeDependencies.d.ts +0 -1
- package/dist/compiler/semanticTypeReference.d.ts +0 -1
- package/dist/compiler/shapeResolver.d.ts +0 -1
- package/dist/compiler/soapHeaders.d.ts +16 -0
- package/dist/compiler/soapHeaders.js +42 -0
- package/dist/compiler/sourceSchemaBinding.d.ts +0 -1
- package/dist/compiler/standardSchemaComponents.d.ts +71 -0
- package/dist/compiler/standardSchemaComponents.js +74 -0
- package/dist/compiler/standardSchemaConstruction.d.ts +20 -0
- package/dist/compiler/standardSchemaConstruction.js +34 -0
- package/dist/compiler/structuralCompanions.d.ts +0 -1
- package/dist/compiler/validateSemanticGraph.d.ts +0 -1
- package/dist/compiler/wildcardAlgebra.d.ts +0 -1
- package/dist/compiler/wsdlPolicyRequirements.d.ts +43 -0
- package/dist/compiler/wsdlPolicyRequirements.js +239 -0
- package/dist/config.d.ts +0 -1
- package/dist/gateway/generateCheckedGateway.d.ts +32 -0
- package/dist/gateway/generateCheckedGateway.js +293 -0
- package/dist/gateway/generateGateway.d.ts +0 -1
- package/dist/gateway/generators.d.ts +0 -1
- package/dist/gateway/helpers.d.ts +0 -1
- package/dist/generation/componentShape.d.ts +14 -0
- package/dist/generation/componentShape.js +269 -0
- package/dist/generation/preamble.d.ts +0 -1
- package/dist/generation/sourceLayout.d.ts +13 -0
- package/dist/generation/sourceLayout.js +40 -0
- package/dist/generation/writeGeneratedSource.d.ts +0 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +2 -1
- package/dist/loader/fetch.d.ts +0 -1
- package/dist/loader/orderedSyntax.d.ts +8 -1
- package/dist/loader/orderedSyntax.js +26 -6
- package/dist/loader/resolutionDepth.d.ts +0 -1
- package/dist/loader/schemaInput.d.ts +28 -1
- package/dist/loader/schemaInput.js +41 -4
- package/dist/loader/schemaResources.d.ts +2 -1
- package/dist/loader/schemaResources.js +45 -4
- package/dist/loader/wsdlLoader.d.ts +0 -1
- package/dist/openapi/casing.d.ts +0 -1
- package/dist/openapi/generateOpenAPI.d.ts +0 -1
- package/dist/openapi/generatePaths.d.ts +0 -1
- package/dist/openapi/generateSchemas.d.ts +0 -1
- package/dist/openapi/security.d.ts +0 -1
- package/dist/pipeline.d.ts +6 -2
- package/dist/pipeline.js +13 -0
- package/dist/test/generateCheckedTests.d.ts +17 -0
- package/dist/test/generateCheckedTests.js +60 -0
- package/dist/test/generateTests.d.ts +0 -1
- package/dist/test/generators.d.ts +0 -1
- package/dist/test/mockData.d.ts +0 -1
- package/dist/test/mockData.js +20 -14
- package/dist/util/attributeWildcards.d.ts +0 -1
- package/dist/util/builder.d.ts +0 -1
- package/dist/util/catalogMeta.d.ts +0 -1
- package/dist/util/checkedCliDiagnostics.d.ts +11 -0
- package/dist/util/checkedCliDiagnostics.js +22 -0
- package/dist/util/cli.d.ts +0 -1
- package/dist/util/errors.d.ts +0 -1
- package/dist/util/imports.d.ts +0 -1
- package/dist/util/runtimeSource.d.ts +0 -1
- package/dist/util/runtimeSource.js +3 -5
- package/dist/util/securityConfig.d.ts +0 -1
- package/dist/util/streamConfig.d.ts +0 -1
- package/dist/util/tools.d.ts +0 -1
- package/dist/util/xmlWhitespace.d.ts +0 -1
- package/dist/xsd/primitives.d.ts +0 -1
- package/docs/agent-skill.md +2 -0
- package/docs/api-reference.md +1 -1
- package/docs/checked-gateway.md +210 -0
- package/docs/checked-generation.md +161 -0
- package/docs/cli-reference.md +23 -1
- package/docs/concepts.md +136 -1
- package/docs/configuration.md +5 -1
- package/docs/corpus.md +33 -0
- package/docs/direct-values.md +13 -13
- package/docs/examples/checked-forecast.wsdl +19 -0
- package/docs/gateway-guide.md +1 -1
- package/docs/generated-code.md +10 -5
- package/docs/mapping-contract.md +114 -0
- package/docs/migration-playbook.md +1 -1
- package/docs/output-anatomy.md +1 -1
- package/docs/start-here.md +8 -2
- package/docs/supported-patterns.md +7 -3
- package/docs/testing.md +117 -31
- package/llms.txt +7 -7
- package/package.json +63 -22
- package/src/runtime/checkedGatewayHost.tpl.txt +157 -0
- package/src/runtime/streamXml.ts +1 -1
- package/dist/app/generateApp.d.ts.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/client/checkedDirectRuntime.d.ts.map +0 -1
- package/dist/client/directClientRuntime.d.ts.map +0 -1
- package/dist/client/directClientVersion.d.ts.map +0 -1
- package/dist/client/generateClient.d.ts.map +0 -1
- package/dist/client/generateDirectClient.d.ts.map +0 -1
- package/dist/client/generateOperations.d.ts.map +0 -1
- package/dist/client/generateTypes.d.ts.map +0 -1
- package/dist/client/generateUtils.d.ts.map +0 -1
- package/dist/compiler/buildCanonicalGraph.d.ts.map +0 -1
- package/dist/compiler/canonicalGraph.d.ts.map +0 -1
- package/dist/compiler/catalogErrors.d.ts.map +0 -1
- package/dist/compiler/catalogProvenance.d.ts.map +0 -1
- package/dist/compiler/checkedAssessment.d.ts.map +0 -1
- package/dist/compiler/checkedSourcePreparation.d.ts.map +0 -1
- package/dist/compiler/complexTypeContent.d.ts.map +0 -1
- package/dist/compiler/composeCanonicalGraph.d.ts.map +0 -1
- package/dist/compiler/dataOwnership.d.ts.map +0 -1
- package/dist/compiler/datatypeValues.d.ts.map +0 -1
- package/dist/compiler/directCodec.d.ts.map +0 -1
- package/dist/compiler/directExecutionPolicy.d.ts.map +0 -1
- package/dist/compiler/directOperation.d.ts.map +0 -1
- package/dist/compiler/directSoap.d.ts.map +0 -1
- package/dist/compiler/directSoapSource.d.ts.map +0 -1
- package/dist/compiler/directSourceCapsule.d.ts.map +0 -1
- package/dist/compiler/directStructure.d.ts.map +0 -1
- package/dist/compiler/directStructurePlan.d.ts.map +0 -1
- package/dist/compiler/directValues.d.ts.map +0 -1
- package/dist/compiler/finiteRe01Verification.d.ts.map +0 -1
- package/dist/compiler/generateCatalog.d.ts.map +0 -1
- package/dist/compiler/graphTraversal.d.ts.map +0 -1
- package/dist/compiler/hypotheticalScopedIdentity.d.ts.map +0 -1
- package/dist/compiler/occurrenceAnalysis.d.ts.map +0 -1
- package/dist/compiler/originalSourceMembership.d.ts.map +0 -1
- package/dist/compiler/particleAttribution.d.ts.map +0 -1
- package/dist/compiler/particleDeclarationConsistency.d.ts.map +0 -1
- package/dist/compiler/particleExtension.d.ts.map +0 -1
- package/dist/compiler/particleLocalAssessment.d.ts.map +0 -1
- package/dist/compiler/particleRestriction.d.ts.map +0 -1
- package/dist/compiler/particleSemanticView.d.ts.map +0 -1
- package/dist/compiler/particleWildcardRelation.d.ts.map +0 -1
- package/dist/compiler/re01CandidateCorrespondence.d.ts.map +0 -1
- package/dist/compiler/re01TypeProperties.d.ts.map +0 -1
- package/dist/compiler/re01TypePropertyValidation.d.ts.map +0 -1
- package/dist/compiler/resolveCanonicalGraph.d.ts.map +0 -1
- package/dist/compiler/scalarSchemaAssessment.d.ts.map +0 -1
- package/dist/compiler/schemaAttributeGroupProperties.d.ts.map +0 -1
- package/dist/compiler/schemaAttributeProperties.d.ts.map +0 -1
- package/dist/compiler/schemaAttributeUses.d.ts.map +0 -1
- package/dist/compiler/schemaBinaryWordReconstruction.d.ts.map +0 -1
- package/dist/compiler/schemaBuiltinFacets.d.ts.map +0 -1
- package/dist/compiler/schemaCalendarImages.d.ts.map +0 -1
- package/dist/compiler/schemaCalendarLanguage.d.ts.map +0 -1
- package/dist/compiler/schemaCompiler.d.ts.map +0 -1
- package/dist/compiler/schemaComponentEquality.d.ts.map +0 -1
- package/dist/compiler/schemaConstructionAssessment.d.ts.map +0 -1
- package/dist/compiler/schemaDatatypeValues.d.ts.map +0 -1
- package/dist/compiler/schemaDecimalLanguage.d.ts.map +0 -1
- package/dist/compiler/schemaDeclarationPrimitives.d.ts.map +0 -1
- package/dist/compiler/schemaDocumentSyntax.d.ts.map +0 -1
- package/dist/compiler/schemaDurationLanguage.d.ts.map +0 -1
- package/dist/compiler/schemaElementProperties.d.ts.map +0 -1
- package/dist/compiler/schemaEndpointWordCapacity.d.ts.map +0 -1
- package/dist/compiler/schemaExactCalendar.d.ts.map +0 -1
- package/dist/compiler/schemaFacetAnnotation.d.ts.map +0 -1
- package/dist/compiler/schemaGeneratedScalarShape.d.ts.map +0 -1
- package/dist/compiler/schemaIdentityConstraints.d.ts.map +0 -1
- package/dist/compiler/schemaIeeeLanguage.d.ts.map +0 -1
- package/dist/compiler/schemaIntegerImages.d.ts.map +0 -1
- package/dist/compiler/schemaLexicalPredicates.d.ts.map +0 -1
- package/dist/compiler/schemaNotationProperties.d.ts.map +0 -1
- package/dist/compiler/schemaNumericImageConditions.d.ts.map +0 -1
- package/dist/compiler/schemaParticleWildcardProperties.d.ts.map +0 -1
- package/dist/compiler/schemaPattern.d.ts.map +0 -1
- package/dist/compiler/schemaRegularLanguage.d.ts.map +0 -1
- package/dist/compiler/schemaScalarContext.d.ts.map +0 -1
- package/dist/compiler/schemaScalarKernel.d.ts.map +0 -1
- package/dist/compiler/schemaScalarWitnesses.d.ts.map +0 -1
- package/dist/compiler/schemaSimpleTypeProperties.d.ts.map +0 -1
- package/dist/compiler/schemaSourceGrammar.d.ts.map +0 -1
- package/dist/compiler/schemaSourceLexical.d.ts.map +0 -1
- package/dist/compiler/schemaSourceValues.d.ts.map +0 -1
- package/dist/compiler/schemaSourceWildcards.d.ts.map +0 -1
- package/dist/compiler/schemaSymbolicSequences.d.ts.map +0 -1
- package/dist/compiler/schemaSymbolicValueSets.d.ts.map +0 -1
- package/dist/compiler/schemaSyntaxAssessment.d.ts.map +0 -1
- package/dist/compiler/schemaTemporalAliases.d.ts.map +0 -1
- package/dist/compiler/schemaTokenImages.d.ts.map +0 -1
- package/dist/compiler/schemaTypeIdentity.d.ts.map +0 -1
- package/dist/compiler/schemaTypeRelations.d.ts.map +0 -1
- package/dist/compiler/schemaUri.d.ts.map +0 -1
- package/dist/compiler/schemaValueContext.d.ts.map +0 -1
- package/dist/compiler/schemaValueImages.d.ts.map +0 -1
- package/dist/compiler/schemaValueSequences.d.ts.map +0 -1
- package/dist/compiler/semanticBudget.d.ts.map +0 -1
- package/dist/compiler/semanticCatalog.d.ts.map +0 -1
- package/dist/compiler/semanticContext.d.ts.map +0 -1
- package/dist/compiler/semanticTypeDependencies.d.ts.map +0 -1
- package/dist/compiler/semanticTypeReference.d.ts.map +0 -1
- package/dist/compiler/shapeResolver.d.ts.map +0 -1
- package/dist/compiler/sourceSchemaBinding.d.ts.map +0 -1
- package/dist/compiler/structuralCompanions.d.ts.map +0 -1
- package/dist/compiler/validateSemanticGraph.d.ts.map +0 -1
- package/dist/compiler/wildcardAlgebra.d.ts.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/gateway/generateGateway.d.ts.map +0 -1
- package/dist/gateway/generators.d.ts.map +0 -1
- package/dist/gateway/helpers.d.ts.map +0 -1
- package/dist/generation/preamble.d.ts.map +0 -1
- package/dist/generation/writeGeneratedSource.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/loader/fetch.d.ts.map +0 -1
- package/dist/loader/orderedSyntax.d.ts.map +0 -1
- package/dist/loader/resolutionDepth.d.ts.map +0 -1
- package/dist/loader/schemaInput.d.ts.map +0 -1
- package/dist/loader/schemaResources.d.ts.map +0 -1
- package/dist/loader/wsdlLoader.d.ts.map +0 -1
- package/dist/openapi/casing.d.ts.map +0 -1
- package/dist/openapi/generateOpenAPI.d.ts.map +0 -1
- package/dist/openapi/generatePaths.d.ts.map +0 -1
- package/dist/openapi/generateSchemas.d.ts.map +0 -1
- package/dist/openapi/security.d.ts.map +0 -1
- package/dist/pipeline.d.ts.map +0 -1
- package/dist/runtime/jsonArray.d.ts +0 -24
- package/dist/runtime/jsonArray.d.ts.map +0 -1
- package/dist/runtime/jsonArray.js +0 -52
- package/dist/runtime/ndjson.d.ts +0 -24
- package/dist/runtime/ndjson.d.ts.map +0 -1
- package/dist/runtime/ndjson.js +0 -30
- package/dist/runtime/streamXml.d.ts +0 -45
- package/dist/runtime/streamXml.d.ts.map +0 -1
- package/dist/runtime/streamXml.js +0 -212
- package/dist/test/generateTests.d.ts.map +0 -1
- package/dist/test/generators.d.ts.map +0 -1
- package/dist/test/mockData.d.ts.map +0 -1
- package/dist/util/attributeWildcards.d.ts.map +0 -1
- package/dist/util/builder.d.ts.map +0 -1
- package/dist/util/catalogMeta.d.ts.map +0 -1
- package/dist/util/cli.d.ts.map +0 -1
- package/dist/util/errors.d.ts.map +0 -1
- package/dist/util/imports.d.ts.map +0 -1
- package/dist/util/runtimeSource.d.ts.map +0 -1
- package/dist/util/securityConfig.d.ts.map +0 -1
- package/dist/util/streamConfig.d.ts.map +0 -1
- package/dist/util/tools.d.ts.map +0 -1
- package/dist/util/xmlWhitespace.d.ts.map +0 -1
- package/dist/xsd/primitives.d.ts.map +0 -1
- package/docs/AGENTS.md +0 -47
- package/docs/README.md +0 -69
- package/docs/architecture.md +0 -158
- package/docs/content-model-analysis.md +0 -92
- package/docs/content-model-baseline.md +0 -121
- package/docs/content-model-catalog.md +0 -116
- package/docs/content-model-companions.md +0 -90
- package/docs/content-model-composition.md +0 -103
- package/docs/content-model-decisions.md +0 -79
- package/docs/content-model-gateway-feasibility.md +0 -169
- package/docs/content-model-graph.md +0 -121
- package/docs/content-model-loading.md +0 -163
- package/docs/content-model-matching.md +0 -85
- package/docs/content-model-readiness.md +0 -144
- package/docs/content-model-resolution.md +0 -81
- package/docs/content-model-s02-handoff.md +0 -98
- package/docs/content-model-s06-au-01.md +0 -425
- package/docs/content-model-s06-dt-01.md +0 -386
- package/docs/content-model-s06-pw-01.md +0 -350
- package/docs/content-model-s06-re-01-resolver-implementation.md +0 -869
- package/docs/content-model-s06-re-01-resolver.md +0 -513
- package/docs/content-model-s06-re-01-scalar-witnesses.md +0 -1423
- package/docs/content-model-s06-re-01-support-reconstruction.md +0 -6337
- package/docs/content-model-s06-re-01.md +0 -7477
- package/docs/content-model-s06-research-handoff.md +0 -909
- package/docs/content-model-shipped-fix.md +0 -83
- package/docs/content-model-soap-feasibility.md +0 -165
- package/docs/decisions/001-test-generation.md +0 -36
- package/docs/decisions/002-streamable-responses.md +0 -332
- package/docs/decisions/003-content-model-contracts.md +0 -280
- package/docs/file-naming-and-path-organization.md +0 -213
- package/docs/reference-validation.md +0 -243
- package/docs/releases/README.md +0 -94
- package/docs/releases/v0.20.0.md +0 -22
- package/docs/releases/v0.21.0.md +0 -30
- package/docs/releases/v0.22.0.md +0 -30
- package/docs/releases/v0.23.0.md +0 -31
- package/docs/releases/v0.24.0.md +0 -38
- package/docs/releases/v0.25.0.md +0 -31
- package/docs/releases/v0.25.2.md +0 -32
- package/docs/releases/v0.26.0.md +0 -32
- package/docs/releases/v0.27.0.md +0 -31
- package/docs/releases/v0.28.0.md +0 -32
- package/docs/releases/v0.29.0.md +0 -32
- package/docs/releases/v0.30.0.md +0 -30
- package/docs/releases/v0.30.1.md +0 -31
- package/docs/releases/v0.30.2.md +0 -30
- package/docs/releases/v0.30.3.md +0 -33
- package/docs/releases/v0.31.0.md +0 -33
- package/docs/releases/v0.32.0.md +0 -33
- package/docs/releases/v0.33.0.md +0 -34
- package/docs/releases/v0.34.0.md +0 -30
- package/docs/releases/v0.35.0.md +0 -33
- package/docs/releases/v0.36.0.md +0 -32
- package/docs/releases/v0.37.0.md +0 -33
- package/docs/releases/v0.38.0.md +0 -35
- package/docs/releases/v0.39.0.md +0 -35
- package/docs/releases/v0.40.0.md +0 -45
- package/docs/releases/v0.40.1.md +0 -34
- package/docs/releases/v1.0.0.md +0 -42
- package/docs/releases/v1.0.1.md +0 -38
- package/docs/releases/v1.0.2.md +0 -51
- package/docs/releases/v1.0.3.md +0 -37
- package/docs/releases/v1.0.4.md +0 -45
- package/docs/releases/v1.0.5.md +0 -41
- package/docs/releases/v1.0.6.md +0 -35
- package/docs/releases/v1.0.7.md +0 -36
- package/docs/releases/v1.1.0.md +0 -42
- package/docs/releases/v1.1.1.md +0 -44
- package/docs/releases/v1.1.2.md +0 -42
- package/docs/releases/v1.1.3.md +0 -36
- package/docs/releases/v1.1.4.md +0 -36
- package/docs/releases/v1.1.5.md +0 -38
- package/docs/roadmap/README.md +0 -107
- package/docs/roadmap/v1.0-capability-conformance-framework.md +0 -582
- package/docs/roadmap/v1.0-choice-union-mode.md +0 -90
- package/docs/roadmap/v1.0-contract-audit.md +0 -75
- package/docs/roadmap/v1.0-json-array-streaming.md +0 -101
- package/docs/roadmap/v1.0-openapi-fastify-compatibility.md +0 -99
- package/docs/roadmap/v1.0-release-candidate-gates.md +0 -92
- package/docs/roadmap/v1.0-wsdl-coverage-matrix.md +0 -200
- package/docs/roadmap/v1.0-xs-anyattribute-wildcard-bag.md +0 -932
- package/src/runtime/jsonArray.ts +0 -55
- package/src/runtime/ndjson.ts +0 -32
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
/** Input-derived finite middle recipes; neither a complete catalogue nor dated-XSD admission. */
|
|
2
|
+
import { createHash } from 'node:crypto';
|
|
3
|
+
import { globalId } from './canonicalGraph.js';
|
|
4
|
+
import { allocateHypotheticalScopedIdentity, semanticIdentityTuple } from './hypotheticalScopedIdentity.js';
|
|
5
|
+
import { assertSemanticContext, contextsShareRequest, forkSemanticCandidate } from './semanticContext.js';
|
|
6
|
+
import { deriveActualComplexContent, deriveOriginalComplexParticle } from './complexTypeContent.js';
|
|
7
|
+
import { assessSourceAttributeUses } from './schemaAttributeUses.js';
|
|
8
|
+
import { declarationMethods, immediateTypeBase } from './schemaTypeRelations.js';
|
|
9
|
+
import { resolveSemanticType, semanticTypeKey } from './schemaTypeIdentity.js';
|
|
10
|
+
import { re01Ancestor } from './re01CandidateCorrespondence.js';
|
|
11
|
+
const issued = new WeakSet();
|
|
12
|
+
/** Reconstruct only through native property owners; a producer cannot issue validity evidence. */
|
|
13
|
+
function mapSharedProperties(actual, parent, node, scalarObligations, typeDependencies, outside) {
|
|
14
|
+
const b = parent.budget;
|
|
15
|
+
const prior = parent.rawTypeProperties(node.id);
|
|
16
|
+
if (prior)
|
|
17
|
+
return prior;
|
|
18
|
+
if (!(parent.kind === 'actual' ? parent.originalComplexContentSource(node.id) : parent.originalComplexPropertySource(node.id)))
|
|
19
|
+
return outside('assignment-target-properties', 'Inherited fresh or changed types require native RAW properties');
|
|
20
|
+
const content = deriveActualComplexContent(actual, node.id);
|
|
21
|
+
if (content.kind !== 'checked')
|
|
22
|
+
return content.kind === 'resource-limit' ? content : outside(content.rule, content.message);
|
|
23
|
+
let body = content.view.content;
|
|
24
|
+
if ('particle' in body) {
|
|
25
|
+
const whole = deriveOriginalComplexParticle(actual, node.id);
|
|
26
|
+
if (whole.kind !== 'checked')
|
|
27
|
+
return whole.kind === 'resource-limit' ? whole : outside(whole.rule, whole.message);
|
|
28
|
+
body = whole.content;
|
|
29
|
+
}
|
|
30
|
+
// @why Keep genuine named/builtin/inherited scalar references; only restrictions own registered GSC1 slots.
|
|
31
|
+
const attributes = assessSourceAttributeUses(actual, node.id);
|
|
32
|
+
if (attributes.kind !== 'checked')
|
|
33
|
+
return attributes;
|
|
34
|
+
for (const obligation of attributes.scalarObligations) {
|
|
35
|
+
b.chargeWork();
|
|
36
|
+
scalarObligations.push(obligation);
|
|
37
|
+
}
|
|
38
|
+
for (const dependency of attributes.typeDependencies) {
|
|
39
|
+
b.chargeWork();
|
|
40
|
+
typeDependencies.push(dependency);
|
|
41
|
+
}
|
|
42
|
+
b.chargeWork(24 + attributes.value.uses.length);
|
|
43
|
+
return { type: node.id, targetNamespace: node.context.effectiveNamespace,
|
|
44
|
+
derivation: { method: node.derivation?.kind ?? 'restriction', base: node.derivation?.base ?? { kind: 'builtin', name: { namespace: 'http://www.w3.org/2001/XMLSchema', local: 'anyType' } } }, abstract: node.abstract,
|
|
45
|
+
final: declarationMethods(actual, node, 'final'),
|
|
46
|
+
block: declarationMethods(actual, node, 'block'), content: body,
|
|
47
|
+
attributeUses: attributes.value.uses.map(use => use.id), wildcard: attributes.value.wildcard,
|
|
48
|
+
provenance: { kind: 'actual-mapped', original: node.id } };
|
|
49
|
+
}
|
|
50
|
+
/** Derive every retained E-over-designated-ancestor middle, without a caller roster or old witness. */
|
|
51
|
+
export function prepareInheritedMiddleAssignments(actual, parent, target) {
|
|
52
|
+
assertSemanticContext(actual);
|
|
53
|
+
assertSemanticContext(parent);
|
|
54
|
+
const b = parent.budget;
|
|
55
|
+
return b.guard(() => {
|
|
56
|
+
b.chargeWork(16 + target.length);
|
|
57
|
+
if (!contextsShareRequest(actual, parent) || actual !== parent.originalContext())
|
|
58
|
+
throw new TypeError('Expected the actual context of this request');
|
|
59
|
+
const outside = (rule, message) => {
|
|
60
|
+
b.chargeWork(12 + rule.length + message.length);
|
|
61
|
+
return Object.freeze({ kind: 'unresolved', rule, message, component: target, contextId: parent.contextId });
|
|
62
|
+
};
|
|
63
|
+
if (actual.kind !== 'actual' || actual.membership !== 'complete-actual-plus-additions' || parent.membership !== 'complete-actual-plus-additions')
|
|
64
|
+
return outside('complete-domain-membership', 'The assignment requires complete actual and inherited membership');
|
|
65
|
+
const selected = parent.lookup(target);
|
|
66
|
+
if (selected.kind !== 'found' || selected.node.kind !== 'complexType')
|
|
67
|
+
return outside('assignment-target', 'An available complex target is required');
|
|
68
|
+
const current = parent.rawTypeProperties(target);
|
|
69
|
+
if ((current?.derivation.method ?? selected.node.derivation?.kind) !== 'extension')
|
|
70
|
+
return outside('assignment-target', 'This recipe family handles complex extension targets');
|
|
71
|
+
const designated = re01Ancestor(parent, target);
|
|
72
|
+
if (designated.kind !== 'checked')
|
|
73
|
+
return designated;
|
|
74
|
+
const ancestor = resolveSemanticType(parent, designated.ancestor);
|
|
75
|
+
if (!('identity' in ancestor))
|
|
76
|
+
return outside('ancestor-domain', 'The designated ancestor must be available');
|
|
77
|
+
const ancestorKey = semanticTypeKey(parent, ancestor.identity);
|
|
78
|
+
const scalarObligations = [];
|
|
79
|
+
b.chargeWork(2);
|
|
80
|
+
const typeDependencies = [];
|
|
81
|
+
for (const dependency of designated.typeDependencies) {
|
|
82
|
+
b.chargeWork();
|
|
83
|
+
typeDependencies.push(dependency);
|
|
84
|
+
}
|
|
85
|
+
const mapProperties = (node) => mapSharedProperties(actual, parent, node, scalarObligations, typeDependencies, outside);
|
|
86
|
+
const properties = mapProperties(selected.node);
|
|
87
|
+
if ('kind' in properties)
|
|
88
|
+
return properties;
|
|
89
|
+
b.chargeWork(2);
|
|
90
|
+
const assignments = [];
|
|
91
|
+
for (const middleId of parent.members) {
|
|
92
|
+
b.chargeWork(8 + middleId.length);
|
|
93
|
+
if (middleId === target)
|
|
94
|
+
continue;
|
|
95
|
+
const found = parent.lookup(middleId);
|
|
96
|
+
if (found.kind !== 'found' || found.node.kind !== 'complexType')
|
|
97
|
+
continue;
|
|
98
|
+
const row = parent.rawTypeProperties(middleId);
|
|
99
|
+
if ((row?.derivation.method ?? found.node.derivation?.kind) !== 'extension')
|
|
100
|
+
continue;
|
|
101
|
+
const base = immediateTypeBase(parent, { kind: 'local', target: middleId });
|
|
102
|
+
if (base.kind !== 'checked')
|
|
103
|
+
return base.kind === 'resource-limit' ? base : outside(base.rule, base.message);
|
|
104
|
+
if (!base.value)
|
|
105
|
+
continue;
|
|
106
|
+
const resolved = resolveSemanticType(parent, base.value);
|
|
107
|
+
if (!('identity' in resolved))
|
|
108
|
+
return outside('middle-base', 'An inherited middle has an unavailable BASE');
|
|
109
|
+
if (b.compareText(semanticTypeKey(parent, resolved.identity), ancestorKey) !== 0)
|
|
110
|
+
continue;
|
|
111
|
+
const middle = mapProperties(found.node);
|
|
112
|
+
if ('kind' in middle)
|
|
113
|
+
return middle;
|
|
114
|
+
b.chargeWork(24);
|
|
115
|
+
const reference = { kind: 'local', target: middleId };
|
|
116
|
+
const endpoint = { ...selected.node,
|
|
117
|
+
derivation: { kind: 'restriction', contentKind: properties.content.kind === 'simple' ? 'simple' : 'complex', base: reference, facets: [] } };
|
|
118
|
+
// The inputs here are authenticated immutable records. Preserve opaque
|
|
119
|
+
// SOURCE particle handles by identity; a generic snapshot loses authority.
|
|
120
|
+
b.chargeWork('inherited-middle:'.length + target.length + 1 + middleId.length);
|
|
121
|
+
const delta = b.freeze({ key: 'inherited-middle:' + target + ':' + middleId, active: parent.members,
|
|
122
|
+
endpoint, additions: [], rawTypes: [{ ...properties, derivation: { method: 'restriction', base: reference } },
|
|
123
|
+
...(row ? [] : [middle])] });
|
|
124
|
+
b.chargeWork(4 + typeDependencies.length + base.typeDependencies.length);
|
|
125
|
+
const dependencies = b.freeze(b.snapshot([...typeDependencies, ...base.typeDependencies]));
|
|
126
|
+
const obligations = b.freeze(b.snapshot(scalarObligations));
|
|
127
|
+
b.chargeWork(20);
|
|
128
|
+
const assignment = Object.freeze({ kind: 'prepared-local-assignment', family: 'inherited-primitive-middle-v1',
|
|
129
|
+
actual, parent, target, intermediate: middleId, ancestor: designated.ancestor, delta,
|
|
130
|
+
scalarObligations: obligations, typeDependencies: dependencies, introducedStoredNonprimitive: 0 });
|
|
131
|
+
issued.add(assignment);
|
|
132
|
+
assignments.push(assignment);
|
|
133
|
+
}
|
|
134
|
+
b.chargeWork(4 + assignments.length);
|
|
135
|
+
return Object.freeze({ kind: 'prepared-inherited-assignments', assignments: Object.freeze(assignments), universalCoverage: false });
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Propose one fresh E from native target properties over the designated ancestor.
|
|
140
|
+
* @remarks E preserves target attribute identities; its body is supplied by native source properties,
|
|
141
|
+
* or the simple ancestor itself. For particle content, native extension checking must establish the retained prefix.
|
|
142
|
+
* Native correspondence and finite closure decide legality.
|
|
143
|
+
* Declining this limited family proves no nonexistence or dated-XSD eligibility.
|
|
144
|
+
*/
|
|
145
|
+
export function prepareFreshMiddleAssignments(actual, parent, target) {
|
|
146
|
+
assertSemanticContext(actual);
|
|
147
|
+
assertSemanticContext(parent);
|
|
148
|
+
const b = parent.budget;
|
|
149
|
+
return b.guard(() => {
|
|
150
|
+
b.chargeWork(16 + target.length);
|
|
151
|
+
if (!contextsShareRequest(actual, parent) || actual !== parent.originalContext())
|
|
152
|
+
throw new TypeError('Expected one actual native request');
|
|
153
|
+
const outside = (rule, message) => Object.freeze({ kind: 'unresolved', rule, message, component: target, contextId: parent.contextId });
|
|
154
|
+
if (actual.kind !== 'actual' || actual.membership !== 'complete-actual-plus-additions' || parent.membership !== 'complete-actual-plus-additions')
|
|
155
|
+
return outside('complete-domain-membership', 'Fresh construction requires complete actual and parent membership');
|
|
156
|
+
const selected = parent.lookup(target);
|
|
157
|
+
if (selected.kind !== 'found' || selected.node.kind !== 'complexType')
|
|
158
|
+
return outside('assignment-target', 'An available complex extension is required');
|
|
159
|
+
const scalarObligations = [], typeDependencies = [];
|
|
160
|
+
const properties = mapSharedProperties(actual, parent, selected.node, scalarObligations, typeDependencies, outside);
|
|
161
|
+
if ('kind' in properties)
|
|
162
|
+
return properties;
|
|
163
|
+
if (properties.derivation.method !== 'extension')
|
|
164
|
+
return outside('assignment-target', 'This family handles extension targets');
|
|
165
|
+
const designated = re01Ancestor(parent, target);
|
|
166
|
+
if (designated.kind !== 'checked')
|
|
167
|
+
return designated;
|
|
168
|
+
typeDependencies.push(...designated.typeDependencies);
|
|
169
|
+
const ancestor = resolveSemanticType(parent, designated.ancestor);
|
|
170
|
+
let body = properties.content;
|
|
171
|
+
if (ancestor.kind === 'builtin' && ancestor.name.local !== 'anyType')
|
|
172
|
+
body = { kind: 'simple', type: designated.ancestor };
|
|
173
|
+
else if (ancestor.kind === 'component' && ancestor.node.kind === 'complexType') {
|
|
174
|
+
const source = mapSharedProperties(actual, parent, ancestor.node, scalarObligations, typeDependencies, outside);
|
|
175
|
+
if ('kind' in source)
|
|
176
|
+
return source;
|
|
177
|
+
if (source.content.kind === 'simple')
|
|
178
|
+
body = source.content;
|
|
179
|
+
else if (source.content.kind === 'opaque-builtin')
|
|
180
|
+
return outside('fresh-middle-content-family', 'Opaque ancestor content is not represented');
|
|
181
|
+
}
|
|
182
|
+
else
|
|
183
|
+
return outside('fresh-middle-content-family', 'The designated ancestor is outside this family');
|
|
184
|
+
if (designated.ancestor.kind === 'original-generated')
|
|
185
|
+
return outside('fresh-middle-base-family', 'A canonical carrier base is required');
|
|
186
|
+
const namespace = properties.targetNamespace ?? selected.node.context.effectiveNamespace;
|
|
187
|
+
let ordinal = 0, name, intermediate;
|
|
188
|
+
do {
|
|
189
|
+
b.chargeWork(128 + target.length);
|
|
190
|
+
name = { namespace, local: 'Re01Middle_' + createHash('sha256').update(target + ':' + ordinal++).digest('hex').slice(0, 24) };
|
|
191
|
+
intermediate = globalId('type', name);
|
|
192
|
+
} while (parent.lookup(intermediate).kind !== 'missing');
|
|
193
|
+
const middle = { ...selected.node, id: intermediate, identity: { kind: 'global', role: 'type', name },
|
|
194
|
+
context: { ...selected.node.context, effectiveNamespace: namespace }, mixed: body.kind === 'mixed', abstract: false,
|
|
195
|
+
content: undefined, attributes: [], declaredAttributes: [], annotations: [], retained: [], syntaxDetails: [],
|
|
196
|
+
derivation: { kind: 'extension', contentKind: body.kind === 'simple' ? 'simple' : 'complex', base: designated.ancestor, facets: [] } };
|
|
197
|
+
const base = { kind: 'local', target: intermediate };
|
|
198
|
+
const endpoint = { ...selected.node,
|
|
199
|
+
derivation: { kind: 'restriction', contentKind: properties.content.kind === 'simple' ? 'simple' : 'complex', base, facets: [] } };
|
|
200
|
+
const rawMiddle = { type: intermediate, targetNamespace: namespace,
|
|
201
|
+
derivation: { method: 'extension', base: designated.ancestor }, abstract: false, final: [], block: [], content: body,
|
|
202
|
+
attributeUses: properties.attributeUses, wildcard: properties.wildcard,
|
|
203
|
+
provenance: { kind: 'hypothetical-abstract', originals: [target] } };
|
|
204
|
+
const delta = b.freeze({ key: 'fresh-source-middle:' + target + ':' + intermediate, endpoint, additions: [middle],
|
|
205
|
+
active: [...parent.members, intermediate], rawTypes: [{ ...properties, derivation: { method: 'restriction', base } }, rawMiddle] });
|
|
206
|
+
const assignment = Object.freeze({ kind: 'prepared-local-assignment', family: 'fresh-source-middle-v1',
|
|
207
|
+
actual, parent, target, intermediate, ancestor: designated.ancestor, delta,
|
|
208
|
+
scalarObligations: b.freeze(b.snapshot(scalarObligations)), typeDependencies: b.freeze(b.snapshot(typeDependencies)), introducedStoredNonprimitive: 0 });
|
|
209
|
+
issued.add(assignment);
|
|
210
|
+
return Object.freeze({ kind: 'prepared-fresh-assignments', assignments: Object.freeze([assignment]), universalCoverage: false });
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
/** Replay only. A local node must be placed in its enclosing actual-root forest. */
|
|
214
|
+
export function replaySharedAssignment(assignment) {
|
|
215
|
+
if (!issued.has(assignment))
|
|
216
|
+
throw new TypeError('Unauthenticated shared assignment');
|
|
217
|
+
const b = assignment.parent.budget;
|
|
218
|
+
return b.guard(() => {
|
|
219
|
+
const built = forkSemanticCandidate(assignment.parent, assignment.delta);
|
|
220
|
+
if (built.kind !== 'prepared')
|
|
221
|
+
return built;
|
|
222
|
+
b.chargeWork(16);
|
|
223
|
+
return Object.freeze({ kind: 'prepared-local-evidence', evidence: Object.freeze({ id: assignment.delta.key,
|
|
224
|
+
parent: assignment.parent, context: built.context, target: assignment.target, intermediate: assignment.intermediate,
|
|
225
|
+
ancestor: assignment.ancestor, premises: Object.freeze([]) }) });
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
/** Propose only a fresh extension middle; the actual target is never replaced or represented by another type.
|
|
229
|
+
* @remarks Native local construction, dependency closure and any paired restriction predicate remain separate checks.
|
|
230
|
+
* @returns An additive native context or explicit unavailability/resource result.
|
|
231
|
+
* @throws TypeError For a non-actual context.
|
|
232
|
+
*/
|
|
233
|
+
export function prepareAdditiveExtensionMiddle(actual, target) {
|
|
234
|
+
assertSemanticContext(actual);
|
|
235
|
+
if (actual.kind !== 'actual')
|
|
236
|
+
throw new TypeError('Actual source context required');
|
|
237
|
+
const b = actual.budget;
|
|
238
|
+
return b.guard(() => {
|
|
239
|
+
const proposed = prepareFreshMiddleAssignments(actual, actual, target);
|
|
240
|
+
if (proposed.kind !== 'prepared-fresh-assignments')
|
|
241
|
+
return proposed;
|
|
242
|
+
const assignment = proposed.assignments[0];
|
|
243
|
+
if (!assignment)
|
|
244
|
+
return Object.freeze({ kind: 'unresolved', rule: 'additive-middle-family', component: target,
|
|
245
|
+
message: 'The limited fresh-middle family supplied no assignment' });
|
|
246
|
+
const source = assessSourceAttributeUses(actual, target);
|
|
247
|
+
if (source.kind !== 'checked')
|
|
248
|
+
return source;
|
|
249
|
+
const middle = assignment.delta.additions[0];
|
|
250
|
+
if (middle.kind !== 'complexType')
|
|
251
|
+
throw new TypeError('Fresh complex middle required');
|
|
252
|
+
const raw = assignment.delta.rawTypes.find(properties => properties.type === assignment.intermediate);
|
|
253
|
+
b.chargeWork(16);
|
|
254
|
+
const additions = [], uses = [];
|
|
255
|
+
const forbiddenIds = new Set(), forbiddenTuples = new Set();
|
|
256
|
+
const allocate = (role) => {
|
|
257
|
+
const allocated = allocateHypotheticalScopedIdentity(middle.id, role, forbiddenIds, forbiddenTuples, b.chargeWork);
|
|
258
|
+
b.chargeWork(4 + allocated.id.length);
|
|
259
|
+
forbiddenIds.add(allocated.id);
|
|
260
|
+
forbiddenTuples.add(semanticIdentityTuple(allocated.identity, b.chargeWork));
|
|
261
|
+
return allocated;
|
|
262
|
+
};
|
|
263
|
+
for (const use of source.value.uses) {
|
|
264
|
+
b.chargeWork(32);
|
|
265
|
+
let declaration = use.declaration;
|
|
266
|
+
if (declaration.identity.kind !== 'global') {
|
|
267
|
+
// @why A fresh middle must own its local declarations; a reference to a D-scoped declaration is not an E scope.
|
|
268
|
+
if (declaration.name.namespace !== '' && declaration.name.namespace !== raw.targetNamespace)
|
|
269
|
+
return Object.freeze({ kind: 'unresolved',
|
|
270
|
+
rule: 'additive-owned-attribute-namespace', component: target, message: 'A foreign qualified local attribute is outside this fresh-owned family' });
|
|
271
|
+
const slot = allocate('attribute');
|
|
272
|
+
const copied = { ...declaration, id: slot.id, identity: slot.identity, value: undefined,
|
|
273
|
+
declaredAttributes: [], syntaxDetails: [], retained: [] };
|
|
274
|
+
declaration = copied;
|
|
275
|
+
additions.push(copied);
|
|
276
|
+
}
|
|
277
|
+
const slot = allocate('attributeUse');
|
|
278
|
+
const copied = { ...use.source, id: slot.id, identity: slot.identity,
|
|
279
|
+
declaration: { kind: 'local', target: declaration.id }, use: use.required ? 'required' : 'optional',
|
|
280
|
+
value: use.effective ? { kind: use.effective.kind, lexical: use.effective.value.lexical } : undefined,
|
|
281
|
+
declaredAttributes: [], syntaxDetails: [], retained: [] };
|
|
282
|
+
b.chargeWork(24);
|
|
283
|
+
additions.push(copied);
|
|
284
|
+
uses.push(copied.id);
|
|
285
|
+
}
|
|
286
|
+
const delta = b.freeze({ key: 'additive-middle-owned-attributes:' + assignment.delta.key,
|
|
287
|
+
additions: [{ ...middle, attributes: uses }, ...additions], active: [...actual.members, middle.id, ...additions.map(node => node.id)],
|
|
288
|
+
rawTypes: [{ ...raw, attributeUses: uses }] });
|
|
289
|
+
const built = forkSemanticCandidate(actual, delta);
|
|
290
|
+
if (built.kind !== 'prepared')
|
|
291
|
+
return built;
|
|
292
|
+
b.chargeWork(128);
|
|
293
|
+
return Object.freeze({ kind: 'prepared-additive-middle', actual, context: built.context, target,
|
|
294
|
+
intermediate: assignment.intermediate, ancestor: assignment.ancestor,
|
|
295
|
+
scalarObligations: b.freeze([...assignment.scalarObligations, ...source.scalarObligations]),
|
|
296
|
+
typeDependencies: b.freeze([...assignment.typeDependencies, ...source.typeDependencies]) });
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
/** Propose fresh extension and restriction representatives without replacing any actual component.
|
|
300
|
+
* @remarks The restriction representative has the target's effective properties with a fresh identity and base.
|
|
301
|
+
* This is construction input, not a derivation or correspondence certificate. Native checking, dependency closure
|
|
302
|
+
* and the relation between the representative and the original target remain separate obligations.
|
|
303
|
+
* @returns A native prepared additive context or an explicit unavailable/resource result.
|
|
304
|
+
* @throws TypeError For a non-actual context.
|
|
305
|
+
*/
|
|
306
|
+
export function prepareAdditiveRestrictionRepresentative(actual, target) {
|
|
307
|
+
assertSemanticContext(actual);
|
|
308
|
+
if (actual.kind !== 'actual')
|
|
309
|
+
throw new TypeError('Actual source context required');
|
|
310
|
+
const b = actual.budget;
|
|
311
|
+
return b.guard(() => {
|
|
312
|
+
const proposed = prepareFreshMiddleAssignments(actual, actual, target);
|
|
313
|
+
if (proposed.kind !== 'prepared-fresh-assignments')
|
|
314
|
+
return proposed;
|
|
315
|
+
const assignment = proposed.assignments[0];
|
|
316
|
+
if (!assignment)
|
|
317
|
+
return Object.freeze({ kind: 'unresolved', rule: 'additive-restriction-family', component: target,
|
|
318
|
+
message: 'The limited fresh-middle family supplied no assignment' });
|
|
319
|
+
const endpoint = assignment.delta.endpoint;
|
|
320
|
+
const properties = assignment.delta.rawTypes.find(properties => properties.type === target);
|
|
321
|
+
const namespace = properties.targetNamespace ?? endpoint.context.effectiveNamespace;
|
|
322
|
+
let ordinal = 0, name, representative;
|
|
323
|
+
do {
|
|
324
|
+
b.chargeWork(128 + target.length);
|
|
325
|
+
name = { namespace, local: 'Re01Restriction_' + createHash('sha256').update(target + ':' + ordinal++).digest('hex').slice(0, 24) };
|
|
326
|
+
representative = globalId('type', name);
|
|
327
|
+
} while (representative === assignment.intermediate || actual.lookup(representative).kind !== 'missing');
|
|
328
|
+
const node = { ...endpoint, id: representative, identity: { kind: 'global', role: 'type', name } };
|
|
329
|
+
const delta = b.freeze({ key: 'additive-restriction:' + assignment.delta.key,
|
|
330
|
+
additions: [...assignment.delta.additions, node], active: [...assignment.delta.active, representative],
|
|
331
|
+
rawTypes: [...assignment.delta.rawTypes.filter(properties => properties.type !== target),
|
|
332
|
+
{ ...properties, type: representative, provenance: { kind: 'hypothetical-abstract', originals: [target] } }] });
|
|
333
|
+
const built = forkSemanticCandidate(actual, delta);
|
|
334
|
+
if (built.kind !== 'prepared')
|
|
335
|
+
return built;
|
|
336
|
+
b.chargeWork(128);
|
|
337
|
+
return Object.freeze({ kind: 'prepared-additive-restriction', actual, context: built.context,
|
|
338
|
+
target, intermediate: assignment.intermediate, representative,
|
|
339
|
+
scalarObligations: assignment.scalarObligations, typeDependencies: assignment.typeDependencies });
|
|
340
|
+
});
|
|
341
|
+
}
|
|
@@ -61,4 +61,25 @@ export declare function re01Ancestor(context: SemanticContext, target: NodeId):
|
|
|
61
61
|
*/
|
|
62
62
|
export declare function proveRe01FreshAffiliationObstruction(actual: SemanticContext, parent: SemanticContext, target: NodeId): Re01FreshAffiliationResult;
|
|
63
63
|
export declare function checkCandidateCorrespondence(actual: SemanticContext, parent: SemanticContext, candidate: SemanticContext, target: NodeId, intermediate: NodeId, ancestor: SemanticTypeReference): CorrespondenceResult;
|
|
64
|
-
|
|
64
|
+
export type AdditiveSimplePropertyReceipt = Readonly<{
|
|
65
|
+
kind: 'checked-additive-simple-properties';
|
|
66
|
+
actualContextId: string;
|
|
67
|
+
contextId: string;
|
|
68
|
+
target: NodeId;
|
|
69
|
+
intermediate: NodeId;
|
|
70
|
+
representative: NodeId;
|
|
71
|
+
scalarObligations: readonly ScalarObligation[];
|
|
72
|
+
typeDependencies: readonly SemanticTypeDependency[];
|
|
73
|
+
datedInterpretation: 'unassessed';
|
|
74
|
+
}>;
|
|
75
|
+
/** Authenticate simple-content property correspondence independently of construction and dated interpretation. */
|
|
76
|
+
export declare function assertAdditiveSimpleProperties(actual: SemanticContext, context: SemanticContext, receipt: AdditiveSimplePropertyReceipt): void;
|
|
77
|
+
/** Compare fresh simple-content representatives with native effective source properties, preserving every original binding.
|
|
78
|
+
* @remarks Identity/name and derivation are deliberately distinct for the fresh restriction representative.
|
|
79
|
+
* Its other effective complex properties must match the original target. The middle carries the same attributes
|
|
80
|
+
* and extends the exact designated simple ancestor. Local legality, aggregate closure and dated interpretation
|
|
81
|
+
* remain separate obligations; producer provenance labels grant none of them.
|
|
82
|
+
* @returns Authenticated native property correspondence or an explicit mismatch/unavailable/resource result.
|
|
83
|
+
* @throws TypeError For unauthenticated or unrelated contexts.
|
|
84
|
+
*/
|
|
85
|
+
export declare function checkAdditiveSimpleProperties(actual: SemanticContext, candidate: SemanticContext, target: NodeId, intermediate: NodeId, representative: NodeId): AdditiveSimplePropertyReceipt | CorrespondenceFailure | ResourceLimitFailure;
|
|
@@ -20,6 +20,43 @@ class CorrespondenceAbort extends Error {
|
|
|
20
20
|
this.result = result;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
+
/** Read effective original properties through the existing native source owners; cached data grants no validity. */
|
|
24
|
+
function mapActualComplexProperties(actual, id) {
|
|
25
|
+
const b = actual.budget, charge = b.chargeWork;
|
|
26
|
+
let cache = actualMappings.get(actual);
|
|
27
|
+
if (!cache) {
|
|
28
|
+
charge(2);
|
|
29
|
+
cache = new Map();
|
|
30
|
+
actualMappings.set(actual, cache);
|
|
31
|
+
}
|
|
32
|
+
const cached = cache.get(id);
|
|
33
|
+
if (cached)
|
|
34
|
+
return cached;
|
|
35
|
+
const found = actual.lookup(id);
|
|
36
|
+
if (found.kind !== 'found' || found.node.kind !== 'complexType')
|
|
37
|
+
throw new CorrespondenceAbort(Object.freeze({ kind: 'invalid-evidence',
|
|
38
|
+
rule: 'original-property-correspondence', component: id, message: 'Expected an original complex type' }));
|
|
39
|
+
const original = found.node;
|
|
40
|
+
const content = deriveActualComplexContent(actual, id), attrs = assessSourceAttributeUses(actual, id);
|
|
41
|
+
if (content.kind !== 'checked')
|
|
42
|
+
throw new CorrespondenceAbort(content.kind === 'resource-limit' ? content
|
|
43
|
+
: { ...content, kind: content.kind === 'invalid-input' ? 'invalid-evidence' : 'unresolved' });
|
|
44
|
+
if (attrs.kind !== 'checked')
|
|
45
|
+
throw new CorrespondenceAbort(attrs);
|
|
46
|
+
charge(20 + attrs.value.uses.length);
|
|
47
|
+
const properties = {
|
|
48
|
+
type: id, derivation: { method: original.derivation?.kind ?? 'restriction', base: original.derivation?.base ?? ANY_TYPE },
|
|
49
|
+
targetNamespace: original.context.effectiveNamespace,
|
|
50
|
+
abstract: original.abstract, final: declarationMethods(actual, original, 'final'),
|
|
51
|
+
block: declarationMethods(actual, original, 'block'), content: content.view.content,
|
|
52
|
+
attributeUses: attrs.value.uses.map(use => use.id), wildcard: attrs.value.wildcard, provenance: { kind: 'actual-mapped', original: id },
|
|
53
|
+
};
|
|
54
|
+
charge(9);
|
|
55
|
+
const result = Object.freeze({ properties: b.freeze(b.snapshot(properties)), context: actual,
|
|
56
|
+
view: content.view, synthetic: content.view.synthetic, scalarObligations: attrs.scalarObligations, typeDependencies: attrs.typeDependencies });
|
|
57
|
+
cache.set(id, result);
|
|
58
|
+
return result;
|
|
59
|
+
}
|
|
23
60
|
export function assertCandidateCorrespondence(context, receipt) {
|
|
24
61
|
assertSemanticContext(context);
|
|
25
62
|
if (issued.get(receipt) !== context)
|
|
@@ -311,47 +348,12 @@ export function checkCandidateCorrespondence(actual, parent, candidate, target,
|
|
|
311
348
|
}
|
|
312
349
|
return { properties: prior, context: parent, synthetic: [], scalarObligations: [], typeDependencies: [] };
|
|
313
350
|
}
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
cache = new Map();
|
|
318
|
-
actualMappings.set(actual, cache);
|
|
319
|
-
}
|
|
320
|
-
const cached = cache.get(id);
|
|
321
|
-
if (cached) {
|
|
322
|
-
typeDependencies.add(cached.typeDependencies);
|
|
323
|
-
for (const obligation of cached.scalarObligations) {
|
|
324
|
-
charge(3);
|
|
325
|
-
scalarObligations.push({ contextId: obligation.contextId ?? actual.contextId, obligation });
|
|
326
|
-
}
|
|
327
|
-
return cached;
|
|
328
|
-
}
|
|
329
|
-
const original = node(actual, id);
|
|
330
|
-
if (original.kind !== 'complexType')
|
|
331
|
-
return fail('original-property-correspondence', id, 'Expected an original complex type', 'invalid-evidence');
|
|
332
|
-
const content = deriveActualComplexContent(actual, id), attrs = assessSourceAttributeUses(actual, id);
|
|
333
|
-
if (content.kind !== 'checked')
|
|
334
|
-
throw new CorrespondenceAbort(content.kind === 'resource-limit' ? content
|
|
335
|
-
: { ...content, kind: content.kind === 'invalid-input' ? 'invalid-evidence' : 'unresolved' });
|
|
336
|
-
if (attrs.kind !== 'checked')
|
|
337
|
-
throw new CorrespondenceAbort(attrs);
|
|
338
|
-
typeDependencies.add(attrs.typeDependencies);
|
|
339
|
-
for (const obligation of attrs.scalarObligations) {
|
|
351
|
+
const result = mapActualComplexProperties(actual, id);
|
|
352
|
+
typeDependencies.add(result.typeDependencies);
|
|
353
|
+
for (const obligation of result.scalarObligations) {
|
|
340
354
|
charge(3);
|
|
341
355
|
scalarObligations.push({ contextId: obligation.contextId ?? actual.contextId, obligation });
|
|
342
356
|
}
|
|
343
|
-
charge(20 + attrs.value.uses.length);
|
|
344
|
-
const properties = {
|
|
345
|
-
type: id, derivation: { method: original.derivation?.kind ?? 'restriction', base: original.derivation?.base ?? ANY_TYPE },
|
|
346
|
-
targetNamespace: original.context.effectiveNamespace,
|
|
347
|
-
abstract: original.abstract, final: declarationMethods(actual, original, 'final'),
|
|
348
|
-
block: declarationMethods(actual, original, 'block'), content: content.view.content,
|
|
349
|
-
attributeUses: attrs.value.uses.map(use => use.id), wildcard: attrs.value.wildcard, provenance: { kind: 'actual-mapped', original: id },
|
|
350
|
-
};
|
|
351
|
-
charge(9);
|
|
352
|
-
const result = Object.freeze({ properties: b.freeze(b.snapshot(properties)), context: actual,
|
|
353
|
-
view: content.view, synthetic: content.view.synthetic, scalarObligations: attrs.scalarObligations, typeDependencies: attrs.typeDependencies });
|
|
354
|
-
cache.set(id, result);
|
|
355
357
|
return result;
|
|
356
358
|
};
|
|
357
359
|
const typeNamespace = (context, id, properties) => {
|
|
@@ -570,3 +572,130 @@ export function checkCandidateCorrespondence(actual, parent, candidate, target,
|
|
|
570
572
|
}
|
|
571
573
|
});
|
|
572
574
|
}
|
|
575
|
+
const additiveProperties = new WeakMap();
|
|
576
|
+
/** Authenticate simple-content property correspondence independently of construction and dated interpretation. */
|
|
577
|
+
export function assertAdditiveSimpleProperties(actual, context, receipt) {
|
|
578
|
+
assertSemanticContext(actual);
|
|
579
|
+
assertSemanticContext(context);
|
|
580
|
+
const issued = additiveProperties.get(receipt);
|
|
581
|
+
if (!issued || issued.actual !== actual || issued.context !== context)
|
|
582
|
+
throw new TypeError('Fresh matching additive property correspondence required');
|
|
583
|
+
}
|
|
584
|
+
/** Compare fresh simple-content representatives with native effective source properties, preserving every original binding.
|
|
585
|
+
* @remarks Identity/name and derivation are deliberately distinct for the fresh restriction representative.
|
|
586
|
+
* Its other effective complex properties must match the original target. The middle carries the same attributes
|
|
587
|
+
* and extends the exact designated simple ancestor. Local legality, aggregate closure and dated interpretation
|
|
588
|
+
* remain separate obligations; producer provenance labels grant none of them.
|
|
589
|
+
* @returns Authenticated native property correspondence or an explicit mismatch/unavailable/resource result.
|
|
590
|
+
* @throws TypeError For unauthenticated or unrelated contexts.
|
|
591
|
+
*/
|
|
592
|
+
export function checkAdditiveSimpleProperties(actual, candidate, target, intermediate, representative) {
|
|
593
|
+
assertSemanticContext(actual);
|
|
594
|
+
assertSemanticContext(candidate);
|
|
595
|
+
if (!contextsShareRequest(actual, candidate) || !isSemanticCandidateOf(actual, candidate))
|
|
596
|
+
throw new TypeError('Expected a direct child of this actual request');
|
|
597
|
+
const b = actual.budget, charge = b.chargeWork;
|
|
598
|
+
return b.guard(() => {
|
|
599
|
+
const fail = (rule, message, kind = 'candidate-rejected') => {
|
|
600
|
+
charge(32 + rule.length + message.length + target.length);
|
|
601
|
+
throw new CorrespondenceAbort(Object.freeze({ kind, rule, component: target, contextId: candidate.contextId, message }));
|
|
602
|
+
};
|
|
603
|
+
try {
|
|
604
|
+
if (actual.kind !== 'actual' || actual.membership !== 'complete-actual-plus-additions' || candidate.membership !== 'complete-actual-plus-additions')
|
|
605
|
+
return fail('additive-source-context', 'Complete actual source membership is required', 'unresolved');
|
|
606
|
+
if (intermediate === representative || actual.lookup(intermediate).kind !== 'missing' || actual.lookup(representative).kind !== 'missing'
|
|
607
|
+
|| candidate.members.length !== actual.members.length + 2)
|
|
608
|
+
return fail('additive-fresh-types', 'Exactly two fresh type components are required');
|
|
609
|
+
for (const id of actual.members) {
|
|
610
|
+
charge(16 + id.length);
|
|
611
|
+
const before = actual.lookup(id), after = candidate.lookup(id);
|
|
612
|
+
if (before.kind !== 'found' || after.kind !== 'found' || before.node !== after.node
|
|
613
|
+
|| actual.rawTypeProperties(id) !== candidate.rawTypeProperties(id)
|
|
614
|
+
|| actual.rawSimpleTypeProperties(id) !== candidate.rawSimpleTypeProperties(id)
|
|
615
|
+
|| actual.rawElementProperties(id) !== candidate.rawElementProperties(id)
|
|
616
|
+
|| actual.rawAttributeProperties(id) !== candidate.rawAttributeProperties(id)
|
|
617
|
+
|| actual.rawAttributeGroupProperties(id) !== candidate.rawAttributeGroupProperties(id)
|
|
618
|
+
|| actual.rawParticleWildcardProperties(id) !== candidate.rawParticleWildcardProperties(id)
|
|
619
|
+
|| actual.owner(id) !== candidate.owner(id))
|
|
620
|
+
return fail('additive-original-preservation', 'An original component or scope binding changed');
|
|
621
|
+
}
|
|
622
|
+
const e = candidate.lookup(intermediate), c = candidate.lookup(representative);
|
|
623
|
+
if (e.kind !== 'found' || c.kind !== 'found' || e.node.kind !== 'complexType' || c.node.kind !== 'complexType')
|
|
624
|
+
return fail('additive-fresh-types', 'Fresh extension and restriction complex types are required');
|
|
625
|
+
const original = mapActualComplexProperties(actual, target), middle = candidate.rawTypeProperties(intermediate), end = candidate.rawTypeProperties(representative);
|
|
626
|
+
if (!middle || !end)
|
|
627
|
+
return fail('additive-raw-properties', 'Complete fresh complex properties are required', 'unresolved');
|
|
628
|
+
if (original.properties.content.kind !== 'simple' || middle.content.kind !== 'simple' || end.content.kind !== 'simple')
|
|
629
|
+
return fail('additive-simple-content-family', 'This property route supports only simple content', 'unresolved');
|
|
630
|
+
const designated = re01Ancestor(actual, target);
|
|
631
|
+
if (designated.kind !== 'checked')
|
|
632
|
+
throw new CorrespondenceAbort(designated);
|
|
633
|
+
const typeDependencies = collectSemanticTypeDependencies(candidate);
|
|
634
|
+
typeDependencies.add(original.typeDependencies);
|
|
635
|
+
typeDependencies.add(designated.typeDependencies);
|
|
636
|
+
const key = (context, reference) => {
|
|
637
|
+
const resolved = resolveSemanticType(context, reference);
|
|
638
|
+
if (!('identity' in resolved))
|
|
639
|
+
return fail('additive-type-reference', 'A property type is unavailable', 'unresolved');
|
|
640
|
+
typeDependencies.add([{ contextId: context.contextId, type: resolved.identity }]);
|
|
641
|
+
return semanticTypeKey(context, resolved.identity);
|
|
642
|
+
};
|
|
643
|
+
const sameSet = (left, right) => {
|
|
644
|
+
charge(4);
|
|
645
|
+
const a = new Set(), z = new Set();
|
|
646
|
+
for (const value of left) {
|
|
647
|
+
charge(2 + value.length);
|
|
648
|
+
a.add(value);
|
|
649
|
+
}
|
|
650
|
+
for (const value of right) {
|
|
651
|
+
charge(2 + value.length);
|
|
652
|
+
z.add(value);
|
|
653
|
+
}
|
|
654
|
+
if (a.size !== z.size)
|
|
655
|
+
return false;
|
|
656
|
+
for (const value of a) {
|
|
657
|
+
charge(2 + value.length);
|
|
658
|
+
if (!z.has(value))
|
|
659
|
+
return false;
|
|
660
|
+
}
|
|
661
|
+
return true;
|
|
662
|
+
};
|
|
663
|
+
const sameWildcard = (left, right) => {
|
|
664
|
+
charge(4);
|
|
665
|
+
if (!left.wildcard || !right.wildcard)
|
|
666
|
+
return left.wildcard === right.wildcard;
|
|
667
|
+
return left.wildcard.processContents === right.wildcard.processContents
|
|
668
|
+
&& namespaceSetSubset(left.wildcard.namespace, right.wildcard.namespace, charge)
|
|
669
|
+
&& namespaceSetSubset(right.wildcard.namespace, left.wildcard.namespace, charge);
|
|
670
|
+
};
|
|
671
|
+
if (middle.derivation.method !== 'extension' || end.derivation.method !== 'restriction'
|
|
672
|
+
|| key(candidate, middle.derivation.base) !== key(actual, designated.ancestor)
|
|
673
|
+
|| key(candidate, end.derivation.base) !== key(candidate, { kind: 'local', target: intermediate }))
|
|
674
|
+
return fail('additive-derivation-chain', 'The representatives do not have the required extension/restriction chain');
|
|
675
|
+
if (key(candidate, middle.content.type) !== key(actual, designated.ancestor)
|
|
676
|
+
|| key(candidate, end.content.type) !== key(actual, original.properties.content.type))
|
|
677
|
+
return fail('additive-content-correspondence', 'Representative scalar content differs from its native source property');
|
|
678
|
+
const prior = original.properties;
|
|
679
|
+
if (end.targetNamespace !== prior.targetNamespace || end.abstract !== prior.abstract
|
|
680
|
+
|| !sameSet(end.final, prior.final) || !sameSet(end.block, prior.block)
|
|
681
|
+
|| !sameSet(end.attributeUses, prior.attributeUses) || !sameWildcard(end, prior))
|
|
682
|
+
return fail('additive-target-properties', 'The restriction representative changed an effective target property');
|
|
683
|
+
if (middle.targetNamespace !== prior.targetNamespace || middle.abstract || middle.final.length || middle.block.length
|
|
684
|
+
|| !sameSet(middle.attributeUses, prior.attributeUses) || !sameWildcard(middle, prior))
|
|
685
|
+
return fail('additive-middle-properties', 'The extension representative changed the selected middle properties');
|
|
686
|
+
charge(128);
|
|
687
|
+
const result = Object.freeze({ kind: 'checked-additive-simple-properties', actualContextId: actual.contextId,
|
|
688
|
+
contextId: candidate.contextId, target, intermediate, representative, scalarObligations: original.scalarObligations,
|
|
689
|
+
typeDependencies: typeDependencies.snapshot(), datedInterpretation: 'unassessed' });
|
|
690
|
+
additiveProperties.set(result, Object.freeze({ actual, context: candidate }));
|
|
691
|
+
return result;
|
|
692
|
+
}
|
|
693
|
+
catch (error) {
|
|
694
|
+
if (error instanceof CorrespondenceAbort)
|
|
695
|
+
return error.result;
|
|
696
|
+
if (error instanceof RelationProblem)
|
|
697
|
+
return Object.freeze({ kind: 'unresolved', rule: error.result.rule, component: error.result.component, message: error.message });
|
|
698
|
+
throw error;
|
|
699
|
+
}
|
|
700
|
+
});
|
|
701
|
+
}
|
|
@@ -68,4 +68,3 @@ export type RawComplexTypeProperties = Readonly<{
|
|
|
68
68
|
/** Runtime data-shape boundary, shared by preparation and property consumers. */
|
|
69
69
|
export declare function assertRawComplexTypeShape(value: unknown, budget: SemanticBudget): asserts value is RawComplexTypeProperties;
|
|
70
70
|
export {};
|
|
71
|
-
//# sourceMappingURL=re01TypeProperties.d.ts.map
|
|
@@ -20,4 +20,3 @@ export type RawTypeValidation = Readonly<{
|
|
|
20
20
|
}> | ResourceLimitFailure;
|
|
21
21
|
/** The context has already copied data and rejected accessors. No caller labels authenticate actual mapping. */
|
|
22
22
|
export declare function validateRawComplexTypeProperties(context: SemanticContext, typeId: NodeId, correspondence?: CorrespondenceReceipt): RawTypeValidation;
|
|
23
|
-
//# sourceMappingURL=re01TypePropertyValidation.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CanonicalGraph, GraphNode, NodeId, Reference } from "./canonicalGraph.js";
|
|
2
2
|
import type { SyntaxSource } from "../loader/orderedSyntax.js";
|
|
3
|
+
import type { StandardSchemaLibrary, StandardSchemaElementDeclaration } from './standardSchemaComponents.js';
|
|
3
4
|
export declare class SemanticError extends Error {
|
|
4
5
|
readonly category: "invalid-schema" | "unsupported-capability" | "incompatible-artifact" | "resource-limit";
|
|
5
6
|
readonly component?: NodeId | undefined;
|
|
@@ -11,6 +12,7 @@ export type SemanticLimits = {
|
|
|
11
12
|
maxNodes?: number;
|
|
12
13
|
maxSteps?: number;
|
|
13
14
|
requestBudget?: import("./semanticBudget.js").SemanticBudget;
|
|
15
|
+
standardLibraries?: readonly StandardSchemaLibrary[];
|
|
14
16
|
};
|
|
15
17
|
export declare function semanticBudget(limits?: SemanticLimits): {
|
|
16
18
|
maxNodes: number;
|
|
@@ -32,7 +34,8 @@ export type ResolvedGraph = Readonly<{
|
|
|
32
34
|
steps: number;
|
|
33
35
|
}>;
|
|
34
36
|
}>;
|
|
37
|
+
/** Native acquired dependencies only; copied graph reports cannot recreate this association. */
|
|
38
|
+
export declare function standardSchemaLibrariesForResolved(resolved: ResolvedGraph): readonly StandardSchemaLibrary[] | undefined;
|
|
35
39
|
/** Resolve against a node index, never against generated names or an asserted stored target. */
|
|
36
|
-
export declare function referenceTarget(reference: Reference, nodes: ReadonlyMap<NodeId, GraphNode>, owner: GraphNode): NodeId | undefined;
|
|
40
|
+
export declare function referenceTarget(reference: Reference, nodes: ReadonlyMap<NodeId, GraphNode>, owner: GraphNode, standards?: ReadonlyMap<NodeId, StandardSchemaElementDeclaration>): NodeId | undefined;
|
|
37
41
|
export declare function resolveCanonicalGraph(graph: CanonicalGraph, limits?: SemanticLimits): ResolvedGraph;
|
|
38
|
-
//# sourceMappingURL=resolveCanonicalGraph.d.ts.map
|