@tiinex/core 0.1.1
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/LICENSE +201 -0
- package/NOTICE +31 -0
- package/README.md +45 -0
- package/package.json +176 -0
- package/src/actions/record.actions.js +312 -0
- package/src/adapters/adapter.contracts.js +143 -0
- package/src/adapters/archive/archive.adapter.js +502 -0
- package/src/adapters/archive/archive.portableChangeset.js +141 -0
- package/src/adapters/archive/archive.transport.js +124 -0
- package/src/artifacts/artifact.localDraft.js +27 -0
- package/src/artifacts/artifact.normalize.js +28 -0
- package/src/artifacts/artifact.parse.js +207 -0
- package/src/artifacts/artifact.record.js +83 -0
- package/src/audit/audit.run.js +103 -0
- package/src/audit/audit.summary.js +7 -0
- package/src/diagnostics/sourceBoundary.report.js +112 -0
- package/src/export/package.apply.js +349 -0
- package/src/export/package.builder.js +366 -0
- package/src/export/package.bytes.js +164 -0
- package/src/export/package.controlIntegrity.js +42 -0
- package/src/export/package.controlTopology.js +97 -0
- package/src/export/package.fileMap.js +174 -0
- package/src/export/package.manifest.js +401 -0
- package/src/export/package.preflight.js +204 -0
- package/src/export/package.sourceReference.js +81 -0
- package/src/export/package.workspaceContext.js +144 -0
- package/src/export/package.zip.js +128 -0
- package/src/export/tree.bundle.js +278 -0
- package/src/governance/governance.boundary.js +196 -0
- package/src/integrity/integrity.c14nV2.js +190 -0
- package/src/integrity/integrity.methodReference.js +73 -0
- package/src/integrity/integrity.validate.js +56 -0
- package/src/lineage/lineage.candidateResolution.js +46 -0
- package/src/lineage/lineage.githubIssueComment.js +106 -0
- package/src/lineage/lineage.githubIssueLocal.js +196 -0
- package/src/lineage/lineage.githubIssueTarget.js +89 -0
- package/src/lineage/lineage.integrity.js +133 -0
- package/src/lineage/lineage.materialPreference.js +26 -0
- package/src/lineage/lineage.model.js +63 -0
- package/src/lineage/lineage.parentAuthority.js +5 -0
- package/src/lineage/lineage.parentBinding.js +104 -0
- package/src/lineage/lineage.pathBasis.js +47 -0
- package/src/lineage/lineage.resolve.js +388 -0
- package/src/lineage/lineage.sourceScope.js +74 -0
- package/src/lineage/lineage.targetKeys.js +80 -0
- package/src/lineage/lineage.traverse.js +132 -0
- package/src/public/applicationProjection.js +236 -0
- package/src/public/companionResources.js +246 -0
- package/src/public/index.js +16 -0
- package/src/public/node.js +2 -0
- package/src/public/schemaAncestry.js +26 -0
- package/src/publication/publication.contract.js +196 -0
- package/src/publication/publication.preflight.js +159 -0
- package/src/publication/publication.targetContract.js +241 -0
- package/src/reingest/reingest.plan.js +162 -0
- package/src/release/plan.mjs +28 -0
- package/src/release/policy.mjs +100 -0
- package/src/release/run.mjs +74 -0
- package/src/schemas/capability.registry.js +226 -0
- package/src/schemas/companion.js +245 -0
- package/src/schemas/contracts.js +6 -0
- package/src/schemas/coordination/handoff/tiinex.handoff.v1.schema.js +14 -0
- package/src/schemas/coordination/handoff/tiinex.handoff.v1.schema.json +23 -0
- package/src/schemas/coordination/handoff/tiinex.handoff.v1.schema.runtime.json +4283 -0
- package/src/schemas/coordination/handoff/tiinex.handoff.v1.schema.source.js +9 -0
- package/src/schemas/coordination/project/tiinex.project.v1.schema.js +26 -0
- package/src/schemas/coordination/project/tiinex.project.v1.schema.json +23 -0
- package/src/schemas/coordination/project/tiinex.project.v1.schema.runtime.json +1985 -0
- package/src/schemas/coordination/project/tiinex.project.v1.schema.source.js +9 -0
- package/src/schemas/core/decision/tiinex.decision.v1.schema.js +14 -0
- package/src/schemas/core/decision/tiinex.decision.v1.schema.json +24 -0
- package/src/schemas/core/decision/tiinex.decision.v1.schema.runtime.json +1700 -0
- package/src/schemas/core/decision/tiinex.decision.v1.schema.source.js +9 -0
- package/src/schemas/core/evidence/tiinex.evidence.v1.capabilities.js +14 -0
- package/src/schemas/core/evidence/tiinex.evidence.v1.en.i18n.json +6 -0
- package/src/schemas/core/evidence/tiinex.evidence.v1.findings.js +9 -0
- package/src/schemas/core/evidence/tiinex.evidence.v1.presenter.js +1 -0
- package/src/schemas/core/evidence/tiinex.evidence.v1.schema.js +32 -0
- package/src/schemas/core/evidence/tiinex.evidence.v1.schema.json +24 -0
- package/src/schemas/core/evidence/tiinex.evidence.v1.schema.runtime.json +2184 -0
- package/src/schemas/core/evidence/tiinex.evidence.v1.schema.source.js +9 -0
- package/src/schemas/core/evidence/tiinex.evidence.v1.sv.i18n.json +6 -0
- package/src/schemas/core/evidence/tiinex.evidence.v1.transitions.js +1 -0
- package/src/schemas/core/evidence/tiinex.evidence.v1.validate.js +10 -0
- package/src/schemas/core/feedback/tiinex.feedback.v1.schema.js +14 -0
- package/src/schemas/core/feedback/tiinex.feedback.v1.schema.json +23 -0
- package/src/schemas/core/feedback/tiinex.feedback.v1.schema.runtime.json +1773 -0
- package/src/schemas/core/feedback/tiinex.feedback.v1.schema.source.js +9 -0
- package/src/schemas/core/interpretation/tiinex.interpretation.v1.capabilities.js +11 -0
- package/src/schemas/core/interpretation/tiinex.interpretation.v1.contract.js +40 -0
- package/src/schemas/core/interpretation/tiinex.interpretation.v1.en.i18n.json +9 -0
- package/src/schemas/core/interpretation/tiinex.interpretation.v1.findings.js +12 -0
- package/src/schemas/core/interpretation/tiinex.interpretation.v1.localMaterialization.js +89 -0
- package/src/schemas/core/interpretation/tiinex.interpretation.v1.presenter.js +8 -0
- package/src/schemas/core/interpretation/tiinex.interpretation.v1.schema.js +34 -0
- package/src/schemas/core/interpretation/tiinex.interpretation.v1.schema.json +23 -0
- package/src/schemas/core/interpretation/tiinex.interpretation.v1.schema.runtime.json +2029 -0
- package/src/schemas/core/interpretation/tiinex.interpretation.v1.schema.source.js +9 -0
- package/src/schemas/core/interpretation/tiinex.interpretation.v1.sv.i18n.json +9 -0
- package/src/schemas/core/interpretation/tiinex.interpretation.v1.transitions.js +1 -0
- package/src/schemas/core/interpretation/tiinex.interpretation.v1.validate.js +25 -0
- package/src/schemas/core/preservation/tiinex.preservation.v1.capabilities.js +14 -0
- package/src/schemas/core/preservation/tiinex.preservation.v1.en.i18n.json +6 -0
- package/src/schemas/core/preservation/tiinex.preservation.v1.findings.js +9 -0
- package/src/schemas/core/preservation/tiinex.preservation.v1.presenter.js +1 -0
- package/src/schemas/core/preservation/tiinex.preservation.v1.schema.js +31 -0
- package/src/schemas/core/preservation/tiinex.preservation.v1.schema.json +23 -0
- package/src/schemas/core/preservation/tiinex.preservation.v1.schema.runtime.json +2033 -0
- package/src/schemas/core/preservation/tiinex.preservation.v1.schema.source.js +9 -0
- package/src/schemas/core/preservation/tiinex.preservation.v1.sv.i18n.json +6 -0
- package/src/schemas/core/preservation/tiinex.preservation.v1.transitions.js +1 -0
- package/src/schemas/core/preservation/tiinex.preservation.v1.validate.js +10 -0
- package/src/schemas/core/relation/tiinex.relation.v1.capabilities.js +7 -0
- package/src/schemas/core/relation/tiinex.relation.v1.contract.js +3 -0
- package/src/schemas/core/relation/tiinex.relation.v1.en.i18n.json +4 -0
- package/src/schemas/core/relation/tiinex.relation.v1.findings.js +9 -0
- package/src/schemas/core/relation/tiinex.relation.v1.localMaterialization.js +153 -0
- package/src/schemas/core/relation/tiinex.relation.v1.presenter.js +3 -0
- package/src/schemas/core/relation/tiinex.relation.v1.schema.js +20 -0
- package/src/schemas/core/relation/tiinex.relation.v1.schema.json +23 -0
- package/src/schemas/core/relation/tiinex.relation.v1.schema.runtime.json +1668 -0
- package/src/schemas/core/relation/tiinex.relation.v1.schema.source.js +9 -0
- package/src/schemas/core/relation/tiinex.relation.v1.sv.i18n.json +4 -0
- package/src/schemas/core/relation/tiinex.relation.v1.transitions.js +1 -0
- package/src/schemas/core/relation/tiinex.relation.v1.validate.js +36 -0
- package/src/schemas/core/relation/workspace/representation/tiinex.workspace.representation.v1.capabilities.js +14 -0
- package/src/schemas/core/relation/workspace/representation/tiinex.workspace.representation.v1.contract.js +57 -0
- package/src/schemas/core/relation/workspace/representation/tiinex.workspace.representation.v1.en.i18n.json +4 -0
- package/src/schemas/core/relation/workspace/representation/tiinex.workspace.representation.v1.findings.js +13 -0
- package/src/schemas/core/relation/workspace/representation/tiinex.workspace.representation.v1.presenter.js +3 -0
- package/src/schemas/core/relation/workspace/representation/tiinex.workspace.representation.v1.schema.js +20 -0
- package/src/schemas/core/relation/workspace/representation/tiinex.workspace.representation.v1.schema.json +24 -0
- package/src/schemas/core/relation/workspace/representation/tiinex.workspace.representation.v1.schema.runtime.json +3315 -0
- package/src/schemas/core/relation/workspace/representation/tiinex.workspace.representation.v1.schema.source.js +9 -0
- package/src/schemas/core/relation/workspace/representation/tiinex.workspace.representation.v1.sv.i18n.json +4 -0
- package/src/schemas/core/relation/workspace/representation/tiinex.workspace.representation.v1.transitions.js +1 -0
- package/src/schemas/core/relation/workspace/representation/tiinex.workspace.representation.v1.validate.js +78 -0
- package/src/schemas/core/signal/tiinex.signal.v1.schema.js +14 -0
- package/src/schemas/core/signal/tiinex.signal.v1.schema.json +23 -0
- package/src/schemas/core/signal/tiinex.signal.v1.schema.runtime.json +1733 -0
- package/src/schemas/core/signal/tiinex.signal.v1.schema.source.js +9 -0
- package/src/schemas/core/task/tiinex.task.v1.capabilities.js +11 -0
- package/src/schemas/core/task/tiinex.task.v1.contract.js +3 -0
- package/src/schemas/core/task/tiinex.task.v1.en.i18n.json +15 -0
- package/src/schemas/core/task/tiinex.task.v1.findings.js +18 -0
- package/src/schemas/core/task/tiinex.task.v1.localMaterialization.js +148 -0
- package/src/schemas/core/task/tiinex.task.v1.presenter.js +8 -0
- package/src/schemas/core/task/tiinex.task.v1.schema.js +35 -0
- package/src/schemas/core/task/tiinex.task.v1.schema.json +23 -0
- package/src/schemas/core/task/tiinex.task.v1.schema.runtime.json +1708 -0
- package/src/schemas/core/task/tiinex.task.v1.schema.source.js +9 -0
- package/src/schemas/core/task/tiinex.task.v1.sv.i18n.json +15 -0
- package/src/schemas/core/task/tiinex.task.v1.transitions.js +3 -0
- package/src/schemas/core/task/tiinex.task.v1.validate.js +41 -0
- package/src/schemas/core/topic/tiinex.topic.v1.capabilities.js +14 -0
- package/src/schemas/core/topic/tiinex.topic.v1.creation.js +46 -0
- package/src/schemas/core/topic/tiinex.topic.v1.en.i18n.json +8 -0
- package/src/schemas/core/topic/tiinex.topic.v1.findings.js +11 -0
- package/src/schemas/core/topic/tiinex.topic.v1.localMaterialization.js +135 -0
- package/src/schemas/core/topic/tiinex.topic.v1.presenter.js +1 -0
- package/src/schemas/core/topic/tiinex.topic.v1.schema.js +34 -0
- package/src/schemas/core/topic/tiinex.topic.v1.schema.json +23 -0
- package/src/schemas/core/topic/tiinex.topic.v1.schema.runtime.json +1699 -0
- package/src/schemas/core/topic/tiinex.topic.v1.schema.source.js +9 -0
- package/src/schemas/core/topic/tiinex.topic.v1.sv.i18n.json +8 -0
- package/src/schemas/core/topic/tiinex.topic.v1.transitions.js +31 -0
- package/src/schemas/core/topic/tiinex.topic.v1.validate.js +11 -0
- package/src/schemas/creation.capability.js +289 -0
- package/src/schemas/creation.contracts.js +334 -0
- package/src/schemas/creation.executionSnapshot.js +79 -0
- package/src/schemas/creation.factoryQualification.js +73 -0
- package/src/schemas/creation.renderer.js +244 -0
- package/src/schemas/creation.representation.js +279 -0
- package/src/schemas/creation.rootMetadata.js +6 -0
- package/src/schemas/creation.schemaReferences.js +65 -0
- package/src/schemas/discovery/finding/tiinex.discovery.finding.v1.schema.js +14 -0
- package/src/schemas/discovery/finding/tiinex.discovery.finding.v1.schema.json +23 -0
- package/src/schemas/discovery/finding/tiinex.discovery.finding.v1.schema.runtime.json +1873 -0
- package/src/schemas/discovery/finding/tiinex.discovery.finding.v1.schema.source.js +9 -0
- package/src/schemas/discovery/tiinex.discovery.v1.schema.js +14 -0
- package/src/schemas/discovery/tiinex.discovery.v1.schema.json +23 -0
- package/src/schemas/discovery/tiinex.discovery.v1.schema.runtime.json +1839 -0
- package/src/schemas/discovery/tiinex.discovery.v1.schema.source.js +9 -0
- package/src/schemas/generic.artifact.module.js +25 -0
- package/src/schemas/party/organization/tiinex.party.organization.v1.schema.js +26 -0
- package/src/schemas/party/organization/tiinex.party.organization.v1.schema.json +23 -0
- package/src/schemas/party/organization/tiinex.party.organization.v1.schema.runtime.json +2249 -0
- package/src/schemas/party/organization/tiinex.party.organization.v1.schema.source.js +9 -0
- package/src/schemas/party/role/tiinex.party.role.v1.schema.js +26 -0
- package/src/schemas/party/role/tiinex.party.role.v1.schema.json +24 -0
- package/src/schemas/party/role/tiinex.party.role.v1.schema.runtime.json +2091 -0
- package/src/schemas/party/role/tiinex.party.role.v1.schema.source.js +9 -0
- package/src/schemas/presentation/surface/tiinex.presentation.surface.v1.capabilities.js +14 -0
- package/src/schemas/presentation/surface/tiinex.presentation.surface.v1.en.i18n.json +4 -0
- package/src/schemas/presentation/surface/tiinex.presentation.surface.v1.findings.js +1 -0
- package/src/schemas/presentation/surface/tiinex.presentation.surface.v1.presenter.js +1 -0
- package/src/schemas/presentation/surface/tiinex.presentation.surface.v1.schema.js +29 -0
- package/src/schemas/presentation/surface/tiinex.presentation.surface.v1.schema.json +21 -0
- package/src/schemas/presentation/surface/tiinex.presentation.surface.v1.schema.runtime.json +2180 -0
- package/src/schemas/presentation/surface/tiinex.presentation.surface.v1.schema.source.js +9 -0
- package/src/schemas/presentation/surface/tiinex.presentation.surface.v1.sv.i18n.json +4 -0
- package/src/schemas/presentation/surface/tiinex.presentation.surface.v1.transitions.js +1 -0
- package/src/schemas/presentation/surface/tiinex.presentation.surface.v1.validate.js +1 -0
- package/src/schemas/reduction/tiinex.reduction.v1.schema.js +26 -0
- package/src/schemas/reduction/tiinex.reduction.v1.schema.json +23 -0
- package/src/schemas/reduction/tiinex.reduction.v1.schema.runtime.json +1733 -0
- package/src/schemas/reduction/tiinex.reduction.v1.schema.source.js +9 -0
- package/src/schemas/reference.shapes.js +33 -0
- package/src/schemas/registry.js +36 -0
- package/src/schemas/resolver.js +13 -0
- package/src/schemas/schema/module/tiinex.schema.module.v1.capabilities.js +14 -0
- package/src/schemas/schema/module/tiinex.schema.module.v1.en.i18n.json +4 -0
- package/src/schemas/schema/module/tiinex.schema.module.v1.findings.js +1 -0
- package/src/schemas/schema/module/tiinex.schema.module.v1.presenter.js +1 -0
- package/src/schemas/schema/module/tiinex.schema.module.v1.schema.js +29 -0
- package/src/schemas/schema/module/tiinex.schema.module.v1.schema.json +21 -0
- package/src/schemas/schema/module/tiinex.schema.module.v1.schema.runtime.json +2093 -0
- package/src/schemas/schema/module/tiinex.schema.module.v1.schema.source.js +9 -0
- package/src/schemas/schema/module/tiinex.schema.module.v1.sv.i18n.json +4 -0
- package/src/schemas/schema/module/tiinex.schema.module.v1.transitions.js +1 -0
- package/src/schemas/schema/module/tiinex.schema.module.v1.validate.js +1 -0
- package/src/schemas/schema.factory.descriptor.js +104 -0
- package/src/schemas/schema.githubSourceTarget.js +131 -0
- package/src/schemas/schema.identity.js +10 -0
- package/src/schemas/schema.reference.js +133 -0
- package/src/schemas/schema.source.js +239 -0
- package/src/schemas/tiinex.root.v1.capabilities.js +14 -0
- package/src/schemas/tiinex.root.v1.classify.js +55 -0
- package/src/schemas/tiinex.root.v1.en.i18n.json +24 -0
- package/src/schemas/tiinex.root.v1.fallback.js +84 -0
- package/src/schemas/tiinex.root.v1.findings.js +19 -0
- package/src/schemas/tiinex.root.v1.presenter.js +5 -0
- package/src/schemas/tiinex.root.v1.schema.js +29 -0
- package/src/schemas/tiinex.root.v1.schema.json +24 -0
- package/src/schemas/tiinex.root.v1.schema.runtime.json +1574 -0
- package/src/schemas/tiinex.root.v1.schema.source.js +9 -0
- package/src/schemas/tiinex.root.v1.sv.i18n.json +24 -0
- package/src/schemas/tiinex.root.v1.transitions.js +1 -0
- package/src/schemas/tiinex.root.v1.validate.js +36 -0
- package/src/schemas/validation/finding/tiinex.validation.finding.v1.schema.js +14 -0
- package/src/schemas/validation/finding/tiinex.validation.finding.v1.schema.json +23 -0
- package/src/schemas/validation/finding/tiinex.validation.finding.v1.schema.runtime.json +2027 -0
- package/src/schemas/validation/finding/tiinex.validation.finding.v1.schema.source.js +9 -0
- package/src/schemas/validation/method/tiinex.validation.method.v1.schema.js +14 -0
- package/src/schemas/validation/method/tiinex.validation.method.v1.schema.json +23 -0
- package/src/schemas/validation/method/tiinex.validation.method.v1.schema.runtime.json +1848 -0
- package/src/schemas/validation/method/tiinex.validation.method.v1.schema.source.js +9 -0
- package/src/schemas/validation/report/tiinex.validation.report.v1.schema.js +14 -0
- package/src/schemas/validation/report/tiinex.validation.report.v1.schema.json +23 -0
- package/src/schemas/validation/report/tiinex.validation.report.v1.schema.runtime.json +2015 -0
- package/src/schemas/validation/report/tiinex.validation.report.v1.schema.source.js +9 -0
- package/src/schemas/workspace/tiinex.workspace.v1.capabilities.js +12 -0
- package/src/schemas/workspace/tiinex.workspace.v1.en.i18n.json +7 -0
- package/src/schemas/workspace/tiinex.workspace.v1.findings.js +5 -0
- package/src/schemas/workspace/tiinex.workspace.v1.presenter.js +27 -0
- package/src/schemas/workspace/tiinex.workspace.v1.schema.js +30 -0
- package/src/schemas/workspace/tiinex.workspace.v1.schema.json +23 -0
- package/src/schemas/workspace/tiinex.workspace.v1.schema.runtime.json +1596 -0
- package/src/schemas/workspace/tiinex.workspace.v1.schema.source.js +9 -0
- package/src/schemas/workspace/tiinex.workspace.v1.sv.i18n.json +7 -0
- package/src/schemas/workspace/tiinex.workspace.v1.transitions.js +10 -0
- package/src/schemas/workspace/tiinex.workspace.v1.validate.js +10 -0
- package/src/sources/github/github.issueTarget.js +127 -0
- package/src/sources/origin.references.js +249 -0
- package/src/sources/source.explicitTargets.js +49 -0
- package/src/sources/transport.levels.js +107 -0
- package/src/tooling/portable/adapters/cli/cli.cold-start-input.js +34 -0
- package/src/tooling/portable/adapters/cli/cli.command-input.js +455 -0
- package/src/tooling/portable/adapters/cli/cli.common-author.js +249 -0
- package/src/tooling/portable/adapters/cli/cli.common-output.js +330 -0
- package/src/tooling/portable/adapters/cli/cli.editor-assistance.js +13 -0
- package/src/tooling/portable/adapters/cli/cli.ground-materialize.js +96 -0
- package/src/tooling/portable/adapters/cli/cli.ground-recovery.js +99 -0
- package/src/tooling/portable/adapters/cli/cli.handoff-manufacture.js +345 -0
- package/src/tooling/portable/adapters/cli/cli.handoff-sibling-allocation.js +31 -0
- package/src/tooling/portable/adapters/cli/cli.help.js +80 -0
- package/src/tooling/portable/adapters/cli/cli.land.js +13 -0
- package/src/tooling/portable/adapters/cli/cli.local-output.js +72 -0
- package/src/tooling/portable/adapters/cli/cli.material-policy.js +6 -0
- package/src/tooling/portable/adapters/cli/cli.operator-bridge.js +18 -0
- package/src/tooling/portable/adapters/cli/cli.reduction-input.js +14 -0
- package/src/tooling/portable/adapters/cli/cli.run.js +434 -0
- package/src/tooling/portable/adapters/llm/llm.entrypoint.js +34 -0
- package/src/tooling/portable/adapters/node/checkpoint.verify.js +267 -0
- package/src/tooling/portable/adapters/node/handoff.manufacture.bootstrap.js +109 -0
- package/src/tooling/portable/adapters/node/handoff.manufacture.enumeration.js +94 -0
- package/src/tooling/portable/adapters/node/handoff.manufacture.js +193 -0
- package/src/tooling/portable/adapters/node/handoff.manufacture.multiRoot.js +49 -0
- package/src/tooling/portable/adapters/node/handoff.manufacture.packageParent.js +130 -0
- package/src/tooling/portable/adapters/node/handoff.manufacture.requirements.js +353 -0
- package/src/tooling/portable/adapters/node/handoff.manufacture.scope.js +147 -0
- package/src/tooling/portable/adapters/node/workspaceCarrier.manufacture.js +62 -0
- package/src/tooling/portable/assets/asset.operations.js +170 -0
- package/src/tooling/portable/audit/audit.capability.js +119 -0
- package/src/tooling/portable/bootstrap/artifact.result.selfverify.mjs +109 -0
- package/src/tooling/portable/bootstrap/bootstrap.case.mjs +43 -0
- package/src/tooling/portable/bootstrap/tiinex.llm.bootstrap.md +814 -0
- package/src/tooling/portable/bootstrap/tiinex.llm.bootstrap.pointer.json +25 -0
- package/src/tooling/portable/checkpoint/portable.checkpoint.js +89 -0
- package/src/tooling/portable/conformance/checkpoint.qualification.js +271 -0
- package/src/tooling/portable/draft/draft.create.js +389 -0
- package/src/tooling/portable/draft/draft.crud.js +175 -0
- package/src/tooling/portable/draft/draft.exact.js +173 -0
- package/src/tooling/portable/draft/draft.operations.js +265 -0
- package/src/tooling/portable/draft/draft.qualification.js +45 -0
- package/src/tooling/portable/draft/draft.set.js +193 -0
- package/src/tooling/portable/draft/draft.validation-context.js +7 -0
- package/src/tooling/portable/editor/authoring.parent.js +37 -0
- package/src/tooling/portable/editor/editor.assistance.js +221 -0
- package/src/tooling/portable/editor/staged.validation.js +96 -0
- package/src/tooling/portable/engine.facade.js +468 -0
- package/src/tooling/portable/findings.js +92 -0
- package/src/tooling/portable/grounding/grounding.capsule.js +128 -0
- package/src/tooling/portable/grounding/grounding.continuity.js +283 -0
- package/src/tooling/portable/grounding/grounding.participantAuthority.js +20 -0
- package/src/tooling/portable/grounding/grounding.planningContext.js +34 -0
- package/src/tooling/portable/grounding/grounding.readiness.authority.js +17 -0
- package/src/tooling/portable/grounding/grounding.readiness.js +316 -0
- package/src/tooling/portable/grounding/grounding.readiness.support.js +245 -0
- package/src/tooling/portable/grounding/grounding.sourceEvidence.js +71 -0
- package/src/tooling/portable/grounding/grounding.workContext.js +72 -0
- package/src/tooling/portable/grounding/grounding.workProvenance.js +153 -0
- package/src/tooling/portable/handoff/carrierLineage.js +214 -0
- package/src/tooling/portable/handoff/carrierProfile.js +54 -0
- package/src/tooling/portable/handoff/carrierProjection.js +193 -0
- package/src/tooling/portable/handoff/carrierProjection.routeQualification.js +228 -0
- package/src/tooling/portable/handoff/carrierProjection.shared.js +7 -0
- package/src/tooling/portable/handoff/carrierProjection.workspaces.js +54 -0
- package/src/tooling/portable/handoff/coldConsumerEntrypoint.js +185 -0
- package/src/tooling/portable/handoff/coldStartQualification.contract.js +184 -0
- package/src/tooling/portable/handoff/coldStartQualification.grounding.js +392 -0
- package/src/tooling/portable/handoff/coldStartQualification.js +22 -0
- package/src/tooling/portable/handoff/coldStartQualification.materials.js +364 -0
- package/src/tooling/portable/handoff/coldStartQualification.observation.js +220 -0
- package/src/tooling/portable/handoff/coldStartQualification.run.js +81 -0
- package/src/tooling/portable/handoff/coldStartQualification.shared.js +57 -0
- package/src/tooling/portable/handoff/coldStartRolePointers.js +39 -0
- package/src/tooling/portable/handoff/contextAudit.js +247 -0
- package/src/tooling/portable/handoff/contracts/tiinex.handoff.package.v1.schema.md +409 -0
- package/src/tooling/portable/handoff/handoffAuthoringPlan.js +35 -0
- package/src/tooling/portable/handoff/handoffEndpointProjection.js +61 -0
- package/src/tooling/portable/handoff/handoffLeafProjection.js +91 -0
- package/src/tooling/portable/handoff/humanOutputPresentation.js +21 -0
- package/src/tooling/portable/handoff/manufacture.js +84 -0
- package/src/tooling/portable/handoff/materialClosure.archiveV2.binding.js +72 -0
- package/src/tooling/portable/handoff/materialClosure.archiveV2.direct.js +160 -0
- package/src/tooling/portable/handoff/materialClosure.archiveV2.indexes.js +36 -0
- package/src/tooling/portable/handoff/materialClosure.archiveV2.js +247 -0
- package/src/tooling/portable/handoff/materialClosure.archiveV2.projectionProvider.js +44 -0
- package/src/tooling/portable/handoff/materialClosure.archiveV2.workspace.js +226 -0
- package/src/tooling/portable/handoff/materialClosure.descriptor.js +169 -0
- package/src/tooling/portable/handoff/materialClosure.inputBinding.js +372 -0
- package/src/tooling/portable/handoff/materialClosure.inputBinding.support.js +62 -0
- package/src/tooling/portable/handoff/materialClosure.materialized.js +143 -0
- package/src/tooling/portable/handoff/materialClosure.materials.js +116 -0
- package/src/tooling/portable/handoff/materialClosure.package.js +181 -0
- package/src/tooling/portable/handoff/materialClosure.plan.js +204 -0
- package/src/tooling/portable/handoff/materialClosure.readiness.js +36 -0
- package/src/tooling/portable/handoff/materialClosure.requirements.js +137 -0
- package/src/tooling/portable/handoff/operatorContextProjection.js +105 -0
- package/src/tooling/portable/handoff/pointerEntrypoint.js +138 -0
- package/src/tooling/portable/handoff/qualifiedHandoffFixture.js +34 -0
- package/src/tooling/portable/handoff/recipientV2.artifactFirst.build.js +321 -0
- package/src/tooling/portable/handoff/recipientV2.artifactFirst.closure.js +126 -0
- package/src/tooling/portable/handoff/recipientV2.artifactFirst.inspect.js +194 -0
- package/src/tooling/portable/handoff/recipientV2.artifactFirst.materials.js +207 -0
- package/src/tooling/portable/handoff/recipientV2.artifactFirst.projection.js +69 -0
- package/src/tooling/portable/handoff/recipientV2.artifactFirst.roles.js +166 -0
- package/src/tooling/portable/handoff/recipientV2.artifactFirst.routes.js +113 -0
- package/src/tooling/portable/handoff/recipientV2.artifactFirst.shared.js +87 -0
- package/src/tooling/portable/handoff/recipientV2.artifactFirst.workspaces.js +160 -0
- package/src/tooling/portable/handoff/recipientV2.artifactFirstPhase1.js +44 -0
- package/src/tooling/portable/handoff/recipientV2.artifactInspection.js +55 -0
- package/src/tooling/portable/handoff/recipientV2.artifacts.js +174 -0
- package/src/tooling/portable/handoff/recipientV2.coldProjection.js +24 -0
- package/src/tooling/portable/handoff/recipientV2.delivery.js +48 -0
- package/src/tooling/portable/handoff/recipientV2.endpointRolePointers.js +179 -0
- package/src/tooling/portable/handoff/recipientV2.entryContract.js +28 -0
- package/src/tooling/portable/handoff/recipientV2.humanOutput.js +78 -0
- package/src/tooling/portable/handoff/recipientV2.inspect.helpers.js +218 -0
- package/src/tooling/portable/handoff/recipientV2.inspect.js +194 -0
- package/src/tooling/portable/handoff/recipientV2.inspect.pathToken.js +9 -0
- package/src/tooling/portable/handoff/recipientV2.inspect.projection.js +58 -0
- package/src/tooling/portable/handoff/recipientV2.inspect.workspaces.js +177 -0
- package/src/tooling/portable/handoff/recipientV2.lineage.js +142 -0
- package/src/tooling/portable/handoff/recipientV2.packageV1.build.js +147 -0
- package/src/tooling/portable/handoff/recipientV2.packageV1.constants.js +4 -0
- package/src/tooling/portable/handoff/recipientV2.packageV1.contract.js +101 -0
- package/src/tooling/portable/handoff/recipientV2.packageV1.inspect.helpers.js +126 -0
- package/src/tooling/portable/handoff/recipientV2.packageV1.inspect.js +185 -0
- package/src/tooling/portable/handoff/recipientV2.packageV1.js +12 -0
- package/src/tooling/portable/handoff/recipientV2.packageV1.shared.js +24 -0
- package/src/tooling/portable/handoff/recipientV2.packageV1.workspaceProjection.js +22 -0
- package/src/tooling/portable/handoff/recipientV2.pointer.js +40 -0
- package/src/tooling/portable/handoff/recipientV2.routeSelection.js +16 -0
- package/src/tooling/portable/handoff/recipientV2.topology.helpers.js +20 -0
- package/src/tooling/portable/handoff/recipientV2.topology.js +320 -0
- package/src/tooling/portable/handoff/recipientV2.topology.materials.js +70 -0
- package/src/tooling/portable/handoff/recipientV2.topology.workspaces.js +193 -0
- package/src/tooling/portable/handoff/recipientV2.transportManifest.js +123 -0
- package/src/tooling/portable/handoff/recipientV2.workspaceRepresentation.js +163 -0
- package/src/tooling/portable/handoff/routeArtifactConformance.js +130 -0
- package/src/tooling/portable/handoff/toolingBootstrap.js +67 -0
- package/src/tooling/portable/handoff/transportCompanion.js +175 -0
- package/src/tooling/portable/handoff/workspaceByteProvider.archive.js +95 -0
- package/src/tooling/portable/handoff/workspaceByteProvider.js +271 -0
- package/src/tooling/portable/handoff/workspaceCarrier.manufacture.js +93 -0
- package/src/tooling/portable/handoff/workspaceLandingPlan.js +142 -0
- package/src/tooling/portable/handoff/workspacePackageSources.js +105 -0
- package/src/tooling/portable/handoff/workspaceQualifiedReference.js +10 -0
- package/src/tooling/portable/handoff/workspaceSourceIdentity.js +52 -0
- package/src/tooling/portable/handoff/workspaceTargetConformance.js +134 -0
- package/src/tooling/portable/host/host.capabilities.js +181 -0
- package/src/tooling/portable/host/tool.bindings.js +357 -0
- package/src/tooling/portable/host/tool.receiptNormalization.js +141 -0
- package/src/tooling/portable/index.js +52 -0
- package/src/tooling/portable/input/node.input.js +184 -0
- package/src/tooling/portable/input/portable.input.js +249 -0
- package/src/tooling/portable/lifecycle/lifecycle.action.js +11 -0
- package/src/tooling/portable/lifecycle/lifecycle.material.js +173 -0
- package/src/tooling/portable/lifecycle/lifecycle.operations.js +34 -0
- package/src/tooling/portable/lifecycle/lifecycle.readiness.js +247 -0
- package/src/tooling/portable/lineage/lineage.integrity.apply.audit.js +22 -0
- package/src/tooling/portable/lineage/lineage.integrity.apply.evidence.js +36 -0
- package/src/tooling/portable/lineage/lineage.integrity.apply.js +306 -0
- package/src/tooling/portable/lineage/lineage.integrity.apply.structure.js +178 -0
- package/src/tooling/portable/lineage/lineage.integrity.plan.js +377 -0
- package/src/tooling/portable/lineage/lineage.integrity.projection.human.js +82 -0
- package/src/tooling/portable/lineage/lineage.integrity.projection.js +349 -0
- package/src/tooling/portable/lineage/lineage.operations.js +32 -0
- package/src/tooling/portable/lineage/lineage.print.js +398 -0
- package/src/tooling/portable/lineage/lineage.print.render.js +88 -0
- package/src/tooling/portable/lineage/lineage.print.utils.js +58 -0
- package/src/tooling/portable/lineage/lineage.publicationProviderReceipts.js +141 -0
- package/src/tooling/portable/lineage/lineage.publicationQualification.js +183 -0
- package/src/tooling/portable/lineage/lineage.search.js +301 -0
- package/src/tooling/portable/live/live.artifact.js +192 -0
- package/src/tooling/portable/live/live.export.js +107 -0
- package/src/tooling/portable/live/live.lineage.closure.js +71 -0
- package/src/tooling/portable/live/live.lineage.js +338 -0
- package/src/tooling/portable/live/live.protocol.js +181 -0
- package/src/tooling/portable/materialization/durable.materialize.js +162 -0
- package/src/tooling/portable/materialization/epistemic.plan.js +239 -0
- package/src/tooling/portable/materialization/loaded.parent.js +54 -0
- package/src/tooling/portable/materialization/materialization.facade.js +30 -0
- package/src/tooling/portable/operation.catalog.js +393 -0
- package/src/tooling/portable/operation.catalog.package.js +183 -0
- package/src/tooling/portable/operation.result.js +25 -0
- package/src/tooling/portable/orchestration/task.prepare.js +191 -0
- package/src/tooling/portable/output/artifact.result.package.js +308 -0
- package/src/tooling/portable/output/deterministic.zip.js +88 -0
- package/src/tooling/portable/output/node.artifact-set.js +223 -0
- package/src/tooling/portable/output/node.draft.js +41 -0
- package/src/tooling/portable/output/node.zip.js +39 -0
- package/src/tooling/portable/output/recipientV2.zip.js +59 -0
- package/src/tooling/portable/overview/blockingCue.js +16 -0
- package/src/tooling/portable/overview/operatingOverview.js +413 -0
- package/src/tooling/portable/package/generation.binding.js +314 -0
- package/src/tooling/portable/package/generation.binding.projection.js +128 -0
- package/src/tooling/portable/package/material.graph.js +236 -0
- package/src/tooling/portable/package/runtime.package.js +321 -0
- package/src/tooling/portable/package/schema.transition.companion.js +196 -0
- package/src/tooling/portable/package/semantic.package.graph.js +272 -0
- package/src/tooling/portable/package/semantic.package.js +203 -0
- package/src/tooling/portable/package/semantic.package.schema-resolution.js +158 -0
- package/src/tooling/portable/package/semantic.package.transition-registry.js +189 -0
- package/src/tooling/portable/package/semantic.package.types.js +18 -0
- package/src/tooling/portable/providers/schema.bootstrap.provenance.js +10 -0
- package/src/tooling/portable/providers/schema.provider.qualification.js +52 -0
- package/src/tooling/portable/providers/schema.providers.js +458 -0
- package/src/tooling/portable/publication/runtime.publication.js +53 -0
- package/src/tooling/portable/qualification.js +150 -0
- package/src/tooling/portable/reduction/reduction.composition.js +229 -0
- package/src/tooling/portable/reduction/reduction.eligibility.helpers.js +258 -0
- package/src/tooling/portable/reduction/reduction.eligibility.js +191 -0
- package/src/tooling/portable/reduction/reduction.operations.js +30 -0
- package/src/tooling/portable/reduction/reduction.preflight.js +85 -0
- package/src/tooling/portable/reduction/reduction.shared.js +173 -0
- package/src/tooling/portable/schema/bootstrap/canonical.pack.js +24 -0
- package/src/tooling/portable/schema/bootstrap/docs-3988951208eb9a8926e84ab42625d4b42fa00c2d/party/role/tiinex.party.role.v1.schema.md +289 -0
- package/src/tooling/portable/schema/bootstrap/docs-3988951208eb9a8926e84ab42625d4b42fa00c2d/validation/report/tiinex.validation.report.v1.schema.md +300 -0
- package/src/tooling/portable/schema/bootstrap/qualified-local-root/tiinex.root.v1.runtime-projection.json +48 -0
- package/src/tooling/portable/schema/bootstrap/qualified-local-root/tiinex.root.v1.schema.md +865 -0
- package/src/tooling/portable/schema/contract.compile.js +406 -0
- package/src/tooling/portable/schema/contract.compile.utils.js +9 -0
- package/src/tooling/portable/schema/contract.constraints.js +117 -0
- package/src/tooling/portable/schema/contract.envelope.validate.js +177 -0
- package/src/tooling/portable/schema/contract.field-domain.compile.js +399 -0
- package/src/tooling/portable/schema/contract.field-domain.js +247 -0
- package/src/tooling/portable/schema/contract.field-shape.compile.js +34 -0
- package/src/tooling/portable/schema/contract.inheritance.inline.js +103 -0
- package/src/tooling/portable/schema/contract.inheritance.js +210 -0
- package/src/tooling/portable/schema/contract.inheritance.record.js +76 -0
- package/src/tooling/portable/schema/contract.machine-shape.js +309 -0
- package/src/tooling/portable/schema/contract.project.js +81 -0
- package/src/tooling/portable/schema/contract.semantic-resolution.js +82 -0
- package/src/tooling/portable/schema/contract.validate.js +0 -0
- package/src/tooling/portable/schema/lexical.shape.v1.js +338 -0
- package/src/tooling/portable/schema/llm.companion.js +108 -0
- package/src/tooling/portable/schema/named.declarations.js +162 -0
- package/src/tooling/portable/schema/ordinary.contract.js +193 -0
- package/src/tooling/portable/schema/ordinary.fields.js +205 -0
- package/src/tooling/portable/schema/qualifiedLocalRoot.projection.js +70 -0
- package/src/tooling/portable/schema/qualifiedLocalRoot.runtime.js +170 -0
- package/src/tooling/portable/schema/schema.contract.js +465 -0
- package/src/tooling/portable/schema/schema.guide.js +326 -0
- package/src/tooling/portable/schema/schema.snapshot.js +119 -0
- package/src/tooling/portable/session/portable.session.js +145 -0
- package/src/tooling/portable/transfer/transfer.plan.js +102 -0
- package/src/transitions/record.transitions.js +484 -0
- package/src/transitions/transition.validate.js +129 -0
- package/src/validation/findings.js +76 -0
- package/src/validation/validateArtifact.js +216 -0
- package/src/workspaces/workspace.entrypointCapability.js +44 -0
- package/src/workspaces/workspace.materialRole.js +242 -0
- package/src/workspaces/workspace.recordPaths.js +426 -0
- package/tools/tiinex-portable.mjs +6 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import binding from './tiinex.topic.v1.schema.json' with { type: 'json' };
|
|
2
|
+
import projection from './tiinex.topic.v1.schema.runtime.json' with { type: 'json' };
|
|
3
|
+
import { defineBundledSchemaSource } from '../../schema.source.js';
|
|
4
|
+
|
|
5
|
+
export const schemaSource = defineBundledSchemaSource(binding, projection, Object.freeze({
|
|
6
|
+
bundledPath: 'src/schemas/core/topic/tiinex.topic.v1.schema.md',
|
|
7
|
+
sourceLabel: 'Viewer schema registry',
|
|
8
|
+
assetUrl: new URL('./tiinex.topic.v1.schema.md', import.meta.url).href
|
|
9
|
+
}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"label": "Topic",
|
|
3
|
+
"summary": "Bounded topic-oriented lineage artifacts for live design and implementation threads.",
|
|
4
|
+
"topic.schema.mismatch": "Topic validator was invoked for a non-topic current schema.",
|
|
5
|
+
"topic.title.missing": "Topic artifact should begin with a human-readable title.",
|
|
6
|
+
"topic.body.thin": "Topic body is thin; reader may not understand the active topic thread.",
|
|
7
|
+
"topic.body.readable": "Topic body is readable at scaffold validation depth."
|
|
8
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const topicTransitions = Object.freeze([
|
|
2
|
+
Object.freeze({
|
|
3
|
+
id: 'topic.continue.task',
|
|
4
|
+
fromSchema: 'tiinex.topic.v1',
|
|
5
|
+
intent: 'continue',
|
|
6
|
+
resultSchema: 'tiinex.task.v1',
|
|
7
|
+
label: 'Create task',
|
|
8
|
+
shortLabel: 'Task',
|
|
9
|
+
priority: 100,
|
|
10
|
+
availability: Object.freeze({
|
|
11
|
+
sourceModes: Object.freeze(['local-*', 'source-backed']),
|
|
12
|
+
parentKinds: Object.freeze(['loaded-record']),
|
|
13
|
+
requiresEditableParent: false
|
|
14
|
+
}),
|
|
15
|
+
resultBoundary: Object.freeze({
|
|
16
|
+
mode: 'browser-local-draft',
|
|
17
|
+
sourceMutation: 'none',
|
|
18
|
+
remoteWrite: false,
|
|
19
|
+
mayInheritParentSource: false
|
|
20
|
+
}),
|
|
21
|
+
presentation: Object.freeze({
|
|
22
|
+
group: 'Continue',
|
|
23
|
+
placement: 'primary',
|
|
24
|
+
variant: 'icon-only',
|
|
25
|
+
icon: 'task',
|
|
26
|
+
tooltip: 'Continue · Create task',
|
|
27
|
+
ariaLabel: 'Continue: Create task',
|
|
28
|
+
mobileLabel: 'Create task'
|
|
29
|
+
})
|
|
30
|
+
})
|
|
31
|
+
]);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function topicValidate(artifact) {
|
|
2
|
+
const findings = [];
|
|
3
|
+
if (artifact.envelope.current.schema.id !== 'tiinex.topic.v1') {
|
|
4
|
+
findings.push({ severity: 'warning', code: 'topic.schema.mismatch', messageKey: 'topic.schema.mismatch', message: 'Topic validator invoked for non-topic current schema.', source: 'tiinex.topic.v1' });
|
|
5
|
+
return findings;
|
|
6
|
+
}
|
|
7
|
+
if (!artifact.body.title) findings.push({ severity: 'error', code: 'topic.title.missing', messageKey: 'topic.title.missing', message: 'Topic artifact should begin with a human-readable title.', source: 'tiinex.topic.v1', fixability: 'safe' });
|
|
8
|
+
if (!artifact.body.text || artifact.body.text.length < 40) findings.push({ severity: 'warning', code: 'topic.body.thin', messageKey: 'topic.body.thin', message: 'Topic body is thin; reader may not understand the active topic thread.', source: 'tiinex.topic.v1', fixability: 'manual' });
|
|
9
|
+
if (!findings.some((finding) => finding.severity === 'error')) findings.push({ severity: 'info', code: 'topic.body.readable', messageKey: 'topic.body.readable', message: 'Topic body is readable at scaffold validation depth.', source: 'tiinex.topic.v1' });
|
|
10
|
+
return findings;
|
|
11
|
+
}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { parseArtifactMarkdown } from '../artifacts/artifact.parse.js';
|
|
2
|
+
import { qualifiedCreationAuthorityFromSchemaSource } from './schema.source.js';
|
|
3
|
+
import { canonicalC14nV2SelfState } from '../integrity/integrity.c14nV2.js';
|
|
4
|
+
import { validatePortableContractInstance } from '../tooling/portable/schema/contract.validate.js';
|
|
5
|
+
import { qualifyRootCreationRepresentation } from './creation.representation.js';
|
|
6
|
+
import { canonicalRootCreatedAt } from './creation.rootMetadata.js';
|
|
7
|
+
import { snapshotOrdinaryCreationExecutionInput } from './creation.executionSnapshot.js';
|
|
8
|
+
import { qualifyCreationSchemaReferences, schemaReferenceAuthoritiesForCreation } from './creation.schemaReferences.js';
|
|
9
|
+
import { C14N_V2_METHOD_ID, integrityMethodReferenceAuthorityForCreation } from '../integrity/integrity.methodReference.js';
|
|
10
|
+
import { representativeCreationValue, qualifyStructuredCreationInputFidelity } from './creation.factoryQualification.js';
|
|
11
|
+
|
|
12
|
+
export const ARTIFACT_CREATION_AUTHORITY_SECTION = 'Artifact Creation Contract';
|
|
13
|
+
const executionQualificationCache = new WeakMap();
|
|
14
|
+
|
|
15
|
+
export function defineArtifactCreationCapability(binding = {}, implementation = null) {
|
|
16
|
+
void binding; // compatibility input only; binding is not semantic proof.
|
|
17
|
+
return Object.freeze({
|
|
18
|
+
implementation: implementation ? Object.freeze({
|
|
19
|
+
status: implementation.status || 'implemented',
|
|
20
|
+
renderer: Object.freeze({ ...(implementation.renderer || {}) }),
|
|
21
|
+
execute: typeof implementation.execute === 'function' ? implementation.execute : null,
|
|
22
|
+
qualifyRequiredShape: typeof implementation.qualifyRequiredShape === 'function' ? implementation.qualifyRequiredShape : null,
|
|
23
|
+
transitionTypes: Object.freeze([...(implementation.transitionTypes || [])].map((value) => String(value || '').trim()).filter(Boolean))
|
|
24
|
+
}) : null
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function qualifyArtifactCreationCapability(module = {}, transitionType = '') {
|
|
29
|
+
const capability = module?.artifactCreation || null;
|
|
30
|
+
const schemaId = String(module?.id || '').trim();
|
|
31
|
+
const authority = qualifiedCreationAuthorityFromSchemaSource(module);
|
|
32
|
+
const implementation = capability?.implementation || null;
|
|
33
|
+
const supportedTransitions = new Set(implementation?.transitionTypes || []);
|
|
34
|
+
const transition = String(transitionType || 'create-artifact').trim();
|
|
35
|
+
const callable = Boolean(
|
|
36
|
+
implementation?.status === 'implemented'
|
|
37
|
+
&& typeof implementation?.execute === 'function'
|
|
38
|
+
&& (supportedTransitions.has('*') || supportedTransitions.has(transition))
|
|
39
|
+
);
|
|
40
|
+
const execution = callable && authority.state === 'qualified'
|
|
41
|
+
? executionQualification(module, authority, implementation, transition)
|
|
42
|
+
: Object.freeze({ state: 'unavailable', qualificationScope: 'representative-preflight', reason: !callable ? 'execution-owner-unavailable' : 'semantic-authority-unavailable', findings: Object.freeze([]) });
|
|
43
|
+
const implementationReady = callable && (transition !== 'create-artifact' || execution.state === 'qualified');
|
|
44
|
+
return Object.freeze({
|
|
45
|
+
schemaId,
|
|
46
|
+
transitionType: transition,
|
|
47
|
+
authority,
|
|
48
|
+
implementation: Object.freeze({
|
|
49
|
+
state: implementationReady ? 'implemented' : 'unavailable',
|
|
50
|
+
status: implementation?.status || 'unavailable',
|
|
51
|
+
renderer: Object.freeze({ ...(implementation?.renderer || {}) }),
|
|
52
|
+
executableOwner: implementationReady ? (transition === 'create-artifact' ? 'representative-preflight-qualified-execution' : 'callable') : 'unavailable',
|
|
53
|
+
executionQualification: execution,
|
|
54
|
+
transitionTypes: Object.freeze([...(implementation?.transitionTypes || [])])
|
|
55
|
+
}),
|
|
56
|
+
ready: authority.state === 'qualified' && implementationReady
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function executeArtifactCreationCapability(module = {}, transitionType = 'create-artifact', contract = {}, input = {}) {
|
|
61
|
+
const qualification = qualifyArtifactCreationCapability(module, transitionType);
|
|
62
|
+
const implementation = module?.artifactCreation?.implementation || null;
|
|
63
|
+
if (!qualification.ready || typeof implementation?.execute !== 'function') return Object.freeze({ state: 'unavailable', reason: 'creation-capability-not-ready', markdown: '', qualification: executionQualificationSummary(qualification, null) });
|
|
64
|
+
try {
|
|
65
|
+
const rootCreation = String(transitionType || 'create-artifact') === 'create-artifact';
|
|
66
|
+
let snapshot = null;
|
|
67
|
+
if (rootCreation) {
|
|
68
|
+
try { snapshot = snapshotOrdinaryCreationExecutionInput(contract, input); }
|
|
69
|
+
catch (error) {
|
|
70
|
+
const message = String(error?.message || error || 'creation-execution-snapshot-failed');
|
|
71
|
+
const metadataFailure = Object.freeze({ state: 'failed', findings: Object.freeze([message]), createdAt: Object.freeze({ expected: '', observed: '' }) });
|
|
72
|
+
return Object.freeze({ state: 'unavailable', reason: message, markdown: '', error, qualification: executionQualificationSummary(qualification, { executionMetadataQualification: metadataFailure }) });
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
const executionInput = rootCreation ? snapshot.implementationInput : input;
|
|
76
|
+
const result = implementation.execute(contract, executionInput);
|
|
77
|
+
const markdown = executionMarkdown(result);
|
|
78
|
+
if (!markdown) return Object.freeze({ state: 'unavailable', reason: 'creation-execution-empty', markdown: '', result, qualification: executionQualificationSummary(qualification, null) });
|
|
79
|
+
if (!rootCreation) return Object.freeze({ state: 'rendered', reason: '', markdown, result, qualification: executionQualificationSummary(qualification, null) });
|
|
80
|
+
const concrete = qualifyOrdinaryCreationExecutionResult(module, qualification.authority, contract, snapshot.authority, markdown);
|
|
81
|
+
const summary = executionQualificationSummary(qualification, concrete);
|
|
82
|
+
if (concrete.state !== 'qualified') return Object.freeze({ state: 'unavailable', reason: 'creation-concrete-execution-unqualified', markdown: '', result, qualification: summary, findings: concrete.findings });
|
|
83
|
+
return Object.freeze({ state: 'rendered', reason: '', markdown, result, qualification: summary });
|
|
84
|
+
} catch (error) {
|
|
85
|
+
return Object.freeze({ state: 'unavailable', reason: String(error?.message || error || 'creation-execution-failed'), markdown: '', error, qualification: executionQualificationSummary(qualification, null) });
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function executionQualification(module, authority, implementation, transition) {
|
|
90
|
+
if (transition !== 'create-artifact') return Object.freeze({ state: 'qualified', qualificationScope: 'transition-callable', reason: '', findings: Object.freeze([]) });
|
|
91
|
+
let perModule = executionQualificationCache.get(module);
|
|
92
|
+
if (!perModule) { perModule = new Map(); executionQualificationCache.set(module, perModule); }
|
|
93
|
+
const cacheKey = `${transition}\u0000${authority.checksum || ''}`;
|
|
94
|
+
if (perModule.has(cacheKey)) return perModule.get(cacheKey);
|
|
95
|
+
const result = probeOrdinaryCreationExecution(module, authority, implementation);
|
|
96
|
+
perModule.set(cacheKey, result);
|
|
97
|
+
return result;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function probeOrdinaryCreationExecution(module = {}, authority = {}, implementation = {}) {
|
|
101
|
+
const creation = authority?.compiledContract?.creation || {};
|
|
102
|
+
const schemaId = String(module?.id || authority?.schemaId || '').trim();
|
|
103
|
+
const inputBindings = Object.freeze([...(creation.inputBindings || [])]);
|
|
104
|
+
const requiredInputs = Object.freeze([...(creation.requiredInputs || [])]);
|
|
105
|
+
const contract = Object.freeze({
|
|
106
|
+
transitionType: 'create-artifact',
|
|
107
|
+
target: Object.freeze({ schemaId, label: String(module?.label || schemaId || 'Artifact') }),
|
|
108
|
+
schemaReferences: schemaReferenceAuthoritiesForCreation(module),
|
|
109
|
+
integrityMethodReferences: Object.freeze({ primarySelf: integrityMethodReferenceAuthorityForCreation(C14N_V2_METHOD_ID) }),
|
|
110
|
+
creation: Object.freeze({
|
|
111
|
+
requiredInputs,
|
|
112
|
+
optionalInputs: Object.freeze([...(creation.optionalInputs || [])]),
|
|
113
|
+
requiredSections: Object.freeze([...(creation.requiredSections || [])]),
|
|
114
|
+
representationSections: Object.freeze([...(creation.representationSections || [])]),
|
|
115
|
+
toolingConfigurationFields: Object.freeze([...(creation.toolingConfigurationFields || [])]),
|
|
116
|
+
inputBindings,
|
|
117
|
+
supplementalRequiredFields: Object.freeze([...(creation.supplementalRequiredFields || [])]),
|
|
118
|
+
requiredShape: Object.freeze([...(creation.requiredShape || [])])
|
|
119
|
+
})
|
|
120
|
+
});
|
|
121
|
+
const unsupported = requiredInputs.filter((name) => {
|
|
122
|
+
const binding = inputBindings.find((item) => String(item?.input || '') === String(name || ''));
|
|
123
|
+
return !binding || !['section-body', 'root-current-summary-body-title', 'ordinary-field', 'ordinary-group', 'named-declaration-section'].includes(String(binding.kind || ''));
|
|
124
|
+
});
|
|
125
|
+
if (unsupported.length) return Object.freeze({ state: 'unavailable', qualificationScope: 'representative-preflight', reason: 'required-input-binding-unavailable', findings: Object.freeze(unsupported.map((name) => `No exact qualified representation binding exists for required creation input: ${name}.`)), inputFidelity: 'representative-failed' });
|
|
126
|
+
|
|
127
|
+
const values = Object.freeze(Object.fromEntries(requiredInputs.map((name, index) => {
|
|
128
|
+
const binding = inputBindings.find((item) => String(item?.input || '') === String(name || ''));
|
|
129
|
+
return [name, representativeCreationValue(name, index, binding, authority?.compiledContract?.validationContract || null)];
|
|
130
|
+
})));
|
|
131
|
+
const rawInput = Object.freeze({ values, createdAt: '2026-08-20T00:00:00.000Z' });
|
|
132
|
+
const snapshot = snapshotOrdinaryCreationExecutionInput(contract, rawInput);
|
|
133
|
+
let output;
|
|
134
|
+
try { output = implementation.execute(contract, snapshot.implementationInput); }
|
|
135
|
+
catch (error) { return Object.freeze({ state: 'unavailable', qualificationScope: 'representative-preflight', reason: 'execution-threw', findings: Object.freeze([String(error?.message || error || 'execution-threw')]), inputFidelity: 'representative-failed' }); }
|
|
136
|
+
const markdown = executionMarkdown(output);
|
|
137
|
+
if (!markdown) return Object.freeze({ state: 'unavailable', qualificationScope: 'representative-preflight', reason: 'execution-empty', findings: Object.freeze(['Creation execution owner returned no Markdown.']), inputFidelity: 'representative-failed' });
|
|
138
|
+
const concrete = qualifyOrdinaryCreationExecutionResult(module, authority, contract, snapshot.authority, markdown);
|
|
139
|
+
return Object.freeze({
|
|
140
|
+
state: concrete.state,
|
|
141
|
+
qualificationScope: 'representative-preflight',
|
|
142
|
+
reason: concrete.state === 'qualified' ? '' : 'representative-execution-qualification-failed',
|
|
143
|
+
findings: concrete.findings,
|
|
144
|
+
observedSchemaId: concrete.observedSchemaId,
|
|
145
|
+
observedSections: concrete.observedSections,
|
|
146
|
+
observedInputBindings: inputBindings,
|
|
147
|
+
inputFidelity: concrete.inputBindingQualification.state === 'qualified' ? 'representative-qualified' : 'representative-failed',
|
|
148
|
+
executionMetadataFidelity: concrete.executionMetadataQualification.state,
|
|
149
|
+
portableContractQualification: concrete.portableContractQualification.state,
|
|
150
|
+
requiredShapeQualification: concrete.requiredShapeQualification.state,
|
|
151
|
+
integrityQualification: concrete.integrityQualification.state
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function qualifyOrdinaryCreationExecutionResult(module = {}, authority = {}, contract = {}, input = {}, markdown = '') {
|
|
156
|
+
let parsed;
|
|
157
|
+
try { parsed = parseArtifactMarkdown(markdown); }
|
|
158
|
+
catch (error) {
|
|
159
|
+
const message = String(error?.message || error || 'creation-execution-unparseable');
|
|
160
|
+
const failed = Object.freeze({ state: 'failed', findings: Object.freeze([message]) });
|
|
161
|
+
return Object.freeze({ state: 'unavailable', findings: Object.freeze([message]), inputBindingQualification: failed, executionMetadataQualification: failed, representationQualification: failed, schemaReferenceQualification: failed, requiredShapeQualification: failed, portableContractQualification: failed, integrityQualification: Object.freeze({ state: 'unavailable', findings: Object.freeze([message]) }), observedSchemaId: '', observedSections: Object.freeze([]) });
|
|
162
|
+
}
|
|
163
|
+
const creation = contract?.creation || authority?.compiledContract?.creation || {};
|
|
164
|
+
const schemaId = String(contract?.target?.schemaId || module?.id || authority?.schemaId || '').trim();
|
|
165
|
+
const requiredInputs = Object.freeze([...(creation.requiredInputs || [])]);
|
|
166
|
+
const inputBindings = Object.freeze([...(creation.inputBindings || [])]);
|
|
167
|
+
const values = creationValues(input);
|
|
168
|
+
const representationQualification = qualifyRootCreationRepresentation(markdown, { creation });
|
|
169
|
+
const schemaReferenceQualification = qualifyCreationSchemaReferences(markdown, contract);
|
|
170
|
+
const inputFindings = [...(representationQualification.findings || [])];
|
|
171
|
+
const metadataFindings = [];
|
|
172
|
+
if (String(parsed?.envelope?.current?.schema?.id || '') !== schemaId) inputFindings.push(`Current Schema must be ${schemaId}.`);
|
|
173
|
+
if (parsedParentHasAnyValue(parsed?.envelope?.parent || {})) inputFindings.push('Standalone create execution invented Continuity Parent truth.');
|
|
174
|
+
for (const name of requiredInputs) {
|
|
175
|
+
const binding = inputBindings.find((item) => String(item?.input || '') === String(name || ''));
|
|
176
|
+
if (!binding || !['section-body', 'root-current-summary-body-title', 'ordinary-field', 'ordinary-group', 'named-declaration-section'].includes(String(binding.kind || ''))) { inputFindings.push(`No exact qualified representation binding exists for required creation input: ${name}.`); continue; }
|
|
177
|
+
if (!Object.prototype.hasOwnProperty.call(values, name)) { inputFindings.push(`Required creation input is missing under exact declared identity: ${name}.`); continue; }
|
|
178
|
+
const expected = values[name];
|
|
179
|
+
if (binding.kind === 'root-current-summary-body-title') {
|
|
180
|
+
const expectedText = String(expected);
|
|
181
|
+
if (String(parsed?.envelope?.current?.summary || '') !== expectedText) inputFindings.push(`Required input ${name} was not preserved exactly in Current Summary.`);
|
|
182
|
+
if (String(parsed?.body?.title || '') !== expectedText) inputFindings.push(`Required input ${name} was not preserved exactly in the body title.`);
|
|
183
|
+
} else if (binding.kind === 'section-body') {
|
|
184
|
+
const expectedText = String(expected);
|
|
185
|
+
const occurrences = representationQualification.observed?.sectionBodies?.[binding.section] || [];
|
|
186
|
+
const observed = occurrences.length === 1 ? occurrences[0] : undefined;
|
|
187
|
+
if (observed !== expectedText) inputFindings.push(`Required input ${name} was not preserved exactly in unique section ${binding.section}.`);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
const createdAt = representationQualification.observed?.createdAt || [];
|
|
191
|
+
let expectedCreatedAt = '';
|
|
192
|
+
try { expectedCreatedAt = canonicalRootCreatedAt(input.createdAt); }
|
|
193
|
+
catch (error) { metadataFindings.push(`Concrete creation Created At is not representable: ${String(error?.message || error || 'creation-created-at-unrepresentable')}.`); }
|
|
194
|
+
if (createdAt.length === 1) {
|
|
195
|
+
const observedCreatedAt = String(createdAt[0] || '');
|
|
196
|
+
if (!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(observedCreatedAt)) metadataFindings.push('Created At is not in canonical Root YYYY-MM-DD hh:mm:ss representation.');
|
|
197
|
+
if (expectedCreatedAt && observedCreatedAt !== expectedCreatedAt) metadataFindings.push(`Created At did not preserve the concrete execution instant; expected ${expectedCreatedAt}.`);
|
|
198
|
+
}
|
|
199
|
+
const requiredShapeQualification = qualifyRequiredShapeCoverage(module?.artifactCreation?.implementation || {}, creation, input, markdown, representationQualification);
|
|
200
|
+
const portableFindings = [];
|
|
201
|
+
let exactValidation = null;
|
|
202
|
+
const portableValidationContract = authority?.compiledContract?.validationContract || module?.schemaSource?.qualify?.()?.compiledContract?.validationContract || null;
|
|
203
|
+
if (!portableValidationContract) portableFindings.push('Portable Root + target structural validation projection is unavailable.');
|
|
204
|
+
else {
|
|
205
|
+
try {
|
|
206
|
+
exactValidation = validatePortableContractInstance({ markdown, compiledContract: portableValidationContract });
|
|
207
|
+
if (exactValidation.status !== 'valid') {
|
|
208
|
+
portableFindings.push(`Portable Root + target structural validation is ${exactValidation.status}.`);
|
|
209
|
+
for (const finding of exactValidation.findings || []) if (finding?.severity === 'error') portableFindings.push(String(finding?.message || finding?.code || 'portable-contract-validation-error'));
|
|
210
|
+
}
|
|
211
|
+
} catch (error) { portableFindings.push(String(error?.message || error || 'portable-contract-validation-failed')); }
|
|
212
|
+
}
|
|
213
|
+
if (exactValidation) inputFindings.push(...qualifyStructuredCreationInputFidelity(requiredInputs, inputBindings, values, exactValidation));
|
|
214
|
+
const integrity = canonicalC14nV2SelfState(markdown);
|
|
215
|
+
const integrityFindings = integrity.state === 'verified' ? [] : [`Creation result self-integrity is not verified: ${integrity.reason || integrity.state}.`];
|
|
216
|
+
const inputBindingQualification = Object.freeze({ state: inputFindings.length ? 'failed' : 'qualified', findings: Object.freeze(inputFindings) });
|
|
217
|
+
const executionMetadataQualification = Object.freeze({ state: metadataFindings.length ? 'failed' : 'qualified', findings: Object.freeze(metadataFindings), createdAt: Object.freeze({ expected: expectedCreatedAt, observed: createdAt.length === 1 ? String(createdAt[0] || '') : '' }) });
|
|
218
|
+
const portableContractQualification = Object.freeze({ state: portableFindings.length ? 'failed' : 'qualified', coverage: 'portable-structural', findings: Object.freeze(portableFindings) });
|
|
219
|
+
const integrityQualification = Object.freeze({ state: integrity.state, findings: Object.freeze(integrityFindings) });
|
|
220
|
+
const findings = Object.freeze([...inputFindings, ...(schemaReferenceQualification.findings || []), ...metadataFindings, ...(requiredShapeQualification.findings || []), ...portableFindings, ...integrityFindings]);
|
|
221
|
+
return Object.freeze({
|
|
222
|
+
state: findings.length ? 'unavailable' : 'qualified',
|
|
223
|
+
findings,
|
|
224
|
+
inputBindingQualification,
|
|
225
|
+
executionMetadataQualification,
|
|
226
|
+
representationQualification,
|
|
227
|
+
schemaReferenceQualification,
|
|
228
|
+
requiredShapeQualification,
|
|
229
|
+
portableContractQualification,
|
|
230
|
+
integrityQualification,
|
|
231
|
+
observedSchemaId: String(parsed?.envelope?.current?.schema?.id || ''),
|
|
232
|
+
observedSections: Object.freeze([...(parsed?.body?.sections || [])])
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function executionQualificationSummary(qualification = {}, concrete = null) {
|
|
237
|
+
const representative = qualification?.implementation?.executionQualification || Object.freeze({ state: 'unavailable', qualificationScope: 'representative-preflight', findings: Object.freeze([]) });
|
|
238
|
+
return Object.freeze({
|
|
239
|
+
representativeImplementation: representative,
|
|
240
|
+
concreteInvocationInputBinding: concrete?.inputBindingQualification || Object.freeze({ state: 'not-run', findings: Object.freeze([]) }),
|
|
241
|
+
executionMetadataFidelity: concrete?.executionMetadataQualification || Object.freeze({ state: 'not-run', findings: Object.freeze([]), createdAt: Object.freeze({ expected: '', observed: '' }) }),
|
|
242
|
+
representationMultiplicity: concrete?.representationQualification || Object.freeze({ state: 'not-run', findings: Object.freeze([]) }),
|
|
243
|
+
schemaReferenceAuthority: concrete?.schemaReferenceQualification || Object.freeze({ state: 'not-run', findings: Object.freeze([]) }),
|
|
244
|
+
requiredShapeCoverage: concrete?.requiredShapeQualification || Object.freeze({ state: 'not-run', findings: Object.freeze([]) }),
|
|
245
|
+
portableRootTargetValidation: concrete?.portableContractQualification || Object.freeze({ state: 'not-run', coverage: 'portable-structural', findings: Object.freeze([]) }),
|
|
246
|
+
integrity: concrete?.integrityQualification || Object.freeze({ state: 'not-run', findings: Object.freeze([]) })
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
function qualifyRequiredShapeCoverage(implementation = {}, creation = {}, input = {}, markdown = '', representationQualification = {}) {
|
|
252
|
+
const items = Object.freeze([...(creation.requiredShape || [])]);
|
|
253
|
+
const residualItems = Object.freeze(items.filter((item) => String(item?.primitive?.kind || 'residual') === 'residual'));
|
|
254
|
+
const genericItems = Object.freeze(items.filter((item) => String(item?.primitive?.kind || 'residual') !== 'residual'));
|
|
255
|
+
const findings = [];
|
|
256
|
+
if (representationQualification.state !== 'qualified') findings.push('Generic Required Shape representation is ambiguous or incomplete.');
|
|
257
|
+
let residualResult = Object.freeze({ state: residualItems.length ? 'unavailable' : 'qualified', coveredItemIds: Object.freeze([]), findings: Object.freeze(residualItems.length ? ['Residual Artifact Creation Required Shape authority has no schema-owned qualifier.'] : []) });
|
|
258
|
+
if (residualItems.length && typeof implementation?.qualifyRequiredShape === 'function') {
|
|
259
|
+
try { residualResult = implementation.qualifyRequiredShape({ markdown, residualItems, input, creation }) || residualResult; }
|
|
260
|
+
catch (error) { residualResult = Object.freeze({ state: 'unavailable', coveredItemIds: Object.freeze([]), findings: Object.freeze([String(error?.message || error || 'schema-owned Required Shape qualification failed')]) }); }
|
|
261
|
+
}
|
|
262
|
+
const covered = new Set(residualResult?.coveredItemIds || []);
|
|
263
|
+
for (const item of residualItems) if (!covered.has(item.id)) findings.push(`Residual Artifact Creation Required Shape item is not qualified: ${item.id}.`);
|
|
264
|
+
for (const item of genericItems) if (String(item?.primitive?.kind || '') === 'body-prose-block' && !hasQualifiedBodyProseBlock(markdown)) findings.push(`Generic body-prose-block Required Shape item is not qualified: ${item.id}.`);
|
|
265
|
+
findings.push(...(residualResult?.findings || []));
|
|
266
|
+
const qualified = representationQualification.state === 'qualified' && findings.length === 0 && residualResult.state === 'qualified';
|
|
267
|
+
return Object.freeze({ state: qualified ? 'qualified' : 'unavailable', coverage: qualified ? 'complete-declared-required-shape' : 'incomplete-declared-required-shape', genericItemIds: Object.freeze(genericItems.map((item) => item.id)), residualItemIds: Object.freeze(residualItems.map((item) => item.id)), coveredResidualItemIds: Object.freeze([...covered]), findings: Object.freeze(findings) });
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
function hasQualifiedBodyProseBlock(markdown = '') {
|
|
271
|
+
let body = '';
|
|
272
|
+
try { body = String(parseArtifactMarkdown(markdown)?.body?.text || ''); }
|
|
273
|
+
catch { return false; }
|
|
274
|
+
const lines = body.replace(/\r\n?/g, '\n').split('\n');
|
|
275
|
+
const firstBodyHeading = lines.findIndex((line) => /^#\s+\S/.test(line));
|
|
276
|
+
if (firstBodyHeading < 0) return false;
|
|
277
|
+
const firstSecondLevel = lines.findIndex((line, index) => index > firstBodyHeading && /^##\s+\S/.test(line));
|
|
278
|
+
if (firstSecondLevel < 0) return false;
|
|
279
|
+
const block = lines.slice(firstBodyHeading + 1, firstSecondLevel).join('\n').trim();
|
|
280
|
+
return Boolean(block) && !/^#{1,6}\s+/m.test(block);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
function creationValues(input = {}) {
|
|
284
|
+
const explicit = input.values && typeof input.values === 'object' && !Array.isArray(input.values) ? input.values : {};
|
|
285
|
+
const alternate = input.inputs && typeof input.inputs === 'object' && !Array.isArray(input.inputs) ? input.inputs : {};
|
|
286
|
+
return Object.freeze({ ...alternate, ...explicit });
|
|
287
|
+
}
|
|
288
|
+
function parsedParentHasAnyValue(parent = {}) { return Boolean(parent?.schema?.id || parent?.trace || parent?.origin || parent?.boundary || parent?.createdAt); }
|
|
289
|
+
function executionMarkdown(result) { if (typeof result === 'string') return result; return typeof result?.markdown === 'string' ? result.markdown : ''; }
|