@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,128 @@
|
|
|
1
|
+
import { projectParticipantAuthority } from './grounding.participantAuthority.js';
|
|
2
|
+
import { projectWorkProvenance } from './grounding.workProvenance.js';
|
|
3
|
+
import { projectGroundingSourceEvidence } from './grounding.sourceEvidence.js';
|
|
4
|
+
import { projectGroundingPlanningContext } from './grounding.planningContext.js';
|
|
5
|
+
|
|
6
|
+
export const PORTABLE_GROUNDING_CAPSULE_SCHEMA_ID = 'tiinex.portable.grounding-capsule.v1';
|
|
7
|
+
|
|
8
|
+
const MAX_CONTEXT = 8;
|
|
9
|
+
const MAX_EXCLUSIONS = 6;
|
|
10
|
+
|
|
11
|
+
export function projectGroundingCapsule({ authority = null, continuation = null, contextAudit = null, requiredContext = [], records = [], topology = {}, blockers = [] } = {}) {
|
|
12
|
+
const routeRecords = selectedRouteRecords(authority, records);
|
|
13
|
+
const workProvenance = projectWorkProvenance({ records, topology });
|
|
14
|
+
const participantAuthority = projectParticipantAuthority(authority);
|
|
15
|
+
return Object.freeze({
|
|
16
|
+
schema: PORTABLE_GROUNDING_CAPSULE_SCHEMA_ID,
|
|
17
|
+
semanticReductions: Object.freeze(requiredContext.slice(0, MAX_CONTEXT).map(reduceRequiredContext)),
|
|
18
|
+
frontier: projectFrontier(topology, blockers),
|
|
19
|
+
exclusions: Object.freeze(routeRecords.flatMap((record) => parseExclusions(record.markdown || '')).slice(0, MAX_EXCLUSIONS)),
|
|
20
|
+
sourceEvidence: projectGroundingSourceEvidence({ records, contextAudit, continuation }),
|
|
21
|
+
planningContext: projectGroundingPlanningContext(requiredContext),
|
|
22
|
+
roleState: Object.freeze({
|
|
23
|
+
recipient: String(authority?.role?.endpoint?.label || authority?.handoff?.to || ''),
|
|
24
|
+
recipientState: String(authority?.role?.state || 'unresolved'),
|
|
25
|
+
holder: String(authority?.holderBinding?.roleLabel || ''),
|
|
26
|
+
holderState: String(authority?.holderBinding?.state || 'unresolved'),
|
|
27
|
+
compatibility: String(authority?.holderBinding?.recipientCompatibility || 'unresolved')
|
|
28
|
+
}),
|
|
29
|
+
participantAuthority,
|
|
30
|
+
workProvenance,
|
|
31
|
+
unresolved: Object.freeze([...workProvenance.unresolved]),
|
|
32
|
+
boundary: 'Full Required Context bodies remain selector-gated.'
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function reduceRequiredContext(entry = {}) {
|
|
37
|
+
const qualified = String(entry.state || '') === 'qualified';
|
|
38
|
+
const markdown = qualified && typeof entry.content === 'string' ? entry.content : '';
|
|
39
|
+
const signals = markdown ? semanticSignals(markdown) : [];
|
|
40
|
+
return Object.freeze({
|
|
41
|
+
id: String(entry.requirementId || entry.name || ''),
|
|
42
|
+
state: String(entry.state || 'unresolved'),
|
|
43
|
+
workspace: String(entry.workspaceId || ''),
|
|
44
|
+
path: String(entry.innerPath || entry.workspaceRelativePath || ''),
|
|
45
|
+
title: markdown ? firstHeading(markdown) : String(entry.name || ''),
|
|
46
|
+
signals: Object.freeze(signals),
|
|
47
|
+
basis: markdown ? 'exact-qualified-body-reduction' : 'qualified-locator-without-body'
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function semanticSignals(markdown = '') {
|
|
52
|
+
const preferred = ['Objective', 'Purpose', 'Decision', 'Scope', 'Done Criteria', 'Completion Expectation', 'Dependencies'];
|
|
53
|
+
const out = [];
|
|
54
|
+
for (const heading of preferred) {
|
|
55
|
+
const text = section(markdown, heading);
|
|
56
|
+
if (!text) continue;
|
|
57
|
+
out.push(Object.freeze({ heading, text: compact(sectionMeaning(text), 220) }));
|
|
58
|
+
if (out.length === 2) break;
|
|
59
|
+
}
|
|
60
|
+
if (!out.length) {
|
|
61
|
+
const summary = field(markdown, 'Summary');
|
|
62
|
+
if (summary) out.push(Object.freeze({ heading: 'Summary', text: compact(summary, 220) }));
|
|
63
|
+
}
|
|
64
|
+
return out;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function projectFrontier(topology = {}, blockers = []) {
|
|
68
|
+
const frontier = (topology.currentFrontier || []).slice(0, 4).map((item) => Object.freeze({
|
|
69
|
+
path: String(item.path || ''),
|
|
70
|
+
status: String(item.declaredStatus || ''),
|
|
71
|
+
objective: compact(item.objective || '', 180)
|
|
72
|
+
}));
|
|
73
|
+
return Object.freeze({
|
|
74
|
+
state: frontier.length ? 'resolved' : 'unresolved',
|
|
75
|
+
rationale: frontier.length ? 'nearest nonterminal Task ancestor(s) to the exact selected Handoff route by declared Parent distance' : 'no exact-qualified nonterminal Task ancestor resolved on the selected route Parent lineage',
|
|
76
|
+
items: Object.freeze(frontier),
|
|
77
|
+
blockers: Object.freeze((blockers || []).slice(0, 4).map((item) => Object.freeze({ code: String(item.code || item.id || ''), detail: compact(item.detail || item.message || item.label || '', 180) })))
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function parseExclusions(markdown = '') {
|
|
82
|
+
const body = section(markdown, 'Exclusions And Dependencies');
|
|
83
|
+
if (!body) return [];
|
|
84
|
+
const blocks = body.split(/\n(?=-\s+[^\s])/g).map((item) => item.trim()).filter(Boolean);
|
|
85
|
+
return blocks.map((block) => {
|
|
86
|
+
const id = (block.match(/^-\s+([^\n]+)/) || [])[1] || '';
|
|
87
|
+
return Object.freeze({
|
|
88
|
+
id: id.trim(),
|
|
89
|
+
kind: field(block, 'Kind'),
|
|
90
|
+
description: compact(field(block, 'Description'), 220)
|
|
91
|
+
});
|
|
92
|
+
}).filter((item) => item.id);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function selectedRouteRecords(authority = {}, records = []) {
|
|
96
|
+
const workspace = String(authority?.selectedRoute?.workspaceId || '');
|
|
97
|
+
const inner = String(authority?.selectedRoute?.workspaceRelativeHandoffPath || '').replace(/^\/+/, '');
|
|
98
|
+
const expected = workspace && inner ? `${workspace}/${inner}` : '';
|
|
99
|
+
return expected ? records.filter((record) => String(record.path || '') === expected) : [];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function section(markdown = '', heading = '') {
|
|
103
|
+
const escaped = heading.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
104
|
+
const match = String(markdown || '').match(new RegExp(`(?:^|\\n)##\\s+${escaped}\\s*\\r?\\n([\\s\\S]*?)(?=\\n##\\s+|$)`, 'i'));
|
|
105
|
+
return match ? match[1].trim() : '';
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function field(markdown = '', label = '') {
|
|
109
|
+
const escaped = label.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
110
|
+
const match = String(markdown || '').match(new RegExp(`^\\s*-\\s+${escaped}:\\s*(.+)$`, 'mi'));
|
|
111
|
+
return match ? stripMarkdown(match[1]) : '';
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function firstHeading(markdown = '') {
|
|
115
|
+
const match = String(markdown || '').match(/^#\s+(.+)$/m);
|
|
116
|
+
return match ? stripMarkdown(match[1]) : '';
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function sectionMeaning(text = '') {
|
|
120
|
+
const description = field(text, 'Description');
|
|
121
|
+
if (description) return description;
|
|
122
|
+
const purpose = field(text, 'Purpose');
|
|
123
|
+
if (purpose) return purpose;
|
|
124
|
+
return String(text || '').replace(/^\s*-\s+/gm, '').replace(/^\s{2,}-\s+/gm, ' ').replace(/\s+/g, ' ').trim();
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function stripMarkdown(value = '') { return String(value || '').replace(/\[([^\]]+)\]\([^)]*\)/g, '$1').replace(/[`*_]/g, '').trim(); }
|
|
128
|
+
function compact(value = '', limit = 220) { const text = stripMarkdown(String(value || '').replace(/\s+/g, ' ')); return text.length > limit ? `${text.slice(0, limit - 1).trimEnd()}…` : text; }
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import { relevantLineageIssues } from './grounding.readiness.support.js';
|
|
2
|
+
|
|
3
|
+
const MAX_ITEMS = 12;
|
|
4
|
+
|
|
5
|
+
export function projectColdStartContinuity({ mode = '', lineage = {}, routeRecordIds = new Set(), authority = {}, material = {} } = {}) {
|
|
6
|
+
if (mode !== 'routed-handoff-package') return Object.freeze({
|
|
7
|
+
state: 'not-applicable',
|
|
8
|
+
proof: emptyProof(),
|
|
9
|
+
blockingIssues: Object.freeze([]),
|
|
10
|
+
recovery: Object.freeze({ state: 'not-applicable' }),
|
|
11
|
+
boundary: continuityBoundary()
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const ancestorIds = ancestorLineageCone(lineage, routeRecordIds);
|
|
15
|
+
const nodeById = new Map((lineage.nodes || []).map((node) => [node.id, node]));
|
|
16
|
+
const parentEdges = (lineage.edges || []).filter((edge) => edge.kind === 'parent' && ancestorIds.has(edge.to));
|
|
17
|
+
const issues = relevantLineageIssues(lineage, ancestorIds);
|
|
18
|
+
const rootNodes = [...ancestorIds]
|
|
19
|
+
.map((id) => nodeById.get(id))
|
|
20
|
+
.filter(Boolean)
|
|
21
|
+
.filter((node) => !hasResolvedParent(parentEdges, node.id));
|
|
22
|
+
const qualifiedRoots = rootNodes.filter(isQualifiedSemanticRoot);
|
|
23
|
+
const apparentRoots = rootNodes.filter((node) => !isQualifiedSemanticRoot(node));
|
|
24
|
+
const rootIssues = apparentRoots.map((node) => Object.freeze({
|
|
25
|
+
code: 'continuity.root.unqualified',
|
|
26
|
+
severity: 'warning',
|
|
27
|
+
nodeId: node.id || '',
|
|
28
|
+
target: String(node.trace || ''),
|
|
29
|
+
message: node.trace
|
|
30
|
+
? 'A loaded apparent root still declares a Parent that is not qualified in the current continuity proof.'
|
|
31
|
+
: 'A loaded root lacks the continuity/integrity evidence required for compact cold-start root qualification.'
|
|
32
|
+
}));
|
|
33
|
+
const blockingIssues = dedupe([...issues, ...rootIssues]);
|
|
34
|
+
const qualified = ancestorIds.size > 0 && blockingIssues.length === 0 && qualifiedRoots.length > 0;
|
|
35
|
+
const firstIssue = blockingIssues.find((item) => String(item.target || '').trim()) || null;
|
|
36
|
+
const recovery = qualified ? Object.freeze({ state: 'not-required' }) : projectExactRecovery(firstIssue || {}, authority, nodeById);
|
|
37
|
+
const losses = projectNonCriticalLosses(material);
|
|
38
|
+
|
|
39
|
+
return Object.freeze({
|
|
40
|
+
state: qualified ? 'qualified' : 'unproven',
|
|
41
|
+
proof: Object.freeze({
|
|
42
|
+
schema: 'tiinex.portable.cold-start-continuity-proof.v1',
|
|
43
|
+
state: qualified ? 'qualified' : 'unproven',
|
|
44
|
+
basis: 'declared-parent-only + loaded edge qualification + qualified semantic root',
|
|
45
|
+
routeRecordIds: Object.freeze([...routeRecordIds].slice(0, MAX_ITEMS)),
|
|
46
|
+
ancestorRecordsChecked: ancestorIds.size,
|
|
47
|
+
parentEdgesChecked: parentEdges.length,
|
|
48
|
+
roots: Object.freeze(rootNodes.slice(0, MAX_ITEMS).map(rootSummary)),
|
|
49
|
+
qualifiedRoots: Object.freeze(qualifiedRoots.slice(0, MAX_ITEMS).map(rootSummary)),
|
|
50
|
+
bodiesProjected: 0,
|
|
51
|
+
compactReceiptOnly: true,
|
|
52
|
+
filenameDimensionsUsed: false,
|
|
53
|
+
carrierDimensionsUsed: false
|
|
54
|
+
}),
|
|
55
|
+
blockingIssues: Object.freeze(blockingIssues.slice(0, MAX_ITEMS)),
|
|
56
|
+
blockingIssuesOmitted: Math.max(0, blockingIssues.length - MAX_ITEMS),
|
|
57
|
+
recovery,
|
|
58
|
+
losses,
|
|
59
|
+
boundary: continuityBoundary()
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function acceptedRecoveryMaterial(value = {}) {
|
|
64
|
+
const acceptance = value?.result || value || {};
|
|
65
|
+
if (!acceptance || String(acceptance.status || '') !== 'accepted') return Object.freeze({
|
|
66
|
+
files: Object.freeze([]),
|
|
67
|
+
findings: Object.freeze(acceptance && Object.keys(acceptance).length ? [Object.freeze({
|
|
68
|
+
severity: 'warning',
|
|
69
|
+
code: 'portable.grounding.recovery.unaccepted',
|
|
70
|
+
message: 'Recovery input was supplied but is not an accepted host-action receipt result, so it was not used as lineage material.',
|
|
71
|
+
source: 'tiinex.portable.grounding-readiness.v1'
|
|
72
|
+
})] : [])
|
|
73
|
+
});
|
|
74
|
+
const files = [];
|
|
75
|
+
for (const response of Array.isArray(acceptance.providerResponses) ? acceptance.providerResponses : []) {
|
|
76
|
+
for (const file of Array.isArray(response?.files) ? response.files : []) files.push(file);
|
|
77
|
+
}
|
|
78
|
+
for (const file of Array.isArray(acceptance.material?.files) ? acceptance.material.files : []) files.push(file);
|
|
79
|
+
return Object.freeze({ files: Object.freeze(files), findings: Object.freeze([]) });
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function projectNonCriticalLosses(material = {}) {
|
|
83
|
+
const assets = Array.isArray(material.assets) ? material.assets : [];
|
|
84
|
+
const unavailable = assets.filter((asset) => asset?.previewState === 'metadata-only' || asset?.contentAvailable === false);
|
|
85
|
+
return Object.freeze({
|
|
86
|
+
state: unavailable.length ? 'degraded' : 'none',
|
|
87
|
+
blocking: false,
|
|
88
|
+
items: Object.freeze(unavailable.slice(0, MAX_ITEMS).map((asset) => Object.freeze({
|
|
89
|
+
path: String(asset.path || ''),
|
|
90
|
+
kind: String(asset.kind || 'asset'),
|
|
91
|
+
state: 'unavailable',
|
|
92
|
+
necessity: 'non-critical'
|
|
93
|
+
}))),
|
|
94
|
+
itemsOmitted: Math.max(0, unavailable.length - MAX_ITEMS),
|
|
95
|
+
boundary: 'Unavailable non-lineage assets remain visible degradation only. They do not block cold-start act-readiness unless another authoritative relation makes them required grounding material.'
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function ancestorLineageCone(lineage = {}, startIds = new Set()) {
|
|
100
|
+
const all = new Set((lineage.nodes || []).map((node) => node.id));
|
|
101
|
+
const parents = new Map();
|
|
102
|
+
for (const edge of lineage.edges || []) {
|
|
103
|
+
if (edge.kind !== 'parent' || !edge.from || !edge.to) continue;
|
|
104
|
+
if (['missing', 'mismatch'].includes(String(edge.status || ''))) continue;
|
|
105
|
+
if (!parents.has(edge.to)) parents.set(edge.to, []);
|
|
106
|
+
parents.get(edge.to).push(edge.from);
|
|
107
|
+
}
|
|
108
|
+
const starts = [...startIds].filter((id) => all.has(id));
|
|
109
|
+
const out = new Set(starts);
|
|
110
|
+
const queue = [...starts];
|
|
111
|
+
while (queue.length) {
|
|
112
|
+
const id = queue.shift();
|
|
113
|
+
for (const parentId of parents.get(id) || []) {
|
|
114
|
+
if (out.has(parentId)) continue;
|
|
115
|
+
out.add(parentId);
|
|
116
|
+
queue.push(parentId);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return out;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function hasResolvedParent(edges = [], nodeId = '') {
|
|
123
|
+
return edges.some((edge) => edge.to === nodeId && edge.from && !['missing', 'mismatch'].includes(String(edge.status || '')));
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function isQualifiedSemanticRoot(node = {}) {
|
|
127
|
+
return Boolean(node && !String(node.trace || '').trim() && node.hasContinuityContext && node.hasIntegrity);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function rootSummary(node = {}) {
|
|
131
|
+
return Object.freeze({
|
|
132
|
+
id: String(node.id || ''),
|
|
133
|
+
path: String(node.path || ''),
|
|
134
|
+
title: String(node.title || ''),
|
|
135
|
+
schemaId: String(node.schemaId || ''),
|
|
136
|
+
declaresParent: Boolean(String(node.trace || '').trim()),
|
|
137
|
+
hasContinuityContext: Boolean(node.hasContinuityContext),
|
|
138
|
+
hasIntegrity: Boolean(node.hasIntegrity)
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function projectExactRecovery(issue = {}, authority = {}, nodeById = new Map()) {
|
|
143
|
+
const exactTarget = String(issue?.target || '').trim();
|
|
144
|
+
if (!exactTarget) return Object.freeze({
|
|
145
|
+
state: 'operator-required',
|
|
146
|
+
target: '',
|
|
147
|
+
whyRequired: 'Cold-start Parent continuity is unproven and no exact machine-recoverable target was available from the blocking lineage evidence.',
|
|
148
|
+
allowedScope: 'Resolve only the declared blocking Parent/continuity evidence; do not search for semantically similar substitutes.',
|
|
149
|
+
operatorRequest: operatorRequest('', authority)
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
const sourceNode = nodeById.get(String(issue?.nodeId || '')) || null;
|
|
153
|
+
const github = parseGithubBlob(exactTarget) || acceptedPinnedRelativeRepositoryTarget(exactTarget, sourceNode);
|
|
154
|
+
const repositoryBinding = authority?.capabilities?.discovery?.profile?.toolBindings?.repositoryRead?.selected || null;
|
|
155
|
+
if (github && repositoryBinding) {
|
|
156
|
+
return Object.freeze({
|
|
157
|
+
state: 'host-action-available',
|
|
158
|
+
target: exactTarget,
|
|
159
|
+
whyRequired: 'This exact declared Parent is required to prove cold-start continuity to a qualified root.',
|
|
160
|
+
allowedScope: 'Read only the exact declared or deterministically resolved repository path/ref. Do not broaden search or substitute similar material.',
|
|
161
|
+
...(github.basis ? { resolutionBasis: github.basis } : {}),
|
|
162
|
+
hostAction: Object.freeze({
|
|
163
|
+
operation: 'plan-host-action',
|
|
164
|
+
action: 'repository-read',
|
|
165
|
+
request: Object.freeze({
|
|
166
|
+
repository: github.repository,
|
|
167
|
+
ref: github.ref,
|
|
168
|
+
path: github.path,
|
|
169
|
+
purpose: 'recover exact declared Parent for cold-start continuity proof',
|
|
170
|
+
nextOperation: 'ground'
|
|
171
|
+
}),
|
|
172
|
+
selectedTool: Object.freeze({
|
|
173
|
+
id: String(repositoryBinding.tool?.id || ''),
|
|
174
|
+
name: String(repositoryBinding.tool?.name || '')
|
|
175
|
+
})
|
|
176
|
+
}),
|
|
177
|
+
resume: resumeGround(authority)
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return Object.freeze({
|
|
182
|
+
state: 'operator-required',
|
|
183
|
+
target: exactTarget,
|
|
184
|
+
whyRequired: 'This exact declared Parent is required to prove cold-start continuity to a qualified root, and no currently bound exact repository-read capability can supply it.',
|
|
185
|
+
allowedScope: 'Provide the exact declared target bytes or an accepted exact-read receipt. Do not substitute semantically similar material or widen origin scope.',
|
|
186
|
+
operatorRequest: operatorRequest(exactTarget, authority),
|
|
187
|
+
resume: resumeGround(authority)
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function parseGithubBlob(value = '') {
|
|
192
|
+
const match = String(value || '').match(/^https:\/\/github\.com\/([^/]+\/[^/]+)\/blob\/([^/]+)\/(.+)$/i);
|
|
193
|
+
if (!match) return null;
|
|
194
|
+
return Object.freeze({ repository: match[1], ref: match[2], path: match[3], basis: 'declared-github-blob-target' });
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function acceptedPinnedRelativeRepositoryTarget(target = '', node = {}) {
|
|
198
|
+
const raw = String(target || '').trim();
|
|
199
|
+
if (!raw || /^[a-z][a-z0-9+.-]*:/i.test(raw) || raw.startsWith('/')) return null;
|
|
200
|
+
const source = node?.record?.source || {};
|
|
201
|
+
if (source.receiptQualification !== 'accepted-host-repository-read') return null;
|
|
202
|
+
if (source.provenanceQualification !== 'accepted-host-repository-pinned') return null;
|
|
203
|
+
const repository = String(source.repository || '').trim();
|
|
204
|
+
const ref = String(source.commit || source.ref || '').trim();
|
|
205
|
+
const sourcePath = String(source.path || '').trim();
|
|
206
|
+
const path = resolveRelativeRepositoryPath(sourcePath, raw);
|
|
207
|
+
if (!repository || !ref || !path) return null;
|
|
208
|
+
return Object.freeze({
|
|
209
|
+
repository,
|
|
210
|
+
ref,
|
|
211
|
+
path,
|
|
212
|
+
basis: 'accepted-pinned-parent-source-relative-resolution'
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
function resolveRelativeRepositoryPath(sourcePath = '', target = '') {
|
|
217
|
+
const base = String(sourcePath || '').replace(/\\/g, '/').replace(/^\/+/, '');
|
|
218
|
+
const raw = String(target || '').replace(/\\/g, '/').trim();
|
|
219
|
+
if (!base || !raw || raw.startsWith('/') || /^[a-z][a-z0-9+.-]*:/i.test(raw)) return '';
|
|
220
|
+
const parts = base.split('/').filter(Boolean);
|
|
221
|
+
parts.pop();
|
|
222
|
+
for (const segment of raw.split('/')) {
|
|
223
|
+
if (!segment || segment === '.') continue;
|
|
224
|
+
if (segment === '..') {
|
|
225
|
+
if (!parts.length) return '';
|
|
226
|
+
parts.pop();
|
|
227
|
+
continue;
|
|
228
|
+
}
|
|
229
|
+
parts.push(segment);
|
|
230
|
+
}
|
|
231
|
+
return parts.join('/');
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
function operatorRequest(target = '', authority = {}) {
|
|
235
|
+
return Object.freeze({
|
|
236
|
+
role: 'Transport Operator',
|
|
237
|
+
target: String(target || ''),
|
|
238
|
+
request: target
|
|
239
|
+
? 'Provide exactly the declared Parent material (or an accepted host exact-read receipt for it) so Tooling can resume the same ground operation.'
|
|
240
|
+
: 'Provide the exact missing Parent/continuity material identified by Tooling so the same ground operation can resume.',
|
|
241
|
+
semanticJudgmentRequired: false,
|
|
242
|
+
resume: resumeGround(authority)
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
function resumeGround(authority = {}) {
|
|
247
|
+
return Object.freeze({
|
|
248
|
+
operation: 'ground',
|
|
249
|
+
route: String(authority?.selectedRoute?.pointerPath || ''),
|
|
250
|
+
recoveryOption: '--recovery <accepted-host-receipt.json>',
|
|
251
|
+
note: 'Resume the same ground command after accept-host-receipt; recovered material remains candidate input until lineage identity/integrity qualification succeeds.'
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function emptyProof() {
|
|
256
|
+
return Object.freeze({
|
|
257
|
+
schema: 'tiinex.portable.cold-start-continuity-proof.v1',
|
|
258
|
+
state: 'not-applicable',
|
|
259
|
+
basis: 'not-applicable',
|
|
260
|
+
routeRecordIds: Object.freeze([]),
|
|
261
|
+
ancestorRecordsChecked: 0,
|
|
262
|
+
parentEdgesChecked: 0,
|
|
263
|
+
roots: Object.freeze([]),
|
|
264
|
+
qualifiedRoots: Object.freeze([]),
|
|
265
|
+
bodiesProjected: 0,
|
|
266
|
+
compactReceiptOnly: true,
|
|
267
|
+
filenameDimensionsUsed: false,
|
|
268
|
+
carrierDimensionsUsed: false
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
function continuityBoundary() {
|
|
273
|
+
return 'Cold-start continuity is proven only through declared Parent topology and qualified loaded evidence. Apparent roots with an unavailable declared Parent are not closure; full ancestor bodies are not projected by this proof; fetched/recovered representations remain candidate material until independently qualified.';
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
function dedupe(items = []) {
|
|
277
|
+
const map = new Map();
|
|
278
|
+
for (const item of items) {
|
|
279
|
+
const key = `${item.code || ''}:${item.nodeId || ''}:${item.target || ''}`;
|
|
280
|
+
if (!map.has(key)) map.set(key, item);
|
|
281
|
+
}
|
|
282
|
+
return [...map.values()];
|
|
283
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export function projectParticipantAuthority(authority = null) {
|
|
2
|
+
const role = authority?.role || {};
|
|
3
|
+
const material = role.material?.artifact || null;
|
|
4
|
+
const declared = role.authorityBoundaryLoaded || {};
|
|
5
|
+
const holder = authority?.holderBinding || {};
|
|
6
|
+
const hasBasis = String(role.state || '') === 'qualified' && Boolean(material) && Boolean(declared.mayDo || declared.doesNotAuthorize || declared.reviewBoundary);
|
|
7
|
+
if (!hasBasis) return Object.freeze({ state: 'unresolved', participantIdentityCreatesAuthority: false, conversationPositionCreatesAuthority: false, universalHumanFeedbackRule: false });
|
|
8
|
+
return Object.freeze({
|
|
9
|
+
state: 'qualified-declared-basis',
|
|
10
|
+
recipientRole: String(role.endpoint?.label || authority?.handoff?.to || ''),
|
|
11
|
+
roleMaterial: Object.freeze({ path: String(material.path || ''), schemaId: String(material.schemaId || ''), roleLabel: String(material.roleLabel || '') }),
|
|
12
|
+
authorityBoundary: Object.freeze({ mayDo: compact(declared.mayDo), doesNotAuthorize: compact(declared.doesNotAuthorize), reviewBoundary: compact(declared.reviewBoundary) }),
|
|
13
|
+
holderBinding: Object.freeze({ state: String(holder.state || 'unresolved'), roleLabel: String(holder.roleLabel || ''), source: String(holder.source || 'none'), explicit: Boolean(holder.explicit), inferredFromTransport: Boolean(holder.inferredFromTransport) }),
|
|
14
|
+
participantIdentityCreatesAuthority: false,
|
|
15
|
+
conversationPositionCreatesAuthority: false,
|
|
16
|
+
universalHumanFeedbackRule: false,
|
|
17
|
+
boundary: 'Qualified Role material plus explicit holder binding is the basis. Identity/chat position alone create no authority; no universal human-input-as-feedback rule is imposed.'
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function compact(value = '', limit = 180) { const text = String(value || '').replace(/\s+/g, ' ').trim(); return text.length > limit ? `${text.slice(0, limit - 1).trimEnd()}…` : text; }
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const MAX_ITEMS = 6;
|
|
2
|
+
|
|
3
|
+
export function projectGroundingPlanningContext(requiredContext = []) {
|
|
4
|
+
const items = [];
|
|
5
|
+
for (const entry of requiredContext || []) {
|
|
6
|
+
if (String(entry?.state || '') !== 'qualified' || typeof entry?.content !== 'string') continue;
|
|
7
|
+
const planning = section(entry.content, 'Planning Context');
|
|
8
|
+
if (!planning) continue;
|
|
9
|
+
items.push(Object.freeze({
|
|
10
|
+
requirementId: String(entry.requirementId || entry.name || ''),
|
|
11
|
+
workspace: String(entry.workspaceId || ''),
|
|
12
|
+
path: String(entry.innerPath || entry.workspaceRelativePath || ''),
|
|
13
|
+
segment: field(planning, 'Segment'),
|
|
14
|
+
purpose: field(planning, 'Purpose'),
|
|
15
|
+
endCondition: field(planning, 'End Condition'),
|
|
16
|
+
forecast: field(planning, 'Expected Remaining Turns Or Handoffs'),
|
|
17
|
+
confidence: field(planning, 'Confidence'),
|
|
18
|
+
afterBoundary: field(planning, 'After This Segment'),
|
|
19
|
+
basis: 'exact-qualified-required-context-planning-section'
|
|
20
|
+
}));
|
|
21
|
+
if (items.length >= MAX_ITEMS) break;
|
|
22
|
+
}
|
|
23
|
+
if (!items.length) return Object.freeze({ state: 'unresolved', items: Object.freeze([]) });
|
|
24
|
+
return Object.freeze({
|
|
25
|
+
state: 'qualified',
|
|
26
|
+
items: Object.freeze(items),
|
|
27
|
+
boundary: 'Only qualified carried Planning Context fields create plan semantics.'
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function section(markdown = '', heading = '') { const escaped = escape(heading); return String(markdown || '').match(new RegExp(`(?:^|\\n)##\\s+${escaped}\\s*\\r?\\n([\\s\\S]*?)(?=\\n##\\s+|\\n#\\s+Continuity Integrity|$)`, 'i'))?.[1]?.trim() || ''; }
|
|
32
|
+
function field(markdown = '', label = '') { const escaped = escape(label); return strip(String(markdown || '').match(new RegExp(`^\\s*-\\s+${escaped}:\\s*(.+)$`, 'mi'))?.[1] || ''); }
|
|
33
|
+
function strip(value = '') { return String(value || '').replace(/^\[([^\]]+)\]\([^)]+\)$/, '$1').replace(/[`*_]/g, '').trim(); }
|
|
34
|
+
function escape(value = '') { return String(value || '').replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); }
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function projectGroundingAuthority(authority, mode) {
|
|
2
|
+
if (!authority || mode !== 'routed-handoff-package') return Object.freeze({ state: 'not-supplied', route: null, handoff: null, role: null, holderBinding: null, operationBoundary: null });
|
|
3
|
+
const mutationBoundary = authority.mutationBoundary || null;
|
|
4
|
+
return Object.freeze({
|
|
5
|
+
state: String(authority.status || ''),
|
|
6
|
+
route: authority.selectedRoute ? Object.freeze({ id: authority.selectedRoute.id || '', pointerPath: authority.selectedRoute.pointerPath || '', workspaceId: authority.selectedRoute.workspaceId || '' }) : null,
|
|
7
|
+
handoff: authority.handoff ? Object.freeze({ purpose: authority.handoff.purpose || '', from: authority.handoff.from || '', to: authority.handoff.to || '', completionExpectation: authority.handoff.completionExpectation || null }) : null,
|
|
8
|
+
role: authority.role ? Object.freeze({ state: authority.role.state || '', label: authority.role.endpoint?.label || '', kind: authority.role.endpoint?.kind || '' }) : null,
|
|
9
|
+
holderBinding: authority.holderBinding ? Object.freeze({ state: authority.holderBinding.state || '', holderId: authority.holderBinding.holderId || '', roleLabel: authority.holderBinding.roleLabel || '', recipientRoleLabel: authority.holderBinding.recipientRoleLabel || '', recipientCompatibility: authority.holderBinding.recipientCompatibility || '', source: authority.holderBinding.source || '', explicit: Boolean(authority.holderBinding.explicit), inferredFromTransport: Boolean(authority.holderBinding.inferredFromTransport), boundary: authority.holderBinding.boundary || '' }) : null,
|
|
10
|
+
operationBoundary: mutationBoundary ? Object.freeze({
|
|
11
|
+
...mutationBoundary,
|
|
12
|
+
scope: 'current-grounding-operation-only',
|
|
13
|
+
semanticAuthority: 'Handoff/Task/Role artifacts govern downstream work authority; this operation boundary neither grants nor revokes source-edit authority.',
|
|
14
|
+
boundary: 'Describes the non-mutating behavior and host-safety limits of the current Tooling grounding operation only. It must not be interpreted as a prohibition on separately authorized downstream Workspace work.'
|
|
15
|
+
}) : null
|
|
16
|
+
});
|
|
17
|
+
}
|