@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,193 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { inferWorkspaceTitle, normalizeAdditionalWorkspaceDescriptors, normalizeTransportRoute, safeWorkspaceToken } from './handoff.manufacture.multiRoot.js';
|
|
4
|
+
import { buildToolingBootstrapTransportFiles, PORTABLE_TOOLING_BOOTSTRAP_MANIFEST_SCHEMA_ID } from './handoff.manufacture.bootstrap.js';
|
|
5
|
+
import { normalizeHandoffCarrierLineage } from '../../handoff/carrierLineage.js';
|
|
6
|
+
import { normalizeHandoffCarrierProfile } from '../../handoff/carrierProfile.js';
|
|
7
|
+
import { enumerateNodeWorkspace, PORTABLE_NODE_WORKSPACE_ENUMERATION_SCHEMA_ID } from './handoff.manufacture.enumeration.js';
|
|
8
|
+
import { preparePackageParentWorkspaceReuse } from './handoff.manufacture.packageParent.js';
|
|
9
|
+
import {
|
|
10
|
+
assertInside,
|
|
11
|
+
expandPointerDependencyClosure,
|
|
12
|
+
normalizeRelativePath,
|
|
13
|
+
projectManufacturingRequirements,
|
|
14
|
+
resolveWorkspaceRequirementMaterials
|
|
15
|
+
} from './handoff.manufacture.requirements.js';
|
|
16
|
+
import {
|
|
17
|
+
expandBoundedParentBoundaryClosure,
|
|
18
|
+
normalizeWorkspaceScopes,
|
|
19
|
+
normalizeWorkspaceTargetBindings,
|
|
20
|
+
projectBoundedWorkspaceMaterialization
|
|
21
|
+
} from './handoff.manufacture.scope.js';
|
|
22
|
+
|
|
23
|
+
export { buildToolingBootstrapTransportFiles, PORTABLE_TOOLING_BOOTSTRAP_MANIFEST_SCHEMA_ID };
|
|
24
|
+
export { enumerateNodeWorkspace, PORTABLE_NODE_WORKSPACE_ENUMERATION_SCHEMA_ID } from './handoff.manufacture.enumeration.js';
|
|
25
|
+
|
|
26
|
+
export async function prepareNodeHandoffManufacturingInput(input = {}, options = {}) {
|
|
27
|
+
const workspaceRoot = path.resolve(String(input.workspaceRoot || input.workspace || '.'));
|
|
28
|
+
const workspaceId = safeWorkspaceToken(input.workspaceId || path.basename(workspaceRoot) || 'workspace');
|
|
29
|
+
const requestedWorkspaceTitle = String(input.workspaceTitle || input.title || '').trim();
|
|
30
|
+
const handoffPath = normalizeRelativePath(input.handoffPath || input.handoff || '');
|
|
31
|
+
if (!handoffPath) throw new Error('portable.handoff-manufacture.handoff-path.required');
|
|
32
|
+
const absoluteHandoff = path.resolve(workspaceRoot, handoffPath);
|
|
33
|
+
assertInside(workspaceRoot, absoluteHandoff, 'portable.handoff-manufacture.handoff-path.outside-workspace');
|
|
34
|
+
const handoffMarkdownPromise = readFile(absoluteHandoff, 'utf8');
|
|
35
|
+
const toolingBootstrapPromise = buildToolingBootstrapTransportFiles({
|
|
36
|
+
delivery: input.toolingBootstrap || input.bootstrapDelivery || 'embedded',
|
|
37
|
+
runtimeRoot: input.runtimeRoot || options.runtimeRoot,
|
|
38
|
+
expected: input.expectedToolingBootstrap || null,
|
|
39
|
+
maxFiles: input.bootstrapMaxFiles || options.bootstrapMaxFiles
|
|
40
|
+
}).then(
|
|
41
|
+
(value) => Object.freeze({ value, error: null }),
|
|
42
|
+
(error) => Object.freeze({ value: null, error })
|
|
43
|
+
);
|
|
44
|
+
const enumerationPromise = enumerateNodeWorkspace(workspaceRoot, {
|
|
45
|
+
workspaceId,
|
|
46
|
+
workspaceTitle: requestedWorkspaceTitle,
|
|
47
|
+
sourceMetadata: input.workspaceSource || input.sourceMetadata || {},
|
|
48
|
+
excludeDirectories: input.excludeDirectories || options.excludeDirectories,
|
|
49
|
+
maxFiles: input.maxFiles || options.maxFiles
|
|
50
|
+
});
|
|
51
|
+
const additionalWorkspaceDescriptors = normalizeAdditionalWorkspaceDescriptors(input.additionalWorkspaces || input.workspaceRoots || input.workspaceDescriptors || []);
|
|
52
|
+
const seenWorkspaceIds = new Set([workspaceId]);
|
|
53
|
+
const additionalWorkspaceInputs = additionalWorkspaceDescriptors.map((descriptor) => {
|
|
54
|
+
const id = safeWorkspaceToken(descriptor.id || descriptor.workspaceId || '');
|
|
55
|
+
if (!descriptor.id && !descriptor.workspaceId) throw new Error('portable.handoff-manufacture.additional-workspace.id.required');
|
|
56
|
+
if (seenWorkspaceIds.has(id)) throw new Error(`portable.handoff-manufacture.workspace-id.duplicate:${id}`);
|
|
57
|
+
seenWorkspaceIds.add(id);
|
|
58
|
+
if (!descriptor.root && !descriptor.workspaceRoot && !descriptor.path) throw new Error(`portable.handoff-manufacture.additional-workspace.root.required:${id}`);
|
|
59
|
+
return Object.freeze({
|
|
60
|
+
descriptor,
|
|
61
|
+
id,
|
|
62
|
+
root: path.resolve(String(descriptor.root || descriptor.workspaceRoot || descriptor.path || '')),
|
|
63
|
+
requestedTitle: String(descriptor.title || descriptor.name || descriptor.workspaceTitle || '').trim()
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
const packageParentReuse = preparePackageParentWorkspaceReuse({
|
|
67
|
+
bundle: input.packageParentBundle || null,
|
|
68
|
+
currentWorkspaceIds: [...seenWorkspaceIds],
|
|
69
|
+
parentPackagePath: input.packageParentPath || '',
|
|
70
|
+
parentPackageSha256: input.packageParentSha256 || ''
|
|
71
|
+
});
|
|
72
|
+
const additionalEnumerationsPromise = Promise.all(additionalWorkspaceInputs.map(async ({ descriptor, id, root, requestedTitle }) => {
|
|
73
|
+
const enumerated = await enumerateNodeWorkspace(root, {
|
|
74
|
+
workspaceId: id,
|
|
75
|
+
workspaceTitle: requestedTitle,
|
|
76
|
+
sourceMetadata: descriptor.source || descriptor.sourceMetadata || {},
|
|
77
|
+
excludeDirectories: descriptor.excludeDirectories || input.excludeDirectories || options.excludeDirectories,
|
|
78
|
+
maxFiles: descriptor.maxFiles || input.maxFiles || options.maxFiles
|
|
79
|
+
});
|
|
80
|
+
if (enumerated.status !== 'qualified-complete') throw new Error(`portable.handoff-manufacture.workspace-enumeration.${id}.${enumerated.status}`);
|
|
81
|
+
return Object.freeze({ descriptor, id, root, requestedTitle, enumerated });
|
|
82
|
+
}));
|
|
83
|
+
|
|
84
|
+
const [handoffMarkdown, enumeration, additionalEnumerations] = await Promise.all([
|
|
85
|
+
handoffMarkdownPromise,
|
|
86
|
+
enumerationPromise,
|
|
87
|
+
additionalEnumerationsPromise
|
|
88
|
+
]);
|
|
89
|
+
const handoff = Object.freeze({
|
|
90
|
+
id: handoffPath,
|
|
91
|
+
path: handoffPath,
|
|
92
|
+
semanticStatus: String(input.handoffSemanticStatus || 'unknown'),
|
|
93
|
+
markdown: handoffMarkdown
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
if (enumeration.status !== 'qualified-complete') throw new Error(`portable.handoff-manufacture.workspace-enumeration.${enumeration.status}`);
|
|
97
|
+
const workspaceTitle = requestedWorkspaceTitle || inferWorkspaceTitle(enumeration) || workspaceId;
|
|
98
|
+
const primaryMaterialization = Object.freeze({ ...enumeration.materialization, title: workspaceTitle });
|
|
99
|
+
const workspaceMaterializations = [primaryMaterialization];
|
|
100
|
+
const workspaceEnumerations = [Object.freeze({ id: workspaceId, root: workspaceRoot, evidence: enumeration.evidence })];
|
|
101
|
+
const workspaceRuntimeById = new Map([[workspaceId, Object.freeze({ id: workspaceId, root: workspaceRoot, enumeration })]]);
|
|
102
|
+
for (const { id, root, requestedTitle, enumerated } of additionalEnumerations) {
|
|
103
|
+
const title = requestedTitle || inferWorkspaceTitle(enumerated) || id;
|
|
104
|
+
workspaceMaterializations.push(Object.freeze({ ...enumerated.materialization, title }));
|
|
105
|
+
workspaceEnumerations.push(Object.freeze({ id, root, evidence: enumerated.evidence }));
|
|
106
|
+
workspaceRuntimeById.set(id, Object.freeze({ id, root, enumeration: enumerated }));
|
|
107
|
+
}
|
|
108
|
+
for (const inherited of packageParentReuse.inherited || []) {
|
|
109
|
+
const id = safeWorkspaceToken(inherited.id || inherited.enumeration?.materialization?.id || '');
|
|
110
|
+
if (!id || workspaceRuntimeById.has(id)) throw new Error(`portable.handoff-manufacture.package-parent.workspace-precedence.invalid:${id || 'unresolved'}`);
|
|
111
|
+
const inheritedEnumeration = inherited.enumeration;
|
|
112
|
+
workspaceMaterializations.push(inheritedEnumeration.materialization);
|
|
113
|
+
workspaceEnumerations.push(Object.freeze({ id, root: '', evidence: inheritedEnumeration.evidence, provider: 'qualified-package-parent-workspace' }));
|
|
114
|
+
workspaceRuntimeById.set(id, Object.freeze({ id, root: '', enumeration: inheritedEnumeration, provider: 'qualified-package-parent-workspace' }));
|
|
115
|
+
}
|
|
116
|
+
const transportRoutes = Object.freeze([...(input.transportRoutes || input.handoffRoutes || [])].map((route) => normalizeTransportRoute(route, workspaceId)).filter(Boolean));
|
|
117
|
+
const workspaceTargets = mergeWorkspaceTargetBindings(normalizeWorkspaceTargetBindings({
|
|
118
|
+
primaryWorkspaceId: workspaceId,
|
|
119
|
+
primaryTargetPath: input.workspaceTargetPath || input.workspaceArtifactPath || '',
|
|
120
|
+
explicitBindings: input.workspaceTargets || input.workspaceTargetBindings || [],
|
|
121
|
+
additionalWorkspaceDescriptors
|
|
122
|
+
}), packageParentReuse.workspaceTargets || []);
|
|
123
|
+
const workspaceScopes = normalizeWorkspaceScopes(input.workspaceScopes || input.workspaceScopeBindings || []);
|
|
124
|
+
for (let index = 0; index < workspaceMaterializations.length; index += 1) {
|
|
125
|
+
const materialization = workspaceMaterializations[index];
|
|
126
|
+
const scope = workspaceScopes.get(String(materialization.id || '')) || null;
|
|
127
|
+
if (!scope || scope.coverage !== 'bounded') continue;
|
|
128
|
+
const targets = workspaceTargets.filter((item) => String(item.workspaceId || '') === String(materialization.id || ''));
|
|
129
|
+
if (targets.length !== 1) throw new Error(`portable.handoff-manufacture.workspace-scope.target-${targets.length ? 'ambiguous' : 'required'}:${materialization.id}`);
|
|
130
|
+
workspaceMaterializations[index] = projectBoundedWorkspaceMaterialization(materialization, scope, targets[0].path);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const routeSpecs = transportRoutes.length ? transportRoutes : Object.freeze([{ workspaceId, path: handoffPath }]);
|
|
134
|
+
let requirements = await projectManufacturingRequirements({ handoff, workspaceId, handoffPath, routeSpecs, workspaceRuntimeById });
|
|
135
|
+
let materials = await resolveWorkspaceRequirementMaterials(requirements, workspaceRuntimeById, input.materialBindings || {});
|
|
136
|
+
const dependencyClosure = await expandPointerDependencyClosure({ requirements, materials, workspaceRuntimeById, bindings: input.materialBindings || {} });
|
|
137
|
+
requirements = dependencyClosure.requirements;
|
|
138
|
+
materials = dependencyClosure.materials;
|
|
139
|
+
const parentBoundaryClosure = expandBoundedParentBoundaryClosure({ requirements, materials, workspaceMaterializations, workspaceRuntimeById });
|
|
140
|
+
requirements = parentBoundaryClosure.requirements;
|
|
141
|
+
materials = parentBoundaryClosure.materials;
|
|
142
|
+
const toolingBootstrapResult = await toolingBootstrapPromise;
|
|
143
|
+
if (toolingBootstrapResult.error) throw toolingBootstrapResult.error;
|
|
144
|
+
const toolingBootstrap = toolingBootstrapResult.value;
|
|
145
|
+
const orientationBootstrap = input.transportBootstrapContent
|
|
146
|
+
? Object.freeze({ present: true, path: String(input.transportBootstrapPath || 'tiinex.package/bootstrap.md'), content: String(input.transportBootstrapContent), mediaType: 'text/markdown' })
|
|
147
|
+
: Object.freeze({ present: false });
|
|
148
|
+
|
|
149
|
+
return Object.freeze({
|
|
150
|
+
handoff,
|
|
151
|
+
requirements,
|
|
152
|
+
workspace: Object.freeze({ id: workspaceId, name: workspaceTitle, title: workspaceTitle, records: Object.freeze([]), assets: Object.freeze([]) }),
|
|
153
|
+
workspaceMaterializations: Object.freeze(workspaceMaterializations),
|
|
154
|
+
materials: Object.freeze(materials),
|
|
155
|
+
recipient: Object.freeze({ referenceTargets: Object.freeze([...(input.referenceTargets || [])].map(String)) }),
|
|
156
|
+
bootstrap: orientationBootstrap,
|
|
157
|
+
additionalTransportFiles: toolingBootstrap.files,
|
|
158
|
+
transportRoutes,
|
|
159
|
+
workspaceTargets,
|
|
160
|
+
carrierLineage: normalizeHandoffCarrierLineage(input.carrierLineage || null),
|
|
161
|
+
carrierProfile: normalizeHandoffCarrierProfile(input.carrierProfile || null),
|
|
162
|
+
toolingBootstrap: toolingBootstrap.summary,
|
|
163
|
+
manufacturingEvidence: Object.freeze({
|
|
164
|
+
enumeration: enumeration.evidence,
|
|
165
|
+
workspaceEnumerations: Object.freeze(workspaceEnumerations),
|
|
166
|
+
toolingBootstrap: toolingBootstrap.summary,
|
|
167
|
+
packageParentWorkspaceReuse: Object.freeze({
|
|
168
|
+
state: String(packageParentReuse.state || ''),
|
|
169
|
+
inspectionStatus: String(packageParentReuse.inspectionStatus || ''),
|
|
170
|
+
inheritedWorkspaceIds: Object.freeze((packageParentReuse.inherited || []).map((item) => String(item.id || ''))),
|
|
171
|
+
boundary: String(packageParentReuse.boundary || '')
|
|
172
|
+
}),
|
|
173
|
+
carrierProjection: Object.freeze({ requestedRoutes: transportRoutes.length || 1, carrierLineage: normalizeHandoffCarrierLineage(input.carrierLineage || null), carrierProfile: normalizeHandoffCarrierProfile(input.carrierProfile || null), boundary: 'Routes are qualified later against packaged workspace bytes; adapter text is not authority.' })
|
|
174
|
+
}),
|
|
175
|
+
verifyRoundtrip: input.verifyRoundtrip !== false
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
function mergeWorkspaceTargetBindings(explicit = [], inherited = []) {
|
|
181
|
+
const out = [];
|
|
182
|
+
const seen = new Set();
|
|
183
|
+
for (const item of [...explicit, ...inherited]) {
|
|
184
|
+
const workspaceId = String(item?.workspaceId || '').trim();
|
|
185
|
+
const targetPath = String(item?.path || '').trim();
|
|
186
|
+
if (!workspaceId || !targetPath) continue;
|
|
187
|
+
const key = `${workspaceId}\u0000${targetPath}`;
|
|
188
|
+
if (seen.has(key)) continue;
|
|
189
|
+
seen.add(key);
|
|
190
|
+
out.push(Object.freeze({ ...item, workspaceId, path: targetPath }));
|
|
191
|
+
}
|
|
192
|
+
return Object.freeze(out);
|
|
193
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { packageFileBytes, sha256Hex, utf8Bytes } from '../../../../export/package.bytes.js';
|
|
2
|
+
export function normalizeAdditionalWorkspaceDescriptors(value) {
|
|
3
|
+
if (!value) return [];
|
|
4
|
+
if (Array.isArray(value)) return value.map((entry) => typeof entry === 'string' ? parseWorkspaceDescriptorString(entry) : Object.freeze({ ...(entry || {}) }));
|
|
5
|
+
if (typeof value === 'string') return value.split(',').map((entry) => entry.trim()).filter(Boolean).map(parseWorkspaceDescriptorString);
|
|
6
|
+
if (typeof value === 'object') return Object.entries(value).map(([id, descriptor]) => typeof descriptor === 'string' ? Object.freeze({ id, root: descriptor }) : Object.freeze({ id, ...(descriptor || {}) }));
|
|
7
|
+
return [];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function normalizeTransportRoute(route, defaultWorkspaceId = '') {
|
|
11
|
+
if (typeof route === 'string') {
|
|
12
|
+
const pathValue = normalizeRelativePath(route);
|
|
13
|
+
return pathValue ? Object.freeze({ workspaceId: String(defaultWorkspaceId || '').trim(), path: pathValue }) : null;
|
|
14
|
+
}
|
|
15
|
+
const pathValue = normalizeRelativePath(route?.path || route?.workspaceRelativePath || '');
|
|
16
|
+
if (!pathValue) return null;
|
|
17
|
+
const workspaceId = String(route?.workspaceId || route?.workspace || '').trim();
|
|
18
|
+
if (!workspaceId) throw new Error('portable.handoff-manufacture.route.workspace-id.required');
|
|
19
|
+
return Object.freeze({ ...route, workspaceId, path: pathValue });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function safeWorkspaceToken(value = '') {
|
|
23
|
+
const raw = String(value || '');
|
|
24
|
+
const token = raw.trim().replace(/[^a-zA-Z0-9._-]+/g, '-').replace(/^-+|-+$/g, '');
|
|
25
|
+
if (!token) return 'workspace';
|
|
26
|
+
if (token.length <= 100) return token;
|
|
27
|
+
return `${token.slice(0, 87)}-${sha256Hex(utf8Bytes(raw)).slice(0, 12)}`;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function serializableMetadata(value = {}) {
|
|
31
|
+
const out = {};
|
|
32
|
+
for (const [key, item] of Object.entries(value || {})) if (typeof item !== 'function' && typeof item !== 'undefined') out[key] = item;
|
|
33
|
+
return out;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
export function inferWorkspaceTitle(enumeration = {}) {
|
|
38
|
+
const entry = (enumeration.materialization?.entries || []).find((item) => normalizeRelativePath(item.path) === 'package.json');
|
|
39
|
+
if (!entry) return '';
|
|
40
|
+
try { return String(JSON.parse(new TextDecoder().decode(packageFileBytes(entry))).name || '').trim(); }
|
|
41
|
+
catch { return ''; }
|
|
42
|
+
}
|
|
43
|
+
function parseWorkspaceDescriptorString(value = '') {
|
|
44
|
+
const text = String(value || '').trim();
|
|
45
|
+
const separator = text.indexOf('=');
|
|
46
|
+
if (separator <= 0) throw new Error('portable.handoff-manufacture.additional-workspace.descriptor.invalid');
|
|
47
|
+
return Object.freeze({ id: text.slice(0, separator).trim(), root: text.slice(separator + 1).trim() });
|
|
48
|
+
}
|
|
49
|
+
function normalizeRelativePath(value = '') { return String(value || '').replace(/\\/g, '/').replace(/^\/+/, '').split('/').filter((part) => part && part !== '.').join('/'); }
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { packageFileBytes, sha256Hex } from '../../../../export/package.bytes.js';
|
|
2
|
+
import { inspectRecipientFacingV2Topology } from '../../handoff/recipientV2.inspect.js';
|
|
3
|
+
import { parseHandoffPackageV1, RECIPIENT_V2_PACKAGE_V1_ROOT_PATH } from '../../handoff/recipientV2.packageV1.js';
|
|
4
|
+
|
|
5
|
+
export function preparePackageParentWorkspaceReuse(input = {}) {
|
|
6
|
+
const bundle = input.bundle || null;
|
|
7
|
+
if (!bundle?.files?.length) return emptyReuse('unavailable');
|
|
8
|
+
const currentIds = new Set([...(input.currentWorkspaceIds || [])].map(normalizeId).filter(Boolean));
|
|
9
|
+
const inspection = inspectRecipientFacingV2Topology(bundle);
|
|
10
|
+
const declared = declaredPackageWorkspaceBindings(bundle, inspection);
|
|
11
|
+
if (!declared.length) return emptyReuse('unsupported-parent-surface');
|
|
12
|
+
if (inspection.status !== 'valid') throw new Error('portable.handoff-manufacture.package-parent.workspace-provider.invalid');
|
|
13
|
+
const missing = declared.filter((item) => !currentIds.has(normalizeId(item.workspaceId)));
|
|
14
|
+
if (!missing.length) return emptyReuse('not-needed');
|
|
15
|
+
|
|
16
|
+
const providerById = new Map((inspection.workspaceByteProvider?.workspaces || []).map((item) => [normalizeId(item.id), item]));
|
|
17
|
+
const inspectedById = new Map((inspection.workspaces || []).map((item) => [normalizeId(item.workspaceId), item]));
|
|
18
|
+
const inherited = [];
|
|
19
|
+
const workspaceTargets = [];
|
|
20
|
+
for (const binding of missing) {
|
|
21
|
+
const id = normalizeId(binding.workspaceId);
|
|
22
|
+
const provider = providerById.get(id);
|
|
23
|
+
const inspected = inspectedById.get(id);
|
|
24
|
+
if (!provider || provider.state !== 'qualified' || provider.mode !== 'archive' || provider.materialization?.materialization !== 'complete' || inspected?.coverage !== 'complete') {
|
|
25
|
+
throw new Error(`portable.handoff-manufacture.package-parent.workspace-provider.unqualified:${id}`);
|
|
26
|
+
}
|
|
27
|
+
const targetPath = String(inspected.sourceWorkspaceTargetInnerPath || binding.workspaceArtifactInnerPath || '').trim();
|
|
28
|
+
if (!targetPath) throw new Error(`portable.handoff-manufacture.package-parent.workspace-target.unresolved:${id}`);
|
|
29
|
+
inherited.push(buildInheritedEnumeration(provider, {
|
|
30
|
+
parentPackagePath: input.parentPackagePath || '',
|
|
31
|
+
parentPackageSha256: input.parentPackageSha256 || '',
|
|
32
|
+
archivePackagePath: inspected.workspaceArchivePath || binding.snapshotPath || ''
|
|
33
|
+
}));
|
|
34
|
+
workspaceTargets.push(Object.freeze({ workspaceId: id, path: targetPath, source: 'qualified-package-parent-workspace' }));
|
|
35
|
+
}
|
|
36
|
+
return Object.freeze({
|
|
37
|
+
state: 'qualified',
|
|
38
|
+
inherited: Object.freeze(inherited),
|
|
39
|
+
workspaceTargets: Object.freeze(workspaceTargets),
|
|
40
|
+
inspectionStatus: inspection.status,
|
|
41
|
+
missingWorkspaceIds: Object.freeze(missing.map((item) => normalizeId(item.workspaceId))),
|
|
42
|
+
boundary: 'Exact complete Workspace bytes reused from one independently qualified received package parent. Explicit current Workspace roots take precedence by id; parent-carrier placement and lineage remain non-semantic.'
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function declaredPackageWorkspaceBindings(bundle = {}, inspection = null) {
|
|
47
|
+
const roots = (bundle.files || []).filter((file) => String(file.path || '') === RECIPIENT_V2_PACKAGE_V1_ROOT_PATH);
|
|
48
|
+
if (roots.length === 1) {
|
|
49
|
+
try {
|
|
50
|
+
const markdown = new TextDecoder('utf-8', { fatal: true }).decode(packageFileBytes(roots[0]));
|
|
51
|
+
const declared = [...(parseHandoffPackageV1(markdown).workspaces || [])];
|
|
52
|
+
if (declared.length) return declared;
|
|
53
|
+
} catch { /* fall through to independently qualified recipient-v2 inspection */ }
|
|
54
|
+
}
|
|
55
|
+
if (!inspection || inspection.detected !== true || inspection.status !== 'valid') return [];
|
|
56
|
+
return (inspection.workspaces || [])
|
|
57
|
+
.filter((workspace) => String(workspace.coverage || '') === 'complete')
|
|
58
|
+
.map((workspace) => Object.freeze({
|
|
59
|
+
workspaceId: String(workspace.workspaceId || ''),
|
|
60
|
+
workspaceArtifactInnerPath: String(workspace.sourceWorkspaceTargetInnerPath || ''),
|
|
61
|
+
snapshotPath: String(workspace.workspaceArchivePath || '')
|
|
62
|
+
}))
|
|
63
|
+
.filter((workspace) => workspace.workspaceId && workspace.workspaceArtifactInnerPath && workspace.snapshotPath);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function buildInheritedEnumeration(provider = {}, source = {}) {
|
|
67
|
+
const entries = Object.freeze([...(provider.entries || [])]
|
|
68
|
+
.map((entry) => Object.freeze({
|
|
69
|
+
path: String(entry.path || ''),
|
|
70
|
+
data: entry.data,
|
|
71
|
+
bytes: Number(entry.bytes || 0),
|
|
72
|
+
sha256: String(entry.sha256 || ''),
|
|
73
|
+
mediaType: mediaTypeForPath(entry.path),
|
|
74
|
+
referenceTarget: String(entry.referenceTarget || '')
|
|
75
|
+
}))
|
|
76
|
+
.sort((a, b) => a.path.localeCompare(b.path)));
|
|
77
|
+
const includedEntries = Object.freeze(entries.map((entry) => Object.freeze({
|
|
78
|
+
path: entry.path,
|
|
79
|
+
bytes: entry.bytes,
|
|
80
|
+
sha256: entry.sha256,
|
|
81
|
+
referenceTarget: entry.referenceTarget
|
|
82
|
+
})));
|
|
83
|
+
const totalBytes = includedEntries.reduce((sum, entry) => sum + entry.bytes, 0);
|
|
84
|
+
const evidence = Object.freeze({
|
|
85
|
+
schema: 'tiinex.portable.workspace-completeness-evidence.v1',
|
|
86
|
+
state: 'qualified',
|
|
87
|
+
proof: 'qualified-package-parent-workspace-reuse-v1',
|
|
88
|
+
boundary: 'exact-qualified-parent-carrier-complete-workspace-entry-set',
|
|
89
|
+
workspaceId: normalizeId(provider.id),
|
|
90
|
+
entryCount: includedEntries.length,
|
|
91
|
+
totalBytes,
|
|
92
|
+
entriesFingerprint: sha256Hex(new TextEncoder().encode(stableJson(includedEntries)))
|
|
93
|
+
});
|
|
94
|
+
const materialization = Object.freeze({
|
|
95
|
+
id: normalizeId(provider.id),
|
|
96
|
+
title: String(provider.title || provider.id || ''),
|
|
97
|
+
state: 'complete',
|
|
98
|
+
source: Object.freeze({
|
|
99
|
+
kind: 'qualified-package-parent-workspace',
|
|
100
|
+
workspaceId: normalizeId(provider.id),
|
|
101
|
+
boundary: '.',
|
|
102
|
+
parentPackagePath: String(source.parentPackagePath || ''),
|
|
103
|
+
parentPackageSha256: String(source.parentPackageSha256 || ''),
|
|
104
|
+
parentWorkspaceArchivePath: String(source.archivePackagePath || ''),
|
|
105
|
+
authority: 'none'
|
|
106
|
+
}),
|
|
107
|
+
completenessEvidence: evidence,
|
|
108
|
+
entries,
|
|
109
|
+
includedEntries
|
|
110
|
+
});
|
|
111
|
+
return Object.freeze({
|
|
112
|
+
id: materialization.id,
|
|
113
|
+
root: '',
|
|
114
|
+
enumeration: Object.freeze({
|
|
115
|
+
schema: 'tiinex.portable.package-parent-workspace-enumeration.v1',
|
|
116
|
+
status: 'qualified-complete',
|
|
117
|
+
rootBoundary: '.',
|
|
118
|
+
evidence,
|
|
119
|
+
materialization
|
|
120
|
+
})
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function emptyReuse(state) {
|
|
125
|
+
return Object.freeze({ state, inherited: Object.freeze([]), workspaceTargets: Object.freeze([]), inspectionStatus: '', missingWorkspaceIds: Object.freeze([]), boundary: 'No package-parent Workspace provider reuse was required.' });
|
|
126
|
+
}
|
|
127
|
+
function normalizeId(value = '') { return String(value || '').trim().toLowerCase().replace(/[^a-z0-9._-]+/g, '-').replace(/^-+|-+$/g, ''); }
|
|
128
|
+
function mediaTypeForPath(value = '') { const lower = String(value || '').toLowerCase(); if (lower.endsWith('.md')) return 'text/markdown'; if (lower.endsWith('.json')) return 'application/json'; if (/\.(?:m?js|cjs)$/.test(lower)) return 'text/javascript'; if (lower.endsWith('.ts')) return 'text/typescript'; if (lower.endsWith('.css')) return 'text/css'; if (lower.endsWith('.html')) return 'text/html'; if (/\.(?:yml|yaml)$/.test(lower)) return 'text/yaml'; if (lower.endsWith('.txt')) return 'text/plain'; return 'application/octet-stream'; }
|
|
129
|
+
function stableJson(value) { return JSON.stringify(sortJson(value)); }
|
|
130
|
+
function sortJson(value) { if (Array.isArray(value)) return value.map(sortJson); if (!value || typeof value !== 'object') return value; return Object.fromEntries(Object.keys(value).sort().map((key) => [key, sortJson(value[key])])); }
|