@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,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "tiinex.portable.bootstrap.pointer.v1",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"portableToolingLine": "v6",
|
|
5
|
+
"repository": "Tiinex/site",
|
|
6
|
+
"bootstrapPath": "src/tooling/portable/bootstrap/tiinex.llm.bootstrap.md",
|
|
7
|
+
"entrypointPath": "src/tooling/portable/index.js",
|
|
8
|
+
"cliPath": "tools/tiinex-portable.mjs",
|
|
9
|
+
"preferredRefPolicy": "Use an explicit commit or release ref when available; disclose when a moving branch was used.",
|
|
10
|
+
"firstOperations": [
|
|
11
|
+
"discover-tooling",
|
|
12
|
+
"describe-checkpoint-gate",
|
|
13
|
+
"plan-host-action",
|
|
14
|
+
"prepare-task"
|
|
15
|
+
],
|
|
16
|
+
"fallback": "When JavaScript is unavailable, read the bootstrap Markdown and supplied schema/artifact Markdown directly while preserving all stated source and qualification boundaries.",
|
|
17
|
+
"boundary": {
|
|
18
|
+
"semanticAuthority": false,
|
|
19
|
+
"remoteFetch": "host-mediated-only",
|
|
20
|
+
"remoteWrite": false,
|
|
21
|
+
"sourceMutation": false,
|
|
22
|
+
"receivedCodeExecution": false
|
|
23
|
+
},
|
|
24
|
+
"verificationPath": "tools/tiinex-portable-verify.mjs"
|
|
25
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { openPortableSession, restorePortableSession, serializePortableSession } from '../session/portable.session.js';
|
|
2
|
+
import { portableFinding, summarizePortableFindings } from '../findings.js';
|
|
3
|
+
|
|
4
|
+
export const PORTABLE_CHECKPOINT_SCHEMA_ID = 'tiinex.portable.checkpoint.v1';
|
|
5
|
+
export const PORTABLE_CHECKPOINT_VERSION = 1;
|
|
6
|
+
|
|
7
|
+
export function createPortableCheckpoint(input = {}, options = {}) {
|
|
8
|
+
const snapshot = normalizeSessionSnapshot(input.session || input.snapshot || input);
|
|
9
|
+
const createdAt = String(input.createdAt || options.createdAt || new Date().toISOString());
|
|
10
|
+
const findings = [];
|
|
11
|
+
const unresolved = snapshot.durableFindings || [];
|
|
12
|
+
const staged = snapshot.stagedArtifacts || [];
|
|
13
|
+
const invalidStaged = staged.filter((artifact) => artifact?.qualification?.validationStatus === 'invalid' || artifact?.qualification?.exportReady === false);
|
|
14
|
+
if (unresolved.length) findings.push(portableFinding('info', 'portable.checkpoint.durable-findings.pending', 'Checkpoint contains durable findings that have not yet been materialized into artifacts.', { count: unresolved.length }));
|
|
15
|
+
if (invalidStaged.length) findings.push(portableFinding('warning', 'portable.checkpoint.staged-artifacts.incomplete', 'Checkpoint contains staged artifacts that are not fully export-ready.', { count: invalidStaged.length }));
|
|
16
|
+
const summary = checkpointSummary(snapshot);
|
|
17
|
+
const digest = stableHash(JSON.stringify({ summary, materials: snapshot.materials, staged, unresolved, schemaCache: snapshot.schemaCache }));
|
|
18
|
+
const findingSummary = summarizePortableFindings(findings);
|
|
19
|
+
const status = findingSummary.counts.error ? 'blocked' : invalidStaged.length || unresolved.length ? 'degraded' : 'ready';
|
|
20
|
+
return Object.freeze({
|
|
21
|
+
schema: PORTABLE_CHECKPOINT_SCHEMA_ID,
|
|
22
|
+
version: PORTABLE_CHECKPOINT_VERSION,
|
|
23
|
+
checkpointId: `checkpoint:${digest}`,
|
|
24
|
+
createdAt,
|
|
25
|
+
status,
|
|
26
|
+
summary,
|
|
27
|
+
session: snapshot,
|
|
28
|
+
integrity: Object.freeze({ method: 'portable-stable-hash-v1', value: digest, cryptographic: false }),
|
|
29
|
+
boundary: Object.freeze({
|
|
30
|
+
canonicalHandoffArtifact: false,
|
|
31
|
+
canonicalPackageFormatLocked: false,
|
|
32
|
+
hiddenChatStateIncluded: false,
|
|
33
|
+
remoteFetch: false,
|
|
34
|
+
remoteWrite: false,
|
|
35
|
+
sourceMutation: false,
|
|
36
|
+
statement: 'Portable checkpoint is an explicit recoverable session snapshot, not a canonical Tiinex handoff artifact.'
|
|
37
|
+
}),
|
|
38
|
+
findings: Object.freeze(findings),
|
|
39
|
+
findingSummary
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function restorePortableCheckpoint(checkpoint = {}) {
|
|
44
|
+
if (checkpoint?.schema !== PORTABLE_CHECKPOINT_SCHEMA_ID) throw new Error('portable.checkpoint.schema.invalid');
|
|
45
|
+
if (Number(checkpoint?.version || 0) !== PORTABLE_CHECKPOINT_VERSION) throw new Error('portable.checkpoint.version.unsupported');
|
|
46
|
+
if (!checkpoint.session) throw new Error('portable.checkpoint.session.missing');
|
|
47
|
+
const expectedDigest = stableHash(JSON.stringify({ summary: checkpointSummary(checkpoint.session), materials: checkpoint.session.materials, staged: checkpoint.session.stagedArtifacts || [], unresolved: checkpoint.session.durableFindings || [], schemaCache: checkpoint.session.schemaCache || [] }));
|
|
48
|
+
if (checkpoint.integrity?.value && checkpoint.integrity.value !== expectedDigest) throw new Error('portable.checkpoint.integrity.mismatch');
|
|
49
|
+
const restored = restorePortableSession(checkpoint.session).snapshot();
|
|
50
|
+
return Object.freeze({
|
|
51
|
+
schema: 'tiinex.portable.checkpoint.restore.v1',
|
|
52
|
+
checkpointId: String(checkpoint.checkpointId || ''),
|
|
53
|
+
status: 'restored',
|
|
54
|
+
session: restored,
|
|
55
|
+
boundary: checkpoint.boundary || Object.freeze({ canonicalHandoffArtifact: false, remoteWrite: false, sourceMutation: false })
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function normalizeSessionSnapshot(value = {}) {
|
|
60
|
+
if (typeof value?.snapshot === 'function') return serializePortableSession(value);
|
|
61
|
+
if (value?.schema === 'tiinex.portable.session.v1') {
|
|
62
|
+
try { return restorePortableSession(value).snapshot(); }
|
|
63
|
+
catch { return openPortableSession(value).snapshot(); }
|
|
64
|
+
}
|
|
65
|
+
return openPortableSession(value).snapshot();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function checkpointSummary(snapshot = {}) {
|
|
69
|
+
return Object.freeze({
|
|
70
|
+
files: snapshot.materials?.files?.length || 0,
|
|
71
|
+
records: snapshot.materials?.records?.length || 0,
|
|
72
|
+
assets: snapshot.materials?.assets?.length || 0,
|
|
73
|
+
stagedArtifacts: snapshot.stagedArtifacts?.length || 0,
|
|
74
|
+
durableFindings: snapshot.durableFindings?.length || 0,
|
|
75
|
+
schemaCacheEntries: snapshot.schemaCache?.length || 0,
|
|
76
|
+
currentFocus: snapshot.currentFocus || '',
|
|
77
|
+
hasLastCheckpoint: Boolean(snapshot.lastCheckpoint)
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function stableHash(value = '') {
|
|
82
|
+
const text = String(value || '');
|
|
83
|
+
let hash = 2166136261;
|
|
84
|
+
for (let index = 0; index < text.length; index += 1) {
|
|
85
|
+
hash ^= text.charCodeAt(index);
|
|
86
|
+
hash = Math.imul(hash, 16777619);
|
|
87
|
+
}
|
|
88
|
+
return (hash >>> 0).toString(16).padStart(8, '0');
|
|
89
|
+
}
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { dedupePortableFindings, portableFinding, summarizePortableFindings } from '../findings.js';
|
|
2
|
+
|
|
3
|
+
export const PORTABLE_CHECKPOINT_GATE_SCHEMA_ID = 'tiinex.portable.checkpoint-gate.v1';
|
|
4
|
+
export const PORTABLE_VALIDATION_RECEIPT_SCHEMA_ID = 'tiinex.portable.validation-receipt.v1';
|
|
5
|
+
export const PORTABLE_CHECKPOINT_QUALIFICATION_SCHEMA_ID = 'tiinex.portable.checkpoint-qualification.v1';
|
|
6
|
+
|
|
7
|
+
const TYPECHECK_COMMAND = 'npx --no-install tsc --allowJs --jsx react-jsx --noEmit --skipLibCheck --moduleResolution bundler --module ESNext --target ES2022 src/app/TiinexApp.jsx src/schemas/workspace/workspace.views.jsx src/schemas/companion.js src/workspaces/workspace.feedSort.js src/workspaces/workspace.materialRole.js src/ui/primitives/Icon.jsx';
|
|
8
|
+
|
|
9
|
+
const GATES = Object.freeze({
|
|
10
|
+
'portable-syntax': gate('portable-syntax', 'Portable syntax', 'node --check <portable JavaScript sources>', 'portable', false),
|
|
11
|
+
'portable-tests': gate('portable-tests', 'Portable aggregate suite', 'node src/tooling/portable/portable.test.mjs', 'portable', false),
|
|
12
|
+
validate: gate('validate', 'Shared source validation', 'npm run validate', 'shared-core', false),
|
|
13
|
+
'ui-shape': gate('ui-shape', 'UI shape validation', 'npm run ui:shape', 'viewer', false),
|
|
14
|
+
'usecase-uc001': gate('usecase-uc001', 'UC001 validation', 'npm run usecase:uc001', 'viewer', false),
|
|
15
|
+
metrics: gate('metrics', 'Repository metrics', 'npm run metrics', 'diagnostics', false),
|
|
16
|
+
'storage-scan': gate('storage-scan', 'Storage scan', 'npm run storage:scan', 'diagnostics', false),
|
|
17
|
+
typecheck: gate('typecheck', 'Focused TypeScript check', TYPECHECK_COMMAND, 'viewer', true),
|
|
18
|
+
'runtime-smoke': gate('runtime-smoke', 'Runtime startup smoke', 'npm run runtime:smoke', 'runtime', true),
|
|
19
|
+
'build-public': gate('build-public', 'Public build', 'npm run build:public', 'release', true),
|
|
20
|
+
'public-check': gate('public-check', 'Public output validation', 'npm run public:check', 'release', true)
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const PROFILES = Object.freeze({
|
|
24
|
+
portable: Object.freeze(['portable-syntax', 'portable-tests']),
|
|
25
|
+
'source-clean': Object.freeze(['portable-syntax', 'portable-tests', 'validate', 'ui-shape', 'usecase-uc001', 'metrics', 'storage-scan', 'typecheck']),
|
|
26
|
+
release: Object.freeze(['portable-syntax', 'portable-tests', 'validate', 'ui-shape', 'usecase-uc001', 'metrics', 'storage-scan', 'typecheck', 'runtime-smoke', 'build-public', 'public-check'])
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function describePortableCheckpointGate(input = {}) {
|
|
30
|
+
const profile = normalizeProfile(input.profile);
|
|
31
|
+
const gates = PROFILES[profile].map((id) => Object.freeze({ ...GATES[id], required: true }));
|
|
32
|
+
return Object.freeze({
|
|
33
|
+
schema: PORTABLE_CHECKPOINT_GATE_SCHEMA_ID,
|
|
34
|
+
profile,
|
|
35
|
+
gates: Object.freeze(gates),
|
|
36
|
+
boundaries: Object.freeze({
|
|
37
|
+
executesCommands: false,
|
|
38
|
+
acceptsExplicitReceipts: true,
|
|
39
|
+
canonicalReleaseClaim: false,
|
|
40
|
+
canonicalHandoffGenerated: false,
|
|
41
|
+
browserParityProven: false
|
|
42
|
+
}),
|
|
43
|
+
findings: Object.freeze([]),
|
|
44
|
+
findingSummary: summarizePortableFindings([])
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function qualifyPortableCheckpoint(input = {}) {
|
|
49
|
+
const gate = describePortableCheckpointGate({ profile: input.profile });
|
|
50
|
+
const findings = [];
|
|
51
|
+
const receipts = normalizeReceipts(input.receipts);
|
|
52
|
+
const receiptByGate = new Map(receipts.map((receipt) => [receipt.gateId, receipt]));
|
|
53
|
+
const evaluatedGates = gate.gates.map((descriptor) => evaluateGate(descriptor, receiptByGate.get(descriptor.id), findings));
|
|
54
|
+
const siteIdentity = normalizeSiteIdentity(input.siteIdentity || input.package || {});
|
|
55
|
+
const portableIdentity = normalizePortableIdentity(input.portableIdentity || {});
|
|
56
|
+
const reproducibility = inspectReproducibility(input.reproducibility || input.package || {}, findings);
|
|
57
|
+
const continuity = inspectContinuityIdentity(siteIdentity, input.continuity || input, findings);
|
|
58
|
+
const evidence = inspectEvidence(input.evidence || [], findings);
|
|
59
|
+
|
|
60
|
+
if (!siteIdentity.version) findings.push(portableFinding('error', 'portable.checkpoint.identity.version.missing', 'Checkpoint qualification requires an explicit site/package version.'));
|
|
61
|
+
if (!portableIdentity.sourceFingerprint) findings.push(portableFinding('warning', 'portable.checkpoint.portable-identity.source-fingerprint.missing', 'Portable source fingerprint is missing; the receipt proves command outcomes but not the exact portable source set.'));
|
|
62
|
+
if (!portableIdentity.operationFingerprint) findings.push(portableFinding('warning', 'portable.checkpoint.portable-identity.operation-fingerprint.missing', 'Portable operation-catalog fingerprint is missing.'));
|
|
63
|
+
|
|
64
|
+
const failed = evaluatedGates.filter((entry) => entry.status === 'failed').length;
|
|
65
|
+
const incomplete = evaluatedGates.filter((entry) => entry.status === 'missing' || entry.status === 'blocked' || entry.status === 'skipped').length;
|
|
66
|
+
const warningCountBeforeStatus = findings.filter((finding) => finding.severity === 'warning').length;
|
|
67
|
+
const status = failed
|
|
68
|
+
? 'failed'
|
|
69
|
+
: incomplete
|
|
70
|
+
? 'incomplete'
|
|
71
|
+
: findings.some((finding) => finding.severity === 'error')
|
|
72
|
+
? 'failed'
|
|
73
|
+
: warningCountBeforeStatus
|
|
74
|
+
? 'qualified-with-warnings'
|
|
75
|
+
: 'qualified';
|
|
76
|
+
|
|
77
|
+
const dedupedFindings = dedupePortableFindings(findings);
|
|
78
|
+
return Object.freeze({
|
|
79
|
+
schema: PORTABLE_CHECKPOINT_QUALIFICATION_SCHEMA_ID,
|
|
80
|
+
status,
|
|
81
|
+
profile: gate.profile,
|
|
82
|
+
siteIdentity,
|
|
83
|
+
portableIdentity,
|
|
84
|
+
continuity,
|
|
85
|
+
reproducibility,
|
|
86
|
+
gates: Object.freeze(evaluatedGates),
|
|
87
|
+
gateSummary: Object.freeze({
|
|
88
|
+
total: evaluatedGates.length,
|
|
89
|
+
passed: evaluatedGates.filter((entry) => entry.status === 'passed').length,
|
|
90
|
+
failed,
|
|
91
|
+
blocked: evaluatedGates.filter((entry) => entry.status === 'blocked').length,
|
|
92
|
+
skipped: evaluatedGates.filter((entry) => entry.status === 'skipped').length,
|
|
93
|
+
missing: evaluatedGates.filter((entry) => entry.status === 'missing').length
|
|
94
|
+
}),
|
|
95
|
+
evidence,
|
|
96
|
+
qualification: Object.freeze({
|
|
97
|
+
technicalGateProfile: gate.profile,
|
|
98
|
+
commandsExecutedByThisOperation: false,
|
|
99
|
+
explicitReceiptsRequired: true,
|
|
100
|
+
exactPortableSourceBound: Boolean(portableIdentity.sourceFingerprint),
|
|
101
|
+
reproducibleBuildProven: reproducibility.status === 'deterministic',
|
|
102
|
+
checkpointIdentityConsistent: continuity.status === 'consistent',
|
|
103
|
+
browserParityProven: evidence.browser.count > 0 && evidence.browser.allPassed,
|
|
104
|
+
canonicalReleaseClaim: false,
|
|
105
|
+
canonicalHandoffGenerated: false,
|
|
106
|
+
statement: qualificationStatement(status, gate.profile)
|
|
107
|
+
}),
|
|
108
|
+
findings: dedupedFindings,
|
|
109
|
+
findingSummary: summarizePortableFindings(dedupedFindings)
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function evaluateGate(descriptor, receipt, findings) {
|
|
114
|
+
if (!receipt) {
|
|
115
|
+
findings.push(portableFinding('warning', 'portable.checkpoint.gate.receipt.missing', `Required gate ${descriptor.id} has no receipt.`, { gateId: descriptor.id }));
|
|
116
|
+
return Object.freeze({ ...descriptor, status: 'missing', receipt: null });
|
|
117
|
+
}
|
|
118
|
+
if (receipt.schema && receipt.schema !== PORTABLE_VALIDATION_RECEIPT_SCHEMA_ID) {
|
|
119
|
+
findings.push(portableFinding('error', 'portable.checkpoint.gate.receipt.schema', `Gate ${descriptor.id} uses an unsupported receipt schema.`, { gateId: descriptor.id, receivedSchema: receipt.schema }));
|
|
120
|
+
}
|
|
121
|
+
if (receipt.command && normalizeWhitespace(receipt.command) !== normalizeWhitespace(descriptor.command)) {
|
|
122
|
+
findings.push(portableFinding('error', 'portable.checkpoint.gate.command.mismatch', `Gate ${descriptor.id} receipt command does not match the declared checkpoint gate.`, { gateId: descriptor.id, expected: descriptor.command, received: receipt.command }));
|
|
123
|
+
}
|
|
124
|
+
const status = normalizeReceiptStatus(receipt.status, receipt.exitCode);
|
|
125
|
+
if (status === 'failed') findings.push(portableFinding('error', 'portable.checkpoint.gate.failed', `Checkpoint gate ${descriptor.id} failed.`, { gateId: descriptor.id, exitCode: receipt.exitCode ?? null }));
|
|
126
|
+
if (status === 'blocked') findings.push(portableFinding('warning', 'portable.checkpoint.gate.blocked', `Checkpoint gate ${descriptor.id} was blocked by the execution environment.`, { gateId: descriptor.id, reason: receipt.reason || '' }));
|
|
127
|
+
if (status === 'skipped') findings.push(portableFinding('warning', 'portable.checkpoint.gate.skipped', `Checkpoint gate ${descriptor.id} was skipped.`, { gateId: descriptor.id, reason: receipt.reason || '' }));
|
|
128
|
+
return Object.freeze({ ...descriptor, status, receipt: Object.freeze({ ...receipt, status }) });
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function inspectReproducibility(input = {}, findings) {
|
|
132
|
+
const dependencies = input.dependencies || input.packageJson?.dependencies || {};
|
|
133
|
+
const latestDependencies = Object.entries(dependencies).filter(([, value]) => String(value || '').trim() === 'latest').map(([name]) => name).sort();
|
|
134
|
+
const lockfiles = normalizeStringList(input.lockfiles || input.lockfileNames);
|
|
135
|
+
const installer = String(input.installer || input.workflowInstaller || '').trim();
|
|
136
|
+
const hasPackageLock = lockfiles.some((name) => /(^|\/)package-lock\.json$/i.test(name));
|
|
137
|
+
const hasNpmShrinkwrap = lockfiles.some((name) => /(^|\/)npm-shrinkwrap\.json$/i.test(name));
|
|
138
|
+
const hasYarnLock = lockfiles.some((name) => /(^|\/)yarn\.lock$/i.test(name));
|
|
139
|
+
const npmInstaller = /\bnpm\s+(install|ci)\b/i.test(installer);
|
|
140
|
+
const npmCi = /\bnpm\s+ci\b/i.test(installer);
|
|
141
|
+
const compatibleLock = !npmInstaller || hasPackageLock || hasNpmShrinkwrap;
|
|
142
|
+
|
|
143
|
+
if (latestDependencies.length) findings.push(portableFinding('warning', 'portable.checkpoint.reproducibility.latest-dependencies', 'Dependencies using "latest" prevent a reproducible dependency graph.', { dependencies: latestDependencies }));
|
|
144
|
+
if (npmInstaller && !compatibleLock) findings.push(portableFinding('warning', 'portable.checkpoint.reproducibility.npm-lock.missing', 'The workflow uses npm without a package-lock.json or npm-shrinkwrap.json.', { installer, lockfiles }));
|
|
145
|
+
if (/\bnpm\s+install\b/i.test(installer) && !npmCi) findings.push(portableFinding('warning', 'portable.checkpoint.reproducibility.npm-install', 'Release installation uses npm install rather than npm ci.', { installer }));
|
|
146
|
+
if (hasYarnLock && npmInstaller && !hasPackageLock && !hasNpmShrinkwrap) findings.push(portableFinding('warning', 'portable.checkpoint.reproducibility.lockfile-installer-mismatch', 'A yarn.lock is present while the release workflow installs with npm; the checked-in lockfile does not constrain that install.', { installer, lockfiles }));
|
|
147
|
+
|
|
148
|
+
const status = latestDependencies.length || !compatibleLock || (/\bnpm\s+install\b/i.test(installer) && !npmCi) ? 'at-risk' : lockfiles.length || !installer ? 'deterministic' : 'unqualified';
|
|
149
|
+
return Object.freeze({
|
|
150
|
+
status,
|
|
151
|
+
latestDependencies: Object.freeze(latestDependencies),
|
|
152
|
+
lockfiles: Object.freeze(lockfiles),
|
|
153
|
+
installer,
|
|
154
|
+
compatibleLock,
|
|
155
|
+
npmCi,
|
|
156
|
+
notes: Object.freeze([
|
|
157
|
+
'This diagnostic does not mutate package.json, lockfiles, or workflows.',
|
|
158
|
+
'Deterministic status describes supplied dependency/install metadata only.'
|
|
159
|
+
])
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function inspectContinuityIdentity(siteIdentity, input, findings) {
|
|
164
|
+
const packageCheckpoint = checkpointToken(siteIdentity.version);
|
|
165
|
+
const declaredCheckpoint = String(input.parityCheckpoint || input.declaredCheckpoint || '').trim();
|
|
166
|
+
const expectedVersion = String(input.expectedVersion || '').trim();
|
|
167
|
+
if (expectedVersion && expectedVersion !== siteIdentity.version) findings.push(portableFinding('error', 'portable.checkpoint.identity.expected-version.mismatch', 'Checkpoint version does not match the explicitly expected version.', { expectedVersion, actualVersion: siteIdentity.version }));
|
|
168
|
+
if (declaredCheckpoint && packageCheckpoint && normalizeCheckpoint(declaredCheckpoint) !== normalizeCheckpoint(packageCheckpoint)) findings.push(portableFinding('warning', 'portable.checkpoint.identity.declared-checkpoint.mismatch', 'A supplied parity/checkpoint identity does not match package version.', { declaredCheckpoint, packageCheckpoint }));
|
|
169
|
+
return Object.freeze({
|
|
170
|
+
status: declaredCheckpoint && packageCheckpoint && normalizeCheckpoint(declaredCheckpoint) !== normalizeCheckpoint(packageCheckpoint) ? 'drift' : siteIdentity.version ? 'consistent' : 'unknown',
|
|
171
|
+
packageCheckpoint,
|
|
172
|
+
declaredCheckpoint,
|
|
173
|
+
expectedVersion,
|
|
174
|
+
singleCanonicalIdentityProven: false,
|
|
175
|
+
statement: 'This diagnostic compares supplied identities; it does not make package.json a canonical Tiinex artifact.'
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function inspectEvidence(input = [], findings) {
|
|
180
|
+
const entries = (Array.isArray(input) ? input : []).map((entry, index) => Object.freeze({
|
|
181
|
+
id: String(entry.id || `evidence-${index + 1}`),
|
|
182
|
+
kind: String(entry.kind || 'manual'),
|
|
183
|
+
status: String(entry.status || 'observed'),
|
|
184
|
+
private: Boolean(entry.private),
|
|
185
|
+
embedded: Boolean(entry.embedded),
|
|
186
|
+
summary: String(entry.summary || ''),
|
|
187
|
+
locator: entry.locator || null
|
|
188
|
+
}));
|
|
189
|
+
for (const entry of entries) {
|
|
190
|
+
if (entry.private && entry.embedded) findings.push(portableFinding('error', 'portable.checkpoint.evidence.private-embedded', 'Private dogfood evidence must not be embedded into distributable tooling or fixtures.', { evidenceId: entry.id }));
|
|
191
|
+
}
|
|
192
|
+
const browser = entries.filter((entry) => entry.kind === 'browser' || entry.kind === 'video' || entry.kind === 'screenshot');
|
|
193
|
+
return Object.freeze({
|
|
194
|
+
entries: Object.freeze(entries),
|
|
195
|
+
browser: Object.freeze({ count: browser.length, allPassed: browser.length > 0 && browser.every((entry) => entry.status === 'passed' || entry.status === 'observed') }),
|
|
196
|
+
private: Object.freeze({ count: entries.filter((entry) => entry.private).length, embedded: entries.filter((entry) => entry.private && entry.embedded).length })
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function normalizeReceipts(receipts = []) {
|
|
201
|
+
return (Array.isArray(receipts) ? receipts : []).map((receipt) => Object.freeze({
|
|
202
|
+
schema: String(receipt.schema || PORTABLE_VALIDATION_RECEIPT_SCHEMA_ID),
|
|
203
|
+
gateId: String(receipt.gateId || receipt.id || ''),
|
|
204
|
+
command: String(receipt.command || ''),
|
|
205
|
+
status: String(receipt.status || ''),
|
|
206
|
+
exitCode: typeof receipt.exitCode === 'number' ? receipt.exitCode : null,
|
|
207
|
+
reason: String(receipt.reason || ''),
|
|
208
|
+
startedAt: String(receipt.startedAt || ''),
|
|
209
|
+
finishedAt: String(receipt.finishedAt || ''),
|
|
210
|
+
durationMs: Number.isFinite(Number(receipt.durationMs)) ? Number(receipt.durationMs) : null,
|
|
211
|
+
stdoutDigest: String(receipt.stdoutDigest || ''),
|
|
212
|
+
stderrDigest: String(receipt.stderrDigest || ''),
|
|
213
|
+
details: receipt.details || null,
|
|
214
|
+
environment: receipt.environment || null
|
|
215
|
+
})).filter((receipt) => receipt.gateId);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function normalizeSiteIdentity(input = {}) {
|
|
219
|
+
return Object.freeze({
|
|
220
|
+
name: String(input.name || input.packageName || ''),
|
|
221
|
+
version: String(input.version || input.packageVersion || ''),
|
|
222
|
+
description: String(input.description || ''),
|
|
223
|
+
commit: String(input.commit || input.commitSha || ''),
|
|
224
|
+
sourceCheckpoint: String(input.sourceCheckpoint || '')
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function normalizePortableIdentity(input = {}) {
|
|
229
|
+
return Object.freeze({
|
|
230
|
+
sourceFingerprint: String(input.sourceFingerprint || ''),
|
|
231
|
+
operationFingerprint: String(input.operationFingerprint || ''),
|
|
232
|
+
operationCount: Number.isFinite(Number(input.operationCount)) ? Number(input.operationCount) : null,
|
|
233
|
+
sourceFiles: Number.isFinite(Number(input.sourceFiles)) ? Number(input.sourceFiles) : null,
|
|
234
|
+
bootstrapFingerprint: String(input.bootstrapFingerprint || '')
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
function gate(id, label, command, category, requiresInstalledDependencies) {
|
|
239
|
+
return Object.freeze({ id, label, command, category, requiresInstalledDependencies });
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
function normalizeProfile(value = '') {
|
|
243
|
+
const profile = String(value || 'source-clean').trim().toLowerCase();
|
|
244
|
+
return Object.prototype.hasOwnProperty.call(PROFILES, profile) ? profile : 'source-clean';
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
function normalizeReceiptStatus(value = '', exitCode = null) {
|
|
248
|
+
const status = String(value || '').toLowerCase();
|
|
249
|
+
if (status === 'passed' || status === 'failed' || status === 'blocked' || status === 'skipped') return status;
|
|
250
|
+
if (typeof exitCode === 'number') return exitCode === 0 ? 'passed' : 'failed';
|
|
251
|
+
return 'missing';
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
function checkpointToken(version = '') {
|
|
255
|
+
const match = String(version || '').match(/(?:^|-)v(\d+)(?:$|[^\d])/i);
|
|
256
|
+
return match ? `v${match[1]}` : '';
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
function normalizeCheckpoint(value = '') {
|
|
260
|
+
const match = String(value || '').match(/v?(\d+)/i);
|
|
261
|
+
return match ? `v${match[1]}` : String(value || '').trim().toLowerCase();
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
function normalizeWhitespace(value = '') { return String(value || '').trim().replace(/\s+/g, ' '); }
|
|
265
|
+
function normalizeStringList(value = []) { return [...new Set((Array.isArray(value) ? value : [value]).map((item) => String(item || '').trim()).filter(Boolean))].sort(); }
|
|
266
|
+
function qualificationStatement(status, profile) {
|
|
267
|
+
if (status === 'qualified') return `All ${profile} checkpoint gates passed with explicit receipts and no reported diagnostic warnings.`;
|
|
268
|
+
if (status === 'qualified-with-warnings') return `All ${profile} checkpoint gates passed, but identity or reproducibility diagnostics remain.`;
|
|
269
|
+
if (status === 'incomplete') return `The ${profile} checkpoint is not fully qualified because required receipts are missing, blocked, or skipped.`;
|
|
270
|
+
return `The ${profile} checkpoint failed one or more required gates or identity checks.`;
|
|
271
|
+
}
|