@techspokes/typescript-wsdl-client 1.1.4 → 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 +81 -35
- package/dist/app/generateApp.d.ts +0 -1
- package/dist/app/generateApp.js +8 -6
- 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 +123 -5
- package/dist/client/checkedDirectRuntime.d.ts +96 -0
- package/dist/client/checkedDirectRuntime.js +43 -0
- package/dist/client/directClientRuntime.d.ts +74 -0
- package/dist/client/directClientRuntime.js +165 -0
- package/dist/client/directClientVersion.d.ts +6 -0
- package/dist/client/directClientVersion.js +6 -0
- package/dist/client/generateClient.d.ts +0 -1
- package/dist/client/generateClient.js +26 -12
- package/dist/client/generateDirectClient.d.ts +32 -0
- package/dist/client/generateDirectClient.js +268 -0
- 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 +6 -0
- package/dist/compiler/buildCanonicalGraph.js +381 -0
- package/dist/compiler/canonicalGraph.d.ts +197 -0
- package/dist/compiler/canonicalGraph.js +37 -0
- package/dist/compiler/catalogErrors.d.ts +17 -0
- package/dist/compiler/catalogErrors.js +86 -0
- package/dist/compiler/catalogProvenance.d.ts +14 -0
- package/dist/compiler/catalogProvenance.js +229 -0
- package/dist/compiler/checkedAssessment.d.ts +90 -0
- package/dist/compiler/checkedAssessment.js +300 -0
- package/dist/compiler/checkedComponentSource.d.ts +16 -0
- package/dist/compiler/checkedComponentSource.js +31 -0
- package/dist/compiler/checkedSourcePreparation.d.ts +72 -0
- package/dist/compiler/checkedSourcePreparation.js +202 -0
- package/dist/compiler/complexTypeContent.d.ts +58 -0
- package/dist/compiler/complexTypeContent.js +558 -0
- 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 +68 -0
- package/dist/compiler/composeCanonicalGraph.js +252 -0
- package/dist/compiler/dataOwnership.d.ts +21 -0
- package/dist/compiler/dataOwnership.js +167 -0
- package/dist/compiler/datatypeValues.d.ts +46 -0
- package/dist/compiler/datatypeValues.js +275 -0
- package/dist/compiler/directCodec.d.ts +116 -0
- package/dist/compiler/directCodec.js +377 -0
- package/dist/compiler/directExecutionPolicy.d.ts +9 -0
- package/dist/compiler/directExecutionPolicy.js +17 -0
- package/dist/compiler/directOperation.d.ts +114 -0
- package/dist/compiler/directOperation.js +373 -0
- package/dist/compiler/directSoap.d.ts +66 -0
- package/dist/compiler/directSoap.js +391 -0
- package/dist/compiler/directSoapSource.d.ts +38 -0
- package/dist/compiler/directSoapSource.js +233 -0
- package/dist/compiler/directSourceCapsule.d.ts +169 -0
- package/dist/compiler/directSourceCapsule.js +727 -0
- package/dist/compiler/directStructure.d.ts +128 -0
- package/dist/compiler/directStructure.js +543 -0
- package/dist/compiler/directStructurePlan.d.ts +149 -0
- package/dist/compiler/directStructurePlan.js +623 -0
- package/dist/compiler/directValues.d.ts +128 -0
- package/dist/compiler/directValues.js +1116 -0
- package/dist/compiler/finiteRe01Construction.d.ts +69 -0
- package/dist/compiler/finiteRe01Construction.js +422 -0
- package/dist/compiler/finiteRe01Verification.d.ts +218 -0
- package/dist/compiler/finiteRe01Verification.js +1217 -0
- package/dist/compiler/generateCatalog.d.ts +0 -1
- package/dist/compiler/graphTraversal.d.ts +10 -0
- package/dist/compiler/graphTraversal.js +37 -0
- package/dist/compiler/hypotheticalScopedIdentity.d.ts +22 -0
- package/dist/compiler/hypotheticalScopedIdentity.js +81 -0
- package/dist/compiler/occurrenceAnalysis.d.ts +66 -0
- package/dist/compiler/occurrenceAnalysis.js +316 -0
- package/dist/compiler/originalSourceMembership.d.ts +5 -0
- package/dist/compiler/originalSourceMembership.js +31 -0
- package/dist/compiler/particleAttribution.d.ts +16 -0
- package/dist/compiler/particleAttribution.js +494 -0
- package/dist/compiler/particleDeclarationConsistency.d.ts +23 -0
- package/dist/compiler/particleDeclarationConsistency.js +206 -0
- package/dist/compiler/particleExtension.d.ts +21 -0
- package/dist/compiler/particleExtension.js +123 -0
- package/dist/compiler/particleLocalAssessment.d.ts +19 -0
- package/dist/compiler/particleLocalAssessment.js +92 -0
- package/dist/compiler/particleRestriction.d.ts +23 -0
- package/dist/compiler/particleRestriction.js +494 -0
- package/dist/compiler/particleSemanticView.d.ts +51 -0
- package/dist/compiler/particleSemanticView.js +310 -0
- package/dist/compiler/particleWildcardRelation.d.ts +87 -0
- package/dist/compiler/particleWildcardRelation.js +143 -0
- 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 +85 -0
- package/dist/compiler/re01CandidateCorrespondence.js +701 -0
- package/dist/compiler/re01TypeProperties.d.ts +70 -0
- package/dist/compiler/re01TypeProperties.js +120 -0
- package/dist/compiler/re01TypePropertyValidation.d.ts +22 -0
- package/dist/compiler/re01TypePropertyValidation.js +161 -0
- package/dist/compiler/resolveCanonicalGraph.d.ts +41 -0
- package/dist/compiler/resolveCanonicalGraph.js +240 -0
- package/dist/compiler/scalarSchemaAssessment.d.ts +424 -0
- package/dist/compiler/scalarSchemaAssessment.js +5198 -0
- package/dist/compiler/schemaAttributeGroupProperties.d.ts +16 -0
- package/dist/compiler/schemaAttributeGroupProperties.js +53 -0
- package/dist/compiler/schemaAttributeProperties.d.ts +9 -0
- package/dist/compiler/schemaAttributeProperties.js +11 -0
- package/dist/compiler/schemaAttributeUses.d.ts +110 -0
- package/dist/compiler/schemaAttributeUses.js +798 -0
- package/dist/compiler/schemaBinaryWordReconstruction.d.ts +9 -0
- package/dist/compiler/schemaBinaryWordReconstruction.js +33 -0
- package/dist/compiler/schemaBuiltinFacets.d.ts +13 -0
- package/dist/compiler/schemaBuiltinFacets.js +51 -0
- package/dist/compiler/schemaCalendarImages.d.ts +7 -0
- package/dist/compiler/schemaCalendarImages.js +204 -0
- package/dist/compiler/schemaCalendarLanguage.d.ts +10 -0
- package/dist/compiler/schemaCalendarLanguage.js +227 -0
- package/dist/compiler/schemaCompiler.d.ts +0 -1
- package/dist/compiler/schemaComponentEquality.d.ts +27 -0
- package/dist/compiler/schemaComponentEquality.js +446 -0
- package/dist/compiler/schemaConstructionAssessment.d.ts +79 -0
- package/dist/compiler/schemaConstructionAssessment.js +745 -0
- package/dist/compiler/schemaDatatypeValues.d.ts +3 -0
- package/dist/compiler/schemaDatatypeValues.js +2 -0
- package/dist/compiler/schemaDecimalLanguage.d.ts +6 -0
- package/dist/compiler/schemaDecimalLanguage.js +102 -0
- package/dist/compiler/schemaDeclarationPrimitives.d.ts +39 -0
- package/dist/compiler/schemaDeclarationPrimitives.js +211 -0
- package/dist/compiler/schemaDocumentSyntax.d.ts +54 -0
- package/dist/compiler/schemaDocumentSyntax.js +294 -0
- package/dist/compiler/schemaDurationLanguage.d.ts +10 -0
- package/dist/compiler/schemaDurationLanguage.js +170 -0
- package/dist/compiler/schemaElementInstance.d.ts +30 -0
- package/dist/compiler/schemaElementInstance.js +45 -0
- package/dist/compiler/schemaElementProperties.d.ts +15 -0
- package/dist/compiler/schemaElementProperties.js +23 -0
- package/dist/compiler/schemaEndpointWordCapacity.d.ts +35 -0
- package/dist/compiler/schemaEndpointWordCapacity.js +39 -0
- package/dist/compiler/schemaExactCalendar.d.ts +72 -0
- package/dist/compiler/schemaExactCalendar.js +264 -0
- package/dist/compiler/schemaFacetAnnotation.d.ts +31 -0
- package/dist/compiler/schemaFacetAnnotation.js +199 -0
- package/dist/compiler/schemaGeneratedScalarShape.d.ts +34 -0
- package/dist/compiler/schemaGeneratedScalarShape.js +178 -0
- package/dist/compiler/schemaIdentityConstraints.d.ts +72 -0
- package/dist/compiler/schemaIdentityConstraints.js +362 -0
- package/dist/compiler/schemaIeeeLanguage.d.ts +42 -0
- package/dist/compiler/schemaIeeeLanguage.js +759 -0
- package/dist/compiler/schemaIntegerImages.d.ts +10 -0
- package/dist/compiler/schemaIntegerImages.js +113 -0
- package/dist/compiler/schemaLexicalPredicates.d.ts +28 -0
- package/dist/compiler/schemaLexicalPredicates.js +63 -0
- package/dist/compiler/schemaNotationProperties.d.ts +31 -0
- package/dist/compiler/schemaNotationProperties.js +84 -0
- package/dist/compiler/schemaNumericImageConditions.d.ts +23 -0
- package/dist/compiler/schemaNumericImageConditions.js +66 -0
- package/dist/compiler/schemaParticleWildcardProperties.d.ts +19 -0
- package/dist/compiler/schemaParticleWildcardProperties.js +43 -0
- package/dist/compiler/schemaPattern.d.ts +1061 -0
- package/dist/compiler/schemaPattern.js +581 -0
- package/dist/compiler/schemaRegularLanguage.d.ts +66 -0
- package/dist/compiler/schemaRegularLanguage.js +1166 -0
- package/dist/compiler/schemaScalarContext.d.ts +85 -0
- package/dist/compiler/schemaScalarContext.js +78 -0
- package/dist/compiler/schemaScalarKernel.d.ts +181 -0
- package/dist/compiler/schemaScalarKernel.js +391 -0
- package/dist/compiler/schemaScalarWitnesses.d.ts +5 -0
- package/dist/compiler/schemaScalarWitnesses.js +118 -0
- package/dist/compiler/schemaSimpleTypeProperties.d.ts +94 -0
- package/dist/compiler/schemaSimpleTypeProperties.js +103 -0
- package/dist/compiler/schemaSourceGrammar.d.ts +26 -0
- package/dist/compiler/schemaSourceGrammar.js +290 -0
- package/dist/compiler/schemaSourceLexical.d.ts +3 -0
- package/dist/compiler/schemaSourceLexical.js +12 -0
- package/dist/compiler/schemaSourceValues.d.ts +50 -0
- package/dist/compiler/schemaSourceValues.js +225 -0
- package/dist/compiler/schemaSourceWildcards.d.ts +27 -0
- package/dist/compiler/schemaSourceWildcards.js +249 -0
- package/dist/compiler/schemaSymbolicSequences.d.ts +15 -0
- package/dist/compiler/schemaSymbolicSequences.js +99 -0
- package/dist/compiler/schemaSymbolicValueSets.d.ts +31 -0
- package/dist/compiler/schemaSymbolicValueSets.js +149 -0
- package/dist/compiler/schemaSyntaxAssessment.d.ts +24 -0
- package/dist/compiler/schemaSyntaxAssessment.js +361 -0
- package/dist/compiler/schemaTemporalAliases.d.ts +5 -0
- package/dist/compiler/schemaTemporalAliases.js +195 -0
- package/dist/compiler/schemaTokenImages.d.ts +8 -0
- package/dist/compiler/schemaTokenImages.js +142 -0
- package/dist/compiler/schemaTypeIdentity.d.ts +38 -0
- package/dist/compiler/schemaTypeIdentity.js +80 -0
- package/dist/compiler/schemaTypeRelations.d.ts +37 -0
- package/dist/compiler/schemaTypeRelations.js +576 -0
- package/dist/compiler/schemaUri.d.ts +12 -0
- package/dist/compiler/schemaUri.js +103 -0
- package/dist/compiler/schemaValueContext.d.ts +25 -0
- package/dist/compiler/schemaValueContext.js +1 -0
- package/dist/compiler/schemaValueImages.d.ts +9 -0
- package/dist/compiler/schemaValueImages.js +142 -0
- package/dist/compiler/schemaValueSequences.d.ts +14 -0
- package/dist/compiler/schemaValueSequences.js +19 -0
- package/dist/compiler/semanticBudget.d.ts +67 -0
- package/dist/compiler/semanticBudget.js +193 -0
- package/dist/compiler/semanticCatalog.d.ts +121 -0
- package/dist/compiler/semanticCatalog.js +160 -0
- package/dist/compiler/semanticContext.d.ts +183 -0
- package/dist/compiler/semanticContext.js +1207 -0
- package/dist/compiler/semanticTypeDependencies.d.ts +7 -0
- package/dist/compiler/semanticTypeDependencies.js +64 -0
- package/dist/compiler/semanticTypeReference.d.ts +23 -0
- package/dist/compiler/semanticTypeReference.js +36 -0
- package/dist/compiler/shapeResolver.d.ts +1 -1
- package/dist/compiler/shapeResolver.js +7 -9
- package/dist/compiler/soapHeaders.d.ts +16 -0
- package/dist/compiler/soapHeaders.js +42 -0
- package/dist/compiler/sourceSchemaBinding.d.ts +25 -0
- package/dist/compiler/sourceSchemaBinding.js +39 -0
- 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 +15 -0
- package/dist/compiler/structuralCompanions.js +232 -0
- package/dist/compiler/validateSemanticGraph.d.ts +4 -0
- package/dist/compiler/validateSemanticGraph.js +376 -0
- package/dist/compiler/wildcardAlgebra.d.ts +25 -0
- package/dist/compiler/wildcardAlgebra.js +155 -0
- 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/generateGateway.js +2 -2
- 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 +9 -1
- package/dist/index.js +3 -0
- package/dist/loader/fetch.d.ts +0 -1
- package/dist/loader/orderedSyntax.d.ts +84 -0
- package/dist/loader/orderedSyntax.js +222 -0
- package/dist/loader/resolutionDepth.d.ts +6 -0
- package/dist/loader/resolutionDepth.js +65 -0
- package/dist/loader/schemaInput.d.ts +80 -0
- package/dist/loader/schemaInput.js +249 -0
- package/dist/loader/schemaResources.d.ts +60 -0
- package/dist/loader/schemaResources.js +333 -0
- 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/generateOpenAPI.js +2 -2
- 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/generateTests.js +2 -2
- 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 +2 -0
- package/dist/util/xmlWhitespace.js +4 -0
- 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 +43 -1
- package/docs/concepts.md +136 -1
- package/docs/configuration.md +5 -1
- package/docs/corpus.md +33 -0
- package/docs/direct-values.md +311 -0
- 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 +17 -5
- package/docs/testing.md +117 -31
- package/llms.txt +7 -7
- package/package.json +79 -25
- package/src/generation/preambles/direct-client/typescript.preamble +3 -0
- 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/generateClient.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/generateCatalog.d.ts.map +0 -1
- package/dist/compiler/schemaCompiler.d.ts.map +0 -1
- package/dist/compiler/shapeResolver.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/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/xsd/primitives.d.ts.map +0 -1
- package/docs/AGENTS.md +0 -47
- package/docs/README.md +0 -56
- package/docs/architecture.md +0 -149
- package/docs/decisions/001-test-generation.md +0 -36
- package/docs/decisions/002-streamable-responses.md +0 -330
- package/docs/file-naming-and-path-organization.md +0 -213
- 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/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,69 @@
|
|
|
1
|
+
/** Qualified automatic completion over repository-owned finite candidate grammars. */
|
|
2
|
+
import type { NodeId } from './canonicalGraph.js';
|
|
3
|
+
import type { SemanticContext } from './semanticContext.js';
|
|
4
|
+
import type { ResourceLimitFailure } from './semanticBudget.js';
|
|
5
|
+
import type { FiniteRe01Evidence, FiniteRe01PrimitiveEvidence, FiniteRe01EvidenceNode, FiniteRe01Hypothesis, FiniteVerificationFailure, FiniteCandidateReceipt, FinitePrimitiveReceipt } from './finiteRe01Verification.js';
|
|
6
|
+
import type { ContextFailure } from './semanticContext.js';
|
|
7
|
+
import type { ContentViewResult } from './complexTypeContent.js';
|
|
8
|
+
type ConstructionFailure = FiniteVerificationFailure | ContextFailure | Exclude<ContentViewResult, {
|
|
9
|
+
kind: 'checked';
|
|
10
|
+
}>;
|
|
11
|
+
/** Additional hypotheses remain untrusted until native correspondence, rank and aggregate verification. */
|
|
12
|
+
export type FiniteConstructionProducer = (actual: SemanticContext, parent: SemanticContext, target: NodeId) => Readonly<{
|
|
13
|
+
kind: 'prepared-additional-assignments';
|
|
14
|
+
assignments: readonly Readonly<{
|
|
15
|
+
evidence: FiniteRe01EvidenceNode;
|
|
16
|
+
}>[];
|
|
17
|
+
outcomes: readonly Readonly<{
|
|
18
|
+
result: 'prepared-local-evidence' | ConstructionFailure;
|
|
19
|
+
}>[];
|
|
20
|
+
}> | ConstructionFailure;
|
|
21
|
+
export type EvidenceBuilderMode = 'input-only' | 'seeded-completion';
|
|
22
|
+
export type StoredRe01Rank = Readonly<{
|
|
23
|
+
q: number;
|
|
24
|
+
n: number;
|
|
25
|
+
}>;
|
|
26
|
+
export type EvidenceBuilderOutcome = Readonly<{
|
|
27
|
+
parent: SemanticContext;
|
|
28
|
+
target: NodeId;
|
|
29
|
+
failure: FiniteVerificationFailure | Exclude<ConstructionFailure, ResourceLimitFailure>;
|
|
30
|
+
}>;
|
|
31
|
+
export type EvidenceBuilderResult = Readonly<{
|
|
32
|
+
kind: 'checked-witness';
|
|
33
|
+
mode: EvidenceBuilderMode;
|
|
34
|
+
evidence: FiniteRe01Evidence | FiniteRe01PrimitiveEvidence;
|
|
35
|
+
receipt: FiniteCandidateReceipt | FinitePrimitiveReceipt;
|
|
36
|
+
outcomes: readonly EvidenceBuilderOutcome[];
|
|
37
|
+
ranks: readonly Readonly<{
|
|
38
|
+
parent: SemanticContext;
|
|
39
|
+
context: SemanticContext;
|
|
40
|
+
before: StoredRe01Rank;
|
|
41
|
+
after: StoredRe01Rank;
|
|
42
|
+
}>[];
|
|
43
|
+
claims: Readonly<{
|
|
44
|
+
universalCoverage: false;
|
|
45
|
+
completeNegativeAnswer: false;
|
|
46
|
+
otherCandidatesExhausted: false;
|
|
47
|
+
}>;
|
|
48
|
+
}> | Readonly<{
|
|
49
|
+
kind: 'no-witness-found';
|
|
50
|
+
mode: EvidenceBuilderMode;
|
|
51
|
+
outcomes: readonly EvidenceBuilderOutcome[];
|
|
52
|
+
universalCoverage: false;
|
|
53
|
+
completeNegativeAnswer: false;
|
|
54
|
+
}> | FiniteVerificationFailure | ResourceLimitFailure;
|
|
55
|
+
/**
|
|
56
|
+
* Storage census, not legality closure. Complete membership equates members and
|
|
57
|
+
* stored records; each extension is classified from its exact native ancestry.
|
|
58
|
+
* Unused original components are never required to be FULL-valid in H here.
|
|
59
|
+
*/
|
|
60
|
+
export declare function storedRe01Rank(actual: SemanticContext, context: SemanticContext): StoredRe01Rank | FiniteVerificationFailure | ResourceLimitFailure;
|
|
61
|
+
/** Discover the root and every required child using only authentic Gamma/target. */
|
|
62
|
+
export declare function buildRe01Evidence(actual: SemanticContext, target: NodeId): EvidenceBuilderResult;
|
|
63
|
+
/** A seed is one original-root hypothesis, never a child list or answer forest. */
|
|
64
|
+
export declare function completeSeededRe01Evidence(actual: SemanticContext, target: NodeId, hypothesis: FiniteRe01Hypothesis): EvidenceBuilderResult;
|
|
65
|
+
/** Complete through supplied hypothesis producers; native verification alone grants the finite receipt.
|
|
66
|
+
* @remarks Failure of these limited families is inconclusive, never schema invalidity or dated-XSD correspondence.
|
|
67
|
+
*/
|
|
68
|
+
export declare function buildRe01EvidenceWithProducers(actual: SemanticContext, target: NodeId, mode: EvidenceBuilderMode, producers: readonly FiniteConstructionProducer[], seed?: FiniteRe01Hypothesis): EvidenceBuilderResult;
|
|
69
|
+
export {};
|
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
import { assertSemanticContext, SemanticContextAccessError } from './semanticContext.js';
|
|
2
|
+
import { immediateTypeBase } from './schemaTypeRelations.js';
|
|
3
|
+
import { re01Ancestor } from './re01CandidateCorrespondence.js';
|
|
4
|
+
import { resolveSemanticType, semanticTypeKey } from './schemaTypeIdentity.js';
|
|
5
|
+
import { prepareFiniteRe01Frontier, verifyFiniteRe01EvidenceWithFrontier } from './finiteRe01Verification.js';
|
|
6
|
+
import { prepareInheritedMiddleAssignments, prepareFreshMiddleAssignments, replaySharedAssignment } from './re01CandidateAssignments.js';
|
|
7
|
+
/**
|
|
8
|
+
* Storage census, not legality closure. Complete membership equates members and
|
|
9
|
+
* stored records; each extension is classified from its exact native ancestry.
|
|
10
|
+
* Unused original components are never required to be FULL-valid in H here.
|
|
11
|
+
*/
|
|
12
|
+
export function storedRe01Rank(actual, context) {
|
|
13
|
+
assertSemanticContext(actual);
|
|
14
|
+
assertSemanticContext(context);
|
|
15
|
+
const b = context.budget;
|
|
16
|
+
return b.guard(() => {
|
|
17
|
+
b.chargeWork(12);
|
|
18
|
+
if (actual !== context.originalContext() || context.membership !== 'complete-actual-plus-additions'
|
|
19
|
+
|| actual.membership !== 'complete-actual-plus-additions')
|
|
20
|
+
return Object.freeze({ kind: 'unresolved',
|
|
21
|
+
rule: 'builder-rank-membership', message: 'Stored rank requires complete membership in the same request', contextId: context.contextId });
|
|
22
|
+
let q = 0, n = 0;
|
|
23
|
+
for (const id of context.members) {
|
|
24
|
+
b.chargeWork(5 + id.length);
|
|
25
|
+
const found = context.lookup(id);
|
|
26
|
+
if (found.kind !== 'found')
|
|
27
|
+
return Object.freeze({ kind: 'unresolved', rule: 'builder-rank-availability',
|
|
28
|
+
message: 'A stored rank subject is unavailable', contextId: context.contextId, component: id });
|
|
29
|
+
if (found.node.kind !== 'complexType')
|
|
30
|
+
continue;
|
|
31
|
+
const raw = context.rawTypeProperties(id);
|
|
32
|
+
if ((raw?.derivation.method ?? found.node.derivation?.kind ?? 'restriction') !== 'extension')
|
|
33
|
+
continue;
|
|
34
|
+
const first = immediateTypeBase(context, { kind: 'local', target: id });
|
|
35
|
+
if (first.kind === 'resource-limit')
|
|
36
|
+
return first;
|
|
37
|
+
if (first.kind !== 'checked' || !first.value)
|
|
38
|
+
return Object.freeze({ kind: 'unresolved', rule: 'builder-rank-ancestry',
|
|
39
|
+
message: 'The stored extension lacks its exact immediate base', contextId: context.contextId, component: id });
|
|
40
|
+
const ancestor = re01Ancestor(context, id);
|
|
41
|
+
if (ancestor.kind === 'resource-limit')
|
|
42
|
+
return ancestor;
|
|
43
|
+
if (ancestor.kind !== 'checked') {
|
|
44
|
+
b.chargeWork(8);
|
|
45
|
+
return Object.freeze({ ...ancestor, kind: 'unresolved', contextId: context.contextId });
|
|
46
|
+
}
|
|
47
|
+
const a = resolveSemanticType(context, first.value), z = resolveSemanticType(context, ancestor.ancestor);
|
|
48
|
+
if (!('identity' in a) || !('identity' in z))
|
|
49
|
+
return Object.freeze({ kind: 'unresolved', rule: 'builder-rank-ancestry',
|
|
50
|
+
message: 'The stored extension ancestry is unavailable', contextId: context.contextId, component: id });
|
|
51
|
+
if (b.compareText(semanticTypeKey(context, a.identity), semanticTypeKey(context, z.identity)) === 0)
|
|
52
|
+
continue;
|
|
53
|
+
b.chargeWork(2);
|
|
54
|
+
if (actual.lookup(id).kind === 'found')
|
|
55
|
+
q++;
|
|
56
|
+
else
|
|
57
|
+
n++;
|
|
58
|
+
}
|
|
59
|
+
b.chargeWork(4);
|
|
60
|
+
return Object.freeze({ q, n });
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/** Discover the root and every required child using only authentic Gamma/target. */
|
|
64
|
+
export function buildRe01Evidence(actual, target) {
|
|
65
|
+
return build(actual, target, 'input-only');
|
|
66
|
+
}
|
|
67
|
+
/** A seed is one original-root hypothesis, never a child list or answer forest. */
|
|
68
|
+
export function completeSeededRe01Evidence(actual, target, hypothesis) {
|
|
69
|
+
return build(actual, target, 'seeded-completion', hypothesis);
|
|
70
|
+
}
|
|
71
|
+
/** Complete through supplied hypothesis producers; native verification alone grants the finite receipt.
|
|
72
|
+
* @remarks Failure of these limited families is inconclusive, never schema invalidity or dated-XSD correspondence.
|
|
73
|
+
*/
|
|
74
|
+
export function buildRe01EvidenceWithProducers(actual, target, mode, producers, seed) {
|
|
75
|
+
return build(actual, target, mode, seed, producers);
|
|
76
|
+
}
|
|
77
|
+
function build(actual, target, mode, seedInput, extraProducers = []) {
|
|
78
|
+
assertSemanticContext(actual);
|
|
79
|
+
const b = actual.budget, charge = b.chargeWork;
|
|
80
|
+
return b.guard(() => {
|
|
81
|
+
charge(18 + target.length);
|
|
82
|
+
let seed;
|
|
83
|
+
if (mode === 'seeded-completion' && seedInput === undefined)
|
|
84
|
+
return Object.freeze({ kind: 'invalid-evidence', rule: 'builder-seed-syntax',
|
|
85
|
+
message: 'Seeded completion requires one concrete root hypothesis', contextId: actual.contextId, component: target });
|
|
86
|
+
if (seedInput !== undefined) {
|
|
87
|
+
// Own data fields only. Context handles retain their private authority;
|
|
88
|
+
// the ancestor selector is copied through the bounded data owner.
|
|
89
|
+
const data = new Map();
|
|
90
|
+
const allowed = ['parent', 'context', 'target', 'intermediate', 'ancestor'];
|
|
91
|
+
for (const field in seedInput) {
|
|
92
|
+
charge(8 + field.length);
|
|
93
|
+
if (Object.hasOwn(seedInput, field) && !allowed.includes(field))
|
|
94
|
+
return Object.freeze({ kind: 'invalid-evidence', rule: 'builder-seed-syntax',
|
|
95
|
+
message: 'A seed supplies only one root hypothesis, without child choices or evidence', contextId: actual.contextId, component: target });
|
|
96
|
+
}
|
|
97
|
+
for (const field of ['id', 'premises', 'nodes', 'children', 'childTargets']) {
|
|
98
|
+
charge(50 + field.length);
|
|
99
|
+
if (seedInput && typeof seedInput === 'object' && Object.hasOwn(seedInput, field))
|
|
100
|
+
return Object.freeze({ kind: 'invalid-evidence', rule: 'builder-seed-syntax',
|
|
101
|
+
message: 'A seed supplies no child choices or completed evidence', contextId: actual.contextId, component: target });
|
|
102
|
+
}
|
|
103
|
+
for (const field of ['parent', 'context', 'target', 'intermediate', 'ancestor']) {
|
|
104
|
+
charge(50 + field.length);
|
|
105
|
+
const descriptor = seedInput && typeof seedInput === 'object' ? Object.getOwnPropertyDescriptor(seedInput, field) : undefined;
|
|
106
|
+
if (!descriptor || !('value' in descriptor))
|
|
107
|
+
return Object.freeze({ kind: 'invalid-evidence', rule: 'builder-seed-syntax',
|
|
108
|
+
message: 'Seed fields must be own data properties', contextId: actual.contextId, component: target });
|
|
109
|
+
data.set(field, descriptor.value);
|
|
110
|
+
}
|
|
111
|
+
const parent = data.get('parent'), context = data.get('context');
|
|
112
|
+
try {
|
|
113
|
+
assertSemanticContext(parent);
|
|
114
|
+
assertSemanticContext(context);
|
|
115
|
+
}
|
|
116
|
+
catch {
|
|
117
|
+
return Object.freeze({ kind: 'invalid-evidence', rule: 'builder-seed-context',
|
|
118
|
+
message: 'A seed must contain authentic contexts', contextId: actual.contextId, component: target });
|
|
119
|
+
}
|
|
120
|
+
if (typeof data.get('target') !== 'string' || typeof data.get('intermediate') !== 'string')
|
|
121
|
+
return Object.freeze({ kind: 'invalid-evidence', rule: 'builder-seed-syntax',
|
|
122
|
+
message: 'A seed must identify its target and intermediate', contextId: actual.contextId, component: target });
|
|
123
|
+
try {
|
|
124
|
+
const selector = b.freeze(b.snapshot(data.get('ancestor')));
|
|
125
|
+
if (!selector || typeof selector !== 'object')
|
|
126
|
+
return Object.freeze({ kind: 'invalid-evidence', rule: 'builder-seed-syntax',
|
|
127
|
+
message: 'A seed ancestor must be a semantic type selector', contextId: actual.contextId, component: target });
|
|
128
|
+
resolveSemanticType(parent, selector);
|
|
129
|
+
charge(12);
|
|
130
|
+
seed = Object.freeze({ parent, context, target: data.get('target'),
|
|
131
|
+
intermediate: data.get('intermediate'), ancestor: selector });
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
if (!(error instanceof TypeError) && !(error instanceof SemanticContextAccessError))
|
|
135
|
+
throw error;
|
|
136
|
+
return Object.freeze({ kind: 'invalid-evidence', rule: 'builder-seed-syntax',
|
|
137
|
+
message: 'A seed ancestor must be finite data', contextId: actual.contextId, component: target });
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
const session = prepareFiniteRe01Frontier(actual);
|
|
141
|
+
if (session.kind !== 'native-frontier-session')
|
|
142
|
+
return session;
|
|
143
|
+
let rootRequirement;
|
|
144
|
+
for (const requirement of session.actual.requirements) {
|
|
145
|
+
charge(2 + requirement.target.length + target.length);
|
|
146
|
+
if (requirement.target === target)
|
|
147
|
+
rootRequirement = requirement;
|
|
148
|
+
}
|
|
149
|
+
if (!rootRequirement)
|
|
150
|
+
return Object.freeze({ kind: 'invalid-evidence', rule: 'target-rule',
|
|
151
|
+
message: 'The selected original target has no RE01 extension obligation', contextId: actual.contextId, component: target });
|
|
152
|
+
if (seed && (seed.parent !== actual || seed.target !== target || rootRequirement.primitive))
|
|
153
|
+
return Object.freeze({ kind: 'invalid-evidence', rule: 'builder-seed-root',
|
|
154
|
+
message: 'A seed must hypothesize the requested original nonprimitive root', contextId: actual.contextId, component: target });
|
|
155
|
+
charge(12);
|
|
156
|
+
const outcomes = [];
|
|
157
|
+
const alternatives = new Map();
|
|
158
|
+
const rankCache = new Map();
|
|
159
|
+
const record = (parent, at, failure) => {
|
|
160
|
+
charge(8 + at.length);
|
|
161
|
+
outcomes.push(Object.freeze({ parent, target: at, failure }));
|
|
162
|
+
};
|
|
163
|
+
const rank = (context) => {
|
|
164
|
+
charge(2);
|
|
165
|
+
const prior = rankCache.get(context);
|
|
166
|
+
if (prior)
|
|
167
|
+
return prior;
|
|
168
|
+
const result = storedRe01Rank(actual, context);
|
|
169
|
+
if (!('kind' in result)) {
|
|
170
|
+
charge(2);
|
|
171
|
+
rankCache.set(context, result);
|
|
172
|
+
}
|
|
173
|
+
return result;
|
|
174
|
+
};
|
|
175
|
+
const qualify = (hypothesis) => {
|
|
176
|
+
const frontier = session.inspectCandidate(hypothesis);
|
|
177
|
+
if (frontier.kind !== 'inspected-frontier')
|
|
178
|
+
return frontier;
|
|
179
|
+
const before = rank(hypothesis.parent);
|
|
180
|
+
if ('kind' in before)
|
|
181
|
+
return before;
|
|
182
|
+
const after = rank(hypothesis.context);
|
|
183
|
+
if ('kind' in after)
|
|
184
|
+
return after;
|
|
185
|
+
charge(8 + hypothesis.target.length);
|
|
186
|
+
const original = actual.lookup(hypothesis.target).kind === 'found';
|
|
187
|
+
if (original ? after.q >= before.q : after.q !== before.q || after.n >= before.n)
|
|
188
|
+
return Object.freeze({ kind: 'unresolved', rule: 'builder-rank-progress',
|
|
189
|
+
message: 'This branch lacks the qualified original/fresh stored-rank decrease',
|
|
190
|
+
contextId: hypothesis.context.contextId, component: hypothesis.target });
|
|
191
|
+
// At a fresh cut, inspect every newly stored identity, rather than infer
|
|
192
|
+
// zero-new-NP from the producer delta or just a decreasing total census.
|
|
193
|
+
if (!original)
|
|
194
|
+
for (const id of hypothesis.context.members) {
|
|
195
|
+
charge(4 + id.length);
|
|
196
|
+
if (hypothesis.parent.lookup(id).kind === 'found')
|
|
197
|
+
continue;
|
|
198
|
+
const found = hypothesis.context.lookup(id);
|
|
199
|
+
if (found.kind !== 'found' || found.node.kind !== 'complexType')
|
|
200
|
+
continue;
|
|
201
|
+
const raw = hypothesis.context.rawTypeProperties(id);
|
|
202
|
+
if ((raw?.derivation.method ?? found.node.derivation?.kind ?? 'restriction') !== 'extension')
|
|
203
|
+
continue;
|
|
204
|
+
const first = immediateTypeBase(hypothesis.context, { kind: 'local', target: id });
|
|
205
|
+
if (first.kind === 'resource-limit')
|
|
206
|
+
return first;
|
|
207
|
+
const ancestor = re01Ancestor(hypothesis.context, id);
|
|
208
|
+
if (ancestor.kind !== 'checked')
|
|
209
|
+
return ancestor;
|
|
210
|
+
if (first.kind !== 'checked' || !first.value)
|
|
211
|
+
return Object.freeze({ kind: 'unresolved', rule: 'builder-rank-ancestry',
|
|
212
|
+
message: 'A newly stored extension lacks its base', contextId: hypothesis.context.contextId, component: id });
|
|
213
|
+
const a = resolveSemanticType(hypothesis.context, first.value), z = resolveSemanticType(hypothesis.context, ancestor.ancestor);
|
|
214
|
+
if (!('identity' in a) || !('identity' in z)
|
|
215
|
+
|| b.compareText(semanticTypeKey(hypothesis.context, a.identity), semanticTypeKey(hypothesis.context, z.identity)) !== 0)
|
|
216
|
+
return Object.freeze({ kind: 'unresolved', rule: 'builder-fresh-np',
|
|
217
|
+
message: 'A fresh cut introduced a stored nonprimitive identity', contextId: hypothesis.context.contextId, component: id });
|
|
218
|
+
}
|
|
219
|
+
charge(18);
|
|
220
|
+
return { hypothesis: Object.freeze({ parent: hypothesis.parent, context: hypothesis.context,
|
|
221
|
+
target: hypothesis.target, intermediate: hypothesis.intermediate, ancestor: frontier.correspondence.ancestor }), frontier,
|
|
222
|
+
rank: Object.freeze({ parent: hypothesis.parent, context: hypothesis.context, before, after }) };
|
|
223
|
+
};
|
|
224
|
+
const choices = (subject) => {
|
|
225
|
+
charge(4 + subject.target.length);
|
|
226
|
+
let cache = alternatives.get(subject.parent);
|
|
227
|
+
const prior = cache?.get(subject.target);
|
|
228
|
+
if (prior)
|
|
229
|
+
return prior;
|
|
230
|
+
charge(4);
|
|
231
|
+
const result = [];
|
|
232
|
+
const add = (hypothesis) => {
|
|
233
|
+
const qualified = qualify(hypothesis);
|
|
234
|
+
if ('kind' in qualified) {
|
|
235
|
+
if (qualified.kind === 'resource-limit')
|
|
236
|
+
return qualified;
|
|
237
|
+
record(subject.parent, subject.target, qualified);
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
charge(2);
|
|
241
|
+
result.push(qualified);
|
|
242
|
+
}
|
|
243
|
+
return undefined;
|
|
244
|
+
};
|
|
245
|
+
if (seed && subject.parent === actual && subject.target === target) {
|
|
246
|
+
const failure = add(seed);
|
|
247
|
+
if (failure)
|
|
248
|
+
return failure;
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
const inherited = prepareInheritedMiddleAssignments(actual, subject.parent, subject.target);
|
|
252
|
+
if (inherited.kind === 'resource-limit')
|
|
253
|
+
return inherited;
|
|
254
|
+
if (inherited.kind === 'prepared-inherited-assignments') {
|
|
255
|
+
for (const assignment of inherited.assignments) {
|
|
256
|
+
charge(2);
|
|
257
|
+
const replay = replaySharedAssignment(assignment);
|
|
258
|
+
if (replay.kind === 'resource-limit')
|
|
259
|
+
return replay;
|
|
260
|
+
if (replay.kind === 'prepared-local-evidence') {
|
|
261
|
+
const failure = add(replay.evidence);
|
|
262
|
+
if (failure)
|
|
263
|
+
return failure;
|
|
264
|
+
}
|
|
265
|
+
else
|
|
266
|
+
record(subject.parent, subject.target, replay);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
else
|
|
270
|
+
record(subject.parent, subject.target, inherited);
|
|
271
|
+
for (const producer of extraProducers) {
|
|
272
|
+
charge(2);
|
|
273
|
+
const anchored = producer(actual, subject.parent, subject.target);
|
|
274
|
+
if (anchored.kind === 'resource-limit')
|
|
275
|
+
return anchored;
|
|
276
|
+
if (anchored.kind === 'prepared-additional-assignments') {
|
|
277
|
+
for (const outcome of anchored.outcomes) {
|
|
278
|
+
charge(2);
|
|
279
|
+
if (outcome.result !== 'prepared-local-evidence') {
|
|
280
|
+
if (outcome.result.kind === 'resource-limit')
|
|
281
|
+
return outcome.result;
|
|
282
|
+
record(subject.parent, subject.target, outcome.result);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
for (const assignment of anchored.assignments) {
|
|
286
|
+
charge(2);
|
|
287
|
+
const failure = add(assignment.evidence);
|
|
288
|
+
if (failure)
|
|
289
|
+
return failure;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
else
|
|
293
|
+
record(subject.parent, subject.target, anchored);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
// @why A locally refused retained/list middle does not rule out a fresh source-derived middle.
|
|
297
|
+
if (!result.length && !(seed && subject.parent === actual && subject.target === target)) {
|
|
298
|
+
const fresh = prepareFreshMiddleAssignments(actual, subject.parent, subject.target);
|
|
299
|
+
if (fresh.kind === 'resource-limit')
|
|
300
|
+
return fresh;
|
|
301
|
+
if (fresh.kind === 'prepared-fresh-assignments') {
|
|
302
|
+
for (const assignment of fresh.assignments) {
|
|
303
|
+
charge(2);
|
|
304
|
+
const replay = replaySharedAssignment(assignment);
|
|
305
|
+
if (replay.kind === 'resource-limit')
|
|
306
|
+
return replay;
|
|
307
|
+
if (replay.kind === 'prepared-local-evidence') {
|
|
308
|
+
const failure = add(replay.evidence);
|
|
309
|
+
if (failure)
|
|
310
|
+
return failure;
|
|
311
|
+
}
|
|
312
|
+
else
|
|
313
|
+
record(subject.parent, subject.target, replay);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
else
|
|
317
|
+
record(subject.parent, subject.target, fresh);
|
|
318
|
+
}
|
|
319
|
+
if (!result.length)
|
|
320
|
+
record(subject.parent, subject.target, Object.freeze({ kind: 'unresolved',
|
|
321
|
+
rule: 'builder-qualified-family-empty', message: 'No complete candidate was obtained in the delivered qualified families',
|
|
322
|
+
contextId: subject.parent.contextId, component: subject.target }));
|
|
323
|
+
charge(4 + result.length);
|
|
324
|
+
const frozen = Object.freeze(result);
|
|
325
|
+
if (!cache) {
|
|
326
|
+
charge(3);
|
|
327
|
+
cache = new Map();
|
|
328
|
+
alternatives.set(subject.parent, cache);
|
|
329
|
+
}
|
|
330
|
+
cache.set(subject.target, frozen);
|
|
331
|
+
return frozen;
|
|
332
|
+
};
|
|
333
|
+
charge(6 + session.actual.requirements.length);
|
|
334
|
+
const pending = [];
|
|
335
|
+
for (const requirement of session.actual.requirements) {
|
|
336
|
+
charge(3);
|
|
337
|
+
if (!requirement.primitive)
|
|
338
|
+
pending.push({ parent: actual, target: requirement.target });
|
|
339
|
+
}
|
|
340
|
+
charge(3);
|
|
341
|
+
const stack = [{ pending, nodes: [], ranks: [] }];
|
|
342
|
+
let ordinal = 0;
|
|
343
|
+
while (stack.length) {
|
|
344
|
+
charge(4);
|
|
345
|
+
const state = stack.pop();
|
|
346
|
+
if (!state.pending.length) {
|
|
347
|
+
let root;
|
|
348
|
+
for (const node of state.nodes) {
|
|
349
|
+
charge(2);
|
|
350
|
+
if (node.parent === actual && node.target === target)
|
|
351
|
+
root = node.id;
|
|
352
|
+
}
|
|
353
|
+
charge(8 + state.nodes.length);
|
|
354
|
+
const evidence = rootRequirement.primitive
|
|
355
|
+
? Object.freeze({ root: Object.freeze({ kind: 'primitive-no-change' }), nodes: Object.freeze(state.nodes) })
|
|
356
|
+
: Object.freeze({ root: root, nodes: Object.freeze(state.nodes) });
|
|
357
|
+
const verified = verifyFiniteRe01EvidenceWithFrontier(actual, target, evidence, session);
|
|
358
|
+
if (verified.kind === 'resource-limit')
|
|
359
|
+
return verified;
|
|
360
|
+
if (verified.kind !== 'checked-candidate' && verified.kind !== 'checked-primitive') {
|
|
361
|
+
record(actual, target, verified);
|
|
362
|
+
continue;
|
|
363
|
+
}
|
|
364
|
+
charge(24 + outcomes.length + state.ranks.length);
|
|
365
|
+
return Object.freeze({ kind: 'checked-witness', mode, evidence, receipt: verified,
|
|
366
|
+
outcomes: Object.freeze(outcomes), ranks: Object.freeze(state.ranks),
|
|
367
|
+
claims: Object.freeze({ universalCoverage: false, completeNegativeAnswer: false, otherCandidatesExhausted: false }) });
|
|
368
|
+
}
|
|
369
|
+
charge(2);
|
|
370
|
+
const subject = state.pending.pop();
|
|
371
|
+
let existing;
|
|
372
|
+
for (const node of state.nodes) {
|
|
373
|
+
charge(3);
|
|
374
|
+
if (node.parent === subject.parent && node.target === subject.target)
|
|
375
|
+
existing = node;
|
|
376
|
+
}
|
|
377
|
+
// The subject's context ancestry strictly increases down proof edges,
|
|
378
|
+
// while rank decreases; sharing is allowed only at the exact same pair.
|
|
379
|
+
if (existing) {
|
|
380
|
+
charge(4 + state.nodes.length);
|
|
381
|
+
state.nodes = state.nodes.map(node => {
|
|
382
|
+
if (node.id !== subject.owner)
|
|
383
|
+
return node;
|
|
384
|
+
charge(8 + node.premises.length);
|
|
385
|
+
return Object.freeze({ ...node, premises: Object.freeze([...node.premises, existing.id]) });
|
|
386
|
+
});
|
|
387
|
+
stack.push(state);
|
|
388
|
+
continue;
|
|
389
|
+
}
|
|
390
|
+
const generated = choices(subject);
|
|
391
|
+
if ('kind' in generated)
|
|
392
|
+
return generated;
|
|
393
|
+
for (let index = generated.length - 1; index >= 0; index--) {
|
|
394
|
+
charge(6);
|
|
395
|
+
const alternative = generated[index];
|
|
396
|
+
charge(8 + state.nodes.length + state.pending.length + state.ranks.length + alternative.frontier.requirements.length);
|
|
397
|
+
b.reserveNodes(1);
|
|
398
|
+
const digits = ordinal === 0 ? 1 : Math.floor(Math.log10(ordinal)) + 1;
|
|
399
|
+
charge(20 + digits);
|
|
400
|
+
const id = 'automatic-evidence-' + String(ordinal++);
|
|
401
|
+
const node = Object.freeze({ ...alternative.hypothesis, id, premises: Object.freeze([]) });
|
|
402
|
+
const nodes = state.nodes.map(at => {
|
|
403
|
+
if (at.id !== subject.owner)
|
|
404
|
+
return at;
|
|
405
|
+
charge(8 + at.premises.length);
|
|
406
|
+
return Object.freeze({ ...at, premises: Object.freeze([...at.premises, id]) });
|
|
407
|
+
});
|
|
408
|
+
nodes.push(node);
|
|
409
|
+
const next = [...state.pending];
|
|
410
|
+
for (const requirement of alternative.frontier.requirements) {
|
|
411
|
+
charge(3);
|
|
412
|
+
if (!requirement.primitive)
|
|
413
|
+
next.push({ parent: node.context, target: requirement.target, owner: id });
|
|
414
|
+
}
|
|
415
|
+
stack.push({ pending: next, nodes, ranks: [...state.ranks, alternative.rank] });
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
charge(10 + outcomes.length);
|
|
419
|
+
return Object.freeze({ kind: 'no-witness-found', mode, outcomes: Object.freeze(outcomes),
|
|
420
|
+
universalCoverage: false, completeNegativeAnswer: false });
|
|
421
|
+
});
|
|
422
|
+
}
|